Index: /palm/tags/release-6.0/EXAMPLES/agents/canyon/INPUT/canyon_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/canyon/INPUT/canyon_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/canyon/INPUT/canyon_p3d	(revision 3477)
@@ -0,0 +1,70 @@
+&initialization_parameters
+   !-- grid setup
+      nx = 19,
+      ny = 19,
+      nz = 20,
+
+      dx = 2.0,
+      dy = 2.0,
+      dz = 2.0,
+
+   !-- pressure solver
+      fft_method = 'temperton-algorithm',
+    loop_optimization    = 'cache',
+
+   !-- initialization
+      initializing_actions = 'set_constant_profiles',  ! constant vertical profiles are used,
+      pt_surface = 300.,                               ! based on given "*_surface" values
+      ug_surface = 1.0,
+      vg_surface = 0.0, 
+
+   !-- boundary conditions
+      bc_uv_t = 'neumann',                    ! free-slip boundary condition
+      bc_pt_b = 'dirichlet',                  ! surface temperature is calculated by e-balance solver in USM  
+      bc_pt_t = 'neumann',      
+      roughness_length = 0.1,                 ! applies to all surfaces
+
+   !-- topography   
+      topography = 'read_from_file',                ! file: generic_canyon_topo
+      
+   !-- other
+    most_method          = 'newton',
+      /                                       ! end of inipar-namelist
+
+
+ &runtime_parameters
+   !-- simulation time
+      end_time                = 10800.0, 
+
+   !-- others
+      create_disturbances = .T.,
+
+      netcdf_data_format = 5,
+      dt_dots = 9999999.,
+                    
+      /                                        ! end of canopy_par-namelist
+
+
+ &agent_parameters
+    multi_agent_system_start = 10500.,
+    dt_arel                  = 3.1,
+    dt_write_agent_data      = .04,
+    number_of_agent_groups   = 2,
+    adx                      = 1.8,1.8,
+    ady                      = 1.,1.,
+    asl                      = 13.,13.,
+    asr                      = 27.,27.,
+    ass                      = .5,38.,
+    asn                      = 2.,39.5,
+    at_x                     = 20.,20.,
+    at_y                     = 999.,-999.,  ! chosen far out of domain so that agents walk nearly parallel
+
+
+    /
+
+
+
+ &prepro_par
+      tolerance_dp  = .71,
+
+    /
Index: /palm/tags/release-6.0/EXAMPLES/agents/canyon/INPUT/canyon_topo
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/canyon/INPUT/canyon_topo	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/canyon/INPUT/canyon_topo	(revision 3477)
@@ -0,0 +1,20 @@
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+ 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
Index: /palm/tags/release-6.0/EXAMPLES/agents/canyon/OUTPUT/ani_agt.py
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/canyon/OUTPUT/ani_agt.py	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/canyon/OUTPUT/ani_agt.py	(revision 3477)
@@ -0,0 +1,85 @@
+#!/usr/bin/env python3
+
+import matplotlib
+import sys
+from matplotlib import colors, ticker, cm
+from matplotlib.backends.backend_pdf import PdfPages
+from netCDF4 import Dataset
+import matplotlib.pyplot as plt
+import numpy as np
+import math
+from matplotlib import animation
+import matplotlib.gridspec as gridspec
+from matplotlib.lines import Line2D
+from matplotlib.collections import PatchCollection
+from matplotlib.patches import Polygon
+matplotlib.rcParams['text.usetex'] = True
+
+
+input_file_name  = './canyon_agt.001.nc'
+
+file_content     = Dataset(input_file_name, mode='r') # load entire netCDF file
+print(file_content)
+time          = file_content.variables['time'][:] # extract variable
+agx           = file_content.variables['ag_x'][:,:]
+agy           = file_content.variables['ag_y'][:,:]
+grp           = file_content.variables['ag_group'][:,:]
+file_content.close() # close netCDF file
+
+input_file_name  = './topo.txt'
+f     = open(input_file_name, mode='r')
+data = []
+building_id = []
+vertex_id = []
+polygon = []
+gons = []
+p_last = 1
+for line in f:
+  line = line.strip()
+  columns = line.split()
+  if (int(columns[0]) > p_last):
+    gons.append(polygon)
+    polygon = []
+  polygon.append([float(columns[2]),float(columns[3])])
+  p_last = int(columns[0])
+gons.append(polygon)
+nop = int(columns[0])
+patches = []
+
+for i in range(nop):
+  poly = Polygon(gons[i-1], True)
+  patches.append(poly)
+p = PatchCollection(patches,facecolors='grey')
+
+Nt = np.shape(time)[0]
+print(Nt)
+Nt = Nt -1
+Nags = np.shape(agx[1,:])
+Nx = 40
+Ny = 40
+
+x = np.linspace(0.0, 40.0, Nx)
+y = np.linspace(0.0, 40.0, Ny)
+X, Y = np.meshgrid(x, y)
+
+fig,ax = plt.subplots()
+fig.set_size_inches(4., 8.)
+xrange = [10, 30]
+yrange = [0, 40]
+
+
+def animate(i):
+    ax.clear()
+    ax.add_collection(p)
+    x = agx[i,:]
+    y = agy[i,:]
+    ax.set_xlim(*xrange)
+    ax.set_ylim(*yrange)
+    ax.scatter(x,y,s=15,c=grp[i,:])
+    plt.title(r'simulated time: %i s' % time[i])
+    k = i/Nt*100.
+    print("Done: %6.2f percent\r" % k, file=sys.stdout, end=" ")
+    return ax,
+
+anim = animation.FuncAnimation(fig, animate, frames=Nt, interval=20, blit=False,save_count=0)
+anim.save('ags.mp4', dpi=200, writer='ffmpeg')
Index: /palm/tags/release-6.0/EXAMPLES/agents/canyon/OUTPUT/topo.txt
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/canyon/OUTPUT/topo.txt	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/canyon/OUTPUT/topo.txt	(revision 3477)
@@ -0,0 +1,8 @@
+      1       1     12.00      2.00
+      1       2     12.00     38.00
+      1       3      0.00     38.00
+      1       4      0.00      2.00
+      2       1     28.00      2.00
+      2       2     40.00      2.00
+      2       3     40.00     38.00
+      2       4     28.00     38.00
Index: /palm/tags/release-6.0/EXAMPLES/agents/corners/INPUT/corners_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/corners/INPUT/corners_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/corners/INPUT/corners_p3d	(revision 3477)
@@ -0,0 +1,62 @@
+&initialization_parameters
+   !-- grid setup
+      nx = 19,
+      ny = 19,
+      nz = 30,
+
+      dx = 1.0,
+      dy = 1.0,
+      dz = 1.0,
+
+   !-- pressure solver
+      fft_method = 'temperton-algorithm',
+    loop_optimization    = 'cache',
+
+   !-- initialization
+      initializing_actions = 'set_constant_profiles',  ! constant vertical profiles are used,
+      pt_surface = 300.,                               ! based on given "*_surface" values
+      ug_surface = 1.0,
+      vg_surface = 0.0, 
+
+   !-- boundary conditions
+      bc_uv_t = 'neumann',                    ! free-slip boundary condition
+      bc_pt_b = 'dirichlet',                  ! surface temperature is calculated by e-balance solver in USM  
+      bc_pt_t = 'neumann',      
+      roughness_length = 0.01,                 ! applies to all surfaces
+
+   !-- topography   
+      topography = 'read_from_file',                ! file: generic_canyon_topo
+      
+   !-- other
+    most_method          = 'newton',
+      /                                       ! end of inipar-namelist
+
+
+ &runtime_parameters  
+   !-- simulation time
+      end_time                = 150.0, 
+
+   !-- others
+      create_disturbances = .T.,
+
+      netcdf_data_format = 5,
+      dt_dots            = 9999999.,
+                    
+      /                                        ! end of canopy_par-namelist
+
+
+ &agent_parameters
+    dim_size_agtnum_manual = 50,
+    dt_arel                = 12.,
+    dt_write_agent_data    = .05,
+    number_of_agent_groups = 4,
+    adx                    =   .9,   .9,   4.,   4.,
+    ady                    =   4.,   4.,   .9,   .9,
+    asl                    =   8.,   8.,  1.5,  18.,
+    asr                    =  12.,  12.,   2., 18.5,
+    ass                    =  1.5,  18.,   8.,   8., 
+    asn                    =   2., 18.5,  12.,  12.,
+    at_x                   =  10.,  10.,  16.,   4.,
+    at_y                   =  16.,   4.,  10.,  10.,
+
+    /
Index: /palm/tags/release-6.0/EXAMPLES/agents/corners/INPUT/corners_topo
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/corners/INPUT/corners_topo	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/corners/INPUT/corners_topo	(revision 3477)
@@ -0,0 +1,20 @@
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
+  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
Index: /palm/tags/release-6.0/EXAMPLES/agents/corners/OUTPUT/ani_agt.py
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/corners/OUTPUT/ani_agt.py	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/corners/OUTPUT/ani_agt.py	(revision 3477)
@@ -0,0 +1,103 @@
+#!/usr/bin/env python3
+
+import matplotlib
+import sys
+from matplotlib import colors, ticker, cm
+from matplotlib.backends.backend_pdf import PdfPages
+from netCDF4 import Dataset
+import matplotlib.pyplot as plt
+import numpy as np
+import math
+from matplotlib import animation
+import matplotlib.gridspec as gridspec
+from matplotlib.lines import Line2D
+from matplotlib.collections import PatchCollection
+from matplotlib.patches import Polygon
+matplotlib.rcParams['text.usetex'] = True
+
+
+input_file_name  = './corners_agt.059.nc'
+
+file_content     = Dataset(input_file_name, mode='r') # load entire netCDF file
+print(file_content)
+time          = file_content.variables['time'][:] # extract variable
+agx           = file_content.variables['ag_x'][:,:]
+agy           = file_content.variables['ag_y'][:,:]
+group           = file_content.variables['ag_group'][:,:]
+file_content.close() # close netCDF file
+
+input_file_name  = './topo.txt'
+f     = open(input_file_name, mode='r')
+data = []
+building_id = []
+vertex_id = []
+polygon = []
+gons = []
+p_last = 1
+for line in f:
+  line = line.strip()
+  columns = line.split()
+  if (int(columns[0]) > p_last):
+    gons.append(polygon)
+    polygon = []
+  polygon.append([float(columns[2]),float(columns[3])])
+  p_last = int(columns[0])
+gons.append(polygon)
+nop = int(columns[0])
+patches = []
+
+for i in range(nop):
+  poly = Polygon(gons[i-1], True)
+  patches.append(poly)
+p = PatchCollection(patches,facecolors='grey')
+
+input_file_name  = './topo_nav.txt'
+f     = open(input_file_name, mode='r')
+t_x = []
+t_y = []
+
+l_count = 0
+for line in f:
+  l_count = l_count + 1
+  line = line.strip()
+  columns_t = line.split()
+  t_x.append(columns_t[2])
+  t_y.append(columns_t[3])
+
+Nt = np.shape(time)[0]
+print(Nt)
+Nt = Nt -1
+Nags = np.shape(agx[1,:])
+Nx = 20
+Ny = 20
+
+x = np.linspace(0.0, 20.0, Nx)
+y = np.linspace(0.0, 20.0, Ny)
+X, Y = np.meshgrid(x, y)
+
+fig,ax = plt.subplots()
+fig.set_size_inches(7., 7.)
+xrange = [0, 20]
+yrange = [0, 20]
+colors = ['yellow','red','blue']
+
+
+def animate(i):
+    ax.clear()
+    ax.add_collection(p)
+    x = agx[i,:]
+    y = agy[i,:]
+    ax.set_xlim(*xrange)
+    ax.set_ylim(*yrange)
+    ax.scatter(x,y,s=3,c=group[i,:])
+    ax.scatter(t_x,t_y,s=1,c='red')
+    plt.title(r'simulated time: %i s' % time[i])
+    k = i/Nt*100.
+    print("Done: %6.2f percent\r" % k, file=sys.stdout, end=" ")
+    return ax,
+
+anim = animation.FuncAnimation(fig, animate, frames=Nt, interval=60, blit=False,save_count=0)
+anim.save('ags.mp4', dpi=200, writer='ffmpeg')
+#anim.save('basic_animation.gif', fps=1, extra_args=['-vcodec', 'libx264'])
+
+#plt.show()
Index: /palm/tags/release-6.0/EXAMPLES/agents/corners/OUTPUT/topo.txt
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/agents/corners/OUTPUT/topo.txt	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/agents/corners/OUTPUT/topo.txt	(revision 3477)
@@ -0,0 +1,4 @@
+      1       1     15.00     13.00
+      1       2      6.00     13.00
+      1       3      6.00      7.00
+      1       4     15.00      7.00
Index: /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_large_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_large_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_large_p3d	(revision 3477)
@@ -0,0 +1,28 @@
+ &inipar nx = 511, ny = 511, nz = 64,
+         dx = 1.0, dy = 1.0, dz = 1.0,
+         dz_stretch_level = 1200.0,
+
+         background_communication = .FALSE.,
+
+         fft_method = 'system-specific',
+         loop_optimization = 'acc',
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 0.0, vg_surface = 0.0,
+         pt_vertical_gradient       = 0.0, 1.0,
+         pt_vertical_gradient_level = 0.0, 800.0,
+
+
+	 surface_heatflux = 0.1, bc_pt_b = 'neumann'  
+
+/ 
+
+ &d3par  end_time = 65.0,
+
+         create_disturbances = .T.,
+         dt_disturb = 150.0, disturbance_energy_limit = 0.01,
+
+         dt_run_control = 0.0,
+
+/
+
Index: /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_medium_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_medium_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_medium_p3d	(revision 3477)
@@ -0,0 +1,28 @@
+ &inipar nx = 255, ny = 255, nz = 64,
+         dx = 1.0, dy = 1.0, dz = 1.0,
+         dz_stretch_level = 1200.0,
+
+         background_communication = .FALSE.,
+
+         fft_method = 'system-specific',
+         loop_optimization = 'acc',
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 0.0, vg_surface = 0.0,
+         pt_vertical_gradient       = 0.0, 1.0,
+         pt_vertical_gradient_level = 0.0, 800.0,
+
+
+	 surface_heatflux = 0.1, bc_pt_b = 'neumann'  
+
+/ 
+
+ &d3par  end_time = 30.0,
+
+         create_disturbances = .T.,
+         dt_disturb = 150.0, disturbance_energy_limit = 0.01,
+
+         dt_run_control = 0.0,
+
+/
+
Index: /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_small_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_small_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_small_p3d	(revision 3477)
@@ -0,0 +1,28 @@
+ &inipar nx = 39, ny = 39, nz = 40,
+         dx = 50.0, dy = 50.0, dz = 50.0,
+         dz_stretch_level = 1200.0,
+
+         background_communication = .FALSE.,
+
+         fft_method = 'system-specific',
+         loop_optimization = 'acc',
+
+         initializing_actions = 'set_constant_profiles',
+         pt_reference = 300.0,
+         ug_surface = 0.0, vg_surface = 0.0,
+         pt_vertical_gradient       = 0.0, 1.0,
+         pt_vertical_gradient_level = 0.0, 800.0,
+
+
+	 surface_heatflux = 0.1, bc_pt_b = 'neumann',  /
+
+
+ &d3par  end_time = 600.0,
+
+         create_disturbances = .T.,
+         dt_disturb = 7200.0, disturbance_energy_limit = 0.01,
+
+         dt_run_control = 0.0,
+
+          /
+
Index: /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_small_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_small_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/benchmark_openacc/acc_small_rc	(revision 3477)
@@ -0,0 +1,197 @@
+
+ ******************************      ------------------------------------------
+ * PALM 3.9  Rev: 1170M       *      atmosphere - 3D - run without 1D - prerun
+ ******************************      ------------------------------------------
+
+ Date:                 30-05-13      Run:       acc_small           
+ Time:                 10:44:18      Run-No.:   00
+ Run on host:           unknown
+ Accelerator boards:          1
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using system-specific routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: acc
+ --> Time differencing scheme: runge-kutta-3       
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:              600.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =     50.000 m    dy =     50.000 m    dz =     50.000 m
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   2862.511 m
+
+ dz constant up to   1200.000 m (k=  25), then stretched by factor: 1.080
+ maximum dz not to be exceeded is dz_max = ********** m
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    40,     40,     42)
+
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt(1)              
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.100000 K m/s
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+
+
+ Data output:
+ -----------
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.729E-04 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000119 1/s
+                            f*    =  0.000084 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Reference temperature in buoyancy terms: 300.0000 K
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   800.0  m
+       Temperature:   300.00  300.00  300.00  K
+       Gradient:      ------    0.00    1.00  K/100m
+       Gridpoint:          0       0      16
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*   THETA*    Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A  -0.2192D -0.2169D -0.1214  0.000  1.38   0.000    800.  0.106E-02  0.000E+00  0.000E+00  0.000E+00   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      1 00:00:20.00  20.0000A  -0.2192  -0.2169  -0.1214  0.001  1.41  ******    850.  0.105E-02  0.000E+00  0.370E-12  0.739E-13   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      2 00:00:40.00  20.0000D  -0.2151  -0.2176  -0.1209  0.001  0.79  ******    150.  0.104E-02  0.000E+00  0.370E-12  0.739E-13   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      3 00:01:00.00  20.0000D  -0.2107  -0.2178  -0.1204  0.001  0.79  ******    150.  0.103E-02  0.000E+00  0.370E-12  0.739E-13   11  32   5    5  37  29    4  26   0    0.000    0.000       0
+  0      4 00:01:20.00  20.0000D  -0.2060  -0.2177  -0.1199  0.001  0.79  ******    150.  0.102E-02  0.000E+00  0.370E-12  0.739E-13   11  32   5    4   5   2    4  26   0    0.000    0.000       0
+  0      5 00:01:40.00  20.0000D  -0.2011  -0.2184  -0.1193  0.001  0.79  ******    150.  0.101E-02  0.000E+00  0.370E-12  0.739E-13   11  32   5    4   5   2    4  26   0    0.000    0.000       0
+  0      6 00:02:00.00  20.0000D  -0.1959  -0.2186  -0.1188  0.001  0.79  ******    150.  0.100E-02  0.000E+00  0.370E-12  0.739E-13   11  32   5    4   5   2    4  26   0    0.000    0.000       0
+  0      7 00:02:20.00  20.0000D  -0.1942  -0.2184  -0.1182  0.001  1.29  ******    650.  0.994E-03  0.000E+00  0.370E-12  0.739E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0      8 00:02:40.00  20.0000D  -0.1948  -0.2177  -0.1175  0.001  1.29  ******    650.  0.985E-03  0.000E+00  0.370E-12  0.739E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0      9 00:03:00.00  20.0000D  -0.1950  -0.2167  -0.1168  0.001  1.29  ******    650.  0.976E-03  0.000E+00  0.370E-12  0.739E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0     10 00:03:20.00  20.0000D  -0.1947  -0.2153  -0.1160  0.001  1.29  ******    650.  0.968E-03  0.000E+00  0.370E-12  0.739E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0     11 00:03:40.00  20.0000D  -0.1941  -0.2135  -0.1151  0.001  1.29  ******    650.  0.959E-03  0.000E+00  0.370E-12  0.739E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0     12 00:04:00.00  20.0000D  -0.1931  -0.2115  -0.1141  0.001  1.29  ******    650.  0.951E-03  0.000E+00  0.370E-12  0.739E-13   11  32   4    4   5   2    4  26   0    0.000    0.000       0
+  0     13 00:04:20.00  20.0000D  -0.1917  -0.2092  -0.1130  0.002  1.29  ******    650.  0.943E-03  0.000E+00  0.370E-12  0.739E-13    6   0  13    4   5   2    4  26   0    0.000    0.000       0
+  0     14 00:04:40.00  20.0000D  -0.1913  -0.2066  -0.1118  0.002  1.29  ******    650.  0.936E-03  0.000E+00  0.370E-12  0.739E-13    6   0  13    4   5   2    4  26   0    0.000    0.000       0
+  0     15 00:05:00.00  20.0000D  -0.1907  -0.2039  -0.1105  0.002  1.29  ******    650.  0.929E-03  0.000E+00  0.370E-12  0.739E-13    6   0  13    4   5   2    4  26   0    0.000    0.000       0
+  0     16 00:05:20.00  20.0000D  -0.1900  -0.2009  -0.1091  0.002  1.29  ******    650.  0.923E-03  0.000E+00  0.370E-12  0.739E-13    6   0  13    4   5   2    4  26   0    0.000    0.000       0
+  0     17 00:05:40.00  20.0000D  -0.1905  -0.1977  -0.1075  0.002  1.29  ******    650.  0.918E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    4   5   2    4  26   0    0.000    0.000       0
+  0     18 00:06:00.00  20.0000D  -0.1917  -0.1956   0.1083  0.003  1.28  ******    650.  0.915E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    6  29  30    2  22  30    0.000    0.000       0
+  0     19 00:06:20.00  20.0000D  -0.1926  -0.1964   0.1204  0.003  1.28  ******    650.  0.914E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    6  29  30    2  22  30    0.000    0.000       0
+  0     20 00:06:40.00  20.0000D  -0.1932  -0.1970   0.1346  0.003  1.28  ******    650.  0.916E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    6  29  30    2  22  30    0.000    0.000       0
+  0     21 00:07:00.00  20.0000D  -0.1935  -0.1972   0.1511  0.003  1.28  ******    650.  0.922E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    6  29  30    2  22  30    0.000    0.000       0
+  0     22 00:07:20.00  20.0000D  -0.1935  -0.1971   0.1704  0.004  1.28  ******    650.  0.932E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    6  29  30    2  22  30    0.000    0.000       0
+  0     23 00:07:40.00  20.0000D  -0.1933  -0.2002   0.1928  0.004  1.28  ******    650.  0.948E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    4   4   2    2  22  30    0.000    0.000       0
+  0     24 00:08:00.00  20.0000D  -0.1927  -0.2033   0.2186  0.005  1.28  ******    650.  0.974E-03  0.000E+00  0.370E-12  0.739E-13   10  36   1    4   4   2    2  22  30    0.000    0.000       0
+  0     25 00:08:20.00  20.0000D  -0.1918  -0.2065   0.2485  0.006  1.28  ******    650.  0.101E-02  0.000E+00  0.370E-12  0.739E-13   10  36   1    4   4   2    2  22  30    0.000    0.000       0
+  0     26 00:08:40.00  20.0000D  -0.1907  -0.2098   0.2828  0.006  1.28  ******    650.  0.106E-02  0.000E+00  0.370E-12  0.739E-13   10  36   1    4   4   2    2  22  30    0.000    0.000       0
+  0     27 00:09:00.00  20.0000D  -0.1894  -0.2133   0.3220  0.007  1.28  ******    650.  0.114E-02  0.000E+00  0.370E-12  0.739E-13   10  36   1    4   4   2    2  22  30    0.000    0.000       0
+  0     28 00:09:20.00  20.0000D   0.1930  -0.2172   0.3667  0.008  1.28  ******    650.  0.124E-02  0.000E+00  0.370E-12  0.739E-13    4  30  36    4   4   2    2  22  30    0.000    0.000       0
+  0     29 00:09:40.00  20.0000D  -0.2145  -0.2214   0.4171  0.009  1.28  ******    650.  0.138E-02  0.000E+00  0.370E-12  0.739E-13    1  29  23    4   4   2    2  22  30    0.000    0.000       0
+  0     30 00:10:00.00  20.0000D  -0.2405  -0.2261   0.4735  0.011  1.28  ******    650.  0.156E-02  0.000E+00  0.370E-12  0.739E-13    1  29  23    4   4   2    2  22  30    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/building/example_building_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/building/example_building_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/building/example_building_p3d	(revision 3477)
@@ -0,0 +1,49 @@
+ &inipar nx = 39, ny = 39, nz = 40,
+         dx = 2.0, dy = 2.0, dz = 2.0,
+
+         fft_method = 'temperton-algorithm',   ! fast, but restrictions apply
+
+         momentum_advec = 'ws-scheme',         ! default advection scheme
+         scalar_advec   = 'ws-scheme',
+
+         omega = 0.0,                          ! no Coriolis force
+         conserve_volume_flow = .T.,           ! maintain constant bulk velocity
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 1.0, vg_surface = 0.0,   ! implies bulk velocity 1 m/s
+         roughness_length = 0.1,               ! applies to all surfaces locally
+         neutral = .T.,                        ! strictly neutral flow
+
+         bc_uv_t = 'dirichlet_0',              ! channel flow boundary condition
+
+         topography = 'single_building',
+         topography_grid_convention = 'cell_edge',  ! default
+         building_height   = 40.0,
+         building_length_x = 40.0,
+         building_length_y = 40.0,  /
+
+ &d3par  end_time                  =   7200.0,
+         termination_time_needed   =    900.0,
+
+         create_disturbances = .T.,
+
+         dt_run_control            =      6.0,
+         dt_dots                   =      6.0,
+
+         skip_time_dopr            =      0.0,
+         dt_dopr                   =   3600.0,
+         averaging_interval_pr     =   3600.0,
+         dt_averaging_input_pr     =      6.0,
+
+         skip_time_data_output     =      0.0,
+         dt_data_output            =   3600.0,
+
+         averaging_interval        =   3600.0,
+         dt_averaging_input        =      6.0,
+
+         data_output_pr = '#u', 'w"u"', 'w*u*', 'wu', 'u*2', 
+                          '#v', 'w"v"', 'w*v*', 'wv', 'v*2',
+                          'w', 'w*2', 'e', 'e*', '#km', '#l',
+
+         data_output = 'u',       'v',       'w',
+                       'u_av',    'v_av',    'w_av',  /
Index: /palm/tags/release-6.0/EXAMPLES/building/example_building_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/building/example_building_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/building/example_building_rc	(revision 3477)
@@ -0,0 +1,1425 @@
+
+ ******************************    --------------------------------------------
+ * PALM 4.0  Rev: 1541        *    atmosphere - 3D - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 28-01-15    Run:       example_building    
+ Time:                 13:24:51    Run-No.:   00
+ Run on host:             lcmuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> No pt-equation solved. Neutral stratification with pt = 300.00 K assumed
+ --> Volume flow at the right and north boundary will be conserved
+     using the initial_profiles mode
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             7200.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      2.000 m    dy =      2.000 m    dz =      2.000 m
+ Domain size:       x =     80.000 m     y =     80.000 m  z(u) =     81.000 m
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     20,     42)
+
+
+
+ Large scale forcing and nudging:
+ -------------------------------
+
+ --> No large scale forcing from external is used (default) 
+ --> No nudging is used (default) 
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            1.00    1.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: single_building                         
+ Building size (x/y/z) in m:  40.0 /  40.0 /  40.0
+ Horizontal index bounds (l/r/s/n):   10 /   30 /   10 /   30
+ Topography grid definition convention:
+ cell edge (staggered grid points
+ (u in x-direction, v in y-direction))
+
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt_surface         
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = 0                     | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =   1.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+       Predefined surface temperature
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0  m
+       Temperature:   300.00  K
+       Gradient:      ------  K/100m
+       Gridpoint:          0
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: u, w"u", w*u*, wu, u*2, v, w"v", w*v*, wv, v*2, w, w*2,      
+
+              : e, e*, km, l,                                                
+       Output every              3600.00 s
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+    3D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Upper output limit at       81.00 m  (GP   41)
+
+
+       Number of output time levels allowed: unlimited
+
+
+    3D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset                     
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+       Upper output limit at       81.00 m  (GP   41)
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 6.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.000E+00 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000000 1/s
+                            f*    =  0.000000 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :     5.00 m (GP    3)
+    Upper disturbance level         :    25.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   1.2000A   1.4959D -0.8116D -0.6272  0.000  0.00   0.000E+00      0.  0.482E+00  0.000E+00  0.000E+00  0.000E+00    6  30  16    6  30  30   21  19  30    0.000    0.000       0
+  0      7 00:00:06.50   0.9200A   1.9574   1.3904   1.3121  0.074  0.00   0.000E+00      0.  0.581E+00  0.125E+00  0.111E-02  0.336E-03    9  30  31   11  30   9   20  19   9    0.000    0.000       0
+  0     13 00:00:12.37   0.9920A   1.8137  -1.2563   1.2678  0.076  0.00   0.000E+00      0.  0.589E+00  0.949E-01  0.121E-02  0.335E-03   12  32  13    8  10   9   20  19   9    0.000    0.000       0
+  0     19 00:00:18.41   1.0200A   1.7633   1.1867   1.2350  0.078  0.00   0.000E+00      0.  0.598E+00  0.100E+00  0.127E-02  0.328E-03   13  32  15    7  30   9   20  19   9    0.000    0.000       0
+  0     25 00:00:24.62   1.0300A   1.7512   1.1285   1.2029  0.080  0.00   0.000E+00      0.  0.606E+00  0.106E+00  0.128E-02  0.323E-03   10   6  15    1  31   9   20  19   9    0.000    0.000       0
+  0     31 00:00:30.82   1.0400A   1.7356   1.0673   1.1695  0.081  0.00   0.000E+00      0.  0.614E+00  0.110E+00  0.125E-02  0.313E-03    9  33  17    1  31   9   20  18   9    0.000    0.000       0
+  0     36 00:00:36.04   1.0500A   1.7095   1.0049   1.1388  0.081  0.00   0.000E+00      0.  0.621E+00  0.113E+00  0.121E-02  0.297E-03    9  33  18   17  30   9   20  17   9    0.000    0.000       0
+  0     42 00:00:42.38   1.0600A   1.6987   1.0021   1.1122  0.082  0.00   0.000E+00      0.  0.628E+00  0.117E+00  0.115E-02  0.277E-03   13  33  18   17  30   9   20  24   9    0.000    0.000       0
+  0     48 00:00:48.74   1.0600A   1.7007   0.9672   1.0893  0.084  0.00   0.000E+00      0.  0.636E+00  0.121E+00  0.108E-02  0.258E-03    9  34  22   16  30   9   20  25   9    0.000    0.000       0
+  0     53 00:00:54.08   1.0800A   1.6702   0.9113   1.0411  0.085  0.00   0.000E+00      0.  0.641E+00  0.123E+00  0.103E-02  0.239E-03   12  34  24   14  30   9   20  25   9    0.000    0.000       0
+  0     59 00:01:00.61   1.0900A   1.6529   0.8094   0.9442  0.087  0.00   0.000E+00      0.  0.648E+00  0.126E+00  0.945E-03  0.199E-03    8   5  25   17  30   9   20  24   9    0.000    0.000       0
+  0     64 00:01:06.05   1.0900A   1.6574  -0.7448   0.8335  0.088  0.00   0.000E+00      0.  0.653E+00  0.127E+00  0.885E-03  0.166E-03    8   5  27   15  23  34   20  24   9    0.000    0.000       0
+  0     70 00:01:12.59   1.0900A   1.6476   0.8132  -0.9846  0.090  0.00   0.000E+00      0.  0.658E+00  0.129E+00  0.859E-03  0.135E-03   10   4  31   15  13   1   10  11   9    0.000    0.000       0
+  0     75 00:01:18.04   1.0900A   1.6559   0.8438  -1.1258  0.091  0.00   0.000E+00      0.  0.662E+00  0.131E+00  0.864E-03  0.117E-03   14  35  32   15  13   1    9  11   9    0.000    0.000       0
+  0     81 00:01:24.48   1.0600A   1.6916  -0.9299  -1.2168  0.093  0.00   0.000E+00      0.  0.667E+00  0.132E+00  0.850E-03  0.994E-04   14  36  35   13  26   3    9  11   9    0.000    0.000       0
+  0     87 00:01:30.81   1.0500A   1.7163  -0.9757  -1.3046  0.095  0.00   0.000E+00      0.  0.670E+00  0.132E+00  0.868E-03  0.922E-04   10  36  38   12  26   5    8  27   9    0.000    0.000       0
+  0     92 00:01:36.02   1.0400A   1.7318   1.0926  -1.2880  0.096  0.00   0.000E+00      0.  0.671E+00  0.131E+00  0.897E-03  0.891E-04   10  36   0   10  13   8    7  14   8    0.000    0.000       0
+  0     98 00:01:42.07   0.9930A   1.8124   1.1173  -1.1674  0.097  0.00   0.000E+00      0.  0.672E+00  0.130E+00  0.891E-03  0.808E-04    7   4   7   10  13   8    6  23   8    0.000    0.000       0
+  0    105 00:01:48.91   0.9680A   1.8600   1.0365  -1.1345  0.098  0.00   0.000E+00      0.  0.670E+00  0.127E+00  0.861E-03  0.682E-04    8   4  10   10  13   9    7  12   9    0.000    0.000       0
+  0    111 00:01:54.73   0.9830A   1.8316  -1.0009  -1.0982  0.098  0.00   0.000E+00      0.  0.667E+00  0.124E+00  0.857E-03  0.688E-04   10   6  12    2  12   8    6  24   8    0.000    0.000       0
+  0    117 00:02:00.59   0.9750A   1.8471   1.0558  -1.0180  0.097  0.00   0.000E+00      0.  0.665E+00  0.122E+00  0.854E-03  0.769E-04    9   4  15    1  28   8    5  23   8    0.000    0.000       0
+  0    123 00:02:06.44   0.9750A   1.8462   1.0199   0.9647  0.095  0.00   0.000E+00      0.  0.664E+00  0.121E+00  0.850E-03  0.792E-04    9   4  17    1  28   9    9  10  39    0.000    0.000       0
+  0    129 00:02:12.33   0.9870A   1.8235   1.0164  -0.9654  0.093  0.00   0.000E+00      0.  0.664E+00  0.120E+00  0.882E-03  0.816E-04    9   4  20   12  14   9   12  17  38    0.000    0.000       0
+  0    135 00:02:18.31   1.0000A   1.7954   1.1667  -1.0394  0.089  0.00   0.000E+00      0.  0.664E+00  0.120E+00  0.972E-03  0.932E-04   10   5  22   11  15   9   10  16  38    0.000    0.000       0
+  0    141 00:02:24.42   1.0300A   1.7551   1.2493  -1.0830  0.086  0.00   0.000E+00      0.  0.664E+00  0.120E+00  0.107E-02  0.106E-03   11   7  25   10  15   9   10  19  35    0.000    0.000       0
+  0    147 00:02:30.58   1.0300A   1.7547   1.1845  -1.1499  0.083  0.00   0.000E+00      0.  0.665E+00  0.120E+00  0.113E-02  0.112E-03   28  24  19   10  16   9    9  19  35    0.000    0.000       0
+  0    153 00:02:36.71   1.0200A   1.7571  -1.0684  -1.0968  0.081  0.00   0.000E+00      0.  0.667E+00  0.121E+00  0.115E-02  0.106E-03   28  15  23    9  26   9    8  19  35    0.000    0.000       0
+  0    159 00:02:42.83   1.0200A   1.7660  -1.0303  -1.0310  0.080  0.00   0.000E+00      0.  0.669E+00  0.121E+00  0.115E-02  0.988E-04   29  23  26    8  25   9    8  19  35    0.000    0.000       0
+  0    165 00:02:48.95   1.0200A   1.7574  -0.9472  -0.9575  0.082  0.00   0.000E+00      0.  0.670E+00  0.121E+00  0.115E-02  0.929E-04   29  24  30    9  26   9    8  14   4    0.000    0.000       0
+  0    170 00:02:54.05   1.0200A   1.7612  -0.8931  -0.9550  0.084  0.00   0.000E+00      0.  0.672E+00  0.121E+00  0.116E-02  0.959E-04   29  24  33    6  12   0    7  16   6    0.000    0.000       0
+  0    176 00:03:00.17   1.0200A   1.7672  -0.9687  -0.9751  0.086  0.00   0.000E+00      0.  0.675E+00  0.121E+00  0.120E-02  0.111E-03   29  24  37    6  29   0    7  12   5    0.000    0.000       0
+  0    182 00:03:06.27   1.0100A   1.7756  -0.9757  -0.9386  0.088  0.00   0.000E+00      0.  0.678E+00  0.122E+00  0.121E-02  0.108E-03   29  24   1    6  28   1    5  14   5    0.000    0.000       0
+  0    188 00:03:12.33   1.0100A   1.7851  -0.8592  -1.0087  0.089  0.00   0.000E+00      0.  0.682E+00  0.123E+00  0.122E-02  0.873E-04   29  25   5    5  29   4    4  12   6    0.000    0.000       0
+  0    194 00:03:18.35   1.0000A   1.7945   0.8712  -1.0629  0.089  0.00   0.000E+00      0.  0.683E+00  0.123E+00  0.122E-02  0.753E-04   29  25   9   11  12  38    4  29   9    0.000    0.000       0
+  0    200 00:03:24.34   0.9970A   1.8046  -1.0293  -1.0665  0.089  0.00   0.000E+00      0.  0.684E+00  0.123E+00  0.124E-02  0.748E-04   27  10   8   14  27   9    3  29   9    0.000    0.000       0
+  0    206 00:03:30.31   0.9950A   1.8097  -1.1049  -0.9732  0.087  0.00   0.000E+00      0.  0.685E+00  0.123E+00  0.125E-02  0.794E-04   28  28  12   14  26   9    3  29   8    0.000    0.000       0
+  0    212 00:03:36.27   0.9900A   1.8182   1.0937  -1.0714  0.084  0.00   0.000E+00      0.  0.685E+00  0.123E+00  0.127E-02  0.890E-04   29  31  15   12  16   9    8  11   9    0.000    0.000       0
+  0    218 00:03:42.20   0.9880A   1.8226   1.1108  -1.0984  0.081  0.00   0.000E+00      0.  0.685E+00  0.123E+00  0.129E-02  0.968E-04   28  11  20   12  17   9    6  12   9    0.000    0.000       0
+  0    224 00:03:48.11   0.9830A   1.8317   1.0308  -0.9492  0.079  0.00   0.000E+00      0.  0.686E+00  0.123E+00  0.130E-02  0.104E-03   28  12  24   11  15   9    6  14   9    0.000    0.000       0
+  0    230 00:03:54.01   0.9820A   1.8322   1.0729  -1.0933  0.078  0.00   0.000E+00      0.  0.686E+00  0.124E+00  0.132E-02  0.106E-03   28  13  28    9  16   9    6  13   9    0.000    0.000       0
+  0    237 00:04:00.88   0.9780A   1.8400  -0.9894  -1.1038  0.078  0.00   0.000E+00      0.  0.687E+00  0.124E+00  0.133E-02  0.107E-03   23  37  25    8  24   9    5  13   9    0.000    0.000       0
+  0    243 00:04:06.73   0.9740A   1.8472   0.9581  -1.0706  0.079  0.00   0.000E+00      0.  0.688E+00  0.124E+00  0.134E-02  0.108E-03   29  26  31   11  16   9    3  28   9    0.000    0.000       0
+  0    249 00:04:12.56   0.9660A   1.8629  -0.9500  -1.1082  0.082  0.00   0.000E+00      0.  0.688E+00  0.124E+00  0.131E-02  0.990E-04   23  36  32    6  25   8    3  28   9    0.000    0.000       0
+  0    255 00:04:18.28   0.9450A   1.9050  -0.9042  -1.0363  0.084  0.00   0.000E+00      0.  0.688E+00  0.124E+00  0.127E-02  0.826E-04   23  36  36   17  10   8    3  27   9    0.000    0.000       0
+  0    262 00:04:24.85   0.9360A   1.9222   0.8361  -0.8601  0.087  0.00   0.000E+00      0.  0.688E+00  0.123E+00  0.125E-02  0.815E-04   22  36   0    3  39  18   14  25   7    0.000    0.000       0
+  0    268 00:04:30.49   0.9420A   1.9100   0.7881  -0.8589  0.089  0.00   0.000E+00      0.  0.688E+00  0.123E+00  0.128E-02  0.904E-04   22  36   4    1  39  19   12  26   7    0.000    0.000       0
+  0    274 00:04:36.18   0.9520A   1.8906  -0.7697   0.9956  0.091  0.00   0.000E+00      0.  0.687E+00  0.123E+00  0.130E-02  0.909E-04   17   5   2   20  22   9   20  11   9    0.000    0.000       0
+  0    281 00:04:42.84   0.9510A   1.8925  -0.8484   0.9669  0.093  0.00   0.000E+00      0.  0.687E+00  0.122E+00  0.129E-02  0.847E-04   23  37  13    6  38  20   20  29   9    0.000    0.000       0
+  0    287 00:04:48.57   0.9560A   1.8836  -0.8486   0.9318  0.094  0.00   0.000E+00      0.  0.686E+00  0.121E+00  0.128E-02  0.703E-04   20  36  15    6  37  22   20  28   9    0.000    0.000       0
+  0    293 00:04:54.31   0.9550A   1.8853  -0.8694   0.8337  0.095  0.00   0.000E+00      0.  0.684E+00  0.119E+00  0.124E-02  0.661E-04   26  38  21    8  26   8    8  39  30    0.000    0.000       0
+  0    299 00:05:00.02   0.9480A   1.8979  -0.8299  -0.8425  0.095  0.00   0.000E+00      0.  0.683E+00  0.117E+00  0.121E-02  0.746E-04   26  38  25    8  25   8   14  25   2    0.000    0.000       0
+  0    306 00:05:06.65   0.9470A   1.9011  -0.8129  -0.8421  0.095  0.00   0.000E+00      0.  0.683E+00  0.116E+00  0.120E-02  0.791E-04   19  34  34    9  27   9   14  25   3    0.000    0.000       0
+  0    312 00:05:12.28   0.9320A   1.9318  -0.8665  -0.8839  0.094  0.00   0.000E+00      0.  0.684E+00  0.115E+00  0.116E-02  0.734E-04   19  34  37    9  26   9   13  26   6    0.000    0.000       0
+  0    319 00:05:18.76   0.9210A   1.9548  -0.7898  -0.9839  0.093  0.00   0.000E+00      0.  0.683E+00  0.114E+00  0.112E-02  0.669E-04   20  34   1    8  25   9   12  26   6    0.000    0.000       0
+  0    325 00:05:24.33   0.9330A   1.9298  -0.7105  -0.9903  0.091  0.00   0.000E+00      0.  0.682E+00  0.112E+00  0.112E-02  0.626E-04   34  25   5    7  25   9   11  27   7    0.000    0.000       0
+  0    332 00:05:30.81   0.9250A   1.9465   0.6782  -0.9858  0.090  0.00   0.000E+00      0.  0.681E+00  0.110E+00  0.108E-02  0.581E-04   35  25   9   13  15   9   12  20   8    0.000    0.000       0
+  0    338 00:05:36.30   0.9100A   1.9789   0.6607  -0.9520  0.089  0.00   0.000E+00      0.  0.680E+00  0.110E+00  0.105E-02  0.591E-04   34  26  13    4  32   5   11  20   8    0.000    0.000       0
+  0    345 00:05:42.63   0.8990A   2.0017  -0.7228  -0.9031  0.088  0.00   0.000E+00      0.  0.680E+00  0.110E+00  0.107E-02  0.697E-04   35  26  18   19  17   9    9  20   7    0.000    0.000       0
+  0    351 00:05:48.05   0.9050A   1.9892   0.9444   0.9028  0.088  0.00   0.000E+00      0.  0.682E+00  0.110E+00  0.110E-02  0.859E-04   36  26  22   13  13   9   20  28   9    0.000    0.000       0
+  0    358 00:05:54.37   0.9030A   1.9931   1.0194   1.0179  0.088  0.00   0.000E+00      0.  0.683E+00  0.111E+00  0.109E-02  0.891E-04   36  26  28   13  14   9   20  29   9    0.000    0.000       0
+  0    365 00:06:00.74   0.9160A   1.9654   1.0291   1.0872  0.088  0.00   0.000E+00      0.  0.686E+00  0.112E+00  0.109E-02  0.926E-04   35  26  35   13  14   9   20  28   9    0.000    0.000       0
+  0    371 00:06:06.24   0.9160A   1.9658   0.9938   0.9959  0.087  0.00   0.000E+00      0.  0.687E+00  0.112E+00  0.105E-02  0.835E-04   35  27  38   12  14   9   20  26   9    0.000    0.000       0
+  0    378 00:06:12.64   0.9140A   1.9692   0.8791   0.9243  0.086  0.00   0.000E+00      0.  0.689E+00  0.112E+00  0.100E-02  0.679E-04   34  27   5   11  15   9   20  26   9    0.000    0.000       0
+  0    384 00:06:18.15   0.9240A   1.9472  -0.8590   0.8467  0.086  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.974E-03  0.635E-04   34  27  10   12  25   9   20  25   9    0.000    0.000       0
+  0    391 00:06:24.67   0.9350A   1.9247  -0.8322  -0.7706  0.084  0.00   0.000E+00      0.  0.688E+00  0.110E+00  0.972E-03  0.629E-04   22  38  10   11  24   9    8  20   8    0.000    0.000       0
+  0    397 00:06:30.28   0.9360A   1.9240  -0.8127  -0.7982  0.083  0.00   0.000E+00      0.  0.686E+00  0.109E+00  0.967E-03  0.599E-04   21  37  13    9  27   8    7  20   8    0.000    0.000       0
+  0    404 00:06:36.83   0.9360A   1.9236  -0.9197  -0.7732  0.082  0.00   0.000E+00      0.  0.685E+00  0.108E+00  0.969E-03  0.641E-04   21  37  18    8  26   8    6  20   8    0.000    0.000       0
+  0    410 00:06:42.45   0.9330A   1.9292  -0.9113  -0.7515  0.082  0.00   0.000E+00      0.  0.684E+00  0.108E+00  0.982E-03  0.750E-04   19  39  15    8  25   8    5  20   7    0.000    0.000       0
+  0    416 00:06:48.01   0.9250A   1.9459  -0.8154  -0.7200  0.083  0.00   0.000E+00      0.  0.685E+00  0.108E+00  0.981E-03  0.778E-04   19  39  20    8  25   8    5  20   8    0.000    0.000       0
+  0    423 00:06:54.49   0.9250A   1.9465  -0.7484  -0.7627  0.085  0.00   0.000E+00      0.  0.686E+00  0.108E+00  0.976E-03  0.748E-04   20  37  24    8  23   8   15  29   9    0.000    0.000       0
+  0    429 00:07:00.02   0.9180A   1.9605   0.6812  -0.7504  0.086  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.967E-03  0.716E-04   20  37  28   14  31   9   15  29   9    0.000    0.000       0
+  0    436 00:07:06.43   0.9140A   1.9698   0.7149  -0.6958  0.086  0.00   0.000E+00      0.  0.689E+00  0.109E+00  0.954E-03  0.663E-04   22  36  30   13  15   7   15  24   9    0.000    0.000       0
+  0    443 00:07:12.78   0.9020A   1.9957   0.8044   0.8483  0.086  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.933E-03  0.604E-04   22  36  36   14  14   9   18  10   9    0.000    0.000       0
+  0    449 00:07:18.16   0.8940A   2.0134   0.8382   0.8894  0.085  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.931E-03  0.565E-04   22  36   1   13  14   9   18  10   9    0.000    0.000       0
+  0    456 00:07:24.39   0.8890A   2.0246   0.8809   0.7878  0.084  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.917E-03  0.532E-04   22  36   6   13  15   9   18  10   9    0.000    0.000       0
+  0    463 00:07:30.59   0.8800A   2.0451   0.8620  -0.7637  0.083  0.00   0.000E+00      0.  0.690E+00  0.108E+00  0.905E-03  0.550E-04   23  36  10   12  16   9   16   9   7    0.000    0.000       0
+  0    470 00:07:36.74   0.8830A   2.0391  -0.8773  -0.7657  0.081  0.00   0.000E+00      0.  0.689E+00  0.108E+00  0.899E-03  0.576E-04   23  36  15   15  27   9    6  27   9    0.000    0.000       0
+  0    476 00:07:42.05   0.8900A   2.0222  -0.8674  -0.7540  0.079  0.00   0.000E+00      0.  0.689E+00  0.108E+00  0.912E-03  0.632E-04   23  36  20   15  26   9    6  21   4    0.000    0.000       0
+  0    483 00:07:48.37   0.9040A   1.9909   0.8184  -0.7094  0.078  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.935E-03  0.625E-04   24  36  24   11  16   8    5  21   3    0.000    0.000       0
+  0    490 00:07:54.72   0.9040A   1.9921   0.8587  -0.8149  0.077  0.00   0.000E+00      0.  0.691E+00  0.110E+00  0.951E-03  0.638E-04   21   5  25   10  14   9    5  28   9    0.000    0.000       0
+  0    496 00:08:00.11   0.8950A   2.0109   0.9184  -0.8670  0.076  0.00   0.000E+00      0.  0.691E+00  0.110E+00  0.947E-03  0.650E-04   21   5  29    9  14   9    4  28   9    0.000    0.000       0
+  0    503 00:08:06.29   0.8770A   2.0528   0.8870  -0.7592  0.077  0.00   0.000E+00      0.  0.692E+00  0.111E+00  0.929E-03  0.633E-04   22   6  33   10  15   9    3  27   9    0.000    0.000       0
+  0    510 00:08:12.40   0.8710A   2.0667   0.8084  -0.7334  0.077  0.00   0.000E+00      0.  0.692E+00  0.111E+00  0.933E-03  0.644E-04   22   6  37   10  17   9    9  19   2    0.000    0.000       0
+  0    517 00:08:18.53   0.8800A   2.0445  -0.7342  -0.7055  0.076  0.00   0.000E+00      0.  0.691E+00  0.110E+00  0.939E-03  0.615E-04   23   7   1    2  12   4    8  19   1    0.000    0.000       0
+  0    524 00:08:24.77   0.8930A   2.0167   0.7124  -0.6653  0.076  0.00   0.000E+00      0.  0.690E+00  0.110E+00  0.940E-03  0.556E-04   22   7   6   17  14   9    9  17   4    0.000    0.000       0
+  0    530 00:08:30.21   0.9120A   1.9746  -0.7243   0.6612  0.076  0.00   0.000E+00      0.  0.689E+00  0.109E+00  0.944E-03  0.506E-04   26   4  13    8  27   9    8   9  38    0.000    0.000       0
+  0    537 00:08:36.62   0.9180A   1.9618  -0.8144   0.6433  0.076  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.939E-03  0.502E-04   26   4  19    8  26   9    8   9   0    0.000    0.000       0
+  0    543 00:08:42.14   0.9210A   1.9553  -0.7899  -0.6276  0.075  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.935E-03  0.524E-04   24   0  26    8  25   9   11  17   4    0.000    0.000       0
+  0    550 00:08:48.57   0.9150A   1.9664  -0.7566  -0.6415  0.075  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.927E-03  0.576E-04   24   0  31    7  25   9   11  16   4    0.000    0.000       0
+  0    556 00:08:54.05   0.9140A   1.9687  -0.7705   0.7606  0.075  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.923E-03  0.576E-04   24   0  35    7  25   9   20  12   9    0.000    0.000       0
+  0    563 00:09:00.44   0.9120A   1.9729  -0.7795   0.6669  0.075  0.00   0.000E+00      0.  0.690E+00  0.111E+00  0.910E-03  0.520E-04   24   0   1    7  25   9   20  15   9    0.000    0.000       0
+  0    570 00:09:06.84   0.9140A   1.9684  -0.7515   0.7206  0.074  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.907E-03  0.524E-04   24   0   6    7  23   9   20   8  19    0.000    0.000       0
+  0    576 00:09:12.33   0.9170A   1.9637  -0.7024   0.7260  0.073  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.912E-03  0.571E-04   24   1  10    6  23   9   21   8  23    0.000    0.000       0
+  0    583 00:09:18.74   0.9150A   1.9680  -0.8751   0.6919  0.073  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.897E-03  0.569E-04   31   4   1   14  27   9   21  25   9    0.000    0.000       0
+  0    589 00:09:24.21   0.9090A   1.9809  -0.9059   0.6180  0.073  0.00   0.000E+00      0.  0.688E+00  0.110E+00  0.882E-03  0.516E-04   28   5   6   12  26   9   21   9  28    0.000    0.000       0
+  0    596 00:09:30.53   0.8980A   2.0050  -0.8632  -0.6155  0.073  0.00   0.000E+00      0.  0.687E+00  0.109E+00  0.879E-03  0.531E-04   28   5  12   12  25   9   13   6  10    0.000    0.000       0
+  0    603 00:09:36.79   0.8930A   2.0151  -0.7718  -0.7348  0.073  0.00   0.000E+00      0.  0.686E+00  0.109E+00  0.897E-03  0.559E-04   28   5  17   12  25   9   17  19   9    0.000    0.000       0
+  0    609 00:09:42.15   0.8900A   2.0217  -0.6830  -0.8213  0.074  0.00   0.000E+00      0.  0.686E+00  0.109E+00  0.907E-03  0.573E-04   28   4  22   11  24   9   16  19   9    0.000    0.000       0
+  0    616 00:09:48.36   0.8860A   2.0305  -0.6777  -0.8122  0.076  0.00   0.000E+00      0.  0.686E+00  0.110E+00  0.919E-03  0.616E-04   28   4  27    4   1   7   15  20   9    0.000    0.000       0
+  0    623 00:09:54.56   0.8870A   2.0288  -0.6943  -0.7909  0.077  0.00   0.000E+00      0.  0.687E+00  0.110E+00  0.952E-03  0.662E-04   28   4  33    5   0  11   15  21   9    0.000    0.000       0
+  0    630 00:10:00.73   0.8770A   2.0522  -0.6549  -0.8147  0.077  0.00   0.000E+00      0.  0.688E+00  0.111E+00  0.958E-03  0.644E-04   26   3   8    6  39  14   16  20   9    0.000    0.000       0
+  0    637 00:10:06.83   0.8700A   2.0683   0.7789   1.0020  0.077  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.960E-03  0.663E-04   26   3  14   18  12   9   20  11   9    0.000    0.000       0
+  0    643 00:10:12.07   0.8770A   2.0519   0.9635   0.9992  0.076  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.971E-03  0.662E-04   26   3  18   17  13   9   20  11   9    0.000    0.000       0
+  0    650 00:10:18.23   0.8790A   2.0468   0.9849   0.8424  0.076  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.984E-03  0.660E-04   26   2  23   17  14   9   20  12   9    0.000    0.000       0
+  0    657 00:10:24.38   0.8790A   2.0488   0.8932   0.6696  0.076  0.00   0.000E+00      0.  0.690E+00  0.110E+00  0.984E-03  0.637E-04   26   2  28   15  14   9   20  26   9    0.000    0.000       0
+  0    664 00:10:30.56   0.8870A   2.0303  -0.9107  -0.7561  0.077  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.979E-03  0.579E-04   24   2  34   15  26   9    2  10   9    0.000    0.000       0
+  0    671 00:10:36.76   0.8840A   2.0366  -0.8964  -0.7924  0.078  0.00   0.000E+00      0.  0.689E+00  0.109E+00  0.968E-03  0.488E-04   28   2  38   14  26   9    2  10   9    0.000    0.000       0
+  0    677 00:10:42.04   0.8780A   2.0499   0.9696  -0.7602  0.078  0.00   0.000E+00      0.  0.687E+00  0.108E+00  0.943E-03  0.427E-04   28   2   2    8  13   8    2  10   9    0.000    0.000       0
+  0    684 00:10:48.17   0.8730A   2.0613   0.9709   0.7462  0.079  0.00   0.000E+00      0.  0.686E+00  0.106E+00  0.912E-03  0.411E-04   28   2   7    8  14   9    8  11   7    0.000    0.000       0
+  0    691 00:10:54.27   0.8700A   2.0685   0.8792  -0.7376  0.080  0.00   0.000E+00      0.  0.684E+00  0.105E+00  0.909E-03  0.457E-04   28   2  12    7  15   9   17  22   9    0.000    0.000       0
+  0    698 00:11:00.34   0.8670A   2.0768   0.8001  -0.7988  0.082  0.00   0.000E+00      0.  0.683E+00  0.105E+00  0.902E-03  0.488E-04   29   2  17    7  15   9   16  22   9    0.000    0.000       0
+  0    705 00:11:06.40   0.8640A   2.0836   0.7630  -0.7686  0.084  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.891E-03  0.540E-04   29   1  23    6  16   9   15  22   9    0.000    0.000       0
+  0    712 00:11:12.44   0.8630A   2.0866   0.7316  -0.6815  0.085  0.00   0.000E+00      0.  0.683E+00  0.104E+00  0.869E-03  0.501E-04   28   1  28    6  16   9   14  22   9    0.000    0.000       0
+  0    719 00:11:18.49   0.8650A   2.0798   0.6356  -0.5912  0.087  0.00   0.000E+00      0.  0.683E+00  0.104E+00  0.850E-03  0.449E-04   28   1  34    5  16   9   10   8  25    0.000    0.000       0
+  0    726 00:11:24.56   0.8690A   2.0705   0.6316   0.6509  0.087  0.00   0.000E+00      0.  0.683E+00  0.104E+00  0.832E-03  0.405E-04   28   1  39   12  14   9   20  10   9    0.000    0.000       0
+  0    733 00:11:30.67   0.8750A   2.0572   0.6244   0.6541  0.086  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.810E-03  0.369E-04   28   1   5   12  15   9   20  11   9    0.000    0.000       0
+  0    740 00:11:36.81   0.8790A   2.0482   0.5537   0.6198  0.085  0.00   0.000E+00      0.  0.682E+00  0.102E+00  0.801E-03  0.374E-04   28   1  13   12  16   9   20  11   9    0.000    0.000       0
+  0    746 00:11:42.08   0.8770A   2.0521   0.5760  -0.5625  0.085  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.795E-03  0.378E-04   24   1  26    6  12   9   23  32   4    0.000    0.000       0
+  0    753 00:11:48.21   0.8760A   2.0546   0.6287  -0.6382  0.084  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.792E-03  0.389E-04   24   1  31   16  13   9   17  23   9    0.000    0.000       0
+  0    760 00:11:54.34   0.8750A   2.0576  -0.7328  -0.8090  0.085  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.792E-03  0.408E-04   24   1  37   20  10   9   17  24   9    0.000    0.000       0
+  0    767 00:12:00.47   0.8750A   2.0575   0.7551  -0.8727  0.085  0.00   0.000E+00      0.  0.679E+00  0.999E-01  0.790E-03  0.476E-04   24   2   1   15  14   9   16  24   9    0.000    0.000       0
+  0    774 00:12:06.58   0.8700A   2.0680   0.7995  -0.8206  0.085  0.00   0.000E+00      0.  0.679E+00  0.996E-01  0.785E-03  0.524E-04   24   2   6   16  14   9   15  24   9    0.000    0.000       0
+  0    781 00:12:12.64   0.8620A   2.0883   0.9058  -0.8668  0.085  0.00   0.000E+00      0.  0.679E+00  0.993E-01  0.770E-03  0.506E-04   24   3  10   15  14   9   17  21   9    0.000    0.000       0
+  0    788 00:12:18.63   0.8510A   2.1142   0.9246  -0.9935  0.085  0.00   0.000E+00      0.  0.679E+00  0.990E-01  0.750E-03  0.476E-04   24   3  16   15  15   9   16  20   9    0.000    0.000       0
+  0    795 00:12:24.56   0.8450A   2.1290   0.8718  -0.9537  0.085  0.00   0.000E+00      0.  0.679E+00  0.989E-01  0.743E-03  0.474E-04   24   3  21   15  16   9   15  20   9    0.000    0.000       0
+  0    802 00:12:30.48   0.8460A   2.1265   0.7780  -0.8279  0.085  0.00   0.000E+00      0.  0.679E+00  0.992E-01  0.732E-03  0.452E-04   24   3  27   15  16   9   14  20   9    0.000    0.000       0
+  0    809 00:12:36.44   0.8520A   2.1138   0.7134  -0.7216  0.085  0.00   0.000E+00      0.  0.680E+00  0.997E-01  0.734E-03  0.451E-04   24   4  32   14  17   9   13  21   9    0.000    0.000       0
+  0    816 00:12:42.38   0.8480A   2.1229  -0.6300   0.7032  0.084  0.00   0.000E+00      0.  0.681E+00  0.100E+00  0.731E-03  0.431E-04   24   4  37   17  27   9   20  27   9    0.000    0.000       0
+  0    823 00:12:48.33   0.8520A   2.1128  -0.7115  -0.6591  0.083  0.00   0.000E+00      0.  0.681E+00  0.100E+00  0.729E-03  0.400E-04   24   5   1   16  26   9   13  17   5    0.000    0.000       0
+  0    830 00:12:54.29   0.8530A   2.1092  -0.7819  -0.6745  0.081  0.00   0.000E+00      0.  0.681E+00  0.999E-01  0.722E-03  0.362E-04   24   5   6   15  27   9   12  17   4    0.000    0.000       0
+  0    837 00:13:00.27   0.8540A   2.1084  -0.7927  -0.6605  0.080  0.00   0.000E+00      0.  0.680E+00  0.995E-01  0.723E-03  0.365E-04   24   5  12   15  26   9   11  17   4    0.000    0.000       0
+  0    844 00:13:06.25   0.8550A   2.1060  -0.7793  -0.6381  0.079  0.00   0.000E+00      0.  0.679E+00  0.989E-01  0.723E-03  0.364E-04   25   4  17   14  26   9   10  17   3    0.000    0.000       0
+  0    851 00:13:12.24   0.8560A   2.1021  -0.8013  -0.6011  0.078  0.00   0.000E+00      0.  0.679E+00  0.983E-01  0.731E-03  0.398E-04   25   4  23   14  24   8   12  17   8    0.000    0.000       0
+  0    858 00:13:18.24   0.8590A   2.0953   0.8187  -0.6382  0.078  0.00   0.000E+00      0.  0.678E+00  0.977E-01  0.737E-03  0.420E-04   25   4  29    9  13   9   17  24   9    0.000    0.000       0
+  0    865 00:13:24.27   0.8640A   2.0835   0.7812  -0.6974  0.077  0.00   0.000E+00      0.  0.677E+00  0.973E-01  0.736E-03  0.410E-04   25   4  35    9  14   9   17  23   9    0.000    0.000       0
+  0    872 00:13:30.35   0.8720A   2.0632  -0.7532  -0.7468  0.078  0.00   0.000E+00      0.  0.677E+00  0.974E-01  0.745E-03  0.451E-04   25   4   1   13  22   8   16  23   9    0.000    0.000       0
+  0    879 00:13:36.49   0.8770A   2.0518   0.6606  -0.7126  0.078  0.00   0.000E+00      0.  0.677E+00  0.979E-01  0.763E-03  0.533E-04   30   2   2    9  16   9   15  23   9    0.000    0.000       0
+  0    886 00:13:42.64   0.8780A   2.0496   0.7020  -0.7137  0.078  0.00   0.000E+00      0.  0.678E+00  0.984E-01  0.774E-03  0.556E-04   24   4  14   14  14   9   15  29   9    0.000    0.000       0
+  0    893 00:13:48.79   0.8800A   2.0457   0.7761   0.8243  0.078  0.00   0.000E+00      0.  0.679E+00  0.987E-01  0.774E-03  0.520E-04   24   4  19   14  15   9   20  11   9    0.000    0.000       0
+  0    899 00:13:54.07   0.8800A   2.0449   0.7599  -0.8358  0.077  0.00   0.000E+00      0.  0.679E+00  0.988E-01  0.774E-03  0.492E-04   30   3  18   13  16   9   16  23   9    0.000    0.000       0
+  0    906 00:14:00.22   0.8780A   2.0502   0.7092  -0.8201  0.077  0.00   0.000E+00      0.  0.679E+00  0.986E-01  0.766E-03  0.443E-04   34   4  24   12  17   9   15  23   9    0.000    0.000       0
+  0    913 00:14:06.36   0.8770A   2.0523   0.6604  -0.7487  0.076  0.00   0.000E+00      0.  0.678E+00  0.982E-01  0.773E-03  0.446E-04   34   4  30   12  18   8   14  23   9    0.000    0.000       0
+  0    920 00:14:12.52   0.8800A   2.0444   0.6806  -0.6889  0.076  0.00   0.000E+00      0.  0.678E+00  0.982E-01  0.777E-03  0.453E-04   33   5  35   13  17   7   12  23   8    0.000    0.000       0
+  0    927 00:14:18.71   0.8890A   2.0236   0.7537  -0.6498  0.076  0.00   0.000E+00      0.  0.678E+00  0.985E-01  0.782E-03  0.419E-04   33   5   1   12  15   9    6  21   7    0.000    0.000       0
+  0    933 00:14:24.08   0.8990A   2.0021   0.7866   0.6466  0.076  0.00   0.000E+00      0.  0.678E+00  0.987E-01  0.786E-03  0.419E-04   35   4   5   11  15   9   17  29   9    0.000    0.000       0
+  0    940 00:14:30.38   0.8970A   2.0069  -0.8086   0.6530  0.075  0.00   0.000E+00      0.  0.678E+00  0.991E-01  0.786E-03  0.473E-04   24   6  28   12  27   9   18  29   9    0.000    0.000       0
+  0    947 00:14:36.63   0.8920A   2.0176  -0.9192  -0.6890  0.074  0.00   0.000E+00      0.  0.679E+00  0.996E-01  0.790E-03  0.489E-04   24   6  34   10  26   9    6  28   9    0.000    0.000       0
+  0    954 00:14:42.87   0.8900A   2.0214  -0.9258  -0.6816  0.074  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.798E-03  0.492E-04   25   6  38    9  25   9    6  22   7    0.000    0.000       0
+  0    960 00:14:48.24   0.9020A   1.9957  -0.9008  -0.7276  0.074  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.822E-03  0.522E-04   25   6   3    9  25   9    5  21   8    0.000    0.000       0
+  0    967 00:14:54.58   0.9080A   1.9831  -0.8955  -0.7248  0.074  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.830E-03  0.525E-04   27   0  25    8  25   9    3  21   8    0.000    0.000       0
+  0    973 00:15:00.02   0.9060A   1.9874  -0.8829  -0.6492  0.074  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.823E-03  0.514E-04   26   0  29    8  24   9    3  28   9    0.000    0.000       0
+  0    980 00:15:06.33   0.8990A   2.0015  -0.8107  -0.6410  0.076  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.799E-03  0.481E-04   28   6  16    7  24   9    3  28   9    0.000    0.000       0
+  0    987 00:15:12.61   0.8940A   2.0125  -0.7502  -0.6452  0.078  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.783E-03  0.457E-04   28   6  21    7  24   9   17  20   9    0.000    0.000       0
+  0    994 00:15:18.87   0.8960A   2.0087  -0.7506  -0.7639  0.080  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.792E-03  0.483E-04   28   6  27    8  25   9   17  29   9    0.000    0.000       0
+  0   1000 00:15:24.26   0.9020A   1.9963  -0.7534  -0.9259  0.082  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.819E-03  0.531E-04   28   6  32    8  24   9   18  17   9    0.000    0.000       0
+  0   1007 00:15:30.61   0.9100A   1.9778  -0.7044  -0.9607  0.083  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.841E-03  0.527E-04   28   7  37    8  24   9   16  18   9    0.000    0.000       0
+  0   1013 00:15:36.07   0.9070A   1.9846  -0.6328   0.9338  0.083  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.855E-03  0.548E-04   28   2  15    8  24   9   21  10   9    0.000    0.000       0
+  0   1020 00:15:42.40   0.9030A   1.9942   0.5941  -0.7911  0.082  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.878E-03  0.630E-04   28   2  21   12  13   8   15  20   9    0.000    0.000       0
+  0   1027 00:15:48.70   0.8980A   2.0043   0.8165   0.7289  0.082  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.868E-03  0.564E-04   28   2  26   12  14   9   16  10   9    0.000    0.000       0
+  0   1033 00:15:54.08   0.8960A   2.0082   0.8704  -0.7010  0.082  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.853E-03  0.513E-04   28   2  31   11  15   9    9  25   5    0.000    0.000       0
+  0   1040 00:16:00.36   0.8990A   2.0028   0.8553   0.6978  0.081  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.854E-03  0.516E-04   28   2  37   10  16   9   20  29   9    0.000    0.000       0
+  0   1047 00:16:06.68   0.9060A   1.9874   0.8292   0.7737  0.079  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.852E-03  0.537E-04   30   3   2   10  16   9   20  28   9    0.000    0.000       0
+  0   1053 00:16:12.10   0.9010A   1.9971   0.7871   0.6692  0.077  0.00   0.000E+00      0.  0.681E+00  0.103E+00  0.850E-03  0.573E-04   30   3   6    9  17   9   20  28   9    0.000    0.000       0
+  0   1060 00:16:18.40   0.9010A   1.9978   0.7225  -0.6160  0.076  0.00   0.000E+00      0.  0.682E+00  0.103E+00  0.860E-03  0.615E-04   29   3  11   13  17   8    4  12   9    0.000    0.000       0
+  0   1067 00:16:24.69   0.8960A   2.0088   0.7185  -0.6342  0.075  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.857E-03  0.567E-04   30   2  16   13  14   9   17  18   9    0.000    0.000       0
+  0   1073 00:16:30.07   0.8970A   2.0069  -0.7682  -0.7255  0.075  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.853E-03  0.493E-04   30   2  21    6  27   8   16  18   9    0.000    0.000       0
+  0   1080 00:16:36.37   0.9030A   1.9929  -0.8597  -0.7597  0.076  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.851E-03  0.395E-04   30   2  27    6  26   8   17  19   9    0.000    0.000       0
+  0   1087 00:16:42.73   0.9120A   1.9729  -0.8493  -0.8700  0.078  0.00   0.000E+00      0.  0.681E+00  0.103E+00  0.854E-03  0.394E-04   30   2  33    5  26   9   17  20   9    0.000    0.000       0
+  0   1093 00:16:48.23   0.9160A   1.9646  -0.7582  -0.8804  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.839E-03  0.364E-04   31   1  27    5  26   9   16  20   9    0.000    0.000       0
+  0   1100 00:16:54.63   0.9140A   1.9690  -0.6141  -0.8349  0.082  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.824E-03  0.327E-04   31   1  33    5  25   9   13  20   8    0.000    0.000       0
+  0   1106 00:17:00.12   0.9140A   1.9687   0.6018  -0.7594  0.082  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.838E-03  0.395E-04   31   1  38   10  23   3   12  20   8    0.000    0.000       0
+  0   1113 00:17:06.53   0.9160A   1.9643   0.6272   0.7398  0.082  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.848E-03  0.457E-04   31   1   4   10  24   2   18  10   9    0.000    0.000       0
+  0   1119 00:17:12.03   0.9180A   1.9611   0.6459  -0.6900  0.083  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.849E-03  0.494E-04   32   1  12    3  13   9   16  27   9    0.000    0.000       0
+  0   1126 00:17:18.44   0.9140A   1.9704  -0.7693  -0.7186  0.083  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.823E-03  0.456E-04   32   1  17   18  25   9   15  26   9    0.000    0.000       0
+  0   1133 00:17:24.83   0.9120A   1.9738  -0.8456  -0.6988  0.082  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.803E-03  0.415E-04   32   1  23   15  25   9   13  27   9    0.000    0.000       0
+  0   1139 00:17:30.30   0.9140A   1.9702  -0.8701  -0.7074  0.080  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.799E-03  0.428E-04   32   1  28   14  24   9   12  26   9    0.000    0.000       0
+  0   1146 00:17:36.72   0.9180A   1.9606  -0.8656  -0.6735  0.079  0.00   0.000E+00      0.  0.678E+00  0.104E+00  0.790E-03  0.417E-04   32   1  34   15  24   9   11  26   9    0.000    0.000       0
+  0   1152 00:17:42.20   0.9100A   1.9773  -0.9145  -0.6991  0.079  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.761E-03  0.356E-04   28   3  14   16  24   9   10  26   9    0.000    0.000       0
+  0   1159 00:17:48.60   0.9170A   1.9622  -0.8730  -0.6475  0.079  0.00   0.000E+00      0.  0.676E+00  0.103E+00  0.756E-03  0.367E-04   28   2  20   16  23   9    9  25   9    0.000    0.000       0
+  0   1165 00:17:54.09   0.9140A   1.9702  -0.7846  -0.6812  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.757E-03  0.417E-04   28   2  24   16  23   9   15  22   7    0.000    0.000       0
+  0   1172 00:18:00.49   0.9140A   1.9690  -0.7082  -0.7946  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.766E-03  0.477E-04   27   1  29   15  22   9   15  21   7    0.000    0.000       0
+  0   1179 00:18:06.91   0.9170A   1.9636  -0.6093  -0.8613  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.765E-03  0.462E-04   34   2  22   19  10   9   14  21   7    0.000    0.000       0
+  0   1185 00:18:12.41   0.9160A   1.9643   0.6082  -0.8487  0.079  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.764E-03  0.449E-04   35  29  35   16  21   3   13  21   7    0.000    0.000       0
+  0   1192 00:18:18.81   0.9150A   1.9675   0.6528  -0.8181  0.078  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.763E-03  0.423E-04   35  29   0   16  21   3   16  21   9    0.000    0.000       0
+  0   1198 00:18:24.30   0.9150A   1.9678   0.6871  -0.8150  0.077  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.772E-03  0.439E-04   35  29   5   15  22   2   16  22   9    0.000    0.000       0
+  0   1205 00:18:30.71   0.9170A   1.9637  -0.7809  -0.7394  0.075  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.780E-03  0.454E-04   35  29  10   14  26   9   15  21   9    0.000    0.000       0
+  0   1211 00:18:36.22   0.9180A   1.9601   0.8389  -0.7044  0.073  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.786E-03  0.455E-04   34  30  16    9  15   9    9  21   5    0.000    0.000       0
+  0   1218 00:18:42.64   0.9170A   1.9628   0.9120   0.6704  0.071  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.792E-03  0.491E-04   30  14  24    8  15   9   21  26   9    0.000    0.000       0
+  0   1224 00:18:48.15   0.9220A   1.9528   0.9571  -0.6002  0.070  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.792E-03  0.494E-04   30  14  28    7  15   9    6  21   3    0.000    0.000       0
+  0   1231 00:18:54.64   0.9290A   1.9369   0.9953  -0.6046  0.070  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.790E-03  0.467E-04   36  27  30    6  15   9   14  24   2    0.000    0.000       0
+  0   1237 00:19:00.22   0.9310A   1.9336   1.0004  -0.6054  0.072  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.792E-03  0.454E-04   36  27  35    5  15   9   13  24   2    0.000    0.000       0
+  0   1244 00:19:06.72   0.9250A   1.9453   0.9139  -0.6148  0.074  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.784E-03  0.460E-04   32   0  36    5  16   9   13  24   2    0.000    0.000       0
+  0   1250 00:19:12.26   0.9230A   1.9497   0.8098  -0.5985  0.076  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.783E-03  0.490E-04   32   0   1    4  16   9   12  24   2    0.000    0.000       0
+  0   1257 00:19:18.73   0.9270A   1.9425   0.8389  -0.6054  0.078  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.782E-03  0.484E-04   32   0   6    3  14   9   17  17   9    0.000    0.000       0
+  0   1263 00:19:24.30   0.9270A   1.9416   0.7548  -0.6070  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.783E-03  0.483E-04   33   4  17    3  15   9   16  28   9    0.000    0.000       0
+  0   1270 00:19:30.77   0.9210A   1.9538   0.6576  -0.6909  0.080  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.776E-03  0.429E-04   33   4  22    3  14   9   15  28   9    0.000    0.000       0
+  0   1276 00:19:36.28   0.9180A   1.9602   0.6042  -0.7062  0.080  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.777E-03  0.393E-04   33   4  27    2  14   9   16  20   9    0.000    0.000       0
+  0   1283 00:19:42.71   0.9170A   1.9625  -0.6000  -0.7322  0.080  0.00   0.000E+00      0.  0.675E+00  0.101E+00  0.784E-03  0.416E-04   33   4  32    6  27   9   18  17   9    0.000    0.000       0
+  0   1289 00:19:48.22   0.9190A   1.9584   0.5857  -0.8226  0.080  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.802E-03  0.456E-04   33   4  37    2  14   8   17  17   9    0.000    0.000       0
+  0   1296 00:19:54.67   0.9250A   1.9463   0.7270  -0.8524  0.081  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.811E-03  0.477E-04   33   4   2   12  14   9   17  19   9    0.000    0.000       0
+  0   1302 00:20:00.25   0.9320A   1.9306   0.8455  -0.8171  0.080  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.823E-03  0.492E-04   33   4   7   11  15   9   17  21   9    0.000    0.000       0
+  0   1309 00:20:06.74   0.9270A   1.9428   1.0705  -0.7516  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.827E-03  0.496E-04   30  15  28   10  14   9   16  21   9    0.000    0.000       0
+  0   1315 00:20:12.33   0.9340A   1.9280   1.2222  -0.6821  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.830E-03  0.511E-04   29  16  33    9  14   9   15  21   9    0.000    0.000       0
+  0   1322 00:20:18.88   0.9380A   1.9190   1.2361  -0.6040  0.079  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.845E-03  0.571E-04   33  26  31    8  15   9    5  12   9    0.000    0.000       0
+  0   1328 00:20:24.51   0.9360A   1.9221   1.1695  -0.6708  0.079  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.846E-03  0.588E-04   32  26  35    8  16   9    4  11   9    0.000    0.000       0
+  0   1334 00:20:30.12   0.9320A   1.9305   1.0752  -0.7001  0.079  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.835E-03  0.530E-04   26  33  31    8  16   9   17  20   9    0.000    0.000       0
+  0   1341 00:20:36.61   0.9230A   1.9498   0.9639  -0.7462  0.081  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.821E-03  0.457E-04   26  33  36    8  16   9   17  18   9    0.000    0.000       0
+  0   1347 00:20:42.13   0.9190A   1.9577   0.8563  -0.7313  0.082  0.00   0.000E+00      0.  0.676E+00  0.995E-01  0.814E-03  0.423E-04   26  33   1    8  16   9   17  18   9    0.000    0.000       0
+  0   1354 00:20:48.56   0.9180A   1.9600   0.7412  -0.7928  0.085  0.00   0.000E+00      0.  0.675E+00  0.989E-01  0.813E-03  0.422E-04   26  33   6    9  17   9   17  17   9    0.000    0.000       0
+  0   1360 00:20:54.09   0.9220A   1.9531  -0.6637  -0.8252  0.086  0.00   0.000E+00      0.  0.675E+00  0.986E-01  0.822E-03  0.437E-04   26  33  10    6  37  32   17  16   9    0.000    0.000       0
+  0   1367 00:21:00.54   0.9240A   1.9479  -0.8066  -0.8309  0.087  0.00   0.000E+00      0.  0.674E+00  0.983E-01  0.823E-03  0.433E-04   26  32  16    6  27   9   17  15   9    0.000    0.000       0
+  0   1373 00:21:06.09   0.9260A   1.9434  -1.0455  -0.7566  0.089  0.00   0.000E+00      0.  0.673E+00  0.982E-01  0.824E-03  0.472E-04   26  32  20    5  27   9   16  16   9    0.000    0.000       0
+  0   1380 00:21:12.59   0.9280A   1.9389  -1.0479  -0.6893  0.090  0.00   0.000E+00      0.  0.673E+00  0.982E-01  0.824E-03  0.521E-04   26  32  25    3  26   9   16  18   9    0.000    0.000       0
+  0   1386 00:21:18.16   0.9290A   1.9386  -0.8920  -0.6909  0.091  0.00   0.000E+00      0.  0.673E+00  0.982E-01  0.804E-03  0.478E-04   26  32  30    3  25   9   16  19   9    0.000    0.000       0
+  0   1393 00:21:24.67   0.9310A   1.9327  -0.7437  -0.6827  0.090  0.00   0.000E+00      0.  0.672E+00  0.981E-01  0.787E-03  0.464E-04   26  32  35    2  25   8   15  20   9    0.000    0.000       0
+  0   1399 00:21:30.29   0.9400A   1.9147  -0.7000  -0.6554  0.089  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.782E-03  0.467E-04   26  32   0    1  26   7   14  19   9    0.000    0.000       0
+  0   1406 00:21:36.85   0.9290A   1.9383  -0.6390  -0.6074  0.089  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.759E-03  0.408E-04   25  30  13    1  25   7   13  20   9    0.000    0.000       0
+  0   1412 00:21:42.39   0.9210A   1.9536  -0.6022  -0.6131  0.089  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.750E-03  0.365E-04   25  30  17    1  24   6   16  22   9    0.000    0.000       0
+  0   1419 00:21:48.83   0.9220A   1.9524   0.6030  -0.6367  0.090  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.748E-03  0.339E-04   25  30  22   20  30   9   18  18   9    0.000    0.000       0
+  0   1425 00:21:54.36   0.9190A   1.9593   0.7628  -0.7487  0.091  0.00   0.000E+00      0.  0.672E+00  0.983E-01  0.743E-03  0.382E-04   25  30  28   20  30   9   17  18   9    0.000    0.000       0
+  0   1432 00:22:00.74   0.9070A   1.9849  -0.6224  -0.7832  0.092  0.00   0.000E+00      0.  0.672E+00  0.989E-01  0.730E-03  0.410E-04   24  31  32    9  26   9   16  17   9    0.000    0.000       0
+  0   1438 00:22:06.16   0.9060A   1.9874  -0.6028  -0.8210  0.092  0.00   0.000E+00      0.  0.673E+00  0.994E-01  0.724E-03  0.421E-04   24  31  37    9  26   9   17  14   9    0.000    0.000       0
+  0   1445 00:22:12.53   0.9110A   1.9767  -0.6869  -0.8057  0.091  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.731E-03  0.449E-04   24  32   3   10  27   9   16  15   9    0.000    0.000       0
+  0   1451 00:22:18.02   0.9190A   1.9593  -0.7373  -0.7516  0.090  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.738E-03  0.432E-04   24  32   8   11  27   9   15  16   9    0.000    0.000       0
+  0   1458 00:22:24.49   0.9290A   1.9382  -0.7796  -0.6814  0.090  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.751E-03  0.461E-04   26  30  14    8  27   9    9  18   7    0.000    0.000       0
+  0   1464 00:22:30.10   0.9390A   1.9167  -0.7910   0.8223  0.089  0.00   0.000E+00      0.  0.672E+00  0.101E+00  0.761E-03  0.478E-04   27  15  13    7  26   9   20  11   9    0.000    0.000       0
+  0   1471 00:22:36.64   0.9280A   1.9393   0.7692   0.7660  0.089  0.00   0.000E+00      0.  0.671E+00  0.100E+00  0.747E-03  0.466E-04   30   3  20   11  13   9   20  12   9    0.000    0.000       0
+  0   1477 00:22:42.21   0.9280A   1.9395   0.7497  -0.6562  0.089  0.00   0.000E+00      0.  0.670E+00  0.100E+00  0.742E-03  0.454E-04   30   2  23   10  13   9    7  19   7    0.000    0.000       0
+  0   1484 00:22:48.67   0.9240A   1.9488   0.6652  -0.6931  0.090  0.00   0.000E+00      0.  0.669E+00  0.100E+00  0.735E-03  0.448E-04   30  37  13   10  14   9    6  18   7    0.000    0.000       0
+  0   1490 00:22:54.21   0.9240A   1.9481   0.6181  -0.7226  0.091  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.741E-03  0.488E-04   30  37  18   25  14  23    5  18   7    0.000    0.000       0
+  0   1497 00:23:00.70   0.9280A   1.9399   0.6291  -0.7925  0.091  0.00   0.000E+00      0.  0.670E+00  0.101E+00  0.743E-03  0.490E-04   30  38  23   26  14  28   17  13   9    0.000    0.000       0
+  0   1503 00:23:06.29   0.9360A   1.9234   0.6134  -0.7672  0.090  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.739E-03  0.448E-04   32   1   1   26  14  31   17  16   9    0.000    0.000       0
+  0   1510 00:23:12.84   0.9350A   1.9245  -0.6163  -0.7034  0.088  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.733E-03  0.408E-04   29  39   3   10  27   9   16  16   9    0.000    0.000       0
+  0   1516 00:23:18.44   0.9320A   1.9323  -0.7004  -0.6398  0.087  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.736E-03  0.396E-04   28  39   7    9  26   9   15  17   9    0.000    0.000       0
+  0   1522 00:23:24.01   0.9270A   1.9410  -0.7833   0.6478  0.086  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.751E-03  0.421E-04   27  39  10    8  26   9   20  11   9    0.000    0.000       0
+  0   1529 00:23:30.47   0.9160A   1.9646   0.8393   0.6140  0.084  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.768E-03  0.495E-04   27  38  15   15  14   9   20  11   9    0.000    0.000       0
+  0   1536 00:23:36.84   0.9070A   1.9836  -0.8363   0.7404  0.083  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.781E-03  0.563E-04   27  38  19   13  27   9   20  11   9    0.000    0.000       0
+  0   1542 00:23:42.27   0.9070A   1.9839   0.8169   0.8553  0.083  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.779E-03  0.562E-04   27  38  24   16  16   9   20  12   9    0.000    0.000       0
+  0   1549 00:23:48.65   0.9080A   1.9815   0.7785   0.7934  0.083  0.00   0.000E+00      0.  0.669E+00  0.103E+00  0.784E-03  0.591E-04   28  37  29   16  17   9   20  13   9    0.000    0.000       0
+  0   1555 00:23:54.08   0.9050A   1.9882   0.7165   0.7012  0.084  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.785E-03  0.597E-04   28  37  33   16  17   9   20  16   9    0.000    0.000       0
+  0   1562 00:24:00.42   0.9070A   1.9837   0.9071  -0.7881  0.085  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.797E-03  0.621E-04   28  37  39   10  14   9    5  10   9    0.000    0.000       0
+  0   1569 00:24:06.80   0.9140A   1.9696   0.9983  -0.8893  0.087  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.800E-03  0.619E-04   28  37   5    8  15   9    4  11   9    0.000    0.000       0
+  0   1575 00:24:12.30   0.9160A   1.9644   0.9752  -0.8949  0.087  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.785E-03  0.557E-04   36   1  10    9  16   9    4  12   9    0.000    0.000       0
+  0   1582 00:24:18.70   0.9120A   1.9730   0.8964  -0.8343  0.088  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.768E-03  0.494E-04   36   1  15    7  16   9    3  12   9    0.000    0.000       0
+  0   1588 00:24:24.17   0.9090A   1.9796   0.8008  -0.7344  0.087  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.751E-03  0.428E-04   36  39  20    7  17   9    3  13   9    0.000    0.000       0
+  0   1595 00:24:30.52   0.9050A   1.9897   0.6665   0.7155  0.086  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.741E-03  0.425E-04   36  39  25    8  18   9   20  28   9    0.000    0.000       0
+  0   1602 00:24:36.86   0.9070A   1.9855  -0.7522   0.7061  0.086  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.747E-03  0.455E-04   36  39  30   12  28   9   21  28   9    0.000    0.000       0
+  0   1608 00:24:42.33   0.9130A   1.9705  -0.8274  -0.7059  0.086  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.758E-03  0.470E-04   35  38  36   13  27   9   18  18   9    0.000    0.000       0
+  0   1615 00:24:48.73   0.9160A   1.9644   0.8802  -0.8311  0.086  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.761E-03  0.463E-04   35  38   1   12  14   9   17  18   9    0.000    0.000       0
+  0   1621 00:24:54.24   0.9180A   1.9599   0.9225  -0.8177  0.086  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.765E-03  0.469E-04   35  39   7   12  15   9   17  17   9    0.000    0.000       0
+  0   1628 00:25:00.68   0.9210A   1.9553   0.8638  -0.6876  0.085  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.768E-03  0.499E-04   35   0  11   12  16   9   16  18   9    0.000    0.000       0
+  0   1634 00:25:06.20   0.9190A   1.9594   0.7958   0.6743  0.085  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.765E-03  0.512E-04   34  39  18   13  15   9   20  11   9    0.000    0.000       0
+  0   1641 00:25:12.62   0.9150A   1.9665   0.7235   0.7660  0.084  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.765E-03  0.545E-04   34  39  23   12  16   9   20  12   9    0.000    0.000       0
+  0   1647 00:25:18.11   0.9150A   1.9676   0.6633   0.7125  0.083  0.00   0.000E+00      0.  0.674E+00  0.104E+00  0.763E-03  0.541E-04   34  39  28   11  17   9   20  13   9    0.000    0.000       0
+  0   1654 00:25:24.52   0.9180A   1.9605   0.7425   0.6448  0.083  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.758E-03  0.489E-04   34  39  34    7  14   7   20  13   9    0.000    0.000       0
+  0   1660 00:25:30.04   0.9180A   1.9601   0.8272  -0.6611  0.083  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.756E-03  0.444E-04   33  39  39    7  15   8    4  10   9    0.000    0.000       0
+  0   1667 00:25:36.43   0.9090A   1.9794   0.8820  -0.8338  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.755E-03  0.426E-04   27  27   7    6  16   8   18  19   9    0.000    0.000       0
+  0   1674 00:25:42.77   0.8980A   2.0042   0.8525  -1.0409  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.766E-03  0.438E-04   25  25  10    6  16   8   17  18   9    0.000    0.000       0
+  0   1680 00:25:48.10   0.8840A   2.0370   0.8378  -0.9888  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.768E-03  0.458E-04   25  25  14    6  17   9   16  18   9    0.000    0.000       0
+  0   1687 00:25:54.30   0.8890A   2.0239   0.7988  -0.9026  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.788E-03  0.480E-04   25  25  19    5  18   9   15  20   9    0.000    0.000       0
+  0   1694 00:26:00.57   0.8930A   2.0159  -0.7217  -0.8745  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.795E-03  0.457E-04   27  26  24   12  27   9   16  19   9    0.000    0.000       0
+  0   1701 00:26:06.78   0.8840A   2.0361   0.7306  -0.9263  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.791E-03  0.469E-04   27  26  28   21  14   8   16  20   9    0.000    0.000       0
+  0   1707 00:26:12.07   0.8830A   2.0388   0.6483  -0.9545  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.787E-03  0.492E-04   29  27  32   18  20   4   15  21   9    0.000    0.000       0
+  0   1714 00:26:18.28   0.8890A   2.0243   0.6395  -0.9264  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.793E-03  0.517E-04   28  27  37   17  18   5   14  21   9    0.000    0.000       0
+  0   1721 00:26:24.50   0.8890A   2.0248   0.6767  -0.9020  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.781E-03  0.477E-04   28  27   2   16  19   5   15  19   9    0.000    0.000       0
+  0   1728 00:26:30.78   0.9060A   1.9876   0.6389  -0.9495  0.083  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.799E-03  0.504E-04   28  27   6   15  19   4   15  18   9    0.000    0.000       0
+  0   1734 00:26:36.28   0.9230A   1.9495   0.6335  -0.9558  0.083  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.824E-03  0.532E-04   29  28  11   15  20   4   14  18   9    0.000    0.000       0
+  0   1741 00:26:42.72   0.9200A   1.9576  -0.6534  -0.9060  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.838E-03  0.528E-04   28  28  16   20  14   9   13  18   9    0.000    0.000       0
+  0   1747 00:26:48.24   0.9150A   1.9670  -0.7717  -0.9772  0.085  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.846E-03  0.521E-04   30  10  17   20  14   9   17  23   9    0.000    0.000       0
+  0   1754 00:26:54.54   0.8920A   2.0183  -0.7392  -0.9683  0.086  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.830E-03  0.504E-04   30  10  23   19  14   9   15  22   9    0.000    0.000       0
+  0   1761 00:27:00.79   0.8940A   2.0145  -0.6934  -0.9841  0.086  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.831E-03  0.512E-04   30  10  28   19  14   9   16  17   9    0.000    0.000       0
+  0   1767 00:27:06.15   0.8910A   2.0201  -0.7552  -0.9647  0.086  0.00   0.000E+00      0.  0.674E+00  0.103E+00  0.824E-03  0.520E-04   31  10  32   14  27   9   14  17   9    0.000    0.000       0
+  0   1774 00:27:12.41   0.9010A   1.9982  -0.7953  -0.8591  0.087  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.826E-03  0.526E-04   31  10  38   13  26   9   13  17   9    0.000    0.000       0
+  0   1781 00:27:18.81   0.9200A   1.9561  -0.7035  -0.7894  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.826E-03  0.505E-04   31   9   3   12  25   9    9  22   8    0.000    0.000       0
+  0   1787 00:27:24.36   0.9230A   1.9506  -0.6067   0.7498  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.819E-03  0.512E-04   33  26  21   12  25   9   20  10   9    0.000    0.000       0
+  0   1794 00:27:30.79   0.9180A   1.9614  -0.5863   0.8796  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.812E-03  0.517E-04   33  26  26    7  26   9   20  11   9    0.000    0.000       0
+  0   1800 00:27:36.29   0.9160A   1.9647   0.6015   0.8927  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.808E-03  0.529E-04   33  26  31   21  31   7   21  12   9    0.000    0.000       0
+  0   1807 00:27:42.72   0.9220A   1.9532   0.6445  -0.7782  0.088  0.00   0.000E+00      0.  0.674E+00  0.103E+00  0.818E-03  0.543E-04   33  26  36   21  33   9   15  20   9    0.000    0.000       0
+  0   1813 00:27:48.26   0.9250A   1.9467  -0.5973  -0.7099  0.090  0.00   0.000E+00      0.  0.674E+00  0.103E+00  0.805E-03  0.487E-04   33  26  19   14  26   9   14  20   9    0.000    0.000       0
+  0   1820 00:27:54.72   0.9200A   1.9555  -0.5973  -0.7036  0.091  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.794E-03  0.447E-04   27  29  11   14  26   9    7  18   7    0.000    0.000       0
+  0   1826 00:28:00.25   0.9220A   1.9518  -0.5763  -0.6679  0.093  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.794E-03  0.443E-04   27  29  15   13  25   9   11  21   8    0.000    0.000       0
+  0   1833 00:28:06.73   0.9280A   1.9400   0.6837  -0.6689  0.094  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.789E-03  0.425E-04   32  27  18   12  14   9   11  22   7    0.000    0.000       0
+  0   1839 00:28:12.30   0.9280A   1.9398   0.7915  -0.6575  0.094  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.793E-03  0.467E-04   32  27  23    7  13   9    2  10   9    0.000    0.000       0
+  0   1846 00:28:18.76   0.9170A   1.9633   0.9114  -0.7346  0.094  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.791E-03  0.488E-04   27   5   2    7  14   9    3  11   9    0.000    0.000       0
+  0   1852 00:28:24.28   0.9210A   1.9537   0.8839  -0.7233  0.093  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.803E-03  0.519E-04   27   5   6    6  15   9    2  11   9    0.000    0.000       0
+  0   1859 00:28:30.76   0.9300A   1.9364  -0.8306  -0.7330  0.092  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.803E-03  0.507E-04   32  27  39   13  26   9    9  28   9    0.000    0.000       0
+  0   1865 00:28:36.34   0.9290A   1.9380  -0.8546  -0.6775  0.092  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.795E-03  0.478E-04   31  24  11   14  25   9    9  26   9    0.000    0.000       0
+  0   1872 00:28:42.82   0.9250A   1.9454  -0.8061   0.6084  0.092  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.782E-03  0.422E-04   26  21  25   13  24   9    9  32  14    0.000    0.000       0
+  0   1878 00:28:48.37   0.9240A   1.9471  -0.7734  -0.6184  0.094  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.779E-03  0.419E-04   26  21  29   15  24   8   18  14   9    0.000    0.000       0
+  0   1885 00:28:54.85   0.9260A   1.9445  -0.7688  -0.6920  0.095  0.00   0.000E+00      0.  0.674E+00  0.104E+00  0.791E-03  0.471E-04   30  24  28   15  24   8   18  25   9    0.000    0.000       0
+  0   1891 00:29:00.39   0.9210A   1.9549  -0.7946  -0.7339  0.095  0.00   0.000E+00      0.  0.674E+00  0.105E+00  0.792E-03  0.468E-04   30  24  34   14  26   9   17  23   9    0.000    0.000       0
+  0   1898 00:29:06.82   0.9190A   1.9595  -0.8081  -0.7145  0.094  0.00   0.000E+00      0.  0.674E+00  0.105E+00  0.794E-03  0.474E-04   30  24   0   13  26   9   16  22   9    0.000    0.000       0
+  0   1904 00:29:12.34   0.9190A   1.9592  -0.8848  -0.7616  0.094  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.805E-03  0.504E-04   28  31  32   13  26   9   17  18   9    0.000    0.000       0
+  0   1911 00:29:18.75   0.9130A   1.9718  -0.9494  -0.7254  0.093  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.801E-03  0.496E-04   31   6   3   12  26   9   16  18   9    0.000    0.000       0
+  0   1917 00:29:24.23   0.9160A   1.9661  -0.9769  -0.6456  0.092  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.812E-03  0.539E-04   31   6   8   11  25   9   15  18   9    0.000    0.000       0
+  0   1924 00:29:30.62   0.9120A   1.9728  -0.9225  -0.6265  0.091  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.814E-03  0.534E-04   28  30   8   10  25   9   10  23   0    0.000    0.000       0
+  0   1930 00:29:36.10   0.9110A   1.9748  -0.8808   0.6558  0.089  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.815E-03  0.469E-04   32  24  10   10  24   9   18  10   8    0.000    0.000       0
+  0   1937 00:29:42.47   0.9110A   1.9760  -0.8035   0.6810  0.087  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.813E-03  0.408E-04   32  24  16    9  23   9   20  10   9    0.000    0.000       0
+  0   1944 00:29:48.86   0.9130A   1.9714  -0.7012  -0.7800  0.086  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.814E-03  0.426E-04   32  24  22   11  22   8    2  10   9    0.000    0.000       0
+  0   1950 00:29:54.34   0.9160A   1.9653   0.7821  -0.7552  0.085  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.823E-03  0.480E-04   32  24  27    5  13   9    2  11   9    0.000    0.000       0
+  0   1957 00:30:00.77   0.9200A   1.9559   0.9189  -0.6690  0.085  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.850E-03  0.556E-04   32  27  27    5  13   9   14   7   0    0.000    0.000       0
+  0   1963 00:30:06.29   0.9190A   1.9589   0.9458  -0.8401  0.086  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.870E-03  0.561E-04   26  26   8    6  14   9   17  23   9    0.000    0.000       0
+  0   1970 00:30:12.68   0.9110A   1.9763   0.8904  -0.8660  0.087  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.892E-03  0.600E-04   26  26  12    6  14   9   16  23   9    0.000    0.000       0
+  0   1976 00:30:18.14   0.9090A   1.9807   0.8122  -0.8176  0.089  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.901E-03  0.624E-04   27  31  14    6  15   9   15  22   9    0.000    0.000       0
+  0   1983 00:30:24.46   0.9020A   1.9966   0.7107  -1.0051  0.090  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.899E-03  0.605E-04   27  31  19    6  15   9   17  19   9    0.000    0.000       0
+  0   1990 00:30:30.81   0.9110A   1.9767   0.7493  -1.0539  0.091  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.898E-03  0.572E-04   27  25  37   10  14   9   15  19   9    0.000    0.000       0
+  0   1996 00:30:36.27   0.9090A   1.9804  -0.7153  -0.9611  0.091  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.886E-03  0.599E-04   26  26   7    6  15   3   14  19   9    0.000    0.000       0
+  0   2003 00:30:42.59   0.9000A   2.0009  -0.7535  -0.8429  0.091  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.873E-03  0.611E-04   26  26  13   13  25   7    8  26   9    0.000    0.000       0
+  0   2010 00:30:48.87   0.8950A   2.0114  -0.8062  -0.7779  0.091  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.870E-03  0.599E-04   26  25  14   12  26   9    8  21   8    0.000    0.000       0
+  0   2016 00:30:54.23   0.8910A   2.0197  -0.8269  -0.7920  0.091  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.860E-03  0.535E-04   26  25  20   12  26   9    7  21   8    0.000    0.000       0
+  0   2023 00:31:00.46   0.8880A   2.0265  -0.8510  -0.7712  0.090  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.864E-03  0.531E-04   26  25  26   12  25   9    6  21   8    0.000    0.000       0
+  0   2030 00:31:06.66   0.8860A   2.0317  -0.7591  -0.7070  0.091  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.853E-03  0.486E-04   26  25  31   14  24   9    4  21   7    0.000    0.000       0
+  0   2037 00:31:12.87   0.8870A   2.0298  -0.6726   0.6959  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.857E-03  0.499E-04   26  25  36   11  24   9   12  11  35    0.000    0.000       0
+  0   2043 00:31:18.21   0.8930A   2.0164  -0.6753   0.7115  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.879E-03  0.575E-04   26  25   0    5   7  39   12  11  36    0.000    0.000       0
+  0   2050 00:31:24.48   0.8980A   2.0040  -0.7236   0.8190  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.900E-03  0.581E-04   26  26   6    5   6   1   20  10   9    0.000    0.000       0
+  0   2057 00:31:30.72   0.8850A   2.0343   0.8519  -0.7358  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.905E-03  0.599E-04   26  26  12   11  14   9    8  11   9    0.000    0.000       0
+  0   2063 00:31:36.02   0.8800A   2.0450   0.9239  -0.8823  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.898E-03  0.589E-04   26  26  16   12  14   9    8  12   9    0.000    0.000       0
+  0   2070 00:31:42.17   0.8800A   2.0465   0.9616  -0.8980  0.094  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.894E-03  0.563E-04   26  26  20   11  16   9    7  12   9    0.000    0.000       0
+  0   2077 00:31:48.33   0.8810A   2.0421   1.0015  -0.8476  0.095  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.887E-03  0.548E-04   26  26  25   12  16   9    7  13   9    0.000    0.000       0
+  0   2084 00:31:54.52   0.8860A   2.0313   0.9950   0.9641  0.095  0.00   0.000E+00      0.  0.675E+00  0.108E+00  0.885E-03  0.557E-04   26  26  31   12  17   9   21  10   9    0.000    0.000       0
+  0   2091 00:32:00.74   0.8910A   2.0192   0.9343   0.9070  0.096  0.00   0.000E+00      0.  0.675E+00  0.108E+00  0.871E-03  0.572E-04   26  26  36   13  17   8   21  11   9    0.000    0.000       0
+  0   2097 00:32:06.10   0.8940A   2.0135   0.8625   0.8623  0.095  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.858E-03  0.545E-04   26  27   0   13  18   8   21  12   9    0.000    0.000       0
+  0   2104 00:32:12.35   0.8890A   2.0248   0.8076  -0.8025  0.095  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.842E-03  0.507E-04   26  27   6   11  15   9   11  17   4    0.000    0.000       0
+  0   2111 00:32:18.52   0.8750A   2.0572   0.8126  -0.8583  0.093  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.821E-03  0.507E-04   26  28  11   10  15   9    9  17   4    0.000    0.000       0
+  0   2118 00:32:24.60   0.8670A   2.0772   0.7750  -0.8511  0.092  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.794E-03  0.422E-04   26  28  16   10  16   8   15  18   9    0.000    0.000       0
+  0   2125 00:32:30.68   0.8710A   2.0664   0.7275  -0.8159  0.091  0.00   0.000E+00      0.  0.676E+00  0.109E+00  0.785E-03  0.385E-04   26  28  21   10  17   8   17  20   9    0.000    0.000       0
+  0   2132 00:32:36.80   0.8790A   2.0483   0.6561  -0.7910  0.090  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.787E-03  0.378E-04   26  28  27   18  14   5   14  19   8    0.000    0.000       0
+  0   2138 00:32:42.11   0.8880A   2.0277   0.7180  -0.7687  0.089  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.810E-03  0.399E-04   26  28  31   18  15   6   13  19   8    0.000    0.000       0
+  0   2145 00:32:48.36   0.8930A   2.0155   0.8295  -0.8038  0.089  0.00   0.000E+00      0.  0.675E+00  0.108E+00  0.831E-03  0.416E-04   28  28  29   13  13   9   10  11   9    0.000    0.000       0
+  0   2152 00:32:54.59   0.8870A   2.0287   0.9112  -0.8743  0.088  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.836E-03  0.432E-04   28  29  35   13  14   9   17  24   9    0.000    0.000       0
+  0   2159 00:33:00.78   0.8850A   2.0341   0.9251  -0.8290  0.088  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.840E-03  0.461E-04   28  29   0   13  15   9   17  23   9    0.000    0.000       0
+  0   2165 00:33:06.09   0.8860A   2.0321   0.9263  -0.8217  0.088  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.839E-03  0.461E-04   28  29   5   13  16   9    9  13   9    0.000    0.000       0
+  0   2172 00:33:12.28   0.8810A   2.0427   0.8934  -0.7902  0.087  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.838E-03  0.478E-04   28  25  13   14  16   9    8  14   9    0.000    0.000       0
+  0   2179 00:33:18.44   0.8810A   2.0422   0.8705  -0.8590  0.087  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.851E-03  0.558E-04   27  27  19   15  15   9   11  11   9    0.000    0.000       0
+  0   2186 00:33:24.61   0.8800A   2.0462   0.9070  -0.7889  0.088  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.855E-03  0.602E-04   27  27  25   15  16   9   11  13   9    0.000    0.000       0
+  0   2193 00:33:30.75   0.8760A   2.0557   0.8969  -0.8476  0.089  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.841E-03  0.535E-04   27  29  31   15  16   9   12  17   5    0.000    0.000       0
+  0   2200 00:33:36.87   0.8730A   2.0609   0.7956  -0.8689  0.090  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.832E-03  0.468E-04   26  28  37   14  17   8   11  18   5    0.000    0.000       0
+  0   2206 00:33:42.11   0.8740A   2.0589   0.7716  -0.8835  0.091  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.839E-03  0.445E-04   26  28   1   14  18   8   16  20   9    0.000    0.000       0
+  0   2213 00:33:48.25   0.8790A   2.0476   0.8989  -0.8607  0.091  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.840E-03  0.396E-04   27  29   7    9  14   9   15  20   9    0.000    0.000       0
+  0   2220 00:33:54.43   0.8860A   2.0322   0.9926  -0.7637  0.090  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.839E-03  0.409E-04   27  29  12    9  15   9   14  21   9    0.000    0.000       0
+  0   2227 00:34:00.63   0.8850A   2.0337   0.9512  -0.6787  0.090  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.827E-03  0.440E-04   29  26  15    8  16   9   13  21   9    0.000    0.000       0
+  0   2234 00:34:06.83   0.8860A   2.0316   0.9249   0.6117  0.088  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.806E-03  0.463E-04   29  26  21    7  15   9   23  33  13    0.000    0.000       0
+  0   2240 00:34:12.15   0.8860A   2.0305   0.8611   0.6174  0.086  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.801E-03  0.517E-04   30  31  39    7  16   9    8  29  35    0.000    0.000       0
+  0   2247 00:34:18.36   0.8880A   2.0271   0.7647  -0.6419  0.085  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.801E-03  0.529E-04   30  31   5    8  18   9    4  28   4    0.000    0.000       0
+  0   2254 00:34:24.56   0.8860A   2.0325   0.6826  -0.6994  0.084  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.813E-03  0.565E-04   30  31  10    8  19   9    4  28   4    0.000    0.000       0
+  0   2261 00:34:30.76   0.8840A   2.0357  -0.6850  -0.7540  0.084  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.814E-03  0.553E-04   30  31  16   12  26   9    4  28   6    0.000    0.000       0
+  0   2267 00:34:36.06   0.8830A   2.0394  -0.8056   0.7625  0.084  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.819E-03  0.551E-04   30  31  20   12  26   9   20  10   9    0.000    0.000       0
+  0   2274 00:34:42.23   0.8830A   2.0390  -0.8575  -0.8183  0.083  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.822E-03  0.528E-04   30  31  26   11  25   9   17  17   9    0.000    0.000       0
+  0   2281 00:34:48.42   0.8860A   2.0322   0.8659  -0.8140  0.082  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.827E-03  0.500E-04   30  31  31    4  30   4   16  17   9    0.000    0.000       0
+  0   2288 00:34:54.65   0.8940A   2.0145   0.8676  -0.8005  0.082  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.842E-03  0.469E-04   30  31  37    4  30   5    5  28   9    0.000    0.000       0
+  0   2294 00:35:00.02   0.8940A   2.0125   0.8615  -0.8060  0.081  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.856E-03  0.462E-04   31  31   1    4  30   5    5  28   9    0.000    0.000       0
+  0   2301 00:35:06.27   0.8890A   2.0240  -0.8755  -0.8131  0.081  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.878E-03  0.464E-04   30  25  16    6  35  17    7  26   8    0.000    0.000       0
+  0   2308 00:35:12.51   0.8990A   2.0017   0.8967  -0.7559  0.080  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.907E-03  0.512E-04   30  25  22   11  13   9    6  27   9    0.000    0.000       0
+  0   2315 00:35:18.77   0.8890A   2.0239   0.9482  -0.6818  0.079  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.900E-03  0.544E-04   29  30  11   10  14   9    7  26   9    0.000    0.000       0
+  0   2321 00:35:24.07   0.8770A   2.0514   0.8802   0.7330  0.078  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.876E-03  0.548E-04   29  30  16   10  15   9   12  28   1    0.000    0.000       0
+  0   2328 00:35:30.19   0.8730A   2.0614   0.8128  -0.7078  0.077  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.858E-03  0.532E-04   29  30  21    5  15   9    8  24   8    0.000    0.000       0
+  0   2335 00:35:36.32   0.8790A   2.0483   0.8556  -0.6991  0.077  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.863E-03  0.528E-04   29  30  27    4  16   9    7  24   8    0.000    0.000       0
+  0   2342 00:35:42.49   0.8840A   2.0356   0.8551  -0.7672  0.077  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.871E-03  0.521E-04   31  27  19    4  16   9   17  21   9    0.000    0.000       0
+  0   2349 00:35:48.67   0.8760A   2.0548   0.8452  -0.9804  0.078  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.859E-03  0.487E-04   32  27  24    3  16   9   17  20   9    0.000    0.000       0
+  0   2356 00:35:54.80   0.8740A   2.0596   0.8473  -1.0104  0.080  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.848E-03  0.439E-04   32  30   0    3  16   9   16  19   9    0.000    0.000       0
+  0   2362 00:36:00.02   0.8700A   2.0692   0.8132  -1.0010  0.081  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.849E-03  0.444E-04   32  30   5    3  17   9   16  17   9    0.000    0.000       0
+  0   2369 00:36:06.10   0.8680A   2.0749   0.8099  -0.8958  0.083  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.845E-03  0.440E-04   31  31  10    2  17   8   15  16   9    0.000    0.000       0
+  0   2376 00:36:12.17   0.8640A   2.0824   0.7934  -0.9018  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.840E-03  0.434E-04   31  29  11    2  18   8   16  14   9    0.000    0.000       0
+  0   2383 00:36:18.21   0.8620A   2.0889   0.7516  -0.8990  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.848E-03  0.434E-04   31  30  16    2  19   8   16  14   9    0.000    0.000       0
+  0   2390 00:36:24.24   0.8610A   2.0914   0.7189  -0.8105  0.082  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.848E-03  0.465E-04   31  30  21    6  15   9   16  14   9    0.000    0.000       0
+  0   2397 00:36:30.27   0.8620A   2.0873   0.7195  -0.7351  0.082  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.839E-03  0.449E-04   32  29  26    3   2  24    8  11   8    0.000    0.000       0
+  0   2404 00:36:36.30   0.8620A   2.0886   0.7207  -0.6343  0.082  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.831E-03  0.418E-04   32  29  31    3   2  26    8  12   7    0.000    0.000       0
+  0   2411 00:36:42.34   0.8640A   2.0821   0.7622  -0.6382  0.081  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.841E-03  0.453E-04   32  29  36    4   3  29   11  16   8    0.000    0.000       0
+  0   2418 00:36:48.40   0.8670A   2.0759   0.7855   0.7025  0.081  0.00   0.000E+00      0.  0.673E+00  0.107E+00  0.851E-03  0.471E-04   34  28  39    4   4  31   11  30  38    0.000    0.000       0
+  0   2425 00:36:54.49   0.8720A   2.0648   0.7490   0.7542  0.080  0.00   0.000E+00      0.  0.673E+00  0.107E+00  0.857E-03  0.466E-04   34  28   5    4   5  33   12  30   0    0.000    0.000       0
+  0   2432 00:37:00.62   0.8790A   2.0476  -0.7984   0.7203  0.079  0.00   0.000E+00      0.  0.672E+00  0.107E+00  0.864E-03  0.487E-04   35  28   9   15  27   9   13  30   3    0.000    0.000       0
+  0   2439 00:37:06.78   0.8810A   2.0439  -0.8350  -0.7121  0.079  0.00   0.000E+00      0.  0.671E+00  0.107E+00  0.865E-03  0.485E-04   35  28  15   15  26   9   17  19   9    0.000    0.000       0
+  0   2445 00:37:12.08   0.8850A   2.0337  -0.7988  -0.7363  0.080  0.00   0.000E+00      0.  0.671E+00  0.107E+00  0.859E-03  0.479E-04   35  28  19   15  26   9   16  19   9    0.000    0.000       0
+  0   2452 00:37:18.29   0.8900A   2.0228  -0.6902  -0.6912  0.081  0.00   0.000E+00      0.  0.671E+00  0.107E+00  0.851E-03  0.487E-04   33  29  30   15  25   9   15  18   9    0.000    0.000       0
+  0   2459 00:37:24.53   0.8930A   2.0163  -0.6915   0.8138  0.082  0.00   0.000E+00      0.  0.670E+00  0.107E+00  0.856E-03  0.549E-04   33  29  36   13  21   8   20  28   9    0.000    0.000       0
+  0   2466 00:37:30.81   0.9010A   1.9987  -0.6917   0.7751  0.083  0.00   0.000E+00      0.  0.671E+00  0.108E+00  0.867E-03  0.602E-04   33  29   1   10  25   9   20  26   9    0.000    0.000       0
+  0   2472 00:37:36.24   0.9040A   1.9905  -0.7209  -0.6922  0.084  0.00   0.000E+00      0.  0.672E+00  0.109E+00  0.871E-03  0.590E-04   33  22  20   10  24   9   17  15   9    0.000    0.000       0
+  0   2479 00:37:42.56   0.9040A   1.9922  -0.6922  -0.7096  0.086  0.00   0.000E+00      0.  0.673E+00  0.110E+00  0.883E-03  0.576E-04   32  21  25    9  23   9   17  15   9    0.000    0.000       0
+  0   2485 00:37:48.00   0.9090A   1.9799  -0.8218   0.6992  0.088  0.00   0.000E+00      0.  0.674E+00  0.111E+00  0.906E-03  0.561E-04   33  21  30    5  27   8   20  11   9    0.000    0.000       0
+  0   2492 00:37:54.36   0.9070A   1.9847  -0.8735   0.7563  0.090  0.00   0.000E+00      0.  0.674E+00  0.111E+00  0.925E-03  0.557E-04   32  20  34    5  26   8   20  11   9    0.000    0.000       0
+  0   2499 00:38:00.71   0.9090A   1.9810  -0.8616   0.6462  0.092  0.00   0.000E+00      0.  0.674E+00  0.111E+00  0.912E-03  0.470E-04   33  20   0    5  26   9   21  11   9    0.000    0.000       0
+  0   2505 00:38:06.16   0.9090A   1.9812  -0.8746   0.6287  0.093  0.00   0.000E+00      0.  0.673E+00  0.111E+00  0.900E-03  0.429E-04   31  19   4    5  26   9   18  30   4    0.000    0.000       0
+  0   2512 00:38:12.53   0.9090A   1.9804  -0.7684   0.6372  0.094  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.913E-03  0.436E-04   33  31  39    5  25   9    8  30   3    0.000    0.000       0
+  0   2519 00:38:18.86   0.9030A   1.9934   0.7082   0.6998  0.094  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.903E-03  0.388E-04   33  31   5    4  13   8   20  30   9    0.000    0.000       0
+  0   2525 00:38:24.26   0.8980A   2.0037   0.7654   0.6810  0.095  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.898E-03  0.403E-04   33  31   9    3  13   9   10  30   7    0.000    0.000       0
+  0   2532 00:38:30.53   0.8950A   2.0120   0.8322   0.6981  0.096  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.893E-03  0.394E-04   33  31  15    3  14   9   11  31   9    0.000    0.000       0
+  0   2539 00:38:36.79   0.8960A   2.0095   0.8361  -0.7827  0.098  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.897E-03  0.453E-04   33  31  21    3  14   9   18  17   9    0.000    0.000       0
+  0   2545 00:38:42.15   0.8920A   2.0188  -0.7848  -0.9590  0.099  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.893E-03  0.526E-04   32  29  25    2  26   9   17  17   9    0.000    0.000       0
+  0   2552 00:38:48.37   0.8890A   2.0245  -0.8291  -0.9378  0.100  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.884E-03  0.560E-04   32  29  31    2  26   9   16  18   9    0.000    0.000       0
+  0   2559 00:38:54.64   0.8990A   2.0029  -0.8370  -0.8365  0.100  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.876E-03  0.518E-04   32  29  37    2  25   9   15  18   9    0.000    0.000       0
+  0   2565 00:39:00.03   0.9000A   1.9996  -0.7921  -0.7466  0.099  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.860E-03  0.464E-04   33  29   0    2  25   9   14  17   9    0.000    0.000       0
+  0   2572 00:39:06.34   0.9000A   1.9992  -0.7207  -0.6950  0.098  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.851E-03  0.440E-04   34  29   4    3  24   9   16  16   9    0.000    0.000       0
+  0   2579 00:39:12.63   0.8980A   2.0052  -0.6757  -0.8424  0.097  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.857E-03  0.420E-04   32  29  16    4  24   9   17  21   9    0.000    0.000       0
+  0   2586 00:39:18.89   0.8910A   2.0207  -0.6487  -1.0207  0.097  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.854E-03  0.373E-04   34  30  22    5  26   9   17  21   9    0.000    0.000       0
+  0   2592 00:39:24.22   0.8870A   2.0286   0.6124  -1.0635  0.097  0.00   0.000E+00      0.  0.670E+00  0.109E+00  0.847E-03  0.365E-04   34  30  27   23  29  19   16  20   9    0.000    0.000       0
+  0   2599 00:39:30.42   0.8850A   2.0331   0.6226  -1.0165  0.097  0.00   0.000E+00      0.  0.668E+00  0.108E+00  0.852E-03  0.388E-04   34  30  33   23  29  22   15  20   9    0.000    0.000       0
+  0   2606 00:39:36.62   0.8850A   2.0343   0.6701  -0.9017  0.096  0.00   0.000E+00      0.  0.668E+00  0.108E+00  0.858E-03  0.477E-04   34  29  38   23  29  26   14  19   9    0.000    0.000       0
+  0   2613 00:39:42.81   0.8840A   2.0367   0.7193  -0.8023  0.094  0.00   0.000E+00      0.  0.668E+00  0.109E+00  0.896E-03  0.707E-04   34  29   3   24  30  30   13  19   9    0.000    0.000       0
+  0   2619 00:39:48.13   0.8870A   2.0299   0.7504  -0.7948  0.093  0.00   0.000E+00      0.  0.669E+00  0.110E+00  0.914E-03  0.771E-04   34  29   8   24  30  33   13  17   8    0.000    0.000       0
+  0   2626 00:39:54.34   0.8900A   2.0225   0.7570   0.9101  0.091  0.00   0.000E+00      0.  0.670E+00  0.110E+00  0.910E-03  0.704E-04   34  29  13   24  31  37   20  28   9    0.000    0.000       0
+  0   2633 00:40:00.58   0.8910A   2.0202  -0.7710   0.9125  0.090  0.00   0.000E+00      0.  0.671E+00  0.111E+00  0.882E-03  0.589E-04   32  28  18   11  26   9   20  26   9    0.000    0.000       0
+  0   2640 00:40:06.81   0.8910A   2.0194  -0.8307   0.8917  0.090  0.00   0.000E+00      0.  0.672E+00  0.112E+00  0.893E-03  0.626E-04   28  26  14   10  27   9   20  25   9    0.000    0.000       0
+  0   2646 00:40:12.18   0.8940A   2.0125  -0.9105  -0.8307  0.090  0.00   0.000E+00      0.  0.673E+00  0.113E+00  0.908E-03  0.656E-04   32  28  29   10  26   9   14  17   9    0.000    0.000       0
+  0   2653 00:40:18.42   0.8910A   2.0196  -0.8955  -0.9117  0.091  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.909E-03  0.631E-04   32  28  34    9  26   8   16  24   7    0.000    0.000       0
+  0   2660 00:40:24.65   0.8890A   2.0242   1.0523  -0.9629  0.093  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.919E-03  0.608E-04   32  28   0   19  30   9   15  24   8    0.000    0.000       0
+  0   2667 00:40:30.88   0.8890A   2.0250  -0.8407  -1.0371  0.096  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.912E-03  0.565E-04   32  28   5   15  19   8   16  22   9    0.000    0.000       0
+  0   2673 00:40:36.22   0.8910A   2.0206   0.8085  -1.0511  0.098  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.905E-03  0.518E-04   32  28  10   14  31   9   15  20   9    0.000    0.000       0
+  0   2680 00:40:42.47   0.8960A   2.0086  -0.8155  -0.9563  0.099  0.00   0.000E+00      0.  0.672E+00  0.113E+00  0.891E-03  0.514E-04   32  28  15   14  27   6   15  18   9    0.000    0.000       0
+  0   2687 00:40:48.78   0.9050A   1.9886  -0.8158  -0.9898  0.098  0.00   0.000E+00      0.  0.672E+00  0.112E+00  0.893E-03  0.493E-04   32  28  21   15  27   7   12  26   8    0.000    0.000       0
+  0   2693 00:40:54.22   0.9050A   1.9881  -0.9371  -1.0080  0.097  0.00   0.000E+00      0.  0.671E+00  0.112E+00  0.889E-03  0.480E-04   31  27  18   15  26   8   11  27   9    0.000    0.000       0
+  0   2700 00:41:00.56   0.9070A   1.9843  -0.8720  -0.8811  0.096  0.00   0.000E+00      0.  0.670E+00  0.112E+00  0.882E-03  0.452E-04   31  27  23   16  26   9   10  27   9    0.000    0.000       0
+  0   2706 00:41:06.01   0.9090A   1.9804  -0.8480  -0.8632  0.095  0.00   0.000E+00      0.  0.669E+00  0.111E+00  0.879E-03  0.466E-04   30  19  20   16  25   9    9  27   9    0.000    0.000       0
+  0   2713 00:41:12.37   0.9080A   1.9830   0.9568  -0.7683  0.095  0.00   0.000E+00      0.  0.669E+00  0.111E+00  0.870E-03  0.448E-04   30  19  26   13  13   9    8  26   9    0.000    0.000       0
+  0   2720 00:41:18.74   0.9150A   1.9675   0.9458  -0.7388  0.094  0.00   0.000E+00      0.  0.668E+00  0.111E+00  0.865E-03  0.450E-04   30  19  31   12  14   9   10  16   7    0.000    0.000       0
+  0   2726 00:41:24.26   0.9180A   1.9607   0.8882  -0.7413  0.093  0.00   0.000E+00      0.  0.667E+00  0.110E+00  0.861E-03  0.499E-04   27  26  11   11  14   9    9  16   8    0.000    0.000       0
+  0   2733 00:41:30.70   0.9250A   1.9450   0.8645  -0.8045  0.092  0.00   0.000E+00      0.  0.667E+00  0.110E+00  0.864E-03  0.556E-04   27  26  17   10  14   9    8  17   8    0.000    0.000       0
+  0   2739 00:41:36.28   0.9350A   1.9251   0.8562  -0.7863  0.092  0.00   0.000E+00      0.  0.666E+00  0.110E+00  0.867E-03  0.537E-04   27  27  20    9  13   9    7  17   8    0.000    0.000       0
+  0   2746 00:41:42.82   0.9330A   1.9300   0.9145  -0.7335  0.092  0.00   0.000E+00      0.  0.666E+00  0.110E+00  0.865E-03  0.496E-04   30  25   7    9  14   9    6  18   7    0.000    0.000       0
+  0   2752 00:41:48.39   0.9250A   1.9459   0.9427  -0.8128  0.093  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.862E-03  0.481E-04   31  25  15    9  14   9   17  22   9    0.000    0.000       0
+  0   2759 00:41:54.86   0.9220A   1.9514   0.9749  -0.9137  0.095  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.866E-03  0.518E-04   31  25  20    9  14   9   17  21   9    0.000    0.000       0
+  0   2765 00:42:00.38   0.9210A   1.9553   0.9717  -0.9356  0.096  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.867E-03  0.574E-04   30  24  22    9  15   9   16  20   9    0.000    0.000       0
+  0   2772 00:42:06.83   0.9210A   1.9547   0.9355  -0.8771  0.097  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.864E-03  0.611E-04   30  25  30   10  16   9   15  19   9    0.000    0.000       0
+  0   2778 00:42:12.34   0.9170A   1.9629   0.9129  -0.7971  0.098  0.00   0.000E+00      0.  0.666E+00  0.109E+00  0.853E-03  0.562E-04   29  23  31   10  16   9   14  21   9    0.000    0.000       0
+  0   2785 00:42:18.75   0.9140A   1.9688   0.8905  -0.7572  0.098  0.00   0.000E+00      0.  0.667E+00  0.109E+00  0.841E-03  0.508E-04   29  23  37   10  17   9    6  13   9    0.000    0.000       0
+  0   2791 00:42:24.23   0.9160A   1.9647   0.8545  -0.7676  0.097  0.00   0.000E+00      0.  0.667E+00  0.109E+00  0.843E-03  0.507E-04   29  23   1    9  16   9    6  13   9    0.000    0.000       0
+  0   2798 00:42:30.64   0.9090A   1.9802  -0.8864  -0.7878  0.095  0.00   0.000E+00      0.  0.666E+00  0.109E+00  0.840E-03  0.498E-04   25  24  29   13  28   9    5  13   9    0.000    0.000       0
+  0   2804 00:42:36.08   0.9090A   1.9802  -1.0739  -0.7522  0.092  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.851E-03  0.511E-04   25  24  34   13  27   9    4  13   9    0.000    0.000       0
+  0   2811 00:42:42.45   0.9110A   1.9765  -1.1474   0.6859  0.090  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.857E-03  0.511E-04   24  24  38   12  27   9   16  28   9    0.000    0.000       0
+  0   2818 00:42:48.86   0.9180A   1.9599  -1.0490   0.6830  0.088  0.00   0.000E+00      0.  0.664E+00  0.107E+00  0.865E-03  0.564E-04   30  26   4   12  26   9   11  27   7    0.000    0.000       0
+  0   2824 00:42:54.42   0.9310A   1.9331  -0.8960   0.7526  0.088  0.00   0.000E+00      0.  0.665E+00  0.107E+00  0.889E-03  0.642E-04   33  37  16   11  26   9   20  28   9    0.000    0.000       0
+  0   2830 00:43:00.01   0.9330A   1.9303  -0.8062   0.6603  0.088  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.896E-03  0.630E-04   33  37  21   11  25   9   20  28   9    0.000    0.000       0
+  0   2837 00:43:06.54   0.9340A   1.9270  -0.7742   0.6292  0.090  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.882E-03  0.528E-04   32  38  25    6  26   9    8  19  30    0.000    0.000       0
+  0   2843 00:43:12.15   0.9360A   1.9236  -0.7480   0.6164  0.091  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.866E-03  0.454E-04   33  38  30    6  26   9    8  18  30    0.000    0.000       0
+  0   2850 00:43:18.65   0.9210A   1.9549   0.6636  -0.6306  0.093  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.839E-03  0.436E-04   27  22  39    8  17   9    8  17   4    0.000    0.000       0
+  0   2856 00:43:24.16   0.9180A   1.9606   0.7047  -0.7249  0.094  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.837E-03  0.470E-04   27  22   3   14  13   9   17  21   9    0.000    0.000       0
+  0   2863 00:43:30.60   0.9130A   1.9710   0.7926  -0.9437  0.096  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.840E-03  0.484E-04   27  26   1   10  14   9   17  22   9    0.000    0.000       0
+  0   2869 00:43:36.07   0.9100A   1.9772   0.9138  -1.0073  0.096  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.835E-03  0.445E-04   27  26   5    9  15   9   17  23   9    0.000    0.000       0
+  0   2876 00:43:42.46   0.9130A   1.9707   0.9951  -0.9376  0.094  0.00   0.000E+00      0.  0.664E+00  0.107E+00  0.825E-03  0.413E-04   28  25   9   10  15   9   16  22   9    0.000    0.000       0
+  0   2883 00:43:48.85   0.9110A   1.9750   0.9449  -0.8083  0.090  0.00   0.000E+00      0.  0.663E+00  0.106E+00  0.824E-03  0.462E-04   28  25  13   10  16   9   15  22   9    0.000    0.000       0
+  0   2889 00:43:54.33   0.9150A   1.9679   0.8607  -0.6989  0.086  0.00   0.000E+00      0.  0.663E+00  0.106E+00  0.844E-03  0.563E-04   28  25  17   10  17   9    4  13   9    0.000    0.000       0
+  0   2896 00:44:00.76   0.9240A   1.9488   0.8231   0.7392  0.083  0.00   0.000E+00      0.  0.662E+00  0.106E+00  0.859E-03  0.619E-04   28  25  22   10  16   8   20  28   9    0.000    0.000       0
+  0   2902 00:44:06.30   0.9210A   1.9540   0.7754  -0.7081  0.080  0.00   0.000E+00      0.  0.663E+00  0.106E+00  0.851E-03  0.627E-04   26  25  17   11  17   8    7  27   9    0.000    0.000       0
+  0   2909 00:44:12.75   0.9190A   1.9595   0.8688  -0.7694  0.079  0.00   0.000E+00      0.  0.664E+00  0.106E+00  0.845E-03  0.612E-04   29  25  31   20  31   9   13  14   4    0.000    0.000       0
+  0   2915 00:44:18.26   0.9200A   1.9564   0.7986  -0.7869  0.079  0.00   0.000E+00      0.  0.665E+00  0.107E+00  0.850E-03  0.619E-04   29  25  36   12  16   9   13  14   4    0.000    0.000       0
+  0   2922 00:44:24.73   0.9270A   1.9423  -0.7054  -0.7453  0.079  0.00   0.000E+00      0.  0.666E+00  0.107E+00  0.834E-03  0.513E-04   30  23   0    7  27   9   13  15   4    0.000    0.000       0
+  0   2928 00:44:30.30   0.9280A   1.9404  -0.7918  -0.7265  0.079  0.00   0.000E+00      0.  0.666E+00  0.107E+00  0.826E-03  0.476E-04   27  25  32    7  27   9   17  26   9    0.000    0.000       0
+  0   2935 00:44:36.70   0.9070A   1.9856  -0.8137  -0.6763  0.080  0.00   0.000E+00      0.  0.666E+00  0.106E+00  0.806E-03  0.454E-04   27  25  37    8  26   9   17  21   9    0.000    0.000       0
+  0   2941 00:44:42.10   0.8970A   2.0066  -0.7941  -0.7660  0.082  0.00   0.000E+00      0.  0.666E+00  0.106E+00  0.786E-03  0.378E-04   27  25   2    8  25   9   17  22   9    0.000    0.000       0
+  0   2948 00:44:48.40   0.9020A   1.9957  -0.7313  -0.8474  0.083  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.786E-03  0.375E-04   27  25   7    7  25   9   17  24   9    0.000    0.000       0
+  0   2955 00:44:54.77   0.9150A   1.9678  -0.6938  -0.7738  0.084  0.00   0.000E+00      0.  0.664E+00  0.104E+00  0.794E-03  0.401E-04   27  25  12    7  26   9   16  23   9    0.000    0.000       0
+  0   2961 00:45:00.30   0.9270A   1.9428  -0.7101  -0.6645  0.083  0.00   0.000E+00      0.  0.663E+00  0.103E+00  0.798E-03  0.398E-04   27  25  16    7  26   9   15  23   9    0.000    0.000       0
+  0   2968 00:45:06.84   0.9370A   1.9208  -0.7269   0.6170  0.083  0.00   0.000E+00      0.  0.662E+00  0.103E+00  0.817E-03  0.484E-04   34  32  22    7  26   9   21  31  13    0.000    0.000       0
+  0   2974 00:45:12.46   0.9370A   1.9201  -0.6747   0.6319  0.083  0.00   0.000E+00      0.  0.662E+00  0.103E+00  0.826E-03  0.563E-04   34  32  27    7  26   9   20  12   9    0.000    0.000       0
+  0   2980 00:45:18.11   0.9430A   1.9082   0.7125   0.6882  0.083  0.00   0.000E+00      0.  0.662E+00  0.103E+00  0.832E-03  0.611E-04   34  32  31   15  13   9   20  13   9    0.000    0.000       0
+  0   2987 00:45:24.75   0.9520A   1.8904   0.7900   0.6548  0.084  0.00   0.000E+00      0.  0.663E+00  0.104E+00  0.835E-03  0.640E-04   35  37  36   13  15   9   20  14   9    0.000    0.000       0
+  0   2993 00:45:30.44   0.9470A   1.8998   0.8201  -0.6737  0.085  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.822E-03  0.615E-04   29  33  31   13  15   9   17  21   9    0.000    0.000       0
+  0   2999 00:45:36.09   0.9390A   1.9171   0.8074  -0.8173  0.087  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.815E-03  0.558E-04   29  33  36   12  16   9   16  22   9    0.000    0.000       0
+  0   3006 00:45:42.61   0.9270A   1.9414   0.7602  -0.9038  0.088  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.806E-03  0.485E-04   29  32   3   11  17   9   16  22   9    0.000    0.000       0
+  0   3012 00:45:48.15   0.9210A   1.9546  -0.7050  -0.9843  0.090  0.00   0.000E+00      0.  0.666E+00  0.104E+00  0.796E-03  0.456E-04   29  32   7   11  27   9   16  22   9    0.000    0.000       0
+  0   3019 00:45:54.57   0.9140A   1.9702  -0.7163  -0.9239  0.091  0.00   0.000E+00      0.  0.665E+00  0.103E+00  0.780E-03  0.446E-04   29  33  12   11  26   9   15  21   9    0.000    0.000       0
+  0   3025 00:46:00.05   0.9130A   1.9725  -0.6661  -0.8335  0.092  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.765E-03  0.433E-04   29  33  16   11  26   9   15  20   9    0.000    0.000       0
+  0   3032 00:46:06.45   0.9170A   1.9625  -0.7133  -0.7475  0.092  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.758E-03  0.413E-04   29  34  21   11  27   9   16  19   9    0.000    0.000       0
+  0   3039 00:46:12.90   0.9250A   1.9464  -0.6896  -0.6864  0.091  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.769E-03  0.463E-04   29  34  26   10  26   9    5  22   8    0.000    0.000       0
+  0   3045 00:46:18.48   0.9350A   1.9259  -0.6181   0.7278  0.091  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.782E-03  0.518E-04   29  34  31   10  26   9   18  29   9    0.000    0.000       0
+  0   3051 00:46:24.13   0.9470A   1.9000  -0.6707   0.8312  0.092  0.00   0.000E+00      0.  0.664E+00  0.104E+00  0.807E-03  0.573E-04   30  22  14   17  27   9   19  28   9    0.000    0.000       0
+  0   3058 00:46:30.64   0.9140A   1.9695   0.7150   0.9470  0.092  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.788E-03  0.571E-04   28  29  12   23  30   5   21  26   9    0.000    0.000       0
+  0   3064 00:46:36.05   0.8950A   2.0118   0.7733   0.8816  0.092  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.773E-03  0.543E-04   29  28  16   23  31   7   21  26   9    0.000    0.000       0
+  0   3071 00:46:42.29   0.8910A   2.0201   0.7491  -0.8048  0.093  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.759E-03  0.486E-04   28  30  20   23  32  10   16  22   9    0.000    0.000       0
+  0   3078 00:46:48.56   0.8980A   2.0037   0.8159  -0.8745  0.094  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.765E-03  0.498E-04   29  29  24   20  31   8   15  21   9    0.000    0.000       0
+  0   3085 00:46:54.86   0.9020A   1.9964   0.9486  -0.9799  0.095  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.769E-03  0.459E-04   30  28  27   19  31   9   17  23   9    0.000    0.000       0
+  0   3091 00:47:00.27   0.9010A   1.9972   0.8723  -0.9994  0.094  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.773E-03  0.451E-04   30  28  31   19  31   9   16  23   9    0.000    0.000       0
+  0   3098 00:47:06.61   0.9100A   1.9775  -0.7941  -0.9520  0.093  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.792E-03  0.513E-04   28  23  36    7  27   9   15  22   9    0.000    0.000       0
+  0   3104 00:47:12.09   0.9140A   1.9684  -0.7578  -0.9351  0.092  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.793E-03  0.510E-04   26  33   0    7  26   9   15  22   9    0.000    0.000       0
+  0   3111 00:47:18.55   0.9320A   1.9305  -0.6830  -0.8675  0.091  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.798E-03  0.491E-04   26  33   5    8  25   9   14  21   9    0.000    0.000       0
+  0   3117 00:47:24.17   0.9330A   1.9285   0.7156  -0.8341  0.091  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.783E-03  0.462E-04   28  27  17   14  13   9   15  23   9    0.000    0.000       0
+  0   3124 00:47:30.69   0.9290A   1.9377   0.7314  -0.7489  0.090  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.776E-03  0.476E-04   28  27  22   14  14   9   14  22   9    0.000    0.000       0
+  0   3130 00:47:36.27   0.9290A   1.9370   0.7955  -0.6834  0.089  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.769E-03  0.462E-04   28  27  26   12  13   9   13  22   9    0.000    0.000       0
+  0   3137 00:47:42.76   0.9260A   1.9429  -0.8548   0.6596  0.088  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.752E-03  0.440E-04   29  27  31   12  26   9   20  27   9    0.000    0.000       0
+  0   3143 00:47:48.32   0.9200A   1.9556  -0.8518  -0.7120  0.087  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.741E-03  0.438E-04   29  20  19   12  27   9   10  22   8    0.000    0.000       0
+  0   3150 00:47:54.70   0.9080A   1.9816  -0.8815  -0.7659  0.086  0.00   0.000E+00      0.  0.665E+00  0.103E+00  0.723E-03  0.417E-04   30  21  25   12  26   9    8  21   8    0.000    0.000       0
+  0   3156 00:48:00.12   0.9010A   1.9979  -0.7898  -0.7491  0.085  0.00   0.000E+00      0.  0.665E+00  0.103E+00  0.709E-03  0.405E-04   30  21  29   11  25   9    7  21   7    0.000    0.000       0
+  0   3163 00:48:06.42   0.8970A   2.0057  -0.7130  -0.7890  0.085  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.710E-03  0.415E-04   30  20  34    9  25   9    7  18   8    0.000    0.000       0
+  0   3170 00:48:12.70   0.8990A   2.0013  -0.6451  -0.8306  0.086  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.715E-03  0.431E-04   30  20  39    7  23   8   17  19   9    0.000    0.000       0
+  0   3176 00:48:18.14   0.9110A   1.9769  -0.6126  -0.8970  0.087  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.723E-03  0.439E-04   30  20   3    7  24   9   16  19   9    0.000    0.000       0
+  0   3183 00:48:24.57   0.9220A   1.9524   0.5938  -0.8456  0.087  0.00   0.000E+00      0.  0.663E+00  0.102E+00  0.715E-03  0.425E-04   29  20   8   21  31  15    3  18   7    0.000    0.000       0
+  0   3189 00:48:30.07   0.9120A   1.9743  -0.6205  -0.8372  0.087  0.00   0.000E+00      0.  0.663E+00  0.102E+00  0.710E-03  0.486E-04   28  19  12    1  16   6    3  18   7    0.000    0.000       0
+  0   3196 00:48:36.44   0.9120A   1.9742  -0.6659  -0.8022  0.086  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.707E-03  0.506E-04   28  19  17    1  16   6    3  18   8    0.000    0.000       0
+  0   3203 00:48:42.90   0.9330A   1.9282  -0.6515  -0.7642  0.087  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.709E-03  0.406E-04   28  19  22    1  15   6   15  23   9    0.000    0.000       0
+  0   3209 00:48:48.56   0.9470A   1.9002  -0.6238  -0.7331  0.087  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.722E-03  0.396E-04   29  25   1    1  14   6   13  22   8    0.000    0.000       0
+  0   3215 00:48:54.27   0.9540A   1.8875  -0.6726  -0.7276  0.087  0.00   0.000E+00      0.  0.664E+00  0.101E+00  0.729E-03  0.416E-04   34  28  31   15  28   9   12  22   8    0.000    0.000       0
+  0   3222 00:49:00.95   0.9540A   1.8872  -0.8243  -0.6708  0.086  0.00   0.000E+00      0.  0.664E+00  0.101E+00  0.729E-03  0.470E-04   32  24  36   16  27   9   11  21   8    0.000    0.000       0
+  0   3228 00:49:06.66   0.9510A   1.8934  -0.8526  -0.6728  0.085  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.748E-03  0.590E-04   32  24   0   17  26   9   10  21   7    0.000    0.000       0
+  0   3234 00:49:12.34   0.9430A   1.9081  -0.9061  -0.6503  0.084  0.00   0.000E+00      0.  0.665E+00  0.102E+00  0.750E-03  0.610E-04   25  20  17   15  26   9    9  20   7    0.000    0.000       0
+  0   3241 00:49:18.93   0.9440A   1.9074  -0.9541   0.7371  0.082  0.00   0.000E+00      0.  0.666E+00  0.102E+00  0.770E-03  0.603E-04   25  20  21   14  25   9   20  27   9    0.000    0.000       0
+  0   3247 00:49:24.58   0.9390A   1.9174  -0.9178  -0.8660  0.081  0.00   0.000E+00      0.  0.666E+00  0.103E+00  0.781E-03  0.592E-04   26  19   2   11  24   9    7  29   9    0.000    0.000       0
+  0   3253 00:49:30.23   0.9470A   1.9004  -0.9418  -0.8454  0.082  0.00   0.000E+00      0.  0.666E+00  0.103E+00  0.806E-03  0.611E-04   25  13  17   10  23   9    6  28   9    0.000    0.000       0
+  0   3260 00:49:36.81   0.9370A   1.9214  -0.9478  -0.8051  0.083  0.00   0.000E+00      0.  0.667E+00  0.103E+00  0.803E-03  0.581E-04   25  13  22   19  10   9    6  27   9    0.000    0.000       0
+  0   3266 00:49:42.44   0.9410A   1.9122  -0.9134  -0.8141  0.084  0.00   0.000E+00      0.  0.666E+00  0.102E+00  0.783E-03  0.501E-04   25  13  27   10  22   9   17  14   9    0.000    0.000       0
+  0   3272 00:49:48.13   0.9560A   1.8838  -0.8301  -0.7552  0.084  0.00   0.000E+00      0.  0.666E+00  0.102E+00  0.798E-03  0.557E-04   25  13  31   10  22   9   16  14   9    0.000    0.000       0
+  0   3279 00:49:54.80   0.9450A   1.9040  -0.7179  -0.6998  0.083  0.00   0.000E+00      0.  0.667E+00  0.102E+00  0.785E-03  0.562E-04   24  18  27    9  20   9   11  22   5    0.000    0.000       0
+  0   3285 00:50:00.46   0.9450A   1.9055  -0.6728  -0.6775  0.082  0.00   0.000E+00      0.  0.667E+00  0.102E+00  0.766E-03  0.527E-04   24  18  31   23  26  12   10  22   5    0.000    0.000       0
+  0   3291 00:50:06.13   0.9390A   1.9176   0.7308  -0.6600  0.081  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.745E-03  0.477E-04   23  17  36   13  13   9    9  22   5    0.000    0.000       0
+  0   3298 00:50:12.73   0.9520A   1.8904   0.6983  -0.6354  0.080  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.747E-03  0.483E-04   36  22  18   12  14   9    8  22   5    0.000    0.000       0
+  0   3304 00:50:18.43   0.9490A   1.8966  -0.7102  -0.6071  0.079  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.759E-03  0.517E-04   36  22  23   10  27   9    7  22   5    0.000    0.000       0
+  0   3310 00:50:24.11   0.9460A   1.9019  -0.8168  -0.6072  0.079  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.767E-03  0.518E-04   36  22  27   10  26   9   17  18   8    0.000    0.000       0
+  0   3317 00:50:30.74   0.9470A   1.9009  -0.8436  -0.9059  0.080  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.761E-03  0.474E-04   36  22  33   10  25   9   17  17   9    0.000    0.000       0
+  0   3323 00:50:36.41   0.9450A   1.9051  -0.8131  -0.8662  0.080  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.752E-03  0.476E-04   36  21  38   10  25   9   16  17   9    0.000    0.000       0
+  0   3329 00:50:42.07   0.9390A   1.9169  -0.7843  -0.7276  0.079  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.752E-03  0.534E-04   35  23   1   10  24   9   15  17   9    0.000    0.000       0
+  0   3336 00:50:48.63   0.9360A   1.9237  -0.7176  -0.5727  0.078  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.748E-03  0.535E-04   35  23   7   10  24   9   14  17   9    0.000    0.000       0
+  0   3342 00:50:54.25   0.9360A   1.9223  -0.6441  -0.6299  0.078  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.752E-03  0.526E-04   35  23  12   10  24   9   17  21   9    0.000    0.000       0
+  0   3349 00:51:00.80   0.9350A   1.9259   0.6839  -0.8616  0.077  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.760E-03  0.535E-04   34  24  16   12  13   9   17  22   9    0.000    0.000       0
+  0   3355 00:51:06.39   0.9300A   1.9352   0.7883  -0.9278  0.076  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.756E-03  0.527E-04   34  24  21   12  14   9   16  22   9    0.000    0.000       0
+  0   3362 00:51:12.90   0.9300A   1.9358   0.7726  -0.8681  0.076  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.760E-03  0.535E-04   34  24  27   11  15   9   16  23   9    0.000    0.000       0
+  0   3368 00:51:18.44   0.9190A   1.9583   0.8037  -0.7944  0.075  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.749E-03  0.505E-04   33  28   0   10  14   8   15  23   9    0.000    0.000       0
+  0   3375 00:51:24.85   0.9120A   1.9745   0.9026  -0.6637  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.738E-03  0.496E-04   33  28   5    9  15   8   14  23   9    0.000    0.000       0
+  0   3381 00:51:30.31   0.9100A   1.9783   0.9025  -0.6426  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.729E-03  0.497E-04   34  28   9    8  15   8    7  17   4    0.000    0.000       0
+  0   3388 00:51:36.70   0.9160A   1.9646   0.8156  -0.5941  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.726E-03  0.503E-04   34  28  14    7  16   8   10  16   0    0.000    0.000       0
+  0   3394 00:51:42.23   0.9260A   1.9429   0.7249   0.6261  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.722E-03  0.490E-04   34  28  19    6  14   9   11  10  35    0.000    0.000       0
+  0   3401 00:51:48.77   0.9350A   1.9255   0.6780   0.6355  0.076  0.00   0.000E+00      0.  0.671E+00  0.102E+00  0.731E-03  0.491E-04   33  25  19   11  15   9   11  10  36    0.000    0.000       0
+  0   3407 00:51:54.37   0.9310A   1.9334  -0.6834   0.6541  0.075  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.741E-03  0.494E-04   34  25  24   14  26   9   12  10  37    0.000    0.000       0
+  0   3414 00:52:00.85   0.9220A   1.9522  -0.7981   0.6452  0.075  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.745E-03  0.486E-04   34  26  30   12  27   9   20  26   9    0.000    0.000       0
+  0   3420 00:52:06.36   0.9140A   1.9699  -0.8996  -0.6118  0.075  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.747E-03  0.487E-04   34  26  35   11  27   9   10  12   9    0.000    0.000       0
+  0   3427 00:52:12.73   0.9090A   1.9795  -0.9168  -0.6170  0.075  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.743E-03  0.481E-04   34  26   1   11  26   9   10  13   9    0.000    0.000       0
+  0   3433 00:52:18.19   0.9100A   1.9778  -0.8892  -0.6238  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.745E-03  0.495E-04   34  25   5   11  26   9   17  19   9    0.000    0.000       0
+  0   3440 00:52:24.55   0.9060A   1.9858  -0.8362  -0.6674  0.077  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.735E-03  0.488E-04   34  25  11   10  26   9   17  20   9    0.000    0.000       0
+  0   3447 00:52:30.88   0.9030A   1.9934   0.8693  -0.6893  0.077  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.721E-03  0.493E-04   34  25  16   13  14   9   17  21   9    0.000    0.000       0
+  0   3453 00:52:36.30   0.9030A   1.9932   0.8318  -0.6546  0.078  0.00   0.000E+00      0.  0.669E+00  0.103E+00  0.726E-03  0.561E-04   34  25  21   13  15   9    5  20   8    0.000    0.000       0
+  0   3460 00:52:42.63   0.9060A   1.9878   0.7809  -0.6750  0.080  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.736E-03  0.573E-04   34  25  26   14  16   9    5  19   8    0.000    0.000       0
+  0   3466 00:52:48.07   0.9090A   1.9807   0.7471  -0.7102  0.079  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.743E-03  0.580E-04   34  25  31   15  16   9    5  19   8    0.000    0.000       0
+  0   3473 00:52:54.46   0.9160A   1.9658   0.6818   0.8278  0.079  0.00   0.000E+00      0.  0.671E+00  0.104E+00  0.756E-03  0.612E-04   34  25  37   14  14   9   20  13   9    0.000    0.000       0
+  0   3480 00:53:00.90   0.9240A   1.9482   0.7914   0.7347  0.078  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.768E-03  0.604E-04   34  25   2   13  14   9   20  14   9    0.000    0.000       0
+  0   3486 00:53:06.46   0.9300A   1.9358   0.9293  -0.6643  0.078  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.769E-03  0.514E-04   34  25   8   12  15   9    3  20   8    0.000    0.000       0
+  0   3492 00:53:12.05   0.9320A   1.9317   1.0176  -0.7141  0.077  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.771E-03  0.455E-04   34  24  11   11  16   9    7  12   9    0.000    0.000       0
+  0   3499 00:53:18.58   0.9330A   1.9294   1.0084  -0.6267  0.078  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.779E-03  0.468E-04   34  24  17   11  17   9    6  13   9    0.000    0.000       0
+  0   3505 00:53:24.19   0.9360A   1.9232   0.9300  -0.5741  0.078  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.775E-03  0.452E-04   34  24  22   11  18   9   13  16   1    0.000    0.000       0
+  0   3512 00:53:30.76   0.9380A   1.9192   0.8014  -0.6229  0.078  0.00   0.000E+00      0.  0.671E+00  0.102E+00  0.766E-03  0.432E-04   33  22  27   10  19   9   12  16   1    0.000    0.000       0
+  0   3518 00:53:36.39   0.9380A   1.9198   0.6975  -0.6117  0.078  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.764E-03  0.464E-04   33  22  32    8  19   9   11  16   1    0.000    0.000       0
+  0   3525 00:53:42.91   0.9230A   1.9500   0.6066  -0.6448  0.079  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.756E-03  0.462E-04   26  17  18    6  18   9   17  15   9    0.000    0.000       0
+  0   3531 00:53:48.42   0.9170A   1.9620  -0.6078  -0.7102  0.080  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.746E-03  0.438E-04   26  17  22   19   9   9   17  24   9    0.000    0.000       0
+  0   3538 00:53:54.85   0.9210A   1.9536  -0.5513  -0.6907  0.081  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.742E-03  0.454E-04   26  17  27   19  10   9   16  23   9    0.000    0.000       0
+  0   3544 00:54:00.41   0.9320A   1.9316  -0.4960  -0.6179  0.081  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.761E-03  0.547E-04   26  17  31   21   9  15   16  23   9    0.000    0.000       0
+  0   3550 00:54:06.02   0.9310A   1.9344  -0.6046  -0.7698  0.081  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.780E-03  0.647E-04   24  19  37   17  27   8   18  18   9    0.000    0.000       0
+  0   3557 00:54:12.50   0.9240A   1.9489  -0.7250   0.9062  0.081  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.786E-03  0.680E-04   24  19   2   17  27   9   20  28   9    0.000    0.000       0
+  0   3563 00:54:18.01   0.9160A   1.9648  -0.7503  -0.8582  0.080  0.00   0.000E+00      0.  0.671E+00  0.102E+00  0.773E-03  0.641E-04   26  21   6   17  26   9   16  19   9    0.000    0.000       0
+  0   3570 00:54:24.38   0.9070A   1.9844   0.7303  -0.7494  0.080  0.00   0.000E+00      0.  0.672E+00  0.102E+00  0.770E-03  0.617E-04   26  21  10   13  13   9   15  17   9    0.000    0.000       0
+  0   3577 00:54:30.71   0.8990A   2.0032   0.8631   0.7745  0.079  0.00   0.000E+00      0.  0.673E+00  0.102E+00  0.779E-03  0.634E-04   24  18  14   13  13   9   20  10   9    0.000    0.000       0
+  0   3583 00:54:36.07   0.8920A   2.0176   0.9562   0.8123  0.078  0.00   0.000E+00      0.  0.673E+00  0.102E+00  0.784E-03  0.610E-04   24  18  18   12  13   9   20  11   9    0.000    0.000       0
+  0   3590 00:54:42.34   0.9010A   1.9988   1.1048   0.7596  0.076  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.811E-03  0.599E-04   24  18  23   11  14   9   20  11   9    0.000    0.000       0
+  0   3597 00:54:48.71   0.9190A   1.9578   1.1422   0.7696  0.075  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.844E-03  0.664E-04   25  19  28   11  15   9    9  29   0    0.000    0.000       0
+  0   3603 00:54:54.29   0.9330A   1.9296   1.1015   0.8072  0.074  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.877E-03  0.729E-04   27  18  32   11  16   9    9  29   0    0.000    0.000       0
+  0   3610 00:55:00.81   0.9300A   1.9354   1.0058   0.7863  0.074  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.870E-03  0.691E-04   27  18  38   11  17   9   10  29   1    0.000    0.000       0
+  0   3616 00:55:06.39   0.9290A   1.9378   0.9101   0.7409  0.075  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.853E-03  0.644E-04   27  18   3   19  30   9   11  29   1    0.000    0.000       0
+  0   3623 00:55:12.89   0.9290A   1.9375   0.9097   0.7824  0.077  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.843E-03  0.600E-04   27  18   9   11  15   9   20  29   8    0.000    0.000       0
+  0   3629 00:55:18.48   0.9320A   1.9319   0.9795  -0.8348  0.078  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.846E-03  0.635E-04   27  18  14   10  16   9   18  20   9    0.000    0.000       0
+  0   3635 00:55:24.10   0.9430A   1.9093   0.9563  -0.9133  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.853E-03  0.649E-04   27  18  19   10  17   9   17  20   9    0.000    0.000       0
+  0   3642 00:55:30.75   0.9520A   1.8915   0.8577  -0.8895  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.850E-03  0.576E-04   28  16  26    8  16   9   17  18   9    0.000    0.000       0
+  0   3648 00:55:36.46   0.9500A   1.8944   0.8303  -0.8418  0.079  0.00   0.000E+00      0.  0.675E+00  0.101E+00  0.828E-03  0.508E-04   31   6  16    8  17   9   16  18   9    0.000    0.000       0
+  0   3654 00:55:42.15   0.9470A   1.9001   0.7872  -0.7315  0.078  0.00   0.000E+00      0.  0.674E+00  0.100E+00  0.829E-03  0.550E-04   31   6  21    7  18   9   15  18   9    0.000    0.000       0
+  0   3661 00:55:48.78   0.9480A   1.8982   0.7288   0.8007  0.077  0.00   0.000E+00      0.  0.674E+00  0.999E-01  0.841E-03  0.649E-04   31   6  26    9  19   8   20  27   9    0.000    0.000       0
+  0   3667 00:55:54.44   0.9370A   1.9220  -0.7299   0.8065  0.076  0.00   0.000E+00      0.  0.674E+00  0.100E+00  0.833E-03  0.714E-04   26  25  31   16  26   9   20  10   9    0.000    0.000       0
+  0   3673 00:56:00.02   0.9270A   1.9413  -0.7810   0.7578  0.075  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.817E-03  0.696E-04   26  25  35   16  26   9   20  11   9    0.000    0.000       0
+  0   3680 00:56:06.49   0.9230A   1.9512  -0.8594  -0.6773  0.075  0.00   0.000E+00      0.  0.675E+00  0.101E+00  0.804E-03  0.644E-04   28  16  17   15  25   9   12  26   9    0.000    0.000       0
+  0   3686 00:56:12.04   0.9270A   1.9414  -0.8152  -0.6914  0.076  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.808E-03  0.644E-04   28  15  22   15  24   9   11  25   9    0.000    0.000       0
+  0   3693 00:56:18.51   0.9230A   1.9497  -0.8357  -0.7227  0.077  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.804E-03  0.649E-04   29  16  28   14  26   9   17  21   9    0.000    0.000       0
+  0   3699 00:56:24.06   0.9260A   1.9435  -0.9081  -0.9101  0.079  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.822E-03  0.666E-04   29  16  33   12  26   9   16  20   9    0.000    0.000       0
+  0   3706 00:56:30.57   0.9310A   1.9325  -0.9532  -1.0230  0.079  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.848E-03  0.634E-04   27  25  16   10  25   9   15  19   9    0.000    0.000       0
+  0   3712 00:56:36.19   0.9390A   1.9178  -0.9873  -0.9928  0.079  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.884E-03  0.658E-04   27  25  20    8  23   8   14  18   9    0.000    0.000       0
+  0   3719 00:56:42.72   0.9270A   1.9409  -0.9593  -0.9463  0.080  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.890E-03  0.681E-04   26  28   9    7  23   8   11  18   8    0.000    0.000       0
+  0   3725 00:56:48.27   0.9240A   1.9486  -0.8262  -0.9215  0.080  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.895E-03  0.673E-04   29  16  17   22  25   5   10  18   8    0.000    0.000       0
+  0   3732 00:56:54.70   0.9120A   1.9726  -0.8630   1.0749  0.080  0.00   0.000E+00      0.  0.678E+00  0.104E+00  0.900E-03  0.683E-04   26  23  14   22  24   7   21  27   9    0.000    0.000       0
+  0   3738 00:57:00.15   0.9090A   1.9807   0.8960  -0.9378  0.080  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.902E-03  0.691E-04   26  23  18   10  14   8    7  18   8    0.000    0.000       0
+  0   3745 00:57:06.49   0.9020A   1.9966  -0.9541  -0.9825  0.080  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.908E-03  0.714E-04   25  24  22   21  23   8    6  18   7    0.000    0.000       0
+  0   3752 00:57:12.74   0.8860A   2.0319   0.8525  -0.9008  0.080  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.901E-03  0.755E-04   25  23  26    9  14   9    4  18   6    0.000    0.000       0
+  0   3758 00:57:18.04   0.8840A   2.0365   0.8163  -0.8214  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.896E-03  0.752E-04   25  23  31    9  14   9    4  19   7    0.000    0.000       0
+  0   3765 00:57:24.24   0.8890A   2.0242   0.8245  -0.7543  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.878E-03  0.643E-04   25  23  36   10  14   9    4  18   8    0.000    0.000       0
+  0   3772 00:57:30.52   0.9040A   1.9909  -0.8419  -0.7575  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.873E-03  0.540E-04   25  23   0    1  16   8    9  16   2    0.000    0.000       0
+  0   3778 00:57:36.01   0.9180A   1.9611  -0.8840  -0.7803  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.880E-03  0.540E-04   29  29   6    1  15   8    8  16   2    0.000    0.000       0
+  0   3785 00:57:42.46   0.9230A   1.9507  -0.8653  -0.7509  0.082  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.882E-03  0.544E-04   29  29  11    1  14   8    7  16   2    0.000    0.000       0
+  0   3792 00:57:48.91   0.9220A   1.9519  -0.8137  -0.7421  0.083  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.888E-03  0.583E-04   31  31  17    1  13   9    8  17   2    0.000    0.000       0
+  0   3798 00:57:54.44   0.9210A   1.9535   0.7666  -0.7337  0.083  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.908E-03  0.673E-04   31  31  21   10  16   9    8  17   3    0.000    0.000       0
+  0   3805 00:58:00.90   0.9190A   1.9586  -0.8343   0.8033  0.083  0.00   0.000E+00      0.  0.682E+00  0.103E+00  0.910E-03  0.660E-04   30  28  22    7  25   9   20  11   9    0.000    0.000       0
+  0   3811 00:58:06.41   0.9190A   1.9590  -0.8819  -0.7724  0.084  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.909E-03  0.618E-04   25  26   0   11  26   9    7  17   3    0.000    0.000       0
+  0   3818 00:58:12.80   0.9130A   1.9725  -0.8680  -0.7799  0.086  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.908E-03  0.560E-04   25  26   5   11  25   9    3  27   9    0.000    0.000       0
+  0   3824 00:58:18.28   0.9160A   1.9654  -0.8047  -0.8174  0.086  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.915E-03  0.556E-04   25  26  10   10  25   9    3  28   9    0.000    0.000       0
+  0   3831 00:58:24.71   0.9210A   1.9537  -0.8419  -0.7860  0.086  0.00   0.000E+00      0.  0.683E+00  0.102E+00  0.903E-03  0.529E-04   31  28   1    8  25   9    3  27   9    0.000    0.000       0
+  0   3837 00:58:30.26   0.9270A   1.9418  -0.8698  -0.6611  0.085  0.00   0.000E+00      0.  0.683E+00  0.102E+00  0.896E-03  0.513E-04   28  21  20    8  25   9    4  17   0    0.000    0.000       0
+  0   3844 00:58:36.73   0.9240A   1.9487   0.9811  -0.8111  0.083  0.00   0.000E+00      0.  0.683E+00  0.101E+00  0.899E-03  0.544E-04   28  21  25    9  14   9    4  10   9    0.000    0.000       0
+  0   3850 00:58:42.28   0.9240A   1.9472   0.9592  -0.8845  0.082  0.00   0.000E+00      0.  0.682E+00  0.101E+00  0.904E-03  0.554E-04   28  21  29    8  15   9    4  10   9    0.000    0.000       0
+  0   3857 00:58:48.78   0.9320A   1.9308   0.8540  -0.9186  0.082  0.00   0.000E+00      0.  0.682E+00  0.100E+00  0.924E-03  0.589E-04   28  21  34    8  16   9    3  11   9    0.000    0.000       0
+  0   3863 00:58:54.39   0.9360A   1.9223  -0.7407  -0.9001  0.082  0.00   0.000E+00      0.  0.682E+00  0.100E+00  0.932E-03  0.603E-04   25  26  28    8  24   9    3  11   9    0.000    0.000       0
+  0   3869 00:59:00.01   0.9380A   1.9194  -0.7368  -0.8127  0.082  0.00   0.000E+00      0.  0.682E+00  0.100E+00  0.920E-03  0.612E-04   34  20  36    7  25   9   17  21   9    0.000    0.000       0
+  0   3876 00:59:06.57   0.9340A   1.9266   0.8774   0.7789  0.082  0.00   0.000E+00      0.  0.684E+00  0.101E+00  0.931E-03  0.692E-04   25  25  38   12  14   9   20  27   8    0.000    0.000       0
+  0   3882 00:59:12.19   0.9380A   1.9180   0.9730  -0.8740  0.083  0.00   0.000E+00      0.  0.685E+00  0.101E+00  0.934E-03  0.686E-04   34  27   0   12  16   9    8  12   9    0.000    0.000       0
+  0   3889 00:59:18.75   0.9360A   1.9221   0.9662  -0.9514  0.084  0.00   0.000E+00      0.  0.686E+00  0.102E+00  0.929E-03  0.634E-04   34  27   6   11  17   9    7  13   9    0.000    0.000       0
+  0   3895 00:59:24.36   0.9320A   1.9318  -0.9675  -0.9293  0.084  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.930E-03  0.632E-04   33  31   6   10  26   9    6  12   9    0.000    0.000       0
+  0   3902 00:59:30.86   0.9270A   1.9421  -0.9623  -0.8648  0.083  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.915E-03  0.614E-04   33  31  12    9  25   9    6  13   9    0.000    0.000       0
+  0   3908 00:59:36.42   0.9250A   1.9449   0.9034  -0.7824  0.081  0.00   0.000E+00      0.  0.687E+00  0.100E+00  0.898E-03  0.580E-04   33  31  17   11  14   9    5  14   9    0.000    0.000       0
+  0   3915 00:59:42.90   0.9280A   1.9387   0.9744   0.6989  0.080  0.00   0.000E+00      0.  0.686E+00  0.996E-01  0.890E-03  0.576E-04   33  31  22   11  15   9   16  14   9    0.000    0.000       0
+  0   3921 00:59:48.44   0.9170A   1.9625   0.9162  -0.6614  0.078  0.00   0.000E+00      0.  0.685E+00  0.992E-01  0.881E-03  0.587E-04   26  24  33   10  16   9   15  15   5    0.000    0.000       0
+  0   3928 00:59:54.81   0.9080A   1.9823   0.8046  -0.6534  0.076  0.00   0.000E+00      0.  0.685E+00  0.991E-01  0.871E-03  0.587E-04   26  24  38   10  17   9    5  28   9    0.000    0.000       0
+  0   3934 01:00:00.27   0.9130A   1.9718   0.7509  -0.7137  0.076  0.00   0.000E+00      0.  0.685E+00  0.991E-01  0.885E-03  0.597E-04   26  24   3   16  17   8   11  16   4    0.000    0.000       0
+  0   3941 01:00:06.69   0.9180A   1.9600  -0.7249  -0.7548  0.076  0.00   0.000E+00      0.  0.685E+00  0.994E-01  0.899E-03  0.596E-04   30  31  14   13  26   9   10  16   4    0.000    0.000       0
+  0   3947 01:00:12.19   0.9170A   1.9639  -0.7130  -0.7355  0.077  0.00   0.000E+00      0.  0.685E+00  0.999E-01  0.913E-03  0.626E-04   30  31  19   14  25   9    9  16   4    0.000    0.000       0
+  0   3954 01:00:18.59   0.9120A   1.9738  -0.7440   0.7898  0.079  0.00   0.000E+00      0.  0.686E+00  0.101E+00  0.924E-03  0.645E-04   26  18  29   23  26   4   22  29   8    0.000    0.000       0
+  0   3960 01:00:24.05   0.9080A   1.9817  -0.7770   0.8833  0.080  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.936E-03  0.667E-04   25  17  33   10  26   9   22  29   9    0.000    0.000       0
+  0   3967 01:00:30.38   0.9080A   1.9814   0.9394   0.8105  0.081  0.00   0.000E+00      0.  0.688E+00  0.102E+00  0.947E-03  0.671E-04   25  18  39   20  25   9   20  26   9    0.000    0.000       0
+  0   3974 01:00:36.79   0.9190A   1.9584  -0.9821   0.9080  0.081  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.982E-03  0.661E-04   32  20  19    9  26   9   20  11   9    0.000    0.000       0
+  0   3980 01:00:42.28   0.9140A   1.9700  -0.9639   0.8888  0.080  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.976E-03  0.595E-04   35  26  24    9  26   9   21  12   9    0.000    0.000       0
+  0   3987 01:00:48.66   0.9100A   1.9782  -0.8816  -0.6928  0.078  0.00   0.000E+00      0.  0.688E+00  0.101E+00  0.957E-03  0.551E-04   29  31  27    9  25   9   13  26   1    0.000    0.000       0
+  0   3993 01:00:54.09   0.8990A   2.0025  -0.7960  -0.6778  0.077  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.930E-03  0.525E-04   29  31  31    8  24   9   10  16   8    0.000    0.000       0
+  0   4000 01:01:00.36   0.8930A   2.0167  -0.7327  -0.8670  0.076  0.00   0.000E+00      0.  0.686E+00  0.100E+00  0.916E-03  0.538E-04   29  31  36   20  23   4   17  16   9    0.000    0.000       0
+  0   4007 01:01:06.63   0.9010A   1.9989  -0.7903  -0.9007  0.075  0.00   0.000E+00      0.  0.685E+00  0.992E-01  0.912E-03  0.525E-04   29  31   1   20  22   6   17  16   9    0.000    0.000       0
+  0   4013 01:01:12.03   0.9020A   1.9946  -0.7496  -0.8065  0.076  0.00   0.000E+00      0.  0.684E+00  0.983E-01  0.904E-03  0.494E-04   34  24   5   19  22   6   15  17   9    0.000    0.000       0
+  0   4020 01:01:18.34   0.8990A   2.0026   0.7435  -0.8332  0.077  0.00   0.000E+00      0.  0.683E+00  0.977E-01  0.893E-03  0.496E-04   28  22   6    6  13   9   15  28   7    0.000    0.000       0
+  0   4027 01:01:24.62   0.8940A   2.0134   0.7887  -0.9947  0.079  0.00   0.000E+00      0.  0.682E+00  0.975E-01  0.905E-03  0.576E-04   28  22  11    6  14   9   14  28   8    0.000    0.000       0
+  0   4034 01:01:30.89   0.9010A   1.9988   0.7392   0.9547  0.080  0.00   0.000E+00      0.  0.682E+00  0.980E-01  0.948E-03  0.722E-04   28  22  16    7  15   9   20  28   9    0.000    0.000       0
+  0   4040 01:01:36.30   0.9040A   1.9903  -0.7995   0.8928  0.081  0.00   0.000E+00      0.  0.683E+00  0.986E-01  0.952E-03  0.684E-04   25  22  17   15  28   8   20  28   9    0.000    0.000       0
+  0   4047 01:01:42.64   0.9050A   1.9888  -0.9682  -0.9023  0.083  0.00   0.000E+00      0.  0.684E+00  0.990E-01  0.948E-03  0.614E-04   32  21  36   13  28   9   14  21   9    0.000    0.000       0
+  0   4053 01:01:48.07   0.9040A   1.9911  -0.9519  -0.9057  0.085  0.00   0.000E+00      0.  0.684E+00  0.990E-01  0.926E-03  0.502E-04   30  20  36   13  27   9   15  21   9    0.000    0.000       0
+  0   4060 01:01:54.39   0.9000A   2.0009  -0.8502  -0.9204  0.087  0.00   0.000E+00      0.  0.684E+00  0.986E-01  0.904E-03  0.425E-04   30  19   1   12  26   9   14  21   9    0.000    0.000       0
+  0   4067 01:02:00.67   0.8960A   2.0086  -0.7493  -0.8759  0.089  0.00   0.000E+00      0.  0.684E+00  0.983E-01  0.898E-03  0.478E-04   30  19   7   12  25   9   16  20   9    0.000    0.000       0
+  0   4073 01:02:06.05   0.8970A   2.0073   0.7096  -0.8432  0.088  0.00   0.000E+00      0.  0.684E+00  0.981E-01  0.913E-03  0.561E-04   30  19  12   19  26   9   13  20   9    0.000    0.000       0
+  0   4080 01:02:12.33   0.8990A   2.0029   0.7068  -0.7748  0.087  0.00   0.000E+00      0.  0.684E+00  0.982E-01  0.927E-03  0.596E-04   30  17  17   19  27   9   12  20   9    0.000    0.000       0
+  0   4087 01:02:18.63   0.9010A   1.9974  -0.7219  -0.8379  0.087  0.00   0.000E+00      0.  0.684E+00  0.981E-01  0.919E-03  0.498E-04   29  17  22    9  27   8    6  28   9    0.000    0.000       0
+  0   4093 01:02:24.03   0.8990A   2.0015  -0.7835  -0.8469  0.087  0.00   0.000E+00      0.  0.683E+00  0.976E-01  0.917E-03  0.470E-04   29  17  27   10  25   8    5  28   9    0.000    0.000       0
+  0   4100 01:02:30.33   0.9030A   1.9935  -0.7951  -0.8271  0.088  0.00   0.000E+00      0.  0.682E+00  0.965E-01  0.912E-03  0.475E-04   29  17  33   10  25   9    6  27   9    0.000    0.000       0
+  0   4107 01:02:36.65   0.9000A   1.9995  -0.8000  -0.8532  0.087  0.00   0.000E+00      0.  0.680E+00  0.957E-01  0.918E-03  0.608E-04   27  16  38   10  24   9    6  26   9    0.000    0.000       0
+  0   4113 01:02:42.04   0.8980A   2.0048  -0.7922  -0.8263  0.087  0.00   0.000E+00      0.  0.680E+00  0.957E-01  0.930E-03  0.731E-04   27  16   2   11  24   9    5  26   9    0.000    0.000       0
+  0   4120 01:02:48.32   0.8970A   2.0076  -0.7843  -0.7769  0.088  0.00   0.000E+00      0.  0.680E+00  0.961E-01  0.923E-03  0.724E-04   30  22  17   11  23   9    7  20   7    0.000    0.000       0
+  0   4127 01:02:54.59   0.8950A   2.0113  -0.7248  -0.7823  0.089  0.00   0.000E+00      0.  0.680E+00  0.963E-01  0.906E-03  0.661E-04   30  23  23   12  23   9    7  18   7    0.000    0.000       0
+  0   4134 01:03:00.87   0.9000A   2.0002  -0.6759  -0.7952  0.090  0.00   0.000E+00      0.  0.681E+00  0.966E-01  0.899E-03  0.637E-04   30  23  28   11  24   9    5  18   7    0.000    0.000       0
+  0   4140 01:03:06.28   0.9010A   1.9976  -0.7088  -0.7439  0.090  0.00   0.000E+00      0.  0.682E+00  0.971E-01  0.895E-03  0.622E-04   33  23  31   10  26   9    5  18   6    0.000    0.000       0
+  0   4147 01:03:12.59   0.9020A   1.9955  -0.8216  -0.6495  0.090  0.00   0.000E+00      0.  0.683E+00  0.977E-01  0.902E-03  0.630E-04   33  23  37   17  27   9    4  18   6    0.000    0.000       0
+  0   4153 01:03:18.01   0.9050A   1.9885  -0.9811   0.8890  0.089  0.00   0.000E+00      0.  0.684E+00  0.980E-01  0.925E-03  0.677E-04   33  23   1   18  26   9   20  28   9    0.000    0.000       0
+  0   4160 01:03:24.34   0.9040A   1.9919  -1.0124   0.8527  0.089  0.00   0.000E+00      0.  0.685E+00  0.982E-01  0.920E-03  0.657E-04   26  26  16   18  26   9   20  28   9    0.000    0.000       0
+  0   4167 01:03:30.62   0.8950A   2.0106  -0.9468  -0.8337  0.089  0.00   0.000E+00      0.  0.685E+00  0.980E-01  0.881E-03  0.542E-04   26  26  21   18  25   9    5  11   9    0.000    0.000       0
+  0   4174 01:03:36.86   0.8930A   2.0161  -0.8956  -0.8303  0.090  0.00   0.000E+00      0.  0.684E+00  0.973E-01  0.870E-03  0.489E-04   26  26  26   14  27   9   17  17   9    0.000    0.000       0
+  0   4180 01:03:42.21   0.8900A   2.0227  -0.8797  -0.9855  0.091  0.00   0.000E+00      0.  0.683E+00  0.965E-01  0.878E-03  0.498E-04   29  24  28   13  26   9   17  18   9    0.000    0.000       0
+  0   4187 01:03:48.41   0.8840A   2.0367  -0.7947  -0.9624  0.092  0.00   0.000E+00      0.  0.682E+00  0.957E-01  0.884E-03  0.524E-04   29  24  33   14  24   9   16  18   9    0.000    0.000       0
+  0   4194 01:03:54.58   0.8770A   2.0519  -0.6956  -0.8924  0.093  0.00   0.000E+00      0.  0.682E+00  0.954E-01  0.888E-03  0.574E-04   26  17  33   14  23   9   16  19   9    0.000    0.000       0
+  0   4201 01:04:00.66   0.8650A   2.0811   0.6082  -0.8799  0.092  0.00   0.000E+00      0.  0.682E+00  0.950E-01  0.889E-03  0.601E-04   26  16  38   11  13   4   16  20   9    0.000    0.000       0
+  0   4208 01:04:06.71   0.8670A   2.0757   0.6825  -0.8681  0.091  0.00   0.000E+00      0.  0.682E+00  0.947E-01  0.884E-03  0.610E-04   26  16   3   18  18   5   17  18   9    0.000    0.000       0
+  0   4215 01:04:12.84   0.8780A   2.0494  -0.6981  -0.9570  0.089  0.00   0.000E+00      0.  0.682E+00  0.942E-01  0.892E-03  0.606E-04   32  24  13   16  27   9   16  18   9    0.000    0.000       0
+  0   4221 01:04:18.11   0.8780A   2.0507  -0.8472  -0.9506  0.086  0.00   0.000E+00      0.  0.682E+00  0.936E-01  0.888E-03  0.567E-04   32  24  18   15  27   9   16  18   9    0.000    0.000       0
+  0   4228 01:04:24.25   0.8750A   2.0560  -0.9291  -0.8596  0.084  0.00   0.000E+00      0.  0.682E+00  0.930E-01  0.884E-03  0.547E-04   25  16  19   15  26   9   15  18   9    0.000    0.000       0
+  0   4235 01:04:30.36   0.8720A   2.0632  -0.9296  -0.7363  0.082  0.00   0.000E+00      0.  0.681E+00  0.922E-01  0.868E-03  0.477E-04   25  16  24   15  25   9   14  19   9    0.000    0.000       0
+  0   4242 01:04:36.48   0.8750A   2.0577  -0.8204  -0.7023  0.079  0.00   0.000E+00      0.  0.681E+00  0.914E-01  0.867E-03  0.517E-04   25  15  29   15  25   9   10  20   8    0.000    0.000       0
+  0   4249 01:04:42.62   0.8770A   2.0529   0.7637  -0.7196  0.078  0.00   0.000E+00      0.  0.681E+00  0.913E-01  0.880E-03  0.640E-04   25  15  35   12  14   9    8  20   7    0.000    0.000       0
+  0   4256 01:04:48.78   0.8830A   2.0382   0.8946  -0.8064  0.077  0.00   0.000E+00      0.  0.682E+00  0.917E-01  0.891E-03  0.711E-04   25  15   1   10  15   9    6  12   9    0.000    0.000       0
+  0   4262 01:04:54.10   0.8920A   2.0188   0.9276  -0.8823  0.079  0.00   0.000E+00      0.  0.683E+00  0.921E-01  0.894E-03  0.701E-04   25  15   5   10  16   9    6  12   9    0.000    0.000       0
+  0   4269 01:05:00.35   0.8880A   2.0275   0.9043  -0.9257  0.081  0.00   0.000E+00      0.  0.684E+00  0.926E-01  0.888E-03  0.690E-04   24  15  10    9  17   9    5  12   9    0.000    0.000       0
+  0   4276 01:05:06.52   0.8780A   2.0495   0.8884  -0.9347  0.083  0.00   0.000E+00      0.  0.685E+00  0.932E-01  0.878E-03  0.659E-04   24  15  15   10  17   8    5  12   9    0.000    0.000       0
+  0   4283 01:05:12.68   0.8830A   2.0376   0.9152  -0.8742  0.085  0.00   0.000E+00      0.  0.686E+00  0.938E-01  0.885E-03  0.681E-04   24  15  20   10  17   8   18  23   9    0.000    0.000       0
+  0   4289 01:05:18.00   0.8870A   2.0288   0.9285  -0.9254  0.086  0.00   0.000E+00      0.  0.687E+00  0.941E-01  0.886E-03  0.671E-04   24  14  26   10  17   8   17  22   9    0.000    0.000       0
+  0   4296 01:05:24.22   0.8910A   2.0211   0.8774  -0.9240  0.086  0.00   0.000E+00      0.  0.687E+00  0.944E-01  0.869E-03  0.594E-04   24  14  31   10  18   8   16  22   9    0.000    0.000       0
+  0   4303 01:05:30.47   0.8950A   2.0122   0.9710  -0.8430  0.085  0.00   0.000E+00      0.  0.688E+00  0.947E-01  0.854E-03  0.538E-04   33  24   7   12  15   9   16  22   9    0.000    0.000       0
+  0   4310 01:05:36.74   0.8960A   2.0091   0.9490  -0.7776  0.084  0.00   0.000E+00      0.  0.688E+00  0.946E-01  0.846E-03  0.518E-04   33  24  13   12  15   9   15  22   9    0.000    0.000       0
+  0   4316 01:05:42.11   0.8920A   2.0171   0.8797  -0.7845  0.082  0.00   0.000E+00      0.  0.688E+00  0.946E-01  0.837E-03  0.493E-04   30  24  15   12  16   9   12  16   1    0.000    0.000       0
+  0   4323 01:05:48.33   0.8870A   2.0298   0.8374  -0.8161  0.082  0.00   0.000E+00      0.  0.687E+00  0.944E-01  0.829E-03  0.478E-04   30  23  20   13  15   9   11  16   1    0.000    0.000       0
+  0   4330 01:05:54.47   0.8690A   2.0709   0.8085  -0.8294  0.082  0.00   0.000E+00      0.  0.687E+00  0.941E-01  0.802E-03  0.459E-04   26  14  21   14  15   9   11  16   1    0.000    0.000       0
+  0   4337 01:06:00.59   0.8740A   2.0605   0.7924  -0.7850  0.082  0.00   0.000E+00      0.  0.686E+00  0.938E-01  0.803E-03  0.480E-04   26  15  26   13  15   9   11  16   1    0.000    0.000       0
+  0   4344 01:06:06.76   0.8830A   2.0396   0.7731  -0.7782  0.082  0.00   0.000E+00      0.  0.686E+00  0.937E-01  0.810E-03  0.501E-04   26  18  31   12  15   9   11  15   1    0.000    0.000       0
+  0   4350 01:06:12.04   0.8780A   2.0498   0.7294  -0.7739  0.082  0.00   0.000E+00      0.  0.686E+00  0.936E-01  0.814E-03  0.496E-04   26  18  36   12  16   9   11  15   1    0.000    0.000       0
+  0   4357 01:06:18.20   0.8810A   2.0438   0.7281  -0.8067  0.082  0.00   0.000E+00      0.  0.685E+00  0.934E-01  0.838E-03  0.521E-04   25  17   1   20  30   9   17  23   9    0.000    0.000       0
+  0   4364 01:06:24.38   0.8880A   2.0279   0.7198   0.8443  0.081  0.00   0.000E+00      0.  0.684E+00  0.933E-01  0.851E-03  0.536E-04   25  17   6   16  15   9   20  11   9    0.000    0.000       0
+  0   4371 01:06:30.61   0.8880A   2.0270   0.8067   0.9359  0.081  0.00   0.000E+00      0.  0.684E+00  0.934E-01  0.866E-03  0.606E-04   25  17  12   16  14   9   21  12   9    0.000    0.000       0
+  0   4378 01:06:36.83   0.8960A   2.0085   0.8603   0.9721  0.081  0.00   0.000E+00      0.  0.684E+00  0.940E-01  0.885E-03  0.713E-04   28  19  20   17  15   9   20  11   9    0.000    0.000       0
+  0   4384 01:06:42.21   0.8980A   2.0047   0.9114   0.9718  0.081  0.00   0.000E+00      0.  0.685E+00  0.947E-01  0.892E-03  0.754E-04   32  22  27   16  14   9   20  12   9    0.000    0.000       0
+  0   4391 01:06:48.49   0.8980A   2.0053   0.9311   0.8921  0.080  0.00   0.000E+00      0.  0.687E+00  0.958E-01  0.886E-03  0.705E-04   30  29  33   15  15   9   20  13   9    0.000    0.000       0
+  0   4398 01:06:54.75   0.8900A   2.0218   0.9628  -0.7899  0.080  0.00   0.000E+00      0.  0.689E+00  0.968E-01  0.874E-03  0.615E-04   30  28  26   14  15   9   16  19   9    0.000    0.000       0
+  0   4404 01:07:00.06   0.8830A   2.0396   1.0057  -0.7376  0.079  0.00   0.000E+00      0.  0.690E+00  0.972E-01  0.865E-03  0.548E-04   30  28  30   13  16   9   16  19   9    0.000    0.000       0
+  0   4411 01:07:06.22   0.8770A   2.0526   0.9846  -0.7373  0.079  0.00   0.000E+00      0.  0.691E+00  0.972E-01  0.851E-03  0.500E-04   29  27  35   12  16   9    8  11   9    0.000    0.000       0
+  0   4418 01:07:12.35   0.8760A   2.0549   0.9182  -0.6947  0.077  0.00   0.000E+00      0.  0.691E+00  0.967E-01  0.843E-03  0.472E-04   29  27   0   11  16   9    9  22   5    0.000    0.000       0
+  0   4425 01:07:18.51   0.8820A   2.0402   0.8411  -0.6991  0.075  0.00   0.000E+00      0.  0.690E+00  0.961E-01  0.838E-03  0.471E-04   31  29  19   10  16   9    5  28   9    0.000    0.000       0
+  0   4432 01:07:24.64   0.8710A   2.0665  -0.7919  -0.7331  0.073  0.00   0.000E+00      0.  0.689E+00  0.955E-01  0.809E-03  0.443E-04   27  31  26    9  25   9    5  27   9    0.000    0.000       0
+  0   4439 01:07:30.73   0.8690A   2.0707  -0.7985  -0.7219  0.072  0.00   0.000E+00      0.  0.688E+00  0.951E-01  0.803E-03  0.467E-04   27  31  31   14  27   9    4  27   9    0.000    0.000       0
+  0   4446 01:07:36.81   0.8680A   2.0737  -0.8232  -0.6698  0.072  0.00   0.000E+00      0.  0.687E+00  0.949E-01  0.792E-03  0.475E-04   30  29  34   14  27   9   16  21   5    0.000    0.000       0
+  0   4452 01:07:42.00   0.8630A   2.0846  -0.7717  -0.6737  0.073  0.00   0.000E+00      0.  0.686E+00  0.951E-01  0.801E-03  0.551E-04   30  29  38   13  26   9   15  21   4    0.000    0.000       0
+  0   4459 01:07:48.04   0.8630A   2.0865  -0.6698  -0.8940  0.074  0.00   0.000E+00      0.  0.686E+00  0.955E-01  0.820E-03  0.603E-04   30  29   3   13  26   9   17  21   9    0.000    0.000       0
+  0   4466 01:07:54.09   0.8650A   2.0819   0.7327  -0.9561  0.075  0.00   0.000E+00      0.  0.687E+00  0.960E-01  0.828E-03  0.577E-04   30  29   9   13  13   9   16  20   9    0.000    0.000       0
+  0   4473 01:08:00.16   0.8690A   2.0718   0.8404  -0.9112  0.076  0.00   0.000E+00      0.  0.687E+00  0.963E-01  0.834E-03  0.580E-04   30  29  14   13  14   9   15  20   9    0.000    0.000       0
+  0   4480 01:08:06.26   0.8750A   2.0565   0.8220  -0.8307  0.077  0.00   0.000E+00      0.  0.688E+00  0.966E-01  0.828E-03  0.545E-04   30  29  20   12  15   9   14  20   9    0.000    0.000       0
+  0   4487 01:08:12.41   0.8800A   2.0462   0.8118  -0.7520  0.077  0.00   0.000E+00      0.  0.689E+00  0.966E-01  0.825E-03  0.503E-04   26  33  26   14  14   9   13  20   9    0.000    0.000       0
+  0   4494 01:08:18.58   0.8840A   2.0351   0.7467   0.6968  0.076  0.00   0.000E+00      0.  0.689E+00  0.966E-01  0.836E-03  0.517E-04   26  33  31   14  15   9   20  29   9    0.000    0.000       0
+  0   4501 01:08:24.78   0.8830A   2.0393   0.6975   0.7939  0.076  0.00   0.000E+00      0.  0.689E+00  0.965E-01  0.838E-03  0.530E-04   32  28  10   10  14   9   20  28   9    0.000    0.000       0
+  0   4507 01:08:30.05   0.8780A   2.0503  -0.8458   0.7868  0.075  0.00   0.000E+00      0.  0.689E+00  0.964E-01  0.833E-03  0.530E-04   32  28  15   17  26   9   20  26   9    0.000    0.000       0
+  0   4514 01:08:36.19   0.8770A   2.0520  -0.9151   0.6538  0.075  0.00   0.000E+00      0.  0.688E+00  0.958E-01  0.821E-03  0.472E-04   32  28  20   16  26   9   20  24   9    0.000    0.000       0
+  0   4521 01:08:42.33   0.8780A   2.0511  -0.9218  -0.6579  0.076  0.00   0.000E+00      0.  0.687E+00  0.949E-01  0.819E-03  0.480E-04   32  28  26   15  26   9    6  21   6    0.000    0.000       0
+  0   4528 01:08:48.50   0.8840A   2.0354  -0.9450  -0.6414  0.077  0.00   0.000E+00      0.  0.686E+00  0.941E-01  0.830E-03  0.582E-04   32  28  31   15  25   9    9  21   3    0.000    0.000       0
+  0   4535 01:08:54.69   0.8830A   2.0393  -0.9180  -0.6658  0.079  0.00   0.000E+00      0.  0.685E+00  0.938E-01  0.847E-03  0.674E-04   31  24  35   16  24   9   17  17   9    0.000    0.000       0
+  0   4542 01:09:00.88   0.8870A   2.0303  -0.8443  -0.8916  0.080  0.00   0.000E+00      0.  0.686E+00  0.939E-01  0.866E-03  0.734E-04   31  24   1   15  23   9   17  18   9    0.000    0.000       0
+  0   4548 01:09:06.20   0.8880A   2.0262  -0.8183  -0.9954  0.082  0.00   0.000E+00      0.  0.686E+00  0.939E-01  0.866E-03  0.731E-04   31  23   5   15  25   9   16  17   9    0.000    0.000       0
+  0   4555 01:09:12.42   0.8870A   2.0298  -0.8094  -0.9421  0.084  0.00   0.000E+00      0.  0.686E+00  0.942E-01  0.855E-03  0.671E-04   23  17  32   15  25   9   15  17   9    0.000    0.000       0
+  0   4562 01:09:18.61   0.8850A   2.0346  -0.7812  -0.8529  0.085  0.00   0.000E+00      0.  0.687E+00  0.946E-01  0.849E-03  0.620E-04   23  17  36   14  26   9   12  21   6    0.000    0.000       0
+  0   4569 01:09:24.81   0.8870A   2.0285  -0.7856  -0.8150  0.085  0.00   0.000E+00      0.  0.688E+00  0.948E-01  0.835E-03  0.528E-04   31  23  22   14  25   9   11  21   6    0.000    0.000       0
+  0   4575 01:09:30.15   0.8890A   2.0249   0.7810  -0.7389  0.085  0.00   0.000E+00      0.  0.688E+00  0.947E-01  0.818E-03  0.428E-04   30  22  27   14  13   9   10  20   5    0.000    0.000       0
+  0   4582 01:09:36.38   0.8910A   2.0211   0.7757  -0.7517  0.085  0.00   0.000E+00      0.  0.688E+00  0.943E-01  0.810E-03  0.411E-04   36  34  32   13  13   9   11  15   8    0.000    0.000       0
+  0   4589 01:09:42.61   0.8900A   2.0221   0.8184  -0.7919  0.086  0.00   0.000E+00      0.  0.688E+00  0.939E-01  0.810E-03  0.463E-04   36  34  37   12  13   9   11  16   8    0.000    0.000       0
+  0   4596 01:09:48.85   0.8930A   2.0163   0.8388  -0.7614  0.086  0.00   0.000E+00      0.  0.687E+00  0.934E-01  0.812E-03  0.448E-04   36  34   3   11  13   9    9  16   8    0.000    0.000       0
+  0   4602 01:09:54.22   0.8960A   2.0089   0.7615  -0.7039  0.086  0.00   0.000E+00      0.  0.686E+00  0.927E-01  0.821E-03  0.452E-04   37  34   7   10  13   9    8  16   8    0.000    0.000       0
+  0   4609 01:10:00.49   0.8970A   2.0060  -0.7556  -0.6881  0.085  0.00   0.000E+00      0.  0.685E+00  0.918E-01  0.833E-03  0.464E-04   37  34  12    7  14   4   17  19   9    0.000    0.000       0
+  0   4616 01:10:06.79   0.9000A   2.0006  -0.8302  -0.7426  0.084  0.00   0.000E+00      0.  0.684E+00  0.913E-01  0.836E-03  0.453E-04   31  21  20    7  14   4   16  19   9    0.000    0.000       0
+  0   4622 01:10:12.18   0.8980A   2.0052  -0.8234  -0.8018  0.083  0.00   0.000E+00      0.  0.683E+00  0.910E-01  0.839E-03  0.457E-04   31  21  25    6  13   4   17  15   9    0.000    0.000       0
+  0   4629 01:10:18.46   0.8970A   2.0075  -0.7661  -0.8668  0.084  0.00   0.000E+00      0.  0.683E+00  0.907E-01  0.855E-03  0.548E-04   31  20  29    6  12   3   15  16   9    0.000    0.000       0
+  0   4636 01:10:24.74   0.8970A   2.0062  -0.7150  -0.8607  0.083  0.00   0.000E+00      0.  0.683E+00  0.908E-01  0.851E-03  0.594E-04   31  21  36    5  13   3   14  17   9    0.000    0.000       0
+  0   4642 01:10:30.13   0.9000A   2.0004  -0.6771  -0.8387  0.082  0.00   0.000E+00      0.  0.683E+00  0.911E-01  0.843E-03  0.608E-04   31  21   1    4  13   4   13  17   9    0.000    0.000       0
+  0   4649 01:10:36.44   0.9010A   1.9979  -0.6919   0.8255  0.081  0.00   0.000E+00      0.  0.684E+00  0.915E-01  0.832E-03  0.616E-04   31  21   6   13  27   3   20  28   9    0.000    0.000       0
+  0   4656 01:10:42.74   0.8990A   2.0026  -0.7764   0.8410  0.080  0.00   0.000E+00      0.  0.685E+00  0.920E-01  0.831E-03  0.644E-04   31  21  12   12  27   4   20  27   9    0.000    0.000       0
+  0   4662 01:10:48.13   0.8980A   2.0050  -0.7995  -0.8508  0.079  0.00   0.000E+00      0.  0.685E+00  0.921E-01  0.816E-03  0.579E-04   29  20  17   12  26   5   11  16   8    0.000    0.000       0
+  0   4669 01:10:54.42   0.9000A   2.0003   0.8664  -0.8810  0.078  0.00   0.000E+00      0.  0.685E+00  0.921E-01  0.811E-03  0.520E-04   29  21  23   11  13   8    9  16   8    0.000    0.000       0
+  0   4676 01:11:00.72   0.9000A   1.9999   0.9490  -0.8884  0.078  0.00   0.000E+00      0.  0.685E+00  0.919E-01  0.809E-03  0.490E-04   28  20  29   10  15   9    8  17   8    0.000    0.000       0
+  0   4682 01:11:06.12   0.9000A   2.0002   0.9068  -0.8756  0.078  0.00   0.000E+00      0.  0.684E+00  0.916E-01  0.801E-03  0.456E-04   28  21  35    8  15   8    7  19   8    0.000    0.000       0
+  0   4689 01:11:12.42   0.9010A   1.9982   0.8094  -0.8336  0.079  0.00   0.000E+00      0.  0.683E+00  0.912E-01  0.786E-03  0.459E-04   28  21   1    7  18   8    6  20   8    0.000    0.000       0
+  0   4696 01:11:18.74   0.9040A   1.9912   0.7044  -0.8207  0.079  0.00   0.000E+00      0.  0.682E+00  0.912E-01  0.770E-03  0.464E-04   28  21   7    5  18   8    6  11   9    0.000    0.000       0
+  0   4702 01:11:24.17   0.9050A   1.9888  -0.6666  -0.8725  0.079  0.00   0.000E+00      0.  0.682E+00  0.917E-01  0.775E-03  0.519E-04   27  20   9    1  11   8    6  12   9    0.000    0.000       0
+  0   4709 01:11:30.49   0.9010A   1.9980  -0.6561  -0.8383  0.079  0.00   0.000E+00      0.  0.683E+00  0.926E-01  0.779E-03  0.561E-04   26  21  15    1  10   9    4  12   9    0.000    0.000       0
+  0   4716 01:11:36.80   0.9040A   1.9908  -0.6681  -0.7012  0.078  0.00   0.000E+00      0.  0.684E+00  0.937E-01  0.781E-03  0.574E-04   26  21  20   14  26   8    3  12   9    0.000    0.000       0
+  0   4722 01:11:42.21   0.8970A   2.0067  -0.7232  -0.6512  0.076  0.00   0.000E+00      0.  0.685E+00  0.944E-01  0.770E-03  0.539E-04   27  24  33   12  26   9    4  22   8    0.000    0.000       0
+  0   4729 01:11:48.43   0.8810A   2.0435  -0.7372  -0.6032  0.075  0.00   0.000E+00      0.  0.685E+00  0.947E-01  0.753E-03  0.461E-04   27  23  37   11  26   9    3  22   8    0.000    0.000       0
+  0   4736 01:11:54.57   0.8790A   2.0485  -0.7046  -0.6190  0.075  0.00   0.000E+00      0.  0.685E+00  0.948E-01  0.751E-03  0.425E-04   27  23   2   10  25   9   10  16   4    0.000    0.000       0
+  0   4743 01:12:00.76   0.8840A   2.0357  -0.6688  -0.6376  0.075  0.00   0.000E+00      0.  0.684E+00  0.949E-01  0.763E-03  0.452E-04   27  22   7    9  25   9    9  16   3    0.000    0.000       0
+  0   4749 01:12:06.07   0.8860A   2.0314  -0.6733  -0.6395  0.074  0.00   0.000E+00      0.  0.683E+00  0.955E-01  0.776E-03  0.489E-04   27  22  12    6  26   9    8  16   3    0.000    0.000       0
+  0   4756 01:12:12.29   0.8910A   2.0200  -0.8916  -0.7623  0.075  0.00   0.000E+00      0.  0.683E+00  0.963E-01  0.802E-03  0.512E-04   27  21  15   20  18   9   18  21   9    0.000    0.000       0
+  0   4763 01:12:18.51   0.8870A   2.0292  -0.9552  -0.9129  0.076  0.00   0.000E+00      0.  0.683E+00  0.972E-01  0.826E-03  0.539E-04   27  21  21   20  16   9   17  21   9    0.000    0.000       0
+  0   4770 01:12:24.73   0.8900A   2.0219  -0.9359  -0.9255  0.077  0.00   0.000E+00      0.  0.683E+00  0.984E-01  0.857E-03  0.578E-04   28  21  23   20  16   9   16  21   9    0.000    0.000       0
+  0   4776 01:12:30.03   0.8790A   2.0485  -0.8450  -0.9534  0.077  0.00   0.000E+00      0.  0.683E+00  0.995E-01  0.885E-03  0.622E-04   28  21  28   19  17   9   16  22   9    0.000    0.000       0
+  0   4783 01:12:36.17   0.8760A   2.0540  -0.8040  -0.9454  0.077  0.00   0.000E+00      0.  0.684E+00  0.101E+00  0.917E-03  0.723E-04   29  21  32   18  18   9   15  22   9    0.000    0.000       0
+  0   4790 01:12:42.25   0.8660A   2.0795   0.8087  -0.9674  0.077  0.00   0.000E+00      0.  0.685E+00  0.102E+00  0.923E-03  0.712E-04   29  21  38   13  14   9   15  22   9    0.000    0.000       0
+  0   4797 01:12:48.29   0.8640A   2.0833   0.8660  -0.9706  0.078  0.00   0.000E+00      0.  0.686E+00  0.103E+00  0.933E-03  0.644E-04   29  21   3   13  15   9   15  21   9    0.000    0.000       0
+  0   4804 01:12:54.37   0.8700A   2.0679   0.8272  -0.9148  0.079  0.00   0.000E+00      0.  0.687E+00  0.104E+00  0.959E-03  0.678E-04   29  21   8   20  19   5   14  21   9    0.000    0.000       0
+  0   4811 01:13:00.49   0.8780A   2.0505   0.8537  -0.8511  0.080  0.00   0.000E+00      0.  0.688E+00  0.104E+00  0.974E-03  0.675E-04   29  21  14   20  20   6   17  13   5    0.000    0.000       0
+  0   4818 01:13:06.65   0.8830A   2.0395  -1.0540  -0.8977  0.081  0.00   0.000E+00      0.  0.688E+00  0.104E+00  0.982E-03  0.614E-04   29  21  19   18   9   9   17  13   6    0.000    0.000       0
+  0   4825 01:13:12.83   0.8840A   2.0358  -0.9835  -0.8712  0.080  0.00   0.000E+00      0.  0.687E+00  0.103E+00  0.977E-03  0.579E-04   29  21  24   10  26   9   17  11   8    0.000    0.000       0
+  0   4831 01:13:18.11   0.8740A   2.0584  -0.9878  -0.8894  0.080  0.00   0.000E+00      0.  0.686E+00  0.102E+00  0.955E-03  0.545E-04   27  19  27    8  26   9   16  10   9    0.000    0.000       0
+  0   4838 01:13:24.16   0.8570A   2.1013  -0.9290  -0.8909  0.081  0.00   0.000E+00      0.  0.685E+00  0.102E+00  0.925E-03  0.536E-04   27  20  32    7  25   9   15  14   9    0.000    0.000       0
+  0   4845 01:13:30.20   0.8650A   2.0801  -0.8079  -0.8992  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.942E-03  0.559E-04   28  19  36    7  24   9   17  16   9    0.000    0.000       0
+  0   4852 01:13:36.32   0.8780A   2.0509  -0.7322  -1.1027  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.960E-03  0.612E-04   29  21   2    9  24   9   17  19   9    0.000    0.000       0
+  0   4859 01:13:42.47   0.8790A   2.0470  -0.7802  -1.1439  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.964E-03  0.673E-04   30  23   7   11  27   9   15  19   9    0.000    0.000       0
+  0   4866 01:13:48.60   0.8710A   2.0662  -1.0800  -1.0696  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.970E-03  0.720E-04   30  23  12   10  26   9   14  19   9    0.000    0.000       0
+  0   4873 01:13:54.67   0.8660A   2.0794  -1.1058  -0.9326  0.082  0.00   0.000E+00      0.  0.685E+00  0.103E+00  0.987E-03  0.777E-04   30  24  18   10  24   9   13  18   9    0.000    0.000       0
+  0   4880 01:14:00.73   0.8650A   2.0802  -1.0426   0.9256  0.082  0.00   0.000E+00      0.  0.686E+00  0.104E+00  0.982E-03  0.709E-04   30  24  23    8  25   9   20  11   9    0.000    0.000       0
+  0   4887 01:14:06.80   0.8720A   2.0641  -0.9707   0.8852  0.082  0.00   0.000E+00      0.  0.686E+00  0.104E+00  0.984E-03  0.712E-04   30  25  28    8  24   9   20  12   9    0.000    0.000       0
+  0   4893 01:14:12.06   0.8790A   2.0471  -0.9121   0.9416  0.083  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.985E-03  0.669E-04   30  25  32    7  23   9   20  29   9    0.000    0.000       0
+  0   4900 01:14:18.25   0.8890A   2.0251  -0.8727  -0.9918  0.085  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.965E-03  0.555E-04   33  19  21   13  27   9   16  17   9    0.000    0.000       0
+  0   4907 01:14:24.47   0.8880A   2.0261  -0.8325  -1.0153  0.086  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.946E-03  0.525E-04   33  19  26    8  23   9   16  16   9    0.000    0.000       0
+  0   4914 01:14:30.70   0.8910A   2.0192  -0.7749  -0.9913  0.086  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.944E-03  0.551E-04   33  19  32    7  23   9   14  17   9    0.000    0.000       0
+  0   4920 01:14:36.07   0.8950A   2.0102  -0.7312  -0.9386  0.086  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.953E-03  0.618E-04   30  27  16    6  24   9   14  16   9    0.000    0.000       0
+  0   4927 01:14:42.32   0.8910A   2.0205  -0.6874  -0.9005  0.086  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.962E-03  0.683E-04   30  28  22    5  24   9   13  16   9    0.000    0.000       0
+  0   4934 01:14:48.55   0.8900A   2.0229   0.7585  -0.9047  0.087  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.958E-03  0.643E-04   30  28  27   20  30   9   16  17   9    0.000    0.000       0
+  0   4941 01:14:54.79   0.8940A   2.0127   0.6714  -1.0514  0.087  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.953E-03  0.571E-04   30  28  34   19  30   9   15  17   9    0.000    0.000       0
+  0   4947 01:15:00.16   0.8950A   2.0106  -0.6598  -1.1085  0.088  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.957E-03  0.509E-04   30  28   0    2  10   1   14  17   9    0.000    0.000       0
+  0   4954 01:15:06.44   0.8970A   2.0064  -0.7190  -1.0382  0.088  0.00   0.000E+00      0.  0.686E+00  0.105E+00  0.959E-03  0.493E-04   30  28   6    3  13   4   13  18   9    0.000    0.000       0
+  0   4961 01:15:12.72   0.8940A   2.0125  -0.7278  -0.9290  0.087  0.00   0.000E+00      0.  0.685E+00  0.104E+00  0.953E-03  0.506E-04   28  35   1    3  12   3   15  21   9    0.000    0.000       0
+  0   4967 01:15:18.07   0.8910A   2.0212  -0.7326  -0.8915  0.087  0.00   0.000E+00      0.  0.684E+00  0.104E+00  0.956E-03  0.546E-04   29  35   5    3   9   1   15  22   9    0.000    0.000       0
+  0   4974 01:15:24.24   0.8770A   2.0527   0.7071  -0.9027  0.088  0.00   0.000E+00      0.  0.685E+00  0.104E+00  0.952E-03  0.615E-04   30  33   9   20  30   8   16  24   9    0.000    0.000       0
+  0   4981 01:15:30.38   0.8780A   2.0505  -0.7109  -0.9148  0.088  0.00   0.000E+00      0.  0.686E+00  0.105E+00  0.964E-03  0.695E-04   30  34  14   15  27   9   16  24   9    0.000    0.000       0
+  0   4988 01:15:36.48   0.8640A   2.0844   0.7616  -0.8081  0.089  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.965E-03  0.749E-04   26  39  19    9  11   1   13  23   8    0.000    0.000       0
+  0   4995 01:15:42.51   0.8580A   2.0986  -0.8302  -0.8794  0.089  0.00   0.000E+00      0.  0.690E+00  0.107E+00  0.952E-03  0.665E-04   26  39  24   11  27   9    7  12   9    0.000    0.000       0
+  0   5002 01:15:48.49   0.8540A   2.1084  -0.9597  -0.8720  0.089  0.00   0.000E+00      0.  0.691E+00  0.106E+00  0.936E-03  0.546E-04   26  39  28   11  26   9    5  12   9    0.000    0.000       0
+  0   5009 01:15:54.47   0.8540A   2.1086  -0.9262  -0.8201  0.088  0.00   0.000E+00      0.  0.691E+00  0.106E+00  0.918E-03  0.486E-04   26  39  33   12  25   9    4  11   9    0.000    0.000       0
+  0   5016 01:16:00.48   0.8620A   2.0878   0.9042  -0.7491  0.088  0.00   0.000E+00      0.  0.691E+00  0.105E+00  0.928E-03  0.502E-04   28  38  37    8  18   7    6  21   7    0.000    0.000       0
+  0   5023 01:16:06.56   0.8730A   2.0608   0.8582  -0.7519  0.087  0.00   0.000E+00      0.  0.691E+00  0.105E+00  0.954E-03  0.536E-04   30  28   1   10  16   6    6  12   9    0.000    0.000       0
+  0   5030 01:16:12.67   0.8730A   2.0609   0.8878  -0.7692  0.087  0.00   0.000E+00      0.  0.690E+00  0.104E+00  0.959E-03  0.527E-04   30  28   5   10  17   7    4  13   9    0.000    0.000       0
+  0   5037 01:16:18.79   0.8770A   2.0516   0.8242  -0.8581  0.087  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.976E-03  0.531E-04   30  28  10    9  17   7   17  22   9    0.000    0.000       0
+  0   5043 01:16:24.08   0.8830A   2.0380   0.7733  -0.8785  0.087  0.00   0.000E+00      0.  0.688E+00  0.102E+00  0.991E-03  0.551E-04   30  28  13    9  17   7   17  22   9    0.000    0.000       0
+  0   5050 01:16:30.28   0.8900A   2.0231   0.7314  -0.8727  0.087  0.00   0.000E+00      0.  0.687E+00  0.102E+00  0.997E-03  0.589E-04   30  28  18    9  18   8   17  21   9    0.000    0.000       0
+  0   5057 01:16:36.53   0.8940A   2.0144   0.7431  -0.8009  0.087  0.00   0.000E+00      0.  0.687E+00  0.102E+00  0.101E-02  0.696E-04   30  28  22   13  13   7   16  21   9    0.000    0.000       0
+  0   5064 01:16:42.78   0.8900A   2.0215   0.8837  -0.8174  0.086  0.00   0.000E+00      0.  0.688E+00  0.102E+00  0.100E-02  0.756E-04   30  28  26   14  13   9   16  18   9    0.000    0.000       0
+  0   5070 01:16:48.10   0.8850A   2.0347   0.9503  -0.7563  0.086  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.980E-03  0.721E-04   30  28  30   14  13   9   12  14   5    0.000    0.000       0
+  0   5077 01:16:54.28   0.8800A   2.0455   0.9084  -0.7102  0.085  0.00   0.000E+00      0.  0.690E+00  0.103E+00  0.964E-03  0.629E-04   30  28  35   13  15   8   17  17   9    0.000    0.000       0
+  0   5084 01:17:00.44   0.8810A   2.0420   0.8899  -0.7505  0.084  0.00   0.000E+00      0.  0.690E+00  0.103E+00  0.968E-03  0.625E-04   30  28   0   12  14   8    5  28   9    0.000    0.000       0
+  0   5091 01:17:06.63   0.8880A   2.0275   1.0555  -0.8207  0.082  0.00   0.000E+00      0.  0.691E+00  0.103E+00  0.978E-03  0.654E-04   30  28   6   12  15   9    7  11   9    0.000    0.000       0
+  0   5098 01:17:12.87   0.8940A   2.0131   1.0853  -0.8297  0.081  0.00   0.000E+00      0.  0.691E+00  0.104E+00  0.974E-03  0.624E-04   30  28  11   12  16   9    6  12   9    0.000    0.000       0
+  0   5104 01:17:18.23   0.8920A   2.0177   1.0559  -0.7732  0.081  0.00   0.000E+00      0.  0.692E+00  0.104E+00  0.969E-03  0.606E-04   31  27  17   13  16   9    5  13   9    0.000    0.000       0
+  0   5111 01:17:24.46   0.8890A   2.0250   0.9964  -0.7664  0.081  0.00   0.000E+00      0.  0.692E+00  0.104E+00  0.962E-03  0.553E-04   30  27  24   12  17   9   18  25   9    0.000    0.000       0
+  0   5118 01:17:30.66   0.8840A   2.0359   0.9974  -0.7501  0.081  0.00   0.000E+00      0.  0.692E+00  0.104E+00  0.959E-03  0.490E-04   30  27  30   10  17   9   15  16   5    0.000    0.000       0
+  0   5125 01:17:36.84   0.8820A   2.0410   0.9810  -0.7801  0.081  0.00   0.000E+00      0.  0.691E+00  0.104E+00  0.967E-03  0.499E-04   30  27  35    9  17   9   15  16   5    0.000    0.000       0
+  0   5131 01:17:42.14   0.8840A   2.0361   0.9556  -0.7718  0.080  0.00   0.000E+00      0.  0.691E+00  0.104E+00  0.980E-03  0.523E-04   30  27   0    8  18   9   13  17   4    0.000    0.000       0
+  0   5138 01:17:48.36   0.8900A   2.0226   0.9099   0.7617  0.079  0.00   0.000E+00      0.  0.690E+00  0.104E+00  0.101E-02  0.606E-04   33  26   6   11  15   9   22   8   8    0.000    0.000       0
+  0   5145 01:17:54.58   0.8870A   2.0291   1.0066   0.7961  0.078  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.103E-02  0.690E-04   33  25  12   15  14   9   20  11   9    0.000    0.000       0
+  0   5152 01:18:00.78   0.8850A   2.0329   1.0496   0.8490  0.077  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.102E-02  0.703E-04   33  25  18   15  14   9   20  12   9    0.000    0.000       0
+  0   5158 01:18:06.09   0.8850A   2.0344   1.0491  -0.7762  0.077  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.101E-02  0.661E-04   33  25  23   14  15   9   17  17   9    0.000    0.000       0
+  0   5165 01:18:12.28   0.8830A   2.0387   1.0341  -0.7489  0.078  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.997E-03  0.634E-04   32  26  28   13  16   9    8  11   9    0.000    0.000       0
+  0   5172 01:18:18.44   0.8780A   2.0510   0.9766  -0.8158  0.079  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.979E-03  0.630E-04   32  26  34   11  17   9    7  12   9    0.000    0.000       0
+  0   5179 01:18:24.57   0.8770A   2.0534   1.0123  -0.8337  0.080  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.955E-03  0.556E-04   32  26  39   11  15   9    6  12   9    0.000    0.000       0
+  0   5186 01:18:30.71   0.8780A   2.0510   0.9630  -0.7543  0.080  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.934E-03  0.470E-04   33  25   6   10  17   9    5  13   9    0.000    0.000       0
+  0   5193 01:18:36.85   0.8770A   2.0524   0.8377  -0.7845  0.080  0.00   0.000E+00      0.  0.688E+00  0.101E+00  0.929E-03  0.484E-04   33  26  12   10  19   9   17  24   9    0.000    0.000       0
+  0   5199 01:18:42.11   0.8770A   2.0527   0.7500  -0.8365  0.080  0.00   0.000E+00      0.  0.688E+00  0.100E+00  0.935E-03  0.486E-04   33  26  17   16  31   9   17  22   9    0.000    0.000       0
+  0   5206 01:18:48.26   0.8790A   2.0476   0.7089  -0.9980  0.080  0.00   0.000E+00      0.  0.687E+00  0.993E-01  0.929E-03  0.453E-04   33  26  22   15  31   9   16  19   9    0.000    0.000       0
+  0   5213 01:18:54.42   0.8820A   2.0401  -0.6539  -0.9144  0.081  0.00   0.000E+00      0.  0.686E+00  0.987E-01  0.914E-03  0.454E-04   33  26  27    6  27   9   15  19   9    0.000    0.000       0
+  0   5220 01:19:00.60   0.8800A   2.0464   0.6238  -1.0095  0.082  0.00   0.000E+00      0.  0.685E+00  0.982E-01  0.900E-03  0.470E-04   32  27  32    1  26   7   17  15   9    0.000    0.000       0
+  0   5227 01:19:06.73   0.8730A   2.0615   0.6678  -1.0229  0.082  0.00   0.000E+00      0.  0.684E+00  0.978E-01  0.898E-03  0.524E-04   32  27  37    9  31   9   16  17   9    0.000    0.000       0
+  0   5234 01:19:12.81   0.8670A   2.0755   0.7295  -1.0006  0.081  0.00   0.000E+00      0.  0.684E+00  0.978E-01  0.888E-03  0.561E-04   32  27   3    9  31   9   15  17   9    0.000    0.000       0
+  0   5240 01:19:18.01   0.8660A   2.0786  -0.7405  -0.9106  0.080  0.00   0.000E+00      0.  0.684E+00  0.980E-01  0.870E-03  0.526E-04   32  27   8   14  27   9   13  18   9    0.000    0.000       0
+  0   5247 01:19:24.06   0.8640A   2.0839  -0.8326  -0.8202  0.080  0.00   0.000E+00      0.  0.685E+00  0.980E-01  0.836E-03  0.424E-04   32  27  13   14  26   9   15  16   9    0.000    0.000       0
+  0   5254 01:19:30.12   0.8670A   2.0773  -0.7932  -0.7994  0.079  0.00   0.000E+00      0.  0.685E+00  0.978E-01  0.831E-03  0.419E-04   32  27  19   13  26   9   15  16   9    0.000    0.000       0
+  0   5261 01:19:36.19   0.8680A   2.0735  -0.7965  -0.7865  0.079  0.00   0.000E+00      0.  0.684E+00  0.976E-01  0.832E-03  0.419E-04   32  27  24   11  27   8   14  15   9    0.000    0.000       0
+  0   5268 01:19:42.28   0.8720A   2.0632  -0.7340  -0.8586  0.080  0.00   0.000E+00      0.  0.683E+00  0.972E-01  0.841E-03  0.418E-04   32  27  30   10  25   8   18  18   9    0.000    0.000       0
+  0   5275 01:19:48.41   0.8780A   2.0491  -0.7893  -0.9203  0.081  0.00   0.000E+00      0.  0.682E+00  0.967E-01  0.850E-03  0.447E-04   32  27  35   21  22   7   17  17   9    0.000    0.000       0
+  0   5282 01:19:54.60   0.8870A   2.0297  -0.8314  -0.9113  0.081  0.00   0.000E+00      0.  0.681E+00  0.963E-01  0.878E-03  0.529E-04   32  28   1   22  21   8   16  17   9    0.000    0.000       0
+  0   5289 01:20:00.84   0.8960A   2.0090  -0.7802  -0.9341  0.082  0.00   0.000E+00      0.  0.680E+00  0.962E-01  0.877E-03  0.523E-04   32  28   6   20  20   7   16  16   9    0.000    0.000       0
+  0   5295 01:20:06.24   0.9050A   1.9900  -0.6885  -0.8865  0.084  0.00   0.000E+00      0.  0.679E+00  0.962E-01  0.873E-03  0.500E-04   32  28  11   19  19   7   15  16   9    0.000    0.000       0
+  0   5302 01:20:12.60   0.9130A   1.9715  -0.6455  -0.7925  0.086  0.00   0.000E+00      0.  0.678E+00  0.962E-01  0.880E-03  0.504E-04   31  28  17    8  24   9   17  17   9    0.000    0.000       0
+  0   5308 01:20:18.09   0.9160A   1.9649  -0.5961  -0.9179  0.087  0.00   0.000E+00      0.  0.678E+00  0.962E-01  0.874E-03  0.497E-04   35  26  16    3  35  15   17  18   9    0.000    0.000       0
+  0   5315 01:20:24.44   0.8940A   2.0132  -0.6327  -0.9412  0.090  0.00   0.000E+00      0.  0.677E+00  0.961E-01  0.856E-03  0.485E-04   27  20  26    3  35  17   16  19   9    0.000    0.000       0
+  0   5322 01:20:30.63   0.8810A   2.0425  -0.6811  -0.9392  0.092  0.00   0.000E+00      0.  0.677E+00  0.962E-01  0.853E-03  0.523E-04   27  20  30   21  10   9   16  17   9    0.000    0.000       0
+  0   5329 01:20:36.79   0.8740A   2.0585  -0.8729  -0.9209  0.093  0.00   0.000E+00      0.  0.676E+00  0.965E-01  0.855E-03  0.615E-04   27  21  34   20  10   9   15  17   9    0.000    0.000       0
+  0   5335 01:20:42.07   0.8880A   2.0281  -0.7099  -0.9127  0.093  0.00   0.000E+00      0.  0.676E+00  0.969E-01  0.863E-03  0.638E-04   27  21  38   20  10   9   16  16   9    0.000    0.000       0
+  0   5342 01:20:48.36   0.9020A   1.9953   0.6624  -0.8688  0.093  0.00   0.000E+00      0.  0.677E+00  0.976E-01  0.871E-03  0.677E-04   29  24  19    5  35   7   14  17   9    0.000    0.000       0
+  0   5349 01:20:54.66   0.8970A   2.0061   0.6517  -0.8469  0.093  0.00   0.000E+00      0.  0.678E+00  0.986E-01  0.864E-03  0.655E-04   28  24  24    4  35   9   12  18   8    0.000    0.000       0
+  0   5355 01:21:00.04   0.8960A   2.0082  -0.6829  -0.8219  0.093  0.00   0.000E+00      0.  0.679E+00  0.994E-01  0.847E-03  0.586E-04   28  24  29   16  27   7   11  18   8    0.000    0.000       0
+  0   5362 01:21:06.31   0.8930A   2.0147  -0.6783  -0.8042  0.093  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.819E-03  0.481E-04   27  24  33   16  26   8    8  19   7    0.000    0.000       0
+  0   5369 01:21:12.53   0.8860A   2.0309  -0.7768  -0.7869  0.092  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.796E-03  0.429E-04   27  24  38    9  26   9    8  19   6    0.000    0.000       0
+  0   5376 01:21:18.74   0.8880A   2.0260  -0.9063  -0.7553  0.092  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.799E-03  0.435E-04   27  24   3   11  26   9    7  19   5    0.000    0.000       0
+  0   5382 01:21:24.09   0.8930A   2.0154  -0.8777  -0.9130  0.093  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.803E-03  0.448E-04   32  21  35   12  25   9   17  18   9    0.000    0.000       0
+  0   5389 01:21:30.34   0.8910A   2.0203  -0.9151  -1.0411  0.094  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.801E-03  0.469E-04   31  16  39    7  25   9   16  18   9    0.000    0.000       0
+  0   5396 01:21:36.58   0.8920A   2.0191  -0.8918  -0.9902  0.094  0.00   0.000E+00      0.  0.679E+00  0.102E+00  0.785E-03  0.406E-04   30  29  18    7  24   9   15  18   9    0.000    0.000       0
+  0   5403 01:21:42.79   0.8850A   2.0347  -0.8116  -0.8965  0.094  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.766E-03  0.375E-04   29  28  24    5  24   9   14  18   9    0.000    0.000       0
+  0   5409 01:21:48.08   0.8790A   2.0473  -0.8413  -0.8107  0.095  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.765E-03  0.415E-04   29  27  28    5  26   9   17  21   9    0.000    0.000       0
+  0   5416 01:21:54.22   0.8750A   2.0569  -0.9005  -1.0032  0.096  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.771E-03  0.439E-04   29  27  33    5  26   9   17  22   9    0.000    0.000       0
+  0   5423 01:22:00.33   0.8730A   2.0611  -0.8527  -1.0182  0.096  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.768E-03  0.416E-04   29  27  39    6  24   9   16  22   9    0.000    0.000       0
+  0   5430 01:22:06.45   0.8740A   2.0606  -0.8687  -0.9521  0.095  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.773E-03  0.444E-04   29  27   4    3  26   9   15  22   9    0.000    0.000       0
+  0   5437 01:22:12.59   0.8810A   2.0437  -0.8520  -0.8606  0.095  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.780E-03  0.469E-04   30  27   9    3  26   9   14  22   9    0.000    0.000       0
+  0   5444 01:22:18.74   0.8770A   2.0532  -0.7988  -0.7754  0.094  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.771E-03  0.459E-04   30  27  14    3  25   9   14  23   9    0.000    0.000       0
+  0   5450 01:22:24.01   0.8770A   2.0532   0.7345  -0.6989  0.093  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.763E-03  0.435E-04   30  27  19   14  14   9   13  22   9    0.000    0.000       0
+  0   5457 01:22:30.16   0.8790A   2.0469   0.7105   0.6293  0.092  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.755E-03  0.397E-04   31  27  24   15  14   9   18  11   9    0.000    0.000       0
+  0   5464 01:22:36.32   0.8800A   2.0452   0.6673  -0.6578  0.092  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.755E-03  0.382E-04   31  27  29   14  15   9   17  20   9    0.000    0.000       0
+  0   5471 01:22:42.48   0.8830A   2.0396   0.7304  -0.7299  0.091  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.761E-03  0.390E-04   31  27  35   10  13   9   17  20   9    0.000    0.000       0
+  0   5478 01:22:48.68   0.8840A   2.0363   0.8266   0.9067  0.090  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.784E-03  0.487E-04   32  27   0   10  14   9   20  29   9    0.000    0.000       0
+  0   5485 01:22:54.86   0.8820A   2.0419  -0.8327   0.9861  0.090  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.819E-03  0.602E-04   31  26   6   16  27   9   20  28   9    0.000    0.000       0
+  0   5491 01:23:00.12   0.8770A   2.0531  -0.9159   0.9025  0.089  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.828E-03  0.629E-04   31  26  11   14  27   9   20  27   9    0.000    0.000       0
+  0   5498 01:23:06.24   0.8720A   2.0641   0.9270  -0.8512  0.090  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.816E-03  0.582E-04   32  26  15   21  29   8   16  22   9    0.000    0.000       0
+  0   5505 01:23:12.34   0.8720A   2.0652   0.8822  -0.9179  0.091  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.810E-03  0.525E-04   32  26  21   22  31  10   16  22   9    0.000    0.000       0
+  0   5512 01:23:18.44   0.8710A   2.0671   0.9264  -0.8567  0.092  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.805E-03  0.511E-04   32  24  37   19  30   9   15  22   9    0.000    0.000       0
+  0   5519 01:23:24.52   0.8650A   2.0805   0.8403  -0.8122  0.092  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.772E-03  0.474E-04   31  24   3   21  33  14   12  20   8    0.000    0.000       0
+  0   5526 01:23:30.54   0.8570A   2.1010   0.7431  -0.8139  0.090  0.00   0.000E+00      0.  0.678E+00  0.105E+00  0.754E-03  0.485E-04   32  25   9   21  34  17   11  22   6    0.000    0.000       0
+  0   5533 01:23:36.49   0.8460A   2.1273  -0.6941  -0.8067  0.087  0.00   0.000E+00      0.  0.679E+00  0.105E+00  0.748E-03  0.485E-04   32  25  14   12  23   9   10  21   5    0.000    0.000       0
+  0   5540 01:23:42.39   0.8420A   2.1381  -0.6689   0.8765  0.086  0.00   0.000E+00      0.  0.679E+00  0.106E+00  0.754E-03  0.460E-04   32  25  19   11  24   8   21  12   9    0.000    0.000       0
+  0   5547 01:23:48.28   0.8450A   2.1313  -0.7631  -0.9441  0.086  0.00   0.000E+00      0.  0.678E+00  0.106E+00  0.776E-03  0.453E-04   32  24  25   23  11   7   17  19   9    0.000    0.000       0
+  0   5554 01:23:54.19   0.8440A   2.1323  -0.7571  -1.1061  0.086  0.00   0.000E+00      0.  0.678E+00  0.106E+00  0.792E-03  0.483E-04   33  26  29   24  10  10   16  18   9    0.000    0.000       0
+  0   5561 01:24:00.13   0.8530A   2.1112  -0.8206  -1.1136  0.086  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.805E-03  0.505E-04   33  26  34   20  14   9   16  19   9    0.000    0.000       0
+  0   5568 01:24:06.14   0.8610A   2.0907   0.8399  -1.1142  0.087  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.812E-03  0.494E-04   28  21  39   20  30   8   16  22   9    0.000    0.000       0
+  0   5575 01:24:12.15   0.8580A   2.0973   0.8428  -1.1522  0.088  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.801E-03  0.442E-04   28  21   4   20  31   9   16  23   9    0.000    0.000       0
+  0   5582 01:24:18.16   0.8580A   2.0968   0.6626  -0.9650  0.088  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.784E-03  0.418E-04   29  21  11   21  32  16   15  23   9    0.000    0.000       0
+  0   5589 01:24:24.18   0.8610A   2.0909   0.6090  -0.8581  0.087  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.781E-03  0.433E-04   29  21  16   21  33  19   15  23   9    0.000    0.000       0
+  0   5596 01:24:30.23   0.8690A   2.0721  -0.6862  -0.7604  0.087  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.783E-03  0.423E-04   29  21  22   18  25   7    6  18   6    0.000    0.000       0
+  0   5603 01:24:36.34   0.8730A   2.0609  -0.6917  -0.7254  0.087  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.791E-03  0.460E-04   30  21  27   17  24   7    4  18   6    0.000    0.000       0
+  0   5610 01:24:42.47   0.8790A   2.0480  -0.6614  -0.6977  0.087  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.803E-03  0.506E-04   30  21  32   12  27   9    4  17   6    0.000    0.000       0
+  0   5617 01:24:48.66   0.8890A   2.0239  -0.7953   0.6613  0.086  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.811E-03  0.507E-04   28  20  13   11  27   9   20  13   9    0.000    0.000       0
+  0   5624 01:24:54.84   0.8770A   2.0524  -0.8736   0.7362  0.085  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.792E-03  0.422E-04   24  23  19   11  26   9   20  10   9    0.000    0.000       0
+  0   5630 01:25:00.05   0.8620A   2.0890  -0.8712   0.6980  0.085  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.783E-03  0.437E-04   25  23  24   10  25   9   20  11   9    0.000    0.000       0
+  0   5637 01:25:06.01   0.8470A   2.1248  -0.8127  -0.6935  0.086  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.787E-03  0.510E-04   25  23  30   10  25   9   17  25   9    0.000    0.000       0
+  0   5645 01:25:12.74   0.8390A   2.1465   0.7636  -0.8837  0.088  0.00   0.000E+00      0.  0.678E+00  0.110E+00  0.784E-03  0.531E-04   25  23  36   17  30   9   17  27   9    0.000    0.000       0
+  0   5652 01:25:18.60   0.8380A   2.1477   0.7591  -0.8451  0.089  0.00   0.000E+00      0.  0.679E+00  0.110E+00  0.781E-03  0.510E-04   25  23   0   13  15   9   17  24   9    0.000    0.000       0
+  0   5659 01:25:24.49   0.8460A   2.1282   0.8293  -0.8280  0.090  0.00   0.000E+00      0.  0.679E+00  0.111E+00  0.795E-03  0.488E-04   25  23   5   12  15   9    7  10   9    0.000    0.000       0
+  0   5666 01:25:30.42   0.8480A   2.1230   0.9365  -0.8720  0.091  0.00   0.000E+00      0.  0.679E+00  0.111E+00  0.800E-03  0.449E-04   27  19  11   12  15   9    7  11   9    0.000    0.000       0
+  0   5673 01:25:36.40   0.8580A   2.0977   0.9788  -0.8308  0.091  0.00   0.000E+00      0.  0.679E+00  0.110E+00  0.824E-03  0.463E-04   27  18  16   13  15   9    6  11   9    0.000    0.000       0
+  0   5680 01:25:42.45   0.8730A   2.0622   0.9493  -0.7791  0.090  0.00   0.000E+00      0.  0.678E+00  0.110E+00  0.843E-03  0.489E-04   27  18  21   12  16   9    6  11   9    0.000    0.000       0
+  0   5687 01:25:48.64   0.8890A   2.0248   0.9021  -0.7361  0.089  0.00   0.000E+00      0.  0.677E+00  0.110E+00  0.849E-03  0.486E-04   26  22  23   12  17   9    6  12   9    0.000    0.000       0
+  0   5693 01:25:54.01   0.9000A   2.0009   0.8326  -0.7406  0.088  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.848E-03  0.472E-04   26  22  26   11  18   9    7  12   9    0.000    0.000       0
+  0   5700 01:26:00.30   0.9000A   2.0009  -0.8148  -0.7296  0.087  0.00   0.000E+00      0.  0.676E+00  0.109E+00  0.852E-03  0.502E-04   26  21  32   10  27   9    6  13   9    0.000    0.000       0
+  0   5707 01:26:06.62   0.9080A   1.9813  -0.8537  -0.6848  0.084  0.00   0.000E+00      0.  0.676E+00  0.109E+00  0.869E-03  0.504E-04   26  21  36    9  27   9    5  13   9    0.000    0.000       0
+  0   5713 01:26:12.03   0.8920A   2.0180  -0.8441   0.6526  0.081  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.863E-03  0.543E-04   27  17  12    8  27   9   20  11   9    0.000    0.000       0
+  0   5720 01:26:18.25   0.8880A   2.0264   0.8015   0.6681  0.079  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.860E-03  0.571E-04   27  17  17   11  14   3   10   5   0    0.000    0.000       0
+  0   5727 01:26:24.45   0.8810A   2.0441   0.7829  -0.6503  0.078  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.842E-03  0.542E-04   26  16  20   10  14   5    9  19   5    0.000    0.000       0
+  0   5734 01:26:30.60   0.8800A   2.0465  -0.7133  -0.6820  0.080  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.828E-03  0.519E-04   26  16  25   19  10   9    7  14   9    0.000    0.000       0
+  0   5741 01:26:36.81   0.8920A   2.0187  -0.7617  -0.9138  0.081  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.840E-03  0.556E-04   26  16  30   19  10   9    7  13   9    0.000    0.000       0
+  0   5747 01:26:42.18   0.8950A   2.0115   0.8385  -0.9906  0.083  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.834E-03  0.555E-04   27  26  20   13  14   9    6  14   9    0.000    0.000       0
+  0   5754 01:26:48.45   0.8940A   2.0124   0.8263  -0.9423  0.083  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.819E-03  0.523E-04   28  15   1   13  16   9    5  14   9    0.000    0.000       0
+  0   5761 01:26:54.71   0.8960A   2.0085   0.7704  -0.8105  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.803E-03  0.450E-04   28  15   6   13  17   9    4  15   9    0.000    0.000       0
+  0   5767 01:27:00.09   0.8970A   2.0063  -0.7343  -0.6925  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.806E-03  0.445E-04   28  15  11   14  27   9    4  15   9    0.000    0.000       0
+  0   5774 01:27:06.39   0.9030A   1.9944  -0.8415   0.6719  0.081  0.00   0.000E+00      0.  0.679E+00  0.108E+00  0.822E-03  0.482E-04   28  15  17   14  26   9   18  10   9    0.000    0.000       0
+  0   5781 01:27:12.70   0.8980A   2.0051  -0.8750   0.7930  0.080  0.00   0.000E+00      0.  0.679E+00  0.108E+00  0.822E-03  0.487E-04   28  21  35   14  26   9   20  11   9    0.000    0.000       0
+  0   5787 01:27:18.10   0.9030A   1.9934  -0.9074   0.8161  0.079  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.827E-03  0.503E-04   28  21  39   14  25   9   20  12   9    0.000    0.000       0
+  0   5794 01:27:24.42   0.9060A   1.9863  -0.8851  -0.8586  0.079  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.824E-03  0.501E-04   28  21   5   13  25   9    8  28   9    0.000    0.000       0
+  0   5801 01:27:30.77   0.9080A   1.9817  -0.8205  -0.8542  0.079  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.825E-03  0.496E-04   28  21  10   12  24   9    7  27   9    0.000    0.000       0
+  0   5807 01:27:36.24   0.9130A   1.9720  -0.7607  -0.7984  0.079  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.837E-03  0.527E-04   28  21  14   12  24   9    6  27   9    0.000    0.000       0
+  0   5814 01:27:42.67   0.9250A   1.9464   0.8585  -0.7188  0.079  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.852E-03  0.529E-04   28  21  20   21  19   8    5  27   9    0.000    0.000       0
+  0   5820 01:27:48.26   0.9340A   1.9280  -0.7811   0.6636  0.080  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.876E-03  0.600E-04   31  17  26   20  12   9   13  25  30    0.000    0.000       0
+  0   5827 01:27:54.79   0.9330A   1.9289  -0.7415  -0.7595  0.081  0.00   0.000E+00      0.  0.673E+00  0.106E+00  0.891E-03  0.655E-04   27  14  24   19  12   9   18  14   9    0.000    0.000       0
+  0   5833 01:28:00.39   0.9350A   1.9249  -0.7346  -0.8004  0.080  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.893E-03  0.680E-04   27  13  28   14  26   9   16  15   9    0.000    0.000       0
+  0   5839 01:28:06.00   0.9360A   1.9228  -0.8139   0.7577  0.080  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.905E-03  0.720E-04   31  18   1   14  25   9   20  27   9    0.000    0.000       0
+  0   5846 01:28:12.54   0.9310A   1.9324  -0.9101  -0.7454  0.080  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.904E-03  0.693E-04   29  17  28   13  26   9    9  24   9    0.000    0.000       0
+  0   5852 01:28:18.10   0.9230A   1.9493  -0.9753  -0.8312  0.081  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.888E-03  0.626E-04   30  18  32   12  24   9   10  26   9    0.000    0.000       0
+  0   5859 01:28:24.51   0.9130A   1.9710  -0.9134  -0.9022  0.080  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.870E-03  0.596E-04   30  18  38   12  23   9    8  25   9    0.000    0.000       0
+  0   5866 01:28:30.90   0.9130A   1.9712  -0.9576  -0.8960  0.079  0.00   0.000E+00      0.  0.679E+00  0.107E+00  0.838E-03  0.516E-04   30  18   3   14  25   9    8  25   9    0.000    0.000       0
+  0   5872 01:28:36.39   0.9150A   1.9665  -1.0062  -0.8404  0.078  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.822E-03  0.471E-04   30  18   8   15  25   9    7  24   9    0.000    0.000       0
+  0   5879 01:28:42.83   0.9240A   1.9489  -0.9809  -0.7346  0.078  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.835E-03  0.500E-04   30  18  14   15  23   9    6  23   9    0.000    0.000       0
+  0   5885 01:28:48.35   0.9150A   1.9681  -0.8863  -0.6531  0.079  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.823E-03  0.481E-04   27  24   9   15  22   9    6  15   8    0.000    0.000       0
+  0   5892 01:28:54.72   0.9070A   1.9840  -0.9207  -0.6700  0.080  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.821E-03  0.479E-04   27  24  14   19  25   8   11  21   3    0.000    0.000       0
+  0   5898 01:29:00.15   0.9030A   1.9941  -0.9701  -0.6791  0.082  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.828E-03  0.503E-04   27  23  18   19  24   9   11  21   3    0.000    0.000       0
+  0   5905 01:29:06.48   0.9100A   1.9781  -0.8778  -0.6926  0.083  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.861E-03  0.607E-04   27  23  23   18  24   9   15  27   9    0.000    0.000       0
+  0   5912 01:29:12.90   0.9220A   1.9525   0.8246  -0.7156  0.084  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.884E-03  0.667E-04   27  18   1   20  30   9   14  26   9    0.000    0.000       0
+  0   5918 01:29:18.45   0.9260A   1.9430   0.8332  -0.7721  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.883E-03  0.610E-04   26  22  32   19  31   9   16  22   6    0.000    0.000       0
+  0   5924 01:29:24.02   0.9310A   1.9341   0.7244  -0.8498  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.873E-03  0.511E-04   26  22  37   19  31   9   16  22   8    0.000    0.000       0
+  0   5931 01:29:30.58   0.9440A   1.9061  -0.7638  -0.9683  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.894E-03  0.507E-04   30  19   3   19  15   9   15  20   9    0.000    0.000       0
+  0   5937 01:29:36.24   0.9430A   1.9079  -0.7574  -0.9599  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.901E-03  0.547E-04   30  19   7   18  25   7   13  20   9    0.000    0.000       0
+  0   5944 01:29:42.80   0.9330A   1.9285  -0.7946  -0.9513  0.085  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.884E-03  0.538E-04   29  20  13   18  24   8   11  18   8    0.000    0.000       0
+  0   5950 01:29:48.39   0.9300A   1.9355  -0.7658  -0.9569  0.085  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.872E-03  0.518E-04   29  20  18   16  23   8    9  18   8    0.000    0.000       0
+  0   5957 01:29:54.91   0.9310A   1.9344  -0.7433  -0.9876  0.085  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.873E-03  0.530E-04   29  20  23   15  21   8    8  17   8    0.000    0.000       0
+  0   5963 01:30:00.49   0.9300A   1.9348  -0.7194  -0.9482  0.085  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.877E-03  0.541E-04   33  18  27   12  21   7    6  17   8    0.000    0.000       0
+  0   5969 01:30:06.07   0.9290A   1.9372  -0.8717  -0.8959  0.085  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.884E-03  0.571E-04   33  18  32   13  27   9    9  18   8    0.000    0.000       0
+  0   5976 01:30:12.56   0.9290A   1.9379  -1.0171  -0.8798  0.085  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.885E-03  0.593E-04   33  18  37   13  25   9    8  17   8    0.000    0.000       0
+  0   5982 01:30:18.15   0.9320A   1.9322  -1.0128  -0.8218  0.086  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.895E-03  0.630E-04   32  19   1   12  23   9    6  17   8    0.000    0.000       0
+  0   5989 01:30:24.63   0.9200A   1.9574  -0.9772   0.8323  0.086  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.898E-03  0.632E-04   28  19  20   11  21   9   10  11   1    0.000    0.000       0
+  0   5995 01:30:30.12   0.9120A   1.9727  -0.8950   0.8380  0.086  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.910E-03  0.626E-04   28  19  24   10  20   9   11  12   1    0.000    0.000       0
+  0   6002 01:30:36.49   0.9100A   1.9785  -0.7925  -0.7746  0.087  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.928E-03  0.608E-04   28  19  28    9  24   8   10  12   9    0.000    0.000       0
+  0   6009 01:30:42.93   0.9310A   1.9344   0.7814  -0.7763  0.087  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.955E-03  0.552E-04   28  19  33   12  13   8    9  11   9    0.000    0.000       0
+  0   6015 01:30:48.52   0.9310A   1.9343   0.8955  -0.7993  0.087  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.958E-03  0.532E-04   31  18  28   12  13   8    9  12   9    0.000    0.000       0
+  0   6021 01:30:54.10   0.9310A   1.9333   0.8846  -0.7270  0.086  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.957E-03  0.556E-04   31  18  32   11  13   9    9  13   9    0.000    0.000       0
+  0   6028 01:31:00.64   0.9350A   1.9245   0.8788  -0.7197  0.085  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.947E-03  0.521E-04   29  13  14   10  13   9   11  16   6    0.000    0.000       0
+  0   6034 01:31:06.24   0.9320A   1.9322   0.8621  -0.6726  0.086  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.926E-03  0.509E-04   27  16  19   10  14   9   14  22   9    0.000    0.000       0
+  0   6041 01:31:12.76   0.9300A   1.9361   0.8221  -0.6671  0.087  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.916E-03  0.530E-04   30  18   9   10  15   9   10  17   6    0.000    0.000       0
+  0   6047 01:31:18.32   0.9270A   1.9422   0.8350  -0.7653  0.088  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.895E-03  0.510E-04   30  18  13   10  15   9   18  15   9    0.000    0.000       0
+  0   6054 01:31:24.81   0.9270A   1.9416   0.8165  -0.8657  0.089  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.887E-03  0.523E-04   29  16  34   10  16   9   17  16   9    0.000    0.000       0
+  0   6060 01:31:30.35   0.9220A   1.9518   0.7751  -0.7585  0.090  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.866E-03  0.502E-04   29  16  38    9  16   9   16  16   9    0.000    0.000       0
+  0   6067 01:31:36.77   0.9140A   1.9703   0.7356  -0.7818  0.090  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.852E-03  0.523E-04   29  16   4    8  16   9   16  22   9    0.000    0.000       0
+  0   6073 01:31:42.25   0.9140A   1.9690  -0.7324  -0.8013  0.091  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.849E-03  0.529E-04   29  16   9   16  27   9   16  22   9    0.000    0.000       0
+  0   6080 01:31:48.67   0.9190A   1.9576  -0.7683  -0.7447  0.092  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.841E-03  0.495E-04   30  17  35   16  27   9   16  23   9    0.000    0.000       0
+  0   6086 01:31:54.18   0.9180A   1.9614  -0.7161  -0.6994  0.091  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.843E-03  0.557E-04   30  17  39   16  27   9   17  20   9    0.000    0.000       0
+  0   6093 01:32:00.63   0.9240A   1.9486  -0.6131   0.7510  0.089  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.855E-03  0.638E-04   30  17   4   15  26   9   20  11   9    0.000    0.000       0
+  0   6099 01:32:06.20   0.9320A   1.9310   0.6050  -0.7039  0.088  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.854E-03  0.611E-04   30  17   9    7  16   9   16  22   9    0.000    0.000       0
+  0   6106 01:32:12.77   0.9410A   1.9127   0.6316  -0.6624  0.086  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.860E-03  0.567E-04   35  17   6    6  16   9   12  22   8    0.000    0.000       0
+  0   6112 01:32:18.42   0.9410A   1.9136   0.7061  -0.6623  0.085  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.857E-03  0.497E-04   35  17  11    8  13   9   12  22   8    0.000    0.000       0
+  0   6118 01:32:24.07   0.9440A   1.9074   0.8475  -0.6594  0.085  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.867E-03  0.466E-04   35  17  16    7  14   9    9  21   7    0.000    0.000       0
+  0   6125 01:32:30.70   0.9490A   1.8958   0.9167  -0.6678  0.084  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.887E-03  0.509E-04   35  17  21   11  14   9   10  22   7    0.000    0.000       0
+  0   6131 01:32:36.42   0.9560A   1.8836   0.8743  -0.7102  0.084  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.896E-03  0.532E-04   35  17  26    7  15   9   17  16   9    0.000    0.000       0
+  0   6137 01:32:42.15   0.9550A   1.8845   0.8654  -0.7058  0.086  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.899E-03  0.498E-04   34  16  38   20  28   8   17  16   9    0.000    0.000       0
+  0   6144 01:32:48.81   0.9440A   1.9068   0.8756  -0.8155  0.089  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.899E-03  0.457E-04   25  21  20   20  29   9   17  22   9    0.000    0.000       0
+  0   6150 01:32:54.42   0.9300A   1.9364  -0.7182  -0.9393  0.091  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.874E-03  0.403E-04   25  21  24   18   9   9   17  23   9    0.000    0.000       0
+  0   6157 01:33:00.90   0.9170A   1.9629   0.6916  -0.8984  0.091  0.00   0.000E+00      0.  0.672E+00  0.993E-01  0.858E-03  0.446E-04   26  26  14   19  28   9   16  23   9    0.000    0.000       0
+  0   6163 01:33:06.36   0.9070A   1.9852   0.6644  -0.8669  0.092  0.00   0.000E+00      0.  0.671E+00  0.987E-01  0.849E-03  0.475E-04   26  26  18   13  14   9   16  23   9    0.000    0.000       0
+  0   6170 01:33:12.70   0.9050A   1.9888   0.6588  -0.7853  0.091  0.00   0.000E+00      0.  0.670E+00  0.983E-01  0.845E-03  0.470E-04   26  26  23   13  15   9   15  21   9    0.000    0.000       0
+  0   6176 01:33:18.16   0.9160A   1.9655   0.7497   0.7412  0.090  0.00   0.000E+00      0.  0.670E+00  0.978E-01  0.855E-03  0.454E-04   27  27  28   17  13   9   21  12   9    0.000    0.000       0
+  0   6183 01:33:24.58   0.9120A   1.9728   0.6895  -0.7299  0.089  0.00   0.000E+00      0.  0.669E+00  0.972E-01  0.847E-03  0.435E-04   28  28  34   16  15   9   17  19   9    0.000    0.000       0
+  0   6189 01:33:30.04   0.9100A   1.9771  -0.6717  -0.7625  0.089  0.00   0.000E+00      0.  0.669E+00  0.966E-01  0.844E-03  0.418E-04   28  28  38    3   4   0   16  19   9    0.000    0.000       0
+  0   6196 01:33:36.38   0.9100A   1.9787   0.7729  -0.7411  0.088  0.00   0.000E+00      0.  0.668E+00  0.960E-01  0.831E-03  0.405E-04   28  28   4   12  13   9   16  19   9    0.000    0.000       0
+  0   6203 01:33:42.77   0.9160A   1.9655   0.7985  -0.6580  0.087  0.00   0.000E+00      0.  0.667E+00  0.953E-01  0.821E-03  0.422E-04   28  28   9   12  14   9   15  19   9    0.000    0.000       0
+  0   6209 01:33:48.29   0.9200A   1.9556   0.7708   0.6104  0.086  0.00   0.000E+00      0.  0.667E+00  0.952E-01  0.836E-03  0.554E-04   34  13  12   12  15   9   20  29   9    0.000    0.000       0
+  0   6216 01:33:54.74   0.9200A   1.9571   0.7287   0.7064  0.086  0.00   0.000E+00      0.  0.668E+00  0.957E-01  0.830E-03  0.609E-04   34  12  18   11  16   9   20  28   9    0.000    0.000       0
+  0   6222 01:34:00.24   0.9160A   1.9653   0.7116   0.6636  0.086  0.00   0.000E+00      0.  0.668E+00  0.960E-01  0.825E-03  0.602E-04   34  12  23   21  31   7   20  29   9    0.000    0.000       0
+  0   6229 01:34:06.65   0.9170A   1.9622   0.7669  -0.6786  0.087  0.00   0.000E+00      0.  0.669E+00  0.964E-01  0.829E-03  0.558E-04   34  12  30   20  30   8   17  18   9    0.000    0.000       0
+  0   6235 01:34:12.16   0.9160A   1.9649   0.8569  -0.8982  0.088  0.00   0.000E+00      0.  0.670E+00  0.964E-01  0.831E-03  0.539E-04   34  11  33   20  31   9   17  17   9    0.000    0.000       0
+  0   6242 01:34:18.56   0.9150A   1.9662   0.7583  -0.8780  0.089  0.00   0.000E+00      0.  0.670E+00  0.960E-01  0.811E-03  0.510E-04   34  11  39   19  31   9   16  17   9    0.000    0.000       0
+  0   6248 01:34:24.07   0.9200A   1.9558   0.6987  -0.8001  0.089  0.00   0.000E+00      0.  0.669E+00  0.956E-01  0.784E-03  0.484E-04   34  11   5   19  31   9   16  21   9    0.000    0.000       0
+  0   6255 01:34:30.54   0.9260A   1.9445   0.6825  -0.7881  0.088  0.00   0.000E+00      0.  0.669E+00  0.952E-01  0.771E-03  0.491E-04   34  10  10   19  31   9   15  19   8    0.000    0.000       0
+  0   6261 01:34:36.10   0.9270A   1.9428   0.7828  -0.7729  0.087  0.00   0.000E+00      0.  0.669E+00  0.951E-01  0.767E-03  0.518E-04   34  10  15   17  13   9   14  19   8    0.000    0.000       0
+  0   6268 01:34:42.60   0.9310A   1.9342   0.8069  -0.7790  0.087  0.00   0.000E+00      0.  0.669E+00  0.950E-01  0.759E-03  0.493E-04   35  10  21   16  14   9   12  20   8    0.000    0.000       0
+  0   6274 01:34:48.19   0.9330A   1.9287   0.7949  -0.7954  0.086  0.00   0.000E+00      0.  0.669E+00  0.950E-01  0.758E-03  0.477E-04   35  10  26   15  15   9   11  20   7    0.000    0.000       0
+  0   6281 01:34:54.74   0.9360A   1.9222   0.7403  -0.8197  0.086  0.00   0.000E+00      0.  0.669E+00  0.951E-01  0.762E-03  0.466E-04   35   9  31   14  16   9    9  20   7    0.000    0.000       0
+  0   6287 01:35:00.37   0.9400A   1.9145  -0.8447  -0.8290  0.086  0.00   0.000E+00      0.  0.669E+00  0.951E-01  0.761E-03  0.443E-04   35   9  36   17  27   9    8  19   7    0.000    0.000       0
+  0   6294 01:35:06.92   0.9330A   1.9288  -0.9117  -0.8590  0.087  0.00   0.000E+00      0.  0.669E+00  0.947E-01  0.745E-03  0.416E-04   31  29  20   18  27   9    7  19   7    0.000    0.000       0
+  0   6300 01:35:12.51   0.9290A   1.9376  -0.8316  -0.8769  0.088  0.00   0.000E+00      0.  0.668E+00  0.942E-01  0.731E-03  0.406E-04   31  29  25   17  26   9    6  19   7    0.000    0.000       0
+  0   6306 01:35:18.07   0.9260A   1.9439   0.7082  -0.8905  0.087  0.00   0.000E+00      0.  0.668E+00  0.938E-01  0.722E-03  0.401E-04   31  29  30   12  14   9    6  19   8    0.000    0.000       0
+  0   6313 01:35:24.54   0.9240A   1.9478   0.7050  -0.8538  0.087  0.00   0.000E+00      0.  0.668E+00  0.936E-01  0.734E-03  0.489E-04   31  29  36   12  15   9    5  19   8    0.000    0.000       0
+  0   6319 01:35:30.09   0.9240A   1.9470   0.7087  -0.7986  0.086  0.00   0.000E+00      0.  0.669E+00  0.938E-01  0.740E-03  0.524E-04   30  28   0   11  14   9    4  19   8    0.000    0.000       0
+  0   6326 01:35:36.57   0.9270A   1.9411   0.8267  -0.7050  0.086  0.00   0.000E+00      0.  0.669E+00  0.937E-01  0.734E-03  0.472E-04   30  28   5   10  14   9    3  19   8    0.000    0.000       0
+  0   6332 01:35:42.14   0.9300A   1.9362   0.8649  -0.7357  0.087  0.00   0.000E+00      0.  0.669E+00  0.933E-01  0.729E-03  0.436E-04   32  28  11   10  15   9    7  27   9    0.000    0.000       0
+  0   6339 01:35:48.66   0.9310A   1.9332   0.8083  -0.7492  0.087  0.00   0.000E+00      0.  0.669E+00  0.930E-01  0.717E-03  0.421E-04   32  28  17   10  16   9    6  27   9    0.000    0.000       0
+  0   6345 01:35:54.25   0.9320A   1.9304   0.7131  -0.7606  0.086  0.00   0.000E+00      0.  0.669E+00  0.929E-01  0.716E-03  0.441E-04   32  28  22   10  16   9    5  27   9    0.000    0.000       0
+  0   6352 01:36:00.78   0.9330A   1.9295  -0.7018   0.7103  0.085  0.00   0.000E+00      0.  0.669E+00  0.928E-01  0.722E-03  0.473E-04   31  29  28   10  27   8   20  29   9    0.000    0.000       0
+  0   6358 01:36:06.38   0.9340A   1.9278  -0.7741   0.8692  0.084  0.00   0.000E+00      0.  0.669E+00  0.928E-01  0.718E-03  0.484E-04   30  29  33   11  26   8   20  28   9    0.000    0.000       0
+  0   6365 01:36:12.92   0.9340A   1.9262  -0.8439   0.7122  0.084  0.00   0.000E+00      0.  0.669E+00  0.931E-01  0.712E-03  0.506E-04   30  29  39   11  26   9   20  26   9    0.000    0.000       0
+  0   6371 01:36:18.54   0.9360A   1.9238  -0.8312  -0.5698  0.084  0.00   0.000E+00      0.  0.670E+00  0.934E-01  0.709E-03  0.498E-04   30  29   4   11  25   9    5  23   8    0.000    0.000       0
+  0   6377 01:36:24.15   0.9360A   1.9236  -0.7762  -0.5405  0.083  0.00   0.000E+00      0.  0.670E+00  0.936E-01  0.697E-03  0.464E-04   30  29   9   12  25   9    4  22   8    0.000    0.000       0
+  0   6384 01:36:30.70   0.9360A   1.9229  -0.7790  -0.6126  0.084  0.00   0.000E+00      0.  0.671E+00  0.936E-01  0.683E-03  0.443E-04   30  29  14   11  25   9   14  24   4    0.000    0.000       0
+  0   6390 01:36:36.31   0.9360A   1.9221  -0.7904  -0.6601  0.084  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.672E-03  0.431E-04   30  29  19   11  25   9   13  23   3    0.000    0.000       0
+  0   6397 01:36:42.87   0.9390A   1.9177  -0.7909  -0.7082  0.083  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.672E-03  0.437E-04   30  29  25   11  25   9   12  23   4    0.000    0.000       0
+  0   6403 01:36:48.52   0.9430A   1.9093  -0.7717  -0.7329  0.083  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.672E-03  0.435E-04   30  29  30   11  24   9   11  23   4    0.000    0.000       0
+  0   6409 01:36:54.19   0.9470A   1.9006  -0.7272  -0.6938  0.083  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.676E-03  0.439E-04   30  29  35   11  24   9   10  23   4    0.000    0.000       0
+  0   6416 01:37:00.83   0.9500A   1.8948  -0.6711  -0.6298  0.083  0.00   0.000E+00      0.  0.670E+00  0.938E-01  0.683E-03  0.439E-04   31  29   1   11  23   9   10  23   4    0.000    0.000       0
+  0   6422 01:37:06.53   0.9470A   1.9007  -0.6307  -0.7407  0.084  0.00   0.000E+00      0.  0.671E+00  0.943E-01  0.698E-03  0.467E-04   36  26   0   11  23   9   17  22   9    0.000    0.000       0
+  0   6428 01:37:12.19   0.9410A   1.9132   0.6011  -0.8974  0.085  0.00   0.000E+00      0.  0.671E+00  0.946E-01  0.704E-03  0.455E-04   36  26   4   20  28   9   17  21   9    0.000    0.000       0
+  0   6435 01:37:18.71   0.9260A   1.9440   0.5997  -0.9549  0.085  0.00   0.000E+00      0.  0.671E+00  0.947E-01  0.705E-03  0.451E-04   29  29  19   20  27   9   16  21   9    0.000    0.000       0
+  0   6441 01:37:24.24   0.9180A   1.9599  -0.6510  -0.9653  0.085  0.00   0.000E+00      0.  0.671E+00  0.947E-01  0.708E-03  0.481E-04   29  29  23    8  27   9   16  20   9    0.000    0.000       0
+  0   6448 01:37:30.65   0.9140A   1.9683  -0.6832  -0.9251  0.085  0.00   0.000E+00      0.  0.671E+00  0.949E-01  0.722E-03  0.546E-04   29  29  28    7  27   9   16  19   9    0.000    0.000       0
+  0   6454 01:37:36.13   0.9100A   1.9771  -0.6660  -0.8460  0.085  0.00   0.000E+00      0.  0.672E+00  0.952E-01  0.723E-03  0.549E-04   37  25  23   20  21   8   15  19   9    0.000    0.000       0
+  0   6461 01:37:42.49   0.9080A   1.9819   0.6937  -0.7301  0.085  0.00   0.000E+00      0.  0.672E+00  0.955E-01  0.710E-03  0.430E-04   37  25  28   13  14   9   11  20   8    0.000    0.000       0
+  0   6468 01:37:48.85   0.9100A   1.9789   0.8061  -0.7493  0.085  0.00   0.000E+00      0.  0.672E+00  0.953E-01  0.699E-03  0.367E-04   37  25  34   11  14   9   17  24   9    0.000    0.000       0
+  0   6474 01:37:54.31   0.9100A   1.9791   0.8459  -0.7052  0.084  0.00   0.000E+00      0.  0.671E+00  0.952E-01  0.715E-03  0.407E-04   37  26  37   10  15   9   16  24   9    0.000    0.000       0
+  0   6481 01:38:00.66   0.9030A   1.9944   0.7660  -0.6646  0.082  0.00   0.000E+00      0.  0.671E+00  0.952E-01  0.725E-03  0.451E-04   34  29   2   10  17   9    7  20   6    0.000    0.000       0
+  0   6487 01:38:06.05   0.8940A   2.0126   0.6671  -0.6278  0.082  0.00   0.000E+00      0.  0.671E+00  0.954E-01  0.713E-03  0.453E-04   34  29   7    9  18   8    7  20   5    0.000    0.000       0
+  0   6494 01:38:12.28   0.8870A   2.0294   0.6428  -0.6409  0.080  0.00   0.000E+00      0.  0.671E+00  0.957E-01  0.719E-03  0.498E-04   34  29  12   11  15   9   12  23   8    0.000    0.000       0
+  0   6501 01:38:18.46   0.8800A   2.0448   0.6458  -0.6395  0.080  0.00   0.000E+00      0.  0.672E+00  0.963E-01  0.720E-03  0.510E-04   34  29  18   13  14   9   10  22   8    0.000    0.000       0
+  0   6508 01:38:24.62   0.8830A   2.0387   0.8555  -0.6608  0.081  0.00   0.000E+00      0.  0.672E+00  0.969E-01  0.733E-03  0.502E-04   34  29  23   20  30   9    7  17   7    0.000    0.000       0
+  0   6515 01:38:30.81   0.8840A   2.0353   0.8150  -0.7310  0.082  0.00   0.000E+00      0.  0.673E+00  0.973E-01  0.734E-03  0.458E-04   35  29  29   18  30   9   17  27   9    0.000    0.000       0
+  0   6521 01:38:36.13   0.8880A   2.0279   0.6730  -0.7951  0.083  0.00   0.000E+00      0.  0.673E+00  0.975E-01  0.738E-03  0.462E-04   35  29  34   17  30   9   17  21   9    0.000    0.000       0
+  0   6528 01:38:42.36   0.8920A   2.0178   0.6531  -0.8015  0.083  0.00   0.000E+00      0.  0.673E+00  0.977E-01  0.742E-03  0.470E-04   35  29  39   16  31   9   16  21   9    0.000    0.000       0
+  0   6535 01:38:48.60   0.8910A   2.0210  -0.7032  -0.7844  0.083  0.00   0.000E+00      0.  0.673E+00  0.976E-01  0.760E-03  0.517E-04   36  29   5   12  26   9   17  18   9    0.000    0.000       0
+  0   6542 01:38:54.83   0.8900A   2.0220  -0.7522  -0.7503  0.084  0.00   0.000E+00      0.  0.673E+00  0.977E-01  0.772E-03  0.554E-04   36  29  10   11  26   9   16  18   9    0.000    0.000       0
+  0   6548 01:39:00.19   0.8940A   2.0145  -0.7578   0.7475  0.085  0.00   0.000E+00      0.  0.672E+00  0.979E-01  0.776E-03  0.541E-04   37  29  15   10  25   9   21  12   9    0.000    0.000       0
+  0   6555 01:39:06.46   0.8980A   2.0039  -0.6934  -0.9424  0.086  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.773E-03  0.545E-04   37  29  20    9  24   9   17  25   9    0.000    0.000       0
+  0   6562 01:39:12.78   0.9020A   1.9957  -0.6731  -0.9536  0.086  0.00   0.000E+00      0.  0.672E+00  0.983E-01  0.776E-03  0.556E-04   36  27  33   10  26   9   16  23   9    0.000    0.000       0
+  0   6568 01:39:18.17   0.8980A   2.0046  -0.7120  -0.8558  0.086  0.00   0.000E+00      0.  0.673E+00  0.987E-01  0.781E-03  0.584E-04   36  27  38   10  26   9   15  22   9    0.000    0.000       0
+  0   6575 01:39:24.44   0.8940A   2.0130  -0.7602   0.8443  0.086  0.00   0.000E+00      0.  0.674E+00  0.994E-01  0.793E-03  0.628E-04   36  27   3    9  26   9   22  13   9    0.000    0.000       0
+  0   6582 01:39:30.70   0.8930A   2.0165  -0.8142   0.7791  0.085  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.805E-03  0.661E-04   37  27   7    9  26   9   22  13   9    0.000    0.000       0
+  0   6588 01:39:36.03   0.8880A   2.0276  -0.8742   0.7914  0.084  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.801E-03  0.646E-04   37  27  12    8  25   9   24  13  10    0.000    0.000       0
+  0   6595 01:39:42.24   0.8860A   2.0319  -0.8767  -0.7020  0.084  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.804E-03  0.619E-04   37  27  18    8  25   9   17  18   9    0.000    0.000       0
+  0   6602 01:39:48.45   0.8870A   2.0285  -0.9001  -0.8294  0.084  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.799E-03  0.552E-04   37  27  24   20  11   8   16  18   9    0.000    0.000       0
+  0   6609 01:39:54.67   0.8920A   2.0189  -0.9808  -0.8523  0.084  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.804E-03  0.514E-04   37  27  30   20  10   9   15  18   9    0.000    0.000       0
+  0   6615 01:40:00.03   0.8960A   2.0097  -0.8954  -0.8445  0.086  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.808E-03  0.486E-04   37  27  35   19   9   9   15  20   9    0.000    0.000       0
+  0   6622 01:40:06.32   0.9000A   1.9997  -0.8439  -0.9458  0.087  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.809E-03  0.472E-04   37  27   1   21   7  15   17  23   9    0.000    0.000       0
+  0   6629 01:40:12.64   0.9040A   1.9912  -0.7649  -1.0854  0.088  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.808E-03  0.453E-04   37  26   8   21   6  18   17  24   9    0.000    0.000       0
+  0   6635 01:40:18.06   0.9030A   1.9930  -0.7389  -1.0279  0.088  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.802E-03  0.446E-04   37  26  13   23   6  25   16  24   9    0.000    0.000       0
+  0   6642 01:40:24.38   0.9020A   1.9952  -0.7235  -0.8721  0.088  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.791E-03  0.428E-04   37  26  18   23   5  29   16  25   9    0.000    0.000       0
+  0   6649 01:40:30.69   0.9020A   1.9956   0.7436  -0.6946  0.087  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.788E-03  0.441E-04   37  26  24    3  12   9   16  25   9    0.000    0.000       0
+  0   6655 01:40:36.11   0.9050A   1.9885   0.7241  -0.6872  0.086  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.796E-03  0.476E-04   37  26  29    3  13   9   13  18   8    0.000    0.000       0
+  0   6662 01:40:42.47   0.9120A   1.9743  -0.6801  -0.6708  0.085  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.803E-03  0.523E-04   37  26  34   23   4  39   12  18   8    0.000    0.000       0
+  0   6669 01:40:48.85   0.9090A   1.9799  -0.8154   0.8189  0.082  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.833E-03  0.636E-04   33  29   2    9  26   9   20  28   9    0.000    0.000       0
+  0   6675 01:40:54.30   0.9070A   1.9854  -0.9178   0.9012  0.080  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.856E-03  0.693E-04   33  29   7    9  25   9   20  28   9    0.000    0.000       0
+  0   6682 01:41:00.63   0.9040A   1.9922  -0.9614  -0.8388  0.079  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.840E-03  0.611E-04   33  29  12    9  24   9    5  26   9    0.000    0.000       0
+  0   6688 01:41:06.05   0.9030A   1.9923  -0.8995  -0.7388  0.078  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.831E-03  0.549E-04   33  29  17    9  24   9   11  18   8    0.000    0.000       0
+  0   6695 01:41:12.39   0.9060A   1.9858  -0.8461  -0.7489  0.078  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.841E-03  0.540E-04   33  29  22    8  25   9    9  18   7    0.000    0.000       0
+  0   6702 01:41:18.74   0.9100A   1.9783  -0.8406  -0.9506  0.079  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.855E-03  0.541E-04   33  29  28    8  26   9   17  21   9    0.000    0.000       0
+  0   6708 01:41:24.22   0.9140A   1.9686  -0.8071  -1.0346  0.080  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.873E-03  0.561E-04   33  29  33    9  26   9   17  22   9    0.000    0.000       0
+  0   6715 01:41:30.64   0.9190A   1.9595  -0.7387  -1.0323  0.080  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.889E-03  0.604E-04   33  29  38    9  25   9   17  22   9    0.000    0.000       0
+  0   6721 01:41:36.13   0.9130A   1.9708   0.7480  -0.8913  0.079  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.885E-03  0.617E-04   30  20  12   13  14   9   17  22   9    0.000    0.000       0
+  0   6728 01:41:42.50   0.9090A   1.9799  -0.8274  -0.7256  0.078  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.886E-03  0.616E-04   30  20  18   21  25   8   15  21   9    0.000    0.000       0
+  0   6735 01:41:48.88   0.9130A   1.9712  -0.8777  -0.6395  0.077  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.879E-03  0.541E-04   30  20  23   20  24   8    3  22   0    0.000    0.000       0
+  0   6741 01:41:54.38   0.9180A   1.9597  -0.7446  -0.6184  0.077  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.865E-03  0.467E-04   30  29   6   20  24   8    9  16   9    0.000    0.000       0
+  0   6748 01:42:00.81   0.9210A   1.9544   0.6827  -0.6382  0.077  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.869E-03  0.490E-04   30  29  11   11  16   7   11  29   9    0.000    0.000       0
+  0   6754 01:42:06.33   0.9200A   1.9565  -0.8117   0.8192  0.077  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.882E-03  0.540E-04   34  27  29   18  27   9   20  28   9    0.000    0.000       0
+  0   6761 01:42:12.77   0.9190A   1.9589  -0.8723   0.7916  0.076  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.875E-03  0.537E-04   31  26  36   18  25   9   20  28   9    0.000    0.000       0
+  0   6767 01:42:18.28   0.9170A   1.9619   0.8610  -0.7084  0.076  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.869E-03  0.555E-04   31  26   1    5  14   9   17  16   9    0.000    0.000       0
+  0   6774 01:42:24.70   0.9170A   1.9629   0.7794  -0.8328  0.076  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.870E-03  0.536E-04   31  26   6   13  12   9   17  16   9    0.000    0.000       0
+  0   6780 01:42:30.19   0.9150A   1.9671  -0.9168  -0.8373  0.076  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.881E-03  0.574E-04   31  26  12   19   9   9    3  11   9    0.000    0.000       0
+  0   6787 01:42:36.58   0.9140A   1.9701  -0.9008  -0.8032  0.077  0.00   0.000E+00      0.  0.678E+00  0.100E+00  0.909E-03  0.735E-04   31  26  17   18   9   9    3  11   9    0.000    0.000       0
+  0   6793 01:42:42.06   0.9140A   1.9689   0.7962  -0.7835  0.078  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.909E-03  0.770E-04   29  25  19   11  15   9   17  21   9    0.000    0.000       0
+  0   6800 01:42:48.48   0.9190A   1.9593   0.8172  -0.8376  0.080  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.893E-03  0.690E-04   31  26  28   13  14   9   17  23   9    0.000    0.000       0
+  0   6806 01:42:54.00   0.9210A   1.9554  -0.8447  -0.8277  0.080  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.883E-03  0.622E-04   31  26  33   11  27   9   16  22   9    0.000    0.000       0
+  0   6813 01:43:00.46   0.9220A   1.9514  -0.9895  -0.8383  0.080  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.864E-03  0.554E-04   31  26  39   11  26   9   17  18   9    0.000    0.000       0
+  0   6820 01:43:06.90   0.9200A   1.9564  -0.9538  -0.7791  0.081  0.00   0.000E+00      0.  0.680E+00  0.999E-01  0.840E-03  0.480E-04   35  29  36   11  26   9   17  17   9    0.000    0.000       0
+  0   6826 01:43:12.41   0.9160A   1.9657  -0.8570  -0.7343  0.080  0.00   0.000E+00      0.  0.679E+00  0.995E-01  0.829E-03  0.471E-04   31  25  11   10  25   9   17  17   9    0.000    0.000       0
+  0   6833 01:43:18.78   0.9070A   1.9855   0.7623   0.7649  0.079  0.00   0.000E+00      0.  0.678E+00  0.993E-01  0.830E-03  0.498E-04   31  26  17    8  16   9   20  27   9    0.000    0.000       0
+  0   6839 01:43:24.21   0.9040A   1.9916   0.7224  -0.6972  0.079  0.00   0.000E+00      0.  0.678E+00  0.994E-01  0.828E-03  0.516E-04   31  25  21    8  17   9    5  21   6    0.000    0.000       0
+  0   6846 01:43:30.54   0.9050A   1.9882   0.7363  -0.6914  0.078  0.00   0.000E+00      0.  0.678E+00  0.996E-01  0.826E-03  0.496E-04   31  26  27    9  14   9    5  21   7    0.000    0.000       0
+  0   6853 01:43:36.89   0.9090A   1.9802   0.7810  -0.6779  0.079  0.00   0.000E+00      0.  0.678E+00  0.997E-01  0.814E-03  0.453E-04   31  25  32    8  15   9    4  21   7    0.000    0.000       0
+  0   6859 01:43:42.37   0.9150A   1.9667   0.7639  -0.6833  0.080  0.00   0.000E+00      0.  0.678E+00  0.997E-01  0.811E-03  0.431E-04   31  25  37    8  15   9    4  21   8    0.000    0.000       0
+  0   6866 01:43:48.79   0.9150A   1.9662   0.8125  -0.6489  0.081  0.00   0.000E+00      0.  0.678E+00  0.997E-01  0.822E-03  0.492E-04   30  37  32    7  14   9   18  13   9    0.000    0.000       0
+  0   6872 01:43:54.27   0.9130A   1.9705   0.7584  -0.7102  0.082  0.00   0.000E+00      0.  0.677E+00  0.998E-01  0.817E-03  0.476E-04   30  37  37    7  15   9   18  13   9    0.000    0.000       0
+  0   6879 01:44:00.67   0.9130A   1.9708  -0.7842  -0.5703  0.082  0.00   0.000E+00      0.  0.677E+00  0.996E-01  0.812E-03  0.477E-04   31  31  17   12  27   9   18  12   9    0.000    0.000       0
+  0   6885 01:44:06.13   0.9100A   1.9777  -0.7940  -0.4992  0.082  0.00   0.000E+00      0.  0.677E+00  0.998E-01  0.817E-03  0.539E-04   29  38   7   12  26   9    8  12   9    0.000    0.000       0
+  0   6892 01:44:12.49   0.9080A   1.9834   0.7499  -0.5340  0.082  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.816E-03  0.545E-04   29  38  13   12  14   9    9  11   9    0.000    0.000       0
+  0   6899 01:44:18.84   0.9070A   1.9846   0.7317  -0.7048  0.082  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.826E-03  0.552E-04   32  31  34   12  15   9   18  19   9    0.000    0.000       0
+  0   6905 01:44:24.28   0.9060A   1.9869  -0.6955  -0.9149  0.083  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.830E-03  0.547E-04   28  34  11   19  16   9   17  20   9    0.000    0.000       0
+  0   6912 01:44:30.62   0.9040A   1.9905   0.6331  -0.9451  0.084  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.823E-03  0.497E-04   28  34  16   20  18   6   16  21   9    0.000    0.000       0
+  0   6918 01:44:36.05   0.9090A   1.9793   0.7097  -0.8799  0.084  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.823E-03  0.450E-04   28  34  20   19  25   9   15  21   9    0.000    0.000       0
+  0   6925 01:44:42.41   0.9090A   1.9802   0.6654  -0.8020  0.084  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.810E-03  0.392E-04   31  37   2   19  26   9   17  20   9    0.000    0.000       0
+  0   6932 01:44:48.78   0.9100A   1.9790   0.7504  -0.8129  0.084  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.802E-03  0.396E-04   31  37   8    9  13   9   16  19   9    0.000    0.000       0
+  0   6938 01:44:54.24   0.9100A   1.9771   0.7305  -0.7729  0.083  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.799E-03  0.417E-04   29  33  24    9  14   9   15  19   9    0.000    0.000       0
+  0   6945 01:45:00.61   0.9100A   1.9772   0.7036  -0.6983  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.808E-03  0.478E-04   29  33  30    7  13   9   14  19   9    0.000    0.000       0
+  0   6951 01:45:06.08   0.9110A   1.9767   0.7465  -0.7451  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.822E-03  0.544E-04   34  25  28    6  13   9   13  20   8    0.000    0.000       0
+  0   6958 01:45:12.46   0.9120A   1.9737   0.7076  -0.7645  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.822E-03  0.525E-04   29  37  29    6  14   9   16  18   9    0.000    0.000       0
+  0   6965 01:45:18.84   0.9110A   1.9752   0.7488  -0.7951  0.081  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.837E-03  0.554E-04   28  38  20   13  14   9   17  15   9    0.000    0.000       0
+  0   6971 01:45:24.31   0.9120A   1.9730   0.8502  -0.8411  0.081  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.846E-03  0.577E-04   29  37   0   13  15   9   16  16   9    0.000    0.000       0
+  0   6978 01:45:30.70   0.9150A   1.9682   0.8338  -0.8439  0.081  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.845E-03  0.557E-04   27  27  30   12  16   9   16  16   9    0.000    0.000       0
+  0   6984 01:45:36.19   0.9140A   1.9695   0.7419  -0.8001  0.082  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.842E-03  0.548E-04   27  27  34   11  17   9   15  16   9    0.000    0.000       0
+  0   6991 01:45:42.62   0.9220A   1.9531  -0.7449  -1.0026  0.083  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.845E-03  0.524E-04   30  33  28    7  26   9   17  21   9    0.000    0.000       0
+  0   6997 01:45:48.15   0.9230A   1.9496  -0.7447  -1.1484  0.084  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.837E-03  0.488E-04   30  33  33    7  26   9   16  22   9    0.000    0.000       0
+  0   7004 01:45:54.63   0.9260A   1.9431   0.7554  -1.0524  0.084  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.844E-03  0.525E-04   32  34  36   19  26   9   16  23   9    0.000    0.000       0
+  0   7010 01:46:00.14   0.9090A   1.9796  -0.8497  -0.9214  0.083  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.835E-03  0.567E-04   26  24  17   21  27   8   15  23   9    0.000    0.000       0
+  0   7017 01:46:06.43   0.8900A   2.0222   0.9991  -0.8051  0.083  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.813E-03  0.562E-04   26  24  21   14  13   9   13  20   9    0.000    0.000       0
+  0   7024 01:46:12.67   0.8930A   2.0162   1.0631  -0.7513  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.827E-03  0.600E-04   26  23  26   13  14   9    4  19   7    0.000    0.000       0
+  0   7030 01:46:18.03   0.8910A   2.0212   1.0038  -0.6901  0.082  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.836E-03  0.623E-04   27  24  30   12  14   9    3  19   6    0.000    0.000       0
+  0   7037 01:46:24.22   0.8770A   2.0525   0.9472  -0.6965  0.083  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.831E-03  0.596E-04   29  26  34   11  15   9    8  18   8    0.000    0.000       0
+  0   7044 01:46:30.33   0.8720A   2.0630   0.9123  -0.7368  0.083  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.836E-03  0.568E-04   29  26  39   10  14   9   17  16   9    0.000    0.000       0
+  0   7051 01:46:36.48   0.8820A   2.0408  -0.8950  -0.8694  0.084  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.856E-03  0.554E-04   29  26   4   19  10   9   16  16   9    0.000    0.000       0
+  0   7058 01:46:42.62   0.8740A   2.0596  -0.8500  -0.8942  0.085  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.855E-03  0.502E-04   29  25   8   17   9   9   17  17   9    0.000    0.000       0
+  0   7065 01:46:48.72   0.8680A   2.0740   0.7257  -1.0585  0.084  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.860E-03  0.508E-04   29  25  13    8  19   8   16  18   9    0.000    0.000       0
+  0   7072 01:46:54.75   0.8620A   2.0877  -0.6755  -1.1775  0.084  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.872E-03  0.549E-04   28  24  18   24  21   8   16  20   9    0.000    0.000       0
+  0   7079 01:47:00.79   0.8670A   2.0761   0.8086  -1.0928  0.084  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.881E-03  0.564E-04   28  24  22   19  23   9   14  20   9    0.000    0.000       0
+  0   7085 01:47:06.03   0.8830A   2.0388  -0.8161  -0.9722  0.083  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.908E-03  0.564E-04   29  26  27    7  25   9   13  20   9    0.000    0.000       0
+  0   7092 01:47:12.22   0.8860A   2.0314  -0.8997  -0.8554  0.083  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.948E-03  0.634E-04   28  25  32    6  24   9   12  20   9    0.000    0.000       0
+  0   7099 01:47:18.47   0.8960A   2.0090  -0.9283  -0.8369  0.082  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.961E-03  0.600E-04   28  25  37    6  24   9   10  12   9    0.000    0.000       0
+  0   7106 01:47:24.79   0.9090A   1.9796  -0.8764   0.9396  0.081  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.956E-03  0.544E-04   28  25   2    6  24   9   18  31   8    0.000    0.000       0
+  0   7112 01:47:30.26   0.9120A   1.9731  -0.7798  -0.8951  0.079  0.00   0.000E+00      0.  0.676E+00  0.995E-01  0.939E-03  0.514E-04   28  26   6    6  24   9   16  23   8    0.000    0.000       0
+  0   7119 01:47:36.64   0.9120A   1.9738   0.7621  -0.7672  0.079  0.00   0.000E+00      0.  0.676E+00  0.991E-01  0.923E-03  0.519E-04   28  26  11   16  15   9   16  23   9    0.000    0.000       0
+  0   7125 01:47:42.13   0.9180A   1.9609  -0.7729  -0.7322  0.081  0.00   0.000E+00      0.  0.676E+00  0.988E-01  0.925E-03  0.540E-04   33  37  16   20   9   9   17  15   8    0.000    0.000       0
+  0   7132 01:47:48.56   0.9210A   1.9545  -0.8615  -0.8335  0.082  0.00   0.000E+00      0.  0.676E+00  0.988E-01  0.929E-03  0.547E-04   33  37  21   20  26   9   17  16   9    0.000    0.000       0
+  0   7138 01:47:54.10   0.9260A   1.9434  -0.8801  -0.7808  0.082  0.00   0.000E+00      0.  0.676E+00  0.987E-01  0.937E-03  0.533E-04   33  37  26   20  25   9   18  12   9    0.000    0.000       0
+  0   7145 01:48:00.59   0.9280A   1.9407  -0.9371  -0.6506  0.082  0.00   0.000E+00      0.  0.677E+00  0.984E-01  0.947E-03  0.564E-04   26  16  37   13  26   9   18  11   9    0.000    0.000       0
+  0   7151 01:48:06.15   0.9270A   1.9428  -0.9847   0.7420  0.081  0.00   0.000E+00      0.  0.677E+00  0.982E-01  0.955E-03  0.588E-04   32  36  37   13  25   9   18   9   8    0.000    0.000       0
+  0   7158 01:48:12.61   0.9220A   1.9524  -1.0661  -0.7337  0.080  0.00   0.000E+00      0.  0.677E+00  0.978E-01  0.947E-03  0.563E-04   25  30   6   11  25   9    5  28   9    0.000    0.000       0
+  0   7164 01:48:18.18   0.9300A   1.9356  -1.1524  -0.7141  0.078  0.00   0.000E+00      0.  0.676E+00  0.972E-01  0.954E-03  0.578E-04   32  36   8   11  25   9    5  27   9    0.000    0.000       0
+  0   7171 01:48:24.67   0.9260A   1.9445  -1.0819  -0.6863  0.077  0.00   0.000E+00      0.  0.675E+00  0.967E-01  0.942E-03  0.589E-04   32  35  14    9  24   9    3  11   9    0.000    0.000       0
+  0   7177 01:48:30.22   0.9240A   1.9489  -0.9302  -0.7006  0.077  0.00   0.000E+00      0.  0.674E+00  0.966E-01  0.924E-03  0.577E-04   32  35  19    9  23   9   18  20   9    0.000    0.000       0
+  0   7184 01:48:36.69   0.9250A   1.9463   0.7498  -0.6882  0.077  0.00   0.000E+00      0.  0.674E+00  0.968E-01  0.916E-03  0.597E-04   33  29  19    8  16   9   17  20   9    0.000    0.000       0
+  0   7190 01:48:42.25   0.9270A   1.9422  -0.7716  -0.6592  0.077  0.00   0.000E+00      0.  0.674E+00  0.972E-01  0.915E-03  0.615E-04   33  29  24   15  26   9    2  11   9    0.000    0.000       0
+  0   7197 01:48:48.61   0.8910A   2.0209  -0.8146  -0.6507  0.079  0.00   0.000E+00      0.  0.675E+00  0.978E-01  0.873E-03  0.589E-04   25  23  31   15  26   9    2  11   9    0.000    0.000       0
+  0   7204 01:48:54.75   0.8720A   2.0646  -0.8079   0.7808  0.080  0.00   0.000E+00      0.  0.676E+00  0.985E-01  0.858E-03  0.577E-04   25  23  35   16  26   9   20  29   9    0.000    0.000       0
+  0   7210 01:49:00.00   0.8810A   2.0437  -0.8391   0.7339  0.081  0.00   0.000E+00      0.  0.677E+00  0.989E-01  0.867E-03  0.557E-04   25  23  38   19  24   9   20  28   9    0.000    0.000       0
+  0   7217 01:49:06.27   0.9090A   1.9803  -0.7933  -0.7357  0.083  0.00   0.000E+00      0.  0.677E+00  0.992E-01  0.887E-03  0.551E-04   31   0  29   18  23   9   18  23   7    0.000    0.000       0
+  0   7224 01:49:12.65   0.9090A   1.9797  -0.8785  -0.9654  0.085  0.00   0.000E+00      0.  0.678E+00  0.995E-01  0.884E-03  0.497E-04   32   0  34   12  28   9   17  22   9    0.000    0.000       0
+  0   7230 01:49:18.11   0.9130A   1.9708  -0.8643  -1.0155  0.086  0.00   0.000E+00      0.  0.678E+00  0.995E-01  0.892E-03  0.508E-04   32   0  39   12  27   9   16  21   9    0.000    0.000       0
+  0   7237 01:49:24.54   0.9230A   1.9495  -0.8150  -1.0438  0.086  0.00   0.000E+00      0.  0.678E+00  0.996E-01  0.895E-03  0.506E-04   26  16  14   19  20   9   17  26   9    0.000    0.000       0
+  0   7243 01:49:30.11   0.9290A   1.9366  -0.7582  -1.0570  0.086  0.00   0.000E+00      0.  0.677E+00  0.995E-01  0.892E-03  0.510E-04   33   0   9   19  19   9   17  27   9    0.000    0.000       0
+  0   7250 01:49:36.55   0.9110A   1.9749  -0.6870  -0.9295  0.084  0.00   0.000E+00      0.  0.677E+00  0.994E-01  0.872E-03  0.501E-04   31  39  10    9  27   9   16  26   9    0.000    0.000       0
+  0   7257 01:49:42.89   0.9030A   1.9926  -0.7069  -0.8301  0.082  0.00   0.000E+00      0.  0.676E+00  0.994E-01  0.874E-03  0.540E-04   31  39  15   10  27   9   13  23   8    0.000    0.000       0
+  0   7263 01:49:48.32   0.9040A   1.9905   0.7776  -0.8812  0.082  0.00   0.000E+00      0.  0.676E+00  0.997E-01  0.879E-03  0.526E-04   31  39  20   20  27   8   16  17   9    0.000    0.000       0
+  0   7270 01:49:54.63   0.8990A   2.0020   0.6752  -0.9855  0.082  0.00   0.000E+00      0.  0.677E+00  0.999E-01  0.873E-03  0.505E-04   30  33  11   19  26   9   15  16   9    0.000    0.000       0
+  0   7276 01:50:00.01   0.8990A   2.0019  -0.7496  -1.0009  0.082  0.00   0.000E+00      0.  0.677E+00  0.998E-01  0.858E-03  0.462E-04   30  33  16   20  13   9   16  17   9    0.000    0.000       0
+  0   7283 01:50:06.34   0.9130A   1.9725  -0.6292  -0.9992  0.083  0.00   0.000E+00      0.  0.676E+00  0.997E-01  0.881E-03  0.527E-04   30  34  20   21  12  13   14  19   8    0.000    0.000       0
+  0   7290 01:50:12.72   0.9120A   1.9732   0.7011  -0.9925  0.084  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.896E-03  0.635E-04   33  37  39   19  14   7   14  20   9    0.000    0.000       0
+  0   7296 01:50:18.19   0.9120A   1.9728  -0.6876  -0.9312  0.084  0.00   0.000E+00      0.  0.678E+00  0.100E+00  0.895E-03  0.651E-04   24  18  20   10  27   9   13  20   9    0.000    0.000       0
+  0   7303 01:50:24.57   0.9110A   1.9752  -0.8057  -0.8444  0.084  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.872E-03  0.600E-04   24  18  24    9  27   9   17  20   9    0.000    0.000       0
+  0   7309 01:50:30.04   0.9100A   1.9785  -0.8441  -0.8294  0.085  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.852E-03  0.467E-04   24  18  28    9  26   9   16  19   9    0.000    0.000       0
+  0   7316 01:50:36.40   0.9090A   1.9810  -0.8198  -0.7561  0.085  0.00   0.000E+00      0.  0.678E+00  0.100E+00  0.846E-03  0.393E-04   24  18  33    8  25   9   15  19   9    0.000    0.000       0
+  0   7323 01:50:42.82   0.9200A   1.9572  -0.7433  -0.7348  0.086  0.00   0.000E+00      0.  0.677E+00  0.994E-01  0.863E-03  0.376E-04   31  39  29    8  24   9   18  27   9    0.000    0.000       0
+  0   7329 01:50:48.35   0.9220A   1.9525  -0.6687  -0.7819  0.087  0.00   0.000E+00      0.  0.676E+00  0.985E-01  0.863E-03  0.369E-04   31  39  34    9  24   9   17  26   9    0.000    0.000       0
+  0   7336 01:50:54.81   0.9250A   1.9451   0.6164  -0.6870  0.087  0.00   0.000E+00      0.  0.674E+00  0.977E-01  0.862E-03  0.384E-04   31  39   0    7  35   1   16  26   9    0.000    0.000       0
+  0   7342 01:51:00.37   0.9280A   1.9395   0.6379  -0.6257  0.087  0.00   0.000E+00      0.  0.673E+00  0.971E-01  0.848E-03  0.375E-04   31  39   5    7  35   3   16  25   9    0.000    0.000       0
+  0   7349 01:51:06.87   0.9300A   1.9363   0.5761  -0.5653  0.088  0.00   0.000E+00      0.  0.673E+00  0.968E-01  0.847E-03  0.437E-04   31  39  10    7  36   6   16  26   9    0.000    0.000       0
+  0   7355 01:51:12.46   0.9310A   1.9337  -0.5720  -0.5891  0.089  0.00   0.000E+00      0.  0.673E+00  0.971E-01  0.853E-03  0.500E-04   31  39  15    5  36  34   17  22   9    0.000    0.000       0
+  0   7361 01:51:18.05   0.9330A   1.9301  -0.6150  -0.6905  0.089  0.00   0.000E+00      0.  0.673E+00  0.975E-01  0.850E-03  0.512E-04   31  39  20   11  26   9   17  17   9    0.000    0.000       0
+  0   7368 01:51:24.56   0.9270A   1.9422  -0.7111  -0.7643  0.089  0.00   0.000E+00      0.  0.674E+00  0.982E-01  0.841E-03  0.510E-04   33   1  24   11  26   9   17  16   9    0.000    0.000       0
+  0   7374 01:51:30.10   0.9220A   1.9522  -0.7471   0.8035  0.088  0.00   0.000E+00      0.  0.675E+00  0.987E-01  0.839E-03  0.474E-04   33   1  29   11  25   9   20  10   9    0.000    0.000       0
+  0   7381 01:51:36.54   0.9180A   1.9602  -0.9113   0.8774  0.087  0.00   0.000E+00      0.  0.676E+00  0.990E-01  0.848E-03  0.547E-04   33   1  34   10  26   9   21  12   9    0.000    0.000       0
+  0   7387 01:51:42.04   0.9160A   1.9659  -1.0301  -0.7313  0.087  0.00   0.000E+00      0.  0.676E+00  0.989E-01  0.846E-03  0.559E-04   33   1  39    9  25   9    4  12   9    0.000    0.000       0
+  0   7394 01:51:48.45   0.9150A   1.9675  -0.9782  -0.6388  0.087  0.00   0.000E+00      0.  0.676E+00  0.983E-01  0.844E-03  0.540E-04   33   1   4    8  24   9    3  29   9    0.000    0.000       0
+  0   7401 01:51:54.86   0.9150A   1.9664  -0.8436  -0.6929  0.087  0.00   0.000E+00      0.  0.676E+00  0.978E-01  0.844E-03  0.505E-04   33   1  10    8  24   9   17  19   9    0.000    0.000       0
+  0   7407 01:52:00.35   0.9170A   1.9634   0.7869  -0.8885  0.087  0.00   0.000E+00      0.  0.676E+00  0.972E-01  0.841E-03  0.483E-04   33   1  14    9  15   9   17  19   9    0.000    0.000       0
+  0   7414 01:52:06.78   0.9210A   1.9546   0.7784  -1.0704  0.088  0.00   0.000E+00      0.  0.675E+00  0.964E-01  0.826E-03  0.476E-04   33   1  20   18  22   9   16  18   9    0.000    0.000       0
+  0   7420 01:52:12.32   0.9240A   1.9484   0.6824  -1.0157  0.088  0.00   0.000E+00      0.  0.675E+00  0.959E-01  0.818E-03  0.511E-04   33   1  24   18  23   9   15  18   9    0.000    0.000       0
+  0   7427 01:52:18.78   0.9240A   1.9484   0.6160  -0.8467  0.088  0.00   0.000E+00      0.  0.674E+00  0.953E-01  0.803E-03  0.481E-04   28  24  39   10  15   9   16  20   9    0.000    0.000       0
+  0   7433 01:52:24.33   0.9230A   1.9493   0.5573  -0.8325  0.087  0.00   0.000E+00      0.  0.674E+00  0.949E-01  0.790E-03  0.443E-04   31   5  21   10  15   9   16  20   9    0.000    0.000       0
+  0   7440 01:52:30.80   0.9240A   1.9483  -0.6297  -0.7479  0.086  0.00   0.000E+00      0.  0.674E+00  0.947E-01  0.778E-03  0.426E-04   30  37   1    9  25   9   15  20   9    0.000    0.000       0
+  0   7446 01:52:36.34   0.9220A   1.9519  -0.6558  -0.6570  0.085  0.00   0.000E+00      0.  0.674E+00  0.946E-01  0.788E-03  0.469E-04   30  37   6    8  25   9   13  19   9    0.000    0.000       0
+  0   7453 01:52:42.77   0.9140A   1.9688  -0.6495   0.6500  0.083  0.00   0.000E+00      0.  0.674E+00  0.949E-01  0.801E-03  0.553E-04   26  22  13    7  24   9   20  11   9    0.000    0.000       0
+  0   7459 01:52:48.21   0.9000A   2.0008  -0.6279   0.7454  0.081  0.00   0.000E+00      0.  0.675E+00  0.952E-01  0.789E-03  0.537E-04   26  23  16    7  24   9   20  11   9    0.000    0.000       0
+  0   7466 01:52:54.44   0.8850A   2.0330   0.7199  -0.7234  0.081  0.00   0.000E+00      0.  0.675E+00  0.957E-01  0.783E-03  0.538E-04   26  23  21   21  29   7   14  17   8    0.000    0.000       0
+  0   7473 01:53:00.62   0.8800A   2.0446   0.8082  -0.7969  0.081  0.00   0.000E+00      0.  0.677E+00  0.964E-01  0.785E-03  0.533E-04   26  23  26   21  30   8   15  17   9    0.000    0.000       0
+  0   7480 01:53:06.79   0.8810A   2.0429  -0.7182  -1.0091  0.083  0.00   0.000E+00      0.  0.678E+00  0.971E-01  0.795E-03  0.497E-04   26  24  30   20  15   9   16  19   9    0.000    0.000       0
+  0   7486 01:53:12.06   0.8760A   2.0552  -0.7203  -1.0990  0.085  0.00   0.000E+00      0.  0.679E+00  0.973E-01  0.791E-03  0.451E-04   26  24  34   20  14   9   15  20   9    0.000    0.000       0
+  0   7493 01:53:18.20   0.8790A   2.0478  -0.6255  -1.0460  0.087  0.00   0.000E+00      0.  0.679E+00  0.971E-01  0.788E-03  0.432E-04   26  24  39   19  14   9   14  20   9    0.000    0.000       0
+  0   7500 01:53:24.41   0.8930A   2.0159   0.6307  -0.9683  0.088  0.00   0.000E+00      0.  0.679E+00  0.966E-01  0.788E-03  0.456E-04   25  24   4    5  12   9   13  20   9    0.000    0.000       0
+  0   7507 01:53:30.75   0.9180A   1.9615   0.6737  -0.8761  0.088  0.00   0.000E+00      0.  0.678E+00  0.960E-01  0.783E-03  0.454E-04   26  25   9    4  11   9   12  19   9    0.000    0.000       0
+  0   7513 01:53:36.27   0.9180A   1.9614   0.7142  -0.7818  0.088  0.00   0.000E+00      0.  0.678E+00  0.954E-01  0.769E-03  0.446E-04   33  36  14    4  11   9   11  19   9    0.000    0.000       0
+  0   7520 01:53:42.69   0.9180A   1.9603   0.6880   0.7876  0.086  0.00   0.000E+00      0.  0.677E+00  0.947E-01  0.757E-03  0.382E-04   32  35  19   16  18   7   19  11   9    0.000    0.000       0
+  0   7526 01:53:48.19   0.9190A   1.9592   0.6599   0.8262  0.085  0.00   0.000E+00      0.  0.676E+00  0.941E-01  0.764E-03  0.392E-04   32  35  24   14  15   9   20  11   9    0.000    0.000       0
+  0   7533 01:53:54.63   0.9220A   1.9522   0.6729  -0.7191  0.083  0.00   0.000E+00      0.  0.675E+00  0.939E-01  0.774E-03  0.459E-04   32  35  30   23  32   3   10  18   7    0.000    0.000       0
+  0   7539 01:54:00.17   0.9220A   1.9531  -0.6553  -0.6785  0.083  0.00   0.000E+00      0.  0.675E+00  0.941E-01  0.778E-03  0.516E-04   26  25  14    1  14   6    9  18   7    0.000    0.000       0
+  0   7546 01:54:06.64   0.9290A   1.9385  -0.6657  -0.6384  0.083  0.00   0.000E+00      0.  0.676E+00  0.944E-01  0.781E-03  0.529E-04   26  25  19    1  12   3    8  19   7    0.000    0.000       0
+  0   7552 01:54:12.22   0.9300A   1.9358  -0.6514  -0.6087  0.084  0.00   0.000E+00      0.  0.677E+00  0.946E-01  0.782E-03  0.529E-04   33  38   4    1  12   6   17  20   9    0.000    0.000       0
+  0   7559 01:54:18.71   0.9210A   1.9551   0.7952  -0.7452  0.084  0.00   0.000E+00      0.  0.678E+00  0.947E-01  0.784E-03  0.549E-04   33  10  39   20  30   9   16  20   9    0.000    0.000       0
+  0   7565 01:54:24.21   0.9140A   1.9689   0.8955  -0.8753  0.086  0.00   0.000E+00      0.  0.678E+00  0.948E-01  0.769E-03  0.515E-04   33  10   4   12  13   9   16  21   9    0.000    0.000       0
+  0   7572 01:54:30.60   0.9120A   1.9727   0.9308  -0.9182  0.087  0.00   0.000E+00      0.  0.679E+00  0.945E-01  0.754E-03  0.480E-04   33  10   9   12  15   9   15  22   9    0.000    0.000       0
+  0   7578 01:54:36.09   0.9160A   1.9652   0.9111  -0.8519  0.087  0.00   0.000E+00      0.  0.679E+00  0.941E-01  0.749E-03  0.448E-04   33  10  14   10  15   9   14  22   9    0.000    0.000       0
+  0   7585 01:54:42.53   0.9200A   1.9561   0.8812  -0.7901  0.087  0.00   0.000E+00      0.  0.679E+00  0.937E-01  0.761E-03  0.477E-04   28  17  25   10  16   9   12  23   8    0.000    0.000       0
+  0   7591 01:54:48.02   0.9130A   1.9713   0.8304  -0.7472  0.086  0.00   0.000E+00      0.  0.679E+00  0.936E-01  0.764E-03  0.486E-04   27  34   0   10  16   9   10  23   8    0.000    0.000       0
+  0   7598 01:54:54.43   0.9160A   1.9643   0.7576  -0.7257  0.085  0.00   0.000E+00      0.  0.680E+00  0.934E-01  0.766E-03  0.463E-04   28  17  36    9  18   9    9  24   7    0.000    0.000       0
+  0   7605 01:55:00.86   0.9190A   1.9581   0.6801  -0.6904  0.083  0.00   0.000E+00      0.  0.680E+00  0.931E-01  0.770E-03  0.415E-04   28  17   2   10  18   9    4  10   9    0.000    0.000       0
+  0   7611 01:55:06.39   0.9220A   1.9523  -0.6447  -0.6670  0.082  0.00   0.000E+00      0.  0.680E+00  0.927E-01  0.780E-03  0.451E-04   28  16   6   15  25   8    3  10   9    0.000    0.000       0
+  0   7618 01:55:12.81   0.9160A   1.9647  -0.6397  -0.7342  0.080  0.00   0.000E+00      0.  0.680E+00  0.923E-01  0.783E-03  0.493E-04   28  16  12   14  24   8    5  11   9    0.000    0.000       0
+  0   7624 01:55:18.33   0.9190A   1.9582   0.6446  -0.8009  0.079  0.00   0.000E+00      0.  0.680E+00  0.921E-01  0.788E-03  0.522E-04   27  17  17    8  17   9    4  11   9    0.000    0.000       0
+  0   7631 01:55:24.75   0.9200A   1.9572   0.6742  -0.7735  0.079  0.00   0.000E+00      0.  0.679E+00  0.921E-01  0.786E-03  0.504E-04   27  17  22    8  17   9    4  12   9    0.000    0.000       0
+  0   7637 01:55:30.29   0.9270A   1.9420   0.7586  -0.6994  0.079  0.00   0.000E+00      0.  0.679E+00  0.923E-01  0.796E-03  0.496E-04   35  24  18    7  14   9    8  17   4    0.000    0.000       0
+  0   7644 01:55:36.80   0.9300A   1.9353   0.7673  -0.6665  0.079  0.00   0.000E+00      0.  0.680E+00  0.927E-01  0.809E-03  0.518E-04   25  34  34    7  15   9    7  17   3    0.000    0.000       0
+  0   7650 01:55:42.37   0.9260A   1.9442   0.7486   0.7209  0.079  0.00   0.000E+00      0.  0.680E+00  0.931E-01  0.817E-03  0.543E-04   34  35  23    7  16   9   20  27   9    0.000    0.000       0
+  0   7657 01:55:48.83   0.9200A   1.9559   0.7433   0.7747  0.079  0.00   0.000E+00      0.  0.681E+00  0.936E-01  0.818E-03  0.553E-04   36  38  28    7  15   9   21  27   9    0.000    0.000       0
+  0   7663 01:55:54.33   0.9140A   1.9695   0.7862   0.7427  0.079  0.00   0.000E+00      0.  0.682E+00  0.940E-01  0.813E-03  0.558E-04   36  38  33    8  15   9   21  27   9    0.000    0.000       0
+  0   7670 01:56:00.71   0.9110A   1.9750   0.8404  -0.6585  0.079  0.00   0.000E+00      0.  0.683E+00  0.945E-01  0.805E-03  0.561E-04   36  38  39    8  14   9   15  21   9    0.000    0.000       0
+  0   7676 01:56:06.18   0.9110A   1.9758   0.8597  -0.7337  0.078  0.00   0.000E+00      0.  0.684E+00  0.946E-01  0.796E-03  0.518E-04   35  37   3    8  15   9   17  19   9    0.000    0.000       0
+  0   7683 01:56:12.56   0.9130A   1.9710   0.8196  -0.7437  0.078  0.00   0.000E+00      0.  0.685E+00  0.948E-01  0.783E-03  0.428E-04   35  37   8    8  16   9   17  19   9    0.000    0.000       0
+  0   7689 01:56:18.05   0.9120A   1.9729   0.7646  -0.7136  0.078  0.00   0.000E+00      0.  0.684E+00  0.946E-01  0.780E-03  0.393E-04   26  23   4    7  15   9   16  20   9    0.000    0.000       0
+  0   7696 01:56:24.42   0.9080A   1.9828   0.7277  -0.6252  0.076  0.00   0.000E+00      0.  0.684E+00  0.945E-01  0.784E-03  0.405E-04   26  23   9    7  15   9   17  19   9    0.000    0.000       0
+  0   7703 01:56:30.75   0.9040A   1.9918  -0.7634   0.6106  0.074  0.00   0.000E+00      0.  0.684E+00  0.947E-01  0.803E-03  0.484E-04   26  23  15    8  27   9   20  10   9    0.000    0.000       0
+  0   7709 01:56:36.18   0.9060A   1.9878  -0.7219  -0.7582  0.073  0.00   0.000E+00      0.  0.684E+00  0.951E-01  0.825E-03  0.552E-04   27  23  19   10  25   9    5  28   9    0.000    0.000       0
+  0   7716 01:56:42.52   0.9060A   1.9868  -0.7238  -0.8475  0.072  0.00   0.000E+00      0.  0.684E+00  0.957E-01  0.849E-03  0.609E-04   27  23  24    9  25   9    5  27   9    0.000    0.000       0
+  0   7723 01:56:48.88   0.9090A   1.9800   0.7296  -0.9049  0.072  0.00   0.000E+00      0.  0.684E+00  0.965E-01  0.850E-03  0.548E-04   27  23  29    6  15   9    5  27   9    0.000    0.000       0
+  0   7729 01:56:54.34   0.9110A   1.9763   0.7502  -0.8554  0.073  0.00   0.000E+00      0.  0.685E+00  0.970E-01  0.860E-03  0.530E-04   27  23  34    6  15   9    5  27   9    0.000    0.000       0
+  0   7736 01:57:00.73   0.9140A   1.9690   0.8330  -0.8896  0.075  0.00   0.000E+00      0.  0.685E+00  0.978E-01  0.867E-03  0.501E-04   32  31   3    5  15   9   17  20   9    0.000    0.000       0
+  0   7742 01:57:06.22   0.9160A   1.9660   0.8447  -0.8863  0.077  0.00   0.000E+00      0.  0.686E+00  0.981E-01  0.873E-03  0.517E-04   26  13  26    5  16   9   16  20   9    0.000    0.000       0
+  0   7749 01:57:12.58   0.9030A   1.9927   0.8028  -0.7836  0.079  0.00   0.000E+00      0.  0.686E+00  0.988E-01  0.857E-03  0.519E-04   26  13  32    5  17   9   15  20   9    0.000    0.000       0
+  0   7756 01:57:18.84   0.8890A   2.0244   0.7655  -0.7251  0.079  0.00   0.000E+00      0.  0.686E+00  0.997E-01  0.836E-03  0.488E-04   26  13  37    6  15   9   16  17   9    0.000    0.000       0
+  0   7762 01:57:24.15   0.8820A   2.0406   0.7769  -0.6736  0.079  0.00   0.000E+00      0.  0.687E+00  0.100E+00  0.820E-03  0.433E-04   26  13   2    4  16   9   16  17   9    0.000    0.000       0
+  0   7769 01:57:30.33   0.8850A   2.0343   0.7712   0.6795  0.079  0.00   0.000E+00      0.  0.686E+00  0.101E+00  0.813E-03  0.414E-04   26  12   8    4  16   9    8  28  34    0.000    0.000       0
+  0   7776 01:57:36.56   0.8940A   2.0126   0.7299   0.7266  0.079  0.00   0.000E+00      0.  0.685E+00  0.101E+00  0.816E-03  0.417E-04   26  12  13    4  17   9    9  28  36    0.000    0.000       0
+  0   7783 01:57:42.88   0.9090A   1.9803   0.7102   0.7435  0.078  0.00   0.000E+00      0.  0.684E+00  0.101E+00  0.829E-03  0.438E-04   26  13  17    3  15   8    9  28  37    0.000    0.000       0
+  0   7789 01:57:48.34   0.9070A   1.9849  -0.7063   0.7265  0.077  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.831E-03  0.446E-04   33  36  22    6  34  34   10  27  37    0.000    0.000       0
+  0   7796 01:57:54.67   0.9040A   1.9913  -0.7278   0.7447  0.077  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.837E-03  0.463E-04   33  35  27    6  33  36    9  27  37    0.000    0.000       0
+  0   7802 01:58:00.09   0.9030A   1.9937  -0.7182   0.7294  0.077  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.845E-03  0.473E-04   33  35  32   15  16   7    8  27  36    0.000    0.000       0
+  0   7809 01:58:06.42   0.9050A   1.9882  -0.7422   0.6802  0.077  0.00   0.000E+00      0.  0.685E+00  0.103E+00  0.872E-03  0.524E-04   32  34  36   15  13   7   20  29   9    0.000    0.000       0
+  0   7816 01:58:12.76   0.9080A   1.9834  -0.7908   0.6114  0.079  0.00   0.000E+00      0.  0.685E+00  0.103E+00  0.893E-03  0.478E-04   33  34   2   10  26   9   18  29   9    0.000    0.000       0
+  0   7822 01:58:18.22   0.9120A   1.9742   0.8928  -0.7383  0.080  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.917E-03  0.442E-04   34  34   7   20  30   9   17  15   9    0.000    0.000       0
+  0   7829 01:58:24.61   0.9140A   1.9703   0.8546  -0.7551  0.081  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.937E-03  0.477E-04   34  34  13   20  31   9   17  13   9    0.000    0.000       0
+  0   7835 01:58:30.09   0.9110A   1.9749   0.7792  -0.7031  0.081  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.962E-03  0.601E-04   28  32  17   18  31   9   16  12   9    0.000    0.000       0
+  0   7842 01:58:36.44   0.9050A   1.9890  -0.7810  -0.7784  0.080  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.978E-03  0.691E-04   28  32  22   13   9   9   16  11   9    0.000    0.000       0
+  0   7849 01:58:42.75   0.9000A   2.0001  -0.7364  -0.8320  0.079  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.975E-03  0.648E-04   28  34  26   12   9   9   15  12   9    0.000    0.000       0
+  0   7855 01:58:48.11   0.8890A   2.0251  -0.7175  -0.8717  0.079  0.00   0.000E+00      0.  0.684E+00  0.104E+00  0.966E-03  0.588E-04   29  30  11    8  25   3   15  12   9    0.000    0.000       0
+  0   7862 01:58:54.31   0.8860A   2.0322  -0.7277  -0.8125  0.078  0.00   0.000E+00      0.  0.684E+00  0.104E+00  0.972E-03  0.604E-04   29  30  16    8  24   4   14  13   9    0.000    0.000       0
+  0   7869 01:59:00.50   0.8810A   2.0434   0.7448  -0.6755  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.980E-03  0.619E-04   30  30  21   23  34   6   10   6  20    0.000    0.000       0
+  0   7876 01:59:06.66   0.8800A   2.0444   0.8268   0.7070  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.981E-03  0.551E-04   30  30  26   15  13   9   18  29   9    0.000    0.000       0
+  0   7883 01:59:12.85   0.8850A   2.0330   0.9019   0.6949  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.989E-03  0.542E-04   31  29  31   15  14   9   18  29   9    0.000    0.000       0
+  0   7889 01:59:18.20   0.8970A   2.0068   0.9253   0.6637  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.101E-02  0.547E-04   31  29  35   20  31   8   21  19   9    0.000    0.000       0
+  0   7896 01:59:24.53   0.9070A   1.9840   0.9358  -0.6508  0.079  0.00   0.000E+00      0.  0.684E+00  0.106E+00  0.100E-02  0.550E-04   35  28   1   20  31   9    4  28   9    0.000    0.000       0
+  0   7903 01:59:30.84   0.8980A   2.0053  -0.8302  -0.7078  0.080  0.00   0.000E+00      0.  0.684E+00  0.106E+00  0.984E-03  0.574E-04   36  29   6    7  23   9    3  28   9    0.000    0.000       0
+  0   7909 01:59:36.20   0.8930A   2.0155   0.8128  -0.8122  0.082  0.00   0.000E+00      0.  0.684E+00  0.106E+00  0.978E-03  0.577E-04   36  29  10   22  34  18   18  20   9    0.000    0.000       0
+  0   7916 01:59:42.45   0.8940A   2.0143   0.8088  -1.0125  0.083  0.00   0.000E+00      0.  0.683E+00  0.106E+00  0.968E-03  0.548E-04   36  29  16   22  35  21   17  21   9    0.000    0.000       0
+  0   7923 01:59:48.73   0.8970A   2.0060   0.7959  -0.9513  0.083  0.00   0.000E+00      0.  0.683E+00  0.107E+00  0.974E-03  0.579E-04   35  29  22   22  36  25   16  21   9    0.000    0.000       0
+  0   7929 01:59:54.10   0.8930A   2.0164   0.7780  -0.8477  0.083  0.00   0.000E+00      0.  0.683E+00  0.107E+00  0.973E-03  0.598E-04   31  32   0   21  37  26   15  21   9    0.000    0.000       0
+  0   7936 02:00:00.33   0.8890A   2.0238   0.7602  -0.8333  0.084  0.00   0.000E+00      0.  0.683E+00  0.107E+00  0.969E-03  0.558E-04   31  32   6   21  38  30   16  18   9    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/canyon/example_canyon_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/canyon/example_canyon_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/canyon/example_canyon_p3d	(revision 3477)
@@ -0,0 +1,53 @@
+ &inipar nx = 39, ny = 39, nz = 40,
+         dx = 2.0, dy = 2.0, dz = 2.0,
+
+         fft_method = 'temperton-algorithm',   ! fast, but restrictions apply
+
+         momentum_advec = 'pw-scheme',         ! topography does not work with
+         scalar_advec   = 'pw-scheme',         ! Wicker-Skamarock advection so far
+
+         omega = 0.0,                          ! no Coriolis force
+         conserve_volume_flow = .T.,           ! maintain constant bulk velocity
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 1.0, vg_surface = 0.0,   ! implies bulk velocity 1 m/s
+         roughness_length = 0.1,               ! applies to all surfaces locally
+
+         bc_pt_b = 'neumann',
+         bc_uv_t = 'neumann',                  ! open channel boundary condition
+
+         topography = 'single_street_canyon',
+         canyon_height   = 40.0,
+         canyon_width_x = 40.0,
+
+         surface_heatflux = 0.0,
+         wall_heatflux = 0.0, 0.0, 0.0, 0.0, 0.0,  /
+
+ &d3par  end_time                  =   7200.0,
+         termination_time_needed   =    900.0,
+         npex = 2, npey = 1,
+         create_disturbances = .T.,
+
+         dt_run_control            =      6.0,
+         dt_dots                   =      6.0,
+
+         skip_time_dopr            =      0.0,
+         dt_dopr                   =   3600.0,
+         averaging_interval_pr     =   3600.0,
+         dt_averaging_input_pr     =      6.0,
+
+         skip_time_data_output     =      0.0,
+         dt_data_output            =   3600.0,
+
+         averaging_interval        =   3600.0,
+         dt_averaging_input        =      6.0,
+
+         section_xz = -1,
+
+         data_output_pr = '#u', 'w"u"', 'w*u*', 'wu', 'u*2', 
+                          '#v', 'w"v"', 'w*v*', 'wv', 'v*2',
+                          'w', 'w*2', 'e', 'e*', '#km', '#l',
+
+         data_output = 'u',       'v',       'w',
+                       'u_xz_av', 'v_xz_av', 'w_xz_av',
+                       'u_av',    'v_av',    'w_av',  /
Index: /palm/tags/release-6.0/EXAMPLES/canyon/example_canyon_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/canyon/example_canyon_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/canyon/example_canyon_rc	(revision 3477)
@@ -0,0 +1,1411 @@
+
+ ***************************         ------------------------------------------
+ * PALM 3.6  Rev: 244      *         atmosphere - 3D - run without 1D - prerun
+ ***************************         ------------------------------------------
+
+ Date:              26-02-09         Run:       example_canyon      
+ Time:              23:10:00         Run-No.:   00
+ Run on host:         lcsgih
+ Number of PEs:            2         Processor grid (x,y): (  2,  1) predefined
+                                     A 1d-decomposition along x is used
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> Volume flow at the right and north boundary will be conserved
+     using the initial_profiles mode
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:          variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:           0.000 s
+ End time:          7200.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      2.000 m    dy =      2.000 m    dz =      2.000 m
+ Domain size:       x =     80.000 m     y =     80.000 m  z(u) =     81.000 m
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     40,     42)
+
+ Subdomains have equal size
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: single_street_canyon                    
+ Single quasi-2D street canyon of infinite length in y direction
+ Canyon height:  40.00m, ch =   20.
+ Canyon position (u-walls): cxl =   10, cxr =   30.
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt(1)              
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = uv(nzt)               | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.000000 K m/s
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =   1.00 m   z0 = 0.1000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+    1D-Profiles:
+       Output format: netcdf                                  
+
+
+       Profile: u, w"u", w*u*, wu, u*2, v, w"v", w*v*, wv, v*2, w, w*2,      
+
+              : e, e*, km, l,                                                
+       Output every              3600.00 s
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+    2D-Arrays(time-averaged):
+       Output format: netcdf                                  
+
+
+       XZ-cross-section  Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+       Cross sections at j = /-1/
+       scalar-coordinates:   /-2.0/ m
+
+
+    3D-Arrays:
+       Output format: netcdf                                  
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Upper output limit at       81.00 m  (GP   41)
+
+
+    3D-Arrays(time-averaged):
+       Output format: netcdf                                  
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+       Upper output limit at       81.00 m  (GP   41)
+
+
+    Time series:
+       Output format: netcdf                                  
+
+       Output every                 6.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.000E+00 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000000 1/s
+                            f*    =  0.000000 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            1.00    1.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0  m
+       Temperature:   300.00  300.00  K
+       Gradient:      ------    0.00  K/100m
+       Gridpoint:          0       0
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+   Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :     5.00 m (GP    3)
+    Upper disturbance level         :    25.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*   THETA*    Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   1.5100A   1.1915D  0.1951D -0.6578  0.000  0.00   0.000      0.  0.267E+00  0.158E-01  0.000E+00  0.000E+00   22  38   1    7   0  21   21  35  11    0.000    0.000       0
+  0      5 00:00:06.55   1.2700A   1.4138   0.1975   1.2044  0.076  0.00   0.000      0.  0.248E+00  0.158E-01  0.996E-03  0.318E-03   22  33  11    7   5  15   20   2  29    0.000    0.000       0
+  0     10 00:00:12.98   1.2800A   1.4071   0.2118   1.1962  0.072  0.00   0.000      0.  0.250E+00  0.165E-01  0.106E-02  0.297E-03   22  34  12    7   6  15   20   3  29    0.000    0.000       0
+  0     14 00:00:18.17   1.3200A   1.3670  -0.2069   1.1781  0.067  0.00   0.000      0.  0.252E+00  0.171E-01  0.116E-02  0.295E-03   22  24  13   10  35  22   20   3  29    0.000    0.000       0
+  0     19 00:00:24.85   1.3500A   1.3361   0.2153   1.1373  0.061  0.00   0.000      0.  0.256E+00  0.175E-01  0.123E-02  0.281E-03   24   7  36    7   7  15   20  25  29    0.000    0.000       0
+  0     23 00:00:30.23   1.3400A   1.3464  -0.2024   1.0859  0.057  0.00   0.000      0.  0.260E+00  0.174E-01  0.122E-02  0.264E-03   22  29  15   11  30  21   20  23  29    0.000    0.000       0
+  0     28 00:00:37.15   1.3900A   1.2942  -0.2106   1.0384  0.052  0.00   0.000      0.  0.265E+00  0.171E-01  0.123E-02  0.253E-03   25   6  36   11  30  21   20  23  29    0.000    0.000       0
+  0     32 00:00:42.70   1.3900A   1.2911   0.1919   0.9887  0.048  0.00   0.000      0.  0.269E+00  0.168E-01  0.117E-02  0.232E-03   25   8  38    6   1  19   20  23  29    0.000    0.000       0
+  0     36 00:00:48.39   1.4300A   1.2564  -0.2136   0.9231  0.044  0.00   0.000      0.  0.272E+00  0.163E-01  0.114E-02  0.213E-03   25   8   1    9  33  22   20  23  29    0.000    0.000       0
+  0     40 00:00:54.14   1.4300A   1.2570  -0.2252   0.8540  0.041  0.00   0.000      0.  0.275E+00  0.158E-01  0.109E-02  0.186E-03   25  15  37    9  33  22   20   9  29    0.000    0.000       0
+  0     45 00:01:01.26   1.4200A   1.2649  -0.2077   0.7770  0.036  0.00   0.000      0.  0.278E+00  0.152E-01  0.101E-02  0.160E-03   25  15   1    9  33  22   20   9  29    0.000    0.000       0
+  0     49 00:01:06.90   1.4100A   1.2782  -0.2208   0.7108  0.034  0.00   0.000      0.  0.280E+00  0.149E-01  0.958E-03  0.144E-03   25  15   1    9   7  22   20   9  29    0.000    0.000       0
+  0     53 00:01:12.56   1.4100A   1.2760  -0.2110   0.6140  0.032  0.00   0.000      0.  0.282E+00  0.146E-01  0.874E-03  0.132E-03   25  15   3    9   7  22   20   9  29    0.000    0.000       0
+  0     57 00:01:18.25   1.4300A   1.2597  -0.1819   0.5966  0.032  0.00   0.000      0.  0.283E+00  0.143E-01  0.804E-03  0.113E-03   25  15   4   12  17  29   17  15  18    0.000    0.000       0
+  0     61 00:01:24.07   1.4600A   1.2364   0.1626   0.5981  0.033  0.00   0.000      0.  0.284E+00  0.140E-01  0.726E-03  0.850E-04   24  15   4    8   0  28   17  16  18    0.000    0.000       0
+  0     66 00:01:31.47   1.5000A   1.1992  -0.1523   0.6091  0.034  0.00   0.000      0.  0.285E+00  0.137E-01  0.694E-03  0.749E-04   26  15   0    4   8  24   17  19  19    0.000    0.000       0
+  0     70 00:01:37.42   1.4700A   1.2214  -0.1477  -0.6692  0.034  0.00   0.000      0.  0.286E+00  0.137E-01  0.666E-03  0.695E-04   26  15   3    4   8  24   16  25  29    0.000    0.000       0
+  0     74 00:01:43.23   1.4400A   1.2457  -0.1615  -0.7282  0.035  0.00   0.000      0.  0.286E+00  0.137E-01  0.655E-03  0.743E-04   26  15   6    7   7  21   17  20  26    0.000    0.000       0
+  0     78 00:01:48***   1.4400A   1.2487  -0.1570  -0.7769  0.036  0.00   0.000      0.  0.286E+00  0.138E-01  0.659E-03  0.794E-04   26  15   9    7   7  21   16  20  26    0.000    0.000       0
+  0     82 00:01:54.76   1.4400A   1.2542  -0.1424  -0.7793  0.037  0.00   0.000      0.  0.286E+00  0.139E-01  0.646E-03  0.853E-04   26  15  12    7   6  21   16  25  27    0.000    0.000       0
+  0     86 00:02:00.49   1.4300A   1.2616  -0.1486  -0.8074  0.038  0.00   0.000      0.  0.286E+00  0.139E-01  0.640E-03  0.103E-03   26  15  14    7   7  19   15  24  28    0.000    0.000       0
+  0     90 00:02:06.21   1.4300A   1.2592  -0.1548  -0.8613  0.039  0.00   0.000      0.  0.285E+00  0.140E-01  0.634E-03  0.110E-03   27  15  17    7   7  19   16  14  27    0.000    0.000       0
+  0     95 00:02:13.32   1.4200A   1.2641  -0.1404  -0.9111  0.041  0.00   0.000      0.  0.284E+00  0.139E-01  0.610E-03  0.103E-03   26  15  20    7   7  19   15  31  27    0.000    0.000       0
+  0     99 00:02:19.03   1.4200A   1.2651  -0.1374  -0.9131  0.043  0.00   0.000      0.  0.283E+00  0.137E-01  0.595E-03  0.998E-04   26  10  19    7   6  19   14  14  28    0.000    0.000       0
+  0    103 00:02:24.71   1.4200A   1.2716  -0.1300  -0.9362  0.045  0.00   0.000      0.  0.282E+00  0.133E-01  0.593E-03  0.103E-03   26  18  21    7   3  21   14  23  28    0.000    0.000       0
+  0    107 00:02:30.37   1.4200A   1.2644  -0.1168  -0.9288  0.046  0.00   0.000      0.  0.280E+00  0.129E-01  0.595E-03  0.105E-03   26  24  23    7   3  21   13  27  28    0.000    0.000       0
+  0    111 00:02:36.09   1.4300A   1.2573  -0.1113  -0.9088  0.046  0.00   0.000      0.  0.278E+00  0.124E-01  0.600E-03  0.973E-04   27  15  25    7   6  18   13  27  28    0.000    0.000       0
+  0    116 00:02:43.29   1.4500A   1.2417  -0.1013  -0.8679  0.045  0.00   0.000      0.  0.276E+00  0.118E-01  0.568E-03  0.737E-04   27  10  27    4   7  21   12  27  28    0.000    0.000       0
+  0    120 00:02:49.13   1.4700A   1.2267   0.1036  -0.8360  0.044  0.00   0.000      0.  0.274E+00  0.114E-01  0.561E-03  0.673E-04   27  10  30    6  37  21   12  35  28    0.000    0.000       0
+  0    124 00:02:55.01   1.4700A   1.2241  -0.1084  -0.8112  0.042  0.00   0.000      0.  0.273E+00  0.112E-01  0.574E-03  0.778E-04   26  29  31    3  22  16   12   2  28    0.000    0.000       0
+  0    128 00:03:00.88   1.4600A   1.2296   0.1097  -0.7913  0.039  0.00   0.000      0.  0.272E+00  0.109E-01  0.582E-03  0.794E-04   26  29  33    6  37  20   12   7  28    0.000    0.000       0
+  0    132 00:03:06.74   1.4700A   1.2286   0.1117  -0.7904  0.037  0.00   0.000      0.  0.272E+00  0.107E-01  0.592E-03  0.774E-04   26  29  35    6  37  20   11   7  28    0.000    0.000       0
+  0    136 00:03:12.62   1.4700A   1.2244   0.0965  -0.7815  0.035  0.00   0.000      0.  0.272E+00  0.105E-01  0.582E-03  0.748E-04   26  29  37    4  34  15   11   7  28    0.000    0.000       0
+  0    140 00:03:18.50   1.4700A   1.2256  -0.0932  -0.7586  0.034  0.00   0.000      0.  0.273E+00  0.102E-01  0.575E-03  0.719E-04   27  10  38    4   6  19   10   6  28    0.000    0.000       0
+  0    144 00:03:24.37   1.4700A   1.2280  -0.0989  -0.7410  0.031  0.00   0.000      0.  0.273E+00  0.101E-01  0.567E-03  0.699E-04   27  10   1    4   6  19   10   6  28    0.000    0.000       0
+  0    148 00:03:30.21   1.4600A   1.2296  -0.0967  -0.7286  0.029  0.00   0.000      0.  0.273E+00  0.991E-02  0.567E-03  0.724E-04   27  10   3    4   5  19   10   5  27    0.000    0.000       0
+  0    152 00:03:36.08   1.4700A   1.2276  -0.0932  -0.7197  0.028  0.00   0.000      0.  0.274E+00  0.981E-02  0.567E-03  0.778E-04   27  10   5    3  39  26    9   5  27    0.000    0.000       0
+  0    157 00:03:43.46   1.4800A   1.2158  -0.0992  -0.6959  0.028  0.00   0.000      0.  0.274E+00  0.974E-02  0.536E-03  0.701E-04   27  11   8    3  39  26    9   5  26    0.000    0.000       0
+  0    161 00:03:49.41   1.4900A   1.2097  -0.0987  -0.6814  0.029  0.00   0.000      0.  0.275E+00  0.975E-02  0.493E-03  0.496E-04   26  29   9    4  32  21    9   5  26    0.000    0.000       0
+  0    165 00:03:55.37   1.4900A   1.2114   0.1247  -0.6642  0.031  0.00   0.000      0.  0.276E+00  0.984E-02  0.455E-03  0.311E-04   26  29  11    6  33  21    8   6  26    0.000    0.000       0
+  0    169 00:04:01.29   1.4800A   1.2203   0.1313  -0.6453  0.032  0.00   0.000      0.  0.278E+00  0.100E-01  0.448E-03  0.332E-04   26  15  14    6  33  21    8   8  26    0.000    0.000       0
+  0    173 00:04:07.15   1.4600A   1.2321   0.1553  -0.6302  0.034  0.00   0.000      0.  0.279E+00  0.103E-01  0.463E-03  0.418E-04   26  15  16    6  33  20    8   4  25    0.000    0.000       0
+  0    177 00:04:12.95   1.4400A   1.2458   0.1809  -0.6160  0.036  0.00   0.000      0.  0.281E+00  0.106E-01  0.463E-03  0.418E-04   26  29  18    6  33  20    8   8  25    0.000    0.000       0
+  0    181 00:04:18.71   1.4400A   1.2520   0.1949  -0.6063  0.039  0.00   0.000      0.  0.282E+00  0.109E-01  0.464E-03  0.412E-04   26  29  20    7  33  19    8  27  25    0.000    0.000       0
+  0    185 00:04:24.47   1.4400A   1.2516   0.2085   0.6054  0.042  0.00   0.000      0.  0.282E+00  0.111E-01  0.485E-03  0.563E-04   26  15  22    9  33  19    8  13  19    0.000    0.000       0
+  0    189 00:04:30.25   1.4500A   1.2383   0.2428   0.5991  0.044  0.00   0.000      0.  0.282E+00  0.113E-01  0.513E-03  0.770E-04   26  15  24   10  33  19    8  37  19    0.000    0.000       0
+  0    193 00:04:36.14   1.4800A   1.2144   0.2641  -0.5913  0.046  0.00   0.000      0.  0.281E+00  0.113E-01  0.536E-03  0.937E-04   28  37  20   10  33  19    8  11  24    0.000    0.000       0
+  0    197 00:04:42.04   1.4700A   1.2215  -0.2677   0.5906  0.046  0.00   0.000      0.  0.280E+00  0.112E-01  0.537E-03  0.968E-04   28   1  23   10  19  19    8  27  18    0.000    0.000       0
+  0    202 00:04:49.40   1.4800A   1.2182  -0.2704   0.5919  0.046  0.00   0.000      0.  0.277E+00  0.109E-01  0.519E-03  0.886E-04   28  39  25   10  18  18    9  29  18    0.000    0.000       0
+  0    206 00:04:55.35   1.4900A   1.2051   0.2883  -0.6614  0.046  0.00   0.000      0.  0.275E+00  0.106E-01  0.486E-03  0.733E-04   28   2  28   10  22  18    9  31  23    0.000    0.000       0
+  0    210 00:05:01.35   1.5000A   1.2030   0.3013  -0.6716  0.044  0.00   0.000      0.  0.273E+00  0.102E-01  0.446E-03  0.493E-04   27  29  26   10  22  18    8  31  23    0.000    0.000       0
+  0    214 00:05:07.35   1.5000A   1.2038   0.2926  -0.6717  0.042  0.00   0.000      0.  0.271E+00  0.997E-02  0.415E-03  0.258E-04   27  29  28   10  23  17    9  19  22    0.000    0.000       0
+  0    218 00:05:13.31   1.4900A   1.2082   0.2970  -0.6899  0.040  0.00   0.000      0.  0.270E+00  0.978E-02  0.409E-03  0.291E-04   27  29  31   10  23  17    7  19  22    0.000    0.000       0
+  0    222 00:05:19.25   1.4800A   1.2166   0.2872  -0.6084  0.038  0.00   0.000      0.  0.270E+00  0.967E-02  0.427E-03  0.450E-04   27  29  33   10  23  17    7  20  22    0.000    0.000       0
+  0    226 00:05:25.14   1.4700A   1.2235   0.2789  -0.5798  0.036  0.00   0.000      0.  0.270E+00  0.963E-02  0.459E-03  0.631E-04   27  29  35   10  23  17    8   4  23    0.000    0.000       0
+  0    230 00:05:31.00   1.4600A   1.2308  -0.2744  -0.5556  0.034  0.00   0.000      0.  0.270E+00  0.962E-02  0.486E-03  0.760E-04   27  29  36    6  23  11    9  21  22    0.000    0.000       0
+  0    234 00:05:36.83   1.4500A   1.2387  -0.2882   0.5564  0.033  0.00   0.000      0.  0.271E+00  0.962E-02  0.500E-03  0.840E-04   27  29  38    6  23  11    9  30  17    0.000    0.000       0
+  0    238 00:05:42.63   1.4500A   1.2442  -0.3003   0.5375  0.032  0.00   0.000      0.  0.273E+00  0.962E-02  0.503E-03  0.880E-04   27  29   0    7  22  11    9  30  17    0.000    0.000       0
+  0    242 00:05:48.40   1.4400A   1.2473  -0.3164  -0.5325  0.031  0.00   0.000      0.  0.274E+00  0.962E-02  0.495E-03  0.836E-04   27  29   3    8  22  11    8  30  22    0.000    0.000       0
+  0    246 00:05:54.16   1.4400A   1.2506  -0.3177   0.5287  0.032  0.00   0.000      0.  0.275E+00  0.965E-02  0.476E-03  0.729E-04   27  29   5    8  22  11    9  18  16    0.000    0.000       0
+  0    251 00:06:01.36   1.4400A   1.2527  -0.2996  -0.5701  0.033  0.00   0.000      0.  0.277E+00  0.977E-02  0.431E-03  0.520E-04   27  29   8    9  22  11    9  21  21    0.000    0.000       0
+  0    255 00:06:07.09   1.4300A   1.2571  -0.2781  -0.6004  0.036  0.00   0.000      0.  0.278E+00  0.993E-02  0.394E-03  0.344E-04   27  29  10   10  22  11    9  22  21    0.000    0.000       0
+  0    259 00:06:12.80   1.4200A   1.2657  -0.2570   0.6615  0.039  0.00   0.000      0.  0.279E+00  0.102E-01  0.385E-03  0.350E-04   27  29  12   10  21  11    8  19  16    0.000    0.000       0
+  0    263 00:06:18.46   1.4100A   1.2784  -0.2484   0.6841  0.042  0.00   0.000      0.  0.281E+00  0.104E-01  0.400E-03  0.465E-04   27  29  14   15  25  13    9  19  16    0.000    0.000       0
+  0    267 00:06:24.05   1.3900A   1.2923  -0.2425   0.6607  0.044  0.00   0.000      0.  0.282E+00  0.107E-01  0.423E-03  0.590E-04   27  29  16   16  24  13    9  18  16    0.000    0.000       0
+  0    272 00:06:30.97   1.3800A   1.3066   0.2425   0.6560  0.047  0.00   0.000      0.  0.282E+00  0.109E-01  0.452E-03  0.717E-04   27  29  19   13  35  20   10  18  15    0.000    0.000       0
+  0    276 00:06:36.46   1.3700A   1.3118   0.2433   0.6169  0.049  0.00   0.000      0.  0.282E+00  0.110E-01  0.466E-03  0.812E-04   27  29  21   13  35  20   10  18  15    0.000    0.000       0
+  0    281 00:06:43.32   1.3800A   1.3084   0.2406  -0.6316  0.050  0.00   0.000      0.  0.280E+00  0.108E-01  0.470E-03  0.892E-04   27  29  24   14  35  19   17   3  29    0.000    0.000       0
+  0    285 00:06:48.86   1.3900A   1.2954  -0.2534  -0.6188  0.049  0.00   0.000      0.  0.278E+00  0.105E-01  0.457E-03  0.864E-04   27  29  26   13  10  17   16  31  29    0.000    0.000       0
+  0    289 00:06:54.46   1.4100A   1.2808  -0.2595  -0.5869  0.047  0.00   0.000      0.  0.276E+00  0.101E-01  0.433E-03  0.743E-04   28  15  27   15  28  19   17   6  29    0.000    0.000       0
+  0    293 00:07:00.12   1.4200A   1.2657   0.2428   0.5853  0.045  0.00   0.000      0.  0.274E+00  0.965E-02  0.394E-03  0.541E-04   28  15  29   13  14  21   10   5  15    0.000    0.000       0
+  0    298 00:07:07.29   1.4400A   1.2507  -0.2484   0.5439  0.043  0.00   0.000      0.  0.272E+00  0.922E-02  0.360E-03  0.342E-04   28  15  32   15  27  20   11   5  15    0.000    0.000       0
+  0    302 00:07:13.06   1.4500A   1.2448   0.2309   0.5422  0.041  0.00   0.000      0.  0.272E+00  0.901E-02  0.364E-03  0.420E-04   28  15  34   15  34  18   11  27  15    0.000    0.000       0
+  0    306 00:07:18.86   1.4500A   1.2416   0.2338   0.5300  0.039  0.00   0.000      0.  0.271E+00  0.890E-02  0.379E-03  0.528E-04   28   3  35   14  35  21   10   9  15    0.000    0.000       0
+  0    310 00:07:24.66   1.4500A   1.2417  -0.2347   0.5316  0.037  0.00   0.000      0.  0.272E+00  0.887E-02  0.399E-03  0.610E-04   28   3  37   20  19  13   11   9  15    0.000    0.000       0
+  0    314 00:07:30.44   1.4400A   1.2482  -0.2397   0.5431  0.036  0.00   0.000      0.  0.273E+00  0.889E-02  0.414E-03  0.682E-04   28   4  38   20  19  13   11  16  16    0.000    0.000       0
+  0    318 00:07:36.20   1.4400A   1.2522   0.2278   0.5625  0.035  0.00   0.000      0.  0.273E+00  0.895E-02  0.422E-03  0.726E-04   28   4   1   16  34  19   12  16  16    0.000    0.000       0
+  0    323 00:07:43.40   1.4400A   1.2542   0.2297   0.5461  0.034  0.00   0.000      0.  0.275E+00  0.905E-02  0.416E-03  0.676E-04   28   4   4   20  12  14   12  16  16    0.000    0.000       0
+  0    327 00:07:49.16   1.4400A   1.2513   0.2336   0.5369  0.035  0.00   0.000      0.  0.276E+00  0.916E-02  0.397E-03  0.563E-04   28   4   7   20  12  14   13  18  16    0.000    0.000       0
+  0    331 00:07:54.92   1.4400A   1.2525   0.2483   0.5309  0.036  0.00   0.000      0.  0.277E+00  0.930E-02  0.378E-03  0.429E-04   27  34   6   20   6  29   12  24  15    0.000    0.000       0
+  0    335 00:08:00.67   1.4300A   1.2553   0.2689   0.5245  0.038  0.00   0.000      0.  0.278E+00  0.947E-02  0.357E-03  0.311E-04   27  18   9   19   6  29   12  25  16    0.000    0.000       0
+  0    339 00:08:06.39   1.4300A   1.2588   0.3750   0.5284  0.041  0.00   0.000      0.  0.279E+00  0.966E-02  0.353E-03  0.314E-04   27  18  11   20   3  28   13  25  16    0.000    0.000       0
+  0    343 00:08:12.09   1.4200A   1.2667   0.3426   0.5231  0.044  0.00   0.000      0.  0.280E+00  0.985E-02  0.364E-03  0.447E-04   27  19  13   20   3  28   13  25  16    0.000    0.000       0
+  0    348 00:08:19.15   1.4100A   1.2801   0.3316  -0.5633  0.047  0.00   0.000      0.  0.281E+00  0.100E-01  0.386E-03  0.600E-04   27  19  16   20  19  29   17  29  29    0.000    0.000       0
+  0    352 00:08:24.75   1.4000A   1.2872   0.3144  -0.5973  0.049  0.00   0.000      0.  0.281E+00  0.101E-01  0.393E-03  0.653E-04   27  19  18   19  19  29   16  29  29    0.000    0.000       0
+  0    356 00:08:30.33   1.3900A   1.2920   0.3813  -0.6125  0.050  0.00   0.000      0.  0.280E+00  0.101E-01  0.394E-03  0.651E-04   27  34  20   20   5  29   16  28  29    0.000    0.000       0
+  0    361 00:08:37.28   1.3900A   1.2921   0.3938  -0.6141  0.051  0.00   0.000      0.  0.279E+00  0.989E-02  0.390E-03  0.615E-04   27  34  22   20   6  29   16  13  29    0.000    0.000       0
+  0    365 00:08:42.86   1.4000A   1.2884   0.4067  -0.6311  0.050  0.00   0.000      0.  0.278E+00  0.965E-02  0.385E-03  0.574E-04   27   4  26   19   6  29   16   1  29    0.000    0.000       0
+  0    369 00:08:48.48   1.4100A   1.2768   0.3650  -0.6258  0.050  0.00   0.000      0.  0.276E+00  0.936E-02  0.375E-03  0.509E-04   27   4  29   18   6  29   15   1  29    0.000    0.000       0
+  0    373 00:08:54.13   1.4200A   1.2716  -0.3358  -0.6088  0.048  0.00   0.000      0.  0.275E+00  0.907E-02  0.359E-03  0.392E-04   26   4  26   17  10  29   15   1  29    0.000    0.000       0
+  0    378 00:09:01.24   1.4200A   1.2671   0.3041  -0.5881  0.046  0.00   0.000      0.  0.273E+00  0.879E-02  0.340E-03  0.263E-04   26   4  29   17   7  29   13   0  29    0.000    0.000       0
+  0    382 00:09:06.96   1.4300A   1.2602   0.2843  -0.5793  0.044  0.00   0.000      0.  0.272E+00  0.867E-02  0.348E-03  0.314E-04   27  29  33   17   7  29   12   0  29    0.000    0.000       0
+  0    386 00:09:12.68   1.4300A   1.2627   0.2976  -0.5738  0.042  0.00   0.000      0.  0.272E+00  0.866E-02  0.372E-03  0.461E-04   27  29  35   20  15  14   12   0  29    0.000    0.000       0
+  0    390 00:09:18.36   1.4200A   1.2633  -0.2877  -0.5635  0.041  0.00   0.000      0.  0.272E+00  0.872E-02  0.397E-03  0.600E-04   27  29  37   22  35  18   11   0  29    0.000    0.000       0
+  0    394 00:09:24.06   1.4200A   1.2670  -0.3422  -0.5448  0.039  0.00   0.000      0.  0.273E+00  0.881E-02  0.416E-03  0.691E-04   28  39  36   22  35  20   10   0  29    0.000    0.000       0
+  0    399 00:09:31.17   1.4200A   1.2639   0.3866  -0.5293  0.039  0.00   0.000      0.  0.274E+00  0.893E-02  0.419E-03  0.679E-04   28  39   0   22   8  28   10  37  28    0.000    0.000       0
+  0    403 00:09:36.86   1.4300A   1.2612   0.3711  -0.5229  0.040  0.00   0.000      0.  0.275E+00  0.903E-02  0.409E-03  0.590E-04   30  15   2   22   8  29    9  37  28    0.000    0.000       0
+  0    407 00:09:42.55   1.4200A   1.2669  -0.3959  -0.5241  0.041  0.00   0.000      0.  0.276E+00  0.914E-02  0.390E-03  0.481E-04   27   6   3   20  15  28   12  21  28    0.000    0.000       0
+  0    411 00:09:48.22   1.4200A   1.2690   0.3460  -0.5326  0.042  0.00   0.000      0.  0.277E+00  0.925E-02  0.379E-03  0.411E-04   27   6   5   19  34  29   12  21  28    0.000    0.000       0
+  0    416 00:09:55.26   1.4200A   1.2693  -0.3509  -0.5461  0.045  0.00   0.000      0.  0.278E+00  0.937E-02  0.371E-03  0.360E-04   28  29   9   23  26   4   16  30  29    0.000    0.000       0
+  0    420 00:10:00.89   1.4100A   1.2766   0.3405  -0.6153  0.048  0.00   0.000      0.  0.279E+00  0.946E-02  0.368E-03  0.360E-04   28  29  11   19  21  29   17  17  29    0.000    0.000       0
+  0    424 00:10:06.50   1.4000A   1.2875   0.3451  -0.6576  0.050  0.00   0.000      0.  0.279E+00  0.951E-02  0.371E-03  0.425E-04   28  29  14   19  21  29   16  17  29    0.000    0.000       0
+  0    428 00:10:12.07   1.3900A   1.2984  -0.3587  -0.6673  0.052  0.00   0.000      0.  0.279E+00  0.953E-02  0.378E-03  0.497E-04   28  29  16   23  28   8   15  17  29    0.000    0.000       0
+  0    433 00:10:18.94   1.3700A   1.3126  -0.3538  -0.6527  0.054  0.00   0.000      0.  0.278E+00  0.948E-02  0.374E-03  0.508E-04   27   7  17   23  27  10   14  18  29    0.000    0.000       0
+  0    437 00:10:24.38   1.3600A   1.3232  -0.3681  -0.6488  0.055  0.00   0.000      0.  0.277E+00  0.939E-02  0.370E-03  0.482E-04   27   7  19   23  27  12   14  15  29    0.000    0.000       0
+  0    442 00:10:31.15   1.3600A   1.3261  -0.3269  -0.6163  0.055  0.00   0.000      0.  0.276E+00  0.923E-02  0.363E-03  0.433E-04   27  28  24   23  27  14   13  15  29    0.000    0.000       0
+  0    446 00:10:36.60   1.3700A   1.3182   0.3380  -0.5838  0.055  0.00   0.000      0.  0.275E+00  0.908E-02  0.355E-03  0.376E-04   27  28  27   24  37  16   12  15  29    0.000    0.000       0
+  0    450 00:10:42.07   1.3700A   1.3130   0.3470  -0.5579  0.054  0.00   0.000      0.  0.274E+00  0.895E-02  0.345E-03  0.290E-04   27  28  29   24  37  18   13  12  29    0.000    0.000       0
+  0    455 00:10:48***   1.3900A   1.2962   0.3831  -0.5394  0.052  0.00   0.000      0.  0.273E+00  0.882E-02  0.342E-03  0.231E-04   28  28  31   24  36  21   13  11  29    0.000    0.000       0
+  0    459 00:10:54.56   1.3900A   1.2967   0.3645  -0.5367  0.051  0.00   0.000      0.  0.272E+00  0.878E-02  0.348E-03  0.274E-04   27  27  33   25  37  24   10  23  27    0.000    0.000       0
+  0    463 00:11:00.11   1.3900A   1.2966   0.3781  -0.5363  0.049  0.00   0.000      0.  0.272E+00  0.881E-02  0.366E-03  0.364E-04   27  27  35   24  37  24   10  23  27    0.000    0.000       0
+  0    468 00:11:07.02   1.3700A   1.3119   0.3580  -0.5171  0.047  0.00   0.000      0.  0.272E+00  0.891E-02  0.387E-03  0.475E-04   28  19  37   24  37  26    9  22  27    0.000    0.000       0
+  0    472 00:11:12.49   1.3600A   1.3216  -0.3537  -0.5130  0.046  0.00   0.000      0.  0.273E+00  0.902E-02  0.399E-03  0.532E-04   28  35   0   24  22  20    9  23  27    0.000    0.000       0
+  0    477 00:11:19.31   1.3700A   1.3166  -0.3493  -0.4979  0.046  0.00   0.000      0.  0.274E+00  0.917E-02  0.409E-03  0.544E-04   28  35   4   20  30  29    9  23  27    0.000    0.000       0
+  0    481 00:11:24.77   1.3700A   1.3162  -0.4886   0.5032  0.046  0.00   0.000      0.  0.275E+00  0.928E-02  0.412E-03  0.525E-04   28  35   7   20  29  29   20   8  29    0.000    0.000       0
+  0    485 00:11:30.23   1.3700A   1.3140  -0.5295  -0.6003  0.047  0.00   0.000      0.  0.276E+00  0.938E-02  0.414E-03  0.516E-04   28  35  10   20  29  29   18  32  29    0.000    0.000       0
+  0    490 00:11:37.05   1.3700A   1.3180  -0.4940  -0.7259  0.048  0.00   0.000      0.  0.277E+00  0.948E-02  0.412E-03  0.498E-04   28  35  13   19  29  29   17  32  29    0.000    0.000       0
+  0    494 00:11:42.49   1.3500A   1.3304  -0.4929  -0.7246  0.050  0.00   0.000      0.  0.278E+00  0.954E-02  0.402E-03  0.460E-04   27  19  16   20  35  28   16  32  29    0.000    0.000       0
+  0    499 00:11:49.29   1.3600A   1.3198  -0.5202  -0.6617  0.052  0.00   0.000      0.  0.278E+00  0.958E-02  0.398E-03  0.399E-04   27  19  20   19   3  29   14  31  29    0.000    0.000       0
+  0    503 00:11:54.74   1.3600A   1.3247  -0.5435  -0.7194  0.053  0.00   0.000      0.  0.278E+00  0.958E-02  0.396E-03  0.366E-04   27  19  23   19   2  29   16   6  29    0.000    0.000       0
+  0    507 00:12:00.15   1.3600A   1.3271  -0.5315  -0.7257  0.054  0.00   0.000      0.  0.278E+00  0.955E-02  0.393E-03  0.349E-04   27  19  26   18   2  29   15   5  29    0.000    0.000       0
+  0    512 00:12:06.86   1.3400A   1.3456  -0.4679  -0.7083  0.055  0.00   0.000      0.  0.278E+00  0.947E-02  0.383E-03  0.322E-04   27  19  29   17   1  29   14   5  29    0.000    0.000       0
+  0    516 00:12:12.26   1.3500A   1.3307  -0.4414  -0.6829  0.055  0.00   0.000      0.  0.277E+00  0.937E-02  0.376E-03  0.299E-04   28  15  27   16   1  29   13   4  29    0.000    0.000       0
+  0    521 00:12:19.06   1.3600A   1.3207   0.3918  -0.6417  0.056  0.00   0.000      0.  0.276E+00  0.923E-02  0.368E-03  0.280E-04   28  15  30   26   8  16   12   4  29    0.000    0.000       0
+  0    525 00:12:24.52   1.3700A   1.3145   0.3927  -0.5930  0.055  0.00   0.000      0.  0.275E+00  0.911E-02  0.362E-03  0.245E-04   28  15  33   25   9  15   11   4  29    0.000    0.000       0
+  0    529 00:12:30.03   1.3800A   1.3007   0.3886  -0.5490  0.055  0.00   0.000      0.  0.275E+00  0.902E-02  0.358E-03  0.212E-04   28  15  36   25   9  17    9   4  29    0.000    0.000       0
+  0    534 00:12:36.97   1.3900A   1.2982   0.3693  -0.5214  0.054  0.00   0.000      0.  0.274E+00  0.895E-02  0.358E-03  0.224E-04   28  27  35   26  10  23   15  14  29    0.000    0.000       0
+  0    538 00:12:42.48   1.3800A   1.3083   0.3488  -0.5237  0.053  0.00   0.000      0.  0.274E+00  0.893E-02  0.360E-03  0.258E-04   28  27  37   26  10  26   14  14  29    0.000    0.000       0
+  0    543 00:12:49.35   1.3800A   1.3046  -0.3318  -0.5115  0.052  0.00   0.000      0.  0.274E+00  0.895E-02  0.368E-03  0.312E-04   28  27   1   24  13  39   13  14  29    0.000    0.000       0
+  0    547 00:12:54.86   1.3800A   1.3028  -0.3753  -0.4996  0.052  0.00   0.000      0.  0.275E+00  0.899E-02  0.375E-03  0.352E-04   28  27   3   24  13   0   12  14  29    0.000    0.000       0
+  0    551 00:13:00.42   1.3900A   1.2916  -0.3915  -0.4834  0.051  0.00   0.000      0.  0.275E+00  0.904E-02  0.383E-03  0.378E-04   28  27   6   21   4  19   11  14  29    0.000    0.000       0
+  0    556 00:13:07.37   1.3900A   1.2980  -0.3727  -0.4913  0.051  0.00   0.000      0.  0.276E+00  0.911E-02  0.387E-03  0.386E-04   29   7   2   25  13   6   15  10  29    0.000    0.000       0
+  0    560 00:13:12.91   1.3800A   1.3049  -0.3632  -0.4961  0.051  0.00   0.000      0.  0.276E+00  0.917E-02  0.382E-03  0.360E-04   27   8  14   24  11   6   14  10  29    0.000    0.000       0
+  0    564 00:13:18.39   1.3500A   1.3329   0.3716  -0.5061  0.051  0.00   0.000      0.  0.277E+00  0.922E-02  0.372E-03  0.328E-04   27   8  16   26  11  35   13  10  29    0.000    0.000       0
+  0    569 00:13:25.13   1.3300A   1.3512  -0.4728  -0.4991  0.052  0.00   0.000      0.  0.277E+00  0.927E-02  0.368E-03  0.307E-04   27   8  19   20  13  29   12  10  29    0.000    0.000       0
+  0    573 00:13:30.51   1.3500A   1.3312  -0.4393  -0.5736  0.053  0.00   0.000      0.  0.277E+00  0.929E-02  0.374E-03  0.315E-04   27   8  21   19  13  29   18  16  29    0.000    0.000       0
+  0    578 00:13:37.29   1.3600A   1.3248   0.4108  -0.6222  0.054  0.00   0.000      0.  0.277E+00  0.928E-02  0.375E-03  0.311E-04   27   8  24   20   8  29   17  17  29    0.000    0.000       0
+  0    582 00:13:42.79   1.3800A   1.3002   0.4733  -0.6660  0.055  0.00   0.000      0.  0.277E+00  0.924E-02  0.378E-03  0.301E-04   28   7  24   19   8  29   17   5  29    0.000    0.000       0
+  0    586 00:13:48.33   1.3800A   1.3015   0.4603  -0.7929  0.055  0.00   0.000      0.  0.276E+00  0.917E-02  0.375E-03  0.276E-04   23  23  24   19   9  29   17   7  29    0.000    0.000       0
+  0    591 00:13:55.27   1.3800A   1.2997   0.4533  -0.7724  0.055  0.00   0.000      0.  0.276E+00  0.907E-02  0.367E-03  0.244E-04   27   7  30   20  11  29   16   8  29    0.000    0.000       0
+  0    595 00:14:00.80   1.3800A   1.3071   0.4155  -0.7399  0.056  0.00   0.000      0.  0.276E+00  0.899E-02  0.362E-03  0.239E-04   27   7  33   19  11  29   15   8  29    0.000    0.000       0
+  0    599 00:14:06.32   1.3800A   1.3036   0.3913  -0.6519  0.055  0.00   0.000      0.  0.275E+00  0.891E-02  0.358E-03  0.232E-04   27   7  36   19  11  29   15   9  29    0.000    0.000       0
+  0    604 00:14:13.28   1.3900A   1.2919  -0.3765  -0.5950  0.055  0.00   0.000      0.  0.275E+00  0.884E-02  0.356E-03  0.226E-04   27  11  34   24   5  32   14  10  29    0.000    0.000       0
+  0    608 00:14:18.76   1.3600A   1.3263  -0.3619  -0.5575  0.054  0.00   0.000      0.  0.275E+00  0.880E-02  0.347E-03  0.221E-04   26   7   2   23  23  18   13  10  29    0.000    0.000       0
+  0    612 00:14:24.13   1.3400A   1.3444  -0.3504  -0.5181  0.054  0.00   0.000      0.  0.275E+00  0.880E-02  0.344E-03  0.239E-04   26   7   5   23  23  20   11  10  29    0.000    0.000       0
+  0    617 00:14:30.94   1.3800A   1.3083  -0.3480  -0.4800  0.053  0.00   0.000      0.  0.275E+00  0.882E-02  0.362E-03  0.286E-04   26   7   8   23   8   1   10  11  29    0.000    0.000       0
+  0    621 00:14:36.51   1.3800A   1.3013  -0.3678  -0.4671  0.052  0.00   0.000      0.  0.275E+00  0.885E-02  0.365E-03  0.301E-04   28   6  11   23   8   3   10  20  28    0.000    0.000       0
+  0    625 00:14:41***   1.3600A   1.3187  -0.3932  -0.4593  0.052  0.00   0.000      0.  0.275E+00  0.888E-02  0.361E-03  0.294E-04   28   6  14   20  18  28    9  20  28    0.000    0.000       0
+  0    630 00:14:48.83   1.3700A   1.3144   0.4088  -0.4928  0.051  0.00   0.000      0.  0.275E+00  0.892E-02  0.365E-03  0.275E-04   28   6  17   20  22  29   18  20  29    0.000    0.000       0
+  0    634 00:14:54.34   1.3800A   1.3003  -0.3906  -0.5381  0.051  0.00   0.000      0.  0.275E+00  0.895E-02  0.368E-03  0.263E-04   28   6  20   23   6   9   18  19  29    0.000    0.000       0
+  0    639 00:15:01.34   1.4000A   1.2862  -0.3878  -0.5672  0.050  0.00   0.000      0.  0.275E+00  0.898E-02  0.375E-03  0.262E-04   31  14  20   23   6  12   17  19  29    0.000    0.000       0
+  0    643 00:15:06.93   1.4000A   1.2897  -0.3866  -0.5248  0.050  0.00   0.000      0.  0.275E+00  0.900E-02  0.377E-03  0.256E-04   31  14  22   23   5  14   16  19  29    0.000    0.000       0
+  0    647 00:15:12.49   1.3900A   1.2963  -0.3777  -0.4817  0.050  0.00   0.000      0.  0.275E+00  0.902E-02  0.377E-03  0.249E-04   31  14  25   23   5  16   17  29  29    0.000    0.000       0
+  0    651 00:15:18.05   1.3900A   1.2969  -0.4013  -0.5039  0.050  0.00   0.000      0.  0.275E+00  0.906E-02  0.377E-03  0.245E-04   31  14  28   20  33  28   17  29  29    0.000    0.000       0
+  0    656 00:15:24.99   1.3800A   1.3030  -0.3617  -0.5050  0.050  0.00   0.000      0.  0.276E+00  0.911E-02  0.375E-03  0.251E-04   26  28  34   23   3  21   16  30  29    0.000    0.000       0
+  0    660 00:15:30.50   1.3700A   1.3141  -0.3718  -0.4935  0.050  0.00   0.000      0.  0.276E+00  0.918E-02  0.374E-03  0.267E-04   26  28  37   23   2  21   15  30  29    0.000    0.000       0
+  0    664 00:15:35***   1.3800A   1.3091  -0.3631  -0.4786  0.050  0.00   0.000      0.  0.276E+00  0.927E-02  0.382E-03  0.288E-04   26  28  39   23  17  24   14  30  29    0.000    0.000       0
+  0    669 00:15:42.86   1.3700A   1.3159   0.4226  -0.4621  0.051  0.00   0.000      0.  0.277E+00  0.940E-02  0.387E-03  0.296E-04   27  28   3   20  19  28   13  30  29    0.000    0.000       0
+  0    673 00:15:48.31   1.3600A   1.3242   0.4288  -0.4668  0.052  0.00   0.000      0.  0.277E+00  0.949E-02  0.388E-03  0.295E-04   27  28   5   20  17  29   20  15  26    0.000    0.000       0
+  0    678 00:15:55.03   1.3300A   1.3508   0.4664  -0.6242  0.053  0.00   0.000      0.  0.277E+00  0.957E-02  0.383E-03  0.276E-04   27  29   9   19  17  29   17  13  29    0.000    0.000       0
+  0    682 00:16:00.34   1.3300A   1.3559   0.4459  -0.7409  0.053  0.00   0.000      0.  0.277E+00  0.959E-02  0.384E-03  0.270E-04   27  29  11   18  17  29   16  12  29    0.000    0.000       0
+  0    687 00:16:06.90   1.3100A   1.3707  -0.4830  -0.7783  0.054  0.00   0.000      0.  0.277E+00  0.956E-02  0.380E-03  0.276E-04   27  29  15   19   8  29   16  15  29    0.000    0.000       0
+  0    691 00:16:12.20   1.3300A   1.3485  -0.4705  -0.7742  0.054  0.00   0.000      0.  0.277E+00  0.950E-02  0.382E-03  0.271E-04   27  29  17   19   8  29   15  15  29    0.000    0.000       0
+  0    696 00:16:18.90   1.3300A   1.3574  -0.4542  -0.7578  0.054  0.00   0.000      0.  0.276E+00  0.938E-02  0.380E-03  0.260E-04   28  29  22   18   7  29   13  14  29    0.000    0.000       0
+  0    700 00:16:24.16   1.3000A   1.3823  -0.4370  -0.7272  0.054  0.00   0.000      0.  0.276E+00  0.928E-02  0.372E-03  0.256E-04   28  29  25   18   7  29   12  14  29    0.000    0.000       0
+  0    705 00:16:30.64   1.2900A   1.3956  -0.4098  -0.6869  0.053  0.00   0.000      0.  0.276E+00  0.917E-02  0.371E-03  0.272E-04   28  29  28   17   7  29   11  14  29    0.000    0.000       0
+  0    710 00:16:37.03   1.2700A   1.4175  -0.3874  -0.6413  0.052  0.00   0.000      0.  0.275E+00  0.909E-02  0.367E-03  0.284E-04   28  29  32   23   8   9   10  14  29    0.000    0.000       0
+  0    714 00:16:42.13   1.2800A   1.4092  -0.3954  -0.6046  0.051  0.00   0.000      0.  0.276E+00  0.904E-02  0.370E-03  0.291E-04   28  29  35   20  27  28    9  14  29    0.000    0.000       0
+  0    719 00:16:48.53   1.2800A   1.4041  -0.3654  -0.5611  0.051  0.00   0.000      0.  0.276E+00  0.898E-02  0.365E-03  0.261E-04   28  29  38   23   7  12    9  10  29    0.000    0.000       0
+  0    724 00:16:54.95   1.2800A   1.4012  -0.3732  -0.5313  0.050  0.00   0.000      0.  0.276E+00  0.893E-02  0.359E-03  0.228E-04   28  29   2   23   6  14    8  10  29    0.000    0.000       0
+  0    728 00:17:00.12   1.2900A   1.3931  -0.3862  -0.5183  0.050  0.00   0.000      0.  0.276E+00  0.889E-02  0.359E-03  0.214E-04   28  29   5   25  10  28   12  20  28    0.000    0.000       0
+  0    733 00:17:06.65   1.3100A   1.3698  -0.3706  -0.5220  0.050  0.00   0.000      0.  0.276E+00  0.886E-02  0.357E-03  0.200E-04   28  29   8   25  10  30   11  20  28    0.000    0.000       0
+  0    738 00:17:13.22   1.3100A   1.3694   0.4034  -0.5198  0.050  0.00   0.000      0.  0.276E+00  0.886E-02  0.357E-03  0.228E-04   29  30  11   28  12  10   11  19  28    0.000    0.000       0
+  0    742 00:17:18.50   1.3200A   1.3655   0.3957  -0.5023  0.050  0.00   0.000      0.  0.276E+00  0.887E-02  0.365E-03  0.276E-04   29  30  14   28  13  12   10  19  28    0.000    0.000       0
+  0    747 00:17:25.12   1.3200A   1.3594   0.3791  -0.4956  0.050  0.00   0.000      0.  0.276E+00  0.890E-02  0.370E-03  0.299E-04   29  30  18   28  13  15    9  19  27    0.000    0.000       0
+  0    751 00:17:30.43   1.3300A   1.3510   0.3743  -0.4941  0.051  0.00   0.000      0.  0.277E+00  0.891E-02  0.374E-03  0.292E-04   29  30  21   28  15  17    8  19  27    0.000    0.000       0
+  0    756 00:17:37.11   1.3400A   1.3387   0.3948  -0.4645  0.051  0.00   0.000      0.  0.276E+00  0.890E-02  0.377E-03  0.283E-04   29  30  24   20  31  29    6  19  27    0.000    0.000       0
+  0    760 00:17:42.51   1.3500A   1.3350   0.3919  -0.4432  0.050  0.00   0.000      0.  0.276E+00  0.888E-02  0.377E-03  0.262E-04   36  21  28   20  31  29   17  28  29    0.000    0.000       0
+  0    765 00:17:49.21   1.3400A   1.3471  -0.3873  -0.4498  0.050  0.00   0.000      0.  0.276E+00  0.885E-02  0.371E-03  0.238E-04   36  21  32   20  31  28   16  28  29    0.000    0.000       0
+  0    769 00:17:54.54   1.3300A   1.3496  -0.4054  -0.4553  0.050  0.00   0.000      0.  0.276E+00  0.881E-02  0.368E-03  0.234E-04   36  21  35   20  31  28   16  15  29    0.000    0.000       0
+  0    774 00:18:01.21   1.3300A   1.3487  -0.4227  -0.5118  0.050  0.00   0.000      0.  0.275E+00  0.876E-02  0.365E-03  0.225E-04   36  21  39   19  10  29   17  14  29    0.000    0.000       0
+  0    778 00:18:06.57   1.3400A   1.3421  -0.3975  -0.5352  0.050  0.00   0.000      0.  0.275E+00  0.873E-02  0.366E-03  0.225E-04   36  21   2   19  10  29   17  13  29    0.000    0.000       0
+  0    783 00:18:13.26   1.3400A   1.3452  -0.3663  -0.5658  0.050  0.00   0.000      0.  0.275E+00  0.871E-02  0.364E-03  0.230E-04   32   9  32   23  17  26   16  13  29    0.000    0.000       0
+  0    787 00:18:18.59   1.3400A   1.3451  -0.3678  -0.5760  0.050  0.00   0.000      0.  0.276E+00  0.871E-02  0.363E-03  0.245E-04   32   9  36   23  17  27   15  13  29    0.000    0.000       0
+  0    792 00:18:25.31   1.3500A   1.3330  -0.3590  -0.5697  0.050  0.00   0.000      0.  0.276E+00  0.875E-02  0.372E-03  0.303E-04   34   8  11   24   2  34   14  13  29    0.000    0.000       0
+  0    796 00:18:30.68   1.3300A   1.3554  -0.3952  -0.5664  0.050  0.00   0.000      0.  0.277E+00  0.879E-02  0.373E-03  0.336E-04   31   9   2   24   2  36   13  13  29    0.000    0.000       0
+  0    801 00:18:37.25   1.3000A   1.3804  -0.4231  -0.5545  0.051  0.00   0.000      0.  0.277E+00  0.884E-02  0.368E-03  0.330E-04   31   9   6   24   1  38   12  13  29    0.000    0.000       0
+  0    805 00:18:42.45   1.3000A   1.3809  -0.4562  -0.5425  0.051  0.00   0.000      0.  0.277E+00  0.887E-02  0.367E-03  0.323E-04   31   9   9   24   1   0   11  13  29    0.000    0.000       0
+  0    810 00:18:48.95   1.3100A   1.3746  -0.4717  -0.5124  0.051  0.00   0.000      0.  0.278E+00  0.888E-02  0.370E-03  0.327E-04   31   9  13   24   1   2   10  13  29    0.000    0.000       0
+  0    814 00:18:54.24   1.3400A   1.3482  -0.4367  -0.5164  0.052  0.00   0.000      0.  0.278E+00  0.886E-02  0.374E-03  0.319E-04   35  24  26   24   1   4   18   4  29    0.000    0.000       0
+  0    819 00:19:00.91   1.3300A   1.3531   0.5023  -0.6542  0.052  0.00   0.000      0.  0.277E+00  0.881E-02  0.361E-03  0.277E-04   35  24  30   19   8  29   17   4  29    0.000    0.000       0
+  0    823 00:19:06.23   1.3300A   1.3574   0.4533  -0.6742  0.053  0.00   0.000      0.  0.277E+00  0.874E-02  0.353E-03  0.259E-04   35  24  33   18   8  29   16   4  29    0.000    0.000       0
+  0    828 00:19:12.85   1.3200A   1.3590  -0.3967  -0.6482  0.053  0.00   0.000      0.  0.277E+00  0.862E-02  0.341E-03  0.227E-04   35  24  37   24  39  10   14   5  29    0.000    0.000       0
+  0    832 00:19:18.14   1.3200A   1.3617  -0.3874  -0.6281  0.053  0.00   0.000      0.  0.276E+00  0.851E-02  0.334E-03  0.211E-04   35  24   0   24  39  12   13   5  29    0.000    0.000       0
+  0    837 00:19:24.75   1.3200A   1.3598  -0.3701  -0.6015  0.053  0.00   0.000      0.  0.276E+00  0.838E-02  0.326E-03  0.202E-04   35  24   4   22  39  12   13   2  29    0.000    0.000       0
+  0    841 00:19:30.03   1.3200A   1.3612  -0.3574  -0.5804  0.052  0.00   0.000      0.  0.275E+00  0.830E-02  0.323E-03  0.212E-04   35  24   7   22  39  14   12   2  29    0.000    0.000       0
+  0    846 00:19:36.64   1.3300A   1.3582  -0.3550  -0.5480  0.051  0.00   0.000      0.  0.275E+00  0.824E-02  0.326E-03  0.239E-04   35  24  10   25  36  22   11   2  29    0.000    0.000       0
+  0    851 00:19:43.26   1.3300A   1.3582  -0.3702  -0.5207  0.050  0.00   0.000      0.  0.275E+00  0.821E-02  0.331E-03  0.276E-04   35  24  14   22   1  18   11   1  29    0.000    0.000       0
+  0    855 00:19:48.56   1.3300A   1.3535  -0.3452  -0.5218  0.050  0.00   0.000      0.  0.275E+00  0.821E-02  0.335E-03  0.298E-04   35  24  17   22   1  20   13   2  29    0.000    0.000       0
+  0    860 00:19:55.21   1.3300A   1.3507  -0.3605  -0.5144  0.049  0.00   0.000      0.  0.276E+00  0.823E-02  0.340E-03  0.311E-04   35  24  21   26  35  30   11   2  29    0.000    0.000       0
+  0    864 00:20:00.54   1.3400A   1.3475  -0.3717  -0.4958  0.048  0.00   0.000      0.  0.276E+00  0.826E-02  0.342E-03  0.308E-04   35  24  25   26  34  32   10   2  29    0.000    0.000       0
+  0    869 00:20:07.22   1.3400A   1.3428  -0.3995  -0.4851  0.048  0.00   0.000      0.  0.276E+00  0.829E-02  0.336E-03  0.273E-04   35  24  29   27  35  35   10   1  29    0.000    0.000       0
+  0    873 00:20:12.58   1.3400A   1.3416  -0.3955  -0.4694  0.048  0.00   0.000      0.  0.276E+00  0.832E-02  0.328E-03  0.232E-04   35  24  32   27  35  37    9   1  29    0.000    0.000       0
+  0    878 00:20:19.30   1.3500A   1.3360  -0.4261  -0.4343  0.049  0.00   0.000      0.  0.277E+00  0.834E-02  0.324E-03  0.199E-04   35  24  36   27  33  39    9   1  29    0.000    0.000       0
+  0    882 00:20:24.66   1.3400A   1.3408  -0.4208  -0.4344  0.050  0.00   0.000      0.  0.277E+00  0.835E-02  0.320E-03  0.192E-04   38  16  37   27  32   1   18  31  29    0.000    0.000       0
+  0    886 00:20:30.02   1.3400A   1.3457  -0.4286  -0.4457  0.050  0.00   0.000      0.  0.277E+00  0.835E-02  0.321E-03  0.199E-04   38  16   0   27  32   3   17  31  29    0.000    0.000       0
+  0    891 00:20:36.70   1.3300A   1.3506  -0.4042  -0.4338  0.051  0.00   0.000      0.  0.276E+00  0.835E-02  0.321E-03  0.207E-04   38  16   4   27  32   6   17  30  29    0.000    0.000       0
+  0    895 00:20:42.02   1.3300A   1.3551  -0.3932  -0.4335  0.051  0.00   0.000      0.  0.276E+00  0.836E-02  0.324E-03  0.217E-04   38  16   7   27  31   9   16  30  29    0.000    0.000       0
+  0    900 00:20:48.66   1.3200A   1.3600  -0.3833  -0.4590  0.051  0.00   0.000      0.  0.276E+00  0.835E-02  0.321E-03  0.221E-04   38  16  11   27  31  12   17  16  29    0.000    0.000       0
+  0    905 00:20:55.27   1.3200A   1.3645  -0.3634  -0.4750  0.051  0.00   0.000      0.  0.276E+00  0.834E-02  0.322E-03  0.224E-04   38  16  15   26  29  13   16  16  29    0.000    0.000       0
+  0    909 00:21:00.55   1.3200A   1.3681  -0.3768  -0.4769  0.051  0.00   0.000      0.  0.276E+00  0.832E-02  0.321E-03  0.217E-04   38  16  18   26  29  15   15  16  29    0.000    0.000       0
+  0    914 00:21:07.13   1.3100A   1.3723  -0.3639  -0.4877  0.051  0.00   0.000      0.  0.276E+00  0.829E-02  0.318E-03  0.207E-04   38  16  22   26  29  19   17   9  29    0.000    0.000       0
+  0    918 00:21:12.38   1.3100A   1.3744   0.3729  -0.4920  0.051  0.00   0.000      0.  0.276E+00  0.826E-02  0.316E-03  0.201E-04   38  16  25   20  29  28   17   9  29    0.000    0.000       0
+  0    923 00:21:18.93   1.3100A   1.3752  -0.3683  -0.4791  0.050  0.00   0.000      0.  0.275E+00  0.822E-02  0.314E-03  0.199E-04   38  16  29   26  28  24   17   6  29    0.000    0.000       0
+  0    927 00:21:24.17   1.3100A   1.3735  -0.3697  -0.4834  0.050  0.00   0.000      0.  0.275E+00  0.819E-02  0.309E-03  0.193E-04   38  16  32   26  28  26   16   6  29    0.000    0.000       0
+  0    932 00:21:30.75   1.3200A   1.3675   0.3636  -0.4953  0.050  0.00   0.000      0.  0.275E+00  0.817E-02  0.308E-03  0.195E-04   38  16  36   20   7  28   17  26  29    0.000    0.000       0
+  0    936 00:21:36.03   1.3200A   1.3618   0.3339  -0.4738  0.049  0.00   0.000      0.  0.275E+00  0.816E-02  0.306E-03  0.194E-04   38  16  39   20   7  28   14   6  29    0.000    0.000       0
+  0    941 00:21:42.67   1.3300A   1.3571  -0.3153  -0.4624  0.049  0.00   0.000      0.  0.275E+00  0.816E-02  0.308E-03  0.207E-04   36  36   4   28  31  30   13   6  29    0.000    0.000       0
+  0    946 00:21:49.30   1.3200A   1.3596  -0.3147  -0.4515  0.049  0.00   0.000      0.  0.275E+00  0.818E-02  0.310E-03  0.236E-04   36  36   8   22  36  22   12   5  29    0.000    0.000       0
+  0    950 00:21:54.61   1.3300A   1.3581  -0.3099  -0.4464  0.049  0.00   0.000      0.  0.275E+00  0.820E-02  0.317E-03  0.260E-04   36  36  11   22  36  23   11   5  29    0.000    0.000       0
+  0    955 00:22:01.26   1.3300A   1.3533  -0.3703  -0.4337  0.049  0.00   0.000      0.  0.276E+00  0.822E-02  0.320E-03  0.268E-04   36  36  15   20   0  29   10   5  29    0.000    0.000       0
+  0    959 00:22:06.58   1.3300A   1.3559  -0.3857  -0.4150  0.049  0.00   0.000      0.  0.276E+00  0.824E-02  0.320E-03  0.255E-04   37  13  15   20   0  29   13  22  29    0.000    0.000       0
+  0    964 00:22:13.23   1.3300A   1.3575  -0.3717  -0.4303  0.049  0.00   0.000      0.  0.276E+00  0.823E-02  0.319E-03  0.230E-04   37  13  19   20  39  29   17   2  29    0.000    0.000       0
+  0    968 00:22:18.55   1.3300A   1.3520  -0.3402  -0.4664  0.049  0.00   0.000      0.  0.276E+00  0.822E-02  0.316E-03  0.211E-04   37  13  22   19  39  29   17   2  29    0.000    0.000       0
+  0    973 00:22:25.24   1.3400A   1.3417  -0.3143  -0.4870  0.049  0.00   0.000      0.  0.276E+00  0.819E-02  0.314E-03  0.198E-04   36  36  29   24   2   1   16   2  29    0.000    0.000       0
+  0    977 00:22:30.60   1.3400A   1.3424  -0.3107  -0.4758  0.049  0.00   0.000      0.  0.275E+00  0.816E-02  0.313E-03  0.196E-04   40  30  27   24   2   3   15   2  29    0.000    0.000       0
+  0    982 00:22:37.30   1.3400A   1.3447  -0.3229  -0.4546  0.049  0.00   0.000      0.  0.275E+00  0.811E-02  0.311E-03  0.191E-04   41  29  31   23  39   6   14   2  29    0.000    0.000       0
+  0    986 00:22:42.63   1.3300A   1.3544  -0.3303  -0.4373  0.050  0.00   0.000      0.  0.275E+00  0.807E-02  0.307E-03  0.184E-04   41  29  34   23  39   8   13   2  29    0.000    0.000       0
+  0    991 00:22:49.26   1.3200A   1.3637   0.3209  -0.4209  0.049  0.00   0.000      0.  0.275E+00  0.803E-02  0.304E-03  0.175E-04   41  29  38   22  14   8   13   3  29    0.000    0.000       0
+  0    995 00:22:54.53   1.3100A   1.3692   0.3414  -0.4130  0.049  0.00   0.000      0.  0.274E+00  0.800E-02  0.301E-03  0.170E-04   40  29   1   26  16  23   12   3  29    0.000    0.000       0
+  0   1000 00:23:01.08   1.3100A   1.3757   0.3303  -0.4029  0.049  0.00   0.000      0.  0.274E+00  0.797E-02  0.299E-03  0.168E-04   41  29   5   26  17  26   11   3  29    0.000    0.000       0
+  0   1004 00:23:06.32   1.3100A   1.3777  -0.3364  -0.3932  0.049  0.00   0.000      0.  0.274E+00  0.796E-02  0.298E-03  0.170E-04   40  29   8   22   4  15   11   4  29    0.000    0.000       0
+  0   1009 00:23:12.84   1.3000A   1.3807  -0.3421  -0.3837  0.048  0.00   0.000      0.  0.274E+00  0.796E-02  0.297E-03  0.182E-04   41  29  12   24   6  14   10   4  29    0.000    0.000       0
+  0   1013 00:23:18.05   1.3000A   1.3797  -0.3430  -0.3735  0.048  0.00   0.000      0.  0.274E+00  0.797E-02  0.297E-03  0.193E-04   40  29  15   24   5  16    9   4  29    0.000    0.000       0
+  0   1018 00:23:24.58   1.3100A   1.3790   0.3307  -0.3680  0.048  0.00   0.000      0.  0.274E+00  0.799E-02  0.301E-03  0.206E-04   41  29  19   26  19  37   16  20  29    0.000    0.000       0
+  0   1023 00:23:31.13   1.3100A   1.3755   0.3276  -0.3797  0.048  0.00   0.000      0.  0.275E+00  0.802E-02  0.301E-03  0.211E-04   41  29  23   26  19   0   16  20  29    0.000    0.000       0
+  0   1027 00:23:36.37   1.3100A   1.3734  -0.3289  -0.3804  0.048  0.00   0.000      0.  0.275E+00  0.804E-02  0.301E-03  0.210E-04   41  28  26   23  36  25   15  20  29    0.000    0.000       0
+  0   1032 00:23:42.91   1.3000A   1.3797  -0.4080  -0.3788  0.048  0.00   0.000      0.  0.275E+00  0.806E-02  0.302E-03  0.210E-04   41  28  30   20   1  29   15  20  29    0.000    0.000       0
+  0   1036 00:23:48.12   1.3000A   1.3838  -0.4560  -0.4728  0.048  0.00   0.000      0.  0.275E+00  0.805E-02  0.300E-03  0.195E-04   40  28  33   20   1  29   18   2  29    0.000    0.000       0
+  0   1041 00:23:54.62   1.3000A   1.3882  -0.4393  -0.5431  0.047  0.00   0.000      0.  0.275E+00  0.803E-02  0.299E-03  0.174E-04   41  28  37   20   0  29   18   4  29    0.000    0.000       0
+  0   1046 00:24:01.11   1.2900A   1.3909  -0.4127  -0.6017  0.047  0.00   0.000      0.  0.275E+00  0.800E-02  0.299E-03  0.175E-04   41  28   1   19   0  29   17   3  29    0.000    0.000       0
+  0   1050 00:24:06.29   1.2900A   1.3910  -0.3704  -0.5969  0.047  0.00   0.000      0.  0.275E+00  0.797E-02  0.300E-03  0.183E-04   41  28   4   18   0  29   16   3  29    0.000    0.000       0
+  0   1055 00:24:12.75   1.2900A   1.3922  -0.3374  -0.5804  0.048  0.00   0.000      0.  0.275E+00  0.794E-02  0.299E-03  0.186E-04   29   7   2   23  33  35   17   6  29    0.000    0.000       0
+  0   1060 00:24:19.22   1.3000A   1.3862  -0.3721  -0.5580  0.048  0.00   0.000      0.  0.275E+00  0.791E-02  0.299E-03  0.184E-04   29   7   5   23  33  37   15   6  29    0.000    0.000       0
+  0   1064 00:24:24.39   1.3000A   1.3796  -0.3531  -0.5257  0.048  0.00   0.000      0.  0.275E+00  0.790E-02  0.295E-03  0.178E-04   41  28  15   23  33  38   14   6  29    0.000    0.000       0
+  0   1069 00:24:30.91   1.3100A   1.3720  -0.2917  -0.5047  0.048  0.00   0.000      0.  0.275E+00  0.788E-02  0.296E-03  0.180E-04   29   7  12   23   4   8   14   7  29    0.000    0.000       0
+  0   1073 00:24:36.15   1.3100A   1.3736  -0.2951  -0.4896  0.048  0.00   0.000      0.  0.275E+00  0.787E-02  0.296E-03  0.184E-04   32   9  22   23  32   1   13   7  29    0.000    0.000       0
+  0   1078 00:24:42.70   1.3100A   1.3735  -0.2991  -0.4583  0.049  0.00   0.000      0.  0.275E+00  0.785E-02  0.296E-03  0.186E-04   32   9  26   24   4  34   12   7  29    0.000    0.000       0
+  0   1083 00:24:49.25   1.3100A   1.3696  -0.2854  -0.4247  0.049  0.00   0.000      0.  0.274E+00  0.781E-02  0.293E-03  0.177E-04   32   9  30   24   4  36   11   7  29    0.000    0.000       0
+  0   1087 00:24:54.50   1.3200A   1.3671  -0.2894  -0.4095  0.048  0.00   0.000      0.  0.274E+00  0.779E-02  0.293E-03  0.169E-04   32   9  33   22  14  38   11   8  29    0.000    0.000       0
+  0   1092 00:25:01.08   1.3200A   1.3678  -0.3009  -0.3909  0.048  0.00   0.000      0.  0.274E+00  0.775E-02  0.294E-03  0.170E-04   28   7  31   22  14   0   16   0  29    0.000    0.000       0
+  0   1096 00:25:06.36   1.3200A   1.3636   0.3017  -0.4085  0.048  0.00   0.000      0.  0.274E+00  0.772E-02  0.294E-03  0.169E-04   24   9  10   20  38  28   16   0  29    0.000    0.000       0
+  0   1101 00:25:12.98   1.3200A   1.3611  -0.2815  -0.4178  0.048  0.00   0.000      0.  0.274E+00  0.769E-02  0.290E-03  0.161E-04   27   7  36   23   1  23   16   0  29    0.000    0.000       0
+  0   1105 00:25:18.22   1.3100A   1.3717  -0.2926  -0.4195  0.047  0.00   0.000      0.  0.274E+00  0.767E-02  0.284E-03  0.156E-04   27   7  39   20   6  29   15   0  29    0.000    0.000       0
+  0   1110 00:25:24.75   1.3100A   1.3775  -0.3086  -0.4107  0.047  0.00   0.000      0.  0.274E+00  0.763E-02  0.279E-03  0.156E-04   27   7   3   23  37  22   14   0  29    0.000    0.000       0
+  0   1115 00:25:31.25   1.3000A   1.3817  -0.2974  -0.3966  0.047  0.00   0.000      0.  0.274E+00  0.760E-02  0.277E-03  0.164E-04   27   7   7   23  36  23   13   0  29    0.000    0.000       0
+  0   1119 00:25:36.46   1.3100A   1.3763  -0.3192  -0.3922  0.046  0.00   0.000      0.  0.274E+00  0.759E-02  0.280E-03  0.174E-04   27   7  10   26  28  12   12  39  29    0.000    0.000       0
+  0   1124 00:25:42.98   1.3100A   1.3762  -0.3403  -0.4017  0.046  0.00   0.000      0.  0.274E+00  0.757E-02  0.279E-03  0.178E-04   27   7  14   26  28  15   18  12  29    0.000    0.000       0
+  0   1128 00:25:48.25   1.3200A   1.3645  -0.3346  -0.4044  0.046  0.00   0.000      0.  0.274E+00  0.756E-02  0.281E-03  0.178E-04   36  39   7   26  28  17   17  12  29    0.000    0.000       0
+  0   1133 00:25:54.82   1.3100A   1.3699  -0.3411  -0.4024  0.045  0.00   0.000      0.  0.274E+00  0.756E-02  0.280E-03  0.188E-04   36  39  11   27  26  23   17  12  29    0.000    0.000       0
+  0   1137 00:26:00.07   1.3100A   1.3751  -0.3567  -0.3897  0.045  0.00   0.000      0.  0.274E+00  0.757E-02  0.281E-03  0.198E-04   36  39  14   27  26  25   16  12  29    0.000    0.000       0
+  0   1142 00:26:06.62   1.3100A   1.3764  -0.3487  -0.3726  0.046  0.00   0.000      0.  0.274E+00  0.757E-02  0.281E-03  0.195E-04   36  39  18   27  26  28   15  11  29    0.000    0.000       0
+  0   1147 00:26:13.15   1.3100A   1.3771  -0.3409  -0.3689  0.046  0.00   0.000      0.  0.274E+00  0.756E-02  0.281E-03  0.188E-04   36  39  22   27  25  31   14  11  29    0.000    0.000       0
+  0   1151 00:26:18.36   1.3000A   1.3812  -0.3672  -0.3707  0.046  0.00   0.000      0.  0.274E+00  0.754E-02  0.279E-03  0.179E-04   36  39  25   20  37  29   18   2  29    0.000    0.000       0
+  0   1156 00:26:24.88   1.3100A   1.3781  -0.3626  -0.4408  0.047  0.00   0.000      0.  0.274E+00  0.749E-02  0.280E-03  0.165E-04   36  39  29   19  37  29   18   2  29    0.000    0.000       0
+  0   1160 00:26:30.10   1.3100A   1.3774  -0.3590  -0.4776  0.047  0.00   0.000      0.  0.274E+00  0.743E-02  0.279E-03  0.160E-04   36  39  32   19  37  29   17   2  29    0.000    0.000       0
+  0   1165 00:26:36.65   1.3100A   1.3691  -0.3204  -0.4695  0.047  0.00   0.000      0.  0.274E+00  0.735E-02  0.277E-03  0.153E-04   36  39  36   24  39   6   16   2  29    0.000    0.000       0
+  0   1170 00:26:43.25   1.3200A   1.3591  -0.3357  -0.4710  0.047  0.00   0.000      0.  0.274E+00  0.727E-02  0.276E-03  0.148E-04   36  39   0   23   0   3   16   0  29    0.000    0.000       0
+  0   1174 00:26:48.57   1.3300A   1.3531  -0.3293  -0.4681  0.047  0.00   0.000      0.  0.274E+00  0.721E-02  0.275E-03  0.149E-04   36  39   3   23   0   5   15   0  29    0.000    0.000       0
+  0   1179 00:26:55.26   1.3400A   1.3454  -0.3318  -0.4528  0.046  0.00   0.000      0.  0.273E+00  0.715E-02  0.276E-03  0.149E-04   41  27  13   23  39   7   14   0  29    0.000    0.000       0
+  0   1183 00:27:00.59   1.3300A   1.3534  -0.3337  -0.4387  0.046  0.00   0.000      0.  0.273E+00  0.712E-02  0.275E-03  0.154E-04   27   8  21   23  39   8   13   0  29    0.000    0.000       0
+  0   1188 00:27:07.21   1.3200A   1.3612   0.3288  -0.4353  0.046  0.00   0.000      0.  0.273E+00  0.709E-02  0.274E-03  0.160E-04   27   8  25   22  14  15   16   7  29    0.000    0.000       0
+  0   1192 00:27:12.48   1.3200A   1.3636  -0.3312  -0.4244  0.045  0.00   0.000      0.  0.273E+00  0.709E-02  0.275E-03  0.170E-04   41  27  23   22  39  10   15   6  29    0.000    0.000       0
+  0   1197 00:27:19.07   1.3200A   1.3656  -0.3230  -0.4213  0.045  0.00   0.000      0.  0.273E+00  0.709E-02  0.277E-03  0.195E-04   27   8  31   25  36  24   15   6  29    0.000    0.000       0
+  0   1201 00:27:24.33   1.3200A   1.3670  -0.3270  -0.4268  0.045  0.00   0.000      0.  0.273E+00  0.710E-02  0.278E-03  0.208E-04   41  27  30   25  36  26   14   6  29    0.000    0.000       0
+  0   1206 00:27:30.88   1.3100A   1.3753   0.3243  -0.4250  0.045  0.00   0.000      0.  0.274E+00  0.713E-02  0.276E-03  0.208E-04   41  27  33   22  17  23   13   6  29    0.000    0.000       0
+  0   1210 00:27:36.12   1.3100A   1.3774   0.3746  -0.4141  0.045  0.00   0.000      0.  0.274E+00  0.714E-02  0.275E-03  0.204E-04   41  27  36   21  16  27   12   6  29    0.000    0.000       0
+  0   1215 00:27:42.67   1.3100A   1.3789   0.3599  -0.4697  0.045  0.00   0.000      0.  0.274E+00  0.715E-02  0.271E-03  0.191E-04   41  27   0   21  16  28   17  11  29    0.000    0.000       0
+  0   1220 00:27:49.18   1.3000A   1.3846   0.4156  -0.4742  0.045  0.00   0.000      0.  0.274E+00  0.715E-02  0.268E-03  0.173E-04   41  28   3   20  10  28   17  12  29    0.000    0.000       0
+  0   1224 00:27:54.34   1.2900A   1.3918   0.3565  -0.4811  0.046  0.00   0.000      0.  0.274E+00  0.714E-02  0.266E-03  0.175E-04   40  28   6   20  10  28   17  13  29    0.000    0.000       0
+  0   1229 00:28:00.78   1.2800A   1.4030   0.3523  -0.5002  0.046  0.00   0.000      0.  0.274E+00  0.713E-02  0.262E-03  0.166E-04   41  28  10   21  17  32   17  14  29    0.000    0.000       0
+  0   1234 00:28:07.18   1.2800A   1.4074   0.3355  -0.5060  0.046  0.00   0.000      0.  0.273E+00  0.712E-02  0.261E-03  0.171E-04   41  28  14   19  19  29   17  15  29    0.000    0.000       0
+  0   1238 00:28:12.30   1.2800A   1.4077   0.3022  -0.5036  0.046  0.00   0.000      0.  0.273E+00  0.710E-02  0.264E-03  0.188E-04   41  28  17   18  19  29   16  15  29    0.000    0.000       0
+  0   1243 00:28:18.70   1.2800A   1.4052  -0.2878  -0.4903  0.047  0.00   0.000      0.  0.273E+00  0.709E-02  0.263E-03  0.181E-04   41  28  21   20  23  29   15  15  29    0.000    0.000       0
+  0   1248 00:28:25.11   1.2900A   1.4002   0.2757  -0.4793  0.046  0.00   0.000      0.  0.274E+00  0.709E-02  0.262E-03  0.175E-04   41  28  25   22  15   6   15  16  29    0.000    0.000       0
+  0   1252 00:28:30.27   1.2900A   1.3981   0.2662  -0.4786  0.046  0.00   0.000      0.  0.274E+00  0.709E-02  0.262E-03  0.183E-04   41  28  28   21  25  27   14  16  29    0.000    0.000       0
+  0   1257 00:28:36.73   1.3000A   1.3890   0.2897  -0.4674  0.046  0.00   0.000      0.  0.274E+00  0.710E-02  0.266E-03  0.196E-04   41  28  32   21  25  28   13  16  29    0.000    0.000       0
+  0   1262 00:28:43.21   1.3000A   1.3845   0.3201  -0.4552  0.046  0.00   0.000      0.  0.274E+00  0.711E-02  0.266E-03  0.199E-04   40  28  35   20  25  28   12  16  29    0.000    0.000       0
+  0   1266 00:28:48.41   1.3000A   1.3832   0.3322  -0.4470  0.047  0.00   0.000      0.  0.274E+00  0.712E-02  0.268E-03  0.201E-04   41  36  35   20  25  29   12  15  29    0.000    0.000       0
+  0   1271 00:28:54.91   1.3000A   1.3871   0.3897  -0.4446  0.047  0.00   0.000      0.  0.274E+00  0.712E-02  0.270E-03  0.200E-04   41  36  39   20  26  29   18  17  29    0.000    0.000       0
+  0   1275 00:29:00.11   1.3000A   1.3874   0.3543  -0.5035  0.047  0.00   0.000      0.  0.274E+00  0.711E-02  0.269E-03  0.187E-04   41  36   2   20  27  29   17  17  29    0.000    0.000       0
+  0   1280 00:29:06.61   1.3000A   1.3875  -0.3338  -0.5238  0.047  0.00   0.000      0.  0.274E+00  0.709E-02  0.267E-03  0.171E-04   41  36   6   19  15  29   17  16  29    0.000    0.000       0
+  0   1285 00:29:13.11   1.3000A   1.3853  -0.3184  -0.5174  0.048  0.00   0.000      0.  0.274E+00  0.707E-02  0.264E-03  0.162E-04   41  36  10   19  14  29   16  16  29    0.000    0.000       0
+  0   1289 00:29:18.32   1.3000A   1.3805  -0.3230  -0.5018  0.048  0.00   0.000      0.  0.274E+00  0.705E-02  0.262E-03  0.165E-04   41  36  13   19  14  29   16  15  29    0.000    0.000       0
+  0   1294 00:29:24.86   1.3100A   1.3792  -0.3199  -0.4676  0.048  0.00   0.000      0.  0.274E+00  0.703E-02  0.261E-03  0.166E-04   41  35  17   18  14  29   15  15  29    0.000    0.000       0
+  0   1298 00:29:30.08   1.3100A   1.3790  -0.2963  -0.4418  0.048  0.00   0.000      0.  0.274E+00  0.701E-02  0.257E-03  0.159E-04   41  35  20   17  14  29   14  14  29    0.000    0.000       0
+  0   1303 00:29:36.60   1.3100A   1.3790  -0.2860  -0.4179  0.048  0.00   0.000      0.  0.274E+00  0.701E-02  0.254E-03  0.161E-04   41  35  24   21   9  24   13  20  29    0.000    0.000       0
+  0   1308 00:29:43.12   1.3100A   1.3767  -0.3089  -0.4021  0.047  0.00   0.000      0.  0.274E+00  0.702E-02  0.255E-03  0.170E-04   41  35  28   21   9  26   13  21  29    0.000    0.000       0
+  0   1312 00:29:48.36   1.3100A   1.3752  -0.3121  -0.4012  0.047  0.00   0.000      0.  0.273E+00  0.703E-02  0.258E-03  0.192E-04   41  35  32   20   8  26   13  21  29    0.000    0.000       0
+  0   1317 00:29:54.91   1.3100A   1.3691  -0.4332  -0.3979  0.047  0.00   0.000      0.  0.273E+00  0.706E-02  0.263E-03  0.210E-04   41  35  36   20   8  28   12  21  28    0.000    0.000       0
+  0   1321 00:30:00.17   1.3100A   1.3730  -0.3984  -0.4125  0.047  0.00   0.000      0.  0.274E+00  0.707E-02  0.263E-03  0.202E-04   41  34  38   20   8  28   17   7  29    0.000    0.000       0
+  0   1326 00:30:06.70   1.3000A   1.3826  -0.3761  -0.4603  0.047  0.00   0.000      0.  0.274E+00  0.709E-02  0.260E-03  0.190E-04   41  34   2   20   6  29   18  10  29    0.000    0.000       0
+  0   1331 00:30:13.20   1.3000A   1.3898  -0.3255  -0.5309  0.046  0.00   0.000      0.  0.274E+00  0.710E-02  0.265E-03  0.199E-04   41  34   6   19   5  29   17  10  29    0.000    0.000       0
+  0   1335 00:30:18.36   1.2900A   1.3909   0.3396  -0.5579  0.046  0.00   0.000      0.  0.274E+00  0.712E-02  0.265E-03  0.206E-04   41  34   9   20   8  28   17  10  29    0.000    0.000       0
+  0   1340 00:30:24.81   1.2900A   1.3912   0.3292  -0.5515  0.046  0.00   0.000      0.  0.274E+00  0.716E-02  0.264E-03  0.196E-04   41  34  13   20   9  28   16   9  29    0.000    0.000       0
+  0   1345 00:30:31.27   1.3000A   1.3869  -0.3695  -0.5365  0.046  0.00   0.000      0.  0.274E+00  0.719E-02  0.267E-03  0.202E-04   41  34  17   21  16  28   15   9  29    0.000    0.000       0
+  0   1349 00:30:36.47   1.3000A   1.3840   0.4136  -0.5227  0.047  0.00   0.000      0.  0.274E+00  0.722E-02  0.269E-03  0.203E-04   41   1  16   20  10  28   14   9  29    0.000    0.000       0
+  0   1354 00:30:42.97   1.3000A   1.3798   0.4206  -0.5071  0.047  0.00   0.000      0.  0.274E+00  0.726E-02  0.268E-03  0.196E-04   41   1  20   20  11  28   13   9  29    0.000    0.000       0
+  0   1358 00:30:48.21   1.3100A   1.3762   0.4435  -0.4934  0.047  0.00   0.000      0.  0.274E+00  0.728E-02  0.271E-03  0.194E-04   41   1  23   20  11  28   12   9  29    0.000    0.000       0
+  0   1363 00:30:54.75   1.3000A   1.3800   0.3940  -0.4743  0.048  0.00   0.000      0.  0.274E+00  0.730E-02  0.274E-03  0.198E-04   41  33  31   20  12  28   17   5  29    0.000    0.000       0
+  0   1368 00:31:01.26   1.3000A   1.3810  -0.4447  -0.4913  0.048  0.00   0.000      0.  0.274E+00  0.733E-02  0.281E-03  0.222E-04   40  33  35   21   9  28   16   5  29    0.000    0.000       0
+  0   1372 00:31:06.47   1.3100A   1.3784  -0.5425  -0.4930  0.048  0.00   0.000      0.  0.274E+00  0.735E-02  0.287E-03  0.233E-04   41  33  39   20   8  28   16   5  29    0.000    0.000       0
+  0   1377 00:31:12***   1.3100A   1.3766  -0.4442  -0.5344  0.048  0.00   0.000      0.  0.274E+00  0.735E-02  0.288E-03  0.218E-04   40  33   3   20   7  28   18  11  29    0.000    0.000       0
+  0   1381 00:31:18.24   1.3100A   1.3738  -0.5064  -0.6039  0.048  0.00   0.000      0.  0.274E+00  0.734E-02  0.289E-03  0.216E-04   40  33   6   20   7  29   17  10  29    0.000    0.000       0
+  0   1386 00:31:24.83   1.3200A   1.3650  -0.4852  -0.6139  0.049  0.00   0.000      0.  0.274E+00  0.731E-02  0.288E-03  0.209E-04   40  33  10   19   7  29   17   9  29    0.000    0.000       0
+  0   1390 00:31:30.11   1.3200A   1.3616  -0.4546  -0.5838  0.049  0.00   0.000      0.  0.274E+00  0.728E-02  0.284E-03  0.192E-04   37   5   5   19   6  29   16   9  29    0.000    0.000       0
+  0   1395 00:31:36.71   1.3200A   1.3658  -0.4243  -0.5719  0.049  0.00   0.000      0.  0.274E+00  0.723E-02  0.283E-03  0.191E-04   37   5   9   18   6  29   17  13  29    0.000    0.000       0
+  0   1400 00:31:43.31   1.3200A   1.3678  -0.3736  -0.6104  0.049  0.00   0.000      0.  0.274E+00  0.719E-02  0.282E-03  0.205E-04   37   5  13   17   6  29   17  13  29    0.000    0.000       0
+  0   1404 00:31:48.58   1.3200A   1.3677  -0.3371  -0.5985  0.049  0.00   0.000      0.  0.274E+00  0.717E-02  0.279E-03  0.211E-04   37   5  17   17   5  29   16  13  29    0.000    0.000       0
+  0   1409 00:31:55.18   1.3200A   1.3661   0.3016  -0.5731  0.049  0.00   0.000      0.  0.274E+00  0.715E-02  0.276E-03  0.208E-04   37   5  21   20   9  28   15  14  29    0.000    0.000       0
+  0   1413 00:32:00.46   1.3200A   1.3626   0.2850  -0.5502  0.048  0.00   0.000      0.  0.274E+00  0.714E-02  0.274E-03  0.193E-04   37   5  24   20  14  26   14  14  29    0.000    0.000       0
+  0   1418 00:32:07.06   1.3200A   1.3621   0.3432  -0.5197  0.048  0.00   0.000      0.  0.274E+00  0.713E-02  0.271E-03  0.180E-04   37   5  30   20  15  28   13  14  29    0.000    0.000       0
+  0   1422 00:32:12.34   1.3200A   1.3616   0.3630  -0.4993  0.049  0.00   0.000      0.  0.274E+00  0.713E-02  0.269E-03  0.178E-04   37   5  33   20  15  28   12  14  29    0.000    0.000       0
+  0   1427 00:32:18.94   1.3200A   1.3617   0.3490  -0.4754  0.049  0.00   0.000      0.  0.274E+00  0.714E-02  0.265E-03  0.170E-04   37   5  38   20  14  29   10  11  29    0.000    0.000       0
+  0   1431 00:32:24.22   1.3200A   1.3651   0.3413  -0.4604  0.049  0.00   0.000      0.  0.274E+00  0.715E-02  0.264E-03  0.175E-04   36   5  39   20  15  29   10  14  29    0.000    0.000       0
+  0   1436 00:32:30.81   1.3100A   1.3696   0.3518  -0.4298  0.049  0.00   0.000      0.  0.274E+00  0.716E-02  0.264E-03  0.186E-04   36   5   3   20  15  29    9  14  29    0.000    0.000       0
+  0   1440 00:32:36.05   1.3100A   1.3716   0.3217  -0.4089  0.049  0.00   0.000      0.  0.274E+00  0.717E-02  0.268E-03  0.193E-04   36   5   7   22  13  36    9  10  29    0.000    0.000       0
+  0   1445 00:32:42.60   1.3100A   1.3729   0.3403  -0.3956  0.049  0.00   0.000      0.  0.274E+00  0.718E-02  0.271E-03  0.195E-04   36   5  11   22  13  39   11  16  28    0.000    0.000       0
+  0   1450 00:32:49.15   1.3100A   1.3720   0.3289  -0.4387  0.050  0.00   0.000      0.  0.274E+00  0.717E-02  0.267E-03  0.183E-04   36   5  15   22  13   2   18   8  29    0.000    0.000       0
+  0   1454 00:32:54.39   1.3100A   1.3712   0.3111  -0.4526  0.050  0.00   0.000      0.  0.274E+00  0.717E-02  0.264E-03  0.178E-04   36   5  18   21  14  38   17   8  29    0.000    0.000       0
+  0   1459 00:33:00.97   1.3200A   1.3663   0.2980  -0.4505  0.049  0.00   0.000      0.  0.274E+00  0.716E-02  0.263E-03  0.182E-04   36   5  22   21  14   0   17   7  29    0.000    0.000       0
+  0   1463 00:33:06.22   1.3100A   1.3785  -0.2974  -0.4420  0.049  0.00   0.000      0.  0.274E+00  0.716E-02  0.259E-03  0.181E-04   35  14  32   20  14  28   16   7  29    0.000    0.000       0
+  0   1468 00:33:12.72   1.3000A   1.3878   0.3047  -0.4212  0.049  0.00   0.000      0.  0.274E+00  0.715E-02  0.256E-03  0.180E-04   35  14  36   22  13  12   15   7  29    0.000    0.000       0
+  0   1473 00:33:19.17   1.2900A   1.3945   0.3942  -0.4757  0.049  0.00   0.000      0.  0.274E+00  0.714E-02  0.256E-03  0.186E-04   35  14  39   20  27  29   18  25  29    0.000    0.000       0
+  0   1477 00:33:24.31   1.2900A   1.3955   0.3985  -0.5233  0.049  0.00   0.000      0.  0.274E+00  0.714E-02  0.260E-03  0.207E-04   35  14   2   19  27  29   17  25  29    0.000    0.000       0
+  0   1482 00:33:30.74   1.2900A   1.3971   0.3688  -0.5142  0.048  0.00   0.000      0.  0.274E+00  0.714E-02  0.264E-03  0.221E-04   35  14   6   19  28  29   16  25  29    0.000    0.000       0
+  0   1487 00:33:37.23   1.3000A   1.3844   0.3417  -0.4839  0.048  0.00   0.000      0.  0.274E+00  0.715E-02  0.268E-03  0.215E-04   35  14  10   22  14  20   15  25  29    0.000    0.000       0
+  0   1491 00:33:42.47   1.3100A   1.3689   0.3303  -0.4580  0.048  0.00   0.000      0.  0.274E+00  0.715E-02  0.269E-03  0.204E-04   35  14  13   22  14  22   14  25  29    0.000    0.000       0
+  0   1496 00:33:49.11   1.3300A   1.3548   0.3544  -0.4332  0.048  0.00   0.000      0.  0.274E+00  0.716E-02  0.270E-03  0.181E-04   39   2  11   22  14  27   13  25  29    0.000    0.000       0
+  0   1500 00:33:54.43   1.3300A   1.3493   0.3340  -0.4189  0.048  0.00   0.000      0.  0.274E+00  0.716E-02  0.266E-03  0.169E-04   39   2  15   22  14  28   12  25  29    0.000    0.000       0
+  0   1505 00:34:01.08   1.3300A   1.3518   0.3629  -0.4035  0.049  0.00   0.000      0.  0.274E+00  0.716E-02  0.264E-03  0.168E-04   36  18   6   21  13  26   18  12  29    0.000    0.000       0
+  0   1509 00:34:06.40   1.3300A   1.3576  -0.3807  -0.4457  0.049  0.00   0.000      0.  0.274E+00  0.715E-02  0.268E-03  0.182E-04   36  18   9   20   8  29   17  12  29    0.000    0.000       0
+  0   1514 00:34:13.02   1.3200A   1.3611  -0.4751  -0.6455  0.049  0.00   0.000      0.  0.274E+00  0.713E-02  0.270E-03  0.195E-04   36  18  13   19   8  29   18   9  29    0.000    0.000       0
+  0   1518 00:34:18.30   1.3200A   1.3639  -0.4651  -0.7244  0.049  0.00   0.000      0.  0.274E+00  0.711E-02  0.271E-03  0.209E-04   36  18  16   19   7  29   17  10  29    0.000    0.000       0
+  0   1523 00:34:24.90   1.3200A   1.3651  -0.4037  -0.7168  0.049  0.00   0.000      0.  0.274E+00  0.707E-02  0.272E-03  0.220E-04   36  18  20   18   7  29   16  10  29    0.000    0.000       0
+  0   1527 00:34:30.18   1.3200A   1.3650  -0.3586  -0.6671  0.049  0.00   0.000      0.  0.274E+00  0.705E-02  0.273E-03  0.215E-04   36  18  23   18   7  29   15  10  29    0.000    0.000       0
+  0   1532 00:34:36.78   1.3200A   1.3641   0.3431  -0.6064  0.049  0.00   0.000      0.  0.274E+00  0.702E-02  0.272E-03  0.204E-04   36  18  27   18  13  29   14  10  29    0.000    0.000       0
+  0   1536 00:34:42.06   1.3200A   1.3624   0.3338  -0.5626  0.049  0.00   0.000      0.  0.274E+00  0.701E-02  0.274E-03  0.205E-04   36  18  31   22  20   7   13  10  29    0.000    0.000       0
+  0   1541 00:34:48.66   1.3200A   1.3635   0.3458  -0.5162  0.049  0.00   0.000      0.  0.275E+00  0.699E-02  0.273E-03  0.199E-04   36  18  35   25  20  13   12  10  29    0.000    0.000       0
+  0   1546 00:34:55.26   1.3200A   1.3682   0.3679  -0.4791  0.049  0.00   0.000      0.  0.274E+00  0.698E-02  0.271E-03  0.179E-04   28  13   4   22  21  10   11  11  29    0.000    0.000       0
+  0   1550 00:35:00.53   1.3200A   1.3636   0.3506  -0.4578  0.049  0.00   0.000      0.  0.274E+00  0.698E-02  0.270E-03  0.167E-04   36  18   2   22  21  12   10  11  29    0.000    0.000       0
+  0   1555 00:35:07.12   1.3200A   1.3675   0.3639  -0.4336  0.049  0.00   0.000      0.  0.274E+00  0.698E-02  0.269E-03  0.160E-04   28  13  10   22  22  14   10  14  29    0.000    0.000       0
+  0   1559 00:35:12.40   1.3200A   1.3641   0.3740  -0.4131  0.049  0.00   0.000      0.  0.274E+00  0.698E-02  0.268E-03  0.154E-04   36  18  10   22  22  16    9  11  29    0.000    0.000       0
+  0   1564 00:35:18***   1.3200A   1.3626   0.3726  -0.3919  0.049  0.00   0.000      0.  0.274E+00  0.699E-02  0.265E-03  0.150E-04   36  18  14   22  23  17    8  11  29    0.000    0.000       0
+  0   1568 00:35:24.28   1.3200A   1.3634   0.3549  -0.3780  0.049  0.00   0.000      0.  0.274E+00  0.702E-02  0.265E-03  0.152E-04   35  18  16   22  16  15   18  30  29    0.000    0.000       0
+  0   1573 00:35:30.84   1.3000A   1.3798   0.3716  -0.3821  0.048  0.00   0.000      0.  0.273E+00  0.706E-02  0.265E-03  0.165E-04   35  18  20   22  24  20   17  29  29    0.000    0.000       0
+  0   1577 00:35:36.04   1.3000A   1.3890   0.3400  -0.3855  0.048  0.00   0.000      0.  0.273E+00  0.711E-02  0.269E-03  0.181E-04   35  18  23   22  24  21   17  31  29    0.000    0.000       0
+  0   1582 00:35:42.50   1.2900A   1.3995   0.3406  -0.3989  0.049  0.00   0.000      0.  0.274E+00  0.719E-02  0.273E-03  0.207E-04   35  18  27   22  15  24   17  31  29    0.000    0.000       0
+  0   1587 00:35:48.93   1.2800A   1.4044   0.3083  -0.3932  0.049  0.00   0.000      0.  0.274E+00  0.726E-02  0.275E-03  0.225E-04   35  18  31   22  25  24   16  31  29    0.000    0.000       0
+  0   1591 00:35:54.06   1.2800A   1.4071   0.3388  -0.3838  0.050  0.00   0.000      0.  0.274E+00  0.732E-02  0.278E-03  0.226E-04   35  18  34   20  33  29   16  31  29    0.000    0.000       0
+  0   1596 00:36:00.47   1.2800A   1.4048   0.3609  -0.3727  0.051  0.00   0.000      0.  0.274E+00  0.738E-02  0.279E-03  0.225E-04   35  18  38   20  33  29   15  31  29    0.000    0.000       0
+  0   1601 00:36:06.89   1.2900A   1.3971   0.3206  -0.3948  0.051  0.00   0.000      0.  0.274E+00  0.744E-02  0.279E-03  0.208E-04   35  18   2   20  33  29   17   2  29    0.000    0.000       0
+  0   1605 00:36:12.05   1.2900A   1.3918  -0.2960  -0.4156  0.052  0.00   0.000      0.  0.274E+00  0.748E-02  0.278E-03  0.187E-04   35  18   5   20  37  29   17   1  29    0.000    0.000       0
+  0   1610 00:36:18.54   1.3000A   1.3803  -0.3094  -0.4077  0.052  0.00   0.000      0.  0.274E+00  0.752E-02  0.279E-03  0.172E-04   35  18   8   20  37  29   16   0  29    0.000    0.000       0
+  0   1615 00:36:25.11   1.3200A   1.3662  -0.3057  -0.3936  0.053  0.00   0.000      0.  0.274E+00  0.755E-02  0.284E-03  0.174E-04   35  18  12   24  17  22   16   0  29    0.000    0.000       0
+  0   1619 00:36:30.43   1.3400A   1.3480   0.3989  -0.4131  0.053  0.00   0.000      0.  0.274E+00  0.758E-02  0.291E-03  0.180E-04   35  18  15   20  17  29   17  15  29    0.000    0.000       0
+  0   1624 00:36:37.06   1.3100A   1.3705   0.3845  -0.4719  0.053  0.00   0.000      0.  0.274E+00  0.760E-02  0.288E-03  0.191E-04   34  19  22   20  18  29   17  14  29    0.000    0.000       0
+  0   1628 00:36:42.27   1.3000A   1.3896   0.3835  -0.5189  0.054  0.00   0.000      0.  0.274E+00  0.761E-02  0.289E-03  0.198E-04   34  19  25   19  18  29   17  13  29    0.000    0.000       0
+  0   1633 00:36:48.73   1.2900A   1.3995  -0.3716  -0.5560  0.054  0.00   0.000      0.  0.274E+00  0.760E-02  0.288E-03  0.193E-04   34  19  28   19  11  29   17  13  29    0.000    0.000       0
+  0   1638 00:36:55.17   1.2900A   1.3920  -0.3302  -0.5588  0.053  0.00   0.000      0.  0.274E+00  0.760E-02  0.286E-03  0.181E-04   34  19  32   18  11  29   16  13  29    0.000    0.000       0
+  0   1642 00:37:00.37   1.3000A   1.3835  -0.3039  -0.5384  0.053  0.00   0.000      0.  0.274E+00  0.759E-02  0.288E-03  0.177E-04   33  20  33   18  10  29   15  13  29    0.000    0.000       0
+  0   1647 00:37:06.88   1.3000A   1.3863  -0.3048  -0.5033  0.052  0.00   0.000      0.  0.274E+00  0.758E-02  0.288E-03  0.168E-04   33  20  37   24  17   2   14  13  29    0.000    0.000       0
+  0   1651 00:37:12.11   1.3100A   1.3776  -0.3047  -0.4763  0.051  0.00   0.000      0.  0.274E+00  0.759E-02  0.294E-03  0.174E-04   33  20   0   24  17   4   13  13  29    0.000    0.000       0
+  0   1656 00:37:18.70   1.3200A   1.3604   0.3448  -0.4475  0.051  0.00   0.000      0.  0.274E+00  0.760E-02  0.304E-03  0.204E-04   33  20   4   20  14  26   12  13  29    0.000    0.000       0
+  0   1660 00:37:24.02   1.3300A   1.3517   0.3805  -0.4267  0.050  0.00   0.000      0.  0.274E+00  0.762E-02  0.307E-03  0.211E-04   34  19  10   20  14  28   11  13  29    0.000    0.000       0
+  0   1665 00:37:30.67   1.3300A   1.3493   0.4044  -0.4015  0.050  0.00   0.000      0.  0.274E+00  0.762E-02  0.306E-03  0.194E-04   34   9  14   20  35  28   11  12  29    0.000    0.000       0
+  0   1669 00:37:35***   1.3300A   1.3511   0.3960  -0.3871  0.050  0.00   0.000      0.  0.274E+00  0.762E-02  0.306E-03  0.186E-04   34   9  17   20  14  29   10  12  29    0.000    0.000       0
+  0   1674 00:37:42.66   1.3300A   1.3498   0.3592  -0.3927  0.050  0.00   0.000      0.  0.274E+00  0.761E-02  0.306E-03  0.178E-04   34   9  21   20  35  29   18  11  29    0.000    0.000       0
+  0   1678 00:37:48.02   1.3400A   1.3475  -0.3755  -0.4326  0.049  0.00   0.000      0.  0.274E+00  0.761E-02  0.308E-03  0.181E-04   34   9  24   20  12  28   17  11  29    0.000    0.000       0
+  0   1683 00:37:54.68   1.3300A   1.3513  -0.4298  -0.4513  0.049  0.00   0.000      0.  0.274E+00  0.760E-02  0.306E-03  0.195E-04   41  31  10   20  12  29   16  11  29    0.000    0.000       0
+  0   1688 00:38:01.31   1.3200A   1.3601  -0.3770  -0.4590  0.049  0.00   0.000      0.  0.274E+00  0.760E-02  0.306E-03  0.228E-04   35  18  26   20  12  29   16  11  29    0.000    0.000       0
+  0   1692 00:38:06.59   1.3200A   1.3686  -0.3390  -0.4683  0.049  0.00   0.000      0.  0.274E+00  0.760E-02  0.307E-03  0.246E-04   35  18  29   20   8  29   15  11  29    0.000    0.000       0
+  0   1697 00:38:13.14   1.3100A   1.3780  -0.3751  -0.4636  0.049  0.00   0.000      0.  0.274E+00  0.760E-02  0.303E-03  0.233E-04   35  18  33   19   8  29   17  14  29    0.000    0.000       0
+  0   1701 00:38:18.35   1.3000A   1.3806   0.3551  -0.4652  0.049  0.00   0.000      0.  0.274E+00  0.759E-02  0.297E-03  0.217E-04   35  18  36   21  36  27   16  14  29    0.000    0.000       0
+  0   1706 00:38:24.87   1.3000A   1.3832  -0.3452  -0.4612  0.050  0.00   0.000      0.  0.275E+00  0.758E-02  0.293E-03  0.205E-04   35  18  39   18   7  29   16  15  29    0.000    0.000       0
+  0   1710 00:38:30.08   1.3000A   1.3831   0.3483  -0.4512  0.050  0.00   0.000      0.  0.275E+00  0.756E-02  0.289E-03  0.203E-04   35  18   2   28   0  33   15  15  29    0.000    0.000       0
+  0   1715 00:38:36.60   1.3000A   1.3796   0.3682  -0.4635  0.051  0.00   0.000      0.  0.275E+00  0.754E-02  0.288E-03  0.216E-04   35  18   6   28   0  36   18  34  29    0.000    0.000       0
+  0   1720 00:38:43.15   1.3100A   1.3776   0.3874  -0.5076  0.051  0.00   0.000      0.  0.275E+00  0.751E-02  0.289E-03  0.227E-04   35  19   9   28   1  38   17  35  29    0.000    0.000       0
+  0   1724 00:38:48.37   1.3100A   1.3790   0.3798  -0.4989  0.051  0.00   0.000      0.  0.275E+00  0.748E-02  0.285E-03  0.214E-04   35  19  12   28   1   1   17  35  29    0.000    0.000       0
+  0   1729 00:38:54.89   1.3100A   1.3770   0.3674  -0.4680  0.051  0.00   0.000      0.  0.275E+00  0.745E-02  0.279E-03  0.190E-04   35  19  16   28   1   4   17  33  29    0.000    0.000       0
+  0   1733 00:39:00.12   1.3000A   1.3802  -0.3583  -0.4760  0.051  0.00   0.000      0.  0.275E+00  0.743E-02  0.275E-03  0.179E-04   40  30   8   20  22  28   16  33  29    0.000    0.000       0
+  0   1738 00:39:06.62   1.3000A   1.3867  -0.3562  -0.4602  0.051  0.00   0.000      0.  0.275E+00  0.739E-02  0.274E-03  0.177E-04   40  30  12   20  22  28   15  33  29    0.000    0.000       0
+  0   1743 00:39:13.10   1.3000A   1.3884   0.3233  -0.4427  0.050  0.00   0.000      0.  0.275E+00  0.735E-02  0.273E-03  0.167E-04   35  19  28   29   2  10   18  26  29    0.000    0.000       0
+  0   1747 00:39:18.26   1.2900A   1.3909   0.3324  -0.4629  0.050  0.00   0.000      0.  0.275E+00  0.731E-02  0.270E-03  0.163E-04   35  19  32   29   2  13   17  26  29    0.000    0.000       0
+  0   1752 00:39:24.71   1.2900A   1.3904   0.3236  -0.4946  0.050  0.00   0.000      0.  0.274E+00  0.726E-02  0.267E-03  0.157E-04   35  19  35   26  39  38   17  25  29    0.000    0.000       0
+  0   1757 00:39:31.19   1.3000A   1.3881   0.3113  -0.5186  0.049  0.00   0.000      0.  0.274E+00  0.723E-02  0.266E-03  0.153E-04   35  19  39   26  39   1   17  23  29    0.000    0.000       0
+  0   1761 00:39:36.40   1.3000A   1.3803   0.3063  -0.5339  0.049  0.00   0.000      0.  0.274E+00  0.721E-02  0.265E-03  0.158E-04   35  19   2   29   3  21   17  23  29    0.000    0.000       0
+  0   1766 00:39:42.91   1.3000A   1.3828  -0.3069  -0.5170  0.048  0.00   0.000      0.  0.273E+00  0.722E-02  0.266E-03  0.177E-04   41  29  33   23   9   0   16  23  29    0.000    0.000       0
+  0   1770 00:39:48.12   1.3000A   1.3808  -0.3206  -0.5038  0.048  0.00   0.000      0.  0.273E+00  0.724E-02  0.270E-03  0.201E-04   40  29  36   23   9   2   15  24  29    0.000    0.000       0
+  0   1775 00:39:54.65   1.3100A   1.3756  -0.3029  -0.4962  0.047  0.00   0.000      0.  0.274E+00  0.729E-02  0.281E-03  0.245E-04   40  29   0   23   9   4   14  24  29    0.000    0.000       0
+  0   1780 00:40:01.23   1.3200A   1.3645  -0.2952  -0.4866  0.046  0.00   0.000      0.  0.274E+00  0.734E-02  0.292E-03  0.280E-04   40  29   4   21  10  29   13  24  29    0.000    0.000       0
+  0   1784 00:40:06.53   1.3200A   1.3586  -0.4534  -0.4780  0.046  0.00   0.000      0.  0.274E+00  0.738E-02  0.300E-03  0.289E-04   34   9   2   20  10  29   12  24  29    0.000    0.000       0
+  0   1789 00:40:13.13   1.3200A   1.3661  -0.4468  -0.5089  0.046  0.00   0.000      0.  0.275E+00  0.741E-02  0.306E-03  0.291E-04   34   9   6   19   9  29   17  11  29    0.000    0.000       0
+  0   1793 00:40:18.41   1.3200A   1.3687  -0.4662  -0.5797  0.046  0.00   0.000      0.  0.275E+00  0.743E-02  0.309E-03  0.287E-04   34   9   9   20   9  29   17  11  29    0.000    0.000       0
+  0   1798 00:40:24.97   1.3100A   1.3699  -0.4198  -0.6102  0.047  0.00   0.000      0.  0.275E+00  0.744E-02  0.306E-03  0.263E-04   34   9  13   19   9  29   16  11  29    0.000    0.000       0
+  0   1802 00:40:30.23   1.3200A   1.3668  -0.3678  -0.6064  0.047  0.00   0.000      0.  0.275E+00  0.744E-02  0.304E-03  0.243E-04   34   9  16   19   9  29   15  11  29    0.000    0.000       0
+  0   1807 00:40:36.83   1.3200A   1.3609  -0.3406  -0.5796  0.048  0.00   0.000      0.  0.276E+00  0.744E-02  0.299E-03  0.201E-04   34   9  20   17   8  29   14  11  29    0.000    0.000       0
+  0   1811 00:40:42.11   1.3200A   1.3606  -0.3491  -0.5494  0.048  0.00   0.000      0.  0.276E+00  0.742E-02  0.295E-03  0.178E-04   33  11  22   20  25  28   13  11  29    0.000    0.000       0
+  0   1816 00:40:48.72   1.3200A   1.3603   0.3399  -0.5079  0.049  0.00   0.000      0.  0.275E+00  0.740E-02  0.293E-03  0.169E-04   35   3   4   24  18   8   12  11  29    0.000    0.000       0
+  0   1820 00:40:54.01   1.3200A   1.3613   0.3337  -0.4782  0.049  0.00   0.000      0.  0.275E+00  0.737E-02  0.292E-03  0.178E-04   35   3   7   25  18  14   11  11  29    0.000    0.000       0
+  0   1825 00:41:00.58   1.3100A   1.3695  -0.3791  -0.4516  0.049  0.00   0.000      0.  0.275E+00  0.733E-02  0.285E-03  0.163E-04   33  39  35   20  22  28   18  35  29    0.000    0.000       0
+  0   1830 00:41:07.07   1.2900A   1.3916  -0.3871  -0.4499  0.049  0.00   0.000      0.  0.274E+00  0.730E-02  0.280E-03  0.173E-04   33  39  39   23  16  27   17  36  29    0.000    0.000       0
+  0   1834 00:41:12.22   1.2800A   1.4019  -0.4002  -0.4343  0.049  0.00   0.000      0.  0.274E+00  0.728E-02  0.280E-03  0.194E-04   33  39   2   23  15  28   17  36  29    0.000    0.000       0
+  0   1839 00:41:18.63   1.2800A   1.4089   0.3734  -0.4324  0.049  0.00   0.000      0.  0.274E+00  0.727E-02  0.279E-03  0.195E-04   33  39   6   26  18  29   18  13  29    0.000    0.000       0
+  0   1844 00:41:25.04   1.2900A   1.3977  -0.3559  -0.4539  0.049  0.00   0.000      0.  0.275E+00  0.726E-02  0.277E-03  0.172E-04   33  39   9   23  13  32   17  13  29    0.000    0.000       0
+  0   1848 00:41:30.17   1.2900A   1.3963  -0.3408  -0.4386  0.049  0.00   0.000      0.  0.275E+00  0.726E-02  0.275E-03  0.162E-04   33  39  12   23  13  34   16  13  29    0.000    0.000       0
+  0   1853 00:41:36.60   1.2900A   1.3976   0.3497  -0.4173  0.049  0.00   0.000      0.  0.275E+00  0.727E-02  0.274E-03  0.165E-04   33  39  16   26  19  38   15  13  29    0.000    0.000       0
+  0   1858 00:41:43.06   1.2900A   1.3937   0.3194  -0.4146  0.049  0.00   0.000      0.  0.275E+00  0.728E-02  0.276E-03  0.175E-04   33  39  20   26  19   1   13  17  29    0.000    0.000       0
+  0   1862 00:41:48.25   1.3000A   1.3896  -0.3426  -0.4767  0.049  0.00   0.000      0.  0.275E+00  0.729E-02  0.280E-03  0.180E-04   33  39  23   20  20  29   18  23  29    0.000    0.000       0
+  0   1867 00:41:54.75   1.3000A   1.3819   0.4090  -0.5388  0.049  0.00   0.000      0.  0.275E+00  0.729E-02  0.284E-03  0.192E-04   33  39  27   20  10  29   18  23  29    0.000    0.000       0
+  0   1872 00:42:01.31   1.3200A   1.3655   0.3916  -0.5369  0.049  0.00   0.000      0.  0.275E+00  0.726E-02  0.291E-03  0.198E-04   33  39  31   20  10  29   17  23  29    0.000    0.000       0
+  0   1876 00:42:06.59   1.3200A   1.3666   0.3851  -0.5642  0.049  0.00   0.000      0.  0.275E+00  0.722E-02  0.290E-03  0.190E-04   32   0  33   20  11  29   17  24  29    0.000    0.000       0
+  0   1881 00:42:13.16   1.3100A   1.3780   0.3010  -0.5549  0.049  0.00   0.000      0.  0.275E+00  0.717E-02  0.281E-03  0.167E-04   32  39  37   18  10  29   16  24  29    0.000    0.000       0
+  0   1885 00:42:18.36   1.3000A   1.3896  -0.2827  -0.5327  0.049  0.00   0.000      0.  0.275E+00  0.713E-02  0.276E-03  0.164E-04   32  39   0   24  12  19   15  24  29    0.000    0.000       0
+  0   1890 00:42:24.82   1.2900A   1.3909   0.2871  -0.5070  0.049  0.00   0.000      0.  0.275E+00  0.708E-02  0.270E-03  0.175E-04   32  39   3   23  19  37   15  25  29    0.000    0.000       0
+  0   1895 00:42:31.25   1.2800A   1.4011   0.3152  -0.4943  0.049  0.00   0.000      0.  0.275E+00  0.703E-02  0.267E-03  0.179E-04   32  39   7   22  18  36   13  25  29    0.000    0.000       0
+  0   1899 00:42:36.40   1.2900A   1.3985   0.3114  -0.4826  0.049  0.00   0.000      0.  0.275E+00  0.700E-02  0.271E-03  0.190E-04   32  39  10   22  19  37   12  25  29    0.000    0.000       0
+  0   1904 00:42:42.86   1.2900A   1.3929   0.3034  -0.4676  0.049  0.00   0.000      0.  0.275E+00  0.697E-02  0.272E-03  0.193E-04   32  39  14   22  19  39   11  25  29    0.000    0.000       0
+  0   1908 00:42:48.06   1.3000A   1.3818   0.3120  -0.4562  0.049  0.00   0.000      0.  0.275E+00  0.694E-02  0.272E-03  0.184E-04   32  39  17   22  19   1   11  25  29    0.000    0.000       0
+  0   1913 00:42:54.61   1.3000A   1.3842   0.2916  -0.4388  0.049  0.00   0.000      0.  0.275E+00  0.690E-02  0.269E-03  0.173E-04   31   1  33   22  18   3   10  25  29    0.000    0.000       0
+  0   1918 00:43:01.08   1.3000A   1.3858   0.3037  -0.4158  0.049  0.00   0.000      0.  0.275E+00  0.686E-02  0.268E-03  0.165E-04   31   1  37   23  19   8    9  25  29    0.000    0.000       0
+  0   1922 00:43:06.21   1.2800A   1.4010   0.3015  -0.4069  0.049  0.00   0.000      0.  0.275E+00  0.682E-02  0.262E-03  0.154E-04   31   1  39   23  19  10   17  12  29    0.000    0.000       0
+  0   1927 00:43:12.62   1.2800A   1.4101   0.3122  -0.4088  0.048  0.00   0.000      0.  0.274E+00  0.677E-02  0.259E-03  0.141E-04   31   1   3   22  19  10   17  12  29    0.000    0.000       0
+  0   1932 00:43:19.03   1.2900A   1.4007   0.3243  -0.3974  0.048  0.00   0.000      0.  0.274E+00  0.673E-02  0.259E-03  0.137E-04   31   1   6   22  20  13   16  12  29    0.000    0.000       0
+  0   1936 00:43:24.13   1.2700A   1.4122   0.3505  -0.3813  0.048  0.00   0.000      0.  0.274E+00  0.670E-02  0.258E-03  0.143E-04   31   1   9   22  20  14   15  12  29    0.000    0.000       0
+  0   1941 00:43:30.53   1.2900A   1.3992   0.3211  -0.3763  0.047  0.00   0.000      0.  0.274E+00  0.667E-02  0.262E-03  0.149E-04   31   1  13   22  21  16   14  14  29    0.000    0.000       0
+  0   1946 00:43:36.92   1.2700A   1.4140   0.3113  -0.3787  0.047  0.00   0.000      0.  0.274E+00  0.665E-02  0.259E-03  0.155E-04   32  38   5   22  22  18   17  31  29    0.000    0.000       0
+  0   1950 00:43:42.01   1.2700A   1.4223   0.2948  -0.3722  0.047  0.00   0.000      0.  0.274E+00  0.664E-02  0.259E-03  0.167E-04   32  38   8   23  17  20   13  14  29    0.000    0.000       0
+  0   1955 00:43:48.33   1.2600A   1.4234   0.3651  -0.3702  0.047  0.00   0.000      0.  0.274E+00  0.664E-02  0.258E-03  0.171E-04   32  38  12   20  11  29   12  14  29    0.000    0.000       0
+  0   1960 00:43:54.72   1.2900A   1.3975   0.3001  -0.3590  0.047  0.00   0.000      0.  0.274E+00  0.664E-02  0.264E-03  0.175E-04   32  38  15   19  11  29   12  14  29    0.000    0.000       0
+  0   1965 00:44:01.19   1.3000A   1.3796  -0.3126  -0.3562  0.047  0.00   0.000      0.  0.275E+00  0.664E-02  0.267E-03  0.180E-04   32  38  19   21  11  26   12  10  29    0.000    0.000       0
+  0   1969 00:44:06.41   1.3100A   1.3781  -0.3849  -0.3537  0.047  0.00   0.000      0.  0.275E+00  0.665E-02  0.271E-03  0.193E-04   41  30  13   21  12  28   12  10  29    0.000    0.000       0
+  0   1974 00:44:12.91   1.3000A   1.3815  -0.3902  -0.3751  0.047  0.00   0.000      0.  0.275E+00  0.665E-02  0.269E-03  0.194E-04   40  30  16   20  12  28   16   9  29    0.000    0.000       0
+  0   1978 00:44:18.11   1.3000A   1.3810  -0.3377  -0.3795  0.047  0.00   0.000      0.  0.275E+00  0.665E-02  0.270E-03  0.195E-04   41  30  20   20  10  28   15   9  29    0.000    0.000       0
+  0   1983 00:44:24.62   1.3000A   1.3807  -0.4204  -0.5153  0.047  0.00   0.000      0.  0.275E+00  0.664E-02  0.270E-03  0.189E-04   41  30  23   20  10  29   18  13  29    0.000    0.000       0
+  0   1988 00:44:31.16   1.3100A   1.3776  -0.4217  -0.6297  0.047  0.00   0.000      0.  0.275E+00  0.661E-02  0.270E-03  0.177E-04   31  37  36   19  10  29   17  12  29    0.000    0.000       0
+  0   1992 00:44:36.37   1.3000A   1.3857  -0.3949  -0.6394  0.047  0.00   0.000      0.  0.275E+00  0.658E-02  0.266E-03  0.163E-04   31  37  39   18  10  29   16  12  29    0.000    0.000       0
+  0   1997 00:44:42.87   1.3000A   1.3797  -0.3496  -0.6019  0.047  0.00   0.000      0.  0.275E+00  0.655E-02  0.261E-03  0.144E-04   31  37   3   17  10  29   15  12  29    0.000    0.000       0
+  0   2001 00:44:48.08   1.3100A   1.3759  -0.3095  -0.5578  0.047  0.00   0.000      0.  0.275E+00  0.652E-02  0.260E-03  0.138E-04   31  37   6   17  10  29   15  14  29    0.000    0.000       0
+  0   2006 00:44:54.64   1.3200A   1.3651   0.2710  -0.5204  0.047  0.00   0.000      0.  0.275E+00  0.649E-02  0.260E-03  0.144E-04   31  37  10   25   0  20   14  14  29    0.000    0.000       0
+  0   2011 00:45:01.22   1.3100A   1.3754   0.2858  -0.4850  0.046  0.00   0.000      0.  0.275E+00  0.647E-02  0.257E-03  0.158E-04   34   0  12   25   0  23   13  14  29    0.000    0.000       0
+  0   2015 00:45:06.43   1.2900A   1.3911   0.2784  -0.4618  0.046  0.00   0.000      0.  0.275E+00  0.646E-02  0.253E-03  0.166E-04   30  37  16   25   0  25   13  16  29    0.000    0.000       0
+  0   2020 00:45:12.86   1.2800A   1.4011  -0.2744  -0.4373  0.046  0.00   0.000      0.  0.275E+00  0.646E-02  0.251E-03  0.167E-04   30  37  20   22  20  24   13  17  29    0.000    0.000       0
+  0   2024 00:45:17***   1.2900A   1.3977  -0.2765  -0.4320  0.046  0.00   0.000      0.  0.275E+00  0.645E-02  0.252E-03  0.167E-04   30  37  23   22  19  24   12  17  29    0.000    0.000       0
+  0   2029 00:45:24.45   1.2900A   1.3969  -0.2879  -0.4154  0.046  0.00   0.000      0.  0.275E+00  0.644E-02  0.249E-03  0.158E-04   34   0  24   24  16  10   11  17  29    0.000    0.000       0
+  0   2034 00:45:30.94   1.3000A   1.3835  -0.2796  -0.3915  0.046  0.00   0.000      0.  0.274E+00  0.643E-02  0.249E-03  0.149E-04   34   0  27   24  16  13   12  18  29    0.000    0.000       0
+  0   2038 00:45:36.17   1.3100A   1.3759  -0.2744  -0.3946  0.046  0.00   0.000      0.  0.274E+00  0.643E-02  0.250E-03  0.147E-04   34   0  30   24  16  15   11  18  29    0.000    0.000       0
+  0   2043 00:45:42.74   1.3100A   1.3714  -0.2803  -0.3884  0.046  0.00   0.000      0.  0.274E+00  0.644E-02  0.249E-03  0.140E-04   39  25  36   24  16  17   10  17  28    0.000    0.000       0
+  0   2047 00:45:47***   1.3200A   1.3632  -0.2597  -0.3819  0.046  0.00   0.000      0.  0.274E+00  0.645E-02  0.250E-03  0.139E-04   39  25  39   24  15  18   10  17  28    0.000    0.000       0
+  0   2052 00:45:54.55   1.3100A   1.3787  -0.2553  -0.3778  0.046  0.00   0.000      0.  0.274E+00  0.648E-02  0.251E-03  0.151E-04   39  25   2   24  15  21    9  17  28    0.000    0.000       0
+  0   2057 00:46:01.09   1.3100A   1.3739  -0.2427  -0.3736  0.046  0.00   0.000      0.  0.274E+00  0.652E-02  0.255E-03  0.172E-04   32  39   6   23  38  16    9  18  28    0.000    0.000       0
+  0   2061 00:46:06.30   1.3000A   1.3837  -0.2561  -0.3663  0.046  0.00   0.000      0.  0.274E+00  0.656E-02  0.256E-03  0.183E-04   32  39   9   24  36  22    8  18  28    0.000    0.000       0
+  0   2066 00:46:12.80   1.3000A   1.3834  -0.2645  -0.3490  0.047  0.00   0.000      0.  0.274E+00  0.661E-02  0.258E-03  0.189E-04   41  25  10   22  14  26    8  18  28    0.000    0.000       0
+  0   2070 00:46:18.01   1.3000A   1.3858   0.3132  -0.3726  0.047  0.00   0.000      0.  0.275E+00  0.665E-02  0.258E-03  0.192E-04   41  25  13   20  15  29   17  30  29    0.000    0.000       0
+  0   2075 00:46:24.53   1.3100A   1.3789  -0.3155  -0.3686  0.048  0.00   0.000      0.  0.275E+00  0.669E-02  0.260E-03  0.188E-04   39  25  19   21   7  28   17  30  29    0.000    0.000       0
+  0   2080 00:46:31.07   1.3100A   1.3712  -0.3692  -0.3664  0.048  0.00   0.000      0.  0.275E+00  0.673E-02  0.259E-03  0.174E-04   39  25  23   20   7  28   16  30  29    0.000    0.000       0
+  0   2084 00:46:36.31   1.3100A   1.3709  -0.3724  -0.3904  0.048  0.00   0.000      0.  0.275E+00  0.676E-02  0.258E-03  0.160E-04   41   2  13   20   7  28   17  13  29    0.000    0.000       0
+  0   2089 00:46:42.86   1.3100A   1.3740  -0.3293  -0.4210  0.049  0.00   0.000      0.  0.275E+00  0.679E-02  0.260E-03  0.173E-04   41   2  17   20   6  28   17  13  29    0.000    0.000       0
+  0   2093 00:46:48.10   1.3100A   1.3748  -0.3095  -0.4241  0.049  0.00   0.000      0.  0.275E+00  0.681E-02  0.262E-03  0.180E-04   41   2  20   24  11   4   16  13  29    0.000    0.000       0
+  0   2098 00:46:54.65   1.3100A   1.3751  -0.3251  -0.4080  0.049  0.00   0.000      0.  0.275E+00  0.683E-02  0.262E-03  0.171E-04   41   2  24   23  13   2   18   9  29    0.000    0.000       0
+  0   2103 00:47:01.20   1.3100A   1.3747  -0.3131  -0.4321  0.049  0.00   0.000      0.  0.275E+00  0.683E-02  0.259E-03  0.158E-04   41   2  28   25  11  10   18  16  29    0.000    0.000       0
+  0   2107 00:47:06.44   1.3100A   1.3729   0.3199  -0.4268  0.049  0.00   0.000      0.  0.274E+00  0.682E-02  0.257E-03  0.151E-04   41   2  32   19  18  29   17  16  29    0.000    0.000       0
+  0   2112 00:47:12.99   1.3100A   1.3720   0.3065  -0.4093  0.049  0.00   0.000      0.  0.274E+00  0.680E-02  0.255E-03  0.143E-04   41   2  36   18  18  29   16  10  29    0.000    0.000       0
+  0   2116 00:47:18.22   1.3000A   1.3802  -0.2787  -0.3930  0.049  0.00   0.000      0.  0.274E+00  0.680E-02  0.250E-03  0.129E-04   39  26   9   22  13  10   15  10  29    0.000    0.000       0
+  0   2121 00:47:24.74   1.3000A   1.3832   0.2703  -0.3798  0.048  0.00   0.000      0.  0.273E+00  0.680E-02  0.250E-03  0.132E-04   40  20  19   24  23  15   14  11  28    0.000    0.000       0
+  0   2126 00:47:31.24   1.3000A   1.3879  -0.3001  -0.3729  0.047  0.00   0.000      0.  0.273E+00  0.683E-02  0.255E-03  0.166E-04   40  20  23   21  17  28   13  11  28    0.000    0.000       0
+  0   2130 00:47:36.43   1.2900A   1.3903  -0.3306  -0.3677  0.047  0.00   0.000      0.  0.274E+00  0.687E-02  0.258E-03  0.190E-04   40  20  26   21  21  26   14  19  29    0.000    0.000       0
+  0   2135 00:47:42.92   1.3000A   1.3888  -0.3831  -0.3643  0.046  0.00   0.000      0.  0.274E+00  0.693E-02  0.267E-03  0.220E-04   40  20  30   21  20  28   15  12  29    0.000    0.000       0
+  0   2139 00:47:48.12   1.3000A   1.3869  -0.4089  -0.3748  0.046  0.00   0.000      0.  0.274E+00  0.698E-02  0.273E-03  0.245E-04   40  20  33   20  17  29   14  12  28    0.000    0.000       0
+  0   2144 00:47:54.62   1.3000A   1.3840  -0.4120   0.3849  0.046  0.00   0.000      0.  0.274E+00  0.704E-02  0.280E-03  0.262E-04   40  19  36   20  17  29   20  15  29    0.000    0.000       0
+  0   2149 00:48:01.08   1.2900A   1.3954   0.4201  -0.4304  0.047  0.00   0.000      0.  0.275E+00  0.709E-02  0.277E-03  0.244E-04   40  19   0   22  24  28   18  21  29    0.000    0.000       0
+  0   2153 00:48:06.24   1.2900A   1.3992   0.4199  -0.4670  0.047  0.00   0.000      0.  0.275E+00  0.712E-02  0.274E-03  0.218E-04   40  19   3   21  24  28   18  22  29    0.000    0.000       0
+  0   2158 00:48:12.64   1.2800A   1.4056   0.4362  -0.5508  0.047  0.00   0.000      0.  0.275E+00  0.713E-02  0.270E-03  0.186E-04   40  19   7   20  20  28   17  23  29    0.000    0.000       0
+  0   2163 00:48:19.04   1.2800A   1.4086   0.4275  -0.5911  0.047  0.00   0.000      0.  0.275E+00  0.713E-02  0.269E-03  0.186E-04   40  19  11   20  21  28   17  23  29    0.000    0.000       0
+  0   2167 00:48:24.16   1.2800A   1.4063   0.4117  -0.5903  0.047  0.00   0.000      0.  0.275E+00  0.712E-02  0.268E-03  0.181E-04   40  19  14   20  22  28   16  23  29    0.000    0.000       0
+  0   2172 00:48:30.56   1.2800A   1.4079   0.3323  -0.5506  0.048  0.00   0.000      0.  0.275E+00  0.711E-02  0.265E-03  0.175E-04   39  19  17   20  22  28   15  23  29    0.000    0.000       0
+  0   2177 00:48:36.95   1.2800A   1.4072   0.3419  -0.5065  0.048  0.00   0.000      0.  0.274E+00  0.710E-02  0.263E-03  0.170E-04   39  19  21   20  23  28   14  23  29    0.000    0.000       0
+  0   2181 00:48:42.07   1.2800A   1.4061   0.3251  -0.4770  0.048  0.00   0.000      0.  0.274E+00  0.709E-02  0.259E-03  0.163E-04   39  19  25   22  38   7   13  23  29    0.000    0.000       0
+  0   2186 00:48:48.48   1.2900A   1.3999   0.3197  -0.4433  0.048  0.00   0.000      0.  0.274E+00  0.708E-02  0.258E-03  0.157E-04   39  19  29   22  38   9   12  23  29    0.000    0.000       0
+  0   2191 00:48:54.93   1.2900A   1.3912   0.2955  -0.4154  0.047  0.00   0.000      0.  0.274E+00  0.709E-02  0.258E-03  0.160E-04   39  19  33   22  38  10   13  26  29    0.000    0.000       0
+  0   2195 00:49:00.13   1.3000A   1.3823   0.2813  -0.4069  0.047  0.00   0.000      0.  0.274E+00  0.710E-02  0.260E-03  0.170E-04   39  19  36   20  25  28   16  29  29    0.000    0.000       0
+  0   2200 00:49:06.67   1.3100A   1.3691   0.2822  -0.4030  0.047  0.00   0.000      0.  0.274E+00  0.712E-02  0.265E-03  0.185E-04   39  19   0   22  26   8   15  29  29    0.000    0.000       0
+  0   2205 00:49:13.27   1.3200A   1.3669  -0.3062  -0.3937  0.047  0.00   0.000      0.  0.274E+00  0.714E-02  0.268E-03  0.171E-04   40   8  24   21  32  28   15  29  29    0.000    0.000       0
+  0   2209 00:49:18.54   1.3100A   1.3707  -0.3218  -0.3929  0.047  0.00   0.000      0.  0.274E+00  0.716E-02  0.268E-03  0.166E-04   41  32  20   22  33  32   16  17  29    0.000    0.000       0
+  0   2214 00:49:25.09   1.3100A   1.3757   0.3568  -0.3943  0.047  0.00   0.000      0.  0.274E+00  0.717E-02  0.273E-03  0.183E-04   41  32  24   21  39  31   18  36  29    0.000    0.000       0
+  0   2218 00:49:30.31   1.3000A   1.3796   0.3303  -0.3887  0.047  0.00   0.000      0.  0.274E+00  0.719E-02  0.276E-03  0.208E-04   41  32  27   21  39  33   15  17  29    0.000    0.000       0
+  0   2223 00:49:36.82   1.3000A   1.3824   0.3414  -0.3830  0.047  0.00   0.000      0.  0.274E+00  0.721E-02  0.280E-03  0.216E-04   40  32  30   22   0  38   14  17  29    0.000    0.000       0
+  0   2227 00:49:42.02   1.3000A   1.3856   0.3569  -0.3861  0.047  0.00   0.000      0.  0.274E+00  0.722E-02  0.279E-03  0.207E-04   40  32  33   23   1   0   17  35  29    0.000    0.000       0
+  0   2232 00:49:48.50   1.2900A   1.3925   0.3548  -0.3821  0.047  0.00   0.000      0.  0.274E+00  0.724E-02  0.275E-03  0.190E-04   40  32  37   23   1   2   17  35  29    0.000    0.000       0
+  0   2237 00:49:54.95   1.2900A   1.3970  -0.3315  -0.3825  0.047  0.00   0.000      0.  0.274E+00  0.727E-02  0.271E-03  0.169E-04   41  32   1   20  39  28   16  35  29    0.000    0.000       0
+  0   2241 00:50:00.11   1.2900A   1.3998  -0.3354  -0.3820  0.047  0.00   0.000      0.  0.274E+00  0.728E-02  0.271E-03  0.169E-04   41  32   4   20  37  28   16  33  29    0.000    0.000       0
+  0   2246 00:50:06.54   1.2900A   1.3992  -0.3239  -0.3961  0.047  0.00   0.000      0.  0.274E+00  0.730E-02  0.271E-03  0.169E-04   41  32   8   20  37  28   16  33  29    0.000    0.000       0
+  0   2251 00:50:12.97   1.2900A   1.4005  -0.3154  -0.4083  0.047  0.00   0.000      0.  0.274E+00  0.731E-02  0.271E-03  0.164E-04   40  32  11   22  37  38   18   5  29    0.000    0.000       0
+  0   2255 00:50:18.11   1.2900A   1.4005  -0.3128  -0.4068  0.047  0.00   0.000      0.  0.274E+00  0.732E-02  0.271E-03  0.163E-04   40  32  14   22  37   0   18   6  29    0.000    0.000       0
+  0   2260 00:50:24.55   1.2900A   1.3987  -0.3096  -0.4104  0.047  0.00   0.000      0.  0.274E+00  0.732E-02  0.271E-03  0.156E-04   41  32  18   22  31  25   17   3  29    0.000    0.000       0
+  0   2265 00:50:31.00   1.2900A   1.3962  -0.3367  -0.4308  0.047  0.00   0.000      0.  0.274E+00  0.733E-02  0.275E-03  0.166E-04   40  31  20   22  31  27   17   3  29    0.000    0.000       0
+  0   2269 00:50:36.16   1.2900A   1.3979  -0.3276  -0.4244  0.047  0.00   0.000      0.  0.274E+00  0.733E-02  0.276E-03  0.175E-04   40  31  23   22  31  29   16   3  29    0.000    0.000       0
+  0   2274 00:50:42.61   1.2900A   1.3983   0.3359  -0.4114  0.047  0.00   0.000      0.  0.274E+00  0.734E-02  0.274E-03  0.169E-04   40  31  27   20  22  28   16   3  29    0.000    0.000       0
+  0   2279 00:50:49.06   1.2900A   1.3901   0.3247  -0.4018  0.048  0.00   0.000      0.  0.274E+00  0.735E-02  0.277E-03  0.184E-04   40  31  31   20  23  28   15   3  29    0.000    0.000       0
+  0   2283 00:50:54.24   1.3000A   1.3854  -0.2927  -0.3936  0.048  0.00   0.000      0.  0.274E+00  0.736E-02  0.282E-03  0.196E-04   39  31   0   22  15  31   14   3  29    0.000    0.000       0
+  0   2288 00:51:00.74   1.3000A   1.3820  -0.3204  -0.3897  0.048  0.00   0.000      0.  0.274E+00  0.737E-02  0.284E-03  0.189E-04   41  32   2   23  37  16   17  17  29    0.000    0.000       0
+  0   2293 00:51:07.24   1.3000A   1.3824  -0.3194  -0.3842  0.049  0.00   0.000      0.  0.274E+00  0.737E-02  0.281E-03  0.164E-04   41  32   6   23  37  18   17  17  29    0.000    0.000       0
+  0   2297 00:51:12.44   1.3000A   1.3793   0.3443  -0.3819  0.049  0.00   0.000      0.  0.274E+00  0.736E-02  0.280E-03  0.156E-04   41  32   9   28  27  29   17  14  29    0.000    0.000       0
+  0   2302 00:51:18.93   1.3000A   1.3896   0.3520  -0.3719  0.049  0.00   0.000      0.  0.274E+00  0.736E-02  0.283E-03  0.174E-04   38  32  11   28  27  32   15  28  29    0.000    0.000       0
+  0   2306 00:51:24.09   1.2900A   1.3900   0.3402  -0.3658  0.049  0.00   0.000      0.  0.274E+00  0.736E-02  0.282E-03  0.168E-04   38  32  15   28  27  34   14  28  29    0.000    0.000       0
+  0   2311 00:51:30.54   1.2900A   1.3924   0.3658  -0.3813  0.049  0.00   0.000      0.  0.274E+00  0.737E-02  0.281E-03  0.150E-04   38  32  18   28  28  37   18   9  29    0.000    0.000       0
+  0   2316 00:51:37.00   1.3000A   1.3890   0.3556  -0.4332  0.049  0.00   0.000      0.  0.273E+00  0.737E-02  0.285E-03  0.148E-04   38  32  22   28  28   0   18   8  29    0.000    0.000       0
+  0   2320 00:51:42.16   1.2900A   1.3913  -0.3632  -0.4455  0.049  0.00   0.000      0.  0.273E+00  0.737E-02  0.284E-03  0.159E-04   38  32  26   23  11  14   17   8  29    0.000    0.000       0
+  0   2325 00:51:48.64   1.2900A   1.3951  -0.3731  -0.4300  0.049  0.00   0.000      0.  0.273E+00  0.738E-02  0.284E-03  0.155E-04   38  32  30   23  11  16   17   8  29    0.000    0.000       0
+  0   2330 00:51:55.08   1.2800A   1.4010  -0.3490  -0.4242  0.048  0.00   0.000      0.  0.273E+00  0.739E-02  0.281E-03  0.156E-04   38  32  34   23  11  18   16   7  29    0.000    0.000       0
+  0   2334 00:52:00.22   1.2800A   1.4026  -0.3479  -0.4087  0.048  0.00   0.000      0.  0.272E+00  0.742E-02  0.280E-03  0.150E-04   38  32  37   23  10  19   15   9  29    0.000    0.000       0
+  0   2339 00:52:06.65   1.2800A   1.4080   0.3405  -0.3926  0.048  0.00   0.000      0.  0.272E+00  0.746E-02  0.283E-03  0.159E-04   38  31   0   27  29  13   14   9  29    0.000    0.000       0
+  0   2344 00:52:13.05   1.2900A   1.4008   0.3572  -0.3766  0.048  0.00   0.000      0.  0.272E+00  0.751E-02  0.292E-03  0.176E-04   38  31   4   27  29  15   14   9  29    0.000    0.000       0
+  0   2348 00:52:18.17   1.2900A   1.3991  -0.3569  -0.3752  0.048  0.00   0.000      0.  0.272E+00  0.756E-02  0.294E-03  0.172E-04   38  31   6   23  29  16   13   9  29    0.000    0.000       0
+  0   2353 00:52:24.58   1.2800A   1.4052  -0.3596  -0.3660  0.048  0.00   0.000      0.  0.273E+00  0.763E-02  0.299E-03  0.186E-04   38  31  10   23  28  19   12   9  29    0.000    0.000       0
+  0   2358 00:52:31.02   1.2900A   1.3963  -0.3616  -0.3834  0.048  0.00   0.000      0.  0.273E+00  0.771E-02  0.314E-03  0.232E-04   38  31  14   23  28  21   21  30  26    0.000    0.000       0
+  0   2362 00:52:36.22   1.3000A   1.3834  -0.3372  -0.4019  0.049  0.00   0.000      0.  0.273E+00  0.778E-02  0.321E-03  0.251E-04   38  31  17   23  27  23   20  28  28    0.000    0.000       0
+  0   2367 00:52:42.77   1.3100A   1.3738  -0.4021  -0.5000  0.050  0.00   0.000      0.  0.273E+00  0.785E-02  0.329E-03  0.267E-04   37  32  20   20  27  29   18  28  29    0.000    0.000       0
+  0   2371 00:52:48.01   1.3100A   1.3719   0.4148  -0.5472  0.050  0.00   0.000      0.  0.273E+00  0.790E-02  0.333E-03  0.278E-04   37  32  23   20  31  29   18  28  29    0.000    0.000       0
+  0   2376 00:52:54.59   1.3200A   1.3644   0.4187  -0.5471  0.051  0.00   0.000      0.  0.274E+00  0.793E-02  0.333E-03  0.258E-04   37  32  27   19  32  29   17  29  29    0.000    0.000       0
+  0   2381 00:53:01.08   1.2900A   1.3986   0.4415  -0.5144  0.052  0.00   0.000      0.  0.274E+00  0.794E-02  0.323E-03  0.224E-04   37  31  30   19  32  29   16  29  29    0.000    0.000       0
+  0   2385 00:53:06.20   1.2700A   1.4147   0.4085  -0.5463  0.053  0.00   0.000      0.  0.274E+00  0.792E-02  0.317E-03  0.205E-04   37  31  33   18  32  29   18  22  29    0.000    0.000       0
+  0   2390 00:53:12.59   1.2800A   1.4016  -0.3618  -0.5716  0.053  0.00   0.000      0.  0.273E+00  0.788E-02  0.314E-03  0.189E-04   37  31  37   21  27  26   17  22  29    0.000    0.000       0
+  0   2395 00:53:19.08   1.3100A   1.3755   0.3481  -0.5667  0.053  0.00   0.000      0.  0.273E+00  0.781E-02  0.317E-03  0.181E-04   37  31   0   25  38  17   17  23  29    0.000    0.000       0
+  0   2399 00:53:24.38   1.3300A   1.3554  -0.3743  -0.5987  0.053  0.00   0.000      0.  0.272E+00  0.776E-02  0.320E-03  0.176E-04   30  11  31   20  28  28   17  24  29    0.000    0.000       0
+  0   2404 00:53:30.99   1.3200A   1.3664  -0.4320  -0.5891  0.052  0.00   0.000      0.  0.272E+00  0.770E-02  0.314E-03  0.168E-04   30  11  34   20  28  28   16  24  29    0.000    0.000       0
+  0   2408 00:53:36.26   1.3200A   1.3669  -0.3845  -0.5656  0.051  0.00   0.000      0.  0.272E+00  0.766E-02  0.312E-03  0.173E-04   30  11  37   22  26   9   15  24  29    0.000    0.000       0
+  0   2413 00:53:42.86   1.3200A   1.3622  -0.3522  -0.5290  0.050  0.00   0.000      0.  0.272E+00  0.764E-02  0.310E-03  0.186E-04   30  11   1   22  25  10   15  25  29    0.000    0.000       0
+  0   2417 00:53:48.17   1.3300A   1.3571  -0.3344  -0.5058  0.050  0.00   0.000      0.  0.272E+00  0.764E-02  0.313E-03  0.211E-04   30  11   4   22  26  12   14  25  29    0.000    0.000       0
+  0   2422 00:53:54.75   1.3100A   1.3690  -0.3435  -0.4825  0.049  0.00   0.000      0.  0.272E+00  0.766E-02  0.313E-03  0.259E-04   30  10   8   20  10  29   12  25  29    0.000    0.000       0
+  0   2427 00:54:01.28   1.3000A   1.3848  -0.4013  -0.4559  0.048  0.00   0.000      0.  0.272E+00  0.771E-02  0.317E-03  0.287E-04   30  10  12   20  10  29   11  25  29    0.000    0.000       0
+  0   2431 00:54:06.48   1.3000A   1.3872  -0.4149  -0.4753  0.048  0.00   0.000      0.  0.272E+00  0.774E-02  0.314E-03  0.267E-04   30  10  15   19  10  29   17  12  29    0.000    0.000       0
+  0   2436 00:54:12.99   1.3100A   1.3788  -0.4154  -0.5178  0.048  0.00   0.000      0.  0.273E+00  0.776E-02  0.314E-03  0.235E-04   30  10  18   20  31  29   16  12  29    0.000    0.000       0
+  0   2440 00:54:18.20   1.3100A   1.3769   0.4048  -0.5562  0.049  0.00   0.000      0.  0.273E+00  0.775E-02  0.315E-03  0.224E-04   30  10  21   19  17  29   17  14  29    0.000    0.000       0
+  0   2445 00:54:24.73   1.3100A   1.3751   0.4213  -0.5908  0.049  0.00   0.000      0.  0.273E+00  0.773E-02  0.314E-03  0.212E-04   30  10  25   19  17  29   16  14  29    0.000    0.000       0
+  0   2450 00:54:31.26   1.3100A   1.3748   0.3629  -0.5691  0.050  0.00   0.000      0.  0.273E+00  0.769E-02  0.310E-03  0.198E-04   29  16  14   18  17  29   15  14  29    0.000    0.000       0
+  0   2454 00:54:36.45   1.3000A   1.3854   0.3459  -0.5439  0.050  0.00   0.000      0.  0.273E+00  0.766E-02  0.304E-03  0.187E-04   27  17  19   19  18  29   14  14  29    0.000    0.000       0
+  0   2459 00:54:42.91   1.2900A   1.3907   0.3062  -0.5117  0.050  0.00   0.000      0.  0.273E+00  0.762E-02  0.297E-03  0.178E-04   27  17  23   18  18  29   13  14  29    0.000    0.000       0
+  0   2463 00:54:48.13   1.3100A   1.3691   0.2918  -0.4893  0.050  0.00   0.000      0.  0.272E+00  0.759E-02  0.299E-03  0.175E-04   33   3  26   27  25   7   12  14  29    0.000    0.000       0
+  0   2468 00:54:54.73   1.3200A   1.3594  -0.3056  -0.4677  0.051  0.00   0.000      0.  0.272E+00  0.756E-02  0.301E-03  0.183E-04   33   3  29   22  30  12   11  15  29    0.000    0.000       0
+  0   2472 00:55:00.04   1.3300A   1.3537  -0.3174  -0.4549  0.051  0.00   0.000      0.  0.272E+00  0.755E-02  0.305E-03  0.189E-04   28  16  31   22  30  14   11  15  29    0.000    0.000       0
+  0   2477 00:55:06.70   1.3300A   1.3484  -0.3024  -0.4360  0.051  0.00   0.000      0.  0.272E+00  0.754E-02  0.306E-03  0.193E-04   28  16  35   22  30  16   10  15  29    0.000    0.000       0
+  0   2481 00:55:12.06   1.3400A   1.3440  -0.2946  -0.4215  0.051  0.00   0.000      0.  0.272E+00  0.754E-02  0.309E-03  0.193E-04   41  11   7   22  34  26   10  15  29    0.000    0.000       0
+  0   2486 00:55:18.75   1.3300A   1.3513  -0.3231  -0.4229  0.051  0.00   0.000      0.  0.272E+00  0.755E-02  0.309E-03  0.201E-04   39  19   6   23  38  28   10   7  28    0.000    0.000       0
+  0   2490 00:55:24.07   1.3300A   1.3519  -0.3121  -0.4265  0.051  0.00   0.000      0.  0.272E+00  0.757E-02  0.310E-03  0.201E-04   39  19   9   22  26  24   11   8  28    0.000    0.000       0
+  0   2495 00:55:30.72   1.3300A   1.3495  -0.3103  -0.4290  0.050  0.00   0.000      0.  0.272E+00  0.759E-02  0.312E-03  0.197E-04   32   8  36   20   1  29   17  20  29    0.000    0.000       0
+  0   2499 00:55:36.07   1.3400A   1.3480  -0.3978  -0.4258  0.050  0.00   0.000      0.  0.272E+00  0.760E-02  0.318E-03  0.211E-04   32   8  39   20   0  29   18   2  29    0.000    0.000       0
+  0   2504 00:55:42.73   1.3200A   1.3646  -0.3879  -0.4662  0.051  0.00   0.000      0.  0.272E+00  0.761E-02  0.316E-03  0.217E-04   26  17  17   20   0  29   17   2  29    0.000    0.000       0
+  0   2508 00:55:48.00   1.3100A   1.3758   0.3524  -0.4784  0.051  0.00   0.000      0.  0.272E+00  0.762E-02  0.312E-03  0.220E-04   26  17  20   20  33  28   17   2  29    0.000    0.000       0
+  0   2513 00:55:54.58   1.3200A   1.3621  -0.3466  -0.4652  0.051  0.00   0.000      0.  0.272E+00  0.762E-02  0.308E-03  0.211E-04   26  17  23   22  37   2   16   1  29    0.000    0.000       0
+  0   2518 00:56:01.20   1.3300A   1.3506   0.3436  -0.4469  0.051  0.00   0.000      0.  0.272E+00  0.762E-02  0.305E-03  0.194E-04   35  14  10   20  39  28   15   1  29    0.000    0.000       0
+  0   2522 00:56:06.52   1.3300A   1.3508   0.3518  -0.5175  0.051  0.00   0.000      0.  0.272E+00  0.763E-02  0.303E-03  0.188E-04   35  14  13   20  39  28   17  30  29    0.000    0.000       0
+  0   2527 00:56:13.17   1.3300A   1.3523   0.3179  -0.5391  0.051  0.00   0.000      0.  0.272E+00  0.765E-02  0.301E-03  0.185E-04   35  13  17   22  17   7   16  30  29    0.000    0.000       0
+  0   2531 00:56:18.49   1.3300A   1.3538  -0.3299  -0.5270  0.051  0.00   0.000      0.  0.272E+00  0.767E-02  0.301E-03  0.193E-04   35  13  20   29  23   1   16  30  29    0.000    0.000       0
+  0   2536 00:56:25.12   1.3200A   1.3650  -0.3170  -0.5099  0.051  0.00   0.000      0.  0.272E+00  0.771E-02  0.301E-03  0.220E-04   41  30  15   29  23   4   15  30  29    0.000    0.000       0
+  0   2540 00:56:30.37   1.3100A   1.3788   0.3399  -0.4975  0.051  0.00   0.000      0.  0.272E+00  0.775E-02  0.301E-03  0.235E-04   41  30  18   22  21  18   14  30  29    0.000    0.000       0
+  0   2545 00:56:36.89   1.3000A   1.3857   0.3673  -0.4718  0.051  0.00   0.000      0.  0.272E+00  0.780E-02  0.300E-03  0.241E-04   41  30  22   22  21  20   13  30  29    0.000    0.000       0
+  0   2549 00:56:42.07   1.3000A   1.3884   0.3810  -0.4451  0.051  0.00   0.000      0.  0.272E+00  0.783E-02  0.298E-03  0.225E-04   41  30  25   22  21  21   12  30  29    0.000    0.000       0
+  0   2554 00:56:48.54   1.3000A   1.3882   0.3353  -0.4459  0.051  0.00   0.000      0.  0.272E+00  0.785E-02  0.294E-03  0.191E-04   32  13   0   22  20  21   18  32  29    0.000    0.000       0
+  0   2559 00:56:54.99   1.2900A   1.3928   0.3252  -0.4604  0.051  0.00   0.000      0.  0.272E+00  0.786E-02  0.290E-03  0.182E-04   32  13   3   22  22  25   17  32  29    0.000    0.000       0
+  0   2563 00:57:00.15   1.2900A   1.3903  -0.3719  -0.4631  0.051  0.00   0.000      0.  0.272E+00  0.786E-02  0.289E-03  0.187E-04   32  13   6   21  37  28   16  33  29    0.000    0.000       0
+  0   2568 00:57:06.62   1.3000A   1.3890  -0.3863  -0.4604  0.051  0.00   0.000      0.  0.272E+00  0.786E-02  0.290E-03  0.188E-04   32  13  10   20  36  28   15  33  29    0.000    0.000       0
+  0   2573 00:57:13.10   1.3000A   1.3848  -0.4201  -0.4832  0.052  0.00   0.000      0.  0.272E+00  0.786E-02  0.289E-03  0.195E-04   32  13  14   20  35  28   17   4  29    0.000    0.000       0
+  0   2577 00:57:18.31   1.3100A   1.3765  -0.3474  -0.4839  0.052  0.00   0.000      0.  0.272E+00  0.786E-02  0.292E-03  0.202E-04   32  13  17   20  32  29   17   4  29    0.000    0.000       0
+  0   2582 00:57:24.87   1.3200A   1.3688   0.3215  -0.4674  0.052  0.00   0.000      0.  0.272E+00  0.786E-02  0.294E-03  0.193E-04   32  13  21   20  31  28   16   4  29    0.000    0.000       0
+  0   2586 00:57:30.12   1.3200A   1.3657   0.5088  -0.4463  0.052  0.00   0.000      0.  0.272E+00  0.787E-02  0.296E-03  0.189E-04   32  12  23   20  32  28   15   4  29    0.000    0.000       0
+  0   2591 00:57:36.72   1.3200A   1.3672   0.5193  -0.4231  0.052  0.00   0.000      0.  0.272E+00  0.789E-02  0.303E-03  0.209E-04   32  12  27   20  33  28   18  12  29    0.000    0.000       0
+  0   2596 00:57:43.29   1.3100A   1.3742   0.4474  -0.4761  0.052  0.00   0.000      0.  0.272E+00  0.790E-02  0.305E-03  0.230E-04   32  11  30   20  33  28   17  12  29    0.000    0.000       0
+  0   2600 00:57:48.49   1.3000A   1.3839   0.3806  -0.5109  0.053  0.00   0.000      0.  0.272E+00  0.789E-02  0.304E-03  0.243E-04   32  11  33   22  19   7   17  12  29    0.000    0.000       0
+  0   2605 00:57:54.94   1.2800A   1.4009   0.3750  -0.5133  0.053  0.00   0.000      0.  0.273E+00  0.788E-02  0.297E-03  0.232E-04   29   7   2   22  19   9   16  12  29    0.000    0.000       0
+  0   2609 00:58:00.07   1.2800A   1.4024  -0.3758  -0.4961  0.053  0.00   0.000      0.  0.273E+00  0.785E-02  0.295E-03  0.217E-04   32  11   0   20  31  28   15  12  29    0.000    0.000       0
+  0   2614 00:58:06.47   1.2800A   1.4113   0.3653  -0.4765  0.053  0.00   0.000      0.  0.272E+00  0.781E-02  0.295E-03  0.201E-04   32  11   4   23  19  16   14  11  29    0.000    0.000       0
+  0   2619 00:58:12.83   1.2700A   1.4180   0.3806  -0.5408  0.052  0.00   0.000      0.  0.272E+00  0.776E-02  0.291E-03  0.186E-04   32  11   8   22  21  16   18  17  29    0.000    0.000       0
+  0   2624 00:58:19.18   1.2700A   1.4213   0.3549  -0.5771  0.052  0.00   0.000      0.  0.272E+00  0.770E-02  0.290E-03  0.179E-04   32  11  12   22  21  18   17  17  29    0.000    0.000       0
+  0   2628 00:58:24.25   1.2600A   1.4230   0.3457  -0.5493  0.051  0.00   0.000      0.  0.272E+00  0.766E-02  0.285E-03  0.170E-04   32  11  15   22  20  21   16  17  29    0.000    0.000       0
+  0   2633 00:58:30.58   1.2600A   1.4234   0.3284  -0.5015  0.051  0.00   0.000      0.  0.272E+00  0.762E-02  0.283E-03  0.163E-04   32  11  19   22  21  22   15  17  29    0.000    0.000       0
+  0   2638 00:58:36.90   1.2600A   1.4233   0.3270  -0.4583  0.051  0.00   0.000      0.  0.272E+00  0.759E-02  0.282E-03  0.172E-04   32  11  23   22  21  24   14  17  29    0.000    0.000       0
+  0   2643 00:58:43.22   1.2700A   1.4217   0.3578  -0.4246  0.050  0.00   0.000      0.  0.272E+00  0.758E-02  0.284E-03  0.201E-04   32  11  27   22  20  28   13  17  29    0.000    0.000       0
+  0   2647 00:58:48.27   1.2600A   1.4269   0.3811  -0.4030  0.050  0.00   0.000      0.  0.272E+00  0.759E-02  0.285E-03  0.225E-04   32  11  30   22  21  29   12  17  29    0.000    0.000       0
+  0   2652 00:58:54.57   1.2600A   1.4248   0.3612  -0.3888  0.049  0.00   0.000      0.  0.272E+00  0.761E-02  0.281E-03  0.210E-04   32  11  34   20  18  28   14  34  29    0.000    0.000       0
+  0   2657 00:59:00.85   1.2600A   1.4318   0.4018  -0.3876  0.049  0.00   0.000      0.  0.272E+00  0.765E-02  0.278E-03  0.190E-04   32  11  37   20  19  28   13  34  29    0.000    0.000       0
+  0   2662 00:59:07.12   1.2500A   1.4354   0.4243  -0.3858  0.049  0.00   0.000      0.  0.272E+00  0.768E-02  0.281E-03  0.205E-04   32  11   1   20  20  28   12  34  29    0.000    0.000       0
+  0   2666 00:59:12.15   1.2600A   1.4333   0.3906  -0.4515  0.049  0.00   0.000      0.  0.272E+00  0.771E-02  0.287E-03  0.224E-04   32  11   4   20  20  28   18  11  29    0.000    0.000       0
+  0   2671 00:59:18.44   1.2600A   1.4307   0.3684  -0.5019  0.049  0.00   0.000      0.  0.272E+00  0.775E-02  0.287E-03  0.219E-04   32  11   8   20  19  29   17  12  29    0.000    0.000       0
+  0   2676 00:59:24.76   1.2600A   1.4234   0.3943  -0.5195  0.050  0.00   0.000      0.  0.272E+00  0.777E-02  0.285E-03  0.188E-04   32  11  12   20  20  29   17  12  29    0.000    0.000       0
+  0   2681 00:59:31.12   1.2800A   1.4116   0.3612  -0.5156  0.050  0.00   0.000      0.  0.272E+00  0.778E-02  0.291E-03  0.179E-04   32  11  16   20  21  29   16  12  29    0.000    0.000       0
+  0   2685 00:59:36.24   1.2800A   1.4015  -0.3670  -0.5117  0.051  0.00   0.000      0.  0.272E+00  0.779E-02  0.293E-03  0.179E-04   32  11  19   20  27  29   17  15  29    0.000    0.000       0
+  0   2690 00:59:42.67   1.2900A   1.4001   0.3376  -0.5125  0.051  0.00   0.000      0.  0.272E+00  0.779E-02  0.298E-03  0.195E-04   30   9  16   20   7  29   16  15  29    0.000    0.000       0
+  0   2695 00:59:49.11   1.2900A   1.3973   0.3352  -0.5089  0.051  0.00   0.000      0.  0.272E+00  0.780E-02  0.297E-03  0.202E-04   37  16  12   19   7  29   15  15  29    0.000    0.000       0
+  0   2699 00:59:54.27   1.2900A   1.3961  -0.3291  -0.5086  0.052  0.00   0.000      0.  0.272E+00  0.780E-02  0.293E-03  0.194E-04   37  16  15   22  28  24   15  16  29    0.000    0.000       0
+  0   2704 01:00:00.72   1.2900A   1.3992   0.3662  -0.4981  0.052  0.00   0.000      0.  0.272E+00  0.781E-02  0.293E-03  0.203E-04   32  11  35   20  28  28   14  16  29    0.000    0.000       0
+  0   2709 01:00:07.14   1.2800A   1.4038  -0.3671  -0.4817  0.053  0.00   0.000      0.  0.272E+00  0.781E-02  0.289E-03  0.197E-04   32  11  39   22  27  28   13  16  29    0.000    0.000       0
+  0   2713 01:00:12.24   1.2800A   1.4044  -0.3745  -0.4686  0.053  0.00   0.000      0.  0.272E+00  0.781E-02  0.289E-03  0.199E-04   32  11   2   21  27  26   12  16  29    0.000    0.000       0
+  0   2718 01:00:18.58   1.2600A   1.4237  -0.4098  -0.4473  0.053  0.00   0.000      0.  0.272E+00  0.780E-02  0.286E-03  0.191E-04   32  11   5   21  27  28   11  16  29    0.000    0.000       0
+  0   2723 01:00:24.91   1.2700A   1.4219  -0.3843  -0.4520  0.053  0.00   0.000      0.  0.272E+00  0.778E-02  0.286E-03  0.170E-04   32  11   9   21  26  28   18  19  29    0.000    0.000       0
+  0   2728 01:00:31.24   1.2700A   1.4207  -0.3518  -0.4448  0.053  0.00   0.000      0.  0.272E+00  0.775E-02  0.285E-03  0.161E-04   32  11  12   22  24  35   17  19  29    0.000    0.000       0
+  0   2732 01:00:36.32   1.2700A   1.4224  -0.3657  -0.4211  0.053  0.00   0.000      0.  0.272E+00  0.773E-02  0.285E-03  0.160E-04   32  11  15   22  24  37   16  19  29    0.000    0.000       0
+  0   2737 01:00:42.66   1.2700A   1.4143  -0.3798  -0.5198  0.052  0.00   0.000      0.  0.271E+00  0.769E-02  0.289E-03  0.180E-04   32  11  19   22  24  38   18  31  29    0.000    0.000       0
+  0   2742 01:00:49.04   1.2800A   1.4010  -0.3693  -0.5629  0.052  0.00   0.000      0.  0.271E+00  0.767E-02  0.294E-03  0.208E-04   32  11  22   22  24   0   17  31  29    0.000    0.000       0
+  0   2746 01:00:54.16   1.2800A   1.4015  -0.3408  -0.5466  0.051  0.00   0.000      0.  0.271E+00  0.765E-02  0.297E-03  0.223E-04   40  16  14   19  28  29   17  32  29    0.000    0.000       0
+  0   2751 01:01:00.55   1.2700A   1.4142  -0.3152  -0.5261  0.051  0.00   0.000      0.  0.271E+00  0.764E-02  0.293E-03  0.213E-04   40  16  18   21   0  26   16  32  29    0.000    0.000       0
+  0   2756 01:01:06.90   1.2700A   1.4228  -0.3342  -0.4859  0.051  0.00   0.000      0.  0.272E+00  0.764E-02  0.291E-03  0.205E-04   41  16  22   21   1  28   15  32  29    0.000    0.000       0
+  0   2761 01:01:13.22   1.2600A   1.4274  -0.3283  -0.4546  0.051  0.00   0.000      0.  0.272E+00  0.764E-02  0.287E-03  0.194E-04   41  16  26   21  14  33   14  33  29    0.000    0.000       0
+  0   2765 01:01:18.26   1.2600A   1.4311  -0.3333  -0.4441  0.051  0.00   0.000      0.  0.272E+00  0.765E-02  0.286E-03  0.188E-04   41  16  29   22  13  36   13  33  29    0.000    0.000       0
+  0   2770 01:01:24.56   1.2600A   1.4319   0.3283  -0.4335  0.051  0.00   0.000      0.  0.272E+00  0.765E-02  0.288E-03  0.183E-04   41  16  33   21   6  26   12  33  29    0.000    0.000       0
+  0   2775 01:01:30.86   1.2600A   1.4306   0.3501  -0.4950  0.051  0.00   0.000      0.  0.272E+00  0.765E-02  0.285E-03  0.161E-04   41  16  37   21   6  28   18   5  29    0.000    0.000       0
+  0   2780 01:01:37.16   1.2600A   1.4274   0.2968  -0.5406  0.052  0.00   0.000      0.  0.272E+00  0.765E-02  0.288E-03  0.165E-04   41  16   1   19   8  29   18   6  29    0.000    0.000       0
+  0   2784 01:01:42.20   1.2600A   1.4280   0.3098  -0.5702  0.052  0.00   0.000      0.  0.272E+00  0.765E-02  0.292E-03  0.181E-04   41  16   4   20   6  28   17   6  29    0.000    0.000       0
+  0   2789 01:01:48.51   1.2700A   1.4222  -0.3094  -0.5488  0.052  0.00   0.000      0.  0.272E+00  0.764E-02  0.295E-03  0.186E-04   41  16   8   23   0   6   16   6  29    0.000    0.000       0
+  0   2794 01:01:54.84   1.2700A   1.4155  -0.2998  -0.5227  0.053  0.00   0.000      0.  0.272E+00  0.763E-02  0.292E-03  0.175E-04   41  16  11   23  35  10   16   8  29    0.000    0.000       0
+  0   2799 01:02:01.21   1.2800A   1.4084  -0.3022  -0.5083  0.052  0.00   0.000      0.  0.272E+00  0.761E-02  0.296E-03  0.176E-04   41  16  15   23  35  13   15   8  29    0.000    0.000       0
+  0   2803 01:02:06.32   1.2700A   1.4120  -0.2964  -0.5213  0.052  0.00   0.000      0.  0.272E+00  0.760E-02  0.294E-03  0.181E-04   34  27   2   24  11  24   17   0  29    0.000    0.000       0
+  0   2808 01:02:12.72   1.2800A   1.4081  -0.3125  -0.5114  0.052  0.00   0.000      0.  0.271E+00  0.759E-02  0.293E-03  0.173E-04   35  13  25   21  16  28   17   0  29    0.000    0.000       0
+  0   2813 01:02:19.13   1.2800A   1.4051  -0.3134  -0.4816  0.052  0.00   0.000      0.  0.271E+00  0.759E-02  0.293E-03  0.174E-04   35  13  29   21  15  28   15   0  29    0.000    0.000       0
+  0   2817 01:02:24.29   1.2900A   1.4005   0.3200  -0.4593  0.051  0.00   0.000      0.  0.271E+00  0.759E-02  0.298E-03  0.184E-04   35  13  32   33  25   8   14   0  29    0.000    0.000       0
+  0   2822 01:02:30.74   1.2900A   1.3950  -0.4122  -0.4772  0.051  0.00   0.000      0.  0.271E+00  0.760E-02  0.304E-03  0.206E-04   33  12  27   20  16  29   18  18  29    0.000    0.000       0
+  0   2827 01:02:37.20   1.3000A   1.3878  -0.4320  -0.4827  0.051  0.00   0.000      0.  0.271E+00  0.761E-02  0.311E-03  0.228E-04   33  12  31   20  16  29   18  19  29    0.000    0.000       0
+  0   2831 01:02:42.38   1.3000A   1.3846  -0.4215  -0.5186  0.051  0.00   0.000      0.  0.271E+00  0.762E-02  0.311E-03  0.215E-04   33  12  33   19  16  29   17  19  29    0.000    0.000       0
+  0   2836 01:02:48.88   1.3000A   1.3830   0.3748  -0.5220  0.051  0.00   0.000      0.  0.272E+00  0.762E-02  0.312E-03  0.210E-04   33  12  37   23  32   7   17  20  29    0.000    0.000       0
+  0   2840 01:02:54.11   1.3100A   1.3757  -0.3915  -0.5120  0.051  0.00   0.000      0.  0.272E+00  0.762E-02  0.315E-03  0.217E-04   33  12   0   24  12   5   17  21  29    0.000    0.000       0
+  0   2845 01:03:00.66   1.3100A   1.3787  -0.3835  -0.4990  0.051  0.00   0.000      0.  0.272E+00  0.761E-02  0.313E-03  0.202E-04   32  12   6   24  12   7   16  21  29    0.000    0.000       0
+  0   2850 01:03:07.13   1.2900A   1.3932  -0.4064  -0.4913  0.051  0.00   0.000      0.  0.272E+00  0.760E-02  0.308E-03  0.197E-04   32  12  10   20  31  29   18  34  29    0.000    0.000       0
+  0   2854 01:03:12.26   1.2800A   1.4018  -0.4375  -0.5447  0.052  0.00   0.000      0.  0.272E+00  0.758E-02  0.308E-03  0.214E-04   32  12  14   20  30  29   17  34  29    0.000    0.000       0
+  0   2859 01:03:18.66   1.2800A   1.4080  -0.3967  -0.5714  0.052  0.00   0.000      0.  0.272E+00  0.755E-02  0.308E-03  0.226E-04   32  12  17   19  30  29   17  33  29    0.000    0.000       0
+  0   2864 01:03:25.06   1.2800A   1.4041  -0.3468  -0.5791  0.052  0.00   0.000      0.  0.272E+00  0.752E-02  0.303E-03  0.214E-04   32  12  21   22  34  38   16  32  29    0.000    0.000       0
+  0   2868 01:03:30.18   1.2800A   1.4044  -0.3352  -0.5659  0.052  0.00   0.000      0.  0.272E+00  0.749E-02  0.300E-03  0.200E-04   32  13  27   22  33  39   15  32  29    0.000    0.000       0
+  0   2873 01:03:36.61   1.2900A   1.3952  -0.3397  -0.5403  0.052  0.00   0.000      0.  0.272E+00  0.746E-02  0.304E-03  0.206E-04   32  13  30   22  33   2   14  32  29    0.000    0.000       0
+  0   2878 01:03:43.10   1.3100A   1.3774  -0.3311  -0.5125  0.052  0.00   0.000      0.  0.272E+00  0.743E-02  0.309E-03  0.216E-04   32  13  34   29  10  38   13  32  29    0.000    0.000       0
+  0   2882 01:03:48.34   1.3100A   1.3693   0.3647  -0.5377  0.052  0.00   0.000      0.  0.272E+00  0.740E-02  0.309E-03  0.226E-04   32  12  37   20  22  28   18  26  29    0.000    0.000       0
+  0   2887 01:03:54.95   1.3300A   1.3529   0.3880  -0.5668  0.051  0.00   0.000      0.  0.271E+00  0.736E-02  0.311E-03  0.228E-04   32  12   1   20  23  28   17  26  29    0.000    0.000       0
+  0   2891 01:04:00.27   1.3300A   1.3585   0.3704  -0.5188  0.051  0.00   0.000      0.  0.271E+00  0.734E-02  0.306E-03  0.213E-04   36  21  24   19  28  29   17  27  29    0.000    0.000       0
+  0   2896 01:04:06.86   1.3100A   1.3750   0.3240  -0.4938  0.050  0.00   0.000      0.  0.271E+00  0.731E-02  0.299E-03  0.201E-04   32  12  10   19  21  29   17  19  29    0.000    0.000       0
+  0   2900 01:04:12.09   1.3000A   1.3809  -0.3126  -0.4756  0.050  0.00   0.000      0.  0.271E+00  0.730E-02  0.295E-03  0.196E-04   32  12  13   22  31  22   16  19  29    0.000    0.000       0
+  0   2905 01:04:18.60   1.3000A   1.3809  -0.3644  -0.4642  0.049  0.00   0.000      0.  0.271E+00  0.729E-02  0.297E-03  0.195E-04   32  12  17   22  31  25   16  16  29    0.000    0.000       0
+  0   2910 01:04:25.07   1.2900A   1.3950  -0.3385  -0.4498  0.049  0.00   0.000      0.  0.271E+00  0.730E-02  0.293E-03  0.181E-04   31  12  20   22  31  27   15  16  29    0.000    0.000       0
+  0   2914 01:04:30.20   1.2800A   1.4047   0.3325  -0.4426  0.049  0.00   0.000      0.  0.271E+00  0.731E-02  0.288E-03  0.165E-04   31  12  23   21  13  31   16  15  29    0.000    0.000       0
+  0   2919 01:04:36.59   1.2700A   1.4143  -0.3726  -0.4406  0.050  0.00   0.000      0.  0.271E+00  0.732E-02  0.287E-03  0.178E-04   31  12  27   22  29  33   16  15  29    0.000    0.000       0
+  0   2924 01:04:42.97   1.2800A   1.4080  -0.3715  -0.4423  0.050  0.00   0.000      0.  0.271E+00  0.734E-02  0.290E-03  0.184E-04   31  12  31   22  29  35   16  14  29    0.000    0.000       0
+  0   2928 01:04:48.08   1.2700A   1.4143  -0.4054  -0.4485  0.050  0.00   0.000      0.  0.271E+00  0.735E-02  0.285E-03  0.179E-04   31  11  33   22  28  36   17  31  29    0.000    0.000       0
+  0   2933 01:04:54.41   1.2600A   1.4332  -0.3858  -0.4329  0.050  0.00   0.000      0.  0.271E+00  0.737E-02  0.279E-03  0.182E-04   31  11  37   22  28  38   14  14  29    0.000    0.000       0
+  0   2938 01:05:00.69   1.2600A   1.4292   0.3703  -0.4331  0.050  0.00   0.000      0.  0.271E+00  0.741E-02  0.281E-03  0.204E-04   31  11   1   22  15   3   16   9  29    0.000    0.000       0
+  0   2943 01:05:06.96   1.2500A   1.4353  -0.3685  -0.4283  0.050  0.00   0.000      0.  0.271E+00  0.745E-02  0.283E-03  0.229E-04   31  11   4   20  13  28   15   9  29    0.000    0.000       0
+  0   2948 01:05:13.22   1.2500A   1.4375  -0.3676  -0.4230  0.050  0.00   0.000      0.  0.272E+00  0.750E-02  0.289E-03  0.252E-04   31  11   8   20  39  29   14  30  29    0.000    0.000       0
+  0   2952 01:05:18.26   1.2600A   1.4289   0.3850  -0.4601  0.050  0.00   0.000      0.  0.272E+00  0.753E-02  0.295E-03  0.254E-04   31  11  11   20   5  29   18   1  29    0.000    0.000       0
+  0   2957 01:05:24.61   1.2800A   1.4094  -0.4158  -0.5310  0.051  0.00   0.000      0.  0.272E+00  0.756E-02  0.297E-03  0.240E-04   31  11  14   20  10  29   17   1  29    0.000    0.000       0
+  0   2962 01:05:31.05   1.3000A   1.3849   0.4616  -0.5401  0.051  0.00   0.000      0.  0.272E+00  0.757E-02  0.300E-03  0.221E-04   31  11  18   20  28  29   16   1  29    0.000    0.000       0
+  0   2966 01:05:36.31   1.3200A   1.3640   0.4636  -0.5655  0.050  0.00   0.000      0.  0.272E+00  0.756E-02  0.303E-03  0.212E-04   31  12  20   20  29  29   18  27  29    0.000    0.000       0
+  0   2971 01:05:42.92   1.3200A   1.3608   0.4225  -0.6342  0.050  0.00   0.000      0.  0.272E+00  0.754E-02  0.304E-03  0.217E-04   30  12  24   19  29  29   17  27  29    0.000    0.000       0
+  0   2975 01:05:48.16   1.3000A   1.3812  -0.3954  -0.6419  0.050  0.00   0.000      0.  0.272E+00  0.753E-02  0.299E-03  0.214E-04   32  11  25   23  26  27   16  26  29    0.000    0.000       0
+  0   2980 01:05:54.64   1.2900A   1.3968  -0.3879  -0.6148  0.050  0.00   0.000      0.  0.271E+00  0.750E-02  0.295E-03  0.209E-04   32  11  29   23  26  29   15  26  29    0.000    0.000       0
+  0   2985 01:06:01.07   1.2900A   1.4004  -0.3472  -0.5695  0.050  0.00   0.000      0.  0.271E+00  0.749E-02  0.295E-03  0.212E-04   32  11  32   23  25  31   14  26  29    0.000    0.000       0
+  0   2989 01:06:06.19   1.2800A   1.4046  -0.3239  -0.5415  0.050  0.00   0.000      0.  0.271E+00  0.749E-02  0.292E-03  0.210E-04   32  11  35   23  14  10   14  25  29    0.000    0.000       0
+  0   2994 01:06:12.60   1.2800A   1.4034   0.3373  -0.5126  0.050  0.00   0.000      0.  0.271E+00  0.751E-02  0.287E-03  0.193E-04   32  11  39   20  12  28   13  22  29    0.000    0.000       0
+  0   2999 01:06:19.06   1.3000A   1.3875  -0.3268  -0.4830  0.050  0.00   0.000      0.  0.271E+00  0.752E-02  0.288E-03  0.190E-04   32  11   3   23  11  22   12  22  29    0.000    0.000       0
+  0   3003 01:06:24.29   1.3100A   1.3740  -0.3496  -0.4700  0.050  0.00   0.000      0.  0.272E+00  0.754E-02  0.294E-03  0.208E-04   32  11   6   24  11  27   13  20  29    0.000    0.000       0
+  0   3008 01:06:30.84   1.3100A   1.3743  -0.3934  -0.4603  0.050  0.00   0.000      0.  0.272E+00  0.755E-02  0.299E-03  0.223E-04   32  21   3   24  11  29   12  20  29    0.000    0.000       0
+  0   3012 01:06:36.07   1.3200A   1.3669  -0.4101  -0.4486  0.050  0.00   0.000      0.  0.272E+00  0.756E-02  0.302E-03  0.216E-04   32  21   7   23  10  29   11  20  29    0.000    0.000       0
+  0   3017 01:06:42.67   1.3200A   1.3612  -0.4004  -0.4340  0.050  0.00   0.000      0.  0.272E+00  0.756E-02  0.305E-03  0.201E-04   39   7   1   23  10  31   12  29  28    0.000    0.000       0
+  0   3022 01:06:49.27   1.3200A   1.3631  -0.3877  -0.4439  0.050  0.00   0.000      0.  0.272E+00  0.756E-02  0.306E-03  0.194E-04   39   7   5   24  10  36   11  29  28    0.000    0.000       0
+  0   3026 01:06:54.55   1.3200A   1.3646  -0.3628  -0.4441  0.051  0.00   0.000      0.  0.272E+00  0.754E-02  0.304E-03  0.180E-04   39   7   8   24   9  39   10  29  28    0.000    0.000       0
+  0   3031 01:07:01.15   1.3200A   1.3660  -0.3740  -0.4719  0.051  0.00   0.000      0.  0.272E+00  0.750E-02  0.304E-03  0.194E-04   39   7  12   24   9   2   18  14  29    0.000    0.000       0
+  0   3035 01:07:06.43   1.3200A   1.3663  -0.3884  -0.4959  0.051  0.00   0.000      0.  0.271E+00  0.747E-02  0.304E-03  0.194E-04   39   7  15   24   8   3   17  13  29    0.000    0.000       0
+  0   3040 01:07:13.03   1.3200A   1.3672  -0.4260  -0.5017  0.050  0.00   0.000      0.  0.271E+00  0.743E-02  0.300E-03  0.183E-04   39   7  19   24   8   6   17  13  29    0.000    0.000       0
+  0   3044 01:07:18.31   1.3200A   1.3680  -0.3823  -0.5044  0.050  0.00   0.000      0.  0.271E+00  0.740E-02  0.298E-03  0.183E-04   39   6  22   24   8   8   16  13  29    0.000    0.000       0
+  0   3049 01:07:24.87   1.3100A   1.3745  -0.3503  -0.4921  0.050  0.00   0.000      0.  0.271E+00  0.738E-02  0.296E-03  0.193E-04   40  11  22   24  10  10   15  12  29    0.000    0.000       0
+  0   3053 01:07:30.08   1.3000A   1.3814  -0.3591  -0.4862  0.050  0.00   0.000      0.  0.271E+00  0.736E-02  0.293E-03  0.190E-04   40  11  25   24  10  12   15  12  29    0.000    0.000       0
+  0   3058 01:07:36.58   1.3000A   1.3847  -0.3693  -0.4695  0.050  0.00   0.000      0.  0.271E+00  0.733E-02  0.291E-03  0.190E-04   40  11  29   24   9  14   14  11  29    0.000    0.000       0
+  0   3063 01:07:43.07   1.3000A   1.3877   0.4144  -0.4533  0.049  0.00   0.000      0.  0.270E+00  0.731E-02  0.291E-03  0.195E-04   40  11  32   20   5  29   13  11  29    0.000    0.000       0
+  0   3067 01:07:48.24   1.3000A   1.3896   0.3911  -0.4659  0.049  0.00   0.000      0.  0.270E+00  0.729E-02  0.291E-03  0.193E-04   41  11  36   21   2  28   17   3  29    0.000    0.000       0
+  0   3072 01:07:54.69   1.2900A   1.3904   0.4322  -0.4736  0.049  0.00   0.000      0.  0.270E+00  0.728E-02  0.290E-03  0.199E-04   40  11  39   21   1  28   17   3  29    0.000    0.000       0
+  0   3077 01:08:01.14   1.2900A   1.3913   0.3682  -0.4677  0.049  0.00   0.000      0.  0.270E+00  0.726E-02  0.289E-03  0.211E-04   40  11   3   19   6  29   16   4  29    0.000    0.000       0
+  0   3081 01:08:06.31   1.3000A   1.3877   0.3484  -0.4377  0.049  0.00   0.000      0.  0.270E+00  0.726E-02  0.289E-03  0.220E-04   40  11   6   22   0  34   15   4  29    0.000    0.000       0
+  0   3086 01:08:12.78   1.3000A   1.3862   0.3496  -0.4116  0.049  0.00   0.000      0.  0.271E+00  0.726E-02  0.289E-03  0.230E-04   40  11  10   23   0  38   15   4  29    0.000    0.000       0
+  0   3091 01:08:19.28   1.3000A   1.3837   0.3475  -0.3938  0.050  0.00   0.000      0.  0.271E+00  0.725E-02  0.288E-03  0.221E-04   40  11  14   23   0   0   14   3  29    0.000    0.000       0
+  0   3095 01:08:24.48   1.3000A   1.3836   0.3651  -0.3798  0.050  0.00   0.000      0.  0.271E+00  0.725E-02  0.285E-03  0.206E-04   41  11  18   23   1   2   13   3  29    0.000    0.000       0
+  0   3100 01:08:30.98   1.3000A   1.3815   0.3731  -0.3824  0.050  0.00   0.000      0.  0.271E+00  0.725E-02  0.284E-03  0.194E-04   41  11  22   23   1   4   17  21  29    0.000    0.000       0
+  0   3104 01:08:36.19   1.3000A   1.3807   0.3897  -0.3857  0.050  0.00   0.000      0.  0.271E+00  0.724E-02  0.282E-03  0.184E-04   40  11  25   23   1   6   16  21  29    0.000    0.000       0
+  0   3109 01:08:42.73   1.3100A   1.3780   0.3800  -0.4004  0.051  0.00   0.000      0.  0.271E+00  0.723E-02  0.285E-03  0.194E-04   40  11  29   23   2   8   17  19  29    0.000    0.000       0
+  0   3114 01:08:49.25   1.3000A   1.3823   0.3936  -0.3994  0.051  0.00   0.000      0.  0.271E+00  0.721E-02  0.285E-03  0.200E-04   31   8   7   23   2  11   16  19  29    0.000    0.000       0
+  0   3118 01:08:54.46   1.3100A   1.3735   0.3888  -0.4230  0.052  0.00   0.000      0.  0.271E+00  0.718E-02  0.287E-03  0.201E-04   31   8   9   23   2  13   18  16  29    0.000    0.000       0
+  0   3123 01:09:01.00   1.3100A   1.3697   0.3922  -0.4580  0.052  0.00   0.000      0.  0.271E+00  0.714E-02  0.286E-03  0.195E-04   40  11   0   23   3  15   18  15  29    0.000    0.000       0
+  0   3127 01:09:06.24   1.3100A   1.3727   0.3865  -0.5119  0.051  0.00   0.000      0.  0.271E+00  0.711E-02  0.284E-03  0.181E-04   30   8   7   23   3  17   18  14  29    0.000    0.000       0
+  0   3132 01:09:12.75   1.3000A   1.3859   0.3661  -0.5258  0.051  0.00   0.000      0.  0.270E+00  0.708E-02  0.278E-03  0.163E-04   30   8  11   23   3  19   17  14  29    0.000    0.000       0
+  0   3137 01:09:19.25   1.3000A   1.3881   0.3498  -0.5149  0.050  0.00   0.000      0.  0.270E+00  0.706E-02  0.273E-03  0.145E-04   30   8  15   23   4  21   16  14  29    0.000    0.000       0
+  0   3141 01:09:24.43   1.2900A   1.3971  -0.3570  -0.4969  0.050  0.00   0.000      0.  0.270E+00  0.706E-02  0.272E-03  0.151E-04   30   8  18   26  29  28   16  14  29    0.000    0.000       0
+  0   3146 01:09:30.86   1.2900A   1.3929  -0.3477  -0.4749  0.050  0.00   0.000      0.  0.270E+00  0.706E-02  0.277E-03  0.175E-04   30   8  22   26  29  31   14  14  29    0.000    0.000       0
+  0   3150 01:09:36.03   1.3000A   1.3868  -0.3526  -0.4651  0.050  0.00   0.000      0.  0.270E+00  0.707E-02  0.283E-03  0.195E-04   30   8  24   25   0  21   14  14  29    0.000    0.000       0
+  0   3155 01:09:42.56   1.3100A   1.3746   0.3801  -0.4507  0.050  0.00   0.000      0.  0.270E+00  0.710E-02  0.292E-03  0.221E-04   30   8  28   22   3  28   13  14  29    0.000    0.000       0
+  0   3160 01:09:49.14   1.3200A   1.3635  -0.3817  -0.4373  0.049  0.00   0.000      0.  0.270E+00  0.713E-02  0.299E-03  0.232E-04   30   6  32   24  39  26   12  14  29    0.000    0.000       0
+  0   3164 01:09:54.40   1.3100A   1.3784  -0.3591  -0.4261  0.049  0.00   0.000      0.  0.270E+00  0.716E-02  0.300E-03  0.234E-04   31  10   3   24  39  28   11  14  29    0.000    0.000       0
+  0   3169 01:10:00.87   1.2900A   1.3928   0.3705  -0.4121  0.049  0.00   0.000      0.  0.270E+00  0.720E-02  0.300E-03  0.240E-04   31  10   7   22  25  29   10  14  29    0.000    0.000       0
+  0   3173 01:10:06.03   1.2900A   1.3950   0.3982  -0.4107  0.050  0.00   0.000      0.  0.271E+00  0.724E-02  0.301E-03  0.248E-04   31  10  10   22  25  31   16  34  29    0.000    0.000       0
+  0   3178 01:10:12.50   1.3000A   1.3867  -0.4791  -0.4036  0.050  0.00   0.000      0.  0.271E+00  0.728E-02  0.306E-03  0.248E-04   31  10  13   20  17  28   15  34  29    0.000    0.000       0
+  0   3183 01:10:19.01   1.3000A   1.3802  -0.4342  -0.4336  0.050  0.00   0.000      0.  0.271E+00  0.731E-02  0.303E-03  0.218E-04   41  12   9   20  17  29   18  36  29    0.000    0.000       0
+  0   3187 01:10:24.22   1.3000A   1.3849  -0.4393  -0.4751  0.051  0.00   0.000      0.  0.271E+00  0.732E-02  0.302E-03  0.205E-04   41  12  12   20  16  29   18  36  29    0.000    0.000       0
+  0   3192 01:10:30.72   1.3000A   1.3870   0.4076  -0.5730  0.051  0.00   0.000      0.  0.271E+00  0.731E-02  0.302E-03  0.209E-04   41  12  16   20  36  28   18  20  29    0.000    0.000       0
+  0   3197 01:10:37.22   1.3000A   1.3862   0.4066  -0.6450  0.052  0.00   0.000      0.  0.271E+00  0.729E-02  0.301E-03  0.227E-04   41  12  20   20  36  28   17  20  29    0.000    0.000       0
+  0   3201 01:10:42.42   1.3000A   1.3874   0.4108  -0.6429  0.052  0.00   0.000      0.  0.271E+00  0.727E-02  0.300E-03  0.235E-04   41  12  23   20  21  29   16  20  29    0.000    0.000       0
+  0   3206 01:10:48.92   1.3000A   1.3801   0.4076  -0.6354  0.052  0.00   0.000      0.  0.271E+00  0.723E-02  0.297E-03  0.213E-04   41  12  27   20  22  29   15  21  29    0.000    0.000       0
+  0   3210 01:10:54.14   1.3100A   1.3748   0.3873  -0.6029  0.052  0.00   0.000      0.  0.271E+00  0.719E-02  0.294E-03  0.192E-04   41  12  30   24  34   6   15  21  29    0.000    0.000       0
+  0   3215 01:11:00.72   1.3300A   1.3578  -0.4484  -0.5710  0.052  0.00   0.000      0.  0.270E+00  0.713E-02  0.292E-03  0.176E-04   41  12  34   20  38  28   15  16  29    0.000    0.000       0
+  0   3219 01:11:06.04   1.3300A   1.3546  -0.4016  -0.5582  0.051  0.00   0.000      0.  0.270E+00  0.707E-02  0.287E-03  0.162E-04   33   5   2   20  38  28   14  16  29    0.000    0.000       0
+  0   3224 01:11:12.62   1.3100A   1.3757  -0.3814  -0.5270  0.051  0.00   0.000      0.  0.270E+00  0.701E-02  0.277E-03  0.156E-04   33   7   9   20  37  28   12  16  29    0.000    0.000       0
+  0   3229 01:11:19.15   1.3100A   1.3781   0.3674  -0.5025  0.050  0.00   0.000      0.  0.270E+00  0.697E-02  0.273E-03  0.164E-04   31  12  14   23  33  16   11  16  29    0.000    0.000       0
+  0   3233 01:11:24.32   1.2900A   1.3957   0.4036  -0.4757  0.050  0.00   0.000      0.  0.270E+00  0.695E-02  0.269E-03  0.185E-04   31  12  17   23  33  18   10  16  29    0.000    0.000       0
+  0   3238 01:11:30.78   1.2900A   1.3956   0.3745  -0.4470  0.049  0.00   0.000      0.  0.270E+00  0.695E-02  0.272E-03  0.217E-04   31  12  21   23  34  20    9  16  29    0.000    0.000       0
+  0   3243 01:11:37.27   1.3100A   1.3773  -0.3949  -0.4208  0.048  0.00   0.000      0.  0.270E+00  0.696E-02  0.276E-03  0.216E-04   31  12  25   21  38  27    8  20  29    0.000    0.000       0
+  0   3247 01:11:42.49   1.3100A   1.3729  -0.3838  -0.4080  0.048  0.00   0.000      0.  0.270E+00  0.698E-02  0.276E-03  0.205E-04   33   4  22   21  37  27    8  20  29    0.000    0.000       0
+  0   3252 01:11:49.03   1.3100A   1.3767  -0.3782  -0.3958  0.048  0.00   0.000      0.  0.271E+00  0.700E-02  0.276E-03  0.194E-04   29  39  18   21  37  28   13  32  29    0.000    0.000       0
+  0   3256 01:11:54.16   1.2700A   1.4214   0.3070  -0.3851  0.048  0.00   0.000      0.  0.271E+00  0.702E-02  0.269E-03  0.180E-04   25  10  23   20  20  28   12  32  29    0.000    0.000       0
+  0   3261 01:12:00.39   1.2400A   1.4510   0.3447  -0.3760  0.048  0.00   0.000      0.  0.271E+00  0.705E-02  0.266E-03  0.173E-04   25  10  27   20  21  28    7  16  28    0.000    0.000       0
+  0   3266 01:12:06.64   1.2500A   1.4391   0.3593  -0.3825  0.049  0.00   0.000      0.  0.271E+00  0.709E-02  0.271E-03  0.180E-04   25  10  30   20  22  28   16  12  29    0.000    0.000       0
+  0   3271 01:12:13.04   1.3200A   1.3675  -0.3353  -0.4048  0.049  0.00   0.000      0.  0.270E+00  0.711E-02  0.290E-03  0.202E-04   25  10  33   22   4  36   17  11  29    0.000    0.000       0
+  0   3275 01:12:18.31   1.3200A   1.3645  -0.3272  -0.4294  0.050  0.00   0.000      0.  0.270E+00  0.712E-02  0.290E-03  0.198E-04   41  15  27   22   4  38   19   8  29    0.000    0.000       0
+  0   3280 01:12:24.85   1.2800A   1.4051  -0.3173  -0.5401  0.050  0.00   0.000      0.  0.270E+00  0.712E-02  0.279E-03  0.173E-04   28   9  36   22  31  27   18   8  29    0.000    0.000       0
+  0   3285 01:12:31.22   1.2600A   1.4279  -0.3293  -0.5560  0.050  0.00   0.000      0.  0.270E+00  0.712E-02  0.272E-03  0.164E-04   28   9  39   22   6   0   18   9  29    0.000    0.000       0
+  0   3289 01:12:36.27   1.2600A   1.4248  -0.3530  -0.5545  0.050  0.00   0.000      0.  0.270E+00  0.713E-02  0.271E-03  0.166E-04   28   9   2   22   5   1   17   9  29    0.000    0.000       0
+  0   3294 01:12:42.71   1.3000A   1.3843  -0.3828  -0.5074  0.050  0.00   0.000      0.  0.270E+00  0.715E-02  0.279E-03  0.188E-04   28   5  11   22   5   4   16   9  29    0.000    0.000       0
+  0   3299 01:12:49.17   1.2900A   1.3942  -0.3841  -0.4726  0.050  0.00   0.000      0.  0.270E+00  0.719E-02  0.281E-03  0.206E-04   28   5  15   22   5   6   15   7  29    0.000    0.000       0
+  0   3303 01:12:54.35   1.2900A   1.3909  -0.3500  -0.4420  0.050  0.00   0.000      0.  0.270E+00  0.723E-02  0.283E-03  0.220E-04   28   5  18   22   5   8   15   7  29    0.000    0.000       0
+  0   3308 01:13:00.83   1.2900A   1.3907  -0.3093  -0.4253  0.049  0.00   0.000      0.  0.270E+00  0.730E-02  0.286E-03  0.245E-04   28   5  22   22   4  10   15  11  29    0.000    0.000       0
+  0   3312 01:13:06.01   1.2900A   1.3925   0.3447  -0.4219  0.050  0.00   0.000      0.  0.270E+00  0.736E-02  0.288E-03  0.254E-04   28   5  25   21  23  28   14  11  29    0.000    0.000       0
+  0   3317 01:13:12.50   1.3000A   1.3829  -0.3454  -0.4169  0.050  0.00   0.000      0.  0.270E+00  0.744E-02  0.290E-03  0.236E-04   28   5  29   21  20  27   13  11  29    0.000    0.000       0
+  0   3322 01:13:19.03   1.3200A   1.3686  -0.3363  -0.4080  0.050  0.00   0.000      0.  0.271E+00  0.752E-02  0.292E-03  0.208E-04   28   5  32   21  20  29   13  11  29    0.000    0.000       0
+  0   3326 01:13:24.28   1.3100A   1.3741  -0.3428  -0.4292  0.051  0.00   0.000      0.  0.271E+00  0.757E-02  0.291E-03  0.202E-04   29  12  18   21  19  31   17  17  29    0.000    0.000       0
+  0   3331 01:13:30.84   1.3000A   1.3808  -0.3433  -0.4397  0.051  0.00   0.000      0.  0.271E+00  0.762E-02  0.292E-03  0.198E-04   28   6   0   21  18  33   18  21  29    0.000    0.000       0
+  0   3336 01:13:37.23   1.2700A   1.4209  -0.3567  -0.5186  0.051  0.00   0.000      0.  0.271E+00  0.765E-02  0.285E-03  0.175E-04   28   6   3   21  18  35   18  21  29    0.000    0.000       0
+  0   3340 01:13:42.20   1.2400A   1.4557  -0.3672  -0.5197  0.051  0.00   0.000      0.  0.271E+00  0.767E-02  0.279E-03  0.171E-04   28   6   6   21  18  36   17  20  29    0.000    0.000       0
+  0   3345 01:13:48.36   1.2300A   1.4649  -0.3407  -0.5066  0.052  0.00   0.000      0.  0.271E+00  0.769E-02  0.279E-03  0.179E-04   28   6  10   21  18  37   17  20  29    0.000    0.000       0
+  0   3350 01:13:54.55   1.2400A   1.4505   0.3356  -0.4957  0.052  0.00   0.000      0.  0.270E+00  0.772E-02  0.282E-03  0.189E-04   28   6  13   23  15  37   16  31  29    0.000    0.000       0
+  0   3355 01:14:00.81   1.2600A   1.4315   0.3357  -0.4820  0.052  0.00   0.000      0.  0.270E+00  0.774E-02  0.287E-03  0.182E-04   28   6  17   24  17   0   16  32  29    0.000    0.000       0
+  0   3360 01:14:07.19   1.2900A   1.3922   0.3582  -0.4677  0.052  0.00   0.000      0.  0.270E+00  0.775E-02  0.295E-03  0.181E-04   28   6  20   20  16  29   15  32  29    0.000    0.000       0
+  0   3364 01:14:12.37   1.3000A   1.3851   0.3867  -0.4961  0.052  0.00   0.000      0.  0.270E+00  0.776E-02  0.301E-03  0.197E-04   28   7  23   20   9  28   18  10  29    0.000    0.000       0
+  0   3369 01:14:18.85   1.3000A   1.3844   0.3631  -0.5055  0.052  0.00   0.000      0.  0.270E+00  0.779E-02  0.306E-03  0.231E-04   28   7  27   23  17   4   17  10  29    0.000    0.000       0
+  0   3373 01:14:24.03   1.3000A   1.3888   0.3718  -0.4689  0.052  0.00   0.000      0.  0.270E+00  0.781E-02  0.310E-03  0.239E-04   28   7  30   22  16  39   17   8  29    0.000    0.000       0
+  0   3378 01:14:30.51   1.3000A   1.3884  -0.3788  -0.4571  0.051  0.00   0.000      0.  0.270E+00  0.785E-02  0.312E-03  0.226E-04   28   7  33   20  36  29   18   7  29    0.000    0.000       0
+  0   3383 01:14:37.00   1.3000A   1.3797  -0.3510  -0.4556  0.051  0.00   0.000      0.  0.270E+00  0.788E-02  0.316E-03  0.243E-04   28   7  37   19  36  29   18   6  29    0.000    0.000       0
+  0   3387 01:14:42.27   1.3200A   1.3587  -0.3618  -0.4473  0.051  0.00   0.000      0.  0.270E+00  0.792E-02  0.323E-03  0.244E-04   28   7   0   20  15  28   17   6  29    0.000    0.000       0
+  0   3392 01:14:48.92   1.3300A   1.3526  -0.4261  -0.4595  0.051  0.00   0.000      0.  0.270E+00  0.794E-02  0.325E-03  0.234E-04   29   1  28   20  19  29   18  20  29    0.000    0.000       0
+  0   3396 01:14:54.24   1.3300A   1.3542  -0.4498  -0.5896  0.051  0.00   0.000      0.  0.270E+00  0.795E-02  0.325E-03  0.233E-04   29   1  31   20  18  29   18  19  29    0.000    0.000       0
+  0   3401 01:15:00.88   1.3200A   1.3585  -0.4020  -0.6249  0.051  0.00   0.000      0.  0.270E+00  0.796E-02  0.326E-03  0.243E-04   29   4  35   18  18  29   17  19  29    0.000    0.000       0
+  0   3405 01:15:06.19   1.3300A   1.3585   0.3801  -0.5914  0.051  0.00   0.000      0.  0.271E+00  0.796E-02  0.331E-03  0.251E-04   29   4  38   20  27  29   16  19  29    0.000    0.000       0
+  0   3410 01:15:12.81   1.3200A   1.3599   0.3718  -0.5542  0.051  0.00   0.000      0.  0.271E+00  0.796E-02  0.330E-03  0.240E-04   28   3   1   20  32  28   15  20  29    0.000    0.000       0
+  0   3414 01:15:18.10   1.3200A   1.3649   0.3825  -0.5296  0.051  0.00   0.000      0.  0.271E+00  0.796E-02  0.330E-03  0.236E-04   28   3   4   20  32  29   15  23  29    0.000    0.000       0
+  0   3419 01:15:24.69   1.3200A   1.3676   0.4354  -0.5119  0.052  0.00   0.000      0.  0.271E+00  0.794E-02  0.332E-03  0.238E-04   28   3   7   20  33  29   14  23  29    0.000    0.000       0
+  0   3424 01:15:31.24   1.2900A   1.3968   0.4841  -0.5118  0.052  0.00   0.000      0.  0.271E+00  0.791E-02  0.330E-03  0.242E-04   30  37  10   20  13  29   17  30  29    0.000    0.000       0
+  0   3428 01:15:36.31   1.2500A   1.4391   0.4760  -0.4881  0.052  0.00   0.000      0.  0.271E+00  0.788E-02  0.322E-03  0.234E-04   30  37  13   20  13  29   16  30  29    0.000    0.000       0
+  0   3433 01:15:42.52   1.2400A   1.4559   0.3895  -0.5150  0.053  0.00   0.000      0.  0.271E+00  0.784E-02  0.319E-03  0.229E-04   30  37  16   20  14  29   17  10  29    0.000    0.000       0
+  0   3438 01:15:48.69   1.2400A   1.4467  -0.3581  -0.5092  0.053  0.00   0.000      0.  0.271E+00  0.780E-02  0.315E-03  0.220E-04   30  37  20   20  12  28   17  10  29    0.000    0.000       0
+  0   3443 01:15:55.07   1.3000A   1.3837  -0.3421  -0.4782  0.053  0.00   0.000      0.  0.271E+00  0.774E-02  0.324E-03  0.201E-04   30  37  23   20  12  29   16   6  29    0.000    0.000       0
+  0   3447 01:16:00.30   1.3000A   1.3890  -0.3702  -0.4566  0.054  0.00   0.000      0.  0.271E+00  0.769E-02  0.321E-03  0.194E-04   29  37  26   20  11  29   15   6  29    0.000    0.000       0
+  0   3452 01:16:06.70   1.2700A   1.4130  -0.3683  -0.4843  0.054  0.00   0.000      0.  0.271E+00  0.761E-02  0.309E-03  0.188E-04   29  37  30   20  33  29   18  38  29    0.000    0.000       0
+  0   3457 01:16:13.14   1.3000A   1.3873  -0.3341  -0.4878  0.053  0.00   0.000      0.  0.270E+00  0.754E-02  0.310E-03  0.191E-04   29  37  34   24  17  19   17  38  29    0.000    0.000       0
+  0   3461 01:16:18.40   1.3200A   1.3599  -0.3280  -0.4938  0.053  0.00   0.000      0.  0.270E+00  0.749E-02  0.312E-03  0.202E-04   29  37  37   23  17  20   17  37  29    0.000    0.000       0
+  0   3466 01:16:25.08   1.3300A   1.3537   0.3422  -0.4845  0.052  0.00   0.000      0.  0.270E+00  0.744E-02  0.309E-03  0.209E-04   35  14  24   25  20  15   16  37  29    0.000    0.000       0
+  0   3470 01:16:30.35   1.3100A   1.3715   0.3409  -0.4738  0.052  0.00   0.000      0.  0.270E+00  0.741E-02  0.300E-03  0.201E-04   35  14  27   25  30  26   17  36  29    0.000    0.000       0
+  0   3475 01:16:36.88   1.3000A   1.3833  -0.3564  -0.4659  0.051  0.00   0.000      0.  0.270E+00  0.739E-02  0.291E-03  0.188E-04   35  14  31   24  16  25   16  36  29    0.000    0.000       0
+  0   3479 01:16:42.09   1.3000A   1.3855   0.3546  -0.4534  0.051  0.00   0.000      0.  0.270E+00  0.739E-02  0.288E-03  0.185E-04   35  14  34   20  13  29   15  36  29    0.000    0.000       0
+  0   3484 01:16:48.60   1.3000A   1.3828   0.3710  -0.4333  0.051  0.00   0.000      0.  0.270E+00  0.738E-02  0.291E-03  0.206E-04   35  14  38   20  14  29   14  36  29    0.000    0.000       0
+  0   3489 01:16:55.09   1.3000A   1.3848   0.3188  -0.4586  0.051  0.00   0.000      0.  0.270E+00  0.738E-02  0.296E-03  0.234E-04   35  14   1   21  14  35   17  10  29    0.000    0.000       0
+  0   3493 01:17:00.26   1.3000A   1.3856   0.3406  -0.4903  0.051  0.00   0.000      0.  0.270E+00  0.739E-02  0.299E-03  0.243E-04   35  14   5   22  27  37   17  10  29    0.000    0.000       0
+  0   3498 01:17:06.73   1.3000A   1.3887  -0.3545  -0.5019  0.051  0.00   0.000      0.  0.271E+00  0.740E-02  0.297E-03  0.229E-04   35  14   8   21  21  28   16  10  29    0.000    0.000       0
+  0   3503 01:17:13.18   1.2900A   1.3944  -0.3528  -0.4915  0.052  0.00   0.000      0.  0.271E+00  0.740E-02  0.293E-03  0.205E-04   35  15  12   21  21  29   15  10  29    0.000    0.000       0
+  0   3507 01:17:18.28   1.2700A   1.4143   0.3493  -0.4744  0.052  0.00   0.000      0.  0.271E+00  0.741E-02  0.288E-03  0.196E-04   35  15  15   23  19  35   14  10  29    0.000    0.000       0
+  0   3512 01:17:24.61   1.2600A   1.4283  -0.3884  -0.4497  0.052  0.00   0.000      0.  0.271E+00  0.742E-02  0.286E-03  0.200E-04   35  15  19   20  22  29   13  10  29    0.000    0.000       0
+  0   3517 01:17:30.92   1.2600A   1.4274  -0.4204  -0.5155  0.053  0.00   0.000      0.  0.271E+00  0.741E-02  0.287E-03  0.198E-04   35  15  22   19  22  29   18  22  29    0.000    0.000       0
+  0   3522 01:17:37.22   1.2600A   1.4310  -0.4689  -0.5991  0.053  0.00   0.000      0.  0.271E+00  0.740E-02  0.288E-03  0.198E-04   35  15  26   19  21  29   17  23  29    0.000    0.000       0
+  0   3526 01:17:42.29   1.2700A   1.4227  -0.4357  -0.6081  0.053  0.00   0.000      0.  0.271E+00  0.739E-02  0.292E-03  0.206E-04   35  15  29   18  21  29   16  23  29    0.000    0.000       0
+  0   3531 01:17:48.67   1.2800A   1.4042  -0.3682  -0.5917  0.053  0.00   0.000      0.  0.271E+00  0.737E-02  0.293E-03  0.204E-04   35  15  32   17  21  29   15  23  29    0.000    0.000       0
+  0   3536 01:17:55.10   1.2900A   1.3968   0.3505  -0.5578  0.053  0.00   0.000      0.  0.271E+00  0.734E-02  0.293E-03  0.195E-04   35  15  36   20  36  28   14  23  29    0.000    0.000       0
+  0   3540 01:18:00.30   1.3000A   1.3799  -0.3277  -0.5238  0.053  0.00   0.000      0.  0.271E+00  0.732E-02  0.293E-03  0.181E-04   35  15  39   16  20  29   14  22  29    0.000    0.000       0
+  0   3545 01:18:06.88   1.3200A   1.3596   0.3063  -0.4989  0.052  0.00   0.000      0.  0.270E+00  0.730E-02  0.297E-03  0.174E-04   35  15   3   25  28  19   13  22  29    0.000    0.000       0
+  0   3549 01:18:12.22   1.3400A   1.3435   0.2960  -0.4808  0.052  0.00   0.000      0.  0.270E+00  0.727E-02  0.302E-03  0.178E-04   35  15   6   20  18  29   12  22  29    0.000    0.000       0
+  0   3554 01:18:18.92   1.3400A   1.3434   0.3153  -0.4509  0.052  0.00   0.000      0.  0.270E+00  0.725E-02  0.302E-03  0.183E-04   35  15  11   23  14  27   11  22  29    0.000    0.000       0
+  0   3558 01:18:24.28   1.3400A   1.3444   0.3064  -0.4647  0.052  0.00   0.000      0.  0.270E+00  0.724E-02  0.305E-03  0.197E-04   35  15  14   23  14  29   17  29  29    0.000    0.000       0
+  0   3563 01:18:30.96   1.3400A   1.3460  -0.2999  -0.4742  0.052  0.00   0.000      0.  0.271E+00  0.725E-02  0.310E-03  0.224E-04   35  15  18   22  20  19   16  29  29    0.000    0.000       0
+  0   3567 01:18:36.33   1.3500A   1.3379  -0.3085  -0.4647  0.052  0.00   0.000      0.  0.271E+00  0.726E-02  0.317E-03  0.246E-04   35  15  21   21  20  19   15  29  29    0.000    0.000       0
+  0   3572 01:18:43.10   1.3600A   1.3265  -0.3628  -0.4594  0.052  0.00   0.000      0.  0.271E+00  0.727E-02  0.322E-03  0.257E-04   37   0  14   20   5  28   15  30  29    0.000    0.000       0
+  0   3576 01:18:48.54   1.3600A   1.3251   0.3996  -0.4592  0.053  0.00   0.000      0.  0.271E+00  0.728E-02  0.323E-03  0.255E-04   37   0  17   20  13  29   14  30  29    0.000    0.000       0
+  0   3581 01:18:55.34   1.3600A   1.3242  -0.4589  -0.4473  0.053  0.00   0.000      0.  0.271E+00  0.727E-02  0.323E-03  0.248E-04   37   0  21   21  14  28   13  30  29    0.000    0.000       0
+  0   3585 01:19:00.74   1.3400A   1.3465  -0.4105  -0.4399  0.054  0.00   0.000      0.  0.272E+00  0.726E-02  0.319E-03  0.246E-04   27  36   8   21  13  28   12  31  29    0.000    0.000       0
+  0   3589 01:19:06.07   1.3300A   1.3563  -0.4018  -0.4808  0.054  0.00   0.000      0.  0.272E+00  0.723E-02  0.318E-03  0.252E-04   27  36  11   20  14  28   18   9  29    0.000    0.000       0
+  0   3594 01:19:12.64   1.3100A   1.3744   0.3794  -0.5428  0.053  0.00   0.000      0.  0.272E+00  0.719E-02  0.312E-03  0.240E-04   27  36  14   20  30  29   17   9  29    0.000    0.000       0
+  0   3599 01:19:19.12   1.2800A   1.4056  -0.3520  -0.5568  0.053  0.00   0.000      0.  0.272E+00  0.713E-02  0.298E-03  0.202E-04   27  36  18   27  30  27   16   8  29    0.000    0.000       0
+  0   3603 01:19:24.22   1.2800A   1.4037   0.3465  -0.5916  0.053  0.00   0.000      0.  0.271E+00  0.707E-02  0.291E-03  0.181E-04   27  36  21   20   9  28   17  23  29    0.000    0.000       0
+  0   3608 01:19:30.56   1.2700A   1.4136  -0.3479  -0.6109  0.053  0.00   0.000      0.  0.271E+00  0.698E-02  0.284E-03  0.175E-04   27  36  24   26  29  30   16  22  29    0.000    0.000       0
+  0   3613 01:19:37.04   1.3100A   1.3763  -0.3371  -0.5962  0.052  0.00   0.000      0.  0.271E+00  0.687E-02  0.285E-03  0.177E-04   27  36  27   26  29  33   15  22  29    0.000    0.000       0
+  0   3617 01:19:42.26   1.3100A   1.3740  -0.3305  -0.5750  0.052  0.00   0.000      0.  0.270E+00  0.680E-02  0.278E-03  0.170E-04   27  36  30   26  29  36   15  22  29    0.000    0.000       0
+  0   3622 01:19:48.80   1.3200A   1.3686  -0.3342  -0.5430  0.051  0.00   0.000      0.  0.270E+00  0.673E-02  0.277E-03  0.177E-04   27  36  34   26  29  38   14  22  29    0.000    0.000       0
+  0   3626 01:19:54.11   1.3300A   1.3490  -0.3294  -0.5203  0.051  0.00   0.000      0.  0.270E+00  0.670E-02  0.280E-03  0.196E-04   27  36  36   25  32  34   13  22  29    0.000    0.000       0
+  0   3631 01:20:00.84   1.3400A   1.3392  -0.3254  -0.4949  0.050  0.00   0.000      0.  0.271E+00  0.668E-02  0.287E-03  0.228E-04   40   3  14   25  32  36   12  21  29    0.000    0.000       0
+  0   3635 01:20:06.23   1.3400A   1.3387  -0.3270  -0.4810  0.050  0.00   0.000      0.  0.271E+00  0.668E-02  0.292E-03  0.252E-04   40   3  17   25  31  38   11  21  29    0.000    0.000       0
+  0   3640 01:20:12.96   1.3400A   1.3389   0.3621  -0.4710  0.050  0.00   0.000      0.  0.271E+00  0.670E-02  0.298E-03  0.277E-04   40   3  21   21   7  28   12  18  29    0.000    0.000       0
+  0   3644 01:20:18.35   1.3500A   1.3374  -0.3493  -0.4608  0.050  0.00   0.000      0.  0.271E+00  0.673E-02  0.302E-03  0.283E-04   40   3  24   26  29  10   12  18  29    0.000    0.000       0
+  0   3649 01:20:25.07   1.3400A   1.3456  -0.3437  -0.4414  0.050  0.00   0.000      0.  0.272E+00  0.676E-02  0.294E-03  0.239E-04   28  39  10   26  29  13   11  18  29    0.000    0.000       0
+  0   3653 01:20:30.40   1.3300A   1.3544  -0.3941  -0.4308  0.051  0.00   0.000      0.  0.272E+00  0.678E-02  0.292E-03  0.209E-04   26  35  14   20  15  29   10  17  29    0.000    0.000       0
+  0   3658 01:20:36.98   1.3100A   1.3743  -0.3897  -0.5211  0.051  0.00   0.000      0.  0.272E+00  0.677E-02  0.290E-03  0.201E-04   26  35  17   20  15  29   18  38  29    0.000    0.000       0
+  0   3662 01:20:42.24   1.3100A   1.3695  -0.3985  -0.5626  0.052  0.00   0.000      0.  0.272E+00  0.675E-02  0.293E-03  0.210E-04   26  35  20   20  14  29   17  38  29    0.000    0.000       0
+  0   3667 01:20:48.84   1.3200A   1.3587  -0.3692  -0.5668  0.052  0.00   0.000      0.  0.272E+00  0.671E-02  0.296E-03  0.219E-04   26  35  24   20  14  29   17  29  29    0.000    0.000       0
+  0   3671 01:20:54.23   1.3500A   1.3352  -0.3096  -0.5530  0.052  0.00   0.000      0.  0.272E+00  0.668E-02  0.300E-03  0.220E-04   40   3   6   19  14  29   17  30  29    0.000    0.000       0
+  0   3676 01:21:00.96   1.3500A   1.3376   0.3426  -0.5200  0.051  0.00   0.000      0.  0.271E+00  0.664E-02  0.297E-03  0.219E-04   40   3  10   21  11  25   15  30  29    0.000    0.000       0
+  0   3680 01:21:06.32   1.3400A   1.3413  -0.4053  -0.5010  0.051  0.00   0.000      0.  0.271E+00  0.662E-02  0.289E-03  0.208E-04   40   3  13   20   2  28   16  32  29    0.000    0.000       0
+  0   3685 01:21:13.02   1.3400A   1.3436   0.3798  -0.4928  0.051  0.00   0.000      0.  0.271E+00  0.660E-02  0.285E-03  0.195E-04   40   3  17   21  11  28   15  32  29    0.000    0.000       0
+  0   3689 01:21:18.38   1.3400A   1.3448   0.3429  -0.4840  0.051  0.00   0.000      0.  0.271E+00  0.659E-02  0.282E-03  0.184E-04   40   3  20   21  11  29   17  34  29    0.000    0.000       0
+  0   3694 01:21:25.08   1.3400A   1.3461   0.3028  -0.4936  0.052  0.00   0.000      0.  0.271E+00  0.657E-02  0.281E-03  0.185E-04   40   3  24   21   8  28   18   5  29    0.000    0.000       0
+  0   3698 01:21:30.44   1.3400A   1.3443   0.3186  -0.5247  0.051  0.00   0.000      0.  0.271E+00  0.655E-02  0.282E-03  0.202E-04   40   3  27   21  11  32   17   5  29    0.000    0.000       0
+  0   3703 01:21:37.14   1.3400A   1.3448  -0.2975  -0.5136  0.051  0.00   0.000      0.  0.271E+00  0.654E-02  0.282E-03  0.211E-04   40   3  31   25  23   3   16   5  29    0.000    0.000       0
+  0   3707 01:21:42.47   1.3300A   1.3485  -0.3229  -0.4903  0.051  0.00   0.000      0.  0.271E+00  0.653E-02  0.282E-03  0.213E-04   40   3  35   21  13  28   15   5  29    0.000    0.000       0
+  0   3712 01:21:49.13   1.3300A   1.3506  -0.4067  -0.4760  0.050  0.00   0.000      0.  0.271E+00  0.653E-02  0.284E-03  0.226E-04   40   3  39   21  13  28   16   8  29    0.000    0.000       0
+  0   3716 01:21:54.45   1.3300A   1.3529  -0.4799  -0.4687  0.050  0.00   0.000      0.  0.272E+00  0.654E-02  0.283E-03  0.227E-04   40   3   2   21  15  28   16   8  29    0.000    0.000       0
+  0   3721 01:22:01.10   1.3300A   1.3544  -0.3988  -0.4618  0.050  0.00   0.000      0.  0.272E+00  0.654E-02  0.280E-03  0.217E-04   40   3   6   20  15  28   14   7  29    0.000    0.000       0
+  0   3725 01:22:06.42   1.3300A   1.3540  -0.3620  -0.4567  0.050  0.00   0.000      0.  0.272E+00  0.654E-02  0.282E-03  0.221E-04   40   3   9   21  15  31   13   7  29    0.000    0.000       0
+  0   3730 01:22:13.07   1.3300A   1.3545  -0.3520  -0.4509  0.050  0.00   0.000      0.  0.272E+00  0.654E-02  0.284E-03  0.231E-04   40   3  13   24  14  38   12   7  29    0.000    0.000       0
+  0   3734 01:22:18.39   1.3300A   1.3519  -0.3728  -0.4633  0.050  0.00   0.000      0.  0.272E+00  0.654E-02  0.281E-03  0.217E-04   41   3  17   24  14  39   18  20  29    0.000    0.000       0
+  0   3739 01:22:25.04   1.3300A   1.3525   0.4448  -0.4583  0.050  0.00   0.000      0.  0.272E+00  0.652E-02  0.273E-03  0.186E-04   35  14   3   20   7  28   18  19  29    0.000    0.000       0
+  0   3743 01:22:30.36   1.3300A   1.3543  -0.3567  -0.4749  0.051  0.00   0.000      0.  0.272E+00  0.650E-02  0.271E-03  0.184E-04   35  14   6   23  14   1   17  19  29    0.000    0.000       0
+  0   3748 01:22:37.01   1.3300A   1.3531   0.3688  -0.4656  0.050  0.00   0.000      0.  0.272E+00  0.647E-02  0.268E-03  0.182E-04   35  14  10   20   8  29   16  19  29    0.000    0.000       0
+  0   3752 01:22:42.33   1.3300A   1.3500  -0.3930  -0.4689  0.050  0.00   0.000      0.  0.272E+00  0.644E-02  0.267E-03  0.179E-04   35  14  13   22  12   4   18   5  29    0.000    0.000       0
+  0   3757 01:22:49.02   1.3300A   1.3524  -0.3659  -0.4864  0.050  0.00   0.000      0.  0.272E+00  0.642E-02  0.264E-03  0.184E-04   31   9  26   22  12   6   17   5  29    0.000    0.000       0
+  0   3761 01:22:54.35   1.3300A   1.3539  -0.3381  -0.4557  0.050  0.00   0.000      0.  0.272E+00  0.641E-02  0.266E-03  0.198E-04   31   9  29   24  11  12   17  34  29    0.000    0.000       0
+  0   3766 01:23:01.01   1.3300A   1.3503  -0.3308  -0.4457  0.049  0.00   0.000      0.  0.272E+00  0.641E-02  0.268E-03  0.205E-04   31   9  33   24  11  14   16  34  29    0.000    0.000       0
+  0   3770 01:23:06.35   1.3400A   1.3454   0.3431  -0.4256  0.049  0.00   0.000      0.  0.272E+00  0.641E-02  0.270E-03  0.197E-04   31   9  36   20  30  28   15  34  29    0.000    0.000       0
+  0   3775 01:23:13.07   1.3500A   1.3313   0.4215  -0.4285  0.049  0.00   0.000      0.  0.272E+00  0.641E-02  0.273E-03  0.196E-04   35  13  31   20  30  29   14  33  29    0.000    0.000       0
+  0   3779 01:23:18.47   1.3500A   1.3292  -0.3453  -0.4437  0.049  0.00   0.000      0.  0.272E+00  0.640E-02  0.271E-03  0.193E-04   35  13  34   20  21  29   18  28  29    0.000    0.000       0
+  0   3784 01:23:25.23   1.3500A   1.3314  -0.3256  -0.4516  0.049  0.00   0.000      0.  0.272E+00  0.639E-02  0.268E-03  0.195E-04   30  37  37   24   8  23   17  24  29    0.000    0.000       0
+  0   3788 01:23:30.64   1.3600A   1.3283  -0.3061  -0.4735  0.048  0.00   0.000      0.  0.272E+00  0.640E-02  0.271E-03  0.218E-04   35  13   2   20   2  28   17  24  29    0.000    0.000       0
+  0   3792 01:23:36.06   1.3500A   1.3296  -0.3120  -0.4846  0.048  0.00   0.000      0.  0.272E+00  0.642E-02  0.273E-03  0.249E-04   35  13   5   20   1  28   16  24  29    0.000    0.000       0
+  0   3797 01:23:42.73   1.3200A   1.3627  -0.2953  -0.4807  0.048  0.00   0.000      0.  0.272E+00  0.644E-02  0.270E-03  0.262E-04   24  33  21   20   0  28   15  24  29    0.000    0.000       0
+  0   3801 01:23:48.02   1.3200A   1.3686   0.3145  -0.4749  0.048  0.00   0.000      0.  0.272E+00  0.646E-02  0.268E-03  0.251E-04   24  33  23   21   2  28   14  24  29    0.000    0.000       0
+  0   3806 01:23:54.68   1.3300A   1.3539   0.3485  -0.5198  0.048  0.00   0.000      0.  0.273E+00  0.648E-02  0.265E-03  0.218E-04   30  36  15   21   2  28   17   6  29    0.000    0.000       0
+  0   3810 01:24:00.00   1.3300A   1.3537  -0.3292  -0.5488  0.049  0.00   0.000      0.  0.273E+00  0.648E-02  0.262E-03  0.195E-04   30  36  18   22  33  30   17   5  29    0.000    0.000       0
+  0   3815 01:24:06.67   1.3400A   1.3473  -0.3351  -0.5327  0.049  0.00   0.000      0.  0.273E+00  0.648E-02  0.263E-03  0.186E-04   30  36  22   22  32  31   16   5  29    0.000    0.000       0
+  0   3819 01:24:12.05   1.3500A   1.3342  -0.3497  -0.5092  0.050  0.00   0.000      0.  0.273E+00  0.646E-02  0.263E-03  0.185E-04   30  36  25   22  32  33   16   4  29    0.000    0.000       0
+  0   3824 01:24:18.82   1.3500A   1.3288  -0.3067  -0.4686  0.050  0.00   0.000      0.  0.273E+00  0.644E-02  0.260E-03  0.180E-04   38   1  26   23  32   0   14   4  29    0.000    0.000       0
+  0   3828 01:24:24.25   1.3600A   1.3280  -0.3329  -0.4505  0.050  0.00   0.000      0.  0.272E+00  0.642E-02  0.258E-03  0.169E-04   38   1  29   23  32   2   17  37  29    0.000    0.000       0
+  0   3833 01:24:31.04   1.3600A   1.3267  -0.3453  -0.4314  0.050  0.00   0.000      0.  0.272E+00  0.640E-02  0.255E-03  0.163E-04   38   1  33   23  32   4   17  36  29    0.000    0.000       0
+  0   3837 01:24:36.48   1.3600A   1.3260  -0.3233  -0.4210  0.050  0.00   0.000      0.  0.272E+00  0.639E-02  0.255E-03  0.169E-04   38   1  37   22  32   3   16  35  29    0.000    0.000       0
+  0   3842 01:24:43.28   1.3600A   1.3252  -0.3150  -0.4108  0.050  0.00   0.000      0.  0.272E+00  0.639E-02  0.254E-03  0.178E-04   38   1   1   23  31   8   15  35  29    0.000    0.000       0
+  0   3846 01:24:48.72   1.3600A   1.3249  -0.3054  -0.4013  0.050  0.00   0.000      0.  0.272E+00  0.639E-02  0.255E-03  0.181E-04   38   1   4   23  31  10   14  35  29    0.000    0.000       0
+  0   3850 01:24:54.16   1.3600A   1.3229  -0.3130  -0.4084  0.049  0.00   0.000      0.  0.272E+00  0.640E-02  0.256E-03  0.183E-04   38   1   7   23  31  12   17  19  29    0.000    0.000       0
+  0   3855 01:25:00.96   1.3600A   1.3243  -0.3305  -0.4119  0.049  0.00   0.000      0.  0.272E+00  0.642E-02  0.258E-03  0.195E-04   39   6   0   23  31  14   17  19  29    0.000    0.000       0
+  0   3859 01:25:06.38   1.3500A   1.3294   0.3201  -0.4078  0.049  0.00   0.000      0.  0.272E+00  0.643E-02  0.258E-03  0.199E-04   39   6   3   23  20  28   16  19  29    0.000    0.000       0
+  0   3864 01:25:13.13   1.3500A   1.3340   0.3239  -0.3981  0.049  0.00   0.000      0.  0.272E+00  0.645E-02  0.259E-03  0.191E-04   39   6   7   23  20  31   15  18  29    0.000    0.000       0
+  0   3868 01:25:18.53   1.3500A   1.3373   0.3332  -0.3892  0.049  0.00   0.000      0.  0.272E+00  0.646E-02  0.255E-03  0.180E-04   39   6  10   23  21  32   14  18  29    0.000    0.000       0
+  0   3873 01:25:25.26   1.3400A   1.3406   0.3243  -0.3788  0.049  0.00   0.000      0.  0.272E+00  0.648E-02  0.251E-03  0.173E-04   39   6  14   23  21  34   13  18  29    0.000    0.000       0
+  0   3877 01:25:30.62   1.3400A   1.3417   0.3274  -0.3688  0.048  0.00   0.000      0.  0.272E+00  0.649E-02  0.252E-03  0.177E-04   39   6  17   24  32  17   13  18  29    0.000    0.000       0
+  0   3882 01:25:37.32   1.3400A   1.3431   0.3437  -0.3612  0.048  0.00   0.000      0.  0.272E+00  0.651E-02  0.254E-03  0.180E-04   39   6  21   24  33  19   12  18  29    0.000    0.000       0
+  0   3886 01:25:42.68   1.3400A   1.3419   0.3421  -0.3843  0.048  0.00   0.000      0.  0.272E+00  0.652E-02  0.253E-03  0.172E-04   39   6  24   24  33  21   18  38  29    0.000    0.000       0
+  0   3890 01:25:48.04   1.3400A   1.3401   0.3435  -0.3957  0.049  0.00   0.000      0.  0.272E+00  0.653E-02  0.254E-03  0.170E-04   39   6  28   24  34  23   18  37  29    0.000    0.000       0
+  0   3895 01:25:54.74   1.3400A   1.3385   0.3150  -0.4264  0.049  0.00   0.000      0.  0.272E+00  0.654E-02  0.256E-03  0.167E-04   39   6  32   23  32  28   18  36  29    0.000    0.000       0
+  0   3899 01:26:00.10   1.3400A   1.3391  -0.3422  -0.4539  0.049  0.00   0.000      0.  0.272E+00  0.653E-02  0.256E-03  0.159E-04   39   6  35   24  16  27   18  36  29    0.000    0.000       0
+  0   3904 01:26:06.80   1.3400A   1.3402  -0.3510  -0.4537  0.050  0.00   0.000      0.  0.272E+00  0.650E-02  0.252E-03  0.154E-04   29  17  26   23  16  27   17  36  29    0.000    0.000       0
+  0   3908 01:26:12.18   1.3400A   1.3408   0.3559  -0.4460  0.050  0.00   0.000      0.  0.272E+00  0.648E-02  0.251E-03  0.158E-04   29  17  29   22  33  32   17   3  29    0.000    0.000       0
+  0   3913 01:26:18.93   1.3500A   1.3330  -0.3423  -0.4466  0.050  0.00   0.000      0.  0.272E+00  0.645E-02  0.254E-03  0.157E-04   39   6   6   23  15  30   16   3  29    0.000    0.000       0
+  0   3917 01:26:24.33   1.3500A   1.3356  -0.3385  -0.4408  0.050  0.00   0.000      0.  0.272E+00  0.644E-02  0.256E-03  0.161E-04   32  15  38   24  15  34   15   3  29    0.000    0.000       0
+  0   3922 01:26:31.03   1.3400A   1.3483  -0.3632  -0.4353  0.050  0.00   0.000      0.  0.272E+00  0.643E-02  0.256E-03  0.158E-04   30   8   2   24  15  35   14   3  29    0.000    0.000       0
+  0   3926 01:26:36.39   1.3400A   1.3463  -0.3509  -0.4343  0.050  0.00   0.000      0.  0.272E+00  0.642E-02  0.257E-03  0.163E-04   30   8   5   24  15  37   14   3  29    0.000    0.000       0
+  0   3931 01:26:43.10   1.3400A   1.3413  -0.3465  -0.4273  0.050  0.00   0.000      0.  0.272E+00  0.640E-02  0.262E-03  0.182E-04   30   8   8   24  14  38   13   3  29    0.000    0.000       0
+  0   3935 01:26:48.47   1.3400A   1.3481  -0.3493  -0.4205  0.051  0.00   0.000      0.  0.272E+00  0.638E-02  0.265E-03  0.188E-04   30   8  11   23  14  39   12   3  29    0.000    0.000       0
+  0   3940 01:26:55.15   1.3300A   1.3517  -0.3422  -0.4249  0.051  0.00   0.000      0.  0.272E+00  0.636E-02  0.264E-03  0.189E-04   31   7  13   23  14   1   17  27  29    0.000    0.000       0
+  0   3944 01:27:00.45   1.3200A   1.3632  -0.3240  -0.4161  0.051  0.00   0.000      0.  0.272E+00  0.633E-02  0.263E-03  0.189E-04   31   7  16   22  13   2   16  27  29    0.000    0.000       0
+  0   3949 01:27:07.01   1.3000A   1.3817   0.3270  -0.4048  0.051  0.00   0.000      0.  0.272E+00  0.629E-02  0.256E-03  0.177E-04   31   7  19   23  26  36   16  27  29    0.000    0.000       0
+  0   3953 01:27:12.22   1.3000A   1.3867   0.3322  -0.3997  0.050  0.00   0.000      0.  0.272E+00  0.626E-02  0.255E-03  0.173E-04   31   7  22   23  26  38   15  27  29    0.000    0.000       0
+  0   3958 01:27:18.74   1.3000A   1.3844   0.3227  -0.4061  0.050  0.00   0.000      0.  0.272E+00  0.622E-02  0.252E-03  0.163E-04   31   7  25   23  26   0   17   8  29    0.000    0.000       0
+  0   3963 01:27:25.27   1.3100A   1.3704   0.3023  -0.3954  0.050  0.00   0.000      0.  0.272E+00  0.617E-02  0.249E-03  0.147E-04   31   7  29   23  26   2   16   9  29    0.000    0.000       0
+  0   3967 01:27:30.55   1.3300A   1.3566   0.2956  -0.3833  0.049  0.00   0.000      0.  0.272E+00  0.613E-02  0.251E-03  0.144E-04   30   8  35   23  22  13   16   9  29    0.000    0.000       0
+  0   3972 01:27:37.14   1.3100A   1.3691   0.3080  -0.3771  0.049  0.00   0.000      0.  0.272E+00  0.609E-02  0.246E-03  0.141E-04   30   8  39   23  22  15   16  21  29    0.000    0.000       0
+  0   3976 01:27:42.40   1.3100A   1.3697  -0.3315  -0.3662  0.048  0.00   0.000      0.  0.272E+00  0.607E-02  0.245E-03  0.143E-04   30   8   2   22  11  15   15  21  29    0.000    0.000       0
+  0   3981 01:27:48.97   1.3100A   1.3703  -0.3071  -0.3525  0.048  0.00   0.000      0.  0.272E+00  0.605E-02  0.244E-03  0.144E-04   30   8   5   22  11  17   14  21  29    0.000    0.000       0
+  0   3985 01:27:54.23   1.3100A   1.3734   0.3139  -0.3436  0.047  0.00   0.000      0.  0.272E+00  0.604E-02  0.244E-03  0.147E-04   30   8   8   23  24  17   13  21  29    0.000    0.000       0
+  0   3990 01:28:00.81   1.3200A   1.3591   0.3407  -0.3371  0.047  0.00   0.000      0.  0.272E+00  0.604E-02  0.249E-03  0.158E-04   30   8  12   22  23  18   12  21  29    0.000    0.000       0
+  0   3994 01:28:06.08   1.3200A   1.3666   0.3377  -0.3335  0.046  0.00   0.000      0.  0.272E+00  0.605E-02  0.252E-03  0.169E-04   30   8  14   22  24  19   11  21  29    0.000    0.000       0
+  0   3999 01:28:12.74   1.3400A   1.3394   0.3377  -0.3222  0.046  0.00   0.000      0.  0.272E+00  0.607E-02  0.260E-03  0.193E-04   31  14  11   22  24  21   10  21  29    0.000    0.000       0
+  0   4003 01:28:18.10   1.3400A   1.3400   0.3482  -0.3235  0.046  0.00   0.000      0.  0.272E+00  0.609E-02  0.264E-03  0.200E-04   31  14  14   22  24  23   11   4  28    0.000    0.000       0
+  0   4008 01:28:24.79   1.3300A   1.3501   0.3529  -0.3522  0.046  0.00   0.000      0.  0.272E+00  0.612E-02  0.264E-03  0.198E-04   31  13  16   22  24  26   16   1  29    0.000    0.000       0
+  0   4012 01:28:30.10   1.3200A   1.3638   0.3884  -0.3803  0.046  0.00   0.000      0.  0.273E+00  0.614E-02  0.264E-03  0.197E-04   31  13  19   22  25  26   16   1  29    0.000    0.000       0
+  0   4017 01:28:36.67   1.3100A   1.3769   0.3882  -0.3986  0.047  0.00   0.000      0.  0.273E+00  0.617E-02  0.261E-03  0.182E-04   31  13  23   22  25  28   15   1  29    0.000    0.000       0
+  0   4022 01:28:43.20   1.3100A   1.3783   0.3766  -0.4102  0.047  0.00   0.000      0.  0.273E+00  0.619E-02  0.257E-03  0.153E-04   31  13  27   22  26  30   15   1  29    0.000    0.000       0
+  0   4026 01:28:48.41   1.3000A   1.3830   0.3773  -0.4068  0.048  0.00   0.000      0.  0.273E+00  0.621E-02  0.255E-03  0.150E-04   31  13  30   22  26  32   14   1  29    0.000    0.000       0
+  0   4031 01:28:54.88   1.2900A   1.3914   0.3842  -0.3966  0.048  0.00   0.000      0.  0.273E+00  0.622E-02  0.253E-03  0.162E-04   31  13  33   20  23  29   14   1  29    0.000    0.000       0
+  0   4035 01:29:00.05   1.2900A   1.3949   0.4540  -0.4666  0.048  0.00   0.000      0.  0.273E+00  0.622E-02  0.251E-03  0.161E-04   31  13  36   20  23  29   18  20  29    0.000    0.000       0
+  0   4040 01:29:06.51   1.2900A   1.3957   0.3720  -0.5237  0.049  0.00   0.000      0.  0.272E+00  0.622E-02  0.247E-03  0.153E-04   31  13   0   19  23  29   18  20  29    0.000    0.000       0
+  0   4045 01:29:12.99   1.3000A   1.3829   0.3188  -0.5304  0.049  0.00   0.000      0.  0.272E+00  0.623E-02  0.247E-03  0.163E-04   31  13   3   19  23  29   17  20  29    0.000    0.000       0
+  0   4049 01:29:18.21   1.3100A   1.3787   0.3058  -0.5224  0.049  0.00   0.000      0.  0.272E+00  0.624E-02  0.250E-03  0.175E-04   31  13   6   21  25  38   17  19  29    0.000    0.000       0
+  0   4054 01:29:24.68   1.2900A   1.3983   0.3013  -0.5017  0.049  0.00   0.000      0.  0.272E+00  0.625E-02  0.246E-03  0.174E-04   30  15  15   20  12  29   16  19  29    0.000    0.000       0
+  0   4059 01:29:31.14   1.2900A   1.3947   0.3245  -0.4747  0.049  0.00   0.000      0.  0.272E+00  0.627E-02  0.247E-03  0.179E-04   30  15  19   22  25   6   17   9  29    0.000    0.000       0
+  0   4063 01:29:36.31   1.2900A   1.3967   0.3456  -0.4838  0.049  0.00   0.000      0.  0.272E+00  0.628E-02  0.248E-03  0.179E-04   30  13  16   22  25   8   16   9  29    0.000    0.000       0
+  0   4068 01:29:42.74   1.2900A   1.3957   0.3341  -0.4785  0.049  0.00   0.000      0.  0.272E+00  0.630E-02  0.247E-03  0.174E-04   30  13  19   22  25  10   15   9  29    0.000    0.000       0
+  0   4073 01:29:49.15   1.2800A   1.4117   0.3070  -0.4656  0.049  0.00   0.000      0.  0.272E+00  0.631E-02  0.245E-03  0.170E-04   30  13  23   22  25  12   14   9  29    0.000    0.000       0
+  0   4077 01:29:54.29   1.2900A   1.3929   0.3024  -0.4472  0.049  0.00   0.000      0.  0.272E+00  0.632E-02  0.246E-03  0.163E-04   30  13  26   24  14   9   14   9  29    0.000    0.000       0
+  0   4082 01:30:00.80   1.3100A   1.3719   0.3036  -0.4349  0.049  0.00   0.000      0.  0.272E+00  0.634E-02  0.252E-03  0.159E-04   30  13  29   24  14  11   13   9  29    0.000    0.000       0
+  0   4086 01:30:06.06   1.3300A   1.3585   0.2991  -0.4289  0.048  0.00   0.000      0.  0.272E+00  0.635E-02  0.259E-03  0.165E-04   30  11  26   23  37  24   12   9  29    0.000    0.000       0
+  0   4091 01:30:12.65   1.3200A   1.3609   0.2887  -0.4127  0.048  0.00   0.000      0.  0.272E+00  0.636E-02  0.261E-03  0.164E-04   30  11  30   22   8   0   11   9  29    0.000    0.000       0
+  0   4096 01:30:19.18   1.2900A   1.3904   0.3319  -0.3933  0.048  0.00   0.000      0.  0.272E+00  0.638E-02  0.257E-03  0.153E-04   31  11  29   22  37  28   10   9  29    0.000    0.000       0
+  0   4100 01:30:24.35   1.2900A   1.4004  -0.3363  -0.3735  0.048  0.00   0.000      0.  0.272E+00  0.640E-02  0.259E-03  0.154E-04   31  11  32   20  31  29    9   9  29    0.000    0.000       0
+  0   4105 01:30:30.80   1.2900A   1.3965  -0.3248  -0.3722  0.048  0.00   0.000      0.  0.272E+00  0.642E-02  0.261E-03  0.164E-04   30  10  39   19  31  29   18  33  29    0.000    0.000       0
+  0   4110 01:30:37.29   1.3000A   1.3817   0.3245  -0.4181  0.048  0.00   0.000      0.  0.272E+00  0.646E-02  0.265E-03  0.171E-04   31  11  39   23  37  37   17  33  29    0.000    0.000       0
+  0   4114 01:30:42.56   1.3300A   1.3532   0.3344  -0.4216  0.048  0.00   0.000      0.  0.272E+00  0.648E-02  0.272E-03  0.181E-04   31  11   2   23  38  38   17  34  29    0.000    0.000       0
+  0   4119 01:30:49.22   1.3300A   1.3505   0.3599  -0.4157  0.048  0.00   0.000      0.  0.272E+00  0.652E-02  0.276E-03  0.189E-04   30  11   5   23  38   0   16  34  29    0.000    0.000       0
+  0   4123 01:30:54.55   1.3400A   1.3434   0.3333  -0.3991  0.048  0.00   0.000      0.  0.272E+00  0.656E-02  0.282E-03  0.196E-04   40   6   7   23  38   2   15  34  29    0.000    0.000       0
+  0   4128 01:31:01.21   1.3300A   1.3572   0.3694  -0.3875  0.048  0.00   0.000      0.  0.273E+00  0.660E-02  0.283E-03  0.196E-04   31  10  10   23  39   4   16  36  29    0.000    0.000       0
+  0   4132 01:31:06.50   1.3200A   1.3616   0.3553  -0.3812  0.048  0.00   0.000      0.  0.273E+00  0.662E-02  0.285E-03  0.211E-04   31  10  13   23  39   6   15  36  29    0.000    0.000       0
+  0   4137 01:31:13.12   1.3200A   1.3598  -0.4004  -0.3900  0.048  0.00   0.000      0.  0.273E+00  0.664E-02  0.288E-03  0.220E-04   31  10  17   21   6  28   18   2  29    0.000    0.000       0
+  0   4141 01:31:18.47   1.3400A   1.3482   0.4055  -0.4125  0.049  0.00   0.000      0.  0.273E+00  0.665E-02  0.290E-03  0.204E-04   40   1  22   20  11  28   17   2  29    0.000    0.000       0
+  0   4146 01:31:25.12   1.3300A   1.3486   0.4046  -0.4442  0.049  0.00   0.000      0.  0.273E+00  0.664E-02  0.288E-03  0.188E-04   41   1  26   20  25  29   17  21  29    0.000    0.000       0
+  0   4150 01:31:30.44   1.3300A   1.3491   0.4210  -0.5014  0.049  0.00   0.000      0.  0.273E+00  0.662E-02  0.288E-03  0.186E-04   41   1  30   19  25  29   19   7  29    0.000    0.000       0
+  0   4155 01:31:37.09   1.3300A   1.3514   0.4127  -0.5313  0.049  0.00   0.000      0.  0.273E+00  0.659E-02  0.292E-03  0.200E-04   33  31  17   19  25  29   18   7  29    0.000    0.000       0
+  0   4159 01:31:42.41   1.3300A   1.3517  -0.4931  -0.5173  0.049  0.00   0.000      0.  0.273E+00  0.657E-02  0.291E-03  0.198E-04   33  31  21   20  14  28   17   7  29    0.000    0.000       0
+  0   4164 01:31:49.02   1.3200A   1.3592  -0.4812  -0.4987  0.049  0.00   0.000      0.  0.273E+00  0.654E-02  0.286E-03  0.195E-04   35  38  38   20  13  28   16   7  29    0.000    0.000       0
+  0   4168 01:31:54.30   1.3200A   1.3681  -0.4071  -0.4917  0.049  0.00   0.000      0.  0.273E+00  0.653E-02  0.285E-03  0.192E-04   35  38   1   20  13  28   16   7  29    0.000    0.000       0
+  0   4173 01:32:00.87   1.3100A   1.3727  -0.3438  -0.4755  0.049  0.00   0.000      0.  0.273E+00  0.652E-02  0.280E-03  0.182E-04   35  38   5   20  12  28   15   7  29    0.000    0.000       0
+  0   4177 01:32:06.11   1.3100A   1.3759  -0.3239  -0.4606  0.050  0.00   0.000      0.  0.273E+00  0.652E-02  0.279E-03  0.178E-04   35  38   8   20  30  26   14   7  29    0.000    0.000       0
+  0   4182 01:32:12.66   1.3100A   1.3739  -0.3502  -0.4439  0.050  0.00   0.000      0.  0.273E+00  0.652E-02  0.280E-03  0.189E-04   35  38  11   20  30  28   13   7  29    0.000    0.000       0
+  0   4187 01:32:19.21   1.3100A   1.3723  -0.3458  -0.4274  0.050  0.00   0.000      0.  0.273E+00  0.653E-02  0.281E-03  0.201E-04   35  38  15   20  29  28   12   7  29    0.000    0.000       0
+  0   4191 01:32:24.45   1.3100A   1.3725  -0.3871  -0.4157  0.050  0.00   0.000      0.  0.273E+00  0.653E-02  0.281E-03  0.195E-04   35  38  19   20  29  29   12   8  29    0.000    0.000       0
+  0   4196 01:32:31.00   1.3100A   1.3701  -0.3672  -0.4238  0.051  0.00   0.000      0.  0.273E+00  0.652E-02  0.284E-03  0.193E-04   35  38  23   20  29  29   18  31  29    0.000    0.000       0
+  0   4200 01:32:36.27   1.3200A   1.3687  -0.3700  -0.4698  0.051  0.00   0.000      0.  0.273E+00  0.651E-02  0.287E-03  0.187E-04   37  39  24   19  29  29   18  31  29    0.000    0.000       0
+  0   4205 01:32:42.83   1.3100A   1.3744  -0.3327  -0.5141  0.051  0.00   0.000      0.  0.273E+00  0.648E-02  0.283E-03  0.175E-04   34  38  32   21  39  28   17  35  29    0.000    0.000       0
+  0   4209 01:32:48.05   1.3000A   1.3816   0.3543  -0.5245  0.051  0.00   0.000      0.  0.273E+00  0.646E-02  0.279E-03  0.172E-04   34  38  35   20   6  29   16  34  29    0.000    0.000       0
+  0   4214 01:32:54.55   1.3000A   1.3874   0.3370  -0.5273  0.051  0.00   0.000      0.  0.273E+00  0.642E-02  0.275E-03  0.178E-04   34  38  39   20   6  29   16  34  29    0.000    0.000       0
+  0   4219 01:33:01.02   1.2900A   1.3919   0.3299  -0.5180  0.050  0.00   0.000      0.  0.273E+00  0.639E-02  0.273E-03  0.192E-04   34  38   3   22  38  23   15  34  29    0.000    0.000       0
+  0   4223 01:33:06.18   1.2900A   1.3951   0.3244  -0.5067  0.050  0.00   0.000      0.  0.273E+00  0.637E-02  0.271E-03  0.190E-04   34  38   6   23  37  28   14  34  29    0.000    0.000       0
+  0   4228 01:33:12.63   1.2900A   1.3989   0.3175  -0.4882  0.049  0.00   0.000      0.  0.273E+00  0.636E-02  0.271E-03  0.188E-04   34  38  10   22  39  25   13  34  29    0.000    0.000       0
+  0   4233 01:33:19.06   1.2800A   1.4033  -0.3225  -0.4657  0.049  0.00   0.000      0.  0.273E+00  0.635E-02  0.269E-03  0.198E-04   34  38  14   28   9   1   12  34  29    0.000    0.000       0
+  0   4237 01:33:24.18   1.2800A   1.4050  -0.3142  -0.4569  0.048  0.00   0.000      0.  0.273E+00  0.634E-02  0.268E-03  0.196E-04   34  38  17   28   9   3   16  39  29    0.000    0.000       0
+  0   4242 01:33:30.58   1.2800A   1.4060  -0.3040  -0.4655  0.048  0.00   0.000      0.  0.273E+00  0.632E-02  0.266E-03  0.181E-04   34  39  20   28   9   6   15  39  29    0.000    0.000       0
+  0   4247 01:33:36.98   1.2800A   1.4099  -0.2985  -0.4589  0.048  0.00   0.000      0.  0.273E+00  0.630E-02  0.262E-03  0.165E-04   34  39  24   27   9   8   14  39  29    0.000    0.000       0
+  0   4251 01:33:42.07   1.2800A   1.4104  -0.2847  -0.4437  0.048  0.00   0.000      0.  0.273E+00  0.628E-02  0.260E-03  0.155E-04   34  39  28   28   9  12   13  39  29    0.000    0.000       0
+  0   4256 01:33:48.43   1.2700A   1.4130   0.3162  -0.4314  0.048  0.00   0.000      0.  0.272E+00  0.625E-02  0.257E-03  0.154E-04   34  39  32   20  15  28   13  38  28    0.000    0.000       0
+  0   4261 01:33:54.78   1.2700A   1.4143   0.2895  -0.4457  0.048  0.00   0.000      0.  0.272E+00  0.623E-02  0.258E-03  0.164E-04   34  39  36   20  15  28   12  38  28    0.000    0.000       0
+  0   4266 01:34:01.13   1.2700A   1.4128   0.3147  -0.4526  0.048  0.00   0.000      0.  0.272E+00  0.622E-02  0.260E-03  0.189E-04   34  39   0   22  12  24   11  38  28    0.000    0.000       0
+  0   4270 01:34:06.21   1.2700A   1.4128   0.3096  -0.4494  0.047  0.00   0.000      0.  0.272E+00  0.623E-02  0.263E-03  0.217E-04   34  39   3   22  11  26   10  38  28    0.000    0.000       0
+  0   4275 01:34:12.60   1.2800A   1.4083  -0.3235  -0.4284  0.047  0.00   0.000      0.  0.273E+00  0.625E-02  0.267E-03  0.246E-04   34  39   7   22  24  28    9  38  28    0.000    0.000       0
+  0   4280 01:34:19.01   1.2900A   1.4008  -0.3116  -0.4238  0.048  0.00   0.000      0.  0.273E+00  0.627E-02  0.270E-03  0.247E-04   34   0  11   21  24  28   15   6  29    0.000    0.000       0
+  0   4284 01:34:24.16   1.2900A   1.3973  -0.3510  -0.4543  0.048  0.00   0.000      0.  0.273E+00  0.628E-02  0.268E-03  0.226E-04   34   0  14   20  11  29   17  12  29    0.000    0.000       0
+  0   4289 01:34:30.62   1.3000A   1.3874  -0.3716  -0.5145  0.048  0.00   0.000      0.  0.274E+00  0.629E-02  0.271E-03  0.216E-04   34   0  18   19  11  29   17  12  29    0.000    0.000       0
+  0   4294 01:34:37.09   1.3000A   1.3859   0.3768  -0.5276  0.049  0.00   0.000      0.  0.274E+00  0.627E-02  0.268E-03  0.197E-04   40   5  28   20  32  29   16  13  29    0.000    0.000       0
+  0   4298 01:34:42.26   1.3000A   1.3884   0.3868  -0.5258  0.049  0.00   0.000      0.  0.274E+00  0.625E-02  0.268E-03  0.194E-04   41   5  32   20  11  28   17  28  29    0.000    0.000       0
+  0   4303 01:34:48.73   1.3000A   1.3865   0.3644  -0.5673  0.050  0.00   0.000      0.  0.274E+00  0.622E-02  0.265E-03  0.199E-04   36   7  21   20  11  28   17  28  29    0.000    0.000       0
+  0   4308 01:34:55.19   1.3000A   1.3895   0.3048  -0.5573  0.050  0.00   0.000      0.  0.273E+00  0.617E-02  0.260E-03  0.193E-04   36   7  24   20   8  29   16  28  29    0.000    0.000       0
+  0   4312 01:35:00.36   1.3000A   1.3872   0.3607  -0.5391  0.050  0.00   0.000      0.  0.273E+00  0.613E-02  0.255E-03  0.181E-04   36   7  28   20   8  29   15  28  29    0.000    0.000       0
+  0   4317 01:35:06.81   1.2900A   1.3944   0.3294  -0.5086  0.050  0.00   0.000      0.  0.273E+00  0.607E-02  0.246E-03  0.164E-04   28  38  18   19   8  29   14  28  29    0.000    0.000       0
+  0   4321 01:35:12.01   1.3100A   1.3772   0.3214  -0.4995  0.049  0.00   0.000      0.  0.273E+00  0.603E-02  0.246E-03  0.162E-04   36   7  35   19   8  29   17   2  29    0.000    0.000       0
+  0   4326 01:35:18.55   1.3100A   1.3690   0.2954  -0.5143  0.049  0.00   0.000      0.  0.272E+00  0.599E-02  0.247E-03  0.172E-04   36   7  39   20   2  29   17   2  29    0.000    0.000       0
+  0   4331 01:35:25.15   1.3200A   1.3643  -0.2794  -0.4998  0.049  0.00   0.000      0.  0.272E+00  0.596E-02  0.252E-03  0.191E-04   36   7   3   21   0  26   16   2  29    0.000    0.000       0
+  0   4335 01:35:30.43   1.3200A   1.3664  -0.2924  -0.5007  0.049  0.00   0.000      0.  0.272E+00  0.594E-02  0.251E-03  0.192E-04   36   1  39   21   0  26   17  39  29    0.000    0.000       0
+  0   4340 01:35:37.03   1.3200A   1.3663  -0.2922  -0.4720  0.048  0.00   0.000      0.  0.272E+00  0.592E-02  0.250E-03  0.186E-04   36   1   3   20   1  28   16  39  29    0.000    0.000       0
+  0   4344 01:35:42.31   1.3200A   1.3620  -0.3418  -0.4541  0.048  0.00   0.000      0.  0.273E+00  0.591E-02  0.249E-03  0.184E-04   36   1   6   20   1  28   16  38  29    0.000    0.000       0
+  0   4349 01:35:48.91   1.3200A   1.3603   0.3371  -0.4344  0.048  0.00   0.000      0.  0.273E+00  0.590E-02  0.245E-03  0.174E-04   36   7  18   20  28  29   13   2  29    0.000    0.000       0
+  0   4353 01:35:54.20   1.3200A   1.3593  -0.3197  -0.4223  0.048  0.00   0.000      0.  0.273E+00  0.590E-02  0.242E-03  0.167E-04   41   5  24   20  39  28   12   2  29    0.000    0.000       0
+  0   4358 01:36:00.80   1.3200A   1.3611   0.3150  -0.4058  0.048  0.00   0.000      0.  0.273E+00  0.590E-02  0.241E-03  0.169E-04   41   5  28   20  29  29   11   2  29    0.000    0.000       0
+  0   4362 01:36:06.08   1.3200A   1.3607   0.2830  -0.3958  0.048  0.00   0.000      0.  0.273E+00  0.591E-02  0.243E-03  0.177E-04   41   5  31   20  10  28   13  37  29    0.000    0.000       0
+  0   4367 01:36:12.68   1.3200A   1.3596  -0.2828  -0.3828  0.048  0.00   0.000      0.  0.273E+00  0.592E-02  0.244E-03  0.183E-04   41   5  35   22  21  23   12  37  29    0.000    0.000       0
+  0   4372 01:36:19.28   1.3200A   1.3662  -0.3390  -0.3750  0.048  0.00   0.000      0.  0.273E+00  0.594E-02  0.245E-03  0.187E-04   41   6  38   22  24  22   12  36  29    0.000    0.000       0
+  0   4376 01:36:24.55   1.3100A   1.3706  -0.3480  -0.3657  0.049  0.00   0.000      0.  0.273E+00  0.595E-02  0.244E-03  0.188E-04   41   6   1   22  23  24   11  36  29    0.000    0.000       0
+  0   4381 01:36:31.11   1.3100A   1.3737  -0.3946  -0.3802  0.049  0.00   0.000      0.  0.273E+00  0.597E-02  0.242E-03  0.179E-04   41   6   5   22  23  26   17   6  29    0.000    0.000       0
+  0   4385 01:36:36.35   1.3100A   1.3750  -0.3917  -0.3864  0.049  0.00   0.000      0.  0.273E+00  0.597E-02  0.240E-03  0.170E-04   41   6   8   22  23  28   17   6  29    0.000    0.000       0
+  0   4390 01:36:42.90   1.3100A   1.3727  -0.3731  -0.3665  0.049  0.00   0.000      0.  0.273E+00  0.599E-02  0.237E-03  0.162E-04   41   6  12   22  23  30   15  13  29    0.000    0.000       0
+  0   4394 01:36:48.14   1.3100A   1.3709  -0.3510  -0.3732  0.049  0.00   0.000      0.  0.273E+00  0.600E-02  0.236E-03  0.160E-04   41   6  15   22  22  31   17  12  29    0.000    0.000       0
+  0   4399 01:36:54.73   1.3200A   1.3639  -0.3534  -0.4018  0.050  0.00   0.000      0.  0.273E+00  0.601E-02  0.238E-03  0.163E-04   41   6  19   20  22  28   17  11  29    0.000    0.000       0
+  0   4403 01:37:00.01   1.3200A   1.3595  -0.3519  -0.4616  0.050  0.00   0.000      0.  0.273E+00  0.601E-02  0.237E-03  0.160E-04   41   6  22   20  24  29   18  25  29    0.000    0.000       0
+  0   4408 01:37:06.63   1.3200A   1.3616  -0.3522  -0.4989  0.050  0.00   0.000      0.  0.273E+00  0.602E-02  0.237E-03  0.156E-04   41   4  27   19  24  29   18  26  29    0.000    0.000       0
+  0   4413 01:37:13.23   1.3200A   1.3655  -0.3469  -0.5377  0.050  0.00   0.000      0.  0.273E+00  0.603E-02  0.240E-03  0.166E-04   41   4  31   19  23  29   17  26  29    0.000    0.000       0
+  0   4417 01:37:18.48   1.3100A   1.3730  -0.3295  -0.5246  0.050  0.00   0.000      0.  0.273E+00  0.604E-02  0.243E-03  0.185E-04   28   1  39   18  23  29   17  26  29    0.000    0.000       0
+  0   4422 01:37:25.03   1.3100A   1.3744  -0.3291  -0.5044  0.050  0.00   0.000      0.  0.273E+00  0.606E-02  0.247E-03  0.204E-04   41   6   3   20  37  29   16  26  29    0.000    0.000       0
+  0   4426 01:37:30.25   1.3000A   1.3799   0.3075  -0.4849  0.049  0.00   0.000      0.  0.273E+00  0.607E-02  0.249E-03  0.214E-04   41   6   6   20   4  29   15  27  29    0.000    0.000       0
+  0   4431 01:37:36.76   1.3000A   1.3835   0.3017  -0.4628  0.049  0.00   0.000      0.  0.273E+00  0.608E-02  0.253E-03  0.211E-04   41   6  10   22  35  16   14  27  29    0.000    0.000       0
+  0   4436 01:37:43.26   1.3000A   1.3866   0.3405  -0.4866  0.049  0.00   0.000      0.  0.273E+00  0.609E-02  0.254E-03  0.203E-04   41   6  14   22  36  19   17  39  29    0.000    0.000       0
+  0   4440 01:37:48.45   1.2900A   1.3900   0.3433  -0.4819  0.048  0.00   0.000      0.  0.273E+00  0.610E-02  0.251E-03  0.188E-04   41   6  17   22  36  20   16  39  29    0.000    0.000       0
+  0   4445 01:37:54.93   1.2900A   1.3920   0.3313  -0.4699  0.048  0.00   0.000      0.  0.273E+00  0.612E-02  0.251E-03  0.173E-04   41   6  21   22  36  22   15  39  29    0.000    0.000       0
+  0   4449 01:38:00.10   1.2900A   1.3932   0.3313  -0.4521  0.048  0.00   0.000      0.  0.273E+00  0.613E-02  0.251E-03  0.173E-04   40   6  24   22  37  24   15  39  29    0.000    0.000       0
+  0   4454 01:38:06.56   1.2900A   1.3940  -0.3909  -0.4392  0.048  0.00   0.000      0.  0.273E+00  0.615E-02  0.249E-03  0.168E-04   40   6  28   20  39  29   14  39  29    0.000    0.000       0
+  0   4459 01:38:13.01   1.2900A   1.3937  -0.3707  -0.4227  0.048  0.00   0.000      0.  0.273E+00  0.618E-02  0.248E-03  0.169E-04   40   6  32   20  38  29   13  39  29    0.000    0.000       0
+  0   4463 01:38:18.18   1.2900A   1.3925  -0.3074  -0.4114  0.048  0.00   0.000      0.  0.273E+00  0.620E-02  0.249E-03  0.174E-04   40   6  35   20  38  29   12  39  29    0.000    0.000       0
+  0   4468 01:38:24.66   1.2900A   1.3905   0.2757  -0.3932  0.048  0.00   0.000      0.  0.273E+00  0.622E-02  0.251E-03  0.176E-04   40   6  39   22  35  28   11  39  29    0.000    0.000       0
+  0   4473 01:38:31.16   1.3000A   1.3873  -0.2867  -0.3723  0.048  0.00   0.000      0.  0.273E+00  0.626E-02  0.254E-03  0.177E-04   40   6   3   28  36   2   18   8  29    0.000    0.000       0
+  0   4477 01:38:36.36   1.3000A   1.3844  -0.3112  -0.3680  0.048  0.00   0.000      0.  0.273E+00  0.629E-02  0.259E-03  0.192E-04   41   7   6   28  36   4   17   8  29    0.000    0.000       0
+  0   4482 01:38:42.85   1.3000A   1.3892   0.3299  -0.3802  0.049  0.00   0.000      0.  0.274E+00  0.633E-02  0.263E-03  0.202E-04   41   7  10   21  35  28   17   9  29    0.000    0.000       0
+  0   4486 01:38:48.01   1.2900A   1.3947   0.3944  -0.4654  0.049  0.00   0.000      0.  0.274E+00  0.636E-02  0.263E-03  0.197E-04   41   7  14   20  33  29   18  30  29    0.000    0.000       0
+  0   4491 01:38:54.46   1.2900A   1.3981   0.4700  -0.4995  0.049  0.00   0.000      0.  0.274E+00  0.640E-02  0.262E-03  0.179E-04   41   7  18   20  34  29   17  30  29    0.000    0.000       0
+  0   4496 01:39:00.91   1.2900A   1.3995   0.4632  -0.5404  0.049  0.00   0.000      0.  0.274E+00  0.642E-02  0.261E-03  0.170E-04   41   7  22   19  34  29   17  31  29    0.000    0.000       0
+  0   4500 01:39:06.07   1.2900A   1.3985   0.4212  -0.5356  0.049  0.00   0.000      0.  0.273E+00  0.643E-02  0.261E-03  0.168E-04   41   7  25   19  34  29   16  31  29    0.000    0.000       0
+  0   4505 01:39:12.52   1.2900A   1.3976   0.3616  -0.4983  0.049  0.00   0.000      0.  0.273E+00  0.644E-02  0.259E-03  0.165E-04   32  37  27   18  35  29   15  31  29    0.000    0.000       0
+  0   4510 01:39:18.95   1.2800A   1.4019   0.3527  -0.4764  0.049  0.00   0.000      0.  0.273E+00  0.645E-02  0.256E-03  0.151E-04   32  37  31   17  35  29   18  27  29    0.000    0.000       0
+  0   4514 01:39:24.09   1.2900A   1.3988   0.3399  -0.4977  0.048  0.00   0.000      0.  0.273E+00  0.647E-02  0.259E-03  0.152E-04   32  37  34   17  35  29   17  27  29    0.000    0.000       0
+  0   4519 01:39:30.55   1.3000A   1.3873  -0.3500  -0.5046  0.048  0.00   0.000      0.  0.272E+00  0.651E-02  0.264E-03  0.161E-04   32  37  37   21   4  20   17  27  29    0.000    0.000       0
+  0   4524 01:39:37.02   1.2900A   1.3920  -0.4343  -0.4909  0.048  0.00   0.000      0.  0.272E+00  0.656E-02  0.270E-03  0.199E-04   31  36  39   20  18  29   16  27  29    0.000    0.000       0
+  0   4528 01:39:42.19   1.2800A   1.4025  -0.4536  -0.5447  0.048  0.00   0.000      0.  0.273E+00  0.660E-02  0.277E-03  0.241E-04   31  36   2   20  17  29   18  19  29    0.000    0.000       0
+  0   4533 01:39:48.62   1.2900A   1.4006  -0.4151  -0.5412  0.047  0.00   0.000      0.  0.273E+00  0.666E-02  0.287E-03  0.277E-04   31  36   6   19  17  29   17  19  29    0.000    0.000       0
+  0   4538 01:39:55.02   1.2800A   1.4010  -0.3921  -0.5056  0.047  0.00   0.000      0.  0.273E+00  0.672E-02  0.287E-03  0.276E-04   31  36   9   19  17  29   17  20  29    0.000    0.000       0
+  0   4542 01:40:00.16   1.2900A   1.3940  -0.3457  -0.4830  0.047  0.00   0.000      0.  0.274E+00  0.676E-02  0.291E-03  0.272E-04   31  36  12   19  17  29   16  20  29    0.000    0.000       0
+  0   4547 01:40:06.66   1.3100A   1.3777  -0.3892  -0.4452  0.047  0.00   0.000      0.  0.274E+00  0.680E-02  0.293E-03  0.268E-04   41   8  22   24  12  22   16  21  29    0.000    0.000       0
+  0   4552 01:40:13.19   1.3000A   1.3821  -0.3694  -0.4213  0.047  0.00   0.000      0.  0.274E+00  0.682E-02  0.291E-03  0.247E-04   39  32  37   24  11  24   15  21  29    0.000    0.000       0
+  0   4556 01:40:18.39   1.3000A   1.3858  -0.3738  -0.4632  0.048  0.00   0.000      0.  0.274E+00  0.683E-02  0.287E-03  0.218E-04   39  32   0   20  32  29   17  34  29    0.000    0.000       0
+  0   4561 01:40:24.87   1.2900A   1.3906  -0.4154  -0.4978  0.048  0.00   0.000      0.  0.275E+00  0.683E-02  0.279E-03  0.182E-04   39  32   4   19  32  29   17   6  29    0.000    0.000       0
+  0   4565 01:40:30.03   1.2900A   1.3955  -0.4048  -0.5438  0.048  0.00   0.000      0.  0.274E+00  0.682E-02  0.276E-03  0.181E-04   39  32   8   18  32  29   17   6  29    0.000    0.000       0
+  0   4570 01:40:36.48   1.2900A   1.3988  -0.3697  -0.6134  0.048  0.00   0.000      0.  0.274E+00  0.681E-02  0.274E-03  0.196E-04   39  32  12   17  32  29   17   7  29    0.000    0.000       0
+  0   4575 01:40:42.91   1.2900A   1.3993   0.3416  -0.6420  0.049  0.00   0.000      0.  0.274E+00  0.680E-02  0.271E-03  0.198E-04   39  32  16   23  17   3   16   7  29    0.000    0.000       0
+  0   4579 01:40:48.06   1.2900A   1.3990   0.3501  -0.6331  0.049  0.00   0.000      0.  0.274E+00  0.679E-02  0.269E-03  0.188E-04   39  32  19   23  18   5   15   7  29    0.000    0.000       0
+  0   4584 01:40:54.51   1.2900A   1.3941   0.3637  -0.5966  0.049  0.00   0.000      0.  0.274E+00  0.679E-02  0.267E-03  0.171E-04   39  32  23   23  18   7   14   7  29    0.000    0.000       0
+  0   4589 01:41:01.00   1.3000A   1.3872  -0.3437  -0.5575  0.049  0.00   0.000      0.  0.273E+00  0.678E-02  0.268E-03  0.164E-04   39  32  27   23  29  17   13   7  29    0.000    0.000       0
+  0   4593 01:41:06.20   1.3000A   1.3857  -0.3540  -0.5314  0.049  0.00   0.000      0.  0.273E+00  0.678E-02  0.268E-03  0.166E-04   31  36  12   28   6  15   12   7  29    0.000    0.000       0
+  0   4598 01:41:12.70   1.3000A   1.3828  -0.3489  -0.4976  0.049  0.00   0.000      0.  0.273E+00  0.679E-02  0.270E-03  0.179E-04   38  32  33   28   6  17   11   7  29    0.000    0.000       0
+  0   4603 01:41:19.19   1.2900A   1.3901  -0.3469  -0.4688  0.049  0.00   0.000      0.  0.273E+00  0.680E-02  0.271E-03  0.192E-04   30  36  18   28   5  19   10   7  29    0.000    0.000       0
+  0   4607 01:41:24.39   1.3000A   1.3839  -0.3369  -0.4432  0.048  0.00   0.000      0.  0.273E+00  0.681E-02  0.275E-03  0.202E-04   39  32   3   28   5  21    9   7  29    0.000    0.000       0
+  0   4612 01:41:30.89   1.3000A   1.3816   0.3635  -0.4311  0.048  0.00   0.000      0.  0.273E+00  0.683E-02  0.279E-03  0.203E-04   39  32   7   20  39  28   16   2  29    0.000    0.000       0
+  0   4616 01:41:36.12   1.3100A   1.3760   0.3614  -0.4282  0.048  0.00   0.000      0.  0.273E+00  0.685E-02  0.281E-03  0.198E-04   39  32  10   20   0  28   16   2  29    0.000    0.000       0
+  0   4621 01:41:42.67   1.3100A   1.3694   0.3650  -0.4214  0.048  0.00   0.000      0.  0.273E+00  0.689E-02  0.281E-03  0.187E-04   41  36  14   20   1  28   15   2  29    0.000    0.000       0
+  0   4626 01:41:49.23   1.3100A   1.3721  -0.3270  -0.4091  0.048  0.00   0.000      0.  0.273E+00  0.692E-02  0.286E-03  0.198E-04   41  36  18   22  37  15   14   2  29    0.000    0.000       0
+  0   4630 01:41:54.48   1.3100A   1.3735   0.3417  -0.3985  0.048  0.00   0.000      0.  0.274E+00  0.696E-02  0.289E-03  0.203E-04   39   8   3   20  39  29   14   2  29    0.000    0.000       0
+  0   4635 01:42:01.03   1.3100A   1.3782   0.3316  -0.4317  0.049  0.00   0.000      0.  0.274E+00  0.700E-02  0.291E-03  0.203E-04   39   8   7   20   0  29   18  37  29    0.000    0.000       0
+  0   4639 01:42:06.26   1.3000A   1.3796  -0.3561  -0.4396  0.049  0.00   0.000      0.  0.274E+00  0.703E-02  0.293E-03  0.214E-04   39   8  10   23  36  25   18  36  29    0.000    0.000       0
+  0   4644 01:42:12.78   1.3000A   1.3809  -0.3579  -0.4348  0.049  0.00   0.000      0.  0.274E+00  0.706E-02  0.297E-03  0.230E-04   39   8  14   23  36  27   17  36  29    0.000    0.000       0
+  0   4648 01:42:18.00   1.3100A   1.3785  -0.3339  -0.4556  0.049  0.00   0.000      0.  0.274E+00  0.708E-02  0.300E-03  0.230E-04   39   8  17   22  35  28   18   7  29    0.000    0.000       0
+  0   4653 01:42:24.52   1.3100A   1.3762   0.3680  -0.4831  0.049  0.00   0.000      0.  0.275E+00  0.709E-02  0.298E-03  0.208E-04   39   8  21   20  19  28   17   7  29    0.000    0.000       0
+  0   4658 01:42:31.07   1.3100A   1.3740   0.3410  -0.4756  0.049  0.00   0.000      0.  0.274E+00  0.709E-02  0.298E-03  0.195E-04   39   8  26   25  11   3   16   7  29    0.000    0.000       0
+  0   4662 01:42:36.31   1.3100A   1.3787   0.4113  -0.4604  0.049  0.00   0.000      0.  0.274E+00  0.708E-02  0.298E-03  0.189E-04   34  38  15   20  19  29   16   7  29    0.000    0.000       0
+  0   4667 01:42:42.83   1.3100A   1.3714   0.3561  -0.4578  0.049  0.00   0.000      0.  0.274E+00  0.705E-02  0.294E-03  0.171E-04   37  37  27   25  12   8   18  14  29    0.000    0.000       0
+  0   4671 01:42:48.07   1.3100A   1.3723   0.3406  -0.5156  0.049  0.00   0.000      0.  0.274E+00  0.702E-02  0.292E-03  0.158E-04   34  38  21   24  12   9   18  14  29    0.000    0.000       0
+  0   4676 01:42:54.55   1.2700A   1.4141   0.3743  -0.5423  0.048  0.00   0.000      0.  0.273E+00  0.699E-02  0.283E-03  0.146E-04   29  35  35   24  12  12   17  14  29    0.000    0.000       0
+  0   4681 01:43:00.77   1.2300A   1.4671   0.3454  -0.5612  0.048  0.00   0.000      0.  0.273E+00  0.697E-02  0.274E-03  0.131E-04   29  35  39   22   4  29   17  12  29    0.000    0.000       0
+  0   4686 01:43:06.81   1.2000A   1.5018   0.3355  -0.5722  0.048  0.00   0.000      0.  0.273E+00  0.696E-02  0.267E-03  0.131E-04   29  35   2   22   5  30   17  11  29    0.000    0.000       0
+  0   4691 01:43:12.90   1.2300A   1.4600   0.3548  -0.5869  0.048  0.00   0.000      0.  0.273E+00  0.695E-02  0.275E-03  0.146E-04   29  35   5   22   5  32   16  11  29    0.000    0.000       0
+  0   4696 01:43:19.24   1.2900A   1.3954   0.3263  -0.5731  0.048  0.00   0.000      0.  0.273E+00  0.697E-02  0.294E-03  0.196E-04   34  38   1   22   5  33   15  11  29    0.000    0.000       0
+  0   4700 01:43:24.41   1.2900A   1.3906   0.3137  -0.5554  0.048  0.00   0.000      0.  0.274E+00  0.699E-02  0.298E-03  0.221E-04   29  36  11   22   5  35   14  11  29    0.000    0.000       0
+  0   4705 01:43:30.84   1.2900A   1.4004   0.3020  -0.5329  0.048  0.00   0.000      0.  0.274E+00  0.703E-02  0.299E-03  0.221E-04   29  36  14   27  39  14   13  11  29    0.000    0.000       0
+  0   4709 01:43:36.01   1.2900A   1.3910   0.3009  -0.5123  0.048  0.00   0.000      0.  0.274E+00  0.705E-02  0.298E-03  0.204E-04   33  13  35   24  15  32   12  11  29    0.000    0.000       0
+  0   4714 01:43:42.47   1.3100A   1.3783  -0.3136  -0.4821  0.048  0.00   0.000      0.  0.274E+00  0.706E-02  0.300E-03  0.192E-04   33  13  38   20  17  28   11  11  29    0.000    0.000       0
+  0   4719 01:43:48.99   1.3000A   1.3803  -0.3056  -0.4537  0.048  0.00   0.000      0.  0.274E+00  0.706E-02  0.300E-03  0.191E-04   41  30  13   20  17  29   10  11  29    0.000    0.000       0
+  0   4723 01:43:54.21   1.3000A   1.3823  -0.4077  -0.4308  0.048  0.00   0.000      0.  0.274E+00  0.705E-02  0.301E-03  0.188E-04   40  30  16   20  17  29    9  11  29    0.000    0.000       0
+  0   4728 01:44:00.71   1.3000A   1.3822  -0.3662  -0.4589  0.048  0.00   0.000      0.  0.273E+00  0.703E-02  0.299E-03  0.173E-04   32  34  27   20  16  29   17  20  29    0.000    0.000       0
+  0   4733 01:44:07.22   1.3000A   1.3810  -0.3552  -0.5014  0.048  0.00   0.000      0.  0.273E+00  0.699E-02  0.296E-03  0.161E-04   36  12   2   19  16  29   17  20  29    0.000    0.000       0
+  0   4737 01:44:12.42   1.3000A   1.3814  -0.3357  -0.5105  0.048  0.00   0.000      0.  0.273E+00  0.695E-02  0.294E-03  0.153E-04   36  12   5   19  16  29   16  20  29    0.000    0.000       0
+  0   4742 01:44:18.94   1.3100A   1.3783  -0.3660  -0.5241  0.048  0.00   0.000      0.  0.273E+00  0.691E-02  0.292E-03  0.148E-04   36  12   9   23   4  12   16  21  29    0.000    0.000       0
+  0   4746 01:44:24.14   1.3000A   1.3838  -0.3608  -0.5245  0.048  0.00   0.000      0.  0.273E+00  0.688E-02  0.289E-03  0.158E-04   36  12  13   23   4  14   15  21  29    0.000    0.000       0
+  0   4751 01:44:30.64   1.3000A   1.3872   0.3883  -0.5146  0.047  0.00   0.000      0.  0.273E+00  0.686E-02  0.289E-03  0.179E-04   37   2  15   22  14  22   14  21  29    0.000    0.000       0
+  0   4756 01:44:37.10   1.2900A   1.3954   0.3948  -0.5023  0.047  0.00   0.000      0.  0.273E+00  0.687E-02  0.288E-03  0.205E-04   37   2  18   22  14  24   13  21  29    0.000    0.000       0
+  0   4760 01:44:42.26   1.2900A   1.3995  -0.3782  -0.4955  0.047  0.00   0.000      0.  0.273E+00  0.689E-02  0.289E-03  0.230E-04   37   2  21   23   1  20   16  25  29    0.000    0.000       0
+  0   4765 01:44:48.71   1.2900A   1.3999   0.3982  -0.4850  0.047  0.00   0.000      0.  0.274E+00  0.693E-02  0.290E-03  0.255E-04   37   2  25   20  22  28   15  25  29    0.000    0.000       0
+  0   4770 01:44:55.16   1.2900A   1.3937   0.3791  -0.4930  0.047  0.00   0.000      0.  0.274E+00  0.696E-02  0.288E-03  0.238E-04   37   2  29   20  23  28   17  15  29    0.000    0.000       0
+  0   4774 01:45:00.32   1.2900A   1.3901   0.3741  -0.6105  0.048  0.00   0.000      0.  0.274E+00  0.697E-02  0.290E-03  0.221E-04   37   2  32   20  21  29   17  15  29    0.000    0.000       0
+  0   4779 01:45:06.80   1.2900A   1.3911   0.3633  -0.6516  0.048  0.00   0.000      0.  0.275E+00  0.697E-02  0.291E-03  0.216E-04   37   3  35   20  22  29   16  16  29    0.000    0.000       0
+  0   4784 01:45:13.26   1.2900A   1.3935   0.3481  -0.6493  0.049  0.00   0.000      0.  0.275E+00  0.694E-02  0.289E-03  0.206E-04   37   3  39   23  24   2   15  16  29    0.000    0.000       0
+  0   4788 01:45:18.42   1.2900A   1.3953   0.3360  -0.6190  0.049  0.00   0.000      0.  0.274E+00  0.691E-02  0.286E-03  0.190E-04   37   3   2   23  25   3   14  16  29    0.000    0.000       0
+  0   4793 01:45:24.86   1.2800A   1.4025   0.3647  -0.5824  0.050  0.00   0.000      0.  0.274E+00  0.685E-02  0.279E-03  0.178E-04   37   3   6   22  24   3   13  16  29    0.000    0.000       0
+  0   4798 01:45:31.26   1.2800A   1.4078   0.3541  -0.5459  0.050  0.00   0.000      0.  0.274E+00  0.678E-02  0.276E-03  0.180E-04   37   3  10   22  25   5   12  16  29    0.000    0.000       0
+  0   4802 01:45:36.38   1.2800A   1.4064   0.3536  -0.5655  0.050  0.00   0.000      0.  0.273E+00  0.671E-02  0.274E-03  0.186E-04   37   3  13   22  26   6   17   9  29    0.000    0.000       0
+  0   4807 01:45:42.80   1.2900A   1.4007   0.3456  -0.5413  0.050  0.00   0.000      0.  0.273E+00  0.662E-02  0.271E-03  0.176E-04   37   3  17   22  26   8   16   9  29    0.000    0.000       0
+  0   4812 01:45:49.25   1.2900A   1.3948   0.3240  -0.5092  0.050  0.00   0.000      0.  0.273E+00  0.654E-02  0.266E-03  0.169E-04   35   2  25   22  27  10   15   9  29    0.000    0.000       0
+  0   4816 01:45:54.42   1.2900A   1.3958  -0.3106  -0.4865  0.049  0.00   0.000      0.  0.273E+00  0.650E-02  0.265E-03  0.174E-04   35   2  28   21  27  36   14   9  29    0.000    0.000       0
+  0   4821 01:46:00.87   1.2900A   1.3933  -0.2929  -0.4781  0.049  0.00   0.000      0.  0.273E+00  0.646E-02  0.262E-03  0.184E-04   36  12  33   21  21  24   10  12  28    0.000    0.000       0
+  0   4825 01:46:06.03   1.2900A   1.3948  -0.3022  -0.4708  0.048  0.00   0.000      0.  0.273E+00  0.644E-02  0.262E-03  0.195E-04   36  12  36   23  38  16    9  12  28    0.000    0.000       0
+  0   4830 01:46:12.48   1.2900A   1.3992  -0.2967  -0.4592  0.047  0.00   0.000      0.  0.273E+00  0.644E-02  0.263E-03  0.207E-04   36  12   0   23  24   3    8  12  28    0.000    0.000       0
+  0   4835 01:46:18.93   1.2900A   1.3983  -0.2972  -0.4432  0.047  0.00   0.000      0.  0.273E+00  0.646E-02  0.266E-03  0.216E-04   36  12   4   23  24   5    7  12  28    0.000    0.000       0
+  0   4839 01:46:24.07   1.2900A   1.3977   0.3075  -0.4229  0.047  0.00   0.000      0.  0.273E+00  0.648E-02  0.268E-03  0.223E-04   31   5  12   27   0  19    7  13  28    0.000    0.000       0
+  0   4844 01:46:30.47   1.2800A   1.4057  -0.2967  -0.4056  0.047  0.00   0.000      0.  0.273E+00  0.651E-02  0.264E-03  0.212E-04   31   5  16   24  36  26    6  13  28    0.000    0.000       0
+  0   4849 01:46:36.82   1.2600A   1.4274  -0.3735  -0.4036  0.047  0.00   0.000      0.  0.274E+00  0.655E-02  0.257E-03  0.186E-04   33   4  19   22  39  28   13   2  29    0.000    0.000       0
+  0   4854 01:46:43.10   1.2500A   1.4431   0.3248  -0.3934  0.047  0.00   0.000      0.  0.274E+00  0.659E-02  0.255E-03  0.175E-04   33   4  23   21  24  28   13   3  29    0.000    0.000       0
+  0   4858 01:46:48.10   1.2500A   1.4424   0.3725  -0.3910  0.047  0.00   0.000      0.  0.274E+00  0.662E-02  0.255E-03  0.166E-04   33   4  26   20   7  29   11   2  28    0.000    0.000       0
+  0   4863 01:46:54.38   1.2600A   1.4332   0.4035  -0.3996  0.048  0.00   0.000      0.  0.274E+00  0.666E-02  0.258E-03  0.157E-04   33   4  29   20   7  29   17   3  29    0.000    0.000       0
+  0   4868 01:47:00.68   1.2600A   1.4244   0.3686  -0.4264  0.049  0.00   0.000      0.  0.274E+00  0.669E-02  0.261E-03  0.161E-04   33   4  33   19   7  29   17   3  29    0.000    0.000       0
+  0   4873 01:47:07.08   1.2900A   1.3984   0.3444  -0.4598  0.049  0.00   0.000      0.  0.274E+00  0.669E-02  0.264E-03  0.168E-04   33   4  36   19   7  29   18  32  29    0.000    0.000       0
+  0   4877 01:47:12.22   1.2800A   1.4089  -0.3492  -0.4966  0.049  0.00   0.000      0.  0.273E+00  0.669E-02  0.260E-03  0.167E-04   33   3   2   21   8  28   18  32  29    0.000    0.000       0
+  0   4882 01:47:18.59   1.2700A   1.4168  -0.3421  -0.5218  0.049  0.00   0.000      0.  0.273E+00  0.668E-02  0.256E-03  0.164E-04   33   3   6   20   6  28   17  31  29    0.000    0.000       0
+  0   4887 01:47:24.91   1.2600A   1.4262  -0.4813  -0.5079  0.050  0.00   0.000      0.  0.273E+00  0.667E-02  0.251E-03  0.157E-04   33   2   9   20   5  28   16  31  29    0.000    0.000       0
+  0   4892 01:47:31.18   1.2400A   1.4497  -0.4678  -0.4859  0.050  0.00   0.000      0.  0.273E+00  0.666E-02  0.248E-03  0.162E-04   33   2  13   20   3  28   15  31  29    0.000    0.000       0
+  0   4896 01:47:36.13   1.2300A   1.4629  -0.4287  -0.4775  0.050  0.00   0.000      0.  0.273E+00  0.666E-02  0.248E-03  0.172E-04   33   2  16   20   3  28   15  31  29    0.000    0.000       0
+  0   4901 01:47:42.29   1.2300A   1.4644  -0.3905  -0.4613  0.050  0.00   0.000      0.  0.273E+00  0.664E-02  0.249E-03  0.173E-04   33   2  20   20   2  28   14  31  29    0.000    0.000       0
+  0   4906 01:47:48.46   1.2400A   1.4562  -0.3538  -0.4454  0.050  0.00   0.000      0.  0.273E+00  0.663E-02  0.252E-03  0.165E-04   33   2  23   20   1  29   13  31  29    0.000    0.000       0
+  0   4911 01:47:54.69   1.2500A   1.4362  -0.3373  -0.4361  0.049  0.00   0.000      0.  0.273E+00  0.661E-02  0.254E-03  0.162E-04   33   2  27   23   8   6   18  11  29    0.000    0.000       0
+  0   4916 01:48:01.02   1.2700A   1.4184  -0.3509  -0.4672  0.049  0.00   0.000      0.  0.273E+00  0.659E-02  0.259E-03  0.163E-04   33   1  32   20   0  29   18  12  29    0.000    0.000       0
+  0   4920 01:48:06.10   1.2700A   1.4168  -0.3497  -0.4970  0.049  0.00   0.000      0.  0.273E+00  0.658E-02  0.258E-03  0.159E-04   33   1  35   23   7  10   17  12  29    0.000    0.000       0
+  0   4925 01:48:12.47   1.2800A   1.4078  -0.3588  -0.4832  0.048  0.00   0.000      0.  0.273E+00  0.658E-02  0.258E-03  0.152E-04   33   1  38   23   7  12   16  12  29    0.000    0.000       0
+  0   4930 01:48:18.91   1.2900A   1.3962  -0.3440  -0.4534  0.048  0.00   0.000      0.  0.273E+00  0.657E-02  0.259E-03  0.149E-04   33   0   2   23   6  14   15  12  29    0.000    0.000       0
+  0   4934 01:48:24.08   1.2900A   1.3921  -0.3369  -0.4246  0.048  0.00   0.000      0.  0.273E+00  0.658E-02  0.261E-03  0.156E-04   33   0   5   22   7  14   14  12  29    0.000    0.000       0
+  0   4939 01:48:30.56   1.3000A   1.3888  -0.3107  -0.4004  0.048  0.00   0.000      0.  0.273E+00  0.658E-02  0.263E-03  0.152E-04   40   4  34   23   6  18   18   4  29    0.000    0.000       0
+  0   4944 01:48:37.02   1.2900A   1.3921  -0.3110  -0.3951  0.047  0.00   0.000      0.  0.273E+00  0.659E-02  0.263E-03  0.149E-04   41   4  38   23   5  20   17   4  29    0.000    0.000       0
+  0   4948 01:48:42.19   1.2900A   1.3903  -0.3631  -0.3807  0.047  0.00   0.000      0.  0.273E+00  0.660E-02  0.267E-03  0.163E-04   41   4   1   20  20  29   17   3  29    0.000    0.000       0
+  0   4953 01:48:48.67   1.3000A   1.3900  -0.3915  -0.4036  0.047  0.00   0.000      0.  0.273E+00  0.661E-02  0.276E-03  0.199E-04   41   4   5   20  20  29   18  23  29    0.000    0.000       0
+  0   4958 01:48:55.17   1.3000A   1.3830  -0.3803  -0.4454  0.047  0.00   0.000      0.  0.273E+00  0.663E-02  0.279E-03  0.207E-04   41   4   9   20  19  29   17  23  29    0.000    0.000       0
+  0   4962 01:49:00.41   1.3100A   1.3737  -0.3582  -0.4922  0.047  0.00   0.000      0.  0.273E+00  0.664E-02  0.281E-03  0.201E-04   41   4  12   20  19  29   17  24  29    0.000    0.000       0
+  0   4967 01:49:07.00   1.3200A   1.3661   0.2997  -0.5018  0.048  0.00   0.000      0.  0.273E+00  0.664E-02  0.281E-03  0.180E-04   36   5  25   20  33  29   16  24  29    0.000    0.000       0
+  0   4971 01:49:12.29   1.3200A   1.3625   0.2900  -0.4867  0.048  0.00   0.000      0.  0.273E+00  0.664E-02  0.279E-03  0.167E-04   36   5  28   26  37  17   16  24  29    0.000    0.000       0
+  0   4976 01:49:18.93   1.3200A   1.3597  -0.3446  -0.4670  0.048  0.00   0.000      0.  0.273E+00  0.663E-02  0.280E-03  0.168E-04   33   4  31   20   8  29   15  25  29    0.000    0.000       0
+  0   4980 01:49:24.19   1.3100A   1.3708  -0.3151  -0.4452  0.049  0.00   0.000      0.  0.273E+00  0.662E-02  0.277E-03  0.171E-04   33   4  35   20   8  29   14  25  29    0.000    0.000       0
+  0   4985 01:49:30.71   1.3000A   1.3867  -0.2902  -0.4239  0.049  0.00   0.000      0.  0.273E+00  0.661E-02  0.273E-03  0.158E-04   33   4  39   22  19  20   14  26  29    0.000    0.000       0
+  0   4990 01:49:37.17   1.2900A   1.3949  -0.3201  -0.4010  0.049  0.00   0.000      0.  0.273E+00  0.660E-02  0.269E-03  0.147E-04   33   4   2   22  18  25   13  27  29    0.000    0.000       0
+  0   4994 01:49:42.30   1.2900A   1.3974  -0.3505  -0.3926  0.049  0.00   0.000      0.  0.273E+00  0.660E-02  0.269E-03  0.144E-04   33   4   5   22  18  26   13  27  29    0.000    0.000       0
+  0   4999 01:49:48.73   1.2900A   1.3959  -0.3501  -0.3790  0.049  0.00   0.000      0.  0.273E+00  0.661E-02  0.271E-03  0.160E-04   33   4   9   22  18  28   12  27  29    0.000    0.000       0
+  0   5004 01:49:55.22   1.3000A   1.3821  -0.3498  -0.3722  0.049  0.00   0.000      0.  0.273E+00  0.662E-02  0.277E-03  0.177E-04   33   5  12   22  19  28   12  28  29    0.000    0.000       0
+  0   5008 01:50:00.42   1.3000A   1.3860   0.3119  -0.3697  0.049  0.00   0.000      0.  0.273E+00  0.664E-02  0.277E-03  0.177E-04   33   5  15   22  33  16   13  29  28    0.000    0.000       0
+  0   5013 01:50:06.92   1.3000A   1.3879   0.3322  -0.3853  0.049  0.00   0.000      0.  0.273E+00  0.665E-02  0.280E-03  0.171E-04   33   5  19   22  35  19   12  29  28    0.000    0.000       0
+  0   5017 01:50:12.12   1.3000A   1.3823  -0.4653  -0.5362  0.049  0.00   0.000      0.  0.273E+00  0.665E-02  0.281E-03  0.164E-04   33   5  22   20  21  29   18  23  29    0.000    0.000       0
+  0   5022 01:50:18.66   1.3100A   1.3698  -0.4423  -0.6208  0.050  0.00   0.000      0.  0.273E+00  0.661E-02  0.283E-03  0.160E-04   33   5  26   19  21  29   17  23  29    0.000    0.000       0
+  0   5027 01:50:25.29   1.3300A   1.3519  -0.3992  -0.6260  0.050  0.00   0.000      0.  0.272E+00  0.657E-02  0.285E-03  0.160E-04   39  37  11   19  21  29   17  24  29    0.000    0.000       0
+  0   5031 01:50:30.61   1.3300A   1.3523  -0.3454  -0.5967  0.050  0.00   0.000      0.  0.272E+00  0.653E-02  0.285E-03  0.166E-04   39  38  14   18  21  29   16  24  29    0.000    0.000       0
+  0   5036 01:50:37.26   1.3300A   1.3559  -0.3267  -0.5502  0.049  0.00   0.000      0.  0.272E+00  0.650E-02  0.287E-03  0.194E-04   39  38  18   29  10   8   15  24  29    0.000    0.000       0
+  0   5040 01:50:42.58   1.3300A   1.3573  -0.3155  -0.5194  0.049  0.00   0.000      0.  0.272E+00  0.649E-02  0.289E-03  0.212E-04   39  38  21   29  10  10   14  24  29    0.000    0.000       0
+  0   5045 01:50:49.19   1.3200A   1.3595  -0.3081  -0.4864  0.049  0.00   0.000      0.  0.272E+00  0.648E-02  0.290E-03  0.215E-04   39  38  25   29  10  14   13  24  29    0.000    0.000       0
+  0   5049 01:50:54.47   1.3200A   1.3598  -0.3053  -0.4654  0.048  0.00   0.000      0.  0.272E+00  0.649E-02  0.294E-03  0.225E-04   39  38  29   28  14  14   12  24  29    0.000    0.000       0
+  0   5054 01:51:01.07   1.3200A   1.3620  -0.3182  -0.4419  0.048  0.00   0.000      0.  0.273E+00  0.650E-02  0.299E-03  0.228E-04   39  38  33   21  18  28   11  24  29    0.000    0.000       0
+  0   5058 01:51:06.35   1.3200A   1.3644   0.3471  -0.4202  0.048  0.00   0.000      0.  0.273E+00  0.651E-02  0.298E-03  0.210E-04   39  38  36   20  33  29   10  24  29    0.000    0.000       0
+  0   5063 01:51:12.95   1.3200A   1.3657   0.3742  -0.4598  0.048  0.00   0.000      0.  0.273E+00  0.652E-02  0.296E-03  0.182E-04   39  38   0   20  33  29   18  21  29    0.000    0.000       0
+  0   5067 01:51:18.23   1.3200A   1.3657  -0.3359  -0.4932  0.049  0.00   0.000      0.  0.273E+00  0.652E-02  0.296E-03  0.177E-04   39  38   3   21  30  28   17  21  29    0.000    0.000       0
+  0   5072 01:51:24.81   1.3100A   1.3693   0.3275  -0.4874  0.049  0.00   0.000      0.  0.273E+00  0.652E-02  0.294E-03  0.172E-04   41  36   6   22  11  24   16  21  29    0.000    0.000       0
+  0   5076 01:51:30.06   1.3100A   1.3729   0.3500  -0.5108  0.049  0.00   0.000      0.  0.273E+00  0.653E-02  0.293E-03  0.167E-04   41  36   9   20  18  28   17  20  29    0.000    0.000       0
+  0   5081 01:51:36.61   1.3100A   1.3759   0.3747  -0.5025  0.049  0.00   0.000      0.  0.273E+00  0.654E-02  0.293E-03  0.164E-04   41  36  13   20  20  28   16  20  29    0.000    0.000       0
+  0   5086 01:51:43.16   1.3100A   1.3785  -0.3216  -0.4665  0.049  0.00   0.000      0.  0.273E+00  0.655E-02  0.291E-03  0.166E-04   41  36  17   22  17   2   15  20  29    0.000    0.000       0
+  0   5090 01:51:48.38   1.3000A   1.3809   0.3679  -0.5077  0.049  0.00   0.000      0.  0.273E+00  0.655E-02  0.286E-03  0.170E-04   41  36  20   21   9  28   18  16  29    0.000    0.000       0
+  0   5095 01:51:54.88   1.3000A   1.3836  -0.3635  -0.5182  0.049  0.00   0.000      0.  0.273E+00  0.656E-02  0.286E-03  0.181E-04   41  36  24   20   3  28   17  16  29    0.000    0.000       0
+  0   5099 01:52:00.08   1.3000A   1.3852  -0.3724  -0.5139  0.049  0.00   0.000      0.  0.272E+00  0.656E-02  0.288E-03  0.193E-04   41  36  27   21   2  31   17  15  29    0.000    0.000       0
+  0   5104 01:52:06.58   1.3000A   1.3877  -0.5080  -0.5385  0.049  0.00   0.000      0.  0.272E+00  0.655E-02  0.290E-03  0.210E-04   41  36  31   20   2  29   17   5  29    0.000    0.000       0
+  0   5109 01:52:13.08   1.3000A   1.3888  -0.4234  -0.5703  0.049  0.00   0.000      0.  0.272E+00  0.655E-02  0.293E-03  0.234E-04   41  36  35   20   2  29   17   5  29    0.000    0.000       0
+  0   5113 01:52:18.28   1.3000A   1.3880  -0.3742  -0.5668  0.049  0.00   0.000      0.  0.273E+00  0.656E-02  0.296E-03  0.260E-04   41  36  38   19   2  29   16   5  29    0.000    0.000       0
+  0   5118 01:52:24.78   1.3000A   1.3854  -0.3184  -0.5323  0.049  0.00   0.000      0.  0.273E+00  0.657E-02  0.296E-03  0.267E-04   41  36   2   18   2  29   15   5  29    0.000    0.000       0
+  0   5123 01:52:31.28   1.3000A   1.3799   0.3734  -0.4933  0.049  0.00   0.000      0.  0.273E+00  0.658E-02  0.292E-03  0.251E-04   41  36   6   20  37  29   14   5  29    0.000    0.000       0
+  0   5127 01:52:36.52   1.3100A   1.3745   0.4131  -0.4683  0.049  0.00   0.000      0.  0.273E+00  0.659E-02  0.292E-03  0.239E-04   41  36   9   20  37  29   14   6  29    0.000    0.000       0
+  0   5132 01:52:43.10   1.3200A   1.3664   0.3741  -0.5087  0.049  0.00   0.000      0.  0.273E+00  0.660E-02  0.292E-03  0.222E-04   41  36  13   19  37  29   17  33  29    0.000    0.000       0
+  0   5136 01:52:48.38   1.3200A   1.3588  -0.3919  -0.5160  0.049  0.00   0.000      0.  0.273E+00  0.661E-02  0.289E-03  0.199E-04   41  36  16   20   5  28   17  34  29    0.000    0.000       0
+  0   5141 01:52:55.00   1.3200A   1.3586  -0.3323  -0.5060  0.050  0.00   0.000      0.  0.273E+00  0.662E-02  0.289E-03  0.179E-04   41  20  25   26  38  24   16  34  29    0.000    0.000       0
+  0   5145 01:53:00.29   1.3200A   1.3633  -0.3251  -0.4836  0.050  0.00   0.000      0.  0.273E+00  0.662E-02  0.289E-03  0.174E-04   41  20  28   26  38  26   15  34  29    0.000    0.000       0
+  0   5150 01:53:06.88   1.3100A   1.3691  -0.3123  -0.4587  0.050  0.00   0.000      0.  0.273E+00  0.663E-02  0.285E-03  0.157E-04   41  20  32   25  38  27   14  35  29    0.000    0.000       0
+  0   5154 01:53:12.14   1.3100A   1.3730  -0.3161  -0.4342  0.050  0.00   0.000      0.  0.273E+00  0.663E-02  0.284E-03  0.157E-04   41  20  35   22   0  14   13  35  29    0.000    0.000       0
+  0   5159 01:53:18.69   1.3100A   1.3747  -0.3064  -0.4109  0.050  0.00   0.000      0.  0.273E+00  0.665E-02  0.285E-03  0.171E-04   41  20  39   24  38  30   17  25  29    0.000    0.000       0
+  0   5164 01:53:25.23   1.3100A   1.3760   0.3215  -0.4111  0.049  0.00   0.000      0.  0.273E+00  0.668E-02  0.284E-03  0.170E-04   40  36   0   22   6  36   16  25  29    0.000    0.000       0
+  0   5168 01:53:30.44   1.3100A   1.3781   0.3173  -0.4121  0.049  0.00   0.000      0.  0.273E+00  0.672E-02  0.285E-03  0.177E-04   41  20   5   23   8   0   15  24  29    0.000    0.000       0
+  0   5173 01:53:36.94   1.3000A   1.3843   0.3713  -0.4101  0.050  0.00   0.000      0.  0.273E+00  0.677E-02  0.293E-03  0.211E-04   41  20   9   20  24  28   15  24  29    0.000    0.000       0
+  0   5177 01:53:42.14   1.3000A   1.3854  -0.4034  -0.4357  0.050  0.00   0.000      0.  0.273E+00  0.682E-02  0.300E-03  0.233E-04   41  20  12   20  17  29   18  20  29    0.000    0.000       0
+  0   5182 01:53:48.64   1.3000A   1.3876   0.4195  -0.5128  0.050  0.00   0.000      0.  0.274E+00  0.686E-02  0.308E-03  0.249E-04   41  20  16   20  24  29   18  20  29    0.000    0.000       0
+  0   5187 01:53:55.13   1.3000A   1.3896   0.4098  -0.5485  0.050  0.00   0.000      0.  0.274E+00  0.689E-02  0.309E-03  0.240E-04   41  18  20   20  25  29   17  20  29    0.000    0.000       0
+  0   5191 01:54:00.32   1.3000A   1.3897   0.3436  -0.5420  0.050  0.00   0.000      0.  0.274E+00  0.690E-02  0.306E-03  0.217E-04   41  18  23   19  25  29   17  21  29    0.000    0.000       0
+  0   5196 01:54:06.81   1.3000A   1.3884   0.3388  -0.5466  0.050  0.00   0.000      0.  0.274E+00  0.690E-02  0.303E-03  0.193E-04   41  18  27   20  19  28   17   8  29    0.000    0.000       0
+  0   5200 01:54:12.01   1.3000A   1.3858   0.3372  -0.5767  0.050  0.00   0.000      0.  0.274E+00  0.690E-02  0.303E-03  0.190E-04   41  18  30   20  19  28   17   8  29    0.000    0.000       0
+  0   5205 01:54:18.51   1.3000A   1.3837  -0.3237  -0.5819  0.050  0.00   0.000      0.  0.273E+00  0.690E-02  0.303E-03  0.193E-04   41  37  32   22  18  24   16   7  29    0.000    0.000       0
+  0   5210 01:54:25.01   1.3000A   1.3857  -0.3727  -0.5497  0.051  0.00   0.000      0.  0.273E+00  0.688E-02  0.303E-03  0.189E-04   40  37  35   22  17  25   15   7  29    0.000    0.000       0
+  0   5214 01:54:30.19   1.3000A   1.3887  -0.3910  -0.5174  0.051  0.00   0.000      0.  0.273E+00  0.686E-02  0.304E-03  0.199E-04   41  37  39   22  17  26   14   7  29    0.000    0.000       0
+  0   5219 01:54:36.66   1.3000A   1.3887  -0.3819  -0.5072  0.051  0.00   0.000      0.  0.273E+00  0.684E-02  0.306E-03  0.204E-04   41  37   3   22  17  28   17  36  29    0.000    0.000       0
+  0   5224 01:54:43.11   1.2900A   1.3913  -0.4225  -0.4839  0.051  0.00   0.000      0.  0.273E+00  0.682E-02  0.303E-03  0.201E-04   40  37   6   21  18  28   17  15  29    0.000    0.000       0
+  0   5228 01:54:48.28   1.3000A   1.3892  -0.4607  -0.4725  0.051  0.00   0.000      0.  0.273E+00  0.683E-02  0.306E-03  0.202E-04   41  37  10   20  18  28   17  14  29    0.000    0.000       0
+  0   5233 01:54:54.75   1.3000A   1.3897  -0.4107  -0.4587  0.051  0.00   0.000      0.  0.273E+00  0.684E-02  0.308E-03  0.214E-04   40  37  13   20  17  28   16  14  29    0.000    0.000       0
+  0   5238 01:55:01.21   1.3000A   1.3892  -0.4679  -0.4381  0.051  0.00   0.000      0.  0.274E+00  0.685E-02  0.311E-03  0.236E-04   33  25   8   20  18  29   15  14  29    0.000    0.000       0
+  0   5242 01:55:06.39   1.3000A   1.3861  -0.4336  -0.4260  0.051  0.00   0.000      0.  0.274E+00  0.686E-02  0.312E-03  0.239E-04   33  25  11   20  18  29   15  14  29    0.000    0.000       0
+  0   5247 01:55:12.91   1.3100A   1.3766  -0.4245  -0.4669  0.052  0.00   0.000      0.  0.274E+00  0.685E-02  0.313E-03  0.232E-04   39  38  24   22  17  24   18  22  29    0.000    0.000       0
+  0   5251 01:55:18.15   1.3100A   1.3755  -0.4026  -0.5021  0.052  0.00   0.000      0.  0.274E+00  0.683E-02  0.309E-03  0.212E-04   39  38  27   22  16  25   18   2  29    0.000    0.000       0
+  0   5256 01:55:24.70   1.3100A   1.3731  -0.3782  -0.5841  0.052  0.00   0.000      0.  0.274E+00  0.680E-02  0.305E-03  0.193E-04   39  38  31   22  16  10   17   2  29    0.000    0.000       0
+  0   5261 01:55:31.23   1.3000A   1.3836  -0.3596  -0.5776  0.051  0.00   0.000      0.  0.274E+00  0.677E-02  0.299E-03  0.178E-04   27   4  23   22  16  12   16   2  29    0.000    0.000       0
+  0   5265 01:55:36.47   1.3100A   1.3750  -0.3313  -0.5410  0.051  0.00   0.000      0.  0.273E+00  0.676E-02  0.298E-03  0.167E-04   27   4  26   22  16  15   15   2  29    0.000    0.000       0
+  0   5270 01:55:43.04   1.3100A   1.3720  -0.3416  -0.4968  0.051  0.00   0.000      0.  0.273E+00  0.675E-02  0.298E-03  0.167E-04   41  39   2   22  16  18   14   3  29    0.000    0.000       0
+  0   5274 01:55:48.28   1.3100A   1.3749   0.3321  -0.4719  0.050  0.00   0.000      0.  0.273E+00  0.675E-02  0.300E-03  0.181E-04   40  39   5   21  18  23   18  30  29    0.000    0.000       0
+  0   5279 01:55:54.83   1.3100A   1.3769   0.3842  -0.4991  0.050  0.00   0.000      0.  0.273E+00  0.676E-02  0.300E-03  0.197E-04   40  39   9   21  18  25   17  30  29    0.000    0.000       0
+  0   5283 01:56:00.07   1.3100A   1.3767   0.3413  -0.5061  0.050  0.00   0.000      0.  0.273E+00  0.678E-02  0.300E-03  0.198E-04   40  39  12   21  19  27   17  29  29    0.000    0.000       0
+  0   5288 01:56:06.62   1.3100A   1.3748  -0.3861  -0.5015  0.051  0.00   0.000      0.  0.274E+00  0.682E-02  0.304E-03  0.213E-04   40  39  16   22  17  28   16  29  29    0.000    0.000       0
+  0   5293 01:56:13.17   1.3100A   1.3702  -0.4441  -0.4878  0.051  0.00   0.000      0.  0.274E+00  0.685E-02  0.308E-03  0.238E-04   40  39  20   22  16  31   15  29  29    0.000    0.000       0
+  0   5297 01:56:18.44   1.3100A   1.3705  -0.4544  -0.4789  0.051  0.00   0.000      0.  0.274E+00  0.687E-02  0.311E-03  0.256E-04   40  16  12   22  16  33   15  28  29    0.000    0.000       0
+  0   5302 01:56:24.99   1.3100A   1.3739  -0.4217  -0.5038  0.051  0.00   0.000      0.  0.274E+00  0.688E-02  0.312E-03  0.250E-04   41  16  16   22  15  35   17  15  29    0.000    0.000       0
+  0   5306 01:56:30.23   1.3100A   1.3753  -0.3629  -0.5261  0.051  0.00   0.000      0.  0.274E+00  0.688E-02  0.309E-03  0.231E-04   41  16  19   22  14  37   17  14  29    0.000    0.000       0
+  0   5311 01:56:36.78   1.3100A   1.3741   0.4305  -0.5104  0.051  0.00   0.000      0.  0.274E+00  0.687E-02  0.304E-03  0.218E-04   41  16  23   20  14  28   16  14  29    0.000    0.000       0
+  0   5315 01:56:42.02   1.3100A   1.3766   0.3697  -0.4888  0.051  0.00   0.000      0.  0.274E+00  0.684E-02  0.302E-03  0.206E-04   41  17  26   20  12  29   18   9  29    0.000    0.000       0
+  0   5320 01:56:48.56   1.3100A   1.3792   0.3595  -0.5819  0.051  0.00   0.000      0.  0.274E+00  0.681E-02  0.297E-03  0.189E-04   41  17  30   19  12  29   17   9  29    0.000    0.000       0
+  0   5325 01:56:55.07   1.3000A   1.3806   0.3447  -0.6041  0.052  0.00   0.000      0.  0.273E+00  0.676E-02  0.288E-03  0.176E-04   41  17  34   18  12  29   16   9  29    0.000    0.000       0
+  0   5329 01:57:00.27   1.3000A   1.3831  -0.3119  -0.5919  0.052  0.00   0.000      0.  0.273E+00  0.671E-02  0.284E-03  0.176E-04   41  17  37   24  13  14   16  10  29    0.000    0.000       0
+  0   5334 01:57:06.77   1.3000A   1.3829  -0.3550  -0.5628  0.052  0.00   0.000      0.  0.273E+00  0.666E-02  0.284E-03  0.187E-04   41  17   1   23  13  15   15  10  29    0.000    0.000       0
+  0   5339 01:57:13.27   1.3000A   1.3819  -0.3751  -0.5344  0.052  0.00   0.000      0.  0.273E+00  0.663E-02  0.286E-03  0.210E-04   41  17   5   24  13  19   13  10  29    0.000    0.000       0
+  0   5343 01:57:18.47   1.3000A   1.3825  -0.3925  -0.5255  0.051  0.00   0.000      0.  0.274E+00  0.662E-02  0.288E-03  0.228E-04   41  17   8   23  12  19   13  10  29    0.000    0.000       0
+  0   5348 01:57:24.97   1.3000A   1.3811  -0.3959  -0.5079  0.051  0.00   0.000      0.  0.274E+00  0.661E-02  0.287E-03  0.234E-04   41  17  12   23  12  21   13  12  29    0.000    0.000       0
+  0   5352 01:57:30.18   1.3000A   1.3803  -0.3551  -0.4958  0.051  0.00   0.000      0.  0.274E+00  0.661E-02  0.284E-03  0.228E-04   41  17  15   23  12  23   12  12  29    0.000    0.000       0
+  0   5357 01:57:36.71   1.3000A   1.3796  -0.3066  -0.4847  0.051  0.00   0.000      0.  0.274E+00  0.662E-02  0.278E-03  0.203E-04   41  18  19   23  11  25   12  13  29    0.000    0.000       0
+  0   5362 01:57:43.23   1.3000A   1.3799  -0.3122  -0.4655  0.051  0.00   0.000      0.  0.274E+00  0.664E-02  0.271E-03  0.176E-04   41  18  23   23  11  28   11  13  29    0.000    0.000       0
+  0   5366 01:57:48.46   1.3100A   1.3777   0.2855  -0.4524  0.051  0.00   0.000      0.  0.274E+00  0.666E-02  0.268E-03  0.166E-04   41  18  26   21   9  26   10  12  28    0.000    0.000       0
+  0   5371 01:57:55.01   1.3100A   1.3779   0.3355  -0.4482  0.050  0.00   0.000      0.  0.274E+00  0.668E-02  0.267E-03  0.166E-04   40  19  34   21   9  28   10  12  28    0.000    0.000       0
+  0   5375 01:58:00.24   1.3000A   1.3794   0.3538  -0.4434  0.050  0.00   0.000      0.  0.273E+00  0.671E-02  0.265E-03  0.173E-04   40  19  37   21  10  28    9  12  28    0.000    0.000       0
+  0   5380 01:58:06.79   1.3100A   1.3776   0.3515  -0.4164  0.051  0.00   0.000      0.  0.273E+00  0.673E-02  0.266E-03  0.182E-04   40  19   1   20  10  28    8  12  28    0.000    0.000       0
+  0   5384 01:58:12.03   1.3100A   1.3754   0.3172  -0.4865  0.051  0.00   0.000      0.  0.273E+00  0.675E-02  0.266E-03  0.176E-04   39  19   3   21  10  31   18   6  29    0.000    0.000       0
+  0   5389 01:58:18.57   1.3100A   1.3769   0.3801  -0.5394  0.051  0.00   0.000      0.  0.273E+00  0.676E-02  0.266E-03  0.167E-04   39  19   7   20   9  29   18   7  29    0.000    0.000       0
+  0   5394 01:58:25.09   1.3000A   1.3801   0.4134  -0.5175  0.050  0.00   0.000      0.  0.273E+00  0.677E-02  0.263E-03  0.167E-04   40  35  18   19   9  29   17   7  29    0.000    0.000       0
+  0   5398 01:58:30.29   1.3000A   1.3834   0.3926  -0.4789  0.050  0.00   0.000      0.  0.273E+00  0.679E-02  0.265E-03  0.183E-04   40  35  21   19  10  29   16   8  29    0.000    0.000       0
+  0   5403 01:58:36.79   1.3000A   1.3874   0.3858  -0.4544  0.050  0.00   0.000      0.  0.273E+00  0.682E-02  0.268E-03  0.203E-04   40  35  25   18  10  29   15   4  29    0.000    0.000       0
+  0   5408 01:58:43.29   1.3000A   1.3859   0.3523  -0.4348  0.050  0.00   0.000      0.  0.273E+00  0.685E-02  0.272E-03  0.207E-04   40  35  29   17  10  29   14   4  29    0.000    0.000       0
+  0   5412 01:58:48.48   1.2900A   1.3911   0.3260  -0.4168  0.050  0.00   0.000      0.  0.273E+00  0.688E-02  0.273E-03  0.213E-04   31   0   5   21  19  24   14   3  29    0.000    0.000       0
+  0   5417 01:58:54.95   1.2900A   1.3910   0.3380  -0.4111  0.050  0.00   0.000      0.  0.274E+00  0.692E-02  0.275E-03  0.213E-04   31   0   9   21  19  26   13   3  29    0.000    0.000       0
+  0   5421 01:59:00.13   1.3000A   1.3877  -0.3665  -0.4146  0.050  0.00   0.000      0.  0.274E+00  0.694E-02  0.278E-03  0.210E-04   31   0  12   20   4  29   18  24  29    0.000    0.000       0
+  0   5426 01:59:06.58   1.2900A   1.3933  -0.4098  -0.5059  0.051  0.00   0.000      0.  0.274E+00  0.695E-02  0.278E-03  0.201E-04   31   0  15   20   3  29   18  24  29    0.000    0.000       0
+  0   5431 01:59:13.02   1.2900A   1.3974  -0.4065  -0.5401  0.051  0.00   0.000      0.  0.273E+00  0.695E-02  0.278E-03  0.197E-04   40  36   6   20   3  29   17  23  29    0.000    0.000       0
+  0   5435 01:59:18.15   1.2900A   1.3967  -0.3841  -0.5532  0.051  0.00   0.000      0.  0.273E+00  0.695E-02  0.278E-03  0.189E-04   41  36  10   20   5  29   17  23  29    0.000    0.000       0
+  0   5440 01:59:24.57   1.2900A   1.4007   0.3813  -0.5405  0.050  0.00   0.000      0.  0.273E+00  0.695E-02  0.281E-03  0.195E-04   40  36  13   20  37  29   16  23  29    0.000    0.000       0
+  0   5445 01:59:31.00   1.2900A   1.4004   0.4013  -0.5146  0.050  0.00   0.000      0.  0.273E+00  0.696E-02  0.285E-03  0.204E-04   40  36  17   20  37  29   15  23  29    0.000    0.000       0
+  0   5449 01:59:36.15   1.2900A   1.3946  -0.3293  -0.4937  0.050  0.00   0.000      0.  0.273E+00  0.697E-02  0.286E-03  0.204E-04   40  36  20   22  15  10   14  23  29    0.000    0.000       0
+  0   5454 01:59:42.59   1.2800A   1.4040  -0.3341  -0.4732  0.050  0.00   0.000      0.  0.273E+00  0.699E-02  0.285E-03  0.203E-04   32  26   2   20  36  28   13  23  29    0.000    0.000       0
+  0   5459 01:59:48.95   1.2700A   1.4225  -0.3678  -0.4566  0.050  0.00   0.000      0.  0.274E+00  0.700E-02  0.284E-03  0.200E-04   32  26   6   20  35  28   12  23  29    0.000    0.000       0
+  0   5464 01:59:55.22   1.2400A   1.4484   0.3793  -0.4420  0.050  0.00   0.000      0.  0.274E+00  0.700E-02  0.276E-03  0.188E-04   32  26   9   20  21  29   11  23  29    0.000    0.000       0
+  0   5468 02:00:00.18   1.2300A   1.4656  -0.4185  -0.4343  0.050  0.00   0.000      0.  0.274E+00  0.701E-02  0.272E-03  0.176E-04   32  26  12   20  13  28   13  20  29    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/constant_flux_layer/example_constant_flux_layer_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/constant_flux_layer/example_constant_flux_layer_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/constant_flux_layer/example_constant_flux_layer_p3d	(revision 3477)
@@ -0,0 +1,57 @@
+ &inipar nx = 39, ny = 39, nz = 45,
+         dx = 2.0, dy = 2.0, dz = 2.0,
+
+         fft_method = 'temperton-algorithm',   ! fast, but restrictions apply
+
+         momentum_advec = 'pw-scheme',         ! topography does not work with
+         scalar_advec   = 'pw-scheme',         ! Wicker-Skamarock advection so far
+
+         omega = 0.0,                          ! no Coriolis force
+         dp_external = .T.,                    ! external pressure gradient
+         dp_level_b = 80.0,                    ! ...acting above 80 m height
+         dp_smooth = .T.,                      ! ...vertically smoothed
+         dpdxy = -0.003, 0.0,                  ! ...in x-, y-direction
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 0.0, vg_surface = 0.0,
+         ug_vertical_gradient       = 2.5,     ! linear vertical ug gradient
+         ug_vertical_gradient_level = 0.0,     ! starting from the ground
+         roughness_length = 0.1,               ! applies to all surfaces locally
+
+         bc_pt_b = 'neumann',
+         bc_uv_t = 'neumann',                  ! open channel boundary condition
+
+         topography = 'single_building',
+         topography_grid_convention = 'cell_edge',  ! default
+         building_height   = 40.0,
+         building_length_x = 40.0,
+         building_length_y = 40.0,
+
+         surface_heatflux = 0.0,               ! strictly neutral simulation
+         wall_heatflux = 0.0, 0.0, 0.0, 0.0, 0.0,  /
+
+ &d3par  end_time                  =  14400.0,
+         termination_time_needed   =    900.0,
+
+         create_disturbances = .T.,
+
+         dt_run_control            =      6.0,
+         dt_dots                   =      6.0,
+
+         skip_time_dopr            =      0.0,
+         dt_dopr                   =   7200.0,
+         averaging_interval_pr     =   7200.0,
+         dt_averaging_input_pr     =      6.0,
+
+         skip_time_data_output     =      0.0,
+         dt_data_output            =   7200.0,
+
+         averaging_interval        =   7200.0,
+         dt_averaging_input        =      6.0,
+
+         data_output_pr = '#u', 'w"u"', 'w*u*', 'wu', 'u*2', 
+                          '#v', 'w"v"', 'w*v*', 'wv', 'v*2',
+                          'w', 'w*2', 'e', 'e*', '#km', '#l',
+
+         data_output = 'u',       'v',       'w',
+                       'u_av',    'v_av',    'w_av',  /
Index: /palm/tags/release-6.0/EXAMPLES/constant_flux_layer/example_constant_flux_layer_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/constant_flux_layer/example_constant_flux_layer_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/constant_flux_layer/example_constant_flux_layer_rc	(revision 3477)
@@ -0,0 +1,2608 @@
+
+ ***************************         ------------------------------------------
+ * PALM 3.6  Rev: 250      *         atmosphere - 3D - run without 1D - prerun
+ ***************************         ------------------------------------------
+
+ Date:              02-03-09         Run:       example_constant_flu
+ Time:              18:03:58         Run-No.:   00
+ Run on host:         lcsgih
+ Number of PEs:            8         Processor grid (x,y): (  2,  4) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> External pressure gradient directly prescribed by the user:
+ -0.30000E-02  0.00000E+00Pa/m in x/y direction starting from dp_level_b =80.000m, vertically smoothed.
+
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:          variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:           0.000 s
+ End time:         14400.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      2.000 m    dy =      2.000 m    dz =      2.000 m
+ Domain size:       x =     80.000 m     y =     80.000 m  z(u) =     91.000 m
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  46)
+ Subdomain size (x,y,z):        (    20,     10,     47)
+
+ Subdomains at the upper edges of the virtual processor grid have smaller sizes
+ Size of smallest subdomain:    (    20,     10,     47)
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: single_building                         
+ Building size (x/y/z) in m:  40.0 /  40.0 /  40.0
+ Horizontal index bounds (l/r/s/n):   10 /   30 /   10 /   30
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt(1)              
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = uv(nzt)               | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.000000 K m/s
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =   1.00 m   z0 = 0.1000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+       Time averaged over        7200.00 s
+       Averaging input every        6.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over        7200.00 s
+       Averaging input every        6.00 s
+
+    1D-Profiles:
+       Output format: netcdf                                  
+
+
+       Profile: u, w"u", w*u*, wu, u*2, v, w"v", w*v*, wv, v*2, w, w*2,      
+
+              : e, e*, km, l,                                                
+       Output every              7200.00 s
+       Time averaged over        7200.00 s
+       Averaging input every        6.00 s
+
+    3D-Arrays:
+       Output format: netcdf                                  
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              7200.00 s  
+       Upper output limit at       91.00 m  (GP   46)
+
+
+    3D-Arrays(time-averaged):
+       Output format: netcdf                                  
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              7200.00 s  
+       Time averaged over        7200.00 s
+       Averaging input every        6.00 s
+       Upper output limit at       91.00 m  (GP   46)
+
+
+    Time series:
+       Output format: netcdf                                  
+
+       Output every                 6.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.000E+00 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000000 1/s
+                            f*    =  0.000000 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    2.50  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0  m
+       Temperature:   300.00  300.00  K
+       Gradient:      ------    0.00  K/100m
+       Gridpoint:          0       0
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+   Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :     5.00 m (GP    3)
+    Upper disturbance level         :    29.00 m (GP   15)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+
+
+ ##############################################################################
+
+ User-defined variables and actions:
+ -----------------------------------
+
+
+ Topography grid definition convention:
+
+ cell edge (staggered grid points
+ (u in x-direction, v in y-direction))
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*   THETA*    Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   0.7910A   2.2750D  0.5062D  0.5612  0.000  0.00   0.000      0.  0.835E+00  0.975E-02  0.000E+00  0.000E+00   46  39  39   14  30   9   21  19   9    0.000    0.000       0
+  0      8 00:00:06.41   0.8000A   2.2487  -1.0837   0.9598  0.021  0.00   0.000      0.  0.834E+00  0.137E-01  0.287E-03  0.772E-04   45  19  22   17  10   9   20  19   9    0.000    0.000       0
+  0     16 00:00:12.79   0.7940A   2.2678  -0.9840   0.9732  0.024  0.00   0.000      0.  0.837E+00  0.147E-01  0.294E-03  0.670E-04   46  19  23   17  10   9   20  20   9    0.000    0.000       0
+  0     23 00:00:18.32   0.7880A   2.2842   0.9879   0.8893  0.027  0.00   0.000      0.  0.839E+00  0.156E-01  0.306E-03  0.624E-04   46  19  23   15  30   9   20  20   9    0.000    0.000       0
+  0     31 00:00:24.60   0.7820A   2.3025   0.9456   0.8425  0.030  0.00   0.000      0.  0.842E+00  0.166E-01  0.313E-03  0.601E-04   46  19  24   15  30   9   20  20   9    0.000    0.000       0
+  0     38 00:00:30.05   0.7760A   2.3183   0.9542   0.8220  0.032  0.00   0.000      0.  0.845E+00  0.175E-01  0.312E-03  0.582E-04   46  19  25   15  30   9   20  26   9    0.000    0.000       0
+  0     46 00:00:36.23   0.7700A   2.3362   0.9410   0.7895  0.034  0.00   0.000      0.  0.847E+00  0.184E-01  0.305E-03  0.555E-04   46  19  26   19  30   9   20  26   9    0.000    0.000       0
+  0     54 00:00:42.37   0.7650A   2.3539  -0.9278   0.7480  0.037  0.00   0.000      0.  0.850E+00  0.191E-01  0.300E-03  0.521E-04   46  19  27   19  10   9   20  28   9    0.000    0.000       0
+  0     62 00:00:48.46   0.7590A   2.3714  -0.9144   0.8005  0.039  0.00   0.000      0.  0.853E+00  0.197E-01  0.294E-03  0.504E-04   46  19  29   19  10   9   20  17   9    0.000    0.000       0
+  0     70 00:00:54.51   0.7540A   2.3888  -0.8878   0.8003  0.041  0.00   0.000      0.  0.855E+00  0.202E-01  0.292E-03  0.486E-04   46  19  30   17  10   9   20  17   9    0.000    0.000       0
+  0     78 00:01:00.51   0.7480A   2.4060  -0.8208  -0.8139  0.044  0.00   0.000      0.  0.858E+00  0.205E-01  0.276E-03  0.421E-04   46  19  31   17  10   9   15  15   9    0.000    0.000       0
+  0     86 00:01:06.47   0.7430A   2.4233  -0.6902  -0.9194  0.047  0.00   0.000      0.  0.861E+00  0.207E-01  0.260E-03  0.361E-04   46  19  31   17  10   9   13  15   9    0.000    0.000       0
+  0     94 00:01:12.39   0.7380A   2.4407   0.6403  -0.9522  0.049  0.00   0.000      0.  0.863E+00  0.207E-01  0.247E-03  0.326E-04   46  19  30    2  32   9   12  15   9    0.000    0.000       0
+  0    102 00:01:18.27   0.7320A   2.4581   0.6190  -0.9464  0.051  0.00   0.000      0.  0.866E+00  0.206E-01  0.235E-03  0.309E-04   46  19  30    2  32   9   11  17   8    0.000    0.000       0
+  0    110 00:01:24.10   0.7270A   2.4754  -0.6420  -0.9509  0.052  0.00   0.000      0.  0.868E+00  0.206E-01  0.229E-03  0.299E-04   46  20  30   20  22   9   11  11   9    0.000    0.000       0
+  0    119 00:01:30.62   0.7220A   2.4945  -0.6442  -0.9176  0.054  0.00   0.000      0.  0.871E+00  0.207E-01  0.225E-03  0.289E-04   46  20  31   20  22   9    9  11   9    0.000    0.000       0
+  0    127 00:01:36.37   0.7170A   2.5114  -0.6682  -0.9181  0.055  0.00   0.000      0.  0.874E+00  0.208E-01  0.223E-03  0.286E-04   46  20  33   20  22   9    8  19   7    0.000    0.000       0
+  0    135 00:01:42.08   0.7120A   2.5280  -0.6715  -0.8719  0.056  0.00   0.000      0.  0.877E+00  0.209E-01  0.219E-03  0.285E-04   46  24  35   20  22   9    7  19   6    0.000    0.000       0
+  0    144 00:01:48.46   0.7070A   2.5467  -0.6976  -0.8413  0.057  0.00   0.000      0.  0.880E+00  0.212E-01  0.215E-03  0.277E-04   45  23   1   20  22   9    7  19   8    0.000    0.000       0
+  0    152 00:01:54.10   0.7020A   2.5638  -0.6931  -0.7877  0.058  0.00   0.000      0.  0.882E+00  0.214E-01  0.211E-03  0.263E-04   45  19  11   20  22   9    4  20   3    0.000    0.000       0
+  0    161 00:02:00.39   0.6970A   2.5829  -0.6444  -0.7365  0.059  0.00   0.000      0.  0.886E+00  0.215E-01  0.207E-03  0.248E-04   45  19  13   19  22   9    6  20   6    0.000    0.000       0
+  0    170 00:02:06.64   0.6920A   2.6018  -0.6327  -0.7281  0.059  0.00   0.000      0.  0.889E+00  0.217E-01  0.205E-03  0.238E-04   45  19  15   19  22   9    5  18   4    0.000    0.000       0
+  0    178 00:02:12.15   0.6870A   2.6183  -0.5781   0.6890  0.059  0.00   0.000      0.  0.891E+00  0.218E-01  0.202E-03  0.227E-04   45  19  17   19  22   9   22  19   9    0.000    0.000       0
+  0    187 00:02:18.31   0.6830A   2.6366  -0.5302   0.6731  0.059  0.00   0.000      0.  0.894E+00  0.220E-01  0.198E-03  0.211E-04   45  19  18   20  22   9   22  19   9    0.000    0.000       0
+  0    196 00:02:24.44   0.6780A   2.6546  -0.5058   0.6516  0.059  0.00   0.000      0.  0.897E+00  0.221E-01  0.195E-03  0.200E-04   46  19  20   20  22   9   22  19   9    0.000    0.000       0
+  0    205 00:02:30.52   0.6740A   2.6723   0.4899   0.6656  0.058  0.00   0.000      0.  0.900E+00  0.222E-01  0.197E-03  0.203E-04   46  24  20    1  26  39   25  19   9    0.000    0.000       0
+  0    214 00:02:36.56   0.6690A   2.6899  -0.4889   0.6714  0.058  0.00   0.000      0.  0.903E+00  0.224E-01  0.201E-03  0.212E-04   46  25  20   12  23   3   21  21   9    0.000    0.000       0
+  0    223 00:02:42.56   0.6650A   2.7073  -0.4811   0.7103  0.058  0.00   0.000      0.  0.906E+00  0.225E-01  0.204E-03  0.213E-04   46  26  21   12  22   3   22  20   9    0.000    0.000       0
+  0    232 00:02:48.52   0.6610A   2.7245  -0.6068   0.7298  0.058  0.00   0.000      0.  0.910E+00  0.228E-01  0.208E-03  0.216E-04   46  27  22   20  10   9   21  19   9    0.000    0.000       0
+  0    241 00:02:54.45   0.6570A   2.7416  -0.7682   0.7412  0.059  0.00   0.000      0.  0.912E+00  0.230E-01  0.214E-03  0.219E-04   46  27  23   20  10   9   22  19   9    0.000    0.000       0
+  0    250 00:03:00.34   0.6530A   2.7585  -0.7590   0.7397  0.059  0.00   0.000      0.  0.915E+00  0.233E-01  0.218E-03  0.216E-04   46  26  24   19  10   9   22  19   9    0.000    0.000       0
+  0    259 00:03:06.19   0.6490A   2.7754  -0.6702   0.7173  0.060  0.00   0.000      0.  0.918E+00  0.236E-01  0.222E-03  0.208E-04   46  26  26   19  10   9   22  19   9    0.000    0.000       0
+  0    268 00:03:12.01   0.6450A   2.7923  -0.5494   0.6685  0.060  0.00   0.000      0.  0.921E+00  0.239E-01  0.225E-03  0.199E-04   46  25  28   19  10   9   22  19   9    0.000    0.000       0
+  0    278 00:03:18.43   0.6400A   2.8109  -0.5479  -0.6538  0.060  0.00   0.000      0.  0.924E+00  0.242E-01  0.228E-03  0.179E-04   45  25  30   20  21   9   18  23   9    0.000    0.000       0
+  0    287 00:03:24.17   0.6370A   2.8275  -0.6901  -0.7383  0.060  0.00   0.000      0.  0.927E+00  0.244E-01  0.230E-03  0.166E-04   46  24  33   20  25   8   17  23   9    0.000    0.000       0
+  0    297 00:03:30.52   0.6320A   2.8459   0.7232  -0.7327  0.060  0.00   0.000      0.  0.930E+00  0.247E-01  0.233E-03  0.156E-04   45  23  35   20  15   8   16  23   9    0.000    0.000       0
+  0    306 00:03:36.19   0.6290A   2.8622   0.5872  -0.6812  0.059  0.00   0.000      0.  0.933E+00  0.249E-01  0.236E-03  0.142E-04   45  23  38   20  16   8   15  23   9    0.000    0.000       0
+  0    316 00:03:42.46   0.6250A   2.8801   0.4635  -0.6534  0.059  0.00   0.000      0.  0.937E+00  0.251E-01  0.240E-03  0.132E-04   45  23   1   14  30   9   15  22   9    0.000    0.000       0
+  0    325 00:03:48.07   0.6220A   2.8960   0.4571  -0.6170  0.058  0.00   0.000      0.  0.939E+00  0.252E-01  0.243E-03  0.132E-04   46  24   4   28  24  20   16  18   9    0.000    0.000       0
+  0    335 00:03:54.26   0.6180A   2.9143   0.4859  -0.5800  0.057  0.00   0.000      0.  0.943E+00  0.253E-01  0.245E-03  0.132E-04   45  20  30   28  24  23   15  18   9    0.000    0.000       0
+  0    345 00:04:00.42   0.6140A   2.9325  -0.4670  -0.5389  0.056  0.00   0.000      0.  0.946E+00  0.254E-01  0.247E-03  0.124E-04   46  20  34   26  16  24   26  16  23    0.000    0.000       0
+  0    355 00:04:06.53   0.6100A   2.9505   0.5272  -0.5665  0.054  0.00   0.000      0.  0.949E+00  0.255E-01  0.252E-03  0.139E-04   45  20  37   27  24  30   26  16  26    0.000    0.000       0
+  0    364 00:04:12.01   0.6070A   2.9667   0.4919  -0.5856  0.053  0.00   0.000      0.  0.952E+00  0.256E-01  0.258E-03  0.165E-04   45  20   1   26  25  32   29  22  31    0.000    0.000       0
+  0    374 00:04:18.05   0.6030A   2.9848  -0.5116  -0.6015  0.052  0.00   0.000      0.  0.955E+00  0.258E-01  0.265E-03  0.189E-04   45  20   5    1   9   9   25  16  32    0.000    0.000       0
+  0    384 00:04:24.06   0.5990A   3.0031  -0.5270  -0.5732  0.051  0.00   0.000      0.  0.958E+00  0.260E-01  0.269E-03  0.201E-04   45  20   9    1   8   9   25  16  35    0.000    0.000       0
+  0    394 00:04:30.04   0.5960A   3.0215   0.5345   0.5755  0.051  0.00   0.000      0.  0.961E+00  0.261E-01  0.271E-03  0.194E-04   45  20  13   21  17   8   28  18   9    0.000    0.000       0
+  0    405 00:04:36.57   0.5920A   3.0417  -0.5896  -0.5828  0.052  0.00   0.000      0.  0.965E+00  0.263E-01  0.273E-03  0.184E-04   45  18  17   20  10   9   28  22   6    0.000    0.000       0
+  0    415 00:04:42.47   0.5880A   3.0599  -0.6191  -0.5655  0.053  0.00   0.000      0.  0.968E+00  0.265E-01  0.278E-03  0.179E-04   45  17  21   20  10   9   28  22   9    0.000    0.000       0
+  0    425 00:04:48.33   0.5850A   3.0784  -0.5863  -0.5957  0.053  0.00   0.000      0.  0.971E+00  0.266E-01  0.282E-03  0.179E-04   45  17  26   19  10   9   27  23  15    0.000    0.000       0
+  0    435 00:04:54.16   0.5810A   3.0968   0.6127  -0.7176  0.054  0.00   0.000      0.  0.974E+00  0.267E-01  0.285E-03  0.171E-04   45  17  30   20  16   9   18  13   9    0.000    0.000       0
+  0    446 00:05:00.53   0.5770A   3.1171  -0.5630  -0.7806  0.055  0.00   0.000      0.  0.977E+00  0.268E-01  0.287E-03  0.167E-04   45  16  35   17  10   9   17  13   9    0.000    0.000       0
+  0    456 00:05:06.28   0.5740A   3.1352  -0.5674  -0.7173  0.055  0.00   0.000      0.  0.980E+00  0.269E-01  0.289E-03  0.168E-04   46  16   0   22  22  38   16  13   9    0.000    0.000       0
+  0    466 00:05:12.01   0.5710A   3.1532  -0.6311  -0.7268  0.055  0.00   0.000      0.  0.983E+00  0.269E-01  0.290E-03  0.164E-04   45  16   4   22  21   0   17  24   9    0.000    0.000       0
+  0    477 00:05:18.26   0.5670A   3.1724   0.5779  -0.7171  0.055  0.00   0.000      0.  0.986E+00  0.270E-01  0.296E-03  0.166E-04   46  15  10   12  30   9   16  24   9    0.000    0.000       0
+  0    488 00:05:24.49   0.5640A   3.1918  -0.5134  -0.6909  0.054  0.00   0.000      0.  0.989E+00  0.271E-01  0.298E-03  0.165E-04   45  15  15   21  23   2   16  22   9    0.000    0.000       0
+  0    498 00:05:30.11   0.5610A   3.2084  -0.5644  -0.6344  0.053  0.00   0.000      0.  0.992E+00  0.272E-01  0.300E-03  0.175E-04   45  15  20   20  26   8   15  22   9    0.000    0.000       0
+  0    509 00:05:36.26   0.5580A   3.2258   0.5631  -0.7856  0.051  0.00   0.000      0.  0.995E+00  0.274E-01  0.303E-03  0.185E-04   46  15  26    9  30   9   17  19   9    0.000    0.000       0
+  0    520 00:05:42.38   0.5550A   3.2428  -0.5504  -0.8223  0.050  0.00   0.000      0.  0.998E+00  0.276E-01  0.303E-03  0.187E-04   46  14  32   22  19  12   17  19   9    0.000    0.000       0
+  0    531 00:05:48.47   0.5520A   3.2587   0.5857  -0.7596  0.049  0.00   0.000      0.  0.100E+01  0.279E-01  0.304E-03  0.190E-04   46  14  38   20  17   8   15  18   9    0.000    0.000       0
+  0    542 00:05:54.53   0.5500A   3.2736   0.6269  -0.6729  0.049  0.00   0.000      0.  0.100E+01  0.282E-01  0.309E-03  0.184E-04   46  23   4   20  19   8   14  18   9    0.000    0.000       0
+  0    552 00:06:00.02   0.5470A   3.2899   0.6780  -0.6053  0.048  0.00   0.000      0.  0.101E+01  0.285E-01  0.314E-03  0.184E-04   46  24   9   19  13   9   13  18   9    0.000    0.000       0
+  0    563 00:06:06.02   0.5440A   3.3090   0.6530  -0.5746  0.048  0.00   0.000      0.  0.101E+01  0.290E-01  0.320E-03  0.187E-04   46  24  16   19  14   9   27  24  21    0.000    0.000       0
+  0    575 00:06:12.53   0.5420A   3.3233   0.6736   0.5649  0.048  0.00   0.000      0.  0.101E+01  0.295E-01  0.321E-03  0.185E-04   46  25  23   18  14   9   20  15   9    0.000    0.000       0
+  0    586 00:06:18.47   0.5390A   3.3381   0.6871   0.5503  0.047  0.00   0.000      0.  0.101E+01  0.300E-01  0.322E-03  0.182E-04   46  25  30   16  15   9   20  21   9    0.000    0.000       0
+  0    597 00:06:24.39   0.5380A   3.3469   0.6618   0.5419  0.047  0.00   0.000      0.  0.101E+01  0.306E-01  0.325E-03  0.176E-04   46  25   0   14  15   9   20  21   9    0.000    0.000       0
+  0    608 00:06:30.29   0.5340A   3.3684   0.6536   0.5598  0.046  0.00   0.000      0.  0.102E+01  0.313E-01  0.327E-03  0.170E-04   45  25  13   14  16   9   20  12   9    0.000    0.000       0
+  0    619 00:06:36.14   0.5300A   3.3975   0.6375   0.5626  0.046  0.00   0.000      0.  0.102E+01  0.319E-01  0.330E-03  0.157E-04   45  13  24   16  16   9   20  21   9    0.000    0.000       0
+  0    631 00:06:42.47   0.5250A   3.4267   0.6181   0.6168  0.045  0.00   0.000      0.  0.102E+01  0.326E-01  0.333E-03  0.143E-04   45  12  30   19  17   9   20  13   9    0.000    0.000       0
+  0    642 00:06:48.23   0.5220A   3.4488   0.6395   0.5551  0.045  0.00   0.000      0.  0.102E+01  0.333E-01  0.334E-03  0.130E-04   45  12  39   19  18   9   20  12   9    0.000    0.000       0
+  0    654 00:06:54.47   0.5190A   3.4694   0.5860  -0.5104  0.045  0.00   0.000      0.  0.102E+01  0.340E-01  0.335E-03  0.112E-04   46  12   8   18  18   9   31  11  30    0.000    0.000       0
+  0    665 00:07:00.16   0.5160A   3.4851   0.5331  -0.5082  0.046  0.00   0.000      0.  0.102E+01  0.349E-01  0.338E-03  0.103E-04   45  12  20   12  14   8   31  11  34    0.000    0.000       0
+  0    677 00:07:06.34   0.5140A   3.5046   0.6797  -0.5598  0.047  0.00   0.000      0.  0.102E+01  0.359E-01  0.343E-03  0.963E-05   45  11  24   20  27   9   18  25   9    0.000    0.000       0
+  0    689 00:07:12.49   0.5110A   3.5213   0.6560  -0.8281  0.048  0.00   0.000      0.  0.103E+01  0.370E-01  0.347E-03  0.944E-05   46  11  36   19  28   9   18  23   9    0.000    0.000       0
+  0    700 00:07:18.10   0.5090A   3.5368  -0.7260  -1.0158  0.049  0.00   0.000      0.  0.103E+01  0.381E-01  0.350E-03  0.934E-05   46  11   6   19  22   9   17  23   9    0.000    0.000       0
+  0    712 00:07:24.20   0.5070A   3.5520  -0.8447  -0.9723  0.049  0.00   0.000      0.  0.103E+01  0.394E-01  0.356E-03  0.943E-05   45  11  26   19  21   9   16  23   9    0.000    0.000       0
+  0    724 00:07:30.26   0.5030A   3.5765  -0.8534  -0.8760  0.050  0.00   0.000      0.  0.103E+01  0.408E-01  0.365E-03  0.929E-05   45  10  33   18  20   9   15  20   9    0.000    0.000       0
+  0    736 00:07:36.26   0.4980A   3.6128  -0.7999  -0.8146  0.049  0.00   0.000      0.  0.103E+01  0.424E-01  0.376E-03  0.877E-05   45  10  39   17  19   9   14  22   9    0.000    0.000       0
+  0    748 00:07:42.22   0.4950A   3.6348  -0.6985  -0.7354  0.049  0.00   0.000      0.  0.103E+01  0.441E-01  0.389E-03  0.821E-05   46   9   7   16  18   9   13  22   9    0.000    0.000       0
+  0    760 00:07:48.15   0.4940A   3.6471  -0.6746  -0.6821  0.047  0.00   0.000      0.  0.103E+01  0.460E-01  0.400E-03  0.774E-05   46   9  15   16  18   9   40  16  33    0.000    0.000       0
+  0    772 00:07:54.06   0.4920A   3.6597   0.6172  -0.6400  0.046  0.00   0.000      0.  0.103E+01  0.480E-01  0.412E-03  0.727E-05   46   9  26   34  12  12   38  27   5    0.000    0.000       0
+  0    785 00:08:00.43   0.4880A   3.6863   0.6587   0.7165  0.046  0.00   0.000      0.  0.103E+01  0.502E-01  0.420E-03  0.684E-05   46   9  39   41  16   2   42  14  18    0.000    0.000       0
+  0    797 00:08:06.28   0.4880A   3.6920  -0.6399  -0.7213  0.045  0.00   0.000      0.  0.103E+01  0.522E-01  0.424E-03  0.714E-05   45  32   0   43  15  19   37  27  16    0.000    0.000       0
+  0    809 00:08:12.12   0.4860A   3.7031  -0.6263  -0.6997  0.045  0.00   0.000      0.  0.103E+01  0.542E-01  0.427E-03  0.761E-05   46   8  15   43  14  39   40  27  22    0.000    0.000       0
+  0    822 00:08:18.43   0.4830A   3.7274  -0.6840  -0.6800  0.044  0.00   0.000      0.  0.103E+01  0.562E-01  0.429E-03  0.865E-05   46   8   0   43  13   4   39  12  32    0.000    0.000       0
+  0    834 00:08:24.21   0.4820A   3.7375   0.7015  -0.7520  0.044  0.00   0.000      0.  0.102E+01  0.580E-01  0.436E-03  0.904E-05   46   8   8   36  15   8   42  11   4    0.000    0.000       0
+  0    847 00:08:30.44   0.4770A   3.7772   0.7114  -0.7533  0.044  0.00   0.000      0.  0.102E+01  0.598E-01  0.447E-03  0.907E-05   45   8  12   38  15  17   40  32  12    0.000    0.000       0
+  0    859 00:08:36.13   0.4720A   3.8142  -0.7322  -0.7898  0.045  0.00   0.000      0.  0.102E+01  0.613E-01  0.463E-03  0.941E-05   46  33  22   40  28  27   38  26   8    0.000    0.000       0
+  0    872 00:08:42.16   0.4560A   3.9446  -0.7207  -0.7836  0.045  0.00   0.000      0.  0.102E+01  0.627E-01  0.465E-03  0.974E-05   46  33  32   40  25  36   39  31  26    0.000    0.000       0
+  0    885 00:08:48.08   0.4530A   3.9760  -0.7576  -0.8978  0.046  0.00   0.000      0.  0.102E+01  0.638E-01  0.480E-03  0.101E-04   44  33   0   41  25   2   16  21   9    0.000    0.000       0
+  0    899 00:08:54.30   0.4450A   4.0419  -0.7842  -0.9033  0.047  0.00   0.000      0.  0.102E+01  0.647E-01  0.482E-03  0.994E-05   44  33  10   41  25   8   15  21   9    0.000    0.000       0
+  0    912 00:09:00.03   0.4410A   4.0779   0.7859  -0.8624  0.047  0.00   0.000      0.  0.102E+01  0.652E-01  0.484E-03  0.986E-05   44  33  19   32  14  38   14  21   9    0.000    0.000       0
+  0    926 00:09:06.30   0.4510A   3.9915   0.8946  -0.8166  0.048  0.00   0.000      0.  0.102E+01  0.655E-01  0.504E-03  0.987E-05   46  34  16   31  14   3   13  22   9    0.000    0.000       0
+  0    939 00:09:12.11   0.4450A   4.0490   0.8876  -0.7782  0.049  0.00   0.000      0.  0.102E+01  0.656E-01  0.507E-03  0.958E-05   46  35  24   31  15   8   11  22   9    0.000    0.000       0
+  0    953 00:09:18.26   0.4340A   4.1500   0.9469  -0.7841  0.049  0.00   0.000      0.  0.102E+01  0.656E-01  0.508E-03  0.948E-05   46  33   6   31  17  15   39  25   8    0.000    0.000       0
+  0    967 00:09:24.23   0.4140A   4.3450   0.9600  -0.7475  0.049  0.00   0.000      0.  0.102E+01  0.655E-01  0.496E-03  0.942E-05   45  33  16   30  17  19   15  18   9    0.000    0.000       0
+  0    981 00:09:30.18   0.4450A   4.0424   0.9390  -0.8251  0.049  0.00   0.000      0.  0.101E+01  0.654E-01  0.536E-03  0.108E-04   44  36  17   30  18  24   31  27  27    0.000    0.000       0
+  0    995 00:09:36.40   0.4460A   4.0317   0.9346  -0.8065  0.049  0.00   0.000      0.  0.101E+01  0.653E-01  0.548E-03  0.116E-04   44  36  27   30  19  29   33  27  34    0.000    0.000       0
+  0   1008 00:09:42.19   0.4440A   4.0531   0.8957  -0.7653  0.049  0.00   0.000      0.  0.101E+01  0.653E-01  0.551E-03  0.115E-04   44  37  36   30  21  33   37  12   2    0.000    0.000       0
+  0   1022 00:09:48.35   0.4310A   4.1748  -0.9126  -0.7556  0.050  0.00   0.000      0.  0.101E+01  0.652E-01  0.543E-03  0.991E-05   46  37  11   20  22   8   32  27   6    0.000    0.000       0
+  0   1036 00:09:54.30   0.4220A   4.2614   0.9354  -0.7337  0.050  0.00   0.000      0.  0.101E+01  0.650E-01  0.541E-03  0.853E-05   46  37  20   29  16   5   35  34  23    0.000    0.000       0
+  0   1050 00:10:00.29   0.4300A   4.1862   0.8466  -0.7284  0.050  0.00   0.000      0.  0.101E+01  0.648E-01  0.559E-03  0.872E-05   44  37  30   29  20   9   38  11  17    0.000    0.000       0
+  0   1064 00:10:06.32   0.4320A   4.1641   0.8931  -0.7818  0.050  0.00   0.000      0.  0.101E+01  0.647E-01  0.574E-03  0.952E-05   43  36  39   29  22  13   17  26   9    0.000    0.000       0
+  0   1078 00:10:12.37   0.4400A   4.0947   0.8249  -0.7593  0.049  0.00   0.000      0.  0.101E+01  0.647E-01  0.595E-03  0.112E-04   44  36   3   28  16  16   37  11  29    0.000    0.000       0
+  0   1091 00:10:18.10   0.4390A   4.0997   0.8381  -0.7804  0.049  0.00   0.000      0.  0.101E+01  0.648E-01  0.600E-03  0.131E-04   46  37  19   28  16  20   35  10  36    0.000    0.000       0
+  0   1105 00:10:24.20   0.4330A   4.1541  -0.9270  -0.7975  0.049  0.00   0.000      0.  0.100E+01  0.649E-01  0.604E-03  0.134E-04   45  37  28   43  34   6   40  33  23    0.000    0.000       0
+  0   1119 00:10:30.26   0.4400A   4.0877  -0.8184  -0.8339  0.049  0.00   0.000      0.  0.100E+01  0.650E-01  0.619E-03  0.122E-04   46  37  38   35  29  28   40  32  30    0.000    0.000       0
+  0   1132 00:10:36.18   0.4760A   3.7785   0.7847  -0.8724  0.050  0.00   0.000      0.  0.100E+01  0.652E-01  0.673E-03  0.124E-04   46  37   7   38  37   0   40  35  39    0.000    0.000       0
+  0   1144 00:10:42.03   0.4910A   3.6627   0.8078  -0.8261  0.050  0.00   0.000      0.  0.100E+01  0.653E-01  0.699E-03  0.114E-04   45  30  39   37  37   5   40   4  17    0.000    0.000       0
+  0   1157 00:10:48.48   0.5010A   3.5911  -1.0001  -0.9247  0.050  0.00   0.000      0.  0.100E+01  0.653E-01  0.729E-03  0.114E-04   46  30  10   45  36   4   39  39  15    0.000    0.000       0
+  0   1169 00:10:54.45   0.4950A   3.6327  -0.9674  -0.7779  0.050  0.00   0.000      0.  0.999E+00  0.655E-01  0.733E-03  0.113E-04   46  32  13   46  34  11   38  39  22    0.000    0.000       0
+  0   1181 00:11:00.39   0.4940A   3.6441   1.0465   0.7909  0.049  0.00   0.000      0.  0.998E+00  0.656E-01  0.740E-03  0.132E-04   46  37   8   38   3  32   40   3  30    0.000    0.000       0
+  0   1193 00:11:06.35   0.4960A   3.6257  -0.9679  -0.8189  0.049  0.00   0.000      0.  0.997E+00  0.660E-01  0.744E-03  0.134E-04   46  37  17   42  38  34   37  11  18    0.000    0.000       0
+  0   1205 00:11:12.26   0.4890A   3.6807   0.9576  -0.8599  0.050  0.00   0.000      0.  0.995E+00  0.664E-01  0.737E-03  0.123E-04   44  33  33   38   4   5   38   7  14    0.000    0.000       0
+  0   1217 00:11:18.23   0.4980A   3.6110   1.0754  -0.8287  0.052  0.00   0.000      0.  0.994E+00  0.667E-01  0.758E-03  0.114E-04   42  36  32   39   5  11   36   7  20    0.000    0.000       0
+  0   1229 00:11:24.20   0.5040A   3.5738   1.1351  -0.7737  0.053  0.00   0.000      0.  0.992E+00  0.669E-01  0.771E-03  0.122E-04   42  36   0   39   6  16   36   8  26    0.000    0.000       0
+  0   1241 00:11:30.27   0.5090A   3.5385  -1.0134  -0.7784  0.054  0.00   0.000      0.  0.991E+00  0.669E-01  0.783E-03  0.112E-04   45  35   9   39  26  14   18  10   9    0.000    0.000       0
+  0   1253 00:11:36.48   0.5210A   3.4571  -0.9613  -0.9135  0.053  0.00   0.000      0.  0.989E+00  0.668E-01  0.803E-03  0.102E-04   46  38  20   39  24  20   36   0  24    0.000    0.000       0
+  0   1264 00:11:42.20   0.5200A   3.4589  -0.8144  -0.7892  0.052  0.00   0.000      0.  0.987E+00  0.666E-01  0.806E-03  0.115E-04   46  35  28   38  24  26   34   0  30    0.000    0.000       0
+  0   1276 00:11:48.44   0.5210A   3.4557   0.7740  -0.8765  0.051  0.00   0.000      0.  0.986E+00  0.665E-01  0.806E-03  0.127E-04   46  35  36   27   6  19   34   3  32    0.000    0.000       0
+  0   1287 00:11:54.22   0.5280A   3.4085  -0.7650  -0.8305  0.051  0.00   0.000      0.  0.984E+00  0.664E-01  0.819E-03  0.129E-04   46  36   2   32  33  20   33   3  37    0.000    0.000       0
+  0   1298 00:12:00.06   0.5330A   3.3784   0.8577  -0.7853  0.051  0.00   0.000      0.  0.983E+00  0.662E-01  0.829E-03  0.141E-04   46  22   6   27   7  28   32   3   1    0.000    0.000       0
+  0   1310 00:12:06.45   0.5300A   3.3983   0.8641  -0.8815  0.050  0.00   0.000      0.  0.981E+00  0.660E-01  0.823E-03  0.132E-04   46  22  15   27   7  33   29   6   0    0.000    0.000       0
+  0   1321 00:12:12.29   0.5300A   3.3985   0.8148  -0.9019  0.050  0.00   0.000      0.  0.979E+00  0.656E-01  0.827E-03  0.149E-04   46  22  23   28   7  37   28   5   5    0.000    0.000       0
+  0   1332 00:12:18.21   0.5430A   3.3140   0.8649  -0.8604  0.050  0.00   0.000      0.  0.977E+00  0.653E-01  0.833E-03  0.169E-04   46  22  31   28   7   2   37  38  37    0.000    0.000       0
+  0   1343 00:12:24.21   0.5470A   3.2910   0.8501  -0.9330  0.050  0.00   0.000      0.  0.976E+00  0.649E-01  0.834E-03  0.193E-04   46  31   2   20  17   9   26   4  14    0.000    0.000       0
+  0   1354 00:12:30.18   0.5420A   3.3203   0.8365  -0.8427  0.050  0.00   0.000      0.  0.974E+00  0.646E-01  0.825E-03  0.198E-04   46  31  10   27   0   0   25  17  37    0.000    0.000       0
+  0   1365 00:12:36.14   0.5450A   3.2999  -0.8523  -0.8548  0.050  0.00   0.000      0.  0.972E+00  0.641E-01  0.829E-03  0.200E-04   45  31  17   31   4  27   14  11   9    0.000    0.000       0
+  0   1376 00:12:42.15   0.5480A   3.2857   0.8774  -0.8129  0.051  0.00   0.000      0.  0.970E+00  0.636E-01  0.829E-03  0.196E-04   46  37  22   26   1   8   13  11   9    0.000    0.000       0
+  0   1387 00:12:48.15   0.5460A   3.2995   0.9920  -0.7713  0.051  0.00   0.000      0.  0.969E+00  0.629E-01  0.817E-03  0.164E-04   46  28  13   26   2  11   25  10  21    0.000    0.000       0
+  0   1398 00:12:54.13   0.5460A   3.2941   0.9427  -0.8102  0.051  0.00   0.000      0.  0.967E+00  0.620E-01  0.815E-03  0.152E-04   44  37  37   26   2  15   17  35  12    0.000    0.000       0
+  0   1409 00:13:00.11   0.5390A   3.3410  -0.8890  -0.8347  0.051  0.00   0.000      0.  0.965E+00  0.611E-01  0.801E-03  0.141E-04   44  38   5   19  28   9   16  35  15    0.000    0.000       0
+  0   1420 00:13:06.09   0.5500A   3.2716  -0.9093  -0.8498  0.051  0.00   0.000      0.  0.964E+00  0.601E-01  0.821E-03  0.143E-04   44  38  13   19  10   9   18  14   9    0.000    0.000       0
+  0   1431 00:13:12.23   0.5580A   3.2276  -0.8611  -0.9394  0.051  0.00   0.000      0.  0.962E+00  0.590E-01  0.839E-03  0.163E-04   46  31  30   19  25   9   17  15   9    0.000    0.000       0
+  0   1442 00:13:18.37   0.5570A   3.2344  -0.8411  -0.9139  0.050  0.00   0.000      0.  0.961E+00  0.579E-01  0.826E-03  0.160E-04   42  31  37   42  24  19   16  15   9    0.000    0.000       0
+  0   1453 00:13:24.47   0.5580A   3.2269  -0.9322  -0.8737  0.049  0.00   0.000      0.  0.960E+00  0.569E-01  0.805E-03  0.174E-04   42  31   5   42  23  24   31  28  26    0.000    0.000       0
+  0   1463 00:13:30.10   0.5660A   3.1798   1.0073  -0.8446  0.049  0.00   0.000      0.  0.959E+00  0.560E-01  0.800E-03  0.187E-04   46  27   3   21  16   8   30  28  30    0.000    0.000       0
+  0   1474 00:13:36.33   0.5650A   3.1852   1.1981  -0.8227  0.051  0.00   0.000      0.  0.958E+00  0.550E-01  0.787E-03  0.194E-04   46  36  10   20  15   9   20  12   8    0.000    0.000       0
+  0   1484 00:13:42.00   0.5660A   3.1805   1.0753  -1.2397  0.052  0.00   0.000      0.  0.957E+00  0.540E-01  0.777E-03  0.187E-04   45  33  19   19  15   9   18  11   9    0.000    0.000       0
+  0   1495 00:13:48.16   0.5570A   3.2320   0.9838  -1.0143  0.052  0.00   0.000      0.  0.955E+00  0.529E-01  0.752E-03  0.178E-04   45  33  28   18  16   9   16  12   9    0.000    0.000       0
+  0   1506 00:13:54.27   0.5540A   3.2515   0.9011  -0.7556  0.053  0.00   0.000      0.  0.954E+00  0.518E-01  0.735E-03  0.176E-04   46  33  36   18  17   9   15  13   9    0.000    0.000       0
+  0   1517 00:14:00.39   0.5600A   3.2163  -0.8704  -0.7259  0.052  0.00   0.000      0.  0.953E+00  0.509E-01  0.724E-03  0.177E-04   46  33   4   20  26   9   17  27   9    0.000    0.000       0
+  0   1528 00:14:06.56   0.5660A   3.1799  -0.7805  -0.7023  0.051  0.00   0.000      0.  0.953E+00  0.501E-01  0.725E-03  0.192E-04   46  33  13   19  25   9   16  26   9    0.000    0.000       0
+  0   1538 00:14:12.23   0.5650A   3.1835  -0.7480  -0.6430  0.050  0.00   0.000      0.  0.952E+00  0.495E-01  0.714E-03  0.176E-04   46  34  21   40  30  23   15  31  10    0.000    0.000       0
+  0   1549 00:14:18.43   0.5620A   3.2054  -0.8316  -0.6760  0.049  0.00   0.000      0.  0.951E+00  0.489E-01  0.693E-03  0.160E-04   46  34  29   20  10   9   26  26  39    0.000    0.000       0
+  0   1559 00:14:24.08   0.5650A   3.1836  -0.7184  -0.7149  0.049  0.00   0.000      0.  0.951E+00  0.484E-01  0.682E-03  0.150E-04   45  32  34   33  29   2   18  17   9    0.000    0.000       0
+  0   1570 00:14:30.33   0.5670A   3.1730  -0.6710  -0.8383  0.048  0.00   0.000      0.  0.950E+00  0.480E-01  0.666E-03  0.135E-04   44  36  39   34  28   8   17  18   9    0.000    0.000       0
+  0   1580 00:14:36.02   0.5700A   3.1603  -0.7024  -0.8048  0.048  0.00   0.000      0.  0.950E+00  0.477E-01  0.664E-03  0.142E-04   45  34   4   22  22   6   16  18   9    0.000    0.000       0
+  0   1591 00:14:42.25   0.5610A   3.2079  -0.7261  -0.7691  0.048  0.00   0.000      0.  0.949E+00  0.476E-01  0.660E-03  0.182E-04   45  34  13   22  21   8   15  19   9    0.000    0.000       0
+  0   1602 00:14:48.39   0.5570A   3.2316  -0.7266   0.7810  0.050  0.00   0.000      0.  0.949E+00  0.475E-01  0.653E-03  0.192E-04   46  34  21   20  27   4   20  13   9    0.000    0.000       0
+  0   1612 00:14:54.01   0.5650A   3.1862  -0.7166  -0.7835  0.051  0.00   0.000      0.  0.948E+00  0.475E-01  0.659E-03  0.205E-04   45  35  33   20  27   6   18  23   9    0.000    0.000       0
+  0   1623 00:15:00.18   0.5600A   3.2138  -0.9215  -1.1074  0.052  0.00   0.000      0.  0.948E+00  0.474E-01  0.652E-03  0.209E-04   45  35   0   20  26   8   17  22   9    0.000    0.000       0
+  0   1634 00:15:06.34   0.5630A   3.1979   0.8010  -1.1003  0.053  0.00   0.000      0.  0.947E+00  0.471E-01  0.650E-03  0.198E-04   45  35   8   20  20   8   16  21   9    0.000    0.000       0
+  0   1644 00:15:12.02   0.5710A   3.1546   0.6825  -0.9788  0.053  0.00   0.000      0.  0.947E+00  0.469E-01  0.650E-03  0.187E-04   45  35  16   20  21   8   14  21   9    0.000    0.000       0
+  0   1655 00:15:18.33   0.5770A   3.1213   0.6382  -0.8987  0.053  0.00   0.000      0.  0.946E+00  0.467E-01  0.649E-03  0.172E-04   46  36  27   19  22   8   13  19   9    0.000    0.000       0
+  0   1665 00:15:24.09   0.5730A   3.1419  -0.6436  -0.8310  0.052  0.00   0.000      0.  0.946E+00  0.465E-01  0.638E-03  0.172E-04   44  37  36   31  21   5   15  14   9    0.000    0.000       0
+  0   1676 00:15:30.39   0.5720A   3.1445  -0.6976  -0.7923  0.051  0.00   0.000      0.  0.945E+00  0.464E-01  0.628E-03  0.188E-04   44  37   4   35  31  22   14  14   9    0.000    0.000       0
+  0   1686 00:15:36.15   0.5780A   3.1166  -0.7346  -0.7854  0.049  0.00   0.000      0.  0.945E+00  0.465E-01  0.638E-03  0.229E-04   44  37  12   24  21   6   11  25   8    0.000    0.000       0
+  0   1697 00:15:42.49   0.5720A   3.1452  -0.7532  -0.8322  0.048  0.00   0.000      0.  0.945E+00  0.467E-01  0.632E-03  0.233E-04   44  37  21   19  24   9   10  25   8    0.000    0.000       0
+  0   1707 00:15:48.19   0.5690A   3.1662  -0.9619  -0.7641  0.048  0.00   0.000      0.  0.945E+00  0.468E-01  0.627E-03  0.228E-04   44  37  28   20  21   8    9  25   8    0.000    0.000       0
+  0   1718 00:15:54.41   0.5640A   3.1908  -1.0957  -0.7163  0.048  0.00   0.000      0.  0.945E+00  0.471E-01  0.619E-03  0.239E-04   44  37  36   20  19   8   12  21   9    0.000    0.000       0
+  0   1728 00:16:00.08   0.5690A   3.1636  -0.8073  -0.7694  0.049  0.00   0.000      0.  0.945E+00  0.473E-01  0.624E-03  0.228E-04   44  37   3   20  20   9    9  18   8    0.000    0.000       0
+  0   1739 00:16:06.41   0.5740A   3.1337  -0.7694  -0.7683  0.051  0.00   0.000      0.  0.945E+00  0.475E-01  0.628E-03  0.220E-04   44   5   6   26  20  25    7  18   8    0.000    0.000       0
+  0   1749 00:16:12.14   0.5730A   3.1419  -0.8277  -0.9142  0.051  0.00   0.000      0.  0.946E+00  0.478E-01  0.622E-03  0.201E-04   44   5  14   27  19  29   11  29   8    0.000    0.000       0
+  0   1760 00:16:18.45   0.5770A   3.1213  -0.7817  -0.8787  0.052  0.00   0.000      0.  0.946E+00  0.480E-01  0.623E-03  0.193E-04   44   5  22   27  18  33   10  29   8    0.000    0.000       0
+  0   1770 00:16:24.25   0.5800A   3.1051   0.7774  -0.7471  0.053  0.00   0.000      0.  0.946E+00  0.482E-01  0.631E-03  0.187E-04   45  32  34   23  33   6    9  28   8    0.000    0.000       0
+  0   1780 00:16:30.03   0.5770A   3.1186  -0.7647  -0.6904  0.054  0.00   0.000      0.  0.946E+00  0.483E-01  0.630E-03  0.173E-04   46  31   2   19  10   9    6  18   8    0.000    0.000       0
+  0   1791 00:16:36.32   0.5680A   3.1695  -0.7969  -0.7383  0.054  0.00   0.000      0.  0.946E+00  0.484E-01  0.615E-03  0.156E-04   46  31  11   25  30  26   18  11   9    0.000    0.000       0
+  0   1802 00:16:42.53   0.5620A   3.2023  -0.7874  -0.7741  0.054  0.00   0.000      0.  0.946E+00  0.485E-01  0.607E-03  0.145E-04   46  31  20   25  29  31   17  13   9    0.000    0.000       0
+  0   1812 00:16:48.11   0.5560A   3.2352  -0.7940  -0.7025  0.054  0.00   0.000      0.  0.946E+00  0.485E-01  0.599E-03  0.133E-04   46  30  25   25  28  34   16  14   9    0.000    0.000       0
+  0   1823 00:16:54.23   0.5600A   3.2148  -0.7526   0.6787  0.053  0.00   0.000      0.  0.947E+00  0.486E-01  0.602E-03  0.130E-04   46  30  34   25  27  38   20  29   9    0.000    0.000       0
+  0   1834 00:17:00.44   0.5700A   3.1605   0.7175   0.7575  0.053  0.00   0.000      0.  0.947E+00  0.488E-01  0.612E-03  0.133E-04   46  30   3   24  38  26   20  29   9    0.000    0.000       0
+  0   1844 00:17:06.19   0.5800A   3.1023   0.7628   0.8400  0.054  0.00   0.000      0.  0.947E+00  0.490E-01  0.630E-03  0.163E-04   45  35  37   23  39  31   20  28   9    0.000    0.000       0
+  0   1855 00:17:12.56   0.5790A   3.1088  -0.7733  -0.7670  0.055  0.00   0.000      0.  0.947E+00  0.492E-01  0.640E-03  0.205E-04   46  35   6   20  19   9   18  21   9    0.000    0.000       0
+  0   1865 00:17:18.36   0.5820A   3.0928  -0.8299  -0.9441  0.055  0.00   0.000      0.  0.947E+00  0.494E-01  0.646E-03  0.215E-04   45  35  13   19  18   9   17  21   9    0.000    0.000       0
+  0   1875 00:17:24.18   0.5800A   3.1023  -0.8480  -0.9363  0.055  0.00   0.000      0.  0.947E+00  0.495E-01  0.644E-03  0.216E-04   45  33  10   19  18   9   16  21   9    0.000    0.000       0
+  0   1886 00:17:30.52   0.5740A   3.1332  -0.7617  -0.8781  0.055  0.00   0.000      0.  0.947E+00  0.496E-01  0.642E-03  0.230E-04   45  33  18   19  17   9   14  21   9    0.000    0.000       0
+  0   1896 00:17:36.28   0.5780A   3.1127   0.7613  -0.8539  0.055  0.00   0.000      0.  0.947E+00  0.498E-01  0.658E-03  0.240E-04   46  36  32   21   3  17   13  21   9    0.000    0.000       0
+  0   1906 00:17:42.12   0.5870A   3.0680   0.9057  -1.0204  0.056  0.00   0.000      0.  0.947E+00  0.500E-01  0.676E-03  0.214E-04   46  26  14   19  27   9   17  24   9    0.000    0.000       0
+  0   1916 00:17:48.01   0.5880A   3.0600   0.7886  -1.2110  0.057  0.00   0.000      0.  0.947E+00  0.500E-01  0.689E-03  0.188E-04   45  34   2   18  28   9   15  24   9    0.000    0.000       0
+  0   1927 00:17:54.48   0.5880A   3.0586   0.8750  -1.2179  0.058  0.00   0.000      0.  0.947E+00  0.498E-01  0.704E-03  0.188E-04   45  33   1   20  30   9   14  25   9    0.000    0.000       0
+  0   1937 00:18:00.36   0.5870A   3.0649   0.9734  -1.1635  0.059  0.00   0.000      0.  0.946E+00  0.494E-01  0.705E-03  0.172E-04   45  35  25   19  30   9   15  28   9    0.000    0.000       0
+  0   1947 00:18:06.22   0.5840A   3.0812   0.9773  -1.0665  0.060  0.00   0.000      0.  0.945E+00  0.489E-01  0.693E-03  0.163E-04   45  34  32   18  30   9   14  28   9    0.000    0.000       0
+  0   1957 00:18:12.01   0.5760A   3.1272  -0.8259   1.2136  0.059  0.00   0.000      0.  0.944E+00  0.485E-01  0.685E-03  0.166E-04   46  34   0   44   2  35   15  29   8    0.000    0.000       0
+  0   1968 00:18:18.33   0.5720A   3.1473  -0.9972   1.0660  0.059  0.00   0.000      0.  0.943E+00  0.481E-01  0.678E-03  0.151E-04   45  37   5   20  29   8   19  29   8    0.000    0.000       0
+  0   1979 00:18:24.53   0.5610A   3.2069  -0.8948   0.9876  0.057  0.00   0.000      0.  0.943E+00  0.477E-01  0.674E-03  0.153E-04   45  37  14   45   2  14   20  28   8    0.000    0.000       0
+  0   1989 00:18:30.11   0.5540A   3.2465  -0.9274   0.9817  0.056  0.00   0.000      0.  0.942E+00  0.473E-01  0.671E-03  0.167E-04   45  36  21   46   0  19   21  28   9    0.000    0.000       0
+  0   2000 00:18:36.18   0.5510A   3.2694  -0.9031  -0.7389  0.056  0.00   0.000      0.  0.941E+00  0.469E-01  0.667E-03  0.186E-04   46  36  30   46  39  26   15  18   9    0.000    0.000       0
+  0   2011 00:18:42.32   0.5690A   3.1657  -0.8838  -0.7481  0.055  0.00   0.000      0.  0.941E+00  0.466E-01  0.690E-03  0.227E-04   46  36  39   46  38  34   15  17   9    0.000    0.000       0
+  0   2021 00:18:48.03   0.5720A   3.1490  -0.8620  -0.7801  0.054  0.00   0.000      0.  0.940E+00  0.463E-01  0.693E-03  0.226E-04   44  35   3   20  18   9   16  18   9    0.000    0.000       0
+  0   2032 00:18:54.36   0.5680A   3.1682   0.7776  -0.8316  0.055  0.00   0.000      0.  0.940E+00  0.460E-01  0.686E-03  0.198E-04   45  37   7   20   6   8   16  19   9    0.000    0.000       0
+  0   2042 00:19:00.10   0.5870A   3.0651   0.7863  -0.8438  0.055  0.00   0.000      0.  0.940E+00  0.456E-01  0.694E-03  0.169E-04   46  39   7   16  10   6   16  21   9    0.000    0.000       0
+  0   2053 00:19:06.58   0.5850A   3.0773  -0.7529  -0.8579  0.055  0.00   0.000      0.  0.940E+00  0.451E-01  0.676E-03  0.141E-04   44  36  21   24  27  30   16  23   9    0.000    0.000       0
+  0   2063 00:19:12.38   0.5810A   3.0961  -0.7386  -0.8174  0.055  0.00   0.000      0.  0.940E+00  0.448E-01  0.663E-03  0.127E-04   44  36  29   25  26  34   15  23   9    0.000    0.000       0
+  0   2073 00:19:18.18   0.5830A   3.0893  -0.7783  -0.8315  0.055  0.00   0.000      0.  0.940E+00  0.445E-01  0.652E-03  0.118E-04   43  36  36   25  25  37   35  32  32    0.000    0.000       0
+  0   2084 00:19:24.57   0.5780A   3.1144  -0.7439  -0.7455  0.055  0.00   0.000      0.  0.940E+00  0.443E-01  0.633E-03  0.104E-04   46  34  24   25  24   0   34  35  34    0.000    0.000       0
+  0   2094 00:19:30.33   0.5740A   3.1370   0.6970  -0.7022  0.054  0.00   0.000      0.  0.940E+00  0.442E-01  0.620E-03  0.994E-05   46  34   2   24  11  11   12  22   9    0.000    0.000       0
+  0   2104 00:19:36.05   0.5680A   3.1703   0.7088  -0.6792  0.053  0.00   0.000      0.  0.941E+00  0.442E-01  0.613E-03  0.108E-04   46  34   9   24  12  14   33  31  10    0.000    0.000       0
+  0   2115 00:19:42.31   0.5700A   3.1584  -0.6856  -0.6932  0.052  0.00   0.000      0.  0.941E+00  0.443E-01  0.618E-03  0.124E-04   46  29  10   28  24  28   33  36  11    0.000    0.000       0
+  0   2126 00:19:48.53   0.5650A   3.1865  -0.6771  -0.7577  0.052  0.00   0.000      0.  0.942E+00  0.445E-01  0.613E-03  0.127E-04   46  29  18   26  23  31   33  36  17    0.000    0.000       0
+  0   2136 00:19:54.19   0.5670A   3.1751  -0.6983  -0.7562  0.051  0.00   0.000      0.  0.942E+00  0.447E-01  0.618E-03  0.132E-04   46  29  25   26  22  35   32  36  22    0.000    0.000       0
+  0   2147 00:20:00.43   0.5660A   3.1828  -0.6959  -0.7299  0.051  0.00   0.000      0.  0.943E+00  0.451E-01  0.619E-03  0.143E-04   46  31  31   25  22  39   31  36  28    0.000    0.000       0
+  0   2157 00:20:06.02   0.5540A   3.2485  -0.7512  -0.7575  0.051  0.00   0.000      0.  0.943E+00  0.454E-01  0.610E-03  0.165E-04   46  31  38   24  21   1   30  36  33    0.000    0.000       0
+  0   2168 00:20:12.09   0.5550A   3.2462  -0.8067  -0.6957  0.051  0.00   0.000      0.  0.943E+00  0.456E-01  0.614E-03  0.185E-04   46  31   5   19   9   9   18  16   9    0.000    0.000       0
+  0   2179 00:20:18.16   0.5540A   3.2512  -0.7689  -0.8869  0.051  0.00   0.000      0.  0.944E+00  0.458E-01  0.617E-03  0.175E-04   46  31  13   19  13   9   17  16   9    0.000    0.000       0
+  0   2190 00:20:24.37   0.5740A   3.1379  -0.8403  -1.0582  0.051  0.00   0.000      0.  0.944E+00  0.457E-01  0.636E-03  0.165E-04   46  31  21   18  13   9   16  17   9    0.000    0.000       0
+  0   2200 00:20:30.19   0.5830A   3.0858  -0.8047  -0.9929  0.050  0.00   0.000      0.  0.945E+00  0.455E-01  0.644E-03  0.185E-04   45  34  35   17  12   9   15  16   9    0.000    0.000       0
+  0   2210 00:20:36.06   0.5930A   3.0353  -0.8231  -0.9226  0.051  0.00   0.000      0.  0.945E+00  0.453E-01  0.650E-03  0.193E-04   45  34   3   17   9   9   14  16   9    0.000    0.000       0
+  0   2220 00:20:42.02   0.5970A   3.0152  -0.7363  -0.8400  0.051  0.00   0.000      0.  0.946E+00  0.452E-01  0.649E-03  0.198E-04   44  26  39   16   9   9   13  20   9    0.000    0.000       0
+  0   2231 00:20:48.55   0.5960A   3.0177  -0.8010  -0.7788  0.051  0.00   0.000      0.  0.946E+00  0.452E-01  0.642E-03  0.199E-04   44  26   7   26  28  31   12  21   9    0.000    0.000       0
+  0   2241 00:20:54.47   0.5850A   3.0751   0.7334  -0.7336  0.051  0.00   0.000      0.  0.947E+00  0.454E-01  0.630E-03  0.208E-04   45  37  22   27   2  19   10  21   9    0.000    0.000       0
+  0   2251 00:21:00.32   0.5860A   3.0737   0.6661  -0.7056  0.051  0.00   0.000      0.  0.947E+00  0.457E-01  0.625E-03  0.202E-04   45  37  29   27   5  24    8  21   9    0.000    0.000       0
+  0   2261 00:21:06.19   0.5910A   3.0439  -0.6618   0.7339  0.052  0.00   0.000      0.  0.948E+00  0.461E-01  0.628E-03  0.190E-04   46  37  37   26  25   3   21  27   9    0.000    0.000       0
+  0   2271 00:21:12.12   0.5930A   3.0368  -0.6723  -0.6975  0.052  0.00   0.000      0.  0.948E+00  0.466E-01  0.631E-03  0.177E-04   44  30   1   26  24   7   26   2  32    0.000    0.000       0
+  0   2281 00:21:18.06   0.5960A   3.0211   0.6867  -0.6569  0.052  0.00   0.000      0.  0.949E+00  0.471E-01  0.634E-03  0.178E-04   44  30   8   24  36  31   26   1   2    0.000    0.000       0
+  0   2292 00:21:24.59   0.5940A   3.0302   0.6987  -0.7603  0.051  0.00   0.000      0.  0.950E+00  0.476E-01  0.635E-03  0.185E-04   44  30  16   24  37  34   25   1   7    0.000    0.000       0
+  0   2302 00:21:30.55   0.5990A   3.0070   0.6796  -0.7500  0.050  0.00   0.000      0.  0.950E+00  0.481E-01  0.640E-03  0.191E-04   44  37  23   26  35   2   25   3  10    0.000    0.000       0
+  0   2312 00:21:36.48   0.5910A   3.0467  -0.7299  -0.7866  0.049  0.00   0.000      0.  0.951E+00  0.485E-01  0.639E-03  0.188E-04   44  37  30   24  29  30   24   4  13    0.000    0.000       0
+  0   2322 00:21:42.41   0.5950A   3.0260  -0.7700  -0.7006  0.049  0.00   0.000      0.  0.952E+00  0.491E-01  0.650E-03  0.185E-04   44  37  37   24  28  32   23   4  17    0.000    0.000       0
+  0   2332 00:21:48.44   0.6050A   2.9744  -0.7415   0.6820  0.049  0.00   0.000      0.  0.953E+00  0.498E-01  0.666E-03  0.174E-04   46   4   4   24  27  36   30   6  36    0.000    0.000       0
+  0   2342 00:21:54.44   0.5950A   3.0261   0.8090  -0.6861  0.050  0.00   0.000      0.  0.953E+00  0.507E-01  0.664E-03  0.175E-04   46   4  11   20  22   8   21   0  29    0.000    0.000       0
+  0   2352 00:22:00.39   0.5920A   3.0416  -0.7636  -0.7975  0.051  0.00   0.000      0.  0.954E+00  0.517E-01  0.664E-03  0.178E-04   46   4  18   25  23   3   20   1  33    0.000    0.000       0
+  0   2362 00:22:06.31   0.5880A   3.0589  -0.7368  -0.7733  0.053  0.00   0.000      0.  0.955E+00  0.527E-01  0.664E-03  0.164E-04   44   6  17   25  22   6   19   1  36    0.000    0.000       0
+  0   2372 00:22:12.19   0.5900A   3.0502   0.7120  -0.7628  0.054  0.00   0.000      0.  0.955E+00  0.539E-01  0.670E-03  0.155E-04   44   6  25   23  32  33   18  16   9    0.000    0.000       0
+  0   2382 00:22:18.12   0.5910A   3.0450   0.7460  -0.7751  0.054  0.00   0.000      0.  0.956E+00  0.552E-01  0.681E-03  0.170E-04   45   7  29   22  31  24   19   2   3    0.000    0.000       0
+  0   2392 00:22:24.03   0.5940A   3.0316   0.8084   0.7448  0.054  0.00   0.000      0.  0.956E+00  0.564E-01  0.695E-03  0.196E-04   44   7  37   24  35   1   32   7  26    0.000    0.000       0
+  0   2403 00:22:30.52   0.5810A   3.0994   0.7639   0.7144  0.052  0.00   0.000      0.  0.957E+00  0.576E-01  0.695E-03  0.212E-04   44   7  11   22  32  30   33   7  31    0.000    0.000       0
+  0   2413 00:22:36.27   0.5730A   3.1394   0.8013   0.7182  0.051  0.00   0.000      0.  0.957E+00  0.585E-01  0.698E-03  0.209E-04   44   7  18   22  31  33   25   8  19    0.000    0.000       0
+  0   2423 00:22:42.06   0.5820A   3.0940   0.7870   0.7894  0.050  0.00   0.000      0.  0.957E+00  0.592E-01  0.717E-03  0.191E-04   45   5  21   24  27   6   26   8  22    0.000    0.000       0
+  0   2434 00:22:48.46   0.5850A   3.0782   0.7830   0.8251  0.049  0.00   0.000      0.  0.957E+00  0.599E-01  0.735E-03  0.185E-04   46   5  29   23  33  39   27   8  25    0.000    0.000       0
+  0   2444 00:22:54.35   0.5880A   3.0620   0.7740   0.8147  0.048  0.00   0.000      0.  0.956E+00  0.605E-01  0.752E-03  0.198E-04   42  15  25   23  34   1   28   7  30    0.000    0.000       0
+  0   2454 00:23:00.21   0.5880A   3.0605  -0.8062   0.7814  0.047  0.00   0.000      0.  0.956E+00  0.610E-01  0.768E-03  0.233E-04   42  15  32   24  25  25   29   7  33    0.000    0.000       0
+  0   2464 00:23:06.11   0.5930A   3.0363   0.8311   0.7747  0.046  0.00   0.000      0.  0.955E+00  0.616E-01  0.787E-03  0.256E-04   42  15  39   23  36  11   20  14   9    0.000    0.000       0
+  0   2475 00:23:12.57   0.5850A   3.0772   0.9042  -0.7814  0.046  0.00   0.000      0.  0.955E+00  0.622E-01  0.790E-03  0.258E-04   42  15   7   21  28   8   24  24  30    0.000    0.000       0
+  0   2485 00:23:18.43   0.5840A   3.0819   0.8697  -0.7244  0.046  0.00   0.000      0.  0.954E+00  0.627E-01  0.796E-03  0.252E-04   46  31  18   24  37  17   22  32  39    0.000    0.000       0
+  0   2495 00:23:24.26   0.5820A   3.0913  -0.8741  -0.7970  0.046  0.00   0.000      0.  0.953E+00  0.634E-01  0.797E-03  0.214E-04   46  30  23   29   8  37   21  32   2    0.000    0.000       0
+  0   2505 00:23:30.06   0.5770A   3.1169   0.8160  -0.7667  0.047  0.00   0.000      0.  0.953E+00  0.640E-01  0.789E-03  0.175E-04   46  30  31   21   2   7   16   3  39    0.000    0.000       0
+  0   2516 00:23:36.39   0.5740A   3.1352   0.7895   0.7681  0.049  0.00   0.000      0.  0.952E+00  0.646E-01  0.786E-03  0.165E-04   46  30   0   21   3  10   21   3  22    0.000    0.000       0
+  0   2526 00:23:42.09   0.5680A   3.1695   0.7331   0.7974  0.049  0.00   0.000      0.  0.952E+00  0.650E-01  0.781E-03  0.174E-04   45   2  18   19  26   8   20  13   9    0.000    0.000       0
+  0   2537 00:23:48.37   0.5790A   3.1083  -0.7501   0.9291  0.049  0.00   0.000      0.  0.951E+00  0.654E-01  0.792E-03  0.168E-04   46  25  16   26   5   4   21  13   9    0.000    0.000       0
+  0   2547 00:23:54.12   0.5720A   3.1484   0.7554   0.7773  0.049  0.00   0.000      0.  0.950E+00  0.656E-01  0.783E-03  0.169E-04   44  36  15   23  32  11   23   4  33    0.000    0.000       0
+  0   2558 00:24:00.45   0.5770A   3.1216   0.8123   0.8089  0.049  0.00   0.000      0.  0.949E+00  0.657E-01  0.791E-03  0.172E-04   44   0  33   21   9   4   24   4  37    0.000    0.000       0
+  0   2568 00:24:06.16   0.5680A   3.1662   0.9065  -0.7279  0.048  0.00   0.000      0.  0.949E+00  0.659E-01  0.788E-03  0.211E-04   44   0   0   20   9   6   16   5   7    0.000    0.000       0
+  0   2579 00:24:12.47   0.5750A   3.1316   0.9369  -0.7580  0.048  0.00   0.000      0.  0.948E+00  0.663E-01  0.801E-03  0.233E-04   46  32   7   20  10   8   16   4  10    0.000    0.000       0
+  0   2589 00:24:18.20   0.5720A   3.1495   0.9137  -0.8413  0.048  0.00   0.000      0.  0.947E+00  0.666E-01  0.791E-03  0.195E-04   46  32  15   21  24   8   15   4  12    0.000    0.000       0
+  0   2600 00:24:24.48   0.5680A   3.1683   0.8608  -0.7852  0.048  0.00   0.000      0.  0.947E+00  0.669E-01  0.783E-03  0.188E-04   45  32  24    8  13   8   14   4  14    0.000    0.000       0
+  0   2610 00:24:30.14   0.5640A   3.1916   1.0299  -0.7286  0.048  0.00   0.000      0.  0.946E+00  0.672E-01  0.774E-03  0.206E-04   45  32  33    7  13   8   15   2  20    0.000    0.000       0
+  0   2621 00:24:36.29   0.5580A   3.2269  -1.0551  -0.7833  0.048  0.00   0.000      0.  0.946E+00  0.676E-01  0.762E-03  0.236E-04   45  32   1   18  10   9   17  11   9    0.000    0.000       0
+  0   2632 00:24:42.40   0.5540A   3.2471   1.0018  -0.8184  0.049  0.00   0.000      0.  0.945E+00  0.680E-01  0.761E-03  0.265E-04   45  32  10    6  16   8   16  11   9    0.000    0.000       0
+  0   2643 00:24:48.49   0.5530A   3.2568  -0.9586  -0.8799  0.051  0.00   0.000      0.  0.944E+00  0.685E-01  0.767E-03  0.245E-04   46  32  19   19  14   9   17  16   9    0.000    0.000       0
+  0   2653 00:24:54.03   0.5540A   3.2482  -0.8955  -0.9467  0.053  0.00   0.000      0.  0.944E+00  0.689E-01  0.765E-03  0.211E-04   46  30  24   18  13   9   16  15   9    0.000    0.000       0
+  0   2664 00:25:00.12   0.5550A   3.2410  -0.8640  -0.9469  0.056  0.00   0.000      0.  0.943E+00  0.693E-01  0.769E-03  0.198E-04   46  30  32   38  14  36   18  26   9    0.000    0.000       0
+  0   2675 00:25:06.27   0.5580A   3.2277  -0.8144  -0.9513  0.057  0.00   0.000      0.  0.942E+00  0.698E-01  0.771E-03  0.200E-04   45  28  24   38  13   1   17  25   9    0.000    0.000       0
+  0   2686 00:25:12.36   0.5510A   3.2674  -0.7951  -0.8710  0.058  0.00   0.000      0.  0.941E+00  0.702E-01  0.752E-03  0.193E-04   46  28  33   38  12   6   16  23   9    0.000    0.000       0
+  0   2697 00:25:18.42   0.5520A   3.2625  -0.7995  -0.7832  0.058  0.00   0.000      0.  0.940E+00  0.708E-01  0.748E-03  0.182E-04   46  28   2   26  32  20   15  23   9    0.000    0.000       0
+  0   2708 00:25:24.51   0.5550A   3.2453  -0.8466  -0.8054  0.058  0.00   0.000      0.  0.938E+00  0.713E-01  0.743E-03  0.185E-04   46  28  12   26  30  24   26  32  30    0.000    0.000       0
+  0   2718 00:25:30.03   0.5500A   3.2701  -0.8119   0.8814  0.057  0.00   0.000      0.  0.937E+00  0.718E-01  0.734E-03  0.203E-04   45  29  18   26  30  28   20  28   9    0.000    0.000       0
+  0   2729 00:25:36.08   0.5500A   3.2723  -0.7288   0.9756  0.055  0.00   0.000      0.  0.936E+00  0.724E-01  0.734E-03  0.216E-04   46  29  26   15  29   6   21  25   9    0.000    0.000       0
+  0   2740 00:25:42.11   0.5470A   3.2889  -0.7410   0.8619  0.054  0.00   0.000      0.  0.935E+00  0.728E-01  0.727E-03  0.201E-04   45  32  16   15  26   8   21  24   9    0.000    0.000       0
+  0   2751 00:25:48.11   0.5450A   3.3031   0.7540   0.7774  0.053  0.00   0.000      0.  0.934E+00  0.732E-01  0.722E-03  0.170E-04   45  32  24   21  35  12   21  23   9    0.000    0.000       0
+  0   2762 00:25:54.06   0.5370A   3.3548   0.7876   0.7721  0.053  0.00   0.000      0.  0.933E+00  0.735E-01  0.711E-03  0.161E-04   46  33  34   24  19  36   21  23   9    0.000    0.000       0
+  0   2774 00:26:00.47   0.5330A   3.3740   0.7927   0.7870  0.053  0.00   0.000      0.  0.932E+00  0.737E-01  0.710E-03  0.180E-04   46  33   3   24  20   0   21  23   9    0.000    0.000       0
+  0   2785 00:26:06.34   0.5310A   3.3880   0.9292  -0.7060  0.053  0.00   0.000      0.  0.931E+00  0.740E-01  0.719E-03  0.215E-04   44  27   3   20  30   9   13  37  19    0.000    0.000       0
+  0   2796 00:26:12.21   0.5360A   3.3588   1.1229   0.7176  0.054  0.00   0.000      0.  0.930E+00  0.745E-01  0.734E-03  0.243E-04   43  34  19   19  31   9   26  31   5    0.000    0.000       0
+  0   2807 00:26:18.10   0.5350A   3.3626   1.1254  -0.8611  0.055  0.00   0.000      0.  0.929E+00  0.750E-01  0.741E-03  0.230E-04   46  27  19   18  31   9   20  28   8    0.000    0.000       0
+  0   2819 00:26:24.49   0.5330A   3.3759   0.9333   1.0020  0.056  0.00   0.000      0.  0.928E+00  0.755E-01  0.743E-03  0.213E-04   46  27  27   19  30   9   19  31   8    0.000    0.000       0
+  0   2830 00:26:30.34   0.5320A   3.3852   0.7879  -0.9809  0.057  0.00   0.000      0.  0.926E+00  0.758E-01  0.746E-03  0.193E-04   46  28  36   19  30   9   16  21   9    0.000    0.000       0
+  0   2841 00:26:36.21   0.5360A   3.3568  -0.8317  -0.9950  0.058  0.00   0.000      0.  0.925E+00  0.758E-01  0.756E-03  0.186E-04   46  28   4   20  23   4   15  20   9    0.000    0.000       0
+  0   2852 00:26:42.13   0.5410A   3.3248   0.6932  -0.9300  0.058  0.00   0.000      0.  0.924E+00  0.756E-01  0.763E-03  0.194E-04   46  28  13   25  29  27   14  19   9    0.000    0.000       0
+  0   2863 00:26:48.07   0.5360A   3.3603   0.6951   0.8965  0.056  0.00   0.000      0.  0.923E+00  0.751E-01  0.756E-03  0.207E-04   45  33   6   14   5  35   20  11   9    0.000    0.000       0
+  0   2875 00:26:54.48   0.5350A   3.3651   0.6982   0.8638  0.056  0.00   0.000      0.  0.922E+00  0.746E-01  0.751E-03  0.212E-04   46  32  15   15   5  38   20  10   9    0.000    0.000       0
+  0   2886 00:27:00.30   0.5260A   3.4216   0.7445   1.0565  0.055  0.00   0.000      0.  0.921E+00  0.742E-01  0.742E-03  0.220E-04   46  32  23   19  10   8   20  11   9    0.000    0.000       0
+  0   2897 00:27:06.11   0.5320A   3.3844   0.8954   0.8698  0.055  0.00   0.000      0.  0.920E+00  0.739E-01  0.749E-03  0.237E-04   46  32  32   19  13   9   20  13   9    0.000    0.000       0
+  0   2909 00:27:12.46   0.5250A   3.4262  -0.8471  -0.7901  0.055  0.00   0.000      0.  0.919E+00  0.737E-01  0.742E-03  0.256E-04   44  34  37   21  11   8   20  10   8    0.000    0.000       0
+  0   2920 00:27:18.20   0.5230A   3.4416  -1.0869  -0.7858  0.055  0.00   0.000      0.  0.918E+00  0.734E-01  0.737E-03  0.226E-04   44  34   5   20  11   8   17  20   9    0.000    0.000       0
+  0   2932 00:27:24.51   0.5230A   3.4410  -1.0070  -0.9809  0.056  0.00   0.000      0.  0.916E+00  0.730E-01  0.729E-03  0.193E-04   44  33  15   20   9   9   16  19   9    0.000    0.000       0
+  0   2943 00:27:30.30   0.5320A   3.3858   0.9687  -0.9187  0.056  0.00   0.000      0.  0.915E+00  0.725E-01  0.737E-03  0.189E-04   43  33  21   14  16   9   15  19   9    0.000    0.000       0
+  0   2954 00:27:36.16   0.5350A   3.3640   0.8957  -0.8585  0.056  0.00   0.000      0.  0.914E+00  0.720E-01  0.740E-03  0.184E-04   43  33  29   13  17   9   12  19   9    0.000    0.000       0
+  0   2965 00:27:42.08   0.5360A   3.3606   0.8705  -0.7853  0.056  0.00   0.000      0.  0.913E+00  0.716E-01  0.740E-03  0.172E-04   46  31  18   12  18   9   11  20   9    0.000    0.000       0
+  0   2977 00:27:48.53   0.5420A   3.3229   0.7647  -0.8841  0.057  0.00   0.000      0.  0.912E+00  0.713E-01  0.742E-03  0.169E-04   46  31  26    9  18   9   37  39  30    0.000    0.000       0
+  0   2988 00:27:54.51   0.5430A   3.3138   0.8265  -0.8250  0.057  0.00   0.000      0.  0.911E+00  0.712E-01  0.729E-03  0.170E-04   46  32  38    9  19   9   28  22  38    0.000    0.000       0
+  0   2999 00:28:00.49   0.5410A   3.3284  -0.8609  -0.7613  0.057  0.00   0.000      0.  0.911E+00  0.712E-01  0.717E-03  0.172E-04   46  31   4   28  12  35   35  38   2    0.000    0.000       0
+  0   3010 00:28:06.45   0.5440A   3.3105  -0.8096  -0.7903  0.057  0.00   0.000      0.  0.910E+00  0.714E-01  0.717E-03  0.175E-04   46  31  12   28  10  38   36  37  13    0.000    0.000       0
+  0   3021 00:28:12.42   0.5450A   3.3002  -0.7803  -0.7664  0.058  0.00   0.000      0.  0.909E+00  0.716E-01  0.720E-03  0.179E-04   45  31  19   20  13   9   33  36  20    0.000    0.000       0
+  0   3032 00:28:18.48   0.5530A   3.2533  -0.8059  -0.7632  0.058  0.00   0.000      0.  0.908E+00  0.717E-01  0.734E-03  0.191E-04   43  32  11   46  25   0   35  38  19    0.000    0.000       0
+  0   3042 00:28:24.04   0.5590A   3.2217  -0.8060  -1.0292  0.059  0.00   0.000      0.  0.907E+00  0.717E-01  0.747E-03  0.207E-04   43  32  19   46  22   5   17  25   9    0.000    0.000       0
+  0   3053 00:28:30.25   0.5690A   3.1657   0.9993  -1.2113  0.060  0.00   0.000      0.  0.907E+00  0.716E-01  0.773E-03  0.228E-04   43  32  27   18  30   9   15  24   9    0.000    0.000       0
+  0   3064 00:28:36.53   0.5720A   3.1455   0.9557  -1.2160  0.060  0.00   0.000      0.  0.906E+00  0.712E-01  0.783E-03  0.229E-04   44  32  11   17  31   9   14  26   9    0.000    0.000       0
+  0   3074 00:28:42.25   0.5740A   3.1350  -0.8245  -1.1453  0.060  0.00   0.000      0.  0.906E+00  0.706E-01  0.777E-03  0.227E-04   44  32  18   20  28   8   13  26   9    0.000    0.000       0
+  0   3084 00:28:48.00   0.5790A   3.1067   0.8490  -1.0822  0.061  0.00   0.000      0.  0.905E+00  0.702E-01  0.774E-03  0.215E-04   42  30   1   28  33  36   14  22   9    0.000    0.000       0
+  0   3095 00:28:54.44   0.5840A   3.0824   0.8454  -0.9665  0.060  0.00   0.000      0.  0.904E+00  0.699E-01  0.783E-03  0.233E-04   43  33  34   28  34  39   12  25   9    0.000    0.000       0
+  0   3105 00:29:00.24   0.5790A   3.1067   0.8315  -0.9074  0.059  0.00   0.000      0.  0.904E+00  0.700E-01  0.790E-03  0.281E-04   43  33   6   27  35   1   11  25   9    0.000    0.000       0
+  0   3115 00:29:06.05   0.5850A   3.0782   0.8174   1.0032  0.058  0.00   0.000      0.  0.903E+00  0.703E-01  0.810E-03  0.317E-04   43  33  13   24  34   0   20  27   9    0.000    0.000       0
+  0   3126 00:29:12.40   0.5720A   3.1478  -0.8274   0.9018  0.057  0.00   0.000      0.  0.903E+00  0.709E-01  0.789E-03  0.294E-04   42  33  20   27  23  39   20  26   9    0.000    0.000       0
+  0   3136 00:29:18.06   0.5650A   3.1845  -0.9179   0.9104  0.058  0.00   0.000      0.  0.902E+00  0.714E-01  0.776E-03  0.249E-04   42  33  26   20  17   8   20  10   9    0.000    0.000       0
+  0   3147 00:29:24.29   0.5680A   3.1672  -0.8800  -1.2204  0.059  0.00   0.000      0.  0.901E+00  0.716E-01  0.780E-03  0.233E-04   42  33  34   12  34  38   17  18   9    0.000    0.000       0
+  0   3157 00:29:30.03   0.5740A   3.1359  -0.8908  -1.2710  0.061  0.00   0.000      0.  0.900E+00  0.715E-01  0.785E-03  0.227E-04   41  33   0   12  33  39   16  17   9    0.000    0.000       0
+  0   3168 00:29:36.30   0.5680A   3.1709  -0.8130  -1.0594  0.062  0.00   0.000      0.  0.900E+00  0.713E-01  0.777E-03  0.214E-04   41  33   8   12  32   1   14  17   9    0.000    0.000       0
+  0   3179 00:29:42.53   0.5650A   3.1836  -0.7512  -0.9122  0.062  0.00   0.000      0.  0.899E+00  0.710E-01  0.767E-03  0.196E-04   41  33  16   11  32   1   12  20   9    0.000    0.000       0
+  0   3189 00:29:48.26   0.5770A   3.1176  -0.7117  -0.8492  0.062  0.00   0.000      0.  0.898E+00  0.708E-01  0.773E-03  0.179E-04   41  33  23   27  25  18   11  20   9    0.000    0.000       0
+  0   3199 00:29:54.08   0.5890A   3.0551   0.6713  -0.7973  0.062  0.00   0.000      0.  0.897E+00  0.708E-01  0.786E-03  0.190E-04   41  32  31   27   2  36    9  20   9    0.000    0.000       0
+  0   3209 00:30:00.01   0.5990A   3.0030   0.7236  -0.8149  0.061  0.00   0.000      0.  0.897E+00  0.709E-01  0.799E-03  0.200E-04   41  32  38   27   3  39   16  36  23    0.000    0.000       0
+  0   3219 00:30:06.08   0.6100A   2.9503   0.7168   0.8580  0.060  0.00   0.000      0.  0.896E+00  0.711E-01  0.809E-03  0.213E-04   46  38  13   21  21   6   20  28   9    0.000    0.000       0
+  0   3229 00:30:12.11   0.6020A   2.9900   0.7535   0.8466  0.058  0.00   0.000      0.  0.895E+00  0.714E-01  0.799E-03  0.227E-04   46  38  20   21  21   8   21  28   9    0.000    0.000       0
+  0   3239 00:30:18.13   0.5940A   3.0290   0.7607   0.7377  0.058  0.00   0.000      0.  0.894E+00  0.716E-01  0.784E-03  0.208E-04   46  37  27   36  17   6   21  13   9    0.000    0.000       0
+  0   3249 00:30:24.05   0.5890A   3.0560   0.7488   0.7537  0.057  0.00   0.000      0.  0.894E+00  0.717E-01  0.773E-03  0.201E-04   46  37  34   36  19  11   20  11   9    0.000    0.000       0
+  0   3260 00:30:30.56   0.5870A   3.0687  -0.8102  -0.7178  0.056  0.00   0.000      0.  0.893E+00  0.716E-01  0.772E-03  0.204E-04   44  31  13   20  10   9   33  12  29    0.000    0.000       0
+  0   3270 00:30:36.41   0.5810A   3.0966  -1.0004  -0.6856  0.056  0.00   0.000      0.  0.893E+00  0.714E-01  0.768E-03  0.185E-04   44  31  20   19   9   9   33  12  20    0.000    0.000       0
+  0   3280 00:30:42.27   0.5860A   3.0715  -0.8571   0.7324  0.056  0.00   0.000      0.  0.893E+00  0.710E-01  0.772E-03  0.174E-04   46  32  24   18   9   9   20  11   5    0.000    0.000       0
+  0   3290 00:30:48.09   0.5810A   3.1001   0.7226  -0.7604  0.056  0.00   0.000      0.  0.893E+00  0.705E-01  0.765E-03  0.179E-04   45  31  30   35  20  33   31  12  28    0.000    0.000       0
+  0   3301 00:30:54.45   0.5790A   3.1063   0.7655  -0.7111  0.058  0.00   0.000      0.  0.892E+00  0.702E-01  0.766E-03  0.205E-04   46  31  38   20  26   8   29  12  32    0.000    0.000       0
+  0   3311 00:31:00.20   0.5780A   3.1128   0.7567   0.7250  0.059  0.00   0.000      0.  0.892E+00  0.700E-01  0.768E-03  0.219E-04   46  31   4   20  27   8   39  14  17    0.000    0.000       0
+  0   3322 00:31:06.54   0.5770A   3.1181   0.7021  -0.8470  0.060  0.00   0.000      0.  0.892E+00  0.698E-01  0.769E-03  0.220E-04   46  31  12   36   1  29   18  21   9    0.000    0.000       0
+  0   3332 00:31:12.35   0.5850A   3.0785   0.7807  -1.0301  0.061  0.00   0.000      0.  0.891E+00  0.696E-01  0.787E-03  0.218E-04   46  31  19   20  30   9   17  21   9    0.000    0.000       0
+  0   3342 00:31:18.24   0.5920A   3.0421   0.8015  -1.1002  0.061  0.00   0.000      0.  0.890E+00  0.694E-01  0.798E-03  0.208E-04   46  31  27   18  25   9   15  21   9    0.000    0.000       0
+  0   3352 00:31:24.15   0.5900A   3.0530   0.7924  -1.0827  0.060  0.00   0.000      0.  0.890E+00  0.691E-01  0.796E-03  0.203E-04   44  39  12   30   2   0   15  20   9    0.000    0.000       0
+  0   3362 00:31:30.03   0.5890A   3.0542  -0.8004  -1.0962  0.059  0.00   0.000      0.  0.889E+00  0.686E-01  0.790E-03  0.210E-04   46  39  17   31   7  31   16  18   9    0.000    0.000       0
+  0   3373 00:31:36.44   0.5800A   3.1052   0.7969  -1.1245  0.058  0.00   0.000      0.  0.888E+00  0.683E-01  0.779E-03  0.231E-04   43  37  25   28   2   9   16  17   9    0.000    0.000       0
+  0   3383 00:31:42.31   0.5940A   3.0327   0.7865  -1.0626  0.057  0.00   0.000      0.  0.887E+00  0.681E-01  0.802E-03  0.243E-04   43  37   7   30   1  14   15  17   9    0.000    0.000       0
+  0   3393 00:31:48.15   0.5760A   3.1251   0.8679  -0.9179  0.056  0.00   0.000      0.  0.887E+00  0.681E-01  0.786E-03  0.232E-04   43  37   1   29   1  19   14  17   9    0.000    0.000       0
+  0   3404 00:31:54.55   0.5910A   3.0465   0.9470  -0.7879  0.056  0.00   0.000      0.  0.886E+00  0.681E-01  0.803E-03  0.218E-04   43  37   8   29   3  24   11  20   9    0.000    0.000       0
+  0   3414 00:32:00.44   0.5830A   3.0853  -0.9864   0.7213  0.057  0.00   0.000      0.  0.885E+00  0.682E-01  0.789E-03  0.206E-04   44  34  39   20  14   9   34  30  14    0.000    0.000       0
+  0   3424 00:32:06.26   0.5840A   3.0842  -0.8336  -0.8514  0.057  0.00   0.000      0.  0.884E+00  0.681E-01  0.789E-03  0.189E-04   44  34   7   20  13   9   17  15   9    0.000    0.000       0
+  0   3434 00:32:12.14   0.5890A   3.0581  -0.7888  -0.9252  0.058  0.00   0.000      0.  0.884E+00  0.679E-01  0.792E-03  0.177E-04   44  33  13   18  13   9   16  15   9    0.000    0.000       0
+  0   3444 00:32:18.04   0.5960A   3.0199   0.8332  -0.8541  0.058  0.00   0.000      0.  0.883E+00  0.675E-01  0.795E-03  0.179E-04   44  33  21   26   2  22   17  14   9    0.000    0.000       0
+  0   3455 00:32:24.43   0.5700A   3.1606   0.8599  -0.7993  0.057  0.00   0.000      0.  0.883E+00  0.669E-01  0.757E-03  0.162E-04   43  33  30   26   4  25   15  14   9    0.000    0.000       0
+  0   3465 00:32:30.17   0.5820A   3.0947   0.8439  -0.7429  0.057  0.00   0.000      0.  0.883E+00  0.665E-01  0.771E-03  0.162E-04   43  33  37   28   9   9   14  14   9    0.000    0.000       0
+  0   3475 00:32:36.06   0.6020A   2.9877   0.7692  -0.6977  0.057  0.00   0.000      0.  0.882E+00  0.660E-01  0.795E-03  0.155E-04   46   2  18   26   6  31   17  30   8    0.000    0.000       0
+  0   3485 00:32:42.07   0.5990A   3.0034   0.7691  -0.7218  0.057  0.00   0.000      0.  0.882E+00  0.654E-01  0.792E-03  0.160E-04   43  34  11   26   8  34   16  29   8    0.000    0.000       0
+  0   3496 00:32:48.56   0.5840A   3.0814   0.7159  -0.6861  0.057  0.00   0.000      0.  0.882E+00  0.649E-01  0.767E-03  0.147E-04   43  34  19   22  30  15   27  34  23    0.000    0.000       0
+  0   3506 00:32:54.39   0.5880A   3.0597   0.7921  -0.7317  0.058  0.00   0.000      0.  0.882E+00  0.644E-01  0.775E-03  0.151E-04   43  34  25   22  31  18   28   2   9    0.000    0.000       0
+  0   3516 00:33:00.29   0.6020A   2.9924   0.8239  -0.7297  0.059  0.00   0.000      0.  0.881E+00  0.639E-01  0.797E-03  0.168E-04   43  34  32   27  37   1   27   2  12    0.000    0.000       0
+  0   3526 00:33:06.34   0.6010A   2.9960   0.8218  -1.0080  0.059  0.00   0.000      0.  0.881E+00  0.633E-01  0.796E-03  0.186E-04   43  24  23   27  38   4   17  14   9    0.000    0.000       0
+  0   3536 00:33:12.24   0.5910A   3.0478   0.8026  -1.1445  0.059  0.00   0.000      0.  0.880E+00  0.627E-01  0.779E-03  0.185E-04   43  24  29   27  37   9   16  13   9    0.000    0.000       0
+  0   3546 00:33:18.15   0.5890A   3.0585   0.7732  -1.1010  0.059  0.00   0.000      0.  0.880E+00  0.621E-01  0.774E-03  0.191E-04   43  23  36   26  37  13   15  10   9    0.000    0.000       0
+  0   3556 00:33:24.11   0.5970A   3.0176   0.8625  -1.0153  0.059  0.00   0.000      0.  0.880E+00  0.616E-01  0.781E-03  0.206E-04   44  24   7   26  39  21   14  12   9    0.000    0.000       0
+  0   3566 00:33:30.08   0.5960A   3.0223   0.8295  -0.9405  0.058  0.00   0.000      0.  0.879E+00  0.613E-01  0.775E-03  0.232E-04   44  25  13   25  38  25   12  12   9    0.000    0.000       0
+  0   3577 00:33:36.53   0.5840A   3.0827   0.9236   0.9186  0.058  0.00   0.000      0.  0.879E+00  0.611E-01  0.753E-03  0.240E-04   44  25  21   25  39  29   20  12   9    0.000    0.000       0
+  0   3587 00:33:42.30   0.5760A   3.1227   0.8539   0.9096  0.058  0.00   0.000      0.  0.879E+00  0.609E-01  0.736E-03  0.234E-04   44  25  29   25   1  32   20  12   9    0.000    0.000       0
+  0   3597 00:33:48.12   0.5840A   3.0842   0.7158   0.8440  0.058  0.00   0.000      0.  0.878E+00  0.609E-01  0.742E-03  0.242E-04   44  25  37   24   0  35   20  12   9    0.000    0.000       0
+  0   3608 00:33:54.55   0.5860A   3.0702  -0.6649  -0.8148  0.057  0.00   0.000      0.  0.878E+00  0.608E-01  0.745E-03  0.240E-04   44  25   5   29  11   7   25  30  34    0.000    0.000       0
+  0   3618 00:34:00.49   0.5990A   3.0041  -0.7317   0.8385  0.057  0.00   0.000      0.  0.878E+00  0.608E-01  0.757E-03  0.227E-04   44  23   8   26  27  25   20  26   9    0.000    0.000       0
+  0   3628 00:34:06.55   0.6090A   2.9579  -0.7366  -0.7990  0.058  0.00   0.000      0.  0.877E+00  0.608E-01  0.762E-03  0.216E-04   44  29   2   26  26  28   17  20   9    0.000    0.000       0
+  0   3637 00:34:12.04   0.6090A   2.9574  -0.6845  -0.8545  0.058  0.00   0.000      0.  0.877E+00  0.607E-01  0.751E-03  0.202E-04   46  34  35   26  25  30   16  20   9    0.000    0.000       0
+  0   3647 00:34:18.15   0.6120A   2.9405  -0.6715  -0.8701  0.059  0.00   0.000      0.  0.876E+00  0.605E-01  0.738E-03  0.172E-04   44  27  25   23  37   6   15  21   9    0.000    0.000       0
+  0   3657 00:34:24.26   0.6100A   2.9513   0.7721  -0.8314  0.060  0.00   0.000      0.  0.876E+00  0.602E-01  0.719E-03  0.160E-04   44  27  33   21  31  12   13  21   9    0.000    0.000       0
+  0   3667 00:34:30.35   0.6060A   2.9725   0.7076  -0.7697  0.061  0.00   0.000      0.  0.876E+00  0.599E-01  0.702E-03  0.137E-04   45  25  12   21  32  15   18  29   9    0.000    0.000       0
+  0   3677 00:34:36.35   0.5970A   3.0129  -0.6973  -0.8837  0.062  0.00   0.000      0.  0.875E+00  0.596E-01  0.681E-03  0.139E-04   45  25  19   21  32  13   17  24   9    0.000    0.000       0
+  0   3687 00:34:42.30   0.5930A   3.0335   0.6793  -0.9460  0.062  0.00   0.000      0.  0.875E+00  0.594E-01  0.674E-03  0.154E-04   45  25  27   20   6  39   17  25   9    0.000    0.000       0
+  0   3697 00:34:48.24   0.5940A   3.0318   0.7155  -0.8177  0.062  0.00   0.000      0.  0.874E+00  0.593E-01  0.674E-03  0.185E-04   46  25  35   20   7   2   16  25   9    0.000    0.000       0
+  0   3707 00:34:54.14   0.5870A   3.0640   0.6850  -0.7450  0.062  0.00   0.000      0.  0.874E+00  0.593E-01  0.666E-03  0.208E-04   46  36  38   20  13   9   15  26   9    0.000    0.000       0
+  0   3717 00:35:00.02   0.5890A   3.0541   0.7129  -0.7075  0.061  0.00   0.000      0.  0.874E+00  0.593E-01  0.664E-03  0.222E-04   46  36   6   20  14   9   19  38  11    0.000    0.000       0
+  0   3728 00:35:06.52   0.5950A   3.0252   0.6355   0.7233  0.060  0.00   0.000      0.  0.874E+00  0.593E-01  0.668E-03  0.229E-04   45  36  14   19  13   9   20  10   9    0.000    0.000       0
+  0   3738 00:35:12.50   0.5960A   3.0185  -0.7388   0.7684  0.060  0.00   0.000      0.  0.873E+00  0.592E-01  0.662E-03  0.206E-04   46  25   0   21  12   6   21  25   9    0.000    0.000       0
+  0   3748 00:35:18.47   0.5980A   3.0081  -1.0816  -0.6377  0.060  0.00   0.000      0.  0.873E+00  0.590E-01  0.655E-03  0.176E-04   45  27  26   21  11   8   30  23  35    0.000    0.000       0
+  0   3758 00:35:24.41   0.5900A   3.0518  -0.9733  -0.6299  0.060  0.00   0.000      0.  0.873E+00  0.588E-01  0.641E-03  0.171E-04   45  24  13   20  11   8   30  23   1    0.000    0.000       0
+  0   3768 00:35:30.25   0.5810A   3.0958  -0.9011  -0.6614  0.061  0.00   0.000      0.  0.873E+00  0.586E-01  0.631E-03  0.172E-04   46  24  21   20  10   8   25   0   9    0.000    0.000       0
+  0   3778 00:35:36.02   0.5760A   3.1273  -0.7311  -0.6227  0.061  0.00   0.000      0.  0.873E+00  0.585E-01  0.629E-03  0.185E-04   46  24  28   20   9   9   14  23   8    0.000    0.000       0
+  0   3789 00:35:42.37   0.5820A   3.0916  -0.7129  -0.6555  0.060  0.00   0.000      0.  0.873E+00  0.584E-01  0.637E-03  0.197E-04   46  24  36   20  14   9   21   0  17    0.000    0.000       0
+  0   3799 00:35:48.25   0.5940A   3.0312  -0.7285  -0.6590  0.060  0.00   0.000      0.  0.873E+00  0.584E-01  0.646E-03  0.188E-04   46  23   2   19  14   9   17  22   9    0.000    0.000       0
+  0   3809 00:35:54.13   0.5870A   3.0671  -0.6290  -0.7274  0.060  0.00   0.000      0.  0.873E+00  0.583E-01  0.635E-03  0.186E-04   46  23  10   20  26   7   17  22   9    0.000    0.000       0
+  0   3819 00:36:00.00   0.5900A   3.0511   0.6112  -0.7383  0.060  0.00   0.000      0.  0.873E+00  0.584E-01  0.634E-03  0.184E-04   46  23  17   26  24  36   16  22   9    0.000    0.000       0
+  0   3830 00:36:06.51   0.5900A   3.0497   0.7257  -0.6763  0.060  0.00   0.000      0.  0.873E+00  0.587E-01  0.627E-03  0.164E-04   44  23  27   26  24   0   15  22   9    0.000    0.000       0
+  0   3840 00:36:12.38   0.5860A   3.0737   0.6887   0.6900  0.060  0.00   0.000      0.  0.873E+00  0.589E-01  0.620E-03  0.162E-04   44  23  34   26  25   3   20  11   9    0.000    0.000       0
+  0   3850 00:36:18.24   0.5840A   3.0820   0.6807   0.7168  0.060  0.00   0.000      0.  0.873E+00  0.592E-01  0.620E-03  0.177E-04   44  23   2   23  25   5   20  12   9    0.000    0.000       0
+  0   3860 00:36:24.07   0.5800A   3.1056   0.6744   0.7549  0.059  0.00   0.000      0.  0.873E+00  0.595E-01  0.627E-03  0.196E-04   44  22   9   23  26   7   21  12   9    0.000    0.000       0
+  0   3871 00:36:30.48   0.5880A   3.0624  -0.6129   0.9883  0.059  0.00   0.000      0.  0.873E+00  0.599E-01  0.649E-03  0.214E-04   44  22  17   20   6   0   20  10   9    0.000    0.000       0
+  0   3881 00:36:36.39   0.5910A   3.0467  -0.6274   0.8755  0.058  0.00   0.000      0.  0.873E+00  0.601E-01  0.662E-03  0.222E-04   46  39  35   15  27   8   20  10   9    0.000    0.000       0
+  0   3891 00:36:42.34   0.5980A   3.0091  -0.7363   0.9417  0.058  0.00   0.000      0.  0.873E+00  0.603E-01  0.675E-03  0.255E-04   46  38   4   22  11   8   20  11   9    0.000    0.000       0
+  0   3901 00:36:48.28   0.5930A   3.0361   0.8582   0.8763  0.058  0.00   0.000      0.  0.873E+00  0.606E-01  0.679E-03  0.260E-04   46  33  36   20  25   9   20  11   9    0.000    0.000       0
+  0   3911 00:36:54.18   0.5910A   3.0439  -0.9681   0.8407  0.058  0.00   0.000      0.  0.873E+00  0.608E-01  0.681E-03  0.254E-04   46  33   3   21  11   8   20  11   9    0.000    0.000       0
+  0   3921 00:37:00.12   0.5940A   3.0280  -0.9291   0.7311  0.058  0.00   0.000      0.  0.873E+00  0.609E-01  0.681E-03  0.238E-04   46  36   5   20  10   8   20  26   9    0.000    0.000       0
+  0   3931 00:37:06.07   0.5940A   3.0306  -0.9497  -0.7726  0.059  0.00   0.000      0.  0.873E+00  0.609E-01  0.686E-03  0.252E-04   46  36  12   19   9   9   18   5  17    0.000    0.000       0
+  0   3942 00:37:12.58   0.5870A   3.0662   0.9444  -0.8616  0.059  0.00   0.000      0.  0.873E+00  0.608E-01  0.681E-03  0.275E-04   43  22  32   12  15   9   16  10   8    0.000    0.000       0
+  0   3952 00:37:18.38   0.5800A   3.1016   0.9507  -0.8440  0.059  0.00   0.000      0.  0.873E+00  0.608E-01  0.672E-03  0.265E-04   43  22   0   12  16   9   13  10   8    0.000    0.000       0
+  0   3962 00:37:24.19   0.5840A   3.0841   0.9520  -0.8137  0.058  0.00   0.000      0.  0.873E+00  0.609E-01  0.675E-03  0.268E-04   43  22   7   11  17   9   15  12   8    0.000    0.000       0
+  0   3972 00:37:30.10   0.5960A   3.0197   0.9112   0.8071  0.057  0.00   0.000      0.  0.873E+00  0.610E-01  0.693E-03  0.269E-04   46  37  24   11  18   9   21  26   9    0.000    0.000       0
+  0   3982 00:37:36.06   0.5960A   3.0185   0.8305   0.8779  0.055  0.00   0.000      0.  0.873E+00  0.610E-01  0.692E-03  0.244E-04   45  37  31   11  19   9   21  25   9    0.000    0.000       0
+  0   3992 00:37:42.09   0.6070A   2.9666  -0.8847   0.9597  0.054  0.00   0.000      0.  0.873E+00  0.610E-01  0.703E-03  0.242E-04   46  21  36   20  21   8   20  11   9    0.000    0.000       0
+  0   4002 00:37:48.13   0.6010A   2.9929   0.8764   0.9232  0.054  0.00   0.000      0.  0.873E+00  0.610E-01  0.698E-03  0.245E-04   46  21   4   20  30   9   20  11   9    0.000    0.000       0
+  0   4012 00:37:54.13   0.5990A   3.0051   0.8542   0.8833  0.054  0.00   0.000      0.  0.873E+00  0.611E-01  0.696E-03  0.236E-04   46  21  12   19  31   9   20  11   9    0.000    0.000       0
+  0   4022 00:38:00.10   0.5940A   3.0313   0.7825   0.7866  0.054  0.00   0.000      0.  0.873E+00  0.611E-01  0.690E-03  0.206E-04   46  21  20    8  21   8   21  12   9    0.000    0.000       0
+  0   4033 00:38:06.49   0.5730A   3.1395   0.8162  -0.7410  0.055  0.00   0.000      0.  0.872E+00  0.611E-01  0.666E-03  0.185E-04   45  21  28    7  22   8   17  29   9    0.000    0.000       0
+  0   4043 00:38:12.16   0.5650A   3.1839   0.8338  -0.6770  0.056  0.00   0.000      0.  0.872E+00  0.611E-01  0.655E-03  0.188E-04   45  21  35    6  23   8    3  23   7    0.000    0.000       0
+  0   4054 00:38:18.38   0.5670A   3.1737   0.7420  -0.7679  0.056  0.00   0.000      0.  0.872E+00  0.611E-01  0.663E-03  0.204E-04   45  21   3   12  17   9   18  18   9    0.000    0.000       0
+  0   4064 00:38:24.08   0.5700A   3.1590   0.7162  -0.9425  0.057  0.00   0.000      0.  0.872E+00  0.612E-01  0.667E-03  0.203E-04   46  22  11   11  17   9   17  18   9    0.000    0.000       0
+  0   4075 00:38:30.35   0.5690A   3.1655  -0.7190  -0.9668  0.057  0.00   0.000      0.  0.872E+00  0.612E-01  0.665E-03  0.207E-04   46  21  20   26  24   6   16  18   9    0.000    0.000       0
+  0   4085 00:38:36.02   0.5680A   3.1713  -0.6859  -0.8750  0.057  0.00   0.000      0.  0.872E+00  0.613E-01  0.662E-03  0.203E-04   46  21  27   27  28  26   15  19   9    0.000    0.000       0
+  0   4096 00:38:42.29   0.5720A   3.1448  -0.7105  -0.8057  0.058  0.00   0.000      0.  0.872E+00  0.614E-01  0.667E-03  0.184E-04   44  21  36   27  27  29   14  19   8    0.000    0.000       0
+  0   4107 00:38:48.51   0.5630A   3.1962  -0.8334   0.9302  0.058  0.00   0.000      0.  0.872E+00  0.615E-01  0.663E-03  0.191E-04   44  21   3   19  26   9   20  27   9    0.000    0.000       0
+  0   4117 00:38:54.11   0.5610A   3.2070  -0.8987   0.9321  0.057  0.00   0.000      0.  0.872E+00  0.617E-01  0.671E-03  0.219E-04   44  21  11   19  25   9   20  27   9    0.000    0.000       0
+  0   4128 00:39:00.25   0.5610A   3.2079  -0.7668   0.8726  0.056  0.00   0.000      0.  0.872E+00  0.621E-01  0.679E-03  0.255E-04   44  21  18   19  24   9   21  24   9    0.000    0.000       0
+  0   4139 00:39:06.45   0.5690A   3.1623  -0.7489   0.8356  0.055  0.00   0.000      0.  0.872E+00  0.626E-01  0.696E-03  0.250E-04   44  21  26   20  10   7   20  25   9    0.000    0.000       0
+  0   4149 00:39:12.20   0.5810A   3.0969  -0.7100   0.7762  0.055  0.00   0.000      0.  0.871E+00  0.630E-01  0.714E-03  0.245E-04   44  21  34   26  25  30   20  25   9    0.000    0.000       0
+  0   4159 00:39:18.01   0.5740A   3.1380  -0.8136   0.7015  0.054  0.00   0.000      0.  0.871E+00  0.634E-01  0.714E-03  0.249E-04   41  22   2   26  23  32   20  23   9    0.000    0.000       0
+  0   4170 00:39:24.37   0.5750A   3.1306  -0.7985   0.7033  0.054  0.00   0.000      0.  0.871E+00  0.638E-01  0.719E-03  0.252E-04   46  25  23   19  10   9   20  23   9    0.000    0.000       0
+  0   4180 00:39:30.13   0.5770A   3.1200   0.8251  -0.6597  0.055  0.00   0.000      0.  0.871E+00  0.641E-01  0.717E-03  0.225E-04   46  25  30   20  23   4   17  19   9    0.000    0.000       0
+  0   4191 00:39:36.42   0.5710A   3.1541   0.8184  -0.7975  0.056  0.00   0.000      0.  0.871E+00  0.642E-01  0.708E-03  0.189E-04   46  24  39   20  30   9   17  20   9    0.000    0.000       0
+  0   4201 00:39:42.11   0.5670A   3.1743   0.8334  -0.8117  0.057  0.00   0.000      0.  0.870E+00  0.643E-01  0.700E-03  0.162E-04   46  24   6   20  30   9   16  20   9    0.000    0.000       0
+  0   4212 00:39:48.37   0.5710A   3.1523  -0.6827  -0.7922  0.058  0.00   0.000      0.  0.870E+00  0.642E-01  0.706E-03  0.161E-04   46  24  14   24  20  32   17  19   9    0.000    0.000       0
+  0   4222 00:39:54.09   0.5750A   3.1327  -0.6770  -0.7894  0.058  0.00   0.000      0.  0.870E+00  0.641E-01  0.705E-03  0.151E-04   46  24  22   29  25  18   16  19   9    0.000    0.000       0
+  0   4233 00:40:00.43   0.5720A   3.1444  -0.6926  -0.8125  0.058  0.00   0.000      0.  0.869E+00  0.638E-01  0.704E-03  0.163E-04   45  23  11   30  24  22   17  17   9    0.000    0.000       0
+  0   4243 00:40:06.12   0.5660A   3.1784  -0.6982  -0.8362  0.057  0.00   0.000      0.  0.869E+00  0.635E-01  0.701E-03  0.185E-04   46  23  18   20  26   8   16  17   9    0.000    0.000       0
+  0   4254 00:40:12.35   0.5670A   3.1736   0.6650  -0.8060  0.057  0.00   0.000      0.  0.868E+00  0.632E-01  0.712E-03  0.211E-04   46  23  26   42   6  24   15  18   9    0.000    0.000       0
+  0   4264 00:40:18.06   0.5760A   3.1271   0.7055  -0.8370  0.058  0.00   0.000      0.  0.867E+00  0.628E-01  0.731E-03  0.220E-04   45  23  33   43   8  33   17  17   9    0.000    0.000       0
+  0   4275 00:40:24.41   0.5770A   3.1223   0.7119  -0.8754  0.058  0.00   0.000      0.  0.867E+00  0.624E-01  0.734E-03  0.218E-04   45  24   1   42   8  35   16  17   9    0.000    0.000       0
+  0   4285 00:40:30.17   0.5780A   3.1153  -0.8402  -0.8434  0.059  0.00   0.000      0.  0.866E+00  0.620E-01  0.732E-03  0.196E-04   45  24   9   27  20  38   15  17   9    0.000    0.000       0
+  0   4296 00:40:36.55   0.5800A   3.1030  -0.8805  -0.7826  0.059  0.00   0.000      0.  0.865E+00  0.615E-01  0.731E-03  0.172E-04   44  24  26   27  20   3   13  18   9    0.000    0.000       0
+  0   4306 00:40:42.31   0.5740A   3.1362  -0.8461  -0.7272  0.059  0.00   0.000      0.  0.865E+00  0.611E-01  0.718E-03  0.162E-04   44  24  33   27  20   7   12  18   9    0.000    0.000       0
+  0   4316 00:40:48.06   0.5750A   3.1305  -0.8179  -0.7800  0.059  0.00   0.000      0.  0.864E+00  0.607E-01  0.715E-03  0.149E-04   44  24   0   26  20  10   31  21   8    0.000    0.000       0
+  0   4327 00:40:54.42   0.5790A   3.1092  -0.8575  -0.7564  0.060  0.00   0.000      0.  0.863E+00  0.602E-01  0.723E-03  0.150E-04   45  24  15   25  20  13   30  21  13    0.000    0.000       0
+  0   4337 00:41:00.14   0.5680A   3.1707  -0.8119  -0.7904  0.060  0.00   0.000      0.  0.863E+00  0.599E-01  0.708E-03  0.168E-04   45  24  22   25  19  17   24  16  36    0.000    0.000       0
+  0   4348 00:41:06.38   0.5690A   3.1658  -0.7293  -0.7588  0.059  0.00   0.000      0.  0.862E+00  0.596E-01  0.703E-03  0.182E-04   46  24  30   38  38  32   27  21  23    0.000    0.000       0
+  0   4358 00:41:12.09   0.5690A   3.1648  -0.6938  -0.7651  0.058  0.00   0.000      0.  0.862E+00  0.594E-01  0.700E-03  0.190E-04   46  24  39   38  37  36   28  20  29    0.000    0.000       0
+  0   4369 00:41:18.30   0.5600A   3.2123  -0.6899  -0.8118  0.058  0.00   0.000      0.  0.861E+00  0.592E-01  0.688E-03  0.207E-04   45  24   8   25  19  33   27  20  33    0.000    0.000       0
+  0   4380 00:41:24.42   0.5550A   3.2441  -0.7470  -0.7799  0.059  0.00   0.000      0.  0.861E+00  0.589E-01  0.686E-03  0.206E-04   45  24  16   33  17  19   18  17   9    0.000    0.000       0
+  0   4391 00:41:30.50   0.5540A   3.2470   0.9905  -0.9048  0.061  0.00   0.000      0.  0.860E+00  0.586E-01  0.687E-03  0.190E-04   46  24  25   20  30   9   18  17   9    0.000    0.000       0
+  0   4401 00:41:36.07   0.5600A   3.2165   0.8493  -0.8662  0.062  0.00   0.000      0.  0.859E+00  0.582E-01  0.680E-03  0.163E-04   46  24  33   19  30   9   17  17   9    0.000    0.000       0
+  0   4412 00:41:42.25   0.5640A   3.1891  -0.7371  -0.7955  0.062  0.00   0.000      0.  0.859E+00  0.577E-01  0.673E-03  0.159E-04   46  24   1   32  17  25   14  15   9    0.000    0.000       0
+  0   4423 00:41:48.55   0.5780A   3.1157  -0.8275  -0.7787  0.062  0.00   0.000      0.  0.858E+00  0.574E-01  0.683E-03  0.181E-04   46  27   2   32  17  29   13  15   9    0.000    0.000       0
+  0   4433 00:41:54.36   0.5830A   3.0850  -0.8038   0.7673  0.061  0.00   0.000      0.  0.857E+00  0.574E-01  0.682E-03  0.200E-04   46  24  18   31  16  34   20  26   9    0.000    0.000       0
+  0   4443 00:42:00.20   0.5850A   3.0777  -0.8310   0.7395  0.060  0.00   0.000      0.  0.857E+00  0.575E-01  0.672E-03  0.201E-04   45  26  16   31  15  38   20  25   9    0.000    0.000       0
+  0   4453 00:42:06.03   0.5840A   3.0837  -0.7698   0.7771  0.059  0.00   0.000      0.  0.856E+00  0.576E-01  0.665E-03  0.198E-04   45  26  23   31  14   2   20  28   9    0.000    0.000       0
+  0   4464 00:42:12.45   0.5850A   3.0746  -0.7461   0.7904  0.057  0.00   0.000      0.  0.855E+00  0.577E-01  0.664E-03  0.209E-04   46  25  30   31  13   7   20  28   9    0.000    0.000       0
+  0   4474 00:42:18.28   0.5830A   3.0870  -0.7444   0.8321  0.057  0.00   0.000      0.  0.855E+00  0.579E-01  0.654E-03  0.196E-04   46  25  38   31  12  11   21  28   9    0.000    0.000       0
+  0   4484 00:42:24.10   0.5830A   3.0892  -0.6598  -0.7651  0.057  0.00   0.000      0.  0.854E+00  0.580E-01  0.648E-03  0.181E-04   45  25   5   31  11  15   14  21   9    0.000    0.000       0
+  0   4495 00:42:30.57   0.5880A   3.0632  -0.6530   0.7789  0.057  0.00   0.000      0.  0.854E+00  0.583E-01  0.657E-03  0.203E-04   44  26  25   21  15   0   20  27   9    0.000    0.000       0
+  0   4505 00:42:36.43   0.5870A   3.0687  -0.6449  -0.6926  0.057  0.00   0.000      0.  0.853E+00  0.586E-01  0.656E-03  0.203E-04   44  26  32   21  15   3   11  23   9    0.000    0.000       0
+  0   4515 00:42:42.27   0.5850A   3.0786   0.6534  -0.6815  0.058  0.00   0.000      0.  0.853E+00  0.589E-01  0.652E-03  0.190E-04   44  26   0   17   0   8    9  23   8    0.000    0.000       0
+  0   4525 00:42:48.16   0.5930A   3.0356  -0.7297  -0.6860  0.057  0.00   0.000      0.  0.852E+00  0.592E-01  0.663E-03  0.196E-04   43  26   7   13  27   9   11  28   9    0.000    0.000       0
+  0   4535 00:42:54.09   0.5950A   3.0264  -0.7804   0.7320  0.058  0.00   0.000      0.  0.851E+00  0.595E-01  0.663E-03  0.179E-04   43  26  15   13  26   9   20  25   9    0.000    0.000       0
+  0   4545 00:43:00.03   0.5970A   3.0129  -0.7085  -0.6963  0.058  0.00   0.000      0.  0.851E+00  0.597E-01  0.667E-03  0.172E-04   43  26  24   13  26   9   17  18   9    0.000    0.000       0
+  0   4555 00:43:06.00   0.5950A   3.0246  -0.6612  -0.6953  0.058  0.00   0.000      0.  0.851E+00  0.600E-01  0.664E-03  0.153E-04   43  25  33   13  25   9   16  18   9    0.000    0.000       0
+  0   4566 00:43:12.52   0.5960A   3.0206  -0.6755  -0.6848  0.057  0.00   0.000      0.  0.850E+00  0.601E-01  0.658E-03  0.144E-04   43  25   0   35  19  38   16  17   9    0.000    0.000       0
+  0   4576 00:43:18.48   0.5930A   3.0331  -0.6597  -0.7034  0.056  0.00   0.000      0.  0.850E+00  0.603E-01  0.651E-03  0.161E-04   45  25  39   34  19   3   16  20   9    0.000    0.000       0
+  0   4586 00:43:24.33   0.5820A   3.0908  -0.6848  -0.7367  0.055  0.00   0.000      0.  0.851E+00  0.604E-01  0.644E-03  0.187E-04   45  24  11   17  32   5   17  20   9    0.000    0.000       0
+  0   4596 00:43:30.11   0.5750A   3.1299  -0.7312  -0.8345  0.054  0.00   0.000      0.  0.851E+00  0.606E-01  0.648E-03  0.209E-04   46  24  19   17  30   8   17  19   9    0.000    0.000       0
+  0   4607 00:43:36.47   0.5810A   3.0956  -0.6688  -0.9005  0.054  0.00   0.000      0.  0.851E+00  0.607E-01  0.664E-03  0.230E-04   46  24  27   17  30   8   16  19   9    0.000    0.000       0
+  0   4617 00:43:42.36   0.5900A   3.0515  -0.6535  -0.8596  0.054  0.00   0.000      0.  0.850E+00  0.609E-01  0.676E-03  0.242E-04   46  25  31   40  23  34   15  19   9    0.000    0.000       0
+  0   4627 00:43:48.21   0.5830A   3.0899  -0.6608  -0.8468  0.056  0.00   0.000      0.  0.850E+00  0.612E-01  0.666E-03  0.207E-04   46  25  38   32  14  32   15  21   9    0.000    0.000       0
+  0   4637 00:43:54.04   0.5890A   3.0556   0.6634  -0.8458  0.057  0.00   0.000      0.  0.850E+00  0.614E-01  0.669E-03  0.187E-04   46  25   6   18   2  15   14  21   9    0.000    0.000       0
+  0   4648 00:44:00.57   0.5930A   3.0335   0.6840  -0.8535  0.058  0.00   0.000      0.  0.850E+00  0.617E-01  0.675E-03  0.184E-04   46  30   9   18   2  17   15  20   9    0.000    0.000       0
+  0   4658 00:44:06.50   0.5880A   3.0613   0.7039  -0.8867  0.059  0.00   0.000      0.  0.849E+00  0.618E-01  0.672E-03  0.181E-04   43  31   5   17   4  18   15  20   9    0.000    0.000       0
+  0   4668 00:44:12.36   0.5860A   3.0732   0.7056  -0.8770  0.060  0.00   0.000      0.  0.849E+00  0.618E-01  0.669E-03  0.170E-04   43  31  12   17   5  20   15  20   9    0.000    0.000       0
+  0   4678 00:44:18.27   0.5920A   3.0387   0.7897  -0.8258  0.060  0.00   0.000      0.  0.848E+00  0.618E-01  0.678E-03  0.164E-04   44  30  29   20  27   8   12  20   9    0.000    0.000       0
+  0   4688 00:44:24.21   0.5930A   3.0356   0.7665  -0.9462  0.060  0.00   0.000      0.  0.847E+00  0.616E-01  0.682E-03  0.154E-04   44  26  37   20  27   9   18  22   9    0.000    0.000       0
+  0   4698 00:44:30.15   0.5940A   3.0306  -0.7406  -1.0752  0.060  0.00   0.000      0.  0.847E+00  0.614E-01  0.685E-03  0.163E-04   44  26   4   21  27   8   17  22   9    0.000    0.000       0
+  0   4708 00:44:36.01   0.5810A   3.0956   0.6963  -0.8996  0.059  0.00   0.000      0.  0.846E+00  0.614E-01  0.671E-03  0.164E-04   43  25   9   19   4  36   15  21   9    0.000    0.000       0
+  0   4719 00:44:42.44   0.5890A   3.0547   0.7353  -0.8381  0.057  0.00   0.000      0.  0.846E+00  0.615E-01  0.680E-03  0.172E-04   42  25  15   19   5  39   12  21   9    0.000    0.000       0
+  0   4729 00:44:48.32   0.5860A   3.0714  -0.7470  -0.7673  0.055  0.00   0.000      0.  0.845E+00  0.616E-01  0.677E-03  0.198E-04   44  29  30   33  11  34   11  21   9    0.000    0.000       0
+  0   4739 00:44:54.23   0.5960A   3.0196   0.7952   0.8695  0.054  0.00   0.000      0.  0.844E+00  0.618E-01  0.686E-03  0.238E-04   44  28  37   19   4   2   20  27   9    0.000    0.000       0
+  0   4749 00:45:00.16   0.5880A   3.0607   0.7784   0.7649  0.054  0.00   0.000      0.  0.844E+00  0.620E-01  0.680E-03  0.244E-04   44  27   4   19   4   5   20  26   9    0.000    0.000       0
+  0   4759 00:45:06.03   0.5850A   3.0793   0.7094   0.7409  0.055  0.00   0.000      0.  0.843E+00  0.623E-01  0.676E-03  0.221E-04   46  24  38   19   5   7   21  26   9    0.000    0.000       0
+  0   4770 00:45:12.44   0.5790A   3.1076  -0.8233  -0.8645  0.057  0.00   0.000      0.  0.843E+00  0.625E-01  0.673E-03  0.216E-04   44  26  21   20  11   8   18  16   9    0.000    0.000       0
+  0   4780 00:45:18.21   0.5740A   3.1352  -0.8288  -1.1614  0.059  0.00   0.000      0.  0.842E+00  0.625E-01  0.676E-03  0.218E-04   44  26  28   20  10   9   17  15   9    0.000    0.000       0
+  0   4791 00:45:24.57   0.5810A   3.0965  -0.8833  -1.2186  0.060  0.00   0.000      0.  0.842E+00  0.622E-01  0.685E-03  0.221E-04   44  26  36   18  10   9   15  15   9    0.000    0.000       0
+  0   4801 00:45:30.42   0.5850A   3.0781  -0.6820  -1.1363  0.060  0.00   0.000      0.  0.841E+00  0.616E-01  0.691E-03  0.213E-04   44  28  12   15  10   9   16  19   9    0.000    0.000       0
+  0   4811 00:45:36.29   0.5850A   3.0745   0.6776  -1.1023  0.059  0.00   0.000      0.  0.841E+00  0.609E-01  0.685E-03  0.204E-04   44  27   0   19  14   8   14  17   9    0.000    0.000       0
+  0   4821 00:45:42.08   0.5730A   3.1408   0.7407  -1.1021  0.058  0.00   0.000      0.  0.840E+00  0.602E-01  0.664E-03  0.206E-04   46  24   5   20  14   8   11  17   8    0.000    0.000       0
+  0   4832 00:45:48.31   0.5600A   3.2170  -0.6904  -1.0482  0.057  0.00   0.000      0.  0.840E+00  0.595E-01  0.642E-03  0.199E-04   46  24  13   19  21   9    9  17   8    0.000    0.000       0
+  0   4843 00:45:54.35   0.5430A   3.3138   0.6218  -0.9948  0.056  0.00   0.000      0.  0.840E+00  0.590E-01  0.615E-03  0.187E-04   46  24  21   26   1  35    7  17   8    0.000    0.000       0
+  0   4854 00:46:00.37   0.5470A   3.2911  -0.7278  -0.9268  0.055  0.00   0.000      0.  0.840E+00  0.585E-01  0.616E-03  0.188E-04   45  25  26   22  13   4    5  17   8    0.000    0.000       0
+  0   4865 00:46:06.41   0.5540A   3.2517   0.8442  -0.8631  0.055  0.00   0.000      0.  0.840E+00  0.581E-01  0.621E-03  0.202E-04   45  25  33   21  20   8   16  24   9    0.000    0.000       0
+  0   4876 00:46:12.53   0.5560A   3.2360   0.7427  -0.7933  0.056  0.00   0.000      0.  0.839E+00  0.577E-01  0.626E-03  0.217E-04   46  25   2   20  20   8   15  24   9    0.000    0.000       0
+  0   4886 00:46:18.15   0.5680A   3.1667   0.7622  -0.8667  0.056  0.00   0.000      0.  0.839E+00  0.574E-01  0.636E-03  0.206E-04   46  25   9   20  30   9   16  16   9    0.000    0.000       0
+  0   4897 00:46:24.49   0.5770A   3.1198  -0.7563  -0.9499  0.056  0.00   0.000      0.  0.839E+00  0.569E-01  0.643E-03  0.205E-04   43  20  29   20  19   6   15  17   9    0.000    0.000       0
+  0   4907 00:46:30.25   0.5790A   3.1107  -0.7994  -0.9755  0.056  0.00   0.000      0.  0.839E+00  0.564E-01  0.640E-03  0.204E-04   44  19  39   24  13  21   14  18   9    0.000    0.000       0
+  0   4917 00:46:36.07   0.5830A   3.0868  -0.7989  -0.8526  0.056  0.00   0.000      0.  0.839E+00  0.560E-01  0.639E-03  0.206E-04   44  19   6   24  12  25   12  18   9    0.000    0.000       0
+  0   4928 00:46:42.53   0.5880A   3.0630  -0.8557  -0.7840  0.055  0.00   0.000      0.  0.839E+00  0.557E-01  0.633E-03  0.209E-04   44  19  14   23  11  27   13  17   9    0.000    0.000       0
+  0   4938 00:46:48.35   0.5800A   3.1046  -0.8575  -0.7444  0.054  0.00   0.000      0.  0.839E+00  0.555E-01  0.622E-03  0.229E-04   43  18  22   23  10  30   12  17   9    0.000    0.000       0
+  0   4948 00:46:54.10   0.5760A   3.1248  -0.8348   0.7713  0.053  0.00   0.000      0.  0.839E+00  0.555E-01  0.612E-03  0.221E-04   43  18  30   23  10  33   20  25   9    0.000    0.000       0
+  0   4959 00:47:00.40   0.5690A   3.1653   0.8006   0.7037  0.053  0.00   0.000      0.  0.839E+00  0.556E-01  0.604E-03  0.214E-04   43  18  38   20  33   6   20  24   9    0.000    0.000       0
+  0   4969 00:47:06.17   0.5820A   3.0914  -0.7346   0.7241  0.053  0.00   0.000      0.  0.839E+00  0.558E-01  0.618E-03  0.228E-04   43  18   5   23  11   0   20  11   9    0.000    0.000       0
+  0   4979 00:47:12.01   0.5820A   3.0913   0.7580  -0.7273  0.053  0.00   0.000      0.  0.840E+00  0.559E-01  0.617E-03  0.204E-04   43  18  13   21  34  14   18  29   9    0.000    0.000       0
+  0   4990 00:47:18.47   0.5930A   3.0346   0.9054  -0.7523  0.054  0.00   0.000      0.  0.840E+00  0.559E-01  0.629E-03  0.175E-04   43  18  21   20  30   9   16  28   9    0.000    0.000       0
+  0   5000 00:47:24.50   0.6080A   2.9623   0.8602  -0.7285  0.054  0.00   0.000      0.  0.840E+00  0.557E-01  0.645E-03  0.165E-04   46  22   1   19  30   9   16  28   9    0.000    0.000       0
+  0   5009 00:47:30.01   0.6100A   2.9512   0.7145  -0.7123  0.056  0.00   0.000      0.  0.840E+00  0.555E-01  0.647E-03  0.153E-04   43  18  36   20  36  22   17  29   8    0.000    0.000       0
+  0   5019 00:47:36.14   0.6200A   2.9044   0.7709  -0.8648  0.057  0.00   0.000      0.  0.840E+00  0.550E-01  0.656E-03  0.166E-04   43  18   3   19  36  24   17  22   9    0.000    0.000       0
+  0   5029 00:47:42.30   0.6140A   2.9304   0.6991  -0.8339  0.058  0.00   0.000      0.  0.840E+00  0.542E-01  0.646E-03  0.149E-04   45  27  37   20  38  31   16  22   9    0.000    0.000       0
+  0   5039 00:47:48.41   0.6100A   2.9487   0.7073  -0.7664  0.058  0.00   0.000      0.  0.841E+00  0.533E-01  0.641E-03  0.136E-04   44  24  38   20  39  34   17  18   9    0.000    0.000       0
+  0   5049 00:47:54.51   0.6050A   2.9728   0.6913  -0.7079  0.057  0.00   0.000      0.  0.841E+00  0.525E-01  0.637E-03  0.144E-04   41  18  25   20  14   8   15  18   9    0.000    0.000       0
+  0   5058 00:48:00.04   0.6190A   2.9101   0.6851  -0.6703  0.057  0.00   0.000      0.  0.841E+00  0.518E-01  0.654E-03  0.159E-04   46  27  19   26  36   6   14  18   9    0.000    0.000       0
+  0   5068 00:48:06.20   0.6140A   2.9313   0.6670  -0.6320  0.057  0.00   0.000      0.  0.841E+00  0.511E-01  0.650E-03  0.175E-04   45  22  16   42  13   8   13  18   9    0.000    0.000       0
+  0   5078 00:48:12.33   0.6130A   2.9352   0.6613   0.6829  0.056  0.00   0.000      0.  0.841E+00  0.504E-01  0.655E-03  0.206E-04   42  24  26   39   9   9   20  29   9    0.000    0.000       0
+  0   5088 00:48:18.47   0.6110A   2.9468  -0.6583   0.7277  0.056  0.00   0.000      0.  0.841E+00  0.499E-01  0.654E-03  0.219E-04   45  28   6   26   4   6   20  28   9    0.000    0.000       0
+  0   5098 00:48:24.55   0.6050A   2.9745  -0.6248   0.7045  0.056  0.00   0.000      0.  0.842E+00  0.494E-01  0.643E-03  0.224E-04   45  21   0   21  14   8   20  28   9    0.000    0.000       0
+  0   5107 00:48:30.01   0.6080A   2.9617  -0.8418   0.6351  0.057  0.00   0.000      0.  0.842E+00  0.489E-01  0.637E-03  0.223E-04   45  21   7   20  19   8   20  28   9    0.000    0.000       0
+  0   5117 00:48:36.08   0.5930A   3.0329   0.6716  -0.6331  0.057  0.00   0.000      0.  0.842E+00  0.484E-01  0.615E-03  0.230E-04   43  13  28   21  18   8   16  18   9    0.000    0.000       0
+  0   5128 00:48:42.46   0.5790A   3.1086   0.6798  -0.6395  0.058  0.00   0.000      0.  0.842E+00  0.479E-01  0.592E-03  0.199E-04   43  13  36   20  18   8   11  27   9    0.000    0.000       0
+  0   5138 00:48:48.33   0.5910A   3.0456   0.8463  -0.6301  0.058  0.00   0.000      0.  0.843E+00  0.474E-01  0.597E-03  0.187E-04   46  20  32   20  19   8   10  27   9    0.000    0.000       0
+  0   5148 00:48:54.23   0.5930A   3.0371  -0.6569  -0.6200  0.058  0.00   0.000      0.  0.843E+00  0.470E-01  0.594E-03  0.184E-04   43  20  38   44  15   6    8  17   7    0.000    0.000       0
+  0   5158 00:49:00.15   0.5920A   3.0384  -0.5926  -0.6425  0.056  0.00   0.000      0.  0.843E+00  0.467E-01  0.591E-03  0.196E-04   43  20   5   22  10  24    7  17   7    0.000    0.000       0
+  0   5168 00:49:06.14   0.6010A   2.9936  -0.6073   0.6429  0.054  0.00   0.000      0.  0.844E+00  0.466E-01  0.604E-03  0.230E-04   44  20  16   43  10  22   20  13   9    0.000    0.000       0
+  0   5178 00:49:12.14   0.6030A   2.9868   0.6249   0.7221  0.053  0.00   0.000      0.  0.844E+00  0.467E-01  0.612E-03  0.262E-04   44  20  24   30   0   0   20  12   9    0.000    0.000       0
+  0   5188 00:49:18.14   0.5950A   3.0243  -0.6502   0.7574  0.052  0.00   0.000      0.  0.844E+00  0.471E-01  0.601E-03  0.239E-04   46  23  37   25  18   8   20  28   9    0.000    0.000       0
+  0   5198 00:49:24.07   0.5890A   3.0569  -0.7046   0.7690  0.053  0.00   0.000      0.  0.845E+00  0.475E-01  0.596E-03  0.213E-04   46  23   4   24  18  11   20  13   9    0.000    0.000       0
+  0   5209 00:49:30.58   0.5950A   3.0238  -0.7126  -0.8635  0.053  0.00   0.000      0.  0.845E+00  0.480E-01  0.604E-03  0.210E-04   46  23  12   24  17  16   18  19   9    0.000    0.000       0
+  0   5219 00:49:36.58   0.6050A   2.9756   0.8653  -0.9579  0.054  0.00   0.000      0.  0.845E+00  0.484E-01  0.614E-03  0.213E-04   46  23  20   22  28   8   17  20   9    0.000    0.000       0
+  0   5228 00:49:42.06   0.6130A   2.9385   0.9106  -0.9750  0.056  0.00   0.000      0.  0.845E+00  0.487E-01  0.618E-03  0.192E-04   44  24   4   22  28   8   15  20   9    0.000    0.000       0
+  0   5238 00:49:48.16   0.6080A   2.9596   0.7777  -0.9244  0.058  0.00   0.000      0.  0.844E+00  0.488E-01  0.611E-03  0.165E-04   44  24  11   22  29   8   14  20   9    0.000    0.000       0
+  0   5248 00:49:54.25   0.6080A   2.9590   0.7089  -0.9065  0.061  0.00   0.000      0.  0.844E+00  0.487E-01  0.613E-03  0.160E-04   44  24  18   21  30   8   18  15   9    0.000    0.000       0
+  0   5258 00:50:00.33   0.6070A   2.9676  -0.6810  -1.0423  0.063  0.00   0.000      0.  0.844E+00  0.484E-01  0.613E-03  0.160E-04   45  24  21   42  36  36   17  15   9    0.000    0.000       0
+  0   5268 00:50:06.39   0.6080A   2.9607  -0.6225  -1.0186  0.063  0.00   0.000      0.  0.844E+00  0.479E-01  0.615E-03  0.139E-04   45  24  29   25   8  25   16  15   9    0.000    0.000       0
+  0   5278 00:50:12.44   0.6040A   2.9794  -0.6182  -0.8615  0.063  0.00   0.000      0.  0.844E+00  0.473E-01  0.608E-03  0.112E-04   44  23   2   24  23   9   15  15   9    0.000    0.000       0
+  0   5288 00:50:18.44   0.6060A   2.9681  -0.6365  -0.7232  0.061  0.00   0.000      0.  0.844E+00  0.467E-01  0.612E-03  0.127E-04   44  23   9   27   4  32   13  15   9    0.000    0.000       0
+  0   5298 00:50:24.49   0.6040A   2.9802  -0.7217   0.7041  0.059  0.00   0.000      0.  0.844E+00  0.463E-01  0.619E-03  0.197E-04   44  23  17   27   8  37   30  27   4    0.000    0.000       0
+  0   5308 00:50:30.51   0.6010A   2.9962  -0.7566   0.8284  0.057  0.00   0.000      0.  0.844E+00  0.461E-01  0.625E-03  0.233E-04   44  23  24   27   7   0   20  11   9    0.000    0.000       0
+  0   5318 00:50:36.55   0.6060A   2.9727   0.8341   0.8740  0.056  0.00   0.000      0.  0.845E+00  0.460E-01  0.637E-03  0.245E-04   44  23  31   21  28   6   20  12   9    0.000    0.000       0
+  0   5327 00:50:42.01   0.6050A   2.9755   0.9058   0.7586  0.056  0.00   0.000      0.  0.845E+00  0.460E-01  0.642E-03  0.249E-04   44  23  38   21  28   8   20  12   9    0.000    0.000       0
+  0   5337 00:50:48.06   0.6040A   2.9814   0.9087  -0.8053  0.058  0.00   0.000      0.  0.845E+00  0.459E-01  0.645E-03  0.224E-04   44  23   5   20  28   8   18  21   9    0.000    0.000       0
+  0   5347 00:50:54.10   0.6060A   2.9721   0.8313  -1.0753  0.058  0.00   0.000      0.  0.845E+00  0.458E-01  0.653E-03  0.216E-04   44  23  13   20  29   9   17  22   9    0.000    0.000       0
+  0   5357 00:51:00.17   0.6100A   2.9530  -0.7712  -1.1302  0.060  0.00   0.000      0.  0.846E+00  0.456E-01  0.656E-03  0.199E-04   46  20  15   20  10   9   16  23   9    0.000    0.000       0
+  0   5367 00:51:06.23   0.6020A   2.9883  -0.9101  -0.9977  0.061  0.00   0.000      0.  0.846E+00  0.454E-01  0.643E-03  0.193E-04   44  18  25   20  10   9   14  23   9    0.000    0.000       0
+  0   5377 00:51:12.27   0.6020A   2.9908  -0.8087  -0.9002  0.062  0.00   0.000      0.  0.846E+00  0.451E-01  0.642E-03  0.197E-04   46  20  31   19  10   9   12  26   9    0.000    0.000       0
+  0   5387 00:51:18.29   0.6050A   2.9764  -0.7402  -1.1376  0.061  0.00   0.000      0.  0.846E+00  0.449E-01  0.643E-03  0.174E-04   46  20  38   24  11   8   17  14   9    0.000    0.000       0
+  0   5397 00:51:24.38   0.6120A   2.9430  -0.6659  -1.1669  0.061  0.00   0.000      0.  0.846E+00  0.446E-01  0.649E-03  0.155E-04   46  18   4   23  13  11   15  15   9    0.000    0.000       0
+  0   5407 00:51:30.51   0.6150A   2.9284  -0.6929  -1.0301  0.062  0.00   0.000      0.  0.846E+00  0.442E-01  0.648E-03  0.150E-04   46  18  12   22  13  14   14  15   9    0.000    0.000       0
+  0   5416 00:51:36.06   0.6170A   2.9166  -0.6289  -0.9330  0.061  0.00   0.000      0.  0.847E+00  0.438E-01  0.650E-03  0.159E-04   43  14   9   26  30   6   15  15   8    0.000    0.000       0
+  0   5426 00:51:42.19   0.6140A   2.9293  -0.6433  -0.9026  0.060  0.00   0.000      0.  0.847E+00  0.435E-01  0.645E-03  0.183E-04   43  14  17   22  12  22   13  15   8    0.000    0.000       0
+  0   5436 00:51:48.43   0.6290A   2.8637  -0.6386  -0.9434  0.059  0.00   0.000      0.  0.847E+00  0.433E-01  0.659E-03  0.217E-04   46  11  29   41  28  21   11  16   8    0.000    0.000       0
+  0   5445 00:51:54.04   0.6260A   2.8747  -0.6747  -0.9414  0.059  0.00   0.000      0.  0.848E+00  0.431E-01  0.652E-03  0.233E-04   43  13  33   42  10  29    9  16   8    0.000    0.000       0
+  0   5455 00:52:00.28   0.6210A   2.8971  -0.6389  -0.9180  0.060  0.00   0.000      0.  0.848E+00  0.430E-01  0.640E-03  0.233E-04   43  12   0   42   9  35    7  18   8    0.000    0.000       0
+  0   5465 00:52:06.43   0.6220A   2.8919  -0.6364  -0.8629  0.061  0.00   0.000      0.  0.848E+00  0.429E-01  0.637E-03  0.234E-04   43  12   7   22  10  37    5  18   8    0.000    0.000       0
+  0   5474 00:52:12.10   0.6290A   2.8600  -0.7390  -0.8614  0.062  0.00   0.000      0.  0.849E+00  0.429E-01  0.640E-03  0.227E-04   44  35  37   20  11   8   18  20   9    0.000    0.000       0
+  0   5484 00:52:18.40   0.6290A   2.8634  -0.7111  -0.9662  0.062  0.00   0.000      0.  0.849E+00  0.429E-01  0.635E-03  0.202E-04   45  26  20   20  11   8   17  19   9    0.000    0.000       0
+  0   5493 00:52:24.08   0.6330A   2.8435  -0.6246  -0.8684  0.062  0.00   0.000      0.  0.849E+00  0.429E-01  0.639E-03  0.194E-04   46  34  24   43  14  19   16  18   9    0.000    0.000       0
+  0   5503 00:52:30.40   0.6270A   2.8694   0.6585  -0.7782  0.061  0.00   0.000      0.  0.850E+00  0.430E-01  0.630E-03  0.197E-04   46  29  32   40   0  23   14  18   9    0.000    0.000       0
+  0   5513 00:52:36.61   0.6140A   2.9296   0.6660  -0.7380  0.060  0.00   0.000      0.  0.850E+00  0.432E-01  0.621E-03  0.213E-04   46  29  39   39  39  27   14  17   9    0.000    0.000       0
+  0   5522 00:52:42.14   0.6150A   2.9248   0.7040  -0.6799  0.059  0.00   0.000      0.  0.850E+00  0.433E-01  0.627E-03  0.214E-04   46  29   5   38   0  31   13  17   9    0.000    0.000       0
+  0   5532 00:52:48.21   0.6010A   2.9933  -0.8207   0.6333  0.058  0.00   0.000      0.  0.850E+00  0.434E-01  0.617E-03  0.206E-04   46  28  12   19  10   9   20  28   9    0.000    0.000       0
+  0   5542 00:52:54.12   0.5830A   3.0870  -0.9292  -0.6264  0.058  0.00   0.000      0.  0.850E+00  0.435E-01  0.601E-03  0.188E-04   46  27  18   20  14   8   18  12   9    0.000    0.000       0
+  0   5553 00:53:00.49   0.5790A   3.1077   0.9876  -0.8533  0.059  0.00   0.000      0.  0.850E+00  0.435E-01  0.600E-03  0.171E-04   46  27  25   20  30   9   18  23   9    0.000    0.000       0
+  0   5563 00:53:06.44   0.6070A   2.9661   0.8514  -0.8249  0.060  0.00   0.000      0.  0.850E+00  0.434E-01  0.625E-03  0.175E-04   46  27  32   19  31   9   17  23   9    0.000    0.000       0
+  0   5573 00:53:12.60   0.6220A   2.8920   0.7277  -0.9146  0.060  0.00   0.000      0.  0.850E+00  0.432E-01  0.638E-03  0.171E-04   44  14  38   18  31   9   18  25   9    0.000    0.000       0
+  0   5582 00:53:18.15   0.6120A   2.9426  -0.7210  -0.9328  0.060  0.00   0.000      0.  0.850E+00  0.429E-01  0.622E-03  0.157E-04   44  14   5   43  32   2   17  25   9    0.000    0.000       0
+  0   5592 00:53:24.33   0.6210A   2.8982   0.6797  -0.7594  0.060  0.00   0.000      0.  0.850E+00  0.426E-01  0.625E-03  0.146E-04   45  27   0   44  28  30   16  25   9    0.000    0.000       0
+  0   5602 00:53:30.54   0.6200A   2.9016   0.6578  -0.6766  0.059  0.00   0.000      0.  0.850E+00  0.421E-01  0.622E-03  0.140E-04   46  32  19   46  27  38   16  27   9    0.000    0.000       0
+  0   5611 00:53:36.04   0.6040A   2.9817  -0.6702  -0.6809  0.058  0.00   0.000      0.  0.850E+00  0.417E-01  0.604E-03  0.140E-04   46  32  25   44   5   9   17  19   9    0.000    0.000       0
+  0   5621 00:53:42.18   0.6220A   2.8960   0.7236  -0.7999  0.057  0.00   0.000      0.  0.850E+00  0.412E-01  0.612E-03  0.151E-04   46  12   8   46  28   9   17  18   9    0.000    0.000       0
+  0   5631 00:53:48.35   0.6160A   2.9243   0.7039  -0.8397  0.056  0.00   0.000      0.  0.850E+00  0.406E-01  0.600E-03  0.147E-04   46  33  35   46  29  15   16  18   9    0.000    0.000       0
+  0   5641 00:53:54.41   0.6070A   2.9678  -0.7125  -0.7713  0.055  0.00   0.000      0.  0.850E+00  0.400E-01  0.585E-03  0.129E-04   46  33   2   41  20   2   15  18   9    0.000    0.000       0
+  0   5651 00:54:00.58   0.6230A   2.8888  -0.7165  -0.6616  0.054  0.00   0.000      0.  0.850E+00  0.394E-01  0.593E-03  0.143E-04   44  16  39   41  19   8   14  18   9    0.000    0.000       0
+  0   5660 00:54:06.15   0.6160A   2.9211  -0.7239   0.6614  0.053  0.00   0.000      0.  0.851E+00  0.391E-01  0.582E-03  0.164E-04   46  32  15   41  19  14   20  29   8    0.000    0.000       0
+  0   5670 00:54:12.29   0.6140A   2.9305  -0.6748   0.7508  0.052  0.00   0.000      0.  0.851E+00  0.389E-01  0.584E-03  0.216E-04   46  32  22   41  18  19   20  27   9    0.000    0.000       0
+  0   5680 00:54:18.48   0.6160A   2.9201  -0.6791   0.7794  0.052  0.00   0.000      0.  0.852E+00  0.389E-01  0.583E-03  0.233E-04   44  15  19   42  19  24   20  26   9    0.000    0.000       0
+  0   5689 00:54:24.03   0.6120A   2.9427  -0.6524   0.7742  0.052  0.00   0.000      0.  0.852E+00  0.390E-01  0.570E-03  0.211E-04   46  12  34   42  16  30   20  27   9    0.000    0.000       0
+  0   5699 00:54:30.14   0.6090A   2.9542  -0.6455   0.6436  0.053  0.00   0.000      0.  0.853E+00  0.390E-01  0.555E-03  0.160E-04   46  12   1   42  15  36   20  27   9    0.000    0.000       0
+  0   5709 00:54:36.22   0.6010A   2.9941  -0.6647  -0.7668  0.053  0.00   0.000      0.  0.853E+00  0.390E-01  0.540E-03  0.134E-04   45  11  20   42  14   2   17  20   9    0.000    0.000       0
+  0   5719 00:54:42.21   0.5980A   3.0084  -0.6761  -0.8092  0.054  0.00   0.000      0.  0.854E+00  0.391E-01  0.532E-03  0.129E-04   45  11  27   42  13   8   15  19   9    0.000    0.000       0
+  0   5729 00:54:48.27   0.6100A   2.9510  -0.6459  -0.9159  0.055  0.00   0.000      0.  0.854E+00  0.391E-01  0.536E-03  0.128E-04   46  11  23   42  12  14   17  16   9    0.000    0.000       0
+  0   5739 00:54:54.37   0.6100A   2.9508  -0.6000  -0.9414  0.055  0.00   0.000      0.  0.855E+00  0.391E-01  0.532E-03  0.133E-04   46  11  31   45  31  25   16  15   9    0.000    0.000       0
+  0   5749 00:55:00.47   0.6100A   2.9529  -0.6787  -0.9001  0.056  0.00   0.000      0.  0.855E+00  0.391E-01  0.533E-03  0.130E-04   45  11  38   46  30  31   15  16   9    0.000    0.000       0
+  0   5759 00:55:06.54   0.6030A   2.9829  -0.7061  -0.8165  0.056  0.00   0.000      0.  0.856E+00  0.390E-01  0.532E-03  0.146E-04   46   8  13   45  30  37   13  16   9    0.000    0.000       0
+  0   5769 00:55:12.54   0.5980A   3.0111  -0.7215  -0.9080  0.056  0.00   0.000      0.  0.856E+00  0.389E-01  0.526E-03  0.142E-04   46   8  21   45  29   3   18  26   9    0.000    0.000       0
+  0   5779 00:55:18.49   0.5940A   3.0303  -0.7624  -0.9495  0.057  0.00   0.000      0.  0.857E+00  0.386E-01  0.515E-03  0.127E-04   46   8  28   45  28   9   17  26   9    0.000    0.000       0
+  0   5789 00:55:24.46   0.5990A   3.0049  -0.7436  -0.8820  0.056  0.00   0.000      0.  0.857E+00  0.383E-01  0.519E-03  0.140E-04   46   8  36   45  27  15   16  25   9    0.000    0.000       0
+  0   5799 00:55:30.47   0.6010A   2.9961  -0.6691  -0.8023  0.056  0.00   0.000      0.  0.857E+00  0.380E-01  0.522E-03  0.159E-04   46   7   2   45  26  21   15  25   9    0.000    0.000       0
+  0   5809 00:55:36.43   0.5930A   3.0333  -0.6181  -0.7952  0.056  0.00   0.000      0.  0.858E+00  0.379E-01  0.511E-03  0.179E-04   46   9   7   45  25  27   16  19   9    0.000    0.000       0
+  0   5819 00:55:42.34   0.5910A   3.0447  -0.5997  -0.7948  0.055  0.00   0.000      0.  0.858E+00  0.379E-01  0.505E-03  0.193E-04   46   9  15   19  14   9   15  17   9    0.000    0.000       0
+  0   5829 00:55:48.26   0.5940A   3.0304  -0.5663  -0.7690  0.054  0.00   0.000      0.  0.859E+00  0.379E-01  0.503E-03  0.172E-04   44  10  11   22  14  26   14  17   9    0.000    0.000       0
+  0   5839 00:55:54.17   0.5910A   3.0432  -0.5613  -0.7634  0.054  0.00   0.000      0.  0.860E+00  0.379E-01  0.498E-03  0.164E-04   44  10  19   22  13  29   13  20   9    0.000    0.000       0
+  0   5849 00:56:00.12   0.5970A   3.0147   0.6395  -0.7387  0.054  0.00   0.000      0.  0.860E+00  0.380E-01  0.506E-03  0.173E-04   44  10  27   20  22   9   11  20   9    0.000    0.000       0
+  0   5859 00:56:06.11   0.6000A   2.9997  -0.6933  -0.7405  0.053  0.00   0.000      0.  0.861E+00  0.381E-01  0.507E-03  0.167E-04   46   6   8   22  13   0    7  21   8    0.000    0.000       0
+  0   5869 00:56:12.12   0.5990A   3.0033  -0.7923  -0.7419  0.053  0.00   0.000      0.  0.862E+00  0.381E-01  0.503E-03  0.156E-04   45   6  18   20  21   8    6  21   8    0.000    0.000       0
+  0   5879 00:56:18.09   0.5980A   3.0102  -0.8324  -0.7020  0.054  0.00   0.000      0.  0.862E+00  0.381E-01  0.495E-03  0.134E-04   45   6  26   20  19   8    4  21   8    0.000    0.000       0
+  0   5889 00:56:24.09   0.5980A   3.0094  -0.7101  -0.6427  0.054  0.00   0.000      0.  0.863E+00  0.380E-01  0.491E-03  0.134E-04   45   5  34   22  13   9    3  21   8    0.000    0.000       0
+  0   5899 00:56:30.04   0.5930A   3.0364  -0.6899  -0.6970  0.054  0.00   0.000      0.  0.864E+00  0.379E-01  0.487E-03  0.121E-04   46   5   2   22   7  13   18  22   9    0.000    0.000       0
+  0   5910 00:56:36.59   0.6000A   2.9990  -0.6422  -0.7423  0.055  0.00   0.000      0.  0.865E+00  0.376E-01  0.490E-03  0.118E-04   45   5  10   22  13  15   17  22   9    0.000    0.000       0
+  0   5919 00:56:42.02   0.6040A   2.9797  -0.6751  -0.6872  0.054  0.00   0.000      0.  0.866E+00  0.375E-01  0.494E-03  0.129E-04   44   6  13   45  18  23   17  23   9    0.000    0.000       0
+  0   5929 00:56:48.05   0.6020A   2.9921  -0.6833  -0.6502  0.053  0.00   0.000      0.  0.867E+00  0.373E-01  0.497E-03  0.141E-04   46   8  25   45  17  30   16  23   9    0.000    0.000       0
+  0   5939 00:56:54.06   0.6010A   2.9959  -0.6835   0.6761  0.052  0.00   0.000      0.  0.869E+00  0.373E-01  0.498E-03  0.161E-04   46   8  33   22   7  26   20  13   9    0.000    0.000       0
+  0   5949 00:57:00.03   0.5930A   3.0338  -0.6544   0.6859  0.051  0.00   0.000      0.  0.870E+00  0.374E-01  0.490E-03  0.171E-04   45  11  39   22   7  29   20  12   9    0.000    0.000       0
+  0   5960 00:57:06.53   0.5890A   3.0542   0.7796   0.6852  0.051  0.00   0.000      0.  0.871E+00  0.375E-01  0.486E-03  0.162E-04   46  11   7   21  18   8   20  15   9    0.000    0.000       0
+  0   5970 00:57:12.41   0.5860A   3.0723   0.8731  -0.6227  0.052  0.00   0.000      0.  0.872E+00  0.377E-01  0.483E-03  0.165E-04   45   5  13   20  20   8    7  16   6    0.000    0.000       0
+  0   5980 00:57:18.22   0.5760A   3.1235  -0.7020  -0.7958  0.053  0.00   0.000      0.  0.873E+00  0.379E-01  0.479E-03  0.149E-04   45   5  21   20  10   9   18  15   9    0.000    0.000       0
+  0   5991 00:57:24.53   0.5660A   3.1803  -0.6754  -1.0199  0.053  0.00   0.000      0.  0.874E+00  0.379E-01  0.479E-03  0.156E-04   46  12  29   43  15  30   18  18   9    0.000    0.000       0
+  0   6001 00:57:30.12   0.5520A   3.2609  -0.6916  -1.1001  0.053  0.00   0.000      0.  0.875E+00  0.380E-01  0.472E-03  0.170E-04   46  12  36   43  14  35   17  17   9    0.000    0.000       0
+  0   6012 00:57:36.21   0.5550A   3.2425  -0.6973  -0.9900  0.052  0.00   0.000      0.  0.876E+00  0.381E-01  0.479E-03  0.191E-04   46  12   4   38  35  12   15  17   9    0.000    0.000       0
+  0   6023 00:57:42.43   0.5770A   3.1220  -0.7147  -0.8622  0.052  0.00   0.000      0.  0.877E+00  0.384E-01  0.497E-03  0.206E-04   46  12  12   39  32  16   14  18   9    0.000    0.000       0
+  0   6033 00:57:48.28   0.5850A   3.0747  -0.7025  -0.7630  0.051  0.00   0.000      0.  0.878E+00  0.387E-01  0.500E-03  0.189E-04   45   4  25   38  33  22   13  18   9    0.000    0.000       0
+  0   6043 00:57:54.09   0.5780A   3.1136  -0.6857  -0.7281  0.050  0.00   0.000      0.  0.879E+00  0.390E-01  0.490E-03  0.166E-04   45   4  32   38  33  27   11  14   9    0.000    0.000       0
+  0   6054 00:58:00.42   0.5740A   3.1382  -0.6357  -0.7102  0.049  0.00   0.000      0.  0.880E+00  0.395E-01  0.486E-03  0.165E-04   45   4   1   38  33  33   10  14   9    0.000    0.000       0
+  0   6064 00:58:06.13   0.5690A   3.1621  -0.6323   0.6998  0.049  0.00   0.000      0.  0.881E+00  0.399E-01  0.481E-03  0.155E-04   46   5  13   38  33  39   20  11   9    0.000    0.000       0
+  0   6075 00:58:12.38   0.5680A   3.1717  -0.6968  -0.6628  0.049  0.00   0.000      0.  0.882E+00  0.404E-01  0.483E-03  0.159E-04   46   5  21   38  32   5    9  14   9    0.000    0.000       0
+  0   6085 00:58:18.05   0.5650A   3.1848  -0.6550   0.6498  0.049  0.00   0.000      0.  0.883E+00  0.409E-01  0.484E-03  0.161E-04   46   4  29   38  32  10   20  27   9    0.000    0.000       0
+  0   6096 00:58:24.26   0.5640A   3.1921  -0.6198   0.6136  0.049  0.00   0.000      0.  0.884E+00  0.415E-01  0.489E-03  0.159E-04   46   4  37   37  32  15   40  31   5    0.000    0.000       0
+  0   6107 00:58:30.47   0.5660A   3.1820  -0.6357   0.6131  0.048  0.00   0.000      0.  0.884E+00  0.421E-01  0.496E-03  0.150E-04   45   4   6   37  32  21   20  26   9    0.000    0.000       0
+  0   6117 00:58:36.11   0.5580A   3.2275   0.6688   0.6080  0.047  0.00   0.000      0.  0.885E+00  0.426E-01  0.496E-03  0.151E-04   46   3  14   32  12  22   20  26   9    0.000    0.000       0
+  0   6128 00:58:42.18   0.5470A   3.2878   0.6465   0.5886  0.046  0.00   0.000      0.  0.886E+00  0.433E-01  0.496E-03  0.149E-04   46   3  22   32  13  26   20  26   9    0.000    0.000       0
+  0   6139 00:58:48.20   0.5500A   3.2730   0.6512   0.5733  0.046  0.00   0.000      0.  0.887E+00  0.439E-01  0.504E-03  0.141E-04   46   3  30   35   7  31   20  15   9    0.000    0.000       0
+  0   6150 00:58:54.28   0.5570A   3.2292   0.6029   0.5398  0.046  0.00   0.000      0.  0.887E+00  0.445E-01  0.515E-03  0.121E-04   46   3  39   35   7  36   20  15   9    0.000    0.000       0
+  0   6161 00:59:00.49   0.5680A   3.1696   0.7585  -0.6137  0.046  0.00   0.000      0.  0.888E+00  0.452E-01  0.537E-03  0.141E-04   46   2  28   21  24   6   22   8  33    0.000    0.000       0
+  0   6171 00:59:06.18   0.5680A   3.1686  -0.7065  -0.8817  0.047  0.00   0.000      0.  0.888E+00  0.458E-01  0.541E-03  0.136E-04   44   2  14   20  20   9   18  23   9    0.000    0.000       0
+  0   6182 00:59:12.30   0.5520A   3.2590  -0.6209  -1.1077  0.048  0.00   0.000      0.  0.889E+00  0.464E-01  0.533E-03  0.132E-04   44   2  22   19  20   9   17  24   9    0.000    0.000       0
+  0   6193 00:59:18.38   0.5550A   3.2458  -0.6824  -1.1169  0.049  0.00   0.000      0.  0.889E+00  0.468E-01  0.543E-03  0.137E-04   44   2  30   21  28   8   16  25   9    0.000    0.000       0
+  0   6204 00:59:24.50   0.5550A   3.2433   0.6210  -1.0372  0.049  0.00   0.000      0.  0.889E+00  0.472E-01  0.548E-03  0.140E-04   44   5  37   46  36  25   15  25   9    0.000    0.000       0
+  0   6214 00:59:30.00   0.5480A   3.2875   0.6564  -0.9467  0.049  0.00   0.000      0.  0.890E+00  0.475E-01  0.545E-03  0.138E-04   44   5   5   45  36  31   15  28   9    0.000    0.000       0
+  0   6225 00:59:36.06   0.5530A   3.2563  -0.6980  -0.8279  0.048  0.00   0.000      0.  0.890E+00  0.479E-01  0.556E-03  0.142E-04   44   5  13   31  32  33   14  28   9    0.000    0.000       0
+  0   6236 00:59:42.19   0.5550A   3.2459   0.6826  -0.7806  0.048  0.00   0.000      0.  0.890E+00  0.483E-01  0.566E-03  0.155E-04   44   4  20   45  37   4   14  29   9    0.000    0.000       0
+  0   6247 00:59:48.29   0.5590A   3.2177   0.7345  -0.7052  0.047  0.00   0.000      0.  0.891E+00  0.489E-01  0.573E-03  0.150E-04   44   4  29   19  12   9   13  29   9    0.000    0.000       0
+  0   6258 00:59:54.50   0.5640A   3.1891   0.8446  -0.6387  0.047  0.00   0.000      0.  0.891E+00  0.495E-01  0.579E-03  0.145E-04   44   3  37   20  30   9   19  11   5    0.000    0.000       0
+  0   6268 01:00:00.11   0.5570A   3.2304   0.8055  -0.5915  0.047  0.00   0.000      0.  0.891E+00  0.502E-01  0.578E-03  0.159E-04   44   3   5   20  31   9   19   4  37    0.000    0.000       0
+  0   6279 01:00:06.25   0.5620A   3.2045  -0.6677  -0.6982  0.047  0.00   0.000      0.  0.892E+00  0.512E-01  0.588E-03  0.178E-04   44   3  13   34  38  30   15  10   8    0.000    0.000       0
+  0   6290 01:00:12.51   0.5730A   3.1420   0.7452   0.6454  0.047  0.00   0.000      0.  0.892E+00  0.523E-01  0.598E-03  0.172E-04   45   1  26   20  10   6   22  28   7    0.000    0.000       0
+  0   6300 01:00:18.23   0.5690A   3.1636   0.7166   0.7145  0.047  0.00   0.000      0.  0.892E+00  0.535E-01  0.597E-03  0.166E-04   44  39  28   24  29  32   20  28   9    0.000    0.000       0
+  0   6311 01:00:24.47   0.5620A   3.2009   0.6708   0.7929  0.047  0.00   0.000      0.  0.893E+00  0.547E-01  0.600E-03  0.177E-04   44   1   0   24  29  35   20  26   9    0.000    0.000       0
+  0   6321 01:00:30.08   0.5600A   3.2138  -0.8221   0.8070  0.047  0.00   0.000      0.  0.893E+00  0.557E-01  0.605E-03  0.195E-04   44   0   7   36  37  17   21  25   9    0.000    0.000       0
+  0   6332 01:00:36.24   0.5600A   3.2164  -0.8102   0.6739  0.047  0.00   0.000      0.  0.894E+00  0.567E-01  0.606E-03  0.187E-04   44   0  15   36  36  24   21  24   9    0.000    0.000       0
+  0   6343 01:00:42.30   0.5410A   3.3272  -0.7269  -0.7796  0.048  0.00   0.000      0.  0.894E+00  0.575E-01  0.596E-03  0.171E-04   43   0  23   35  36  32   35  37  29    0.000    0.000       0
+  0   6354 01:00:48.20   0.5350A   3.3659  -0.9508  -0.7614  0.049  0.00   0.000      0.  0.895E+00  0.583E-01  0.603E-03  0.173E-04   43   0  31   34  35  37   35  36  35    0.000    0.000       0
+  0   6365 01:00:54.09   0.5320A   3.3865  -1.0834  -0.7943  0.050  0.00   0.000      0.  0.895E+00  0.591E-01  0.612E-03  0.158E-04   43  39  39   34  34   2   34  36   1    0.000    0.000       0
+  0   6377 01:01:00.46   0.5280A   3.4063  -0.9288  -0.8474  0.051  0.00   0.000      0.  0.895E+00  0.597E-01  0.620E-03  0.151E-04   42  39   7   34  32   8   17  20   9    0.000    0.000       0
+  0   6388 01:01:06.26   0.5280A   3.4095   0.8301  -0.8628  0.051  0.00   0.000      0.  0.895E+00  0.600E-01  0.633E-03  0.163E-04   42  39  15   25   0  24   17  22   9    0.000    0.000       0
+  0   6399 01:01:12.21   0.5450A   3.3013   0.9103  -0.8004  0.051  0.00   0.000      0.  0.896E+00  0.603E-01  0.667E-03  0.182E-04   41  39  23   23   2  26   15  22   9    0.000    0.000       0
+  0   6410 01:01:18.18   0.5420A   3.3202   0.8551  -0.8214  0.051  0.00   0.000      0.  0.896E+00  0.605E-01  0.679E-03  0.199E-04   41  39  31   22   2  29   17  26   9    0.000    0.000       0
+  0   6421 01:01:24.20   0.5540A   3.2520   0.9265  -0.7691  0.051  0.00   0.000      0.  0.896E+00  0.608E-01  0.704E-03  0.213E-04   46   0  36   22   3  34   16  24   9    0.000    0.000       0
+  0   6432 01:01:30.32   0.5580A   3.2247   0.8539   0.8854  0.051  0.00   0.000      0.  0.896E+00  0.612E-01  0.710E-03  0.238E-04   46   0   4   22   3  38   20  29   8    0.000    0.000       0
+  0   6443 01:01:36.52   0.5690A   3.1609   0.8647   0.9666  0.050  0.00   0.000      0.  0.896E+00  0.618E-01  0.738E-03  0.294E-04   42  36   5   21   5   1   21  29   8    0.000    0.000       0
+  0   6453 01:01:42.29   0.5820A   3.0912   0.8304   0.9752  0.050  0.00   0.000      0.  0.896E+00  0.625E-01  0.767E-03  0.318E-04   42  36  12   21   8   3   20  28   9    0.000    0.000       0
+  0   6463 01:01:48.17   0.5930A   3.0348  -0.7957   0.9548  0.049  0.00   0.000      0.  0.896E+00  0.634E-01  0.795E-03  0.312E-04   46  31   9   28   0  39   21  26   9    0.000    0.000       0
+  0   6473 01:01:54.14   0.5960A   3.0206  -0.8809   0.8556  0.050  0.00   0.000      0.  0.895E+00  0.641E-01  0.808E-03  0.266E-04   45   4   6   22  13   8   21  14   9    0.000    0.000       0
+  0   6483 01:02:00.06   0.5910A   3.0447  -1.0776  -0.8089  0.051  0.00   0.000      0.  0.895E+00  0.646E-01  0.805E-03  0.247E-04   45   4  14   21  13   8   36  35  27    0.000    0.000       0
+  0   6494 01:02:06.56   0.5960A   3.0210  -1.1048  -0.7435  0.052  0.00   0.000      0.  0.895E+00  0.651E-01  0.819E-03  0.222E-04   38   2  13   20  12   8   36  34  31    0.000    0.000       0
+  0   6504 01:02:12.57   0.6000A   3.0012  -0.8874   0.7668  0.053  0.00   0.000      0.  0.894E+00  0.653E-01  0.840E-03  0.217E-04   46   4  32   20  10   9   39   9  19    0.000    0.000       0
+  0   6514 01:02:18.48   0.5840A   3.0797  -0.8951   0.7253  0.054  0.00   0.000      0.  0.893E+00  0.655E-01  0.829E-03  0.213E-04   45  39  23   19   9   9   39   9  25    0.000    0.000       0
+  0   6524 01:02:24.32   0.5860A   3.0731   0.8838  -0.7298  0.054  0.00   0.000      0.  0.893E+00  0.656E-01  0.834E-03  0.193E-04   46  39  31   26  11   6   18  14   9    0.000    0.000       0
+  0   6534 01:02:30.18   0.5870A   3.0678   0.8956  -0.7596  0.054  0.00   0.000      0.  0.892E+00  0.656E-01  0.846E-03  0.180E-04   46  39  38   26  12  11   29  10   7    0.000    0.000       0
+  0   6544 01:02:36.04   0.5850A   3.0751   0.8544  -0.8558  0.053  0.00   0.000      0.  0.891E+00  0.654E-01  0.852E-03  0.166E-04   46   1   7   26  13  15   26   4  13    0.000    0.000       0
+  0   6555 01:02:42.38   0.5650A   3.1849   0.8565  -0.8280  0.053  0.00   0.000      0.  0.890E+00  0.652E-01  0.830E-03  0.140E-04   46  38  11   26  14  20   25   4  18    0.000    0.000       0
+  0   6566 01:02:48.53   0.5530A   3.2558   0.8340  -0.7904  0.052  0.00   0.000      0.  0.889E+00  0.649E-01  0.823E-03  0.157E-04   46  38  19    9  19   8   24   4  22    0.000    0.000       0
+  0   6576 01:02:54.07   0.5530A   3.2550   0.8497  -0.8480  0.052  0.00   0.000      0.  0.888E+00  0.647E-01  0.827E-03  0.184E-04   46  38  26   26  15  28   32   8  15    0.000    0.000       0
+  0   6587 01:03:00.22   0.5650A   3.1837   0.8703  -1.0264  0.051  0.00   0.000      0.  0.887E+00  0.646E-01  0.840E-03  0.207E-04   46  38  34   26  15  32   17  11   9    0.000    0.000       0
+  0   6598 01:03:06.53   0.5840A   3.0848   0.8316  -1.0437  0.051  0.00   0.000      0.  0.886E+00  0.646E-01  0.850E-03  0.232E-04   46  38   2   25  17  35   16  12   9    0.000    0.000       0
+  0   6608 01:03:12.46   0.5940A   3.0318   0.8722  -1.0003  0.051  0.00   0.000      0.  0.885E+00  0.646E-01  0.847E-03  0.235E-04   45   1   8   18  16   9   15  13   9    0.000    0.000       0
+  0   6618 01:03:18.37   0.5920A   3.0415   0.8301  -0.9376  0.050  0.00   0.000      0.  0.884E+00  0.648E-01  0.830E-03  0.240E-04   45   1  16   17  17   9   14  14   9    0.000    0.000       0
+  0   6628 01:03:24.28   0.5860A   3.0702   0.7814  -0.9382  0.051  0.00   0.000      0.  0.883E+00  0.650E-01  0.807E-03  0.218E-04   43   3   1   42  29   3   15  15   8    0.000    0.000       0
+  0   6638 01:03:30.15   0.5900A   3.0498   0.8219  -0.8894  0.052  0.00   0.000      0.  0.882E+00  0.652E-01  0.807E-03  0.202E-04   43   3   8   42  30   7   17  17   9    0.000    0.000       0
+  0   6648 01:03:36.11   0.5920A   3.0414  -0.9492  -0.8754  0.052  0.00   0.000      0.  0.881E+00  0.654E-01  0.807E-03  0.184E-04   42   3  16   20  11   8   15  18   9    0.000    0.000       0
+  0   6659 01:03:42.54   0.5810A   3.0963  -0.8969  -0.8594  0.053  0.00   0.000      0.  0.879E+00  0.656E-01  0.789E-03  0.175E-04   42   3  24   25   7  19   11  19   9    0.000    0.000       0
+  0   6669 01:03:48.34   0.5770A   3.1185  -0.8847  -0.7973  0.054  0.00   0.000      0.  0.878E+00  0.659E-01  0.781E-03  0.183E-04   42   3  32   25   7  23   10  20   9    0.000    0.000       0
+  0   6679 01:03:54.20   0.5920A   3.0403   0.8206  -0.7800  0.055  0.00   0.000      0.  0.877E+00  0.662E-01  0.800E-03  0.197E-04   43   2  34   27  14   3   22   6  36    0.000    0.000       0
+  0   6689 01:04:00.11   0.5840A   3.0798  -0.8368   0.8048  0.055  0.00   0.000      0.  0.876E+00  0.666E-01  0.788E-03  0.194E-04   40   2  19   24   5  30   20  27   9    0.000    0.000       0
+  0   6700 01:04:06.59   0.5890A   3.0541  -0.7750   0.9143  0.054  0.00   0.000      0.  0.875E+00  0.671E-01  0.803E-03  0.210E-04   44   1   2   24   6  39   20  28   9    0.000    0.000       0
+  0   6710 01:04:12.51   0.5930A   3.0377  -0.8564  -0.8222  0.053  0.00   0.000      0.  0.874E+00  0.676E-01  0.815E-03  0.233E-04   44   1   9   25  11   1   36   5  19    0.000    0.000       0
+  0   6720 01:04:18.50   0.6040A   2.9825  -0.8725  -0.8205  0.052  0.00   0.000      0.  0.873E+00  0.679E-01  0.836E-03  0.254E-04   44   1  16   25  10   5   36   5  25    0.000    0.000       0
+  0   6730 01:04:24.54   0.6050A   2.9756   0.8771   0.9062  0.051  0.00   0.000      0.  0.871E+00  0.680E-01  0.849E-03  0.262E-04   44   2  24   25  17  25   21  12   9    0.000    0.000       0
+  0   6740 01:04:30.58   0.6040A   2.9812   0.8504   0.9886  0.051  0.00   0.000      0.  0.870E+00  0.681E-01  0.858E-03  0.261E-04   44   2  14   25  18  30   20  11   9    0.000    0.000       0
+  0   6749 01:04:36.01   0.6030A   2.9869   0.9246   1.0141  0.050  0.00   0.000      0.  0.869E+00  0.680E-01  0.867E-03  0.236E-04   44   2  20   25  19  35   20  11   9    0.000    0.000       0
+  0   6759 01:04:42.01   0.5990A   3.0034   0.8610   0.9475  0.050  0.00   0.000      0.  0.867E+00  0.679E-01  0.868E-03  0.232E-04   44   2  28   25  21  39   20  11   9    0.000    0.000       0
+  0   6769 01:04:48.00   0.5990A   3.0064   0.9193  -0.7924  0.049  0.00   0.000      0.  0.866E+00  0.677E-01  0.873E-03  0.248E-04   42  10  28   25  22   2   24   9  26    0.000    0.000       0
+  0   6779 01:04:54.00   0.5920A   3.0392  -0.8998  -0.8016  0.048  0.00   0.000      0.  0.864E+00  0.674E-01  0.858E-03  0.263E-04   39  39  36   19   8   9   22   8  29    0.000    0.000       0
+  0   6790 01:05:00.53   0.5920A   3.0406  -0.9404  -0.7701  0.048  0.00   0.000      0.  0.862E+00  0.671E-01  0.852E-03  0.241E-04   43   1   8   20  10   9   21   7  32    0.000    0.000       0
+  0   6800 01:05:06.43   0.5840A   3.0816  -0.9491  -0.8145  0.048  0.00   0.000      0.  0.861E+00  0.669E-01  0.833E-03  0.214E-04   44   8   3   20   9   9   39  37   1    0.000    0.000       0
+  0   6810 01:05:12.26   0.5770A   3.1223   0.7933  -0.8633  0.048  0.00   0.000      0.  0.859E+00  0.666E-01  0.813E-03  0.190E-04   46   6  11   24  13   3   38  37   7    0.000    0.000       0
+  0   6821 01:05:18.53   0.5690A   3.1660   0.7935  -0.7526  0.049  0.00   0.000      0.  0.858E+00  0.665E-01  0.790E-03  0.165E-04   46   6  19   29  18  28   37  37  14    0.000    0.000       0
+  0   6831 01:05:24.26   0.5720A   3.1485   0.8171  -0.7081  0.050  0.00   0.000      0.  0.857E+00  0.664E-01  0.784E-03  0.149E-04   44   4  22   29  18  32   34   5   0    0.000    0.000       0
+  0   6841 01:05:30.04   0.5790A   3.1076   0.8075   0.7335  0.050  0.00   0.000      0.  0.856E+00  0.664E-01  0.786E-03  0.159E-04   43   3  28   29  19  36   28  25  25    0.000    0.000       0
+  0   6852 01:05:36.45   0.5870A   3.0650   0.7860   0.7269  0.050  0.00   0.000      0.  0.855E+00  0.664E-01  0.787E-03  0.160E-04   43   3  36   30  22   1   20  13   9    0.000    0.000       0
+  0   6862 01:05:42.30   0.5780A   3.1127   0.7680  -0.7699  0.050  0.00   0.000      0.  0.854E+00  0.664E-01  0.773E-03  0.158E-04   43   5   3   27  20   4   31   4  16    0.000    0.000       0
+  0   6872 01:05:48.08   0.5750A   3.1298   0.8264   0.8233  0.049  0.00   0.000      0.  0.853E+00  0.665E-01  0.767E-03  0.167E-04   43   5  10   26  21   8   21  14   9    0.000    0.000       0
+  0   6883 01:05:54.44   0.5770A   3.1197   0.8613   0.7376  0.047  0.00   0.000      0.  0.852E+00  0.666E-01  0.767E-03  0.194E-04   46   2  17   26  24  13   34  25   0    0.000    0.000       0
+  0   6893 01:06:00.10   0.5630A   3.1999   0.8940   0.7356  0.046  0.00   0.000      0.  0.851E+00  0.668E-01  0.754E-03  0.205E-04   46   2  24   26  25  17   20  15   9    0.000    0.000       0
+  0   6904 01:06:06.21   0.5510A   3.2655   0.8258   0.7761  0.045  0.00   0.000      0.  0.850E+00  0.671E-01  0.735E-03  0.189E-04   46   2  31   26  26  21   21  15   9    0.000    0.000       0
+  0   6915 01:06:12.31   0.5590A   3.2182   0.7824   0.7780  0.045  0.00   0.000      0.  0.849E+00  0.673E-01  0.737E-03  0.197E-04   45   2  38   30  37  27   33  20  16    0.000    0.000       0
+  0   6926 01:06:18.45   0.5590A   3.2198  -0.9075  -0.9378  0.045  0.00   0.000      0.  0.848E+00  0.674E-01  0.741E-03  0.212E-04   46   2   6   20  26   9   18  29   9    0.000    0.000       0
+  0   6936 01:06:24.09   0.5650A   3.1831   0.8211  -1.0227  0.046  0.00   0.000      0.  0.848E+00  0.675E-01  0.758E-03  0.248E-04   46   2  13   17  30   9   18  28   9    0.000    0.000       0
+  0   6947 01:06:30.40   0.5790A   3.1092  -0.8013  -0.9514  0.047  0.00   0.000      0.  0.847E+00  0.676E-01  0.787E-03  0.291E-04   46   2  21   25  36  22   17  28   9    0.000    0.000       0
+  0   6957 01:06:36.29   0.5940A   3.0308   0.8192  -0.8225  0.048  0.00   0.000      0.  0.846E+00  0.679E-01  0.809E-03  0.308E-04   45   2  28   27   2   3   16  28   9    0.000    0.000       0
+  0   6967 01:06:42.24   0.5970A   3.0165   0.8021  -0.8238  0.050  0.00   0.000      0.  0.845E+00  0.683E-01  0.808E-03  0.284E-04   46   3  36   27   6   6   16  34  33    0.000    0.000       0
+  0   6977 01:06:48.23   0.6000A   2.9982  -0.8675  -0.8730  0.051  0.00   0.000      0.  0.844E+00  0.689E-01  0.815E-03  0.277E-04   44   4   3   29  25   2   17  11   9    0.000    0.000       0
+  0   6987 01:06:54.24   0.6030A   2.9872  -1.0187  -1.0417  0.052  0.00   0.000      0.  0.843E+00  0.695E-01  0.822E-03  0.243E-04   43   2   8   29  25   5   16  11   9    0.000    0.000       0
+  0   6997 01:07:00.30   0.6110A   2.9470  -0.9535  -1.0244  0.052  0.00   0.000      0.  0.842E+00  0.700E-01  0.826E-03  0.208E-04   43   2  15   28  23   7   15  11   9    0.000    0.000       0
+  0   7007 01:07:06.42   0.6180A   2.9124  -1.0855  -0.9890  0.052  0.00   0.000      0.  0.841E+00  0.702E-01  0.818E-03  0.192E-04   43   2  23   29  23  12   14  12   9    0.000    0.000       0
+  0   7017 01:07:12.51   0.6020A   2.9899  -1.0369  -0.8771  0.051  0.00   0.000      0.  0.840E+00  0.702E-01  0.791E-03  0.204E-04   42   2  32   29  21  15   13  12   9    0.000    0.000       0
+  0   7027 01:07:18.48   0.5920A   3.0407  -0.9517  -0.8088  0.050  0.00   0.000      0.  0.839E+00  0.702E-01  0.784E-03  0.228E-04   42   2  39   31  22  21   19  39  11    0.000    0.000       0
+  0   7037 01:07:24.40   0.5890A   3.0540  -0.8638  -0.7437  0.049  0.00   0.000      0.  0.838E+00  0.700E-01  0.780E-03  0.220E-04   42   2   6   31  21  25   15  19   9    0.000    0.000       0
+  0   7047 01:07:30.33   0.5970A   3.0164  -0.8607   0.7881  0.048  0.00   0.000      0.  0.837E+00  0.698E-01  0.789E-03  0.216E-04   42   2  13   31  20  29   31  22  33    0.000    0.000       0
+  0   7057 01:07:36.33   0.5940A   3.0296   0.8994   0.7719  0.049  0.00   0.000      0.  0.836E+00  0.696E-01  0.785E-03  0.211E-04   46   3  31   21  18   8   33  22  35    0.000    0.000       0
+  0   7067 01:07:42.24   0.5900A   3.0496   0.9954  -0.8750  0.049  0.00   0.000      0.  0.836E+00  0.696E-01  0.783E-03  0.243E-04   46   3  38   21  19   8   17  25   9    0.000    0.000       0
+  0   7077 01:07:48.18   0.5950A   3.0238  -1.1226  -0.9565  0.051  0.00   0.000      0.  0.835E+00  0.697E-01  0.801E-03  0.292E-04   45   3   6   20  10   9   16  24   9    0.000    0.000       0
+  0   7087 01:07:54.14   0.5970A   3.0143  -1.0985  -0.9110  0.052  0.00   0.000      0.  0.834E+00  0.699E-01  0.803E-03  0.268E-04   45   3  14   19  10   9   17  14   9    0.000    0.000       0
+  0   7097 01:08:00.15   0.6060A   2.9706   1.0503  -1.1837  0.053  0.00   0.000      0.  0.833E+00  0.701E-01  0.809E-03  0.239E-04   45   3  22   19  19   9   16  17   9    0.000    0.000       0
+  0   7107 01:08:06.20   0.6020A   2.9881   0.8876  -1.2009  0.053  0.00   0.000      0.  0.832E+00  0.702E-01  0.794E-03  0.228E-04   45   3  31   18  20   9   15  14   9    0.000    0.000       0
+  0   7117 01:08:12.23   0.6020A   2.9920   0.8283  -1.0956  0.052  0.00   0.000      0.  0.831E+00  0.704E-01  0.780E-03  0.206E-04   46   2  39   28  16  27   13  17   9    0.000    0.000       0
+  0   7127 01:08:18.23   0.5990A   3.0027   0.7945  -1.0877  0.052  0.00   0.000      0.  0.831E+00  0.705E-01  0.765E-03  0.186E-04   46   2   7   28  18  30   13  18   9    0.000    0.000       0
+  0   7137 01:08:24.22   0.6010A   2.9967   0.8615  -0.9757  0.051  0.00   0.000      0.  0.830E+00  0.706E-01  0.766E-03  0.186E-04   46   2  15   28  19  34   11  18   9    0.000    0.000       0
+  0   7147 01:08:30.32   0.6170A   2.9183   0.8073   0.9640  0.050  0.00   0.000      0.  0.829E+00  0.708E-01  0.788E-03  0.206E-04   46   1  22   28  20  37   20  29   9    0.000    0.000       0
+  0   7157 01:08:36.42   0.6020A   2.9888  -0.9353   1.1652  0.049  0.00   0.000      0.  0.829E+00  0.710E-01  0.776E-03  0.222E-04   46   1  32   20  25   9   20  28   9    0.000    0.000       0
+  0   7167 01:08:42.44   0.6050A   2.9757  -0.9650   0.9755  0.048  0.00   0.000      0.  0.828E+00  0.712E-01  0.789E-03  0.244E-04   46   1   0   20  24   9   20  27   9    0.000    0.000       0
+  0   7177 01:08:48.52   0.6120A   2.9435  -1.0598  -1.0002  0.047  0.00   0.000      0.  0.827E+00  0.716E-01  0.807E-03  0.273E-04   46   0   6   17  26   9   13  28   9    0.000    0.000       0
+  0   7186 01:08:54.01   0.6100A   2.9504  -1.1110  -0.8860  0.046  0.00   0.000      0.  0.827E+00  0.719E-01  0.801E-03  0.271E-04   46   0  14   15  25   9   12  28   9    0.000    0.000       0
+  0   7196 01:09:00.12   0.6120A   2.9393  -1.1202   0.8126  0.046  0.00   0.000      0.  0.826E+00  0.723E-01  0.799E-03  0.250E-04   46   0  22   15  23   9   21  20   9    0.000    0.000       0
+  0   7206 01:09:06.23   0.6110A   2.9441  -0.9979  -0.8818  0.046  0.00   0.000      0.  0.825E+00  0.728E-01  0.792E-03  0.231E-04   46   0  30   15  22   9   20  39  37    0.000    0.000       0
+  0   7216 01:09:12.36   0.6120A   2.9390  -0.9458  -0.7982  0.046  0.00   0.000      0.  0.824E+00  0.734E-01  0.779E-03  0.228E-04   46  36  33   15  24   9   19  39   1    0.000    0.000       0
+  0   7226 01:09:18.49   0.6140A   2.9292  -0.8873   0.9902  0.046  0.00   0.000      0.  0.823E+00  0.742E-01  0.765E-03  0.224E-04   46  36   1   15  30   8   20  29   9    0.000    0.000       0
+  0   7236 01:09:24.58   0.6050A   2.9764  -0.8319  -0.8274  0.046  0.00   0.000      0.  0.823E+00  0.749E-01  0.746E-03  0.245E-04   45  36   8   19  22   9   16  38   9    0.000    0.000       0
+  0   7245 01:09:30.04   0.6040A   2.9788  -0.7855  -0.8924  0.046  0.00   0.000      0.  0.822E+00  0.754E-01  0.743E-03  0.258E-04   44  36  14   15  25   9   15  38  12    0.000    0.000       0
+  0   7255 01:09:36.10   0.6030A   2.9863  -0.8100  -0.8320  0.046  0.00   0.000      0.  0.821E+00  0.758E-01  0.746E-03  0.268E-04   46  38  27   11  22   8   14  38  15    0.000    0.000       0
+  0   7265 01:09:42.07   0.5900A   3.0530  -0.8016  -0.7516  0.046  0.00   0.000      0.  0.820E+00  0.761E-01  0.730E-03  0.251E-04   46  38  34   11  20   8   21   4   4    0.000    0.000       0
+  0   7276 01:09:48.57   0.5960A   3.0200  -0.8067  -0.8182  0.046  0.00   0.000      0.  0.820E+00  0.760E-01  0.735E-03  0.242E-04   46  38   2   23  28  26   23   4   9    0.000    0.000       0
+  0   7286 01:09:54.53   0.6020A   2.9905  -0.7709  -0.8368  0.046  0.00   0.000      0.  0.819E+00  0.758E-01  0.746E-03  0.233E-04   46  39   8   21  30  28   22   4  13    0.000    0.000       0
+  0   7296 01:10:00.53   0.6010A   2.9969  -0.8421  -0.8708  0.046  0.00   0.000      0.  0.819E+00  0.755E-01  0.754E-03  0.210E-04   46  39  15   12  34  27   18   4  17    0.000    0.000       0
+  0   7306 01:10:06.54   0.6030A   2.9848  -0.8077  -0.9072  0.045  0.00   0.000      0.  0.818E+00  0.752E-01  0.763E-03  0.227E-04   46  39  23   11  33  29   17   4  21    0.000    0.000       0
+  0   7315 01:10:12.00   0.6070A   2.9656  -0.8137  -0.9594  0.045  0.00   0.000      0.  0.818E+00  0.750E-01  0.767E-03  0.239E-04   46  39  30   11  32  32   15   4  24    0.000    0.000       0
+  0   7325 01:10:18.07   0.6070A   2.9666  -0.8244  -0.8751  0.045  0.00   0.000      0.  0.818E+00  0.751E-01  0.767E-03  0.221E-04   46  39  38   10  31  33   14   4  27    0.000    0.000       0
+  0   7335 01:10:24.16   0.6110A   2.9461  -0.8864  -0.7749  0.045  0.00   0.000      0.  0.818E+00  0.753E-01  0.779E-03  0.218E-04   43  37   2   11  31  37   14   3  30    0.000    0.000       0
+  0   7345 01:10:30.15   0.5940A   3.0286  -0.8267  -0.7868  0.045  0.00   0.000      0.  0.817E+00  0.757E-01  0.768E-03  0.216E-04   43  37   9   26  26  18   14   5  31    0.000    0.000       0
+  0   7355 01:10:36.08   0.5990A   3.0046  -0.8571   0.8062  0.045  0.00   0.000      0.  0.817E+00  0.761E-01  0.785E-03  0.236E-04   43  37  16   26  26  24   20  29   9    0.000    0.000       0
+  0   7365 01:10:42.14   0.6100A   2.9495  -0.7710   0.8602  0.045  0.00   0.000      0.  0.817E+00  0.765E-01  0.809E-03  0.264E-04   43  37  24   26  25  27   20  28   9    0.000    0.000       0
+  0   7375 01:10:48.25   0.6130A   2.9350  -0.7637   0.7913  0.046  0.00   0.000      0.  0.816E+00  0.768E-01  0.821E-03  0.254E-04   44   3   5   23   9  32   20  27   9    0.000    0.000       0
+  0   7385 01:10:54.33   0.6060A   2.9686  -0.7838   0.8118  0.046  0.00   0.000      0.  0.816E+00  0.769E-01  0.814E-03  0.245E-04   44   3  14   24  10  37   20  25   9    0.000    0.000       0
+  0   7395 01:11:00.41   0.6090A   2.9542   0.8030   0.7595  0.046  0.00   0.000      0.  0.815E+00  0.768E-01  0.817E-03  0.218E-04   43  36   5   24   7  34   20  25   9    0.000    0.000       0
+  0   7404 01:11:06.04   0.6360A   2.8316   0.7930   0.7360  0.046  0.00   0.000      0.  0.815E+00  0.765E-01  0.851E-03  0.195E-04   43  39  14   24   8  37   23   9  25    0.000    0.000       0
+  0   7414 01:11:12.37   0.6240A   2.8827   0.7828   0.7279  0.046  0.00   0.000      0.  0.815E+00  0.761E-01  0.834E-03  0.185E-04   46  38  10   25   9   1   28   9   2    0.000    0.000       0
+  0   7424 01:11:18.56   0.6120A   2.9399  -0.9018  -0.7542  0.046  0.00   0.000      0.  0.815E+00  0.757E-01  0.818E-03  0.202E-04   46  38  17   11  27   9   22   9  14    0.000    0.000       0
+  0   7433 01:11:24.08   0.6130A   2.9372  -0.8800   0.7370  0.047  0.00   0.000      0.  0.814E+00  0.755E-01  0.813E-03  0.205E-04   45  38  23   12  26   9   26  10  37    0.000    0.000       0
+  0   7443 01:11:30.31   0.6280A   2.8677  -0.8514   0.7562  0.047  0.00   0.000      0.  0.814E+00  0.753E-01  0.823E-03  0.214E-04   45  38  30   12  24   9   20  10   9    0.000    0.000       0
+  0   7452 01:11:36.01   0.6340A   2.8407  -0.7824   0.7880  0.047  0.00   0.000      0.  0.814E+00  0.752E-01  0.818E-03  0.217E-04   46  38  37   12  23   9   20  10   9    0.000    0.000       0
+  0   7462 01:11:42.39   0.6400A   2.8117   0.8347   0.7417  0.047  0.00   0.000      0.  0.813E+00  0.754E-01  0.815E-03  0.231E-04   44   2  19   24  10  28   28  10   8    0.000    0.000       0
+  0   7471 01:11:48.17   0.6440A   2.7938   0.7799   0.7578  0.047  0.00   0.000      0.  0.813E+00  0.757E-01  0.817E-03  0.246E-04   44   2  27   22  10  28   29  10  10    0.000    0.000       0
+  0   7481 01:11:54.62   0.6490A   2.7742  -0.7657  -0.8186  0.048  0.00   0.000      0.  0.813E+00  0.762E-01  0.819E-03  0.243E-04   44   2  34   11  31   2   21  27   0    0.000    0.000       0
+  0   7490 01:12:00.42   0.6410A   2.8070  -0.7187  -0.8000  0.048  0.00   0.000      0.  0.812E+00  0.766E-01  0.810E-03  0.236E-04   42  37  24   11  30   4   20  27   2    0.000    0.000       0
+  0   7499 01:12:06.23   0.6420A   2.8038   0.7965  -0.7309  0.048  0.00   0.000      0.  0.812E+00  0.770E-01  0.812E-03  0.220E-04   45   3   6   18  30   9   18  28   9    0.000    0.000       0
+  0   7509 01:12:12.58   0.6310A   2.8524  -0.7843  -0.9237  0.049  0.00   0.000      0.  0.811E+00  0.774E-01  0.795E-03  0.179E-04   45   3  14   20  26   9   17  27   9    0.000    0.000       0
+  0   7518 01:12:18.26   0.6290A   2.8619  -0.7544  -0.8840  0.050  0.00   0.000      0.  0.810E+00  0.777E-01  0.793E-03  0.179E-04   45   3  21   20  25   9   16  27   9    0.000    0.000       0
+  0   7528 01:12:24.54   0.6270A   2.8689   0.7508  -0.8052  0.050  0.00   0.000      0.  0.810E+00  0.781E-01  0.786E-03  0.180E-04   46   3  29   25  13   9   18  33  22    0.000    0.000       0
+  0   7537 01:12:30.19   0.6290A   2.8613   0.7277   0.8004  0.051  0.00   0.000      0.  0.809E+00  0.785E-01  0.788E-03  0.194E-04   46   3  36   16  13   9   19  29   8    0.000    0.000       0
+  0   7547 01:12:36.47   0.6240A   2.8857   0.7764  -0.8488  0.051  0.00   0.000      0.  0.809E+00  0.791E-01  0.780E-03  0.187E-04   43   7  32   15  13   9   18  32  31    0.000    0.000       0
+  0   7556 01:12:42.14   0.6370A   2.8272   0.7710   0.8339  0.051  0.00   0.000      0.  0.808E+00  0.797E-01  0.791E-03  0.196E-04   46   6  10   14  13   9   21  12   9    0.000    0.000       0
+  0   7566 01:12:48.43   0.6260A   2.8760   0.7970  -0.7817  0.050  0.00   0.000      0.  0.808E+00  0.802E-01  0.773E-03  0.213E-04   44   2  25   14  14   9   19  32  39    0.000    0.000       0
+  0   7575 01:12:54.07   0.6250A   2.8805   0.7734  -0.7685  0.050  0.00   0.000      0.  0.807E+00  0.806E-01  0.768E-03  0.225E-04   44   2  32   12  13   9    5   7   5    0.000    0.000       0
+  0   7585 01:13:00.36   0.6350A   2.8361   0.7371   0.7103  0.049  0.00   0.000      0.  0.807E+00  0.811E-01  0.781E-03  0.221E-04   44   2   0   13  14   9   20  12   9    0.000    0.000       0
+  0   7594 01:13:06.10   0.6350A   2.8349  -0.9107  -0.7000  0.049  0.00   0.000      0.  0.806E+00  0.814E-01  0.785E-03  0.215E-04   46   5  39   20  27   8   16  27   9    0.000    0.000       0
+  0   7604 01:13:12.42   0.6280A   2.8670  -1.0016  -0.9554  0.049  0.00   0.000      0.  0.805E+00  0.817E-01  0.788E-03  0.230E-04   45   5   6   19  27   9   17  28   9    0.000    0.000       0
+  0   7613 01:13:18.07   0.6210A   2.8999   0.9012  -0.9283  0.050  0.00   0.000      0.  0.805E+00  0.819E-01  0.785E-03  0.207E-04   44   3   9   20  30   9   17  27   9    0.000    0.000       0
+  0   7623 01:13:24.27   0.6120A   2.9417   0.7486  -0.7985  0.051  0.00   0.000      0.  0.804E+00  0.823E-01  0.776E-03  0.177E-04   44   1  31   19  30   9   15   2   0    0.000    0.000       0
+  0   7633 01:13:30.27   0.5930A   3.0343   0.7184  -0.7304  0.051  0.00   0.000      0.  0.803E+00  0.829E-01  0.750E-03  0.155E-04   44   1  38   29  11   6   14   2   3    0.000    0.000       0
+  0   7643 01:13:36.23   0.6060A   2.9708  -0.6914  -0.6905  0.052  0.00   0.000      0.  0.802E+00  0.834E-01  0.760E-03  0.157E-04   44   1   6   38  19  12   16  24   9    0.000    0.000       0
+  0   7653 01:13:42.33   0.6110A   2.9471   0.6831  -0.6783  0.053  0.00   0.000      0.  0.801E+00  0.838E-01  0.766E-03  0.167E-04   44   0  12   27   9  14   18  36   2    0.000    0.000       0
+  0   7663 01:13:48.50   0.6240A   2.8868   0.7640  -0.7561  0.053  0.00   0.000      0.  0.800E+00  0.841E-01  0.792E-03  0.191E-04   44   0  20   27  10  17   17  37   6    0.000    0.000       0
+  0   7672 01:13:54.16   0.6370A   2.8267   0.7580  -0.7949  0.053  0.00   0.000      0.  0.800E+00  0.842E-01  0.824E-03  0.216E-04   45  36  24   15  14   9   16  37   9    0.000    0.000       0
+  0   7682 01:14:00.52   0.6280A   2.8672   0.7257  -0.7256  0.052  0.00   0.000      0.  0.799E+00  0.844E-01  0.823E-03  0.234E-04   46   3  24   16   0   5   36  19  31    0.000    0.000       0
+  0   7691 01:14:06.08   0.6190A   2.9099   0.7219  -0.7300  0.052  0.00   0.000      0.  0.798E+00  0.845E-01  0.813E-03  0.221E-04   46   3  30   16   1   7   35  19  37    0.000    0.000       0
+  0   7701 01:14:12.32   0.6350A   2.8360  -0.6781  -0.7537  0.052  0.00   0.000      0.  0.798E+00  0.848E-01  0.829E-03  0.195E-04   46   2  38   25   8   9   35  18   0    0.000    0.000       0
+  0   7710 01:14:18.00   0.6310A   2.8514   0.6953  -0.7506  0.052  0.00   0.000      0.  0.797E+00  0.850E-01  0.819E-03  0.159E-04   46   2   4   15   0  17   14  39  23    0.000    0.000       0
+  0   7720 01:14:24.30   0.6340A   2.8375  -0.6962   0.7450  0.052  0.00   0.000      0.  0.796E+00  0.852E-01  0.819E-03  0.158E-04   46   2  12   19  32   2   28   4   8    0.000    0.000       0
+  0   7729 01:14:30.02   0.6370A   2.8259  -0.7459  -0.7555  0.053  0.00   0.000      0.  0.795E+00  0.853E-01  0.826E-03  0.179E-04   45  35  27   19  31   4   13  39  33    0.000    0.000       0
+  0   7739 01:14:36.36   0.6260A   2.8762  -0.8260  -0.7323  0.053  0.00   0.000      0.  0.795E+00  0.853E-01  0.813E-03  0.214E-04   44  32  36   24  30  14   12  39  37    0.000    0.000       0
+  0   7749 01:14:42.57   0.6230A   2.8898  -0.7583   0.7387  0.052  0.00   0.000      0.  0.794E+00  0.852E-01  0.808E-03  0.244E-04   44  32   3   24  29  17   21  27   9    0.000    0.000       0
+  0   7758 01:14:48.26   0.6310A   2.8507  -0.7557   0.7205  0.052  0.00   0.000      0.  0.793E+00  0.850E-01  0.814E-03  0.251E-04   46  34  12   20  28   9   21  30  13    0.000    0.000       0
+  0   7768 01:14:54.54   0.6240A   2.8838   0.7510   0.8372  0.053  0.00   0.000      0.  0.793E+00  0.846E-01  0.803E-03  0.244E-04   46  34  20    9  15   9   21  11   9    0.000    0.000       0
+  0   7777 01:15:00.14   0.6210A   2.8983  -0.7671   0.8604  0.053  0.00   0.000      0.  0.792E+00  0.842E-01  0.800E-03  0.221E-04   46  34  27   25  24  31   17  10   8    0.000    0.000       0
+  0   7787 01:15:06.36   0.6200A   2.9010   0.9140   0.7998  0.053  0.00   0.000      0.  0.791E+00  0.837E-01  0.791E-03  0.194E-04   46  34  35   21  29   8   21  12   9    0.000    0.000       0
+  0   7797 01:15:12.58   0.6240A   2.8826  -0.8019   0.8377  0.054  0.00   0.000      0.  0.791E+00  0.832E-01  0.794E-03  0.187E-04   46  34   3   40  24  12   20  10   9    0.000    0.000       0
+  0   7806 01:15:18.21   0.6240A   2.8842   0.8336   0.7585  0.054  0.00   0.000      0.  0.790E+00  0.827E-01  0.796E-03  0.184E-04   46  33   9   12  13   9   20  10   9    0.000    0.000       0
+  0   7816 01:15:24.43   0.6220A   2.8954   0.8271  -0.7547  0.054  0.00   0.000      0.  0.789E+00  0.822E-01  0.787E-03  0.180E-04   46  33  17   12  14   9   18  24   9    0.000    0.000       0
+  0   7825 01:15:30.03   0.6260A   2.8759  -0.8155  -0.7180  0.054  0.00   0.000      0.  0.789E+00  0.818E-01  0.780E-03  0.179E-04   46  33  23    9  34  24   17  24   9    0.000    0.000       0
+  0   7835 01:15:36.36   0.6380A   2.8229  -0.8086   0.6258  0.054  0.00   0.000      0.  0.788E+00  0.813E-01  0.779E-03  0.195E-04   45  35  28    9  33  26   20  29   9    0.000    0.000       0
+  0   7844 01:15:42.04   0.6260A   2.8771  -0.7753   0.7012  0.053  0.00   0.000      0.  0.787E+00  0.811E-01  0.750E-03  0.198E-04   46  33   1    9  33  29   20  29   9    0.000    0.000       0
+  0   7854 01:15:48.25   0.6180A   2.9114  -0.7934   0.7891  0.053  0.00   0.000      0.  0.787E+00  0.809E-01  0.727E-03  0.182E-04   46  33   9   29  26  21   20  28   9    0.000    0.000       0
+  0   7864 01:15:54.41   0.6180A   2.9108  -0.8042   0.7895  0.053  0.00   0.000      0.  0.786E+00  0.809E-01  0.719E-03  0.175E-04   45  33  16   28  26  25   20  27   9    0.000    0.000       0
+  0   7873 01:16:00.04   0.6300A   2.8559  -0.7929   0.9421  0.052  0.00   0.000      0.  0.786E+00  0.809E-01  0.729E-03  0.188E-04   45  33  23   28  25  28   20  29   9    0.000    0.000       0
+  0   7883 01:16:06.33   0.6250A   2.8783  -0.8168   0.8935  0.052  0.00   0.000      0.  0.785E+00  0.811E-01  0.722E-03  0.195E-04   46  33  33   28  25  33   20  27   9    0.000    0.000       0
+  0   7893 01:16:12.57   0.6240A   2.8847  -0.8409   0.8503  0.052  0.00   0.000      0.  0.785E+00  0.814E-01  0.725E-03  0.218E-04   46  33   1   15  26   9   20  10   9    0.000    0.000       0
+  0   7902 01:16:18.22   0.6330A   2.8445  -0.9546   0.8373  0.051  0.00   0.000      0.  0.784E+00  0.818E-01  0.736E-03  0.236E-04   46  33   8   11  27   9   20  10   9    0.000    0.000       0
+  0   7912 01:16:24.50   0.6240A   2.8867  -1.0637   0.6730  0.051  0.00   0.000      0.  0.783E+00  0.821E-01  0.716E-03  0.216E-04   42  34  24   13  26   9   15  28   9    0.000    0.000       0
+  0   7921 01:16:30.11   0.6230A   2.8913  -1.0620  -0.6915  0.051  0.00   0.000      0.  0.783E+00  0.823E-01  0.708E-03  0.213E-04   46  34  18   14  25   9   18  28   6    0.000    0.000       0
+  0   7931 01:16:36.33   0.6210A   2.8994  -0.9654   0.7192  0.052  0.00   0.000      0.  0.782E+00  0.825E-01  0.699E-03  0.213E-04   44  33  28   15  24   9   21  31  39    0.000    0.000       0
+  0   7941 01:16:42.52   0.6170A   2.9152  -0.8990   0.6779  0.052  0.00   0.000      0.  0.781E+00  0.827E-01  0.691E-03  0.203E-04   45  33   2   11  22   9   22  30   1    0.000    0.000       0
+  0   7950 01:16:48.03   0.6060A   2.9689  -0.8173  -0.6240  0.053  0.00   0.000      0.  0.781E+00  0.828E-01  0.679E-03  0.210E-04   45  33   9   12  22   9   18  27   8    0.000    0.000       0
+  0   7960 01:16:54.06   0.6020A   2.9898   0.7565  -0.7676  0.054  0.00   0.000      0.  0.780E+00  0.829E-01  0.675E-03  0.225E-04   46  33  17   19  30   9   18  25   9    0.000    0.000       0
+  0   7970 01:17:00.06   0.5990A   3.0073   0.9428  -0.7917  0.055  0.00   0.000      0.  0.780E+00  0.832E-01  0.674E-03  0.236E-04   45  33  24   19  30   9   17  26   9    0.000    0.000       0
+  0   7980 01:17:06.05   0.5980A   3.0089   0.9816  -0.7511  0.056  0.00   0.000      0.  0.779E+00  0.836E-01  0.670E-03  0.215E-04   46  33  32   19  30   9    2  10   8    0.000    0.000       0
+  0   7990 01:17:12.04   0.6000A   2.9988   0.9334   0.7682  0.057  0.00   0.000      0.  0.779E+00  0.840E-01  0.669E-03  0.190E-04   46  33   0   19  30   9   20  30   4    0.000    0.000       0
+  0   8000 01:17:18.08   0.6080A   2.9595   0.8368   0.6920  0.058  0.00   0.000      0.  0.778E+00  0.844E-01  0.674E-03  0.188E-04   46  33   8   10  14   9   21  29   6    0.000    0.000       0
+  0   8010 01:17:24.19   0.6140A   2.9298   0.8013   0.7325  0.058  0.00   0.000      0.  0.777E+00  0.848E-01  0.676E-03  0.201E-04   46  33  16   10  15   9   21  29   9    0.000    0.000       0
+  0   8020 01:17:30.36   0.6170A   2.9175   0.7709  -0.6611  0.058  0.00   0.000      0.  0.777E+00  0.852E-01  0.673E-03  0.190E-04   46  32  20   10  13   9   17  19   9    0.000    0.000       0
+  0   8030 01:17:36.48   0.6080A   2.9609   0.7396  -0.7348  0.059  0.00   0.000      0.  0.776E+00  0.854E-01  0.655E-03  0.174E-04   44  35  37   11  14   9   16  19   9    0.000    0.000       0
+  0   8040 01:17:42.53   0.6050A   2.9755   0.7425  -0.7298  0.059  0.00   0.000      0.  0.776E+00  0.855E-01  0.645E-03  0.160E-04   44  35   5   18   0  29   15  19   9    0.000    0.000       0
+  0   8050 01:17:48.60   0.6050A   2.9734   0.7283  -0.7271  0.059  0.00   0.000      0.  0.775E+00  0.856E-01  0.640E-03  0.158E-04   44  35  12   19   0  32   15  18   9    0.000    0.000       0
+  0   8059 01:17:54.07   0.6110A   2.9482   0.7420  -0.7199  0.060  0.00   0.000      0.  0.775E+00  0.856E-01  0.644E-03  0.167E-04   44  35  19   19   2  34   15  18   9    0.000    0.000       0
+  0   8069 01:18:00.18   0.6080A   2.9599   0.7749  -0.6919  0.060  0.00   0.000      0.  0.775E+00  0.857E-01  0.636E-03  0.164E-04   43  33  22   19   3  37   16  18   9    0.000    0.000       0
+  0   8079 01:18:06.24   0.6060A   2.9718   0.7004  -0.6744  0.061  0.00   0.000      0.  0.775E+00  0.858E-01  0.631E-03  0.144E-04   43  33  29   30  15  29   15  18   9    0.000    0.000       0
+  0   8089 01:18:12.34   0.6070A   2.9637  -0.6883  -0.6343  0.062  0.00   0.000      0.  0.774E+00  0.860E-01  0.633E-03  0.139E-04   44  32  33   20  21   8   13  18   8    0.000    0.000       0
+  0   8099 01:18:18.46   0.6130A   2.9372   0.6830   0.6221  0.062  0.00   0.000      0.  0.774E+00  0.863E-01  0.640E-03  0.133E-04   43  34   4   19   1  10   19  29   6    0.000    0.000       0
+  0   8109 01:18:24.59   0.6130A   2.9377   0.6737   0.8001  0.062  0.00   0.000      0.  0.774E+00  0.867E-01  0.640E-03  0.124E-04   43  34  11   19   2  13   19  29   8    0.000    0.000       0
+  0   8118 01:18:30.14   0.6160A   2.9213   0.6101   0.8619  0.061  0.00   0.000      0.  0.774E+00  0.871E-01  0.647E-03  0.147E-04   45  33   5   19   3  16   21  29   9    0.000    0.000       0
+  0   8128 01:18:36.28   0.6110A   2.9453  -0.6829   0.8975  0.061  0.00   0.000      0.  0.774E+00  0.876E-01  0.643E-03  0.156E-04   44  32  12   15  28   9   21  28   9    0.000    0.000       0
+  0   8138 01:18:42.40   0.6100A   2.9499  -0.7806   0.8013  0.061  0.00   0.000      0.  0.774E+00  0.880E-01  0.640E-03  0.141E-04   46  33  21   15  27   9   21  27   9    0.000    0.000       0
+  0   8148 01:18:48.50   0.6090A   2.9564  -0.7690  -0.7653  0.061  0.00   0.000      0.  0.775E+00  0.883E-01  0.640E-03  0.146E-04   46  34  30   15  26   9   18   2  24    0.000    0.000       0
+  0   8157 01:18:54.01   0.6140A   2.9303  -0.7918  -0.8504  0.061  0.00   0.000      0.  0.775E+00  0.885E-01  0.646E-03  0.168E-04   46  34  36   11  27   9   17   2  28    0.000    0.000       0
+  0   8167 01:19:00.06   0.6000A   3.0001  -0.8090  -0.7690  0.061  0.00   0.000      0.  0.775E+00  0.888E-01  0.640E-03  0.183E-04   46  37  38   11  26   9   18   3  30    0.000    0.000       0
+  0   8177 01:19:06.05   0.5980A   3.0125   0.9795  -0.7668  0.062  0.00   0.000      0.  0.775E+00  0.889E-01  0.645E-03  0.180E-04   46  37   5   20  30   9   17   3  34    0.000    0.000       0
+  0   8187 01:19:12.08   0.6060A   2.9693   0.8876  -0.8459  0.062  0.00   0.000      0.  0.775E+00  0.888E-01  0.663E-03  0.175E-04   46  37  12   18  31   9   17  27   9    0.000    0.000       0
+  0   8197 01:19:18.21   0.6160A   2.9206  -0.7451  -0.9129  0.063  0.00   0.000      0.  0.775E+00  0.885E-01  0.675E-03  0.172E-04   46  37  19   23  27  15   16  25   9    0.000    0.000       0
+  0   8207 01:19:24.45   0.6280A   2.8641   0.7448  -0.9223  0.063  0.00   0.000      0.  0.775E+00  0.881E-01  0.689E-03  0.183E-04   44  37  26    8  13   9   15  23   9    0.000    0.000       0
+  0   8216 01:19:30.11   0.6320A   2.8479   0.7723  -0.8764  0.064  0.00   0.000      0.  0.775E+00  0.878E-01  0.701E-03  0.191E-04   45  34  32    7  13   9   14  22   9    0.000    0.000       0
+  0   8226 01:19:36.43   0.6330A   2.8451   0.7820  -0.8495  0.064  0.00   0.000      0.  0.775E+00  0.875E-01  0.717E-03  0.204E-04   42  38  38    7  14   9   13  20   9    0.000    0.000       0
+  0   8235 01:19:42.10   0.6310A   2.8516   0.7477  -0.8057  0.064  0.00   0.000      0.  0.775E+00  0.873E-01  0.717E-03  0.186E-04   42  37   6    5  14   9   12  20   9    0.000    0.000       0
+  0   8245 01:19:48.41   0.6320A   2.8466   0.7342  -0.7354  0.064  0.00   0.000      0.  0.775E+00  0.874E-01  0.723E-03  0.196E-04   45  35  12   20  38  11   11  19   9    0.000    0.000       0
+  0   8254 01:19:54.10   0.6320A   2.8483   0.7134  -0.7103  0.064  0.00   0.000      0.  0.775E+00  0.876E-01  0.731E-03  0.202E-04   46  35  19    3  13   9   23   1  38    0.000    0.000       0
+  0   8264 01:20:00.41   0.6300A   2.8569   0.7239  -0.7404  0.064  0.00   0.000      0.  0.776E+00  0.880E-01  0.738E-03  0.202E-04   45  34  34    3  14   9   23   2   3    0.000    0.000       0
+  0   8273 01:20:06.07   0.6270A   2.8714  -0.7788   0.8436  0.064  0.00   0.000      0.  0.776E+00  0.883E-01  0.743E-03  0.222E-04   46  34   1   16  25   9   20  28   9    0.000    0.000       0
+  0   8283 01:20:12.33   0.6250A   2.8801  -0.7827   0.9059  0.063  0.00   0.000      0.  0.776E+00  0.885E-01  0.746E-03  0.236E-04   46  33   8   15  24   9   20  28   9    0.000    0.000       0
+  0   8293 01:20:18.57   0.6220A   2.8962  -0.8720   0.8217  0.063  0.00   0.000      0.  0.776E+00  0.886E-01  0.752E-03  0.262E-04   43  35  24   19  23   9   20  28   9    0.000    0.000       0
+  0   8302 01:20:24.17   0.6220A   2.8933  -0.9294   0.8753  0.063  0.00   0.000      0.  0.776E+00  0.887E-01  0.750E-03  0.246E-04   42  34  26   19  26   9   20  28   9    0.000    0.000       0
+  0   8312 01:20:30.36   0.6170A   2.9188  -0.8507   0.7739  0.063  0.00   0.000      0.  0.775E+00  0.887E-01  0.738E-03  0.217E-04   42  34  34   19  24   9   28  10  27    0.000    0.000       0
+  0   8322 01:20:36.47   0.6100A   2.9509  -0.7811   0.7740  0.063  0.00   0.000      0.  0.775E+00  0.888E-01  0.732E-03  0.216E-04   42  34   2   16  21   9   28  11  30    0.000    0.000       0
+  0   8332 01:20:42.59   0.6180A   2.9112   0.7652   0.7469  0.063  0.00   0.000      0.  0.775E+00  0.891E-01  0.747E-03  0.215E-04   44  34   6   20  29   8   29  11  33    0.000    0.000       0
+  0   8341 01:20:48.11   0.6100A   2.9491   1.0617   0.7092  0.064  0.00   0.000      0.  0.774E+00  0.894E-01  0.741E-03  0.190E-04   44  36  17   20  30   9   30  11  35    0.000    0.000       0
+  0   8351 01:20:54.21   0.6070A   2.9640   0.8462  -0.7114  0.066  0.00   0.000      0.  0.773E+00  0.897E-01  0.740E-03  0.182E-04   45  34  28   20  30   9   17  19   9    0.000    0.000       0
+  0   8361 01:21:00.24   0.6010A   2.9973  -0.8076  -0.7888  0.068  0.00   0.000      0.  0.773E+00  0.898E-01  0.737E-03  0.190E-04   45  34  36    6  26   9   17  18   9    0.000    0.000       0
+  0   8371 01:21:06.25   0.6010A   2.9967  -0.7729  -0.8162  0.069  0.00   0.000      0.  0.772E+00  0.899E-01  0.745E-03  0.205E-04   46  34   4   20  29   8   15  18   9    0.000    0.000       0
+  0   8381 01:21:12.23   0.5910A   3.0455  -0.9257  -0.8465  0.070  0.00   0.000      0.  0.771E+00  0.899E-01  0.741E-03  0.199E-04   46  33  11   20  27   8   12  29   8    0.000    0.000       0
+  0   8391 01:21:18.06   0.5820A   3.0920  -0.8737  -1.0905  0.070  0.00   0.000      0.  0.770E+00  0.896E-01  0.734E-03  0.189E-04   46  33  18   20  28   9   13  28   9    0.000    0.000       0
+  0   8402 01:21:24.54   0.5960A   3.0201  -1.1170  -0.9117  0.070  0.00   0.000      0.  0.769E+00  0.892E-01  0.749E-03  0.190E-04   46  33  26   14  27   9   13  24   9    0.000    0.000       0
+  0   8412 01:21:30.51   0.5940A   3.0284  -1.0115  -0.8509  0.071  0.00   0.000      0.  0.768E+00  0.887E-01  0.739E-03  0.183E-04   43  32  30   14  25   9   12  23   9    0.000    0.000       0
+  0   8422 01:21:36.30   0.5700A   3.1593  -0.9310  -0.8194  0.071  0.00   0.000      0.  0.767E+00  0.883E-01  0.702E-03  0.172E-04   43  32  36   12  24   9   11  22   8    0.000    0.000       0
+  0   8433 01:21:42.56   0.5760A   3.1248   0.9408  -0.6997  0.071  0.00   0.000      0.  0.766E+00  0.880E-01  0.705E-03  0.184E-04   43  32   4   19  14   9   34  17  16    0.000    0.000       0
+  0   8443 01:21:48.46   0.6120A   2.9422   0.9554   0.8680  0.072  0.00   0.000      0.  0.765E+00  0.878E-01  0.746E-03  0.211E-04   43  32  11   19  15   9   20  11   9    0.000    0.000       0
+  0   8452 01:21:54.03   0.6170A   2.9182   0.9480   0.7633  0.072  0.00   0.000      0.  0.764E+00  0.878E-01  0.753E-03  0.216E-04   46  29  30   18  15   9   20  11   9    0.000    0.000       0
+  0   8462 01:22:00.11   0.6060A   2.9713   0.8216  -0.6913  0.071  0.00   0.000      0.  0.763E+00  0.878E-01  0.736E-03  0.221E-04   46  29  37   18  16   9   28  34  36    0.000    0.000       0
+  0   8472 01:22:06.15   0.6070A   2.9675   0.8025  -0.6955  0.071  0.00   0.000      0.  0.762E+00  0.877E-01  0.722E-03  0.210E-04   46  29   4   15  14   9   28  34   1    0.000    0.000       0
+  0   8482 01:22:12.26   0.6150A   2.9284   0.7624  -0.7041  0.070  0.00   0.000      0.  0.761E+00  0.876E-01  0.725E-03  0.212E-04   46  28  12   15  15   9   24  31   9    0.000    0.000       0
+  0   8492 01:22:18.34   0.6100A   2.9531  -0.7121  -0.7291  0.069  0.00   0.000      0.  0.760E+00  0.873E-01  0.715E-03  0.211E-04   46  28  18   41  12   4   23  31  13    0.000    0.000       0
+  0   8502 01:22:24.49   0.6200A   2.9018  -0.6988  -0.7419  0.068  0.00   0.000      0.  0.759E+00  0.869E-01  0.717E-03  0.195E-04   46  28  26    4  26   9   22  31  17    0.000    0.000       0
+  0   8511 01:22:30.04   0.6140A   2.9317   0.7273  -0.7869  0.068  0.00   0.000      0.  0.758E+00  0.865E-01  0.700E-03  0.167E-04   46  27  33   20  29   8   21  31  21    0.000    0.000       0
+  0   8521 01:22:36.14   0.6100A   2.9521   0.7589  -0.6936  0.068  0.00   0.000      0.  0.757E+00  0.862E-01  0.687E-03  0.156E-04   46  29  37   20  28   9   20  31  25    0.000    0.000       0
+  0   8531 01:22:42.16   0.6010A   2.9956   0.7761  -0.8028  0.069  0.00   0.000      0.  0.756E+00  0.860E-01  0.673E-03  0.160E-04   46  29   4   20  31   9   20  31  30    0.000    0.000       0
+  0   8541 01:22:48.19   0.6040A   2.9789  -0.7803  -0.7700  0.069  0.00   0.000      0.  0.755E+00  0.860E-01  0.675E-03  0.171E-04   46  28  11    2  26   9   19  31  33    0.000    0.000       0
+  0   8551 01:22:54.24   0.6070A   2.9640  -0.7672  -0.7980  0.070  0.00   0.000      0.  0.754E+00  0.861E-01  0.683E-03  0.211E-04   46  28  18    2  24   9   17  22   9    0.000    0.000       0
+  0   8561 01:23:00.34   0.6060A   2.9694  -0.7684  -0.7528  0.070  0.00   0.000      0.  0.753E+00  0.865E-01  0.688E-03  0.242E-04   43  23  29    6  26   9   33  27  37    0.000    0.000       0
+  0   8571 01:23:06.31   0.6000A   2.9976  -0.8178   0.8832  0.070  0.00   0.000      0.  0.752E+00  0.869E-01  0.679E-03  0.230E-04   43  23  35    7  26   9   20  28   9    0.000    0.000       0
+  0   8581 01:23:12.33   0.6050A   2.9740  -0.9946   1.0725  0.069  0.00   0.000      0.  0.751E+00  0.871E-01  0.688E-03  0.253E-04   43  22   2   20  28   9   20  27   9    0.000    0.000       0
+  0   8591 01:23:18.27   0.5890A   3.0546  -1.0311   1.0032  0.068  0.00   0.000      0.  0.750E+00  0.873E-01  0.673E-03  0.253E-04   43  22   9   19  27   9   20  27   9    0.000    0.000       0
+  0   8601 01:23:24.36   0.6190A   2.9089  -1.1143   0.8960  0.067  0.00   0.000      0.  0.749E+00  0.874E-01  0.702E-03  0.236E-04   45  26  15   18  26   9   20  26   9    0.000    0.000       0
+  0   8611 01:23:30.52   0.6140A   2.9297  -1.0909   0.7745  0.066  0.00   0.000      0.  0.749E+00  0.875E-01  0.700E-03  0.223E-04   46  26  22   19  24   9   20  25   9    0.000    0.000       0
+  0   8620 01:23:36.06   0.6170A   2.9192  -1.0557   0.7244  0.065  0.00   0.000      0.  0.748E+00  0.875E-01  0.705E-03  0.225E-04   46  26  29   19  23   9   20  10   9    0.000    0.000       0
+  0   8630 01:23:42.26   0.6210A   2.9006  -0.9759   0.7112  0.065  0.00   0.000      0.  0.747E+00  0.876E-01  0.708E-03  0.216E-04   44  31  21   16  24   8   21  16   9    0.000    0.000       0
+  0   8640 01:23:48.52   0.6290A   2.8634  -0.9650   0.7502  0.064  0.00   0.000      0.  0.746E+00  0.878E-01  0.718E-03  0.210E-04   44  31  28   16  22   8   21  16   9    0.000    0.000       0
+  0   8649 01:23:54.19   0.6290A   2.8632  -0.9889   0.7243  0.064  0.00   0.000      0.  0.746E+00  0.879E-01  0.728E-03  0.221E-04   46  25  12   16  21   8   21  16   9    0.000    0.000       0
+  0   8659 01:24:00.45   0.6140A   2.9299  -0.8893   0.6715  0.064  0.00   0.000      0.  0.745E+00  0.880E-01  0.720E-03  0.217E-04   44  23  19   16  20   8   21  16   9    0.000    0.000       0
+  0   8669 01:24:06.54   0.6090A   2.9552  -0.7426   0.6467  0.064  0.00   0.000      0.  0.745E+00  0.879E-01  0.712E-03  0.202E-04   44  23  25    7  25   9   11   5   4    0.000    0.000       0
+  0   8678 01:24:12.04   0.6130A   2.9349  -0.7584  -0.6546  0.064  0.00   0.000      0.  0.744E+00  0.876E-01  0.720E-03  0.201E-04   43  23  30    5  26   9   37  16   1    0.000    0.000       0
+  0   8688 01:24:18.17   0.6130A   2.9357   0.7650  -0.6624  0.064  0.00   0.000      0.  0.744E+00  0.874E-01  0.730E-03  0.231E-04   43  23  37   42  16  15   40  34   3    0.000    0.000       0
+  0   8698 01:24:24.41   0.6340A   2.8385  -0.8743  -0.7769  0.064  0.00   0.000      0.  0.743E+00  0.872E-01  0.764E-03  0.271E-04   43  23   4   21  12   8   18  20   9    0.000    0.000       0
+  0   8707 01:24:30.28   0.6620A   2.7206  -0.8057  -0.9599  0.065  0.00   0.000      0.  0.742E+00  0.871E-01  0.795E-03  0.295E-04   43  24  11   21  11   8   17  19   9    0.000    0.000       0
+  0   8716 01:24:36.23   0.6600A   2.7272   0.7451  -0.9719  0.066  0.00   0.000      0.  0.742E+00  0.869E-01  0.782E-03  0.286E-04   42  31   2   41  18  29   16  19   9    0.000    0.000       0
+  0   8725 01:24:42.24   0.6690A   2.6921   0.8343  -0.9038  0.067  0.00   0.000      0.  0.741E+00  0.868E-01  0.780E-03  0.269E-04   45  31  39   40  19  34   15  19   9    0.000    0.000       0
+  0   8734 01:24:48.17   0.6480A   2.7781  -0.7721  -0.8206  0.068  0.00   0.000      0.  0.741E+00  0.867E-01  0.741E-03  0.218E-04   43  20  33   26  10  28   14  20   9    0.000    0.000       0
+  0   8743 01:24:54.01   0.6540A   2.7523  -0.7574  -0.7792  0.068  0.00   0.000      0.  0.740E+00  0.865E-01  0.736E-03  0.208E-04   43  20  39   27  10  30   15  22   9    0.000    0.000       0
+  0   8753 01:25:00.58   0.6510A   2.7635   0.7879  -0.8917  0.068  0.00   0.000      0.  0.739E+00  0.860E-01  0.726E-03  0.200E-04   45  18  38   19  13   9   17  25   9    0.000    0.000       0
+  0   8762 01:25:06.39   0.6430A   2.7976   0.7905   0.8407  0.067  0.00   0.000      0.  0.739E+00  0.853E-01  0.722E-03  0.200E-04   46  18   5   19  13   9   20  11   9    0.000    0.000       0
+  0   8771 01:25:12.13   0.6290A   2.8604   0.9036   0.9012  0.066  0.00   0.000      0.  0.738E+00  0.844E-01  0.721E-03  0.203E-04   46  18  12   19  14   9   20  11   9    0.000    0.000       0
+  0   8781 01:25:18.48   0.6440A   2.7963   0.9647   0.7959  0.064  0.00   0.000      0.  0.738E+00  0.832E-01  0.746E-03  0.211E-04   46  18  19   19  13   9   21  13   9    0.000    0.000       0
+  0   8790 01:25:24.34   0.6550A   2.7462   0.9899   0.6987  0.062  0.00   0.000      0.  0.737E+00  0.820E-01  0.761E-03  0.227E-04   46  18  30   18  14   9   20  10   9    0.000    0.000       0
+  0   8799 01:25:30.15   0.6370A   2.8236   0.9428  -0.6945  0.061  0.00   0.000      0.  0.737E+00  0.808E-01  0.741E-03  0.250E-04   41  27  30   19  15   9   40  16  36    0.000    0.000       0
+  0   8809 01:25:36.59   0.6520A   2.7628   0.8376  -0.6488  0.060  0.00   0.000      0.  0.736E+00  0.797E-01  0.759E-03  0.297E-04   43  18   0   19  16   9   40  16   2    0.000    0.000       0
+  0   8818 01:25:42.49   0.6590A   2.7304   0.8486  -0.6881  0.059  0.00   0.000      0.  0.736E+00  0.789E-01  0.764E-03  0.306E-04   46  15   4   19  30   9   38  20  10    0.000    0.000       0
+  0   8827 01:25:48.42   0.6550A   2.7466   0.8264  -0.7195  0.058  0.00   0.000      0.  0.735E+00  0.782E-01  0.751E-03  0.307E-04   46  15  10   19  30   9   39  16  13    0.000    0.000       0
+  0   8836 01:25:54.31   0.6520A   2.7615   0.7448  -0.7493  0.058  0.00   0.000      0.  0.735E+00  0.777E-01  0.742E-03  0.290E-04   45  31   3   18  30   9   17  28   9    0.000    0.000       0
+  0   8845 01:26:00.16   0.6480A   2.7790   0.6964   0.7031  0.058  0.00   0.000      0.  0.735E+00  0.773E-01  0.734E-03  0.276E-04   46  20  24   34  39  31   21  12   9    0.000    0.000       0
+  0   8855 01:26:06.65   0.6480A   2.7780   0.7504   0.7142  0.059  0.00   0.000      0.  0.734E+00  0.769E-01  0.735E-03  0.276E-04   46  20  31   34   0  36   21  11   5    0.000    0.000       0
+  0   8864 01:26:12.51   0.6550A   2.7494  -0.7122   0.7360  0.059  0.00   0.000      0.  0.734E+00  0.767E-01  0.741E-03  0.253E-04   44  33  21   23  10  22   20  10   9    0.000    0.000       0
+  0   8873 01:26:18.35   0.6410A   2.8083   0.7215   0.8134  0.060  0.00   0.000      0.  0.734E+00  0.765E-01  0.726E-03  0.233E-04   44  33  27   12  10   0   21  12   9    0.000    0.000       0
+  0   8882 01:26:24.19   0.6540A   2.7530  -0.7983   0.9212  0.061  0.00   0.000      0.  0.733E+00  0.764E-01  0.743E-03  0.250E-04   44  33  33   20  24   8   20  11   9    0.000    0.000       0
+  0   8891 01:26:30.08   0.6560A   2.7443   0.7604   0.9529  0.061  0.00   0.000      0.  0.733E+00  0.763E-01  0.748E-03  0.260E-04   44  33   0   19  14   9   21  13   9    0.000    0.000       0
+  0   8901 01:26:36.65   0.6650A   2.7058   0.8960   0.9550  0.061  0.00   0.000      0.  0.733E+00  0.759E-01  0.754E-03  0.236E-04   43  34   8   12  15   9   22  14   9    0.000    0.000       0
+  0   8909 01:26:42.04   0.6830A   2.6364   0.9385   0.9225  0.061  0.00   0.000      0.  0.733E+00  0.755E-01  0.771E-03  0.253E-04   41  30  15   11  16   9   20  11   9    0.000    0.000       0
+  0   8918 01:26:48.16   0.6800A   2.6462   0.9491   0.9497  0.060  0.00   0.000      0.  0.732E+00  0.749E-01  0.763E-03  0.268E-04   42  33  17    9  15   8   21  15   9    0.000    0.000       0
+  0   8927 01:26:54.27   0.6880A   2.6145   1.0667   0.9251  0.061  0.00   0.000      0.  0.732E+00  0.740E-01  0.768E-03  0.259E-04   42  33  23    7  16   8   22  15   9    0.000    0.000       0
+  0   8936 01:27:00.49   0.6870A   2.6194   0.9772  -0.7768  0.062  0.00   0.000      0.  0.732E+00  0.730E-01  0.762E-03  0.244E-04   46  16   7    7  19   8    3  12   9    0.000    0.000       0
+  0   8945 01:27:06.65   0.6830A   2.6349   0.9879  -0.7999  0.063  0.00   0.000      0.  0.732E+00  0.718E-01  0.749E-03  0.245E-04   45  16  13    6  16   8   17  21   9    0.000    0.000       0
+  0   8953 01:27:12.09   0.6790A   2.6499   1.0305  -0.8889  0.065  0.00   0.000      0.  0.732E+00  0.707E-01  0.739E-03  0.242E-04   45  16  19    6  17   8   17  20   9    0.000    0.000       0
+  0   8962 01:27:18.20   0.6780A   2.6560   1.0106  -0.8548  0.067  0.00   0.000      0.  0.731E+00  0.694E-01  0.737E-03  0.246E-04   46  16  26    5  19   8   16  20   9    0.000    0.000       0
+  0   8971 01:27:24.33   0.6840A   2.6301   0.9389  -0.8034  0.069  0.00   0.000      0.  0.731E+00  0.682E-01  0.748E-03  0.272E-04   46  17   4    4  21   8   15  19   9    0.000    0.000       0
+  0   8980 01:27:30.50   0.6890A   2.6110   0.8427   0.7953  0.071  0.00   0.000      0.  0.731E+00  0.672E-01  0.758E-03  0.316E-04   46  17  10    4  22   8   20  28   9    0.000    0.000       0
+  0   8988 01:27:36.01   0.6910A   2.6032   0.7346   0.8636  0.072  0.00   0.000      0.  0.731E+00  0.664E-01  0.764E-03  0.334E-04   46  17  16    3  20   8   21  27   9    0.000    0.000       0
+  0   8997 01:27:42.20   0.6850A   2.6278  -0.7151  -0.7307  0.073  0.00   0.000      0.  0.731E+00  0.657E-01  0.756E-03  0.322E-04   46  17  24   17  10   9   15  19   9    0.000    0.000       0
+  0   9006 01:27:48.30   0.6760A   2.6633  -0.9763   0.6836  0.072  0.00   0.000      0.  0.731E+00  0.651E-01  0.743E-03  0.296E-04   46  17  30   20  20   8   20  10   9    0.000    0.000       0
+  0   9015 01:27:54.35   0.6700A   2.6879  -0.9467   0.8418  0.072  0.00   0.000      0.  0.731E+00  0.645E-01  0.729E-03  0.270E-04   45  16  35   20  19   8   20  10   9    0.000    0.000       0
+  0   9024 01:28:00.35   0.6640A   2.7100   0.8017   0.9214  0.072  0.00   0.000      0.  0.731E+00  0.640E-01  0.717E-03  0.259E-04   45  16   2   21  29   4   20  10   9    0.000    0.000       0
+  0   9033 01:28:06.31   0.6610A   2.7243  -0.7269   0.9319  0.071  0.00   0.000      0.  0.731E+00  0.636E-01  0.712E-03  0.267E-04   46  16   9   19  19   7   20  10   9    0.000    0.000       0
+  0   9042 01:28:12.30   0.6690A   2.6916   0.7813   0.8486  0.070  0.00   0.000      0.  0.731E+00  0.634E-01  0.722E-03  0.288E-04   46  15  14   20  30   6   20  12   9    0.000    0.000       0
+  0   9051 01:28:18.34   0.6750A   2.6673   0.8532   0.8250  0.070  0.00   0.000      0.  0.731E+00  0.631E-01  0.728E-03  0.289E-04   46  15  21   20  30   8   21  13   9    0.000    0.000       0
+  0   9060 01:28:24.41   0.6750A   2.6652  -0.9558  -0.8101  0.069  0.00   0.000      0.  0.731E+00  0.628E-01  0.726E-03  0.270E-04   45  12  21   18  18   9   18  19   9    0.000    0.000       0
+  0   9069 01:28:30.45   0.6660A   2.7018   0.8917  -0.9356  0.069  0.00   0.000      0.  0.730E+00  0.623E-01  0.709E-03  0.238E-04   46  12  32   19  31   9   17  19   9    0.000    0.000       0
+  0   9078 01:28:36.44   0.6660A   2.7027   0.7942  -0.9665  0.069  0.00   0.000      0.  0.730E+00  0.616E-01  0.704E-03  0.218E-04   46  12  39   18  31   9   17  24   9    0.000    0.000       0
+  0   9087 01:28:42.40   0.6590A   2.7305  -0.7158  -0.8007  0.069  0.00   0.000      0.  0.730E+00  0.610E-01  0.697E-03  0.209E-04   46  11   5    5  29   8   16  24   9    0.000    0.000       0
+  0   9096 01:28:48.40   0.6690A   2.6907   0.6696  -0.7219  0.068  0.00   0.000      0.  0.730E+00  0.603E-01  0.705E-03  0.208E-04   45  10  11    2  28   5    2  30  10    0.000    0.000       0
+  0   9105 01:28:54.35   0.6560A   2.7445   0.6559  -0.6418  0.067  0.00   0.000      0.  0.730E+00  0.598E-01  0.684E-03  0.209E-04   45  26   4    1  27   4    4  28   8    0.000    0.000       0
+  0   9114 01:29:00.20   0.6480A   2.7786  -0.6904   0.6702  0.065  0.00   0.000      0.  0.731E+00  0.593E-01  0.671E-03  0.218E-04   46  26  11   26  19   9   20  10   9    0.000    0.000       0
+  0   9124 01:29:06.63   0.6350A   2.8346  -0.7178  -0.6248  0.064  0.00   0.000      0.  0.731E+00  0.589E-01  0.655E-03  0.238E-04   43  10  32   26  18  11   21  35  19    0.000    0.000       0
+  0   9133 01:29:12.29   0.6250A   2.8795  -0.6365   0.6189  0.062  0.00   0.000      0.  0.731E+00  0.587E-01  0.646E-03  0.258E-04   43  10  38   26  17  13   20  27   9    0.000    0.000       0
+  0   9143 01:29:18.53   0.6250A   2.8791   0.6960   0.6321  0.061  0.00   0.000      0.  0.731E+00  0.586E-01  0.647E-03  0.283E-04   43  10   6   21  29   8   21  30   1    0.000    0.000       0
+  0   9152 01:29:24.18   0.6350A   2.8368   0.7525   0.6813  0.061  0.00   0.000      0.  0.731E+00  0.585E-01  0.657E-03  0.283E-04   43  10  12   20  29   8   21  29   3    0.000    0.000       0
+  0   9162 01:29:30.62   0.6500A   2.7699  -0.7632  -0.7542  0.061  0.00   0.000      0.  0.731E+00  0.584E-01  0.676E-03  0.279E-04   45  25   8   20  11   8   17  22   9    0.000    0.000       0
+  0   9171 01:29:36.50   0.6530A   2.7569   0.7324   0.7948  0.061  0.00   0.000      0.  0.732E+00  0.583E-01  0.679E-03  0.274E-04   45  22   9    9  16   9   20  29   9    0.000    0.000       0
+  0   9180 01:29:42.36   0.6500A   2.7713   0.7375   0.8885  0.061  0.00   0.000      0.  0.732E+00  0.582E-01  0.674E-03  0.265E-04   46  24  22    9  17   9   21  28   9    0.000    0.000       0
+  0   9189 01:29:48.20   0.6490A   2.7748  -0.8208   0.7618  0.061  0.00   0.000      0.  0.732E+00  0.580E-01  0.664E-03  0.239E-04   46  24  29   20  26   8   20  26   9    0.000    0.000       0
+  0   9198 01:29:54.07   0.6540A   2.7514   0.7519   0.8304  0.061  0.00   0.000      0.  0.732E+00  0.579E-01  0.664E-03  0.234E-04   44  22  29    9  15   9   21  24   9    0.000    0.000       0
+  0   9208 01:30:00.59   0.6520A   2.7613   0.8119   0.8124  0.060  0.00   0.000      0.  0.732E+00  0.578E-01  0.661E-03  0.255E-04   44  22  36    9  16   9   20  28   9    0.000    0.000       0
+  0   9217 01:30:06.44   0.6520A   2.7625   0.8091   0.7058  0.060  0.00   0.000      0.  0.732E+00  0.577E-01  0.651E-03  0.254E-04   46  22  24    9  17   9   20  23   9    0.000    0.000       0
+  0   9226 01:30:12.31   0.6530A   2.7569   0.7758  -0.6651  0.060  0.00   0.000      0.  0.732E+00  0.574E-01  0.638E-03  0.219E-04   46  22  31    7  18   9   38  15  28    0.000    0.000       0
+  0   9235 01:30:18.21   0.6600A   2.7258  -0.7353  -0.6132  0.060  0.00   0.000      0.  0.732E+00  0.571E-01  0.632E-03  0.205E-04   46  22  38   20  19   9   13  10   8    0.000    0.000       0
+  0   9244 01:30:24.14   0.6550A   2.7501   0.6965  -0.6198  0.060  0.00   0.000      0.  0.733E+00  0.566E-01  0.617E-03  0.206E-04   45  21  16    5  17   8   14   8   7    0.000    0.000       0
+  0   9254 01:30:30.64   0.6460A   2.7864   0.6725  -0.6422  0.060  0.00   0.000      0.  0.733E+00  0.560E-01  0.599E-03  0.203E-04   46  21  24    5  18   8   15   9   8    0.000    0.000       0
+  0   9263 01:30:36.43   0.6420A   2.8019  -0.7238  -0.6635  0.059  0.00   0.000      0.  0.733E+00  0.555E-01  0.591E-03  0.204E-04   46  22  30   13  27   9   14   9   9    0.000    0.000       0
+  0   9272 01:30:42.17   0.6350A   2.8348  -0.7583  -0.6478  0.059  0.00   0.000      0.  0.734E+00  0.551E-01  0.584E-03  0.194E-04   46  22  37   13  26   9   18  10   9    0.000    0.000       0
+  0   9282 01:30:48.51   0.6310A   2.8508   0.7937  -0.7290  0.060  0.00   0.000      0.  0.734E+00  0.547E-01  0.585E-03  0.214E-04   46  22   5   20  29   9   17  10   9    0.000    0.000       0
+  0   9291 01:30:54.20   0.6320A   2.8464   1.0411  -0.7778  0.060  0.00   0.000      0.  0.735E+00  0.544E-01  0.589E-03  0.235E-04   46  22  12   19  30   9   17  11   9    0.000    0.000       0
+  0   9301 01:31:00.54   0.6330A   2.8420   1.0573  -0.9669  0.059  0.00   0.000      0.  0.735E+00  0.541E-01  0.595E-03  0.232E-04   45  15   4   18  31   9   16  11   9    0.000    0.000       0
+  0   9310 01:31:06.22   0.6300A   2.8588   0.8008  -1.0156  0.059  0.00   0.000      0.  0.736E+00  0.539E-01  0.592E-03  0.212E-04   46  15  11   17  31   9   16  26   9    0.000    0.000       0
+  0   9320 01:31:12.54   0.6330A   2.8438   0.7331  -0.9797  0.059  0.00   0.000      0.  0.736E+00  0.536E-01  0.592E-03  0.197E-04   46  15  18   21  32  19   15  24   9    0.000    0.000       0
+  0   9329 01:31:18.21   0.6280A   2.8675  -0.6958  -0.9462  0.059  0.00   0.000      0.  0.737E+00  0.534E-01  0.583E-03  0.194E-04   46  15  25   42   3  13   14  24   9    0.000    0.000       0
+  0   9339 01:31:24.46   0.6250A   2.8822  -0.7404   0.9080  0.058  0.00   0.000      0.  0.737E+00  0.533E-01  0.573E-03  0.195E-04   46  17  37   42   3  19   20  28   9    0.000    0.000       0
+  0   9348 01:31:30.09   0.6250A   2.8809  -0.7448   0.8549  0.058  0.00   0.000      0.  0.738E+00  0.533E-01  0.568E-03  0.198E-04   46  17   3   42   2  25   20  27   9    0.000    0.000       0
+  0   9358 01:31:36.36   0.6280A   2.8649  -0.7056   0.7874  0.057  0.00   0.000      0.  0.738E+00  0.534E-01  0.568E-03  0.207E-04   46  17  11   42   1  30   21  26   9    0.000    0.000       0
+  0   9368 01:31:42.60   0.6180A   2.9124  -0.6644  -0.6973  0.056  0.00   0.000      0.  0.739E+00  0.534E-01  0.555E-03  0.186E-04   45  20  11   41   0  36    9  24   8    0.000    0.000       0
+  0   9377 01:31:48.13   0.6110A   2.9467  -0.7349  -0.6376  0.056  0.00   0.000      0.  0.740E+00  0.533E-01  0.545E-03  0.157E-04   45  20  18   41  39   1    9  22   8    0.000    0.000       0
+  0   9387 01:31:54.23   0.6090A   2.9544  -0.7690  -0.6500  0.055  0.00   0.000      0.  0.740E+00  0.532E-01  0.537E-03  0.133E-04   45  20  25   41  38   6    8  22   8    0.000    0.000       0
+  0   9397 01:32:00.29   0.6050A   2.9736  -0.7196  -0.6417  0.054  0.00   0.000      0.  0.741E+00  0.531E-01  0.536E-03  0.139E-04   45  20  33   41  37  11    7  22   8    0.000    0.000       0
+  0   9407 01:32:06.39   0.6160A   2.9240  -0.6447   0.6131  0.053  0.00   0.000      0.  0.742E+00  0.529E-01  0.549E-03  0.154E-04   45  20   0   41  36  16   18  11   9    0.000    0.000       0
+  0   9417 01:32:12.52   0.6070A   2.9658   0.6034   0.7106  0.051  0.00   0.000      0.  0.743E+00  0.529E-01  0.542E-03  0.157E-04   46  20  12   37  27  39   21  11   9    0.000    0.000       0
+  0   9427 01:32:18.51   0.5950A   3.0247  -0.5810   0.7258  0.049  0.00   0.000      0.  0.744E+00  0.528E-01  0.533E-03  0.168E-04   46  20  19    9  26   9   22  11   9    0.000    0.000       0
+  0   9437 01:32:24.46   0.5940A   3.0308  -0.6488   0.7381  0.048  0.00   0.000      0.  0.745E+00  0.528E-01  0.537E-03  0.193E-04   46  20  26    9  25   9   22  12   9    0.000    0.000       0
+  0   9447 01:32:30.45   0.6030A   2.9870  -0.6924   0.7465  0.048  0.00   0.000      0.  0.746E+00  0.529E-01  0.552E-03  0.218E-04   46  20  33    9  25   9   21  13   9    0.000    0.000       0
+  0   9457 01:32:36.55   0.6110A   2.9449   0.7750   0.7667  0.048  0.00   0.000      0.  0.746E+00  0.531E-01  0.562E-03  0.216E-04   43  26  28   20  30   9   22  13   9    0.000    0.000       0
+  0   9466 01:32:42.03   0.6110A   2.9454   0.7491  -0.6258  0.048  0.00   0.000      0.  0.747E+00  0.533E-01  0.564E-03  0.189E-04   43  26  35   19  31   9   21  30   9    0.000    0.000       0
+  0   9476 01:32:48.18   0.6120A   2.9388   0.6880  -0.5887  0.049  0.00   0.000      0.  0.748E+00  0.534E-01  0.572E-03  0.195E-04   46  19  20   17  14   9   22  28  12    0.000    0.000       0
+  0   9486 01:32:54.27   0.6070A   2.9668   0.8178  -0.5576  0.049  0.00   0.000      0.  0.748E+00  0.535E-01  0.569E-03  0.206E-04   45  19  27   19  30   9   13  12   9    0.000    0.000       0
+  0   9496 01:33:00.30   0.6000A   3.0009   0.8102  -0.6368  0.050  0.00   0.000      0.  0.749E+00  0.536E-01  0.566E-03  0.209E-04   46  19  35   19  30   9   39  20   5    0.000    0.000       0
+  0   9506 01:33:06.30   0.6010A   2.9953   0.7260  -0.6865  0.051  0.00   0.000      0.  0.749E+00  0.537E-01  0.567E-03  0.200E-04   46  19   2   21  34  23   38  20  11    0.000    0.000       0
+  0   9516 01:33:12.37   0.6130A   2.9385   0.6986  -0.7617  0.052  0.00   0.000      0.  0.750E+00  0.538E-01  0.576E-03  0.194E-04   46  19  10   20  35  24   14  12   8    0.000    0.000       0
+  0   9526 01:33:18.55   0.6210A   2.9001   0.6516  -0.7777  0.052  0.00   0.000      0.  0.750E+00  0.539E-01  0.578E-03  0.176E-04   46  19  18   21  35  28   13  12   8    0.000    0.000       0
+  0   9535 01:33:24.12   0.6140A   2.9338  -0.6873  -0.7220  0.053  0.00   0.000      0.  0.751E+00  0.539E-01  0.568E-03  0.159E-04   45  20  29   21  25   6   14  17   9    0.000    0.000       0
+  0   9545 01:33:30.17   0.6010A   2.9972  -0.7098  -0.6944  0.053  0.00   0.000      0.  0.751E+00  0.539E-01  0.558E-03  0.160E-04   46  20  37   21  24   6   13  17   9    0.000    0.000       0
+  0   9555 01:33:36.14   0.5980A   3.0100  -0.7195  -0.6744  0.053  0.00   0.000      0.  0.752E+00  0.539E-01  0.551E-03  0.152E-04   46  20   4   21  24   8   12  14   7    0.000    0.000       0
+  0   9565 01:33:42.17   0.6070A   2.9645  -0.7434  -0.6355  0.053  0.00   0.000      0.  0.752E+00  0.539E-01  0.555E-03  0.144E-04   46  20  11   20  25   8   11  14   7    0.000    0.000       0
+  0   9575 01:33:48.22   0.6020A   2.9906  -0.6362  -0.6109  0.053  0.00   0.000      0.  0.752E+00  0.539E-01  0.546E-03  0.140E-04   46  20  21   23  23  20   11  15   7    0.000    0.000       0
+  0   9585 01:33:54.24   0.6020A   2.9913  -0.6666  -0.6177  0.053  0.00   0.000      0.  0.753E+00  0.539E-01  0.544E-03  0.138E-04   46  20  28   20  26   9   11  13   9    0.000    0.000       0
+  0   9595 01:34:00.29   0.6060A   2.9690  -0.6638   0.7461  0.053  0.00   0.000      0.  0.753E+00  0.540E-01  0.546E-03  0.144E-04   46  21  36   19  27   8   20  10   9    0.000    0.000       0
+  0   9605 01:34:06.33   0.6020A   2.9894   0.5966   0.7001  0.053  0.00   0.000      0.  0.753E+00  0.541E-01  0.543E-03  0.140E-04   46  27   7   19  13   9   20  10   9    0.000    0.000       0
+  0   9615 01:34:12.35   0.6030A   2.9843   0.6291   0.7693  0.053  0.00   0.000      0.  0.753E+00  0.543E-01  0.545E-03  0.150E-04   44  20  10   20  23   9   20  11   9    0.000    0.000       0
+  0   9625 01:34:18.44   0.6130A   2.9373  -0.7111   0.8701  0.053  0.00   0.000      0.  0.753E+00  0.546E-01  0.552E-03  0.168E-04   46  21  18   21  11   8   20  11   9    0.000    0.000       0
+  0   9635 01:34:24.58   0.6150A   2.9256   0.5884   0.8316  0.053  0.00   0.000      0.  0.754E+00  0.549E-01  0.550E-03  0.175E-04   45  28  29   17  12   9   20  11   9    0.000    0.000       0
+  0   9644 01:34:30.10   0.6130A   2.9371   0.7704  -0.7288  0.054  0.00   0.000      0.  0.754E+00  0.553E-01  0.545E-03  0.163E-04   44  21  32   16  13   9   17  23   9    0.000    0.000       0
+  0   9654 01:34:36.19   0.6080A   2.9627   0.7958  -0.8757  0.055  0.00   0.000      0.  0.754E+00  0.555E-01  0.535E-03  0.150E-04   44  21  39   15  13   9   17  24   9    0.000    0.000       0
+  0   9664 01:34:42.26   0.6080A   2.9585   0.8028  -0.8685  0.056  0.00   0.000      0.  0.754E+00  0.557E-01  0.530E-03  0.150E-04   46  29  12   15  14   9   16  25   9    0.000    0.000       0
+  0   9674 01:34:48.37   0.6150A   2.9287   0.7993  -0.8001  0.056  0.00   0.000      0.  0.754E+00  0.557E-01  0.530E-03  0.160E-04   44  21  14   14  15   9   15  25   9    0.000    0.000       0
+  0   9684 01:34:54.56   0.6160A   2.9222   0.7878  -0.6973  0.056  0.00   0.000      0.  0.755E+00  0.558E-01  0.520E-03  0.152E-04   46  14  14   14  16   9   16  27   8    0.000    0.000       0
+  0   9693 01:35:00.07   0.6080A   2.9615   0.7672  -0.7123  0.056  0.00   0.000      0.  0.755E+00  0.558E-01  0.508E-03  0.144E-04   46  15  24   13  17   9   15  27   8    0.000    0.000       0
+  0   9703 01:35:06.10   0.5980A   3.0116   0.7171  -0.6231  0.056  0.00   0.000      0.  0.756E+00  0.560E-01  0.497E-03  0.131E-04   46  15  31   11  18   9   14  27   8    0.000    0.000       0
+  0   9713 01:35:12.06   0.5950A   3.0263   0.6810  -0.5771  0.056  0.00   0.000      0.  0.756E+00  0.562E-01  0.493E-03  0.130E-04   46  15  38   11  19   9    6  14   9    0.000    0.000       0
+  0   9724 01:35:18.58   0.5920A   3.0423   0.6867  -0.5359  0.055  0.00   0.000      0.  0.757E+00  0.564E-01  0.489E-03  0.121E-04   46  15   6   14  17   9    5  14   9    0.000    0.000       0
+  0   9734 01:35:24.49   0.5890A   3.0559   0.6740  -0.5412  0.054  0.00   0.000      0.  0.757E+00  0.565E-01  0.487E-03  0.115E-04   45  14  11   14  18   9   25  24   8    0.000    0.000       0
+  0   9744 01:35:30.36   0.5880A   3.0637   0.6591  -0.5750  0.053  0.00   0.000      0.  0.758E+00  0.565E-01  0.488E-03  0.119E-04   45  14  18   14  18   9   24  24  11    0.000    0.000       0
+  0   9754 01:35:36.19   0.5840A   3.0841   0.6608  -0.5746  0.052  0.00   0.000      0.  0.758E+00  0.566E-01  0.485E-03  0.131E-04   46  14  26   14  18   9   29  15   0    0.000    0.000       0
+  0   9764 01:35:42.07   0.5920A   3.0399   0.6475  -0.6297  0.051  0.00   0.000      0.  0.759E+00  0.568E-01  0.493E-03  0.143E-04   46  14  33   14  18   9   28  15   4    0.000    0.000       0
+  0   9774 01:35:48.03   0.5960A   3.0207  -0.6288  -0.6433  0.050  0.00   0.000      0.  0.760E+00  0.570E-01  0.497E-03  0.148E-04   46  12  38   39   7   1   28  15   8    0.000    0.000       0
+  0   9784 01:35:54.04   0.6070A   2.9635  -0.5999  -0.6106  0.049  0.00   0.000      0.  0.760E+00  0.573E-01  0.505E-03  0.148E-04   46  12   6   39   6   6   28  14  12    0.000    0.000       0
+  0   9794 01:36:00.18   0.6220A   2.8953  -0.5890  -0.6335  0.049  0.00   0.000      0.  0.761E+00  0.577E-01  0.517E-03  0.143E-04   46  17  39   21  18   6   35  18  20    0.000    0.000       0
+  0   9804 01:36:06.38   0.6190A   2.9077  -0.5710  -0.6176  0.049  0.00   0.000      0.  0.762E+00  0.581E-01  0.519E-03  0.143E-04   45  17   6   21  18   8   34  18  25    0.000    0.000       0
+  0   9814 01:36:12.53   0.6210A   2.8995  -0.6298  -0.6180  0.050  0.00   0.000      0.  0.762E+00  0.586E-01  0.525E-03  0.143E-04   46  17  14   19  10   9   17  17   9    0.000    0.000       0
+  0   9823 01:36:18.10   0.6200A   2.9029  -0.6615  -0.6313  0.050  0.00   0.000      0.  0.763E+00  0.591E-01  0.526E-03  0.146E-04   45  12  37   19   9   9   33  15  31    0.000    0.000       0
+  0   9833 01:36:24.34   0.6280A   2.8656  -0.6358  -0.6432  0.051  0.00   0.000      0.  0.763E+00  0.598E-01  0.539E-03  0.168E-04   44  24  12   19   9   9   33  15  36    0.000    0.000       0
+  0   9843 01:36:30.59   0.6210A   2.8971  -0.6341   0.7274  0.051  0.00   0.000      0.  0.764E+00  0.606E-01  0.538E-03  0.166E-04   46  12  15   43  12  36   20  27   9    0.000    0.000       0
+  0   9852 01:36:36.12   0.6100A   2.9487  -0.6924   0.6828  0.051  0.00   0.000      0.  0.764E+00  0.612E-01  0.530E-03  0.150E-04   46  12  21   19  20   9   20  27   9    0.000    0.000       0
+  0   9862 01:36:42.24   0.6080A   2.9611   0.6403   0.7672  0.052  0.00   0.000      0.  0.765E+00  0.618E-01  0.538E-03  0.151E-04   43  24  34   24  29  28   20  10   9    0.000    0.000       0
+  0   9872 01:36:48.30   0.6050A   2.9738   0.6474   0.7293  0.052  0.00   0.000      0.  0.765E+00  0.622E-01  0.541E-03  0.153E-04   43  24   1   24  30  32   20  11   9    0.000    0.000       0
+  0   9882 01:36:54.32   0.6020A   2.9881  -0.7298   0.6719  0.051  0.00   0.000      0.  0.766E+00  0.626E-01  0.544E-03  0.147E-04   43  24   9   22  10   8   21  11   9    0.000    0.000       0
+  0   9892 01:37:00.30   0.5940A   3.0290  -0.9350  -0.6093  0.051  0.00   0.000      0.  0.766E+00  0.629E-01  0.540E-03  0.137E-04   43  24  17   21  10   8   14  22   9    0.000    0.000       0
+  0   9902 01:37:06.26   0.5980A   3.0084   0.8127  -0.5761  0.051  0.00   0.000      0.  0.767E+00  0.631E-01  0.546E-03  0.144E-04   43  24  24   20  17   9   14  22   9    0.000    0.000       0
+  0   9912 01:37:12.26   0.6010A   2.9966  -0.8235  -0.7902  0.051  0.00   0.000      0.  0.767E+00  0.634E-01  0.555E-03  0.156E-04   46  22   1   20   9   9   18  14   9    0.000    0.000       0
+  0   9922 01:37:18.29   0.6030A   2.9842  -0.6702  -0.7468  0.051  0.00   0.000      0.  0.768E+00  0.636E-01  0.560E-03  0.160E-04   46  23   8   22   8  16   18  13   9    0.000    0.000       0
+  0   9932 01:37:24.33   0.6030A   2.9848  -0.6860  -0.7028  0.050  0.00   0.000      0.  0.768E+00  0.639E-01  0.565E-03  0.165E-04   42  25   4   40  17   9   18  12   9    0.000    0.000       0
+  0   9942 01:37:30.31   0.5940A   3.0300   0.6675  -0.6030  0.049  0.00   0.000      0.  0.768E+00  0.642E-01  0.565E-03  0.163E-04   42  25  11   21  29   8   17  13   9    0.000    0.000       0
+  0   9952 01:37:36.26   0.6040A   2.9813  -0.6369  -0.6518  0.049  0.00   0.000      0.  0.768E+00  0.644E-01  0.577E-03  0.160E-04   42  25  19   24  17  21   18  19   9    0.000    0.000       0
+  0   9962 01:37:42.27   0.6000A   2.9985  -0.7069  -0.7173  0.050  0.00   0.000      0.  0.769E+00  0.646E-01  0.579E-03  0.171E-04   42  22  16   11  27   9   17  20   9    0.000    0.000       0
+  0   9972 01:37:48.25   0.6010A   2.9959  -0.7724  -0.7222  0.050  0.00   0.000      0.  0.769E+00  0.648E-01  0.587E-03  0.182E-04   42  22  23   11  26   9   17  20   9    0.000    0.000       0
+  0   9982 01:37:54.27   0.5960A   3.0222  -0.7189  -0.6849  0.050  0.00   0.000      0.  0.769E+00  0.650E-01  0.589E-03  0.183E-04   44  13  31   38  14  39   16  21   9    0.000    0.000       0
+  0   9992 01:38:00.15   0.5830A   3.0861  -0.7119  -0.6451  0.050  0.00   0.000      0.  0.769E+00  0.652E-01  0.579E-03  0.180E-04   44  13  38   37  14   3   15  21   9    0.000    0.000       0
+  0  10003 01:38:06.56   0.5840A   3.0829  -0.6375  -0.6246  0.050  0.00   0.000      0.  0.769E+00  0.654E-01  0.581E-03  0.172E-04   44  13   6   38  12  10   15  21   9    0.000    0.000       0
+  0  10013 01:38:12.36   0.5780A   3.1147  -0.7118   0.6419  0.051  0.00   0.000      0.  0.769E+00  0.655E-01  0.578E-03  0.166E-04   44  13  12   20  11   8   20  27   9    0.000    0.000       0
+  0  10023 01:38:18.07   0.5690A   3.1640   0.6508  -0.6490  0.050  0.00   0.000      0.  0.769E+00  0.655E-01  0.578E-03  0.175E-04   44  13  19   20  27   9   40  15  22    0.000    0.000       0
+  0  10034 01:38:24.30   0.5640A   3.1907   0.7042  -0.7136  0.050  0.00   0.000      0.  0.769E+00  0.656E-01  0.575E-03  0.174E-04   44  13  26   20  28   9   17  22   9    0.000    0.000       0
+  0  10045 01:38:30.50   0.5590A   3.2174   0.7770  -0.7831  0.050  0.00   0.000      0.  0.769E+00  0.657E-01  0.570E-03  0.172E-04   44  13  33   19  30   9   16  22   9    0.000    0.000       0
+  0  10055 01:38:36.11   0.5570A   3.2288   0.8781  -0.8153  0.051  0.00   0.000      0.  0.769E+00  0.658E-01  0.576E-03  0.197E-04   44  13   0   19  31   9   18  25   9    0.000    0.000       0
+  0  10066 01:38:42.20   0.5500A   3.2744   0.9129  -0.8438  0.052  0.00   0.000      0.  0.769E+00  0.659E-01  0.579E-03  0.205E-04   44  13   7   18  31   9   17  25   9    0.000    0.000       0
+  0  10077 01:38:48.41   0.5730A   3.1428   0.8535  -0.7015  0.054  0.00   0.000      0.  0.769E+00  0.660E-01  0.609E-03  0.212E-04   44  13  15   17  31   9   16  25   9    0.000    0.000       0
+  0  10087 01:38:54.19   0.5900A   3.0497   0.8949  -0.8617  0.055  0.00   0.000      0.  0.768E+00  0.661E-01  0.637E-03  0.226E-04   44  13  22   20  25   9   20  18   8    0.000    0.000       0
+  0  10097 01:39:00.15   0.5970A   3.0134   0.9898  -1.0372  0.055  0.00   0.000      0.  0.768E+00  0.659E-01  0.652E-03  0.228E-04   45  27  12   19  25   9   16  20   9    0.000    0.000       0
+  0  10108 01:39:06.56   0.5730A   3.1406   0.9061  -1.0574  0.054  0.00   0.000      0.  0.767E+00  0.655E-01  0.632E-03  0.237E-04   46  27  20   19  26   9   15  21   9    0.000    0.000       0
+  0  10118 01:39:12.25   0.5650A   3.1846   0.8242  -0.9462  0.053  0.00   0.000      0.  0.767E+00  0.652E-01  0.626E-03  0.252E-04   46  27  27   17  26   9   14  21   9    0.000    0.000       0
+  0  10129 01:39:18.51   0.5710A   3.1549   0.7538  -0.8313  0.053  0.00   0.000      0.  0.766E+00  0.650E-01  0.633E-03  0.259E-04   46  27  35   21  17   8   13  22   9    0.000    0.000       0
+  0  10139 01:39:24.26   0.5790A   3.1074   0.7538  -0.7711  0.052  0.00   0.000      0.  0.766E+00  0.649E-01  0.638E-03  0.247E-04   46  27   3   21  18   8   12  22   9    0.000    0.000       0
+  0  10149 01:39:30.04   0.5790A   3.1069   0.7501  -0.7271  0.052  0.00   0.000      0.  0.765E+00  0.648E-01  0.639E-03  0.239E-04   46  27  10   18  30   9   12  22   9    0.000    0.000       0
+  0  10160 01:39:36.48   0.5870A   3.0651  -0.8021  -0.9204  0.052  0.00   0.000      0.  0.765E+00  0.646E-01  0.648E-03  0.228E-04   46  27  18   19  21   9   16  26   9    0.000    0.000       0
+  0  10170 01:39:42.46   0.6040A   2.9823  -0.8363  -1.0708  0.054  0.00   0.000      0.  0.764E+00  0.643E-01  0.672E-03  0.241E-04   46  27  25   19  20   9   16  25   9    0.000    0.000       0
+  0  10180 01:39:48.53   0.6040A   2.9795   0.8515  -1.0782  0.054  0.00   0.000      0.  0.764E+00  0.639E-01  0.678E-03  0.252E-04   44  19  10   22  23   6   15  25   9    0.000    0.000       0
+  0  10190 01:39:54.54   0.5980A   3.0080   0.8956  -0.9344  0.055  0.00   0.000      0.  0.763E+00  0.634E-01  0.667E-03  0.230E-04   44  19  17   20  26   9   15  26   9    0.000    0.000       0
+  0  10200 01:40:00.52   0.5960A   3.0216   0.8848  -0.9048  0.054  0.00   0.000      0.  0.762E+00  0.628E-01  0.658E-03  0.215E-04   46  19  22   19  27   9   16  24   9    0.000    0.000       0
+  0  10210 01:40:06.45   0.5910A   3.0470   0.8685  -0.8623  0.053  0.00   0.000      0.  0.762E+00  0.621E-01  0.647E-03  0.202E-04   46  19  29   19  27   9   15  25   9    0.000    0.000       0
+  0  10220 01:40:12.37   0.5920A   3.0398   0.7716  -0.8212  0.052  0.00   0.000      0.  0.761E+00  0.615E-01  0.647E-03  0.189E-04   46  19  36   18  28   9   13  27   9    0.000    0.000       0
+  0  10230 01:40:18.34   0.6000A   2.9976  -0.6747  -0.8060  0.050  0.00   0.000      0.  0.761E+00  0.610E-01  0.652E-03  0.193E-04   46  19   3   24   7  14   14  26   9    0.000    0.000       0
+  0  10240 01:40:24.39   0.6090A   2.9542  -0.7362  -0.7376  0.049  0.00   0.000      0.  0.760E+00  0.606E-01  0.661E-03  0.212E-04   45  19  10   21  19   2   11  27   9    0.000    0.000       0
+  0  10250 01:40:30.53   0.6160A   2.9235  -0.8707  -0.7379  0.048  0.00   0.000      0.  0.760E+00  0.603E-01  0.666E-03  0.209E-04   45  19  17   25  16  27   10  27   9    0.000    0.000       0
+  0  10259 01:40:36.05   0.6090A   2.9570  -0.8006  -0.7347  0.048  0.00   0.000      0.  0.760E+00  0.602E-01  0.660E-03  0.206E-04   45  19  24   25  15  31   34  14  37    0.000    0.000       0
+  0  10269 01:40:42.09   0.6020A   2.9883  -0.8332  -0.7146  0.048  0.00   0.000      0.  0.759E+00  0.601E-01  0.652E-03  0.198E-04   45  19  32   25  14  34   35  13   4    0.000    0.000       0
+  0  10279 01:40:48.08   0.5980A   3.0076   0.8260  -0.7124  0.049  0.00   0.000      0.  0.759E+00  0.602E-01  0.650E-03  0.192E-04   45  19  39   20  16   4   37  14  14    0.000    0.000       0
+  0  10289 01:40:54.07   0.5970A   3.0137   0.9266  -0.7073  0.051  0.00   0.000      0.  0.759E+00  0.603E-01  0.650E-03  0.191E-04   46  19   7   20  16   6   36  14  19    0.000    0.000       0
+  0  10299 01:41:00.05   0.6000A   3.0009   0.8646  -0.7228  0.052  0.00   0.000      0.  0.758E+00  0.605E-01  0.655E-03  0.207E-04   46  19  15   20  19   8   17  20   9    0.000    0.000       0
+  0  10309 01:41:06.05   0.6010A   2.9959  -0.7070  -0.8244  0.053  0.00   0.000      0.  0.758E+00  0.608E-01  0.665E-03  0.242E-04   46  19  22   26  10  12   17  21   9    0.000    0.000       0
+  0  10319 01:41:12.13   0.6160A   2.9243   0.6832  -0.9438  0.054  0.00   0.000      0.  0.757E+00  0.610E-01  0.682E-03  0.239E-04   45  19  29   23  32  23   17  20   9    0.000    0.000       0
+  0  10329 01:41:18.36   0.6300A   2.8575   0.6995  -1.0149  0.056  0.00   0.000      0.  0.756E+00  0.612E-01  0.689E-03  0.202E-04   43  17  38   22  30  25   15  20   9    0.000    0.000       0
+  0  10338 01:41:24.00   0.6240A   2.8831   0.7097  -0.9404  0.057  0.00   0.000      0.  0.756E+00  0.612E-01  0.678E-03  0.183E-04   43  16   3   22  33  30   14  19   9    0.000    0.000       0
+  0  10348 01:41:30.17   0.6090A   2.9568   0.8252  -0.8730  0.057  0.00   0.000      0.  0.755E+00  0.611E-01  0.658E-03  0.161E-04   43  19  36   21  18   8   16  20   9    0.000    0.000       0
+  0  10358 01:41:36.22   0.6000A   2.9993  -0.8668  -0.8360  0.057  0.00   0.000      0.  0.754E+00  0.609E-01  0.653E-03  0.157E-04   46  21  10   19  10   9   14  20   9    0.000    0.000       0
+  0  10368 01:41:42.24   0.6090A   2.9547   0.7576  -0.9572  0.057  0.00   0.000      0.  0.754E+00  0.608E-01  0.666E-03  0.186E-04   45  21  16   22  31   3   17  12   9    0.000    0.000       0
+  0  10378 01:41:48.37   0.6200A   2.9033   0.7117  -0.9825  0.057  0.00   0.000      0.  0.753E+00  0.608E-01  0.680E-03  0.224E-04   44  22  18   24  32   7   17  14   9    0.000    0.000       0
+  0  10388 01:41:54.57   0.6140A   2.9307  -0.8323  -0.9891  0.056  0.00   0.000      0.  0.753E+00  0.608E-01  0.671E-03  0.202E-04   43  18  29   21  24   8   16  15   9    0.000    0.000       0
+  0  10397 01:42:00.06   0.6140A   2.9293   1.0977  -0.9342  0.057  0.00   0.000      0.  0.752E+00  0.608E-01  0.671E-03  0.168E-04   43  18  35   19  31   9   15  15   9    0.000    0.000       0
+  0  10407 01:42:06.26   0.6260A   2.8755   0.9527  -1.0563  0.057  0.00   0.000      0.  0.752E+00  0.604E-01  0.687E-03  0.164E-04   43  17   2   19  30   9   18  28   9    0.000    0.000       0
+  0  10417 01:42:12.56   0.6300A   2.8577   0.9983  -1.2337  0.058  0.00   0.000      0.  0.751E+00  0.600E-01  0.697E-03  0.199E-04   43  17  10   20  30   9   17  28   9    0.000    0.000       0
+  0  10426 01:42:18.24   0.6320A   2.8479   1.0867  -1.1819  0.059  0.00   0.000      0.  0.750E+00  0.597E-01  0.697E-03  0.223E-04   44  18  15   20  30   9   16  28   9    0.000    0.000       0
+  0  10436 01:42:24.64   0.6460A   2.7881  -0.8561  -0.9573  0.059  0.00   0.000      0.  0.750E+00  0.593E-01  0.700E-03  0.206E-04   45  18  20   20  14   9   15  28   9    0.000    0.000       0
+  0  10445 01:42:30.42   0.6460A   2.7861   0.9055  -1.0986  0.060  0.00   0.000      0.  0.749E+00  0.588E-01  0.695E-03  0.198E-04   43  14  28   19  30   9   17  18   9    0.000    0.000       0
+  0  10454 01:42:36.20   0.6480A   2.7778   0.8232  -1.1391  0.060  0.00   0.000      0.  0.749E+00  0.583E-01  0.698E-03  0.212E-04   43  14  33   22  35  26   16  19   9    0.000    0.000       0
+  0  10464 01:42:42.64   0.6450A   2.7927   0.8310  -1.1769  0.059  0.00   0.000      0.  0.748E+00  0.578E-01  0.682E-03  0.229E-04   44  20  26   26  37  32   15  21   9    0.000    0.000       0
+  0  10473 01:42:48.44   0.6480A   2.7793   0.8245  -1.1283  0.059  0.00   0.000      0.  0.748E+00  0.575E-01  0.677E-03  0.247E-04   46  17  38   27  38  36   14  21   9    0.000    0.000       0
+  0  10482 01:42:54.29   0.6510A   2.7631  -0.8554  -1.0539  0.059  0.00   0.000      0.  0.747E+00  0.572E-01  0.674E-03  0.241E-04   45  21  37   19  10   9   12  21   9    0.000    0.000       0
+  0  10491 01:43:00.15   0.6480A   2.7785   0.7874  -0.9649  0.059  0.00   0.000      0.  0.747E+00  0.570E-01  0.667E-03  0.241E-04   44  15  19   22  32  35   11  22   9    0.000    0.000       0
+  0  10501 01:43:06.64   0.6470A   2.7825  -0.7005  -0.8734  0.058  0.00   0.000      0.  0.746E+00  0.568E-01  0.667E-03  0.243E-04   45  21  14   21   9  16    8  22   9    0.000    0.000       0
+  0  10510 01:43:12.38   0.6310A   2.8510  -0.7998   0.8815  0.059  0.00   0.000      0.  0.746E+00  0.567E-01  0.646E-03  0.198E-04   46  20  21   20  12   9   19  10   8    0.000    0.000       0
+  0  10519 01:43:18.04   0.6260A   2.8771  -0.8033   1.1723  0.060  0.00   0.000      0.  0.746E+00  0.565E-01  0.640E-03  0.183E-04   46  20  27   19  12   9   19  10   8    0.000    0.000       0
+  0  10529 01:43:24.35   0.6310A   2.8539   0.8321   0.7826  0.061  0.00   0.000      0.  0.745E+00  0.563E-01  0.647E-03  0.207E-04   46  21  36   21  13   8   20  11   8    0.000    0.000       0
+  0  10539 01:43:30.59   0.6240A   2.8858   0.7918   0.7476  0.061  0.00   0.000      0.  0.745E+00  0.561E-01  0.637E-03  0.202E-04   46  21   4   21  14   8   19  13   8    0.000    0.000       0
+  0  10548 01:43:36.17   0.6200A   2.9041   0.8063  -0.7106  0.061  0.00   0.000      0.  0.744E+00  0.559E-01  0.633E-03  0.189E-04   46  21  10   20  13   8    6  17   8    0.000    0.000       0
+  0  10558 01:43:42.38   0.6220A   2.8948   0.7309  -0.6801  0.060  0.00   0.000      0.  0.744E+00  0.557E-01  0.632E-03  0.185E-04   46  21  18   20  18   9    4  17   8    0.000    0.000       0
+  0  10568 01:43:48.60   0.6210A   2.8991   0.6975  -0.6260  0.059  0.00   0.000      0.  0.744E+00  0.556E-01  0.636E-03  0.205E-04   46  21  25   20  19   9    3  17   8    0.000    0.000       0
+  0  10577 01:43:54.10   0.6110A   2.9479   0.6997  -0.6901  0.059  0.00   0.000      0.  0.743E+00  0.555E-01  0.624E-03  0.212E-04   46  25  30   19  19   9    3  18   7    0.000    0.000       0
+  0  10587 01:44:00.17   0.6000A   3.0018  -0.7079  -0.7096  0.060  0.00   0.000      0.  0.743E+00  0.555E-01  0.608E-03  0.198E-04   46  24  37   20  10   9   24  10  18    0.000    0.000       0
+  0  10597 01:44:06.18   0.6040A   2.9815  -0.8830  -0.7105  0.061  0.00   0.000      0.  0.743E+00  0.554E-01  0.609E-03  0.193E-04   46  24   4   20  17   8   18  12   9    0.000    0.000       0
+  0  10607 01:44:12.31   0.6270A   2.8709  -1.0689  -0.8761  0.061  0.00   0.000      0.  0.742E+00  0.552E-01  0.636E-03  0.201E-04   45  24  10   20  10   9   18  11   9    0.000    0.000       0
+  0  10616 01:44:18.03   0.6410A   2.8060  -0.9779  -0.9736  0.061  0.00   0.000      0.  0.742E+00  0.550E-01  0.647E-03  0.192E-04   44  22  17   20  10   9   15  11   9    0.000    0.000       0
+  0  10626 01:44:24.41   0.6420A   2.8055  -0.8001  -0.9629  0.062  0.00   0.000      0.  0.742E+00  0.547E-01  0.643E-03  0.200E-04   44  22  24   20  10   9   14  11   9    0.000    0.000       0
+  0  10635 01:44:30.25   0.6550A   2.7467  -0.6895  -0.9208  0.063  0.00   0.000      0.  0.741E+00  0.545E-01  0.655E-03  0.220E-04   45  17  39   20  10   9   16  19   9    0.000    0.000       0
+  0  10644 01:44:36.08   0.6450A   2.7903   0.6877  -0.8756  0.063  0.00   0.000      0.  0.741E+00  0.542E-01  0.640E-03  0.215E-04   44  24  39   17  30   9   15  18   9    0.000    0.000       0
+  0  10654 01:44:42.56   0.6530A   2.7566  -0.7295  -0.8959  0.063  0.00   0.000      0.  0.741E+00  0.538E-01  0.633E-03  0.197E-04   46  18  15   45  24  35   17  25   9    0.000    0.000       0
+  0  10663 01:44:48.41   0.6470A   2.7838  -0.6989  -0.7960  0.062  0.00   0.000      0.  0.741E+00  0.534E-01  0.609E-03  0.182E-04   46  17  21   46  22   1   17  17   9    0.000    0.000       0
+  0  10672 01:44:54.19   0.6370A   2.8241  -0.6861   0.7821  0.062  0.00   0.000      0.  0.740E+00  0.531E-01  0.593E-03  0.197E-04   44  22  19   46  21   7   19  27   8    0.000    0.000       0
+  0  10682 01:45:00.63   0.6540A   2.7503  -0.7156  -0.7498  0.061  0.00   0.000      0.  0.740E+00  0.530E-01  0.606E-03  0.223E-04   44  22  26   20  10   9   15  18   9    0.000    0.000       0
+  0  10691 01:45:06.53   0.6530A   2.7551  -0.7779   0.7891  0.061  0.00   0.000      0.  0.740E+00  0.531E-01  0.603E-03  0.224E-04   44  17   2   19  10   9   20  26   9    0.000    0.000       0
+  0  10700 01:45:12.30   0.6330A   2.8427  -0.6681  -0.7186  0.061  0.00   0.000      0.  0.740E+00  0.533E-01  0.592E-03  0.223E-04   44  17  10   19  10   9   13  18   9    0.000    0.000       0
+  0  10710 01:45:18.59   0.6270A   2.8727  -0.6797  -0.6777  0.062  0.00   0.000      0.  0.740E+00  0.535E-01  0.583E-03  0.202E-04   44  17  17   20  20   8   12  18   9    0.000    0.000       0
+  0  10719 01:45:24.33   0.6510A   2.7647  -0.7356  -0.6218  0.062  0.00   0.000      0.  0.740E+00  0.537E-01  0.595E-03  0.178E-04   44  17  23   20  21   9   11  18   9    0.000    0.000       0
+  0  10728 01:45:30.25   0.6560A   2.7420  -0.6367  -0.6078  0.062  0.00   0.000      0.  0.740E+00  0.536E-01  0.591E-03  0.161E-04   43  17  29   46  17   6   14  11   9    0.000    0.000       0
+  0  10737 01:45:36.22   0.6710A   2.6827  -0.6556  -0.5745  0.062  0.00   0.000      0.  0.741E+00  0.535E-01  0.599E-03  0.160E-04   44  17   2   46  16  12   32  33  21    0.000    0.000       0
+  0  10746 01:45:42.20   0.6600A   2.7266  -0.6456  -0.6554  0.061  0.00   0.000      0.  0.741E+00  0.533E-01  0.588E-03  0.160E-04   44  17   8   46  16  19   29  20  23    0.000    0.000       0
+  0  10755 01:45:48.18   0.6720A   2.6798  -0.6073  -0.5815  0.059  0.00   0.000      0.  0.741E+00  0.530E-01  0.592E-03  0.160E-04   44  17  14   46  15  25   31  34  29    0.000    0.000       0
+  0  10764 01:45:54.23   0.6690A   2.6911  -0.5629  -0.6160  0.058  0.00   0.000      0.  0.741E+00  0.527E-01  0.586E-03  0.150E-04   42  16  18   41  38  25   30  34  33    0.000    0.000       0
+  0  10773 01:46:00.31   0.6850A   2.6269  -0.5532  -0.6010  0.056  0.00   0.000      0.  0.742E+00  0.524E-01  0.597E-03  0.172E-04   44  16  28   41  38  29   30  34  37    0.000    0.000       0
+  0  10782 01:46:06.51   0.6840A   2.6330   0.6416  -0.6097  0.054  0.00   0.000      0.  0.742E+00  0.523E-01  0.599E-03  0.188E-04   46  18  29   22  27   4   29  34   0    0.000    0.000       0
+  0  10791 01:46:12.63   0.6770A   2.6572   0.6269  -0.5800  0.053  0.00   0.000      0.  0.743E+00  0.522E-01  0.607E-03  0.221E-04   46  18  35   22  28   7   28  34   4    0.000    0.000       0
+  0  10799 01:46:18.04   0.6730A   2.6757   0.6791   0.5915  0.052  0.00   0.000      0.  0.744E+00  0.522E-01  0.611E-03  0.226E-04   46  21  39   22  14   2   20  17   9    0.000    0.000       0
+  0  10808 01:46:24.01   0.6610A   2.7230   0.7552  -0.5974  0.052  0.00   0.000      0.  0.744E+00  0.523E-01  0.607E-03  0.196E-04   46  21   6   20  25   8   26  22  15    0.000    0.000       0
+  0  10818 01:46:30.52   0.6540A   2.7530   0.7023  -0.6348  0.052  0.00   0.000      0.  0.745E+00  0.523E-01  0.611E-03  0.198E-04   46  21  12   21  14   6   13   4  35    0.000    0.000       0
+  0  10827 01:46:36.38   0.6500A   2.7691   0.8602  -0.6361  0.052  0.00   0.000      0.  0.745E+00  0.522E-01  0.611E-03  0.187E-04   46  21  19   21  15   8   13   4  38    0.000    0.000       0
+  0  10836 01:46:42.24   0.6500A   2.7675   0.7479  -0.6776  0.053  0.00   0.000      0.  0.746E+00  0.522E-01  0.615E-03  0.192E-04   46  21  26   21  17   8   18  21   9    0.000    0.000       0
+  0  10845 01:46:48.11   0.6550A   2.7461   0.6109  -0.8048  0.054  0.00   0.000      0.  0.746E+00  0.522E-01  0.623E-03  0.186E-04   46  21  32   20  16   8   18  20   9    0.000    0.000       0
+  0  10854 01:46:54.05   0.6630A   2.7136  -0.6599  -0.8655  0.055  0.00   0.000      0.  0.747E+00  0.522E-01  0.626E-03  0.159E-04   46  21  39   20  20   9   17  20   9    0.000    0.000       0
+  0  10863 01:47:00.06   0.6690A   2.6894  -0.5746  -0.7993  0.055  0.00   0.000      0.  0.747E+00  0.520E-01  0.631E-03  0.165E-04   46  21   7   42  35  37   16  20   9    0.000    0.000       0
+  0  10872 01:47:06.06   0.6680A   2.6938  -0.5842  -0.7356  0.055  0.00   0.000      0.  0.748E+00  0.517E-01  0.628E-03  0.164E-04   46  21  14   42  34   1   15  19   9    0.000    0.000       0
+  0  10881 01:47:12.09   0.6730A   2.6761  -0.5960  -0.6454  0.055  0.00   0.000      0.  0.748E+00  0.514E-01  0.631E-03  0.172E-04   46  21  21   42  34   6   15  19   9    0.000    0.000       0
+  0  10890 01:47:18.12   0.6660A   2.7016   0.6376  -0.6192  0.055  0.00   0.000      0.  0.748E+00  0.510E-01  0.622E-03  0.169E-04   46  21  28   21  19   8   16  26   9    0.000    0.000       0
+  0  10899 01:47:24.08   0.6560A   2.7450   0.7127  -0.6533  0.055  0.00   0.000      0.  0.749E+00  0.505E-01  0.610E-03  0.151E-04   45  21  35   21  20   8   15  26   9    0.000    0.000       0
+  0  10909 01:47:30.60   0.6550A   2.7494  -0.6092  -0.6636  0.055  0.00   0.000      0.  0.749E+00  0.500E-01  0.607E-03  0.144E-04   45  21   2   41  31  19   17  25   9    0.000    0.000       0
+  0  10918 01:47:36.51   0.6620A   2.7170  -0.6239  -0.6292  0.054  0.00   0.000      0.  0.749E+00  0.497E-01  0.612E-03  0.160E-04   46  21   9   41  30  23   16  24   9    0.000    0.000       0
+  0  10927 01:47:42.55   0.6730A   2.6737  -0.5958  -0.6103  0.054  0.00   0.000      0.  0.749E+00  0.496E-01  0.624E-03  0.197E-04   46  21  17   41  28  27   14  27   9    0.000    0.000       0
+  0  10936 01:47:48.61   0.6730A   2.6732  -0.6321   0.8096  0.053  0.00   0.000      0.  0.750E+00  0.496E-01  0.633E-03  0.244E-04   46  21  24   41  30  34   20  28   9    0.000    0.000       0
+  0  10944 01:47:54.03   0.6830A   2.6369  -0.5995   0.7237  0.051  0.00   0.000      0.  0.750E+00  0.498E-01  0.647E-03  0.270E-04   46  21  29   41  29  38   20  28   9    0.000    0.000       0
+  0  10953 01:48:00.18   0.6820A   2.6406   0.6814   0.6986  0.051  0.00   0.000      0.  0.750E+00  0.500E-01  0.651E-03  0.280E-04   46   5   1   20  28   8   21  17   9    0.000    0.000       0
+  0  10962 01:48:06.22   0.6680A   2.6942  -0.8308  -0.7747  0.051  0.00   0.000      0.  0.750E+00  0.501E-01  0.650E-03  0.281E-04   46   5   7   20  19   9   17  23   9    0.000    0.000       0
+  0  10971 01:48:12.24   0.6700A   2.6883  -0.8858  -1.0922  0.052  0.00   0.000      0.  0.750E+00  0.501E-01  0.658E-03  0.275E-04   45  21  14   19  19   9   16  22   9    0.000    0.000       0
+  0  10980 01:48:18.26   0.6680A   2.6953   0.8475  -1.1753  0.054  0.00   0.000      0.  0.750E+00  0.498E-01  0.643E-03  0.236E-04   45  21  21   20  19   8   15  22   9    0.000    0.000       0
+  0  10989 01:48:24.27   0.6690A   2.6916   0.7102  -1.0867  0.055  0.00   0.000      0.  0.750E+00  0.496E-01  0.633E-03  0.210E-04   45  21  28   18  30   9   13  22   9    0.000    0.000       0
+  0  10998 01:48:30.25   0.6650A   2.7060  -0.6239  -0.9899  0.056  0.00   0.000      0.  0.751E+00  0.493E-01  0.628E-03  0.197E-04   44  24   8   20  26   8   12  23   9    0.000    0.000       0
+  0  11007 01:48:36.23   0.6650A   2.7054  -0.6157  -0.9023  0.056  0.00   0.000      0.  0.751E+00  0.491E-01  0.625E-03  0.188E-04   46  24  39   20  25   8   10  23   9    0.000    0.000       0
+  0  11016 01:48:42.21   0.6630A   2.7163   0.5498  -0.8149  0.056  0.00   0.000      0.  0.751E+00  0.489E-01  0.614E-03  0.166E-04   43  23   7   18  30   9    8  23   9    0.000    0.000       0
+  0  11025 01:48:48.18   0.6630A   2.7135  -0.5671  -0.7404  0.056  0.00   0.000      0.  0.751E+00  0.487E-01  0.608E-03  0.147E-04   43  23  14   22  22  35    7  23   9    0.000    0.000       0
+  0  11034 01:48:54.13   0.6590A   2.7312  -0.5489  -0.6810  0.056  0.00   0.000      0.  0.752E+00  0.484E-01  0.599E-03  0.130E-04   46  25  19   39  20  24    5  23   9    0.000    0.000       0
+  0  11043 01:49:00.07   0.6620A   2.7179   0.5617  -0.6548  0.055  0.00   0.000      0.  0.752E+00  0.480E-01  0.596E-03  0.136E-04   46  25  26    9  19   6    5  28   9    0.000    0.000       0
+  0  11052 01:49:06.01   0.6580A   2.7373  -0.6008  -0.6624  0.054  0.00   0.000      0.  0.752E+00  0.477E-01  0.590E-03  0.160E-04   43  18  19   15  26   9   18  16   9    0.000    0.000       0
+  0  11062 01:49:12.61   0.6560A   2.7440  -0.5882  -0.6366  0.053  0.00   0.000      0.  0.753E+00  0.473E-01  0.583E-03  0.163E-04   46  26   1   15  25   9   17  16   9    0.000    0.000       0
+  0  11071 01:49:18.41   0.6340A   2.8376   0.6080  -0.6173  0.053  0.00   0.000      0.  0.753E+00  0.470E-01  0.559E-03  0.140E-04   46  26   7   23  13   7   20   9   4    0.000    0.000       0
+  0  11080 01:49:24.15   0.6400A   2.8125   0.6034  -0.5084  0.052  0.00   0.000      0.  0.754E+00  0.467E-01  0.561E-03  0.134E-04   46  26  13   22  13   9   19   9   6    0.000    0.000       0
+  0  11089 01:49:30.01   0.6520A   2.7610   0.6866   0.5036  0.052  0.00   0.000      0.  0.754E+00  0.464E-01  0.567E-03  0.140E-04   46  24  20   22  13  11   20  25   9    0.000    0.000       0
+  0  11099 01:49:36.54   0.6530A   2.7563   0.6214   0.5902  0.051  0.00   0.000      0.  0.755E+00  0.461E-01  0.567E-03  0.177E-04   46  24  27   23  14  16   20  25   9    0.000    0.000       0
+  0  11108 01:49:42.45   0.6590A   2.7333  -0.6392   0.6035  0.051  0.00   0.000      0.  0.756E+00  0.459E-01  0.571E-03  0.187E-04   46  24  33   22  11   9   20  12   9    0.000    0.000       0
+  0  11117 01:49:48.39   0.6600A   2.7293  -0.6391   0.5631  0.051  0.00   0.000      0.  0.757E+00  0.457E-01  0.565E-03  0.181E-04   46  23   5   22  10  12   20  27   9    0.000    0.000       0
+  0  11126 01:49:54.29   0.6500A   2.7712  -0.5914  -0.5551  0.052  0.00   0.000      0.  0.757E+00  0.456E-01  0.555E-03  0.179E-04   46  22  12   22  10  14   40  24   9    0.000    0.000       0
+  0  11135 01:50:00.08   0.6400A   2.8139  -0.6461  -0.6423  0.052  0.00   0.000      0.  0.758E+00  0.456E-01  0.551E-03  0.176E-04   46  24  16   21  13   8   39  24  14    0.000    0.000       0
+  0  11145 01:50:06.42   0.6310A   2.8512   0.5677  -0.6774  0.053  0.00   0.000      0.  0.759E+00  0.455E-01  0.539E-03  0.161E-04   45  22  20   20  27   9   17  22   9    0.000    0.000       0
+  0  11154 01:50:12.09   0.6230A   2.8889   0.6376  -0.7566  0.054  0.00   0.000      0.  0.759E+00  0.455E-01  0.523E-03  0.140E-04   43  16  18   19  30   9   17  21   9    0.000    0.000       0
+  0  11164 01:50:18.32   0.6190A   2.9064  -0.6142  -0.7803  0.054  0.00   0.000      0.  0.760E+00  0.454E-01  0.514E-03  0.145E-04   44  23  35   22   6  36   16  24   9    0.000    0.000       0
+  0  11174 01:50:24.49   0.6180A   2.9144  -0.6653  -0.8128  0.054  0.00   0.000      0.  0.761E+00  0.454E-01  0.512E-03  0.157E-04   45  23   1   20  15   9   16  26   9    0.000    0.000       0
+  0  11183 01:50:30.05   0.6220A   2.8955  -0.6332  -0.7794  0.055  0.00   0.000      0.  0.761E+00  0.453E-01  0.515E-03  0.158E-04   45  23   8   20  15   9   16  27   9    0.000    0.000       0
+  0  11193 01:50:36.25   0.6110A   2.9436  -0.5732  -0.7247  0.054  0.00   0.000      0.  0.762E+00  0.452E-01  0.502E-03  0.141E-04   42  24  14   40  23   2   17  28   9    0.000    0.000       0
+  0  11203 01:50:42.43   0.6230A   2.8908   0.6451  -0.7030  0.053  0.00   0.000      0.  0.763E+00  0.451E-01  0.508E-03  0.140E-04   42  24  21   22  15   8   17  26   9    0.000    0.000       0
+  0  11212 01:50:48.06   0.6260A   2.8771   0.7165  -0.6262  0.052  0.00   0.000      0.  0.764E+00  0.450E-01  0.511E-03  0.143E-04   45  22  24   22  16   8   16  25   9    0.000    0.000       0
+  0  11222 01:50:54.25   0.6200A   2.9056   0.7283  -0.5780  0.051  0.00   0.000      0.  0.764E+00  0.450E-01  0.510E-03  0.156E-04   46  22  32   21  16   8   11  19   8    0.000    0.000       0
+  0  11232 01:51:00.38   0.6110A   2.9436   0.7329  -0.5963  0.051  0.00   0.000      0.  0.765E+00  0.452E-01  0.508E-03  0.158E-04   46  21   0   20  16   8   10  23   8    0.000    0.000       0
+  0  11242 01:51:06.48   0.6090A   2.9549   0.6367  -0.6521  0.051  0.00   0.000      0.  0.766E+00  0.455E-01  0.509E-03  0.157E-04   46  21   7   19  16   9   18  14   9    0.000    0.000       0
+  0  11251 01:51:11***   0.6160A   2.9242   0.7048  -0.6873  0.051  0.00   0.000      0.  0.767E+00  0.458E-01  0.516E-03  0.154E-04   46  21  14   20  16   9   18  12   9    0.000    0.000       0
+  0  11261 01:51:18.21   0.6270A   2.8695   0.6194  -0.8926  0.051  0.00   0.000      0.  0.767E+00  0.460E-01  0.531E-03  0.157E-04   45  21  21   21  29   6   18  11   9    0.000    0.000       0
+  0  11271 01:51:24.52   0.6320A   2.8486   0.7259  -0.7069  0.051  0.00   0.000      0.  0.768E+00  0.462E-01  0.542E-03  0.161E-04   44  18  19   21  29   8   17  21   9    0.000    0.000       0
+  0  11280 01:51:30.17   0.6240A   2.8839  -0.7078  -0.7718  0.052  0.00   0.000      0.  0.769E+00  0.464E-01  0.539E-03  0.151E-04   44  18  26   20  18   9   16  21   9    0.000    0.000       0
+  0  11290 01:51:36.41   0.6220A   2.8929  -0.8227  -0.7821  0.052  0.00   0.000      0.  0.769E+00  0.465E-01  0.540E-03  0.144E-04   44  19  35   20  17   9   17  18   9    0.000    0.000       0
+  0  11300 01:51:42.59   0.6160A   2.9225  -0.7666  -0.8039  0.052  0.00   0.000      0.  0.770E+00  0.465E-01  0.536E-03  0.131E-04   44  19   2   19  17   9   16  18   9    0.000    0.000       0
+  0  11309 01:51:48.15   0.6190A   2.9102  -0.7330  -0.8577  0.053  0.00   0.000      0.  0.771E+00  0.465E-01  0.542E-03  0.131E-04   44  19   8   19  16   9   18  23   9    0.000    0.000       0
+  0  11319 01:51:54.38   0.6290A   2.8637  -0.7425  -0.8710  0.052  0.00   0.000      0.  0.771E+00  0.465E-01  0.551E-03  0.137E-04   44  19  16   18  16   9   16  23   9    0.000    0.000       0
+  0  11328 01:52:00.06   0.6320A   2.8473  -0.6567  -0.8185  0.052  0.00   0.000      0.  0.772E+00  0.465E-01  0.555E-03  0.155E-04   46  16  18   20  24   6   15  20   9    0.000    0.000       0
+  0  11338 01:52:06.38   0.6330A   2.8442  -0.7626  -0.8070  0.051  0.00   0.000      0.  0.772E+00  0.467E-01  0.556E-03  0.164E-04   46  16  25   20  24   8   14  20   9    0.000    0.000       0
+  0  11347 01:52:12.08   0.6320A   2.8481   0.7578  -0.7685  0.051  0.00   0.000      0.  0.773E+00  0.468E-01  0.552E-03  0.158E-04   45  21   4   22  32   1   13  19   9    0.000    0.000       0
+  0  11357 01:52:18.35   0.6240A   2.8868   0.7344  -0.7486  0.051  0.00   0.000      0.  0.774E+00  0.470E-01  0.546E-03  0.161E-04   46  21  11   22  32   5   12  19   9    0.000    0.000       0
+  0  11366 01:52:24.00   0.6300A   2.8578   0.7146  -0.7107  0.050  0.00   0.000      0.  0.774E+00  0.472E-01  0.558E-03  0.173E-04   46  21  17   22  33   7   12  18   9    0.000    0.000       0
+  0  11376 01:52:30.27   0.6260A   2.8775   0.7306  -0.7042  0.050  0.00   0.000      0.  0.775E+00  0.473E-01  0.561E-03  0.167E-04   46  20  25   22  32  12   10  18   9    0.000    0.000       0
+  0  11386 01:52:36.47   0.6160A   2.9199   0.7263  -0.6946  0.050  0.00   0.000      0.  0.776E+00  0.474E-01  0.560E-03  0.172E-04   46  18  33   20  27   6    9  18   9    0.000    0.000       0
+  0  11396 01:52:42.60   0.6080A   2.9621   0.9313  -0.6492  0.051  0.00   0.000      0.  0.776E+00  0.475E-01  0.551E-03  0.154E-04   46  18   0   20  27   8    8  18   9    0.000    0.000       0
+  0  11405 01:52:48.04   0.5940A   3.0286   0.8049  -0.7025  0.052  0.00   0.000      0.  0.777E+00  0.475E-01  0.536E-03  0.141E-04   44  20  32   20  30   9   17  20   9    0.000    0.000       0
+  0  11416 01:52:54.56   0.5890A   3.0583   0.6520  -0.7854  0.054  0.00   0.000      0.  0.777E+00  0.475E-01  0.529E-03  0.133E-04   44  20  39   20  30   9   16  20   9    0.000    0.000       0
+  0  11426 01:53:00.55   0.6070A   2.9674   0.6419  -0.8942  0.055  0.00   0.000      0.  0.777E+00  0.475E-01  0.544E-03  0.147E-04   44  20   6   22  38  26   17  23   9    0.000    0.000       0
+  0  11435 01:53:06.07   0.6130A   2.9370  -0.6314  -0.9528  0.056  0.00   0.000      0.  0.778E+00  0.474E-01  0.546E-03  0.147E-04   46  14  25   22  10   9   16  22   9    0.000    0.000       0
+  0  11445 01:53:12.21   0.6140A   2.9300  -0.6336  -0.9190  0.057  0.00   0.000      0.  0.778E+00  0.473E-01  0.538E-03  0.138E-04   46  13  32   22  10  12   14  22   9    0.000    0.000       0
+  0  11455 01:53:18.38   0.6220A   2.8947  -0.6483  -0.8509  0.057  0.00   0.000      0.  0.778E+00  0.473E-01  0.543E-03  0.146E-04   46  14   0   22  10  15   13  22   9    0.000    0.000       0
+  0  11465 01:53:24.60   0.6220A   2.8922  -0.6336  -0.7605  0.057  0.00   0.000      0.  0.779E+00  0.475E-01  0.544E-03  0.149E-04   46  12   6   22  10  18   12  21   9    0.000    0.000       0
+  0  11474 01:53:30.23   0.6270A   2.8691  -0.6372   0.7663  0.056  0.00   0.000      0.  0.779E+00  0.477E-01  0.561E-03  0.179E-04   46  12  13   22  13  30   20  10   9    0.000    0.000       0
+  0  11484 01:53:36.51   0.6230A   2.8884  -0.6508   0.7496  0.055  0.00   0.000      0.  0.779E+00  0.481E-01  0.579E-03  0.229E-04   45  13  25   22  13  33   20  11   9    0.000    0.000       0
+  0  11493 01:53:42.08   0.6140A   2.9305  -0.6964   0.8658  0.055  0.00   0.000      0.  0.780E+00  0.485E-01  0.584E-03  0.241E-04   45  12  32   22  13  36   21  12   9    0.000    0.000       0
+  0  11503 01:53:48.15   0.6030A   2.9840  -0.7114   0.8571  0.054  0.00   0.000      0.  0.780E+00  0.489E-01  0.580E-03  0.230E-04   46  12   0   20  26   9   21  13   9    0.000    0.000       0
+  0  11513 01:53:54.15   0.5980A   3.0101  -0.7733   0.7945  0.054  0.00   0.000      0.  0.780E+00  0.493E-01  0.584E-03  0.217E-04   46  12   7   21  12   0   20  24   9    0.000    0.000       0
+  0  11523 01:54:00.13   0.5990A   3.0041  -0.8199  -0.6891  0.054  0.00   0.000      0.  0.781E+00  0.495E-01  0.587E-03  0.194E-04   46  12  15   21  11   4    8  18   7    0.000    0.000       0
+  0  11533 01:54:06.16   0.6050A   2.9769  -0.8449  -0.6917  0.054  0.00   0.000      0.  0.781E+00  0.496E-01  0.595E-03  0.170E-04   46  12  22   20  11   6    7  18   7    0.000    0.000       0
+  0  11543 01:54:12.25   0.6100A   2.9508  -0.9717  -0.6463  0.055  0.00   0.000      0.  0.782E+00  0.496E-01  0.612E-03  0.175E-04   44  12  31   20   9   7    6  18   7    0.000    0.000       0
+  0  11553 01:54:18.35   0.6100A   2.9527  -0.8729  -0.7330  0.056  0.00   0.000      0.  0.782E+00  0.496E-01  0.623E-03  0.172E-04   44  12  38   20  11   8   17  19   9    0.000    0.000       0
+  0  11563 01:54:24.39   0.6010A   2.9930  -0.8547  -0.8887  0.058  0.00   0.000      0.  0.783E+00  0.495E-01  0.622E-03  0.164E-04   44  11   5   19  10   9   17  20   9    0.000    0.000       0
+  0  11573 01:54:30.35   0.5960A   3.0196  -0.7540  -0.9526  0.060  0.00   0.000      0.  0.783E+00  0.492E-01  0.618E-03  0.163E-04   46  15   6   19  14   9   16  16   9    0.000    0.000       0
+  0  11583 01:54:36.28   0.5950A   3.0246  -0.6967  -0.9769  0.060  0.00   0.000      0.  0.783E+00  0.487E-01  0.612E-03  0.160E-04   46  15  13   38  38  28   16  17   9    0.000    0.000       0
+  0  11593 01:54:42.24   0.5940A   3.0304  -0.6996  -0.9351  0.060  0.00   0.000      0.  0.783E+00  0.481E-01  0.606E-03  0.159E-04   46  15  20   38  37  33   16  20   9    0.000    0.000       0
+  0  11603 01:54:48.18   0.5890A   3.0585   0.7044  -0.8995  0.060  0.00   0.000      0.  0.784E+00  0.476E-01  0.600E-03  0.167E-04   46  15  27   38  20  37   15  20   9    0.000    0.000       0
+  0  11613 01:54:54.08   0.5890A   3.0564   0.7540  -0.8601  0.059  0.00   0.000      0.  0.784E+00  0.472E-01  0.600E-03  0.188E-04   46  15  34   38  21   1   13  20   9    0.000    0.000       0
+  0  11623 01:55:00.05   0.6000A   2.9994   0.7669   0.8232  0.057  0.00   0.000      0.  0.784E+00  0.470E-01  0.611E-03  0.200E-04   46  15   1   38  22   5   20  16   9    0.000    0.000       0
+  0  11633 01:55:06.13   0.6060A   2.9695   0.7560   0.7646  0.056  0.00   0.000      0.  0.784E+00  0.467E-01  0.615E-03  0.191E-04   41  12  23   31  20   8   20  16   9    0.000    0.000       0
+  0  11643 01:55:12.15   0.5960A   3.0221   0.7146  -0.7341  0.056  0.00   0.000      0.  0.785E+00  0.464E-01  0.601E-03  0.164E-04   41  12  30   27  19   9   24   7  32    0.000    0.000       0
+  0  11653 01:55:18.19   0.6070A   2.9649   0.7209  -0.8308  0.055  0.00   0.000      0.  0.785E+00  0.460E-01  0.606E-03  0.151E-04   41  12  37   27  20  14   16  20   9    0.000    0.000       0
+  0  11663 01:55:24.32   0.6180A   2.9119   0.6892  -0.8439  0.055  0.00   0.000      0.  0.785E+00  0.455E-01  0.611E-03  0.151E-04   45  12   1   27  20  18   15  20   9    0.000    0.000       0
+  0  11673 01:55:30.55   0.6240A   2.8854   0.6715  -0.7931  0.055  0.00   0.000      0.  0.786E+00  0.450E-01  0.618E-03  0.156E-04   45  17  17   31  21  28   14  20   9    0.000    0.000       0
+  0  11682 01:55:36.15   0.6190A   2.9095  -0.6609  -0.8029  0.055  0.00   0.000      0.  0.786E+00  0.446E-01  0.615E-03  0.161E-04   40  12  17   39  14  25   16  16   9    0.000    0.000       0
+  0  11692 01:55:42.42   0.6330A   2.8421   0.6765  -0.7820  0.054  0.00   0.000      0.  0.786E+00  0.441E-01  0.626E-03  0.171E-04   43  18  38   30  21  36   15  19   9    0.000    0.000       0
+  0  11702 01:55:48.58   0.6020A   2.9894   0.7101  -0.7437  0.053  0.00   0.000      0.  0.787E+00  0.437E-01  0.592E-03  0.165E-04   40  13  30   30  23   1   14  20   9    0.000    0.000       0
+  0  11711 01:55:54.19   0.6360A   2.8300   0.7075  -0.7268  0.053  0.00   0.000      0.  0.787E+00  0.434E-01  0.618E-03  0.172E-04   44  14  34   30  24   5   13  20   9    0.000    0.000       0
+  0  11721 01:56:00.50   0.6310A   2.8520   0.6880  -0.6825  0.053  0.00   0.000      0.  0.787E+00  0.430E-01  0.612E-03  0.175E-04   39  13   4   29  24   9   13  21   9    0.000    0.000       0
+  0  11730 01:56:06.06   0.6090A   2.9536   0.6950  -0.7008  0.053  0.00   0.000      0.  0.788E+00  0.427E-01  0.591E-03  0.174E-04   43  14   7   29  24  12   18  22   9    0.000    0.000       0
+  0  11740 01:56:12.14   0.6110A   2.9440  -0.6506  -0.9526  0.054  0.00   0.000      0.  0.788E+00  0.423E-01  0.588E-03  0.167E-04   43  14  14   43   9  35   17  21   9    0.000    0.000       0
+  0  11750 01:56:18.23   0.6100A   2.9485  -0.6464  -1.0561  0.055  0.00   0.000      0.  0.789E+00  0.418E-01  0.582E-03  0.170E-04   43  18  36   37  12  22   16  20   9    0.000    0.000       0
+  0  11760 01:56:24.34   0.6130A   2.9355  -0.6968  -0.9956  0.056  0.00   0.000      0.  0.789E+00  0.413E-01  0.577E-03  0.176E-04   43  18   3   37  11  28   14  21   9    0.000    0.000       0
+  0  11770 01:56:30.55   0.6280A   2.8655  -0.6020  -0.8946  0.056  0.00   0.000      0.  0.790E+00  0.407E-01  0.576E-03  0.167E-04   44  16  34   36  11  33   13  21   9    0.000    0.000       0
+  0  11779 01:56:36.16   0.6220A   2.8919   0.6083  -0.8008  0.056  0.00   0.000      0.  0.791E+00  0.402E-01  0.560E-03  0.158E-04   43  16   1   26  17   4   16  19   9    0.000    0.000       0
+  0  11789 01:56:42.47   0.6360A   2.8294  -0.5825  -0.7945  0.056  0.00   0.000      0.  0.791E+00  0.396E-01  0.563E-03  0.149E-04   46  14   4   42  35  34   16  20   9    0.000    0.000       0
+  0  11798 01:56:48.17   0.6320A   2.8475  -0.5884  -0.7481  0.055  0.00   0.000      0.  0.792E+00  0.391E-01  0.551E-03  0.144E-04   45  14  10   42  35  39   15  20   9    0.000    0.000       0
+  0  11808 01:56:54.30   0.6020A   2.9892  -0.5995  -0.7092  0.055  0.00   0.000      0.  0.793E+00  0.386E-01  0.518E-03  0.128E-04   41  17  23   22  10  33   12  17   9    0.000    0.000       0
+  0  11818 01:57:00.34   0.6120A   2.9396  -0.6047  -0.6695  0.054  0.00   0.000      0.  0.794E+00  0.383E-01  0.524E-03  0.123E-04   41  17  31   30  11   2   11  17   9    0.000    0.000       0
+  0  11828 01:57:06.56   0.6290A   2.8596  -0.6074  -0.6312  0.053  0.00   0.000      0.  0.795E+00  0.381E-01  0.533E-03  0.120E-04   46  14  34   28  10   2    9  17   9    0.000    0.000       0
+  0  11837 01:57:12.23   0.6260A   2.8736  -0.6632  -0.5985  0.053  0.00   0.000      0.  0.796E+00  0.380E-01  0.525E-03  0.131E-04   46  11   1   28  10   6    9  17   9    0.000    0.000       0
+  0  11847 01:57:18.43   0.6160A   2.9235   0.6736  -0.5632  0.052  0.00   0.000      0.  0.797E+00  0.379E-01  0.517E-03  0.150E-04   46  11   9   25  12  24    9  15   9    0.000    0.000       0
+  0  11857 01:57:24.56   0.6100A   2.9531   0.6490  -0.5789  0.052  0.00   0.000      0.  0.798E+00  0.378E-01  0.511E-03  0.151E-04   46  11  16   25  12  28   10  12   9    0.000    0.000       0
+  0  11866 01:57:30.04   0.6080A   2.9611   0.6096  -0.5898  0.051  0.00   0.000      0.  0.799E+00  0.378E-01  0.508E-03  0.138E-04   46  11  23   25  13  31    9  12   9    0.000    0.000       0
+  0  11876 01:57:36.17   0.6180A   2.9134   0.5850  -0.5912  0.051  0.00   0.000      0.  0.800E+00  0.377E-01  0.517E-03  0.139E-04   45  11  30   26  13  34   18  17   9    0.000    0.000       0
+  0  11886 01:57:42.37   0.6200A   2.9022  -0.5942  -0.6877  0.051  0.00   0.000      0.  0.801E+00  0.377E-01  0.522E-03  0.150E-04   46  10  37   28   8  26   18  14   9    0.000    0.000       0
+  0  11896 01:57:48.58   0.6200A   2.9030  -0.6551  -0.7443  0.050  0.00   0.000      0.  0.802E+00  0.377E-01  0.527E-03  0.150E-04   44  12   0   18  10   9   17  14   9    0.000    0.000       0
+  0  11905 01:57:54.17   0.6230A   2.8890  -0.6981  -0.7661  0.050  0.00   0.000      0.  0.803E+00  0.377E-01  0.530E-03  0.151E-04   44  12   6   18   9   9   17  16   9    0.000    0.000       0
+  0  11915 01:58:00.41   0.6230A   2.8894  -0.6403  -0.6895  0.050  0.00   0.000      0.  0.804E+00  0.378E-01  0.528E-03  0.141E-04   46  11  23   17  10   9   16  17   9    0.000    0.000       0
+  0  11924 01:58:06.01   0.6210A   2.8967  -0.6082  -0.6294  0.050  0.00   0.000      0.  0.805E+00  0.379E-01  0.525E-03  0.157E-04   45   9  27   17   9   9   17  12   9    0.000    0.000       0
+  0  11934 01:58:12.25   0.6250A   2.8819   0.8326  -0.6298  0.050  0.00   0.000      0.  0.806E+00  0.382E-01  0.529E-03  0.170E-04   46   9  35   20  29   8   17  12   9    0.000    0.000       0
+  0  11944 01:58:18.52   0.6290A   2.8610   0.9902  -0.8775  0.050  0.00   0.000      0.  0.808E+00  0.384E-01  0.535E-03  0.168E-04   44  10  36   19  30   9   18  27   9    0.000    0.000       0
+  0  11953 01:58:24.15   0.6220A   2.8936   0.9087  -0.9753  0.051  0.00   0.000      0.  0.809E+00  0.384E-01  0.531E-03  0.154E-04   46  39   6   18  31   9   17  28   9    0.000    0.000       0
+  0  11963 01:58:30.41   0.6320A   2.8470   0.9754  -1.0279  0.051  0.00   0.000      0.  0.810E+00  0.383E-01  0.534E-03  0.137E-04   46  10  10   20  30   9   17  23   9    0.000    0.000       0
+  0  11972 01:58:36.03   0.6180A   2.9137   0.7425  -1.0026  0.050  0.00   0.000      0.  0.811E+00  0.381E-01  0.519E-03  0.129E-04   42  33  23   21  31  14   16  23   9    0.000    0.000       0
+  0  11982 01:58:42.20   0.6200A   2.9049  -0.8229  -0.9705  0.050  0.00   0.000      0.  0.812E+00  0.378E-01  0.513E-03  0.123E-04   45  31  26   20  30   8   15  22   9    0.000    0.000       0
+  0  11992 01:58:48.37   0.6170A   2.9194  -0.8346  -0.8599  0.049  0.00   0.000      0.  0.814E+00  0.375E-01  0.507E-03  0.120E-04   46  31  34   20  27   8   16  20   9    0.000    0.000       0
+  0  12002 01:58:54.54   0.6170A   2.9167  -0.7581  -0.8041  0.048  0.00   0.000      0.  0.815E+00  0.373E-01  0.506E-03  0.124E-04   46  31   1   20  25   8   15  23   9    0.000    0.000       0
+  0  12011 01:59:00.11   0.6240A   2.8857  -0.7038  -0.7893  0.048  0.00   0.000      0.  0.817E+00  0.372E-01  0.511E-03  0.136E-04   46  31   9   43  25  18   15  21   9    0.000    0.000       0
+  0  12021 01:59:06.31   0.6140A   2.9325  -0.6137  -0.7684  0.047  0.00   0.000      0.  0.818E+00  0.371E-01  0.507E-03  0.143E-04   45  31  17   43  24  24   14  21   9    0.000    0.000       0
+  0  12031 01:59:12.42   0.6090A   2.9552  -0.6443  -0.7627  0.047  0.00   0.000      0.  0.819E+00  0.371E-01  0.506E-03  0.147E-04   45  31  25   45  25  34   13  20   9    0.000    0.000       0
+  0  12041 01:59:18.46   0.6020A   2.9876  -0.6690  -0.7419  0.047  0.00   0.000      0.  0.821E+00  0.371E-01  0.503E-03  0.157E-04   46  31  33   45  24   0   12  20   9    0.000    0.000       0
+  0  12051 01:59:24.55   0.6140A   2.9297  -0.6505  -0.6860  0.047  0.00   0.000      0.  0.822E+00  0.372E-01  0.513E-03  0.154E-04   46  30   0   46  23   6   11  20   9    0.000    0.000       0
+  0  12060 01:59:30.01   0.6010A   2.9926  -0.6374  -0.6587  0.048  0.00   0.000      0.  0.823E+00  0.373E-01  0.500E-03  0.133E-04   46  30   7   46  23  12    8  19   8    0.000    0.000       0
+  0  12070 01:59:36.04   0.6080A   2.9627  -0.6731  -0.8007  0.048  0.00   0.000      0.  0.825E+00  0.372E-01  0.506E-03  0.122E-04   46  30  15   20  10   9   17  13   9    0.000    0.000       0
+  0  12080 01:59:42.17   0.6190A   2.9079  -0.6086  -0.8455  0.048  0.00   0.000      0.  0.826E+00  0.371E-01  0.519E-03  0.119E-04   45  32   2   46  22  25   16  13   9    0.000    0.000       0
+  0  12090 01:59:48.35   0.6160A   2.9233  -0.6516  -0.7381  0.048  0.00   0.000      0.  0.827E+00  0.370E-01  0.515E-03  0.116E-04   45   8   1   44  21  29   15  14   9    0.000    0.000       0
+  0  12100 01:59:54.45   0.6080A   2.9622  -0.6684  -0.6950  0.047  0.00   0.000      0.  0.828E+00  0.368E-01  0.506E-03  0.111E-04   45  29  37   43  21  34   14  14   9    0.000    0.000       0
+  0  12110 02:00:00.53   0.6100A   2.9532  -0.7189  -0.6481  0.047  0.00   0.000      0.  0.830E+00  0.367E-01  0.502E-03  0.103E-04   46  37  30   43  20   0   13  14   9    0.000    0.000       0
+  0  12119 02:00:06.05   0.6150A   2.9253  -0.7163  -0.6350  0.046  0.00   0.000      0.  0.831E+00  0.366E-01  0.507E-03  0.104E-04   44  29   8   43  19   6   15  17   9    0.000    0.000       0
+  0  12129 02:00:12.15   0.5980A   3.0077  -0.6714  -0.6325  0.046  0.00   0.000      0.  0.832E+00  0.367E-01  0.497E-03  0.115E-04   46  37   5   43  18  12   14  17   9    0.000    0.000       0
+  0  12139 02:00:18.16   0.6050A   2.9773  -0.6589   0.6307  0.046  0.00   0.000      0.  0.833E+00  0.368E-01  0.505E-03  0.133E-04   46  37  12   42  17  18   21  11   9    0.000    0.000       0
+  0  12149 02:00:24.04   0.5790A   3.1102  -0.6298  -0.5982  0.046  0.00   0.000      0.  0.834E+00  0.369E-01  0.486E-03  0.132E-04   44  29  30   42  16  24   12  17   9    0.000    0.000       0
+  0  12160 02:00:30.40   0.5780A   3.1123  -0.6402  -0.7478  0.047  0.00   0.000      0.  0.835E+00  0.369E-01  0.481E-03  0.127E-04   44  29  37   41  16  30   18  26   9    0.000    0.000       0
+  0  12170 02:00:36.29   0.6040A   2.9823  -0.6448  -0.8695  0.047  0.00   0.000      0.  0.836E+00  0.369E-01  0.498E-03  0.135E-04   44  29   4   41  15  35   17  25   9    0.000    0.000       0
+  0  12180 02:00:42.26   0.5930A   3.0372  -0.6111  -0.9354  0.047  0.00   0.000      0.  0.836E+00  0.369E-01  0.489E-03  0.137E-04   44  27   4   44  17   6   16  25   9    0.000    0.000       0
+  0  12190 02:00:48.18   0.5940A   3.0279  -0.6285  -0.8973  0.047  0.00   0.000      0.  0.837E+00  0.369E-01  0.494E-03  0.143E-04   44  27  11   42  16   8   15  25   9    0.000    0.000       0
+  0  12200 02:00:54.16   0.5940A   3.0279  -0.5977  -0.8612  0.047  0.00   0.000      0.  0.838E+00  0.369E-01  0.495E-03  0.128E-04   42  28  22   31  39  19   14  23   9    0.000    0.000       0
+  0  12210 02:01:00.07   0.6020A   2.9917  -0.6447  -0.8309  0.048  0.00   0.000      0.  0.839E+00  0.369E-01  0.503E-03  0.122E-04   45   9  11   31  38  23   13  24   9    0.000    0.000       0
+  0  12220 02:01:06.09   0.6020A   2.9915  -0.6527  -0.7979  0.049  0.00   0.000      0.  0.840E+00  0.369E-01  0.504E-03  0.114E-04   46   9  19   31  36  26   12  24   9    0.000    0.000       0
+  0  12230 02:01:12.09   0.5990A   3.0060  -0.6754  -0.7458  0.049  0.00   0.000      0.  0.841E+00  0.369E-01  0.501E-03  0.109E-04   45   8  21   31  35  30   11  24   9    0.000    0.000       0
+  0  12240 02:01:18.06   0.5990A   3.0065  -0.6618  -0.6913  0.049  0.00   0.000      0.  0.842E+00  0.369E-01  0.505E-03  0.112E-04   45  28  13   31  34  34   10  24   9    0.000    0.000       0
+  0  12250 02:01:24.02   0.5930A   3.0354  -0.6152  -0.6531  0.050  0.00   0.000      0.  0.843E+00  0.369E-01  0.500E-03  0.123E-04   45   7  38   31  33  38   13  18   9    0.000    0.000       0
+  0  12261 02:01:30.52   0.5910A   3.0461  -0.5990   0.6329  0.050  0.00   0.000      0.  0.844E+00  0.370E-01  0.496E-03  0.128E-04   46   7   7   31  36   4   20  11   9    0.000    0.000       0
+  0  12271 02:01:36.43   0.5880A   3.0590   0.6030  -0.6101  0.049  0.00   0.000      0.  0.844E+00  0.370E-01  0.492E-03  0.129E-04   44  26  33   28  16  37    8  23   8    0.000    0.000       0
+  0  12281 02:01:42.35   0.5970A   3.0157  -0.5969  -0.5823  0.049  0.00   0.000      0.  0.845E+00  0.371E-01  0.499E-03  0.138E-04   44  26   0   40  12  16    6  23   8    0.000    0.000       0
+  0  12291 02:01:48.30   0.5900A   3.0492  -0.6467  -0.5802  0.049  0.00   0.000      0.  0.846E+00  0.373E-01  0.493E-03  0.141E-04   44   6  16   40  11  21    6  17   8    0.000    0.000       0
+  0  12301 02:01:54.20   0.5910A   3.0448  -0.7742  -0.5844  0.049  0.00   0.000      0.  0.847E+00  0.374E-01  0.493E-03  0.126E-04   44   6  24   20  20   8    6  17   8    0.000    0.000       0
+  0  12311 02:02:00.10   0.5880A   3.0590  -0.6696   0.6421  0.049  0.00   0.000      0.  0.848E+00  0.376E-01  0.490E-03  0.111E-04   45   0  17   40   9  32   15  29   8    0.000    0.000       0
+  0  12322 02:02:06.53   0.5840A   3.0799  -0.6439   0.6918  0.049  0.00   0.000      0.  0.849E+00  0.378E-01  0.488E-03  0.118E-04   46   0  26   40   9  39   16  29   8    0.000    0.000       0
+  0  12332 02:02:12.38   0.5870A   3.0654  -0.6453  -0.5686  0.048  0.00   0.000      0.  0.849E+00  0.380E-01  0.491E-03  0.121E-04   46   0  33   40   8   4   17  22   9    0.000    0.000       0
+  0  12342 02:02:18.26   0.5870A   3.0672  -0.6646  -0.6167  0.048  0.00   0.000      0.  0.850E+00  0.382E-01  0.489E-03  0.118E-04   46  38  37   40   7  10   17  22   9    0.000    0.000       0
+  0  12352 02:02:24.06   0.5750A   3.1278  -0.6216  -0.6604  0.048  0.00   0.000      0.  0.851E+00  0.384E-01  0.476E-03  0.115E-04   44   9  11   40   6  16   16  21   9    0.000    0.000       0
+  0  12363 02:02:30.34   0.5700A   3.1589  -0.6399  -0.6707  0.048  0.00   0.000      0.  0.852E+00  0.386E-01  0.470E-03  0.116E-04   44   9  20   39   6  22   15  21   9    0.000    0.000       0
+  0  12373 02:02:36.10   0.5780A   3.1150  -0.5782  -0.6578  0.049  0.00   0.000      0.  0.853E+00  0.388E-01  0.475E-03  0.117E-04   46   1  18   39   5  28   15  20   9    0.000    0.000       0
+  0  12384 02:02:42.43   0.5750A   3.1298  -0.5556  -0.6387  0.050  0.00   0.000      0.  0.854E+00  0.390E-01  0.470E-03  0.108E-04   46   1  26   38  38  25   15  19   9    0.000    0.000       0
+  0  12394 02:02:48.20   0.5750A   3.1295  -0.5760  -0.6769  0.050  0.00   0.000      0.  0.854E+00  0.393E-01  0.467E-03  0.931E-05   46   3  27   38  37  30   17  19   9    0.000    0.000       0
+  0  12405 02:02:54.53   0.5780A   3.1122   0.5551  -0.6732  0.050  0.00   0.000      0.  0.855E+00  0.395E-01  0.467E-03  0.836E-05   46   3  35   23  30  31   17  20   9    0.000    0.000       0
+  0  12415 02:03:00.37   0.5850A   3.0760  -0.6163  -0.6438  0.050  0.00   0.000      0.  0.856E+00  0.397E-01  0.471E-03  0.805E-05   46   1  11   41  38  18   16  20   9    0.000    0.000       0
+  0  12425 02:03:06.17   0.5760A   3.1229   0.6308  -0.6096  0.050  0.00   0.000      0.  0.857E+00  0.401E-01  0.465E-03  0.839E-05   42   3   6   23  32  37   16  17   9    0.000    0.000       0
+  0  12436 02:03:12.57   0.5860A   3.0726   0.6046  -0.5630  0.049  0.00   0.000      0.  0.858E+00  0.405E-01  0.477E-03  0.108E-04   44   9  29   23  32   0   15  17   9    0.000    0.000       0
+  0  12446 02:03:18.40   0.5820A   3.0938   0.5947   0.6462  0.049  0.00   0.000      0.  0.859E+00  0.410E-01  0.482E-03  0.138E-04   44   9  36   23  33   2   20  28   9    0.000    0.000       0
+  0  12456 02:03:24.15   0.5720A   3.1456   0.5814   0.7249  0.048  0.00   0.000      0.  0.860E+00  0.415E-01  0.478E-03  0.150E-04   44   3  34   31  15  39   20  28   9    0.000    0.000       0
+  0  12467 02:03:30.47   0.5720A   3.1476   0.5858   0.7560  0.047  0.00   0.000      0.  0.860E+00  0.421E-01  0.482E-03  0.151E-04   45  39  19   24  35  12   20  27   9    0.000    0.000       0
+  0  12477 02:03:36.16   0.5720A   3.1476  -0.5846   0.7060  0.047  0.00   0.000      0.  0.861E+00  0.426E-01  0.482E-03  0.148E-04   45  39  25   32  36  33   20  27   9    0.000    0.000       0
+  0  12488 02:03:42.47   0.5800A   3.1041  -0.7034   0.6823  0.047  0.00   0.000      0.  0.862E+00  0.432E-01  0.487E-03  0.127E-04   43   2  21   20  16   9   21  12   9    0.000    0.000       0
+  0  12498 02:03:48.21   0.5690A   3.1645  -0.6911  -0.7512  0.048  0.00   0.000      0.  0.862E+00  0.437E-01  0.475E-03  0.106E-04   43   2  28   19  15   9   17  17   9    0.000    0.000       0
+  0  12509 02:03:54.48   0.5700A   3.1563  -0.6354  -0.7077  0.048  0.00   0.000      0.  0.863E+00  0.441E-01  0.475E-03  0.101E-04   43   2  36   20  14   9   16  18   9    0.000    0.000       0
+  0  12519 02:04:00.18   0.5680A   3.1672   0.6764  -0.6695  0.049  0.00   0.000      0.  0.864E+00  0.445E-01  0.473E-03  0.998E-05   43   2   3   35  18  13   16  19   9    0.000    0.000       0
+  0  12530 02:04:06.46   0.5710A   3.1530   0.6461  -0.6387  0.049  0.00   0.000      0.  0.864E+00  0.448E-01  0.472E-03  0.981E-05   43   2  11   35  19  18   17  29   8    0.000    0.000       0
+  0  12540 02:04:12.19   0.5730A   3.1421   0.5760  -0.6672  0.048  0.00   0.000      0.  0.865E+00  0.450E-01  0.474E-03  0.956E-05   45   0  30   29  11  33   25  10  17    0.000    0.000       0
+  0  12551 02:04:18.49   0.5690A   3.1620  -0.6607   0.6229  0.048  0.00   0.000      0.  0.865E+00  0.452E-01  0.474E-03  0.103E-04   45   0   5   20  27   9   37  33  38    0.000    0.000       0
+  0  12561 02:04:24.15   0.5680A   3.1667  -0.6277   0.7085  0.047  0.00   0.000      0.  0.866E+00  0.455E-01  0.476E-03  0.105E-04   45   0  12   42  18  25   37  33   4    0.000    0.000       0
+  0  12572 02:04:30.43   0.5730A   3.1393   0.6438   0.7597  0.047  0.00   0.000      0.  0.866E+00  0.457E-01  0.484E-03  0.108E-04   46   0  14   29  19  31   38  33   9    0.000    0.000       0
+  0  12582 02:04:36.21   0.5780A   3.1122  -0.6290   0.7541  0.046  0.00   0.000      0.  0.866E+00  0.460E-01  0.493E-03  0.114E-04   45   8  37   32  39   7   38  33  14    0.000    0.000       0
+  0  12593 02:04:42.53   0.5720A   3.1469   0.6730   0.6943  0.046  0.00   0.000      0.  0.867E+00  0.463E-01  0.493E-03  0.120E-04   46   8   5   31  19  39   39  32  18    0.000    0.000       0
+  0  12603 02:04:48.27   0.5760A   3.1255  -0.6855   0.6866  0.045  0.00   0.000      0.  0.867E+00  0.466E-01  0.500E-03  0.131E-04   46   8  12   32  38  17   40  32  22    0.000    0.000       0
+  0  12613 02:04:54.02   0.5760A   3.1252  -0.6047   0.7037  0.045  0.00   0.000      0.  0.868E+00  0.469E-01  0.501E-03  0.131E-04   44   7  25   32  37  21   40  31  25    0.000    0.000       0
+  0  12624 02:05:00.31   0.5680A   3.1667  -0.6214   0.6361  0.045  0.00   0.000      0.  0.868E+00  0.473E-01  0.492E-03  0.115E-04   44   8  32   32  17   7   41  31  30    0.000    0.000       0
+  0  12635 02:05:06.56   0.5680A   3.1706   0.6633  -0.6347  0.045  0.00   0.000      0.  0.869E+00  0.476E-01  0.494E-03  0.115E-04   44   8   0   37  20  32   39  38  15    0.000    0.000       0
+  0  12645 02:05:12.21   0.5640A   3.1931  -0.6699   0.6366  0.045  0.00   0.000      0.  0.869E+00  0.480E-01  0.495E-03  0.123E-04   44   8   8   30   7  19   42  34   6    0.000    0.000       0
+  0  12656 02:05:18.37   0.5600A   3.2134   0.7050  -0.7190  0.045  0.00   0.000      0.  0.870E+00  0.485E-01  0.490E-03  0.123E-04   44   2  27   45  36  11   28   4   0    0.000    0.000       0
+  0  12667 02:05:24.49   0.5570A   3.2317   0.7581  -0.7699  0.045  0.00   0.000      0.  0.870E+00  0.489E-01  0.490E-03  0.122E-04   44   2  35   45  37  16   28   5   3    0.000    0.000       0
+  0  12677 02:05:30.08   0.5610A   3.2071   0.8095  -0.8196  0.045  0.00   0.000      0.  0.871E+00  0.493E-01  0.496E-03  0.123E-04   44   2   2   46  38  21   27   5   7    0.000    0.000       0
+  0  12688 02:05:36.34   0.5720A   3.1442   0.8213  -0.9360  0.044  0.00   0.000      0.  0.871E+00  0.496E-01  0.507E-03  0.124E-04   43   8  37   46  39  27   26   5  12    0.000    0.000       0
+  0  12698 02:05:42.07   0.5750A   3.1324   0.7742  -0.8939  0.045  0.00   0.000      0.  0.872E+00  0.499E-01  0.516E-03  0.122E-04   46  12   0   45   0  32   25   5  16    0.000    0.000       0
+  0  12709 02:05:48.35   0.5680A   3.1702   0.7385  -0.8095  0.045  0.00   0.000      0.  0.872E+00  0.502E-01  0.517E-03  0.122E-04   46  12   9   45   1  38   24   5  22    0.000    0.000       0
+  0  12719 02:05:54.03   0.5680A   3.1713   0.7325  -0.7654  0.045  0.00   0.000      0.  0.873E+00  0.505E-01  0.520E-03  0.120E-04   46  37  39   45   2   4   23   5  25    0.000    0.000       0
+  0  12730 02:06:00.27   0.5700A   3.1588   0.6863  -0.7076  0.046  0.00   0.000      0.  0.874E+00  0.509E-01  0.526E-03  0.123E-04   44   9  31   35  10   9   23   6  28    0.000    0.000       0
+  0  12741 02:06:06.54   0.5700A   3.1581   0.7160  -0.7335  0.047  0.00   0.000      0.  0.875E+00  0.514E-01  0.528E-03  0.114E-04   44   9   0   33  10  12   25   4  36    0.000    0.000       0
+  0  12751 02:06:12.20   0.5630A   3.1969   0.7714  -0.7112  0.047  0.00   0.000      0.  0.875E+00  0.518E-01  0.525E-03  0.955E-05   44   8  10   33  10  16   24   4   0    0.000    0.000       0
+  0  12762 02:06:18.37   0.5590A   3.2189   0.7286  -0.7137  0.047  0.00   0.000      0.  0.876E+00  0.522E-01  0.528E-03  0.105E-04   44   8  18   33  10  20   28   5   6    0.000    0.000       0
+  0  12773 02:06:24.52   0.5590A   3.2221  -0.6635  -0.7733  0.046  0.00   0.000      0.  0.877E+00  0.526E-01  0.531E-03  0.111E-04   44   8  27   38  39  22   27   4  10    0.000    0.000       0
+  0  12783 02:06:30.10   0.5600A   3.2171   0.6861  -0.7273  0.046  0.00   0.000      0.  0.877E+00  0.529E-01  0.539E-03  0.121E-04   44   8  34   36  14  37   35  12   1    0.000    0.000       0
+  0  12794 02:06:36.23   0.5540A   3.2492   0.7073  -0.6859  0.044  0.00   0.000      0.  0.878E+00  0.533E-01  0.543E-03  0.123E-04   45   9  37   36  14   3   35  13   5    0.000    0.000       0
+  0  12805 02:06:42.28   0.5470A   3.2895   0.6976   0.6822  0.043  0.00   0.000      0.  0.879E+00  0.538E-01  0.542E-03  0.124E-04   46   9   6   36  15   8   21  13   9    0.000    0.000       0
+  0  12816 02:06:48.26   0.5420A   3.3209  -0.7496  -0.7026  0.043  0.00   0.000      0.  0.880E+00  0.544E-01  0.537E-03  0.119E-04   46   9  14   22  35  30   25  35  32    0.000    0.000       0
+  0  12827 02:06:54.26   0.5490A   3.2781  -0.7344  -0.6560  0.042  0.00   0.000      0.  0.881E+00  0.551E-01  0.543E-03  0.121E-04   43   8  26   22  34  33   33  14  21    0.000    0.000       0
+  0  12838 02:07:00.31   0.5520A   3.2587  -0.6923  -0.6537  0.041  0.00   0.000      0.  0.881E+00  0.559E-01  0.547E-03  0.120E-04   43   8  35   34   3  10   23  35   1    0.000    0.000       0
+  0  12849 02:07:06.39   0.5460A   3.2961   0.7931  -0.6378  0.040  0.00   0.000      0.  0.882E+00  0.566E-01  0.546E-03  0.124E-04   45   9   2   33  20  12   25  35   7    0.000    0.000       0
+  0  12860 02:07:12.29   0.5290A   3.4018   0.7981  -0.7133  0.039  0.00   0.000      0.  0.882E+00  0.573E-01  0.537E-03  0.140E-04   45   9  11   33  21  16   33  16  15    0.000    0.000       0
+  0  12871 02:07:18.06   0.5210A   3.4577  -0.7505  -0.6855  0.038  0.00   0.000      0.  0.883E+00  0.580E-01  0.537E-03  0.154E-04   45   9  19   34   1  28   23  35  15    0.000    0.000       0
+  0  12883 02:07:24.29   0.5170A   3.4821  -0.7398  -0.7578  0.038  0.00   0.000      0.  0.883E+00  0.586E-01  0.539E-03  0.149E-04   46   9  28   34   0  34   21  35  19    0.000    0.000       0
+  0  12894 02:07:30.04   0.5300A   3.3961  -0.7696  -0.6834  0.037  0.00   0.000      0.  0.883E+00  0.592E-01  0.551E-03  0.146E-04   46   9  36   33   3  37   20  35  22    0.000    0.000       0
+  0  12905 02:07:36.05   0.5560A   3.2389  -0.7813   0.6878  0.038  0.00   0.000      0.  0.884E+00  0.597E-01  0.572E-03  0.146E-04   44   9   3   33   2   2   21  30  24    0.000    0.000       0
+  0  12916 02:07:42.23   0.5620A   3.2032  -0.7261  -0.7922  0.038  0.00   0.000      0.  0.884E+00  0.601E-01  0.575E-03  0.138E-04   42   8   9   20  18   8   18  29   9    0.000    0.000       0
+  0  12927 02:07:48.44   0.5670A   3.1762  -0.6750  -0.7251  0.039  0.00   0.000      0.  0.884E+00  0.605E-01  0.580E-03  0.134E-04   44   8   9   20  17   8   18  28   9    0.000    0.000       0
+  0  12937 02:07:54.12   0.5700A   3.1597   0.6551   0.6526  0.039  0.00   0.000      0.  0.885E+00  0.607E-01  0.582E-03  0.124E-04   44   8  16   17   2  34   23  30  32    0.000    0.000       0
+  0  12948 02:08:00.41   0.5680A   3.1668  -0.6606   0.6441  0.040  0.00   0.000      0.  0.885E+00  0.608E-01  0.578E-03  0.107E-04   46  10  24   36   0  27   23  30  36    0.000    0.000       0
+  0  12958 02:08:06.04   0.5630A   3.1997  -0.7050  -0.6225  0.040  0.00   0.000      0.  0.886E+00  0.609E-01  0.572E-03  0.103E-04   46  10  32   19  37   7   20  35  13    0.000    0.000       0
+  0  12969 02:08:12.21   0.5590A   3.2211  -0.6979   0.6238  0.040  0.00   0.000      0.  0.886E+00  0.610E-01  0.566E-03  0.112E-04   38   9   8   43  17  24   20  29   9    0.000    0.000       0
+  0  12980 02:08:18.31   0.5520A   3.2634  -0.6950  -0.7209  0.039  0.00   0.000      0.  0.887E+00  0.611E-01  0.564E-03  0.137E-04   38  10  14   16  33  37   22  36  22    0.000    0.000       0
+  0  12991 02:08:24.43   0.5620A   3.2047  -0.6497  -0.7296  0.039  0.00   0.000      0.  0.887E+00  0.615E-01  0.586E-03  0.185E-04   38  10  21   16  33  39   21  36  25    0.000    0.000       0
+  0  13001 02:08:30.17   0.5840A   3.0829  -0.6566   0.8425  0.038  0.00   0.000      0.  0.888E+00  0.620E-01  0.624E-03  0.229E-04   38   8  29   15  33   0   20  11   9    0.000    0.000       0
+  0  13012 02:08:36.53   0.5770A   3.1201  -0.7106   0.8523  0.037  0.00   0.000      0.  0.888E+00  0.627E-01  0.631E-03  0.255E-04   46  14  12   26  11  31   20  11   9    0.000    0.000       0
+  0  13022 02:08:42.28   0.5740A   3.1337  -0.7940   1.0321  0.037  0.00   0.000      0.  0.889E+00  0.634E-01  0.635E-03  0.257E-04   46  14  19   19  24   9   20  29   9    0.000    0.000       0
+  0  13032 02:08:48.04   0.5770A   3.1180  -0.7444   1.1294  0.038  0.00   0.000      0.  0.889E+00  0.642E-01  0.641E-03  0.237E-04   45  14  26   19  23   9   20  28   9    0.000    0.000       0
+  0  13043 02:08:54.35   0.5710A   3.1548   0.7178   1.1135  0.038  0.00   0.000      0.  0.889E+00  0.650E-01  0.642E-03  0.227E-04   43  11  11   15  14   9   20  27   9    0.000    0.000       0
+  0  13053 02:09:00.06   0.5670A   3.1734  -0.8422   1.0269  0.038  0.00   0.000      0.  0.889E+00  0.656E-01  0.643E-03  0.231E-04   44  15   3   20  30   8   20  27   9    0.000    0.000       0
+  0  13064 02:09:06.30   0.5680A   3.1675  -0.8904  -1.1294  0.039  0.00   0.000      0.  0.889E+00  0.661E-01  0.658E-03  0.238E-04   44  15  11   16  30   6   15  29   8    0.000    0.000       0
+  0  13074 02:09:12.08   0.5840A   3.0814   0.9528   0.9471  0.040  0.00   0.000      0.  0.889E+00  0.665E-01  0.693E-03  0.249E-04   46  38  22   21  28   8   20  26   9    0.000    0.000       0
+  0  13085 02:09:18.56   0.5950A   3.0238   1.0226   0.9161  0.040  0.00   0.000      0.  0.889E+00  0.666E-01  0.721E-03  0.245E-04   46  39  29   21  29   8   20  24   9    0.000    0.000       0
+  0  13095 02:09:24.56   0.6000A   2.9995  -0.9725   0.7935  0.039  0.00   0.000      0.  0.889E+00  0.665E-01  0.728E-03  0.225E-04   46  38   0   12  28   8   20  25   9    0.000    0.000       0
+  0  13105 02:09:30.52   0.5910A   3.0462  -0.9828  -0.7648  0.039  0.00   0.000      0.  0.888E+00  0.662E-01  0.718E-03  0.211E-04   44   6   9   12  26   9   17  32   7    0.000    0.000       0
+  0  13115 02:09:36.41   0.5870A   3.0655  -0.8657  -0.8217  0.039  0.00   0.000      0.  0.888E+00  0.659E-01  0.716E-03  0.202E-04   44   6  17   11  24   9   15  32   8    0.000    0.000       0
+  0  13125 02:09:42.30   0.5930A   3.0363   0.7780  -0.8038  0.040  0.00   0.000      0.  0.887E+00  0.657E-01  0.727E-03  0.189E-04   46   2  15   20  26   8   14  32  10    0.000    0.000       0
+  0  13135 02:09:48.23   0.5930A   3.0353  -0.7222  -0.7194  0.040  0.00   0.000      0.  0.887E+00  0.654E-01  0.731E-03  0.188E-04   46   2  22   42  12  24   12  32  11    0.000    0.000       0
+  0  13145 02:09:54.16   0.5930A   3.0365  -0.7651  -0.8409  0.041  0.00   0.000      0.  0.887E+00  0.652E-01  0.741E-03  0.203E-04   46   3  29   16  38  13   17  19   9    0.000    0.000       0
+  0  13155 02:10:00.09   0.5930A   3.0341   0.7997  -0.8391  0.042  0.00   0.000      0.  0.886E+00  0.650E-01  0.743E-03  0.218E-04   45   3  36   20  26   9   16  18   9    0.000    0.000       0
+  0  13166 02:10:06.58   0.5910A   3.0477  -0.7772  -0.8008  0.042  0.00   0.000      0.  0.886E+00  0.647E-01  0.741E-03  0.218E-04   46  13  11   16  36  18   17  23   9    0.000    0.000       0
+  0  13176 02:10:12.47   0.5890A   3.0573   0.8175  -0.9037  0.042  0.00   0.000      0.  0.885E+00  0.644E-01  0.742E-03  0.225E-04   44   4  14   19  31   9   16  21   9    0.000    0.000       0
+  0  13186 02:10:18.33   0.5840A   3.0831  -0.7980  -0.8581  0.042  0.00   0.000      0.  0.885E+00  0.642E-01  0.737E-03  0.230E-04   44   4  21   38  39  16   15  22   9    0.000    0.000       0
+  0  13196 02:10:24.11   0.5770A   3.1177  -0.8038  -0.7678  0.043  0.00   0.000      0.  0.885E+00  0.639E-01  0.727E-03  0.220E-04   44   4  29   32   2  16   14  21   9    0.000    0.000       0
+  0  13207 02:10:30.48   0.5780A   3.1121   0.8016   0.9083  0.044  0.00   0.000      0.  0.884E+00  0.637E-01  0.732E-03  0.239E-04   46   2  39   18  30   9   19  28   8    0.000    0.000       0
+  0  13217 02:10:36.21   0.5680A   3.1701  -0.7682   0.9845  0.044  0.00   0.000      0.  0.884E+00  0.637E-01  0.723E-03  0.260E-04   45   2   6   16  30   4   20  27   8    0.000    0.000       0
+  0  13228 02:10:42.40   0.5630A   3.1993  -0.8057   1.0735  0.044  0.00   0.000      0.  0.884E+00  0.638E-01  0.718E-03  0.258E-04   46   2  14   16  30   6   21  26   9    0.000    0.000       0
+  0  13238 02:10:48.02   0.5640A   3.1935  -0.9731   0.9806  0.044  0.00   0.000      0.  0.883E+00  0.638E-01  0.716E-03  0.231E-04   46   2  22   21  25   8   20  26   9    0.000    0.000       0
+  0  13249 02:10:54.27   0.5720A   3.1452  -0.9052   0.9401  0.043  0.00   0.000      0.  0.883E+00  0.639E-01  0.712E-03  0.185E-04   46   2  30   22  23   8   21  24   9    0.000    0.000       0
+  0  13259 02:11:00.02   0.5720A   3.1468  -0.8898   1.0238  0.043  0.00   0.000      0.  0.883E+00  0.639E-01  0.700E-03  0.169E-04   44   1   1   15  24   9   21  23   9    0.000    0.000       0
+  0  13270 02:11:06.29   0.5640A   3.1900  -0.8472   0.8669  0.043  0.00   0.000      0.  0.882E+00  0.637E-01  0.687E-03  0.173E-04   44   0   8   15  23   9   22  23   9    0.000    0.000       0
+  0  13281 02:11:12.42   0.5490A   3.2765  -0.8724   0.7330  0.043  0.00   0.000      0.  0.882E+00  0.637E-01  0.671E-03  0.176E-04   44   0  16   12  26   9   21  22   9    0.000    0.000       0
+  0  13292 02:11:18.47   0.5550A   3.2422  -0.9049   0.7239  0.043  0.00   0.000      0.  0.881E+00  0.637E-01  0.677E-03  0.193E-04   44   0  23   11  25   9   20  25   9    0.000    0.000       0
+  0  13302 02:11:24.12   0.5720A   3.1491  -0.8995   0.7277  0.043  0.00   0.000      0.  0.881E+00  0.639E-01  0.691E-03  0.215E-04   44   2  31   10  24   9   20  25   9    0.000    0.000       0
+  0  13313 02:11:30.45   0.5820A   3.0930  -0.8764   0.7092  0.043  0.00   0.000      0.  0.881E+00  0.642E-01  0.692E-03  0.215E-04   44   2  39   10  23   9   20  11   9    0.000    0.000       0
+  0  13323 02:11:36.32   0.5860A   3.0708  -0.8114  -0.7475  0.042  0.00   0.000      0.  0.881E+00  0.647E-01  0.692E-03  0.219E-04   46  13   0   10  26   9    5  28   9    0.000    0.000       0
+  0  13333 02:11:42.14   0.5810A   3.0955  -0.8836  -0.7978  0.042  0.00   0.000      0.  0.880E+00  0.651E-01  0.685E-03  0.222E-04   44   2  15    9  25   9    5  28   9    0.000    0.000       0
+  0  13344 02:11:48.52   0.5770A   3.1201  -0.8598  -0.7521  0.042  0.00   0.000      0.  0.880E+00  0.657E-01  0.677E-03  0.225E-04   42  13   7    9  23   9    4  27   9    0.000    0.000       0
+  0  13354 02:11:54.33   0.5790A   3.1075  -0.7788   0.7613  0.041  0.00   0.000      0.  0.880E+00  0.661E-01  0.673E-03  0.229E-04   46   8  27    9  22   9   20  27   9    0.000    0.000       0
+  0  13364 02:12:00.14   0.5840A   3.0834  -0.7059   0.8492  0.041  0.00   0.000      0.  0.880E+00  0.667E-01  0.674E-03  0.237E-04   46   8  35   24  37  28   20  29   9    0.000    0.000       0
+  0  13375 02:12:06.59   0.5890A   3.0558  -0.7180   1.0316  0.041  0.00   0.000      0.  0.879E+00  0.674E-01  0.673E-03  0.228E-04   46   8   3   23   1  32   20  28   9    0.000    0.000       0
+  0  13385 02:12:12.47   0.5900A   3.0527  -0.7336   0.9474  0.042  0.00   0.000      0.  0.879E+00  0.680E-01  0.670E-03  0.210E-04   45   8  11   16  27   9   20  28   9    0.000    0.000       0
+  0  13395 02:12:18.37   0.5910A   3.0445  -0.7914   0.7888  0.042  0.00   0.000      0.  0.879E+00  0.687E-01  0.665E-03  0.187E-04   45   8  19   17  26   9   20  26   9    0.000    0.000       0
+  0  13405 02:12:24.26   0.5900A   3.0528  -0.7914  -0.6879  0.042  0.00   0.000      0.  0.879E+00  0.693E-01  0.656E-03  0.162E-04   45   7  30   15  25   9   29   0   0    0.000    0.000       0
+  0  13415 02:12:30.13   0.5840A   3.0798  -0.7817  -0.6812  0.042  0.00   0.000      0.  0.879E+00  0.698E-01  0.647E-03  0.151E-04   45   7  38   15  24   9   28   0   4    0.000    0.000       0
+  0  13426 02:12:36.53   0.5790A   3.1102  -0.7374  -0.6881  0.042  0.00   0.000      0.  0.879E+00  0.702E-01  0.646E-03  0.152E-04   46   7   9   15  23   9   28   1  11    0.000    0.000       0
+  0  13436 02:12:42.29   0.5760A   3.1253   0.7432  -0.6916  0.042  0.00   0.000      0.  0.879E+00  0.707E-01  0.647E-03  0.152E-04   46   7  17   24   9  18   26   0  13    0.000    0.000       0
+  0  13446 02:12:48.04   0.5740A   3.1345   0.7537  -0.7129  0.042  0.00   0.000      0.  0.878E+00  0.713E-01  0.647E-03  0.150E-04   45   8  22   24   8  23   26   0  18    0.000    0.000       0
+  0  13457 02:12:54.39   0.5800A   3.1061   0.7439  -0.7082  0.041  0.00   0.000      0.  0.879E+00  0.722E-01  0.654E-03  0.145E-04   46   7  35   23   8  26   25   0  22    0.000    0.000       0
+  0  13467 02:13:00.18   0.5780A   3.1142  -0.7701  -0.7753  0.041  0.00   0.000      0.  0.879E+00  0.731E-01  0.658E-03  0.156E-04   44   6  36   14  25   9   24   0  26    0.000    0.000       0
+  0  13478 02:13:06.47   0.5690A   3.1660  -0.8637   0.8016  0.041  0.00   0.000      0.  0.879E+00  0.741E-01  0.661E-03  0.155E-04   44   6   5   15  26   9   20  28   9    0.000    0.000       0
+  0  13488 02:13:12.14   0.5660A   3.1815  -0.8732   0.7063  0.040  0.00   0.000      0.  0.878E+00  0.749E-01  0.666E-03  0.157E-04   44   6  12   15  25   9   20  26   9    0.000    0.000       0
+  0  13499 02:13:18.38   0.5700A   3.1585  -0.8411   0.7007  0.040  0.00   0.000      0.  0.878E+00  0.754E-01  0.674E-03  0.159E-04   44   6  20   18  26   9   20  12   9    0.000    0.000       0
+  0  13509 02:13:24.08   0.5710A   3.1531  -0.7932   0.7357  0.040  0.00   0.000      0.  0.878E+00  0.758E-01  0.676E-03  0.163E-04   46   8  36   19  26   9   21  14   9    0.000    0.000       0
+  0  13520 02:13:30.34   0.5660A   3.1789  -0.7339   0.8043  0.040  0.00   0.000      0.  0.878E+00  0.760E-01  0.676E-03  0.168E-04   46  12  29   24  11  39   22  15   9    0.000    0.000       0
+  0  13531 02:13:36.51   0.5550A   3.2410  -0.7151   0.7279  0.041  0.00   0.000      0.  0.878E+00  0.763E-01  0.674E-03  0.181E-04   46  12  37   26  27  27   21  15   9    0.000    0.000       0
+  0  13541 02:13:42.06   0.5590A   3.2209  -0.7712   0.6933  0.041  0.00   0.000      0.  0.877E+00  0.767E-01  0.689E-03  0.205E-04   45  12   4   26  26  29   21  15   9    0.000    0.000       0
+  0  13552 02:13:48.22   0.5610A   3.2108  -0.7366  -0.7305  0.042  0.00   0.000      0.  0.877E+00  0.771E-01  0.697E-03  0.212E-04   45   8  13   21   2  32   25  10  24    0.000    0.000       0
+  0  13563 02:13:54.35   0.5550A   3.2413  -0.7641   0.7366  0.042  0.00   0.000      0.  0.876E+00  0.776E-01  0.698E-03  0.196E-04   45   8  21   19   1  35   22  16   9    0.000    0.000       0
+  0  13574 02:14:00.47   0.5590A   3.2216  -0.7368   0.7642  0.042  0.00   0.000      0.  0.875E+00  0.780E-01  0.716E-03  0.184E-04   44   9  30   18   1  33   20  12   9    0.000    0.000       0
+  0  13584 02:14:06.06   0.5610A   3.2112   0.7819   0.7541  0.042  0.00   0.000      0.  0.875E+00  0.783E-01  0.727E-03  0.163E-04   44   9  37   38  30   4   21  16   9    0.000    0.000       0
+  0  13595 02:14:12.25   0.5610A   3.2071   0.7585   0.7580  0.041  0.00   0.000      0.  0.874E+00  0.787E-01  0.735E-03  0.156E-04   44  10   6   38  31   9   22  16   9    0.000    0.000       0
+  0  13606 02:14:18.43   0.5610A   3.2095   0.7602  -0.6902  0.041  0.00   0.000      0.  0.873E+00  0.789E-01  0.744E-03  0.161E-04   44  11  13   38  31  15   24   9  39    0.000    0.000       0
+  0  13617 02:14:24.51   0.5520A   3.2604   0.7553  -0.7503  0.040  0.00   0.000      0.  0.872E+00  0.792E-01  0.735E-03  0.175E-04   44  11  21   38  33  19   24   8   0    0.000    0.000       0
+  0  13627 02:14:30.04   0.5590A   3.2201  -0.8285  -0.8191  0.040  0.00   0.000      0.  0.871E+00  0.793E-01  0.747E-03  0.176E-04   44  11  29   41  21  25   24   9   8    0.000    0.000       0
+  0  13638 02:14:36.21   0.5560A   3.2349   0.8641  -0.8081  0.040  0.00   0.000      0.  0.870E+00  0.795E-01  0.743E-03  0.156E-04   43  11  34   39  32  33   23   9  11    0.000    0.000       0
+  0  13649 02:14:42.36   0.5610A   3.2075  -0.8882   0.6985  0.040  0.00   0.000      0.  0.869E+00  0.795E-01  0.746E-03  0.153E-04   43  11   2   41  19  36   20  10   9    0.000    0.000       0
+  0  13660 02:14:48.50   0.5530A   3.2527  -0.8528   0.7414  0.040  0.00   0.000      0.  0.868E+00  0.795E-01  0.740E-03  0.152E-04   43  10  17   41  18   1   20  29   9    0.000    0.000       0
+  0  13670 02:14:54.12   0.5720A   3.1477   0.7914   0.7645  0.041  0.00   0.000      0.  0.867E+00  0.794E-01  0.764E-03  0.154E-04   43  10  24   39  36  10   20  28   9    0.000    0.000       0
+  0  13681 02:15:00.42   0.5730A   3.1438   0.7908  -0.7680  0.041  0.00   0.000      0.  0.865E+00  0.793E-01  0.767E-03  0.149E-04   42  10  34   31  15  16   20   7  21    0.000    0.000       0
+  0  13691 02:15:06.16   0.5770A   3.1188   0.8052  -0.7483  0.041  0.00   0.000      0.  0.864E+00  0.792E-01  0.772E-03  0.150E-04   43  10  39   31  15  20   19   7  24    0.000    0.000       0
+  0  13702 02:15:12.59   0.5940A   3.0309   0.7452   0.6973  0.040  0.00   0.000      0.  0.863E+00  0.793E-01  0.783E-03  0.147E-04   43  10   6   22   8  13   23   8   7    0.000    0.000       0
+  0  13712 02:15:18.54   0.5930A   3.0334   0.7478   0.7385  0.039  0.00   0.000      0.  0.862E+00  0.796E-01  0.786E-03  0.195E-04   41   9  16   41  32  37   23  29   6    0.000    0.000       0
+  0  13722 02:15:24.51   0.5980A   3.0087  -0.7309   0.7350  0.037  0.00   0.000      0.  0.861E+00  0.803E-01  0.801E-03  0.258E-04   44   1  36   15  29   0   22  10   9    0.000    0.000       0
+  0  13732 02:15:30.49   0.5970A   3.0175   0.7545   0.8685  0.036  0.00   0.000      0.  0.860E+00  0.813E-01  0.812E-03  0.283E-04   44   2   0   37  36   2   21  28   9    0.000    0.000       0
+  0  13742 02:15:36.51   0.6040A   2.9797   0.7063   0.8347  0.036  0.00   0.000      0.  0.859E+00  0.824E-01  0.825E-03  0.269E-04   44   2   7   39  35  11   21  13   9    0.000    0.000       0
+  0  13752 02:15:42.59   0.6090A   2.9567   0.7417   0.9419  0.036  0.00   0.000      0.  0.858E+00  0.834E-01  0.833E-03  0.265E-04   46  10   1   39  35  18   22  26   7    0.000    0.000       0
+  0  13761 02:15:48.09   0.6130A   2.9355  -0.8149   1.0594  0.036  0.00   0.000      0.  0.857E+00  0.842E-01  0.841E-03  0.264E-04   45   3  20   15  28   4   20  28   9    0.000    0.000       0
+  0  13771 02:15:54.18   0.6060A   2.9687  -0.7854   1.0960  0.036  0.00   0.000      0.  0.856E+00  0.848E-01  0.828E-03  0.253E-04   45   3  27   17  25   9   21  26   9    0.000    0.000       0
+  0  13781 02:16:00.27   0.6080A   2.9605  -0.9071   1.0575  0.037  0.00   0.000      0.  0.855E+00  0.853E-01  0.831E-03  0.237E-04   46   3  37   17  23   9   21  23   9    0.000    0.000       0
+  0  13791 02:16:06.33   0.6040A   2.9822  -0.9629   0.9662  0.037  0.00   0.000      0.  0.854E+00  0.858E-01  0.828E-03  0.230E-04   46   0   2   17  21   9   21  23   9    0.000    0.000       0
+  0  13801 02:16:12.25   0.5850A   3.0750  -0.8523   0.8597  0.038  0.00   0.000      0.  0.853E+00  0.861E-01  0.808E-03  0.215E-04   46   0   9   17  20   9   21  23   9    0.000    0.000       0
+  0  13811 02:16:18.10   0.5930A   3.0377  -0.7587   0.7744  0.039  0.00   0.000      0.  0.853E+00  0.862E-01  0.823E-03  0.199E-04   46   0  17   17  18   9   29  31   0    0.000    0.000       0
+  0  13821 02:16:24.02   0.5890A   3.0556   0.8092   0.7293  0.040  0.00   0.000      0.  0.852E+00  0.862E-01  0.817E-03  0.182E-04   44  39  23   21  27   8   30  31   2    0.000    0.000       0
+  0  13832 02:16:30.45   0.5830A   3.0878   0.8604  -0.7722  0.041  0.00   0.000      0.  0.851E+00  0.860E-01  0.796E-03  0.173E-04   44  39  31   21  28   8   21   9  10    0.000    0.000       0
+  0  13842 02:16:36.32   0.5920A   3.0401   0.7097   0.7396  0.042  0.00   0.000      0.  0.851E+00  0.857E-01  0.799E-03  0.198E-04   44  39  38   23  11  19   20  10   9    0.000    0.000       0
+  0  13852 02:16:42.30   0.6060A   2.9709   0.7558   0.7628  0.043  0.00   0.000      0.  0.850E+00  0.851E-01  0.811E-03  0.199E-04   44  39   6   32  14  29   30  13  26    0.000    0.000       0
+  0  13862 02:16:48.41   0.6130A   2.9364  -0.6896   0.7615  0.045  0.00   0.000      0.  0.849E+00  0.842E-01  0.821E-03  0.190E-04   44  11  37   23   6  35   31  13  31    0.000    0.000       0
+  0  13871 02:16:54.03   0.6340A   2.8383   0.7312  -0.6913  0.046  0.00   0.000      0.  0.849E+00  0.833E-01  0.852E-03  0.189E-04   44   2  14   27  13  36   38  34  14    0.000    0.000       0
+  0  13881 02:17:00.37   0.6360A   2.8313   0.8258  -0.7452  0.047  0.00   0.000      0.  0.848E+00  0.821E-01  0.862E-03  0.188E-04   44   2  21   28  14   2   37  34  20    0.000    0.000       0
+  0  13890 02:17:06.11   0.6330A   2.8440   0.8226   0.7744  0.046  0.00   0.000      0.  0.847E+00  0.811E-01  0.864E-03  0.198E-04   43  37  33   28  15   5   34  32   1    0.000    0.000       0
+  0  13900 02:17:12.42   0.6270A   2.8726  -0.8558   0.7724  0.046  0.00   0.000      0.  0.847E+00  0.802E-01  0.866E-03  0.234E-04   45  14  14   19   9   9   35  32   5    0.000    0.000       0
+  0  13909 02:17:18.06   0.6230A   2.8912  -0.7399   0.7401  0.045  0.00   0.000      0.  0.846E+00  0.797E-01  0.863E-03  0.250E-04   45  14  20   19   9   9   35  32   8    0.000    0.000       0
+  0  13919 02:17:24.32   0.6300A   2.8593   0.7684  -0.7330  0.044  0.00   0.000      0.  0.846E+00  0.792E-01  0.867E-03  0.268E-04   46  14  27   22  16   4   24   9  30    0.000    0.000       0
+  0  13928 02:17:30.04   0.6410A   2.8102  -0.7754  -0.8829  0.043  0.00   0.000      0.  0.845E+00  0.789E-01  0.885E-03  0.288E-04   46  13  33   37  29   6   24   9  33    0.000    0.000       0
+  0  13938 02:17:36.54   0.6550A   2.7492   0.7578  -0.8777  0.044  0.00   0.000      0.  0.844E+00  0.788E-01  0.917E-03  0.296E-04   45  33   8   35  30  33   23   8  37    0.000    0.000       0
+  0  13947 02:17:42.44   0.6630A   2.7167   0.7231  -0.8129  0.044  0.00   0.000      0.  0.843E+00  0.789E-01  0.936E-03  0.296E-04   46  33  15   35  30  37   22   8   1    0.000    0.000       0
+  0  13956 02:17:48.37   0.6530A   2.7567  -0.7878   0.8502  0.044  0.00   0.000      0.  0.842E+00  0.790E-01  0.924E-03  0.291E-04   44  33  21   22   9   1   20  28   9    0.000    0.000       0
+  0  13965 02:17:54.28   0.6530A   2.7573  -0.7871   0.9787  0.045  0.00   0.000      0.  0.841E+00  0.790E-01  0.922E-03  0.273E-04   46   3  21   22   9   4   20  28   9    0.000    0.000       0
+  0  13974 02:18:00.12   0.6460A   2.7846  -0.7534   0.9349  0.047  0.00   0.000      0.  0.840E+00  0.789E-01  0.922E-03  0.250E-04   46   3  28   22   8   8   21  27   9    0.000    0.000       0
+  0  13984 02:18:06.54   0.6400A   2.8121  -0.8273   0.8795  0.048  0.00   0.000      0.  0.839E+00  0.787E-01  0.912E-03  0.231E-04   46   3  35   23  10  16   21  25   9    0.000    0.000       0
+  0  13993 02:18:12.30   0.6410A   2.8069  -0.8006   0.8001  0.049  0.00   0.000      0.  0.838E+00  0.785E-01  0.911E-03  0.234E-04   46   3   2   20   3  11   20  26   9    0.000    0.000       0
+  0  14002 02:18:18.08   0.6410A   2.8092   0.7968  -0.8060  0.050  0.00   0.000      0.  0.837E+00  0.783E-01  0.910E-03  0.236E-04   46   4   9   21  20   8   21   8  23    0.000    0.000       0
+  0  14012 02:18:24.46   0.6380A   2.8214   0.8824  -0.8112  0.051  0.00   0.000      0.  0.836E+00  0.779E-01  0.906E-03  0.214E-04   46   4  17   24  16  24   18   7  30    0.000    0.000       0
+  0  14021 02:18:30.21   0.6410A   2.8101   0.9371  -0.8668  0.053  0.00   0.000      0.  0.835E+00  0.773E-01  0.904E-03  0.222E-04   46   4  23   23  17  26   18   7  33    0.000    0.000       0
+  0  14030 02:18:36.02   0.6510A   2.7668  -1.0846  -0.8069  0.054  0.00   0.000      0.  0.834E+00  0.767E-01  0.907E-03  0.251E-04   46   4  30   19  10   9   17   5  22    0.000    0.000       0
+  0  14040 02:18:42.52   0.6490A   2.7720  -1.0245  -0.8421  0.055  0.00   0.000      0.  0.832E+00  0.761E-01  0.889E-03  0.240E-04   42   4  18   19  10   9   16   7   0    0.000    0.000       0
+  0  14049 02:18:48.36   0.6500A   2.7709   0.8131  -0.8389  0.056  0.00   0.000      0.  0.832E+00  0.758E-01  0.866E-03  0.183E-04   42   4  25   22  19  34   16   3  31    0.000    0.000       0
+  0  14058 02:18:54.21   0.6480A   2.7761   0.7930  -0.8370  0.057  0.00   0.000      0.  0.831E+00  0.756E-01  0.849E-03  0.186E-04   44   5  10    7  16   9   16   3  35    0.000    0.000       0
+  0  14067 02:19:00.05   0.6500A   2.7710   0.7870  -0.7860  0.057  0.00   0.000      0.  0.830E+00  0.755E-01  0.841E-03  0.193E-04   44   5  16   39   1  18   12   5  36    0.000    0.000       0
+  0  14077 02:19:06.47   0.6340A   2.8374   0.8143   0.8563  0.057  0.00   0.000      0.  0.830E+00  0.754E-01  0.810E-03  0.193E-04   46   2  28   39   2  23   20  11   9    0.000    0.000       0
+  0  14086 02:19:12.20   0.6360A   2.8291   0.7585   0.7587  0.057  0.00   0.000      0.  0.829E+00  0.752E-01  0.802E-03  0.191E-04   46   6  36   39   4  27   20  11   9    0.000    0.000       0
+  0  14096 02:19:18.57   0.6370A   2.8272  -0.9177   0.7385  0.056  0.00   0.000      0.  0.829E+00  0.750E-01  0.797E-03  0.184E-04   46   6   3   19  28   9   21  27   9    0.000    0.000       0
+  0  14105 02:19:24.32   0.6380A   2.8199  -0.9528   0.7343  0.056  0.00   0.000      0.  0.828E+00  0.748E-01  0.794E-03  0.177E-04   46   6  10   19  27   9   20  10   9    0.000    0.000       0
+  0  14114 02:19:30.02   0.6270A   2.8700  -0.9647  -0.6954  0.055  0.00   0.000      0.  0.828E+00  0.746E-01  0.779E-03  0.165E-04   46   6  17   18  27   9   11   6  25    0.000    0.000       0
+  0  14124 02:19:36.18   0.6070A   2.9661  -0.8922  -0.7022  0.055  0.00   0.000      0.  0.827E+00  0.744E-01  0.751E-03  0.165E-04   45   6  24   18  26   9   17  17   9    0.000    0.000       0
+  0  14134 02:19:42.19   0.5980A   3.0117  -0.8209  -0.6703  0.056  0.00   0.000      0.  0.827E+00  0.743E-01  0.731E-03  0.158E-04   45   6  32   18  25   9   25  14  16    0.000    0.000       0
+  0  14144 02:19:48.19   0.6040A   2.9825   0.9024  -0.6113  0.055  0.00   0.000      0.  0.826E+00  0.743E-01  0.731E-03  0.166E-04   45   6  39   13  13   9   23  14  19    0.000    0.000       0
+  0  14154 02:19:54.34   0.6210A   2.8995   0.9572   0.6634  0.055  0.00   0.000      0.  0.826E+00  0.744E-01  0.747E-03  0.200E-04   46   5   6   14  14   9   16  10   9    0.000    0.000       0
+  0  14164 02:20:00.61   0.6300A   2.8550   0.9513   0.7403  0.054  0.00   0.000      0.  0.825E+00  0.748E-01  0.754E-03  0.206E-04   46   5  13   14  15   9   17  12   9    0.000    0.000       0
+  0  14173 02:20:06.29   0.6290A   2.8614   0.8850   0.8880  0.053  0.00   0.000      0.  0.824E+00  0.753E-01  0.759E-03  0.225E-04   46   4  19   14  16   9   20  28   9    0.000    0.000       0
+  0  14183 02:20:12.57   0.6240A   2.8860  -0.9479   0.8116  0.051  0.00   0.000      0.  0.824E+00  0.758E-01  0.749E-03  0.231E-04   46  38  17   21  12   8   20  26   9    0.000    0.000       0
+  0  14192 02:20:18.25   0.6390A   2.8184  -0.8225   0.7608  0.050  0.00   0.000      0.  0.823E+00  0.761E-01  0.760E-03  0.228E-04   46   4  34   20  12   8   20  26   9    0.000    0.000       0
+  0  14202 02:20:24.64   0.6400A   2.8111  -0.7681   0.7882  0.050  0.00   0.000      0.  0.823E+00  0.765E-01  0.769E-03  0.246E-04   43   0  35   20  12   8   20  26   9    0.000    0.000       0
+  0  14211 02:20:30.30   0.6240A   2.8857  -0.7754   0.7730  0.050  0.00   0.000      0.  0.823E+00  0.767E-01  0.756E-03  0.239E-04   43   0   2   13  27   9   20  26   9    0.000    0.000       0
+  0  14221 02:20:36.52   0.6160A   2.9231  -0.7682  -0.7216  0.050  0.00   0.000      0.  0.822E+00  0.768E-01  0.746E-03  0.219E-04   44  38  12   14  26   9   15  15   8    0.000    0.000       0
+  0  14230 02:20:42.05   0.6140A   2.9331   0.8299   0.7430  0.051  0.00   0.000      0.  0.822E+00  0.767E-01  0.744E-03  0.206E-04   44  38  19   21  29   8   20  27   9    0.000    0.000       0
+  0  14240 02:20:48.11   0.6100A   2.9523   0.9122  -0.7329  0.053  0.00   0.000      0.  0.821E+00  0.765E-01  0.739E-03  0.202E-04   44  38  25   20  29   8   16  17   9    0.000    0.000       0
+  0  14250 02:20:54.20   0.6150A   2.9283   0.7366  -0.8449  0.054  0.00   0.000      0.  0.821E+00  0.762E-01  0.744E-03  0.198E-04   44  38  32   20  30   8   16  19   9    0.000    0.000       0
+  0  14260 02:21:00.42   0.6220A   2.8951  -0.7479  -0.9130  0.055  0.00   0.000      0.  0.820E+00  0.760E-01  0.747E-03  0.194E-04   46  35  34   19  13   9   14  20   9    0.000    0.000       0
+  0  14270 02:21:06.59   0.6140A   2.9334   0.7451  -0.9292  0.057  0.00   0.000      0.  0.820E+00  0.759E-01  0.738E-03  0.196E-04   46  34   0   19  21   9   16  17   9    0.000    0.000       0
+  0  14279 02:21:12.15   0.6200A   2.9033  -0.7389  -0.8732  0.057  0.00   0.000      0.  0.819E+00  0.760E-01  0.743E-03  0.194E-04   46  34   6   16  26   9   16  19   9    0.000    0.000       0
+  0  14289 02:21:18.39   0.6260A   2.8774  -0.7322   0.8793  0.058  0.00   0.000      0.  0.819E+00  0.761E-01  0.745E-03  0.199E-04   44  23   7   16  24   9   20  28   9    0.000    0.000       0
+  0  14298 02:21:24.07   0.6270A   2.8722  -0.7850   0.8643  0.057  0.00   0.000      0.  0.818E+00  0.763E-01  0.744E-03  0.226E-04   44   9   5   19  26   9   21  27   9    0.000    0.000       0
+  0  14308 02:21:30.30   0.6220A   2.8943  -0.8530   0.7878  0.056  0.00   0.000      0.  0.818E+00  0.766E-01  0.742E-03  0.256E-04   44   9  13   19  25   9   20  29   9    0.000    0.000       0
+  0  14318 02:21:36.47   0.6130A   2.9365  -0.8215   0.8631  0.055  0.00   0.000      0.  0.817E+00  0.769E-01  0.737E-03  0.269E-04   44   9  20   19  24   9   20  28   9    0.000    0.000       0
+  0  14328 02:21:42.58   0.6080A   2.9614  -0.8575   0.7816  0.055  0.00   0.000      0.  0.817E+00  0.770E-01  0.729E-03  0.246E-04   44   9  28   19  23   9   20  28   9    0.000    0.000       0
+  0  14337 02:21:48.02   0.6050A   2.9765   0.8543   0.6918  0.055  0.00   0.000      0.  0.816E+00  0.770E-01  0.723E-03  0.235E-04   44   9  34   10  15   9   39  35  23    0.000    0.000       0
+  0  14347 02:21:54.01   0.5980A   3.0095   0.8998   0.6643  0.055  0.00   0.000      0.  0.816E+00  0.769E-01  0.706E-03  0.210E-04   44   9   2   10  15   8   40  35  27    0.000    0.000       0
+  0  14357 02:22:00.02   0.6020A   2.9896   0.9121   0.6284  0.056  0.00   0.000      0.  0.816E+00  0.766E-01  0.704E-03  0.198E-04   44   9   9    9  16   8   40  36  32    0.000    0.000       0
+  0  14367 02:22:06.10   0.6110A   2.9484   0.7668   0.6777  0.056  0.00   0.000      0.  0.816E+00  0.762E-01  0.714E-03  0.203E-04   44   0  30    8  16   8   21  18   9    0.000    0.000       0
+  0  14377 02:22:12.20   0.6100A   2.9492   0.7751   0.6945  0.057  0.00   0.000      0.  0.815E+00  0.759E-01  0.716E-03  0.211E-04   44   0  37   20  16   9   21  17   9    0.000    0.000       0
+  0  14387 02:22:18.33   0.6170A   2.9155  -0.7862   0.7246  0.057  0.00   0.000      0.  0.815E+00  0.755E-01  0.728E-03  0.227E-04   44  10  32   20  10   9   20  16   9    0.000    0.000       0
+  0  14397 02:22:24.49   0.6190A   2.9087  -0.7863   0.7039  0.058  0.00   0.000      0.  0.815E+00  0.752E-01  0.733E-03  0.238E-04   44  10  39   26  16  21   20  10   3    0.000    0.000       0
+  0  14406 02:22:30.03   0.6140A   2.9306  -0.7764   0.7183  0.058  0.00   0.000      0.  0.815E+00  0.750E-01  0.730E-03  0.237E-04   44  10   6   26  16  24   20  11   5    0.000    0.000       0
+  0  14416 02:22:36.18   0.6150A   2.9259   0.8582   0.8338  0.059  0.00   0.000      0.  0.814E+00  0.749E-01  0.741E-03  0.264E-04   44  10  14   20  23   8   20  10   9    0.000    0.000       0
+  0  14426 02:22:42.30   0.6080A   2.9617   0.7893   0.9989  0.059  0.00   0.000      0.  0.814E+00  0.748E-01  0.734E-03  0.250E-04   46   3  32   18  10   8   21  12   9    0.000    0.000       0
+  0  14436 02:22:48.32   0.6000A   2.9982   0.9058  -0.9435  0.059  0.00   0.000      0.  0.814E+00  0.747E-01  0.721E-03  0.225E-04   45   4   9   17  14   9   14  11   9    0.000    0.000       0
+  0  14446 02:22:54.30   0.5890A   3.0583   1.0724  -0.8882  0.059  0.00   0.000      0.  0.813E+00  0.745E-01  0.703E-03  0.211E-04   46   5  16   19  14   9   14  12   9    0.000    0.000       0
+  0  14456 02:23:00.09   0.5730A   3.1419   1.0740  -0.7903  0.059  0.00   0.000      0.  0.813E+00  0.743E-01  0.673E-03  0.197E-04   45   5  23   19  15   9   13  13   9    0.000    0.000       0
+  0  14467 02:23:06.39   0.5820A   3.0947   0.9128   0.7560  0.059  0.00   0.000      0.  0.813E+00  0.741E-01  0.682E-03  0.213E-04   46   5  31   18  16   9   20  11   9    0.000    0.000       0
+  0  14477 02:23:12.31   0.5920A   3.0404   0.8302   0.7378  0.059  0.00   0.000      0.  0.812E+00  0.740E-01  0.694E-03  0.227E-04   45   6  38   20  21   8   20  11   9    0.000    0.000       0
+  0  14487 02:23:18.19   0.5900A   3.0483  -0.7154   0.6934  0.059  0.00   0.000      0.  0.812E+00  0.740E-01  0.693E-03  0.230E-04   45   2   1   21  21   8   20  12   9    0.000    0.000       0
+  0  14497 02:23:24.14   0.6020A   2.9908  -0.8877  -0.6664  0.060  0.00   0.000      0.  0.812E+00  0.738E-01  0.706E-03  0.233E-04   44   1   4   20  10   9   21  12   4    0.000    0.000       0
+  0  14507 02:23:30.10   0.5980A   3.0116  -1.0946   0.8164  0.061  0.00   0.000      0.  0.811E+00  0.736E-01  0.708E-03  0.255E-04   44   1  11   19  10   9   20  12   9    0.000    0.000       0
+  0  14517 02:23:36.16   0.6050A   2.9762  -1.0161  -0.9100  0.060  0.00   0.000      0.  0.811E+00  0.733E-01  0.711E-03  0.242E-04   44  11  39   18  10   9   17  13   9    0.000    0.000       0
+  0  14527 02:23:42.15   0.5970A   3.0145   0.8812   0.9798  0.060  0.00   0.000      0.  0.810E+00  0.729E-01  0.684E-03  0.194E-04   44  11   7   14  16   8   18  10   8    0.000    0.000       0
+  0  14537 02:23:48.19   0.6050A   2.9752   0.8636   0.9533  0.059  0.00   0.000      0.  0.810E+00  0.724E-01  0.675E-03  0.179E-04   43  11  12   14  18   8   19  10   8    0.000    0.000       0
+  0  14547 02:23:54.25   0.6000A   3.0011   0.7771  -0.7446  0.058  0.00   0.000      0.  0.809E+00  0.719E-01  0.665E-03  0.192E-04   44   3  35   12  18   8   14  15   9    0.000    0.000       0
+  0  14557 02:24:00.27   0.6040A   2.9822   0.7728  -0.7009  0.058  0.00   0.000      0.  0.809E+00  0.717E-01  0.665E-03  0.202E-04   44  12  30   12  17   8   14  16   9    0.000    0.000       0
+  0  14567 02:24:06.37   0.6110A   2.9456   0.7547   0.6843  0.057  0.00   0.000      0.  0.809E+00  0.715E-01  0.669E-03  0.216E-04   43  12  36   11  18   8   20  27   9    0.000    0.000       0
+  0  14577 02:24:12.50   0.6180A   2.9132   0.7104   0.8241  0.057  0.00   0.000      0.  0.809E+00  0.713E-01  0.676E-03  0.238E-04   43  13   2   10  21   7   20  28   9    0.000    0.000       0
+  0  14586 02:24:18.10   0.6260A   2.8765   0.7410   0.7713  0.058  0.00   0.000      0.  0.809E+00  0.712E-01  0.688E-03  0.250E-04   46  15   1   46  10   7   20  27   9    0.000    0.000       0
+  0  14596 02:24:24.28   0.6130A   2.9351  -0.7770   0.7296  0.059  0.00   0.000      0.  0.809E+00  0.710E-01  0.677E-03  0.231E-04   43   4  33   14  27   9   20  27   9    0.000    0.000       0
+  0  14606 02:24:30.47   0.6260A   2.8755  -0.7942   0.7922  0.059  0.00   0.000      0.  0.809E+00  0.708E-01  0.696E-03  0.215E-04   46  12  17   13  26   9   20  28   9    0.000    0.000       0
+  0  14615 02:24:36.08   0.6230A   2.8877   0.8795   0.8081  0.060  0.00   0.000      0.  0.808E+00  0.706E-01  0.697E-03  0.198E-04   44  18  20   21  29   8   20  28   9    0.000    0.000       0
+  0  14625 02:24:42.32   0.6240A   2.8826   0.8417  -0.7725  0.061  0.00   0.000      0.  0.808E+00  0.703E-01  0.699E-03  0.176E-04   44  18  28   21  30   8    5  21   7    0.000    0.000       0
+  0  14635 02:24:48.53   0.6140A   2.9335  -0.7483  -0.7698  0.061  0.00   0.000      0.  0.808E+00  0.698E-01  0.688E-03  0.181E-04   43  17  34   12  27   9    4  21   7    0.000    0.000       0
+  0  14644 02:24:54.02   0.6110A   2.9463  -0.7876  -0.7312  0.060  0.00   0.000      0.  0.808E+00  0.694E-01  0.687E-03  0.212E-04   43  17   0   13  26   9    3  21   7    0.000    0.000       0
+  0  14654 02:25:00.10   0.6140A   2.9315  -0.7716  -0.7781  0.060  0.00   0.000      0.  0.807E+00  0.691E-01  0.690E-03  0.212E-04   46   7  34   13  25   9   37   0  16    0.000    0.000       0
+  0  14664 02:25:06.29   0.6230A   2.8893   0.7170   0.8056  0.061  0.00   0.000      0.  0.807E+00  0.686E-01  0.695E-03  0.210E-04   46  18  30   14  14   9   20  12   9    0.000    0.000       0
+  0  14674 02:25:12.56   0.6300A   2.8593   0.7092  -0.8509  0.061  0.00   0.000      0.  0.807E+00  0.681E-01  0.693E-03  0.206E-04   44  15  27   15  14   9   34   7   1    0.000    0.000       0
+  0  14683 02:25:18.27   0.6360A   2.8283   0.6600   0.7603  0.061  0.00   0.000      0.  0.806E+00  0.677E-01  0.692E-03  0.207E-04   44  16   9   14  15   9   20  12   9    0.000    0.000       0
+  0  14693 02:25:24.61   0.6330A   2.8438  -0.6554   0.7194  0.061  0.00   0.000      0.  0.806E+00  0.673E-01  0.682E-03  0.205E-04   44  14  38   12  25   9   20  13   9    0.000    0.000       0
+  0  14702 02:25:30.31   0.6320A   2.8467  -0.6711  -0.7395  0.061  0.00   0.000      0.  0.806E+00  0.670E-01  0.677E-03  0.206E-04   44  14   5   12  25   9   37   7  25    0.000    0.000       0
+  0  14711 02:25:36.01   0.6320A   2.8488  -0.6565  -0.7594  0.060  0.00   0.000      0.  0.805E+00  0.667E-01  0.674E-03  0.211E-04   44  15  12   20  28   9   37   7  30    0.000    0.000       0
+  0  14721 02:25:42.34   0.6350A   2.8341   0.7626  -0.7940  0.059  0.00   0.000      0.  0.805E+00  0.664E-01  0.671E-03  0.216E-04   44  15  19   17  13   9   36   7  36    0.000    0.000       0
+  0  14730 02:25:48.03   0.6260A   2.8739   0.7828  -0.7067  0.059  0.00   0.000      0.  0.805E+00  0.662E-01  0.654E-03  0.203E-04   43  20  19   17  13   9   36   6   1    0.000    0.000       0
+  0  14740 02:25:54.30   0.6270A   2.8702   0.8271  -0.6445  0.058  0.00   0.000      0.  0.805E+00  0.660E-01  0.652E-03  0.199E-04   43  20  25   20  29   8   35   6   7    0.000    0.000       0
+  0  14750 02:26:00.58   0.6320A   2.8493   0.7458  -0.6031  0.058  0.00   0.000      0.  0.804E+00  0.658E-01  0.655E-03  0.204E-04   46  16   9   20  30   8    5  18   9    0.000    0.000       0
+  0  14759 02:26:06.25   0.6240A   2.8852   0.7987   0.5651  0.058  0.00   0.000      0.  0.804E+00  0.656E-01  0.641E-03  0.203E-04   44  18  23   20  31   9   27  28   2    0.000    0.000       0
+  0  14769 02:26:12.38   0.6010A   2.9935  -0.6904   0.5902  0.058  0.00   0.000      0.  0.804E+00  0.655E-01  0.615E-03  0.195E-04   44  18  30   27   1  18   28  28   4    0.000    0.000       0
+  0  14779 02:26:18.33   0.5930A   3.0345   0.8266   0.6176  0.058  0.00   0.000      0.  0.804E+00  0.654E-01  0.607E-03  0.190E-04   44  18  38   20  23   8   27  35  15    0.000    0.000       0
+  0  14789 02:26:24.17   0.5800A   3.1042   0.7621  -0.7333  0.058  0.00   0.000      0.  0.804E+00  0.653E-01  0.596E-03  0.184E-04   44  18   5   20  24   9   17  18   9    0.000    0.000       0
+  0  14799 02:26:30.08   0.5990A   3.0039  -0.7175  -0.8910  0.058  0.00   0.000      0.  0.805E+00  0.652E-01  0.621E-03  0.197E-04   46  16   5   15  26   9   17  19   9    0.000    0.000       0
+  0  14809 02:26:36.06   0.6000A   2.9997  -0.7821  -0.8570  0.059  0.00   0.000      0.  0.805E+00  0.650E-01  0.629E-03  0.214E-04   46  16  12   15  24   9   16  17   9    0.000    0.000       0
+  0  14819 02:26:42.08   0.6010A   2.9926  -0.7805   0.9092  0.058  0.00   0.000      0.  0.805E+00  0.649E-01  0.637E-03  0.244E-04   46  16  19   14  26   9   20  11   9    0.000    0.000       0
+  0  14829 02:26:48.10   0.6030A   2.9829  -0.8274   0.7993  0.058  0.00   0.000      0.  0.806E+00  0.647E-01  0.642E-03  0.247E-04   46  16  27   13  25   9   20  12   9    0.000    0.000       0
+  0  14839 02:26:54.14   0.6040A   2.9809  -0.8092   0.6862  0.057  0.00   0.000      0.  0.806E+00  0.643E-01  0.641E-03  0.220E-04   46  16  35   12  25   9   20  29   9    0.000    0.000       0
+  0  14849 02:27:00.18   0.6030A   2.9859   0.8005  -0.7210  0.056  0.00   0.000      0.  0.806E+00  0.637E-01  0.638E-03  0.196E-04   45  20  30   19  14   9    6  28   9    0.000    0.000       0
+  0  14859 02:27:06.13   0.5910A   3.0468  -0.7905  -0.7504  0.056  0.00   0.000      0.  0.806E+00  0.630E-01  0.627E-03  0.202E-04   45  20  37    9  24   9    5  27   9    0.000    0.000       0
+  0  14870 02:27:12.57   0.5900A   3.0483   0.7718  -0.7104  0.055  0.00   0.000      0.  0.807E+00  0.624E-01  0.628E-03  0.213E-04   45  20   5   21  28   8    4  27   9    0.000    0.000       0
+  0  14880 02:27:18.56   0.6070A   2.9673  -0.7506  -0.6438  0.054  0.00   0.000      0.  0.807E+00  0.619E-01  0.647E-03  0.216E-04   46  20  14   26   5  37    6  28   9    0.000    0.000       0
+  0  14890 02:27:24.60   0.6010A   2.9955  -0.7066  -0.6400  0.054  0.00   0.000      0.  0.807E+00  0.615E-01  0.640E-03  0.217E-04   46  26  32   26   5   1    3  27   9    0.000    0.000       0
+  0  14899 02:27:30.06   0.6070A   2.9632  -0.7333   0.7749  0.054  0.00   0.000      0.  0.808E+00  0.611E-01  0.642E-03  0.219E-04   46  16   6    8  24   8   22  29   7    0.000    0.000       0
+  0  14909 02:27:36.17   0.6090A   2.9550  -0.7535   0.7652  0.054  0.00   0.000      0.  0.808E+00  0.608E-01  0.643E-03  0.226E-04   46  28   4   27   4  11   20  28   9    0.000    0.000       0
+  0  14919 02:27:42.28   0.6160A   2.9236   0.7434   0.8208  0.054  0.00   0.000      0.  0.808E+00  0.604E-01  0.647E-03  0.238E-04   46  16  22   22  17   7   20  28   9    0.000    0.000       0
+  0  14929 02:27:48.47   0.6200A   2.9054  -0.7928   0.8956  0.055  0.00   0.000      0.  0.808E+00  0.600E-01  0.650E-03  0.230E-04   44  29  18   19  27   9   21  26   9    0.000    0.000       0
+  0  14939 02:27:54.57   0.6040A   2.9814   0.7806   0.9101  0.056  0.00   0.000      0.  0.808E+00  0.596E-01  0.634E-03  0.231E-04   44  29  25   21  17  11   21  25   9    0.000    0.000       0
+  0  14948 02:28:00.08   0.6220A   2.8949   0.8658  -0.9423  0.058  0.00   0.000      0.  0.808E+00  0.592E-01  0.659E-03  0.251E-04   44  29  31   20  16   9   18  14   9    0.000    0.000       0
+  0  14958 02:28:06.34   0.6280A   2.8658  -0.8403  -1.0648  0.059  0.00   0.000      0.  0.807E+00  0.586E-01  0.663E-03  0.242E-04   46  17  17   13  26   9   17  14   9    0.000    0.000       0
+  0  14967 02:28:12.02   0.6330A   2.8435  -0.7821  -1.0508  0.059  0.00   0.000      0.  0.807E+00  0.579E-01  0.666E-03  0.232E-04   45  28   1   13  24   9   16  14   9    0.000    0.000       0
+  0  14977 02:28:18.34   0.6330A   2.8434  -0.7820  -0.9666  0.059  0.00   0.000      0.  0.807E+00  0.572E-01  0.665E-03  0.217E-04   45  28   8   13  26   9   16  11   9    0.000    0.000       0
+  0  14986 02:28:24.04   0.6330A   2.8420  -0.7835  -0.9426  0.059  0.00   0.000      0.  0.807E+00  0.566E-01  0.663E-03  0.206E-04   45  17   2   12  25   9   15  11   9    0.000    0.000       0
+  0  14996 02:28:30.32   0.6220A   2.8917  -0.7627  -0.8615  0.059  0.00   0.000      0.  0.808E+00  0.561E-01  0.649E-03  0.202E-04   45  22  12   12  24   9   14  11   9    0.000    0.000       0
+  0  15006 02:28:36.51   0.6160A   2.9214   0.7511  -0.7729  0.058  0.00   0.000      0.  0.808E+00  0.557E-01  0.639E-03  0.180E-04   46  22  19   40  37   3   14  12   9    0.000    0.000       0
+  0  15015 02:28:42.08   0.6190A   2.9093   0.7085  -0.7117  0.058  0.00   0.000      0.  0.808E+00  0.555E-01  0.640E-03  0.186E-04   46  28  38   40  38   7   14  12   9    0.000    0.000       0
+  0  15025 02:28:48.32   0.6270A   2.8719   0.7306  -0.6102  0.057  0.00   0.000      0.  0.808E+00  0.553E-01  0.643E-03  0.206E-04   46  28   5   19  14   9   12  14   9    0.000    0.000       0
+  0  15035 02:28:54.59   0.6290A   2.8605  -0.7071   0.7155  0.057  0.00   0.000      0.  0.808E+00  0.552E-01  0.644E-03  0.234E-04   46  28  16   41  22  33   20  27   9    0.000    0.000       0
+  0  15044 02:29:00.31   0.6390A   2.8178  -0.7485   0.7550  0.057  0.00   0.000      0.  0.808E+00  0.550E-01  0.656E-03  0.255E-04   44  29  23   17  27   9   20  26   9    0.000    0.000       0
+  0  15053 02:29:06.05   0.6380A   2.8203  -0.8837   0.7522  0.057  0.00   0.000      0.  0.809E+00  0.549E-01  0.660E-03  0.266E-04   46  16  19   20  13   9   22  26   9    0.000    0.000       0
+  0  15063 02:29:12.42   0.6370A   2.8245  -0.7552  -0.7686  0.059  0.00   0.000      0.  0.809E+00  0.547E-01  0.660E-03  0.256E-04   45  17  23   16  25   9   17  14   9    0.000    0.000       0
+  0  15072 02:29:18.14   0.6340A   2.8378   0.8160  -0.7477  0.059  0.00   0.000      0.  0.809E+00  0.546E-01  0.658E-03  0.252E-04   46  16  33   40  39   5   16  14   9    0.000    0.000       0
+  0  15082 02:29:24.48   0.6350A   2.8356   0.8160  -0.8213  0.060  0.00   0.000      0.  0.809E+00  0.545E-01  0.656E-03  0.232E-04   46  20  39   40   0  11   17  19   9    0.000    0.000       0
+  0  15091 02:29:30.17   0.6310A   2.8526   0.8068  -0.8697  0.060  0.00   0.000      0.  0.809E+00  0.544E-01  0.651E-03  0.234E-04   46  20   6   40   1  16   16  19   9    0.000    0.000       0
+  0  15101 02:29:36.48   0.6300A   2.8577   0.6746   0.8175  0.060  0.00   0.000      0.  0.808E+00  0.544E-01  0.650E-03  0.241E-04   46  20  14   20  12   9   20  12   9    0.000    0.000       0
+  0  15110 02:29:42.17   0.6330A   2.8441   0.7161  -0.7392  0.059  0.00   0.000      0.  0.808E+00  0.543E-01  0.651E-03  0.227E-04   45   8   1   18  13   9   14  19   9    0.000    0.000       0
+  0  15120 02:29:48.50   0.6310A   2.8540   0.8478  -0.6489  0.059  0.00   0.000      0.  0.808E+00  0.541E-01  0.651E-03  0.230E-04   46  20  28   19  14   9   14  20   9    0.000    0.000       0
+  0  15129 02:29:54.15   0.6330A   2.8442   0.8734  -0.7013  0.059  0.00   0.000      0.  0.807E+00  0.539E-01  0.657E-03  0.247E-04   46  20  35   19  15   9   18  12   9    0.000    0.000       0
+  0  15139 02:30:00.45   0.6270A   2.8686   0.8129  -0.9139  0.059  0.00   0.000      0.  0.807E+00  0.536E-01  0.649E-03  0.225E-04   44  18  27   17  16   9   18  11   9    0.000    0.000       0
+  0  15148 02:30:06.03   0.6180A   2.9141   0.8241  -0.8495  0.059  0.00   0.000      0.  0.807E+00  0.533E-01  0.637E-03  0.217E-04   44  18  34   13  16   9   17  12   9    0.000    0.000       0
+  0  15158 02:30:12.21   0.6230A   2.8903   0.8063   0.7811  0.058  0.00   0.000      0.  0.807E+00  0.530E-01  0.640E-03  0.231E-04   44  18   1   13  17   9   20  28   9    0.000    0.000       0
+  0  15168 02:30:18.41   0.6200A   2.9024   0.8253   0.7712  0.056  0.00   0.000      0.  0.807E+00  0.527E-01  0.635E-03  0.258E-04   45  19  17   12  18   9   21  27   9    0.000    0.000       0
+  0  15177 02:30:24.03   0.6310A   2.8538  -0.8136   0.6753  0.055  0.00   0.000      0.  0.807E+00  0.526E-01  0.642E-03  0.263E-04   43   5   8   46  31  16   20  10   9    0.000    0.000       0
+  0  15187 02:30:30.29   0.6200A   2.9034  -0.7992   0.7382  0.054  0.00   0.000      0.  0.807E+00  0.525E-01  0.628E-03  0.263E-04   46  34  15   46  30  21   20  28   9    0.000    0.000       0
+  0  15197 02:30:36.48   0.6200A   2.9016  -0.7703   0.7248  0.054  0.00   0.000      0.  0.807E+00  0.524E-01  0.620E-03  0.245E-04   43   5  22   46  29  27   20  28   9    0.000    0.000       0
+  0  15206 02:30:42.13   0.6280A   2.8683   0.7380   0.7267  0.054  0.00   0.000      0.  0.807E+00  0.522E-01  0.620E-03  0.243E-04   43  18  36   20  27   8   20  28   9    0.000    0.000       0
+  0  15216 02:30:48.42   0.6300A   2.8562   0.8220   0.6544  0.054  0.00   0.000      0.  0.808E+00  0.520E-01  0.617E-03  0.243E-04   43  18   3   20  29   8   20  28   9    0.000    0.000       0
+  0  15225 02:30:54.11   0.6290A   2.8621   0.7231  -0.6642  0.055  0.00   0.000      0.  0.808E+00  0.516E-01  0.615E-03  0.231E-04   43  18  10   20  27   8   13  10   8    0.000    0.000       0
+  0  15235 02:31:00.37   0.6210A   2.9008   0.6470  -0.6903  0.056  0.00   0.000      0.  0.808E+00  0.512E-01  0.605E-03  0.222E-04   46  33   9   25  22  22   11  10   8    0.000    0.000       0
+  0  15244 02:31:06.02   0.6330A   2.8454   0.7033  -0.7137  0.056  0.00   0.000      0.  0.808E+00  0.508E-01  0.606E-03  0.208E-04   45  33  15   24  23  24   18  21   9    0.000    0.000       0
+  0  15254 02:31:12.28   0.6220A   2.8948   0.6681  -0.7207  0.056  0.00   0.000      0.  0.808E+00  0.503E-01  0.585E-03  0.177E-04   46  15  28   24  24  27   17  20   9    0.000    0.000       0
+  0  15264 02:31:18.49   0.6190A   2.9077   0.6599  -0.7292  0.056  0.00   0.000      0.  0.808E+00  0.499E-01  0.577E-03  0.180E-04   46  15  35   24  28  33   16  20   9    0.000    0.000       0
+  0  15273 02:31:24.09   0.6270A   2.8723   0.7070  -0.7094  0.056  0.00   0.000      0.  0.809E+00  0.497E-01  0.583E-03  0.196E-04   46  15   2   24  28  36   15  20   9    0.000    0.000       0
+  0  15283 02:31:30.38   0.6320A   2.8486   0.7260  -0.6413  0.057  0.00   0.000      0.  0.809E+00  0.496E-01  0.584E-03  0.191E-04   43  14   3   24  29  39    4  28   9    0.000    0.000       0
+  0  15292 02:31:36.07   0.6330A   2.8427  -0.6596  -0.6048  0.057  0.00   0.000      0.  0.809E+00  0.494E-01  0.584E-03  0.191E-04   43  14   9   20  10   9    4  27   9    0.000    0.000       0
+  0  15302 02:31:42.39   0.6260A   2.8748  -0.7011  -0.5910  0.056  0.00   0.000      0.  0.810E+00  0.493E-01  0.580E-03  0.203E-04   46  22   1   38  22   9   27  21  20    0.000    0.000       0
+  0  15312 02:31:48.60   0.6180A   2.9147  -0.7736  -0.6580  0.056  0.00   0.000      0.  0.810E+00  0.492E-01  0.577E-03  0.218E-04   46  22   8   38  21  14   17  23   9    0.000    0.000       0
+  0  15321 02:31:54.20   0.6290A   2.8616  -0.7791  -0.7114  0.056  0.00   0.000      0.  0.811E+00  0.493E-01  0.591E-03  0.237E-04   46  22  15   37  21  17   16  23   9    0.000    0.000       0
+  0  15331 02:32:00.49   0.6280A   2.8683  -0.7425  -0.6909  0.056  0.00   0.000      0.  0.811E+00  0.493E-01  0.589E-03  0.222E-04   44  12  39   37  20  22   15  23   9    0.000    0.000       0
+  0  15340 02:32:06.11   0.6270A   2.8726  -0.6735  -0.7407  0.057  0.00   0.000      0.  0.812E+00  0.494E-01  0.585E-03  0.220E-04   44  12   5   36  20  25   15  23   9    0.000    0.000       0
+  0  15350 02:32:12.35   0.6250A   2.8807  -0.6554  -0.7107  0.058  0.00   0.000      0.  0.812E+00  0.496E-01  0.582E-03  0.214E-04   46  21  39   36  19  30   14  23   9    0.000    0.000       0
+  0  15360 02:32:18.60   0.6210A   2.8969  -0.6572  -0.6673  0.059  0.00   0.000      0.  0.812E+00  0.497E-01  0.577E-03  0.202E-04   44  20   3   20  10   9   15  24   8    0.000    0.000       0
+  0  15369 02:32:24.16   0.6090A   2.9549  -0.7010  -0.6331  0.059  0.00   0.000      0.  0.813E+00  0.499E-01  0.564E-03  0.199E-04   43  11   1   20  10   9   24  20   1    0.000    0.000       0
+  0  15379 02:32:30.17   0.5950A   3.0254  -0.7371  -0.6614  0.060  0.00   0.000      0.  0.813E+00  0.501E-01  0.546E-03  0.176E-04   43  11   8   20  10   9   18  16   9    0.000    0.000       0
+  0  15389 02:32:36.09   0.6000A   2.9996   0.6816  -0.7420  0.061  0.00   0.000      0.  0.813E+00  0.503E-01  0.552E-03  0.178E-04   43  11  16   23  23  11   17  23   9    0.000    0.000       0
+  0  15399 02:32:42.25   0.6310A   2.8522   0.7268  -0.8538  0.061  0.00   0.000      0.  0.814E+00  0.503E-01  0.577E-03  0.179E-04   45  12  19   23  24  15   16  23   9    0.000    0.000       0
+  0  15409 02:32:48.50   0.6230A   2.8909   0.7680  -0.8814  0.061  0.00   0.000      0.  0.814E+00  0.504E-01  0.566E-03  0.187E-04   45  12  26   23  24  19   18  20   9    0.000    0.000       0
+  0  15418 02:32:54.07   0.6180A   2.9127   0.7449  -0.9724  0.061  0.00   0.000      0.  0.814E+00  0.505E-01  0.564E-03  0.200E-04   45  12  33   23  25  22   17  20   9    0.000    0.000       0
+  0  15428 02:33:00.24   0.6150A   2.9253   0.7709  -0.8385  0.059  0.00   0.000      0.  0.814E+00  0.507E-01  0.566E-03  0.210E-04   45  13   0   21  15   8   16  19   9    0.000    0.000       0
+  0  15438 02:33:06.37   0.6120A   2.9413   0.7198  -0.7045  0.057  0.00   0.000      0.  0.814E+00  0.510E-01  0.562E-03  0.207E-04   45  13   7   21  16   8   15  20   9    0.000    0.000       0
+  0  15448 02:33:12.50   0.6170A   2.9159   0.6658  -0.6495  0.055  0.00   0.000      0.  0.814E+00  0.513E-01  0.564E-03  0.201E-04   46  13  15   20  21   6   10  20   9    0.000    0.000       0
+  0  15457 02:33:18.05   0.6160A   2.9241  -0.8027  -0.6611  0.054  0.00   0.000      0.  0.814E+00  0.516E-01  0.570E-03  0.212E-04   44   9  21   19  10   9    7  19   8    0.000    0.000       0
+  0  15467 02:33:24.14   0.6070A   2.9655  -0.8137  -0.6828  0.054  0.00   0.000      0.  0.814E+00  0.521E-01  0.565E-03  0.213E-04   44   9  27   19  10   9    5  19   8    0.000    0.000       0
+  0  15477 02:33:30.15   0.6010A   2.9932  -0.7878  -0.6512  0.054  0.00   0.000      0.  0.814E+00  0.528E-01  0.567E-03  0.211E-04   45  10  32   20  10   9    4  19   8    0.000    0.000       0
+  0  15487 02:33:36.13   0.5970A   3.0132  -0.8711  -0.7576  0.054  0.00   0.000      0.  0.814E+00  0.535E-01  0.576E-03  0.236E-04   46  10  39   20  11   8   17  17   9    0.000    0.000       0
+  0  15497 02:33:42.11   0.5970A   3.0156  -0.9145  -1.1067  0.055  0.00   0.000      0.  0.814E+00  0.541E-01  0.575E-03  0.198E-04   43  11   9   20  12   9   16  17   9    0.000    0.000       0
+  0  15507 02:33:48.17   0.6130A   2.9380  -0.7568  -1.1645  0.057  0.00   0.000      0.  0.814E+00  0.544E-01  0.593E-03  0.206E-04   46  10   6   19  12   9   15  18   9    0.000    0.000       0
+  0  15517 02:33:54.25   0.6030A   2.9843  -0.6901  -1.0669  0.059  0.00   0.000      0.  0.814E+00  0.545E-01  0.585E-03  0.201E-04   45  11  18   45  18  16   17  20   9    0.000    0.000       0
+  0  15527 02:34:00.29   0.6060A   2.9683  -0.7230  -1.0556  0.059  0.00   0.000      0.  0.814E+00  0.545E-01  0.587E-03  0.202E-04   45  11  25   45  18  23   16  20   9    0.000    0.000       0
+  0  15537 02:34:06.38   0.6100A   2.9489  -0.7537  -1.0878  0.060  0.00   0.000      0.  0.814E+00  0.544E-01  0.585E-03  0.200E-04   46  11  33   44  14  26   16  21   9    0.000    0.000       0
+  0  15547 02:34:12.48   0.6080A   2.9610  -0.7545  -1.0150  0.060  0.00   0.000      0.  0.814E+00  0.543E-01  0.581E-03  0.205E-04   43  11   4   44  13  32   13  22   9    0.000    0.000       0
+  0  15557 02:34:18.44   0.5830A   3.0868  -0.7402  -0.9142  0.060  0.00   0.000      0.  0.814E+00  0.543E-01  0.560E-03  0.199E-04   43  11  10   43  14  37   11  22   9    0.000    0.000       0
+  0  15567 02:34:24.35   0.6040A   2.9794  -0.7492  -0.8676  0.061  0.00   0.000      0.  0.815E+00  0.544E-01  0.577E-03  0.214E-04   43  11  16   43  13   3    7  17   8    0.000    0.000       0
+  0  15577 02:34:30.47   0.6130A   2.9341   0.6716  -0.8022  0.061  0.00   0.000      0.  0.815E+00  0.545E-01  0.584E-03  0.236E-04   46   6  19    9  15   9    5  17   8    0.000    0.000       0
+  0  15587 02:34:36.58   0.6080A   2.9604  -0.6624  -0.7413  0.061  0.00   0.000      0.  0.816E+00  0.547E-01  0.582E-03  0.248E-04   46   6  27   40  16   2    5  13   9    0.000    0.000       0
+  0  15596 02:34:42.04   0.6050A   2.9758  -0.6658  -0.7645  0.061  0.00   0.000      0.  0.816E+00  0.549E-01  0.581E-03  0.244E-04   46   6  34   40  13   5   17  11   9    0.000    0.000       0
+  0  15606 02:34:48.10   0.6080A   2.9584  -0.6710  -0.8035  0.061  0.00   0.000      0.  0.817E+00  0.551E-01  0.584E-03  0.220E-04   46   6   2   39  13  11   16  11   9    0.000    0.000       0
+  0  15616 02:34:54.12   0.5990A   3.0028  -0.6617   0.8044  0.060  0.00   0.000      0.  0.817E+00  0.554E-01  0.588E-03  0.249E-04   44  12  16   39  12  16   20  27   9    0.000    0.000       0
+  0  15626 02:35:00.10   0.6040A   2.9820   0.6981   0.8292  0.061  0.00   0.000      0.  0.818E+00  0.557E-01  0.602E-03  0.240E-04   44  12  24   21  28   8   20  27   9    0.000    0.000       0
+  0  15636 02:35:06.18   0.6100A   2.9496  -0.6855  -0.9598  0.062  0.00   0.000      0.  0.818E+00  0.560E-01  0.627E-03  0.250E-04   44  12  31   20  16   9   17  20   9    0.000    0.000       0
+  0  15646 02:35:12.35   0.6230A   2.8880  -0.8289  -1.1201  0.063  0.00   0.000      0.  0.818E+00  0.562E-01  0.659E-03  0.266E-04   44  12  39   20  14   9   16  21   9    0.000    0.000       0
+  0  15656 02:35:18.62   0.6270A   2.8728   0.7005  -1.1778  0.063  0.00   0.000      0.  0.819E+00  0.562E-01  0.673E-03  0.258E-04   45  13   7   25  13   9   15  21   9    0.000    0.000       0
+  0  15665 02:35:24.25   0.6240A   2.8860  -0.7121  -1.1317  0.063  0.00   0.000      0.  0.819E+00  0.562E-01  0.678E-03  0.255E-04   45   8   7   12  38  39   14  22   9    0.000    0.000       0
+  0  15675 02:35:30.47   0.6190A   2.9072   0.8459  -1.0253  0.063  0.00   0.000      0.  0.819E+00  0.563E-01  0.687E-03  0.272E-04   44  13  25   25  13  13   13  22   9    0.000    0.000       0
+  0  15684 02:35:36.01   0.6150A   2.9285   0.9033  -0.9285  0.062  0.00   0.000      0.  0.820E+00  0.565E-01  0.694E-03  0.289E-04   46   9  21   24  13  15   13  23   9    0.000    0.000       0
+  0  15694 02:35:42.13   0.6080A   2.9586   0.9154  -0.9238  0.062  0.00   0.000      0.  0.820E+00  0.567E-01  0.696E-03  0.286E-04   45   9  30   21  18   8   14  23   9    0.000    0.000       0
+  0  15704 02:35:48.18   0.6040A   2.9798   1.0075  -0.8689  0.061  0.00   0.000      0.  0.820E+00  0.571E-01  0.695E-03  0.254E-04   46   9  38   21  19   8   13  23   9    0.000    0.000       0
+  0  15714 02:35:54.19   0.6010A   2.9971   0.8625  -0.8247  0.060  0.00   0.000      0.  0.820E+00  0.574E-01  0.693E-03  0.222E-04   43  14  10   20  23   8   12  22   9    0.000    0.000       0
+  0  15724 02:36:00.21   0.6030A   2.9865   0.9598  -0.7706  0.060  0.00   0.000      0.  0.820E+00  0.578E-01  0.698E-03  0.199E-04   46  10  14   24  14  33   11  22   9    0.000    0.000       0
+  0  15734 02:36:06.24   0.6060A   2.9726   0.9140   0.7280  0.060  0.00   0.000      0.  0.820E+00  0.584E-01  0.701E-03  0.186E-04   46  10  21   24  15  37   20  28   8    0.000    0.000       0
+  0  15744 02:36:12.28   0.6050A   2.9731   0.9422   0.7517  0.061  0.00   0.000      0.  0.820E+00  0.591E-01  0.705E-03  0.193E-04   46  12  30   25  15   3   21  28   8    0.000    0.000       0
+  0  15754 02:36:18.37   0.6140A   2.9327   0.9218  -1.0009  0.061  0.00   0.000      0.  0.820E+00  0.599E-01  0.728E-03  0.199E-04   46   9  32   25  15   8   17  21   9    0.000    0.000       0
+  0  15764 02:36:24.57   0.6240A   2.8859   0.8773  -1.2402  0.062  0.00   0.000      0.  0.819E+00  0.606E-01  0.754E-03  0.214E-04   46  12   5   25  16  13   16  20   9    0.000    0.000       0
+  0  15773 02:36:30.21   0.6230A   2.8876   0.9749  -1.3041  0.062  0.00   0.000      0.  0.819E+00  0.612E-01  0.761E-03  0.234E-04   45  11   4   24  17  16   15  20   9    0.000    0.000       0
+  0  15783 02:36:36.43   0.6190A   2.9076   0.9586  -1.2098  0.062  0.00   0.000      0.  0.819E+00  0.617E-01  0.754E-03  0.241E-04   46  10  15   24  18  21   13  20   9    0.000    0.000       0
+  0  15792 02:36:42.01   0.6210A   2.8979   0.9174  -1.0693  0.062  0.00   0.000      0.  0.818E+00  0.621E-01  0.756E-03  0.229E-04   46  10  21   24  20  24   12  19   9    0.000    0.000       0
+  0  15802 02:36:48.23   0.6210A   2.8980   0.8689  -1.0053  0.062  0.00   0.000      0.  0.818E+00  0.624E-01  0.755E-03  0.213E-04   45  11  26   25  18  31   15  16   9    0.000    0.000       0
+  0  15812 02:36:54.44   0.6160A   2.9226  -0.8507  -0.8832  0.062  0.00   0.000      0.  0.818E+00  0.627E-01  0.750E-03  0.191E-04   46  12  35   18  13   9   14  15   9    0.000    0.000       0
+  0  15822 02:37:00.60   0.6160A   2.9210   0.8597  -0.7698  0.061  0.00   0.000      0.  0.817E+00  0.630E-01  0.748E-03  0.177E-04   46  12   2   26  17   0   14  19   9    0.000    0.000       0
+  0  15831 02:37:06.10   0.6100A   2.9505   0.8353  -0.7520  0.060  0.00   0.000      0.  0.817E+00  0.632E-01  0.745E-03  0.189E-04   46  11   9   26  18   4   14  20   9    0.000    0.000       0
+  0  15841 02:37:12.23   0.6220A   2.8922  -0.7965   0.8408  0.060  0.00   0.000      0.  0.816E+00  0.633E-01  0.769E-03  0.199E-04   46  11  16   11  14   8   19  10   8    0.000    0.000       0
+  0  15851 02:37:18.44   0.6200A   2.9019  -0.7478   0.8443  0.060  0.00   0.000      0.  0.816E+00  0.634E-01  0.785E-03  0.212E-04   46  34  21   10  13   8   20  10   9    0.000    0.000       0
+  0  15860 02:37:24.02   0.6130A   2.9342   0.7397  -0.7996  0.060  0.00   0.000      0.  0.815E+00  0.635E-01  0.792E-03  0.228E-04   43   0   8   21  18   6   16  24   9    0.000    0.000       0
+  0  15870 02:37:30.12   0.6070A   2.9666   0.8340  -0.8016  0.059  0.00   0.000      0.  0.815E+00  0.637E-01  0.791E-03  0.213E-04   45  21  25   21  15   4   16  24   9    0.000    0.000       0
+  0  15880 02:37:36.04   0.5780A   3.1133   0.8993  -0.7750  0.058  0.00   0.000      0.  0.814E+00  0.638E-01  0.754E-03  0.187E-04   46  20  33   20  22   8   16  25   9    0.000    0.000       0
+  0  15891 02:37:42.35   0.5780A   3.1167   0.8494  -0.8650  0.058  0.00   0.000      0.  0.814E+00  0.640E-01  0.763E-03  0.179E-04   46  20   1   21  17   6   15  36  39    0.000    0.000       0
+  0  15901 02:37:48.22   0.6090A   2.9579  -0.8011  -0.9121  0.057  0.00   0.000      0.  0.813E+00  0.643E-01  0.821E-03  0.240E-04   45  19   7   21  13   1   16  36   2    0.000    0.000       0
+  0  15911 02:37:54.32   0.6150A   2.9267   0.8050  -0.8296  0.055  0.00   0.000      0.  0.812E+00  0.648E-01  0.842E-03  0.285E-04   46  19  15   20  17   8   15  36   4    0.000    0.000       0
+  0  15921 02:38:00.54   0.6250A   2.8812  -0.7638  -0.7731  0.054  0.00   0.000      0.  0.812E+00  0.654E-01  0.860E-03  0.268E-04   46  38  32   20  11   4   15  36   7    0.000    0.000       0
+  0  15930 02:38:06.11   0.6120A   2.9405   0.7760  -0.7547  0.055  0.00   0.000      0.  0.811E+00  0.659E-01  0.851E-03  0.234E-04   44  39  35   20  23   9   16  10   9    0.000    0.000       0
+  0  15940 02:38:12.20   0.6100A   2.9518  -0.9831  -0.7520  0.056  0.00   0.000      0.  0.810E+00  0.663E-01  0.852E-03  0.229E-04   44  39   2   20  10   9   18  20   9    0.000    0.000       0
+  0  15950 02:38:18.28   0.6090A   2.9543  -0.8678  -0.9707  0.057  0.00   0.000      0.  0.809E+00  0.665E-01  0.845E-03  0.232E-04   44  39  10   20  15   8   17  19   9    0.000    0.000       0
+  0  15960 02:38:24.45   0.6240A   2.8865  -1.0857  -1.1512  0.058  0.00   0.000      0.  0.808E+00  0.665E-01  0.861E-03  0.250E-04   44  39  17   19  19   8   16  18   9    0.000    0.000       0
+  0  15969 02:38:30.08   0.6250A   2.8803  -0.9325  -1.0222  0.058  0.00   0.000      0.  0.807E+00  0.664E-01  0.855E-03  0.222E-04   43   0  38   18  15   9   15  18   9    0.000    0.000       0
+  0  15979 02:38:36.34   0.6250A   2.8790   0.9739  -0.9641  0.059  0.00   0.000      0.  0.806E+00  0.659E-01  0.847E-03  0.206E-04   45  39  36   21  30  11   16  23   9    0.000    0.000       0
+  0  15989 02:38:42.55   0.6170A   2.9172   1.0050  -0.9651  0.059  0.00   0.000      0.  0.804E+00  0.652E-01  0.824E-03  0.213E-04   46   6  18   21  31  13   16  25   9    0.000    0.000       0
+  0  15998 02:38:48.09   0.6140A   2.9301   0.9272  -0.9197  0.058  0.00   0.000      0.  0.803E+00  0.646E-01  0.824E-03  0.238E-04   45   0  11   21  32  16   17  23   9    0.000    0.000       0
+  0  16008 02:38:54.18   0.6050A   2.9754   0.8441  -0.8986  0.056  0.00   0.000      0.  0.802E+00  0.641E-01  0.813E-03  0.266E-04   44  36  39   21  33  19   16  23   9    0.000    0.000       0
+  0  16018 02:39:00.20   0.5980A   3.0123   0.8217   0.9030  0.055  0.00   0.000      0.  0.800E+00  0.638E-01  0.805E-03  0.276E-04   46  39  37   16  12   9   20  25   9    0.000    0.000       0
+  0  16028 02:39:06.20   0.6020A   2.9896   0.9129   1.1134  0.053  0.00   0.000      0.  0.799E+00  0.636E-01  0.808E-03  0.290E-04   46  39   4   15  13   9   20  27   9    0.000    0.000       0
+  0  16038 02:39:12.24   0.6000A   3.0019  -1.0550   1.0784  0.053  0.00   0.000      0.  0.798E+00  0.633E-01  0.802E-03  0.294E-04   46   0   9   20  10   9   20  25   9    0.000    0.000       0
+  0  16048 02:39:18.22   0.6010A   2.9958  -1.1066   0.9551  0.054  0.00   0.000      0.  0.797E+00  0.629E-01  0.801E-03  0.291E-04   46   0  16   18  10   9   20  26   9    0.000    0.000       0
+  0  16058 02:39:24.35   0.6170A   2.9190   0.9837  -1.3577  0.054  0.00   0.000      0.  0.796E+00  0.624E-01  0.813E-03  0.280E-04   42   0  21   17  18   9   16  16   9    0.000    0.000       0
+  0  16068 02:39:30.52   0.6190A   2.9061  -0.8406  -1.2729  0.054  0.00   0.000      0.  0.795E+00  0.617E-01  0.805E-03  0.274E-04   42   0  29   15  10   9   14  17   9    0.000    0.000       0
+  0  16077 02:39:36.13   0.6200A   2.9016  -0.7466  -1.3359  0.054  0.00   0.000      0.  0.794E+00  0.610E-01  0.795E-03  0.254E-04   45  38   5   14  10   9   13  17   8    0.000    0.000       0
+  0  16087 02:39:42.30   0.6160A   2.9235  -0.7464  -1.1080  0.054  0.00   0.000      0.  0.793E+00  0.603E-01  0.773E-03  0.239E-04   46  38  13   46  14  35   12  18   8    0.000    0.000       0
+  0  16097 02:39:48.44   0.6140A   2.9310   0.8157  -1.0101  0.054  0.00   0.000      0.  0.793E+00  0.598E-01  0.763E-03  0.238E-04   46  38  20   15  16   7    9  18   8    0.000    0.000       0
+  0  16107 02:39:54.56   0.6090A   2.9550   0.7528  -0.9680  0.053  0.00   0.000      0.  0.792E+00  0.595E-01  0.748E-03  0.234E-04   45  37  26   12  16   8    7  18   8    0.000    0.000       0
+  0  16116 02:40:00.03   0.6080A   2.9628   0.7544  -0.8941  0.053  0.00   0.000      0.  0.792E+00  0.594E-01  0.744E-03  0.226E-04   46  37  33   11  14   8    9  15   9    0.000    0.000       0
+  0  16126 02:40:06.09   0.6050A   2.9750  -0.7236  -0.8935  0.052  0.00   0.000      0.  0.792E+00  0.593E-01  0.741E-03  0.243E-04   46  37   0   20  21   8    8  19   8    0.000    0.000       0
+  0  16136 02:40:12.13   0.6040A   2.9814  -0.7683  -0.8332  0.052  0.00   0.000      0.  0.792E+00  0.594E-01  0.736E-03  0.240E-04   46  37   7   20  20   8    6  19   8    0.000    0.000       0
+  0  16146 02:40:18.18   0.6080A   2.9629   0.7185  -0.7834  0.053  0.00   0.000      0.  0.792E+00  0.594E-01  0.747E-03  0.249E-04   46  37  14    7  17   9    3  21   7    0.000    0.000       0
+  0  16156 02:40:24.26   0.6070A   2.9672   0.8029  -0.7620  0.054  0.00   0.000      0.  0.792E+00  0.594E-01  0.750E-03  0.237E-04   46  36  19   19  20   9    5  20   8    0.000    0.000       0
+  0  16166 02:40:30.35   0.6070A   2.9654   0.8695  -0.7914  0.055  0.00   0.000      0.  0.792E+00  0.593E-01  0.750E-03  0.217E-04   46  35  28   19  20   9   20  18   8    0.000    0.000       0
+  0  16176 02:40:36.44   0.6110A   2.9468  -0.8336  -0.6724  0.057  0.00   0.000      0.  0.791E+00  0.589E-01  0.757E-03  0.206E-04   46  35  35   19   8   9    3  11   9    0.000    0.000       0
+  0  16186 02:40:42.59   0.6140A   2.9294   0.7528  -0.7913  0.058  0.00   0.000      0.  0.791E+00  0.583E-01  0.766E-03  0.216E-04   45  35   5   19  19   9   16  16   9    0.000    0.000       0
+  0  16195 02:40:48.04   0.6030A   2.9839   0.8384  -1.0090  0.059  0.00   0.000      0.  0.791E+00  0.577E-01  0.752E-03  0.208E-04   44  32   2   19  19   9   16  15   9    0.000    0.000       0
+  0  16205 02:40:54.06   0.6000A   3.0008   0.8014  -1.1216  0.060  0.00   0.000      0.  0.791E+00  0.568E-01  0.742E-03  0.199E-04   43  30  11   19  20   9   15  15   9    0.000    0.000       0
+  0  16215 02:41:00.07   0.6000A   2.9991   0.7912  -1.0647  0.061  0.00   0.000      0.  0.790E+00  0.557E-01  0.733E-03  0.197E-04   44  31  16   46   7  16   14  15   9    0.000    0.000       0
+  0  16225 02:41:06.11   0.6090A   2.9562   0.7445  -0.9556  0.062  0.00   0.000      0.  0.790E+00  0.547E-01  0.727E-03  0.182E-04   45  32  22   20  30   9   12  15   9    0.000    0.000       0
+  0  16235 02:41:12.10   0.5970A   3.0151   0.7174  -0.9644  0.062  0.00   0.000      0.  0.790E+00  0.537E-01  0.707E-03  0.174E-04   46  32  28   38  10   6   17  19   9    0.000    0.000       0
+  0  16245 02:41:18.09   0.5910A   3.0476   0.7367  -0.9211  0.063  0.00   0.000      0.  0.789E+00  0.527E-01  0.695E-03  0.166E-04   43  29  34   38  10  11   16  18   9    0.000    0.000       0
+  0  16255 02:41:24.06   0.6060A   2.9685   0.7119  -0.8376  0.063  0.00   0.000      0.  0.789E+00  0.517E-01  0.707E-03  0.175E-04   43  29   1   38  12  15   13  19   9    0.000    0.000       0
+  0  16265 02:41:30.09   0.6010A   2.9947  -0.7478  -0.7388  0.062  0.00   0.000      0.  0.789E+00  0.509E-01  0.706E-03  0.210E-04   43  29   8   39   9  12   13  22   9    0.000    0.000       0
+  0  16275 02:41:36.08   0.5950A   3.0229  -0.7660   0.8835  0.060  0.00   0.000      0.  0.789E+00  0.502E-01  0.708E-03  0.248E-04   41  30  13   39   8  18   20  27   9    0.000    0.000       0
+  0  16285 02:41:42.05   0.5970A   3.0133  -0.7813   0.8654  0.058  0.00   0.000      0.  0.789E+00  0.497E-01  0.719E-03  0.284E-04   46  39  23   39   7  24   20  25   9    0.000    0.000       0
+  0  16295 02:41:48.02   0.6010A   2.9943  -0.8521   0.8896  0.056  0.00   0.000      0.  0.790E+00  0.493E-01  0.723E-03  0.287E-04   46  39  30   38   7  28   20  25   9    0.000    0.000       0
+  0  16305 02:41:54.06   0.6040A   2.9817  -0.8324   0.8410  0.055  0.00   0.000      0.  0.790E+00  0.490E-01  0.724E-03  0.291E-04   46  38  37   38   6  33   21  24   9    0.000    0.000       0
+  0  16315 02:42:00.15   0.6130A   2.9383  -0.7691   0.7580  0.054  0.00   0.000      0.  0.790E+00  0.488E-01  0.727E-03  0.283E-04   46  38   4   37   6  37   21  24   9    0.000    0.000       0
+  0  16325 02:42:06.26   0.6150A   2.9255   0.8518   0.8035  0.053  0.00   0.000      0.  0.791E+00  0.486E-01  0.723E-03  0.259E-04   46   1  10   22  27   4   21  23   9    0.000    0.000       0
+  0  16335 02:42:12.44   0.6190A   2.9086   0.8030  -0.7513  0.053  0.00   0.000      0.  0.791E+00  0.483E-01  0.713E-03  0.203E-04   46   6  38   21  26   6   36  35  11    0.000    0.000       0
+  0  16345 02:42:18.60   0.6130A   2.9348   0.7080  -0.7313  0.054  0.00   0.000      0.  0.791E+00  0.479E-01  0.696E-03  0.158E-04   45   6   6   21  30   8   36  35  17    0.000    0.000       0
+  0  16354 02:42:24.13   0.6150A   2.9286   0.7701  -0.7174  0.054  0.00   0.000      0.  0.792E+00  0.474E-01  0.686E-03  0.162E-04   44  35  19   20  31   9   31  36   9    0.000    0.000       0
+  0  16364 02:42:30.25   0.6090A   2.9562   0.7545  -0.7040  0.055  0.00   0.000      0.  0.792E+00  0.468E-01  0.671E-03  0.169E-04   44  35  26   21  31  14   30  36  13    0.000    0.000       0
+  0  16374 02:42:36.33   0.6100A   2.9519   0.7501  -0.6508  0.054  0.00   0.000      0.  0.792E+00  0.463E-01  0.662E-03  0.178E-04   44  35  33   21  31  18   29  36  18    0.000    0.000       0
+  0  16384 02:42:42.42   0.6100A   2.9492   0.7216  -0.6667  0.054  0.00   0.000      0.  0.793E+00  0.458E-01  0.654E-03  0.189E-04   44  35   1   20  30   9   29  36  24    0.000    0.000       0
+  0  16394 02:42:48.56   0.6180A   2.9128   0.7446  -0.6264  0.055  0.00   0.000      0.  0.793E+00  0.454E-01  0.655E-03  0.196E-04   44  35   9   21  31  14   28  36  28    0.000    0.000       0
+  0  16403 02:42:54.10   0.6160A   2.9204   0.7179  -0.6063  0.054  0.00   0.000      0.  0.794E+00  0.451E-01  0.646E-03  0.199E-04   44  35  15   21  32  16   28  37  33    0.000    0.000       0
+  0  16413 02:43:00.25   0.6160A   2.9205   0.6764   0.6370  0.054  0.00   0.000      0.  0.795E+00  0.449E-01  0.640E-03  0.190E-04   44  35  23   21  33  20   19  30   8    0.000    0.000       0
+  0  16423 02:43:06.41   0.6100A   2.9521   0.7162   0.7508  0.053  0.00   0.000      0.  0.795E+00  0.447E-01  0.631E-03  0.178E-04   45  32  28   21  34  24   19  29   8    0.000    0.000       0
+  0  16433 02:43:12.46   0.6060A   2.9703   0.7066   0.6382  0.052  0.00   0.000      0.  0.796E+00  0.446E-01  0.627E-03  0.169E-04   46  32  35   28   5  15   19  29   8    0.000    0.000       0
+  0  16443 02:43:18.59   0.6120A   2.9390   0.6849   0.7979  0.052  0.00   0.000      0.  0.796E+00  0.447E-01  0.637E-03  0.176E-04   46   4  37   28   6  18   20  29   9    0.000    0.000       0
+  0  16452 02:43:24.10   0.6100A   2.9503  -0.6727   0.7976  0.051  0.00   0.000      0.  0.797E+00  0.448E-01  0.642E-03  0.196E-04   46   4   4   21  18   2   20  27   9    0.000    0.000       0
+  0  16462 02:43:30.20   0.6110A   2.9476  -0.8306   0.9149  0.050  0.00   0.000      0.  0.797E+00  0.450E-01  0.648E-03  0.215E-04   46   4  11   21  16   4   20  11   9    0.000    0.000       0
+  0  16472 02:43:36.29   0.6080A   2.9598   0.7220   0.8524  0.050  0.00   0.000      0.  0.798E+00  0.452E-01  0.652E-03  0.213E-04   41   3  17   23  28   8   20  11   9    0.000    0.000       0
+  0  16482 02:43:42.33   0.6020A   2.9888  -0.7403   0.7911  0.050  0.00   0.000      0.  0.798E+00  0.455E-01  0.656E-03  0.226E-04   45  24  24   20  18   6   20  11   9    0.000    0.000       0
+  0  16492 02:43:48.42   0.6130A   2.9359  -0.8648   0.8269  0.050  0.00   0.000      0.  0.798E+00  0.458E-01  0.672E-03  0.249E-04   43   3  23   20  18   8   20  11   9    0.000    0.000       0
+  0  16502 02:43:54.57   0.6120A   2.9397  -0.9127   0.8101  0.051  0.00   0.000      0.  0.799E+00  0.461E-01  0.678E-03  0.263E-04   43   4  29   21  11   8   20  13   9    0.000    0.000       0
+  0  16512 02:44:00.52   0.5920A   3.0412  -0.8890  -0.7547  0.052  0.00   0.000      0.  0.799E+00  0.464E-01  0.651E-03  0.209E-04   43   4  37   19  15   9   17  19   9    0.000    0.000       0
+  0  16522 02:44:06.37   0.5870A   3.0677  -0.7551  -0.8086  0.054  0.00   0.000      0.  0.799E+00  0.466E-01  0.638E-03  0.177E-04   43   4   4   19  15   9   16  18   9    0.000    0.000       0
+  0  16532 02:44:12.26   0.5990A   3.0038  -0.6709  -0.8550  0.055  0.00   0.000      0.  0.799E+00  0.467E-01  0.638E-03  0.155E-04   43   4  11   38  13   1   17  25   9    0.000    0.000       0
+  0  16542 02:44:18.28   0.6050A   2.9744  -0.6990  -0.8126  0.056  0.00   0.000      0.  0.799E+00  0.467E-01  0.634E-03  0.151E-04   42   3  17   21  26   5   17  26   9    0.000    0.000       0
+  0  16552 02:44:24.37   0.6210A   2.8964   0.6941  -0.8084  0.055  0.00   0.000      0.  0.799E+00  0.468E-01  0.649E-03  0.167E-04   42   3  24   21  11   6   17  22   9    0.000    0.000       0
+  0  16562 02:44:30.54   0.6130A   2.9359   0.6982  -0.7750  0.054  0.00   0.000      0.  0.799E+00  0.469E-01  0.640E-03  0.177E-04   43   0   3   17  14   9   16  23   9    0.000    0.000       0
+  0  16571 02:44:36.03   0.6040A   2.9796  -0.7659   0.7887  0.053  0.00   0.000      0.  0.799E+00  0.471E-01  0.634E-03  0.190E-04   44   3   3   20  27   8   20  13   9    0.000    0.000       0
+  0  16581 02:44:42.02   0.5970A   3.0170   0.6735   0.8391  0.052  0.00   0.000      0.  0.799E+00  0.473E-01  0.631E-03  0.201E-04   44   3  10   26  11  21   20  14   9    0.000    0.000       0
+  0  16592 02:44:48.54   0.5950A   3.0236  -0.7248   0.7839  0.051  0.00   0.000      0.  0.799E+00  0.476E-01  0.627E-03  0.200E-04   44   3  18   17  25   8   21  14   9    0.000    0.000       0
+  0  16602 02:44:54.48   0.5920A   3.0392   0.8290   0.7389  0.050  0.00   0.000      0.  0.799E+00  0.477E-01  0.623E-03  0.192E-04   44   3  27   20  22   6   20  16   9    0.000    0.000       0
+  0  16612 02:45:00.35   0.5850A   3.0784   0.7058   0.6816  0.050  0.00   0.000      0.  0.799E+00  0.479E-01  0.617E-03  0.173E-04   44   3  34   19  22   6   20  11   9    0.000    0.000       0
+  0  16622 02:45:06.25   0.5950A   3.0269  -0.9067  -0.6909  0.050  0.00   0.000      0.  0.799E+00  0.480E-01  0.629E-03  0.178E-04   44   3   2   21  11   8   19  17   6    0.000    0.000       0
+  0  16632 02:45:12.13   0.5780A   3.1144  -0.7848  -0.7164  0.050  0.00   0.000      0.  0.800E+00  0.482E-01  0.614E-03  0.165E-04   44   3   9   20  11   8   17  17   7    0.000    0.000       0
+  0  16643 02:45:18.47   0.5800A   3.1045  -0.7819  -0.8464  0.051  0.00   0.000      0.  0.800E+00  0.483E-01  0.614E-03  0.151E-04   44   3  16   19  12   9   17  18   8    0.000    0.000       0
+  0  16653 02:45:24.35   0.5970A   3.0156   0.7164  -1.0129  0.051  0.00   0.000      0.  0.800E+00  0.483E-01  0.627E-03  0.150E-04   44   3  23   28  14  37   16  18   8    0.000    0.000       0
+  0  16663 02:45:30.31   0.5950A   3.0267   0.6892  -0.9648  0.052  0.00   0.000      0.  0.800E+00  0.482E-01  0.623E-03  0.153E-04   44   0  26   29  15   3   15  18   8    0.000    0.000       0
+  0  16673 02:45:36.21   0.5880A   3.0589   0.7091  -0.8546  0.053  0.00   0.000      0.  0.801E+00  0.479E-01  0.615E-03  0.158E-04   44   0  33   19  30   9   15  19   8    0.000    0.000       0
+  0  16683 02:45:42.06   0.5840A   3.0817   0.7544  -0.8039  0.054  0.00   0.000      0.  0.801E+00  0.476E-01  0.608E-03  0.147E-04   44   0   1   18  32   9   14  19   8    0.000    0.000       0
+  0  16694 02:45:48.45   0.5830A   3.0876   0.7199  -0.8328  0.054  0.00   0.000      0.  0.801E+00  0.473E-01  0.605E-03  0.137E-04   44   0  10   19  13   8   16  23   9    0.000    0.000       0
+  0  16704 02:45:54.32   0.5860A   3.0697   0.7160  -0.8412  0.054  0.00   0.000      0.  0.802E+00  0.469E-01  0.605E-03  0.125E-04   44  39  16   19  15   8   17  24   9    0.000    0.000       0
+  0  16714 02:46:00.16   0.5860A   3.0743   0.6378  -0.8436  0.053  0.00   0.000      0.  0.802E+00  0.466E-01  0.603E-03  0.125E-04   44   0  26   32  16  21   16  24   9    0.000    0.000       0
+  0  16725 02:46:06.58   0.5840A   3.0800  -0.6371  -0.7811  0.052  0.00   0.000      0.  0.803E+00  0.464E-01  0.603E-03  0.125E-04   46  39  33   41  35  37   15  24   9    0.000    0.000       0
+  0  16735 02:46:12.36   0.5810A   3.0960   0.6509  -0.7099  0.051  0.00   0.000      0.  0.803E+00  0.463E-01  0.599E-03  0.113E-04   44  39   0   29  20  24   12  23   8    0.000    0.000       0
+  0  16745 02:46:18.25   0.5910A   3.0458  -0.6582  -0.6999  0.050  0.00   0.000      0.  0.803E+00  0.462E-01  0.610E-03  0.122E-04   46  36  29   41  31   9   31   5  27    0.000    0.000       0
+  0  16755 02:46:24.20   0.5990A   3.0075  -0.7065  -0.7300  0.050  0.00   0.000      0.  0.804E+00  0.462E-01  0.621E-03  0.158E-04   46  36  36   41  31  14    8  22   7    0.000    0.000       0
+  0  16765 02:46:30.20   0.6010A   2.9934  -0.6653  -0.7055  0.049  0.00   0.000      0.  0.804E+00  0.463E-01  0.627E-03  0.190E-04   46  33   8   41  30  19    7  22   7    0.000    0.000       0
+  0  16775 02:46:36.23   0.6040A   2.9798   0.6939  -0.6312  0.048  0.00   0.000      0.  0.805E+00  0.465E-01  0.630E-03  0.186E-04   46  32  16   36  17   8    6  21   7    0.000    0.000       0
+  0  16785 02:46:42.32   0.6130A   2.9344  -0.6712  -0.6712  0.046  0.00   0.000      0.  0.805E+00  0.467E-01  0.638E-03  0.179E-04   46  32  25   15  30   6    5  21   6    0.000    0.000       0
+  0  16795 02:46:48.39   0.6060A   2.9719  -0.6725  -0.6755  0.046  0.00   0.000      0.  0.805E+00  0.469E-01  0.629E-03  0.158E-04   46  32  33   34   0  13   11  27   9    0.000    0.000       0
+  0  16805 02:46:54.53   0.6170A   2.9189  -0.7955  -0.6687  0.047  0.00   0.000      0.  0.806E+00  0.471E-01  0.642E-03  0.156E-04   46  35  36   34  39  18   11  27   9    0.000    0.000       0
+  0  16814 02:47:00.04   0.6100A   2.9520  -0.8660  -0.6472  0.047  0.00   0.000      0.  0.806E+00  0.473E-01  0.640E-03  0.156E-04   46  35   2   33  39  21    9  26   9    0.000    0.000       0
+  0  16824 02:47:06.15   0.6120A   2.9402  -0.9120   0.6699  0.048  0.00   0.000      0.  0.807E+00  0.475E-01  0.647E-03  0.166E-04   46  35   9   32  38  24   20  11   9    0.000    0.000       0
+  0  16834 02:47:12.28   0.6100A   2.9487  -0.9220   0.7768  0.048  0.00   0.000      0.  0.807E+00  0.476E-01  0.652E-03  0.174E-04   45  38  27   32  37  29   20  12   9    0.000    0.000       0
+  0  16844 02:47:18.37   0.6110A   2.9451  -0.9261   0.8712  0.048  0.00   0.000      0.  0.808E+00  0.477E-01  0.662E-03  0.183E-04   45  38  35   32  36  33   21  13   9    0.000    0.000       0
+  0  16854 02:47:24.51   0.6150A   2.9275  -0.8487   0.8652  0.048  0.00   0.000      0.  0.808E+00  0.477E-01  0.672E-03  0.197E-04   45  39   2   32  35  37   21  14   9    0.000    0.000       0
+  0  16863 02:47:30.06   0.6170A   2.9155   0.8986   0.8859  0.048  0.00   0.000      0.  0.809E+00  0.477E-01  0.679E-03  0.218E-04   45  39   9   18  15   9   22  16   9    0.000    0.000       0
+  0  16873 02:47:36.28   0.6240A   2.8843   0.8819   0.8239  0.048  0.00   0.000      0.  0.809E+00  0.477E-01  0.688E-03  0.247E-04   45  15  27   18  16   9   21  13   9    0.000    0.000       0
+  0  16883 02:47:42.48   0.6200A   2.9026  -0.8591   0.8372  0.048  0.00   0.000      0.  0.809E+00  0.477E-01  0.689E-03  0.255E-04   46  15  35   32  36  10   20  12   9    0.000    0.000       0
+  0  16892 02:47:48.06   0.6150A   2.9259  -0.9850   0.7698  0.048  0.00   0.000      0.  0.810E+00  0.478E-01  0.689E-03  0.260E-04   40  14  22   21  11   8   20  12   9    0.000    0.000       0
+  0  16902 02:47:54.19   0.6190A   2.9097  -0.9395   0.7873  0.049  0.00   0.000      0.  0.810E+00  0.477E-01  0.693E-03  0.236E-04   40  14  29   20  10   8   21  28   9    0.000    0.000       0
+  0  16912 02:48:00.46   0.6190A   2.9091  -0.9686   0.8016  0.049  0.00   0.000      0.  0.810E+00  0.475E-01  0.684E-03  0.217E-04   43   9  18   19  10   9   21  28   9    0.000    0.000       0
+  0  16921 02:48:06.01   0.6160A   2.9229  -0.9906   0.7028  0.049  0.00   0.000      0.  0.810E+00  0.473E-01  0.676E-03  0.204E-04   44  14  33   19   9   9   20  29   9    0.000    0.000       0
+  0  16931 02:48:12.14   0.6110A   2.9451  -0.7615   0.7330  0.049  0.00   0.000      0.  0.810E+00  0.471E-01  0.670E-03  0.183E-04   44  14   1   18  10   9   20  27   9    0.000    0.000       0
+  0  16941 02:48:18.23   0.6090A   2.9563  -0.6614   0.7476  0.049  0.00   0.000      0.  0.810E+00  0.468E-01  0.667E-03  0.168E-04   45   2   8   36  38   8   20  27   9    0.000    0.000       0
+  0  16951 02:48:24.32   0.6120A   2.9401  -0.7488  -0.6030  0.049  0.00   0.000      0.  0.810E+00  0.466E-01  0.666E-03  0.170E-04   46  18  16   21  25   8    9  21   9    0.000    0.000       0
+  0  16961 02:48:30.37   0.6000A   2.9992  -0.7536  -0.5800  0.049  0.00   0.000      0.  0.810E+00  0.463E-01  0.650E-03  0.160E-04   46  18  23   21  23   8    7  23   8    0.000    0.000       0
+  0  16971 02:48:36.39   0.6040A   2.9812  -0.7642  -0.6463  0.048  0.00   0.000      0.  0.810E+00  0.461E-01  0.647E-03  0.144E-04   46  18  31   19  25   9   18  27   9    0.000    0.000       0
+  0  16981 02:48:42.41   0.6010A   2.9957  -0.7527  -0.6705  0.048  0.00   0.000      0.  0.811E+00  0.458E-01  0.634E-03  0.149E-04   44  14   2   20  25   9   19  28   9    0.000    0.000       0
+  0  16991 02:48:48.47   0.6050A   2.9768   0.6500  -0.6758  0.047  0.00   0.000      0.  0.811E+00  0.454E-01  0.625E-03  0.155E-04   45  17   6   22  30   4   18  28   9    0.000    0.000       0
+  0  17001 02:48:54.50   0.6030A   2.9849   0.6840   0.6219  0.046  0.00   0.000      0.  0.811E+00  0.451E-01  0.620E-03  0.164E-04   46  17  14   21  29   4   21  23   9    0.000    0.000       0
+  0  17011 02:49:00.54   0.6020A   2.9896   0.7017   0.6752  0.045  0.00   0.000      0.  0.812E+00  0.448E-01  0.623E-03  0.181E-04   45  15  16   20  29   4   20  29   9    0.000    0.000       0
+  0  17021 02:49:06.53   0.5990A   3.0074   0.7451   0.7020  0.044  0.00   0.000      0.  0.812E+00  0.446E-01  0.620E-03  0.187E-04   45  15  24   22  29   6   20  28   9    0.000    0.000       0
+  0  17031 02:49:12.54   0.6010A   2.9971   0.7494   0.7203  0.042  0.00   0.000      0.  0.813E+00  0.443E-01  0.627E-03  0.215E-04   44  14  32   21  29   8   21  24   9    0.000    0.000       0
+  0  17041 02:49:18.52   0.5910A   3.0478   0.7524   0.7995  0.042  0.00   0.000      0.  0.814E+00  0.441E-01  0.623E-03  0.241E-04   44  37  34   20  30   9   21  30   5    0.000    0.000       0
+  0  17051 02:49:24.39   0.5800A   3.1038   0.9285   0.7819  0.041  0.00   0.000      0.  0.814E+00  0.440E-01  0.616E-03  0.249E-04   44  37   1   20  30   9   22  29   5    0.000    0.000       0
+  0  17061 02:49:30.16   0.5690A   3.1627  -0.7843   0.7845  0.042  0.00   0.000      0.  0.815E+00  0.439E-01  0.600E-03  0.224E-04   44  37   8   21  10   8   22  29   7    0.000    0.000       0
+  0  17072 02:49:36.38   0.5670A   3.1732  -0.6801  -0.6472  0.043  0.00   0.000      0.  0.815E+00  0.438E-01  0.592E-03  0.202E-04   44  37  16   20  10   8   33   6   3    0.000    0.000       0
+  0  17083 02:49:42.53   0.5590A   3.2185  -0.6899  -0.6296  0.045  0.00   0.000      0.  0.816E+00  0.439E-01  0.577E-03  0.182E-04   44  37  23   21  26   6   19  22   6    0.000    0.000       0
+  0  17093 02:49:48.22   0.5760A   3.1238  -0.6893  -0.6793  0.046  0.00   0.000      0.  0.816E+00  0.440E-01  0.583E-03  0.172E-04   44  37  30   20  19   9   16  21   9    0.000    0.000       0
+  0  17103 02:49:54.14   0.6060A   2.9706   0.7319  -0.7329  0.048  0.00   0.000      0.  0.817E+00  0.440E-01  0.607E-03  0.181E-04   44  37  38   20  20   4   15  21   9    0.000    0.000       0
+  0  17113 02:50:00.25   0.6110A   2.9442  -0.7303  -0.7855  0.049  0.00   0.000      0.  0.817E+00  0.441E-01  0.605E-03  0.176E-04   42  15  12   19  16   9   14  20   9    0.000    0.000       0
+  0  17123 02:50:06.38   0.6160A   2.9208   0.8428  -0.7817  0.049  0.00   0.000      0.  0.818E+00  0.440E-01  0.603E-03  0.153E-04   44  13  24   20  22   6   13  19   9    0.000    0.000       0
+  0  17133 02:50:12.48   0.6060A   2.9709   0.8462  -0.7367  0.050  0.00   0.000      0.  0.818E+00  0.439E-01  0.592E-03  0.144E-04   45  25  19   20  22   8   13  17   9    0.000    0.000       0
+  0  17143 02:50:18.51   0.5990A   3.0026   0.7101  -0.6498  0.049  0.00   0.000      0.  0.819E+00  0.437E-01  0.581E-03  0.131E-04   45  25  26   20  23   8   11  17   9    0.000    0.000       0
+  0  17153 02:50:24.49   0.5960A   3.0197  -0.6870  -0.5906  0.049  0.00   0.000      0.  0.819E+00  0.437E-01  0.580E-03  0.131E-04   45  25  33   19  29   8   17  29   9    0.000    0.000       0
+  0  17163 02:50:30.45   0.5940A   3.0299   0.6945   0.6010  0.048  0.00   0.000      0.  0.820E+00  0.437E-01  0.585E-03  0.151E-04   45  25   0   38  22  14   21  11   9    0.000    0.000       0
+  0  17173 02:50:36.40   0.5950A   3.0251   0.6591  -0.6082  0.046  0.00   0.000      0.  0.820E+00  0.439E-01  0.595E-03  0.175E-04   45  25   7   22  33   3   30   3  21    0.000    0.000       0
+  0  17183 02:50:42.37   0.5970A   3.0148   0.6379   0.5621  0.046  0.00   0.000      0.  0.821E+00  0.442E-01  0.607E-03  0.178E-04   45  25  14   18  13   9   20  14   9    0.000    0.000       0
+  0  17193 02:50:48.37   0.6020A   2.9915   0.6925  -0.6440  0.046  0.00   0.000      0.  0.822E+00  0.445E-01  0.621E-03  0.166E-04   45  25  21   16  13   9   35  16  32    0.000    0.000       0
+  0  17203 02:50:54.42   0.6070A   2.9645   0.6892  -0.6011  0.046  0.00   0.000      0.  0.822E+00  0.448E-01  0.632E-03  0.155E-04   45  25  28   15  13   9   35  16  38    0.000    0.000       0
+  0  17213 02:51:00.50   0.6080A   2.9598  -0.6968  -0.5885  0.047  0.00   0.000      0.  0.823E+00  0.449E-01  0.635E-03  0.142E-04   46   8  37   29  13  18   35  17   2    0.000    0.000       0
+  0  17223 02:51:06.53   0.6040A   2.9820  -0.7548  -0.5637  0.048  0.00   0.000      0.  0.823E+00  0.450E-01  0.636E-03  0.147E-04   43  19   9   20  11   8    4  27   9    0.000    0.000       0
+  0  17233 02:51:12.57   0.5980A   3.0084  -0.6833  -0.6330  0.050  0.00   0.000      0.  0.824E+00  0.450E-01  0.633E-03  0.156E-04   46  10  11   22  11  11   17  18   9    0.000    0.000       0
+  0  17243 02:51:18.51   0.5900A   3.0495   0.7929  -0.7920  0.051  0.00   0.000      0.  0.825E+00  0.449E-01  0.626E-03  0.160E-04   46  10  18   20  31   9   17  18   9    0.000    0.000       0
+  0  17253 02:51:24.42   0.5900A   3.0505   0.7060  -0.8685  0.053  0.00   0.000      0.  0.825E+00  0.448E-01  0.625E-03  0.151E-04   46  10  25   19  31   9   17  21   9    0.000    0.000       0
+  0  17263 02:51:30.36   0.5930A   3.0353   0.7287  -0.8924  0.054  0.00   0.000      0.  0.826E+00  0.447E-01  0.624E-03  0.140E-04   46  21   5   19  30   9   16  20   9    0.000    0.000       0
+  0  17273 02:51:36.26   0.5880A   3.0595  -0.6812  -0.8454  0.055  0.00   0.000      0.  0.826E+00  0.445E-01  0.615E-03  0.130E-04   44  10   1   20  30   8   16  23   9    0.000    0.000       0
+  0  17283 02:51:42.11   0.5850A   3.0768  -0.7241  -0.8250  0.056  0.00   0.000      0.  0.826E+00  0.444E-01  0.615E-03  0.126E-04   44  10   8   20  28   8   17  27   9    0.000    0.000       0
+  0  17294 02:51:48.57   0.5960A   3.0196   0.6395  -0.8685  0.055  0.00   0.000      0.  0.826E+00  0.442E-01  0.625E-03  0.120E-04   44  10  16   36  16  37   17  23   9    0.000    0.000       0
+  0  17304 02:51:54.56   0.5870A   3.0649   0.6772  -0.8400  0.054  0.00   0.000      0.  0.827E+00  0.440E-01  0.615E-03  0.116E-04   43  29   6   36  16   2   16  23   9    0.000    0.000       0
+  0  17314 02:52:00.49   0.5970A   3.0158  -0.5992  -0.7445  0.053  0.00   0.000      0.  0.827E+00  0.439E-01  0.626E-03  0.120E-04   43  29  12   41   9  35   15  22   9    0.000    0.000       0
+  0  17324 02:52:06.49   0.5960A   3.0221   0.6180  -0.6750  0.051  0.00   0.000      0.  0.827E+00  0.439E-01  0.628E-03  0.141E-04   43  18  37   35  18  39   14  21   9    0.000    0.000       0
+  0  17334 02:52:12.45   0.5970A   3.0162   0.6215  -0.6156  0.050  0.00   0.000      0.  0.828E+00  0.439E-01  0.629E-03  0.163E-04   43  18   4   37  14  23   13  21   9    0.000    0.000       0
+  0  17344 02:52:18.48   0.5980A   3.0090   0.6661  -0.6760  0.049  0.00   0.000      0.  0.828E+00  0.440E-01  0.633E-03  0.169E-04   45  24  22   35  21   9   22   8  21    0.000    0.000       0
+  0  17354 02:52:24.39   0.5820A   3.0935   0.6807  -0.6212  0.048  0.00   0.000      0.  0.828E+00  0.441E-01  0.621E-03  0.175E-04   46  24  29   35  21  14   38  12  16    0.000    0.000       0
+  0  17364 02:52:30.24   0.5900A   3.0517   0.6924  -0.5910  0.048  0.00   0.000      0.  0.828E+00  0.443E-01  0.626E-03  0.178E-04   46  24  36   38  14  10   17  18   9    0.000    0.000       0
+  0  17374 02:52:36.21   0.5940A   3.0283   0.7309  -0.6230  0.048  0.00   0.000      0.  0.828E+00  0.444E-01  0.622E-03  0.171E-04   46  10  25   43  11  23   17  17   9    0.000    0.000       0
+  0  17384 02:52:42.08   0.5870A   3.0639   0.8403  -0.7288  0.048  0.00   0.000      0.  0.828E+00  0.444E-01  0.614E-03  0.165E-04   46  10  32   44  10  31   17  15   9    0.000    0.000       0
+  0  17395 02:52:48.49   0.5770A   3.1193   0.8471  -0.7316  0.049  0.00   0.000      0.  0.829E+00  0.444E-01  0.600E-03  0.149E-04   46  11  38   44  11  37   16  15   9    0.000    0.000       0
+  0  17405 02:52:54.13   0.5540A   3.2475   0.9649  -0.7193  0.049  0.00   0.000      0.  0.829E+00  0.444E-01  0.574E-03  0.141E-04   46  11   4   44  12   4   37  15   3    0.000    0.000       0
+  0  17416 02:53:00.33   0.5720A   3.1480   0.9672  -0.7526  0.050  0.00   0.000      0.  0.829E+00  0.443E-01  0.586E-03  0.139E-04   46  11  10   45  12  12   36  14  10    0.000    0.000       0
+  0  17426 02:53:06.07   0.5730A   3.1430   0.8328  -0.7781  0.050  0.00   0.000      0.  0.829E+00  0.443E-01  0.580E-03  0.134E-04   46  11  16   45  12  18   35  14  16    0.000    0.000       0
+  0  17437 02:53:12.32   0.5690A   3.1643   0.7469  -0.7696  0.049  0.00   0.000      0.  0.829E+00  0.444E-01  0.570E-03  0.140E-04   46  12  23   45  13  25   34  14  23    0.000    0.000       0
+  0  17448 02:53:18.49   0.5640A   3.1921   0.6866  -0.7960  0.048  0.00   0.000      0.  0.829E+00  0.446E-01  0.567E-03  0.146E-04   46  12  31   44  14  32   34  13  28    0.000    0.000       0
+  0  17458 02:53:24.06   0.5550A   3.2452   0.7458  -0.8071  0.047  0.00   0.000      0.  0.829E+00  0.449E-01  0.565E-03  0.156E-04   46  12  37   41  23  10   33  13  33    0.000    0.000       0
+  0  17469 02:53:30.19   0.5580A   3.2251   0.7721  -0.8127  0.047  0.00   0.000      0.  0.829E+00  0.454E-01  0.572E-03  0.170E-04   46  12   5   41  24  16   38  13  39    0.000    0.000       0
+  0  17480 02:53:36.35   0.5590A   3.2192  -0.7506  -0.9347  0.046  0.00   0.000      0.  0.829E+00  0.459E-01  0.575E-03  0.177E-04   45  13  12   31  14   3   39  12   6    0.000    0.000       0
+  0  17491 02:53:42.55   0.5720A   3.1455  -0.7967  -0.9492  0.046  0.00   0.000      0.  0.829E+00  0.464E-01  0.589E-03  0.164E-04   46  13  20   30  13   7   38  12  11    0.000    0.000       0
+  0  17501 02:53:48.39   0.5870A   3.0647   0.7387  -0.8939  0.046  0.00   0.000      0.  0.829E+00  0.468E-01  0.604E-03  0.143E-04   46   1   5   42  25  34   36  12  16    0.000    0.000       0
+  0  17511 02:53:54.19   0.5740A   3.1342   0.7803  -0.8160  0.047  0.00   0.000      0.  0.829E+00  0.471E-01  0.590E-03  0.118E-04   46   1  12   42  25   2   35  12  23    0.000    0.000       0
+  0  17522 02:54:00.51   0.5760A   3.1262   0.8451  -0.7747  0.047  0.00   0.000      0.  0.829E+00  0.474E-01  0.588E-03  0.109E-04   46   1  20   42  28   7   34  12  31    0.000    0.000       0
+  0  17532 02:54:06.25   0.5710A   3.1513   0.8651  -0.7786  0.046  0.00   0.000      0.  0.829E+00  0.476E-01  0.584E-03  0.118E-04   46   1  27   42  29  13   33  12  36    0.000    0.000       0
+  0  17543 02:54:12.52   0.5680A   3.1701   0.8229   0.7681  0.045  0.00   0.000      0.  0.829E+00  0.478E-01  0.582E-03  0.136E-04   46   1  35   42  30  18   20  11   9    0.000    0.000       0
+  0  17553 02:54:18.23   0.5750A   3.1292   0.7171   0.7701  0.044  0.00   0.000      0.  0.829E+00  0.480E-01  0.587E-03  0.145E-04   46   1   2   42  32  24   20  14   9    0.000    0.000       0
+  0  17563 02:54:24.09   0.5890A   3.0581  -0.6860   0.7019  0.043  0.00   0.000      0.  0.829E+00  0.482E-01  0.597E-03  0.145E-04   46   2  10   46   1  22   20  14   9    0.000    0.000       0
+  0  17574 02:54:30.45   0.5760A   3.1226   0.6833  -0.6523  0.042  0.00   0.000      0.  0.829E+00  0.484E-01  0.581E-03  0.133E-04   45   2  17   42  37  37   33  11   7    0.000    0.000       0
+  0  17584 02:54:36.20   0.5780A   3.1145   0.6948  -0.6027  0.042  0.00   0.000      0.  0.829E+00  0.485E-01  0.581E-03  0.129E-04   46   2  24   42  37   3   33  11  11    0.000    0.000       0
+  0  17594 02:54:42.09   0.6000A   3.0000  -0.7175  -0.5904  0.042  0.00   0.000      0.  0.830E+00  0.486E-01  0.602E-03  0.127E-04   46   2  31   27   7  16   25  11  14    0.000    0.000       0
+  0  17604 02:54:48.07   0.5950A   3.0270  -0.6953   0.6390  0.041  0.00   0.000      0.  0.830E+00  0.487E-01  0.602E-03  0.119E-04   44   9  37   29  12  11   21  15   9    0.000    0.000       0
+  0  17614 02:54:54.05   0.5980A   3.0116  -0.6735   0.6342  0.041  0.00   0.000      0.  0.831E+00  0.488E-01  0.614E-03  0.121E-04   46   0   5   27  13  16   21  14   9    0.000    0.000       0
+  0  17624 02:55:00.04   0.5960A   3.0208  -0.6986  -0.6657  0.041  0.00   0.000      0.  0.831E+00  0.489E-01  0.620E-03  0.121E-04   43   2  12   26   6  25   17  19   9    0.000    0.000       0
+  0  17635 02:55:06.55   0.5930A   3.0354  -0.6797  -0.7076  0.041  0.00   0.000      0.  0.832E+00  0.489E-01  0.622E-03  0.117E-04   44   0  21   26   4  28   40   2  21    0.000    0.000       0
+  0  17645 02:55:12.54   0.5910A   3.0459  -0.6513  -0.7081  0.041  0.00   0.000      0.  0.832E+00  0.489E-01  0.619E-03  0.108E-04   46   0  32   31   4   8   16  19   9    0.000    0.000       0
+  0  17655 02:55:18.36   0.5810A   3.0988  -0.6636  -0.6989  0.042  0.00   0.000      0.  0.833E+00  0.490E-01  0.608E-03  0.101E-04   45   0  39   30   3  11   17  16   9    0.000    0.000       0
+  0  17665 02:55:24.22   0.6000A   3.0015  -0.6546  -0.6990  0.042  0.00   0.000      0.  0.834E+00  0.491E-01  0.624E-03  0.103E-04   45   0   6   30   2  15   16  16   9    0.000    0.000       0
+  0  17675 02:55:30.30   0.6100A   2.9512   0.6737  -0.6752  0.043  0.00   0.000      0.  0.834E+00  0.493E-01  0.633E-03  0.113E-04   46  39  13   41  19   3   39   4   7    0.000    0.000       0
+  0  17685 02:55:36.36   0.6030A   2.9850   0.6918  -0.6727  0.043  0.00   0.000      0.  0.835E+00  0.496E-01  0.631E-03  0.128E-04   45  39  20   41  20   9   30  15  19    0.000    0.000       0
+  0  17695 02:55:42.40   0.6050A   2.9775  -0.7159  -0.6333  0.043  0.00   0.000      0.  0.835E+00  0.500E-01  0.638E-03  0.129E-04   44  10  17   30   1  31   38   4  19    0.000    0.000       0
+  0  17705 02:55:48.42   0.5990A   3.0038  -0.7270  -0.6081  0.044  0.00   0.000      0.  0.836E+00  0.504E-01  0.634E-03  0.119E-04   46   1  24   30   0  36   39   1  29    0.000    0.000       0
+  0  17715 02:55:54.42   0.6020A   2.9912  -0.7452  -0.6212  0.044  0.00   0.000      0.  0.836E+00  0.508E-01  0.639E-03  0.124E-04   45   1  30   30  39   4   40   4  34    0.000    0.000       0
+  0  17725 02:56:00.45   0.6040A   2.9821  -0.7715  -0.6281  0.044  0.00   0.000      0.  0.837E+00  0.515E-01  0.641E-03  0.135E-04   45  39  30   30  38   8   29  38  12    0.000    0.000       0
+  0  17735 02:56:06.50   0.6020A   2.9906  -0.7457  -0.6703  0.043  0.00   0.000      0.  0.838E+00  0.522E-01  0.641E-03  0.145E-04   46  10   3   30  38  14   37   1  10    0.000    0.000       0
+  0  17745 02:56:12.45   0.5920A   3.0386  -0.7752  -0.7391  0.043  0.00   0.000      0.  0.838E+00  0.530E-01  0.630E-03  0.135E-04   46  10   9   29  36  18   36   4  14    0.000    0.000       0
+  0  17755 02:56:18.34   0.5870A   3.0645  -0.8175  -0.7363  0.042  0.00   0.000      0.  0.839E+00  0.537E-01  0.624E-03  0.134E-04   46  10  16   29  35  22   36   4  20    0.000    0.000       0
+  0  17765 02:56:24.24   0.5870A   3.0663  -0.7916  -0.7814  0.042  0.00   0.000      0.  0.839E+00  0.544E-01  0.628E-03  0.147E-04   46  15  26   28  36  28   35   4  26    0.000    0.000       0
+  0  17775 02:56:30.13   0.5880A   3.0600  -0.7481  -0.7677  0.041  0.00   0.000      0.  0.839E+00  0.551E-01  0.635E-03  0.161E-04   46  15  33   28  36  33   36   5  31    0.000    0.000       0
+  0  17786 02:56:36.52   0.5750A   3.1324  -0.7492  -0.7124  0.041  0.00   0.000      0.  0.840E+00  0.560E-01  0.625E-03  0.162E-04   45  15  35   28  33  36   28   1  36    0.000    0.000       0
+  0  17796 02:56:42.28   0.5780A   3.1150  -0.6953  -0.8445  0.042  0.00   0.000      0.  0.840E+00  0.568E-01  0.628E-03  0.155E-04   46  15   2   20  28   9   17  29   9    0.000    0.000       0
+  0  17806 02:56:48.19   0.6010A   2.9949  -0.6999  -0.9701  0.043  0.00   0.000      0.  0.840E+00  0.575E-01  0.647E-03  0.152E-04   46  15   9   27  39   5   16  28   9    0.000    0.000       0
+  0  17816 02:56:54.26   0.6060A   2.9713  -0.7374  -0.9302  0.043  0.00   0.000      0.  0.840E+00  0.581E-01  0.651E-03  0.158E-04   46  12  18   25  32  10   16  27   9    0.000    0.000       0
+  0  17826 02:57:00.32   0.6060A   2.9716  -0.6800  -0.8665  0.044  0.00   0.000      0.  0.840E+00  0.586E-01  0.653E-03  0.165E-04   46  13  23   18  24   9   15  26   9    0.000    0.000       0
+  0  17836 02:57:06.40   0.6140A   2.9298  -0.6545  -0.7955  0.045  0.00   0.000      0.  0.841E+00  0.590E-01  0.657E-03  0.164E-04   46  14  32   17  26   8   16  33  20    0.000    0.000       0
+  0  17846 02:57:12.49   0.6070A   2.9651  -0.6239  -0.7279  0.045  0.00   0.000      0.  0.841E+00  0.594E-01  0.644E-03  0.154E-04   46  14  38   23  30  15   15  33  22    0.000    0.000       0
+  0  17856 02:57:18.61   0.6160A   2.9204  -0.5979  -0.7033  0.044  0.00   0.000      0.  0.841E+00  0.597E-01  0.652E-03  0.142E-04   46  14   5   23  29  18   13  33  26    0.000    0.000       0
+  0  17865 02:57:24.18   0.6170A   2.9159  -0.6911  -0.7171  0.044  0.00   0.000      0.  0.842E+00  0.599E-01  0.655E-03  0.131E-04   46  20   9   22  30  22   16  33  28    0.000    0.000       0
+  0  17875 02:57:30.40   0.6260A   2.8773  -0.7094  -0.7561  0.043  0.00   0.000      0.  0.842E+00  0.600E-01  0.665E-03  0.130E-04   44  37  12   22  29  25   15  33  30    0.000    0.000       0
+  0  17884 02:57:36.04   0.6280A   2.8647  -0.6451  -0.7972  0.041  0.00   0.000      0.  0.842E+00  0.601E-01  0.671E-03  0.140E-04   44   4  27   22  28  27   15  34  34    0.000    0.000       0
+  0  17894 02:57:42.29   0.6240A   2.8836   0.6335  -0.7823  0.040  0.00   0.000      0.  0.842E+00  0.602E-01  0.669E-03  0.156E-04   43   1  22   36  21  26   14  34  36    0.000    0.000       0
+  0  17904 02:57:48.50   0.6210A   2.8978  -0.6545  -0.7643  0.039  0.00   0.000      0.  0.843E+00  0.604E-01  0.671E-03  0.177E-04   43   1  29   22  28  37   12  34  38    0.000    0.000       0
+  0  17913 02:57:54.10   0.6250A   2.8801   0.6291   0.7487  0.038  0.00   0.000      0.  0.843E+00  0.606E-01  0.681E-03  0.193E-04   43   1  36   29   1  38   20  24   9    0.000    0.000       0
+  0  17923 02:58:00.37   0.6250A   2.8791   0.6209   0.7177  0.038  0.00   0.000      0.  0.843E+00  0.610E-01  0.686E-03  0.199E-04   45  22  11   18  30   9   20  23   9    0.000    0.000       0
+  0  17933 02:58:06.61   0.6230A   2.8906   0.7681   0.6476  0.038  0.00   0.000      0.  0.844E+00  0.615E-01  0.692E-03  0.182E-04   44   2  24   19  30   9   20  22   9    0.000    0.000       0
+  0  17942 02:58:12.22   0.6260A   2.8762  -0.7328  -0.7102  0.039  0.00   0.000      0.  0.844E+00  0.619E-01  0.707E-03  0.169E-04   44   2  30   20  23   9   20  38  20    0.000    0.000       0
+  0  17952 02:58:18.45   0.6190A   2.9063  -0.8450  -0.7711  0.039  0.00   0.000      0.  0.844E+00  0.623E-01  0.718E-03  0.160E-04   44   7  24   20  22   9   19  37  24    0.000    0.000       0
+  0  17962 02:58:24.61   0.6150A   2.9267  -0.9626  -0.7758  0.039  0.00   0.000      0.  0.845E+00  0.625E-01  0.727E-03  0.154E-04   44   7  32   19  21   9   18  37  28    0.000    0.000       0
+  0  17971 02:58:30.15   0.6150A   2.9258  -0.9439  -0.7227  0.040  0.00   0.000      0.  0.845E+00  0.627E-01  0.737E-03  0.164E-04   44   8  39   19  20   9   18  36  32    0.000    0.000       0
+  0  17981 02:58:36.27   0.6140A   2.9325  -0.8558  -0.7218  0.040  0.00   0.000      0.  0.845E+00  0.628E-01  0.737E-03  0.158E-04   44   9   6   18  19   9   13  29   8    0.000    0.000       0
+  0  17991 02:58:42.37   0.6110A   2.9468  -0.7832  -0.6475  0.040  0.00   0.000      0.  0.846E+00  0.630E-01  0.730E-03  0.146E-04   44   9  14   17  18   9   13  36   1    0.000    0.000       0
+  0  18001 02:58:48.37   0.5890A   3.0579  -0.7478  -0.6898  0.041  0.00   0.000      0.  0.846E+00  0.633E-01  0.708E-03  0.141E-04   44   9  23   22  37  37   12  36   4    0.000    0.000       0
+  0  18011 02:58:54.23   0.5840A   3.0825  -0.7637  -0.6883  0.042  0.00   0.000      0.  0.846E+00  0.636E-01  0.704E-03  0.138E-04   44   9  30   21  37   0   14  22   9    0.000    0.000       0
+  0  18021 02:59:00.15   0.5950A   3.0256  -0.7492  -0.8093  0.043  0.00   0.000      0.  0.847E+00  0.640E-01  0.718E-03  0.132E-04   46  29  29   21  36   3   18   1   0    0.000    0.000       0
+  0  18031 02:59:06.08   0.5910A   3.0480  -0.6667  -0.8492  0.045  0.00   0.000      0.  0.847E+00  0.644E-01  0.726E-03  0.153E-04   46  29  36   21  35   7   17   0   3    0.000    0.000       0
+  0  18041 02:59:12.04   0.5960A   3.0181  -0.7133  -0.9783  0.046  0.00   0.000      0.  0.847E+00  0.645E-01  0.745E-03  0.167E-04   46  29   3   24  34  10   17  17   9    0.000    0.000       0
+  0  18052 02:59:18.59   0.5940A   3.0300  -0.7356  -1.0767  0.047  0.00   0.000      0.  0.847E+00  0.644E-01  0.758E-03  0.185E-04   44  10  22   24  34  14   16  18   9    0.000    0.000       0
+  0  18062 02:59:24.57   0.6020A   2.9912  -0.7099  -1.0264  0.048  0.00   0.000      0.  0.847E+00  0.642E-01  0.778E-03  0.226E-04   41  39  33   23  34  17   14  18   9    0.000    0.000       0
+  0  18072 02:59:30.59   0.6020A   2.9916  -0.7137  -0.9246  0.048  0.00   0.000      0.  0.847E+00  0.639E-01  0.786E-03  0.250E-04   44  11  36    9  30   8   13  19   9    0.000    0.000       0
+  0  18082 02:59:36.59   0.6000A   3.0014  -0.7784  -0.8359  0.048  0.00   0.000      0.  0.847E+00  0.635E-01  0.788E-03  0.242E-04   44  11   4    9  27   9   12  19   9    0.000    0.000       0
+  0  18091 02:59:42.02   0.6050A   2.9732  -0.8463  -0.8726  0.048  0.00   0.000      0.  0.847E+00  0.632E-01  0.796E-03  0.231E-04   44  11  11    9  26   9   11  37  25    0.000    0.000       0
+  0  18101 02:59:48.08   0.6060A   2.9686  -0.8414  -0.8116  0.048  0.00   0.000      0.  0.847E+00  0.628E-01  0.794E-03  0.220E-04   45  28  34    9  25   9   10  37  27    0.000    0.000       0
+  0  18111 02:59:54.11   0.5990A   3.0050  -0.8139  -0.7735  0.048  0.00   0.000      0.  0.847E+00  0.626E-01  0.783E-03  0.198E-04   44  19  23   10  24   8    8  37  25    0.000    0.000       0
+  0  18121 03:00:00.10   0.5970A   3.0157  -0.8201  -0.7748  0.049  0.00   0.000      0.  0.847E+00  0.625E-01  0.781E-03  0.172E-04   44  19  30    9  23   8   19  39  31    0.000    0.000       0
+  0  18131 03:00:06.10   0.5970A   3.0167  -0.7848  -0.7543  0.050  0.00   0.000      0.  0.847E+00  0.625E-01  0.789E-03  0.173E-04   46   2  28    9  21   8   18  39  33    0.000    0.000       0
+  0  18141 03:00:12.04   0.5910A   3.0450   0.8675  -0.7069  0.051  0.00   0.000      0.  0.847E+00  0.626E-01  0.791E-03  0.189E-04   46   3  35   20  30   9   15  38  37    0.000    0.000       0
+  0  18152 03:00:18.51   0.5860A   3.0698   0.8322  -0.7200  0.052  0.00   0.000      0.  0.846E+00  0.628E-01  0.792E-03  0.196E-04   46   3   4   20  21   4   21  14  38    0.000    0.000       0
+  0  18162 03:00:24.34   0.5780A   3.1147   0.8790  -0.8043  0.054  0.00   0.000      0.  0.846E+00  0.629E-01  0.787E-03  0.201E-04   46   3  12   20  21   6   20  14   2    0.000    0.000       0
+  0  18172 03:00:30.08   0.5700A   3.1583   0.7934  -0.8492  0.055  0.00   0.000      0.  0.846E+00  0.631E-01  0.776E-03  0.188E-04   46   2  18   20  21   8   19  14   3    0.000    0.000       0
+  0  18183 03:00:36.35   0.5670A   3.1769   0.8804  -0.8836  0.055  0.00   0.000      0.  0.846E+00  0.631E-01  0.767E-03  0.172E-04   46   1  24   20  23   8   18  13   3    0.000    0.000       0
+  0  18193 03:00:42.03   0.5690A   3.1655  -0.7673  -0.7820  0.056  0.00   0.000      0.  0.845E+00  0.630E-01  0.769E-03  0.168E-04   46   1  31   21  24   6   17  13   4    0.000    0.000       0
+  0  18204 03:00:48.39   0.5870A   3.0668  -0.8348  -0.8145  0.056  0.00   0.000      0.  0.845E+00  0.627E-01  0.793E-03  0.156E-04   46   1  39   19   9   9   17  12   6    0.000    0.000       0
+  0  18214 03:00:54.34   0.6000A   2.9997  -0.8407  -0.7829  0.057  0.00   0.000      0.  0.845E+00  0.623E-01  0.814E-03  0.158E-04   46   1   7   18   9   9   36  13  31    0.000    0.000       0
+  0  18224 03:01:00.30   0.5910A   3.0462  -0.7568  -0.7863  0.057  0.00   0.000      0.  0.845E+00  0.618E-01  0.797E-03  0.150E-04   45   4  21   17   9   9   17  10   8    0.000    0.000       0
+  0  18234 03:01:06.19   0.5880A   3.0614   0.6807  -0.7170  0.057  0.00   0.000      0.  0.844E+00  0.614E-01  0.785E-03  0.145E-04   45   1  25   28  16  14   28  21  32    0.000    0.000       0
+  0  18244 03:01:12.05   0.5820A   3.0929   0.7036  -0.7096  0.056  0.00   0.000      0.  0.844E+00  0.611E-01  0.772E-03  0.151E-04   45   1  35   28  17  16   13  17   8    0.000    0.000       0
+  0  18255 03:01:18.43   0.5820A   3.0910  -0.7117  -0.7445  0.056  0.00   0.000      0.  0.844E+00  0.608E-01  0.764E-03  0.156E-04   44  24  25   28  37  32   13  14   8    0.000    0.000       0
+  0  18265 03:01:24.29   0.5860A   3.0730   0.7635  -0.7723  0.056  0.00   0.000      0.  0.843E+00  0.606E-01  0.762E-03  0.160E-04   46   1  11   25  27   9   14  20   9    0.000    0.000       0
+  0  18275 03:01:30.10   0.5820A   3.0954   0.7718  -0.7577  0.056  0.00   0.000      0.  0.843E+00  0.604E-01  0.751E-03  0.158E-04   44   9  13   25  29  10   13  20   9    0.000    0.000       0
+  0  18286 03:01:36.47   0.5720A   3.1494   0.7574  -0.7313  0.056  0.00   0.000      0.  0.842E+00  0.601E-01  0.738E-03  0.156E-04   44  10  23   25  30  12   13  20   8    0.000    0.000       0
+  0  18296 03:01:42.10   0.5610A   3.2102  -0.7862  -0.7781  0.056  0.00   0.000      0.  0.842E+00  0.598E-01  0.726E-03  0.160E-04   44  10  24   23  18   7   14  22   9    0.000    0.000       0
+  0  18307 03:01:48.27   0.5530A   3.2540  -0.7989  -0.8499  0.056  0.00   0.000      0.  0.841E+00  0.595E-01  0.711E-03  0.174E-04   43  11  32   23  17  10   13  21   9    0.000    0.000       0
+  0  18318 03:01:54.40   0.5740A   3.1368  -0.8354  -0.8293  0.057  0.00   0.000      0.  0.840E+00  0.592E-01  0.735E-03  0.199E-04   44  11  35   23  14  14   12  22   9    0.000    0.000       0
+  0  18328 03:02:00.30   0.5960A   3.0186  -0.8676  -0.7630  0.058  0.00   0.000      0.  0.840E+00  0.590E-01  0.767E-03  0.226E-04   46  20  11   23  12  16   11  20   9    0.000    0.000       0
+  0  18338 03:02:06.23   0.5900A   3.0528  -0.8678  -0.8210  0.059  0.00   0.000      0.  0.839E+00  0.587E-01  0.760E-03  0.214E-04   45  20  18   23  11  18   17  23   9    0.000    0.000       0
+  0  18348 03:02:12.05   0.5800A   3.1014  -0.7882  -0.7437  0.060  0.00   0.000      0.  0.838E+00  0.584E-01  0.737E-03  0.186E-04   45  25   0   23  10  21   17  29   9    0.000    0.000       0
+  0  18359 03:02:18.47   0.5870A   3.0654  -0.7974  -0.8034  0.060  0.00   0.000      0.  0.838E+00  0.581E-01  0.734E-03  0.175E-04   46  20  35   23  10  24   16  28   9    0.000    0.000       0
+  0  18369 03:02:24.33   0.5820A   3.0928  -0.7649  -0.7892  0.061  0.00   0.000      0.  0.837E+00  0.577E-01  0.721E-03  0.172E-04   45  25  17    5  28   4   16  27   9    0.000    0.000       0
+  0  18379 03:02:30.13   0.5800A   3.1039   0.7435  -0.7532  0.061  0.00   0.000      0.  0.837E+00  0.575E-01  0.719E-03  0.178E-04   45  20  11   32  13  38   15  27   9    0.000    0.000       0
+  0  18390 03:02:36.51   0.5810A   3.1006   0.7567  -0.6513  0.061  0.00   0.000      0.  0.836E+00  0.573E-01  0.714E-03  0.169E-04   46  20  19   32  14   2   14  24   9    0.000    0.000       0
+  0  18400 03:02:42.32   0.5790A   3.1074  -0.7140  -0.6815  0.062  0.00   0.000      0.  0.836E+00  0.571E-01  0.706E-03  0.157E-04   46  25   3    5  24   6   16  22   9    0.000    0.000       0
+  0  18410 03:02:48.06   0.5730A   3.1430  -0.7317  -0.7030  0.062  0.00   0.000      0.  0.835E+00  0.570E-01  0.693E-03  0.159E-04   45  25  10   26  24  39   15  22   9    0.000    0.000       0
+  0  18421 03:02:54.40   0.5780A   3.1152   0.7424  -0.7310  0.063  0.00   0.000      0.  0.835E+00  0.568E-01  0.693E-03  0.164E-04   46  25  19   23  28  18   15  22   9    0.000    0.000       0
+  0  18431 03:03:00.17   0.5760A   3.1269   0.7727  -0.7747  0.063  0.00   0.000      0.  0.834E+00  0.566E-01  0.683E-03  0.153E-04   45  25  27   27  34  32   15  22   9    0.000    0.000       0
+  0  18442 03:03:06.52   0.5800A   3.1021   0.7202  -0.8277  0.064  0.00   0.000      0.  0.834E+00  0.564E-01  0.673E-03  0.136E-04   45  21  26   27  35  35   16  19   9    0.000    0.000       0
+  0  18452 03:03:12.28   0.5730A   3.1398  -0.6798  -0.8651  0.065  0.00   0.000      0.  0.833E+00  0.561E-01  0.656E-03  0.140E-04   45  21  33   31  20  19   17  18   9    0.000    0.000       0
+  0  18463 03:03:18.56   0.5710A   3.1525  -0.6684  -0.8915  0.066  0.00   0.000      0.  0.833E+00  0.559E-01  0.638E-03  0.133E-04   46  21   2   31  19  23   17  16   9    0.000    0.000       0
+  0  18473 03:03:24.26   0.5700A   3.1590   0.7877  -0.9428  0.067  0.00   0.000      0.  0.833E+00  0.556E-01  0.621E-03  0.125E-04   46  21  10   45  12  30   16  16   9    0.000    0.000       0
+  0  18484 03:03:30.50   0.5650A   3.1856   0.8605  -0.9255  0.067  0.00   0.000      0.  0.833E+00  0.552E-01  0.607E-03  0.123E-04   45  21  18   45  13  35   16  15   9    0.000    0.000       0
+  0  18494 03:03:36.20   0.5760A   3.1263   0.7466  -0.8623  0.067  0.00   0.000      0.  0.833E+00  0.550E-01  0.613E-03  0.132E-04   45  21  25   46  14   1   15  15   9    0.000    0.000       0
+  0  18505 03:03:42.49   0.5690A   3.1617   0.6753  -0.7801  0.067  0.00   0.000      0.  0.833E+00  0.548E-01  0.599E-03  0.127E-04   46  21  36   45  14   7   14  16   9    0.000    0.000       0
+  0  18515 03:03:48.21   0.5700A   3.1570   0.6027  -0.7141  0.066  0.00   0.000      0.  0.833E+00  0.546E-01  0.592E-03  0.118E-04   46  25  15   44  16  11   13  14   9    0.000    0.000       0
+  0  18526 03:03:54.47   0.5700A   3.1603   0.6036  -0.6781  0.065  0.00   0.000      0.  0.834E+00  0.545E-01  0.583E-03  0.104E-04   46  25  23   30  16  24   12  14   9    0.000    0.000       0
+  0  18536 03:04:00.21   0.5760A   3.1261   0.5427  -0.6423  0.063  0.00   0.000      0.  0.834E+00  0.545E-01  0.584E-03  0.112E-04   46  25  31   44  18  24   11  14   9    0.000    0.000       0
+  0  18546 03:04:06.01   0.5840A   3.0816   0.5661  -0.6058  0.061  0.00   0.000      0.  0.835E+00  0.545E-01  0.589E-03  0.130E-04   46  25  39   27  28   6   10  14   9    0.000    0.000       0
+  0  18557 03:04:12.47   0.5900A   3.0500   0.6512  -0.6724  0.060  0.00   0.000      0.  0.835E+00  0.547E-01  0.600E-03  0.145E-04   46  25   7   27  29  10   27  29  32    0.000    0.000       0
+  0  18567 03:04:18.38   0.5870A   3.0655   0.6339  -0.6074  0.059  0.00   0.000      0.  0.836E+00  0.551E-01  0.599E-03  0.149E-04   45  26  21   27  30  14   27  30  34    0.000    0.000       0
+  0  18577 03:04:24.20   0.5790A   3.1066   0.5964  -0.6473  0.058  0.00   0.000      0.  0.837E+00  0.555E-01  0.596E-03  0.138E-04   45  26  29   20  22   8   36  17  28    0.000    0.000       0
+  0  18588 03:04:30.54   0.5750A   3.1305   0.5842  -0.6421  0.058  0.00   0.000      0.  0.837E+00  0.560E-01  0.589E-03  0.120E-04   46  26  38   26  33   7   35  17  34    0.000    0.000       0
+  0  18598 03:04:36.34   0.5820A   3.0938   0.6586  -0.5891  0.059  0.00   0.000      0.  0.838E+00  0.564E-01  0.594E-03  0.123E-04   43  26  37   20  30   9   34  17  39    0.000    0.000       0
+  0  18608 03:04:42.12   0.5770A   3.1193  -0.6576  -0.6710  0.060  0.00   0.000      0.  0.838E+00  0.569E-01  0.587E-03  0.129E-04   43  26   5   20  20   8   18  19   9    0.000    0.000       0
+  0  18619 03:04:48.46   0.5770A   3.1173   0.6366  -0.7152  0.060  0.00   0.000      0.  0.839E+00  0.573E-01  0.584E-03  0.124E-04   43  26  13   39  39  39   17  18   9    0.000    0.000       0
+  0  18629 03:04:54.26   0.5810A   3.0961  -0.6561  -0.7038  0.061  0.00   0.000      0.  0.839E+00  0.577E-01  0.588E-03  0.124E-04   44  25  22   32  18   5   17  21   9    0.000    0.000       0
+  0  18639 03:05:00.03   0.5750A   3.1324  -0.6492  -0.7597  0.061  0.00   0.000      0.  0.839E+00  0.580E-01  0.576E-03  0.122E-04   44  25  30   32  18  10   17  22   9    0.000    0.000       0
+  0  18650 03:05:06.34   0.5710A   3.1520  -0.6162  -0.7464  0.062  0.00   0.000      0.  0.840E+00  0.584E-01  0.568E-03  0.123E-04   44  25  38   35  20  29   17  24   9    0.000    0.000       0
+  0  18660 03:05:12.06   0.5720A   3.1460   0.6075  -0.7192  0.062  0.00   0.000      0.  0.840E+00  0.589E-01  0.568E-03  0.125E-04   44  25   5   23  32  27   16  24   9    0.000    0.000       0
+  0  18671 03:05:18.38   0.5770A   3.1183   0.6368  -0.7126  0.062  0.00   0.000      0.  0.840E+00  0.594E-01  0.569E-03  0.124E-04   44  25  13   22  32  29   17  19   9    0.000    0.000       0
+  0  18681 03:05:24.19   0.5830A   3.0859   0.6480  -0.8194  0.061  0.00   0.000      0.  0.840E+00  0.600E-01  0.569E-03  0.121E-04   46  24  20   40  34   2   32  18  26    0.000    0.000       0
+  0  18691 03:05:30.04   0.5870A   3.0640  -0.6481  -0.8297  0.060  0.00   0.000      0.  0.840E+00  0.607E-01  0.574E-03  0.122E-04   46  24  27   20  22   8   31  18  31    0.000    0.000       0
+  0  18702 03:05:36.48   0.5800A   3.1017  -0.6611  -0.6718  0.058  0.00   0.000      0.  0.840E+00  0.614E-01  0.571E-03  0.127E-04   43  29  30   20  19   8   31  18  37    0.000    0.000       0
+  0  18712 03:05:42.27   0.5770A   3.1181  -0.7549   0.5781  0.057  0.00   0.000      0.  0.841E+00  0.621E-01  0.567E-03  0.127E-04   41  27   0   20  19   8   38  19  26    0.000    0.000       0
+  0  18722 03:05:48.05   0.5760A   3.1270  -0.6879  -0.6148  0.056  0.00   0.000      0.  0.841E+00  0.627E-01  0.566E-03  0.129E-04   44  27  19   20  18   8   25  20  25    0.000    0.000       0
+  0  18733 03:05:54.40   0.5770A   3.1183   0.6783  -0.6268  0.055  0.00   0.000      0.  0.841E+00  0.634E-01  0.575E-03  0.132E-04   44  27  27   22  30   7   26  19  30    0.000    0.000       0
+  0  18743 03:06:00.13   0.5710A   3.1543   0.6755  -0.6053  0.055  0.00   0.000      0.  0.841E+00  0.642E-01  0.576E-03  0.137E-04   46  30  11   21  29   8   26  18  34    0.000    0.000       0
+  0  18754 03:06:06.42   0.5760A   3.1252   1.1333  -0.9843  0.057  0.00   0.000      0.  0.842E+00  0.649E-01  0.598E-03  0.152E-04   39  27  31   20  29   9   18  26   9    0.000    0.000       0
+  0  18764 03:06:12.24   0.5780A   3.1136   0.9787  -1.0590  0.057  0.00   0.000      0.  0.842E+00  0.654E-01  0.614E-03  0.158E-04   42  26  36   18  30   9   17  26   9    0.000    0.000       0
+  0  18775 03:06:18.55   0.5690A   3.1645   0.8133  -1.0310  0.058  0.00   0.000      0.  0.841E+00  0.657E-01  0.613E-03  0.144E-04   42  26   4   16  31   9   16  25   9    0.000    0.000       0
+  0  18785 03:06:24.29   0.5750A   3.1309   0.7951  -0.9976  0.058  0.00   0.000      0.  0.841E+00  0.658E-01  0.620E-03  0.135E-04   42  26  11   21  33  21   15  25   9    0.000    0.000       0
+  0  18795 03:06:30.09   0.5770A   3.1188   0.7615  -0.9353  0.058  0.00   0.000      0.  0.841E+00  0.658E-01  0.629E-03  0.127E-04   46  30  35   21  34  24   13  25   9    0.000    0.000       0
+  0  18806 03:06:36.42   0.5740A   3.1381   0.7293  -0.9112  0.058  0.00   0.000      0.  0.841E+00  0.659E-01  0.633E-03  0.126E-04   45  29   0   21  35  28   16  24   9    0.000    0.000       0
+  0  18816 03:06:42.16   0.5770A   3.1213   0.7228  -0.8616  0.057  0.00   0.000      0.  0.840E+00  0.660E-01  0.644E-03  0.134E-04   45  29   7   24  34   3   15  24   9    0.000    0.000       0
+  0  18827 03:06:48.52   0.5770A   3.1196  -0.7753  -0.7644  0.057  0.00   0.000      0.  0.840E+00  0.661E-01  0.641E-03  0.118E-04   43  31  16   20  24   8   14  24   9    0.000    0.000       0
+  0  18837 03:06:54.33   0.5870A   3.0668  -1.0450  -0.7207  0.057  0.00   0.000      0.  0.840E+00  0.662E-01  0.649E-03  0.122E-04   46  30  22   20  23   8   17  18   9    0.000    0.000       0
+  0  18847 03:07:00.24   0.5880A   3.0601  -0.9572  -0.8419  0.057  0.00   0.000      0.  0.839E+00  0.663E-01  0.652E-03  0.126E-04   42  24  18   20  21   8   17  19   9    0.000    0.000       0
+  0  18857 03:07:06.15   0.5940A   3.0306   0.8939  -0.8633  0.056  0.00   0.000      0.  0.838E+00  0.663E-01  0.663E-03  0.139E-04   44  30   8   20  30   9   16  19   9    0.000    0.000       0
+  0  18867 03:07:12.03   0.5830A   3.0854   1.0320  -0.8158  0.056  0.00   0.000      0.  0.838E+00  0.664E-01  0.655E-03  0.151E-04   44  30  15   20  30   9   14  19   9    0.000    0.000       0
+  0  18878 03:07:18.38   0.5750A   3.1309   1.0367  -0.7412  0.056  0.00   0.000      0.  0.837E+00  0.665E-01  0.647E-03  0.143E-04   44  30  23   20  30   9   13  19   9    0.000    0.000       0
+  0  18888 03:07:24.09   0.5730A   3.1402   0.8715  -0.6690  0.057  0.00   0.000      0.  0.837E+00  0.666E-01  0.639E-03  0.139E-04   44  30  30   20  30   9   12  18   9    0.000    0.000       0
+  0  18899 03:07:30.41   0.5720A   3.1442   0.7425  -0.6713  0.058  0.00   0.000      0.  0.836E+00  0.667E-01  0.637E-03  0.152E-04   43  30   0   40  36  16   16  14   9    0.000    0.000       0
+  0  18909 03:07:36.06   0.5630A   3.1966   0.7131  -0.7092  0.058  0.00   0.000      0.  0.836E+00  0.669E-01  0.628E-03  0.153E-04   42  30   6   28  37  38   17  24   9    0.000    0.000       0
+  0  18920 03:07:42.25   0.5690A   3.1632   0.7547  -0.8574  0.059  0.00   0.000      0.  0.835E+00  0.672E-01  0.635E-03  0.134E-04   42  30  14   19  28   9   16  23   9    0.000    0.000       0
+  0  18930 03:07:48.01   0.5860A   3.0692  -0.7506  -0.9560  0.060  0.00   0.000      0.  0.835E+00  0.674E-01  0.650E-03  0.126E-04   44   2  20   35  37  38   16  22   9    0.000    0.000       0
+  0  18941 03:07:54.47   0.5890A   3.0538  -0.8160  -0.9212  0.060  0.00   0.000      0.  0.834E+00  0.675E-01  0.650E-03  0.117E-04   41  30  31   32  34  36   15  20   9    0.000    0.000       0
+  0  18951 03:08:00.38   0.5900A   3.0528  -0.8053  -0.8824  0.060  0.00   0.000      0.  0.834E+00  0.676E-01  0.649E-03  0.115E-04   41  31  38   20  25   8   14  19   9    0.000    0.000       0
+  0  18961 03:08:06.23   0.5830A   3.0865   0.7820  -0.8218  0.061  0.00   0.000      0.  0.833E+00  0.677E-01  0.635E-03  0.110E-04   46  35   2   40   4  29   14  18   8    0.000    0.000       0
+  0  18971 03:08:12.07   0.5870A   3.0648   0.7831  -0.8226  0.061  0.00   0.000      0.  0.833E+00  0.678E-01  0.641E-03  0.129E-04   46  35   9   40   4  35   12  18   8    0.000    0.000       0
+  0  18982 03:08:18.54   0.5830A   3.0876  -0.8816  -0.7636  0.059  0.00   0.000      0.  0.832E+00  0.680E-01  0.646E-03  0.157E-04   45  35  20   19  27   9   12  17   8    0.000    0.000       0
+  0  18992 03:08:24.33   0.5800A   3.1055  -0.9494  -0.7196  0.058  0.00   0.000      0.  0.832E+00  0.681E-01  0.650E-03  0.174E-04   45  35  28   19  26   9   10  17   8    0.000    0.000       0
+  0  19002 03:08:30.16   0.5850A   3.0771  -0.8652   0.7392  0.058  0.00   0.000      0.  0.832E+00  0.683E-01  0.654E-03  0.186E-04   45  35  35   17  25   9   34   7  35    0.000    0.000       0
+  0  19012 03:08:36.03   0.5880A   3.0595   0.8239   0.7510  0.057  0.00   0.000      0.  0.831E+00  0.684E-01  0.655E-03  0.179E-04   46  35   4   36  10  15   38   3  19    0.000    0.000       0
+  0  19023 03:08:42.53   0.5950A   3.0229   0.8394  -0.7039  0.056  0.00   0.000      0.  0.831E+00  0.686E-01  0.661E-03  0.187E-04   46  35  12   36  11  19   32   4  11    0.000    0.000       0
+  0  19033 03:08:48.49   0.5970A   3.0176   0.8522  -0.7242  0.055  0.00   0.000      0.  0.831E+00  0.688E-01  0.668E-03  0.203E-04   46  35  20   37  10  23   16  33  22    0.000    0.000       0
+  0  19043 03:08:54.47   0.6010A   2.9928   0.8183   0.7034  0.055  0.00   0.000      0.  0.830E+00  0.691E-01  0.678E-03  0.211E-04   43  36  25   19  30   9   37   6   7    0.000    0.000       0
+  0  19053 03:09:00.50   0.6020A   2.9896   0.8040  -0.7755  0.056  0.00   0.000      0.  0.830E+00  0.695E-01  0.683E-03  0.190E-04   44  34   6   38   2  30   31  34  29    0.000    0.000       0
+  0  19063 03:09:06.34   0.5750A   3.1313   0.7813  -0.7732  0.057  0.00   0.000      0.  0.829E+00  0.700E-01  0.659E-03  0.169E-04   45  39   3   39  11  38   28  28  37    0.000    0.000       0
+  0  19073 03:09:12.03   0.5680A   3.1702  -0.7531  -0.8114  0.059  0.00   0.000      0.  0.829E+00  0.704E-01  0.652E-03  0.149E-04   43  34  22   20  30   8   28  32   0    0.000    0.000       0
+  0  19084 03:09:18.31   0.5650A   3.1845  -0.8721  -0.7918  0.061  0.00   0.000      0.  0.828E+00  0.708E-01  0.658E-03  0.147E-04   46  36  21   20  12   9   27  32   5    0.000    0.000       0
+  0  19095 03:09:24.52   0.5650A   3.1863   0.7238  -0.8229  0.064  0.00   0.000      0.  0.827E+00  0.711E-01  0.664E-03  0.142E-04   45  36  28   36   2   7   19  14   9    0.000    0.000       0
+  0  19105 03:09:30.17   0.5680A   3.1718  -0.7894  -0.8465  0.065  0.00   0.000      0.  0.826E+00  0.711E-01  0.666E-03  0.140E-04   45  36  35   41   0  32   18  15   9    0.000    0.000       0
+  0  19116 03:09:36.54   0.5870A   3.0671  -0.7791  -0.7614  0.067  0.00   0.000      0.  0.826E+00  0.709E-01  0.685E-03  0.144E-04   46  36   3   41  39  37   17  16   9    0.000    0.000       0
+  0  19126 03:09:42.47   0.5920A   3.0383  -0.7649  -0.7506  0.066  0.00   0.000      0.  0.825E+00  0.707E-01  0.692E-03  0.137E-04   46  37   9   41  37   2   29  37  17    0.000    0.000       0
+  0  19136 03:09:48.45   0.6000A   2.9990  -0.8101  -0.7580  0.065  0.00   0.000      0.  0.824E+00  0.706E-01  0.706E-03  0.152E-04   46  36  19   28  22  32   24  37  21    0.000    0.000       0
+  0  19146 03:09:54.49   0.6050A   2.9739  -0.8367  -0.8314  0.064  0.00   0.000      0.  0.824E+00  0.707E-01  0.718E-03  0.164E-04   45  30   1   29  21  38   21  37  26    0.000    0.000       0
+  0  19156 03:10:00.55   0.6060A   2.9699   0.7858  -0.8815  0.062  0.00   0.000      0.  0.823E+00  0.709E-01  0.726E-03  0.169E-04   45  30   9   22  29   8   20  37  30    0.000    0.000       0
+  0  19166 03:10:06.57   0.5960A   3.0200   0.8752  -0.9546  0.061  0.00   0.000      0.  0.822E+00  0.712E-01  0.719E-03  0.153E-04   45  30  17   20  29   8   22  37  34    0.000    0.000       0
+  0  19176 03:10:12.50   0.5960A   3.0188   0.7994  -0.9023  0.060  0.00   0.000      0.  0.822E+00  0.714E-01  0.731E-03  0.183E-04   45  30  24   20  30   9   21  37  38    0.000    0.000       0
+  0  19186 03:10:18.48   0.6030A   2.9864   0.8284  -0.8868  0.060  0.00   0.000      0.  0.821E+00  0.718E-01  0.755E-03  0.248E-04   46  30  32   19  30   9   21  38   1    0.000    0.000       0
+  0  19196 03:10:24.59   0.6130A   2.9358  -0.9549  -1.1191  0.059  0.00   0.000      0.  0.820E+00  0.723E-01  0.772E-03  0.263E-04   46  30   0   19  22   9   17  24   9    0.000    0.000       0
+  0  19205 03:10:30.09   0.6070A   2.9675   0.7946  -1.2832  0.060  0.00   0.000      0.  0.819E+00  0.726E-01  0.757E-03  0.222E-04   45  30   7   17  28   9   16  25   9    0.000    0.000       0
+  0  19215 03:10:36.16   0.6100A   2.9485   0.7786  -1.2256  0.061  0.00   0.000      0.  0.818E+00  0.727E-01  0.754E-03  0.195E-04   46  30  15   45   6   2   15  26   9    0.000    0.000       0
+  0  19225 03:10:42.28   0.6150A   2.9281   0.7951  -1.0812  0.061  0.00   0.000      0.  0.817E+00  0.729E-01  0.764E-03  0.197E-04   46  30  22   46   7   9   13  26   9    0.000    0.000       0
+  0  19235 03:10:48.46   0.6200A   2.9038  -0.7708  -1.0291  0.061  0.00   0.000      0.  0.816E+00  0.731E-01  0.768E-03  0.188E-04   45  30  30   19  12   9   17  16   9    0.000    0.000       0
+  0  19244 03:10:54.02   0.6190A   2.9091  -0.7530  -1.1457  0.061  0.00   0.000      0.  0.815E+00  0.733E-01  0.763E-03  0.175E-04   45  30  37   40   6  16   16  18   9    0.000    0.000       0
+  0  19254 03:11:00.25   0.6230A   2.8903  -0.7369  -1.1339  0.061  0.00   0.000      0.  0.815E+00  0.735E-01  0.760E-03  0.171E-04   46  39  13   40   5  20   15  19   9    0.000    0.000       0
+  0  19264 03:11:06.42   0.6140A   2.9335  -0.7523  -1.0542  0.060  0.00   0.000      0.  0.814E+00  0.736E-01  0.740E-03  0.160E-04   46  39  20   35  37  19   13  19   9    0.000    0.000       0
+  0  19273 03:11:12.04   0.6300A   2.8560  -0.7969  -0.9263  0.060  0.00   0.000      0.  0.814E+00  0.739E-01  0.749E-03  0.162E-04   46  39  26   35  36  23   12  16   9    0.000    0.000       0
+  0  19283 03:11:18.31   0.6300A   2.8571  -0.7415  -0.8352  0.058  0.00   0.000      0.  0.813E+00  0.742E-01  0.744E-03  0.155E-04   46  32  25   31   3  18   11  16   9    0.000    0.000       0
+  0  19292 03:11:24.01   0.6390A   2.8172  -0.7352  -0.7654  0.057  0.00   0.000      0.  0.813E+00  0.745E-01  0.757E-03  0.149E-04   46  32  32   31   2  21   13  20   9    0.000    0.000       0
+  0  19302 03:11:30.20   0.6020A   2.9898  -0.7653  -0.7049  0.056  0.00   0.000      0.  0.813E+00  0.748E-01  0.718E-03  0.150E-04   43  36  22   25   5  31   10  20   8    0.000    0.000       0
+  0  19312 03:11:36.21   0.5950A   3.0262  -0.7315   0.8163  0.055  0.00   0.000      0.  0.812E+00  0.753E-01  0.714E-03  0.175E-04   43  36  28   11  25   9   19  10   8    0.000    0.000       0
+  0  19322 03:11:42.23   0.5990A   3.0039  -0.8264  -0.6751  0.054  0.00   0.000      0.  0.812E+00  0.758E-01  0.726E-03  0.222E-04   43  36  34   20  25   9    8  20   8    0.000    0.000       0
+  0  19332 03:11:48.29   0.6020A   2.9896  -1.0515   0.9057  0.054  0.00   0.000      0.  0.811E+00  0.763E-01  0.739E-03  0.250E-04   43  36   0   20  24   9   20  22   9    0.000    0.000       0
+  0  19342 03:11:54.39   0.6100A   2.9514  -1.0288   0.9913  0.055  0.00   0.000      0.  0.811E+00  0.769E-01  0.762E-03  0.288E-04   43  36   6   20  24   9   21  22   9    0.000    0.000       0
+  0  19352 03:12:00.62   0.6280A   2.8664  -0.9720  -1.0609  0.055  0.00   0.000      0.  0.810E+00  0.774E-01  0.788E-03  0.297E-04   43  39  16   20  24   9   18  27   9    0.000    0.000       0
+  0  19361 03:12:06.26   0.6290A   2.8597  -1.0102  -1.1452  0.055  0.00   0.000      0.  0.809E+00  0.778E-01  0.799E-03  0.297E-04   43   0  23   19  24   9   17  28   9    0.000    0.000       0
+  0  19371 03:12:12.57   0.6300A   2.8576   1.0862  -1.1911  0.057  0.00   0.000      0.  0.808E+00  0.780E-01  0.806E-03  0.279E-04   46  32  36   19  30   9   16  28   9    0.000    0.000       0
+  0  19380 03:12:18.18   0.6230A   2.8882   0.9562  -1.1300  0.058  0.00   0.000      0.  0.807E+00  0.781E-01  0.795E-03  0.274E-04   43  35  28   18  30   9   15  28   9    0.000    0.000       0
+  0  19390 03:12:24.25   0.6010A   2.9951  -0.8668   1.0770  0.059  0.00   0.000      0.  0.807E+00  0.781E-01  0.759E-03  0.242E-04   43  35  35   18   9   9   19  29   8    0.000    0.000       0
+  0  19400 03:12:30.37   0.6200A   2.9052   0.7361  -1.0480  0.059  0.00   0.000      0.  0.806E+00  0.779E-01  0.767E-03  0.217E-04   43  35   1   19   4  37   17  24   9    0.000    0.000       0
+  0  19409 03:12:36.11   0.6410A   2.8097  -0.7322  -0.9212  0.059  0.00   0.000      0.  0.805E+00  0.776E-01  0.778E-03  0.189E-04   46  33  27   18  29   8   16  24   9    0.000    0.000       0
+  0  19419 03:12:42.51   0.6410A   2.8094   0.7737  -0.8769  0.058  0.00   0.000      0.  0.805E+00  0.771E-01  0.773E-03  0.162E-04   46  33  34   21  32  35   15  23   9    0.000    0.000       0
+  0  19428 03:12:48.33   0.6490A   2.7718   0.7973  -0.8011  0.056  0.00   0.000      0.  0.804E+00  0.767E-01  0.785E-03  0.171E-04   44  33   5   21  33  39   13  10   9    0.000    0.000       0
+  0  19437 03:12:54.17   0.6470A   2.7834   0.8930   0.8523  0.055  0.00   0.000      0.  0.804E+00  0.765E-01  0.781E-03  0.177E-04   45  34  29   15  14   9   20  12   9    0.000    0.000       0
+  0  19447 03:13:00.62   0.6420A   2.8028   0.9801  -0.8940  0.053  0.00   0.000      0.  0.804E+00  0.763E-01  0.779E-03  0.188E-04   45  34  36   14  15   9   12  12   9    0.000    0.000       0
+  0  19456 03:13:06.40   0.6420A   2.8033   0.8756  -0.8439  0.052  0.00   0.000      0.  0.803E+00  0.762E-01  0.788E-03  0.213E-04   45  33  10   19  17   9   11  13   9    0.000    0.000       0
+  0  19465 03:13:12.06   0.6220A   2.8961   0.7948  -0.7964  0.051  0.00   0.000      0.  0.803E+00  0.763E-01  0.773E-03  0.233E-04   44  33  35   19  18   9   11  15   8    0.000    0.000       0
+  0  19475 03:13:18.10   0.6020A   2.9917   0.9153   0.7691  0.050  0.00   0.000      0.  0.802E+00  0.764E-01  0.759E-03  0.248E-04   44  33   2   20  30   9   20  19   9    0.000    0.000       0
+  0  19485 03:13:24.02   0.5960A   3.0210   1.2255  -0.8801  0.049  0.00   0.000      0.  0.801E+00  0.767E-01  0.756E-03  0.262E-04   44  33   8   18  30   9   20  28   8    0.000    0.000       0
+  0  19496 03:13:30.51   0.5890A   3.0548   1.0652  -1.0222  0.050  0.00   0.000      0.  0.801E+00  0.768E-01  0.740E-03  0.215E-04   44  33  16   17  31   9   17  25   9    0.000    0.000       0
+  0  19506 03:13:36.41   0.5920A   3.0389   0.7772  -1.1421  0.050  0.00   0.000      0.  0.800E+00  0.767E-01  0.747E-03  0.222E-04   44  33  23   17  30   9   16  23   9    0.000    0.000       0
+  0  19516 03:13:42.39   0.6030A   2.9853  -0.7451  -1.0350  0.051  0.00   0.000      0.  0.799E+00  0.767E-01  0.760E-03  0.241E-04   44  33  30   18  24   8   14  23   9    0.000    0.000       0
+  0  19526 03:13:48.48   0.6180A   2.9118  -0.7802  -0.9499  0.052  0.00   0.000      0.  0.799E+00  0.767E-01  0.774E-03  0.237E-04   43  32  24   17  28   9   12  24   9    0.000    0.000       0
+  0  19535 03:13:54.04   0.6230A   2.8912   0.9255  -0.9106  0.053  0.00   0.000      0.  0.798E+00  0.766E-01  0.776E-03  0.222E-04   43  32  31   20  30   9   12  25   8    0.000    0.000       0
+  0  19545 03:14:00.34   0.6350A   2.8357   0.9118  -0.9045  0.053  0.00   0.000      0.  0.797E+00  0.767E-01  0.785E-03  0.225E-04   41  34  11   19  30   9   10  25   8    0.000    0.000       0
+  0  19554 03:14:06.07   0.6390A   2.8172   0.9769  -0.8881  0.054  0.00   0.000      0.  0.797E+00  0.767E-01  0.782E-03  0.215E-04   41  34  18   19  30   9   10  23   8    0.000    0.000       0
+  0  19564 03:14:12.50   0.6450A   2.7896   0.8159  -0.9838  0.054  0.00   0.000      0.  0.796E+00  0.767E-01  0.781E-03  0.185E-04   43  32  13   18  30   9   17  26   9    0.000    0.000       0
+  0  19573 03:14:18.30   0.6410A   2.8094  -0.7142  -0.9232  0.054  0.00   0.000      0.  0.795E+00  0.767E-01  0.769E-03  0.178E-04   46  23  33   34  14  21   16  26   9    0.000    0.000       0
+  0  19582 03:14:24.10   0.6490A   2.7749  -0.7029  -0.7892  0.054  0.00   0.000      0.  0.795E+00  0.768E-01  0.769E-03  0.177E-04   46  23  39   34  13  24   15  26   9    0.000    0.000       0
+  0  19592 03:14:30.64   0.6520A   2.7591  -0.7410  -0.7558  0.054  0.00   0.000      0.  0.794E+00  0.770E-01  0.766E-03  0.180E-04   44  31   1   28  15   3   11  38   1    0.000    0.000       0
+  0  19601 03:14:36.49   0.6510A   2.7641  -0.8697  -0.7115  0.053  0.00   0.000      0.  0.794E+00  0.773E-01  0.766E-03  0.183E-04   44  31   8   28  15   6   10  38   3    0.000    0.000       0
+  0  19610 03:14:42.33   0.6520A   2.7628  -0.8119  -0.6528  0.052  0.00   0.000      0.  0.793E+00  0.775E-01  0.771E-03  0.190E-04   44  31  14   28  14   9   12   0   8    0.000    0.000       0
+  0  19619 03:14:48.20   0.6560A   2.7440  -0.7889   0.7614  0.051  0.00   0.000      0.  0.793E+00  0.778E-01  0.781E-03  0.218E-04   46  32  24   28  13  11   20  28   9    0.000    0.000       0
+  0  19628 03:14:54.11   0.6560A   2.7437  -0.7526   0.8344  0.051  0.00   0.000      0.  0.792E+00  0.782E-01  0.784E-03  0.227E-04   46  32  31    6  31   5   20  28   9    0.000    0.000       0
+  0  19637 03:15:00.04   0.6600A   2.7288   0.7184   0.7224  0.051  0.00   0.000      0.  0.792E+00  0.786E-01  0.794E-03  0.218E-04   46  32  38   17   4  20   20  27   9    0.000    0.000       0
+  0  19647 03:15:06.63   0.6540A   2.7544   0.7973  -0.6958  0.052  0.00   0.000      0.  0.791E+00  0.791E-01  0.793E-03  0.215E-04   43  30   3   20  30   9   10   2  21    0.000    0.000       0
+  0  19656 03:15:12.44   0.6400A   2.8145   0.7864  -0.6633  0.054  0.00   0.000      0.  0.791E+00  0.793E-01  0.781E-03  0.213E-04   43  30  10   23  29   7    9   2  24    0.000    0.000       0
+  0  19665 03:15:18.16   0.6340A   2.8409  -0.7524   0.6432  0.054  0.00   0.000      0.  0.791E+00  0.796E-01  0.777E-03  0.210E-04   43  30  17    7  28   9   10   0  27    0.000    0.000       0
+  0  19675 03:15:24.44   0.6240A   2.8831   0.7710   0.6671  0.055  0.00   0.000      0.  0.790E+00  0.798E-01  0.764E-03  0.215E-04   43  30  24   21  34  17   11   0  28    0.000    0.000       0
+  0  19684 03:15:30.02   0.6150A   2.9258   0.7647   0.6560  0.056  0.00   0.000      0.  0.790E+00  0.800E-01  0.752E-03  0.239E-04   43  30  31   15  14   9   11   0  30    0.000    0.000       0
+  0  19694 03:15:36.20   0.6210A   2.9008   0.7721  -0.7031  0.057  0.00   0.000      0.  0.789E+00  0.802E-01  0.761E-03  0.231E-04   43  30  38   13  15   9   29  35   6    0.000    0.000       0
+  0  19704 03:15:42.41   0.6210A   2.8998   0.7309  -0.8123  0.057  0.00   0.000      0.  0.789E+00  0.801E-01  0.765E-03  0.234E-04   42  35  30   13  15   9   15  22   9    0.000    0.000       0
+  0  19714 03:15:48.54   0.6070A   2.9662  -0.7745  -0.8921  0.058  0.00   0.000      0.  0.788E+00  0.801E-01  0.753E-03  0.243E-04   42  35  37   20  16   9   15  21   9    0.000    0.000       0
+  0  19724 03:15:54.60   0.6090A   2.9569  -0.8405  -0.8883  0.058  0.00   0.000      0.  0.787E+00  0.802E-01  0.759E-03  0.248E-04   42  35   4    2   1   3   15  20   9    0.000    0.000       0
+  0  19733 03:16:00.19   0.6270A   2.8696  -0.7794  -0.9177  0.060  0.00   0.000      0.  0.786E+00  0.803E-01  0.788E-03  0.255E-04   43  30  28    1   1   3   14  20   9    0.000    0.000       0
+  0  19743 03:16:06.49   0.6300A   2.8578   0.7564  -0.9096  0.061  0.00   0.000      0.  0.785E+00  0.805E-01  0.800E-03  0.264E-04   43  33  15   20  10   6   14  21   9    0.000    0.000       0
+  0  19752 03:16:12.15   0.6270A   2.8694   0.7452   0.9246  0.062  0.00   0.000      0.  0.784E+00  0.807E-01  0.803E-03  0.285E-04   46  28  37   21  15   8   20  10   9    0.000    0.000       0
+  0  19762 03:16:18.42   0.6250A   2.8787   0.7737   0.9606  0.063  0.00   0.000      0.  0.783E+00  0.810E-01  0.804E-03  0.291E-04   46  34  26   20  14   9   20  11   9    0.000    0.000       0
+  0  19771 03:16:24.06   0.6280A   2.8642   0.7341   1.0471  0.064  0.00   0.000      0.  0.782E+00  0.812E-01  0.801E-03  0.282E-04   46  34  33   19  14   9   20  11   9    0.000    0.000       0
+  0  19781 03:16:30.38   0.6360A   2.8318   0.7713   1.0254  0.065  0.00   0.000      0.  0.780E+00  0.813E-01  0.798E-03  0.247E-04   45  28  19   18  14   9   20  12   9    0.000    0.000       0
+  0  19790 03:16:36.10   0.6350A   2.8367  -0.8221   0.8978  0.065  0.00   0.000      0.  0.779E+00  0.814E-01  0.783E-03  0.212E-04   45  28  26   21  14   6   20  12   9    0.000    0.000       0
+  0  19800 03:16:42.44   0.6320A   2.8474  -0.7920   0.8201  0.066  0.00   0.000      0.  0.778E+00  0.813E-01  0.765E-03  0.181E-04   45  28  34   21  14   8   20  12   9    0.000    0.000       0
+  0  19809 03:16:48.14   0.6350A   2.8359  -0.7188  -0.8092  0.066  0.00   0.000      0.  0.777E+00  0.810E-01  0.761E-03  0.165E-04   46  28   2    5   4  24   17  18   9    0.000    0.000       0
+  0  19819 03:16:54.46   0.6300A   2.8562  -0.7740  -0.8123  0.065  0.00   0.000      0.  0.776E+00  0.807E-01  0.755E-03  0.174E-04   46  28  10    5   4  26   15  18   8    0.000    0.000       0
+  0  19828 03:17:00.12   0.6260A   2.8759  -0.7750  -0.7767  0.065  0.00   0.000      0.  0.775E+00  0.803E-01  0.745E-03  0.166E-04   43  33   2    4   4  29   17  15   9    0.000    0.000       0
+  0  19838 03:17:06.42   0.6310A   2.8533  -0.7492  -0.7842  0.064  0.00   0.000      0.  0.775E+00  0.798E-01  0.745E-03  0.153E-04   46  27  24    5   2  30   16  16   9    0.000    0.000       0
+  0  19847 03:17:12.11   0.6300A   2.8554  -0.7021  -0.7187  0.064  0.00   0.000      0.  0.774E+00  0.793E-01  0.739E-03  0.152E-04   44  32  21    4   3  32   15  16   9    0.000    0.000       0
+  0  19857 03:17:18.38   0.6240A   2.8860   0.7379  -0.8182  0.064  0.00   0.000      0.  0.773E+00  0.788E-01  0.723E-03  0.150E-04   44  32  28   19  34   9   16  33   7    0.000    0.000       0
+  0  19867 03:17:24.60   0.6130A   2.9371   0.7075  -0.9074  0.063  0.00   0.000      0.  0.773E+00  0.784E-01  0.707E-03  0.149E-04   43  32  31   20  35  14   15  33   9    0.000    0.000       0
+  0  19876 03:17:30.11   0.6080A   2.9607   0.6434  -0.8012  0.063  0.00   0.000      0.  0.773E+00  0.781E-01  0.705E-03  0.192E-04   43  31  39   20  36  18   15  33  11    0.000    0.000       0
+  0  19886 03:17:36.11   0.6010A   2.9940   0.6560   0.7435  0.062  0.00   0.000      0.  0.772E+00  0.781E-01  0.708E-03  0.257E-04   43  31   5   19  36  20   20  29   9    0.000    0.000       0
+  0  19896 03:17:42.13   0.6110A   2.9465   0.7121   0.7794  0.061  0.00   0.000      0.  0.772E+00  0.784E-01  0.722E-03  0.277E-04   43  31  12   20  37  25   20  27   9    0.000    0.000       0
+  0  19906 03:17:48.27   0.6160A   2.9242   0.7425   0.7158  0.061  0.00   0.000      0.  0.771E+00  0.788E-01  0.730E-03  0.255E-04   41  27  33   18  37  28   20  11   9    0.000    0.000       0
+  0  19916 03:17:54.50   0.6210A   2.9007   0.7650   0.7890  0.061  0.00   0.000      0.  0.771E+00  0.791E-01  0.723E-03  0.219E-04   44  30  24   18  38  31   20  12   9    0.000    0.000       0
+  0  19925 03:18:00.06   0.6180A   2.9122   0.7957   0.8700  0.062  0.00   0.000      0.  0.771E+00  0.792E-01  0.711E-03  0.205E-04   44  30  31   18   0  34   20  11   9    0.000    0.000       0
+  0  19935 03:18:06.22   0.6150A   2.9264   0.7431   0.7826  0.061  0.00   0.000      0.  0.771E+00  0.792E-01  0.706E-03  0.203E-04   44  29   7   19  30   9   20  11   9    0.000    0.000       0
+  0  19945 03:18:12.34   0.6120A   2.9390   0.7360  -0.7373  0.061  0.00   0.000      0.  0.770E+00  0.790E-01  0.701E-03  0.198E-04   44  29  14   17   1   0   36  29  19    0.000    0.000       0
+  0  19955 03:18:18.49   0.6180A   2.9138  -0.7159  -0.8176  0.060  0.00   0.000      0.  0.770E+00  0.787E-01  0.702E-03  0.183E-04   44  29  21   21  11   8   17  28   9    0.000    0.000       0
+  0  19964 03:18:24.08   0.6240A   2.8831  -0.7088  -0.7782  0.059  0.00   0.000      0.  0.770E+00  0.783E-01  0.699E-03  0.172E-04   44  29  27   21  11   8   16  28   9    0.000    0.000       0
+  0  19974 03:18:30.34   0.6300A   2.8593   0.6972  -0.7343  0.058  0.00   0.000      0.  0.770E+00  0.779E-01  0.703E-03  0.194E-04   46  32   4   14  13   9   14  23   9    0.000    0.000       0
+  0  19983 03:18:36.02   0.6280A   2.8666   0.7680  -0.7244  0.058  0.00   0.000      0.  0.770E+00  0.775E-01  0.697E-03  0.196E-04   46  32  13   20  18   8   13  23   9    0.000    0.000       0
+  0  19993 03:18:42.32   0.6370A   2.8261   0.7783  -0.6843  0.058  0.00   0.000      0.  0.770E+00  0.769E-01  0.699E-03  0.183E-04   45  32  19   13  14   9   13  23   8    0.000    0.000       0
+  0  20002 03:18:48.01   0.6320A   2.8477   0.7821  -0.6939  0.058  0.00   0.000      0.  0.769E+00  0.764E-01  0.692E-03  0.169E-04   46  33  26   12  15   9   13  24   8    0.000    0.000       0
+  0  20012 03:18:54.32   0.6320A   2.8498   0.7358  -0.7245  0.059  0.00   0.000      0.  0.769E+00  0.760E-01  0.692E-03  0.166E-04   46  33  34   11  16   9   11  24   8    0.000    0.000       0
+  0  20021 03:19:00.06   0.6440A   2.7930   0.7000  -0.7167  0.059  0.00   0.000      0.  0.769E+00  0.757E-01  0.706E-03  0.163E-04   45  33   1   11  17   9   10  24   8    0.000    0.000       0
+  0  20031 03:19:06.44   0.6340A   2.8372   0.6877  -0.6897  0.059  0.00   0.000      0.  0.769E+00  0.754E-01  0.698E-03  0.163E-04   44  29  39   39  16  35    9  24   8    0.000    0.000       0
+  0  20040 03:19:12.13   0.6330A   2.8451   0.6633  -0.6823  0.059  0.00   0.000      0.  0.769E+00  0.752E-01  0.695E-03  0.166E-04   44  29   6   39  17  38    8  24   7    0.000    0.000       0
+  0  20050 03:19:18.47   0.6330A   2.8422  -0.6587  -0.6959  0.059  0.00   0.000      0.  0.768E+00  0.750E-01  0.692E-03  0.161E-04   44  30  11   20  20   8   17  19   9    0.000    0.000       0
+  0  20059 03:19:24.24   0.6460A   2.7866  -0.6764  -0.6567  0.058  0.00   0.000      0.  0.768E+00  0.748E-01  0.707E-03  0.171E-04   45  30  24   20  23   8   16  19   9    0.000    0.000       0
+  0  20068 03:19:30.02   0.6420A   2.8047  -0.6926  -0.6264  0.058  0.00   0.000      0.  0.768E+00  0.748E-01  0.705E-03  0.188E-04   45  30  30   20  22   8   16  21   9    0.000    0.000       0
+  0  20078 03:19:36.45   0.6420A   2.8040   0.6968  -0.5970  0.057  0.00   0.000      0.  0.767E+00  0.750E-01  0.708E-03  0.231E-04   45  26  16   22  36  18   27  31  12    0.000    0.000       0
+  0  20087 03:19:42.19   0.6380A   2.8213   0.7232  -0.6525  0.057  0.00   0.000      0.  0.767E+00  0.753E-01  0.706E-03  0.244E-04   46  28   8   22  37  21   27  32  16    0.000    0.000       0
+  0  20097 03:19:48.57   0.6400A   2.8107   0.7139  -0.6147  0.057  0.00   0.000      0.  0.766E+00  0.758E-01  0.713E-03  0.236E-04   46  25  32   21  39  27    7  24   7    0.000    0.000       0
+  0  20106 03:19:54.29   0.6310A   2.8537   0.7354   0.7040  0.057  0.00   0.000      0.  0.766E+00  0.764E-01  0.710E-03  0.233E-04   46  24  37   21   1  31   20  10   9    0.000    0.000       0
+  0  20116 03:20:00.46   0.6130A   2.9366   0.7284   0.7653  0.058  0.00   0.000      0.  0.765E+00  0.770E-01  0.695E-03  0.223E-04   46  24   5   21   3  34   20  10   9    0.000    0.000       0
+  0  20125 03:20:06.05   0.6310A   2.8512   0.7584   0.7235  0.058  0.00   0.000      0.  0.764E+00  0.777E-01  0.725E-03  0.224E-04   46  28  38   20   3  38   20  10   9    0.000    0.000       0
+  0  20135 03:20:12.31   0.6190A   2.9084   0.7539   0.7568  0.058  0.00   0.000      0.  0.764E+00  0.785E-01  0.717E-03  0.198E-04   46  29   7   20  30   9   20  11   9    0.000    0.000       0
+  0  20145 03:20:18.48   0.6170A   2.9174  -0.7595   0.7684  0.059  0.00   0.000      0.  0.763E+00  0.792E-01  0.717E-03  0.168E-04   46  29  14   22  24   2   20  11   9    0.000    0.000       0
+  0  20154 03:20:24.08   0.6210A   2.8984   0.8080  -0.7337  0.060  0.00   0.000      0.  0.762E+00  0.796E-01  0.723E-03  0.159E-04   44  32  17   21  32   4   41   6  27    0.000    0.000       0
+  0  20164 03:20:30.26   0.6280A   2.8665  -0.7747  -0.8050  0.060  0.00   0.000      0.  0.762E+00  0.800E-01  0.727E-03  0.176E-04   44  32  24   21  24   6   41   5  32    0.000    0.000       0
+  0  20174 03:20:36.59   0.6390A   2.8178   0.7501  -0.8305  0.061  0.00   0.000      0.  0.761E+00  0.802E-01  0.735E-03  0.175E-04   44  29  35   19  30   9   17  18   9    0.000    0.000       0
+  0  20183 03:20:42.36   0.6400A   2.8142   0.7806  -0.7726  0.061  0.00   0.000      0.  0.760E+00  0.804E-01  0.729E-03  0.168E-04   46  27  11   41   8  36   16  18   9    0.000    0.000       0
+  0  20192 03:20:48.15   0.6480A   2.7793   0.7964  -0.7482  0.062  0.00   0.000      0.  0.760E+00  0.805E-01  0.727E-03  0.156E-04   43  33  36   41   7   1   18  29   8    0.000    0.000       0
+  0  20202 03:20:54.62   0.6450A   2.7927   0.8192  -0.6563  0.062  0.00   0.000      0.  0.759E+00  0.805E-01  0.720E-03  0.167E-04   42  33   1   41   8   5   40   5   9    0.000    0.000       0
+  0  20211 03:21:00.40   0.6460A   2.7877   0.8402  -0.6862  0.061  0.00   0.000      0.  0.758E+00  0.806E-01  0.718E-03  0.191E-04   42  33   6   40   6  10   18  28   9    0.000    0.000       0
+  0  20220 03:21:06.21   0.6500A   2.7673   0.8552  -0.6677  0.061  0.00   0.000      0.  0.758E+00  0.807E-01  0.713E-03  0.189E-04   42  33  12   40   6  14   14  22   8    0.000    0.000       0
+  0  20229 03:21:12.07   0.6490A   2.7723   0.7691  -0.6371  0.061  0.00   0.000      0.  0.757E+00  0.808E-01  0.704E-03  0.195E-04   41  32  22   40   7  18   29  22  35    0.000    0.000       0
+  0  20239 03:21:18.55   0.6460A   2.7865  -0.7353  -0.6299  0.061  0.00   0.000      0.  0.757E+00  0.809E-01  0.695E-03  0.180E-04   45  34  37   45   6   7   13  22   7    0.000    0.000       0
+  0  20248 03:21:24.38   0.6480A   2.7779  -0.7597  -0.6734  0.061  0.00   0.000      0.  0.756E+00  0.809E-01  0.695E-03  0.158E-04   45  34   3   45   5  11   35  23   7    0.000    0.000       0
+  0  20257 03:21:30.12   0.6340A   2.8411  -0.7090  -0.7143  0.062  0.00   0.000      0.  0.756E+00  0.807E-01  0.679E-03  0.140E-04   46  34  10   46   4  15   36  23   9    0.000    0.000       0
+  0  20267 03:21:36.47   0.6410A   2.8098  -0.6920  -0.8424  0.063  0.00   0.000      0.  0.756E+00  0.804E-01  0.692E-03  0.184E-04   46  35  15   46   1  22   17  20   9    0.000    0.000       0
+  0  20276 03:21:42.16   0.6320A   2.8496  -0.6711  -0.9591  0.064  0.00   0.000      0.  0.755E+00  0.801E-01  0.684E-03  0.205E-04   46  35  21   20  18   9   17  20   9    0.000    0.000       0
+  0  20286 03:21:48.44   0.6270A   2.8692   0.7711  -0.9479  0.065  0.00   0.000      0.  0.754E+00  0.798E-01  0.682E-03  0.220E-04   46  35  28   19  12   9   16  21   9    0.000    0.000       0
+  0  20295 03:21:54.10   0.6320A   2.8497   0.9679  -0.8651  0.064  0.00   0.000      0.  0.754E+00  0.796E-01  0.691E-03  0.226E-04   46  35  35   18  13   9   15  19   9    0.000    0.000       0
+  0  20305 03:22:00.46   0.6420A   2.8024   1.0085  -0.7863  0.064  0.00   0.000      0.  0.753E+00  0.793E-01  0.699E-03  0.237E-04   46  35   2   17  14   9   13  18   9    0.000    0.000       0
+  0  20314 03:22:06.29   0.6450A   2.7923  -0.9633  -0.7521  0.064  0.00   0.000      0.  0.752E+00  0.792E-01  0.698E-03  0.243E-04   43  29  34   20  11   8   12  18   9    0.000    0.000       0
+  0  20323 03:22:12.08   0.6490A   2.7756   0.8299  -0.7775  0.065  0.00   0.000      0.  0.751E+00  0.792E-01  0.697E-03  0.249E-04   43  29   1   15  15   9   12  17   9    0.000    0.000       0
+  0  20333 03:22:18.56   0.6390A   2.8172  -0.7965  -0.7554  0.065  0.00   0.000      0.  0.751E+00  0.792E-01  0.676E-03  0.214E-04   46  27  37   20  22   8   11  18   9    0.000    0.000       0
+  0  20342 03:22:24.32   0.6400A   2.8129   0.7777  -0.7604  0.064  0.00   0.000      0.  0.750E+00  0.791E-01  0.674E-03  0.206E-04   46  27   3   12  17   9   17  28   9    0.000    0.000       0
+  0  20351 03:22:30.16   0.6510A   2.7667   0.7688  -0.7624  0.064  0.00   0.000      0.  0.749E+00  0.790E-01  0.677E-03  0.191E-04   46  27   9   11  18   9   16  26   9    0.000    0.000       0
+  0  20360 03:22:36.08   0.6600A   2.7285   0.7405  -0.7005  0.064  0.00   0.000      0.  0.749E+00  0.787E-01  0.675E-03  0.180E-04   46  27  15   13  14   9   16  25   9    0.000    0.000       0
+  0  20369 03:22:42.06   0.6690A   2.6916   0.6957  -0.6537  0.064  0.00   0.000      0.  0.749E+00  0.784E-01  0.676E-03  0.166E-04   43  33  32   13  15   9   15  25   9    0.000    0.000       0
+  0  20378 03:22:48.06   0.6620A   2.7196   0.6572  -0.6685  0.063  0.00   0.000      0.  0.748E+00  0.781E-01  0.666E-03  0.182E-04   46  30  15   12  16   9   28  31   6    0.000    0.000       0
+  0  20388 03:22:54.56   0.6410A   2.8062   0.6520  -0.7263  0.062  0.00   0.000      0.  0.748E+00  0.781E-01  0.655E-03  0.234E-04   46  29  22   10  15   9   27  31  10    0.000    0.000       0
+  0  20397 03:23:00.28   0.6350A   2.8354   0.6991  -0.6907  0.062  0.00   0.000      0.  0.747E+00  0.782E-01  0.652E-03  0.245E-04   46  29  29   11  15   9   26  31  15    0.000    0.000       0
+  0  20406 03:23:06.01   0.6400A   2.8126   0.7197  -0.7862  0.061  0.00   0.000      0.  0.747E+00  0.783E-01  0.658E-03  0.236E-04   46  29  35   11  15   9   17  20   9    0.000    0.000       0
+  0  20416 03:23:12.55   0.6670A   2.6973  -0.8826  -0.8448  0.061  0.00   0.000      0.  0.746E+00  0.784E-01  0.690E-03  0.250E-04   46  29   2   20  15   9   16  20   9    0.000    0.000       0
+  0  20425 03:23:18.59   0.6680A   2.6948  -0.9414  -0.9646  0.060  0.00   0.000      0.  0.746E+00  0.782E-01  0.698E-03  0.232E-04   46  27  11   19  15   9   17  17   9    0.000    0.000       0
+  0  20434 03:23:24.55   0.6600A   2.7259  -0.7870  -1.0260  0.060  0.00   0.000      0.  0.746E+00  0.779E-01  0.702E-03  0.233E-04   46  27  17   19  14   9   16  17   9    0.000    0.000       0
+  0  20443 03:23:30.57   0.6790A   2.6509  -0.7573  -0.9344  0.060  0.00   0.000      0.  0.745E+00  0.776E-01  0.729E-03  0.254E-04   46  29  35   20  19   4   15  17   9    0.000    0.000       0
+  0  20452 03:23:36.63   0.6680A   2.6933  -0.8002  -0.8218  0.060  0.00   0.000      0.  0.745E+00  0.772E-01  0.719E-03  0.237E-04   45  27  11   20  18   8   14  17   9    0.000    0.000       0
+  0  20461 03:23:42.57   0.6580A   2.7355  -0.9229  -0.7647  0.060  0.00   0.000      0.  0.745E+00  0.769E-01  0.716E-03  0.262E-04   45  27  17   20  16   8   13  19   9    0.000    0.000       0
+  0  20470 03:23:48.41   0.6460A   2.7868  -0.8410   0.8280  0.060  0.00   0.000      0.  0.744E+00  0.768E-01  0.712E-03  0.330E-04   46  27  24   20  18   8   20  26   9    0.000    0.000       0
+  0  20479 03:23:54.25   0.6490A   2.7727   1.1100  -0.9147  0.062  0.00   0.000      0.  0.744E+00  0.768E-01  0.703E-03  0.288E-04   46  27  30   19  30   9   20  28   8    0.000    0.000       0
+  0  20488 03:24:00.16   0.6660A   2.7044   1.1525  -1.1275  0.063  0.00   0.000      0.  0.744E+00  0.766E-01  0.712E-03  0.265E-04   46  27  37   18  31   9   17  21   9    0.000    0.000       0
+  0  20497 03:24:06.22   0.6770A   2.6605   0.8035  -1.2026  0.064  0.00   0.000      0.  0.743E+00  0.762E-01  0.720E-03  0.264E-04   45  27  32   18  30   9   16  21   9    0.000    0.000       0
+  0  20506 03:24:12.25   0.6650A   2.7048  -0.7857  -1.0754  0.066  0.00   0.000      0.  0.743E+00  0.757E-01  0.702E-03  0.234E-04   46  27   0   19  30   8   14  22   9    0.000    0.000       0
+  0  20515 03:24:18.24   0.6660A   2.7009  -1.0835  -0.9461  0.066  0.00   0.000      0.  0.743E+00  0.750E-01  0.697E-03  0.216E-04   46  27   7   20  30   8   14  27   9    0.000    0.000       0
+  0  20524 03:24:24.20   0.6620A   2.7197  -0.7841  -0.8369  0.066  0.00   0.000      0.  0.743E+00  0.744E-01  0.691E-03  0.209E-04   46  28  12   20  28   8   14  21   9    0.000    0.000       0
+  0  20533 03:24:30.12   0.6590A   2.7314  -0.7877  -0.9090  0.064  0.00   0.000      0.  0.743E+00  0.738E-01  0.693E-03  0.226E-04   46  23  13   24  21   2   17  15   9    0.000    0.000       0
+  0  20542 03:24:36.03   0.6590A   2.7312  -0.8421  -0.8924  0.063  0.00   0.000      0.  0.743E+00  0.734E-01  0.699E-03  0.248E-04   46  23  20   24  20   5   16  16   9    0.000    0.000       0
+  0  20552 03:24:42.58   0.6510A   2.7664  -0.8738  -0.8017  0.062  0.00   0.000      0.  0.742E+00  0.729E-01  0.699E-03  0.258E-04   44  24  26   24  19   8   15  18   9    0.000    0.000       0
+  0  20561 03:24:48.47   0.6570A   2.7409   0.8852   0.8080  0.062  0.00   0.000      0.  0.742E+00  0.725E-01  0.710E-03  0.273E-04   44  24  33   15  13   9   20  11   9    0.000    0.000       0
+  0  20570 03:24:54.36   0.6500A   2.7694   0.9892   0.9321  0.062  0.00   0.000      0.  0.742E+00  0.722E-01  0.711E-03  0.281E-04   44  24   0   15  14   9   20  12   9    0.000    0.000       0
+  0  20579 03:25:00.19   0.6460A   2.7866   0.9392  -0.7590  0.061  0.00   0.000      0.  0.742E+00  0.718E-01  0.714E-03  0.279E-04   44  24   7   16  15   9   15  28   9    0.000    0.000       0
+  0  20588 03:25:06.01   0.6510A   2.7656   0.9455   0.9402  0.061  0.00   0.000      0.  0.742E+00  0.713E-01  0.725E-03  0.290E-04   44  24  13   17  35  14   20  14   9    0.000    0.000       0
+  0  20598 03:25:12.50   0.6450A   2.7908  -1.1138  -0.7949  0.061  0.00   0.000      0.  0.741E+00  0.707E-01  0.717E-03  0.262E-04   45  23  17   20  16   8   13  28   9    0.000    0.000       0
+  0  20607 03:25:18.31   0.6460A   2.7877   1.0433  -0.9519  0.061  0.00   0.000      0.  0.741E+00  0.701E-01  0.709E-03  0.235E-04   45  23  23   20  27   8   17  17   9    0.000    0.000       0
+  0  20616 03:25:24.13   0.6500A   2.7691   0.8627  -1.1464  0.063  0.00   0.000      0.  0.741E+00  0.695E-01  0.711E-03  0.240E-04   46  23  30   16  37  22   16  20   9    0.000    0.000       0
+  0  20626 03:25:30.65   0.6550A   2.7462   0.7156  -1.1802  0.064  0.00   0.000      0.  0.740E+00  0.687E-01  0.712E-03  0.228E-04   44  22  39   16  38  25   15  21   9    0.000    0.000       0
+  0  20635 03:25:36.60   0.6630A   2.7154   0.7389  -1.0564  0.064  0.00   0.000      0.  0.740E+00  0.679E-01  0.709E-03  0.220E-04   46  22   4   15  38  27   14  23   9    0.000    0.000       0
+  0  20644 03:25:42.57   0.6650A   2.7063   0.7480  -0.8966  0.064  0.00   0.000      0.  0.740E+00  0.672E-01  0.703E-03  0.217E-04   46  22  11   15  24   8   13  21   9    0.000    0.000       0
+  0  20653 03:25:48.52   0.6610A   2.7238   0.7045  -0.8680  0.062  0.00   0.000      0.  0.739E+00  0.665E-01  0.693E-03  0.229E-04   46  24  15   14  25   8   13  23   9    0.000    0.000       0
+  0  20662 03:25:54.46   0.6610A   2.7223   0.6885  -0.8435  0.061  0.00   0.000      0.  0.739E+00  0.660E-01  0.687E-03  0.229E-04   46  23  21   12  25   8   12  23   9    0.000    0.000       0
+  0  20671 03:26:00.47   0.6760A   2.6629   0.6610  -0.8278  0.060  0.00   0.000      0.  0.739E+00  0.655E-01  0.692E-03  0.206E-04   46  23  27   21  29   8   10  24   9    0.000    0.000       0
+  0  20680 03:26:06.54   0.6720A   2.6778  -0.6744  -0.7462  0.060  0.00   0.000      0.  0.738E+00  0.651E-01  0.682E-03  0.188E-04   44  17  38   21  15  36   10  25   7    0.000    0.000       0
+  0  20689 03:26:12.46   0.6510A   2.7634  -0.6660  -0.7435  0.061  0.00   0.000      0.  0.738E+00  0.646E-01  0.662E-03  0.187E-04   43  22   3   21  26   4    9  25   7    0.000    0.000       0
+  0  20698 03:26:18.20   0.6260A   2.8771  -0.7026  -0.7177  0.061  0.00   0.000      0.  0.738E+00  0.642E-01  0.637E-03  0.175E-04   43  22   9   19   9   9    7  25   7    0.000    0.000       0
+  0  20708 03:26:24.46   0.6260A   2.8737  -0.6909  -0.7217  0.061  0.00   0.000      0.  0.738E+00  0.638E-01  0.627E-03  0.167E-04   43  22  16   21  25   6   16  22   9    0.000    0.000       0
+  0  20717 03:26:30.09   0.6230A   2.8893   0.5985  -0.6868  0.061  0.00   0.000      0.  0.738E+00  0.635E-01  0.617E-03  0.189E-04   43  22  22   10  27   5   15  22   9    0.000    0.000       0
+  0  20727 03:26:36.36   0.6260A   2.8758   0.6010   0.7355  0.062  0.00   0.000      0.  0.738E+00  0.632E-01  0.615E-03  0.204E-04   43  21  29   10  28   5   20  10   9    0.000    0.000       0
+  0  20736 03:26:42.06   0.6380A   2.8234   0.6370   0.7109  0.062  0.00   0.000      0.  0.738E+00  0.630E-01  0.623E-03  0.201E-04   43  21  35   20  30   9   20  10   9    0.000    0.000       0
+  0  20746 03:26:48.44   0.6340A   2.8393   0.6272   0.7765  0.062  0.00   0.000      0.  0.738E+00  0.628E-01  0.620E-03  0.205E-04   44  15   8   10  30   5   20  10   9    0.000    0.000       0
+  0  20755 03:26:54.18   0.6450A   2.7928   0.6215  -0.7784  0.063  0.00   0.000      0.  0.738E+00  0.625E-01  0.628E-03  0.195E-04   44  15  15   10  13   9   15  18   9    0.000    0.000       0
+  0  20765 03:27:00.61   0.6430A   2.7986   0.7227  -0.7577  0.064  0.00   0.000      0.  0.737E+00  0.622E-01  0.620E-03  0.189E-04   45  20  11   11  13   9   13  18   9    0.000    0.000       0
+  0  20774 03:27:06.41   0.6390A   2.8147   0.7347  -0.7257  0.064  0.00   0.000      0.  0.737E+00  0.618E-01  0.613E-03  0.179E-04   44  20  17   11  15   9   12  18   8    0.000    0.000       0
+  0  20783 03:27:12.12   0.6280A   2.8680   0.7234  -0.7559  0.063  0.00   0.000      0.  0.737E+00  0.614E-01  0.595E-03  0.174E-04   44  20  24   10  16   9   17  13   9    0.000    0.000       0
+  0  20793 03:27:18.40   0.6320A   2.8462  -0.7233   0.7680  0.062  0.00   0.000      0.  0.737E+00  0.610E-01  0.595E-03  0.189E-04   44  20  31   45   3   5   21  25   9    0.000    0.000       0
+  0  20802 03:27:24.21   0.6460A   2.7843  -0.7262   0.6988  0.060  0.00   0.000      0.  0.737E+00  0.608E-01  0.607E-03  0.212E-04   43  20  38   46   2   9   21  25   9    0.000    0.000       0
+  0  20812 03:27:30.58   0.6380A   2.8227  -0.7261  -0.6427  0.059  0.00   0.000      0.  0.737E+00  0.606E-01  0.597E-03  0.210E-04   43  20   5   45   2  15    9  23   9    0.000    0.000       0
+  0  20821 03:27:36.45   0.6550A   2.7490  -0.7481  -0.6626  0.058  0.00   0.000      0.  0.737E+00  0.604E-01  0.609E-03  0.203E-04   44  17   8   46   1  20    7  21   8    0.000    0.000       0
+  0  20830 03:27:42.35   0.6510A   2.7645   0.9135  -0.6475  0.058  0.00   0.000      0.  0.737E+00  0.603E-01  0.601E-03  0.190E-04   45  19  11   20  30   9    8  23   8    0.000    0.000       0
+  0  20839 03:27:48.19   0.6460A   2.7879   0.9584  -0.7201  0.059  0.00   0.000      0.  0.737E+00  0.601E-01  0.600E-03  0.185E-04   45  19  17   19  31   9   18  28   9    0.000    0.000       0
+  0  20848 03:27:54.02   0.6470A   2.7813   0.8617  -0.6778  0.059  0.00   0.000      0.  0.737E+00  0.600E-01  0.605E-03  0.195E-04   45  19  23   19  30   9   18  28   9    0.000    0.000       0
+  0  20858 03:28:00.52   0.6530A   2.7565   0.9503  -0.9260  0.059  0.00   0.000      0.  0.737E+00  0.600E-01  0.615E-03  0.205E-04   46  19  30   19  30   9   18  26   9    0.000    0.000       0
+  0  20867 03:28:06.41   0.6560A   2.7447   0.8917   1.1855  0.060  0.00   0.000      0.  0.737E+00  0.600E-01  0.616E-03  0.200E-04   46  19  36   19  30   9   19  30   8    0.000    0.000       0
+  0  20876 03:28:12.30   0.6520A   2.7595  -0.7926   1.0290  0.061  0.00   0.000      0.  0.737E+00  0.600E-01  0.611E-03  0.198E-04   44  12  16   18  30   8   19  29   8    0.000    0.000       0
+  0  20885 03:28:18.21   0.6520A   2.7614  -0.6791   0.7915  0.061  0.00   0.000      0.  0.737E+00  0.600E-01  0.612E-03  0.197E-04   44  15  25   18  29   8   21  29   9    0.000    0.000       0
+  0  20895 03:28:24.44   0.6090A   2.9546  -0.7602  -0.7022  0.061  0.00   0.000      0.  0.737E+00  0.600E-01  0.576E-03  0.179E-04   44  15  32   18  27   8   13  22   9    0.000    0.000       0
+  0  20905 03:28:30.51   0.6020A   2.9887  -0.7558   0.6941  0.061  0.00   0.000      0.  0.737E+00  0.599E-01  0.567E-03  0.166E-04   44  15  38   21  25   8   20  27   9    0.000    0.000       0
+  0  20914 03:28:36.04   0.6220A   2.8955  -0.7939   0.6554  0.061  0.00   0.000      0.  0.737E+00  0.598E-01  0.583E-03  0.172E-04   44  15   4   21  24   8   20  26   9    0.000    0.000       0
+  0  20924 03:28:42.50   0.6560A   2.7421  -0.7772   0.6140  0.060  0.00   0.000      0.  0.737E+00  0.597E-01  0.607E-03  0.189E-04   46  24  12   21  23   8   20  25   9    0.000    0.000       0
+  0  20933 03:28:48.32   0.6440A   2.7931  -0.7713  -0.5564  0.059  0.00   0.000      0.  0.736E+00  0.595E-01  0.590E-03  0.183E-04   46  24  19   18  22   8   10  21   9    0.000    0.000       0
+  0  20942 03:28:54.08   0.6400A   2.8133  -0.7374  -0.5631  0.058  0.00   0.000      0.  0.736E+00  0.592E-01  0.581E-03  0.201E-04   46  24  25   21  22   6    8  20   9    0.000    0.000       0
+  0  20952 03:29:00.51   0.6470A   2.7834  -0.7529  -0.5935  0.057  0.00   0.000      0.  0.736E+00  0.589E-01  0.580E-03  0.203E-04   46  24  33   20  19   8    8  20   8    0.000    0.000       0
+  0  20961 03:29:06.39   0.6530A   2.7577  -0.7307  -0.6845  0.057  0.00   0.000      0.  0.736E+00  0.586E-01  0.580E-03  0.200E-04   44  16  32   20  18   8   18  28   9    0.000    0.000       0
+  0  20970 03:29:12.29   0.6530A   2.7546  -0.7120  -0.7327  0.056  0.00   0.000      0.  0.736E+00  0.583E-01  0.576E-03  0.190E-04   44  16  38   45   8   8   18  26   9    0.000    0.000       0
+  0  20979 03:29:18.22   0.6600A   2.7259  -0.7021  -0.6983  0.057  0.00   0.000      0.  0.736E+00  0.581E-01  0.581E-03  0.186E-04   44  16   4   45   8  14   16  28   9    0.000    0.000       0
+  0  20988 03:29:24.19   0.6590A   2.7308  -0.7416   0.9010  0.057  0.00   0.000      0.  0.736E+00  0.578E-01  0.587E-03  0.183E-04   46  32  28   19  18   9   18  29   8    0.000    0.000       0
+  0  20997 03:29:30.08   0.6570A   2.7384   0.7012  -1.0318  0.058  0.00   0.000      0.  0.736E+00  0.576E-01  0.595E-03  0.189E-04   46  32  34   20  26   9   17  20   9    0.000    0.000       0
+  0  21006 03:29:36.01   0.6620A   2.7180   0.7239  -1.0684  0.058  0.00   0.000      0.  0.737E+00  0.572E-01  0.603E-03  0.200E-04   46  25  29   20  26   9   16  20   9    0.000    0.000       0
+  0  21015 03:29:42.02   0.6700A   2.6880  -0.7296  -0.9741  0.058  0.00   0.000      0.  0.737E+00  0.568E-01  0.611E-03  0.219E-04   41  27  16   23  22   2   15  20   9    0.000    0.000       0
+  0  21024 03:29:48.07   0.6720A   2.6777  -0.7278  -0.9203  0.057  0.00   0.000      0.  0.737E+00  0.563E-01  0.620E-03  0.250E-04   43  27  22   23  21   4   16  18   9    0.000    0.000       0
+  0  21033 03:29:54.03   0.6560A   2.7432  -0.8279  -0.8923  0.056  0.00   0.000      0.  0.737E+00  0.558E-01  0.613E-03  0.283E-04   46  31  18   22  23   6   13  18   9    0.000    0.000       0
+  0  21043 03:30:00.53   0.6480A   2.7776  -0.7515  -0.8569  0.055  0.00   0.000      0.  0.738E+00  0.554E-01  0.602E-03  0.296E-04   46  27  28   22  24   6   13  17   9    0.000    0.000       0
+  0  21052 03:30:06.36   0.6480A   2.7787  -0.8650  -0.8014  0.055  0.00   0.000      0.  0.738E+00  0.552E-01  0.595E-03  0.281E-04   46  31  31   20  25   8   11  17   9    0.000    0.000       0
+  0  21061 03:30:12.26   0.6610A   2.7237  -0.8021  -0.7411  0.055  0.00   0.000      0.  0.739E+00  0.550E-01  0.604E-03  0.283E-04   45  31  37   21  23   8   11  17   9    0.000    0.000       0
+  0  21070 03:30:18.27   0.6690A   2.6924  -0.7415  -0.6855  0.054  0.00   0.000      0.  0.739E+00  0.549E-01  0.612E-03  0.285E-04   46  28   9   20  19   8   10  17   9    0.000    0.000       0
+  0  21079 03:30:24.26   0.6660A   2.7013  -0.6843   0.7300  0.054  0.00   0.000      0.  0.740E+00  0.550E-01  0.605E-03  0.279E-04   46  28  16   21  20   8   20  12   9    0.000    0.000       0
+  0  21088 03:30:30.28   0.6720A   2.6795   0.6749   0.7937  0.053  0.00   0.000      0.  0.740E+00  0.552E-01  0.610E-03  0.288E-04   46  28  23   13  14   9   21  13   9    0.000    0.000       0
+  0  21097 03:30:36.33   0.6700A   2.6846   0.6904   0.7200  0.053  0.00   0.000      0.  0.740E+00  0.554E-01  0.607E-03  0.259E-04   46  33  23   12  15   9   20  11   9    0.000    0.000       0
+  0  21106 03:30:42.36   0.6680A   2.6938   0.7354   0.7346  0.054  0.00   0.000      0.  0.741E+00  0.556E-01  0.601E-03  0.216E-04   46  33  30    9  13   9   20  11   9    0.000    0.000       0
+  0  21115 03:30:48.35   0.6590A   2.7315   0.8250   0.6504  0.054  0.00   0.000      0.  0.741E+00  0.558E-01  0.585E-03  0.179E-04   44  22  32    9  15   9   20  13   9    0.000    0.000       0
+  0  21124 03:30:54.27   0.6590A   2.7318   0.8124   0.5802  0.054  0.00   0.000      0.  0.742E+00  0.558E-01  0.579E-03  0.154E-04   44  22  38    9  16   9   21  14   9    0.000    0.000       0
+  0  21133 03:31:00.31   0.6810A   2.6415   0.7981  -0.5905  0.055  0.00   0.000      0.  0.742E+00  0.558E-01  0.596E-03  0.162E-04   45  25  25    9  16   8   18  21   9    0.000    0.000       0
+  0  21142 03:31:06.42   0.6750A   2.6652   0.8233  -0.7004  0.056  0.00   0.000      0.  0.742E+00  0.558E-01  0.590E-03  0.158E-04   44  24   5   10  18   8   18  20   9    0.000    0.000       0
+  0  21151 03:31:12.56   0.6840A   2.6313   0.8434  -0.8004  0.057  0.00   0.000      0.  0.743E+00  0.558E-01  0.594E-03  0.165E-04   42  23  17   10  19   8   17  20   9    0.000    0.000       0
+  0  21160 03:31:18.62   0.6680A   2.6959   0.7973  -0.8024  0.058  0.00   0.000      0.  0.743E+00  0.557E-01  0.578E-03  0.159E-04   42  23  24   20  24   9   16  20   9    0.000    0.000       0
+  0  21169 03:31:24.57   0.6560A   2.7432   0.7535  -0.7768  0.058  0.00   0.000      0.  0.744E+00  0.555E-01  0.566E-03  0.156E-04   43  24  28    8  20   8   16  18   9    0.000    0.000       0
+  0  21178 03:31:30.50   0.6560A   2.7435   0.7626  -0.7555  0.058  0.00   0.000      0.  0.744E+00  0.552E-01  0.568E-03  0.180E-04   43  24  34    7  21   8   15  17   9    0.000    0.000       0
+  0  21187 03:31:36.50   0.6690A   2.6925   0.7203  -0.7905  0.057  0.00   0.000      0.  0.745E+00  0.550E-01  0.576E-03  0.189E-04   43  24   0    7  22   8   17  15   9    0.000    0.000       0
+  0  21196 03:31:42.58   0.6710A   2.6825  -0.8141  -0.8266  0.057  0.00   0.000      0.  0.746E+00  0.550E-01  0.577E-03  0.196E-04   44  24   1   20  20   8   16  15   9    0.000    0.000       0
+  0  21205 03:31:48.62   0.6800A   2.6485  -0.8074  -0.7821  0.057  0.00   0.000      0.  0.746E+00  0.549E-01  0.581E-03  0.196E-04   44  24   8   20  19   8   15  15   9    0.000    0.000       0
+  0  21213 03:31:54.08   0.6780A   2.6553  -0.6961  -0.7333  0.057  0.00   0.000      0.  0.747E+00  0.549E-01  0.578E-03  0.197E-04   44  25  15   20  21   9   14  15   9    0.000    0.000       0
+  0  21222 03:32:00.16   0.6730A   2.6731  -0.7019  -0.6685  0.057  0.00   0.000      0.  0.747E+00  0.549E-01  0.572E-03  0.194E-04   46  25  17   19  20   9   13  15   9    0.000    0.000       0
+  0  21231 03:32:06.16   0.6650A   2.7055  -0.6862  -0.6890  0.057  0.00   0.000      0.  0.748E+00  0.550E-01  0.559E-03  0.159E-04   45  25  23   25  25  27   17  22   9    0.000    0.000       0
+  0  21240 03:32:12.18   0.6730A   2.6751  -0.6397  -0.7778  0.058  0.00   0.000      0.  0.748E+00  0.551E-01  0.566E-03  0.148E-04   46  25  30   25  24  31   16  22   9    0.000    0.000       0
+  0  21249 03:32:18.22   0.6680A   2.6965  -0.6207  -0.7977  0.059  0.00   0.000      0.  0.749E+00  0.551E-01  0.570E-03  0.145E-04   44  26  25   25  23  35   15  22   9    0.000    0.000       0
+  0  21258 03:32:24.16   0.6550A   2.7460  -0.6115  -0.9007  0.060  0.00   0.000      0.  0.749E+00  0.550E-01  0.563E-03  0.134E-04   44  26  32   22  18  32   17  18   9    0.000    0.000       0
+  0  21267 03:32:30.07   0.6570A   2.7413   0.6411  -0.9296  0.061  0.00   0.000      0.  0.749E+00  0.548E-01  0.572E-03  0.150E-04   44  26  39   27  36   0   17  17   9    0.000    0.000       0
+  0  21276 03:32:36.01   0.6600A   2.7285   0.6557  -0.9385  0.062  0.00   0.000      0.  0.750E+00  0.546E-01  0.579E-03  0.168E-04   44  26   6   11  12   9   15  17   9    0.000    0.000       0
+  0  21286 03:32:42.61   0.6630A   2.7136   0.7227  -0.8404  0.061  0.00   0.000      0.  0.750E+00  0.543E-01  0.587E-03  0.186E-04   42  36  24   11  13   9   14  17   9    0.000    0.000       0
+  0  21295 03:32:48.55   0.6560A   2.7445   0.7075  -0.7518  0.061  0.00   0.000      0.  0.750E+00  0.541E-01  0.587E-03  0.202E-04   46  27  22   10  14   9   16  18   9    0.000    0.000       0
+  0  21304 03:32:54.42   0.6540A   2.7522  -0.7484  -0.7308  0.060  0.00   0.000      0.  0.750E+00  0.539E-01  0.589E-03  0.208E-04   45  27  28   21  17   4   16  20   9    0.000    0.000       0
+  0  21313 03:33:00.33   0.6610A   2.7212  -0.7768  -0.7001  0.058  0.00   0.000      0.  0.750E+00  0.537E-01  0.597E-03  0.204E-04   46  27  36   19  26   9   15  20   9    0.000    0.000       0
+  0  21322 03:33:06.31   0.6670A   2.6990  -0.7590  -0.6730  0.057  0.00   0.000      0.  0.750E+00  0.535E-01  0.605E-03  0.198E-04   45  36   0   19  25   9   14  20   9    0.000    0.000       0
+  0  21331 03:33:12.27   0.6590A   2.7328  -0.7893  -0.6632  0.056  0.00   0.000      0.  0.751E+00  0.533E-01  0.602E-03  0.192E-04   46  36   7   20  16   9   17  19   9    0.000    0.000       0
+  0  21340 03:33:18.14   0.6510A   2.7660  -0.6542  -0.7953  0.056  0.00   0.000      0.  0.751E+00  0.532E-01  0.596E-03  0.173E-04   45  36  13   20  15   9   18  20   9    0.000    0.000       0
+  0  21349 03:33:24.02   0.6540A   2.7529   0.6523  -0.8907  0.057  0.00   0.000      0.  0.751E+00  0.530E-01  0.595E-03  0.169E-04   46  36  20   20  16   8   17  21   9    0.000    0.000       0
+  0  21359 03:33:30.54   0.6480A   2.7789  -0.6606  -0.8661  0.058  0.00   0.000      0.  0.751E+00  0.529E-01  0.588E-03  0.177E-04   45  37  26   22  10  12   15  21   9    0.000    0.000       0
+  0  21368 03:33:36.32   0.6350A   2.8327  -0.7464  -0.8006  0.060  0.00   0.000      0.  0.751E+00  0.528E-01  0.577E-03  0.191E-04   45  37  33   20  10   9   13  21   9    0.000    0.000       0
+  0  21377 03:33:42.00   0.6310A   2.8536   0.7006  -0.7483  0.061  0.00   0.000      0.  0.751E+00  0.527E-01  0.567E-03  0.182E-04   46  37   0   20  10   8   16  22   9    0.000    0.000       0
+  0  21387 03:33:48.37   0.6480A   2.7774  -0.6534  -0.7834  0.061  0.00   0.000      0.  0.751E+00  0.525E-01  0.580E-03  0.195E-04   46  37   6   23  23   1   17  15   9    0.000    0.000       0
+  0  21396 03:33:54.23   0.6490A   2.7728  -0.6531  -0.7958  0.061  0.00   0.000      0.  0.751E+00  0.523E-01  0.584E-03  0.199E-04   46  35   8   23  22   3   14  22   9    0.000    0.000       0
+  0  21405 03:34:00.07   0.6520A   2.7615   0.6481  -0.8284  0.060  0.00   0.000      0.  0.751E+00  0.520E-01  0.594E-03  0.206E-04   46  35  15   46  11   8   16  22   9    0.000    0.000       0
+  0  21415 03:34:06.58   0.6540A   2.7532   0.6594  -0.8292  0.059  0.00   0.000      0.  0.752E+00  0.518E-01  0.605E-03  0.209E-04   46  34  21   46  12  15   15  22   9    0.000    0.000       0
+  0  21424 03:34:12.43   0.6480A   2.7778  -0.6374  -0.7679  0.059  0.00   0.000      0.  0.752E+00  0.516E-01  0.595E-03  0.188E-04   41  28   2   21  25   6   16  19   9    0.000    0.000       0
+  0  21433 03:34:18.20   0.6390A   2.8156  -0.7246  -0.7274  0.058  0.00   0.000      0.  0.752E+00  0.514E-01  0.585E-03  0.204E-04   41  28   8   21  25   8   15  19   9    0.000    0.000       0
+  0  21443 03:34:24.61   0.6440A   2.7931  -0.6043  -0.7020  0.058  0.00   0.000      0.  0.752E+00  0.514E-01  0.589E-03  0.233E-04   41  28  16   41  33  29   14  19   9    0.000    0.000       0
+  0  21452 03:34:30.44   0.6540A   2.7510   0.7219  -0.6857  0.059  0.00   0.000      0.  0.752E+00  0.514E-01  0.599E-03  0.243E-04   41  28  22   20  20   9   11  17   9    0.000    0.000       0
+  0  21461 03:34:36.33   0.6550A   2.7480  -0.8884  -0.8178  0.060  0.00   0.000      0.  0.752E+00  0.514E-01  0.600E-03  0.240E-04   40  28  28   20  12   9   17  18   9    0.000    0.000       0
+  0  21470 03:34:42.16   0.6420A   2.8038  -0.8883  -1.0195  0.062  0.00   0.000      0.  0.752E+00  0.512E-01  0.585E-03  0.221E-04   40  28  34   20  10   9   17  17   9    0.000    0.000       0
+  0  21480 03:34:48.59   0.6480A   2.7766  -0.9108  -1.0367  0.064  0.00   0.000      0.  0.752E+00  0.509E-01  0.589E-03  0.211E-04   40  28   1   18  10   9   16  20   9    0.000    0.000       0
+  0  21489 03:34:54.44   0.6540A   2.7523  -0.7689  -1.0286  0.065  0.00   0.000      0.  0.752E+00  0.504E-01  0.590E-03  0.193E-04   46  35  24   17  10   9   16  22   9    0.000    0.000       0
+  0  21498 03:35:00.35   0.6610A   2.7236   0.7268  -1.0229  0.066  0.00   0.000      0.  0.752E+00  0.497E-01  0.584E-03  0.181E-04   44  30  20   20  10   8   16  17   9    0.000    0.000       0
+  0  21507 03:35:06.28   0.6600A   2.7290   0.8559  -1.0021  0.066  0.00   0.000      0.  0.752E+00  0.491E-01  0.576E-03  0.190E-04   44  30  26   20  11   8   15  16   9    0.000    0.000       0
+  0  21516 03:35:12.15   0.6510A   2.7668   0.6404  -0.9150  0.065  0.00   0.000      0.  0.752E+00  0.486E-01  0.562E-03  0.195E-04   42  30  24   20  13   8   13  16   9    0.000    0.000       0
+  0  21525 03:35:18.02   0.6530A   2.7568   0.5978  -0.8624  0.064  0.00   0.000      0.  0.752E+00  0.482E-01  0.561E-03  0.220E-04   42  30  31   20  11   9   12  16   9    0.000    0.000       0
+  0  21535 03:35:24.61   0.6570A   2.7393  -0.6375  -0.7712  0.062  0.00   0.000      0.  0.752E+00  0.479E-01  0.558E-03  0.213E-04   44  29  37   21  11   8   11  16   9    0.000    0.000       0
+  0  21544 03:35:30.49   0.6510A   2.7667  -0.7158  -0.7204  0.061  0.00   0.000      0.  0.752E+00  0.477E-01  0.550E-03  0.221E-04   44  29   4   20  11   8   10  18   9    0.000    0.000       0
+  0  21553 03:35:36.37   0.6570A   2.7395   0.6735  -0.6971  0.060  0.00   0.000      0.  0.753E+00  0.476E-01  0.550E-03  0.222E-04   44  29  10   14  13   9    9  17   8    0.000    0.000       0
+  0  21562 03:35:42.29   0.6560A   2.7433   0.6747  -0.6784  0.059  0.00   0.000      0.  0.753E+00  0.475E-01  0.544E-03  0.219E-04   46  21  12   11  14   9    8  17   8    0.000    0.000       0
+  0  21571 03:35:48.13   0.6450A   2.7897   0.6402  -0.6353  0.058  0.00   0.000      0.  0.753E+00  0.474E-01  0.529E-03  0.199E-04   46  21  18   13  14   9    8  16   8    0.000    0.000       0
+  0  21581 03:35:54.58   0.6430A   2.7984   0.6523  -0.6358  0.058  0.00   0.000      0.  0.754E+00  0.473E-01  0.520E-03  0.184E-04   44  29  18    8  15   9    6  20   3    0.000    0.000       0
+  0  21590 03:36:00.35   0.6430A   2.8015   0.6235  -0.6245  0.057  0.00   0.000      0.  0.754E+00  0.472E-01  0.515E-03  0.167E-04   44  29  25    8  16   9    5  20   2    0.000    0.000       0
+  0  21599 03:36:06.13   0.6430A   2.7991   0.5372  -0.5730  0.057  0.00   0.000      0.  0.755E+00  0.470E-01  0.509E-03  0.147E-04   46  21  39    8  16   8    6  19   3    0.000    0.000       0
+  0  21609 03:36:12.56   0.6430A   2.8012  -0.5467  -0.6501  0.057  0.00   0.000      0.  0.756E+00  0.469E-01  0.508E-03  0.156E-04   46  21   6   20  10   9   17  18   9    0.000    0.000       0
+  0  21618 03:36:18.33   0.6380A   2.8231  -0.5794  -0.7051  0.058  0.00   0.000      0.  0.756E+00  0.467E-01  0.502E-03  0.156E-04   44  30  10   20  10   9   17  18   9    0.000    0.000       0
+  0  21627 03:36:24.05   0.6330A   2.8434   0.5605  -0.6941  0.058  0.00   0.000      0.  0.757E+00  0.466E-01  0.496E-03  0.142E-04   44  30  17    7  14   9   16  18   9    0.000    0.000       0
+  0  21637 03:36:30.37   0.6310A   2.8510   0.6062  -0.7018  0.057  0.00   0.000      0.  0.758E+00  0.464E-01  0.492E-03  0.134E-04   44  30  25    7  15   9   17  15   9    0.000    0.000       0
+  0  21646 03:36:36.08   0.6370A   2.8252   0.6081  -0.6642  0.057  0.00   0.000      0.  0.759E+00  0.462E-01  0.496E-03  0.142E-04   44  30  32    7  15   9   16  15   9    0.000    0.000       0
+  0  21656 03:36:42.51   0.6450A   2.7924   0.6218  -0.6249  0.056  0.00   0.000      0.  0.760E+00  0.461E-01  0.501E-03  0.150E-04   44  29  35    7  16   9   16  14   9    0.000    0.000       0
+  0  21665 03:36:48.28   0.6390A   2.8191   0.5871  -0.5526  0.056  0.00   0.000      0.  0.761E+00  0.459E-01  0.498E-03  0.156E-04   46  21   9    7  17   9   15  14   9    0.000    0.000       0
+  0  21674 03:36:54.03   0.6390A   2.8188  -0.6729  -0.5220  0.056  0.00   0.000      0.  0.761E+00  0.458E-01  0.496E-03  0.161E-04   46  28  25   20  24   9   20  26   8    0.000    0.000       0
+  0  21684 03:37:00.38   0.6300A   2.8585  -0.6809  -0.4950  0.055  0.00   0.000      0.  0.762E+00  0.456E-01  0.491E-03  0.148E-04   46  21  25   20  24   9   19  26   9    0.000    0.000       0
+  0  21693 03:37:06.01   0.6230A   2.8912   0.5860  -0.5871  0.054  0.00   0.000      0.  0.763E+00  0.453E-01  0.484E-03  0.138E-04   46  21  32   21  24   8   18  27   9    0.000    0.000       0
+  0  21703 03:37:12.23   0.6240A   2.8834   0.5546  -0.7162  0.053  0.00   0.000      0.  0.764E+00  0.450E-01  0.483E-03  0.133E-04   46  21   0   36  37   5   18  28   9    0.000    0.000       0
+  0  21713 03:37:18.55   0.6360A   2.8286   0.5668  -0.6771  0.053  0.00   0.000      0.  0.765E+00  0.447E-01  0.492E-03  0.130E-04   45  24   3    7  15   9   17  28   9    0.000    0.000       0
+  0  21722 03:37:24.27   0.6360A   2.8281  -0.6470  -0.5791  0.053  0.00   0.000      0.  0.766E+00  0.444E-01  0.493E-03  0.131E-04   46  24  10   20  12   9   17  28   9    0.000    0.000       0
+  0  21732 03:37:30.58   0.6270A   2.8696  -0.6355  -0.6271  0.053  0.00   0.000      0.  0.767E+00  0.443E-01  0.487E-03  0.129E-04   44  26  10   19  12   9   17  13   9    0.000    0.000       0
+  0  21741 03:37:36.21   0.6240A   2.8854   0.5706  -0.7170  0.053  0.00   0.000      0.  0.768E+00  0.441E-01  0.484E-03  0.121E-04   43  29   5   32   4  21   17  14   9    0.000    0.000       0
+  0  21751 03:37:42.39   0.6170A   2.9194   0.5763  -0.7527  0.052  0.00   0.000      0.  0.769E+00  0.440E-01  0.479E-03  0.122E-04   46  30   5   32   5  25   16  14   9    0.000    0.000       0
+  0  21761 03:37:48.56   0.6220A   2.8943   0.5611   0.7435  0.052  0.00   0.000      0.  0.770E+00  0.440E-01  0.483E-03  0.141E-04   44  26  33   37   0  32   20  28   9    0.000    0.000       0
+  0  21770 03:37:54.13   0.6180A   2.9113   0.5901  -0.6578  0.051  0.00   0.000      0.  0.771E+00  0.440E-01  0.483E-03  0.153E-04   44  29  21   32   3  35   15  15   9    0.000    0.000       0
+  0  21780 03:38:00.26   0.6090A   2.9533   0.7950  -0.6162  0.051  0.00   0.000      0.  0.772E+00  0.441E-01  0.481E-03  0.166E-04   44  29  28   20  30   9   14  15   9    0.000    0.000       0
+  0  21790 03:38:06.35   0.6070A   2.9677   0.8645   0.6227  0.051  0.00   0.000      0.  0.773E+00  0.442E-01  0.482E-03  0.168E-04   46  26  24   19  31   9   20  10   9    0.000    0.000       0
+  0  21800 03:38:12.39   0.6020A   2.9884   0.7412   0.6589  0.051  0.00   0.000      0.  0.774E+00  0.443E-01  0.485E-03  0.165E-04   45  26  31   18  31   9   20  10   9    0.000    0.000       0
+  0  21810 03:38:18.40   0.6010A   2.9948  -0.6670  -0.7958  0.051  0.00   0.000      0.  0.775E+00  0.442E-01  0.490E-03  0.164E-04   45  26  38   18  22   9   18  24   9    0.000    0.000       0
+  0  21820 03:38:24.42   0.6040A   2.9800  -0.6308  -0.7462  0.051  0.00   0.000      0.  0.776E+00  0.442E-01  0.496E-03  0.164E-04   44  26   6   16  21   9   17  24   9    0.000    0.000       0
+  0  21830 03:38:30.45   0.6060A   2.9702  -0.5640  -0.6897  0.050  0.00   0.000      0.  0.777E+00  0.441E-01  0.500E-03  0.158E-04   43  29  25   15  22   8   17  24   9    0.000    0.000       0
+  0  21840 03:38:36.54   0.6080A   2.9620  -0.5929   0.6306  0.050  0.00   0.000      0.  0.778E+00  0.440E-01  0.502E-03  0.155E-04   46  27  21   11  29   8   20  28   9    0.000    0.000       0
+  0  21849 03:38:42.03   0.6120A   2.9423  -0.5899   0.6981  0.049  0.00   0.000      0.  0.779E+00  0.439E-01  0.505E-03  0.155E-04   46  27  27   11  28   8   20  28   9    0.000    0.000       0
+  0  21859 03:38:48.18   0.6200A   2.9021  -0.6266   0.7476  0.049  0.00   0.000      0.  0.780E+00  0.438E-01  0.512E-03  0.154E-04   46  33  38   11  26   9   20  27   9    0.000    0.000       0
+  0  21869 03:38:54.36   0.6150A   2.9249  -0.6400   0.7883  0.048  0.00   0.000      0.  0.781E+00  0.436E-01  0.508E-03  0.153E-04   46  33  10   16  26   9   21  26   9    0.000    0.000       0
+  0  21879 03:39:00.53   0.6170A   2.9158  -0.6470   0.8234  0.048  0.00   0.000      0.  0.782E+00  0.434E-01  0.508E-03  0.161E-04   46  31  20   16  25   9   20  28   9    0.000    0.000       0
+  0  21888 03:39:06.08   0.6140A   2.9328   0.8204   0.7650  0.047  0.00   0.000      0.  0.783E+00  0.432E-01  0.503E-03  0.159E-04   42  28  31   21  29   8   20  27   9    0.000    0.000       0
+  0  21898 03:39:12.22   0.6150A   2.9245   0.7669   0.7009  0.047  0.00   0.000      0.  0.784E+00  0.431E-01  0.499E-03  0.152E-04   44  29  33   21  29   8   20  28   9    0.000    0.000       0
+  0  21908 03:39:18.36   0.6140A   2.9312   0.6826  -0.5590  0.047  0.00   0.000      0.  0.785E+00  0.431E-01  0.495E-03  0.138E-04   46  34   3   20  30   8   27  34  39    0.000    0.000       0
+  0  21918 03:39:24.44   0.6030A   2.9863  -0.6921  -0.6552  0.048  0.00   0.000      0.  0.787E+00  0.431E-01  0.484E-03  0.130E-04   46  34  11   20  18   8   18  13   9    0.000    0.000       0
+  0  21928 03:39:30.43   0.5960A   3.0178  -0.6485  -0.6889  0.049  0.00   0.000      0.  0.788E+00  0.430E-01  0.475E-03  0.125E-04   46  34  18   19  10   9   17  13   9    0.000    0.000       0
+  0  21938 03:39:36.40   0.5990A   3.0058  -0.6204  -0.7020  0.049  0.00   0.000      0.  0.789E+00  0.429E-01  0.476E-03  0.125E-04   46  34  26   18  10   9   17  13   9    0.000    0.000       0
+  0  21948 03:39:42.41   0.6010A   2.9931  -0.5835  -0.6901  0.048  0.00   0.000      0.  0.790E+00  0.427E-01  0.477E-03  0.126E-04   45  34  34   20  16   9   16  13   9    0.000    0.000       0
+  0  21958 03:39:48.38   0.5950A   3.0252   0.5538  -0.6397  0.047  0.00   0.000      0.  0.792E+00  0.425E-01  0.472E-03  0.127E-04   43  35  31   20  12   8   15  13   9    0.000    0.000       0
+  0  21968 03:39:54.33   0.5940A   3.0281  -0.5694  -0.6603  0.046  0.00   0.000      0.  0.793E+00  0.423E-01  0.471E-03  0.129E-04   43  37  34   28  26  31   17  17   9    0.000    0.000       0
+  0  21978 03:40:00.26   0.5960A   3.0178   0.5152  -0.7435  0.045  0.00   0.000      0.  0.794E+00  0.422E-01  0.472E-03  0.133E-04   46  35  13   27  24  14   17  19   9    0.000    0.000       0
+  0  21988 03:40:06.26   0.6020A   2.9911  -0.5385  -0.7522  0.045  0.00   0.000      0.  0.796E+00  0.422E-01  0.475E-03  0.130E-04   46  35  20   12  26   9   16  19   9    0.000    0.000       0
+  0  21998 03:40:12.27   0.6020A   2.9925  -0.5377  -0.7232  0.045  0.00   0.000      0.  0.797E+00  0.422E-01  0.473E-03  0.127E-04   46  35  28   10  26   9   15  19   9    0.000    0.000       0
+  0  22008 03:40:18.31   0.6020A   2.9918  -0.4980  -0.6905  0.045  0.00   0.000      0.  0.799E+00  0.423E-01  0.472E-03  0.136E-04   43  38  23    9  25   9   14  19   9    0.000    0.000       0
+  0  22018 03:40:24.31   0.6000A   2.9975   0.5590  -0.6360  0.045  0.00   0.000      0.  0.800E+00  0.424E-01  0.475E-03  0.149E-04   43  38  30   37  33  12   13  19   9    0.000    0.000       0
+  0  22028 03:40:30.37   0.6050A   2.9755  -0.5789  -0.5917  0.046  0.00   0.000      0.  0.802E+00  0.425E-01  0.483E-03  0.152E-04   46  34  17   40  39  12   12  17   9    0.000    0.000       0
+  0  22038 03:40:36.36   0.5950A   3.0267  -0.5687  -0.5673  0.046  0.00   0.000      0.  0.803E+00  0.427E-01  0.481E-03  0.158E-04   44  37   5   40  39  18   11  17   9    0.000    0.000       0
+  0  22048 03:40:42.29   0.5960A   3.0202   0.5895  -0.5528  0.047  0.00   0.000      0.  0.804E+00  0.428E-01  0.484E-03  0.159E-04   44  37  13   41  39  21   27  25  27    0.000    0.000       0
+  0  22058 03:40:48.27   0.6010A   2.9969   0.6818  -0.5919  0.048  0.00   0.000      0.  0.806E+00  0.429E-01  0.487E-03  0.146E-04   44  37  20   41  39  27   16  16   9    0.000    0.000       0
+  0  22068 03:40:54.24   0.5920A   3.0382   0.6309  -0.6972  0.049  0.00   0.000      0.  0.807E+00  0.430E-01  0.480E-03  0.124E-04   44  37  29   41  39  33   17  14   9    0.000    0.000       0
+  0  22078 03:41:00.13   0.5880A   3.0600  -0.7484  -0.6699  0.050  0.00   0.000      0.  0.808E+00  0.430E-01  0.475E-03  0.116E-04   44  37  37   23  25   1   16  14   9    0.000    0.000       0
+  0  22088 03:41:05***   0.5880A   3.0614  -0.8362  -0.6419  0.050  0.00   0.000      0.  0.809E+00  0.430E-01  0.469E-03  0.105E-04   44  37   4   23  24   4   16  14   9    0.000    0.000       0
+  0  22099 03:41:12.50   0.5920A   3.0415  -0.5445  -0.5952  0.050  0.00   0.000      0.  0.810E+00  0.430E-01  0.471E-03  0.102E-04   46  27  13   23  23   7   16  16   9    0.000    0.000       0
+  0  22109 03:41:18.44   0.5950A   3.0277  -0.5881  -0.5702  0.050  0.00   0.000      0.  0.811E+00  0.431E-01  0.476E-03  0.114E-04   46  37  19   18  10   9   10  16   7    0.000    0.000       0
+  0  22119 03:41:24.35   0.5860A   3.0717  -0.5645  -0.6224  0.050  0.00   0.000      0.  0.812E+00  0.432E-01  0.475E-03  0.127E-04   43  37  27   18  10   9   22  27   8    0.000    0.000       0
+  0  22129 03:41:30.24   0.5910A   3.0480  -0.5198  -0.5960  0.050  0.00   0.000      0.  0.813E+00  0.434E-01  0.479E-03  0.133E-04   46  31  22   39  34  13   14  15   9    0.000    0.000       0
+  0  22139 03:41:36.13   0.5870A   3.0650  -0.5447  -0.6069  0.051  0.00   0.000      0.  0.813E+00  0.437E-01  0.478E-03  0.128E-04   46  31  29   39  33  17   13  15   9    0.000    0.000       0
+  0  22150 03:41:42.49   0.5690A   3.1608   0.5736  -0.6096  0.051  0.00   0.000      0.  0.814E+00  0.440E-01  0.465E-03  0.123E-04   43  26   2   15  16   8   13  15   9    0.000    0.000       0
+  0  22160 03:41:48.19   0.5710A   3.1533   0.5998  -0.6370  0.051  0.00   0.000      0.  0.815E+00  0.443E-01  0.470E-03  0.123E-04   43  26   9   21  30  37   12  15   9    0.000    0.000       0
+  0  22171 03:41:54.54   0.5790A   3.1090   0.6120   0.6523  0.051  0.00   0.000      0.  0.816E+00  0.446E-01  0.483E-03  0.131E-04   44  29  11   21  29   0   21  28   9    0.000    0.000       0
+  0  22181 03:42:00.34   0.5810A   3.0990  -0.6456   0.7000  0.050  0.00   0.000      0.  0.817E+00  0.449E-01  0.493E-03  0.149E-04   44  29  18   33  30  30   21  27   9    0.000    0.000       0
+  0  22191 03:42:06.15   0.5820A   3.0912   0.7195   0.7057  0.050  0.00   0.000      0.  0.818E+00  0.452E-01  0.504E-03  0.164E-04   46  29  28   19  31   3   21  26   9    0.000    0.000       0
+  0  22202 03:42:12.56   0.5780A   3.1158   0.7053   0.7615  0.050  0.00   0.000      0.  0.819E+00  0.455E-01  0.503E-03  0.159E-04   45  29  38   19  31   5   20  28   9    0.000    0.000       0
+  0  22212 03:42:18.24   0.5640A   3.1897   0.8294   0.7448  0.051  0.00   0.000      0.  0.819E+00  0.457E-01  0.501E-03  0.176E-04   46  29   6   20  30   9   20  28   9    0.000    0.000       0
+  0  22223 03:42:24.38   0.5500A   3.2727   1.1700  -0.9914  0.052  0.00   0.000      0.  0.820E+00  0.458E-01  0.500E-03  0.180E-04   44  29  13   19  30   9   17  27   9    0.000    0.000       0
+  0  22234 03:42:30.50   0.5630A   3.1959   0.8972  -1.2210  0.052  0.00   0.000      0.  0.821E+00  0.458E-01  0.518E-03  0.189E-04   46  29  22   17  31   9   16  26   9    0.000    0.000       0
+  0  22244 03:42:36.18   0.5670A   3.1722  -0.9497  -1.1479  0.053  0.00   0.000      0.  0.821E+00  0.457E-01  0.521E-03  0.186E-04   44  29  29   20  11   8   14  26   9    0.000    0.000       0
+  0  22255 03:42:42.42   0.5660A   3.1798  -0.9734   1.0445  0.053  0.00   0.000      0.  0.822E+00  0.456E-01  0.519E-03  0.177E-04   44  28  39   20  10   9   16  29   8    0.000    0.000       0
+  0  22265 03:42:48.11   0.5720A   3.1462  -0.8821  -0.9006  0.053  0.00   0.000      0.  0.822E+00  0.456E-01  0.519E-03  0.168E-04   46  30   6   20  10   9   11  26   9    0.000    0.000       0
+  0  22276 03:42:54.40   0.5720A   3.1488  -0.7569  -0.8512  0.054  0.00   0.000      0.  0.823E+00  0.456E-01  0.514E-03  0.140E-04   46  29  15   19  10   9   10  26   9    0.000    0.000       0
+  0  22286 03:43:00.09   0.5660A   3.1787  -0.7118  -0.8345  0.054  0.00   0.000      0.  0.823E+00  0.456E-01  0.504E-03  0.124E-04   46  29  23   42  38  26    8  26   9    0.000    0.000       0
+  0  22297 03:43:06.27   0.5560A   3.2402  -0.6839  -0.7703  0.055  0.00   0.000      0.  0.824E+00  0.457E-01  0.496E-03  0.122E-04   46  29  32   42  37  32    6  25   9    0.000    0.000       0
+  0  22308 03:43:12.37   0.5540A   3.2480  -0.6363  -0.8091  0.055  0.00   0.000      0.  0.825E+00  0.457E-01  0.498E-03  0.138E-04   46  29   0   20  28   9   17  19   9    0.000    0.000       0
+  0  22319 03:43:18.46   0.5530A   3.2565  -0.6486  -0.7874  0.054  0.00   0.000      0.  0.825E+00  0.458E-01  0.503E-03  0.147E-04   46  29   9   19  28   9   15  18   9    0.000    0.000       0
+  0  22330 03:43:24.55   0.5520A   3.2598  -0.6333  -0.7531  0.053  0.00   0.000      0.  0.826E+00  0.459E-01  0.506E-03  0.159E-04   46  29  18   36  32  21   14  17   9    0.000    0.000       0
+  0  22340 03:43:30.05   0.5480A   3.2834  -0.6146   0.7641  0.052  0.00   0.000      0.  0.826E+00  0.460E-01  0.506E-03  0.161E-04   46  29  25   35  31  23   20  27   9    0.000    0.000       0
+  0  22351 03:43:36.09   0.5550A   3.2418  -0.6885   0.7108  0.052  0.00   0.000      0.  0.827E+00  0.462E-01  0.513E-03  0.150E-04   46  29  33   41   2  26   20  27   9    0.000    0.000       0
+  0  22362 03:43:42.27   0.5690A   3.1641  -0.6967  -0.6347  0.053  0.00   0.000      0.  0.828E+00  0.464E-01  0.529E-03  0.138E-04   46  29   2   35  30  35   11  17   9    0.000    0.000       0
+  0  22372 03:43:48.03   0.5780A   3.1162   0.6938  -0.6351  0.053  0.00   0.000      0.  0.829E+00  0.466E-01  0.538E-03  0.125E-04   45  28   8   20  31   9   39  33  31    0.000    0.000       0
+  0  22383 03:43:54.32   0.5670A   3.1721  -0.6908  -0.6662  0.055  0.00   0.000      0.  0.830E+00  0.468E-01  0.528E-03  0.111E-04   44  27  15    8  23   7   39  32  38    0.000    0.000       0
+  0  22394 03:44:00.54   0.5680A   3.1692  -0.6988  -0.6796  0.056  0.00   0.000      0.  0.830E+00  0.469E-01  0.533E-03  0.108E-04   45  26  19   42  28  17   37  34   2    0.000    0.000       0
+  0  22404 03:44:06.15   0.5600A   3.2125  -0.7226  -0.7709  0.056  0.00   0.000      0.  0.831E+00  0.469E-01  0.526E-03  0.103E-04   45  26  27   42  28  23   36  34   7    0.000    0.000       0
+  0  22415 03:44:12.36   0.5650A   3.1875  -0.6551  -0.7390  0.056  0.00   0.000      0.  0.832E+00  0.469E-01  0.531E-03  0.103E-04   46  26  37   35  26  22   35  34  14    0.000    0.000       0
+  0  22426 03:44:18.55   0.5630A   3.1979  -0.6437  -0.8192  0.055  0.00   0.000      0.  0.833E+00  0.468E-01  0.533E-03  0.112E-04   45  25   4   35  25  27   34  34  19    0.000    0.000       0
+  0  22436 03:44:24.09   0.5520A   3.2612  -0.6159  -0.7488  0.055  0.00   0.000      0.  0.834E+00  0.467E-01  0.527E-03  0.123E-04   45  25  12   34  25  30   33  34  23    0.000    0.000       0
+  0  22447 03:44:30.17   0.5570A   3.2336  -0.6185  -0.6894  0.055  0.00   0.000      0.  0.834E+00  0.467E-01  0.535E-03  0.124E-04   45  25  20   38  29  38   33  35  27    0.000    0.000       0
+  0  22458 03:44:36.33   0.5600A   3.2124  -0.6157  -0.7016  0.056  0.00   0.000      0.  0.835E+00  0.467E-01  0.537E-03  0.110E-04   45  24  27   34  29   0   17  20   9    0.000    0.000       0
+  0  22469 03:44:42.56   0.5700A   3.1585  -0.6764  -0.6791  0.057  0.00   0.000      0.  0.836E+00  0.467E-01  0.544E-03  0.105E-04   44  24  35   34  28   5   16  20   9    0.000    0.000       0
+  0  22479 03:44:48.26   0.5710A   3.1512  -0.6786  -0.6703  0.058  0.00   0.000      0.  0.837E+00  0.465E-01  0.546E-03  0.101E-04   46  23   2   34  27  10   17  18   9    0.000    0.000       0
+  0  22490 03:44:54.55   0.5720A   3.1468  -0.6520  -0.6797  0.058  0.00   0.000      0.  0.838E+00  0.464E-01  0.547E-03  0.110E-04   46  23  11    2  26   9   16  17   9    0.000    0.000       0
+  0  22500 03:45:00.25   0.5710A   3.1548  -0.6378  -0.6864  0.059  0.00   0.000      0.  0.838E+00  0.463E-01  0.547E-03  0.132E-04   46  23  19    2  25   9   15  17   9    0.000    0.000       0
+  0  22511 03:45:06.58   0.5790A   3.1077  -0.6553  -0.6777  0.059  0.00   0.000      0.  0.839E+00  0.463E-01  0.560E-03  0.161E-04   45  22  26   20  16   9   13  17   9    0.000    0.000       0
+  0  22521 03:45:12.36   0.5770A   3.1179   0.7214  -0.7537  0.059  0.00   0.000      0.  0.840E+00  0.464E-01  0.558E-03  0.163E-04   46  23  38   20  24   9   16  19   9    0.000    0.000       0
+  0  22531 03:45:18.09   0.5670A   3.1731   0.6628  -0.9136  0.060  0.00   0.000      0.  0.840E+00  0.463E-01  0.539E-03  0.140E-04   46  22   5   19  24   9   17  17   9    0.000    0.000       0
+  0  22542 03:45:24.28   0.5590A   3.2193   0.6495  -0.9482  0.060  0.00   0.000      0.  0.841E+00  0.461E-01  0.519E-03  0.129E-04   46  22  13   38  28   2   15  17   9    0.000    0.000       0
+  0  22553 03:45:30.41   0.5580A   3.2277  -0.6378  -0.8752  0.060  0.00   0.000      0.  0.841E+00  0.459E-01  0.511E-03  0.128E-04   45  22  21   19  27   9   14  17   9    0.000    0.000       0
+  0  22563 03:45:36.02   0.5650A   3.1867   0.6711  -0.7915  0.060  0.00   0.000      0.  0.842E+00  0.458E-01  0.514E-03  0.134E-04   46  22  29   19  30   9   12  18   9    0.000    0.000       0
+  0  22574 03:45:42.32   0.5820A   3.0922  -0.6910  -0.7156  0.059  0.00   0.000      0.  0.843E+00  0.457E-01  0.526E-03  0.129E-04   46  22  37   19  26   9   11  18   9    0.000    0.000       0
+  0  22584 03:45:48.09   0.5740A   3.1334  -0.6441  -0.6525  0.058  0.00   0.000      0.  0.843E+00  0.457E-01  0.515E-03  0.113E-04   45  22   9   32  24  24    9  18   9    0.000    0.000       0
+  0  22595 03:45:54.41   0.5730A   3.1389   0.6557  -0.5983  0.057  0.00   0.000      0.  0.844E+00  0.457E-01  0.512E-03  0.105E-04   45  22  19   21  21   2    8  18   9    0.000    0.000       0
+  0  22605 03:46:00.11   0.5670A   3.1760   0.6441  -0.5821  0.056  0.00   0.000      0.  0.845E+00  0.458E-01  0.508E-03  0.111E-04   45  22  27   21  21   4   35  23  27    0.000    0.000       0
+  0  22616 03:46:06.38   0.5760A   3.1277  -0.6038  -0.5575  0.055  0.00   0.000      0.  0.845E+00  0.461E-01  0.521E-03  0.141E-04   45  21  34   21  18   3   35  22  11    0.000    0.000       0
+  0  22626 03:46:12.10   0.5710A   3.1499  -0.6206  -0.5886  0.054  0.00   0.000      0.  0.846E+00  0.464E-01  0.522E-03  0.147E-04   45  21   2   21  18   6   32  23  17    0.000    0.000       0
+  0  22637 03:46:18.44   0.5790A   3.1087  -0.5920   0.6267  0.054  0.00   0.000      0.  0.846E+00  0.466E-01  0.537E-03  0.159E-04   45  21  11   20  14   8   20  12   9    0.000    0.000       0
+  0  22647 03:46:24.28   0.5870A   3.0646  -0.7460  -0.9540  0.054  0.00   0.000      0.  0.847E+00  0.468E-01  0.547E-03  0.159E-04   44  25  35   20  14   9   17  16   9    0.000    0.000       0
+  0  22657 03:46:30.15   0.5850A   3.0743  -0.6752  -0.9931  0.055  0.00   0.000      0.  0.847E+00  0.469E-01  0.544E-03  0.141E-04   43  22  31   19  13   9   16  18   9    0.000    0.000       0
+  0  22668 03:46:36.57   0.5840A   3.0796  -0.6375  -0.9215  0.056  0.00   0.000      0.  0.848E+00  0.468E-01  0.539E-03  0.137E-04   43  22  39   23  14  20   15  18   9    0.000    0.000       0
+  0  22678 03:46:42.40   0.5810A   3.0978   0.6504  -0.8354  0.056  0.00   0.000      0.  0.848E+00  0.468E-01  0.536E-03  0.140E-04   43  20  32   34  27  10   13  18   9    0.000    0.000       0
+  0  22688 03:46:48.18   0.5780A   3.1122  -0.6276  -0.8067  0.057  0.00   0.000      0.  0.848E+00  0.469E-01  0.539E-03  0.151E-04   45  18   8   24  12  25   16  21   9    0.000    0.000       0
+  0  22699 03:46:54.44   0.5600A   3.2135   0.6462  -0.7734  0.057  0.00   0.000      0.  0.849E+00  0.470E-01  0.528E-03  0.153E-04   45  18  17   35  30  28   16  21   9    0.000    0.000       0
+  0  22710 03:47:00.55   0.5560A   3.2388   0.6347  -0.7661  0.058  0.00   0.000      0.  0.849E+00  0.471E-01  0.527E-03  0.151E-04   46  18  25   34  33  33   17  22   9    0.000    0.000       0
+  0  22720 03:47:06.16   0.5610A   3.2106   0.6442  -0.7916  0.058  0.00   0.000      0.  0.850E+00  0.472E-01  0.531E-03  0.146E-04   42  19  32   35  31  39   16  22   9    0.000    0.000       0
+  0  22731 03:47:12.26   0.5520A   3.2621   0.6144  -0.7508  0.059  0.00   0.000      0.  0.850E+00  0.473E-01  0.522E-03  0.136E-04   42  19   0   34  33   3   15  23   9    0.000    0.000       0
+  0  22742 03:47:18.30   0.5530A   3.2578  -0.6020  -0.8227  0.058  0.00   0.000      0.  0.850E+00  0.472E-01  0.519E-03  0.130E-04   42  19   9   33  19  11   17  18   9    0.000    0.000       0
+  0  22753 03:47:24.49   0.5670A   3.1759   0.5939  -0.7934  0.058  0.00   0.000      0.  0.851E+00  0.470E-01  0.527E-03  0.129E-04   42  18  17   34  36  13   16  18   9    0.000    0.000       0
+  0  22763 03:47:30.20   0.5750A   3.1316  -0.6143  -0.7731  0.058  0.00   0.000      0.  0.851E+00  0.469E-01  0.535E-03  0.130E-04   43  17  26   19  28   9   15  19   9    0.000    0.000       0
+  0  22774 03:47:36.48   0.5750A   3.1283   0.6061  -0.7251  0.057  0.00   0.000      0.  0.852E+00  0.468E-01  0.539E-03  0.119E-04   43  17  33   35  37  22   15  21   9    0.000    0.000       0
+  0  22784 03:47:42.32   0.5810A   3.0963  -0.6165  -0.7060  0.056  0.00   0.000      0.  0.852E+00  0.468E-01  0.550E-03  0.113E-04   45  22  11   23  10  19   14  21   9    0.000    0.000       0
+  0  22794 03:47:48.14   0.5830A   3.0899  -0.7041  -0.6434  0.055  0.00   0.000      0.  0.853E+00  0.467E-01  0.554E-03  0.116E-04   45  22  18   23   8  22   13  21   9    0.000    0.000       0
+  0  22804 03:47:54.03   0.5930A   3.0368  -0.6238  -0.6274  0.055  0.00   0.000      0.  0.853E+00  0.468E-01  0.563E-03  0.122E-04   46  20  30   22   8  23   32  24  31    0.000    0.000       0
+  0  22815 03:48:00.58   0.5980A   3.0090  -0.6326  -0.6404  0.055  0.00   0.000      0.  0.854E+00  0.469E-01  0.570E-03  0.129E-04   44  22  36   22   7  25   29  24   4    0.000    0.000       0
+  0  22825 03:48:06.59   0.5980A   3.0087  -0.6690  -0.5938  0.055  0.00   0.000      0.  0.855E+00  0.470E-01  0.571E-03  0.135E-04   44  26   1   31  14  15   33  25  11    0.000    0.000       0
+  0  22835 03:48:12.57   0.6020A   2.9894  -0.6915  -0.6318  0.055  0.00   0.000      0.  0.856E+00  0.472E-01  0.577E-03  0.155E-04   44  26   8   28  22  16   33  25  16    0.000    0.000       0
+  0  22845 03:48:18.59   0.6010A   2.9972  -0.7355  -0.6348  0.056  0.00   0.000      0.  0.856E+00  0.474E-01  0.581E-03  0.168E-04   43  12  19   28  21  20   32  25  21    0.000    0.000       0
+  0  22855 03:48:24.58   0.5920A   3.0427  -0.7305  -0.7151  0.056  0.00   0.000      0.  0.857E+00  0.476E-01  0.570E-03  0.146E-04   43  23  29   27  21  24   17  20   9    0.000    0.000       0
+  0  22865 03:48:30.40   0.5770A   3.1192  -0.7180  -0.8172  0.057  0.00   0.000      0.  0.857E+00  0.477E-01  0.556E-03  0.137E-04   43  23  36   28  22  26   17  18   9    0.000    0.000       0
+  0  22875 03:48:36.18   0.5820A   3.0912  -0.6925  -1.0074  0.058  0.00   0.000      0.  0.858E+00  0.478E-01  0.556E-03  0.135E-04   43  23   3   28  21  30   16  17   9    0.000    0.000       0
+  0  22885 03:48:42.03   0.5880A   3.0587  -0.6798  -1.0138  0.059  0.00   0.000      0.  0.859E+00  0.478E-01  0.559E-03  0.152E-04   43  23  11   28  20  34   16  15   9    0.000    0.000       0
+  0  22896 03:48:48.56   0.5950A   3.0252  -0.7027  -1.0235  0.060  0.00   0.000      0.  0.859E+00  0.476E-01  0.560E-03  0.156E-04   42  11   9   28   2  19   15  14   9    0.000    0.000       0
+  0  22906 03:48:54.42   0.5810A   3.0980  -0.6865  -1.0733  0.061  0.00   0.000      0.  0.860E+00  0.473E-01  0.549E-03  0.155E-04   42  11  15   28   1  22   15  15   9    0.000    0.000       0
+  0  22916 03:49:00.18   0.5650A   3.1850  -0.6960  -1.0507  0.061  0.00   0.000      0.  0.860E+00  0.470E-01  0.536E-03  0.145E-04   41  11  22   19  10   9   14  15   9    0.000    0.000       0
+  0  22927 03:49:06.31   0.5570A   3.2327  -0.6620  -1.0695  0.062  0.00   0.000      0.  0.861E+00  0.465E-01  0.528E-03  0.139E-04   41  11  29   30  21  15   12  11   9    0.000    0.000       0
+  0  22937 03:49:12.11   0.6010A   2.9936  -0.6915  -1.0170  0.062  0.00   0.000      0.  0.862E+00  0.461E-01  0.565E-03  0.133E-04   46  18   4   30  21  20   10  11   9    0.000    0.000       0
+  0  22947 03:49:18.08   0.5950A   3.0261  -0.6372  -0.9389  0.062  0.00   0.000      0.  0.862E+00  0.456E-01  0.553E-03  0.117E-04   46  18  11   30  21  25   11  10   9    0.000    0.000       0
+  0  22957 03:49:24.06   0.5990A   3.0074   0.6528  -0.8571  0.061  0.00   0.000      0.  0.863E+00  0.450E-01  0.552E-03  0.121E-04   46  19  19   19  10   8    9  10   9    0.000    0.000       0
+  0  22967 03:49:30.04   0.6000A   3.0002  -0.5959  -0.7741  0.060  0.00   0.000      0.  0.864E+00  0.447E-01  0.552E-03  0.144E-04   46  19  26   31  16  15    8  15   9    0.000    0.000       0
+  0  22977 03:49:36.12   0.6130A   2.9371  -0.6007  -0.7325  0.058  0.00   0.000      0.  0.865E+00  0.445E-01  0.561E-03  0.169E-04   46  18  33   30  16  20    7  15   9    0.000    0.000       0
+  0  22987 03:49:42.11   0.5910A   3.0450  -0.5791  -0.6961  0.057  0.00   0.000      0.  0.866E+00  0.444E-01  0.541E-03  0.162E-04   43   1  23   26  10   2    5  15   8    0.000    0.000       0
+  0  22997 03:49:48.08   0.6040A   2.9789   0.6764  -0.7175  0.055  0.00   0.000      0.  0.867E+00  0.443E-01  0.551E-03  0.153E-04   43   1  30   21  20   8   28  10  28    0.000    0.000       0
+  0  23007 03:49:54.07   0.6010A   2.9935   0.6571  -0.6037  0.055  0.00   0.000      0.  0.868E+00  0.443E-01  0.547E-03  0.141E-04   43  20  16   20  20   8    5  14   9    0.000    0.000       0
+  0  23017 03:50:00.06   0.6020A   2.9922  -0.6192   0.5735  0.056  0.00   0.000      0.  0.868E+00  0.444E-01  0.545E-03  0.142E-04   45  25  32   28  11  37   28   5  39    0.000    0.000       0
+  0  23027 03:50:06.04   0.5970A   3.0173  -0.8160  -0.8794  0.056  0.00   0.000      0.  0.869E+00  0.445E-01  0.540E-03  0.137E-04   45  25   0   19   9   9   18  12   9    0.000    0.000       0
+  0  23038 03:50:12.55   0.5870A   3.0669  -0.6855  -0.9948  0.056  0.00   0.000      0.  0.870E+00  0.444E-01  0.523E-03  0.117E-04   46  26   9   18   8   9   17  11   9    0.000    0.000       0
+  0  23048 03:50:18.39   0.5830A   3.0896  -0.6869  -0.8940  0.057  0.00   0.000      0.  0.871E+00  0.443E-01  0.517E-03  0.117E-04   46  26  16   35  38   8   16  11   9    0.000    0.000       0
+  0  23058 03:50:24.23   0.5860A   3.0733  -0.6345  -0.8379  0.057  0.00   0.000      0.  0.871E+00  0.442E-01  0.520E-03  0.123E-04   46  26  24   20  17   9   18  19   9    0.000    0.000       0
+  0  23068 03:50:30.14   0.5940A   3.0285  -0.6710  -0.8849  0.056  0.00   0.000      0.  0.872E+00  0.442E-01  0.527E-03  0.132E-04   44  19   6   19  17   9   17  19   9    0.000    0.000       0
+  0  23078 03:50:36.04   0.5900A   3.0495   0.6019  -0.8561  0.055  0.00   0.000      0.  0.873E+00  0.441E-01  0.526E-03  0.136E-04   44  19  14   28  28  26   16  20   9    0.000    0.000       0
+  0  23089 03:50:42.56   0.5930A   3.0353   0.5899  -0.7747  0.055  0.00   0.000      0.  0.874E+00  0.441E-01  0.532E-03  0.137E-04   45  27   9   28  29  31   15  21   9    0.000    0.000       0
+  0  23099 03:50:48.46   0.5890A   3.0561   0.6641  -0.7180  0.054  0.00   0.000      0.  0.875E+00  0.441E-01  0.534E-03  0.142E-04   46  27  17   20  17   8   14  21   9    0.000    0.000       0
+  0  23109 03:50:54.31   0.5790A   3.1110   0.6800  -0.6617  0.054  0.00   0.000      0.  0.875E+00  0.440E-01  0.530E-03  0.142E-04   44  30  23   20  18   8   14  22   9    0.000    0.000       0
+  0  23119 03:51:00.03   0.5650A   3.1845   0.7413  -0.6193  0.053  0.00   0.000      0.  0.876E+00  0.439E-01  0.520E-03  0.140E-04   44  30  31   20  19   8   14  23   9    0.000    0.000       0
+  0  23130 03:51:06.18   0.5570A   3.2317   0.6671  -0.5741  0.052  0.00   0.000      0.  0.877E+00  0.438E-01  0.514E-03  0.141E-04   44  30  39   20  21   8   13  23   9    0.000    0.000       0
+  0  23141 03:51:12.27   0.5540A   3.2468  -0.6302  -0.5046  0.051  0.00   0.000      0.  0.878E+00  0.436E-01  0.513E-03  0.139E-04   44  30   7   37  26  32   12  23   9    0.000    0.000       0
+  0  23152 03:51:18.39   0.5620A   3.2019  -0.6497  -0.4952  0.050  0.00   0.000      0.  0.879E+00  0.433E-01  0.521E-03  0.143E-04   44  30  15   39  26  19   11  21   8    0.000    0.000       0
+  0  23163 03:51:24.51   0.5530A   3.2562  -0.6833  -0.5297  0.050  0.00   0.000      0.  0.880E+00  0.431E-01  0.512E-03  0.131E-04   43  28  22   39  26  24   37  18  15    0.000    0.000       0
+  0  23173 03:51:30.02   0.5540A   3.2489  -0.6184   0.5460  0.050  0.00   0.000      0.  0.881E+00  0.429E-01  0.511E-03  0.128E-04   43  28  30   38  24  27   20  29   9    0.000    0.000       0
+  0  23184 03:51:36.07   0.5510A   3.2688  -0.6584  -0.5652  0.050  0.00   0.000      0.  0.882E+00  0.427E-01  0.506E-03  0.129E-04   43  28  38   38   3  33   36  18  26    0.000    0.000       0
+  0  23195 03:51:42.11   0.5490A   3.2758  -0.7242  -0.7890  0.050  0.00   0.000      0.  0.883E+00  0.424E-01  0.501E-03  0.124E-04   43  28   5   39  27  37   18  15   9    0.000    0.000       0
+  0  23206 03:51:48.22   0.5580A   3.2245  -0.6680  -0.7613  0.050  0.00   0.000      0.  0.884E+00  0.421E-01  0.506E-03  0.114E-04   43  28  13   39  26   3   18  14   9    0.000    0.000       0
+  0  23217 03:51:54.38   0.5610A   3.2085  -0.6911  -0.6734  0.051  0.00   0.000      0.  0.885E+00  0.418E-01  0.510E-03  0.115E-04   43  28  20   39  26  10   17  13   9    0.000    0.000       0
+  0  23227 03:52:00.02   0.5640A   3.1899  -0.6931  -0.5645  0.051  0.00   0.000      0.  0.887E+00  0.416E-01  0.517E-03  0.120E-04   43  28  27   38  26  14   16  13   9    0.000    0.000       0
+  0  23238 03:52:06.27   0.5690A   3.1628  -0.6774   0.5608  0.052  0.00   0.000      0.  0.888E+00  0.414E-01  0.525E-03  0.129E-04   43  28  35   25  10   1   37   1  10    0.000    0.000       0
+  0  23249 03:52:12.57   0.5720A   3.1448   0.6893  -0.6120  0.053  0.00   0.000      0.  0.889E+00  0.413E-01  0.528E-03  0.133E-04   43  31  14   37   2  18   17  22   9    0.000    0.000       0
+  0  23259 03:52:18.22   0.5620A   3.2010  -0.6476  -0.7382  0.053  0.00   0.000      0.  0.890E+00  0.411E-01  0.519E-03  0.128E-04   43  31  21   25   9   9   17  23   9    0.000    0.000       0
+  0  23270 03:52:24.52   0.5800A   3.1044   0.6830  -0.7956  0.053  0.00   0.000      0.  0.891E+00  0.410E-01  0.534E-03  0.132E-04   45  25  13   19  30   9   16  23   9    0.000    0.000       0
+  0  23280 03:52:30.28   0.5750A   3.1319   0.6868  -0.8373  0.052  0.00   0.000      0.  0.892E+00  0.409E-01  0.532E-03  0.123E-04   46  25  21   21  18   8   17  24   9    0.000    0.000       0
+  0  23290 03:52:36.00   0.5730A   3.1399   0.7024  -0.8679  0.052  0.00   0.000      0.  0.893E+00  0.409E-01  0.529E-03  0.118E-04   46  25  28   21  19   8   16  24   9    0.000    0.000       0
+  0  23301 03:52:42.34   0.5760A   3.1274   0.7258  -0.8091  0.052  0.00   0.000      0.  0.894E+00  0.409E-01  0.533E-03  0.125E-04   43  29  17   20  19   8   15  24   9    0.000    0.000       0
+  0  23311 03:52:48.15   0.5840A   3.0797  -0.6143  -0.7391  0.053  0.00   0.000      0.  0.895E+00  0.410E-01  0.544E-03  0.139E-04   44  22   2   23   8  14   14  23   9    0.000    0.000       0
+  0  23322 03:52:54.53   0.5780A   3.1147  -0.6455  -0.6836  0.053  0.00   0.000      0.  0.895E+00  0.411E-01  0.542E-03  0.152E-04   46  21   9   26   6  35   12  23   9    0.000    0.000       0
+  0  23332 03:53:00.33   0.5810A   3.0959  -0.6197  -0.6397  0.053  0.00   0.000      0.  0.896E+00  0.414E-01  0.548E-03  0.174E-04   46  21  17   26   5  38   11  22   9    0.000    0.000       0
+  0  23342 03:53:06.07   0.5680A   3.1667  -0.6327  -0.6402  0.054  0.00   0.000      0.  0.896E+00  0.417E-01  0.538E-03  0.161E-04   44  20  25   34  24   4   11  22   9    0.000    0.000       0
+  0  23353 03:53:12.28   0.5700A   3.1596   0.6933  -0.6211  0.054  0.00   0.000      0.  0.897E+00  0.422E-01  0.541E-03  0.155E-04   44  20  32   20  28   8   10  22   9    0.000    0.000       0
+  0  23364 03:53:18.57   0.5690A   3.1630   0.8407   0.6805  0.054  0.00   0.000      0.  0.897E+00  0.427E-01  0.543E-03  0.148E-04   44  21   1   20  29   8   20  14   9    0.000    0.000       0
+  0  23374 03:53:24.28   0.5720A   3.1460   0.7104  -0.7144  0.054  0.00   0.000      0.  0.898E+00  0.431E-01  0.553E-03  0.168E-04   44  21   8   20  30   9   20  16   4    0.000    0.000       0
+  0  23384 03:53:30.05   0.5770A   3.1206  -0.7512  -1.0391  0.055  0.00   0.000      0.  0.898E+00  0.435E-01  0.563E-03  0.173E-04   42   9   1   21  12   8   17  19   9    0.000    0.000       0
+  0  23395 03:53:36.39   0.5750A   3.1325  -0.8941  -1.2827  0.057  0.00   0.000      0.  0.898E+00  0.437E-01  0.564E-03  0.144E-04   46  29   0   19  15   9   16  18   9    0.000    0.000       0
+  0  23405 03:53:42.07   0.5640A   3.1934  -0.8861  -1.2482  0.058  0.00   0.000      0.  0.898E+00  0.437E-01  0.561E-03  0.152E-04   46  29   7   19  14   9   14  18   9    0.000    0.000       0
+  0  23416 03:53:48.24   0.5600A   3.2159  -0.7892  -1.1498  0.058  0.00   0.000      0.  0.898E+00  0.434E-01  0.556E-03  0.140E-04   45  29  14   17  14   9   16  21   9    0.000    0.000       0
+  0  23427 03:53:54.42   0.5640A   3.1934  -0.7606  -1.0391  0.058  0.00   0.000      0.  0.898E+00  0.430E-01  0.552E-03  0.131E-04   46  29  22   23  11   2   15  21   9    0.000    0.000       0
+  0  23437 03:54:00.11   0.5710A   3.1503  -0.8950  -0.9239  0.058  0.00   0.000      0.  0.899E+00  0.427E-01  0.551E-03  0.129E-04   46  13  11   23  10   4   13  21   9    0.000    0.000       0
+  0  23448 03:54:06.36   0.5680A   3.1668  -0.7487  -0.8053  0.058  0.00   0.000      0.  0.899E+00  0.424E-01  0.542E-03  0.131E-04   46  28  38   23   9   7   13  23   9    0.000    0.000       0
+  0  23458 03:54:12.00   0.5660A   3.1796  -0.6946  -0.7597  0.057  0.00   0.000      0.  0.900E+00  0.422E-01  0.533E-03  0.133E-04   46  28   6   22   9   8   12  17   8    0.000    0.000       0
+  0  23469 03:54:18.27   0.5750A   3.1279  -0.6794  -0.7708  0.057  0.00   0.000      0.  0.900E+00  0.420E-01  0.540E-03  0.137E-04   45  12   5   22   8  10    9  23   8    0.000    0.000       0
+  0  23480 03:54:24.53   0.5670A   3.1767  -0.6748  -0.7595  0.056  0.00   0.000      0.  0.901E+00  0.417E-01  0.535E-03  0.138E-04   46  12  14   23   8  21    8  23   8    0.000    0.000       0
+  0  23490 03:54:30.14   0.5570A   3.2320  -0.6806  -0.7004  0.055  0.00   0.000      0.  0.901E+00  0.415E-01  0.530E-03  0.144E-04   45  11  19   23   7  23    7  23   8    0.000    0.000       0
+  0  23501 03:54:36.21   0.5500A   3.2747  -0.6645   0.6587  0.055  0.00   0.000      0.  0.902E+00  0.414E-01  0.527E-03  0.151E-04   45  11  27   21   9  20   20  10   9    0.000    0.000       0
+  0  23512 03:54:42.29   0.5530A   3.2557   0.7944   0.7018  0.055  0.00   0.000      0.  0.902E+00  0.413E-01  0.528E-03  0.155E-04   44  11  34   20  30   9   20  11   9    0.000    0.000       0
+  0  23523 03:54:48.28   0.5430A   3.3150   0.7309  -0.6773  0.055  0.00   0.000      0.  0.903E+00  0.412E-01  0.510E-03  0.123E-04   44  11   2   20  22   8   18  22   9    0.000    0.000       0
+  0  23534 03:54:54.29   0.5530A   3.2543  -0.6276  -0.6912  0.056  0.00   0.000      0.  0.903E+00  0.412E-01  0.508E-03  0.103E-04   43  10  10   41  23  28   17  23   9    0.000    0.000       0
+  0  23545 03:55:00.40   0.5550A   3.2449   0.6358  -0.6422  0.056  0.00   0.000      0.  0.904E+00  0.411E-01  0.502E-03  0.112E-04   46  28  32   24  21   9   16  23   9    0.000    0.000       0
+  0  23556 03:55:06.45   0.5470A   3.2915  -0.6487  -0.5910  0.055  0.00   0.000      0.  0.904E+00  0.411E-01  0.489E-03  0.114E-04   44  10  30   40  24   1   16  23   9    0.000    0.000       0
+  0  23567 03:55:12.37   0.5350A   3.3655   0.6603  -0.5953  0.055  0.00   0.000      0.  0.904E+00  0.412E-01  0.475E-03  0.112E-04   43  10  38   22  20  12   17  20   9    0.000    0.000       0
+  0  23578 03:55:18.13   0.5160A   3.4893   0.6632  -0.6985  0.055  0.00   0.000      0.  0.905E+00  0.413E-01  0.461E-03  0.116E-04   43  10   6   20  20   9   18  17   9    0.000    0.000       0
+  0  23590 03:55:24.29   0.5140A   3.5040  -0.6855  -0.7999  0.055  0.00   0.000      0.  0.905E+00  0.414E-01  0.461E-03  0.119E-04   43  10  15   20  21   6   17  18   9    0.000    0.000       0
+  0  23601 03:55:30.07   0.5370A   3.3492  -0.8041  -0.8075  0.055  0.00   0.000      0.  0.905E+00  0.415E-01  0.478E-03  0.113E-04   43  10  23   20  20   8   16  18   9    0.000    0.000       0
+  0  23612 03:55:36.11   0.5480A   3.2820  -1.2137  -0.9028  0.055  0.00   0.000      0.  0.906E+00  0.415E-01  0.486E-03  0.113E-04   43  23  36   20  18   8   17  15   9    0.000    0.000       0
+  0  23623 03:55:42.16   0.5510A   3.2692  -0.9579  -0.9917  0.054  0.00   0.000      0.  0.906E+00  0.413E-01  0.489E-03  0.117E-04   43  23   4   20  15   8   17  14   9    0.000    0.000       0
+  0  23634 03:55:48.22   0.5490A   3.2776   0.6429  -0.8731  0.054  0.00   0.000      0.  0.906E+00  0.411E-01  0.485E-03  0.121E-04   44  22  16   23  23  38   16  14   9    0.000    0.000       0
+  0  23645 03:55:54.19   0.5390A   3.3400   0.6939  -0.7914  0.053  0.00   0.000      0.  0.907E+00  0.410E-01  0.474E-03  0.124E-04   43  22  22   20  12   8   14  14   9    0.000    0.000       0
+  0  23656 03:56:00.14   0.5420A   3.3198  -0.6535  -0.7290  0.052  0.00   0.000      0.  0.907E+00  0.409E-01  0.478E-03  0.118E-04   43  22  30   35  38  28   26  15  30    0.000    0.000       0
+  0  23667 03:56:06.24   0.5570A   3.2296  -0.6637   0.6558  0.052  0.00   0.000      0.  0.908E+00  0.407E-01  0.497E-03  0.120E-04   43  21  37   27  10  38   20  11   9    0.000    0.000       0
+  0  23678 03:56:12.33   0.5450A   3.3012  -0.6504  -0.6744  0.051  0.00   0.000      0.  0.909E+00  0.406E-01  0.493E-03  0.129E-04   44   8  31   24  10  39   32   4  24    0.000    0.000       0
+  0  23689 03:56:18.32   0.5490A   3.2776  -0.6927  -0.6020  0.051  0.00   0.000      0.  0.910E+00  0.405E-01  0.498E-03  0.128E-04   44   8  39   24   9   2   31   4  29    0.000    0.000       0
+  0  23700 03:56:24.36   0.5440A   3.3100  -0.6098  -0.5643  0.051  0.00   0.000      0.  0.910E+00  0.403E-01  0.496E-03  0.123E-04   43   8   7   24   9   5    9  13   9    0.000    0.000       0
+  0  23711 03:56:30.32   0.5380A   3.3444   0.7477  -0.6220  0.051  0.00   0.000      0.  0.911E+00  0.401E-01  0.491E-03  0.123E-04   44   7  16   20  25   9   22  10   2    0.000    0.000       0
+  0  23722 03:56:36.28   0.5480A   3.2864   0.7890  -0.5528  0.052  0.00   0.000      0.  0.912E+00  0.398E-01  0.498E-03  0.121E-04   44   7  24   22  19  17    8  14   8    0.000    0.000       0
+  0  23733 03:56:42.33   0.5420A   3.3220   0.7739  -0.6333  0.053  0.00   0.000      0.  0.913E+00  0.396E-01  0.490E-03  0.121E-04   43   7  30   22  20  20   31   5   9    0.000    0.000       0
+  0  23744 03:56:48.28   0.5420A   3.3194   0.7754  -0.8061  0.053  0.00   0.000      0.  0.914E+00  0.394E-01  0.492E-03  0.130E-04   43   7  38   22  21  24   17  20   9    0.000    0.000       0
+  0  23755 03:56:54.32   0.5500A   3.2727   0.7384  -0.8459  0.053  0.00   0.000      0.  0.915E+00  0.393E-01  0.499E-03  0.136E-04   43   7   6   22  22  28   16  20   9    0.000    0.000       0
+  0  23766 03:57:00.40   0.5540A   3.2489   0.6801  -0.8525  0.053  0.00   0.000      0.  0.916E+00  0.391E-01  0.500E-03  0.131E-04   46   7  12   22  23  32   15  18   9    0.000    0.000       0
+  0  23777 03:57:06.52   0.5590A   3.2229   0.7273  -0.8076  0.052  0.00   0.000      0.  0.917E+00  0.390E-01  0.503E-03  0.127E-04   46   7  20   22  25  36   14  17   9    0.000    0.000       0
+  0  23787 03:57:12.15   0.5640A   3.1903   0.6851  -0.7296  0.052  0.00   0.000      0.  0.918E+00  0.388E-01  0.506E-03  0.121E-04   45   6  37   22  27  39   13  16   9    0.000    0.000       0
+  0  23798 03:57:18.27   0.5520A   3.2632   0.7052  -0.7224  0.052  0.00   0.000      0.  0.919E+00  0.387E-01  0.495E-03  0.118E-04   46  24  18   22  28   2   16  17   9    0.000    0.000       0
+  0  23809 03:57:24.31   0.5510A   3.2673  -0.6534  -0.6758  0.052  0.00   0.000      0.  0.920E+00  0.385E-01  0.495E-03  0.119E-04   45  24  25   43  11   1   15  16   9    0.000    0.000       0
+  0  23820 03:57:30.32   0.5470A   3.2885   0.6166  -0.6630  0.052  0.00   0.000      0.  0.921E+00  0.384E-01  0.491E-03  0.120E-04   46  24  34   29  18  27   13  16   9    0.000    0.000       0
+  0  23831 03:57:36.30   0.5440A   3.3089  -0.6364  -0.6448  0.052  0.00   0.000      0.  0.922E+00  0.383E-01  0.489E-03  0.119E-04   46  24   2   32  10  15   29   3  18    0.000    0.000       0
+  0  23842 03:57:42.30   0.5510A   3.2644   0.6675  -0.6364  0.052  0.00   0.000      0.  0.923E+00  0.382E-01  0.495E-03  0.129E-04   46  24  10   19  30   9   29   3  23    0.000    0.000       0
+  0  23853 03:57:48.43   0.5680A   3.1688   0.6128  -0.6457  0.052  0.00   0.000      0.  0.924E+00  0.380E-01  0.512E-03  0.121E-04   46  24  18   19  30   9   17  28   9    0.000    0.000       0
+  0  23863 03:57:54.11   0.5670A   3.1754  -0.5969  -0.5830  0.051  0.00   0.000      0.  0.925E+00  0.379E-01  0.516E-03  0.121E-04   46  22  22   37  19   9   17  28   9    0.000    0.000       0
+  0  23874 03:58:00.39   0.5720A   3.1456   0.6582  -0.6017  0.051  0.00   0.000      0.  0.926E+00  0.378E-01  0.527E-03  0.119E-04   46  26  34   20  25   9   18  23   9    0.000    0.000       0
+  0  23884 03:58:06.13   0.5730A   3.1393  -0.6068   0.6198  0.051  0.00   0.000      0.  0.927E+00  0.377E-01  0.530E-03  0.115E-04   46  23  38   20  13   9   21  11   9    0.000    0.000       0
+  0  23895 03:58:12.41   0.5600A   3.2131  -0.6146  -0.6556  0.051  0.00   0.000      0.  0.928E+00  0.376E-01  0.521E-03  0.122E-04   42  28   9   40  27  36   18  17   9    0.000    0.000       0
+  0  23906 03:58:18.50   0.5580A   3.2246  -0.6214  -0.8127  0.050  0.00   0.000      0.  0.929E+00  0.376E-01  0.517E-03  0.120E-04   42  28  18   40  26   2   17  18   9    0.000    0.000       0
+  0  23916 03:58:24.20   0.5770A   3.1216  -0.6203  -0.8573  0.050  0.00   0.000      0.  0.930E+00  0.376E-01  0.536E-03  0.139E-04   41  28  24   40  25   8   16  18   9    0.000    0.000       0
+  0  23927 03:58:30.52   0.5770A   3.1181   0.6071  -0.8182  0.050  0.00   0.000      0.  0.931E+00  0.377E-01  0.539E-03  0.149E-04   46   2  12   28  21   1   15  18   9    0.000    0.000       0
+  0  23937 03:58:36.28   0.5720A   3.1476   0.6172  -0.7322  0.050  0.00   0.000      0.  0.932E+00  0.378E-01  0.535E-03  0.156E-04   44  13  26   28  21   5   14  18   9    0.000    0.000       0
+  0  23948 03:58:42.48   0.5600A   3.2158   0.6444  -0.6721  0.051  0.00   0.000      0.  0.933E+00  0.380E-01  0.522E-03  0.144E-04   44  13  34   22  31   7   14  19   9    0.000    0.000       0
+  0  23958 03:58:48.04   0.5540A   3.2484  -0.6630  -0.6424  0.051  0.00   0.000      0.  0.934E+00  0.381E-01  0.517E-03  0.134E-04   44  13   2   36  23  12   12  19   9    0.000    0.000       0
+  0  23969 03:58:54.14   0.5530A   3.2536  -0.6823   0.6208  0.050  0.00   0.000      0.  0.935E+00  0.381E-01  0.521E-03  0.129E-04   44  13  10   44  37   9   20  12   9    0.000    0.000       0
+  0  23980 03:59:00.23   0.5560A   3.2388  -0.6905   0.6106  0.050  0.00   0.000      0.  0.936E+00  0.382E-01  0.530E-03  0.136E-04   44  13  18   44  36  16   21  12   9    0.000    0.000       0
+  0  23991 03:59:06.35   0.5590A   3.2227  -0.6799   0.6098  0.049  0.00   0.000      0.  0.937E+00  0.383E-01  0.538E-03  0.148E-04   44  13  27   44  36  21   21  12   9    0.000    0.000       0
+  0  24002 03:59:12.52   0.5590A   3.2204  -0.7373  -0.6264  0.048  0.00   0.000      0.  0.938E+00  0.386E-01  0.544E-03  0.139E-04   44  13  36   22  13   7   16  21   9    0.000    0.000       0
+  0  24012 03:59:18.10   0.5590A   3.2196  -0.7027  -0.6418  0.048  0.00   0.000      0.  0.939E+00  0.388E-01  0.544E-03  0.136E-04   44  13   3   45  34   0   15  21   9    0.000    0.000       0
+  0  24023 03:59:24.27   0.5670A   3.1757  -0.7767  -0.6428  0.048  0.00   0.000      0.  0.940E+00  0.390E-01  0.554E-03  0.142E-04   44  13  12   20  24   8   15  20   9    0.000    0.000       0
+  0  24034 03:59:30.48   0.5640A   3.1910  -0.8309  -0.6872  0.049  0.00   0.000      0.  0.941E+00  0.392E-01  0.559E-03  0.145E-04   45  12  18   20  22   8   18  17   9    0.000    0.000       0
+  0  24044 03:59:36.14   0.5660A   3.1793  -0.8433  -0.8805  0.051  0.00   0.000      0.  0.942E+00  0.393E-01  0.565E-03  0.144E-04   45  12  25   20  20   8   17  16   9    0.000    0.000       0
+  0  24055 03:59:42.38   0.5710A   3.1507  -0.9305  -0.9345  0.053  0.00   0.000      0.  0.943E+00  0.394E-01  0.571E-03  0.141E-04   45  11  33   19  12   9   16  14   9    0.000    0.000       0
+  0  24065 03:59:48.07   0.5670A   3.1719  -0.7995  -0.8496  0.055  0.00   0.000      0.  0.944E+00  0.394E-01  0.562E-03  0.134E-04   44  10   1   18  12   9   15  13   9    0.000    0.000       0
+  0  24076 03:59:54.29   0.5630A   3.1957  -0.6767  -0.9166  0.056  0.00   0.000      0.  0.944E+00  0.392E-01  0.555E-03  0.118E-04   43  10   8   17  12   9   18  21   9    0.000    0.000       0
+  0  24087 04:00:00.45   0.5620A   3.2033   0.6834  -0.8566  0.056  0.00   0.000      0.  0.945E+00  0.391E-01  0.548E-03  0.120E-04   43  10  16   24  26  34   17  23   9    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/dvr/example_dvr_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/dvr/example_dvr_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/dvr/example_dvr_p3d	(revision 3477)
@@ -0,0 +1,51 @@
+ &inipar nx = 79, ny = 79, nz = 80,
+         dx = 25.0, dy = 25.0, dz = 25.0,
+         dz_stretch_level = 1200.0,
+
+         fft_method = 'temperton-algorithm',
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 0.0, vg_surface = 0.0,
+         pt_surface = 288.0,
+         pt_vertical_gradient       = 0.0, 1.0,
+         pt_vertical_gradient_level = 0.0, 800.0,
+
+         humidity = .TRUE., cloud_physics = .TRUE.,
+         q_surface = 0.008,
+         surface_waterflux = 3.20E-4,
+         q_vertical_gradient        = -0.00029, -0.002, 0.0,
+         q_vertical_gradient_level  =      0.0,  700.0, 800.0,
+
+	 surface_heatflux = 0.1, bc_pt_b = 'neumann', bc_e_b = 'neumann',
+                                 bc_q_b = 'neumann', /
+
+
+ &d3par  end_time = 3600.0, dt = 1.0,
+
+         create_disturbances = .T.,
+         dt_disturb = 150.0, disturbance_energy_limit = 0.01,
+
+         dt_run_control = 60.0,
+
+         data_output = 'ql',
+
+         nz_do3d = 50, /
+
+ &particles_par      dt_prel = 200.0, particle_maximum_age = 3600.0,
+                     psb = 50.0,
+                     pdx = 200.0, pdy = 200.0,
+                     random_start_position = .T.,
+                     use_particle_tails = .T., skip_particles_for_tail = 1,
+                     maximum_number_of_tailpoints = 60,
+                     minimum_tailpoint_distance = 25.0,
+                     maximum_tailpoint_age = 300.0,
+                     write_particle_statistics = .F., /
+
+ &dvrp_graphics_par  dvrp_username = '<replace by your IMUK username>',
+                     dvrp_host = '130.75.105.2',
+                     dvrp_directory = '<rep by IMUK usern>/<replace by subdirectory name of your choice>',
+                     mode_dvrp = 'particles', 'isosurface1',
+                     threshold = 0.0002,
+                     particle_color = 'pt*', color_interval = -0.5, +0.5,
+                     particle_dvrpsize = 'absw', dvrpsize_interval = 0.0, 5.0,
+                     dt_dvrp = 1.0, /
Index: /palm/tags/release-6.0/EXAMPLES/dvr/example_dvr_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/dvr/example_dvr_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/dvr/example_dvr_rc	(revision 3477)
@@ -0,0 +1,306 @@
+
+ ***************************         ------------------------------------------
+ * PALM 3.6  Rev: 335:336  *         atmosphere - 3D - run without 1D - prerun
+ ***************************         ------------------------------------------
+
+ Date:              10-06-09         Run:       example_dvr         
+ Time:              15:02:18         Run-No.:   00
+ Run on host:         lcsgih
+ Number of PEs:           16         Processor grid (x,y): (  4,  4) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> Additional prognostic equation for the total water content
+ --> Parameterization of condensation processes via (0%-or100%)
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:       dt =  1.000 s
+
+ Start time:           0.000 s
+ End time:          3600.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =     25.000 m    dy =     25.000 m    dz =     25.000 m
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   4836.266 m
+
+ dz constant up to   1200.000 m (k=  49), then stretched by factor: 1.080
+ maximum dz not to be exceeded is dz_max = ********** m
+
+ Number of gridpoints (x,y,z):  (0:  79, 0:  79, 0:  81)
+ Subdomain size (x,y,z):        (    20,     20,     82)
+
+ Subdomains have equal size
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt(1)              
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+                     q
+
+ B. bound.: q(0)     = q(1)                                                                      
+ T. bound.: q(nzt)   = q(nzt-1) + dq/dz                                                          
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.100000 K m/s
+       Predefined constant humidity flux:  0.320E-03 m/s
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =  12.50 m   z0 = 0.1000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+
+
+ Data output:
+ -----------
+
+
+    3D-Arrays:
+       Output format: netcdf (64 bit offset)                  
+
+
+       Arrays:  ql,                                                                  
+       Output every             ******** s  
+       Upper output limit at     1239.50 m  (GP   50)
+
+
+    Time series:
+       Output format: netcdf                                  
+
+       Output every                60.00 s
+
+    Plot-Sequence with dvrp-software:
+       Output every          1.0 s
+       Output mode:      rtsp
+       Host / User:      130.75.105.2 / niksiraa
+       Directory:        raasch/example_dvr
+
+       The sequence contains:
+
+       Particles
+          particle size:     5.00 m
+          particle size controlled by "absw" with interval [  0.00,  5.00]
+          particle color controlled by "pt*" with interval [ -0.50,  0.50]
+
+       Isosurface of "ql"    Threshold value:    0.200E-03
+          Isosurface color: (0.90,0.90,0.90) (R,G,B)
+
+       Groundplate color: (0.00,0.60,0.00) (R,G,B)
+       Superelevation along (x,y,z): ( 1.0, 1.0, 1.0)
+       Clipping limits: from x =       0.0 m to x =    2000.0 m
+                        from y =       0.0 m to y =    2000.0 m
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.729E-04 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000119 1/s
+                            f*    =  0.000084 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Cloud physics parameters:
+    ------------------------
+
+        Surface pressure   :   p_0   = 1013.25 hPa
+        Gas constant       :   R     = 287.0 J/(kg K)
+        Density of air     :   rho_0 = 1.221 kg/m**3
+        Specific heat cap. :   c_p   = 1005.0 J/(kg K)
+        Vapourization heat :   L_v   = 0.25E+07 J/kg
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   800.0  m
+       Temperature:   288.00  288.00  288.00  K
+       Gradient:      ------    0.00    1.00  K/100m
+       Gridpoint:          0       0      32
+
+    Characteristic levels of the initial humidity profile:
+
+       Height:           0.0       0.0     700.0     800.0  m
+       Humidity:     0.8E-02   0.8E-02   0.6E-02   0.4E-02  kg/kg
+       Gradient:    --------  -0.3E-03  -0.2E-02   0.0E+00  (kg/kg)/100m
+       Gridpoint:          0         0        28        32
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+   Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :    62.50 m (GP    3)
+    Upper disturbance level         :   637.50 m (GP   26)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+    Particles:
+    ---------
+
+       Particle advection is active (switched on at t =     0.0 s)
+       Start of new particle generations every   200.0 s
+       Boundary conditions: left/right: cyclic          north/south: cyclic         
+                            bottom:     reflect         top:         absorb         
+       Maximum particle age:                    3600.0 s
+       Advection stopped at t = 9999999.9 s
+       Particles are sorted every       0.0 s
+
+       Particles have random start positions
+
+       Number of particles in total domain:        100
+
+       Particles have tails with a maximum of  60 points
+            Number of tails of the total domain:        100
+            Minimum distance between tailpoints:   625.00 m
+            Maximum age of the end of the tail:    300.00 s
+       Number of particle groups:  1
+
+       Particle group  1:
+          Particle radius:  0.000E+00m
+          Particles are advected only passively (no inertia)
+
+          Boundaries of particle source: x:   -12.5 -   1987.5 m
+                                         y:   -12.5 -   1987.5 m
+                                         z:    50.0 -     50.0 m
+          Particle distances:  dx =    200.0 m  dy =    200.0 m  dz =     25.0 m
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*   THETA*    Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   1.0000   -0.2226D -0.2489D -0.1344  0.000  1.40   0.000    800.  0.118E-02  0.118E-02  0.000E+00  0.000E+00   24  79  15   20  25   4   10   9  60    0.000    0.000       0
+  0     60 00:01:00.00   1.0000   -0.2240  -0.2576  -0.1355  0.001  1.40  ******    800.  0.118E-02  0.118E-02  0.476E-06  0.636E-16   18  16  41   20  25   4   10   9  60    0.000    0.000       0
+  0    120 00:02:00.00   1.0000   -0.2301  -0.2519  -0.1378  0.001  0.88  ******    200.  0.118E-02  0.118E-02  0.509E-06  0.674E-16   18  16  41   20  25   4   10   9  60    0.000    0.000       0
+  0    150 00:02:30.00   1.0000    0.2290D -0.2436D -0.1392  0.002  0.88  ******    200.  0.235E-02  0.235E-02  0.110E-02  0.157E-12   22  31  58   20  25   4   10   9  60    0.000    0.000       0
+  0    180 00:03:00.00   1.0000    0.3529   0.3402  -0.2079  0.003  1.40  ******    800.  0.234E-02  0.234E-02  0.102E-05  0.136E-15    4  29  32   19  65   6   18  30   8    0.000    0.000       0
+  0    240 00:04:00.00   1.0000    0.3605  -0.3528  -0.2453  0.005  1.40  ******    800.  0.234E-02  0.234E-02  0.116E-05  0.155E-15    4  29  32   12  29  66    2  10  55    0.000    0.000       0
+  0    300 00:05:00.00   1.0000    0.3474D  0.3584D -0.4551  0.010  0.98  ******    275.  0.375E-02  0.374E-02  0.110E-02  0.157E-12    7  24  65   18  33  10    1  10  55    0.000    0.000       0
+  0    360 00:06:00.00   1.0000    0.5757   0.5284  -0.9722  0.023  1.01  -6.484    300.  0.505E-02  0.504E-02  0.297E-05  0.399E-15    1   6  59    1  63  53    1  56  65    0.000    0.000       0
+  0    420 00:07:00.00   1.0000    1.1397   1.1387   1.8972  0.049  1.40  -3.307    800.  0.118E-01  0.118E-01  0.585E-05  0.791E-15    1   6  59    1  63  52    4  37  74    0.000    0.000       0
+  0    480 00:08:00.00   1.0000    1.5571   1.5384   3.3871  0.082  1.21  -1.815    525.  0.341E-01  0.341E-01  0.126E-04  0.170E-14    1  54  48    1  64  53    7  37  74    0.000    0.000       0
+  0    540 00:09:00.00   1.0000    1.7087   1.6536   5.0314  0.095  1.21  -1.727    525.  0.733E-01  0.733E-01  0.217E-04  0.294E-14    1  44  14    1  58   2   13  37  74    0.000    0.000       0
+  0    600 00:10:00.00   1.0000   -1.9168   1.7834   6.0199  0.099  1.40  -1.484    800.  0.112E+00  0.112E+00  0.290E-04  0.396E-14   11  72  19    6  45  35   12  15   8    0.000    0.000       0
+  0    660 00:11:00.00   1.0000    2.3949  -2.3374   6.6013  0.107  1.40  -1.420    800.  0.142E+00  0.142E+00  0.326E-04  0.446E-14   19  73  74   12   0  35   21  72  74    0.000    0.000       0
+  0    720 00:12:00.00   1.0000   -2.2572  -2.0812   5.3353  0.119  1.40  -1.214    800.  0.172E+00  0.172E+00  0.358E-04  0.491E-14    1  73  33   15  15  77   25  79  34    0.000    0.000       0
+  0    780 00:13:00.00   1.0000   -2.4063   2.2676   5.1103  0.129  1.40  -1.092    800.  0.210E+00  0.210E+00  0.400E-04  0.552E-14    1  73  32    1  72  17   28  27  28    0.000    0.000       0
+  0    840 00:14:00.00   1.0000    2.2465   2.2422   5.8094  0.137  1.41  -1.023    825.  0.257E+00  0.257E+00  0.453E-04  0.632E-14    1  65  22    1  71  16   36  31  57    0.000    0.000       0
+  0    900 00:15:00.00   1.0000    2.3838   2.5354   6.0064  0.145  1.44  -0.937    875.  0.307E+00  0.307E+00  0.523E-04  0.730E-14    1  73  42    1  37  20   38  31  57    0.000    0.000       0
+  0    960 00:16:00.00   1.0000    2.6249   2.5515   5.4146  0.155  1.42  -0.853    850.  0.354E+00  0.354E+00  0.603E-04  0.845E-14    1  55  53    1  59  49   33  59  29    0.000    0.000       0
+  0   1020 00:17:00.00   1.0000    2.7415   2.7975   5.8224  0.161  1.41  -0.828    825.  0.398E+00  0.397E+00  0.679E-04  0.952E-14    1  66  38    1   0  76   36  58  29    0.000    0.000       0
+  0   1080 00:18:00.00   1.0000   -3.3438   3.0347   5.6596  0.169  1.40  -0.782    800.  0.432E+00  0.431E+00  0.738E-04  0.104E-13    1  67  64    1  57   4   29  78  58    0.000    0.000       0
+  0   1140 00:19:00.00   1.0000    3.2637   3.9619   5.2718  0.177  1.38  -0.764    775.  0.450E+00  0.450E+00  0.772E-04  0.111E-13    1  65  24    1  73  19   34  77  57    0.000    0.000       0
+  0   1200 00:20:00.00   1.0000   -3.5030   3.6457   5.7844  0.181  1.41  -0.730    825.  0.454E+00  0.454E+00  0.773E-04  0.111E-13    1  64   7    1  60  50   31  62  22    0.000    0.000       0
+  0   1260 00:21:00.00   1.0000    3.1582   3.6093   5.1446  0.182  1.25  -0.735    575.  0.449E+00  0.449E+00  0.744E-04  0.107E-13    1  78  56    1   1  15   28  62  73    0.000    0.000       0
+  0   1320 00:22:00.00   1.0000    3.0197   3.6410   5.6251  0.178  1.41  -0.751    825.  0.443E+00  0.442E+00  0.711E-04  0.102E-13    1  32  41    1   2  15   36  62  73    0.000    0.000       0
+  0   1380 00:23:00.00   1.0000   -3.0904  -3.1893   5.0637  0.174  1.41  -0.790    825.  0.437E+00  0.436E+00  0.687E-04  0.991E-14    1  47  40    1  29  77   18  22  39    0.000    0.000       0
+  0   1440 00:24:00.00   1.0000    3.9473  -3.2565   5.1777  0.173  1.42  -0.809    850.  0.435E+00  0.434E+00  0.666E-04  0.957E-14    1  44  58    1  31   2   21  11  61    0.000    0.000       0
+  0   1500 00:25:00.00   1.0000    3.5177  -3.3937   4.9877  0.175  1.42  -0.799    850.  0.433E+00  0.432E+00  0.640E-04  0.921E-14    1  45  61    1  37  49   32  12  63    0.000    0.000       0
+  0   1560 00:26:00.00   1.0000    3.4481  -3.2455   5.1211  0.179  1.25  -0.773    575.  0.432E+00  0.431E+00  0.616E-04  0.884E-14    2  46  64    1  34  44   25  12  22    0.000    0.000       0
+  0   1620 00:27:00.00   1.0000    3.4092  -3.6070   4.7027  0.183  1.23  -0.735    550.  0.434E+00  0.433E+00  0.601E-04  0.866E-14    2  16  65    3  18  79   32  13  23    0.000    0.000       0
+  0   1680 00:28:00.00   1.0000    3.5894   3.3338   4.8446  0.183  1.25  -0.735    575.  0.441E+00  0.439E+00  0.587E-04  0.844E-14   23  42  41   21  21  16   21  15  24    0.000    0.000       0
+  0   1740 00:29:00.00   1.0000    3.1829   3.4750   4.8814  0.181  1.44  -0.746    875.  0.450E+00  0.449E+00  0.579E-04  0.832E-14   11  37  28    4   9  16   18  15   1    0.000    0.000       0
+  0   1800 00:30:00.00   1.0000    2.8061  -3.2177   5.1474  0.177  1.47  -0.767    925.  0.459E+00  0.457E+00  0.580E-04  0.834E-14    2  40  21    2  31  55   20  12  10    0.000    0.000       0
+  0   1860 00:31:00.00   1.0000   -3.0119  -3.8301   5.5566  0.174  1.45  -0.814    900.  0.466E+00  0.464E+00  0.581E-04  0.837E-14   13  39  19   20  37  27   23  12   4    0.000    0.000       0
+  0   1920 00:32:00.00   1.0000    3.1950   3.5789   5.4843  0.173  1.44  -0.805    875.  0.473E+00  0.472E+00  0.574E-04  0.830E-14   14  10   7    1  10   1   27  63  73    0.000    0.000       0
+  0   1980 00:33:00.00   1.0000   -3.3607  -3.2152   5.5735  0.174  1.27  -0.774    600.  0.479E+00  0.478E+00  0.569E-04  0.822E-14   36  10  76   13   9   4   35   9   7    0.000    0.000       0
+  0   2040 00:34:00.00   1.0000   -3.5067  -3.0872   5.7525  0.172  1.25  -0.786    575.  0.482E+00  0.481E+00  0.571E-04  0.827E-14   42  14  73    2  29  57   43   7   5    0.000    0.000       0
+  0   2100 00:35:00.00   1.0000    3.1931  -3.0682   5.0939  0.172  1.25  -0.797    575.  0.481E+00  0.479E+00  0.569E-04  0.824E-14   28  12   6    9  11  78   19  21  23    0.000    0.000       0
+  0   2160 00:36:00.00   1.0000   -3.4000  -3.1831   5.1508  0.171  1.27  -0.773    600.  0.477E+00  0.475E+00  0.569E-04  0.824E-14   12  27  20   40   3   2   21  13   3    0.000    0.000       0
+  0   2220 00:37:00.00   1.0000   -3.1487  -2.9620   5.6034  0.170  1.27  -0.764    600.  0.475E+00  0.474E+00  0.569E-04  0.819E-14   14  27  19   20   8   2   26  11  72    0.000    0.000       0
+  0   2280 00:38:00.00   1.0000   -3.1712   3.1696   5.4843  0.168  1.42  -0.788    850.  0.475E+00  0.473E+00  0.575E-04  0.830E-14   17  27  15    7  12  23   29  12  71    0.000    0.000       0
+  0   2340 00:39:00.00   1.0000   -3.0340  -3.0142   4.9761  0.167  1.23  -0.830    550.  0.475E+00  0.472E+00  0.586E-04  0.848E-14   25  16  19    1  17  54   21  72  62    0.000    0.000       0
+  0   2400 00:40:00.00   1.0000   -3.3827  -3.2786   5.1241  0.167  1.23  -0.794    550.  0.470E+00  0.467E+00  0.593E-04  0.858E-14   10  11  70    1  12  71   28  75  63    0.000    0.000       0
+  0   2460 00:41:00.00   1.0000    3.0172  -3.5143   4.7319  0.166  1.23  -0.797    550.  0.461E+00  0.458E+00  0.589E-04  0.848E-14   24   3   6    5   8  70   22  76  63    0.000    0.000       0
+  0   2520 00:42:00.00   1.0000    3.1569  -3.5546   4.7675  0.163  1.27  -0.863    600.  0.452E+00  0.449E+00  0.581E-04  0.835E-14    1  78  58    9   5  71   18  25  34    0.000    0.000       0
+  0   2580 00:43:00.00   1.0000    3.5609   3.1651   5.3844  0.161  1.25  -0.855    575.  0.447E+00  0.443E+00  0.571E-04  0.813E-14   28  24  39   27  76  59   25  19  32    0.000    0.000       0
+  0   2640 00:44:00.00   1.0000    3.2633   3.4899   4.9447  0.159  1.23  -0.862    550.  0.442E+00  0.438E+00  0.562E-04  0.801E-14   15   4   3    1   6  76   17  70  71    0.000    0.000       0
+  0   2700 00:45:00.00   1.0000    3.5025   3.0665   5.0349  0.158  1.25  -0.845    575.  0.441E+00  0.437E+00  0.560E-04  0.797E-14   24   1  12    1   8  76   27  24  22    0.000    0.000       0
+  0   2760 00:46:00.00   1.0000    3.3412   3.1941   5.4012  0.156  1.25  -0.883    575.  0.442E+00  0.437E+00  0.562E-04  0.797E-14   25   4  13    1   9  75   27   5   1    0.000    0.000       0
+  0   2820 00:47:00.00   1.0000    3.6518  -3.2207   4.7868  0.153  1.27  -0.929    600.  0.441E+00  0.437E+00  0.565E-04  0.801E-14   34  77  18   39  74  10   41   2  77    0.000    0.000       0
+  0   2880 00:48:00.00   1.0000    3.5356  -3.2466   4.8539  0.151  1.25  -0.896    575.  0.440E+00  0.436E+00  0.573E-04  0.815E-14   34   2  10   40  72  11   41  17  28    0.000    0.000       0
+  0   2940 00:49:00.00   1.0000    2.9812   3.2028   4.6617  0.151  1.27  -0.900    600.  0.441E+00  0.437E+00  0.575E-04  0.820E-14    7  61  73   36  11   6   14  59  42    0.000    0.000       0
+  0   3000 00:50:00.00   1.0000   -3.0488   3.0101   4.6541  0.151  1.27  -0.934    600.  0.443E+00  0.439E+00  0.581E-04  0.831E-14    9   8  68   27  67  22   24  28  25    0.000    0.000       0
+  0   3060 00:51:00.00   1.0000   -3.0053   2.8546   5.1987  0.150  1.25  -0.908    575.  0.446E+00  0.443E+00  0.585E-04  0.838E-14   29  31  24   14   4  77   23  56  33    0.000    0.000       0
+  0   3120 00:52:00.00   1.0000   -3.1978  -3.0642   5.4683  0.151  1.27  -0.904    600.  0.450E+00  0.448E+00  0.588E-04  0.839E-14    1  25  28   14  21   1   30  57  33    0.000    0.000       0
+  0   3180 00:53:00.00   1.0000   -3.4193   3.1570   4.9351  0.153  1.27  -0.894    600.  0.456E+00  0.454E+00  0.592E-04  0.844E-14    1  25  25   12  31  25   22  27  29    0.000    0.000       0
+  0   3240 00:54:00.00   1.0000   -3.3668   3.3279   4.9955  0.153  1.27  -0.923    600.  0.462E+00  0.460E+00  0.599E-04  0.854E-14   41   3  41   11  30  20   21  51  36    0.000    0.000       0
+  0   3300 00:55:00.00   1.0000    3.0786   3.3598   5.5937  0.154  1.27  -0.887    600.  0.468E+00  0.467E+00  0.605E-04  0.863E-14   13  50  41   23   4  79   39   8  76    0.000    0.000       0
+  0   3360 00:56:00.00   1.0000    3.6680   3.0921   5.6787  0.156  1.23  -0.854    550.  0.471E+00  0.470E+00  0.612E-04  0.873E-14   21  50  39   17  34  20   44   9  77    0.000    0.000       0
+  0   3420 00:57:00.00   1.0000    3.6849   3.7958   5.1860  0.156  1.25  -0.850    575.  0.469E+00  0.468E+00  0.617E-04  0.882E-14   26  49  43   18  37  19   29  52  39    0.000    0.000       0
+  0   3480 00:58:00.00   1.0000    3.4735  -3.6108   5.1212  0.155  1.25  -0.853    575.  0.464E+00  0.463E+00  0.621E-04  0.890E-14   26  49  46   43  77  72   38   7  78    0.000    0.000       0
+  0   3540 00:59:00.00   1.0000    3.3799   3.2356   5.1232  0.155  1.25  -0.879    575.  0.455E+00  0.454E+00  0.628E-04  0.902E-14   44  13   7   17  40  16   21  56  33    0.000    0.000       0
+  0   3600 01:00:00.00   1.0000   -3.6939  -3.2549   5.2678  0.154  1.25  -0.911    575.  0.444E+00  0.443E+00  0.629E-04  0.902E-14   41  13  50    1   4  72   29  56  34    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain.txt
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain.txt	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain.txt	(revision 3477)
@@ -0,0 +1,35 @@
+example_mountain
+
+1. Purpose
+   This example shows the flow around a single 3d idealized 
+   mountain. The mountain shape is Gaussian. The inversion height lies
+   below the mountain top so that a part of the topography resides in
+   stable stratification. 
+   
+2. PALM-Version / SVN Revision
+   PALM 3.6 / SVN Revision 244
+
+3. Required user code
+   No user code is required.
+
+4. Input: example_mountain_p3d
+   Cyclic lateral boundary conditions are used. The 3d-model is initialized with
+   the solution of the 1d-model. Rayleigh damping is switched on.
+
+5. Preprocessing
+   The topography file has to be prepared according to the topography conventions
+   used in PALM. The topography file is created with aid of a 2d Gauss function.
+   
+6. Program start - mrun call
+   mrun -d example_mountain -h lcsgih -K parallel -X8 -T2 -t900 -q testq
+   -r "d3# pr# ts# xy# xz# yz#"
+
+7. Monitoring: example_mountain_rc
+
+8. Postprocessing
+   No postprocessing of the data is required.
+
+9. List of attachments
+   example_mountain _p3d
+   example_mountain_rc
+   example_mountain_topo
Index: /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_p3d	(revision 3477)
@@ -0,0 +1,57 @@
+ &inipar nx = 159, ny = 79, nz = 40,
+         dx = 50.0, dy = 50.0, dz = 50.0,
+         dz_stretch_level = 1500.0,
+
+         fft_method = 'temperton-algorithm',
+
+         momentum_advec = 'pw-scheme',         ! topography does not work with
+         scalar_advec   = 'pw-scheme',         ! Wicker-Skamarock advection so far
+
+         initializing_actions = 'set_1d-model_profiles',
+         dt_run_control_1d = 43200.0, dt_pr_1d = 43200.0,    
+ 
+         ug_surface = 5.5, vg_surface = -2.0,
+
+         pt_vertical_gradient       = 0.0, 5.0,   0.5,
+         pt_vertical_gradient_level = 0.0, 600.0, 700.0,  !Inversion below the mountain top
+
+         rayleigh_damping_factor = 0.01,
+
+         topography = 'read_from_file',                   !Gaussian shaped mountain
+                                                               !height: 1km, base diameter: 2km
+         wall_heatflux(0) = 0.05,
+          
+	 surface_heatflux = 0.05, bc_pt_b = 'neumann', /
+
+ &d3par  end_time = 7200.0,
+
+         create_disturbances = .T.,
+         dt_disturb = 150.0, disturbance_energy_limit = 0.01,
+
+         dt_run_control = 0.0,
+         dt_dots = 0.0,
+         
+         dt_data_output = 1800.0,
+         dt_data_output_av = 1800.0,
+         averaging_interval = 900.0,
+         dt_averaging_input = 10.0,
+
+         section_xy =  4, 8, 14, 20,
+         section_xz = -1, 40, 
+         section_yz = 60,
+
+         data_output = 'u_xy','u_xz', 'u_yz', 'u_xy_av',
+                       'v_xy','v_xz', 'v_yz', 'v_xy_av',
+                       'w_xy','w_xz', 'w_yz', 'w_xy_av',
+                       'pt_xy','pt_xz', 'pt_yz', 'pt_xy_av',
+                           
+
+         dt_dopr = 1800.0,
+         averaging_interval_pr = 600.0,
+         dt_averaging_input_pr = 10.0,
+         data_output_pr = '#pt','#u', '#v', 'w',
+                          'wpt', 'w*pt*', 'w"pt"',
+                          'wu', 'w*u*', 'w"u"',
+                          'u*2', 'v*2', 'w*2',
+
+         data_output_2d_on_each_pe = .F., /
Index: /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_rc	(revision 3477)
@@ -0,0 +1,1607 @@
+
+
+
+1D-Zeitschrittkontrollausgaben:
+------------------------------
+
+ITER.  HH:MM:SS    DT      UMAX   VMAX    U*   ALPHA   ENERG.
+-------------------------------------------------------------
+    0  00:00:00  300.00    5.50   2.00  0.100   45.0    16.71
+  428  12:00:09   95.60    6.28   2.30  0.229    5.7    16.94
+  873  24:01:11   96.40    6.19   2.10  0.227    6.8    16.82
+ 1318  36:00:40   96.90    6.11   2.06  0.226    6.9    16.68
+ 1764  48:01:18   97.20    6.08   2.12  0.225    6.7    16.63
+ 2209  60:00:19   97.10    6.09   2.17  0.225    6.6    16.67
+ 2655  72:01:12   97.00    6.11   2.18  0.226    6.6    16.72
+ 3100  84:00:38   96.90    6.12   2.15  0.226    6.6    16.73
+ 3545  96:00:03   96.90    6.11   2.13  0.226    6.7    16.71
+ 3991  108:00:52  97.00    6.10   2.13  0.226    6.7    16.69
+ 4436  120:00:10  97.00    6.10   2.15  0.225    6.7    16.69
+ 4882  132:01:12  97.00    6.10   2.15  0.226    6.6    16.70
+ 5327  144:00:37  97.00    6.11   2.15  0.226    6.6    16.71
+ 5772  156:00:02  97.00    6.11   2.15  0.226    6.6    16.71
+ 6218  168:01:04  97.00    6.11   2.14  0.226    6.7    16.70
+ 6663  180:00:29  97.00    6.10   2.14  0.226    6.7    16.70
+ 7109  192:01:31  97.00    6.11   2.15  0.226    6.6    16.70
+ 7554  204:00:56  97.00    6.11   2.15  0.226    6.6    16.70
+ 7999  216:00:21  97.00    6.11   2.15  0.226    6.6    16.70
+ 8445  228:01:23  97.00    6.11   2.15  0.226    6.6    16.70
+ 8890  240:00:48  97.00    6.11   2.15  0.226    6.6    16.70
+
+ ***************************         ------------------------------------------
+ * PALM 3.6  Rev: 244      *         atmosphere - 3D - run with 1D - prerun
+ ***************************         ------------------------------------------
+
+ Date:              26-02-09         Run:       example_mountain    
+ Time:              11:02:08         Run-No.:   00
+ Run on host:         lcsgih
+ Number of PEs:            8         Processor grid (x,y): (  4,  2) predefined
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> Rayleigh-Damping active, starts above z =  1466.22 m
+     maximum damping coefficient: 0.010 1/s
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:          variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:           0.000 s
+ End time:          7200.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =     50.000 m    dy =     50.000 m    dz =     50.000 m
+ Domain size:       x =   8000.000 m     y =   4000.000 m  z(u) =   2307.274 m
+
+ dz constant up to   1500.000 m (k=  31), then stretched by factor: 1.080
+ maximum dz not to be exceeded is dz_max = ********** m
+
+ Number of gridpoints (x,y,z):  (0: 159, 0:  79, 0:  41)
+ Subdomain size (x,y,z):        (    40,     40,     42)
+
+ Subdomains have equal size
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: read_from_file                          
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt(1)              
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.050000 K m/s
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =  25.00 m   z0 = 0.1000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    1D-Profiles:
+       Output format: netcdf                                  
+
+
+       Profile: pt, u, v, w, wpt, w*pt*, w"pt", wu, w*u*, w"u", u*2,         
+
+              : v*2, w*2,                                                    
+       Output every              1800.00 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    2D-Arrays:
+       Output format: netcdf                                  
+
+
+       XY-cross-section  Arrays:  u, v, w, pt,                                                         
+       Output every              1800.00 s  
+       Cross sections at k = /4/8/14/20/
+       scalar-coordinates:   /175.0/375.0/675.0/975.0/ m
+
+
+       XZ-cross-section  Arrays:  u, v, w, pt,                                                         
+       Output every              1800.00 s  
+       Cross sections at j = /-1/40/
+       scalar-coordinates:   /-50.0/2000.0/ m
+
+
+       YZ-cross-section  Arrays:  u, v, w, pt,                                                         
+       Output every              1800.00 s  
+       Cross sections at i = /60/
+       scalar-coordinates:   /3000.0/ m
+
+
+    2D-Arrays(time-averaged):
+       Output format: netcdf                                  
+
+
+       XY-cross-section  Arrays:  u, v, w, pt,                                                         
+       Output every              1800.00 s  
+       Time averaged over         900.00 s
+       Averaging input every       10.00 s
+       Cross sections at k = /4/8/14/20/
+       scalar-coordinates:   /175.0/375.0/675.0/975.0/ m
+
+
+    Time series:
+       Output format: netcdf                                  
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.729E-04 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000119 1/s
+                            f*    =  0.000084 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            5.50    5.50  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:           -2.00   -2.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   600.0   700.0  m
+       Temperature:   300.00  300.00  300.00  305.00  K
+       Gradient:      ------    0.00    5.00    0.50  K/100m
+       Gridpoint:          0       0      12      14
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+   Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+
+
+ 1D-Model parameters:
+ -------------------
+
+    Simulation time:                   864000.0 s
+    Run-controll output every:          43200.0 s
+    Vertical profile output every:      43200.0 s
+    Mixing length calculation:         as_in_3d_model      
+    Dissipation calculation:           as_in_3d_model      
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*   THETA*    Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   5.4600A   8.2383D -4.2681D  2.5877  0.226  0.99   0.000    600.  0.161E+02  0.931E-01  0.000E+00  0.000E+00    7  27  58    9  33  51   18  41  55    0.000    0.000       0
+  0      1 00:00:05.46   5.4600A   8.2383  -4.2681   2.5877  0.276  1.02  -0.192    650.  0.161E+02  0.153E+00  0.495E-04  0.119E-04    7  27  58    9  33  51   18  41  55    0.000    0.000       0
+  0      2 00:00:09.65   4.1900A  10.7301  -6.7118   5.7824  0.274  1.02  -0.190    650.  0.161E+02  0.160E+00  0.340E-04  0.534E-05   13  48  64   13  35  53   19  42  57    0.000    0.000       0
+  0      3 00:00:13.67   4.0200A  11.2036  -7.2455   6.6771  0.273  1.02  -0.190    650.  0.161E+02  0.162E+00  0.312E-04  0.507E-05   16  46  64   14  36  53   19  42  57    0.000    0.000       0
+  0      4 00:00:17.61   3.9400A  11.4177  -7.3998   7.0081  0.272  1.02  -0.191    650.  0.161E+02  0.164E+00  0.294E-04  0.502E-05   13  48  65   14  36  53   19  42  57    0.000    0.000       0
+  0      5 00:00:21.48   3.8700A  11.6235  -7.3408   7.0810  0.271  0.87  -0.192    400.  0.161E+02  0.166E+00  0.280E-04  0.490E-05   13  48  65   16  37  54   19  42  57    0.000    0.000       0
+  0      6 00:00:25.39   3.9100A  11.5056  -7.5038   7.0187  0.270  0.87  -0.193    400.  0.161E+02  0.167E+00  0.273E-04  0.482E-05   14  48  64   12  36  51   19  42  57    0.000    0.000       0
+  0      7 00:00:29.28   3.8900A  11.5542  -7.6685   6.9109  0.269  0.87  -0.193    400.  0.161E+02  0.168E+00  0.266E-04  0.465E-05    8  52  66   12  36  51   19  42  57    0.000    0.000       0
+  0      8 00:00:33.17   3.8900A  11.5632  -7.5789   6.8311  0.268  0.87  -0.194    400.  0.160E+02  0.170E+00  0.262E-04  0.451E-05   14  48  65   12  36  51   19  42  57    0.000    0.000       0
+  0      9 00:00:37.13   3.9600A  11.3571  -7.3118   6.7932  0.267  0.83  -0.195    350.  0.160E+02  0.171E+00  0.265E-04  0.446E-05   14  48  65   12  36  51   19  42  57    0.000    0.000       0
+  0     10 00:00:41.19   4.0600A  11.0738  -7.0770   6.7770  0.267  0.83  -0.196    350.  0.160E+02  0.172E+00  0.272E-04  0.446E-05    7  53  67   15  35  54   19  42  57    0.000    0.000       0
+  0     11 00:00:45.29   4.1000A  10.9725  -7.1932   6.7539  0.266  0.83  -0.197    350.  0.160E+02  0.174E+00  0.278E-04  0.443E-05   12  49  66   12  34  52   19  42  57    0.000    0.000       0
+  0     12 00:00:49.29   4.0000A  11.2463  -7.3190   6.7004  0.266  0.83  -0.198    350.  0.160E+02  0.175E+00  0.277E-04  0.427E-05   12  49  66   12  34  52   19  42  57    0.000    0.000       0
+  0     13 00:00:53.24   3.9500A  11.3949  -7.3227   6.6124  0.265  0.83  -0.201    350.  0.160E+02  0.177E+00  0.281E-04  0.417E-05   13  48  66   12  34  52   19  42  57    0.000    0.000       0
+  0     14 00:00:57.21   3.9700A  11.3318  -7.2366   6.4910  0.265  0.83  -0.201    350.  0.160E+02  0.178E+00  0.290E-04  0.415E-05   13  48  66   12  34  52   19  42  57    0.000    0.000       0
+  0     15 00:01:01.28   4.0700A  11.0489  -7.2055   6.3515  0.264  0.83  -0.202    350.  0.160E+02  0.180E+00  0.306E-04  0.421E-05   13  48  67   13  36  52   19  42  57    0.000    0.000       0
+  0     16 00:01:05.34   4.0600A  11.0893  -7.4585   6.2111  0.264  0.83  -0.204    350.  0.160E+02  0.182E+00  0.314E-04  0.418E-05   13  48  67   13  35  52   19  42  57    0.000    0.000       0
+  0     17 00:01:09.45   4.1100A  10.9463  -7.7734   6.0937  0.263  0.83  -0.206    350.  0.160E+02  0.184E+00  0.325E-04  0.418E-05   13  48  67   13  35  52   19  42  57    0.000    0.000       0
+  0     18 00:01:13.60   4.1500A  10.8426  -7.9128   5.9917  0.263  0.79  -0.206    300.  0.160E+02  0.187E+00  0.337E-04  0.418E-05   13  48  67   13  35  52   19  42  57    0.000    0.000       0
+  0     19 00:01:17.73   4.1300A  10.9083  -7.8237   5.8979  0.262  0.79  -0.208    300.  0.160E+02  0.189E+00  0.344E-04  0.414E-05   13  48  67   13  35  52   19  42  57    0.000    0.000       0
+  0     20 00:01:21.79   4.0600A  11.0901  -7.7531   5.8038  0.262  0.79  -0.210    300.  0.160E+02  0.192E+00  0.347E-04  0.406E-05   13  48  67   13  34  53   19  42  57    0.000    0.000       0
+  0     21 00:01:25.80   4.0100A  11.2288  -7.9394   5.7015  0.262  0.79  -0.212    300.  0.160E+02  0.195E+00  0.351E-04  0.398E-05   13  48  67   13  34  53   19  42  57    0.000    0.000       0
+  0     22 00:01:29.81   4.0100A  11.2137  -7.9933   5.5849  0.261  0.79  -0.214    300.  0.160E+02  0.198E+00  0.358E-04  0.395E-05   13  48  67   13  34  53   19  42  57    0.000    0.000       0
+  0     23 00:01:33.89   4.0800A  11.0345  -7.9172   5.4530  0.261  0.79  -0.215    300.  0.160E+02  0.202E+00  0.371E-04  0.398E-05   13  48  67   13  34  53   19  42  57    0.000    0.000       0
+  0     24 00:01:38.08   4.1900A  10.7504  -7.7735   5.3080  0.261  0.79  -0.216    300.  0.160E+02  0.205E+00  0.388E-04  0.406E-05   13  48  67   13  34  53   19  42  57    0.000    0.000       0
+  0     25 00:01:42.24   4.1600A  10.8250  -7.8427   5.1583  0.260  0.79  -0.217    300.  0.160E+02  0.209E+00  0.393E-04  0.402E-05   13  48  68   14  35  53   19  42  57    0.000    0.000       0
+  0     26 00:01:46.40   4.1600A  10.8063  -8.0145   5.0277  0.260  0.79  -0.217    300.  0.160E+02  0.214E+00  0.400E-04  0.400E-05   13  48  68   14  35  53   19  42  57    0.000    0.000       0
+  0     27 00:01:50.61   4.2100A  10.6814  -8.1710   4.9181  0.260  0.79  -0.219    300.  0.160E+02  0.218E+00  0.412E-04  0.402E-05   13  48  68   14  35  53   19  42  57    0.000    0.000       0
+  0     28 00:01:54.92   4.3100A  10.4394  -8.2890  -4.8328  0.259  0.79  -0.220    300.  0.160E+02  0.223E+00  0.429E-04  0.410E-05   13  48  68   14  35  53   11  46  70    0.000    0.000       0
+  0     29 00:01:59.30   4.3800A  10.2639  -8.3580  -4.7990  0.259  0.79  -0.219    300.  0.160E+02  0.228E+00  0.443E-04  0.415E-05   12  48  69   14  35  53   11  46  71    0.000    0.000       0
+  0     30 00:02:03.73   4.4300A  10.1555  -8.3818  -5.0457  0.259  0.79  -0.219    300.  0.160E+02  0.233E+00  0.456E-04  0.420E-05   12  49  68   14  35  53   13  47  68    0.000    0.000       0
+  0     31 00:02:08.21   4.4800A  10.0377  -8.3705  -5.2257  0.259  0.79  -0.219    300.  0.160E+02  0.239E+00  0.469E-04  0.424E-05   12  49  68   14  35  53   13  47  68    0.000    0.000       0
+  0     32 00:02:12.74   4.5300A   9.9253  -8.3309  -5.3347  0.258  0.79  -0.219    300.  0.160E+02  0.244E+00  0.482E-04  0.428E-05   12  48  69   14  35  53   13  47  68    0.000    0.000       0
+  0     33 00:02:17.29   4.5500A   9.8959  -8.2629  -5.4035  0.258  0.79  -0.219    300.  0.159E+02  0.250E+00  0.493E-04  0.430E-05    8  51  71   14  35  53   13  47  68    0.000    0.000       0
+  0     34 00:02:21.79   4.5000A  10.0082  -8.1639  -5.4216  0.258  0.79  -0.220    300.  0.159E+02  0.256E+00  0.495E-04  0.426E-05    8  51  71   14  35  53   13  47  68    0.000    0.000       0
+  0     35 00:02:26.30   4.5100A   9.9753  -8.0346  -5.4460  0.258  0.79  -0.220    300.  0.159E+02  0.262E+00  0.503E-04  0.426E-05    8  51  71   14  35  53   13  47  69    0.000    0.000       0
+  0     36 00:02:30.83   4.5300A   9.9353  -7.8865  -5.5942  0.257  0.79  -0.220    300.  0.159E+02  0.268E+00  0.512E-04  0.428E-05    8  52  68   14  35  53   13  47  69    0.000    0.000       0
+  0     37 00:02:35.32   4.4900A  10.0193  -7.7521  -5.7431  0.257  0.79  -0.222    300.  0.159E+02  0.275E+00  0.515E-04  0.425E-05    8  52  68   15  35  54   12  47  69    0.000    0.000       0
+  0     38 00:02:39.81   4.4900A  10.0149  -7.7927  -5.7604  0.257  0.79  -0.223    300.  0.159E+02  0.281E+00  0.521E-04  0.424E-05    8  52  68   15  35  54   12  47  69    0.000    0.000       0
+  0     39 00:02:44.33   4.5200A   9.9545  -7.8311  -5.6233  0.257  0.79  -0.220    300.  0.159E+02  0.287E+00  0.531E-04  0.426E-05    8  52  68   15  35  54   12  47  69    0.000    0.000       0
+  0     40 00:02:48.89   4.5600A   9.8731  -7.8616  -5.5516  0.257  0.79  -0.219    300.  0.159E+02  0.293E+00  0.542E-04  0.430E-05    8  52  68   15  35  54   12  47  70    0.000    0.000       0
+  0     41 00:02:53.49   4.6000A   9.7895  -7.8779  -5.5963  0.256  0.79  -0.218    300.  0.159E+02  0.299E+00  0.553E-04  0.434E-05    8  52  68   15  35  54   12  47  70    0.000    0.000       0
+  0     42 00:02:58.10   4.6100A   9.7545  -7.8765  -5.5822  0.256  0.79  -0.218    300.  0.159E+02  0.305E+00  0.561E-04  0.435E-05    8  52  69   15  35  54   12  47  70    0.000    0.000       0
+  0     43 00:03:02.69   4.5900A   9.8127  -7.8609  -5.5225  0.256  0.79  -0.218    300.  0.159E+02  0.311E+00  0.566E-04  0.433E-05    8  52  69   15  35  54   12  47  70    0.000    0.000       0
+  0     44 00:03:07.27   4.5800A   9.8350  -7.8414  -5.4467  0.256  0.79  -0.218    300.  0.159E+02  0.317E+00  0.572E-04  0.432E-05    8  52  69   15  35  54   11  47  71    0.000    0.000       0
+  0     45 00:03:11.84   4.5700A   9.8367  -7.8286  -5.4881  0.256  0.79  -0.221    300.  0.159E+02  0.323E+00  0.578E-04  0.431E-05    8  52  69   15  35  54   11  47  71    0.000    0.000       0
+  0     46 00:03:16.42   4.5800A   9.8234  -7.8265  -5.6950  0.256  0.79  -0.219    300.  0.159E+02  0.328E+00  0.587E-04  0.431E-05    8  52  69   15  35  54   13  46  67    0.000    0.000       0
+  0     47 00:03:21.02   4.6000A   9.7865  -7.8273  -5.7788  0.256  0.79  -0.217    300.  0.159E+02  0.334E+00  0.598E-04  0.434E-05    8  52  69   15  35  54   13  46  67    0.000    0.000       0
+  0     48 00:03:25.65   4.6300A   9.7210  -7.8147  -5.9099  0.256  0.79  -0.217    300.  0.159E+02  0.340E+00  0.610E-04  0.438E-05    8  52  69   15  35  54   11  47  68    0.000    0.000       0
+  0     49 00:03:30.32   4.6700A   9.6441  -7.7723  -6.3337  0.255  0.79  -0.220    300.  0.159E+02  0.345E+00  0.624E-04  0.442E-05    8  52  69   15  35  54   12  46  68    0.000    0.000       0
+  0     50 00:03:34.97   4.6500A   9.6844  -7.6939  -7.0274  0.255  0.79  -0.218    300.  0.159E+02  0.351E+00  0.630E-04  0.441E-05    8  52  68   15  35  54   12  46  68    0.000    0.000       0
+  0     51 00:03:39.59   4.6200A   9.7462  -7.6223  -7.3551  0.255  0.74  -0.217    250.  0.159E+02  0.357E+00  0.635E-04  0.439E-05    8  52  68   17  37  55   12  46  68    0.000    0.000       0
+  0     52 00:03:44.19   4.6000A   9.7743  -7.5896  -7.2834  0.255  0.74  -0.218    250.  0.159E+02  0.362E+00  0.641E-04  0.436E-05    8  52  68   17  37  55   12  46  68    0.000    0.000       0
+  0     53 00:03:48.80   4.6100A   9.7594  -7.5498  -7.1837  0.255  0.74  -0.221    250.  0.159E+02  0.368E+00  0.651E-04  0.437E-05    8  52  68   17  37  55   11  46  68    0.000    0.000       0
+  0     54 00:03:53.43   4.6300A   9.7128  -7.5113  -7.1430  0.255  0.74  -0.219    250.  0.159E+02  0.373E+00  0.662E-04  0.438E-05    8  52  68   17  37  55   11  46  68    0.000    0.000       0
+  0     55 00:03:58.09   4.6600A   9.6580  -7.4806  -6.8333  0.255  0.74  -0.220    250.  0.159E+02  0.379E+00  0.676E-04  0.440E-05    8  52  68   17  37  55   11  46  68    0.000    0.000       0
+  0     56 00:04:02.77   4.6800A   9.6168  -7.4571  -6.9483  0.255  0.74  -0.219    250.  0.159E+02  0.384E+00  0.688E-04  0.443E-05    8  52  68   17  37  55   11  46  69    0.000    0.000       0
+  0     57 00:04:07.46   4.6900A   9.5993  -7.4366  -7.0837  0.255  0.74  -0.220    250.  0.159E+02  0.390E+00  0.699E-04  0.444E-05    8  52  68   17  37  55   11  46  69    0.000    0.000       0
+  0     58 00:04:12.15   4.6900A   9.6027  -7.4136  -6.9515  0.255  0.79  -0.219    300.  0.159E+02  0.396E+00  0.709E-04  0.444E-05    8  52  68   17  37  55   11  46  69    0.000    0.000       0
+  0     59 00:04:16.83   4.6800A   9.6178  -7.3854  -6.5946  0.255  0.79  -0.221    300.  0.158E+02  0.402E+00  0.716E-04  0.443E-05    8  52  68   17  37  55   11  46  69    0.000    0.000       0
+  0     60 00:04:21.50   4.6700A   9.6350  -7.3811  -6.0933  0.255  0.79  -0.220    300.  0.158E+02  0.407E+00  0.724E-04  0.442E-05    8  52  68   15  35  54   11  46  69    0.000    0.000       0
+  0     61 00:04:26.16   4.6600A   9.6466  -7.4168  -5.8887  0.254  0.79  -0.220    300.  0.158E+02  0.413E+00  0.731E-04  0.441E-05    8  52  68   15  35  54   10  46  69    0.000    0.000       0
+  0     62 00:04:30.82   4.6600A   9.6488  -7.4519  -6.1342  0.254  0.79  -0.221    300.  0.158E+02  0.420E+00  0.739E-04  0.443E-05    8  52  68   15  35  54   11  45  69    0.000    0.000       0
+  0     63 00:04:35.49   4.6700A   9.6428  -7.4768  -6.6214  0.254  0.79  -0.222    300.  0.158E+02  0.426E+00  0.749E-04  0.446E-05    8  52  68   15  35  54   11  45  69    0.000    0.000       0
+  0     64 00:04:40.16   4.6700A   9.6350  -7.4854  -6.5813  0.254  0.79  -0.222    300.  0.158E+02  0.432E+00  0.757E-04  0.447E-05    8  52  68   15  35  54   11  45  69    0.000    0.000       0
+  0     65 00:04:44.83   4.6700A   9.6332  -7.4769  -6.0551  0.254  0.79  -0.222    300.  0.158E+02  0.439E+00  0.766E-04  0.448E-05    8  52  68   15  35  54   11  45  69    0.000    0.000       0
+  0     66 00:04:49.50   4.6700A   9.6390  -7.4547  -5.3026  0.254  0.79  -0.224    300.  0.158E+02  0.445E+00  0.773E-04  0.448E-05    8  52  68   15  35  54   12  47  69    0.000    0.000       0
+  0     67 00:04:54.17   4.6700A   9.6447  -7.4232  -5.0941  0.254  0.79  -0.225    300.  0.158E+02  0.452E+00  0.781E-04  0.447E-05    8  52  68   15  35  54   15  45  55    0.000    0.000       0
+  0     68 00:04:58.84   4.6700A   9.6368  -7.3932  -5.0061  0.254  0.79  -0.224    300.  0.158E+02  0.459E+00  0.789E-04  0.447E-05    8  52  68   17  37  55   16  34  72    0.000    0.000       0
+  0     69 00:05:03.52   4.6800A   9.6063  -7.4308  -5.0660  0.254  0.79  -0.223    300.  0.158E+02  0.466E+00  0.798E-04  0.447E-05    8  52  68   17  37  55   12  45  71    0.000    0.000       0
+  0     70 00:05:08.23   4.7100A   9.5564  -7.4646   5.0768  0.254  0.79  -0.223    300.  0.158E+02  0.473E+00  0.810E-04  0.450E-05    8  52  68   17  37  55    6  41  77    0.000    0.000       0
+  0     71 00:05:12.93   4.7000A   9.5715  -7.4891   5.2136  0.254  0.79  -0.224    300.  0.158E+02  0.480E+00  0.815E-04  0.450E-05    7  53  68   17  37  55    6  41  79    0.000    0.000       0
+  0     72 00:05:17.64   4.7100A   9.5635  -7.5017   5.3005  0.254  0.79  -0.225    300.  0.158E+02  0.488E+00  0.824E-04  0.452E-05    7  53  68   17  37  55    6  41  79    0.000    0.000       0
+  0     73 00:05:22.36   4.7200A   9.5353  -7.4991   5.3380  0.254  0.79  -0.229    300.  0.158E+02  0.495E+00  0.833E-04  0.454E-05    7  51  73   17  37  55    6  41  77    0.000    0.000       0
+  0     74 00:05:27.09   4.7300A   9.5132  -7.4814   5.3556  0.254  0.79  -0.227    300.  0.158E+02  0.503E+00  0.842E-04  0.456E-05    7  52  71   17  37  55    6  41  77    0.000    0.000       0
+  0     75 00:05:31.83   4.7400A   9.4964  -7.4511   5.3132  0.254  0.79  -0.227    300.  0.158E+02  0.511E+00  0.850E-04  0.458E-05    6  52  73   17  37  55    6  41  77    0.000    0.000       0
+  0     76 00:05:36.55   4.7200A   9.5241  -7.4120   5.5295  0.254  0.79  -0.226    300.  0.158E+02  0.519E+00  0.853E-04  0.457E-05    6  52  73   17  37  55    4  41  81    0.000    0.000       0
+  0     77 00:05:41.27   4.7200A   9.5260  -7.3692   5.7546  0.254  0.79  -0.226    300.  0.158E+02  0.527E+00  0.859E-04  0.458E-05    6  52  73   17  37  55    4  41  81    0.000    0.000       0
+  0     78 00:05:45.98   4.7100A   9.5556  -7.3242   5.9410  0.254  0.79  -0.227    300.  0.158E+02  0.535E+00  0.864E-04  0.459E-05    7  53  68   17  37  55    4  41  81    0.000    0.000       0
+  0     79 00:05:50.66   4.6800A   9.6198  -7.2785   6.1554  0.254  0.79  -0.230    300.  0.158E+02  0.543E+00  0.865E-04  0.457E-05    7  53  68   17  37  55    4  41  82    0.000    0.000       0
+  0     80 00:05:55.32   4.6600A   9.6654  -7.2326   6.5553  0.254  0.79  -0.229    300.  0.158E+02  0.552E+00  0.867E-04  0.456E-05    7  53  68   17  37  55    4  41  82    0.000    0.000       0
+  0     81 00:05:59.97   4.6500A   9.6781  -7.2464   6.8727  0.254  0.79  -0.238    300.  0.158E+02  0.560E+00  0.871E-04  0.455E-05    7  53  68    4  40  86    4  41  82    0.000    0.000       0
+  0     82 00:06:04.62   4.6500A   9.6810  -7.2923   7.0545  0.255  0.79  -0.230    300.  0.158E+02  0.568E+00  0.877E-04  0.455E-05    7  53  69    4  40  86    4  41  82    0.000    0.000       0
+  0     83 00:06:09.27   4.6500A   9.6853  -7.3946   7.0565  0.255  0.79  -0.232    300.  0.158E+02  0.576E+00  0.883E-04  0.455E-05    7  53  69   15  35  54    4  41  82    0.000    0.000       0
+  0     84 00:06:13.93   4.6600A   9.6519  -7.5063   7.2039  0.255  0.99  -0.233    600.  0.158E+02  0.585E+00  0.891E-04  0.456E-05    7  53  69   15  35  54    4  42  82    0.000    0.000       0
+  0     85 00:06:18.62   4.6900A   9.5966  -7.6064   7.3837  0.255  0.99  -0.232    600.  0.157E+02  0.593E+00  0.902E-04  0.459E-05    7  53  69   15  35  54    4  42  82    0.000    0.000       0
+  0     86 00:06:23.30   4.6800A   9.6121  -7.6810   7.3050  0.255  0.99  -0.231    600.  0.157E+02  0.602E+00  0.907E-04  0.458E-05    6  24  74   15  35  54    4  42  82    0.000    0.000       0
+  0     87 00:06:27.98   4.6800A   9.6097  -7.7137   7.3588  0.255  0.99  -0.232    600.  0.157E+02  0.610E+00  0.913E-04  0.457E-05    7  53  68   15  35  54    5  42  82    0.000    0.000       0
+  0     88 00:06:32.66   4.6800A   9.6113  -7.6935   7.4015  0.255  0.99  -0.236    600.  0.157E+02  0.619E+00  0.919E-04  0.457E-05    7  53  68   15  35  54    5  41  83    0.000    0.000       0
+  0     89 00:06:37.34   4.6800A   9.6168  -7.7104   7.3239  0.255  0.99  -0.233    600.  0.157E+02  0.627E+00  0.925E-04  0.457E-05    2  52  88    4  39  88    5  41  83    0.000    0.000       0
+  0     90 00:06:42.00   4.6600A   9.6657  -7.7853   7.2080  0.255  0.99  -0.237    600.  0.157E+02  0.636E+00  0.928E-04  0.454E-05    2  52  88    4  39  88    6  41  83    0.000    0.000       0
+  0     91 00:06:46.65   4.6500A   9.6760  -7.8042   7.1366  0.255  0.83  -0.234    350.  0.157E+02  0.644E+00  0.932E-04  0.453E-05    6  24  72    4  39  88    6  41  83    0.000    0.000       0
+  0     92 00:06:51.28   4.6300A   9.7108  -7.7791   7.0777  0.255  0.83  -0.234    350.  0.157E+02  0.652E+00  0.934E-04  0.450E-05    6  24  72    4  39  88    7  41  83    0.000    0.000       0
+  0     93 00:06:55.92   4.6400A   9.7073  -7.8026   7.0222  0.255  0.83  -0.235    350.  0.157E+02  0.661E+00  0.943E-04  0.450E-05    5  52  75    4  39  89    7  41  83    0.000    0.000       0
+  0     94 00:07:00.54   4.6200A   9.7330  -7.7885   6.6563  0.255  0.83  -0.235    350.  0.157E+02  0.669E+00  0.945E-04  0.449E-05    6  24  74    4  39  89    5  40  84    0.000    0.000       0
+  0     95 00:07:05.16   4.6200A   9.7428  -7.7972   6.4856  0.256  0.83  -0.236    350.  0.157E+02  0.677E+00  0.951E-04  0.448E-05    2  52  88    1  47  81    5  40  84    0.000    0.000       0
+  0     96 00:07:09.80   4.6400A   9.7079  -7.9541   6.3968  0.256  0.83  -0.236    350.  0.157E+02  0.685E+00  0.961E-04  0.449E-05    2  52  88    1  47  81    6  40  84    0.000    0.000       0
+  0     97 00:07:14.44   4.6400A   9.6922  -8.0594  -6.4369  0.256  0.83  -0.237    350.  0.157E+02  0.693E+00  0.967E-04  0.448E-05    4  52  76    1  47  81    9  31  81    0.000    0.000       0
+  0     98 00:07:19.04   4.6000A   9.7916  -8.1075  -6.7004  0.256  0.87  -0.237    400.  0.157E+02  0.701E+00  0.967E-04  0.443E-05    4  52  77    1  47  81    9  31  81    0.000    0.000       0
+  0     99 00:07:23.60   4.5600A   9.8606  -8.0965  -6.6332  0.256  0.87  -0.238    400.  0.157E+02  0.708E+00  0.965E-04  0.438E-05    4  52  77    1  47  81    9  31  81    0.000    0.000       0
+  0    100 00:07:28.16   4.5600A   9.8679  -8.0300  -6.2868  0.256  0.87  -0.239    400.  0.157E+02  0.716E+00  0.973E-04  0.436E-05    4  52  77    1  47  81    9  31  81    0.000    0.000       0
+  0    101 00:07:32.75   4.5900A   9.8141  -8.0622   6.1351  0.256  0.87  -0.239    400.  0.157E+02  0.724E+00  0.987E-04  0.437E-05    4  52  77    1  46  82    2  33  79    0.000    0.000       0
+  0    102 00:07:37.38   4.6300A   9.7172  -8.0760   6.2040  0.256  0.87  -0.240    400.  0.157E+02  0.731E+00  0.100E-03  0.439E-05    4  52  77    1  46  82    2  33  79    0.000    0.000       0
+  0    103 00:07:42.03   4.6500A   9.6710  -8.0547   6.2772  0.256  0.87  -0.240    400.  0.157E+02  0.739E+00  0.102E-03  0.439E-05    3  51  80    1  46  82    2  33  79    0.000    0.000       0
+  0    104 00:07:46.66   4.6300A   9.7122  -8.0368   6.3422  0.257  0.87  -0.239    400.  0.157E+02  0.746E+00  0.102E-03  0.436E-05    3  51  80    1  44  83    2  33  79    0.000    0.000       0
+  0    105 00:07:51.30   4.6400A   9.6896  -8.1986   6.3904  0.257  0.87  -0.239    400.  0.157E+02  0.753E+00  0.103E-03  0.435E-05    3  51  80    1  44  83    2  33  79    0.000    0.000       0
+  0    106 00:07:55.94   4.6400A   9.6997  -8.3117   6.4180  0.257  0.87  -0.239    400.  0.157E+02  0.760E+00  0.104E-03  0.433E-05    3  51  81    1  44  83    2  33  79    0.000    0.000       0
+  0    107 00:08:00.58   4.6400A   9.7052  -8.3627   6.4254  0.257  0.87  -0.239    400.  0.157E+02  0.767E+00  0.105E-03  0.432E-05    5  53  73    1  44  83    2  33  79    0.000    0.000       0
+  0    108 00:08:05.20   4.6200A   9.7364  -8.3679   6.4138  0.257  0.87  -0.239    400.  0.157E+02  0.774E+00  0.105E-03  0.429E-05    5  53  73    1  44  83    2  33  79    0.000    0.000       0
+  0    109 00:08:09.80   4.6000A   9.7869  -8.4452   6.3841  0.257  0.90  -0.243    450.  0.157E+02  0.781E+00  0.106E-03  0.426E-05    6  49  86    1  43  82    2  33  79    0.000    0.000       0
+  0    110 00:08:14.43   4.6300A   9.7211  -8.5632   6.3355  0.257  0.90  -0.241    450.  0.157E+02  0.787E+00  0.107E-03  0.428E-05    6  49  86    1  43  82    2  33  79    0.000    0.000       0
+  0    111 00:08:18.95   4.5200A   9.9460  -8.6403   6.5329  0.257  0.90  -0.241    450.  0.157E+02  0.794E+00  0.105E-03  0.418E-05    6  49  87    1  43  82    4  40  82    0.000    0.000       0
+  0    112 00:08:23.43   4.4800A  10.0381  -8.6918   6.5803  0.258  0.90  -0.242    450.  0.156E+02  0.800E+00  0.105E-03  0.413E-05    6  49  87    1  43  82    4  40  82    0.000    0.000       0
+  0    113 00:08:27.99   4.5600A   9.8711  -8.7222   6.5178  0.258  0.90  -0.243    450.  0.156E+02  0.806E+00  0.108E-03  0.419E-05    6  49  87    1  43  82    1  33  79    0.000    0.000       0
+  0    114 00:08:32.47   4.4800A  10.0415  -8.8352   6.5245  0.258  0.90  -0.243    450.  0.156E+02  0.812E+00  0.107E-03  0.412E-05    6  49  88    1  43  83    1  33  79    0.000    0.000       0
+  0    115 00:08:36.95   4.4800A  10.0338  -8.9621   6.5051  0.258  0.90  -0.242    450.  0.156E+02  0.818E+00  0.107E-03  0.410E-05    6  49  88    1  43  83    1  33  79    0.000    0.000       0
+  0    116 00:08:41.52   4.5700A   9.8492  -9.0554   6.4478  0.258  0.90  -0.243    450.  0.156E+02  0.824E+00  0.110E-03  0.415E-05    3  51  81    1  43  83    1  33  79    0.000    0.000       0
+  0    117 00:08:46.03   4.5100A   9.9852  -9.0804   6.3824  0.258  0.87  -0.243    400.  0.156E+02  0.829E+00  0.110E-03  0.410E-05    3  51  81    1  43  83    5  39  86    0.000    0.000       0
+  0    118 00:08:50.51   4.4800A  10.0384  -9.0373   6.4910  0.258  0.87  -0.245    400.  0.156E+02  0.835E+00  0.110E-03  0.406E-05    3  51  81    1  42  82    5  39  86    0.000    0.000       0
+  0    119 00:08:55.01   4.5000A  10.0074  -9.1330   6.5596  0.258  0.87  -0.247    400.  0.156E+02  0.840E+00  0.111E-03  0.406E-05    3  51  81    1  42  82    5  39  86    0.000    0.000       0
+  0    120 00:08:59.54   4.5300A   9.9447  -9.1633   6.5538  0.258  0.99  -0.249    600.  0.156E+02  0.846E+00  0.113E-03  0.407E-05    3  51  82    1  42  82    5  39  86    0.000    0.000       0
+  0    121 00:09:04.05   4.5100A   9.9771  -9.0287   6.4354  0.258  0.99  -0.251    600.  0.156E+02  0.851E+00  0.113E-03  0.404E-05    3  51  82    1  42  82    5  39  86    0.000    0.000       0
+  0    122 00:09:08.58   4.5300A   9.9384  -8.8800   6.3718  0.258  0.99  -0.251    600.  0.156E+02  0.856E+00  0.115E-03  0.404E-05    3  51  82    1  42  83    7  39  90    0.000    0.000       0
+  0    123 00:09:13.15   4.5700A   9.8510  -8.7100   6.3494  0.258  0.87  -0.251    400.  0.156E+02  0.861E+00  0.116E-03  0.406E-05    3  51  82    1  42  84    7  39  90    0.000    0.000       0
+  0    124 00:09:17.77   4.6200A   9.7467  -8.4376   6.1963  0.259  0.87  -0.251    400.  0.156E+02  0.867E+00  0.118E-03  0.409E-05    3  51  82    1  42  84    7  39  90    0.000    0.000       0
+  0    125 00:09:22.40   4.6300A   9.7111  -8.4709   6.1598  0.259  0.87  -0.252    400.  0.156E+02  0.872E+00  0.119E-03  0.409E-05    4  52  77    1  40  83    7  39  91    0.000    0.000       0
+  0    126 00:09:27.06   4.6600A   9.6629  -8.3801   6.3521  0.259  0.87  -0.261    400.  0.156E+02  0.877E+00  0.120E-03  0.411E-05    3  51  81    1  43  87    7  40  91    0.000    0.000       0
+  0    127 00:09:31.65   4.5900A   9.7936  -8.2492   6.4535  0.259  0.87  -0.253    400.  0.156E+02  0.882E+00  0.119E-03  0.405E-05    3  51  81    1  43  87    4  32  85    0.000    0.000       0
+  0    128 00:09:36.20   4.5500A   9.9006  -8.2602   6.6101  0.259  0.87  -0.252    400.  0.156E+02  0.887E+00  0.119E-03  0.401E-05    3  51  81    1  44  86    4  32  85    0.000    0.000       0
+  0    129 00:09:40.73   4.5300A   9.9444  -8.0758   6.7539  0.259  0.87  -0.252    400.  0.156E+02  0.892E+00  0.119E-03  0.399E-05    3  51  81    1  44  86    9  40  91    0.000    0.000       0
+  0    130 00:09:45.23   4.5000A  10.0063  -7.9355   6.8685  0.259  0.83  -0.252    350.  0.155E+02  0.897E+00  0.119E-03  0.397E-05    3  51  82    1  42  87    4  32  85    0.000    0.000       0
+  0    131 00:09:49.71   4.4800A  10.0405  -8.0208   7.0269  0.259  0.83  -0.252    350.  0.155E+02  0.901E+00  0.119E-03  0.395E-05    3  51  82    1  42  87    4  32  85    0.000    0.000       0
+  0    132 00:09:54.21   4.5000A  10.0077  -7.8757   7.2053  0.259  0.83  -0.253    350.  0.155E+02  0.906E+00  0.120E-03  0.396E-05    3  51  83    1  42  87    4  32  85    0.000    0.000       0
+  0    133 00:09:58.68   4.4700A  10.0655  -7.7933   7.3753  0.259  0.83  -0.253    350.  0.155E+02  0.911E+00  0.120E-03  0.392E-05    3  51  83    1  43  86    4  32  85    0.000    0.000       0
+  0    134 00:10:03.16   4.4800A  10.0553  -7.9667   7.4986  0.259  0.83  -0.253    350.  0.155E+02  0.916E+00  0.121E-03  0.392E-05    3  51  83   12  36  84    4  32  85    0.000    0.000       0
+  0    135 00:10:07.67   4.5100A   9.9887  -8.0386   7.5520  0.259  0.83  -0.253    350.  0.155E+02  0.920E+00  0.122E-03  0.394E-05    3  51  83    1  41  87    4  32  85    0.000    0.000       0
+  0    136 00:10:12.12   4.4500A  10.1179  -8.0204   7.5309  0.259  0.83  -0.253    350.  0.155E+02  0.925E+00  0.121E-03  0.388E-05    2  50  85    1  41  87    4  32  85    0.000    0.000       0
+  0    137 00:10:16.55   4.4300A  10.1478   8.1092   7.7481  0.259  0.83  -0.254    350.  0.155E+02  0.929E+00  0.121E-03  0.386E-05    2  50  85    5  41  86   10  40  94    0.000    0.000       0
+  0    138 00:10:20.92   4.3700A  10.3072  -8.0956   7.7586  0.259  0.83  -0.255    350.  0.155E+02  0.934E+00  0.120E-03  0.381E-05    2  50  86   12  34  84    5  33  85    0.000    0.000       0
+  0    139 00:10:25.23   4.3100A  10.4416   8.1755   7.9443  0.260  0.83  -0.256    350.  0.155E+02  0.938E+00  0.119E-03  0.377E-05    2  50  86    5  42  86    5  33  85    0.000    0.000       0
+  0    140 00:10:29.54   4.3100A  10.4322   8.4148   8.0757  0.260  0.83  -0.258    350.  0.155E+02  0.943E+00  0.120E-03  0.377E-05    2  50  86    5  42  86    5  33  85    0.000    0.000       0
+  0    141 00:10:33.88   4.3400A  10.3587   7.8280   8.0652  0.260  0.83  -0.261    350.  0.155E+02  0.947E+00  0.121E-03  0.380E-05    2  49  88    5  42  86    5  33  85    0.000    0.000       0
+  0    142 00:10:38.18   4.3000A  10.4664   8.1789   7.8324  0.260  0.83  -0.262    350.  0.155E+02  0.952E+00  0.120E-03  0.378E-05    2  50  87    5  43  86    5  32  86    0.000    0.000       0
+  0    143 00:10:42.48   4.3000A  10.4643   8.2905   8.0451  0.260  0.83  -0.261    350.  0.155E+02  0.956E+00  0.121E-03  0.377E-05    2  50  87    5  43  86    4  35  86    0.000    0.000       0
+  0    144 00:10:46.78   4.3000A  10.4648   7.5493   8.0428  0.260  0.83  -0.259    350.  0.155E+02  0.960E+00  0.121E-03  0.377E-05    2  49  89    5  43  86    6  33  85    0.000    0.000       0
+  0    145 00:10:51.05   4.2700A  10.5308   7.3464   7.8987  0.260  0.87  -0.258    400.  0.155E+02  0.965E+00  0.121E-03  0.374E-05    2  49  89    5  44  86    6  32  86    0.000    0.000       0
+  0    146 00:10:55.35   4.3000A  10.4616   7.2487   7.6723  0.260  0.87  -0.257    400.  0.155E+02  0.969E+00  0.122E-03  0.376E-05    2  49  89    5  44  86    6  32  86    0.000    0.000       0
+  0    147 00:10:59.67   4.3200A  10.4253   7.2250   7.2774  0.260  0.87  -0.258    400.  0.155E+02  0.973E+00  0.123E-03  0.377E-05    2  49  90    1  42 102    6  32  86    0.000    0.000       0
+  0    148 00:11:03.97   4.3000A  10.4732   7.2766   7.2232  0.260  0.87  -0.259    400.  0.155E+02  0.978E+00  0.123E-03  0.375E-05    2  49  90    9  41  94    7  32  86    0.000    0.000       0
+  0    149 00:11:08.30   4.3300A  10.3923   7.6764   7.0049  0.260  0.87  -0.261    400.  0.154E+02  0.982E+00  0.124E-03  0.376E-05    2  49  90    1  44 102    7  32  86    0.000    0.000       0
+  0    150 00:11:12.64   4.3400A  10.3649   7.9721   6.6974  0.260  0.87  -0.264    400.  0.154E+02  0.987E+00  0.124E-03  0.377E-05    2  49  91    1  44 102    5  30  87    0.000    0.000       0
+  0    151 00:11:17.00   4.3600A  10.3224   7.8088   6.9350  0.260  0.87  -0.263    400.  0.154E+02  0.991E+00  0.125E-03  0.378E-05    2  49  91    9  42  94    7  32  85    0.000    0.000       0
+  0    152 00:11:21.37   4.3700A  10.2989   8.3086   6.8999  0.260  0.87  -0.263    400.  0.154E+02  0.996E+00  0.125E-03  0.379E-05    2  49  92    9  43  94    7  31  87    0.000    0.000       0
+  0    153 00:11:25.76   4.3900A  10.2541   8.4661   6.9527  0.260  0.87  -0.263    400.  0.154E+02  0.100E+01  0.126E-03  0.380E-05    2  49  92    9  43  94    7  31  87    0.000    0.000       0
+  0    154 00:11:30.18   4.4200A  10.1916   7.9723   6.9031  0.260  0.87  -0.263    400.  0.154E+02  0.101E+01  0.127E-03  0.382E-05    2  48  93    9  43  94    6  30  88    0.000    0.000       0
+  0    155 00:11:34.61   4.4300A  10.1576   8.3739   6.8382  0.260  0.87  -0.262    400.  0.154E+02  0.101E+01  0.127E-03  0.383E-05    2  49  93    9  43  95    6  30  88    0.000    0.000       0
+  0    156 00:11:39.05   4.4400A  10.1330   8.3279   6.9060  0.260  0.87  -0.263    400.  0.154E+02  0.101E+01  0.127E-03  0.384E-05    2  48  94    9  43  95    8  31  87    0.000    0.000       0
+  0    157 00:11:43.52   4.4700A  10.0628   8.0559   7.0165  0.260  0.87  -0.267    400.  0.154E+02  0.102E+01  0.128E-03  0.387E-05    2  48  94    9  45  95    8  31  87    0.000    0.000       0
+  0    158 00:11:48.04   4.5200A   9.9577   8.2356   6.9274  0.260  0.87  -0.266    400.  0.154E+02  0.102E+01  0.130E-03  0.392E-05    2  48  94    9  45  95    7  30  88    0.000    0.000       0
+  0    159 00:11:52.59   4.5500A   9.8943   7.9014   7.0163  0.260  0.87  -0.265    400.  0.154E+02  0.103E+01  0.131E-03  0.395E-05    2  49  91    9  46  95    7  30  88    0.000    0.000       0
+  0    160 00:11:57.09   4.5000A  10.0018   7.8517   7.0482  0.260  0.87  -0.265    400.  0.154E+02  0.104E+01  0.129E-03  0.392E-05    2  49  91    9  46  95    7  30  88    0.000    0.000       0
+  0    161 00:12:01.58   4.4900A  10.0227   7.9332   7.0282  0.260  0.87  -0.266    400.  0.154E+02  0.104E+01  0.129E-03  0.392E-05    2  49  91    9  45  96    7  30  88    0.000    0.000       0
+  0    162 00:12:06.07   4.4900A  10.0178   7.6111   6.9716  0.260  0.87  -0.267    400.  0.154E+02  0.105E+01  0.129E-03  0.392E-05    2  49  92    9  45  96    7  30  88    0.000    0.000       0
+  0    163 00:12:10.55   4.4800A  10.0461   7.3192   6.8921  0.260  0.87  -0.270    400.  0.154E+02  0.105E+01  0.129E-03  0.392E-05    2  49  92    9  46  96    7  30  88    0.000    0.000       0
+  0    164 00:12:15.05   4.5000A  10.0021  -7.1220   6.9825  0.260  0.87  -0.272    400.  0.154E+02  0.106E+01  0.130E-03  0.393E-05    2  49  92   11  33  52    4  33  85    0.000    0.000       0
+  0    165 00:12:19.58   4.5300A   9.9347   7.1509   6.8708  0.260  0.87  -0.273    400.  0.154E+02  0.106E+01  0.131E-03  0.395E-05    2  49  94    9  45  97    7  29  89    0.000    0.000       0
+  0    166 00:12:24.10   4.5200A   9.9448  -7.0229   6.9253  0.260  0.87  -0.274    400.  0.154E+02  0.107E+01  0.131E-03  0.394E-05    2  48  96   11  33  52    7  29  89    0.000    0.000       0
+  0    167 00:12:28.61   4.5100A   9.9771   6.9525   6.9588  0.260  0.87  -0.273    400.  0.154E+02  0.107E+01  0.130E-03  0.393E-05    2  48  96   10  35  93    8  30  88    0.000    0.000       0
+  0    168 00:12:33.12   4.5100A   9.9797  -6.8637   6.9135  0.260  0.87  -0.274    400.  0.154E+02  0.108E+01  0.130E-03  0.392E-05    2  48  97   15  36  54    8  30  88    0.000    0.000       0
+  0    169 00:12:37.59   4.4700A  10.0655  -6.8628   6.7501  0.260  0.87  -0.276    400.  0.154E+02  0.108E+01  0.129E-03  0.389E-05    2  48  97   15  36  54    8  30  88    0.000    0.000       0
+  0    170 00:12:42.10   4.5100A   9.9732  -6.8483   6.5815  0.260  0.99  -0.281    600.  0.154E+02  0.109E+01  0.130E-03  0.391E-05    2  48  97   15  36  54    3  40  95    0.000    0.000       0
+  0    171 00:12:46.55   4.4500A  10.1197   7.2210   6.6192  0.260  0.99  -0.280    600.  0.153E+02  0.110E+01  0.129E-03  0.387E-05    2  48  98   11  38  93    3  40  95    0.000    0.000       0
+  0    172 00:12:50.99   4.4400A  10.1319   7.5926   6.5569  0.260  0.83  -0.281    350.  0.153E+02  0.110E+01  0.128E-03  0.386E-05    2  48  98   11  38  93    3  40  95    0.000    0.000       0
+  0    173 00:12:55.50   4.5100A   9.9738   7.6363   6.4791  0.260  0.83  -0.282    350.  0.153E+02  0.111E+01  0.130E-03  0.391E-05    2  48  99   11  38  93    3  41  99    0.000    0.000       0
+  0    174 00:12:59.92   4.4200A  10.1701   7.3718   6.6374  0.260  0.83  -0.281    350.  0.153E+02  0.111E+01  0.128E-03  0.384E-05    2  48  99   11  38  93    6  31  88    0.000    0.000       0
+  0    175 00:13:04.35   4.4300A  10.1525  -6.9257   6.6459  0.260  0.83  -0.280    350.  0.153E+02  0.112E+01  0.128E-03  0.384E-05    2  48  99   13  34  53    6  31  88    0.000    0.000       0
+  0    176 00:13:08.90   4.5500A   9.8937   7.1732   6.5051  0.260  0.83  -0.279    350.  0.153E+02  0.113E+01  0.131E-03  0.393E-05    2  48  99   12  36  91    6  31  88    0.000    0.000       0
+  0    177 00:13:13.40   4.5000A  10.0051   7.4061   6.5163  0.260  0.83  -0.280    350.  0.153E+02  0.113E+01  0.130E-03  0.389E-05    2  48 100   12  36  91    7  31  88    0.000    0.000       0
+  0    178 00:13:17.90   4.5000A   9.9893   7.2676   6.4535  0.260  0.83  -0.281    350.  0.153E+02  0.114E+01  0.130E-03  0.387E-05    2  48 100   12  36  91    7  31  88    0.000    0.000       0
+  0    179 00:13:22.51   4.6100A   9.7601   7.1878   6.2887  0.260  0.83  -0.281    350.  0.153E+02  0.114E+01  0.133E-03  0.394E-05    2  48 100   11  41  92    4  41 100    0.000    0.000       0
+  0    180 00:13:27.17   4.6600A   9.6535  -7.1578   6.2101  0.261  0.83  -0.283    350.  0.153E+02  0.115E+01  0.134E-03  0.396E-05    2  48 101   13  34  53    4  41 100    0.000    0.000       0
+  0    181 00:13:31.84   4.6700A   9.6270  -7.2247   6.3440  0.261  0.83  -0.286    350.  0.153E+02  0.116E+01  0.134E-03  0.396E-05    5  20  75   13  33  53    7  32  90    0.000    0.000       0
+  0    182 00:13:36.51   4.6700A   9.6281  -7.3956   6.5770  0.261  0.83  -0.287    350.  0.153E+02  0.116E+01  0.134E-03  0.393E-05    5  20  75   13  33  53    7  32  90    0.000    0.000       0
+  0    183 00:13:41.18   4.6700A   9.6351  -7.5000   6.6088  0.261  0.83  -0.285    350.  0.153E+02  0.117E+01  0.135E-03  0.391E-05    5  20  73   13  33  53    7  32  90    0.000    0.000       0
+  0    184 00:13:45.83   4.6500A   9.6770  -7.5237   6.6091  0.261  1.41  -0.284   1734.  0.153E+02  0.117E+01  0.134E-03  0.388E-05    5  20  73   13  33  53    6  31  91    0.000    0.000       0
+  0    185 00:13:50.48   4.6500A   9.6832  -7.6291   6.6231  0.261  1.41  -0.284   1734.  0.153E+02  0.118E+01  0.135E-03  0.386E-05    5  20  73   12  34  52    6  31  91    0.000    0.000       0
+  0    186 00:13:55.12   4.6400A   9.7034  -7.6097   6.6678  0.261  1.41  -0.283   1734.  0.153E+02  0.119E+01  0.135E-03  0.384E-05    5  20  75   12  34  52    8  32  90    0.000    0.000       0
+  0    187 00:13:59.75   4.6300A   9.7172  -7.4893   6.5687  0.262  1.41  -0.283   1734.  0.153E+02  0.119E+01  0.135E-03  0.382E-05    5  20  75   12  34  52    8  32  90    0.000    0.000       0
+  0    188 00:14:04.36   4.6100A   9.7703  -7.3228   6.4358  0.262  1.41  -0.284   1734.  0.153E+02  0.120E+01  0.134E-03  0.380E-05    2  22  78   12  34  52    4  43 104    0.000    0.000       0
+  0    189 00:14:08.95   4.5900A   9.8110  -7.2387   6.4041  0.262  1.16  -0.284    950.  0.153E+02  0.120E+01  0.134E-03  0.377E-05    2  22  78   13  34  53    4  43 104    0.000    0.000       0
+  0    190 00:14:13.31   4.3600A  10.3259  -7.3694   6.0951  0.262  1.16  -0.286    950.  0.153E+02  0.121E+01  0.128E-03  0.359E-05   12  20 106   13  34  53    4  43 104    0.000    0.000       0
+  0    191 00:14:17.90   4.5900A   9.7998  -7.4402   6.1597  0.262  1.16  -0.291    950.  0.153E+02  0.121E+01  0.135E-03  0.374E-05    5  20  79   13  34  53    4  43 105    0.000    0.000       0
+  0    192 00:14:22.20   4.3000A  10.4715  -7.4293   6.0772  0.262  1.16  -0.304    950.  0.153E+02  0.122E+01  0.127E-03  0.353E-05   12  20 107   13  34  53    4  43 105    0.000    0.000       0
+  0    193 00:14:26.68   4.4800A  10.0546  -7.3444   5.9455  0.263  1.16  -0.289    950.  0.153E+02  0.122E+01  0.132E-03  0.364E-05   12  20 107   13  34  53    4  43 106    0.000    0.000       0
+  0    194 00:14:31.16   4.4800A  10.0373  -7.1903   5.9477  0.263  1.16  -0.287    950.  0.153E+02  0.123E+01  0.133E-03  0.363E-05   12  20 108   13  34  53    4  43 106    0.000    0.000       0
+  0    195 00:14:35.66   4.5000A  10.0026  -6.9985   5.8839  0.263  1.02  -0.285    650.  0.153E+02  0.123E+01  0.134E-03  0.363E-05    3  23  77   13  34  53    6  31  91    0.000    0.000       0
+  0    196 00:14:40.10   4.4400A  10.1296  -6.8754   5.8995  0.263  1.02  -0.285    650.  0.153E+02  0.123E+01  0.132E-03  0.358E-05    3  23  77   14  35  53    6  31  91    0.000    0.000       0
+  0    197 00:14:44.50   4.4000A  10.2296  -6.7930   5.8874  0.263  1.02  -0.285    650.  0.152E+02  0.124E+01  0.131E-03  0.352E-05    3  23  77   14  35  53    6  31  92    0.000    0.000       0
+  0    198 00:14:48.88   4.3800A  10.2764  -6.6714   5.9708  0.264  1.02  -0.285    650.  0.152E+02  0.124E+01  0.131E-03  0.348E-05    3  23  77   12  33  52    4  31  90    0.000    0.000       0
+  0    199 00:14:53.27   4.3900A  10.2537  -6.6600   5.9986  0.264  1.02  -0.287    650.  0.152E+02  0.125E+01  0.132E-03  0.347E-05    3  23  77   11  33  52    4  31  90    0.000    0.000       0
+  0    200 00:14:57.70   4.4300A  10.1606  -6.6590   6.0699  0.264  1.02  -0.291    650.  0.152E+02  0.125E+01  0.133E-03  0.348E-05    3  23  77    1  31  84    5  31  90    0.000    0.000       0
+  0    201 00:15:02.10   4.4000A  10.2264  -7.1471   6.2434  0.264  1.02  -0.292    650.  0.152E+02  0.125E+01  0.133E-03  0.344E-05    3  23  78    1  31  84    5  31  91    0.000    0.000       0
+  0    202 00:15:06.47   4.3700A  10.3018  -7.1570   6.4455  0.265  1.02  -0.290    650.  0.152E+02  0.126E+01  0.132E-03  0.340E-05    3  23  80    1  31  84    5  31  91    0.000    0.000       0
+  0    203 00:15:10.82   4.3500A  10.3379  -6.7757   6.5959  0.265  1.02  -0.289    650.  0.152E+02  0.126E+01  0.132E-03  0.337E-05    3  23  80    1  31  84    5  31  91    0.000    0.000       0
+  0    204 00:15:15.19   4.3700A  10.3041  -6.7709   6.6775  0.265  1.02  -0.289    650.  0.152E+02  0.126E+01  0.133E-03  0.337E-05    3  23  80   16  37  54    5  31  91    0.000    0.000       0
+  0    205 00:15:19.60   4.4100A  10.2049  -6.8021   6.6836  0.265  1.02  -0.289    650.  0.152E+02  0.127E+01  0.134E-03  0.339E-05    3  23  80   16  37  54    5  31  91    0.000    0.000       0
+  0    206 00:15:24.04   4.4400A  10.1314  -6.8154   6.6154  0.266  1.02  -0.292    650.  0.152E+02  0.127E+01  0.135E-03  0.341E-05    3  23  81   16  37  54    5  31  91    0.000    0.000       0
+  0    207 00:15:28.48   4.4400A  10.1292  -6.8115   6.6028  0.266  0.99  -0.291    600.  0.152E+02  0.127E+01  0.136E-03  0.340E-05    2  24  81   16  37  54    6  31  92    0.000    0.000       0
+  0    208 00:15:32.89   4.4100A  10.1971  -6.9101   6.6131  0.266  0.99  -0.290    600.  0.152E+02  0.128E+01  0.135E-03  0.337E-05    2  24  83   13  35  52    6  31  92    0.000    0.000       0
+  0    209 00:15:37.27   4.3800A  10.2811  -7.1340   6.5006  0.266  0.99  -0.291    600.  0.152E+02  0.128E+01  0.135E-03  0.334E-05    2  24  83   13  35  52    6  31  92    0.000    0.000       0
+  0    210 00:15:41.64   4.3700A  10.3038  -7.3382   6.2675  0.267  0.99  -0.291    600.  0.152E+02  0.128E+01  0.135E-03  0.332E-05    2  24  83   13  35  52    6  31  92    0.000    0.000       0
+  0    211 00:15:46.02   4.3800A  10.2647  -7.4988   6.2663  0.267  0.99  -0.291    600.  0.152E+02  0.128E+01  0.135E-03  0.332E-05    2  24  83   13  35  52    6  32  91    0.000    0.000       0
+  0    212 00:15:50.43   4.4100A  10.2127  -7.5884   6.2867  0.267  0.99  -0.293    600.  0.152E+02  0.129E+01  0.137E-03  0.334E-05    2  22  82   13  35  52    6  32  91    0.000    0.000       0
+  0    213 00:15:54.88   4.4500A  10.1059  -7.5857   6.2011  0.267  0.99  -0.294    600.  0.152E+02  0.129E+01  0.138E-03  0.336E-05    2  22  82   13  35  52    6  32  91    0.000    0.000       0
+  0    214 00:15:59.34   4.4600A  10.0787  -7.4850   6.0251  0.268  0.99  -0.295    600.  0.152E+02  0.129E+01  0.138E-03  0.335E-05    2  24  84   13  35  52    8  34  97    0.000    0.000       0
+  0    215 00:16:03.82   4.4800A  10.0381  -7.3016   6.1376  0.268  0.99  -0.297    600.  0.152E+02  0.129E+01  0.139E-03  0.336E-05    5  19  84   13  35  52    8  34  97    0.000    0.000       0
+  0    216 00:16:08.34   4.5200A   9.9510  -7.1633   6.0258  0.268  0.99  -0.299    600.  0.152E+02  0.130E+01  0.141E-03  0.338E-05    2  22  84   12  34  52    8  34  97    0.000    0.000       0
+  0    217 00:16:12.89   4.5500A   9.8875  -7.1972   5.9196  0.269  0.99  -0.300    600.  0.152E+02  0.130E+01  0.142E-03  0.340E-05    5  19  85   12  34  52    9  34  97    0.000    0.000       0
+  0    218 00:16:17.43   4.5400A   9.9155  -7.1444   5.9413  0.269  0.99  -0.303    600.  0.151E+02  0.130E+01  0.142E-03  0.339E-05    5  19  86   12  34  52    2  30  89    0.000    0.000       0
+  0    219 00:16:22.01   4.5800A   9.8269  -7.0334   6.1309  0.269  0.99  -0.300    600.  0.151E+02  0.130E+01  0.144E-03  0.341E-05    5  19  86   12  34  52    2  30  89    0.000    0.000       0
+  0    220 00:16:26.64   4.6300A   9.7192  -6.9899   6.2427  0.270  0.99  -0.300    600.  0.151E+02  0.131E+01  0.146E-03  0.345E-05    5  19  87    1  33  89    2  30  89    0.000    0.000       0
+  0    221 00:16:31.29   4.6500A   9.6685  -7.1324   6.2283  0.270  0.99  -0.302    600.  0.151E+02  0.131E+01  0.147E-03  0.347E-05    3  53  81    1  32  87    2  30  89    0.000    0.000       0
+  0    222 00:16:35.93   4.6400A   9.6909  -7.2289   6.1389  0.270  0.99  -0.304    600.  0.151E+02  0.131E+01  0.147E-03  0.346E-05    3  53  82    1  32  87    3  29  90    0.000    0.000       0
+  0    223 00:16:40.56   4.6300A   9.7154   7.0029   6.4211  0.271  0.99  -0.306    600.  0.151E+02  0.131E+01  0.147E-03  0.346E-05    3  53  83    2  29  95    3  29  90    0.000    0.000       0
+  0    224 00:16:44.96   4.4000A  10.2373   7.2410   6.7047  0.271  0.99  -0.307    600.  0.151E+02  0.132E+01  0.141E-03  0.330E-05   11   9 121    2  29  95    3  30  89    0.000    0.000       0
+  0    225 00:16:49.39   4.4300A  10.1609   7.1462   7.0318  0.271  0.99  -0.310    600.  0.151E+02  0.132E+01  0.142E-03  0.331E-05   11   9 121    2  29  95    3  30  89    0.000    0.000       0
+  0    226 00:16:54.05   4.6600A   9.6654  -6.9526   7.1918  0.272  0.99  -0.315    600.  0.151E+02  0.132E+01  0.149E-03  0.347E-05    3  51  88    1  42  94    3  30  89    0.000    0.000       0
+  0    227 00:16:58.66   4.6100A   9.7699  -6.9793   7.1610  0.272  0.99  -0.316    600.  0.151E+02  0.132E+01  0.148E-03  0.345E-05   11   9 123    1  42  95    3  30  89    0.000    0.000       0
+  0    228 00:17:03.30   4.6400A   9.7020  -6.9710   7.1883  0.272  0.99  -0.316    600.  0.151E+02  0.133E+01  0.149E-03  0.348E-05    2  48 104    1  42  95    4  29  90    0.000    0.000       0
+  0    229 00:17:07.88   4.5800A   9.8234  -6.9883   7.2078  0.273  0.99  -0.318    600.  0.151E+02  0.133E+01  0.147E-03  0.344E-05    2  48 104    1  42  96    4  29  90    0.000    0.000       0
+  0    230 00:17:12.47   4.5900A   9.8000  -6.9965   7.0504  0.273  0.99  -0.326    600.  0.151E+02  0.133E+01  0.148E-03  0.344E-05    2  48 104    1  41  95    5  28  91    0.000    0.000       0
+  0    231 00:17:16***   4.5300A   9.9381  -7.1386   7.1787  0.273  0.99  -0.321    600.  0.151E+02  0.134E+01  0.146E-03  0.340E-05    2  48 105    1  41  96    5  28  91    0.000    0.000       0
+  0    232 00:17:21.52   4.5200A   9.9451  -7.2105   7.0791  0.274  1.02  -0.318    650.  0.151E+02  0.134E+01  0.146E-03  0.339E-05    2  48 105    1  41  96    5  28  91    0.000    0.000       0
+  0    233 00:17:26.04   4.5200A   9.9615  -7.1920   6.7130  0.274  1.02  -0.321    650.  0.151E+02  0.134E+01  0.146E-03  0.339E-05    2  48 106    1  41  96    3  30  92    0.000    0.000       0
+  0    234 00:17:30.54   4.5000A  10.0087  -7.3504   7.0197  0.275  1.02  -0.318    650.  0.151E+02  0.134E+01  0.146E-03  0.337E-05    2  48 106    1  40  96    4  30  92    0.000    0.000       0
+  0    235 00:17:35.10   4.5600A   9.8773  -7.4378   7.2134  0.275  1.02  -0.319    650.  0.151E+02  0.135E+01  0.148E-03  0.341E-05    2  48 106    1  40  96    4  30  92    0.000    0.000       0
+  0    236 00:17:39.61   4.5100A   9.9794  -7.4080   7.1061  0.275  1.02  -0.318    650.  0.151E+02  0.135E+01  0.147E-03  0.338E-05    2  48 107    1  40  96    4  30  92    0.000    0.000       0
+  0    237 00:17:44.15   4.5400A   9.9060  -7.5015   7.1882  0.276  1.02  -0.328    650.  0.151E+02  0.135E+01  0.148E-03  0.340E-05    2  48 107    1  39  96    5  30  92    0.000    0.000       0
+  0    238 00:17:48.73   4.5800A   9.8292  -7.5538   7.3978  0.276  1.02  -0.316    650.  0.150E+02  0.135E+01  0.149E-03  0.342E-05    2  23  83    1  39  96    5  30  92    0.000    0.000       0
+  0    239 00:17:53.31   4.5800A   9.8279  -7.5068   7.3387  0.276  1.02  -0.316    650.  0.150E+02  0.136E+01  0.150E-03  0.341E-05    2  48 108    1  38  96    4  30  94    0.000    0.000       0
+  0    240 00:17:57.90   4.5900A   9.8139  -7.6764   7.0742  0.277  1.02  -0.309    650.  0.150E+02  0.136E+01  0.150E-03  0.341E-05    2  22  80    1  38  96    4  30  94    0.000    0.000       0
+  0    241 00:18:02.46   4.5600A   9.8665  -7.7300   6.9979  0.277  1.02  -0.308    650.  0.150E+02  0.136E+01  0.150E-03  0.338E-05    2  22  80    1  38  96    6  30  93    0.000    0.000       0
+  0    242 00:18:07.03   4.5700A   9.8520  -7.6784   6.9417  0.277  1.02  -0.310    650.  0.150E+02  0.137E+01  0.150E-03  0.337E-05    2  22  80    1  38  96    6  30  93    0.000    0.000       0
+  0    243 00:18:11.61   4.5800A   9.8345  -7.5457   6.7919  0.278  1.02  -0.305    650.  0.150E+02  0.137E+01  0.151E-03  0.337E-05    2  23  84    1  38  96    3  30  95    0.000    0.000       0
+  0    244 00:18:16.19   4.5800A   9.8275  -7.7567   6.8592  0.278  1.16  -0.302    950.  0.150E+02  0.137E+01  0.151E-03  0.336E-05    2  23  82    1  35  96    3  30  95    0.000    0.000       0
+  0    245 00:18:20.75   4.5600A   9.8617  -8.1239   6.8121  0.279  1.16  -0.300    950.  0.150E+02  0.138E+01  0.151E-03  0.334E-05    2  22  83    1  35  96    5  29  94    0.000    0.000       0
+  0    246 00:18:25.26   4.5100A   9.9841  -8.2586   6.8596  0.279  1.16  -0.301    950.  0.150E+02  0.138E+01  0.149E-03  0.329E-05    2  22  83    1  35  96    5  29  95    0.000    0.000       0
+  0    247 00:18:29.74   4.4800A  10.0486  -8.2448   7.0456  0.279  1.02  -0.300    650.  0.150E+02  0.138E+01  0.148E-03  0.326E-05    2  22  83    1  34  96    5  29  95    0.000    0.000       0
+  0    248 00:18:34.23   4.4900A  10.0273  -8.8298   7.4487  0.280  1.02  -0.303    650.  0.150E+02  0.138E+01  0.149E-03  0.325E-05    2  22  83    1  34  96    4  30  96    0.000    0.000       0
+  0    249 00:18:38.76   4.5300A   9.9325  -9.1144   7.7024  0.280  1.02  -0.304    650.  0.150E+02  0.139E+01  0.150E-03  0.327E-05    2  52  91    1  34  96    4  30  96    0.000    0.000       0
+  0    250 00:18:43.28   4.5200A   9.9454  -9.0534   7.5975  0.280  1.02  -0.300    650.  0.150E+02  0.139E+01  0.150E-03  0.325E-05    2  23  85    1  34  96    4  30  96    0.000    0.000       0
+  0    251 00:18:47.80   4.5200A   9.9640  -8.6924   7.3627  0.281  0.93  -0.295    500.  0.150E+02  0.139E+01  0.150E-03  0.324E-05    2  52  92    1  34  96    5  30  96    0.000    0.000       0
+  0    252 00:18:52.34   4.5400A   9.9043  -8.5389   7.3973  0.281  0.93  -0.292    500.  0.150E+02  0.139E+01  0.151E-03  0.324E-05    2  52  92    1  33  96    5  30  96    0.000    0.000       0
+  0    253 00:18:56.84   4.5000A  10.0014  -8.5103   7.4231  0.281  0.93  -0.307    500.  0.150E+02  0.140E+01  0.150E-03  0.321E-05    2  22  86    1  33  96    5  30  97    0.000    0.000       0
+  0    254 00:19:01.33   4.4900A  10.0307  -8.2060   7.4985  0.282  0.93  -0.293    500.  0.150E+02  0.140E+01  0.150E-03  0.318E-05    2  22  86    1  33  96    5  30  97    0.000    0.000       0
+  0    255 00:19:05.84   4.5100A   9.9853  -7.9952   7.2666  0.282  0.96  -0.293    550.  0.150E+02  0.140E+01  0.151E-03  0.318E-05    2  22  86    1  33  97    5  30  97    0.000    0.000       0
+  0    256 00:19:10.37   4.5300A   9.9259  -7.7827   6.9945  0.282  0.96  -0.290    550.  0.150E+02  0.140E+01  0.152E-03  0.318E-05    4  17  85    1  33  97    6  30  97    0.000    0.000       0
+  0    257 00:19:14.87   4.5000A  10.0021  -7.9334   6.8150  0.282  0.96  -0.290    550.  0.150E+02  0.140E+01  0.151E-03  0.316E-05    4  17  85    1  31  96    6  30  97    0.000    0.000       0
+  0    258 00:19:19.37   4.5000A   9.9934  -7.6955   6.5619  0.283  0.96  -0.287    550.  0.150E+02  0.141E+01  0.151E-03  0.315E-05    4  17  86    1  31  96    5  29  97    0.000    0.000       0
+  0    259 00:19:23.83   4.4600A  10.0987  -7.3249   6.4209  0.283  0.96  -0.287    550.  0.150E+02  0.141E+01  0.150E-03  0.311E-05    4  17  86    1  32  97    6  29  97    0.000    0.000       0
+  0    260 00:19:28.32   4.4900A  10.0201  -7.5261   6.4213  0.283  0.96  -0.283    550.  0.150E+02  0.141E+01  0.151E-03  0.311E-05    4  17  86    1  32  97    6  29  97    0.000    0.000       0
+  0    261 00:19:32.84   4.5200A   9.9509  -7.6263   6.3243  0.284  0.96  -0.284    550.  0.149E+02  0.141E+01  0.152E-03  0.312E-05    4  17  87    1  32  97    6  29  97    0.000    0.000       0
+  0    262 00:19:37.40   4.5600A   9.8631  -7.5706   6.1584  0.284  0.99  -0.285    600.  0.149E+02  0.141E+01  0.154E-03  0.314E-05    4  17  87    1  32  97    6  29  97    0.000    0.000       0
+  0    263 00:19:41.99   4.5900A   9.8146  -7.6914   5.9473  0.284  0.99  -0.284    600.  0.149E+02  0.141E+01  0.155E-03  0.315E-05    4  17  88    1  31  98    6  29  97    0.000    0.000       0
+  0    264 00:19:46.56   4.5700A   9.8465  -7.5269   5.9463  0.284  0.99  -0.281    600.  0.149E+02  0.142E+01  0.154E-03  0.313E-05    4  17  89    1  31  98    6  28  97    0.000    0.000       0
+  0    265 00:19:51.15   4.5900A   9.8012  -7.1248   5.8342  0.285  0.99  -0.282    600.  0.149E+02  0.142E+01  0.155E-03  0.313E-05    4  17  89    1  32  96    6  28  97    0.000    0.000       0
+  0    266 00:19:55.81   4.6600A   9.6551  -6.8663   5.5801  0.285  0.99  -0.283    600.  0.149E+02  0.142E+01  0.158E-03  0.316E-05    9  13  91    3  41 101    6  28  97    0.000    0.000       0
+  0    267 00:20:00.53   4.7200A   9.5398  -6.9369   5.6682  0.285  0.96  -0.279    550.  0.149E+02  0.142E+01  0.160E-03  0.318E-05    4  17  90    1  30  98    5  28  94    0.000    0.000       0
+  0    268 00:20:05.19   4.6600A   9.6667  -6.8167   5.7290  0.285  0.96  -0.276    550.  0.149E+02  0.142E+01  0.158E-03  0.314E-05    2  24  92   12  34  52    5  28  94    0.000    0.000       0
+  0    269 00:20:09.83   4.6400A   9.7027   6.9268   5.9644  0.286  0.96  -0.276    550.  0.149E+02  0.142E+01  0.157E-03  0.312E-05    2  24  92    1  30  91    4  29  94    0.000    0.000       0
+  0    270 00:20:14.54   4.7100A   9.5571   6.9971   6.3531  0.286  0.96  -0.279    550.  0.149E+02  0.142E+01  0.160E-03  0.315E-05    2  24  92    1  29  91    4  29  94    0.000    0.000       0
+  0    271 00:20:19.25   4.7100A   9.5525   7.1892   6.5410  0.286  0.96  -0.277    550.  0.149E+02  0.143E+01  0.160E-03  0.314E-05    3  53  87    1  29  91    4  29  94    0.000    0.000       0
+  0    272 00:20:23.98   4.7300A   9.5075   7.4507   6.4766  0.286  0.96  -0.276    550.  0.149E+02  0.143E+01  0.161E-03  0.315E-05    3  53  87    1  29  91    4  29  94    0.000    0.000       0
+  0    273 00:20:28.67   4.6900A   9.5967   7.6347   6.2324  0.286  0.96  -0.275    550.  0.149E+02  0.143E+01  0.160E-03  0.312E-05    5  56  88    1  29  91    3  25  95    0.000    0.000       0
+  0    274 00:20:33.34   4.6700A   9.6257   7.5961   6.3453  0.287  0.96  -0.274    550.  0.149E+02  0.143E+01  0.159E-03  0.310E-05    5  56  88    1  29  91    3  25  95    0.000    0.000       0
+  0    275 00:20:38.01   4.6700A   9.6275   7.2940   6.3067  0.287  0.96  -0.273    550.  0.149E+02  0.143E+01  0.159E-03  0.310E-05    2  52  89    1  29  91    3  25  95    0.000    0.000       0
+  0    276 00:20:42.65   4.6400A   9.6990   6.7937   6.3749  0.287  0.96  -0.273    550.  0.149E+02  0.143E+01  0.158E-03  0.308E-05    5  56  89    1  29  91    4  25  96    0.000    0.000       0
+  0    277 00:20:47.28   4.6300A   9.7181  -6.7553   6.5420  0.287  0.96  -0.269    550.  0.149E+02  0.143E+01  0.158E-03  0.307E-05    2  52  87   14  35  53    5  29  93    0.000    0.000       0
+  0    278 00:20:51.93   4.6500A   9.6756  -6.7207   6.6613  0.287  0.96  -0.268    550.  0.149E+02  0.143E+01  0.159E-03  0.308E-05    2  54  88   14  35  53    5  29  93    0.000    0.000       0
+  0    279 00:20:56.54   4.6100A   9.7516   6.6984   6.7173  0.288  0.96  -0.268    550.  0.149E+02  0.144E+01  0.158E-03  0.305E-05    2  52  90    5  14 119    5  29  93    0.000    0.000       0
+  0    280 00:21:01.12   4.5800A   9.8289  -6.7072   6.7963  0.288  0.96  -0.271    550.  0.149E+02  0.144E+01  0.157E-03  0.302E-05    2  52  90   15  36  54    6  30  93    0.000    0.000       0
+  0    281 00:21:05.69   4.5700A   9.8556  -6.7268   6.9350  0.288  0.96  -0.267    550.  0.149E+02  0.144E+01  0.157E-03  0.300E-05    2  52  90   15  36  54    6  30  93    0.000    0.000       0
+  0    282 00:21:10.27   4.5800A   9.8283   6.7780   7.0670  0.288  0.96  -0.266    550.  0.148E+02  0.144E+01  0.157E-03  0.300E-05    2  52  90    5  12 121    6  29  93    0.000    0.000       0
+  0    283 00:21:14.84   4.5700A   9.8363   6.8312   7.4366  0.288  0.96  -0.266    550.  0.148E+02  0.144E+01  0.157E-03  0.298E-05    2  52  91    5  12 121    6  26  95    0.000    0.000       0
+  0    284 00:21:19.38   4.5400A   9.9116   6.8717   7.6000  0.289  0.96  -0.267    550.  0.148E+02  0.144E+01  0.156E-03  0.295E-05    2  52  91    5  12 122    6  26  95    0.000    0.000       0
+  0    285 00:21:23.93   4.5500A   9.8825   6.9645   7.3218  0.289  0.96  -0.267    550.  0.148E+02  0.144E+01  0.156E-03  0.294E-05    2  52  91    5  12 122    6  26  95    0.000    0.000       0
+  0    286 00:21:28.53   4.6000A   9.7846   7.0275   7.0817  0.289  0.96  -0.265    550.  0.148E+02  0.145E+01  0.158E-03  0.296E-05    2  52  92    5  12 122    6  30  93    0.000    0.000       0
+  0    287 00:21:33.09   4.5600A   9.8578   7.0501   7.0716  0.289  0.96  -0.265    550.  0.148E+02  0.145E+01  0.156E-03  0.293E-05    2  52  92    5  12 122    7  30  93    0.000    0.000       0
+  0    288 00:21:37.68   4.5900A   9.8145   7.0408   7.0548  0.290  0.96  -0.266    550.  0.148E+02  0.145E+01  0.157E-03  0.293E-05    2  52  92    5  12 122    7  30  93    0.000    0.000       0
+  0    289 00:21:42.32   4.6400A   9.7074   7.0531   6.9519  0.290  0.96  -0.267    550.  0.148E+02  0.145E+01  0.159E-03  0.295E-05    2  52  92    5  13 122    7  30  93    0.000    0.000       0
+  0    290 00:21:46.95   4.6300A   9.7281   7.0879   6.8244  0.290  0.96  -0.267    550.  0.148E+02  0.145E+01  0.159E-03  0.294E-05    2  52  93    5  13 122    6  25  97    0.000    0.000       0
+  0    291 00:21:51.60   4.6500A   9.6868   7.0992   6.7580  0.290  0.96  -0.268    550.  0.148E+02  0.145E+01  0.159E-03  0.294E-05    2  52  93    5  13 122    5  29  93    0.000    0.000       0
+  0    292 00:21:56.28   4.6800A   9.6118   7.1048   6.8294  0.291  0.96  -0.269    550.  0.148E+02  0.145E+01  0.160E-03  0.295E-05    2  54  94    5  13 122    8  29  93    0.000    0.000       0
+  0    293 00:22:00.98   4.7000A   9.5843   7.1137   7.0160  0.291  0.96  -0.267    550.  0.148E+02  0.145E+01  0.161E-03  0.296E-05    2  52  94    5  13 122    8  29  93    0.000    0.000       0
+  0    294 00:22:05.68   4.7000A   9.5674   7.1476   7.0498  0.291  0.96  -0.266    550.  0.148E+02  0.146E+01  0.161E-03  0.296E-05    2  54  95    4  12 123    8  29  93    0.000    0.000       0
+  0    295 00:22:10.40   4.7200A   9.5308   7.2010   6.9080  0.292  0.96  -0.268    550.  0.148E+02  0.146E+01  0.161E-03  0.297E-05    2  54  95    4  12 123    8  29  93    0.000    0.000       0
+  0    296 00:22:15.13   4.7300A   9.5196   7.2184   6.8098  0.292  0.99  -0.268    600.  0.148E+02  0.146E+01  0.162E-03  0.297E-05    3  18  86    4  12 123    9  29  93    0.000    0.000       0
+  0    297 00:22:19.86   4.7300A   9.5119   7.2608   6.8069  0.292  0.99  -0.263    600.  0.148E+02  0.146E+01  0.162E-03  0.296E-05    2  22  87    4  12 124    9  29  93    0.000    0.000       0
+  0    298 00:22:24.56   4.7000A   9.5663   7.3513   6.5824  0.292  0.99  -0.262    600.  0.148E+02  0.146E+01  0.161E-03  0.293E-05    2  22  87    4  12 124    9  29  93    0.000    0.000       0
+  0    299 00:22:29.23   4.6700A   9.6346   7.3979   6.4003  0.293  0.99  -0.263    600.  0.148E+02  0.146E+01  0.160E-03  0.291E-05    2  19  87    4  12 124    6  27  96    0.000    0.000       0
+  0    300 00:22:33.91   4.6800A   9.6190   7.4043   6.4798  0.293  0.99  -0.263    600.  0.148E+02  0.146E+01  0.160E-03  0.291E-05    2  19  87    4  12 124    6  27  96    0.000    0.000       0
+  0    301 00:22:38.62   4.7100A   9.5617   7.3831   6.2743  0.293  0.99  -0.263    600.  0.148E+02  0.146E+01  0.162E-03  0.293E-05    2  22  87    4  12 124    6  27  96    0.000    0.000       0
+  0    302 00:22:43.26   4.6400A   9.6979   7.3522   6.3658  0.294  0.99  -0.264    600.  0.148E+02  0.146E+01  0.160E-03  0.289E-05    2  20  89    4  12 124    8  26  99    0.000    0.000       0
+  0    303 00:22:47.88   4.6200A   9.7399   7.4058   6.1602  0.294  0.99  -0.267    600.  0.148E+02  0.146E+01  0.159E-03  0.289E-05    2  19  89    4  13 124    8  26  99    0.000    0.000       0
+  0    304 00:22:52.53   4.6500A   9.6741   7.4287   5.8823  0.294  0.99  -0.267    600.  0.147E+02  0.147E+01  0.161E-03  0.291E-05    2  19  89    4  13 124    7  27  98    0.000    0.000       0
+  0    305 00:22:57.21   4.6800A   9.6255   7.4298   5.9753  0.295  0.99  -0.268    600.  0.147E+02  0.147E+01  0.162E-03  0.293E-05    2  19  90    4  13 124    8  27  98    0.000    0.000       0
+  0    306 00:23:01.89   4.6800A   9.6193   7.4244   6.2308  0.295  0.99  -0.270    600.  0.147E+02  0.147E+01  0.162E-03  0.294E-05    2  19  90    4  13 124    8  27  98    0.000    0.000       0
+  0    307 00:23:06.55   4.6600A   9.6525   7.4241   6.2488  0.295  1.02  -0.278    650.  0.147E+02  0.147E+01  0.162E-03  0.294E-05    2  20  91    4  13 124    8  27  98    0.000    0.000       0
+  0    308 00:23:11.27   4.7200A   9.5408   7.4343   6.0024  0.295  1.02  -0.270    650.  0.147E+02  0.147E+01  0.164E-03  0.298E-05    2  19  91    4  13 124    9  27  98    0.000    0.000       0
+  0    309 00:23:15.94   4.6700A   9.6342   7.4528   6.0703  0.296  1.02  -0.266    650.  0.147E+02  0.147E+01  0.163E-03  0.295E-05    2  20  92    4  13 124    8  27  99    0.000    0.000       0
+  0    310 00:23:20.61   4.6700A   9.6258   7.4709   6.1009  0.296  1.02  -0.266    650.  0.147E+02  0.147E+01  0.163E-03  0.295E-05    2  19  92    4  13 124    9  27  99    0.000    0.000       0
+  0    311 00:23:25.34   4.7300A   9.5071   7.4774   6.1456  0.296  1.02  -0.264    650.  0.147E+02  0.147E+01  0.166E-03  0.298E-05    2  19  92    4  13 124    9  27  99    0.000    0.000       0
+  0    312 00:23:30.20   4.8600A   9.2681   7.4610   6.1341  0.297  1.02  -0.261    650.  0.147E+02  0.147E+01  0.170E-03  0.304E-05    2  20  90    4  13 124   10  27  99    0.000    0.000       0
+  0    313 00:23:34.90   4.7000A   9.5714   7.4125   6.1228  0.297  1.02  -0.259    650.  0.147E+02  0.147E+01  0.165E-03  0.295E-05    1  29  92    4  13 124   10  27  99    0.000    0.000       0
+  0    314 00:23:39.78   4.8800A   9.2199   7.3348   6.0314  0.297  1.02  -0.258    650.  0.147E+02  0.147E+01  0.172E-03  0.302E-05    3  19  95    4  13 124    3  27  95    0.000    0.000       0
+  0    315 00:23:44.67   4.8900A   9.1942   7.2774   6.4380  0.298  1.02  -0.258    650.  0.147E+02  0.147E+01  0.172E-03  0.302E-05    3  19  95    4  13 125    3  27  95    0.000    0.000       0
+  0    316 00:23:49.56   4.8900A   9.2024   7.3085   6.7399  0.298  1.02  -0.255    650.  0.147E+02  0.147E+01  0.173E-03  0.301E-05    5  56  89    4  13 125    3  27  95    0.000    0.000       0
+  0    317 00:23:54.46   4.9000A   9.1863   7.3316   6.8623  0.298  1.02  -0.257    650.  0.147E+02  0.147E+01  0.173E-03  0.300E-05    5  56  89    4  13 125    3  27  95    0.000    0.000       0
+  0    318 00:23:59.33   4.8700A   9.2447   7.3250   6.9413  0.299  1.02  -0.258    650.  0.147E+02  0.147E+01  0.173E-03  0.297E-05    5  56  90    4  13 125    4  27  95    0.000    0.000       0
+  0    319 00:24:04.19   4.8600A   9.2648   7.2801   6.9442  0.299  0.99  -0.255    600.  0.147E+02  0.147E+01  0.173E-03  0.295E-05    5  56  90    4  13 125    4  27  95    0.000    0.000       0
+  0    320 00:24:09.04   4.8500A   9.2867   7.2046   7.2437  0.300  0.96  -0.256    550.  0.147E+02  0.148E+01  0.173E-03  0.293E-05    5  56  91    4  13 125    4  26  97    0.000    0.000       0
+  0    321 00:24:13.64   4.6000A   9.7819   7.1185   7.4156  0.300  0.96  -0.256    550.  0.147E+02  0.148E+01  0.164E-03  0.279E-05    2  28  93    4  13 125    4  26  97    0.000    0.000       0
+  0    322 00:24:18.49   4.8500A   9.2876   7.0474   7.3878  0.300  0.96  -0.260    550.  0.147E+02  0.148E+01  0.173E-03  0.290E-05    5  56  92    4  13 125    4  26  97    0.000    0.000       0
+  0    323 00:24:23.21   4.7200A   9.5424   6.9986   7.4281  0.301  0.96  -0.256    550.  0.147E+02  0.148E+01  0.169E-03  0.284E-05    2  29  93    4  13 125    5  27  96    0.000    0.000       0
+  0    324 00:24:28.02   4.8100A   9.3604   6.9816   7.4676  0.301  0.96  -0.256    550.  0.147E+02  0.148E+01  0.172E-03  0.287E-05    5  56  92    4  13 126    5  26  97    0.000    0.000       0
+  0    325 00:24:32.38   4.3600A  10.3269   6.9744   7.6358  0.302  0.96  -0.255    550.  0.147E+02  0.148E+01  0.157E-03  0.262E-05    2  29  94    4  13 125    5  26  97    0.000    0.000       0
+  0    326 00:24:37.09   4.7100A   9.5485   6.9668   7.5918  0.302  0.96  -0.254    550.  0.146E+02  0.148E+01  0.169E-03  0.278E-05    2  29  94    4  13 125    5  26  97    0.000    0.000       0
+  0    327 00:24:41.83   4.7400A   9.4972   6.9356   7.3181  0.302  0.96  -0.257    550.  0.146E+02  0.148E+01  0.170E-03  0.281E-05    2  29  95    4  13 125    5  26  97    0.000    0.000       0
+  0    328 00:24:46.62   4.7900A   9.3912   6.8889   7.1902  0.303  0.96  -0.257    550.  0.146E+02  0.148E+01  0.172E-03  0.283E-05    2  54  93    4  13 126    5  24  97    0.000    0.000       0
+  0    329 00:24:51.39   4.7700A   9.4315   6.8882   7.2302  0.303  0.96  -0.255    550.  0.146E+02  0.148E+01  0.171E-03  0.281E-05    2  54  94    4  13 126    5  24  97    0.000    0.000       0
+  0    330 00:24:56.17   4.7800A   9.4082   6.8986   7.1324  0.304  0.96  -0.256    550.  0.146E+02  0.148E+01  0.172E-03  0.280E-05    2  54  94    4  13 126    5  24  97    0.000    0.000       0
+  0    331 00:25:00.93   4.7600A   9.4496   6.9075   6.8329  0.304  0.96  -0.251    550.  0.146E+02  0.148E+01  0.172E-03  0.278E-05    2  54  95    4  13 126    5  24  97    0.000    0.000       0
+  0    332 00:25:05.70   4.7700A   9.4335   6.8990   6.8456  0.304  0.99  -0.249    600.  0.146E+02  0.148E+01  0.172E-03  0.276E-05    2  54  95    4  13 126    6  24  97    0.000    0.000       0
+  0    333 00:25:10.51   4.8100A   9.3503   6.8593   6.8197  0.305  0.99  -0.248    600.  0.146E+02  0.148E+01  0.174E-03  0.277E-05    2  54  96    4  13 126    6  24  97    0.000    0.000       0
+  0    334 00:25:15.32   4.8100A   9.3619  -6.8654   6.5205  0.305  0.99  -0.244    600.  0.146E+02  0.148E+01  0.174E-03  0.275E-05    2  54  93   12  34  52    7  24  97    0.000    0.000       0
+  0    335 00:25:20.14   4.8200A   9.3397  -6.9307   6.7467  0.305  0.99  -0.242    600.  0.146E+02  0.148E+01  0.175E-03  0.275E-05    2  54  93   12  34  52    7  26  96    0.000    0.000       0
+  0    336 00:25:24.93   4.7900A   9.3994  -6.9507   6.9603  0.306  0.99  -0.250    600.  0.146E+02  0.148E+01  0.174E-03  0.272E-05    4  55  95   12  34  52    7  26  96    0.000    0.000       0
+  0    337 00:25:29.76   4.8300A   9.3132  -6.9242   6.6217  0.306  0.99  -0.241    600.  0.146E+02  0.148E+01  0.175E-03  0.273E-05    2  54  94   12  34  52    7  26  96    0.000    0.000       0
+  0    338 00:25:34.57   4.8100A   9.3547  -6.8500   6.3304  0.306  0.99  -0.239    600.  0.146E+02  0.147E+01  0.175E-03  0.270E-05    4  55  96   12  34  52    8  25  96    0.000    0.000       0
+  0    339 00:25:39.43   4.8600A   9.2500  -6.7316   6.1871  0.307  0.99  -0.239    600.  0.146E+02  0.147E+01  0.176E-03  0.271E-05    4  55  96   12  34  52    6  73 156    0.000    0.000       0
+  0    340 00:25:44.28   4.8500A   9.2812  -6.5719   6.4107  0.307  0.99  -0.239    600.  0.146E+02  0.147E+01  0.176E-03  0.269E-05    4  55  97   12  34  52    6  73 156    0.000    0.000       0
+  0    341 00:25:49.14   4.8600A   9.2541  -6.6298   6.2094  0.307  0.99  -0.242    600.  0.146E+02  0.147E+01  0.177E-03  0.268E-05    2  21  85   14  35  53    6  73 156    0.000    0.000       0
+  0    342 00:25:53.98   4.8400A   9.2895  -6.7992   6.0520  0.308  0.99  -0.240    600.  0.146E+02  0.147E+01  0.176E-03  0.265E-05    2  21  86   14  35  53    6  73 157    0.000    0.000       0
+  0    343 00:25:58.77   4.7900A   9.3989  -6.9363   6.2133  0.308  0.99  -0.238    600.  0.146E+02  0.147E+01  0.174E-03  0.262E-05    2  21  86   14  35  53    7  73 157    0.000    0.000       0
+  0    344 00:26:03.57   4.8000A   9.3657  -7.0154   6.0234  0.308  0.99  -0.238    600.  0.146E+02  0.147E+01  0.174E-03  0.261E-05    2  21  86   14  35  53    4  24 101    0.000    0.000       0
+  0    345 00:26:08.43   4.8600A   9.2573  -7.0135   6.0667  0.309  0.99  -0.237    600.  0.146E+02  0.146E+01  0.177E-03  0.263E-05    2  21  87   14  35  53    5  24 101    0.000    0.000       0
+  0    346 00:26:13.27   4.8400A   9.2984  -6.9155   6.3974  0.309  0.99  -0.237    600.  0.145E+02  0.146E+01  0.176E-03  0.262E-05    2  18  86   14  35  53    5  24 101    0.000    0.000       0
+  0    347 00:26:18.09   4.8200A   9.3370  -6.7306   6.4947  0.309  0.99  -0.237    600.  0.145E+02  0.146E+01  0.175E-03  0.260E-05    2  21  88   14  35  53    5  24 101    0.000    0.000       0
+  0    348 00:26:22.90   4.8100A   9.3607  -6.5045   6.3639  0.310  0.99  -0.238    600.  0.145E+02  0.146E+01  0.175E-03  0.259E-05    2  21  88   13  34  53    5  24 101    0.000    0.000       0
+  0    349 00:26:27.72   4.8200A   9.3414  -6.4076   6.3752  0.310  0.99  -0.239    600.  0.145E+02  0.146E+01  0.175E-03  0.259E-05    2  51  95   13  34  53    5  24 100    0.000    0.000       0
+  0    350 00:26:32.49   4.7700A   9.4291   6.4164   6.2240  0.310  0.99  -0.239    600.  0.145E+02  0.145E+01  0.174E-03  0.256E-05    2  18  89    4  12 129    5  24 100    0.000    0.000       0
+  0    351 00:26:37.26   4.7700A   9.4326   6.4269   6.2625  0.310  0.99  -0.239    600.  0.145E+02  0.145E+01  0.174E-03  0.256E-05    2  18  89    4  12 129    6  24 100    0.000    0.000       0
+  0    352 00:26:42.04   4.7800A   9.4203   6.4281   6.3858  0.310  0.99  -0.245    600.  0.145E+02  0.145E+01  0.174E-03  0.257E-05    2  20  90    4  12 130    6  24 100    0.000    0.000       0
+  0    353 00:26:46.87   4.8300A   9.3217   6.5344   6.3034  0.311  0.99  -0.242    600.  0.145E+02  0.145E+01  0.176E-03  0.260E-05    2  18  90    2  33  98    6  24 100    0.000    0.000       0
+  0    354 00:26:51.71   4.8400A   9.3070   6.6299   6.0634  0.311  0.99  -0.242    600.  0.145E+02  0.144E+01  0.176E-03  0.261E-05    2  19  90    2  33  98    6  24 100    0.000    0.000       0
+  0    355 00:26:56.54   4.8300A   9.3248   6.6149   6.0750  0.311  0.99  -0.245    600.  0.145E+02  0.144E+01  0.176E-03  0.262E-05    2  18  91    2  33  98    7  23 103    0.000    0.000       0
+  0    356 00:27:01.36   4.8200A   9.3363  -6.5276   6.1763  0.311  0.99  -0.240    600.  0.145E+02  0.144E+01  0.176E-03  0.262E-05    2  20  92   14  35  53    8  23 103    0.000    0.000       0
+  0    357 00:27:06.03   4.6700A   9.6345  -6.6887   6.4579  0.311  0.99  -0.238    600.  0.145E+02  0.144E+01  0.171E-03  0.255E-05    1  24  92   14  35  53    8  23 103    0.000    0.000       0
+  0    358 00:27:10.70   4.6700A   9.6334  -6.7330   6.4463  0.311  0.99  -0.239    600.  0.145E+02  0.143E+01  0.171E-03  0.254E-05    1  24  92   14  35  53    8  23 103    0.000    0.000       0
+  0    359 00:27:15.47   4.7700A   9.4427  -6.6325   6.2239  0.311  0.99  -0.241    600.  0.145E+02  0.143E+01  0.175E-03  0.259E-05    1  20  92   14  35  53    8  23 103    0.000    0.000       0
+  0    360 00:27:19***   4.5300A   9.9297  -6.3930   6.3363  0.311  0.99  -0.240    600.  0.145E+02  0.143E+01  0.166E-03  0.248E-05    1  24  93   14  35  53    9  23 103    0.000    0.000       0
+  0    361 00:27:24.54   4.5400A   9.9076   6.3870   6.2283  0.311  0.99  -0.240    600.  0.145E+02  0.143E+01  0.167E-03  0.247E-05    1  24  93    4  11 130    9  23 103    0.000    0.000       0
+  0    362 00:27:29.26   4.7200A   9.5241  -6.7867   5.9024  0.311  0.99  -0.240    600.  0.144E+02  0.143E+01  0.173E-03  0.255E-05    1  24  94    1  34  96    7  24 102    0.000    0.000       0
+  0    363 00:27:33.76   4.5000A   9.9928  -7.2398   6.0763  0.311  0.99  -0.238    600.  0.144E+02  0.142E+01  0.165E-03  0.244E-05    1  24  94    1  34  96   10  23 103    0.000    0.000       0
+  0    364 00:27:38.30   4.5400A   9.9216  -7.2397   6.0583  0.312  0.99  -0.238    600.  0.144E+02  0.142E+01  0.167E-03  0.245E-05    1  24  94    1  34  96    9  23 104    0.000    0.000       0
+  0    365 00:27:42.97   4.6700A   9.6351  -6.8226   6.1516  0.312  0.99  -0.239    600.  0.144E+02  0.142E+01  0.171E-03  0.250E-05    1  23  95    1  34  96    8  24 102    0.000    0.000       0
+  0    366 00:27:47.50   4.5300A   9.9370  -6.6053   6.1051  0.312  0.99  -0.242    600.  0.144E+02  0.142E+01  0.166E-03  0.243E-05    1  23  95    1  33  96    8  24 102    0.000    0.000       0
+  0    367 00:27:52.10   4.6000A   9.7903  -6.7727   6.1321  0.312  0.99  -0.239    600.  0.144E+02  0.141E+01  0.169E-03  0.244E-05    1  23  95    1  34  97   10  23 104    0.000    0.000       0
+  0    368 00:27:56.75   4.6500A   9.6700  -6.9584   5.9948  0.312  0.99  -0.240    600.  0.144E+02  0.141E+01  0.171E-03  0.246E-05    1  23  96    1  34  97   11  23 104    0.000    0.000       0
+  0    369 00:28:01.36   4.6100A   9.7552  -6.6553   6.3196  0.312  0.99  -0.244    600.  0.144E+02  0.141E+01  0.169E-03  0.243E-05    1  23  96    1  34  97   11  23 104    0.000    0.000       0
+  0    370 00:28:06.15   4.7900A   9.3882  -6.3585   6.2961  0.312  0.99  -0.243    600.  0.144E+02  0.141E+01  0.175E-03  0.251E-05    1  23  96   13  35  52   11  23 104    0.000    0.000       0
+  0    371 00:28:10.85   4.7000A   9.5835  -6.4392   5.9382  0.312  0.99  -0.246    600.  0.144E+02  0.141E+01  0.172E-03  0.248E-05    1  23  97    1  33  97   11  23 104    0.000    0.000       0
+  0    372 00:28:15.71   4.8600A   9.2574  -6.9227   5.8075  0.312  0.99  -0.241    600.  0.144E+02  0.140E+01  0.178E-03  0.255E-05    1  23  97    1  39  99    7  72 154    0.000    0.000       0
+  0    373 00:28:20.47   4.7600A   9.4555  -6.8326   5.6400  0.312  0.99  -0.242    600.  0.144E+02  0.140E+01  0.174E-03  0.251E-05    1  23  98    1  39  99   12  23 104    0.000    0.000       0
+  0    374 00:28:25.32   4.8500A   9.2765  -6.4635   5.8121  0.312  0.99  -0.242    600.  0.144E+02  0.140E+01  0.177E-03  0.254E-05    1  23  98   12  34  52    7  72 155    0.000    0.000       0
+  0    375 00:28:30.39   5.0700A   8.8817  -6.6373   5.8814  0.312  0.99  -0.241    600.  0.144E+02  0.140E+01  0.185E-03  0.264E-05    1  23  99   14  35  53    9  72 155    0.000    0.000       0
+  0    376 00:28:35.40   5.0100A   8.9735  -7.0167   6.1718  0.312  0.99  -0.242    600.  0.144E+02  0.139E+01  0.182E-03  0.261E-05    1  23  99   14  35  53    9  72 155    0.000    0.000       0
+  0    377 00:28:40.50   5.1000A   8.8281  -7.2290   5.9416  0.312  0.99  -0.242    600.  0.144E+02  0.139E+01  0.185E-03  0.263E-05    8   6  97   14  35  53    8  22 104    0.000    0.000       0
+  0    378 00:28:45.56   5.0600A   8.8848  -7.1951   6.2036  0.312  0.99  -0.245    600.  0.144E+02  0.139E+01  0.184E-03  0.260E-05    8   6  98   14  35  53    8  21 106    0.000    0.000       0
+  0    379 00:28:50.68   5.1200A   8.7876  -6.9029   6.3267  0.312  0.99  -0.250    600.  0.143E+02  0.139E+01  0.186E-03  0.261E-05    8   6  99   14  35  53    8  21 106    0.000    0.000       0
+  0    380 00:28:55.77   5.0900A   8.8478  -6.4432   6.4931  0.312  0.99  -0.252    600.  0.143E+02  0.139E+01  0.185E-03  0.258E-05    8   6  99   15  36  54    8  22 105    0.000    0.000       0
+  0    381 00:29:00.89   5.1200A   8.7921  -6.3606   6.2534  0.312  0.99  -0.251    600.  0.143E+02  0.138E+01  0.185E-03  0.258E-05    8   6 100   14  34  54    8  22 105    0.000    0.000       0
+  0    382 00:29:06.07   5.1800A   8.6806  -6.3061   6.4511  0.312  0.99  -0.253    600.  0.143E+02  0.138E+01  0.187E-03  0.260E-05    8   6 100   14  34  54    9  22 105    0.000    0.000       0
+  0    383 00:29:11.22   5.1500A   8.7367  -6.2277   6.5979  0.312  0.99  -0.248    600.  0.143E+02  0.138E+01  0.186E-03  0.257E-05    8   6 101   13  34  53    9  22 105    0.000    0.000       0
+  0    384 00:29:16.42   5.2000A   8.6508  -6.3722   6.2624  0.312  0.96  -0.248    550.  0.143E+02  0.138E+01  0.188E-03  0.258E-05    3   3  83   14  33  55    9  22 105    0.000    0.000       0
+  0    385 00:29:21.59   5.1700A   8.7085  -6.3308   5.6246  0.312  0.96  -0.248    550.  0.143E+02  0.137E+01  0.187E-03  0.258E-05    3   3  84   14  32  55    9  22 105    0.000    0.000       0
+  0    386 00:29:26.73   5.1400A   8.7490  -6.5079   5.3760  0.312  0.96  -0.249    550.  0.143E+02  0.137E+01  0.186E-03  0.257E-05    3   3  85   14  32  55    9  22 106    0.000    0.000       0
+  0    387 00:29:31.86   5.1300A   8.7767  -6.2559   5.6949  0.312  0.96  -0.253    550.  0.143E+02  0.137E+01  0.185E-03  0.258E-05    3   3  86   14  32  55   10  23 105    0.000    0.000       0
+  0    388 00:29:36.96   5.1000A   8.8197  -6.0321   5.7912  0.312  0.96  -0.256    550.  0.143E+02  0.136E+01  0.184E-03  0.257E-05    3   3  87   10  33  51   10  23 105    0.000    0.000       0
+  0    389 00:29:42.03   5.0700A   8.8709  -5.9351   5.5911  0.312  0.96  -0.252    550.  0.143E+02  0.136E+01  0.183E-03  0.255E-05    3   3  87   10  33  51   10  23 105    0.000    0.000       0
+  0    390 00:29:47.13   5.1000A   8.8262  -5.8343   5.1534  0.312  0.96  -0.248    550.  0.143E+02  0.136E+01  0.183E-03  0.256E-05    3   3  88   10  33  51   10  23 105    0.000    0.000       0
+  0    391 00:29:52.22   5.0900A   8.8429  -5.9734   4.8470  0.312  0.96  -0.245    550.  0.143E+02  0.136E+01  0.183E-03  0.255E-05    3   3  89   11  34  51    8  56  22    0.000    0.000       0
+  0    392 00:29:57.30   5.0800A   8.8668  -6.1158   4.7562  0.312  0.96  -0.244    550.  0.143E+02  0.135E+01  0.182E-03  0.254E-05    3   3  90   11  34  51    8  56  22    0.000    0.000       0
+  0    393 00:30:02.38   5.0800A   8.8660  -6.2008   4.4841  0.312  0.96  -0.245    550.  0.143E+02  0.135E+01  0.182E-03  0.253E-05    7   9 103   12  34  52    8  56  22    0.000    0.000       0
+  0    394 00:30:07.28   4.9000A   9.1868  -6.2021   4.4811  0.312  0.96  -0.251    550.  0.143E+02  0.135E+01  0.176E-03  0.244E-05   13   0 111   12  34  52    7  56  24    0.000    0.000       0
+  0    395 00:30:12.26   4.9800A   9.0290  -6.2266   4.7897  0.312  0.96  -0.249    550.  0.143E+02  0.135E+01  0.178E-03  0.246E-05   13   0 111   11  33  52    8  56  24    0.000    0.000       0
+  0    396 00:30:17.30   5.0400A   8.9316  -6.3037   4.8338  0.312  0.96  -0.252    550.  0.142E+02  0.134E+01  0.180E-03  0.248E-05    7   9 105   11  33  52    8  56  24    0.000    0.000       0
+  0    397 00:30:22.31   5.0100A   8.9795  -6.3292   4.6057  0.312  0.96  -0.249    550.  0.142E+02  0.134E+01  0.179E-03  0.247E-05    7   9 105   11  33  52    8  56  24    0.000    0.000       0
+  0    398 00:30:27.36   5.0500A   8.9031  -6.3218   4.6369  0.312  0.96  -0.251    550.  0.142E+02  0.134E+01  0.180E-03  0.247E-05    7   9 106   11  33  52    8  56  25    0.000    0.000       0
+  0    399 00:30:32.43   5.0700A   8.8685  -6.3002   4.7634  0.312  0.87  -0.248    400.  0.142E+02  0.133E+01  0.181E-03  0.247E-05    7   9 106   11  33  52    9  56  25    0.000    0.000       0
+  0    400 00:30:37.51   5.0800A   8.8554  -6.2696   4.8639  0.312  0.87  -0.248    400.  0.142E+02  0.133E+01  0.181E-03  0.247E-05    4   4  83   11  33  52    9  56  25    0.000    0.000       0
+  0    401 00:30:42.58   5.0700A   8.8823  -6.2161   4.8738  0.312  0.87  -0.258    400.  0.142E+02  0.133E+01  0.181E-03  0.247E-05    4   4  83   11  33  52   10  57  26    0.000    0.000       0
+  0    402 00:30:47.63   5.0500A   8.9026  -6.1150   5.3238  0.312  0.87  -0.247    400.  0.142E+02  0.133E+01  0.180E-03  0.245E-05    4   4  85   11  33  52   10  57  26    0.000    0.000       0
+  0    403 00:30:52.64   5.0100A   8.9854  -6.2056   5.4427  0.311  0.87  -0.248    400.  0.142E+02  0.132E+01  0.178E-03  0.243E-05    4   4  85   15  35  54   10  57  26    0.000    0.000       0
+  0    404 00:30:57.62   4.9800A   9.0381  -6.2794   5.2251  0.311  0.87  -0.249    400.  0.142E+02  0.132E+01  0.177E-03  0.240E-05    4   4  86   15  35  54   10  57  26    0.000    0.000       0
+  0    405 00:31:02.59   4.9700A   9.0557  -6.2851   4.8592  0.311  0.87  -0.253    400.  0.142E+02  0.132E+01  0.176E-03  0.238E-05    4   4  86   15  35  54   11  57  27    0.000    0.000       0
+  0    406 00:31:07.53   4.9400A   9.1056  -6.2555   5.0425  0.311  0.87  -0.251    400.  0.142E+02  0.131E+01  0.175E-03  0.236E-05    4   4  88   15  35  54   12  57  27    0.000    0.000       0
+  0    407 00:31:12.46   4.9300A   9.1355  -6.2237   5.2316  0.311  0.87  -0.252    400.  0.142E+02  0.131E+01  0.175E-03  0.235E-05    4   4  88   15  35  54   12  57  27    0.000    0.000       0
+  0    408 00:31:17.32   4.8600A   9.2674  -6.2069   5.0534  0.311  0.87  -0.252    400.  0.142E+02  0.131E+01  0.172E-03  0.232E-05    4   4  89   15  35  54   12  57  27    0.000    0.000       0
+  0    409 00:31:22.19   4.8700A   9.2466  -6.2035   4.5866  0.311  0.87  -0.251    400.  0.142E+02  0.130E+01  0.172E-03  0.232E-05    4   4  90   15  35  54   12  57  27    0.000    0.000       0
+  0    410 00:31:27.04   4.8500A   9.2778  -6.1992   4.3341  0.311  0.87  -0.252    400.  0.142E+02  0.130E+01  0.171E-03  0.232E-05    4   4  91   15  35  54   13  57  28    0.000    0.000       0
+  0    411 00:31:31.80   4.7600A   9.4499  -6.2436   4.6534  0.311  0.87  -0.253    400.  0.142E+02  0.130E+01  0.168E-03  0.229E-05    4   4  91   17  37  55   13  57  28    0.000    0.000       0
+  0    412 00:31:36.55   4.7500A   9.4737  -6.3792   4.5640  0.311  0.83  -0.256    350.  0.141E+02  0.130E+01  0.167E-03  0.229E-05    4   4  92   17  37  55   13  57  28    0.000    0.000       0
+  0    413 00:31:41.27   4.7200A   9.5288  -6.5162   4.1282  0.311  0.83  -0.260    350.  0.141E+02  0.129E+01  0.166E-03  0.227E-05    4   4  92   17  37  55   13  57  28    0.000    0.000       0
+  0    414 00:31:45.97   4.7000A   9.5715  -6.6431   4.3184  0.311  0.83  -0.256    350.  0.141E+02  0.129E+01  0.166E-03  0.226E-05    4   4  93   17  37  55    8  53  31    0.000    0.000       0
+  0    415 00:31:50.70   4.7300A   9.5134  -6.7447   4.3587  0.311  0.83  -0.257    350.  0.141E+02  0.129E+01  0.167E-03  0.227E-05    4   4  94   17  37  55    8  53  31    0.000    0.000       0
+  0    416 00:31:55.36   4.6600A   9.6486  -6.8063   4.1966  0.311  0.83  -0.266    350.  0.141E+02  0.129E+01  0.164E-03  0.224E-05    4   4  94   17  37  55    8  53  31    0.000    0.000       0
+  0    417 00:32:00.05   4.6900A   9.6019  -6.8214   4.4028  0.311  0.83  -0.259    350.  0.141E+02  0.128E+01  0.165E-03  0.225E-05    4   4  95   17  37  55    6  30 101    0.000    0.000       0
+  0    418 00:32:04.76   4.7100A   9.5528  -6.7847   4.4337  0.311  0.83  -0.261    350.  0.141E+02  0.128E+01  0.166E-03  0.226E-05    4   4  95   17  37  55    6  30 101    0.000    0.000       0
+  0    419 00:32:09.45   4.6900A   9.5976  -6.7036   4.7020  0.311  0.83  -0.261    350.  0.141E+02  0.128E+01  0.165E-03  0.225E-05    4   4  96   17  37  55    7  22 126    0.000    0.000       0
+  0    420 00:32:14.18   4.7300A   9.5127  -6.5938   4.8248  0.311  0.83  -0.257    350.  0.141E+02  0.128E+01  0.166E-03  0.226E-05    4   4  97   17  37  55    7  22 126    0.000    0.000       0
+  0    421 00:32:18.93   4.7500A   9.4787  -6.4685   4.6346  0.311  0.83  -0.258    350.  0.141E+02  0.127E+01  0.166E-03  0.227E-05    5   2  98   17  37  55    7  22 126    0.000    0.000       0
+  0    422 00:32:23.65   4.7200A   9.5259  -6.3447   4.4731  0.311  0.83  -0.258    350.  0.141E+02  0.127E+01  0.165E-03  0.226E-05    5   2  99   17  37  55   19  42  57    0.000    0.000       0
+  0    423 00:32:28.33   4.6800A   9.6244  -6.2357   4.5217  0.311  0.83  -0.264    350.  0.141E+02  0.127E+01  0.163E-03  0.224E-05    5   2  99   17  37  55   19  42  57    0.000    0.000       0
+  0    424 00:32:32***   4.6700A   9.6392  -6.1466   4.5495  0.311  0.83  -0.261    350.  0.141E+02  0.126E+01  0.163E-03  0.224E-05    5   2 100   17  37  55   19  42  57    0.000    0.000       0
+  0    425 00:32:37.71   4.7100A   9.5581  -6.0786   4.5526  0.311  0.93  -0.260    500.  0.141E+02  0.126E+01  0.164E-03  0.226E-05    5   2 100   17  37  55   19  42  57    0.000    0.000       0
+  0    426 00:32:42.40   4.6900A   9.5848  -6.0468   4.5315  0.311  0.93  -0.266    500.  0.141E+02  0.126E+01  0.163E-03  0.225E-05    5   2 101   15  36  54   19  42  57    0.000    0.000       0
+  0    427 00:32:47.12   4.7200A   9.5430  -6.2299   4.5518  0.311  0.93  -0.267    500.  0.141E+02  0.126E+01  0.164E-03  0.226E-05    5   2 102   16  37  54   11  53  34    0.000    0.000       0
+  0    428 00:32:51.93   4.8100A   9.3642  -6.4173   4.4513  0.311  0.93  -0.260    500.  0.141E+02  0.125E+01  0.167E-03  0.230E-05    5   2 102   16  37  54   19  42  57    0.000    0.000       0
+  0    429 00:32:56.76   4.8300A   9.3096  -6.5595   4.4078  0.311  0.93  -0.259    500.  0.140E+02  0.125E+01  0.167E-03  0.231E-05    5   2 103   16  37  54   19  42  57    0.000    0.000       0
+  0    430 00:33:01.66   4.9000A   9.1879  -6.6282   4.3800  0.311  0.93  -0.262    500.  0.140E+02  0.125E+01  0.169E-03  0.233E-05    6   0 105   16  37  54   19  42  57    0.000    0.000       0
+  0    431 00:33:06.58   4.9200A   9.1492  -6.6125   4.3714  0.311  0.83  -0.265    350.  0.140E+02  0.125E+01  0.169E-03  0.233E-05    6   0 106   16  37  54   19  42  57    0.000    0.000       0
+  0    432 00:33:11.51   4.9300A   9.1268  -6.5307   4.3874  0.311  0.79  -0.263    300.  0.140E+02  0.124E+01  0.170E-03  0.233E-05    6   0 106   16  37  54   19  42  57    0.000    0.000       0
+  0    433 00:33:16.48   4.9700A   9.0542  -6.4167   4.4242  0.311  0.79  -0.267    300.  0.140E+02  0.124E+01  0.171E-03  0.234E-05    3   4 107   16  37  54   19  42  57    0.000    0.000       0
+  0    434 00:33:21.50   5.0200A   8.9613  -6.3026   4.6249  0.311  0.79  -0.278    300.  0.140E+02  0.124E+01  0.172E-03  0.237E-05    3   4 107   16  37  54   12  52  36    0.000    0.000       0
+  0    435 00:33:26.51   5.0100A   8.9737  -6.2092   4.5851  0.311  0.79  -0.262    300.  0.140E+02  0.123E+01  0.172E-03  0.237E-05    6  79 107   16  37  54   12  52  36    0.000    0.000       0
+  0    436 00:33:31.53   5.0200A   8.9617  -6.1430   4.5775  0.311  0.79  -0.268    300.  0.140E+02  0.123E+01  0.172E-03  0.238E-05    3   3 108   16  37  54   19  42  57    0.000    0.000       0
+  0    437 00:33:36.49   4.9600A   9.0744  -6.0939   4.6175  0.311  0.79  -0.259    300.  0.140E+02  0.123E+01  0.170E-03  0.236E-05    3   4 110   16  37  54   19  42  57    0.000    0.000       0
+  0    438 00:33:41.50   5.0100A   8.9756  -6.0513   4.6459  0.311  0.79  -0.258    300.  0.140E+02  0.123E+01  0.171E-03  0.238E-05    3   4 110   16  37  54   19  42  57    0.000    0.000       0
+  0    439 00:33:46.48   4.9800A   9.0345  -6.0465   4.6572  0.311  0.79  -0.262    300.  0.140E+02  0.122E+01  0.170E-03  0.237E-05    3   4 111   17  37  55   19  42  57    0.000    0.000       0
+  0    440 00:33:51.51   5.0300A   8.9394  -6.1401   4.6605  0.311  0.79  -0.261    300.  0.140E+02  0.122E+01  0.172E-03  0.240E-05    6  78  93   17  37  55   19  42  57    0.000    0.000       0
+  0    441 00:33:56.53   5.0200A   8.9718  -6.1963   4.6561  0.311  0.79  -0.256    300.  0.140E+02  0.122E+01  0.172E-03  0.240E-05    3   4 113   17  37  55   19  42  57    0.000    0.000       0
+  0    442 00:34:01.56   5.0300A   8.9441  -6.2058   4.6542  0.311  0.79  -0.255    300.  0.140E+02  0.121E+01  0.172E-03  0.241E-05    6  78  96   17  37  55   19  42  57    0.000    0.000       0
+  0    443 00:34:06.56   5.0000A   8.9933  -6.1729   4.6569  0.310  0.79  -0.253    300.  0.140E+02  0.121E+01  0.171E-03  0.240E-05    3   4 114   17  37  55   19  42  57    0.000    0.000       0
+  0    444 00:34:11.60   5.0400A   8.9324  -6.1297   4.6674  0.310  0.79  -0.254    300.  0.140E+02  0.121E+01  0.172E-03  0.242E-05    6  77  95   16  36  54   19  42  57    0.000    0.000       0
+  0    445 00:34:16.60   5.0000A   8.9980  -6.1170   4.6808  0.310  0.79  -0.256    300.  0.139E+02  0.121E+01  0.170E-03  0.242E-05    6  79 117   16  36  54   19  42  57    0.000    0.000       0
+  0    446 00:34:21.58   4.9800A   9.0273  -6.0892   4.6975  0.310  0.79  -0.258    300.  0.139E+02  0.120E+01  0.169E-03  0.241E-05    6  79 118   16  36  54   19  42  57    0.000    0.000       0
+  0    447 00:34:26.53   4.9500A   9.0931   6.3850   4.7105  0.310  0.79  -0.257    300.  0.139E+02  0.120E+01  0.169E-03  0.239E-05    6  79 118   13   5 129   19  42  57    0.000    0.000       0
+  0    448 00:34:31.49   4.9600A   9.0685   6.7253   4.7166  0.310  0.79  -0.257    300.  0.139E+02  0.120E+01  0.169E-03  0.239E-05    6   2  92   13   5 129   19  42  57    0.000    0.000       0
+  0    449 00:34:36.39   4.9000A   9.1917   6.2056   4.7125  0.310  0.79  -0.257    300.  0.139E+02  0.120E+01  0.167E-03  0.236E-05    6   2  92   13   5 129   19  42  57    0.000    0.000       0
+  0    450 00:34:41.26   4.8700A   9.2340  -6.1016   4.7016  0.310  0.79  -0.258    300.  0.139E+02  0.119E+01  0.166E-03  0.233E-05    6   2  93   14  35  53   19  42  57    0.000    0.000       0
+  0    451 00:34:46.09   4.8300A   9.3215  -6.0856   4.6833  0.310  0.79  -0.255    300.  0.139E+02  0.119E+01  0.165E-03  0.231E-05    6   2  93   14  35  53   19  42  57    0.000    0.000       0
+  0    452 00:34:50.87   4.7800A   9.4115  -6.1736   4.6613  0.310  0.79  -0.256    300.  0.139E+02  0.119E+01  0.163E-03  0.229E-05    6   2  94   15  36  54   19  42  57    0.000    0.000       0
+  0    453 00:34:55.64   4.7700A   9.4314  -6.2554   4.6385  0.310  0.79  -0.259    300.  0.139E+02  0.119E+01  0.163E-03  0.228E-05    6   2  94   15  36  54   19  42  57    0.000    0.000       0
+  0    454 00:35:00.34   4.7000A   9.5698  -6.3058   4.6154  0.310  0.79  -0.254    300.  0.139E+02  0.118E+01  0.161E-03  0.225E-05    6   2  95   15  36  54   19  42  57    0.000    0.000       0
+  0    455 00:35:05.03   4.6900A   9.5854  -6.3156   4.5965  0.310  0.79  -0.256    300.  0.139E+02  0.118E+01  0.160E-03  0.225E-05    6   2  96   15  36  54   19  42  57    0.000    0.000       0
+  0    456 00:35:09.68   4.6500A   9.6871  -6.2782   4.5781  0.310  0.79  -0.257    300.  0.139E+02  0.118E+01  0.159E-03  0.223E-05    6   2  96   15  36  54   19  42  57    0.000    0.000       0
+  0    457 00:35:14.32   4.6400A   9.7028  -6.2026   4.5623  0.310  0.79  -0.261    300.  0.139E+02  0.118E+01  0.158E-03  0.222E-05    6   2  97   15  36  54   19  42  57    0.000    0.000       0
+  0    458 00:35:18.93   4.6100A   9.7593  -6.1229   4.5464  0.310  0.79  -0.269    300.  0.139E+02  0.117E+01  0.157E-03  0.220E-05    6   2  97   16  36  54   19  42  57    0.000    0.000       0
+  0    459 00:35:23.53   4.6000A   9.7749  -6.0566   4.5300  0.310  0.79  -0.259    300.  0.139E+02  0.117E+01  0.157E-03  0.219E-05    6   2  98   16  36  54   19  42  57    0.000    0.000       0
+  0    460 00:35:28.13   4.6000A   9.7844  -5.9594   4.5093  0.310  0.79  -0.258    300.  0.139E+02  0.117E+01  0.157E-03  0.217E-05    6   2  98   16  36  54   19  42  57    0.000    0.000       0
+  0    461 00:35:32.71   4.5800A   9.8159  -5.9288   4.4815  0.309  0.79  -0.255    300.  0.139E+02  0.117E+01  0.156E-03  0.215E-05    6   2  99   15  36  54   19  42  57    0.000    0.000       0
+  0    462 00:35:37.30   4.5900A   9.7958  -5.9711   4.4456  0.309  0.79  -0.252    300.  0.138E+02  0.116E+01  0.156E-03  0.215E-05    6   2  99   15  36  54   19  42  57    0.000    0.000       0
+  0    463 00:35:41.90   4.6000A   9.7925  -6.0738   4.3978  0.309  0.74  -0.252    250.  0.138E+02  0.116E+01  0.157E-03  0.215E-05    6   2 100   15  36  54   19  42  57    0.000    0.000       0
+  0    464 00:35:46.51   4.6100A   9.7615  -6.2286   4.3380  0.309  0.74  -0.252    250.  0.138E+02  0.116E+01  0.157E-03  0.217E-05    6   2 100   15  36  54   19  42  57    0.000    0.000       0
+  0    465 00:35:51.13   4.6200A   9.7475  -6.4143   4.2665  0.309  0.74  -0.253    250.  0.138E+02  0.116E+01  0.157E-03  0.219E-05    6   2 101   15  36  54   19  42  57    0.000    0.000       0
+  0    466 00:35:55.74   4.6100A   9.7641  -6.5941   4.1848  0.309  0.74  -0.251    250.  0.138E+02  0.116E+01  0.157E-03  0.220E-05    6   2 105   15  36  54   19  42  57    0.000    0.000       0
+  0    467 00:36:00.35   4.6100A   9.7661  -6.7145   4.1037  0.309  0.74  -0.251    250.  0.138E+02  0.115E+01  0.157E-03  0.221E-05    6   1 102   15  36  54    3  33  97    0.000    0.000       0
+  0    468 00:36:04.95   4.6000A   9.7833  -6.7194   4.1039  0.309  0.74  -0.251    250.  0.138E+02  0.115E+01  0.156E-03  0.222E-05    6   2 106   15  36  54    3  33  97    0.000    0.000       0
+  0    469 00:36:09.52   4.5700A   9.8535  -6.8289   4.0451  0.309  0.74  -0.249    250.  0.138E+02  0.115E+01  0.155E-03  0.221E-05    6   1 103   15  35  54   19  40  56    0.000    0.000       0
+  0    470 00:36:14.11   4.5900A   9.8072  -6.9586   4.0516  0.309  0.74  -0.253    250.  0.138E+02  0.115E+01  0.156E-03  0.222E-05    6   1 104   15  35  54   19  40  56    0.000    0.000       0
+  0    471 00:36:18.65   4.5400A   9.9134  -6.8207   4.0391  0.309  0.74  -0.255    250.  0.138E+02  0.114E+01  0.154E-03  0.220E-05    6   1 104   15  35  54   19  40  56    0.000    0.000       0
+  0    472 00:36:23.15   4.5000A  10.0100  -6.4440   4.0717  0.309  0.74  -0.249    250.  0.138E+02  0.114E+01  0.153E-03  0.218E-05    6   1 105   15  35  54    4  33  98    0.000    0.000       0
+  0    473 00:36:27.63   4.4800A  10.0452  -6.2578   4.0367  0.309  0.74  -0.250    250.  0.138E+02  0.114E+01  0.152E-03  0.217E-05    6   1 105   17  37  55    4  33  98    0.000    0.000       0
+  0    474 00:36:32.05   4.4200A  10.1852  -6.3222  -3.9854  0.309  0.74  -0.248    250.  0.138E+02  0.114E+01  0.150E-03  0.216E-05    6   1 106   17  37  55   15  45  55    0.000    0.000       0
+  0    475 00:36:36.48   4.4300A  10.1560  -6.3771  -4.0290  0.309  0.74  -0.250    250.  0.138E+02  0.114E+01  0.150E-03  0.217E-05    6   1 106   17  37  55   15  45  55    0.000    0.000       0
+  0    476 00:36:40.85   4.3700A  10.3000  -6.4253  -4.0062  0.309  0.74  -0.248    250.  0.138E+02  0.113E+01  0.148E-03  0.216E-05    6   1 107   17  37  55   15  45  55    0.000    0.000       0
+  0    477 00:36:45.27   4.4200A  10.1914  -6.4687  -3.9181  0.309  0.74  -0.247    250.  0.138E+02  0.113E+01  0.149E-03  0.219E-05    6   1 108   17  37  55   15  45  55    0.000    0.000       0
+  0    478 00:36:49.58   4.3100A  10.4376  -6.4975   3.9113  0.309  0.74  -0.248    250.  0.138E+02  0.113E+01  0.146E-03  0.216E-05    6   1 108   17  37  55   19  42  57    0.000    0.000       0
+  0    479 00:36:53.93   4.3500A  10.3560  -6.5107   3.9897  0.309  0.74  -0.261    250.  0.138E+02  0.113E+01  0.147E-03  0.220E-05    6   1 109   17  37  55   19  42  57    0.000    0.000       0
+  0    480 00:36:58.19   4.2600A  10.5688  -6.4981   4.0667  0.308  0.74  -0.249    250.  0.138E+02  0.113E+01  0.144E-03  0.218E-05    6   1 109   17  37  55   19  42  57    0.000    0.000       0
+  0    481 00:37:02.54   4.3500A  10.3496  -6.4694   4.1461  0.308  0.74  -0.251    250.  0.138E+02  0.112E+01  0.147E-03  0.225E-05    6   1 110   17  37  55   19  42  57    0.000    0.000       0
+  0    482 00:37:06.81   4.2700A  10.5327  -6.5180   4.2199  0.308  0.74  -0.247    250.  0.137E+02  0.112E+01  0.145E-03  0.225E-05    6   1 110   13  35  52   19  42  57    0.000    0.000       0
+  0    483 00:37:11.16   4.3500A  10.3363  -6.7264   4.2962  0.308  0.74  -0.246    250.  0.137E+02  0.112E+01  0.147E-03  0.230E-05    6   1 111   13  35  52   19  42  57    0.000    0.000       0
+  0    484 00:37:15.48   4.3200A  10.4282  -6.7661   4.3682  0.308  0.79  -0.247    300.  0.137E+02  0.112E+01  0.146E-03  0.231E-05    6   1 111   13  35  52   19  42  57    0.000    0.000       0
+  0    485 00:37:19.84   4.3600A  10.3316  -6.6447   4.4427  0.308  0.79  -0.249    300.  0.137E+02  0.112E+01  0.147E-03  0.235E-05    6   1 112   13  35  52   19  42  57    0.000    0.000       0
+  0    486 00:37:24.20   4.3600A  10.3159  -6.5379   4.5154  0.308  0.79  -0.249    300.  0.137E+02  0.111E+01  0.147E-03  0.236E-05    6   1 112   12  34  52   19  42  57    0.000    0.000       0
+  0    487 00:37:28.60   4.4000A  10.2236  -6.7232   4.5879  0.308  0.79  -0.244    300.  0.137E+02  0.111E+01  0.148E-03  0.238E-05    6   1 113   13  34  53   19  42  57    0.000    0.000       0
+  0    488 00:37:33.06   4.4600A  10.1001  -6.8511   4.6564  0.308  0.79  -0.243    300.  0.137E+02  0.111E+01  0.150E-03  0.242E-05    6   1 113   13  34  53   19  42  57    0.000    0.000       0
+  0    489 00:37:37.53   4.4700A  10.0743  -6.8172   4.7185  0.308  0.79  -0.243    300.  0.137E+02  0.111E+01  0.150E-03  0.242E-05    6   1 114   13  34  53   19  42  57    0.000    0.000       0
+  0    490 00:37:42.02   4.4900A  10.0126  -6.6641   4.7723  0.308  0.79  -0.244    300.  0.137E+02  0.111E+01  0.151E-03  0.244E-05    5   1 115   13  34  53   19  42  57    0.000    0.000       0
+  0    491 00:37:46.58   4.5600A   9.8700  -6.4850   4.8126  0.308  0.79  -0.244    300.  0.137E+02  0.110E+01  0.153E-03  0.248E-05    6   1 115   13  34  53   19  42  57    0.000    0.000       0
+  0    492 00:37:51.10   4.5200A   9.9557  -6.3736   4.8347  0.308  0.79  -0.249    300.  0.137E+02  0.110E+01  0.151E-03  0.248E-05    5   1 116   13  34  53   19  42  57    0.000    0.000       0
+  0    493 00:37:55.66   4.5600A   9.8723  -6.7250   4.8427  0.307  0.79  -0.244    300.  0.137E+02  0.110E+01  0.152E-03  0.251E-05    5   1 117   13  35  52   19  42  57    0.000    0.000       0
+  0    494 00:38:00.24   4.5800A   9.8235  -7.0955   4.8311  0.307  0.79  -0.244    300.  0.137E+02  0.110E+01  0.153E-03  0.255E-05    5   1 117   13  35  52   19  42  57    0.000    0.000       0
+  0    495 00:38:04.81   4.5700A   9.8513  -7.3662   4.8059  0.307  0.79  -0.241    300.  0.137E+02  0.110E+01  0.152E-03  0.256E-05    5   1 118   13  35  52   19  42  57    0.000    0.000       0
+  0    496 00:38:09.43   4.6200A   9.7366  -7.4674   4.7732  0.307  0.79  -0.240    300.  0.137E+02  0.110E+01  0.154E-03  0.260E-05    5   1 119   13  35  52   19  42  57    0.000    0.000       0
+  0    497 00:38:14.01   4.5800A   9.8165  -7.3651   4.7361  0.307  0.79  -0.242    300.  0.137E+02  0.109E+01  0.153E-03  0.259E-05    5   0 120   13  35  52   19  42  57    0.000    0.000       0
+  0    498 00:38:18.61   4.6000A   9.7720  -7.0765   4.7077  0.307  0.79  -0.240    300.  0.137E+02  0.109E+01  0.153E-03  0.259E-05    5   0 121   13  35  52   19  42  57    0.000    0.000       0
+  0    499 00:38:23.20   4.5900A   9.8124  -6.8633   4.6892  0.307  0.79  -0.240    300.  0.137E+02  0.109E+01  0.153E-03  0.258E-05    5   0 121   13  34  53   19  42  57    0.000    0.000       0
+  0    500 00:38:27.78   4.5800A   9.8293  -6.9025   4.6887  0.307  0.79  -0.241    300.  0.137E+02  0.109E+01  0.152E-03  0.258E-05    5   0 122   14  35  53   19  42  57    0.000    0.000       0
+  0    501 00:38:32.41   4.6300A   9.7223  -7.2022   4.7083  0.307  0.79  -0.247    300.  0.137E+02  0.109E+01  0.154E-03  0.260E-05    5   0 122   14  35  53   19  42  57    0.000    0.000       0
+  0    502 00:38:36.99   4.5800A   9.8228  -7.4285   4.7473  0.307  0.79  -0.240    300.  0.136E+02  0.109E+01  0.152E-03  0.258E-05    5   0 123   14  35  53   19  42  57    0.000    0.000       0
+  0    503 00:38:41.68   4.6900A   9.5893  -7.5470   4.8074  0.307  0.79  -0.239    300.  0.136E+02  0.108E+01  0.156E-03  0.264E-05    5   0 124   14  35  53   19  42  57    0.000    0.000       0
+  0    504 00:38:46.30   4.6200A   9.7357  -7.5568   4.8794  0.307  0.79  -0.238    300.  0.136E+02  0.108E+01  0.153E-03  0.261E-05    5   0 124   14  35  53   19  42  57    0.000    0.000       0
+  0    505 00:38:50.99   4.6900A   9.5966  -7.4860   4.9636  0.307  0.79  -0.237    300.  0.136E+02  0.108E+01  0.155E-03  0.265E-05    5   0 125   14  35  53   19  42  57    0.000    0.000       0
+  0    506 00:38:55.68   4.6900A   9.5963  -7.3677   5.0458  0.306  0.79  -0.236    300.  0.136E+02  0.108E+01  0.155E-03  0.265E-05    5   0 125   14  35  53   19  42  57    0.000    0.000       0
+  0    507 00:39:00.40   4.7200A   9.5359  -7.2326   5.1210  0.306  0.79  -0.236    300.  0.136E+02  0.108E+01  0.156E-03  0.267E-05    5   0 126   14  35  53   19  42  57    0.000    0.000       0
+  0    508 00:39:05.18   4.7800A   9.4161  -7.0965   5.1778  0.306  0.79  -0.236    300.  0.136E+02  0.108E+01  0.158E-03  0.271E-05    5   0 126   14  35  53   19  42  57    0.000    0.000       0
+  0    509 00:39:09.98   4.8000A   9.3675  -7.0427   5.2072  0.306  0.79  -0.235    300.  0.136E+02  0.108E+01  0.159E-03  0.273E-05    5   0 127   11  33  52   19  42  57    0.000    0.000       0
+  0    510 00:39:14.90   4.9200A   9.1491  -7.0976   5.2041  0.306  0.79  -0.234    300.  0.136E+02  0.108E+01  0.162E-03  0.280E-05    5   0 127   11  33  52   19  42  57    0.000    0.000       0
+  0    511 00:39:19.83   4.9300A   9.1351  -7.0785   5.1584  0.306  0.83  -0.234    350.  0.136E+02  0.108E+01  0.163E-03  0.282E-05    5   0 128   11  33  52   19  42  57    0.000    0.000       0
+  0    512 00:39:24.88   5.0500A   8.9071  -6.9327   5.0775  0.306  0.83  -0.232    350.  0.136E+02  0.107E+01  0.166E-03  0.290E-05    5   0 129   11  33  52   19  42  57    0.000    0.000       0
+  0    513 00:39:29.97   5.0900A   8.8394  -6.8731   4.9573  0.305  0.83  -0.232    350.  0.136E+02  0.107E+01  0.168E-03  0.294E-05    5   0 129   13  34  53   19  42  57    0.000    0.000       0
+  0    514 00:39:35.11   5.1400A   8.7610  -6.9749   4.8154  0.305  0.83  -0.231    350.  0.136E+02  0.107E+01  0.169E-03  0.299E-05    4   3 126   13  34  53   19  42  57    0.000    0.000       0
+  0    515 00:39:40.32   5.2100A   8.6371  -6.9858   4.6631  0.305  0.83  -0.232    350.  0.136E+02  0.107E+01  0.171E-03  0.305E-05    4   2 126   13  34  53   19  42  57    0.000    0.000       0
+  0    516 00:39:45.42   5.1000A   8.8173  -7.0518   4.5146  0.305  0.83  -0.235    350.  0.136E+02  0.107E+01  0.167E-03  0.300E-05    4   2 127   15  36  54   19  42  57    0.000    0.000       0
+  0    517 00:39:50.63   5.2100A   8.6442  -7.0765   4.3976  0.305  0.83  -0.240    350.  0.136E+02  0.107E+01  0.170E-03  0.307E-05    4   2 128   15  36  54   19  42  57    0.000    0.000       0
+  0    518 00:39:55.73   5.1000A   8.8152  -6.9826   4.3053  0.305  0.83  -0.234    350.  0.136E+02  0.107E+01  0.167E-03  0.302E-05    4   2 128   15  36  54   19  42  57    0.000    0.000       0
+  0    519 00:40:00.83   5.1000A   8.8302  -6.8361   4.2639  0.304  0.83  -0.236    350.  0.136E+02  0.107E+01  0.166E-03  0.300E-05   14  48  73   15  36  54   19  42  57    0.000    0.000       0
+  0    520 00:40:06.03   5.2000A   8.6608  -6.6938   4.2635  0.304  0.83  -0.240    350.  0.136E+02  0.107E+01  0.169E-03  0.304E-05    4   2 129   15  36  54   19  42  57    0.000    0.000       0
+  0    521 00:40:11.23   5.2000A   8.6497  -6.6098   4.3020  0.304  0.83  -0.245    350.  0.136E+02  0.107E+01  0.169E-03  0.301E-05   14  48  74   15  36  54   19  42  57    0.000    0.000       0
+  0    522 00:40:16.50   5.2700A   8.5332  -6.6164   4.3792  0.304  0.87  -0.241    400.  0.135E+02  0.107E+01  0.171E-03  0.302E-05    4   3 130   15  36  54   19  42  57    0.000    0.000       0
+  0    523 00:40:21.74   5.2400A   8.5896  -6.6967   4.4788  0.303  0.87  -0.245    400.  0.135E+02  0.107E+01  0.170E-03  0.298E-05    4   2 131   15  36  54   19  42  57    0.000    0.000       0
+  0    524 00:40:27.10   5.3600A   8.3922  -6.8084   4.5886  0.303  0.87  -0.241    400.  0.135E+02  0.107E+01  0.173E-03  0.301E-05    4   2 131   15  36  54   19  42  57    0.000    0.000       0
+  0    525 00:40:32.31   5.2100A   8.6326  -6.8919   4.6864  0.303  0.87  -0.242    400.  0.135E+02  0.107E+01  0.169E-03  0.294E-05   14  48  77   15  36  54   19  42  57    0.000    0.000       0
+  0    526 00:40:37.77   5.4600A   8.2421  -6.9107   4.7670  0.303  0.87  -0.241    400.  0.135E+02  0.107E+01  0.176E-03  0.306E-05   14  48  77   15  36  54   19  42  57    0.000    0.000       0
+  0    527 00:40:43.22   5.4500A   8.2547  -6.8431   4.8055  0.303  0.87  -0.248    400.  0.135E+02  0.107E+01  0.175E-03  0.307E-05    4   2 133   15  36  54   19  42  57    0.000    0.000       0
+  0    528 00:40:48.66   5.4400A   8.2731  -6.7208   4.8170  0.302  0.87  -0.240    400.  0.135E+02  0.106E+01  0.175E-03  0.306E-05    3  10 128   15  36  54   19  42  57    0.000    0.000       0
+  0    529 00:40:54.19   5.5300A   8.1308  -6.8455   4.8018  0.302  0.87  -0.238    400.  0.135E+02  0.106E+01  0.177E-03  0.310E-05    3  10 129   16  37  54   19  42  57    0.000    0.000       0
+  0    530 00:40:59.67   5.4800A   8.2122  -6.9158   4.7644  0.302  0.87  -0.239    400.  0.135E+02  0.106E+01  0.176E-03  0.309E-05    3  10 129   16  37  54   19  42  57    0.000    0.000       0
+  0    531 00:41:05.18   5.5100A   8.1630  -6.8909   4.7247  0.302  0.87  -0.239    400.  0.135E+02  0.106E+01  0.177E-03  0.311E-05    3  10 130   16  37  54   19  42  57    0.000    0.000       0
+  0    532 00:41:10.77   5.5900A   8.0540  -6.7641   4.6851  0.302  0.87  -0.242    400.  0.135E+02  0.106E+01  0.179E-03  0.315E-05    2  12 128   16  37  54   19  42  57    0.000    0.000       0
+  0    533 00:41:16.35   5.5800A   8.0667  -6.5460   4.6518  0.301  0.83  -0.247    350.  0.135E+02  0.106E+01  0.179E-03  0.315E-05    2  12 128   16  37  54   19  42  57    0.000    0.000       0
+  0    534 00:41:21.90   5.5500A   8.1122  -6.4462   4.6328  0.301  0.90  -0.242    450.  0.135E+02  0.106E+01  0.177E-03  0.313E-05    2  12 129    5  32  46   19  42  57    0.000    0.000       0
+  0    535 00:41:27.38   5.4800A   8.2114  -6.6315   4.6248  0.301  0.90  -0.241    450.  0.135E+02  0.106E+01  0.175E-03  0.307E-05   15  49  81    5  32  46   19  42  57    0.000    0.000       0
+  0    536 00:41:32.71   5.3300A   8.4462  -6.6154   4.6242  0.301  0.90  -0.243    450.  0.135E+02  0.106E+01  0.170E-03  0.296E-05   15  49  81    5  32  46   19  42  57    0.000    0.000       0
+  0    537 00:41:38.04   5.3300A   8.4362  -6.5609   4.6284  0.301  0.90  -0.240    450.  0.135E+02  0.106E+01  0.170E-03  0.292E-05   15  49  82    5  31  46   19  42  57    0.000    0.000       0
+  0    538 00:41:43.24   5.2000A   8.6532  -6.6192   4.6260  0.300  0.90  -0.241    450.  0.135E+02  0.106E+01  0.166E-03  0.283E-05   15  49  82    5  31  46   19  42  57    0.000    0.000       0
+  0    539 00:41:48.61   5.3700A   8.3731  -6.6122   4.6237  0.300  0.90  -0.240    450.  0.135E+02  0.106E+01  0.171E-03  0.290E-05   15  49  83    5  30  47   19  42  57    0.000    0.000       0
+  0    540 00:41:53.80   5.1900A   8.6780  -6.7122   4.6082  0.300  0.90  -0.239    450.  0.135E+02  0.106E+01  0.165E-03  0.280E-05   15  49  83    5  30  47   19  42  57    0.000    0.000       0
+  0    541 00:41:59.27   5.4700A   8.2292  -6.8646   4.6014  0.300  0.90  -0.241    450.  0.135E+02  0.105E+01  0.173E-03  0.290E-05    5  20  71   15  35  54   19  42  57    0.000    0.000       0
+  0    542 00:42:04.70   5.4300A   8.2947  -7.0930   4.5836  0.300  0.90  -0.239    450.  0.135E+02  0.105E+01  0.172E-03  0.288E-05   15  49  84   15  35  54   19  42  57    0.000    0.000       0
+  0    543 00:42:10.23   5.5300A   8.1323  -7.1907   4.5825  0.299  0.90  -0.239    450.  0.134E+02  0.105E+01  0.175E-03  0.290E-05    4  21  74   15  35  54   19  42  57    0.000    0.000       0
+  0    544 00:42:15.62   5.3900A   8.3505  -7.0976   4.5920  0.299  0.90  -0.237    450.  0.134E+02  0.105E+01  0.171E-03  0.282E-05    4  21  74   15  35  54   19  42  57    0.000    0.000       0
+  0    545 00:42:21.04   5.4200A   8.2951  -6.8361   4.6233  0.299  0.90  -0.236    450.  0.134E+02  0.105E+01  0.172E-03  0.282E-05    6  17  70   16  37  54   19  42  57    0.000    0.000       0
+  0    546 00:42:26.47   5.4300A   8.2845  -6.8145   4.6622  0.299  0.90  -0.236    450.  0.134E+02  0.105E+01  0.172E-03  0.281E-05    4  20  74   16  37  54   19  42  57    0.000    0.000       0
+  0    547 00:42:31.81   5.3400A   8.4213  -6.7609   4.7038  0.299  0.87  -0.237    400.  0.134E+02  0.105E+01  0.169E-03  0.276E-05    4  20  76   16  37  54   19  42  57    0.000    0.000       0
+  0    548 00:42:37.06   5.2500A   8.5674  -6.6855   4.7393  0.298  0.87  -0.235    400.  0.134E+02  0.105E+01  0.166E-03  0.270E-05    6  16  71   16  37  54   19  42  57    0.000    0.000       0
+  0    549 00:42:42.23   5.1700A   8.7049  -6.5833   4.7563  0.298  0.87  -0.235    400.  0.134E+02  0.105E+01  0.164E-03  0.265E-05    6  16  72   16  37  54   19  42  57    0.000    0.000       0
+  0    550 00:42:47.32   5.0900A   8.8456  -6.4431   4.7492  0.298  0.87  -0.236    400.  0.134E+02  0.105E+01  0.161E-03  0.261E-05    6  16  73   16  37  54   19  42  57    0.000    0.000       0
+  0    551 00:42:52.38   5.0600A   8.8846  -6.2595   4.7196  0.298  0.87  -0.237    400.  0.134E+02  0.105E+01  0.160E-03  0.259E-05    6  16  74   16  37  54   19  42  57    0.000    0.000       0
+  0    552 00:42:57.47   5.0900A   8.8348  -6.4084   4.6724  0.298  0.87  -0.236    400.  0.134E+02  0.105E+01  0.161E-03  0.260E-05    6  16  75   14  35  53   19  42  57    0.000    0.000       0
+  0    553 00:43:02.57   5.1000A   8.8250  -6.4855   4.6167  0.297  0.87  -0.237    400.  0.134E+02  0.105E+01  0.161E-03  0.260E-05    6  16  76   14  35  53   19  42  57    0.000    0.000       0
+  0    554 00:43:07.65   5.0800A   8.8546  -6.4913   4.5685  0.297  0.87  -0.239    400.  0.134E+02  0.104E+01  0.160E-03  0.259E-05    6  16  77   14  35  53   19  42  57    0.000    0.000       0
+  0    555 00:43:12.79   5.1400A   8.7578  -6.4584   4.5407  0.297  0.87  -0.238    400.  0.134E+02  0.104E+01  0.162E-03  0.262E-05    6  16  77   14  35  53   19  42  57    0.000    0.000       0
+  0    556 00:43:17.96   5.1700A   8.7120  -6.4152   4.5383  0.297  0.87  -0.241    400.  0.134E+02  0.104E+01  0.163E-03  0.263E-05    6  16  78   14  35  53   19  42  57    0.000    0.000       0
+  0    557 00:43:23.14   5.1800A   8.6862  -6.3742   4.5686  0.297  0.87  -0.236    400.  0.134E+02  0.104E+01  0.164E-03  0.263E-05    3  20  81   14  35  53   19  42  57    0.000    0.000       0
+  0    558 00:43:28.29   5.1500A   8.7398  -6.3322   4.6293  0.296  0.87  -0.237    400.  0.134E+02  0.104E+01  0.163E-03  0.262E-05    3  20  81   14  35  53   19  42  57    0.000    0.000       0
+  0    559 00:43:33.40   5.1100A   8.8030  -6.2811   4.7110  0.296  0.87  -0.242    400.  0.134E+02  0.104E+01  0.162E-03  0.260E-05    3  20  82   14  35  53   19  42  57    0.000    0.000       0
+  0    560 00:43:38.46   5.0600A   8.8872  -6.2185   4.7977  0.296  0.87  -0.240    400.  0.134E+02  0.104E+01  0.160E-03  0.258E-05    3  20  82   14  35  53   19  42  57    0.000    0.000       0
+  0    561 00:43:43.52   5.0600A   8.8871  -6.1500   4.8719  0.296  0.87  -0.240    400.  0.134E+02  0.104E+01  0.160E-03  0.257E-05    3  20  82   14  35  53   19  42  57    0.000    0.000       0
+  0    562 00:43:48.55   5.0300A   8.9550  -6.0803   4.9166  0.295  0.87  -0.250    400.  0.134E+02  0.104E+01  0.160E-03  0.256E-05    3  20  83   14  35  53   19  42  57    0.000    0.000       0
+  0    563 00:43:53.55   5.0000A   8.9938  -6.0109   4.9237  0.295  0.87  -0.240    400.  0.134E+02  0.104E+01  0.159E-03  0.255E-05    3  20  83   14  35  53   19  42  57    0.000    0.000       0
+  0    564 00:43:58.58   5.0300A   8.9515  -5.9359   4.8900  0.295  0.87  -0.239    400.  0.134E+02  0.104E+01  0.159E-03  0.256E-05    3  20  83   14  35  53   19  42  57    0.000    0.000       0
+  0    565 00:44:03.60   5.0200A   8.9636  -5.8468   4.8168  0.295  0.87  -0.239    400.  0.134E+02  0.104E+01  0.159E-03  0.255E-05    3  20  84   14  35  53   19  42  57    0.000    0.000       0
+  0    566 00:44:08.63   5.0300A   8.9460  -5.9135   4.7194  0.294  0.87  -0.237    400.  0.133E+02  0.104E+01  0.159E-03  0.255E-05    3  20  84   14  32  55   19  42  57    0.000    0.000       0
+  0    567 00:44:13.70   5.0700A   8.8792  -5.8859   4.6113  0.294  0.87  -0.237    400.  0.133E+02  0.104E+01  0.160E-03  0.258E-05    5  15  84   14  32  55   19  42  57    0.000    0.000       0
+  0    568 00:44:18.80   5.1000A   8.8275  -5.7840   4.5065  0.294  0.87  -0.237    400.  0.133E+02  0.103E+01  0.161E-03  0.259E-05    3  20  85   15  36  54   19  42  57    0.000    0.000       0
+  0    569 00:44:23.92   5.1200A   8.7825  -5.8783   4.4180  0.294  0.87  -0.238    400.  0.133E+02  0.103E+01  0.161E-03  0.260E-05    5  15  85   15  36  54   19  42  57    0.000    0.000       0
+  0    570 00:44:28.99   5.0700A   8.8697  -5.9872   4.3545  0.293  0.87  -0.239    400.  0.133E+02  0.103E+01  0.160E-03  0.257E-05    3  19  83   15  36  54   19  42  57    0.000    0.000       0
+  0    571 00:44:34.06   5.0700A   8.8842  -6.0527   4.3222  0.293  0.87  -0.240    400.  0.133E+02  0.103E+01  0.160E-03  0.255E-05    3  19  83   15  36  54   19  42  57    0.000    0.000       0
+  0    572 00:44:39.07   5.0100A   8.9750  -6.0589   4.3154  0.293  0.87  -0.243    400.  0.133E+02  0.103E+01  0.158E-03  0.251E-05    3  19  84   15  35  54   19  42  57    0.000    0.000       0
+  0    573 00:44:44.08   5.0100A   8.9887  -6.1608   4.3318  0.292  0.87  -0.247    400.  0.133E+02  0.103E+01  0.158E-03  0.250E-05    3  19  84   15  35  54   19  42  57    0.000    0.000       0
+  0    574 00:44:49.11   5.0300A   8.9385  -6.0803   4.3600  0.292  0.87  -0.247    400.  0.133E+02  0.103E+01  0.159E-03  0.249E-05    3  19  85   15  35  54   19  42  57    0.000    0.000       0
+  0    575 00:44:54.13   5.0200A   8.9553  -5.9103   4.3919  0.292  0.87  -0.246    400.  0.133E+02  0.103E+01  0.158E-03  0.248E-05    3  19  87   17  37  55   19  42  57    0.000    0.000       0
+  0    576 00:44:59.16   5.0300A   8.9519  -5.8456   4.4201  0.292  0.87  -0.248    400.  0.133E+02  0.103E+01  0.159E-03  0.248E-05    3  19  87   17  37  55   19  42  57    0.000    0.000       0
+  0    577 00:45:04.19   5.0300A   8.9384  -5.7960   4.4362  0.291  0.87  -0.251    400.  0.133E+02  0.103E+01  0.158E-03  0.248E-05    3  19  88   17  37  55   19  42  57    0.000    0.000       0
+  0    578 00:45:09.23   5.0400A   8.9361  -5.7871   4.4382  0.291  0.87  -0.252    400.  0.133E+02  0.103E+01  0.159E-03  0.248E-05    3  19  88   17  37  55   19  42  57    0.000    0.000       0
+  0    579 00:45:14.32   5.0900A   8.8431  -5.8270   4.4273  0.291  0.87  -0.255    400.  0.133E+02  0.103E+01  0.160E-03  0.250E-05    3  19  89   17  37  55   19  42  57    0.000    0.000       0
+  0    580 00:45:19.31   4.9900A   9.0189  -5.9051   4.4081  0.291  0.87  -0.256    400.  0.133E+02  0.102E+01  0.157E-03  0.245E-05   14  51  88   17  37  55   19  42  57    0.000    0.000       0
+  0    581 00:45:24.42   5.1100A   8.8077  -5.9984   4.3959  0.290  0.87  -0.259    400.  0.133E+02  0.102E+01  0.160E-03  0.249E-05   14  51  88   17  37  55   19  42  57    0.000    0.000       0
+  0    582 00:45:29.50   5.0800A   8.8644  -6.0758   4.3864  0.290  0.87  -0.256    400.  0.133E+02  0.102E+01  0.159E-03  0.247E-05    2  19  83   17  37  55   19  42  57    0.000    0.000       0
+  0    583 00:45:34.58   5.0800A   8.8637  -6.2180   4.3970  0.290  0.87  -0.266    400.  0.133E+02  0.102E+01  0.159E-03  0.246E-05    2  19  84   15  35  54   19  42  57    0.000    0.000       0
+  0    584 00:45:39.62   5.0400A   8.9352  -6.4513   4.4261  0.290  0.87  -0.257    400.  0.133E+02  0.102E+01  0.158E-03  0.243E-05    2  19  84   15  35  54   19  42  57    0.000    0.000       0
+  0    585 00:45:44.70   5.0800A   8.8614  -6.5120   4.4749  0.289  0.87  -0.259    400.  0.133E+02  0.102E+01  0.159E-03  0.244E-05    2  19  84   15  35  54   19  42  57    0.000    0.000       0
+  0    586 00:45:49.76   5.0600A   8.8918  -6.3990   4.5376  0.289  0.87  -0.260    400.  0.133E+02  0.102E+01  0.158E-03  0.242E-05    2  19  85   15  35  54   19  42  57    0.000    0.000       0
+  0    587 00:45:54.88   5.1200A   8.7829  -6.1646   4.6118  0.289  0.87  -0.261    400.  0.133E+02  0.102E+01  0.160E-03  0.244E-05    2  19  85   15  35  54   19  42  57    0.000    0.000       0
+  0    588 00:46:00.02   5.1400A   8.7584  -5.8900   4.6865  0.289  0.87  -0.264    400.  0.133E+02  0.102E+01  0.160E-03  0.244E-05    2  19  86   17  37  55   19  42  57    0.000    0.000       0
+  0    589 00:46:05.16   5.1400A   8.7597  -5.8561   4.7557  0.288  0.87  -0.258    400.  0.133E+02  0.102E+01  0.160E-03  0.243E-05    2  18  86   17  37  55   19  42  57    0.000    0.000       0
+  0    590 00:46:10.31   5.1500A   8.7424  -5.8358   4.8135  0.288  0.93  -0.259    500.  0.133E+02  0.102E+01  0.160E-03  0.243E-05    2  18  86   17  37  55   19  42  57    0.000    0.000       0
+  0    591 00:46:15.49   5.1800A   8.6922  -5.8181   4.8583  0.288  0.93  -0.258    500.  0.132E+02  0.102E+01  0.161E-03  0.243E-05    2  18  87   17  37  55   19  42  57    0.000    0.000       0
+  0    592 00:46:20.64   5.1500A   8.7387  -5.7912   4.8927  0.288  0.93  -0.260    500.  0.132E+02  0.102E+01  0.160E-03  0.241E-05    2  18  89   17  37  55   19  42  57    0.000    0.000       0
+  0    593 00:46:25.79   5.1500A   8.7297  -5.7479   4.9220  0.287  0.93  -0.283    500.  0.132E+02  0.102E+01  0.160E-03  0.239E-05    2  18  89   17  37  55   19  42  57    0.000    0.000       0
+  0    594 00:46:30.95   5.1600A   8.7126  -5.7346   4.9458  0.287  0.93  -0.259    500.  0.132E+02  0.101E+01  0.160E-03  0.238E-05    2  18  90   16  36  54   19  42  57    0.000    0.000       0
+  0    595 00:46:36.11   5.1600A   8.7133  -5.7031   4.9630  0.287  0.93  -0.258    500.  0.132E+02  0.101E+01  0.160E-03  0.236E-05    3  17  85   16  36  54   19  42  57    0.000    0.000       0
+  0    596 00:46:41.22   5.1100A   8.7991  -5.5999   4.9696  0.287  0.93  -0.257    500.  0.132E+02  0.101E+01  0.158E-03  0.233E-05    3  17  86   16  36  54   19  42  57    0.000    0.000       0
+  0    597 00:46:46.33   5.1100A   8.8053  -5.4441   4.9621  0.287  0.93  -0.256    500.  0.132E+02  0.101E+01  0.158E-03  0.232E-05    4  16  88   16  36  54   19  42  57    0.000    0.000       0
+  0    598 00:46:51.42   5.0900A   8.8420  -5.5818   4.9348  0.286  0.93  -0.256    500.  0.132E+02  0.101E+01  0.157E-03  0.232E-05    3  17  87   14  14  68   19  42  57    0.000    0.000       0
+  0    599 00:46:56.52   5.1000A   8.8307  -5.4769   4.8911  0.286  0.93  -0.257    500.  0.132E+02  0.101E+01  0.157E-03  0.233E-05    4  16  89   14  14  68   19  42  57    0.000    0.000       0
+  0    600 00:47:01.62   5.1000A   8.8202  -5.5535   4.8345  0.286  0.93  -0.256    500.  0.132E+02  0.101E+01  0.157E-03  0.234E-05    4  16  90   16  37  54   19  42  57    0.000    0.000       0
+  0    601 00:47:06.74   5.1200A   8.7849  -5.6551   4.7742  0.286  0.93  -0.261    500.  0.132E+02  0.101E+01  0.158E-03  0.236E-05    3  16  88   16  37  54   19  42  57    0.000    0.000       0
+  0    602 00:47:11.84   5.1000A   8.8223  -5.7308   4.7177  0.286  0.93  -0.262    500.  0.132E+02  0.101E+01  0.157E-03  0.236E-05    4  16  91   16  37  54   19  42  57    0.000    0.000       0
+  0    603 00:47:16.99   5.1500A   8.7399  -5.7573   4.6742  0.286  0.93  -0.256    500.  0.132E+02  0.101E+01  0.158E-03  0.238E-05    3  16  89   16  37  54   19  42  57    0.000    0.000       0
+  0    604 00:47:22.13   5.1400A   8.7591  -5.7249   4.6445  0.285  0.93  -0.257    500.  0.132E+02  0.101E+01  0.158E-03  0.237E-05    3  16  90   16  37  54   19  42  57    0.000    0.000       0
+  0    605 00:47:27.33   5.2000A   8.6558  -5.7748   4.6354  0.285  0.93  -0.259    500.  0.132E+02  0.101E+01  0.159E-03  0.238E-05    3  16  91   17  37  55   19  42  57    0.000    0.000       0
+  0    606 00:47:32.54   5.2100A   8.6359  -5.7794   4.6441  0.285  0.93  -0.262    500.  0.132E+02  0.101E+01  0.159E-03  0.238E-05    4  15  92   17  37  55   19  42  57    0.000    0.000       0
+  0    607 00:47:37.80   5.2600A   8.5599  -5.7483   4.6734  0.285  0.93  -0.259    500.  0.132E+02  0.101E+01  0.161E-03  0.240E-05    4  15  93   17  37  55   19  42  57    0.000    0.000       0
+  0    608 00:47:43.08   5.2800A   8.5241  -5.7122   4.7189  0.285  0.93  -0.256    500.  0.132E+02  0.101E+01  0.161E-03  0.241E-05    4  15  93   17  37  55   19  42  57    0.000    0.000       0
+  0    609 00:47:48.37   5.2900A   8.5093  -5.7041   4.7770  0.284  0.87  -0.255    400.  0.132E+02  0.101E+01  0.161E-03  0.241E-05    4  15  94   17  37  55   19  42  57    0.000    0.000       0
+  0    610 00:47:53.74   5.3700A   8.3770  -5.7417   4.8402  0.284  0.87  -0.255    400.  0.132E+02  0.100E+01  0.163E-03  0.244E-05    2  16  93   17  37  55   19  42  57    0.000    0.000       0
+  0    611 00:47:59.07   5.3300A   8.4383  -5.8625   4.8989  0.284  0.87  -0.258    400.  0.132E+02  0.100E+01  0.162E-03  0.243E-05    4  11  87   14  34  53   19  42  57    0.000    0.000       0
+  0    612 00:48:04.44   5.3700A   8.3730  -5.9285   4.9494  0.284  0.87  -0.260    400.  0.132E+02  0.100E+01  0.163E-03  0.244E-05    4  11  88   14  34  53   19  42  57    0.000    0.000       0
+  0    613 00:48:09.79   5.3500A   8.4149  -5.9612   4.9793  0.283  0.87  -0.258    400.  0.132E+02  0.100E+01  0.163E-03  0.243E-05    5  16  93   17  37  55   19  42  57    0.000    0.000       0
+  0    614 00:48:15.11   5.3200A   8.4587  -5.9453   4.9873  0.283  0.87  -0.256    400.  0.132E+02  0.100E+01  0.162E-03  0.242E-05    5  16  94   17  37  55   19  42  57    0.000    0.000       0
+  0    615 00:48:20.41   5.3000A   8.4870  -5.8535   4.9715  0.283  0.87  -0.255    400.  0.132E+02  0.100E+01  0.161E-03  0.241E-05    5  16  95   17  37  55   19  42  57    0.000    0.000       0
+  0    616 00:48:25.63   5.2200A   8.6184  -5.9671   4.9363  0.283  0.87  -0.256    400.  0.132E+02  0.100E+01  0.159E-03  0.238E-05    5  16  95   14  32  53   19  42  57    0.000    0.000       0
+  0    617 00:48:30.81   5.1800A   8.6929  -6.2283   4.8930  0.282  0.87  -0.256    400.  0.131E+02  0.100E+01  0.157E-03  0.236E-05    5  16  96   14  32  53   19  42  57    0.000    0.000       0
+  0    618 00:48:36.01   5.2000A   8.6497  -6.3560   4.8458  0.282  0.87  -0.257    400.  0.131E+02  0.100E+01  0.158E-03  0.237E-05    5  16  97   14  32  53   19  42  57    0.000    0.000       0
+  0    619 00:48:41.14   5.1300A   8.7668  -6.3051   4.7985  0.282  0.87  -0.264    400.  0.131E+02  0.100E+01  0.156E-03  0.234E-05    5  16  97   14  32  53   19  42  57    0.000    0.000       0
+  0    620 00:48:46.25   5.1100A   8.8021  -6.0754   4.7613  0.282  1.02  -0.257    650.  0.131E+02  0.100E+01  0.155E-03  0.232E-05    5  16  98   14  32  53   19  42  57    0.000    0.000       0
+  0    621 00:48:51.45   5.2000A   8.6501  -5.7075   4.7314  0.281  1.02  -0.257    650.  0.131E+02  0.100E+01  0.158E-03  0.234E-05    5  16  98   14  32  53   19  42  57    0.000    0.000       0
+  0    622 00:48:56.61   5.1600A   8.7186  -5.7712   4.7069  0.281  1.02  -0.258    650.  0.131E+02  0.999E+00  0.157E-03  0.233E-05    5  16  99   16  37  54   19  42  57    0.000    0.000       0
+  0    623 00:49:01.77   5.1600A   8.7215  -5.8852   4.6984  0.281  1.02  -0.264    650.  0.131E+02  0.999E+00  0.157E-03  0.232E-05    5  16 100   16  37  54   19  42  57    0.000    0.000       0
+  0    624 00:49:06.96   5.1900A   8.6624  -5.9521   4.7040  0.281  1.02  -0.262    650.  0.131E+02  0.999E+00  0.157E-03  0.234E-05    5  17  99   16  37  54   19  42  57    0.000    0.000       0
+  0    625 00:49:12.09   5.1300A   8.7696  -5.9477   4.7258  0.280  1.02  -0.264    650.  0.131E+02  0.998E+00  0.156E-03  0.232E-05    5  17 100   16  37  54   19  42  57    0.000    0.000       0
+  0    626 00:49:17.24   5.1500A   8.7369  -6.0692   4.7656  0.280  1.02  -0.284    650.  0.131E+02  0.998E+00  0.156E-03  0.232E-05    5  17 100   15  35  54   19  42  57    0.000    0.000       0
+  0    627 00:49:22.26   5.0200A   8.9627  -6.0503   4.8153  0.280  1.02  -0.266    650.  0.131E+02  0.998E+00  0.152E-03  0.227E-05    5  17 101   15  35  54   19  42  57    0.000    0.000       0
+  0    628 00:49:27.27   5.0100A   8.9863  -5.8972   4.8749  0.280  1.02  -0.268    650.  0.131E+02  0.997E+00  0.152E-03  0.227E-05    5  17 102   14  35  53   19  42  57    0.000    0.000       0
+  0    629 00:49:32.38   5.1100A   8.8099  -6.0054   4.9333  0.279  1.02  -0.275    650.  0.131E+02  0.997E+00  0.154E-03  0.231E-05    5  17 102   14  35  53   19  42  57    0.000    0.000       0
+  0    630 00:49:37.37   4.9900A   9.0126  -6.0731   4.9842  0.279  1.02  -0.265    650.  0.131E+02  0.997E+00  0.151E-03  0.226E-05    5  17 103   14  35  53   19  42  57    0.000    0.000       0
+  0    631 00:49:42.41   5.0400A   8.9231  -6.1094   5.0281  0.279  1.02  -0.264    650.  0.131E+02  0.997E+00  0.152E-03  0.227E-05    5  17 104   14  35  53   19  42  57    0.000    0.000       0
+  0    632 00:49:47.56   5.1500A   8.7346  -6.1213   5.0491  0.278  1.02  -0.264    650.  0.131E+02  0.996E+00  0.155E-03  0.231E-05    5  17 104   14  35  53   19  42  57    0.000    0.000       0
+  0    633 00:49:52.75   5.1900A   8.6774  -6.1155   5.0421  0.278  1.02  -0.264    650.  0.131E+02  0.996E+00  0.156E-03  0.232E-05    5  17 105   14  35  53   19  42  57    0.000    0.000       0
+  0    634 00:49:58.14   5.3900A   8.3471  -6.0985   5.0072  0.278  1.02  -0.264    650.  0.131E+02  0.996E+00  0.161E-03  0.239E-05    5  17 106   14  35  53   19  42  57    0.000    0.000       0
+  0    635 00:50:03.60   5.4600A   8.2484  -6.0711   4.9330  0.278  1.02  -0.266    650.  0.131E+02  0.995E+00  0.163E-03  0.240E-05   14  44 115   14  35  53   19  42  57    0.000    0.000       0
+  0    636 00:50:09.18   5.5800A   8.0680  -6.1372   4.8302  0.277  1.02  -0.269    650.  0.131E+02  0.995E+00  0.166E-03  0.244E-05    7  18  99   17  37  55   19  42  57    0.000    0.000       0
+  0    637 00:50:14.65   5.4700A   8.2315  -6.1051   4.6977  0.277  1.02  -0.267    650.  0.131E+02  0.995E+00  0.163E-03  0.239E-05    7  18  99   17  37  55   19  42  57    0.000    0.000       0
+  0    638 00:50:20.12   5.4700A   8.2336  -5.9951   4.5602  0.277  1.02  -0.267    650.  0.131E+02  0.994E+00  0.163E-03  0.238E-05    7  18 100   14  35  53   19  42  57    0.000    0.000       0
+  0    639 00:50:25.65   5.5300A   8.1408  -5.9822   4.4149  0.277  1.02  -0.268    650.  0.131E+02  0.994E+00  0.165E-03  0.240E-05   15  17 105   14  35  53   19  42  57    0.000    0.000       0
+  0    640 00:50:31.11   5.4600A   8.2360  -5.9557   4.2734  0.276  1.02  -0.270    650.  0.131E+02  0.994E+00  0.163E-03  0.239E-05    7  18 101   14  35  53   19  42  57    0.000    0.000       0
+  0    641 00:50:36.61   5.5000A   8.1793  -5.9675   4.1578  0.276  1.02  -0.271    650.  0.131E+02  0.993E+00  0.164E-03  0.241E-05   15  17 106   15  36  54   19  42  57    0.000    0.000       0
+  0    642 00:50:42.16   5.5500A   8.1106  -6.1821   4.0681  0.276  1.02  -0.271    650.  0.131E+02  0.993E+00  0.165E-03  0.244E-05    7  18 102   15  36  54   19  42  57    0.000    0.000       0
+  0    643 00:50:47.80   5.6400A   7.9779  -6.2478   4.0157  0.276  1.02  -0.273    650.  0.131E+02  0.992E+00  0.168E-03  0.248E-05    7  17 101   15  36  54   19  42  57    0.000    0.000       0
+  0    644 00:50:53.45   5.6500A   7.9697  -6.1683   4.0082  0.275  1.02  -0.273    650.  0.131E+02  0.992E+00  0.168E-03  0.250E-05    7  17 101   15  36  54   19  42  57    0.000    0.000       0
+  0    645 00:50:59.02   5.5700A   8.0782  -6.0166   4.0540  0.275  1.02  -0.280    650.  0.131E+02  0.992E+00  0.166E-03  0.248E-05    7  17 102   15  36  54   19  42  57    0.000    0.000       0
+  0    646 00:51:04.63   5.6100A   8.0226  -5.9579   4.1523  0.275  1.02  -0.279    650.  0.130E+02  0.991E+00  0.167E-03  0.250E-05    7  17 102   16  37  54   19  42  57    0.000    0.000       0
+  0    647 00:51:10.19   5.5600A   8.0938  -6.2604   4.2947  0.275  1.02  -0.282    650.  0.130E+02  0.991E+00  0.165E-03  0.249E-05    7  17 103   16  37  54   19  42  57    0.000    0.000       0
+  0    648 00:51:15.76   5.5700A   8.0743  -6.5181   4.4723  0.275  1.02  -0.276    650.  0.130E+02  0.990E+00  0.166E-03  0.251E-05    2  60  89   16  37  54   19  42  57    0.000    0.000       0
+  0    649 00:51:21.35   5.5900A   8.0541  -6.6621   4.6634  0.275  1.02  -0.276    650.  0.130E+02  0.990E+00  0.166E-03  0.254E-05    2  61  89   16  37  54   19  42  57    0.000    0.000       0
+  0    650 00:51:26.91   5.5600A   8.0980  -6.6401   4.8424  0.274  1.02  -0.275    650.  0.130E+02  0.989E+00  0.165E-03  0.254E-05    2  60  90   16  37  54   19  42  57    0.000    0.000       0
+  0    651 00:51:32.49   5.5800A   8.0615  -6.4574   4.9837  0.274  1.02  -0.278    650.  0.130E+02  0.989E+00  0.165E-03  0.255E-05    2  60  90   16  37  54   19  42  57    0.000    0.000       0
+  0    652 00:51:37.78   5.2900A   8.5046  -6.1664   5.0672  0.274  1.02  -0.279    650.  0.130E+02  0.988E+00  0.157E-03  0.244E-05   14  26  80   16  37  54   19  42  57    0.000    0.000       0
+  0    653 00:51:42.79   5.0100A   8.9738  -6.0939   5.0989  0.274  1.02  -0.333    650.  0.130E+02  0.988E+00  0.149E-03  0.231E-05   14  26  80   16  36  54   19  42  57    0.000    0.000       0
+  0    654 00:51:48.07   5.2800A   8.5286  -6.0172   5.0812  0.274  1.02  -0.281    650.  0.130E+02  0.987E+00  0.157E-03  0.240E-05   14  26  80   16  36  54   19  42  57    0.000    0.000       0
+  0    655 00:51:53.38   5.3100A   8.4770  -5.9062   4.9973  0.274  0.99  -0.287    600.  0.130E+02  0.986E+00  0.157E-03  0.241E-05   14  26  81   16  36  54   19  42  57    0.000    0.000       0
+  0    656 00:51:58.47   5.0900A   8.8409  -6.0120   4.8938  0.274  0.99  -0.296    600.  0.130E+02  0.986E+00  0.151E-03  0.231E-05   14  26  81   14  35  53   19  42  57    0.000    0.000       0
+  0    657 00:52:03.80   5.3300A   8.4421  -6.2943   4.7987  0.273  0.99  -0.286    600.  0.130E+02  0.985E+00  0.157E-03  0.239E-05   15  24  75   14  35  53   19  42  57    0.000    0.000       0
+  0    658 00:52:09.28   5.4800A   8.2131  -6.5438   4.6848  0.273  0.99  -0.282    600.  0.130E+02  0.984E+00  0.161E-03  0.245E-05   14  26  82   14  35  53   19  42  57    0.000    0.000       0
+  0    659 00:52:14.74   5.4600A   8.2421  -6.6838   4.5812  0.273  0.99  -0.278    600.  0.130E+02  0.984E+00  0.161E-03  0.245E-05   15  24  78   14  35  53   19  42  57    0.000    0.000       0
+  0    660 00:52:19.99   5.2500A   8.5774  -6.6826   4.5003  0.273  0.99  -0.277    600.  0.130E+02  0.983E+00  0.155E-03  0.237E-05   15  24  78   15  36  54   19  42  57    0.000    0.000       0
+  0    661 00:52:25.30   5.3100A   8.4805  -6.7063   4.4447  0.273  0.99  -0.276    600.  0.130E+02  0.982E+00  0.157E-03  0.239E-05   15  24  78   15  36  54   19  42  57    0.000    0.000       0
+  0    662 00:52:30.88   5.5800A   8.0604  -6.6494   4.3901  0.273  0.99  -0.276    600.  0.130E+02  0.982E+00  0.164E-03  0.250E-05   14  51  97   15  36  54   19  42  57    0.000    0.000       0
+  0    663 00:52:36.49   5.6100A   8.0281  -6.5402   4.3719  0.273  0.87  -0.275    400.  0.130E+02  0.981E+00  0.165E-03  0.253E-05    2  56  94   15  36  54   19  43  58    0.000    0.000       0
+  0    664 00:52:42.12   5.6300A   7.9943  -6.4307   4.4011  0.273  0.87  -0.273    400.  0.130E+02  0.980E+00  0.165E-03  0.255E-05    2  57  94   15  36  54    3  27  98    0.000    0.000       0
+  0    665 00:52:47.69   5.5700A   8.0782  -6.3378   4.7202  0.273  0.87  -0.272    400.  0.130E+02  0.979E+00  0.163E-03  0.252E-05    2  55  95   15  36  54    3  27  98    0.000    0.000       0
+  0    666 00:52:53.29   5.6000A   8.0357  -6.2743   4.8484  0.272  0.87  -0.273    400.  0.130E+02  0.979E+00  0.164E-03  0.254E-05    2  55  95   15  36  54    3  27  98    0.000    0.000       0
+  0    667 00:52:58.80   5.5100A   8.1733  -6.2919   4.7918  0.272  0.87  -0.275    400.  0.130E+02  0.978E+00  0.161E-03  0.250E-05    2  55  96   16  36  54    3  28  97    0.000    0.000       0
+  0    668 00:53:04.37   5.5700A   8.0739  -6.2718   5.0303  0.272  0.87  -0.277    400.  0.130E+02  0.977E+00  0.163E-03  0.253E-05    2  55  97   16  36  54    4  27  98    0.000    0.000       0
+  0    669 00:53:09.86   5.4900A   8.1950  -6.2420   5.1058  0.272  0.87  -0.281    400.  0.130E+02  0.976E+00  0.161E-03  0.251E-05    2  55  97   15  36  54    4  27  98    0.000    0.000       0
+  0    670 00:53:15.45   5.5900A   8.0524  -6.2350   4.9666  0.272  0.96  -0.278    550.  0.130E+02  0.975E+00  0.163E-03  0.255E-05    2  55  97   15  36  54    4  27  98    0.000    0.000       0
+  0    671 00:53:20.99   5.5400A   8.1156  -6.1965   4.7967  0.272  0.96  -0.281    550.  0.130E+02  0.975E+00  0.162E-03  0.254E-05    2  55  98   15  36  54    4  27  99    0.000    0.000       0
+  0    672 00:53:26.64   5.6500A   7.9716  -6.1421   4.8444  0.272  0.96  -0.281    550.  0.130E+02  0.974E+00  0.165E-03  0.260E-05    2  57  99   15  36  54    4  27  99    0.000    0.000       0
+  0    673 00:53:32.24   5.6000A   8.0308  -6.0836   4.8226  0.272  0.96  -0.278    550.  0.130E+02  0.973E+00  0.163E-03  0.259E-05   12  52  97   15  36  54    5  27  99    0.000    0.000       0
+  0    674 00:53:37.92   5.6800A   7.9223  -6.0692   4.8130  0.272  0.96  -0.275    550.  0.130E+02  0.972E+00  0.166E-03  0.263E-05    2  58  98   14  36  53    5  27  99    0.000    0.000       0
+  0    675 00:53:43.63   5.7100A   7.8837  -6.1360   4.6987  0.271  0.96  -0.272    550.  0.130E+02  0.971E+00  0.166E-03  0.265E-05    2  58  98   14  36  53    5  26 100    0.000    0.000       0
+  0    676 00:53:49.19   5.5600A   8.0987  -6.0647   4.5980  0.271  0.96  -0.272    550.  0.130E+02  0.971E+00  0.162E-03  0.259E-05   12  52  98   14  36  53   19  42  57    0.000    0.000       0
+  0    677 00:53:54.84   5.6500A   7.9606  -5.9920   4.5930  0.271  0.96  -0.272    550.  0.129E+02  0.970E+00  0.164E-03  0.262E-05    5  63 100   16  36  54   19  42  57    0.000    0.000       0
+  0    678 00:54:00.52   5.6800A   7.9199  -6.0561   4.8867  0.271  0.96  -0.274    550.  0.129E+02  0.969E+00  0.165E-03  0.264E-05    5  63 100   14  35  53    3  26 100    0.000    0.000       0
+  0    679 00:54:06.17   5.6500A   7.9597  -6.1725   4.6105  0.271  0.96  -0.271    550.  0.129E+02  0.968E+00  0.164E-03  0.262E-05    5  63 101   14  35  53    3  26 100    0.000    0.000       0
+  0    680 00:54:11.79   5.6200A   8.0087  -6.1961   4.7525  0.271  0.96  -0.270    550.  0.129E+02  0.967E+00  0.163E-03  0.259E-05   16  41  97   14  35  53    3  26 101    0.000    0.000       0
+  0    681 00:54:17.48   5.6900A   7.9118  -6.0970   4.9388  0.271  0.93  -0.271    500.  0.129E+02  0.966E+00  0.165E-03  0.261E-05    2  53 104   14  35  53    3  26 101    0.000    0.000       0
+  0    682 00:54:23.19   5.7100A   7.8767  -6.0134   4.9623  0.271  0.93  -0.271    500.  0.129E+02  0.965E+00  0.165E-03  0.261E-05    2  53 104   16  36  54    3  25 103    0.000    0.000       0
+  0    683 00:54:28.87   5.6800A   7.9285  -6.1121   4.8667  0.271  0.93  -0.270    500.  0.129E+02  0.964E+00  0.164E-03  0.259E-05    2  53 105   16  36  54    3  25 103    0.000    0.000       0
+  0    684 00:54:34.47   5.6000A   8.0310  -6.1661   4.5198  0.271  0.93  -0.271    500.  0.129E+02  0.964E+00  0.162E-03  0.255E-05   16  41 100   16  36  54    3  25 104    0.000    0.000       0
+  0    685 00:54:40.14   5.6700A   7.9413  -6.1323   4.6858  0.271  0.93  -0.269    500.  0.129E+02  0.963E+00  0.164E-03  0.257E-05    2  53 105   16  36  54    3  25 104    0.000    0.000       0
+  0    686 00:54:45.77   5.6300A   7.9910  -6.1949   4.8092  0.271  0.93  -0.268    500.  0.129E+02  0.962E+00  0.163E-03  0.256E-05    2  53 106   15  36  54    6  27 101    0.000    0.000       0
+  0    687 00:54:51.40   5.6300A   7.9931  -6.2912   4.9031  0.270  0.93  -0.268    500.  0.129E+02  0.961E+00  0.162E-03  0.256E-05    2  53 106   15  36  54    6  27 101    0.000    0.000       0
+  0    688 00:54:57.05   5.6500A   7.9619  -6.3885   4.8044  0.270  0.93  -0.267    500.  0.129E+02  0.960E+00  0.163E-03  0.257E-05    2  53 107   15  36  54    6  27 101    0.000    0.000       0
+  0    689 00:55:02.68   5.6300A   7.9949  -6.5006   4.7680  0.270  0.93  -0.266    500.  0.129E+02  0.959E+00  0.162E-03  0.257E-05    2  53 107   15  36  54    6  27 102    0.000    0.000       0
+  0    690 00:55:08.37   5.6900A   7.9111  -6.6299   4.8513  0.270  0.93  -0.265    500.  0.129E+02  0.957E+00  0.164E-03  0.260E-05    1  51 108   15  36  54    6  27 102    0.000    0.000       0
+  0    691 00:55:14.07   5.7000A   7.8956  -6.7589   4.6786  0.270  0.93  -0.265    500.  0.129E+02  0.956E+00  0.164E-03  0.262E-05    2  53 108   15  36  54    6  27 102    0.000    0.000       0
+  0    692 00:55:19.82   5.7500A   7.8308  -6.8538   4.5325  0.270  0.93  -0.265    500.  0.129E+02  0.955E+00  0.165E-03  0.264E-05    2  53 108   15  36  54    6  27 103    0.000    0.000       0
+  0    693 00:55:25.47   5.6500A   7.9707  -6.8701   4.5414  0.270  0.93  -0.263    500.  0.129E+02  0.954E+00  0.163E-03  0.261E-05   14  47 108   15  36  54    6  27 103    0.000    0.000       0
+  0    694 00:55:31.04   5.5700A   8.0769  -6.7907   4.4414  0.270  0.93  -0.263    500.  0.129E+02  0.953E+00  0.161E-03  0.258E-05   14  47 108   15  36  54   19  42  57    0.000    0.000       0
+  0    695 00:55:36.51   5.4700A   8.2231  -6.6302   4.4857  0.270  0.93  -0.262    500.  0.129E+02  0.952E+00  0.158E-03  0.253E-05   14  47 109   15  36  54    6  28 102    0.000    0.000       0
+  0    696 00:55:41.73   5.2200A   8.6189  -6.4347   4.4541  0.270  0.93  -0.264    500.  0.129E+02  0.951E+00  0.151E-03  0.243E-05   14  47 109   15  36  54    6  28 102    0.000    0.000       0
+  0    697 00:55:47.36   5.6300A   7.9956  -6.2638   4.4361  0.270  0.93  -0.266    500.  0.129E+02  0.950E+00  0.162E-03  0.259E-05   14  47 109   15  36  54   19  42  57    0.000    0.000       0
+  0    698 00:55:52.64   5.2800A   8.5197  -6.1152   4.4611  0.270  0.93  -0.267    500.  0.129E+02  0.949E+00  0.153E-03  0.246E-05   14  47 110   15  36  54   19  42  57    0.000    0.000       0
+  0    699 00:55:57.91   5.2700A   8.5435  -6.0783   4.5177  0.269  0.87  -0.270    400.  0.129E+02  0.948E+00  0.153E-03  0.245E-05   14  47 110   15  36  54   19  42  57    0.000    0.000       0
+  0    700 00:56:03.73   5.8200A   7.7306  -6.2809   4.5670  0.269  0.87  -0.272    400.  0.129E+02  0.946E+00  0.167E-03  0.267E-05   14  47 110   15  37  53   19  42  57    0.000    0.000       0
+  0    701 00:56:09.68   5.9500A   7.5603  -6.3719   4.5927  0.269  0.87  -0.273    400.  0.129E+02  0.945E+00  0.170E-03  0.273E-05    2  64 101   15  37  53   19  42  57    0.000    0.000       0
+  0    702 00:56:15.51   5.8300A   7.7195  -6.4484   4.6166  0.269  0.87  -0.268    400.  0.129E+02  0.944E+00  0.167E-03  0.268E-05   16  19 105   15  36  54   19  42  57    0.000    0.000       0
+  0    703 00:56:21.44   5.9300A   7.5917  -6.6585   4.6378  0.269  0.87  -0.268    400.  0.129E+02  0.942E+00  0.170E-03  0.270E-05   14  50 107   15  36  54   19  42  57    0.000    0.000       0
+  0    704 00:56:27.31   5.8700A   7.6717  -6.7897   4.6455  0.269  0.87  -0.268    400.  0.129E+02  0.941E+00  0.168E-03  0.267E-05   16  46  69   15  36  54   19  42  57    0.000    0.000       0
+  0    705 00:56:32.98   5.6700A   7.9414  -6.7777   4.6554  0.269  0.87  -0.276    400.  0.129E+02  0.940E+00  0.163E-03  0.258E-05   14  49  83   15  36  54   19  42  57    0.000    0.000       0
+  0    706 00:56:38.87   5.8900A   7.6425  -6.6119   4.6735  0.269  0.87  -0.267    400.  0.129E+02  0.938E+00  0.168E-03  0.265E-05   15  46  72   15  36  54   19  42  57    0.000    0.000       0
+  0    707 00:56:44.50   5.6300A   7.9922  -6.3061   4.6846  0.268  0.87  -0.268    400.  0.129E+02  0.937E+00  0.162E-03  0.254E-05   14  49  84   15  36  54   19  42  57    0.000    0.000       0
+  0    708 00:56:50.11   5.6100A   8.0181  -6.0584   4.7154  0.268  0.87  -0.270    400.  0.129E+02  0.936E+00  0.161E-03  0.252E-05    4  21 117   16  36  54   19  42  57    0.000    0.000       0
+  0    709 00:56:55.77   5.6600A   7.9484  -6.2990   4.7439  0.268  0.87  -0.273    400.  0.128E+02  0.935E+00  0.162E-03  0.253E-05   15  21  85   16  36  54   19  42  57    0.000    0.000       0
+  0    710 00:57:01.29   5.5200A   8.1499  -6.3806   4.7678  0.268  0.87  -0.270    400.  0.128E+02  0.933E+00  0.159E-03  0.248E-05    4  21 118   16  36  54   19  42  57    0.000    0.000       0
+  0    711 00:57:06.97   5.6800A   7.9224  -6.3457   4.7891  0.268  0.87  -0.269    400.  0.128E+02  0.932E+00  0.163E-03  0.255E-05   15  46  75   16  36  54   19  42  57    0.000    0.000       0
+  0    712 00:57:12.50   5.5300A   8.1345  -6.2486   4.7856  0.268  0.87  -0.268    400.  0.128E+02  0.931E+00  0.159E-03  0.250E-05   15  46  75   16  36  54   19  42  57    0.000    0.000       0
+  0    713 00:57:18.29   5.7900A   7.7688  -6.5041   4.7717  0.268  0.87  -0.268    400.  0.128E+02  0.930E+00  0.166E-03  0.260E-05    3  21 120   15  36  54   19  42  57    0.000    0.000       0
+  0    714 00:57:24.06   5.7700A   7.8006  -6.7304   4.7181  0.268  0.87  -0.268    400.  0.128E+02  0.929E+00  0.165E-03  0.260E-05   15  46  77   15  36  54   19  42  57    0.000    0.000       0
+  0    715 00:57:29.73   5.6700A   7.9394  -6.7989   4.6520  0.268  0.96  -0.268    550.  0.128E+02  0.928E+00  0.162E-03  0.257E-05   16  43  89   15  36  54   19  42  57    0.000    0.000       0
+  0    716 00:57:35.44   5.7100A   7.8876  -6.7053   4.5795  0.267  0.96  -0.270    550.  0.128E+02  0.927E+00  0.164E-03  0.258E-05   15  46  78   15  36  54   19  42  57    0.000    0.000       0
+  0    717 00:57:40.87   5.4300A   8.2885  -6.5144   4.5020  0.267  0.96  -0.282    550.  0.128E+02  0.926E+00  0.156E-03  0.247E-05   15  46  79   15  36  54   19  42  57    0.000    0.000       0
+  0    718 00:57:46.42   5.5500A   8.1012  -6.3395   4.4526  0.267  0.96  -0.271    550.  0.128E+02  0.925E+00  0.159E-03  0.251E-05   15  46  79   15  36  54   19  42  57    0.000    0.000       0
+  0    719 00:57:51.72   5.3000A   8.4968  -6.2244   4.4083  0.267  0.96  -0.269    550.  0.128E+02  0.924E+00  0.152E-03  0.241E-05   15  46  80   14  35  53   19  42  57    0.000    0.000       0
+  0    720 00:57:57.17   5.4500A   8.2578  -6.5016   4.3994  0.267  0.96  -0.269    550.  0.128E+02  0.923E+00  0.156E-03  0.246E-05   15  46  80   14  35  53   19  42  57    0.000    0.000       0
+  0    721 00:58:02.67   5.5000A   8.1780  -6.7250   4.3959  0.267  0.96  -0.273    550.  0.128E+02  0.922E+00  0.157E-03  0.249E-05   15  46  81   14  35  53   19  42  57    0.000    0.000       0
+  0    722 00:58:08.31   5.6400A   7.9811  -6.8764   4.4075  0.267  0.96  -0.273    550.  0.128E+02  0.922E+00  0.161E-03  0.255E-05   14  49  70   14  35  53   19  42  57    0.000    0.000       0
+  0    723 00:58:13.78   5.4700A   8.2230  -6.9627   4.4243  0.266  0.96  -0.270    550.  0.128E+02  0.921E+00  0.156E-03  0.249E-05   15  46  75   14  35  53   19  42  57    0.000    0.000       0
+  0    724 00:58:19.08   5.3000A   8.4855  -6.9864   4.4555  0.266  0.96  -0.270    550.  0.128E+02  0.920E+00  0.152E-03  0.241E-05   15  46  75   14  35  53   19  42  57    0.000    0.000       0
+  0    725 00:58:24.27   5.1900A   8.6719  -6.9406   4.4924  0.266  0.96  -0.270    550.  0.128E+02  0.920E+00  0.149E-03  0.236E-05   16  41  91   14  35  53   19  42  57    0.000    0.000       0
+  0    726 00:58:29.49   5.2200A   8.6242  -6.8172   4.5326  0.266  0.96  -0.271    550.  0.128E+02  0.919E+00  0.149E-03  0.238E-05   16  41  91   14  35  53   19  42  57    0.000    0.000       0
+  0    727 00:58:34.41   4.9200A   9.1488  -6.6038   4.5729  0.266  0.96  -0.273    550.  0.128E+02  0.918E+00  0.141E-03  0.226E-05   16  41  92   14  35  53   19  42  57    0.000    0.000       0
+  0    728 00:58:39.54   5.1300A   8.7647  -6.3401   4.6236  0.266  0.96  -0.276    550.  0.128E+02  0.918E+00  0.147E-03  0.234E-05   16  41  93   14  35  53   19  42  57    0.000    0.000       0
+  0    729 00:58:44.49   4.9500A   9.0932  -6.1242   4.6529  0.266  0.96  -0.272    550.  0.128E+02  0.917E+00  0.142E-03  0.228E-05   16  41  94   16  36  54   19  42  57    0.000    0.000       0
+  0    730 00:58:49.31   4.8200A   9.3401  -6.0976   4.6790  0.265  0.96  -0.270    550.  0.128E+02  0.917E+00  0.139E-03  0.222E-05   16  41  94   16  36  54   19  42  57    0.000    0.000       0
+  0    731 00:58:54.30   4.9900A   9.0091  -6.1548   4.6828  0.265  0.96  -0.271    550.  0.128E+02  0.916E+00  0.143E-03  0.229E-05   16  41  95   15  36  54   19  42  57    0.000    0.000       0
+  0    732 00:58:59.24   4.9400A   9.1164  -6.3371   4.6448  0.265  0.96  -0.270    550.  0.128E+02  0.916E+00  0.142E-03  0.228E-05   16  41  96   15  36  54   19  42  57    0.000    0.000       0
+  0    733 00:59:04.14   4.9000A   9.1800  -6.5286   4.5839  0.265  0.96  -0.271    550.  0.128E+02  0.915E+00  0.141E-03  0.227E-05   16  41  96   15  36  54   19  42  57    0.000    0.000       0
+  0    734 00:59:09.24   5.1000A   8.8225  -6.6746   4.4966  0.265  0.96  -0.272    550.  0.128E+02  0.915E+00  0.146E-03  0.236E-05   16  41  97   15  36  54   19  42  57    0.000    0.000       0
+  0    735 00:59:14.39   5.1500A   8.7322  -6.7270   4.3717  0.265  0.96  -0.277    550.  0.128E+02  0.914E+00  0.148E-03  0.240E-05   16  41  98   15  36  54   19  42  57    0.000    0.000       0
+  0    736 00:59:19.63   5.2400A   8.5928  -6.6802   4.2405  0.265  0.96  -0.277    550.  0.128E+02  0.913E+00  0.150E-03  0.245E-05   16  41  99   15  36  54   19  42  57    0.000    0.000       0
+  0    737 00:59:24.93   5.3000A   8.4904  -6.5518   4.1099  0.264  0.96  -0.274    550.  0.128E+02  0.913E+00  0.152E-03  0.249E-05   16  41  99   15  36  54   19  42  57    0.000    0.000       0
+  0    738 00:59:30.37   5.4400A   8.2735  -6.3920   4.1917  0.264  0.96  -0.276    550.  0.128E+02  0.912E+00  0.156E-03  0.256E-05   16  41 100   13  37  52   19  43  58    0.000    0.000       0
+  0    739 00:59:35.78   5.4100A   8.3196  -6.3142   4.2858  0.264  0.96  -0.277    550.  0.128E+02  0.912E+00  0.155E-03  0.255E-05   15  46  83   13  36  52   19  43  58    0.000    0.000       0
+  0    740 00:59:41.08   5.3000A   8.4867  -6.3376   4.3378  0.264  0.96  -0.280    550.  0.128E+02  0.911E+00  0.152E-03  0.250E-05   15  50  90   13  36  52   19  43  58    0.000    0.000       0
+  0    741 00:59:46.52   5.4400A   8.2755  -6.5545   4.3414  0.264  0.96  -0.280    550.  0.128E+02  0.910E+00  0.155E-03  0.255E-05   15  50  90   13  35  52   19  43  58    0.000    0.000       0
+  0    742 00:59:51.94   5.4200A   8.3019  -6.5893   4.2920  0.264  0.96  -0.287    550.  0.128E+02  0.910E+00  0.155E-03  0.254E-05   15  50  91   13  35  52   19  43  58    0.000    0.000       0
+  0    743 00:59:57.43   5.4900A   8.1985  -6.4069   4.2031  0.264  0.96  -0.284    550.  0.128E+02  0.909E+00  0.157E-03  0.256E-05   15  50  91   13  35  52   19  43  58    0.000    0.000       0
+  0    744 01:00:02.77   5.3400A   8.4225  -6.1826   4.2584  0.263  0.96  -0.284    550.  0.128E+02  0.908E+00  0.153E-03  0.250E-05   15  50  92   15  36  54   10  31 113    0.000    0.000       0
+  0    745 01:00:08.14   5.3700A   8.3784  -6.1385   4.2545  0.263  0.96  -0.284    550.  0.128E+02  0.908E+00  0.153E-03  0.250E-05   15  50  92   15  36  54   19  42  57    0.000    0.000       0
+  0    746 01:00:13.66   5.5200A   8.1482  -6.0434   4.3414  0.263  0.96  -0.285    550.  0.128E+02  0.907E+00  0.157E-03  0.256E-05   15  50  93   15  36  54   19  42  57    0.000    0.000       0
+  0    747 01:00:19.06   5.4000A   8.3370  -5.9054   4.4030  0.263  0.96  -0.285    550.  0.127E+02  0.907E+00  0.154E-03  0.250E-05   15  45  81   15  36  54   19  42  57    0.000    0.000       0
+  0    748 01:00:24.54   5.4800A   8.2153  -5.8558   4.4486  0.263  0.96  -0.286    550.  0.127E+02  0.906E+00  0.156E-03  0.251E-05   15  43  92   17  37  55   19  42  57    0.000    0.000       0
+  0    749 01:00:29.93   5.3900A   8.3416  -5.8778   4.4715  0.263  0.96  -0.290    550.  0.127E+02  0.905E+00  0.153E-03  0.246E-05   15  43  92   15  35  54   19  42  57    0.000    0.000       0
+  0    750 01:00:35.45   5.5200A   8.1571  -5.9310   4.4899  0.262  0.96  -0.289    550.  0.127E+02  0.904E+00  0.157E-03  0.250E-05   15  43  93   15  35  54   19  42  57    0.000    0.000       0
+  0    751 01:00:40.88   5.4300A   8.2832  -5.9594   4.5006  0.262  0.96  -0.304    550.  0.127E+02  0.904E+00  0.154E-03  0.246E-05   15  43  93   15  35  54   19  42  57    0.000    0.000       0
+  0    752 01:00:46.41   5.5300A   8.1431  -5.9687   4.5213  0.262  0.87  -0.295    400.  0.127E+02  0.903E+00  0.157E-03  0.249E-05   15  43  94   15  35  54   19  42  57    0.000    0.000       0
+  0    753 01:00:51.81   5.4000A   8.3313  -6.0763   4.5417  0.262  0.87  -0.300    400.  0.127E+02  0.902E+00  0.153E-03  0.244E-05   15  43  94   13  35  52   19  42  57    0.000    0.000       0
+  0    754 01:00:57.32   5.5100A   8.1662  -6.1445   4.5737  0.262  0.87  -0.295    400.  0.127E+02  0.901E+00  0.156E-03  0.248E-05   14  52  79   13  35  52   19  42  57    0.000    0.000       0
+  0    755 01:01:02.90   5.5800A   8.0580  -6.1040   4.6006  0.262  0.87  -0.293    400.  0.127E+02  0.901E+00  0.158E-03  0.250E-05   15  47 101   13  35  52   19  42  57    0.000    0.000       0
+  0    756 01:01:08.16   5.2600A   8.5570  -5.9433   4.6268  0.261  0.87  -0.295    400.  0.127E+02  0.900E+00  0.150E-03  0.238E-05   14  48  91   13  34  53   19  42  57    0.000    0.000       0
+  0    757 01:01:13.59   5.4300A   8.2880  -6.0001   4.6613  0.261  0.87  -0.296    400.  0.127E+02  0.899E+00  0.154E-03  0.243E-05   14  44  83   13  34  53   19  42  57    0.000    0.000       0
+  0    758 01:01:19.17   5.5800A   8.0606  -6.0566   4.6646  0.261  0.87  -0.288    400.  0.127E+02  0.898E+00  0.158E-03  0.250E-05   14  44  83   13  33  53   19  42  57    0.000    0.000       0
+  0    759 01:01:24.83   5.6600A   7.9449  -6.2947   4.6452  0.261  0.87  -0.290    400.  0.127E+02  0.897E+00  0.160E-03  0.255E-05   14  44  85   14  35  53   19  42  57    0.000    0.000       0
+  0    760 01:01:30.08   5.2500A   8.5738  -6.4134   4.6027  0.261  0.87  -0.290    400.  0.127E+02  0.896E+00  0.149E-03  0.240E-05   14  48  93   14  35  53   19  42  57    0.000    0.000       0
+  0    761 01:01:35.06   4.9800A   9.0424  -6.3420   4.5620  0.261  0.87  -0.289    400.  0.127E+02  0.896E+00  0.142E-03  0.227E-05   14  44  86   14  35  53   19  42  57    0.000    0.000       0
+  0    762 01:01:39.87   4.8100A   9.3492  -6.1521   4.5062  0.261  0.87  -0.295    400.  0.127E+02  0.895E+00  0.137E-03  0.219E-05   14  44  86   16  36  54   19  42  57    0.000    0.000       0
+  0    763 01:01:44.99   5.1200A   8.7807  -6.3652   4.4408  0.260  0.87  -0.285    400.  0.127E+02  0.894E+00  0.145E-03  0.231E-05   14  48  94   13  36  52   19  42  57    0.000    0.000       0
+  0    764 01:01:50.32   5.3300A   8.4359  -6.4021   4.3520  0.260  0.87  -0.283    400.  0.127E+02  0.893E+00  0.151E-03  0.240E-05   14  44  87   13  36  52   19  42  57    0.000    0.000       0
+  0    765 01:01:55.86   5.5400A   8.1259  -6.2112   4.2719  0.260  0.87  -0.284    400.  0.127E+02  0.892E+00  0.156E-03  0.249E-05   14  44  88   13  36  52   19  42  57    0.000    0.000       0
+  0    766 01:02:01.35   5.4900A   8.1953  -6.0962   4.2096  0.260  0.87  -0.284    400.  0.127E+02  0.891E+00  0.155E-03  0.247E-05   14  44  88   13  35  52   19  42  57    0.000    0.000       0
+  0    767 01:02:06.96   5.6100A   8.0197  -5.9893   4.1821  0.260  0.87  -0.288    400.  0.127E+02  0.890E+00  0.158E-03  0.252E-05   14  43  88   13  35  52   19  42  57    0.000    0.000       0
+  0    768 01:02:12.47   5.5100A   8.1638  -5.8891   4.1750  0.260  0.87  -0.285    400.  0.127E+02  0.889E+00  0.156E-03  0.250E-05   14  43  88   14  36  53   19  42  57    0.000    0.000       0
+  0    769 01:02:18.04   5.5700A   8.0836  -6.1450   4.1946  0.259  0.87  -0.284    400.  0.127E+02  0.888E+00  0.157E-03  0.252E-05   16  38 101   14  36  53   19  42  57    0.000    0.000       0
+  0    770 01:02:23.53   5.4900A   8.1927  -6.2545   4.2241  0.259  0.87  -0.287    400.  0.127E+02  0.887E+00  0.155E-03  0.248E-05   16  38 102   14  36  53   19  42  57    0.000    0.000       0
+  0    771 01:02:29.18   5.6500A   7.9714  -6.1956   4.2629  0.259  0.87  -0.284    400.  0.127E+02  0.886E+00  0.159E-03  0.253E-05   16  38 102   14  36  53   19  42  57    0.000    0.000       0
+  0    772 01:02:34.74   5.5600A   8.0884  -6.3367   4.2971  0.259  0.87  -0.283    400.  0.127E+02  0.885E+00  0.157E-03  0.249E-05   14  48  99   14  35  53   19  42  57    0.000    0.000       0
+  0    773 01:02:39.91   5.1700A   8.6984  -6.2515   4.3335  0.259  0.87  -0.282    400.  0.127E+02  0.884E+00  0.147E-03  0.231E-05   15  40 100   14  35  53   19  42  57    0.000    0.000       0
+  0    774 01:02:44.84   4.9300A   9.1282  -5.9752   4.3721  0.259  0.87  -0.282    400.  0.127E+02  0.884E+00  0.140E-03  0.219E-05   15  40 100   14  35  53   19  42  57    0.000    0.000       0
+  0    775 01:02:49.97   5.1300A   8.7693  -5.6019   4.4009  0.259  0.87  -0.283    400.  0.127E+02  0.883E+00  0.145E-03  0.226E-05   15  40 100   14  35  53   19  42  57    0.000    0.000       0
+  0    776 01:02:54.96   4.9900A   9.0230  -5.7492   4.4084  0.258  0.87  -0.285    400.  0.127E+02  0.882E+00  0.141E-03  0.221E-05   15  40 101   13  35  52   19  42  57    0.000    0.000       0
+  0    777 01:03:00.08   5.1200A   8.7870  -5.9860   4.4119  0.258  0.87  -0.289    400.  0.127E+02  0.881E+00  0.145E-03  0.227E-05   15  40 102   13  35  52   19  42  57    0.000    0.000       0
+  0    778 01:03:05.09   5.0100A   8.9753  -6.0719   4.3926  0.258  0.87  -0.288    400.  0.127E+02  0.880E+00  0.142E-03  0.223E-05   15  40 102   13  35  52   19  42  57    0.000    0.000       0
+  0    779 01:03:10.37   5.2800A   8.5240  -6.0066   4.3618  0.258  0.87  -0.291    400.  0.127E+02  0.879E+00  0.149E-03  0.234E-05   15  40 103   13  35  52   19  42  57    0.000    0.000       0
+  0    780 01:03:15.78   5.4100A   8.3132  -5.8980   4.2979  0.258  0.87  -0.294    400.  0.127E+02  0.878E+00  0.153E-03  0.241E-05   15  40 103   12  36  51   19  42  57    0.000    0.000       0
+  0    781 01:03:21.27   5.4900A   8.2034  -5.8556   4.2167  0.258  0.87  -0.304    400.  0.127E+02  0.877E+00  0.155E-03  0.244E-05   15  45  90   12  36  51   19  42  57    0.000    0.000       0
+  0    782 01:03:26.78   5.5100A   8.1729  -5.8851   4.1240  0.258  0.87  -0.296    400.  0.127E+02  0.876E+00  0.155E-03  0.245E-05   15  45  90   13  34  53   19  42  57    0.000    0.000       0
+  0    783 01:03:32.45   5.6700A   7.9404  -6.1539   4.0303  0.257  0.87  -0.291    400.  0.127E+02  0.874E+00  0.159E-03  0.251E-05   16  42 119   13  36  52   19  42  57    0.000    0.000       0
+  0    784 01:03:37.83   5.3800A   8.3660  -6.3237   3.9380  0.257  0.87  -0.290    400.  0.127E+02  0.873E+00  0.152E-03  0.238E-05   15  44  87   13  36  52   19  42  57    0.000    0.000       0
+  0    785 01:03:43.26   5.4300A   8.2860  -6.2965   3.8819  0.257  0.87  -0.290    400.  0.127E+02  0.872E+00  0.153E-03  0.238E-05   15  44  87   13  36  52   19  42  57    0.000    0.000       0
+  0    786 01:03:48.91   5.6500A   7.9669  -6.0495   3.8411  0.257  0.87  -0.294    400.  0.127E+02  0.871E+00  0.159E-03  0.244E-05   15  47  87   13  36  52   19  42  57    0.000    0.000       0
+  0    787 01:03:54.34   5.4300A   8.2940  -5.9264   3.8232  0.257  0.87  -0.295    400.  0.127E+02  0.870E+00  0.153E-03  0.234E-05   14  45 117   16  37  54   19  42  57    0.000    0.000       0
+  0    788 01:03:59.64   5.3000A   8.4923  -5.8025   3.8538  0.257  0.87  -0.298    400.  0.126E+02  0.869E+00  0.149E-03  0.227E-05   14  38  99   13  33  53   19  43  58    0.000    0.000       0
+  0    789 01:04:05.18   5.5400A   8.1195  -5.8718   3.9045  0.256  0.87  -0.300    400.  0.126E+02  0.867E+00  0.155E-03  0.234E-05   14  38  99   13  33  53   19  42  57    0.000    0.000       0
+  0    790 01:04:10.51   5.3300A   8.4439  -5.9537   3.9703  0.256  0.87  -0.302    400.  0.126E+02  0.866E+00  0.150E-03  0.226E-05   15  38 104   13  33  53   19  42  57    0.000    0.000       0
+  0    791 01:04:15.72   5.2100A   8.6322  -6.0057   4.0582  0.256  0.87  -0.301    400.  0.126E+02  0.865E+00  0.147E-03  0.220E-05   15  38 104   13  33  53   19  42  57    0.000    0.000       0
+  0    792 01:04:21.29   5.5700A   8.0781  -5.9964   4.1417  0.256  0.87  -0.303    400.  0.126E+02  0.864E+00  0.156E-03  0.233E-05   15  38 104   13  33  53   19  42  57    0.000    0.000       0
+  0    793 01:04:26.84   5.5500A   8.1096  -5.9297   4.1962  0.256  0.87  -0.305    400.  0.126E+02  0.862E+00  0.155E-03  0.233E-05   15  38 105   15  35  54   19  42  57    0.000    0.000       0
+  0    794 01:04:32.61   5.7700A   7.8018  -5.8225   4.2337  0.255  0.87  -0.302    400.  0.126E+02  0.861E+00  0.161E-03  0.239E-05    2  58  91   15  35  54   19  42  57    0.000    0.000       0
+  0    795 01:04:38.43   5.8200A   7.7347  -5.7732   4.2294  0.255  0.87  -0.300    400.  0.126E+02  0.860E+00  0.162E-03  0.239E-05   15  47  84   16  37  54   19  42  57    0.000    0.000       0
+  0    796 01:04:44.09   5.6600A   7.9562  -5.7011   4.1961  0.255  0.87  -0.301    400.  0.126E+02  0.858E+00  0.158E-03  0.231E-05   15  40 106   16  37  54   19  42  57    0.000    0.000       0
+  0    797 01:04:49.63   5.5400A   8.1260  -5.5619   4.1481  0.255  0.87  -0.304    400.  0.126E+02  0.857E+00  0.155E-03  0.224E-05   15  40 106   16  37  54   19  42  57    0.000    0.000       0
+  0    798 01:04:54.90   5.2700A   8.5413   5.9276   4.0879  0.255  0.87  -0.301    400.  0.126E+02  0.856E+00  0.148E-03  0.213E-05   15  40 107   13  30 117   19  42  57    0.000    0.000       0
+  0    799 01:04:59.96   5.0600A   8.8907   5.8661   4.0339  0.255  0.87  -0.301    400.  0.126E+02  0.855E+00  0.143E-03  0.203E-05   15  40 107   13  30 117   19  42  57    0.000    0.000       0
+  0    800 01:05:05.53   5.5700A   8.0720   5.7483   3.9863  0.254  0.87  -0.306    400.  0.126E+02  0.854E+00  0.156E-03  0.220E-05   15  40 107   13  33 108   19  42  57    0.000    0.000       0
+  0    801 01:05:10.98   5.4500A   8.2635   5.5784   3.9220  0.254  1.02  -0.306    650.  0.126E+02  0.853E+00  0.153E-03  0.217E-05   15  40 108   13  33 108   19  42  57    0.000    0.000       0
+  0    802 01:05:16.30   5.3200A   8.4511   5.7908   3.9225  0.254  1.02  -0.308    650.  0.126E+02  0.851E+00  0.149E-03  0.212E-05   15  45  86   13  31 117    6  26  95    0.000    0.000       0
+  0    803 01:05:21.53   5.2300A   8.6014   5.7534   3.9539  0.254  1.02  -0.310    650.  0.126E+02  0.850E+00  0.147E-03  0.208E-05   15  45  86   13  31 117    6  26  95    0.000    0.000       0
+  0    804 01:05:26.94   5.4100A   8.3238   5.7187   3.9092  0.254  1.02  -0.311    650.  0.126E+02  0.849E+00  0.152E-03  0.215E-05   15  45  87   13  30 115   19  42  57    0.000    0.000       0
+  0    805 01:05:32.02   5.0800A   8.8551   5.8820   3.9310  0.254  1.02  -0.307    650.  0.126E+02  0.848E+00  0.143E-03  0.205E-05   15  45  87   13  34 108   19  42  57    0.000    0.000       0
+  0    806 01:05:37.26   5.2400A   8.5851   5.7615   3.9742  0.253  0.99  -0.308    600.  0.126E+02  0.847E+00  0.147E-03  0.211E-05   15  45  87   13  31 115   19  42  57    0.000    0.000       0
+  0    807 01:05:42.49   5.2300A   8.5972   6.2976   4.0053  0.253  0.99  -0.306    600.  0.126E+02  0.846E+00  0.147E-03  0.211E-05   15  45  88   13  31 115   19  42  57    0.000    0.000       0
+  0    808 01:05:47.87   5.3800A   8.3585   6.2931   4.0745  0.253  0.99  -0.307    600.  0.126E+02  0.845E+00  0.150E-03  0.216E-05   15  45  88   13  31 115   14  36 101    0.000    0.000       0
+  0    809 01:05:53.04   5.1700A   8.7047   5.7071   4.0516  0.253  0.99  -0.309    600.  0.126E+02  0.844E+00  0.145E-03  0.209E-05   15  45  89   13  31 115   19  42  57    0.000    0.000       0
+  0    810 01:05:58.44   5.4000A   8.3407   6.5647   4.0704  0.253  0.99  -0.309    600.  0.126E+02  0.843E+00  0.151E-03  0.216E-05   15  45  89   13  32 115   19  42  57    0.000    0.000       0
+  0    811 01:06:03.97   5.5300A   8.1424   7.0062   4.0675  0.253  0.99  -0.307    600.  0.126E+02  0.842E+00  0.154E-03  0.219E-05   15  45  90   13  32 115   19  42  57    0.000    0.000       0
+  0    812 01:06:09.27   5.3000A   8.4879   6.7038   4.0605  0.252  0.99  -0.308    600.  0.126E+02  0.841E+00  0.148E-03  0.210E-05   15  45  91   13  32 115   19  42  57    0.000    0.000       0
+  0    813 01:06:14.73   5.4600A   8.2367   6.2241   4.0645  0.252  0.99  -0.312    600.  0.126E+02  0.840E+00  0.152E-03  0.214E-05   15  45  91   13  33 115   19  42  57    0.000    0.000       0
+  0    814 01:06:20.23   5.5000A   8.1756   6.9944   4.0585  0.252  0.99  -0.322    600.  0.126E+02  0.838E+00  0.153E-03  0.215E-05   15  45  92   13  33 115   19  42  57    0.000    0.000       0
+  0    815 01:06:25.97   5.7400A   7.8408   6.9516   4.0600  0.252  1.02  -0.320    650.  0.126E+02  0.837E+00  0.159E-03  0.222E-05   15  45  93   13  33 115   19  42  57    0.000    0.000       0
+  0    816 01:06:31.65   5.6800A   7.9188   6.0554   4.0977  0.252  1.02  -0.313    650.  0.126E+02  0.836E+00  0.157E-03  0.221E-05   15  45  93   13  33 115    8  26 100    0.000    0.000       0
+  0    817 01:06:37.59   5.9400A   7.5695   6.8003   4.0921  0.251  1.02  -0.319    650.  0.126E+02  0.835E+00  0.164E-03  0.230E-05   17  45  75   13  34 115   19  42  57    0.000    0.000       0
+  0    818 01:06:43.16   5.5700A   8.0728   6.7762   4.1277  0.251  1.02  -0.310    650.  0.126E+02  0.834E+00  0.154E-03  0.218E-05   14  45  92   13  34 115   19  42  57    0.000    0.000       0
+  0    819 01:06:48.54   5.3800A   8.3650   5.9485   4.1919  0.251  1.02  -0.310    650.  0.126E+02  0.833E+00  0.149E-03  0.210E-05   14  45  92   13  34 115   19  42  57    0.000    0.000       0
+  0    820 01:06:54.24   5.7000A   7.8974   5.7793   4.2587  0.251  1.02  -0.310    650.  0.126E+02  0.832E+00  0.157E-03  0.219E-05   15  44  89   13  35 115   19  42  57    0.000    0.000       0
+  0    821 01:07:00.16   5.9200A   7.5989   5.4387   4.3112  0.251  1.02  -0.312    650.  0.126E+02  0.831E+00  0.163E-03  0.226E-05   15  44  89   13  35 115   19  42  57    0.000    0.000       0
+  0    822 01:07:05.96   5.8000A   7.7544   5.9692   4.3527  0.250  1.02  -0.315    650.  0.126E+02  0.830E+00  0.160E-03  0.221E-05   15  44  91   13  36 115   19  42  57    0.000    0.000       0
+  0    823 01:07:11.79   5.8300A   7.7192   6.0830   4.3809  0.250  1.02  -0.316    650.  0.126E+02  0.829E+00  0.161E-03  0.221E-05   15  44  92   13  36 115   19  42  57    0.000    0.000       0
+  0    824 01:07:17.50   5.7100A   7.8832   5.5833   4.3765  0.250  1.02  -0.317    650.  0.126E+02  0.828E+00  0.158E-03  0.216E-05   15  44  92   13  35 113   19  42  57    0.000    0.000       0
+  0    825 01:07:23.16   5.6600A   7.9493   5.9396   4.3492  0.250  1.02  -0.322    650.  0.126E+02  0.827E+00  0.156E-03  0.214E-05   15  44  93   13  37 115   19  42  57    0.000    0.000       0
+  0    826 01:07:28.93   5.7700A   7.7931   6.4532   4.2995  0.250  1.02  -0.320    650.  0.126E+02  0.826E+00  0.159E-03  0.218E-05   14  51  87   13  37 115   19  42  57    0.000    0.000       0
+  0    827 01:07:34.40   5.4700A   8.2318   6.2356   4.2318  0.249  1.02  -0.318    650.  0.126E+02  0.825E+00  0.151E-03  0.209E-05   14  51  87   13  37 115   19  42  57    0.000    0.000       0
+  0    828 01:07:40.04   5.6400A   7.9767  -5.6621   4.1817  0.249  1.02  -0.328    650.  0.126E+02  0.824E+00  0.155E-03  0.215E-05   14  51  87   15  35  54   19  42  57    0.000    0.000       0
+  0    829 01:07:45.86   5.8200A   7.7357   6.1060   4.1257  0.249  1.02  -0.317    650.  0.126E+02  0.823E+00  0.160E-03  0.221E-05   15  47  89   13  37 113   19  42  57    0.000    0.000       0
+  0    830 01:07:51.21   5.3500A   8.4162   6.3270   4.0834  0.249  1.02  -0.316    650.  0.126E+02  0.822E+00  0.148E-03  0.206E-05   15  37 109   13  37 113   19  42  57    0.000    0.000       0
+  0    831 01:07:56.54   5.3300A   8.4482   5.9007   4.0822  0.249  0.90  -0.318    450.  0.126E+02  0.821E+00  0.147E-03  0.203E-05   15  37 109   13  37 113   19  42  57    0.000    0.000       0
+  0    832 01:08:01.91   5.3700A   8.3783  -5.6761   4.0846  0.249  0.90  -0.317    450.  0.126E+02  0.820E+00  0.148E-03  0.203E-05   15  37 110   16  37  54   19  42  57    0.000    0.000       0
+  0    833 01:08:07.11   5.2000A   8.6590  -5.6058   4.0945  0.248  0.90  -0.316    450.  0.126E+02  0.820E+00  0.144E-03  0.198E-05   15  37 110   16  37  54   19  42  57    0.000    0.000       0
+  0    834 01:08:12.61   5.5000A   8.1850   5.5850   4.1151  0.248  0.90  -0.318    450.  0.126E+02  0.819E+00  0.152E-03  0.207E-05   15  37 110   13  38 113   19  42  57    0.000    0.000       0
+  0    835 01:08:18.24   5.6300A   7.9972  -5.2844   4.1242  0.248  0.90  -0.322    450.  0.126E+02  0.818E+00  0.155E-03  0.212E-05   15  43  94   16  37  54   19  42  57    0.000    0.000       0
+  0    836 01:08:23.80   5.5600A   8.1008  -5.2800   4.1337  0.248  0.90  -0.330    450.  0.125E+02  0.817E+00  0.153E-03  0.210E-05   14  51  91   17  37  55   19  42  57    0.000    0.000       0
+  0    837 01:08:29.08   5.2800A   8.5148   5.5109   4.1449  0.248  0.90  -0.340    450.  0.125E+02  0.816E+00  0.146E-03  0.201E-05   15  43  95   13  39 113   19  42  57    0.000    0.000       0
+  0    838 01:08:34.45   5.3700A   8.3870   5.5597   4.1593  0.248  0.90  -0.331    450.  0.125E+02  0.815E+00  0.148E-03  0.202E-05   15  43  95   13  39 113   19  42  57    0.000    0.000       0
+  0    839 01:08:39.71   5.2600A   8.5604  -5.2840   4.1649  0.248  1.02  -0.332    650.  0.125E+02  0.815E+00  0.145E-03  0.198E-05   15  44  81   15  35  54   19  42  57    0.000    0.000       0
+  0    840 01:08:45.29   5.5800A   8.0609  -5.2535   4.1774  0.247  1.02  -0.336    650.  0.125E+02  0.814E+00  0.153E-03  0.207E-05   15  44  82   15  35  54   19  42  57    0.000    0.000       0
+  0    841 01:08:50.56   5.2700A   8.5413  -5.1681   4.1875  0.247  1.02  -0.351    650.  0.125E+02  0.813E+00  0.145E-03  0.197E-05   15  44  82   15  35  54   19  42  57    0.000    0.000       0
+  0    842 01:08:56.15   5.5900A   8.0525  -5.1210   4.2213  0.247  1.02  -0.387    650.  0.125E+02  0.812E+00  0.153E-03  0.205E-05   15  44  83   17  37  55   19  42  57    0.000    0.000       0
+  0    843 01:09:01.67   5.5200A   8.1484  -5.1194   4.2560  0.247  1.02  -0.338    650.  0.125E+02  0.811E+00  0.151E-03  0.202E-05   15  44  83   17  37  55   19  42  57    0.000    0.000       0
+  0    844 01:09:07.02   5.3500A   8.4151  -5.1475   4.3104  0.247  1.02  -0.333    650.  0.125E+02  0.810E+00  0.147E-03  0.196E-05   15  44  84   17  37  55   19  42  57    0.000    0.000       0
+  0    845 01:09:12.58   5.5600A   8.0947  -5.1919   4.3762  0.247  1.02  -0.332    650.  0.125E+02  0.810E+00  0.152E-03  0.201E-05   15  44  85   17  37  55   19  42  57    0.000    0.000       0
+  0    846 01:09:18.08   5.5000A   8.1764  -5.2366   4.4386  0.247  1.02  -0.335    650.  0.125E+02  0.809E+00  0.150E-03  0.199E-05   15  44  85   17  37  55   19  42  57    0.000    0.000       0
+  0    847 01:09:23.47   5.3900A   8.3529  -5.2792   4.5039  0.247  1.02  -0.333    650.  0.125E+02  0.808E+00  0.147E-03  0.195E-05   15  44  86   17  37  55   19  42  57    0.000    0.000       0
+  0    848 01:09:29.11   5.6400A   7.9762  -5.3077   4.5618  0.247  1.02  -0.333    650.  0.125E+02  0.807E+00  0.154E-03  0.203E-05   15  44  86   17  37  55   19  42  57    0.000    0.000       0
+  0    849 01:09:34.59   5.4800A   8.2169  -5.3075   4.5956  0.247  1.02  -0.336    650.  0.125E+02  0.806E+00  0.150E-03  0.198E-05   15  42 103   17  37  55   19  42  57    0.000    0.000       0
+  0    850 01:09:40.07   5.4800A   8.2141  -5.2859   4.6211  0.247  1.02  -0.337    650.  0.125E+02  0.806E+00  0.150E-03  0.198E-05   15  42 103   17  37  55   19  42  57    0.000    0.000       0
+  0    851 01:09:45.65   5.5800A   8.0611  -5.2363   4.6224  0.246  1.02  -0.339    650.  0.125E+02  0.805E+00  0.152E-03  0.202E-05   14  53 104   17  37  55   19  42  57    0.000    0.000       0
+  0    852 01:09:51.02   5.3700A   8.3836  -5.1644   4.5988  0.246  1.02  -0.341    650.  0.125E+02  0.804E+00  0.147E-03  0.195E-05   15  42 104   17  37  55   19  42  57    0.000    0.000       0
+  0    853 01:09:56.36   5.3400A   8.4266  -5.1950   4.5701  0.246  1.02  -0.338    650.  0.125E+02  0.803E+00  0.146E-03  0.194E-05   15  42 104    1  26  95   19  42  57    0.000    0.000       0
+  0    854 01:10:01.89   5.5300A   8.1372  -5.4015   4.5250  0.246  1.02  -0.334    650.  0.125E+02  0.802E+00  0.151E-03  0.200E-05   13  53  83    1  27  96   19  42  57    0.000    0.000       0
+  0    855 01:10:07.57   5.6800A   7.9275  -5.6823   4.4631  0.246  1.02  -0.331    650.  0.125E+02  0.802E+00  0.154E-03  0.206E-05   15  44  93    1  27  96   19  42  57    0.000    0.000       0
+  0    856 01:10:13.16   5.5900A   8.0531  -6.0380   4.3993  0.246  1.02  -0.328    650.  0.125E+02  0.801E+00  0.152E-03  0.203E-05   13  53  84    1  26  96   19  42  57    0.000    0.000       0
+  0    857 01:10:18.54   5.3800A   8.3659  -6.1021   4.3502  0.246  1.02  -0.326    650.  0.125E+02  0.800E+00  0.146E-03  0.195E-05   15  44  94    1  25  96   19  42  57    0.000    0.000       0
+  0    858 01:10:24.09   5.5500A   8.1071  -6.1064   4.3174  0.246  1.02  -0.327    650.  0.125E+02  0.799E+00  0.150E-03  0.200E-05   15  44  94    1  25  96   19  42  57    0.000    0.000       0
+  0    859 01:10:29.48   5.3900A   8.3523  -5.4894   4.2847  0.246  1.02  -0.322    650.  0.125E+02  0.799E+00  0.146E-03  0.196E-05   14  51  98    1  24  96   19  42  57    0.000    0.000       0
+  0    860 01:10:35.00   5.5200A   8.1535  -5.7474   4.2751  0.246  1.02  -0.320    650.  0.125E+02  0.798E+00  0.150E-03  0.199E-05   14  51  98    1  24  97   19  42  57    0.000    0.000       0
+  0    861 01:10:40.87   5.8700A   7.6642  -6.3653   4.2710  0.246  1.02  -0.319    650.  0.125E+02  0.797E+00  0.158E-03  0.211E-05   14  51  99    1  24  97   19  42  57    0.000    0.000       0
+  0    862 01:10:46.64   5.7700A   7.8010  -5.7682   4.2710  0.246  1.02  -0.318    650.  0.125E+02  0.797E+00  0.156E-03  0.208E-05   14  51 111    1  24  97   19  42  57    0.000    0.000       0
+  0    863 01:10:52.34   5.7000A   7.8884  -6.0201   4.2894  0.246  1.02  -0.318    650.  0.125E+02  0.796E+00  0.154E-03  0.206E-05   13  53  88    1  24  98   19  42  57    0.000    0.000       0
+  0    864 01:10:57.74   5.4000A   8.3292  -5.6940   4.3100  0.246  1.02  -0.319    650.  0.125E+02  0.795E+00  0.147E-03  0.196E-05   15  45  94    1  23  98   19  42  57    0.000    0.000       0
+  0    865 01:11:03.15   5.4100A   8.3204  -5.5911   4.3343  0.246  1.02  -0.320    650.  0.125E+02  0.795E+00  0.147E-03  0.196E-05   15  45  94    1  23  98   19  42  57    0.000    0.000       0
+  0    866 01:11:08.50   5.3500A   8.4097  -5.3512   4.3460  0.246  1.02  -0.320    650.  0.125E+02  0.794E+00  0.145E-03  0.195E-05   14  51 113    1  23  99   19  42  57    0.000    0.000       0
+  0    867 01:11:13.93   5.4300A   8.2857  -5.6292   4.3528  0.246  1.02  -0.322    650.  0.125E+02  0.794E+00  0.147E-03  0.199E-05   14  51 113    1  23  99   19  42  57    0.000    0.000       0
+  0    868 01:11:19.33   5.4000A   8.3384  -5.4868   4.3496  0.246  1.02  -0.321    650.  0.125E+02  0.793E+00  0.147E-03  0.199E-05   14  51 106   16  37  54   19  42  57    0.000    0.000       0
+  0    869 01:11:25.08   5.7500A   7.8228  -5.5043   4.3437  0.246  1.02  -0.327    650.  0.125E+02  0.793E+00  0.155E-03  0.212E-05   14  50  98   15  35  54   19  42  57    0.000    0.000       0
+  0    870 01:11:30.58   5.5000A   8.1825  -5.4709   4.3204  0.246  1.02  -0.321    650.  0.125E+02  0.792E+00  0.149E-03  0.206E-05   16  42  92   15  35  54   19  42  57    0.000    0.000       0
+  0    871 01:11:36.28   5.7000A   7.8981  -5.2451   4.3135  0.246  1.02  -0.316    650.  0.125E+02  0.792E+00  0.154E-03  0.212E-05   15  43 103   15  35  54   19  42  57    0.000    0.000       0
+  0    872 01:11:41.92   5.6400A   7.9766  -5.0782   4.2935  0.246  0.96  -0.315    550.  0.125E+02  0.792E+00  0.152E-03  0.210E-05   15  43 104   17  37  55   19  42  57    0.000    0.000       0
+  0    873 01:11:47.43   5.5100A   8.1704  -5.0985   4.2828  0.246  0.96  -0.316    550.  0.125E+02  0.791E+00  0.149E-03  0.206E-05   15  43 104   17  37  55   19  42  57    0.000    0.000       0
+  0    874 01:11:53.22   5.7900A   7.7738  -5.1303   4.2779  0.246  0.96  -0.322    550.  0.125E+02  0.791E+00  0.156E-03  0.214E-05   14  49 100   17  37  55   19  42  57    0.000    0.000       0
+  0    875 01:11:58.97   5.7500A   7.8213  -5.1648   4.2598  0.246  0.96  -0.318    550.  0.125E+02  0.791E+00  0.155E-03  0.214E-05   15  43 105   17  37  55   19  42  57    0.000    0.000       0
+  0    876 01:12:04.73   5.7600A   7.8087  -5.2122   4.2491  0.246  0.93  -0.318    500.  0.125E+02  0.790E+00  0.154E-03  0.214E-05   14  49 101   17  37  55   19  42  57    0.000    0.000       0
+  0    877 01:12:10.62   5.8900A   7.6374  -5.2675   4.2343  0.246  0.93  -0.323    500.  0.125E+02  0.790E+00  0.157E-03  0.218E-05   14  49 102   17  37  55   19  42  57    0.000    0.000       0
+  0    878 01:12:16.24   5.6200A   8.0107  -5.3255   4.2119  0.246  0.93  -0.331    500.  0.125E+02  0.790E+00  0.150E-03  0.211E-05   14  49 102   17  37  55   19  42  57    0.000    0.000       0
+  0    879 01:12:21.97   5.7300A   7.8516  -5.3805   4.2034  0.246  0.93  -0.323    500.  0.125E+02  0.790E+00  0.153E-03  0.215E-05   15  43 109   17  37  55   19  42  57    0.000    0.000       0
+  0    880 01:12:28.07   6.1000A   7.3731  -5.4042   4.1923  0.246  0.93  -0.327    500.  0.125E+02  0.790E+00  0.162E-03  0.229E-05   16  42 101   17  37  55   19  42  57    0.000    0.000       0
+  0    881 01:12:34.08   6.0100A   7.4834  -5.3758   4.1901  0.246  0.93  -0.326    500.  0.125E+02  0.789E+00  0.160E-03  0.228E-05   14  48  95   17  37  55   19  42  57    0.000    0.000       0
+  0    882 01:12:40.06   5.9800A   7.5247  -5.3103   4.2280  0.246  0.93  -0.324    500.  0.125E+02  0.789E+00  0.159E-03  0.228E-05   16  42 103   17  37  55   19  42  57    0.000    0.000       0
+  0    883 01:12:46.12   6.0600A   7.4256  -5.2129   4.2935  0.246  0.93  -0.324    500.  0.125E+02  0.789E+00  0.161E-03  0.231E-05   16  42 103   17  37  55   19  42  57    0.000    0.000       0
+  0    884 01:12:52.08   5.9600A   7.5477  -5.1131   4.3770  0.246  0.93  -0.324    500.  0.125E+02  0.789E+00  0.158E-03  0.228E-05   14  55  89   16  37  54   19  42  57    0.000    0.000       0
+  0    885 01:12:58.29   6.2100A   7.2495  -5.1120   4.4705  0.246  0.93  -0.321    500.  0.125E+02  0.789E+00  0.164E-03  0.237E-05   15  49  70   16  36  54   19  42  57    0.000    0.000       0
+  0    886 01:13:04.48   6.1900A   7.2691  -5.0048   4.5445  0.246  0.93  -0.325    500.  0.125E+02  0.789E+00  0.163E-03  0.237E-05   17  46  69   16  36  54   19  42  57    0.000    0.000       0
+  0    887 01:13:10.39   5.9100A   7.6111  -4.9909   4.5979  0.246  0.96  -0.327    550.  0.125E+02  0.789E+00  0.157E-03  0.227E-05   17  46  69   17  37  55   19  42  57    0.000    0.000       0
+  0    888 01:13:16.35   5.9600A   7.5556  -5.0418   4.6272  0.246  0.96  -0.327    550.  0.125E+02  0.788E+00  0.158E-03  0.228E-05   17  46  69   17  37  55   19  42  57    0.000    0.000       0
+  0    889 01:13:22.39   6.0400A   7.4499  -5.0964   4.6146  0.246  0.90  -0.324    450.  0.125E+02  0.788E+00  0.159E-03  0.231E-05   17  46  70   17  37  55   19  42  57    0.000    0.000       0
+  0    890 01:13:28.36   5.9700A   7.5431   5.1813   4.5740  0.246  0.90  -0.323    450.  0.125E+02  0.788E+00  0.158E-03  0.228E-05   17  48  68    1  29  79   19  42  57    0.000    0.000       0
+  0    891 01:13:34.31   5.9500A   7.5681   5.2700   4.5253  0.246  0.90  -0.322    450.  0.125E+02  0.788E+00  0.157E-03  0.227E-05   16  47  72    1  29  79   19  42  57    0.000    0.000       0
+  0    892 01:13:40.27   5.9600A   7.5471   5.3110   4.4717  0.246  0.90  -0.320    450.  0.125E+02  0.788E+00  0.157E-03  0.227E-05   16  47  72    1  29  79   19  42  57    0.000    0.000       0
+  0    893 01:13:46.32   6.0500A   7.4376   5.2844   4.4207  0.246  0.90  -0.327    450.  0.125E+02  0.787E+00  0.159E-03  0.232E-05   17  29 135    1  29  80   19  42  57    0.000    0.000       0
+  0    894 01:13:52.42   6.1000A   7.3725   5.3393   4.3770  0.246  0.90  -0.331    450.  0.125E+02  0.787E+00  0.160E-03  0.235E-05   17  48  70    1  30  80   19  42  57    0.000    0.000       0
+  0    895 01:13:58.52   6.1000A   7.3739   5.3663   4.3523  0.246  0.90  -0.332    450.  0.125E+02  0.787E+00  0.160E-03  0.235E-05   17  29 136    1  30  80   19  42  57    0.000    0.000       0
+  0    896 01:14:04.79   6.2700A   7.1733   5.3100   4.3552  0.246  0.90  -0.387    450.  0.125E+02  0.786E+00  0.164E-03  0.242E-05   17  48  71    1  30  80   19  42  57    0.000    0.000       0
+  0    897 01:14:10.97   6.1800A   7.2776  -5.3793   4.3864  0.246  0.90  -0.330    450.  0.125E+02  0.786E+00  0.162E-03  0.240E-05   17  45  77   15  36  54   19  42  57    0.000    0.000       0
+  0    898 01:14:17.12   6.1500A   7.3118  -5.5307   4.4630  0.246  0.90  -0.333    450.  0.125E+02  0.785E+00  0.161E-03  0.239E-05   17  47  73   15  36  54   19  42  57    0.000    0.000       0
+  0    899 01:14:23.21   6.0900A   7.3878  -5.6074   4.5739  0.246  0.90  -0.342    450.  0.124E+02  0.785E+00  0.160E-03  0.239E-05   14  51  97   15  36  54   19  42  57    0.000    0.000       0
+  0    900 01:14:29.32   6.1100A   7.3677  -5.6000   4.7102  0.246  0.90  -0.329    450.  0.124E+02  0.785E+00  0.160E-03  0.241E-05   16  56  83   15  36  54   19  42  57    0.000    0.000       0
+  0    901 01:14:35.48   6.1600A   7.3066  -5.6722   4.8538  0.245  1.05  -0.328    700.  0.124E+02  0.784E+00  0.162E-03  0.245E-05   17  43  93   15  35  54   19  42  57    0.000    0.000       0
+  0    902 01:14:41.31   5.8300A   7.7234  -5.8561   4.9847  0.245  1.05  -0.327    700.  0.124E+02  0.784E+00  0.153E-03  0.235E-05   16  56  84   15  35  54   19  42  57    0.000    0.000       0
+  0    903 01:14:47.17   5.8600A   7.6738  -5.8716   5.0902  0.245  1.05  -0.331    700.  0.124E+02  0.783E+00  0.154E-03  0.236E-05   16  56  84   15  35  54   19  42  57    0.000    0.000       0
+  0    904 01:14:53.31   6.1400A   7.3340  -5.7400   5.1414  0.245  1.05  -0.332    700.  0.124E+02  0.783E+00  0.161E-03  0.246E-05   16  43  93   15  35  54   19  42  57    0.000    0.000       0
+  0    905 01:14:59.14   5.8300A   7.7203  -5.4988   5.1290  0.245  1.05  -0.332    700.  0.124E+02  0.782E+00  0.153E-03  0.236E-05   16  43  93   15  35  54   19  42  57    0.000    0.000       0
+  0    906 01:15:05.11   5.9700A   7.5402  -5.3161   5.0860  0.245  0.90  -0.328    450.  0.124E+02  0.782E+00  0.156E-03  0.239E-05   16  43  93   16  36  54   19  42  57    0.000    0.000       0
+  0    907 01:15:11.18   6.0700A   7.4121  -5.3634   4.9815  0.245  0.90  -0.329    450.  0.124E+02  0.782E+00  0.159E-03  0.242E-05   16  30 137   16  36  54   19  42  57    0.000    0.000       0
+  0    908 01:15:16.92   5.7400A   7.8442  -5.3196   4.8323  0.245  0.90  -0.323    450.  0.124E+02  0.781E+00  0.151E-03  0.229E-05   16  30 137   16  36  54   19  42  57    0.000    0.000       0
+  0    909 01:15:22.72   5.8000A   7.7647  -5.3183   4.6793  0.245  1.02  -0.322    650.  0.124E+02  0.781E+00  0.152E-03  0.229E-05   16  43  95   17  37  55   19  42  57    0.000    0.000       0
+  0    910 01:15:28.81   6.0900A   7.3865  -5.3756   4.4956  0.245  1.02  -0.323    650.  0.124E+02  0.780E+00  0.159E-03  0.238E-05   17  46  65   17  37  55   19  42  57    0.000    0.000       0
+  0    911 01:15:34.90   6.0900A   7.3931  -5.4626   4.2901  0.245  1.02  -0.322    650.  0.124E+02  0.780E+00  0.159E-03  0.239E-05   17  46  66   17  37  55   19  42  57    0.000    0.000       0
+  0    912 01:15:40.93   6.0300A   7.4609  -5.5771   4.4447  0.245  1.02  -0.321    650.  0.124E+02  0.779E+00  0.157E-03  0.237E-05   17  46  66   17  37  55    6  43 113    0.000    0.000       0
+  0    913 01:15:46.88   5.9500A   7.5655  -5.6848   4.6444  0.245  1.02  -0.321    650.  0.124E+02  0.779E+00  0.156E-03  0.234E-05   17  46  68   17  37  55    6  42 113    0.000    0.000       0
+  0    914 01:15:52.75   5.8700A   7.6689  -5.7456   4.8431  0.245  1.02  -0.323    650.  0.124E+02  0.779E+00  0.154E-03  0.231E-05   17  46  68   17  37  55    6  42 113    0.000    0.000       0
+  0    915 01:15:58.58   5.8300A   7.7145  -5.7339   4.7122  0.244  0.99  -0.326    600.  0.124E+02  0.778E+00  0.153E-03  0.229E-05   18  37 107   17  37  55    6  42 113    0.000    0.000       0
+  0    916 01:16:04.49   5.9100A   7.6100  -5.6495   4.4732  0.244  0.99  -0.328    600.  0.124E+02  0.778E+00  0.155E-03  0.232E-05   16  44  96   17  37  55    6  41 113    0.000    0.000       0
+  0    917 01:16:10.22   5.7300A   7.8563  -5.5096   4.5040  0.244  0.99  -0.324    600.  0.124E+02  0.777E+00  0.150E-03  0.226E-05   14  41 109   17  37  55    6  41 113    0.000    0.000       0
+  0    918 01:16:16.05   5.8300A   7.7205  -5.3592   4.4618  0.244  0.99  -0.325    600.  0.124E+02  0.777E+00  0.153E-03  0.229E-05   17  46  69   17  37  55    7  42 114    0.000    0.000       0
+  0    919 01:16:21.83   5.7800A   7.7865  -5.2050   4.4172  0.244  0.99  -0.326    600.  0.124E+02  0.777E+00  0.151E-03  0.228E-05   16  44  98   17  37  55    7  42 114    0.000    0.000       0
+  0    920 01:16:27.83   6.0000A   7.4994  -5.0748   4.1880  0.244  0.99  -0.326    600.  0.124E+02  0.776E+00  0.157E-03  0.236E-05   17  46  69   17  37  55    7  41 114    0.000    0.000       0
+  0    921 01:16:33.87   6.0400A   7.4483  -4.9686   4.3796  0.244  0.99  -0.325    600.  0.124E+02  0.776E+00  0.157E-03  0.239E-05   16  44  99   17  37  55    7  41 114    0.000    0.000       0
+  0    922 01:16:39.75   5.8800A   7.6521  -4.9279   4.2843  0.244  0.99  -0.325    600.  0.124E+02  0.776E+00  0.154E-03  0.234E-05   18  36 106   15  36  54    7  41 114    0.000    0.000       0
+  0    923 01:16:45.72   5.9700A   7.5337  -5.0552   4.0365  0.244  0.99  -0.324    600.  0.124E+02  0.775E+00  0.156E-03  0.236E-05   18  36 106   15  36  54   19  43  58    0.000    0.000       0
+  0    924 01:16:51.74   6.0200A   7.4809  -5.1237   4.0985  0.244  0.99  -0.329    600.  0.124E+02  0.775E+00  0.157E-03  0.238E-05   17  46  67   15  36  54    7  40 114    0.000    0.000       0
+  0    925 01:16:57.73   5.9900A   7.5065  -5.2241   4.1241  0.244  0.99  -0.328    600.  0.124E+02  0.775E+00  0.156E-03  0.236E-05   16  42  85   16  37  54    8  41 115    0.000    0.000       0
+  0    926 01:17:03.78   6.0500A   7.4409  -5.3622   4.0982  0.244  0.99  -0.329    600.  0.124E+02  0.774E+00  0.157E-03  0.236E-05   17  38 100   16  37  54    8  41 115    0.000    0.000       0
+  0    927 01:17:09.69   5.9100A   7.6109  -5.4243   3.9874  0.244  0.99  -0.328    600.  0.124E+02  0.774E+00  0.154E-03  0.230E-05   16  41 106   16  37  54   19  42  57    0.000    0.000       0
+  0    928 01:17:15.55   5.8600A   7.6800  -5.4161   3.9896  0.243  0.99  -0.333    600.  0.124E+02  0.773E+00  0.153E-03  0.226E-05   16  41 106   16  37  54   19  42  57    0.000    0.000       0
+  0    929 01:17:21.31   5.7600A   7.8132  -5.3507   4.0051  0.243  0.99  -0.331    600.  0.124E+02  0.773E+00  0.150E-03  0.221E-05   16  42  88   16  37  54   19  42  57    0.000    0.000       0
+  0    930 01:17:27.07   5.7600A   7.8166  -5.2509   4.0400  0.243  0.99  -0.335    600.  0.124E+02  0.773E+00  0.150E-03  0.221E-05   16  42  91   16  37  54   19  42  57    0.000    0.000       0
+  0    931 01:17:32.76   5.6900A   7.9020  -5.1784   4.0929  0.243  0.99  -0.336    600.  0.124E+02  0.772E+00  0.148E-03  0.218E-05   17  40 103   17  37  55   19  42  57    0.000    0.000       0
+  0    932 01:17:38.29   5.5300A   8.1342  -5.1735   4.1652  0.243  0.99  -0.333    600.  0.124E+02  0.772E+00  0.144E-03  0.212E-05   16  42  92   17  37  55   19  42  57    0.000    0.000       0
+  0    933 01:17:43.80   5.5100A   8.1639  -5.1929   4.2512  0.243  0.99  -0.336    600.  0.124E+02  0.772E+00  0.144E-03  0.212E-05   16  42  92   17  37  55   19  42  57    0.000    0.000       0
+  0    934 01:17:49.45   5.6500A   7.9629  -5.2320   4.3397  0.243  0.99  -0.333    600.  0.124E+02  0.771E+00  0.147E-03  0.218E-05   17  40 105   17  37  55   19  42  57    0.000    0.000       0
+  0    935 01:17:54.94   5.4900A   8.1998  -5.2830   4.4207  0.243  0.99  -0.331    600.  0.124E+02  0.771E+00  0.143E-03  0.214E-05   17  40 105   17  37  55   19  42  57    0.000    0.000       0
+  0    936 01:18:00.69   5.7500A   7.8286  -5.3364   4.4899  0.243  0.99  -0.329    600.  0.124E+02  0.770E+00  0.150E-03  0.223E-05   16  42  94   17  37  55   19  42  57    0.000    0.000       0
+  0    937 01:18:06.46   5.7700A   7.7990  -5.3632   4.5195  0.243  0.99  -0.330    600.  0.124E+02  0.770E+00  0.150E-03  0.226E-05   16  42  94   17  37  55   19  42  57    0.000    0.000       0
+  0    938 01:18:12.49   6.0300A   7.4598  -5.3570   4.5120  0.243  0.99  -0.334    600.  0.124E+02  0.770E+00  0.156E-03  0.235E-05   16  42  94   17  37  55   19  42  57    0.000    0.000       0
+  0    939 01:18:18.38   5.8900A   7.6389  -5.3022   4.4502  0.243  0.99  -0.332    600.  0.124E+02  0.769E+00  0.153E-03  0.231E-05   16  20   3   17  37  55   19  42  57    0.000    0.000       0
+  0    940 01:18:24.30   5.9200A   7.6035  -5.2284   4.3663  0.243  0.96  -0.335    550.  0.124E+02  0.769E+00  0.154E-03  0.231E-05   16  20   3   15  35  54   19  42  57    0.000    0.000       0
+  0    941 01:18:30.12   5.8200A   7.7324  -5.1266   4.2643  0.243  0.96  -0.344    550.  0.124E+02  0.768E+00  0.151E-03  0.227E-05   16  44  98   17  37  55   19  42  57    0.000    0.000       0
+  0    942 01:18:35.90   5.7800A   7.7808  -5.0417   4.1796  0.243  0.96  -0.343    550.  0.124E+02  0.768E+00  0.150E-03  0.224E-05   16  44  98   17  37  55   19  42  57    0.000    0.000       0
+  0    943 01:18:41.83   5.9300A   7.5889  -4.9774   4.1282  0.243  0.96  -0.342    550.  0.124E+02  0.767E+00  0.154E-03  0.227E-05   16  44  99   17  37  55   19  42  57    0.000    0.000       0
+  0    944 01:18:47.69   5.8600A   7.6774  -4.9344   4.1204  0.243  0.96  -0.331    550.  0.124E+02  0.767E+00  0.152E-03  0.224E-05   16  44  99   17  37  55   19  42  57    0.000    0.000       0
+  0    945 01:18:53.50   5.8100A   7.7465  -4.9158   4.1757  0.243  0.96  -0.330    550.  0.124E+02  0.767E+00  0.151E-03  0.220E-05   16  41 102   17  37  55   19  42  57    0.000    0.000       0
+  0    946 01:18:59.35   5.8500A   7.6973  -4.9074   4.2847  0.243  0.96  -0.332    550.  0.124E+02  0.766E+00  0.152E-03  0.220E-05   16  41 102   17  37  55   19  42  57    0.000    0.000       0
+  0    947 01:19:05.15   5.8000A   7.7581  -4.9006   4.4360  0.243  0.96  -0.337    550.  0.124E+02  0.766E+00  0.150E-03  0.218E-05   16  41 103   17  37  55   19  42  57    0.000    0.000       0
+  0    948 01:19:10.98   5.8300A   7.7190  -4.9002   4.6160  0.243  0.96  -0.335    550.  0.124E+02  0.766E+00  0.151E-03  0.219E-05   16  41 103   17  37  55   19  42  57    0.000    0.000       0
+  0    949 01:19:16.67   5.6900A   7.9106  -4.9125   4.7987  0.243  0.96  -0.346    550.  0.124E+02  0.765E+00  0.147E-03  0.214E-05   17  36 111   17  37  55   19  42  57    0.000    0.000       0
+  0    950 01:19:22.38   5.7100A   7.8795  -4.9453   4.9596  0.243  0.99  -0.348    600.  0.124E+02  0.765E+00  0.148E-03  0.215E-05   17  36 111   17  37  55   19  42  57    0.000    0.000       0
+  0    951 01:19:27.96   5.5800A   8.0689  -4.9888   5.0672  0.243  0.99  -0.356    600.  0.124E+02  0.765E+00  0.145E-03  0.211E-05   15  45 103   17  37  55   19  42  57    0.000    0.000       0
+  0    952 01:19:33.76   5.8000A   7.7547  -5.0274   5.1124  0.243  0.99  -0.345    600.  0.124E+02  0.765E+00  0.150E-03  0.218E-05   15  45 103   17  37  55   19  42  57    0.000    0.000       0
+  0    953 01:19:39.46   5.7000A   7.8884  -5.0310   5.0695  0.243  0.99  -0.339    600.  0.124E+02  0.764E+00  0.147E-03  0.217E-05   17  36 113   17  37  55   19  42  57    0.000    0.000       0
+  0    954 01:19:45.27   5.8100A   7.7424  -5.0538   4.9707  0.243  0.99  -0.334    600.  0.124E+02  0.764E+00  0.150E-03  0.221E-05   17  36 113   16  37  54   19  42  57    0.000    0.000       0
+  0    955 01:19:51.08   5.8100A   7.7387  -5.1380   4.8084  0.243  0.99  -0.335    600.  0.124E+02  0.764E+00  0.150E-03  0.221E-05   15  47 104   16  37  54   19  42  57    0.000    0.000       0
+  0    956 01:19:56.89   5.8100A   7.7454  -5.1510   4.6159  0.243  0.99  -0.330    600.  0.124E+02  0.764E+00  0.150E-03  0.219E-05   15  38 145   16  37  54   19  42  57    0.000    0.000       0
+  0    957 01:20:02.69   5.8000A   7.7531  -5.1074   4.4095  0.243  0.99  -0.327    600.  0.124E+02  0.764E+00  0.150E-03  0.217E-05   15  47 105   16  37  54   19  42  57    0.000    0.000       0
+  0    958 01:20:08.60   5.9100A   7.6089  -5.0330   4.2077  0.243  0.99  -0.327    600.  0.124E+02  0.764E+00  0.152E-03  0.220E-05   15  47 105   16  37  54   19  42  57    0.000    0.000       0
+  0    959 01:20:14.59   5.9900A   7.5183  -4.9511   4.0182  0.243  0.99  -0.330    600.  0.124E+02  0.763E+00  0.154E-03  0.221E-05   17  39  92   16  37  54   19  42  57    0.000    0.000       0
+  0    960 01:20:20.36   5.7700A   7.8053  -4.8871   3.9889  0.243  0.99  -0.331    600.  0.124E+02  0.763E+00  0.149E-03  0.213E-05   15  47 107   16  37  54   19  43  58    0.000    0.000       0
+  0    961 01:20:26.27   5.9100A   7.6141  -4.8575   3.9512  0.243  0.93  -0.324    500.  0.124E+02  0.763E+00  0.152E-03  0.216E-05   17  39  93   16  37  54   19  43  58    0.000    0.000       0
+  0    962 01:20:32.08   5.8100A   7.7441  -4.8395   3.8822  0.243  0.93  -0.344    500.  0.124E+02  0.763E+00  0.150E-03  0.212E-05   15  43 112   16  37  54   19  43  58    0.000    0.000       0
+  0    963 01:20:38.00   5.9200A   7.5997  -4.8296   3.8011  0.243  0.96  -0.325    550.  0.124E+02  0.763E+00  0.152E-03  0.214E-05   17  39  94   16  37  54   19  43  58    0.000    0.000       0
+  0    964 01:20:43.75   5.7500A   7.8235   4.8557   3.8320  0.243  0.96  -0.325    550.  0.124E+02  0.763E+00  0.148E-03  0.208E-05   15  43 113    3  38 105   19  42  57    0.000    0.000       0
+  0    965 01:20:49.70   5.9500A   7.5584  -4.8709   3.9452  0.243  0.96  -0.352    550.  0.124E+02  0.762E+00  0.152E-03  0.213E-05   15  43 113   15  35  54   19  42  57    0.000    0.000       0
+  0    966 01:20:55.73   6.0300A   7.4572  -4.9395   4.0679  0.243  0.96  -0.327    550.  0.124E+02  0.762E+00  0.154E-03  0.215E-05   15  43 114   15  35  54   19  42  57    0.000    0.000       0
+  0    967 01:21:01.81   6.0800A   7.4008  -4.9800   4.1899  0.243  0.99  -0.338    600.  0.124E+02  0.762E+00  0.155E-03  0.216E-05   15  44  89   15  35  54   19  42  57    0.000    0.000       0
+  0    968 01:21:07.87   6.0600A   7.4252  -4.9577   4.2903  0.243  0.99  -0.332    600.  0.124E+02  0.762E+00  0.155E-03  0.215E-05   15  43 115   15  35  54   19  42  57    0.000    0.000       0
+  0    969 01:21:13.82   5.9500A   7.5633  -4.8497   4.3575  0.243  0.99  -0.327    600.  0.124E+02  0.761E+00  0.152E-03  0.212E-05   16  43 100   15  35  54   19  42  57    0.000    0.000       0
+  0    970 01:21:19.77   5.9500A   7.5655   4.8780   4.3894  0.243  0.99  -0.328    600.  0.124E+02  0.761E+00  0.152E-03  0.213E-05   15  45 104    1  41 103   19  42  57    0.000    0.000       0
+  0    971 01:21:25.58   5.8100A   7.7428  -4.9607   4.3842  0.244  0.99  -0.323    600.  0.124E+02  0.761E+00  0.149E-03  0.209E-05   16  43 101   14  35  53   19  42  57    0.000    0.000       0
+  0    972 01:21:31.41   5.8300A   7.7212  -5.0367   4.3591  0.244  0.99  -0.321    600.  0.124E+02  0.760E+00  0.149E-03  0.210E-05   16  43 102   17  37  55   19  42  57    0.000    0.000       0
+  0    973 01:21:37.04   5.6300A   7.9977  -5.1744   4.3115  0.244  0.99  -0.320    600.  0.124E+02  0.760E+00  0.145E-03  0.203E-05   16  43 102   17  37  55   19  42  57    0.000    0.000       0
+  0    974 01:21:42.76   5.7200A   7.8719  -5.2947   4.2620  0.244  0.99  -0.320    600.  0.124E+02  0.760E+00  0.147E-03  0.204E-05   16  43 102   17  37  55   19  42  57    0.000    0.000       0
+  0    975 01:21:48.74   5.9800A   7.5228  -5.3869   4.1942  0.244  0.90  -0.321    450.  0.124E+02  0.760E+00  0.153E-03  0.211E-05   16  43 103   17  37  55   19  42  57    0.000    0.000       0
+  0    976 01:21:54.68   5.9400A   7.5803  -5.4479   4.1082  0.244  0.90  -0.317    450.  0.124E+02  0.759E+00  0.152E-03  0.208E-05   16  43 103   17  37  55   19  42  57    0.000    0.000       0
+  0    977 01:22:00.71   6.0300A   7.4591  -5.4811   4.0270  0.244  0.90  -0.317    450.  0.124E+02  0.759E+00  0.154E-03  0.210E-05   15  47 104   17  37  55   19  42  57    0.000    0.000       0
+  0    978 01:22:06.67   5.9600A   7.5549  -5.4834   3.9370  0.244  0.90  -0.314    450.  0.124E+02  0.759E+00  0.152E-03  0.207E-05   16  43  80   17  37  55   19  42  57    0.000    0.000       0
+  0    979 01:22:12.63   5.9600A   7.5451  -5.4677   3.8559  0.244  0.90  -0.311    450.  0.124E+02  0.759E+00  0.152E-03  0.207E-05   16  45 105   17  37  55   19  42  57    0.000    0.000       0
+  0    980 01:22:18.56   5.9300A   7.5891  -5.4420   3.7859  0.244  0.90  -0.315    450.  0.123E+02  0.758E+00  0.151E-03  0.206E-05   16  45 106   17  37  55   19  42  57    0.000    0.000       0
+  0    981 01:22:24.45   5.8900A   7.6451  -5.4201   3.7428  0.244  0.90  -0.315    450.  0.123E+02  0.758E+00  0.150E-03  0.205E-05   16  45 106   17  37  55   19  42  57    0.000    0.000       0
+  0    982 01:22:30.30   5.8500A   7.6977  -5.4101   3.7370  0.244  0.90  -0.312    450.  0.123E+02  0.758E+00  0.149E-03  0.205E-05   14  51  88   17  37  55   19  42  57    0.000    0.000       0
+  0    983 01:22:36.07   5.7700A   7.7963  -5.4119   3.7739  0.244  0.90  -0.310    450.  0.123E+02  0.758E+00  0.147E-03  0.203E-05   14  51  88   17  37  55   19  42  57    0.000    0.000       0
+  0    984 01:22:41.92   5.8500A   7.6880  -5.4167   3.8533  0.244  0.90  -0.309    450.  0.123E+02  0.757E+00  0.149E-03  0.205E-05   14  51  89   17  37  55   19  42  57    0.000    0.000       0
+  0    985 01:22:47.52   5.6000A   8.0407  -5.4040   3.9657  0.245  0.90  -0.308    450.  0.123E+02  0.757E+00  0.143E-03  0.197E-05   16  42 112   17  37  55   19  42  57    0.000    0.000       0
+  0    986 01:22:53.09   5.5700A   8.0724  -5.3694   4.1047  0.245  0.90  -0.307    450.  0.123E+02  0.757E+00  0.143E-03  0.195E-05   16  42 112   17  37  55   19  42  57    0.000    0.000       0
+  0    987 01:22:58.78   5.6900A   7.9150  -5.2973   4.2479  0.245  0.90  -0.307    450.  0.123E+02  0.757E+00  0.145E-03  0.199E-05   14  51  90   17  37  55   19  42  57    0.000    0.000       0
+  0    988 01:23:04.57   5.7900A   7.7728  -5.1951   4.3843  0.245  1.02  -0.307    650.  0.123E+02  0.757E+00  0.148E-03  0.202E-05   14  51  91   17  37  55   19  42  57    0.000    0.000       0
+  0    989 01:23:10.34   5.7700A   7.7952   5.2042   4.5016  0.245  1.02  -0.308    650.  0.123E+02  0.757E+00  0.147E-03  0.201E-05   14  51  91    3  40 104   19  42  57    0.000    0.000       0
+  0    990 01:23:16.06   5.7200A   7.8622   5.1706   4.5878  0.245  1.02  -0.310    650.  0.123E+02  0.756E+00  0.146E-03  0.200E-05   15  43 106    3  40 104   19  42  57    0.000    0.000       0
+  0    991 01:23:21.82   5.7600A   7.8099  -5.0014   4.6338  0.245  1.02  -0.311    650.  0.123E+02  0.756E+00  0.147E-03  0.201E-05   16  46  81   17  37  55   19  42  57    0.000    0.000       0
+  0    992 01:23:27.76   5.9400A   7.5791  -5.1702   4.6351  0.245  1.02  -0.309    650.  0.123E+02  0.756E+00  0.152E-03  0.208E-05   16  46  81   16  37  54   19  42  57    0.000    0.000       0
+  0    993 01:23:33.77   6.0100A   7.4882  -5.3752   4.5918  0.245  1.02  -0.310    650.  0.123E+02  0.756E+00  0.154E-03  0.212E-05   15  45 114   16  37  54   19  42  57    0.000    0.000       0
+  0    994 01:23:39.66   5.8900A   7.6338  -5.4415   4.5226  0.245  1.02  -0.324    650.  0.123E+02  0.756E+00  0.151E-03  0.210E-05   14  51  94   16  37  54   19  42  57    0.000    0.000       0
+  0    995 01:23:45.70   6.0400A   7.4555  -5.3687   4.4535  0.245  1.02  -0.309    650.  0.123E+02  0.755E+00  0.155E-03  0.216E-05   16  43 107   16  37  54   19  42  57    0.000    0.000       0
+  0    996 01:23:51.89   6.1900A   7.2661  -5.4403   4.3878  0.245  1.02  -0.308    650.  0.123E+02  0.755E+00  0.158E-03  0.222E-05   17  18  30   15  35  54   19  42  57    0.000    0.000       0
+  0    997 01:23:57.96   6.0700A   7.4091  -5.5070   4.3517  0.245  1.02  -0.307    650.  0.123E+02  0.755E+00  0.155E-03  0.220E-05   16  43 108   15  35  54   19  42  57    0.000    0.000       0
+  0    998 01:24:04.05   6.0900A   7.3881  -5.3610   4.3666  0.245  1.02  -0.306    650.  0.123E+02  0.755E+00  0.155E-03  0.222E-05   15  46 108   15  35  54   19  42  57    0.000    0.000       0
+  0    999 01:24:10.11   6.0600A   7.4244  -5.0484   4.4179  0.245  1.02  -0.312    650.  0.123E+02  0.755E+00  0.155E-03  0.222E-05   17   7  38   15  35  54   19  42  57    0.000    0.000       0
+  0   1000 01:24:16.19   6.0800A   7.4024  -4.9591   4.4979  0.245  1.02  -0.305    650.  0.123E+02  0.754E+00  0.155E-03  0.222E-05   17   7  38   17  37  55   19  42  57    0.000    0.000       0
+  0   1001 01:24:22.26   6.0700A   7.4137  -4.9473   4.5868  0.245  1.02  -0.306    650.  0.123E+02  0.754E+00  0.155E-03  0.223E-05   17  17  32   17  37  55   19  42  57    0.000    0.000       0
+  0   1002 01:24:28.34   6.0800A   7.3962  -4.9515   4.6680  0.245  0.99  -0.307    600.  0.123E+02  0.754E+00  0.155E-03  0.224E-05   17  35 102   17  37  55   19  42  57    0.000    0.000       0
+  0   1003 01:24:34.18   5.8400A   7.7035  -4.9354   4.7268  0.246  0.99  -0.304    600.  0.123E+02  0.754E+00  0.149E-03  0.216E-05   17  35 102   17  37  55   19  42  57    0.000    0.000       0
+  0   1004 01:24:40.09   5.9100A   7.6110  -4.8878   4.7649  0.246  0.99  -0.305    600.  0.123E+02  0.754E+00  0.151E-03  0.218E-05   16  42 113   17  37  55   19  42  57    0.000    0.000       0
+  0   1005 01:24:46.05   5.9600A   7.5503  -4.8615   4.7693  0.246  0.99  -0.306    600.  0.123E+02  0.754E+00  0.152E-03  0.220E-05   17  35 103   16  37  54   19  42  57    0.000    0.000       0
+  0   1006 01:24:51.84   5.7900A   7.7737  -4.9776   4.7513  0.246  0.99  -0.306    600.  0.123E+02  0.754E+00  0.148E-03  0.215E-05   17  35 104   16  37  54   19  42  57    0.000    0.000       0
+  0   1007 01:24:57.69   5.8500A   7.6923  -5.1109   4.7238  0.246  0.99  -0.309    600.  0.123E+02  0.754E+00  0.149E-03  0.216E-05   17  35 104   16  37  54   19  42  57    0.000    0.000       0
+  0   1008 01:25:03.53   5.8400A   7.7061  -5.2538   4.6785  0.246  0.99  -0.308    600.  0.123E+02  0.754E+00  0.149E-03  0.215E-05   16  41 101   16  37  54   19  42  57    0.000    0.000       0
+  0   1009 01:25:09.42   5.8900A   7.6464  -5.3917   4.6267  0.246  0.99  -0.307    600.  0.123E+02  0.754E+00  0.150E-03  0.216E-05   15  45 115   16  37  54   19  42  57    0.000    0.000       0
+  0   1010 01:25:15.32   5.9000A   7.6324  -5.4937   4.5689  0.246  0.99  -0.307    600.  0.123E+02  0.754E+00  0.150E-03  0.216E-05   16  41 102   16  37  54   19  42  57    0.000    0.000       0
+  0   1011 01:25:21.14   5.8200A   7.7308  -5.5242   4.5115  0.246  0.99  -0.304    600.  0.123E+02  0.754E+00  0.148E-03  0.213E-05   16  39  98   16  37  54   19  42  57    0.000    0.000       0
+  0   1012 01:25:26.92   5.7800A   7.7794  -5.4661   4.4602  0.246  0.99  -0.301    600.  0.123E+02  0.754E+00  0.147E-03  0.211E-05   16  39  98   16  36  54   19  42  57    0.000    0.000       0
+  0   1013 01:25:32.91   5.9900A   7.5125  -5.6670   4.4129  0.246  0.99  -0.303    600.  0.123E+02  0.754E+00  0.152E-03  0.217E-05   16  44 112   16  36  54   19  42  57    0.000    0.000       0
+  0   1014 01:25:38.99   6.0800A   7.4014  -5.7477   4.3631  0.246  0.99  -0.303    600.  0.123E+02  0.754E+00  0.154E-03  0.221E-05   17  32 131   16  36  54   19  42  57    0.000    0.000       0
+  0   1015 01:25:45.08   6.0900A   7.3880  -5.7104   4.3894  0.246  0.99  -0.305    600.  0.123E+02  0.754E+00  0.154E-03  0.222E-05   16  15  44   16  36  54   19  43  58    0.000    0.000       0
+  0   1016 01:25:51.01   5.9300A   7.5902  -5.6039   4.4302  0.246  0.99  -0.312    600.  0.123E+02  0.754E+00  0.150E-03  0.217E-05   16  15  44   16  36  54   19  43  58    0.000    0.000       0
+  0   1017 01:25:56.94   5.9300A   7.5879  -5.4847   4.4468  0.246  0.99  -0.306    600.  0.123E+02  0.754E+00  0.150E-03  0.217E-05   17  15  45   16  36  54   19  43  58    0.000    0.000       0
+  0   1018 01:26:02.78   5.8400A   7.7064  -5.3700   4.4343  0.246  0.99  -0.304    600.  0.123E+02  0.754E+00  0.148E-03  0.215E-05   15  21  16   16  36  54   19  43  58    0.000    0.000       0
+  0   1019 01:26:08.94   6.1600A   7.3099  -5.2635   4.3974  0.246  0.99  -0.305    600.  0.123E+02  0.754E+00  0.156E-03  0.226E-05   16  15  46   16  36  54   19  43  58    0.000    0.000       0
+  0   1020 01:26:14.86   5.9200A   7.6071  -5.1493   4.3814  0.246  0.90  -0.307    450.  0.123E+02  0.754E+00  0.150E-03  0.219E-05   15  49  97   16  36  54   19  42  57    0.000    0.000       0
+  0   1021 01:26:20.86   6.0000A   7.5005  -5.0506   4.4325  0.247  0.90  -0.310    450.  0.123E+02  0.754E+00  0.152E-03  0.222E-05   15  49  97   16  36  54   19  42  57    0.000    0.000       0
+  0   1022 01:26:26.89   6.0300A   7.4598   5.0273   4.4723  0.247  0.90  -0.303    450.  0.123E+02  0.754E+00  0.153E-03  0.223E-05   16  43  99    1  54 106   19  42  57    0.000    0.000       0
+  0   1023 01:26:32.95   6.0600A   7.4263  -4.9584   4.5009  0.247  0.90  -0.303    450.  0.123E+02  0.754E+00  0.154E-03  0.225E-05   16  45  87   17  37  55   19  42  57    0.000    0.000       0
+  0   1024 01:26:38.88   5.9300A   7.5913  -5.0951   4.5119  0.247  0.90  -0.307    450.  0.123E+02  0.755E+00  0.151E-03  0.221E-05   16  45  87   17  37  55   19  42  57    0.000    0.000       0
+  0   1025 01:26:44.78   5.9000A   7.6315  -5.2642   4.5087  0.247  0.90  -0.309    450.  0.123E+02  0.755E+00  0.150E-03  0.220E-05   16  46 106   17  37  55   19  42  57    0.000    0.000       0
+  0   1026 01:26:50.70   5.9200A   7.6026  -5.4149   4.4852  0.247  0.90  -0.307    450.  0.123E+02  0.755E+00  0.150E-03  0.221E-05   16  46 106   17  37  55   19  42  57    0.000    0.000       0
+  0   1027 01:26:56.66   5.9600A   7.5504  -5.4997   4.4468  0.247  1.02  -0.305    650.  0.123E+02  0.755E+00  0.151E-03  0.221E-05   15  48 102   17  37  55   19  42  57    0.000    0.000       0
+  0   1028 01:27:02.41   5.7500A   7.8292  -5.4901   4.4020  0.247  1.02  -0.304    650.  0.123E+02  0.755E+00  0.147E-03  0.214E-05   16  42 102   17  37  55   19  42  57    0.000    0.000       0
+  0   1029 01:27:08.14   5.7300A   7.8602  -5.4021   4.3719  0.247  1.02  -0.309    650.  0.123E+02  0.755E+00  0.146E-03  0.212E-05   16  42 102   17  37  55   19  42  57    0.000    0.000       0
+  0   1030 01:27:14.11   5.9700A   7.5378  -5.2671   4.3481  0.247  1.02  -0.304    650.  0.123E+02  0.755E+00  0.152E-03  0.220E-05   14   2  29   17  37  55   19  42  57    0.000    0.000       0
+  0   1031 01:27:20.04   5.9300A   7.5826  -5.1279   4.3299  0.247  1.02  -0.302    650.  0.123E+02  0.755E+00  0.151E-03  0.220E-05   16  17  42   17  37  55   19  42  57    0.000    0.000       0
+  0   1032 01:27:26.08   6.0400A   7.4551  -5.0522   4.3371  0.247  1.02  -0.301    650.  0.123E+02  0.755E+00  0.153E-03  0.224E-05   16  17  42   17  37  55   19  42  57    0.000    0.000       0
+  0   1033 01:27:32.28   6.2000A   7.2560  -5.0642   4.3504  0.247  1.02  -0.299    650.  0.123E+02  0.754E+00  0.157E-03  0.230E-05   16  17  44   17  37  55   19  42  57    0.000    0.000       0
+  0   1034 01:27:38.18   5.9000A   7.6311  -5.1694   4.3610  0.247  1.02  -0.300    650.  0.123E+02  0.754E+00  0.150E-03  0.222E-05   16  17  44   17  37  55   19  42  57    0.000    0.000       0
+  0   1035 01:27:44.13   5.9500A   7.5581  -5.3332   4.3782  0.247  1.02  -0.307    650.  0.123E+02  0.754E+00  0.151E-03  0.224E-05   17  36 100   17  37  55   19  42  57    0.000    0.000       0
+  0   1036 01:27:50.26   6.1300A   7.3464  -5.4875   4.3674  0.247  1.02  -0.303    650.  0.123E+02  0.754E+00  0.155E-03  0.231E-05   16  63  65   17  37  55   19  42  57    0.000    0.000       0
+  0   1037 01:27:56.48   6.2200A   7.2310  -5.5680   4.3311  0.247  1.02  -0.300    650.  0.123E+02  0.754E+00  0.157E-03  0.234E-05   16  48 103   17  37  55   19  42  57    0.000    0.000       0
+  0   1038 01:28:02.46   5.9800A   7.5309  -5.5275   4.2840  0.247  1.02  -0.300    650.  0.123E+02  0.754E+00  0.152E-03  0.226E-05   17  36 109   17  37  55   19  42  57    0.000    0.000       0
+  0   1039 01:28:08.48   6.0200A   7.4734   5.3913   4.2490  0.247  1.02  -0.297    650.  0.123E+02  0.754E+00  0.153E-03  0.226E-05   17  36 109    2  58 109   19  42  57    0.000    0.000       0
+  0   1040 01:28:14.41   5.9300A   7.5911   5.3906   4.2127  0.247  1.02  -0.294    650.  0.123E+02  0.754E+00  0.150E-03  0.224E-05   17  36 110    2  59 109   19  42  57    0.000    0.000       0
+  0   1041 01:28:20.15   5.7400A   7.8445   5.5823   4.1981  0.247  1.02  -0.294    650.  0.123E+02  0.754E+00  0.146E-03  0.217E-05   16  48 105    2  59 109   19  42  57    0.000    0.000       0
+  0   1042 01:28:25.92   5.7700A   7.8018   5.4661   4.2112  0.247  1.02  -0.293    650.  0.123E+02  0.754E+00  0.146E-03  0.218E-05   16  48 105    2  59 109   19  42  57    0.000    0.000       0
+  0   1043 01:28:31.70   5.7800A   7.7847   5.1664   4.2433  0.247  1.02  -0.294    650.  0.123E+02  0.754E+00  0.147E-03  0.219E-05   16  48 106    3  49 109   19  42  57    0.000    0.000       0
+  0   1044 01:28:37.52   5.8200A   7.7334   5.3726   4.2995  0.247  1.02  -0.294    650.  0.123E+02  0.754E+00  0.148E-03  0.221E-05   16  48 106    3  49 110   19  42  57    0.000    0.000       0
+  0   1045 01:28:43.48   5.9600A   7.5445   5.3811   4.3753  0.247  1.02  -0.296    650.  0.123E+02  0.754E+00  0.151E-03  0.227E-05   16  38 109    2  60 110   19  42  57    0.000    0.000       0
+  0   1046 01:28:48.99   5.5100A   8.1609   5.5220   4.4643  0.247  1.02  -0.304    650.  0.123E+02  0.754E+00  0.141E-03  0.213E-05   16  38 110    3  50 110   19  42  57    0.000    0.000       0
+  0   1047 01:28:54.19   5.2000A   8.6511   5.4328   4.5686  0.247  1.02  -0.292    650.  0.123E+02  0.754E+00  0.134E-03  0.201E-05   16  38 110    3  50 110   19  42  57    0.000    0.000       0
+  0   1048 01:28:59.74   5.5500A   8.1136   5.2080   4.6609  0.247  1.02  -0.291    650.  0.123E+02  0.754E+00  0.142E-03  0.212E-05   16  38 110    3  51 110   19  42  57    0.000    0.000       0
+  0   1049 01:29:05.12   5.3800A   8.3583   5.2936   4.7216  0.247  1.02  -0.290    650.  0.123E+02  0.754E+00  0.139E-03  0.207E-05   16  38 111    2  61 111   19  42  57    0.000    0.000       0
+  0   1050 01:29:10.55   5.4300A   8.2804   5.4272   4.7699  0.247  1.02  -0.295    650.  0.123E+02  0.754E+00  0.140E-03  0.208E-05   16  38 111    2  61 111   19  42  57    0.000    0.000       0
+  0   1051 01:29:16.04   5.4900A   8.1959   5.3063   4.7894  0.247  1.02  -0.290    650.  0.123E+02  0.754E+00  0.141E-03  0.211E-05   16  38 112    2  61 111   19  42  57    0.000    0.000       0
+  0   1052 01:29:21.46   5.4200A   8.2982   5.3759   4.7867  0.247  1.02  -0.288    650.  0.123E+02  0.754E+00  0.140E-03  0.210E-05   16  38 112    5  60 111   19  42  57    0.000    0.000       0
+  0   1053 01:29:27.47   6.0100A   7.4856   5.3797   4.7737  0.247  0.99  -0.287    600.  0.123E+02  0.754E+00  0.153E-03  0.231E-05   16  38 112    5  60 111   19  42  57    0.000    0.000       0
+  0   1054 01:29:33.49   6.0200A   7.4778   5.4117   4.7302  0.247  0.99  -0.290    600.  0.123E+02  0.754E+00  0.154E-03  0.235E-05   16  38 113    5  61 111   19  42  57    0.000    0.000       0
+  0   1055 01:29:39.70   6.2100A   7.2438   5.3832   4.7035  0.247  0.99  -0.287    600.  0.123E+02  0.754E+00  0.159E-03  0.243E-05   16  39 118    5  61 111   19  42  57    0.000    0.000       0
+  0   1056 01:29:45.83   6.1300A   7.3385   5.4091   4.6766  0.247  0.99  -0.286    600.  0.123E+02  0.754E+00  0.157E-03  0.243E-05   15  52 105    5  62 111   19  42  57    0.000    0.000       0
+  0   1057 01:29:51.90   6.0700A   7.4133   5.3365   4.6610  0.247  1.02  -0.286    650.  0.123E+02  0.754E+00  0.156E-03  0.241E-05   16  40 114   13  55  47   19  42  57    0.000    0.000       0
+  0   1058 01:29:57.88   5.9800A   7.5272   5.5458   4.6442  0.247  1.02  -0.287    650.  0.123E+02  0.754E+00  0.154E-03  0.238E-05   16  48  89    5  62 112   19  42  57    0.000    0.000       0
+  0   1059 01:30:03.78   5.9000A   7.6265   5.5938   4.6228  0.247  0.99  -0.288    600.  0.123E+02  0.755E+00  0.152E-03  0.235E-05   16  40 115    5  63 112   19  42  57    0.000    0.000       0
+  0   1060 01:30:09.81   6.0300A   7.4653   5.6302   4.5948  0.247  0.99  -0.289    600.  0.123E+02  0.755E+00  0.155E-03  0.239E-05   15  47 105    5  63 112   19  42  57    0.000    0.000       0
+  0   1061 01:30:15.83   6.0200A   7.4748   5.4076   4.5558  0.248  0.99  -0.292    600.  0.123E+02  0.755E+00  0.155E-03  0.240E-05   16  40 102    5  64 112   19  42  57    0.000    0.000       0
+  0   1062 01:30:21.85   6.0200A   7.4697   5.4859   4.5254  0.248  0.99  -0.289    600.  0.123E+02  0.755E+00  0.155E-03  0.241E-05   16  40 102   11  49  52   19  42  57    0.000    0.000       0
+  0   1063 01:30:28.11   6.2600A   7.1889   5.6893   4.5082  0.248  0.99  -0.283    600.  0.123E+02  0.755E+00  0.160E-03  0.250E-05   16  40 117   11  49  52   19  42  57    0.000    0.000       0
+  0   1064 01:30:34.25   6.1400A   7.3287   5.7053   4.5007  0.248  0.99  -0.283    600.  0.123E+02  0.755E+00  0.157E-03  0.246E-05   17   8  55   11  49  52   19  42  57    0.000    0.000       0
+  0   1065 01:30:40.45   6.2000A   7.2591   5.6810   4.5226  0.248  0.99  -0.284    600.  0.123E+02  0.755E+00  0.159E-03  0.248E-05   16  48  95    6  64 113   19  42  57    0.000    0.000       0
+  0   1066 01:30:46.50   6.0500A   7.4330   5.5400   4.5506  0.248  0.99  -0.283    600.  0.123E+02  0.755E+00  0.155E-03  0.243E-05   15  47 109   11  48  51   19  42  57    0.000    0.000       0
+  0   1067 01:30:52.52   6.0200A   7.4773   5.6899   4.5824  0.248  0.90  -0.281    450.  0.123E+02  0.755E+00  0.154E-03  0.242E-05   15  47 109    6  64 114   19  42  57    0.000    0.000       0
+  0   1068 01:30:58.71   6.1900A   7.2707   5.7693   4.5954  0.248  0.90  -0.281    450.  0.123E+02  0.755E+00  0.158E-03  0.248E-05   17  46  68    6  65 114   19  42  57    0.000    0.000       0
+  0   1069 01:31:04.94   6.2300A   7.2283   5.7994   4.5741  0.248  0.90  -0.290    450.  0.123E+02  0.755E+00  0.159E-03  0.250E-05   17  46  68    6  65 114   19  42  57    0.000    0.000       0
+  0   1070 01:31:11.16   6.2200A   7.2338   5.6898   4.5227  0.248  0.96  -0.281    550.  0.123E+02  0.755E+00  0.159E-03  0.251E-05   18  19  23    6  66 114   19  42  57    0.000    0.000       0
+  0   1071 01:31:17.34   6.1800A   7.2796   5.8363   4.4424  0.248  0.96  -0.284    550.  0.123E+02  0.755E+00  0.158E-03  0.250E-05   17   7  60   11  49  52   19  42  57    0.000    0.000       0
+  0   1072 01:31:23.56   6.2200A   7.2310   5.9450   4.3414  0.248  0.96  -0.283    550.  0.123E+02  0.756E+00  0.159E-03  0.252E-05   16  36 104    6  66 115   19  42  57    0.000    0.000       0
+  0   1073 01:31:29.80   6.2400A   7.2118   5.8141   4.2292  0.248  0.90  -0.281    450.  0.123E+02  0.756E+00  0.160E-03  0.253E-05   16  36 104    6  66 115   19  42  57    0.000    0.000       0
+  0   1074 01:31:35.98   6.1800A   7.2762   5.9339   4.1271  0.248  0.90  -0.280    450.  0.123E+02  0.756E+00  0.158E-03  0.252E-05   17  46  71    6  67 115   19  42  57    0.000    0.000       0
+  0   1075 01:31:42.16   6.1800A   7.2809   5.6578   4.0530  0.248  1.02  -0.280    650.  0.123E+02  0.756E+00  0.158E-03  0.252E-05   17  46  71    7  67 115   19  42  57    0.000    0.000       0
+  0   1076 01:31:48.35   6.1900A   7.2701   6.1137   4.0093  0.248  1.02  -0.280    650.  0.123E+02  0.756E+00  0.158E-03  0.251E-05   15  47 116    7  67 115   19  42  57    0.000    0.000       0
+  0   1077 01:31:54.63   6.2800A   7.1667   5.8189   3.9981  0.248  1.02  -0.280    650.  0.123E+02  0.756E+00  0.160E-03  0.255E-05   15  47 117    7  67 115   19  42  57    0.000    0.000       0
+  0   1078 01:32:00.52   5.8900A   7.6439   5.9501   4.0125  0.248  1.02  -0.278    650.  0.123E+02  0.756E+00  0.151E-03  0.241E-05   15  47 117    7  68 115   19  42  57    0.000    0.000       0
+  0   1079 01:32:06.49   5.9700A   7.5405   5.8306   4.0565  0.248  1.02  -0.276    650.  0.123E+02  0.757E+00  0.153E-03  0.243E-05   16  36 111   10  50  52   19  42  57    0.000    0.000       0
+  0   1080 01:32:12.15   5.6600A   7.9462   5.8955   4.0937  0.249  1.02  -0.274    650.  0.123E+02  0.757E+00  0.146E-03  0.234E-05   16  36 111    7  68 116   19  42  57    0.000    0.000       0
+  0   1081 01:32:18.21   6.0600A   7.4210   5.9279   4.1334  0.249  1.02  -0.273    650.  0.123E+02  0.757E+00  0.155E-03  0.248E-05   16  36 111    7  69 116   19  42  57    0.000    0.000       0
+  0   1082 01:32:24.14   5.9300A   7.5858   5.9242   4.1412  0.249  1.02  -0.274    650.  0.123E+02  0.757E+00  0.152E-03  0.245E-05   16  36 112    7  69 116   19  42  57    0.000    0.000       0
+  0   1083 01:32:29.88   5.7400A   7.8389   5.7710   4.1459  0.249  1.02  -0.281    650.  0.123E+02  0.757E+00  0.147E-03  0.238E-05   16  36 113    7  70 116   19  42  57    0.000    0.000       0
+  0   1084 01:32:35.53   5.6500A   7.9685   5.8792   4.1416  0.249  1.02  -0.275    650.  0.123E+02  0.758E+00  0.145E-03  0.234E-05   16  36 113   11  48  52   19  42  57    0.000    0.000       0
+  0   1085 01:32:41.32   5.7900A   7.7707   6.0690   4.1251  0.249  1.02  -0.274    650.  0.123E+02  0.758E+00  0.148E-03  0.239E-05   16  36 114   11  48  52   19  42  57    0.000    0.000       0
+  0   1086 01:32:46.96   5.6400A   7.9780   6.1409   4.0922  0.249  1.02  -0.272    650.  0.123E+02  0.758E+00  0.145E-03  0.235E-05   16  36 114   11  49  52   19  42  57    0.000    0.000       0
+  0   1087 01:32:52.92   5.9600A   7.5480   6.4907   4.0607  0.249  1.02  -0.271    650.  0.123E+02  0.758E+00  0.152E-03  0.246E-05   17  37 108   11  49  52   19  42  57    0.000    0.000       0
+  0   1088 01:32:58.90   5.9800A   7.5307   6.5565   4.0053  0.249  1.02  -0.271    650.  0.123E+02  0.759E+00  0.153E-03  0.250E-05   15  44 113   11  49  52   19  42  57    0.000    0.000       0
+  0   1089 01:33:04.95   6.0500A   7.4425   6.3281   3.9496  0.249  1.02  -0.271    650.  0.123E+02  0.759E+00  0.155E-03  0.255E-05   16  36 116   11  49  52   19  42  57    0.000    0.000       0
+  0   1090 01:33:11.08   6.1300A   7.3403   5.9517   3.8870  0.249  1.02  -0.272    650.  0.123E+02  0.759E+00  0.157E-03  0.259E-05   15  48  70   11  49  52   19  42  57    0.000    0.000       0
+  0   1091 01:33:16.72   5.6400A   7.9857   6.0132   3.8208  0.249  1.02  -0.274    650.  0.123E+02  0.760E+00  0.145E-03  0.242E-05   15  48  71   10  49  51   19  42  57    0.000    0.000       0
+  0   1092 01:33:22.35   5.6300A   7.9890   6.2681   3.7764  0.249  1.02  -0.276    650.  0.123E+02  0.760E+00  0.145E-03  0.240E-05   15  48  71   10  49  51   19  42  57    0.000    0.000       0
+  0   1093 01:33:27.89   5.5400A   8.1222   6.2876   3.7243  0.249  0.99  -0.282    600.  0.123E+02  0.760E+00  0.143E-03  0.237E-05   15  45  86   10  49  51   19  42  57    0.000    0.000       0
+  0   1094 01:33:33.05   5.1600A   8.7169   6.4157   3.6800  0.249  0.99  -0.277    600.  0.123E+02  0.761E+00  0.134E-03  0.222E-05   15  45  86    9  50  51   19  42  57    0.000    0.000       0
+  0   1095 01:33:38.25   5.2000A   8.6507   6.5249   3.6549  0.249  0.99  -0.279    600.  0.123E+02  0.761E+00  0.135E-03  0.223E-05   15  45  86    9  50  51   19  42  57    0.000    0.000       0
+  0   1096 01:33:43.84   5.5900A   8.0464   6.4210   3.8098  0.249  0.99  -0.274    600.  0.123E+02  0.761E+00  0.144E-03  0.237E-05   15  45  86    9  50  51    1  20  58    0.000    0.000       0
+  0   1097 01:33:49.77   5.9300A   7.5838   6.1611   4.0176  0.249  0.99  -0.273    600.  0.123E+02  0.762E+00  0.152E-03  0.252E-05   15  48  74   10  48  50    1  20  58    0.000    0.000       0
+  0   1098 01:33:55.68   5.9100A   7.6135   6.1486   4.1709  0.249  0.99  -0.273    600.  0.123E+02  0.762E+00  0.152E-03  0.253E-05   15  45  89   11  47  51    1  20  58    0.000    0.000       0
+  0   1099 01:34:01.48   5.8000A   7.7543   6.3325   4.2525  0.249  0.99  -0.276    600.  0.123E+02  0.763E+00  0.149E-03  0.250E-05   15  48  75   11  47  51    1  20  58    0.000    0.000       0
+  0   1100 01:34:07.54   6.0600A   7.4207   6.3524   4.2629  0.249  0.99  -0.272    600.  0.123E+02  0.763E+00  0.155E-03  0.260E-05   15  48  75   11  47  51    1  20  58    0.000    0.000       0
+  0   1101 01:34:13.69   6.1500A   7.3166   6.2315   4.2081  0.249  0.99  -0.272    600.  0.123E+02  0.763E+00  0.157E-03  0.265E-05   15  51 128   11  47  51    1  20  58    0.000    0.000       0
+  0   1102 01:34:19.50   5.8100A   7.7441   6.1525   4.1425  0.249  0.99  -0.273    600.  0.123E+02  0.764E+00  0.149E-03  0.253E-05   15  51 128   11  48  52    1  20  58    0.000    0.000       0
+  0   1103 01:34:25.55   6.0500A   7.4431   6.1565   4.1374  0.249  0.99  -0.274    600.  0.123E+02  0.764E+00  0.154E-03  0.262E-05   15  51 128   11  48  52   19  42  57    0.000    0.000       0
+  0   1104 01:34:31.42   5.8700A   7.6675   6.1535   4.2275  0.249  0.99  -0.277    600.  0.123E+02  0.764E+00  0.150E-03  0.255E-05   15  51 129   11  48  52   19  42  57    0.000    0.000       0
+  0   1105 01:34:37.41   5.9900A   7.5137   6.1409   4.2924  0.249  0.99  -0.281    600.  0.123E+02  0.765E+00  0.153E-03  0.259E-05   15  51 130   11  48  52   19  42  57    0.000    0.000       0
+  0   1106 01:34:43.03   5.6200A   8.0054   6.1134   4.3163  0.249  0.99  -0.280    600.  0.123E+02  0.765E+00  0.144E-03  0.246E-05   15  51 130   11  48  52   19  42  57    0.000    0.000       0
+  0   1107 01:34:48.85   5.8200A   7.7259   6.1051   4.3161  0.249  0.99  -0.280    600.  0.123E+02  0.765E+00  0.149E-03  0.252E-05   15  51 130   10  49  51   19  42  57    0.000    0.000       0
+  0   1108 01:34:54.79   5.9400A   7.5761   6.1217   4.2693  0.249  0.99  -0.280    600.  0.123E+02  0.765E+00  0.152E-03  0.256E-05   16  40 112   10  49  51   19  42  57    0.000    0.000       0
+  0   1109 01:35:00.68   5.8900A   7.6433   6.0611   4.1930  0.249  0.99  -0.280    600.  0.123E+02  0.766E+00  0.151E-03  0.254E-05   16  40 112   10  49  51   19  42  57    0.000    0.000       0
+  0   1110 01:35:06.55   5.8700A   7.6633   5.9528   4.1050  0.249  0.99  -0.278    600.  0.123E+02  0.766E+00  0.151E-03  0.252E-05    1  19  68   10  49  51   19  42  57    0.000    0.000       0
+  0   1111 01:35:12.32   5.7700A   7.7972   5.8798   4.0133  0.249  1.02  -0.280    650.  0.123E+02  0.766E+00  0.149E-03  0.247E-05    1  19  69   11  48  51   19  42  57    0.000    0.000       0
+  0   1112 01:35:18.05   5.7300A   7.8533   5.8748   3.9343  0.249  1.02  -0.279    650.  0.123E+02  0.766E+00  0.148E-03  0.244E-05    1  19  70   11  48  51   19  42  57    0.000    0.000       0
+  0   1113 01:35:23.78   5.7300A   7.8555   5.8650   3.8742  0.249  1.02  -0.279    650.  0.123E+02  0.766E+00  0.148E-03  0.242E-05    1  19  70   10  47  50   19  42  57    0.000    0.000       0
+  0   1114 01:35:29.46   5.6800A   7.9279   5.8442   3.8403  0.249  1.02  -0.281    650.  0.123E+02  0.767E+00  0.146E-03  0.239E-05    1  19  71   12  45  51   19  42  57    0.000    0.000       0
+  0   1115 01:35:35.15   5.6900A   7.9105   5.8322   3.8382  0.249  1.02  -0.281    650.  0.123E+02  0.767E+00  0.147E-03  0.237E-05    1  19  72   12  45  51   19  42  57    0.000    0.000       0
+  0   1116 01:35:40.93   5.7800A   7.7910   5.8677   3.8621  0.249  1.02  -0.282    650.  0.123E+02  0.767E+00  0.149E-03  0.240E-05    1  19  72   10  50  51   19  42  57    0.000    0.000       0
+  0   1117 01:35:46.71   5.7800A   7.7853   5.9111   3.9040  0.249  1.02  -0.281    650.  0.123E+02  0.767E+00  0.149E-03  0.242E-05    1  19  73   10  50  51   19  42  57    0.000    0.000       0
+  0   1118 01:35:52.55   5.8400A   7.6991   5.8463   3.9571  0.249  0.99  -0.281    600.  0.123E+02  0.767E+00  0.150E-03  0.245E-05    1  19  74   10  50  51   19  42  57    0.000    0.000       0
+  0   1119 01:35:58.50   5.9500A   7.5614   5.8014   4.0065  0.249  0.99  -0.280    600.  0.122E+02  0.767E+00  0.152E-03  0.249E-05    1  20  74    8  47  48   19  42  57    0.000    0.000       0
+  0   1120 01:36:04.37   5.8700A   7.6658   5.9164   4.0434  0.249  0.99  -0.285    600.  0.122E+02  0.767E+00  0.151E-03  0.246E-05    1  20  75   13  47  52   19  42  57    0.000    0.000       0
+  0   1121 01:36:10.19   5.8200A   7.7255   6.1228   4.0699  0.249  0.99  -0.278    600.  0.122E+02  0.767E+00  0.150E-03  0.244E-05   15  42 105   11  49  52   19  42  57    0.000    0.000       0
+  0   1122 01:36:15.94   5.7500A   7.8321   6.3650   4.0837  0.249  0.99  -0.278    600.  0.122E+02  0.767E+00  0.148E-03  0.241E-05    1  20  76   11  49  52   19  42  57    0.000    0.000       0
+  0   1123 01:36:21.69   5.7500A   7.8291   6.5902   4.0916  0.249  0.99  -0.278    600.  0.122E+02  0.767E+00  0.148E-03  0.239E-05    1  20  77   11  49  52   19  42  57    0.000    0.000       0
+  0   1124 01:36:27.55   5.8600A   7.6808   6.7537   4.0977  0.249  0.99  -0.278    600.  0.122E+02  0.767E+00  0.151E-03  0.241E-05    1  20  77   11  49  52   19  42  57    0.000    0.000       0
+  0   1125 01:36:33.24   5.6900A   7.9051   6.7911   4.1045  0.249  0.99  -0.277    600.  0.122E+02  0.767E+00  0.147E-03  0.234E-05   15  41 104   11  49  52   19  42  57    0.000    0.000       0
+  0   1126 01:36:39.12   5.8800A   7.6588   6.6402   4.1236  0.249  0.99  -0.275    600.  0.122E+02  0.767E+00  0.151E-03  0.239E-05   15  41 104   11  49  52   19  42  57    0.000    0.000       0
+  0   1127 01:36:44.88   5.7600A   7.8159   6.5123   4.1316  0.249  0.99  -0.275    600.  0.122E+02  0.768E+00  0.148E-03  0.234E-05   15  41 105   11  50  52   19  42  57    0.000    0.000       0
+  0   1128 01:36:50.97   6.0900A   7.3942   6.3100   4.1395  0.249  0.99  -0.277    600.  0.122E+02  0.767E+00  0.156E-03  0.245E-05    1  21  80   10  48  50   19  42  57    0.000    0.000       0
+  0   1129 01:36:57.06   6.0900A   7.3838   6.4574   4.1124  0.249  0.99  -0.280    600.  0.122E+02  0.767E+00  0.156E-03  0.246E-05    1  21  80   10  48  50   19  42  57    0.000    0.000       0
+  0   1130 01:37:03.14   6.0800A   7.4030   6.4342   4.0680  0.249  0.99  -0.284    600.  0.122E+02  0.767E+00  0.156E-03  0.245E-05    1  21  81   10  48  50   19  42  57    0.000    0.000       0
+  0   1131 01:37:09.21   6.0700A   7.4187   6.2694   3.9984  0.249  0.99  -0.286    600.  0.122E+02  0.767E+00  0.156E-03  0.245E-05    1  21  82   10  48  50   19  42  57    0.000    0.000       0
+  0   1132 01:37:15.30   6.0900A   7.3864   6.4068   3.9654  0.249  0.99  -0.280    600.  0.122E+02  0.767E+00  0.156E-03  0.246E-05    1  21  83   10  49  51   19  43  58    0.000    0.000       0
+  0   1133 01:37:21.45   6.1500A   7.3228   6.4493   3.9938  0.249  1.02  -0.280    650.  0.122E+02  0.767E+00  0.157E-03  0.249E-05    5  24  87   10  49  51   19  43  58    0.000    0.000       0
+  0   1134 01:37:27.58   6.1300A   7.3435   6.2186   3.9907  0.249  1.02  -0.281    650.  0.122E+02  0.767E+00  0.157E-03  0.249E-05   16  45 104   10  49  51   19  43  58    0.000    0.000       0
+  0   1135 01:37:33.73   6.1500A   7.3174   5.9710   3.9575  0.249  1.02  -0.279    650.  0.122E+02  0.767E+00  0.157E-03  0.250E-05    5  24  88   10  50  51   19  43  58    0.000    0.000       0
+  0   1136 01:37:39.82   6.0900A   7.3882   5.9740   3.8974  0.249  1.02  -0.280    650.  0.122E+02  0.767E+00  0.156E-03  0.248E-05   15  45 103   11  49  52   19  43  58    0.000    0.000       0
+  0   1137 01:37:45.97   6.1500A   7.3161   5.9617   3.8210  0.249  1.02  -0.279    650.  0.122E+02  0.767E+00  0.157E-03  0.251E-05    1  22  86   11  49  52   19  43  58    0.000    0.000       0
+  0   1138 01:37:52.00   6.0300A   7.4639   5.7843   3.7322  0.249  1.02  -0.276    650.  0.122E+02  0.767E+00  0.154E-03  0.246E-05   10  23  82   11  49  52   19  43  58    0.000    0.000       0
+  0   1139 01:37:57.98   5.9800A   7.5204   5.6855   3.6452  0.249  1.02  -0.275    650.  0.122E+02  0.767E+00  0.153E-03  0.243E-05   10  23  82   10  49  51   19  43  58    0.000    0.000       0
+  0   1140 01:38:04.11   6.1300A   7.3408   5.8339   3.6894  0.249  1.02  -0.273    650.  0.122E+02  0.767E+00  0.156E-03  0.246E-05   13  49  69   10  49  51   19  42  57    0.000    0.000       0
+  0   1141 01:38:10.03   5.9200A   7.6032   5.8748   3.7383  0.249  1.02  -0.272    650.  0.122E+02  0.767E+00  0.151E-03  0.237E-05   15  45 106   10  49  51   19  42  57    0.000    0.000       0
+  0   1142 01:38:16.23   6.2000A   7.2598   5.7943   3.7913  0.249  1.02  -0.272    650.  0.122E+02  0.767E+00  0.158E-03  0.244E-05   15  45 106   10  49  51   19  42  57    0.000    0.000       0
+  0   1143 01:38:22.26   6.0300A   7.4615   5.6545   3.8216  0.249  1.02  -0.272    650.  0.122E+02  0.767E+00  0.154E-03  0.238E-05   15  45 107   10  50  52   19  42  57    0.000    0.000       0
+  0   1144 01:38:28.34   6.0800A   7.4065   5.7192   3.8490  0.249  1.02  -0.273    650.  0.122E+02  0.767E+00  0.155E-03  0.238E-05   11  20  86   10  50  52   19  42  57    0.000    0.000       0
+  0   1145 01:38:34.20   5.8600A   7.6803   5.6720   3.8614  0.249  1.02  -0.276    650.  0.122E+02  0.767E+00  0.150E-03  0.230E-05   11  20  86   10  50  52   19  42  57    0.000    0.000       0
+  0   1146 01:38:40.31   6.1100A   7.3695   5.6208   3.8749  0.249  1.02  -0.279    650.  0.122E+02  0.767E+00  0.156E-03  0.238E-05   11  20  86   11  47  51   19  42  57    0.000    0.000       0
+  0   1147 01:38:46.55   6.2400A   7.2142   5.6636   3.8770  0.249  1.02  -0.280    650.  0.122E+02  0.767E+00  0.159E-03  0.244E-05    4  26  98   11  47  51   19  42  57    0.000    0.000       0
+  0   1148 01:38:52.77   6.2200A   7.2351   5.6381   3.8822  0.249  1.02  -0.279    650.  0.122E+02  0.767E+00  0.159E-03  0.244E-05   15  78  97   11  47  51   19  42  57    0.000    0.000       0
+  0   1149 01:38:59.02   6.2500A   7.2050   5.5641   3.8908  0.249  1.02  -0.277    650.  0.122E+02  0.768E+00  0.159E-03  0.246E-05    5  26  99   11  47  51   19  42  57    0.000    0.000       0
+  0   1150 01:39:05.19   6.1700A   7.2930   5.4885   3.8942  0.249  1.02  -0.277    650.  0.122E+02  0.768E+00  0.158E-03  0.243E-05    5  26  99   11  49  52   19  42  57    0.000    0.000       0
+  0   1151 01:39:11.42   6.2300A   7.2195   5.5498   3.8908  0.249  1.02  -0.275    650.  0.122E+02  0.768E+00  0.159E-03  0.243E-05    5  26 100   11  49  52   19  42  57    0.000    0.000       0
+  0   1152 01:39:17.47   6.0500A   7.4414   5.5009   3.8735  0.249  1.02  -0.273    650.  0.122E+02  0.768E+00  0.155E-03  0.237E-05   14  47  97   10  47  50   19  42  57    0.000    0.000       0
+  0   1153 01:39:23.14   5.6700A   7.9406   5.5673   3.8522  0.249  1.02  -0.272    650.  0.122E+02  0.768E+00  0.146E-03  0.223E-05   14  47  97   10  47  50   19  42  57    0.000    0.000       0
+  0   1154 01:39:29.36   6.2200A   7.2394   5.6175   3.8329  0.249  1.02  -0.272    650.  0.122E+02  0.768E+00  0.159E-03  0.241E-05   14  47  97   10  47  50   19  42  57    0.000    0.000       0
+  0   1155 01:39:35.47   6.1100A   7.3708   5.6595   3.7954  0.249  1.02  -0.274    650.  0.122E+02  0.769E+00  0.156E-03  0.240E-05    4  27  94   10  47  50   19  42  57    0.000    0.000       0
+  0   1156 01:39:41.60   6.1300A   7.3461   5.6628   3.7793  0.249  1.02  -0.273    650.  0.122E+02  0.769E+00  0.157E-03  0.241E-05    4  27  95   10  47  50   19  42  57    0.000    0.000       0
+  0   1157 01:39:47.68   6.0800A   7.3981   5.6782   3.7802  0.249  1.02  -0.273    650.  0.122E+02  0.769E+00  0.156E-03  0.240E-05    4  27  95   10  49  51   19  42  57    0.000    0.000       0
+  0   1158 01:39:53.73   6.0500A   7.4354   5.6637   3.8042  0.249  1.02  -0.273    650.  0.122E+02  0.769E+00  0.155E-03  0.238E-05    4  27  96   10  49  51   19  42  57    0.000    0.000       0
+  0   1159 01:39:59.88   6.1500A   7.3119   5.5107   3.8507  0.249  1.02  -0.272    650.  0.122E+02  0.769E+00  0.157E-03  0.241E-05    4  27  96   10  49  51   19  42  57    0.000    0.000       0
+  0   1160 01:40:05.96   6.0800A   7.3967   5.3531   3.9174  0.249  1.02  -0.274    650.  0.122E+02  0.770E+00  0.156E-03  0.238E-05    4  27  97    9  48  50   19  42  57    0.000    0.000       0
+  0   1161 01:40:12.00   6.0400A   7.4475   5.3552   4.0040  0.250  1.02  -0.273    650.  0.122E+02  0.770E+00  0.155E-03  0.235E-05    9  26 102    9  48  50   19  42  57    0.000    0.000       0
+  0   1162 01:40:18.02   6.0200A   7.4803   5.3505   4.1043  0.250  1.02  -0.270    650.  0.122E+02  0.770E+00  0.154E-03  0.233E-05    9  26 102   10  48  51   19  42  57    0.000    0.000       0
+  0   1163 01:40:24.13   6.1100A   7.3618   5.3633   4.2119  0.250  1.02  -0.270    650.  0.122E+02  0.770E+00  0.156E-03  0.236E-05    4  27  99   10  48  51   19  42  57    0.000    0.000       0
+  0   1164 01:40:30.20   6.0700A   7.4145   5.4018   4.3163  0.250  1.02  -0.275    650.  0.122E+02  0.770E+00  0.155E-03  0.236E-05    9  26 103   12  57  46   19  42  57    0.000    0.000       0
+  0   1165 01:40:36.31   6.1100A   7.3624   5.4539   4.4038  0.250  1.02  -0.271    650.  0.122E+02  0.770E+00  0.155E-03  0.237E-05    8  26 103   12  45  51   19  42  57    0.000    0.000       0
+  0   1166 01:40:42.40   6.0900A   7.3923   5.4265   4.4525  0.250  1.02  -0.270    650.  0.122E+02  0.770E+00  0.155E-03  0.236E-05    9  26 106   12  45  51   19  42  57    0.000    0.000       0
+  0   1167 01:40:48.51   6.1100A   7.3619   5.3225   4.4509  0.250  1.02  -0.271    650.  0.122E+02  0.770E+00  0.155E-03  0.237E-05    8  26 105   11  48  52   19  42  57    0.000    0.000       0
+  0   1168 01:40:54.56   6.0500A   7.4414   5.3788   4.3922  0.250  1.02  -0.273    650.  0.122E+02  0.770E+00  0.154E-03  0.235E-05    9  27 103   10  48  51   19  42  57    0.000    0.000       0
+  0   1169 01:41:00.52   5.9600A   7.5442   5.4608   4.2882  0.250  1.02  -0.275    650.  0.122E+02  0.770E+00  0.152E-03  0.231E-05    9  27 108   10  48  51   19  42  57    0.000    0.000       0
+  0   1170 01:41:06.36   5.8400A   7.7088   5.5125   4.1559  0.250  1.02  -0.274    650.  0.122E+02  0.770E+00  0.149E-03  0.226E-05    9  27 104   10  48  51   19  42  57    0.000    0.000       0
+  0   1171 01:41:12.20   5.8400A   7.6992   5.5130   4.0169  0.250  1.02  -0.273    650.  0.122E+02  0.770E+00  0.149E-03  0.224E-05    9  27 109   10  48  51   19  42  57    0.000    0.000       0
+  0   1172 01:41:18.04   5.8400A   7.7024   5.5499   3.8826  0.250  1.02  -0.272    650.  0.122E+02  0.770E+00  0.149E-03  0.222E-05    9  27 110   11  47  51   19  42  57    0.000    0.000       0
+  0   1173 01:41:23.83   5.7900A   7.7711   5.5267   3.8498  0.250  1.02  -0.273    650.  0.122E+02  0.770E+00  0.148E-03  0.219E-05    9  27 110   11  47  51    2  55  81    0.000    0.000       0
+  0   1174 01:41:29.63   5.8000A   7.7557   5.5412   3.8100  0.250  0.99  -0.272    600.  0.122E+02  0.770E+00  0.148E-03  0.218E-05    8  27 107    9  49  51    2  55  81    0.000    0.000       0
+  0   1175 01:41:35.44   5.8100A   7.7412   5.4955   3.7064  0.250  0.99  -0.273    600.  0.122E+02  0.770E+00  0.149E-03  0.217E-05    8  27 107   10  49  51    2  58  83    0.000    0.000       0
+  0   1176 01:41:41.18   5.7400A   7.8352   5.5156   3.8906  0.250  0.99  -0.282    600.  0.122E+02  0.770E+00  0.147E-03  0.213E-05    8  27 108   10  49  51    2  54  81    0.000    0.000       0
+  0   1177 01:41:46.98   5.8000A   7.7593   5.5340   3.9099  0.250  0.99  -0.274    600.  0.122E+02  0.770E+00  0.148E-03  0.214E-05    8  27 109   10  49  51    2  54  81    0.000    0.000       0
+  0   1178 01:41:52.85   5.8700A   7.6716   5.6079   3.7952  0.250  1.02  -0.271    650.  0.122E+02  0.770E+00  0.150E-03  0.216E-05    8  27 109   10  48  50   19  42  57    0.000    0.000       0
+  0   1179 01:41:58.72   5.8700A   7.6669   5.6330   3.8782  0.250  1.02  -0.270    650.  0.122E+02  0.770E+00  0.150E-03  0.216E-05    9  28 113   10  48  50   19  42  57    0.000    0.000       0
+  0   1180 01:42:04.57   5.8500A   7.6916   5.5939   3.9581  0.250  1.02  -0.271    650.  0.122E+02  0.770E+00  0.149E-03  0.215E-05    9  28 114   10  49  51   19  42  57    0.000    0.000       0
+  0   1181 01:42:10.40   5.8300A   7.7171   5.5896   4.0185  0.250  0.90  -0.274    450.  0.122E+02  0.770E+00  0.149E-03  0.213E-05    9  28 115   10  49  51   19  42  57    0.000    0.000       0
+  0   1182 01:42:16.25   5.8500A   7.6866   5.5647   4.0492  0.250  0.90  -0.274    450.  0.122E+02  0.770E+00  0.150E-03  0.213E-05    9  28 115   10  49  51   19  42  57    0.000    0.000       0
+  0   1183 01:42:22.17   5.9200A   7.6021   5.5210   4.0465  0.250  0.90  -0.273    450.  0.122E+02  0.770E+00  0.151E-03  0.214E-05    9  28 116   10  49  51   19  42  57    0.000    0.000       0
+  0   1184 01:42:28.07   5.9000A   7.6276   5.4563   4.0129  0.250  0.90  -0.271    450.  0.122E+02  0.770E+00  0.151E-03  0.214E-05    8  28 117   10  49  51   19  42  57    0.000    0.000       0
+  0   1185 01:42:33.98   5.9100A   7.6177   5.4321   3.9622  0.250  0.90  -0.272    450.  0.122E+02  0.770E+00  0.151E-03  0.214E-05    9  29 116    8  48  49   19  42  57    0.000    0.000       0
+  0   1186 01:42:39.83   5.8500A   7.6893   5.4723   3.9025  0.250  0.90  -0.269    450.  0.122E+02  0.770E+00  0.150E-03  0.213E-05    9  29 116    8  49  49   19  42  57    0.000    0.000       0
+  0   1187 01:42:45.50   5.6700A   7.9386   5.4186   3.8503  0.251  0.90  -0.268    450.  0.122E+02  0.770E+00  0.145E-03  0.207E-05    9  29 117    8  49  49   19  42  57    0.000    0.000       0
+  0   1188 01:42:51.19   5.6900A   7.9144   5.4337   3.8212  0.251  0.90  -0.267    450.  0.122E+02  0.770E+00  0.146E-03  0.207E-05    9  29 117   10  48  50   19  42  57    0.000    0.000       0
+  0   1189 01:42:56.73   5.5400A   8.1213   5.4612   3.8151  0.251  0.90  -0.267    450.  0.122E+02  0.770E+00  0.143E-03  0.202E-05    9  29 118   10  48  50   19  42  57    0.000    0.000       0
+  0   1190 01:43:02.35   5.6200A   8.0110   5.4001   3.8462  0.251  0.90  -0.266    450.  0.122E+02  0.769E+00  0.145E-03  0.205E-05    9  29 118    8  51  50   19  42  57    0.000    0.000       0
+  0   1191 01:43:07.98   5.6300A   7.9890   5.3806   3.9061  0.251  0.90  -0.268    450.  0.122E+02  0.769E+00  0.145E-03  0.206E-05    9  29 119    8  51  50   19  42  57    0.000    0.000       0
+  0   1192 01:43:13.72   5.7400A   7.8369   5.4467   3.9957  0.251  1.02  -0.270    650.  0.122E+02  0.769E+00  0.147E-03  0.211E-05    9  29 119    9  51  51   19  42  57    0.000    0.000       0
+  0   1193 01:43:19.56   5.8400A   7.7025   5.5120   4.1016  0.251  1.02  -0.270    650.  0.122E+02  0.769E+00  0.150E-03  0.215E-05    9  29 123   11  48  52   19  42  57    0.000    0.000       0
+  0   1194 01:43:25.44   5.8800A   7.6504   5.6013   4.2106  0.251  1.02  -0.270    650.  0.122E+02  0.769E+00  0.151E-03  0.218E-05    4  29 107   11  48  52   19  42  57    0.000    0.000       0
+  0   1195 01:43:31.23   5.7900A   7.7704   5.5089   4.3074  0.251  1.02  -0.270    650.  0.122E+02  0.769E+00  0.148E-03  0.217E-05    9  30 120   11  48  52   19  42  57    0.000    0.000       0
+  0   1196 01:43:37.08   5.8500A   7.6910   5.7699   4.3817  0.251  1.02  -0.270    650.  0.122E+02  0.769E+00  0.150E-03  0.220E-05    9  30 121   11  49  52   19  42  57    0.000    0.000       0
+  0   1197 01:43:42.91   5.8300A   7.7164   5.8834   4.4230  0.251  1.02  -0.266    650.  0.122E+02  0.768E+00  0.150E-03  0.219E-05    9  30 121   11  49  52   19  42  57    0.000    0.000       0
+  0   1198 01:43:48.81   5.9000A   7.6332   5.7507   4.4385  0.251  1.02  -0.267    650.  0.122E+02  0.768E+00  0.151E-03  0.221E-05    9  30 122   11  49  52   19  42  57    0.000    0.000       0
+  0   1199 01:43:54.80   5.9900A   7.5186   5.4543   4.4307  0.251  1.02  -0.266    650.  0.122E+02  0.768E+00  0.153E-03  0.222E-05    9  30 122   11  49  52   19  42  57    0.000    0.000       0
+  0   1200 01:44:00.80   6.0000A   7.5014   5.1124   4.4095  0.251  1.02  -0.264    650.  0.122E+02  0.768E+00  0.153E-03  0.221E-05    3  30 112   11  49  52   19  42  57    0.000    0.000       0
+  0   1201 01:44:06.80   6.0000A   7.5031  -5.2247   4.3864  0.251  1.02  -0.267    650.  0.122E+02  0.768E+00  0.153E-03  0.219E-05    3  30 113   16  36  54   19  42  57    0.000    0.000       0
+  0   1202 01:44:12.79   5.9900A   7.5164  -5.2779   4.3663  0.251  1.02  -0.263    650.  0.122E+02  0.768E+00  0.153E-03  0.217E-05    3  30 113   16  36  54   19  42  57    0.000    0.000       0
+  0   1203 01:44:18.81   6.0200A   7.4755  -5.2521   4.3529  0.251  1.02  -0.263    650.  0.122E+02  0.768E+00  0.154E-03  0.216E-05    3  30 114   16  36  54   19  42  57    0.000    0.000       0
+  0   1204 01:44:24.90   6.0900A   7.3904  -5.1597   4.3485  0.251  1.02  -0.264    650.  0.122E+02  0.768E+00  0.155E-03  0.217E-05    3  30 115   16  36  54   19  42  57    0.000    0.000       0
+  0   1205 01:44:31.11   6.2100A   7.2499  -5.0259   4.3579  0.251  0.99  -0.264    600.  0.122E+02  0.768E+00  0.158E-03  0.220E-05    3  30 115   16  36  54   19  42  57    0.000    0.000       0
+  0   1206 01:44:37.09   5.9800A   7.5286  -4.8976   4.3858  0.251  0.99  -0.265    600.  0.122E+02  0.768E+00  0.153E-03  0.213E-05   16  43  90   17  36  55   19  42  57    0.000    0.000       0
+  0   1207 01:44:43.10   6.0100A   7.4864   4.9614   4.4407  0.251  0.99  -0.265    600.  0.122E+02  0.768E+00  0.153E-03  0.212E-05    3  31 119    1  76 154   19  42  57    0.000    0.000       0
+  0   1208 01:44:49.08   5.9800A   7.5250   5.1921   4.5046  0.251  0.99  -0.264    600.  0.122E+02  0.768E+00  0.153E-03  0.210E-05    3  31 120    1  77 154   19  42  57    0.000    0.000       0
+  0   1209 01:44:55.01   5.9300A   7.5869   5.2299   4.5717  0.251  0.99  -0.263    600.  0.122E+02  0.767E+00  0.151E-03  0.208E-05    3  31 120    1  77 154   19  42  57    0.000    0.000       0
+  0   1210 01:45:00.94   5.9300A   7.5842   5.0586   4.6273  0.251  0.99  -0.264    600.  0.122E+02  0.767E+00  0.151E-03  0.208E-05   11  27 125    1  78 154   19  42  57    0.000    0.000       0
+  0   1211 01:45:06.83   5.8900A   7.6396   5.0352   4.6551  0.251  1.02  -0.265    650.  0.122E+02  0.767E+00  0.150E-03  0.207E-05   11  27 125    1  78 154   19  42  57    0.000    0.000       0
+  0   1212 01:45:13.02   6.1900A   7.2706   5.3888   4.6450  0.251  1.02  -0.272    650.  0.122E+02  0.767E+00  0.157E-03  0.216E-05    3  32 122    1  78 155   19  42  57    0.000    0.000       0
+  0   1213 01:45:19.06   6.0400A   7.4485   5.2283   4.5749  0.251  1.04  -0.267    700.  0.122E+02  0.767E+00  0.153E-03  0.212E-05   16  43  94    1  78 155   19  42  57    0.000    0.000       0
+  0   1214 01:45:25.17   6.1100A   7.3704   5.2326   4.4734  0.251  1.04  -0.272    700.  0.122E+02  0.767E+00  0.155E-03  0.214E-05    3  32 123    1  79 155   19  42  57    0.000    0.000       0
+  0   1215 01:45:31.35   6.1800A   7.2802   5.2408   4.3927  0.251  1.04  -0.270    700.  0.122E+02  0.767E+00  0.157E-03  0.216E-05    6  28 118    1  79 156    5  39 112    0.000    0.000       0
+  0   1216 01:45:37.54   6.1900A   7.2717   5.3609   4.1644  0.251  0.93  -0.272    500.  0.122E+02  0.767E+00  0.157E-03  0.216E-05   11  28 128    1  79 156   19  42  57    0.000    0.000       0
+  0   1217 01:45:43.79   6.2500A   7.2020   5.1532   4.2806  0.251  0.93  -0.274    500.  0.122E+02  0.767E+00  0.158E-03  0.216E-05    6  28 119    1   0 156    5  39 113    0.000    0.000       0
+  0   1218 01:45:50.05   6.2600A   7.1936   5.0818   4.2108  0.251  0.93  -0.276    500.  0.122E+02  0.766E+00  0.158E-03  0.214E-05    2  32 126    1   0 156    5  39 113    0.000    0.000       0
+  0   1219 01:45:56.32   6.2700A   7.1756   5.1407   4.0979  0.251  1.04  -0.273    700.  0.122E+02  0.766E+00  0.158E-03  0.212E-05    3  31 119    1   0 157    5  41 111    0.000    0.000       0
+  0   1220 01:46:02.57   6.2500A   7.1956   5.0993   4.2942  0.251  1.02  -0.275    650.  0.122E+02  0.766E+00  0.158E-03  0.209E-05    3  31 120    1   1 157    5  41 111    0.000    0.000       0
+  0   1221 01:46:08.80   6.2300A   7.2175   5.1620   4.4639  0.251  1.02  -0.282    650.  0.122E+02  0.766E+00  0.157E-03  0.206E-05    3  31 120   13  75 140    6  40 111    0.000    0.000       0
+  0   1222 01:46:15.03   6.2300A   7.2185   5.2110   4.4172  0.251  1.02  -0.281    650.  0.122E+02  0.766E+00  0.157E-03  0.205E-05    3  31 121   13  75 140    5  41 112    0.000    0.000       0
+  0   1223 01:46:21.32   6.2900A   7.1528   5.0708   4.3707  0.251  1.02  -0.281    650.  0.122E+02  0.765E+00  0.158E-03  0.205E-05    3  31 122    1   2 158    6  40 112    0.000    0.000       0
+  0   1224 01:46:27.61   6.2900A   7.1588   4.9590   4.4968  0.251  1.02  -0.284    650.  0.122E+02  0.765E+00  0.158E-03  0.204E-05    3  31 122    1   2 158    6  40 112    0.000    0.000       0
+  0   1225 01:46:33.57   5.9600A   7.5480   4.8324   4.4325  0.251  1.02  -0.283    650.  0.122E+02  0.765E+00  0.150E-03  0.193E-05   16  40  95    1   2 159    6  41 113    0.000    0.000       0
+  0   1226 01:46:39.61   6.0400A   7.4459   5.0644   4.6637  0.251  1.02  -0.324    650.  0.122E+02  0.765E+00  0.152E-03  0.193E-05   16  45  82    1   3 159    6  41 113    0.000    0.000       0
+  0   1227 01:46:45.40   5.7900A   7.7665   4.9467   4.3155  0.251  1.02  -0.285    650.  0.122E+02  0.765E+00  0.146E-03  0.185E-05   16  40  96    1   3 159    6  41 113    0.000    0.000       0
+  0   1228 01:46:51.30   5.9000A   7.6217   4.9365   4.5289  0.251  1.02  -0.282    650.  0.122E+02  0.764E+00  0.148E-03  0.186E-05   16  40  97    2  50 131    6  41 114    0.000    0.000       0
+  0   1229 01:46:56.98   5.6800A   7.9171   5.0921   4.3051  0.251  1.02  -0.283    650.  0.122E+02  0.764E+00  0.143E-03  0.179E-05   16  40  97    1  50 131    6  41 114    0.000    0.000       0
+  0   1230 01:47:02.83   5.8500A   7.6933   5.1393   4.1453  0.251  1.02  -0.283    650.  0.122E+02  0.764E+00  0.147E-03  0.183E-05   16  40  98    1  50 131    6  42 108    0.000    0.000       0
+  0   1231 01:47:08.55   5.7200A   7.8722   5.3709   4.2616  0.251  1.02  -0.284    650.  0.122E+02  0.763E+00  0.144E-03  0.179E-05   16  40  98    1  51 131    6  42 108    0.000    0.000       0
+  0   1232 01:47:14.82   6.2700A   7.1786   5.3695   4.2498  0.251  1.04  -0.284    700.  0.122E+02  0.763E+00  0.157E-03  0.195E-05   16  47  91    1  51 131    6  42 108    0.000    0.000       0
+  0   1233 01:47:21.19   6.3700A   7.0671   5.0123   4.2498  0.251  1.04  -0.293    700.  0.122E+02  0.763E+00  0.159E-03  0.200E-05    3  33 126    1  51 131    7  41 115    0.000    0.000       0
+  0   1234 01:47:26.96   5.7700A   7.7952   5.1280   4.1774  0.251  1.04  -0.288    700.  0.122E+02  0.762E+00  0.145E-03  0.184E-05   16  39  99    1  51 132    7  41 116    0.000    0.000       0
+  0   1235 01:47:32.78   5.8200A   7.7297   5.4246   4.2536  0.251  1.04  -0.289    700.  0.122E+02  0.762E+00  0.146E-03  0.183E-05   16  39  99    1  52 132    7  41 116    0.000    0.000       0
+  0   1236 01:47:38.89   6.1100A   7.3690   5.5181   4.0402  0.251  0.99  -0.298    600.  0.122E+02  0.762E+00  0.153E-03  0.191E-05   16  39 100    1  52 132   19  42  57    0.000    0.000       0
+  0   1237 01:47:45.14   6.2500A   7.2046   5.6016   4.0132  0.251  0.99  -0.285    600.  0.122E+02  0.761E+00  0.156E-03  0.193E-05   16  60  74    1  53 132    7  42 109    0.000    0.000       0
+  0   1238 01:47:51.15   6.0100A   7.4876   5.5780   3.9582  0.251  0.99  -0.287    600.  0.122E+02  0.761E+00  0.151E-03  0.185E-05   16  39 101    1  53 132   19  42  57    0.000    0.000       0
+  0   1239 01:47:57.25   6.1000A   7.3783   5.2672   3.9939  0.251  0.99  -0.287    600.  0.122E+02  0.760E+00  0.152E-03  0.186E-05    3  34 131    1  53 132   19  43  58    0.000    0.000       0
+  0   1240 01:48:03.33   6.0800A   7.4071   5.1799   4.0231  0.251  0.99  -0.288    600.  0.122E+02  0.760E+00  0.152E-03  0.185E-05    3  34 132    1  54 132   19  43  58    0.000    0.000       0
+  0   1241 01:48:09.37   6.0400A   7.4519   5.2228   4.0148  0.251  0.99  -0.291    600.  0.122E+02  0.760E+00  0.151E-03  0.184E-05    3  34 132    1  54 133   19  43  58    0.000    0.000       0
+  0   1242 01:48:15.42   6.0500A   7.4330   5.3166   3.9680  0.251  0.99  -0.295    600.  0.122E+02  0.759E+00  0.151E-03  0.185E-05    3  34 133    1  54 133   19  43  58    0.000    0.000       0
+  0   1243 01:48:21.54   6.1200A   7.3561   5.2368   3.8803  0.251  1.02  -0.301    650.  0.122E+02  0.759E+00  0.153E-03  0.188E-05    3  34 134    1  54 133   19  43  58    0.000    0.000       0
+  0   1244 01:48:27.75   6.2100A   7.2512   5.3341   3.8769  0.251  1.02  -0.300    650.  0.122E+02  0.758E+00  0.155E-03  0.191E-05    3  34 134    1  55 133   19  42  57    0.000    0.000       0
+  0   1245 01:48:34.05   6.3000A   7.1473   5.2465   3.8912  0.251  1.02  -0.300    650.  0.122E+02  0.758E+00  0.157E-03  0.193E-05    3  34 135    1  55 133   19  42  57    0.000    0.000       0
+  0   1246 01:48:40.37   6.3200A   7.1221   5.0832   3.9234  0.251  1.02  -0.296    650.  0.122E+02  0.757E+00  0.157E-03  0.193E-05   16  47  82    2  49 142   19  42  57    0.000    0.000       0
+  0   1247 01:48:46.74   6.3700A   7.0617   5.0110   3.9767  0.251  1.02  -0.294    650.  0.122E+02  0.757E+00  0.158E-03  0.193E-05    3  35 136    2  49 142   19  42  57    0.000    0.000       0
+  0   1248 01:48:52.95   6.2100A   7.2411   5.0626   4.0457  0.251  0.96  -0.292    550.  0.122E+02  0.757E+00  0.155E-03  0.188E-05   16  47  84    2  50 142   19  42  57    0.000    0.000       0
+  0   1249 01:48:58.90   5.9500A   7.5626   5.0932   4.1242  0.251  0.96  -0.290    550.  0.122E+02  0.756E+00  0.149E-03  0.179E-05   16  47  84    3  50 144   19  42  57    0.000    0.000       0
+  0   1250 01:49:04.72   5.8200A   7.7365   5.0903   4.1959  0.251  0.96  -0.289    550.  0.122E+02  0.756E+00  0.145E-03  0.173E-05   17  39  97    2  50 143   19  42  57    0.000    0.000       0
+  0   1251 01:49:10.72   6.0000A   7.5038   5.2109   4.2440  0.251  0.96  -0.293    550.  0.122E+02  0.755E+00  0.149E-03  0.176E-05   17  39  97    3  51 144   19  42  57    0.000    0.000       0
+  0   1252 01:49:16.95   6.2300A   7.2277   5.2223   4.2542  0.251  1.02  -0.292    650.  0.122E+02  0.755E+00  0.155E-03  0.181E-05   16  47  85    2  51 143   19  42  57    0.000    0.000       0
+  0   1253 01:49:23.48   6.5300A   6.8952   5.3982   4.2263  0.251  1.02  -0.287    650.  0.122E+02  0.754E+00  0.161E-03  0.187E-05   17  39  98   13  68   8   19  42  57    0.000    0.000       0
+  0   1254 01:49:29.94   6.4600A   6.9641   5.3735   4.1604  0.251  1.02  -0.284    650.  0.122E+02  0.754E+00  0.160E-03  0.185E-05   18  27  13   13  68   8   19  42  57    0.000    0.000       0
+  0   1255 01:49:36.28   6.3400A   7.0926   5.1364   4.0838  0.251  1.02  -0.283    650.  0.122E+02  0.753E+00  0.157E-03  0.180E-05   17  45  79    2  52 144   19  42  57    0.000    0.000       0
+  0   1256 01:49:42.67   6.3900A   7.0470   5.1799   4.0029  0.251  1.02  -0.284    650.  0.122E+02  0.753E+00  0.158E-03  0.180E-05   17  45  79    2  52 144   19  42  57    0.000    0.000       0
+  0   1257 01:49:49.24   6.5700A   6.8479   5.0303   3.9189  0.251  1.02  -0.286    650.  0.122E+02  0.752E+00  0.162E-03  0.183E-05   19  77  92    3  53 145   19  42  57    0.000    0.000       0
+  0   1258 01:49:55.67   6.4300A   6.9949   5.1244   3.8381  0.251  1.02  -0.285    650.  0.122E+02  0.752E+00  0.159E-03  0.181E-05    3  63  90    2  53 144   19  42  57    0.000    0.000       0
+  0   1259 01:50:01.97   6.3000A   7.1433   5.3368   3.7795  0.251  1.02  -0.286    650.  0.122E+02  0.751E+00  0.156E-03  0.179E-05   14  47  95   13  70   9   19  42  57    0.000    0.000       0
+  0   1260 01:50:07.93   5.9600A   7.5452   5.0094   3.7324  0.251  1.02  -0.286    650.  0.122E+02  0.751E+00  0.148E-03  0.173E-05   14  47  96   13  70   9   19  42  57    0.000    0.000       0
+  0   1261 01:50:13.51   5.5800A   8.0664   5.0560   3.6989  0.251  1.02  -0.287    650.  0.122E+02  0.751E+00  0.140E-03  0.164E-05   14  47  96    2  54 145   19  42  57    0.000    0.000       0
+  0   1262 01:50:19.49   5.9800A   7.5221   5.0301   3.6874  0.251  0.99  -0.290    600.  0.122E+02  0.750E+00  0.149E-03  0.176E-05   14  47  96    2  54 145    5  62  85    0.000    0.000       0
+  0   1263 01:50:25.02   5.5300A   8.1310   5.1362   3.7042  0.251  0.99  -0.312    600.  0.122E+02  0.750E+00  0.138E-03  0.167E-05   14  47  97    4  56 147    5  62  85    0.000    0.000       0
+  0   1264 01:50:30.58   5.5600A   8.0927   5.1775   3.7162  0.251  0.99  -0.292    600.  0.122E+02  0.749E+00  0.139E-03  0.168E-05   14  47  97    4  56 147    5  62  86    0.000    0.000       0
+  0   1265 01:50:36.73   6.1500A   7.3142   5.0588   3.7490  0.251  0.99  -0.289    600.  0.122E+02  0.749E+00  0.153E-03  0.184E-05   14  47  98    4  56 147    5  62  86    0.000    0.000       0
+  0   1266 01:50:42.63   5.9000A   7.6262   5.1494   3.7717  0.251  0.99  -0.287    600.  0.122E+02  0.748E+00  0.147E-03  0.179E-05   14  47  98    4  57 147    5  62  86    0.000    0.000       0
+  0   1267 01:50:48.63   6.0000A   7.4968   5.1036   3.7490  0.251  0.99  -0.309    600.  0.122E+02  0.748E+00  0.149E-03  0.181E-05   14  47  99    4  57 147    5  62  86    0.000    0.000       0
+  0   1268 01:50:54.35   5.7200A   7.8698   4.9679   3.6631  0.251  0.99  -0.285    600.  0.122E+02  0.747E+00  0.143E-03  0.173E-05   14  47  99    4  57 148    5  62  86    0.000    0.000       0
+  0   1269 01:51:00.41   6.0600A   7.4286  -5.0718   3.6971  0.251  0.96  -0.285    550.  0.122E+02  0.747E+00  0.151E-03  0.180E-05   14  47 100   14  35  53    5  63  88    0.000    0.000       0
+  0   1270 01:51:05.90   5.4900A   8.1992  -5.1143   3.8183  0.251  0.96  -0.286    550.  0.122E+02  0.747E+00  0.138E-03  0.164E-05   14  47 100   14  35  53    5  63  88    0.000    0.000       0
+  0   1271 01:51:11.79   5.8900A   7.6365  -5.0881   3.8491  0.251  0.96  -0.285    550.  0.122E+02  0.746E+00  0.147E-03  0.173E-05   14  47 100   14  35  53    5  63  88    0.000    0.000       0
+  0   1272 01:51:17.81   6.0200A   7.4811  -5.0130   3.8088  0.251  0.96  -0.287    550.  0.122E+02  0.746E+00  0.150E-03  0.177E-05   14  47 101   14  35  53    5  63  88    0.000    0.000       0
+  0   1273 01:51:23.91   6.1000A   7.3791  -4.9294   3.8695  0.251  0.96  -0.286    550.  0.122E+02  0.745E+00  0.152E-03  0.180E-05   14  47 101   14  35  53    6  63  88    0.000    0.000       0
+  0   1274 01:51:30.34   6.4300A   6.9986  -4.8984   3.9270  0.251  0.96  -0.285    550.  0.122E+02  0.744E+00  0.159E-03  0.190E-05   14  47 102   15  36  54    6  63  88    0.000    0.000       0
+  0   1275 01:51:36.64   6.3000A   7.1484  -4.9041   3.9346  0.251  0.96  -0.289    550.  0.122E+02  0.744E+00  0.156E-03  0.189E-05   14  47 102   15  36  54    6  63  89    0.000    0.000       0
+  0   1276 01:51:43.04   6.4000A   7.0351  -4.8955   3.9838  0.251  0.96  -0.285    550.  0.122E+02  0.743E+00  0.159E-03  0.194E-05   15  25  83   15  36  54    6  63  89    0.000    0.000       0
+  0   1277 01:51:49.39   6.3500A   7.0912  -4.8500   3.9348  0.251  0.96  -0.282    550.  0.122E+02  0.743E+00  0.157E-03  0.195E-05   19  29 141   15  36  54    6  63  89    0.000    0.000       0
+  0   1278 01:51:55.70   6.3100A   7.1318  -4.7579   3.8925  0.251  0.96  -0.281    550.  0.122E+02  0.742E+00  0.156E-03  0.196E-05   15  50  68   15  36  54   19  42  57    0.000    0.000       0
+  0   1279 01:52:02.19   6.4900A   6.9321   4.9246   3.9516  0.251  0.96  -0.285    550.  0.122E+02  0.742E+00  0.160E-03  0.202E-05   16  46  79    1  45 150   19  42  57    0.000    0.000       0
+  0   1280 01:52:08.68   6.4900A   6.9361   4.9670   3.9898  0.250  0.96  -0.284    550.  0.122E+02  0.741E+00  0.160E-03  0.203E-05   17  24  39    1  45 151   19  42  57    0.000    0.000       0
+  0   1281 01:52:15.24   6.5600A   6.8646   5.0139   4.0072  0.250  0.96  -0.286    550.  0.122E+02  0.741E+00  0.162E-03  0.204E-05   19  29 143    1  46 151   19  42  57    0.000    0.000       0
+  0   1282 01:52:21.67   6.4300A   6.9983   4.8266   4.0012  0.250  0.96  -0.287    550.  0.122E+02  0.740E+00  0.159E-03  0.201E-05   14  26  88    1  46 151   19  42  57    0.000    0.000       0
+  0   1283 01:52:27.97   6.3000A   7.1452   4.9805   3.9879  0.250  0.96  -0.291    550.  0.122E+02  0.740E+00  0.156E-03  0.197E-05   14  26  88    1  47 152   19  42  57    0.000    0.000       0
+  0   1284 01:52:34.35   6.3800A   7.0485   4.9878   3.9751  0.250  0.96  -0.298    550.  0.122E+02  0.739E+00  0.157E-03  0.199E-05    1  13  74    1  47 152   19  42  57    0.000    0.000       0
+  0   1285 01:52:40.63   6.2800A   7.1620   5.0447   3.9632  0.250  0.99  -0.303    600.  0.122E+02  0.739E+00  0.155E-03  0.197E-05    1  13  75    1  48 153   19  42  57    0.000    0.000       0
+  0   1286 01:52:46.95   6.3200A   7.1150   5.1607   3.9626  0.250  0.99  -0.291    600.  0.122E+02  0.738E+00  0.156E-03  0.199E-05    1  13  76    1  48 153   19  42  57    0.000    0.000       0
+  0   1287 01:52:53.31   6.3600A   7.0739   4.9857   3.9627  0.250  0.99  -0.287    600.  0.122E+02  0.738E+00  0.157E-03  0.200E-05    1  13  76    1  48 154   19  42  57    0.000    0.000       0
+  0   1288 01:52:59.75   6.4400A   6.9898   5.2212   3.9611  0.250  0.99  -0.286    600.  0.122E+02  0.737E+00  0.158E-03  0.203E-05    1  13  77    1  49 154   19  42  57    0.000    0.000       0
+  0   1289 01:53:06.14   6.3900A   7.0432   5.0640   3.9551  0.250  0.99  -0.287    600.  0.122E+02  0.736E+00  0.157E-03  0.202E-05   15  49  92    1  49 154   19  42  57    0.000    0.000       0
+  0   1290 01:53:12.53   6.3900A   7.0410   5.0805   3.9525  0.250  0.99  -0.292    600.  0.122E+02  0.736E+00  0.157E-03  0.202E-05   20  30  82    1  50 155   19  42  57    0.000    0.000       0
+  0   1291 01:53:18.81   6.2800A   7.1679   5.1770   3.9570  0.250  0.99  -0.290    600.  0.122E+02  0.735E+00  0.154E-03  0.200E-05   20  30  82    1  50 155   19  42  57    0.000    0.000       0
+  0   1292 01:53:25.06   6.2500A   7.2037  -5.2241   3.9795  0.250  0.99  -0.284    600.  0.122E+02  0.735E+00  0.154E-03  0.198E-05   15  48  91   17  37  55   19  42  57    0.000    0.000       0
+  0   1293 01:53:31.45   6.3900A   7.0442   5.2616   4.0193  0.250  1.02  -0.282    650.  0.122E+02  0.734E+00  0.156E-03  0.202E-05   20  30  82    1  52 156   19  42  57    0.000    0.000       0
+  0   1294 01:53:37.86   6.4100A   7.0164   5.3920   4.0717  0.250  1.02  -0.282    650.  0.122E+02  0.733E+00  0.157E-03  0.203E-05   15  48  92    1  52 156   19  42  57    0.000    0.000       0
+  0   1295 01:53:44.24   6.3800A   7.0518   5.1509   4.1324  0.250  1.02  -0.282    650.  0.122E+02  0.733E+00  0.156E-03  0.202E-05   17  27   7    1  52 156   19  42  57    0.000    0.000       0
+  0   1296 01:53:50.39   6.1500A   7.3187   5.6028   4.1861  0.250  1.02  -0.282    650.  0.122E+02  0.732E+00  0.151E-03  0.195E-05   16  40 101    1  53 157   19  42  57    0.000    0.000       0
+  0   1297 01:53:56.37   5.9800A   7.5233   5.6447   4.2250  0.250  1.02  -0.282    650.  0.122E+02  0.732E+00  0.147E-03  0.190E-05   16  40 101    1  53 157   19  42  57    0.000    0.000       0
+  0   1298 01:54:02.39   6.0200A   7.4690   5.5889   4.2400  0.250  1.02  -0.281    650.  0.122E+02  0.731E+00  0.147E-03  0.190E-05   15  49  98    1  54 157   19  42  57    0.000    0.000       0
+  0   1299 01:54:08.44   6.0500A   7.4337   5.4782   4.2289  0.250  1.02  -0.281    650.  0.122E+02  0.731E+00  0.148E-03  0.192E-05   16  40 102    1  54 158   19  42  57    0.000    0.000       0
+  0   1300 01:54:14.46   6.0200A   7.4716   5.6386   4.2058  0.250  1.02  -0.284    650.  0.122E+02  0.730E+00  0.147E-03  0.192E-05   15  47  76    1  54 158   19  42  57    0.000    0.000       0
+  0   1301 01:54:20.60   6.1400A   7.3294   5.9361   4.1861  0.250  1.02  -0.279    650.  0.122E+02  0.729E+00  0.150E-03  0.196E-05   15  47  76    1  55 158   19  42  57    0.000    0.000       0
+  0   1302 01:54:27.00   6.4000A   7.0267   5.8073   4.1771  0.250  1.02  -0.278    650.  0.122E+02  0.729E+00  0.156E-03  0.204E-05   20  28  90    1  55 158   19  42  57    0.000    0.000       0
+  0   1303 01:54:33.41   6.4100A   7.0194   5.4982   4.1893  0.250  1.02  -0.279    650.  0.122E+02  0.728E+00  0.156E-03  0.206E-05   20  29  88    1  56 158   19  42  57    0.000    0.000       0
+  0   1304 01:54:39.54   6.1300A   7.3378   5.7313   4.2366  0.250  1.02  -0.278    650.  0.122E+02  0.727E+00  0.150E-03  0.199E-05   15  48 103    1  56 159   19  42  57    0.000    0.000       0
+  0   1305 01:54:45.88   6.3400A   7.1029   5.8318   4.3117  0.250  0.99  -0.279    600.  0.122E+02  0.727E+00  0.155E-03  0.206E-05   15  48 103    1  56 159   19  42  57    0.000    0.000       0
+  0   1306 01:54:51.98   6.1000A   7.3819   5.6586   4.3839  0.250  0.99  -0.279    600.  0.122E+02  0.726E+00  0.149E-03  0.200E-05   15  48 104    1  57 159   19  42  57    0.000    0.000       0
+  0   1307 01:54:58.12   6.1400A   7.3279   5.6248   4.4538  0.250  0.99  -0.279    600.  0.122E+02  0.726E+00  0.150E-03  0.201E-05   15  48 104    1  57 159   19  42  57    0.000    0.000       0
+  0   1308 01:55:04.44   6.3200A   7.1161   5.3001   4.4927  0.250  0.99  -0.282    600.  0.122E+02  0.725E+00  0.154E-03  0.207E-05   15  48 105    1  57   0   19  42  57    0.000    0.000       0
+  0   1309 01:55:10.69   6.2500A   7.1977   5.3266   4.4913  0.250  0.99  -0.281    600.  0.122E+02  0.724E+00  0.152E-03  0.206E-05   15  48 105    1  58   0   19  42  57    0.000    0.000       0
+  0   1310 01:55:17.01   6.3200A   7.1174   5.5255   4.4602  0.250  0.99  -0.283    600.  0.122E+02  0.724E+00  0.154E-03  0.209E-05   15  45  94    1  58   0   19  42  57    0.000    0.000       0
+  0   1311 01:55:23.37   6.3600A   7.0728   5.3488   4.3957  0.250  1.02  -0.284    650.  0.122E+02  0.723E+00  0.155E-03  0.212E-05   15  45  94    1  58   0   19  42  57    0.000    0.000       0
+  0   1312 01:55:29.88   6.5100A   6.9162   5.1850   4.3139  0.250  1.02  -0.285    650.  0.122E+02  0.723E+00  0.158E-03  0.217E-05   20  28  94    1  59   0   19  42  57    0.000    0.000       0
+  0   1313 01:55:35.92   6.0400A   7.4514   5.0532   4.2220  0.250  1.02  -0.284    650.  0.122E+02  0.722E+00  0.147E-03  0.204E-05   14  58  95    1  59   0   19  42  57    0.000    0.000       0
+  0   1314 01:55:42.05   6.1300A   7.3451   5.0378   4.1610  0.251  1.02  -0.289    650.  0.122E+02  0.722E+00  0.149E-03  0.206E-05   14  58  95    3  59   4   19  42  57    0.000    0.000       0
+  0   1315 01:55:48.43   6.3800A   7.0559   5.1700   4.0944  0.251  1.02  -0.283    650.  0.122E+02  0.721E+00  0.155E-03  0.213E-05   19  33  89    3  60   4   19  42  57    0.000    0.000       0
+  0   1316 01:55:54.92   6.4900A   6.9359   5.2521   4.0319  0.251  0.96  -0.280    550.  0.122E+02  0.721E+00  0.157E-03  0.216E-05   16  40 100    3  60   4   19  42  57    0.000    0.000       0
+  0   1317 01:56:01.42   6.5000A   6.9189   5.1252   3.9868  0.251  0.96  -0.281    550.  0.122E+02  0.720E+00  0.157E-03  0.217E-05   15  51  98    3  61   4   19  42  57    0.000    0.000       0
+  0   1318 01:56:07.89   6.4700A   6.9531   5.0798   3.9593  0.251  0.96  -0.285    550.  0.122E+02  0.720E+00  0.156E-03  0.215E-05   19  30  85    3  61   4   19  42  57    0.000    0.000       0
+  0   1319 01:56:14.26   6.3700A   7.0629   5.1379   3.9444  0.251  0.96  -0.281    550.  0.122E+02  0.719E+00  0.154E-03  0.212E-05   15  51  99    3  61   5   19  42  57    0.000    0.000       0
+  0   1320 01:56:20.60   6.3400A   7.0933   5.1980   3.9381  0.251  0.99  -0.278    600.  0.122E+02  0.719E+00  0.153E-03  0.210E-05   19  30  86    3  62   5   19  42  57    0.000    0.000       0
+  0   1321 01:56:26.96   6.3600A   7.0806   5.2345   3.9320  0.251  0.99  -0.277    600.  0.122E+02  0.718E+00  0.154E-03  0.210E-05   19  30  86    3  62   5   19  42  57    0.000    0.000       0
+  0   1322 01:56:33.38   6.4200A   7.0072   5.0822   3.9241  0.251  0.99  -0.276    600.  0.122E+02  0.718E+00  0.155E-03  0.213E-05   19  29  88    3  62   5   19  42  57    0.000    0.000       0
+  0   1323 01:56:39.65   6.2700A   7.1804   5.0726   3.9162  0.251  0.99  -0.278    600.  0.122E+02  0.718E+00  0.152E-03  0.210E-05   19  28  89    3  66   6   19  42  57    0.000    0.000       0
+  0   1324 01:56:45.91   6.2600A   7.1850   5.0895   3.9203  0.251  0.99  -0.280    600.  0.122E+02  0.717E+00  0.151E-03  0.211E-05   19  28  89    3  63   6   19  42  57    0.000    0.000       0
+  0   1325 01:56:52.05   6.1400A   7.3331   5.0659   3.9363  0.251  0.99  -0.279    600.  0.122E+02  0.717E+00  0.149E-03  0.210E-05   19  28  90    3  63   6   19  42  57    0.000    0.000       0
+  0   1326 01:56:58.17   6.1200A   7.3496   5.0152   3.9747  0.251  0.99  -0.277    600.  0.122E+02  0.717E+00  0.148E-03  0.212E-05   17  33 113    3  67   6   19  42  57    0.000    0.000       0
+  0   1327 01:57:04.37   6.2000A   7.2581   4.8445   4.0336  0.251  0.99  -0.279    600.  0.122E+02  0.717E+00  0.150E-03  0.217E-05   19  28  91    5  65  10   19  42  57    0.000    0.000       0
+  0   1328 01:57:10.48   6.1100A   7.3674   4.9651   4.1108  0.251  0.99  -0.279    600.  0.122E+02  0.716E+00  0.148E-03  0.216E-05   17  33 114    5  66  10   19  42  57    0.000    0.000       0
+  0   1329 01:57:16.71   6.2300A   7.2250   5.0622   4.2023  0.251  0.99  -0.279    600.  0.122E+02  0.716E+00  0.151E-03  0.221E-05   19  28  92    3  68   7   19  42  57    0.000    0.000       0
+  0   1330 01:57:22.91   6.2000A   7.2524   4.9736   4.2907  0.251  0.99  -0.278    600.  0.122E+02  0.716E+00  0.150E-03  0.220E-05   17  33 115    3  68   7   19  42  57    0.000    0.000       0
+  0   1331 01:57:29.27   6.3600A   7.0729   5.0097   4.3681  0.251  0.99  -0.278    600.  0.122E+02  0.716E+00  0.154E-03  0.225E-05   19  28  93    3  69   7   19  42  57    0.000    0.000       0
+  0   1332 01:57:35.52   6.2500A   7.1955   5.0620   4.4159  0.251  0.99  -0.278    600.  0.122E+02  0.715E+00  0.151E-03  0.222E-05   15  51 111    3  53   2   19  42  57    0.000    0.000       0
+  0   1333 01:57:41.91   6.3900A   7.0377   4.9571   4.4361  0.251  0.99  -0.278    600.  0.122E+02  0.715E+00  0.154E-03  0.226E-05   19  28  94    3  53   3   19  42  57    0.000    0.000       0
+  0   1334 01:57:48.23   6.3200A   7.1229   4.9169   4.4133  0.251  0.99  -0.278    600.  0.122E+02  0.715E+00  0.152E-03  0.224E-05   19  26  96    3  53   3   19  42  57    0.000    0.000       0
+  0   1335 01:57:54.67   6.4400A   6.9839   5.0233   4.3624  0.251  0.99  -0.280    600.  0.122E+02  0.715E+00  0.155E-03  0.227E-05   19  26  97    3  70   8   19  42  57    0.000    0.000       0
+  0   1336 01:58:00.87   6.2000A   7.2604   4.9366   4.2778  0.251  0.99  -0.282    600.  0.122E+02  0.715E+00  0.149E-03  0.220E-05   19  26  97    3  54   4   19  42  57    0.000    0.000       0
+  0   1337 01:58:07.24   6.3700A   7.0603   4.9132   4.1891  0.251  0.99  -0.284    600.  0.122E+02  0.714E+00  0.153E-03  0.226E-05   19  26  97    3  54   4   19  42  57    0.000    0.000       0
+  0   1338 01:58:13.44   6.2000A   7.2526   4.8170   4.0774  0.251  0.90  -0.283    450.  0.122E+02  0.714E+00  0.149E-03  0.221E-05   19  26  98    3  55   4   19  42  57    0.000    0.000       0
+  0   1339 01:58:19.80   6.3600A   7.0721   4.8077   3.9791  0.251  1.02  -0.285    650.  0.122E+02  0.714E+00  0.152E-03  0.226E-05   19  26  98    1  46  11   19  42  57    0.000    0.000       0
+  0   1340 01:58:26.04   6.2400A   7.2159   4.8616   3.8803  0.251  1.02  -0.298    650.  0.122E+02  0.714E+00  0.150E-03  0.222E-05   19  26  99    1  46  12   19  42  57    0.000    0.000       0
+  0   1341 01:58:32.39   6.3500A   7.0825   4.8363   3.8072  0.251  1.02  -0.287    650.  0.122E+02  0.714E+00  0.152E-03  0.225E-05   17  45  85    1  47  12   19  42  57    0.000    0.000       0
+  0   1342 01:58:38.65   6.2600A   7.1896   4.9520   3.7463  0.251  1.02  -0.284    650.  0.122E+02  0.713E+00  0.150E-03  0.221E-05   19  26 100    1  47  12   19  42  57    0.000    0.000       0
+  0   1343 01:58:44.97   6.3200A   7.1226   4.9880   3.7096  0.251  1.02  -0.282    650.  0.122E+02  0.713E+00  0.151E-03  0.223E-05   15  51 117    1  47  13   19  42  57    0.000    0.000       0
+  0   1344 01:58:51.48   6.5100A   6.9095   5.0260   3.6845  0.251  1.02  -0.280    650.  0.122E+02  0.713E+00  0.155E-03  0.230E-05   15  51 132    2  48  13   19  42  57    0.000    0.000       0
+  0   1345 01:58:57.73   6.2500A   7.1944   5.0664   3.6660  0.251  1.02  -0.279    650.  0.122E+02  0.713E+00  0.150E-03  0.222E-05   15  51 132    1  48  13   19  42  57    0.000    0.000       0
+  0   1346 01:59:04.30   6.5700A   6.8447   4.9350   3.6643  0.251  1.02  -0.280    650.  0.122E+02  0.712E+00  0.156E-03  0.232E-05   19  20 152    2  48  14   19  42  57    0.000    0.000       0
+  0   1347 01:59:10.75   6.4500A   6.9742   5.1556   3.6487  0.251  0.99  -0.278    600.  0.122E+02  0.712E+00  0.154E-03  0.230E-05   19  24 105    2  49  14   19  42  57    0.000    0.000       0
+  0   1348 01:59:17.14   6.3900A   7.0368   5.0315   3.7670  0.251  0.99  -0.277    600.  0.122E+02  0.712E+00  0.152E-03  0.228E-05   19  20 154    1  49  14    5  63  96    0.000    0.000       0
+  0   1349 01:59:23.51   6.3700A   7.0695   4.9556   3.8300  0.251  0.99  -0.276    600.  0.122E+02  0.711E+00  0.152E-03  0.227E-05   19  20 154    2  49  15    5  62  96    0.000    0.000       0
+  0   1350 01:59:30.06   6.5500A   6.8699   5.0033   3.7852  0.251  0.99  -0.274    600.  0.122E+02  0.711E+00  0.155E-03  0.232E-05   16  51 148    2  50  15    5  62  96    0.000    0.000       0
+  0   1351 01:59:36.63   6.5700A   6.8443   4.9665   3.7779  0.251  0.99  -0.277    600.  0.122E+02  0.711E+00  0.156E-03  0.232E-05   19  24 107    1  50  15    5  61  96    0.000    0.000       0
+  0   1352 01:59:43.19   6.5600A   6.8636   4.8562   3.7088  0.251  0.99  -0.273    600.  0.122E+02  0.710E+00  0.155E-03  0.232E-05   19  24 107   12  47  52    5  61  96    0.000    0.000       0
+  0   1353 01:59:49.80   6.6100A   6.8075   4.9490   3.6419  0.251  0.99  -0.271    600.  0.122E+02  0.710E+00  0.157E-03  0.233E-05   19  12  48    1  51  16   19  42  57    0.000    0.000       0
+  0   1354 01:59:56.41   6.6100A   6.8072   5.0149   3.6951  0.251  0.99  -0.271    600.  0.122E+02  0.710E+00  0.157E-03  0.234E-05   15  53 124    1  51  16   19  42  57    0.000    0.000       0
+  0   1355 02:00:03.12   6.7100A   6.7073   4.9840   3.7727  0.251  0.99  -0.271    600.  0.122E+02  0.709E+00  0.159E-03  0.238E-05   19  25  25    1  52  16   19  42  57    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_topo
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_topo	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/mountain/example_mountain_topo	(revision 3477)
@@ -0,0 +1,81 @@
+
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   50.79   51.17   50.79    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   52.32   56.78   60.71   63.95   66.37   67.86   68.37   67.86   66.37   63.95   60.71   56.78   52.32    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.94   62.54   68.88   74.75   79.92   84.19   87.37   89.34   90.01   89.34   87.37   84.19   79.92   74.75   68.88   62.54   55.94    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.53   63.95   72.56   81.11   89.34   96.95  103.66  109.19  113.33  115.88  116.75  115.88  113.33  109.19  103.66   96.95   89.34   81.11   72.56   63.95   55.53    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   51.17   60.71   70.96   81.72   92.72  103.66  114.17  123.90  132.47  139.54  144.83  148.09  149.20  148.09  144.83  139.54  132.47  123.90  114.17  103.66   92.72   81.72   70.96   60.71   51.17    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   53.50   64.42   76.43   89.34  102.89  116.75  130.52  143.75  156.00  166.79  175.70  182.35  186.46  187.85  186.46  182.35  175.70  166.79  156.00  143.75  130.52  116.75  102.89   89.34   76.43   64.42   53.50    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   54.30   66.37   79.92   94.82  110.83  127.64  144.83  161.90  178.33  193.52  206.90  217.95  226.20  231.30  233.03  231.30  226.20  217.95  206.90  193.52  178.33  161.90  144.83  127.64  110.83   94.82   79.92   66.37   54.30    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   53.50   66.37   81.11   97.68  115.88  135.46  156.00  177.01  197.88  217.95  236.52  252.88  266.38  276.46  282.70  284.81  282.70  276.46  266.38  252.88  236.52  217.95  197.88  177.01  156.00  135.46  115.88   97.68   81.11   66.37   53.50    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   51.17   64.42   79.92   97.68  117.62  139.54  163.11  187.85  213.15  238.28  262.45  284.81  304.51  320.77  332.91  340.42  342.96  340.42  332.91  320.77  304.51  284.81  262.45  238.28  213.15  187.85  163.11  139.54  117.62   97.68   79.92   64.42   51.17    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   60.71   76.43   94.82  115.88  139.54  165.55  193.52  222.87  252.88  282.70  311.37  337.90  361.27  380.56  394.97  403.87  406.88  403.87  394.97  380.56  361.27  337.90  311.37  282.70  252.88  222.87  193.52  165.55  139.54  115.88   94.82   76.43   60.71    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.53   70.96   89.34  110.83  135.46  163.11  193.52  226.20  260.51  295.59  330.45  363.96  394.97  422.29  444.84  461.68  472.09  475.61  472.09  461.68  444.84  422.29  394.97  363.96  330.45  295.59  260.51  226.20  193.52  163.11  135.46  110.83   89.34   70.96   55.53    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   63.95   81.72  102.89  127.64  156.00  187.85  222.87  260.51  300.01  340.42  380.56  419.16  454.87  486.33  512.30  531.69  543.68  547.74  543.68  531.69  512.30  486.33  454.87  419.16  380.56  340.42  300.01  260.51  222.87  187.85  156.00  127.64  102.89   81.72   63.95    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.94   72.56   92.72  116.75  144.83  177.01  213.15  252.88  295.59  340.42  386.26  431.81  475.61  516.12  551.82  581.29  603.29  616.90  621.50  616.90  603.29  581.29  551.82  516.12  475.61  431.81  386.26  340.42  295.59  252.88  213.15  177.01  144.83  116.75   92.72   72.56   55.94    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   62.54   81.11  103.66  130.52  161.90  197.88  238.28  282.70  330.45  380.56  431.81  482.73  531.69  576.98  616.90  649.84  674.44  689.64  694.79  689.64  674.44  649.84  616.90  576.98  531.69  482.73  431.81  380.56  330.45  282.70  238.28  197.88  161.90  130.52  103.66   81.11   62.54    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   52.32   68.88   89.34  114.17  143.75  178.33  217.95  262.45  311.37  363.96  419.16  475.61  531.69  585.62  635.51  679.47  715.75  742.85  759.59  765.26  759.59  742.85  715.75  679.47  635.51  585.62  531.69  475.61  419.16  363.96  311.37  262.45  217.95  178.33  143.75  114.17   89.34   68.88   52.32    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   56.78   74.75   96.95  123.90  156.00  193.52  236.52  284.81  337.90  394.97  454.87  516.12  576.98  635.51  689.64  737.35  776.72  806.12  824.30  830.45  824.30  806.12  776.72  737.35  689.64  635.51  576.98  516.12  454.87  394.97  337.90  284.81  236.52  193.52  156.00  123.90   96.95   74.75   56.78    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   60.71   79.92  103.66  132.47  166.79  206.90  252.88  304.51  361.27  422.29  486.33  551.82  616.90  679.47  737.35  788.35  830.45  861.89  881.32  887.89  881.32  861.89  830.45  788.35  737.35  679.47  616.90  551.82  486.33  422.29  361.27  304.51  252.88  206.90  166.79  132.47  103.66   79.92   60.71    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   63.95   84.19  109.19  139.54  175.70  217.95  266.38  320.77  380.56  444.84  512.30  581.29  649.84  715.75  776.72  830.45  874.79  907.91  928.38  935.30  928.38  907.91  874.79  830.45  776.72  715.75  649.84  581.29  512.30  444.84  380.56  320.77  266.38  217.95  175.70  139.54  109.19   84.19   63.95    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   66.37   87.37  113.33  144.83  182.35  226.20  276.46  332.91  394.97  461.68  531.69  603.29  674.44  742.85  806.12  861.89  907.91  942.28  963.52  970.71  963.52  942.28  907.91  861.89  806.12  742.85  674.44  603.29  531.69  461.68  394.97  332.91  276.46  226.20  182.35  144.83  113.33   87.37   66.37    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   50.79   67.86   89.34  115.88  148.09  186.46  231.30  282.70  340.42  403.87  472.09  543.68  616.90  689.64  759.59  824.30  881.32  928.38  963.52  985.25  992.60  985.25  963.52  928.38  881.32  824.30  759.59  689.64  616.90  543.68  472.09  403.87  340.42  282.70  231.30  186.46  148.09  115.88   89.34   67.86   50.79    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   51.17   68.37   90.01  116.75  149.20  187.85  233.03  284.81  342.96  406.88  475.61  547.74  621.50  694.79  765.26  830.45  887.89  935.30  970.71  992.60 1000.00  992.60  970.71  935.30  887.89  830.45  765.26  694.79  621.50  547.74  475.61  406.88  342.96  284.81  233.03  187.85  149.20  116.75   90.01   68.37   51.17    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   50.79   67.86   89.34  115.88  148.09  186.46  231.30  282.70  340.42  403.87  472.09  543.68  616.90  689.64  759.59  824.30  881.32  928.38  963.52  985.25  992.60  985.25  963.52  928.38  881.32  824.30  759.59  689.64  616.90  543.68  472.09  403.87  340.42  282.70  231.30  186.46  148.09  115.88   89.34   67.86   50.79    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   66.37   87.37  113.33  144.83  182.35  226.20  276.46  332.91  394.97  461.68  531.69  603.29  674.44  742.85  806.12  861.89  907.91  942.28  963.52  970.71  963.52  942.28  907.91  861.89  806.12  742.85  674.44  603.29  531.69  461.68  394.97  332.91  276.46  226.20  182.35  144.83  113.33   87.37   66.37    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   63.95   84.19  109.19  139.54  175.70  217.95  266.38  320.77  380.56  444.84  512.30  581.29  649.84  715.75  776.72  830.45  874.79  907.91  928.38  935.30  928.38  907.91  874.79  830.45  776.72  715.75  649.84  581.29  512.30  444.84  380.56  320.77  266.38  217.95  175.70  139.54  109.19   84.19   63.95    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   60.71   79.92  103.66  132.47  166.79  206.90  252.88  304.51  361.27  422.29  486.33  551.82  616.90  679.47  737.35  788.35  830.45  861.89  881.32  887.89  881.32  861.89  830.45  788.35  737.35  679.47  616.90  551.82  486.33  422.29  361.27  304.51  252.88  206.90  166.79  132.47  103.66   79.92   60.71    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   56.78   74.75   96.95  123.90  156.00  193.52  236.52  284.81  337.90  394.97  454.87  516.12  576.98  635.51  689.64  737.35  776.72  806.12  824.30  830.45  824.30  806.12  776.72  737.35  689.64  635.51  576.98  516.12  454.87  394.97  337.90  284.81  236.52  193.52  156.00  123.90   96.95   74.75   56.78    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   52.32   68.88   89.34  114.17  143.75  178.33  217.95  262.45  311.37  363.96  419.16  475.61  531.69  585.62  635.51  679.47  715.75  742.85  759.59  765.26  759.59  742.85  715.75  679.47  635.51  585.62  531.69  475.61  419.16  363.96  311.37  262.45  217.95  178.33  143.75  114.17   89.34   68.88   52.32    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   62.54   81.11  103.66  130.52  161.90  197.88  238.28  282.70  330.45  380.56  431.81  482.73  531.69  576.98  616.90  649.84  674.44  689.64  694.79  689.64  674.44  649.84  616.90  576.98  531.69  482.73  431.81  380.56  330.45  282.70  238.28  197.88  161.90  130.52  103.66   81.11   62.54    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.94   72.56   92.72  116.75  144.83  177.01  213.15  252.88  295.59  340.42  386.26  431.81  475.61  516.12  551.82  581.29  603.29  616.90  621.50  616.90  603.29  581.29  551.82  516.12  475.61  431.81  386.26  340.42  295.59  252.88  213.15  177.01  144.83  116.75   92.72   72.56   55.94    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   63.95   81.72  102.89  127.64  156.00  187.85  222.87  260.51  300.01  340.42  380.56  419.16  454.87  486.33  512.30  531.69  543.68  547.74  543.68  531.69  512.30  486.33  454.87  419.16  380.56  340.42  300.01  260.51  222.87  187.85  156.00  127.64  102.89   81.72   63.95    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.53   70.96   89.34  110.83  135.46  163.11  193.52  226.20  260.51  295.59  330.45  363.96  394.97  422.29  444.84  461.68  472.09  475.61  472.09  461.68  444.84  422.29  394.97  363.96  330.45  295.59  260.51  226.20  193.52  163.11  135.46  110.83   89.34   70.96   55.53    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   60.71   76.43   94.82  115.88  139.54  165.55  193.52  222.87  252.88  282.70  311.37  337.90  361.27  380.56  394.97  403.87  406.88  403.87  394.97  380.56  361.27  337.90  311.37  282.70  252.88  222.87  193.52  165.55  139.54  115.88   94.82   76.43   60.71    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   51.17   64.42   79.92   97.68  117.62  139.54  163.11  187.85  213.15  238.28  262.45  284.81  304.51  320.77  332.91  340.42  342.96  340.42  332.91  320.77  304.51  284.81  262.45  238.28  213.15  187.85  163.11  139.54  117.62   97.68   79.92   64.42   51.17    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   53.50   66.37   81.11   97.68  115.88  135.46  156.00  177.01  197.88  217.95  236.52  252.88  266.38  276.46  282.70  284.81  282.70  276.46  266.38  252.88  236.52  217.95  197.88  177.01  156.00  135.46  115.88   97.68   81.11   66.37   53.50    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   54.30   66.37   79.92   94.82  110.83  127.64  144.83  161.90  178.33  193.52  206.90  217.95  226.20  231.30  233.03  231.30  226.20  217.95  206.90  193.52  178.33  161.90  144.83  127.64  110.83   94.82   79.92   66.37   54.30    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   53.50   64.42   76.43   89.34  102.89  116.75  130.52  143.75  156.00  166.79  175.70  182.35  186.46  187.85  186.46  182.35  175.70  166.79  156.00  143.75  130.52  116.75  102.89   89.34   76.43   64.42   53.50    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   51.17   60.71   70.96   81.72   92.72  103.66  114.17  123.90  132.47  139.54  144.83  148.09  149.20  148.09  144.83  139.54  132.47  123.90  114.17  103.66   92.72   81.72   70.96   60.71   51.17    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.53   63.95   72.56   81.11   89.34   96.95  103.66  109.19  113.33  115.88  116.75  115.88  113.33  109.19  103.66   96.95   89.34   81.11   72.56   63.95   55.53    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   55.94   62.54   68.88   74.75   79.92   84.19   87.37   89.34   90.01   89.34   87.37   84.19   79.92   74.75   68.88   62.54   55.94    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   52.32   56.78   60.71   63.95   66.37   67.86   68.37   67.86   66.37   63.95   60.71   56.78   52.32    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00   50.79   51.17   50.79    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
+    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
Index: /palm/tags/release-6.0/EXAMPLES/test_salsa/test_salsa.txt
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/test_salsa/test_salsa.txt	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/test_salsa/test_salsa.txt	(revision 3477)
@@ -0,0 +1,30 @@
+salsa_test_urban
+
+1. Purpose
+Simple urban test set-up applying a sectional aerosol module SALSA. 
+
+2. PALM-Version / SVN Revision
+Version 5.0, revision 3096
+
+3. Required user code
+none
+
+4. Input
+salsa_test_urban p3d, salsa_test_urban_static (PIDS_STATIC) & salsa_test_urban_aero (PIDS_AERO)
+
+
+5. Preprocessing
+salsa_test_urban_static and salsa_test_urban_aero have to be prepared. 
+
+
+6. Program start - mrun call
+
+        
+7. Monitoring: 
+
+
+8. Postprocessing
+none
+
+9. Miscellaneous
+
Index: /palm/tags/release-6.0/EXAMPLES/test_salsa/test_salsa_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/test_salsa/test_salsa_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/test_salsa/test_salsa_p3d	(revision 3477)
@@ -0,0 +1,226 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+ &initialization_parameters
+
+!
+!-- Grid
+!------------------------------------------------------------------------------
+    nx                   = 19,
+    ny                   = 19,
+    nz                   = 22,
+
+    dx                   = 2.0,
+    dy                   = 2.0,
+    dz                   = 2.0,
+
+!
+!-- Numerics
+!------------------------------------------------------------------------------
+    psolver              = 'multigrid',
+    momentum_advec       = 'ws-scheme',  ! default advection scheme
+    scalar_advec         = 'ws-scheme', 
+    conserve_volume_flow = .T.,
+
+!
+!-- Mode
+!------------------------------------------------------------------------------     
+    humidity             = .T.,
+    q_surface            = 0.008,
+
+!
+!-- Initialization
+!------------------------------------------------------------------------------
+    initializing_actions = 'set_constant_profiles',
+
+    pt_surface           = 293.15,
+    ug_surface           = 1.0,
+    vg_surface           = 0.0,
+
+    roughness_length     = 0.05,
+    neutral              = .T.,
+    
+    day_of_year_init     =  65,          ! March 06, to avoid extreme temperatures
+    time_utc_init        = 0.0,
+
+!
+!-- Boundary conditions
+!------------------------------------------------------------------------------ 
+    bc_lr                = 'cyclic', 
+    bc_ns                = 'cyclic',
+    bc_uv_t              = 'dirichlet',  ! channel flow boundary condition
+
+!
+!-- Topography
+!------------------------------------------------------------------------------    
+    topography           = 'read_from_file',
+
+!
+!-- Physics
+!------------------------------------------------------------------------------
+    longitude            = 13.4,         ! Berlin longitude
+    latitude             = 52.5,         ! Berlin latitude
+      
+ / ! end of inipar namelist
+
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+ &runtime_parameters
+
+!
+!-- Run steering
+!------------------------------------------------------------------------------
+    end_time              = 1000.0,
+    create_disturbances   = .T.,
+
+!
+!-- General output settings
+!------------------------------------------------------------------------------
+    netcdf_data_format    = 4,           ! use NetCDF4
+
+!
+!-- Run-control/timeseries output settings
+!------------------------------------------------------------------------------
+    dt_run_control        =  0.0,
+    dt_dots               =  0.0,
+
+!
+!-- Profile output settings
+!------------------------------------------------------------------------------
+    skip_time_dopr        =   0.0,
+    dt_dopr               = 500.0,
+    averaging_interval_pr = 500.0,
+    dt_averaging_input_pr =   0.0,
+
+    data_output_pr        = '#u',  'u*2',  'wu',  'w*u*',  'w"u"',
+                            '#v',  'v*2',  'wv',  'w*v*',  'w"v"',
+                            'w',   'w*2',
+                            '#pt', 'pt*2', 'wpt', 'w*pt*', 'w"pt"',
+                            'e', 'e*', '#km', '#l',
+!
+!-- 2D/3D output settings
+!------------------------------------------------------------------------------
+    do3d_at_begin      = .T., 
+    do2d_at_begin      = .T.,
+
+    dt_data_output     = 50.0,
+
+
+    data_output = 'u', 'v', 'w',
+                  'Ntot', 'LDSA', 'PM2.5', 
+                  's_SO4', 's_OC', 's_BC', 's_NH', 's_NO',
+                  'g_H2SO4','g_HNO3','g_NH3','g_OCNV','g_OCSV',
+                  'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 
+                  'N_bin6', 'N_bin7', 'N_bin8', 'N_bin9', 'N_bin10',
+
+ / ! end of d3par namelist
+
+
+!-------------------------------------------------------------------------------
+!-- PLANT CANOPY MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/canpar
+!-------------------------------------------------------------------------------
+ &plant_canopy_parameters
+ 
+    canopy_mode       = 'read_from_file_3d',
+    canopy_drag_coeff = 0.5,
+      
+ / ! end of canopy_par namelist
+
+
+!-------------------------------------------------------------------------------
+!-- SALSA PARAMETER NAMELIST
+!-------------------------------------------------------------------------------
+ &salsa_parameters  
+
+!
+!-- Time stepping
+    dt_salsa           =   4.0, ! time step for calculating aerosol processes (s)
+    skip_time_do_salsa = 100.0, ! starting time of SALSA (s)
+
+!
+!-- Concentration initial types: 0 = based on the parameter file, 1 = read from a NetCDF file
+    isdtyp    = 1, ! size distribution
+    igctyp    = 1, ! gases
+
+!
+!-- If isdtyp = 0, define the initial aerosol size distribution by dpg, sigmag and n_lognorm
+ !   dpg       = 0.01347865, 0.05400739, 0.86411863, ! mean diameter per mode (micrometres)
+ !   sigmag    =        1.8,       2.16,       2.21, ! standard deviation per mode 
+ !   n_lognorm =     1434.0,      445.9,      0.07,  ! number concentration per mode (#/cm3)
+
+!
+!-- If igctyp = 0, apply these initial gas concentrations			
+ !   H2SO4_init = 5.0E12, ! sulphuric acid (#/m3)
+ !   HNO3_init  = 3.0E15, ! nitric acid (#/m3)
+ !   NH3_init   = 6.0E15, ! ammonia (#/m3)        
+ !   OCNV_init  = 1.0E14, ! non-volatile organic gases (#/m3)
+ !   OCSV_init  = 1.0E14, ! non-volatile organic gases (#/m3)
+
+!
+!-- List of activated chemical components: 
+!-- NOTE! Chemical species have to be activated here even if they are not initially present!
+    listspec = 'SO4','OC','BC','NH','NO','','',  ! List of actived aerosols        
+    ! listspec = 'SO4','OC','BC','DU','SS','NO','NH', 
+
+!
+!-- If isdtyp = 0, set the chemical composition of the initial particle size distribution
+ !   mass_fracs_a = 0.1, 0.4, 0.3, 0.1, 0.1, 0.0, 0.0, ! mass fractions of chemical components: soluble 
+ !   mass_fracs_b = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ! mass fractions of chemical components: insoluble
+!-- NOTE! Set everyhing to zero in mass_fracs_b if you do not want include insoluble species (default)
+
+!
+!-- Sectional presentation of the particle size distribution
+    reglim = 3.0E-9, 5.0E-8, 2.5E-6, ! limits of the subranges (m)
+    nbin   = 3, 7,                   ! number of bins per subrange 
+!-- NOTE! Subrange 1 consists only of H2SO4 and/or OC
+    nf2a   = 1.0,	             ! Number fraction allocated to subrange 2a (b-bins will get 1-nf2a) 
+
+!
+!-- Aerosol emissions:
+    salsa_source_mode = 'read_from_file', 
+!-- NOTE! chemical components of the source have to be activated in 'listspec'
+
+!
+!-- Boundary conditions
+!-- Decycle at the left & right boundaries: initial concentration  
+!--   is copied to ghost and first three layers at both boundaries at the left boundary
+!--   and a zero gradient is set at the right boundary
+!-- Decycle at the north & south boundaries: initial concentration  
+!--   is copied to ghost and first three layers at both boundaries
+    decycle_lr     = .T.,         
+    decycle_ns     = .F.,
+    decycle_method = 'dirichlet','dirichlet','dirichlet','dirichlet',  
+    bc_salsa_b     = 'neumann', !'dirichlet',  ! surface flux requires 'neumann'
+    bc_salsa_t     = 'dirichlet',  ! top
+											   
+!
+!-- Switches for aerosol processes:
+    nldistupdate = .T.,
+    nldepo       = .T., ! Deposition master switch
+    nldepo_vege  = .T., ! Deposition on vegetation
+    nldepo_topo  = .T., ! Deposition on walls
+    nlcnd        = .T., ! Condensation master switch
+    nlcndgas     = .T., ! Condensation of precursor gases
+    nlcndh2oae   = .F., ! Condensation of H2O on aerosols                          
+    nlcoag       = .T., ! Coagulation master switch
+    nsnucl       =  1,  ! Nucleation scheme (0 = off)
+    nj3          =  1,  ! J3 parametrization for nucleation 
+
+    depo_vege_type = 'zhang2001',
+    depo_topo_type = 'zhang2001',
+
+!
+!-- Other switches:
+    advect_particle_water   = .T.,   ! particle water: advect or calculate at each dt_salsa 
+    feedback_to_palm        = .F.,   ! feedback to flow due to condensation of water
+    read_restart_data_salsa = .F.,   ! skip reading restart data even if it's done for the flow
+    write_binary_salsa      = .F.,   ! skip writing restart data even if it's done for the flow
+         
+ / ! end of salsa_par namelist
+
+ 
Index: /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_p3d	(revision 3477)
@@ -0,0 +1,46 @@
+ &inipar nx = 39, ny = 39, nz = 40,
+         dx = 2.0, dy = 2.0, dz = 2.0,
+
+         fft_method = 'temperton-algorithm',   ! fast, but restrictions apply
+
+         momentum_advec = 'ws-scheme',         ! default advection scheme
+         scalar_advec   = 'ws-scheme',
+
+         omega = 0.0,                          ! no Coriolis force
+         conserve_volume_flow = .T.,           ! maintain constant bulk velocity
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 1.0, vg_surface = 0.0,   ! implies bulk velocity 1 m/s
+         roughness_length = 0.1,               ! applies to all surfaces locally
+         neutral = .T.,                        ! strictly neutral flow
+
+         bc_uv_t = 'dirichlet_0',              ! channel flow boundary condition
+
+         topography = 'read_from_file',
+         topography_grid_convention = 'cell_center',  / ! default
+
+ &d3par  end_time                  =   7200.0,
+         termination_time_needed   =    900.0,
+
+         create_disturbances = .T.,
+
+         dt_run_control            =      6.0,
+         dt_dots                   =      6.0,
+
+         skip_time_dopr            =      0.0,
+         dt_dopr                   =   3600.0,
+         averaging_interval_pr     =   3600.0,
+         dt_averaging_input_pr     =      6.0,
+
+         skip_time_data_output     =      0.0,
+         dt_data_output            =   3600.0,
+
+         averaging_interval        =   3600.0,
+         dt_averaging_input        =      6.0,
+
+         data_output_pr = '#u', 'w"u"', 'w*u*', 'wu', 'u*2', 
+                          '#v', 'w"v"', 'w*v*', 'wv', 'v*2',
+                          'w', 'w*2', 'e', 'e*', '#km', '#l',
+
+         data_output = 'u',       'v',       'w',
+                       'u_av',    'v_av',    'w_av',  /
Index: /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_rc	(revision 3477)
@@ -0,0 +1,1422 @@
+
+ ******************************    --------------------------------------------
+ * PALM 4.0  Rev: 1541        *    atmosphere - 3D - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 28-01-15    Run:       example_topo_file   
+ Time:                 13:34:51    Run-No.:   00
+ Run on host:             lcmuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> No pt-equation solved. Neutral stratification with pt = 300.00 K assumed
+ --> Volume flow at the right and north boundary will be conserved
+     using the initial_profiles mode
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             7200.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      2.000 m    dy =      2.000 m    dz =      2.000 m
+ Domain size:       x =     80.000 m     y =     80.000 m  z(u) =     81.000 m
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     20,     42)
+
+
+
+ Large scale forcing and nudging:
+ -------------------------------
+
+ --> No large scale forcing from external is used (default) 
+ --> No nudging is used (default) 
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            1.00    1.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography informations:
+ -----------------------
+
+ Topography: read_from_file                          
+ Topography grid definition convention:
+ cell center (scalar grid points)
+
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)   = pt_surface         
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = 0                     | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+
+
+    Prandtl-Layer between bottom surface and first computational u,v-level:
+
+       zp =   1.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:    -5.00 <= rif <=  1.00
+       Predefined surface temperature
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0  m
+       Temperature:   300.00  K
+       Gradient:      ------  K/100m
+       Gridpoint:          0
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: u, w"u", w*u*, wu, u*2, v, w"v", w*v*, wv, v*2, w, w*2,      
+
+              : e, e*, km, l,                                                
+       Output every              3600.00 s
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+
+    3D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Upper output limit at       81.00 m  (GP   41)
+
+
+       Number of output time levels allowed: unlimited
+
+
+    3D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset                     
+
+
+       Arrays:  u, v, w,                                                             
+       Output every              3600.00 s  
+       Time averaged over        3600.00 s
+       Averaging input every        6.00 s
+       Upper output limit at       81.00 m  (GP   41)
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 6.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Angular velocity    :   omega = 0.000E+00 rad/s
+    Geograph. latitude  :   phi   = 55.0 degr
+    Coriolis parameter  :   f     =  0.000000 1/s
+                            f*    =  0.000000 1/s
+
+    Gravity             :   g     =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :     5.00 m (GP    3)
+    Upper disturbance level         :    25.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : numerical-recipes
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   1.2000A   1.4959D -0.8116D -0.6272  0.000  0.00   0.000E+00      0.  0.482E+00  0.000E+00  0.000E+00  0.000E+00    6  30  16    6  30  30   21  19  30    0.000    0.000       0
+  0      7 00:00:06.50   0.9200A   1.9574   1.3904   1.3121  0.074  0.00   0.000E+00      0.  0.581E+00  0.125E+00  0.111E-02  0.336E-03    9  30  31   11  30   9   20  19   9    0.000    0.000       0
+  0     13 00:00:12.37   0.9920A   1.8137  -1.2563   1.2678  0.076  0.00   0.000E+00      0.  0.589E+00  0.949E-01  0.121E-02  0.335E-03   12  32  13    8  10   9   20  19   9    0.000    0.000       0
+  0     19 00:00:18.41   1.0200A   1.7633   1.1867   1.2350  0.078  0.00   0.000E+00      0.  0.598E+00  0.100E+00  0.127E-02  0.328E-03   13  32  15    7  30   9   20  19   9    0.000    0.000       0
+  0     25 00:00:24.62   1.0300A   1.7512   1.1285   1.2029  0.080  0.00   0.000E+00      0.  0.606E+00  0.106E+00  0.128E-02  0.323E-03   10   6  15    1  31   9   20  19   9    0.000    0.000       0
+  0     31 00:00:30.82   1.0400A   1.7356   1.0673   1.1695  0.081  0.00   0.000E+00      0.  0.614E+00  0.110E+00  0.125E-02  0.313E-03    9  33  17    1  31   9   20  18   9    0.000    0.000       0
+  0     36 00:00:36.04   1.0500A   1.7095   1.0049   1.1388  0.081  0.00   0.000E+00      0.  0.621E+00  0.113E+00  0.121E-02  0.297E-03    9  33  18   17  30   9   20  17   9    0.000    0.000       0
+  0     42 00:00:42.38   1.0600A   1.6987   1.0021   1.1122  0.082  0.00   0.000E+00      0.  0.628E+00  0.117E+00  0.115E-02  0.277E-03   13  33  18   17  30   9   20  24   9    0.000    0.000       0
+  0     48 00:00:48.74   1.0600A   1.7007   0.9672   1.0893  0.084  0.00   0.000E+00      0.  0.636E+00  0.121E+00  0.108E-02  0.258E-03    9  34  22   16  30   9   20  25   9    0.000    0.000       0
+  0     53 00:00:54.08   1.0800A   1.6702   0.9113   1.0411  0.085  0.00   0.000E+00      0.  0.641E+00  0.123E+00  0.103E-02  0.239E-03   12  34  24   14  30   9   20  25   9    0.000    0.000       0
+  0     59 00:01:00.61   1.0900A   1.6529   0.8094   0.9442  0.087  0.00   0.000E+00      0.  0.648E+00  0.126E+00  0.945E-03  0.199E-03    8   5  25   17  30   9   20  24   9    0.000    0.000       0
+  0     64 00:01:06.05   1.0900A   1.6574  -0.7448   0.8335  0.088  0.00   0.000E+00      0.  0.653E+00  0.127E+00  0.885E-03  0.166E-03    8   5  27   15  23  34   20  24   9    0.000    0.000       0
+  0     70 00:01:12.59   1.0900A   1.6476   0.8132  -0.9846  0.090  0.00   0.000E+00      0.  0.658E+00  0.129E+00  0.859E-03  0.135E-03   10   4  31   15  13   1   10  11   9    0.000    0.000       0
+  0     75 00:01:18.04   1.0900A   1.6559   0.8438  -1.1258  0.091  0.00   0.000E+00      0.  0.662E+00  0.131E+00  0.864E-03  0.117E-03   14  35  32   15  13   1    9  11   9    0.000    0.000       0
+  0     81 00:01:24.48   1.0600A   1.6916  -0.9299  -1.2168  0.093  0.00   0.000E+00      0.  0.667E+00  0.132E+00  0.850E-03  0.994E-04   14  36  35   13  26   3    9  11   9    0.000    0.000       0
+  0     87 00:01:30.81   1.0500A   1.7163  -0.9757  -1.3046  0.095  0.00   0.000E+00      0.  0.670E+00  0.132E+00  0.868E-03  0.922E-04   10  36  38   12  26   5    8  27   9    0.000    0.000       0
+  0     92 00:01:36.02   1.0400A   1.7318   1.0926  -1.2880  0.096  0.00   0.000E+00      0.  0.671E+00  0.131E+00  0.897E-03  0.891E-04   10  36   0   10  13   8    7  14   8    0.000    0.000       0
+  0     98 00:01:42.07   0.9930A   1.8124   1.1173  -1.1674  0.097  0.00   0.000E+00      0.  0.672E+00  0.130E+00  0.891E-03  0.808E-04    7   4   7   10  13   8    6  23   8    0.000    0.000       0
+  0    105 00:01:48.91   0.9680A   1.8600   1.0365  -1.1345  0.098  0.00   0.000E+00      0.  0.670E+00  0.127E+00  0.861E-03  0.682E-04    8   4  10   10  13   9    7  12   9    0.000    0.000       0
+  0    111 00:01:54.73   0.9830A   1.8316  -1.0009  -1.0982  0.098  0.00   0.000E+00      0.  0.667E+00  0.124E+00  0.857E-03  0.688E-04   10   6  12    2  12   8    6  24   8    0.000    0.000       0
+  0    117 00:02:00.59   0.9750A   1.8471   1.0558  -1.0180  0.097  0.00   0.000E+00      0.  0.665E+00  0.122E+00  0.854E-03  0.769E-04    9   4  15    1  28   8    5  23   8    0.000    0.000       0
+  0    123 00:02:06.44   0.9750A   1.8462   1.0199   0.9647  0.095  0.00   0.000E+00      0.  0.664E+00  0.121E+00  0.850E-03  0.792E-04    9   4  17    1  28   9    9  10  39    0.000    0.000       0
+  0    129 00:02:12.33   0.9870A   1.8235   1.0164  -0.9654  0.093  0.00   0.000E+00      0.  0.664E+00  0.120E+00  0.882E-03  0.816E-04    9   4  20   12  14   9   12  17  38    0.000    0.000       0
+  0    135 00:02:18.31   1.0000A   1.7954   1.1667  -1.0394  0.089  0.00   0.000E+00      0.  0.664E+00  0.120E+00  0.972E-03  0.932E-04   10   5  22   11  15   9   10  16  38    0.000    0.000       0
+  0    141 00:02:24.42   1.0300A   1.7551   1.2493  -1.0830  0.086  0.00   0.000E+00      0.  0.664E+00  0.120E+00  0.107E-02  0.106E-03   11   7  25   10  15   9   10  19  35    0.000    0.000       0
+  0    147 00:02:30.58   1.0300A   1.7547   1.1845  -1.1499  0.083  0.00   0.000E+00      0.  0.665E+00  0.120E+00  0.113E-02  0.112E-03   28  24  19   10  16   9    9  19  35    0.000    0.000       0
+  0    153 00:02:36.71   1.0200A   1.7571  -1.0684  -1.0968  0.081  0.00   0.000E+00      0.  0.667E+00  0.121E+00  0.115E-02  0.106E-03   28  15  23    9  26   9    8  19  35    0.000    0.000       0
+  0    159 00:02:42.83   1.0200A   1.7660  -1.0303  -1.0310  0.080  0.00   0.000E+00      0.  0.669E+00  0.121E+00  0.115E-02  0.988E-04   29  23  26    8  25   9    8  19  35    0.000    0.000       0
+  0    165 00:02:48.95   1.0200A   1.7574  -0.9472  -0.9575  0.082  0.00   0.000E+00      0.  0.670E+00  0.121E+00  0.115E-02  0.929E-04   29  24  30    9  26   9    8  14   4    0.000    0.000       0
+  0    170 00:02:54.05   1.0200A   1.7612  -0.8931  -0.9550  0.084  0.00   0.000E+00      0.  0.672E+00  0.121E+00  0.116E-02  0.959E-04   29  24  33    6  12   0    7  16   6    0.000    0.000       0
+  0    176 00:03:00.17   1.0200A   1.7672  -0.9687  -0.9751  0.086  0.00   0.000E+00      0.  0.675E+00  0.121E+00  0.120E-02  0.111E-03   29  24  37    6  29   0    7  12   5    0.000    0.000       0
+  0    182 00:03:06.27   1.0100A   1.7756  -0.9757  -0.9386  0.088  0.00   0.000E+00      0.  0.678E+00  0.122E+00  0.121E-02  0.108E-03   29  24   1    6  28   1    5  14   5    0.000    0.000       0
+  0    188 00:03:12.33   1.0100A   1.7851  -0.8592  -1.0087  0.089  0.00   0.000E+00      0.  0.682E+00  0.123E+00  0.122E-02  0.873E-04   29  25   5    5  29   4    4  12   6    0.000    0.000       0
+  0    194 00:03:18.35   1.0000A   1.7945   0.8712  -1.0629  0.089  0.00   0.000E+00      0.  0.683E+00  0.123E+00  0.122E-02  0.753E-04   29  25   9   11  12  38    4  29   9    0.000    0.000       0
+  0    200 00:03:24.34   0.9970A   1.8046  -1.0293  -1.0665  0.089  0.00   0.000E+00      0.  0.684E+00  0.123E+00  0.124E-02  0.748E-04   27  10   8   14  27   9    3  29   9    0.000    0.000       0
+  0    206 00:03:30.31   0.9950A   1.8097  -1.1049  -0.9732  0.087  0.00   0.000E+00      0.  0.685E+00  0.123E+00  0.125E-02  0.794E-04   28  28  12   14  26   9    3  29   8    0.000    0.000       0
+  0    212 00:03:36.27   0.9900A   1.8182   1.0937  -1.0714  0.084  0.00   0.000E+00      0.  0.685E+00  0.123E+00  0.127E-02  0.890E-04   29  31  15   12  16   9    8  11   9    0.000    0.000       0
+  0    218 00:03:42.20   0.9880A   1.8226   1.1108  -1.0984  0.081  0.00   0.000E+00      0.  0.685E+00  0.123E+00  0.129E-02  0.968E-04   28  11  20   12  17   9    6  12   9    0.000    0.000       0
+  0    224 00:03:48.11   0.9830A   1.8317   1.0308  -0.9492  0.079  0.00   0.000E+00      0.  0.686E+00  0.123E+00  0.130E-02  0.104E-03   28  12  24   11  15   9    6  14   9    0.000    0.000       0
+  0    230 00:03:54.01   0.9820A   1.8322   1.0729  -1.0933  0.078  0.00   0.000E+00      0.  0.686E+00  0.124E+00  0.132E-02  0.106E-03   28  13  28    9  16   9    6  13   9    0.000    0.000       0
+  0    237 00:04:00.88   0.9780A   1.8400  -0.9894  -1.1038  0.078  0.00   0.000E+00      0.  0.687E+00  0.124E+00  0.133E-02  0.107E-03   23  37  25    8  24   9    5  13   9    0.000    0.000       0
+  0    243 00:04:06.73   0.9740A   1.8472   0.9581  -1.0706  0.079  0.00   0.000E+00      0.  0.688E+00  0.124E+00  0.134E-02  0.108E-03   29  26  31   11  16   9    3  28   9    0.000    0.000       0
+  0    249 00:04:12.56   0.9660A   1.8629  -0.9500  -1.1082  0.082  0.00   0.000E+00      0.  0.688E+00  0.124E+00  0.131E-02  0.990E-04   23  36  32    6  25   8    3  28   9    0.000    0.000       0
+  0    255 00:04:18.28   0.9450A   1.9050  -0.9042  -1.0363  0.084  0.00   0.000E+00      0.  0.688E+00  0.124E+00  0.127E-02  0.826E-04   23  36  36   17  10   8    3  27   9    0.000    0.000       0
+  0    262 00:04:24.85   0.9360A   1.9222   0.8361  -0.8601  0.087  0.00   0.000E+00      0.  0.688E+00  0.123E+00  0.125E-02  0.815E-04   22  36   0    3  39  18   14  25   7    0.000    0.000       0
+  0    268 00:04:30.49   0.9420A   1.9100   0.7881  -0.8589  0.089  0.00   0.000E+00      0.  0.688E+00  0.123E+00  0.128E-02  0.904E-04   22  36   4    1  39  19   12  26   7    0.000    0.000       0
+  0    274 00:04:36.18   0.9520A   1.8906  -0.7697   0.9956  0.091  0.00   0.000E+00      0.  0.687E+00  0.123E+00  0.130E-02  0.909E-04   17   5   2   20  22   9   20  11   9    0.000    0.000       0
+  0    281 00:04:42.84   0.9510A   1.8925  -0.8484   0.9669  0.093  0.00   0.000E+00      0.  0.687E+00  0.122E+00  0.129E-02  0.847E-04   23  37  13    6  38  20   20  29   9    0.000    0.000       0
+  0    287 00:04:48.57   0.9560A   1.8836  -0.8486   0.9318  0.094  0.00   0.000E+00      0.  0.686E+00  0.121E+00  0.128E-02  0.703E-04   20  36  15    6  37  22   20  28   9    0.000    0.000       0
+  0    293 00:04:54.31   0.9550A   1.8853  -0.8694   0.8337  0.095  0.00   0.000E+00      0.  0.684E+00  0.119E+00  0.124E-02  0.661E-04   26  38  21    8  26   8    8  39  30    0.000    0.000       0
+  0    299 00:05:00.02   0.9480A   1.8979  -0.8299  -0.8425  0.095  0.00   0.000E+00      0.  0.683E+00  0.117E+00  0.121E-02  0.746E-04   26  38  25    8  25   8   14  25   2    0.000    0.000       0
+  0    306 00:05:06.65   0.9470A   1.9011  -0.8129  -0.8421  0.095  0.00   0.000E+00      0.  0.683E+00  0.116E+00  0.120E-02  0.791E-04   19  34  34    9  27   9   14  25   3    0.000    0.000       0
+  0    312 00:05:12.28   0.9320A   1.9318  -0.8665  -0.8839  0.094  0.00   0.000E+00      0.  0.684E+00  0.115E+00  0.116E-02  0.734E-04   19  34  37    9  26   9   13  26   6    0.000    0.000       0
+  0    319 00:05:18.76   0.9210A   1.9548  -0.7898  -0.9839  0.093  0.00   0.000E+00      0.  0.683E+00  0.114E+00  0.112E-02  0.669E-04   20  34   1    8  25   9   12  26   6    0.000    0.000       0
+  0    325 00:05:24.33   0.9330A   1.9298  -0.7105  -0.9903  0.091  0.00   0.000E+00      0.  0.682E+00  0.112E+00  0.112E-02  0.626E-04   34  25   5    7  25   9   11  27   7    0.000    0.000       0
+  0    332 00:05:30.81   0.9250A   1.9465   0.6782  -0.9858  0.090  0.00   0.000E+00      0.  0.681E+00  0.110E+00  0.108E-02  0.581E-04   35  25   9   13  15   9   12  20   8    0.000    0.000       0
+  0    338 00:05:36.30   0.9100A   1.9789   0.6607  -0.9520  0.089  0.00   0.000E+00      0.  0.680E+00  0.110E+00  0.105E-02  0.591E-04   34  26  13    4  32   5   11  20   8    0.000    0.000       0
+  0    345 00:05:42.63   0.8990A   2.0017  -0.7228  -0.9031  0.088  0.00   0.000E+00      0.  0.680E+00  0.110E+00  0.107E-02  0.697E-04   35  26  18   19  17   9    9  20   7    0.000    0.000       0
+  0    351 00:05:48.05   0.9050A   1.9892   0.9444   0.9028  0.088  0.00   0.000E+00      0.  0.682E+00  0.110E+00  0.110E-02  0.859E-04   36  26  22   13  13   9   20  28   9    0.000    0.000       0
+  0    358 00:05:54.37   0.9030A   1.9931   1.0194   1.0179  0.088  0.00   0.000E+00      0.  0.683E+00  0.111E+00  0.109E-02  0.891E-04   36  26  28   13  14   9   20  29   9    0.000    0.000       0
+  0    365 00:06:00.74   0.9160A   1.9654   1.0291   1.0872  0.088  0.00   0.000E+00      0.  0.686E+00  0.112E+00  0.109E-02  0.926E-04   35  26  35   13  14   9   20  28   9    0.000    0.000       0
+  0    371 00:06:06.24   0.9160A   1.9658   0.9938   0.9959  0.087  0.00   0.000E+00      0.  0.687E+00  0.112E+00  0.105E-02  0.835E-04   35  27  38   12  14   9   20  26   9    0.000    0.000       0
+  0    378 00:06:12.64   0.9140A   1.9692   0.8791   0.9243  0.086  0.00   0.000E+00      0.  0.689E+00  0.112E+00  0.100E-02  0.679E-04   34  27   5   11  15   9   20  26   9    0.000    0.000       0
+  0    384 00:06:18.15   0.9240A   1.9472  -0.8590   0.8467  0.086  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.974E-03  0.635E-04   34  27  10   12  25   9   20  25   9    0.000    0.000       0
+  0    391 00:06:24.67   0.9350A   1.9247  -0.8322  -0.7706  0.084  0.00   0.000E+00      0.  0.688E+00  0.110E+00  0.972E-03  0.629E-04   22  38  10   11  24   9    8  20   8    0.000    0.000       0
+  0    397 00:06:30.28   0.9360A   1.9240  -0.8127  -0.7982  0.083  0.00   0.000E+00      0.  0.686E+00  0.109E+00  0.967E-03  0.599E-04   21  37  13    9  27   8    7  20   8    0.000    0.000       0
+  0    404 00:06:36.83   0.9360A   1.9236  -0.9197  -0.7732  0.082  0.00   0.000E+00      0.  0.685E+00  0.108E+00  0.969E-03  0.641E-04   21  37  18    8  26   8    6  20   8    0.000    0.000       0
+  0    410 00:06:42.45   0.9330A   1.9292  -0.9113  -0.7515  0.082  0.00   0.000E+00      0.  0.684E+00  0.108E+00  0.982E-03  0.750E-04   19  39  15    8  25   8    5  20   7    0.000    0.000       0
+  0    416 00:06:48.01   0.9250A   1.9459  -0.8154  -0.7200  0.083  0.00   0.000E+00      0.  0.685E+00  0.108E+00  0.981E-03  0.778E-04   19  39  20    8  25   8    5  20   8    0.000    0.000       0
+  0    423 00:06:54.49   0.9250A   1.9465  -0.7484  -0.7627  0.085  0.00   0.000E+00      0.  0.686E+00  0.108E+00  0.976E-03  0.748E-04   20  37  24    8  23   8   15  29   9    0.000    0.000       0
+  0    429 00:07:00.02   0.9180A   1.9605   0.6812  -0.7504  0.086  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.967E-03  0.716E-04   20  37  28   14  31   9   15  29   9    0.000    0.000       0
+  0    436 00:07:06.43   0.9140A   1.9698   0.7149  -0.6958  0.086  0.00   0.000E+00      0.  0.689E+00  0.109E+00  0.954E-03  0.663E-04   22  36  30   13  15   7   15  24   9    0.000    0.000       0
+  0    443 00:07:12.78   0.9020A   1.9957   0.8044   0.8483  0.086  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.933E-03  0.604E-04   22  36  36   14  14   9   18  10   9    0.000    0.000       0
+  0    449 00:07:18.16   0.8940A   2.0134   0.8382   0.8894  0.085  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.931E-03  0.565E-04   22  36   1   13  14   9   18  10   9    0.000    0.000       0
+  0    456 00:07:24.39   0.8890A   2.0246   0.8809   0.7878  0.084  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.917E-03  0.532E-04   22  36   6   13  15   9   18  10   9    0.000    0.000       0
+  0    463 00:07:30.59   0.8800A   2.0451   0.8620  -0.7637  0.083  0.00   0.000E+00      0.  0.690E+00  0.108E+00  0.905E-03  0.550E-04   23  36  10   12  16   9   16   9   7    0.000    0.000       0
+  0    470 00:07:36.74   0.8830A   2.0391  -0.8773  -0.7657  0.081  0.00   0.000E+00      0.  0.689E+00  0.108E+00  0.899E-03  0.576E-04   23  36  15   15  27   9    6  27   9    0.000    0.000       0
+  0    476 00:07:42.05   0.8900A   2.0222  -0.8674  -0.7540  0.079  0.00   0.000E+00      0.  0.689E+00  0.108E+00  0.912E-03  0.632E-04   23  36  20   15  26   9    6  21   4    0.000    0.000       0
+  0    483 00:07:48.37   0.9040A   1.9909   0.8184  -0.7094  0.078  0.00   0.000E+00      0.  0.690E+00  0.109E+00  0.935E-03  0.625E-04   24  36  24   11  16   8    5  21   3    0.000    0.000       0
+  0    490 00:07:54.72   0.9040A   1.9921   0.8587  -0.8149  0.077  0.00   0.000E+00      0.  0.691E+00  0.110E+00  0.951E-03  0.638E-04   21   5  25   10  14   9    5  28   9    0.000    0.000       0
+  0    496 00:08:00.11   0.8950A   2.0109   0.9184  -0.8670  0.076  0.00   0.000E+00      0.  0.691E+00  0.110E+00  0.947E-03  0.650E-04   21   5  29    9  14   9    4  28   9    0.000    0.000       0
+  0    503 00:08:06.29   0.8770A   2.0528   0.8870  -0.7592  0.077  0.00   0.000E+00      0.  0.692E+00  0.111E+00  0.929E-03  0.633E-04   22   6  33   10  15   9    3  27   9    0.000    0.000       0
+  0    510 00:08:12.40   0.8710A   2.0667   0.8084  -0.7334  0.077  0.00   0.000E+00      0.  0.692E+00  0.111E+00  0.933E-03  0.644E-04   22   6  37   10  17   9    9  19   2    0.000    0.000       0
+  0    517 00:08:18.53   0.8800A   2.0445  -0.7342  -0.7055  0.076  0.00   0.000E+00      0.  0.691E+00  0.110E+00  0.939E-03  0.615E-04   23   7   1    2  12   4    8  19   1    0.000    0.000       0
+  0    524 00:08:24.77   0.8930A   2.0167   0.7124  -0.6653  0.076  0.00   0.000E+00      0.  0.690E+00  0.110E+00  0.940E-03  0.556E-04   22   7   6   17  14   9    9  17   4    0.000    0.000       0
+  0    530 00:08:30.21   0.9120A   1.9746  -0.7243   0.6612  0.076  0.00   0.000E+00      0.  0.689E+00  0.109E+00  0.944E-03  0.506E-04   26   4  13    8  27   9    8   9  38    0.000    0.000       0
+  0    537 00:08:36.62   0.9180A   1.9618  -0.8144   0.6433  0.076  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.939E-03  0.502E-04   26   4  19    8  26   9    8   9   0    0.000    0.000       0
+  0    543 00:08:42.14   0.9210A   1.9553  -0.7899  -0.6276  0.075  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.935E-03  0.524E-04   24   0  26    8  25   9   11  17   4    0.000    0.000       0
+  0    550 00:08:48.57   0.9150A   1.9664  -0.7566  -0.6415  0.075  0.00   0.000E+00      0.  0.688E+00  0.109E+00  0.927E-03  0.576E-04   24   0  31    7  25   9   11  16   4    0.000    0.000       0
+  0    556 00:08:54.05   0.9140A   1.9687  -0.7705   0.7606  0.075  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.923E-03  0.576E-04   24   0  35    7  25   9   20  12   9    0.000    0.000       0
+  0    563 00:09:00.44   0.9120A   1.9729  -0.7795   0.6669  0.075  0.00   0.000E+00      0.  0.690E+00  0.111E+00  0.910E-03  0.520E-04   24   0   1    7  25   9   20  15   9    0.000    0.000       0
+  0    570 00:09:06.84   0.9140A   1.9684  -0.7515   0.7206  0.074  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.907E-03  0.524E-04   24   0   6    7  23   9   20   8  19    0.000    0.000       0
+  0    576 00:09:12.33   0.9170A   1.9637  -0.7024   0.7260  0.073  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.912E-03  0.571E-04   24   1  10    6  23   9   21   8  23    0.000    0.000       0
+  0    583 00:09:18.74   0.9150A   1.9680  -0.8751   0.6919  0.073  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.897E-03  0.569E-04   31   4   1   14  27   9   21  25   9    0.000    0.000       0
+  0    589 00:09:24.21   0.9090A   1.9809  -0.9059   0.6180  0.073  0.00   0.000E+00      0.  0.688E+00  0.110E+00  0.882E-03  0.516E-04   28   5   6   12  26   9   21   9  28    0.000    0.000       0
+  0    596 00:09:30.53   0.8980A   2.0050  -0.8632  -0.6155  0.073  0.00   0.000E+00      0.  0.687E+00  0.109E+00  0.879E-03  0.531E-04   28   5  12   12  25   9   13   6  10    0.000    0.000       0
+  0    603 00:09:36.79   0.8930A   2.0151  -0.7718  -0.7348  0.073  0.00   0.000E+00      0.  0.686E+00  0.109E+00  0.897E-03  0.559E-04   28   5  17   12  25   9   17  19   9    0.000    0.000       0
+  0    609 00:09:42.15   0.8900A   2.0217  -0.6830  -0.8213  0.074  0.00   0.000E+00      0.  0.686E+00  0.109E+00  0.907E-03  0.573E-04   28   4  22   11  24   9   16  19   9    0.000    0.000       0
+  0    616 00:09:48.36   0.8860A   2.0305  -0.6777  -0.8122  0.076  0.00   0.000E+00      0.  0.686E+00  0.110E+00  0.919E-03  0.616E-04   28   4  27    4   1   7   15  20   9    0.000    0.000       0
+  0    623 00:09:54.56   0.8870A   2.0288  -0.6943  -0.7909  0.077  0.00   0.000E+00      0.  0.687E+00  0.110E+00  0.952E-03  0.662E-04   28   4  33    5   0  11   15  21   9    0.000    0.000       0
+  0    630 00:10:00.73   0.8770A   2.0522  -0.6549  -0.8147  0.077  0.00   0.000E+00      0.  0.688E+00  0.111E+00  0.958E-03  0.644E-04   26   3   8    6  39  14   16  20   9    0.000    0.000       0
+  0    637 00:10:06.83   0.8700A   2.0683   0.7789   1.0020  0.077  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.960E-03  0.663E-04   26   3  14   18  12   9   20  11   9    0.000    0.000       0
+  0    643 00:10:12.07   0.8770A   2.0519   0.9635   0.9992  0.076  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.971E-03  0.662E-04   26   3  18   17  13   9   20  11   9    0.000    0.000       0
+  0    650 00:10:18.23   0.8790A   2.0468   0.9849   0.8424  0.076  0.00   0.000E+00      0.  0.689E+00  0.111E+00  0.984E-03  0.660E-04   26   2  23   17  14   9   20  12   9    0.000    0.000       0
+  0    657 00:10:24.38   0.8790A   2.0488   0.8932   0.6696  0.076  0.00   0.000E+00      0.  0.690E+00  0.110E+00  0.984E-03  0.637E-04   26   2  28   15  14   9   20  26   9    0.000    0.000       0
+  0    664 00:10:30.56   0.8870A   2.0303  -0.9107  -0.7561  0.077  0.00   0.000E+00      0.  0.689E+00  0.110E+00  0.979E-03  0.579E-04   24   2  34   15  26   9    2  10   9    0.000    0.000       0
+  0    671 00:10:36.76   0.8840A   2.0366  -0.8964  -0.7924  0.078  0.00   0.000E+00      0.  0.689E+00  0.109E+00  0.968E-03  0.488E-04   28   2  38   14  26   9    2  10   9    0.000    0.000       0
+  0    677 00:10:42.04   0.8780A   2.0499   0.9696  -0.7602  0.078  0.00   0.000E+00      0.  0.687E+00  0.108E+00  0.943E-03  0.427E-04   28   2   2    8  13   8    2  10   9    0.000    0.000       0
+  0    684 00:10:48.17   0.8730A   2.0613   0.9709   0.7462  0.079  0.00   0.000E+00      0.  0.686E+00  0.106E+00  0.912E-03  0.411E-04   28   2   7    8  14   9    8  11   7    0.000    0.000       0
+  0    691 00:10:54.27   0.8700A   2.0685   0.8792  -0.7376  0.080  0.00   0.000E+00      0.  0.684E+00  0.105E+00  0.909E-03  0.457E-04   28   2  12    7  15   9   17  22   9    0.000    0.000       0
+  0    698 00:11:00.34   0.8670A   2.0768   0.8001  -0.7988  0.082  0.00   0.000E+00      0.  0.683E+00  0.105E+00  0.902E-03  0.488E-04   29   2  17    7  15   9   16  22   9    0.000    0.000       0
+  0    705 00:11:06.40   0.8640A   2.0836   0.7630  -0.7686  0.084  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.891E-03  0.540E-04   29   1  23    6  16   9   15  22   9    0.000    0.000       0
+  0    712 00:11:12.44   0.8630A   2.0866   0.7316  -0.6815  0.085  0.00   0.000E+00      0.  0.683E+00  0.104E+00  0.869E-03  0.501E-04   28   1  28    6  16   9   14  22   9    0.000    0.000       0
+  0    719 00:11:18.49   0.8650A   2.0798   0.6356  -0.5912  0.087  0.00   0.000E+00      0.  0.683E+00  0.104E+00  0.850E-03  0.449E-04   28   1  34    5  16   9   10   8  25    0.000    0.000       0
+  0    726 00:11:24.56   0.8690A   2.0705   0.6316   0.6509  0.087  0.00   0.000E+00      0.  0.683E+00  0.104E+00  0.832E-03  0.405E-04   28   1  39   12  14   9   20  10   9    0.000    0.000       0
+  0    733 00:11:30.67   0.8750A   2.0572   0.6244   0.6541  0.086  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.810E-03  0.369E-04   28   1   5   12  15   9   20  11   9    0.000    0.000       0
+  0    740 00:11:36.81   0.8790A   2.0482   0.5537   0.6198  0.085  0.00   0.000E+00      0.  0.682E+00  0.102E+00  0.801E-03  0.374E-04   28   1  13   12  16   9   20  11   9    0.000    0.000       0
+  0    746 00:11:42.08   0.8770A   2.0521   0.5760  -0.5625  0.085  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.795E-03  0.378E-04   24   1  26    6  12   9   23  32   4    0.000    0.000       0
+  0    753 00:11:48.21   0.8760A   2.0546   0.6287  -0.6382  0.084  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.792E-03  0.389E-04   24   1  31   16  13   9   17  23   9    0.000    0.000       0
+  0    760 00:11:54.34   0.8750A   2.0576  -0.7328  -0.8090  0.085  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.792E-03  0.408E-04   24   1  37   20  10   9   17  24   9    0.000    0.000       0
+  0    767 00:12:00.47   0.8750A   2.0575   0.7551  -0.8727  0.085  0.00   0.000E+00      0.  0.679E+00  0.999E-01  0.790E-03  0.476E-04   24   2   1   15  14   9   16  24   9    0.000    0.000       0
+  0    774 00:12:06.58   0.8700A   2.0680   0.7995  -0.8206  0.085  0.00   0.000E+00      0.  0.679E+00  0.996E-01  0.785E-03  0.524E-04   24   2   6   16  14   9   15  24   9    0.000    0.000       0
+  0    781 00:12:12.64   0.8620A   2.0883   0.9058  -0.8668  0.085  0.00   0.000E+00      0.  0.679E+00  0.993E-01  0.770E-03  0.506E-04   24   3  10   15  14   9   17  21   9    0.000    0.000       0
+  0    788 00:12:18.63   0.8510A   2.1142   0.9246  -0.9935  0.085  0.00   0.000E+00      0.  0.679E+00  0.990E-01  0.750E-03  0.476E-04   24   3  16   15  15   9   16  20   9    0.000    0.000       0
+  0    795 00:12:24.56   0.8450A   2.1290   0.8718  -0.9537  0.085  0.00   0.000E+00      0.  0.679E+00  0.989E-01  0.743E-03  0.474E-04   24   3  21   15  16   9   15  20   9    0.000    0.000       0
+  0    802 00:12:30.48   0.8460A   2.1265   0.7780  -0.8279  0.085  0.00   0.000E+00      0.  0.679E+00  0.992E-01  0.732E-03  0.452E-04   24   3  27   15  16   9   14  20   9    0.000    0.000       0
+  0    809 00:12:36.44   0.8520A   2.1138   0.7134  -0.7216  0.085  0.00   0.000E+00      0.  0.680E+00  0.997E-01  0.734E-03  0.451E-04   24   4  32   14  17   9   13  21   9    0.000    0.000       0
+  0    816 00:12:42.38   0.8480A   2.1229  -0.6300   0.7032  0.084  0.00   0.000E+00      0.  0.681E+00  0.100E+00  0.731E-03  0.431E-04   24   4  37   17  27   9   20  27   9    0.000    0.000       0
+  0    823 00:12:48.33   0.8520A   2.1128  -0.7115  -0.6591  0.083  0.00   0.000E+00      0.  0.681E+00  0.100E+00  0.729E-03  0.400E-04   24   5   1   16  26   9   13  17   5    0.000    0.000       0
+  0    830 00:12:54.29   0.8530A   2.1092  -0.7819  -0.6745  0.081  0.00   0.000E+00      0.  0.681E+00  0.999E-01  0.722E-03  0.362E-04   24   5   6   15  27   9   12  17   4    0.000    0.000       0
+  0    837 00:13:00.27   0.8540A   2.1084  -0.7927  -0.6605  0.080  0.00   0.000E+00      0.  0.680E+00  0.995E-01  0.723E-03  0.365E-04   24   5  12   15  26   9   11  17   4    0.000    0.000       0
+  0    844 00:13:06.25   0.8550A   2.1060  -0.7793  -0.6381  0.079  0.00   0.000E+00      0.  0.679E+00  0.989E-01  0.723E-03  0.364E-04   25   4  17   14  26   9   10  17   3    0.000    0.000       0
+  0    851 00:13:12.24   0.8560A   2.1021  -0.8013  -0.6011  0.078  0.00   0.000E+00      0.  0.679E+00  0.983E-01  0.731E-03  0.398E-04   25   4  23   14  24   8   12  17   8    0.000    0.000       0
+  0    858 00:13:18.24   0.8590A   2.0953   0.8187  -0.6382  0.078  0.00   0.000E+00      0.  0.678E+00  0.977E-01  0.737E-03  0.420E-04   25   4  29    9  13   9   17  24   9    0.000    0.000       0
+  0    865 00:13:24.27   0.8640A   2.0835   0.7812  -0.6974  0.077  0.00   0.000E+00      0.  0.677E+00  0.973E-01  0.736E-03  0.410E-04   25   4  35    9  14   9   17  23   9    0.000    0.000       0
+  0    872 00:13:30.35   0.8720A   2.0632  -0.7532  -0.7468  0.078  0.00   0.000E+00      0.  0.677E+00  0.974E-01  0.745E-03  0.451E-04   25   4   1   13  22   8   16  23   9    0.000    0.000       0
+  0    879 00:13:36.49   0.8770A   2.0518   0.6606  -0.7126  0.078  0.00   0.000E+00      0.  0.677E+00  0.979E-01  0.763E-03  0.533E-04   30   2   2    9  16   9   15  23   9    0.000    0.000       0
+  0    886 00:13:42.64   0.8780A   2.0496   0.7020  -0.7137  0.078  0.00   0.000E+00      0.  0.678E+00  0.984E-01  0.774E-03  0.556E-04   24   4  14   14  14   9   15  29   9    0.000    0.000       0
+  0    893 00:13:48.79   0.8800A   2.0457   0.7761   0.8243  0.078  0.00   0.000E+00      0.  0.679E+00  0.987E-01  0.774E-03  0.520E-04   24   4  19   14  15   9   20  11   9    0.000    0.000       0
+  0    899 00:13:54.07   0.8800A   2.0449   0.7599  -0.8358  0.077  0.00   0.000E+00      0.  0.679E+00  0.988E-01  0.774E-03  0.492E-04   30   3  18   13  16   9   16  23   9    0.000    0.000       0
+  0    906 00:14:00.22   0.8780A   2.0502   0.7092  -0.8201  0.077  0.00   0.000E+00      0.  0.679E+00  0.986E-01  0.766E-03  0.443E-04   34   4  24   12  17   9   15  23   9    0.000    0.000       0
+  0    913 00:14:06.36   0.8770A   2.0523   0.6604  -0.7487  0.076  0.00   0.000E+00      0.  0.678E+00  0.982E-01  0.773E-03  0.446E-04   34   4  30   12  18   8   14  23   9    0.000    0.000       0
+  0    920 00:14:12.52   0.8800A   2.0444   0.6806  -0.6889  0.076  0.00   0.000E+00      0.  0.678E+00  0.982E-01  0.777E-03  0.453E-04   33   5  35   13  17   7   12  23   8    0.000    0.000       0
+  0    927 00:14:18.71   0.8890A   2.0236   0.7537  -0.6498  0.076  0.00   0.000E+00      0.  0.678E+00  0.985E-01  0.782E-03  0.419E-04   33   5   1   12  15   9    6  21   7    0.000    0.000       0
+  0    933 00:14:24.08   0.8990A   2.0021   0.7866   0.6466  0.076  0.00   0.000E+00      0.  0.678E+00  0.987E-01  0.786E-03  0.419E-04   35   4   5   11  15   9   17  29   9    0.000    0.000       0
+  0    940 00:14:30.38   0.8970A   2.0069  -0.8086   0.6530  0.075  0.00   0.000E+00      0.  0.678E+00  0.991E-01  0.786E-03  0.473E-04   24   6  28   12  27   9   18  29   9    0.000    0.000       0
+  0    947 00:14:36.63   0.8920A   2.0176  -0.9192  -0.6890  0.074  0.00   0.000E+00      0.  0.679E+00  0.996E-01  0.790E-03  0.489E-04   24   6  34   10  26   9    6  28   9    0.000    0.000       0
+  0    954 00:14:42.87   0.8900A   2.0214  -0.9258  -0.6816  0.074  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.798E-03  0.492E-04   25   6  38    9  25   9    6  22   7    0.000    0.000       0
+  0    960 00:14:48.24   0.9020A   1.9957  -0.9008  -0.7276  0.074  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.822E-03  0.522E-04   25   6   3    9  25   9    5  21   8    0.000    0.000       0
+  0    967 00:14:54.58   0.9080A   1.9831  -0.8955  -0.7248  0.074  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.830E-03  0.525E-04   27   0  25    8  25   9    3  21   8    0.000    0.000       0
+  0    973 00:15:00.02   0.9060A   1.9874  -0.8829  -0.6492  0.074  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.823E-03  0.514E-04   26   0  29    8  24   9    3  28   9    0.000    0.000       0
+  0    980 00:15:06.33   0.8990A   2.0015  -0.8107  -0.6410  0.076  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.799E-03  0.481E-04   28   6  16    7  24   9    3  28   9    0.000    0.000       0
+  0    987 00:15:12.61   0.8940A   2.0125  -0.7502  -0.6452  0.078  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.783E-03  0.457E-04   28   6  21    7  24   9   17  20   9    0.000    0.000       0
+  0    994 00:15:18.87   0.8960A   2.0087  -0.7506  -0.7639  0.080  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.792E-03  0.483E-04   28   6  27    8  25   9   17  29   9    0.000    0.000       0
+  0   1000 00:15:24.26   0.9020A   1.9963  -0.7534  -0.9259  0.082  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.819E-03  0.531E-04   28   6  32    8  24   9   18  17   9    0.000    0.000       0
+  0   1007 00:15:30.61   0.9100A   1.9778  -0.7044  -0.9607  0.083  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.841E-03  0.527E-04   28   7  37    8  24   9   16  18   9    0.000    0.000       0
+  0   1013 00:15:36.07   0.9070A   1.9846  -0.6328   0.9338  0.083  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.855E-03  0.548E-04   28   2  15    8  24   9   21  10   9    0.000    0.000       0
+  0   1020 00:15:42.40   0.9030A   1.9942   0.5941  -0.7911  0.082  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.878E-03  0.630E-04   28   2  21   12  13   8   15  20   9    0.000    0.000       0
+  0   1027 00:15:48.70   0.8980A   2.0043   0.8165   0.7289  0.082  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.868E-03  0.564E-04   28   2  26   12  14   9   16  10   9    0.000    0.000       0
+  0   1033 00:15:54.08   0.8960A   2.0082   0.8704  -0.7010  0.082  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.853E-03  0.513E-04   28   2  31   11  15   9    9  25   5    0.000    0.000       0
+  0   1040 00:16:00.36   0.8990A   2.0028   0.8553   0.6978  0.081  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.854E-03  0.516E-04   28   2  37   10  16   9   20  29   9    0.000    0.000       0
+  0   1047 00:16:06.68   0.9060A   1.9874   0.8292   0.7737  0.079  0.00   0.000E+00      0.  0.681E+00  0.102E+00  0.852E-03  0.537E-04   30   3   2   10  16   9   20  28   9    0.000    0.000       0
+  0   1053 00:16:12.10   0.9010A   1.9971   0.7871   0.6692  0.077  0.00   0.000E+00      0.  0.681E+00  0.103E+00  0.850E-03  0.573E-04   30   3   6    9  17   9   20  28   9    0.000    0.000       0
+  0   1060 00:16:18.40   0.9010A   1.9978   0.7225  -0.6160  0.076  0.00   0.000E+00      0.  0.682E+00  0.103E+00  0.860E-03  0.615E-04   29   3  11   13  17   8    4  12   9    0.000    0.000       0
+  0   1067 00:16:24.69   0.8960A   2.0088   0.7185  -0.6342  0.075  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.857E-03  0.567E-04   30   2  16   13  14   9   17  18   9    0.000    0.000       0
+  0   1073 00:16:30.07   0.8970A   2.0069  -0.7682  -0.7255  0.075  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.853E-03  0.493E-04   30   2  21    6  27   8   16  18   9    0.000    0.000       0
+  0   1080 00:16:36.37   0.9030A   1.9929  -0.8597  -0.7597  0.076  0.00   0.000E+00      0.  0.682E+00  0.104E+00  0.851E-03  0.395E-04   30   2  27    6  26   8   17  19   9    0.000    0.000       0
+  0   1087 00:16:42.73   0.9120A   1.9729  -0.8493  -0.8700  0.078  0.00   0.000E+00      0.  0.681E+00  0.103E+00  0.854E-03  0.394E-04   30   2  33    5  26   9   17  20   9    0.000    0.000       0
+  0   1093 00:16:48.23   0.9160A   1.9646  -0.7582  -0.8804  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.839E-03  0.364E-04   31   1  27    5  26   9   16  20   9    0.000    0.000       0
+  0   1100 00:16:54.63   0.9140A   1.9690  -0.6141  -0.8349  0.082  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.824E-03  0.327E-04   31   1  33    5  25   9   13  20   8    0.000    0.000       0
+  0   1106 00:17:00.12   0.9140A   1.9687   0.6018  -0.7594  0.082  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.838E-03  0.395E-04   31   1  38   10  23   3   12  20   8    0.000    0.000       0
+  0   1113 00:17:06.53   0.9160A   1.9643   0.6272   0.7398  0.082  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.848E-03  0.457E-04   31   1   4   10  24   2   18  10   9    0.000    0.000       0
+  0   1119 00:17:12.03   0.9180A   1.9611   0.6459  -0.6900  0.083  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.849E-03  0.494E-04   32   1  12    3  13   9   16  27   9    0.000    0.000       0
+  0   1126 00:17:18.44   0.9140A   1.9704  -0.7693  -0.7186  0.083  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.823E-03  0.456E-04   32   1  17   18  25   9   15  26   9    0.000    0.000       0
+  0   1133 00:17:24.83   0.9120A   1.9738  -0.8456  -0.6988  0.082  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.803E-03  0.415E-04   32   1  23   15  25   9   13  27   9    0.000    0.000       0
+  0   1139 00:17:30.30   0.9140A   1.9702  -0.8701  -0.7074  0.080  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.799E-03  0.428E-04   32   1  28   14  24   9   12  26   9    0.000    0.000       0
+  0   1146 00:17:36.72   0.9180A   1.9606  -0.8656  -0.6735  0.079  0.00   0.000E+00      0.  0.678E+00  0.104E+00  0.790E-03  0.417E-04   32   1  34   15  24   9   11  26   9    0.000    0.000       0
+  0   1152 00:17:42.20   0.9100A   1.9773  -0.9145  -0.6991  0.079  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.761E-03  0.356E-04   28   3  14   16  24   9   10  26   9    0.000    0.000       0
+  0   1159 00:17:48.60   0.9170A   1.9622  -0.8730  -0.6475  0.079  0.00   0.000E+00      0.  0.676E+00  0.103E+00  0.756E-03  0.367E-04   28   2  20   16  23   9    9  25   9    0.000    0.000       0
+  0   1165 00:17:54.09   0.9140A   1.9702  -0.7846  -0.6812  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.757E-03  0.417E-04   28   2  24   16  23   9   15  22   7    0.000    0.000       0
+  0   1172 00:18:00.49   0.9140A   1.9690  -0.7082  -0.7946  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.766E-03  0.477E-04   27   1  29   15  22   9   15  21   7    0.000    0.000       0
+  0   1179 00:18:06.91   0.9170A   1.9636  -0.6093  -0.8613  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.765E-03  0.462E-04   34   2  22   19  10   9   14  21   7    0.000    0.000       0
+  0   1185 00:18:12.41   0.9160A   1.9643   0.6082  -0.8487  0.079  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.764E-03  0.449E-04   35  29  35   16  21   3   13  21   7    0.000    0.000       0
+  0   1192 00:18:18.81   0.9150A   1.9675   0.6528  -0.8181  0.078  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.763E-03  0.423E-04   35  29   0   16  21   3   16  21   9    0.000    0.000       0
+  0   1198 00:18:24.30   0.9150A   1.9678   0.6871  -0.8150  0.077  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.772E-03  0.439E-04   35  29   5   15  22   2   16  22   9    0.000    0.000       0
+  0   1205 00:18:30.71   0.9170A   1.9637  -0.7809  -0.7394  0.075  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.780E-03  0.454E-04   35  29  10   14  26   9   15  21   9    0.000    0.000       0
+  0   1211 00:18:36.22   0.9180A   1.9601   0.8389  -0.7044  0.073  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.786E-03  0.455E-04   34  30  16    9  15   9    9  21   5    0.000    0.000       0
+  0   1218 00:18:42.64   0.9170A   1.9628   0.9120   0.6704  0.071  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.792E-03  0.491E-04   30  14  24    8  15   9   21  26   9    0.000    0.000       0
+  0   1224 00:18:48.15   0.9220A   1.9528   0.9571  -0.6002  0.070  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.792E-03  0.494E-04   30  14  28    7  15   9    6  21   3    0.000    0.000       0
+  0   1231 00:18:54.64   0.9290A   1.9369   0.9953  -0.6046  0.070  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.790E-03  0.467E-04   36  27  30    6  15   9   14  24   2    0.000    0.000       0
+  0   1237 00:19:00.22   0.9310A   1.9336   1.0004  -0.6054  0.072  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.792E-03  0.454E-04   36  27  35    5  15   9   13  24   2    0.000    0.000       0
+  0   1244 00:19:06.72   0.9250A   1.9453   0.9139  -0.6148  0.074  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.784E-03  0.460E-04   32   0  36    5  16   9   13  24   2    0.000    0.000       0
+  0   1250 00:19:12.26   0.9230A   1.9497   0.8098  -0.5985  0.076  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.783E-03  0.490E-04   32   0   1    4  16   9   12  24   2    0.000    0.000       0
+  0   1257 00:19:18.73   0.9270A   1.9425   0.8389  -0.6054  0.078  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.782E-03  0.484E-04   32   0   6    3  14   9   17  17   9    0.000    0.000       0
+  0   1263 00:19:24.30   0.9270A   1.9416   0.7548  -0.6070  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.783E-03  0.483E-04   33   4  17    3  15   9   16  28   9    0.000    0.000       0
+  0   1270 00:19:30.77   0.9210A   1.9538   0.6576  -0.6909  0.080  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.776E-03  0.429E-04   33   4  22    3  14   9   15  28   9    0.000    0.000       0
+  0   1276 00:19:36.28   0.9180A   1.9602   0.6042  -0.7062  0.080  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.777E-03  0.393E-04   33   4  27    2  14   9   16  20   9    0.000    0.000       0
+  0   1283 00:19:42.71   0.9170A   1.9625  -0.6000  -0.7322  0.080  0.00   0.000E+00      0.  0.675E+00  0.101E+00  0.784E-03  0.416E-04   33   4  32    6  27   9   18  17   9    0.000    0.000       0
+  0   1289 00:19:48.22   0.9190A   1.9584   0.5857  -0.8226  0.080  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.802E-03  0.456E-04   33   4  37    2  14   8   17  17   9    0.000    0.000       0
+  0   1296 00:19:54.67   0.9250A   1.9463   0.7270  -0.8524  0.081  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.811E-03  0.477E-04   33   4   2   12  14   9   17  19   9    0.000    0.000       0
+  0   1302 00:20:00.25   0.9320A   1.9306   0.8455  -0.8171  0.080  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.823E-03  0.492E-04   33   4   7   11  15   9   17  21   9    0.000    0.000       0
+  0   1309 00:20:06.74   0.9270A   1.9428   1.0705  -0.7516  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.827E-03  0.496E-04   30  15  28   10  14   9   16  21   9    0.000    0.000       0
+  0   1315 00:20:12.33   0.9340A   1.9280   1.2222  -0.6821  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.830E-03  0.511E-04   29  16  33    9  14   9   15  21   9    0.000    0.000       0
+  0   1322 00:20:18.88   0.9380A   1.9190   1.2361  -0.6040  0.079  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.845E-03  0.571E-04   33  26  31    8  15   9    5  12   9    0.000    0.000       0
+  0   1328 00:20:24.51   0.9360A   1.9221   1.1695  -0.6708  0.079  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.846E-03  0.588E-04   32  26  35    8  16   9    4  11   9    0.000    0.000       0
+  0   1334 00:20:30.12   0.9320A   1.9305   1.0752  -0.7001  0.079  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.835E-03  0.530E-04   26  33  31    8  16   9   17  20   9    0.000    0.000       0
+  0   1341 00:20:36.61   0.9230A   1.9498   0.9639  -0.7462  0.081  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.821E-03  0.457E-04   26  33  36    8  16   9   17  18   9    0.000    0.000       0
+  0   1347 00:20:42.13   0.9190A   1.9577   0.8563  -0.7313  0.082  0.00   0.000E+00      0.  0.676E+00  0.995E-01  0.814E-03  0.423E-04   26  33   1    8  16   9   17  18   9    0.000    0.000       0
+  0   1354 00:20:48.56   0.9180A   1.9600   0.7412  -0.7928  0.085  0.00   0.000E+00      0.  0.675E+00  0.989E-01  0.813E-03  0.422E-04   26  33   6    9  17   9   17  17   9    0.000    0.000       0
+  0   1360 00:20:54.09   0.9220A   1.9531  -0.6637  -0.8252  0.086  0.00   0.000E+00      0.  0.675E+00  0.986E-01  0.822E-03  0.437E-04   26  33  10    6  37  32   17  16   9    0.000    0.000       0
+  0   1367 00:21:00.54   0.9240A   1.9479  -0.8066  -0.8309  0.087  0.00   0.000E+00      0.  0.674E+00  0.983E-01  0.823E-03  0.433E-04   26  32  16    6  27   9   17  15   9    0.000    0.000       0
+  0   1373 00:21:06.09   0.9260A   1.9434  -1.0455  -0.7566  0.089  0.00   0.000E+00      0.  0.673E+00  0.982E-01  0.824E-03  0.472E-04   26  32  20    5  27   9   16  16   9    0.000    0.000       0
+  0   1380 00:21:12.59   0.9280A   1.9389  -1.0479  -0.6893  0.090  0.00   0.000E+00      0.  0.673E+00  0.982E-01  0.824E-03  0.521E-04   26  32  25    3  26   9   16  18   9    0.000    0.000       0
+  0   1386 00:21:18.16   0.9290A   1.9386  -0.8920  -0.6909  0.091  0.00   0.000E+00      0.  0.673E+00  0.982E-01  0.804E-03  0.478E-04   26  32  30    3  25   9   16  19   9    0.000    0.000       0
+  0   1393 00:21:24.67   0.9310A   1.9327  -0.7437  -0.6827  0.090  0.00   0.000E+00      0.  0.672E+00  0.981E-01  0.787E-03  0.464E-04   26  32  35    2  25   8   15  20   9    0.000    0.000       0
+  0   1399 00:21:30.29   0.9400A   1.9147  -0.7000  -0.6554  0.089  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.782E-03  0.467E-04   26  32   0    1  26   7   14  19   9    0.000    0.000       0
+  0   1406 00:21:36.85   0.9290A   1.9383  -0.6390  -0.6074  0.089  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.759E-03  0.408E-04   25  30  13    1  25   7   13  20   9    0.000    0.000       0
+  0   1412 00:21:42.39   0.9210A   1.9536  -0.6022  -0.6131  0.089  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.750E-03  0.365E-04   25  30  17    1  24   6   16  22   9    0.000    0.000       0
+  0   1419 00:21:48.83   0.9220A   1.9524   0.6030  -0.6367  0.090  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.748E-03  0.339E-04   25  30  22   20  30   9   18  18   9    0.000    0.000       0
+  0   1425 00:21:54.36   0.9190A   1.9593   0.7628  -0.7487  0.091  0.00   0.000E+00      0.  0.672E+00  0.983E-01  0.743E-03  0.382E-04   25  30  28   20  30   9   17  18   9    0.000    0.000       0
+  0   1432 00:22:00.74   0.9070A   1.9849  -0.6224  -0.7832  0.092  0.00   0.000E+00      0.  0.672E+00  0.989E-01  0.730E-03  0.410E-04   24  31  32    9  26   9   16  17   9    0.000    0.000       0
+  0   1438 00:22:06.16   0.9060A   1.9874  -0.6028  -0.8210  0.092  0.00   0.000E+00      0.  0.673E+00  0.994E-01  0.724E-03  0.421E-04   24  31  37    9  26   9   17  14   9    0.000    0.000       0
+  0   1445 00:22:12.53   0.9110A   1.9767  -0.6869  -0.8057  0.091  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.731E-03  0.449E-04   24  32   3   10  27   9   16  15   9    0.000    0.000       0
+  0   1451 00:22:18.02   0.9190A   1.9593  -0.7373  -0.7516  0.090  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.738E-03  0.432E-04   24  32   8   11  27   9   15  16   9    0.000    0.000       0
+  0   1458 00:22:24.49   0.9290A   1.9382  -0.7796  -0.6814  0.090  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.751E-03  0.461E-04   26  30  14    8  27   9    9  18   7    0.000    0.000       0
+  0   1464 00:22:30.10   0.9390A   1.9167  -0.7910   0.8223  0.089  0.00   0.000E+00      0.  0.672E+00  0.101E+00  0.761E-03  0.478E-04   27  15  13    7  26   9   20  11   9    0.000    0.000       0
+  0   1471 00:22:36.64   0.9280A   1.9393   0.7692   0.7660  0.089  0.00   0.000E+00      0.  0.671E+00  0.100E+00  0.747E-03  0.466E-04   30   3  20   11  13   9   20  12   9    0.000    0.000       0
+  0   1477 00:22:42.21   0.9280A   1.9395   0.7497  -0.6562  0.089  0.00   0.000E+00      0.  0.670E+00  0.100E+00  0.742E-03  0.454E-04   30   2  23   10  13   9    7  19   7    0.000    0.000       0
+  0   1484 00:22:48.67   0.9240A   1.9488   0.6652  -0.6931  0.090  0.00   0.000E+00      0.  0.669E+00  0.100E+00  0.735E-03  0.448E-04   30  37  13   10  14   9    6  18   7    0.000    0.000       0
+  0   1490 00:22:54.21   0.9240A   1.9481   0.6181  -0.7226  0.091  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.741E-03  0.488E-04   30  37  18   25  14  23    5  18   7    0.000    0.000       0
+  0   1497 00:23:00.70   0.9280A   1.9399   0.6291  -0.7925  0.091  0.00   0.000E+00      0.  0.670E+00  0.101E+00  0.743E-03  0.490E-04   30  38  23   26  14  28   17  13   9    0.000    0.000       0
+  0   1503 00:23:06.29   0.9360A   1.9234   0.6134  -0.7672  0.090  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.739E-03  0.448E-04   32   1   1   26  14  31   17  16   9    0.000    0.000       0
+  0   1510 00:23:12.84   0.9350A   1.9245  -0.6163  -0.7034  0.088  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.733E-03  0.408E-04   29  39   3   10  27   9   16  16   9    0.000    0.000       0
+  0   1516 00:23:18.44   0.9320A   1.9323  -0.7004  -0.6398  0.087  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.736E-03  0.396E-04   28  39   7    9  26   9   15  17   9    0.000    0.000       0
+  0   1522 00:23:24.01   0.9270A   1.9410  -0.7833   0.6478  0.086  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.751E-03  0.421E-04   27  39  10    8  26   9   20  11   9    0.000    0.000       0
+  0   1529 00:23:30.47   0.9160A   1.9646   0.8393   0.6140  0.084  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.768E-03  0.495E-04   27  38  15   15  14   9   20  11   9    0.000    0.000       0
+  0   1536 00:23:36.84   0.9070A   1.9836  -0.8363   0.7404  0.083  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.781E-03  0.563E-04   27  38  19   13  27   9   20  11   9    0.000    0.000       0
+  0   1542 00:23:42.27   0.9070A   1.9839   0.8169   0.8553  0.083  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.779E-03  0.562E-04   27  38  24   16  16   9   20  12   9    0.000    0.000       0
+  0   1549 00:23:48.65   0.9080A   1.9815   0.7785   0.7934  0.083  0.00   0.000E+00      0.  0.669E+00  0.103E+00  0.784E-03  0.591E-04   28  37  29   16  17   9   20  13   9    0.000    0.000       0
+  0   1555 00:23:54.08   0.9050A   1.9882   0.7165   0.7012  0.084  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.785E-03  0.597E-04   28  37  33   16  17   9   20  16   9    0.000    0.000       0
+  0   1562 00:24:00.42   0.9070A   1.9837   0.9071  -0.7881  0.085  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.797E-03  0.621E-04   28  37  39   10  14   9    5  10   9    0.000    0.000       0
+  0   1569 00:24:06.80   0.9140A   1.9696   0.9983  -0.8893  0.087  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.800E-03  0.619E-04   28  37   5    8  15   9    4  11   9    0.000    0.000       0
+  0   1575 00:24:12.30   0.9160A   1.9644   0.9752  -0.8949  0.087  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.785E-03  0.557E-04   36   1  10    9  16   9    4  12   9    0.000    0.000       0
+  0   1582 00:24:18.70   0.9120A   1.9730   0.8964  -0.8343  0.088  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.768E-03  0.494E-04   36   1  15    7  16   9    3  12   9    0.000    0.000       0
+  0   1588 00:24:24.17   0.9090A   1.9796   0.8008  -0.7344  0.087  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.751E-03  0.428E-04   36  39  20    7  17   9    3  13   9    0.000    0.000       0
+  0   1595 00:24:30.52   0.9050A   1.9897   0.6665   0.7155  0.086  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.741E-03  0.425E-04   36  39  25    8  18   9   20  28   9    0.000    0.000       0
+  0   1602 00:24:36.86   0.9070A   1.9855  -0.7522   0.7061  0.086  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.747E-03  0.455E-04   36  39  30   12  28   9   21  28   9    0.000    0.000       0
+  0   1608 00:24:42.33   0.9130A   1.9705  -0.8274  -0.7059  0.086  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.758E-03  0.470E-04   35  38  36   13  27   9   18  18   9    0.000    0.000       0
+  0   1615 00:24:48.73   0.9160A   1.9644   0.8802  -0.8311  0.086  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.761E-03  0.463E-04   35  38   1   12  14   9   17  18   9    0.000    0.000       0
+  0   1621 00:24:54.24   0.9180A   1.9599   0.9225  -0.8177  0.086  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.765E-03  0.469E-04   35  39   7   12  15   9   17  17   9    0.000    0.000       0
+  0   1628 00:25:00.68   0.9210A   1.9553   0.8638  -0.6876  0.085  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.768E-03  0.499E-04   35   0  11   12  16   9   16  18   9    0.000    0.000       0
+  0   1634 00:25:06.20   0.9190A   1.9594   0.7958   0.6743  0.085  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.765E-03  0.512E-04   34  39  18   13  15   9   20  11   9    0.000    0.000       0
+  0   1641 00:25:12.62   0.9150A   1.9665   0.7235   0.7660  0.084  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.765E-03  0.545E-04   34  39  23   12  16   9   20  12   9    0.000    0.000       0
+  0   1647 00:25:18.11   0.9150A   1.9676   0.6633   0.7125  0.083  0.00   0.000E+00      0.  0.674E+00  0.104E+00  0.763E-03  0.541E-04   34  39  28   11  17   9   20  13   9    0.000    0.000       0
+  0   1654 00:25:24.52   0.9180A   1.9605   0.7425   0.6448  0.083  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.758E-03  0.489E-04   34  39  34    7  14   7   20  13   9    0.000    0.000       0
+  0   1660 00:25:30.04   0.9180A   1.9601   0.8272  -0.6611  0.083  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.756E-03  0.444E-04   33  39  39    7  15   8    4  10   9    0.000    0.000       0
+  0   1667 00:25:36.43   0.9090A   1.9794   0.8820  -0.8338  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.755E-03  0.426E-04   27  27   7    6  16   8   18  19   9    0.000    0.000       0
+  0   1674 00:25:42.77   0.8980A   2.0042   0.8525  -1.0409  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.766E-03  0.438E-04   25  25  10    6  16   8   17  18   9    0.000    0.000       0
+  0   1680 00:25:48.10   0.8840A   2.0370   0.8378  -0.9888  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.768E-03  0.458E-04   25  25  14    6  17   9   16  18   9    0.000    0.000       0
+  0   1687 00:25:54.30   0.8890A   2.0239   0.7988  -0.9026  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.788E-03  0.480E-04   25  25  19    5  18   9   15  20   9    0.000    0.000       0
+  0   1694 00:26:00.57   0.8930A   2.0159  -0.7217  -0.8745  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.795E-03  0.457E-04   27  26  24   12  27   9   16  19   9    0.000    0.000       0
+  0   1701 00:26:06.78   0.8840A   2.0361   0.7306  -0.9263  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.791E-03  0.469E-04   27  26  28   21  14   8   16  20   9    0.000    0.000       0
+  0   1707 00:26:12.07   0.8830A   2.0388   0.6483  -0.9545  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.787E-03  0.492E-04   29  27  32   18  20   4   15  21   9    0.000    0.000       0
+  0   1714 00:26:18.28   0.8890A   2.0243   0.6395  -0.9264  0.085  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.793E-03  0.517E-04   28  27  37   17  18   5   14  21   9    0.000    0.000       0
+  0   1721 00:26:24.50   0.8890A   2.0248   0.6767  -0.9020  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.781E-03  0.477E-04   28  27   2   16  19   5   15  19   9    0.000    0.000       0
+  0   1728 00:26:30.78   0.9060A   1.9876   0.6389  -0.9495  0.083  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.799E-03  0.504E-04   28  27   6   15  19   4   15  18   9    0.000    0.000       0
+  0   1734 00:26:36.28   0.9230A   1.9495   0.6335  -0.9558  0.083  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.824E-03  0.532E-04   29  28  11   15  20   4   14  18   9    0.000    0.000       0
+  0   1741 00:26:42.72   0.9200A   1.9576  -0.6534  -0.9060  0.084  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.838E-03  0.528E-04   28  28  16   20  14   9   13  18   9    0.000    0.000       0
+  0   1747 00:26:48.24   0.9150A   1.9670  -0.7717  -0.9772  0.085  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.846E-03  0.521E-04   30  10  17   20  14   9   17  23   9    0.000    0.000       0
+  0   1754 00:26:54.54   0.8920A   2.0183  -0.7392  -0.9683  0.086  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.830E-03  0.504E-04   30  10  23   19  14   9   15  22   9    0.000    0.000       0
+  0   1761 00:27:00.79   0.8940A   2.0145  -0.6934  -0.9841  0.086  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.831E-03  0.512E-04   30  10  28   19  14   9   16  17   9    0.000    0.000       0
+  0   1767 00:27:06.15   0.8910A   2.0201  -0.7552  -0.9647  0.086  0.00   0.000E+00      0.  0.674E+00  0.103E+00  0.824E-03  0.520E-04   31  10  32   14  27   9   14  17   9    0.000    0.000       0
+  0   1774 00:27:12.41   0.9010A   1.9982  -0.7953  -0.8591  0.087  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.826E-03  0.526E-04   31  10  38   13  26   9   13  17   9    0.000    0.000       0
+  0   1781 00:27:18.81   0.9200A   1.9561  -0.7035  -0.7894  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.826E-03  0.505E-04   31   9   3   12  25   9    9  22   8    0.000    0.000       0
+  0   1787 00:27:24.36   0.9230A   1.9506  -0.6067   0.7498  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.819E-03  0.512E-04   33  26  21   12  25   9   20  10   9    0.000    0.000       0
+  0   1794 00:27:30.79   0.9180A   1.9614  -0.5863   0.8796  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.812E-03  0.517E-04   33  26  26    7  26   9   20  11   9    0.000    0.000       0
+  0   1800 00:27:36.29   0.9160A   1.9647   0.6015   0.8927  0.086  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.808E-03  0.529E-04   33  26  31   21  31   7   21  12   9    0.000    0.000       0
+  0   1807 00:27:42.72   0.9220A   1.9532   0.6445  -0.7782  0.088  0.00   0.000E+00      0.  0.674E+00  0.103E+00  0.818E-03  0.543E-04   33  26  36   21  33   9   15  20   9    0.000    0.000       0
+  0   1813 00:27:48.26   0.9250A   1.9467  -0.5973  -0.7099  0.090  0.00   0.000E+00      0.  0.674E+00  0.103E+00  0.805E-03  0.487E-04   33  26  19   14  26   9   14  20   9    0.000    0.000       0
+  0   1820 00:27:54.72   0.9200A   1.9555  -0.5973  -0.7036  0.091  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.794E-03  0.447E-04   27  29  11   14  26   9    7  18   7    0.000    0.000       0
+  0   1826 00:28:00.25   0.9220A   1.9518  -0.5763  -0.6679  0.093  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.794E-03  0.443E-04   27  29  15   13  25   9   11  21   8    0.000    0.000       0
+  0   1833 00:28:06.73   0.9280A   1.9400   0.6837  -0.6689  0.094  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.789E-03  0.425E-04   32  27  18   12  14   9   11  22   7    0.000    0.000       0
+  0   1839 00:28:12.30   0.9280A   1.9398   0.7915  -0.6575  0.094  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.793E-03  0.467E-04   32  27  23    7  13   9    2  10   9    0.000    0.000       0
+  0   1846 00:28:18.76   0.9170A   1.9633   0.9114  -0.7346  0.094  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.791E-03  0.488E-04   27   5   2    7  14   9    3  11   9    0.000    0.000       0
+  0   1852 00:28:24.28   0.9210A   1.9537   0.8839  -0.7233  0.093  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.803E-03  0.519E-04   27   5   6    6  15   9    2  11   9    0.000    0.000       0
+  0   1859 00:28:30.76   0.9300A   1.9364  -0.8306  -0.7330  0.092  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.803E-03  0.507E-04   32  27  39   13  26   9    9  28   9    0.000    0.000       0
+  0   1865 00:28:36.34   0.9290A   1.9380  -0.8546  -0.6775  0.092  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.795E-03  0.478E-04   31  24  11   14  25   9    9  26   9    0.000    0.000       0
+  0   1872 00:28:42.82   0.9250A   1.9454  -0.8061   0.6084  0.092  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.782E-03  0.422E-04   26  21  25   13  24   9    9  32  14    0.000    0.000       0
+  0   1878 00:28:48.37   0.9240A   1.9471  -0.7734  -0.6184  0.094  0.00   0.000E+00      0.  0.675E+00  0.104E+00  0.779E-03  0.419E-04   26  21  29   15  24   8   18  14   9    0.000    0.000       0
+  0   1885 00:28:54.85   0.9260A   1.9445  -0.7688  -0.6920  0.095  0.00   0.000E+00      0.  0.674E+00  0.104E+00  0.791E-03  0.471E-04   30  24  28   15  24   8   18  25   9    0.000    0.000       0
+  0   1891 00:29:00.39   0.9210A   1.9549  -0.7946  -0.7339  0.095  0.00   0.000E+00      0.  0.674E+00  0.105E+00  0.792E-03  0.468E-04   30  24  34   14  26   9   17  23   9    0.000    0.000       0
+  0   1898 00:29:06.82   0.9190A   1.9595  -0.8081  -0.7145  0.094  0.00   0.000E+00      0.  0.674E+00  0.105E+00  0.794E-03  0.474E-04   30  24   0   13  26   9   16  22   9    0.000    0.000       0
+  0   1904 00:29:12.34   0.9190A   1.9592  -0.8848  -0.7616  0.094  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.805E-03  0.504E-04   28  31  32   13  26   9   17  18   9    0.000    0.000       0
+  0   1911 00:29:18.75   0.9130A   1.9718  -0.9494  -0.7254  0.093  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.801E-03  0.496E-04   31   6   3   12  26   9   16  18   9    0.000    0.000       0
+  0   1917 00:29:24.23   0.9160A   1.9661  -0.9769  -0.6456  0.092  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.812E-03  0.539E-04   31   6   8   11  25   9   15  18   9    0.000    0.000       0
+  0   1924 00:29:30.62   0.9120A   1.9728  -0.9225  -0.6265  0.091  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.814E-03  0.534E-04   28  30   8   10  25   9   10  23   0    0.000    0.000       0
+  0   1930 00:29:36.10   0.9110A   1.9748  -0.8808   0.6558  0.089  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.815E-03  0.469E-04   32  24  10   10  24   9   18  10   8    0.000    0.000       0
+  0   1937 00:29:42.47   0.9110A   1.9760  -0.8035   0.6810  0.087  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.813E-03  0.408E-04   32  24  16    9  23   9   20  10   9    0.000    0.000       0
+  0   1944 00:29:48.86   0.9130A   1.9714  -0.7012  -0.7800  0.086  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.814E-03  0.426E-04   32  24  22   11  22   8    2  10   9    0.000    0.000       0
+  0   1950 00:29:54.34   0.9160A   1.9653   0.7821  -0.7552  0.085  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.823E-03  0.480E-04   32  24  27    5  13   9    2  11   9    0.000    0.000       0
+  0   1957 00:30:00.77   0.9200A   1.9559   0.9189  -0.6690  0.085  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.850E-03  0.556E-04   32  27  27    5  13   9   14   7   0    0.000    0.000       0
+  0   1963 00:30:06.29   0.9190A   1.9589   0.9458  -0.8401  0.086  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.870E-03  0.561E-04   26  26   8    6  14   9   17  23   9    0.000    0.000       0
+  0   1970 00:30:12.68   0.9110A   1.9763   0.8904  -0.8660  0.087  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.892E-03  0.600E-04   26  26  12    6  14   9   16  23   9    0.000    0.000       0
+  0   1976 00:30:18.14   0.9090A   1.9807   0.8122  -0.8176  0.089  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.901E-03  0.624E-04   27  31  14    6  15   9   15  22   9    0.000    0.000       0
+  0   1983 00:30:24.46   0.9020A   1.9966   0.7107  -1.0051  0.090  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.899E-03  0.605E-04   27  31  19    6  15   9   17  19   9    0.000    0.000       0
+  0   1990 00:30:30.81   0.9110A   1.9767   0.7493  -1.0539  0.091  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.898E-03  0.572E-04   27  25  37   10  14   9   15  19   9    0.000    0.000       0
+  0   1996 00:30:36.27   0.9090A   1.9804  -0.7153  -0.9611  0.091  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.886E-03  0.599E-04   26  26   7    6  15   3   14  19   9    0.000    0.000       0
+  0   2003 00:30:42.59   0.9000A   2.0009  -0.7535  -0.8429  0.091  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.873E-03  0.611E-04   26  26  13   13  25   7    8  26   9    0.000    0.000       0
+  0   2010 00:30:48.87   0.8950A   2.0114  -0.8062  -0.7779  0.091  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.870E-03  0.599E-04   26  25  14   12  26   9    8  21   8    0.000    0.000       0
+  0   2016 00:30:54.23   0.8910A   2.0197  -0.8269  -0.7920  0.091  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.860E-03  0.535E-04   26  25  20   12  26   9    7  21   8    0.000    0.000       0
+  0   2023 00:31:00.46   0.8880A   2.0265  -0.8510  -0.7712  0.090  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.864E-03  0.531E-04   26  25  26   12  25   9    6  21   8    0.000    0.000       0
+  0   2030 00:31:06.66   0.8860A   2.0317  -0.7591  -0.7070  0.091  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.853E-03  0.486E-04   26  25  31   14  24   9    4  21   7    0.000    0.000       0
+  0   2037 00:31:12.87   0.8870A   2.0298  -0.6726   0.6959  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.857E-03  0.499E-04   26  25  36   11  24   9   12  11  35    0.000    0.000       0
+  0   2043 00:31:18.21   0.8930A   2.0164  -0.6753   0.7115  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.879E-03  0.575E-04   26  25   0    5   7  39   12  11  36    0.000    0.000       0
+  0   2050 00:31:24.48   0.8980A   2.0040  -0.7236   0.8190  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.900E-03  0.581E-04   26  26   6    5   6   1   20  10   9    0.000    0.000       0
+  0   2057 00:31:30.72   0.8850A   2.0343   0.8519  -0.7358  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.905E-03  0.599E-04   26  26  12   11  14   9    8  11   9    0.000    0.000       0
+  0   2063 00:31:36.02   0.8800A   2.0450   0.9239  -0.8823  0.092  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.898E-03  0.589E-04   26  26  16   12  14   9    8  12   9    0.000    0.000       0
+  0   2070 00:31:42.17   0.8800A   2.0465   0.9616  -0.8980  0.094  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.894E-03  0.563E-04   26  26  20   11  16   9    7  12   9    0.000    0.000       0
+  0   2077 00:31:48.33   0.8810A   2.0421   1.0015  -0.8476  0.095  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.887E-03  0.548E-04   26  26  25   12  16   9    7  13   9    0.000    0.000       0
+  0   2084 00:31:54.52   0.8860A   2.0313   0.9950   0.9641  0.095  0.00   0.000E+00      0.  0.675E+00  0.108E+00  0.885E-03  0.557E-04   26  26  31   12  17   9   21  10   9    0.000    0.000       0
+  0   2091 00:32:00.74   0.8910A   2.0192   0.9343   0.9070  0.096  0.00   0.000E+00      0.  0.675E+00  0.108E+00  0.871E-03  0.572E-04   26  26  36   13  17   8   21  11   9    0.000    0.000       0
+  0   2097 00:32:06.10   0.8940A   2.0135   0.8625   0.8623  0.095  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.858E-03  0.545E-04   26  27   0   13  18   8   21  12   9    0.000    0.000       0
+  0   2104 00:32:12.35   0.8890A   2.0248   0.8076  -0.8025  0.095  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.842E-03  0.507E-04   26  27   6   11  15   9   11  17   4    0.000    0.000       0
+  0   2111 00:32:18.52   0.8750A   2.0572   0.8126  -0.8583  0.093  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.821E-03  0.507E-04   26  28  11   10  15   9    9  17   4    0.000    0.000       0
+  0   2118 00:32:24.60   0.8670A   2.0772   0.7750  -0.8511  0.092  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.794E-03  0.422E-04   26  28  16   10  16   8   15  18   9    0.000    0.000       0
+  0   2125 00:32:30.68   0.8710A   2.0664   0.7275  -0.8159  0.091  0.00   0.000E+00      0.  0.676E+00  0.109E+00  0.785E-03  0.385E-04   26  28  21   10  17   8   17  20   9    0.000    0.000       0
+  0   2132 00:32:36.80   0.8790A   2.0483   0.6561  -0.7910  0.090  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.787E-03  0.378E-04   26  28  27   18  14   5   14  19   8    0.000    0.000       0
+  0   2138 00:32:42.11   0.8880A   2.0277   0.7180  -0.7687  0.089  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.810E-03  0.399E-04   26  28  31   18  15   6   13  19   8    0.000    0.000       0
+  0   2145 00:32:48.36   0.8930A   2.0155   0.8295  -0.8038  0.089  0.00   0.000E+00      0.  0.675E+00  0.108E+00  0.831E-03  0.416E-04   28  28  29   13  13   9   10  11   9    0.000    0.000       0
+  0   2152 00:32:54.59   0.8870A   2.0287   0.9112  -0.8743  0.088  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.836E-03  0.432E-04   28  29  35   13  14   9   17  24   9    0.000    0.000       0
+  0   2159 00:33:00.78   0.8850A   2.0341   0.9251  -0.8290  0.088  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.840E-03  0.461E-04   28  29   0   13  15   9   17  23   9    0.000    0.000       0
+  0   2165 00:33:06.09   0.8860A   2.0321   0.9263  -0.8217  0.088  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.839E-03  0.461E-04   28  29   5   13  16   9    9  13   9    0.000    0.000       0
+  0   2172 00:33:12.28   0.8810A   2.0427   0.8934  -0.7902  0.087  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.838E-03  0.478E-04   28  25  13   14  16   9    8  14   9    0.000    0.000       0
+  0   2179 00:33:18.44   0.8810A   2.0422   0.8705  -0.8590  0.087  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.851E-03  0.558E-04   27  27  19   15  15   9   11  11   9    0.000    0.000       0
+  0   2186 00:33:24.61   0.8800A   2.0462   0.9070  -0.7889  0.088  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.855E-03  0.602E-04   27  27  25   15  16   9   11  13   9    0.000    0.000       0
+  0   2193 00:33:30.75   0.8760A   2.0557   0.8969  -0.8476  0.089  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.841E-03  0.535E-04   27  29  31   15  16   9   12  17   5    0.000    0.000       0
+  0   2200 00:33:36.87   0.8730A   2.0609   0.7956  -0.8689  0.090  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.832E-03  0.468E-04   26  28  37   14  17   8   11  18   5    0.000    0.000       0
+  0   2206 00:33:42.11   0.8740A   2.0589   0.7716  -0.8835  0.091  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.839E-03  0.445E-04   26  28   1   14  18   8   16  20   9    0.000    0.000       0
+  0   2213 00:33:48.25   0.8790A   2.0476   0.8989  -0.8607  0.091  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.840E-03  0.396E-04   27  29   7    9  14   9   15  20   9    0.000    0.000       0
+  0   2220 00:33:54.43   0.8860A   2.0322   0.9926  -0.7637  0.090  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.839E-03  0.409E-04   27  29  12    9  15   9   14  21   9    0.000    0.000       0
+  0   2227 00:34:00.63   0.8850A   2.0337   0.9512  -0.6787  0.090  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.827E-03  0.440E-04   29  26  15    8  16   9   13  21   9    0.000    0.000       0
+  0   2234 00:34:06.83   0.8860A   2.0316   0.9249   0.6117  0.088  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.806E-03  0.463E-04   29  26  21    7  15   9   23  33  13    0.000    0.000       0
+  0   2240 00:34:12.15   0.8860A   2.0305   0.8611   0.6174  0.086  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.801E-03  0.517E-04   30  31  39    7  16   9    8  29  35    0.000    0.000       0
+  0   2247 00:34:18.36   0.8880A   2.0271   0.7647  -0.6419  0.085  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.801E-03  0.529E-04   30  31   5    8  18   9    4  28   4    0.000    0.000       0
+  0   2254 00:34:24.56   0.8860A   2.0325   0.6826  -0.6994  0.084  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.813E-03  0.565E-04   30  31  10    8  19   9    4  28   4    0.000    0.000       0
+  0   2261 00:34:30.76   0.8840A   2.0357  -0.6850  -0.7540  0.084  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.814E-03  0.553E-04   30  31  16   12  26   9    4  28   6    0.000    0.000       0
+  0   2267 00:34:36.06   0.8830A   2.0394  -0.8056   0.7625  0.084  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.819E-03  0.551E-04   30  31  20   12  26   9   20  10   9    0.000    0.000       0
+  0   2274 00:34:42.23   0.8830A   2.0390  -0.8575  -0.8183  0.083  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.822E-03  0.528E-04   30  31  26   11  25   9   17  17   9    0.000    0.000       0
+  0   2281 00:34:48.42   0.8860A   2.0322   0.8659  -0.8140  0.082  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.827E-03  0.500E-04   30  31  31    4  30   4   16  17   9    0.000    0.000       0
+  0   2288 00:34:54.65   0.8940A   2.0145   0.8676  -0.8005  0.082  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.842E-03  0.469E-04   30  31  37    4  30   5    5  28   9    0.000    0.000       0
+  0   2294 00:35:00.02   0.8940A   2.0125   0.8615  -0.8060  0.081  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.856E-03  0.462E-04   31  31   1    4  30   5    5  28   9    0.000    0.000       0
+  0   2301 00:35:06.27   0.8890A   2.0240  -0.8755  -0.8131  0.081  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.878E-03  0.464E-04   30  25  16    6  35  17    7  26   8    0.000    0.000       0
+  0   2308 00:35:12.51   0.8990A   2.0017   0.8967  -0.7559  0.080  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.907E-03  0.512E-04   30  25  22   11  13   9    6  27   9    0.000    0.000       0
+  0   2315 00:35:18.77   0.8890A   2.0239   0.9482  -0.6818  0.079  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.900E-03  0.544E-04   29  30  11   10  14   9    7  26   9    0.000    0.000       0
+  0   2321 00:35:24.07   0.8770A   2.0514   0.8802   0.7330  0.078  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.876E-03  0.548E-04   29  30  16   10  15   9   12  28   1    0.000    0.000       0
+  0   2328 00:35:30.19   0.8730A   2.0614   0.8128  -0.7078  0.077  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.858E-03  0.532E-04   29  30  21    5  15   9    8  24   8    0.000    0.000       0
+  0   2335 00:35:36.32   0.8790A   2.0483   0.8556  -0.6991  0.077  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.863E-03  0.528E-04   29  30  27    4  16   9    7  24   8    0.000    0.000       0
+  0   2342 00:35:42.49   0.8840A   2.0356   0.8551  -0.7672  0.077  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.871E-03  0.521E-04   31  27  19    4  16   9   17  21   9    0.000    0.000       0
+  0   2349 00:35:48.67   0.8760A   2.0548   0.8452  -0.9804  0.078  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.859E-03  0.487E-04   32  27  24    3  16   9   17  20   9    0.000    0.000       0
+  0   2356 00:35:54.80   0.8740A   2.0596   0.8473  -1.0104  0.080  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.848E-03  0.439E-04   32  30   0    3  16   9   16  19   9    0.000    0.000       0
+  0   2362 00:36:00.02   0.8700A   2.0692   0.8132  -1.0010  0.081  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.849E-03  0.444E-04   32  30   5    3  17   9   16  17   9    0.000    0.000       0
+  0   2369 00:36:06.10   0.8680A   2.0749   0.8099  -0.8958  0.083  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.845E-03  0.440E-04   31  31  10    2  17   8   15  16   9    0.000    0.000       0
+  0   2376 00:36:12.17   0.8640A   2.0824   0.7934  -0.9018  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.840E-03  0.434E-04   31  29  11    2  18   8   16  14   9    0.000    0.000       0
+  0   2383 00:36:18.21   0.8620A   2.0889   0.7516  -0.8990  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.848E-03  0.434E-04   31  30  16    2  19   8   16  14   9    0.000    0.000       0
+  0   2390 00:36:24.24   0.8610A   2.0914   0.7189  -0.8105  0.082  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.848E-03  0.465E-04   31  30  21    6  15   9   16  14   9    0.000    0.000       0
+  0   2397 00:36:30.27   0.8620A   2.0873   0.7195  -0.7351  0.082  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.839E-03  0.449E-04   32  29  26    3   2  24    8  11   8    0.000    0.000       0
+  0   2404 00:36:36.30   0.8620A   2.0886   0.7207  -0.6343  0.082  0.00   0.000E+00      0.  0.675E+00  0.107E+00  0.831E-03  0.418E-04   32  29  31    3   2  26    8  12   7    0.000    0.000       0
+  0   2411 00:36:42.34   0.8640A   2.0821   0.7622  -0.6382  0.081  0.00   0.000E+00      0.  0.674E+00  0.107E+00  0.841E-03  0.453E-04   32  29  36    4   3  29   11  16   8    0.000    0.000       0
+  0   2418 00:36:48.40   0.8670A   2.0759   0.7855   0.7025  0.081  0.00   0.000E+00      0.  0.673E+00  0.107E+00  0.851E-03  0.471E-04   34  28  39    4   4  31   11  30  38    0.000    0.000       0
+  0   2425 00:36:54.49   0.8720A   2.0648   0.7490   0.7542  0.080  0.00   0.000E+00      0.  0.673E+00  0.107E+00  0.857E-03  0.466E-04   34  28   5    4   5  33   12  30   0    0.000    0.000       0
+  0   2432 00:37:00.62   0.8790A   2.0476  -0.7984   0.7203  0.079  0.00   0.000E+00      0.  0.672E+00  0.107E+00  0.864E-03  0.487E-04   35  28   9   15  27   9   13  30   3    0.000    0.000       0
+  0   2439 00:37:06.78   0.8810A   2.0439  -0.8350  -0.7121  0.079  0.00   0.000E+00      0.  0.671E+00  0.107E+00  0.865E-03  0.485E-04   35  28  15   15  26   9   17  19   9    0.000    0.000       0
+  0   2445 00:37:12.08   0.8850A   2.0337  -0.7988  -0.7363  0.080  0.00   0.000E+00      0.  0.671E+00  0.107E+00  0.859E-03  0.479E-04   35  28  19   15  26   9   16  19   9    0.000    0.000       0
+  0   2452 00:37:18.29   0.8900A   2.0228  -0.6902  -0.6912  0.081  0.00   0.000E+00      0.  0.671E+00  0.107E+00  0.851E-03  0.487E-04   33  29  30   15  25   9   15  18   9    0.000    0.000       0
+  0   2459 00:37:24.53   0.8930A   2.0163  -0.6915   0.8138  0.082  0.00   0.000E+00      0.  0.670E+00  0.107E+00  0.856E-03  0.549E-04   33  29  36   13  21   8   20  28   9    0.000    0.000       0
+  0   2466 00:37:30.81   0.9010A   1.9987  -0.6917   0.7751  0.083  0.00   0.000E+00      0.  0.671E+00  0.108E+00  0.867E-03  0.602E-04   33  29   1   10  25   9   20  26   9    0.000    0.000       0
+  0   2472 00:37:36.24   0.9040A   1.9905  -0.7209  -0.6922  0.084  0.00   0.000E+00      0.  0.672E+00  0.109E+00  0.871E-03  0.590E-04   33  22  20   10  24   9   17  15   9    0.000    0.000       0
+  0   2479 00:37:42.56   0.9040A   1.9922  -0.6922  -0.7096  0.086  0.00   0.000E+00      0.  0.673E+00  0.110E+00  0.883E-03  0.576E-04   32  21  25    9  23   9   17  15   9    0.000    0.000       0
+  0   2485 00:37:48.00   0.9090A   1.9799  -0.8218   0.6992  0.088  0.00   0.000E+00      0.  0.674E+00  0.111E+00  0.906E-03  0.561E-04   33  21  30    5  27   8   20  11   9    0.000    0.000       0
+  0   2492 00:37:54.36   0.9070A   1.9847  -0.8735   0.7563  0.090  0.00   0.000E+00      0.  0.674E+00  0.111E+00  0.925E-03  0.557E-04   32  20  34    5  26   8   20  11   9    0.000    0.000       0
+  0   2499 00:38:00.71   0.9090A   1.9810  -0.8616   0.6462  0.092  0.00   0.000E+00      0.  0.674E+00  0.111E+00  0.912E-03  0.470E-04   33  20   0    5  26   9   21  11   9    0.000    0.000       0
+  0   2505 00:38:06.16   0.9090A   1.9812  -0.8746   0.6287  0.093  0.00   0.000E+00      0.  0.673E+00  0.111E+00  0.900E-03  0.429E-04   31  19   4    5  26   9   18  30   4    0.000    0.000       0
+  0   2512 00:38:12.53   0.9090A   1.9804  -0.7684   0.6372  0.094  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.913E-03  0.436E-04   33  31  39    5  25   9    8  30   3    0.000    0.000       0
+  0   2519 00:38:18.86   0.9030A   1.9934   0.7082   0.6998  0.094  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.903E-03  0.388E-04   33  31   5    4  13   8   20  30   9    0.000    0.000       0
+  0   2525 00:38:24.26   0.8980A   2.0037   0.7654   0.6810  0.095  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.898E-03  0.403E-04   33  31   9    3  13   9   10  30   7    0.000    0.000       0
+  0   2532 00:38:30.53   0.8950A   2.0120   0.8322   0.6981  0.096  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.893E-03  0.394E-04   33  31  15    3  14   9   11  31   9    0.000    0.000       0
+  0   2539 00:38:36.79   0.8960A   2.0095   0.8361  -0.7827  0.098  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.897E-03  0.453E-04   33  31  21    3  14   9   18  17   9    0.000    0.000       0
+  0   2545 00:38:42.15   0.8920A   2.0188  -0.7848  -0.9590  0.099  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.893E-03  0.526E-04   32  29  25    2  26   9   17  17   9    0.000    0.000       0
+  0   2552 00:38:48.37   0.8890A   2.0245  -0.8291  -0.9378  0.100  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.884E-03  0.560E-04   32  29  31    2  26   9   16  18   9    0.000    0.000       0
+  0   2559 00:38:54.64   0.8990A   2.0029  -0.8370  -0.8365  0.100  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.876E-03  0.518E-04   32  29  37    2  25   9   15  18   9    0.000    0.000       0
+  0   2565 00:39:00.03   0.9000A   1.9996  -0.7921  -0.7466  0.099  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.860E-03  0.464E-04   33  29   0    2  25   9   14  17   9    0.000    0.000       0
+  0   2572 00:39:06.34   0.9000A   1.9992  -0.7207  -0.6950  0.098  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.851E-03  0.440E-04   34  29   4    3  24   9   16  16   9    0.000    0.000       0
+  0   2579 00:39:12.63   0.8980A   2.0052  -0.6757  -0.8424  0.097  0.00   0.000E+00      0.  0.672E+00  0.110E+00  0.857E-03  0.420E-04   32  29  16    4  24   9   17  21   9    0.000    0.000       0
+  0   2586 00:39:18.89   0.8910A   2.0207  -0.6487  -1.0207  0.097  0.00   0.000E+00      0.  0.671E+00  0.110E+00  0.854E-03  0.373E-04   34  30  22    5  26   9   17  21   9    0.000    0.000       0
+  0   2592 00:39:24.22   0.8870A   2.0286   0.6124  -1.0635  0.097  0.00   0.000E+00      0.  0.670E+00  0.109E+00  0.847E-03  0.365E-04   34  30  27   23  29  19   16  20   9    0.000    0.000       0
+  0   2599 00:39:30.42   0.8850A   2.0331   0.6226  -1.0165  0.097  0.00   0.000E+00      0.  0.668E+00  0.108E+00  0.852E-03  0.388E-04   34  30  33   23  29  22   15  20   9    0.000    0.000       0
+  0   2606 00:39:36.62   0.8850A   2.0343   0.6701  -0.9017  0.096  0.00   0.000E+00      0.  0.668E+00  0.108E+00  0.858E-03  0.477E-04   34  29  38   23  29  26   14  19   9    0.000    0.000       0
+  0   2613 00:39:42.81   0.8840A   2.0367   0.7193  -0.8023  0.094  0.00   0.000E+00      0.  0.668E+00  0.109E+00  0.896E-03  0.707E-04   34  29   3   24  30  30   13  19   9    0.000    0.000       0
+  0   2619 00:39:48.13   0.8870A   2.0299   0.7504  -0.7948  0.093  0.00   0.000E+00      0.  0.669E+00  0.110E+00  0.914E-03  0.771E-04   34  29   8   24  30  33   13  17   8    0.000    0.000       0
+  0   2626 00:39:54.34   0.8900A   2.0225   0.7570   0.9101  0.091  0.00   0.000E+00      0.  0.670E+00  0.110E+00  0.910E-03  0.704E-04   34  29  13   24  31  37   20  28   9    0.000    0.000       0
+  0   2633 00:40:00.58   0.8910A   2.0202  -0.7710   0.9125  0.090  0.00   0.000E+00      0.  0.671E+00  0.111E+00  0.882E-03  0.589E-04   32  28  18   11  26   9   20  26   9    0.000    0.000       0
+  0   2640 00:40:06.81   0.8910A   2.0194  -0.8307   0.8917  0.090  0.00   0.000E+00      0.  0.672E+00  0.112E+00  0.893E-03  0.626E-04   28  26  14   10  27   9   20  25   9    0.000    0.000       0
+  0   2646 00:40:12.18   0.8940A   2.0125  -0.9105  -0.8307  0.090  0.00   0.000E+00      0.  0.673E+00  0.113E+00  0.908E-03  0.656E-04   32  28  29   10  26   9   14  17   9    0.000    0.000       0
+  0   2653 00:40:18.42   0.8910A   2.0196  -0.8955  -0.9117  0.091  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.909E-03  0.631E-04   32  28  34    9  26   8   16  24   7    0.000    0.000       0
+  0   2660 00:40:24.65   0.8890A   2.0242   1.0523  -0.9629  0.093  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.919E-03  0.608E-04   32  28   0   19  30   9   15  24   8    0.000    0.000       0
+  0   2667 00:40:30.88   0.8890A   2.0250  -0.8407  -1.0371  0.096  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.912E-03  0.565E-04   32  28   5   15  19   8   16  22   9    0.000    0.000       0
+  0   2673 00:40:36.22   0.8910A   2.0206   0.8085  -1.0511  0.098  0.00   0.000E+00      0.  0.674E+00  0.114E+00  0.905E-03  0.518E-04   32  28  10   14  31   9   15  20   9    0.000    0.000       0
+  0   2680 00:40:42.47   0.8960A   2.0086  -0.8155  -0.9563  0.099  0.00   0.000E+00      0.  0.672E+00  0.113E+00  0.891E-03  0.514E-04   32  28  15   14  27   6   15  18   9    0.000    0.000       0
+  0   2687 00:40:48.78   0.9050A   1.9886  -0.8158  -0.9898  0.098  0.00   0.000E+00      0.  0.672E+00  0.112E+00  0.893E-03  0.493E-04   32  28  21   15  27   7   12  26   8    0.000    0.000       0
+  0   2693 00:40:54.22   0.9050A   1.9881  -0.9371  -1.0080  0.097  0.00   0.000E+00      0.  0.671E+00  0.112E+00  0.889E-03  0.480E-04   31  27  18   15  26   8   11  27   9    0.000    0.000       0
+  0   2700 00:41:00.56   0.9070A   1.9843  -0.8720  -0.8811  0.096  0.00   0.000E+00      0.  0.670E+00  0.112E+00  0.882E-03  0.452E-04   31  27  23   16  26   9   10  27   9    0.000    0.000       0
+  0   2706 00:41:06.01   0.9090A   1.9804  -0.8480  -0.8632  0.095  0.00   0.000E+00      0.  0.669E+00  0.111E+00  0.879E-03  0.466E-04   30  19  20   16  25   9    9  27   9    0.000    0.000       0
+  0   2713 00:41:12.37   0.9080A   1.9830   0.9568  -0.7683  0.095  0.00   0.000E+00      0.  0.669E+00  0.111E+00  0.870E-03  0.448E-04   30  19  26   13  13   9    8  26   9    0.000    0.000       0
+  0   2720 00:41:18.74   0.9150A   1.9675   0.9458  -0.7388  0.094  0.00   0.000E+00      0.  0.668E+00  0.111E+00  0.865E-03  0.450E-04   30  19  31   12  14   9   10  16   7    0.000    0.000       0
+  0   2726 00:41:24.26   0.9180A   1.9607   0.8882  -0.7413  0.093  0.00   0.000E+00      0.  0.667E+00  0.110E+00  0.861E-03  0.499E-04   27  26  11   11  14   9    9  16   8    0.000    0.000       0
+  0   2733 00:41:30.70   0.9250A   1.9450   0.8645  -0.8045  0.092  0.00   0.000E+00      0.  0.667E+00  0.110E+00  0.864E-03  0.556E-04   27  26  17   10  14   9    8  17   8    0.000    0.000       0
+  0   2739 00:41:36.28   0.9350A   1.9251   0.8562  -0.7863  0.092  0.00   0.000E+00      0.  0.666E+00  0.110E+00  0.867E-03  0.537E-04   27  27  20    9  13   9    7  17   8    0.000    0.000       0
+  0   2746 00:41:42.82   0.9330A   1.9300   0.9145  -0.7335  0.092  0.00   0.000E+00      0.  0.666E+00  0.110E+00  0.865E-03  0.496E-04   30  25   7    9  14   9    6  18   7    0.000    0.000       0
+  0   2752 00:41:48.39   0.9250A   1.9459   0.9427  -0.8128  0.093  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.862E-03  0.481E-04   31  25  15    9  14   9   17  22   9    0.000    0.000       0
+  0   2759 00:41:54.86   0.9220A   1.9514   0.9749  -0.9137  0.095  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.866E-03  0.518E-04   31  25  20    9  14   9   17  21   9    0.000    0.000       0
+  0   2765 00:42:00.38   0.9210A   1.9553   0.9717  -0.9356  0.096  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.867E-03  0.574E-04   30  24  22    9  15   9   16  20   9    0.000    0.000       0
+  0   2772 00:42:06.83   0.9210A   1.9547   0.9355  -0.8771  0.097  0.00   0.000E+00      0.  0.665E+00  0.109E+00  0.864E-03  0.611E-04   30  25  30   10  16   9   15  19   9    0.000    0.000       0
+  0   2778 00:42:12.34   0.9170A   1.9629   0.9129  -0.7971  0.098  0.00   0.000E+00      0.  0.666E+00  0.109E+00  0.853E-03  0.562E-04   29  23  31   10  16   9   14  21   9    0.000    0.000       0
+  0   2785 00:42:18.75   0.9140A   1.9688   0.8905  -0.7572  0.098  0.00   0.000E+00      0.  0.667E+00  0.109E+00  0.841E-03  0.508E-04   29  23  37   10  17   9    6  13   9    0.000    0.000       0
+  0   2791 00:42:24.23   0.9160A   1.9647   0.8545  -0.7676  0.097  0.00   0.000E+00      0.  0.667E+00  0.109E+00  0.843E-03  0.507E-04   29  23   1    9  16   9    6  13   9    0.000    0.000       0
+  0   2798 00:42:30.64   0.9090A   1.9802  -0.8864  -0.7878  0.095  0.00   0.000E+00      0.  0.666E+00  0.109E+00  0.840E-03  0.498E-04   25  24  29   13  28   9    5  13   9    0.000    0.000       0
+  0   2804 00:42:36.08   0.9090A   1.9802  -1.0739  -0.7522  0.092  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.851E-03  0.511E-04   25  24  34   13  27   9    4  13   9    0.000    0.000       0
+  0   2811 00:42:42.45   0.9110A   1.9765  -1.1474   0.6859  0.090  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.857E-03  0.511E-04   24  24  38   12  27   9   16  28   9    0.000    0.000       0
+  0   2818 00:42:48.86   0.9180A   1.9599  -1.0490   0.6830  0.088  0.00   0.000E+00      0.  0.664E+00  0.107E+00  0.865E-03  0.564E-04   30  26   4   12  26   9   11  27   7    0.000    0.000       0
+  0   2824 00:42:54.42   0.9310A   1.9331  -0.8960   0.7526  0.088  0.00   0.000E+00      0.  0.665E+00  0.107E+00  0.889E-03  0.642E-04   33  37  16   11  26   9   20  28   9    0.000    0.000       0
+  0   2830 00:43:00.01   0.9330A   1.9303  -0.8062   0.6603  0.088  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.896E-03  0.630E-04   33  37  21   11  25   9   20  28   9    0.000    0.000       0
+  0   2837 00:43:06.54   0.9340A   1.9270  -0.7742   0.6292  0.090  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.882E-03  0.528E-04   32  38  25    6  26   9    8  19  30    0.000    0.000       0
+  0   2843 00:43:12.15   0.9360A   1.9236  -0.7480   0.6164  0.091  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.866E-03  0.454E-04   33  38  30    6  26   9    8  18  30    0.000    0.000       0
+  0   2850 00:43:18.65   0.9210A   1.9549   0.6636  -0.6306  0.093  0.00   0.000E+00      0.  0.665E+00  0.108E+00  0.839E-03  0.436E-04   27  22  39    8  17   9    8  17   4    0.000    0.000       0
+  0   2856 00:43:24.16   0.9180A   1.9606   0.7047  -0.7249  0.094  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.837E-03  0.470E-04   27  22   3   14  13   9   17  21   9    0.000    0.000       0
+  0   2863 00:43:30.60   0.9130A   1.9710   0.7926  -0.9437  0.096  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.840E-03  0.484E-04   27  26   1   10  14   9   17  22   9    0.000    0.000       0
+  0   2869 00:43:36.07   0.9100A   1.9772   0.9138  -1.0073  0.096  0.00   0.000E+00      0.  0.666E+00  0.108E+00  0.835E-03  0.445E-04   27  26   5    9  15   9   17  23   9    0.000    0.000       0
+  0   2876 00:43:42.46   0.9130A   1.9707   0.9951  -0.9376  0.094  0.00   0.000E+00      0.  0.664E+00  0.107E+00  0.825E-03  0.413E-04   28  25   9   10  15   9   16  22   9    0.000    0.000       0
+  0   2883 00:43:48.85   0.9110A   1.9750   0.9449  -0.8083  0.090  0.00   0.000E+00      0.  0.663E+00  0.106E+00  0.824E-03  0.462E-04   28  25  13   10  16   9   15  22   9    0.000    0.000       0
+  0   2889 00:43:54.33   0.9150A   1.9679   0.8607  -0.6989  0.086  0.00   0.000E+00      0.  0.663E+00  0.106E+00  0.844E-03  0.563E-04   28  25  17   10  17   9    4  13   9    0.000    0.000       0
+  0   2896 00:44:00.76   0.9240A   1.9488   0.8231   0.7392  0.083  0.00   0.000E+00      0.  0.662E+00  0.106E+00  0.859E-03  0.619E-04   28  25  22   10  16   8   20  28   9    0.000    0.000       0
+  0   2902 00:44:06.30   0.9210A   1.9540   0.7754  -0.7081  0.080  0.00   0.000E+00      0.  0.663E+00  0.106E+00  0.851E-03  0.627E-04   26  25  17   11  17   8    7  27   9    0.000    0.000       0
+  0   2909 00:44:12.75   0.9190A   1.9595   0.8688  -0.7694  0.079  0.00   0.000E+00      0.  0.664E+00  0.106E+00  0.845E-03  0.612E-04   29  25  31   20  31   9   13  14   4    0.000    0.000       0
+  0   2915 00:44:18.26   0.9200A   1.9564   0.7986  -0.7869  0.079  0.00   0.000E+00      0.  0.665E+00  0.107E+00  0.850E-03  0.619E-04   29  25  36   12  16   9   13  14   4    0.000    0.000       0
+  0   2922 00:44:24.73   0.9270A   1.9423  -0.7054  -0.7453  0.079  0.00   0.000E+00      0.  0.666E+00  0.107E+00  0.834E-03  0.513E-04   30  23   0    7  27   9   13  15   4    0.000    0.000       0
+  0   2928 00:44:30.30   0.9280A   1.9404  -0.7918  -0.7265  0.079  0.00   0.000E+00      0.  0.666E+00  0.107E+00  0.826E-03  0.476E-04   27  25  32    7  27   9   17  26   9    0.000    0.000       0
+  0   2935 00:44:36.70   0.9070A   1.9856  -0.8137  -0.6763  0.080  0.00   0.000E+00      0.  0.666E+00  0.106E+00  0.806E-03  0.454E-04   27  25  37    8  26   9   17  21   9    0.000    0.000       0
+  0   2941 00:44:42.10   0.8970A   2.0066  -0.7941  -0.7660  0.082  0.00   0.000E+00      0.  0.666E+00  0.106E+00  0.786E-03  0.378E-04   27  25   2    8  25   9   17  22   9    0.000    0.000       0
+  0   2948 00:44:48.40   0.9020A   1.9957  -0.7313  -0.8474  0.083  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.786E-03  0.375E-04   27  25   7    7  25   9   17  24   9    0.000    0.000       0
+  0   2955 00:44:54.77   0.9150A   1.9678  -0.6938  -0.7738  0.084  0.00   0.000E+00      0.  0.664E+00  0.104E+00  0.794E-03  0.401E-04   27  25  12    7  26   9   16  23   9    0.000    0.000       0
+  0   2961 00:45:00.30   0.9270A   1.9428  -0.7101  -0.6645  0.083  0.00   0.000E+00      0.  0.663E+00  0.103E+00  0.798E-03  0.398E-04   27  25  16    7  26   9   15  23   9    0.000    0.000       0
+  0   2968 00:45:06.84   0.9370A   1.9208  -0.7269   0.6170  0.083  0.00   0.000E+00      0.  0.662E+00  0.103E+00  0.817E-03  0.484E-04   34  32  22    7  26   9   21  31  13    0.000    0.000       0
+  0   2974 00:45:12.46   0.9370A   1.9201  -0.6747   0.6319  0.083  0.00   0.000E+00      0.  0.662E+00  0.103E+00  0.826E-03  0.563E-04   34  32  27    7  26   9   20  12   9    0.000    0.000       0
+  0   2980 00:45:18.11   0.9430A   1.9082   0.7125   0.6882  0.083  0.00   0.000E+00      0.  0.662E+00  0.103E+00  0.832E-03  0.611E-04   34  32  31   15  13   9   20  13   9    0.000    0.000       0
+  0   2987 00:45:24.75   0.9520A   1.8904   0.7900   0.6548  0.084  0.00   0.000E+00      0.  0.663E+00  0.104E+00  0.835E-03  0.640E-04   35  37  36   13  15   9   20  14   9    0.000    0.000       0
+  0   2993 00:45:30.44   0.9470A   1.8998   0.8201  -0.6737  0.085  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.822E-03  0.615E-04   29  33  31   13  15   9   17  21   9    0.000    0.000       0
+  0   2999 00:45:36.09   0.9390A   1.9171   0.8074  -0.8173  0.087  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.815E-03  0.558E-04   29  33  36   12  16   9   16  22   9    0.000    0.000       0
+  0   3006 00:45:42.61   0.9270A   1.9414   0.7602  -0.9038  0.088  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.806E-03  0.485E-04   29  32   3   11  17   9   16  22   9    0.000    0.000       0
+  0   3012 00:45:48.15   0.9210A   1.9546  -0.7050  -0.9843  0.090  0.00   0.000E+00      0.  0.666E+00  0.104E+00  0.796E-03  0.456E-04   29  32   7   11  27   9   16  22   9    0.000    0.000       0
+  0   3019 00:45:54.57   0.9140A   1.9702  -0.7163  -0.9239  0.091  0.00   0.000E+00      0.  0.665E+00  0.103E+00  0.780E-03  0.446E-04   29  33  12   11  26   9   15  21   9    0.000    0.000       0
+  0   3025 00:46:00.05   0.9130A   1.9725  -0.6661  -0.8335  0.092  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.765E-03  0.433E-04   29  33  16   11  26   9   15  20   9    0.000    0.000       0
+  0   3032 00:46:06.45   0.9170A   1.9625  -0.7133  -0.7475  0.092  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.758E-03  0.413E-04   29  34  21   11  27   9   16  19   9    0.000    0.000       0
+  0   3039 00:46:12.90   0.9250A   1.9464  -0.6896  -0.6864  0.091  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.769E-03  0.463E-04   29  34  26   10  26   9    5  22   8    0.000    0.000       0
+  0   3045 00:46:18.48   0.9350A   1.9259  -0.6181   0.7278  0.091  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.782E-03  0.518E-04   29  34  31   10  26   9   18  29   9    0.000    0.000       0
+  0   3051 00:46:24.13   0.9470A   1.9000  -0.6707   0.8312  0.092  0.00   0.000E+00      0.  0.664E+00  0.104E+00  0.807E-03  0.573E-04   30  22  14   17  27   9   19  28   9    0.000    0.000       0
+  0   3058 00:46:30.64   0.9140A   1.9695   0.7150   0.9470  0.092  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.788E-03  0.571E-04   28  29  12   23  30   5   21  26   9    0.000    0.000       0
+  0   3064 00:46:36.05   0.8950A   2.0118   0.7733   0.8816  0.092  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.773E-03  0.543E-04   29  28  16   23  31   7   21  26   9    0.000    0.000       0
+  0   3071 00:46:42.29   0.8910A   2.0201   0.7491  -0.8048  0.093  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.759E-03  0.486E-04   28  30  20   23  32  10   16  22   9    0.000    0.000       0
+  0   3078 00:46:48.56   0.8980A   2.0037   0.8159  -0.8745  0.094  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.765E-03  0.498E-04   29  29  24   20  31   8   15  21   9    0.000    0.000       0
+  0   3085 00:46:54.86   0.9020A   1.9964   0.9486  -0.9799  0.095  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.769E-03  0.459E-04   30  28  27   19  31   9   17  23   9    0.000    0.000       0
+  0   3091 00:47:00.27   0.9010A   1.9972   0.8723  -0.9994  0.094  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.773E-03  0.451E-04   30  28  31   19  31   9   16  23   9    0.000    0.000       0
+  0   3098 00:47:06.61   0.9100A   1.9775  -0.7941  -0.9520  0.093  0.00   0.000E+00      0.  0.665E+00  0.105E+00  0.792E-03  0.513E-04   28  23  36    7  27   9   15  22   9    0.000    0.000       0
+  0   3104 00:47:12.09   0.9140A   1.9684  -0.7578  -0.9351  0.092  0.00   0.000E+00      0.  0.666E+00  0.105E+00  0.793E-03  0.510E-04   26  33   0    7  26   9   15  22   9    0.000    0.000       0
+  0   3111 00:47:18.55   0.9320A   1.9305  -0.6830  -0.8675  0.091  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.798E-03  0.491E-04   26  33   5    8  25   9   14  21   9    0.000    0.000       0
+  0   3117 00:47:24.17   0.9330A   1.9285   0.7156  -0.8341  0.091  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.783E-03  0.462E-04   28  27  17   14  13   9   15  23   9    0.000    0.000       0
+  0   3124 00:47:30.69   0.9290A   1.9377   0.7314  -0.7489  0.090  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.776E-03  0.476E-04   28  27  22   14  14   9   14  22   9    0.000    0.000       0
+  0   3130 00:47:36.27   0.9290A   1.9370   0.7955  -0.6834  0.089  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.769E-03  0.462E-04   28  27  26   12  13   9   13  22   9    0.000    0.000       0
+  0   3137 00:47:42.76   0.9260A   1.9429  -0.8548   0.6596  0.088  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.752E-03  0.440E-04   29  27  31   12  26   9   20  27   9    0.000    0.000       0
+  0   3143 00:47:48.32   0.9200A   1.9556  -0.8518  -0.7120  0.087  0.00   0.000E+00      0.  0.665E+00  0.104E+00  0.741E-03  0.438E-04   29  20  19   12  27   9   10  22   8    0.000    0.000       0
+  0   3150 00:47:54.70   0.9080A   1.9816  -0.8815  -0.7659  0.086  0.00   0.000E+00      0.  0.665E+00  0.103E+00  0.723E-03  0.417E-04   30  21  25   12  26   9    8  21   8    0.000    0.000       0
+  0   3156 00:48:00.12   0.9010A   1.9979  -0.7898  -0.7491  0.085  0.00   0.000E+00      0.  0.665E+00  0.103E+00  0.709E-03  0.405E-04   30  21  29   11  25   9    7  21   7    0.000    0.000       0
+  0   3163 00:48:06.42   0.8970A   2.0057  -0.7130  -0.7890  0.085  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.710E-03  0.415E-04   30  20  34    9  25   9    7  18   8    0.000    0.000       0
+  0   3170 00:48:12.70   0.8990A   2.0013  -0.6451  -0.8306  0.086  0.00   0.000E+00      0.  0.664E+00  0.103E+00  0.715E-03  0.431E-04   30  20  39    7  23   8   17  19   9    0.000    0.000       0
+  0   3176 00:48:18.14   0.9110A   1.9769  -0.6126  -0.8970  0.087  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.723E-03  0.439E-04   30  20   3    7  24   9   16  19   9    0.000    0.000       0
+  0   3183 00:48:24.57   0.9220A   1.9524   0.5938  -0.8456  0.087  0.00   0.000E+00      0.  0.663E+00  0.102E+00  0.715E-03  0.425E-04   29  20   8   21  31  15    3  18   7    0.000    0.000       0
+  0   3189 00:48:30.07   0.9120A   1.9743  -0.6205  -0.8372  0.087  0.00   0.000E+00      0.  0.663E+00  0.102E+00  0.710E-03  0.486E-04   28  19  12    1  16   6    3  18   7    0.000    0.000       0
+  0   3196 00:48:36.44   0.9120A   1.9742  -0.6659  -0.8022  0.086  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.707E-03  0.506E-04   28  19  17    1  16   6    3  18   8    0.000    0.000       0
+  0   3203 00:48:42.90   0.9330A   1.9282  -0.6515  -0.7642  0.087  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.709E-03  0.406E-04   28  19  22    1  15   6   15  23   9    0.000    0.000       0
+  0   3209 00:48:48.56   0.9470A   1.9002  -0.6238  -0.7331  0.087  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.722E-03  0.396E-04   29  25   1    1  14   6   13  22   8    0.000    0.000       0
+  0   3215 00:48:54.27   0.9540A   1.8875  -0.6726  -0.7276  0.087  0.00   0.000E+00      0.  0.664E+00  0.101E+00  0.729E-03  0.416E-04   34  28  31   15  28   9   12  22   8    0.000    0.000       0
+  0   3222 00:49:00.95   0.9540A   1.8872  -0.8243  -0.6708  0.086  0.00   0.000E+00      0.  0.664E+00  0.101E+00  0.729E-03  0.470E-04   32  24  36   16  27   9   11  21   8    0.000    0.000       0
+  0   3228 00:49:06.66   0.9510A   1.8934  -0.8526  -0.6728  0.085  0.00   0.000E+00      0.  0.664E+00  0.102E+00  0.748E-03  0.590E-04   32  24   0   17  26   9   10  21   7    0.000    0.000       0
+  0   3234 00:49:12.34   0.9430A   1.9081  -0.9061  -0.6503  0.084  0.00   0.000E+00      0.  0.665E+00  0.102E+00  0.750E-03  0.610E-04   25  20  17   15  26   9    9  20   7    0.000    0.000       0
+  0   3241 00:49:18.93   0.9440A   1.9074  -0.9541   0.7371  0.082  0.00   0.000E+00      0.  0.666E+00  0.102E+00  0.770E-03  0.603E-04   25  20  21   14  25   9   20  27   9    0.000    0.000       0
+  0   3247 00:49:24.58   0.9390A   1.9174  -0.9178  -0.8660  0.081  0.00   0.000E+00      0.  0.666E+00  0.103E+00  0.781E-03  0.592E-04   26  19   2   11  24   9    7  29   9    0.000    0.000       0
+  0   3253 00:49:30.23   0.9470A   1.9004  -0.9418  -0.8454  0.082  0.00   0.000E+00      0.  0.666E+00  0.103E+00  0.806E-03  0.611E-04   25  13  17   10  23   9    6  28   9    0.000    0.000       0
+  0   3260 00:49:36.81   0.9370A   1.9214  -0.9478  -0.8051  0.083  0.00   0.000E+00      0.  0.667E+00  0.103E+00  0.803E-03  0.581E-04   25  13  22   19  10   9    6  27   9    0.000    0.000       0
+  0   3266 00:49:42.44   0.9410A   1.9122  -0.9134  -0.8141  0.084  0.00   0.000E+00      0.  0.666E+00  0.102E+00  0.783E-03  0.501E-04   25  13  27   10  22   9   17  14   9    0.000    0.000       0
+  0   3272 00:49:48.13   0.9560A   1.8838  -0.8301  -0.7552  0.084  0.00   0.000E+00      0.  0.666E+00  0.102E+00  0.798E-03  0.557E-04   25  13  31   10  22   9   16  14   9    0.000    0.000       0
+  0   3279 00:49:54.80   0.9450A   1.9040  -0.7179  -0.6998  0.083  0.00   0.000E+00      0.  0.667E+00  0.102E+00  0.785E-03  0.562E-04   24  18  27    9  20   9   11  22   5    0.000    0.000       0
+  0   3285 00:50:00.46   0.9450A   1.9055  -0.6728  -0.6775  0.082  0.00   0.000E+00      0.  0.667E+00  0.102E+00  0.766E-03  0.527E-04   24  18  31   23  26  12   10  22   5    0.000    0.000       0
+  0   3291 00:50:06.13   0.9390A   1.9176   0.7308  -0.6600  0.081  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.745E-03  0.477E-04   23  17  36   13  13   9    9  22   5    0.000    0.000       0
+  0   3298 00:50:12.73   0.9520A   1.8904   0.6983  -0.6354  0.080  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.747E-03  0.483E-04   36  22  18   12  14   9    8  22   5    0.000    0.000       0
+  0   3304 00:50:18.43   0.9490A   1.8966  -0.7102  -0.6071  0.079  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.759E-03  0.517E-04   36  22  23   10  27   9    7  22   5    0.000    0.000       0
+  0   3310 00:50:24.11   0.9460A   1.9019  -0.8168  -0.6072  0.079  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.767E-03  0.518E-04   36  22  27   10  26   9   17  18   8    0.000    0.000       0
+  0   3317 00:50:30.74   0.9470A   1.9009  -0.8436  -0.9059  0.080  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.761E-03  0.474E-04   36  22  33   10  25   9   17  17   9    0.000    0.000       0
+  0   3323 00:50:36.41   0.9450A   1.9051  -0.8131  -0.8662  0.080  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.752E-03  0.476E-04   36  21  38   10  25   9   16  17   9    0.000    0.000       0
+  0   3329 00:50:42.07   0.9390A   1.9169  -0.7843  -0.7276  0.079  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.752E-03  0.534E-04   35  23   1   10  24   9   15  17   9    0.000    0.000       0
+  0   3336 00:50:48.63   0.9360A   1.9237  -0.7176  -0.5727  0.078  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.748E-03  0.535E-04   35  23   7   10  24   9   14  17   9    0.000    0.000       0
+  0   3342 00:50:54.25   0.9360A   1.9223  -0.6441  -0.6299  0.078  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.752E-03  0.526E-04   35  23  12   10  24   9   17  21   9    0.000    0.000       0
+  0   3349 00:51:00.80   0.9350A   1.9259   0.6839  -0.8616  0.077  0.00   0.000E+00      0.  0.668E+00  0.102E+00  0.760E-03  0.535E-04   34  24  16   12  13   9   17  22   9    0.000    0.000       0
+  0   3355 00:51:06.39   0.9300A   1.9352   0.7883  -0.9278  0.076  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.756E-03  0.527E-04   34  24  21   12  14   9   16  22   9    0.000    0.000       0
+  0   3362 00:51:12.90   0.9300A   1.9358   0.7726  -0.8681  0.076  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.760E-03  0.535E-04   34  24  27   11  15   9   16  23   9    0.000    0.000       0
+  0   3368 00:51:18.44   0.9190A   1.9583   0.8037  -0.7944  0.075  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.749E-03  0.505E-04   33  28   0   10  14   8   15  23   9    0.000    0.000       0
+  0   3375 00:51:24.85   0.9120A   1.9745   0.9026  -0.6637  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.738E-03  0.496E-04   33  28   5    9  15   8   14  23   9    0.000    0.000       0
+  0   3381 00:51:30.31   0.9100A   1.9783   0.9025  -0.6426  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.729E-03  0.497E-04   34  28   9    8  15   8    7  17   4    0.000    0.000       0
+  0   3388 00:51:36.70   0.9160A   1.9646   0.8156  -0.5941  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.726E-03  0.503E-04   34  28  14    7  16   8   10  16   0    0.000    0.000       0
+  0   3394 00:51:42.23   0.9260A   1.9429   0.7249   0.6261  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.722E-03  0.490E-04   34  28  19    6  14   9   11  10  35    0.000    0.000       0
+  0   3401 00:51:48.77   0.9350A   1.9255   0.6780   0.6355  0.076  0.00   0.000E+00      0.  0.671E+00  0.102E+00  0.731E-03  0.491E-04   33  25  19   11  15   9   11  10  36    0.000    0.000       0
+  0   3407 00:51:54.37   0.9310A   1.9334  -0.6834   0.6541  0.075  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.741E-03  0.494E-04   34  25  24   14  26   9   12  10  37    0.000    0.000       0
+  0   3414 00:52:00.85   0.9220A   1.9522  -0.7981   0.6452  0.075  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.745E-03  0.486E-04   34  26  30   12  27   9   20  26   9    0.000    0.000       0
+  0   3420 00:52:06.36   0.9140A   1.9699  -0.8996  -0.6118  0.075  0.00   0.000E+00      0.  0.671E+00  0.103E+00  0.747E-03  0.487E-04   34  26  35   11  27   9   10  12   9    0.000    0.000       0
+  0   3427 00:52:12.73   0.9090A   1.9795  -0.9168  -0.6170  0.075  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.743E-03  0.481E-04   34  26   1   11  26   9   10  13   9    0.000    0.000       0
+  0   3433 00:52:18.19   0.9100A   1.9778  -0.8892  -0.6238  0.075  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.745E-03  0.495E-04   34  25   5   11  26   9   17  19   9    0.000    0.000       0
+  0   3440 00:52:24.55   0.9060A   1.9858  -0.8362  -0.6674  0.077  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.735E-03  0.488E-04   34  25  11   10  26   9   17  20   9    0.000    0.000       0
+  0   3447 00:52:30.88   0.9030A   1.9934   0.8693  -0.6893  0.077  0.00   0.000E+00      0.  0.669E+00  0.102E+00  0.721E-03  0.493E-04   34  25  16   13  14   9   17  21   9    0.000    0.000       0
+  0   3453 00:52:36.30   0.9030A   1.9932   0.8318  -0.6546  0.078  0.00   0.000E+00      0.  0.669E+00  0.103E+00  0.726E-03  0.561E-04   34  25  21   13  15   9    5  20   8    0.000    0.000       0
+  0   3460 00:52:42.63   0.9060A   1.9878   0.7809  -0.6750  0.080  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.736E-03  0.573E-04   34  25  26   14  16   9    5  19   8    0.000    0.000       0
+  0   3466 00:52:48.07   0.9090A   1.9807   0.7471  -0.7102  0.079  0.00   0.000E+00      0.  0.670E+00  0.103E+00  0.743E-03  0.580E-04   34  25  31   15  16   9    5  19   8    0.000    0.000       0
+  0   3473 00:52:54.46   0.9160A   1.9658   0.6818   0.8278  0.079  0.00   0.000E+00      0.  0.671E+00  0.104E+00  0.756E-03  0.612E-04   34  25  37   14  14   9   20  13   9    0.000    0.000       0
+  0   3480 00:53:00.90   0.9240A   1.9482   0.7914   0.7347  0.078  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.768E-03  0.604E-04   34  25   2   13  14   9   20  14   9    0.000    0.000       0
+  0   3486 00:53:06.46   0.9300A   1.9358   0.9293  -0.6643  0.078  0.00   0.000E+00      0.  0.673E+00  0.105E+00  0.769E-03  0.514E-04   34  25   8   12  15   9    3  20   8    0.000    0.000       0
+  0   3492 00:53:12.05   0.9320A   1.9317   1.0176  -0.7141  0.077  0.00   0.000E+00      0.  0.673E+00  0.104E+00  0.771E-03  0.455E-04   34  24  11   11  16   9    7  12   9    0.000    0.000       0
+  0   3499 00:53:18.58   0.9330A   1.9294   1.0084  -0.6267  0.078  0.00   0.000E+00      0.  0.672E+00  0.104E+00  0.779E-03  0.468E-04   34  24  17   11  17   9    6  13   9    0.000    0.000       0
+  0   3505 00:53:24.19   0.9360A   1.9232   0.9300  -0.5741  0.078  0.00   0.000E+00      0.  0.672E+00  0.103E+00  0.775E-03  0.452E-04   34  24  22   11  18   9   13  16   1    0.000    0.000       0
+  0   3512 00:53:30.76   0.9380A   1.9192   0.8014  -0.6229  0.078  0.00   0.000E+00      0.  0.671E+00  0.102E+00  0.766E-03  0.432E-04   33  22  27   10  19   9   12  16   1    0.000    0.000       0
+  0   3518 00:53:36.39   0.9380A   1.9198   0.6975  -0.6117  0.078  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.764E-03  0.464E-04   33  22  32    8  19   9   11  16   1    0.000    0.000       0
+  0   3525 00:53:42.91   0.9230A   1.9500   0.6066  -0.6448  0.079  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.756E-03  0.462E-04   26  17  18    6  18   9   17  15   9    0.000    0.000       0
+  0   3531 00:53:48.42   0.9170A   1.9620  -0.6078  -0.7102  0.080  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.746E-03  0.438E-04   26  17  22   19   9   9   17  24   9    0.000    0.000       0
+  0   3538 00:53:54.85   0.9210A   1.9536  -0.5513  -0.6907  0.081  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.742E-03  0.454E-04   26  17  27   19  10   9   16  23   9    0.000    0.000       0
+  0   3544 00:54:00.41   0.9320A   1.9316  -0.4960  -0.6179  0.081  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.761E-03  0.547E-04   26  17  31   21   9  15   16  23   9    0.000    0.000       0
+  0   3550 00:54:06.02   0.9310A   1.9344  -0.6046  -0.7698  0.081  0.00   0.000E+00      0.  0.669E+00  0.101E+00  0.780E-03  0.647E-04   24  19  37   17  27   8   18  18   9    0.000    0.000       0
+  0   3557 00:54:12.50   0.9240A   1.9489  -0.7250   0.9062  0.081  0.00   0.000E+00      0.  0.670E+00  0.102E+00  0.786E-03  0.680E-04   24  19   2   17  27   9   20  28   9    0.000    0.000       0
+  0   3563 00:54:18.01   0.9160A   1.9648  -0.7503  -0.8582  0.080  0.00   0.000E+00      0.  0.671E+00  0.102E+00  0.773E-03  0.641E-04   26  21   6   17  26   9   16  19   9    0.000    0.000       0
+  0   3570 00:54:24.38   0.9070A   1.9844   0.7303  -0.7494  0.080  0.00   0.000E+00      0.  0.672E+00  0.102E+00  0.770E-03  0.617E-04   26  21  10   13  13   9   15  17   9    0.000    0.000       0
+  0   3577 00:54:30.71   0.8990A   2.0032   0.8631   0.7745  0.079  0.00   0.000E+00      0.  0.673E+00  0.102E+00  0.779E-03  0.634E-04   24  18  14   13  13   9   20  10   9    0.000    0.000       0
+  0   3583 00:54:36.07   0.8920A   2.0176   0.9562   0.8123  0.078  0.00   0.000E+00      0.  0.673E+00  0.102E+00  0.784E-03  0.610E-04   24  18  18   12  13   9   20  11   9    0.000    0.000       0
+  0   3590 00:54:42.34   0.9010A   1.9988   1.1048   0.7596  0.076  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.811E-03  0.599E-04   24  18  23   11  14   9   20  11   9    0.000    0.000       0
+  0   3597 00:54:48.71   0.9190A   1.9578   1.1422   0.7696  0.075  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.844E-03  0.664E-04   25  19  28   11  15   9    9  29   0    0.000    0.000       0
+  0   3603 00:54:54.29   0.9330A   1.9296   1.1015   0.8072  0.074  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.877E-03  0.729E-04   27  18  32   11  16   9    9  29   0    0.000    0.000       0
+  0   3610 00:55:00.81   0.9300A   1.9354   1.0058   0.7863  0.074  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.870E-03  0.691E-04   27  18  38   11  17   9   10  29   1    0.000    0.000       0
+  0   3616 00:55:06.39   0.9290A   1.9378   0.9101   0.7409  0.075  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.853E-03  0.644E-04   27  18   3   19  30   9   11  29   1    0.000    0.000       0
+  0   3623 00:55:12.89   0.9290A   1.9375   0.9097   0.7824  0.077  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.843E-03  0.600E-04   27  18   9   11  15   9   20  29   8    0.000    0.000       0
+  0   3629 00:55:18.48   0.9320A   1.9319   0.9795  -0.8348  0.078  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.846E-03  0.635E-04   27  18  14   10  16   9   18  20   9    0.000    0.000       0
+  0   3635 00:55:24.10   0.9430A   1.9093   0.9563  -0.9133  0.079  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.853E-03  0.649E-04   27  18  19   10  17   9   17  20   9    0.000    0.000       0
+  0   3642 00:55:30.75   0.9520A   1.8915   0.8577  -0.8895  0.079  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.850E-03  0.576E-04   28  16  26    8  16   9   17  18   9    0.000    0.000       0
+  0   3648 00:55:36.46   0.9500A   1.8944   0.8303  -0.8418  0.079  0.00   0.000E+00      0.  0.675E+00  0.101E+00  0.828E-03  0.508E-04   31   6  16    8  17   9   16  18   9    0.000    0.000       0
+  0   3654 00:55:42.15   0.9470A   1.9001   0.7872  -0.7315  0.078  0.00   0.000E+00      0.  0.674E+00  0.100E+00  0.829E-03  0.550E-04   31   6  21    7  18   9   15  18   9    0.000    0.000       0
+  0   3661 00:55:48.78   0.9480A   1.8982   0.7288   0.8007  0.077  0.00   0.000E+00      0.  0.674E+00  0.999E-01  0.841E-03  0.649E-04   31   6  26    9  19   8   20  27   9    0.000    0.000       0
+  0   3667 00:55:54.44   0.9370A   1.9220  -0.7299   0.8065  0.076  0.00   0.000E+00      0.  0.674E+00  0.100E+00  0.833E-03  0.714E-04   26  25  31   16  26   9   20  10   9    0.000    0.000       0
+  0   3673 00:56:00.02   0.9270A   1.9413  -0.7810   0.7578  0.075  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.817E-03  0.696E-04   26  25  35   16  26   9   20  11   9    0.000    0.000       0
+  0   3680 00:56:06.49   0.9230A   1.9512  -0.8594  -0.6773  0.075  0.00   0.000E+00      0.  0.675E+00  0.101E+00  0.804E-03  0.644E-04   28  16  17   15  25   9   12  26   9    0.000    0.000       0
+  0   3686 00:56:12.04   0.9270A   1.9414  -0.8152  -0.6914  0.076  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.808E-03  0.644E-04   28  15  22   15  24   9   11  25   9    0.000    0.000       0
+  0   3693 00:56:18.51   0.9230A   1.9497  -0.8357  -0.7227  0.077  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.804E-03  0.649E-04   29  16  28   14  26   9   17  21   9    0.000    0.000       0
+  0   3699 00:56:24.06   0.9260A   1.9435  -0.9081  -0.9101  0.079  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.822E-03  0.666E-04   29  16  33   12  26   9   16  20   9    0.000    0.000       0
+  0   3706 00:56:30.57   0.9310A   1.9325  -0.9532  -1.0230  0.079  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.848E-03  0.634E-04   27  25  16   10  25   9   15  19   9    0.000    0.000       0
+  0   3712 00:56:36.19   0.9390A   1.9178  -0.9873  -0.9928  0.079  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.884E-03  0.658E-04   27  25  20    8  23   8   14  18   9    0.000    0.000       0
+  0   3719 00:56:42.72   0.9270A   1.9409  -0.9593  -0.9463  0.080  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.890E-03  0.681E-04   26  28   9    7  23   8   11  18   8    0.000    0.000       0
+  0   3725 00:56:48.27   0.9240A   1.9486  -0.8262  -0.9215  0.080  0.00   0.000E+00      0.  0.679E+00  0.104E+00  0.895E-03  0.673E-04   29  16  17   22  25   5   10  18   8    0.000    0.000       0
+  0   3732 00:56:54.70   0.9120A   1.9726  -0.8630   1.0749  0.080  0.00   0.000E+00      0.  0.678E+00  0.104E+00  0.900E-03  0.683E-04   26  23  14   22  24   7   21  27   9    0.000    0.000       0
+  0   3738 00:57:00.15   0.9090A   1.9807   0.8960  -0.9378  0.080  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.902E-03  0.691E-04   26  23  18   10  14   8    7  18   8    0.000    0.000       0
+  0   3745 00:57:06.49   0.9020A   1.9966  -0.9541  -0.9825  0.080  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.908E-03  0.714E-04   25  24  22   21  23   8    6  18   7    0.000    0.000       0
+  0   3752 00:57:12.74   0.8860A   2.0319   0.8525  -0.9008  0.080  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.901E-03  0.755E-04   25  23  26    9  14   9    4  18   6    0.000    0.000       0
+  0   3758 00:57:18.04   0.8840A   2.0365   0.8163  -0.8214  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.896E-03  0.752E-04   25  23  31    9  14   9    4  19   7    0.000    0.000       0
+  0   3765 00:57:24.24   0.8890A   2.0242   0.8245  -0.7543  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.878E-03  0.643E-04   25  23  36   10  14   9    4  18   8    0.000    0.000       0
+  0   3772 00:57:30.52   0.9040A   1.9909  -0.8419  -0.7575  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.873E-03  0.540E-04   25  23   0    1  16   8    9  16   2    0.000    0.000       0
+  0   3778 00:57:36.01   0.9180A   1.9611  -0.8840  -0.7803  0.080  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.880E-03  0.540E-04   29  29   6    1  15   8    8  16   2    0.000    0.000       0
+  0   3785 00:57:42.46   0.9230A   1.9507  -0.8653  -0.7509  0.082  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.882E-03  0.544E-04   29  29  11    1  14   8    7  16   2    0.000    0.000       0
+  0   3792 00:57:48.91   0.9220A   1.9519  -0.8137  -0.7421  0.083  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.888E-03  0.583E-04   31  31  17    1  13   9    8  17   2    0.000    0.000       0
+  0   3798 00:57:54.44   0.9210A   1.9535   0.7666  -0.7337  0.083  0.00   0.000E+00      0.  0.680E+00  0.103E+00  0.908E-03  0.673E-04   31  31  21   10  16   9    8  17   3    0.000    0.000       0
+  0   3805 00:58:00.90   0.9190A   1.9586  -0.8343   0.8033  0.083  0.00   0.000E+00      0.  0.682E+00  0.103E+00  0.910E-03  0.660E-04   30  28  22    7  25   9   20  11   9    0.000    0.000       0
+  0   3811 00:58:06.41   0.9190A   1.9590  -0.8819  -0.7724  0.084  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.909E-03  0.618E-04   25  26   0   11  26   9    7  17   3    0.000    0.000       0
+  0   3818 00:58:12.80   0.9130A   1.9725  -0.8680  -0.7799  0.086  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.908E-03  0.560E-04   25  26   5   11  25   9    3  27   9    0.000    0.000       0
+  0   3824 00:58:18.28   0.9160A   1.9654  -0.8047  -0.8174  0.086  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.915E-03  0.556E-04   25  26  10   10  25   9    3  28   9    0.000    0.000       0
+  0   3831 00:58:24.71   0.9210A   1.9537  -0.8419  -0.7860  0.086  0.00   0.000E+00      0.  0.683E+00  0.102E+00  0.903E-03  0.529E-04   31  28   1    8  25   9    3  27   9    0.000    0.000       0
+  0   3837 00:58:30.26   0.9270A   1.9418  -0.8698  -0.6611  0.085  0.00   0.000E+00      0.  0.683E+00  0.102E+00  0.896E-03  0.513E-04   28  21  20    8  25   9    4  17   0    0.000    0.000       0
+  0   3844 00:58:36.73   0.9240A   1.9487   0.9811  -0.8111  0.083  0.00   0.000E+00      0.  0.683E+00  0.101E+00  0.899E-03  0.544E-04   28  21  25    9  14   9    4  10   9    0.000    0.000       0
+  0   3850 00:58:42.28   0.9240A   1.9472   0.9592  -0.8845  0.082  0.00   0.000E+00      0.  0.682E+00  0.101E+00  0.904E-03  0.554E-04   28  21  29    8  15   9    4  10   9    0.000    0.000       0
+  0   3857 00:58:48.78   0.9320A   1.9308   0.8540  -0.9186  0.082  0.00   0.000E+00      0.  0.682E+00  0.100E+00  0.924E-03  0.589E-04   28  21  34    8  16   9    3  11   9    0.000    0.000       0
+  0   3863 00:58:54.39   0.9360A   1.9223  -0.7407  -0.9001  0.082  0.00   0.000E+00      0.  0.682E+00  0.100E+00  0.932E-03  0.603E-04   25  26  28    8  24   9    3  11   9    0.000    0.000       0
+  0   3869 00:59:00.01   0.9380A   1.9194  -0.7368  -0.8127  0.082  0.00   0.000E+00      0.  0.682E+00  0.100E+00  0.920E-03  0.612E-04   34  20  36    7  25   9   17  21   9    0.000    0.000       0
+  0   3876 00:59:06.57   0.9340A   1.9266   0.8774   0.7789  0.082  0.00   0.000E+00      0.  0.684E+00  0.101E+00  0.931E-03  0.692E-04   25  25  38   12  14   9   20  27   8    0.000    0.000       0
+  0   3882 00:59:12.19   0.9380A   1.9180   0.9730  -0.8740  0.083  0.00   0.000E+00      0.  0.685E+00  0.101E+00  0.934E-03  0.686E-04   34  27   0   12  16   9    8  12   9    0.000    0.000       0
+  0   3889 00:59:18.75   0.9360A   1.9221   0.9662  -0.9514  0.084  0.00   0.000E+00      0.  0.686E+00  0.102E+00  0.929E-03  0.634E-04   34  27   6   11  17   9    7  13   9    0.000    0.000       0
+  0   3895 00:59:24.36   0.9320A   1.9318  -0.9675  -0.9293  0.084  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.930E-03  0.632E-04   33  31   6   10  26   9    6  12   9    0.000    0.000       0
+  0   3902 00:59:30.86   0.9270A   1.9421  -0.9623  -0.8648  0.083  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.915E-03  0.614E-04   33  31  12    9  25   9    6  13   9    0.000    0.000       0
+  0   3908 00:59:36.42   0.9250A   1.9449   0.9034  -0.7824  0.081  0.00   0.000E+00      0.  0.687E+00  0.100E+00  0.898E-03  0.580E-04   33  31  17   11  14   9    5  14   9    0.000    0.000       0
+  0   3915 00:59:42.90   0.9280A   1.9387   0.9744   0.6989  0.080  0.00   0.000E+00      0.  0.686E+00  0.996E-01  0.890E-03  0.576E-04   33  31  22   11  15   9   16  14   9    0.000    0.000       0
+  0   3921 00:59:48.44   0.9170A   1.9625   0.9162  -0.6614  0.078  0.00   0.000E+00      0.  0.685E+00  0.992E-01  0.881E-03  0.587E-04   26  24  33   10  16   9   15  15   5    0.000    0.000       0
+  0   3928 00:59:54.81   0.9080A   1.9823   0.8046  -0.6534  0.076  0.00   0.000E+00      0.  0.685E+00  0.991E-01  0.871E-03  0.587E-04   26  24  38   10  17   9    5  28   9    0.000    0.000       0
+  0   3934 01:00:00.27   0.9130A   1.9718   0.7509  -0.7137  0.076  0.00   0.000E+00      0.  0.685E+00  0.991E-01  0.885E-03  0.597E-04   26  24   3   16  17   8   11  16   4    0.000    0.000       0
+  0   3941 01:00:06.69   0.9180A   1.9600  -0.7249  -0.7548  0.076  0.00   0.000E+00      0.  0.685E+00  0.994E-01  0.899E-03  0.596E-04   30  31  14   13  26   9   10  16   4    0.000    0.000       0
+  0   3947 01:00:12.19   0.9170A   1.9639  -0.7130  -0.7355  0.077  0.00   0.000E+00      0.  0.685E+00  0.999E-01  0.913E-03  0.626E-04   30  31  19   14  25   9    9  16   4    0.000    0.000       0
+  0   3954 01:00:18.59   0.9120A   1.9738  -0.7440   0.7898  0.079  0.00   0.000E+00      0.  0.686E+00  0.101E+00  0.924E-03  0.645E-04   26  18  29   23  26   4   22  29   8    0.000    0.000       0
+  0   3960 01:00:24.05   0.9080A   1.9817  -0.7770   0.8833  0.080  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.936E-03  0.667E-04   25  17  33   10  26   9   22  29   9    0.000    0.000       0
+  0   3967 01:00:30.38   0.9080A   1.9814   0.9394   0.8105  0.081  0.00   0.000E+00      0.  0.688E+00  0.102E+00  0.947E-03  0.671E-04   25  18  39   20  25   9   20  26   9    0.000    0.000       0
+  0   3974 01:00:36.79   0.9190A   1.9584  -0.9821   0.9080  0.081  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.982E-03  0.661E-04   32  20  19    9  26   9   20  11   9    0.000    0.000       0
+  0   3980 01:00:42.28   0.9140A   1.9700  -0.9639   0.8888  0.080  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.976E-03  0.595E-04   35  26  24    9  26   9   21  12   9    0.000    0.000       0
+  0   3987 01:00:48.66   0.9100A   1.9782  -0.8816  -0.6928  0.078  0.00   0.000E+00      0.  0.688E+00  0.101E+00  0.957E-03  0.551E-04   29  31  27    9  25   9   13  26   1    0.000    0.000       0
+  0   3993 01:00:54.09   0.8990A   2.0025  -0.7960  -0.6778  0.077  0.00   0.000E+00      0.  0.687E+00  0.101E+00  0.930E-03  0.525E-04   29  31  31    8  24   9   10  16   8    0.000    0.000       0
+  0   4000 01:01:00.36   0.8930A   2.0167  -0.7327  -0.8670  0.076  0.00   0.000E+00      0.  0.686E+00  0.100E+00  0.916E-03  0.538E-04   29  31  36   20  23   4   17  16   9    0.000    0.000       0
+  0   4007 01:01:06.63   0.9010A   1.9989  -0.7903  -0.9007  0.075  0.00   0.000E+00      0.  0.685E+00  0.992E-01  0.912E-03  0.525E-04   29  31   1   20  22   6   17  16   9    0.000    0.000       0
+  0   4013 01:01:12.03   0.9020A   1.9946  -0.7496  -0.8065  0.076  0.00   0.000E+00      0.  0.684E+00  0.983E-01  0.904E-03  0.494E-04   34  24   5   19  22   6   15  17   9    0.000    0.000       0
+  0   4020 01:01:18.34   0.8990A   2.0026   0.7435  -0.8332  0.077  0.00   0.000E+00      0.  0.683E+00  0.977E-01  0.893E-03  0.496E-04   28  22   6    6  13   9   15  28   7    0.000    0.000       0
+  0   4027 01:01:24.62   0.8940A   2.0134   0.7887  -0.9947  0.079  0.00   0.000E+00      0.  0.682E+00  0.975E-01  0.905E-03  0.576E-04   28  22  11    6  14   9   14  28   8    0.000    0.000       0
+  0   4034 01:01:30.89   0.9010A   1.9988   0.7392   0.9547  0.080  0.00   0.000E+00      0.  0.682E+00  0.980E-01  0.948E-03  0.722E-04   28  22  16    7  15   9   20  28   9    0.000    0.000       0
+  0   4040 01:01:36.30   0.9040A   1.9903  -0.7995   0.8928  0.081  0.00   0.000E+00      0.  0.683E+00  0.986E-01  0.952E-03  0.684E-04   25  22  17   15  28   8   20  28   9    0.000    0.000       0
+  0   4047 01:01:42.64   0.9050A   1.9888  -0.9682  -0.9023  0.083  0.00   0.000E+00      0.  0.684E+00  0.990E-01  0.948E-03  0.614E-04   32  21  36   13  28   9   14  21   9    0.000    0.000       0
+  0   4053 01:01:48.07   0.9040A   1.9911  -0.9519  -0.9057  0.085  0.00   0.000E+00      0.  0.684E+00  0.990E-01  0.926E-03  0.502E-04   30  20  36   13  27   9   15  21   9    0.000    0.000       0
+  0   4060 01:01:54.39   0.9000A   2.0009  -0.8502  -0.9204  0.087  0.00   0.000E+00      0.  0.684E+00  0.986E-01  0.904E-03  0.425E-04   30  19   1   12  26   9   14  21   9    0.000    0.000       0
+  0   4067 01:02:00.67   0.8960A   2.0086  -0.7493  -0.8759  0.089  0.00   0.000E+00      0.  0.684E+00  0.983E-01  0.898E-03  0.478E-04   30  19   7   12  25   9   16  20   9    0.000    0.000       0
+  0   4073 01:02:06.05   0.8970A   2.0073   0.7096  -0.8432  0.088  0.00   0.000E+00      0.  0.684E+00  0.981E-01  0.913E-03  0.561E-04   30  19  12   19  26   9   13  20   9    0.000    0.000       0
+  0   4080 01:02:12.33   0.8990A   2.0029   0.7068  -0.7748  0.087  0.00   0.000E+00      0.  0.684E+00  0.982E-01  0.927E-03  0.596E-04   30  17  17   19  27   9   12  20   9    0.000    0.000       0
+  0   4087 01:02:18.63   0.9010A   1.9974  -0.7219  -0.8379  0.087  0.00   0.000E+00      0.  0.684E+00  0.981E-01  0.919E-03  0.498E-04   29  17  22    9  27   8    6  28   9    0.000    0.000       0
+  0   4093 01:02:24.03   0.8990A   2.0015  -0.7835  -0.8469  0.087  0.00   0.000E+00      0.  0.683E+00  0.976E-01  0.917E-03  0.470E-04   29  17  27   10  25   8    5  28   9    0.000    0.000       0
+  0   4100 01:02:30.33   0.9030A   1.9935  -0.7951  -0.8271  0.088  0.00   0.000E+00      0.  0.682E+00  0.965E-01  0.912E-03  0.475E-04   29  17  33   10  25   9    6  27   9    0.000    0.000       0
+  0   4107 01:02:36.65   0.9000A   1.9995  -0.8000  -0.8532  0.087  0.00   0.000E+00      0.  0.680E+00  0.957E-01  0.918E-03  0.608E-04   27  16  38   10  24   9    6  26   9    0.000    0.000       0
+  0   4113 01:02:42.04   0.8980A   2.0048  -0.7922  -0.8263  0.087  0.00   0.000E+00      0.  0.680E+00  0.957E-01  0.930E-03  0.731E-04   27  16   2   11  24   9    5  26   9    0.000    0.000       0
+  0   4120 01:02:48.32   0.8970A   2.0076  -0.7843  -0.7769  0.088  0.00   0.000E+00      0.  0.680E+00  0.961E-01  0.923E-03  0.724E-04   30  22  17   11  23   9    7  20   7    0.000    0.000       0
+  0   4127 01:02:54.59   0.8950A   2.0113  -0.7248  -0.7823  0.089  0.00   0.000E+00      0.  0.680E+00  0.963E-01  0.906E-03  0.661E-04   30  23  23   12  23   9    7  18   7    0.000    0.000       0
+  0   4134 01:03:00.87   0.9000A   2.0002  -0.6759  -0.7952  0.090  0.00   0.000E+00      0.  0.681E+00  0.966E-01  0.899E-03  0.637E-04   30  23  28   11  24   9    5  18   7    0.000    0.000       0
+  0   4140 01:03:06.28   0.9010A   1.9976  -0.7088  -0.7439  0.090  0.00   0.000E+00      0.  0.682E+00  0.971E-01  0.895E-03  0.622E-04   33  23  31   10  26   9    5  18   6    0.000    0.000       0
+  0   4147 01:03:12.59   0.9020A   1.9955  -0.8216  -0.6495  0.090  0.00   0.000E+00      0.  0.683E+00  0.977E-01  0.902E-03  0.630E-04   33  23  37   17  27   9    4  18   6    0.000    0.000       0
+  0   4153 01:03:18.01   0.9050A   1.9885  -0.9811   0.8890  0.089  0.00   0.000E+00      0.  0.684E+00  0.980E-01  0.925E-03  0.677E-04   33  23   1   18  26   9   20  28   9    0.000    0.000       0
+  0   4160 01:03:24.34   0.9040A   1.9919  -1.0124   0.8527  0.089  0.00   0.000E+00      0.  0.685E+00  0.982E-01  0.920E-03  0.657E-04   26  26  16   18  26   9   20  28   9    0.000    0.000       0
+  0   4167 01:03:30.62   0.8950A   2.0106  -0.9468  -0.8337  0.089  0.00   0.000E+00      0.  0.685E+00  0.980E-01  0.881E-03  0.542E-04   26  26  21   18  25   9    5  11   9    0.000    0.000       0
+  0   4174 01:03:36.86   0.8930A   2.0161  -0.8956  -0.8303  0.090  0.00   0.000E+00      0.  0.684E+00  0.973E-01  0.870E-03  0.489E-04   26  26  26   14  27   9   17  17   9    0.000    0.000       0
+  0   4180 01:03:42.21   0.8900A   2.0227  -0.8797  -0.9855  0.091  0.00   0.000E+00      0.  0.683E+00  0.965E-01  0.878E-03  0.498E-04   29  24  28   13  26   9   17  18   9    0.000    0.000       0
+  0   4187 01:03:48.41   0.8840A   2.0367  -0.7947  -0.9624  0.092  0.00   0.000E+00      0.  0.682E+00  0.957E-01  0.884E-03  0.524E-04   29  24  33   14  24   9   16  18   9    0.000    0.000       0
+  0   4194 01:03:54.58   0.8770A   2.0519  -0.6956  -0.8924  0.093  0.00   0.000E+00      0.  0.682E+00  0.954E-01  0.888E-03  0.574E-04   26  17  33   14  23   9   16  19   9    0.000    0.000       0
+  0   4201 01:04:00.66   0.8650A   2.0811   0.6082  -0.8799  0.092  0.00   0.000E+00      0.  0.682E+00  0.950E-01  0.889E-03  0.601E-04   26  16  38   11  13   4   16  20   9    0.000    0.000       0
+  0   4208 01:04:06.71   0.8670A   2.0757   0.6825  -0.8681  0.091  0.00   0.000E+00      0.  0.682E+00  0.947E-01  0.884E-03  0.610E-04   26  16   3   18  18   5   17  18   9    0.000    0.000       0
+  0   4215 01:04:12.84   0.8780A   2.0494  -0.6981  -0.9570  0.089  0.00   0.000E+00      0.  0.682E+00  0.942E-01  0.892E-03  0.606E-04   32  24  13   16  27   9   16  18   9    0.000    0.000       0
+  0   4221 01:04:18.11   0.8780A   2.0507  -0.8472  -0.9506  0.086  0.00   0.000E+00      0.  0.682E+00  0.936E-01  0.888E-03  0.567E-04   32  24  18   15  27   9   16  18   9    0.000    0.000       0
+  0   4228 01:04:24.25   0.8750A   2.0560  -0.9291  -0.8596  0.084  0.00   0.000E+00      0.  0.682E+00  0.930E-01  0.884E-03  0.547E-04   25  16  19   15  26   9   15  18   9    0.000    0.000       0
+  0   4235 01:04:30.36   0.8720A   2.0632  -0.9296  -0.7363  0.082  0.00   0.000E+00      0.  0.681E+00  0.922E-01  0.868E-03  0.477E-04   25  16  24   15  25   9   14  19   9    0.000    0.000       0
+  0   4242 01:04:36.48   0.8750A   2.0577  -0.8204  -0.7023  0.079  0.00   0.000E+00      0.  0.681E+00  0.914E-01  0.867E-03  0.517E-04   25  15  29   15  25   9   10  20   8    0.000    0.000       0
+  0   4249 01:04:42.62   0.8770A   2.0529   0.7637  -0.7196  0.078  0.00   0.000E+00      0.  0.681E+00  0.913E-01  0.880E-03  0.640E-04   25  15  35   12  14   9    8  20   7    0.000    0.000       0
+  0   4256 01:04:48.78   0.8830A   2.0382   0.8946  -0.8064  0.077  0.00   0.000E+00      0.  0.682E+00  0.917E-01  0.891E-03  0.711E-04   25  15   1   10  15   9    6  12   9    0.000    0.000       0
+  0   4262 01:04:54.10   0.8920A   2.0188   0.9276  -0.8823  0.079  0.00   0.000E+00      0.  0.683E+00  0.921E-01  0.894E-03  0.701E-04   25  15   5   10  16   9    6  12   9    0.000    0.000       0
+  0   4269 01:05:00.35   0.8880A   2.0275   0.9043  -0.9257  0.081  0.00   0.000E+00      0.  0.684E+00  0.926E-01  0.888E-03  0.690E-04   24  15  10    9  17   9    5  12   9    0.000    0.000       0
+  0   4276 01:05:06.52   0.8780A   2.0495   0.8884  -0.9347  0.083  0.00   0.000E+00      0.  0.685E+00  0.932E-01  0.878E-03  0.659E-04   24  15  15   10  17   8    5  12   9    0.000    0.000       0
+  0   4283 01:05:12.68   0.8830A   2.0376   0.9152  -0.8742  0.085  0.00   0.000E+00      0.  0.686E+00  0.938E-01  0.885E-03  0.681E-04   24  15  20   10  17   8   18  23   9    0.000    0.000       0
+  0   4289 01:05:18.00   0.8870A   2.0288   0.9285  -0.9254  0.086  0.00   0.000E+00      0.  0.687E+00  0.941E-01  0.886E-03  0.671E-04   24  14  26   10  17   8   17  22   9    0.000    0.000       0
+  0   4296 01:05:24.22   0.8910A   2.0211   0.8774  -0.9240  0.086  0.00   0.000E+00      0.  0.687E+00  0.944E-01  0.869E-03  0.594E-04   24  14  31   10  18   8   16  22   9    0.000    0.000       0
+  0   4303 01:05:30.47   0.8950A   2.0122   0.9710  -0.8430  0.085  0.00   0.000E+00      0.  0.688E+00  0.947E-01  0.854E-03  0.538E-04   33  24   7   12  15   9   16  22   9    0.000    0.000       0
+  0   4310 01:05:36.74   0.8960A   2.0091   0.9490  -0.7776  0.084  0.00   0.000E+00      0.  0.688E+00  0.946E-01  0.846E-03  0.518E-04   33  24  13   12  15   9   15  22   9    0.000    0.000       0
+  0   4316 01:05:42.11   0.8920A   2.0171   0.8797  -0.7845  0.082  0.00   0.000E+00      0.  0.688E+00  0.946E-01  0.837E-03  0.493E-04   30  24  15   12  16   9   12  16   1    0.000    0.000       0
+  0   4323 01:05:48.33   0.8870A   2.0298   0.8374  -0.8161  0.082  0.00   0.000E+00      0.  0.687E+00  0.944E-01  0.829E-03  0.478E-04   30  23  20   13  15   9   11  16   1    0.000    0.000       0
+  0   4330 01:05:54.47   0.8690A   2.0709   0.8085  -0.8294  0.082  0.00   0.000E+00      0.  0.687E+00  0.941E-01  0.802E-03  0.459E-04   26  14  21   14  15   9   11  16   1    0.000    0.000       0
+  0   4337 01:06:00.59   0.8740A   2.0605   0.7924  -0.7850  0.082  0.00   0.000E+00      0.  0.686E+00  0.938E-01  0.803E-03  0.480E-04   26  15  26   13  15   9   11  16   1    0.000    0.000       0
+  0   4344 01:06:06.76   0.8830A   2.0396   0.7731  -0.7782  0.082  0.00   0.000E+00      0.  0.686E+00  0.937E-01  0.810E-03  0.501E-04   26  18  31   12  15   9   11  15   1    0.000    0.000       0
+  0   4350 01:06:12.04   0.8780A   2.0498   0.7294  -0.7739  0.082  0.00   0.000E+00      0.  0.686E+00  0.936E-01  0.814E-03  0.496E-04   26  18  36   12  16   9   11  15   1    0.000    0.000       0
+  0   4357 01:06:18.20   0.8810A   2.0438   0.7281  -0.8067  0.082  0.00   0.000E+00      0.  0.685E+00  0.934E-01  0.838E-03  0.521E-04   25  17   1   20  30   9   17  23   9    0.000    0.000       0
+  0   4364 01:06:24.38   0.8880A   2.0279   0.7198   0.8443  0.081  0.00   0.000E+00      0.  0.684E+00  0.933E-01  0.851E-03  0.536E-04   25  17   6   16  15   9   20  11   9    0.000    0.000       0
+  0   4371 01:06:30.61   0.8880A   2.0270   0.8067   0.9359  0.081  0.00   0.000E+00      0.  0.684E+00  0.934E-01  0.866E-03  0.606E-04   25  17  12   16  14   9   21  12   9    0.000    0.000       0
+  0   4378 01:06:36.83   0.8960A   2.0085   0.8603   0.9721  0.081  0.00   0.000E+00      0.  0.684E+00  0.940E-01  0.885E-03  0.713E-04   28  19  20   17  15   9   20  11   9    0.000    0.000       0
+  0   4384 01:06:42.21   0.8980A   2.0047   0.9114   0.9718  0.081  0.00   0.000E+00      0.  0.685E+00  0.947E-01  0.892E-03  0.754E-04   32  22  27   16  14   9   20  12   9    0.000    0.000       0
+  0   4391 01:06:48.49   0.8980A   2.0053   0.9311   0.8921  0.080  0.00   0.000E+00      0.  0.687E+00  0.958E-01  0.886E-03  0.705E-04   30  29  33   15  15   9   20  13   9    0.000    0.000       0
+  0   4398 01:06:54.75   0.8900A   2.0218   0.9628  -0.7899  0.080  0.00   0.000E+00      0.  0.689E+00  0.968E-01  0.874E-03  0.615E-04   30  28  26   14  15   9   16  19   9    0.000    0.000       0
+  0   4404 01:07:00.06   0.8830A   2.0396   1.0057  -0.7376  0.079  0.00   0.000E+00      0.  0.690E+00  0.972E-01  0.865E-03  0.548E-04   30  28  30   13  16   9   16  19   9    0.000    0.000       0
+  0   4411 01:07:06.22   0.8770A   2.0526   0.9846  -0.7373  0.079  0.00   0.000E+00      0.  0.691E+00  0.972E-01  0.851E-03  0.500E-04   29  27  35   12  16   9    8  11   9    0.000    0.000       0
+  0   4418 01:07:12.35   0.8760A   2.0549   0.9182  -0.6947  0.077  0.00   0.000E+00      0.  0.691E+00  0.967E-01  0.843E-03  0.472E-04   29  27   0   11  16   9    9  22   5    0.000    0.000       0
+  0   4425 01:07:18.51   0.8820A   2.0402   0.8411  -0.6991  0.075  0.00   0.000E+00      0.  0.690E+00  0.961E-01  0.838E-03  0.471E-04   31  29  19   10  16   9    5  28   9    0.000    0.000       0
+  0   4432 01:07:24.64   0.8710A   2.0665  -0.7919  -0.7331  0.073  0.00   0.000E+00      0.  0.689E+00  0.955E-01  0.809E-03  0.443E-04   27  31  26    9  25   9    5  27   9    0.000    0.000       0
+  0   4439 01:07:30.73   0.8690A   2.0707  -0.7985  -0.7219  0.072  0.00   0.000E+00      0.  0.688E+00  0.951E-01  0.803E-03  0.467E-04   27  31  31   14  27   9    4  27   9    0.000    0.000       0
+  0   4446 01:07:36.81   0.8680A   2.0737  -0.8232  -0.6698  0.072  0.00   0.000E+00      0.  0.687E+00  0.949E-01  0.792E-03  0.475E-04   30  29  34   14  27   9   16  21   5    0.000    0.000       0
+  0   4452 01:07:42.00   0.8630A   2.0846  -0.7717  -0.6737  0.073  0.00   0.000E+00      0.  0.686E+00  0.951E-01  0.801E-03  0.551E-04   30  29  38   13  26   9   15  21   4    0.000    0.000       0
+  0   4459 01:07:48.04   0.8630A   2.0865  -0.6698  -0.8940  0.074  0.00   0.000E+00      0.  0.686E+00  0.955E-01  0.820E-03  0.603E-04   30  29   3   13  26   9   17  21   9    0.000    0.000       0
+  0   4466 01:07:54.09   0.8650A   2.0819   0.7327  -0.9561  0.075  0.00   0.000E+00      0.  0.687E+00  0.960E-01  0.828E-03  0.577E-04   30  29   9   13  13   9   16  20   9    0.000    0.000       0
+  0   4473 01:08:00.16   0.8690A   2.0718   0.8404  -0.9112  0.076  0.00   0.000E+00      0.  0.687E+00  0.963E-01  0.834E-03  0.580E-04   30  29  14   13  14   9   15  20   9    0.000    0.000       0
+  0   4480 01:08:06.26   0.8750A   2.0565   0.8220  -0.8307  0.077  0.00   0.000E+00      0.  0.688E+00  0.966E-01  0.828E-03  0.545E-04   30  29  20   12  15   9   14  20   9    0.000    0.000       0
+  0   4487 01:08:12.41   0.8800A   2.0462   0.8118  -0.7520  0.077  0.00   0.000E+00      0.  0.689E+00  0.966E-01  0.825E-03  0.503E-04   26  33  26   14  14   9   13  20   9    0.000    0.000       0
+  0   4494 01:08:18.58   0.8840A   2.0351   0.7467   0.6968  0.076  0.00   0.000E+00      0.  0.689E+00  0.966E-01  0.836E-03  0.517E-04   26  33  31   14  15   9   20  29   9    0.000    0.000       0
+  0   4501 01:08:24.78   0.8830A   2.0393   0.6975   0.7939  0.076  0.00   0.000E+00      0.  0.689E+00  0.965E-01  0.838E-03  0.530E-04   32  28  10   10  14   9   20  28   9    0.000    0.000       0
+  0   4507 01:08:30.05   0.8780A   2.0503  -0.8458   0.7868  0.075  0.00   0.000E+00      0.  0.689E+00  0.964E-01  0.833E-03  0.530E-04   32  28  15   17  26   9   20  26   9    0.000    0.000       0
+  0   4514 01:08:36.19   0.8770A   2.0520  -0.9151   0.6538  0.075  0.00   0.000E+00      0.  0.688E+00  0.958E-01  0.821E-03  0.472E-04   32  28  20   16  26   9   20  24   9    0.000    0.000       0
+  0   4521 01:08:42.33   0.8780A   2.0511  -0.9218  -0.6579  0.076  0.00   0.000E+00      0.  0.687E+00  0.949E-01  0.819E-03  0.480E-04   32  28  26   15  26   9    6  21   6    0.000    0.000       0
+  0   4528 01:08:48.50   0.8840A   2.0354  -0.9450  -0.6414  0.077  0.00   0.000E+00      0.  0.686E+00  0.941E-01  0.830E-03  0.582E-04   32  28  31   15  25   9    9  21   3    0.000    0.000       0
+  0   4535 01:08:54.69   0.8830A   2.0393  -0.9180  -0.6658  0.079  0.00   0.000E+00      0.  0.685E+00  0.938E-01  0.847E-03  0.674E-04   31  24  35   16  24   9   17  17   9    0.000    0.000       0
+  0   4542 01:09:00.88   0.8870A   2.0303  -0.8443  -0.8916  0.080  0.00   0.000E+00      0.  0.686E+00  0.939E-01  0.866E-03  0.734E-04   31  24   1   15  23   9   17  18   9    0.000    0.000       0
+  0   4548 01:09:06.20   0.8880A   2.0262  -0.8183  -0.9954  0.082  0.00   0.000E+00      0.  0.686E+00  0.939E-01  0.866E-03  0.731E-04   31  23   5   15  25   9   16  17   9    0.000    0.000       0
+  0   4555 01:09:12.42   0.8870A   2.0298  -0.8094  -0.9421  0.084  0.00   0.000E+00      0.  0.686E+00  0.942E-01  0.855E-03  0.671E-04   23  17  32   15  25   9   15  17   9    0.000    0.000       0
+  0   4562 01:09:18.61   0.8850A   2.0346  -0.7812  -0.8529  0.085  0.00   0.000E+00      0.  0.687E+00  0.946E-01  0.849E-03  0.620E-04   23  17  36   14  26   9   12  21   6    0.000    0.000       0
+  0   4569 01:09:24.81   0.8870A   2.0285  -0.7856  -0.8150  0.085  0.00   0.000E+00      0.  0.688E+00  0.948E-01  0.835E-03  0.528E-04   31  23  22   14  25   9   11  21   6    0.000    0.000       0
+  0   4575 01:09:30.15   0.8890A   2.0249   0.7810  -0.7389  0.085  0.00   0.000E+00      0.  0.688E+00  0.947E-01  0.818E-03  0.428E-04   30  22  27   14  13   9   10  20   5    0.000    0.000       0
+  0   4582 01:09:36.38   0.8910A   2.0211   0.7757  -0.7517  0.085  0.00   0.000E+00      0.  0.688E+00  0.943E-01  0.810E-03  0.411E-04   36  34  32   13  13   9   11  15   8    0.000    0.000       0
+  0   4589 01:09:42.61   0.8900A   2.0221   0.8184  -0.7919  0.086  0.00   0.000E+00      0.  0.688E+00  0.939E-01  0.810E-03  0.463E-04   36  34  37   12  13   9   11  16   8    0.000    0.000       0
+  0   4596 01:09:48.85   0.8930A   2.0163   0.8388  -0.7614  0.086  0.00   0.000E+00      0.  0.687E+00  0.934E-01  0.812E-03  0.448E-04   36  34   3   11  13   9    9  16   8    0.000    0.000       0
+  0   4602 01:09:54.22   0.8960A   2.0089   0.7615  -0.7039  0.086  0.00   0.000E+00      0.  0.686E+00  0.927E-01  0.821E-03  0.452E-04   37  34   7   10  13   9    8  16   8    0.000    0.000       0
+  0   4609 01:10:00.49   0.8970A   2.0060  -0.7556  -0.6881  0.085  0.00   0.000E+00      0.  0.685E+00  0.918E-01  0.833E-03  0.464E-04   37  34  12    7  14   4   17  19   9    0.000    0.000       0
+  0   4616 01:10:06.79   0.9000A   2.0006  -0.8302  -0.7426  0.084  0.00   0.000E+00      0.  0.684E+00  0.913E-01  0.836E-03  0.453E-04   31  21  20    7  14   4   16  19   9    0.000    0.000       0
+  0   4622 01:10:12.18   0.8980A   2.0052  -0.8234  -0.8018  0.083  0.00   0.000E+00      0.  0.683E+00  0.910E-01  0.839E-03  0.457E-04   31  21  25    6  13   4   17  15   9    0.000    0.000       0
+  0   4629 01:10:18.46   0.8970A   2.0075  -0.7661  -0.8668  0.084  0.00   0.000E+00      0.  0.683E+00  0.907E-01  0.855E-03  0.548E-04   31  20  29    6  12   3   15  16   9    0.000    0.000       0
+  0   4636 01:10:24.74   0.8970A   2.0062  -0.7150  -0.8607  0.083  0.00   0.000E+00      0.  0.683E+00  0.908E-01  0.851E-03  0.594E-04   31  21  36    5  13   3   14  17   9    0.000    0.000       0
+  0   4642 01:10:30.13   0.9000A   2.0004  -0.6771  -0.8387  0.082  0.00   0.000E+00      0.  0.683E+00  0.911E-01  0.843E-03  0.608E-04   31  21   1    4  13   4   13  17   9    0.000    0.000       0
+  0   4649 01:10:36.44   0.9010A   1.9979  -0.6919   0.8255  0.081  0.00   0.000E+00      0.  0.684E+00  0.915E-01  0.832E-03  0.616E-04   31  21   6   13  27   3   20  28   9    0.000    0.000       0
+  0   4656 01:10:42.74   0.8990A   2.0026  -0.7764   0.8410  0.080  0.00   0.000E+00      0.  0.685E+00  0.920E-01  0.831E-03  0.644E-04   31  21  12   12  27   4   20  27   9    0.000    0.000       0
+  0   4662 01:10:48.13   0.8980A   2.0050  -0.7995  -0.8508  0.079  0.00   0.000E+00      0.  0.685E+00  0.921E-01  0.816E-03  0.579E-04   29  20  17   12  26   5   11  16   8    0.000    0.000       0
+  0   4669 01:10:54.42   0.9000A   2.0003   0.8664  -0.8810  0.078  0.00   0.000E+00      0.  0.685E+00  0.921E-01  0.811E-03  0.520E-04   29  21  23   11  13   8    9  16   8    0.000    0.000       0
+  0   4676 01:11:00.72   0.9000A   1.9999   0.9490  -0.8884  0.078  0.00   0.000E+00      0.  0.685E+00  0.919E-01  0.809E-03  0.490E-04   28  20  29   10  15   9    8  17   8    0.000    0.000       0
+  0   4682 01:11:06.12   0.9000A   2.0002   0.9068  -0.8756  0.078  0.00   0.000E+00      0.  0.684E+00  0.916E-01  0.801E-03  0.456E-04   28  21  35    8  15   8    7  19   8    0.000    0.000       0
+  0   4689 01:11:12.42   0.9010A   1.9982   0.8094  -0.8336  0.079  0.00   0.000E+00      0.  0.683E+00  0.912E-01  0.786E-03  0.459E-04   28  21   1    7  18   8    6  20   8    0.000    0.000       0
+  0   4696 01:11:18.74   0.9040A   1.9912   0.7044  -0.8207  0.079  0.00   0.000E+00      0.  0.682E+00  0.912E-01  0.770E-03  0.464E-04   28  21   7    5  18   8    6  11   9    0.000    0.000       0
+  0   4702 01:11:24.17   0.9050A   1.9888  -0.6666  -0.8725  0.079  0.00   0.000E+00      0.  0.682E+00  0.917E-01  0.775E-03  0.519E-04   27  20   9    1  11   8    6  12   9    0.000    0.000       0
+  0   4709 01:11:30.49   0.9010A   1.9980  -0.6561  -0.8383  0.079  0.00   0.000E+00      0.  0.683E+00  0.926E-01  0.779E-03  0.561E-04   26  21  15    1  10   9    4  12   9    0.000    0.000       0
+  0   4716 01:11:36.80   0.9040A   1.9908  -0.6681  -0.7012  0.078  0.00   0.000E+00      0.  0.684E+00  0.937E-01  0.781E-03  0.574E-04   26  21  20   14  26   8    3  12   9    0.000    0.000       0
+  0   4722 01:11:42.21   0.8970A   2.0067  -0.7232  -0.6512  0.076  0.00   0.000E+00      0.  0.685E+00  0.944E-01  0.770E-03  0.539E-04   27  24  33   12  26   9    4  22   8    0.000    0.000       0
+  0   4729 01:11:48.43   0.8810A   2.0435  -0.7372  -0.6032  0.075  0.00   0.000E+00      0.  0.685E+00  0.947E-01  0.753E-03  0.461E-04   27  23  37   11  26   9    3  22   8    0.000    0.000       0
+  0   4736 01:11:54.57   0.8790A   2.0485  -0.7046  -0.6190  0.075  0.00   0.000E+00      0.  0.685E+00  0.948E-01  0.751E-03  0.425E-04   27  23   2   10  25   9   10  16   4    0.000    0.000       0
+  0   4743 01:12:00.76   0.8840A   2.0357  -0.6688  -0.6376  0.075  0.00   0.000E+00      0.  0.684E+00  0.949E-01  0.763E-03  0.452E-04   27  22   7    9  25   9    9  16   3    0.000    0.000       0
+  0   4749 01:12:06.07   0.8860A   2.0314  -0.6733  -0.6395  0.074  0.00   0.000E+00      0.  0.683E+00  0.955E-01  0.776E-03  0.489E-04   27  22  12    6  26   9    8  16   3    0.000    0.000       0
+  0   4756 01:12:12.29   0.8910A   2.0200  -0.8916  -0.7623  0.075  0.00   0.000E+00      0.  0.683E+00  0.963E-01  0.802E-03  0.512E-04   27  21  15   20  18   9   18  21   9    0.000    0.000       0
+  0   4763 01:12:18.51   0.8870A   2.0292  -0.9552  -0.9129  0.076  0.00   0.000E+00      0.  0.683E+00  0.972E-01  0.826E-03  0.539E-04   27  21  21   20  16   9   17  21   9    0.000    0.000       0
+  0   4770 01:12:24.73   0.8900A   2.0219  -0.9359  -0.9255  0.077  0.00   0.000E+00      0.  0.683E+00  0.984E-01  0.857E-03  0.578E-04   28  21  23   20  16   9   16  21   9    0.000    0.000       0
+  0   4776 01:12:30.03   0.8790A   2.0485  -0.8450  -0.9534  0.077  0.00   0.000E+00      0.  0.683E+00  0.995E-01  0.885E-03  0.622E-04   28  21  28   19  17   9   16  22   9    0.000    0.000       0
+  0   4783 01:12:36.17   0.8760A   2.0540  -0.8040  -0.9454  0.077  0.00   0.000E+00      0.  0.684E+00  0.101E+00  0.917E-03  0.723E-04   29  21  32   18  18   9   15  22   9    0.000    0.000       0
+  0   4790 01:12:42.25   0.8660A   2.0795   0.8087  -0.9674  0.077  0.00   0.000E+00      0.  0.685E+00  0.102E+00  0.923E-03  0.712E-04   29  21  38   13  14   9   15  22   9    0.000    0.000       0
+  0   4797 01:12:48.29   0.8640A   2.0833   0.8660  -0.9706  0.078  0.00   0.000E+00      0.  0.686E+00  0.103E+00  0.933E-03  0.644E-04   29  21   3   13  15   9   15  21   9    0.000    0.000       0
+  0   4804 01:12:54.37   0.8700A   2.0679   0.8272  -0.9148  0.079  0.00   0.000E+00      0.  0.687E+00  0.104E+00  0.959E-03  0.678E-04   29  21   8   20  19   5   14  21   9    0.000    0.000       0
+  0   4811 01:13:00.49   0.8780A   2.0505   0.8537  -0.8511  0.080  0.00   0.000E+00      0.  0.688E+00  0.104E+00  0.974E-03  0.675E-04   29  21  14   20  20   6   17  13   5    0.000    0.000       0
+  0   4818 01:13:06.65   0.8830A   2.0395  -1.0540  -0.8977  0.081  0.00   0.000E+00      0.  0.688E+00  0.104E+00  0.982E-03  0.614E-04   29  21  19   18   9   9   17  13   6    0.000    0.000       0
+  0   4825 01:13:12.83   0.8840A   2.0358  -0.9835  -0.8712  0.080  0.00   0.000E+00      0.  0.687E+00  0.103E+00  0.977E-03  0.579E-04   29  21  24   10  26   9   17  11   8    0.000    0.000       0
+  0   4831 01:13:18.11   0.8740A   2.0584  -0.9878  -0.8894  0.080  0.00   0.000E+00      0.  0.686E+00  0.102E+00  0.955E-03  0.545E-04   27  19  27    8  26   9   16  10   9    0.000    0.000       0
+  0   4838 01:13:24.16   0.8570A   2.1013  -0.9290  -0.8909  0.081  0.00   0.000E+00      0.  0.685E+00  0.102E+00  0.925E-03  0.536E-04   27  20  32    7  25   9   15  14   9    0.000    0.000       0
+  0   4845 01:13:30.20   0.8650A   2.0801  -0.8079  -0.8992  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.942E-03  0.559E-04   28  19  36    7  24   9   17  16   9    0.000    0.000       0
+  0   4852 01:13:36.32   0.8780A   2.0509  -0.7322  -1.1027  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.960E-03  0.612E-04   29  21   2    9  24   9   17  19   9    0.000    0.000       0
+  0   4859 01:13:42.47   0.8790A   2.0470  -0.7802  -1.1439  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.964E-03  0.673E-04   30  23   7   11  27   9   15  19   9    0.000    0.000       0
+  0   4866 01:13:48.60   0.8710A   2.0662  -1.0800  -1.0696  0.082  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.970E-03  0.720E-04   30  23  12   10  26   9   14  19   9    0.000    0.000       0
+  0   4873 01:13:54.67   0.8660A   2.0794  -1.1058  -0.9326  0.082  0.00   0.000E+00      0.  0.685E+00  0.103E+00  0.987E-03  0.777E-04   30  24  18   10  24   9   13  18   9    0.000    0.000       0
+  0   4880 01:14:00.73   0.8650A   2.0802  -1.0426   0.9256  0.082  0.00   0.000E+00      0.  0.686E+00  0.104E+00  0.982E-03  0.709E-04   30  24  23    8  25   9   20  11   9    0.000    0.000       0
+  0   4887 01:14:06.80   0.8720A   2.0641  -0.9707   0.8852  0.082  0.00   0.000E+00      0.  0.686E+00  0.104E+00  0.984E-03  0.712E-04   30  25  28    8  24   9   20  12   9    0.000    0.000       0
+  0   4893 01:14:12.06   0.8790A   2.0471  -0.9121   0.9416  0.083  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.985E-03  0.669E-04   30  25  32    7  23   9   20  29   9    0.000    0.000       0
+  0   4900 01:14:18.25   0.8890A   2.0251  -0.8727  -0.9918  0.085  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.965E-03  0.555E-04   33  19  21   13  27   9   16  17   9    0.000    0.000       0
+  0   4907 01:14:24.47   0.8880A   2.0261  -0.8325  -1.0153  0.086  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.946E-03  0.525E-04   33  19  26    8  23   9   16  16   9    0.000    0.000       0
+  0   4914 01:14:30.70   0.8910A   2.0192  -0.7749  -0.9913  0.086  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.944E-03  0.551E-04   33  19  32    7  23   9   14  17   9    0.000    0.000       0
+  0   4920 01:14:36.07   0.8950A   2.0102  -0.7312  -0.9386  0.086  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.953E-03  0.618E-04   30  27  16    6  24   9   14  16   9    0.000    0.000       0
+  0   4927 01:14:42.32   0.8910A   2.0205  -0.6874  -0.9005  0.086  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.962E-03  0.683E-04   30  28  22    5  24   9   13  16   9    0.000    0.000       0
+  0   4934 01:14:48.55   0.8900A   2.0229   0.7585  -0.9047  0.087  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.958E-03  0.643E-04   30  28  27   20  30   9   16  17   9    0.000    0.000       0
+  0   4941 01:14:54.79   0.8940A   2.0127   0.6714  -1.0514  0.087  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.953E-03  0.571E-04   30  28  34   19  30   9   15  17   9    0.000    0.000       0
+  0   4947 01:15:00.16   0.8950A   2.0106  -0.6598  -1.1085  0.088  0.00   0.000E+00      0.  0.687E+00  0.105E+00  0.957E-03  0.509E-04   30  28   0    2  10   1   14  17   9    0.000    0.000       0
+  0   4954 01:15:06.44   0.8970A   2.0064  -0.7190  -1.0382  0.088  0.00   0.000E+00      0.  0.686E+00  0.105E+00  0.959E-03  0.493E-04   30  28   6    3  13   4   13  18   9    0.000    0.000       0
+  0   4961 01:15:12.72   0.8940A   2.0125  -0.7278  -0.9290  0.087  0.00   0.000E+00      0.  0.685E+00  0.104E+00  0.953E-03  0.506E-04   28  35   1    3  12   3   15  21   9    0.000    0.000       0
+  0   4967 01:15:18.07   0.8910A   2.0212  -0.7326  -0.8915  0.087  0.00   0.000E+00      0.  0.684E+00  0.104E+00  0.956E-03  0.546E-04   29  35   5    3   9   1   15  22   9    0.000    0.000       0
+  0   4974 01:15:24.24   0.8770A   2.0527   0.7071  -0.9027  0.088  0.00   0.000E+00      0.  0.685E+00  0.104E+00  0.952E-03  0.615E-04   30  33   9   20  30   8   16  24   9    0.000    0.000       0
+  0   4981 01:15:30.38   0.8780A   2.0505  -0.7109  -0.9148  0.088  0.00   0.000E+00      0.  0.686E+00  0.105E+00  0.964E-03  0.695E-04   30  34  14   15  27   9   16  24   9    0.000    0.000       0
+  0   4988 01:15:36.48   0.8640A   2.0844   0.7616  -0.8081  0.089  0.00   0.000E+00      0.  0.688E+00  0.106E+00  0.965E-03  0.749E-04   26  39  19    9  11   1   13  23   8    0.000    0.000       0
+  0   4995 01:15:42.51   0.8580A   2.0986  -0.8302  -0.8794  0.089  0.00   0.000E+00      0.  0.690E+00  0.107E+00  0.952E-03  0.665E-04   26  39  24   11  27   9    7  12   9    0.000    0.000       0
+  0   5002 01:15:48.49   0.8540A   2.1084  -0.9597  -0.8720  0.089  0.00   0.000E+00      0.  0.691E+00  0.106E+00  0.936E-03  0.546E-04   26  39  28   11  26   9    5  12   9    0.000    0.000       0
+  0   5009 01:15:54.47   0.8540A   2.1086  -0.9262  -0.8201  0.088  0.00   0.000E+00      0.  0.691E+00  0.106E+00  0.918E-03  0.486E-04   26  39  33   12  25   9    4  11   9    0.000    0.000       0
+  0   5016 01:16:00.48   0.8620A   2.0878   0.9042  -0.7491  0.088  0.00   0.000E+00      0.  0.691E+00  0.105E+00  0.928E-03  0.502E-04   28  38  37    8  18   7    6  21   7    0.000    0.000       0
+  0   5023 01:16:06.56   0.8730A   2.0608   0.8582  -0.7519  0.087  0.00   0.000E+00      0.  0.691E+00  0.105E+00  0.954E-03  0.536E-04   30  28   1   10  16   6    6  12   9    0.000    0.000       0
+  0   5030 01:16:12.67   0.8730A   2.0609   0.8878  -0.7692  0.087  0.00   0.000E+00      0.  0.690E+00  0.104E+00  0.959E-03  0.527E-04   30  28   5   10  17   7    4  13   9    0.000    0.000       0
+  0   5037 01:16:18.79   0.8770A   2.0516   0.8242  -0.8581  0.087  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.976E-03  0.531E-04   30  28  10    9  17   7   17  22   9    0.000    0.000       0
+  0   5043 01:16:24.08   0.8830A   2.0380   0.7733  -0.8785  0.087  0.00   0.000E+00      0.  0.688E+00  0.102E+00  0.991E-03  0.551E-04   30  28  13    9  17   7   17  22   9    0.000    0.000       0
+  0   5050 01:16:30.28   0.8900A   2.0231   0.7314  -0.8727  0.087  0.00   0.000E+00      0.  0.687E+00  0.102E+00  0.997E-03  0.589E-04   30  28  18    9  18   8   17  21   9    0.000    0.000       0
+  0   5057 01:16:36.53   0.8940A   2.0144   0.7431  -0.8009  0.087  0.00   0.000E+00      0.  0.687E+00  0.102E+00  0.101E-02  0.696E-04   30  28  22   13  13   7   16  21   9    0.000    0.000       0
+  0   5064 01:16:42.78   0.8900A   2.0215   0.8837  -0.8174  0.086  0.00   0.000E+00      0.  0.688E+00  0.102E+00  0.100E-02  0.756E-04   30  28  26   14  13   9   16  18   9    0.000    0.000       0
+  0   5070 01:16:48.10   0.8850A   2.0347   0.9503  -0.7563  0.086  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.980E-03  0.721E-04   30  28  30   14  13   9   12  14   5    0.000    0.000       0
+  0   5077 01:16:54.28   0.8800A   2.0455   0.9084  -0.7102  0.085  0.00   0.000E+00      0.  0.690E+00  0.103E+00  0.964E-03  0.629E-04   30  28  35   13  15   8   17  17   9    0.000    0.000       0
+  0   5084 01:17:00.44   0.8810A   2.0420   0.8899  -0.7505  0.084  0.00   0.000E+00      0.  0.690E+00  0.103E+00  0.968E-03  0.625E-04   30  28   0   12  14   8    5  28   9    0.000    0.000       0
+  0   5091 01:17:06.63   0.8880A   2.0275   1.0555  -0.8207  0.082  0.00   0.000E+00      0.  0.691E+00  0.103E+00  0.978E-03  0.654E-04   30  28   6   12  15   9    7  11   9    0.000    0.000       0
+  0   5098 01:17:12.87   0.8940A   2.0131   1.0853  -0.8297  0.081  0.00   0.000E+00      0.  0.691E+00  0.104E+00  0.974E-03  0.624E-04   30  28  11   12  16   9    6  12   9    0.000    0.000       0
+  0   5104 01:17:18.23   0.8920A   2.0177   1.0559  -0.7732  0.081  0.00   0.000E+00      0.  0.692E+00  0.104E+00  0.969E-03  0.606E-04   31  27  17   13  16   9    5  13   9    0.000    0.000       0
+  0   5111 01:17:24.46   0.8890A   2.0250   0.9964  -0.7664  0.081  0.00   0.000E+00      0.  0.692E+00  0.104E+00  0.962E-03  0.553E-04   30  27  24   12  17   9   18  25   9    0.000    0.000       0
+  0   5118 01:17:30.66   0.8840A   2.0359   0.9974  -0.7501  0.081  0.00   0.000E+00      0.  0.692E+00  0.104E+00  0.959E-03  0.490E-04   30  27  30   10  17   9   15  16   5    0.000    0.000       0
+  0   5125 01:17:36.84   0.8820A   2.0410   0.9810  -0.7801  0.081  0.00   0.000E+00      0.  0.691E+00  0.104E+00  0.967E-03  0.499E-04   30  27  35    9  17   9   15  16   5    0.000    0.000       0
+  0   5131 01:17:42.14   0.8840A   2.0361   0.9556  -0.7718  0.080  0.00   0.000E+00      0.  0.691E+00  0.104E+00  0.980E-03  0.523E-04   30  27   0    8  18   9   13  17   4    0.000    0.000       0
+  0   5138 01:17:48.36   0.8900A   2.0226   0.9099   0.7617  0.079  0.00   0.000E+00      0.  0.690E+00  0.104E+00  0.101E-02  0.606E-04   33  26   6   11  15   9   22   8   8    0.000    0.000       0
+  0   5145 01:17:54.58   0.8870A   2.0291   1.0066   0.7961  0.078  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.103E-02  0.690E-04   33  25  12   15  14   9   20  11   9    0.000    0.000       0
+  0   5152 01:18:00.78   0.8850A   2.0329   1.0496   0.8490  0.077  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.102E-02  0.703E-04   33  25  18   15  14   9   20  12   9    0.000    0.000       0
+  0   5158 01:18:06.09   0.8850A   2.0344   1.0491  -0.7762  0.077  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.101E-02  0.661E-04   33  25  23   14  15   9   17  17   9    0.000    0.000       0
+  0   5165 01:18:12.28   0.8830A   2.0387   1.0341  -0.7489  0.078  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.997E-03  0.634E-04   32  26  28   13  16   9    8  11   9    0.000    0.000       0
+  0   5172 01:18:18.44   0.8780A   2.0510   0.9766  -0.8158  0.079  0.00   0.000E+00      0.  0.689E+00  0.103E+00  0.979E-03  0.630E-04   32  26  34   11  17   9    7  12   9    0.000    0.000       0
+  0   5179 01:18:24.57   0.8770A   2.0534   1.0123  -0.8337  0.080  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.955E-03  0.556E-04   32  26  39   11  15   9    6  12   9    0.000    0.000       0
+  0   5186 01:18:30.71   0.8780A   2.0510   0.9630  -0.7543  0.080  0.00   0.000E+00      0.  0.689E+00  0.102E+00  0.934E-03  0.470E-04   33  25   6   10  17   9    5  13   9    0.000    0.000       0
+  0   5193 01:18:36.85   0.8770A   2.0524   0.8377  -0.7845  0.080  0.00   0.000E+00      0.  0.688E+00  0.101E+00  0.929E-03  0.484E-04   33  26  12   10  19   9   17  24   9    0.000    0.000       0
+  0   5199 01:18:42.11   0.8770A   2.0527   0.7500  -0.8365  0.080  0.00   0.000E+00      0.  0.688E+00  0.100E+00  0.935E-03  0.486E-04   33  26  17   16  31   9   17  22   9    0.000    0.000       0
+  0   5206 01:18:48.26   0.8790A   2.0476   0.7089  -0.9980  0.080  0.00   0.000E+00      0.  0.687E+00  0.993E-01  0.929E-03  0.453E-04   33  26  22   15  31   9   16  19   9    0.000    0.000       0
+  0   5213 01:18:54.42   0.8820A   2.0401  -0.6539  -0.9144  0.081  0.00   0.000E+00      0.  0.686E+00  0.987E-01  0.914E-03  0.454E-04   33  26  27    6  27   9   15  19   9    0.000    0.000       0
+  0   5220 01:19:00.60   0.8800A   2.0464   0.6238  -1.0095  0.082  0.00   0.000E+00      0.  0.685E+00  0.982E-01  0.900E-03  0.470E-04   32  27  32    1  26   7   17  15   9    0.000    0.000       0
+  0   5227 01:19:06.73   0.8730A   2.0615   0.6678  -1.0229  0.082  0.00   0.000E+00      0.  0.684E+00  0.978E-01  0.898E-03  0.524E-04   32  27  37    9  31   9   16  17   9    0.000    0.000       0
+  0   5234 01:19:12.81   0.8670A   2.0755   0.7295  -1.0006  0.081  0.00   0.000E+00      0.  0.684E+00  0.978E-01  0.888E-03  0.561E-04   32  27   3    9  31   9   15  17   9    0.000    0.000       0
+  0   5240 01:19:18.01   0.8660A   2.0786  -0.7405  -0.9106  0.080  0.00   0.000E+00      0.  0.684E+00  0.980E-01  0.870E-03  0.526E-04   32  27   8   14  27   9   13  18   9    0.000    0.000       0
+  0   5247 01:19:24.06   0.8640A   2.0839  -0.8326  -0.8202  0.080  0.00   0.000E+00      0.  0.685E+00  0.980E-01  0.836E-03  0.424E-04   32  27  13   14  26   9   15  16   9    0.000    0.000       0
+  0   5254 01:19:30.12   0.8670A   2.0773  -0.7932  -0.7994  0.079  0.00   0.000E+00      0.  0.685E+00  0.978E-01  0.831E-03  0.419E-04   32  27  19   13  26   9   15  16   9    0.000    0.000       0
+  0   5261 01:19:36.19   0.8680A   2.0735  -0.7965  -0.7865  0.079  0.00   0.000E+00      0.  0.684E+00  0.976E-01  0.832E-03  0.419E-04   32  27  24   11  27   8   14  15   9    0.000    0.000       0
+  0   5268 01:19:42.28   0.8720A   2.0632  -0.7340  -0.8586  0.080  0.00   0.000E+00      0.  0.683E+00  0.972E-01  0.841E-03  0.418E-04   32  27  30   10  25   8   18  18   9    0.000    0.000       0
+  0   5275 01:19:48.41   0.8780A   2.0491  -0.7893  -0.9203  0.081  0.00   0.000E+00      0.  0.682E+00  0.967E-01  0.850E-03  0.447E-04   32  27  35   21  22   7   17  17   9    0.000    0.000       0
+  0   5282 01:19:54.60   0.8870A   2.0297  -0.8314  -0.9113  0.081  0.00   0.000E+00      0.  0.681E+00  0.963E-01  0.878E-03  0.529E-04   32  28   1   22  21   8   16  17   9    0.000    0.000       0
+  0   5289 01:20:00.84   0.8960A   2.0090  -0.7802  -0.9341  0.082  0.00   0.000E+00      0.  0.680E+00  0.962E-01  0.877E-03  0.523E-04   32  28   6   20  20   7   16  16   9    0.000    0.000       0
+  0   5295 01:20:06.24   0.9050A   1.9900  -0.6885  -0.8865  0.084  0.00   0.000E+00      0.  0.679E+00  0.962E-01  0.873E-03  0.500E-04   32  28  11   19  19   7   15  16   9    0.000    0.000       0
+  0   5302 01:20:12.60   0.9130A   1.9715  -0.6455  -0.7925  0.086  0.00   0.000E+00      0.  0.678E+00  0.962E-01  0.880E-03  0.504E-04   31  28  17    8  24   9   17  17   9    0.000    0.000       0
+  0   5308 01:20:18.09   0.9160A   1.9649  -0.5961  -0.9179  0.087  0.00   0.000E+00      0.  0.678E+00  0.962E-01  0.874E-03  0.497E-04   35  26  16    3  35  15   17  18   9    0.000    0.000       0
+  0   5315 01:20:24.44   0.8940A   2.0132  -0.6327  -0.9412  0.090  0.00   0.000E+00      0.  0.677E+00  0.961E-01  0.856E-03  0.485E-04   27  20  26    3  35  17   16  19   9    0.000    0.000       0
+  0   5322 01:20:30.63   0.8810A   2.0425  -0.6811  -0.9392  0.092  0.00   0.000E+00      0.  0.677E+00  0.962E-01  0.853E-03  0.523E-04   27  20  30   21  10   9   16  17   9    0.000    0.000       0
+  0   5329 01:20:36.79   0.8740A   2.0585  -0.8729  -0.9209  0.093  0.00   0.000E+00      0.  0.676E+00  0.965E-01  0.855E-03  0.615E-04   27  21  34   20  10   9   15  17   9    0.000    0.000       0
+  0   5335 01:20:42.07   0.8880A   2.0281  -0.7099  -0.9127  0.093  0.00   0.000E+00      0.  0.676E+00  0.969E-01  0.863E-03  0.638E-04   27  21  38   20  10   9   16  16   9    0.000    0.000       0
+  0   5342 01:20:48.36   0.9020A   1.9953   0.6624  -0.8688  0.093  0.00   0.000E+00      0.  0.677E+00  0.976E-01  0.871E-03  0.677E-04   29  24  19    5  35   7   14  17   9    0.000    0.000       0
+  0   5349 01:20:54.66   0.8970A   2.0061   0.6517  -0.8469  0.093  0.00   0.000E+00      0.  0.678E+00  0.986E-01  0.864E-03  0.655E-04   28  24  24    4  35   9   12  18   8    0.000    0.000       0
+  0   5355 01:21:00.04   0.8960A   2.0082  -0.6829  -0.8219  0.093  0.00   0.000E+00      0.  0.679E+00  0.994E-01  0.847E-03  0.586E-04   28  24  29   16  27   7   11  18   8    0.000    0.000       0
+  0   5362 01:21:06.31   0.8930A   2.0147  -0.6783  -0.8042  0.093  0.00   0.000E+00      0.  0.679E+00  0.100E+00  0.819E-03  0.481E-04   27  24  33   16  26   8    8  19   7    0.000    0.000       0
+  0   5369 01:21:12.53   0.8860A   2.0309  -0.7768  -0.7869  0.092  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.796E-03  0.429E-04   27  24  38    9  26   9    8  19   6    0.000    0.000       0
+  0   5376 01:21:18.74   0.8880A   2.0260  -0.9063  -0.7553  0.092  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.799E-03  0.435E-04   27  24   3   11  26   9    7  19   5    0.000    0.000       0
+  0   5382 01:21:24.09   0.8930A   2.0154  -0.8777  -0.9130  0.093  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.803E-03  0.448E-04   32  21  35   12  25   9   17  18   9    0.000    0.000       0
+  0   5389 01:21:30.34   0.8910A   2.0203  -0.9151  -1.0411  0.094  0.00   0.000E+00      0.  0.680E+00  0.102E+00  0.801E-03  0.469E-04   31  16  39    7  25   9   16  18   9    0.000    0.000       0
+  0   5396 01:21:36.58   0.8920A   2.0191  -0.8918  -0.9902  0.094  0.00   0.000E+00      0.  0.679E+00  0.102E+00  0.785E-03  0.406E-04   30  29  18    7  24   9   15  18   9    0.000    0.000       0
+  0   5403 01:21:42.79   0.8850A   2.0347  -0.8116  -0.8965  0.094  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.766E-03  0.375E-04   29  28  24    5  24   9   14  18   9    0.000    0.000       0
+  0   5409 01:21:48.08   0.8790A   2.0473  -0.8413  -0.8107  0.095  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.765E-03  0.415E-04   29  27  28    5  26   9   17  21   9    0.000    0.000       0
+  0   5416 01:21:54.22   0.8750A   2.0569  -0.9005  -1.0032  0.096  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.771E-03  0.439E-04   29  27  33    5  26   9   17  22   9    0.000    0.000       0
+  0   5423 01:22:00.33   0.8730A   2.0611  -0.8527  -1.0182  0.096  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.768E-03  0.416E-04   29  27  39    6  24   9   16  22   9    0.000    0.000       0
+  0   5430 01:22:06.45   0.8740A   2.0606  -0.8687  -0.9521  0.095  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.773E-03  0.444E-04   29  27   4    3  26   9   15  22   9    0.000    0.000       0
+  0   5437 01:22:12.59   0.8810A   2.0437  -0.8520  -0.8606  0.095  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.780E-03  0.469E-04   30  27   9    3  26   9   14  22   9    0.000    0.000       0
+  0   5444 01:22:18.74   0.8770A   2.0532  -0.7988  -0.7754  0.094  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.771E-03  0.459E-04   30  27  14    3  25   9   14  23   9    0.000    0.000       0
+  0   5450 01:22:24.01   0.8770A   2.0532   0.7345  -0.6989  0.093  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.763E-03  0.435E-04   30  27  19   14  14   9   13  22   9    0.000    0.000       0
+  0   5457 01:22:30.16   0.8790A   2.0469   0.7105   0.6293  0.092  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.755E-03  0.397E-04   31  27  24   15  14   9   18  11   9    0.000    0.000       0
+  0   5464 01:22:36.32   0.8800A   2.0452   0.6673  -0.6578  0.092  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.755E-03  0.382E-04   31  27  29   14  15   9   17  20   9    0.000    0.000       0
+  0   5471 01:22:42.48   0.8830A   2.0396   0.7304  -0.7299  0.091  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.761E-03  0.390E-04   31  27  35   10  13   9   17  20   9    0.000    0.000       0
+  0   5478 01:22:48.68   0.8840A   2.0363   0.8266   0.9067  0.090  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.784E-03  0.487E-04   32  27   0   10  14   9   20  29   9    0.000    0.000       0
+  0   5485 01:22:54.86   0.8820A   2.0419  -0.8327   0.9861  0.090  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.819E-03  0.602E-04   31  26   6   16  27   9   20  28   9    0.000    0.000       0
+  0   5491 01:23:00.12   0.8770A   2.0531  -0.9159   0.9025  0.089  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.828E-03  0.629E-04   31  26  11   14  27   9   20  27   9    0.000    0.000       0
+  0   5498 01:23:06.24   0.8720A   2.0641   0.9270  -0.8512  0.090  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.816E-03  0.582E-04   32  26  15   21  29   8   16  22   9    0.000    0.000       0
+  0   5505 01:23:12.34   0.8720A   2.0652   0.8822  -0.9179  0.091  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.810E-03  0.525E-04   32  26  21   22  31  10   16  22   9    0.000    0.000       0
+  0   5512 01:23:18.44   0.8710A   2.0671   0.9264  -0.8567  0.092  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.805E-03  0.511E-04   32  24  37   19  30   9   15  22   9    0.000    0.000       0
+  0   5519 01:23:24.52   0.8650A   2.0805   0.8403  -0.8122  0.092  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.772E-03  0.474E-04   31  24   3   21  33  14   12  20   8    0.000    0.000       0
+  0   5526 01:23:30.54   0.8570A   2.1010   0.7431  -0.8139  0.090  0.00   0.000E+00      0.  0.678E+00  0.105E+00  0.754E-03  0.485E-04   32  25   9   21  34  17   11  22   6    0.000    0.000       0
+  0   5533 01:23:36.49   0.8460A   2.1273  -0.6941  -0.8067  0.087  0.00   0.000E+00      0.  0.679E+00  0.105E+00  0.748E-03  0.485E-04   32  25  14   12  23   9   10  21   5    0.000    0.000       0
+  0   5540 01:23:42.39   0.8420A   2.1381  -0.6689   0.8765  0.086  0.00   0.000E+00      0.  0.679E+00  0.106E+00  0.754E-03  0.460E-04   32  25  19   11  24   8   21  12   9    0.000    0.000       0
+  0   5547 01:23:48.28   0.8450A   2.1313  -0.7631  -0.9441  0.086  0.00   0.000E+00      0.  0.678E+00  0.106E+00  0.776E-03  0.453E-04   32  24  25   23  11   7   17  19   9    0.000    0.000       0
+  0   5554 01:23:54.19   0.8440A   2.1323  -0.7571  -1.1061  0.086  0.00   0.000E+00      0.  0.678E+00  0.106E+00  0.792E-03  0.483E-04   33  26  29   24  10  10   16  18   9    0.000    0.000       0
+  0   5561 01:24:00.13   0.8530A   2.1112  -0.8206  -1.1136  0.086  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.805E-03  0.505E-04   33  26  34   20  14   9   16  19   9    0.000    0.000       0
+  0   5568 01:24:06.14   0.8610A   2.0907   0.8399  -1.1142  0.087  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.812E-03  0.494E-04   28  21  39   20  30   8   16  22   9    0.000    0.000       0
+  0   5575 01:24:12.15   0.8580A   2.0973   0.8428  -1.1522  0.088  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.801E-03  0.442E-04   28  21   4   20  31   9   16  23   9    0.000    0.000       0
+  0   5582 01:24:18.16   0.8580A   2.0968   0.6626  -0.9650  0.088  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.784E-03  0.418E-04   29  21  11   21  32  16   15  23   9    0.000    0.000       0
+  0   5589 01:24:24.18   0.8610A   2.0909   0.6090  -0.8581  0.087  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.781E-03  0.433E-04   29  21  16   21  33  19   15  23   9    0.000    0.000       0
+  0   5596 01:24:30.23   0.8690A   2.0721  -0.6862  -0.7604  0.087  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.783E-03  0.423E-04   29  21  22   18  25   7    6  18   6    0.000    0.000       0
+  0   5603 01:24:36.34   0.8730A   2.0609  -0.6917  -0.7254  0.087  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.791E-03  0.460E-04   30  21  27   17  24   7    4  18   6    0.000    0.000       0
+  0   5610 01:24:42.47   0.8790A   2.0480  -0.6614  -0.6977  0.087  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.803E-03  0.506E-04   30  21  32   12  27   9    4  17   6    0.000    0.000       0
+  0   5617 01:24:48.66   0.8890A   2.0239  -0.7953   0.6613  0.086  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.811E-03  0.507E-04   28  20  13   11  27   9   20  13   9    0.000    0.000       0
+  0   5624 01:24:54.84   0.8770A   2.0524  -0.8736   0.7362  0.085  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.792E-03  0.422E-04   24  23  19   11  26   9   20  10   9    0.000    0.000       0
+  0   5630 01:25:00.05   0.8620A   2.0890  -0.8712   0.6980  0.085  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.783E-03  0.437E-04   25  23  24   10  25   9   20  11   9    0.000    0.000       0
+  0   5637 01:25:06.01   0.8470A   2.1248  -0.8127  -0.6935  0.086  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.787E-03  0.510E-04   25  23  30   10  25   9   17  25   9    0.000    0.000       0
+  0   5645 01:25:12.74   0.8390A   2.1465   0.7636  -0.8837  0.088  0.00   0.000E+00      0.  0.678E+00  0.110E+00  0.784E-03  0.531E-04   25  23  36   17  30   9   17  27   9    0.000    0.000       0
+  0   5652 01:25:18.60   0.8380A   2.1477   0.7591  -0.8451  0.089  0.00   0.000E+00      0.  0.679E+00  0.110E+00  0.781E-03  0.510E-04   25  23   0   13  15   9   17  24   9    0.000    0.000       0
+  0   5659 01:25:24.49   0.8460A   2.1282   0.8293  -0.8280  0.090  0.00   0.000E+00      0.  0.679E+00  0.111E+00  0.795E-03  0.488E-04   25  23   5   12  15   9    7  10   9    0.000    0.000       0
+  0   5666 01:25:30.42   0.8480A   2.1230   0.9365  -0.8720  0.091  0.00   0.000E+00      0.  0.679E+00  0.111E+00  0.800E-03  0.449E-04   27  19  11   12  15   9    7  11   9    0.000    0.000       0
+  0   5673 01:25:36.40   0.8580A   2.0977   0.9788  -0.8308  0.091  0.00   0.000E+00      0.  0.679E+00  0.110E+00  0.824E-03  0.463E-04   27  18  16   13  15   9    6  11   9    0.000    0.000       0
+  0   5680 01:25:42.45   0.8730A   2.0622   0.9493  -0.7791  0.090  0.00   0.000E+00      0.  0.678E+00  0.110E+00  0.843E-03  0.489E-04   27  18  21   12  16   9    6  11   9    0.000    0.000       0
+  0   5687 01:25:48.64   0.8890A   2.0248   0.9021  -0.7361  0.089  0.00   0.000E+00      0.  0.677E+00  0.110E+00  0.849E-03  0.486E-04   26  22  23   12  17   9    6  12   9    0.000    0.000       0
+  0   5693 01:25:54.01   0.9000A   2.0009   0.8326  -0.7406  0.088  0.00   0.000E+00      0.  0.677E+00  0.109E+00  0.848E-03  0.472E-04   26  22  26   11  18   9    7  12   9    0.000    0.000       0
+  0   5700 01:26:00.30   0.9000A   2.0009  -0.8148  -0.7296  0.087  0.00   0.000E+00      0.  0.676E+00  0.109E+00  0.852E-03  0.502E-04   26  21  32   10  27   9    6  13   9    0.000    0.000       0
+  0   5707 01:26:06.62   0.9080A   1.9813  -0.8537  -0.6848  0.084  0.00   0.000E+00      0.  0.676E+00  0.109E+00  0.869E-03  0.504E-04   26  21  36    9  27   9    5  13   9    0.000    0.000       0
+  0   5713 01:26:12.03   0.8920A   2.0180  -0.8441   0.6526  0.081  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.863E-03  0.543E-04   27  17  12    8  27   9   20  11   9    0.000    0.000       0
+  0   5720 01:26:18.25   0.8880A   2.0264   0.8015   0.6681  0.079  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.860E-03  0.571E-04   27  17  17   11  14   3   10   5   0    0.000    0.000       0
+  0   5727 01:26:24.45   0.8810A   2.0441   0.7829  -0.6503  0.078  0.00   0.000E+00      0.  0.676E+00  0.108E+00  0.842E-03  0.542E-04   26  16  20   10  14   5    9  19   5    0.000    0.000       0
+  0   5734 01:26:30.60   0.8800A   2.0465  -0.7133  -0.6820  0.080  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.828E-03  0.519E-04   26  16  25   19  10   9    7  14   9    0.000    0.000       0
+  0   5741 01:26:36.81   0.8920A   2.0187  -0.7617  -0.9138  0.081  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.840E-03  0.556E-04   26  16  30   19  10   9    7  13   9    0.000    0.000       0
+  0   5747 01:26:42.18   0.8950A   2.0115   0.8385  -0.9906  0.083  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.834E-03  0.555E-04   27  26  20   13  14   9    6  14   9    0.000    0.000       0
+  0   5754 01:26:48.45   0.8940A   2.0124   0.8263  -0.9423  0.083  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.819E-03  0.523E-04   28  15   1   13  16   9    5  14   9    0.000    0.000       0
+  0   5761 01:26:54.71   0.8960A   2.0085   0.7704  -0.8105  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.803E-03  0.450E-04   28  15   6   13  17   9    4  15   9    0.000    0.000       0
+  0   5767 01:27:00.09   0.8970A   2.0063  -0.7343  -0.6925  0.083  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.806E-03  0.445E-04   28  15  11   14  27   9    4  15   9    0.000    0.000       0
+  0   5774 01:27:06.39   0.9030A   1.9944  -0.8415   0.6719  0.081  0.00   0.000E+00      0.  0.679E+00  0.108E+00  0.822E-03  0.482E-04   28  15  17   14  26   9   18  10   9    0.000    0.000       0
+  0   5781 01:27:12.70   0.8980A   2.0051  -0.8750   0.7930  0.080  0.00   0.000E+00      0.  0.679E+00  0.108E+00  0.822E-03  0.487E-04   28  21  35   14  26   9   20  11   9    0.000    0.000       0
+  0   5787 01:27:18.10   0.9030A   1.9934  -0.9074   0.8161  0.079  0.00   0.000E+00      0.  0.678E+00  0.108E+00  0.827E-03  0.503E-04   28  21  39   14  25   9   20  12   9    0.000    0.000       0
+  0   5794 01:27:24.42   0.9060A   1.9863  -0.8851  -0.8586  0.079  0.00   0.000E+00      0.  0.677E+00  0.108E+00  0.824E-03  0.501E-04   28  21   5   13  25   9    8  28   9    0.000    0.000       0
+  0   5801 01:27:30.77   0.9080A   1.9817  -0.8205  -0.8542  0.079  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.825E-03  0.496E-04   28  21  10   12  24   9    7  27   9    0.000    0.000       0
+  0   5807 01:27:36.24   0.9130A   1.9720  -0.7607  -0.7984  0.079  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.837E-03  0.527E-04   28  21  14   12  24   9    6  27   9    0.000    0.000       0
+  0   5814 01:27:42.67   0.9250A   1.9464   0.8585  -0.7188  0.079  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.852E-03  0.529E-04   28  21  20   21  19   8    5  27   9    0.000    0.000       0
+  0   5820 01:27:48.26   0.9340A   1.9280  -0.7811   0.6636  0.080  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.876E-03  0.600E-04   31  17  26   20  12   9   13  25  30    0.000    0.000       0
+  0   5827 01:27:54.79   0.9330A   1.9289  -0.7415  -0.7595  0.081  0.00   0.000E+00      0.  0.673E+00  0.106E+00  0.891E-03  0.655E-04   27  14  24   19  12   9   18  14   9    0.000    0.000       0
+  0   5833 01:28:00.39   0.9350A   1.9249  -0.7346  -0.8004  0.080  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.893E-03  0.680E-04   27  13  28   14  26   9   16  15   9    0.000    0.000       0
+  0   5839 01:28:06.00   0.9360A   1.9228  -0.8139   0.7577  0.080  0.00   0.000E+00      0.  0.674E+00  0.106E+00  0.905E-03  0.720E-04   31  18   1   14  25   9   20  27   9    0.000    0.000       0
+  0   5846 01:28:12.54   0.9310A   1.9324  -0.9101  -0.7454  0.080  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.904E-03  0.693E-04   29  17  28   13  26   9    9  24   9    0.000    0.000       0
+  0   5852 01:28:18.10   0.9230A   1.9493  -0.9753  -0.8312  0.081  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.888E-03  0.626E-04   30  18  32   12  24   9   10  26   9    0.000    0.000       0
+  0   5859 01:28:24.51   0.9130A   1.9710  -0.9134  -0.9022  0.080  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.870E-03  0.596E-04   30  18  38   12  23   9    8  25   9    0.000    0.000       0
+  0   5866 01:28:30.90   0.9130A   1.9712  -0.9576  -0.8960  0.079  0.00   0.000E+00      0.  0.679E+00  0.107E+00  0.838E-03  0.516E-04   30  18   3   14  25   9    8  25   9    0.000    0.000       0
+  0   5872 01:28:36.39   0.9150A   1.9665  -1.0062  -0.8404  0.078  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.822E-03  0.471E-04   30  18   8   15  25   9    7  24   9    0.000    0.000       0
+  0   5879 01:28:42.83   0.9240A   1.9489  -0.9809  -0.7346  0.078  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.835E-03  0.500E-04   30  18  14   15  23   9    6  23   9    0.000    0.000       0
+  0   5885 01:28:48.35   0.9150A   1.9681  -0.8863  -0.6531  0.079  0.00   0.000E+00      0.  0.678E+00  0.107E+00  0.823E-03  0.481E-04   27  24   9   15  22   9    6  15   8    0.000    0.000       0
+  0   5892 01:28:54.72   0.9070A   1.9840  -0.9207  -0.6700  0.080  0.00   0.000E+00      0.  0.677E+00  0.107E+00  0.821E-03  0.479E-04   27  24  14   19  25   8   11  21   3    0.000    0.000       0
+  0   5898 01:29:00.15   0.9030A   1.9941  -0.9701  -0.6791  0.082  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.828E-03  0.503E-04   27  23  18   19  24   9   11  21   3    0.000    0.000       0
+  0   5905 01:29:06.48   0.9100A   1.9781  -0.8778  -0.6926  0.083  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.861E-03  0.607E-04   27  23  23   18  24   9   15  27   9    0.000    0.000       0
+  0   5912 01:29:12.90   0.9220A   1.9525   0.8246  -0.7156  0.084  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.884E-03  0.667E-04   27  18   1   20  30   9   14  26   9    0.000    0.000       0
+  0   5918 01:29:18.45   0.9260A   1.9430   0.8332  -0.7721  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.883E-03  0.610E-04   26  22  32   19  31   9   16  22   6    0.000    0.000       0
+  0   5924 01:29:24.02   0.9310A   1.9341   0.7244  -0.8498  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.873E-03  0.511E-04   26  22  37   19  31   9   16  22   8    0.000    0.000       0
+  0   5931 01:29:30.58   0.9440A   1.9061  -0.7638  -0.9683  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.894E-03  0.507E-04   30  19   3   19  15   9   15  20   9    0.000    0.000       0
+  0   5937 01:29:36.24   0.9430A   1.9079  -0.7574  -0.9599  0.086  0.00   0.000E+00      0.  0.676E+00  0.107E+00  0.901E-03  0.547E-04   30  19   7   18  25   7   13  20   9    0.000    0.000       0
+  0   5944 01:29:42.80   0.9330A   1.9285  -0.7946  -0.9513  0.085  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.884E-03  0.538E-04   29  20  13   18  24   8   11  18   8    0.000    0.000       0
+  0   5950 01:29:48.39   0.9300A   1.9355  -0.7658  -0.9569  0.085  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.872E-03  0.518E-04   29  20  18   16  23   8    9  18   8    0.000    0.000       0
+  0   5957 01:29:54.91   0.9310A   1.9344  -0.7433  -0.9876  0.085  0.00   0.000E+00      0.  0.675E+00  0.106E+00  0.873E-03  0.530E-04   29  20  23   15  21   8    8  17   8    0.000    0.000       0
+  0   5963 01:30:00.49   0.9300A   1.9348  -0.7194  -0.9482  0.085  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.877E-03  0.541E-04   33  18  27   12  21   7    6  17   8    0.000    0.000       0
+  0   5969 01:30:06.07   0.9290A   1.9372  -0.8717  -0.8959  0.085  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.884E-03  0.571E-04   33  18  32   13  27   9    9  18   8    0.000    0.000       0
+  0   5976 01:30:12.56   0.9290A   1.9379  -1.0171  -0.8798  0.085  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.885E-03  0.593E-04   33  18  37   13  25   9    8  17   8    0.000    0.000       0
+  0   5982 01:30:18.15   0.9320A   1.9322  -1.0128  -0.8218  0.086  0.00   0.000E+00      0.  0.675E+00  0.105E+00  0.895E-03  0.630E-04   32  19   1   12  23   9    6  17   8    0.000    0.000       0
+  0   5989 01:30:24.63   0.9200A   1.9574  -0.9772   0.8323  0.086  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.898E-03  0.632E-04   28  19  20   11  21   9   10  11   1    0.000    0.000       0
+  0   5995 01:30:30.12   0.9120A   1.9727  -0.8950   0.8380  0.086  0.00   0.000E+00      0.  0.676E+00  0.106E+00  0.910E-03  0.626E-04   28  19  24   10  20   9   11  12   1    0.000    0.000       0
+  0   6002 01:30:36.49   0.9100A   1.9785  -0.7925  -0.7746  0.087  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.928E-03  0.608E-04   28  19  28    9  24   8   10  12   9    0.000    0.000       0
+  0   6009 01:30:42.93   0.9310A   1.9344   0.7814  -0.7763  0.087  0.00   0.000E+00      0.  0.677E+00  0.106E+00  0.955E-03  0.552E-04   28  19  33   12  13   8    9  11   9    0.000    0.000       0
+  0   6015 01:30:48.52   0.9310A   1.9343   0.8955  -0.7993  0.087  0.00   0.000E+00      0.  0.677E+00  0.105E+00  0.958E-03  0.532E-04   31  18  28   12  13   8    9  12   9    0.000    0.000       0
+  0   6021 01:30:54.10   0.9310A   1.9333   0.8846  -0.7270  0.086  0.00   0.000E+00      0.  0.676E+00  0.105E+00  0.957E-03  0.556E-04   31  18  32   11  13   9    9  13   9    0.000    0.000       0
+  0   6028 01:31:00.64   0.9350A   1.9245   0.8788  -0.7197  0.085  0.00   0.000E+00      0.  0.676E+00  0.104E+00  0.947E-03  0.521E-04   29  13  14   10  13   9   11  16   6    0.000    0.000       0
+  0   6034 01:31:06.24   0.9320A   1.9322   0.8621  -0.6726  0.086  0.00   0.000E+00      0.  0.675E+00  0.103E+00  0.926E-03  0.509E-04   27  16  19   10  14   9   14  22   9    0.000    0.000       0
+  0   6041 01:31:12.76   0.9300A   1.9361   0.8221  -0.6671  0.087  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.916E-03  0.530E-04   30  18   9   10  15   9   10  17   6    0.000    0.000       0
+  0   6047 01:31:18.32   0.9270A   1.9422   0.8350  -0.7653  0.088  0.00   0.000E+00      0.  0.674E+00  0.102E+00  0.895E-03  0.510E-04   30  18  13   10  15   9   18  15   9    0.000    0.000       0
+  0   6054 01:31:24.81   0.9270A   1.9416   0.8165  -0.8657  0.089  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.887E-03  0.523E-04   29  16  34   10  16   9   17  16   9    0.000    0.000       0
+  0   6060 01:31:30.35   0.9220A   1.9518   0.7751  -0.7585  0.090  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.866E-03  0.502E-04   29  16  38    9  16   9   16  16   9    0.000    0.000       0
+  0   6067 01:31:36.77   0.9140A   1.9703   0.7356  -0.7818  0.090  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.852E-03  0.523E-04   29  16   4    8  16   9   16  22   9    0.000    0.000       0
+  0   6073 01:31:42.25   0.9140A   1.9690  -0.7324  -0.8013  0.091  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.849E-03  0.529E-04   29  16   9   16  27   9   16  22   9    0.000    0.000       0
+  0   6080 01:31:48.67   0.9190A   1.9576  -0.7683  -0.7447  0.092  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.841E-03  0.495E-04   30  17  35   16  27   9   16  23   9    0.000    0.000       0
+  0   6086 01:31:54.18   0.9180A   1.9614  -0.7161  -0.6994  0.091  0.00   0.000E+00      0.  0.673E+00  0.100E+00  0.843E-03  0.557E-04   30  17  39   16  27   9   17  20   9    0.000    0.000       0
+  0   6093 01:32:00.63   0.9240A   1.9486  -0.6131   0.7510  0.089  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.855E-03  0.638E-04   30  17   4   15  26   9   20  11   9    0.000    0.000       0
+  0   6099 01:32:06.20   0.9320A   1.9310   0.6050  -0.7039  0.088  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.854E-03  0.611E-04   30  17   9    7  16   9   16  22   9    0.000    0.000       0
+  0   6106 01:32:12.77   0.9410A   1.9127   0.6316  -0.6624  0.086  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.860E-03  0.567E-04   35  17   6    6  16   9   12  22   8    0.000    0.000       0
+  0   6112 01:32:18.42   0.9410A   1.9136   0.7061  -0.6623  0.085  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.857E-03  0.497E-04   35  17  11    8  13   9   12  22   8    0.000    0.000       0
+  0   6118 01:32:24.07   0.9440A   1.9074   0.8475  -0.6594  0.085  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.867E-03  0.466E-04   35  17  16    7  14   9    9  21   7    0.000    0.000       0
+  0   6125 01:32:30.70   0.9490A   1.8958   0.9167  -0.6678  0.084  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.887E-03  0.509E-04   35  17  21   11  14   9   10  22   7    0.000    0.000       0
+  0   6131 01:32:36.42   0.9560A   1.8836   0.8743  -0.7102  0.084  0.00   0.000E+00      0.  0.675E+00  0.102E+00  0.896E-03  0.532E-04   35  17  26    7  15   9   17  16   9    0.000    0.000       0
+  0   6137 01:32:42.15   0.9550A   1.8845   0.8654  -0.7058  0.086  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.899E-03  0.498E-04   34  16  38   20  28   8   17  16   9    0.000    0.000       0
+  0   6144 01:32:48.81   0.9440A   1.9068   0.8756  -0.8155  0.089  0.00   0.000E+00      0.  0.674E+00  0.101E+00  0.899E-03  0.457E-04   25  21  20   20  29   9   17  22   9    0.000    0.000       0
+  0   6150 01:32:54.42   0.9300A   1.9364  -0.7182  -0.9393  0.091  0.00   0.000E+00      0.  0.673E+00  0.101E+00  0.874E-03  0.403E-04   25  21  24   18   9   9   17  23   9    0.000    0.000       0
+  0   6157 01:33:00.90   0.9170A   1.9629   0.6916  -0.8984  0.091  0.00   0.000E+00      0.  0.672E+00  0.993E-01  0.858E-03  0.446E-04   26  26  14   19  28   9   16  23   9    0.000    0.000       0
+  0   6163 01:33:06.36   0.9070A   1.9852   0.6644  -0.8669  0.092  0.00   0.000E+00      0.  0.671E+00  0.987E-01  0.849E-03  0.475E-04   26  26  18   13  14   9   16  23   9    0.000    0.000       0
+  0   6170 01:33:12.70   0.9050A   1.9888   0.6588  -0.7853  0.091  0.00   0.000E+00      0.  0.670E+00  0.983E-01  0.845E-03  0.470E-04   26  26  23   13  15   9   15  21   9    0.000    0.000       0
+  0   6176 01:33:18.16   0.9160A   1.9655   0.7497   0.7412  0.090  0.00   0.000E+00      0.  0.670E+00  0.978E-01  0.855E-03  0.454E-04   27  27  28   17  13   9   21  12   9    0.000    0.000       0
+  0   6183 01:33:24.58   0.9120A   1.9728   0.6895  -0.7299  0.089  0.00   0.000E+00      0.  0.669E+00  0.972E-01  0.847E-03  0.435E-04   28  28  34   16  15   9   17  19   9    0.000    0.000       0
+  0   6189 01:33:30.04   0.9100A   1.9771  -0.6717  -0.7625  0.089  0.00   0.000E+00      0.  0.669E+00  0.966E-01  0.844E-03  0.418E-04   28  28  38    3   4   0   16  19   9    0.000    0.000       0
+  0   6196 01:33:36.38   0.9100A   1.9787   0.7729  -0.7411  0.088  0.00   0.000E+00      0.  0.668E+00  0.960E-01  0.831E-03  0.405E-04   28  28   4   12  13   9   16  19   9    0.000    0.000       0
+  0   6203 01:33:42.77   0.9160A   1.9655   0.7985  -0.6580  0.087  0.00   0.000E+00      0.  0.667E+00  0.953E-01  0.821E-03  0.422E-04   28  28   9   12  14   9   15  19   9    0.000    0.000       0
+  0   6209 01:33:48.29   0.9200A   1.9556   0.7708   0.6104  0.086  0.00   0.000E+00      0.  0.667E+00  0.952E-01  0.836E-03  0.554E-04   34  13  12   12  15   9   20  29   9    0.000    0.000       0
+  0   6216 01:33:54.74   0.9200A   1.9571   0.7287   0.7064  0.086  0.00   0.000E+00      0.  0.668E+00  0.957E-01  0.830E-03  0.609E-04   34  12  18   11  16   9   20  28   9    0.000    0.000       0
+  0   6222 01:34:00.24   0.9160A   1.9653   0.7116   0.6636  0.086  0.00   0.000E+00      0.  0.668E+00  0.960E-01  0.825E-03  0.602E-04   34  12  23   21  31   7   20  29   9    0.000    0.000       0
+  0   6229 01:34:06.65   0.9170A   1.9622   0.7669  -0.6786  0.087  0.00   0.000E+00      0.  0.669E+00  0.964E-01  0.829E-03  0.558E-04   34  12  30   20  30   8   17  18   9    0.000    0.000       0
+  0   6235 01:34:12.16   0.9160A   1.9649   0.8569  -0.8982  0.088  0.00   0.000E+00      0.  0.670E+00  0.964E-01  0.831E-03  0.539E-04   34  11  33   20  31   9   17  17   9    0.000    0.000       0
+  0   6242 01:34:18.56   0.9150A   1.9662   0.7583  -0.8780  0.089  0.00   0.000E+00      0.  0.670E+00  0.960E-01  0.811E-03  0.510E-04   34  11  39   19  31   9   16  17   9    0.000    0.000       0
+  0   6248 01:34:24.07   0.9200A   1.9558   0.6987  -0.8001  0.089  0.00   0.000E+00      0.  0.669E+00  0.956E-01  0.784E-03  0.484E-04   34  11   5   19  31   9   16  21   9    0.000    0.000       0
+  0   6255 01:34:30.54   0.9260A   1.9445   0.6825  -0.7881  0.088  0.00   0.000E+00      0.  0.669E+00  0.952E-01  0.771E-03  0.491E-04   34  10  10   19  31   9   15  19   8    0.000    0.000       0
+  0   6261 01:34:36.10   0.9270A   1.9428   0.7828  -0.7729  0.087  0.00   0.000E+00      0.  0.669E+00  0.951E-01  0.767E-03  0.518E-04   34  10  15   17  13   9   14  19   8    0.000    0.000       0
+  0   6268 01:34:42.60   0.9310A   1.9342   0.8069  -0.7790  0.087  0.00   0.000E+00      0.  0.669E+00  0.950E-01  0.759E-03  0.493E-04   35  10  21   16  14   9   12  20   8    0.000    0.000       0
+  0   6274 01:34:48.19   0.9330A   1.9287   0.7949  -0.7954  0.086  0.00   0.000E+00      0.  0.669E+00  0.950E-01  0.758E-03  0.477E-04   35  10  26   15  15   9   11  20   7    0.000    0.000       0
+  0   6281 01:34:54.74   0.9360A   1.9222   0.7403  -0.8197  0.086  0.00   0.000E+00      0.  0.669E+00  0.951E-01  0.762E-03  0.466E-04   35   9  31   14  16   9    9  20   7    0.000    0.000       0
+  0   6287 01:35:00.37   0.9400A   1.9145  -0.8447  -0.8290  0.086  0.00   0.000E+00      0.  0.669E+00  0.951E-01  0.761E-03  0.443E-04   35   9  36   17  27   9    8  19   7    0.000    0.000       0
+  0   6294 01:35:06.92   0.9330A   1.9288  -0.9117  -0.8590  0.087  0.00   0.000E+00      0.  0.669E+00  0.947E-01  0.745E-03  0.416E-04   31  29  20   18  27   9    7  19   7    0.000    0.000       0
+  0   6300 01:35:12.51   0.9290A   1.9376  -0.8316  -0.8769  0.088  0.00   0.000E+00      0.  0.668E+00  0.942E-01  0.731E-03  0.406E-04   31  29  25   17  26   9    6  19   7    0.000    0.000       0
+  0   6306 01:35:18.07   0.9260A   1.9439   0.7082  -0.8905  0.087  0.00   0.000E+00      0.  0.668E+00  0.938E-01  0.722E-03  0.401E-04   31  29  30   12  14   9    6  19   8    0.000    0.000       0
+  0   6313 01:35:24.54   0.9240A   1.9478   0.7050  -0.8538  0.087  0.00   0.000E+00      0.  0.668E+00  0.936E-01  0.734E-03  0.489E-04   31  29  36   12  15   9    5  19   8    0.000    0.000       0
+  0   6319 01:35:30.09   0.9240A   1.9470   0.7087  -0.7986  0.086  0.00   0.000E+00      0.  0.669E+00  0.938E-01  0.740E-03  0.524E-04   30  28   0   11  14   9    4  19   8    0.000    0.000       0
+  0   6326 01:35:36.57   0.9270A   1.9411   0.8267  -0.7050  0.086  0.00   0.000E+00      0.  0.669E+00  0.937E-01  0.734E-03  0.472E-04   30  28   5   10  14   9    3  19   8    0.000    0.000       0
+  0   6332 01:35:42.14   0.9300A   1.9362   0.8649  -0.7357  0.087  0.00   0.000E+00      0.  0.669E+00  0.933E-01  0.729E-03  0.436E-04   32  28  11   10  15   9    7  27   9    0.000    0.000       0
+  0   6339 01:35:48.66   0.9310A   1.9332   0.8083  -0.7492  0.087  0.00   0.000E+00      0.  0.669E+00  0.930E-01  0.717E-03  0.421E-04   32  28  17   10  16   9    6  27   9    0.000    0.000       0
+  0   6345 01:35:54.25   0.9320A   1.9304   0.7131  -0.7606  0.086  0.00   0.000E+00      0.  0.669E+00  0.929E-01  0.716E-03  0.441E-04   32  28  22   10  16   9    5  27   9    0.000    0.000       0
+  0   6352 01:36:00.78   0.9330A   1.9295  -0.7018   0.7103  0.085  0.00   0.000E+00      0.  0.669E+00  0.928E-01  0.722E-03  0.473E-04   31  29  28   10  27   8   20  29   9    0.000    0.000       0
+  0   6358 01:36:06.38   0.9340A   1.9278  -0.7741   0.8692  0.084  0.00   0.000E+00      0.  0.669E+00  0.928E-01  0.718E-03  0.484E-04   30  29  33   11  26   8   20  28   9    0.000    0.000       0
+  0   6365 01:36:12.92   0.9340A   1.9262  -0.8439   0.7122  0.084  0.00   0.000E+00      0.  0.669E+00  0.931E-01  0.712E-03  0.506E-04   30  29  39   11  26   9   20  26   9    0.000    0.000       0
+  0   6371 01:36:18.54   0.9360A   1.9238  -0.8312  -0.5698  0.084  0.00   0.000E+00      0.  0.670E+00  0.934E-01  0.709E-03  0.498E-04   30  29   4   11  25   9    5  23   8    0.000    0.000       0
+  0   6377 01:36:24.15   0.9360A   1.9236  -0.7762  -0.5405  0.083  0.00   0.000E+00      0.  0.670E+00  0.936E-01  0.697E-03  0.464E-04   30  29   9   12  25   9    4  22   8    0.000    0.000       0
+  0   6384 01:36:30.70   0.9360A   1.9229  -0.7790  -0.6126  0.084  0.00   0.000E+00      0.  0.671E+00  0.936E-01  0.683E-03  0.443E-04   30  29  14   11  25   9   14  24   4    0.000    0.000       0
+  0   6390 01:36:36.31   0.9360A   1.9221  -0.7904  -0.6601  0.084  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.672E-03  0.431E-04   30  29  19   11  25   9   13  23   3    0.000    0.000       0
+  0   6397 01:36:42.87   0.9390A   1.9177  -0.7909  -0.7082  0.083  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.672E-03  0.437E-04   30  29  25   11  25   9   12  23   4    0.000    0.000       0
+  0   6403 01:36:48.52   0.9430A   1.9093  -0.7717  -0.7329  0.083  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.672E-03  0.435E-04   30  29  30   11  24   9   11  23   4    0.000    0.000       0
+  0   6409 01:36:54.19   0.9470A   1.9006  -0.7272  -0.6938  0.083  0.00   0.000E+00      0.  0.671E+00  0.937E-01  0.676E-03  0.439E-04   30  29  35   11  24   9   10  23   4    0.000    0.000       0
+  0   6416 01:37:00.83   0.9500A   1.8948  -0.6711  -0.6298  0.083  0.00   0.000E+00      0.  0.670E+00  0.938E-01  0.683E-03  0.439E-04   31  29   1   11  23   9   10  23   4    0.000    0.000       0
+  0   6422 01:37:06.53   0.9470A   1.9007  -0.6307  -0.7407  0.084  0.00   0.000E+00      0.  0.671E+00  0.943E-01  0.698E-03  0.467E-04   36  26   0   11  23   9   17  22   9    0.000    0.000       0
+  0   6428 01:37:12.19   0.9410A   1.9132   0.6011  -0.8974  0.085  0.00   0.000E+00      0.  0.671E+00  0.946E-01  0.704E-03  0.455E-04   36  26   4   20  28   9   17  21   9    0.000    0.000       0
+  0   6435 01:37:18.71   0.9260A   1.9440   0.5997  -0.9549  0.085  0.00   0.000E+00      0.  0.671E+00  0.947E-01  0.705E-03  0.451E-04   29  29  19   20  27   9   16  21   9    0.000    0.000       0
+  0   6441 01:37:24.24   0.9180A   1.9599  -0.6510  -0.9653  0.085  0.00   0.000E+00      0.  0.671E+00  0.947E-01  0.708E-03  0.481E-04   29  29  23    8  27   9   16  20   9    0.000    0.000       0
+  0   6448 01:37:30.65   0.9140A   1.9683  -0.6832  -0.9251  0.085  0.00   0.000E+00      0.  0.671E+00  0.949E-01  0.722E-03  0.546E-04   29  29  28    7  27   9   16  19   9    0.000    0.000       0
+  0   6454 01:37:36.13   0.9100A   1.9771  -0.6660  -0.8460  0.085  0.00   0.000E+00      0.  0.672E+00  0.952E-01  0.723E-03  0.549E-04   37  25  23   20  21   8   15  19   9    0.000    0.000       0
+  0   6461 01:37:42.49   0.9080A   1.9819   0.6937  -0.7301  0.085  0.00   0.000E+00      0.  0.672E+00  0.955E-01  0.710E-03  0.430E-04   37  25  28   13  14   9   11  20   8    0.000    0.000       0
+  0   6468 01:37:48.85   0.9100A   1.9789   0.8061  -0.7493  0.085  0.00   0.000E+00      0.  0.672E+00  0.953E-01  0.699E-03  0.367E-04   37  25  34   11  14   9   17  24   9    0.000    0.000       0
+  0   6474 01:37:54.31   0.9100A   1.9791   0.8459  -0.7052  0.084  0.00   0.000E+00      0.  0.671E+00  0.952E-01  0.715E-03  0.407E-04   37  26  37   10  15   9   16  24   9    0.000    0.000       0
+  0   6481 01:38:00.66   0.9030A   1.9944   0.7660  -0.6646  0.082  0.00   0.000E+00      0.  0.671E+00  0.952E-01  0.725E-03  0.451E-04   34  29   2   10  17   9    7  20   6    0.000    0.000       0
+  0   6487 01:38:06.05   0.8940A   2.0126   0.6671  -0.6278  0.082  0.00   0.000E+00      0.  0.671E+00  0.954E-01  0.713E-03  0.453E-04   34  29   7    9  18   8    7  20   5    0.000    0.000       0
+  0   6494 01:38:12.28   0.8870A   2.0294   0.6428  -0.6409  0.080  0.00   0.000E+00      0.  0.671E+00  0.957E-01  0.719E-03  0.498E-04   34  29  12   11  15   9   12  23   8    0.000    0.000       0
+  0   6501 01:38:18.46   0.8800A   2.0448   0.6458  -0.6395  0.080  0.00   0.000E+00      0.  0.672E+00  0.963E-01  0.720E-03  0.510E-04   34  29  18   13  14   9   10  22   8    0.000    0.000       0
+  0   6508 01:38:24.62   0.8830A   2.0387   0.8555  -0.6608  0.081  0.00   0.000E+00      0.  0.672E+00  0.969E-01  0.733E-03  0.502E-04   34  29  23   20  30   9    7  17   7    0.000    0.000       0
+  0   6515 01:38:30.81   0.8840A   2.0353   0.8150  -0.7310  0.082  0.00   0.000E+00      0.  0.673E+00  0.973E-01  0.734E-03  0.458E-04   35  29  29   18  30   9   17  27   9    0.000    0.000       0
+  0   6521 01:38:36.13   0.8880A   2.0279   0.6730  -0.7951  0.083  0.00   0.000E+00      0.  0.673E+00  0.975E-01  0.738E-03  0.462E-04   35  29  34   17  30   9   17  21   9    0.000    0.000       0
+  0   6528 01:38:42.36   0.8920A   2.0178   0.6531  -0.8015  0.083  0.00   0.000E+00      0.  0.673E+00  0.977E-01  0.742E-03  0.470E-04   35  29  39   16  31   9   16  21   9    0.000    0.000       0
+  0   6535 01:38:48.60   0.8910A   2.0210  -0.7032  -0.7844  0.083  0.00   0.000E+00      0.  0.673E+00  0.976E-01  0.760E-03  0.517E-04   36  29   5   12  26   9   17  18   9    0.000    0.000       0
+  0   6542 01:38:54.83   0.8900A   2.0220  -0.7522  -0.7503  0.084  0.00   0.000E+00      0.  0.673E+00  0.977E-01  0.772E-03  0.554E-04   36  29  10   11  26   9   16  18   9    0.000    0.000       0
+  0   6548 01:39:00.19   0.8940A   2.0145  -0.7578   0.7475  0.085  0.00   0.000E+00      0.  0.672E+00  0.979E-01  0.776E-03  0.541E-04   37  29  15   10  25   9   21  12   9    0.000    0.000       0
+  0   6555 01:39:06.46   0.8980A   2.0039  -0.6934  -0.9424  0.086  0.00   0.000E+00      0.  0.672E+00  0.980E-01  0.773E-03  0.545E-04   37  29  20    9  24   9   17  25   9    0.000    0.000       0
+  0   6562 01:39:12.78   0.9020A   1.9957  -0.6731  -0.9536  0.086  0.00   0.000E+00      0.  0.672E+00  0.983E-01  0.776E-03  0.556E-04   36  27  33   10  26   9   16  23   9    0.000    0.000       0
+  0   6568 01:39:18.17   0.8980A   2.0046  -0.7120  -0.8558  0.086  0.00   0.000E+00      0.  0.673E+00  0.987E-01  0.781E-03  0.584E-04   36  27  38   10  26   9   15  22   9    0.000    0.000       0
+  0   6575 01:39:24.44   0.8940A   2.0130  -0.7602   0.8443  0.086  0.00   0.000E+00      0.  0.674E+00  0.994E-01  0.793E-03  0.628E-04   36  27   3    9  26   9   22  13   9    0.000    0.000       0
+  0   6582 01:39:30.70   0.8930A   2.0165  -0.8142   0.7791  0.085  0.00   0.000E+00      0.  0.675E+00  0.100E+00  0.805E-03  0.661E-04   37  27   7    9  26   9   22  13   9    0.000    0.000       0
+  0   6588 01:39:36.03   0.8880A   2.0276  -0.8742   0.7914  0.084  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.801E-03  0.646E-04   37  27  12    8  25   9   24  13  10    0.000    0.000       0
+  0   6595 01:39:42.24   0.8860A   2.0319  -0.8767  -0.7020  0.084  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.804E-03  0.619E-04   37  27  18    8  25   9   17  18   9    0.000    0.000       0
+  0   6602 01:39:48.45   0.8870A   2.0285  -0.9001  -0.8294  0.084  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.799E-03  0.552E-04   37  27  24   20  11   8   16  18   9    0.000    0.000       0
+  0   6609 01:39:54.67   0.8920A   2.0189  -0.9808  -0.8523  0.084  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.804E-03  0.514E-04   37  27  30   20  10   9   15  18   9    0.000    0.000       0
+  0   6615 01:40:00.03   0.8960A   2.0097  -0.8954  -0.8445  0.086  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.808E-03  0.486E-04   37  27  35   19   9   9   15  20   9    0.000    0.000       0
+  0   6622 01:40:06.32   0.9000A   1.9997  -0.8439  -0.9458  0.087  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.809E-03  0.472E-04   37  27   1   21   7  15   17  23   9    0.000    0.000       0
+  0   6629 01:40:12.64   0.9040A   1.9912  -0.7649  -1.0854  0.088  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.808E-03  0.453E-04   37  26   8   21   6  18   17  24   9    0.000    0.000       0
+  0   6635 01:40:18.06   0.9030A   1.9930  -0.7389  -1.0279  0.088  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.802E-03  0.446E-04   37  26  13   23   6  25   16  24   9    0.000    0.000       0
+  0   6642 01:40:24.38   0.9020A   1.9952  -0.7235  -0.8721  0.088  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.791E-03  0.428E-04   37  26  18   23   5  29   16  25   9    0.000    0.000       0
+  0   6649 01:40:30.69   0.9020A   1.9956   0.7436  -0.6946  0.087  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.788E-03  0.441E-04   37  26  24    3  12   9   16  25   9    0.000    0.000       0
+  0   6655 01:40:36.11   0.9050A   1.9885   0.7241  -0.6872  0.086  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.796E-03  0.476E-04   37  26  29    3  13   9   13  18   8    0.000    0.000       0
+  0   6662 01:40:42.47   0.9120A   1.9743  -0.6801  -0.6708  0.085  0.00   0.000E+00      0.  0.676E+00  0.102E+00  0.803E-03  0.523E-04   37  26  34   23   4  39   12  18   8    0.000    0.000       0
+  0   6669 01:40:48.85   0.9090A   1.9799  -0.8154   0.8189  0.082  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.833E-03  0.636E-04   33  29   2    9  26   9   20  28   9    0.000    0.000       0
+  0   6675 01:40:54.30   0.9070A   1.9854  -0.9178   0.9012  0.080  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.856E-03  0.693E-04   33  29   7    9  25   9   20  28   9    0.000    0.000       0
+  0   6682 01:41:00.63   0.9040A   1.9922  -0.9614  -0.8388  0.079  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.840E-03  0.611E-04   33  29  12    9  24   9    5  26   9    0.000    0.000       0
+  0   6688 01:41:06.05   0.9030A   1.9923  -0.8995  -0.7388  0.078  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.831E-03  0.549E-04   33  29  17    9  24   9   11  18   8    0.000    0.000       0
+  0   6695 01:41:12.39   0.9060A   1.9858  -0.8461  -0.7489  0.078  0.00   0.000E+00      0.  0.679E+00  0.103E+00  0.841E-03  0.540E-04   33  29  22    8  25   9    9  18   7    0.000    0.000       0
+  0   6702 01:41:18.74   0.9100A   1.9783  -0.8406  -0.9506  0.079  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.855E-03  0.541E-04   33  29  28    8  26   9   17  21   9    0.000    0.000       0
+  0   6708 01:41:24.22   0.9140A   1.9686  -0.8071  -1.0346  0.080  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.873E-03  0.561E-04   33  29  33    9  26   9   17  22   9    0.000    0.000       0
+  0   6715 01:41:30.64   0.9190A   1.9595  -0.7387  -1.0323  0.080  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.889E-03  0.604E-04   33  29  38    9  25   9   17  22   9    0.000    0.000       0
+  0   6721 01:41:36.13   0.9130A   1.9708   0.7480  -0.8913  0.079  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.885E-03  0.617E-04   30  20  12   13  14   9   17  22   9    0.000    0.000       0
+  0   6728 01:41:42.50   0.9090A   1.9799  -0.8274  -0.7256  0.078  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.886E-03  0.616E-04   30  20  18   21  25   8   15  21   9    0.000    0.000       0
+  0   6735 01:41:48.88   0.9130A   1.9712  -0.8777  -0.6395  0.077  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.879E-03  0.541E-04   30  20  23   20  24   8    3  22   0    0.000    0.000       0
+  0   6741 01:41:54.38   0.9180A   1.9597  -0.7446  -0.6184  0.077  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.865E-03  0.467E-04   30  29   6   20  24   8    9  16   9    0.000    0.000       0
+  0   6748 01:42:00.81   0.9210A   1.9544   0.6827  -0.6382  0.077  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.869E-03  0.490E-04   30  29  11   11  16   7   11  29   9    0.000    0.000       0
+  0   6754 01:42:06.33   0.9200A   1.9565  -0.8117   0.8192  0.077  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.882E-03  0.540E-04   34  27  29   18  27   9   20  28   9    0.000    0.000       0
+  0   6761 01:42:12.77   0.9190A   1.9589  -0.8723   0.7916  0.076  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.875E-03  0.537E-04   31  26  36   18  25   9   20  28   9    0.000    0.000       0
+  0   6767 01:42:18.28   0.9170A   1.9619   0.8610  -0.7084  0.076  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.869E-03  0.555E-04   31  26   1    5  14   9   17  16   9    0.000    0.000       0
+  0   6774 01:42:24.70   0.9170A   1.9629   0.7794  -0.8328  0.076  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.870E-03  0.536E-04   31  26   6   13  12   9   17  16   9    0.000    0.000       0
+  0   6780 01:42:30.19   0.9150A   1.9671  -0.9168  -0.8373  0.076  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.881E-03  0.574E-04   31  26  12   19   9   9    3  11   9    0.000    0.000       0
+  0   6787 01:42:36.58   0.9140A   1.9701  -0.9008  -0.8032  0.077  0.00   0.000E+00      0.  0.678E+00  0.100E+00  0.909E-03  0.735E-04   31  26  17   18   9   9    3  11   9    0.000    0.000       0
+  0   6793 01:42:42.06   0.9140A   1.9689   0.7962  -0.7835  0.078  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.909E-03  0.770E-04   29  25  19   11  15   9   17  21   9    0.000    0.000       0
+  0   6800 01:42:48.48   0.9190A   1.9593   0.8172  -0.8376  0.080  0.00   0.000E+00      0.  0.680E+00  0.101E+00  0.893E-03  0.690E-04   31  26  28   13  14   9   17  23   9    0.000    0.000       0
+  0   6806 01:42:54.00   0.9210A   1.9554  -0.8447  -0.8277  0.080  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.883E-03  0.622E-04   31  26  33   11  27   9   16  22   9    0.000    0.000       0
+  0   6813 01:43:00.46   0.9220A   1.9514  -0.9895  -0.8383  0.080  0.00   0.000E+00      0.  0.680E+00  0.100E+00  0.864E-03  0.554E-04   31  26  39   11  26   9   17  18   9    0.000    0.000       0
+  0   6820 01:43:06.90   0.9200A   1.9564  -0.9538  -0.7791  0.081  0.00   0.000E+00      0.  0.680E+00  0.999E-01  0.840E-03  0.480E-04   35  29  36   11  26   9   17  17   9    0.000    0.000       0
+  0   6826 01:43:12.41   0.9160A   1.9657  -0.8570  -0.7343  0.080  0.00   0.000E+00      0.  0.679E+00  0.995E-01  0.829E-03  0.471E-04   31  25  11   10  25   9   17  17   9    0.000    0.000       0
+  0   6833 01:43:18.78   0.9070A   1.9855   0.7623   0.7649  0.079  0.00   0.000E+00      0.  0.678E+00  0.993E-01  0.830E-03  0.498E-04   31  26  17    8  16   9   20  27   9    0.000    0.000       0
+  0   6839 01:43:24.21   0.9040A   1.9916   0.7224  -0.6972  0.079  0.00   0.000E+00      0.  0.678E+00  0.994E-01  0.828E-03  0.516E-04   31  25  21    8  17   9    5  21   6    0.000    0.000       0
+  0   6846 01:43:30.54   0.9050A   1.9882   0.7363  -0.6914  0.078  0.00   0.000E+00      0.  0.678E+00  0.996E-01  0.826E-03  0.496E-04   31  26  27    9  14   9    5  21   7    0.000    0.000       0
+  0   6853 01:43:36.89   0.9090A   1.9802   0.7810  -0.6779  0.079  0.00   0.000E+00      0.  0.678E+00  0.997E-01  0.814E-03  0.453E-04   31  25  32    8  15   9    4  21   7    0.000    0.000       0
+  0   6859 01:43:42.37   0.9150A   1.9667   0.7639  -0.6833  0.080  0.00   0.000E+00      0.  0.678E+00  0.997E-01  0.811E-03  0.431E-04   31  25  37    8  15   9    4  21   8    0.000    0.000       0
+  0   6866 01:43:48.79   0.9150A   1.9662   0.8125  -0.6489  0.081  0.00   0.000E+00      0.  0.678E+00  0.997E-01  0.822E-03  0.492E-04   30  37  32    7  14   9   18  13   9    0.000    0.000       0
+  0   6872 01:43:54.27   0.9130A   1.9705   0.7584  -0.7102  0.082  0.00   0.000E+00      0.  0.677E+00  0.998E-01  0.817E-03  0.476E-04   30  37  37    7  15   9   18  13   9    0.000    0.000       0
+  0   6879 01:44:00.67   0.9130A   1.9708  -0.7842  -0.5703  0.082  0.00   0.000E+00      0.  0.677E+00  0.996E-01  0.812E-03  0.477E-04   31  31  17   12  27   9   18  12   9    0.000    0.000       0
+  0   6885 01:44:06.13   0.9100A   1.9777  -0.7940  -0.4992  0.082  0.00   0.000E+00      0.  0.677E+00  0.998E-01  0.817E-03  0.539E-04   29  38   7   12  26   9    8  12   9    0.000    0.000       0
+  0   6892 01:44:12.49   0.9080A   1.9834   0.7499  -0.5340  0.082  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.816E-03  0.545E-04   29  38  13   12  14   9    9  11   9    0.000    0.000       0
+  0   6899 01:44:18.84   0.9070A   1.9846   0.7317  -0.7048  0.082  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.826E-03  0.552E-04   32  31  34   12  15   9   18  19   9    0.000    0.000       0
+  0   6905 01:44:24.28   0.9060A   1.9869  -0.6955  -0.9149  0.083  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.830E-03  0.547E-04   28  34  11   19  16   9   17  20   9    0.000    0.000       0
+  0   6912 01:44:30.62   0.9040A   1.9905   0.6331  -0.9451  0.084  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.823E-03  0.497E-04   28  34  16   20  18   6   16  21   9    0.000    0.000       0
+  0   6918 01:44:36.05   0.9090A   1.9793   0.7097  -0.8799  0.084  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.823E-03  0.450E-04   28  34  20   19  25   9   15  21   9    0.000    0.000       0
+  0   6925 01:44:42.41   0.9090A   1.9802   0.6654  -0.8020  0.084  0.00   0.000E+00      0.  0.678E+00  0.101E+00  0.810E-03  0.392E-04   31  37   2   19  26   9   17  20   9    0.000    0.000       0
+  0   6932 01:44:48.78   0.9100A   1.9790   0.7504  -0.8129  0.084  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.802E-03  0.396E-04   31  37   8    9  13   9   16  19   9    0.000    0.000       0
+  0   6938 01:44:54.24   0.9100A   1.9771   0.7305  -0.7729  0.083  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.799E-03  0.417E-04   29  33  24    9  14   9   15  19   9    0.000    0.000       0
+  0   6945 01:45:00.61   0.9100A   1.9772   0.7036  -0.6983  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.808E-03  0.478E-04   29  33  30    7  13   9   14  19   9    0.000    0.000       0
+  0   6951 01:45:06.08   0.9110A   1.9767   0.7465  -0.7451  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.822E-03  0.544E-04   34  25  28    6  13   9   13  20   8    0.000    0.000       0
+  0   6958 01:45:12.46   0.9120A   1.9737   0.7076  -0.7645  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.822E-03  0.525E-04   29  37  29    6  14   9   16  18   9    0.000    0.000       0
+  0   6965 01:45:18.84   0.9110A   1.9752   0.7488  -0.7951  0.081  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.837E-03  0.554E-04   28  38  20   13  14   9   17  15   9    0.000    0.000       0
+  0   6971 01:45:24.31   0.9120A   1.9730   0.8502  -0.8411  0.081  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.846E-03  0.577E-04   29  37   0   13  15   9   16  16   9    0.000    0.000       0
+  0   6978 01:45:30.70   0.9150A   1.9682   0.8338  -0.8439  0.081  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.845E-03  0.557E-04   27  27  30   12  16   9   16  16   9    0.000    0.000       0
+  0   6984 01:45:36.19   0.9140A   1.9695   0.7419  -0.8001  0.082  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.842E-03  0.548E-04   27  27  34   11  17   9   15  16   9    0.000    0.000       0
+  0   6991 01:45:42.62   0.9220A   1.9531  -0.7449  -1.0026  0.083  0.00   0.000E+00      0.  0.678E+00  0.102E+00  0.845E-03  0.524E-04   30  33  28    7  26   9   17  21   9    0.000    0.000       0
+  0   6997 01:45:48.15   0.9230A   1.9496  -0.7447  -1.1484  0.084  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.837E-03  0.488E-04   30  33  33    7  26   9   16  22   9    0.000    0.000       0
+  0   7004 01:45:54.63   0.9260A   1.9431   0.7554  -1.0524  0.084  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.844E-03  0.525E-04   32  34  36   19  26   9   16  23   9    0.000    0.000       0
+  0   7010 01:46:00.14   0.9090A   1.9796  -0.8497  -0.9214  0.083  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.835E-03  0.567E-04   26  24  17   21  27   8   15  23   9    0.000    0.000       0
+  0   7017 01:46:06.43   0.8900A   2.0222   0.9991  -0.8051  0.083  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.813E-03  0.562E-04   26  24  21   14  13   9   13  20   9    0.000    0.000       0
+  0   7024 01:46:12.67   0.8930A   2.0162   1.0631  -0.7513  0.082  0.00   0.000E+00      0.  0.676E+00  0.101E+00  0.827E-03  0.600E-04   26  23  26   13  14   9    4  19   7    0.000    0.000       0
+  0   7030 01:46:18.03   0.8910A   2.0212   1.0038  -0.6901  0.082  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.836E-03  0.623E-04   27  24  30   12  14   9    3  19   6    0.000    0.000       0
+  0   7037 01:46:24.22   0.8770A   2.0525   0.9472  -0.6965  0.083  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.831E-03  0.596E-04   29  26  34   11  15   9    8  18   8    0.000    0.000       0
+  0   7044 01:46:30.33   0.8720A   2.0630   0.9123  -0.7368  0.083  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.836E-03  0.568E-04   29  26  39   10  14   9   17  16   9    0.000    0.000       0
+  0   7051 01:46:36.48   0.8820A   2.0408  -0.8950  -0.8694  0.084  0.00   0.000E+00      0.  0.678E+00  0.103E+00  0.856E-03  0.554E-04   29  26   4   19  10   9   16  16   9    0.000    0.000       0
+  0   7058 01:46:42.62   0.8740A   2.0596  -0.8500  -0.8942  0.085  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.855E-03  0.502E-04   29  25   8   17   9   9   17  17   9    0.000    0.000       0
+  0   7065 01:46:48.72   0.8680A   2.0740   0.7257  -1.0585  0.084  0.00   0.000E+00      0.  0.677E+00  0.103E+00  0.860E-03  0.508E-04   29  25  13    8  19   8   16  18   9    0.000    0.000       0
+  0   7072 01:46:54.75   0.8620A   2.0877  -0.6755  -1.1775  0.084  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.872E-03  0.549E-04   28  24  18   24  21   8   16  20   9    0.000    0.000       0
+  0   7079 01:47:00.79   0.8670A   2.0761   0.8086  -1.0928  0.084  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.881E-03  0.564E-04   28  24  22   19  23   9   14  20   9    0.000    0.000       0
+  0   7085 01:47:06.03   0.8830A   2.0388  -0.8161  -0.9722  0.083  0.00   0.000E+00      0.  0.677E+00  0.102E+00  0.908E-03  0.564E-04   29  26  27    7  25   9   13  20   9    0.000    0.000       0
+  0   7092 01:47:12.22   0.8860A   2.0314  -0.8997  -0.8554  0.083  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.948E-03  0.634E-04   28  25  32    6  24   9   12  20   9    0.000    0.000       0
+  0   7099 01:47:18.47   0.8960A   2.0090  -0.9283  -0.8369  0.082  0.00   0.000E+00      0.  0.677E+00  0.101E+00  0.961E-03  0.600E-04   28  25  37    6  24   9   10  12   9    0.000    0.000       0
+  0   7106 01:47:24.79   0.9090A   1.9796  -0.8764   0.9396  0.081  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.956E-03  0.544E-04   28  25   2    6  24   9   18  31   8    0.000    0.000       0
+  0   7112 01:47:30.26   0.9120A   1.9731  -0.7798  -0.8951  0.079  0.00   0.000E+00      0.  0.676E+00  0.995E-01  0.939E-03  0.514E-04   28  26   6    6  24   9   16  23   8    0.000    0.000       0
+  0   7119 01:47:36.64   0.9120A   1.9738   0.7621  -0.7672  0.079  0.00   0.000E+00      0.  0.676E+00  0.991E-01  0.923E-03  0.519E-04   28  26  11   16  15   9   16  23   9    0.000    0.000       0
+  0   7125 01:47:42.13   0.9180A   1.9609  -0.7729  -0.7322  0.081  0.00   0.000E+00      0.  0.676E+00  0.988E-01  0.925E-03  0.540E-04   33  37  16   20   9   9   17  15   8    0.000    0.000       0
+  0   7132 01:47:48.56   0.9210A   1.9545  -0.8615  -0.8335  0.082  0.00   0.000E+00      0.  0.676E+00  0.988E-01  0.929E-03  0.547E-04   33  37  21   20  26   9   17  16   9    0.000    0.000       0
+  0   7138 01:47:54.10   0.9260A   1.9434  -0.8801  -0.7808  0.082  0.00   0.000E+00      0.  0.676E+00  0.987E-01  0.937E-03  0.533E-04   33  37  26   20  25   9   18  12   9    0.000    0.000       0
+  0   7145 01:48:00.59   0.9280A   1.9407  -0.9371  -0.6506  0.082  0.00   0.000E+00      0.  0.677E+00  0.984E-01  0.947E-03  0.564E-04   26  16  37   13  26   9   18  11   9    0.000    0.000       0
+  0   7151 01:48:06.15   0.9270A   1.9428  -0.9847   0.7420  0.081  0.00   0.000E+00      0.  0.677E+00  0.982E-01  0.955E-03  0.588E-04   32  36  37   13  25   9   18   9   8    0.000    0.000       0
+  0   7158 01:48:12.61   0.9220A   1.9524  -1.0661  -0.7337  0.080  0.00   0.000E+00      0.  0.677E+00  0.978E-01  0.947E-03  0.563E-04   25  30   6   11  25   9    5  28   9    0.000    0.000       0
+  0   7164 01:48:18.18   0.9300A   1.9356  -1.1524  -0.7141  0.078  0.00   0.000E+00      0.  0.676E+00  0.972E-01  0.954E-03  0.578E-04   32  36   8   11  25   9    5  27   9    0.000    0.000       0
+  0   7171 01:48:24.67   0.9260A   1.9445  -1.0819  -0.6863  0.077  0.00   0.000E+00      0.  0.675E+00  0.967E-01  0.942E-03  0.589E-04   32  35  14    9  24   9    3  11   9    0.000    0.000       0
+  0   7177 01:48:30.22   0.9240A   1.9489  -0.9302  -0.7006  0.077  0.00   0.000E+00      0.  0.674E+00  0.966E-01  0.924E-03  0.577E-04   32  35  19    9  23   9   18  20   9    0.000    0.000       0
+  0   7184 01:48:36.69   0.9250A   1.9463   0.7498  -0.6882  0.077  0.00   0.000E+00      0.  0.674E+00  0.968E-01  0.916E-03  0.597E-04   33  29  19    8  16   9   17  20   9    0.000    0.000       0
+  0   7190 01:48:42.25   0.9270A   1.9422  -0.7716  -0.6592  0.077  0.00   0.000E+00      0.  0.674E+00  0.972E-01  0.915E-03  0.615E-04   33  29  24   15  26   9    2  11   9    0.000    0.000       0
+  0   7197 01:48:48.61   0.8910A   2.0209  -0.8146  -0.6507  0.079  0.00   0.000E+00      0.  0.675E+00  0.978E-01  0.873E-03  0.589E-04   25  23  31   15  26   9    2  11   9    0.000    0.000       0
+  0   7204 01:48:54.75   0.8720A   2.0646  -0.8079   0.7808  0.080  0.00   0.000E+00      0.  0.676E+00  0.985E-01  0.858E-03  0.577E-04   25  23  35   16  26   9   20  29   9    0.000    0.000       0
+  0   7210 01:49:00.00   0.8810A   2.0437  -0.8391   0.7339  0.081  0.00   0.000E+00      0.  0.677E+00  0.989E-01  0.867E-03  0.557E-04   25  23  38   19  24   9   20  28   9    0.000    0.000       0
+  0   7217 01:49:06.27   0.9090A   1.9803  -0.7933  -0.7357  0.083  0.00   0.000E+00      0.  0.677E+00  0.992E-01  0.887E-03  0.551E-04   31   0  29   18  23   9   18  23   7    0.000    0.000       0
+  0   7224 01:49:12.65   0.9090A   1.9797  -0.8785  -0.9654  0.085  0.00   0.000E+00      0.  0.678E+00  0.995E-01  0.884E-03  0.497E-04   32   0  34   12  28   9   17  22   9    0.000    0.000       0
+  0   7230 01:49:18.11   0.9130A   1.9708  -0.8643  -1.0155  0.086  0.00   0.000E+00      0.  0.678E+00  0.995E-01  0.892E-03  0.508E-04   32   0  39   12  27   9   16  21   9    0.000    0.000       0
+  0   7237 01:49:24.54   0.9230A   1.9495  -0.8150  -1.0438  0.086  0.00   0.000E+00      0.  0.678E+00  0.996E-01  0.895E-03  0.506E-04   26  16  14   19  20   9   17  26   9    0.000    0.000       0
+  0   7243 01:49:30.11   0.9290A   1.9366  -0.7582  -1.0570  0.086  0.00   0.000E+00      0.  0.677E+00  0.995E-01  0.892E-03  0.510E-04   33   0   9   19  19   9   17  27   9    0.000    0.000       0
+  0   7250 01:49:36.55   0.9110A   1.9749  -0.6870  -0.9295  0.084  0.00   0.000E+00      0.  0.677E+00  0.994E-01  0.872E-03  0.501E-04   31  39  10    9  27   9   16  26   9    0.000    0.000       0
+  0   7257 01:49:42.89   0.9030A   1.9926  -0.7069  -0.8301  0.082  0.00   0.000E+00      0.  0.676E+00  0.994E-01  0.874E-03  0.540E-04   31  39  15   10  27   9   13  23   8    0.000    0.000       0
+  0   7263 01:49:48.32   0.9040A   1.9905   0.7776  -0.8812  0.082  0.00   0.000E+00      0.  0.676E+00  0.997E-01  0.879E-03  0.526E-04   31  39  20   20  27   8   16  17   9    0.000    0.000       0
+  0   7270 01:49:54.63   0.8990A   2.0020   0.6752  -0.9855  0.082  0.00   0.000E+00      0.  0.677E+00  0.999E-01  0.873E-03  0.505E-04   30  33  11   19  26   9   15  16   9    0.000    0.000       0
+  0   7276 01:50:00.01   0.8990A   2.0019  -0.7496  -1.0009  0.082  0.00   0.000E+00      0.  0.677E+00  0.998E-01  0.858E-03  0.462E-04   30  33  16   20  13   9   16  17   9    0.000    0.000       0
+  0   7283 01:50:06.34   0.9130A   1.9725  -0.6292  -0.9992  0.083  0.00   0.000E+00      0.  0.676E+00  0.997E-01  0.881E-03  0.527E-04   30  34  20   21  12  13   14  19   8    0.000    0.000       0
+  0   7290 01:50:12.72   0.9120A   1.9732   0.7011  -0.9925  0.084  0.00   0.000E+00      0.  0.677E+00  0.100E+00  0.896E-03  0.635E-04   33  37  39   19  14   7   14  20   9    0.000    0.000       0
+  0   7296 01:50:18.19   0.9120A   1.9728  -0.6876  -0.9312  0.084  0.00   0.000E+00      0.  0.678E+00  0.100E+00  0.895E-03  0.651E-04   24  18  20   10  27   9   13  20   9    0.000    0.000       0
+  0   7303 01:50:24.57   0.9110A   1.9752  -0.8057  -0.8444  0.084  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.872E-03  0.600E-04   24  18  24    9  27   9   17  20   9    0.000    0.000       0
+  0   7309 01:50:30.04   0.9100A   1.9785  -0.8441  -0.8294  0.085  0.00   0.000E+00      0.  0.679E+00  0.101E+00  0.852E-03  0.467E-04   24  18  28    9  26   9   16  19   9    0.000    0.000       0
+  0   7316 01:50:36.40   0.9090A   1.9810  -0.8198  -0.7561  0.085  0.00   0.000E+00      0.  0.678E+00  0.100E+00  0.846E-03  0.393E-04   24  18  33    8  25   9   15  19   9    0.000    0.000       0
+  0   7323 01:50:42.82   0.9200A   1.9572  -0.7433  -0.7348  0.086  0.00   0.000E+00      0.  0.677E+00  0.994E-01  0.863E-03  0.376E-04   31  39  29    8  24   9   18  27   9    0.000    0.000       0
+  0   7329 01:50:48.35   0.9220A   1.9525  -0.6687  -0.7819  0.087  0.00   0.000E+00      0.  0.676E+00  0.985E-01  0.863E-03  0.369E-04   31  39  34    9  24   9   17  26   9    0.000    0.000       0
+  0   7336 01:50:54.81   0.9250A   1.9451   0.6164  -0.6870  0.087  0.00   0.000E+00      0.  0.674E+00  0.977E-01  0.862E-03  0.384E-04   31  39   0    7  35   1   16  26   9    0.000    0.000       0
+  0   7342 01:51:00.37   0.9280A   1.9395   0.6379  -0.6257  0.087  0.00   0.000E+00      0.  0.673E+00  0.971E-01  0.848E-03  0.375E-04   31  39   5    7  35   3   16  25   9    0.000    0.000       0
+  0   7349 01:51:06.87   0.9300A   1.9363   0.5761  -0.5653  0.088  0.00   0.000E+00      0.  0.673E+00  0.968E-01  0.847E-03  0.437E-04   31  39  10    7  36   6   16  26   9    0.000    0.000       0
+  0   7355 01:51:12.46   0.9310A   1.9337  -0.5720  -0.5891  0.089  0.00   0.000E+00      0.  0.673E+00  0.971E-01  0.853E-03  0.500E-04   31  39  15    5  36  34   17  22   9    0.000    0.000       0
+  0   7361 01:51:18.05   0.9330A   1.9301  -0.6150  -0.6905  0.089  0.00   0.000E+00      0.  0.673E+00  0.975E-01  0.850E-03  0.512E-04   31  39  20   11  26   9   17  17   9    0.000    0.000       0
+  0   7368 01:51:24.56   0.9270A   1.9422  -0.7111  -0.7643  0.089  0.00   0.000E+00      0.  0.674E+00  0.982E-01  0.841E-03  0.510E-04   33   1  24   11  26   9   17  16   9    0.000    0.000       0
+  0   7374 01:51:30.10   0.9220A   1.9522  -0.7471   0.8035  0.088  0.00   0.000E+00      0.  0.675E+00  0.987E-01  0.839E-03  0.474E-04   33   1  29   11  25   9   20  10   9    0.000    0.000       0
+  0   7381 01:51:36.54   0.9180A   1.9602  -0.9113   0.8774  0.087  0.00   0.000E+00      0.  0.676E+00  0.990E-01  0.848E-03  0.547E-04   33   1  34   10  26   9   21  12   9    0.000    0.000       0
+  0   7387 01:51:42.04   0.9160A   1.9659  -1.0301  -0.7313  0.087  0.00   0.000E+00      0.  0.676E+00  0.989E-01  0.846E-03  0.559E-04   33   1  39    9  25   9    4  12   9    0.000    0.000       0
+  0   7394 01:51:48.45   0.9150A   1.9675  -0.9782  -0.6388  0.087  0.00   0.000E+00      0.  0.676E+00  0.983E-01  0.844E-03  0.540E-04   33   1   4    8  24   9    3  29   9    0.000    0.000       0
+  0   7401 01:51:54.86   0.9150A   1.9664  -0.8436  -0.6929  0.087  0.00   0.000E+00      0.  0.676E+00  0.978E-01  0.844E-03  0.505E-04   33   1  10    8  24   9   17  19   9    0.000    0.000       0
+  0   7407 01:52:00.35   0.9170A   1.9634   0.7869  -0.8885  0.087  0.00   0.000E+00      0.  0.676E+00  0.972E-01  0.841E-03  0.483E-04   33   1  14    9  15   9   17  19   9    0.000    0.000       0
+  0   7414 01:52:06.78   0.9210A   1.9546   0.7784  -1.0704  0.088  0.00   0.000E+00      0.  0.675E+00  0.964E-01  0.826E-03  0.476E-04   33   1  20   18  22   9   16  18   9    0.000    0.000       0
+  0   7420 01:52:12.32   0.9240A   1.9484   0.6824  -1.0157  0.088  0.00   0.000E+00      0.  0.675E+00  0.959E-01  0.818E-03  0.511E-04   33   1  24   18  23   9   15  18   9    0.000    0.000       0
+  0   7427 01:52:18.78   0.9240A   1.9484   0.6160  -0.8467  0.088  0.00   0.000E+00      0.  0.674E+00  0.953E-01  0.803E-03  0.481E-04   28  24  39   10  15   9   16  20   9    0.000    0.000       0
+  0   7433 01:52:24.33   0.9230A   1.9493   0.5573  -0.8325  0.087  0.00   0.000E+00      0.  0.674E+00  0.949E-01  0.790E-03  0.443E-04   31   5  21   10  15   9   16  20   9    0.000    0.000       0
+  0   7440 01:52:30.80   0.9240A   1.9483  -0.6297  -0.7479  0.086  0.00   0.000E+00      0.  0.674E+00  0.947E-01  0.778E-03  0.426E-04   30  37   1    9  25   9   15  20   9    0.000    0.000       0
+  0   7446 01:52:36.34   0.9220A   1.9519  -0.6558  -0.6570  0.085  0.00   0.000E+00      0.  0.674E+00  0.946E-01  0.788E-03  0.469E-04   30  37   6    8  25   9   13  19   9    0.000    0.000       0
+  0   7453 01:52:42.77   0.9140A   1.9688  -0.6495   0.6500  0.083  0.00   0.000E+00      0.  0.674E+00  0.949E-01  0.801E-03  0.553E-04   26  22  13    7  24   9   20  11   9    0.000    0.000       0
+  0   7459 01:52:48.21   0.9000A   2.0008  -0.6279   0.7454  0.081  0.00   0.000E+00      0.  0.675E+00  0.952E-01  0.789E-03  0.537E-04   26  23  16    7  24   9   20  11   9    0.000    0.000       0
+  0   7466 01:52:54.44   0.8850A   2.0330   0.7199  -0.7234  0.081  0.00   0.000E+00      0.  0.675E+00  0.957E-01  0.783E-03  0.538E-04   26  23  21   21  29   7   14  17   8    0.000    0.000       0
+  0   7473 01:53:00.62   0.8800A   2.0446   0.8082  -0.7969  0.081  0.00   0.000E+00      0.  0.677E+00  0.964E-01  0.785E-03  0.533E-04   26  23  26   21  30   8   15  17   9    0.000    0.000       0
+  0   7480 01:53:06.79   0.8810A   2.0429  -0.7182  -1.0091  0.083  0.00   0.000E+00      0.  0.678E+00  0.971E-01  0.795E-03  0.497E-04   26  24  30   20  15   9   16  19   9    0.000    0.000       0
+  0   7486 01:53:12.06   0.8760A   2.0552  -0.7203  -1.0990  0.085  0.00   0.000E+00      0.  0.679E+00  0.973E-01  0.791E-03  0.451E-04   26  24  34   20  14   9   15  20   9    0.000    0.000       0
+  0   7493 01:53:18.20   0.8790A   2.0478  -0.6255  -1.0460  0.087  0.00   0.000E+00      0.  0.679E+00  0.971E-01  0.788E-03  0.432E-04   26  24  39   19  14   9   14  20   9    0.000    0.000       0
+  0   7500 01:53:24.41   0.8930A   2.0159   0.6307  -0.9683  0.088  0.00   0.000E+00      0.  0.679E+00  0.966E-01  0.788E-03  0.456E-04   25  24   4    5  12   9   13  20   9    0.000    0.000       0
+  0   7507 01:53:30.75   0.9180A   1.9615   0.6737  -0.8761  0.088  0.00   0.000E+00      0.  0.678E+00  0.960E-01  0.783E-03  0.454E-04   26  25   9    4  11   9   12  19   9    0.000    0.000       0
+  0   7513 01:53:36.27   0.9180A   1.9614   0.7142  -0.7818  0.088  0.00   0.000E+00      0.  0.678E+00  0.954E-01  0.769E-03  0.446E-04   33  36  14    4  11   9   11  19   9    0.000    0.000       0
+  0   7520 01:53:42.69   0.9180A   1.9603   0.6880   0.7876  0.086  0.00   0.000E+00      0.  0.677E+00  0.947E-01  0.757E-03  0.382E-04   32  35  19   16  18   7   19  11   9    0.000    0.000       0
+  0   7526 01:53:48.19   0.9190A   1.9592   0.6599   0.8262  0.085  0.00   0.000E+00      0.  0.676E+00  0.941E-01  0.764E-03  0.392E-04   32  35  24   14  15   9   20  11   9    0.000    0.000       0
+  0   7533 01:53:54.63   0.9220A   1.9522   0.6729  -0.7191  0.083  0.00   0.000E+00      0.  0.675E+00  0.939E-01  0.774E-03  0.459E-04   32  35  30   23  32   3   10  18   7    0.000    0.000       0
+  0   7539 01:54:00.17   0.9220A   1.9531  -0.6553  -0.6785  0.083  0.00   0.000E+00      0.  0.675E+00  0.941E-01  0.778E-03  0.516E-04   26  25  14    1  14   6    9  18   7    0.000    0.000       0
+  0   7546 01:54:06.64   0.9290A   1.9385  -0.6657  -0.6384  0.083  0.00   0.000E+00      0.  0.676E+00  0.944E-01  0.781E-03  0.529E-04   26  25  19    1  12   3    8  19   7    0.000    0.000       0
+  0   7552 01:54:12.22   0.9300A   1.9358  -0.6514  -0.6087  0.084  0.00   0.000E+00      0.  0.677E+00  0.946E-01  0.782E-03  0.529E-04   33  38   4    1  12   6   17  20   9    0.000    0.000       0
+  0   7559 01:54:18.71   0.9210A   1.9551   0.7952  -0.7452  0.084  0.00   0.000E+00      0.  0.678E+00  0.947E-01  0.784E-03  0.549E-04   33  10  39   20  30   9   16  20   9    0.000    0.000       0
+  0   7565 01:54:24.21   0.9140A   1.9689   0.8955  -0.8753  0.086  0.00   0.000E+00      0.  0.678E+00  0.948E-01  0.769E-03  0.515E-04   33  10   4   12  13   9   16  21   9    0.000    0.000       0
+  0   7572 01:54:30.60   0.9120A   1.9727   0.9308  -0.9182  0.087  0.00   0.000E+00      0.  0.679E+00  0.945E-01  0.754E-03  0.480E-04   33  10   9   12  15   9   15  22   9    0.000    0.000       0
+  0   7578 01:54:36.09   0.9160A   1.9652   0.9111  -0.8519  0.087  0.00   0.000E+00      0.  0.679E+00  0.941E-01  0.749E-03  0.448E-04   33  10  14   10  15   9   14  22   9    0.000    0.000       0
+  0   7585 01:54:42.53   0.9200A   1.9561   0.8812  -0.7901  0.087  0.00   0.000E+00      0.  0.679E+00  0.937E-01  0.761E-03  0.477E-04   28  17  25   10  16   9   12  23   8    0.000    0.000       0
+  0   7591 01:54:48.02   0.9130A   1.9713   0.8304  -0.7472  0.086  0.00   0.000E+00      0.  0.679E+00  0.936E-01  0.764E-03  0.486E-04   27  34   0   10  16   9   10  23   8    0.000    0.000       0
+  0   7598 01:54:54.43   0.9160A   1.9643   0.7576  -0.7257  0.085  0.00   0.000E+00      0.  0.680E+00  0.934E-01  0.766E-03  0.463E-04   28  17  36    9  18   9    9  24   7    0.000    0.000       0
+  0   7605 01:55:00.86   0.9190A   1.9581   0.6801  -0.6904  0.083  0.00   0.000E+00      0.  0.680E+00  0.931E-01  0.770E-03  0.415E-04   28  17   2   10  18   9    4  10   9    0.000    0.000       0
+  0   7611 01:55:06.39   0.9220A   1.9523  -0.6447  -0.6670  0.082  0.00   0.000E+00      0.  0.680E+00  0.927E-01  0.780E-03  0.451E-04   28  16   6   15  25   8    3  10   9    0.000    0.000       0
+  0   7618 01:55:12.81   0.9160A   1.9647  -0.6397  -0.7342  0.080  0.00   0.000E+00      0.  0.680E+00  0.923E-01  0.783E-03  0.493E-04   28  16  12   14  24   8    5  11   9    0.000    0.000       0
+  0   7624 01:55:18.33   0.9190A   1.9582   0.6446  -0.8009  0.079  0.00   0.000E+00      0.  0.680E+00  0.921E-01  0.788E-03  0.522E-04   27  17  17    8  17   9    4  11   9    0.000    0.000       0
+  0   7631 01:55:24.75   0.9200A   1.9572   0.6742  -0.7735  0.079  0.00   0.000E+00      0.  0.679E+00  0.921E-01  0.786E-03  0.504E-04   27  17  22    8  17   9    4  12   9    0.000    0.000       0
+  0   7637 01:55:30.29   0.9270A   1.9420   0.7586  -0.6994  0.079  0.00   0.000E+00      0.  0.679E+00  0.923E-01  0.796E-03  0.496E-04   35  24  18    7  14   9    8  17   4    0.000    0.000       0
+  0   7644 01:55:36.80   0.9300A   1.9353   0.7673  -0.6665  0.079  0.00   0.000E+00      0.  0.680E+00  0.927E-01  0.809E-03  0.518E-04   25  34  34    7  15   9    7  17   3    0.000    0.000       0
+  0   7650 01:55:42.37   0.9260A   1.9442   0.7486   0.7209  0.079  0.00   0.000E+00      0.  0.680E+00  0.931E-01  0.817E-03  0.543E-04   34  35  23    7  16   9   20  27   9    0.000    0.000       0
+  0   7657 01:55:48.83   0.9200A   1.9559   0.7433   0.7747  0.079  0.00   0.000E+00      0.  0.681E+00  0.936E-01  0.818E-03  0.553E-04   36  38  28    7  15   9   21  27   9    0.000    0.000       0
+  0   7663 01:55:54.33   0.9140A   1.9695   0.7862   0.7427  0.079  0.00   0.000E+00      0.  0.682E+00  0.940E-01  0.813E-03  0.558E-04   36  38  33    8  15   9   21  27   9    0.000    0.000       0
+  0   7670 01:56:00.71   0.9110A   1.9750   0.8404  -0.6585  0.079  0.00   0.000E+00      0.  0.683E+00  0.945E-01  0.805E-03  0.561E-04   36  38  39    8  14   9   15  21   9    0.000    0.000       0
+  0   7676 01:56:06.18   0.9110A   1.9758   0.8597  -0.7337  0.078  0.00   0.000E+00      0.  0.684E+00  0.946E-01  0.796E-03  0.518E-04   35  37   3    8  15   9   17  19   9    0.000    0.000       0
+  0   7683 01:56:12.56   0.9130A   1.9710   0.8196  -0.7437  0.078  0.00   0.000E+00      0.  0.685E+00  0.948E-01  0.783E-03  0.428E-04   35  37   8    8  16   9   17  19   9    0.000    0.000       0
+  0   7689 01:56:18.05   0.9120A   1.9729   0.7646  -0.7136  0.078  0.00   0.000E+00      0.  0.684E+00  0.946E-01  0.780E-03  0.393E-04   26  23   4    7  15   9   16  20   9    0.000    0.000       0
+  0   7696 01:56:24.42   0.9080A   1.9828   0.7277  -0.6252  0.076  0.00   0.000E+00      0.  0.684E+00  0.945E-01  0.784E-03  0.405E-04   26  23   9    7  15   9   17  19   9    0.000    0.000       0
+  0   7703 01:56:30.75   0.9040A   1.9918  -0.7634   0.6106  0.074  0.00   0.000E+00      0.  0.684E+00  0.947E-01  0.803E-03  0.484E-04   26  23  15    8  27   9   20  10   9    0.000    0.000       0
+  0   7709 01:56:36.18   0.9060A   1.9878  -0.7219  -0.7582  0.073  0.00   0.000E+00      0.  0.684E+00  0.951E-01  0.825E-03  0.552E-04   27  23  19   10  25   9    5  28   9    0.000    0.000       0
+  0   7716 01:56:42.52   0.9060A   1.9868  -0.7238  -0.8475  0.072  0.00   0.000E+00      0.  0.684E+00  0.957E-01  0.849E-03  0.609E-04   27  23  24    9  25   9    5  27   9    0.000    0.000       0
+  0   7723 01:56:48.88   0.9090A   1.9800   0.7296  -0.9049  0.072  0.00   0.000E+00      0.  0.684E+00  0.965E-01  0.850E-03  0.548E-04   27  23  29    6  15   9    5  27   9    0.000    0.000       0
+  0   7729 01:56:54.34   0.9110A   1.9763   0.7502  -0.8554  0.073  0.00   0.000E+00      0.  0.685E+00  0.970E-01  0.860E-03  0.530E-04   27  23  34    6  15   9    5  27   9    0.000    0.000       0
+  0   7736 01:57:00.73   0.9140A   1.9690   0.8330  -0.8896  0.075  0.00   0.000E+00      0.  0.685E+00  0.978E-01  0.867E-03  0.501E-04   32  31   3    5  15   9   17  20   9    0.000    0.000       0
+  0   7742 01:57:06.22   0.9160A   1.9660   0.8447  -0.8863  0.077  0.00   0.000E+00      0.  0.686E+00  0.981E-01  0.873E-03  0.517E-04   26  13  26    5  16   9   16  20   9    0.000    0.000       0
+  0   7749 01:57:12.58   0.9030A   1.9927   0.8028  -0.7836  0.079  0.00   0.000E+00      0.  0.686E+00  0.988E-01  0.857E-03  0.519E-04   26  13  32    5  17   9   15  20   9    0.000    0.000       0
+  0   7756 01:57:18.84   0.8890A   2.0244   0.7655  -0.7251  0.079  0.00   0.000E+00      0.  0.686E+00  0.997E-01  0.836E-03  0.488E-04   26  13  37    6  15   9   16  17   9    0.000    0.000       0
+  0   7762 01:57:24.15   0.8820A   2.0406   0.7769  -0.6736  0.079  0.00   0.000E+00      0.  0.687E+00  0.100E+00  0.820E-03  0.433E-04   26  13   2    4  16   9   16  17   9    0.000    0.000       0
+  0   7769 01:57:30.33   0.8850A   2.0343   0.7712   0.6795  0.079  0.00   0.000E+00      0.  0.686E+00  0.101E+00  0.813E-03  0.414E-04   26  12   8    4  16   9    8  28  34    0.000    0.000       0
+  0   7776 01:57:36.56   0.8940A   2.0126   0.7299   0.7266  0.079  0.00   0.000E+00      0.  0.685E+00  0.101E+00  0.816E-03  0.417E-04   26  12  13    4  17   9    9  28  36    0.000    0.000       0
+  0   7783 01:57:42.88   0.9090A   1.9803   0.7102   0.7435  0.078  0.00   0.000E+00      0.  0.684E+00  0.101E+00  0.829E-03  0.438E-04   26  13  17    3  15   8    9  28  37    0.000    0.000       0
+  0   7789 01:57:48.34   0.9070A   1.9849  -0.7063   0.7265  0.077  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.831E-03  0.446E-04   33  36  22    6  34  34   10  27  37    0.000    0.000       0
+  0   7796 01:57:54.67   0.9040A   1.9913  -0.7278   0.7447  0.077  0.00   0.000E+00      0.  0.684E+00  0.102E+00  0.837E-03  0.463E-04   33  35  27    6  33  36    9  27  37    0.000    0.000       0
+  0   7802 01:58:00.09   0.9030A   1.9937  -0.7182   0.7294  0.077  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.845E-03  0.473E-04   33  35  32   15  16   7    8  27  36    0.000    0.000       0
+  0   7809 01:58:06.42   0.9050A   1.9882  -0.7422   0.6802  0.077  0.00   0.000E+00      0.  0.685E+00  0.103E+00  0.872E-03  0.524E-04   32  34  36   15  13   7   20  29   9    0.000    0.000       0
+  0   7816 01:58:12.76   0.9080A   1.9834  -0.7908   0.6114  0.079  0.00   0.000E+00      0.  0.685E+00  0.103E+00  0.893E-03  0.478E-04   33  34   2   10  26   9   18  29   9    0.000    0.000       0
+  0   7822 01:58:18.22   0.9120A   1.9742   0.8928  -0.7383  0.080  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.917E-03  0.442E-04   34  34   7   20  30   9   17  15   9    0.000    0.000       0
+  0   7829 01:58:24.61   0.9140A   1.9703   0.8546  -0.7551  0.081  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.937E-03  0.477E-04   34  34  13   20  31   9   17  13   9    0.000    0.000       0
+  0   7835 01:58:30.09   0.9110A   1.9749   0.7792  -0.7031  0.081  0.00   0.000E+00      0.  0.683E+00  0.103E+00  0.962E-03  0.601E-04   28  32  17   18  31   9   16  12   9    0.000    0.000       0
+  0   7842 01:58:36.44   0.9050A   1.9890  -0.7810  -0.7784  0.080  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.978E-03  0.691E-04   28  32  22   13   9   9   16  11   9    0.000    0.000       0
+  0   7849 01:58:42.75   0.9000A   2.0001  -0.7364  -0.8320  0.079  0.00   0.000E+00      0.  0.684E+00  0.103E+00  0.975E-03  0.648E-04   28  34  26   12   9   9   15  12   9    0.000    0.000       0
+  0   7855 01:58:48.11   0.8890A   2.0251  -0.7175  -0.8717  0.079  0.00   0.000E+00      0.  0.684E+00  0.104E+00  0.966E-03  0.588E-04   29  30  11    8  25   3   15  12   9    0.000    0.000       0
+  0   7862 01:58:54.31   0.8860A   2.0322  -0.7277  -0.8125  0.078  0.00   0.000E+00      0.  0.684E+00  0.104E+00  0.972E-03  0.604E-04   29  30  16    8  24   4   14  13   9    0.000    0.000       0
+  0   7869 01:59:00.50   0.8810A   2.0434   0.7448  -0.6755  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.980E-03  0.619E-04   30  30  21   23  34   6   10   6  20    0.000    0.000       0
+  0   7876 01:59:06.66   0.8800A   2.0444   0.8268   0.7070  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.981E-03  0.551E-04   30  30  26   15  13   9   18  29   9    0.000    0.000       0
+  0   7883 01:59:12.85   0.8850A   2.0330   0.9019   0.6949  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.989E-03  0.542E-04   31  29  31   15  14   9   18  29   9    0.000    0.000       0
+  0   7889 01:59:18.20   0.8970A   2.0068   0.9253   0.6637  0.077  0.00   0.000E+00      0.  0.685E+00  0.105E+00  0.101E-02  0.547E-04   31  29  35   20  31   8   21  19   9    0.000    0.000       0
+  0   7896 01:59:24.53   0.9070A   1.9840   0.9358  -0.6508  0.079  0.00   0.000E+00      0.  0.684E+00  0.106E+00  0.100E-02  0.550E-04   35  28   1   20  31   9    4  28   9    0.000    0.000       0
+  0   7903 01:59:30.84   0.8980A   2.0053  -0.8302  -0.7078  0.080  0.00   0.000E+00      0.  0.684E+00  0.106E+00  0.984E-03  0.574E-04   36  29   6    7  23   9    3  28   9    0.000    0.000       0
+  0   7909 01:59:36.20   0.8930A   2.0155   0.8128  -0.8122  0.082  0.00   0.000E+00      0.  0.684E+00  0.106E+00  0.978E-03  0.577E-04   36  29  10   22  34  18   18  20   9    0.000    0.000       0
+  0   7916 01:59:42.45   0.8940A   2.0143   0.8088  -1.0125  0.083  0.00   0.000E+00      0.  0.683E+00  0.106E+00  0.968E-03  0.548E-04   36  29  16   22  35  21   17  21   9    0.000    0.000       0
+  0   7923 01:59:48.73   0.8970A   2.0060   0.7959  -0.9513  0.083  0.00   0.000E+00      0.  0.683E+00  0.107E+00  0.974E-03  0.579E-04   35  29  22   22  36  25   16  21   9    0.000    0.000       0
+  0   7929 01:59:54.10   0.8930A   2.0164   0.7780  -0.8477  0.083  0.00   0.000E+00      0.  0.683E+00  0.107E+00  0.973E-03  0.598E-04   31  32   0   21  37  26   15  21   9    0.000    0.000       0
+  0   7936 02:00:00.33   0.8890A   2.0238   0.7602  -0.8333  0.084  0.00   0.000E+00      0.  0.683E+00  0.107E+00  0.969E-03  0.558E-04   31  32   6   21  38  30   16  18   9    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_topo
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_topo	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/topo_file/example_topo_file_topo	(revision 3477)
@@ -0,0 +1,40 @@
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm.txt
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm.txt	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm.txt	(revision 3477)
@@ -0,0 +1,56 @@
+example_wtm
+
+1. Purpose
+   This example shows the application of enhanced actuator disc wind turbine models in PALM 
+   The model is based on blade elements and conversion of airfoil lift 
+   and drag coefficients from the NREL 5MW reference turbine (see Jonkman et al. 2009:
+   Technical Report NREL/TP-500-38060, doi:10.2172/947422) to local forces on the flow.
+   The example simulates 4 different turbines in laminar flow that correct their orientation
+   after 30s of simulated time by use of a yaw controller.
+   
+2. PALM-Version / SVN Revision
+   PALM 4.0 / SVN Revision 2272
+
+3. Required user code
+   No user code is required
+   
+4. Input: 
+   example_wtm_p3d: Cyclic lateral boundary conditions are used. The 3d-model is initialized with
+                    constant temperature and constant laminar flow.
+   example_wtm_wtm: The property file of the NREL 5MW model turbine has also to be copied to the
+                    local INPUT folder, it will be automatically read by PALM
+
+5. Preprocessing
+   No preprocessing is required.
+   
+6. Program start 
+   Modifications to .mrun.config:
+   No modifications are necessary if you use one of the default .mrun.config-files in trunk/SCRIPTS/.
+   In case you want to use your own (older) .mrun.config-file, you will have to add the following
+   lines in your .mrun.config file:
+   In "List of input-files":
+   WTM_DATA               in:locopt     d3#:d3f  $base_data/$fname/INPUT     _wtm
+   In "List of output-files":
+   TURBINE_PARAMETERS01   out:loc:tr    d3#:d3f   $base_data/$fname/MONITORING  _turbine_parameters01
+   TURBINE_PARAMETERS02   out:loc:tr    d3#:d3f   $base_data/$fname/MONITORING  _turbine_parameters02
+   TURBINE_PARAMETERS03   out:loc:tr    d3#:d3f   $base_data/$fname/MONITORING  _turbine_parameters03
+   TURBINE_PARAMETERS04   out:loc:tr    d3#:d3f   $base_data/$fname/MONITORING  _turbine_parameters04
+   
+   mrun call (example for lccrayh):
+   mrun -d example_wtm -h lccrayh -K parallel -X 64 -T 24 -t 2000 -q mpp1testq -r "d3# ts# ma#"
+
+7. Monitoring: 
+   example_wtm_rc and TURBINE_PARAMETERS01-04 should be equal to the attached files when run at
+   Cray System of HLRN Berlin. For other systems the deviations should be small.
+
+8. Postprocessing
+   No postprocessing of the data is required.
+
+9. List of attachments
+   example_wtm_p3d
+   example_wtm_wtm
+   lccrayb_example_wtm_rc
+   lccrayb_example_wtm_turbine_parameters01
+   lccrayb_example_wtm_turbine_parameters02
+   lccrayb_example_wtm_turbine_parameters03
+   lccrayb_example_wtm_turbine_parameters04
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_p3d
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_p3d	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_p3d	(revision 3477)
@@ -0,0 +1,64 @@
+ &inipar nx = 191, ny = 191, nz = 192,
+    
+         dx = 5.0, dy = 5.0, dz = 5.0,
+
+         bc_lr = 'cyclic',
+         bc_ns = 'cyclic',
+
+         initializing_actions = 'set_constant_profiles',
+         ug_surface = 8.0, vg_surface = 0.0,
+
+         bc_uv_b = 'neumann',
+         fft_method = 'temperton-algorithm',
+         
+         constant_flux_layer = .F., /
+
+ &d3par  end_time = 60.0,
+
+         npex = 8, npey = 8,
+
+         termination_time_needed = 600.0,
+         
+         create_disturbances = .F.,
+         
+         dt_run_control = 1.,
+           
+         mask_x_loop(1,:) = 200.0, 800.0, 5.0,
+         mask_y_loop(1,:) = 200.0, 800.0, 5.0,
+         mask_z_loop(1,:) = 400.0, 560.0, 15.0,
+         
+         data_output_masks(1,:) = 'u', 'v','w',
+
+         dt_domask = 2.,/
+
+ &wind_turbine_par
+         time_turbine_on  = 1.0,
+
+         nturbines = 4,
+         rcx =   300.0, 600.0, 300.0, 600.0,
+         rcy =   300.0, 300.0, 600.0, 600.0,
+         rcz =   480.0, 480.0, 480.0, 480.0,
+         rr  =    63.0, 63.0, 63.0, 63.0,
+         rnac =    1.5, 1.5, 1.5, 1.5,
+         dtow =    4.0, 4.0, 4.0, 4.0,
+
+         omega_rot = 0.9, 0.9, 0.9, 0.9,
+         phi_yaw = -20.0, 10.0, 0.0, 30.0,
+         tilt = 0.0,
+         rated_power = 5296610.0,
+         speed_control = .T.,
+         pitch_control = .T.,
+         pitch_add = 0.0,
+         yaw_control = .T.,
+         yaw_speed = 0.01,
+        
+         turb_cd_nacelle = 0.85, 0.85, 0.85, 0.85,
+         turb_cd_tower   = 1.2, 1.2, 1.2, 1.2,
+        
+         segment_length = 1.0,
+         segment_width  = 0.5,
+        
+         nairfoils = 8, /
+            
+! mrun -d example_wtm -v -h lccrayb -q mpp1testq -K parallel -X 64 -T 24 -t 1200 -r "d3# ts# ma#"
+! mrun -d example_wtm -v -c .mrun.config.forwind_flow -h lcflow  -K parallel -X 64 -t 2000 -r "d3# ts# ma#"
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_rc
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_rc	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_rc	(revision 3477)
@@ -0,0 +1,240 @@
+
+ ******************************    --------------------------------------------
+ * PALM 4.0  Rev:             *    atmosphere - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 09-06-17    Run:       example_wtm         
+ Time:                 14:32:21    Run-No.:   00
+ Run on host:            lceddy
+ Number of PEs:              64    Processor grid (x,y): (   8,   8) predefined
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:               60.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      5.000 m    dy =      5.000 m    dz =      5.000 m
+ Domain size:       x =    960.000 m     y =    960.000 m  z(u) =    962.500 m
+
+ Number of gridpoints (x,y,z):  (0: 191, 0: 191, 0: 193)
+ Subdomain size (x,y,z):        (    24,     24,    194)
+
+
+
+ Large scale forcing and nudging:
+ -------------------------------
+
+ --> No large scale forcing from external is used (default) 
+ --> No nudging is used (default) 
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            8.00    8.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = uv(1)                 | pt(0)     = pt_surface       
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0  m
+       Temperature:   300.00  300.00  K
+       Gradient:      ------    0.00  K/100m
+       Gridpoint:          0       0
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             ******** s
+
+
+ Data output:
+ -----------
+
+
+    Scaling lengths for output locations of all subsequent mask IDs:
+       mask_scale_x (in x-direction):     1.000 m
+       mask_scale_y (in y-direction):     1.000 m
+       mask_scale_z (in z-direction):     1.000 m
+
+    Masked data output for mask ID  1:
+       Output format: netCDF 64bit offset                     
+
+       Variables:  u, v, w,                                                             
+       Output every                 2.00 s
+
+       Output locations in x-direction in multiples of mask_scale_x constructed from array mask_01_x_loop:
+          loop begin:  200.00, end:  800.00, stride:    5.00
+
+       Output locations in y-direction in multiples of mask_scale_y constructed from array mask_01_y_loop:
+          loop begin:  200.00, end:  800.00, stride:    5.00
+
+       Output locations in z-direction in multiples of mask_scale_z constructed from array mask_01_z_loop:
+          loop begin:  400.00, end:  560.00, stride:   15.00
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 1.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   phi    = 55.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   0.5620A   8.0000   0.0000   0.0000  0.000  0.00   0.000E+00      0.  0.320E+02  0.000E+00  0.000E+00  0.000E+00    0 189 189    0 189 189    0 189 189    0.000    0.000       0
+  0      2 00:00:01.12   0.5620A   8.0000   0.0000  -0.0000  0.000  0.00   0.000E+00      0.  0.320E+02  0.120E-34  0.227E-06  0.107E-18    0 189 189    0 189 189   36 189 189    0.000    0.000       0
+  0      4 00:00:02.22   0.5250A   8.5750  -1.0592  -0.6377  0.000  0.00   0.000E+00      0.  0.320E+02  0.590E-03  0.489E-04  0.144E-13   96 120  61   92  59 119   96  64 121    0.000    0.000       0
+  0      6 00:00:03.26   0.5090A   8.8495  -1.4831   1.0596  0.000  0.00   0.000E+00      0.  0.320E+02  0.173E-02  0.468E-04  0.134E-13   96  60 122   92  60  62   96 115  61    0.000    0.000       0
+  0      8 00:00:04.27   0.5030A   8.9489  -1.6654  -1.2618  0.000  0.00   0.000E+00      0.  0.320E+02  0.318E-02  0.473E-04  0.133E-13   96 120  62   92  60  63   96 124  62    0.000    0.000       0
+  0     10 00:00:05.27   0.5020A   8.9598  -1.7636  -1.3523  0.000  0.00   0.000E+00      0.  0.319E+02  0.492E-02  0.489E-04  0.136E-13   96  60 123   92  60  64   96  64 123    0.000    0.000       0
+  0     12 00:00:06.28   0.5030A   8.9377  -1.8434  -1.3673  0.000  0.00   0.000E+00      0.  0.319E+02  0.689E-02  0.504E-04  0.139E-13   82  58  65   92  60  65   96  64 124    0.000    0.000       0
+  0     14 00:00:07.29   0.5020A   8.9586  -1.9164  -1.3648  0.000  0.00   0.000E+00      0.  0.319E+02  0.905E-02  0.513E-04  0.140E-13   82 117  64   92  60  66   96  64 125    0.000    0.000       0
+  0     16 00:00:08.29   0.5020A   8.9658  -1.9767  -1.3607  0.000  0.00   0.000E+00      0.  0.319E+02  0.114E-01  0.519E-04  0.141E-13   82  58  68   92  60  67   96  64 127    0.000    0.000       0
+  0     18 00:00:09.29   0.5000A   8.9913  -2.0163   1.3853  0.000  0.00   0.000E+00      0.  0.319E+02  0.138E-01  0.524E-04  0.141E-13   81  58  68   92  60  68  108  58 119    0.000    0.000       0
+  0     20 00:00:10.29   0.4990A   9.0166  -2.0313   1.4400  0.000  0.00   0.000E+00      0.  0.319E+02  0.163E-01  0.528E-04  0.142E-13   81  58  69   92  60  69  108 118  59    0.000    0.000       0
+  0     22 00:00:11.29   0.4980A   9.0402  -2.0726   1.4853  0.000  0.00   0.000E+00      0.  0.319E+02  0.189E-01  0.529E-04  0.141E-13   81  58  70   92  59  70  108 118  59    0.000    0.000       0
+  0     24 00:00:12.28   0.4960A   9.0652  -2.1235   1.5225  0.000  0.00   0.000E+00      0.  0.319E+02  0.215E-01  0.530E-04  0.141E-13   81  58  70   92  59  71  108 118  59    0.000    0.000       0
+  0     26 00:00:13.28   0.4950A   9.0884  -2.1481   1.5529  0.000  0.00   0.000E+00      0.  0.319E+02  0.242E-01  0.531E-04  0.141E-13   81  58  71   92  59  72  108 118  59    0.000    0.000       0
+  0     28 00:00:14.27   0.4940A   9.1081  -2.1466   1.5829  0.000  0.00   0.000E+00      0.  0.318E+02  0.269E-01  0.531E-04  0.141E-13   81  58  72   92  59  73  109 119  60    0.000    0.000       0
+  0     30 00:00:15.25   0.4930A   9.1240  -2.1573   1.6123  0.000  0.00   0.000E+00      0.  0.318E+02  0.296E-01  0.530E-04  0.141E-13   81  58  73   92  58  75  109 119  60    0.000    0.000       0
+  0     32 00:00:16.24   0.4930A   9.1362  -2.1892   1.6369  0.000  0.00   0.000E+00      0.  0.318E+02  0.324E-01  0.529E-04  0.140E-13   81  58  74   92  58  75  109 119  60    0.000    0.000       0
+  0     34 00:00:17.22   0.4920A   9.1449  -2.2033   1.6574  0.000  0.00   0.000E+00      0.  0.318E+02  0.351E-01  0.528E-04  0.140E-13   81  58  74   92  58  76  109 119  60    0.000    0.000       0
+  0     36 00:00:18.21   0.4920A   9.1506   2.2058   1.6746  0.000  0.00   0.000E+00      0.  0.318E+02  0.379E-01  0.528E-04  0.139E-13   81  58  75  101 122 139  109 119  60    0.000    0.000       0
+  0     38 00:00:19.19   0.4920A   9.1529   2.2330   1.6892  0.000  0.00   0.000E+00      0.  0.318E+02  0.406E-01  0.528E-04  0.139E-13   81  58  76  101 122 140  109 119  60    0.000    0.000       0
+  0     40 00:00:20.18   0.4920A   9.1518   2.2570   1.7015  0.000  0.00   0.000E+00      0.  0.318E+02  0.434E-01  0.527E-04  0.139E-13   81  58  77  101 122 141  109 119  60    0.000    0.000       0
+  0     42 00:00:21.16   0.4920A   9.1474   2.2776   1.7119  0.000  0.00   0.000E+00      0.  0.318E+02  0.461E-01  0.527E-04  0.139E-13   81  58  78  101 122 142  109 119  60    0.000    0.000       0
+  0     44 00:00:22.15   0.4920A   9.1399   2.3103   1.7205  0.000  0.00   0.000E+00      0.  0.318E+02  0.489E-01  0.526E-04  0.139E-13   81  58  79  101 123 144  109 119  60    0.000    0.000       0
+  0     46 00:00:23.13   0.4930A   9.1291   2.3437   1.7278  0.000  0.00   0.000E+00      0.  0.317E+02  0.516E-01  0.527E-04  0.139E-13   81  58  80  101 123 145  109 119  60    0.000    0.000       0
+  0     48 00:00:24.12   0.4930A   9.1193   2.3716   1.7338  0.000  0.00   0.000E+00      0.  0.317E+02  0.544E-01  0.526E-04  0.138E-13   80  58  79  101 123 146  109 119  60    0.000    0.000       0
+  0     50 00:00:25.10   0.4930A   9.1197   2.3924   1.7389  0.000  0.00   0.000E+00      0.  0.317E+02  0.571E-01  0.526E-04  0.138E-13   80  58  80  101 123 147  109 119  60    0.000    0.000       0
+  0     52 00:00:26.09   0.4940A   9.1182   2.4038   1.7434  0.000  0.00   0.000E+00      0.  0.317E+02  0.598E-01  0.525E-04  0.138E-13   80  58  80  101 123 148  109 119  60    0.000    0.000       0
+  0     54 00:00:27.08   0.4940A   9.1138   2.4351   1.7475  0.000  0.00   0.000E+00      0.  0.317E+02  0.625E-01  0.526E-04  0.138E-13   80  58  81  101 124 149  109 119  60    0.000    0.000       0
+  0     56 00:00:28.06   0.4940A   9.1071   2.4584   1.7510  0.000  0.00   0.000E+00      0.  0.317E+02  0.653E-01  0.526E-04  0.138E-13   80  58  81  101 124 150  109 119  60    0.000    0.000       0
+  0     58 00:00:29.05   0.4950A   9.0978   2.4697   1.7539  0.000  0.00   0.000E+00      0.  0.317E+02  0.680E-01  0.526E-04  0.138E-13   80  58  81  101 124 151  109 119  60    0.000    0.000       0
+  0     60 00:00:30.04   0.4950A   9.0871   2.4912   1.7564  0.000  0.00   0.000E+00      0.  0.317E+02  0.707E-01  0.528E-04  0.138E-13   80  58  82  101 125 153  109 119  60    0.000    0.000       0
+  0     62 00:00:31.03   0.4960A   9.0754   2.5084   1.7586  0.000  0.00   0.000E+00      0.  0.317E+02  0.735E-01  0.529E-04  0.138E-13   80  58  81  101 125 154  109 119  60    0.000    0.000       0
+  0     64 00:00:32.02   0.4970A   9.0632   2.5097   1.7605  0.000  0.00   0.000E+00      0.  0.317E+02  0.762E-01  0.530E-04  0.138E-13   80  58  81  101 125 155  109 119  60    0.000    0.000       0
+  0     66 00:00:33.02   0.4970A   9.0507   2.5079   1.7622  0.000  0.00   0.000E+00      0.  0.317E+02  0.790E-01  0.531E-04  0.138E-13   80  58  81  101 126 156  109 119  60    0.000    0.000       0
+  0     68 00:00:34.01   0.4980A   9.0380   2.5228   1.7637  0.000  0.00   0.000E+00      0.  0.316E+02  0.818E-01  0.533E-04  0.139E-13   80  58  81  101 126 157  109 119  60    0.000    0.000       0
+  0     70 00:00:35.01   0.4990A   9.0253   2.5202   1.7650  0.000  0.00   0.000E+00      0.  0.316E+02  0.845E-01  0.534E-04  0.139E-13   80  58  81  101 126 158  109 119  60    0.000    0.000       0
+  0     72 00:00:36.01   0.4990A   9.0125   2.4991   1.7661  0.000  0.00   0.000E+00      0.  0.316E+02  0.873E-01  0.535E-04  0.139E-13   80  58  81  101 126 159  109 119  60    0.000    0.000       0
+  0     74 00:00:37.01   0.5000A   8.9999   2.4973   1.7669  0.000  0.00   0.000E+00      0.  0.316E+02  0.901E-01  0.537E-04  0.139E-13   80  58  81  101 127 161  109 119  60    0.000    0.000       0
+  0     76 00:00:38.01   0.5010A   8.9874   2.4926   1.7676  0.000  0.00   0.000E+00      0.  0.316E+02  0.930E-01  0.536E-04  0.139E-13   80  58  81  101 127 161  109 119  60    0.000    0.000       0
+  0     78 00:00:39.01   0.5010A   8.9745   2.4789   1.7681  0.000  0.00   0.000E+00      0.  0.316E+02  0.958E-01  0.536E-04  0.138E-13   80  58  81  101 120 161  109 119  60    0.000    0.000       0
+  0     80 00:00:40.01   0.5020A   8.9608   2.5093   1.7685  0.000  0.00   0.000E+00      0.  0.316E+02  0.987E-01  0.536E-04  0.138E-13   80  58  81  100 120 162  109 119  60    0.000    0.000       0
+  0     82 00:00:41.02   0.5030A   8.9537   2.5438   1.7689  0.000  0.00   0.000E+00      0.  0.316E+02  0.102E+00  0.535E-04  0.138E-13   81  60 160  100 120 163  109 119  60    0.000    0.000       0
+  0     84 00:00:42.02   0.5030A   8.9489   2.5725   1.7692  0.000  0.00   0.000E+00      0.  0.316E+02  0.104E+00  0.534E-04  0.137E-13   81  60 161  100 120 164  109 119  60    0.000    0.000       0
+  0     86 00:00:43.03   0.5030A   8.9436   2.5971   1.7695  0.000  0.00   0.000E+00      0.  0.316E+02  0.107E+00  0.532E-04  0.136E-13   81  60 162  100 120 165  109 119  60    0.000    0.000       0
+  0     88 00:00:44.03   0.5030A   8.9380   2.6237   1.7696  0.000  0.00   0.000E+00      0.  0.315E+02  0.110E+00  0.529E-04  0.135E-13   81  60 163  100 121 167  109 119  60    0.000    0.000       0
+  0     90 00:00:45.04   0.5040A   8.9341   2.6487  -1.7876  0.000  0.00   0.000E+00      0.  0.315E+02  0.113E+00  0.528E-04  0.134E-13   80  60 160  100 121 167   91  57 100    0.000    0.000       0
+  0     92 00:00:46.05   0.5040A   8.9319   2.6771  -1.8667  0.000  0.00   0.000E+00      0.  0.315E+02  0.116E+00  0.524E-04  0.133E-13   80  60 161  100 121 168   91  57 101    0.000    0.000       0
+  0     94 00:00:47.06   0.5040A   8.9295   2.7027  -1.9192  0.000  0.00   0.000E+00      0.  0.315E+02  0.119E+00  0.522E-04  0.132E-13   80  60 162  100 121 169   91  57 102    0.000    0.000       0
+  0     96 00:00:48.06   0.5040A   8.9267   2.7262  -1.9453  0.000  0.00   0.000E+00      0.  0.315E+02  0.122E+00  0.519E-04  0.131E-13   80  60 163  100 121 170   90  56 103    0.000    0.000       0
+  0     98 00:00:49.07   0.5040A   8.9238   2.7479  -2.0250  0.000  0.00   0.000E+00      0.  0.315E+02  0.125E+00  0.517E-04  0.130E-13   80  60 164  100 122 172   90  56 104    0.000    0.000       0
+  0    100 00:00:50.08   0.5040A   8.9205   2.7716  -2.0706  0.000  0.00   0.000E+00      0.  0.315E+02  0.128E+00  0.516E-04  0.130E-13   80  60 165  100 122 173   90  56 105    0.000    0.000       0
+  0    102 00:00:51.09   0.5050A   8.9171  -2.8297  -2.1239  0.000  0.00   0.000E+00      0.  0.315E+02  0.131E+00  0.515E-04  0.129E-13   80  60 166   92  48 118   90  56 105    0.000    0.000       0
+  0    104 00:00:52.10   0.5020A   8.9566  -2.9412  -2.2071  0.000  0.00   0.000E+00      0.  0.315E+02  0.134E+00  0.514E-04  0.129E-13   91  42 122   92  48 119   90  56 106    0.000    0.000       0
+  0    106 00:00:53.10   0.4980A   9.0316  -3.0063  -2.2456  0.000  0.00   0.000E+00      0.  0.315E+02  0.136E+00  0.509E-04  0.127E-13   90  42 122   91  48 119   90  56 107    0.000    0.000       0
+  0    108 00:00:54.10   0.4950A   9.0952  -3.0312  -2.2965  0.000  0.00   0.000E+00      0.  0.315E+02  0.139E+00  0.504E-04  0.126E-13   88  43 123   93  58 119   89  55 108    0.000    0.000       0
+  0    110 00:00:55.08   0.4910A   9.1595  -3.1602  -2.3566  0.000  0.00   0.000E+00      0.  0.315E+02  0.142E+00  0.501E-04  0.124E-13   89  42 124   93  58 119   89  55 109    0.000    0.000       0
+  0    112 00:00:56.06   0.4900A   9.1884  -3.2639  -2.4348  0.000  0.00   0.000E+00      0.  0.314E+02  0.145E+00  0.497E-04  0.123E-13   87  43 125   93  58 119   89  56 109    0.000    0.000       0
+  0    114 00:00:57.04   0.4870A   9.2384  -3.3433  -2.4628  0.000  0.00   0.000E+00      0.  0.314E+02  0.147E+00  0.495E-04  0.122E-13   88  42 126   93  58 119   89  56 110    0.000    0.000       0
+  0    116 00:00:58.02   0.4860A   9.2621  -3.3986  -2.5216  0.000  0.00   0.000E+00      0.  0.314E+02  0.150E+00  0.494E-04  0.122E-13   88  42 127   93  58 119   89  56 110    0.000    0.000       0
+  0    119 00:00:59.47   0.4840A   9.2923  -3.4461  -2.5932  0.000  0.00   0.000E+00      0.  0.314E+02  0.154E+00  0.493E-04  0.121E-13   89  41 129   94  58 119   88  55 112    0.000    0.000       0
+  0    121 00:01:00.44   0.4840A   9.2925  -3.4488  -2.6217  0.000  0.00   0.000E+00      0.  0.314E+02  0.157E+00  0.493E-04  0.121E-13   89  41 130   94  58 119   88  56 112    0.000    0.000       0
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters01
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters01	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters01	(revision 3477)
@@ -0,0 +1,122 @@
+Turbine control data for turbine  1 :
+----------------------------------------
+   Time   RSpeed  GSpeed  GenTorque  AeroTorque  Pitch  Power(Gen)  Power(Rot)  RotThrust  WDirection  YawOrient
+    1.124    0.885    85.80    38972.9   2859802.1   0.00   3156647.5   3098786.0  372308.2     0.00  -20.00
+    1.686    0.878    85.18    30932.9   2700880.1   0.00   2487447.6   2905566.5  357713.4     0.56  -20.00
+    2.222    0.880    85.39    23057.9   2577285.8   0.00   1858547.9   2779129.2  348408.5     0.03  -20.00
+    2.747    0.891    86.40    15347.9   2489254.8   0.00   1251842.2   2716201.8  344557.7    -0.74  -20.00
+    3.261    0.910    88.24    14476.8   2422453.9   0.00   1205857.6   2699417.9  344828.5    -1.20  -20.00
+    3.770    0.929    90.07    16595.5   2365128.5   0.00   1411056.5   2690303.0  348158.6    -1.30  -20.00
+    4.274    0.944    91.59    18321.8   2329320.4   0.00   1584197.7   2694409.5  353571.6    -1.19  -20.00
+    4.777    0.957    92.86    19558.6   2297594.2   0.00   1714521.8   2694454.2  358062.4    -1.02  -20.00
+    5.278    0.968    93.93    20110.9   2262093.8   0.00   1783231.5   2683358.0  360808.2    -0.86  -20.00
+    5.780    0.978    94.88    20593.2   2226362.1   0.00   1844529.4   2667784.3  362490.9    -0.72  -20.00
+    6.284    0.987    95.73    21016.6   2191992.3   0.00   1899178.3   2649930.5  363682.4    -0.60  -20.00
+    6.787    0.995    96.47    21391.5   2160157.6   0.00   1948094.6   2631759.6  364560.5    -0.49  -20.00
+    7.290    1.001    97.12    21722.7   2129973.6   0.00   1991655.7   2612563.5  365061.7    -0.39  -20.00
+    7.792    1.007    97.70    22015.4   2102209.0   0.00   2030391.7   2593709.2  365371.5    -0.31  -20.00
+    8.294    1.012    98.20    22272.9   2076044.5   0.00   2064625.1   2574500.7  365451.3    -0.24  -20.00
+    8.796    1.017    98.63    22497.7   2051798.1   0.00   2094615.2   2555598.1  365375.9    -0.19  -20.00
+    9.297    1.021    99.00    22692.7   2029089.0   0.00   2120688.1   2536783.3  365123.6    -0.15  -20.00
+    9.797    1.024    99.31    22861.1   2008295.3   0.00   2143234.4   2518788.7  364781.2    -0.11  -20.00
+   10.297    1.027    99.58    23005.0   1988949.5   0.00   2162501.1   2501211.6  364340.3    -0.08  -20.00
+   10.796    1.029    99.80    23126.5   1970437.4   0.00   2178749.8   2483436.3  363700.7    -0.06  -20.00
+   11.294    1.031    99.98    23228.3   1954335.3   0.00   2192359.4   2467658.0  363192.9    -0.04  -20.00
+   11.792    1.032   100.13    23312.3   1938844.7   0.00   2203529.1   2451714.3  362547.7    -0.03  -20.00
+   12.289    1.033   100.25    23379.9   1924088.8   0.00   2212479.1   2435866.0  361766.4    -0.02  -20.00
+   12.785    1.034   100.33    23433.4   1911032.3   0.00   2219493.6   2421470.7  361068.1    -0.01  -20.00
+   13.281    1.035   100.40    23473.9   1898353.4   0.00   2224732.5   2406921.7  360265.5    -0.01  -20.00
+   13.776    1.035   100.44    23502.8   1886312.1   0.00   2228378.6   2392624.6  359402.6    -0.00  -20.00
+   14.271    1.036   100.46    23521.5   1875482.4   0.00   2230621.9   2379392.5  358586.2     0.00  -20.00
+   14.765    1.036   100.46    23531.2   1865565.4   0.00   2231644.9   2366916.7  357785.8     0.01  -20.00
+   15.259    1.036   100.45    23533.1   1856193.4   0.00   2231587.4   2354781.3  356982.7     0.01  -20.00
+   15.752    1.035   100.43    23527.8   1846924.2   0.00   2230546.5   2342455.6  356075.5     0.01  -20.00
+   16.245    1.035   100.39    23516.1   1838164.8   0.00   2228628.5   2330497.0  355138.9     0.02  -20.00
+   16.738    1.034   100.35    23499.1   1830572.7   0.00   2225987.0   2319801.4  354331.0     0.02  -20.00
+   17.230    1.034   100.29    23477.3   1823203.6   0.00   2222704.5   2309193.4  353483.2     0.02  -20.00
+   17.722    1.033   100.23    23451.5   1816368.5   0.00   2218874.0   2299099.5  352659.0     0.02  -20.00
+   18.214    1.033   100.16    23422.2   1809745.2   0.00   2214561.6   2289130.6  351809.6     0.03  -20.00
+   18.706    1.032   100.08    23389.8   1803696.4   0.00   2209848.5   2279775.1  351015.0     0.03  -20.00
+   19.198    1.031   100.00    23354.9   1798030.0   0.00   2204801.9   2270810.4  350231.2     0.03  -20.00
+   19.690    1.030    99.92    23317.8   1792465.5   0.00   2199464.4   2261892.5  349420.9     0.03  -20.00
+   20.182    1.029    99.83    23278.9   1787211.9   0.00   2193884.3   2253301.4  348623.9     0.04  -20.00
+   20.674    1.028    99.74    23238.4   1782101.3   0.00   2188096.7   2244835.1  347811.3     0.04  -20.00
+   21.166    1.027    99.65    23196.7   1777543.9   0.00   2182159.2   2237031.9  347069.5     0.04  -20.00
+   21.658    1.026    99.56    23154.1   1773049.9   0.00   2176099.1   2229279.8  346304.6     0.04  -20.00
+   22.150    1.025    99.46    23110.6   1768725.5   0.00   2169943.7   2221720.4  345544.4     0.04  -20.00
+   22.642    1.024    99.37    23066.6   1764940.6   0.00   2163727.4   2214832.8  344863.0     0.05  -20.00
+   23.135    1.023    99.27    23022.4   1761283.8   0.00   2157490.8   2208109.3  344188.2     0.05  -20.00
+   23.628    1.022    99.18    22978.0   1757705.4   0.00   2151248.9   2201490.4  343513.1     0.05  -20.00
+   24.121    1.021    99.08    22933.6   1754236.3   0.00   2145015.1   2195018.3  342841.7     0.05  -20.00
+   24.614    1.020    98.98    22889.3   1750818.9   0.00   2138797.3   2188622.5  342165.1     0.06  -20.00
+   25.107    1.019    98.89    22845.2   1747696.2   0.00   2132617.5   2182615.5  341530.4     0.06  -20.00
+   25.600    1.018    98.79    22801.3   1744673.4   0.00   2126486.9   2176756.1  340900.2     0.06  -20.00
+   26.093    1.018    98.70    22757.7   1741779.7   0.00   2120402.6   2171079.4  340291.6     0.07  -20.00
+   26.587    1.017    98.61    22714.5   1738884.7   0.00   2114381.2   2165425.9  339674.3     0.07  -20.00
+   27.081    1.016    98.51    22671.7   1736112.7   0.00   2108429.2   2159953.3  339074.7     0.07  -19.72
+   27.575    1.015    98.44    22632.4   1741500.9   0.00   2103080.1   2164914.5  339290.5     0.07  -19.43
+   28.069    1.014    98.37    22597.6   1746302.1   0.00   2098402.3   2169393.1  339467.4     0.08  -19.15
+   28.563    1.014    98.31    22567.6   1751021.8   0.00   2094409.8   2174006.1  339683.4     0.09  -18.87
+   29.057    1.013    98.27    22542.2   1755487.5   0.00   2091065.2   2178519.0  339905.5     0.11  -18.58
+   29.552    1.013    98.23    22521.3   1759736.0   0.00   2088334.3   2182962.5  340135.2     0.13  -18.30
+   30.047    1.012    98.20    22504.6   1763977.9   0.00   2086180.8   2187588.0  340404.3     0.14  -18.02
+   30.542    1.012    98.18    22491.8   1768035.9   0.00   2084555.5   2192159.0  340686.8     0.16  -17.73
+   31.038    1.012    98.17    22482.8   1772263.7   0.00   2083440.6   2197112.0  341040.1     0.17  -17.45
+   31.534    1.012    98.16    22477.1   1776160.5   0.00   2082786.2   2201806.4  341373.0     0.17  -17.16
+   32.030    1.012    98.16    22474.5   1779987.7   0.00   2082555.8   2206556.5  341734.1     0.18  -16.88
+   32.527    1.012    98.17    22474.8   1783427.7   0.00   2082697.6   2210948.2  342062.3     0.18  -16.59
+   33.024    1.012    98.18    22477.6   1787079.5   0.00   2083195.8   2215724.5  342462.2     0.18  -16.31
+   33.521    1.012    98.19    22482.8   1790234.9   0.00   2083999.2   2219985.5  342808.0     0.17  -16.02
+   34.019    1.012    98.21    22489.9   1793125.4   0.00   2085063.0   2224002.5  343118.5     0.17  -15.74
+   34.517    1.013    98.23    22498.9   1796513.5   0.00   2086396.4   2228733.8  343556.8     0.17  -15.45
+   35.015    1.013    98.26    22509.7   1799434.9   0.00   2087961.7   2232963.4  343935.2     0.16  -15.17
+   35.514    1.013    98.29    22522.0   1802290.8   0.00   2089732.4   2237181.7  344325.8     0.15  -14.88
+   36.013    1.014    98.32    22535.5   1804722.3   0.00   2091665.0   2240924.7  344668.4     0.15  -14.60
+   36.512    1.014    98.36    22550.2   1807285.8   0.00   2093754.7   2244885.8  345043.5     0.14  -14.31
+   37.012    1.014    98.39    22565.8   1809369.4   0.00   2095954.2   2248284.2  345353.1     0.13  -14.02
+   37.512    1.015    98.43    22582.2   1811888.8   0.00   2098276.8   2252270.2  345769.2     0.13  -13.74
+   38.012    1.015    98.47    22599.4   1814067.7   0.00   2100702.0   2255866.8  346138.8     0.12  -13.45
+   38.513    1.016    98.51    22617.2   1816223.9   0.00   2103212.4   2259464.7  346525.1     0.11  -13.16
+   39.014    1.016    98.55    22635.5   1818102.1   0.00   2105782.4   2262734.7  346860.9     0.11  -12.88
+   39.515    1.016    98.59    22654.2   1819868.8   0.00   2108401.2   2265880.6  347192.6     0.10  -12.59
+   40.017    1.017    98.63    22673.2   1821876.1   0.00   2111071.1   2269346.3  347577.4     0.10  -12.30
+   40.519    1.017    98.67    22692.5   1823485.3   0.00   2113764.8   2272321.7  347902.6     0.09  -12.01
+   41.021    1.018    98.72    22711.8   1824851.6   0.00   2116464.6   2274992.3  348196.5     0.09  -11.72
+   41.524    1.018    98.76    22731.1   1826464.9   0.00   2119173.2   2277975.5  348554.1     0.09  -11.44
+   42.027    1.019    98.80    22750.4   1827650.0   0.00   2121862.4   2280414.0  348837.6     0.08  -11.15
+   42.530    1.019    98.84    22769.5   1828852.3   0.00   2124527.3   2282863.9  349135.3     0.08  -10.86
+   43.033    1.019    98.88    22788.3   1829678.2   0.00   2127140.7   2284821.4  349370.2     0.08  -10.57
+   43.536    1.020    98.92    22806.6   1830321.8   0.00   2129685.0   2286522.7  349577.9     0.08  -10.28
+   44.039    1.020    98.96    22824.4   1831143.5   0.00   2132168.8   2288425.4  349818.2     0.08  -10.00
+   44.542    1.021    99.00    22842.0   1832187.1   0.00   2134615.7   2290595.2  350106.9     0.08   -9.71
+   45.046    1.021    99.03    22859.2   1833153.5   0.00   2137020.7   2292654.6  350397.8     0.08   -9.42
+   45.550    1.021    99.07    22875.9   1833464.9   0.00   2139342.1   2293858.8  350569.5     0.08   -9.13
+   46.054    1.022    99.10    22892.0   1833907.5   0.00   2141582.1   2295196.7  350769.5     0.08   -8.84
+   46.558    1.022    99.13    22907.6   1834256.6   0.00   2143735.7   2296385.6  350952.4     0.08   -8.55
+   47.062    1.022    99.16    22922.4   1834439.9   0.00   2145793.4   2297330.8  351115.1     0.08   -8.26
+   47.566    1.023    99.19    22936.4   1834150.3   0.00   2147723.7   2297632.6  351182.7     0.08   -7.97
+   48.070    1.023    99.22    22949.5   1834001.3   0.00   2149532.7   2298066.7  351274.0     0.08   -7.69
+   48.574    1.023    99.24    22961.8   1833859.3   0.00   2151225.1   2298468.2  351367.6     0.09   -7.40
+   49.078    1.023    99.27    22973.3   1833798.5   0.00   2152812.0   2298935.5  351485.1     0.09   -7.11
+   49.582    1.024    99.29    22984.1   1833800.7   0.00   2154304.6   2299450.0  351606.0     0.09   -6.82
+   50.086    1.024    99.31    22994.2   1833538.2   0.00   2155691.8   2299593.7  351685.7     0.10   -6.53
+   50.590    1.024    99.33    23003.4   1833031.9   0.00   2156961.6   2299386.8  351711.1     0.10   -6.24
+   51.095    1.024    99.35    23012.0   1832944.6   0.00   2158139.9   2299676.7  351821.4     0.11   -5.95
+   51.600    1.024    99.36    23019.8   1832375.9   0.00   2159203.5   2299319.1  351848.6     0.11   -5.66
+   52.105    1.024    99.37    23026.5   1831314.3   0.00   2160112.8   2298282.3  351778.1     0.11   -5.37
+   52.607    1.025    99.39    23032.3   1830628.8   0.00   2160894.2   2297673.9  351779.2     0.12   -5.09
+   53.107    1.025    99.39    23037.2   1829680.0   0.00   2161539.2   2296685.6  351730.9     0.12   -4.80
+   53.605    1.025    99.40    23041.2   1828969.5   0.00   2162068.6   2295958.0  351729.5     0.13   -4.52
+   54.101    1.025    99.41    23044.2   1827785.9   0.00   2162461.2   2294584.8  351646.7     0.14   -4.24
+   54.596    1.025    99.41    23046.4   1826863.6   0.00   2162734.8   2293499.5  351605.1     0.14   -3.95
+   55.089    1.025    99.41    23047.7   1825808.6   0.00   2162889.3   2292205.7  351540.4     0.15   -3.67
+   55.580    1.025    99.41    23048.2   1824636.7   0.00   2162923.0   2290722.2  351446.0     0.15   -3.39
+   56.070    1.025    99.41    23047.9   1823451.3   0.00   2162839.1   2289180.4  351351.0     0.16   -3.11
+   56.560    1.025    99.40    23046.7   1822175.5   0.00   2162637.4   2287483.5  351246.5     0.17   -2.83
+   57.048    1.025    99.40    23044.7   1820884.8   0.00   2162321.5   2285728.4  351137.6     0.17   -2.55
+   57.535    1.025    99.39    23041.7   1819192.5   0.00   2161869.6   2283418.0  350935.4     0.18   -2.27
+   58.022    1.025    99.38    23038.0   1817807.5   0.00   2161302.9   2281455.7  350801.6     0.19   -1.99
+   58.508    1.024    99.37    23033.3   1816075.9   0.00   2160605.9   2279011.2  350599.7     0.20   -1.72
+   58.994    1.024    99.35    23027.7   1814479.9   0.00   2159791.4   2276697.3  350420.8     0.20   -1.44
+   59.479    1.024    99.34    23021.4   1812843.6   0.00   2158863.6   2274294.4  350232.1     0.21   -1.16
+   59.963    1.024    99.32    23014.2   1811126.6   0.00   2157821.1   2271750.7  350029.8     0.22   -0.88
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters02
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters02	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters02	(revision 3477)
@@ -0,0 +1,122 @@
+Turbine control data for turbine  2 :
+----------------------------------------
+   Time   RSpeed  GSpeed  GenTorque  AeroTorque  Pitch  Power(Gen)  Power(Rot)  RotThrust  WDirection  YawOrient
+    1.124    0.889    86.20    38972.9   3096854.8   0.00   3171277.2   3371200.5  385064.9     0.00   10.00
+    1.686    0.886    85.98    30932.9   2949380.3   0.00   2510668.4   3202519.0  375067.9     1.31   10.00
+    2.222    0.893    86.58    23057.9   2831354.0   0.00   1884523.1   3095765.5  369536.0     1.63   10.00
+    2.747    0.907    87.95    15347.9   2722402.2   0.00   1274314.4   3023931.8  365853.1     1.46   10.00
+    3.261    0.929    90.10    15947.0   2628142.6   0.00   1356372.4   2990475.2  364958.8     1.21   10.00
+    3.770    0.949    92.08    18272.2   2575347.3   0.00   1588201.2   2994623.0  371111.5     1.02   10.00
+    4.274    0.966    93.72    19750.9   2543013.1   0.00   1747412.0   3009877.8  378556.8     0.91   10.00
+    4.777    0.981    95.12    20481.8   2501325.2   0.00   1839179.5   3004816.3  382995.2     0.83   10.00
+    5.278    0.994    96.37    21121.1   2456246.0   0.00   1921510.8   2989446.2  385632.3     0.75   10.00
+    5.780    1.005    97.49    21689.9   2415757.2   0.00   1996155.6   2974282.6  387992.1     0.68   10.00
+    6.284    1.015    98.48    22195.0   2376476.6   0.00   2063372.3   2955613.9  389729.5     0.61   10.00
+    6.787    1.024    99.36    22645.4   2340516.0   0.00   2123955.0   2936763.5  391199.2     0.56   10.00
+    7.290    1.032   100.12    23045.1   2306373.7   0.00   2178174.8   2916322.2  392222.8     0.52   10.00
+    7.792    1.039   100.80    23399.3   2274339.8   0.00   2226532.3   2895163.5  392923.0     0.48   10.00
+    8.294    1.045   101.38    23711.2   2243488.2   0.00   2269305.9   2872474.4  393199.6     0.45   10.00
+    8.796    1.050   101.89    23983.4   2215201.1   0.00   2306787.2   2850382.7  393303.8     0.42   10.00
+    9.297    1.055   102.32    24219.1   2188379.2   0.00   2339337.0   2827801.9  393138.3     0.39   10.00
+    9.797    1.059   102.69    24422.0   2162962.0   0.00   2367365.9   2804953.9  392739.1     0.37   10.00
+   10.297    1.062   102.99    24594.1   2138952.6   0.00   2391142.3   2782071.3  392134.2     0.36   10.00
+   10.796    1.064   103.24    24738.0   2115842.1   0.00   2410978.7   2758700.5  391282.8     0.34   10.00
+   11.294    1.066   103.44    24856.9   2095127.9   0.00   2427317.5   2737052.7  390494.7     0.33   10.00
+   11.792    1.068   103.60    24952.8   2075478.0   0.00   2440435.7   2715551.3  389551.7     0.32   10.00
+   12.289    1.069   103.72    25028.1   2056791.4   0.00   2450630.9   2694214.2  388481.1     0.31   10.00
+   12.785    1.070   103.81    25085.3   2039997.9   0.00   2458265.0   2674435.2  387463.5     0.30   10.00
+   13.281    1.071   103.86    25125.9   2023732.6   0.00   2463559.8   2654523.2  386304.1     0.29   10.00
+   13.776    1.071   103.89    25151.9   2008463.7   0.00   2466773.2   2635203.4  385119.1     0.29   10.00
+   14.271    1.071   103.90    25165.1   1994676.3   0.00   2468167.2   2617227.1  384009.5     0.28   10.00
+   14.765    1.071   103.88    25166.5   1980760.1   0.00   2467893.1   2598528.6  382687.9     0.27   10.00
+   15.259    1.071   103.84    25157.7   1968085.4   0.00   2466165.6   2580997.8  381434.2     0.27   10.00
+   15.752    1.070   103.79    25140.1   1956802.2   0.00   2463207.0   2564917.8  380299.8     0.26   10.00
+   16.245    1.069   103.73    25114.7   1945644.9   0.00   2459146.1   2548664.7  379075.4     0.25   10.00
+   16.738    1.069   103.65    25082.5   1935007.4   0.00   2454125.5   2532804.5  377834.0     0.25   10.00
+   17.230    1.068   103.56    25044.2   1924787.6   0.00   2448248.1   2517237.9  376561.9     0.24   10.00
+   17.722    1.067   103.46    25000.5   1915143.5   0.00   2441629.1   2502212.1  375309.9     0.24   10.00
+   18.214    1.065   103.35    24952.3   1905973.4   0.00   2434371.0   2487627.3  374071.0     0.23   10.00
+   18.706    1.064   103.23    24900.1   1897199.2   0.00   2426563.5   2473409.3  372823.3     0.22   10.00
+   19.198    1.063   103.11    24844.5   1888908.5   0.00   2418294.5   2459700.9  371613.2     0.22   10.00
+   19.690    1.062   102.98    24786.0   1880926.4   0.00   2409634.8   2446294.5  370410.2     0.21   10.00
+   20.182    1.060   102.85    24725.2   1873531.6   0.00   2400667.1   2433580.5  369261.1     0.21   10.00
+   20.674    1.059   102.72    24662.4   1866160.7   0.00   2391432.7   2420833.5  368085.3     0.20   10.00
+   21.166    1.058   102.58    24597.8   1858866.5   0.00   2381965.0   2408131.1  366887.0     0.20   10.00
+   21.658    1.056   102.44    24531.6   1851528.0   0.00   2372283.4   2395320.4  365646.8     0.19   10.00
+   22.150    1.055   102.30    24464.1   1844751.1   0.00   2362444.8   2383208.8  364487.3     0.19   10.00
+   22.642    1.053   102.15    24395.5   1838191.6   0.00   2352464.5   2371353.9  363344.0     0.18   10.00
+   23.135    1.052   102.00    24326.0   1831451.1   0.00   2342373.8   2359245.5  362150.7     0.18   10.00
+   23.628    1.050   101.85    24255.8   1825158.4   0.00   2332213.4   2347711.5  361026.9     0.17   10.00
+   24.121    1.049   101.70    24185.2   1818823.1   0.00   2321994.8   2336120.0  359880.4     0.17   10.00
+   24.614    1.047   101.55    24114.0   1812523.9   0.00   2311729.2   2324575.1  358735.9     0.17   10.00
+   25.107    1.045   101.40    24042.5   1806293.2   0.00   2301427.8   2313121.9  357592.9     0.16   10.00
+   25.600    1.044   101.25    23970.5   1799810.2   0.00   2291079.2   2301342.6  356396.4     0.16   10.00
+   26.093    1.042   101.09    23898.1   1793494.5   0.00   2280672.0   2289774.3  355227.3     0.16   10.00
+   26.587    1.041   100.94    23825.3   1787197.7   0.00   2270238.5   2278236.1  354064.3     0.16   10.00
+   27.081    1.039   100.78    23752.2   1780786.4   0.00   2259774.4   2266555.3  352878.9     0.16    9.72
+   27.575    1.037   100.63    23680.0   1777934.1   0.00   2249524.7   2259519.9  351998.4     0.16    9.43
+   28.069    1.036   100.49    23609.7   1775429.2   0.00   2239564.2   2253042.2  351228.6     0.15    9.15
+   28.563    1.034   100.34    23541.0   1772277.7   0.00   2229868.0   2245834.3  350382.1     0.14    8.87
+   29.057    1.033   100.20    23473.8   1768687.6   0.00   2220375.0   2238137.4  349487.1     0.13    8.58
+   29.552    1.032   100.06    23407.9   1764899.5   0.00   2211077.4   2230253.5  348602.0     0.11    8.30
+   30.047    1.030    99.92    23342.9   1760321.4   0.00   2201903.5   2221407.0  347599.2     0.08    8.02
+   30.542    1.029    99.79    23278.5   1755965.4   0.00   2192822.8   2212876.1  346670.2     0.06    7.73
+   31.038    1.027    99.65    23214.5   1750907.0   0.00   2183800.1   2203477.7  345647.0     0.04    7.45
+   31.534    1.026    99.51    23150.8   1745876.2   0.00   2174819.1   2194132.5  344659.7     0.03    7.16
+   32.030    1.025    99.38    23087.0   1740447.7   0.00   2165823.6   2184287.2  343649.8     0.02    6.88
+   32.527    1.023    99.24    23022.7   1734149.9   0.00   2156768.0   2173330.7  342515.0     0.03    6.59
+   33.024    1.022    99.10    22957.8   1727454.2   0.00   2147609.5   2161846.4  341337.5     0.03    6.31
+   33.521    1.020    98.95    22891.6   1720422.9   0.00   2138294.8   2149899.5  340137.3     0.05    6.02
+   34.019    1.019    98.80    22824.2   1712517.0   0.00   2128784.2   2136801.2  338812.0     0.08    5.74
+   34.517    1.017    98.65    22754.8   1703768.4   0.00   2119012.6   2122573.8  337373.8     0.11    5.45
+   35.015    1.015    98.49    22683.2   1694541.4   0.00   2108917.8   2107659.6  335879.9     0.16    5.17
+   35.514    1.014    98.32    22608.9   1684422.4   0.00   2098465.4   2091534.1  334282.4     0.22    4.88
+   36.013    1.012    98.15    22531.5   1672786.1   0.00   2087554.2   2073389.2  332441.8     0.29    4.60
+   36.512    1.010    97.96    22450.4   1661190.7   0.00   2076153.8   2055167.9  330653.1     0.38    4.31
+   37.012    1.008    97.77    22365.5   1648452.0   0.00   2064231.4   2035392.2  328695.5     0.49    4.02
+   37.512    1.006    97.57    22276.2   1634258.6   0.00   2051700.0   2013655.9  326484.9     0.62    3.74
+   38.012    1.004    97.35    22182.1   1619885.3   0.00   2038522.3   1991539.6  324270.3     0.77    3.45
+   38.513    1.001    97.12    22083.0   1604084.3   0.00   2024660.1   1967497.3  321807.4     0.94    3.16
+   39.014    0.999    96.88    21978.6   1587911.5   0.00   2010104.1   1942841.5  319302.4     1.14    2.88
+   39.515    0.996    96.63    21868.6   1571102.3   0.00   1994806.6   1917243.4  316699.3     1.38    2.59
+   40.017    0.993    96.36    21752.8   1552803.1   0.00   1978740.4   1889658.0  313814.0     1.65    2.30
+   40.519    0.991    96.08    21631.1   1534279.8   0.00   1961913.7   1861652.8  310889.7     1.95    2.01
+   41.021    0.987    95.78    21502.9   1514603.4   0.00   1944251.3   1832085.4  307744.8     2.29    2.01
+   41.524    0.984    95.47    21368.0   1492899.0   0.00   1925701.0   1799893.3  304376.6     2.66    2.01
+   42.027    0.981    95.13    21226.2   1470840.6   0.00   1906263.5   1767131.2  300925.5     3.08    2.01
+   42.530    0.977    94.79    21077.4   1448403.4   0.00   1885959.1   1733792.9  297410.6     3.55    2.01
+   43.033    0.973    94.42    20921.6   1425243.5   0.00   1864795.7   1699482.8  293719.3     4.06    2.01
+   43.536    0.969    94.04    20759.1   1401713.4   0.00   1842802.9   1664649.6  289936.2     4.64    2.01
+   44.039    0.965    93.64    20589.8   1377721.1   0.00   1820009.5   1629206.8  286025.1     5.27    2.01
+   44.542    0.961    93.22    20413.7   1353868.0   0.00   1796427.8   1593887.5  282094.8     5.97    2.01
+   45.046    0.957    92.79    20231.8   1330501.6   0.00   1772208.1   1559151.2  278192.0     6.75    2.01
+   45.550    0.952    92.35    20044.7   1307456.5   0.00   1747436.2   1524828.8  274282.9     7.59    2.01
+   46.054    0.947    91.89    19853.0   1284782.3   0.00   1722197.6   1491002.9  270357.0     8.49    2.01
+   46.558    0.943    91.43    19657.3   1262722.3   0.00   1696587.9   1457981.8  266443.4     9.45    2.01
+   47.062    0.938    90.95    19458.5   1241850.2   0.00   1670733.0   1426457.6  262636.3    10.48    2.01
+   47.566    0.933    90.48    19086.7   1222096.3   0.00   1630173.6   1396367.8  258951.5    11.58    2.01
+   48.070    0.928    90.01    18655.4   1203127.1   0.00   1585164.9   1367648.2  255275.1    12.74    2.01
+   48.574    0.923    89.57    18238.7   1185521.9   0.00   1542205.1   1341066.1  251787.5    13.97    2.01
+   49.078    0.919    89.16    17841.6   1169558.8   0.00   1501668.9   1316906.1  248611.3    15.25    2.01
+   49.582    0.915    88.77    17466.0   1154737.2   0.00   1463653.9   1294556.6  245577.5    16.54    2.01
+   50.086    0.911    88.41    17112.2   1141006.0   0.00   1428128.4   1273916.6  242709.6    17.81    2.01
+   50.590    0.908    88.07    16779.7   1128942.9   0.00   1394980.2   1255590.1  240144.5    19.01    2.01
+   51.095    0.905    87.75    16468.9   1117855.9   0.00   1364197.2   1238773.0  237720.3    20.11    2.01
+   51.600    0.902    87.45    16178.9   1107821.8   0.00   1335661.0   1223515.1  235486.2    21.11    2.01
+   52.105    0.899    87.18    15910.9   1098759.1   0.00   1309427.9   1209714.7  233424.1    22.01    2.01
+   52.607    0.896    86.93    15662.5   1090435.2   0.00   1285250.5   1197067.8  231498.7    22.83    2.01
+   53.107    0.894    86.69    15432.9   1083300.4   0.00   1263010.9   1186044.3  229800.2    23.62    2.01
+   53.605    0.892    86.48    15220.9   1076797.5   0.00   1242570.5   1176000.7  228174.3    24.39    2.01
+   54.101    0.889    86.28    15025.5   1071749.4   0.00   1223819.7   1167817.9  226838.5    25.15    2.01
+   54.596    0.888    86.10    14846.2   1067114.0   0.00   1206690.2   1160334.5  225565.1    25.91    2.01
+   55.089    0.886    85.94    14682.3   1063362.5   0.00   1191088.4   1154046.8  224452.8    26.66    2.01
+   55.580    0.884    85.79    14532.8   1060574.3   0.00   1176909.7   1149022.3  223535.3    27.39    2.01
+   56.070    0.883    85.65    14396.1   1057576.4   0.00   1163986.4   1143954.2  222584.2    28.10    2.01
+   56.560    0.882    85.53    14271.6   1054682.6   0.00   1152252.4   1139170.1  221715.2    28.80    2.01
+   57.048    0.881    85.41    14157.6   1051476.1   0.00   1141517.1   1134189.5  220835.2    29.46    2.01
+   57.535    0.879    85.31    14052.2   1048054.1   0.00   1131613.5   1129093.9  219988.4    30.10    2.01
+   58.022    0.878    85.21    13954.0   1043775.4   0.00   1122389.8   1123166.4  219071.6    30.71    2.01
+   58.508    0.877    85.11    13861.6   1039564.6   0.00   1113714.3   1117390.5  218228.4    31.29    2.01
+   58.994    0.877    85.02    13774.0   1034939.6   0.00   1105495.1   1111233.4  217321.9    31.85    2.01
+   59.479    0.876    84.93    13690.6   1030704.8   0.00   1097684.4   1105558.7  216507.4    32.37    2.01
+   59.963    0.875    84.85    13610.8   1026525.3   0.00   1090219.3   1099997.9  215714.0    32.87    2.01
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters03
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters03	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters03	(revision 3477)
@@ -0,0 +1,122 @@
+Turbine control data for turbine  3 :
+----------------------------------------
+   Time   RSpeed  GSpeed  GenTorque  AeroTorque  Pitch  Power(Gen)  Power(Rot)  RotThrust  WDirection  YawOrient
+    1.124    0.890    86.33    38972.9   3175385.1   0.00   3176123.7   3461970.3  388870.1     0.00    0.00
+    1.686    0.889    86.24    30932.9   3030706.6   0.00   2518314.5   3300847.3  379924.3     1.05    0.00
+    2.222    0.897    86.97    23057.9   2913577.2   0.00   1893027.1   3200042.8  375323.0     1.01    0.00
+    2.747    0.912    88.49    15347.9   2820353.0   0.00   1282152.1   3151999.5  374599.9     0.56    0.00
+    3.261    0.936    90.77    16465.4   2711679.9   0.00   1410841.9   3108401.4  372955.0     0.17    0.00
+    3.770    0.957    92.79    18865.8   2645407.9   0.00   1652464.7   3099861.0  377990.2    -0.02    0.00
+    4.274    0.974    94.49    20057.7   2627946.6   0.00   1789104.3   3135908.5  387891.4    -0.06    0.00
+    4.777    0.989    95.97    20827.4   2580237.1   0.00   1886923.8   3127315.2  392017.8    -0.04    0.00
+    5.278    1.003    97.30    21506.3   2535484.7   0.00   1975395.7   3115597.5  395179.5    -0.03    0.00
+    5.780    1.015    98.48    22111.8   2488222.2   0.00   2055670.6   3094642.8  397033.4    -0.02    0.00
+    6.284    1.026    99.53    22651.6   2450651.9   0.00   2128318.7   3080430.7  399347.2    -0.01    0.00
+    6.787    1.036   100.46    23134.5   2413998.1   0.00   2194028.2   3062751.9  401093.6     0.00    0.00
+    7.290    1.044   101.29    23565.4   2382201.4   0.00   2253244.0   3047217.7  402844.0     0.02    0.00
+    7.792    1.052   102.02    23949.9   2351682.2   0.00   2306460.5   3029791.9  404139.1     0.03    0.00
+    8.294    1.058   102.65    24290.9   2321732.0   0.00   2353911.6   3009890.1  404929.1     0.03    0.00
+    8.796    1.064   103.21    24590.5   2292959.3   0.00   2395767.6   2988590.4  405301.8     0.04    0.00
+    9.297    1.069   103.68    24851.9   2266185.7   0.00   2432402.4   2967320.3  405507.6     0.04    0.00
+    9.797    1.073   104.09    25077.9   2239166.5   0.00   2464115.8   2943391.4  405139.6     0.05    0.00
+   10.297    1.077   104.43    25270.4   2212849.8   0.00   2491093.8   2918250.1  404361.4     0.05    0.00
+   10.796    1.079   104.71    25432.5   2189617.4   0.00   2513801.3   2895364.6  403711.2     0.05    0.00
+   11.294    1.082   104.94    25567.6   2168266.9   0.00   2532696.1   2873418.3  402957.4     0.05    0.00
+   11.792    1.084   105.12    25677.8   2147685.7   0.00   2548047.9   2851098.9  402017.7     0.06    0.00
+   12.289    1.085   105.26    25765.9   2128945.3   0.00   2560236.2   2830029.1  401053.5     0.06    0.00
+   12.785    1.086   105.36    25834.2   2110835.6   0.00   2569565.7   2808741.8  399938.8     0.06    0.00
+   13.281    1.087   105.44    25885.1   2095674.3   0.00   2576437.8   2790523.9  399114.8     0.06    0.00
+   13.776    1.087   105.48    25920.3   2079715.3   0.00   2581029.4   2770439.1  397875.7     0.06    0.00
+   14.271    1.088   105.50    25941.5   2065248.6   0.00   2583599.9   2751659.2  396673.9     0.06    0.00
+   14.765    1.088   105.50    25950.7   2052723.5   0.00   2584464.7   2734916.9  395664.5     0.06    0.00
+   15.259    1.087   105.48    25948.9   2039292.6   0.00   2583719.0   2716432.0  394346.0     0.05    0.00
+   15.752    1.087   105.44    25937.8   2028610.4   0.00   2581678.8   2701218.3  393343.3     0.05    0.00
+   16.245    1.086   105.39    25918.8   2018151.3   0.00   2578501.1   2685952.4  392238.0     0.05    0.00
+   16.738    1.086   105.32    25893.1   2008564.2   0.00   2574366.7   2671562.0  391160.1     0.05    0.00
+   17.230    1.085   105.25    25861.2   1998874.9   0.00   2569355.0   2656767.8  389971.9     0.05    0.00
+   17.722    1.084   105.16    25824.1   1990048.6   0.00   2563601.3   2642905.6  388863.9     0.05    0.00
+   18.214    1.083   105.07    25782.2   1981083.8   0.00   2557167.9   2628657.1  387645.1     0.05    0.00
+   18.706    1.082   104.97    25736.5   1973262.1   0.00   2550193.6   2615780.3  386551.9     0.05    0.00
+   19.198    1.081   104.86    25687.3   1965433.0   0.00   2542740.8   2602760.1  385390.2     0.04    0.00
+   19.690    1.080   104.75    25635.6   1958911.9   0.00   2534951.5   2591396.0  384405.5     0.04    0.00
+   20.182    1.079   104.64    25581.9   1952762.9   0.00   2526908.2   2580467.3  383444.0     0.04    0.00
+   20.674    1.078   104.52    25526.7   1946748.4   0.00   2518661.5   2569670.1  382461.9     0.04    0.00
+   21.166    1.076   104.40    25470.3   1941142.9   0.00   2510269.6   2559385.4  381516.0     0.04    0.00
+   21.658    1.075   104.28    25413.1   1935644.0   0.00   2501765.5   2549220.5  380554.0     0.03    0.00
+   22.150    1.074   104.16    25355.2   1930427.1   0.00   2493187.4   2539418.8  379613.0     0.03    0.00
+   22.642    1.073   104.04    25296.7   1925522.0   0.00   2484553.8   2530025.1  378702.0     0.03    0.00
+   23.135    1.071   103.92    25238.2   1920944.8   0.00   2475924.7   2521078.6  377828.9     0.03    0.00
+   23.628    1.070   103.80    25179.7   1916501.1   0.00   2467321.6   2512327.8  376962.4     0.03    0.00
+   24.121    1.069   103.68    25121.4   1912174.2   0.00   2458760.1   2503754.3  376100.2     0.03    0.00
+   24.614    1.068   103.56    25063.4   1908021.8   0.00   2450257.0   2495438.6  375252.8     0.02    0.00
+   25.107    1.066   103.44    25005.9   1904193.4   0.00   2441839.1   2487585.8  374450.8     0.02    0.00
+   25.600    1.065   103.33    24948.9   1900381.1   0.00   2433511.8   2479791.6  373641.8     0.02    0.00
+   26.093    1.064   103.21    24892.4   1896916.6   0.00   2425281.0   2472493.4  372888.2     0.02    0.00
+   26.587    1.063   103.10    24836.7   1893471.3   0.00   2417171.3   2465266.5  372134.7     0.01    0.00
+   27.081    1.062   102.98    24781.9   1890182.0   0.00   2409190.9   2458291.9  371397.1     0.01    0.00
+   27.575    1.061   102.87    24727.8   1886919.1   0.00   2401338.9   2451399.0  370658.9     0.01    0.00
+   28.069    1.059   102.76    24674.6   1883844.6   0.00   2393623.9   2444802.2  369951.7     0.01    0.00
+   28.563    1.058   102.65    24622.3   1880950.2   0.00   2386055.4   2438493.5  369274.2     0.01    0.00
+   29.057    1.057   102.55    24571.0   1878446.0   0.00   2378641.2   2432750.0  368662.4     0.00    0.00
+   29.552    1.056   102.45    24520.8   1875817.3   0.00   2371391.2   2426902.4  368028.8     0.00    0.00
+   30.047    1.055   102.35    24471.6   1873176.2   0.00   2364296.6   2421092.5  367397.3    -0.00    0.00
+   30.542    1.054   102.25    24423.3   1870739.0   0.00   2357347.2   2415598.6  366800.4    -0.01    0.00
+   31.038    1.053   102.15    24376.1   1868265.5   0.00   2350552.8   2410111.0  366196.8    -0.01    0.00
+   31.534    1.052   102.05    24329.9   1865922.8   0.00   2343913.9   2404847.0  365618.6    -0.01    0.00
+   32.030    1.051   101.96    24284.6   1863476.7   0.00   2337401.8   2399493.1  365025.5    -0.01    0.00
+   32.527    1.050   101.87    24240.2   1861212.8   0.00   2331036.9   2394425.7  364461.4    -0.02    0.00
+   33.024    1.049   101.78    24196.9   1859200.0   0.00   2324830.6   2389738.4  363949.6    -0.02    0.00
+   33.521    1.048   101.69    24154.4   1857003.4   0.00   2318752.5   2384858.4  363405.2    -0.02    0.00
+   34.019    1.047   101.61    24112.9   1854775.1   0.00   2312806.6   2379982.0  362857.8    -0.02    0.00
+   34.517    1.047   101.52    24072.2   1852591.5   0.00   2306986.9   2375206.4  362317.4    -0.02    0.00
+   35.015    1.046   101.44    24032.3   1850692.2   0.00   2301292.9   2370841.6  361834.0    -0.03    0.00
+   35.514    1.045   101.36    23993.3   1848616.7   0.00   2295723.8   2366292.8  361320.6    -0.03    0.00
+   36.013    1.044   101.28    23955.1   1846521.7   0.00   2290269.5   2361757.9  360800.7    -0.03    0.00
+   36.512    1.043   101.20    23917.7   1844772.8   0.00   2284934.5   2357710.2  360349.3    -0.03    0.00
+   37.012    1.043   101.12    23881.1   1843042.3   0.00   2279731.6   2353732.4  359907.6    -0.03    0.00
+   37.512    1.042   101.05    23845.4   1841172.3   0.00   2274646.0   2349615.3  359443.5    -0.04    0.00
+   38.012    1.041   100.98    23810.3   1839215.9   0.00   2269652.0   2345418.6  358962.7    -0.04    0.00
+   38.513    1.040   100.91    23776.0   1837623.0   0.00   2264779.4   2341729.8  358553.1    -0.04    0.00
+   39.014    1.040   100.84    23742.4   1835845.6   0.00   2260013.3   2337841.5  358110.8    -0.04    0.00
+   39.515    1.039   100.77    23709.5   1834115.4   0.00   2255339.0   2334045.3  357679.5    -0.05    0.00
+   40.017    1.038   100.70    23677.3   1832549.7   0.00   2250774.3   2330497.5  357285.6    -0.05    0.00
+   40.519    1.037   100.63    23645.9   1831143.7   0.00   2246326.7   2327194.9  356920.7    -0.05    0.00
+   41.021    1.037   100.57    23615.2   1829829.4   0.00   2241990.1   2324048.8  356577.5    -0.06    0.00
+   41.524    1.036   100.51    23585.3   1828384.5   0.00   2237763.0   2320773.1  356217.0    -0.06    0.00
+   42.027    1.036   100.45    23556.1   1826809.0   0.00   2233628.5   2317361.5  355836.8    -0.06    0.00
+   42.530    1.035   100.39    23527.4   1825302.6   0.00   2229583.3   2314067.8  355473.4    -0.06    0.00
+   43.033    1.034   100.33    23499.5   1823987.7   0.00   2225635.0   2311052.0  355145.5    -0.07    0.00
+   43.536    1.034   100.27    23472.1   1822571.9   0.00   2221774.3   2307938.0  354801.8    -0.07    0.00
+   44.039    1.033   100.21    23445.3   1821064.0   0.00   2217989.3   2304732.1  354445.6    -0.07    0.00
+   44.542    1.033   100.16    23419.0   1819598.9   0.00   2214268.4   2301602.6  354094.9    -0.08    0.00
+   45.046    1.032   100.10    23393.1   1818162.4   0.00   2210618.4   2298533.8  353752.1    -0.08    0.00
+   45.550    1.031   100.05    23367.7   1816811.2   0.00   2207041.3   2295598.8  353424.4    -0.08    0.00
+   46.054    1.031   100.00    23342.8   1815375.5   0.00   2203528.6   2292578.9  353083.4    -0.08    0.00
+   46.558    1.030    99.95    23318.4   1814068.2   0.00   2200084.6   2289745.7  352771.5    -0.09    0.00
+   47.062    1.030    99.90    23294.4   1812808.7   0.00   2196710.4   2286997.9  352470.3    -0.09    0.00
+   47.566    1.029    99.85    23270.9   1811568.7   0.00   2193405.1   2284299.0  352179.8    -0.09    0.00
+   48.070    1.029    99.80    23247.9   1810449.7   0.00   2190174.1   2281779.6  351910.1    -0.10    0.00
+   48.574    1.028    99.75    23225.3   1808923.8   0.00   2186987.7   2278759.0  351568.1    -0.10    0.00
+   49.078    1.028    99.70    23203.0   1807827.3   0.00   2183866.8   2276305.1  351301.8    -0.10    0.00
+   49.582    1.027    99.66    23181.2   1806439.7   0.00   2180792.3   2273498.7  350989.5    -0.10    0.00
+   50.086    1.027    99.61    23159.7   1805344.3   0.00   2177778.6   2271083.3  350729.4    -0.11    0.00
+   50.590    1.026    99.57    23138.6   1804135.9   0.00   2174811.6   2268541.9  350450.8    -0.11    0.00
+   51.095    1.026    99.52    23117.8   1802923.5   0.00   2171895.2   2266012.8  350175.4    -0.11    0.00
+   51.600    1.026    99.48    23097.3   1801744.4   0.00   2169028.3   2263542.9  349906.0    -0.11    0.00
+   52.105    1.025    99.44    23077.4   1800659.1   0.00   2166233.7   2261216.0  349653.7    -0.11    0.00
+   52.607    1.025    99.40    23057.9   1799513.9   0.00   2163497.3   2258833.7  349397.5    -0.11    0.00
+   53.107    1.024    99.35    23038.7   1798319.7   0.00   2160811.5   2256406.6  349133.1    -0.12    0.00
+   53.605    1.024    99.31    23019.9   1797203.7   0.00   2158177.3   2254096.2  348882.3    -0.12    0.00
+   54.101    1.023    99.27    23001.5   1796133.7   0.00   2155589.6   2251860.4  348644.6    -0.12    0.00
+   54.596    1.023    99.24    22983.4   1795100.1   0.00   2153055.2   2249689.1  348414.8    -0.12    0.00
+   55.089    1.023    99.20    22965.6   1793970.5   0.00   2150565.5   2247412.2  348168.4    -0.12    0.00
+   55.580    1.022    99.16    22948.0   1792776.1   0.00   2148106.6   2245064.1  347912.3    -0.12    0.00
+   56.070    1.022    99.12    22930.7   1791700.7   0.00   2145677.5   2242876.5  347677.1    -0.13    0.00
+   56.560    1.022    99.09    22913.6   1790660.4   0.00   2143291.4   2240748.3  347449.2    -0.13    0.00
+   57.048    1.021    99.05    22896.8   1789467.1   0.00   2140931.2   2238436.6  347197.6    -0.13    0.00
+   57.535    1.021    99.01    22880.1   1788401.3   0.00   2138596.2   2236294.1  346969.2    -0.13    0.00
+   58.022    1.020    98.98    22863.6   1787306.0   0.00   2136289.9   2234124.9  346737.5    -0.13    0.00
+   58.508    1.020    98.94    22847.2   1786272.9   0.00   2134009.4   2232043.3  346515.5    -0.13    0.00
+   58.994    1.020    98.91    22831.1   1785181.3   0.00   2131756.0   2229897.7  346283.9    -0.14    0.00
+   59.479    1.019    98.88    22815.2   1784035.3   0.00   2129524.0   2227691.0  346043.5    -0.14    0.00
+   59.963    1.019    98.84    22799.3   1782966.8   0.00   2127310.6   2225588.4  345817.1    -0.14    0.00
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters04
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters04	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_turbine_parameters04	(revision 3477)
@@ -0,0 +1,122 @@
+Turbine control data for turbine  4 :
+----------------------------------------
+   Time   RSpeed  GSpeed  GenTorque  AeroTorque  Pitch  Power(Gen)  Power(Rot)  RotThrust  WDirection  YawOrient
+    1.124    0.878    85.12    38972.9   2455214.6   0.00   3131678.4   2639344.9  345875.3     0.00   30.00
+    1.686    0.865    83.90    30932.9   2320551.8   0.00   2449861.7   2458693.6  330349.6     1.78   30.00
+    2.222    0.861    83.53    23057.9   2214941.6   0.00   1818171.4   2336520.2  319753.5     2.62   30.00
+    2.747    0.866    84.00    15347.9   2132799.7   0.00   1217043.3   2262555.3  313384.0     2.87   30.00
+    3.261    0.879    85.30    12170.3   2071136.7   0.00    980008.7   2231150.3  311160.3     2.83   30.00
+    3.770    0.896    86.90    13954.3   2029176.5   0.00   1144773.9   2227023.6  313452.4     2.67   30.00
+    4.274    0.910    88.24    15436.6   1997944.2   0.00   1285921.8   2226574.7  317678.0     2.45   30.00
+    4.777    0.921    89.36    16665.5   1965123.1   0.00   1405763.0   2217564.1  320440.8     2.20   30.00
+    5.278    0.931    90.27    17686.0   1930557.3   0.00   1507127.6   2200876.1  321848.1     1.96   30.00
+    5.780    0.938    91.02    18528.8   1898408.4   0.00   1592048.9   2182185.5  322675.8     1.74   30.00
+    6.284    0.945    91.62    19212.9   1867581.3   0.00   1661731.1   2160928.8  322851.9     1.56   30.00
+    6.787    0.949    92.10    19569.8   1838833.4   0.00   1701411.3   2138734.7  322608.3     1.41   30.00
+    7.290    0.954    92.49    19777.9   1812664.6   0.00   1726860.3   2117320.9  322125.3     1.29   30.00
+    7.792    0.957    92.83    19951.2   1788474.0   0.00   1748266.5   2096590.8  321454.0     1.18   30.00
+    8.294    0.960    93.10    20096.0   1765953.6   0.00   1766250.0   2076411.0  320661.7     1.10   30.00
+    8.796    0.962    93.34    20216.7   1746148.4   0.00   1781276.7   2058231.0  319943.4     1.03   30.00
+    9.297    0.964    93.53    20316.6   1727857.6   0.00   1793711.9   2040807.9  319226.6     0.98   30.00
+    9.797    0.966    93.68    20398.5   1711088.9   0.00   1803880.2   2024302.6  318431.1     0.92   30.00
+   10.297    0.967    93.80    20464.0   1694983.3   0.00   1811969.7   2007791.8  317481.1     0.88   30.00
+   10.796    0.968    93.89    20515.2   1680652.1   0.00   1818234.9   1992716.3  316609.3     0.85   30.00
+   11.294    0.969    93.95    20553.9   1667971.9   0.00   1822928.0   1979043.8  315829.1     0.83   30.00
+   11.792    0.969    93.99    20581.4   1655253.3   0.00   1826165.7   1964812.8  314858.1     0.82   30.00
+   12.289    0.969    94.01    20599.0   1643983.7   0.00   1828138.2   1951874.2  313986.0     0.81   30.00
+   12.785    0.969    94.02    20608.0   1633553.7   0.00   1829002.0   1939565.5  313122.8     0.81   30.00
+   13.281    0.969    94.01    20609.3   1623800.8   0.00   1828886.4   1927742.8  312242.6     0.81   30.00
+   13.776    0.969    93.98    20603.8   1614554.9   0.00   1827900.9   1916243.2  311331.8     0.81   30.00
+   14.271    0.968    93.94    20592.5   1606202.0   0.00   1826170.7   1905573.3  310493.3     0.81   30.00
+   14.765    0.968    93.89    20575.9   1598128.3   0.00   1823774.9   1895028.8  309617.7     0.81   30.00
+   15.259    0.967    93.84    20555.0   1590852.9   0.00   1820821.4   1885265.8  308807.5     0.81   30.00
+   15.752    0.967    93.77    20530.1   1583731.6   0.00   1817365.2   1875534.9  307959.8     0.82   30.00
+   16.245    0.966    93.70    20501.6   1576678.8   0.00   1813451.5   1865747.8  307051.7     0.82   30.00
+   16.738    0.965    93.62    20470.3   1570676.0   0.00   1809186.1   1857108.8  306287.9     0.83   30.00
+   17.230    0.964    93.54    20436.4   1564601.3   0.00   1804595.5   1848292.2  305457.2     0.83   30.00
+   17.722    0.963    93.45    20400.3   1558844.6   0.00   1799726.3   1839774.7  304645.6     0.83   30.00
+   18.214    0.962    93.36    20362.2   1553005.1   0.00   1794599.3   1831086.6  303784.2     0.84   30.00
+   18.706    0.962    93.27    20322.2   1547377.9   0.00   1789245.6   1822587.2  302919.2     0.84   30.00
+   19.198    0.961    93.17    20280.7   1542183.6   0.00   1783709.1   1814552.8  302105.0     0.85   30.00
+   19.690    0.959    93.07    20238.0   1537286.3   0.00   1778027.2   1806834.4  301317.9     0.85   30.00
+   20.182    0.958    92.96    20194.3   1532523.2   0.00   1772225.8   1799246.8  300544.5     0.86   30.00
+   20.674    0.957    92.86    20149.6   1527770.8   0.00   1766319.4   1791647.4  299750.3     0.86   30.00
+   21.166    0.956    92.75    20104.2   1523059.1   0.00   1760320.3   1784075.1  298950.6     0.86   30.00
+   21.658    0.955    92.65    20058.2   1518431.6   0.00   1754241.7   1776584.8  298156.6     0.87   30.00
+   22.150    0.954    92.54    20011.5   1513964.0   0.00   1748100.2   1769271.1  297372.5     0.87   30.00
+   22.642    0.953    92.43    19964.3   1509586.4   0.00   1741894.6   1762051.3  296597.3     0.88   30.00
+   23.135    0.952    92.32    19916.7   1505286.0   0.00   1735651.4   1754918.0  295834.7     0.89   30.00
+   23.628    0.951    92.20    19868.8   1500950.6   0.00   1729373.8   1747740.3  295059.6     0.89   30.00
+   24.121    0.949    92.09    19820.5   1496505.4   0.00   1723058.7   1740429.0  294256.8     0.90   30.00
+   24.614    0.948    91.98    19772.0   1492270.3   0.00   1716719.4   1733363.0  293493.9     0.90   30.00
+   25.107    0.947    91.86    19723.2   1487914.6   0.00   1710353.5   1726155.1  292709.1     0.91   30.00
+   25.600    0.946    91.75    19674.1   1483641.7   0.00   1703967.3   1719044.5  291941.6     0.92   30.00
+   26.093    0.945    91.63    19624.8   1479335.5   0.00   1697546.8   1711891.6  291167.4     0.93   30.00
+   26.587    0.943    91.51    19575.2   1474888.3   0.00   1691101.8   1704573.5  290369.2     0.93   30.00
+   27.081    0.942    91.40    19525.3   1470323.4   0.00   1684625.2   1697115.3  289559.8     0.94   29.72
+   27.575    0.941    91.29    19478.5   1475778.6   0.00   1678681.1   1701479.9  289700.1     0.95   29.43
+   28.069    0.940    91.20    19435.9   1480383.6   0.00   1673338.0   1705080.3  289761.6     0.96   29.15
+   28.563    0.939    91.12    19392.0   1485050.5   0.00   1668101.7   1708963.4  289903.1     0.97   28.87
+   29.057    0.939    91.05    19320.0   1489041.1   0.00   1660655.9   1712263.9  289984.4     0.97   28.58
+   29.552    0.938    91.00    19259.8   1492930.0   0.00   1654485.7   1715707.9  290116.7     0.98   28.30
+   30.047    0.938    90.96    19211.3   1496869.6   0.00   1649568.9   1719448.0  290325.0     0.99   28.02
+   30.542    0.937    90.93    19173.3   1499960.0   0.00   1645736.2   1722401.6  290455.1     0.99   27.73
+   31.038    0.937    90.90    19144.6   1502879.5   0.00   1642856.8   1725323.1  290614.5     1.00   27.45
+   31.534    0.937    90.89    19123.6   1505368.9   0.00   1640771.7   1727883.5  290775.7     1.01   27.16
+   32.030    0.937    90.88    19108.6   1507077.3   0.00   1639293.3   1729641.2  290858.1     1.02   26.88
+   32.527    0.937    90.87    19098.4   1508617.0   0.00   1638300.3   1731281.9  290956.2     1.03   26.59
+   33.024    0.937    90.87    19091.9   1509826.6   0.00   1637678.5   1732600.6  291072.0     1.05   26.31
+   33.521    0.937    90.86    19087.8   1510204.7   0.00   1637281.7   1732990.2  291077.3     1.07   26.02
+   34.019    0.937    90.86    19085.1   1510395.3   0.00   1637024.6   1733179.2  291104.8     1.10   25.74
+   34.517    0.937    90.86    19083.0   1510050.0   0.00   1636813.1   1732749.6  291089.1     1.12   25.45
+   35.015    0.937    90.86    19080.2   1508643.8   0.00   1636510.9   1731067.4  290937.8     1.15   25.17
+   35.514    0.937    90.85    19075.6   1506338.4   0.00   1635993.5   1728294.3  290660.5     1.18   24.88
+   36.013    0.937    90.84    19068.4   1503567.4   0.00   1635185.1   1724919.6  290356.8     1.22   24.60
+   36.512    0.936    90.83    19057.6   1499913.9   0.00   1633991.0   1720445.9  289947.7     1.25   24.31
+   37.012    0.936    90.81    19042.6   1495592.6   0.00   1632344.5   1715110.0  289457.5     1.30   24.02
+   37.512    0.936    90.78    19022.7   1490397.4   0.00   1630170.2   1708661.7  288843.9     1.35   23.74
+   38.012    0.936    90.75    18997.2   1484512.9   0.00   1627406.6   1701305.1  288129.1     1.40   23.45
+   38.513    0.935    90.71    18965.8   1477822.8   0.00   1624005.4   1692899.9  287289.5     1.46   23.16
+   39.014    0.935    90.66    18928.2   1470727.3   0.00   1619953.4   1683909.1  286393.2     1.52   22.88
+   39.515    0.934    90.61    18883.5   1462281.7   0.00   1615155.3   1673228.9  285254.1     1.59   22.59
+   40.017    0.933    90.54    18831.6   1453397.9   0.00   1609605.8   1661912.0  284044.6     1.65   22.30
+   40.519    0.933    90.47    18772.5   1443957.5   0.00   1603298.7   1649827.6  282740.0     1.72   22.01
+   41.021    0.932    90.39    18705.8   1433856.0   0.00   1596208.3   1636855.2  281308.8     1.78   21.72
+   41.524    0.931    90.31    18631.5   1422947.0   0.00   1588330.6   1622830.2  279759.2     1.85   21.44
+   42.027    0.930    90.21    18549.4   1411194.7   0.00   1579638.9   1607711.4  278061.0     1.93   21.15
+   42.530    0.929    90.11    18459.2   1398831.8   0.00   1570127.8   1591771.0  276256.8     2.00   20.86
+   43.033    0.928    89.99    18360.5   1385302.0   0.00   1559749.4   1574369.3  274254.6     2.08   20.57
+   43.536    0.926    89.87    18253.1   1371010.0   0.00   1548483.3   1555973.1  272098.4     2.18   20.28
+   44.039    0.925    89.73    18137.1   1356350.0   0.00   1536353.9   1537046.5  269886.2     2.28   20.00
+   44.542    0.924    89.59    18012.2   1340999.6   0.00   1523340.8   1517226.6  267532.6     2.39   19.71
+   45.046    0.922    89.44    17879.3   1325611.0   0.00   1509542.7   1497280.6  265172.1     2.52   19.42
+   45.550    0.920    89.28    17738.0   1308860.4   0.00   1494920.8   1475702.9  262553.2     2.67   19.13
+   46.054    0.919    89.11    17588.5   1291793.2   0.00   1479501.0   1453692.6  259857.7     2.83   18.84
+   46.558    0.917    88.93    17430.6   1273853.9   0.00   1463276.0   1430628.2  257010.3     3.00   18.55
+   47.062    0.915    88.74    17264.9   1256100.7   0.00   1446324.6   1407728.3  254206.1     3.19   18.26
+   47.566    0.913    88.55    17091.3   1237188.5   0.00   1428629.4   1383479.7  251190.1     3.39   17.97
+   48.070    0.911    88.34    16909.9   1217940.6   0.00   1410219.0   1358822.6  248111.5     3.61   17.69
+   48.574    0.909    88.13    16720.6   1197728.8   0.00   1391077.6   1333058.5  244872.0     3.84   17.40
+   49.078    0.906    87.91    16523.3   1176884.0   0.00   1371207.1   1306569.0  241512.0     4.08   17.11
+   49.582    0.904    87.68    16317.8   1155267.8   0.00   1350602.5   1279210.5  238030.6     4.34   16.82
+   50.086    0.901    87.44    16104.2   1133347.4   0.00   1329298.5   1251520.2  234514.0     4.61   16.53
+   50.590    0.899    87.19    15881.8   1110236.1   0.00   1307213.9   1222512.8  230791.6     4.90   16.24
+   51.095    0.896    86.93    15651.0   1086399.4   0.00   1284399.9   1192725.3  226917.9     5.20   15.95
+   51.600    0.893    86.67    15411.4   1061665.1   0.00   1260841.5   1161980.3  222907.3     5.52   15.66
+   52.105    0.891    86.39    15164.6   1036147.7   0.00   1236704.6   1130440.5  218752.1     5.86   15.37
+   52.607    0.888    86.11    14910.2   1010278.7   0.00   1211952.1   1098589.8  214554.3     6.20   15.09
+   53.107    0.885    85.81    14648.0    983596.8   0.00   1186588.3   1065937.1  210197.5     6.55   14.80
+   53.605    0.882    85.51    14378.0    956304.6   0.00   1160628.4   1032720.3  205753.2     6.91   14.52
+   54.101    0.878    85.20    14099.7    928475.9   0.00   1134032.9    999029.3  201219.9     7.26   14.24
+   54.596    0.875    84.88    13814.0    900177.1   0.00   1106904.6    964962.0  196592.4     7.60   13.95
+   55.089    0.872    84.56    13521.1    871398.2   0.00   1079274.3    930524.1  191910.3     7.92   13.67
+   55.580    0.868    84.22    13220.8    842557.1   0.00   1051136.4    896176.4  187210.2     8.22   13.39
+   56.070    0.865    83.88    12912.6    813261.0   0.00   1022468.4    861506.8  182450.7     8.47   13.11
+   56.560    0.861    83.53    12598.4    783454.2   0.00    993450.6    826487.2  177614.9     8.68   12.83
+   57.048    0.858    83.18    12278.1    753937.9   0.00    964086.2    791977.4  172802.3     8.83   12.55
+   57.535    0.854    82.82    11951.5    724466.6   0.00    934381.1    757724.1  168052.4     8.95   12.27
+   58.022    0.850    82.45    11620.6    695353.8   0.00    904511.1    724077.3  163378.0     9.04   11.99
+   58.508    0.846    82.09    11285.0    666177.0   0.00    874464.5    690595.6  158687.6     9.13   11.72
+   58.994    0.842    81.72    10946.8    637808.8   0.00    844432.1    658205.1  154141.5     9.25   11.44
+   59.479    0.839    81.35    10607.3    610386.5   0.00    814535.6    627050.3  149789.2     9.42   11.16
+   59.963    0.835    80.97    10266.6    583214.4   0.00    784775.2    596405.0  145460.9     9.65   10.88
Index: /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_wtm
===================================================================
--- /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_wtm	(revision 3477)
+++ /palm/tags/release-6.0/EXAMPLES/wind_turbine/example_wtm_wtm	(revision 3477)
@@ -0,0 +1,217 @@
+ # Tablefiles for nrel5MW                                                                                   
+ # Table 1: Distribution table                                                                                                  
+ # Assigns the airfoils 1-8 to positions along the blade          
+ # Pos1[m] Pos2[m] no.atPos1 no.atPos2                                                       
+  0.0   1.5  0  0
+  1.5   5.6  1  1
+  5.6   8.3  1  2
+  8.3  11.8  2  3
+ 11.8  15.9  3  4
+ 15.9  20.0  4  4
+ 20.0  24.0  4  5
+ 24.0  28.2  5  6
+ 28.2  32.3  6  6
+ 32.3  36.4  6  7
+ 36.4  40.5  7  7
+ 40.5  44.5  7  8
+ 44.5  63.0  8  8
+ #                                                                                                   
+ # Table 2: Layout file                                                                                                  
+ # Physical layout of the blade                                                                                                  
+ # Pos[m] twist[deg] chord[m]                                                                                              
+  0.0 13.308  3.542
+  2.9 13.308  3.542
+  5.6 13.308  3.854
+  8.3 13.308  4.167
+ 11.8 13.308  4.557
+ 15.9 11.480  4.652
+ 20.0 10.162  4.458
+ 24.1  9.011  4.249
+ 28.2  7.795  4.007
+ 32.3  6.544  3.748
+ 36.4  5.361  3.502
+ 40.5  4.188  3.256
+ 44.6  3.125  3.010
+ 48.7  2.319  2.764
+ 52.8  1.526  2.518
+ 56.2  0.863  2.313
+ 58.9  0.370  2.086
+ 61.6  0.106  1.419
+ 63.0  0.106  1.419
+ # 
+ # Table 3: Lift and drag coefficients for airfoils 1-8  
+ # alpha   C_l_1   C_d_1   C_l_2   C_d_2   C_l_3   C_d_3   C_l_4   C_d_4   C_l_5   C_d_5   C_l_6   C_d_6   C_l_7   C_d_7   C_l_8   C_d_8
+ #
+-180.00   0.000  0.5000   0.000  0.3500   0.000  0.0602   0.000  0.0407   0.000  0.0267   0.000  0.0202   0.000  0.0185   0.000  0.0198
+-175.00   0.000  0.5000   0.000  0.3500   0.218  0.0699   0.223  0.0507   0.274  0.0370   0.368  0.0324   0.394  0.0332   0.374  0.0341
+-170.00   0.000  0.5000   0.000  0.3500   0.397  0.1107   0.405  0.1055   0.547  0.0968   0.735  0.0943   0.788  0.0945   0.749  0.0955
+-160.00   0.000  0.5000   0.000  0.3500   0.642  0.3045   0.658  0.2982   0.685  0.2876   0.695  0.2848   0.670  0.2909   0.659  0.2807
+-155.00   0.000  0.5000   0.000  0.3500   0.715  0.4179   0.733  0.4121   0.766  0.4025   0.777  0.4001   0.749  0.3932   0.736  0.3919
+-150.00   0.000  0.5000   0.000  0.3500   0.757  0.5355   0.778  0.5308   0.816  0.5232   0.828  0.5215   0.797  0.5112   0.783  0.5086
+-145.00   0.000  0.5000   0.000  0.3500   0.772  0.6535   0.795  0.6503   0.836  0.6454   0.850  0.6447   0.818  0.6309   0.803  0.6267
+-140.00   0.000  0.5000   0.000  0.3500   0.762  0.7685   0.787  0.7672   0.832  0.7656   0.846  0.7660   0.813  0.7485   0.798  0.7427
+-135.00   0.000  0.5000   0.000  0.3500   0.731  0.8777   0.757  0.8785   0.804  0.8807   0.818  0.8823   0.786  0.8612   0.771  0.8537
+-130.00   0.000  0.5000   0.000  0.3500   0.680  0.9788   0.708  0.9819   0.756  0.9882   0.771  0.9911   0.739  0.9665   0.724  0.9574
+-125.00   0.000  0.5000   0.000  0.3500   0.613  1.0700   0.641  1.0756   0.690  1.0861   0.705  1.0905   0.675  1.0625   0.660  1.0519
+-120.00   0.000  0.5000   0.000  0.3500   0.532  1.1499   0.560  1.1580   0.609  1.1730   0.624  1.1787   0.596  1.1476   0.581  1.1355
+-115.00   0.000  0.5000   0.000  0.3500   0.439  1.2174   0.467  1.2280   0.515  1.2474   0.530  1.2545   0.505  1.2206   0.491  1.2070
+-110.00   0.000  0.5000   0.000  0.3500   0.337  1.2716   0.365  1.2847   0.411  1.3084   0.426  1.3168   0.403  1.2805   0.390  1.3656
+-105.00   0.000  0.5000   0.000  0.3500   0.228  1.3118   0.255  1.3274   0.300  1.3552   0.314  1.3650   0.294  1.3265   0.282  1.3104
+-100.00   0.000  0.5000   0.000  0.3500   0.114  1.3378   0.139  1.3557   0.182  1.3875   0.195  1.3984   0.179  1.3582   0.169  1.3410
+ -95.00   0.000  0.5000   0.000  0.3500  -0.002  1.3492   0.021  1.3692   0.061  1.4048   0.073  1.4169   0.060  1.3752   0.052  1.3572
+ -90.00   0.000  0.5000   0.000  0.3500  -0.120  1.3460  -0.098  1.3680  -0.061  1.4070  -0.050  1.4201  -0.060  1.3774  -0.067  1.3587
+ -85.00   0.000  0.5000   0.000  0.3500  -0.236  1.3283  -0.216  1.3521  -0.183  1.3941  -0.173  1.4081  -0.179  1.3648  -0.184  1.3456
+ -80.00   0.000  0.5000   0.000  0.3500  -0.349  1.2964  -0.331  1.3218  -0.302  1.3664  -0.294  1.3811  -0.295  1.3376  -0.299  1.3181
+ -75.00   0.000  0.5000   0.000  0.3500  -0.456  1.2507  -0.441  1.2773  -0.416  1.3240  -0.409  1.3394  -0.407  1.2962  -0.409  1.2765
+ -70.00   0.000  0.5000   0.000  0.3500  -0.557  1.1918  -0.544  1.2193  -0.523  1.2676  -0.518  1.2833  -0.512  1.2409  -0.512  1.2212
+ -65.00   0.000  0.5000   0.000  0.3500  -0.647  1.1204  -0.638  1.1486  -0.622  1.1978  -0.617  1.2138  -0.608  1.1725  -0.606  1.1532
+ -60.00   0.000  0.5000   0.000  0.3500  -0.727  1.0376  -0.720  1.0660  -0.708  1.1156  -0.706  1.1315  -0.693  1.0919  -0.689  1.0731
+ -55.00   0.000  0.5000   0.000  0.3500  -0.792  0.9446  -0.788  0.9728  -0.781  1.0220  -0.780  1.0378  -0.764  1.0002  -0.759  0.9822
+ -50.00   0.000  0.5000   0.000  0.3500  -0.842  0.8429  -0.840  0.8705  -0.838  0.9187  -0.839  0.9341  -0.820  0.8990  -0.814  0.8820
+ -45.00   0.000  0.5000   0.000  0.3500  -0.874  0.7345  -0.875  0.7611  -0.877  0.8074  -0.879  0.8221  -0.857  0.7900  -0.850  0.7742
+ -40.00   0.000  0.5000   0.000  0.3500  -0.886  0.6215  -0.889  0.6466  -0.895  0.6904  -0.898  0.7042  -0.875  0.6754  -0.866  0.6610
+ -35.00   0.000  0.5000   0.000  0.3500  -0.875  0.5067  -0.880  0.5299  -0.889  0.5703  -0.893  0.5829  -0.869  0.5579  -0.860  0.5451
+ -30.00   0.000  0.5000   0.000  0.3500  -0.839  0.3932  -0.846  0.4141  -0.858  0.4503  -0.862  0.4616  -0.838  0.4405  -0.829  0.4295
+ -25.00   0.000  0.5000   0.000  0.3500  -0.777  0.2849  -0.784  0.3030  -0.832  0.3357  -0.803  0.3441  -0.791  0.3256  -0.853  0.3071
+ -24.00   0.000  0.5000   0.000  0.3500  -0.761  0.2642  -0.768  0.2817  -0.852  0.3147  -0.792  0.3209  -0.794  0.3013  -0.870  0.2814
+ -23.00   0.000  0.5000   0.000  0.3500  -0.744  0.2440  -0.751  0.2608  -0.882  0.2946  -0.789  0.2972  -0.805  0.2762  -0.890  0.2556
+ -22.00   0.000  0.5000   0.000  0.3500  -0.725  0.2242  -0.733  0.2404  -0.919  0.2752  -0.792  0.2730  -0.821  0.2506  -0.911  0.2297
+ -21.00   0.000  0.5000   0.000  0.3500  -0.706  0.2049  -0.714  0.2205  -0.963  0.2566  -0.801  0.2485  -0.843  0.2246  -0.934  0.2040
+ -20.00   0.000  0.5000   0.000  0.3500  -0.685  0.1861  -0.693  0.2011  -1.013  0.2388  -0.815  0.2237  -0.869  0.1983  -0.958  0.1785
+ -19.00   0.000  0.5000   0.000  0.3500  -0.662  0.1687  -0.671  0.1822  -1.067  0.2218  -0.833  0.1990  -0.899  0.1720  -0.982  0.1534
+ -18.00   0.000  0.5000   0.000  0.3500  -0.635  0.1533  -0.648  0.1640  -1.125  0.2056  -0.854  0.1743  -0.931  0.1457  -1.005  0.1288
+ -17.00   0.000  0.5000   0.000  0.3500  -0.605  0.1398  -0.624  0.1465  -1.185  0.1901  -0.879  0.1498  -0.964  0.1197  -1.082  0.1037
+ -16.00   0.000  0.5000   0.000  0.3500  -0.571  0.1281  -0.601  0.1300  -1.245  0.1754  -0.905  0.1256  -0.999  0.0940  -1.113  0.0786
+ -15.25   0.000  0.5000   0.000  0.3500  -0.543  0.1208  -0.585  0.1170  -1.290  0.1649  -0.925  0.1080  -1.025  0.0751  -1.107  0.0598
+ -15.00   0.000  0.5000   0.000  0.3500  -0.534  0.1183  -0.579  0.1145  -1.275  0.1570  -0.932  0.1020  -1.033  0.0689  -1.105  0.0535
+ -14.50   0.000  0.5000   0.000  0.3500  -0.514  0.1142  -0.569  0.1070  -1.245  0.1498  -0.945  0.0905  -1.050  0.0567  -1.092  0.0404
+ -14.24   0.000  0.5000   0.000  0.3500  -0.504  0.1121  -0.564  0.1034  -1.229  0.1461  -0.952  0.0847  -1.040  0.0536  -1.085  0.0343
+ -14.00   0.000  0.5000   0.000  0.3500  -0.494  0.1101  -0.559  0.1000  -1.212  0.1412  -0.959  0.0789  -1.030  0.0508  -1.078  0.0283
+ -13.50   0.000  0.5000   0.000  0.3500  -0.473  0.1069  -0.549  0.0932  -1.172  0.1320  -0.972  0.0678  -1.010  0.0449  -1.053  0.0158
+ -13.24   0.000  0.5000   0.000  0.3500  -0.462  0.1052  -0.544  0.0899  -1.148  0.1263  -0.979  0.0622  -1.000  0.0420  -1.034  0.0153
+ -13.00   0.000  0.5000   0.000  0.3500  -0.452  0.1036  -0.539  0.0867  -1.127  0.1210  -0.985  0.0567  -0.990  0.0390  -1.015  0.0151
+ -12.22   0.000  0.5000   0.000  0.3500  -0.418  0.0998  -0.524  0.0769  -1.052  0.1051  -0.960  0.0336  -0.960  0.0296  -0.927  0.0138
+ -12.01   0.000  0.5000   0.000  0.3500  -0.408  0.0987  -0.519  0.0745  -1.035  0.1004  -0.953  0.0271  -0.953  0.0271  -0.905  0.0134
+ -12.00   0.000  0.5000   0.000  0.3500  -0.407  0.0986  -0.519  0.0744  -1.034  0.1003  -0.952  0.0271  -0.952  0.0271  -0.904  0.0134
+ -11.22   0.000  0.5000   0.000  0.3500  -0.370  0.0959  -0.504  0.0657  -0.965  0.0888  -0.911  0.0295  -0.910  0.0293  -0.829  0.0124
+ -11.00   0.000  0.5000   0.000  0.3500  -0.360  0.0951  -0.499  0.0633  -0.943  0.0854  -0.900  0.0303  -0.900  0.0303  -0.807  0.0121
+ -10.19   0.000  0.5000   0.000  0.3500  -0.320  0.0935  -0.483  0.0553  -0.867  0.0740  -0.842  0.0291  -0.844  0.0291  -0.731  0.0113
+ -10.00   0.000  0.5000   0.000  0.3500  -0.311  0.0931  -0.480  0.0534  -0.846  0.0710  -0.828  0.0288  -0.829  0.0287  -0.711  0.0111
+  -9.98   0.000  0.5000   0.000  0.3500  -0.310  0.0931  -0.480  0.0534  -0.845  0.0709  -0.827  0.0287  -0.827  0.0287  -0.708  0.0111
+  -9.70   0.000  0.5000   0.000  0.3500  -0.295  0.0931  -0.469  0.0537  -0.822  0.0684  -0.806  0.0283  -0.784  0.0273  -0.678  0.0108
+  -9.18   0.000  0.5000   0.000  0.3500  -0.269  0.0931  -0.432  0.0545  -0.769  0.0604  -0.767  0.0275  -0.700  0.0221  -0.615  0.0101
+  -9.00   0.000  0.5000   0.000  0.3500  -0.260  0.0931  -0.420  0.0550  -0.765  0.0554  -0.754  0.0271  -0.671  0.0204  -0.595  0.0099
+  -8.98   0.000  0.5000   0.000  0.3500  -0.259  0.0930  -0.419  0.0551  -0.765  0.0551  -0.753  0.0271  -0.668  0.0201  -0.593  0.0099
+  -8.47   0.000  0.5000   0.000  0.3500  -0.233  0.0930  -0.378  0.0570  -0.759  0.0370  -0.691  0.0264  -0.580  0.0156  -0.534  0.0095
+  -8.18   0.000  0.5000   0.000  0.3500  -0.218  0.0930  -0.346  0.0582  -0.756  0.0270  -0.648  0.0218  -0.546  0.0132  -0.498  0.0093
+  -8.12   0.000  0.5000   0.000  0.3500  -0.214  0.0930  -0.341  0.0585  -0.753  0.0265  -0.640  0.0209  -0.536  0.0124  -0.491  0.0092
+  -8.00   0.000  0.5000   0.000  0.3500  -0.208  0.0930  -0.330  0.0590  -0.745  0.0255  -0.625  0.0192  -0.520  0.0120  -0.478  0.0091
+  -7.62   0.000  0.5000   0.000  0.3500  -0.190  0.0915  -0.298  0.0610  -0.724  0.0221  -0.580  0.0140  -0.467  0.0109  -0.441  0.0091
+  -7.45   0.000  0.5000   0.000  0.3500  -0.182  0.0885  -0.283  0.0617  -0.714  0.0208  -0.555  0.0114  -0.444  0.0103  -0.429  0.0091
+  -7.19   0.000  0.5000   0.000  0.3500  -0.169  0.0847  -0.245  0.0633  -0.690  0.0180  -0.508  0.0105  -0.403  0.0095  -0.404  0.0092
+  -7.11   0.000  0.5000   0.000  0.3500  -0.165  0.0825  -0.234  0.0637  -0.681  0.0178  -0.496  0.0103  -0.393  0.0092  -0.393  0.0092
+  -7.00   0.000  0.5000   0.000  0.3500  -0.160  0.0800  -0.220  0.0643  -0.666  0.0175  -0.483  0.0100  -0.386  0.0089  -0.375  0.0086
+  -6.65   0.000  0.5000   0.000  0.3500  -0.142  0.0741  -0.178  0.0659  -0.616  0.0166  -0.441  0.0096  -0.327  0.0084  -0.336  0.0085
+  -6.60   0.000  0.5000   0.000  0.3500  -0.140  0.0735  -0.172  0.0661  -0.609  0.0164  -0.435  0.0096  -0.323  0.0083  -0.331  0.0085
+  -6.50   0.000  0.5000   0.000  0.3500  -0.135  0.0726  -0.160  0.0666  -0.595  0.0161  -0.422  0.0095  -0.311  0.0089  -0.320  0.0084
+  -6.42   0.000  0.5000   0.000  0.3500  -0.131  0.0720  -0.151  0.0670  -0.585  0.0158  -0.413  0.0094  -0.300  0.0087  -0.310  0.0084
+  -6.13   0.000  0.5000   0.000  0.3500  -0.117  0.0696  -0.120  0.0683  -0.542  0.0152  -0.371  0.0092  -0.261  0.0083  -0.278  0.0083
+  -6.00   0.000  0.5000   0.000  0.3500  -0.111  0.0689  -0.111  0.0689  -0.525  0.0117  -0.355  0.0091  -0.245  0.0082  -0.264  0.0082
+  -5.54   0.000  0.5000   0.000  0.3500  -0.092  0.0620  -0.385  0.0245  -0.454  0.0106  -0.291  0.0087  -0.183  0.0075  -0.213  0.0081
+  -5.50   0.000  0.5000   0.000  0.3500  -0.090  0.0614  -0.384  0.0244  -0.451  0.0105  -0.285  0.0087  -0.178  0.0074  -0.208  0.0081
+  -5.40   0.000  0.5000   0.000  0.3500  -0.086  0.0599  -0.378  0.0240  -0.444  0.0103  -0.271  0.0086  -0.165  0.0073  -0.196  0.0080
+  -5.04   0.000  0.5000   0.000  0.3500  -0.073  0.0550  -0.359  0.0225  -0.385  0.0097  -0.225  0.0074  -0.118  0.0069  -0.156  0.0079
+  -5.00   0.000  0.5000   0.000  0.3500  -0.072  0.0547  -0.359  0.0224  -0.382  0.0097  -0.220  0.0073  -0.113  0.0069  -0.151  0.0079
+  -4.54   0.000  0.5000   0.000  0.3500  -0.066  0.0484  -0.360  0.0196  -0.317  0.0092  -0.158  0.0071  -0.053  0.0065  -0.089  0.0076
+  -4.50   0.000  0.5000   0.000  0.3500  -0.065  0.0480  -0.360  0.0195  -0.314  0.0092  -0.152  0.0071  -0.048  0.0065  -0.084  0.0076
+  -4.04   0.000  0.5000   0.000  0.3500  -0.055  0.0415  -0.355  0.0175  -0.254  0.0091  -0.090  0.0070   0.011  0.0063  -0.022  0.0072
+  -4.00   0.000  0.5000   0.000  0.3500  -0.054  0.0411  -0.353  0.0174  -0.251  0.0091  -0.084  0.0070   0.016  0.0063  -0.017  0.0072
+  -3.54   0.000  0.5000   0.000  0.3500  -0.020  0.0354  -0.307  0.0162  -0.192  0.0089  -0.023  0.0069   0.075  0.0061   0.031  0.0068
+  -3.50   0.000  0.5000   0.000  0.3500  -0.017  0.0349  -0.304  0.0161  -0.189  0.0089  -0.018  0.0069   0.080  0.0061   0.035  0.0068
+  -3.04   0.000  0.5000   0.000  0.3500   0.002  0.0303  -0.246  0.0144  -0.123  0.0089   0.044  0.0068   0.140  0.0058   0.084  0.0064
+  -3.00   0.000  0.5000   0.000  0.3500   0.003  0.0299  -0.240  0.0240  -0.120  0.0089   0.049  0.0068   0.145  0.0058   0.088  0.0064
+  -2.50   0.000  0.5000   0.000  0.3500   0.014  0.0255  -0.163  0.0188  -0.051  0.0088   0.115  0.0068   0.208  0.0057   0.150  0.0059
+  -2.00   0.000  0.5000   0.000  0.3500   0.009  0.0198  -0.091  0.0160   0.017  0.0088   0.181  0.0068   0.270  0.0057   0.213  0.0054
+  -1.50   0.000  0.5000   0.000  0.3500   0.004  0.0164  -0.019  0.0137   0.085  0.0088   0.247  0.0067   0.333  0.0057   0.270  0.0053
+  -1.00   0.000  0.5000   0.000  0.3500   0.036  0.0147   0.052  0.0118   0.152  0.0088   0.312  0.0067   0.396  0.0057   0.328  0.0052
+  -0.50   0.000  0.5000   0.000  0.3500   0.073  0.0137   0.121  0.0104   0.219  0.0088   0.377  0.0067   0.458  0.0057   0.385  0.0052
+   0.00   0.000  0.5000   0.000  0.3500   0.137  0.0113   0.196  0.0094   0.288  0.0087   0.444  0.0065   0.521  0.0057   0.442  0.0052
+   0.50   0.000  0.5000   0.000  0.3500   0.213  0.0114   0.265  0.0096   0.354  0.0087   0.508  0.0065   0.583  0.0057   0.499  0.0052
+   1.00   0.000  0.5000   0.000  0.3500   0.292  0.0118   0.335  0.0098   0.421  0.0088   0.573  0.0066   0.645  0.0058   0.556  0.0052
+   1.50   0.000  0.5000   0.000  0.3500   0.369  0.0122   0.404  0.0099   0.487  0.0089   0.636  0.0067   0.706  0.0058   0.613  0.0052
+   2.00   0.000  0.5000   0.000  0.3500   0.444  0.0124   0.472  0.0100   0.554  0.0090   0.701  0.0068   0.768  0.0059   0.670  0.0053
+   2.50   0.000  0.5000   0.000  0.3500   0.514  0.0124   0.540  0.0102   0.619  0.0091   0.765  0.0069   0.828  0.0061   0.727  0.0053
+   3.00   0.000  0.5000   0.000  0.3500   0.580  0.0123   0.608  0.0103   0.685  0.0092   0.827  0.0070   0.888  0.0063   0.784  0.0053
+   3.50   0.000  0.5000   0.000  0.3500   0.645  0.0120   0.674  0.0104   0.749  0.0093   0.890  0.0071   0.948  0.0066   0.841  0.0054
+   4.00   0.000  0.5000   0.000  0.3500   0.710  0.0119   0.742  0.0105   0.815  0.0095   0.952  0.0073   0.996  0.0071   0.898  0.0054
+   4.50   0.000  0.5000   0.000  0.3500   0.776  0.0122   0.809  0.0107   0.879  0.0096   1.013  0.0076   1.046  0.0079   0.955  0.0056
+   5.00   0.000  0.5000   0.000  0.3500   0.841  0.0125   0.875  0.0108   0.944  0.0097   1.062  0.0079   1.095  0.0090   1.011  0.0058
+   5.50   0.000  0.5000   0.000  0.3500   0.904  0.0129   0.941  0.0109   1.008  0.0099   1.111  0.0089   1.145  0.0103   1.057  0.0074
+   6.00   0.000  0.5000   0.000  0.3500   0.967  0.0135   1.007  0.0110   1.072  0.0101   1.161  0.0099   1.192  0.0113   1.103  0.0091
+   6.50   0.000  0.5000   0.000  0.3500   1.027  0.0144   1.071  0.0113   1.135  0.0103   1.208  0.0117   1.239  0.0122   1.041  0.0102
+   7.00   0.000  0.5000   0.000  0.3500   1.084  0.0158   1.134  0.0115   1.197  0.0107   1.254  0.0132   1.282  0.0131   1.181  0.0113
+   7.50   0.000  0.5000   0.000  0.3500   1.140  0.0174   1.198  0.0117   1.256  0.0112   1.301  0.0143   1.324  0.0139   1.219  0.0119
+   8.00   0.000  0.5000   0.000  0.3500   1.193  0.0198   1.260  0.0120   1.305  0.0125   1.336  0.0153   1.358  0.0147   1.257  0.0124
+   8.50   0.000  0.5000   0.000  0.3500   1.242  0.0231   1.318  0.0126   1.348  0.0140   1.369  0.0165   1.385  0.0158   1.293  0.0130
+   9.00   0.000  0.5000   0.000  0.3500   1.287  0.0275   1.368  0.0133   1.390  0.0155   1.400  0.0181   1.403  0.0181   1.326  0.0136
+   9.50   0.000  0.5000   0.000  0.3500   1.333  0.0323   1.422  0.0143   1.424  0.0171   1.428  0.0211   1.401  0.0211   1.356  0.0143
+  10.00   0.000  0.5000   0.000  0.3500   1.368  0.0393   1.475  0.0156   1.458  0.0192   1.442  0.0262   1.358  0.0255   1.382  0.0150
+  10.50   0.000  0.5000   0.000  0.3500   1.400  0.0475   1.523  0.0174   1.488  0.0219   1.427  0.0336   1.313  0.0301   1.400  0.0267
+  11.00   0.000  0.5000   0.000  0.3500   1.425  0.0580   1.570  0.0194   1.512  0.0255   1.374  0.0420   1.287  0.0347   1.415  0.0383
+  11.50   0.000  0.5000   0.000  0.3500   1.449  0.0691   1.609  0.0227   1.533  0.0307   1.316  0.0515   1.274  0.0401   1.425  0.0498
+  12.00   0.000  0.5000   0.000  0.3500   1.473  0.0816   1.642  0.0269   1.549  0.0370   1.277  0.0601   1.272  0.0468   1.434  0.0613
+  12.50   0.000  0.5000   0.000  0.3500   1.494  0.0973   1.675  0.0319   1.558  0.0452   1.250  0.0693   1.273  0.0545   1.443  0.0727
+  13.00   0.000  0.5000   0.000  0.3500   1.513  0.1129   1.700  0.0398   1.470  0.0630   1.246  0.0785   1.273  0.0633   1.451  0.0841
+  13.50   0.000  0.5000   0.000  0.3500   1.538  0.1288   1.717  0.0488   1.398  0.0784   1.247  0.0888   1.273  0.0722   1.453  0.0954
+  14.00   0.000  0.5000   0.000  0.3500   1.563  0.1462   1.712  0.0614   1.354  0.0931   1.256  0.1000   1.272  0.0806   1.448  0.1065
+  14.50   0.000  0.5000   0.000  0.3500   1.587  0.1650   1.703  0.0786   1.336  0.1081   1.260  0.1108   1.273  0.0900   1.444  0.1176
+  15.00   0.000  0.5000   0.000  0.3500   1.614  0.1845   1.692  0.0968   1.333  0.1239   1.271  0.1219   1.275  0.0987   1.445  0.1287
+  15.50   0.000  0.5000   0.000  0.3500   1.631  0.2052   1.671  0.1173   1.326  0.1415   1.281  0.1325   1.281  0.1075   1.447  0.1398
+  16.00   0.000  0.5000   0.000  0.3500   1.649  0.2250   1.649  0.1377   1.329  0.1592   1.289  0.1433   1.284  0.1170   1.448  0.1509
+  16.50   0.000  0.5000   0.000  0.3500   1.666  0.2467   1.621  0.1600   1.326  0.1743   1.294  0.1541   1.296  0.1270   1.444  0.1619
+  17.00   0.000  0.5000   0.000  0.3500   1.681  0.2684   1.598  0.1814   1.321  0.1903   1.304  0.1649   1.306  0.1368   1.438  0.1728
+  17.50   0.000  0.5000   0.000  0.3500   1.699  0.2900   1.571  0.2042   1.331  0.2044   1.309  0.1754   1.308  0.1464   1.439  0.1837
+  18.00   0.000  0.5000   0.000  0.3500   1.719  0.3121   1.549  0.2316   1.333  0.2186   1.315  0.1845   1.308  0.1562   1.448  0.1947
+  18.50   0.000  0.5000   0.000  0.3500   1.735  0.3335   1.545  0.2516   1.340  0.2324   1.320  0.1953   1.308  0.1664   1.452  0.2057
+  19.00   0.000  0.5000   0.000  0.3500   1.751  0.3554   1.544  0.2719   1.362  0.2455   1.330  0.2061   1.308  0.1770   1.448  0.2165
+  19.50   0.000  0.5000   0.000  0.3500   1.767  0.3783   1.549  0.2906   1.382  0.2584   1.343  0.2170   1.307  0.1878   1.438  0.2272
+  20.00   0.000  0.5000   0.000  0.3500   1.782  0.4000   1.565  0.3085   1.398  0.2689   1.354  0.2280   1.311  0.1987   1.428  0.2379
+  20.50   0.000  0.5000   0.000  0.3500   1.798  0.4212   1.565  0.3265   1.426  0.2814   1.359  0.2390   1.325  0.2100   1.415  0.2485
+  21.00   0.000  0.5000   0.000  0.3500   1.810  0.4415   1.565  0.3447   1.437  0.2943   1.360  0.2536   1.324  0.2214   1.401  0.2590
+  22.00   0.000  0.5000   0.000  0.3500   1.830  0.4830   1.563  0.3820   1.418  0.3246   1.325  0.2814   1.277  0.2499   1.359  0.2799
+  23.00   0.000  0.5000   0.000  0.3500   1.847  0.5257   1.558  0.4203   1.397  0.3557   1.288  0.3098   1.229  0.2786   1.300  0.3004
+  24.00   0.000  0.5000   0.000  0.3500   1.861  0.5694   1.552  0.4593   1.376  0.3875   1.251  0.3386   1.182  0.3077   1.220  0.3204
+  25.00   0.000  0.5000   0.000  0.3500   1.872  0.6141   1.546  0.4988   1.354  0.4198   1.215  0.3678   1.136  0.3371   1.168  0.3377
+  26.00   0.000  0.5000   0.000  0.3500   1.881  0.6593   1.539  0.5387   1.332  0.4524   1.181  0.3972   1.093  0.3664   1.116  0.3554
+  28.00   0.000  0.5000   0.000  0.3500   1.894  0.7513   1.527  0.6187   1.293  0.5183   1.120  0.4563   1.017  0.4246   1.015  0.3916
+  30.00   0.000  0.5000   0.000  0.3500   1.904  0.8441   1.522  0.6978   1.265  0.5843   1.076  0.5149   0.962  0.4813   0.926  0.4294
+  32.00   0.000  0.5000   0.000  0.3500   1.915  0.9364   1.529  0.7747   1.253  0.6492   1.056  0.5720   0.937  0.5356   0.855  0.4690
+  35.00   0.000  0.5000   0.000  0.3500   1.929  1.0722   1.544  0.8869   1.264  0.7438   1.066  0.6548   0.947  0.6127   0.800  0.5324
+  40.00   0.000  0.5000   0.000  0.3500   1.903  1.2873   1.529  1.0671   1.258  0.8970   1.064  0.7901   0.950  0.7396   0.804  0.6452
+  45.00   0.000  0.5000   0.000  0.3500   1.820  1.4796   1.471  1.2319   1.217  1.0402   1.035  0.9190   0.928  0.8623   0.793  0.7573
+  50.00   0.000  0.5000   0.000  0.3500   1.690  1.6401   1.376  1.3747   1.146  1.1686   0.980  1.0378   0.884  0.9781   0.763  0.8664
+  55.00   0.000  0.5000   0.000  0.3500   1.522  1.7609   1.249  1.4899   1.049  1.2779   0.904  1.1434   0.821  1.0846   0.717  0.9708
+  60.00   0.000  0.5000   0.000  0.3500   1.323  1.8360   1.097  1.5728   0.932  1.3647   0.810  1.2333   0.740  1.1796   0.656  1.0693
+  65.00   0.000  0.5000   0.000  0.3500   1.106  1.8614   0.928  1.6202   0.799  1.4267   0.702  1.3055   0.646  1.2617   0.582  1.1606
+  70.00   0.000  0.5000   0.000  0.3500   0.880  1.8347   0.750  1.6302   0.657  1.4621   0.582  1.3587   0.540  1.3297   0.495  1.2438
+  75.00   0.000  0.5000   0.000  0.3500   0.658  1.7567   0.570  1.6031   0.509  1.4708   0.456  1.3922   0.425  1.3827   0.398  1.3178
+  80.00   0.000  0.5000   0.000  0.3500   0.449  1.6334   0.396  1.5423   0.362  1.4544   0.326  1.4063   0.304  1.4202   0.291  1.3809
+  85.00   0.000  0.5000   0.000  0.3500   0.267  1.4847   0.237  1.4598   0.221  1.4196   0.197  1.4042   0.179  1.4423   0.176  1.4304
+  90.00   0.000  0.5000   0.000  0.3500   0.124  1.3879   0.101  1.4041   0.092  1.3938   0.072  1.3985   0.053  1.4512   0.053  1.4565
+  95.00   0.000  0.5000   0.000  0.3500   0.002  1.3912  -0.022  1.4053  -0.030  1.3943  -0.050  1.3973  -0.073  1.4480  -0.074  1.4533
+ 100.00   0.000  0.5000   0.000  0.3500  -0.118  1.3795  -0.143  1.3914  -0.150  1.3798  -0.170  1.3810  -0.198  1.4294  -0.199  1.4345
+ 105.00   0.000  0.5000   0.000  0.3500  -0.235  1.3528  -0.261  1.3625  -0.267  1.3504  -0.287  1.3498  -0.319  1.3954  -0.321  1.4004
+ 110.00   0.000  0.5000   0.000  0.3500  -0.348  1.3114  -0.374  1.3188  -0.379  1.3063  -0.399  1.3041  -0.434  1.3464  -0.436  1.3512
+ 115.00   0.000  0.5000   0.000  0.3500  -0.453  1.2557  -0.480  1.2608  -0.483  1.2481  -0.502  1.2442  -0.541  1.2829  -0.543  1.2874
+ 120.00   0.000  0.5000   0.000  0.3500  -0.549  1.1864  -0.575  1.1891  -0.578  1.1763  -0.596  1.1709  -0.637  1.2057  -0.640  1.2099
+ 125.00   0.000  0.5000   0.000  0.3500  -0.633  1.1041  -0.659  1.1046  -0.660  1.0919  -0.677  1.0852  -0.720  1.1157  -0.723  1.1196
+ 130.00   0.000  0.5000   0.000  0.3500  -0.702  1.0102  -0.727  1.0086  -0.727  0.9962  -0.743  0.9883  -0.787  1.0144  -0.790  1.0179
+ 135.00   0.000  0.5000   0.000  0.3500  -0.754  0.9060  -0.778  0.9025  -0.777  0.8906  -0.792  0.8818  -0.836  0.9033  -0.840  0.9064
+ 140.00   0.000  0.5000   0.000  0.3500  -0.787  0.7935  -0.809  0.7883  -0.807  0.7771  -0.821  0.7676  -0.864  0.7845  -0.868  0.7871
+ 145.00   0.000  0.5000   0.000  0.3500  -0.797  0.6750  -0.818  0.6684  -0.815  0.6581  -0.826  0.6481  -0.869  0.6605  -0.872  0.6627
+ 150.00   0.000  0.5000   0.000  0.3500  -0.782  0.5532  -0.800  0.5457  -0.797  0.5364  -0.806  0.5264  -0.847  0.5346  -0.850  0.5363
+ 155.00   0.000  0.5000   0.000  0.3500  -0.739  0.4318  -0.754  0.4236  -0.750  0.4157  -0.758  0.4060  -0.795  0.4103  -0.798  0.4116
+ 160.00   0.000  0.5000   0.000  0.3500  -0.664  0.3147  -0.677  0.3066  -0.673  0.3000  -0.679  0.2912  -0.711  0.2922  -0.714  0.2931
+ 170.00   0.000  0.5000   0.000  0.3500  -0.410  0.1144  -0.417  0.1085  -0.547  0.1051  -0.735  0.0995  -0.788  0.0969  -0.749  0.0971
+ 175.00   0.000  0.5000   0.000  0.3500  -0.226  0.0702  -0.229  0.0510  -0.274  0.0388  -0.368  0.0356  -0.394  0.0334  -0.374  0.0334
+ 180.00   0.000  0.5000   0.000  0.3500   0.000  0.0602   0.000  0.0407   0.000  0.0267   0.000  0.0202   0.000  0.0185   0.000  0.0198
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.gfortran
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.gfortran	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.gfortran	(revision 3477)
@@ -0,0 +1,8 @@
+# Contents of this file are included in palm's makefile if the simple build
+# process (palm_simple_build) is used.
+# Please adjust compiling parameters as required for your system.
+
+F90=mpif90
+COPT= -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf -D__parallel
+F90FLAGS= -Ofast -ffree-line-length-none -I /usr/include
+LDFLAGS= -lnetcdff
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.gfortran.nonetcdf
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.gfortran.nonetcdf	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.gfortran.nonetcdf	(revision 3477)
@@ -0,0 +1,8 @@
+# Contents of this file are included in palm's makefile if the simple build
+# process (palm_simple_build) is used.
+# Please adjust compiling parameters as required for your system.
+
+F90=mpif90
+COPT= -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__parallel
+F90FLAGS= -Ofast -ffree-line-length-none
+LDFLAGS=
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.forwind
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.forwind	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.forwind	(revision 3477)
@@ -0,0 +1,9 @@
+# Contents of this file are included in palm's makefile if the simple install
+# process (palm_simple_install) is used.
+# Please adjust compiling parameters as required for your system.
+
+PROG=palm 
+F90=mpiifort
+COPT= -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf -D__netcdf_64bit -D__lc -D__parallel
+F90FLAGS=  -xSSE4.2 -O3 -cpp -r8 -align all -ftz -fno-alias -no-scalar-rep -no-prec-div -no-prec-sqrt -ip -nbs -convert little_endian -I /cm/shared/apps/netcdf/intel/64/4.1.3/include
+LDFLAGS= -xSSE4.2 -O3 -cpp -r8 -align all -ftz -fno-alias -no-scalar-rep -no-prec-div -no-prec-sqrt -ip -nbs -Vaxlib -L/cm/shared/apps/netcdf/intel/64/4.1.3/lib -lnetcdf -lnetcdff
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.ice1.mpt
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.ice1.mpt	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.ice1.mpt	(revision 3477)
@@ -0,0 +1,9 @@
+# contents of this file are include in palm's makefile if the simple install
+# process (palm_simple_install) is used.
+# Please adjust compiling parameters as required for your system
+
+PROG=palm 
+F90=ifort
+COPT= -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf -D__netcdf_64bit -D__intel_openmp_bug -D__lc -D__parallel -D__mpi2
+F90FLAGS= -xT -O3 -openmp -r8 -align all -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -convert little_endian -I /sw/dataformats/netcdf/3.6.2/include
+LDFLAGS= -xT -O3 -openmp -r8 -align all -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -Vaxlib -lmpi -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -L/sw/dataformats/netcdf/3.6.2/lib -lnetcdf -lnetcdff
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.ice2.mpt
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.ice2.mpt	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.ice2.mpt	(revision 3477)
@@ -0,0 +1,9 @@
+# contents of this file are include in palm's makefile if the simple install
+# process (palm_simple_install) is used.
+# Please adjust compiling parameters as required for your system
+
+PROG=palm 
+F90=mpif90
+COPT= -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf -D__netcdf_64bit -D__intel_openmp_bug -D__lc -D__parallel -D__mpi2
+F90FLAGS= -xSSE4.2 -O3 -openmp -r8 -align all -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -convert little_endian -I /sw/dataformats/netcdf/3.6.2/include
+LDFLAGS= -xSSE4.2 -O3 -openmp -r8 -align all -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -Vaxlib -lmpi -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -L/sw/dataformats/netcdf/3.6.2/lib -lnetcdf -lnetcdff
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.imuk
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.imuk	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.ifort.imuk	(revision 3477)
@@ -0,0 +1,8 @@
+# Contents of this file are included in palm's makefile if the simple build
+# process (palm_simple_build) is used.
+# Please adjust compiling parameters as required for your system.
+
+F90=mpif90
+COPT= -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf -D__lc -D__parallel
+F90FLAGS= -openmp -fpe0 -O3 -xHost -fp-model source -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -I /muksoft/packages/fftw/3.3.4/include -I /muksoft/packages/netcdf/4_intel/include
+LDFLAGS= -openmp -fpe0 -O3 -xHost -fp-model source -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs  -L/muksoft/packages/fftw/3.3.4/lib64  -L/muksoft/packages/netcdf/4_intel/lib -lnetcdf -lnetcdff -lfftw3
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.pgi.openacc
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.pgi.openacc	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.pgi.openacc	(revision 3477)
@@ -0,0 +1,9 @@
+# Contents of this file are included in palm's makefile if the simple install
+# process (palm_simple_install) is used.
+# Please adjust compiling parameters as required for your system.
+
+PROG=palm 
+F90=pgf90
+COPT= -Mpreprocess -D__nopointer -D__openacc -D__cuda_fft -D__lc
+F90FLAGS= -acc -ta=nvidia,5.0,nocache,time -Minfo=acc -Mcray=pointer -fastsse -r8 -Mcuda=cuda5.0
+LDFLAGS= -acc -ta=nvidia,5.0,nocache,time -Minfo=acc -Mcray=pointer -fastsse -r8 -Mcuda=cuda5.0 -L/muksoft/packages/pgi/2013-133/linux86-64/2013/cuda/5.0/lib64 -lcufft
Index: /palm/tags/release-6.0/INSTALL/MAKE.inc.pgi.openacc.MPI
===================================================================
--- /palm/tags/release-6.0/INSTALL/MAKE.inc.pgi.openacc.MPI	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/MAKE.inc.pgi.openacc.MPI	(revision 3477)
@@ -0,0 +1,9 @@
+# Contents of this file are included in palm's makefile if the simple install
+# process (palm_simple_install) is used.
+# Please adjust compiling parameters as required for your system.
+
+PROG=palm 
+F90=mpif90
+COPT= -Mpreprocess -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__parallel -D__nopointer -D__openacc -D__lc
+F90FLAGS= -acc -ta=tesla,6.0,nocache,time -Minfo=acc -fastsse -Mcuda=cuda6.0
+LDFLAGS= -acc -ta=tesla,6.0,nocache,time -Minfo=acc -fastsse -Mcuda=cuda6.0
Index: /palm/tags/release-6.0/INSTALL/RUN.cmd.mpirun
===================================================================
--- /palm/tags/release-6.0/INSTALL/RUN.cmd.mpirun	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/RUN.cmd.mpirun	(revision 3477)
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+# The content of this file is included in the palm_simple_run
+# Please adjust execution parameters as required for your system.
+# PALM needs to be called as: ./palm  < runfile_atmos
+# The following environment variables can be used:
+# ${mpi_ranks} is the total number of mpi ranks (option -p)
+# ${mpi_ranks_per_node} is the total number of mpi ranks per node (option -n)
+# ${openmp_threads} is the number of OpenMP threads (option -t)
+
+export OMP_NUM_THREADS=${openmp_threads}
+mpirun -n ${mpi_ranks}  ./palm  < runfile_atmos
Index: /palm/tags/release-6.0/INSTALL/example_cbl_p3d
===================================================================
--- /palm/tags/release-6.0/INSTALL/example_cbl_p3d	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/example_cbl_p3d	(revision 3477)
@@ -0,0 +1,91 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1225.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles', ! initial conditions
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+
+    pt_vertical_gradient       =    0.0,
+                                    1.0, ! piecewise temp gradients
+    pt_vertical_gradient_level =    0.0,
+                                  800.0, ! height level of temp gradients
+
+
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    surface_heatflux           = 0.1, ! sensible heat flux at the bottom surface
+    bc_pt_b                    = 'neumann', ! required with surface_heatflux
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 3600.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 900.0,  ! output interval for general data
+    dt_data_output_av          = 1800.0, ! output interval for averaged data
+    dt_dopr                    = 900.0,  ! output interval for profile data
+
+    data_output                = 'w_xy', 'w_xz', 'w_xz_av',
+                                 'pt_xy', 'pt_xz',
+
+    data_output_pr             = 'wpt', 'w"pt"', 'w*pt*',
+                                 'w*2',
+                                 '#pt', 'pt*2',
+
+    section_xy                 = 2,
+                                 10, ! grid index for 2D XY cross sections
+    section_xz                 = 20, ! grid index for 2D XZ cross sections
+
+    averaging_interval         = 900.0, ! averaging interval general data
+    dt_averaging_input         = 10.0,  ! averaging general data sampling rate
+
+    averaging_interval_pr      = 600.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+ 
Index: /palm/tags/release-6.0/INSTALL/example_cbl_rc
===================================================================
--- /palm/tags/release-6.0/INSTALL/example_cbl_rc	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/example_cbl_rc	(revision 3477)
@@ -0,0 +1,486 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3133:31     *    atmosphere - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 18-07-18    Run:       example_cbl_4       
+ Time:                 19:19:17    Run-No.:   00
+ Run on host:            p5imuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             3600.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      50.000 m    dy =      50.000 m
+                dz(1) =      50.000 m
+                dz(2) =    1000.000 m
+
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   2862.511 m
+
+ Vertical stretching starts at height:    1225.0 m,
+ Vertical stretching starts at index:           25,
+ Vertical stretching ends at height:   9999999.9 m,
+ Vertical stretching ends at index:             41,
+ Factor used for stretching:                 1.080,
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     20,     42)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)     = pt(1)            
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.100000 K m/s
+
+
+    Constant flux layer between bottom surface and first computational u,v-level:
+
+       z_mo =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:     -20.00 <= rif <= 20.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   800.0  m
+       Temperature:   300.00  300.00  300.00  K
+       Gradient:      ------    0.00    1.00  K/100m
+       Gridpoint:          0       0      16
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: wpt, w"pt", w*pt*, w*2, pt, pt*2,                            
+       Output every               900.00 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    2D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       XY-cross-section  Arrays:  w, pt,                                                               
+       Output every               900.00 s  
+       Cross sections at k = /2/10/
+       scalar-coordinates:   /75.0/475.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+       XZ-cross-section  Arrays:  w, pt,                                                               
+       Output every               900.00 s  
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    2D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset                     
+
+
+       XZ-cross-section  Arrays:  w,                                                                   
+       Output every              1800.00 s  
+       Time averaged over         900.00 s
+       Averaging input every       10.00 s
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.0 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
+    Day of the year at model start :   day_init = 172
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A  -0.2131D -0.2288D  0.1182  0.000  1.38   0.000E+00    800.  0.104E-02  0.103E-02  0.597E-03  0.867E-13    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      1 00:00:20.00  20.0000D  -0.2125  -0.2273   0.1172  0.009  0.69  -0.132E+02    100.  0.103E-02  0.102E-02  0.570E-05  0.411E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      2 00:00:40.00  20.0000D  -0.2117  -0.2252   0.1162  0.009  0.69  -0.133E+02    100.  0.102E-02  0.102E-02  0.935E-05  0.416E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      3 00:01:00.00  20.0000D  -0.2106  -0.2227   0.1152  0.009  0.69  -0.134E+02    100.  0.101E-02  0.101E-02  0.130E-04  0.421E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      4 00:01:20.00  20.0000D  -0.2093  -0.2197   0.1141  0.009  0.69  -0.134E+02    100.  0.100E-02  0.997E-03  0.166E-04  0.424E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      5 00:01:40.00  20.0000D  -0.2077  -0.2164   0.1129  0.009  0.93  -0.134E+02    250.  0.992E-03  0.988E-03  0.203E-04  0.427E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      6 00:02:00.00  20.0000D  -0.2058  -0.2126   0.1117  0.009  0.93  -0.133E+02    250.  0.983E-03  0.979E-03  0.239E-04  0.429E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      7 00:02:20.00  20.0000D  -0.2037  -0.2086   0.1103  0.009  1.22  -0.131E+02    550.  0.974E-03  0.970E-03  0.275E-04  0.431E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      8 00:02:40.00  20.0000D   0.3348D  0.3126D  0.1636  0.011  1.22  -0.105E+02    550.  0.202E-02  0.201E-02  0.601E-03  0.856E-13   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0      9 00:03:00.00  20.0000D   0.3330   0.3039   0.1619  0.011  1.22  -0.105E+02    550.  0.199E-02  0.198E-02  0.374E-04  0.830E-15   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0     10 00:03:20.00  20.0000D   0.3296  -0.2989   0.1601  0.011  1.22  -0.103E+02    550.  0.196E-02  0.195E-02  0.409E-04  0.827E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     11 00:03:40.00  20.0000D   0.3249  -0.2986   0.1580  0.011  1.22  -0.101E+02    550.  0.194E-02  0.193E-02  0.444E-04  0.828E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     12 00:04:00.00  20.0000D   0.3189  -0.2989   0.1558  0.012  1.22  -0.975E+01    550.  0.191E-02  0.190E-02  0.478E-04  0.831E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     13 00:04:20.00  20.0000D   0.3119  -0.3005   0.1535  0.012  1.22  -0.940E+01    550.  0.189E-02  0.188E-02  0.513E-04  0.835E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     14 00:04:40.00  20.0000D   0.3056  -0.3012   0.1512  0.013  1.22  -0.905E+01    550.  0.187E-02  0.185E-02  0.546E-04  0.842E-15   10   3   0    8   0   7    5  36  28    0.000    0.000       0
+  0     15 00:05:00.00  20.0000D   0.4151D -0.3964D -0.1812  0.013  1.22  -0.851E+01    550.  0.292E-02  0.289E-02  0.625E-03  0.860E-13    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     16 00:05:20.00  20.0000D   0.4183  -0.4076  -0.1810  0.014  1.22  -0.811E+01    550.  0.287E-02  0.285E-02  0.640E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     17 00:05:40.00  20.0000D   0.4163  -0.4151  -0.1796  0.015  1.22  -0.773E+01    550.  0.283E-02  0.280E-02  0.672E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     18 00:06:00.00  20.0000D   0.4097  -0.4189  -0.1772  0.015  1.22  -0.735E+01    550.  0.279E-02  0.276E-02  0.703E-04  0.130E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     19 00:06:20.00  20.0000D   0.3992  -0.4192   0.1802  0.016  1.22  -0.698E+01    550.  0.275E-02  0.273E-02  0.734E-04  0.131E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     20 00:06:40.00  20.0000D   0.3855  -0.4165   0.1983  0.017  1.22  -0.656E+01    550.  0.272E-02  0.269E-02  0.765E-04  0.133E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     21 00:07:00.00  20.0000D   0.3695  -0.4109   0.2198  0.018  1.22  -0.616E+01    550.  0.269E-02  0.267E-02  0.795E-04  0.136E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     22 00:07:20.00  20.0000D  -0.3706  -0.4030   0.2474  0.020  1.22  -0.577E+01    550.  0.267E-02  0.265E-02  0.824E-04  0.140E-14    8  13   9    8   3   6    2   6  12    0.000    0.000       0
+  0     23 00:07:40.00  20.0000D  -0.4267D -0.4554D  0.2850  0.021  1.22  -0.539E+01    550.  0.371E-02  0.369E-02  0.653E-03  0.886E-13    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     24 00:08:00.00  20.0000D  -0.4241  -0.4568   0.3233  0.023  1.22  -0.506E+01    550.  0.368E-02  0.366E-02  0.905E-04  0.190E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     25 00:08:20.00  20.0000D  -0.4208  -0.4522   0.3672  0.024  1.22  -0.471E+01    550.  0.367E-02  0.365E-02  0.931E-04  0.196E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     26 00:08:40.00  20.0000D  -0.4174  -0.4421   0.4169  0.026  1.22  -0.440E+01    550.  0.368E-02  0.366E-02  0.957E-04  0.204E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     27 00:09:00.00  20.0000D  -0.4142  -0.4279   0.4727  0.028  1.22  -0.410E+01    550.  0.372E-02  0.370E-02  0.981E-04  0.214E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     28 00:09:20.00  20.0000D  -0.4116  -0.4106   0.5348  0.030  1.18  -0.381E+01    500.  0.380E-02  0.378E-02  0.100E-03  0.227E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     29 00:09:40.00  20.0000D  -0.4107  -0.4087   0.6032  0.032  1.18  -0.355E+01    500.  0.393E-02  0.391E-02  0.103E-03  0.242E-14    5   4   4    5   3  36    2   6  12    0.000    0.000       0
+  0     30 00:10:00.00  20.0000D   0.4798D  0.4695D  0.7094  0.035  1.18  -0.330E+01    500.  0.519E-02  0.516E-02  0.656E-03  0.867E-13    5  14  20    9   7  14    2   6  12    0.000    0.000       0
+  0     31 00:10:20.00  20.0000D   0.4589  -0.4757   0.8018  0.037  1.18  -0.308E+01    500.  0.543E-02  0.540E-02  0.108E-03  0.318E-14    5  14  20    8   2   6    3   6  12    0.000    0.000       0
+  0     32 00:10:40.00  20.0000D   0.4450  -0.4782   0.9236  0.040  1.18  -0.288E+01    500.  0.579E-02  0.576E-02  0.110E-03  0.344E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     33 00:11:00.00  20.0000A   0.4349  -0.4767   1.0530  0.043  1.18  -0.266E+01    500.  0.629E-02  0.626E-02  0.111E-03  0.377E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     34 00:11:20.00  20.0000A  -0.4684  -0.5184   1.1853  0.046  1.18  -0.249E+01    500.  0.699E-02  0.696E-02  0.111E-03  0.416E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     35 00:11:40.00  20.0000A  -0.5110  -0.5803   1.3146  0.049  1.18  -0.233E+01    500.  0.793E-02  0.791E-02  0.112E-03  0.464E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     36 00:12:00.00  20.0000A  -0.5522  -0.6460   1.4351  0.052  1.18  -0.218E+01    500.  0.920E-02  0.917E-02  0.112E-03  0.522E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     37 00:12:20.00  20.0000A   0.6173  -0.7139   1.6132  0.055  1.18  -0.205E+01    500.  0.109E-01  0.108E-01  0.112E-03  0.591E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     38 00:12:40.00  20.0000A   0.6867  -0.7795   1.7863  0.059  1.18  -0.193E+01    500.  0.130E-01  0.130E-01  0.112E-03  0.673E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     39 00:13:00.00  20.0000A   0.7575  -0.8399   1.9135  0.062  1.18  -0.183E+01    500.  0.158E-01  0.158E-01  0.112E-03  0.767E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     40 00:13:20.00  20.0000A   0.8277  -0.8934   2.1012  0.066  1.18  -0.173E+01    500.  0.193E-01  0.193E-01  0.114E-03  0.877E-14    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     41 00:13:40.00  20.0000A   0.8945  -0.9393   2.2220  0.069  1.18  -0.165E+01    500.  0.237E-01  0.236E-01  0.116E-03  0.100E-13    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     42 00:14:00.00  18.9000A   0.9549  -0.9777   2.3774  0.072  1.28  -0.157E+01    650.  0.290E-01  0.290E-01  0.120E-03  0.115E-13    1  35  11    1  29  17    6   6  12    0.000    0.000       0
+  0     43 00:14:18.89  18.4000A   1.0030  -1.0299   2.4491  0.075  1.28  -0.151E+01    650.  0.352E-01  0.351E-01  0.119E-03  0.123E-13    1  35  11    1  28  17    6   6  12    0.000    0.000       0
+  0     44 00:14:37.29  17.7000A   1.0386  -1.1114   2.5494  0.078  1.28  -0.147E+01    650.  0.421E-01  0.421E-01  0.122E-03  0.135E-13    1  35  11    1  28  17    7   6  12    0.000    0.000       0
+  0     45 00:14:55.00  16.2000A   1.0601  -1.1794   2.7727  0.081  1.28  -0.141E+01    650.  0.499E-01  0.498E-01  0.125E-03  0.146E-13    1  35  11    1  28  17    5  24   2    0.000    0.000       0
+  0     46 00:15:11.20  15.4000A   1.0661  -1.2312   2.9236  0.083  1.18  -0.138E+01    500.  0.578E-01  0.578E-01  0.122E-03  0.148E-13    1  35  11    1  28  17    6  24   2    0.000    0.000       0
+  0     47 00:15:26.60  14.3000A  -1.0749  -1.2699   3.1406  0.084  1.28  -0.135E+01    650.  0.662E-01  0.661E-01  0.124E-03  0.155E-13    1  24  19    1  28  17    6  24   2    0.000    0.000       0
+  0     48 00:15:40.89  13.8000A   1.1037  -1.2967   3.2568  0.086  1.28  -0.132E+01    650.  0.746E-01  0.745E-01  0.122E-03  0.156E-13    1  17  38    1  28  17    6  24   2    0.000    0.000       0
+  0     49 00:15:54.69  13.1000A   1.1514  -1.3146   3.4225  0.087  1.28  -0.131E+01    650.  0.832E-01  0.832E-01  0.125E-03  0.163E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     50 00:16:07.79  12.9000A   1.1883  -1.3252   3.4997  0.088  1.29  -0.130E+01    650.  0.919E-01  0.919E-01  0.125E-03  0.167E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     51 00:16:20.69  12.4000A   1.2162  -1.3305   3.6233  0.089  1.29  -0.129E+01    650.  0.101E+00  0.101E+00  0.130E-03  0.175E-13    1  17  38    1  28  17    8  24   2    0.000    0.000       0
+  0     52 00:16:33.09  12.3000A   1.2350  -1.3452   3.6676  0.090  1.29  -0.128E+01    650.  0.110E+00  0.110E+00  0.131E-03  0.179E-13    1  17  38    1  28  18    8  24   2    0.000    0.000       0
+  0     53 00:16:45.39  11.9000A   1.2464  -1.3669   3.7669  0.091  1.29  -0.126E+01    650.  0.119E+00  0.119E+00  0.136E-03  0.188E-13    1  17  38    1  28  18    9  34  13    0.000    0.000       0
+  0     54 00:16:57.29  11.4000A   1.2897  -1.3821   3.9424  0.092  1.29  -0.126E+01    650.  0.128E+00  0.128E+00  0.138E-03  0.191E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     55 00:17:08.69  11.2000A   1.3175  -1.3912   4.0217  0.092  1.29  -0.124E+01    650.  0.136E+00  0.136E+00  0.138E-03  0.192E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     56 00:17:19.89  10.8000A  -1.3130  -1.3950   4.1809  0.093  1.38  -0.123E+01    800.  0.145E+00  0.145E+00  0.141E-03  0.198E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     57 00:17:30.69  10.6000A  -1.3858  -1.3942   4.2493  0.093  1.38  -0.123E+01    800.  0.153E+00  0.153E+00  0.141E-03  0.199E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     58 00:17:41.29  10.4000A  -1.4208  -1.3896   4.3438  0.094  1.38  -0.122E+01    800.  0.162E+00  0.162E+00  0.144E-03  0.204E-13    5  29  17    1  28  18   11  34  13    0.000    0.000       0
+  0     59 00:17:51.69  10.2000A  -1.4345   1.3902   4.4002  0.095  1.38  -0.121E+01    800.  0.170E+00  0.170E+00  0.146E-03  0.208E-13    5  29  17    7  37  19   11  34  13    0.000    0.000       0
+  0     60 00:18:01.89  10.1000A  -1.4414   1.4901   4.4539  0.095  1.38  -0.120E+01    800.  0.177E+00  0.177E+00  0.148E-03  0.212E-13    4  32  19    7  37  19   12  34  13    0.000    0.000       0
+  0     61 00:18:11.99  10.0000A  -1.4695  -1.5076   4.4829  0.096  1.38  -0.120E+01    800.  0.185E+00  0.185E+00  0.151E-03  0.217E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     62 00:18:21.99  10.0000A  -1.4856  -1.6263   4.4854  0.096  1.38  -0.119E+01    800.  0.193E+00  0.192E+00  0.154E-03  0.222E-13    4  32  19    8   7  16   13  34  13    0.000    0.000       0
+  0     63 00:18:31.99  10.0000A  -1.4918  -1.7187   4.4802  0.097  1.38  -0.118E+01    800.  0.200E+00  0.200E+00  0.158E-03  0.229E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     64 00:18:41.99  10.1000A  -1.5052  -1.7636   4.4361  0.097  1.38  -0.116E+01    800.  0.207E+00  0.207E+00  0.163E-03  0.235E-13    4  32  18    8   7  16   14  34  13    0.000    0.000       0
+  0     65 00:18:52.09  10.2000A  -1.5591  -1.7463   4.4065  0.098  1.41  -0.116E+01    850.  0.214E+00  0.214E+00  0.169E-03  0.245E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     66 00:19:02.29  10.3000A  -1.5903  -1.6646   4.3493  0.099  1.41  -0.115E+01    850.  0.221E+00  0.221E+00  0.175E-03  0.253E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     67 00:19:12.59  10.5000A  -1.5979  -1.6322   4.2954  0.099  1.41  -0.115E+01    850.  0.228E+00  0.228E+00  0.180E-03  0.262E-13    4  32  18    9   7  16   15  35  12    0.000    0.000       0
+  0     68 00:19:23.09  10.5000A  -1.5832   1.6962   4.2656  0.100  1.41  -0.114E+01    850.  0.235E+00  0.234E+00  0.188E-03  0.273E-13    4  32  18   12  17  28   15  35  12    0.000    0.000       0
+  0     69 00:19:33.59  10.8000A  -1.5952  -1.7195   4.1677  0.101  1.41  -0.113E+01    850.  0.241E+00  0.241E+00  0.192E-03  0.279E-13    7  12   6    9   7  16   16  35  13    0.000    0.000       0
+  0     70 00:19:44.39  10.7000A  -1.5975  -1.7885   4.1887  0.101  1.41  -0.113E+01    850.  0.247E+00  0.247E+00  0.202E-03  0.293E-13    7  12   6   10   7  17   16  35  13    0.000    0.000       0
+  0     71 00:19:55.09  11.0000A   1.6027  -1.8310   4.1010  0.102  1.41  -0.112E+01    850.  0.253E+00  0.252E+00  0.204E-03  0.295E-13    7   1  37   10   7  17   12  23  18    0.000    0.000       0
+  0     72 00:20:06.09  10.9000A   1.7032  -1.8108   4.1396  0.103  1.41  -0.111E+01    850.  0.258E+00  0.258E+00  0.214E-03  0.308E-13    7  24  30   10   7  17   12  23  18    0.000    0.000       0
+  0     73 00:20:16.99  10.9000A   1.8376   1.7452   4.1413  0.104  1.41  -0.109E+01    850.  0.262E+00  0.262E+00  0.215E-03  0.309E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     74 00:20:27.89  10.7000A   1.9136   1.8271   4.1969  0.105  1.41  -0.107E+01    850.  0.267E+00  0.266E+00  0.219E-03  0.313E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     75 00:20:38.59  10.7000A   1.9332  -1.8931   4.1941  0.106  1.41  -0.106E+01    850.  0.270E+00  0.270E+00  0.218E-03  0.311E-13    7  24  30    9   4   0   13  23  17    0.000    0.000       0
+  0     76 00:20:49.29  10.7000A   1.9366  -1.9949   4.2226  0.107  1.41  -0.105E+01    850.  0.273E+00  0.273E+00  0.220E-03  0.314E-13    7  24  31    9   4   0   13  23  17    0.000    0.000       0
+  0     77 00:21:00.00  10.5000A   2.0189  -2.0694   4.2693  0.108  1.41  -0.104E+01    850.  0.276E+00  0.275E+00  0.223E-03  0.317E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     78 00:21:10.50  10.5000A   2.0530  -2.1078   4.3031  0.109  1.41  -0.103E+01    850.  0.278E+00  0.277E+00  0.221E-03  0.314E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     79 00:21:21.00  10.4000A   2.0502  -2.1052   4.3253  0.110  1.41  -0.102E+01    850.  0.279E+00  0.279E+00  0.223E-03  0.316E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     80 00:21:31.40  10.4000A   2.0227  -2.0595   4.3225  0.111  1.41  -0.101E+01    850.  0.281E+00  0.280E+00  0.222E-03  0.315E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     81 00:21:41.80  10.5000A   1.9814  -1.9732   4.2991  0.112  1.41  -0.100E+01    850.  0.282E+00  0.281E+00  0.224E-03  0.316E-13    7  24  31    9   4   0   15  23  17    0.000    0.000       0
+  0     82 00:21:52.30  10.4000A   1.9340  -1.9475   4.3286  0.113  1.41  -0.982E+00    850.  0.283E+00  0.282E+00  0.227E-03  0.321E-13    7  24  31   10   4   0   15  23  17    0.000    0.000       0
+  0     83 00:22:02.70  10.5000A   1.8924  -2.0069   4.3038  0.114  1.41  -0.972E+00    850.  0.283E+00  0.283E+00  0.226E-03  0.320E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     84 00:22:13.20  10.7000A   1.9415  -2.0355   4.2040  0.115  1.41  -0.961E+00    850.  0.283E+00  0.283E+00  0.229E-03  0.324E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     85 00:22:23.90  10.8000A   1.9325  -2.0217   4.1559  0.116  1.41  -0.952E+00    850.  0.284E+00  0.283E+00  0.234E-03  0.332E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     86 00:22:34.70  11.0000A   1.8907  -1.9607   4.0835  0.117  1.38  -0.945E+00    800.  0.284E+00  0.283E+00  0.237E-03  0.336E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     87 00:22:45.70  11.4000A   1.8309  -1.8652   3.9358  0.118  1.38  -0.942E+00    800.  0.283E+00  0.283E+00  0.242E-03  0.344E-13   14   4   0   10   3   0   16  23  17    0.000    0.000       0
+  0     88 00:22:57.10  12.0000A   1.8977  -1.8027   3.7438  0.119  1.38  -0.929E+00    800.  0.283E+00  0.283E+00  0.252E-03  0.357E-13   15   4   1    7  24   4   16  23  17    0.000    0.000       0
+  0     89 00:23:09.10  12.6000A   1.9544  -1.8206   3.5844  0.119  1.38  -0.923E+00    800.  0.283E+00  0.282E+00  0.265E-03  0.376E-13   15   4   1    8  23   4   17  23  17    0.000    0.000       0
+  0     90 00:23:21.70  12.9000A   1.9261  -1.9283   3.4830  0.120  1.38  -0.920E+00    800.  0.282E+00  0.282E+00  0.278E-03  0.395E-13   15   4   1    8  23   4   16  12  29    0.000    0.000       0
+  0     91 00:23:34.60  13.2000A   1.8512  -2.0241   3.4202  0.121  1.38  -0.928E+00    800.  0.282E+00  0.281E+00  0.284E-03  0.404E-13   15   4   1    8  23   4   11  22  39    0.000    0.000       0
+  0     92 00:23:47.80  13.4000A   1.7632  -2.1053   3.3553  0.121  1.38  -0.909E+00    800.  0.281E+00  0.281E+00  0.290E-03  0.412E-13   15   4   1    8  23   4   12  22  39    0.000    0.000       0
+  0     93 00:24:01.20  13.6000A   1.7138  -2.1674   3.2986  0.122  1.35  -0.903E+00    750.  0.281E+00  0.280E+00  0.293E-03  0.418E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     94 00:24:14.80  13.9000A   1.7170  -2.2027   3.2411  0.122  1.35  -0.901E+00    750.  0.280E+00  0.279E+00  0.296E-03  0.423E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     95 00:24:28.70  14.1000A   1.7197  -2.1983   3.1899  0.123  1.35  -0.896E+00    750.  0.279E+00  0.279E+00  0.301E-03  0.431E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     96 00:24:42.80  14.1000A   1.7153  -2.1719   3.1976  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.303E-03  0.435E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     97 00:24:56.90  13.8000A   1.6963  -2.1325   3.2561  0.123  1.35  -0.890E+00    750.  0.279E+00  0.278E+00  0.302E-03  0.432E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     98 00:25:10.70  13.8000A  -1.7049  -2.1009   3.2710  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.295E-03  0.420E-13    8  25   1    8  23   5   11  23   1    0.000    0.000       0
+  0     99 00:25:24.50  13.8000A   1.7204  -2.1783   3.2616  0.123  1.35  -0.892E+00    750.  0.278E+00  0.278E+00  0.295E-03  0.417E-13   10  26  31    8  23   5   11  23   1    0.000    0.000       0
+  0    100 00:25:38.30  13.8000A   1.7625  -2.1980   3.2579  0.124  1.41  -0.893E+00    850.  0.278E+00  0.278E+00  0.294E-03  0.413E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    101 00:25:52.10  14.0000A   1.7838  -2.1524   3.2052  0.124  1.38  -0.899E+00    800.  0.278E+00  0.277E+00  0.293E-03  0.409E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    102 00:26:06.10  14.1000A   1.7815  -2.0874   3.1853  0.124  1.38  -0.896E+00    800.  0.278E+00  0.277E+00  0.297E-03  0.411E-13   10  26  31    8  22   5   13  23   1    0.000    0.000       0
+  0    103 00:26:20.20  14.4000A  -1.8038  -2.1448   3.1345  0.124  1.38  -0.895E+00    800.  0.277E+00  0.277E+00  0.298E-03  0.410E-13   16  22  38    8  22   5   12  23  19    0.000    0.000       0
+  0    104 00:26:34.60  14.4000A   1.7966  -2.1120   3.1256  0.124  1.38  -0.894E+00    800.  0.277E+00  0.276E+00  0.303E-03  0.414E-13    1  36  26    8  22   5   12  23  19    0.000    0.000       0
+  0    105 00:26:49.00  14.4000A   1.8540  -1.9957   3.1203  0.124  1.38  -0.894E+00    800.  0.276E+00  0.276E+00  0.301E-03  0.410E-13    1  37  26    8  22   5    9  38  26    0.000    0.000       0
+  0    106 00:27:03.40  14.1000A   1.8694   1.8628   3.1953  0.125  1.38  -0.898E+00    800.  0.276E+00  0.275E+00  0.299E-03  0.407E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    107 00:27:17.50  13.8000A   1.8312   1.8697   3.2551  0.125  1.38  -0.900E+00    800.  0.275E+00  0.274E+00  0.292E-03  0.396E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    108 00:27:31.30  13.8000A   1.8481   1.8974   3.2672  0.125  1.38  -0.900E+00    800.  0.274E+00  0.274E+00  0.285E-03  0.386E-13    1  16  38    8  35  23   10  38  26    0.000    0.000       0
+  0    109 00:27:45.10  13.9000A   1.9162   1.9278   3.2486  0.125  1.38  -0.900E+00    800.  0.274E+00  0.273E+00  0.284E-03  0.385E-13    1  16  39    8  35  23   10  38  26    0.000    0.000       0
+  0    110 00:27:59.00  13.9000A   1.9932   1.9444   3.2453  0.126  1.38  -0.902E+00    800.  0.273E+00  0.272E+00  0.285E-03  0.387E-13    1  16  39    8  36  23   11  38  26    0.000    0.000       0
+  0    111 00:28:12.90  13.9000A   2.0637   2.0411   3.2331  0.126  1.38  -0.897E+00    800.  0.272E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    112 00:28:26.80  14.0000A   2.1140   2.0927   3.2228  0.126  1.38  -0.895E+00    800.  0.271E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    113 00:28:40.80  14.0000A   2.1252   2.1098   3.2064  0.126  1.41  -0.895E+00    850.  0.270E+00  0.270E+00  0.287E-03  0.388E-13    1  16  39    9  36  23   13  37  37    0.000    0.000       0
+  0    114 00:28:54.80  14.0000A   2.1629   2.1114   3.2196  0.127  1.41  -0.893E+00    850.  0.269E+00  0.268E+00  0.287E-03  0.388E-13    1  16   0    9  36  23   13  37  37    0.000    0.000       0
+  0    115 00:29:08.80  13.9000A   2.1941   2.1436   3.2459  0.127  1.41  -0.889E+00    850.  0.268E+00  0.267E+00  0.286E-03  0.387E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    116 00:29:22.70  13.9000A   2.1660   2.1317   3.2349  0.127  1.41  -0.888E+00    850.  0.266E+00  0.266E+00  0.284E-03  0.384E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    117 00:29:36.60  14.2000A   2.1114   2.0437   3.1772  0.127  1.38  -0.891E+00    800.  0.265E+00  0.264E+00  0.285E-03  0.383E-13    1  16   1    9  37  23   14  37  37    0.000    0.000       0
+  0    118 00:29:50.80  14.3000A   2.1168   1.8997   3.1409  0.128  1.38  -0.905E+00    800.  0.263E+00  0.262E+00  0.291E-03  0.390E-13    1  16   1    9  37  23   14   9  10    0.000    0.000       0
+  0    119 00:30:05.10  14.4000A   2.0639  -1.9024   3.1211  0.128  1.38  -0.889E+00    800.  0.261E+00  0.260E+00  0.293E-03  0.391E-13    1  16   1   10   6  21   13   6  16    0.000    0.000       0
+  0    120 00:30:19.50  14.1000A   2.0191  -2.0149   3.1855  0.128  1.38  -0.885E+00    800.  0.259E+00  0.258E+00  0.294E-03  0.391E-13    1  17   1   10   6  21    7  25  19    0.000    0.000       0
+  0    121 00:30:33.60  13.8000A  -2.0333  -2.0438   3.2493  0.128  1.38  -0.882E+00    800.  0.257E+00  0.256E+00  0.288E-03  0.381E-13    9  10  18   10   6  21    8  25  19    0.000    0.000       0
+  0    122 00:30:47.40  13.5000A   1.9276  -2.0991   3.3455  0.129  1.38  -0.884E+00    800.  0.254E+00  0.254E+00  0.281E-03  0.371E-13    1  17   1   10   5  21    8  25  19    0.000    0.000       0
+  0    123 00:31:00.90  13.3000A  -1.9161  -2.1236   3.3942  0.129  1.41  -0.879E+00    850.  0.252E+00  0.251E+00  0.275E-03  0.361E-13   10   8  19   10   5  21    9  25  19    0.000    0.000       0
+  0    124 00:31:14.20  13.1000A  -1.9563  -2.0675   3.4440  0.129  1.41  -0.879E+00    850.  0.249E+00  0.249E+00  0.270E-03  0.353E-13   10   9  18   10   5  21    9  25  19    0.000    0.000       0
+  0    125 00:31:27.30  13.1000A  -1.8492  -1.9400   3.4359  0.128  1.41  -0.885E+00    850.  0.247E+00  0.246E+00  0.265E-03  0.345E-13   10   9  18   10   5  21   10  25  19    0.000    0.000       0
+  0    126 00:31:40.40  13.1000A  -1.9169  -1.9001   3.4331  0.128  1.41  -0.884E+00    850.  0.245E+00  0.244E+00  0.264E-03  0.343E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  0    127 00:31:53.50  13.4000A  -1.9327  -1.8837   3.3592  0.128  1.41  -0.890E+00    850.  0.242E+00  0.241E+00  0.263E-03  0.341E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  0    128 00:32:06.90  13.7000A  -1.9667  -1.8724   3.2909  0.128  1.41  -0.894E+00    850.  0.239E+00  0.239E+00  0.268E-03  0.346E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  0    129 00:32:20.60  13.9000A  -2.0586  -1.8788   3.2452  0.127  1.41  -0.899E+00    850.  0.237E+00  0.236E+00  0.273E-03  0.351E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  0    130 00:32:34.50  14.1000A  -2.0979  -1.8873   3.2012  0.127  1.41  -0.902E+00    850.  0.234E+00  0.233E+00  0.275E-03  0.353E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  0    131 00:32:48.60  14.2000A  -2.1232  -1.8963   3.1743  0.127  1.41  -0.904E+00    850.  0.232E+00  0.231E+00  0.278E-03  0.355E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  0    132 00:33:02.80  14.6000A  -2.1511  -1.9032   3.0741  0.126  1.41  -0.904E+00    850.  0.229E+00  0.228E+00  0.278E-03  0.354E-13   13  26  19    1  13  16   10   8  19    0.000    0.000       0
+  0    133 00:33:17.40  14.7000A  -2.2399  -1.9049   3.0632  0.126  1.41  -0.910E+00    850.  0.227E+00  0.226E+00  0.285E-03  0.360E-13   14  26  18    1  13  16   10   8  19    0.000    0.000       0
+  0    134 00:33:32.10  14.7000A  -2.3269  -1.8979   3.0641  0.125  1.41  -0.911E+00    850.  0.225E+00  0.224E+00  0.286E-03  0.359E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  0    135 00:33:46.80  14.6000A  -2.4204  -1.8791   3.0732  0.125  1.41  -0.914E+00    850.  0.223E+00  0.222E+00  0.285E-03  0.355E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  0    136 00:34:01.40  14.9000A  -2.5050  -1.8780   3.0299  0.124  1.38  -0.913E+00    800.  0.221E+00  0.220E+00  0.282E-03  0.349E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  0    137 00:34:16.30  15.2000A  -2.5433  -1.8650   2.9683  0.124  1.38  -0.911E+00    800.  0.219E+00  0.218E+00  0.286E-03  0.353E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  0    138 00:34:31.50  15.3000A  -2.4931  -1.8365   2.9450  0.123  1.38  -0.912E+00    800.  0.218E+00  0.217E+00  0.290E-03  0.357E-13   14  26  18    1  12  16   12   8  19    0.000    0.000       0
+  0    139 00:34:46.80  15.4000A  -2.3625  -1.7932   2.9239  0.122  1.38  -0.922E+00    800.  0.216E+00  0.215E+00  0.292E-03  0.356E-13   14  27  18    1  12  16   12   8  19    0.000    0.000       0
+  0    140 00:35:02.20  15.5000A  -2.3955  -1.7711   2.8952  0.122  1.38  -0.917E+00    800.  0.215E+00  0.214E+00  0.293E-03  0.355E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  0    141 00:35:17.70  15.8000A  -2.4783  -1.7375   2.8481  0.121  1.38  -0.922E+00    800.  0.214E+00  0.213E+00  0.294E-03  0.354E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  0    142 00:35:33.50  15.8000A  -2.4727   1.7971   2.8403  0.121  1.38  -0.929E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.357E-13   15  26  17    8  34  23   14  26  24    0.000    0.000       0
+  0    143 00:35:49.30  15.7000A  -2.3660  -1.7720   2.8642  0.120  1.38  -0.927E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.354E-13   15  26  17    1   8  35    6  38  32    0.000    0.000       0
+  0    144 00:36:05.00  15.3000A  -2.2554  -1.7519   2.9492  0.119  1.38  -0.931E+00    800.  0.212E+00  0.211E+00  0.297E-03  0.349E-13   15  26  16    1   7  34    6  38  32    0.000    0.000       0
+  0    145 00:36:20.30  14.7000A  -2.1060  -1.8205   3.0663  0.119  1.38  -0.940E+00    800.  0.212E+00  0.211E+00  0.290E-03  0.339E-13   15  26  16    1   6  34    7  38  32    0.000    0.000       0
+  0    146 00:36:35.00  14.2000A  -2.0342  -1.8476   3.1662  0.118  1.38  -0.941E+00    800.  0.212E+00  0.211E+00  0.278E-03  0.325E-13   11  11  13    1   6  34    7  38  32    0.000    0.000       0
+  0    147 00:36:49.20  13.9000A  -2.0417  -1.8187   3.2309  0.118  1.38  -0.945E+00    800.  0.211E+00  0.211E+00  0.269E-03  0.313E-13   10  12  14    1   5  34    7  38  32    0.000    0.000       0
+  0    148 00:37:03.10  13.6000A  -2.1224  -1.8939   3.2986  0.117  1.38  -0.950E+00    800.  0.211E+00  0.210E+00  0.264E-03  0.306E-13   10  12  14    1   5  34    8  38  32    0.000    0.000       0
+  0    149 00:37:16.70  13.4000A  -2.1388  -1.8889   3.3525  0.117  1.38  -0.952E+00    800.  0.211E+00  0.210E+00  0.258E-03  0.299E-13   11  12  13    1   5  34    8  38  32    0.000    0.000       0
+  0    150 00:37:30.10  13.4000A  -2.1449  -1.8704   3.3574  0.116  1.38  -0.957E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.294E-13   11  12  13    1   6  35    8  38  32    0.000    0.000       0
+  0    151 00:37:43.50  13.5000A  -2.1129  -1.9084   3.3383  0.116  1.38  -0.961E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    152 00:37:57.00  13.6000A  -2.0518  -1.9761   3.3117  0.116  1.38  -0.963E+00    800.  0.211E+00  0.210E+00  0.257E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    153 00:38:10.60  13.9000A  -1.9674  -1.9342   3.2347  0.115  1.41  -0.967E+00    850.  0.211E+00  0.210E+00  0.259E-03  0.294E-13   13  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    154 00:38:24.50  14.2000A   1.9542  -2.0470   3.1585  0.115  1.41  -0.973E+00    850.  0.211E+00  0.210E+00  0.265E-03  0.298E-13    7  28  21    1   4  35    8  10   7    0.000    0.000       0
+  0    155 00:38:38.70  13.5000A   1.9898  -2.0559   3.3410  0.115  1.41  -0.974E+00    850.  0.211E+00  0.210E+00  0.271E-03  0.303E-13    7  28  22    1   4  35    8   9   7    0.000    0.000       0
+  0    156 00:38:52.20  12.8000A   1.9996  -1.9579   3.5029  0.114  1.41  -0.976E+00    850.  0.211E+00  0.210E+00  0.258E-03  0.288E-13    7  28  22    1   4  35    9   9   7    0.000    0.000       0
+  0    157 00:39:05.00  12.6000A   1.9398  -2.0307   3.5698  0.114  1.41  -0.981E+00    850.  0.211E+00  0.210E+00  0.246E-03  0.273E-13    7  28  22    1   3  35    9   9   7    0.000    0.000       0
+  0    158 00:39:17.60  12.5000A  -1.8941  -2.0019   3.6009  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.243E-03  0.268E-13   14  13  11    1   3  35   10   9   7    0.000    0.000       0
+  0    159 00:39:30.10  12.8000A  -1.8379  -1.8935   3.5261  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.241E-03  0.266E-13    8  13  15    1   3  35   10   8   6    0.000    0.000       0
+  0    160 00:39:42.90  13.0000A  -1.8526   1.8509   3.4685  0.114  1.41  -0.987E+00    850.  0.212E+00  0.211E+00  0.248E-03  0.272E-13    8  13  14   17  15  11   10   8   6    0.000    0.000       0
+  0    161 00:39:55.90  13.1000A  -1.8830   1.9398   3.4337  0.113  1.41  -0.988E+00    850.  0.212E+00  0.211E+00  0.252E-03  0.276E-13    8  13  14   17  15  11   11   8   6    0.000    0.000       0
+  0    162 00:40:09.00  13.1000A  -1.8941   1.9798   3.4235  0.113  1.41  -0.989E+00    850.  0.212E+00  0.211E+00  0.255E-03  0.278E-13    8  13  14   17  15  11   10   9   8    0.000    0.000       0
+  0    163 00:40:22.10  12.9000A  -1.9001   1.9872   3.4874  0.113  1.41  -0.992E+00    850.  0.212E+00  0.211E+00  0.256E-03  0.279E-13    9  13  14   17  16  11   10   9   8    0.000    0.000       0
+  0    164 00:40:35.00  13.0000A  -1.9031   2.1070   3.4497  0.113  1.41  -0.994E+00    850.  0.213E+00  0.211E+00  0.253E-03  0.275E-13    9  13  14   17  16  11   11   9   8    0.000    0.000       0
+  0    165 00:40:48.00  13.3000A  -1.9423   2.1554   3.3887  0.113  1.41  -0.994E+00    850.  0.213E+00  0.212E+00  0.256E-03  0.278E-13   18  13   9   17  16  11   11   9   8    0.000    0.000       0
+  0    166 00:41:01.30  13.5000A  -1.9704   2.1123   3.3329  0.113  1.41  -0.997E+00    850.  0.213E+00  0.212E+00  0.263E-03  0.285E-13   18  13   9   17  16  11   12   8   7    0.000    0.000       0
+  0    167 00:41:14.80  13.7000A  -1.9694   2.1270   3.2763  0.113  1.41  -0.100E+01    850.  0.213E+00  0.212E+00  0.268E-03  0.290E-13   18  14   9   17  17  11   11   8   8    0.000    0.000       0
+  0    168 00:41:28.50  13.6000A  -1.9760   2.1839   3.3015  0.113  1.41  -0.100E+01    850.  0.214E+00  0.212E+00  0.274E-03  0.295E-13   18  14   9   17  17  11   12   8   8    0.000    0.000       0
+  0    169 00:41:42.10  13.5000A   1.9771   2.1764   3.3436  0.113  1.41  -0.101E+01    850.  0.214E+00  0.212E+00  0.273E-03  0.294E-13   12   5  12   18  18   9   12   8   8    0.000    0.000       0
+  0    170 00:41:55.60  13.5000A   1.9792   2.2380   3.3212  0.113  1.38  -0.101E+01    800.  0.214E+00  0.213E+00  0.272E-03  0.293E-13   12   5  12   17  18  10   12   8   8    0.000    0.000       0
+  0    171 00:42:09.10  13.5000A  -1.9920   2.2282   3.3396  0.113  1.38  -0.101E+01    800.  0.215E+00  0.213E+00  0.272E-03  0.293E-13   18  14   8   17  18  10   13   8   8    0.000    0.000       0
+  0    172 00:42:22.60  13.6000A  -1.9824   2.1821   3.3107  0.113  1.38  -0.101E+01    800.  0.215E+00  0.214E+00  0.273E-03  0.294E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  0    173 00:42:36.20  13.9000A  -1.9733   2.2182   3.2283  0.113  1.38  -0.101E+01    800.  0.216E+00  0.214E+00  0.276E-03  0.297E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  0    174 00:42:50.10  14.0000A  -1.9902   2.1923   3.2049  0.113  1.38  -0.101E+01    800.  0.217E+00  0.215E+00  0.282E-03  0.304E-13   18  15   7   17  19  10   14   8   8    0.000    0.000       0
+  0    175 00:43:04.10  14.3000A  -1.9628   2.2236   3.1431  0.113  1.38  -0.101E+01    800.  0.218E+00  0.216E+00  0.284E-03  0.306E-13   18  15   7   17  20   9   14   8   8    0.000    0.000       0
+  0    176 00:43:18.40  14.7000A  -1.9286   2.2221   3.0510  0.114  1.38  -0.100E+01    800.  0.219E+00  0.217E+00  0.290E-03  0.313E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  0    177 00:43:33.10  15.2000A  -1.9659   2.1643   2.9559  0.114  1.38  -0.100E+01    800.  0.220E+00  0.218E+00  0.298E-03  0.321E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  0    178 00:43:48.30  15.4000A  -1.9127   2.1075   2.9237  0.114  1.38  -0.994E+00    800.  0.221E+00  0.219E+00  0.308E-03  0.332E-13   17  14   4   18  18  12   10   9  18    0.000    0.000       0
+  0    179 00:44:03.70  15.0000A  -1.8884   2.1390   3.0072  0.114  1.38  -0.999E+00    800.  0.222E+00  0.221E+00  0.312E-03  0.337E-13   17  15   4   18  19  11   10   9  18    0.000    0.000       0
+  0    180 00:44:18.70  14.6000A  -1.8147   2.1196   3.0730  0.115  1.38  -0.991E+00    800.  0.223E+00  0.222E+00  0.305E-03  0.328E-13   16  15   3   18  19  11   11   9  18    0.000    0.000       0
+  0    181 00:44:33.30  14.5000A  -1.7675   2.1466   3.1106  0.115  1.43  -0.990E+00    900.  0.225E+00  0.223E+00  0.298E-03  0.321E-13   16  15   3   18  17  13   13  11  16    0.000    0.000       0
+  0    182 00:44:47.80  14.1000A   1.7568   2.1526   3.1822  0.115  1.43  -0.993E+00    900.  0.226E+00  0.225E+00  0.297E-03  0.319E-13    9  27  23   18  17  13   13  11  16    0.000    0.000       0
+  0    183 00:45:01.90  13.8000A   1.7835   2.1657   3.2535  0.116  1.43  -0.990E+00    900.  0.228E+00  0.226E+00  0.290E-03  0.312E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  0    184 00:45:15.70  13.5000A   1.7943   2.1918   3.3330  0.116  1.43  -0.991E+00    900.  0.229E+00  0.228E+00  0.284E-03  0.306E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  0    185 00:45:29.20  13.3000A   1.8092   2.2021   3.3948  0.116  1.43  -0.998E+00    900.  0.231E+00  0.230E+00  0.279E-03  0.300E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  0    186 00:45:42.50  13.1000A   1.8565   2.1995   3.4255  0.117  1.43  -0.992E+00    900.  0.233E+00  0.231E+00  0.276E-03  0.297E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  0    187 00:45:55.60  13.0000A   1.8904   2.1843   3.4615  0.117  1.43  -0.988E+00    900.  0.234E+00  0.233E+00  0.273E-03  0.293E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    188 00:46:08.60  12.9000A   1.9081   2.1553   3.4894  0.117  1.43  -0.984E+00    900.  0.236E+00  0.235E+00  0.272E-03  0.292E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    189 00:46:21.50  12.9000A   1.9077   2.1095   3.4835  0.118  1.43  -0.983E+00    900.  0.238E+00  0.236E+00  0.271E-03  0.291E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    190 00:46:34.40  13.0000A   1.8879   2.0648   3.4661  0.118  1.43  -0.983E+00    900.  0.240E+00  0.238E+00  0.272E-03  0.292E-13    9  27  24   18  19  12   16  11  16    0.000    0.000       0
+  0    191 00:46:47.40  13.0000A   1.8974   2.0485   3.4724  0.118  1.43  -0.984E+00    900.  0.241E+00  0.240E+00  0.275E-03  0.295E-13    9  26  25   18  19  12   16  11  16    0.000    0.000       0
+  0    192 00:47:00.40  13.0000A   1.8868   2.0432   3.4549  0.119  1.41  -0.983E+00    850.  0.243E+00  0.242E+00  0.276E-03  0.296E-13    9  26  25    8   4   0   16  11  16    0.000    0.000       0
+  0    193 00:47:13.40  13.2000A   1.8944   2.0245   3.4199  0.119  1.41  -0.979E+00    850.  0.245E+00  0.244E+00  0.277E-03  0.298E-13    9  27  25    8   4   0   16  11  16    0.000    0.000       0
+  0    194 00:47:26.60  13.3000A   1.8837   2.0250   3.3852  0.119  1.41  -0.973E+00    850.  0.247E+00  0.246E+00  0.283E-03  0.305E-13    9  27  25   19  18  13   14  10  17    0.000    0.000       0
+  0    195 00:47:39.90  13.2000A   1.8504   2.0329   3.4017  0.119  1.41  -0.971E+00    850.  0.249E+00  0.247E+00  0.286E-03  0.309E-13    9  27  25   19  18  14   14  10  17    0.000    0.000       0
+  0    196 00:47:53.10  13.2000A   1.8799  -2.0090   3.4180  0.119  1.41  -0.969E+00    850.  0.251E+00  0.249E+00  0.286E-03  0.309E-13    9  27  26   13  38  15   11   9  18    0.000    0.000       0
+  0    197 00:48:06.30  12.9000A  -1.9990  -1.9540   3.4756  0.119  1.41  -0.971E+00    850.  0.253E+00  0.251E+00  0.288E-03  0.312E-13    6   3   1   13  38  15   12   9  18    0.000    0.000       0
+  0    198 00:48:19.20  12.8000A  -2.0710   1.9246   3.5053  0.119  1.41  -0.969E+00    850.  0.255E+00  0.253E+00  0.283E-03  0.308E-13    6   3   1   19  19  13   12   9  18    0.000    0.000       0
+  0    199 00:48:32.00  12.8000A  -2.0835   1.8954   3.5198  0.119  1.41  -0.970E+00    850.  0.256E+00  0.255E+00  0.283E-03  0.309E-13    6   4   0   19  19  13   13   9  18    0.000    0.000       0
+  0    200 00:48:44.80  12.7000A   2.1461   1.8456   3.5374  0.119  1.41  -0.972E+00    850.  0.258E+00  0.257E+00  0.285E-03  0.312E-13    7   2  10   12   4  39   13   9  18    0.000    0.000       0
+  0    201 00:48:57.50  12.7000A   2.1906   1.8531   3.5319  0.119  1.41  -0.972E+00    850.  0.260E+00  0.258E+00  0.285E-03  0.313E-13    7   2  10   12   4  39   14   9  18    0.000    0.000       0
+  0    202 00:49:10.20  12.6000A  -2.2511   1.8608   3.5743  0.119  1.41  -0.975E+00    850.  0.262E+00  0.260E+00  0.286E-03  0.316E-13    7   3   0   12   4  39    9  39   1    0.000    0.000       0
+  0    203 00:49:22.80  12.9000A  -2.3231  -1.9143   3.4963  0.119  1.41  -0.971E+00    850.  0.264E+00  0.262E+00  0.286E-03  0.317E-13    7   3   0    3   8   2   15   9  18    0.000    0.000       0
+  0    204 00:49:35.70  12.9000A  -2.1960  -1.9597   3.4944  0.119  1.41  -0.972E+00    850.  0.266E+00  0.264E+00  0.295E-03  0.328E-13    8   2   0    3   8   2    9   0   0    0.000    0.000       0
+  0    205 00:49:48.60  12.7000A  -2.3746  -2.0424   3.5512  0.119  1.41  -0.977E+00    850.  0.267E+00  0.265E+00  0.296E-03  0.330E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  0    206 00:50:01.30  12.4000A  -2.4137  -2.1028   3.6401  0.118  1.41  -0.979E+00    850.  0.269E+00  0.267E+00  0.293E-03  0.327E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  0    207 00:50:13.70  12.2000A  -2.3703  -2.1193   3.6823  0.118  1.41  -0.975E+00    850.  0.270E+00  0.268E+00  0.288E-03  0.322E-13    8   1   0    3   7   2   10   7  17    0.000    0.000       0
+  0    208 00:50:25.90  12.0000A  -2.4784  -2.0738   3.7509  0.118  1.43  -0.976E+00    900.  0.272E+00  0.270E+00  0.284E-03  0.319E-13    9   1  39    3   7   2   10   7  17    0.000    0.000       0
+  0    209 00:50:37.90  12.0000A  -2.5338  -2.0484   3.7647  0.118  1.43  -0.972E+00    900.  0.273E+00  0.271E+00  0.281E-03  0.316E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  0    210 00:50:49.90  12.1000A  -2.4948  -2.0487   3.7296  0.118  1.43  -0.970E+00    900.  0.274E+00  0.272E+00  0.281E-03  0.317E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  0    211 00:51:02.00  12.1000A  -2.4148  -1.9851   3.7272  0.118  1.43  -0.970E+00    900.  0.275E+00  0.273E+00  0.285E-03  0.321E-13    9   1  39    3   6   2   14   6  18    0.000    0.000       0
+  0    212 00:51:14.09  11.8000A  -2.3625  -2.0341   3.8067  0.118  1.43  -0.972E+00    900.  0.277E+00  0.274E+00  0.285E-03  0.323E-13    9   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    213 00:51:25.90  11.7000A  -2.3582  -2.1289   3.8355  0.118  1.43  -0.979E+00    900.  0.278E+00  0.275E+00  0.279E-03  0.317E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    214 00:51:37.59  11.8000A  -2.3235  -2.1215   3.8110  0.117  1.43  -0.979E+00    900.  0.279E+00  0.276E+00  0.278E-03  0.315E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    215 00:51:49.40  12.0000A  -2.2827  -2.0721   3.7403  0.117  1.43  -0.981E+00    900.  0.280E+00  0.277E+00  0.281E-03  0.319E-13   11   0  38   15  32  38   15   5  18    0.000    0.000       0
+  0    216 00:52:01.40  12.0000A  -2.2481  -2.0085   3.7349  0.117  1.43  -0.979E+00    900.  0.280E+00  0.278E+00  0.287E-03  0.326E-13   11   0  38   15  32  38   16   5  18    0.000    0.000       0
+  0    217 00:52:13.40  12.0000A  -2.2109  -2.0175   3.7380  0.117  1.43  -0.979E+00    900.  0.281E+00  0.279E+00  0.288E-03  0.327E-13   11   0  37   15  32  37   16   5  18    0.000    0.000       0
+  0    218 00:52:25.40  12.2000A  -2.1636  -2.0652   3.6978  0.117  1.43  -0.978E+00    900.  0.282E+00  0.279E+00  0.289E-03  0.328E-13   11   0  37   15  31  37   16   5  18    0.000    0.000       0
+  0    219 00:52:37.59  12.5000A  -2.0832  -2.1463   3.5992  0.117  1.43  -0.979E+00    900.  0.282E+00  0.280E+00  0.294E-03  0.334E-13   12   0  37   15  31  37   16   5  18    0.000    0.000       0
+  0    220 00:52:50.09  13.1000A  -2.0143  -2.1531   3.4456  0.116  1.43  -0.982E+00    900.  0.283E+00  0.280E+00  0.302E-03  0.343E-13   13  23   4   15  31  37   16   5  18    0.000    0.000       0
+  0    221 00:53:03.19  13.6000A  -2.0119  -2.0704   3.3090  0.116  1.43  -0.985E+00    900.  0.283E+00  0.280E+00  0.316E-03  0.359E-13   14  23   3   15  31  37   17   4  18    0.000    0.000       0
+  0    222 00:53:16.79  13.7000A  -1.9914   2.0490   3.2919  0.116  1.43  -0.991E+00    900.  0.283E+00  0.280E+00  0.328E-03  0.371E-13   14  23   3   17  17  10    8   4   4    0.000    0.000       0
+  0    223 00:53:30.49  13.6000A  -1.9520   2.0725   3.3115  0.116  1.43  -0.986E+00    900.  0.283E+00  0.280E+00  0.330E-03  0.373E-13   14  24   3   17  17  10    8  35   5    0.000    0.000       0
+  0    224 00:53:44.09  13.2000A  -1.9920   2.0440   3.4188  0.116  1.43  -0.987E+00    900.  0.283E+00  0.280E+00  0.327E-03  0.369E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  0    225 00:53:57.29  13.1000A  -2.0629   1.9622   3.4411  0.116  1.43  -0.988E+00    900.  0.282E+00  0.280E+00  0.318E-03  0.357E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  0    226 00:54:10.39  13.0000A  -2.0803   1.8350   3.4509  0.115  1.43  -0.998E+00    900.  0.282E+00  0.279E+00  0.315E-03  0.353E-13    9   6   4   17  17  10   10  35   5    0.000    0.000       0
+  0    227 00:54:23.39  13.0000A  -2.1884   1.8751   3.4593  0.115  1.43  -0.995E+00    900.  0.282E+00  0.279E+00  0.313E-03  0.349E-13   10   6   4   13   8   4   10  35   5    0.000    0.000       0
+  0    228 00:54:36.39  13.2000A  -2.2566   1.8853   3.4000  0.115  1.43  -0.101E+01    900.  0.282E+00  0.279E+00  0.313E-03  0.348E-13   10   6   4   13   8   4    9  36   6    0.000    0.000       0
+  0    229 00:54:49.59  12.8000A  -2.2703   1.9733   3.5070  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.317E-03  0.352E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  0    230 00:55:02.39  12.6000A  -2.2365   2.0039   3.5731  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.308E-03  0.341E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  0    231 00:55:14.99  12.5000A  -2.2739   1.9824   3.6114  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.304E-03  0.335E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  0    232 00:55:27.49  12.3000A  -2.2848   1.9265   3.6466  0.115  1.40  -0.996E+00    850.  0.282E+00  0.279E+00  0.303E-03  0.332E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  0    233 00:55:39.79  12.2000A  -2.2837   1.9446   3.6768  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.299E-03  0.327E-13   11   6   3   17  10   6   11  36   6    0.000    0.000       0
+  0    234 00:55:51.99  12.2000A  -2.2567   1.9578   3.6908  0.115  1.40  -0.991E+00    850.  0.281E+00  0.279E+00  0.297E-03  0.325E-13   11   6   3   13   2  38   11  36   6    0.000    0.000       0
+  0    235 00:56:04.19  12.3000A  -2.1681   1.9814   3.6666  0.115  1.40  -0.988E+00    850.  0.281E+00  0.279E+00  0.298E-03  0.325E-13   11   6   3   13   3  37   11  36   6    0.000    0.000       0
+  0    236 00:56:16.49  12.5000A  -2.1850   2.0167   3.5998  0.115  1.40  -0.987E+00    850.  0.281E+00  0.278E+00  0.301E-03  0.327E-13   12   6   3   13   3  37   11  36   6    0.000    0.000       0
+  0    237 00:56:28.99  12.5000A  -2.1850   1.9574   3.5989  0.115  1.40  -0.988E+00    850.  0.281E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   3  37   12  36   7    0.000    0.000       0
+  0    238 00:56:41.49  12.7000A  -2.1469   1.9133   3.5420  0.115  1.40  -0.989E+00    850.  0.280E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   4  37   12  36   7    0.000    0.000       0
+  0    239 00:56:54.19  12.8000A  -2.0696   1.9896   3.5154  0.115  1.38  -0.991E+00    800.  0.280E+00  0.278E+00  0.312E-03  0.339E-13   12   6   3   14   4  37   13  36   7    0.000    0.000       0
+  0    240 00:57:06.99  13.1000A   2.0392   2.0193   3.4428  0.115  1.38  -0.989E+00    800.  0.280E+00  0.277E+00  0.315E-03  0.342E-13   13  37   9   14   4  37   13  36   7    0.000    0.000       0
+  0    241 00:57:20.09  13.0000A   2.1610   1.9691   3.4498  0.115  1.38  -0.988E+00    800.  0.280E+00  0.277E+00  0.323E-03  0.351E-13   13  37   9   14   4  37   14  35   6    0.000    0.000       0
+  0    242 00:57:33.09  13.0000A   2.2481   1.9420   3.4665  0.115  1.38  -0.989E+00    800.  0.279E+00  0.277E+00  0.321E-03  0.350E-13   13  37   9   14   5  37   14  35   6    0.000    0.000       0
+  0    243 00:57:46.09  13.1000A   2.2916   1.9762   3.4415  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.322E-03  0.351E-13   13  37   9   15   5  37   14  35   6    0.000    0.000       0
+  0    244 00:57:59.19  13.0000A   2.2745   2.0195   3.4488  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.324E-03  0.354E-13   13  37   9   15   5  37   15  35   6    0.000    0.000       0
+  0    245 00:58:12.19  13.1000A   2.2969   2.0000   3.4302  0.114  1.46  -0.996E+00    950.  0.279E+00  0.276E+00  0.322E-03  0.352E-13   14  37  10   15   5  37   15  35   6    0.000    0.000       0
+  0    246 00:58:25.29  13.4000A   2.3720   1.9648   3.3704  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.325E-03  0.356E-13   14  37  10   15   6  37   15  35   6    0.000    0.000       0
+  0    247 00:58:38.69  13.4000A   2.3841   1.9398   3.3663  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.332E-03  0.364E-13   14  37  10   16   6  37   11  20  16    0.000    0.000       0
+  0    248 00:58:52.09  13.5000A   2.3124   2.0264   3.3326  0.114  1.38  -0.100E+01    800.  0.279E+00  0.276E+00  0.332E-03  0.365E-13   14  37  10   16   5  36   12  37   6    0.000    0.000       0
+  0    249 00:59:05.59  13.5000A   2.1844   2.0317   3.3251  0.114  1.38  -0.101E+01    800.  0.279E+00  0.276E+00  0.335E-03  0.368E-13   14  37  11   16   6  36   12  37   6    0.000    0.000       0
+  0    250 00:59:19.09  13.5000A   2.1414   2.0776   3.3244  0.114  1.38  -0.101E+01    800.  0.278E+00  0.276E+00  0.335E-03  0.368E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  0    251 00:59:32.59  13.3000A   2.0346   2.0384   3.3709  0.113  1.43  -0.101E+01    900.  0.278E+00  0.276E+00  0.334E-03  0.367E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  0    252 00:59:45.89  13.4000A   2.0144   2.0187   3.3583  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.329E-03  0.360E-13   15  37  12   16   7  36   10  37   5    0.000    0.000       0
+  0    253 00:59:59.29  13.4000A   1.9525   2.0782   3.3571  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.361E-13   16  36  12   17   6  36   11  37   5    0.000    0.000       0
+  0    254 01:00:12.69  13.1000A   1.8769   2.1646   3.4373  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.359E-13   16  36  12   17   7  36    8   9  15    0.000    0.000       0
Index: /palm/tags/release-6.0/INSTALL/palm_installer_components
===================================================================
--- /palm/tags/release-6.0/INSTALL/palm_installer_components	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/palm_installer_components	(revision 3477)
@@ -0,0 +1,541 @@
+#!/usr/bin/env bash
+#------------------------------------------------------------------------------#
+# This file is part of PALM.
+#
+# PALM is free software: you can redistribute it and/or modify it under the 
+# terms of the GNU General Public License as published by the Free Software 
+# Foundation, either version 3 of the License, or (at your option) any later 
+# version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
+# Temporary trunk side of the automatic installation scipt
+# WARNING: This script does not work as a standalone installer!
+#------------------------------------------------------------------------------#
+
+
+# install PALM
+palm_installer_build() {
+   printf "%s\n" "${program_name} installer is configuring using cmake..."
+   palm_installer_create_files
+   rm -rf ${build_dir}
+   mkdir -p ${build_dir}
+   cd ${build_dir}
+   cp ${trunk_dir}/SCRIPTS/.palm.config.default.in ${source_dir}/.palm.config.default.in
+   cmake -Wno-dev ${CUSTOM_FORTRAN_COMPILER:+-DCMAKE_Fortran_COMPILER=}${CUSTOM_FORTRAN_COMPILER} \
+         ${NETCDF_C_ROOT:+-DNETCDF_C_ROOT=}${NETCDF_C_ROOT} \
+         ${NETCDF_FORTRAN_ROOT:+-DNETCDF_FORTRAN_ROOT=}${NETCDF_FORTRAN_ROOT} \
+         -DPALM_CORES=$NUM_PROC_BUILD \
+         -DCMAKE_BUILD_TYPE=Release \
+         ${install_prefix:+-DCMAKE_INSTALL_PREFIX=}${install_prefix} \
+         -DCMAKE_USERNAME=${USER} \
+         ${source_dir}
+   if [[ $? -ne 0 ]]; then
+      hrule
+      printf "| \e[1;31m%-${number_of_cols}s\e[0m |\n" "Configuration failed!"
+      palm_installer_ticket_message
+      hrule
+      exit 1
+   else
+      hrule
+      printf "| \e[1;32m%-${number_of_cols}s\e[0m |\n" "Configuration finished!"
+      hrule
+   fi
+   palm_read_yn "Please check the configuration!!! Would you like to continue?" "RESPONSE_CONFIGURE"
+   if [[ "$RESPONSE_CONFIGURE" != "y" ]]; then
+      palm_installer_abort_message
+   fi
+   cd ${install_prefix}
+   rm -rf ${source_dir}
+   rm -rf MAKE_DEPOSITORY_parallel
+   bash ${trunk_dir}/SCRIPTS/palmbuild -v -h "default"
+}
+
+palm_installer_set_path() {
+   [[ -w ${HOME}/.mybashrc ]] && shell_profile=${HOME}/.mybashrc
+   if [[ ! -w ${shell_profile} ]]; then
+      printf "\e[1;31mWARNING\e[0m: ${program_name} binary \e[1;31mpath could not be written\e[0m to \"${shell_profile}\"\n"
+      printf "In order to run the ${program_name} execution script \"mrun\" you need to set the following paths\n"
+      printf "   export PALM_BIN=${trunk_dir}/SCRIPTS\n"
+      printf "   export PATH=\$PALM_BIN:\$PATH\n"
+   elif grep -q "^export PALM_BIN=${trunk_dir}/SCRIPTS" ${shell_profile}; then
+      printf "${program_name} binary \e[1;32mpath already set correctly\e[0m in \"${shell_profile}\"\n"
+   else
+      if grep -q "PALM_BIN" ${shell_profile}; then
+         sed -i "s@^[^#]\(.*PALM_BIN.*\)@#e\1@" ${shell_profile}
+         printf "${program_name} binary \e[1;32mpath updated\e[0m in \"${shell_profile}\""
+      else
+         printf "${program_name} binary \e[1;32mpath written\e[0m to \"${shell_profile}\""
+      fi
+      cat >> ${shell_profile} << EOF
+#-------------------------------------------------------------------------------
+##PALM##
+export PALM_BIN=${trunk_dir}/SCRIPTS
+export PATH=\$PALM_BIN:\$PATH
+
+EOF
+   fi
+   export PALM_BIN=${trunk_dir}/SCRIPTS
+   export PATH=$PALM_BIN:$PATH
+   echo " "
+}
+
+palm_installer_test() {
+   hrule
+   printf "Testing ${program_name} with \"${1}\"... "
+   source ${shell_profile}
+   local input_dir=${install_prefix}/JOBS/${1}/INPUT/
+   local monitoring_dir=${install_prefix}/JOBS/${1}/MONITORING/
+   local test_dir=${trunk_dir}/INSTALL
+   if [[ ! -f ${test_dir}/${1}_p3d ]] || [[ ! -f ${test_dir}/${1}_rc ]]; then
+      printf "\e[1;31m test not found\e[0m\n"
+      return 1
+   fi
+   rm -rf ${monitoring_dir}
+   mkdir -p ${input_dir}
+   cp ${test_dir}/${1}_p3d ${input_dir}
+   [[ -f ${test_dir}/${1}_topo ]] && cp ${test_dir}/${1}_topo ${input_dir}
+   bash ${trunk_dir}/SCRIPTS/palmrun -d ${1} -a "d3#" -h "default" -X "$NUM_PROC_TEST" -T "$NUM_PROC_TEST" -v -B > ${install_prefix}/${logfile_test} 2>&1
+   grep -A 99999 "Run-control output" JOBS/${1}/MONITORING/${1}_rc 1> ${install_prefix}/RC_LOCAL 2> /dev/null
+   grep -A 99999 "Run-control output" ${test_dir}/${1}_rc 1> ${install_prefix}/RC_DEFAULT 2> /dev/null
+   diff_output=$(diff ${install_prefix}/RC_DEFAULT ${install_prefix}/RC_LOCAL)
+   rm ${install_prefix}/RC_LOCAL ${install_prefix}/RC_DEFAULT
+   if [[ "${diff_output}" == "" ]]; then
+      printf "\e[1;32m passed\e[0m\n"
+      return 0
+   else
+      printf "\e[1;31m failed\e[0m\n"
+      test_status="failed"
+      return 1
+   fi
+}
+
+palm_installer_test_suite() {
+   rm -f ${install_prefix}/${logfile_test}
+   for test_path in ${trunk_dir}/INSTALL/*_p3d; do
+      testname_p3d=$(basename $test_path)
+      palm_installer_test "${testname_p3d%_p3d}"
+   done
+   hrule
+   cat ${install_prefix}/${logfile_test} >> ${logfile_all}
+   if [[ "${test_status}" == "failed" ]]; then
+      printf "| \e[1;31m%-${number_of_cols}s\e[0m \n" "Some tests failed. ${program_name} installation not successful :-("
+      printf "| \e[1;31m%-${number_of_cols}s\e[0m \n" "More detailed information regarding the failure can be found in file:"
+      printf "| \e[1;31m%-${number_of_cols}s\e[0m \n" "      ${install_prefix}/${logfile_test}"
+      palm_installer_ticket_message
+      hrule
+      exit 1
+   else
+      printf "| \e[1;32m%-${number_of_cols}s\e[0m |\n" "All found tests passed. ${program_name} installation successful :-)"
+      rm -f ${install_prefix}/${logfile_test}
+      rm -rf ${install_prefix}/tmp/*
+      hrule
+   fi
+}
+
+palm_post_installer_help() {
+   hrule
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "-- To use ${program_name} it is required to update your PATH variable. Please type:"
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "      source ${shell_profile}"
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "   or restart your shell."
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "-- To work with ${program_name} please go to your ${program_name} base directory:"
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "      cd ${install_prefix}"
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "-- To start the model, please use \"palmrun\" with appropriate options. For example:"
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "      palmrun -d example_cbl -a \"d3#\" -h \"default\" -X \"$NUM_PROC_TEST\" -T \"$NUM_PROC_TEST\" "
+   printf "| %-${number_of_cols}s \n" "                      |           |          |        |     |            "
+   printf "| %-${number_of_cols}s \n" "                  Job name        |    configuration  | tasks per node   "
+   printf "| %-${number_of_cols}s \n" "                           I/O control list    number of cores           "
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "-- Edit \".palm.config.default\" to customize this ${program_name} installation."
+   printf "| %-${number_of_cols}s \n" "-- To rebuild ${program_name} type: palmbuild -h \"default\""
+   printf "| %-${number_of_cols}s \n" " "
+   printf "| %-${number_of_cols}s \n" "-- For further questions go to: https://palm.muk.uni-hannover.de/."
+   printf "| %-${number_of_cols}s \n" " "
+}
+
+palm_installer_create_files() {
+   mkdir -p ${source_dir}
+
+   cat > ${source_dir}/CMakeLists.txt << EOF
+# This is the CMake configuration file for PALM
+
+cmake_minimum_required (VERSION 2.8)
+
+# set program name
+set(PALM_PROGRAM_NAME "PALM")
+
+project(\${PALM_PROGRAM_NAME} NONE)
+exec_program( hostname OUTPUT_VARIABLE PALM_HOSTNAME)
+
+# .palm.config locations
+set(config_in \${CMAKE_CURRENT_SOURCE_DIR}/.palm.config.default.in)
+set(config \${CMAKE_INSTALL_PREFIX}/.palm.config.default)
+
+# include local cmake files
+set(PALM_CMAKE_FILES \${CMAKE_CURRENT_SOURCE_DIR})
+list(APPEND CMAKE_MODULE_PATH \${PALM_CMAKE_FILES})
+
+# enabling Fortran language support
+enable_language(Fortran) # required to compile the main model and all utilities
+
+# check for Fortran MPI support
+find_package(MPI REQUIRED)
+
+# check for netCDF
+#set(NETCDF_C "YES")
+set(NETCDF_FORTRAN "YES")
+find_package (NetCDF REQUIRED)
+find_program(NETCDF_FORTRAN_COMPILER_FULL NAMES \${NETCDF_FORTRAN_COMPILER})
+if(NOT \${CMAKE_Fortran_COMPILER} STREQUAL \${NETCDF_FORTRAN_COMPILER_FULL} )
+   message(WARNING "Fortran compiler \"\${CMAKE_Fortran_COMPILER}\" does not match netCDF Fortran compiler \"\${NETCDF_FORTRAN_COMPILER_FULL}\".")
+else()
+   message(STATUS "Fortran compiler matches netCDF Fortran compiler.")
+endif()
+
+# extract subversion info
+if (${SVN_CMAKE_CHECK})
+find_package(Subversion)
+if(SUBVERSION_FOUND)
+   Subversion_WC_INFO(\${PROJECT_SOURCE_DIR}/../trunk PALM)
+   message(STATUS "Your \${PALM_PROGRAM_NAME} installation will be based on revision \${PALM_WC_REVISION}.")
+else(SUBVERSION_FOUND)
+   message(WARNING "Subversion not found. Wondering how you aquired the PALM code. :-)")
+endif(SUBVERSION_FOUND)
+endif()
+
+# check for fftw
+find_package(FFTW)
+if(FFTW_FOUND)
+   message(STATUS "\${PALM_PROGRAM_NAME} is using an external fftw library.")
+   list(APPEND PALM_CPP_OPTIONS __fftw)
+else(FFTW_FOUND)
+   message(STATUS "\${PALM_PROGRAM_NAME} is using the buildin fft algorithm.")
+endif(FFTW_FOUND)
+
+# compiler flag management
+if(\${CMAKE_Fortran_COMPILER_ID} STREQUAL "Cray")
+   set(PALM_COMPILER_OPTIONS "-em -K trap=fp -O3 -hnoomp -hnoacc -hfp3 -hdynamic")
+   set(PALM_LINKER_OPTIONS "\${PALM_COMPILER_OPTIONS} -dynamic")
+   set(PALM_CPP_FLAGS "-eZ")
+elseif(\${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
+   set(PALM_COMPILER_OPTIONS "-O3 -fp-model source -fno-alias -fpe0 -ftz -no-prec-div -no-prec-sqrt -ip -nbs -diag-disable 8290,8291")
+   set(PALM_LINKER_OPTIONS "\${PALM_COMPILER_OPTIONS}")
+   set(PALM_CPP_FLAGS "-cpp")
+   list(APPEND PALM_CPP_OPTIONS __intel_compiler)
+elseif(\${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
+   set(PALM_COMPILER_OPTIONS "-Ofast -ffree-line-length-none")
+   set(PALM_LINKER_OPTIONS "\${PALM_COMPILER_OPTIONS}")
+   set(PALM_CPP_FLAGS "-cpp")
+   list(APPEND PALM_CPP_OPTIONS __gfortran)
+endif()
+
+# workaround
+list(APPEND PALM_CPP_OPTIONS __parallel)
+
+# adding cpp options
+list(APPEND PALM_CPP_OPTIONS MPI_REAL=MPI_DOUBLE_PRECISION)
+list(APPEND PALM_CPP_OPTIONS MPI_2REAL=MPI_2DOUBLE_PRECISION)
+if(NETCDF_FOUND)
+   list(APPEND PALM_CPP_OPTIONS __netcdf)
+   set(PALM_COMPILER_OPTIONS "\${PALM_COMPILER_OPTIONS} -I \${NETCDF_INCLUDES}")
+   set(PALM_LINKER_OPTIONS "\${PALM_LINKER_OPTIONS} \${NETCDF_LIBRARIES}")
+endif()
+
+if(FFTW_FOUND)
+   set(PALM_COMPILER_OPTIONS "\${PALM_COMPILER_OPTIONS} -I \${FFTW_INCLUDES}")
+   set(PALM_LINKER_OPTIONS "\${PALM_LINKER_OPTIONS} \${FFTW_LIBRARIES}")
+endif()
+
+string(REPLACE ";" " -D" PALM_CPP_OPTIONS_STR_1 "\${PALM_CPP_OPTIONS}")
+set(PALM_CPP_OPTIONS_STR "\${PALM_CPP_FLAGS} -D\${PALM_CPP_OPTIONS_STR_1}")
+
+# configuring the .palm.config
+configure_file(\${config_in} \${config} @ONLY)
+
+
+EOF
+
+   cat > ${source_dir}/FindFFTW.cmake << EOF
+# - Find FFTW
+# Find the native FFTW includes and library
+#
+#  FFTW_INCLUDES    - where to find fftw3.h
+#  FFTW_LIBRARIES   - List of libraries when using FFTW.
+#  FFTW_FOUND       - True if FFTW found.
+
+if (FFTW_INCLUDES)
+  # Already in cache, be silent
+  set (FFTW_FIND_QUIETLY TRUE)
+endif (FFTW_INCLUDES)
+
+#exec_program(sed ARGS -i '/%fftw_inc.*/d' \${config})
+#list(APPEND NETCDF_HINTS "\$ENV{LD_LIBRARY_PATH}")
+
+find_path (FFTW_INCLUDES fftw3.f03 HINTS \${NETCDF_HINTS} ENV LD_LIBRARY_PATH  PATH_SUFFIXES include Include)
+find_library(NETCDF_FORTRAN_LIB netcdff HINTS \${NETCDF_HINTS} ENV LD_LIBRARY_PATH PATH_SUFFIXES lib lib64)
+
+find_library (FFTW_LIBRARIES NAMES fftw3)
+
+# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
+
+mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)
+
+EOF
+
+   cat > ${source_dir}/FindNetCDF.cmake << EOF
+# - Find NetCDF
+# Find the native NetCDF includes and library
+#
+#  NETCDF_INCLUDES    - where to find netcdf.h, etc
+#  NETCDF_LIBRARIES   - Link these libraries when using NetCDF
+#  NETCDF_FOUND       - True if NetCDF found including required interfaces (see below)
+#
+# Your package can require certain interfaces to be FOUND by setting these
+#
+#  NETCDF_C           - require the C interface and link the C library
+#  NETCDF_CXX         - require the C++ interface and link the C++ library
+#  NETCDF_FORTRAN     - require the Fortran interface and link the Fortran library
+#
+# The following are not for general use and are included in
+# NETCDF_LIBRARIES if the corresponding option above is set.
+#
+#  NETCDF_LIBRARIES_C        - Just the C interface
+#  NETCDF_LIBRARIES_CXX      - C++ interface, if available
+#  NETCDF_LIBRARIES_FORTRAN  - Fortran 90 interface, if available
+#
+# Normal usage would be:
+#  set (NETCDF_FORTRAN "YES")
+#  find_package (NetCDF REQUIRED)
+#  target_link_libraries (uses_f90_interface \${NETCDF_LIBRARIES})
+
+if (NETCDF_INCLUDES AND NETCDF_LIBRARIES)
+  # Already in cache, be silent
+  set (NETCDF_FIND_QUIETLY TRUE)
+endif (NETCDF_INCLUDES AND NETCDF_LIBRARIES)
+
+
+macro(NETCDF_CONFIG flag output)
+    if(NETCDF_CONFIG_EXECUTABLE)
+        exec_program( \${NETCDF_CONFIG_EXECUTABLE} ARGS \${flag}
+            OUTPUT_VARIABLE \${output} RETURN_VALUE return_value)
+        if(NOT \${return_value} EQUAL 0 )
+            message( STATUS "Unable to determine \${flag} from \${NETCDF_CONFIG_EXECUTABLE}." )
+        endif()
+    endif(NETCDF_CONFIG_EXECUTABLE)
+endmacro()
+
+if(NETCDF_C_ROOT)
+   list(APPEND NETCDF_HINTS "\${NETCDF_C_ROOT}")
+else()
+   list(APPEND NETCDF_HINTS "\$ENV{NETCDF_ROOT}")
+endif()
+
+if(NETCDF_FORTRAN_ROOT)
+   list(APPEND NETCDF_HINTS "\${NETCDF_FORTRAN_ROOT}")
+else()
+   list(APPEND NETCDF_HINTS "\$ENV{NETCDF_ROOT}")
+endif()
+
+if(NETCDF_C_ROOT)
+   find_program(NETCDF_C_CONFIG_EXECUTABLE NAMES nc-config
+      HINTS \${NETCDF_HINTS} PATH_SUFFIXES bin Bin NO_DEFAULT_PATH
+      DOC "NETCDF CONFIG PROGRAM. Used to detect NETCDF compile flags." )
+else()
+   find_program(NETCDF_C_CONFIG_EXECUTABLE NAMES nc-config
+      HINTS \${NETCDF_HINTS} PATH_SUFFIXES bin Bin
+      DOC "NETCDF CONFIG PROGRAM. Used to detect NETCDF compile flags." )
+endif()
+
+set(NETCDF_CONFIG_EXECUTABLE \${NETCDF_C_CONFIG_EXECUTABLE})
+   if(NETCDF_C_CONFIG_EXECUTABLE)
+      NETCDF_CONFIG(--cc NETCDF_C_COMPILER_C)
+      NETCDF_CONFIG(--fc NETCDF_C_COMPILER_FORTRAN)
+      NETCDF_CONFIG(--prefix NETCDF_C_ROOT)
+      NETCDF_CONFIG(--includedir NETCDF_C_INCLUDE)
+      NETCDF_CONFIG(--version NETCDF_C_VERSION)
+      #NETCDF_CONFIG(--has-c++ NETCDF_C_CXX)
+      #NETCDF_CONFIG(--has-f77 NETCDF_C_F77)
+      NETCDF_CONFIG(--has-f90 NETCDF_C_F90)
+      #NETCDF_CONFIG(--has-dap NETCDF_C_DAP)
+      #NETCDF_CONFIG(--has-nc2 NETCDF_C_NC2)
+      #NETCDF_CONFIG(--has-nc4 NETCDF_C_NC4)
+      #NETCDF_CONFIG(--has-hdf4 NETCDF_C_HDF4)
+      #NETCDF_CONFIG(--has-hdf5 NETCDF_C_HDF5)
+      #NETCDF_CONFIG(--has-pnetcdf NETCDF_C_PARALLEL)
+      list(APPEND NETCDF_INCLUDE_HINTS "\${NETCDF_C_INCLUDE}")
+      list(APPEND NETCDF_HINTS "\${NETCDF_C_ROOT}")
+      message(STATUS "Found \${NETCDF_C_VERSION} compiled with \${NETCDF_C_COMPILER_C}")
+   else(NETCDF_C_CONFIG_EXECUTABLE)
+      message(STATUS "nc-config not found")
+   endif(NETCDF_C_CONFIG_EXECUTABLE)
+
+if(NETCDF_C_ROOT AND NETCDF_FORTRAN_ROOT)
+   find_program(NETCDF_FORTRAN_CONFIG_EXECUTABLE NAMES nf-config
+       HINTS \${NETCDF_HINTS} PATH_SUFFIXES bin Bin NO_DEFAULT_PATH
+       DOC "NETCDF CONFIG PROGRAM. Used to detect NETCDF compile flags." )
+else()
+   find_program(NETCDF_FORTRAN_CONFIG_EXECUTABLE NAMES nf-config
+       HINTS \${NETCDF_HINTS} PATH_SUFFIXES bin Bin
+       DOC "NETCDF CONFIG PROGRAM. Used to detect NETCDF compile flags." )
+endif()
+
+set(NETCDF_CONFIG_EXECUTABLE \${NETCDF_FORTRAN_CONFIG_EXECUTABLE})
+   if(NETCDF_FORTRAN_CONFIG_EXECUTABLE)
+      NETCDF_CONFIG(--cc NETCDF_FORTRAN_COMPILER_C)
+      NETCDF_CONFIG(--fc NETCDF_FORTRAN_COMPILER_FORTRAN)
+      NETCDF_CONFIG(--prefix NETCDF_FORTRAN_ROOT)
+      NETCDF_CONFIG(--includedir NETCDF_FORTRAN_INCLUDE)
+      NETCDF_CONFIG(--version NETCDF_FORTRAN_VERSION)
+      #NETCDF_CONFIG(--has-c++ NETCDF_FORTRAN_CXX)
+      #NETCDF_CONFIG(--has-f77 NETCDF_FORTRAN_F77)
+      NETCDF_CONFIG(--has-f90 NETCDF_FORTRAN_F90)
+      #NETCDF_CONFIG(--has-dap NETCDF_FORTRAN_DAP)
+      #NETCDF_CONFIG(--has-nc2 NETCDF_FORTRAN_NC2)
+      #NETCDF_CONFIG(--has-nc4 NETCDF_FORTRAN_NC4)
+      #NETCDF_CONFIG(--has-hdf4 NETCDF_FORTRAN_HDF4)
+      #NETCDF_CONFIG(--has-hdf5 NETCDF_FORTRAN_HDF5)
+      #NETCDF_CONFIG(--has-pnetcdf NETCDF_FORTRAN_PARALLEL)
+      list(APPEND NETCDF_INCLUDE_HINTS "\${NETCDF_FORTRAN_INCLUDE}")
+      list(APPEND NETCDF_HINTS "\${NETCDF_FORTRAN_ROOT}")
+      message(STATUS "Found \${NETCDF_FORTRAN_VERSION} compiled with \${NETCDF_FORTRAN_COMPILER_FORTRAN}")
+   else(NETCDF_FORTRAN_CONFIG_EXECUTABLE)
+      #message(STATUS "nf-config not found")
+      set(NETCDF_FORTRAN_COMPILER_C \${NETCDF_C_COMPILER_C})
+      set(NETCDF_FORTRAN_COMPILER_FORTRAN \${NETCDF_C_COMPILER_FORTRAN})
+      set(NETCDF_FORTRAN_ROOT \${NETCDF_C_ROOT})
+      set(NETCDF_FORTRAN_INCLUDE \${NETCDF_C_INCLUDE})
+      set(NETCDF_FORTRAN_VERSION \${NETCDF_C_VERSION})
+      #set(NETCDF_FORTRAN_CXX \${NETCDF_C_CXX})
+      #set(NETCDF_FORTRAN_F77 \${NETCDF_C_F77})
+      set(NETCDF_FORTRAN_F90 \${NETCDF_C_F90})
+      #set(NETCDF_FORTRAN_DAP \${NETCDF_C_DAP})
+      #set(NETCDF_FORTRAN_NC2 \${NETCDF_C_NC2})
+      #set(NETCDF_FORTRAN_NC4 \${NETCDF_C_NC4})
+      #set(NETCDF_FORTRAN_HDF4 \${NETCDF_C_HDF4})
+      #set(NETCDF_FORTRAN_HDF5 \${NETCDF_C_HDF5})
+      #set(NETCDF_FORTRAN_PARALLEL \${NETCDF_C_PARALLEL})
+      if(NETCDF_FORTRAN_F90)
+         message(STATUS "Found \${NETCDF_FORTRAN_VERSION} compiled with \${NETCDF_FORTRAN_COMPILER_FORTRAN}")
+      else(NETCDF_FORTRAN_F90)
+         message(STATUS "nc-config found no netCDF Fortran libraries")
+      endif(NETCDF_FORTRAN_F90)
+   endif(NETCDF_FORTRAN_CONFIG_EXECUTABLE)
+
+# find netcdf c
+if(NOT NETCDF_C_INCLUDE)
+   find_path(NETCDF_C_INCLUDE netcdf.h HINTS \${NETCDF_HINTS} PATH_SUFFIXES include Include)
+endif()
+find_library(NETCDF_C_LIB netcdf HINTS \${NETCDF_HINTS} PATH_SUFFIXES lib lib64)
+#message(STATUS "NETCDF_C_INCLUDE so far: \${NETCDF_C_INCLUDE}")
+#message(STATUS "NETCDF_C_LIB so far: \${NETCDF_C_LIB}")
+
+# find netcdf fortran
+if(NOT NETCDF_FORTRAN_INCLUDE)
+   find_path(NETCDF_FORTRAN_INCLUDE netcdf.mod HINTS \${NETCDF_HINTS} PATH_SUFFIXES include Include)
+endif()
+find_library(NETCDF_FORTRAN_LIB netcdff HINTS \${NETCDF_HINTS} PATH_SUFFIXES lib lib64)
+if(NOT NETCDF_FORTRAN_LIB)
+   find_library(NETCDF_FORTRAN_LIB netcdf HINTS \${NETCDF_HINTS} PATH_SUFFIXES lib lib64)
+endif()
+#message(STATUS "NETCDF_FORTRAN_INCLUDE so far: \${NETCDF_FORTRAN_INCLUDE}")
+#message(STATUS "NETCDF_FORTRAN_LIB so far: \${NETCDF_FORTRAN_LIB}")
+
+if ((NOT NETCDF_C_LIB) OR (NOT NETCDF_C_INCLUDE))
+   message(STATUS "Trying to find NetCDF using LD_LIBRARY_PATH (we're desperate)...")
+   file(TO_CMAKE_PATH "\$ENV{LD_LIBRARY_PATH}" LD_LIBRARY_PATH)
+   find_library(NETCDF_C_LIB NAMES netcdf HINTS \${LD_LIBRARY_PATH})
+
+   if (NETCDF_C_LIB)
+      get_filename_component(NETCDF_LIB_DIR \${NETCDF_C_LIB} PATH)
+      string(REGEX REPLACE "/lib/?\$" "/include" NETCDF_H_HINT \${NETCDF_LIB_DIR})
+      find_path (NETCDF_C_INCLUDE netcdf.h HINTS \${NETCDF_H_HINT} DOC "Path to netcdf.h")
+      message(STATUS "found netcdf.h in: \${NETCDF_C_INCLUDE}")
+      list(APPEND NETCDF_INCLUDE_HINTS "\${NETCDF_C_INCLUDE}")
+   endif()
+endif()
+
+get_filename_component (NETCDF_C_LIB_DIR "\${NETCDF_C_LIB}" PATH)
+get_filename_component (NETCDF_FORTRAN_LIB_DIR "\${NETCDF_FORTRAN_LIB}" PATH)
+list(APPEND NETCDF_LIB_HINTS "\${NETCDF_C_LIB_DIR}")
+list(APPEND NETCDF_LIB_HINTS "\${NETCDF_FORTRAN_LIB_DIR}")
+
+#message(STATUS "All include Hints: \${NETCDF_INCLUDE_HINTS}")
+#message(STATUS "All lib Hints: \${NETCDF_LIB_HINTS}")
+
+macro(NetCDF_add_interface lang)
+   if(NETCDF_\${lang})
+      if(NETCDF_\${lang}_INCLUDE AND NETCDF_\${lang}_LIB)
+         list(INSERT NetCDF_includes 0 \${NETCDF_\${lang}_INCLUDE})
+         list(INSERT NetCDF_libs 0 \${NETCDF_\${lang}_LIB}) # prepend so that -lnetcdf is last
+      else()
+         set(NetCDF_has_interfaces "NO")
+         message(STATUS "Failed to find NetCDF interface for \${lang}")
+      endif()
+   endif(NETCDF_\${lang})
+endmacro(NetCDF_add_interface)
+
+set(NetCDF_has_interfaces "YES") # will be set to NO if we're missing any interfaces
+NetCDF_add_interface(C)
+NetCDF_add_interface(CXX)
+NetCDF_add_interface(FORTRAN)
+
+# macro (NetCDF_check_interface lang header libs)
+#    if (NETCDF_\${lang})
+#       find_path (NETCDF_INCLUDES_\${lang} NAMES \${header} HINTS \${NETCDF_HINTS} PATH_SUFFIXES include Include NO_DEFAULT_PATH)
+#       find_library (NETCDF_LIBRARIES_\${lang} NAMES \${libs} HINTS \${NETCDF_HINTS} PATH_SUFFIXES lib lib64 NO_DEFAULT_PATH)
+#       mark_as_advanced (NETCDF_INCLUDES_\${lang} NETCDF_LIBRARIES_\${lang})
+#       if (NETCDF_INCLUDES_\${lang} AND NETCDF_LIBRARIES_\${lang})
+#          list (INSERT NetCDF_libs 0 \${NETCDF_LIBRARIES_\${lang}}) # prepend so that -lnetcdf is last
+#       else (NETCDF_INCLUDES_\${lang} AND NETCDF_LIBRARIES_\${lang})
+#          set (NetCDF_has_interfaces "NO")
+#          message (STATUS "Failed to find NetCDF interface for \${lang}")
+#       endif (NETCDF_INCLUDES_\${lang} AND NETCDF_LIBRARIES_\${lang})
+#    endif (NETCDF_\${lang})
+# endmacro (NetCDF_check_interface)
+# 
+# set (NetCDF_has_interfaces "YES") # will be set to NO if we're missing any interfaces
+# NetCDF_check_interface (C netcdf.h netcdf)
+# NetCDF_check_interface (CXX netcdfcpp.h netcdf_c++)
+# NetCDF_check_interface (FORTRAN netcdf.mod  netcdff)
+
+set (NETCDF_C_COMPILER "\${NETCDF_C_COMPILER_C}" CACHE STRING "The C compiler used to build netCDF")
+set (NETCDF_FORTRAN_COMPILER "\${NETCDF_FORTRAN_COMPILER_FORTRAN}" CACHE STRING "The Fortran compiler used to build netCDF")
+set (NETCDF_INCLUDES "\${NetCDF_includes}" CACHE STRING "All NetCDF includes required for interface level")
+set (NETCDF_LIBRARIES "\${NetCDF_libs}" CACHE STRING "All NetCDF libraries required for interface level")
+
+# handle the QUIETLY and REQUIRED arguments and set NETCDF_FOUND to TRUE if
+# all listed variables are TRUE
+include (FindPackageHandleStandardArgs)
+find_package_handle_standard_args (NetCDF DEFAULT_MSG NETCDF_LIBRARIES NETCDF_INCLUDES NetCDF_has_interfaces)
+
+mark_as_advanced (NETCDF_LIBRARIES NETCDF_INCLUDES)
+
+#message(STATUS "netCDF library: \${NETCDF_LIBRARIES}")
+#message(STATUS "netCDF include: \${NETCDF_INCLUDES}")
+
+EOF
+}
+
+################################################################################
+
+palm_installer_build
+palm_installer_set_path
+palm_installer_test_suite
+palm_post_installer_help
Index: /palm/tags/release-6.0/INSTALL/test_oceanml_p3d
===================================================================
--- /palm/tags/release-6.0/INSTALL/test_oceanml_p3d	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/test_oceanml_p3d	(revision 3477)
@@ -0,0 +1,93 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 63, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 63, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 64, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 1.25, ! Size of single gridbox in x-direction
+    dy                         = 1.25, ! Size of single gridbox in y-direction
+    dz                         = 1.25, ! Size of single gridbox in z-direction
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles', ! initial conditions
+
+    latitude                   = 55.6,
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    bc_uv_b                    = 'neumann',
+    bc_uv_t                    = 'neumann',
+    bc_pt_b                    = 'neumann',
+    bc_pt_t                    = 'neumann',
+    bc_p_b                     = 'neumann',
+    bc_p_t                     = 'neumann',
+    bc_s_b                     = 'initial_gradient',
+    bc_s_t                     = 'neumann',
+
+    use_top_fluxes             = .T.,
+    use_surface_fluxes         = .F.,
+    constant_flux_layer        = .F.,
+
+    top_momentumflux_u         = -0.0001,
+    top_momentumflux_v         = 0.0,
+
+    top_heatflux               = 0.0,
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+    momentum_advec             = 'pw-scheme', ! use Piacsek and Williams scheme
+    scalar_advec               = 'pw-scheme', ! use Piacsek and Williams scheme
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 300.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE.,  ! randomly perturbate horiz. velocity
+    dt_disturb                 = 60.0,    ! interval for random perturbations
+    disturbance_energy_limit   = 1.0e-4,  ! upper limit for perturbation energy
+    disturbance_amplitude      = 0.25e-1, ! maximum perturbation amplitude
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    dt_run_control             = 0.0,    ! output interval for run control
+
+    data_output_pr             = 'e','e*', '#pt',
+
+/ ! end of runtime parameter namelist
+ 
+!-------------------------------------------------------------------------------
+!-- OCEAN PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/oceanpar
+!-------------------------------------------------------------------------------
+&ocean_parameters
+!
+!-- top boundary condition for salinity
+    bc_sa_t                    = 'neumann',
+
+!   zero salinityflux at ocean surface
+    top_salinityflux           = 0.0,
+
+/ ! end of ocean parameters
+  ! WARNING: do not remove this blank line from the end of this file
Index: /palm/tags/release-6.0/INSTALL/test_oceanml_rc
===================================================================
--- /palm/tags/release-6.0/INSTALL/test_oceanml_rc	(revision 3477)
+++ /palm/tags/release-6.0/INSTALL/test_oceanml_rc	(revision 3477)
@@ -0,0 +1,212 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3291M       *    ocean - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 01-10-18    Run:       test_oceanml                      
+ Time:                 04:15:16    Run-No.:   00
+ Run on host:              imuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:              300.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =       1.250 m    dy =       1.250 m
+                dz(1) =       1.250 m
+
+ Domain size:       x =     80.000 m     y =     80.000 m  z(u) =    -80.000 m
+
+
+
+ Number of gridpoints (x,y,z):  (0:  63, 0:  63, 0:  65)
+ Subdomain size (x,y,z):        (    32,     32,     66)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0      65
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0      65
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = uv(1)                 | pt(0)     = pt(1)            
+ T. bound.: p(nzt+1) = p(nzt) | uv(nzt+1) = uv(nzt)               | pt(nzt+1) = pt(nzt)          
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+                     sa
+
+ B. bound.: sa(0)    = sa(1)                                                                     
+ T. bound.: sa(nzt+1) = sa(nzt)                                                                  
+
+ Top surface fluxes are used in diffusion terms at k=nzt
+       Predefined constant momentumflux:  u: -0.000100 m**2/s**2
+                                          v:  0.000000 m**2/s**2
+       Predefined constant heatflux:    0.000000 K m/s
+       Predefined constant salinityflux:    0.000000 psu m/s
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0  m
+       Temperature:   300.00  300.00  K
+       Gradient:      ------    0.00  K/100m
+       Gridpoint:          0      65
+
+    Characteristic levels of the initial salinity profile:
+
+       Height:        0.0     0.0  m
+       Salinity:    35.00   35.00  psu
+       Gradient:   ------    0.00  psu/100m
+       Gridpoint:       0      65
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+
+
+ Data output:
+ -----------
+
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: e, e*, pt,                                                   
+       Output every             ******** s
+       Time averaged over           0.00 s
+       Averaging input every        0.00 s
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.6 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000120 1/s
+                            f*     =  0.000082 1/s
+
+    Day of the year at model start :   day_init      =     172
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :    60.00 s
+    Disturbance amplitude           :     0.03 m/s
+    Lower disturbance level         :   -28.12 m (GP   42)
+    Upper disturbance level         :    -4.38 m (GP   61)
+    Disturbances cease as soon as the disturbance energy exceeds 0.000 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A   0.0228D  0.0228D  0.0124  0.000  0.00   0.000E+00      0.  0.122E-04  0.122E-04  0.270E-02  0.387E-12   53   1   6   58  26  28   47   9   8    0.000    0.000       0
+  0      1 00:00:20.00  20.0000A   0.0233  -0.0219  -0.0126  0.000  0.00   0.000E+00      0.  0.123E-04  0.122E-04  0.442E-04  0.609E-14   53   1   6   60  21  57   47  45  36    0.000    0.000       0
+  0      2 00:00:40.00  20.0000A   0.0234  -0.0224  -0.0131  0.000  0.00   0.000E+00      0.  0.123E-04  0.122E-04  0.441E-04  0.607E-14   53   1   6   57  54  38   47  45  36    0.000    0.000       0
+  0      3 00:01:00.00  20.0000A  -0.0340D  0.0331D -0.0184  0.000  0.00   0.000E+00      0.  0.248E-04  0.244E-04  0.271E-02  0.388E-12   60  53  41   58  27  28   50  31  19    0.000    0.000       0
+  0      4 00:01:20.00  20.0000A  -0.0329   0.0325  -0.0188  0.000  0.00   0.000E+00      0.  0.249E-04  0.242E-04  0.885E-04  0.122E-13   60  53  41   58  27  28   50  31  19    0.000    0.000       0
+  0      5 00:01:40.00  20.0000A   0.0315  -0.0323  -0.0188  0.000  0.00   0.000E+00      0.  0.250E-04  0.240E-04  0.879E-04  0.121E-13   49  55  35   57   1  26   50  31  19    0.000    0.000       0
+  0      6 00:02:00.00  20.0000A   0.0435D -0.0470D -0.0219  0.000  0.00   0.000E+00      0.  0.375E-04  0.360E-04  0.272E-02  0.390E-12   56  24  27   57   0  26   54  50  12    0.000    0.000       0
+  0      7 00:02:20.00  20.0000A   0.0445  -0.0456  -0.0217  0.000  0.00   0.000E+00      0.  0.374E-04  0.354E-04  0.129E-03  0.177E-13   56  24  28   57   0  26   47  26  27    0.000    0.000       0
+  0      8 00:02:40.00  20.0000A   0.0473   0.0449  -0.0218  0.000  0.00   0.000E+00      0.  0.372E-04  0.346E-04  0.127E-03  0.174E-13   56  24  28   53  53  45   47  26  27    0.000    0.000       0
+  0      9 00:03:00.00  20.0000A   0.0528D -0.0504D -0.0250  0.000  0.00   0.000E+00      0.  0.495E-04  0.463E-04  0.271E-02  0.388E-12   56  24  28   43  11  40   56  43  19    0.000    0.000       0
+  0     10 00:03:20.00  20.0000A   0.0542   0.0496  -0.0253  0.000  0.00   0.000E+00      0.  0.489E-04  0.449E-04  0.165E-03  0.223E-13   60  48   2   57   8  30   56  43  19    0.000    0.000       0
+  0     11 00:03:40.00  20.0000A   0.0528  -0.0523  -0.0253  0.000  0.00   0.000E+00      0.  0.481E-04  0.433E-04  0.160E-03  0.215E-13   60  48   3   43  10  40   55  51  57    0.000    0.000       0
+  0     12 00:04:00.00  19.6000A   0.0504D -0.0575D -0.0298  0.000  0.00   0.000E+00      0.  0.595E-04  0.539E-04  0.273E-02  0.393E-12   43  42  39   57  27  20   58  20  59    0.000    0.000       0
+  0     13 00:04:19.60  19.9000A   0.0544  -0.0566  -0.0284  0.000  0.00   0.000E+00      0.  0.581E-04  0.515E-04  0.186E-03  0.249E-13   43  42  39   57  26  20   58  20  59    0.000    0.000       0
+  0     14 00:04:39.50  19.7000A   0.0520  -0.0572  -0.0274  0.000  0.00   0.000E+00      0.  0.565E-04  0.489E-04  0.181E-03  0.241E-13   43  42  39   57  26  20   57  20  59    0.000    0.000       0
+  0     15 00:04:59.19  20.0000A  -0.0511  -0.0511  -0.0284  0.000  0.00   0.000E+00      0.  0.549E-04  0.462E-04  0.171E-03  0.226E-13   53  33   8   59  60  21   54  50  57    0.000    0.000       0
+  0     16 00:05:19.19  19.9000A   0.0559D -0.0566D -0.0341  0.000  0.00   0.000E+00      0.  0.655E-04  0.556E-04  0.272E-02  0.391E-12   58  23  33   48   9   0   54  50  57    0.000    0.000       0
Index: /palm/tags/release-6.0/LIB/rrtmg/Makefile
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/Makefile	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/Makefile	(revision 3477)
@@ -0,0 +1,142 @@
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# WARNING: don't write filenames with extension .f90 in this header!!!!
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+#
+# 1585 2015-04-30 07:05:52Z maronga
+# Initial revision
+# 
+# Description:
+# ------------
+# Makefile for the RRTMG library used in PALM
+#------------------------------------------------------------------------------!
+
+PROG =  librrtmg
+
+SOURCES = rrsw_aer.f90 rrsw_kg18.f90 rrsw_kg23.f90 rrsw_kg28.f90 rrsw_vsn.f90  \
+          rrtmg_sw_reftra.f90 rrtmg_sw_vrtqdr.f90             \
+          rrsw_cld.f90 rrsw_kg19.f90 rrsw_kg24.f90    \
+          rrsw_kg29.f90 rrsw_wvn.f90 rrtmg_sw_setcoef.f90                      \
+          rrsw_con.f90 rrsw_kg20.f90 rrsw_kg25.f90     \
+          rrsw_ncpar.f90 rrtmg_sw_rad.nomcica.f90                 \
+          parkind.f90 rrsw_kg16.f90 rrsw_kg21.f90          \
+          rrsw_kg26.f90 rrsw_ref.f90 rrtmg_sw_cldprop.f90                      \
+          rrtmg_sw_spcvrt.f90 parrrsw.f90             \
+          rrsw_kg17.f90 rrsw_kg22.f90 rrsw_kg27.f90 rrsw_tbl.f90              \
+          rrtmg_sw_init.f90 rrtmg_sw_read_nc.f90 rrtmg_sw_taumol.f90 \
+        rrlw_cld.f90  rrlw_kg01.f90  rrlw_kg03.f90  rrlw_kg05.f90  rrlw_kg07.f90  \
+        rrlw_kg09.f90  rrlw_kg11.f90  rrlw_kg13.f90  rrlw_kg15.f90  rrlw_ncpar.f90   \
+	rrlw_tbl.f90  rrlw_wvn.f90 rrlw_con.f90  rrlw_kg02.f90  rrlw_kg04.f90  rrlw_kg06.f90   \
+        rrlw_kg08.f90  rrlw_kg10.f90  rrlw_kg12.f90  rrlw_kg14.f90  rrlw_kg16.f90  rrlw_ref.f90   \
+        rrlw_vsn.f90 rrtmg_lw_cldprmc.f90  rrtmg_lw_init.f90 \
+        rrtmg_lw_rad.nomcica.f90  rrtmg_lw_rtrn.f90    rrtmg_lw_rtrnmr.f90  \
+        rrtmg_lw_taumol.f90 rrtmg_lw_cldprop.f90   parrrtm.f90 \
+        rrtmg_lw_read_nc.f90 rrtmg_lw_rtrnmc.f90  rrtmg_lw_setcoef.f90
+
+
+OBJS=$(SOURCES:.f90=.o)
+
+CC = cc
+CFLAGS = -O
+
+F90 = 
+COPT = 
+F90FLAGS = 
+
+#to_be_replaced_by_include
+
+.SUFFIXES:
+.SUFFIXES: .o .f90
+
+
+all: $(PROG)
+
+# create static library
+$(PROG): $(OBJS)
+	$(F90) $(F90FLAGS) $(COPT) -o $(PROG).so -shared $(OBJS)
+
+clean:
+	rm -f $(PROG) $(OBJS) *.mod *.i *.lst *.so *.o  *.a
+
+.f90.o:
+	$(F90) $(F90FLAGS) $(COPT) -fpic -c $<
+
+
+
+parrrtm.o: parkind.o
+rrtmg_lw_init.o: parkind.o rrlw_wvn.o rrtmg_lw_setcoef.o rrtmg_lw_rtrnmr.o rrtmg_lw_taumol.o
+rrtmg_lw_rad.nomcica.o: parkind.o rrtmg_lw_cldprop.o rrtmg_lw_rtrn.o
+rrtmg_lw_read_nc.o: parkind.o rrlw_kg01.o rrlw_kg02.o rrlw_kg03.o rrlw_kg04.o rrlw_kg05.o rrlw_kg06.o rrlw_kg07.o rrlw_kg08.o rrlw_kg09.o rrlw_kg10.o rrlw_kg11.o rrlw_kg12.o rrlw_kg13.o rrlw_kg14.o rrlw_kg15.o rrlw_kg16.o
+rrtmg_lw_rtrnmr.o: parkind.o
+rrtmg_lw_taumol.o: parkind.o
+rrlw_kg01.o: parkind.o parrrtm.o
+rrlw_kg02.o: parkind.o parrrtm.o
+rrlw_kg03.o: parkind.o parrrtm.o
+rrlw_kg04.o: parkind.o parrrtm.o
+rrlw_kg05.o: parkind.o parrrtm.o
+rrlw_kg06.o: parkind.o parrrtm.o
+rrlw_kg07.o: parkind.o parrrtm.o
+rrlw_kg08.o: parkind.o parrrtm.o
+rrlw_kg09.o: parkind.o parrrtm.o
+rrlw_kg10.o: parkind.o parrrtm.o
+rrlw_kg11.o: parkind.o parrrtm.o
+rrlw_kg12.o: parkind.o parrrtm.o
+rrlw_kg13.o: parkind.o parrrtm.o
+rrlw_kg14.o: parkind.o parrrtm.o
+rrlw_kg15.o: parkind.o parrrtm.o
+rrlw_kg16.o: parkind.o parrrtm.o
+
+parrrsw.o: parkind.o
+rrtmg_sw_cldprop.o: parkind.o rrsw_cld.o rrsw_wvn.o rrsw_vsn.o
+rrtmg_sw_init.o: parkind.o rrsw_wvn.o rrtmg_sw_setcoef.o
+rrtmg_sw_rad.nomcica.o: parkind.o rrtmg_sw_spcvrt.o rrtmg_sw_cldprop.o
+rrtmg_sw_read_nc.o: parkind.o rrsw_kg16.o rrsw_kg17.o rrsw_kg18.o rrsw_kg19.o rrsw_kg20.o rrsw_kg21.o rrsw_kg22.o rrsw_kg23.o rrsw_kg24.o rrsw_kg25.o rrsw_kg26.o rrsw_kg27.o rrsw_kg28.o rrsw_kg29.o rrsw_ncpar.o
+rrtmg_sw_reftra.o: parkind.o rrsw_tbl.o rrsw_vsn.o
+rrtmg_sw_spcvrt.o: parkind.o parrrsw.o rrsw_tbl.o rrsw_vsn.o rrsw_wvn.o rrtmg_sw_reftra.o rrtmg_sw_taumol.o rrtmg_sw_vrtqdr.o
+rrtmg_sw_setcoef.o: parkind.o rrsw_ref.o
+rrtmg_sw_taumol.o: parkind.o rrsw_con.o rrsw_vsn.o rrsw_wvn.o rrsw_kg16.o rrsw_kg17.o rrsw_kg18.o rrsw_kg19.o rrsw_kg20.o rrsw_kg21.o rrsw_kg22.o rrsw_kg23.o rrsw_kg24.o rrsw_kg25.o rrsw_kg26.o rrsw_kg27.o rrsw_kg28.o rrsw_kg29.o
+rrtmg_sw_vrtqdr.o: parkind.o
+rrsw_aer.o: parkind.o parrrsw.o 
+rrsw_cld.o: parkind.o
+rrsw_con.o: parkind.o
+rrsw_kg16.o: parkind.o parrrsw.o
+rrsw_kg17.o: parkind.o parrrsw.o
+rrsw_kg18.o: parkind.o parrrsw.o
+rrsw_kg19.o: parkind.o parrrsw.o
+rrsw_kg20.o: parkind.o parrrsw.o
+rrsw_kg21.o: parkind.o parrrsw.o
+rrsw_kg22.o: parkind.o parrrsw.o
+rrsw_kg23.o: parkind.o parrrsw.o
+rrsw_kg24.o: parkind.o parrrsw.o
+rrsw_kg25.o: parkind.o parrrsw.o
+rrsw_kg26.o: parkind.o parrrsw.o
+rrsw_kg27.o: parkind.o parrrsw.o
+rrsw_kg28.o: parkind.o parrrsw.o
+rrsw_kg29.o: parkind.o parrrsw.o
+rrsw_ncpar.o: parkind.o
+rrsw_ref.o: parkind.o
+rrsw_tbl.o: parkind.o
+rrsw_vsn.o: parkind.o parrrsw.o
+rrsw_wvn.o: parkind.o parrrsw.o 
Index: /palm/tags/release-6.0/LIB/rrtmg/Makefile_static
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/Makefile_static	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/Makefile_static	(revision 3477)
@@ -0,0 +1,143 @@
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# WARNING: don't write filenames with extension .f90 in this header!!!!
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+#
+# 1585 2015-04-30 07:05:52Z maronga
+# Initial revision
+# 
+# Description:
+# ------------
+# Makefile for the RRTMG library used in PALM
+#------------------------------------------------------------------------------!
+
+PROG =  librrtmg
+
+SOURCES = rrsw_aer.f90 rrsw_kg18.f90 rrsw_kg23.f90 rrsw_kg28.f90 rrsw_vsn.f90  \
+          rrtmg_sw_reftra.f90 rrtmg_sw_vrtqdr.f90             \
+          rrsw_cld.f90 rrsw_kg19.f90 rrsw_kg24.f90    \
+          rrsw_kg29.f90 rrsw_wvn.f90 rrtmg_sw_setcoef.f90                      \
+          rrsw_con.f90 rrsw_kg20.f90 rrsw_kg25.f90     \
+          rrsw_ncpar.f90 rrtmg_sw_rad.nomcica.f90                 \
+          parkind.f90 rrsw_kg16.f90 rrsw_kg21.f90          \
+          rrsw_kg26.f90 rrsw_ref.f90 rrtmg_sw_cldprop.f90                      \
+          rrtmg_sw_spcvrt.f90 parrrsw.f90           \
+          rrsw_kg17.f90 rrsw_kg22.f90 rrsw_kg27.f90 rrsw_tbl.f90              \
+          rrtmg_sw_init.f90 rrtmg_sw_read_nc.f90 rrtmg_sw_taumol.f90 \
+        rrlw_cld.f90  rrlw_kg01.f90  rrlw_kg03.f90  rrlw_kg05.f90  rrlw_kg07.f90  \
+        rrlw_kg09.f90  rrlw_kg11.f90  rrlw_kg13.f90  rrlw_kg15.f90  rrlw_ncpar.f90   \
+	rrlw_tbl.f90  rrlw_wvn.f90 rrlw_con.f90  rrlw_kg02.f90  rrlw_kg04.f90  rrlw_kg06.f90   \
+        rrlw_kg08.f90  rrlw_kg10.f90  rrlw_kg12.f90  rrlw_kg14.f90  rrlw_kg16.f90  rrlw_ref.f90   \
+        rrlw_vsn.f90 rrtmg_lw_cldprmc.f90  rrtmg_lw_init.f90 \
+        rrtmg_lw_rad.nomcica.f90  rrtmg_lw_rtrn.f90    rrtmg_lw_rtrnmr.f90  \
+        rrtmg_lw_taumol.f90 rrtmg_lw_cldprop.f90 parrrtm.f90 \
+        rrtmg_lw_read_nc.f90 rrtmg_lw_rtrnmc.f90  rrtmg_lw_setcoef.f90
+
+
+OBJS=$(SOURCES:.f90=.o)
+
+CC = cc
+CFLAGS = -O
+
+F90 = 
+COPT = 
+F90FLAGS = 
+
+#to_be_replaced_by_include
+
+.SUFFIXES:
+.SUFFIXES: .o .f90
+
+
+all: $(PROG)
+
+# create static library
+$(PROG): $(OBJS)
+	ar rcs $(PROG).a $(OBJS)
+
+clean:
+	rm -f $(PROG) $(OBJS) *.mod *.i *.lst *.so *.o *.a
+
+.f90.o:
+# compiling for static library
+	$(F90) $(F90FLAGS) $(COPT) -c $<
+
+
+
+parrrtm.o: parkind.o
+rrtmg_lw_init.o: parkind.o rrlw_wvn.o rrtmg_lw_setcoef.o rrtmg_lw_rtrnmr.o rrtmg_lw_taumol.o
+rrtmg_lw_rad.nomcica.o: parkind.o rrtmg_lw_cldprop.o rrtmg_lw_rtrn.o
+rrtmg_lw_read_nc.o: parkind.o rrlw_kg01.o rrlw_kg02.o rrlw_kg03.o rrlw_kg04.o rrlw_kg05.o rrlw_kg06.o rrlw_kg07.o rrlw_kg08.o rrlw_kg09.o rrlw_kg10.o rrlw_kg11.o rrlw_kg12.o rrlw_kg13.o rrlw_kg14.o rrlw_kg15.o rrlw_kg16.o
+rrtmg_lw_rtrnmr.o: parkind.o
+rrtmg_lw_taumol.o: parkind.o
+rrlw_kg01.o: parkind.o parrrtm.o
+rrlw_kg02.o: parkind.o parrrtm.o
+rrlw_kg03.o: parkind.o parrrtm.o
+rrlw_kg04.o: parkind.o parrrtm.o
+rrlw_kg05.o: parkind.o parrrtm.o
+rrlw_kg06.o: parkind.o parrrtm.o
+rrlw_kg07.o: parkind.o parrrtm.o
+rrlw_kg08.o: parkind.o parrrtm.o
+rrlw_kg09.o: parkind.o parrrtm.o
+rrlw_kg10.o: parkind.o parrrtm.o
+rrlw_kg11.o: parkind.o parrrtm.o
+rrlw_kg12.o: parkind.o parrrtm.o
+rrlw_kg13.o: parkind.o parrrtm.o
+rrlw_kg14.o: parkind.o parrrtm.o
+rrlw_kg15.o: parkind.o parrrtm.o
+rrlw_kg16.o: parkind.o parrrtm.o
+
+parrrsw.o: parkind.o
+rrtmg_sw_cldprop.o: parkind.o rrsw_cld.o rrsw_wvn.o rrsw_vsn.o
+rrtmg_sw_init.o: parkind.o rrsw_wvn.o rrtmg_sw_setcoef.o
+rrtmg_sw_rad.nomcica.o: parkind.o rrtmg_sw_spcvrt.o rrtmg_sw_cldprop.o
+rrtmg_sw_read_nc.o: parkind.o rrsw_kg16.o rrsw_kg17.o rrsw_kg18.o rrsw_kg19.o rrsw_kg20.o rrsw_kg21.o rrsw_kg22.o rrsw_kg23.o rrsw_kg24.o rrsw_kg25.o rrsw_kg26.o rrsw_kg27.o rrsw_kg28.o rrsw_kg29.o rrsw_ncpar.o
+rrtmg_sw_reftra.o: parkind.o rrsw_tbl.o rrsw_vsn.o
+rrtmg_sw_spcvrt.o: parkind.o parrrsw.o rrsw_tbl.o rrsw_vsn.o rrsw_wvn.o rrtmg_sw_reftra.o rrtmg_sw_taumol.o rrtmg_sw_vrtqdr.o
+rrtmg_sw_setcoef.o: parkind.o rrsw_ref.o
+rrtmg_sw_taumol.o: parkind.o rrsw_con.o rrsw_vsn.o rrsw_wvn.o rrsw_kg16.o rrsw_kg17.o rrsw_kg18.o rrsw_kg19.o rrsw_kg20.o rrsw_kg21.o rrsw_kg22.o rrsw_kg23.o rrsw_kg24.o rrsw_kg25.o rrsw_kg26.o rrsw_kg27.o rrsw_kg28.o rrsw_kg29.o
+rrtmg_sw_vrtqdr.o: parkind.o
+rrsw_aer.o: parkind.o parrrsw.o 
+rrsw_cld.o: parkind.o
+rrsw_con.o: parkind.o
+rrsw_kg16.o: parkind.o parrrsw.o
+rrsw_kg17.o: parkind.o parrrsw.o
+rrsw_kg18.o: parkind.o parrrsw.o
+rrsw_kg19.o: parkind.o parrrsw.o
+rrsw_kg20.o: parkind.o parrrsw.o
+rrsw_kg21.o: parkind.o parrrsw.o
+rrsw_kg22.o: parkind.o parrrsw.o
+rrsw_kg23.o: parkind.o parrrsw.o
+rrsw_kg24.o: parkind.o parrrsw.o
+rrsw_kg25.o: parkind.o parrrsw.o
+rrsw_kg26.o: parkind.o parrrsw.o
+rrsw_kg27.o: parkind.o parrrsw.o
+rrsw_kg28.o: parkind.o parrrsw.o
+rrsw_kg29.o: parkind.o parrrsw.o
+rrsw_ncpar.o: parkind.o
+rrsw_ref.o: parkind.o
+rrsw_tbl.o: parkind.o
+rrsw_vsn.o: parkind.o parrrsw.o
+rrsw_wvn.o: parkind.o parrrsw.o 
Index: /palm/tags/release-6.0/LIB/rrtmg/install_rrtmg
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/install_rrtmg	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/install_rrtmg	(revision 3477)
@@ -0,0 +1,196 @@
+#!/bin/ksh 
+
+# install_rrtmg - install script for creating a RRTMG library
+
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+#
+# 1613 2015-07-08 14:53:29Z maronga
+# Bugfix: compilation of shared library fails due to misplaced rm command
+# 
+# 1585 2015-04-30 07:05:52Z maronga
+# Initial revision
+# 
+#--------------------------------------------------------------------------------#
+# install_rrtmg - install script for creating a RRTMG library
+#--------------------------------------------------------------------------------#
+
+# the following variables must be modified for the local system according to
+# .mrun.config
+#
+# Example 1 (lcmuk):
+# compiler_name="mpif90"
+# fopts="-fltconsistency -O3 -cpp -r8 -nbs -convert little_endian -I /muksoft/packages/netcdf/4_intel/include"
+# fopts_trace="-fpe0 -C -check nooutput_conversion -debug -traceback -g -w -xT -O0 -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -convert little_endian -diag-disable 8290,8291 -I /muksoft/packages/netcdf/4_intel/include"
+#
+# Example 2 (lccrayh):
+# compiler_name="ftn"
+# fopts="-em -s real64 -O3 -hnoomp -hfp3 -hdynamic"
+# fopts_trace="-eD -em -g -R b -K trap=fp -O0 -hnoomp"
+#
+#
+
+ compiler_name="mpif90"
+ fopts="-fltconsistency -O3 -cpp -r8 -nbs -convert little_endian -I /muksoft/packages/netcdf/4_intel/include"
+ fopts_trace="-fpe0 -C -check nooutput_conversion -debug -traceback -g -w -xT -O0 -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -nbs -convert little_endian -diag-disable 8290,8291 -I /muksoft/packages/netcdf/4_intel/include"
+ install_path="$HOME/rrtmg"
+ compile_static=false
+ compile_shared=false
+ compile_static_debug=true
+ compile_shared_debug=true
+
+ while  getopts  p: option
+ do
+   case  $option  in
+       (p)   install_path=$OPTARG;;
+ 
+       (\?)  printf "\n  +++ unknown option $OPTARG \n"
+             printf "\n  --> type \"$0 ?\" for available options \n"
+             locat=parameter;exit;;
+   esac
+ done
+
+ (( to_shift = $OPTIND - 1 ))
+ shift $to_shift
+
+    # PRINT SHORT DESCRIPTION OF OPTIONS
+ if [[ "$1" = "?" ]]
+ then
+   (printf "\n  *** rrtmg_install can be called as follows:\n"
+    printf "\n      rrtmg_install -p.\n"
+    printf "\n      Description of available options:\n"
+    printf "\n      Option  Description                              Default-Value"
+    printf "\n        -p    installation path                                   ./"
+
+    printf "\n "
+    printf "\n      Possible values of positional parameter <modus>:"
+    printf "\n        \"?\"       -  this outline \n\n") | more
+    exit
+ elif [[ "$1" != "" ]]
+ then
+    printf "\n  +++ positional parameter $1 unknown \n"
+    locat=parameter; exit
+ fi
+
+ prog="librrtmg"
+ version="1.0"
+
+
+# 1 static
+
+ if [[ $compile_static = true ]]
+ then
+    printf "\n      Start compiling static library $prog... (make)\n\n"
+    mkdir -p static/lib
+    mkdir -p static/include
+    make -f Makefile_static F90=$compiler_name  PROG=$prog F90FLAGS="$fopts"
+    cp $prog.a  static/lib
+    cp *.mod    static/include
+    make -f Makefile_static clean
+    mkdir -p $install_path/static/lib
+    mkdir -p $install_path/static/include
+    cp static/lib/$prog.a $install_path/static/lib
+    cp static/include/*.mod $install_path/static/include/
+    rm -rf static
+    printf "\n      finished.\n"
+ fi
+
+# 2 static debug
+ if [[ $compile_static_debug = true ]]
+ then
+    printf "\n      Start compiling static debug library $prog... (make)\n\n"
+    mkdir -p static_trace/lib
+    mkdir -p static_trace/include
+    make -f Makefile_static F90=$compiler_name  PROG=$prog F90FLAGS="$fopts_trace"
+    cp $prog.a  static_trace/lib
+    cp *.mod    static_trace/include
+    make -f Makefile_static clean
+    mkdir -p $install_path/static_trace/lib
+    mkdir -p $install_path/static_trace/include
+    cp static_trace/lib/$prog.a $install_path/static_trace/lib
+    cp static_trace/include/*.mod $install_path/static_trace/include/
+    rm -rf static_trace
+    printf "\n      finished.\n"
+ fi
+
+# 3 shared
+ if [[ $compile_shared = true ]]
+ then
+    printf "\n      Start compiling shared (dynamic) library $prog... (make)\n\n"
+    mkdir -p shared/lib
+    mkdir -p shared/include
+    make -f Makefile F90=$compiler_name  PROG=$prog F90FLAGS="$fopts"
+    cp $prog.so shared/lib/$prog.so.$version
+    cp *.mod    shared/include/
+    make -f Makefile clean
+    mkdir -p $install_path/shared/lib
+    mkdir -p $install_path/shared/include
+    cp shared/lib/$prog.so.$version $install_path/shared/lib/
+    cp shared/include/*.mod $install_path/shared/include/
+    if [ -f $install_path/shared/lib/$prog.so.1 ]
+    then
+       rm $install_path/shared/lib/$prog.so.1
+    fi
+    ln -s $install_path/shared/lib/$prog.so.$version $install_path/shared/lib/$prog.so.1
+    if [ -f $install_path/shared/lib/$prog.so ]
+    then
+       rm $install_path/shared/lib/$prog.so
+    fi
+    ln -s $install_path/shared/lib/$prog.so.1 $install_path/shared/lib/$prog.so
+    rm -rf shared
+    printf "\n      finished.\n"
+ fi
+
+# 4 shared debug
+ if [[ $compile_static_debug = true ]]
+ then
+    printf "\n      Start compiling shared debug library $prog... (make)\n\n"
+    mkdir -p shared_trace/lib
+    mkdir -p shared_trace/include
+    make -f Makefile F90=$compiler_name  PROG=$prog F90FLAGS="$fopts_trace"
+    cp $prog.so shared_trace/lib/$prog.so.$version
+    cp *.mod    shared_trace/include/
+    make -f Makefile clean
+    mkdir -p $install_path/shared_trace/lib
+    mkdir -p $install_path/shared_trace/include
+    cp shared_trace/lib/$prog.so.$version $install_path/shared_trace/lib
+    cp shared_trace/include/*.mod $install_path/shared_trace/include/
+    if [ -f $install_path/shared_trace/lib/$prog.so.1 ]
+    then
+       rm $install_path/shared_trace/lib/$prog.so.1
+    fi
+    ln -s $install_path/shared_trace/lib/$prog.so.$version $install_path/shared_trace/lib/$prog.so.1
+    if [ -f $install_path/shared_trace/lib/$prog.so ]
+    then
+       rm $install_path/shared_trace/lib/$prog.so
+    fi
+    ln -s $install_path/shared_trace/lib/$prog.so.1 $install_path/shared_trace/lib/$prog.so
+    rm -rf shared_trace
+    printf "\n      finished.\n"
+ fi
+
+ printf "\n      Libraries $prog are installed in \"$install_path\".\n\n" 
+ printf "\n\n  *** all actions complete."
+ 
Index: /palm/tags/release-6.0/LIB/rrtmg/parkind.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/parkind.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/parkind.f90	(revision 3477)
@@ -0,0 +1,30 @@
+      module parkind
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg kinds
+! Define integer and real kinds for various types.
+!
+! Initial version: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!
+!     integer kinds
+!     -------------
+!
+      integer, parameter :: kind_ib = selected_int_kind(13)  ! 8 byte integer
+      integer, parameter :: kind_im = selected_int_kind(6)   ! 4 byte integer
+      integer, parameter :: kind_in = kind(1)                ! native integer
+
+!
+!     real kinds
+!     ----------
+!
+      integer, parameter :: kind_rb = selected_real_kind(12) ! 8 byte real
+      integer, parameter :: kind_rm = selected_real_kind(6)  ! 4 byte real
+      integer, parameter :: kind_rn = kind(1.0)              ! native real
+
+      end module parkind
Index: /palm/tags/release-6.0/LIB/rrtmg/parrrsw.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/parrrsw.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/parrrsw.f90	(revision 3477)
@@ -0,0 +1,119 @@
+
+      module parrrsw
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw main parameters
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! mxlay  :  integer: maximum number of layers
+! mg     :  integer: number of original g-intervals per spectral band
+! nbndsw :  integer: number of spectral bands
+! naerec :  integer: number of aerosols (iaer=6, ecmwf aerosol option)
+! ngptsw :  integer: total number of reduced g-intervals for rrtmg_lw
+! ngNN   :  integer: number of reduced g-intervals per spectral band
+! ngsNN  :  integer: cumulative number of g-intervals per band
+!------------------------------------------------------------------
+
+      integer(kind=im), parameter :: mxlay  = 203    !jplay, klev
+      integer(kind=im), parameter :: mg     = 16     !jpg
+      integer(kind=im), parameter :: nbndsw = 14     !jpsw, ksw
+      integer(kind=im), parameter :: naerec  = 6     !jpaer
+      integer(kind=im), parameter :: mxmol  = 38
+      integer(kind=im), parameter :: nstr   = 2
+      integer(kind=im), parameter :: nmol   = 7
+! Use for 112 g-point model   
+      integer(kind=im), parameter :: ngptsw = 112    !jpgpt
+! Use for 224 g-point model   
+!      integer(kind=im), parameter :: ngptsw = 224   !jpgpt
+
+! may need to rename these - from v2.6
+      integer(kind=im), parameter :: jpband   = 29
+      integer(kind=im), parameter :: jpb1     = 16   !istart
+      integer(kind=im), parameter :: jpb2     = 29   !iend
+
+      integer(kind=im), parameter :: jmcmu    = 32
+      integer(kind=im), parameter :: jmumu    = 32
+      integer(kind=im), parameter :: jmphi    = 3
+      integer(kind=im), parameter :: jmxang   = 4
+      integer(kind=im), parameter :: jmxstr   = 16
+! ^
+
+! Use for 112 g-point model   
+      integer(kind=im), parameter :: ng16 = 6
+      integer(kind=im), parameter :: ng17 = 12
+      integer(kind=im), parameter :: ng18 = 8
+      integer(kind=im), parameter :: ng19 = 8
+      integer(kind=im), parameter :: ng20 = 10
+      integer(kind=im), parameter :: ng21 = 10
+      integer(kind=im), parameter :: ng22 = 2
+      integer(kind=im), parameter :: ng23 = 10
+      integer(kind=im), parameter :: ng24 = 8
+      integer(kind=im), parameter :: ng25 = 6
+      integer(kind=im), parameter :: ng26 = 6
+      integer(kind=im), parameter :: ng27 = 8
+      integer(kind=im), parameter :: ng28 = 6
+      integer(kind=im), parameter :: ng29 = 12
+
+      integer(kind=im), parameter :: ngs16 = 6
+      integer(kind=im), parameter :: ngs17 = 18
+      integer(kind=im), parameter :: ngs18 = 26
+      integer(kind=im), parameter :: ngs19 = 34
+      integer(kind=im), parameter :: ngs20 = 44
+      integer(kind=im), parameter :: ngs21 = 54
+      integer(kind=im), parameter :: ngs22 = 56
+      integer(kind=im), parameter :: ngs23 = 66
+      integer(kind=im), parameter :: ngs24 = 74
+      integer(kind=im), parameter :: ngs25 = 80
+      integer(kind=im), parameter :: ngs26 = 86
+      integer(kind=im), parameter :: ngs27 = 94
+      integer(kind=im), parameter :: ngs28 = 100
+      integer(kind=im), parameter :: ngs29 = 112
+
+! Use for 224 g-point model   
+!      integer(kind=im), parameter :: ng16 = 16
+!      integer(kind=im), parameter :: ng17 = 16
+!      integer(kind=im), parameter :: ng18 = 16
+!      integer(kind=im), parameter :: ng19 = 16
+!      integer(kind=im), parameter :: ng20 = 16
+!      integer(kind=im), parameter :: ng21 = 16
+!      integer(kind=im), parameter :: ng22 = 16
+!      integer(kind=im), parameter :: ng23 = 16
+!      integer(kind=im), parameter :: ng24 = 16
+!      integer(kind=im), parameter :: ng25 = 16
+!      integer(kind=im), parameter :: ng26 = 16
+!      integer(kind=im), parameter :: ng27 = 16
+!      integer(kind=im), parameter :: ng28 = 16
+!      integer(kind=im), parameter :: ng29 = 16
+
+!      integer(kind=im), parameter :: ngs16 = 16
+!      integer(kind=im), parameter :: ngs17 = 32
+!      integer(kind=im), parameter :: ngs18 = 48
+!      integer(kind=im), parameter :: ngs19 = 64
+!      integer(kind=im), parameter :: ngs20 = 80
+!      integer(kind=im), parameter :: ngs21 = 96
+!      integer(kind=im), parameter :: ngs22 = 112
+!      integer(kind=im), parameter :: ngs23 = 128
+!      integer(kind=im), parameter :: ngs24 = 144
+!      integer(kind=im), parameter :: ngs25 = 160
+!      integer(kind=im), parameter :: ngs26 = 176
+!      integer(kind=im), parameter :: ngs27 = 192
+!      integer(kind=im), parameter :: ngs28 = 208
+!      integer(kind=im), parameter :: ngs29 = 224
+
+! Source function solar constant
+      real(kind=rb), parameter :: rrsw_scon = 1.36822e+03     ! W/m2
+ 
+      end module parrrsw
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/parrrtm.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/parrrtm.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/parrrtm.f90	(revision 3477)
@@ -0,0 +1,112 @@
+
+      module parrrtm
+
+      use parkind ,only : im => kind_im
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw main parameters
+!
+! Initial version:  JJMorcrette, ECMWF, Jul 1998
+! Revised: MJIacono, AER, Jun 2006
+! Revised: MJIacono, AER, Aug 2007
+! Revised: MJIacono, AER, Aug 2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! mxlay  :  integer: maximum number of layers
+! mg     :  integer: number of original g-intervals per spectral band
+! nbndlw :  integer: number of spectral bands
+! maxxsec:  integer: maximum number of cross-section molecules
+!                    (e.g. cfcs)
+! maxinpx:  integer: 
+! ngptlw :  integer: total number of reduced g-intervals for rrtmg_lw
+! ngNN   :  integer: number of reduced g-intervals per spectral band
+! ngsNN  :  integer: cumulative number of g-intervals per band
+!------------------------------------------------------------------
+
+      integer(kind=im), parameter :: mxlay  = 203
+      integer(kind=im), parameter :: mg     = 16
+      integer(kind=im), parameter :: nbndlw = 16
+      integer(kind=im), parameter :: maxxsec= 4
+      integer(kind=im), parameter :: mxmol  = 38
+      integer(kind=im), parameter :: maxinpx= 38
+      integer(kind=im), parameter :: nmol   = 7
+! Use for 140 g-point model 
+      integer(kind=im), parameter :: ngptlw = 140
+! Use for 256 g-point model 
+!      integer(kind=im), parameter :: ngptlw = 256
+
+! Use for 140 g-point model
+      integer(kind=im), parameter :: ng1  = 10
+      integer(kind=im), parameter :: ng2  = 12
+      integer(kind=im), parameter :: ng3  = 16
+      integer(kind=im), parameter :: ng4  = 14
+      integer(kind=im), parameter :: ng5  = 16
+      integer(kind=im), parameter :: ng6  = 8
+      integer(kind=im), parameter :: ng7  = 12
+      integer(kind=im), parameter :: ng8  = 8
+      integer(kind=im), parameter :: ng9  = 12
+      integer(kind=im), parameter :: ng10 = 6
+      integer(kind=im), parameter :: ng11 = 8
+      integer(kind=im), parameter :: ng12 = 8
+      integer(kind=im), parameter :: ng13 = 4
+      integer(kind=im), parameter :: ng14 = 2
+      integer(kind=im), parameter :: ng15 = 2
+      integer(kind=im), parameter :: ng16 = 2
+
+      integer(kind=im), parameter :: ngs1  = 10
+      integer(kind=im), parameter :: ngs2  = 22
+      integer(kind=im), parameter :: ngs3  = 38
+      integer(kind=im), parameter :: ngs4  = 52
+      integer(kind=im), parameter :: ngs5  = 68
+      integer(kind=im), parameter :: ngs6  = 76
+      integer(kind=im), parameter :: ngs7  = 88
+      integer(kind=im), parameter :: ngs8  = 96
+      integer(kind=im), parameter :: ngs9  = 108
+      integer(kind=im), parameter :: ngs10 = 114
+      integer(kind=im), parameter :: ngs11 = 122
+      integer(kind=im), parameter :: ngs12 = 130
+      integer(kind=im), parameter :: ngs13 = 134
+      integer(kind=im), parameter :: ngs14 = 136
+      integer(kind=im), parameter :: ngs15 = 138
+
+! Use for 256 g-point model
+!      integer(kind=im), parameter :: ng1  = 16
+!      integer(kind=im), parameter :: ng2  = 16
+!      integer(kind=im), parameter :: ng3  = 16
+!      integer(kind=im), parameter :: ng4  = 16
+!      integer(kind=im), parameter :: ng5  = 16
+!      integer(kind=im), parameter :: ng6  = 16
+!      integer(kind=im), parameter :: ng7  = 16
+!      integer(kind=im), parameter :: ng8  = 16
+!      integer(kind=im), parameter :: ng9  = 16
+!      integer(kind=im), parameter :: ng10 = 16
+!      integer(kind=im), parameter :: ng11 = 16
+!      integer(kind=im), parameter :: ng12 = 16
+!      integer(kind=im), parameter :: ng13 = 16
+!      integer(kind=im), parameter :: ng14 = 16
+!      integer(kind=im), parameter :: ng15 = 16
+!      integer(kind=im), parameter :: ng16 = 16
+
+!      integer(kind=im), parameter :: ngs1  = 16
+!      integer(kind=im), parameter :: ngs2  = 32
+!      integer(kind=im), parameter :: ngs3  = 48
+!      integer(kind=im), parameter :: ngs4  = 64
+!      integer(kind=im), parameter :: ngs5  = 80
+!      integer(kind=im), parameter :: ngs6  = 96
+!      integer(kind=im), parameter :: ngs7  = 112
+!      integer(kind=im), parameter :: ngs8  = 128
+!      integer(kind=im), parameter :: ngs9  = 144
+!      integer(kind=im), parameter :: ngs10 = 160
+!      integer(kind=im), parameter :: ngs11 = 176
+!      integer(kind=im), parameter :: ngs12 = 192
+!      integer(kind=im), parameter :: ngs13 = 208
+!      integer(kind=im), parameter :: ngs14 = 224
+!      integer(kind=im), parameter :: ngs15 = 240
+!      integer(kind=im), parameter :: ngs16 = 256
+
+      end module parrrtm
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_cld.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_cld.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_cld.f90	(revision 3477)
@@ -0,0 +1,35 @@
+      module rrlw_cld
+
+      use parkind, only : rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw cloud property coefficients
+
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! abscld1:  real   : 
+! absice0:  real   : 
+! absice1:  real   : 
+! absice2:  real   : 
+! absice3:  real   : 
+! absliq0:  real   : 
+! absliq1:  real   : 
+!------------------------------------------------------------------
+
+      real(kind=rb) :: abscld1
+      real(kind=rb) , dimension(2) :: absice0
+      real(kind=rb) , dimension(2,5) :: absice1
+      real(kind=rb) , dimension(43,16) :: absice2
+      real(kind=rb) , dimension(46,16) :: absice3
+      real(kind=rb) :: absliq0
+      real(kind=rb) , dimension(58,16) :: absliq1
+
+      end module rrlw_cld
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_con.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_con.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_con.f90	(revision 3477)
@@ -0,0 +1,42 @@
+      module rrlw_con
+
+      use parkind, only : rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw constants
+
+! Initial version: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! fluxfac:  real   : radiance to flux conversion factor 
+! heatfac:  real   : flux to heating rate conversion factor
+!oneminus:  real   : 1.-1.e-6
+! pi     :  real   : pi
+! grav   :  real   : acceleration of gravity
+! planck :  real   : planck constant
+! boltz  :  real   : boltzmann constant
+! clight :  real   : speed of light
+! avogad :  real   : avogadro constant 
+! alosmt :  real   : loschmidt constant
+! gascon :  real   : molar gas constant
+! radcn1 :  real   : first radiation constant
+! radcn2 :  real   : second radiation constant
+! sbcnst :  real   : stefan-boltzmann constant
+!  secdy :  real   : seconds per day  
+!------------------------------------------------------------------
+
+      real(kind=rb) :: fluxfac, heatfac
+      real(kind=rb) :: oneminus, pi, grav
+      real(kind=rb) :: planck, boltz, clight
+      real(kind=rb) :: avogad, alosmt, gascon
+      real(kind=rb) :: radcn1, radcn2
+      real(kind=rb) :: sbcnst, secdy
+
+      end module rrlw_con
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg01.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg01.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg01.f90	(revision 3477)
@@ -0,0 +1,74 @@
+      module rrlw_kg01
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 1
+! band 1:  10-250 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real
+! kao     : real     
+! kbo     : real     
+! kao_mn2 : real     
+! kbo_mn2 : real     
+! selfrefo: real     
+! forrefo : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no1  = 16
+
+      real(kind=rb) :: fracrefao(no1)  , fracrefbo(no1)
+      real(kind=rb) :: kao(5,13,no1)
+      real(kind=rb) :: kbo(5,13:59,no1)
+      real(kind=rb) :: kao_mn2(19,no1) , kbo_mn2(19,no1)
+      real(kind=rb) :: selfrefo(10,no1), forrefo(4,no1)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 1
+! band 1:  10-250 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! ka_mn2  : real     
+! kb_mn2  : real     
+! selfref : real     
+! forref  : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng1  = 10
+
+      real(kind=rb) :: fracrefa(ng1)  , fracrefb(ng1)
+      real(kind=rb) :: ka(5,13,ng1)   , absa(65,ng1)
+      real(kind=rb) :: kb(5,13:59,ng1), absb(235,ng1)
+      real(kind=rb) :: ka_mn2(19,ng1) , kb_mn2(19,ng1)
+      real(kind=rb) :: selfref(10,ng1), forref(4,ng1)
+
+      equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg01
+
+
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg02.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg02.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg02.f90	(revision 3477)
@@ -0,0 +1,70 @@
+      module rrlw_kg02
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 2
+! band 2:  250-500 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no2  = 16
+
+      real(kind=rb) :: fracrefao(no2)   , fracrefbo(no2)
+      real(kind=rb) :: kao(5,13,no2)
+      real(kind=rb) :: kbo(5,13:59,no2)
+      real(kind=rb) :: selfrefo(10,no2) , forrefo(4,no2)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 2
+! band 2:  250-500 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+!
+! refparam: real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng2  = 12
+
+      real(kind=rb) :: fracrefa(ng2)  , fracrefb(ng2)
+      real(kind=rb) :: ka(5,13,ng2)   , absa(65,ng2)
+      real(kind=rb) :: kb(5,13:59,ng2), absb(235,ng2)
+      real(kind=rb) :: selfref(10,ng2), forref(4,ng2)
+
+      real(kind=rb) :: refparam(13)
+
+      equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg02
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg03.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg03.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg03.f90	(revision 3477)
@@ -0,0 +1,75 @@
+      module rrlw_kg03
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 3
+! band 3:  500-630 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real
+! kao     : real     
+! kbo     : real     
+! kao_mn2o: real     
+! kbo_mn2o: real     
+! selfrefo: real     
+! forrefo : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no3  = 16
+
+      real(kind=rb) :: fracrefao(no3,9) ,fracrefbo(no3,5)
+      real(kind=rb) :: kao(9,5,13,no3)
+      real(kind=rb) :: kbo(5,5,13:59,no3)
+      real(kind=rb) :: kao_mn2o(9,19,no3), kbo_mn2o(5,19,no3)
+      real(kind=rb) :: selfrefo(10,no3)
+      real(kind=rb) :: forrefo(4,no3)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 3
+! band 3:  500-630 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real
+! ka      : real     
+! kb      : real     
+! ka_mn2o : real     
+! kb_mn2o : real     
+! selfref : real     
+! forref  : real
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng3  = 16
+
+      real(kind=rb) :: fracrefa(ng3,9) ,fracrefb(ng3,5)
+      real(kind=rb) :: ka(9,5,13,ng3)  ,absa(585,ng3)
+      real(kind=rb) :: kb(5,5,13:59,ng3),absb(1175,ng3)
+      real(kind=rb) :: ka_mn2o(9,19,ng3), kb_mn2o(5,19,ng3)
+      real(kind=rb) :: selfref(10,ng3)
+      real(kind=rb) :: forref(4,ng3)
+
+      equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,1,13,1),absb(1,1))
+
+      end module rrlw_kg03
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg04.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg04.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg04.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrlw_kg04
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 4
+! band 4:  630-700 cm-1 (low - h2o,co2; high - o3,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no4  = 16
+
+      real(kind=rb) :: fracrefao(no4,9)  ,fracrefbo(no4,5)
+      real(kind=rb) :: kao(9,5,13,no4)
+      real(kind=rb) :: kbo(5,5,13:59,no4)
+      real(kind=rb) :: selfrefo(10,no4)  ,forrefo(4,no4)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 4
+! band 4:  630-700 cm-1 (low - h2o,co2; high - o3,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! absa    : real
+! absb    : real
+!fracrefa : real    
+!fracrefb : real
+! ka      : real     
+! kb      : real     
+! selfref : real     
+! forref  : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng4  = 14
+
+      real(kind=rb) :: fracrefa(ng4,9)  ,fracrefb(ng4,5)
+      real(kind=rb) :: ka(9,5,13,ng4)   ,absa(585,ng4)
+      real(kind=rb) :: kb(5,5,13:59,ng4),absb(1175,ng4)
+      real(kind=rb) :: selfref(10,ng4)  ,forref(4,ng4)
+
+      equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,1,13,1),absb(1,1))
+
+      end module rrlw_kg04
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg05.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg05.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg05.f90	(revision 3477)
@@ -0,0 +1,76 @@
+      module rrlw_kg05
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 5
+! band 5:  700-820 cm-1 (low - h2o,co2; high - o3,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real
+! kao     : real     
+! kbo     : real     
+! kao_mo3 : real     
+! selfrefo: real     
+! forrefo : real     
+! ccl4o   : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no5  = 16
+
+      real(kind=rb) :: fracrefao(no5,9) ,fracrefbo(no5,5)
+      real(kind=rb) :: kao(9,5,13,no5)
+      real(kind=rb) :: kbo(5,5,13:59,no5)
+      real(kind=rb) :: kao_mo3(9,19,no5)
+      real(kind=rb) :: selfrefo(10,no5)
+      real(kind=rb) :: forrefo(4,no5)
+      real(kind=rb) :: ccl4o(no5)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 5
+! band 5:  700-820 cm-1 (low - h2o,co2; high - o3,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real
+! ka      : real     
+! kb      : real     
+! ka_mo3  : real     
+! selfref : real     
+! forref  : real     
+! ccl4    : real
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng5  = 16
+
+      real(kind=rb) :: fracrefa(ng5,9) ,fracrefb(ng5,5)
+      real(kind=rb) :: ka(9,5,13,ng5)   ,absa(585,ng5)
+      real(kind=rb) :: kb(5,5,13:59,ng5),absb(1175,ng5)
+      real(kind=rb) :: ka_mo3(9,19,ng5)
+      real(kind=rb) :: selfref(10,ng5)
+      real(kind=rb) :: forref(4,ng5)
+      real(kind=rb) :: ccl4(ng5)
+      
+      equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,1,13,1),absb(1,1))
+
+      end module rrlw_kg05
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg06.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg06.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg06.f90	(revision 3477)
@@ -0,0 +1,74 @@
+      module rrlw_kg06
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 6
+! band 6:  820-980 cm-1 (low - h2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+! kao     : real     
+! kao_mco2: real     
+! selfrefo: real     
+! forrefo : real     
+!cfc11adjo: real
+! cfc12o  : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no6  = 16
+
+      real(kind=rb) , dimension(no6) :: fracrefao
+      real(kind=rb) :: kao(5,13,no6)
+      real(kind=rb) :: kao_mco2(19,no6)
+      real(kind=rb) :: selfrefo(10,no6)
+      real(kind=rb) :: forrefo(4,no6)
+
+      real(kind=rb) , dimension(no6) :: cfc11adjo
+      real(kind=rb) , dimension(no6) :: cfc12o
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 6
+! band 6:  820-980 cm-1 (low - h2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+! ka      : real     
+! ka_mco2 : real     
+! selfref : real     
+! forref  : real     
+!cfc11adj : real
+! cfc12   : real
+!
+! absa    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng6  = 8
+
+      real(kind=rb) , dimension(ng6) :: fracrefa
+      real(kind=rb) :: ka(5,13,ng6),absa(65,ng6)
+      real(kind=rb) :: ka_mco2(19,ng6)
+      real(kind=rb) :: selfref(10,ng6)
+      real(kind=rb) :: forref(4,ng6)
+
+      real(kind=rb) , dimension(ng6) :: cfc11adj
+      real(kind=rb) , dimension(ng6) :: cfc12
+
+      equivalence (ka(1,1,1),absa(1,1))
+
+      end module rrlw_kg06
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg07.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg07.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg07.f90	(revision 3477)
@@ -0,0 +1,76 @@
+      module rrlw_kg07
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 7
+! band 7:  980-1080 cm-1 (low - h2o,o3; high - o3)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! kao_mco2: real     
+! kbo_mco2: real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no7  = 16
+
+      real(kind=rb) , dimension(no7) :: fracrefbo
+      real(kind=rb) :: fracrefao(no7,9)
+      real(kind=rb) :: kao(9,5,13,no7)
+      real(kind=rb) :: kbo(5,13:59,no7)
+      real(kind=rb) :: kao_mco2(9,19,no7)
+      real(kind=rb) :: kbo_mco2(19,no7)
+      real(kind=rb) :: selfrefo(10,no7)
+      real(kind=rb) :: forrefo(4,no7)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 7
+! band 7:  980-1080 cm-1 (low - h2o,o3; high - o3)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real    
+! ka      : real     
+! kb      : real     
+! ka_mco2 : real     
+! kb_mco2 : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng7  = 12
+
+      real(kind=rb) , dimension(ng7) :: fracrefb
+      real(kind=rb) :: fracrefa(ng7,9)
+      real(kind=rb) :: ka(9,5,13,ng7) ,absa(585,ng7)
+      real(kind=rb) :: kb(5,13:59,ng7),absb(235,ng7)
+      real(kind=rb) :: ka_mco2(9,19,ng7)
+      real(kind=rb) :: kb_mco2(19,ng7)
+      real(kind=rb) :: selfref(10,ng7)
+      real(kind=rb) :: forref(4,ng7)
+
+      equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg07
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg08.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg08.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg08.f90	(revision 3477)
@@ -0,0 +1,100 @@
+      module rrlw_kg08
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 8
+! band 8:  1080-1180 cm-1 (low (i.e.>~300mb) - h2o; high - o3)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! kao_mco2: real     
+! kbo_mco2: real     
+! kao_mn2o: real     
+! kbo_mn2o: real     
+! kao_mo3 : real     
+! selfrefo: real     
+! forrefo : real     
+! cfc12o  : real     
+!cfc22adjo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no8  = 16
+
+      real(kind=rb) , dimension(no8) :: fracrefao
+      real(kind=rb) , dimension(no8) :: fracrefbo
+      real(kind=rb) , dimension(no8) :: cfc12o
+      real(kind=rb) , dimension(no8) :: cfc22adjo
+
+      real(kind=rb) :: kao(5,13,no8)
+      real(kind=rb) :: kao_mco2(19,no8)
+      real(kind=rb) :: kao_mn2o(19,no8)
+      real(kind=rb) :: kao_mo3(19,no8)
+      real(kind=rb) :: kbo(5,13:59,no8)
+      real(kind=rb) :: kbo_mco2(19,no8)
+      real(kind=rb) :: kbo_mn2o(19,no8)
+      real(kind=rb) :: selfrefo(10,no8)
+      real(kind=rb) :: forrefo(4,no8)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 8
+! band 8:  1080-1180 cm-1 (low (i.e.>~300mb) - h2o; high - o3)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real    
+! ka      : real     
+! kb      : real     
+! ka_mco2 : real     
+! kb_mco2 : real     
+! ka_mn2o : real     
+! kb_mn2o : real     
+! ka_mo3  : real     
+! selfref : real     
+! forref  : real     
+! cfc12   : real     
+! cfc22adj: real     
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng8  = 8
+
+      real(kind=rb) , dimension(ng8) :: fracrefa
+      real(kind=rb) , dimension(ng8) :: fracrefb
+      real(kind=rb) , dimension(ng8) :: cfc12
+      real(kind=rb) , dimension(ng8) :: cfc22adj
+
+      real(kind=rb) :: ka(5,13,ng8)    ,absa(65,ng8)
+      real(kind=rb) :: kb(5,13:59,ng8) ,absb(235,ng8)
+      real(kind=rb) :: ka_mco2(19,ng8)
+      real(kind=rb) :: ka_mn2o(19,ng8)
+      real(kind=rb) :: ka_mo3(19,ng8)
+      real(kind=rb) :: kb_mco2(19,ng8)
+      real(kind=rb) :: kb_mn2o(19,ng8)
+      real(kind=rb) :: selfref(10,ng8)
+      real(kind=rb) :: forref(4,ng8)
+
+      equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg08
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg09.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg09.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg09.f90	(revision 3477)
@@ -0,0 +1,78 @@
+      module rrlw_kg09
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 9
+! band 9:  1180-1390 cm-1 (low - h2o,ch4; high - ch4)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! kao_mn2o: real     
+! kbo_mn2o: real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no9  = 16
+
+      real(kind=rb) , dimension(no9) :: fracrefbo
+
+      real(kind=rb) :: fracrefao(no9,9)
+      real(kind=rb) :: kao(9,5,13,no9)
+      real(kind=rb) :: kbo(5,13:59,no9)
+      real(kind=rb) :: kao_mn2o(9,19,no9)
+      real(kind=rb) :: kbo_mn2o(19,no9)
+      real(kind=rb) :: selfrefo(10,no9)
+      real(kind=rb) :: forrefo(4,no9)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 9
+! band 9:  1180-1390 cm-1 (low - h2o,ch4; high - ch4)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real    
+! ka      : real     
+! kb      : real     
+! ka_mn2o : real     
+! kb_mn2o : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng9  = 12
+
+      real(kind=rb) , dimension(ng9) :: fracrefb
+      real(kind=rb) :: fracrefa(ng9,9)
+      real(kind=rb) :: ka(9,5,13,ng9) ,absa(585,ng9)
+      real(kind=rb) :: kb(5,13:59,ng9) ,absb(235,ng9)
+      real(kind=rb) :: ka_mn2o(9,19,ng9)
+      real(kind=rb) :: kb_mn2o(19,ng9)
+      real(kind=rb) :: selfref(10,ng9)
+      real(kind=rb) :: forref(4,ng9)
+
+      equivalence (ka(1,1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg09
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg10.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg10.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg10.f90	(revision 3477)
@@ -0,0 +1,71 @@
+      module rrlw_kg10
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 10
+! band 10:  1390-1480 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no10 = 16
+
+      real(kind=rb) , dimension(no10) :: fracrefao
+      real(kind=rb) , dimension(no10) :: fracrefbo
+
+      real(kind=rb) :: kao(5,13,no10)
+      real(kind=rb) :: kbo(5,13:59,no10)
+      real(kind=rb) :: selfrefo(10,no10)
+      real(kind=rb) :: forrefo(4,no10)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 10
+! band 10:  1390-1480 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng10 = 6
+
+      real(kind=rb) , dimension(ng10) :: fracrefa
+      real(kind=rb) , dimension(ng10) :: fracrefb
+
+      real(kind=rb) :: ka(5,13,ng10)   , absa(65,ng10)
+      real(kind=rb) :: kb(5,13:59,ng10), absb(235,ng10)
+      real(kind=rb) :: selfref(10,ng10)
+      real(kind=rb) :: forref(4,ng10)
+
+      equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg10
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg11.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg11.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg11.f90	(revision 3477)
@@ -0,0 +1,79 @@
+      module rrlw_kg11
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 11
+! band 11:  1480-1800 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! kao_mo2 : real     
+! kbo_mo2 : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no11 = 16
+
+      real(kind=rb) , dimension(no11) :: fracrefao
+      real(kind=rb) , dimension(no11) :: fracrefbo
+
+      real(kind=rb) :: kao(5,13,no11)
+      real(kind=rb) :: kbo(5,13:59,no11)
+      real(kind=rb) :: kao_mo2(19,no11)
+      real(kind=rb) :: kbo_mo2(19,no11)
+      real(kind=rb) :: selfrefo(10,no11)
+      real(kind=rb) :: forrefo(4,no11)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 11
+! band 11:  1480-1800 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real    
+! ka      : real     
+! kb      : real     
+! ka_mo2  : real     
+! kb_mo2  : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng11 = 8
+
+      real(kind=rb) , dimension(ng11) :: fracrefa
+      real(kind=rb) , dimension(ng11) :: fracrefb
+
+      real(kind=rb) :: ka(5,13,ng11)   , absa(65,ng11)
+      real(kind=rb) :: kb(5,13:59,ng11), absb(235,ng11)
+      real(kind=rb) :: ka_mo2(19,ng11)
+      real(kind=rb) :: kb_mo2(19,ng11)
+      real(kind=rb) :: selfref(10,ng11)
+      real(kind=rb) :: forref(4,ng11)
+
+      equivalence (ka(1,1,1),absa(1,1)),(kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg11
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg12.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg12.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg12.f90	(revision 3477)
@@ -0,0 +1,60 @@
+      module rrlw_kg12
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 12
+! band 12:  1800-2080 cm-1 (low - h2o,co2; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+! kao     : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no12 = 16
+
+      real(kind=rb) :: fracrefao(no12,9)
+      real(kind=rb) :: kao(9,5,13,no12)
+      real(kind=rb) :: selfrefo(10,no12)
+      real(kind=rb) :: forrefo(4,no12)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 12
+! band 12:  1800-2080 cm-1 (low - h2o,co2; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+! ka      : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng12 = 8
+
+      real(kind=rb) :: fracrefa(ng12,9)
+      real(kind=rb) :: ka(9,5,13,ng12) ,absa(585,ng12)
+      real(kind=rb) :: selfref(10,ng12)
+      real(kind=rb) :: forref(4,ng12)
+
+      equivalence (ka(1,1,1,1),absa(1,1))
+
+      end module rrlw_kg12
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg13.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg13.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg13.f90	(revision 3477)
@@ -0,0 +1,76 @@
+      module rrlw_kg13
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 13
+! band 13:  2080-2250 cm-1 (low - h2o,n2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+! kao     : real     
+! kao_mco2: real     
+! kao_mco : real     
+! kbo_mo3 : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no13 = 16
+
+      real(kind=rb) , dimension(no13) :: fracrefbo
+
+      real(kind=rb) :: fracrefao(no13,9)
+      real(kind=rb) :: kao(9,5,13,no13)
+      real(kind=rb) :: kao_mco2(9,19,no13)
+      real(kind=rb) :: kao_mco(9,19,no13)
+      real(kind=rb) :: kbo_mo3(19,no13)
+      real(kind=rb) :: selfrefo(10,no13)
+      real(kind=rb) :: forrefo(4,no13)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 13
+! band 13:  2080-2250 cm-1 (low - h2o,n2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+! ka      : real     
+! ka_mco2 : real     
+! ka_mco  : real     
+! kb_mo3  : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng13 = 4
+
+      real(kind=rb) , dimension(ng13) :: fracrefb
+
+      real(kind=rb) :: fracrefa(ng13,9)
+      real(kind=rb) :: ka(9,5,13,ng13) ,absa(585,ng13)
+      real(kind=rb) :: ka_mco2(9,19,ng13)
+      real(kind=rb) :: ka_mco(9,19,ng13)
+      real(kind=rb) :: kb_mo3(19,ng13)
+      real(kind=rb) :: selfref(10,ng13)
+      real(kind=rb) :: forref(4,ng13)
+
+      equivalence (ka(1,1,1,1),absa(1,1))
+
+      end module rrlw_kg13
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg14.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg14.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg14.f90	(revision 3477)
@@ -0,0 +1,71 @@
+      module rrlw_kg14
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 14
+! band 14:  2250-2380 cm-1 (low - co2; high - co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+!fracrefbo: real    
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no14 = 16
+
+      real(kind=rb) , dimension(no14) :: fracrefao
+      real(kind=rb) , dimension(no14) :: fracrefbo
+
+      real(kind=rb) :: kao(5,13,no14)
+      real(kind=rb) :: kbo(5,13:59,no14)
+      real(kind=rb) :: selfrefo(10,no14)
+      real(kind=rb) :: forrefo(4,no14)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 14
+! band 14:  2250-2380 cm-1 (low - co2; high - co2)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+!fracrefb : real    
+! ka      : real     
+! kb      : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng14 = 2
+
+      real(kind=rb) , dimension(ng14) :: fracrefa
+      real(kind=rb) , dimension(ng14) :: fracrefb
+
+      real(kind=rb) :: ka(5,13,ng14)   ,absa(65,ng14)
+      real(kind=rb) :: kb(5,13:59,ng14),absb(235,ng14)
+      real(kind=rb) :: selfref(10,ng14)
+      real(kind=rb) :: forref(4,ng14)
+
+      equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg14
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg15.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg15.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg15.f90	(revision 3477)
@@ -0,0 +1,65 @@
+      module rrlw_kg15
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 15
+! band 15:  2380-2600 cm-1 (low - n2o,co2; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+! kao     : real     
+! kao_mn2 : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no15 = 16
+
+      real(kind=rb) :: fracrefao(no15,9)
+      real(kind=rb) :: kao(9,5,13,no15)
+      real(kind=rb) :: kao_mn2(9,19,no15)
+      real(kind=rb) :: selfrefo(10,no15)
+      real(kind=rb) :: forrefo(4,no15)
+
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 15
+! band 15:  2380-2600 cm-1 (low - n2o,co2; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+! ka      : real     
+! ka_mn2  : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng15 = 2
+
+      real(kind=rb) :: fracrefa(ng15,9)
+      real(kind=rb) :: ka(9,5,13,ng15) ,absa(585,ng15)
+      real(kind=rb) :: ka_mn2(9,19,ng15)
+      real(kind=rb) :: selfref(10,ng15)
+      real(kind=rb) :: forref(4,ng15)
+
+      equivalence (ka(1,1,1,1),absa(1,1))
+
+      end module rrlw_kg15
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg16.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg16.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_kg16.f90	(revision 3477)
@@ -0,0 +1,70 @@
+      module rrlw_kg16
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_lw ORIGINAL abs. coefficients for interval 16
+! band 16:  2600-3000 cm-1 (low - h2o,ch4; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefao: real    
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no16 = 16
+
+      real(kind=rb) , dimension(no16) :: fracrefbo
+
+      real(kind=rb) :: fracrefao(no16,9)
+      real(kind=rb) :: kao(9,5,13,no16)
+      real(kind=rb) :: kbo(5,13:59,no16)
+      real(kind=rb) :: selfrefo(10,no16)
+      real(kind=rb) :: forrefo(4,no16)
+
+!-----------------------------------------------------------------
+! rrtmg_lw COMBINED abs. coefficients for interval 16
+! band 16:  2600-3000 cm-1 (low - h2o,ch4; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!fracrefa : real    
+! ka      : real     
+! kb      : real     
+! selfref : real     
+! forref  : real     
+!
+! absa    : real
+! absb    : real
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: ng16 = 2
+
+      real(kind=rb) , dimension(ng16) :: fracrefb
+
+      real(kind=rb) :: fracrefa(ng16,9)
+      real(kind=rb) :: ka(9,5,13,ng16) ,absa(585,ng16)
+      real(kind=rb) :: kb(5,13:59,ng16), absb(235,ng16)
+      real(kind=rb) :: selfref(10,ng16)
+      real(kind=rb) :: forref(4,ng16)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrlw_kg16
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_ncpar.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_ncpar.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_ncpar.f90	(revision 3477)
@@ -0,0 +1,66 @@
+module rrlw_ncpar
+	use parkind ,only : im => kind_im, rb => kind_rb
+
+	implicit none
+        save
+	
+        real(kind=rb), parameter :: cpdair = 1003.5  ! Specific heat capacity of dry air
+                                        		 ! at constant pressure at 273 K
+                                        		 ! (J kg-1 K-1)
+
+	
+	integer(kind=im), parameter :: maxAbsorberNameLength = 5, &
+                          Absorber              = 12
+    character(len = maxAbsorberNameLength), dimension(Absorber), parameter :: &
+    AbsorberNames = (/        &
+     				'N2   ',  &
+     				'CCL4 ',  &
+     				'CFC11',  &
+     				'CFC12',  &
+     				'CFC22',  &
+     				'H2O  ',  &
+     				'CO2  ',  &
+     				'O3   ',  &
+     				'N2O  ',  & 
+     				'CO   ',  &
+     				'CH4  ',  &
+     				'O2   '  /)
+	
+	integer(kind=im), dimension(40) :: status
+	integer(kind=im) :: i
+	integer(kind=im), parameter :: keylower  = 9,   &
+						  keyupper  = 5,   &
+						  Tdiff     = 5,   &
+						  ps        = 59,  &
+						  plower    = 13,  &
+						  pupper    = 47,  &
+						  Tself     = 10,  &
+						  Tforeign  = 4,   &
+						  pforeign  = 4,   &
+						  T         = 19,  &
+						  Tplanck   = 181, &
+						  band      = 16,  &
+						  GPoint    = 16,  &
+						  GPointSet = 2
+						  
+	contains 
+	
+	subroutine getAbsorberIndex(AbsorberName,AbsorberIndex)
+		character(len = *), intent(in) :: AbsorberName
+		integer(kind=im), intent(out)           :: AbsorberIndex
+		
+		integer(kind=im) :: m
+	
+		AbsorberIndex = -1
+		do m = 1, Absorber
+			if (trim(AbsorberNames(m)) == trim(AbsorberName)) then
+				AbsorberIndex = m
+			end if
+		end do
+		
+		if (AbsorberIndex == -1) then
+			print*, "Absorber name index lookup failed."
+		end if
+	end subroutine getAbsorberIndex
+
+end module rrlw_ncpar
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_ref.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_ref.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_ref.f90	(revision 3477)
@@ -0,0 +1,30 @@
+      module rrlw_ref
+
+      use parkind, only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw reference atmosphere 
+! Based on standard mid-latitude summer profile
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! pref   :  real   : Reference pressure levels
+! preflog:  real   : Reference pressure levels, ln(pref)
+! tref   :  real   : Reference temperature levels for MLS profile
+! chi_mls:  real   : 
+!------------------------------------------------------------------
+
+      real(kind=rb) , dimension(59) :: pref
+      real(kind=rb) , dimension(59) :: preflog
+      real(kind=rb) , dimension(59) :: tref
+      real(kind=rb) :: chi_mls(7,59)
+
+      end module rrlw_ref
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_tbl.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_tbl.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_tbl.f90	(revision 3477)
@@ -0,0 +1,46 @@
+      module rrlw_tbl
+
+      use parkind, only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw exponential lookup table arrays
+
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, Jun 2006
+! Revised: MJIacono, AER, Aug 2007
+! Revised: MJIacono, AER, Aug 2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! ntbl   :  integer: Lookup table dimension
+! tblint :  real   : Lookup table conversion factor
+! tau_tbl:  real   : Clear-sky optical depth (used in cloudy radiative
+!                    transfer)
+! exp_tbl:  real   : Transmittance lookup table
+! tfn_tbl:  real   : Tau transition function; i.e. the transition of
+!                    the Planck function from that for the mean layer
+!                    temperature to that for the layer boundary
+!                    temperature as a function of optical depth.
+!                    The "linear in tau" method is used to make 
+!                    the table.
+! pade   :  real   : Pade constant   
+! bpade  :  real   : Inverse of Pade constant   
+!------------------------------------------------------------------
+
+      integer(kind=im), parameter :: ntbl = 10000
+
+      real(kind=rb), parameter :: tblint = 10000.0_rb
+
+      real(kind=rb) , dimension(0:ntbl) :: tau_tbl
+      real(kind=rb) , dimension(0:ntbl) :: exp_tbl
+      real(kind=rb) , dimension(0:ntbl) :: tfn_tbl
+
+      real(kind=rb), parameter :: pade = 0.278_rb
+      real(kind=rb) :: bpade
+
+      end module rrlw_tbl
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_vsn.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_vsn.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_vsn.f90	(revision 3477)
@@ -0,0 +1,54 @@
+      module rrlw_vsn
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw version information
+
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+!hnamrtm :character: 
+!hnamini :character: 
+!hnamcld :character: 
+!hnamclc :character: 
+!hnamrtr :character: 
+!hnamrtx :character: 
+!hnamrtc :character: 
+!hnamset :character: 
+!hnamtau :character: 
+!hnamatm :character: 
+!hnamutl :character: 
+!hnamext :character: 
+!hnamkg  :character: 
+!
+! hvrrtm :character: 
+! hvrini :character: 
+! hvrcld :character: 
+! hvrclc :character: 
+! hvrrtr :character: 
+! hvrrtx :character: 
+! hvrrtc :character: 
+! hvrset :character: 
+! hvrtau :character: 
+! hvratm :character: 
+! hvrutl :character: 
+! hvrext :character: 
+! hvrkg  :character: 
+!------------------------------------------------------------------
+
+      character*18 hvrrtm,hvrini,hvrcld,hvrclc,hvrrtr,hvrrtx, &
+                   hvrrtc,hvrset,hvrtau,hvratm,hvrutl,hvrext
+      character*20 hnamrtm,hnamini,hnamcld,hnamclc,hnamrtr,hnamrtx, &
+                   hnamrtc,hnamset,hnamtau,hnamatm,hnamutl,hnamext
+
+      character*18 hvrkg
+      character*20 hnamkg
+
+      end module rrlw_vsn
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrlw_wvn.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrlw_wvn.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrlw_wvn.f90	(revision 3477)
@@ -0,0 +1,86 @@
+      module rrlw_wvn
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : nbndlw, mg, ngptlw, maxinpx
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_lw spectral information
+
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! ng     :  integer: Number of original g-intervals in each spectral band
+! nspa   :  integer: For the lower atmosphere, the number of reference
+!                    atmospheres that are stored for each spectral band
+!                    per pressure level and temperature.  Each of these
+!                    atmospheres has different relative amounts of the 
+!                    key species for the band (i.e. different binary
+!                    species parameters).
+! nspb   :  integer: Same as nspa for the upper atmosphere
+!wavenum1:  real   : Spectral band lower boundary in wavenumbers
+!wavenum2:  real   : Spectral band upper boundary in wavenumbers
+! delwave:  real   : Spectral band width in wavenumbers
+! totplnk:  real   : Integrated Planck value for each band; (band 16
+!                    includes total from 2600 cm-1 to infinity)
+!                    Used for calculation across total spectrum
+!totplk16:  real   : Integrated Planck value for band 16 (2600-3250 cm-1)
+!                    Used for calculation in band 16 only if 
+!                    individual band output requested
+!totplnkderiv: real: Integrated Planck function derivative with respect
+!                    to temperature for each band; (band 16
+!                    includes total from 2600 cm-1 to infinity)
+!                    Used for calculation across total spectrum
+!totplk16deriv:real: Integrated Planck function derivative with respect
+!                    to temperature for band 16 (2600-3250 cm-1)
+!                    Used for calculation in band 16 only if 
+!                    individual band output requested
+!
+! ngc    :  integer: The number of new g-intervals in each band
+! ngs    :  integer: The cumulative sum of new g-intervals for each band
+! ngm    :  integer: The index of each new g-interval relative to the
+!                    original 16 g-intervals in each band
+! ngn    :  integer: The number of original g-intervals that are 
+!                    combined to make each new g-intervals in each band
+! ngb    :  integer: The band index for each new g-interval
+! wt     :  real   : RRTM weights for the original 16 g-intervals
+! rwgt   :  real   : Weights for combining original 16 g-intervals 
+!                    (256 total) into reduced set of g-intervals 
+!                    (140 total)
+! nxmol  :  integer: Number of cross-section molecules
+! ixindx :  integer: Flag for active cross-sections in calculation
+!------------------------------------------------------------------
+
+      integer(kind=im) :: ng(nbndlw)
+      integer(kind=im) :: nspa(nbndlw)
+      integer(kind=im) :: nspb(nbndlw)
+
+      real(kind=rb) :: wavenum1(nbndlw)
+      real(kind=rb) :: wavenum2(nbndlw)
+      real(kind=rb) :: delwave(nbndlw)
+
+      real(kind=rb) :: totplnk(181,nbndlw)
+      real(kind=rb) :: totplk16(181)
+
+      real(kind=rb) :: totplnkderiv(181,nbndlw)
+      real(kind=rb) :: totplk16deriv(181)
+
+      integer(kind=im) :: ngc(nbndlw)
+      integer(kind=im) :: ngs(nbndlw)
+      integer(kind=im) :: ngn(ngptlw)
+      integer(kind=im) :: ngb(ngptlw)
+      integer(kind=im) :: ngm(nbndlw*mg)
+
+      real(kind=rb) :: wt(mg)
+      real(kind=rb) :: rwgt(nbndlw*mg)
+
+      integer(kind=im) :: nxmol
+      integer(kind=im) :: ixindx(maxinpx)
+
+      end module rrlw_wvn
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_aer.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_aer.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_aer.f90	(revision 3477)
@@ -0,0 +1,60 @@
+      module rrsw_aer
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : nbndsw, naerec
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw aerosol optical properties
+!
+!  Data derived from six ECMWF aerosol types and defined for
+!  the rrtmg_sw spectral intervals
+!
+! Initial: J.-J. Morcrette, ECMWF, mar2003
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+!
+!-- The six ECMWF aerosol types are respectively:
+!
+!  1/ continental average                 2/ maritime
+!  3/ desert                              4/ urban
+!  5/ volcanic active                     6/ stratospheric background
+!
+! computed from Hess and Koepke (con, mar, des, urb)
+!          from Bonnel et al.   (vol, str)
+!
+! rrtmg_sw 14 spectral intervals (microns):
+!  3.846 -  3.077
+!  3.077 -  2.500
+!  2.500 -  2.150
+!  2.150 -  1.942
+!  1.942 -  1.626
+!  1.626 -  1.299
+!  1.299 -  1.242
+!  1.242 -  0.7782
+!  0.7782-  0.6250
+!  0.6250-  0.4415
+!  0.4415-  0.3448
+!  0.3448-  0.2632
+!  0.2632-  0.2000
+! 12.195 -  3.846
+!
+!------------------------------------------------------------------
+!
+!  name     type     purpose
+! -----   : ----   : ----------------------------------------------
+! rsrtaua : real   : ratio of average optical thickness in 
+!                    spectral band to that at 0.55 micron
+! rsrpiza : real   : average single scattering albedo (unitless)
+! rsrasya : real   : average asymmetry parameter (unitless)
+!------------------------------------------------------------------
+
+      real(kind=rb) :: rsrtaua(nbndsw,naerec)
+      real(kind=rb) :: rsrpiza(nbndsw,naerec)
+      real(kind=rb) :: rsrasya(nbndsw,naerec)
+
+      end module rrsw_aer
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_cld.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_cld.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_cld.f90	(revision 3477)
@@ -0,0 +1,47 @@
+      module rrsw_cld
+
+      use parkind, only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw cloud property coefficients
+!
+! Initial: J.-J. Morcrette, ECMWF, oct1999
+! Revised: J. Delamere/MJIacono, AER, aug2005
+! Revised: MJIacono, AER, nov2005
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+! Revised: MJIacono, AER, dec2013: Updated xxxliq1 look-up tables
+!------------------------------------------------------------------
+!
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! xxxliq1 : real   : optical properties (extinction coefficient, single 
+!                    scattering albedo, assymetry factor) based on 
+!                    Hu & Stamnes, j. clim., 6, 728-742, 1993. Derived
+!                    from Mie scattering calculations at higher spectral
+!                    resolution than Hu & Stamnes. Used in CIRC (Continuous
+!                    Intercomparison of Radiation Codes) project. 
+! xxxice2 : real   : optical properties (extinction coefficient, single 
+!                    scattering albedo, assymetry factor) from streamer v3.0,
+!                    Key, streamer user's guide, cooperative institude 
+!                    for meteorological studies, 95 pp., 2001.
+! xxxice3 : real   : optical properties (extinction coefficient, single 
+!                    scattering albedo, assymetry factor) from
+!                    Fu, j. clim., 9, 1996.
+! xbari   : real   : optical property coefficients for five spectral 
+!                    intervals (2857-4000, 4000-5263, 5263-7692, 7692-14285,
+!                    and 14285-40000 wavenumbers) following 
+!                    Ebert and Curry, jgr, 97, 3831-3836, 1992.
+!------------------------------------------------------------------
+
+      real(kind=rb) :: extliq1(58,16:29), ssaliq1(58,16:29), asyliq1(58,16:29)
+      real(kind=rb) :: extice2(43,16:29), ssaice2(43,16:29), asyice2(43,16:29)
+      real(kind=rb) :: extice3(46,16:29), ssaice3(46,16:29), asyice3(46,16:29)
+      real(kind=rb) :: fdlice3(46,16:29)
+      real(kind=rb) :: abari(5),bbari(5),cbari(5),dbari(5),ebari(5),fbari(5)
+
+      end module rrsw_cld
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_con.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_con.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_con.f90	(revision 3477)
@@ -0,0 +1,42 @@
+      module rrsw_con
+
+      use parkind, only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw constants
+
+! Initial version: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! fluxfac:  real   : radiance to flux conversion factor 
+! heatfac:  real   : flux to heating rate conversion factor
+!oneminus:  real   : 1.-1.e-6
+! pi     :  real   : pi
+! grav   :  real   : acceleration of gravity
+! planck :  real   : planck constant
+! boltz  :  real   : boltzmann constant
+! clight :  real   : speed of light
+! avogad :  real   : avogadro constant 
+! alosmt :  real   : loschmidt constant
+! gascon :  real   : molar gas constant
+! radcn1 :  real   : first radiation constant
+! radcn2 :  real   : second radiation constant
+! sbcnst :  real   : stefan-boltzmann constant
+!  secdy :  real   : seconds per day
+!------------------------------------------------------------------
+
+      real(kind=rb) :: fluxfac, heatfac
+      real(kind=rb) :: oneminus, pi, grav
+      real(kind=rb) :: planck, boltz, clight
+      real(kind=rb) :: avogad, alosmt, gascon
+      real(kind=rb) :: radcn1, radcn2
+      real(kind=rb) :: sbcnst, secdy
+
+      end module rrsw_con
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg16.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg16.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg16.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrsw_kg16
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng16
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 16
+! band 16:  2600-3250 cm-1 (low - h2o,ch4; high - ch4)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no16 = 16
+
+      real(kind=rb) :: kao(9,5,13,no16)
+      real(kind=rb) :: kbo(5,13:59,no16)
+      real(kind=rb) :: selfrefo(10,no16), forrefo(3,no16)
+      real(kind=rb) :: sfluxrefo(no16)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 16
+! band 16:  2600-3250 cm-1 (low - h2o,ch4; high - ch4)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng16) , absa(585,ng16)
+      real(kind=rb) :: kb(5,13:59,ng16), absb(235,ng16)
+      real(kind=rb) :: selfref(10,ng16), forref(3,ng16)
+      real(kind=rb) :: sfluxref(ng16)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg16
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg17.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg17.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg17.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrsw_kg17
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng17
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 17
+! band 17:  3250-4000 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no17 = 16
+
+      real(kind=rb) :: kao(9,5,13,no17)
+      real(kind=rb) :: kbo(5,5,13:59,no17)
+      real(kind=rb) :: selfrefo(10,no17), forrefo(4,no17)
+      real(kind=rb) :: sfluxrefo(no17,5)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 17
+! band 17:  3250-4000 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng17) , absa(585,ng17)
+      real(kind=rb) :: kb(5,5,13:59,ng17), absb(1175,ng17)
+      real(kind=rb) :: selfref(10,ng17), forref(4,ng17)
+      real(kind=rb) :: sfluxref(ng17,5)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,1,13,1),absb(1,1))
+
+      end module rrsw_kg17
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg18.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg18.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg18.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrsw_kg18
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng18
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 18
+! band 18:  4000-4650 cm-1 (low - h2o,ch4; high - ch4)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no18 = 16
+
+      real(kind=rb) :: kao(9,5,13,no18)
+      real(kind=rb) :: kbo(5,13:59,no18)
+      real(kind=rb) :: selfrefo(10,no18), forrefo(3,no18)
+      real(kind=rb) :: sfluxrefo(no18,9)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 18
+! band 18:  4000-4650 cm-1 (low - h2o,ch4; high - ch4)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng18), absa(585,ng18)
+      real(kind=rb) :: kb(5,13:59,ng18), absb(235,ng18)
+      real(kind=rb) :: selfref(10,ng18), forref(3,ng18)
+      real(kind=rb) :: sfluxref(ng18,9)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg18
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg19.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg19.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg19.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrsw_kg19
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng19
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 19
+! band 19:  4650-5150 cm-1 (low - h2o,co2; high - co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no19 = 16
+
+      real(kind=rb) :: kao(9,5,13,no19)
+      real(kind=rb) :: kbo(5,13:59,no19)
+      real(kind=rb) :: selfrefo(10,no19), forrefo(3,no19)
+      real(kind=rb) :: sfluxrefo(no19,9)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 19
+! band 19:  4650-5150 cm-1 (low - h2o,co2; high - co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng19), absa(585,ng19)
+      real(kind=rb) :: kb(5,13:59,ng19), absb(235,ng19)
+      real(kind=rb) :: selfref(10,ng19), forref(3,ng19)
+      real(kind=rb) :: sfluxref(ng19,9)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg19
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg20.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg20.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg20.f90	(revision 3477)
@@ -0,0 +1,68 @@
+      module rrsw_kg20
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng20
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 20
+! band 20:  5150-6150 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+! absch4o : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no20 = 16
+
+      real(kind=rb) :: kao(5,13,no20)
+      real(kind=rb) :: kbo(5,13:59,no20)
+      real(kind=rb) :: selfrefo(10,no20), forrefo(4,no20)
+      real(kind=rb) :: sfluxrefo(no20)
+      real(kind=rb) :: absch4o(no20)
+
+      real(kind=rb) :: rayl 
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 20
+! band 20:  5150-6150 cm-1 (low - h2o; high - h2o)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+! absch4  : real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(5,13,ng20), absa(65,ng20)
+      real(kind=rb) :: kb(5,13:59,ng20), absb(235,ng20)
+      real(kind=rb) :: selfref(10,ng20), forref(4,ng20)
+      real(kind=rb) :: sfluxref(ng20)
+      real(kind=rb) :: absch4(ng20)
+
+      equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg20
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg21.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg21.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg21.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrsw_kg21
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng21
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 21
+! band 21:  6150-7700 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no21 = 16
+
+      real(kind=rb) :: kao(9,5,13,no21)
+      real(kind=rb) :: kbo(5,5,13:59,no21)
+      real(kind=rb) :: selfrefo(10,no21), forrefo(4,no21)
+      real(kind=rb) :: sfluxrefo(no21,9)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 21
+! band 21:  6150-7700 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng21), absa(585,ng21)
+      real(kind=rb) :: kb(5,5,13:59,ng21), absb(1175,ng21)
+      real(kind=rb) :: selfref(10,ng21), forref(4,ng21)
+      real(kind=rb) :: sfluxref(ng21,9)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,1,13,1),absb(1,1))
+
+      end module rrsw_kg21
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg22.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg22.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg22.f90	(revision 3477)
@@ -0,0 +1,64 @@
+      module rrsw_kg22
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng22
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 22
+! band 22:  7700-8050 cm-1 (low - h2o,o2; high - o2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no22 = 16
+
+      real(kind=rb) :: kao(9,5,13,no22)
+      real(kind=rb) :: kbo(5,13:59,no22)
+      real(kind=rb) :: selfrefo(10,no22), forrefo(3,no22)
+      real(kind=rb) :: sfluxrefo(no22,9)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 22
+! band 22:  7700-8050 cm-1 (low - h2o,o2; high - o2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng22), absa(585,ng22)
+      real(kind=rb) :: kb(5,13:59,ng22), absb(235,ng22)
+      real(kind=rb) :: selfref(10,ng22), forref(3,ng22)
+      real(kind=rb) :: sfluxref(ng22,9)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg22
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg23.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg23.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg23.f90	(revision 3477)
@@ -0,0 +1,61 @@
+      module rrsw_kg23
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng23
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 23
+! band 23:  8050-12850 cm-1 (low - h2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no23 = 16
+
+      real(kind=rb) :: kao(5,13,no23)
+      real(kind=rb) :: selfrefo(10,no23), forrefo(3,no23)
+      real(kind=rb) :: sfluxrefo(no23)
+      real(kind=rb) :: raylo(no23)
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 23
+! band 23:  8050-12850 cm-1 (low - h2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(5,13,ng23), absa(65,ng23)
+      real(kind=rb) :: selfref(10,ng23), forref(3,ng23)
+      real(kind=rb) :: sfluxref(ng23), rayl(ng23)
+
+      equivalence (ka(1,1,1),absa(1,1))
+
+      end module rrsw_kg23
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg24.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg24.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg24.f90	(revision 3477)
@@ -0,0 +1,74 @@
+      module rrsw_kg24
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng24
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 24
+! band 24: 12850-16000 cm-1 (low - h2o,o2; high - o2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real
+!sfluxrefo: real     
+! abso3ao : real     
+! abso3bo : real     
+! raylao  : real     
+! raylbo  : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no24 = 16
+
+      real(kind=rb) :: kao(9,5,13,no24)
+      real(kind=rb) :: kbo(5,13:59,no24)
+      real(kind=rb) :: selfrefo(10,no24), forrefo(3,no24)
+      real(kind=rb) :: sfluxrefo(no24,9)
+      real(kind=rb) :: abso3ao(no24), abso3bo(no24)
+      real(kind=rb) :: raylao(no24,9), raylbo(no24)
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 24
+! band 24: 12850-16000 cm-1 (low - h2o,o2; high - o2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! selfref : real     
+! forref  : real
+! sfluxref: real     
+! abso3a  : real     
+! abso3b  : real     
+! rayla   : real     
+! raylb   : real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng24), absa(585,ng24)
+      real(kind=rb) :: kb(5,13:59,ng24), absb(235,ng24)
+      real(kind=rb) :: selfref(10,ng24), forref(3,ng24)
+      real(kind=rb) :: sfluxref(ng24,9)
+      real(kind=rb) :: abso3a(ng24), abso3b(ng24)
+      real(kind=rb) :: rayla(ng24,9), raylb(ng24)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg24
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg25.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg25.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg25.f90	(revision 3477)
@@ -0,0 +1,61 @@
+      module rrsw_kg25
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng25
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 25
+! band 25: 16000-22650 cm-1 (low - h2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+!sfluxrefo: real     
+! abso3ao : real     
+! abso3bo : real     
+! raylo   : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no25 = 16
+
+      real(kind=rb) :: kao(5,13,no25)
+      real(kind=rb) :: sfluxrefo(no25)
+      real(kind=rb) :: abso3ao(no25), abso3bo(no25)
+      real(kind=rb) :: raylo(no25)
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 25
+! band 25: 16000-22650 cm-1 (low - h2o; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! absa    : real
+! sfluxref: real     
+! abso3a  : real     
+! abso3b  : real     
+! rayl    : real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(5,13,ng25), absa(65,ng25)
+      real(kind=rb) :: sfluxref(ng25)
+      real(kind=rb) :: abso3a(ng25), abso3b(ng25)
+      real(kind=rb) :: rayl(ng25)
+
+      equivalence (ka(1,1,1),absa(1,1))
+
+      end module rrsw_kg25
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg26.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg26.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg26.f90	(revision 3477)
@@ -0,0 +1,48 @@
+      module rrsw_kg26
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng26
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 26
+! band 26: 22650-29000 cm-1 (low - nothing; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+!sfluxrefo: real     
+! raylo   : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no26 = 16
+
+      real(kind=rb) :: sfluxrefo(no26)
+      real(kind=rb) :: raylo(no26)
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 26
+! band 26: 22650-29000 cm-1 (low - nothing; high - nothing)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! sfluxref: real     
+! rayl    : real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: sfluxref(ng26)
+      real(kind=rb) :: rayl(ng26)
+
+      end module rrsw_kg26
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg27.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg27.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg27.f90	(revision 3477)
@@ -0,0 +1,60 @@
+      module rrsw_kg27
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng27
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 27
+! band 27: 29000-38000 cm-1 (low - o3; high - o3)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+!sfluxrefo: real     
+! raylo   : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no27 = 16
+
+      real(kind=rb) :: kao(5,13,no27)
+      real(kind=rb) :: kbo(5,13:59,no27)
+      real(kind=rb) :: sfluxrefo(no27)
+      real(kind=rb) :: raylo(no27)
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 27
+! band 27: 29000-38000 cm-1 (low - o3; high - o3)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! absa    : real
+! absb    : real
+! sfluxref: real     
+! rayl    : real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(5,13,ng27), absa(65,ng27)
+      real(kind=rb) :: kb(5,13:59,ng27), absb(235,ng27)
+      real(kind=rb) :: sfluxref(ng27)
+      real(kind=rb) :: rayl(ng27)
+
+      equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg27
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg28.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg28.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg28.f90	(revision 3477)
@@ -0,0 +1,56 @@
+      module rrsw_kg28
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng28
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 28
+! band 28: 38000-50000 cm-1 (low - o3, o2; high - o3, o2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+!sfluxrefo: real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no28 = 16
+
+      real(kind=rb) :: kao(9,5,13,no28)
+      real(kind=rb) :: kbo(5,5,13:59,no28)
+      real(kind=rb) :: sfluxrefo(no28,5)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 28
+! band 28: 38000-50000 cm-1 (low - o3, o2; high - o3, o2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! sfluxref: real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(9,5,13,ng28), absa(585,ng28)
+      real(kind=rb) :: kb(5,5,13:59,ng28), absb(1175,ng28)
+      real(kind=rb) :: sfluxref(ng28,5)
+
+      equivalence (ka(1,1,1,1),absa(1,1)), (kb(1,1,13,1),absb(1,1))
+
+      end module rrsw_kg28
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg29.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg29.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_kg29.f90	(revision 3477)
@@ -0,0 +1,68 @@
+      module rrsw_kg29
+
+      use parkind ,only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ng29
+
+      implicit none
+      save
+
+!-----------------------------------------------------------------
+! rrtmg_sw ORIGINAL abs. coefficients for interval 29
+! band 29:  820-2600 cm-1 (low - h2o; high - co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! kao     : real     
+! kbo     : real     
+! selfrefo: real     
+! forrefo : real     
+!sfluxrefo: real     
+! absh2oo : real     
+! absco2o : real     
+!-----------------------------------------------------------------
+
+      integer(kind=im), parameter :: no29 = 16
+
+      real(kind=rb) :: kao(5,13,no29)
+      real(kind=rb) :: kbo(5,13:59,no29)
+      real(kind=rb) :: selfrefo(10,no29), forrefo(4,no29)
+      real(kind=rb) :: sfluxrefo(no29)
+      real(kind=rb) :: absh2oo(no29), absco2o(no29)
+
+      real(kind=rb) :: rayl
+
+!-----------------------------------------------------------------
+! rrtmg_sw COMBINED abs. coefficients for interval 29
+! band 29:  820-2600 cm-1 (low - h2o; high - co2)
+!
+! Initial version:  JJMorcrette, ECMWF, oct1999
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!-----------------------------------------------------------------
+!
+!  name     type     purpose
+!  ----   : ----   : ---------------------------------------------
+! ka      : real     
+! kb      : real     
+! selfref : real     
+! forref  : real     
+! sfluxref: real     
+! absh2o  : real     
+! absco2  : real     
+!-----------------------------------------------------------------
+
+      real(kind=rb) :: ka(5,13,ng29), absa(65,ng29)
+      real(kind=rb) :: kb(5,13:59,ng29), absb(235,ng29)
+      real(kind=rb) :: selfref(10,ng29), forref(4,ng29)
+      real(kind=rb) :: sfluxref(ng29)
+      real(kind=rb) :: absh2o(ng29), absco2(ng29)
+
+      equivalence (ka(1,1,1),absa(1,1)), (kb(1,13,1),absb(1,1))
+
+      end module rrsw_kg29
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_ncpar.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_ncpar.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_ncpar.f90	(revision 3477)
@@ -0,0 +1,105 @@
+module rrsw_ncpar
+	use parkind ,only : im => kind_im, rb => kind_rb
+
+	implicit none
+    save
+	
+    real(kind=rb), parameter :: cpdair = 1003.5  ! Specific heat capacity of dry air
+                                        		 ! at constant pressure at 273 K
+                                        		 ! (J kg-1 K-1)
+
+	integer(kind=im), dimension(50) :: status
+	integer(kind=im) :: i
+	integer(kind=im), parameter :: keylower      = 9,  &
+						  keyupper      = 5,  &
+						  Tdiff         = 5,  &
+						  ps            = 59, &
+						  plower        = 13, &
+						  pupper        = 47, &
+						  Tself         = 10, &
+						  Tforeignlower = 3,  &
+						  Tforeignupper = 2,  &
+						  pforeign      = 4,  &
+						  T             = 19, &
+						  band          = 14, &
+						  GPoint        = 16, &
+						  GPointSet     = 2
+	
+	integer(kind=im), parameter :: maxAbsorberNameLength   = 5,  &
+                          Absorber                = 12, &
+                          maxKeySpeciesNameLength = 3,  &
+                          maxKeySpeciesNames      = 2
+                          
+    character(len = maxAbsorberNameLength), dimension(Absorber), parameter :: &
+    AbsorberNames = (/        &
+     				'N2   ',  &
+     				'CCL4 ',  &
+     				'CFC11',  &
+     				'CFC12',  &
+     				'CFC22',  &
+     				'H2O  ',  &
+     				'CO2  ',  &
+     				'O3   ',  &
+     				'N2O  ',  & 
+     				'CO   ',  &
+     				'CH4  ',  &
+     				'O2   '  /)
+	
+	character(len = maxKeySpeciesNameLength), dimension(band,maxKeySpeciesNames), parameter :: &
+    KeySpeciesNamesLower = RESHAPE( SOURCE = (/ 'H2O', 'H2O', 'H2O', 'H2O', 'H2O', 'H2O', 'H2O', &
+							  					'H2O', 'H2O', 'H2O', '   ', 'O3 ', 'O3 ', 'H2O', &
+							  					'CH4', 'CO2', 'CH4', 'CO2', '   ', 'CO2', 'O2 ', &
+							  					'   ', 'O2 ', '   ', '   ', '   ', 'O2 ', '   '  /), &
+							  		SHAPE = (/ band, maxKeySpeciesNames /) )
+							  
+	character(len = maxKeySpeciesNameLength), dimension(band,maxKeySpeciesNames), parameter :: &
+    KeySpeciesNamesUpper = RESHAPE( SOURCE = (/ 'CH4', 'H2O', 'CH4', 'CO2', 'H2O', 'H2O', 'O2 ', &
+							 					'   ', 'O2 ', '   ', '   ', 'O3 ', 'O3 ', 'CO2', &
+							  					'   ', 'CO2', '   ', '   ', '   ', 'CO2', '   ', &
+							  					'   ', '   ', '   ', '   ', '   ', 'O2 ', '   '  /), &
+							  		SHAPE = (/ band, maxKeySpeciesNames /) )
+							
+	integer(kind=im), dimension(band)     :: BandNums = (/ 16, 17, 18, 19, 20, 21, 22, &
+										  		        23, 24, 25, 26, 27, 28, 29 /)
+										      
+	real(kind=rb), dimension(keylower) :: KeySpeciesLower = (/ 1.0, 0.125, 0.25, 0.375, &
+											      			   0.50, 0.625, 0.75, 0.875, 1.0 /)
+											          
+	real(kind=rb), dimension(keyupper) :: KeySpeciesUpper = (/ 0.0, 0.25, 0.50, 0.75, 1.0 /)
+		
+	real(kind=rb), dimension(Tdiff)    :: TempDiffs = (/ -30, -15, 0, 15, 30 /)
+										      
+	real(kind=rb), dimension(Tself)    :: TempSelf = (/ 245.6,252.8,260.0,267.2,274.4, &
+														281.6,288.8,296.0,303.2,310.4 /)		
+	
+	real(kind=rb), dimension(Tforeignlower) :: TempForeignlower = (/ 296, 260, 224 /)
+	
+	real(kind=rb), dimension(Tforeignupper) :: TempForeignupper = (/ 224, 260 /)
+	
+	real(kind=rb), dimension(pforeign) :: PressForeign = (/ 970, 475, 219, 3 /)
+			
+	real(kind=rb), dimension(T)        :: Temp = (/188.0, 195.2, 202.4, 209.6, 216.8, 224.0, &
+								   				   231.2, 238.4, 245.6, 252.8, 260.0, 267.2, &
+								   				   274.4, 281.6, 288.8, 296.0, 303.2, 310.4, 317.6 /)
+	
+	contains 
+	
+	subroutine getAbsorberIndex(AbsorberName,AbsorberIndex)
+		character(len = *), intent(in) :: AbsorberName
+		integer(kind=im), intent(out)           :: AbsorberIndex
+		
+		integer(kind=im) :: m
+	
+		AbsorberIndex = -1
+		do m = 1, Absorber
+			if (trim(AbsorberNames(m)) == trim(AbsorberName)) then
+				AbsorberIndex = m
+			end if
+		end do
+		
+		if (AbsorberIndex == -1) then
+			print*, "Absorber name index lookup failed."
+		end if
+	end subroutine getAbsorberIndex
+
+end module rrsw_ncpar
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_ref.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_ref.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_ref.f90	(revision 3477)
@@ -0,0 +1,28 @@
+      module rrsw_ref
+
+      use parkind, only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw reference atmosphere 
+! Based on standard mid-latitude summer profile
+!
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jun2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! pref   :  real   : Reference pressure levels
+! preflog:  real   : Reference pressure levels, ln(pref)
+! tref   :  real   : Reference temperature levels for MLS profile
+!------------------------------------------------------------------
+
+      real(kind=rb) , dimension(59) :: pref
+      real(kind=rb) , dimension(59) :: preflog
+      real(kind=rb) , dimension(59) :: tref
+
+      end module rrsw_ref
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_tbl.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_tbl.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_tbl.f90	(revision 3477)
@@ -0,0 +1,41 @@
+      module rrsw_tbl
+
+      use parkind, only : im => kind_im, rb => kind_rb
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw lookup table arrays
+
+! Initial version: MJIacono, AER, may2007
+! Revised: MJIacono, AER, aug2007
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! ntbl   :  integer: Lookup table dimension
+! tblint :  real   : Lookup table conversion factor
+! tau_tbl:  real   : Clear-sky optical depth 
+! exp_tbl:  real   : Exponential lookup table for transmittance
+! od_lo  :  real   : Value of tau below which expansion is used
+!                  : in place of lookup table
+! pade   :  real   : Pade approximation constant
+! bpade  :  real   : Inverse of Pade constant
+!------------------------------------------------------------------
+
+      integer(kind=im), parameter :: ntbl = 10000
+
+      real(kind=rb), parameter :: tblint = 10000.0_rb
+
+      real(kind=rb), parameter :: od_lo = 0.06_rb
+
+      real(kind=rb) :: tau_tbl
+      real(kind=rb) , dimension(0:ntbl) :: exp_tbl
+
+      real(kind=rb), parameter :: pade = 0.278_rb
+      real(kind=rb) :: bpade
+
+      end module rrsw_tbl
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_vsn.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_vsn.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_vsn.f90	(revision 3477)
@@ -0,0 +1,56 @@
+      module rrsw_vsn
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw version information
+
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+!hnamrtm :character: 
+!hnamini :character: 
+!hnamcld :character: 
+!hnamclc :character: 
+!hnamrft :character: 
+!hnamspv :character: 
+!hnamspc :character: 
+!hnamset :character: 
+!hnamtau :character: 
+!hnamvqd :character: 
+!hnamatm :character: 
+!hnamutl :character: 
+!hnamext :character: 
+!hnamkg  :character: 
+!
+! hvrrtm :character: 
+! hvrini :character: 
+! hvrcld :character: 
+! hvrclc :character: 
+! hvrrft :character: 
+! hvrspv :character: 
+! hvrspc :character: 
+! hvrset :character: 
+! hvrtau :character: 
+! hvrvqd :character: 
+! hvratm :character: 
+! hvrutl :character: 
+! hvrext :character: 
+! hvrkg  :character: 
+!------------------------------------------------------------------
+
+      character*18 hvrrtm,hvrini,hvrcld,hvrclc,hvrrft,hvrspv, &
+                   hvrspc,hvrset,hvrtau,hvrvqd,hvratm,hvrutl,hvrext
+      character*20 hnamrtm,hnamini,hnamcld,hnamclc,hnamrft,hnamspv, &
+                   hnamspc,hnamset,hnamtau,hnamvqd,hnamatm,hnamutl,hnamext
+
+      character*18 hvrkg
+      character*20 hnamkg
+
+      end module rrsw_vsn
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrsw_wvn.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrsw_wvn.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrsw_wvn.f90	(revision 3477)
@@ -0,0 +1,56 @@
+      module rrsw_wvn
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : nbndsw, mg, ngptsw, jpb1, jpb2
+
+      implicit none
+      save
+
+!------------------------------------------------------------------
+! rrtmg_sw spectral information
+
+! Initial version:  JJMorcrette, ECMWF, jul1998
+! Revised: MJIacono, AER, jul2006
+! Revised: MJIacono, AER, aug2008
+!------------------------------------------------------------------
+
+!  name     type     purpose
+! -----  :  ----   : ----------------------------------------------
+! ng     :  integer: Number of original g-intervals in each spectral band
+! nspa   :  integer: 
+! nspb   :  integer: 
+!wavenum1:  real   : Spectral band lower boundary in wavenumbers
+!wavenum2:  real   : Spectral band upper boundary in wavenumbers
+! delwave:  real   : Spectral band width in wavenumbers
+!
+! ngc    :  integer: The number of new g-intervals in each band
+! ngs    :  integer: The cumulative sum of new g-intervals for each band
+! ngm    :  integer: The index of each new g-interval relative to the
+!                    original 16 g-intervals in each band
+! ngn    :  integer: The number of original g-intervals that are 
+!                    combined to make each new g-intervals in each band
+! ngb    :  integer: The band index for each new g-interval
+! wt     :  real   : RRTM weights for the original 16 g-intervals
+! rwgt   :  real   : Weights for combining original 16 g-intervals 
+!                    (224 total) into reduced set of g-intervals 
+!                    (112 total)
+!------------------------------------------------------------------
+
+      integer(kind=im) :: ng(jpb1:jpb2)
+      integer(kind=im) :: nspa(jpb1:jpb2)
+      integer(kind=im) :: nspb(jpb1:jpb2)
+
+      real(kind=rb) :: wavenum1(jpb1:jpb2)
+      real(kind=rb) :: wavenum2(jpb1:jpb2)
+      real(kind=rb) :: delwave(jpb1:jpb2)
+
+      integer(kind=im) :: ngc(nbndsw)
+      integer(kind=im) :: ngs(nbndsw)
+      integer(kind=im) :: ngn(ngptsw)
+      integer(kind=im) :: ngb(ngptsw)
+      integer(kind=im) :: ngm(nbndsw*mg)
+
+      real(kind=rb) :: wt(mg)
+      real(kind=rb) :: rwgt(nbndsw*mg)
+
+      end module rrsw_wvn
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_cldprmc.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_cldprmc.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_cldprmc.f90	(revision 3477)
@@ -0,0 +1,256 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_cldprmc.f90,v $
+!     author:    $Author: miacono $
+!     revision:  $Revision: 1.9 $
+!     created:   $Date: 2011/04/08 20:25:00 $
+!
+      module rrtmg_lw_cldprmc
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! --------- Modules ----------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : ngptlw, nbndlw
+      use rrlw_cld, only: abscld1, absliq0, absliq1, &
+                          absice0, absice1, absice2, absice3
+      use rrlw_wvn, only: ngb
+      use rrlw_vsn, only: hvrclc, hnamclc
+
+      implicit none
+
+      contains
+
+! ------------------------------------------------------------------------------
+      subroutine cldprmc(nlayers, inflag, iceflag, liqflag, cldfmc, &
+                         ciwpmc, clwpmc, reicmc, relqmc, ncbands, taucmc)
+! ------------------------------------------------------------------------------
+
+! Purpose:  Compute the cloud optical depth(s) for each cloudy layer.
+
+! ------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: inflag          ! see definitions
+      integer(kind=im), intent(in) :: iceflag         ! see definitions
+      integer(kind=im), intent(in) :: liqflag         ! see definitions
+
+      real(kind=rb), intent(in) :: cldfmc(:,:)        ! cloud fraction [mcica]
+                                                      !    Dimensions: (ngptlw,nlayers)
+      real(kind=rb), intent(in) :: ciwpmc(:,:)        ! cloud ice water path [mcica]
+                                                      !    Dimensions: (ngptlw,nlayers)
+      real(kind=rb), intent(in) :: clwpmc(:,:)        ! cloud liquid water path [mcica]
+                                                      !    Dimensions: (ngptlw,nlayers)
+      real(kind=rb), intent(in) :: relqmc(:)          ! liquid particle effective radius (microns)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: reicmc(:)          ! ice particle effective radius (microns)
+                                                      !    Dimensions: (nlayers)
+                                                      ! specific definition of reicmc depends on setting of iceflag:
+                                                      ! iceflag = 0: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !              r_ec must be >= 10.0 microns
+                                                      ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !              r_ec range is limited to 13.0 to 130.0 microns
+                                                      ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
+                                                      !              r_k range is limited to 5.0 to 131.0 microns
+                                                      ! iceflag = 3: generalized effective size, dge, (Fu, 1996),
+                                                      !              dge range is limited to 5.0 to 140.0 microns
+                                                      !              [dge = 1.0315 * r_ec]
+
+! ------- Output -------
+
+      integer(kind=im), intent(out) :: ncbands        ! number of cloud spectral bands
+      real(kind=rb), intent(inout) :: taucmc(:,:)     ! cloud optical depth [mcica]
+                                                      !    Dimensions: (ngptlw,nlayers)
+
+! ------- Local -------
+
+      integer(kind=im) :: lay                         ! Layer index
+      integer(kind=im) :: ib                          ! spectral band index
+      integer(kind=im) :: ig                          ! g-point interval index
+      integer(kind=im) :: index 
+      integer(kind=im) :: icb(nbndlw)
+
+      real(kind=rb) :: abscoice(ngptlw)               ! ice absorption coefficients
+      real(kind=rb) :: abscoliq(ngptlw)               ! liquid absorption coefficients
+      real(kind=rb) :: cwp                            ! cloud water path
+      real(kind=rb) :: radice                         ! cloud ice effective size (microns)
+      real(kind=rb) :: factor                         ! 
+      real(kind=rb) :: fint                           ! 
+      real(kind=rb) :: radliq                         ! cloud liquid droplet radius (microns)
+      real(kind=rb), parameter :: eps = 1.e-6_rb      ! epsilon
+      real(kind=rb), parameter :: cldmin = 1.e-20_rb  ! minimum value for cloud quantities
+
+! ------- Definitions -------
+
+!     Explanation of the method for each value of INFLAG.  Values of
+!     0 or 1 for INFLAG do not distingish being liquid and ice clouds.
+!     INFLAG = 2 does distinguish between liquid and ice clouds, and
+!     requires further user input to specify the method to be used to 
+!     compute the aborption due to each.
+!     INFLAG = 0:  For each cloudy layer, the cloud fraction and (gray)
+!                  optical depth are input.  
+!     INFLAG = 1:  For each cloudy layer, the cloud fraction and cloud
+!                  water path (g/m2) are input.  The (gray) cloud optical 
+!                  depth is computed as in CCM2.
+!     INFLAG = 2:  For each cloudy layer, the cloud fraction, cloud 
+!                  water path (g/m2), and cloud ice fraction are input.
+!       ICEFLAG = 0:  The ice effective radius (microns) is input and the
+!                     optical depths due to ice clouds are computed as in CCM3.
+!       ICEFLAG = 1:  The ice effective radius (microns) is input and the
+!                     optical depths due to ice clouds are computed as in 
+!                     Ebert and Curry, JGR, 97, 3831-3836 (1992).  The 
+!                     spectral regions in this work have been matched with
+!                     the spectral bands in RRTM to as great an extent 
+!                     as possible:  
+!                     E&C 1      IB = 5      RRTM bands 9-16
+!                     E&C 2      IB = 4      RRTM bands 6-8
+!                     E&C 3      IB = 3      RRTM bands 3-5
+!                     E&C 4      IB = 2      RRTM band 2
+!                     E&C 5      IB = 1      RRTM band 1
+!       ICEFLAG = 2:  The ice effective radius (microns) is input and the
+!                     optical properties due to ice clouds are computed from
+!                     the optical properties stored in the RT code,
+!                     STREAMER v3.0 (Reference: Key. J., Streamer 
+!                     User's Guide, Cooperative Institute for
+!                     Meteorological Satellite Studies, 2001, 96 pp.).
+!                     Valid range of values for re are between 5.0 and
+!                     131.0 micron.
+!       ICEFLAG = 3: The ice generalized effective size (dge) is input
+!                    and the optical properties, are calculated as in
+!                    Q. Fu, J. Climate, (1998). Q. Fu provided high resolution
+!                    tables which were appropriately averaged for the
+!                    bands in RRTM_LW.  Linear interpolation is used to
+!                    get the coefficients from the stored tables.
+!                    Valid range of values for dge are between 5.0 and
+!                    140.0 micron.
+!       LIQFLAG = 0:  The optical depths due to water clouds are computed as
+!                     in CCM3.
+!       LIQFLAG = 1:  The water droplet effective radius (microns) is input 
+!                     and the optical depths due to water clouds are computed 
+!                     as in Hu and Stamnes, J., Clim., 6, 728-742, (1993).
+!                     The values for absorption coefficients appropriate for
+!                     the spectral bands in RRTM have been obtained for a 
+!                     range of effective radii by an averaging procedure 
+!                     based on the work of J. Pinto (private communication).
+!                     Linear interpolation is used to get the absorption 
+!                     coefficients for the input effective radius.
+
+      data icb /1,2,3,3,3,4,4,4,5, 5, 5, 5, 5, 5, 5, 5/
+
+      hvrclc = '$Revision: 1.9 $'
+
+      ncbands = 1
+
+! This initialization is done in rrtmg_lw_subcol.F90.
+!      do lay = 1, nlayers
+!         do ig = 1, ngptlw
+!            taucmc(ig,lay) = 0.0_rb
+!         enddo
+!      enddo
+
+! Main layer loop
+      do lay = 1, nlayers
+
+        do ig = 1, ngptlw
+          cwp = ciwpmc(ig,lay) + clwpmc(ig,lay)
+          if (cldfmc(ig,lay) .ge. cldmin .and. &
+             (cwp .ge. cldmin .or. taucmc(ig,lay) .ge. cldmin)) then
+
+! Ice clouds and water clouds combined.
+            if (inflag .eq. 0) then
+! Cloud optical depth already defined in taucmc, return to main program
+               return
+
+            elseif(inflag .eq. 1) then 
+                stop 'INFLAG = 1 OPTION NOT AVAILABLE WITH MCICA'
+!               cwp = ciwpmc(ig,lay) + clwpmc(ig,lay)
+!               taucmc(ig,lay) = abscld1 * cwp
+
+! Separate treatement of ice clouds and water clouds.
+            elseif(inflag .eq. 2) then
+               radice = reicmc(lay)
+
+! Calculation of absorption coefficients due to ice clouds.
+               if (ciwpmc(ig,lay) .eq. 0.0_rb) then
+                  abscoice(ig) = 0.0_rb
+
+               elseif (iceflag .eq. 0) then
+                  if (radice .lt. 10.0_rb) stop 'ICE RADIUS TOO SMALL'
+                  abscoice(ig) = absice0(1) + absice0(2)/radice
+
+               elseif (iceflag .eq. 1) then
+                  if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop &
+                      'ICE RADIUS OUT OF BOUNDS'
+                  ncbands = 5
+                  ib = icb(ngb(ig))
+                  abscoice(ig) = absice1(1,ib) + absice1(2,ib)/radice
+
+! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns
+
+               elseif (iceflag .eq. 2) then
+                  if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop 'ICE RADIUS OUT OF BOUNDS'
+                     ncbands = 16
+                     factor = (radice - 2._rb)/3._rb
+                     index = int(factor)
+                     if (index .eq. 43) index = 42
+                     fint = factor - real(index)
+                     ib = ngb(ig)
+                     abscoice(ig) = &
+                         absice2(index,ib) + fint * &
+                         (absice2(index+1,ib) - (absice2(index,ib))) 
+               
+! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns
+
+               elseif (iceflag .eq. 3) then
+                  if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) stop 'ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS'
+                     ncbands = 16
+                     factor = (radice - 2._rb)/3._rb
+                     index = int(factor)
+                     if (index .eq. 46) index = 45
+                     fint = factor - real(index)
+                     ib = ngb(ig)
+                     abscoice(ig) = &
+                         absice3(index,ib) + fint * &
+                         (absice3(index+1,ib) - (absice3(index,ib)))
+   
+               endif
+                  
+! Calculation of absorption coefficients due to water clouds.
+               if (clwpmc(ig,lay) .eq. 0.0_rb) then
+                  abscoliq(ig) = 0.0_rb
+
+               elseif (liqflag .eq. 0) then
+                   abscoliq(ig) = absliq0
+
+               elseif (liqflag .eq. 1) then
+                  radliq = relqmc(lay)
+                  if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) stop &
+                       'LIQUID EFFECTIVE RADIUS OUT OF BOUNDS'
+                  index = int(radliq - 1.5_rb)
+                  if (index .eq. 0) index = 1
+                  if (index .eq. 58) index = 57
+                  fint = radliq - 1.5_rb - real(index)
+                  ib = ngb(ig)
+                  abscoliq(ig) = &
+                        absliq1(index,ib) + fint * &
+                        (absliq1(index+1,ib) - (absliq1(index,ib)))
+               endif
+
+               taucmc(ig,lay) = ciwpmc(ig,lay) * abscoice(ig) + &
+                                clwpmc(ig,lay) * abscoliq(ig)
+
+            endif
+         endif
+         enddo
+      enddo
+
+      end subroutine cldprmc
+
+      end module rrtmg_lw_cldprmc
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_cldprop.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_cldprop.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_cldprop.f90	(revision 3477)
@@ -0,0 +1,278 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_cldprop.f90,v $
+!     author:    $Author: miacono $
+!     revision:  $Revision: 1.9 $
+!     created:   $Date: 2011/04/08 20:25:00 $
+!
+      module rrtmg_lw_cldprop
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! --------- Modules ----------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : nbndlw
+      use rrlw_cld, only: abscld1, absliq0, absliq1, &
+                          absice0, absice1, absice2, absice3
+      use rrlw_vsn, only: hvrcld, hnamcld
+
+      implicit none
+
+      contains
+
+! ------------------------------------------------------------------------------
+      subroutine cldprop(nlayers, inflag, iceflag, liqflag, cldfrac, tauc, &
+                         ciwp, clwp, rei, rel, ncbands, taucloud)
+! ------------------------------------------------------------------------------
+
+! Purpose:  Compute the cloud optical depth(s) for each cloudy layer.
+
+! ------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: inflag          ! see definitions
+      integer(kind=im), intent(in) :: iceflag         ! see definitions
+      integer(kind=im), intent(in) :: liqflag         ! see definitions
+
+      real(kind=rb), intent(in) :: cldfrac(:)         ! cloud fraction
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: ciwp(:)            ! cloud ice water path
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: clwp(:)            ! cloud liquid water path
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: rei(:)             ! cloud ice particle effective size (microns)
+                                                      !    Dimensions: (nlayers)
+                                                      ! specific definition of rei depends on setting of iceflag:
+                                                      ! iceflag = 0: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !              r_ec must be >= 10.0 microns
+                                                      ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !              r_ec range is limited to 13.0 to 130.0 microns
+                                                      ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
+                                                      !              r_k range is limited to 5.0 to 131.0 microns
+                                                      ! iceflag = 3: generalized effective size, dge, (Fu, 1996),
+                                                      !              dge range is limited to 5.0 to 140.0 microns
+                                                      !              [dge = 1.0315 * r_ec]
+      real(kind=rb), intent(in) :: rel(:)             ! cloud liquid particle effective radius (microns)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tauc(:,:)          ! cloud optical depth
+                                                      !    Dimensions: (nbndlw,nlayers)
+
+! ------- Output -------
+
+      integer(kind=im), intent(out) :: ncbands        ! number of cloud spectral bands
+      real(kind=rb), intent(out) :: taucloud(:,:)     ! cloud optical depth
+                                                      !    Dimensions: (nlayers,nbndlw)
+
+! ------- Local -------
+
+      integer(kind=im) :: lay                         ! Layer index
+      integer(kind=im) :: ib                          ! spectral band index
+      integer(kind=im) :: index 
+      integer(kind=im) :: iceind
+      integer(kind=im) :: liqind
+      integer(kind=im) :: icb(nbndlw,0:2)
+
+      real(kind=rb) :: abscoice(nbndlw)               ! ice absorption coefficients
+      real(kind=rb) :: abscoliq(nbndlw)               ! liquid absorption coefficients
+      real(kind=rb) :: cwp                            ! cloud water path
+      real(kind=rb) :: radliq                         ! cloud liquid droplet radius (microns)
+      real(kind=rb) :: radice                         ! cloud ice effective size (microns)
+      real(kind=rb) :: factor                         ! 
+      real(kind=rb) :: fint                           ! 
+      real(kind=rb) :: tauctot(nlayers)               ! band integrated cloud optical depth
+      real(kind=rb), parameter :: eps = 1.e-6_rb      ! epsilon
+      real(kind=rb), parameter :: cldmin = 1.e-20_rb  ! minimum value for cloud quantities
+
+! ------- Definitions -------
+
+!     Explanation of the method for each value of INFLAG.  Values of
+!     0 or 1 for INFLAG do not distingish being liquid and ice clouds.
+!     INFLAG = 2 does distinguish between liquid and ice clouds, and
+!     requires further user input to specify the method to be used to 
+!     compute the aborption due to each.
+!     INFLAG = 0:  For each cloudy layer, the cloud fraction and (gray)
+!                  optical depth are input.  
+!     INFLAG = 1:  For each cloudy layer, the cloud fraction and cloud
+!                  water path (g/m2) are input.  The (gray) cloud optical 
+!                  depth is computed as in CCM2.
+!     INFLAG = 2:  For each cloudy layer, the cloud fraction, cloud 
+!                  water path (g/m2), and cloud ice fraction are input.
+!       ICEFLAG = 0:  The ice effective radius (microns) is input and the
+!                     optical depths due to ice clouds are computed as in CCM3.
+!       ICEFLAG = 1:  The ice effective radius (microns) is input and the
+!                     optical depths due to ice clouds are computed as in 
+!                     Ebert and Curry, JGR, 97, 3831-3836 (1992).  The 
+!                     spectral regions in this work have been matched with
+!                     the spectral bands in RRTM to as great an extent 
+!                     as possible:  
+!                     E&C 1      IB = 5      RRTM bands 9-16
+!                     E&C 2      IB = 4      RRTM bands 6-8
+!                     E&C 3      IB = 3      RRTM bands 3-5
+!                     E&C 4      IB = 2      RRTM band 2
+!                     E&C 5      IB = 1      RRTM band 1
+!       ICEFLAG = 2:  The ice effective radius (microns) is input and the
+!                     optical properties due to ice clouds are computed from
+!                     the optical properties stored in the RT code,
+!                     STREAMER v3.0 (Reference: Key. J., Streamer 
+!                     User's Guide, Cooperative Institute for
+!                     Meteorological Satellite Studies, 2001, 96 pp.).
+!                     Valid range of values for re are between 5.0 and
+!                     131.0 micron.
+!       ICEFLAG = 3: The ice generalized effective size (dge) is input
+!                    and the optical properties, are calculated as in
+!                    Q. Fu, J. Climate, (1998). Q. Fu provided high resolution
+!                    tables which were appropriately averaged for the
+!                    bands in RRTM_LW.  Linear interpolation is used to
+!                    get the coefficients from the stored tables.
+!                    Valid range of values for dge are between 5.0 and
+!                    140.0 micron.
+!       LIQFLAG = 0:  The optical depths due to water clouds are computed as
+!                     in CCM3.
+!       LIQFLAG = 1:  The water droplet effective radius (microns) is input 
+!                     and the optical depths due to water clouds are computed 
+!                     as in Hu and Stamnes, J., Clim., 6, 728-742, (1993).
+!                     The values for absorption coefficients appropriate for
+!                     the spectral bands in RRTM have been obtained for a 
+!                     range of effective radii by an averaging procedure 
+!                     based on the work of J. Pinto (private communication).
+!                     Linear interpolation is used to get the absorption 
+!                     coefficients for the input effective radius.
+
+      data icb /1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, &
+                1,2,3,3,3,4,4,4,5, 5, 5, 5, 5, 5, 5, 5, &
+                1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/
+
+      hvrcld = '$Revision: 1.9 $'
+
+      ncbands = 1
+      tauctot(:) = 0._rb
+
+      do lay = 1, nlayers
+         do ib = 1, nbndlw
+            taucloud(lay,ib) = 0.0_rb
+            tauctot(lay) = tauctot(lay) + tauc(ib,lay)
+         enddo
+      enddo
+
+! Main layer loop
+      do lay = 1, nlayers
+         cwp = ciwp(lay) + clwp(lay)
+         if (cldfrac(lay) .ge. cldmin .and. &
+            (cwp .ge. cldmin .or. tauctot(lay) .ge. cldmin)) then
+
+! Ice clouds and water clouds combined.
+            if (inflag .eq. 0) then
+               ncbands = 16
+               do ib = 1, ncbands
+                  taucloud(lay,ib) = tauc(ib,lay)
+               end do
+
+            elseif (inflag .eq. 1) then
+               ncbands = 16
+               do ib = 1, ncbands
+                  taucloud(lay,ib) = abscld1 * cwp
+               end do
+
+! Separate treatement of ice clouds and water clouds.
+            elseif (inflag .eq. 2) then
+               radice = rei(lay)
+
+! Calculation of absorption coefficients due to ice clouds.
+               if (ciwp(lay) .eq. 0.0_rb) then
+                  abscoice(1) = 0.0_rb
+                  iceind = 0
+
+               elseif (iceflag .eq. 0) then
+                  if (radice .lt. 10.0_rb) stop 'ICE RADIUS TOO SMALL'
+                  abscoice(1) = absice0(1) + absice0(2)/radice
+                  iceind = 0
+
+               elseif (iceflag .eq. 1) then
+                  if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop &
+                       'ICE RADIUS OUT OF BOUNDS'
+                  ncbands = 5
+                  do ib = 1, ncbands
+                     abscoice(ib) = absice1(1,ib) + absice1(2,ib)/radice
+                  enddo
+                  iceind = 1
+
+! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns
+
+               elseif (iceflag .eq. 2) then
+                  if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop 'ICE RADIUS OUT OF BOUNDS'
+                     ncbands = 16
+                     factor = (radice - 2._rb)/3._rb
+                     index = int(factor)
+                     if (index .eq. 43) index = 42
+                     fint = factor - real(index)
+                     do ib = 1, ncbands
+                        abscoice(ib) = &
+                            absice2(index,ib) + fint * &
+                            (absice2(index+1,ib) - (absice2(index,ib)))
+                     enddo
+                     iceind = 2
+
+! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns
+
+               elseif (iceflag .eq. 3) then
+                  if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) stop 'ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS'
+                     ncbands = 16
+                     factor = (radice - 2._rb)/3._rb
+                     index = int(factor)
+                     if (index .eq. 46) index = 45
+                     fint = factor - real(index)
+                     do ib = 1, ncbands
+                        abscoice(ib) = &
+                          absice3(index,ib) + fint * &
+                          (absice3(index+1,ib) - (absice3(index,ib)))
+                     enddo
+                     iceind = 2
+   
+               endif
+                  
+! Calculation of absorption coefficients due to water clouds.
+               if (clwp(lay) .eq. 0.0_rb) then
+                  abscoliq(1) = 0.0_rb
+                  liqind = 0
+                  if (iceind .eq. 1) iceind = 2
+
+               elseif (liqflag .eq. 0) then
+                  abscoliq(1) = absliq0
+                  liqind = 0
+                  if (iceind .eq. 1) iceind = 2
+
+               elseif (liqflag .eq. 1) then
+                  radliq = rel(lay)
+                  if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) stop &
+                       'LIQUID EFFECTIVE RADIUS OUT OF BOUNDS'
+                  index = int(radliq - 1.5_rb)
+                  if (index .eq. 0) index = 1
+                  if (index .eq. 58) index = 57
+                  fint = radliq - 1.5_rb - real(index)
+                  ncbands = 16
+                  do ib = 1, ncbands
+                     abscoliq(ib) = &
+                         absliq1(index,ib) + fint * &
+                         (absliq1(index+1,ib) - (absliq1(index,ib)))
+                  enddo
+                  liqind = 2
+               endif
+
+               do ib = 1, ncbands
+                  taucloud(lay,ib) = ciwp(lay) * abscoice(icb(ib,iceind)) + &
+                                     clwp(lay) * abscoliq(icb(ib,liqind))
+               enddo
+            endif
+         endif
+      enddo
+
+      end subroutine cldprop
+
+      end module rrtmg_lw_cldprop
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_init.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_init.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_init.f90	(revision 3477)
@@ -0,0 +1,2659 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_init.f90,v $
+!     author:    $Author: miacono $
+!     revision:  $Revision: 1.6 $
+!     created:   $Date: 2011/04/08 20:25:01 $
+!
+      module rrtmg_lw_init
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+      use parkind, only : im => kind_im, rb => kind_rb
+      use rrlw_wvn
+      use rrtmg_lw_setcoef, only: lwatmref, lwavplank, lwavplankderiv
+
+      implicit none
+
+      contains
+
+! **************************************************************************
+      subroutine rrtmg_lw_ini(cpdair)
+! **************************************************************************
+!
+!  Original version:       Michael J. Iacono; July, 1998
+!  First revision for GCMs:   September, 1998
+!  Second revision for RRTM_V3.0:  September, 2002
+!
+!  This subroutine performs calculations necessary for the initialization
+!  of the longwave model.  Lookup tables are computed for use in the LW
+!  radiative transfer, and input absorption coefficient data for each
+!  spectral band are reduced from 256 g-point intervals to 140.
+! **************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw
+      use rrlw_tbl, only: ntbl, tblint, pade, bpade, tau_tbl, exp_tbl, tfn_tbl
+      use rrlw_vsn, only: hvrini, hnamini
+
+      real(kind=rb), intent(in) :: cpdair     ! Specific heat capacity of dry air
+                                              ! at constant pressure at 273 K
+                                              ! (J kg-1 K-1)
+
+! ------- Local -------
+
+      integer(kind=im) :: itr, ibnd, igc, ig, ind, ipr 
+      integer(kind=im) :: igcsm, iprsm
+
+      real(kind=rb) :: wtsum, wtsm(mg)        !
+      real(kind=rb) :: tfn                    !
+
+      real(kind=rb), parameter :: expeps = 1.e-20_rb   ! Smallest value for exponential table
+
+! ------- Definitions -------
+!     Arrays for 10000-point look-up tables:
+!     TAU_TBL Clear-sky optical depth (used in cloudy radiative transfer)
+!     EXP_TBL Exponential lookup table for ransmittance
+!     TFN_TBL Tau transition function; i.e. the transition of the Planck
+!             function from that for the mean layer temperature to that for
+!             the layer boundary temperature as a function of optical depth.
+!             The "linear in tau" method is used to make the table.
+!     PADE    Pade approximation constant (= 0.278)
+!     BPADE   Inverse of the Pade approximation constant
+!
+
+      hvrini = '$Revision: 1.6 $'
+
+! Initialize model data
+      call lwdatinit(cpdair)
+      call lwcmbdat               ! g-point interval reduction data
+      call lwcldpr                ! cloud optical properties
+      call lwatmref               ! reference MLS profile
+      call lwavplank              ! Planck function 
+      call lwavplankderiv         ! Planck function derivative wrt temp
+      call lw_kgb01               ! molecular absorption coefficients
+      call lw_kgb02
+      call lw_kgb03
+      call lw_kgb04
+      call lw_kgb05
+      call lw_kgb06
+      call lw_kgb07
+      call lw_kgb08
+      call lw_kgb09
+      call lw_kgb10
+      call lw_kgb11
+      call lw_kgb12
+      call lw_kgb13
+      call lw_kgb14
+      call lw_kgb15
+      call lw_kgb16
+
+! Compute lookup tables for transmittance, tau transition function,
+! and clear sky tau (for the cloudy sky radiative transfer).  Tau is 
+! computed as a function of the tau transition function, transmittance 
+! is calculated as a function of tau, and the tau transition function 
+! is calculated using the linear in tau formulation at values of tau 
+! above 0.01.  TF is approximated as tau/6 for tau < 0.01.  All tables 
+! are computed at intervals of 0.001.  The inverse of the constant used
+! in the Pade approximation to the tau transition function is set to b.
+
+      tau_tbl(0) = 0.0_rb
+      tau_tbl(ntbl) = 1.e10_rb
+      exp_tbl(0) = 1.0_rb
+      exp_tbl(ntbl) = expeps
+      tfn_tbl(0) = 0.0_rb
+      tfn_tbl(ntbl) = 1.0_rb
+      bpade = 1.0_rb / pade
+      do itr = 1, ntbl-1
+         tfn = real(itr) / real(ntbl)
+         tau_tbl(itr) = bpade * tfn / (1._rb - tfn)
+         exp_tbl(itr) = exp(-tau_tbl(itr))
+         if (exp_tbl(itr) .le. expeps) exp_tbl(itr) = expeps
+         if (tau_tbl(itr) .lt. 0.06_rb) then
+            tfn_tbl(itr) = tau_tbl(itr)/6._rb
+         else
+            tfn_tbl(itr) = 1._rb-2._rb*((1._rb/tau_tbl(itr))-(exp_tbl(itr)/(1.-exp_tbl(itr))))
+         endif
+      enddo
+
+! Perform g-point reduction from 16 per band (256 total points) to
+! a band dependant number (140 total points) for all absorption
+! coefficient input data and Planck fraction input data.
+! Compute relative weighting for new g-point combinations.
+
+      igcsm = 0
+      do ibnd = 1,nbndlw
+         iprsm = 0
+         if (ngc(ibnd).lt.mg) then
+            do igc = 1,ngc(ibnd) 
+               igcsm = igcsm + 1
+               wtsum = 0._rb
+               do ipr = 1, ngn(igcsm)
+                  iprsm = iprsm + 1
+                  wtsum = wtsum + wt(iprsm)
+               enddo
+               wtsm(igc) = wtsum
+            enddo
+            do ig = 1, ng(ibnd)
+               ind = (ibnd-1)*mg + ig
+               rwgt(ind) = wt(ig)/wtsm(ngm(ind))
+            enddo
+         else
+            do ig = 1, ng(ibnd)
+               igcsm = igcsm + 1
+               ind = (ibnd-1)*mg + ig
+               rwgt(ind) = 1.0_rb
+            enddo
+         endif
+      enddo
+
+! Reduce g-points for absorption coefficient data in each LW spectral band.
+
+      call cmbgb1
+      call cmbgb2
+      call cmbgb3
+      call cmbgb4
+      call cmbgb5
+      call cmbgb6
+      call cmbgb7
+      call cmbgb8
+      call cmbgb9
+      call cmbgb10
+      call cmbgb11
+      call cmbgb12
+      call cmbgb13
+      call cmbgb14
+      call cmbgb15
+      call cmbgb16
+
+      end subroutine rrtmg_lw_ini
+
+!***************************************************************************
+      subroutine lwdatinit(cpdair)
+!***************************************************************************
+
+! --------- Modules ----------
+
+      use parrrtm, only : maxxsec, maxinpx
+      use rrlw_con, only: heatfac, grav, planck, boltz, &
+                          clight, avogad, alosmt, gascon, radcn1, radcn2, &
+                          sbcnst, secdy 
+      use rrlw_vsn
+
+      save 
+ 
+      real(kind=rb), intent(in) :: cpdair      ! Specific heat capacity of dry air
+                                               ! at constant pressure at 273 K
+                                               ! (J kg-1 K-1)
+
+! Longwave spectral band limits (wavenumbers)
+      wavenum1(:) = (/ 10._rb, 350._rb, 500._rb, 630._rb, 700._rb, 820._rb, &
+                      980._rb,1080._rb,1180._rb,1390._rb,1480._rb,1800._rb, &
+                     2080._rb,2250._rb,2380._rb,2600._rb/)
+      wavenum2(:) = (/350._rb, 500._rb, 630._rb, 700._rb, 820._rb, 980._rb, &
+                     1080._rb,1180._rb,1390._rb,1480._rb,1800._rb,2080._rb, &
+                     2250._rb,2380._rb,2600._rb,3250._rb/)
+      delwave(:) =  (/340._rb, 150._rb, 130._rb,  70._rb, 120._rb, 160._rb, &
+                      100._rb, 100._rb, 210._rb,  90._rb, 320._rb, 280._rb, &
+                      170._rb, 130._rb, 220._rb, 650._rb/)
+
+! Spectral band information
+      ng(:) = (/16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16/)
+      nspa(:) = (/1,1,9,9,9,1,9,1,9,1,1,9,9,1,9,9/)
+      nspb(:) = (/1,1,5,5,5,0,1,1,1,1,1,0,0,1,0,0/)
+
+!     nxmol     - number of cross-sections input by user
+!     ixindx(i) - index of cross-section molecule corresponding to Ith
+!                 cross-section specified by user
+!                 = 0 -- not allowed in rrtm
+!                 = 1 -- ccl4
+!                 = 2 -- cfc11
+!                 = 3 -- cfc12
+!                 = 4 -- cfc22
+      nxmol = 4
+      ixindx(1) = 1
+      ixindx(2) = 2
+      ixindx(3) = 3
+      ixindx(4) = 4
+      ixindx(5:maxinpx) = 0
+
+! Fundamental physical constants from NIST 2002
+
+      grav = 9.8066_rb                        ! Acceleration of gravity
+                                              ! (m s-2)
+      planck = 6.62606876e-27_rb              ! Planck constant
+                                              ! (ergs s; g cm2 s-1)
+      boltz = 1.3806503e-16_rb                ! Boltzmann constant
+                                              ! (ergs K-1; g cm2 s-2 K-1)
+      clight = 2.99792458e+10_rb              ! Speed of light in a vacuum  
+                                              ! (cm s-1)
+      avogad = 6.02214199e+23_rb              ! Avogadro constant
+                                              ! (mol-1)
+      alosmt = 2.6867775e+19_rb               ! Loschmidt constant
+                                              ! (cm-3)
+      gascon = 8.31447200e+07_rb              ! Molar gas constant
+                                              ! (ergs mol-1 K-1)
+      radcn1 = 1.191042722e-12_rb             ! First radiation constant
+                                              ! (W cm2 sr-1)
+      radcn2 = 1.4387752_rb                   ! Second radiation constant
+                                              ! (cm K)
+      sbcnst = 5.670400e-04_rb                ! Stefan-Boltzmann constant
+                                              ! (W cm-2 K-4)
+      secdy = 8.6400e4_rb                     ! Number of seconds per day
+                                              ! (s d-1)
+!
+!     units are generally cgs
+!
+!     The first and second radiation constants are taken from NIST.
+!     They were previously obtained from the relations:
+!          radcn1 = 2.*planck*clight*clight*1.e-07
+!          radcn2 = planck*clight/boltz
+
+!     Heatfac is the factor by which delta-flux / delta-pressure is
+!     multiplied, with flux in W/m-2 and pressure in mbar, to get 
+!     the heating rate in units of degrees/day.  It is equal to:
+!     Original value:
+!           (g)x(#sec/day)x(1e-5)/(specific heat of air at const. p)
+!           Here, cpdair (1.004) is in units of J g-1 K-1, and the 
+!           constant (1.e-5) converts mb to Pa and g-1 to kg-1.
+!        =  (9.8066)(86400)(1e-5)/(1.004)
+!      heatfac = 8.4391_rb
+!
+!     Modified value for consistency with CAM3:
+!           (g)x(#sec/day)x(1e-5)/(specific heat of air at const. p)
+!           Here, cpdair (1.00464) is in units of J g-1 K-1, and the
+!           constant (1.e-5) converts mb to Pa and g-1 to kg-1.
+!        =  (9.80616)(86400)(1e-5)/(1.00464)
+!      heatfac = 8.43339130434_rb
+!
+!     Calculated value:
+!        (grav) x (#sec/day) / (specific heat of dry air at const. p x 1.e2)
+!           Here, cpdair is in units of J kg-1 K-1, and the constant (1.e2) 
+!           converts mb to Pa when heatfac is multiplied by W m-2 mb-1. 
+      heatfac = grav * secdy / (cpdair * 1.e2_rb)
+
+      end subroutine lwdatinit
+
+!***************************************************************************
+      subroutine lwcmbdat
+!***************************************************************************
+
+      save
+ 
+! ------- Definitions -------
+!     Arrays for the g-point reduction from 256 to 140 for the 16 LW bands:
+!     This mapping from 256 to 140 points has been carefully selected to 
+!     minimize the effect on the resulting fluxes and cooling rates, and
+!     caution should be used if the mapping is modified.  The full 256
+!     g-point set can be restored with ngptlw=256, ngc=16*16, ngn=256*1., etc.
+!     ngptlw  The total number of new g-points
+!     ngc     The number of new g-points in each band
+!     ngs     The cumulative sum of new g-points for each band
+!     ngm     The index of each new g-point relative to the original
+!             16 g-points for each band.  
+!     ngn     The number of original g-points that are combined to make
+!             each new g-point in each band.
+!     ngb     The band index for each new g-point.
+!     wt      RRTM weights for 16 g-points.
+
+! ------- Data statements -------
+      ngc(:) = (/10,12,16,14,16,8,12,8,12,6,8,8,4,2,2,2/)
+      ngs(:) = (/10,22,38,52,68,76,88,96,108,114,122,130,134,136,138,140/)
+      ngm(:) = (/1,2,3,3,4,4,5,5,6,6,7,7,8,8,9,10, &          ! band 1
+                 1,2,3,4,5,6,7,8,9,9,10,10,11,11,12,12, &     ! band 2
+                 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 3
+                 1,2,3,4,5,6,7,8,9,10,11,12,13,14,14,14, &    ! band 4
+                 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 5
+                 1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8, &           ! band 6
+                 1,1,2,2,3,4,5,6,7,8,9,10,11,11,12,12, &      ! band 7
+                 1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8, &           ! band 8
+                 1,2,3,4,5,6,7,8,9,9,10,10,11,11,12,12, &     ! band 9
+                 1,1,2,2,3,3,4,4,5,5,5,5,6,6,6,6, &           ! band 10
+                 1,2,3,3,4,4,5,5,6,6,7,7,7,8,8,8, &           ! band 11
+                 1,2,3,4,5,5,6,6,7,7,7,7,8,8,8,8, &           ! band 12
+                 1,1,1,2,2,2,3,3,3,3,4,4,4,4,4,4, &           ! band 13
+                 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, &           ! band 14
+                 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, &           ! band 15
+                 1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2/)            ! band 16
+      ngn(:) = (/1,1,2,2,2,2,2,2,1,1, &                       ! band 1
+                 1,1,1,1,1,1,1,1,2,2,2,2, &                   ! band 2
+                 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 3
+                 1,1,1,1,1,1,1,1,1,1,1,1,1,3, &               ! band 4
+                 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 5
+                 2,2,2,2,2,2,2,2, &                           ! band 6
+                 2,2,1,1,1,1,1,1,1,1,2,2, &                   ! band 7
+                 2,2,2,2,2,2,2,2, &                           ! band 8
+                 1,1,1,1,1,1,1,1,2,2,2,2, &                   ! band 9
+                 2,2,2,2,4,4, &                               ! band 10
+                 1,1,2,2,2,2,3,3, &                           ! band 11
+                 1,1,1,1,2,2,4,4, &                           ! band 12
+                 3,3,4,6, &                                   ! band 13
+                 8,8, &                                       ! band 14
+                 8,8, &                                       ! band 15
+                 4,12/)                                       ! band 16
+      ngb(:) = (/1,1,1,1,1,1,1,1,1,1, &                       ! band 1
+                 2,2,2,2,2,2,2,2,2,2,2,2, &                   ! band 2
+                 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, &           ! band 3
+                 4,4,4,4,4,4,4,4,4,4,4,4,4,4, &               ! band 4
+                 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, &           ! band 5
+                 6,6,6,6,6,6,6,6, &                           ! band 6
+                 7,7,7,7,7,7,7,7,7,7,7,7, &                   ! band 7
+                 8,8,8,8,8,8,8,8, &                           ! band 8
+                 9,9,9,9,9,9,9,9,9,9,9,9, &                   ! band 9
+                 10,10,10,10,10,10, &                         ! band 10
+                 11,11,11,11,11,11,11,11, &                   ! band 11
+                 12,12,12,12,12,12,12,12, &                   ! band 12
+                 13,13,13,13, &                               ! band 13
+                 14,14, &                                     ! band 14
+                 15,15, &                                     ! band 15
+                 16,16/)                                      ! band 16
+      wt(:) = (/ 0.1527534276_rb, 0.1491729617_rb, 0.1420961469_rb, &
+                 0.1316886544_rb, 0.1181945205_rb, 0.1019300893_rb, &
+                 0.0832767040_rb, 0.0626720116_rb, 0.0424925000_rb, &
+                 0.0046269894_rb, 0.0038279891_rb, 0.0030260086_rb, &
+                 0.0022199750_rb, 0.0014140010_rb, 0.0005330000_rb, &
+                 0.0000750000_rb/)
+
+      end subroutine lwcmbdat
+
+!***************************************************************************
+      subroutine cmbgb1
+!***************************************************************************
+!
+!  Original version:    MJIacono; July 1998
+!  Revision for GCMs:   MJIacono; September 1998
+!  Revision for RRTMG:  MJIacono, September 2002
+!  Revision for F90 reformatting:  MJIacono, June 2006
+!
+!  The subroutines CMBGB1->CMBGB16 input the absorption coefficient
+!  data for each band, which are defined for 16 g-points and 16 spectral
+!  bands. The data are combined with appropriate weighting following the
+!  g-point mapping arrays specified in RRTMINIT.  Plank fraction data
+!  in arrays FRACREFA and FRACREFB are combined without weighting.  All
+!  g-point reduced data are put into new arrays for use in RRTM.
+!
+!  band 1:  10-350 cm-1 (low key - h2o; low minor - n2)
+!                       (high key - h2o; high minor - n2)
+!  note: previous versions of rrtm band 1: 
+!        10-250 cm-1 (low - h2o; high - h2o)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng1
+      use rrlw_kg01, only: fracrefao, fracrefbo, kao, kbo, kao_mn2, kbo_mn2, &
+                           selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, ka_mn2, kb_mn2, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumk1, sumk2, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(1)
+               sumk = 0.
+               do ipr = 1, ngn(igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(1)
+               sumk = 0.
+               do ipr = 1, ngn(igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(1)
+            sumk = 0.
+            do ipr = 1, ngn(igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(1)
+            sumk = 0.
+            do ipr = 1, ngn(igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(1)
+            sumk1 = 0.
+            sumk2 = 0.
+            do ipr = 1, ngn(igc)
+               iprsm = iprsm + 1
+               sumk1 = sumk1 + kao_mn2(jt,iprsm)*rwgt(iprsm)
+               sumk2 = sumk2 + kbo_mn2(jt,iprsm)*rwgt(iprsm)
+            enddo
+            ka_mn2(jt,igc) = sumk1
+            kb_mn2(jt,igc) = sumk2
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(1)
+         sumf1 = 0.
+         sumf2 = 0.
+         do ipr = 1, ngn(igc)
+            iprsm = iprsm + 1
+            sumf1= sumf1+ fracrefao(iprsm)
+            sumf2= sumf2+ fracrefbo(iprsm)
+         enddo
+         fracrefa(igc) = sumf1
+         fracrefb(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb1
+
+!***************************************************************************
+      subroutine cmbgb2
+!***************************************************************************
+!
+!     band 2:  350-500 cm-1 (low key - h2o; high key - h2o)
+!
+!     note: previous version of rrtm band 2: 
+!           250 - 500 cm-1 (low - h2o; high - h2o)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng2
+      use rrlw_kg02, only: fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(2)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(1)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+16)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(2)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(1)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+16)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(2)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(1)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+16)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(2)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(1)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+16)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(2)
+         sumf1 = 0.
+         sumf2 = 0.
+         do ipr = 1, ngn(ngs(1)+igc)
+            iprsm = iprsm + 1
+            sumf1= sumf1+ fracrefao(iprsm)
+            sumf2= sumf2+ fracrefbo(iprsm)
+         enddo
+         fracrefa(igc) = sumf1
+         fracrefb(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb2
+
+!***************************************************************************
+      subroutine cmbgb3
+!***************************************************************************
+!
+!     band 3:  500-630 cm-1 (low key - h2o,co2; low minor - n2o)
+!                           (high key - h2o,co2; high minor - n2o)
+!
+! old band 3:  500-630 cm-1 (low - h2o,co2; high - h2o,co2)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng3
+      use rrlw_kg03, only: fracrefao, fracrefbo, kao, kbo, kao_mn2o, kbo_mn2o, &
+                           selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, ka_mn2o, kb_mn2o, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(3)
+                 sumk = 0.
+                  do ipr = 1, ngn(ngs(2)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+32)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+      do jn = 1,5
+         do jt = 1,5
+            do jp = 13,59
+               iprsm = 0
+               do igc = 1,ngc(3)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(2)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kbo(jn,jt,jp,iprsm)*rwgt(iprsm+32)
+                  enddo
+                  kb(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,9
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(3)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(2)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao_mn2o(jn,jt,iprsm)*rwgt(iprsm+32)
+               enddo
+               ka_mn2o(jn,jt,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,5
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(3)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(2)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo_mn2o(jn,jt,iprsm)*rwgt(iprsm+32)
+               enddo
+               kb_mn2o(jn,jt,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+32)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+32)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      do jp = 1,5
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefbo(iprsm,jp)
+            enddo
+            fracrefb(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb3
+
+!***************************************************************************
+      subroutine cmbgb4
+!***************************************************************************
+!
+!     band 4:  630-700 cm-1 (low key - h2o,co2; high key - o3,co2)
+!
+! old band 4:  630-700 cm-1 (low - h2o,co2; high - o3,co2)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng4
+      use rrlw_kg04, only: fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(4)
+                 sumk = 0.
+                  do ipr = 1, ngn(ngs(3)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+48)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+      do jn = 1,5
+         do jt = 1,5
+            do jp = 13,59
+               iprsm = 0
+               do igc = 1,ngc(4)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(3)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kbo(jn,jt,jp,iprsm)*rwgt(iprsm+48)
+                  enddo
+                  kb(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+48)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+48)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      do jp = 1,5
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefbo(iprsm,jp)
+            enddo
+            fracrefb(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb4
+
+!***************************************************************************
+      subroutine cmbgb5
+!***************************************************************************
+!
+!     band 5:  700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4)
+!                           (high key - o3,co2)
+!
+! old band 5:  700-820 cm-1 (low - h2o,co2; high - o3,co2)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng5
+      use rrlw_kg05, only: fracrefao, fracrefbo, kao, kbo, kao_mo3, ccl4o, &
+                           selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, ka_mo3, ccl4, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(5)
+                 sumk = 0.
+                  do ipr = 1, ngn(ngs(4)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+64)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+      do jn = 1,5
+         do jt = 1,5
+            do jp = 13,59
+               iprsm = 0
+               do igc = 1,ngc(5)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(4)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kbo(jn,jt,jp,iprsm)*rwgt(iprsm+64)
+                  enddo
+                  kb(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,9
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(5)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(4)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao_mo3(jn,jt,iprsm)*rwgt(iprsm+64)
+               enddo
+               ka_mo3(jn,jt,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(5)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(4)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+64)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(5)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(4)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+64)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(5)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(4)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      do jp = 1,5
+         iprsm = 0
+         do igc = 1,ngc(5)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(4)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefbo(iprsm,jp)
+            enddo
+            fracrefb(igc,jp) = sumf
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(5)
+         sumk = 0.
+         do ipr = 1, ngn(ngs(4)+igc)
+            iprsm = iprsm + 1
+            sumk = sumk + ccl4o(iprsm)*rwgt(iprsm+64)
+         enddo
+         ccl4(igc) = sumk
+      enddo
+
+      end subroutine cmbgb5
+
+!***************************************************************************
+      subroutine cmbgb6
+!***************************************************************************
+!
+!     band 6:  820-980 cm-1 (low key - h2o; low minor - co2)
+!                           (high key - nothing; high minor - cfc11, cfc12)
+!
+! old band 6:  820-980 cm-1 (low - h2o; high - nothing)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng6
+      use rrlw_kg06, only: fracrefao, kao, kao_mco2, cfc11adjo, cfc12o, &
+                           selfrefo, forrefo, &
+                           fracrefa, absa, ka, ka_mco2, cfc11adj, cfc12, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf, sumk1, sumk2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(6)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(5)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+80)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(6)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(5)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + kao_mco2(jt,iprsm)*rwgt(iprsm+80)
+            enddo
+            ka_mco2(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(6)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(5)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+80)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(6)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(5)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+80)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(6)
+         sumf = 0.
+         sumk1= 0.
+         sumk2= 0.
+         do ipr = 1, ngn(ngs(5)+igc)
+            iprsm = iprsm + 1
+            sumf = sumf + fracrefao(iprsm)
+            sumk1= sumk1+ cfc11adjo(iprsm)*rwgt(iprsm+80)
+            sumk2= sumk2+ cfc12o(iprsm)*rwgt(iprsm+80)
+         enddo
+         fracrefa(igc) = sumf
+         cfc11adj(igc) = sumk1
+         cfc12(igc) = sumk2
+      enddo
+
+      end subroutine cmbgb6
+
+!***************************************************************************
+      subroutine cmbgb7
+!***************************************************************************
+!
+!     band 7:  980-1080 cm-1 (low key - h2o,o3; low minor - co2)
+!                            (high key - o3; high minor - co2)
+!
+! old band 7:  980-1080 cm-1 (low - h2o,o3; high - o3)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng7
+      use rrlw_kg07, only: fracrefao, fracrefbo, kao, kbo, kao_mco2, kbo_mco2, &
+                           selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, ka_mco2, kb_mco2, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(7)
+                 sumk = 0.
+                  do ipr = 1, ngn(ngs(6)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+96)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(7)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(6)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+96)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,9
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(7)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(6)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao_mco2(jn,jt,iprsm)*rwgt(iprsm+96)
+               enddo
+               ka_mco2(jn,jt,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + kbo_mco2(jt,iprsm)*rwgt(iprsm+96)
+            enddo
+            kb_mco2(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+96)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+96)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(7)
+         sumf = 0.
+         do ipr = 1, ngn(ngs(6)+igc)
+            iprsm = iprsm + 1
+            sumf = sumf + fracrefbo(iprsm)
+         enddo
+         fracrefb(igc) = sumf
+      enddo
+
+      end subroutine cmbgb7
+
+!***************************************************************************
+      subroutine cmbgb8
+!***************************************************************************
+!
+!     band 8:  1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o)
+!                             (high key - o3; high minor - co2, n2o)
+!
+! old band 8:  1080-1180 cm-1 (low (i.e.>~300mb) - h2o; high - o3)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng8
+      use rrlw_kg08, only: fracrefao, fracrefbo, kao, kao_mco2, kao_mn2o, &
+                           kao_mo3, kbo, kbo_mco2, kbo_mn2o, selfrefo, forrefo, &
+                           cfc12o, cfc22adjo, &
+                           fracrefa, fracrefb, absa, ka, ka_mco2, ka_mn2o, &
+                           ka_mo3, absb, kb, kb_mco2, kb_mn2o, selfref, forref, &
+                           cfc12, cfc22adj
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumk1, sumk2, sumk3, sumk4, sumk5, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(8)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(7)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+112)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(8)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(7)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+112)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(8)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(7)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+112)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(8)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(7)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+112)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(8)
+            sumk1 = 0.
+            sumk2 = 0.
+            sumk3 = 0.
+            sumk4 = 0.
+            sumk5 = 0.
+            do ipr = 1, ngn(ngs(7)+igc)
+               iprsm = iprsm + 1
+               sumk1 = sumk1 + kao_mco2(jt,iprsm)*rwgt(iprsm+112)
+               sumk2 = sumk2 + kbo_mco2(jt,iprsm)*rwgt(iprsm+112)
+               sumk3 = sumk3 + kao_mo3(jt,iprsm)*rwgt(iprsm+112)
+               sumk4 = sumk4 + kao_mn2o(jt,iprsm)*rwgt(iprsm+112)
+               sumk5 = sumk5 + kbo_mn2o(jt,iprsm)*rwgt(iprsm+112)
+            enddo
+            ka_mco2(jt,igc) = sumk1
+            kb_mco2(jt,igc) = sumk2
+            ka_mo3(jt,igc) = sumk3
+            ka_mn2o(jt,igc) = sumk4
+            kb_mn2o(jt,igc) = sumk5
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(8)
+         sumf1= 0.
+         sumf2= 0.
+         sumk1= 0.
+         sumk2= 0.
+         do ipr = 1, ngn(ngs(7)+igc)
+            iprsm = iprsm + 1
+            sumf1= sumf1+ fracrefao(iprsm)
+            sumf2= sumf2+ fracrefbo(iprsm)
+            sumk1= sumk1+ cfc12o(iprsm)*rwgt(iprsm+112)
+            sumk2= sumk2+ cfc22adjo(iprsm)*rwgt(iprsm+112)
+         enddo
+         fracrefa(igc) = sumf1
+         fracrefb(igc) = sumf2
+         cfc12(igc) = sumk1
+         cfc22adj(igc) = sumk2
+      enddo
+
+      end subroutine cmbgb8
+
+!***************************************************************************
+      subroutine cmbgb9
+!***************************************************************************
+!
+!     band 9:  1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o)
+!                             (high key - ch4; high minor - n2o)!
+
+! old band 9:  1180-1390 cm-1 (low - h2o,ch4; high - ch4)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng9
+      use rrlw_kg09, only: fracrefao, fracrefbo, kao, kao_mn2o, &
+                           kbo, kbo_mn2o, selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, ka_mn2o, &
+                           absb, kb, kb_mn2o, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(9)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(8)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+128)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(9)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(8)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+128)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,9
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(9)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(8)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao_mn2o(jn,jt,iprsm)*rwgt(iprsm+128)
+               enddo
+               ka_mn2o(jn,jt,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + kbo_mn2o(jt,iprsm)*rwgt(iprsm+128)
+            enddo
+            kb_mn2o(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+128)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+128)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(9)
+         sumf = 0.
+         do ipr = 1, ngn(ngs(8)+igc)
+            iprsm = iprsm + 1
+            sumf = sumf + fracrefbo(iprsm)
+         enddo
+         fracrefb(igc) = sumf
+      enddo
+
+      end subroutine cmbgb9
+
+!***************************************************************************
+      subroutine cmbgb10
+!***************************************************************************
+!
+!     band 10:  1390-1480 cm-1 (low key - h2o; high key - h2o)
+!
+! old band 10:  1390-1480 cm-1 (low - h2o; high - h2o)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng10
+      use rrlw_kg10, only: fracrefao, fracrefbo, kao, kbo, &
+                           selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(10)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(9)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+144)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(10)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(9)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+144)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(10)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(9)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+144)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(10)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(9)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+144)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(10)
+         sumf1= 0.
+         sumf2= 0.
+         do ipr = 1, ngn(ngs(9)+igc)
+            iprsm = iprsm + 1
+            sumf1= sumf1+ fracrefao(iprsm)
+            sumf2= sumf2+ fracrefbo(iprsm)
+         enddo
+         fracrefa(igc) = sumf1
+         fracrefb(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb10
+
+!***************************************************************************
+      subroutine cmbgb11
+!***************************************************************************
+!
+!     band 11:  1480-1800 cm-1 (low - h2o; low minor - o2)
+!                              (high key - h2o; high minor - o2)
+!
+! old band 11:  1480-1800 cm-1 (low - h2o; low minor - o2)
+!                              (high key - h2o; high minor - o2)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng11
+      use rrlw_kg11, only: fracrefao, fracrefbo, kao, kao_mo2, &
+                           kbo, kbo_mo2, selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, ka_mo2, &
+                           absb, kb, kb_mo2, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumk1, sumk2, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(11)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(10)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+160)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(11)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(10)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+160)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(11)
+            sumk1 = 0.
+            sumk2 = 0.
+            do ipr = 1, ngn(ngs(10)+igc)
+               iprsm = iprsm + 1
+               sumk1 = sumk1 + kao_mo2(jt,iprsm)*rwgt(iprsm+160)
+               sumk2 = sumk2 + kbo_mo2(jt,iprsm)*rwgt(iprsm+160)
+            enddo
+            ka_mo2(jt,igc) = sumk1
+            kb_mo2(jt,igc) = sumk2
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(11)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(10)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+160)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(11)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(10)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+160)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(11)
+         sumf1= 0.
+         sumf2= 0.
+         do ipr = 1, ngn(ngs(10)+igc)
+            iprsm = iprsm + 1
+            sumf1= sumf1+ fracrefao(iprsm)
+            sumf2= sumf2+ fracrefbo(iprsm)
+         enddo
+         fracrefa(igc) = sumf1
+         fracrefb(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb11
+
+!***************************************************************************
+      subroutine cmbgb12
+!***************************************************************************
+!
+!     band 12:  1800-2080 cm-1 (low - h2o,co2; high - nothing)
+!
+! old band 12:  1800-2080 cm-1 (low - h2o,co2; high - nothing)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng12
+      use rrlw_kg12, only: fracrefao, kao, selfrefo, forrefo, &
+                           fracrefa, absa, ka, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(12)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(11)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+176)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(12)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(11)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+176)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(12)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(11)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+176)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(12)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(11)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb12
+
+!***************************************************************************
+      subroutine cmbgb13
+!***************************************************************************
+!
+!     band 13:  2080-2250 cm-1 (low key - h2o,n2o; high minor - o3 minor)
+!
+! old band 13:  2080-2250 cm-1 (low - h2o,n2o; high - nothing)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng13
+      use rrlw_kg13, only: fracrefao, fracrefbo, kao, kao_mco2, kao_mco, &
+                           kbo_mo3, selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, ka_mco2, ka_mco, &
+                           kb_mo3, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumk1, sumk2, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(13)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(12)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+192)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,9
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(13)
+              sumk1 = 0.
+              sumk2 = 0.
+               do ipr = 1, ngn(ngs(12)+igc)
+                  iprsm = iprsm + 1
+                  sumk1 = sumk1 + kao_mco2(jn,jt,iprsm)*rwgt(iprsm+192)
+                  sumk2 = sumk2 + kao_mco(jn,jt,iprsm)*rwgt(iprsm+192)
+               enddo
+               ka_mco2(jn,jt,igc) = sumk1
+               ka_mco(jn,jt,igc) = sumk2
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,19
+         iprsm = 0
+         do igc = 1,ngc(13)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(12)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + kbo_mo3(jt,iprsm)*rwgt(iprsm+192)
+            enddo
+            kb_mo3(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(13)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(12)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+192)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(13)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(12)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+192)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(13)
+         sumf = 0.
+         do ipr = 1, ngn(ngs(12)+igc)
+            iprsm = iprsm + 1
+            sumf = sumf + fracrefbo(iprsm)
+         enddo
+         fracrefb(igc) = sumf
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(13)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(12)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb13
+
+!***************************************************************************
+      subroutine cmbgb14
+!***************************************************************************
+!
+!     band 14:  2250-2380 cm-1 (low - co2; high - co2)
+!
+! old band 14:  2250-2380 cm-1 (low - co2; high - co2)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng14
+      use rrlw_kg14, only: fracrefao, fracrefbo, kao, kbo, &
+                           selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, &
+                           selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(14)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(13)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+208)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(14)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(13)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+208)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(14)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(13)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+208)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(14)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(13)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+208)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(14)
+         sumf1= 0.
+         sumf2= 0.
+         do ipr = 1, ngn(ngs(13)+igc)
+            iprsm = iprsm + 1
+            sumf1= sumf1+ fracrefao(iprsm)
+            sumf2= sumf2+ fracrefbo(iprsm)
+         enddo
+         fracrefa(igc) = sumf1
+         fracrefb(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb14
+
+!***************************************************************************
+      subroutine cmbgb15
+!***************************************************************************
+!
+!     band 15:  2380-2600 cm-1 (low - n2o,co2; low minor - n2)
+!                              (high - nothing)
+!
+! old band 15:  2380-2600 cm-1 (low - n2o,co2; high - nothing)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng15
+      use rrlw_kg15, only: fracrefao, kao, kao_mn2, selfrefo, forrefo, &
+                           fracrefa, absa, ka, ka_mn2, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(15)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(14)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+224)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,9
+         do jt = 1,19
+            iprsm = 0
+            do igc = 1,ngc(15)
+              sumk = 0.
+               do ipr = 1, ngn(ngs(14)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao_mn2(jn,jt,iprsm)*rwgt(iprsm+224)
+               enddo
+               ka_mn2(jn,jt,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(15)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(14)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+224)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(15)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(14)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+224)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(15)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(14)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb15
+
+!***************************************************************************
+      subroutine cmbgb16
+!***************************************************************************
+!
+!     band 16:  2600-3250 cm-1 (low key- h2o,ch4; high key - ch4)
+!
+! old band 16:  2600-3000 cm-1 (low - h2o,ch4; high - nothing)
+!***************************************************************************
+
+      use parrrtm, only : mg, nbndlw, ngptlw, ng16
+      use rrlw_kg16, only: fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, &
+                           fracrefa, fracrefb, absa, ka, absb, kb, selfref, forref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm 
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(16)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(15)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+240)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(16)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(15)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+240)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(16)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(15)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+240)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(16)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(15)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+240)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(16)
+         sumf = 0.
+         do ipr = 1, ngn(ngs(15)+igc)
+            iprsm = iprsm + 1
+            sumf = sumf + fracrefbo(iprsm)
+         enddo
+         fracrefb(igc) = sumf
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(16)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(15)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + fracrefao(iprsm,jp)
+            enddo
+            fracrefa(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb16
+
+!***************************************************************************
+      subroutine lwcldpr
+!***************************************************************************
+
+! --------- Modules ----------
+
+      use rrlw_cld, only: abscld1, absliq0, absliq1, &
+                          absice0, absice1, absice2, absice3
+
+      save
+
+! ABSCLDn is the liquid water absorption coefficient (m2/g). 
+! For INFLAG = 1.
+      abscld1 = 0.0602410_rb
+!  
+! Everything below is for INFLAG = 2.
+
+! ABSICEn(J,IB) are the parameters needed to compute the liquid water 
+! absorption coefficient in spectral region IB for ICEFLAG=n.  The units
+! of ABSICEn(1,IB) are m2/g and ABSICEn(2,IB) has units (microns (m2/g)).
+! For ICEFLAG = 0.
+
+      absice0(:)= (/0.005_rb,  1.0_rb/)
+
+! For ICEFLAG = 1.
+      absice1(1,:) = (/0.0036_rb, 0.0068_rb, 0.0003_rb, 0.0016_rb, 0.0020_rb/)
+      absice1(2,:) = (/1.136_rb , 0.600_rb , 1.338_rb , 1.166_rb , 1.118_rb /)
+
+! For ICEFLAG = 2.  In each band, the absorption
+! coefficients are listed for a range of effective radii from 5.0
+! to 131.0 microns in increments of 3.0 microns.
+! Spherical Ice Particle Parameterization
+! absorption units (abs coef/iwc): [(m^-1)/(g m^-3)]
+      absice2(:,1) = (/ &
+! band 1
+       7.798999e-02_rb,6.340479e-02_rb,5.417973e-02_rb,4.766245e-02_rb,4.272663e-02_rb, &
+       3.880939e-02_rb,3.559544e-02_rb,3.289241e-02_rb,3.057511e-02_rb,2.855800e-02_rb, &
+       2.678022e-02_rb,2.519712e-02_rb,2.377505e-02_rb,2.248806e-02_rb,2.131578e-02_rb, &
+       2.024194e-02_rb,1.925337e-02_rb,1.833926e-02_rb,1.749067e-02_rb,1.670007e-02_rb, &
+       1.596113e-02_rb,1.526845e-02_rb,1.461739e-02_rb,1.400394e-02_rb,1.342462e-02_rb, &
+       1.287639e-02_rb,1.235656e-02_rb,1.186279e-02_rb,1.139297e-02_rb,1.094524e-02_rb, &
+       1.051794e-02_rb,1.010956e-02_rb,9.718755e-03_rb,9.344316e-03_rb,8.985139e-03_rb, &
+       8.640223e-03_rb,8.308656e-03_rb,7.989606e-03_rb,7.682312e-03_rb,7.386076e-03_rb, &
+       7.100255e-03_rb,6.824258e-03_rb,6.557540e-03_rb/)
+      absice2(:,2) = (/ &
+! band 2
+       2.784879e-02_rb,2.709863e-02_rb,2.619165e-02_rb,2.529230e-02_rb,2.443225e-02_rb, &
+       2.361575e-02_rb,2.284021e-02_rb,2.210150e-02_rb,2.139548e-02_rb,2.071840e-02_rb, &
+       2.006702e-02_rb,1.943856e-02_rb,1.883064e-02_rb,1.824120e-02_rb,1.766849e-02_rb, &
+       1.711099e-02_rb,1.656737e-02_rb,1.603647e-02_rb,1.551727e-02_rb,1.500886e-02_rb, &
+       1.451045e-02_rb,1.402132e-02_rb,1.354084e-02_rb,1.306842e-02_rb,1.260355e-02_rb, &
+       1.214575e-02_rb,1.169460e-02_rb,1.124971e-02_rb,1.081072e-02_rb,1.037731e-02_rb, &
+       9.949167e-03_rb,9.526021e-03_rb,9.107615e-03_rb,8.693714e-03_rb,8.284096e-03_rb, &
+       7.878558e-03_rb,7.476910e-03_rb,7.078974e-03_rb,6.684586e-03_rb,6.293589e-03_rb, &
+       5.905839e-03_rb,5.521200e-03_rb,5.139543e-03_rb/)
+      absice2(:,3) = (/ &
+! band 3
+       1.065397e-01_rb,8.005726e-02_rb,6.546428e-02_rb,5.589131e-02_rb,4.898681e-02_rb, &
+       4.369932e-02_rb,3.947901e-02_rb,3.600676e-02_rb,3.308299e-02_rb,3.057561e-02_rb, &
+       2.839325e-02_rb,2.647040e-02_rb,2.475872e-02_rb,2.322164e-02_rb,2.183091e-02_rb, &
+       2.056430e-02_rb,1.940407e-02_rb,1.833586e-02_rb,1.734787e-02_rb,1.643034e-02_rb, &
+       1.557512e-02_rb,1.477530e-02_rb,1.402501e-02_rb,1.331924e-02_rb,1.265364e-02_rb, &
+       1.202445e-02_rb,1.142838e-02_rb,1.086257e-02_rb,1.032445e-02_rb,9.811791e-03_rb, &
+       9.322587e-03_rb,8.855053e-03_rb,8.407591e-03_rb,7.978763e-03_rb,7.567273e-03_rb, &
+       7.171949e-03_rb,6.791728e-03_rb,6.425642e-03_rb,6.072809e-03_rb,5.732424e-03_rb, &
+       5.403748e-03_rb,5.086103e-03_rb,4.778865e-03_rb/)
+      absice2(:,4) = (/ &
+! band 4
+       1.804566e-01_rb,1.168987e-01_rb,8.680442e-02_rb,6.910060e-02_rb,5.738174e-02_rb, &
+       4.902332e-02_rb,4.274585e-02_rb,3.784923e-02_rb,3.391734e-02_rb,3.068690e-02_rb, &
+       2.798301e-02_rb,2.568480e-02_rb,2.370600e-02_rb,2.198337e-02_rb,2.046940e-02_rb, &
+       1.912777e-02_rb,1.793016e-02_rb,1.685420e-02_rb,1.588193e-02_rb,1.499882e-02_rb, &
+       1.419293e-02_rb,1.345440e-02_rb,1.277496e-02_rb,1.214769e-02_rb,1.156669e-02_rb, &
+       1.102694e-02_rb,1.052412e-02_rb,1.005451e-02_rb,9.614854e-03_rb,9.202335e-03_rb, &
+       8.814470e-03_rb,8.449077e-03_rb,8.104223e-03_rb,7.778195e-03_rb,7.469466e-03_rb, &
+       7.176671e-03_rb,6.898588e-03_rb,6.634117e-03_rb,6.382264e-03_rb,6.142134e-03_rb, &
+       5.912913e-03_rb,5.693862e-03_rb,5.484308e-03_rb/)
+      absice2(:,5) = (/ &
+! band 5
+       2.131806e-01_rb,1.311372e-01_rb,9.407171e-02_rb,7.299442e-02_rb,5.941273e-02_rb, &
+       4.994043e-02_rb,4.296242e-02_rb,3.761113e-02_rb,3.337910e-02_rb,2.994978e-02_rb, &
+       2.711556e-02_rb,2.473461e-02_rb,2.270681e-02_rb,2.095943e-02_rb,1.943839e-02_rb, &
+       1.810267e-02_rb,1.692057e-02_rb,1.586719e-02_rb,1.492275e-02_rb,1.407132e-02_rb, &
+       1.329989e-02_rb,1.259780e-02_rb,1.195618e-02_rb,1.136761e-02_rb,1.082583e-02_rb, &
+       1.032552e-02_rb,9.862158e-03_rb,9.431827e-03_rb,9.031157e-03_rb,8.657217e-03_rb, &
+       8.307449e-03_rb,7.979609e-03_rb,7.671724e-03_rb,7.382048e-03_rb,7.109032e-03_rb, &
+       6.851298e-03_rb,6.607615e-03_rb,6.376881e-03_rb,6.158105e-03_rb,5.950394e-03_rb, &
+       5.752942e-03_rb,5.565019e-03_rb,5.385963e-03_rb/)
+      absice2(:,6) = (/ &
+! band 6
+       1.546177e-01_rb,1.039251e-01_rb,7.910347e-02_rb,6.412429e-02_rb,5.399997e-02_rb, &
+       4.664937e-02_rb,4.104237e-02_rb,3.660781e-02_rb,3.300218e-02_rb,3.000586e-02_rb, &
+       2.747148e-02_rb,2.529633e-02_rb,2.340647e-02_rb,2.174723e-02_rb,2.027731e-02_rb, &
+       1.896487e-02_rb,1.778492e-02_rb,1.671761e-02_rb,1.574692e-02_rb,1.485978e-02_rb, &
+       1.404543e-02_rb,1.329489e-02_rb,1.260066e-02_rb,1.195636e-02_rb,1.135657e-02_rb, &
+       1.079664e-02_rb,1.027257e-02_rb,9.780871e-03_rb,9.318505e-03_rb,8.882815e-03_rb, &
+       8.471458e-03_rb,8.082364e-03_rb,7.713696e-03_rb,7.363817e-03_rb,7.031264e-03_rb, &
+       6.714725e-03_rb,6.413021e-03_rb,6.125086e-03_rb,5.849958e-03_rb,5.586764e-03_rb, &
+       5.334707e-03_rb,5.093066e-03_rb,4.861179e-03_rb/)
+      absice2(:,7) = (/ &
+! band 7
+       7.583404e-02_rb,6.181558e-02_rb,5.312027e-02_rb,4.696039e-02_rb,4.225986e-02_rb, &
+       3.849735e-02_rb,3.538340e-02_rb,3.274182e-02_rb,3.045798e-02_rb,2.845343e-02_rb, &
+       2.667231e-02_rb,2.507353e-02_rb,2.362606e-02_rb,2.230595e-02_rb,2.109435e-02_rb, &
+       1.997617e-02_rb,1.893916e-02_rb,1.797328e-02_rb,1.707016e-02_rb,1.622279e-02_rb, &
+       1.542523e-02_rb,1.467241e-02_rb,1.395997e-02_rb,1.328414e-02_rb,1.264164e-02_rb, &
+       1.202958e-02_rb,1.144544e-02_rb,1.088697e-02_rb,1.035218e-02_rb,9.839297e-03_rb, &
+       9.346733e-03_rb,8.873057e-03_rb,8.416980e-03_rb,7.977335e-03_rb,7.553066e-03_rb, &
+       7.143210e-03_rb,6.746888e-03_rb,6.363297e-03_rb,5.991700e-03_rb,5.631422e-03_rb, &
+       5.281840e-03_rb,4.942378e-03_rb,4.612505e-03_rb/)
+      absice2(:,8) = (/ &
+! band 8
+       9.022185e-02_rb,6.922700e-02_rb,5.710674e-02_rb,4.898377e-02_rb,4.305946e-02_rb, &
+       3.849553e-02_rb,3.484183e-02_rb,3.183220e-02_rb,2.929794e-02_rb,2.712627e-02_rb, &
+       2.523856e-02_rb,2.357810e-02_rb,2.210286e-02_rb,2.078089e-02_rb,1.958747e-02_rb, &
+       1.850310e-02_rb,1.751218e-02_rb,1.660205e-02_rb,1.576232e-02_rb,1.498440e-02_rb, &
+       1.426107e-02_rb,1.358624e-02_rb,1.295474e-02_rb,1.236212e-02_rb,1.180456e-02_rb, &
+       1.127874e-02_rb,1.078175e-02_rb,1.031106e-02_rb,9.864433e-03_rb,9.439878e-03_rb, &
+       9.035637e-03_rb,8.650140e-03_rb,8.281981e-03_rb,7.929895e-03_rb,7.592746e-03_rb, &
+       7.269505e-03_rb,6.959238e-03_rb,6.661100e-03_rb,6.374317e-03_rb,6.098185e-03_rb, &
+       5.832059e-03_rb,5.575347e-03_rb,5.327504e-03_rb/)
+      absice2(:,9) = (/ &
+! band 9
+       1.294087e-01_rb,8.788217e-02_rb,6.728288e-02_rb,5.479720e-02_rb,4.635049e-02_rb, &
+       4.022253e-02_rb,3.555576e-02_rb,3.187259e-02_rb,2.888498e-02_rb,2.640843e-02_rb, &
+       2.431904e-02_rb,2.253038e-02_rb,2.098024e-02_rb,1.962267e-02_rb,1.842293e-02_rb, &
+       1.735426e-02_rb,1.639571e-02_rb,1.553060e-02_rb,1.474552e-02_rb,1.402953e-02_rb, &
+       1.337363e-02_rb,1.277033e-02_rb,1.221336e-02_rb,1.169741e-02_rb,1.121797e-02_rb, &
+       1.077117e-02_rb,1.035369e-02_rb,9.962643e-03_rb,9.595509e-03_rb,9.250088e-03_rb, &
+       8.924447e-03_rb,8.616876e-03_rb,8.325862e-03_rb,8.050057e-03_rb,7.788258e-03_rb, &
+       7.539388e-03_rb,7.302478e-03_rb,7.076656e-03_rb,6.861134e-03_rb,6.655197e-03_rb, &
+       6.458197e-03_rb,6.269543e-03_rb,6.088697e-03_rb/)
+      absice2(:,10) = (/ &
+! band 10
+       1.593628e-01_rb,1.014552e-01_rb,7.458955e-02_rb,5.903571e-02_rb,4.887582e-02_rb, &
+       4.171159e-02_rb,3.638480e-02_rb,3.226692e-02_rb,2.898717e-02_rb,2.631256e-02_rb, &
+       2.408925e-02_rb,2.221156e-02_rb,2.060448e-02_rb,1.921325e-02_rb,1.799699e-02_rb, &
+       1.692456e-02_rb,1.597177e-02_rb,1.511961e-02_rb,1.435289e-02_rb,1.365933e-02_rb, &
+       1.302890e-02_rb,1.245334e-02_rb,1.192576e-02_rb,1.144037e-02_rb,1.099230e-02_rb, &
+       1.057739e-02_rb,1.019208e-02_rb,9.833302e-03_rb,9.498395e-03_rb,9.185047e-03_rb, &
+       8.891237e-03_rb,8.615185e-03_rb,8.355325e-03_rb,8.110267e-03_rb,7.878778e-03_rb, &
+       7.659759e-03_rb,7.452224e-03_rb,7.255291e-03_rb,7.068166e-03_rb,6.890130e-03_rb, &
+       6.720536e-03_rb,6.558794e-03_rb,6.404371e-03_rb/)
+      absice2(:,11) = (/ &
+! band 11
+       1.656227e-01_rb,1.032129e-01_rb,7.487359e-02_rb,5.871431e-02_rb,4.828355e-02_rb, &
+       4.099989e-02_rb,3.562924e-02_rb,3.150755e-02_rb,2.824593e-02_rb,2.560156e-02_rb, &
+       2.341503e-02_rb,2.157740e-02_rb,2.001169e-02_rb,1.866199e-02_rb,1.748669e-02_rb, &
+       1.645421e-02_rb,1.554015e-02_rb,1.472535e-02_rb,1.399457e-02_rb,1.333553e-02_rb, &
+       1.273821e-02_rb,1.219440e-02_rb,1.169725e-02_rb,1.124104e-02_rb,1.082096e-02_rb, &
+       1.043290e-02_rb,1.007336e-02_rb,9.739338e-03_rb,9.428223e-03_rb,9.137756e-03_rb, &
+       8.865964e-03_rb,8.611115e-03_rb,8.371686e-03_rb,8.146330e-03_rb,7.933852e-03_rb, &
+       7.733187e-03_rb,7.543386e-03_rb,7.363597e-03_rb,7.193056e-03_rb,7.031072e-03_rb, &
+       6.877024e-03_rb,6.730348e-03_rb,6.590531e-03_rb/)
+      absice2(:,12) = (/ &
+! band 12
+       9.194591e-02_rb,6.446867e-02_rb,4.962034e-02_rb,4.042061e-02_rb,3.418456e-02_rb, &
+       2.968856e-02_rb,2.629900e-02_rb,2.365572e-02_rb,2.153915e-02_rb,1.980791e-02_rb, &
+       1.836689e-02_rb,1.714979e-02_rb,1.610900e-02_rb,1.520946e-02_rb,1.442476e-02_rb, &
+       1.373468e-02_rb,1.312345e-02_rb,1.257858e-02_rb,1.209010e-02_rb,1.164990e-02_rb, &
+       1.125136e-02_rb,1.088901e-02_rb,1.055827e-02_rb,1.025531e-02_rb,9.976896e-03_rb, &
+       9.720255e-03_rb,9.483022e-03_rb,9.263160e-03_rb,9.058902e-03_rb,8.868710e-03_rb, &
+       8.691240e-03_rb,8.525312e-03_rb,8.369886e-03_rb,8.224042e-03_rb,8.086961e-03_rb, &
+       7.957917e-03_rb,7.836258e-03_rb,7.721400e-03_rb,7.612821e-03_rb,7.510045e-03_rb, &
+       7.412648e-03_rb,7.320242e-03_rb,7.232476e-03_rb/)
+      absice2(:,13) = (/ &
+! band 13
+       1.437021e-01_rb,8.872535e-02_rb,6.392420e-02_rb,4.991833e-02_rb,4.096790e-02_rb, &
+       3.477881e-02_rb,3.025782e-02_rb,2.681909e-02_rb,2.412102e-02_rb,2.195132e-02_rb, &
+       2.017124e-02_rb,1.868641e-02_rb,1.743044e-02_rb,1.635529e-02_rb,1.542540e-02_rb, &
+       1.461388e-02_rb,1.390003e-02_rb,1.326766e-02_rb,1.270395e-02_rb,1.219860e-02_rb, &
+       1.174326e-02_rb,1.133107e-02_rb,1.095637e-02_rb,1.061442e-02_rb,1.030126e-02_rb, &
+       1.001352e-02_rb,9.748340e-03_rb,9.503256e-03_rb,9.276155e-03_rb,9.065205e-03_rb, &
+       8.868808e-03_rb,8.685571e-03_rb,8.514268e-03_rb,8.353820e-03_rb,8.203272e-03_rb, &
+       8.061776e-03_rb,7.928578e-03_rb,7.803001e-03_rb,7.684443e-03_rb,7.572358e-03_rb, &
+       7.466258e-03_rb,7.365701e-03_rb,7.270286e-03_rb/)
+      absice2(:,14) = (/ &
+! band 14
+       1.288870e-01_rb,8.160295e-02_rb,5.964745e-02_rb,4.703790e-02_rb,3.888637e-02_rb, &
+       3.320115e-02_rb,2.902017e-02_rb,2.582259e-02_rb,2.330224e-02_rb,2.126754e-02_rb, &
+       1.959258e-02_rb,1.819130e-02_rb,1.700289e-02_rb,1.598320e-02_rb,1.509942e-02_rb, &
+       1.432666e-02_rb,1.364572e-02_rb,1.304156e-02_rb,1.250220e-02_rb,1.201803e-02_rb, &
+       1.158123e-02_rb,1.118537e-02_rb,1.082513e-02_rb,1.049605e-02_rb,1.019440e-02_rb, &
+       9.916989e-03_rb,9.661116e-03_rb,9.424457e-03_rb,9.205005e-03_rb,9.001022e-03_rb, &
+       8.810992e-03_rb,8.633588e-03_rb,8.467646e-03_rb,8.312137e-03_rb,8.166151e-03_rb, &
+       8.028878e-03_rb,7.899597e-03_rb,7.777663e-03_rb,7.662498e-03_rb,7.553581e-03_rb, &
+       7.450444e-03_rb,7.352662e-03_rb,7.259851e-03_rb/)
+      absice2(:,15) = (/ &
+! band 15
+       8.254229e-02_rb,5.808787e-02_rb,4.492166e-02_rb,3.675028e-02_rb,3.119623e-02_rb, &
+       2.718045e-02_rb,2.414450e-02_rb,2.177073e-02_rb,1.986526e-02_rb,1.830306e-02_rb, &
+       1.699991e-02_rb,1.589698e-02_rb,1.495199e-02_rb,1.413374e-02_rb,1.341870e-02_rb, &
+       1.278883e-02_rb,1.223002e-02_rb,1.173114e-02_rb,1.128322e-02_rb,1.087900e-02_rb, &
+       1.051254e-02_rb,1.017890e-02_rb,9.873991e-03_rb,9.594347e-03_rb,9.337044e-03_rb, &
+       9.099589e-03_rb,8.879842e-03_rb,8.675960e-03_rb,8.486341e-03_rb,8.309594e-03_rb, &
+       8.144500e-03_rb,7.989986e-03_rb,7.845109e-03_rb,7.709031e-03_rb,7.581007e-03_rb, &
+       7.460376e-03_rb,7.346544e-03_rb,7.238978e-03_rb,7.137201e-03_rb,7.040780e-03_rb, &
+       6.949325e-03_rb,6.862483e-03_rb,6.779931e-03_rb/)
+      absice2(:,16) = (/ &
+! band 16
+       1.382062e-01_rb,8.643227e-02_rb,6.282935e-02_rb,4.934783e-02_rb,4.063891e-02_rb, &
+       3.455591e-02_rb,3.007059e-02_rb,2.662897e-02_rb,2.390631e-02_rb,2.169972e-02_rb, &
+       1.987596e-02_rb,1.834393e-02_rb,1.703924e-02_rb,1.591513e-02_rb,1.493679e-02_rb, &
+       1.407780e-02_rb,1.331775e-02_rb,1.264061e-02_rb,1.203364e-02_rb,1.148655e-02_rb, &
+       1.099099e-02_rb,1.054006e-02_rb,1.012807e-02_rb,9.750215e-03_rb,9.402477e-03_rb, &
+       9.081428e-03_rb,8.784143e-03_rb,8.508107e-03_rb,8.251146e-03_rb,8.011373e-03_rb, &
+       7.787140e-03_rb,7.577002e-03_rb,7.379687e-03_rb,7.194071e-03_rb,7.019158e-03_rb, &
+       6.854061e-03_rb,6.697986e-03_rb,6.550224e-03_rb,6.410138e-03_rb,6.277153e-03_rb, &
+       6.150751e-03_rb,6.030462e-03_rb,5.915860e-03_rb/)
+
+! ICEFLAG = 3; Fu parameterization. Particle size 5 - 140 micron in 
+! increments of 3 microns.
+! units = m2/g
+! Hexagonal Ice Particle Parameterization
+! absorption units (abs coef/iwc): [(m^-1)/(g m^-3)]
+      absice3(:,1) = (/ &
+! band 1
+       3.110649e-03_rb,4.666352e-02_rb,6.606447e-02_rb,6.531678e-02_rb,6.012598e-02_rb, &
+       5.437494e-02_rb,4.906411e-02_rb,4.441146e-02_rb,4.040585e-02_rb,3.697334e-02_rb, &
+       3.403027e-02_rb,3.149979e-02_rb,2.931596e-02_rb,2.742365e-02_rb,2.577721e-02_rb, &
+       2.433888e-02_rb,2.307732e-02_rb,2.196644e-02_rb,2.098437e-02_rb,2.011264e-02_rb, &
+       1.933561e-02_rb,1.863992e-02_rb,1.801407e-02_rb,1.744812e-02_rb,1.693346e-02_rb, &
+       1.646252e-02_rb,1.602866e-02_rb,1.562600e-02_rb,1.524933e-02_rb,1.489399e-02_rb, &
+       1.455580e-02_rb,1.423098e-02_rb,1.391612e-02_rb,1.360812e-02_rb,1.330413e-02_rb, &
+       1.300156e-02_rb,1.269801e-02_rb,1.239127e-02_rb,1.207928e-02_rb,1.176014e-02_rb, &
+       1.143204e-02_rb,1.109334e-02_rb,1.074243e-02_rb,1.037786e-02_rb,9.998198e-03_rb, &
+       9.602126e-03_rb/)
+      absice3(:,2) = (/ &
+! band 2
+       3.984966e-04_rb,1.681097e-02_rb,2.627680e-02_rb,2.767465e-02_rb,2.700722e-02_rb, &
+       2.579180e-02_rb,2.448677e-02_rb,2.323890e-02_rb,2.209096e-02_rb,2.104882e-02_rb, &
+       2.010547e-02_rb,1.925003e-02_rb,1.847128e-02_rb,1.775883e-02_rb,1.710358e-02_rb, &
+       1.649769e-02_rb,1.593449e-02_rb,1.540829e-02_rb,1.491429e-02_rb,1.444837e-02_rb, &
+       1.400704e-02_rb,1.358729e-02_rb,1.318654e-02_rb,1.280258e-02_rb,1.243346e-02_rb, &
+       1.207750e-02_rb,1.173325e-02_rb,1.139941e-02_rb,1.107487e-02_rb,1.075861e-02_rb, &
+       1.044975e-02_rb,1.014753e-02_rb,9.851229e-03_rb,9.560240e-03_rb,9.274003e-03_rb, &
+       8.992020e-03_rb,8.713845e-03_rb,8.439074e-03_rb,8.167346e-03_rb,7.898331e-03_rb, &
+       7.631734e-03_rb,7.367286e-03_rb,7.104742e-03_rb,6.843882e-03_rb,6.584504e-03_rb, &
+       6.326424e-03_rb/)
+      absice3(:,3) = (/ &
+! band 3
+       6.933163e-02_rb,8.540475e-02_rb,7.701816e-02_rb,6.771158e-02_rb,5.986953e-02_rb, &
+       5.348120e-02_rb,4.824962e-02_rb,4.390563e-02_rb,4.024411e-02_rb,3.711404e-02_rb, &
+       3.440426e-02_rb,3.203200e-02_rb,2.993478e-02_rb,2.806474e-02_rb,2.638464e-02_rb, &
+       2.486516e-02_rb,2.348288e-02_rb,2.221890e-02_rb,2.105780e-02_rb,1.998687e-02_rb, &
+       1.899552e-02_rb,1.807490e-02_rb,1.721750e-02_rb,1.641693e-02_rb,1.566773e-02_rb, &
+       1.496515e-02_rb,1.430509e-02_rb,1.368398e-02_rb,1.309865e-02_rb,1.254634e-02_rb, &
+       1.202456e-02_rb,1.153114e-02_rb,1.106409e-02_rb,1.062166e-02_rb,1.020224e-02_rb, &
+       9.804381e-03_rb,9.426771e-03_rb,9.068205e-03_rb,8.727578e-03_rb,8.403876e-03_rb, &
+       8.096160e-03_rb,7.803564e-03_rb,7.525281e-03_rb,7.260560e-03_rb,7.008697e-03_rb, &
+       6.769036e-03_rb/)
+      absice3(:,4) = (/ &
+! band 4
+       1.765735e-01_rb,1.382700e-01_rb,1.095129e-01_rb,8.987475e-02_rb,7.591185e-02_rb, &
+       6.554169e-02_rb,5.755500e-02_rb,5.122083e-02_rb,4.607610e-02_rb,4.181475e-02_rb, &
+       3.822697e-02_rb,3.516432e-02_rb,3.251897e-02_rb,3.021073e-02_rb,2.817876e-02_rb, &
+       2.637607e-02_rb,2.476582e-02_rb,2.331871e-02_rb,2.201113e-02_rb,2.082388e-02_rb, &
+       1.974115e-02_rb,1.874983e-02_rb,1.783894e-02_rb,1.699922e-02_rb,1.622280e-02_rb, &
+       1.550296e-02_rb,1.483390e-02_rb,1.421064e-02_rb,1.362880e-02_rb,1.308460e-02_rb, &
+       1.257468e-02_rb,1.209611e-02_rb,1.164628e-02_rb,1.122287e-02_rb,1.082381e-02_rb, &
+       1.044725e-02_rb,1.009154e-02_rb,9.755166e-03_rb,9.436783e-03_rb,9.135163e-03_rb, &
+       8.849193e-03_rb,8.577856e-03_rb,8.320225e-03_rb,8.075451e-03_rb,7.842755e-03_rb, &
+       7.621418e-03_rb/)
+      absice3(:,5) = (/ &
+! band 5
+       2.339673e-01_rb,1.692124e-01_rb,1.291656e-01_rb,1.033837e-01_rb,8.562949e-02_rb, &
+       7.273526e-02_rb,6.298262e-02_rb,5.537015e-02_rb,4.927787e-02_rb,4.430246e-02_rb, &
+       4.017061e-02_rb,3.669072e-02_rb,3.372455e-02_rb,3.116995e-02_rb,2.894977e-02_rb, &
+       2.700471e-02_rb,2.528842e-02_rb,2.376420e-02_rb,2.240256e-02_rb,2.117959e-02_rb, &
+       2.007567e-02_rb,1.907456e-02_rb,1.816271e-02_rb,1.732874e-02_rb,1.656300e-02_rb, &
+       1.585725e-02_rb,1.520445e-02_rb,1.459852e-02_rb,1.403419e-02_rb,1.350689e-02_rb, &
+       1.301260e-02_rb,1.254781e-02_rb,1.210941e-02_rb,1.169468e-02_rb,1.130118e-02_rb, &
+       1.092675e-02_rb,1.056945e-02_rb,1.022757e-02_rb,9.899560e-03_rb,9.584021e-03_rb, &
+       9.279705e-03_rb,8.985479e-03_rb,8.700322e-03_rb,8.423306e-03_rb,8.153590e-03_rb, &
+       7.890412e-03_rb/)
+      absice3(:,6) = (/ &
+! band 6
+       1.145369e-01_rb,1.174566e-01_rb,9.917866e-02_rb,8.332990e-02_rb,7.104263e-02_rb, &
+       6.153370e-02_rb,5.405472e-02_rb,4.806281e-02_rb,4.317918e-02_rb,3.913795e-02_rb, &
+       3.574916e-02_rb,3.287437e-02_rb,3.041067e-02_rb,2.828017e-02_rb,2.642292e-02_rb, &
+       2.479206e-02_rb,2.335051e-02_rb,2.206851e-02_rb,2.092195e-02_rb,1.989108e-02_rb, &
+       1.895958e-02_rb,1.811385e-02_rb,1.734245e-02_rb,1.663573e-02_rb,1.598545e-02_rb, &
+       1.538456e-02_rb,1.482700e-02_rb,1.430750e-02_rb,1.382150e-02_rb,1.336499e-02_rb, &
+       1.293447e-02_rb,1.252685e-02_rb,1.213939e-02_rb,1.176968e-02_rb,1.141555e-02_rb, &
+       1.107508e-02_rb,1.074655e-02_rb,1.042839e-02_rb,1.011923e-02_rb,9.817799e-03_rb, &
+       9.522962e-03_rb,9.233688e-03_rb,8.949041e-03_rb,8.668171e-03_rb,8.390301e-03_rb, &
+       8.114723e-03_rb/)
+      absice3(:,7) = (/ &
+! band 7
+       1.222345e-02_rb,5.344230e-02_rb,5.523465e-02_rb,5.128759e-02_rb,4.676925e-02_rb, &
+       4.266150e-02_rb,3.910561e-02_rb,3.605479e-02_rb,3.342843e-02_rb,3.115052e-02_rb, &
+       2.915776e-02_rb,2.739935e-02_rb,2.583499e-02_rb,2.443266e-02_rb,2.316681e-02_rb, &
+       2.201687e-02_rb,2.096619e-02_rb,2.000112e-02_rb,1.911044e-02_rb,1.828481e-02_rb, &
+       1.751641e-02_rb,1.679866e-02_rb,1.612598e-02_rb,1.549360e-02_rb,1.489742e-02_rb, &
+       1.433392e-02_rb,1.380002e-02_rb,1.329305e-02_rb,1.281068e-02_rb,1.235084e-02_rb, &
+       1.191172e-02_rb,1.149171e-02_rb,1.108936e-02_rb,1.070341e-02_rb,1.033271e-02_rb, &
+       9.976220e-03_rb,9.633021e-03_rb,9.302273e-03_rb,8.983216e-03_rb,8.675161e-03_rb, &
+       8.377478e-03_rb,8.089595e-03_rb,7.810986e-03_rb,7.541170e-03_rb,7.279706e-03_rb, &
+       7.026186e-03_rb/)
+      absice3(:,8) = (/ &
+! band 8
+       6.711058e-02_rb,6.918198e-02_rb,6.127484e-02_rb,5.411944e-02_rb,4.836902e-02_rb, &
+       4.375293e-02_rb,3.998077e-02_rb,3.683587e-02_rb,3.416508e-02_rb,3.186003e-02_rb, &
+       2.984290e-02_rb,2.805671e-02_rb,2.645895e-02_rb,2.501733e-02_rb,2.370689e-02_rb, &
+       2.250808e-02_rb,2.140532e-02_rb,2.038609e-02_rb,1.944018e-02_rb,1.855918e-02_rb, &
+       1.773609e-02_rb,1.696504e-02_rb,1.624106e-02_rb,1.555990e-02_rb,1.491793e-02_rb, &
+       1.431197e-02_rb,1.373928e-02_rb,1.319743e-02_rb,1.268430e-02_rb,1.219799e-02_rb, &
+       1.173682e-02_rb,1.129925e-02_rb,1.088393e-02_rb,1.048961e-02_rb,1.011516e-02_rb, &
+       9.759543e-03_rb,9.421813e-03_rb,9.101089e-03_rb,8.796559e-03_rb,8.507464e-03_rb, &
+       8.233098e-03_rb,7.972798e-03_rb,7.725942e-03_rb,7.491940e-03_rb,7.270238e-03_rb, &
+       7.060305e-03_rb/)
+      absice3(:,9) = (/ &
+! band 9
+       1.236780e-01_rb,9.222386e-02_rb,7.383997e-02_rb,6.204072e-02_rb,5.381029e-02_rb, &
+       4.770678e-02_rb,4.296928e-02_rb,3.916131e-02_rb,3.601540e-02_rb,3.335878e-02_rb, &
+       3.107493e-02_rb,2.908247e-02_rb,2.732282e-02_rb,2.575276e-02_rb,2.433968e-02_rb, &
+       2.305852e-02_rb,2.188966e-02_rb,2.081757e-02_rb,1.982974e-02_rb,1.891599e-02_rb, &
+       1.806794e-02_rb,1.727865e-02_rb,1.654227e-02_rb,1.585387e-02_rb,1.520924e-02_rb, &
+       1.460476e-02_rb,1.403730e-02_rb,1.350416e-02_rb,1.300293e-02_rb,1.253153e-02_rb, &
+       1.208808e-02_rb,1.167094e-02_rb,1.127862e-02_rb,1.090979e-02_rb,1.056323e-02_rb, &
+       1.023786e-02_rb,9.932665e-03_rb,9.646744e-03_rb,9.379250e-03_rb,9.129409e-03_rb, &
+       8.896500e-03_rb,8.679856e-03_rb,8.478852e-03_rb,8.292904e-03_rb,8.121463e-03_rb, &
+       7.964013e-03_rb/)
+      absice3(:,10) = (/ &
+! band 10
+       1.655966e-01_rb,1.134205e-01_rb,8.714344e-02_rb,7.129241e-02_rb,6.063739e-02_rb, &
+       5.294203e-02_rb,4.709309e-02_rb,4.247476e-02_rb,3.871892e-02_rb,3.559206e-02_rb, &
+       3.293893e-02_rb,3.065226e-02_rb,2.865558e-02_rb,2.689288e-02_rb,2.532221e-02_rb, &
+       2.391150e-02_rb,2.263582e-02_rb,2.147549e-02_rb,2.041476e-02_rb,1.944089e-02_rb, &
+       1.854342e-02_rb,1.771371e-02_rb,1.694456e-02_rb,1.622989e-02_rb,1.556456e-02_rb, &
+       1.494415e-02_rb,1.436491e-02_rb,1.382354e-02_rb,1.331719e-02_rb,1.284339e-02_rb, &
+       1.239992e-02_rb,1.198486e-02_rb,1.159647e-02_rb,1.123323e-02_rb,1.089375e-02_rb, &
+       1.057679e-02_rb,1.028124e-02_rb,1.000607e-02_rb,9.750376e-03_rb,9.513303e-03_rb, &
+       9.294082e-03_rb,9.092003e-03_rb,8.906412e-03_rb,8.736702e-03_rb,8.582314e-03_rb, &
+       8.442725e-03_rb/)
+      absice3(:,11) = (/ &
+! band 11
+       1.775615e-01_rb,1.180046e-01_rb,8.929607e-02_rb,7.233500e-02_rb,6.108333e-02_rb, &
+       5.303642e-02_rb,4.696927e-02_rb,4.221206e-02_rb,3.836768e-02_rb,3.518576e-02_rb, &
+       3.250063e-02_rb,3.019825e-02_rb,2.819758e-02_rb,2.643943e-02_rb,2.487953e-02_rb, &
+       2.348414e-02_rb,2.222705e-02_rb,2.108762e-02_rb,2.004936e-02_rb,1.909892e-02_rb, &
+       1.822539e-02_rb,1.741975e-02_rb,1.667449e-02_rb,1.598330e-02_rb,1.534084e-02_rb, &
+       1.474253e-02_rb,1.418446e-02_rb,1.366325e-02_rb,1.317597e-02_rb,1.272004e-02_rb, &
+       1.229321e-02_rb,1.189350e-02_rb,1.151915e-02_rb,1.116859e-02_rb,1.084042e-02_rb, &
+       1.053338e-02_rb,1.024636e-02_rb,9.978326e-03_rb,9.728357e-03_rb,9.495613e-03_rb, &
+       9.279327e-03_rb,9.078798e-03_rb,8.893383e-03_rb,8.722488e-03_rb,8.565568e-03_rb, &
+       8.422115e-03_rb/)
+      absice3(:,12) = (/ &
+! band 12
+       9.465447e-02_rb,6.432047e-02_rb,5.060973e-02_rb,4.267283e-02_rb,3.741843e-02_rb, &
+       3.363096e-02_rb,3.073531e-02_rb,2.842405e-02_rb,2.651789e-02_rb,2.490518e-02_rb, &
+       2.351273e-02_rb,2.229056e-02_rb,2.120335e-02_rb,2.022541e-02_rb,1.933763e-02_rb, &
+       1.852546e-02_rb,1.777763e-02_rb,1.708528e-02_rb,1.644134e-02_rb,1.584009e-02_rb, &
+       1.527684e-02_rb,1.474774e-02_rb,1.424955e-02_rb,1.377957e-02_rb,1.333549e-02_rb, &
+       1.291534e-02_rb,1.251743e-02_rb,1.214029e-02_rb,1.178265e-02_rb,1.144337e-02_rb, &
+       1.112148e-02_rb,1.081609e-02_rb,1.052642e-02_rb,1.025178e-02_rb,9.991540e-03_rb, &
+       9.745130e-03_rb,9.512038e-03_rb,9.291797e-03_rb,9.083980e-03_rb,8.888195e-03_rb, &
+       8.704081e-03_rb,8.531306e-03_rb,8.369560e-03_rb,8.218558e-03_rb,8.078032e-03_rb, &
+       7.947730e-03_rb/)
+      absice3(:,13) = (/ &
+! band 13
+       1.560311e-01_rb,9.961097e-02_rb,7.502949e-02_rb,6.115022e-02_rb,5.214952e-02_rb, &
+       4.578149e-02_rb,4.099731e-02_rb,3.724174e-02_rb,3.419343e-02_rb,3.165356e-02_rb, &
+       2.949251e-02_rb,2.762222e-02_rb,2.598073e-02_rb,2.452322e-02_rb,2.321642e-02_rb, &
+       2.203516e-02_rb,2.096002e-02_rb,1.997579e-02_rb,1.907036e-02_rb,1.823401e-02_rb, &
+       1.745879e-02_rb,1.673819e-02_rb,1.606678e-02_rb,1.544003e-02_rb,1.485411e-02_rb, &
+       1.430574e-02_rb,1.379215e-02_rb,1.331092e-02_rb,1.285996e-02_rb,1.243746e-02_rb, &
+       1.204183e-02_rb,1.167164e-02_rb,1.132567e-02_rb,1.100281e-02_rb,1.070207e-02_rb, &
+       1.042258e-02_rb,1.016352e-02_rb,9.924197e-03_rb,9.703953e-03_rb,9.502199e-03_rb, &
+       9.318400e-03_rb,9.152066e-03_rb,9.002749e-03_rb,8.870038e-03_rb,8.753555e-03_rb, &
+       8.652951e-03_rb/)
+      absice3(:,14) = (/ &
+! band 14
+       1.559547e-01_rb,9.896700e-02_rb,7.441231e-02_rb,6.061469e-02_rb,5.168730e-02_rb, &
+       4.537821e-02_rb,4.064106e-02_rb,3.692367e-02_rb,3.390714e-02_rb,3.139438e-02_rb, &
+       2.925702e-02_rb,2.740783e-02_rb,2.578547e-02_rb,2.434552e-02_rb,2.305506e-02_rb, &
+       2.188910e-02_rb,2.082842e-02_rb,1.985789e-02_rb,1.896553e-02_rb,1.814165e-02_rb, &
+       1.737839e-02_rb,1.666927e-02_rb,1.600891e-02_rb,1.539279e-02_rb,1.481712e-02_rb, &
+       1.427865e-02_rb,1.377463e-02_rb,1.330266e-02_rb,1.286068e-02_rb,1.244689e-02_rb, &
+       1.205973e-02_rb,1.169780e-02_rb,1.135989e-02_rb,1.104492e-02_rb,1.075192e-02_rb, &
+       1.048004e-02_rb,1.022850e-02_rb,9.996611e-03_rb,9.783753e-03_rb,9.589361e-03_rb, &
+       9.412924e-03_rb,9.253977e-03_rb,9.112098e-03_rb,8.986903e-03_rb,8.878039e-03_rb, &
+       8.785184e-03_rb/)
+      absice3(:,15) = (/ &
+! band 15
+       1.102926e-01_rb,7.176622e-02_rb,5.530316e-02_rb,4.606056e-02_rb,4.006116e-02_rb, &
+       3.579628e-02_rb,3.256909e-02_rb,3.001360e-02_rb,2.791920e-02_rb,2.615617e-02_rb, &
+       2.464023e-02_rb,2.331426e-02_rb,2.213817e-02_rb,2.108301e-02_rb,2.012733e-02_rb, &
+       1.925493e-02_rb,1.845331e-02_rb,1.771269e-02_rb,1.702531e-02_rb,1.638493e-02_rb, &
+       1.578648e-02_rb,1.522579e-02_rb,1.469940e-02_rb,1.420442e-02_rb,1.373841e-02_rb, &
+       1.329931e-02_rb,1.288535e-02_rb,1.249502e-02_rb,1.212700e-02_rb,1.178015e-02_rb, &
+       1.145348e-02_rb,1.114612e-02_rb,1.085730e-02_rb,1.058633e-02_rb,1.033263e-02_rb, &
+       1.009564e-02_rb,9.874895e-03_rb,9.669960e-03_rb,9.480449e-03_rb,9.306014e-03_rb, &
+       9.146339e-03_rb,9.001138e-03_rb,8.870154e-03_rb,8.753148e-03_rb,8.649907e-03_rb, &
+       8.560232e-03_rb/)
+      absice3(:,16) = (/ &
+! band 16
+       1.688344e-01_rb,1.077072e-01_rb,7.994467e-02_rb,6.403862e-02_rb,5.369850e-02_rb, &
+       4.641582e-02_rb,4.099331e-02_rb,3.678724e-02_rb,3.342069e-02_rb,3.065831e-02_rb, &
+       2.834557e-02_rb,2.637680e-02_rb,2.467733e-02_rb,2.319286e-02_rb,2.188299e-02_rb, &
+       2.071701e-02_rb,1.967121e-02_rb,1.872692e-02_rb,1.786931e-02_rb,1.708641e-02_rb, &
+       1.636846e-02_rb,1.570743e-02_rb,1.509665e-02_rb,1.453052e-02_rb,1.400433e-02_rb, &
+       1.351407e-02_rb,1.305631e-02_rb,1.262810e-02_rb,1.222688e-02_rb,1.185044e-02_rb, &
+       1.149683e-02_rb,1.116436e-02_rb,1.085153e-02_rb,1.055701e-02_rb,1.027961e-02_rb, &
+       1.001831e-02_rb,9.772141e-03_rb,9.540280e-03_rb,9.321966e-03_rb,9.116517e-03_rb, &
+       8.923315e-03_rb,8.741803e-03_rb,8.571472e-03_rb,8.411860e-03_rb,8.262543e-03_rb, &
+       8.123136e-03_rb/)
+
+! For LIQFLAG = 0.
+      absliq0 = 0.0903614_rb
+
+! For LIQFLAG = 1.  In each band, the absorption
+! coefficients are listed for a range of effective radii from 2.5
+! to 59.5 microns in increments of 1.0 micron.
+      absliq1(:, 1) = (/ &
+! band  1
+       1.64047e-03_rb, 6.90533e-02_rb, 7.72017e-02_rb, 7.78054e-02_rb, 7.69523e-02_rb, &
+       7.58058e-02_rb, 7.46400e-02_rb, 7.35123e-02_rb, 7.24162e-02_rb, 7.13225e-02_rb, &
+       6.99145e-02_rb, 6.66409e-02_rb, 6.36582e-02_rb, 6.09425e-02_rb, 5.84593e-02_rb, &
+       5.61743e-02_rb, 5.40571e-02_rb, 5.20812e-02_rb, 5.02245e-02_rb, 4.84680e-02_rb, &
+       4.67959e-02_rb, 4.51944e-02_rb, 4.36516e-02_rb, 4.21570e-02_rb, 4.07015e-02_rb, &
+       3.92766e-02_rb, 3.78747e-02_rb, 3.64886e-02_rb, 3.53632e-02_rb, 3.41992e-02_rb, &
+       3.31016e-02_rb, 3.20643e-02_rb, 3.10817e-02_rb, 3.01490e-02_rb, 2.92620e-02_rb, &
+       2.84171e-02_rb, 2.76108e-02_rb, 2.68404e-02_rb, 2.61031e-02_rb, 2.53966e-02_rb, &
+       2.47189e-02_rb, 2.40678e-02_rb, 2.34418e-02_rb, 2.28392e-02_rb, 2.22586e-02_rb, &
+       2.16986e-02_rb, 2.11580e-02_rb, 2.06356e-02_rb, 2.01305e-02_rb, 1.96417e-02_rb, &
+       1.91682e-02_rb, 1.87094e-02_rb, 1.82643e-02_rb, 1.78324e-02_rb, 1.74129e-02_rb, &
+       1.70052e-02_rb, 1.66088e-02_rb, 1.62231e-02_rb/)
+      absliq1(:, 2) = (/ &
+! band  2
+       2.19486e-01_rb, 1.80687e-01_rb, 1.59150e-01_rb, 1.44731e-01_rb, 1.33703e-01_rb, &
+       1.24355e-01_rb, 1.15756e-01_rb, 1.07318e-01_rb, 9.86119e-02_rb, 8.92739e-02_rb, &
+       8.34911e-02_rb, 7.70773e-02_rb, 7.15240e-02_rb, 6.66615e-02_rb, 6.23641e-02_rb, &
+       5.85359e-02_rb, 5.51020e-02_rb, 5.20032e-02_rb, 4.91916e-02_rb, 4.66283e-02_rb, &
+       4.42813e-02_rb, 4.21236e-02_rb, 4.01330e-02_rb, 3.82905e-02_rb, 3.65797e-02_rb, &
+       3.49869e-02_rb, 3.35002e-02_rb, 3.21090e-02_rb, 3.08957e-02_rb, 2.97601e-02_rb, &
+       2.86966e-02_rb, 2.76984e-02_rb, 2.67599e-02_rb, 2.58758e-02_rb, 2.50416e-02_rb, &
+       2.42532e-02_rb, 2.35070e-02_rb, 2.27997e-02_rb, 2.21284e-02_rb, 2.14904e-02_rb, &
+       2.08834e-02_rb, 2.03051e-02_rb, 1.97536e-02_rb, 1.92271e-02_rb, 1.87239e-02_rb, &
+       1.82425e-02_rb, 1.77816e-02_rb, 1.73399e-02_rb, 1.69162e-02_rb, 1.65094e-02_rb, &
+       1.61187e-02_rb, 1.57430e-02_rb, 1.53815e-02_rb, 1.50334e-02_rb, 1.46981e-02_rb, &
+       1.43748e-02_rb, 1.40628e-02_rb, 1.37617e-02_rb/)
+      absliq1(:, 3) = (/ &
+! band  3
+       2.95174e-01_rb, 2.34765e-01_rb, 1.98038e-01_rb, 1.72114e-01_rb, 1.52083e-01_rb, &
+       1.35654e-01_rb, 1.21613e-01_rb, 1.09252e-01_rb, 9.81263e-02_rb, 8.79448e-02_rb, &
+       8.12566e-02_rb, 7.44563e-02_rb, 6.86374e-02_rb, 6.36042e-02_rb, 5.92094e-02_rb, &
+       5.53402e-02_rb, 5.19087e-02_rb, 4.88455e-02_rb, 4.60951e-02_rb, 4.36124e-02_rb, &
+       4.13607e-02_rb, 3.93096e-02_rb, 3.74338e-02_rb, 3.57119e-02_rb, 3.41261e-02_rb, &
+       3.26610e-02_rb, 3.13036e-02_rb, 3.00425e-02_rb, 2.88497e-02_rb, 2.78077e-02_rb, &
+       2.68317e-02_rb, 2.59158e-02_rb, 2.50545e-02_rb, 2.42430e-02_rb, 2.34772e-02_rb, &
+       2.27533e-02_rb, 2.20679e-02_rb, 2.14181e-02_rb, 2.08011e-02_rb, 2.02145e-02_rb, &
+       1.96561e-02_rb, 1.91239e-02_rb, 1.86161e-02_rb, 1.81311e-02_rb, 1.76673e-02_rb, &
+       1.72234e-02_rb, 1.67981e-02_rb, 1.63903e-02_rb, 1.59989e-02_rb, 1.56230e-02_rb, &
+       1.52615e-02_rb, 1.49138e-02_rb, 1.45791e-02_rb, 1.42565e-02_rb, 1.39455e-02_rb, &
+       1.36455e-02_rb, 1.33559e-02_rb, 1.30761e-02_rb/)
+      absliq1(:, 4) = (/ &
+! band  4
+       3.00925e-01_rb, 2.36949e-01_rb, 1.96947e-01_rb, 1.68692e-01_rb, 1.47190e-01_rb, &
+       1.29986e-01_rb, 1.15719e-01_rb, 1.03568e-01_rb, 9.30028e-02_rb, 8.36658e-02_rb, &
+       7.71075e-02_rb, 7.07002e-02_rb, 6.52284e-02_rb, 6.05024e-02_rb, 5.63801e-02_rb, &
+       5.27534e-02_rb, 4.95384e-02_rb, 4.66690e-02_rb, 4.40925e-02_rb, 4.17664e-02_rb, &
+       3.96559e-02_rb, 3.77326e-02_rb, 3.59727e-02_rb, 3.43561e-02_rb, 3.28662e-02_rb, &
+       3.14885e-02_rb, 3.02110e-02_rb, 2.90231e-02_rb, 2.78948e-02_rb, 2.69109e-02_rb, &
+       2.59884e-02_rb, 2.51217e-02_rb, 2.43058e-02_rb, 2.35364e-02_rb, 2.28096e-02_rb, &
+       2.21218e-02_rb, 2.14700e-02_rb, 2.08515e-02_rb, 2.02636e-02_rb, 1.97041e-02_rb, &
+       1.91711e-02_rb, 1.86625e-02_rb, 1.81769e-02_rb, 1.77126e-02_rb, 1.72683e-02_rb, &
+       1.68426e-02_rb, 1.64344e-02_rb, 1.60427e-02_rb, 1.56664e-02_rb, 1.53046e-02_rb, &
+       1.49565e-02_rb, 1.46214e-02_rb, 1.42985e-02_rb, 1.39871e-02_rb, 1.36866e-02_rb, &
+       1.33965e-02_rb, 1.31162e-02_rb, 1.28453e-02_rb/)
+      absliq1(:, 5) = (/ &
+! band  5
+       2.64691e-01_rb, 2.12018e-01_rb, 1.78009e-01_rb, 1.53539e-01_rb, 1.34721e-01_rb, &
+       1.19580e-01_rb, 1.06996e-01_rb, 9.62772e-02_rb, 8.69710e-02_rb, 7.87670e-02_rb, &
+       7.29272e-02_rb, 6.70920e-02_rb, 6.20977e-02_rb, 5.77732e-02_rb, 5.39910e-02_rb, &
+       5.06538e-02_rb, 4.76866e-02_rb, 4.50301e-02_rb, 4.26374e-02_rb, 4.04704e-02_rb, &
+       3.84981e-02_rb, 3.66948e-02_rb, 3.50394e-02_rb, 3.35141e-02_rb, 3.21038e-02_rb, &
+       3.07957e-02_rb, 2.95788e-02_rb, 2.84438e-02_rb, 2.73790e-02_rb, 2.64390e-02_rb, &
+       2.55565e-02_rb, 2.47263e-02_rb, 2.39437e-02_rb, 2.32047e-02_rb, 2.25056e-02_rb, &
+       2.18433e-02_rb, 2.12149e-02_rb, 2.06177e-02_rb, 2.00495e-02_rb, 1.95081e-02_rb, &
+       1.89917e-02_rb, 1.84984e-02_rb, 1.80269e-02_rb, 1.75755e-02_rb, 1.71431e-02_rb, &
+       1.67283e-02_rb, 1.63303e-02_rb, 1.59478e-02_rb, 1.55801e-02_rb, 1.52262e-02_rb, &
+       1.48853e-02_rb, 1.45568e-02_rb, 1.42400e-02_rb, 1.39342e-02_rb, 1.36388e-02_rb, &
+       1.33533e-02_rb, 1.30773e-02_rb, 1.28102e-02_rb/)
+      absliq1(:, 6) = (/ &
+! band  6
+       8.81182e-02_rb, 1.06745e-01_rb, 9.79753e-02_rb, 8.99625e-02_rb, 8.35200e-02_rb, &
+       7.81899e-02_rb, 7.35939e-02_rb, 6.94696e-02_rb, 6.56266e-02_rb, 6.19148e-02_rb, &
+       5.83355e-02_rb, 5.49306e-02_rb, 5.19642e-02_rb, 4.93325e-02_rb, 4.69659e-02_rb, &
+       4.48148e-02_rb, 4.28431e-02_rb, 4.10231e-02_rb, 3.93332e-02_rb, 3.77563e-02_rb, &
+       3.62785e-02_rb, 3.48882e-02_rb, 3.35758e-02_rb, 3.23333e-02_rb, 3.11536e-02_rb, &
+       3.00310e-02_rb, 2.89601e-02_rb, 2.79365e-02_rb, 2.70502e-02_rb, 2.62618e-02_rb, &
+       2.55025e-02_rb, 2.47728e-02_rb, 2.40726e-02_rb, 2.34013e-02_rb, 2.27583e-02_rb, &
+       2.21422e-02_rb, 2.15522e-02_rb, 2.09869e-02_rb, 2.04453e-02_rb, 1.99260e-02_rb, &
+       1.94280e-02_rb, 1.89501e-02_rb, 1.84913e-02_rb, 1.80506e-02_rb, 1.76270e-02_rb, &
+       1.72196e-02_rb, 1.68276e-02_rb, 1.64500e-02_rb, 1.60863e-02_rb, 1.57357e-02_rb, &
+       1.53975e-02_rb, 1.50710e-02_rb, 1.47558e-02_rb, 1.44511e-02_rb, 1.41566e-02_rb, &
+       1.38717e-02_rb, 1.35960e-02_rb, 1.33290e-02_rb/)
+      absliq1(:, 7) = (/ &
+! band  7
+       4.32174e-02_rb, 7.36078e-02_rb, 6.98340e-02_rb, 6.65231e-02_rb, 6.41948e-02_rb, &
+       6.23551e-02_rb, 6.06638e-02_rb, 5.88680e-02_rb, 5.67124e-02_rb, 5.38629e-02_rb, &
+       4.99579e-02_rb, 4.86289e-02_rb, 4.70120e-02_rb, 4.52854e-02_rb, 4.35466e-02_rb, &
+       4.18480e-02_rb, 4.02169e-02_rb, 3.86658e-02_rb, 3.71992e-02_rb, 3.58168e-02_rb, &
+       3.45155e-02_rb, 3.32912e-02_rb, 3.21390e-02_rb, 3.10538e-02_rb, 3.00307e-02_rb, &
+       2.90651e-02_rb, 2.81524e-02_rb, 2.72885e-02_rb, 2.62821e-02_rb, 2.55744e-02_rb, &
+       2.48799e-02_rb, 2.42029e-02_rb, 2.35460e-02_rb, 2.29108e-02_rb, 2.22981e-02_rb, &
+       2.17079e-02_rb, 2.11402e-02_rb, 2.05945e-02_rb, 2.00701e-02_rb, 1.95663e-02_rb, &
+       1.90824e-02_rb, 1.86174e-02_rb, 1.81706e-02_rb, 1.77411e-02_rb, 1.73281e-02_rb, &
+       1.69307e-02_rb, 1.65483e-02_rb, 1.61801e-02_rb, 1.58254e-02_rb, 1.54835e-02_rb, &
+       1.51538e-02_rb, 1.48358e-02_rb, 1.45288e-02_rb, 1.42322e-02_rb, 1.39457e-02_rb, &
+       1.36687e-02_rb, 1.34008e-02_rb, 1.31416e-02_rb/)
+      absliq1(:, 8) = (/ &
+! band  8
+       1.41881e-01_rb, 7.15419e-02_rb, 6.30335e-02_rb, 6.11132e-02_rb, 6.01931e-02_rb, &
+       5.92420e-02_rb, 5.78968e-02_rb, 5.58876e-02_rb, 5.28923e-02_rb, 4.84462e-02_rb, &
+       4.60839e-02_rb, 4.56013e-02_rb, 4.45410e-02_rb, 4.31866e-02_rb, 4.17026e-02_rb, &
+       4.01850e-02_rb, 3.86892e-02_rb, 3.72461e-02_rb, 3.58722e-02_rb, 3.45749e-02_rb, &
+       3.33564e-02_rb, 3.22155e-02_rb, 3.11494e-02_rb, 3.01541e-02_rb, 2.92253e-02_rb, &
+       2.83584e-02_rb, 2.75488e-02_rb, 2.67925e-02_rb, 2.57692e-02_rb, 2.50704e-02_rb, &
+       2.43918e-02_rb, 2.37350e-02_rb, 2.31005e-02_rb, 2.24888e-02_rb, 2.18996e-02_rb, &
+       2.13325e-02_rb, 2.07870e-02_rb, 2.02623e-02_rb, 1.97577e-02_rb, 1.92724e-02_rb, &
+       1.88056e-02_rb, 1.83564e-02_rb, 1.79241e-02_rb, 1.75079e-02_rb, 1.71070e-02_rb, &
+       1.67207e-02_rb, 1.63482e-02_rb, 1.59890e-02_rb, 1.56424e-02_rb, 1.53077e-02_rb, &
+       1.49845e-02_rb, 1.46722e-02_rb, 1.43702e-02_rb, 1.40782e-02_rb, 1.37955e-02_rb, &
+       1.35219e-02_rb, 1.32569e-02_rb, 1.30000e-02_rb/)
+      absliq1(:, 9) = (/ &
+! band  9
+       6.72726e-02_rb, 6.61013e-02_rb, 6.47866e-02_rb, 6.33780e-02_rb, 6.18985e-02_rb, &
+       6.03335e-02_rb, 5.86136e-02_rb, 5.65876e-02_rb, 5.39839e-02_rb, 5.03536e-02_rb, &
+       4.71608e-02_rb, 4.63630e-02_rb, 4.50313e-02_rb, 4.34526e-02_rb, 4.17876e-02_rb, &
+       4.01261e-02_rb, 3.85171e-02_rb, 3.69860e-02_rb, 3.55442e-02_rb, 3.41954e-02_rb, &
+       3.29384e-02_rb, 3.17693e-02_rb, 3.06832e-02_rb, 2.96745e-02_rb, 2.87374e-02_rb, &
+       2.78662e-02_rb, 2.70557e-02_rb, 2.63008e-02_rb, 2.52450e-02_rb, 2.45424e-02_rb, &
+       2.38656e-02_rb, 2.32144e-02_rb, 2.25885e-02_rb, 2.19873e-02_rb, 2.14099e-02_rb, &
+       2.08554e-02_rb, 2.03230e-02_rb, 1.98116e-02_rb, 1.93203e-02_rb, 1.88482e-02_rb, &
+       1.83944e-02_rb, 1.79578e-02_rb, 1.75378e-02_rb, 1.71335e-02_rb, 1.67440e-02_rb, &
+       1.63687e-02_rb, 1.60069e-02_rb, 1.56579e-02_rb, 1.53210e-02_rb, 1.49958e-02_rb, &
+       1.46815e-02_rb, 1.43778e-02_rb, 1.40841e-02_rb, 1.37999e-02_rb, 1.35249e-02_rb, &
+       1.32585e-02_rb, 1.30004e-02_rb, 1.27502e-02_rb/)
+      absliq1(:,10) = (/ &
+! band 10
+       7.97040e-02_rb, 7.63844e-02_rb, 7.36499e-02_rb, 7.13525e-02_rb, 6.93043e-02_rb, &
+       6.72807e-02_rb, 6.50227e-02_rb, 6.22395e-02_rb, 5.86093e-02_rb, 5.37815e-02_rb, &
+       5.14682e-02_rb, 4.97214e-02_rb, 4.77392e-02_rb, 4.56961e-02_rb, 4.36858e-02_rb, &
+       4.17569e-02_rb, 3.99328e-02_rb, 3.82224e-02_rb, 3.66265e-02_rb, 3.51416e-02_rb, &
+       3.37617e-02_rb, 3.24798e-02_rb, 3.12887e-02_rb, 3.01812e-02_rb, 2.91505e-02_rb, &
+       2.81900e-02_rb, 2.72939e-02_rb, 2.64568e-02_rb, 2.54165e-02_rb, 2.46832e-02_rb, &
+       2.39783e-02_rb, 2.33017e-02_rb, 2.26531e-02_rb, 2.20314e-02_rb, 2.14359e-02_rb, &
+       2.08653e-02_rb, 2.03187e-02_rb, 1.97947e-02_rb, 1.92924e-02_rb, 1.88106e-02_rb, &
+       1.83483e-02_rb, 1.79043e-02_rb, 1.74778e-02_rb, 1.70678e-02_rb, 1.66735e-02_rb, &
+       1.62941e-02_rb, 1.59286e-02_rb, 1.55766e-02_rb, 1.52371e-02_rb, 1.49097e-02_rb, &
+       1.45937e-02_rb, 1.42885e-02_rb, 1.39936e-02_rb, 1.37085e-02_rb, 1.34327e-02_rb, &
+       1.31659e-02_rb, 1.29075e-02_rb, 1.26571e-02_rb/)
+      absliq1(:,11) = (/ &
+! band 11
+       1.49438e-01_rb, 1.33535e-01_rb, 1.21542e-01_rb, 1.11743e-01_rb, 1.03263e-01_rb, &
+       9.55774e-02_rb, 8.83382e-02_rb, 8.12943e-02_rb, 7.42533e-02_rb, 6.70609e-02_rb, &
+       6.38761e-02_rb, 5.97788e-02_rb, 5.59841e-02_rb, 5.25318e-02_rb, 4.94132e-02_rb, &
+       4.66014e-02_rb, 4.40644e-02_rb, 4.17706e-02_rb, 3.96910e-02_rb, 3.77998e-02_rb, &
+       3.60742e-02_rb, 3.44947e-02_rb, 3.30442e-02_rb, 3.17079e-02_rb, 3.04730e-02_rb, &
+       2.93283e-02_rb, 2.82642e-02_rb, 2.72720e-02_rb, 2.61789e-02_rb, 2.53277e-02_rb, &
+       2.45237e-02_rb, 2.37635e-02_rb, 2.30438e-02_rb, 2.23615e-02_rb, 2.17140e-02_rb, &
+       2.10987e-02_rb, 2.05133e-02_rb, 1.99557e-02_rb, 1.94241e-02_rb, 1.89166e-02_rb, &
+       1.84317e-02_rb, 1.79679e-02_rb, 1.75238e-02_rb, 1.70983e-02_rb, 1.66901e-02_rb, &
+       1.62983e-02_rb, 1.59219e-02_rb, 1.55599e-02_rb, 1.52115e-02_rb, 1.48761e-02_rb, &
+       1.45528e-02_rb, 1.42411e-02_rb, 1.39402e-02_rb, 1.36497e-02_rb, 1.33690e-02_rb, &
+       1.30976e-02_rb, 1.28351e-02_rb, 1.25810e-02_rb/)
+      absliq1(:,12) = (/ &
+! band 12
+       3.71985e-02_rb, 3.88586e-02_rb, 3.99070e-02_rb, 4.04351e-02_rb, 4.04610e-02_rb, &
+       3.99834e-02_rb, 3.89953e-02_rb, 3.74886e-02_rb, 3.54551e-02_rb, 3.28870e-02_rb, &
+       3.32576e-02_rb, 3.22444e-02_rb, 3.12384e-02_rb, 3.02584e-02_rb, 2.93146e-02_rb, &
+       2.84120e-02_rb, 2.75525e-02_rb, 2.67361e-02_rb, 2.59618e-02_rb, 2.52280e-02_rb, &
+       2.45327e-02_rb, 2.38736e-02_rb, 2.32487e-02_rb, 2.26558e-02_rb, 2.20929e-02_rb, &
+       2.15579e-02_rb, 2.10491e-02_rb, 2.05648e-02_rb, 1.99749e-02_rb, 1.95704e-02_rb, &
+       1.91731e-02_rb, 1.87839e-02_rb, 1.84032e-02_rb, 1.80315e-02_rb, 1.76689e-02_rb, &
+       1.73155e-02_rb, 1.69712e-02_rb, 1.66362e-02_rb, 1.63101e-02_rb, 1.59928e-02_rb, &
+       1.56842e-02_rb, 1.53840e-02_rb, 1.50920e-02_rb, 1.48080e-02_rb, 1.45318e-02_rb, &
+       1.42631e-02_rb, 1.40016e-02_rb, 1.37472e-02_rb, 1.34996e-02_rb, 1.32586e-02_rb, &
+       1.30239e-02_rb, 1.27954e-02_rb, 1.25728e-02_rb, 1.23559e-02_rb, 1.21445e-02_rb, &
+       1.19385e-02_rb, 1.17376e-02_rb, 1.15417e-02_rb/)
+      absliq1(:,13) = (/ &
+! band 13
+       3.11868e-02_rb, 4.48357e-02_rb, 4.90224e-02_rb, 4.96406e-02_rb, 4.86806e-02_rb, &
+       4.69610e-02_rb, 4.48630e-02_rb, 4.25795e-02_rb, 4.02138e-02_rb, 3.78236e-02_rb, &
+       3.74266e-02_rb, 3.60384e-02_rb, 3.47074e-02_rb, 3.34434e-02_rb, 3.22499e-02_rb, &
+       3.11264e-02_rb, 3.00704e-02_rb, 2.90784e-02_rb, 2.81463e-02_rb, 2.72702e-02_rb, &
+       2.64460e-02_rb, 2.56698e-02_rb, 2.49381e-02_rb, 2.42475e-02_rb, 2.35948e-02_rb, &
+       2.29774e-02_rb, 2.23925e-02_rb, 2.18379e-02_rb, 2.11793e-02_rb, 2.07076e-02_rb, &
+       2.02470e-02_rb, 1.97981e-02_rb, 1.93613e-02_rb, 1.89367e-02_rb, 1.85243e-02_rb, &
+       1.81240e-02_rb, 1.77356e-02_rb, 1.73588e-02_rb, 1.69935e-02_rb, 1.66392e-02_rb, &
+       1.62956e-02_rb, 1.59624e-02_rb, 1.56393e-02_rb, 1.53259e-02_rb, 1.50219e-02_rb, &
+       1.47268e-02_rb, 1.44404e-02_rb, 1.41624e-02_rb, 1.38925e-02_rb, 1.36302e-02_rb, &
+       1.33755e-02_rb, 1.31278e-02_rb, 1.28871e-02_rb, 1.26530e-02_rb, 1.24253e-02_rb, &
+       1.22038e-02_rb, 1.19881e-02_rb, 1.17782e-02_rb/)
+      absliq1(:,14) = (/ &
+! band 14
+       1.58988e-02_rb, 3.50652e-02_rb, 4.00851e-02_rb, 4.07270e-02_rb, 3.98101e-02_rb, &
+       3.83306e-02_rb, 3.66829e-02_rb, 3.50327e-02_rb, 3.34497e-02_rb, 3.19609e-02_rb, &
+       3.13712e-02_rb, 3.03348e-02_rb, 2.93415e-02_rb, 2.83973e-02_rb, 2.75037e-02_rb, &
+       2.66604e-02_rb, 2.58654e-02_rb, 2.51161e-02_rb, 2.44100e-02_rb, 2.37440e-02_rb, &
+       2.31154e-02_rb, 2.25215e-02_rb, 2.19599e-02_rb, 2.14282e-02_rb, 2.09242e-02_rb, &
+       2.04459e-02_rb, 1.99915e-02_rb, 1.95594e-02_rb, 1.90254e-02_rb, 1.86598e-02_rb, &
+       1.82996e-02_rb, 1.79455e-02_rb, 1.75983e-02_rb, 1.72584e-02_rb, 1.69260e-02_rb, &
+       1.66013e-02_rb, 1.62843e-02_rb, 1.59752e-02_rb, 1.56737e-02_rb, 1.53799e-02_rb, &
+       1.50936e-02_rb, 1.48146e-02_rb, 1.45429e-02_rb, 1.42782e-02_rb, 1.40203e-02_rb, &
+       1.37691e-02_rb, 1.35243e-02_rb, 1.32858e-02_rb, 1.30534e-02_rb, 1.28270e-02_rb, &
+       1.26062e-02_rb, 1.23909e-02_rb, 1.21810e-02_rb, 1.19763e-02_rb, 1.17766e-02_rb, &
+       1.15817e-02_rb, 1.13915e-02_rb, 1.12058e-02_rb/)
+      absliq1(:,15) = (/ &
+! band 15
+       5.02079e-03_rb, 2.17615e-02_rb, 2.55449e-02_rb, 2.59484e-02_rb, 2.53650e-02_rb, &
+       2.45281e-02_rb, 2.36843e-02_rb, 2.29159e-02_rb, 2.22451e-02_rb, 2.16716e-02_rb, &
+       2.11451e-02_rb, 2.05817e-02_rb, 2.00454e-02_rb, 1.95372e-02_rb, 1.90567e-02_rb, &
+       1.86028e-02_rb, 1.81742e-02_rb, 1.77693e-02_rb, 1.73866e-02_rb, 1.70244e-02_rb, &
+       1.66815e-02_rb, 1.63563e-02_rb, 1.60477e-02_rb, 1.57544e-02_rb, 1.54755e-02_rb, &
+       1.52097e-02_rb, 1.49564e-02_rb, 1.47146e-02_rb, 1.43684e-02_rb, 1.41728e-02_rb, &
+       1.39762e-02_rb, 1.37797e-02_rb, 1.35838e-02_rb, 1.33891e-02_rb, 1.31961e-02_rb, &
+       1.30051e-02_rb, 1.28164e-02_rb, 1.26302e-02_rb, 1.24466e-02_rb, 1.22659e-02_rb, &
+       1.20881e-02_rb, 1.19131e-02_rb, 1.17412e-02_rb, 1.15723e-02_rb, 1.14063e-02_rb, &
+       1.12434e-02_rb, 1.10834e-02_rb, 1.09264e-02_rb, 1.07722e-02_rb, 1.06210e-02_rb, &
+       1.04725e-02_rb, 1.03269e-02_rb, 1.01839e-02_rb, 1.00436e-02_rb, 9.90593e-03_rb, &
+       9.77080e-03_rb, 9.63818e-03_rb, 9.50800e-03_rb/)
+      absliq1(:,16) = (/ &
+! band 16
+       5.64971e-02_rb, 9.04736e-02_rb, 8.11726e-02_rb, 7.05450e-02_rb, 6.20052e-02_rb, &
+       5.54286e-02_rb, 5.03503e-02_rb, 4.63791e-02_rb, 4.32290e-02_rb, 4.06959e-02_rb, &
+       3.74690e-02_rb, 3.52964e-02_rb, 3.33799e-02_rb, 3.16774e-02_rb, 3.01550e-02_rb, &
+       2.87856e-02_rb, 2.75474e-02_rb, 2.64223e-02_rb, 2.53953e-02_rb, 2.44542e-02_rb, &
+       2.35885e-02_rb, 2.27894e-02_rb, 2.20494e-02_rb, 2.13622e-02_rb, 2.07222e-02_rb, &
+       2.01246e-02_rb, 1.95654e-02_rb, 1.90408e-02_rb, 1.84398e-02_rb, 1.80021e-02_rb, &
+       1.75816e-02_rb, 1.71775e-02_rb, 1.67889e-02_rb, 1.64152e-02_rb, 1.60554e-02_rb, &
+       1.57089e-02_rb, 1.53751e-02_rb, 1.50531e-02_rb, 1.47426e-02_rb, 1.44428e-02_rb, &
+       1.41532e-02_rb, 1.38734e-02_rb, 1.36028e-02_rb, 1.33410e-02_rb, 1.30875e-02_rb, &
+       1.28420e-02_rb, 1.26041e-02_rb, 1.23735e-02_rb, 1.21497e-02_rb, 1.19325e-02_rb, &
+       1.17216e-02_rb, 1.15168e-02_rb, 1.13177e-02_rb, 1.11241e-02_rb, 1.09358e-02_rb, &
+       1.07525e-02_rb, 1.05741e-02_rb, 1.04003e-02_rb/)
+
+      end subroutine lwcldpr
+
+      end module rrtmg_lw_init
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rad.nomcica.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rad.nomcica.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rad.nomcica.f90	(revision 3477)
@@ -0,0 +1,903 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_rad.nomcica.f90,v $
+!     author:    $Author: miacono $
+!     revision:  $Revision: 1.12 $
+!     created:   $Date: 2011/04/08 20:25:01 $
+!
+
+       module rrtmg_lw_rad
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+!
+! ****************************************************************************
+! *                                                                          *
+! *                              RRTMG_LW                                    *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                   a rapid radiative transfer model                       *
+! *                       for the longwave region                            * 
+! *             for application to general circulation models                *
+! *                                                                          *
+! *                                                                          *
+! *            Atmospheric and Environmental Research, Inc.                  *
+! *                        131 Hartwell Avenue                               *
+! *                        Lexington, MA 02421                               *
+! *                                                                          *
+! *                                                                          *
+! *                           Eli J. Mlawer                                  *
+! *                        Jennifer S. Delamere                              *
+! *                         Michael J. Iacono                                *
+! *                         Shepard A. Clough                                *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                       email:  emlawer@aer.com                            *
+! *                       email:  jdelamer@aer.com                           *
+! *                       email:  miacono@aer.com                            *
+! *                                                                          *
+! *        The authors wish to acknowledge the contributions of the          *
+! *        following people:  Steven J. Taubman, Karen Cady-Pereira,         *
+! *        Patrick D. Brown, Ronald E. Farren, Luke Chen, Robert Bergstrom.  *
+! *                                                                          *
+! ****************************************************************************
+
+! -------- Modules --------
+      use parkind, only : im => kind_im, rb => kind_rb
+      use rrlw_vsn
+      use rrtmg_lw_cldprop, only: cldprop
+! *** Move the required call to rrtmg_lw_ini below and the following 
+! use association to the GCM initialization area ***
+!      use rrtmg_lw_init, only: rrtmg_lw_ini
+      use rrtmg_lw_rtrn, only: rtrn
+      use rrtmg_lw_rtrnmr, only: rtrnmr
+      use rrtmg_lw_setcoef, only: setcoef
+      use rrtmg_lw_taumol, only: taumol
+
+      implicit none
+
+! public interfaces/functions/subroutines
+      public :: rrtmg_lw, inatm
+
+!------------------------------------------------------------------
+      contains
+!------------------------------------------------------------------
+
+!------------------------------------------------------------------
+! Public subroutines
+!------------------------------------------------------------------
+
+      subroutine rrtmg_lw &
+            (ncol    ,nlay    ,icld    ,idrv    , &
+             play    ,plev    ,tlay    ,tlev    ,tsfc    , &
+             h2ovmr  ,o3vmr   ,co2vmr  ,ch4vmr  ,n2ovmr  ,o2vmr, &
+             cfc11vmr,cfc12vmr,cfc22vmr,ccl4vmr ,emis    , &
+             inflglw ,iceflglw,liqflglw,cldfr   , &
+             taucld  ,cicewp  ,cliqwp  ,reice   ,reliq   , &
+             tauaer  , &
+             uflx    ,dflx    ,hr      ,uflxc   ,dflxc,  hrc, &
+             duflx_dt,duflxc_dt )
+
+! -------- Description --------
+
+! This program is the driver subroutine for RRTMG_LW, the AER LW radiation 
+! model for application to GCMs, that has been adapted from RRTM_LW for
+! improved efficiency.
+!
+! NOTE: The call to RRTMG_LW_INI should be moved to the GCM initialization
+!  area, since this has to be called only once. 
+!
+! This routine:
+!    a) calls INATM to read in the atmospheric profile from GCM;
+!       all layering in RRTMG is ordered from surface to toa. 
+!    b) calls CLDPROP to set cloud optical depth based on input
+!       cloud properties
+!    c) calls SETCOEF to calculate various quantities needed for 
+!       the radiative transfer algorithm
+!    d) calls TAUMOL to calculate gaseous optical depths for each 
+!       of the 16 spectral bands
+!    e) calls RTRNMR (for both clear and cloudy profiles) to perform the
+!       radiative transfer calculation with a maximum-random cloud
+!       overlap method, or calls RTRN to use random cloud overlap.
+!    f) passes the necessary fluxes and cooling rates back to GCM
+!
+! Two modes of operation are possible:
+!     The mode is chosen by using either rrtmg_lw.nomcica.f90 (to not use
+!     McICA) or rrtmg_lw.f90 (to use McICA) to interface with a GCM. 
+!
+!    1) Standard, single forward model calculation (imca = 0)
+!    2) Monte Carlo Independent Column Approximation (McICA, Pincus et al., 
+!       JC, 2003) method is applied to the forward model calculation (imca = 1)
+!
+! Two methods of cloud property input are possible:
+!     Cloud properties can be input in one of two ways (controlled by input 
+!     flags inflglw, iceflglw, and liqflglw; see text file rrtmg_lw_instructions
+!     and subroutine rrtmg_lw_cldprop.f90 for further details):
+!
+!    1) Input cloud fraction and cloud optical depth directly (inflglw = 0)
+!    2) Input cloud fraction and cloud physical properties (inflglw = 1 or 2);  
+!       cloud optical properties are calculated by cldprop or cldprmc based
+!       on input settings of iceflglw and liqflglw.  Ice particle size provided
+!       must be appropriately defined for the ice parameterization selected. 
+!
+! One method of aerosol property input is possible:
+!     Aerosol properties can be input in only one way (controlled by input 
+!     flag iaer; see text file rrtmg_lw_instructions for further details):
+!
+!    1) Input aerosol optical depth directly by layer and spectral band (iaer=10);
+!       band average optical depth at the mid-point of each spectral band.
+!       RRTMG_LW currently treats only aerosol absorption;
+!       scattering capability is not presently available.
+!
+! The optional calculation of the change in upward flux as a function of surface 
+! temperature is available (controlled by input flag idrv).  This can be utilized 
+! to approximate adjustments to the upward flux profile caused only by a change in 
+! surface temperature between full radiation calls.  This feature uses the pre-
+! calculated derivative of the Planck function with respect to surface temperature. 
+!
+!    1) Normal forward calculation for the input profile (idrv=0)
+!    2) Normal forward calculation with optional calculation of the change
+!       in upward flux as a function of surface temperature for clear sky
+!       and total sky flux.  Flux partial derivatives are provided in arrays
+!       duflx_dt and duflxc_dt for total and clear sky.  (idrv=1)
+!
+!
+! ------- Modifications -------
+!
+! This version of RRTMG_LW has been modified from RRTM_LW to use a reduced 
+! set of g-points for application to GCMs.  
+!
+!-- Original version (derived from RRTM_LW), reduction of g-points, other
+!   revisions for use with GCMs.  
+!     1999: M. J. Iacono, AER, Inc.
+!-- Adapted for use with NCAR/CAM.
+!     May 2004: M. J. Iacono, AER, Inc.
+!-- Conversion to F90 formatting for consistency with rrtmg_sw.
+!     Feb 2007: M. J. Iacono, AER, Inc.
+!-- Modifications to formatting to use assumed-shape arrays.
+!     Aug 2007: M. J. Iacono, AER, Inc.
+!-- Modified to add longwave aerosol absorption.
+!     Apr 2008: M. J. Iacono, AER, Inc.
+!-- Added capability to calculate derivative of upward flux wrt surface temperature. 
+!     Nov 2009: M. J. Iacono, E. J. Mlawer, AER, Inc.
+
+! --------- Modules ----------
+
+      use parrrtm, only : nbndlw, ngptlw, maxxsec, mxmol
+      use rrlw_con, only: fluxfac, heatfac, oneminus, pi
+      use rrlw_wvn, only: ng, ngb, nspa, nspb, wavenum1, wavenum2, delwave
+
+! ------- Declarations -------
+
+! ----- Input -----
+! Note: All volume mixing ratios are in dimensionless units of mole fraction obtained
+! by scaling mass mixing ratio (g/g) with the appropriate molecular weights (g/mol) 
+      integer(kind=im), intent(in) :: ncol            ! Number of horizontal columns
+      integer(kind=im), intent(in) :: nlay            ! Number of model layers
+      integer(kind=im), intent(inout) :: icld         ! Cloud overlap method
+                                                      !    0: Clear only
+                                                      !    1: Random
+                                                      !    2: Maximum/random
+                                                      !    3: Maximum
+      integer(kind=im), intent(in) :: idrv            ! Flag for calculation of dFdT, the change
+                                                      !    in upward flux as a function of 
+                                                      !    surface temperature [0=off, 1=on]
+                                                      !    0: Normal forward calculation
+                                                      !    1: Normal forward calculation with
+                                                      !       duflx_dt and duflxc_dt output
+
+      real(kind=rb), intent(in) :: play(:,:)          ! Layer pressures (hPa, mb)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: plev(:,:)          ! Interface pressures (hPa, mb)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tlay(:,:)          ! Layer temperatures (K)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: tlev(:,:)          ! Interface temperatures (K)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tsfc(:)            ! Surface temperature (K)
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: h2ovmr(:,:)        ! H2O volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o3vmr(:,:)         ! O3 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: co2vmr(:,:)        ! CO2 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: ch4vmr(:,:)        ! Methane volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: n2ovmr(:,:)        ! Nitrous oxide volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o2vmr(:,:)         ! Oxygen volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cfc11vmr(:,:)      ! CFC11 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cfc12vmr(:,:)      ! CFC12 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cfc22vmr(:,:)      ! CFC22 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: ccl4vmr(:,:)       ! CCL4 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: emis(:,:)          ! Surface emissivity
+                                                      !    Dimensions: (ncol,nbndlw)
+
+      integer(kind=im), intent(in) :: inflglw         ! Flag for cloud optical properties
+      integer(kind=im), intent(in) :: iceflglw        ! Flag for ice particle specification
+      integer(kind=im), intent(in) :: liqflglw        ! Flag for liquid droplet specification
+
+      real(kind=rb), intent(in) :: cldfr(:,:)         ! Cloud fraction
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cicewp(:,:)        ! Cloud ice water path (g/m2)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cliqwp(:,:)        ! Cloud liquid water path (g/m2)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: reice(:,:)         ! Cloud ice particle effective size (microns)
+                                                      !    Dimensions: (ncol,nlay)
+                                                      ! specific definition of reice depends on setting of iceflglw:
+                                                      ! iceflglw = 0: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !               r_ec must be >= 10.0 microns
+                                                      ! iceflglw = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !               r_ec range is limited to 13.0 to 130.0 microns
+                                                      ! iceflglw = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
+                                                      !               r_k range is limited to 5.0 to 131.0 microns
+                                                      ! iceflglw = 3: generalized effective size, dge, (Fu, 1996),
+                                                      !               dge range is limited to 5.0 to 140.0 microns
+                                                      !               [dge = 1.0315 * r_ec]
+      real(kind=rb), intent(in) :: reliq(:,:)         ! Cloud water drop effective radius (microns)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: taucld(:,:,:)      ! In-cloud optical depth
+                                                      !    Dimensions: (nbndlw,ncol,nlay)
+!      real(kind=rb), intent(in) :: ssacld(:,:,:)     ! In-cloud single scattering albedo
+                                                      !    Dimensions: (nbndlw,ncol,nlay)
+                                                      !   for future expansion 
+                                                      !   (lw scattering not yet available)
+!      real(kind=rb), intent(in) :: asmcld(:,:,:)     ! In-cloud asymmetry parameter
+                                                      !    Dimensions: (nbndlw,ncol,nlay)
+                                                      !   for future expansion 
+                                                      !   (lw scattering not yet available)
+      real(kind=rb), intent(in) :: tauaer(:,:,:)      ! aerosol optical depth
+                                                      !    Dimensions: (ncol,nlay,nbndlw)
+!      real(kind=rb), intent(in) :: ssaaer(:,:,:)     ! aerosol single scattering albedo
+                                                      !    Dimensions: (ncol,nlay,nbndlw)
+                                                      !   for future expansion 
+                                                      !   (lw aerosols/scattering not yet available)
+!      real(kind=rb), intent(in) :: asmaer(:,:,:)     ! aerosol asymmetry parameter
+                                                      !    Dimensions: (ncol,nlay,nbndlw)
+                                                      !   for future expansion 
+                                                      !   (lw aerosols/scattering not yet available)
+
+
+! ----- Output -----
+
+      real(kind=rb), intent(out) :: uflx(:,:)         ! Total sky longwave upward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: dflx(:,:)         ! Total sky longwave downward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: hr(:,:)           ! Total sky longwave radiative heating rate (K/d)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(out) :: uflxc(:,:)        ! Clear sky longwave upward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: dflxc(:,:)        ! Clear sky longwave downward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: hrc(:,:)          ! Clear sky longwave radiative heating rate (K/d)
+                                                      !    Dimensions: (ncol,nlay)
+
+! ----- Optional Output -----
+      real(kind=rb), intent(out), optional :: duflx_dt(:,:)     
+                                                      ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out), optional :: duflxc_dt(:,:)    
+                                                      ! change in clear sky upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (ncol,nlay+1)
+
+! ----- Local -----
+
+! Control
+      integer(kind=im) :: nlayers             ! total number of layers
+      integer(kind=im) :: istart              ! beginning band of calculation
+      integer(kind=im) :: iend                ! ending band of calculation
+      integer(kind=im) :: iout                ! output option flag (inactive)
+      integer(kind=im) :: iaer                ! aerosol option flag
+      integer(kind=im) :: iplon               ! column loop index
+      integer(kind=im) :: imca                ! flag for mcica [0=off, 1=on]
+      integer(kind=im) :: k                   ! layer loop index
+      integer(kind=im) :: ig                  ! g-point loop index
+
+! Atmosphere
+      real(kind=rb) :: pavel(nlay+1)          ! layer pressures (mb) 
+      real(kind=rb) :: tavel(nlay+1)          ! layer temperatures (K)
+      real(kind=rb) :: pz(0:nlay+1)           ! level (interface) pressures (hPa, mb)
+      real(kind=rb) :: tz(0:nlay+1)           ! level (interface) temperatures (K)
+      real(kind=rb) :: tbound                 ! surface temperature (K)
+      real(kind=rb) :: coldry(nlay+1)         ! dry air column density (mol/cm2)
+      real(kind=rb) :: wbrodl(nlay+1)         ! broadening gas column density (mol/cm2)
+      real(kind=rb) :: wkl(mxmol,nlay+1)      ! molecular amounts (mol/cm-2)
+      real(kind=rb) :: wx(maxxsec,nlay+1)     ! cross-section amounts (mol/cm-2)
+      real(kind=rb) :: pwvcm                  ! precipitable water vapor (cm)
+      real(kind=rb) :: semiss(nbndlw)         ! lw surface emissivity
+      real(kind=rb) :: fracs(nlay+1,ngptlw)   ! 
+      real(kind=rb) :: taug(nlay+1,ngptlw)    ! gaseous optical depths
+      real(kind=rb) :: taut(nlay+1,ngptlw)    ! gaseous + aerosol optical depths
+
+      real(kind=rb) :: taua(nlay+1,nbndlw)    ! aerosol optical depth
+!      real(kind=rb) :: ssaa(nlay+1,nbndlw)   ! aerosol single scattering albedo
+                                              !   for future expansion 
+                                              !   (lw aerosols/scattering not yet available)
+!      real(kind=rb) :: asma(nlay+1,nbndlw)   ! aerosol asymmetry parameter
+                                              !   for future expansion 
+                                              !   (lw aerosols/scattering not yet available)
+
+! Atmosphere - setcoef
+      integer(kind=im) :: laytrop             ! tropopause layer index
+      integer(kind=im) :: jp(nlay+1)          ! lookup table index 
+      integer(kind=im) :: jt(nlay+1)          ! lookup table index 
+      integer(kind=im) :: jt1(nlay+1)         ! lookup table index 
+      real(kind=rb) :: planklay(nlay+1,nbndlw)! 
+      real(kind=rb) :: planklev(0:nlay+1,nbndlw)! 
+      real(kind=rb) :: plankbnd(nbndlw)       ! 
+      real(kind=rb) :: dplankbnd_dt(nbndlw)   ! 
+
+      real(kind=rb) :: colh2o(nlay+1)         ! column amount (h2o)
+      real(kind=rb) :: colco2(nlay+1)         ! column amount (co2)
+      real(kind=rb) :: colo3(nlay+1)          ! column amount (o3)
+      real(kind=rb) :: coln2o(nlay+1)         ! column amount (n2o)
+      real(kind=rb) :: colco(nlay+1)          ! column amount (co)
+      real(kind=rb) :: colch4(nlay+1)         ! column amount (ch4)
+      real(kind=rb) :: colo2(nlay+1)          ! column amount (o2)
+      real(kind=rb) :: colbrd(nlay+1)         ! column amount (broadening gases)
+
+      integer(kind=im) :: indself(nlay+1)
+      integer(kind=im) :: indfor(nlay+1)
+      real(kind=rb) :: selffac(nlay+1)
+      real(kind=rb) :: selffrac(nlay+1)
+      real(kind=rb) :: forfac(nlay+1)
+      real(kind=rb) :: forfrac(nlay+1)
+
+      integer(kind=im) :: indminor(nlay+1)
+      real(kind=rb) :: minorfrac(nlay+1)
+      real(kind=rb) :: scaleminor(nlay+1)
+      real(kind=rb) :: scaleminorn2(nlay+1)
+
+      real(kind=rb) :: &                      !
+                         fac00(nlay+1), fac01(nlay+1), &
+                         fac10(nlay+1), fac11(nlay+1) 
+      real(kind=rb) :: &                      !
+                         rat_h2oco2(nlay+1),rat_h2oco2_1(nlay+1), &
+                         rat_h2oo3(nlay+1),rat_h2oo3_1(nlay+1), &
+                         rat_h2on2o(nlay+1),rat_h2on2o_1(nlay+1), &
+                         rat_h2och4(nlay+1),rat_h2och4_1(nlay+1), &
+                         rat_n2oco2(nlay+1),rat_n2oco2_1(nlay+1), &
+                         rat_o3co2(nlay+1),rat_o3co2_1(nlay+1)
+
+! Atmosphere/clouds - cldprop
+      integer(kind=im) :: ncbands             ! number of cloud spectral bands
+      integer(kind=im) :: inflag              ! flag for cloud property method
+      integer(kind=im) :: iceflag             ! flag for ice cloud properties
+      integer(kind=im) :: liqflag             ! flag for liquid cloud properties
+
+      real(kind=rb) :: cldfrac(nlay+1)        ! layer cloud fraction
+      real(kind=rb) :: tauc(nbndlw,nlay+1)    ! in-cloud optical depth
+!      real(kind=rb) :: ssac(nbndlw,nlay+1)   ! in-cloud single scattering albedo
+                                              !   for future expansion 
+                                              !   (lw scattering not yet available)
+!      real(kind=rb) :: asmc(nbndlw,nlay+1)   ! in-cloud asymmetry parameter
+                                              !   for future expansion 
+                                              !   (lw scattering not yet available)
+      real(kind=rb) :: ciwp(nlay+1)           ! cloud ice water path
+      real(kind=rb) :: clwp(nlay+1)           ! cloud liquid water path
+      real(kind=rb) :: rel(nlay+1)            ! cloud liquid particle effective radius (microns)
+      real(kind=rb) :: rei(nlay+1)            ! cloud ice particle effective size (microns)
+      real(kind=rb) :: taucloud(nlay+1,nbndlw)! layer in-cloud optical depth
+
+! Output
+      real(kind=rb) :: totuflux(0:nlay+1)     ! upward longwave flux (w/m2)
+      real(kind=rb) :: totdflux(0:nlay+1)     ! downward longwave flux (w/m2)
+      real(kind=rb) :: fnet(0:nlay+1)         ! net longwave flux (w/m2)
+      real(kind=rb) :: htr(0:nlay+1)          ! longwave heating rate (k/day)
+      real(kind=rb) :: totuclfl(0:nlay+1)     ! clear sky upward longwave flux (w/m2)
+      real(kind=rb) :: totdclfl(0:nlay+1)     ! clear sky downward longwave flux (w/m2)
+      real(kind=rb) :: fnetc(0:nlay+1)        ! clear sky net longwave flux (w/m2)
+      real(kind=rb) :: htrc(0:nlay+1)         ! clear sky longwave heating rate (k/day)
+      real(kind=rb) :: dtotuflux_dt(0:nlay+1) ! change in upward longwave flux (w/m2/k)
+                                              ! with respect to surface temperature
+      real(kind=rb) :: dtotuclfl_dt(0:nlay+1) ! change in clear sky upward longwave flux (w/m2/k)
+                                              ! with respect to surface temperature
+
+!
+! Initializations
+
+      oneminus = 1._rb - 1.e-6_rb
+      pi = 2._rb*asin(1._rb)
+      fluxfac = pi * 2.e4_rb                  ! orig:   fluxfac = pi * 2.d4  
+      istart = 1
+      iend = 16
+      iout = 0
+
+! Set imca to select calculation type:
+!  imca = 0, use standard forward model calculation
+!  imca = 1, use McICA for Monte Carlo treatment of sub-grid cloud variability
+
+! *** This version does not use McICA (imca = 0) ***
+
+! Set default icld to select of clear or cloud calculation and cloud overlap method  
+! icld = 0, clear only
+! icld = 1, with clouds using random cloud overlap
+! icld = 2, with clouds using maximum/random cloud overlap
+! icld = 3, with clouds using maximum cloud overlap (McICA only)
+      if (icld.lt.0.or.icld.gt.3) icld = 2
+
+! Set iaer to select aerosol option
+! iaer = 0, no aerosols
+! icld = 10, input total aerosol optical depth (tauaer) directly
+      iaer = 10
+
+! Call model and data initialization, compute lookup tables, perform
+! reduction of g-points from 256 to 140 for input absorption coefficient 
+! data and other arrays.
+!
+! In a GCM this call should be placed in the model initialization
+! area, since this has to be called only once.  
+!      call rrtmg_lw_ini(cpdair)
+
+!  This is the main longitude/column loop within RRTMG.
+      do iplon = 1, ncol
+
+!  Prepare atmospheric profile from GCM for use in RRTMG, and define
+!  other input parameters.  
+
+         call inatm (iplon, nlay, icld, iaer, &
+              play, plev, tlay, tlev, tsfc, h2ovmr, &
+              o3vmr, co2vmr, ch4vmr, n2ovmr, o2vmr, cfc11vmr, cfc12vmr, &
+              cfc22vmr, ccl4vmr, emis, inflglw, iceflglw, liqflglw, &
+              cldfr, taucld, cicewp, cliqwp, reice, reliq, tauaer, &
+              nlayers, pavel, pz, tavel, tz, tbound, semiss, coldry, &
+              wkl, wbrodl, wx, pwvcm, inflag, iceflag, liqflag, &
+              cldfrac, tauc, ciwp, clwp, rei, rel, taua)
+
+!  For cloudy atmosphere, use cldprop to set cloud optical properties based on
+!  input cloud physical properties.  Select method based on choices described
+!  in cldprop.  Cloud fraction, water path, liquid droplet and ice particle
+!  effective radius must be passed into cldprop.  Cloud fraction and cloud
+!  optical depth are transferred to rrtmg_lw arrays in cldprop.  
+
+         call cldprop(nlayers, inflag, iceflag, liqflag, cldfrac, tauc, &
+                      ciwp, clwp, rei, rel, ncbands, taucloud)
+
+! Calculate information needed by the radiative transfer routine
+! that is specific to this atmosphere, especially some of the 
+! coefficients and indices needed to compute the optical depths
+! by interpolating data from stored reference atmospheres. 
+
+         call setcoef(nlayers, istart, pavel, tavel, tz, tbound, semiss, &
+                      coldry, wkl, wbrodl, &
+                      laytrop, jp, jt, jt1, planklay, planklev, plankbnd, &
+                      idrv, dplankbnd_dt, &
+                      colh2o, colco2, colo3, coln2o, colco, colch4, colo2, &
+                      colbrd, fac00, fac01, fac10, fac11, &
+                      rat_h2oco2, rat_h2oco2_1, rat_h2oo3, rat_h2oo3_1, &
+                      rat_h2on2o, rat_h2on2o_1, rat_h2och4, rat_h2och4_1, &
+                      rat_n2oco2, rat_n2oco2_1, rat_o3co2, rat_o3co2_1, &
+                      selffac, selffrac, indself, forfac, forfrac, indfor, &
+                      minorfrac, scaleminor, scaleminorn2, indminor)
+
+!  Calculate the gaseous optical depths and Planck fractions for 
+!  each longwave spectral band.
+
+         call taumol(nlayers, pavel, wx, coldry, &
+                     laytrop, jp, jt, jt1, planklay, planklev, plankbnd, &
+                     colh2o, colco2, colo3, coln2o, colco, colch4, colo2, &
+                     colbrd, fac00, fac01, fac10, fac11, &
+                     rat_h2oco2, rat_h2oco2_1, rat_h2oo3, rat_h2oo3_1, &
+                     rat_h2on2o, rat_h2on2o_1, rat_h2och4, rat_h2och4_1, &
+                     rat_n2oco2, rat_n2oco2_1, rat_o3co2, rat_o3co2_1, &
+                     selffac, selffrac, indself, forfac, forfrac, indfor, &
+                     minorfrac, scaleminor, scaleminorn2, indminor, &
+                     fracs, taug)
+
+! Combine gaseous and aerosol optical depths, if aerosol active
+         if (iaer .eq. 0) then
+            do k = 1, nlayers
+               do ig = 1, ngptlw
+                  taut(k,ig) = taug(k,ig)
+               enddo
+            enddo
+         elseif (iaer .eq. 10) then
+            do k = 1, nlayers
+               do ig = 1, ngptlw
+                  taut(k,ig) = taug(k,ig) + taua(k,ngb(ig))
+               enddo
+            enddo
+         endif
+
+! Call the radiative transfer routine.
+! Either routine can be called to do clear sky calculation.  If clouds
+! are present, then select routine based on cloud overlap assumption
+! to be used.  Clear sky calculation is done simultaneously.
+
+        if (icld .eq. 1) then
+           call rtrn(nlayers, istart, iend, iout, pz, semiss, ncbands, &
+                  cldfrac, taucloud, planklay, planklev, plankbnd, &
+                  pwvcm, fracs, taut, &
+                  totuflux, totdflux, fnet, htr, &
+                  totuclfl, totdclfl, fnetc, htrc, &
+                  idrv, dplankbnd_dt, dtotuflux_dt, dtotuclfl_dt )
+        else
+           call rtrnmr(nlayers, istart, iend, iout, pz, semiss, ncbands, &
+                  cldfrac, taucloud, planklay, planklev, plankbnd, &
+                  pwvcm, fracs, taut, &
+                  totuflux, totdflux, fnet, htr, &
+                  totuclfl, totdclfl, fnetc, htrc, &
+                  idrv, dplankbnd_dt, dtotuflux_dt, dtotuclfl_dt )
+        endif
+
+!  Transfer up and down fluxes and heating rate to output arrays.
+!  Vertical indexing goes from bottom to top; reverse here for GCM if necessary.
+
+           do k = 0, nlayers
+              uflx(iplon,k+1) = totuflux(k)
+              dflx(iplon,k+1) = totdflux(k)
+              uflxc(iplon,k+1) = totuclfl(k)
+              dflxc(iplon,k+1) = totdclfl(k)
+           enddo
+           do k = 0, nlayers-1
+              hr(iplon,k+1) = htr(k)
+              hrc(iplon,k+1) = htrc(k)
+           enddo
+
+!  If idrv=1 option is active, transfer upward flux derivatives to output arrays.
+
+         if (idrv .eq. 1) then 
+            do k = 0, nlayers
+               duflx_dt(iplon,k+1) = dtotuflux_dt(k)
+               duflxc_dt(iplon,k+1) = dtotuclfl_dt(k)
+            enddo
+         endif
+
+! End longitude/column loop
+      enddo
+
+      end subroutine rrtmg_lw
+
+!***************************************************************************
+      subroutine inatm (iplon, nlay, icld, iaer, &
+              play, plev, tlay, tlev, tsfc, h2ovmr, &
+              o3vmr, co2vmr, ch4vmr, n2ovmr, o2vmr, cfc11vmr, cfc12vmr, &
+              cfc22vmr, ccl4vmr, emis, inflglw, iceflglw, liqflglw, &
+              cldfr, taucld, cicewp, cliqwp, reice, reliq, tauaer, &
+              nlayers, pavel, pz, tavel, tz, tbound, semiss, coldry, &
+              wkl, wbrodl, wx, pwvcm, inflag, iceflag, liqflag, &
+              cldfrac, tauc, ciwp, clwp, rei, rel, taua)
+!***************************************************************************
+!
+!  Input atmospheric profile from GCM, and prepare it for use in RRTMG_LW.
+!  Set other RRTMG_LW input parameters.  
+!
+!***************************************************************************
+
+! --------- Modules ----------
+
+      use parrrtm, only : nbndlw, ngptlw, nmol, maxxsec, mxmol
+      use rrlw_con, only: fluxfac, heatfac, oneminus, pi, grav, avogad
+      use rrlw_wvn, only: ng, nspa, nspb, wavenum1, wavenum2, delwave, ixindx
+
+! ------- Declarations -------
+
+! ----- Input -----
+! Note: All volume mixing ratios are in dimensionless units of mole fraction obtained
+! by scaling mass mixing ratio (g/g) with the appropriate molecular weights (g/mol) 
+      integer(kind=im), intent(in) :: iplon           ! column loop index
+      integer(kind=im), intent(in) :: nlay            ! Number of model layers
+      integer(kind=im), intent(in) :: icld            ! clear/cloud and cloud overlap flag
+      integer(kind=im), intent(in) :: iaer            ! aerosol option flag
+
+      real(kind=rb), intent(in) :: play(:,:)          ! Layer pressures (hPa, mb)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: plev(:,:)          ! Interface pressures (hPa, mb)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tlay(:,:)          ! Layer temperatures (K)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: tlev(:,:)          ! Interface temperatures (K)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tsfc(:)            ! Surface temperature (K)
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: h2ovmr(:,:)        ! H2O volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o3vmr(:,:)         ! O3 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: co2vmr(:,:)        ! CO2 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: ch4vmr(:,:)        ! Methane volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: n2ovmr(:,:)        ! Nitrous oxide volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o2vmr(:,:)         ! Oxygen volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cfc11vmr(:,:)      ! CFC11 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cfc12vmr(:,:)      ! CFC12 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cfc22vmr(:,:)      ! CFC22 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: ccl4vmr(:,:)       ! CCL4 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: emis(:,:)          ! Surface emissivity
+                                                      !    Dimensions: (ncol,nbndlw)
+
+      integer(kind=im), intent(in) :: inflglw         ! Flag for cloud optical properties
+      integer(kind=im), intent(in) :: iceflglw        ! Flag for ice particle specification
+      integer(kind=im), intent(in) :: liqflglw        ! Flag for liquid droplet specification
+
+      real(kind=rb), intent(in) :: cldfr(:,:)         ! Cloud fraction
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cicewp(:,:)        ! Cloud ice water path (g/m2)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cliqwp(:,:)        ! Cloud liquid water path (g/m2)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: reice(:,:)         ! Cloud ice effective size (microns)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: reliq(:,:)         ! Cloud water drop effective radius (microns)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: taucld(:,:,:)      ! In-cloud optical depth
+                                                      !    Dimensions: (nbndlw,ncol,nlay)
+      real(kind=rb), intent(in) :: tauaer(:,:,:)      ! Aerosol optical depth
+                                                      !    Dimensions: (ncol,nlay,nbndlw)
+
+! ----- Output -----
+! Atmosphere
+      integer(kind=im), intent(out) :: nlayers        ! number of layers
+
+      real(kind=rb), intent(out) :: pavel(:)          ! layer pressures (mb) 
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: tavel(:)          ! layer temperatures (K)
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: pz(0:)            ! level (interface) pressures (hPa, mb)
+                                                      !    Dimensions: (0:nlay)
+      real(kind=rb), intent(out) :: tz(0:)            ! level (interface) temperatures (K)
+                                                      !    Dimensions: (0:nlay)
+      real(kind=rb), intent(out) :: tbound            ! surface temperature (K)
+      real(kind=rb), intent(out) :: coldry(:)         ! dry air column density (mol/cm2)
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: wbrodl(:)         ! broadening gas column density (mol/cm2)
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: wkl(:,:)          ! molecular amounts (mol/cm-2)
+                                                      !    Dimensions: (mxmol,nlay)
+      real(kind=rb), intent(out) :: wx(:,:)           ! cross-section amounts (mol/cm-2)
+                                                      !    Dimensions: (maxxsec,nlay)
+      real(kind=rb), intent(out) :: pwvcm             ! precipitable water vapor (cm)
+      real(kind=rb), intent(out) :: semiss(:)         ! lw surface emissivity
+                                                      !    Dimensions: (nbndlw)
+
+! Atmosphere/clouds - cldprop
+      integer(kind=im), intent(out) :: inflag         ! flag for cloud property method
+      integer(kind=im), intent(out) :: iceflag        ! flag for ice cloud properties
+      integer(kind=im), intent(out) :: liqflag        ! flag for liquid cloud properties
+
+      real(kind=rb), intent(out) :: cldfrac(:)        ! layer cloud fraction
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: ciwp(:)           ! cloud ice water path
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: clwp(:)           ! cloud liquid water path
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: rel(:)            ! cloud liquid particle effective radius (microns)
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: rei(:)            ! cloud ice particle effective size (microns)
+                                                      !    Dimensions: (nlay)
+      real(kind=rb), intent(out) :: tauc(:,:)         ! in-cloud optical depth
+                                                      !    Dimensions: (nbndlw,nlay)
+      real(kind=rb), intent(out) :: taua(:,:)         ! aerosol optical depth
+                                                      !    Dimensions: (nlay,nbndlw)
+
+
+! ----- Local -----
+      real(kind=rb), parameter :: amd = 28.9660_rb    ! Effective molecular weight of dry air (g/mol)
+      real(kind=rb), parameter :: amw = 18.0160_rb    ! Molecular weight of water vapor (g/mol)
+!      real(kind=rb), parameter :: amc = 44.0098_rb    ! Molecular weight of carbon dioxide (g/mol)
+!      real(kind=rb), parameter :: amo = 47.9998_rb    ! Molecular weight of ozone (g/mol)
+!      real(kind=rb), parameter :: amo2 = 31.9999_rb   ! Molecular weight of oxygen (g/mol)
+!      real(kind=rb), parameter :: amch4 = 16.0430_rb  ! Molecular weight of methane (g/mol)
+!      real(kind=rb), parameter :: amn2o = 44.0128_rb  ! Molecular weight of nitrous oxide (g/mol)
+!      real(kind=rb), parameter :: amc11 = 137.3684_rb ! Molecular weight of CFC11 (g/mol) - CCL3F
+!      real(kind=rb), parameter :: amc12 = 120.9138_rb ! Molecular weight of CFC12 (g/mol) - CCL2F2
+!      real(kind=rb), parameter :: amc22 = 86.4688_rb  ! Molecular weight of CFC22 (g/mol) - CHCLF2
+!      real(kind=rb), parameter :: amcl4 = 153.823_rb  ! Molecular weight of CCL4 (g/mol) - CCL4
+
+! Set molecular weight ratios (for converting mmr to vmr)
+!  e.g. h2ovmr = h2ommr * amdw)
+      real(kind=rb), parameter :: amdw = 1.607793_rb  ! Molecular weight of dry air / water vapor
+      real(kind=rb), parameter :: amdc = 0.658114_rb  ! Molecular weight of dry air / carbon dioxide
+      real(kind=rb), parameter :: amdo = 0.603428_rb  ! Molecular weight of dry air / ozone
+      real(kind=rb), parameter :: amdm = 1.805423_rb  ! Molecular weight of dry air / methane
+      real(kind=rb), parameter :: amdn = 0.658090_rb  ! Molecular weight of dry air / nitrous oxide
+      real(kind=rb), parameter :: amdo2 = 0.905140_rb ! Molecular weight of dry air / oxygen
+      real(kind=rb), parameter :: amdc1 = 0.210852_rb ! Molecular weight of dry air / CFC11
+      real(kind=rb), parameter :: amdc2 = 0.239546_rb ! Molecular weight of dry air / CFC12
+
+      integer(kind=im) :: isp, l, ix, n, imol, ib       ! Loop indices
+      real(kind=rb) :: amm, amttl, wvttl, wvsh, summol  
+
+! Add one to nlayers here to include extra model layer at top of atmosphere
+      nlayers = nlay
+
+!  Initialize all molecular amounts and cloud properties to zero here, then pass input amounts
+!  into RRTM arrays below.
+
+      wkl(:,:) = 0.0_rb
+      wx(:,:) = 0.0_rb
+      cldfrac(:) = 0.0_rb
+      tauc(:,:) = 0.0_rb
+      ciwp(:) = 0.0_rb
+      clwp(:) = 0.0_rb
+      rei(:) = 0.0_rb
+      rel(:) = 0.0_rb
+      taua(:,:) = 0.0_rb
+      amttl = 0.0_rb
+      wvttl = 0.0_rb
+ 
+!  Set surface temperature.
+      tbound = tsfc(iplon)
+
+!  Install input GCM arrays into RRTMG_LW arrays for pressure, temperature,
+!  and molecular amounts.  
+!  Pressures are input in mb, or are converted to mb here.
+!  Molecular amounts are input in volume mixing ratio, or are converted from 
+!  mass mixing ratio (or specific humidity for h2o) to volume mixing ratio
+!  here. These are then converted to molecular amount (molec/cm2) below.  
+!  The dry air column COLDRY (in molec/cm2) is calculated from the level 
+!  pressures, pz (in mb), based on the hydrostatic equation and includes a 
+!  correction to account for h2o in the layer.  The molecular weight of moist 
+!  air (amm) is calculated for each layer.  
+!  Note: In RRTMG, layer indexing goes from bottom to top, and coding below
+!  assumes GCM input fields are also bottom to top. Input layer indexing
+!  from GCM fields should be reversed here if necessary.
+
+      pz(0) = plev(iplon,1)
+      tz(0) = tlev(iplon,1)
+      do l = 1, nlayers
+         pavel(l) = play(iplon,l)
+         tavel(l) = tlay(iplon,l)
+         pz(l) = plev(iplon,l+1)
+         tz(l) = tlev(iplon,l+1)
+! For h2o input in vmr:
+         wkl(1,l) = h2ovmr(iplon,l)
+! For h2o input in mmr:
+!         wkl(1,l) = h2o(iplon,l)*amdw
+! For h2o input in specific humidity;
+!         wkl(1,l) = (h2o(iplon,l)/(1._rb - h2o(iplon,l)))*amdw
+         wkl(2,l) = co2vmr(iplon,l)
+         wkl(3,l) = o3vmr(iplon,l)
+         wkl(4,l) = n2ovmr(iplon,l)
+         wkl(6,l) = ch4vmr(iplon,l)
+         wkl(7,l) = o2vmr(iplon,l)
+         amm = (1._rb - wkl(1,l)) * amd + wkl(1,l) * amw            
+         coldry(l) = (pz(l-1)-pz(l)) * 1.e3_rb * avogad / &
+                     (1.e2_rb * grav * amm * (1._rb + wkl(1,l)))
+      enddo
+
+! Set cross section molecule amounts from input; convert to vmr if necessary
+      do l=1, nlayers
+         wx(1,l) = ccl4vmr(iplon,l)
+         wx(2,l) = cfc11vmr(iplon,l)
+         wx(3,l) = cfc12vmr(iplon,l)
+         wx(4,l) = cfc22vmr(iplon,l)
+      enddo      
+
+! The following section can be used to set values for an additional layer (from
+! the GCM top level to 1.e-4 mb) for improved calculation of TOA fluxes. 
+! Temperature and molecular amounts in the extra model layer are set to 
+! their values in the top GCM model layer, though these can be modified
+! here if necessary. 
+! If this feature is utilized, increase nlayers by one above, limit the two
+! loops above to (nlayers-1), and set the top most (extra) layer values here. 
+
+!      pavel(nlayers) = 0.5_rb * pz(nlayers-1)
+!      tavel(nlayers) = tavel(nlayers-1)
+!      pz(nlayers) = 1.e-4_rb
+!      tz(nlayers-1) = 0.5_rb * (tavel(nlayers)+tavel(nlayers-1))
+!      tz(nlayers) = tz(nlayers-1)
+!      wkl(1,nlayers) = wkl(1,nlayers-1)
+!      wkl(2,nlayers) = wkl(2,nlayers-1)
+!      wkl(3,nlayers) = wkl(3,nlayers-1)
+!      wkl(4,nlayers) = wkl(4,nlayers-1)
+!      wkl(6,nlayers) = wkl(6,nlayers-1)
+!      wkl(7,nlayers) = wkl(7,nlayers-1)
+!      amm = (1._rb - wkl(1,nlayers-1)) * amd + wkl(1,nlayers-1) * amw
+!      coldry(nlayers) = (pz(nlayers-1)) * 1.e3_rb * avogad / &
+!                        (1.e2_rb * grav * amm * (1._rb + wkl(1,nlayers-1)))
+!      wx(1,nlayers) = wx(1,nlayers-1)
+!      wx(2,nlayers) = wx(2,nlayers-1)
+!      wx(3,nlayers) = wx(3,nlayers-1)
+!      wx(4,nlayers) = wx(4,nlayers-1)
+
+! At this point all moleculular amounts in wkl and wx are in volume mixing ratio; 
+! convert to molec/cm2 based on coldry for use in rrtm.  also, compute precipitable
+! water vapor for diffusivity angle adjustments in rtrn and rtrnmr.
+
+      do l = 1, nlayers
+         summol = 0.0_rb
+         do imol = 2, nmol
+            summol = summol + wkl(imol,l)
+         enddo
+         wbrodl(l) = coldry(l) * (1._rb - summol)
+         do imol = 1, nmol
+            wkl(imol,l) = coldry(l) * wkl(imol,l)
+         enddo
+         amttl = amttl + coldry(l)+wkl(1,l)
+         wvttl = wvttl + wkl(1,l)
+         do ix = 1,maxxsec
+            if (ixindx(ix) .ne. 0) then
+               wx(ixindx(ix),l) = coldry(l) * wx(ix,l) * 1.e-20_rb
+            endif
+         enddo
+      enddo
+
+      wvsh = (amw * wvttl) / (amd * amttl)
+      pwvcm = wvsh * (1.e3_rb * pz(0)) / (1.e2_rb * grav)
+
+! Set spectral surface emissivity for each longwave band.  
+
+      do n=1,nbndlw
+         semiss(n) = emis(iplon,n)
+!          semiss(n) = 1.0_rb
+      enddo
+
+! Transfer aerosol optical properties to RRTM variable;
+! modify to reverse layer indexing here if necessary.
+
+     if (iaer .ge. 1) then
+        do l = 1, nlayers
+           do ib = 1, nbndlw
+              taua(l,ib) = tauaer(iplon,l,ib)
+           enddo
+        enddo
+      endif
+
+! Transfer cloud fraction and cloud optical properties to RRTM variables,
+! modify to reverse layer indexing here if necessary.
+
+      if (icld .ge. 1) then 
+         inflag = inflglw
+         iceflag = iceflglw
+         liqflag = liqflglw
+
+! Move incoming GCM cloud arrays to RRTMG cloud arrays.
+! For GCM input, incoming reice is defined based on selected ice parameterization (inflglw)
+
+         do l = 1, nlayers
+            cldfrac(l) = cldfr(iplon,l)
+            ciwp(l) = cicewp(iplon,l)
+            clwp(l) = cliqwp(iplon,l)
+            rei(l) = reice(iplon,l)
+            rel(l) = reliq(iplon,l)
+            do n=1,nbndlw
+               tauc(n,l) = taucld(n,iplon,l)
+!               ssac(n,l) = ssacld(n,iplon,l)
+!               asmc(n,l) = asmcld(n,iplon,l)
+            enddo
+         enddo
+
+! If an extra layer is being used in RRTMG, set all cloud properties to zero in the extra layer.
+
+!         cldfrac(nlayers) = 0.0_rb
+!         tauc(:nbndlw,nlayers) = 0.0_rb
+!         ciwp(nlayers) = 0.0_rb
+!         clwp(nlayers) = 0.0_rb
+!         rei(nlayers) = 0.0_rb
+!         rel(nlayers) = 0.0_rb
+!         taua(nlayers,:) = 0.0_rb
+
+      endif
+      
+      end subroutine inatm
+
+      end module rrtmg_lw_rad
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_read_nc.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_read_nc.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_read_nc.f90	(revision 3477)
@@ -0,0 +1,1032 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_read_nc.f90,v $
+!     author:    $Author: mike $
+!     revision:  $Revision: 1.1 $
+!     created:   $Date: 2009/05/22 21:02:13 $
+!
+
+!=============================================================================== 
+! rrtmg_lw_read_nc.f90
+!
+! Description: This program reads all of the RRTM longwave data from a NetCDF
+!              file in band by band subroutines, as a replacement for the 
+!              rrtmg_lw_k_g.f90 data statements.
+!
+! Written By: Patrick Hofmann
+! Last Update: 1/23/2009
+!===============================================================================
+
+!*******************************************************************************
+subroutine lw_kgb01
+	use rrlw_kg01, only : fracrefao, fracrefbo, kao, kbo, kao_mn2, kbo_mn2, &
+						selfrefo, forrefo, no1
+	use rrlw_ncpar
+	use netcdf
+	
+	implicit none
+	save 
+	
+	integer(kind=im) :: ab
+	integer(kind=im), parameter :: bandNumber = 1, numGPoints = no1
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for N2
+	call getAbsorberIndex('N2',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mn2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, kbo_mn2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb01
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb02
+        use rrlw_kg02, only : fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, no2
+        use rrlw_ncpar
+	use netcdf
+    
+        implicit none
+        save
+		
+   	integer(kind=im), parameter :: bandNumber = 2
+	integer(kind=im), parameter :: numGPoints = no2
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb02
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb03
+        use rrlw_kg03, only : fracrefao, fracrefbo, kao, kbo, kao_mn2o, &
+                          kbo_mn2o, selfrefo, forrefo, no3
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+	integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 3
+	integer(kind=im), parameter :: numGPoints = no3
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keylower,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keyupper,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keyupper,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for N2
+	call getAbsorberIndex('N2O',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mn2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,T,numGPoints,1,1,1/))
+	
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, kbo_mn2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/keyupper,T,numGPoints,1,1,1/))
+
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb03
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb04
+        use rrlw_kg04, only : fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, no4
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+		
+        integer(kind=im), parameter :: bandNumber = 4
+	integer(kind=im), parameter :: numGPoints = no4
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keylower,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo(:,1:5), &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keyupper,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keyupper,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb04
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb05
+        use rrlw_kg05, only : fracrefao, fracrefbo, kao, kbo, kao_mo3, &
+                          selfrefo, forrefo, ccl4o, no5
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    
+        integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 5
+	integer(kind=im), parameter :: numGPoints = no5
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keylower,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keyupper,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, & 
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keyupper,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for O3
+	call getAbsorberIndex('O3',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mo3, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for CCL4
+	call getAbsorberIndex('CCL4',ab)
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, ccl4o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb05
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb06
+        use rrlw_kg06, only : fracrefao, kao, kao_mco2, selfrefo, forrefo, &
+                          cfc11adjo, cfc12o, no6
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+	integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 6
+	integer(kind=im), parameter :: numGPoints = no6
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(9)   = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+
+	!Get absorber index for CO2
+	call getAbsorberIndex('CO2',ab)
+	status(12)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(13)  = nf90_get_var(ncid, varID, kao_mco2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for CFC11
+	call getAbsorberIndex('CFC11',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, cfc11adjo, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+	
+	!Get absorber index for CFC12
+	call getAbsorberIndex('CFC12',ab)
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, cfc12o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb06
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb07	
+        use rrlw_kg07, only : fracrefao, fracrefbo, kao, kbo, kao_mco2, &
+                          kbo_mco2, selfrefo, forrefo, no7
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+        integer(kind=im) :: ab
+   	integer(kind=im), parameter :: bandNumber = 7
+	integer(kind=im), parameter :: numGPoints = no7
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keylower,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, & 
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for CO2
+	call getAbsorberIndex('CO2',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mco2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,T,numGPoints,1,1,1/))
+	
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, kbo_mco2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb07
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb08		
+        use rrlw_kg08, only : fracrefao, fracrefbo, kao, kao_mco2, kao_mn2o, &
+                          kao_mo3, kbo, kbo_mco2, kbo_mn2o, selfrefo, forrefo, &
+                          cfc12o, cfc22adjo, no8
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+        integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 8
+	integer(kind=im), parameter :: numGPoints = no8
+        integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+        status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for O3
+	call getAbsorberIndex('O3',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mo3, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for CO2
+	call getAbsorberIndex('CO2',ab)
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, kao_mco2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	status(18)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(19)  = nf90_get_var(ncid, varID, kbo_mco2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for N2O
+	call getAbsorberIndex('N2O',ab)
+	status(20)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(21)  = nf90_get_var(ncid, varID, kao_mn2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	status(22)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(23)  = nf90_get_var(ncid, varID, kbo_mn2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for CFC12
+	call getAbsorberIndex('CFC12',ab)
+	status(24)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(25)  = nf90_get_var(ncid, varID, cfc12o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+	
+	!Get absorber index for CFC22
+	call getAbsorberIndex('CFC22',ab)
+	status(26)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(27)  = nf90_get_var(ncid, varID, cfc22adjo, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb08
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb09	
+        use rrlw_kg09, only : fracrefao, fracrefbo, kao, kbo, kao_mn2o, &
+                            kbo_mn2o, selfrefo, forrefo, no9
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+        integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 9
+	integer(kind=im), parameter :: numGPoints = no9
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,keylower,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+
+	!Get absorber index for N2O
+	call getAbsorberIndex('N2O',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mn2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/keylower,T,numGPoints,1,1,1/))
+	
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, kbo_mn2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb09
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb10		
+        use rrlw_kg10, only : fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, no10
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+   	integer(kind=im), parameter :: bandNumber = 10
+	integer(kind=im), parameter :: numGPoints = no10
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb10
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb11
+        use rrlw_kg11, only : fracrefao, fracrefbo, kao, kbo, kao_mo2, &
+                          kbo_mo2, selfrefo, forrefo, no11
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+	integer(kind=im) :: ab
+	integer(kind=im), parameter :: bandNumber = 11
+	integer(kind=im), parameter :: numGPoints = no11
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)   = nf90_NoErr
+	status(1)   = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)   = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)   = nf90_get_var(ncid, varID, fracrefao, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(4)   = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)   = nf90_get_var(ncid, varID, fracrefbo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/numGPoints,1,1,1/))
+	
+	status(6)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)   = nf90_get_var(ncid, varID, kao, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)   = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)   = nf90_get_var(ncid, varID, kbo, &
+                      start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                      count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11)  = nf90_get_var(ncid, varID, selfrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tself,numGPoints,1,1/))
+	
+	status(12)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13)  = nf90_get_var(ncid, varID, forrefo, &
+                      start = (/1,1,bandNumber,gPointSetNumber/), &
+                      count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for O2
+	call getAbsorberIndex('O2',ab)
+	status(14)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15)  = nf90_get_var(ncid, varID, kao_mo2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, kbo_mo2, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,T,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb11
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb12
+        use rrlw_kg12, only : fracrefao, kao, selfrefo, forrefo, no12
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+		
+	integer(kind=im), parameter :: bandNumber = 12
+	integer(kind=im), parameter :: numGPoints = no12
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:) = nf90_NoErr
+	status(1) = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2) = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3) = nf90_get_var(ncid, varID, fracrefao, &
+                    start = (/1,1,bandNumber,gPointSetNumber/), &
+                    count = (/numGPoints,keylower,1,1/))
+	
+	status(4) = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(5) = nf90_get_var(ncid, varID, kao, &
+                    start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                    count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(6) = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(7) = nf90_get_var(ncid, varID, selfrefo, &
+                    start = (/1,1,bandNumber,gPointSetNumber/), &
+                    count = (/Tself,numGPoints,1,1/))
+	
+	status(8) = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(9) = nf90_get_var(ncid, varID, forrefo, &
+                    start = (/1,1,bandNumber,gPointSetNumber/), &
+                    count = (/Tforeign,numGPoints,1,1/))
+
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb12
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb13		
+        use rrlw_kg13, only : fracrefao, fracrefbo, kao, kao_mco2, kao_mco, &
+                          kbo_mo3, selfrefo, forrefo, no13
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    
+        integer(kind=im) :: ab
+	integer(kind=im), parameter :: bandNumber = 13
+	integer(kind=im), parameter :: numGPoints = no13  
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, fracrefao, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, fracrefbo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/),  &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(9)  = nf90_get_var(ncid, varID, selfrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, forrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for O3
+	call getAbsorberIndex('O3',ab)
+	status(12) = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, kbo_mo3, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/1,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for CO2
+	call getAbsorberIndex('CO2',ab)
+	status(14) = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(15) = nf90_get_var(ncid, varID, kao_mco2, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,T,numGPoints,1,1,1/))
+	
+	!Get absorber index for CO
+	call getAbsorberIndex('CO',ab)
+	status(16) = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+        status(17) = nf90_get_var(ncid, varID, kao_mco, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,T,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb13
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb14	
+        use rrlw_kg14, only : fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, no14
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+	integer(kind=im), parameter :: bandNumber = 14
+	integer(kind=im), parameter :: numGPoints = no14
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, fracrefao, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, fracrefbo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeign,numGPoints,1,1/))
+
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb14
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb15	
+        use rrlw_kg15, only : fracrefao, kao, kao_mn2, selfrefo, forrefo, no15
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    
+        integer(kind=im) :: ab
+ 	integer(kind=im), parameter :: bandNumber = 15
+	integer(kind=im), parameter :: numGPoints = no15
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, fracrefao, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(6)  = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(7)  = nf90_get_var(ncid, varID, selfrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(9)  = nf90_get_var(ncid, varID, forrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeign,numGPoints,1,1/))
+	
+	!Get absorber index for N2
+	call getAbsorberIndex('N2',ab)
+	status(10) = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(11) = nf90_get_var(ncid, varID, kao_mn2, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,T,numGPoints,1,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb15
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine lw_kgb16		
+        use rrlw_kg16, only : fracrefao, fracrefbo, kao, kbo, selfrefo, forrefo, no16
+	use rrlw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	  
+        integer(kind=im), parameter :: bandNumber = 16
+ 	integer(kind=im), parameter :: numGPoints = no16
+        integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+        status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_lw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"PlanckFractionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, fracrefao, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"PlanckFractionUpperAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, fracrefbo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H20SelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H20ForeignAbsorptionCoefficients",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeign,numGPoints,1,1/))
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading variables from file" 
+	
+	status(1) = nf90_close(ncid)
+	
+end subroutine lw_kgb16
+!*******************************************************************************
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrn.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrn.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrn.f90	(revision 3477)
@@ -0,0 +1,590 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_rtrn.f90,v $
+!     author:    $Author: mike $
+!     revision:  $Revision: 1.7 $
+!     created:   $Date: 2009/11/12 20:52:25 $
+!
+      module rrtmg_lw_rtrn
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! --------- Modules ----------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : mg, nbndlw, ngptlw
+      use rrlw_con, only: fluxfac, heatfac
+      use rrlw_wvn, only: delwave, ngs
+      use rrlw_tbl, only: tblint, bpade, tau_tbl, exp_tbl, tfn_tbl
+      use rrlw_vsn, only: hvrrtr, hnamrtr
+
+      implicit none
+
+      contains
+
+!-----------------------------------------------------------------------------
+      subroutine rtrn(nlayers, istart, iend, iout, pz, semiss, ncbands, &
+                      cldfrac, taucloud, planklay, planklev, plankbnd, &
+                      pwvcm, fracs, taut, & 
+                      totuflux, totdflux, fnet, htr, &
+                      totuclfl, totdclfl, fnetc, htrc, &
+                      idrv, dplankbnd_dt, dtotuflux_dt, dtotuclfl_dt )
+!-----------------------------------------------------------------------------
+!
+!  Original version:   E. J. Mlawer, et al. RRTM_V3.0
+!  Revision for GCMs:  Michael J. Iacono; October, 2002
+!  Revision for F90:  Michael J. Iacono; June, 2006
+!  Revision for dFdT option: M. J. Iacono and E. J. Mlawer, November 2009
+!
+!  This program calculates the upward fluxes, downward fluxes, and
+!  heating rates for an arbitrary clear or cloudy atmosphere.  The input
+!  to this program is the atmospheric profile, all Planck function
+!  information, and the cloud fraction by layer.  A variable diffusivity 
+!  angle (SECDIFF) is used for the angle integration.  Bands 2-3 and 5-9 
+!  use a value for SECDIFF that varies from 1.50 to 1.80 as a function of 
+!  the column water vapor, and other bands use a value of 1.66.  The Gaussian 
+!  weight appropriate to this angle (WTDIFF=0.5) is applied here.  Note that 
+!  use of the emissivity angle for the flux integration can cause errors of 
+!  1 to 4 W/m2 within cloudy layers.  
+!  Clouds are treated with a random cloud overlap method.
+!  This subroutine also provides the optional capability to calculate
+!  the derivative of upward flux respect to surface temperature using
+!  the pre-tabulated derivative of the Planck function with respect to 
+!  temperature integrated over each spectral band.
+!***************************************************************************
+
+! ------- Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: istart          ! beginning band of calculation
+      integer(kind=im), intent(in) :: iend            ! ending band of calculation
+      integer(kind=im), intent(in) :: iout            ! output option flag
+
+! Atmosphere
+      real(kind=rb), intent(in) :: pz(0:)             ! level (interface) pressures (hPa, mb)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: pwvcm              ! precipitable water vapor (cm)
+      real(kind=rb), intent(in) :: semiss(:)          ! lw surface emissivity
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(in) :: planklay(:,:)      ! 
+                                                      !    Dimensions: (nlayers,nbndlw)
+      real(kind=rb), intent(in) :: planklev(0:,:)     ! 
+                                                      !    Dimensions: (0:nlayers,nbndlw)
+      real(kind=rb), intent(in) :: plankbnd(:)        ! 
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(in) :: fracs(:,:)         ! 
+                                                      !    Dimensions: (nlayers,ngptw)
+      real(kind=rb), intent(in) :: taut(:,:)          ! gaseous + aerosol optical depths
+                                                      !    Dimensions: (nlayers,ngptlw)
+
+! Clouds
+      integer(kind=im), intent(in) :: ncbands         ! number of cloud spectral bands
+      real(kind=rb), intent(in) :: cldfrac(:)         ! layer cloud fraction
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: taucloud(:,:)      ! layer cloud optical depth
+                                                      !    Dimensions: (nlayers,nbndlw)
+      integer(kind=im), intent(in) :: idrv            ! flag for calculation of dF/dt from 
+                                                      ! Planck derivative [0=off, 1=on]
+      real(kind=rb), intent(in) :: dplankbnd_dt(:)    ! derivative of Planck function wrt temp
+                                                      !    Dimensions: (nbndlw)
+
+! ----- Output -----
+      real(kind=rb), intent(out) :: totuflux(0:)      ! upward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totdflux(0:)      ! downward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: fnet(0:)          ! net longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: htr(0:)           ! longwave heating rate (k/day)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totuclfl(0:)      ! clear sky upward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totdclfl(0:)      ! clear sky downward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: fnetc(0:)         ! clear sky net longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: htrc(0:)          ! clear sky longwave heating rate (k/day)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: dtotuflux_dt(0:)  ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: dtotuclfl_dt(0:)  ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (0:nlayers)
+
+! ----- Local -----
+! Declarations for radiative transfer
+      real(kind=rb) :: abscld(nlayers,nbndlw)
+      real(kind=rb) :: atot(nlayers)
+      real(kind=rb) :: atrans(nlayers)
+      real(kind=rb) :: bbugas(nlayers)
+      real(kind=rb) :: bbutot(nlayers)
+      real(kind=rb) :: clrurad(0:nlayers)
+      real(kind=rb) :: clrdrad(0:nlayers)
+      real(kind=rb) :: efclfrac(nlayers,nbndlw)
+      real(kind=rb) :: uflux(0:nlayers)
+      real(kind=rb) :: dflux(0:nlayers)
+      real(kind=rb) :: urad(0:nlayers)
+      real(kind=rb) :: drad(0:nlayers)
+      real(kind=rb) :: uclfl(0:nlayers)
+      real(kind=rb) :: dclfl(0:nlayers)
+      real(kind=rb) :: odcld(nlayers,nbndlw)
+
+
+      real(kind=rb) :: secdiff(nbndlw)                 ! secant of diffusivity angle
+      real(kind=rb) :: a0(nbndlw),a1(nbndlw),a2(nbndlw)! diffusivity angle adjustment coefficients
+      real(kind=rb) :: wtdiff, rec_6
+      real(kind=rb) :: transcld, radld, radclrd, plfrac, blay, dplankup, dplankdn
+      real(kind=rb) :: odepth, odtot, odepth_rec, odtot_rec, gassrc
+      real(kind=rb) :: tblind, tfactot, bbd, bbdtot, tfacgas, transc, tausfac
+      real(kind=rb) :: rad0, reflect, radlu, radclru
+
+      real(kind=rb) :: duflux_dt(0:nlayers)
+      real(kind=rb) :: duclfl_dt(0:nlayers)
+      real(kind=rb) :: d_urad_dt(0:nlayers)
+      real(kind=rb) :: d_clrurad_dt(0:nlayers)
+      real(kind=rb) :: d_rad0_dt, d_radlu_dt, d_radclru_dt
+
+      integer(kind=im) :: icldlyr(nlayers)             ! flag for cloud in layer
+      integer(kind=im) :: ibnd, ib, iband, lay, lev, l ! loop indices
+      integer(kind=im) :: igc                          ! g-point interval counter
+      integer(kind=im) :: iclddn                       ! flag for cloud in down path
+      integer(kind=im) :: ittot, itgas, itr            ! lookup table indices
+      integer(kind=im) :: ipat(16,0:2)
+
+
+! ------- Definitions -------
+! input
+!    nlayers                      ! number of model layers
+!    ngptlw                       ! total number of g-point subintervals
+!    nbndlw                       ! number of longwave spectral bands
+!    ncbands                      ! number of spectral bands for clouds
+!    secdiff                      ! diffusivity angle
+!    wtdiff                       ! weight for radiance to flux conversion
+!    pavel                        ! layer pressures (mb)
+!    pz                           ! level (interface) pressures (mb)
+!    tavel                        ! layer temperatures (k)
+!    tz                           ! level (interface) temperatures(mb)
+!    tbound                       ! surface temperature (k)
+!    cldfrac                      ! layer cloud fraction
+!    taucloud                     ! layer cloud optical depth
+!    itr                          ! integer look-up table index
+!    icldlyr                      ! flag for cloudy layers
+!    iclddn                       ! flag for cloud in column at any layer
+!    semiss                       ! surface emissivities for each band
+!    reflect                      ! surface reflectance
+!    bpade                        ! 1/(pade constant)
+!    tau_tbl                      ! clear sky optical depth look-up table
+!    exp_tbl                      ! exponential look-up table for transmittance
+!    tfn_tbl                      ! tau transition function look-up table
+
+! local
+!    atrans                       ! gaseous absorptivity
+!    abscld                       ! cloud absorptivity
+!    atot                         ! combined gaseous and cloud absorptivity
+!    odclr                        ! clear sky (gaseous) optical depth
+!    odcld                        ! cloud optical depth
+!    odtot                        ! optical depth of gas and cloud
+!    tfacgas                      ! gas-only pade factor, used for planck fn
+!    tfactot                      ! gas and cloud pade factor, used for planck fn
+!    bbdgas                       ! gas-only planck function for downward rt
+!    bbugas                       ! gas-only planck function for upward rt
+!    bbdtot                       ! gas and cloud planck function for downward rt
+!    bbutot                       ! gas and cloud planck function for upward calc.
+!    gassrc                       ! source radiance due to gas only
+!    efclfrac                     ! effective cloud fraction
+!    radlu                        ! spectrally summed upward radiance 
+!    radclru                      ! spectrally summed clear sky upward radiance 
+!    urad                         ! upward radiance by layer
+!    clrurad                      ! clear sky upward radiance by layer
+!    radld                        ! spectrally summed downward radiance 
+!    radclrd                      ! spectrally summed clear sky downward radiance 
+!    drad                         ! downward radiance by layer
+!    clrdrad                      ! clear sky downward radiance by layer
+!    d_radlu_dt                   ! spectrally summed upward radiance 
+!    d_radclru_dt                 ! spectrally summed clear sky upward radiance 
+!    d_urad_dt                    ! upward radiance by layer
+!    d_clrurad_dt                 ! clear sky upward radiance by layer
+
+! output
+!    totuflux                     ! upward longwave flux (w/m2)
+!    totdflux                     ! downward longwave flux (w/m2)
+!    fnet                         ! net longwave flux (w/m2)
+!    htr                          ! longwave heating rate (k/day)
+!    totuclfl                     ! clear sky upward longwave flux (w/m2)
+!    totdclfl                     ! clear sky downward longwave flux (w/m2)
+!    fnetc                        ! clear sky net longwave flux (w/m2)
+!    htrc                         ! clear sky longwave heating rate (k/day)
+!    dtotuflux_dt                 ! change in upward longwave flux (w/m2/k)
+!                                 ! with respect to surface temperature
+!    dtotuclfl_dt                 ! change in clear sky upward longwave flux (w/m2/k)
+!                                 ! with respect to surface temperature
+
+! These arrays indicate the spectral 'region' (used in the 
+! calculation of ice cloud optical depths) corresponding
+! to each spectral band.  See cldprop.f for more details.
+      data ipat /1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, &
+                 1,2,3,3,3,4,4,4,5, 5, 5, 5, 5, 5, 5, 5, &
+                 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/
+
+! This secant and weight corresponds to the standard diffusivity 
+! angle.  This initial value is redefined below for some bands.
+      data wtdiff /0.5_rb/
+      data rec_6 /0.166667_rb/
+
+! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50
+! and 1.80) as a function of total column water vapor.  The function
+! has been defined to minimize flux and cooling rate errors in these bands
+! over a wide range of precipitable water values.
+      data a0 / 1.66_rb,  1.55_rb,  1.58_rb,  1.66_rb, &
+                1.54_rb, 1.454_rb,  1.89_rb,  1.33_rb, &
+               1.668_rb,  1.66_rb,  1.66_rb,  1.66_rb, &
+                1.66_rb,  1.66_rb,  1.66_rb,  1.66_rb /
+      data a1 / 0.00_rb,  0.25_rb,  0.22_rb,  0.00_rb, &
+                0.13_rb, 0.446_rb, -0.10_rb,  0.40_rb, &
+              -0.006_rb,  0.00_rb,  0.00_rb,  0.00_rb, &
+                0.00_rb,  0.00_rb,  0.00_rb,  0.00_rb /
+      data a2 / 0.00_rb, -12.0_rb, -11.7_rb,  0.00_rb, &
+               -0.72_rb,-0.243_rb,  0.19_rb,-0.062_rb, &
+               0.414_rb,  0.00_rb,  0.00_rb,  0.00_rb, &
+                0.00_rb,  0.00_rb,  0.00_rb,  0.00_rb /
+
+      hvrrtr = '$Revision: 1.7 $'
+
+      do ibnd = 1,nbndlw
+         if (ibnd.eq.1 .or. ibnd.eq.4 .or. ibnd.ge.10) then
+           secdiff(ibnd) = 1.66_rb
+         else
+           secdiff(ibnd) = a0(ibnd) + a1(ibnd)*exp(a2(ibnd)*pwvcm)
+           if (secdiff(ibnd) .gt. 1.80_rb) secdiff(ibnd) = 1.80_rb
+           if (secdiff(ibnd) .lt. 1.50_rb) secdiff(ibnd) = 1.50_rb
+         endif
+      enddo
+
+      urad(0) = 0.0_rb
+      drad(0) = 0.0_rb
+      totuflux(0) = 0.0_rb
+      totdflux(0) = 0.0_rb
+      clrurad(0) = 0.0_rb
+      clrdrad(0) = 0.0_rb
+      totuclfl(0) = 0.0_rb
+      totdclfl(0) = 0.0_rb
+      if (idrv .eq. 1) then
+         d_urad_dt(0) = 0.0_rb
+         d_clrurad_dt(0) = 0.0_rb
+         dtotuflux_dt(0) = 0.0_rb
+         dtotuclfl_dt(0) = 0.0_rb
+      endif
+
+      do lay = 1, nlayers
+         urad(lay) = 0.0_rb
+         drad(lay) = 0.0_rb
+         totuflux(lay) = 0.0_rb
+         totdflux(lay) = 0.0_rb
+         clrurad(lay) = 0.0_rb
+         clrdrad(lay) = 0.0_rb
+         totuclfl(lay) = 0.0_rb
+         totdclfl(lay) = 0.0_rb
+         if (idrv .eq. 1) then
+            d_urad_dt(lay) = 0.0_rb
+            d_clrurad_dt(lay) = 0.0_rb
+            dtotuflux_dt(lay) = 0.0_rb
+            dtotuclfl_dt(lay) = 0.0_rb
+         endif
+
+         do ib = 1, ncbands
+            if (cldfrac(lay) .ge. 1.e-6_rb) then
+               odcld(lay,ib) = secdiff(ib) * taucloud(lay,ib)
+               transcld = exp(-odcld(lay,ib))
+               abscld(lay,ib) = 1. - transcld
+               efclfrac(lay,ib) = abscld(lay,ib) * cldfrac(lay)
+               icldlyr(lay) = 1
+            else
+               odcld(lay,ib) = 0.0_rb
+               abscld(lay,ib) = 0.0_rb
+               efclfrac(lay,ib) = 0.0_rb
+               icldlyr(lay) = 0
+            endif
+         enddo
+      enddo
+
+      igc = 1
+! Loop over frequency bands.
+      do iband = istart, iend
+
+! Reinitialize g-point counter for each band if output for each band is requested.
+         if (iout.gt.0.and.iband.ge.2) igc = ngs(iband-1)+1
+         if (ncbands .eq. 1) then
+            ib = ipat(iband,0)
+         elseif (ncbands .eq.  5) then
+            ib = ipat(iband,1)
+         elseif (ncbands .eq. 16) then
+            ib = ipat(iband,2)
+         endif
+
+! Loop over g-channels.
+ 1000    continue
+
+! Radiative transfer starts here.
+         radld = 0._rb
+         radclrd = 0._rb
+         iclddn = 0
+
+! Downward radiative transfer loop.  
+
+         do lev = nlayers, 1, -1
+               plfrac = fracs(lev,igc)
+               blay = planklay(lev,iband)
+               dplankup = planklev(lev,iband) - blay
+               dplankdn = planklev(lev-1,iband) - blay
+               odepth = secdiff(iband) * taut(lev,igc)
+               if (odepth .lt. 0.0_rb) odepth = 0.0_rb
+! Cloudy layer
+               if (icldlyr(lev).eq.1) then
+                  iclddn = 1
+                  odtot = odepth + odcld(lev,ib)
+                  if (odtot .lt. 0.06_rb) then
+                     atrans(lev) = odepth - 0.5_rb*odepth*odepth
+                     odepth_rec = rec_6*odepth
+                     gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev)
+
+                     atot(lev) =  odtot - 0.5_rb*odtot*odtot
+                     odtot_rec = rec_6*odtot
+                     bbdtot =  plfrac * (blay+dplankdn*odtot_rec)
+                     bbd = plfrac*(blay+dplankdn*odepth_rec)
+                     radld = radld - radld * (atrans(lev) + &
+                         efclfrac(lev,ib) * (1. - atrans(lev))) + &
+                         gassrc + cldfrac(lev) * &
+                         (bbdtot * atot(lev) - gassrc)
+                     drad(lev-1) = drad(lev-1) + radld
+                  
+                     bbugas(lev) =  plfrac * (blay+dplankup*odepth_rec)
+                     bbutot(lev) =  plfrac * (blay+dplankup*odtot_rec)
+
+                  elseif (odepth .le. 0.06_rb) then
+                     atrans(lev) = odepth - 0.5_rb*odepth*odepth
+                     odepth_rec = rec_6*odepth
+                     gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev)
+
+                     odtot = odepth + odcld(lev,ib)
+                     tblind = odtot/(bpade+odtot)
+                     ittot = tblint*tblind + 0.5_rb
+                     tfactot = tfn_tbl(ittot)
+                     bbdtot = plfrac * (blay + tfactot*dplankdn)
+                     bbd = plfrac*(blay+dplankdn*odepth_rec)
+                     atot(lev) = 1._rb - exp_tbl(ittot)
+
+                     radld = radld - radld * (atrans(lev) + &
+                         efclfrac(lev,ib) * (1._rb - atrans(lev))) + &
+                         gassrc + cldfrac(lev) * &
+                         (bbdtot * atot(lev) - gassrc)
+                     drad(lev-1) = drad(lev-1) + radld
+
+                     bbugas(lev) = plfrac * (blay + dplankup*odepth_rec)
+                     bbutot(lev) = plfrac * (blay + tfactot * dplankup)
+
+                  else
+
+                     tblind = odepth/(bpade+odepth)
+                     itgas = tblint*tblind+0.5_rb
+                     odepth = tau_tbl(itgas)
+                     atrans(lev) = 1._rb - exp_tbl(itgas)
+                     tfacgas = tfn_tbl(itgas)
+                     gassrc = atrans(lev) * plfrac * (blay + tfacgas*dplankdn)
+
+                     odtot = odepth + odcld(lev,ib)
+                     tblind = odtot/(bpade+odtot)
+                     ittot = tblint*tblind + 0.5_rb
+                     tfactot = tfn_tbl(ittot)
+                     bbdtot = plfrac * (blay + tfactot*dplankdn)
+                     bbd = plfrac*(blay+tfacgas*dplankdn)
+                     atot(lev) = 1._rb - exp_tbl(ittot)
+
+                  radld = radld - radld * (atrans(lev) + &
+                     efclfrac(lev,ib) * (1._rb - atrans(lev))) + &
+                     gassrc + cldfrac(lev) * &
+                     (bbdtot * atot(lev) - gassrc)
+                  drad(lev-1) = drad(lev-1) + radld
+                  bbugas(lev) = plfrac * (blay + tfacgas * dplankup)
+                  bbutot(lev) = plfrac * (blay + tfactot * dplankup)
+                  endif
+! Clear layer
+               else
+                  if (odepth .le. 0.06_rb) then
+                     atrans(lev) = odepth-0.5_rb*odepth*odepth
+                     odepth = rec_6*odepth
+                     bbd = plfrac*(blay+dplankdn*odepth)
+                     bbugas(lev) = plfrac*(blay+dplankup*odepth)
+                  else
+                     tblind = odepth/(bpade+odepth)
+                     itr = tblint*tblind+0.5_rb
+                     transc = exp_tbl(itr)
+                     atrans(lev) = 1._rb-transc
+                     tausfac = tfn_tbl(itr)
+                     bbd = plfrac*(blay+tausfac*dplankdn)
+                     bbugas(lev) = plfrac * (blay + tausfac * dplankup)
+                  endif   
+                  radld = radld + (bbd-radld)*atrans(lev)
+                  drad(lev-1) = drad(lev-1) + radld
+               endif
+!  Set clear sky stream to total sky stream as long as layers
+!  remain clear.  Streams diverge when a cloud is reached (iclddn=1),
+!  and clear sky stream must be computed separately from that point.
+                  if (iclddn.eq.1) then
+                     radclrd = radclrd + (bbd-radclrd) * atrans(lev) 
+                     clrdrad(lev-1) = clrdrad(lev-1) + radclrd
+                  else
+                     radclrd = radld
+                     clrdrad(lev-1) = drad(lev-1)
+                  endif
+            enddo
+
+! Spectral emissivity & reflectance
+!  Include the contribution of spectrally varying longwave emissivity
+!  and reflection from the surface to the upward radiative transfer.
+!  Note: Spectral and Lambertian reflection are identical for the
+!  diffusivity angle flux integration used here.
+!  Note: The emissivity is applied to plankbnd and dplankbnd_dt when 
+!  they are defined in subroutine setcoef. 
+
+         rad0 = fracs(1,igc) * plankbnd(iband)
+         if (idrv .eq. 1) then
+            d_rad0_dt = fracs(1,igc) * dplankbnd_dt(iband)
+         endif
+
+!  Add in specular reflection of surface downward radiance.
+         reflect = 1._rb - semiss(iband)
+         radlu = rad0 + reflect * radld
+         radclru = rad0 + reflect * radclrd
+
+
+! Upward radiative transfer loop.
+         urad(0) = urad(0) + radlu
+         clrurad(0) = clrurad(0) + radclru
+         if (idrv .eq. 1) then
+            d_radlu_dt = d_rad0_dt
+            d_urad_dt(0) = d_urad_dt(0) + d_radlu_dt
+            d_radclru_dt = d_rad0_dt
+            d_clrurad_dt(0) = d_clrurad_dt(0) + d_radclru_dt
+         endif
+
+         do lev = 1, nlayers
+! Cloudy layer
+            if (icldlyr(lev) .eq. 1) then
+               gassrc = bbugas(lev) * atrans(lev)
+               radlu = radlu - radlu * (atrans(lev) + &
+                   efclfrac(lev,ib) * (1._rb - atrans(lev))) + &
+                   gassrc + cldfrac(lev) * &
+                   (bbutot(lev) * atot(lev) - gassrc)
+               urad(lev) = urad(lev) + radlu
+               if (idrv .eq. 1) then
+                  d_radlu_dt = d_radlu_dt * cldfrac(lev) * (1.0_rb - atot(lev)) + &
+                         d_radlu_dt * (1.0_rb - cldfrac(lev)) * (1.0_rb - atrans(lev))
+                  d_urad_dt(lev) = d_urad_dt(lev) + d_radlu_dt
+               endif
+! Clear layer
+            else
+               radlu = radlu + (bbugas(lev)-radlu)*atrans(lev)
+               urad(lev) = urad(lev) + radlu
+               if (idrv .eq. 1) then
+                  d_radlu_dt = d_radlu_dt * (1.0_rb - atrans(lev))
+                  d_urad_dt(lev) = d_urad_dt(lev) + d_radlu_dt
+               endif
+            endif
+!  Set clear sky stream to total sky stream as long as all layers
+!  are clear (iclddn=0).  Streams must be calculated separately at 
+!  all layers when a cloud is present (iclddn=1), because surface 
+!  reflectance is different for each stream.
+               if (iclddn.eq.1) then
+                  radclru = radclru + (bbugas(lev)-radclru)*atrans(lev) 
+                  clrurad(lev) = clrurad(lev) + radclru
+               else
+                  radclru = radlu
+                  clrurad(lev) = urad(lev)
+               endif
+               if (idrv .eq. 1) then
+                  if (iclddn.eq.1) then
+                     d_radclru_dt = d_radclru_dt * (1.0_rb - atrans(lev))
+                     d_clrurad_dt(lev) = d_clrurad_dt(lev) + d_radclru_dt
+                  else
+                     d_radclru_dt = d_radlu_dt
+                     d_clrurad_dt(lev) = d_urad_dt(lev)
+                  endif
+               endif
+         enddo
+
+! Increment g-point counter
+         igc = igc + 1
+! Return to continue radiative transfer for all g-channels in present band
+         if (igc .le. ngs(iband)) go to 1000
+
+! Process longwave output from band for total and clear streams.
+! Calculate upward, downward, and net flux.
+         do lev = nlayers, 0, -1
+            uflux(lev) = urad(lev)*wtdiff
+            dflux(lev) = drad(lev)*wtdiff
+            urad(lev) = 0.0_rb
+            drad(lev) = 0.0_rb
+            totuflux(lev) = totuflux(lev) + uflux(lev) * delwave(iband)
+            totdflux(lev) = totdflux(lev) + dflux(lev) * delwave(iband)
+            uclfl(lev) = clrurad(lev)*wtdiff
+            dclfl(lev) = clrdrad(lev)*wtdiff
+            clrurad(lev) = 0.0_rb
+            clrdrad(lev) = 0.0_rb
+            totuclfl(lev) = totuclfl(lev) + uclfl(lev) * delwave(iband)
+            totdclfl(lev) = totdclfl(lev) + dclfl(lev) * delwave(iband)
+         enddo
+
+! Calculate total change in upward flux wrt surface temperature
+         if (idrv .eq. 1) then
+            do lev = nlayers, 0, -1
+               duflux_dt(lev) = d_urad_dt(lev) * wtdiff
+               d_urad_dt(lev) = 0.0_rb
+               dtotuflux_dt(lev) = dtotuflux_dt(lev) + duflux_dt(lev) * delwave(iband) * fluxfac
+               duclfl_dt(lev) = d_clrurad_dt(lev) * wtdiff
+               d_clrurad_dt(lev) = 0.0_rb
+               dtotuclfl_dt(lev) = dtotuclfl_dt(lev) + duclfl_dt(lev) * delwave(iband) * fluxfac
+            enddo
+         endif
+
+! End spectral band loop
+      enddo
+
+! Calculate fluxes at surface
+      totuflux(0) = totuflux(0) * fluxfac
+      totdflux(0) = totdflux(0) * fluxfac
+      fnet(0) = totuflux(0) - totdflux(0)
+      totuclfl(0) = totuclfl(0) * fluxfac
+      totdclfl(0) = totdclfl(0) * fluxfac
+      fnetc(0) = totuclfl(0) - totdclfl(0)
+
+! Calculate fluxes at model levels
+      do lev = 1, nlayers
+         totuflux(lev) = totuflux(lev) * fluxfac
+         totdflux(lev) = totdflux(lev) * fluxfac
+         fnet(lev) = totuflux(lev) - totdflux(lev)
+         totuclfl(lev) = totuclfl(lev) * fluxfac
+         totdclfl(lev) = totdclfl(lev) * fluxfac
+         fnetc(lev) = totuclfl(lev) - totdclfl(lev)
+         l = lev - 1
+
+! Calculate heating rates at model layers
+         htr(l)=heatfac*(fnet(l)-fnet(lev))/(pz(l)-pz(lev)) 
+         htrc(l)=heatfac*(fnetc(l)-fnetc(lev))/(pz(l)-pz(lev)) 
+      enddo
+
+! Set heating rate to zero in top layer
+      htr(nlayers) = 0.0_rb
+      htrc(nlayers) = 0.0_rb
+
+      end subroutine rtrn
+
+      end module rrtmg_lw_rtrn
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrnmc.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrnmc.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrnmc.f90	(revision 3477)
@@ -0,0 +1,579 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_rtrnmc.f90,v $
+!     author:    $Author: mike $
+!     revision:  $Revision: 1.7 $
+!     created:   $Date: 2009/11/12 20:52:25 $
+!
+      module rrtmg_lw_rtrnmc
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! --------- Modules ----------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : mg, nbndlw, ngptlw
+      use rrlw_con, only: fluxfac, heatfac
+      use rrlw_wvn, only: delwave, ngb, ngs
+      use rrlw_tbl, only: tblint, bpade, tau_tbl, exp_tbl, tfn_tbl
+      use rrlw_vsn, only: hvrrtc, hnamrtc
+
+      implicit none
+
+      contains
+
+!-----------------------------------------------------------------------------
+      subroutine rtrnmc(nlayers, istart, iend, iout, pz, semiss, ncbands, &
+                        cldfmc, taucmc, planklay, planklev, plankbnd, &
+                        pwvcm, fracs, taut, &
+                        totuflux, totdflux, fnet, htr, &
+                        totuclfl, totdclfl, fnetc, htrc, &
+                        idrv, dplankbnd_dt, dtotuflux_dt, dtotuclfl_dt )
+!-----------------------------------------------------------------------------
+!
+!  Original version:   E. J. Mlawer, et al. RRTM_V3.0
+!  Revision for GCMs:  Michael J. Iacono; October, 2002
+!  Revision for F90:  Michael J. Iacono; June, 2006
+!  Revision for dFdT option: M. J. Iacono and E. J. Mlawer, November 2009
+!
+!  This program calculates the upward fluxes, downward fluxes, and
+!  heating rates for an arbitrary clear or cloudy atmosphere.  The input
+!  to this program is the atmospheric profile, all Planck function
+!  information, and the cloud fraction by layer.  A variable diffusivity 
+!  angle (SECDIFF) is used for the angle integration.  Bands 2-3 and 5-9 
+!  use a value for SECDIFF that varies from 1.50 to 1.80 as a function of 
+!  the column water vapor, and other bands use a value of 1.66.  The Gaussian 
+!  weight appropriate to this angle (WTDIFF=0.5) is applied here.  Note that 
+!  use of the emissivity angle for the flux integration can cause errors of 
+!  1 to 4 W/m2 within cloudy layers.  
+!  Clouds are treated with the McICA stochastic approach and maximum-random
+!  cloud overlap. 
+!  This subroutine also provides the optional capability to calculate
+!  the derivative of upward flux respect to surface temperature using
+!  the pre-tabulated derivative of the Planck function with respect to 
+!  temperature integrated over each spectral band.
+!***************************************************************************
+
+! ------- Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: istart          ! beginning band of calculation
+      integer(kind=im), intent(in) :: iend            ! ending band of calculation
+      integer(kind=im), intent(in) :: iout            ! output option flag
+
+! Atmosphere
+      real(kind=rb), intent(in) :: pz(0:)             ! level (interface) pressures (hPa, mb)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: pwvcm              ! precipitable water vapor (cm)
+      real(kind=rb), intent(in) :: semiss(:)          ! lw surface emissivity
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(in) :: planklay(:,:)      ! 
+                                                      !    Dimensions: (nlayers,nbndlw)
+      real(kind=rb), intent(in) :: planklev(0:,:)     ! 
+                                                      !    Dimensions: (0:nlayers,nbndlw)
+      real(kind=rb), intent(in) :: plankbnd(:)        ! 
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(in) :: fracs(:,:)         ! 
+                                                      !    Dimensions: (nlayers,ngptw)
+      real(kind=rb), intent(in) :: taut(:,:)          ! gaseous + aerosol optical depths
+                                                      !    Dimensions: (nlayers,ngptlw)
+
+! Clouds
+      integer(kind=im), intent(in) :: ncbands         ! number of cloud spectral bands
+      real(kind=rb), intent(in) :: cldfmc(:,:)        ! layer cloud fraction [mcica]
+                                                      !    Dimensions: (ngptlw,nlayers)
+      real(kind=rb), intent(in) :: taucmc(:,:)        ! layer cloud optical depth [mcica]
+                                                      !    Dimensions: (ngptlw,nlayers)
+      integer(kind=im), intent(in) :: idrv            ! flag for calculation of dF/dt from 
+                                                      ! Planck derivative [0=off, 1=on]
+      real(kind=rb), intent(in) :: dplankbnd_dt(:)    ! derivative of Planck function wrt temp
+                                                      !    Dimensions: (nbndlw)
+
+! ----- Output -----
+      real(kind=rb), intent(out) :: totuflux(0:)      ! upward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totdflux(0:)      ! downward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: fnet(0:)          ! net longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: htr(0:)           ! longwave heating rate (k/day)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totuclfl(0:)      ! clear sky upward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totdclfl(0:)      ! clear sky downward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: fnetc(0:)         ! clear sky net longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: htrc(0:)          ! clear sky longwave heating rate (k/day)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: dtotuflux_dt(0:)  ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: dtotuclfl_dt(0:)  ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (0:nlayers)
+
+! ----- Local -----
+! Declarations for radiative transfer
+      real(kind=rb) :: abscld(nlayers,ngptlw)
+      real(kind=rb) :: atot(nlayers)
+      real(kind=rb) :: atrans(nlayers)
+      real(kind=rb) :: bbugas(nlayers)
+      real(kind=rb) :: bbutot(nlayers)
+      real(kind=rb) :: clrurad(0:nlayers)
+      real(kind=rb) :: clrdrad(0:nlayers)
+      real(kind=rb) :: efclfrac(nlayers,ngptlw)
+      real(kind=rb) :: uflux(0:nlayers)
+      real(kind=rb) :: dflux(0:nlayers)
+      real(kind=rb) :: urad(0:nlayers)
+      real(kind=rb) :: drad(0:nlayers)
+      real(kind=rb) :: uclfl(0:nlayers)
+      real(kind=rb) :: dclfl(0:nlayers)
+      real(kind=rb) :: odcld(nlayers,ngptlw)
+
+
+      real(kind=rb) :: secdiff(nbndlw)                 ! secant of diffusivity angle
+      real(kind=rb) :: a0(nbndlw),a1(nbndlw),a2(nbndlw)! diffusivity angle adjustment coefficients
+      real(kind=rb) :: wtdiff, rec_6
+      real(kind=rb) :: transcld, radld, radclrd, plfrac, blay, dplankup, dplankdn
+      real(kind=rb) :: odepth, odtot, odepth_rec, odtot_rec, gassrc
+      real(kind=rb) :: tblind, tfactot, bbd, bbdtot, tfacgas, transc, tausfac
+      real(kind=rb) :: rad0, reflect, radlu, radclru
+
+      real(kind=rb) :: duflux_dt(0:nlayers)
+      real(kind=rb) :: duclfl_dt(0:nlayers)
+      real(kind=rb) :: d_urad_dt(0:nlayers)
+      real(kind=rb) :: d_clrurad_dt(0:nlayers)
+      real(kind=rb) :: d_rad0_dt, d_radlu_dt, d_radclru_dt
+
+      integer(kind=im) :: icldlyr(nlayers)                  ! flag for cloud in layer
+      integer(kind=im) :: ibnd, ib, iband, lay, lev, l, ig  ! loop indices
+      integer(kind=im) :: igc                               ! g-point interval counter
+      integer(kind=im) :: iclddn                            ! flag for cloud in down path
+      integer(kind=im) :: ittot, itgas, itr                 ! lookup table indices
+
+! ------- Definitions -------
+! input
+!    nlayers                      ! number of model layers
+!    ngptlw                       ! total number of g-point subintervals
+!    nbndlw                       ! number of longwave spectral bands
+!    ncbands                      ! number of spectral bands for clouds
+!    secdiff                      ! diffusivity angle
+!    wtdiff                       ! weight for radiance to flux conversion
+!    pavel                        ! layer pressures (mb)
+!    pz                           ! level (interface) pressures (mb)
+!    tavel                        ! layer temperatures (k)
+!    tz                           ! level (interface) temperatures(mb)
+!    tbound                       ! surface temperature (k)
+!    cldfrac                      ! layer cloud fraction
+!    taucloud                     ! layer cloud optical depth
+!    itr                          ! integer look-up table index
+!    icldlyr                      ! flag for cloudy layers
+!    iclddn                       ! flag for cloud in column at any layer
+!    semiss                       ! surface emissivities for each band
+!    reflect                      ! surface reflectance
+!    bpade                        ! 1/(pade constant)
+!    tau_tbl                      ! clear sky optical depth look-up table
+!    exp_tbl                      ! exponential look-up table for transmittance
+!    tfn_tbl                      ! tau transition function look-up table
+
+! local
+!    atrans                       ! gaseous absorptivity
+!    abscld                       ! cloud absorptivity
+!    atot                         ! combined gaseous and cloud absorptivity
+!    odclr                        ! clear sky (gaseous) optical depth
+!    odcld                        ! cloud optical depth
+!    odtot                        ! optical depth of gas and cloud
+!    tfacgas                      ! gas-only pade factor, used for planck fn
+!    tfactot                      ! gas and cloud pade factor, used for planck fn
+!    bbdgas                       ! gas-only planck function for downward rt
+!    bbugas                       ! gas-only planck function for upward rt
+!    bbdtot                       ! gas and cloud planck function for downward rt
+!    bbutot                       ! gas and cloud planck function for upward calc.
+!    gassrc                       ! source radiance due to gas only
+!    efclfrac                     ! effective cloud fraction
+!    radlu                        ! spectrally summed upward radiance 
+!    radclru                      ! spectrally summed clear sky upward radiance 
+!    urad                         ! upward radiance by layer
+!    clrurad                      ! clear sky upward radiance by layer
+!    radld                        ! spectrally summed downward radiance 
+!    radclrd                      ! spectrally summed clear sky downward radiance 
+!    drad                         ! downward radiance by layer
+!    clrdrad                      ! clear sky downward radiance by layer
+!    d_radlu_dt                   ! spectrally summed upward radiance 
+!    d_radclru_dt                 ! spectrally summed clear sky upward radiance 
+!    d_urad_dt                    ! upward radiance by layer
+!    d_clrurad_dt                 ! clear sky upward radiance by layer
+
+! output
+!    totuflux                     ! upward longwave flux (w/m2)
+!    totdflux                     ! downward longwave flux (w/m2)
+!    fnet                         ! net longwave flux (w/m2)
+!    htr                          ! longwave heating rate (k/day)
+!    totuclfl                     ! clear sky upward longwave flux (w/m2)
+!    totdclfl                     ! clear sky downward longwave flux (w/m2)
+!    fnetc                        ! clear sky net longwave flux (w/m2)
+!    htrc                         ! clear sky longwave heating rate (k/day)
+!    dtotuflux_dt                 ! change in upward longwave flux (w/m2/k)
+!                                 ! with respect to surface temperature
+!    dtotuclfl_dt                 ! change in clear sky upward longwave flux (w/m2/k)
+!                                 ! with respect to surface temperature
+
+
+! This secant and weight corresponds to the standard diffusivity 
+! angle.  This initial value is redefined below for some bands.
+      data wtdiff /0.5_rb/
+      data rec_6 /0.166667_rb/
+
+! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50
+! and 1.80) as a function of total column water vapor.  The function
+! has been defined to minimize flux and cooling rate errors in these bands
+! over a wide range of precipitable water values.
+      data a0 / 1.66_rb,  1.55_rb,  1.58_rb,  1.66_rb, &
+                1.54_rb, 1.454_rb,  1.89_rb,  1.33_rb, &
+               1.668_rb,  1.66_rb,  1.66_rb,  1.66_rb, &
+                1.66_rb,  1.66_rb,  1.66_rb,  1.66_rb /
+      data a1 / 0.00_rb,  0.25_rb,  0.22_rb,  0.00_rb, &
+                0.13_rb, 0.446_rb, -0.10_rb,  0.40_rb, &
+              -0.006_rb,  0.00_rb,  0.00_rb,  0.00_rb, &
+                0.00_rb,  0.00_rb,  0.00_rb,  0.00_rb /
+      data a2 / 0.00_rb, -12.0_rb, -11.7_rb,  0.00_rb, &
+               -0.72_rb,-0.243_rb,  0.19_rb,-0.062_rb, &
+               0.414_rb,  0.00_rb,  0.00_rb,  0.00_rb, &
+                0.00_rb,  0.00_rb,  0.00_rb,  0.00_rb /
+
+      hvrrtc = '$Revision: 1.7 $'
+
+      do ibnd = 1,nbndlw
+         if (ibnd.eq.1 .or. ibnd.eq.4 .or. ibnd.ge.10) then
+           secdiff(ibnd) = 1.66_rb
+         else
+           secdiff(ibnd) = a0(ibnd) + a1(ibnd)*exp(a2(ibnd)*pwvcm)
+           if (secdiff(ibnd) .gt. 1.80_rb) secdiff(ibnd) = 1.80_rb
+           if (secdiff(ibnd) .lt. 1.50_rb) secdiff(ibnd) = 1.50_rb
+         endif
+      enddo
+
+      urad(0) = 0.0_rb
+      drad(0) = 0.0_rb
+      totuflux(0) = 0.0_rb
+      totdflux(0) = 0.0_rb
+      clrurad(0) = 0.0_rb
+      clrdrad(0) = 0.0_rb
+      totuclfl(0) = 0.0_rb
+      totdclfl(0) = 0.0_rb
+      if (idrv .eq. 1) then
+         d_urad_dt(0) = 0.0_rb
+         d_clrurad_dt(0) = 0.0_rb
+         dtotuflux_dt(0) = 0.0_rb
+         dtotuclfl_dt(0) = 0.0_rb
+      endif
+
+      do lay = 1, nlayers
+         urad(lay) = 0.0_rb
+         drad(lay) = 0.0_rb
+         totuflux(lay) = 0.0_rb
+         totdflux(lay) = 0.0_rb
+         clrurad(lay) = 0.0_rb
+         clrdrad(lay) = 0.0_rb
+         totuclfl(lay) = 0.0_rb
+         totdclfl(lay) = 0.0_rb
+         icldlyr(lay) = 0
+         if (idrv .eq. 1) then
+            d_urad_dt(lay) = 0.0_rb
+            d_clrurad_dt(lay) = 0.0_rb
+            dtotuflux_dt(lay) = 0.0_rb
+            dtotuclfl_dt(lay) = 0.0_rb
+         endif
+
+! Change to band loop?
+         do ig = 1, ngptlw
+            if (cldfmc(ig,lay) .eq. 1._rb) then
+               ib = ngb(ig)
+               odcld(lay,ig) = secdiff(ib) * taucmc(ig,lay)
+               transcld = exp(-odcld(lay,ig))
+               abscld(lay,ig) = 1._rb - transcld
+               efclfrac(lay,ig) = abscld(lay,ig) * cldfmc(ig,lay)
+               icldlyr(lay) = 1
+            else
+               odcld(lay,ig) = 0.0_rb
+               abscld(lay,ig) = 0.0_rb
+               efclfrac(lay,ig) = 0.0_rb
+            endif
+         enddo
+
+      enddo
+
+      igc = 1
+! Loop over frequency bands.
+      do iband = istart, iend
+
+! Reinitialize g-point counter for each band if output for each band is requested.
+         if (iout.gt.0.and.iband.ge.2) igc = ngs(iband-1)+1
+
+! Loop over g-channels.
+ 1000    continue
+
+! Radiative transfer starts here.
+         radld = 0._rb
+         radclrd = 0._rb
+         iclddn = 0
+
+! Downward radiative transfer loop.  
+
+         do lev = nlayers, 1, -1
+               plfrac = fracs(lev,igc)
+               blay = planklay(lev,iband)
+               dplankup = planklev(lev,iband) - blay
+               dplankdn = planklev(lev-1,iband) - blay
+               odepth = secdiff(iband) * taut(lev,igc)
+               if (odepth .lt. 0.0_rb) odepth = 0.0_rb
+!  Cloudy layer
+               if (icldlyr(lev).eq.1) then
+                  iclddn = 1
+                  odtot = odepth + odcld(lev,igc)
+                  if (odtot .lt. 0.06_rb) then
+                     atrans(lev) = odepth - 0.5_rb*odepth*odepth
+                     odepth_rec = rec_6*odepth
+                     gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev)
+
+                     atot(lev) =  odtot - 0.5_rb*odtot*odtot
+                     odtot_rec = rec_6*odtot
+                     bbdtot =  plfrac * (blay+dplankdn*odtot_rec)
+                     bbd = plfrac*(blay+dplankdn*odepth_rec)
+                     radld = radld - radld * (atrans(lev) + &
+                         efclfrac(lev,igc) * (1. - atrans(lev))) + &
+                         gassrc + cldfmc(igc,lev) * &
+                         (bbdtot * atot(lev) - gassrc)
+                     drad(lev-1) = drad(lev-1) + radld
+                  
+                     bbugas(lev) =  plfrac * (blay+dplankup*odepth_rec)
+                     bbutot(lev) =  plfrac * (blay+dplankup*odtot_rec)
+
+                  elseif (odepth .le. 0.06_rb) then
+                     atrans(lev) = odepth - 0.5_rb*odepth*odepth
+                     odepth_rec = rec_6*odepth
+                     gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev)
+
+                     odtot = odepth + odcld(lev,igc)
+                     tblind = odtot/(bpade+odtot)
+                     ittot = tblint*tblind + 0.5_rb
+                     tfactot = tfn_tbl(ittot)
+                     bbdtot = plfrac * (blay + tfactot*dplankdn)
+                     bbd = plfrac*(blay+dplankdn*odepth_rec)
+                     atot(lev) = 1. - exp_tbl(ittot)
+
+                     radld = radld - radld * (atrans(lev) + &
+                         efclfrac(lev,igc) * (1._rb - atrans(lev))) + &
+                         gassrc + cldfmc(igc,lev) * &
+                         (bbdtot * atot(lev) - gassrc)
+                     drad(lev-1) = drad(lev-1) + radld
+
+                     bbugas(lev) = plfrac * (blay + dplankup*odepth_rec)
+                     bbutot(lev) = plfrac * (blay + tfactot * dplankup)
+
+                  else
+
+                     tblind = odepth/(bpade+odepth)
+                     itgas = tblint*tblind+0.5_rb
+                     odepth = tau_tbl(itgas)
+                     atrans(lev) = 1._rb - exp_tbl(itgas)
+                     tfacgas = tfn_tbl(itgas)
+                     gassrc = atrans(lev) * plfrac * (blay + tfacgas*dplankdn)
+
+                     odtot = odepth + odcld(lev,igc)
+                     tblind = odtot/(bpade+odtot)
+                     ittot = tblint*tblind + 0.5_rb
+                     tfactot = tfn_tbl(ittot)
+                     bbdtot = plfrac * (blay + tfactot*dplankdn)
+                     bbd = plfrac*(blay+tfacgas*dplankdn)
+                     atot(lev) = 1._rb - exp_tbl(ittot)
+
+                  radld = radld - radld * (atrans(lev) + &
+                    efclfrac(lev,igc) * (1._rb - atrans(lev))) + &
+                    gassrc + cldfmc(igc,lev) * &
+                    (bbdtot * atot(lev) - gassrc)
+                  drad(lev-1) = drad(lev-1) + radld
+                  bbugas(lev) = plfrac * (blay + tfacgas * dplankup)
+                  bbutot(lev) = plfrac * (blay + tfactot * dplankup)
+                  endif
+!  Clear layer
+               else
+                  if (odepth .le. 0.06_rb) then
+                     atrans(lev) = odepth-0.5_rb*odepth*odepth
+                     odepth = rec_6*odepth
+                     bbd = plfrac*(blay+dplankdn*odepth)
+                     bbugas(lev) = plfrac*(blay+dplankup*odepth)
+                  else
+                     tblind = odepth/(bpade+odepth)
+                     itr = tblint*tblind+0.5_rb
+                     transc = exp_tbl(itr)
+                     atrans(lev) = 1._rb-transc
+                     tausfac = tfn_tbl(itr)
+                     bbd = plfrac*(blay+tausfac*dplankdn)
+                     bbugas(lev) = plfrac * (blay + tausfac * dplankup)
+                  endif   
+                  radld = radld + (bbd-radld)*atrans(lev)
+                  drad(lev-1) = drad(lev-1) + radld
+               endif
+!  Set clear sky stream to total sky stream as long as layers
+!  remain clear.  Streams diverge when a cloud is reached (iclddn=1),
+!  and clear sky stream must be computed separately from that point.
+                  if (iclddn.eq.1) then
+                     radclrd = radclrd + (bbd-radclrd) * atrans(lev) 
+                     clrdrad(lev-1) = clrdrad(lev-1) + radclrd
+                  else
+                     radclrd = radld
+                     clrdrad(lev-1) = drad(lev-1)
+                  endif
+            enddo
+
+! Spectral emissivity & reflectance
+!  Include the contribution of spectrally varying longwave emissivity
+!  and reflection from the surface to the upward radiative transfer.
+!  Note: Spectral and Lambertian reflection are identical for the
+!  diffusivity angle flux integration used here.
+!  Note: The emissivity is applied to plankbnd and dplankbnd_dt when 
+!  they are defined in subroutine setcoef. 
+
+         rad0 = fracs(1,igc) * plankbnd(iband)
+         if (idrv .eq. 1) then
+            d_rad0_dt = fracs(1,igc) * dplankbnd_dt(iband)
+         endif
+
+!  Add in specular reflection of surface downward radiance.
+         reflect = 1._rb - semiss(iband)
+         radlu = rad0 + reflect * radld
+         radclru = rad0 + reflect * radclrd
+
+
+! Upward radiative transfer loop.
+         urad(0) = urad(0) + radlu
+         clrurad(0) = clrurad(0) + radclru
+         if (idrv .eq. 1) then
+            d_radlu_dt = d_rad0_dt
+            d_urad_dt(0) = d_urad_dt(0) + d_radlu_dt
+            d_radclru_dt = d_rad0_dt
+            d_clrurad_dt(0) = d_clrurad_dt(0) + d_radclru_dt
+         endif
+
+         do lev = 1, nlayers
+!  Cloudy layer
+            if (icldlyr(lev) .eq. 1) then
+               gassrc = bbugas(lev) * atrans(lev)
+               radlu = radlu - radlu * (atrans(lev) + &
+                   efclfrac(lev,igc) * (1._rb - atrans(lev))) + &
+                   gassrc + cldfmc(igc,lev) * &
+                   (bbutot(lev) * atot(lev) - gassrc)
+               urad(lev) = urad(lev) + radlu
+               if (idrv .eq. 1) then
+                  d_radlu_dt = d_radlu_dt * cldfmc(igc,lev) * (1.0_rb - atot(lev)) + &
+                         d_radlu_dt * (1.0_rb - cldfmc(igc,lev)) * (1.0_rb - atrans(lev))
+                  d_urad_dt(lev) = d_urad_dt(lev) + d_radlu_dt
+               endif
+!  Clear layer
+            else
+               radlu = radlu + (bbugas(lev)-radlu)*atrans(lev)
+               urad(lev) = urad(lev) + radlu
+               if (idrv .eq. 1) then
+                  d_radlu_dt = d_radlu_dt * (1.0_rb - atrans(lev))
+                  d_urad_dt(lev) = d_urad_dt(lev) + d_radlu_dt
+               endif
+            endif
+!  Set clear sky stream to total sky stream as long as all layers
+!  are clear (iclddn=0).  Streams must be calculated separately at 
+!  all layers when a cloud is present (ICLDDN=1), because surface 
+!  reflectance is different for each stream.
+               if (iclddn.eq.1) then
+                  radclru = radclru + (bbugas(lev)-radclru)*atrans(lev) 
+                  clrurad(lev) = clrurad(lev) + radclru
+               else
+                  radclru = radlu
+                  clrurad(lev) = urad(lev)
+               endif
+               if (idrv .eq. 1) then
+                  if (iclddn.eq.1) then
+                     d_radclru_dt = d_radclru_dt * (1.0_rb - atrans(lev))
+                     d_clrurad_dt(lev) = d_clrurad_dt(lev) + d_radclru_dt
+                  else
+                     d_radclru_dt = d_radlu_dt
+                     d_clrurad_dt(lev) = d_urad_dt(lev)
+                  endif
+               endif
+         enddo
+
+! Increment g-point counter
+         igc = igc + 1
+! Return to continue radiative transfer for all g-channels in present band
+         if (igc .le. ngs(iband)) go to 1000
+
+! Process longwave output from band for total and clear streams.
+! Calculate upward, downward, and net flux.
+         do lev = nlayers, 0, -1
+            uflux(lev) = urad(lev)*wtdiff
+            dflux(lev) = drad(lev)*wtdiff
+            urad(lev) = 0.0_rb
+            drad(lev) = 0.0_rb
+            totuflux(lev) = totuflux(lev) + uflux(lev) * delwave(iband)
+            totdflux(lev) = totdflux(lev) + dflux(lev) * delwave(iband)
+            uclfl(lev) = clrurad(lev)*wtdiff
+            dclfl(lev) = clrdrad(lev)*wtdiff
+            clrurad(lev) = 0.0_rb
+            clrdrad(lev) = 0.0_rb
+            totuclfl(lev) = totuclfl(lev) + uclfl(lev) * delwave(iband)
+            totdclfl(lev) = totdclfl(lev) + dclfl(lev) * delwave(iband)
+         enddo
+
+! Calculate total change in upward flux wrt surface temperature
+         if (idrv .eq. 1) then
+            do lev = nlayers, 0, -1
+               duflux_dt(lev) = d_urad_dt(lev) * wtdiff
+               d_urad_dt(lev) = 0.0_rb
+               dtotuflux_dt(lev) = dtotuflux_dt(lev) + duflux_dt(lev) * delwave(iband) * fluxfac
+               duclfl_dt(lev) = d_clrurad_dt(lev) * wtdiff
+               d_clrurad_dt(lev) = 0.0_rb
+               dtotuclfl_dt(lev) = dtotuclfl_dt(lev) + duclfl_dt(lev) * delwave(iband) * fluxfac
+            enddo
+         endif
+
+! End spectral band loop
+      enddo
+
+! Calculate fluxes at surface
+      totuflux(0) = totuflux(0) * fluxfac
+      totdflux(0) = totdflux(0) * fluxfac
+      fnet(0) = totuflux(0) - totdflux(0)
+      totuclfl(0) = totuclfl(0) * fluxfac
+      totdclfl(0) = totdclfl(0) * fluxfac
+      fnetc(0) = totuclfl(0) - totdclfl(0)
+
+! Calculate fluxes at model levels
+      do lev = 1, nlayers
+         totuflux(lev) = totuflux(lev) * fluxfac
+         totdflux(lev) = totdflux(lev) * fluxfac
+         fnet(lev) = totuflux(lev) - totdflux(lev)
+         totuclfl(lev) = totuclfl(lev) * fluxfac
+         totdclfl(lev) = totdclfl(lev) * fluxfac
+         fnetc(lev) = totuclfl(lev) - totdclfl(lev)
+         l = lev - 1
+
+! Calculate heating rates at model layers
+         htr(l)=heatfac*(fnet(l)-fnet(lev))/(pz(l)-pz(lev)) 
+         htrc(l)=heatfac*(fnetc(l)-fnetc(lev))/(pz(l)-pz(lev)) 
+      enddo
+
+! Set heating rate to zero in top layer
+      htr(nlayers) = 0.0_rb
+      htrc(nlayers) = 0.0_rb
+
+      end subroutine rtrnmc
+
+      end module rrtmg_lw_rtrnmc
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrnmr.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrnmr.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_rtrnmr.f90	(revision 3477)
@@ -0,0 +1,782 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_rtrnmr.f90,v $
+!     author:    $Author: mike $
+!     revision:  $Revision: 1.7 $
+!     created:   $Date: 2009/11/12 20:52:26 $
+!
+      module rrtmg_lw_rtrnmr
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : mg, nbndlw, ngptlw
+      use rrlw_con, only: fluxfac, heatfac
+      use rrlw_wvn, only: delwave, ngs
+      use rrlw_tbl, only: tblint, bpade, tau_tbl, exp_tbl, tfn_tbl
+      use rrlw_vsn, only: hvrrtx, hnamrtx
+
+      implicit none
+
+      contains
+
+!-----------------------------------------------------------------------------
+      subroutine rtrnmr(nlayers, istart, iend, iout, pz, semiss, ncbands, &
+                        cldfrac, taucloud, planklay, planklev, plankbnd, &
+                        pwvcm, fracs, taut, & 
+                        totuflux, totdflux, fnet, htr, &
+                        totuclfl, totdclfl, fnetc, htrc, &
+                        idrv, dplankbnd_dt, dtotuflux_dt, dtotuclfl_dt )
+!-----------------------------------------------------------------------------
+!
+!  Original version:   E. J. Mlawer, et al. RRTM_V3.0
+!  Revision for GCMs:  Michael J. Iacono; October, 2002
+!  Revision for F90:  Michael J. Iacono; June, 2006
+!  Revision for dFdT option: M. J. Iacono and E. J. Mlawer, November 2009
+!
+!  This program calculates the upward fluxes, downward fluxes, and
+!  heating rates for an arbitrary clear or cloudy atmosphere.  The input
+!  to this program is the atmospheric profile, all Planck function
+!  information, and the cloud fraction by layer.  A variable diffusivity 
+!  angle (SECDIFF) is used for the angle integration.  Bands 2-3 and 5-9 
+!  use a value for SECDIFF that varies from 1.50 to 1.80 as a function of 
+!  the column water vapor, and other bands use a value of 1.66.  The Gaussian 
+!  weight appropriate to this angle (WTDIFF=0.5) is applied here.  Note that 
+!  use of the emissivity angle for the flux integration can cause errors of 
+!  1 to 4 W/m2 within cloudy layers.  
+!  Clouds are treated with a maximum-random cloud overlap method.
+!  This subroutine also provides the optional capability to calculate
+!  the derivative of upward flux respect to surface temperature using
+!  the pre-tabulated derivative of the Planck function with respect to 
+!  temperature integrated over each spectral band.
+!***************************************************************************
+
+! ------- Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: istart          ! beginning band of calculation
+      integer(kind=im), intent(in) :: iend            ! ending band of calculation
+      integer(kind=im), intent(in) :: iout            ! output option flag
+
+! Atmosphere
+      real(kind=rb), intent(in) :: pz(0:)             ! level (interface) pressures (hPa, mb)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: pwvcm              ! precipitable water vapor (cm)
+      real(kind=rb), intent(in) :: semiss(:)          ! lw surface emissivity
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(in) :: planklay(:,:)      ! 
+                                                      !    Dimensions: (nlayers,nbndlw)
+      real(kind=rb), intent(in) :: planklev(0:,:)     ! 
+                                                      !    Dimensions: (0:nlayers,nbndlw)
+      real(kind=rb), intent(in) :: plankbnd(:)        ! 
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(in) :: fracs(:,:)         ! 
+                                                      !    Dimensions: (nlayers,ngptw)
+      real(kind=rb), intent(in) :: taut(:,:)          ! gaseous + aerosol optical depths
+                                                      !    Dimensions: (nlayers,ngptlw)
+
+! Clouds
+      integer(kind=im), intent(in) :: ncbands         ! number of cloud spectral bands
+      real(kind=rb), intent(in) :: cldfrac(:)         ! layer cloud fraction
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: taucloud(:,:)      ! layer cloud optical depth
+                                                      !    Dimensions: (nlayers,nbndlw)
+      integer(kind=im), intent(in) :: idrv            ! flag for calculation of dF/dt from 
+                                                      ! Planck derivative [0=off, 1=on]
+      real(kind=rb), intent(in) :: dplankbnd_dt(:)    ! derivative of Planck function wrt temp
+                                                      !    Dimensions: (nbndlw)
+
+! ----- Output -----
+      real(kind=rb), intent(out) :: totuflux(0:)      ! upward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totdflux(0:)      ! downward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: fnet(0:)          ! net longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: htr(0:)           ! longwave heating rate (k/day)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totuclfl(0:)      ! clear sky upward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: totdclfl(0:)      ! clear sky downward longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: fnetc(0:)         ! clear sky net longwave flux (w/m2)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: htrc(0:)          ! clear sky longwave heating rate (k/day)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: dtotuflux_dt(0:)  ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(out) :: dtotuclfl_dt(0:)  ! change in upward longwave flux (w/m2/k)
+                                                      ! with respect to surface temperature
+                                                      !    Dimensions: (0:nlayers)
+
+! ----- Local -----
+! Declarations for radiative transfer
+      real(kind=rb) :: abscld(nlayers,nbndlw)
+      real(kind=rb) :: atot(nlayers)
+      real(kind=rb) :: atrans(nlayers)
+      real(kind=rb) :: bbugas(nlayers)
+      real(kind=rb) :: bbutot(nlayers)
+      real(kind=rb) :: clrurad(0:nlayers)
+      real(kind=rb) :: clrdrad(0:nlayers)
+      real(kind=rb) :: efclfrac(nlayers,nbndlw)
+      real(kind=rb) :: uflux(0:nlayers)
+      real(kind=rb) :: dflux(0:nlayers)
+      real(kind=rb) :: urad(0:nlayers)
+      real(kind=rb) :: drad(0:nlayers)
+      real(kind=rb) :: uclfl(0:nlayers)
+      real(kind=rb) :: dclfl(0:nlayers)
+      real(kind=rb) :: odcld(nlayers,nbndlw)
+
+      real(kind=rb) :: secdiff(nbndlw)                 ! secant of diffusivity angle
+      real(kind=rb) :: a0(nbndlw),a1(nbndlw),a2(nbndlw)! diffusivity angle adjustment coefficients
+      real(kind=rb) :: wtdiff, rec_6
+      real(kind=rb) :: transcld, radld, radclrd, plfrac, blay, dplankup, dplankdn
+      real(kind=rb) :: odepth, odtot, odepth_rec, odtot_rec, gassrc, ttot
+      real(kind=rb) :: tblind, tfactot, bbd, bbdtot, tfacgas, transc, tausfac
+      real(kind=rb) :: rad0, reflect, radlu, radclru
+
+      real(kind=rb) :: duflux_dt(0:nlayers)
+      real(kind=rb) :: duclfl_dt(0:nlayers)
+      real(kind=rb) :: d_urad_dt(0:nlayers)
+      real(kind=rb) :: d_clrurad_dt(0:nlayers)
+      real(kind=rb) :: d_rad0_dt, d_radlu_dt, d_radclru_dt
+
+      integer(kind=im) :: icldlyr(nlayers)             ! flag for cloud in layer
+      integer(kind=im) :: ibnd, ib, iband, lay, lev, l ! loop indices
+      integer(kind=im) :: igc                          ! g-point interval counter
+      integer(kind=im) :: iclddn                       ! flag for cloud in down path
+      integer(kind=im) :: ittot, itgas, itr            ! lookup table indices
+      integer(kind=im) :: ipat(16,0:2)
+
+! Declarations for cloud overlap adjustment
+      real(kind=rb) :: faccld1(nlayers+1),faccld2(nlayers+1)
+      real(kind=rb) :: facclr1(nlayers+1),facclr2(nlayers+1)
+      real(kind=rb) :: faccmb1(nlayers+1),faccmb2(nlayers+1)
+      real(kind=rb) :: faccld1d(0:nlayers),faccld2d(0:nlayers)
+      real(kind=rb) :: facclr1d(0:nlayers),facclr2d(0:nlayers)
+      real(kind=rb) :: faccmb1d(0:nlayers),faccmb2d(0:nlayers)
+
+      real(kind=rb) :: fmax, fmin, rat1, rat2
+      real(kind=rb) :: clrradd, cldradd, clrradu, cldradu, oldclr, oldcld
+      real(kind=rb) :: rad, cldsrc, radmod
+
+      integer(kind=im) :: istcld(nlayers+1),istcldd(0:nlayers)
+
+! ------- Definitions -------
+! input
+!    nlayers                      ! number of model layers
+!    ngptlw                       ! total number of g-point subintervals
+!    nbndlw                       ! number of longwave spectral bands
+!    ncbands                      ! number of spectral bands for clouds
+!    secdiff                      ! diffusivity angle
+!    wtdiff                       ! weight for radiance to flux conversion
+!    pavel                        ! layer pressures (mb)
+!    pz                           ! level (interface) pressures (mb)
+!    tavel                        ! layer temperatures (k)
+!    tz                           ! level (interface) temperatures(mb)
+!    tbound                       ! surface temperature (k)
+!    cldfrac                      ! layer cloud fraction
+!    taucloud                     ! layer cloud optical depth
+!    itr                          ! integer look-up table index
+!    icldlyr                      ! flag for cloudy layers
+!    iclddn                       ! flag for cloud in column at any layer
+!    semiss                       ! surface emissivities for each band
+!    reflect                      ! surface reflectance
+!    bpade                        ! 1/(pade constant)
+!    tau_tbl                      ! clear sky optical depth look-up table
+!    exp_tbl                      ! exponential look-up table for transmittance
+!    tfn_tbl                      ! tau transition function look-up table
+
+! local
+!    atrans                       ! gaseous absorptivity
+!    abscld                       ! cloud absorptivity
+!    atot                         ! combined gaseous and cloud absorptivity
+!    odclr                        ! clear sky (gaseous) optical depth
+!    odcld                        ! cloud optical depth
+!    odtot                        ! optical depth of gas and cloud
+!    tfacgas                      ! gas-only pade factor, used for planck fn
+!    tfactot                      ! gas and cloud pade factor, used for planck fn
+!    bbdgas                       ! gas-only planck function for downward rt
+!    bbugas                       ! gas-only planck function for upward rt
+!    bbdtot                       ! gas and cloud planck function for downward rt
+!    bbutot                       ! gas and cloud planck function for upward calc.
+!    gassrc                       ! source radiance due to gas only
+!    efclfrac                     ! effective cloud fraction
+!    radlu                        ! spectrally summed upward radiance 
+!    radclru                      ! spectrally summed clear sky upward radiance 
+!    urad                         ! upward radiance by layer
+!    clrurad                      ! clear sky upward radiance by layer
+!    radld                        ! spectrally summed downward radiance 
+!    radclrd                      ! spectrally summed clear sky downward radiance 
+!    drad                         ! downward radiance by layer
+!    clrdrad                      ! clear sky downward radiance by layer
+!    d_radlu_dt                   ! spectrally summed upward radiance 
+!    d_radclru_dt                 ! spectrally summed clear sky upward radiance 
+!    d_urad_dt                    ! upward radiance by layer
+!    d_clrurad_dt                 ! clear sky upward radiance by layer
+
+! output
+!    totuflux                     ! upward longwave flux (w/m2)
+!    totdflux                     ! downward longwave flux (w/m2)
+!    fnet                         ! net longwave flux (w/m2)
+!    htr                          ! longwave heating rate (k/day)
+!    totuclfl                     ! clear sky upward longwave flux (w/m2)
+!    totdclfl                     ! clear sky downward longwave flux (w/m2)
+!    fnetc                        ! clear sky net longwave flux (w/m2)
+!    htrc                         ! clear sky longwave heating rate (k/day)
+!    dtotuflux_dt                 ! change in upward longwave flux (w/m2/k)
+!                                 ! with respect to surface temperature
+!    dtotuclfl_dt                 ! change in clear sky upward longwave flux (w/m2/k)
+!                                 ! with respect to surface temperature
+
+
+! These arrays indicate the spectral 'region' (used in the 
+! calculation of ice cloud optical depths) corresponding
+! to each spectral band.  See cldprop.f for more details.
+      data ipat /1,1,1,1,1,1,1,1,1, 1, 1, 1, 1, 1, 1, 1, &
+                 1,2,3,3,3,4,4,4,5, 5, 5, 5, 5, 5, 5, 5, &
+                 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/
+
+! This secant and weight corresponds to the standard diffusivity 
+! angle.  This initial value is redefined below for some bands.
+      data wtdiff /0.5_rb/
+      data rec_6 /0.166667_rb/
+
+! Reset diffusivity angle for Bands 2-3 and 5-9 to vary (between 1.50
+! and 1.80) as a function of total column water vapor.  The function
+! has been defined to minimize flux and cooling rate errors in these bands
+! over a wide range of precipitable water values.
+      data a0 / 1.66_rb,  1.55_rb,  1.58_rb,  1.66_rb, &
+                1.54_rb, 1.454_rb,  1.89_rb,  1.33_rb, &
+               1.668_rb,  1.66_rb,  1.66_rb,  1.66_rb, &
+                1.66_rb,  1.66_rb,  1.66_rb,  1.66_rb /
+      data a1 / 0.00_rb,  0.25_rb,  0.22_rb,  0.00_rb, &
+                0.13_rb, 0.446_rb, -0.10_rb,  0.40_rb, &
+              -0.006_rb,  0.00_rb,  0.00_rb,  0.00_rb, &
+                0.00_rb,  0.00_rb,  0.00_rb,  0.00_rb /
+      data a2 / 0.00_rb, -12.0_rb, -11.7_rb,  0.00_rb, &
+               -0.72_rb,-0.243_rb,  0.19_rb,-0.062_rb, &
+               0.414_rb,  0.00_rb,  0.00_rb,  0.00_rb, &
+                0.00_rb,  0.00_rb,  0.00_rb,  0.00_rb /
+
+      do ibnd = 1,nbndlw
+         if (ibnd.eq.1 .or. ibnd.eq.4 .or. ibnd.ge.10) then
+           secdiff(ibnd) = 1.66_rb
+         else
+           secdiff(ibnd) = a0(ibnd) + a1(ibnd)*exp(a2(ibnd)*pwvcm)
+           if (secdiff(ibnd) .gt. 1.80_rb) secdiff(ibnd) = 1.80_rb
+           if (secdiff(ibnd) .lt. 1.50_rb) secdiff(ibnd) = 1.50_rb
+         endif
+      enddo
+
+      hvrrtx = '$Revision: 1.7 $'
+
+      urad(0) = 0.0_rb
+      drad(0) = 0.0_rb
+      totuflux(0) = 0.0_rb
+      totdflux(0) = 0.0_rb
+      clrurad(0) = 0.0_rb
+      clrdrad(0) = 0.0_rb
+      totuclfl(0) = 0.0_rb
+      totdclfl(0) = 0.0_rb
+      if (idrv .eq. 1) then
+         d_urad_dt(0) = 0.0_rb
+         d_clrurad_dt(0) = 0.0_rb
+         dtotuflux_dt(0) = 0.0_rb
+         dtotuclfl_dt(0) = 0.0_rb
+      endif
+
+      do lay = 1, nlayers
+         urad(lay) = 0.0_rb
+         drad(lay) = 0.0_rb
+         totuflux(lay) = 0.0_rb
+         totdflux(lay) = 0.0_rb
+         clrurad(lay) = 0.0_rb
+         clrdrad(lay) = 0.0_rb
+         totuclfl(lay) = 0.0_rb
+         totdclfl(lay) = 0.0_rb
+         if (idrv .eq. 1) then
+            d_urad_dt(lay) = 0.0_rb
+            d_clrurad_dt(lay) = 0.0_rb
+            dtotuflux_dt(lay) = 0.0_rb
+            dtotuclfl_dt(lay) = 0.0_rb
+         endif
+
+         do ib = 1, ncbands
+            if (cldfrac(lay) .ge. 1.e-6_rb) then
+               odcld(lay,ib) = secdiff(ib) * taucloud(lay,ib)
+               icldlyr(lay) = 1
+            else
+               odcld(lay,ib) = 0.0_rb
+               icldlyr(lay) = 0
+            endif
+         enddo
+      enddo
+
+! Maximum/Random cloud overlap parameter
+
+      istcld(1) = 1
+      istcldd(nlayers) = 1
+      do lev = 1, nlayers
+
+         if (icldlyr(lev).eq.1) then
+! Maximum/random cloud overlap
+            istcld(lev+1) = 0
+            if (lev .eq. nlayers) then
+               faccld1(lev+1) = 0._rb
+               faccld2(lev+1) = 0._rb
+               facclr1(lev+1) = 0._rb
+               facclr2(lev+1) = 0._rb
+               faccmb1(lev+1) = 0._rb
+               faccmb2(lev+1) = 0._rb
+            elseif (cldfrac(lev+1) .ge. cldfrac(lev)) then
+               faccld1(lev+1) = 0._rb
+               faccld2(lev+1) = 0._rb
+               if (istcld(lev) .eq. 1) then
+                  facclr1(lev+1) = 0._rb
+                  facclr2(lev+1) = 0._rb
+                  if (cldfrac(lev) .lt. 1._rb) facclr2(lev+1) = &
+                     (cldfrac(lev+1)-cldfrac(lev))/(1._rb-cldfrac(lev))
+                  facclr2(lev) = 0._rb
+                  faccld2(lev) = 0._rb
+               else
+                  fmax = max(cldfrac(lev),cldfrac(lev-1))
+                  if (cldfrac(lev+1) .gt. fmax) then
+                     facclr1(lev+1) = rat2
+                     facclr2(lev+1) = (cldfrac(lev+1)-fmax)/(1._rb-fmax)
+                  elseif (cldfrac(lev+1) .lt. fmax) then
+                     facclr1(lev+1) = (cldfrac(lev+1)-cldfrac(lev))/ &
+                        (cldfrac(lev-1)-cldfrac(lev))
+                     facclr2(lev+1) = 0._rb
+                  else
+                     facclr1(lev+1) = rat2
+                     facclr2(lev+1) = 0._rb
+                  endif
+               endif
+               if (facclr1(lev+1).gt.0._rb .or. facclr2(lev+1).gt.0._rb) then
+                  rat1 = 1._rb
+                  rat2 = 0._rb
+               else
+                  rat1 = 0._rb
+                  rat2 = 0._rb
+               endif
+            else
+               facclr1(lev+1) = 0._rb
+               facclr2(lev+1) = 0._rb
+               if (istcld(lev) .eq. 1) then
+                  faccld1(lev+1) = 0._rb
+                  faccld2(lev+1) = (cldfrac(lev)-cldfrac(lev+1))/cldfrac(lev)
+
+                  facclr2(lev) = 0._rb
+                  faccld2(lev) = 0._rb
+               else
+                  fmin = min(cldfrac(lev),cldfrac(lev-1))
+                  if (cldfrac(lev+1) .le. fmin) then
+                     faccld1(lev+1) = rat1
+                     faccld2(lev+1) = (fmin-cldfrac(lev+1))/fmin
+                  else
+                     faccld1(lev+1) = (cldfrac(lev)-cldfrac(lev+1))/(cldfrac(lev)-fmin)
+                     faccld2(lev+1) = 0._rb
+                  endif
+               endif
+               if (faccld1(lev+1).gt.0._rb .or. faccld2(lev+1).gt.0._rb) then
+                  rat1 = 0._rb
+                  rat2 = 1._rb
+               else
+                  rat1 = 0._rb
+                  rat2 = 0._rb
+               endif
+            endif
+            faccmb1(lev+1) = facclr1(lev+1) * faccld2(lev) * cldfrac(lev-1) 
+            faccmb2(lev+1) = faccld1(lev+1) * facclr2(lev) * (1._rb - cldfrac(lev-1)) 
+         else
+            istcld(lev+1) = 1
+         endif
+      enddo
+
+      do lev = nlayers, 1, -1
+         if (icldlyr(lev).eq.1) then
+            istcldd(lev-1) = 0
+            if (lev .eq. 1) then
+               faccld1d(lev-1) = 0._rb
+               faccld2d(lev-1) = 0._rb
+               facclr1d(lev-1) = 0._rb
+               facclr2d(lev-1) = 0._rb
+               faccmb1d(lev-1) = 0._rb
+               faccmb2d(lev-1) = 0._rb
+            elseif (cldfrac(lev-1) .ge. cldfrac(lev)) then
+               faccld1d(lev-1) = 0._rb
+               faccld2d(lev-1) = 0._rb
+               if (istcldd(lev) .eq. 1) then
+                  facclr1d(lev-1) = 0._rb
+                  facclr2d(lev-1) = 0._rb
+                  if (cldfrac(lev) .lt. 1._rb) facclr2d(lev-1) = &
+                     (cldfrac(lev-1)-cldfrac(lev))/(1._rb-cldfrac(lev))
+                  facclr2d(lev) = 0._rb
+                  faccld2d(lev) = 0._rb
+               else
+                  fmax = max(cldfrac(lev),cldfrac(lev+1))
+                  if (cldfrac(lev-1) .gt. fmax) then
+                     facclr1d(lev-1) = rat2
+                     facclr2d(lev-1) = (cldfrac(lev-1)-fmax)/(1._rb-fmax)
+                  elseif (cldfrac(lev-1) .lt. fmax) then
+                     facclr1d(lev-1) = (cldfrac(lev-1)-cldfrac(lev))/ &
+                        (cldfrac(lev+1)-cldfrac(lev))
+                     facclr2d(lev-1) = 0.
+                  else
+                     facclr1d(lev-1) = rat2
+                     facclr2d(lev-1) = 0._rb
+                  endif
+               endif
+               if (facclr1d(lev-1).gt.0._rb .or. facclr2d(lev-1).gt.0._rb)then
+                  rat1 = 1._rb
+                  rat2 = 0._rb
+               else
+                  rat1 = 0._rb
+                  rat2 = 0._rb
+               endif
+            else
+               facclr1d(lev-1) = 0._rb
+               facclr2d(lev-1) = 0._rb
+               if (istcldd(lev) .eq. 1) then
+                  faccld1d(lev-1) = 0._rb
+                  faccld2d(lev-1) = (cldfrac(lev)-cldfrac(lev-1))/cldfrac(lev)
+                  facclr2d(lev) = 0._rb
+                  faccld2d(lev) = 0._rb
+               else
+                  fmin = min(cldfrac(lev),cldfrac(lev+1))
+                  if (cldfrac(lev-1) .le. fmin) then
+                     faccld1d(lev-1) = rat1
+                     faccld2d(lev-1) = (fmin-cldfrac(lev-1))/fmin
+                  else
+                     faccld1d(lev-1) = (cldfrac(lev)-cldfrac(lev-1))/(cldfrac(lev)-fmin)
+                     faccld2d(lev-1) = 0._rb
+                  endif
+               endif
+               if (faccld1d(lev-1).gt.0._rb .or. faccld2d(lev-1).gt.0._rb)then
+                  rat1 = 0._rb
+                  rat2 = 1._rb
+               else
+                  rat1 = 0._rb
+                  rat2 = 0._rb
+               endif
+            endif
+            faccmb1d(lev-1) = facclr1d(lev-1) * faccld2d(lev) * cldfrac(lev+1) 
+            faccmb2d(lev-1) = faccld1d(lev-1) * facclr2d(lev) * (1._rb - cldfrac(lev+1))
+         else
+            istcldd(lev-1) = 1
+         endif
+      enddo
+
+      igc = 1
+! Loop over frequency bands.
+      do iband = istart, iend
+
+! Reinitialize g-point counter for each band if output for each band is requested.
+         if (iout.gt.0.and.iband.ge.2) igc = ngs(iband-1)+1
+         if (ncbands .eq. 1) then
+            ib = ipat(iband,0)
+         elseif (ncbands .eq.  5) then
+            ib = ipat(iband,1)
+         elseif (ncbands .eq. 16) then
+            ib = ipat(iband,2)
+         endif
+
+! Loop over g-channels.
+ 1000    continue
+
+! Radiative transfer starts here.
+         radld = 0._rb
+         radclrd = 0._rb
+         iclddn = 0
+
+! Downward radiative transfer loop.  
+
+         do lev = nlayers, 1, -1
+               plfrac = fracs(lev,igc)
+               blay = planklay(lev,iband)
+               dplankup = planklev(lev,iband) - blay
+               dplankdn = planklev(lev-1,iband) - blay
+               odepth = secdiff(iband) * taut(lev,igc)
+
+               if (odepth .lt. 0.0_rb) odepth = 0.0_rb
+! Cloudy layer
+               if (icldlyr(lev).eq.1) then
+                  iclddn = 1
+                  odtot = odepth + odcld(lev,ib)
+                  if (odtot .lt. 0.06_rb) then
+                     atrans(lev) = odepth - 0.5_rb*odepth*odepth
+                     odepth_rec = rec_6*odepth
+                     gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev)
+
+                     atot(lev) =  odtot - 0.5_rb*odtot*odtot
+                     odtot_rec = rec_6*odtot
+                     bbdtot =  plfrac * (blay+dplankdn*odtot_rec)
+                     bbd = plfrac*(blay+dplankdn*odepth_rec)
+                  
+                     bbugas(lev) =  plfrac * (blay+dplankup*odepth_rec)
+                     bbutot(lev) =  plfrac * (blay+dplankup*odtot_rec)
+                  elseif (odepth .le. 0.06_rb) then
+                     atrans(lev) = odepth - 0.5_rb*odepth*odepth
+                     odepth_rec = rec_6*odepth
+                     gassrc = plfrac*(blay+dplankdn*odepth_rec)*atrans(lev)
+
+                     odtot = odepth + odcld(lev,ib)
+                     tblind = odtot/(bpade+odtot)
+                     ittot = tblint*tblind + 0.5_rb
+                     tfactot = tfn_tbl(ittot)
+                     bbdtot = plfrac * (blay + tfactot*dplankdn)
+                     bbd = plfrac*(blay+dplankdn*odepth_rec)
+                     atot(lev) = 1._rb - exp_tbl(ittot)
+
+                     bbugas(lev) = plfrac * (blay + dplankup*odepth_rec)
+                     bbutot(lev) = plfrac * (blay + tfactot * dplankup)
+                  else
+                     tblind = odepth/(bpade+odepth)
+                     itgas = tblint*tblind+0.5_rb
+                     odepth = tau_tbl(itgas)
+                     atrans(lev) = 1._rb - exp_tbl(itgas)
+                     tfacgas = tfn_tbl(itgas)
+                     gassrc = atrans(lev) * plfrac * (blay + tfacgas*dplankdn)
+
+                     odtot = odepth + odcld(lev,ib)
+                     tblind = odtot/(bpade+odtot)
+                     ittot = tblint*tblind + 0.5_rb
+                     tfactot = tfn_tbl(ittot)
+                     bbdtot = plfrac * (blay + tfactot*dplankdn)
+                     bbd = plfrac*(blay+tfacgas*dplankdn)
+                     atot(lev) = 1._rb - exp_tbl(ittot)
+
+                     bbugas(lev) = plfrac * (blay + tfacgas * dplankup)
+                     bbutot(lev) = plfrac * (blay + tfactot * dplankup)
+                  endif
+
+                  if (istcldd(lev) .eq. 1) then
+                     cldradd = cldfrac(lev) * radld
+                     clrradd = radld - cldradd
+                     oldcld = cldradd
+                     oldclr = clrradd
+                     rad = 0._rb
+                  endif
+                  ttot = 1._rb - atot(lev)
+                  cldsrc = bbdtot * atot(lev)
+                  cldradd = cldradd * ttot + cldfrac(lev) * cldsrc
+                  clrradd = clrradd * (1._rb-atrans(lev)) + (1._rb - cldfrac(lev)) * gassrc
+                  radld = cldradd + clrradd
+                  drad(lev-1) = drad(lev-1) + radld
+
+                  radmod = rad * &
+                       (facclr1d(lev-1) * (1.-atrans(lev)) + &
+                       faccld1d(lev-1) *  ttot) - &
+                       faccmb1d(lev-1) * gassrc + &
+                       faccmb2d(lev-1) * cldsrc
+
+                  oldcld = cldradd - radmod
+                  oldclr = clrradd + radmod
+                  rad = -radmod + facclr2d(lev-1)*oldclr - faccld2d(lev-1)*oldcld
+                  cldradd = cldradd + rad
+                  clrradd = clrradd - rad
+! Clear layer
+               else
+                  if (odepth .le. 0.06_rb) then
+                     atrans(lev) = odepth-0.5_rb*odepth*odepth
+                     odepth = rec_6*odepth
+                     bbd = plfrac*(blay+dplankdn*odepth)
+                     bbugas(lev) = plfrac*(blay+dplankup*odepth)
+                  else
+                     tblind = odepth/(bpade+odepth)
+                     itr = tblint*tblind+0.5_rb
+                     transc = exp_tbl(itr)
+                     atrans(lev) = 1._rb-transc
+                     tausfac = tfn_tbl(itr)
+                     bbd = plfrac*(blay+tausfac*dplankdn)
+                     bbugas(lev) = plfrac * (blay + tausfac * dplankup)
+                  endif   
+                  radld = radld + (bbd-radld)*atrans(lev)
+                  drad(lev-1) = drad(lev-1) + radld
+                endif
+!  Set clear sky stream to total sky stream as long as layers
+!  remain clear.  Streams diverge when a cloud is reached (iclddn=1),
+!  and clear sky stream must be computed separately from that point.
+                 if (iclddn.eq.1) then
+                     radclrd = radclrd + (bbd-radclrd) * atrans(lev) 
+                     clrdrad(lev-1) = clrdrad(lev-1) + radclrd
+                  else
+                     radclrd = radld
+                     clrdrad(lev-1) = drad(lev-1)
+                  endif
+            enddo
+
+! Spectral emissivity & reflectance
+!  Include the contribution of spectrally varying longwave emissivity
+!  and reflection from the surface to the upward radiative transfer.
+!  Note: Spectral and Lambertian reflection are identical for the
+!  diffusivity angle flux integration used here.
+!  Note: The emissivity is applied to plankbnd and dplankbnd_dt when 
+!  they are defined in subroutine setcoef. 
+
+         rad0 = fracs(1,igc) * plankbnd(iband)
+         if (idrv .eq. 1) then
+            d_rad0_dt = fracs(1,igc) * dplankbnd_dt(iband)
+         endif
+
+!  Add in reflection of surface downward radiance.
+         reflect = 1._rb - semiss(iband)
+         radlu = rad0 + reflect * radld
+         radclru = rad0 + reflect * radclrd
+
+! Upward radiative transfer loop.
+
+         urad(0) = urad(0) + radlu
+         clrurad(0) = clrurad(0) + radclru
+         if (idrv .eq. 1) then
+            d_radlu_dt = d_rad0_dt
+            d_urad_dt(0) = d_urad_dt(0) + d_radlu_dt
+            d_radclru_dt = d_rad0_dt
+            d_clrurad_dt(0) = d_clrurad_dt(0) + d_radclru_dt
+         endif
+
+         do lev = 1, nlayers
+! Cloudy layer
+            if (icldlyr(lev) .eq. 1) then
+               gassrc = bbugas(lev) * atrans(lev)
+               if (istcld(lev) .eq. 1) then
+                  cldradu = cldfrac(lev) * radlu
+                  clrradu = radlu - cldradu
+                  oldcld = cldradu
+                  oldclr = clrradu
+                  rad = 0._rb
+               endif
+               ttot = 1._rb - atot(lev)
+               cldsrc = bbutot(lev) * atot(lev)
+               cldradu = cldradu * ttot + cldfrac(lev) * cldsrc
+               clrradu = clrradu * (1.0_rb-atrans(lev)) + (1._rb - cldfrac(lev)) * gassrc
+! Total sky radiance
+               radlu = cldradu + clrradu
+               urad(lev) = urad(lev) + radlu
+               radmod = rad * &
+                   (facclr1(lev+1)*(1.0_rb-atrans(lev))+ &
+                   faccld1(lev+1) *  ttot) - &
+                   faccmb1(lev+1) * gassrc + &
+                   faccmb2(lev+1) * cldsrc
+               oldcld = cldradu - radmod
+               oldclr = clrradu + radmod
+               rad = -radmod + facclr2(lev+1)*oldclr - faccld2(lev+1)*oldcld
+               cldradu = cldradu + rad
+               clrradu = clrradu - rad
+               if (idrv .eq. 1) then
+                  d_radlu_dt = d_radlu_dt * cldfrac(lev) * (1.0_rb - atot(lev)) + &
+                         d_radlu_dt * (1.0_rb - cldfrac(lev)) * (1.0_rb - atrans(lev))
+                  d_urad_dt(lev) = d_urad_dt(lev) + d_radlu_dt
+               endif
+! Clear layer
+            else
+               radlu = radlu + (bbugas(lev)-radlu)*atrans(lev)
+               urad(lev) = urad(lev) + radlu
+               if (idrv .eq. 1) then
+                  d_radlu_dt = d_radlu_dt * (1.0_rb - atrans(lev))
+                  d_urad_dt(lev) = d_urad_dt(lev) + d_radlu_dt
+               endif
+            endif
+!  Set clear sky stream to total sky stream as long as all layers
+!  are clear (iclddn=0).  Streams must be calculated separately at 
+!  all layers when a cloud is present (iclddn=1), because surface 
+!  reflectance is different for each stream.
+               if (iclddn.eq.1) then
+                  radclru = radclru + (bbugas(lev)-radclru)*atrans(lev) 
+                  clrurad(lev) = clrurad(lev) + radclru
+               else
+                  radclru = radlu
+                  clrurad(lev) = urad(lev)
+               endif
+               if (idrv .eq. 1) then
+                  if (iclddn.eq.1) then
+                     d_radclru_dt = d_radclru_dt * (1.0_rb - atrans(lev))
+                     d_clrurad_dt(lev) = d_clrurad_dt(lev) + d_radclru_dt
+                  else
+                     d_radclru_dt = d_radlu_dt
+                     d_clrurad_dt(lev) = d_urad_dt(lev)
+                  endif
+               endif
+         enddo
+
+! Increment g-point counter
+         igc = igc + 1
+! Return to continue radiative transfer for all g-channels in present band
+         if (igc .le. ngs(iband)) go to 1000
+
+! Process longwave output from band.
+! Calculate upward, downward, and net flux.
+         do lev = nlayers, 0, -1
+            uflux(lev) = urad(lev)*wtdiff
+            dflux(lev) = drad(lev)*wtdiff
+            urad(lev) = 0.0_rb
+            drad(lev) = 0.0_rb
+            totuflux(lev) = totuflux(lev) + uflux(lev) * delwave(iband)
+            totdflux(lev) = totdflux(lev) + dflux(lev) * delwave(iband)
+            uclfl(lev) = clrurad(lev)*wtdiff
+            dclfl(lev) = clrdrad(lev)*wtdiff
+            clrurad(lev) = 0.0_rb
+            clrdrad(lev) = 0.0_rb
+            totuclfl(lev) = totuclfl(lev) + uclfl(lev) * delwave(iband)
+            totdclfl(lev) = totdclfl(lev) + dclfl(lev) * delwave(iband)
+         enddo
+
+! Calculate total change in upward flux wrt surface temperature
+         if (idrv .eq. 1) then
+            do lev = nlayers, 0, -1
+               duflux_dt(lev) = d_urad_dt(lev) * wtdiff
+               d_urad_dt(lev) = 0.0_rb
+               dtotuflux_dt(lev) = dtotuflux_dt(lev) + duflux_dt(lev) * delwave(iband) * fluxfac
+
+               duclfl_dt(lev) = d_clrurad_dt(lev) * wtdiff
+               d_clrurad_dt(lev) = 0.0_rb
+               dtotuclfl_dt(lev) = dtotuclfl_dt(lev) + duclfl_dt(lev) * delwave(iband) * fluxfac
+            enddo
+         endif
+
+! End spectral band loop
+      enddo
+
+! Calculate fluxes at surface
+      totuflux(0) = totuflux(0) * fluxfac
+      totdflux(0) = totdflux(0) * fluxfac
+      fnet(0) = totuflux(0) - totdflux(0)
+
+      totuclfl(0) = totuclfl(0) * fluxfac
+      totdclfl(0) = totdclfl(0) * fluxfac
+      fnetc(0) = totuclfl(0) - totdclfl(0)
+
+! Calculate fluxes at model levels
+      do lev = 1, nlayers
+         totuflux(lev) = totuflux(lev) * fluxfac
+         totdflux(lev) = totdflux(lev) * fluxfac
+         fnet(lev) = totuflux(lev) - totdflux(lev)
+         totuclfl(lev) = totuclfl(lev) * fluxfac
+         totdclfl(lev) = totdclfl(lev) * fluxfac
+         fnetc(lev) = totuclfl(lev) - totdclfl(lev)
+         l = lev - 1
+
+! Calculate heating rates at model layers
+         htr(l)=heatfac*(fnet(l)-fnet(lev))/(pz(l)-pz(lev)) 
+         htrc(l)=heatfac*(fnetc(l)-fnetc(lev))/(pz(l)-pz(lev)) 
+      enddo
+
+! Set heating rate to zero in top layer
+      htr(nlayers) = 0.0_rb
+      htrc(nlayers) = 0.0_rb
+
+      end subroutine rtrnmr
+
+      end module rrtmg_lw_rtrnmr
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_setcoef.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_setcoef.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_setcoef.f90	(revision 3477)
@@ -0,0 +1,1993 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_setcoef.f90,v $
+!     author:    $Author: miacono $
+!     revision:  $Revision: 1.6 $
+!     created:   $Date: 2011/04/08 20:25:01 $
+!
+      module rrtmg_lw_setcoef
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrtm, only : nbndlw, mg, maxxsec, mxmol
+      use rrlw_wvn, only: totplnk, totplk16, totplnkderiv, totplk16deriv
+      use rrlw_ref
+      use rrlw_vsn, only: hvrset, hnamset
+
+      implicit none
+
+      contains
+
+!----------------------------------------------------------------------------
+      subroutine setcoef(nlayers, istart, pavel, tavel, tz, tbound, semiss, &
+                         coldry, wkl, wbroad, &
+                         laytrop, jp, jt, jt1, planklay, planklev, plankbnd, &
+                         idrv, dplankbnd_dt, &
+                         colh2o, colco2, colo3, coln2o, colco, colch4, colo2, &
+                         colbrd, fac00, fac01, fac10, fac11, &
+                         rat_h2oco2, rat_h2oco2_1, rat_h2oo3, rat_h2oo3_1, &
+                         rat_h2on2o, rat_h2on2o_1, rat_h2och4, rat_h2och4_1, &
+                         rat_n2oco2, rat_n2oco2_1, rat_o3co2, rat_o3co2_1, &
+                         selffac, selffrac, indself, forfac, forfrac, indfor, &
+                         minorfrac, scaleminor, scaleminorn2, indminor)
+!----------------------------------------------------------------------------
+!
+!  Purpose:  For a given atmosphere, calculate the indices and
+!  fractions related to the pressure and temperature interpolations.
+!  Also calculate the values of the integrated Planck functions 
+!  for each band at the level and layer temperatures.
+
+! ------- Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: istart          ! beginning band of calculation
+      integer(kind=im), intent(in) :: idrv            ! Planck derivative option flag
+
+      real(kind=rb), intent(in) :: pavel(:)           ! layer pressures (mb) 
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tavel(:)           ! layer temperatures (K)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tz(0:)             ! level (interface) temperatures (K)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tbound             ! surface temperature (K)
+      real(kind=rb), intent(in) :: coldry(:)          ! dry air column density (mol/cm2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: wbroad(:)          ! broadening gas column density (mol/cm2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: wkl(:,:)           ! molecular amounts (mol/cm-2)
+                                                      !    Dimensions: (mxmol,nlayers)
+      real(kind=rb), intent(in) :: semiss(:)          ! lw surface emissivity
+                                                      !    Dimensions: (nbndlw)
+
+! ----- Output -----
+      integer(kind=im), intent(out) :: laytrop        ! tropopause layer index
+      integer(kind=im), intent(out) :: jp(:)          ! 
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(out) :: jt(:)          !
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(out) :: jt1(:)         !
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: planklay(:,:)     ! 
+                                                      !    Dimensions: (nlayers,nbndlw)
+      real(kind=rb), intent(out) :: planklev(0:,:)    ! 
+                                                      !    Dimensions: (0:nlayers,nbndlw)
+      real(kind=rb), intent(out) :: plankbnd(:)       ! 
+                                                      !    Dimensions: (nbndlw)
+      real(kind=rb), intent(out) :: dplankbnd_dt(:)   ! 
+                                                      !    Dimensions: (nbndlw)
+
+      real(kind=rb), intent(out) :: colh2o(:)         ! column amount (h2o)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colco2(:)         ! column amount (co2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colo3(:)          ! column amount (o3)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: coln2o(:)         ! column amount (n2o)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colco(:)          ! column amount (co)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colch4(:)         ! column amount (ch4)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colo2(:)          ! column amount (o2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colbrd(:)         ! column amount (broadening gases)
+                                                      !    Dimensions: (nlayers)
+
+      integer(kind=im), intent(out) :: indself(:)
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(out) :: indfor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: selffac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: selffrac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: forfac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: forfrac(:)
+                                                      !    Dimensions: (nlayers)
+
+      integer(kind=im), intent(out) :: indminor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: minorfrac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: scaleminor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: scaleminorn2(:)
+                                                      !    Dimensions: (nlayers)
+
+      real(kind=rb), intent(out) :: &                 !
+                       fac00(:), fac01(:), &          !    Dimensions: (nlayers)
+                       fac10(:), fac11(:) 
+                                                        
+      real(kind=rb), intent(out) :: &                 !
+                       rat_h2oco2(:),rat_h2oco2_1(:), &
+                       rat_h2oo3(:),rat_h2oo3_1(:), & !    Dimensions: (nlayers)
+                       rat_h2on2o(:),rat_h2on2o_1(:), &
+                       rat_h2och4(:),rat_h2och4_1(:), &
+                       rat_n2oco2(:),rat_n2oco2_1(:), &
+                       rat_o3co2(:),rat_o3co2_1(:)
+                                                        
+
+! ----- Local -----
+      integer(kind=im) :: indbound, indlev0
+      integer(kind=im) :: lay, indlay, indlev, iband
+      integer(kind=im) :: jp1
+      real(kind=rb) :: stpfac, tbndfrac, t0frac, tlayfrac, tlevfrac
+      real(kind=rb) :: dbdtlev, dbdtlay
+      real(kind=rb) :: plog, fp, ft, ft1, water, scalefac, factor, compfp
+
+
+      hvrset = '$Revision: 1.6 $'
+
+      stpfac = 296._rb/1013._rb
+
+      indbound = tbound - 159._rb
+      if (indbound .lt. 1) then
+         indbound = 1
+      elseif (indbound .gt. 180) then
+         indbound = 180
+      endif
+      tbndfrac = tbound - 159._rb - real(indbound)
+      indlev0 = tz(0) - 159._rb
+      if (indlev0 .lt. 1) then
+         indlev0 = 1
+      elseif (indlev0 .gt. 180) then
+         indlev0 = 180
+      endif
+      t0frac = tz(0) - 159._rb - real(indlev0)
+      laytrop = 0
+
+! Begin layer loop 
+!  Calculate the integrated Planck functions for each band at the
+!  surface, level, and layer temperatures.
+      do lay = 1, nlayers
+         indlay = tavel(lay) - 159._rb
+         if (indlay .lt. 1) then
+            indlay = 1
+         elseif (indlay .gt. 180) then
+            indlay = 180
+         endif
+         tlayfrac = tavel(lay) - 159._rb - real(indlay)
+         indlev = tz(lay) - 159._rb
+         if (indlev .lt. 1) then
+            indlev = 1
+         elseif (indlev .gt. 180) then
+            indlev = 180
+         endif
+         tlevfrac = tz(lay) - 159._rb - real(indlev)
+
+! Begin spectral band loop 
+         do iband = 1, 15
+            if (lay.eq.1) then
+               dbdtlev = totplnk(indbound+1,iband) - totplnk(indbound,iband)
+               plankbnd(iband) = semiss(iband) * &
+                   (totplnk(indbound,iband) + tbndfrac * dbdtlev)
+               dbdtlev = totplnk(indlev0+1,iband)-totplnk(indlev0,iband)
+               planklev(0,iband) = totplnk(indlev0,iband) + t0frac * dbdtlev
+               if (idrv .eq. 1) then 
+                  dbdtlev = totplnkderiv(indbound+1,iband) - totplnkderiv(indbound,iband)
+                  dplankbnd_dt(iband) = semiss(iband) * &
+                      (totplnkderiv(indbound,iband) + tbndfrac * dbdtlev)
+               endif
+            endif
+            dbdtlev = totplnk(indlev+1,iband) - totplnk(indlev,iband)
+            dbdtlay = totplnk(indlay+1,iband) - totplnk(indlay,iband)
+            planklay(lay,iband) = totplnk(indlay,iband) + tlayfrac * dbdtlay
+            planklev(lay,iband) = totplnk(indlev,iband) + tlevfrac * dbdtlev
+         enddo
+
+!  For band 16, if radiative transfer will be performed on just
+!  this band, use integrated Planck values up to 3250 cm-1.  
+!  If radiative transfer will be performed across all 16 bands,
+!  then include in the integrated Planck values for this band
+!  contributions from 2600 cm-1 to infinity.
+         iband = 16
+         if (istart .eq. 16) then
+            if (lay.eq.1) then
+               dbdtlev = totplk16(indbound+1) - totplk16(indbound)
+               plankbnd(iband) = semiss(iband) * &
+                    (totplk16(indbound) + tbndfrac * dbdtlev)
+               if (idrv .eq. 1) then
+                  dbdtlev = totplk16deriv(indbound+1) - totplk16deriv(indbound)
+                  dplankbnd_dt(iband) = semiss(iband) * &
+                       (totplk16deriv(indbound) + tbndfrac * dbdtlev)
+               endif
+               dbdtlev = totplnk(indlev0+1,iband)-totplnk(indlev0,iband)
+               planklev(0,iband) = totplk16(indlev0) + &
+                    t0frac * dbdtlev
+            endif
+            dbdtlev = totplk16(indlev+1) - totplk16(indlev)
+            dbdtlay = totplk16(indlay+1) - totplk16(indlay)
+            planklay(lay,iband) = totplk16(indlay) + tlayfrac * dbdtlay
+            planklev(lay,iband) = totplk16(indlev) + tlevfrac * dbdtlev
+         else
+            if (lay.eq.1) then
+               dbdtlev = totplnk(indbound+1,iband) - totplnk(indbound,iband)
+               plankbnd(iband) = semiss(iband) * &
+                    (totplnk(indbound,iband) + tbndfrac * dbdtlev)
+               if (idrv .eq. 1) then 
+                  dbdtlev = totplnkderiv(indbound+1,iband) - totplnkderiv(indbound,iband)
+                  dplankbnd_dt(iband) = semiss(iband) * &
+                       (totplnkderiv(indbound,iband) + tbndfrac * dbdtlev)
+               endif
+               dbdtlev = totplnk(indlev0+1,iband)-totplnk(indlev0,iband)
+               planklev(0,iband) = totplnk(indlev0,iband) + t0frac * dbdtlev
+            endif
+            dbdtlev = totplnk(indlev+1,iband) - totplnk(indlev,iband)
+            dbdtlay = totplnk(indlay+1,iband) - totplnk(indlay,iband)
+            planklay(lay,iband) = totplnk(indlay,iband) + tlayfrac * dbdtlay
+            planklev(lay,iband) = totplnk(indlev,iband) + tlevfrac * dbdtlev
+         endif
+
+!  Find the two reference pressures on either side of the
+!  layer pressure.  Store them in JP and JP1.  Store in FP the
+!  fraction of the difference (in ln(pressure)) between these
+!  two values that the layer pressure lies.
+!         plog = alog(pavel(lay))
+         plog = dlog(pavel(lay))
+         jp(lay) = int(36._rb - 5*(plog+0.04_rb))
+         if (jp(lay) .lt. 1) then
+            jp(lay) = 1
+         elseif (jp(lay) .gt. 58) then
+            jp(lay) = 58
+         endif
+         jp1 = jp(lay) + 1
+         fp = 5._rb *(preflog(jp(lay)) - plog)
+
+!  Determine, for each reference pressure (JP and JP1), which
+!  reference temperature (these are different for each  
+!  reference pressure) is nearest the layer temperature but does
+!  not exceed it.  Store these indices in JT and JT1, resp.
+!  Store in FT (resp. FT1) the fraction of the way between JT
+!  (JT1) and the next highest reference temperature that the 
+!  layer temperature falls.
+         jt(lay) = int(3._rb + (tavel(lay)-tref(jp(lay)))/15._rb)
+         if (jt(lay) .lt. 1) then
+            jt(lay) = 1
+         elseif (jt(lay) .gt. 4) then
+            jt(lay) = 4
+         endif
+         ft = ((tavel(lay)-tref(jp(lay)))/15._rb) - real(jt(lay)-3)
+         jt1(lay) = int(3._rb + (tavel(lay)-tref(jp1))/15._rb)
+         if (jt1(lay) .lt. 1) then
+            jt1(lay) = 1
+         elseif (jt1(lay) .gt. 4) then
+            jt1(lay) = 4
+         endif
+         ft1 = ((tavel(lay)-tref(jp1))/15._rb) - real(jt1(lay)-3)
+         water = wkl(1,lay)/coldry(lay)
+         scalefac = pavel(lay) * stpfac / tavel(lay)
+
+!  If the pressure is less than ~100mb, perform a different
+!  set of species interpolations.
+         if (plog .le. 4.56_rb) go to 5300
+         laytrop =  laytrop + 1
+
+         forfac(lay) = scalefac / (1.+water)
+         factor = (332.0_rb-tavel(lay))/36.0_rb
+         indfor(lay) = min(2, max(1, int(factor)))
+         forfrac(lay) = factor - real(indfor(lay))
+
+!  Set up factors needed to separately include the water vapor
+!  self-continuum in the calculation of absorption coefficient.
+         selffac(lay) = water * forfac(lay)
+         factor = (tavel(lay)-188.0_rb)/7.2_rb
+         indself(lay) = min(9, max(1, int(factor)-7))
+         selffrac(lay) = factor - real(indself(lay) + 7)
+
+!  Set up factors needed to separately include the minor gases
+!  in the calculation of absorption coefficient
+         scaleminor(lay) = pavel(lay)/tavel(lay)
+         scaleminorn2(lay) = (pavel(lay)/tavel(lay)) &
+             *(wbroad(lay)/(coldry(lay)+wkl(1,lay)))
+         factor = (tavel(lay)-180.8_rb)/7.2_rb
+         indminor(lay) = min(18, max(1, int(factor)))
+         minorfrac(lay) = factor - real(indminor(lay))
+
+!  Setup reference ratio to be used in calculation of binary
+!  species parameter in lower atmosphere.
+         rat_h2oco2(lay)=chi_mls(1,jp(lay))/chi_mls(2,jp(lay))
+         rat_h2oco2_1(lay)=chi_mls(1,jp(lay)+1)/chi_mls(2,jp(lay)+1)
+
+         rat_h2oo3(lay)=chi_mls(1,jp(lay))/chi_mls(3,jp(lay))
+         rat_h2oo3_1(lay)=chi_mls(1,jp(lay)+1)/chi_mls(3,jp(lay)+1)
+
+         rat_h2on2o(lay)=chi_mls(1,jp(lay))/chi_mls(4,jp(lay))
+         rat_h2on2o_1(lay)=chi_mls(1,jp(lay)+1)/chi_mls(4,jp(lay)+1)
+
+         rat_h2och4(lay)=chi_mls(1,jp(lay))/chi_mls(6,jp(lay))
+         rat_h2och4_1(lay)=chi_mls(1,jp(lay)+1)/chi_mls(6,jp(lay)+1)
+
+         rat_n2oco2(lay)=chi_mls(4,jp(lay))/chi_mls(2,jp(lay))
+         rat_n2oco2_1(lay)=chi_mls(4,jp(lay)+1)/chi_mls(2,jp(lay)+1)
+
+!  Calculate needed column amounts.
+         colh2o(lay) = 1.e-20_rb * wkl(1,lay)
+         colco2(lay) = 1.e-20_rb * wkl(2,lay)
+         colo3(lay) = 1.e-20_rb * wkl(3,lay)
+         coln2o(lay) = 1.e-20_rb * wkl(4,lay)
+         colco(lay) = 1.e-20_rb * wkl(5,lay)
+         colch4(lay) = 1.e-20_rb * wkl(6,lay)
+         colo2(lay) = 1.e-20_rb * wkl(7,lay)
+         if (colco2(lay) .eq. 0._rb) colco2(lay) = 1.e-32_rb * coldry(lay)
+         if (colo3(lay) .eq. 0._rb) colo3(lay) = 1.e-32_rb * coldry(lay)
+         if (coln2o(lay) .eq. 0._rb) coln2o(lay) = 1.e-32_rb * coldry(lay)
+         if (colco(lay) .eq. 0._rb) colco(lay) = 1.e-32_rb * coldry(lay)
+         if (colch4(lay) .eq. 0._rb) colch4(lay) = 1.e-32_rb * coldry(lay)
+         colbrd(lay) = 1.e-20_rb * wbroad(lay)
+         go to 5400
+
+!  Above laytrop.
+ 5300    continue
+
+         forfac(lay) = scalefac / (1.+water)
+         factor = (tavel(lay)-188.0_rb)/36.0_rb
+         indfor(lay) = 3
+         forfrac(lay) = factor - 1.0_rb
+
+!  Set up factors needed to separately include the water vapor
+!  self-continuum in the calculation of absorption coefficient.
+         selffac(lay) = water * forfac(lay)
+
+!  Set up factors needed to separately include the minor gases
+!  in the calculation of absorption coefficient
+         scaleminor(lay) = pavel(lay)/tavel(lay)         
+         scaleminorn2(lay) = (pavel(lay)/tavel(lay)) &
+             * (wbroad(lay)/(coldry(lay)+wkl(1,lay)))
+         factor = (tavel(lay)-180.8_rb)/7.2_rb
+         indminor(lay) = min(18, max(1, int(factor)))
+         minorfrac(lay) = factor - real(indminor(lay))
+
+!  Setup reference ratio to be used in calculation of binary
+!  species parameter in upper atmosphere.
+         rat_h2oco2(lay)=chi_mls(1,jp(lay))/chi_mls(2,jp(lay))
+         rat_h2oco2_1(lay)=chi_mls(1,jp(lay)+1)/chi_mls(2,jp(lay)+1)         
+
+         rat_o3co2(lay)=chi_mls(3,jp(lay))/chi_mls(2,jp(lay))
+         rat_o3co2_1(lay)=chi_mls(3,jp(lay)+1)/chi_mls(2,jp(lay)+1)         
+
+!  Calculate needed column amounts.
+         colh2o(lay) = 1.e-20_rb * wkl(1,lay)
+         colco2(lay) = 1.e-20_rb * wkl(2,lay)
+         colo3(lay) = 1.e-20_rb * wkl(3,lay)
+         coln2o(lay) = 1.e-20_rb * wkl(4,lay)
+         colco(lay) = 1.e-20_rb * wkl(5,lay)
+         colch4(lay) = 1.e-20_rb * wkl(6,lay)
+         colo2(lay) = 1.e-20_rb * wkl(7,lay)
+         if (colco2(lay) .eq. 0._rb) colco2(lay) = 1.e-32_rb * coldry(lay)
+         if (colo3(lay) .eq. 0._rb) colo3(lay) = 1.e-32_rb * coldry(lay)
+         if (coln2o(lay) .eq. 0._rb) coln2o(lay) = 1.e-32_rb * coldry(lay)
+         if (colco(lay)  .eq. 0._rb) colco(lay) = 1.e-32_rb * coldry(lay)
+         if (colch4(lay) .eq. 0._rb) colch4(lay) = 1.e-32_rb * coldry(lay)
+         colbrd(lay) = 1.e-20_rb * wbroad(lay)
+ 5400    continue
+
+!  We have now isolated the layer ln pressure and temperature,
+!  between two reference pressures and two reference temperatures 
+!  (for each reference pressure).  We multiply the pressure 
+!  fraction FP with the appropriate temperature fractions to get 
+!  the factors that will be needed for the interpolation that yields
+!  the optical depths (performed in routines TAUGBn for band n).`
+
+         compfp = 1. - fp
+         fac10(lay) = compfp * ft
+         fac00(lay) = compfp * (1._rb - ft)
+         fac11(lay) = fp * ft1
+         fac01(lay) = fp * (1._rb - ft1)
+
+!  Rescale selffac and forfac for use in taumol
+         selffac(lay) = colh2o(lay)*selffac(lay)
+         forfac(lay) = colh2o(lay)*forfac(lay)
+
+! End layer loop
+      enddo
+
+      end subroutine setcoef
+
+!***************************************************************************
+      subroutine lwatmref
+!***************************************************************************
+
+      save
+ 
+! These pressures are chosen such that the ln of the first pressure
+! has only a few non-zero digits (i.e. ln(PREF(1)) = 6.96000) and
+! each subsequent ln(pressure) differs from the previous one by 0.2.
+
+      pref(:) = (/ &
+          1.05363e+03_rb,8.62642e+02_rb,7.06272e+02_rb,5.78246e+02_rb,4.73428e+02_rb, &
+          3.87610e+02_rb,3.17348e+02_rb,2.59823e+02_rb,2.12725e+02_rb,1.74164e+02_rb, &
+          1.42594e+02_rb,1.16746e+02_rb,9.55835e+01_rb,7.82571e+01_rb,6.40715e+01_rb, &
+          5.24573e+01_rb,4.29484e+01_rb,3.51632e+01_rb,2.87892e+01_rb,2.35706e+01_rb, &
+          1.92980e+01_rb,1.57998e+01_rb,1.29358e+01_rb,1.05910e+01_rb,8.67114e+00_rb, &
+          7.09933e+00_rb,5.81244e+00_rb,4.75882e+00_rb,3.89619e+00_rb,3.18993e+00_rb, &
+          2.61170e+00_rb,2.13828e+00_rb,1.75067e+00_rb,1.43333e+00_rb,1.17351e+00_rb, &
+          9.60789e-01_rb,7.86628e-01_rb,6.44036e-01_rb,5.27292e-01_rb,4.31710e-01_rb, &
+          3.53455e-01_rb,2.89384e-01_rb,2.36928e-01_rb,1.93980e-01_rb,1.58817e-01_rb, &
+          1.30029e-01_rb,1.06458e-01_rb,8.71608e-02_rb,7.13612e-02_rb,5.84256e-02_rb, &
+          4.78349e-02_rb,3.91639e-02_rb,3.20647e-02_rb,2.62523e-02_rb,2.14936e-02_rb, &
+          1.75975e-02_rb,1.44076e-02_rb,1.17959e-02_rb,9.65769e-03_rb/)
+
+      preflog(:) = (/ &
+           6.9600e+00_rb, 6.7600e+00_rb, 6.5600e+00_rb, 6.3600e+00_rb, 6.1600e+00_rb, &
+           5.9600e+00_rb, 5.7600e+00_rb, 5.5600e+00_rb, 5.3600e+00_rb, 5.1600e+00_rb, &
+           4.9600e+00_rb, 4.7600e+00_rb, 4.5600e+00_rb, 4.3600e+00_rb, 4.1600e+00_rb, &
+           3.9600e+00_rb, 3.7600e+00_rb, 3.5600e+00_rb, 3.3600e+00_rb, 3.1600e+00_rb, &
+           2.9600e+00_rb, 2.7600e+00_rb, 2.5600e+00_rb, 2.3600e+00_rb, 2.1600e+00_rb, &
+           1.9600e+00_rb, 1.7600e+00_rb, 1.5600e+00_rb, 1.3600e+00_rb, 1.1600e+00_rb, &
+           9.6000e-01_rb, 7.6000e-01_rb, 5.6000e-01_rb, 3.6000e-01_rb, 1.6000e-01_rb, &
+          -4.0000e-02_rb,-2.4000e-01_rb,-4.4000e-01_rb,-6.4000e-01_rb,-8.4000e-01_rb, &
+          -1.0400e+00_rb,-1.2400e+00_rb,-1.4400e+00_rb,-1.6400e+00_rb,-1.8400e+00_rb, &
+          -2.0400e+00_rb,-2.2400e+00_rb,-2.4400e+00_rb,-2.6400e+00_rb,-2.8400e+00_rb, &
+          -3.0400e+00_rb,-3.2400e+00_rb,-3.4400e+00_rb,-3.6400e+00_rb,-3.8400e+00_rb, &
+          -4.0400e+00_rb,-4.2400e+00_rb,-4.4400e+00_rb,-4.6400e+00_rb/)
+
+! These are the temperatures associated with the respective 
+! pressures for the mls standard atmosphere. 
+
+      tref(:) = (/ &
+           2.9420e+02_rb, 2.8799e+02_rb, 2.7894e+02_rb, 2.6925e+02_rb, 2.5983e+02_rb, &
+           2.5017e+02_rb, 2.4077e+02_rb, 2.3179e+02_rb, 2.2306e+02_rb, 2.1578e+02_rb, &
+           2.1570e+02_rb, 2.1570e+02_rb, 2.1570e+02_rb, 2.1706e+02_rb, 2.1858e+02_rb, &
+           2.2018e+02_rb, 2.2174e+02_rb, 2.2328e+02_rb, 2.2479e+02_rb, 2.2655e+02_rb, &
+           2.2834e+02_rb, 2.3113e+02_rb, 2.3401e+02_rb, 2.3703e+02_rb, 2.4022e+02_rb, &
+           2.4371e+02_rb, 2.4726e+02_rb, 2.5085e+02_rb, 2.5457e+02_rb, 2.5832e+02_rb, &
+           2.6216e+02_rb, 2.6606e+02_rb, 2.6999e+02_rb, 2.7340e+02_rb, 2.7536e+02_rb, &
+           2.7568e+02_rb, 2.7372e+02_rb, 2.7163e+02_rb, 2.6955e+02_rb, 2.6593e+02_rb, &
+           2.6211e+02_rb, 2.5828e+02_rb, 2.5360e+02_rb, 2.4854e+02_rb, 2.4348e+02_rb, &
+           2.3809e+02_rb, 2.3206e+02_rb, 2.2603e+02_rb, 2.2000e+02_rb, 2.1435e+02_rb, &
+           2.0887e+02_rb, 2.0340e+02_rb, 1.9792e+02_rb, 1.9290e+02_rb, 1.8809e+02_rb, &
+           1.8329e+02_rb, 1.7849e+02_rb, 1.7394e+02_rb, 1.7212e+02_rb/)
+
+       chi_mls(1,1:12) = (/ &
+        1.8760e-02_rb, 1.2223e-02_rb, 5.8909e-03_rb, 2.7675e-03_rb, 1.4065e-03_rb, &
+        7.5970e-04_rb, 3.8876e-04_rb, 1.6542e-04_rb, 3.7190e-05_rb, 7.4765e-06_rb, &
+        4.3082e-06_rb, 3.3319e-06_rb/)
+       chi_mls(1,13:59) = (/ &
+        3.2039e-06_rb,  3.1619e-06_rb,  3.2524e-06_rb,  3.4226e-06_rb,  3.6288e-06_rb, &
+        3.9148e-06_rb,  4.1488e-06_rb,  4.3081e-06_rb,  4.4420e-06_rb,  4.5778e-06_rb, &
+        4.7087e-06_rb,  4.7943e-06_rb,  4.8697e-06_rb,  4.9260e-06_rb,  4.9669e-06_rb, &
+        4.9963e-06_rb,  5.0527e-06_rb,  5.1266e-06_rb,  5.2503e-06_rb,  5.3571e-06_rb, &
+        5.4509e-06_rb,  5.4830e-06_rb,  5.5000e-06_rb,  5.5000e-06_rb,  5.4536e-06_rb, &
+        5.4047e-06_rb,  5.3558e-06_rb,  5.2533e-06_rb,  5.1436e-06_rb,  5.0340e-06_rb, &
+        4.8766e-06_rb,  4.6979e-06_rb,  4.5191e-06_rb,  4.3360e-06_rb,  4.1442e-06_rb, &
+        3.9523e-06_rb,  3.7605e-06_rb,  3.5722e-06_rb,  3.3855e-06_rb,  3.1988e-06_rb, &
+        3.0121e-06_rb,  2.8262e-06_rb,  2.6407e-06_rb,  2.4552e-06_rb,  2.2696e-06_rb, &
+        4.3360e-06_rb,  4.1442e-06_rb/)
+       chi_mls(2,1:12) = (/ &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb/)
+       chi_mls(2,13:59) = (/ &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb,  3.5500e-04_rb, &
+        3.5500e-04_rb,  3.5471e-04_rb,  3.5427e-04_rb,  3.5384e-04_rb,  3.5340e-04_rb, &
+        3.5500e-04_rb,  3.5500e-04_rb/)
+       chi_mls(3,1:12) = (/ &
+        3.0170e-08_rb,  3.4725e-08_rb,  4.2477e-08_rb,  5.2759e-08_rb,  6.6944e-08_rb, &
+        8.7130e-08_rb,  1.1391e-07_rb,  1.5677e-07_rb,  2.1788e-07_rb,  3.2443e-07_rb, &
+        4.6594e-07_rb,  5.6806e-07_rb/)
+       chi_mls(3,13:59) = (/ &
+        6.9607e-07_rb,  1.1186e-06_rb,  1.7618e-06_rb,  2.3269e-06_rb,  2.9577e-06_rb, &
+        3.6593e-06_rb,  4.5950e-06_rb,  5.3189e-06_rb,  5.9618e-06_rb,  6.5113e-06_rb, &
+        7.0635e-06_rb,  7.6917e-06_rb,  8.2577e-06_rb,  8.7082e-06_rb,  8.8325e-06_rb, &
+        8.7149e-06_rb,  8.0943e-06_rb,  7.3307e-06_rb,  6.3101e-06_rb,  5.3672e-06_rb, &
+        4.4829e-06_rb,  3.8391e-06_rb,  3.2827e-06_rb,  2.8235e-06_rb,  2.4906e-06_rb, &
+        2.1645e-06_rb,  1.8385e-06_rb,  1.6618e-06_rb,  1.5052e-06_rb,  1.3485e-06_rb, &
+        1.1972e-06_rb,  1.0482e-06_rb,  8.9926e-07_rb,  7.6343e-07_rb,  6.5381e-07_rb, &
+        5.4419e-07_rb,  4.3456e-07_rb,  3.6421e-07_rb,  3.1194e-07_rb,  2.5967e-07_rb, &
+        2.0740e-07_rb,  1.9146e-07_rb,  1.9364e-07_rb,  1.9582e-07_rb,  1.9800e-07_rb, &
+        7.6343e-07_rb,  6.5381e-07_rb/)
+       chi_mls(4,1:12) = (/ &
+        3.2000e-07_rb,  3.2000e-07_rb,  3.2000e-07_rb,  3.2000e-07_rb,  3.2000e-07_rb, &
+        3.1965e-07_rb,  3.1532e-07_rb,  3.0383e-07_rb,  2.9422e-07_rb,  2.8495e-07_rb, &
+        2.7671e-07_rb,  2.6471e-07_rb/)
+       chi_mls(4,13:59) = (/ &
+        2.4285e-07_rb,  2.0955e-07_rb,  1.7195e-07_rb,  1.3749e-07_rb,  1.1332e-07_rb, &
+        1.0035e-07_rb,  9.1281e-08_rb,  8.5463e-08_rb,  8.0363e-08_rb,  7.3372e-08_rb, &
+        6.5975e-08_rb,  5.6039e-08_rb,  4.7090e-08_rb,  3.9977e-08_rb,  3.2979e-08_rb, &
+        2.6064e-08_rb,  2.1066e-08_rb,  1.6592e-08_rb,  1.3017e-08_rb,  1.0090e-08_rb, &
+        7.6249e-09_rb,  6.1159e-09_rb,  4.6672e-09_rb,  3.2857e-09_rb,  2.8484e-09_rb, &
+        2.4620e-09_rb,  2.0756e-09_rb,  1.8551e-09_rb,  1.6568e-09_rb,  1.4584e-09_rb, &
+        1.3195e-09_rb,  1.2072e-09_rb,  1.0948e-09_rb,  9.9780e-10_rb,  9.3126e-10_rb, &
+        8.6472e-10_rb,  7.9818e-10_rb,  7.5138e-10_rb,  7.1367e-10_rb,  6.7596e-10_rb, &
+        6.3825e-10_rb,  6.0981e-10_rb,  5.8600e-10_rb,  5.6218e-10_rb,  5.3837e-10_rb, &
+        9.9780e-10_rb,  9.3126e-10_rb/)
+       chi_mls(5,1:12) = (/ &
+        1.5000e-07_rb,  1.4306e-07_rb,  1.3474e-07_rb,  1.3061e-07_rb,  1.2793e-07_rb, &
+        1.2038e-07_rb,  1.0798e-07_rb,  9.4238e-08_rb,  7.9488e-08_rb,  6.1386e-08_rb, &
+        4.5563e-08_rb,  3.3475e-08_rb/)
+       chi_mls(5,13:59) = (/ &
+        2.5118e-08_rb,  1.8671e-08_rb,  1.4349e-08_rb,  1.2501e-08_rb,  1.2407e-08_rb, &
+        1.3472e-08_rb,  1.4900e-08_rb,  1.6079e-08_rb,  1.7156e-08_rb,  1.8616e-08_rb, &
+        2.0106e-08_rb,  2.1654e-08_rb,  2.3096e-08_rb,  2.4340e-08_rb,  2.5643e-08_rb, &
+        2.6990e-08_rb,  2.8456e-08_rb,  2.9854e-08_rb,  3.0943e-08_rb,  3.2023e-08_rb, &
+        3.3101e-08_rb,  3.4260e-08_rb,  3.5360e-08_rb,  3.6397e-08_rb,  3.7310e-08_rb, &
+        3.8217e-08_rb,  3.9123e-08_rb,  4.1303e-08_rb,  4.3652e-08_rb,  4.6002e-08_rb, &
+        5.0289e-08_rb,  5.5446e-08_rb,  6.0603e-08_rb,  6.8946e-08_rb,  8.3652e-08_rb, &
+        9.8357e-08_rb,  1.1306e-07_rb,  1.4766e-07_rb,  1.9142e-07_rb,  2.3518e-07_rb, &
+        2.7894e-07_rb,  3.5001e-07_rb,  4.3469e-07_rb,  5.1938e-07_rb,  6.0407e-07_rb, &
+        6.8946e-08_rb,  8.3652e-08_rb/)
+       chi_mls(6,1:12) = (/ &
+        1.7000e-06_rb,  1.7000e-06_rb,  1.6999e-06_rb,  1.6904e-06_rb,  1.6671e-06_rb, &
+        1.6351e-06_rb,  1.6098e-06_rb,  1.5590e-06_rb,  1.5120e-06_rb,  1.4741e-06_rb, &
+        1.4385e-06_rb,  1.4002e-06_rb/)
+       chi_mls(6,13:59) = (/ &
+        1.3573e-06_rb,  1.3130e-06_rb,  1.2512e-06_rb,  1.1668e-06_rb,  1.0553e-06_rb, &
+        9.3281e-07_rb,  8.1217e-07_rb,  7.5239e-07_rb,  7.0728e-07_rb,  6.6722e-07_rb, &
+        6.2733e-07_rb,  5.8604e-07_rb,  5.4769e-07_rb,  5.1480e-07_rb,  4.8206e-07_rb, &
+        4.4943e-07_rb,  4.1702e-07_rb,  3.8460e-07_rb,  3.5200e-07_rb,  3.1926e-07_rb, &
+        2.8646e-07_rb,  2.5498e-07_rb,  2.2474e-07_rb,  1.9588e-07_rb,  1.8295e-07_rb, &
+        1.7089e-07_rb,  1.5882e-07_rb,  1.5536e-07_rb,  1.5304e-07_rb,  1.5072e-07_rb, &
+        1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb, &
+        1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb, &
+        1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb,  1.5000e-07_rb, &
+        1.5000e-07_rb,  1.5000e-07_rb/)
+       chi_mls(7,1:12) = (/ &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb/)
+       chi_mls(7,13:59) = (/ &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb,  0.2090_rb, &
+        0.2090_rb,  0.2090_rb/)
+
+      end subroutine lwatmref
+
+!***************************************************************************
+      subroutine lwavplank
+!***************************************************************************
+
+      save
+ 
+      totplnk(1:50,  1) = (/ &
+      0.14783e-05_rb,0.15006e-05_rb,0.15230e-05_rb,0.15455e-05_rb,0.15681e-05_rb, &
+      0.15908e-05_rb,0.16136e-05_rb,0.16365e-05_rb,0.16595e-05_rb,0.16826e-05_rb, &
+      0.17059e-05_rb,0.17292e-05_rb,0.17526e-05_rb,0.17762e-05_rb,0.17998e-05_rb, &
+      0.18235e-05_rb,0.18473e-05_rb,0.18712e-05_rb,0.18953e-05_rb,0.19194e-05_rb, &
+      0.19435e-05_rb,0.19678e-05_rb,0.19922e-05_rb,0.20166e-05_rb,0.20412e-05_rb, &
+      0.20658e-05_rb,0.20905e-05_rb,0.21153e-05_rb,0.21402e-05_rb,0.21652e-05_rb, &
+      0.21902e-05_rb,0.22154e-05_rb,0.22406e-05_rb,0.22659e-05_rb,0.22912e-05_rb, &
+      0.23167e-05_rb,0.23422e-05_rb,0.23678e-05_rb,0.23934e-05_rb,0.24192e-05_rb, &
+      0.24450e-05_rb,0.24709e-05_rb,0.24968e-05_rb,0.25229e-05_rb,0.25490e-05_rb, &
+      0.25751e-05_rb,0.26014e-05_rb,0.26277e-05_rb,0.26540e-05_rb,0.26805e-05_rb/)
+      totplnk(51:100,  1) = (/ &
+      0.27070e-05_rb,0.27335e-05_rb,0.27602e-05_rb,0.27869e-05_rb,0.28136e-05_rb, &
+      0.28404e-05_rb,0.28673e-05_rb,0.28943e-05_rb,0.29213e-05_rb,0.29483e-05_rb, &
+      0.29754e-05_rb,0.30026e-05_rb,0.30298e-05_rb,0.30571e-05_rb,0.30845e-05_rb, &
+      0.31119e-05_rb,0.31393e-05_rb,0.31669e-05_rb,0.31944e-05_rb,0.32220e-05_rb, &
+      0.32497e-05_rb,0.32774e-05_rb,0.33052e-05_rb,0.33330e-05_rb,0.33609e-05_rb, &
+      0.33888e-05_rb,0.34168e-05_rb,0.34448e-05_rb,0.34729e-05_rb,0.35010e-05_rb, &
+      0.35292e-05_rb,0.35574e-05_rb,0.35857e-05_rb,0.36140e-05_rb,0.36424e-05_rb, &
+      0.36708e-05_rb,0.36992e-05_rb,0.37277e-05_rb,0.37563e-05_rb,0.37848e-05_rb, &
+      0.38135e-05_rb,0.38421e-05_rb,0.38708e-05_rb,0.38996e-05_rb,0.39284e-05_rb, &
+      0.39572e-05_rb,0.39861e-05_rb,0.40150e-05_rb,0.40440e-05_rb,0.40730e-05_rb/)
+      totplnk(101:150,  1) = (/ &
+      0.41020e-05_rb,0.41311e-05_rb,0.41602e-05_rb,0.41893e-05_rb,0.42185e-05_rb, &
+      0.42477e-05_rb,0.42770e-05_rb,0.43063e-05_rb,0.43356e-05_rb,0.43650e-05_rb, &
+      0.43944e-05_rb,0.44238e-05_rb,0.44533e-05_rb,0.44828e-05_rb,0.45124e-05_rb, &
+      0.45419e-05_rb,0.45715e-05_rb,0.46012e-05_rb,0.46309e-05_rb,0.46606e-05_rb, &
+      0.46903e-05_rb,0.47201e-05_rb,0.47499e-05_rb,0.47797e-05_rb,0.48096e-05_rb, &
+      0.48395e-05_rb,0.48695e-05_rb,0.48994e-05_rb,0.49294e-05_rb,0.49594e-05_rb, &
+      0.49895e-05_rb,0.50196e-05_rb,0.50497e-05_rb,0.50798e-05_rb,0.51100e-05_rb, &
+      0.51402e-05_rb,0.51704e-05_rb,0.52007e-05_rb,0.52309e-05_rb,0.52612e-05_rb, &
+      0.52916e-05_rb,0.53219e-05_rb,0.53523e-05_rb,0.53827e-05_rb,0.54132e-05_rb, &
+      0.54436e-05_rb,0.54741e-05_rb,0.55047e-05_rb,0.55352e-05_rb,0.55658e-05_rb/)
+      totplnk(151:181,  1) = (/ &
+      0.55964e-05_rb,0.56270e-05_rb,0.56576e-05_rb,0.56883e-05_rb,0.57190e-05_rb, &
+      0.57497e-05_rb,0.57804e-05_rb,0.58112e-05_rb,0.58420e-05_rb,0.58728e-05_rb, &
+      0.59036e-05_rb,0.59345e-05_rb,0.59653e-05_rb,0.59962e-05_rb,0.60272e-05_rb, &
+      0.60581e-05_rb,0.60891e-05_rb,0.61201e-05_rb,0.61511e-05_rb,0.61821e-05_rb, &
+      0.62131e-05_rb,0.62442e-05_rb,0.62753e-05_rb,0.63064e-05_rb,0.63376e-05_rb, &
+      0.63687e-05_rb,0.63998e-05_rb,0.64310e-05_rb,0.64622e-05_rb,0.64935e-05_rb, &
+      0.65247e-05_rb/)
+      totplnk(1:50,  2) = (/ &
+      0.20262e-05_rb,0.20757e-05_rb,0.21257e-05_rb,0.21763e-05_rb,0.22276e-05_rb, &
+      0.22794e-05_rb,0.23319e-05_rb,0.23849e-05_rb,0.24386e-05_rb,0.24928e-05_rb, &
+      0.25477e-05_rb,0.26031e-05_rb,0.26591e-05_rb,0.27157e-05_rb,0.27728e-05_rb, &
+      0.28306e-05_rb,0.28889e-05_rb,0.29478e-05_rb,0.30073e-05_rb,0.30673e-05_rb, &
+      0.31279e-05_rb,0.31890e-05_rb,0.32507e-05_rb,0.33129e-05_rb,0.33757e-05_rb, &
+      0.34391e-05_rb,0.35029e-05_rb,0.35674e-05_rb,0.36323e-05_rb,0.36978e-05_rb, &
+      0.37638e-05_rb,0.38304e-05_rb,0.38974e-05_rb,0.39650e-05_rb,0.40331e-05_rb, &
+      0.41017e-05_rb,0.41708e-05_rb,0.42405e-05_rb,0.43106e-05_rb,0.43812e-05_rb, &
+      0.44524e-05_rb,0.45240e-05_rb,0.45961e-05_rb,0.46687e-05_rb,0.47418e-05_rb, &
+      0.48153e-05_rb,0.48894e-05_rb,0.49639e-05_rb,0.50389e-05_rb,0.51143e-05_rb/)
+      totplnk(51:100,  2) = (/ &
+      0.51902e-05_rb,0.52666e-05_rb,0.53434e-05_rb,0.54207e-05_rb,0.54985e-05_rb, &
+      0.55767e-05_rb,0.56553e-05_rb,0.57343e-05_rb,0.58139e-05_rb,0.58938e-05_rb, &
+      0.59742e-05_rb,0.60550e-05_rb,0.61362e-05_rb,0.62179e-05_rb,0.63000e-05_rb, &
+      0.63825e-05_rb,0.64654e-05_rb,0.65487e-05_rb,0.66324e-05_rb,0.67166e-05_rb, &
+      0.68011e-05_rb,0.68860e-05_rb,0.69714e-05_rb,0.70571e-05_rb,0.71432e-05_rb, &
+      0.72297e-05_rb,0.73166e-05_rb,0.74039e-05_rb,0.74915e-05_rb,0.75796e-05_rb, &
+      0.76680e-05_rb,0.77567e-05_rb,0.78459e-05_rb,0.79354e-05_rb,0.80252e-05_rb, &
+      0.81155e-05_rb,0.82061e-05_rb,0.82970e-05_rb,0.83883e-05_rb,0.84799e-05_rb, &
+      0.85719e-05_rb,0.86643e-05_rb,0.87569e-05_rb,0.88499e-05_rb,0.89433e-05_rb, &
+      0.90370e-05_rb,0.91310e-05_rb,0.92254e-05_rb,0.93200e-05_rb,0.94150e-05_rb/)
+      totplnk(101:150,  2) = (/ &
+      0.95104e-05_rb,0.96060e-05_rb,0.97020e-05_rb,0.97982e-05_rb,0.98948e-05_rb, &
+      0.99917e-05_rb,0.10089e-04_rb,0.10186e-04_rb,0.10284e-04_rb,0.10382e-04_rb, &
+      0.10481e-04_rb,0.10580e-04_rb,0.10679e-04_rb,0.10778e-04_rb,0.10877e-04_rb, &
+      0.10977e-04_rb,0.11077e-04_rb,0.11178e-04_rb,0.11279e-04_rb,0.11380e-04_rb, &
+      0.11481e-04_rb,0.11583e-04_rb,0.11684e-04_rb,0.11786e-04_rb,0.11889e-04_rb, &
+      0.11992e-04_rb,0.12094e-04_rb,0.12198e-04_rb,0.12301e-04_rb,0.12405e-04_rb, &
+      0.12509e-04_rb,0.12613e-04_rb,0.12717e-04_rb,0.12822e-04_rb,0.12927e-04_rb, &
+      0.13032e-04_rb,0.13138e-04_rb,0.13244e-04_rb,0.13349e-04_rb,0.13456e-04_rb, &
+      0.13562e-04_rb,0.13669e-04_rb,0.13776e-04_rb,0.13883e-04_rb,0.13990e-04_rb, &
+      0.14098e-04_rb,0.14206e-04_rb,0.14314e-04_rb,0.14422e-04_rb,0.14531e-04_rb/)
+      totplnk(151:181,  2) = (/ &
+      0.14639e-04_rb,0.14748e-04_rb,0.14857e-04_rb,0.14967e-04_rb,0.15076e-04_rb, &
+      0.15186e-04_rb,0.15296e-04_rb,0.15407e-04_rb,0.15517e-04_rb,0.15628e-04_rb, &
+      0.15739e-04_rb,0.15850e-04_rb,0.15961e-04_rb,0.16072e-04_rb,0.16184e-04_rb, &
+      0.16296e-04_rb,0.16408e-04_rb,0.16521e-04_rb,0.16633e-04_rb,0.16746e-04_rb, &
+      0.16859e-04_rb,0.16972e-04_rb,0.17085e-04_rb,0.17198e-04_rb,0.17312e-04_rb, &
+      0.17426e-04_rb,0.17540e-04_rb,0.17654e-04_rb,0.17769e-04_rb,0.17883e-04_rb, &
+      0.17998e-04_rb/)
+      totplnk(1:50, 3) = (/ &
+      1.34822e-06_rb,1.39134e-06_rb,1.43530e-06_rb,1.48010e-06_rb,1.52574e-06_rb, &
+      1.57222e-06_rb,1.61956e-06_rb,1.66774e-06_rb,1.71678e-06_rb,1.76666e-06_rb, &
+      1.81741e-06_rb,1.86901e-06_rb,1.92147e-06_rb,1.97479e-06_rb,2.02898e-06_rb, &
+      2.08402e-06_rb,2.13993e-06_rb,2.19671e-06_rb,2.25435e-06_rb,2.31285e-06_rb, &
+      2.37222e-06_rb,2.43246e-06_rb,2.49356e-06_rb,2.55553e-06_rb,2.61837e-06_rb, &
+      2.68207e-06_rb,2.74664e-06_rb,2.81207e-06_rb,2.87837e-06_rb,2.94554e-06_rb, &
+      3.01356e-06_rb,3.08245e-06_rb,3.15221e-06_rb,3.22282e-06_rb,3.29429e-06_rb, &
+      3.36662e-06_rb,3.43982e-06_rb,3.51386e-06_rb,3.58876e-06_rb,3.66451e-06_rb, &
+      3.74112e-06_rb,3.81857e-06_rb,3.89688e-06_rb,3.97602e-06_rb,4.05601e-06_rb, &
+      4.13685e-06_rb,4.21852e-06_rb,4.30104e-06_rb,4.38438e-06_rb,4.46857e-06_rb/)
+      totplnk(51:100, 3) = (/ &
+      4.55358e-06_rb,4.63943e-06_rb,4.72610e-06_rb,4.81359e-06_rb,4.90191e-06_rb, &
+      4.99105e-06_rb,5.08100e-06_rb,5.17176e-06_rb,5.26335e-06_rb,5.35573e-06_rb, &
+      5.44892e-06_rb,5.54292e-06_rb,5.63772e-06_rb,5.73331e-06_rb,5.82970e-06_rb, &
+      5.92688e-06_rb,6.02485e-06_rb,6.12360e-06_rb,6.22314e-06_rb,6.32346e-06_rb, &
+      6.42455e-06_rb,6.52641e-06_rb,6.62906e-06_rb,6.73247e-06_rb,6.83664e-06_rb, &
+      6.94156e-06_rb,7.04725e-06_rb,7.15370e-06_rb,7.26089e-06_rb,7.36883e-06_rb, &
+      7.47752e-06_rb,7.58695e-06_rb,7.69712e-06_rb,7.80801e-06_rb,7.91965e-06_rb, &
+      8.03201e-06_rb,8.14510e-06_rb,8.25891e-06_rb,8.37343e-06_rb,8.48867e-06_rb, &
+      8.60463e-06_rb,8.72128e-06_rb,8.83865e-06_rb,8.95672e-06_rb,9.07548e-06_rb, &
+      9.19495e-06_rb,9.31510e-06_rb,9.43594e-06_rb,9.55745e-06_rb,9.67966e-06_rb/)
+      totplnk(101:150, 3) = (/ &
+      9.80254e-06_rb,9.92609e-06_rb,1.00503e-05_rb,1.01752e-05_rb,1.03008e-05_rb, &
+      1.04270e-05_rb,1.05539e-05_rb,1.06814e-05_rb,1.08096e-05_rb,1.09384e-05_rb, &
+      1.10679e-05_rb,1.11980e-05_rb,1.13288e-05_rb,1.14601e-05_rb,1.15922e-05_rb, &
+      1.17248e-05_rb,1.18581e-05_rb,1.19920e-05_rb,1.21265e-05_rb,1.22616e-05_rb, &
+      1.23973e-05_rb,1.25337e-05_rb,1.26706e-05_rb,1.28081e-05_rb,1.29463e-05_rb, &
+      1.30850e-05_rb,1.32243e-05_rb,1.33642e-05_rb,1.35047e-05_rb,1.36458e-05_rb, &
+      1.37875e-05_rb,1.39297e-05_rb,1.40725e-05_rb,1.42159e-05_rb,1.43598e-05_rb, &
+      1.45044e-05_rb,1.46494e-05_rb,1.47950e-05_rb,1.49412e-05_rb,1.50879e-05_rb, &
+      1.52352e-05_rb,1.53830e-05_rb,1.55314e-05_rb,1.56803e-05_rb,1.58297e-05_rb, &
+      1.59797e-05_rb,1.61302e-05_rb,1.62812e-05_rb,1.64327e-05_rb,1.65848e-05_rb/)
+      totplnk(151:181, 3) = (/ &
+      1.67374e-05_rb,1.68904e-05_rb,1.70441e-05_rb,1.71982e-05_rb,1.73528e-05_rb, &
+      1.75079e-05_rb,1.76635e-05_rb,1.78197e-05_rb,1.79763e-05_rb,1.81334e-05_rb, &
+      1.82910e-05_rb,1.84491e-05_rb,1.86076e-05_rb,1.87667e-05_rb,1.89262e-05_rb, &
+      1.90862e-05_rb,1.92467e-05_rb,1.94076e-05_rb,1.95690e-05_rb,1.97309e-05_rb, &
+      1.98932e-05_rb,2.00560e-05_rb,2.02193e-05_rb,2.03830e-05_rb,2.05472e-05_rb, &
+      2.07118e-05_rb,2.08768e-05_rb,2.10423e-05_rb,2.12083e-05_rb,2.13747e-05_rb, &
+      2.15414e-05_rb/)
+      totplnk(1:50, 4) = (/ &
+      8.90528e-07_rb,9.24222e-07_rb,9.58757e-07_rb,9.94141e-07_rb,1.03038e-06_rb, &
+      1.06748e-06_rb,1.10545e-06_rb,1.14430e-06_rb,1.18403e-06_rb,1.22465e-06_rb, &
+      1.26618e-06_rb,1.30860e-06_rb,1.35193e-06_rb,1.39619e-06_rb,1.44136e-06_rb, &
+      1.48746e-06_rb,1.53449e-06_rb,1.58246e-06_rb,1.63138e-06_rb,1.68124e-06_rb, &
+      1.73206e-06_rb,1.78383e-06_rb,1.83657e-06_rb,1.89028e-06_rb,1.94495e-06_rb, &
+      2.00060e-06_rb,2.05724e-06_rb,2.11485e-06_rb,2.17344e-06_rb,2.23303e-06_rb, &
+      2.29361e-06_rb,2.35519e-06_rb,2.41777e-06_rb,2.48134e-06_rb,2.54592e-06_rb, &
+      2.61151e-06_rb,2.67810e-06_rb,2.74571e-06_rb,2.81433e-06_rb,2.88396e-06_rb, &
+      2.95461e-06_rb,3.02628e-06_rb,3.09896e-06_rb,3.17267e-06_rb,3.24741e-06_rb, &
+      3.32316e-06_rb,3.39994e-06_rb,3.47774e-06_rb,3.55657e-06_rb,3.63642e-06_rb/)
+      totplnk(51:100, 4) = (/ &
+      3.71731e-06_rb,3.79922e-06_rb,3.88216e-06_rb,3.96612e-06_rb,4.05112e-06_rb, &
+      4.13714e-06_rb,4.22419e-06_rb,4.31227e-06_rb,4.40137e-06_rb,4.49151e-06_rb, &
+      4.58266e-06_rb,4.67485e-06_rb,4.76806e-06_rb,4.86229e-06_rb,4.95754e-06_rb, &
+      5.05383e-06_rb,5.15113e-06_rb,5.24946e-06_rb,5.34879e-06_rb,5.44916e-06_rb, &
+      5.55053e-06_rb,5.65292e-06_rb,5.75632e-06_rb,5.86073e-06_rb,5.96616e-06_rb, &
+      6.07260e-06_rb,6.18003e-06_rb,6.28848e-06_rb,6.39794e-06_rb,6.50838e-06_rb, &
+      6.61983e-06_rb,6.73229e-06_rb,6.84573e-06_rb,6.96016e-06_rb,7.07559e-06_rb, &
+      7.19200e-06_rb,7.30940e-06_rb,7.42779e-06_rb,7.54715e-06_rb,7.66749e-06_rb, &
+      7.78882e-06_rb,7.91110e-06_rb,8.03436e-06_rb,8.15859e-06_rb,8.28379e-06_rb, &
+      8.40994e-06_rb,8.53706e-06_rb,8.66515e-06_rb,8.79418e-06_rb,8.92416e-06_rb/)
+      totplnk(101:150, 4) = (/ &
+      9.05510e-06_rb,9.18697e-06_rb,9.31979e-06_rb,9.45356e-06_rb,9.58826e-06_rb, &
+      9.72389e-06_rb,9.86046e-06_rb,9.99793e-06_rb,1.01364e-05_rb,1.02757e-05_rb, &
+      1.04159e-05_rb,1.05571e-05_rb,1.06992e-05_rb,1.08422e-05_rb,1.09861e-05_rb, &
+      1.11309e-05_rb,1.12766e-05_rb,1.14232e-05_rb,1.15707e-05_rb,1.17190e-05_rb, &
+      1.18683e-05_rb,1.20184e-05_rb,1.21695e-05_rb,1.23214e-05_rb,1.24741e-05_rb, &
+      1.26277e-05_rb,1.27822e-05_rb,1.29376e-05_rb,1.30939e-05_rb,1.32509e-05_rb, &
+      1.34088e-05_rb,1.35676e-05_rb,1.37273e-05_rb,1.38877e-05_rb,1.40490e-05_rb, &
+      1.42112e-05_rb,1.43742e-05_rb,1.45380e-05_rb,1.47026e-05_rb,1.48680e-05_rb, &
+      1.50343e-05_rb,1.52014e-05_rb,1.53692e-05_rb,1.55379e-05_rb,1.57074e-05_rb, &
+      1.58778e-05_rb,1.60488e-05_rb,1.62207e-05_rb,1.63934e-05_rb,1.65669e-05_rb/)
+      totplnk(151:181, 4) = (/ &
+      1.67411e-05_rb,1.69162e-05_rb,1.70920e-05_rb,1.72685e-05_rb,1.74459e-05_rb, &
+      1.76240e-05_rb,1.78029e-05_rb,1.79825e-05_rb,1.81629e-05_rb,1.83440e-05_rb, &
+      1.85259e-05_rb,1.87086e-05_rb,1.88919e-05_rb,1.90760e-05_rb,1.92609e-05_rb, &
+      1.94465e-05_rb,1.96327e-05_rb,1.98199e-05_rb,2.00076e-05_rb,2.01961e-05_rb, &
+      2.03853e-05_rb,2.05752e-05_rb,2.07658e-05_rb,2.09571e-05_rb,2.11491e-05_rb, &
+      2.13418e-05_rb,2.15352e-05_rb,2.17294e-05_rb,2.19241e-05_rb,2.21196e-05_rb, &
+      2.23158e-05_rb/)
+      totplnk(1:50, 5) = (/ &
+      5.70230e-07_rb,5.94788e-07_rb,6.20085e-07_rb,6.46130e-07_rb,6.72936e-07_rb, &
+      7.00512e-07_rb,7.28869e-07_rb,7.58019e-07_rb,7.87971e-07_rb,8.18734e-07_rb, &
+      8.50320e-07_rb,8.82738e-07_rb,9.15999e-07_rb,9.50110e-07_rb,9.85084e-07_rb, &
+      1.02093e-06_rb,1.05765e-06_rb,1.09527e-06_rb,1.13378e-06_rb,1.17320e-06_rb, &
+      1.21353e-06_rb,1.25479e-06_rb,1.29698e-06_rb,1.34011e-06_rb,1.38419e-06_rb, &
+      1.42923e-06_rb,1.47523e-06_rb,1.52221e-06_rb,1.57016e-06_rb,1.61910e-06_rb, &
+      1.66904e-06_rb,1.71997e-06_rb,1.77192e-06_rb,1.82488e-06_rb,1.87886e-06_rb, &
+      1.93387e-06_rb,1.98991e-06_rb,2.04699e-06_rb,2.10512e-06_rb,2.16430e-06_rb, &
+      2.22454e-06_rb,2.28584e-06_rb,2.34821e-06_rb,2.41166e-06_rb,2.47618e-06_rb, &
+      2.54178e-06_rb,2.60847e-06_rb,2.67626e-06_rb,2.74514e-06_rb,2.81512e-06_rb/)
+      totplnk(51:100, 5) = (/ &
+      2.88621e-06_rb,2.95841e-06_rb,3.03172e-06_rb,3.10615e-06_rb,3.18170e-06_rb, &
+      3.25838e-06_rb,3.33618e-06_rb,3.41511e-06_rb,3.49518e-06_rb,3.57639e-06_rb, &
+      3.65873e-06_rb,3.74221e-06_rb,3.82684e-06_rb,3.91262e-06_rb,3.99955e-06_rb, &
+      4.08763e-06_rb,4.17686e-06_rb,4.26725e-06_rb,4.35880e-06_rb,4.45150e-06_rb, &
+      4.54537e-06_rb,4.64039e-06_rb,4.73659e-06_rb,4.83394e-06_rb,4.93246e-06_rb, &
+      5.03215e-06_rb,5.13301e-06_rb,5.23504e-06_rb,5.33823e-06_rb,5.44260e-06_rb, &
+      5.54814e-06_rb,5.65484e-06_rb,5.76272e-06_rb,5.87177e-06_rb,5.98199e-06_rb, &
+      6.09339e-06_rb,6.20596e-06_rb,6.31969e-06_rb,6.43460e-06_rb,6.55068e-06_rb, &
+      6.66793e-06_rb,6.78636e-06_rb,6.90595e-06_rb,7.02670e-06_rb,7.14863e-06_rb, &
+      7.27173e-06_rb,7.39599e-06_rb,7.52142e-06_rb,7.64802e-06_rb,7.77577e-06_rb/)
+      totplnk(101:150, 5) = (/ &
+      7.90469e-06_rb,8.03477e-06_rb,8.16601e-06_rb,8.29841e-06_rb,8.43198e-06_rb, &
+      8.56669e-06_rb,8.70256e-06_rb,8.83957e-06_rb,8.97775e-06_rb,9.11706e-06_rb, &
+      9.25753e-06_rb,9.39915e-06_rb,9.54190e-06_rb,9.68580e-06_rb,9.83085e-06_rb, &
+      9.97704e-06_rb,1.01243e-05_rb,1.02728e-05_rb,1.04224e-05_rb,1.05731e-05_rb, &
+      1.07249e-05_rb,1.08779e-05_rb,1.10320e-05_rb,1.11872e-05_rb,1.13435e-05_rb, &
+      1.15009e-05_rb,1.16595e-05_rb,1.18191e-05_rb,1.19799e-05_rb,1.21418e-05_rb, &
+      1.23048e-05_rb,1.24688e-05_rb,1.26340e-05_rb,1.28003e-05_rb,1.29676e-05_rb, &
+      1.31361e-05_rb,1.33056e-05_rb,1.34762e-05_rb,1.36479e-05_rb,1.38207e-05_rb, &
+      1.39945e-05_rb,1.41694e-05_rb,1.43454e-05_rb,1.45225e-05_rb,1.47006e-05_rb, &
+      1.48797e-05_rb,1.50600e-05_rb,1.52413e-05_rb,1.54236e-05_rb,1.56070e-05_rb/)
+      totplnk(151:181, 5) = (/ &
+      1.57914e-05_rb,1.59768e-05_rb,1.61633e-05_rb,1.63509e-05_rb,1.65394e-05_rb, &
+      1.67290e-05_rb,1.69197e-05_rb,1.71113e-05_rb,1.73040e-05_rb,1.74976e-05_rb, &
+      1.76923e-05_rb,1.78880e-05_rb,1.80847e-05_rb,1.82824e-05_rb,1.84811e-05_rb, &
+      1.86808e-05_rb,1.88814e-05_rb,1.90831e-05_rb,1.92857e-05_rb,1.94894e-05_rb, &
+      1.96940e-05_rb,1.98996e-05_rb,2.01061e-05_rb,2.03136e-05_rb,2.05221e-05_rb, &
+      2.07316e-05_rb,2.09420e-05_rb,2.11533e-05_rb,2.13657e-05_rb,2.15789e-05_rb, &
+      2.17931e-05_rb/)
+      totplnk(1:50, 6) = (/ &
+      2.73493e-07_rb,2.87408e-07_rb,3.01848e-07_rb,3.16825e-07_rb,3.32352e-07_rb, &
+      3.48439e-07_rb,3.65100e-07_rb,3.82346e-07_rb,4.00189e-07_rb,4.18641e-07_rb, &
+      4.37715e-07_rb,4.57422e-07_rb,4.77774e-07_rb,4.98784e-07_rb,5.20464e-07_rb, &
+      5.42824e-07_rb,5.65879e-07_rb,5.89638e-07_rb,6.14115e-07_rb,6.39320e-07_rb, &
+      6.65266e-07_rb,6.91965e-07_rb,7.19427e-07_rb,7.47666e-07_rb,7.76691e-07_rb, &
+      8.06516e-07_rb,8.37151e-07_rb,8.68607e-07_rb,9.00896e-07_rb,9.34029e-07_rb, &
+      9.68018e-07_rb,1.00287e-06_rb,1.03860e-06_rb,1.07522e-06_rb,1.11274e-06_rb, &
+      1.15117e-06_rb,1.19052e-06_rb,1.23079e-06_rb,1.27201e-06_rb,1.31418e-06_rb, &
+      1.35731e-06_rb,1.40141e-06_rb,1.44650e-06_rb,1.49257e-06_rb,1.53965e-06_rb, &
+      1.58773e-06_rb,1.63684e-06_rb,1.68697e-06_rb,1.73815e-06_rb,1.79037e-06_rb/)
+      totplnk(51:100, 6) = (/ &
+      1.84365e-06_rb,1.89799e-06_rb,1.95341e-06_rb,2.00991e-06_rb,2.06750e-06_rb, &
+      2.12619e-06_rb,2.18599e-06_rb,2.24691e-06_rb,2.30895e-06_rb,2.37212e-06_rb, &
+      2.43643e-06_rb,2.50189e-06_rb,2.56851e-06_rb,2.63628e-06_rb,2.70523e-06_rb, &
+      2.77536e-06_rb,2.84666e-06_rb,2.91916e-06_rb,2.99286e-06_rb,3.06776e-06_rb, &
+      3.14387e-06_rb,3.22120e-06_rb,3.29975e-06_rb,3.37953e-06_rb,3.46054e-06_rb, &
+      3.54280e-06_rb,3.62630e-06_rb,3.71105e-06_rb,3.79707e-06_rb,3.88434e-06_rb, &
+      3.97288e-06_rb,4.06270e-06_rb,4.15380e-06_rb,4.24617e-06_rb,4.33984e-06_rb, &
+      4.43479e-06_rb,4.53104e-06_rb,4.62860e-06_rb,4.72746e-06_rb,4.82763e-06_rb, &
+      4.92911e-06_rb,5.03191e-06_rb,5.13603e-06_rb,5.24147e-06_rb,5.34824e-06_rb, &
+      5.45634e-06_rb,5.56578e-06_rb,5.67656e-06_rb,5.78867e-06_rb,5.90213e-06_rb/)
+      totplnk(101:150, 6) = (/ &
+      6.01694e-06_rb,6.13309e-06_rb,6.25060e-06_rb,6.36947e-06_rb,6.48968e-06_rb, &
+      6.61126e-06_rb,6.73420e-06_rb,6.85850e-06_rb,6.98417e-06_rb,7.11120e-06_rb, &
+      7.23961e-06_rb,7.36938e-06_rb,7.50053e-06_rb,7.63305e-06_rb,7.76694e-06_rb, &
+      7.90221e-06_rb,8.03887e-06_rb,8.17690e-06_rb,8.31632e-06_rb,8.45710e-06_rb, &
+      8.59928e-06_rb,8.74282e-06_rb,8.88776e-06_rb,9.03409e-06_rb,9.18179e-06_rb, &
+      9.33088e-06_rb,9.48136e-06_rb,9.63323e-06_rb,9.78648e-06_rb,9.94111e-06_rb, &
+      1.00971e-05_rb,1.02545e-05_rb,1.04133e-05_rb,1.05735e-05_rb,1.07351e-05_rb, &
+      1.08980e-05_rb,1.10624e-05_rb,1.12281e-05_rb,1.13952e-05_rb,1.15637e-05_rb, &
+      1.17335e-05_rb,1.19048e-05_rb,1.20774e-05_rb,1.22514e-05_rb,1.24268e-05_rb, &
+      1.26036e-05_rb,1.27817e-05_rb,1.29612e-05_rb,1.31421e-05_rb,1.33244e-05_rb/)
+      totplnk(151:181, 6) = (/ &
+      1.35080e-05_rb,1.36930e-05_rb,1.38794e-05_rb,1.40672e-05_rb,1.42563e-05_rb, &
+      1.44468e-05_rb,1.46386e-05_rb,1.48318e-05_rb,1.50264e-05_rb,1.52223e-05_rb, &
+      1.54196e-05_rb,1.56182e-05_rb,1.58182e-05_rb,1.60196e-05_rb,1.62223e-05_rb, &
+      1.64263e-05_rb,1.66317e-05_rb,1.68384e-05_rb,1.70465e-05_rb,1.72559e-05_rb, &
+      1.74666e-05_rb,1.76787e-05_rb,1.78921e-05_rb,1.81069e-05_rb,1.83230e-05_rb, &
+      1.85404e-05_rb,1.87591e-05_rb,1.89791e-05_rb,1.92005e-05_rb,1.94232e-05_rb, &
+      1.96471e-05_rb/)
+      totplnk(1:50, 7) = (/ &
+      1.25349e-07_rb,1.32735e-07_rb,1.40458e-07_rb,1.48527e-07_rb,1.56954e-07_rb, &
+      1.65748e-07_rb,1.74920e-07_rb,1.84481e-07_rb,1.94443e-07_rb,2.04814e-07_rb, &
+      2.15608e-07_rb,2.26835e-07_rb,2.38507e-07_rb,2.50634e-07_rb,2.63229e-07_rb, &
+      2.76301e-07_rb,2.89864e-07_rb,3.03930e-07_rb,3.18508e-07_rb,3.33612e-07_rb, &
+      3.49253e-07_rb,3.65443e-07_rb,3.82195e-07_rb,3.99519e-07_rb,4.17428e-07_rb, &
+      4.35934e-07_rb,4.55050e-07_rb,4.74785e-07_rb,4.95155e-07_rb,5.16170e-07_rb, &
+      5.37844e-07_rb,5.60186e-07_rb,5.83211e-07_rb,6.06929e-07_rb,6.31355e-07_rb, &
+      6.56498e-07_rb,6.82373e-07_rb,7.08990e-07_rb,7.36362e-07_rb,7.64501e-07_rb, &
+      7.93420e-07_rb,8.23130e-07_rb,8.53643e-07_rb,8.84971e-07_rb,9.17128e-07_rb, &
+      9.50123e-07_rb,9.83969e-07_rb,1.01868e-06_rb,1.05426e-06_rb,1.09073e-06_rb/)
+      totplnk(51:100, 7) = (/ &
+      1.12810e-06_rb,1.16638e-06_rb,1.20558e-06_rb,1.24572e-06_rb,1.28680e-06_rb, &
+      1.32883e-06_rb,1.37183e-06_rb,1.41581e-06_rb,1.46078e-06_rb,1.50675e-06_rb, &
+      1.55374e-06_rb,1.60174e-06_rb,1.65078e-06_rb,1.70087e-06_rb,1.75200e-06_rb, &
+      1.80421e-06_rb,1.85749e-06_rb,1.91186e-06_rb,1.96732e-06_rb,2.02389e-06_rb, &
+      2.08159e-06_rb,2.14040e-06_rb,2.20035e-06_rb,2.26146e-06_rb,2.32372e-06_rb, &
+      2.38714e-06_rb,2.45174e-06_rb,2.51753e-06_rb,2.58451e-06_rb,2.65270e-06_rb, &
+      2.72210e-06_rb,2.79272e-06_rb,2.86457e-06_rb,2.93767e-06_rb,3.01201e-06_rb, &
+      3.08761e-06_rb,3.16448e-06_rb,3.24261e-06_rb,3.32204e-06_rb,3.40275e-06_rb, &
+      3.48476e-06_rb,3.56808e-06_rb,3.65271e-06_rb,3.73866e-06_rb,3.82595e-06_rb, &
+      3.91456e-06_rb,4.00453e-06_rb,4.09584e-06_rb,4.18851e-06_rb,4.28254e-06_rb/)
+      totplnk(101:150, 7) = (/ &
+      4.37796e-06_rb,4.47475e-06_rb,4.57293e-06_rb,4.67249e-06_rb,4.77346e-06_rb, &
+      4.87583e-06_rb,4.97961e-06_rb,5.08481e-06_rb,5.19143e-06_rb,5.29948e-06_rb, &
+      5.40896e-06_rb,5.51989e-06_rb,5.63226e-06_rb,5.74608e-06_rb,5.86136e-06_rb, &
+      5.97810e-06_rb,6.09631e-06_rb,6.21597e-06_rb,6.33713e-06_rb,6.45976e-06_rb, &
+      6.58388e-06_rb,6.70950e-06_rb,6.83661e-06_rb,6.96521e-06_rb,7.09531e-06_rb, &
+      7.22692e-06_rb,7.36005e-06_rb,7.49468e-06_rb,7.63084e-06_rb,7.76851e-06_rb, &
+      7.90773e-06_rb,8.04846e-06_rb,8.19072e-06_rb,8.33452e-06_rb,8.47985e-06_rb, &
+      8.62674e-06_rb,8.77517e-06_rb,8.92514e-06_rb,9.07666e-06_rb,9.22975e-06_rb, &
+      9.38437e-06_rb,9.54057e-06_rb,9.69832e-06_rb,9.85762e-06_rb,1.00185e-05_rb, &
+      1.01810e-05_rb,1.03450e-05_rb,1.05106e-05_rb,1.06777e-05_rb,1.08465e-05_rb/)
+      totplnk(151:181, 7) = (/ &
+      1.10168e-05_rb,1.11887e-05_rb,1.13621e-05_rb,1.15372e-05_rb,1.17138e-05_rb, &
+      1.18920e-05_rb,1.20718e-05_rb,1.22532e-05_rb,1.24362e-05_rb,1.26207e-05_rb, &
+      1.28069e-05_rb,1.29946e-05_rb,1.31839e-05_rb,1.33749e-05_rb,1.35674e-05_rb, &
+      1.37615e-05_rb,1.39572e-05_rb,1.41544e-05_rb,1.43533e-05_rb,1.45538e-05_rb, &
+      1.47558e-05_rb,1.49595e-05_rb,1.51647e-05_rb,1.53716e-05_rb,1.55800e-05_rb, &
+      1.57900e-05_rb,1.60017e-05_rb,1.62149e-05_rb,1.64296e-05_rb,1.66460e-05_rb, &
+      1.68640e-05_rb/)
+      totplnk(1:50, 8) = (/ &
+      6.74445e-08_rb,7.18176e-08_rb,7.64153e-08_rb,8.12456e-08_rb,8.63170e-08_rb, &
+      9.16378e-08_rb,9.72168e-08_rb,1.03063e-07_rb,1.09184e-07_rb,1.15591e-07_rb, &
+      1.22292e-07_rb,1.29296e-07_rb,1.36613e-07_rb,1.44253e-07_rb,1.52226e-07_rb, &
+      1.60540e-07_rb,1.69207e-07_rb,1.78236e-07_rb,1.87637e-07_rb,1.97421e-07_rb, &
+      2.07599e-07_rb,2.18181e-07_rb,2.29177e-07_rb,2.40598e-07_rb,2.52456e-07_rb, &
+      2.64761e-07_rb,2.77523e-07_rb,2.90755e-07_rb,3.04468e-07_rb,3.18673e-07_rb, &
+      3.33381e-07_rb,3.48603e-07_rb,3.64352e-07_rb,3.80638e-07_rb,3.97474e-07_rb, &
+      4.14871e-07_rb,4.32841e-07_rb,4.51395e-07_rb,4.70547e-07_rb,4.90306e-07_rb, &
+      5.10687e-07_rb,5.31699e-07_rb,5.53357e-07_rb,5.75670e-07_rb,5.98652e-07_rb, &
+      6.22315e-07_rb,6.46672e-07_rb,6.71731e-07_rb,6.97511e-07_rb,7.24018e-07_rb/)
+      totplnk(51:100, 8) = (/ &
+      7.51266e-07_rb,7.79269e-07_rb,8.08038e-07_rb,8.37584e-07_rb,8.67922e-07_rb, &
+      8.99061e-07_rb,9.31016e-07_rb,9.63797e-07_rb,9.97417e-07_rb,1.03189e-06_rb, &
+      1.06722e-06_rb,1.10343e-06_rb,1.14053e-06_rb,1.17853e-06_rb,1.21743e-06_rb, &
+      1.25726e-06_rb,1.29803e-06_rb,1.33974e-06_rb,1.38241e-06_rb,1.42606e-06_rb, &
+      1.47068e-06_rb,1.51630e-06_rb,1.56293e-06_rb,1.61056e-06_rb,1.65924e-06_rb, &
+      1.70894e-06_rb,1.75971e-06_rb,1.81153e-06_rb,1.86443e-06_rb,1.91841e-06_rb, &
+      1.97350e-06_rb,2.02968e-06_rb,2.08699e-06_rb,2.14543e-06_rb,2.20500e-06_rb, &
+      2.26573e-06_rb,2.32762e-06_rb,2.39068e-06_rb,2.45492e-06_rb,2.52036e-06_rb, &
+      2.58700e-06_rb,2.65485e-06_rb,2.72393e-06_rb,2.79424e-06_rb,2.86580e-06_rb, &
+      2.93861e-06_rb,3.01269e-06_rb,3.08803e-06_rb,3.16467e-06_rb,3.24259e-06_rb/)
+      totplnk(101:150, 8) = (/ &
+      3.32181e-06_rb,3.40235e-06_rb,3.48420e-06_rb,3.56739e-06_rb,3.65192e-06_rb, &
+      3.73779e-06_rb,3.82502e-06_rb,3.91362e-06_rb,4.00359e-06_rb,4.09494e-06_rb, &
+      4.18768e-06_rb,4.28182e-06_rb,4.37737e-06_rb,4.47434e-06_rb,4.57273e-06_rb, &
+      4.67254e-06_rb,4.77380e-06_rb,4.87651e-06_rb,4.98067e-06_rb,5.08630e-06_rb, &
+      5.19339e-06_rb,5.30196e-06_rb,5.41201e-06_rb,5.52356e-06_rb,5.63660e-06_rb, &
+      5.75116e-06_rb,5.86722e-06_rb,5.98479e-06_rb,6.10390e-06_rb,6.22453e-06_rb, &
+      6.34669e-06_rb,6.47042e-06_rb,6.59569e-06_rb,6.72252e-06_rb,6.85090e-06_rb, &
+      6.98085e-06_rb,7.11238e-06_rb,7.24549e-06_rb,7.38019e-06_rb,7.51646e-06_rb, &
+      7.65434e-06_rb,7.79382e-06_rb,7.93490e-06_rb,8.07760e-06_rb,8.22192e-06_rb, &
+      8.36784e-06_rb,8.51540e-06_rb,8.66459e-06_rb,8.81542e-06_rb,8.96786e-06_rb/)
+      totplnk(151:181, 8) = (/ &
+      9.12197e-06_rb,9.27772e-06_rb,9.43513e-06_rb,9.59419e-06_rb,9.75490e-06_rb, &
+      9.91728e-06_rb,1.00813e-05_rb,1.02471e-05_rb,1.04144e-05_rb,1.05835e-05_rb, &
+      1.07543e-05_rb,1.09267e-05_rb,1.11008e-05_rb,1.12766e-05_rb,1.14541e-05_rb, &
+      1.16333e-05_rb,1.18142e-05_rb,1.19969e-05_rb,1.21812e-05_rb,1.23672e-05_rb, &
+      1.25549e-05_rb,1.27443e-05_rb,1.29355e-05_rb,1.31284e-05_rb,1.33229e-05_rb, &
+      1.35193e-05_rb,1.37173e-05_rb,1.39170e-05_rb,1.41185e-05_rb,1.43217e-05_rb, &
+      1.45267e-05_rb/)
+      totplnk(1:50, 9) = (/ &
+      2.61522e-08_rb,2.80613e-08_rb,3.00838e-08_rb,3.22250e-08_rb,3.44899e-08_rb, &
+      3.68841e-08_rb,3.94129e-08_rb,4.20820e-08_rb,4.48973e-08_rb,4.78646e-08_rb, &
+      5.09901e-08_rb,5.42799e-08_rb,5.77405e-08_rb,6.13784e-08_rb,6.52001e-08_rb, &
+      6.92126e-08_rb,7.34227e-08_rb,7.78375e-08_rb,8.24643e-08_rb,8.73103e-08_rb, &
+      9.23832e-08_rb,9.76905e-08_rb,1.03240e-07_rb,1.09039e-07_rb,1.15097e-07_rb, &
+      1.21421e-07_rb,1.28020e-07_rb,1.34902e-07_rb,1.42075e-07_rb,1.49548e-07_rb, &
+      1.57331e-07_rb,1.65432e-07_rb,1.73860e-07_rb,1.82624e-07_rb,1.91734e-07_rb, &
+      2.01198e-07_rb,2.11028e-07_rb,2.21231e-07_rb,2.31818e-07_rb,2.42799e-07_rb, &
+      2.54184e-07_rb,2.65983e-07_rb,2.78205e-07_rb,2.90862e-07_rb,3.03963e-07_rb, &
+      3.17519e-07_rb,3.31541e-07_rb,3.46039e-07_rb,3.61024e-07_rb,3.76507e-07_rb/)
+      totplnk(51:100, 9) = (/ &
+      3.92498e-07_rb,4.09008e-07_rb,4.26050e-07_rb,4.43633e-07_rb,4.61769e-07_rb, &
+      4.80469e-07_rb,4.99744e-07_rb,5.19606e-07_rb,5.40067e-07_rb,5.61136e-07_rb, &
+      5.82828e-07_rb,6.05152e-07_rb,6.28120e-07_rb,6.51745e-07_rb,6.76038e-07_rb, &
+      7.01010e-07_rb,7.26674e-07_rb,7.53041e-07_rb,7.80124e-07_rb,8.07933e-07_rb, &
+      8.36482e-07_rb,8.65781e-07_rb,8.95845e-07_rb,9.26683e-07_rb,9.58308e-07_rb, &
+      9.90732e-07_rb,1.02397e-06_rb,1.05803e-06_rb,1.09292e-06_rb,1.12866e-06_rb, &
+      1.16526e-06_rb,1.20274e-06_rb,1.24109e-06_rb,1.28034e-06_rb,1.32050e-06_rb, &
+      1.36158e-06_rb,1.40359e-06_rb,1.44655e-06_rb,1.49046e-06_rb,1.53534e-06_rb, &
+      1.58120e-06_rb,1.62805e-06_rb,1.67591e-06_rb,1.72478e-06_rb,1.77468e-06_rb, &
+      1.82561e-06_rb,1.87760e-06_rb,1.93066e-06_rb,1.98479e-06_rb,2.04000e-06_rb/)
+      totplnk(101:150, 9) = (/ &
+      2.09631e-06_rb,2.15373e-06_rb,2.21228e-06_rb,2.27196e-06_rb,2.33278e-06_rb, &
+      2.39475e-06_rb,2.45790e-06_rb,2.52222e-06_rb,2.58773e-06_rb,2.65445e-06_rb, &
+      2.72238e-06_rb,2.79152e-06_rb,2.86191e-06_rb,2.93354e-06_rb,3.00643e-06_rb, &
+      3.08058e-06_rb,3.15601e-06_rb,3.23273e-06_rb,3.31075e-06_rb,3.39009e-06_rb, &
+      3.47074e-06_rb,3.55272e-06_rb,3.63605e-06_rb,3.72072e-06_rb,3.80676e-06_rb, &
+      3.89417e-06_rb,3.98297e-06_rb,4.07315e-06_rb,4.16474e-06_rb,4.25774e-06_rb, &
+      4.35217e-06_rb,4.44802e-06_rb,4.54532e-06_rb,4.64406e-06_rb,4.74428e-06_rb, &
+      4.84595e-06_rb,4.94911e-06_rb,5.05376e-06_rb,5.15990e-06_rb,5.26755e-06_rb, &
+      5.37671e-06_rb,5.48741e-06_rb,5.59963e-06_rb,5.71340e-06_rb,5.82871e-06_rb, &
+      5.94559e-06_rb,6.06403e-06_rb,6.18404e-06_rb,6.30565e-06_rb,6.42885e-06_rb/)
+      totplnk(151:181, 9) = (/ &
+      6.55364e-06_rb,6.68004e-06_rb,6.80806e-06_rb,6.93771e-06_rb,7.06898e-06_rb, &
+      7.20190e-06_rb,7.33646e-06_rb,7.47267e-06_rb,7.61056e-06_rb,7.75010e-06_rb, &
+      7.89133e-06_rb,8.03423e-06_rb,8.17884e-06_rb,8.32514e-06_rb,8.47314e-06_rb, &
+      8.62284e-06_rb,8.77427e-06_rb,8.92743e-06_rb,9.08231e-06_rb,9.23893e-06_rb, &
+      9.39729e-06_rb,9.55741e-06_rb,9.71927e-06_rb,9.88291e-06_rb,1.00483e-05_rb, &
+      1.02155e-05_rb,1.03844e-05_rb,1.05552e-05_rb,1.07277e-05_rb,1.09020e-05_rb, &
+      1.10781e-05_rb/)
+      totplnk(1:50,10) = (/ &
+      8.89300e-09_rb,9.63263e-09_rb,1.04235e-08_rb,1.12685e-08_rb,1.21703e-08_rb, &
+      1.31321e-08_rb,1.41570e-08_rb,1.52482e-08_rb,1.64090e-08_rb,1.76428e-08_rb, &
+      1.89533e-08_rb,2.03441e-08_rb,2.18190e-08_rb,2.33820e-08_rb,2.50370e-08_rb, &
+      2.67884e-08_rb,2.86402e-08_rb,3.05969e-08_rb,3.26632e-08_rb,3.48436e-08_rb, &
+      3.71429e-08_rb,3.95660e-08_rb,4.21179e-08_rb,4.48040e-08_rb,4.76294e-08_rb, &
+      5.05996e-08_rb,5.37201e-08_rb,5.69966e-08_rb,6.04349e-08_rb,6.40411e-08_rb, &
+      6.78211e-08_rb,7.17812e-08_rb,7.59276e-08_rb,8.02670e-08_rb,8.48059e-08_rb, &
+      8.95508e-08_rb,9.45090e-08_rb,9.96873e-08_rb,1.05093e-07_rb,1.10733e-07_rb, &
+      1.16614e-07_rb,1.22745e-07_rb,1.29133e-07_rb,1.35786e-07_rb,1.42711e-07_rb, &
+      1.49916e-07_rb,1.57410e-07_rb,1.65202e-07_rb,1.73298e-07_rb,1.81709e-07_rb/)
+      totplnk(51:100,10) = (/ &
+      1.90441e-07_rb,1.99505e-07_rb,2.08908e-07_rb,2.18660e-07_rb,2.28770e-07_rb, &
+      2.39247e-07_rb,2.50101e-07_rb,2.61340e-07_rb,2.72974e-07_rb,2.85013e-07_rb, &
+      2.97467e-07_rb,3.10345e-07_rb,3.23657e-07_rb,3.37413e-07_rb,3.51623e-07_rb, &
+      3.66298e-07_rb,3.81448e-07_rb,3.97082e-07_rb,4.13212e-07_rb,4.29848e-07_rb, &
+      4.47000e-07_rb,4.64680e-07_rb,4.82898e-07_rb,5.01664e-07_rb,5.20991e-07_rb, &
+      5.40888e-07_rb,5.61369e-07_rb,5.82440e-07_rb,6.04118e-07_rb,6.26410e-07_rb, &
+      6.49329e-07_rb,6.72887e-07_rb,6.97095e-07_rb,7.21964e-07_rb,7.47506e-07_rb, &
+      7.73732e-07_rb,8.00655e-07_rb,8.28287e-07_rb,8.56635e-07_rb,8.85717e-07_rb, &
+      9.15542e-07_rb,9.46122e-07_rb,9.77469e-07_rb,1.00960e-06_rb,1.04251e-06_rb, &
+      1.07623e-06_rb,1.11077e-06_rb,1.14613e-06_rb,1.18233e-06_rb,1.21939e-06_rb/)
+      totplnk(101:150,10) = (/ &
+      1.25730e-06_rb,1.29610e-06_rb,1.33578e-06_rb,1.37636e-06_rb,1.41785e-06_rb, &
+      1.46027e-06_rb,1.50362e-06_rb,1.54792e-06_rb,1.59319e-06_rb,1.63942e-06_rb, &
+      1.68665e-06_rb,1.73487e-06_rb,1.78410e-06_rb,1.83435e-06_rb,1.88564e-06_rb, &
+      1.93797e-06_rb,1.99136e-06_rb,2.04582e-06_rb,2.10137e-06_rb,2.15801e-06_rb, &
+      2.21576e-06_rb,2.27463e-06_rb,2.33462e-06_rb,2.39577e-06_rb,2.45806e-06_rb, &
+      2.52153e-06_rb,2.58617e-06_rb,2.65201e-06_rb,2.71905e-06_rb,2.78730e-06_rb, &
+      2.85678e-06_rb,2.92749e-06_rb,2.99946e-06_rb,3.07269e-06_rb,3.14720e-06_rb, &
+      3.22299e-06_rb,3.30007e-06_rb,3.37847e-06_rb,3.45818e-06_rb,3.53923e-06_rb, &
+      3.62161e-06_rb,3.70535e-06_rb,3.79046e-06_rb,3.87695e-06_rb,3.96481e-06_rb, &
+      4.05409e-06_rb,4.14477e-06_rb,4.23687e-06_rb,4.33040e-06_rb,4.42538e-06_rb/)
+      totplnk(151:181,10) = (/ &
+      4.52180e-06_rb,4.61969e-06_rb,4.71905e-06_rb,4.81991e-06_rb,4.92226e-06_rb, &
+      5.02611e-06_rb,5.13148e-06_rb,5.23839e-06_rb,5.34681e-06_rb,5.45681e-06_rb, &
+      5.56835e-06_rb,5.68146e-06_rb,5.79614e-06_rb,5.91242e-06_rb,6.03030e-06_rb, &
+      6.14978e-06_rb,6.27088e-06_rb,6.39360e-06_rb,6.51798e-06_rb,6.64398e-06_rb, &
+      6.77165e-06_rb,6.90099e-06_rb,7.03198e-06_rb,7.16468e-06_rb,7.29906e-06_rb, &
+      7.43514e-06_rb,7.57294e-06_rb,7.71244e-06_rb,7.85369e-06_rb,7.99666e-06_rb, &
+      8.14138e-06_rb/)
+      totplnk(1:50,11) = (/ &
+      2.53767e-09_rb,2.77242e-09_rb,3.02564e-09_rb,3.29851e-09_rb,3.59228e-09_rb, &
+      3.90825e-09_rb,4.24777e-09_rb,4.61227e-09_rb,5.00322e-09_rb,5.42219e-09_rb, &
+      5.87080e-09_rb,6.35072e-09_rb,6.86370e-09_rb,7.41159e-09_rb,7.99628e-09_rb, &
+      8.61974e-09_rb,9.28404e-09_rb,9.99130e-09_rb,1.07437e-08_rb,1.15436e-08_rb, &
+      1.23933e-08_rb,1.32953e-08_rb,1.42522e-08_rb,1.52665e-08_rb,1.63410e-08_rb, &
+      1.74786e-08_rb,1.86820e-08_rb,1.99542e-08_rb,2.12985e-08_rb,2.27179e-08_rb, &
+      2.42158e-08_rb,2.57954e-08_rb,2.74604e-08_rb,2.92141e-08_rb,3.10604e-08_rb, &
+      3.30029e-08_rb,3.50457e-08_rb,3.71925e-08_rb,3.94476e-08_rb,4.18149e-08_rb, &
+      4.42991e-08_rb,4.69043e-08_rb,4.96352e-08_rb,5.24961e-08_rb,5.54921e-08_rb, &
+      5.86277e-08_rb,6.19081e-08_rb,6.53381e-08_rb,6.89231e-08_rb,7.26681e-08_rb/)
+      totplnk(51:100,11) = (/ &
+      7.65788e-08_rb,8.06604e-08_rb,8.49187e-08_rb,8.93591e-08_rb,9.39879e-08_rb, &
+      9.88106e-08_rb,1.03834e-07_rb,1.09063e-07_rb,1.14504e-07_rb,1.20165e-07_rb, &
+      1.26051e-07_rb,1.32169e-07_rb,1.38525e-07_rb,1.45128e-07_rb,1.51982e-07_rb, &
+      1.59096e-07_rb,1.66477e-07_rb,1.74132e-07_rb,1.82068e-07_rb,1.90292e-07_rb, &
+      1.98813e-07_rb,2.07638e-07_rb,2.16775e-07_rb,2.26231e-07_rb,2.36015e-07_rb, &
+      2.46135e-07_rb,2.56599e-07_rb,2.67415e-07_rb,2.78592e-07_rb,2.90137e-07_rb, &
+      3.02061e-07_rb,3.14371e-07_rb,3.27077e-07_rb,3.40186e-07_rb,3.53710e-07_rb, &
+      3.67655e-07_rb,3.82031e-07_rb,3.96848e-07_rb,4.12116e-07_rb,4.27842e-07_rb, &
+      4.44039e-07_rb,4.60713e-07_rb,4.77876e-07_rb,4.95537e-07_rb,5.13706e-07_rb, &
+      5.32392e-07_rb,5.51608e-07_rb,5.71360e-07_rb,5.91662e-07_rb,6.12521e-07_rb/)
+      totplnk(101:150,11) = (/ &
+      6.33950e-07_rb,6.55958e-07_rb,6.78556e-07_rb,7.01753e-07_rb,7.25562e-07_rb, &
+      7.49992e-07_rb,7.75055e-07_rb,8.00760e-07_rb,8.27120e-07_rb,8.54145e-07_rb, &
+      8.81845e-07_rb,9.10233e-07_rb,9.39318e-07_rb,9.69113e-07_rb,9.99627e-07_rb, &
+      1.03087e-06_rb,1.06286e-06_rb,1.09561e-06_rb,1.12912e-06_rb,1.16340e-06_rb, &
+      1.19848e-06_rb,1.23435e-06_rb,1.27104e-06_rb,1.30855e-06_rb,1.34690e-06_rb, &
+      1.38609e-06_rb,1.42614e-06_rb,1.46706e-06_rb,1.50886e-06_rb,1.55155e-06_rb, &
+      1.59515e-06_rb,1.63967e-06_rb,1.68512e-06_rb,1.73150e-06_rb,1.77884e-06_rb, &
+      1.82715e-06_rb,1.87643e-06_rb,1.92670e-06_rb,1.97797e-06_rb,2.03026e-06_rb, &
+      2.08356e-06_rb,2.13791e-06_rb,2.19330e-06_rb,2.24975e-06_rb,2.30728e-06_rb, &
+      2.36589e-06_rb,2.42560e-06_rb,2.48641e-06_rb,2.54835e-06_rb,2.61142e-06_rb/)
+      totplnk(151:181,11) = (/ &
+      2.67563e-06_rb,2.74100e-06_rb,2.80754e-06_rb,2.87526e-06_rb,2.94417e-06_rb, &
+      3.01429e-06_rb,3.08562e-06_rb,3.15819e-06_rb,3.23199e-06_rb,3.30704e-06_rb, &
+      3.38336e-06_rb,3.46096e-06_rb,3.53984e-06_rb,3.62002e-06_rb,3.70151e-06_rb, &
+      3.78433e-06_rb,3.86848e-06_rb,3.95399e-06_rb,4.04084e-06_rb,4.12907e-06_rb, &
+      4.21868e-06_rb,4.30968e-06_rb,4.40209e-06_rb,4.49592e-06_rb,4.59117e-06_rb, &
+      4.68786e-06_rb,4.78600e-06_rb,4.88561e-06_rb,4.98669e-06_rb,5.08926e-06_rb, &
+      5.19332e-06_rb/)
+      totplnk(1:50,12) = (/ &
+      2.73921e-10_rb,3.04500e-10_rb,3.38056e-10_rb,3.74835e-10_rb,4.15099e-10_rb, &
+      4.59126e-10_rb,5.07214e-10_rb,5.59679e-10_rb,6.16857e-10_rb,6.79103e-10_rb, &
+      7.46796e-10_rb,8.20335e-10_rb,9.00144e-10_rb,9.86671e-10_rb,1.08039e-09_rb, &
+      1.18180e-09_rb,1.29142e-09_rb,1.40982e-09_rb,1.53757e-09_rb,1.67529e-09_rb, &
+      1.82363e-09_rb,1.98327e-09_rb,2.15492e-09_rb,2.33932e-09_rb,2.53726e-09_rb, &
+      2.74957e-09_rb,2.97710e-09_rb,3.22075e-09_rb,3.48145e-09_rb,3.76020e-09_rb, &
+      4.05801e-09_rb,4.37595e-09_rb,4.71513e-09_rb,5.07672e-09_rb,5.46193e-09_rb, &
+      5.87201e-09_rb,6.30827e-09_rb,6.77205e-09_rb,7.26480e-09_rb,7.78794e-09_rb, &
+      8.34304e-09_rb,8.93163e-09_rb,9.55537e-09_rb,1.02159e-08_rb,1.09151e-08_rb, &
+      1.16547e-08_rb,1.24365e-08_rb,1.32625e-08_rb,1.41348e-08_rb,1.50554e-08_rb/)
+      totplnk(51:100,12) = (/ &
+      1.60264e-08_rb,1.70500e-08_rb,1.81285e-08_rb,1.92642e-08_rb,2.04596e-08_rb, &
+      2.17171e-08_rb,2.30394e-08_rb,2.44289e-08_rb,2.58885e-08_rb,2.74209e-08_rb, &
+      2.90290e-08_rb,3.07157e-08_rb,3.24841e-08_rb,3.43371e-08_rb,3.62782e-08_rb, &
+      3.83103e-08_rb,4.04371e-08_rb,4.26617e-08_rb,4.49878e-08_rb,4.74190e-08_rb, &
+      4.99589e-08_rb,5.26113e-08_rb,5.53801e-08_rb,5.82692e-08_rb,6.12826e-08_rb, &
+      6.44245e-08_rb,6.76991e-08_rb,7.11105e-08_rb,7.46634e-08_rb,7.83621e-08_rb, &
+      8.22112e-08_rb,8.62154e-08_rb,9.03795e-08_rb,9.47081e-08_rb,9.92066e-08_rb, &
+      1.03879e-07_rb,1.08732e-07_rb,1.13770e-07_rb,1.18998e-07_rb,1.24422e-07_rb, &
+      1.30048e-07_rb,1.35880e-07_rb,1.41924e-07_rb,1.48187e-07_rb,1.54675e-07_rb, &
+      1.61392e-07_rb,1.68346e-07_rb,1.75543e-07_rb,1.82988e-07_rb,1.90688e-07_rb/)
+      totplnk(101:150,12) = (/ &
+      1.98650e-07_rb,2.06880e-07_rb,2.15385e-07_rb,2.24172e-07_rb,2.33247e-07_rb, &
+      2.42617e-07_rb,2.52289e-07_rb,2.62272e-07_rb,2.72571e-07_rb,2.83193e-07_rb, &
+      2.94147e-07_rb,3.05440e-07_rb,3.17080e-07_rb,3.29074e-07_rb,3.41430e-07_rb, &
+      3.54155e-07_rb,3.67259e-07_rb,3.80747e-07_rb,3.94631e-07_rb,4.08916e-07_rb, &
+      4.23611e-07_rb,4.38725e-07_rb,4.54267e-07_rb,4.70245e-07_rb,4.86666e-07_rb, &
+      5.03541e-07_rb,5.20879e-07_rb,5.38687e-07_rb,5.56975e-07_rb,5.75751e-07_rb, &
+      5.95026e-07_rb,6.14808e-07_rb,6.35107e-07_rb,6.55932e-07_rb,6.77293e-07_rb, &
+      6.99197e-07_rb,7.21656e-07_rb,7.44681e-07_rb,7.68278e-07_rb,7.92460e-07_rb, &
+      8.17235e-07_rb,8.42614e-07_rb,8.68606e-07_rb,8.95223e-07_rb,9.22473e-07_rb, &
+      9.50366e-07_rb,9.78915e-07_rb,1.00813e-06_rb,1.03802e-06_rb,1.06859e-06_rb/)
+      totplnk(151:181,12) = (/ &
+      1.09986e-06_rb,1.13184e-06_rb,1.16453e-06_rb,1.19796e-06_rb,1.23212e-06_rb, &
+      1.26703e-06_rb,1.30270e-06_rb,1.33915e-06_rb,1.37637e-06_rb,1.41440e-06_rb, &
+      1.45322e-06_rb,1.49286e-06_rb,1.53333e-06_rb,1.57464e-06_rb,1.61679e-06_rb, &
+      1.65981e-06_rb,1.70370e-06_rb,1.74847e-06_rb,1.79414e-06_rb,1.84071e-06_rb, &
+      1.88821e-06_rb,1.93663e-06_rb,1.98599e-06_rb,2.03631e-06_rb,2.08759e-06_rb, &
+      2.13985e-06_rb,2.19310e-06_rb,2.24734e-06_rb,2.30260e-06_rb,2.35888e-06_rb, &
+      2.41619e-06_rb/)
+      totplnk(1:50,13) = (/ &
+      4.53634e-11_rb,5.11435e-11_rb,5.75754e-11_rb,6.47222e-11_rb,7.26531e-11_rb, &
+      8.14420e-11_rb,9.11690e-11_rb,1.01921e-10_rb,1.13790e-10_rb,1.26877e-10_rb, &
+      1.41288e-10_rb,1.57140e-10_rb,1.74555e-10_rb,1.93665e-10_rb,2.14613e-10_rb, &
+      2.37548e-10_rb,2.62633e-10_rb,2.90039e-10_rb,3.19948e-10_rb,3.52558e-10_rb, &
+      3.88073e-10_rb,4.26716e-10_rb,4.68719e-10_rb,5.14331e-10_rb,5.63815e-10_rb, &
+      6.17448e-10_rb,6.75526e-10_rb,7.38358e-10_rb,8.06277e-10_rb,8.79625e-10_rb, &
+      9.58770e-10_rb,1.04410e-09_rb,1.13602e-09_rb,1.23495e-09_rb,1.34135e-09_rb, &
+      1.45568e-09_rb,1.57845e-09_rb,1.71017e-09_rb,1.85139e-09_rb,2.00268e-09_rb, &
+      2.16464e-09_rb,2.33789e-09_rb,2.52309e-09_rb,2.72093e-09_rb,2.93212e-09_rb, &
+      3.15740e-09_rb,3.39757e-09_rb,3.65341e-09_rb,3.92579e-09_rb,4.21559e-09_rb/)
+      totplnk(51:100,13) = (/ &
+      4.52372e-09_rb,4.85115e-09_rb,5.19886e-09_rb,5.56788e-09_rb,5.95928e-09_rb, &
+      6.37419e-09_rb,6.81375e-09_rb,7.27917e-09_rb,7.77168e-09_rb,8.29256e-09_rb, &
+      8.84317e-09_rb,9.42487e-09_rb,1.00391e-08_rb,1.06873e-08_rb,1.13710e-08_rb, &
+      1.20919e-08_rb,1.28515e-08_rb,1.36514e-08_rb,1.44935e-08_rb,1.53796e-08_rb, &
+      1.63114e-08_rb,1.72909e-08_rb,1.83201e-08_rb,1.94008e-08_rb,2.05354e-08_rb, &
+      2.17258e-08_rb,2.29742e-08_rb,2.42830e-08_rb,2.56545e-08_rb,2.70910e-08_rb, &
+      2.85950e-08_rb,3.01689e-08_rb,3.18155e-08_rb,3.35373e-08_rb,3.53372e-08_rb, &
+      3.72177e-08_rb,3.91818e-08_rb,4.12325e-08_rb,4.33727e-08_rb,4.56056e-08_rb, &
+      4.79342e-08_rb,5.03617e-08_rb,5.28915e-08_rb,5.55270e-08_rb,5.82715e-08_rb, &
+      6.11286e-08_rb,6.41019e-08_rb,6.71951e-08_rb,7.04119e-08_rb,7.37560e-08_rb/)
+      totplnk(101:150,13) = (/ &
+      7.72315e-08_rb,8.08424e-08_rb,8.45927e-08_rb,8.84866e-08_rb,9.25281e-08_rb, &
+      9.67218e-08_rb,1.01072e-07_rb,1.05583e-07_rb,1.10260e-07_rb,1.15107e-07_rb, &
+      1.20128e-07_rb,1.25330e-07_rb,1.30716e-07_rb,1.36291e-07_rb,1.42061e-07_rb, &
+      1.48031e-07_rb,1.54206e-07_rb,1.60592e-07_rb,1.67192e-07_rb,1.74015e-07_rb, &
+      1.81064e-07_rb,1.88345e-07_rb,1.95865e-07_rb,2.03628e-07_rb,2.11643e-07_rb, &
+      2.19912e-07_rb,2.28443e-07_rb,2.37244e-07_rb,2.46318e-07_rb,2.55673e-07_rb, &
+      2.65316e-07_rb,2.75252e-07_rb,2.85489e-07_rb,2.96033e-07_rb,3.06891e-07_rb, &
+      3.18070e-07_rb,3.29576e-07_rb,3.41417e-07_rb,3.53600e-07_rb,3.66133e-07_rb, &
+      3.79021e-07_rb,3.92274e-07_rb,4.05897e-07_rb,4.19899e-07_rb,4.34288e-07_rb, &
+      4.49071e-07_rb,4.64255e-07_rb,4.79850e-07_rb,4.95863e-07_rb,5.12300e-07_rb/)
+      totplnk(151:181,13) = (/ &
+      5.29172e-07_rb,5.46486e-07_rb,5.64250e-07_rb,5.82473e-07_rb,6.01164e-07_rb, &
+      6.20329e-07_rb,6.39979e-07_rb,6.60122e-07_rb,6.80767e-07_rb,7.01922e-07_rb, &
+      7.23596e-07_rb,7.45800e-07_rb,7.68539e-07_rb,7.91826e-07_rb,8.15669e-07_rb, &
+      8.40076e-07_rb,8.65058e-07_rb,8.90623e-07_rb,9.16783e-07_rb,9.43544e-07_rb, &
+      9.70917e-07_rb,9.98912e-07_rb,1.02754e-06_rb,1.05681e-06_rb,1.08673e-06_rb, &
+      1.11731e-06_rb,1.14856e-06_rb,1.18050e-06_rb,1.21312e-06_rb,1.24645e-06_rb, &
+      1.28049e-06_rb/)
+      totplnk(1:50,14) = (/ &
+      1.40113e-11_rb,1.59358e-11_rb,1.80960e-11_rb,2.05171e-11_rb,2.32266e-11_rb, &
+      2.62546e-11_rb,2.96335e-11_rb,3.33990e-11_rb,3.75896e-11_rb,4.22469e-11_rb, &
+      4.74164e-11_rb,5.31466e-11_rb,5.94905e-11_rb,6.65054e-11_rb,7.42522e-11_rb, &
+      8.27975e-11_rb,9.22122e-11_rb,1.02573e-10_rb,1.13961e-10_rb,1.26466e-10_rb, &
+      1.40181e-10_rb,1.55206e-10_rb,1.71651e-10_rb,1.89630e-10_rb,2.09265e-10_rb, &
+      2.30689e-10_rb,2.54040e-10_rb,2.79467e-10_rb,3.07128e-10_rb,3.37190e-10_rb, &
+      3.69833e-10_rb,4.05243e-10_rb,4.43623e-10_rb,4.85183e-10_rb,5.30149e-10_rb, &
+      5.78755e-10_rb,6.31255e-10_rb,6.87910e-10_rb,7.49002e-10_rb,8.14824e-10_rb, &
+      8.85687e-10_rb,9.61914e-10_rb,1.04385e-09_rb,1.13186e-09_rb,1.22631e-09_rb, &
+      1.32761e-09_rb,1.43617e-09_rb,1.55243e-09_rb,1.67686e-09_rb,1.80992e-09_rb/)
+      totplnk(51:100,14) = (/ &
+      1.95212e-09_rb,2.10399e-09_rb,2.26607e-09_rb,2.43895e-09_rb,2.62321e-09_rb, &
+      2.81949e-09_rb,3.02844e-09_rb,3.25073e-09_rb,3.48707e-09_rb,3.73820e-09_rb, &
+      4.00490e-09_rb,4.28794e-09_rb,4.58819e-09_rb,4.90647e-09_rb,5.24371e-09_rb, &
+      5.60081e-09_rb,5.97875e-09_rb,6.37854e-09_rb,6.80120e-09_rb,7.24782e-09_rb, &
+      7.71950e-09_rb,8.21740e-09_rb,8.74271e-09_rb,9.29666e-09_rb,9.88054e-09_rb, &
+      1.04956e-08_rb,1.11434e-08_rb,1.18251e-08_rb,1.25422e-08_rb,1.32964e-08_rb, &
+      1.40890e-08_rb,1.49217e-08_rb,1.57961e-08_rb,1.67140e-08_rb,1.76771e-08_rb, &
+      1.86870e-08_rb,1.97458e-08_rb,2.08553e-08_rb,2.20175e-08_rb,2.32342e-08_rb, &
+      2.45077e-08_rb,2.58401e-08_rb,2.72334e-08_rb,2.86900e-08_rb,3.02122e-08_rb, &
+      3.18021e-08_rb,3.34624e-08_rb,3.51954e-08_rb,3.70037e-08_rb,3.88899e-08_rb/)
+      totplnk(101:150,14) = (/ &
+      4.08568e-08_rb,4.29068e-08_rb,4.50429e-08_rb,4.72678e-08_rb,4.95847e-08_rb, &
+      5.19963e-08_rb,5.45058e-08_rb,5.71161e-08_rb,5.98309e-08_rb,6.26529e-08_rb, &
+      6.55857e-08_rb,6.86327e-08_rb,7.17971e-08_rb,7.50829e-08_rb,7.84933e-08_rb, &
+      8.20323e-08_rb,8.57035e-08_rb,8.95105e-08_rb,9.34579e-08_rb,9.75488e-08_rb, &
+      1.01788e-07_rb,1.06179e-07_rb,1.10727e-07_rb,1.15434e-07_rb,1.20307e-07_rb, &
+      1.25350e-07_rb,1.30566e-07_rb,1.35961e-07_rb,1.41539e-07_rb,1.47304e-07_rb, &
+      1.53263e-07_rb,1.59419e-07_rb,1.65778e-07_rb,1.72345e-07_rb,1.79124e-07_rb, &
+      1.86122e-07_rb,1.93343e-07_rb,2.00792e-07_rb,2.08476e-07_rb,2.16400e-07_rb, &
+      2.24568e-07_rb,2.32988e-07_rb,2.41666e-07_rb,2.50605e-07_rb,2.59813e-07_rb, &
+      2.69297e-07_rb,2.79060e-07_rb,2.89111e-07_rb,2.99455e-07_rb,3.10099e-07_rb/)
+      totplnk(151:181,14) = (/ &
+      3.21049e-07_rb,3.32311e-07_rb,3.43893e-07_rb,3.55801e-07_rb,3.68041e-07_rb, &
+      3.80621e-07_rb,3.93547e-07_rb,4.06826e-07_rb,4.20465e-07_rb,4.34473e-07_rb, &
+      4.48856e-07_rb,4.63620e-07_rb,4.78774e-07_rb,4.94325e-07_rb,5.10280e-07_rb, &
+      5.26648e-07_rb,5.43436e-07_rb,5.60652e-07_rb,5.78302e-07_rb,5.96397e-07_rb, &
+      6.14943e-07_rb,6.33949e-07_rb,6.53421e-07_rb,6.73370e-07_rb,6.93803e-07_rb, &
+      7.14731e-07_rb,7.36157e-07_rb,7.58095e-07_rb,7.80549e-07_rb,8.03533e-07_rb, &
+      8.27050e-07_rb/)
+      totplnk(1:50,15) = (/ &
+      3.90483e-12_rb,4.47999e-12_rb,5.13122e-12_rb,5.86739e-12_rb,6.69829e-12_rb, &
+      7.63467e-12_rb,8.68833e-12_rb,9.87221e-12_rb,1.12005e-11_rb,1.26885e-11_rb, &
+      1.43534e-11_rb,1.62134e-11_rb,1.82888e-11_rb,2.06012e-11_rb,2.31745e-11_rb, &
+      2.60343e-11_rb,2.92087e-11_rb,3.27277e-11_rb,3.66242e-11_rb,4.09334e-11_rb, &
+      4.56935e-11_rb,5.09455e-11_rb,5.67338e-11_rb,6.31057e-11_rb,7.01127e-11_rb, &
+      7.78096e-11_rb,8.62554e-11_rb,9.55130e-11_rb,1.05651e-10_rb,1.16740e-10_rb, &
+      1.28858e-10_rb,1.42089e-10_rb,1.56519e-10_rb,1.72243e-10_rb,1.89361e-10_rb, &
+      2.07978e-10_rb,2.28209e-10_rb,2.50173e-10_rb,2.73999e-10_rb,2.99820e-10_rb, &
+      3.27782e-10_rb,3.58034e-10_rb,3.90739e-10_rb,4.26067e-10_rb,4.64196e-10_rb, &
+      5.05317e-10_rb,5.49631e-10_rb,5.97347e-10_rb,6.48689e-10_rb,7.03891e-10_rb/)
+      totplnk(51:100,15) = (/ &
+      7.63201e-10_rb,8.26876e-10_rb,8.95192e-10_rb,9.68430e-10_rb,1.04690e-09_rb, &
+      1.13091e-09_rb,1.22079e-09_rb,1.31689e-09_rb,1.41957e-09_rb,1.52922e-09_rb, &
+      1.64623e-09_rb,1.77101e-09_rb,1.90401e-09_rb,2.04567e-09_rb,2.19647e-09_rb, &
+      2.35690e-09_rb,2.52749e-09_rb,2.70875e-09_rb,2.90127e-09_rb,3.10560e-09_rb, &
+      3.32238e-09_rb,3.55222e-09_rb,3.79578e-09_rb,4.05375e-09_rb,4.32682e-09_rb, &
+      4.61574e-09_rb,4.92128e-09_rb,5.24420e-09_rb,5.58536e-09_rb,5.94558e-09_rb, &
+      6.32575e-09_rb,6.72678e-09_rb,7.14964e-09_rb,7.59526e-09_rb,8.06470e-09_rb, &
+      8.55897e-09_rb,9.07916e-09_rb,9.62638e-09_rb,1.02018e-08_rb,1.08066e-08_rb, &
+      1.14420e-08_rb,1.21092e-08_rb,1.28097e-08_rb,1.35446e-08_rb,1.43155e-08_rb, &
+      1.51237e-08_rb,1.59708e-08_rb,1.68581e-08_rb,1.77873e-08_rb,1.87599e-08_rb/)
+      totplnk(101:150,15) = (/ &
+      1.97777e-08_rb,2.08423e-08_rb,2.19555e-08_rb,2.31190e-08_rb,2.43348e-08_rb, &
+      2.56045e-08_rb,2.69302e-08_rb,2.83140e-08_rb,2.97578e-08_rb,3.12636e-08_rb, &
+      3.28337e-08_rb,3.44702e-08_rb,3.61755e-08_rb,3.79516e-08_rb,3.98012e-08_rb, &
+      4.17265e-08_rb,4.37300e-08_rb,4.58143e-08_rb,4.79819e-08_rb,5.02355e-08_rb, &
+      5.25777e-08_rb,5.50114e-08_rb,5.75393e-08_rb,6.01644e-08_rb,6.28896e-08_rb, &
+      6.57177e-08_rb,6.86521e-08_rb,7.16959e-08_rb,7.48520e-08_rb,7.81239e-08_rb, &
+      8.15148e-08_rb,8.50282e-08_rb,8.86675e-08_rb,9.24362e-08_rb,9.63380e-08_rb, &
+      1.00376e-07_rb,1.04555e-07_rb,1.08878e-07_rb,1.13349e-07_rb,1.17972e-07_rb, &
+      1.22751e-07_rb,1.27690e-07_rb,1.32793e-07_rb,1.38064e-07_rb,1.43508e-07_rb, &
+      1.49129e-07_rb,1.54931e-07_rb,1.60920e-07_rb,1.67099e-07_rb,1.73473e-07_rb/)
+      totplnk(151:181,15) = (/ &
+      1.80046e-07_rb,1.86825e-07_rb,1.93812e-07_rb,2.01014e-07_rb,2.08436e-07_rb, &
+      2.16082e-07_rb,2.23957e-07_rb,2.32067e-07_rb,2.40418e-07_rb,2.49013e-07_rb, &
+      2.57860e-07_rb,2.66963e-07_rb,2.76328e-07_rb,2.85961e-07_rb,2.95868e-07_rb, &
+      3.06053e-07_rb,3.16524e-07_rb,3.27286e-07_rb,3.38345e-07_rb,3.49707e-07_rb, &
+      3.61379e-07_rb,3.73367e-07_rb,3.85676e-07_rb,3.98315e-07_rb,4.11287e-07_rb, &
+      4.24602e-07_rb,4.38265e-07_rb,4.52283e-07_rb,4.66662e-07_rb,4.81410e-07_rb, &
+      4.96535e-07_rb/)
+      totplnk(1:50,16) = (/ &
+      0.28639e-12_rb,0.33349e-12_rb,0.38764e-12_rb,0.44977e-12_rb,0.52093e-12_rb, &
+      0.60231e-12_rb,0.69522e-12_rb,0.80111e-12_rb,0.92163e-12_rb,0.10586e-11_rb, &
+      0.12139e-11_rb,0.13899e-11_rb,0.15890e-11_rb,0.18138e-11_rb,0.20674e-11_rb, &
+      0.23531e-11_rb,0.26744e-11_rb,0.30352e-11_rb,0.34401e-11_rb,0.38936e-11_rb, &
+      0.44011e-11_rb,0.49681e-11_rb,0.56010e-11_rb,0.63065e-11_rb,0.70919e-11_rb, &
+      0.79654e-11_rb,0.89357e-11_rb,0.10012e-10_rb,0.11205e-10_rb,0.12526e-10_rb, &
+      0.13986e-10_rb,0.15600e-10_rb,0.17380e-10_rb,0.19342e-10_rb,0.21503e-10_rb, &
+      0.23881e-10_rb,0.26494e-10_rb,0.29362e-10_rb,0.32509e-10_rb,0.35958e-10_rb, &
+      0.39733e-10_rb,0.43863e-10_rb,0.48376e-10_rb,0.53303e-10_rb,0.58679e-10_rb, &
+      0.64539e-10_rb,0.70920e-10_rb,0.77864e-10_rb,0.85413e-10_rb,0.93615e-10_rb/)
+      totplnk(51:100,16) = (/ &
+      0.10252e-09_rb,0.11217e-09_rb,0.12264e-09_rb,0.13397e-09_rb,0.14624e-09_rb, &
+      0.15950e-09_rb,0.17383e-09_rb,0.18930e-09_rb,0.20599e-09_rb,0.22399e-09_rb, &
+      0.24339e-09_rb,0.26427e-09_rb,0.28674e-09_rb,0.31090e-09_rb,0.33686e-09_rb, &
+      0.36474e-09_rb,0.39466e-09_rb,0.42676e-09_rb,0.46115e-09_rb,0.49800e-09_rb, &
+      0.53744e-09_rb,0.57964e-09_rb,0.62476e-09_rb,0.67298e-09_rb,0.72448e-09_rb, &
+      0.77945e-09_rb,0.83809e-09_rb,0.90062e-09_rb,0.96725e-09_rb,0.10382e-08_rb, &
+      0.11138e-08_rb,0.11941e-08_rb,0.12796e-08_rb,0.13704e-08_rb,0.14669e-08_rb, &
+      0.15694e-08_rb,0.16781e-08_rb,0.17934e-08_rb,0.19157e-08_rb,0.20453e-08_rb, &
+      0.21825e-08_rb,0.23278e-08_rb,0.24815e-08_rb,0.26442e-08_rb,0.28161e-08_rb, &
+      0.29978e-08_rb,0.31898e-08_rb,0.33925e-08_rb,0.36064e-08_rb,0.38321e-08_rb/)
+      totplnk(101:150,16) = (/ &
+      0.40700e-08_rb,0.43209e-08_rb,0.45852e-08_rb,0.48636e-08_rb,0.51567e-08_rb, &
+      0.54652e-08_rb,0.57897e-08_rb,0.61310e-08_rb,0.64897e-08_rb,0.68667e-08_rb, &
+      0.72626e-08_rb,0.76784e-08_rb,0.81148e-08_rb,0.85727e-08_rb,0.90530e-08_rb, &
+      0.95566e-08_rb,0.10084e-07_rb,0.10638e-07_rb,0.11217e-07_rb,0.11824e-07_rb, &
+      0.12458e-07_rb,0.13123e-07_rb,0.13818e-07_rb,0.14545e-07_rb,0.15305e-07_rb, &
+      0.16099e-07_rb,0.16928e-07_rb,0.17795e-07_rb,0.18699e-07_rb,0.19643e-07_rb, &
+      0.20629e-07_rb,0.21656e-07_rb,0.22728e-07_rb,0.23845e-07_rb,0.25010e-07_rb, &
+      0.26223e-07_rb,0.27487e-07_rb,0.28804e-07_rb,0.30174e-07_rb,0.31600e-07_rb, &
+      0.33084e-07_rb,0.34628e-07_rb,0.36233e-07_rb,0.37902e-07_rb,0.39637e-07_rb, &
+      0.41440e-07_rb,0.43313e-07_rb,0.45259e-07_rb,0.47279e-07_rb,0.49376e-07_rb/)
+      totplnk(151:181,16) = (/ &
+      0.51552e-07_rb,0.53810e-07_rb,0.56153e-07_rb,0.58583e-07_rb,0.61102e-07_rb, &
+      0.63713e-07_rb,0.66420e-07_rb,0.69224e-07_rb,0.72129e-07_rb,0.75138e-07_rb, &
+      0.78254e-07_rb,0.81479e-07_rb,0.84818e-07_rb,0.88272e-07_rb,0.91846e-07_rb, &
+      0.95543e-07_rb,0.99366e-07_rb,0.10332e-06_rb,0.10740e-06_rb,0.11163e-06_rb, &
+      0.11599e-06_rb,0.12050e-06_rb,0.12515e-06_rb,0.12996e-06_rb,0.13493e-06_rb, &
+      0.14005e-06_rb,0.14534e-06_rb,0.15080e-06_rb,0.15643e-06_rb,0.16224e-06_rb, &
+      0.16823e-06_rb/)
+      totplk16(1:50) = (/ &
+      0.28481e-12_rb,0.33159e-12_rb,0.38535e-12_rb,0.44701e-12_rb,0.51763e-12_rb, &
+      0.59836e-12_rb,0.69049e-12_rb,0.79549e-12_rb,0.91493e-12_rb,0.10506e-11_rb, &
+      0.12045e-11_rb,0.13788e-11_rb,0.15758e-11_rb,0.17984e-11_rb,0.20493e-11_rb, &
+      0.23317e-11_rb,0.26494e-11_rb,0.30060e-11_rb,0.34060e-11_rb,0.38539e-11_rb, &
+      0.43548e-11_rb,0.49144e-11_rb,0.55387e-11_rb,0.62344e-11_rb,0.70086e-11_rb, &
+      0.78692e-11_rb,0.88248e-11_rb,0.98846e-11_rb,0.11059e-10_rb,0.12358e-10_rb, &
+      0.13794e-10_rb,0.15379e-10_rb,0.17128e-10_rb,0.19055e-10_rb,0.21176e-10_rb, &
+      0.23508e-10_rb,0.26070e-10_rb,0.28881e-10_rb,0.31963e-10_rb,0.35339e-10_rb, &
+      0.39034e-10_rb,0.43073e-10_rb,0.47484e-10_rb,0.52299e-10_rb,0.57548e-10_rb, &
+      0.63267e-10_rb,0.69491e-10_rb,0.76261e-10_rb,0.83616e-10_rb,0.91603e-10_rb/)
+      totplk16(51:100) = (/ &
+      0.10027e-09_rb,0.10966e-09_rb,0.11983e-09_rb,0.13084e-09_rb,0.14275e-09_rb, &
+      0.15562e-09_rb,0.16951e-09_rb,0.18451e-09_rb,0.20068e-09_rb,0.21810e-09_rb, &
+      0.23686e-09_rb,0.25704e-09_rb,0.27875e-09_rb,0.30207e-09_rb,0.32712e-09_rb, &
+      0.35400e-09_rb,0.38282e-09_rb,0.41372e-09_rb,0.44681e-09_rb,0.48223e-09_rb, &
+      0.52013e-09_rb,0.56064e-09_rb,0.60392e-09_rb,0.65015e-09_rb,0.69948e-09_rb, &
+      0.75209e-09_rb,0.80818e-09_rb,0.86794e-09_rb,0.93157e-09_rb,0.99929e-09_rb, &
+      0.10713e-08_rb,0.11479e-08_rb,0.12293e-08_rb,0.13157e-08_rb,0.14074e-08_rb, &
+      0.15047e-08_rb,0.16079e-08_rb,0.17172e-08_rb,0.18330e-08_rb,0.19557e-08_rb, &
+      0.20855e-08_rb,0.22228e-08_rb,0.23680e-08_rb,0.25214e-08_rb,0.26835e-08_rb, &
+      0.28546e-08_rb,0.30352e-08_rb,0.32257e-08_rb,0.34266e-08_rb,0.36384e-08_rb/)
+      totplk16(101:150) = (/ &
+      0.38615e-08_rb,0.40965e-08_rb,0.43438e-08_rb,0.46041e-08_rb,0.48779e-08_rb, &
+      0.51658e-08_rb,0.54683e-08_rb,0.57862e-08_rb,0.61200e-08_rb,0.64705e-08_rb, &
+      0.68382e-08_rb,0.72240e-08_rb,0.76285e-08_rb,0.80526e-08_rb,0.84969e-08_rb, &
+      0.89624e-08_rb,0.94498e-08_rb,0.99599e-08_rb,0.10494e-07_rb,0.11052e-07_rb, &
+      0.11636e-07_rb,0.12246e-07_rb,0.12884e-07_rb,0.13551e-07_rb,0.14246e-07_rb, &
+      0.14973e-07_rb,0.15731e-07_rb,0.16522e-07_rb,0.17347e-07_rb,0.18207e-07_rb, &
+      0.19103e-07_rb,0.20037e-07_rb,0.21011e-07_rb,0.22024e-07_rb,0.23079e-07_rb, &
+      0.24177e-07_rb,0.25320e-07_rb,0.26508e-07_rb,0.27744e-07_rb,0.29029e-07_rb, &
+      0.30365e-07_rb,0.31753e-07_rb,0.33194e-07_rb,0.34691e-07_rb,0.36246e-07_rb, &
+      0.37859e-07_rb,0.39533e-07_rb,0.41270e-07_rb,0.43071e-07_rb,0.44939e-07_rb/)
+      totplk16(151:181) = (/ &
+      0.46875e-07_rb,0.48882e-07_rb,0.50961e-07_rb,0.53115e-07_rb,0.55345e-07_rb, &
+      0.57655e-07_rb,0.60046e-07_rb,0.62520e-07_rb,0.65080e-07_rb,0.67728e-07_rb, &
+      0.70466e-07_rb,0.73298e-07_rb,0.76225e-07_rb,0.79251e-07_rb,0.82377e-07_rb, &
+      0.85606e-07_rb,0.88942e-07_rb,0.92386e-07_rb,0.95942e-07_rb,0.99612e-07_rb, &
+      0.10340e-06_rb,0.10731e-06_rb,0.11134e-06_rb,0.11550e-06_rb,0.11979e-06_rb, &
+      0.12421e-06_rb,0.12876e-06_rb,0.13346e-06_rb,0.13830e-06_rb,0.14328e-06_rb, &
+      0.14841e-06_rb/)
+
+      end subroutine lwavplank
+
+!***************************************************************************
+      subroutine lwavplankderiv
+!***************************************************************************
+
+      save
+ 
+      totplnkderiv(1:50,  1) = (/ &
+      2.22125e-08_rb,2.23245e-08_rb,2.24355e-08_rb,2.25435e-08_rb,2.26560e-08_rb, &
+      2.27620e-08_rb,2.28690e-08_rb,2.29760e-08_rb,2.30775e-08_rb,2.31800e-08_rb, &
+      2.32825e-08_rb,2.33825e-08_rb,2.34820e-08_rb,2.35795e-08_rb,2.36760e-08_rb, &
+      2.37710e-08_rb,2.38655e-08_rb,2.39595e-08_rb,2.40530e-08_rb,2.41485e-08_rb, &
+      2.42395e-08_rb,2.43300e-08_rb,2.44155e-08_rb,2.45085e-08_rb,2.45905e-08_rb, &
+      2.46735e-08_rb,2.47565e-08_rb,2.48465e-08_rb,2.49315e-08_rb,2.50100e-08_rb, &
+      2.50905e-08_rb,2.51705e-08_rb,2.52490e-08_rb,2.53260e-08_rb,2.54075e-08_rb, &
+      2.54785e-08_rb,2.55555e-08_rb,2.56340e-08_rb,2.57050e-08_rb,2.57820e-08_rb, &
+      2.58525e-08_rb,2.59205e-08_rb,2.59945e-08_rb,2.60680e-08_rb,2.61375e-08_rb, &
+      2.61980e-08_rb,2.62745e-08_rb,2.63335e-08_rb,2.63995e-08_rb,2.64710e-08_rb/)
+      totplnkderiv(51:100,  1) = (/ &
+      2.65300e-08_rb,2.66005e-08_rb,2.66685e-08_rb,2.67310e-08_rb,2.67915e-08_rb, &
+      2.68540e-08_rb,2.69065e-08_rb,2.69730e-08_rb,2.70270e-08_rb,2.70690e-08_rb, &
+      2.71420e-08_rb,2.71985e-08_rb,2.72560e-08_rb,2.73180e-08_rb,2.73760e-08_rb, &
+      2.74285e-08_rb,2.74840e-08_rb,2.75290e-08_rb,2.75950e-08_rb,2.76360e-08_rb, &
+      2.76975e-08_rb,2.77475e-08_rb,2.78080e-08_rb,2.78375e-08_rb,2.79120e-08_rb, &
+      2.79510e-08_rb,2.79955e-08_rb,2.80625e-08_rb,2.80920e-08_rb,2.81570e-08_rb, &
+      2.81990e-08_rb,2.82330e-08_rb,2.82830e-08_rb,2.83365e-08_rb,2.83740e-08_rb, &
+      2.84295e-08_rb,2.84910e-08_rb,2.85275e-08_rb,2.85525e-08_rb,2.86085e-08_rb, &
+      2.86535e-08_rb,2.86945e-08_rb,2.87355e-08_rb,2.87695e-08_rb,2.88105e-08_rb, &
+      2.88585e-08_rb,2.88945e-08_rb,2.89425e-08_rb,2.89580e-08_rb,2.90265e-08_rb/)
+      totplnkderiv(101:150,  1) = (/ &
+      2.90445e-08_rb,2.90905e-08_rb,2.91425e-08_rb,2.91560e-08_rb,2.91970e-08_rb, &
+      2.91905e-08_rb,2.92880e-08_rb,2.92950e-08_rb,2.93630e-08_rb,2.93995e-08_rb, &
+      2.94425e-08_rb,2.94635e-08_rb,2.94770e-08_rb,2.95290e-08_rb,2.95585e-08_rb, &
+      2.95815e-08_rb,2.95995e-08_rb,2.96745e-08_rb,2.96725e-08_rb,2.97040e-08_rb, &
+      2.97750e-08_rb,2.97905e-08_rb,2.98175e-08_rb,2.98355e-08_rb,2.98705e-08_rb, &
+      2.99040e-08_rb,2.99680e-08_rb,2.99860e-08_rb,3.00270e-08_rb,3.00200e-08_rb, &
+      3.00770e-08_rb,3.00795e-08_rb,3.01065e-08_rb,3.01795e-08_rb,3.01815e-08_rb, &
+      3.02025e-08_rb,3.02360e-08_rb,3.02360e-08_rb,3.03090e-08_rb,3.03155e-08_rb, &
+      3.03725e-08_rb,3.03635e-08_rb,3.04270e-08_rb,3.04610e-08_rb,3.04635e-08_rb, &
+      3.04610e-08_rb,3.05180e-08_rb,3.05430e-08_rb,3.05290e-08_rb,3.05885e-08_rb/)
+      totplnkderiv(151:181,  1) = (/ &
+      3.05750e-08_rb,3.05775e-08_rb,3.06795e-08_rb,3.07025e-08_rb,3.07365e-08_rb, &
+      3.07435e-08_rb,3.07525e-08_rb,3.07680e-08_rb,3.08115e-08_rb,3.07930e-08_rb, &
+      3.08155e-08_rb,3.08660e-08_rb,3.08865e-08_rb,3.08390e-08_rb,3.09340e-08_rb, &
+      3.09685e-08_rb,3.09340e-08_rb,3.09820e-08_rb,3.10365e-08_rb,3.10705e-08_rb, &
+      3.10750e-08_rb,3.10475e-08_rb,3.11685e-08_rb,3.11455e-08_rb,3.11500e-08_rb, &
+      3.11775e-08_rb,3.11890e-08_rb,3.12045e-08_rb,3.12185e-08_rb,3.12415e-08_rb, &
+      3.12590e-08_rb/)
+      totplnkderiv(1:50,  2) = (/ &
+      4.91150e-08_rb,4.97290e-08_rb,5.03415e-08_rb,5.09460e-08_rb,5.15550e-08_rb, &
+      5.21540e-08_rb,5.27575e-08_rb,5.33500e-08_rb,5.39500e-08_rb,5.45445e-08_rb, &
+      5.51290e-08_rb,5.57235e-08_rb,5.62955e-08_rb,5.68800e-08_rb,5.74620e-08_rb, &
+      5.80425e-08_rb,5.86145e-08_rb,5.91810e-08_rb,5.97435e-08_rb,6.03075e-08_rb, &
+      6.08625e-08_rb,6.14135e-08_rb,6.19775e-08_rb,6.25185e-08_rb,6.30675e-08_rb, &
+      6.36145e-08_rb,6.41535e-08_rb,6.46920e-08_rb,6.52265e-08_rb,6.57470e-08_rb, &
+      6.62815e-08_rb,6.68000e-08_rb,6.73320e-08_rb,6.78550e-08_rb,6.83530e-08_rb, &
+      6.88760e-08_rb,6.93735e-08_rb,6.98790e-08_rb,7.03950e-08_rb,7.08810e-08_rb, &
+      7.13815e-08_rb,7.18795e-08_rb,7.23415e-08_rb,7.28505e-08_rb,7.33285e-08_rb, &
+      7.38075e-08_rb,7.42675e-08_rb,7.47605e-08_rb,7.52380e-08_rb,7.57020e-08_rb/)
+      totplnkderiv(51:100,  2) = (/ &
+      7.61495e-08_rb,7.65955e-08_rb,7.70565e-08_rb,7.75185e-08_rb,7.79735e-08_rb, &
+      7.83915e-08_rb,7.88625e-08_rb,7.93215e-08_rb,7.97425e-08_rb,8.02195e-08_rb, &
+      8.05905e-08_rb,8.10335e-08_rb,8.14770e-08_rb,8.19025e-08_rb,8.22955e-08_rb, &
+      8.27115e-08_rb,8.31165e-08_rb,8.35645e-08_rb,8.39440e-08_rb,8.43785e-08_rb, &
+      8.47380e-08_rb,8.51495e-08_rb,8.55405e-08_rb,8.59720e-08_rb,8.63135e-08_rb, &
+      8.67065e-08_rb,8.70930e-08_rb,8.74545e-08_rb,8.78780e-08_rb,8.82160e-08_rb, &
+      8.85625e-08_rb,8.89850e-08_rb,8.93395e-08_rb,8.97080e-08_rb,9.00675e-08_rb, &
+      9.04085e-08_rb,9.07360e-08_rb,9.11315e-08_rb,9.13815e-08_rb,9.18320e-08_rb, &
+      9.21500e-08_rb,9.24725e-08_rb,9.28640e-08_rb,9.31955e-08_rb,9.35185e-08_rb, &
+      9.38645e-08_rb,9.41780e-08_rb,9.45465e-08_rb,9.48470e-08_rb,9.51375e-08_rb/)
+      totplnkderiv(101:150,  2) = (/ &
+      9.55245e-08_rb,9.57925e-08_rb,9.61195e-08_rb,9.64750e-08_rb,9.68110e-08_rb, &
+      9.71715e-08_rb,9.74150e-08_rb,9.77250e-08_rb,9.79600e-08_rb,9.82600e-08_rb, &
+      9.85300e-08_rb,9.88400e-08_rb,9.91600e-08_rb,9.95350e-08_rb,9.97500e-08_rb, &
+      1.00090e-07_rb,1.00370e-07_rb,1.00555e-07_rb,1.00935e-07_rb,1.01275e-07_rb, &
+      1.01400e-07_rb,1.01790e-07_rb,1.01945e-07_rb,1.02225e-07_rb,1.02585e-07_rb, &
+      1.02895e-07_rb,1.03010e-07_rb,1.03285e-07_rb,1.03540e-07_rb,1.03890e-07_rb, &
+      1.04015e-07_rb,1.04420e-07_rb,1.04640e-07_rb,1.04810e-07_rb,1.05090e-07_rb, &
+      1.05385e-07_rb,1.05600e-07_rb,1.05965e-07_rb,1.06050e-07_rb,1.06385e-07_rb, &
+      1.06390e-07_rb,1.06795e-07_rb,1.06975e-07_rb,1.07240e-07_rb,1.07435e-07_rb, &
+      1.07815e-07_rb,1.07960e-07_rb,1.08010e-07_rb,1.08535e-07_rb,1.08670e-07_rb/)
+      totplnkderiv(151:181,  2) = (/ &
+      1.08855e-07_rb,1.09210e-07_rb,1.09195e-07_rb,1.09510e-07_rb,1.09665e-07_rb, &
+      1.09885e-07_rb,1.10130e-07_rb,1.10440e-07_rb,1.10640e-07_rb,1.10760e-07_rb, &
+      1.11125e-07_rb,1.11195e-07_rb,1.11345e-07_rb,1.11710e-07_rb,1.11765e-07_rb, &
+      1.11960e-07_rb,1.12225e-07_rb,1.12460e-07_rb,1.12595e-07_rb,1.12730e-07_rb, &
+      1.12880e-07_rb,1.13295e-07_rb,1.13215e-07_rb,1.13505e-07_rb,1.13665e-07_rb, &
+      1.13870e-07_rb,1.14025e-07_rb,1.14325e-07_rb,1.14495e-07_rb,1.14605e-07_rb, &
+      1.14905e-07_rb/)
+      totplnkderiv(1:50, 3) = (/ &
+      4.27040e-08_rb,4.35430e-08_rb,4.43810e-08_rb,4.52210e-08_rb,4.60630e-08_rb, &
+      4.69135e-08_rb,4.77585e-08_rb,4.86135e-08_rb,4.94585e-08_rb,5.03230e-08_rb, &
+      5.11740e-08_rb,5.20250e-08_rb,5.28940e-08_rb,5.37465e-08_rb,5.46175e-08_rb, &
+      5.54700e-08_rb,5.63430e-08_rb,5.72085e-08_rb,5.80735e-08_rb,5.89430e-08_rb, &
+      5.98015e-08_rb,6.06680e-08_rb,6.15380e-08_rb,6.24130e-08_rb,6.32755e-08_rb, &
+      6.41340e-08_rb,6.50060e-08_rb,6.58690e-08_rb,6.67315e-08_rb,6.76025e-08_rb, &
+      6.84585e-08_rb,6.93205e-08_rb,7.01845e-08_rb,7.10485e-08_rb,7.19160e-08_rb, &
+      7.27695e-08_rb,7.36145e-08_rb,7.44840e-08_rb,7.53405e-08_rb,7.61770e-08_rb, &
+      7.70295e-08_rb,7.78745e-08_rb,7.87350e-08_rb,7.95740e-08_rb,8.04150e-08_rb, &
+      8.12565e-08_rb,8.20885e-08_rb,8.29455e-08_rb,8.37830e-08_rb,8.46035e-08_rb/)
+      totplnkderiv(51:100, 3) = (/ &
+      8.54315e-08_rb,8.62770e-08_rb,8.70975e-08_rb,8.79140e-08_rb,8.87190e-08_rb, &
+      8.95625e-08_rb,9.03625e-08_rb,9.11795e-08_rb,9.19930e-08_rb,9.27685e-08_rb, &
+      9.36095e-08_rb,9.43785e-08_rb,9.52375e-08_rb,9.59905e-08_rb,9.67680e-08_rb, &
+      9.75840e-08_rb,9.83755e-08_rb,9.91710e-08_rb,9.99445e-08_rb,1.00706e-07_rb, &
+      1.01477e-07_rb,1.02255e-07_rb,1.03021e-07_rb,1.03776e-07_rb,1.04544e-07_rb, &
+      1.05338e-07_rb,1.06082e-07_rb,1.06843e-07_rb,1.07543e-07_rb,1.08298e-07_rb, &
+      1.09103e-07_rb,1.09812e-07_rb,1.10536e-07_rb,1.11268e-07_rb,1.12027e-07_rb, &
+      1.12727e-07_rb,1.13464e-07_rb,1.14183e-07_rb,1.15037e-07_rb,1.15615e-07_rb, &
+      1.16329e-07_rb,1.17057e-07_rb,1.17734e-07_rb,1.18448e-07_rb,1.19149e-07_rb, &
+      1.19835e-07_rb,1.20512e-07_rb,1.21127e-07_rb,1.21895e-07_rb,1.22581e-07_rb/)
+      totplnkderiv(101:150, 3) = (/ &
+      1.23227e-07_rb,1.23928e-07_rb,1.24560e-07_rb,1.25220e-07_rb,1.25895e-07_rb, &
+      1.26565e-07_rb,1.27125e-07_rb,1.27855e-07_rb,1.28490e-07_rb,1.29195e-07_rb, &
+      1.29790e-07_rb,1.30470e-07_rb,1.31070e-07_rb,1.31690e-07_rb,1.32375e-07_rb, &
+      1.32960e-07_rb,1.33570e-07_rb,1.34230e-07_rb,1.34840e-07_rb,1.35315e-07_rb, &
+      1.35990e-07_rb,1.36555e-07_rb,1.37265e-07_rb,1.37945e-07_rb,1.38425e-07_rb, &
+      1.38950e-07_rb,1.39640e-07_rb,1.40220e-07_rb,1.40775e-07_rb,1.41400e-07_rb, &
+      1.42020e-07_rb,1.42500e-07_rb,1.43085e-07_rb,1.43680e-07_rb,1.44255e-07_rb, &
+      1.44855e-07_rb,1.45385e-07_rb,1.45890e-07_rb,1.46430e-07_rb,1.46920e-07_rb, &
+      1.47715e-07_rb,1.48090e-07_rb,1.48695e-07_rb,1.49165e-07_rb,1.49715e-07_rb, &
+      1.50130e-07_rb,1.50720e-07_rb,1.51330e-07_rb,1.51725e-07_rb,1.52350e-07_rb/)
+      totplnkderiv(151:181, 3) = (/ &
+      1.52965e-07_rb,1.53305e-07_rb,1.53915e-07_rb,1.54280e-07_rb,1.54950e-07_rb, &
+      1.55370e-07_rb,1.55850e-07_rb,1.56260e-07_rb,1.56825e-07_rb,1.57470e-07_rb, &
+      1.57760e-07_rb,1.58295e-07_rb,1.58780e-07_rb,1.59470e-07_rb,1.59940e-07_rb, &
+      1.60325e-07_rb,1.60825e-07_rb,1.61100e-07_rb,1.61605e-07_rb,1.62045e-07_rb, &
+      1.62670e-07_rb,1.63020e-07_rb,1.63625e-07_rb,1.63900e-07_rb,1.64420e-07_rb, &
+      1.64705e-07_rb,1.65430e-07_rb,1.65610e-07_rb,1.66220e-07_rb,1.66585e-07_rb, &
+      1.66965e-07_rb/)
+      totplnkderiv(1:50, 4) = (/ &
+      3.32829e-08_rb,3.41160e-08_rb,3.49626e-08_rb,3.58068e-08_rb,3.66765e-08_rb, &
+      3.75320e-08_rb,3.84095e-08_rb,3.92920e-08_rb,4.01830e-08_rb,4.10715e-08_rb, &
+      4.19735e-08_rb,4.28835e-08_rb,4.37915e-08_rb,4.47205e-08_rb,4.56410e-08_rb, &
+      4.65770e-08_rb,4.75090e-08_rb,4.84530e-08_rb,4.93975e-08_rb,5.03470e-08_rb, &
+      5.13000e-08_rb,5.22560e-08_rb,5.32310e-08_rb,5.41865e-08_rb,5.51655e-08_rb, &
+      5.61590e-08_rb,5.71120e-08_rb,5.81075e-08_rb,5.91060e-08_rb,6.00895e-08_rb, &
+      6.10750e-08_rb,6.20740e-08_rb,6.30790e-08_rb,6.40765e-08_rb,6.50940e-08_rb, &
+      6.60895e-08_rb,6.71230e-08_rb,6.81200e-08_rb,6.91260e-08_rb,7.01485e-08_rb, &
+      7.11625e-08_rb,7.21870e-08_rb,7.32010e-08_rb,7.42080e-08_rb,7.52285e-08_rb, &
+      7.62930e-08_rb,7.73040e-08_rb,7.83185e-08_rb,7.93410e-08_rb,8.03560e-08_rb/)
+      totplnkderiv(51:100, 4) = (/ &
+      8.14115e-08_rb,8.24200e-08_rb,8.34555e-08_rb,8.45100e-08_rb,8.55265e-08_rb, &
+      8.65205e-08_rb,8.75615e-08_rb,8.85870e-08_rb,8.96175e-08_rb,9.07015e-08_rb, &
+      9.16475e-08_rb,9.27525e-08_rb,9.37055e-08_rb,9.47375e-08_rb,9.57995e-08_rb, &
+      9.67635e-08_rb,9.77980e-08_rb,9.87735e-08_rb,9.98485e-08_rb,1.00904e-07_rb, &
+      1.01900e-07_rb,1.02876e-07_rb,1.03905e-07_rb,1.04964e-07_rb,1.05956e-07_rb, &
+      1.06870e-07_rb,1.07952e-07_rb,1.08944e-07_rb,1.10003e-07_rb,1.10965e-07_rb, &
+      1.11952e-07_rb,1.12927e-07_rb,1.13951e-07_rb,1.14942e-07_rb,1.15920e-07_rb, &
+      1.16968e-07_rb,1.17877e-07_rb,1.18930e-07_rb,1.19862e-07_rb,1.20817e-07_rb, &
+      1.21817e-07_rb,1.22791e-07_rb,1.23727e-07_rb,1.24751e-07_rb,1.25697e-07_rb, &
+      1.26634e-07_rb,1.27593e-07_rb,1.28585e-07_rb,1.29484e-07_rb,1.30485e-07_rb/)
+      totplnkderiv(101:150, 4) = (/ &
+      1.31363e-07_rb,1.32391e-07_rb,1.33228e-07_rb,1.34155e-07_rb,1.35160e-07_rb, &
+      1.36092e-07_rb,1.37070e-07_rb,1.37966e-07_rb,1.38865e-07_rb,1.39740e-07_rb, &
+      1.40770e-07_rb,1.41620e-07_rb,1.42605e-07_rb,1.43465e-07_rb,1.44240e-07_rb, &
+      1.45305e-07_rb,1.46220e-07_rb,1.47070e-07_rb,1.47935e-07_rb,1.48890e-07_rb, &
+      1.49905e-07_rb,1.50640e-07_rb,1.51435e-07_rb,1.52335e-07_rb,1.53235e-07_rb, &
+      1.54045e-07_rb,1.54895e-07_rb,1.55785e-07_rb,1.56870e-07_rb,1.57360e-07_rb, &
+      1.58395e-07_rb,1.59185e-07_rb,1.60060e-07_rb,1.60955e-07_rb,1.61770e-07_rb, &
+      1.62445e-07_rb,1.63415e-07_rb,1.64170e-07_rb,1.65125e-07_rb,1.65995e-07_rb, &
+      1.66545e-07_rb,1.67580e-07_rb,1.68295e-07_rb,1.69130e-07_rb,1.69935e-07_rb, &
+      1.70800e-07_rb,1.71610e-07_rb,1.72365e-07_rb,1.73215e-07_rb,1.73770e-07_rb/)
+      totplnkderiv(151:181, 4) = (/ &
+      1.74590e-07_rb,1.75525e-07_rb,1.76095e-07_rb,1.77125e-07_rb,1.77745e-07_rb, &
+      1.78580e-07_rb,1.79315e-07_rb,1.80045e-07_rb,1.80695e-07_rb,1.81580e-07_rb, &
+      1.82360e-07_rb,1.83205e-07_rb,1.84055e-07_rb,1.84315e-07_rb,1.85225e-07_rb, &
+      1.85865e-07_rb,1.86660e-07_rb,1.87445e-07_rb,1.88350e-07_rb,1.88930e-07_rb, &
+      1.89420e-07_rb,1.90275e-07_rb,1.90630e-07_rb,1.91650e-07_rb,1.92485e-07_rb, &
+      1.93285e-07_rb,1.93695e-07_rb,1.94595e-07_rb,1.94895e-07_rb,1.95960e-07_rb, &
+      1.96525e-07_rb/)
+      totplnkderiv(1:50, 5) = (/ &
+      2.41948e-08_rb,2.49273e-08_rb,2.56705e-08_rb,2.64263e-08_rb,2.71899e-08_rb, &
+      2.79687e-08_rb,2.87531e-08_rb,2.95520e-08_rb,3.03567e-08_rb,3.11763e-08_rb, &
+      3.20014e-08_rb,3.28390e-08_rb,3.36865e-08_rb,3.45395e-08_rb,3.54083e-08_rb, &
+      3.62810e-08_rb,3.71705e-08_rb,3.80585e-08_rb,3.89650e-08_rb,3.98750e-08_rb, &
+      4.07955e-08_rb,4.17255e-08_rb,4.26635e-08_rb,4.36095e-08_rb,4.45605e-08_rb, &
+      4.55190e-08_rb,4.64910e-08_rb,4.74670e-08_rb,4.84480e-08_rb,4.94430e-08_rb, &
+      5.04460e-08_rb,5.14440e-08_rb,5.24500e-08_rb,5.34835e-08_rb,5.44965e-08_rb, &
+      5.55325e-08_rb,5.65650e-08_rb,5.76050e-08_rb,5.86615e-08_rb,5.97175e-08_rb, &
+      6.07750e-08_rb,6.18400e-08_rb,6.29095e-08_rb,6.39950e-08_rb,6.50665e-08_rb, &
+      6.61405e-08_rb,6.72290e-08_rb,6.82800e-08_rb,6.94445e-08_rb,7.05460e-08_rb/)
+      totplnkderiv(51:100, 5) = (/ &
+      7.16400e-08_rb,7.27475e-08_rb,7.38790e-08_rb,7.49845e-08_rb,7.61270e-08_rb, &
+      7.72375e-08_rb,7.83770e-08_rb,7.95045e-08_rb,8.06315e-08_rb,8.17715e-08_rb, &
+      8.29275e-08_rb,8.40555e-08_rb,8.52110e-08_rb,8.63565e-08_rb,8.75045e-08_rb, &
+      8.86735e-08_rb,8.98150e-08_rb,9.09970e-08_rb,9.21295e-08_rb,9.32730e-08_rb, &
+      9.44605e-08_rb,9.56170e-08_rb,9.67885e-08_rb,9.79275e-08_rb,9.91190e-08_rb, &
+      1.00278e-07_rb,1.01436e-07_rb,1.02625e-07_rb,1.03792e-07_rb,1.04989e-07_rb, &
+      1.06111e-07_rb,1.07320e-07_rb,1.08505e-07_rb,1.09626e-07_rb,1.10812e-07_rb, &
+      1.11948e-07_rb,1.13162e-07_rb,1.14289e-07_rb,1.15474e-07_rb,1.16661e-07_rb, &
+      1.17827e-07_rb,1.19023e-07_rb,1.20167e-07_rb,1.21356e-07_rb,1.22499e-07_rb, &
+      1.23653e-07_rb,1.24876e-07_rb,1.25983e-07_rb,1.27175e-07_rb,1.28325e-07_rb/)
+      totplnkderiv(101:150, 5) = (/ &
+      1.29517e-07_rb,1.30685e-07_rb,1.31840e-07_rb,1.33013e-07_rb,1.34160e-07_rb, &
+      1.35297e-07_rb,1.36461e-07_rb,1.37630e-07_rb,1.38771e-07_rb,1.39913e-07_rb, &
+      1.41053e-07_rb,1.42218e-07_rb,1.43345e-07_rb,1.44460e-07_rb,1.45692e-07_rb, &
+      1.46697e-07_rb,1.47905e-07_rb,1.49010e-07_rb,1.50210e-07_rb,1.51285e-07_rb, &
+      1.52380e-07_rb,1.53555e-07_rb,1.54655e-07_rb,1.55805e-07_rb,1.56850e-07_rb, &
+      1.58055e-07_rb,1.59115e-07_rb,1.60185e-07_rb,1.61255e-07_rb,1.62465e-07_rb, &
+      1.63575e-07_rb,1.64675e-07_rb,1.65760e-07_rb,1.66765e-07_rb,1.67945e-07_rb, &
+      1.69070e-07_rb,1.70045e-07_rb,1.71145e-07_rb,1.72260e-07_rb,1.73290e-07_rb, &
+      1.74470e-07_rb,1.75490e-07_rb,1.76515e-07_rb,1.77555e-07_rb,1.78660e-07_rb, &
+      1.79670e-07_rb,1.80705e-07_rb,1.81895e-07_rb,1.82745e-07_rb,1.83950e-07_rb/)
+      totplnkderiv(151:181, 5) = (/ &
+      1.84955e-07_rb,1.85940e-07_rb,1.87080e-07_rb,1.88010e-07_rb,1.89145e-07_rb, &
+      1.90130e-07_rb,1.91110e-07_rb,1.92130e-07_rb,1.93205e-07_rb,1.94230e-07_rb, &
+      1.95045e-07_rb,1.96070e-07_rb,1.97155e-07_rb,1.98210e-07_rb,1.99080e-07_rb, &
+      2.00280e-07_rb,2.01135e-07_rb,2.02150e-07_rb,2.03110e-07_rb,2.04135e-07_rb, &
+      2.05110e-07_rb,2.06055e-07_rb,2.07120e-07_rb,2.08075e-07_rb,2.08975e-07_rb, &
+      2.09950e-07_rb,2.10870e-07_rb,2.11830e-07_rb,2.12960e-07_rb,2.13725e-07_rb, &
+      2.14765e-07_rb/)
+      totplnkderiv(1:50, 6) = (/ &
+      1.36567e-08_rb,1.41766e-08_rb,1.47079e-08_rb,1.52499e-08_rb,1.58075e-08_rb, &
+      1.63727e-08_rb,1.69528e-08_rb,1.75429e-08_rb,1.81477e-08_rb,1.87631e-08_rb, &
+      1.93907e-08_rb,2.00297e-08_rb,2.06808e-08_rb,2.13432e-08_rb,2.20183e-08_rb, &
+      2.27076e-08_rb,2.34064e-08_rb,2.41181e-08_rb,2.48400e-08_rb,2.55750e-08_rb, &
+      2.63231e-08_rb,2.70790e-08_rb,2.78502e-08_rb,2.86326e-08_rb,2.94259e-08_rb, &
+      3.02287e-08_rb,3.10451e-08_rb,3.18752e-08_rb,3.27108e-08_rb,3.35612e-08_rb, &
+      3.44198e-08_rb,3.52930e-08_rb,3.61785e-08_rb,3.70690e-08_rb,3.79725e-08_rb, &
+      3.88845e-08_rb,3.98120e-08_rb,4.07505e-08_rb,4.16965e-08_rb,4.26515e-08_rb, &
+      4.36190e-08_rb,4.45925e-08_rb,4.55760e-08_rb,4.65735e-08_rb,4.75835e-08_rb, &
+      4.85970e-08_rb,4.96255e-08_rb,5.06975e-08_rb,5.16950e-08_rb,5.27530e-08_rb/)
+      totplnkderiv(51:100, 6) = (/ &
+      5.38130e-08_rb,5.48860e-08_rb,5.59715e-08_rb,5.70465e-08_rb,5.81385e-08_rb, &
+      5.92525e-08_rb,6.03565e-08_rb,6.14815e-08_rb,6.26175e-08_rb,6.37475e-08_rb, &
+      6.48855e-08_rb,6.60340e-08_rb,6.71980e-08_rb,6.83645e-08_rb,6.95430e-08_rb, &
+      7.07145e-08_rb,7.19015e-08_rb,7.30995e-08_rb,7.43140e-08_rb,7.55095e-08_rb, &
+      7.67115e-08_rb,7.79485e-08_rb,7.91735e-08_rb,8.03925e-08_rb,8.16385e-08_rb, &
+      8.28775e-08_rb,8.41235e-08_rb,8.53775e-08_rb,8.66405e-08_rb,8.78940e-08_rb, &
+      8.91805e-08_rb,9.04515e-08_rb,9.17290e-08_rb,9.30230e-08_rb,9.43145e-08_rb, &
+      9.56200e-08_rb,9.69160e-08_rb,9.82140e-08_rb,9.95285e-08_rb,1.00829e-07_rb, &
+      1.02145e-07_rb,1.03478e-07_rb,1.04787e-07_rb,1.06095e-07_rb,1.07439e-07_rb, &
+      1.08785e-07_rb,1.10078e-07_rb,1.11466e-07_rb,1.12795e-07_rb,1.14133e-07_rb/)
+      totplnkderiv(101:150, 6) = (/ &
+      1.15479e-07_rb,1.16825e-07_rb,1.18191e-07_rb,1.19540e-07_rb,1.20908e-07_rb, &
+      1.22257e-07_rb,1.23634e-07_rb,1.24992e-07_rb,1.26345e-07_rb,1.27740e-07_rb, &
+      1.29098e-07_rb,1.30447e-07_rb,1.31831e-07_rb,1.33250e-07_rb,1.34591e-07_rb, &
+      1.36011e-07_rb,1.37315e-07_rb,1.38721e-07_rb,1.40103e-07_rb,1.41504e-07_rb, &
+      1.42882e-07_rb,1.44259e-07_rb,1.45674e-07_rb,1.46997e-07_rb,1.48412e-07_rb, &
+      1.49794e-07_rb,1.51167e-07_rb,1.52577e-07_rb,1.53941e-07_rb,1.55369e-07_rb, &
+      1.56725e-07_rb,1.58125e-07_rb,1.59460e-07_rb,1.60895e-07_rb,1.62260e-07_rb, &
+      1.63610e-07_rb,1.65085e-07_rb,1.66410e-07_rb,1.67805e-07_rb,1.69185e-07_rb, &
+      1.70570e-07_rb,1.71915e-07_rb,1.73375e-07_rb,1.74775e-07_rb,1.76090e-07_rb, &
+      1.77485e-07_rb,1.78905e-07_rb,1.80190e-07_rb,1.81610e-07_rb,1.82960e-07_rb/)
+      totplnkderiv(151:181, 6) = (/ &
+      1.84330e-07_rb,1.85750e-07_rb,1.87060e-07_rb,1.88470e-07_rb,1.89835e-07_rb, &
+      1.91250e-07_rb,1.92565e-07_rb,1.93925e-07_rb,1.95220e-07_rb,1.96620e-07_rb, &
+      1.98095e-07_rb,1.99330e-07_rb,2.00680e-07_rb,2.02090e-07_rb,2.03360e-07_rb, &
+      2.04775e-07_rb,2.06080e-07_rb,2.07440e-07_rb,2.08820e-07_rb,2.10095e-07_rb, &
+      2.11445e-07_rb,2.12785e-07_rb,2.14050e-07_rb,2.15375e-07_rb,2.16825e-07_rb, &
+      2.18080e-07_rb,2.19345e-07_rb,2.20710e-07_rb,2.21980e-07_rb,2.23425e-07_rb, &
+      2.24645e-07_rb/)
+      totplnkderiv(1:50, 7) = (/ &
+      7.22270e-09_rb,7.55350e-09_rb,7.89480e-09_rb,8.24725e-09_rb,8.60780e-09_rb, &
+      8.98215e-09_rb,9.36430e-09_rb,9.76035e-09_rb,1.01652e-08_rb,1.05816e-08_rb, &
+      1.10081e-08_rb,1.14480e-08_rb,1.18981e-08_rb,1.23600e-08_rb,1.28337e-08_rb, &
+      1.33172e-08_rb,1.38139e-08_rb,1.43208e-08_rb,1.48413e-08_rb,1.53702e-08_rb, &
+      1.59142e-08_rb,1.64704e-08_rb,1.70354e-08_rb,1.76178e-08_rb,1.82065e-08_rb, &
+      1.88083e-08_rb,1.94237e-08_rb,2.00528e-08_rb,2.06913e-08_rb,2.13413e-08_rb, &
+      2.20058e-08_rb,2.26814e-08_rb,2.33686e-08_rb,2.40729e-08_rb,2.47812e-08_rb, &
+      2.55099e-08_rb,2.62449e-08_rb,2.69966e-08_rb,2.77569e-08_rb,2.85269e-08_rb, &
+      2.93144e-08_rb,3.01108e-08_rb,3.09243e-08_rb,3.17433e-08_rb,3.25756e-08_rb, &
+      3.34262e-08_rb,3.42738e-08_rb,3.51480e-08_rb,3.60285e-08_rb,3.69160e-08_rb/)
+      totplnkderiv(51:100, 7) = (/ &
+      3.78235e-08_rb,3.87390e-08_rb,3.96635e-08_rb,4.06095e-08_rb,4.15600e-08_rb, &
+      4.25180e-08_rb,4.34895e-08_rb,4.44800e-08_rb,4.54715e-08_rb,4.64750e-08_rb, &
+      4.74905e-08_rb,4.85210e-08_rb,4.95685e-08_rb,5.06135e-08_rb,5.16725e-08_rb, &
+      5.27480e-08_rb,5.38265e-08_rb,5.49170e-08_rb,5.60120e-08_rb,5.71275e-08_rb, &
+      5.82610e-08_rb,5.93775e-08_rb,6.05245e-08_rb,6.17025e-08_rb,6.28355e-08_rb, &
+      6.40135e-08_rb,6.52015e-08_rb,6.63865e-08_rb,6.75790e-08_rb,6.88120e-08_rb, &
+      7.00070e-08_rb,7.12335e-08_rb,7.24720e-08_rb,7.37340e-08_rb,7.49775e-08_rb, &
+      7.62415e-08_rb,7.75185e-08_rb,7.87915e-08_rb,8.00875e-08_rb,8.13630e-08_rb, &
+      8.26710e-08_rb,8.39645e-08_rb,8.53060e-08_rb,8.66305e-08_rb,8.79915e-08_rb, &
+      8.93080e-08_rb,9.06560e-08_rb,9.19860e-08_rb,9.33550e-08_rb,9.47305e-08_rb/)
+      totplnkderiv(101:150, 7) = (/ &
+      9.61180e-08_rb,9.74500e-08_rb,9.88850e-08_rb,1.00263e-07_rb,1.01688e-07_rb, &
+      1.03105e-07_rb,1.04489e-07_rb,1.05906e-07_rb,1.07345e-07_rb,1.08771e-07_rb, &
+      1.10220e-07_rb,1.11713e-07_rb,1.13098e-07_rb,1.14515e-07_rb,1.16019e-07_rb, &
+      1.17479e-07_rb,1.18969e-07_rb,1.20412e-07_rb,1.21852e-07_rb,1.23387e-07_rb, &
+      1.24851e-07_rb,1.26319e-07_rb,1.27811e-07_rb,1.29396e-07_rb,1.30901e-07_rb, &
+      1.32358e-07_rb,1.33900e-07_rb,1.35405e-07_rb,1.36931e-07_rb,1.38443e-07_rb, &
+      1.39985e-07_rb,1.41481e-07_rb,1.43072e-07_rb,1.44587e-07_rb,1.46133e-07_rb, &
+      1.47698e-07_rb,1.49203e-07_rb,1.50712e-07_rb,1.52363e-07_rb,1.53795e-07_rb, &
+      1.55383e-07_rb,1.56961e-07_rb,1.58498e-07_rb,1.60117e-07_rb,1.61745e-07_rb, &
+      1.63190e-07_rb,1.64790e-07_rb,1.66370e-07_rb,1.67975e-07_rb,1.69555e-07_rb/)
+      totplnkderiv(151:181, 7) = (/ &
+      1.71060e-07_rb,1.72635e-07_rb,1.74345e-07_rb,1.75925e-07_rb,1.77395e-07_rb, &
+      1.78960e-07_rb,1.80620e-07_rb,1.82180e-07_rb,1.83840e-07_rb,1.85340e-07_rb, &
+      1.86940e-07_rb,1.88550e-07_rb,1.90095e-07_rb,1.91670e-07_rb,1.93385e-07_rb, &
+      1.94895e-07_rb,1.96500e-07_rb,1.98090e-07_rb,1.99585e-07_rb,2.01280e-07_rb, &
+      2.02950e-07_rb,2.04455e-07_rb,2.06075e-07_rb,2.07635e-07_rb,2.09095e-07_rb, &
+      2.10865e-07_rb,2.12575e-07_rb,2.14050e-07_rb,2.15630e-07_rb,2.17060e-07_rb, &
+      2.18715e-07_rb/)
+      totplnkderiv(1:50, 8) = (/ &
+      4.26397e-09_rb,4.48470e-09_rb,4.71299e-09_rb,4.94968e-09_rb,5.19542e-09_rb, &
+      5.44847e-09_rb,5.71195e-09_rb,5.98305e-09_rb,6.26215e-09_rb,6.55290e-09_rb, &
+      6.85190e-09_rb,7.15950e-09_rb,7.47745e-09_rb,7.80525e-09_rb,8.14190e-09_rb, &
+      8.48915e-09_rb,8.84680e-09_rb,9.21305e-09_rb,9.59105e-09_rb,9.98130e-09_rb, &
+      1.03781e-08_rb,1.07863e-08_rb,1.12094e-08_rb,1.16371e-08_rb,1.20802e-08_rb, &
+      1.25327e-08_rb,1.29958e-08_rb,1.34709e-08_rb,1.39592e-08_rb,1.44568e-08_rb, &
+      1.49662e-08_rb,1.54828e-08_rb,1.60186e-08_rb,1.65612e-08_rb,1.71181e-08_rb, &
+      1.76822e-08_rb,1.82591e-08_rb,1.88487e-08_rb,1.94520e-08_rb,2.00691e-08_rb, &
+      2.06955e-08_rb,2.13353e-08_rb,2.19819e-08_rb,2.26479e-08_rb,2.33234e-08_rb, &
+      2.40058e-08_rb,2.47135e-08_rb,2.54203e-08_rb,2.61414e-08_rb,2.68778e-08_rb/)
+      totplnkderiv(51:100, 8) = (/ &
+      2.76265e-08_rb,2.83825e-08_rb,2.91632e-08_rb,2.99398e-08_rb,3.07389e-08_rb, &
+      3.15444e-08_rb,3.23686e-08_rb,3.31994e-08_rb,3.40487e-08_rb,3.49020e-08_rb, &
+      3.57715e-08_rb,3.66515e-08_rb,3.75465e-08_rb,3.84520e-08_rb,3.93675e-08_rb, &
+      4.02985e-08_rb,4.12415e-08_rb,4.21965e-08_rb,4.31630e-08_rb,4.41360e-08_rb, &
+      4.51220e-08_rb,4.61235e-08_rb,4.71440e-08_rb,4.81515e-08_rb,4.91905e-08_rb, &
+      5.02395e-08_rb,5.12885e-08_rb,5.23735e-08_rb,5.34460e-08_rb,5.45245e-08_rb, &
+      5.56375e-08_rb,5.67540e-08_rb,5.78780e-08_rb,5.90065e-08_rb,6.01520e-08_rb, &
+      6.13000e-08_rb,6.24720e-08_rb,6.36530e-08_rb,6.48500e-08_rb,6.60500e-08_rb, &
+      6.72435e-08_rb,6.84735e-08_rb,6.97025e-08_rb,7.09530e-08_rb,7.21695e-08_rb, &
+      7.34270e-08_rb,7.47295e-08_rb,7.59915e-08_rb,7.72685e-08_rb,7.85925e-08_rb/)
+      totplnkderiv(101:150, 8) = (/ &
+      7.98855e-08_rb,8.12205e-08_rb,8.25120e-08_rb,8.38565e-08_rb,8.52005e-08_rb, &
+      8.65570e-08_rb,8.79075e-08_rb,8.92920e-08_rb,9.06535e-08_rb,9.20455e-08_rb, &
+      9.34230e-08_rb,9.48355e-08_rb,9.62720e-08_rb,9.76890e-08_rb,9.90755e-08_rb, &
+      1.00528e-07_rb,1.01982e-07_rb,1.03436e-07_rb,1.04919e-07_rb,1.06368e-07_rb, &
+      1.07811e-07_rb,1.09326e-07_rb,1.10836e-07_rb,1.12286e-07_rb,1.13803e-07_rb, &
+      1.15326e-07_rb,1.16809e-07_rb,1.18348e-07_rb,1.19876e-07_rb,1.21413e-07_rb, &
+      1.22922e-07_rb,1.24524e-07_rb,1.26049e-07_rb,1.27573e-07_rb,1.29155e-07_rb, &
+      1.30708e-07_rb,1.32327e-07_rb,1.33958e-07_rb,1.35480e-07_rb,1.37081e-07_rb, &
+      1.38716e-07_rb,1.40326e-07_rb,1.41872e-07_rb,1.43468e-07_rb,1.45092e-07_rb, &
+      1.46806e-07_rb,1.48329e-07_rb,1.49922e-07_rb,1.51668e-07_rb,1.53241e-07_rb/)
+      totplnkderiv(151:181, 8) = (/ &
+      1.54996e-07_rb,1.56561e-07_rb,1.58197e-07_rb,1.59884e-07_rb,1.61576e-07_rb, &
+      1.63200e-07_rb,1.64885e-07_rb,1.66630e-07_rb,1.68275e-07_rb,1.69935e-07_rb, &
+      1.71650e-07_rb,1.73245e-07_rb,1.75045e-07_rb,1.76710e-07_rb,1.78330e-07_rb, &
+      1.79995e-07_rb,1.81735e-07_rb,1.83470e-07_rb,1.85200e-07_rb,1.86890e-07_rb, &
+      1.88595e-07_rb,1.90300e-07_rb,1.91995e-07_rb,1.93715e-07_rb,1.95495e-07_rb, &
+      1.97130e-07_rb,1.98795e-07_rb,2.00680e-07_rb,2.02365e-07_rb,2.04090e-07_rb, &
+      2.05830e-07_rb/)
+      totplnkderiv(1:50, 9) = (/ &
+      1.85410e-09_rb,1.96515e-09_rb,2.08117e-09_rb,2.20227e-09_rb,2.32861e-09_rb, &
+      2.46066e-09_rb,2.59812e-09_rb,2.74153e-09_rb,2.89058e-09_rb,3.04567e-09_rb, &
+      3.20674e-09_rb,3.37442e-09_rb,3.54854e-09_rb,3.72892e-09_rb,3.91630e-09_rb, &
+      4.11013e-09_rb,4.31150e-09_rb,4.52011e-09_rb,4.73541e-09_rb,4.95870e-09_rb, &
+      5.18913e-09_rb,5.42752e-09_rb,5.67340e-09_rb,5.92810e-09_rb,6.18995e-09_rb, &
+      6.46055e-09_rb,6.73905e-09_rb,7.02620e-09_rb,7.32260e-09_rb,7.62700e-09_rb, &
+      7.94050e-09_rb,8.26370e-09_rb,8.59515e-09_rb,8.93570e-09_rb,9.28535e-09_rb, &
+      9.64575e-09_rb,1.00154e-08_rb,1.03944e-08_rb,1.07839e-08_rb,1.11832e-08_rb, &
+      1.15909e-08_rb,1.20085e-08_rb,1.24399e-08_rb,1.28792e-08_rb,1.33280e-08_rb, &
+      1.37892e-08_rb,1.42573e-08_rb,1.47408e-08_rb,1.52345e-08_rb,1.57371e-08_rb/)
+      totplnkderiv(51:100, 9) = (/ &
+      1.62496e-08_rb,1.67756e-08_rb,1.73101e-08_rb,1.78596e-08_rb,1.84161e-08_rb, &
+      1.89869e-08_rb,1.95681e-08_rb,2.01632e-08_rb,2.07626e-08_rb,2.13800e-08_rb, &
+      2.20064e-08_rb,2.26453e-08_rb,2.32970e-08_rb,2.39595e-08_rb,2.46340e-08_rb, &
+      2.53152e-08_rb,2.60158e-08_rb,2.67235e-08_rb,2.74471e-08_rb,2.81776e-08_rb, &
+      2.89233e-08_rb,2.96822e-08_rb,3.04488e-08_rb,3.12298e-08_rb,3.20273e-08_rb, &
+      3.28304e-08_rb,3.36455e-08_rb,3.44765e-08_rb,3.53195e-08_rb,3.61705e-08_rb, &
+      3.70385e-08_rb,3.79155e-08_rb,3.88065e-08_rb,3.97055e-08_rb,4.06210e-08_rb, &
+      4.15490e-08_rb,4.24825e-08_rb,4.34355e-08_rb,4.43920e-08_rb,4.53705e-08_rb, &
+      4.63560e-08_rb,4.73565e-08_rb,4.83655e-08_rb,4.93815e-08_rb,5.04180e-08_rb, &
+      5.14655e-08_rb,5.25175e-08_rb,5.35865e-08_rb,5.46720e-08_rb,5.57670e-08_rb/)
+      totplnkderiv(101:150, 9) = (/ &
+      5.68640e-08_rb,5.79825e-08_rb,5.91140e-08_rb,6.02515e-08_rb,6.13985e-08_rb, &
+      6.25525e-08_rb,6.37420e-08_rb,6.49220e-08_rb,6.61145e-08_rb,6.73185e-08_rb, &
+      6.85520e-08_rb,6.97760e-08_rb,7.10050e-08_rb,7.22650e-08_rb,7.35315e-08_rb, &
+      7.48035e-08_rb,7.60745e-08_rb,7.73740e-08_rb,7.86870e-08_rb,7.99845e-08_rb, &
+      8.13325e-08_rb,8.26615e-08_rb,8.40010e-08_rb,8.53640e-08_rb,8.67235e-08_rb, &
+      8.80960e-08_rb,8.95055e-08_rb,9.08945e-08_rb,9.23045e-08_rb,9.37100e-08_rb, &
+      9.51555e-08_rb,9.65630e-08_rb,9.80235e-08_rb,9.94920e-08_rb,1.00966e-07_rb, &
+      1.02434e-07_rb,1.03898e-07_rb,1.05386e-07_rb,1.06905e-07_rb,1.08418e-07_rb, &
+      1.09926e-07_rb,1.11454e-07_rb,1.13010e-07_rb,1.14546e-07_rb,1.16106e-07_rb, &
+      1.17652e-07_rb,1.19264e-07_rb,1.20817e-07_rb,1.22395e-07_rb,1.24024e-07_rb/)
+      totplnkderiv(151:181, 9) = (/ &
+      1.25585e-07_rb,1.27213e-07_rb,1.28817e-07_rb,1.30472e-07_rb,1.32088e-07_rb, &
+      1.33752e-07_rb,1.35367e-07_rb,1.37018e-07_rb,1.38698e-07_rb,1.40394e-07_rb, &
+      1.42026e-07_rb,1.43796e-07_rb,1.45438e-07_rb,1.47175e-07_rb,1.48866e-07_rb, &
+      1.50576e-07_rb,1.52281e-07_rb,1.54018e-07_rb,1.55796e-07_rb,1.57515e-07_rb, &
+      1.59225e-07_rb,1.60989e-07_rb,1.62754e-07_rb,1.64532e-07_rb,1.66285e-07_rb, &
+      1.68070e-07_rb,1.69870e-07_rb,1.71625e-07_rb,1.73440e-07_rb,1.75275e-07_rb, &
+      1.77040e-07_rb/)
+      totplnkderiv(1:50,10) = (/ &
+      7.14917e-10_rb,7.64833e-10_rb,8.17460e-10_rb,8.72980e-10_rb,9.31380e-10_rb, &
+      9.92940e-10_rb,1.05746e-09_rb,1.12555e-09_rb,1.19684e-09_rb,1.27162e-09_rb, &
+      1.35001e-09_rb,1.43229e-09_rb,1.51815e-09_rb,1.60831e-09_rb,1.70271e-09_rb, &
+      1.80088e-09_rb,1.90365e-09_rb,2.01075e-09_rb,2.12261e-09_rb,2.23924e-09_rb, &
+      2.36057e-09_rb,2.48681e-09_rb,2.61814e-09_rb,2.75506e-09_rb,2.89692e-09_rb, &
+      3.04423e-09_rb,3.19758e-09_rb,3.35681e-09_rb,3.52113e-09_rb,3.69280e-09_rb, &
+      3.86919e-09_rb,4.05205e-09_rb,4.24184e-09_rb,4.43877e-09_rb,4.64134e-09_rb, &
+      4.85088e-09_rb,5.06670e-09_rb,5.29143e-09_rb,5.52205e-09_rb,5.75980e-09_rb, &
+      6.00550e-09_rb,6.25840e-09_rb,6.51855e-09_rb,6.78800e-09_rb,7.06435e-09_rb, &
+      7.34935e-09_rb,7.64220e-09_rb,7.94470e-09_rb,8.25340e-09_rb,8.57030e-09_rb/)
+      totplnkderiv(51:100,10) = (/ &
+      8.89680e-09_rb,9.23255e-09_rb,9.57770e-09_rb,9.93045e-09_rb,1.02932e-08_rb, &
+      1.06649e-08_rb,1.10443e-08_rb,1.14348e-08_rb,1.18350e-08_rb,1.22463e-08_rb, &
+      1.26679e-08_rb,1.30949e-08_rb,1.35358e-08_rb,1.39824e-08_rb,1.44425e-08_rb, &
+      1.49126e-08_rb,1.53884e-08_rb,1.58826e-08_rb,1.63808e-08_rb,1.68974e-08_rb, &
+      1.74159e-08_rb,1.79447e-08_rb,1.84886e-08_rb,1.90456e-08_rb,1.96124e-08_rb, &
+      2.01863e-08_rb,2.07737e-08_rb,2.13720e-08_rb,2.19837e-08_rb,2.26044e-08_rb, &
+      2.32396e-08_rb,2.38856e-08_rb,2.45344e-08_rb,2.52055e-08_rb,2.58791e-08_rb, &
+      2.65706e-08_rb,2.72758e-08_rb,2.79852e-08_rb,2.87201e-08_rb,2.94518e-08_rb, &
+      3.02063e-08_rb,3.09651e-08_rb,3.17357e-08_rb,3.25235e-08_rb,3.33215e-08_rb, &
+      3.41285e-08_rb,3.49485e-08_rb,3.57925e-08_rb,3.66330e-08_rb,3.74765e-08_rb/)
+      totplnkderiv(101:150,10) = (/ &
+      3.83675e-08_rb,3.92390e-08_rb,4.01330e-08_rb,4.10340e-08_rb,4.19585e-08_rb, &
+      4.28815e-08_rb,4.38210e-08_rb,4.47770e-08_rb,4.57575e-08_rb,4.67325e-08_rb, &
+      4.77170e-08_rb,4.87205e-08_rb,4.97410e-08_rb,5.07620e-08_rb,5.18180e-08_rb, &
+      5.28540e-08_rb,5.39260e-08_rb,5.50035e-08_rb,5.60885e-08_rb,5.71900e-08_rb, &
+      5.82940e-08_rb,5.94380e-08_rb,6.05690e-08_rb,6.17185e-08_rb,6.28860e-08_rb, &
+      6.40670e-08_rb,6.52300e-08_rb,6.64225e-08_rb,6.76485e-08_rb,6.88715e-08_rb, &
+      7.00750e-08_rb,7.13760e-08_rb,7.25910e-08_rb,7.38860e-08_rb,7.51290e-08_rb, &
+      7.64420e-08_rb,7.77550e-08_rb,7.90725e-08_rb,8.03825e-08_rb,8.17330e-08_rb, &
+      8.30810e-08_rb,8.44330e-08_rb,8.57720e-08_rb,8.72115e-08_rb,8.85800e-08_rb, &
+      8.99945e-08_rb,9.13905e-08_rb,9.28345e-08_rb,9.42665e-08_rb,9.56765e-08_rb/)
+      totplnkderiv(151:181,10) = (/ &
+      9.72000e-08_rb,9.86780e-08_rb,1.00105e-07_rb,1.01616e-07_rb,1.03078e-07_rb, &
+      1.04610e-07_rb,1.06154e-07_rb,1.07639e-07_rb,1.09242e-07_rb,1.10804e-07_rb, &
+      1.12384e-07_rb,1.13871e-07_rb,1.15478e-07_rb,1.17066e-07_rb,1.18703e-07_rb, &
+      1.20294e-07_rb,1.21930e-07_rb,1.23543e-07_rb,1.25169e-07_rb,1.26806e-07_rb, &
+      1.28503e-07_rb,1.30233e-07_rb,1.31834e-07_rb,1.33596e-07_rb,1.35283e-07_rb, &
+      1.36947e-07_rb,1.38594e-07_rb,1.40362e-07_rb,1.42131e-07_rb,1.43823e-07_rb, &
+      1.45592e-07_rb/)
+      totplnkderiv(1:50,11) = (/ &
+      2.25919e-10_rb,2.43810e-10_rb,2.62866e-10_rb,2.83125e-10_rb,3.04676e-10_rb, &
+      3.27536e-10_rb,3.51796e-10_rb,3.77498e-10_rb,4.04714e-10_rb,4.33528e-10_rb, &
+      4.64000e-10_rb,4.96185e-10_rb,5.30165e-10_rb,5.65999e-10_rb,6.03749e-10_rb, &
+      6.43579e-10_rb,6.85479e-10_rb,7.29517e-10_rb,7.75810e-10_rb,8.24440e-10_rb, &
+      8.75520e-10_rb,9.29065e-10_rb,9.85175e-10_rb,1.04405e-09_rb,1.10562e-09_rb, &
+      1.17005e-09_rb,1.23742e-09_rb,1.30780e-09_rb,1.38141e-09_rb,1.45809e-09_rb, &
+      1.53825e-09_rb,1.62177e-09_rb,1.70884e-09_rb,1.79942e-09_rb,1.89390e-09_rb, &
+      1.99205e-09_rb,2.09429e-09_rb,2.20030e-09_rb,2.31077e-09_rb,2.42510e-09_rb, &
+      2.54410e-09_rb,2.66754e-09_rb,2.79529e-09_rb,2.92777e-09_rb,3.06498e-09_rb, &
+      3.20691e-09_rb,3.35450e-09_rb,3.50653e-09_rb,3.66427e-09_rb,3.82723e-09_rb/)
+      totplnkderiv(51:100,11) = (/ &
+      3.99549e-09_rb,4.16911e-09_rb,4.34892e-09_rb,4.53415e-09_rb,4.72504e-09_rb, &
+      4.92197e-09_rb,5.12525e-09_rb,5.33485e-09_rb,5.55085e-09_rb,5.77275e-09_rb, &
+      6.00105e-09_rb,6.23650e-09_rb,6.47855e-09_rb,6.72735e-09_rb,6.98325e-09_rb, &
+      7.24695e-09_rb,7.51730e-09_rb,7.79480e-09_rb,8.07975e-09_rb,8.37170e-09_rb, &
+      8.67195e-09_rb,8.98050e-09_rb,9.29575e-09_rb,9.61950e-09_rb,9.95150e-09_rb, &
+      1.02912e-08_rb,1.06397e-08_rb,1.09964e-08_rb,1.13611e-08_rb,1.17348e-08_rb, &
+      1.21158e-08_rb,1.25072e-08_rb,1.29079e-08_rb,1.33159e-08_rb,1.37342e-08_rb, &
+      1.41599e-08_rb,1.45966e-08_rb,1.50438e-08_rb,1.54964e-08_rb,1.59605e-08_rb, &
+      1.64337e-08_rb,1.69189e-08_rb,1.74134e-08_rb,1.79136e-08_rb,1.84272e-08_rb, &
+      1.89502e-08_rb,1.94845e-08_rb,2.00248e-08_rb,2.05788e-08_rb,2.11455e-08_rb/)
+      totplnkderiv(101:150,11) = (/ &
+      2.17159e-08_rb,2.23036e-08_rb,2.28983e-08_rb,2.35033e-08_rb,2.41204e-08_rb, &
+      2.47485e-08_rb,2.53860e-08_rb,2.60331e-08_rb,2.66891e-08_rb,2.73644e-08_rb, &
+      2.80440e-08_rb,2.87361e-08_rb,2.94412e-08_rb,3.01560e-08_rb,3.08805e-08_rb, &
+      3.16195e-08_rb,3.23690e-08_rb,3.31285e-08_rb,3.39015e-08_rb,3.46820e-08_rb, &
+      3.54770e-08_rb,3.62805e-08_rb,3.70960e-08_rb,3.79295e-08_rb,3.87715e-08_rb, &
+      3.96185e-08_rb,4.04860e-08_rb,4.13600e-08_rb,4.22500e-08_rb,4.31490e-08_rb, &
+      4.40610e-08_rb,4.49810e-08_rb,4.59205e-08_rb,4.68650e-08_rb,4.78260e-08_rb, &
+      4.87970e-08_rb,4.97790e-08_rb,5.07645e-08_rb,5.17730e-08_rb,5.27960e-08_rb, &
+      5.38285e-08_rb,5.48650e-08_rb,5.59205e-08_rb,5.69960e-08_rb,5.80690e-08_rb, &
+      5.91570e-08_rb,6.02640e-08_rb,6.13750e-08_rb,6.25015e-08_rb,6.36475e-08_rb/)
+      totplnkderiv(151:181,11) = (/ &
+      6.47950e-08_rb,6.59510e-08_rb,6.71345e-08_rb,6.83175e-08_rb,6.95250e-08_rb, &
+      7.07325e-08_rb,7.19490e-08_rb,7.31880e-08_rb,7.44315e-08_rb,7.56880e-08_rb, &
+      7.69500e-08_rb,7.82495e-08_rb,7.95330e-08_rb,8.08450e-08_rb,8.21535e-08_rb, &
+      8.34860e-08_rb,8.48330e-08_rb,8.61795e-08_rb,8.75480e-08_rb,8.89235e-08_rb, &
+      9.03060e-08_rb,9.17045e-08_rb,9.31140e-08_rb,9.45240e-08_rb,9.59720e-08_rb, &
+      9.74140e-08_rb,9.88825e-08_rb,1.00347e-07_rb,1.01825e-07_rb,1.03305e-07_rb, &
+      1.04826e-07_rb/)
+      totplnkderiv(1:50,12) = (/ &
+      2.91689e-11_rb,3.20300e-11_rb,3.51272e-11_rb,3.84803e-11_rb,4.21014e-11_rb, &
+      4.60107e-11_rb,5.02265e-11_rb,5.47685e-11_rb,5.96564e-11_rb,6.49111e-11_rb, &
+      7.05522e-11_rb,7.66060e-11_rb,8.30974e-11_rb,9.00441e-11_rb,9.74820e-11_rb, &
+      1.05435e-10_rb,1.13925e-10_rb,1.22981e-10_rb,1.32640e-10_rb,1.42933e-10_rb, &
+      1.53882e-10_rb,1.65527e-10_rb,1.77903e-10_rb,1.91054e-10_rb,2.05001e-10_rb, &
+      2.19779e-10_rb,2.35448e-10_rb,2.52042e-10_rb,2.69565e-10_rb,2.88128e-10_rb, &
+      3.07714e-10_rb,3.28370e-10_rb,3.50238e-10_rb,3.73235e-10_rb,3.97433e-10_rb, &
+      4.22964e-10_rb,4.49822e-10_rb,4.78042e-10_rb,5.07721e-10_rb,5.38915e-10_rb, &
+      5.71610e-10_rb,6.05916e-10_rb,6.41896e-10_rb,6.79600e-10_rb,7.19110e-10_rb, &
+      7.60455e-10_rb,8.03625e-10_rb,8.48870e-10_rb,8.96080e-10_rb,9.45490e-10_rb/)
+      totplnkderiv(51:100,12) = (/ &
+      9.96930e-10_rb,1.05071e-09_rb,1.10679e-09_rb,1.16521e-09_rb,1.22617e-09_rb, &
+      1.28945e-09_rb,1.35554e-09_rb,1.42427e-09_rb,1.49574e-09_rb,1.56984e-09_rb, &
+      1.64695e-09_rb,1.72715e-09_rb,1.81034e-09_rb,1.89656e-09_rb,1.98613e-09_rb, &
+      2.07898e-09_rb,2.17515e-09_rb,2.27498e-09_rb,2.37826e-09_rb,2.48517e-09_rb, &
+      2.59566e-09_rb,2.71004e-09_rb,2.82834e-09_rb,2.95078e-09_rb,3.07686e-09_rb, &
+      3.20739e-09_rb,3.34232e-09_rb,3.48162e-09_rb,3.62515e-09_rb,3.77337e-09_rb, &
+      3.92614e-09_rb,4.08317e-09_rb,4.24567e-09_rb,4.41272e-09_rb,4.58524e-09_rb, &
+      4.76245e-09_rb,4.94450e-09_rb,5.13235e-09_rb,5.32535e-09_rb,5.52415e-09_rb, &
+      5.72770e-09_rb,5.93815e-09_rb,6.15315e-09_rb,6.37525e-09_rb,6.60175e-09_rb, &
+      6.83485e-09_rb,7.07490e-09_rb,7.32060e-09_rb,7.57225e-09_rb,7.83035e-09_rb/)
+      totplnkderiv(101:150,12) = (/ &
+      8.09580e-09_rb,8.36620e-09_rb,8.64410e-09_rb,8.93110e-09_rb,9.22170e-09_rb, &
+      9.52055e-09_rb,9.82595e-09_rb,1.01399e-08_rb,1.04613e-08_rb,1.07878e-08_rb, &
+      1.11223e-08_rb,1.14667e-08_rb,1.18152e-08_rb,1.21748e-08_rb,1.25410e-08_rb, &
+      1.29147e-08_rb,1.32948e-08_rb,1.36858e-08_rb,1.40827e-08_rb,1.44908e-08_rb, &
+      1.49040e-08_rb,1.53284e-08_rb,1.57610e-08_rb,1.61995e-08_rb,1.66483e-08_rb, &
+      1.71068e-08_rb,1.75714e-08_rb,1.80464e-08_rb,1.85337e-08_rb,1.90249e-08_rb, &
+      1.95309e-08_rb,2.00407e-08_rb,2.05333e-08_rb,2.10929e-08_rb,2.16346e-08_rb, &
+      2.21829e-08_rb,2.27402e-08_rb,2.33112e-08_rb,2.38922e-08_rb,2.44802e-08_rb, &
+      2.50762e-08_rb,2.56896e-08_rb,2.63057e-08_rb,2.69318e-08_rb,2.75705e-08_rb, &
+      2.82216e-08_rb,2.88787e-08_rb,2.95505e-08_rb,3.02335e-08_rb,3.09215e-08_rb/)
+      totplnkderiv(151:181,12) = (/ &
+      3.16235e-08_rb,3.23350e-08_rb,3.30590e-08_rb,3.37960e-08_rb,3.45395e-08_rb, &
+      3.52955e-08_rb,3.60615e-08_rb,3.68350e-08_rb,3.76265e-08_rb,3.84255e-08_rb, &
+      3.92400e-08_rb,4.00485e-08_rb,4.08940e-08_rb,4.17310e-08_rb,4.25860e-08_rb, &
+      4.34585e-08_rb,4.43270e-08_rb,4.52220e-08_rb,4.61225e-08_rb,4.70345e-08_rb, &
+      4.79560e-08_rb,4.89000e-08_rb,4.98445e-08_rb,5.07985e-08_rb,5.17705e-08_rb, &
+      5.27575e-08_rb,5.37420e-08_rb,5.47495e-08_rb,5.57725e-08_rb,5.68105e-08_rb, &
+      5.78395e-08_rb/)
+      totplnkderiv(1:50,13) = (/ &
+      5.47482e-12_rb,6.09637e-12_rb,6.77874e-12_rb,7.52703e-12_rb,8.34784e-12_rb, &
+      9.24486e-12_rb,1.02246e-11_rb,1.12956e-11_rb,1.24615e-11_rb,1.37321e-11_rb, &
+      1.51131e-11_rb,1.66129e-11_rb,1.82416e-11_rb,2.00072e-11_rb,2.19187e-11_rb, &
+      2.39828e-11_rb,2.62171e-11_rb,2.86290e-11_rb,3.12283e-11_rb,3.40276e-11_rb, &
+      3.70433e-11_rb,4.02847e-11_rb,4.37738e-11_rb,4.75070e-11_rb,5.15119e-11_rb, &
+      5.58120e-11_rb,6.04059e-11_rb,6.53208e-11_rb,7.05774e-11_rb,7.61935e-11_rb, &
+      8.21832e-11_rb,8.85570e-11_rb,9.53575e-11_rb,1.02592e-10_rb,1.10298e-10_rb, &
+      1.18470e-10_rb,1.27161e-10_rb,1.36381e-10_rb,1.46161e-10_rb,1.56529e-10_rb, &
+      1.67521e-10_rb,1.79142e-10_rb,1.91423e-10_rb,2.04405e-10_rb,2.18123e-10_rb, &
+      2.32608e-10_rb,2.47889e-10_rb,2.63994e-10_rb,2.80978e-10_rb,2.98843e-10_rb/)
+      totplnkderiv(51:100,13) = (/ &
+      3.17659e-10_rb,3.37423e-10_rb,3.58206e-10_rb,3.80090e-10_rb,4.02996e-10_rb, &
+      4.27065e-10_rb,4.52298e-10_rb,4.78781e-10_rb,5.06493e-10_rb,5.35576e-10_rb, &
+      5.65942e-10_rb,5.97761e-10_rb,6.31007e-10_rb,6.65740e-10_rb,7.02095e-10_rb, &
+      7.39945e-10_rb,7.79575e-10_rb,8.20845e-10_rb,8.63870e-10_rb,9.08680e-10_rb, &
+      9.55385e-10_rb,1.00416e-09_rb,1.05464e-09_rb,1.10737e-09_rb,1.16225e-09_rb, &
+      1.21918e-09_rb,1.27827e-09_rb,1.33988e-09_rb,1.40370e-09_rb,1.46994e-09_rb, &
+      1.53850e-09_rb,1.60993e-09_rb,1.68382e-09_rb,1.76039e-09_rb,1.83997e-09_rb, &
+      1.92182e-09_rb,2.00686e-09_rb,2.09511e-09_rb,2.18620e-09_rb,2.28034e-09_rb, &
+      2.37753e-09_rb,2.47805e-09_rb,2.58193e-09_rb,2.68935e-09_rb,2.80064e-09_rb, &
+      2.91493e-09_rb,3.03271e-09_rb,3.15474e-09_rb,3.27987e-09_rb,3.40936e-09_rb/)
+      totplnkderiv(101:150,13) = (/ &
+      3.54277e-09_rb,3.68019e-09_rb,3.82173e-09_rb,3.96703e-09_rb,4.11746e-09_rb, &
+      4.27104e-09_rb,4.43020e-09_rb,4.59395e-09_rb,4.76060e-09_rb,4.93430e-09_rb, &
+      5.11085e-09_rb,5.29280e-09_rb,5.48055e-09_rb,5.67300e-09_rb,5.86950e-09_rb, &
+      6.07160e-09_rb,6.28015e-09_rb,6.49295e-09_rb,6.71195e-09_rb,6.93455e-09_rb, &
+      7.16470e-09_rb,7.39985e-09_rb,7.64120e-09_rb,7.88885e-09_rb,8.13910e-09_rb, &
+      8.39930e-09_rb,8.66535e-09_rb,8.93600e-09_rb,9.21445e-09_rb,9.49865e-09_rb, &
+      9.78845e-09_rb,1.00856e-08_rb,1.04361e-08_rb,1.07018e-08_rb,1.10164e-08_rb, &
+      1.13438e-08_rb,1.16748e-08_rb,1.20133e-08_rb,1.23575e-08_rb,1.27117e-08_rb, &
+      1.30708e-08_rb,1.34383e-08_rb,1.38138e-08_rb,1.41985e-08_rb,1.45859e-08_rb, &
+      1.49846e-08_rb,1.53879e-08_rb,1.58042e-08_rb,1.62239e-08_rb,1.66529e-08_rb/)
+      totplnkderiv(151:181,13) = (/ &
+      1.70954e-08_rb,1.75422e-08_rb,1.79943e-08_rb,1.84537e-08_rb,1.89280e-08_rb, &
+      1.94078e-08_rb,1.98997e-08_rb,2.03948e-08_rb,2.08956e-08_rb,2.14169e-08_rb, &
+      2.19330e-08_rb,2.24773e-08_rb,2.30085e-08_rb,2.35676e-08_rb,2.41237e-08_rb, &
+      2.46919e-08_rb,2.52720e-08_rb,2.58575e-08_rb,2.64578e-08_rb,2.70675e-08_rb, &
+      2.76878e-08_rb,2.83034e-08_rb,2.89430e-08_rb,2.95980e-08_rb,3.02480e-08_rb, &
+      3.09105e-08_rb,3.15980e-08_rb,3.22865e-08_rb,3.29755e-08_rb,3.36775e-08_rb, &
+      3.43990e-08_rb/)
+      totplnkderiv(1:50,14) = (/ &
+      1.81489e-12_rb,2.03846e-12_rb,2.28659e-12_rb,2.56071e-12_rb,2.86352e-12_rb, &
+      3.19789e-12_rb,3.56668e-12_rb,3.97211e-12_rb,4.41711e-12_rb,4.90616e-12_rb, &
+      5.44153e-12_rb,6.02790e-12_rb,6.67001e-12_rb,7.37018e-12_rb,8.13433e-12_rb, &
+      8.96872e-12_rb,9.87526e-12_rb,1.08601e-11_rb,1.19328e-11_rb,1.30938e-11_rb, &
+      1.43548e-11_rb,1.57182e-11_rb,1.71916e-11_rb,1.87875e-11_rb,2.05091e-11_rb, &
+      2.23652e-11_rb,2.43627e-11_rb,2.65190e-11_rb,2.88354e-11_rb,3.13224e-11_rb, &
+      3.39926e-11_rb,3.68664e-11_rb,3.99372e-11_rb,4.32309e-11_rb,4.67496e-11_rb, &
+      5.05182e-11_rb,5.45350e-11_rb,5.88268e-11_rb,6.34126e-11_rb,6.82878e-11_rb, &
+      7.34973e-11_rb,7.90201e-11_rb,8.49075e-11_rb,9.11725e-11_rb,9.78235e-11_rb, &
+      1.04856e-10_rb,1.12342e-10_rb,1.20278e-10_rb,1.28680e-10_rb,1.37560e-10_rb/)
+      totplnkderiv(51:100,14) = (/ &
+      1.46953e-10_rb,1.56900e-10_rb,1.67401e-10_rb,1.78498e-10_rb,1.90161e-10_rb, &
+      2.02523e-10_rb,2.15535e-10_rb,2.29239e-10_rb,2.43665e-10_rb,2.58799e-10_rb, &
+      2.74767e-10_rb,2.91522e-10_rb,3.09141e-10_rb,3.27625e-10_rb,3.47011e-10_rb, &
+      3.67419e-10_rb,3.88720e-10_rb,4.11066e-10_rb,4.34522e-10_rb,4.59002e-10_rb, &
+      4.84657e-10_rb,5.11391e-10_rb,5.39524e-10_rb,5.68709e-10_rb,5.99240e-10_rb, &
+      6.31295e-10_rb,6.64520e-10_rb,6.99200e-10_rb,7.35525e-10_rb,7.73135e-10_rb, &
+      8.12440e-10_rb,8.53275e-10_rb,8.95930e-10_rb,9.40165e-10_rb,9.86260e-10_rb, &
+      1.03423e-09_rb,1.08385e-09_rb,1.13567e-09_rb,1.18916e-09_rb,1.24469e-09_rb, &
+      1.30262e-09_rb,1.36268e-09_rb,1.42479e-09_rb,1.48904e-09_rb,1.55557e-09_rb, &
+      1.62478e-09_rb,1.69642e-09_rb,1.77023e-09_rb,1.84696e-09_rb,1.92646e-09_rb/)
+      totplnkderiv(101:150,14) = (/ &
+      2.00831e-09_rb,2.09299e-09_rb,2.18007e-09_rb,2.27093e-09_rb,2.36398e-09_rb, &
+      2.46020e-09_rb,2.55985e-09_rb,2.66230e-09_rb,2.76795e-09_rb,2.87667e-09_rb, &
+      2.98971e-09_rb,3.10539e-09_rb,3.22462e-09_rb,3.34779e-09_rb,3.47403e-09_rb, &
+      3.60419e-09_rb,3.73905e-09_rb,3.87658e-09_rb,4.01844e-09_rb,4.16535e-09_rb, &
+      4.31470e-09_rb,4.46880e-09_rb,4.62765e-09_rb,4.78970e-09_rb,4.95735e-09_rb, &
+      5.12890e-09_rb,5.30430e-09_rb,5.48595e-09_rb,5.67010e-09_rb,5.86145e-09_rb, &
+      6.05740e-09_rb,6.25725e-09_rb,6.46205e-09_rb,6.67130e-09_rb,6.88885e-09_rb, &
+      7.10845e-09_rb,7.33450e-09_rb,7.56700e-09_rb,7.80440e-09_rb,8.04465e-09_rb, &
+      8.29340e-09_rb,8.54820e-09_rb,8.80790e-09_rb,9.07195e-09_rb,9.34605e-09_rb, &
+      9.62005e-09_rb,9.90685e-09_rb,1.01939e-08_rb,1.04938e-08_rb,1.07957e-08_rb/)
+      totplnkderiv(151:181,14) = (/ &
+      1.11059e-08_rb,1.14208e-08_rb,1.17447e-08_rb,1.20717e-08_rb,1.24088e-08_rb, &
+      1.27490e-08_rb,1.31020e-08_rb,1.34601e-08_rb,1.38231e-08_rb,1.41966e-08_rb, &
+      1.45767e-08_rb,1.49570e-08_rb,1.53503e-08_rb,1.57496e-08_rb,1.61663e-08_rb, &
+      1.65784e-08_rb,1.70027e-08_rb,1.74290e-08_rb,1.78730e-08_rb,1.83235e-08_rb, &
+      1.87810e-08_rb,1.92418e-08_rb,1.97121e-08_rb,2.01899e-08_rb,2.05787e-08_rb, &
+      2.11784e-08_rb,2.16824e-08_rb,2.21931e-08_rb,2.27235e-08_rb,2.32526e-08_rb, &
+      2.37850e-08_rb/)
+      totplnkderiv(1:50,15) = (/ &
+      5.39905e-13_rb,6.11835e-13_rb,6.92224e-13_rb,7.81886e-13_rb,8.81851e-13_rb, &
+      9.93072e-13_rb,1.11659e-12_rb,1.25364e-12_rb,1.40562e-12_rb,1.57359e-12_rb, &
+      1.75937e-12_rb,1.96449e-12_rb,2.19026e-12_rb,2.43892e-12_rb,2.71249e-12_rb, &
+      3.01233e-12_rb,3.34163e-12_rb,3.70251e-12_rb,4.09728e-12_rb,4.52885e-12_rb, &
+      4.99939e-12_rb,5.51242e-12_rb,6.07256e-12_rb,6.68167e-12_rb,7.34274e-12_rb, &
+      8.06178e-12_rb,8.84185e-12_rb,9.68684e-12_rb,1.06020e-11_rb,1.15909e-11_rb, &
+      1.26610e-11_rb,1.38158e-11_rb,1.50620e-11_rb,1.64047e-11_rb,1.78508e-11_rb, &
+      1.94055e-11_rb,2.10805e-11_rb,2.28753e-11_rb,2.48000e-11_rb,2.68699e-11_rb, &
+      2.90824e-11_rb,3.14526e-11_rb,3.39882e-11_rb,3.67020e-11_rb,3.95914e-11_rb, &
+      4.26870e-11_rb,4.59824e-11_rb,4.94926e-11_rb,5.32302e-11_rb,5.72117e-11_rb/)
+      totplnkderiv(51:100,15) = (/ &
+      6.14475e-11_rb,6.59483e-11_rb,7.07393e-11_rb,7.57999e-11_rb,8.11980e-11_rb, &
+      8.68920e-11_rb,9.29390e-11_rb,9.93335e-11_rb,1.06101e-10_rb,1.13263e-10_rb, &
+      1.20827e-10_rb,1.28819e-10_rb,1.37255e-10_rb,1.46163e-10_rb,1.55547e-10_rb, &
+      1.65428e-10_rb,1.75837e-10_rb,1.86816e-10_rb,1.98337e-10_rb,2.10476e-10_rb, &
+      2.23218e-10_rb,2.36600e-10_rb,2.50651e-10_rb,2.65425e-10_rb,2.80895e-10_rb, &
+      2.97102e-10_rb,3.14100e-10_rb,3.31919e-10_rb,3.50568e-10_rb,3.70064e-10_rb, &
+      3.90464e-10_rb,4.11813e-10_rb,4.34111e-10_rb,4.57421e-10_rb,4.81717e-10_rb, &
+      5.07039e-10_rb,5.33569e-10_rb,5.61137e-10_rb,5.89975e-10_rb,6.19980e-10_rb, &
+      6.51170e-10_rb,6.83650e-10_rb,7.17520e-10_rb,7.52735e-10_rb,7.89390e-10_rb, &
+      8.27355e-10_rb,8.66945e-10_rb,9.08020e-10_rb,9.50665e-10_rb,9.95055e-10_rb/)
+      totplnkderiv(101:150,15) = (/ &
+      1.04101e-09_rb,1.08864e-09_rb,1.13823e-09_rb,1.18923e-09_rb,1.24257e-09_rb, &
+      1.29741e-09_rb,1.35442e-09_rb,1.41347e-09_rb,1.47447e-09_rb,1.53767e-09_rb, &
+      1.60322e-09_rb,1.67063e-09_rb,1.74033e-09_rb,1.81256e-09_rb,1.88704e-09_rb, &
+      1.96404e-09_rb,2.04329e-09_rb,2.12531e-09_rb,2.21032e-09_rb,2.29757e-09_rb, &
+      2.38739e-09_rb,2.48075e-09_rb,2.57628e-09_rb,2.67481e-09_rb,2.77627e-09_rb, &
+      2.88100e-09_rb,2.98862e-09_rb,3.09946e-09_rb,3.21390e-09_rb,3.33105e-09_rb, &
+      3.45185e-09_rb,3.57599e-09_rb,3.70370e-09_rb,3.83512e-09_rb,3.96909e-09_rb, &
+      4.10872e-09_rb,4.25070e-09_rb,4.39605e-09_rb,4.54670e-09_rb,4.70015e-09_rb, &
+      4.85850e-09_rb,5.02050e-09_rb,5.18655e-09_rb,5.35815e-09_rb,5.53180e-09_rb, &
+      5.71225e-09_rb,5.89495e-09_rb,6.08260e-09_rb,6.27485e-09_rb,6.47345e-09_rb/)
+      totplnkderiv(151:181,15) = (/ &
+      6.67520e-09_rb,6.88310e-09_rb,7.09400e-09_rb,7.31140e-09_rb,7.53350e-09_rb, &
+      7.76040e-09_rb,7.99215e-09_rb,8.22850e-09_rb,8.47235e-09_rb,8.71975e-09_rb, &
+      8.97360e-09_rb,9.23365e-09_rb,9.49950e-09_rb,9.76965e-09_rb,1.00441e-08_rb, &
+      1.03270e-08_rb,1.06158e-08_rb,1.09112e-08_rb,1.12111e-08_rb,1.15172e-08_rb, &
+      1.18263e-08_rb,1.21475e-08_rb,1.24735e-08_rb,1.28027e-08_rb,1.32023e-08_rb, &
+      1.34877e-08_rb,1.38399e-08_rb,1.42000e-08_rb,1.45625e-08_rb,1.49339e-08_rb, &
+      1.53156e-08_rb/)
+      totplnkderiv(1:50,16) = (/ &
+      4.38799e-14_rb,5.04835e-14_rb,5.79773e-14_rb,6.64627e-14_rb,7.60706e-14_rb, &
+      8.69213e-14_rb,9.91554e-14_rb,1.12932e-13_rb,1.28419e-13_rb,1.45809e-13_rb, &
+      1.65298e-13_rb,1.87109e-13_rb,2.11503e-13_rb,2.38724e-13_rb,2.69058e-13_rb, &
+      3.02878e-13_rb,3.40423e-13_rb,3.82128e-13_rb,4.28390e-13_rb,4.79625e-13_rb, &
+      5.36292e-13_rb,5.98933e-13_rb,6.68066e-13_rb,7.44216e-13_rb,8.28159e-13_rb, &
+      9.20431e-13_rb,1.02180e-12_rb,1.13307e-12_rb,1.25504e-12_rb,1.38863e-12_rb, &
+      1.53481e-12_rb,1.69447e-12_rb,1.86896e-12_rb,2.05903e-12_rb,2.26637e-12_rb, &
+      2.49193e-12_rb,2.73736e-12_rb,3.00416e-12_rb,3.29393e-12_rb,3.60781e-12_rb, &
+      3.94805e-12_rb,4.31675e-12_rb,4.71543e-12_rb,5.14627e-12_rb,5.61226e-12_rb, &
+      6.11456e-12_rb,6.65585e-12_rb,7.23969e-12_rb,7.86811e-12_rb,8.54456e-12_rb/)
+      totplnkderiv(51:100,16) = (/ &
+      9.27075e-12_rb,1.00516e-11_rb,1.08898e-11_rb,1.17884e-11_rb,1.27514e-11_rb, &
+      1.37839e-11_rb,1.48893e-11_rb,1.60716e-11_rb,1.73333e-11_rb,1.86849e-11_rb, &
+      2.01237e-11_rb,2.16610e-11_rb,2.33001e-11_rb,2.50440e-11_rb,2.69035e-11_rb, &
+      2.88827e-11_rb,3.09881e-11_rb,3.32234e-11_rb,3.55981e-11_rb,3.81193e-11_rb, &
+      4.07946e-11_rb,4.36376e-11_rb,4.66485e-11_rb,4.98318e-11_rb,5.32080e-11_rb, &
+      5.67754e-11_rb,6.05524e-11_rb,6.45450e-11_rb,6.87639e-11_rb,7.32160e-11_rb, &
+      7.79170e-11_rb,8.28780e-11_rb,8.81045e-11_rb,9.36200e-11_rb,9.94280e-11_rb, &
+      1.05545e-10_rb,1.11982e-10_rb,1.18752e-10_rb,1.25866e-10_rb,1.33350e-10_rb, &
+      1.41210e-10_rb,1.49469e-10_rb,1.58143e-10_rb,1.67233e-10_rb,1.76760e-10_rb, &
+      1.86758e-10_rb,1.97236e-10_rb,2.08227e-10_rb,2.19723e-10_rb,2.31737e-10_rb/)
+      totplnkderiv(101:150,16) = (/ &
+      2.44329e-10_rb,2.57503e-10_rb,2.71267e-10_rb,2.85647e-10_rb,3.00706e-10_rb, &
+      3.16391e-10_rb,3.32807e-10_rb,3.49887e-10_rb,3.67748e-10_rb,3.86369e-10_rb, &
+      4.05746e-10_rb,4.25984e-10_rb,4.47060e-10_rb,4.68993e-10_rb,4.91860e-10_rb, &
+      5.15601e-10_rb,5.40365e-10_rb,5.66085e-10_rb,5.92855e-10_rb,6.20640e-10_rb, &
+      6.49605e-10_rb,6.79585e-10_rb,7.10710e-10_rb,7.43145e-10_rb,7.76805e-10_rb, &
+      8.11625e-10_rb,8.47800e-10_rb,8.85300e-10_rb,9.24220e-10_rb,9.64550e-10_rb, &
+      1.00623e-09_rb,1.04957e-09_rb,1.09429e-09_rb,1.14079e-09_rb,1.18882e-09_rb, &
+      1.23848e-09_rb,1.28986e-09_rb,1.34301e-09_rb,1.39796e-09_rb,1.45493e-09_rb, &
+      1.51372e-09_rb,1.57440e-09_rb,1.63702e-09_rb,1.70173e-09_rb,1.76874e-09_rb, &
+      1.83753e-09_rb,1.90898e-09_rb,1.98250e-09_rb,2.05836e-09_rb,2.13646e-09_rb/)
+      totplnkderiv(151:181,16) = (/ &
+      2.21710e-09_rb,2.30027e-09_rb,2.38591e-09_rb,2.47432e-09_rb,2.56503e-09_rb, &
+      2.65878e-09_rb,2.75516e-09_rb,2.85432e-09_rb,2.95688e-09_rb,3.06201e-09_rb, &
+      3.17023e-09_rb,3.28153e-09_rb,3.39604e-09_rb,3.51391e-09_rb,3.63517e-09_rb, &
+      3.75955e-09_rb,3.88756e-09_rb,4.01880e-09_rb,4.15405e-09_rb,4.29255e-09_rb, &
+      4.43535e-09_rb,4.58145e-09_rb,4.73165e-09_rb,4.88560e-09_rb,5.04390e-09_rb, &
+      5.20630e-09_rb,5.37255e-09_rb,5.54355e-09_rb,5.71915e-09_rb,5.89855e-09_rb, &
+      6.08280e-09_rb/)
+      totplk16deriv(1:50) = (/ &
+      4.35811e-14_rb,5.01270e-14_rb,5.75531e-14_rb,6.59588e-14_rb,7.54735e-14_rb, &
+      8.62147e-14_rb,9.83225e-14_rb,1.11951e-13_rb,1.27266e-13_rb,1.44456e-13_rb, &
+      1.63715e-13_rb,1.85257e-13_rb,2.09343e-13_rb,2.36209e-13_rb,2.66136e-13_rb, &
+      2.99486e-13_rb,3.36493e-13_rb,3.77582e-13_rb,4.23146e-13_rb,4.73578e-13_rb, &
+      5.29332e-13_rb,5.90936e-13_rb,6.58891e-13_rb,7.33710e-13_rb,8.16135e-13_rb, &
+      9.06705e-13_rb,1.00614e-12_rb,1.11524e-12_rb,1.23477e-12_rb,1.36561e-12_rb, &
+      1.50871e-12_rb,1.66488e-12_rb,1.83552e-12_rb,2.02123e-12_rb,2.22375e-12_rb, &
+      2.44389e-12_rb,2.68329e-12_rb,2.94338e-12_rb,3.22570e-12_rb,3.53129e-12_rb, &
+      3.86236e-12_rb,4.22086e-12_rb,4.60827e-12_rb,5.02666e-12_rb,5.47890e-12_rb, &
+      5.96595e-12_rb,6.49057e-12_rb,7.05592e-12_rb,7.66401e-12_rb,8.31821e-12_rb/)
+      totplk16deriv(51:100) = (/ &
+      9.01998e-12_rb,9.77390e-12_rb,1.05826e-11_rb,1.14491e-11_rb,1.23769e-11_rb, &
+      1.33709e-11_rb,1.44341e-11_rb,1.55706e-11_rb,1.67821e-11_rb,1.80793e-11_rb, &
+      1.94586e-11_rb,2.09316e-11_rb,2.25007e-11_rb,2.41685e-11_rb,2.59454e-11_rb, &
+      2.78356e-11_rb,2.98440e-11_rb,3.19744e-11_rb,3.42355e-11_rb,3.66340e-11_rb, &
+      3.91772e-11_rb,4.18773e-11_rb,4.47339e-11_rb,4.77509e-11_rb,5.09490e-11_rb, &
+      5.43240e-11_rb,5.78943e-11_rb,6.16648e-11_rb,6.56445e-11_rb,6.98412e-11_rb, &
+      7.42680e-11_rb,7.89335e-11_rb,8.38450e-11_rb,8.90220e-11_rb,9.44695e-11_rb, &
+      1.00197e-10_rb,1.06221e-10_rb,1.12550e-10_rb,1.19193e-10_rb,1.26175e-10_rb, &
+      1.33498e-10_rb,1.41188e-10_rb,1.49251e-10_rb,1.57693e-10_rb,1.66530e-10_rb, &
+      1.75798e-10_rb,1.85495e-10_rb,1.95661e-10_rb,2.06275e-10_rb,2.17357e-10_rb/)
+      totplk16deriv(101:150) = (/ &
+      2.28959e-10_rb,2.41085e-10_rb,2.53739e-10_rb,2.66944e-10_rb,2.80755e-10_rb, &
+      2.95121e-10_rb,3.10141e-10_rb,3.25748e-10_rb,3.42057e-10_rb,3.59026e-10_rb, &
+      3.76668e-10_rb,3.95066e-10_rb,4.14211e-10_rb,4.34111e-10_rb,4.54818e-10_rb, &
+      4.76295e-10_rb,4.98681e-10_rb,5.21884e-10_rb,5.46000e-10_rb,5.71015e-10_rb, &
+      5.97065e-10_rb,6.23965e-10_rb,6.51865e-10_rb,6.80905e-10_rb,7.11005e-10_rb, &
+      7.42100e-10_rb,7.74350e-10_rb,8.07745e-10_rb,8.42355e-10_rb,8.78185e-10_rb, &
+      9.15130e-10_rb,9.53520e-10_rb,9.93075e-10_rb,1.03415e-09_rb,1.07649e-09_rb, &
+      1.12021e-09_rb,1.16539e-09_rb,1.21207e-09_rb,1.26025e-09_rb,1.31014e-09_rb, &
+      1.36156e-09_rb,1.41453e-09_rb,1.46909e-09_rb,1.52540e-09_rb,1.58368e-09_rb, &
+      1.64334e-09_rb,1.70527e-09_rb,1.76888e-09_rb,1.83442e-09_rb,1.90182e-09_rb/)
+      totplk16deriv(151:181) = (/ &
+      1.97128e-09_rb,2.04281e-09_rb,2.11635e-09_rb,2.19219e-09_rb,2.26979e-09_rb, &
+      2.34989e-09_rb,2.43219e-09_rb,2.51660e-09_rb,2.60396e-09_rb,2.69317e-09_rb, &
+      2.78501e-09_rb,2.87927e-09_rb,2.97600e-09_rb,3.07548e-09_rb,3.17772e-09_rb, &
+      3.28235e-09_rb,3.38982e-09_rb,3.49985e-09_rb,3.61307e-09_rb,3.72883e-09_rb, &
+      3.84805e-09_rb,3.96975e-09_rb,4.09465e-09_rb,4.22240e-09_rb,4.35370e-09_rb, &
+      4.48800e-09_rb,4.62535e-09_rb,4.76640e-09_rb,4.91110e-09_rb,5.05850e-09_rb, &
+      5.20965e-09_rb/)
+
+      end subroutine lwavplankderiv
+
+      end module rrtmg_lw_setcoef
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_taumol.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_taumol.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_lw_taumol.f90	(revision 3477)
@@ -0,0 +1,3150 @@
+!     path:      $Source: /storm/rc1/cvsroot/rc/rrtmg_lw/src/rrtmg_lw_taumol.f90,v $
+!     author:    $Author: miacono $
+!     revision:  $Revision: 1.8 $
+!     created:   $Date: 2011/04/08 20:25:01 $
+!
+      module rrtmg_lw_taumol
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb 
+      use parrrtm, only : mg, nbndlw, maxxsec, ngptlw
+      use rrlw_con, only: oneminus
+      use rrlw_wvn, only: nspa, nspb
+      use rrlw_vsn, only: hvrtau, hnamtau
+
+      implicit none
+
+      contains
+
+!----------------------------------------------------------------------------
+      subroutine taumol(nlayers, pavel, wx, coldry, &
+                        laytrop, jp, jt, jt1, planklay, planklev, plankbnd, &
+                        colh2o, colco2, colo3, coln2o, colco, colch4, colo2, &
+                        colbrd, fac00, fac01, fac10, fac11, &
+                        rat_h2oco2, rat_h2oco2_1, rat_h2oo3, rat_h2oo3_1, &
+                        rat_h2on2o, rat_h2on2o_1, rat_h2och4, rat_h2och4_1, &
+                        rat_n2oco2, rat_n2oco2_1, rat_o3co2, rat_o3co2_1, &
+                        selffac, selffrac, indself, forfac, forfrac, indfor, &
+                        minorfrac, scaleminor, scaleminorn2, indminor, &
+                        fracs, taug)
+!----------------------------------------------------------------------------
+
+! *******************************************************************************
+! *                                                                             *
+! *                  Optical depths developed for the                           *
+! *                                                                             *
+! *                RAPID RADIATIVE TRANSFER MODEL (RRTM)                        *
+! *                                                                             *
+! *                                                                             *
+! *            ATMOSPHERIC AND ENVIRONMENTAL RESEARCH, INC.                     *
+! *                        131 HARTWELL AVENUE                                  *
+! *                        LEXINGTON, MA 02421                                  *
+! *                                                                             *
+! *                                                                             *
+! *                           ELI J. MLAWER                                     * 
+! *                         JENNIFER DELAMERE                                   * 
+! *                         STEVEN J. TAUBMAN                                   *
+! *                         SHEPARD A. CLOUGH                                   *
+! *                                                                             *
+! *                                                                             *
+! *                                                                             *
+! *                                                                             *
+! *                       email:  mlawer@aer.com                                *
+! *                       email:  jdelamer@aer.com                              *
+! *                                                                             *
+! *        The authors wish to acknowledge the contributions of the             *
+! *        following people:  Karen Cady-Pereira, Patrick D. Brown,             *  
+! *        Michael J. Iacono, Ronald E. Farren, Luke Chen, Robert Bergstrom.    *
+! *                                                                             *
+! *******************************************************************************
+! *                                                                             *
+! *  Revision for g-point reduction: Michael J. Iacono, AER, Inc.               *
+! *                                                                             *
+! *******************************************************************************
+! *     TAUMOL                                                                  *
+! *                                                                             *
+! *     This file contains the subroutines TAUGBn (where n goes from            *
+! *     1 to 16).  TAUGBn calculates the optical depths and Planck fractions    *
+! *     per g-value and layer for band n.                                       *
+! *                                                                             *
+! *  Output:  optical depths (unitless)                                         *
+! *           fractions needed to compute Planck functions at every layer       *
+! *               and g-value                                                   *
+! *                                                                             *
+! *     COMMON /TAUGCOM/  TAUG(MXLAY,MG)                                        *
+! *     COMMON /PLANKG/   FRACS(MXLAY,MG)                                       *
+! *                                                                             *
+! *  Input                                                                      *
+! *                                                                             *
+! *     COMMON /FEATURES/ NG(NBANDS),NSPA(NBANDS),NSPB(NBANDS)                  *
+! *     COMMON /PRECISE/  ONEMINUS                                              *
+! *     COMMON /PROFILE/  NLAYERS,PAVEL(MXLAY),TAVEL(MXLAY),                    *
+! *     &                 PZ(0:MXLAY),TZ(0:MXLAY)                               *
+! *     COMMON /PROFDATA/ LAYTROP,                                              *
+! *    &                  COLH2O(MXLAY),COLCO2(MXLAY),COLO3(MXLAY),             *
+! *    &                  COLN2O(MXLAY),COLCO(MXLAY),COLCH4(MXLAY),             *
+! *    &                  COLO2(MXLAY)
+! *     COMMON /INTFAC/   FAC00(MXLAY),FAC01(MXLAY),                            *
+! *    &                  FAC10(MXLAY),FAC11(MXLAY)                             *
+! *     COMMON /INTIND/   JP(MXLAY),JT(MXLAY),JT1(MXLAY)                        *
+! *     COMMON /SELF/     SELFFAC(MXLAY), SELFFRAC(MXLAY), INDSELF(MXLAY)       *
+! *                                                                             *
+! *     Description:                                                            *
+! *     NG(IBAND) - number of g-values in band IBAND                            *
+! *     NSPA(IBAND) - for the lower atmosphere, the number of reference         *
+! *                   atmospheres that are stored for band IBAND per            *
+! *                   pressure level and temperature.  Each of these            *
+! *                   atmospheres has different relative amounts of the         *
+! *                   key species for the band (i.e. different binary           *
+! *                   species parameters).                                      *
+! *     NSPB(IBAND) - same for upper atmosphere                                 *
+! *     ONEMINUS - since problems are caused in some cases by interpolation     *
+! *                parameters equal to or greater than 1, for these cases       *
+! *                these parameters are set to this value, slightly < 1.        *
+! *     PAVEL - layer pressures (mb)                                            *
+! *     TAVEL - layer temperatures (degrees K)                                  *
+! *     PZ - level pressures (mb)                                               *
+! *     TZ - level temperatures (degrees K)                                     *
+! *     LAYTROP - layer at which switch is made from one combination of         *
+! *               key species to another                                        *
+! *     COLH2O, COLCO2, COLO3, COLN2O, COLCH4 - column amounts of water         *
+! *               vapor,carbon dioxide, ozone, nitrous ozide, methane,          *
+! *               respectively (molecules/cm**2)                                *
+! *     FACij(LAY) - for layer LAY, these are factors that are needed to        *
+! *                  compute the interpolation factors that multiply the        *
+! *                  appropriate reference k-values.  A value of 0 (1) for      *
+! *                  i,j indicates that the corresponding factor multiplies     *
+! *                  reference k-value for the lower (higher) of the two        *
+! *                  appropriate temperatures, and altitudes, respectively.     *
+! *     JP - the index of the lower (in altitude) of the two appropriate        *
+! *          reference pressure levels needed for interpolation                 *
+! *     JT, JT1 - the indices of the lower of the two appropriate reference     *
+! *               temperatures needed for interpolation (for pressure           *
+! *               levels JP and JP+1, respectively)                             *
+! *     SELFFAC - scale factor needed for water vapor self-continuum, equals    *
+! *               (water vapor density)/(atmospheric density at 296K and        *
+! *               1013 mb)                                                      *
+! *     SELFFRAC - factor needed for temperature interpolation of reference     *
+! *                water vapor self-continuum data                              *
+! *     INDSELF - index of the lower of the two appropriate reference           *
+! *               temperatures needed for the self-continuum interpolation      *
+! *     FORFAC  - scale factor needed for water vapor foreign-continuum.        *
+! *     FORFRAC - factor needed for temperature interpolation of reference      *
+! *                water vapor foreign-continuum data                           *
+! *     INDFOR  - index of the lower of the two appropriate reference           *
+! *               temperatures needed for the foreign-continuum interpolation   *
+! *                                                                             *
+! *  Data input                                                                 *
+! *     COMMON /Kn/ KA(NSPA(n),5,13,MG), KB(NSPB(n),5,13:59,MG), SELFREF(10,MG),*
+! *                 FORREF(4,MG), KA_M'MGAS', KB_M'MGAS'                        *
+! *        (note:  n is the band number,'MGAS' is the species name of the minor *
+! *         gas)                                                                *
+! *                                                                             *
+! *     Description:                                                            *
+! *     KA - k-values for low reference atmospheres (key-species only)          *
+! *          (units: cm**2/molecule)                                            *
+! *     KB - k-values for high reference atmospheres (key-species only)         *
+! *          (units: cm**2/molecule)                                            *
+! *     KA_M'MGAS' - k-values for low reference atmosphere minor species        *
+! *          (units: cm**2/molecule)                                            *
+! *     KB_M'MGAS' - k-values for high reference atmosphere minor species       *
+! *          (units: cm**2/molecule)                                            *
+! *     SELFREF - k-values for water vapor self-continuum for reference         *
+! *               atmospheres (used below LAYTROP)                              *
+! *               (units: cm**2/molecule)                                       *
+! *     FORREF  - k-values for water vapor foreign-continuum for reference      *
+! *               atmospheres (used below/above LAYTROP)                        *
+! *               (units: cm**2/molecule)                                       *
+! *                                                                             *
+! *     DIMENSION ABSA(65*NSPA(n),MG), ABSB(235*NSPB(n),MG)                     *
+! *     EQUIVALENCE (KA,ABSA),(KB,ABSB)                                         *
+! *                                                                             *
+!*******************************************************************************
+
+! ------- Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      real(kind=rb), intent(in) :: pavel(:)           ! layer pressures (mb) 
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: wx(:,:)            ! cross-section amounts (mol/cm2)
+                                                      !    Dimensions: (maxxsec,nlayers)
+      real(kind=rb), intent(in) :: coldry(:)          ! column amount (dry air)
+                                                      !    Dimensions: (nlayers)
+
+      integer(kind=im), intent(in) :: laytrop         ! tropopause layer index
+      integer(kind=im), intent(in) :: jp(:)           ! 
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt(:)           !
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt1(:)          !
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: planklay(:,:)      ! 
+                                                      !    Dimensions: (nlayers,nbndlw)
+      real(kind=rb), intent(in) :: planklev(0:,:)     ! 
+                                                      !    Dimensions: (nlayers,nbndlw)
+      real(kind=rb), intent(in) :: plankbnd(:)        ! 
+                                                      !    Dimensions: (nbndlw)
+
+      real(kind=rb), intent(in) :: colh2o(:)          ! column amount (h2o)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colco2(:)          ! column amount (co2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo3(:)           ! column amount (o3)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: coln2o(:)          ! column amount (n2o)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colco(:)           ! column amount (co)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colch4(:)          ! column amount (ch4)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo2(:)           ! column amount (o2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colbrd(:)          ! column amount (broadening gases)
+                                                      !    Dimensions: (nlayers)
+
+      integer(kind=im), intent(in) :: indself(:)
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: indfor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffrac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: forfac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: forfrac(:)
+                                                      !    Dimensions: (nlayers)
+
+      integer(kind=im), intent(in) :: indminor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: minorfrac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: scaleminor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: scaleminorn2(:)
+                                                      !    Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: &                  !
+                       fac00(:), fac01(:), &          !    Dimensions: (nlayers)
+                       fac10(:), fac11(:) 
+      real(kind=rb), intent(in) :: &                  !
+                       rat_h2oco2(:),rat_h2oco2_1(:), &
+                       rat_h2oo3(:),rat_h2oo3_1(:), & !    Dimensions: (nlayers)
+                       rat_h2on2o(:),rat_h2on2o_1(:), &
+                       rat_h2och4(:),rat_h2och4_1(:), &
+                       rat_n2oco2(:),rat_n2oco2_1(:), &
+                       rat_o3co2(:),rat_o3co2_1(:)
+
+! ----- Output -----
+      real(kind=rb), intent(out) :: fracs(:,:)        ! planck fractions
+                                                      !    Dimensions: (nlayers,ngptlw)
+      real(kind=rb), intent(out) :: taug(:,:)         ! gaseous optical depth 
+                                                      !    Dimensions: (nlayers,ngptlw)
+
+      hvrtau = '$Revision: 1.8 $'
+
+! Calculate gaseous optical depth and planck fractions for each spectral band.
+
+      call taugb1
+      call taugb2
+      call taugb3
+      call taugb4
+      call taugb5
+      call taugb6
+      call taugb7
+      call taugb8
+      call taugb9
+      call taugb10
+      call taugb11
+      call taugb12
+      call taugb13
+      call taugb14
+      call taugb15
+      call taugb16
+
+      contains
+
+!----------------------------------------------------------------------------
+      subroutine taugb1
+!----------------------------------------------------------------------------
+
+! ------- Modifications -------
+!  Written by Eli J. Mlawer, Atmospheric & Environmental Research.
+!  Revised by Michael J. Iacono, Atmospheric & Environmental Research.
+!
+!     band 1:  10-350 cm-1 (low key - h2o; low minor - n2)
+!                          (high key - h2o; high minor - n2)
+!
+!     note: previous versions of rrtm band 1: 
+!           10-250 cm-1 (low - h2o; high - h2o)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng1
+      use rrlw_kg01, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mn2, kb_mn2, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      real(kind=rb) :: pp, corradj, scalen2, tauself, taufor, taun2
+
+
+! Minor gas mapping levels:
+!     lower - n2, p = 142.5490 mbar, t = 215.70 k
+!     upper - n2, p = 142.5490 mbar, t = 215.70 k
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature.  Below laytrop, the water vapor self-continuum and
+! foreign continuum is interpolated (in temperature) separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(1) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(1) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+         pp = pavel(lay)
+         corradj =  1.
+         if (pp .lt. 250._rb) then
+            corradj = 1._rb - 0.15_rb * (250._rb-pp) / 154.4_rb
+         endif
+
+         scalen2 = colbrd(lay) * scaleminorn2(lay)
+         do ig = 1, ng1
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) -  forref(indf,ig))) 
+            taun2 = scalen2*(ka_mn2(indm,ig) + & 
+                 minorfrac(lay) * (ka_mn2(indm+1,ig) - ka_mn2(indm,ig)))
+            taug(lay,ig) = corradj * (colh2o(lay) * &
+                (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) & 
+                 + tauself + taufor + taun2)
+             fracs(lay,ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(1) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(1) + 1
+         indf = indfor(lay)
+         indm = indminor(lay)
+         pp = pavel(lay)
+         corradj =  1._rb - 0.15_rb * (pp / 95.6_rb)
+
+         scalen2 = colbrd(lay) * scaleminorn2(lay)
+         do ig = 1, ng1
+            taufor = forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * (forref(indf+1,ig) - forref(indf,ig))) 
+            taun2 = scalen2*(kb_mn2(indm,ig) + & 
+                 minorfrac(lay) * (kb_mn2(indm+1,ig) - kb_mn2(indm,ig)))
+            taug(lay,ig) = corradj * (colh2o(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) &  
+                 + taufor + taun2)
+            fracs(lay,ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb1
+
+!----------------------------------------------------------------------------
+      subroutine taugb2
+!----------------------------------------------------------------------------
+!
+!     band 2:  350-500 cm-1 (low key - h2o; high key - h2o)
+!
+!     note: previous version of rrtm band 2: 
+!           250 - 500 cm-1 (low - h2o; high - h2o)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng2, ngs1
+      use rrlw_kg02, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, ig
+      real(kind=rb) :: pp, corradj, tauself, taufor
+
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature.  Below laytrop, the water vapor self-continuum and
+! foreign continuum is interpolated (in temperature) separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(2) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(2) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         pp = pavel(lay)
+         corradj = 1._rb - .05_rb * (pp - 100._rb) / 900._rb
+         do ig = 1, ng2
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            taug(lay,ngs1+ig) = corradj * (colh2o(lay) * &
+                (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) &
+                 + tauself + taufor)
+            fracs(lay,ngs1+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(2) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(2) + 1
+         indf = indfor(lay)
+         do ig = 1, ng2
+            taufor =  forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * (forref(indf+1,ig) - forref(indf,ig))) 
+            taug(lay,ngs1+ig) = colh2o(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) &
+                 + taufor
+            fracs(lay,ngs1+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb2
+
+!----------------------------------------------------------------------------
+      subroutine taugb3
+!----------------------------------------------------------------------------
+!
+!     band 3:  500-630 cm-1 (low key - h2o,co2; low minor - n2o)
+!                           (high key - h2o,co2; high minor - n2o)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng3, ngs2
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg03, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mn2o, kb_mn2o, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      integer(kind=im) :: js, js1, jmn2o, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_mn2o, specparm_mn2o, specmult_mn2o, &
+                       fmn2o, fmn2omf, chi_n2o, ratn2o, adjfac, adjcoln2o
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor, n2om1, n2om2, absn2o
+      real(kind=rb) :: refrat_planck_a, refrat_planck_b, refrat_m_a, refrat_m_b
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Minor gas mapping levels:
+!     lower - n2o, p = 706.272 mbar, t = 278.94 k
+!     upper - n2o, p = 95.58 mbar, t = 215.7 k
+
+!  P = 212.725 mb
+      refrat_planck_a = chi_mls(1,9)/chi_mls(2,9)
+
+!  P = 95.58 mb
+      refrat_planck_b = chi_mls(1,13)/chi_mls(2,13)
+
+!  P = 706.270mb
+      refrat_m_a = chi_mls(1,3)/chi_mls(2,3)
+
+!  P = 95.58 mb 
+      refrat_m_b = chi_mls(1,13)/chi_mls(2,13)
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature, and appropriate species.  Below laytrop, the water vapor 
+! self-continuum and foreign continuum is interpolated (in temperature) 
+! separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2oco2(lay)*colco2(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)        
+
+         speccomb1 = colh2o(lay) + rat_h2oco2_1(lay)*colco2(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_mn2o = colh2o(lay) + refrat_m_a*colco2(lay)
+         specparm_mn2o = colh2o(lay)/speccomb_mn2o
+         if (specparm_mn2o .ge. oneminus) specparm_mn2o = oneminus
+         specmult_mn2o = 8._rb*specparm_mn2o
+         jmn2o = 1 + int(specmult_mn2o)
+         fmn2o = mod(specmult_mn2o,1.0_rb)
+         fmn2omf = minorfrac(lay)*fmn2o
+!  In atmospheres where the amount of N2O is too great to be considered
+!  a minor species, adjust the column amount of N2O by an empirical factor 
+!  to obtain the proper contribution.
+         chi_n2o = coln2o(lay)/coldry(lay)
+         ratn2o = 1.e20_rb*chi_n2o/chi_mls(4,jp(lay)+1)
+         if (ratn2o .gt. 1.5_rb) then
+            adjfac = 0.5_rb+(ratn2o-0.5_rb)**0.65_rb
+            adjcoln2o = adjfac*chi_mls(4,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcoln2o = coln2o(lay)
+         endif
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colco2(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(3) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(3) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng3
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            n2om1 = ka_mn2o(jmn2o,indm,ig) + fmn2o * &
+                 (ka_mn2o(jmn2o+1,indm,ig) - ka_mn2o(jmn2o,indm,ig))
+            n2om2 = ka_mn2o(jmn2o,indm+1,ig) + fmn2o * &
+                 (ka_mn2o(jmn2o+1,indm+1,ig) - ka_mn2o(jmn2o,indm+1,ig))
+            absn2o = n2om1 + minorfrac(lay) * (n2om2 - n2om1)
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) +  &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs2+ig) = tau_major + tau_major1 &
+                 + tauself + taufor &
+                 + adjcoln2o*absn2o
+            fracs(lay,ngs2+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+         speccomb = colh2o(lay) + rat_h2oco2(lay)*colco2(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 4._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2oco2_1(lay)*colco2(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 4._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs1) * fac01(lay)
+         fac011 = (1._rb - fs1) * fac11(lay)
+         fac101 = fs1 * fac01(lay)
+         fac111 = fs1 * fac11(lay)
+
+         speccomb_mn2o = colh2o(lay) + refrat_m_b*colco2(lay)
+         specparm_mn2o = colh2o(lay)/speccomb_mn2o
+         if (specparm_mn2o .ge. oneminus) specparm_mn2o = oneminus
+         specmult_mn2o = 4._rb*specparm_mn2o
+         jmn2o = 1 + int(specmult_mn2o)
+         fmn2o = mod(specmult_mn2o,1.0_rb)
+         fmn2omf = minorfrac(lay)*fmn2o
+!  In atmospheres where the amount of N2O is too great to be considered
+!  a minor species, adjust the column amount of N2O by an empirical factor 
+!  to obtain the proper contribution.
+         chi_n2o = coln2o(lay)/coldry(lay)
+         ratn2o = 1.e20*chi_n2o/chi_mls(4,jp(lay)+1)
+         if (ratn2o .gt. 1.5_rb) then
+            adjfac = 0.5_rb+(ratn2o-0.5_rb)**0.65_rb
+            adjcoln2o = adjfac*chi_mls(4,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcoln2o = coln2o(lay)
+         endif
+
+         speccomb_planck = colh2o(lay)+refrat_planck_b*colco2(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 4._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(3) + js
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(3) + js1
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         do ig = 1, ng3
+            taufor = forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * (forref(indf+1,ig) - forref(indf,ig))) 
+            n2om1 = kb_mn2o(jmn2o,indm,ig) + fmn2o * &
+                 (kb_mn2o(jmn2o+1,indm,ig)-kb_mn2o(jmn2o,indm,ig))
+            n2om2 = kb_mn2o(jmn2o,indm+1,ig) + fmn2o * &
+                 (kb_mn2o(jmn2o+1,indm+1,ig)-kb_mn2o(jmn2o,indm+1,ig))
+            absn2o = n2om1 + minorfrac(lay) * (n2om2 - n2om1)
+            taug(lay,ngs2+ig) = speccomb * &
+                (fac000 * absb(ind0,ig) + &
+                fac100 * absb(ind0+1,ig) + &
+                fac010 * absb(ind0+5,ig) + &
+                fac110 * absb(ind0+6,ig)) &
+                + speccomb1 * &
+                (fac001 * absb(ind1,ig) +  &
+                fac101 * absb(ind1+1,ig) + &
+                fac011 * absb(ind1+5,ig) + &
+                fac111 * absb(ind1+6,ig))  &
+                + taufor &
+                + adjcoln2o*absn2o
+            fracs(lay,ngs2+ig) = fracrefb(ig,jpl) + fpl * &
+                (fracrefb(ig,jpl+1)-fracrefb(ig,jpl))
+         enddo
+      enddo
+
+      end subroutine taugb3
+
+!----------------------------------------------------------------------------
+      subroutine taugb4
+!----------------------------------------------------------------------------
+!
+!     band 4:  630-700 cm-1 (low key - h2o,co2; high key - o3,co2)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng4, ngs3
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg04, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, ig
+      integer(kind=im) :: js, js1, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor
+      real(kind=rb) :: refrat_planck_a, refrat_planck_b
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! P =   142.5940 mb
+      refrat_planck_a = chi_mls(1,11)/chi_mls(2,11)
+
+! P = 95.58350 mb
+      refrat_planck_b = chi_mls(3,13)/chi_mls(2,13)
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature, and appropriate species.  Below laytrop, the water 
+! vapor self-continuum and foreign continuum is interpolated (in temperature) 
+! separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2oco2(lay)*colco2(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2oco2_1(lay)*colco2(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colco2(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(4) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(4) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng4
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) +  &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs3+ig) = tau_major + tau_major1 &
+                 + tauself + taufor
+            fracs(lay,ngs3+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+         speccomb = colo3(lay) + rat_o3co2(lay)*colco2(lay)
+         specparm = colo3(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 4._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colo3(lay) + rat_o3co2_1(lay)*colco2(lay)
+         specparm1 = colo3(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 4._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs1) * fac01(lay)
+         fac011 = (1._rb - fs1) * fac11(lay)
+         fac101 = fs1 * fac01(lay)
+         fac111 = fs1 * fac11(lay)
+
+         speccomb_planck = colo3(lay)+refrat_planck_b*colco2(lay)
+         specparm_planck = colo3(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 4._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(4) + js
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(4) + js1
+
+         do ig = 1, ng4
+            taug(lay,ngs3+ig) =  speccomb * &
+                (fac000 * absb(ind0,ig) + &
+                fac100 * absb(ind0+1,ig) + &
+                fac010 * absb(ind0+5,ig) + &
+                fac110 * absb(ind0+6,ig)) &
+                + speccomb1 * &
+                (fac001 * absb(ind1,ig) +  &
+                fac101 * absb(ind1+1,ig) + &
+                fac011 * absb(ind1+5,ig) + &
+                fac111 * absb(ind1+6,ig))
+            fracs(lay,ngs3+ig) = fracrefb(ig,jpl) + fpl * &
+                (fracrefb(ig,jpl+1)-fracrefb(ig,jpl))
+         enddo
+
+! Empirical modification to code to improve stratospheric cooling rates
+! for co2.  Revised to apply weighting for g-point reduction in this band.
+
+         taug(lay,ngs3+8)=taug(lay,ngs3+8)*0.92
+         taug(lay,ngs3+9)=taug(lay,ngs3+9)*0.88
+         taug(lay,ngs3+10)=taug(lay,ngs3+10)*1.07
+         taug(lay,ngs3+11)=taug(lay,ngs3+11)*1.1
+         taug(lay,ngs3+12)=taug(lay,ngs3+12)*0.99
+         taug(lay,ngs3+13)=taug(lay,ngs3+13)*0.88
+         taug(lay,ngs3+14)=taug(lay,ngs3+14)*0.943
+
+      enddo
+
+      end subroutine taugb4
+
+!----------------------------------------------------------------------------
+      subroutine taugb5
+!----------------------------------------------------------------------------
+!
+!     band 5:  700-820 cm-1 (low key - h2o,co2; low minor - o3, ccl4)
+!                           (high key - o3,co2)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng5, ngs4
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg05, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mo3, selfref, forref, ccl4
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      integer(kind=im) :: js, js1, jmo3, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_mo3, specparm_mo3, specmult_mo3, fmo3
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor, o3m1, o3m2, abso3
+      real(kind=rb) :: refrat_planck_a, refrat_planck_b, refrat_m_a
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Minor gas mapping level :
+!     lower - o3, p = 317.34 mbar, t = 240.77 k
+!     lower - ccl4
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower/upper atmosphere.
+
+! P = 473.420 mb
+      refrat_planck_a = chi_mls(1,5)/chi_mls(2,5)
+
+! P = 0.2369 mb
+      refrat_planck_b = chi_mls(3,43)/chi_mls(2,43)
+
+! P = 317.3480
+      refrat_m_a = chi_mls(1,7)/chi_mls(2,7)
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature, and appropriate species.  Below laytrop, the 
+! water vapor self-continuum and foreign continuum is 
+! interpolated (in temperature) separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2oco2(lay)*colco2(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2oco2_1(lay)*colco2(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_mo3 = colh2o(lay) + refrat_m_a*colco2(lay)
+         specparm_mo3 = colh2o(lay)/speccomb_mo3
+         if (specparm_mo3 .ge. oneminus) specparm_mo3 = oneminus
+         specmult_mo3 = 8._rb*specparm_mo3
+         jmo3 = 1 + int(specmult_mo3)
+         fmo3 = mod(specmult_mo3,1.0_rb)
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colco2(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(5) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(5) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng5
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            o3m1 = ka_mo3(jmo3,indm,ig) + fmo3 * &
+                 (ka_mo3(jmo3+1,indm,ig)-ka_mo3(jmo3,indm,ig))
+            o3m2 = ka_mo3(jmo3,indm+1,ig) + fmo3 * &
+                 (ka_mo3(jmo3+1,indm+1,ig)-ka_mo3(jmo3,indm+1,ig))
+            abso3 = o3m1 + minorfrac(lay)*(o3m2-o3m1)
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * & 
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs4+ig) = tau_major + tau_major1 &
+                 + tauself + taufor &
+                 + abso3*colo3(lay) &
+                 + wx(1,lay) * ccl4(ig)
+            fracs(lay,ngs4+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+         speccomb = colo3(lay) + rat_o3co2(lay)*colco2(lay)
+         specparm = colo3(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 4._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colo3(lay) + rat_o3co2_1(lay)*colco2(lay)
+         specparm1 = colo3(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 4._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs1) * fac01(lay)
+         fac011 = (1._rb - fs1) * fac11(lay)
+         fac101 = fs1 * fac01(lay)
+         fac111 = fs1 * fac11(lay)
+
+         speccomb_planck = colo3(lay)+refrat_planck_b*colco2(lay)
+         specparm_planck = colo3(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 4._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(5) + js
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(5) + js1
+         
+         do ig = 1, ng5
+            taug(lay,ngs4+ig) = speccomb * &
+                (fac000 * absb(ind0,ig) + &
+                fac100 * absb(ind0+1,ig) + &
+                fac010 * absb(ind0+5,ig) + &
+                fac110 * absb(ind0+6,ig)) &
+                + speccomb1 * &
+                (fac001 * absb(ind1,ig) + &
+                fac101 * absb(ind1+1,ig) + &
+                fac011 * absb(ind1+5,ig) + &
+                fac111 * absb(ind1+6,ig))  &
+                + wx(1,lay) * ccl4(ig)
+            fracs(lay,ngs4+ig) = fracrefb(ig,jpl) + fpl * &
+                (fracrefb(ig,jpl+1)-fracrefb(ig,jpl))
+         enddo
+      enddo
+
+      end subroutine taugb5
+
+!----------------------------------------------------------------------------
+      subroutine taugb6
+!----------------------------------------------------------------------------
+!
+!     band 6:  820-980 cm-1 (low key - h2o; low minor - co2)
+!                           (high key - nothing; high minor - cfc11, cfc12)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng6, ngs5
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg06, only : fracrefa, absa, ka, ka_mco2, &
+                            selfref, forref, cfc11adj, cfc12
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      real(kind=rb) :: chi_co2, ratco2, adjfac, adjcolco2
+      real(kind=rb) :: tauself, taufor, absco2
+
+
+! Minor gas mapping level:
+!     lower - co2, p = 706.2720 mb, t = 294.2 k
+!     upper - cfc11, cfc12
+
+! Compute the optical depth by interpolating in ln(pressure) and
+! temperature. The water vapor self-continuum and foreign continuum
+! is interpolated (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+! In atmospheres where the amount of CO2 is too great to be considered
+! a minor species, adjust the column amount of CO2 by an empirical factor 
+! to obtain the proper contribution.
+         chi_co2 = colco2(lay)/(coldry(lay))
+         ratco2 = 1.e20_rb*chi_co2/chi_mls(2,jp(lay)+1)
+         if (ratco2 .gt. 3.0_rb) then
+            adjfac = 2.0_rb+(ratco2-2.0_rb)**0.77_rb
+            adjcolco2 = adjfac*chi_mls(2,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcolco2 = colco2(lay)
+         endif
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(6) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(6) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         do ig = 1, ng6
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))
+            absco2 =  (ka_mco2(indm,ig) + minorfrac(lay) * &
+                 (ka_mco2(indm+1,ig) - ka_mco2(indm,ig)))
+            taug(lay,ngs5+ig) = colh2o(lay) * &
+                (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) +  &
+                 fac11(lay) * absa(ind1+1,ig))  &
+                 + tauself + taufor &
+                 + adjcolco2 * absco2 &
+                 + wx(2,lay) * cfc11adj(ig) &
+                 + wx(3,lay) * cfc12(ig)
+            fracs(lay,ngs5+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+! Nothing important goes on above laytrop in this band.
+      do lay = laytrop+1, nlayers
+
+         do ig = 1, ng6
+            taug(lay,ngs5+ig) = 0.0_rb &
+                 + wx(2,lay) * cfc11adj(ig) &
+                 + wx(3,lay) * cfc12(ig)
+            fracs(lay,ngs5+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+      end subroutine taugb6
+
+!----------------------------------------------------------------------------
+      subroutine taugb7
+!----------------------------------------------------------------------------
+!
+!     band 7:  980-1080 cm-1 (low key - h2o,o3; low minor - co2)
+!                            (high key - o3; high minor - co2)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng7, ngs6
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg07, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mco2, kb_mco2, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      integer(kind=im) :: js, js1, jmco2, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_mco2, specparm_mco2, specmult_mco2, fmco2
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor, co2m1, co2m2, absco2
+      real(kind=rb) :: chi_co2, ratco2, adjfac, adjcolco2
+      real(kind=rb) :: refrat_planck_a, refrat_m_a
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Minor gas mapping level :
+!     lower - co2, p = 706.2620 mbar, t= 278.94 k
+!     upper - co2, p = 12.9350 mbar, t = 234.01 k
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower atmosphere.
+
+! P = 706.2620 mb
+      refrat_planck_a = chi_mls(1,3)/chi_mls(3,3)
+
+! P = 706.2720 mb
+      refrat_m_a = chi_mls(1,3)/chi_mls(3,3)
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below laytrop, the water
+! vapor self-continuum and foreign continuum is interpolated 
+! (in temperature) separately. 
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2oo3(lay)*colo3(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2oo3_1(lay)*colo3(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_mco2 = colh2o(lay) + refrat_m_a*colo3(lay)
+         specparm_mco2 = colh2o(lay)/speccomb_mco2
+         if (specparm_mco2 .ge. oneminus) specparm_mco2 = oneminus
+         specmult_mco2 = 8._rb*specparm_mco2
+
+         jmco2 = 1 + int(specmult_mco2)
+         fmco2 = mod(specmult_mco2,1.0_rb)
+
+!  In atmospheres where the amount of CO2 is too great to be considered
+!  a minor species, adjust the column amount of CO2 by an empirical factor 
+!  to obtain the proper contribution.
+         chi_co2 = colco2(lay)/(coldry(lay))
+         ratco2 = 1.e20*chi_co2/chi_mls(2,jp(lay)+1)
+         if (ratco2 .gt. 3.0_rb) then
+            adjfac = 3.0_rb+(ratco2-3.0_rb)**0.79_rb
+            adjcolco2 = adjfac*chi_mls(2,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcolco2 = colco2(lay)
+         endif
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colo3(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(7) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(7) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng7
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            co2m1 = ka_mco2(jmco2,indm,ig) + fmco2 * &
+                 (ka_mco2(jmco2+1,indm,ig) - ka_mco2(jmco2,indm,ig))
+            co2m2 = ka_mco2(jmco2,indm+1,ig) + fmco2 * &
+                 (ka_mco2(jmco2+1,indm+1,ig) - ka_mco2(jmco2,indm+1,ig))
+            absco2 = co2m1 + minorfrac(lay) * (co2m2 - co2m1)
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) +  &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs6+ig) = tau_major + tau_major1 &
+                 + tauself + taufor &
+                 + adjcolco2*absco2
+            fracs(lay,ngs6+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+!  In atmospheres where the amount of CO2 is too great to be considered
+!  a minor species, adjust the column amount of CO2 by an empirical factor 
+!  to obtain the proper contribution.
+         chi_co2 = colco2(lay)/(coldry(lay))
+         ratco2 = 1.e20*chi_co2/chi_mls(2,jp(lay)+1)
+         if (ratco2 .gt. 3.0_rb) then
+            adjfac = 2.0_rb+(ratco2-2.0_rb)**0.79_rb
+            adjcolco2 = adjfac*chi_mls(2,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcolco2 = colco2(lay)
+         endif
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(7) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(7) + 1
+         indm = indminor(lay)
+
+         do ig = 1, ng7
+            absco2 = kb_mco2(indm,ig) + minorfrac(lay) * &
+                 (kb_mco2(indm+1,ig) - kb_mco2(indm,ig))
+            taug(lay,ngs6+ig) = colo3(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) &
+                 + adjcolco2 * absco2
+            fracs(lay,ngs6+ig) = fracrefb(ig)
+         enddo
+
+! Empirical modification to code to improve stratospheric cooling rates
+! for o3.  Revised to apply weighting for g-point reduction in this band.
+
+         taug(lay,ngs6+6)=taug(lay,ngs6+6)*0.92_rb
+         taug(lay,ngs6+7)=taug(lay,ngs6+7)*0.88_rb
+         taug(lay,ngs6+8)=taug(lay,ngs6+8)*1.07_rb
+         taug(lay,ngs6+9)=taug(lay,ngs6+9)*1.1_rb
+         taug(lay,ngs6+10)=taug(lay,ngs6+10)*0.99_rb
+         taug(lay,ngs6+11)=taug(lay,ngs6+11)*0.855_rb
+
+      enddo
+
+      end subroutine taugb7
+
+!----------------------------------------------------------------------------
+      subroutine taugb8
+!----------------------------------------------------------------------------
+!
+!     band 8:  1080-1180 cm-1 (low key - h2o; low minor - co2,o3,n2o)
+!                             (high key - o3; high minor - co2, n2o)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng8, ngs7
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg08, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mco2, ka_mn2o, ka_mo3, kb_mco2, kb_mn2o, &
+                            selfref, forref, cfc12, cfc22adj
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      real(kind=rb) :: tauself, taufor, absco2, abso3, absn2o
+      real(kind=rb) :: chi_co2, ratco2, adjfac, adjcolco2
+
+
+! Minor gas mapping level:
+!     lower - co2, p = 1053.63 mb, t = 294.2 k
+!     lower - o3,  p = 317.348 mb, t = 240.77 k
+!     lower - n2o, p = 706.2720 mb, t= 278.94 k
+!     lower - cfc12,cfc11
+!     upper - co2, p = 35.1632 mb, t = 223.28 k
+!     upper - n2o, p = 8.716e-2 mb, t = 226.03 k
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature, and appropriate species.  Below laytrop, the water vapor 
+! self-continuum and foreign continuum is interpolated (in temperature) 
+! separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+!  In atmospheres where the amount of CO2 is too great to be considered
+!  a minor species, adjust the column amount of CO2 by an empirical factor 
+!  to obtain the proper contribution.
+         chi_co2 = colco2(lay)/(coldry(lay))
+         ratco2 = 1.e20_rb*chi_co2/chi_mls(2,jp(lay)+1)
+         if (ratco2 .gt. 3.0_rb) then
+            adjfac = 2.0_rb+(ratco2-2.0_rb)**0.65_rb
+            adjcolco2 = adjfac*chi_mls(2,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcolco2 = colco2(lay)
+         endif
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(8) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(8) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         do ig = 1, ng8
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))
+            absco2 =  (ka_mco2(indm,ig) + minorfrac(lay) * &
+                 (ka_mco2(indm+1,ig) - ka_mco2(indm,ig)))
+            abso3 =  (ka_mo3(indm,ig) + minorfrac(lay) * &
+                 (ka_mo3(indm+1,ig) - ka_mo3(indm,ig)))
+            absn2o =  (ka_mn2o(indm,ig) + minorfrac(lay) * &
+                 (ka_mn2o(indm+1,ig) - ka_mn2o(indm,ig)))
+            taug(lay,ngs7+ig) = colh2o(lay) * &
+                 (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) +  &
+                 fac11(lay) * absa(ind1+1,ig)) &
+                 + tauself + taufor &
+                 + adjcolco2*absco2 &
+                 + colo3(lay) * abso3 &
+                 + coln2o(lay) * absn2o &
+                 + wx(3,lay) * cfc12(ig) &
+                 + wx(4,lay) * cfc22adj(ig)
+            fracs(lay,ngs7+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+!  In atmospheres where the amount of CO2 is too great to be considered
+!  a minor species, adjust the column amount of CO2 by an empirical factor 
+!  to obtain the proper contribution.
+         chi_co2 = colco2(lay)/coldry(lay)
+         ratco2 = 1.e20_rb*chi_co2/chi_mls(2,jp(lay)+1)
+         if (ratco2 .gt. 3.0_rb) then
+            adjfac = 2.0_rb+(ratco2-2.0_rb)**0.65_rb
+            adjcolco2 = adjfac*chi_mls(2,jp(lay)+1) * coldry(lay)*1.e-20_rb
+         else
+            adjcolco2 = colco2(lay)
+         endif
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(8) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(8) + 1
+         indm = indminor(lay)
+
+         do ig = 1, ng8
+            absco2 =  (kb_mco2(indm,ig) + minorfrac(lay) * &
+                 (kb_mco2(indm+1,ig) - kb_mco2(indm,ig)))
+            absn2o =  (kb_mn2o(indm,ig) + minorfrac(lay) * &
+                 (kb_mn2o(indm+1,ig) - kb_mn2o(indm,ig)))
+            taug(lay,ngs7+ig) = colo3(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) &
+                 + adjcolco2*absco2 &
+                 + coln2o(lay)*absn2o & 
+                 + wx(3,lay) * cfc12(ig) &
+                 + wx(4,lay) * cfc22adj(ig)
+            fracs(lay,ngs7+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb8
+
+!----------------------------------------------------------------------------
+      subroutine taugb9
+!----------------------------------------------------------------------------
+!
+!     band 9:  1180-1390 cm-1 (low key - h2o,ch4; low minor - n2o)
+!                             (high key - ch4; high minor - n2o)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng9, ngs8
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg09, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mn2o, kb_mn2o, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      integer(kind=im) :: js, js1, jmn2o, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_mn2o, specparm_mn2o, specmult_mn2o, fmn2o
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor, n2om1, n2om2, absn2o
+      real(kind=rb) :: chi_n2o, ratn2o, adjfac, adjcoln2o
+      real(kind=rb) :: refrat_planck_a, refrat_m_a
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Minor gas mapping level :
+!     lower - n2o, p = 706.272 mbar, t = 278.94 k
+!     upper - n2o, p = 95.58 mbar, t = 215.7 k
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower/upper atmosphere.
+
+! P = 212 mb
+      refrat_planck_a = chi_mls(1,9)/chi_mls(6,9)
+
+! P = 706.272 mb 
+      refrat_m_a = chi_mls(1,3)/chi_mls(6,3)
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below laytrop, the water
+! vapor self-continuum and foreign continuum is interpolated 
+! (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2och4(lay)*colch4(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2och4_1(lay)*colch4(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_mn2o = colh2o(lay) + refrat_m_a*colch4(lay)
+         specparm_mn2o = colh2o(lay)/speccomb_mn2o
+         if (specparm_mn2o .ge. oneminus) specparm_mn2o = oneminus
+         specmult_mn2o = 8._rb*specparm_mn2o
+         jmn2o = 1 + int(specmult_mn2o)
+         fmn2o = mod(specmult_mn2o,1.0_rb)
+
+!  In atmospheres where the amount of N2O is too great to be considered
+!  a minor species, adjust the column amount of N2O by an empirical factor 
+!  to obtain the proper contribution.
+         chi_n2o = coln2o(lay)/(coldry(lay))
+         ratn2o = 1.e20_rb*chi_n2o/chi_mls(4,jp(lay)+1)
+         if (ratn2o .gt. 1.5_rb) then
+            adjfac = 0.5_rb+(ratn2o-0.5_rb)**0.65_rb
+            adjcoln2o = adjfac*chi_mls(4,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcoln2o = coln2o(lay)
+         endif
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colch4(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(9) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(9) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng9
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            n2om1 = ka_mn2o(jmn2o,indm,ig) + fmn2o * &
+                 (ka_mn2o(jmn2o+1,indm,ig) - ka_mn2o(jmn2o,indm,ig))
+            n2om2 = ka_mn2o(jmn2o,indm+1,ig) + fmn2o * &
+                 (ka_mn2o(jmn2o+1,indm+1,ig) - ka_mn2o(jmn2o,indm+1,ig))
+            absn2o = n2om1 + minorfrac(lay) * (n2om2 - n2om1)
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + & 
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs8+ig) = tau_major + tau_major1 &
+                 + tauself + taufor &
+                 + adjcoln2o*absn2o
+            fracs(lay,ngs8+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+
+!  In atmospheres where the amount of N2O is too great to be considered
+!  a minor species, adjust the column amount of N2O by an empirical factor 
+!  to obtain the proper contribution.
+         chi_n2o = coln2o(lay)/(coldry(lay))
+         ratn2o = 1.e20_rb*chi_n2o/chi_mls(4,jp(lay)+1)
+         if (ratn2o .gt. 1.5_rb) then
+            adjfac = 0.5_rb+(ratn2o-0.5_rb)**0.65_rb
+            adjcoln2o = adjfac*chi_mls(4,jp(lay)+1)*coldry(lay)*1.e-20_rb
+         else
+            adjcoln2o = coln2o(lay)
+         endif
+
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(9) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(9) + 1
+         indm = indminor(lay)
+
+         do ig = 1, ng9
+            absn2o = kb_mn2o(indm,ig) + minorfrac(lay) * &
+                (kb_mn2o(indm+1,ig) - kb_mn2o(indm,ig))
+            taug(lay,ngs8+ig) = colch4(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) +  &
+                 fac11(lay) * absb(ind1+1,ig)) &
+                 + adjcoln2o*absn2o
+            fracs(lay,ngs8+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb9
+
+!----------------------------------------------------------------------------
+      subroutine taugb10
+!----------------------------------------------------------------------------
+!
+!     band 10:  1390-1480 cm-1 (low key - h2o; high key - h2o)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng10, ngs9
+      use rrlw_kg10, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, ig
+      real(kind=rb) :: tauself, taufor
+
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature.  Below laytrop, the water vapor self-continuum and
+! foreign continuum is interpolated (in temperature) separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(10) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(10) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+
+         do ig = 1, ng10
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            taug(lay,ngs9+ig) = colh2o(lay) * &
+                 (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig))  &
+                 + tauself + taufor
+            fracs(lay,ngs9+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(10) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(10) + 1
+         indf = indfor(lay)
+
+         do ig = 1, ng10
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            taug(lay,ngs9+ig) = colh2o(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) +  &
+                 fac11(lay) * absb(ind1+1,ig)) &
+                 + taufor
+            fracs(lay,ngs9+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb10
+
+!----------------------------------------------------------------------------
+      subroutine taugb11
+!----------------------------------------------------------------------------
+!
+!     band 11:  1480-1800 cm-1 (low - h2o; low minor - o2)
+!                              (high key - h2o; high minor - o2)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng11, ngs10
+      use rrlw_kg11, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            ka_mo2, kb_mo2, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      real(kind=rb) :: scaleo2, tauself, taufor, tauo2
+
+
+! Minor gas mapping level :
+!     lower - o2, p = 706.2720 mbar, t = 278.94 k
+!     upper - o2, p = 4.758820 mbarm t = 250.85 k
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature.  Below laytrop, the water vapor self-continuum and
+! foreign continuum is interpolated (in temperature) separately.
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(11) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(11) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+         scaleo2 = colo2(lay)*scaleminor(lay)
+         do ig = 1, ng11
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))
+            tauo2 =  scaleo2 * (ka_mo2(indm,ig) + minorfrac(lay) * &
+                 (ka_mo2(indm+1,ig) - ka_mo2(indm,ig)))
+            taug(lay,ngs10+ig) = colh2o(lay) * &
+                 (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) &
+                 + tauself + taufor &
+                 + tauo2
+            fracs(lay,ngs10+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(11) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(11) + 1
+         indf = indfor(lay)
+         indm = indminor(lay)
+         scaleo2 = colo2(lay)*scaleminor(lay)
+         do ig = 1, ng11
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            tauo2 =  scaleo2 * (kb_mo2(indm,ig) + minorfrac(lay) * &
+                 (kb_mo2(indm+1,ig) - kb_mo2(indm,ig)))
+            taug(lay,ngs10+ig) = colh2o(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig))  &
+                 + taufor &
+                 + tauo2
+            fracs(lay,ngs10+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb11
+
+!----------------------------------------------------------------------------
+      subroutine taugb12
+!----------------------------------------------------------------------------
+!
+!     band 12:  1800-2080 cm-1 (low - h2o,co2; high - nothing)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng12, ngs11
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg12, only : fracrefa, absa, ka, &
+                            selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, ig
+      integer(kind=im) :: js, js1, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor
+      real(kind=rb) :: refrat_planck_a
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower/upper atmosphere.
+
+! P =   174.164 mb 
+      refrat_planck_a = chi_mls(1,10)/chi_mls(2,10)
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below laytrop, the water
+! vapor self-continuum adn foreign continuum is interpolated 
+! (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2oco2(lay)*colco2(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2oco2_1(lay)*colco2(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colco2(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(12) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(12) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng12
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs11+ig) = tau_major + tau_major1 &
+                 + tauself + taufor
+            fracs(lay,ngs11+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         do ig = 1, ng12
+            taug(lay,ngs11+ig) = 0.0_rb
+            fracs(lay,ngs11+ig) = 0.0_rb
+         enddo
+      enddo
+
+      end subroutine taugb12
+
+!----------------------------------------------------------------------------
+      subroutine taugb13
+!----------------------------------------------------------------------------
+!
+!     band 13:  2080-2250 cm-1 (low key - h2o,n2o; high minor - o3 minor)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng13, ngs12
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg13, only : fracrefa, fracrefb, absa, ka, &
+                            ka_mco2, ka_mco, kb_mo3, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      integer(kind=im) :: js, js1, jmco2, jmco, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_mco2, specparm_mco2, specmult_mco2, fmco2
+      real(kind=rb) :: speccomb_mco, specparm_mco, specmult_mco, fmco
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor, co2m1, co2m2, absco2 
+      real(kind=rb) :: com1, com2, absco, abso3
+      real(kind=rb) :: chi_co2, ratco2, adjfac, adjcolco2
+      real(kind=rb) :: refrat_planck_a, refrat_m_a, refrat_m_a3
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Minor gas mapping levels :
+!     lower - co2, p = 1053.63 mb, t = 294.2 k
+!     lower - co, p = 706 mb, t = 278.94 k
+!     upper - o3, p = 95.5835 mb, t = 215.7 k
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower/upper atmosphere.
+
+! P = 473.420 mb (Level 5)
+      refrat_planck_a = chi_mls(1,5)/chi_mls(4,5)
+
+! P = 1053. (Level 1)
+      refrat_m_a = chi_mls(1,1)/chi_mls(4,1)
+
+! P = 706. (Level 3)
+      refrat_m_a3 = chi_mls(1,3)/chi_mls(4,3)
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below laytrop, the water
+! vapor self-continuum and foreign continuum is interpolated 
+! (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2on2o(lay)*coln2o(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2on2o_1(lay)*coln2o(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_mco2 = colh2o(lay) + refrat_m_a*coln2o(lay)
+         specparm_mco2 = colh2o(lay)/speccomb_mco2
+         if (specparm_mco2 .ge. oneminus) specparm_mco2 = oneminus
+         specmult_mco2 = 8._rb*specparm_mco2
+         jmco2 = 1 + int(specmult_mco2)
+         fmco2 = mod(specmult_mco2,1.0_rb)
+
+!  In atmospheres where the amount of CO2 is too great to be considered
+!  a minor species, adjust the column amount of CO2 by an empirical factor 
+!  to obtain the proper contribution.
+         chi_co2 = colco2(lay)/(coldry(lay))
+         ratco2 = 1.e20_rb*chi_co2/3.55e-4_rb
+         if (ratco2 .gt. 3.0_rb) then
+            adjfac = 2.0_rb+(ratco2-2.0_rb)**0.68_rb
+            adjcolco2 = adjfac*3.55e-4*coldry(lay)*1.e-20_rb
+         else
+            adjcolco2 = colco2(lay)
+         endif
+
+         speccomb_mco = colh2o(lay) + refrat_m_a3*coln2o(lay)
+         specparm_mco = colh2o(lay)/speccomb_mco
+         if (specparm_mco .ge. oneminus) specparm_mco = oneminus
+         specmult_mco = 8._rb*specparm_mco
+         jmco = 1 + int(specmult_mco)
+         fmco = mod(specmult_mco,1.0_rb)
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*coln2o(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(13) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(13) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng13
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor = forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            co2m1 = ka_mco2(jmco2,indm,ig) + fmco2 * &
+                 (ka_mco2(jmco2+1,indm,ig) - ka_mco2(jmco2,indm,ig))
+            co2m2 = ka_mco2(jmco2,indm+1,ig) + fmco2 * &
+                 (ka_mco2(jmco2+1,indm+1,ig) - ka_mco2(jmco2,indm+1,ig))
+            absco2 = co2m1 + minorfrac(lay) * (co2m2 - co2m1)
+            com1 = ka_mco(jmco,indm,ig) + fmco * &
+                 (ka_mco(jmco+1,indm,ig) - ka_mco(jmco,indm,ig))
+            com2 = ka_mco(jmco,indm+1,ig) + fmco * &
+                 (ka_mco(jmco+1,indm+1,ig) - ka_mco(jmco,indm+1,ig))
+            absco = com1 + minorfrac(lay) * (com2 - com1)
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs12+ig) = tau_major + tau_major1 &
+                 + tauself + taufor &
+                 + adjcolco2*absco2 &
+                 + colco(lay)*absco
+            fracs(lay,ngs12+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         indm = indminor(lay)
+         do ig = 1, ng13
+            abso3 = kb_mo3(indm,ig) + minorfrac(lay) * &
+                 (kb_mo3(indm+1,ig) - kb_mo3(indm,ig))
+            taug(lay,ngs12+ig) = colo3(lay)*abso3
+            fracs(lay,ngs12+ig) =  fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb13
+
+!----------------------------------------------------------------------------
+      subroutine taugb14
+!----------------------------------------------------------------------------
+!
+!     band 14:  2250-2380 cm-1 (low - co2; high - co2)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng14, ngs13
+      use rrlw_kg14, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, ig
+      real(kind=rb) :: tauself, taufor
+
+
+! Compute the optical depth by interpolating in ln(pressure) and 
+! temperature.  Below laytrop, the water vapor self-continuum 
+! and foreign continuum is interpolated (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(14) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(14) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         do ig = 1, ng14
+            tauself = selffac(lay) * (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            taug(lay,ngs13+ig) = colco2(lay) * &
+                 (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) &
+                 + tauself + taufor
+            fracs(lay,ngs13+ig) = fracrefa(ig)
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(14) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(14) + 1
+         do ig = 1, ng14
+            taug(lay,ngs13+ig) = colco2(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig))
+            fracs(lay,ngs13+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb14
+
+!----------------------------------------------------------------------------
+      subroutine taugb15
+!----------------------------------------------------------------------------
+!
+!     band 15:  2380-2600 cm-1 (low - n2o,co2; low minor - n2)
+!                              (high - nothing)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng15, ngs14
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg15, only : fracrefa, absa, ka, &
+                            ka_mn2, selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, indm, ig
+      integer(kind=im) :: js, js1, jmn2, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_mn2, specparm_mn2, specmult_mn2, fmn2
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: scalen2, tauself, taufor, n2m1, n2m2, taun2 
+      real(kind=rb) :: refrat_planck_a, refrat_m_a
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Minor gas mapping level : 
+!     Lower - Nitrogen Continuum, P = 1053., T = 294.
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower atmosphere.
+! P = 1053. mb (Level 1)
+      refrat_planck_a = chi_mls(4,1)/chi_mls(2,1)
+
+! P = 1053.
+      refrat_m_a = chi_mls(4,1)/chi_mls(2,1)
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below laytrop, the water
+! vapor self-continuum and foreign continuum is interpolated 
+! (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = coln2o(lay) + rat_n2oco2(lay)*colco2(lay)
+         specparm = coln2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = coln2o(lay) + rat_n2oco2_1(lay)*colco2(lay)
+         specparm1 = coln2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_mn2 = coln2o(lay) + refrat_m_a*colco2(lay)
+         specparm_mn2 = coln2o(lay)/speccomb_mn2
+         if (specparm_mn2 .ge. oneminus) specparm_mn2 = oneminus
+         specmult_mn2 = 8._rb*specparm_mn2
+         jmn2 = 1 + int(specmult_mn2)
+         fmn2 = mod(specmult_mn2,1.0_rb)
+
+         speccomb_planck = coln2o(lay)+refrat_planck_a*colco2(lay)
+         specparm_planck = coln2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(15) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(15) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+         indm = indminor(lay)
+         
+         scalen2 = colbrd(lay)*scaleminor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng15
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+            n2m1 = ka_mn2(jmn2,indm,ig) + fmn2 * &
+                 (ka_mn2(jmn2+1,indm,ig) - ka_mn2(jmn2,indm,ig))
+            n2m2 = ka_mn2(jmn2,indm+1,ig) + fmn2 * &
+                 (ka_mn2(jmn2+1,indm+1,ig) - ka_mn2(jmn2,indm+1,ig))
+            taun2 = scalen2 * (n2m1 + minorfrac(lay) * (n2m2 - n2m1))
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif 
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs14+ig) = tau_major + tau_major1 &
+                 + tauself + taufor &
+                 + taun2
+            fracs(lay,ngs14+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         do ig = 1, ng15
+            taug(lay,ngs14+ig) = 0.0_rb
+            fracs(lay,ngs14+ig) = 0.0_rb
+         enddo
+      enddo
+
+      end subroutine taugb15
+
+!----------------------------------------------------------------------------
+      subroutine taugb16
+!----------------------------------------------------------------------------
+!
+!     band 16:  2600-3250 cm-1 (low key- h2o,ch4; high key - ch4)
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrtm, only : ng16, ngs15
+      use rrlw_ref, only : chi_mls
+      use rrlw_kg16, only : fracrefa, fracrefb, absa, ka, absb, kb, &
+                            selfref, forref
+
+! ------- Declarations -------
+
+! Local 
+      integer(kind=im) :: lay, ind0, ind1, inds, indf, ig
+      integer(kind=im) :: js, js1, jpl
+      real(kind=rb) :: speccomb, specparm, specmult, fs
+      real(kind=rb) :: speccomb1, specparm1, specmult1, fs1
+      real(kind=rb) :: speccomb_planck, specparm_planck, specmult_planck, fpl
+      real(kind=rb) :: p, p4, fk0, fk1, fk2
+      real(kind=rb) :: fac000, fac100, fac200, fac010, fac110, fac210
+      real(kind=rb) :: fac001, fac101, fac201, fac011, fac111, fac211
+      real(kind=rb) :: tauself, taufor
+      real(kind=rb) :: refrat_planck_a
+      real(kind=rb) :: tau_major, tau_major1
+
+
+! Calculate reference ratio to be used in calculation of Planck
+! fraction in lower atmosphere.
+
+! P = 387. mb (Level 6)
+      refrat_planck_a = chi_mls(1,6)/chi_mls(6,6)
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature,and appropriate species.  Below laytrop, the water
+! vapor self-continuum and foreign continuum is interpolated 
+! (in temperature) separately.  
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+
+         speccomb = colh2o(lay) + rat_h2och4(lay)*colch4(lay)
+         specparm = colh2o(lay)/speccomb
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult,1.0_rb)
+
+         speccomb1 = colh2o(lay) + rat_h2och4_1(lay)*colch4(lay)
+         specparm1 = colh2o(lay)/speccomb1
+         if (specparm1 .ge. oneminus) specparm1 = oneminus
+         specmult1 = 8._rb*(specparm1)
+         js1 = 1 + int(specmult1)
+         fs1 = mod(specmult1,1.0_rb)
+
+         speccomb_planck = colh2o(lay)+refrat_planck_a*colch4(lay)
+         specparm_planck = colh2o(lay)/speccomb_planck
+         if (specparm_planck .ge. oneminus) specparm_planck=oneminus
+         specmult_planck = 8._rb*specparm_planck
+         jpl= 1 + int(specmult_planck)
+         fpl = mod(specmult_planck,1.0_rb)
+
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(16) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(16) + js1
+         inds = indself(lay)
+         indf = indfor(lay)
+
+         if (specparm .lt. 0.125_rb) then
+            p = fs - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else if (specparm .gt. 0.875_rb) then
+            p = -fs 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac000 = fk0*fac00(lay)
+            fac100 = fk1*fac00(lay)
+            fac200 = fk2*fac00(lay)
+            fac010 = fk0*fac10(lay)
+            fac110 = fk1*fac10(lay)
+            fac210 = fk2*fac10(lay)
+         else
+            fac000 = (1._rb - fs) * fac00(lay)
+            fac010 = (1._rb - fs) * fac10(lay)
+            fac100 = fs * fac00(lay)
+            fac110 = fs * fac10(lay)
+         endif
+
+         if (specparm1 .lt. 0.125_rb) then
+            p = fs1 - 1
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else if (specparm1 .gt. 0.875_rb) then
+            p = -fs1 
+            p4 = p**4
+            fk0 = p4
+            fk1 = 1 - p - 2.0_rb*p4
+            fk2 = p + p4
+            fac001 = fk0*fac01(lay)
+            fac101 = fk1*fac01(lay)
+            fac201 = fk2*fac01(lay)
+            fac011 = fk0*fac11(lay)
+            fac111 = fk1*fac11(lay)
+            fac211 = fk2*fac11(lay)
+         else
+            fac001 = (1._rb - fs1) * fac01(lay)
+            fac011 = (1._rb - fs1) * fac11(lay)
+            fac101 = fs1 * fac01(lay)
+            fac111 = fs1 * fac11(lay)
+         endif
+
+         do ig = 1, ng16
+            tauself = selffac(lay)* (selfref(inds,ig) + selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig)))
+            taufor =  forfac(lay) * (forref(indf,ig) + forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+
+            if (specparm .lt. 0.125_rb) then
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac200 * absa(ind0+2,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig) + &
+                    fac210 * absa(ind0+11,ig))
+            else if (specparm .gt. 0.875_rb) then
+               tau_major = speccomb * &
+                    (fac200 * absa(ind0-1,ig) + &
+                    fac100 * absa(ind0,ig) + &
+                    fac000 * absa(ind0+1,ig) + &
+                    fac210 * absa(ind0+8,ig) + &
+                    fac110 * absa(ind0+9,ig) + &
+                    fac010 * absa(ind0+10,ig))
+            else
+               tau_major = speccomb * &
+                    (fac000 * absa(ind0,ig) + &
+                    fac100 * absa(ind0+1,ig) + &
+                    fac010 * absa(ind0+9,ig) + &
+                    fac110 * absa(ind0+10,ig))
+            endif
+
+            if (specparm1 .lt. 0.125_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac201 * absa(ind1+2,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig) + &
+                    fac211 * absa(ind1+11,ig))
+            else if (specparm1 .gt. 0.875_rb) then
+               tau_major1 = speccomb1 * &
+                    (fac201 * absa(ind1-1,ig) + &
+                    fac101 * absa(ind1,ig) + &
+                    fac001 * absa(ind1+1,ig) + &
+                    fac211 * absa(ind1+8,ig) + &
+                    fac111 * absa(ind1+9,ig) + &
+                    fac011 * absa(ind1+10,ig))
+            else
+               tau_major1 = speccomb1 * &
+                    (fac001 * absa(ind1,ig) + &
+                    fac101 * absa(ind1+1,ig) + &
+                    fac011 * absa(ind1+9,ig) + &
+                    fac111 * absa(ind1+10,ig))
+            endif
+
+            taug(lay,ngs15+ig) = tau_major + tau_major1 &
+                 + tauself + taufor
+            fracs(lay,ngs15+ig) = fracrefa(ig,jpl) + fpl * &
+                 (fracrefa(ig,jpl+1)-fracrefa(ig,jpl))
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(16) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(16) + 1
+         do ig = 1, ng16
+            taug(lay,ngs15+ig) = colch4(lay) * &
+                 (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig))
+            fracs(lay,ngs15+ig) = fracrefb(ig)
+         enddo
+      enddo
+
+      end subroutine taugb16
+
+      end subroutine taumol
+
+      end module rrtmg_lw_taumol
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_cldprmc.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_cldprmc.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_cldprmc.f90	(revision 3477)
@@ -0,0 +1,333 @@
+!     path:      $Source$
+!     author:    $Author: miacono $
+!     revision:  $Revision: 23308 $
+!     created:   $Date: 2013-12-27 17:23:51 -0500 (Fri, 27 Dec 2013) $
+
+      module rrtmg_sw_cldprmc
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : ngptsw, jpband, jpb1, jpb2
+      use rrsw_cld, only : extliq1, ssaliq1, asyliq1, &
+                           extice2, ssaice2, asyice2, &
+                           extice3, ssaice3, asyice3, fdlice3, &
+                           abari, bbari, cbari, dbari, ebari, fbari
+      use rrsw_wvn, only : wavenum1, wavenum2, ngb
+      use rrsw_vsn, only : hvrclc, hnamclc
+
+      implicit none
+
+      contains
+
+! ----------------------------------------------------------------------------
+      subroutine cldprmc_sw(nlayers, inflag, iceflag, liqflag, cldfmc, &
+                            ciwpmc, clwpmc, reicmc, relqmc, &
+                            taormc, taucmc, ssacmc, asmcmc, fsfcmc)
+! ----------------------------------------------------------------------------
+
+! Purpose: Compute the cloud optical properties for each cloudy layer
+! and g-point interval for use by the McICA method.  
+! Note: Only inflag = 0 and inflag=2/liqflag=1/iceflag=1,2,3 are available;
+! (Hu & Stamnes, Ebert and Curry, Key, and Fu) are implemented. 
+
+! ------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: inflag          ! see definitions
+      integer(kind=im), intent(in) :: iceflag         ! see definitions
+      integer(kind=im), intent(in) :: liqflag         ! see definitions
+
+      real(kind=rb), intent(in) :: cldfmc(:,:)        ! cloud fraction [mcica]
+                                                      !    Dimensions: (ngptsw,nlayers)
+      real(kind=rb), intent(in) :: ciwpmc(:,:)        ! cloud ice water path [mcica]
+                                                      !    Dimensions: (ngptsw,nlayers)
+      real(kind=rb), intent(in) :: clwpmc(:,:)        ! cloud liquid water path [mcica]
+                                                      !    Dimensions: (ngptsw,nlayers)
+      real(kind=rb), intent(in) :: relqmc(:)          ! cloud liquid particle effective radius (microns)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: reicmc(:)          ! cloud ice particle effective radius (microns)
+                                                      !    Dimensions: (nlayers)
+                                                      ! specific definition of reicmc depends on setting of iceflag:
+                                                      ! iceflag = 0: (inactive)
+                                                      !              
+                                                      ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !              r_ec range is limited to 13.0 to 130.0 microns
+                                                      ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
+                                                      !              r_k range is limited to 5.0 to 131.0 microns
+                                                      ! iceflag = 3: generalized effective size, dge, (Fu, 1996),
+                                                      !              dge range is limited to 5.0 to 140.0 microns
+                                                      !              [dge = 1.0315 * r_ec]
+      real(kind=rb), intent(in) :: fsfcmc(:,:)        ! cloud forward scattering fraction
+                                                      !    Dimensions: (ngptsw,nlayers)
+
+! ------- Output -------
+
+      real(kind=rb), intent(inout) :: taucmc(:,:)     ! cloud optical depth (delta scaled)
+                                                      !    Dimensions: (ngptsw,nlayers)
+      real(kind=rb), intent(inout) :: ssacmc(:,:)     ! single scattering albedo (delta scaled)
+                                                      !    Dimensions: (ngptsw,nlayers)
+      real(kind=rb), intent(inout) :: asmcmc(:,:)     ! asymmetry parameter (delta scaled)
+                                                      !    Dimensions: (ngptsw,nlayers)
+      real(kind=rb), intent(out) :: taormc(:,:)       ! cloud optical depth (non-delta scaled)
+                                                      !    Dimensions: (ngptsw,nlayers)
+
+! ------- Local -------
+
+!      integer(kind=im) :: ncbands
+      integer(kind=im) :: ib, lay, istr, index, icx, ig
+
+      real(kind=rb), parameter :: eps = 1.e-06_rb     ! epsilon
+      real(kind=rb), parameter :: cldmin = 1.e-20_rb  ! minimum value for cloud quantities
+      real(kind=rb) :: cwp                            ! total cloud water path
+      real(kind=rb) :: radliq                         ! cloud liquid droplet radius (microns)
+      real(kind=rb) :: radice                         ! cloud ice effective size (microns)
+      real(kind=rb) :: factor
+      real(kind=rb) :: fint
+
+      real(kind=rb) :: taucldorig_a, taucloud_a, ssacloud_a, ffp, ffp1, ffpssa
+      real(kind=rb) :: tauiceorig, scatice, ssaice, tauice, tauliqorig, scatliq, ssaliq, tauliq
+
+      real(kind=rb) :: fdelta(ngptsw)
+      real(kind=rb) :: extcoice(ngptsw), gice(ngptsw)
+      real(kind=rb) :: ssacoice(ngptsw), forwice(ngptsw)
+      real(kind=rb) :: extcoliq(ngptsw), gliq(ngptsw)
+      real(kind=rb) :: ssacoliq(ngptsw), forwliq(ngptsw)
+
+! Initialize
+
+      hvrclc = '$Revision: 23308 $'
+
+! Some of these initializations are done elsewhere
+      do lay = 1, nlayers
+         do ig = 1, ngptsw
+            taormc(ig,lay) = taucmc(ig,lay)
+!            taucmc(ig,lay) = 0.0_rb
+!            ssacmc(ig,lay) = 1.0_rb
+!            asmcmc(ig,lay) = 0.0_rb
+         enddo
+      enddo
+
+! Main layer loop
+      do lay = 1, nlayers
+
+! Main g-point interval loop
+         do ig = 1, ngptsw 
+            cwp = ciwpmc(ig,lay) + clwpmc(ig,lay)
+            if (cldfmc(ig,lay) .ge. cldmin .and. &
+               (cwp .ge. cldmin .or. taucmc(ig,lay) .ge. cldmin)) then
+
+! (inflag=0): Cloud optical properties input directly
+               if (inflag .eq. 0) then
+! Cloud optical properties already defined in taucmc, ssacmc, asmcmc are unscaled;
+! Apply delta-M scaling here (using Henyey-Greenstein approximation)
+                  taucldorig_a = taucmc(ig,lay)
+                  ffp = fsfcmc(ig,lay)
+                  ffp1 = 1.0_rb - ffp
+                  ffpssa = 1.0_rb - ffp * ssacmc(ig,lay)
+                  ssacloud_a = ffp1 * ssacmc(ig,lay) / ffpssa
+                  taucloud_a = ffpssa * taucldorig_a
+
+                  taormc(ig,lay) = taucldorig_a
+                  ssacmc(ig,lay) = ssacloud_a
+                  taucmc(ig,lay) = taucloud_a
+                  asmcmc(ig,lay) = (asmcmc(ig,lay) - ffp) / (ffp1)
+
+               elseif (inflag .eq. 1) then 
+                  stop 'INFLAG = 1 OPTION NOT AVAILABLE WITH MCICA'
+
+! (inflag=2): Separate treatement of ice clouds and water clouds.
+               elseif (inflag .eq. 2) then       
+                  radice = reicmc(lay)
+
+! Calculation of absorption coefficients due to ice clouds.
+                  if (ciwpmc(ig,lay) .eq. 0.0_rb) then
+                     extcoice(ig) = 0.0_rb
+                     ssacoice(ig) = 0.0_rb
+                     gice(ig)     = 0.0_rb
+                     forwice(ig)  = 0.0_rb
+
+! (iceflag = 1): 
+! Note: This option uses Ebert and Curry approach for all particle sizes similar to
+! CAM3 implementation, though this is somewhat unjustified for large ice particles
+                  elseif (iceflag .eq. 1) then
+                     if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop &
+                        'ICE RADIUS OUT OF BOUNDS'
+                     ib = ngb(ig)
+                     if (wavenum2(ib) .gt. 1.43e04_rb) then
+                        icx = 1
+                     elseif (wavenum2(ib) .gt. 7.7e03_rb) then
+                        icx = 2
+                     elseif (wavenum2(ib) .gt. 5.3e03_rb) then
+                        icx = 3
+                     elseif (wavenum2(ib) .gt. 4.0e03_rb) then
+                        icx = 4
+                     elseif (wavenum2(ib) .ge. 2.5e03_rb) then
+                        icx = 5
+                     endif
+                     extcoice(ig) = (abari(icx) + bbari(icx)/radice)
+                     ssacoice(ig) = 1._rb - cbari(icx) - dbari(icx) * radice
+                     gice(ig) = ebari(icx) + fbari(icx) * radice
+! Check to ensure upper limit of gice is within physical limits for large particles
+                     if (gice(ig).ge.1._rb) gice(ig) = 1._rb - eps
+                     forwice(ig) = gice(ig)*gice(ig)
+! Check to ensure all calculated quantities are within physical limits.
+                     if (extcoice(ig) .lt. 0.0_rb) stop 'ICE EXTINCTION LESS THAN 0.0'
+                     if (ssacoice(ig) .gt. 1.0_rb) stop 'ICE SSA GRTR THAN 1.0'
+                     if (ssacoice(ig) .lt. 0.0_rb) stop 'ICE SSA LESS THAN 0.0'
+                     if (gice(ig) .gt. 1.0_rb) stop 'ICE ASYM GRTR THAN 1.0'
+                     if (gice(ig) .lt. 0.0_rb) stop 'ICE ASYM LESS THAN 0.0'
+
+! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns
+
+                  elseif (iceflag .eq. 2) then
+                     if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop 'ICE RADIUS OUT OF BOUNDS'
+                     factor = (radice - 2._rb)/3._rb
+                     index = int(factor)
+                     if (index .eq. 43) index = 42
+                     fint = factor - real(index,kind=rb)
+                     ib = ngb(ig)
+                     extcoice(ig) = extice2(index,ib) + fint * &
+                                   (extice2(index+1,ib) -  extice2(index,ib))
+                     ssacoice(ig) = ssaice2(index,ib) + fint * &
+                                   (ssaice2(index+1,ib) -  ssaice2(index,ib))
+                     gice(ig) = asyice2(index,ib) + fint * &
+                                   (asyice2(index+1,ib) -  asyice2(index,ib))
+                     forwice(ig) = gice(ig)*gice(ig)
+! Check to ensure all calculated quantities are within physical limits.
+                     if (extcoice(ig) .lt. 0.0_rb) stop 'ICE EXTINCTION LESS THAN 0.0'
+                     if (ssacoice(ig) .gt. 1.0_rb) stop 'ICE SSA GRTR THAN 1.0'
+                     if (ssacoice(ig) .lt. 0.0_rb) stop 'ICE SSA LESS THAN 0.0'
+                     if (gice(ig) .gt. 1.0_rb) stop 'ICE ASYM GRTR THAN 1.0'
+                     if (gice(ig) .lt. 0.0_rb) stop 'ICE ASYM LESS THAN 0.0'
+
+! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns
+
+                  elseif (iceflag .eq. 3) then
+                     if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) stop 'ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS'
+                     factor = (radice - 2._rb)/3._rb
+                     index = int(factor)
+                     if (index .eq. 46) index = 45
+                     fint = factor - real(index,kind=rb)
+                     ib = ngb(ig)
+                     extcoice(ig) = extice3(index,ib) + fint * &
+                                   (extice3(index+1,ib) - extice3(index,ib))
+                     ssacoice(ig) = ssaice3(index,ib) + fint * &
+                                   (ssaice3(index+1,ib) - ssaice3(index,ib))
+                     gice(ig) = asyice3(index,ib) + fint * &
+                               (asyice3(index+1,ib) - asyice3(index,ib))
+                     fdelta(ig) = fdlice3(index,ib) + fint * &
+                                 (fdlice3(index+1,ib) - fdlice3(index,ib))
+                     if (fdelta(ig) .lt. 0.0_rb) stop 'FDELTA LESS THAN 0.0'
+                     if (fdelta(ig) .gt. 1.0_rb) stop 'FDELTA GT THAN 1.0'
+                     forwice(ig) = fdelta(ig) + 0.5_rb / ssacoice(ig)
+! See Fu 1996 p. 2067 
+                     if (forwice(ig) .gt. gice(ig)) forwice(ig) = gice(ig)
+! Check to ensure all calculated quantities are within physical limits.  
+                     if (extcoice(ig) .lt. 0.0_rb) stop 'ICE EXTINCTION LESS THAN 0.0'
+                     if (ssacoice(ig) .gt. 1.0_rb) stop 'ICE SSA GRTR THAN 1.0'
+                     if (ssacoice(ig) .lt. 0.0_rb) stop 'ICE SSA LESS THAN 0.0'
+                     if (gice(ig) .gt. 1.0_rb) stop 'ICE ASYM GRTR THAN 1.0'
+                     if (gice(ig) .lt. 0.0_rb) stop 'ICE ASYM LESS THAN 0.0'
+
+                  endif
+
+! Calculation of absorption coefficients due to water clouds.
+                  if (clwpmc(ig,lay) .eq. 0.0_rb) then
+                     extcoliq(ig) = 0.0_rb
+                     ssacoliq(ig) = 0.0_rb
+                     gliq(ig) = 0.0_rb
+                     forwliq(ig) = 0.0_rb
+
+                  elseif (liqflag .eq. 1) then
+                     radliq = relqmc(lay)
+                     if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) stop &
+                        'LIQUID EFFECTIVE RADIUS OUT OF BOUNDS'
+                     index = int(radliq - 1.5_rb)
+                     if (index .eq. 0) index = 1
+                     if (index .eq. 58) index = 57
+                     fint = radliq - 1.5_rb - real(index,kind=rb)
+                     ib = ngb(ig)
+                     extcoliq(ig) = extliq1(index,ib) + fint * &
+                                   (extliq1(index+1,ib) - extliq1(index,ib))
+                     ssacoliq(ig) = ssaliq1(index,ib) + fint * &
+                                   (ssaliq1(index+1,ib) - ssaliq1(index,ib))
+                     if (fint .lt. 0._rb .and. ssacoliq(ig) .gt. 1._rb) &
+                                    ssacoliq(ig) = ssaliq1(index,ib)
+                     gliq(ig) = asyliq1(index,ib) + fint * &
+                               (asyliq1(index+1,ib) - asyliq1(index,ib))
+                     forwliq(ig) = gliq(ig)*gliq(ig)
+! Check to ensure all calculated quantities are within physical limits.
+                     if (extcoliq(ig) .lt. 0.0_rb) stop 'LIQUID EXTINCTION LESS THAN 0.0'
+                     if (ssacoliq(ig) .gt. 1.0_rb) stop 'LIQUID SSA GRTR THAN 1.0'
+                     if (ssacoliq(ig) .lt. 0.0_rb) stop 'LIQUID SSA LESS THAN 0.0'
+                     if (gliq(ig) .gt. 1.0_rb) stop 'LIQUID ASYM GRTR THAN 1.0'
+                     if (gliq(ig) .lt. 0.0_rb) stop 'LIQUID ASYM LESS THAN 0.0'
+                  endif
+   
+                  tauliqorig = clwpmc(ig,lay) * extcoliq(ig)
+                  tauiceorig = ciwpmc(ig,lay) * extcoice(ig)
+                  taormc(ig,lay) = tauliqorig + tauiceorig
+
+                  ssaliq = ssacoliq(ig) * (1._rb - forwliq(ig)) / &
+                          (1._rb - forwliq(ig) * ssacoliq(ig))
+                  tauliq = (1._rb - forwliq(ig) * ssacoliq(ig)) * tauliqorig
+                  ssaice = ssacoice(ig) * (1._rb - forwice(ig)) / &
+                          (1._rb - forwice(ig) * ssacoice(ig))
+                  tauice = (1._rb - forwice(ig) * ssacoice(ig)) * tauiceorig
+
+                  scatliq = ssaliq * tauliq
+                  scatice = ssaice * tauice
+                  taucmc(ig,lay) = tauliq + tauice
+
+! Ensure non-zero taucmc and scatice
+                  if(taucmc(ig,lay).eq.0.) taucmc(ig,lay) = cldmin
+                  if(scatice.eq.0.) scatice = cldmin
+
+                  ssacmc(ig,lay) = (scatliq + scatice) / taucmc(ig,lay)
+
+                  if (iceflag .eq. 3) then
+! In accordance with the 1996 Fu paper, equation A.3, 
+! the moments for ice were calculated depending on whether using spheres
+! or hexagonal ice crystals.
+! Set asymetry parameter to first moment (istr=1)
+                     istr = 1
+                     asmcmc(ig,lay) = (1.0_rb/(scatliq+scatice))* &
+                        (scatliq*(gliq(ig)**istr - forwliq(ig)) / &
+                        (1.0_rb - forwliq(ig)) + scatice * ((gice(ig)-forwice(ig))/ &
+                        (1.0_rb - forwice(ig)))**istr)
+
+                  else 
+! This code is the standard method for delta-m scaling. 
+! Set asymetry parameter to first moment (istr=1)
+                     istr = 1
+                     asmcmc(ig,lay) = (scatliq *  &
+                        (gliq(ig)**istr - forwliq(ig)) / &
+                        (1.0_rb - forwliq(ig)) + scatice * (gice(ig)**istr - forwice(ig)) / &
+                        (1.0_rb - forwice(ig)))/(scatliq + scatice)
+                  endif 
+
+               endif
+
+            endif
+
+! End g-point interval loop
+         enddo
+
+! End layer loop
+      enddo
+
+      end subroutine cldprmc_sw
+
+      end module rrtmg_sw_cldprmc
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_cldprop.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_cldprop.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_cldprop.f90	(revision 3477)
@@ -0,0 +1,350 @@
+!     path:      $Source$
+!     author:    $Author: miacono $
+!     revision:  $Revision: 23308 $
+!     created:   $Date: 2013-12-27 17:23:51 -0500 (Fri, 27 Dec 2013) $
+
+      module rrtmg_sw_cldprop
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : nbndsw, jpband, jpb1, jpb2
+      use rrsw_cld, only : extliq1, ssaliq1, asyliq1, &
+                           extice2, ssaice2, asyice2, &
+                           extice3, ssaice3, asyice3, fdlice3, &
+                           abari, bbari, cbari, dbari, ebari, fbari
+      use rrsw_wvn, only : wavenum1, wavenum2
+      use rrsw_vsn, only : hvrcld, hnamcld
+
+      implicit none
+
+      contains
+
+! ----------------------------------------------------------------------------
+      subroutine cldprop_sw(nlayers, inflag, iceflag, liqflag, cldfrac, &
+                            tauc, ssac, asmc, fsfc, ciwp, clwp, rei, rel, &
+                            taucldorig, taucloud, ssacloud, asmcloud)
+! ----------------------------------------------------------------------------
+
+! Purpose: Compute the cloud optical properties for each cloudy layer.
+! Note: Only inflag = 0 and inflag=2/liqflag=1/iceflag=1,2,3 are available;
+! (Hu & Stamnes, Ebert and Curry, Key, and Fu) are implemented.
+
+! ------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+      integer(kind=im), intent(in) :: inflag          ! see definitions
+      integer(kind=im), intent(in) :: iceflag         ! see definitions
+      integer(kind=im), intent(in) :: liqflag         ! see definitions
+
+      real(kind=rb), intent(in) :: cldfrac(:)         ! cloud fraction
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: ciwp(:)            ! cloud ice water path
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: clwp(:)            ! cloud liquid water path
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: rei(:)             ! cloud ice particle effective size (microns)
+                                                      !    Dimensions: (nlayers)
+                                                      ! specific definition of rei depends on setting of iceflag:
+                                                      ! iceflag = 0: (inactive)
+                                                      !              
+                                                      ! iceflag = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !              r_ec range is limited to 13.0 to 130.0 microns
+                                                      ! iceflag = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
+                                                      !              r_k range is limited to 5.0 to 131.0 microns
+                                                      ! iceflag = 3: generalized effective size, dge, (Fu, 1996),
+                                                      !              dge range is limited to 5.0 to 140.0 microns
+                                                      !              [dge = 1.0315 * r_ec]
+      real(kind=rb), intent(in) :: rel(:)             ! cloud liquid particle effective radius (microns)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tauc(:,:)          ! cloud optical depth
+                                                      !    Dimensions: (nbndsw,nlayers)
+      real(kind=rb), intent(in) :: ssac(:,:)          ! single scattering albedo
+                                                      !    Dimensions: (nbndsw,nlayers)
+      real(kind=rb), intent(in) :: asmc(:,:)          ! asymmetry parameter
+                                                      !    Dimensions: (nbndsw,nlayers)
+      real(kind=rb), intent(in) :: fsfc(:,:)          ! forward scattering fraction
+                                                      !    Dimensions: (nbndsw,nlayers)
+
+! ------- Output -------
+
+      real(kind=rb), intent(out) :: taucloud(:,:)     ! cloud optical depth (delta scaled)
+                                                      !    Dimensions: (nlayers,jpband)
+      real(kind=rb), intent(out) :: taucldorig(:,:)   ! cloud optical depth (non-delta scaled)
+                                                      !    Dimensions: (nlayers,jpband)
+      real(kind=rb), intent(out) :: ssacloud(:,:)     ! single scattering albedo (delta scaled)
+                                                      !    Dimensions: (nlayers,jpband)
+      real(kind=rb), intent(out) :: asmcloud(:,:)     ! asymmetry parameter (delta scaled)
+                                                      !    Dimensions: (nlayers,jpband)
+
+! ------- Local -------
+
+!      integer(kind=im) :: ncbands
+      integer(kind=im) :: ib, ib1, ib2, lay, istr, index, icx
+
+      real(kind=rb), parameter :: eps = 1.e-06_rb     ! epsilon
+      real(kind=rb), parameter :: cldmin = 1.e-20_rb  ! minimum value for cloud quantities
+      real(kind=rb) :: cwp                            ! total cloud water path
+      real(kind=rb) :: radliq                         ! cloud liquid droplet radius (microns)
+      real(kind=rb) :: radice                         ! cloud ice effective size (microns)
+      real(kind=rb) :: factor
+      real(kind=rb) :: fint
+      real(kind=rb) :: tauctot(nlayers)               ! band integrated cloud optical depth
+
+      real(kind=rb) :: taucldorig_a, ssacloud_a, taucloud_a, ffp, ffp1, ffpssa
+      real(kind=rb) :: tauiceorig, scatice, ssaice, tauice, tauliqorig, scatliq, ssaliq, tauliq
+
+      real(kind=rb) :: fdelta(jpb1:jpb2)
+      real(kind=rb) :: extcoice(jpb1:jpb2), gice(jpb1:jpb2)
+      real(kind=rb) :: ssacoice(jpb1:jpb2), forwice(jpb1:jpb2)
+      real(kind=rb) :: extcoliq(jpb1:jpb2), gliq(jpb1:jpb2)
+      real(kind=rb) :: ssacoliq(jpb1:jpb2), forwliq(jpb1:jpb2)
+
+! Initialize
+
+      hvrcld = '$Revision: 23308 $'
+
+!      ncbands = 29
+      ib1 = jpb1
+      ib2 = jpb2
+      tauctot(:) = 0._rb
+
+      do lay = 1, nlayers
+         do ib = ib1 , ib2
+            taucldorig(lay,ib) = tauc(ib-15,lay)
+            taucloud(lay,ib) = 0.0_rb
+            ssacloud(lay,ib) = 1.0_rb
+            asmcloud(lay,ib) = 0.0_rb
+            tauctot(lay) = tauctot(lay) + tauc(ib-15,lay)
+         enddo
+      enddo
+
+! Main layer loop
+      do lay = 1, nlayers
+
+         cwp = ciwp(lay) + clwp(lay)
+         if (cldfrac(lay) .ge. cldmin .and. &
+            (cwp .ge. cldmin .or. tauctot(lay) .ge. cldmin)) then
+
+! (inflag=0): Cloud optical properties input directly
+! Cloud optical properties already defined in tauc, ssac, asmc are unscaled;
+! Apply delta-M scaling here
+            if (inflag .eq. 0) then
+
+               do ib = ib1 , ib2
+                  taucldorig_a = tauc(ib-15,lay)
+                  ffp = fsfc(ib-15,lay)
+                  ffp1 = 1.0_rb - ffp
+                  ffpssa = 1.0_rb - ffp * ssac(ib-15,lay)
+                  ssacloud_a = ffp1 * ssac(ib-15,lay) / ffpssa
+                  taucloud_a = ffpssa * taucldorig_a
+
+                  taucldorig(lay,ib) = taucldorig_a
+                  ssacloud(lay,ib) = ssacloud_a
+                  taucloud(lay,ib) = taucloud_a
+                  asmcloud(lay,ib) = (asmc(ib-15,lay) - ffp) / (ffp1)
+               enddo
+
+! (inflag=2): Separate treatement of ice clouds and water clouds.
+            elseif (inflag .eq. 2) then       
+               radice = rei(lay)
+
+! Calculation of absorption coefficients due to ice clouds.
+               if (ciwp(lay) .eq. 0.0_rb) then
+                  do ib = ib1 , ib2
+                     extcoice(ib) = 0.0_rb
+                     ssacoice(ib) = 0.0_rb
+                     gice(ib)     = 0.0_rb
+                     forwice(ib)  = 0.0_rb
+                  enddo
+
+! (iceflag = 1): 
+! Note: This option uses Ebert and Curry approach for all particle sizes similar to
+! CAM3 implementation, though this is somewhat ineffective for large ice particles
+               elseif (iceflag .eq. 1) then
+                  if (radice .lt. 13.0_rb .or. radice .gt. 130._rb) stop &
+                     'ICE RADIUS OUT OF BOUNDS'
+                  do ib = ib1, ib2
+                     if (wavenum2(ib) .gt. 1.43e04_rb) then
+                        icx = 1
+                     elseif (wavenum2(ib) .gt. 7.7e03_rb) then
+                        icx = 2
+                     elseif (wavenum2(ib) .gt. 5.3e03_rb) then
+                        icx = 3
+                     elseif (wavenum2(ib) .gt. 4.0e03_rb) then
+                        icx = 4
+                     elseif (wavenum2(ib) .ge. 2.5e03_rb) then
+                        icx = 5
+                     endif
+                     extcoice(ib) = abari(icx) + bbari(icx)/radice
+                     ssacoice(ib) = 1._rb - cbari(icx) - dbari(icx) * radice
+                     gice(ib) = ebari(icx) + fbari(icx) * radice
+
+! Check to ensure upper limit of gice is within physical limits for large particles
+                     if (gice(ib) .ge. 1.0_rb) gice(ib) = 1.0_rb - eps
+                     forwice(ib) = gice(ib)*gice(ib)
+! Check to ensure all calculated quantities are within physical limits.
+                     if (extcoice(ib) .lt. 0.0_rb) stop 'ICE EXTINCTION LESS THAN 0.0'
+                     if (ssacoice(ib) .gt. 1.0_rb) stop 'ICE SSA GRTR THAN 1.0'
+                     if (ssacoice(ib) .lt. 0.0_rb) stop 'ICE SSA LESS THAN 0.0'
+                     if (gice(ib) .gt. 1.0_rb) stop 'ICE ASYM GRTR THAN 1.0'
+                     if (gice(ib) .lt. 0.0_rb) stop 'ICE ASYM LESS THAN 0.0'
+                  enddo
+
+! For iceflag=2 option, ice particle effective radius is limited to 5.0 to 131.0 microns
+
+               elseif (iceflag .eq. 2) then
+                  if (radice .lt. 5.0_rb .or. radice .gt. 131.0_rb) stop 'ICE RADIUS OUT OF BOUNDS'
+                  factor = (radice - 2._rb)/3._rb
+                  index = int(factor)
+                  if (index .eq. 43) index = 42
+                  fint = factor - real(index,kind=rb)
+                  do ib = ib1, ib2
+                     extcoice(ib) = extice2(index,ib) + fint * &
+                                   (extice2(index+1,ib) -  extice2(index,ib))
+                     ssacoice(ib) = ssaice2(index,ib) + fint * &
+                                   (ssaice2(index+1,ib) -  ssaice2(index,ib))
+                     gice(ib) = asyice2(index,ib) + fint * &
+                                   (asyice2(index+1,ib) -  asyice2(index,ib))
+                     forwice(ib) = gice(ib)*gice(ib)
+! Check to ensure all calculated quantities are within physical limits.
+                     if (extcoice(ib) .lt. 0.0_rb) stop 'ICE EXTINCTION LESS THAN 0.0'
+                     if (ssacoice(ib) .gt. 1.0_rb) stop 'ICE SSA GRTR THAN 1.0'
+                     if (ssacoice(ib) .lt. 0.0_rb) stop 'ICE SSA LESS THAN 0.0'
+                     if (gice(ib) .gt. 1.0_rb) stop 'ICE ASYM GRTR THAN 1.0'
+                     if (gice(ib) .lt. 0.0_rb) stop 'ICE ASYM LESS THAN 0.0'
+                  enddo
+
+! For iceflag=3 option, ice particle generalized effective size is limited to 5.0 to 140.0 microns
+
+               elseif (iceflag .eq. 3) then
+                  if (radice .lt. 5.0_rb .or. radice .gt. 140.0_rb) stop 'ICE GENERALIZED EFFECTIVE SIZE OUT OF BOUNDS'
+                  factor = (radice - 2._rb)/3._rb
+                  index = int(factor)
+                  if (index .eq. 46) index = 45
+                  fint = factor - real(index,kind=rb)
+                  do ib = ib1 , ib2
+                     extcoice(ib) = extice3(index,ib) + fint * &
+                                   (extice3(index+1,ib) - extice3(index,ib))
+                     ssacoice(ib) = ssaice3(index,ib) + fint * &
+                                   (ssaice3(index+1,ib) - ssaice3(index,ib))
+                     gice(ib) = asyice3(index,ib) + fint * &
+                               (asyice3(index+1,ib) - asyice3(index,ib))
+                     fdelta(ib) = fdlice3(index,ib) + fint * &
+                                 (fdlice3(index+1,ib) - fdlice3(index,ib))
+                     if (fdelta(ib) .lt. 0.0_rb) stop 'FDELTA LESS THAN 0.0'
+                     if (fdelta(ib) .gt. 1.0_rb) stop 'FDELTA GT THAN 1.0'                     
+                     forwice(ib) = fdelta(ib) + 0.5_rb / ssacoice(ib)
+! See Fu 1996 p. 2067 
+                     if (forwice(ib) .gt. gice(ib)) forwice(ib) = gice(ib)
+! Check to ensure all calculated quantities are within physical limits.
+                     if (extcoice(ib) .lt. 0.0_rb) stop 'ICE EXTINCTION LESS THAN 0.0'
+                     if (ssacoice(ib) .gt. 1.0_rb) stop 'ICE SSA GRTR THAN 1.0'
+                     if (ssacoice(ib) .lt. 0.0_rb) stop 'ICE SSA LESS THAN 0.0'
+                     if (gice(ib) .gt. 1.0_rb) stop 'ICE ASYM GRTR THAN 1.0'
+                     if (gice(ib) .lt. 0.0_rb) stop 'ICE ASYM LESS THAN 0.0'
+                  enddo
+
+               endif
+                  
+! Calculation of absorption coefficients due to water clouds.
+                if (clwp(lay) .eq. 0.0_rb) then
+                   do ib = ib1 , ib2
+                      extcoliq(ib) = 0.0_rb
+                      ssacoliq(ib) = 0.0_rb
+                      gliq(ib) = 0.0_rb
+                      forwliq(ib) = 0.0_rb
+                   enddo
+
+                elseif (liqflag .eq. 1) then
+                   radliq = rel(lay)
+                   if (radliq .lt. 2.5_rb .or. radliq .gt. 60._rb) stop &
+                      'LIQUID EFFECTIVE RADIUS OUT OF BOUNDS'
+                   index = int(radliq - 1.5_rb)
+                   if (index .eq. 0) index = 1
+                   if (index .eq. 58) index = 57
+                   fint = radliq - 1.5_rb - real(index,kind=rb)
+                   do ib = ib1 , ib2
+                      extcoliq(ib) = extliq1(index,ib) + fint * &
+                                    (extliq1(index+1,ib) - extliq1(index,ib))
+                      ssacoliq(ib) = ssaliq1(index,ib) + fint * &
+                                    (ssaliq1(index+1,ib) - ssaliq1(index,ib))
+                      if (fint .lt. 0._rb .and. ssacoliq(ib) .gt. 1._rb) &
+                                     ssacoliq(ib) = ssaliq1(index,ib)
+                      gliq(ib) = asyliq1(index,ib) + fint * &
+                                (asyliq1(index+1,ib) - asyliq1(index,ib))
+                      forwliq(ib) = gliq(ib)*gliq(ib)
+! Check to ensure all calculated quantities are within physical limits.
+                      if (extcoliq(ib) .lt. 0.0_rb) stop 'LIQUID EXTINCTION LESS THAN 0.0'
+                      if (ssacoliq(ib) .gt. 1.0_rb) stop 'LIQUID SSA GRTR THAN 1.0'
+                      if (ssacoliq(ib) .lt. 0.0_rb) stop 'LIQUID SSA LESS THAN 0.0'
+                      if (gliq(ib) .gt. 1.0_rb) stop 'LIQUID ASYM GRTR THAN 1.0'
+                      if (gliq(ib) .lt. 0.0_rb) stop 'LIQUID ASYM LESS THAN 0.0'
+                   enddo
+                endif
+
+                do ib = ib1 , ib2
+                   tauliqorig = clwp(lay) * extcoliq(ib)
+                   tauiceorig = ciwp(lay) * extcoice(ib)
+                   taucldorig(lay,ib) = tauliqorig + tauiceorig
+
+                   ssaliq = ssacoliq(ib) * (1.0_rb - forwliq(ib)) / &
+                           (1.0_rb - forwliq(ib) * ssacoliq(ib))
+                   tauliq = (1.0_rb - forwliq(ib) * ssacoliq(ib)) * tauliqorig
+                   ssaice = ssacoice(ib) * (1.0_rb - forwice(ib)) / &
+                           (1.0_rb - forwice(ib) * ssacoice(ib))
+                   tauice = (1.0_rb - forwice(ib) * ssacoice(ib)) * tauiceorig
+
+                   scatliq = ssaliq * tauliq
+                   scatice = ssaice * tauice
+
+                   taucloud(lay,ib) = tauliq + tauice
+
+! Ensure non-zero taucmc and scatice
+                   if (taucloud(lay,ib).eq.0.0_rb) taucloud(lay,ib) = cldmin
+                   if (scatice.eq.0.0_rb) scatice = cldmin
+
+                   ssacloud(lay,ib) = (scatliq + scatice) / taucloud(lay,ib)
+
+                   if (iceflag .eq. 3) then
+! In accordance with the 1996 Fu paper, equation A.3, 
+! the moments for ice were calculated depending on whether using spheres
+! or hexagonal ice crystals.
+                      istr = 1
+                      asmcloud(lay,ib) = (1.0_rb/(scatliq+scatice)) * &
+                         (scatliq*(gliq(ib)**istr - forwliq(ib)) / &
+                         (1.0_rb - forwliq(ib)) + scatice * ((gice(ib)-forwice(ib)) / &
+                         (1.0_rb - forwice(ib)))**istr)
+                   else 
+! This code is the standard method for delta-m scaling. 
+                      istr = 1
+                      asmcloud(lay,ib) = (scatliq *  &
+                         (gliq(ib)**istr - forwliq(ib)) / &
+                         (1.0_rb - forwliq(ib)) + scatice * (gice(ib)**istr - forwice(ib)) / &
+                         (1.0_rb - forwice(ib)))/(scatliq + scatice)
+                   endif 
+
+                enddo
+
+            endif
+
+         endif
+
+! End layer loop
+      enddo
+
+      end subroutine cldprop_sw
+
+      end module rrtmg_sw_cldprop
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_init.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_init.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_init.f90	(revision 3477)
@@ -0,0 +1,3345 @@
+!     path:      $Source$
+!     author:    $Author: miacono $
+!     revision:  $Revision: 23308 $
+!     created:   $Date: 2013-12-27 17:23:51 -0500 (Fri, 27 Dec 2013) $
+
+      module rrtmg_sw_init
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+      use parkind, only : im => kind_im, rb => kind_rb
+      use rrsw_wvn
+      use rrtmg_sw_setcoef, only: swatmref
+
+      implicit none
+
+      contains
+
+! **************************************************************************
+      subroutine rrtmg_sw_ini(cpdair)
+! **************************************************************************
+!
+!  Original version:   Michael J. Iacono; February, 2004
+!  Revision for F90 formatting:  M. J. Iacono, July, 2006
+!
+!  This subroutine performs calculations necessary for the initialization
+!  of the shortwave model.  Lookup tables are computed for use in the SW
+!  radiative transfer, and input absorption coefficient data for each
+!  spectral band are reduced from 224 g-point intervals to 112.
+! **************************************************************************
+
+      use parrrsw, only : mg, nbndsw, ngptsw
+      use rrsw_tbl, only: ntbl, tblint, pade, bpade, tau_tbl, exp_tbl
+      use rrsw_vsn, only: hvrini, hnamini
+
+      real(kind=rb), intent(in) :: cpdair     ! Specific heat capacity of dry air
+                                              ! at constant pressure at 273 K
+                                              ! (J kg-1 K-1)
+
+! ------- Local -------
+
+      integer(kind=im) :: ibnd, igc, ig, ind, ipr
+      integer(kind=im) :: igcsm, iprsm
+      integer(kind=im) :: itr
+
+      real(kind=rb) :: wtsum, wtsm(mg)
+      real(kind=rb) :: tfn
+
+      real(kind=rb), parameter :: expeps = 1.e-20_rb   ! Smallest value for exponential table
+
+! ------- Definitions -------
+!     Arrays for 10000-point look-up tables:
+!     TAU_TBL  Clear-sky optical depth 
+!     EXP_TBL  Exponential lookup table for transmittance
+!     PADE     Pade approximation constant (= 0.278)
+!     BPADE    Inverse of the Pade approximation constant
+!
+
+      hvrini = '$Revision: 23308 $'
+
+! Initialize model data
+      call swdatinit(cpdair)
+      call swcmbdat              ! g-point interval reduction data
+      call swaerpr               ! aerosol optical properties
+      call swcldpr               ! cloud optical properties
+      call swatmref              ! reference MLS profile
+      call sw_kgb16              ! molecular absorption coefficients
+      call sw_kgb17
+      call sw_kgb18
+      call sw_kgb19
+      call sw_kgb20
+      call sw_kgb21
+      call sw_kgb22
+      call sw_kgb23
+      call sw_kgb24
+      call sw_kgb25
+      call sw_kgb26
+      call sw_kgb27
+      call sw_kgb28
+      call sw_kgb29
+
+! Define exponential lookup tables for transmittance. Tau is
+! computed as a function of the tau transition function, and transmittance 
+! is calculated as a function of tau.  All tables are computed at intervals 
+! of 0.0001.  The inverse of the constant used in the Pade approximation to 
+! the tau transition function is set to bpade.
+
+      exp_tbl(0) = 1.0_rb
+      exp_tbl(ntbl) = expeps
+      bpade = 1.0_rb / pade
+      do itr = 1, ntbl-1
+         tfn = real(itr,kind=rb) / real(ntbl,kind=rb)
+         tau_tbl = bpade * tfn / (1._rb - tfn)
+         exp_tbl(itr) = exp(-tau_tbl)
+         if (exp_tbl(itr) .le. expeps) exp_tbl(itr) = expeps
+      enddo
+
+! Perform g-point reduction from 16 per band (224 total points) to
+! a band dependent number (112 total points) for all absorption
+! coefficient input data and Planck fraction input data.
+! Compute relative weighting for new g-point combinations.
+
+      igcsm = 0
+      do ibnd = 1,nbndsw
+         iprsm = 0
+         if (ngc(ibnd).lt.mg) then
+            do igc = 1,ngc(ibnd)
+               igcsm = igcsm + 1
+               wtsum = 0.
+               do ipr = 1, ngn(igcsm)
+                  iprsm = iprsm + 1
+                  wtsum = wtsum + wt(iprsm)
+               enddo
+               wtsm(igc) = wtsum
+            enddo
+            do ig = 1, ng(ibnd+15)
+               ind = (ibnd-1)*mg + ig
+               rwgt(ind) = wt(ig)/wtsm(ngm(ind))
+            enddo
+         else
+            do ig = 1, ng(ibnd+15)
+               igcsm = igcsm + 1
+               ind = (ibnd-1)*mg + ig
+               rwgt(ind) = 1.0_rb
+            enddo
+         endif
+      enddo
+
+! Reduce g-points for absorption coefficient data in each LW spectral band.
+
+      call cmbgb16s
+      call cmbgb17
+      call cmbgb18
+      call cmbgb19
+      call cmbgb20
+      call cmbgb21
+      call cmbgb22
+      call cmbgb23
+      call cmbgb24
+      call cmbgb25
+      call cmbgb26
+      call cmbgb27
+      call cmbgb28
+      call cmbgb29
+
+      end subroutine rrtmg_sw_ini
+
+!***************************************************************************
+      subroutine swdatinit(cpdair)
+!***************************************************************************
+
+! --------- Modules ----------
+
+      use rrsw_con, only: heatfac, grav, planck, boltz, &
+                          clight, avogad, alosmt, gascon, radcn1, radcn2, &
+                          sbcnst, secdy 
+      use rrsw_vsn
+
+      save 
+ 
+      real(kind=rb), intent(in) :: cpdair     ! Specific heat capacity of dry air
+                                              ! at constant pressure at 273 K
+                                              ! (J kg-1 K-1)
+
+! Shortwave spectral band limits (wavenumbers)
+      wavenum1(:) = (/2600._rb, 3250._rb, 4000._rb, 4650._rb, 5150._rb, 6150._rb, 7700._rb, &
+                      8050._rb,12850._rb,16000._rb,22650._rb,29000._rb,38000._rb,  820._rb/)
+      wavenum2(:) = (/3250._rb, 4000._rb, 4650._rb, 5150._rb, 6150._rb, 7700._rb, 8050._rb, &
+                     12850._rb,16000._rb,22650._rb,29000._rb,38000._rb,50000._rb, 2600._rb/)
+      delwave(:) =  (/ 650._rb,  750._rb,  650._rb,  500._rb, 1000._rb, 1550._rb,  350._rb, &
+                      4800._rb, 3150._rb, 6650._rb, 6350._rb, 9000._rb,12000._rb, 1780._rb/)
+
+! Spectral band information
+      ng(:) = (/16,16,16,16,16,16,16,16,16,16,16,16,16,16/)
+      nspa(:) = (/9,9,9,9,1,9,9,1,9,1,0,1,9,1/)
+      nspb(:) = (/1,5,1,1,1,5,1,0,1,0,0,1,5,1/)
+
+! Fundamental physical constants from NIST 2002
+
+      grav = 9.8066_rb                        ! Acceleration of gravity
+                                              ! (m s-2)
+      planck = 6.62606876e-27_rb              ! Planck constant
+                                              ! (ergs s; g cm2 s-1)
+      boltz = 1.3806503e-16_rb                ! Boltzmann constant
+                                              ! (ergs K-1; g cm2 s-2 K-1)
+      clight = 2.99792458e+10_rb              ! Speed of light in a vacuum  
+                                              ! (cm s-1)
+      avogad = 6.02214199e+23_rb              ! Avogadro constant
+                                              ! (mol-1)
+      alosmt = 2.6867775e+19_rb               ! Loschmidt constant
+                                              ! (cm-3)
+      gascon = 8.31447200e+07_rb              ! Molar gas constant
+                                              ! (ergs mol-1 K-1)
+      radcn1 = 1.191042772e-12_rb             ! First radiation constant
+                                              ! (W cm2 sr-1)
+      radcn2 = 1.4387752_rb                   ! Second radiation constant
+                                              ! (cm K)
+      sbcnst = 5.670400e-04_rb                ! Stefan-Boltzmann constant
+                                              ! (W cm-2 K-4)
+      secdy = 8.6400e4_rb                     ! Number of seconds per day
+                                              ! (s d-1)
+!
+!     units are generally cgs
+!
+!     The first and second radiation constants are taken from NIST.
+!     They were previously obtained from the relations:
+!          radcn1 = 2.*planck*clight*clight*1.e-07
+!          radcn2 = planck*clight/boltz
+
+!     Heatfac is the factor by which delta-flux / delta-pressure is
+!     multiplied, with flux in W/m-2 and pressure in mbar, to get 
+!     the heating rate in units of degrees/day.  It is equal to:
+!     Original value:
+!           (g)x(#sec/day)x(1e-5)/(specific heat of air at const. p)
+!           Here, cpdair (1.004) is in units of J g-1 K-1, and the 
+!           constant (1.e-5) converts mb to Pa and g-1 to kg-1.
+!        =  (9.8066)(86400)(1e-5)/(1.004)
+!      heatfac = 8.4391_rb
+!
+!     Modified value for consistency with CAM3:
+!           (g)x(#sec/day)x(1e-5)/(specific heat of air at const. p)
+!           Here, cpdair (1.00464) is in units of J g-1 K-1, and the
+!           constant (1.e-5) converts mb to Pa and g-1 to kg-1.
+!        =  (9.80616)(86400)(1e-5)/(1.00464)
+!      heatfac = 8.43339130434_rb
+!
+!     Calculated value (from constants above and input cpdair)
+!        (grav) x (#sec/day) / (specific heat of dry air at const. p x 1.e2)
+!           Here, cpdair is in units of J kg-1 K-1, and the constant (1.e2) 
+!           converts mb to Pa when heatfac is multiplied by W m-2 mb-1. 
+      heatfac = grav * secdy / (cpdair * 1.e2_rb)
+
+      end subroutine swdatinit
+
+!***************************************************************************
+      subroutine swcmbdat
+!***************************************************************************
+
+      save
+ 
+! ------- Definitions -------
+!     Arrays for the g-point reduction from 224 to 112 for the 16 LW bands:
+!     This mapping from 224 to 112 points has been carefully selected to 
+!     minimize the effect on the resulting fluxes and cooling rates, and
+!     caution should be used if the mapping is modified.  The full 224
+!     g-point set can be restored with ngpt=224, ngc=16*16, ngn=224*1., etc.
+!     ngpt    The total number of new g-points
+!     ngc     The number of new g-points in each band
+!     ngs     The cumulative sum of new g-points for each band
+!     ngm     The index of each new g-point relative to the original
+!             16 g-points for each band.  
+!     ngn     The number of original g-points that are combined to make
+!             each new g-point in each band.
+!     ngb     The band index for each new g-point.
+!     wt      RRTM weights for 16 g-points.
+
+! Use this set for 112 quadrature point (g-point) model
+! ------- Data statements -------
+      ngc(:) = (/ 6,12, 8, 8,10,10, 2,10, 8, 6, 6, 8, 6,12 /)
+      ngs(:) = (/ 6,18,26,34,44,54,56,66,74,80,86,94,100,112 /)
+      ngm(:) = (/ 1,1,2,2,3,3,4,4,5,5,5,5,6,6,6,6, &           ! band 16
+                  1,2,3,4,5,6,6,7,8,8,9,10,10,11,12,12, &      ! band 17
+                  1,2,3,4,5,5,6,6,7,7,7,7,8,8,8,8, &           ! band 18
+                  1,2,3,4,5,5,6,6,7,7,7,7,8,8,8,8, &           ! band 19
+                  1,2,3,4,5,6,7,8,9,9,10,10,10,10,10,10, &     ! band 20
+                  1,2,3,4,5,6,7,8,9,9,10,10,10,10,10,10, &     ! band 21
+                  1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2, &           ! band 22
+                  1,1,2,2,3,4,5,6,7,8,9,9,10,10,10,10, &       ! band 23
+                  1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8, &           ! band 24
+                  1,2,3,3,4,4,5,5,5,5,6,6,6,6,6,6, &           ! band 25
+                  1,2,3,3,4,4,5,5,5,5,6,6,6,6,6,6, &           ! band 26
+                  1,2,3,4,5,6,7,7,7,7,8,8,8,8,8,8, &           ! band 27
+                  1,2,3,3,4,4,5,5,5,5,6,6,6,6,6,6, &           ! band 28
+                  1,2,3,4,5,5,6,6,7,7,8,8,9,10,11,12 /)        ! band 29
+      ngn(:) = (/ 2,2,2,2,4,4, &                               ! band 16
+                  1,1,1,1,1,2,1,2,1,2,1,2, &                   ! band 17
+                  1,1,1,1,2,2,4,4, &                           ! band 18
+                  1,1,1,1,2,2,4,4, &                           ! band 19
+                  1,1,1,1,1,1,1,1,2,6, &                       ! band 20
+                  1,1,1,1,1,1,1,1,2,6, &                       ! band 21
+                  8,8, &                                       ! band 22
+                  2,2,1,1,1,1,1,1,2,4, &                       ! band 23
+                  2,2,2,2,2,2,2,2, &                           ! band 24
+                  1,1,2,2,4,6, &                               ! band 25
+                  1,1,2,2,4,6, &                               ! band 26
+                  1,1,1,1,1,1,4,6, &                           ! band 27
+                  1,1,2,2,4,6, &                               ! band 28
+                  1,1,1,1,2,2,2,2,1,1,1,1 /)                   ! band 29
+      ngb(:) = (/ 16,16,16,16,16,16, &                         ! band 16
+                  17,17,17,17,17,17,17,17,17,17,17,17, &       ! band 17
+                  18,18,18,18,18,18,18,18, &                   ! band 18
+                  19,19,19,19,19,19,19,19, &                   ! band 19
+                  20,20,20,20,20,20,20,20,20,20, &             ! band 20
+                  21,21,21,21,21,21,21,21,21,21, &             ! band 21
+                  22,22, &                                     ! band 22
+                  23,23,23,23,23,23,23,23,23,23, &             ! band 23
+                  24,24,24,24,24,24,24,24, &                   ! band 24
+                  25,25,25,25,25,25, &                         ! band 25
+                  26,26,26,26,26,26, &                         ! band 26
+                  27,27,27,27,27,27,27,27, &                   ! band 27
+                  28,28,28,28,28,28, &                         ! band 28
+                  29,29,29,29,29,29,29,29,29,29,29,29 /)       ! band 29
+
+! Use this set for full 224 quadrature point (g-point) model
+! ------- Data statements -------
+!      ngc(:) = (/ 16,16,16,16,16,16,16,16,16,16,16,16,16,16 /)
+!      ngs(:) = (/ 16,32,48,64,80,96,112,128,144,160,176,192,208,224 /)
+!      ngm(:) = (/ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 16
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 17
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 18
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 19
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 20
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 21
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 22
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 23
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 24
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 25
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 26
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 27
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16, &    ! band 28
+!                  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 /)    ! band 29
+!      ngn(:) = (/ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 16
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 17
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 18
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 19
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 20
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 21
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 22
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 23
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 24
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 25
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 26
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 27
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, &           ! band 28
+!                  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 /)           ! band 29
+!      ngb(:) = (/ 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16, &   ! band 16
+!                  17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17, &   ! band 17
+!                  18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, &   ! band 18
+!                  19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19, &   ! band 19
+!                  20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20, &   ! band 20
+!                  21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21, &   ! band 21
+!                  22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22, &   ! band 22
+!                  23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23, &   ! band 23
+!                  24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24, &   ! band 24
+!                  25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, &   ! band 25
+!                  26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, &   ! band 26
+!                  27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27, &   ! band 27
+!                  28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28, &   ! band 28
+!                  29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29 /)   ! band 29
+
+
+      wt(:) =  (/ 0.1527534276_rb, 0.1491729617_rb, 0.1420961469_rb, &
+                  0.1316886544_rb, 0.1181945205_rb, 0.1019300893_rb, &
+                  0.0832767040_rb, 0.0626720116_rb, 0.0424925000_rb, &
+                  0.0046269894_rb, 0.0038279891_rb, 0.0030260086_rb, &
+                  0.0022199750_rb, 0.0014140010_rb, 0.0005330000_rb, &
+                  0.0000750000_rb /)
+
+      end subroutine swcmbdat
+
+!***************************************************************************
+      subroutine swaerpr
+!***************************************************************************
+
+! Purpose: Define spectral aerosol properties for six ECMWF aerosol types
+! as used in the ECMWF IFS model (see module rrsw_aer.F90 for details)
+!
+! Original: Defined for rrtmg_sw 14 spectral bands, JJMorcrette, ECMWF Feb 2003
+! Revision: Reformatted for consistency with rrtmg_lw, MJIacono, AER, Jul 2006
+
+      use rrsw_aer, only : rsrtaua, rsrpiza, rsrasya
+
+      save
+
+      rsrtaua( 1, :) = (/ &
+        0.10849_rb, 0.66699_rb, 0.65255_rb, 0.11600_rb, 0.06529_rb, 0.04468_rb/)
+      rsrtaua( 2, :) = (/ &
+        0.10849_rb, 0.66699_rb, 0.65255_rb, 0.11600_rb, 0.06529_rb, 0.04468_rb/)
+      rsrtaua( 3, :) = (/ &
+        0.20543_rb, 0.84642_rb, 0.84958_rb, 0.21673_rb, 0.28270_rb, 0.10915_rb/)
+      rsrtaua( 4, :) = (/ &
+        0.20543_rb, 0.84642_rb, 0.84958_rb, 0.21673_rb, 0.28270_rb, 0.10915_rb/)
+      rsrtaua( 5, :) = (/ &
+        0.20543_rb, 0.84642_rb, 0.84958_rb, 0.21673_rb, 0.28270_rb, 0.10915_rb/)
+      rsrtaua( 6, :) = (/ &
+        0.20543_rb, 0.84642_rb, 0.84958_rb, 0.21673_rb, 0.28270_rb, 0.10915_rb/)
+      rsrtaua( 7, :) = (/ &
+        0.20543_rb, 0.84642_rb, 0.84958_rb, 0.21673_rb, 0.28270_rb, 0.10915_rb/)
+      rsrtaua( 8, :) = (/ &
+        0.52838_rb, 0.93285_rb, 0.93449_rb, 0.53078_rb, 0.67148_rb, 0.46608_rb/)
+      rsrtaua( 9, :) = (/ &
+        0.52838_rb, 0.93285_rb, 0.93449_rb, 0.53078_rb, 0.67148_rb, 0.46608_rb/)
+      rsrtaua(10, :) = (/ &
+        1.69446_rb, 1.11855_rb, 1.09212_rb, 1.72145_rb, 1.03858_rb, 1.12044_rb/)
+      rsrtaua(11, :) = (/ &
+        1.69446_rb, 1.11855_rb, 1.09212_rb, 1.72145_rb, 1.03858_rb, 1.12044_rb/)
+      rsrtaua(12, :) = (/ &
+        1.69446_rb, 1.11855_rb, 1.09212_rb, 1.72145_rb, 1.03858_rb, 1.12044_rb/)
+      rsrtaua(13, :) = (/ &
+        1.69446_rb, 1.11855_rb, 1.09212_rb, 1.72145_rb, 1.03858_rb, 1.12044_rb/)
+      rsrtaua(14, :) = (/ &
+        0.10849_rb, 0.66699_rb, 0.65255_rb, 0.11600_rb, 0.06529_rb, 0.04468_rb/)
+ 
+      rsrpiza( 1, :) = (/ &
+        .5230504_rb, .7868518_rb, .8531531_rb, .4048149_rb, .8748231_rb, .2355667_rb/)
+      rsrpiza( 2, :) = (/ &
+        .5230504_rb, .7868518_rb, .8531531_rb, .4048149_rb, .8748231_rb, .2355667_rb/)
+      rsrpiza( 3, :) = (/ &
+        .8287144_rb, .9949396_rb, .9279543_rb, .6765051_rb, .9467578_rb, .9955938_rb/)
+      rsrpiza( 4, :) = (/ &
+        .8287144_rb, .9949396_rb, .9279543_rb, .6765051_rb, .9467578_rb, .9955938_rb/)
+      rsrpiza( 5, :) = (/ &
+        .8287144_rb, .9949396_rb, .9279543_rb, .6765051_rb, .9467578_rb, .9955938_rb/)
+      rsrpiza( 6, :) = (/ &
+        .8287144_rb, .9949396_rb, .9279543_rb, .6765051_rb, .9467578_rb, .9955938_rb/)
+      rsrpiza( 7, :) = (/ &
+        .8287144_rb, .9949396_rb, .9279543_rb, .6765051_rb, .9467578_rb, .9955938_rb/)
+      rsrpiza( 8, :) = (/ &
+        .8970131_rb, .9984940_rb, .9245594_rb, .7768385_rb, .9532763_rb, .9999999_rb/)
+      rsrpiza( 9, :) = (/ &
+        .8970131_rb, .9984940_rb, .9245594_rb, .7768385_rb, .9532763_rb, .9999999_rb/)
+      rsrpiza(10, :) = (/ &
+        .9148907_rb, .9956173_rb, .7504584_rb, .8131335_rb, .9401905_rb, .9999999_rb/)
+      rsrpiza(11, :) = (/ &
+        .9148907_rb, .9956173_rb, .7504584_rb, .8131335_rb, .9401905_rb, .9999999_rb/)
+      rsrpiza(12, :) = (/ &
+        .9148907_rb, .9956173_rb, .7504584_rb, .8131335_rb, .9401905_rb, .9999999_rb/)
+      rsrpiza(13, :) = (/ &
+        .9148907_rb, .9956173_rb, .7504584_rb, .8131335_rb, .9401905_rb, .9999999_rb/)
+      rsrpiza(14, :) = (/ &
+        .5230504_rb, .7868518_rb, .8531531_rb, .4048149_rb, .8748231_rb, .2355667_rb/)
+
+      rsrasya( 1, :) = (/ &
+        0.700610_rb, 0.818871_rb, 0.702399_rb, 0.689886_rb, .4629866_rb, .1907639_rb/)
+      rsrasya( 2, :) = (/ &
+        0.700610_rb, 0.818871_rb, 0.702399_rb, 0.689886_rb, .4629866_rb, .1907639_rb/)
+      rsrasya( 3, :) = (/ &
+        0.636342_rb, 0.802467_rb, 0.691305_rb, 0.627497_rb, .6105750_rb, .4760794_rb/)
+      rsrasya( 4, :) = (/ &
+        0.636342_rb, 0.802467_rb, 0.691305_rb, 0.627497_rb, .6105750_rb, .4760794_rb/)
+      rsrasya( 5, :) = (/ &
+        0.636342_rb, 0.802467_rb, 0.691305_rb, 0.627497_rb, .6105750_rb, .4760794_rb/)
+      rsrasya( 6, :) = (/ &
+        0.636342_rb, 0.802467_rb, 0.691305_rb, 0.627497_rb, .6105750_rb, .4760794_rb/)
+      rsrasya( 7, :) = (/ &
+        0.636342_rb, 0.802467_rb, 0.691305_rb, 0.627497_rb, .6105750_rb, .4760794_rb/)
+      rsrasya( 8, :) = (/ &
+        0.668431_rb, 0.788530_rb, 0.698682_rb, 0.657422_rb, .6735182_rb, .6519706_rb/)
+      rsrasya( 9, :) = (/ &
+        0.668431_rb, 0.788530_rb, 0.698682_rb, 0.657422_rb, .6735182_rb, .6519706_rb/)
+      rsrasya(10, :) = (/ &
+        0.729019_rb, 0.803129_rb, 0.784592_rb, 0.712208_rb, .7008249_rb, .7270548_rb/)
+      rsrasya(11, :) = (/ &
+        0.729019_rb, 0.803129_rb, 0.784592_rb, 0.712208_rb, .7008249_rb, .7270548_rb/)
+      rsrasya(12, :) = (/ &
+        0.729019_rb, 0.803129_rb, 0.784592_rb, 0.712208_rb, .7008249_rb, .7270548_rb/)
+      rsrasya(13, :) = (/ &
+        0.729019_rb, 0.803129_rb, 0.784592_rb, 0.712208_rb, .7008249_rb, .7270548_rb/)
+      rsrasya(14, :) = (/ &
+        0.700610_rb, 0.818871_rb, 0.702399_rb, 0.689886_rb, .4629866_rb, .1907639_rb/)
+
+      end subroutine swaerpr
+ 
+!***************************************************************************
+      subroutine cmbgb16s
+!***************************************************************************
+!
+!  Original version:       MJIacono; July 1998
+!  Revision for RRTM_SW:   MJIacono; November 2002
+!  Revision for RRTMG_SW:  MJIacono; December 2003
+!  Revision for F90 reformatting:  MJIacono; July 2006
+!
+!  The subroutines CMBGB16->CMBGB29 input the absorption coefficient
+!  data for each band, which are defined for 16 g-points and 14 spectral
+!  bands. The data are combined with appropriate weighting following the
+!  g-point mapping arrays specified in RRTMG_SW_INIT.  Solar source 
+!  function data in array SFLUXREF are combined without weighting.  All
+!  g-point reduced data are put into new arrays for use in RRTMG_SW.
+!
+!  band 16:  2600-3250 cm-1 (low key- h2o,ch4; high key - ch4)
+!
+!-----------------------------------------------------------------------
+
+      use rrsw_kg16, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(1)
+                  sumk = 0.
+                  do ipr = 1, ngn(igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(1)
+               sumk = 0.
+               do ipr = 1, ngn(igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(1)
+            sumk = 0.
+            do ipr = 1, ngn(igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,3
+         iprsm = 0
+         do igc = 1,ngc(1)
+            sumk = 0.
+            do ipr = 1, ngn(igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(1)
+         sumf = 0.
+         do ipr = 1, ngn(igc)
+            iprsm = iprsm + 1
+            sumf = sumf + sfluxrefo(iprsm)
+         enddo
+         sfluxref(igc) = sumf
+      enddo
+
+      end subroutine cmbgb16s
+
+!***************************************************************************
+      subroutine cmbgb17
+!***************************************************************************
+!
+!     band 17:  3250-4000 cm-1 (low - h2o,co2; high - h2o,co2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg17, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(2)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(1)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+16)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,5
+         do jt = 1,5
+            do jp = 13,59
+               iprsm = 0
+               do igc = 1,ngc(2)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(1)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kbo(jn,jt,jp,iprsm)*rwgt(iprsm+16)
+                  enddo
+                  kb(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(2)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(1)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+16)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(2)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(1)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+16)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,5
+         iprsm = 0
+         do igc = 1,ngc(2)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(1)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + sfluxrefo(iprsm,jp)
+            enddo
+            sfluxref(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb17
+
+!***************************************************************************
+      subroutine cmbgb18
+!***************************************************************************
+!
+!     band 18:  4000-4650 cm-1 (low - h2o,ch4; high - ch4)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg18, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(3)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(2)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+32)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(3)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(2)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+32)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+32)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,3
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+32)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(3)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(2)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + sfluxrefo(iprsm,jp)
+            enddo
+            sfluxref(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb18
+
+!***************************************************************************
+      subroutine cmbgb19
+!***************************************************************************
+!
+!     band 19:  4650-5150 cm-1 (low - h2o,co2; high - co2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg19, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(4)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(3)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+48)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(4)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(3)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+48)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+48)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,3
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+48)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(4)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(3)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + sfluxrefo(iprsm,jp)
+            enddo
+            sfluxref(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb19
+
+!***************************************************************************
+      subroutine cmbgb20
+!***************************************************************************
+!
+!     band 20:  5150-6150 cm-1 (low - h2o; high - h2o)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg20, only : kao, kbo, selfrefo, forrefo, sfluxrefo, absch4o, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref, absch4
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(5)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(4)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+64)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(5)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(4)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+64)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(5)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(4)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+64)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(5)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(4)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+64)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(5)
+         sumf1 = 0.
+         sumf2 = 0.
+         do ipr = 1, ngn(ngs(4)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + sfluxrefo(iprsm)
+            sumf2 = sumf2 + absch4o(iprsm)*rwgt(iprsm+64)
+         enddo
+         sfluxref(igc) = sumf1
+         absch4(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb20
+
+!***************************************************************************
+      subroutine cmbgb21
+!***************************************************************************
+!
+!     band 21:  6150-7700 cm-1 (low - h2o,co2; high - h2o,co2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg21, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(6)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(5)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+80)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,5
+         do jt = 1,5
+            do jp = 13,59
+               iprsm = 0
+               do igc = 1,ngc(6)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(5)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kbo(jn,jt,jp,iprsm)*rwgt(iprsm+80)
+                  enddo
+                  kb(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(6)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(5)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+80)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(6)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(5)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+80)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(6)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(5)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + sfluxrefo(iprsm,jp)
+            enddo
+            sfluxref(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb21
+
+!***************************************************************************
+      subroutine cmbgb22
+!***************************************************************************
+!
+!     band 22:  7700-8050 cm-1 (low - h2o,o2; high - o2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg22, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(7)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(6)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+96)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(7)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(6)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+96)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+96)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,3
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+96)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(7)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(6)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + sfluxrefo(iprsm,jp)
+            enddo
+            sfluxref(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb22
+
+!***************************************************************************
+      subroutine cmbgb23
+!***************************************************************************
+!
+!     band 23:  8050-12850 cm-1 (low - h2o; high - nothing)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg23, only : kao, selfrefo, forrefo, sfluxrefo, raylo, &
+                            absa, ka, selfref, forref, sfluxref, rayl
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(8)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(7)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+112)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(8)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(7)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+112)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,3
+         iprsm = 0
+         do igc = 1,ngc(8)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(7)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+112)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(8)
+         sumf1 = 0.
+         sumf2 = 0.
+         do ipr = 1, ngn(ngs(7)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + sfluxrefo(iprsm)
+            sumf2 = sumf2 + raylo(iprsm)*rwgt(iprsm+112)
+         enddo
+         sfluxref(igc) = sumf1
+         rayl(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb23
+
+!***************************************************************************
+      subroutine cmbgb24
+!***************************************************************************
+!
+!     band 24:  12850-16000 cm-1 (low - h2o,o2; high - o2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg24, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            abso3ao, abso3bo, raylao, raylbo, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref, &
+                            abso3a, abso3b, rayla, raylb
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf1, sumf2, sumf3
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(9)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(8)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+128)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,5
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(9)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(8)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+128)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+128)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,3
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+128)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(9)
+         sumf1 = 0.
+         sumf2 = 0.
+         sumf3 = 0.
+         do ipr = 1, ngn(ngs(8)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + raylbo(iprsm)*rwgt(iprsm+128)
+            sumf2 = sumf2 + abso3ao(iprsm)*rwgt(iprsm+128)
+            sumf3 = sumf3 + abso3bo(iprsm)*rwgt(iprsm+128)
+         enddo
+         raylb(igc) = sumf1
+         abso3a(igc) = sumf2
+         abso3b(igc) = sumf3
+      enddo
+
+      do jp = 1,9
+         iprsm = 0
+         do igc = 1,ngc(9)
+            sumf1 = 0.
+            sumf2 = 0.
+            do ipr = 1, ngn(ngs(8)+igc)
+               iprsm = iprsm + 1
+               sumf1 = sumf1 + sfluxrefo(iprsm,jp)
+               sumf2 = sumf2 + raylao(iprsm,jp)*rwgt(iprsm+128)
+            enddo
+            sfluxref(igc,jp) = sumf1
+            rayla(igc,jp) = sumf2
+         enddo
+      enddo
+
+      end subroutine cmbgb24
+
+!***************************************************************************
+      subroutine cmbgb25
+!***************************************************************************
+!
+!     band 25:  16000-22650 cm-1 (low - h2o; high - nothing)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg25, only : kao, sfluxrefo, &
+                            abso3ao, abso3bo, raylo, &
+                            absa, ka, sfluxref, &
+                            abso3a, abso3b, rayl
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf1, sumf2, sumf3, sumf4
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(10)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(9)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+144)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(10)
+         sumf1 = 0.
+         sumf2 = 0.
+         sumf3 = 0.
+         sumf4 = 0.
+         do ipr = 1, ngn(ngs(9)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + sfluxrefo(iprsm)
+            sumf2 = sumf2 + abso3ao(iprsm)*rwgt(iprsm+144)
+            sumf3 = sumf3 + abso3bo(iprsm)*rwgt(iprsm+144)
+            sumf4 = sumf4 + raylo(iprsm)*rwgt(iprsm+144)
+         enddo
+         sfluxref(igc) = sumf1
+         abso3a(igc) = sumf2
+         abso3b(igc) = sumf3
+         rayl(igc) = sumf4
+      enddo
+
+      end subroutine cmbgb25
+
+!***************************************************************************
+      subroutine cmbgb26
+!***************************************************************************
+!
+!     band 26:  22650-29000 cm-1 (low - nothing; high - nothing)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg26, only : sfluxrefo, raylo, &
+                            sfluxref, rayl
+
+! ------- Local -------
+      integer(kind=im) :: igc, ipr, iprsm
+      real(kind=rb) :: sumf1, sumf2
+
+
+      iprsm = 0
+      do igc = 1,ngc(11)
+         sumf1 = 0.
+         sumf2 = 0.
+         do ipr = 1, ngn(ngs(10)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + raylo(iprsm)*rwgt(iprsm+160)
+            sumf2 = sumf2 + sfluxrefo(iprsm)
+         enddo
+         rayl(igc) = sumf1
+         sfluxref(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb26
+
+!***************************************************************************
+      subroutine cmbgb27
+!***************************************************************************
+!
+!     band 27:  29000-38000 cm-1 (low - o3; high - o3)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg27, only : kao, kbo, sfluxrefo, raylo, &
+                            absa, ka, absb, kb, sfluxref, rayl
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf1, sumf2
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(12)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(11)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+176)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(12)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(11)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+176)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(12)
+         sumf1 = 0.
+         sumf2 = 0.
+         do ipr = 1, ngn(ngs(11)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + sfluxrefo(iprsm)
+            sumf2 = sumf2 + raylo(iprsm)*rwgt(iprsm+176)
+         enddo
+         sfluxref(igc) = sumf1
+         rayl(igc) = sumf2
+      enddo
+
+      end subroutine cmbgb27
+
+!***************************************************************************
+      subroutine cmbgb28
+!***************************************************************************
+!
+!     band 28:  38000-50000 cm-1 (low - o3,o2; high - o3,o2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg28, only : kao, kbo, sfluxrefo, &
+                            absa, ka, absb, kb, sfluxref
+
+! ------- Local -------
+      integer(kind=im) :: jn, jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf
+
+
+      do jn = 1,9
+         do jt = 1,5
+            do jp = 1,13
+               iprsm = 0
+               do igc = 1,ngc(13)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(12)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kao(jn,jt,jp,iprsm)*rwgt(iprsm+192)
+                  enddo
+                  ka(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jn = 1,5
+         do jt = 1,5
+            do jp = 13,59
+               iprsm = 0
+               do igc = 1,ngc(13)
+                  sumk = 0.
+                  do ipr = 1, ngn(ngs(12)+igc)
+                     iprsm = iprsm + 1
+                     sumk = sumk + kbo(jn,jt,jp,iprsm)*rwgt(iprsm+192)
+                  enddo
+                  kb(jn,jt,jp,igc) = sumk
+               enddo
+            enddo
+         enddo
+      enddo
+
+      do jp = 1,5
+         iprsm = 0
+         do igc = 1,ngc(13)
+            sumf = 0.
+            do ipr = 1, ngn(ngs(12)+igc)
+               iprsm = iprsm + 1
+               sumf = sumf + sfluxrefo(iprsm,jp)
+            enddo
+            sfluxref(igc,jp) = sumf
+         enddo
+      enddo
+
+      end subroutine cmbgb28
+
+!***************************************************************************
+      subroutine cmbgb29
+!***************************************************************************
+!
+!     band 29:  820-2600 cm-1 (low - h2o; high - co2)
+!-----------------------------------------------------------------------
+
+      use rrsw_kg29, only : kao, kbo, selfrefo, forrefo, sfluxrefo, &
+                            absh2oo, absco2o, &
+                            absa, ka, absb, kb, selfref, forref, sfluxref, &
+                            absh2o, absco2
+
+! ------- Local -------
+      integer(kind=im) :: jt, jp, igc, ipr, iprsm
+      real(kind=rb) :: sumk, sumf1, sumf2, sumf3
+
+
+      do jt = 1,5
+         do jp = 1,13
+            iprsm = 0
+            do igc = 1,ngc(14)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(13)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kao(jt,jp,iprsm)*rwgt(iprsm+208)
+               enddo
+               ka(jt,jp,igc) = sumk
+            enddo
+         enddo
+         do jp = 13,59
+            iprsm = 0
+            do igc = 1,ngc(14)
+               sumk = 0.
+               do ipr = 1, ngn(ngs(13)+igc)
+                  iprsm = iprsm + 1
+                  sumk = sumk + kbo(jt,jp,iprsm)*rwgt(iprsm+208)
+               enddo
+               kb(jt,jp,igc) = sumk
+            enddo
+         enddo
+      enddo
+
+      do jt = 1,10
+         iprsm = 0
+         do igc = 1,ngc(14)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(13)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + selfrefo(jt,iprsm)*rwgt(iprsm+208)
+            enddo
+            selfref(jt,igc) = sumk
+         enddo
+      enddo
+
+      do jt = 1,4
+         iprsm = 0
+         do igc = 1,ngc(14)
+            sumk = 0.
+            do ipr = 1, ngn(ngs(13)+igc)
+               iprsm = iprsm + 1
+               sumk = sumk + forrefo(jt,iprsm)*rwgt(iprsm+208)
+            enddo
+            forref(jt,igc) = sumk
+         enddo
+      enddo
+
+      iprsm = 0
+      do igc = 1,ngc(14)
+         sumf1 = 0.
+         sumf2 = 0.
+         sumf3 = 0.
+         do ipr = 1, ngn(ngs(13)+igc)
+            iprsm = iprsm + 1
+            sumf1 = sumf1 + sfluxrefo(iprsm)
+            sumf2 = sumf2 + absco2o(iprsm)*rwgt(iprsm+208)
+            sumf3 = sumf3 + absh2oo(iprsm)*rwgt(iprsm+208)
+         enddo
+         sfluxref(igc) = sumf1
+         absco2(igc) = sumf2
+         absh2o(igc) = sumf3
+      enddo
+
+      end subroutine cmbgb29
+
+!***********************************************************************
+      subroutine swcldpr
+!***********************************************************************
+
+! Purpose: Define cloud extinction coefficient, single scattering albedo
+!          and asymmetry parameter data.
+!
+
+! ------- Modules -------
+
+      use rrsw_cld, only : extliq1, ssaliq1, asyliq1, &
+                           extice2, ssaice2, asyice2, &
+                           extice3, ssaice3, asyice3, fdlice3, &
+                           abari, bbari, cbari, dbari, ebari, fbari
+
+      save
+
+!-----------------------------------------------------------------------
+!
+! Explanation of the method for each value of INFLAG.  A value of
+!  0 for INFLAG do not distingish being liquid and ice clouds.
+!  INFLAG = 2 does distinguish between liquid and ice clouds, and
+!    requires further user input to specify the method to be used to 
+!    compute the aborption due to each.
+!  INFLAG = 0:  For each cloudy layer, the cloud fraction, the cloud optical
+!    depth, the cloud single-scattering albedo, and the
+!    moments of the phase function (0:NSTREAM).  Note
+!    that these values are delta-m scaled within this
+!    subroutine.
+
+!  INFLAG = 2:  For each cloudy layer, the cloud fraction, cloud 
+!    water path (g/m2), and cloud ice fraction are input.
+!  ICEFLAG = 2:  The ice effective radius (microns) is input and the
+!    optical properties due to ice clouds are computed from
+!    the optical properties stored in the RT code, STREAMER v3.0 
+!    (Reference: Key. J., Streamer User's Guide, Cooperative 
+!    Institute for Meteorological Satellite Studies, 2001, 96 pp.).
+!    Valid range of values for re are between 5.0 and
+!    131.0 micron.
+!    This version uses Ebert and Curry, JGR, (1992) method for 
+!    ice particles larger than 131.0 microns. 
+!  ICEFLAG = 3:  The ice generalized effective size (dge) is input
+!    and the optical depths, single-scattering albedo,
+!    and phase function moments are calculated as in
+!    Q. Fu, J. Climate, (1996). Q. Fu provided high resolution
+!    tables which were appropriately averaged for the
+!    bands in RRTM_SW.  Linear interpolation is used to
+!    get the coefficients from the stored tables.
+!    Valid range of values for dge are between 5.0 and
+!    140.0 micron. 
+!    This version uses Ebert and Curry, JGR, (1992) method for 
+!    ice particles larger than 140.0 microns. 
+!  LIQFLAG = 1:  The water droplet effective radius (microns) is input 
+!    and the optical depths due to water clouds are computed 
+!    as in Hu and Stamnes, J., Clim., 6, 728-742, (1993) with
+!    modified coefficients derived from Mie scattering calculations. 
+!    The values for absorption coefficients appropriate for
+!    the spectral bands in RRTM/RRTMG have been obtained for a 
+!    range of effective radii by an averaging procedure 
+!    based on the work of J. Pinto (private communication).
+!    Linear interpolation is used to get the absorption 
+!    coefficients for the input effective radius.
+!
+!     ------------------------------------------------------------------
+
+! Everything below is for INFLAG = 2.
+
+! Coefficients for Ebert and Curry method
+      abari(:) = (/ &
+        & 3.448e-03_rb,3.448e-03_rb,3.448e-03_rb,3.448e-03_rb,3.448e-03_rb /)
+      bbari(:) = (/ &
+        & 2.431e+00_rb,2.431e+00_rb,2.431e+00_rb,2.431e+00_rb,2.431e+00_rb /)
+      cbari(:) = (/ &
+        & 1.000e-05_rb,1.100e-04_rb,1.240e-02_rb,3.779e-02_rb,4.666e-01_rb /)
+      dbari(:) = (/ &
+        & 0.000e+00_rb,1.405e-05_rb,6.867e-04_rb,1.284e-03_rb,2.050e-05_rb /)
+      ebari(:) = (/ &
+        & 7.661e-01_rb,7.730e-01_rb,7.865e-01_rb,8.172e-01_rb,9.595e-01_rb /)
+      fbari(:) = (/ &
+        & 5.851e-04_rb,5.665e-04_rb,7.204e-04_rb,7.463e-04_rb,1.076e-04_rb /)
+
+! LIQFLAG==1 extinction coefficients, single scattering albedos, and asymmetry parameters
+!   Derived from on Mie scattering computations; based on Hu & Stamnes coefficients
+!     BAND  16
+      extliq1(:, 16) = (/ &
+        & 9.004493E-01_rb,6.366723E-01_rb,4.542354E-01_rb,3.468253E-01_rb,2.816431E-01_rb,&
+        & 2.383415E-01_rb,2.070854E-01_rb,1.831854E-01_rb,1.642115E-01_rb,1.487539E-01_rb,&
+        & 1.359169E-01_rb,1.250900E-01_rb,1.158354E-01_rb,1.078400E-01_rb,1.008646E-01_rb,&
+        & 9.472307E-02_rb,8.928000E-02_rb,8.442308E-02_rb,8.005924E-02_rb,7.612231E-02_rb,&
+        & 7.255153E-02_rb,6.929539E-02_rb,6.631769E-02_rb,6.358153E-02_rb,6.106231E-02_rb,&
+        & 5.873077E-02_rb,5.656924E-02_rb,5.455769E-02_rb,5.267846E-02_rb,5.091923E-02_rb,&
+        & 4.926692E-02_rb,4.771154E-02_rb,4.623923E-02_rb,4.484385E-02_rb,4.351539E-02_rb,&
+        & 4.224615E-02_rb,4.103385E-02_rb,3.986538E-02_rb,3.874077E-02_rb,3.765462E-02_rb,&
+        & 3.660077E-02_rb,3.557384E-02_rb,3.457615E-02_rb,3.360308E-02_rb,3.265000E-02_rb,&
+        & 3.171770E-02_rb,3.080538E-02_rb,2.990846E-02_rb,2.903000E-02_rb,2.816461E-02_rb,&
+        & 2.731539E-02_rb,2.648231E-02_rb,2.566308E-02_rb,2.485923E-02_rb,2.407000E-02_rb,&
+        & 2.329615E-02_rb,2.253769E-02_rb,2.179615E-02_rb /)
+!     BAND  17
+      extliq1(:, 17) = (/ &
+       & 6.741200e-01_rb,5.390739e-01_rb,4.198767e-01_rb,3.332553e-01_rb,2.735633e-01_rb,&
+       & 2.317727e-01_rb,2.012760e-01_rb,1.780400e-01_rb,1.596927e-01_rb,1.447980e-01_rb,&
+       & 1.324480e-01_rb,1.220347e-01_rb,1.131327e-01_rb,1.054313e-01_rb,9.870534e-02_rb,&
+       & 9.278200e-02_rb,8.752599e-02_rb,8.282933e-02_rb,7.860600e-02_rb,7.479133e-02_rb,&
+       & 7.132800e-02_rb,6.816733e-02_rb,6.527401e-02_rb,6.261266e-02_rb,6.015934e-02_rb,&
+       & 5.788867e-02_rb,5.578134e-02_rb,5.381667e-02_rb,5.198133e-02_rb,5.026067e-02_rb,&
+       & 4.864466e-02_rb,4.712267e-02_rb,4.568066e-02_rb,4.431200e-02_rb,4.300867e-02_rb,&
+       & 4.176600e-02_rb,4.057400e-02_rb,3.942534e-02_rb,3.832066e-02_rb,3.725068e-02_rb,&
+       & 3.621400e-02_rb,3.520533e-02_rb,3.422333e-02_rb,3.326400e-02_rb,3.232467e-02_rb,&
+       & 3.140535e-02_rb,3.050400e-02_rb,2.962000e-02_rb,2.875267e-02_rb,2.789800e-02_rb,&
+       & 2.705934e-02_rb,2.623667e-02_rb,2.542667e-02_rb,2.463200e-02_rb,2.385267e-02_rb,&
+       & 2.308667e-02_rb,2.233667e-02_rb,2.160067e-02_rb /)
+!     BAND  18
+      extliq1(:, 18) = (/ &
+       & 9.250861e-01_rb,6.245692e-01_rb,4.347038e-01_rb,3.320208e-01_rb,2.714869e-01_rb,&
+       & 2.309516e-01_rb,2.012592e-01_rb,1.783315e-01_rb,1.600369e-01_rb,1.451000e-01_rb,&
+       & 1.326838e-01_rb,1.222069e-01_rb,1.132554e-01_rb,1.055146e-01_rb,9.876000e-02_rb,&
+       & 9.281386e-02_rb,8.754000e-02_rb,8.283078e-02_rb,7.860077e-02_rb,7.477769e-02_rb,&
+       & 7.130847e-02_rb,6.814461e-02_rb,6.524615e-02_rb,6.258462e-02_rb,6.012847e-02_rb,&
+       & 5.785462e-02_rb,5.574231e-02_rb,5.378000e-02_rb,5.194461e-02_rb,5.022462e-02_rb,&
+       & 4.860846e-02_rb,4.708462e-02_rb,4.564154e-02_rb,4.427462e-02_rb,4.297231e-02_rb,&
+       & 4.172769e-02_rb,4.053693e-02_rb,3.939000e-02_rb,3.828462e-02_rb,3.721692e-02_rb,&
+       & 3.618000e-02_rb,3.517077e-02_rb,3.418923e-02_rb,3.323077e-02_rb,3.229154e-02_rb,&
+       & 3.137154e-02_rb,3.047154e-02_rb,2.959077e-02_rb,2.872308e-02_rb,2.786846e-02_rb,&
+       & 2.703077e-02_rb,2.620923e-02_rb,2.540077e-02_rb,2.460615e-02_rb,2.382693e-02_rb,&
+       & 2.306231e-02_rb,2.231231e-02_rb,2.157923e-02_rb /)
+!     BAND  19
+      extliq1(:, 19) = (/ &
+       & 9.298960e-01_rb,5.776460e-01_rb,4.083450e-01_rb,3.211160e-01_rb,2.666390e-01_rb,&
+       & 2.281990e-01_rb,1.993250e-01_rb,1.768080e-01_rb,1.587810e-01_rb,1.440390e-01_rb,&
+       & 1.317720e-01_rb,1.214150e-01_rb,1.125540e-01_rb,1.048890e-01_rb,9.819600e-02_rb,&
+       & 9.230201e-02_rb,8.706900e-02_rb,8.239698e-02_rb,7.819500e-02_rb,7.439899e-02_rb,&
+       & 7.095300e-02_rb,6.780700e-02_rb,6.492900e-02_rb,6.228600e-02_rb,5.984600e-02_rb,&
+       & 5.758599e-02_rb,5.549099e-02_rb,5.353801e-02_rb,5.171400e-02_rb,5.000500e-02_rb,&
+       & 4.840000e-02_rb,4.688500e-02_rb,4.545100e-02_rb,4.409300e-02_rb,4.279700e-02_rb,&
+       & 4.156100e-02_rb,4.037700e-02_rb,3.923800e-02_rb,3.813800e-02_rb,3.707600e-02_rb,&
+       & 3.604500e-02_rb,3.504300e-02_rb,3.406500e-02_rb,3.310800e-02_rb,3.217700e-02_rb,&
+       & 3.126600e-02_rb,3.036800e-02_rb,2.948900e-02_rb,2.862400e-02_rb,2.777500e-02_rb,&
+       & 2.694200e-02_rb,2.612300e-02_rb,2.531700e-02_rb,2.452800e-02_rb,2.375100e-02_rb,&
+       & 2.299100e-02_rb,2.224300e-02_rb,2.151201e-02_rb /)
+!     BAND  20
+      extliq1(:, 20) = (/ &
+       & 8.780964e-01_rb,5.407031e-01_rb,3.961100e-01_rb,3.166645e-01_rb,2.640455e-01_rb,&
+       & 2.261070e-01_rb,1.974820e-01_rb,1.751775e-01_rb,1.573415e-01_rb,1.427725e-01_rb,&
+       & 1.306535e-01_rb,1.204195e-01_rb,1.116650e-01_rb,1.040915e-01_rb,9.747550e-02_rb,&
+       & 9.164800e-02_rb,8.647649e-02_rb,8.185501e-02_rb,7.770200e-02_rb,7.394749e-02_rb,&
+       & 7.053800e-02_rb,6.742700e-02_rb,6.457999e-02_rb,6.196149e-02_rb,5.954450e-02_rb,&
+       & 5.730650e-02_rb,5.522949e-02_rb,5.329450e-02_rb,5.148500e-02_rb,4.979000e-02_rb,&
+       & 4.819600e-02_rb,4.669301e-02_rb,4.527050e-02_rb,4.391899e-02_rb,4.263500e-02_rb,&
+       & 4.140500e-02_rb,4.022850e-02_rb,3.909500e-02_rb,3.800199e-02_rb,3.694600e-02_rb,&
+       & 3.592000e-02_rb,3.492250e-02_rb,3.395050e-02_rb,3.300150e-02_rb,3.207250e-02_rb,&
+       & 3.116250e-02_rb,3.027100e-02_rb,2.939500e-02_rb,2.853500e-02_rb,2.768900e-02_rb,&
+       & 2.686000e-02_rb,2.604350e-02_rb,2.524150e-02_rb,2.445350e-02_rb,2.368049e-02_rb,&
+       & 2.292150e-02_rb,2.217800e-02_rb,2.144800e-02_rb /)
+!     BAND  21
+      extliq1(:, 21) = (/ &
+       & 7.937480e-01_rb,5.123036e-01_rb,3.858181e-01_rb,3.099622e-01_rb,2.586829e-01_rb,&
+       & 2.217587e-01_rb,1.939755e-01_rb,1.723397e-01_rb,1.550258e-01_rb,1.408600e-01_rb,&
+       & 1.290545e-01_rb,1.190661e-01_rb,1.105039e-01_rb,1.030848e-01_rb,9.659387e-02_rb,&
+       & 9.086775e-02_rb,8.577807e-02_rb,8.122452e-02_rb,7.712711e-02_rb,7.342193e-02_rb,&
+       & 7.005387e-02_rb,6.697840e-02_rb,6.416000e-02_rb,6.156903e-02_rb,5.917484e-02_rb,&
+       & 5.695807e-02_rb,5.489968e-02_rb,5.298097e-02_rb,5.118806e-02_rb,4.950645e-02_rb,&
+       & 4.792710e-02_rb,4.643581e-02_rb,4.502484e-02_rb,4.368547e-02_rb,4.241001e-02_rb,&
+       & 4.118936e-02_rb,4.002193e-02_rb,3.889711e-02_rb,3.781322e-02_rb,3.676387e-02_rb,&
+       & 3.574549e-02_rb,3.475548e-02_rb,3.379033e-02_rb,3.284678e-02_rb,3.192420e-02_rb,&
+       & 3.102032e-02_rb,3.013484e-02_rb,2.926258e-02_rb,2.840839e-02_rb,2.756742e-02_rb,&
+       & 2.674258e-02_rb,2.593064e-02_rb,2.513258e-02_rb,2.435000e-02_rb,2.358064e-02_rb,&
+       & 2.282581e-02_rb,2.208548e-02_rb,2.135936e-02_rb /)
+!     BAND  22
+      extliq1(:, 22) = (/ &
+       & 7.533129e-01_rb,5.033129e-01_rb,3.811271e-01_rb,3.062757e-01_rb,2.558729e-01_rb,&
+       & 2.196828e-01_rb,1.924372e-01_rb,1.711714e-01_rb,1.541086e-01_rb,1.401114e-01_rb,&
+       & 1.284257e-01_rb,1.185200e-01_rb,1.100243e-01_rb,1.026529e-01_rb,9.620142e-02_rb,&
+       & 9.050714e-02_rb,8.544428e-02_rb,8.091714e-02_rb,7.684000e-02_rb,7.315429e-02_rb,&
+       & 6.980143e-02_rb,6.673999e-02_rb,6.394000e-02_rb,6.136000e-02_rb,5.897715e-02_rb,&
+       & 5.677000e-02_rb,5.472285e-02_rb,5.281286e-02_rb,5.102858e-02_rb,4.935429e-02_rb,&
+       & 4.778000e-02_rb,4.629714e-02_rb,4.489142e-02_rb,4.355857e-02_rb,4.228715e-02_rb,&
+       & 4.107285e-02_rb,3.990857e-02_rb,3.879000e-02_rb,3.770999e-02_rb,3.666429e-02_rb,&
+       & 3.565000e-02_rb,3.466286e-02_rb,3.370143e-02_rb,3.276143e-02_rb,3.184143e-02_rb,&
+       & 3.094000e-02_rb,3.005714e-02_rb,2.919000e-02_rb,2.833714e-02_rb,2.750000e-02_rb,&
+       & 2.667714e-02_rb,2.586714e-02_rb,2.507143e-02_rb,2.429143e-02_rb,2.352428e-02_rb,&
+       & 2.277143e-02_rb,2.203429e-02_rb,2.130857e-02_rb /)
+!     BAND  23
+      extliq1(:, 23) = (/ &
+       & 7.079894e-01_rb,4.878198e-01_rb,3.719852e-01_rb,3.001873e-01_rb,2.514795e-01_rb,&
+       & 2.163013e-01_rb,1.897100e-01_rb,1.689033e-01_rb,1.521793e-01_rb,1.384449e-01_rb,&
+       & 1.269666e-01_rb,1.172326e-01_rb,1.088745e-01_rb,1.016224e-01_rb,9.527085e-02_rb,&
+       & 8.966240e-02_rb,8.467543e-02_rb,8.021144e-02_rb,7.619344e-02_rb,7.255676e-02_rb,&
+       & 6.924996e-02_rb,6.623030e-02_rb,6.346261e-02_rb,6.091499e-02_rb,5.856325e-02_rb,&
+       & 5.638385e-02_rb,5.435930e-02_rb,5.247156e-02_rb,5.070699e-02_rb,4.905230e-02_rb,&
+       & 4.749499e-02_rb,4.602611e-02_rb,4.463581e-02_rb,4.331543e-02_rb,4.205647e-02_rb,&
+       & 4.085241e-02_rb,3.969978e-02_rb,3.859033e-02_rb,3.751877e-02_rb,3.648168e-02_rb,&
+       & 3.547468e-02_rb,3.449553e-02_rb,3.354072e-02_rb,3.260732e-02_rb,3.169438e-02_rb,&
+       & 3.079969e-02_rb,2.992146e-02_rb,2.905875e-02_rb,2.821201e-02_rb,2.737873e-02_rb,&
+       & 2.656052e-02_rb,2.575586e-02_rb,2.496511e-02_rb,2.418783e-02_rb,2.342500e-02_rb,&
+       & 2.267646e-02_rb,2.194177e-02_rb,2.122146e-02_rb /)
+!     BAND  24
+      extliq1(:, 24) = (/ &
+       & 6.850164e-01_rb,4.762468e-01_rb,3.642001e-01_rb,2.946012e-01_rb,2.472001e-01_rb,&
+       & 2.128588e-01_rb,1.868537e-01_rb,1.664893e-01_rb,1.501142e-01_rb,1.366620e-01_rb,&
+       & 1.254147e-01_rb,1.158721e-01_rb,1.076732e-01_rb,1.005530e-01_rb,9.431306e-02_rb,&
+       & 8.879891e-02_rb,8.389232e-02_rb,7.949714e-02_rb,7.553857e-02_rb,7.195474e-02_rb,&
+       & 6.869413e-02_rb,6.571444e-02_rb,6.298286e-02_rb,6.046779e-02_rb,5.814474e-02_rb,&
+       & 5.599141e-02_rb,5.399114e-02_rb,5.212443e-02_rb,5.037870e-02_rb,4.874321e-02_rb,&
+       & 4.720219e-02_rb,4.574813e-02_rb,4.437160e-02_rb,4.306460e-02_rb,4.181810e-02_rb,&
+       & 4.062603e-02_rb,3.948252e-02_rb,3.838256e-02_rb,3.732049e-02_rb,3.629192e-02_rb,&
+       & 3.529301e-02_rb,3.432190e-02_rb,3.337412e-02_rb,3.244842e-02_rb,3.154175e-02_rb,&
+       & 3.065253e-02_rb,2.978063e-02_rb,2.892367e-02_rb,2.808221e-02_rb,2.725478e-02_rb,&
+       & 2.644174e-02_rb,2.564175e-02_rb,2.485508e-02_rb,2.408303e-02_rb,2.332365e-02_rb,&
+       & 2.257890e-02_rb,2.184824e-02_rb,2.113224e-02_rb /)
+!     BAND  25
+      extliq1(:, 25) = (/ &
+       & 6.673017e-01_rb,4.664520e-01_rb,3.579398e-01_rb,2.902234e-01_rb,2.439904e-01_rb,&
+       & 2.104149e-01_rb,1.849277e-01_rb,1.649234e-01_rb,1.488087e-01_rb,1.355515e-01_rb,&
+       & 1.244562e-01_rb,1.150329e-01_rb,1.069321e-01_rb,9.989310e-02_rb,9.372070e-02_rb,&
+       & 8.826450e-02_rb,8.340622e-02_rb,7.905378e-02_rb,7.513109e-02_rb,7.157859e-02_rb,&
+       & 6.834588e-02_rb,6.539114e-02_rb,6.268150e-02_rb,6.018621e-02_rb,5.788098e-02_rb,&
+       & 5.574351e-02_rb,5.375699e-02_rb,5.190412e-02_rb,5.017099e-02_rb,4.854497e-02_rb,&
+       & 4.701490e-02_rb,4.557030e-02_rb,4.420249e-02_rb,4.290304e-02_rb,4.166427e-02_rb,&
+       & 4.047820e-02_rb,3.934232e-02_rb,3.824778e-02_rb,3.719236e-02_rb,3.616931e-02_rb,&
+       & 3.517597e-02_rb,3.420856e-02_rb,3.326566e-02_rb,3.234346e-02_rb,3.144122e-02_rb,&
+       & 3.055684e-02_rb,2.968798e-02_rb,2.883519e-02_rb,2.799635e-02_rb,2.717228e-02_rb,&
+       & 2.636182e-02_rb,2.556424e-02_rb,2.478114e-02_rb,2.401086e-02_rb,2.325657e-02_rb,&
+       & 2.251506e-02_rb,2.178594e-02_rb,2.107301e-02_rb /)
+!     BAND  26
+      extliq1(:, 26) = (/ &
+       & 6.552414e-01_rb,4.599454e-01_rb,3.538626e-01_rb,2.873547e-01_rb,2.418033e-01_rb,&
+       & 2.086660e-01_rb,1.834885e-01_rb,1.637142e-01_rb,1.477767e-01_rb,1.346583e-01_rb,&
+       & 1.236734e-01_rb,1.143412e-01_rb,1.063148e-01_rb,9.933905e-02_rb,9.322026e-02_rb,&
+       & 8.780979e-02_rb,8.299230e-02_rb,7.867554e-02_rb,7.478450e-02_rb,7.126053e-02_rb,&
+       & 6.805276e-02_rb,6.512143e-02_rb,6.243211e-02_rb,5.995541e-02_rb,5.766712e-02_rb,&
+       & 5.554484e-02_rb,5.357246e-02_rb,5.173222e-02_rb,5.001069e-02_rb,4.839505e-02_rb,&
+       & 4.687471e-02_rb,4.543861e-02_rb,4.407857e-02_rb,4.278577e-02_rb,4.155331e-02_rb,&
+       & 4.037322e-02_rb,3.924302e-02_rb,3.815376e-02_rb,3.710172e-02_rb,3.608296e-02_rb,&
+       & 3.509330e-02_rb,3.412980e-02_rb,3.319009e-02_rb,3.227106e-02_rb,3.137157e-02_rb,&
+       & 3.048950e-02_rb,2.962365e-02_rb,2.877297e-02_rb,2.793726e-02_rb,2.711500e-02_rb,&
+       & 2.630666e-02_rb,2.551206e-02_rb,2.473052e-02_rb,2.396287e-02_rb,2.320861e-02_rb,&
+       & 2.246810e-02_rb,2.174162e-02_rb,2.102927e-02_rb /)
+!     BAND  27
+      extliq1(:, 27) = (/ &
+       & 6.430901e-01_rb,4.532134e-01_rb,3.496132e-01_rb,2.844655e-01_rb,2.397347e-01_rb,&
+       & 2.071236e-01_rb,1.822976e-01_rb,1.627640e-01_rb,1.469961e-01_rb,1.340006e-01_rb,&
+       & 1.231069e-01_rb,1.138441e-01_rb,1.058706e-01_rb,9.893678e-02_rb,9.285166e-02_rb,&
+       & 8.746871e-02_rb,8.267411e-02_rb,7.837656e-02_rb,7.450257e-02_rb,7.099318e-02_rb,&
+       & 6.779929e-02_rb,6.487987e-02_rb,6.220168e-02_rb,5.973530e-02_rb,5.745636e-02_rb,&
+       & 5.534344e-02_rb,5.337986e-02_rb,5.154797e-02_rb,4.983404e-02_rb,4.822582e-02_rb,&
+       & 4.671228e-02_rb,4.528321e-02_rb,4.392997e-02_rb,4.264325e-02_rb,4.141647e-02_rb,&
+       & 4.024259e-02_rb,3.911767e-02_rb,3.803309e-02_rb,3.698782e-02_rb,3.597140e-02_rb,&
+       & 3.498774e-02_rb,3.402852e-02_rb,3.309340e-02_rb,3.217818e-02_rb,3.128292e-02_rb,&
+       & 3.040486e-02_rb,2.954230e-02_rb,2.869545e-02_rb,2.786261e-02_rb,2.704372e-02_rb,&
+       & 2.623813e-02_rb,2.544668e-02_rb,2.466788e-02_rb,2.390313e-02_rb,2.315136e-02_rb,&
+       & 2.241391e-02_rb,2.168921e-02_rb,2.097903e-02_rb /)
+!     BAND  28
+      extliq1(:, 28) = (/ &
+       & 6.367074e-01_rb,4.495768e-01_rb,3.471263e-01_rb,2.826149e-01_rb,2.382868e-01_rb,&
+       & 2.059640e-01_rb,1.813562e-01_rb,1.619881e-01_rb,1.463436e-01_rb,1.334402e-01_rb,&
+       & 1.226166e-01_rb,1.134096e-01_rb,1.054829e-01_rb,9.858838e-02_rb,9.253790e-02_rb,&
+       & 8.718582e-02_rb,8.241830e-02_rb,7.814482e-02_rb,7.429212e-02_rb,7.080165e-02_rb,&
+       & 6.762385e-02_rb,6.471838e-02_rb,6.205388e-02_rb,5.959726e-02_rb,5.732871e-02_rb,&
+       & 5.522402e-02_rb,5.326793e-02_rb,5.144230e-02_rb,4.973440e-02_rb,4.813188e-02_rb,&
+       & 4.662283e-02_rb,4.519798e-02_rb,4.384833e-02_rb,4.256541e-02_rb,4.134253e-02_rb,&
+       & 4.017136e-02_rb,3.904911e-02_rb,3.796779e-02_rb,3.692364e-02_rb,3.591182e-02_rb,&
+       & 3.492930e-02_rb,3.397230e-02_rb,3.303920e-02_rb,3.212572e-02_rb,3.123278e-02_rb,&
+       & 3.035519e-02_rb,2.949493e-02_rb,2.864985e-02_rb,2.781840e-02_rb,2.700197e-02_rb,&
+       & 2.619682e-02_rb,2.540674e-02_rb,2.462966e-02_rb,2.386613e-02_rb,2.311602e-02_rb,&
+       & 2.237846e-02_rb,2.165660e-02_rb,2.094756e-02_rb /)
+!     BAND  29
+      extliq1(:, 29) = (/ &
+       & 4.298416e-01_rb,4.391639e-01_rb,3.975030e-01_rb,3.443028e-01_rb,2.957345e-01_rb,&
+       & 2.556461e-01_rb,2.234755e-01_rb,1.976636e-01_rb,1.767428e-01_rb,1.595611e-01_rb,&
+       & 1.452636e-01_rb,1.332156e-01_rb,1.229481e-01_rb,1.141059e-01_rb,1.064208e-01_rb,&
+       & 9.968527e-02_rb,9.373833e-02_rb,8.845221e-02_rb,8.372112e-02_rb,7.946667e-02_rb,&
+       & 7.561807e-02_rb,7.212029e-02_rb,6.893166e-02_rb,6.600944e-02_rb,6.332277e-02_rb,&
+       & 6.084277e-02_rb,5.854721e-02_rb,5.641361e-02_rb,5.442639e-02_rb,5.256750e-02_rb,&
+       & 5.082499e-02_rb,4.918556e-02_rb,4.763694e-02_rb,4.617222e-02_rb,4.477861e-02_rb,&
+       & 4.344861e-02_rb,4.217999e-02_rb,4.096111e-02_rb,3.978638e-02_rb,3.865361e-02_rb,&
+       & 3.755473e-02_rb,3.649028e-02_rb,3.545361e-02_rb,3.444361e-02_rb,3.345666e-02_rb,&
+       & 3.249167e-02_rb,3.154722e-02_rb,3.062083e-02_rb,2.971250e-02_rb,2.882083e-02_rb,&
+       & 2.794611e-02_rb,2.708778e-02_rb,2.624500e-02_rb,2.541750e-02_rb,2.460528e-02_rb,&
+       & 2.381194e-02_rb,2.303250e-02_rb,2.226833e-02_rb /)
+!     BAND  16
+      ssaliq1(:, 16) = (/ &
+       & 8.362119e-01_rb,8.098460e-01_rb,7.762291e-01_rb,7.486042e-01_rb,7.294172e-01_rb,&
+       & 7.161000e-01_rb,7.060656e-01_rb,6.978387e-01_rb,6.907193e-01_rb,6.843551e-01_rb,&
+       & 6.785668e-01_rb,6.732450e-01_rb,6.683191e-01_rb,6.637264e-01_rb,6.594307e-01_rb,&
+       & 6.554033e-01_rb,6.516115e-01_rb,6.480295e-01_rb,6.446429e-01_rb,6.414306e-01_rb,&
+       & 6.383783e-01_rb,6.354750e-01_rb,6.327068e-01_rb,6.300665e-01_rb,6.275376e-01_rb,&
+       & 6.251245e-01_rb,6.228136e-01_rb,6.205944e-01_rb,6.184720e-01_rb,6.164330e-01_rb,&
+       & 6.144742e-01_rb,6.125962e-01_rb,6.108004e-01_rb,6.090740e-01_rb,6.074200e-01_rb,&
+       & 6.058381e-01_rb,6.043209e-01_rb,6.028681e-01_rb,6.014836e-01_rb,6.001626e-01_rb,&
+       & 5.988957e-01_rb,5.976864e-01_rb,5.965390e-01_rb,5.954379e-01_rb,5.943972e-01_rb,&
+       & 5.934019e-01_rb,5.924624e-01_rb,5.915579e-01_rb,5.907025e-01_rb,5.898913e-01_rb,&
+       & 5.891213e-01_rb,5.883815e-01_rb,5.876851e-01_rb,5.870158e-01_rb,5.863868e-01_rb,&
+       & 5.857821e-01_rb,5.852111e-01_rb,5.846579e-01_rb /)
+!     BAND  17
+      ssaliq1(:, 17) = (/ &
+       & 6.995459e-01_rb,7.158012e-01_rb,7.076001e-01_rb,6.927244e-01_rb,6.786434e-01_rb,&
+       & 6.673545e-01_rb,6.585859e-01_rb,6.516314e-01_rb,6.459010e-01_rb,6.410225e-01_rb,&
+       & 6.367574e-01_rb,6.329554e-01_rb,6.295119e-01_rb,6.263595e-01_rb,6.234462e-01_rb,&
+       & 6.207274e-01_rb,6.181755e-01_rb,6.157678e-01_rb,6.134880e-01_rb,6.113173e-01_rb,&
+       & 6.092495e-01_rb,6.072689e-01_rb,6.053717e-01_rb,6.035507e-01_rb,6.018001e-01_rb,&
+       & 6.001134e-01_rb,5.984951e-01_rb,5.969294e-01_rb,5.954256e-01_rb,5.939698e-01_rb,&
+       & 5.925716e-01_rb,5.912265e-01_rb,5.899270e-01_rb,5.886771e-01_rb,5.874746e-01_rb,&
+       & 5.863185e-01_rb,5.852077e-01_rb,5.841460e-01_rb,5.831249e-01_rb,5.821474e-01_rb,&
+       & 5.812078e-01_rb,5.803173e-01_rb,5.794616e-01_rb,5.786443e-01_rb,5.778617e-01_rb,&
+       & 5.771236e-01_rb,5.764191e-01_rb,5.757400e-01_rb,5.750971e-01_rb,5.744842e-01_rb,&
+       & 5.739012e-01_rb,5.733482e-01_rb,5.728175e-01_rb,5.723214e-01_rb,5.718383e-01_rb,&
+       & 5.713827e-01_rb,5.709471e-01_rb,5.705330e-01_rb /)
+!     BAND  18
+      ssaliq1(:, 18) = (/ &
+       & 9.929711e-01_rb,9.896942e-01_rb,9.852408e-01_rb,9.806820e-01_rb,9.764512e-01_rb,&
+       & 9.725375e-01_rb,9.688677e-01_rb,9.653832e-01_rb,9.620552e-01_rb,9.588522e-01_rb,&
+       & 9.557475e-01_rb,9.527265e-01_rb,9.497731e-01_rb,9.468756e-01_rb,9.440270e-01_rb,&
+       & 9.412230e-01_rb,9.384592e-01_rb,9.357287e-01_rb,9.330369e-01_rb,9.303778e-01_rb,&
+       & 9.277502e-01_rb,9.251546e-01_rb,9.225907e-01_rb,9.200553e-01_rb,9.175521e-01_rb,&
+       & 9.150773e-01_rb,9.126352e-01_rb,9.102260e-01_rb,9.078485e-01_rb,9.055057e-01_rb,&
+       & 9.031978e-01_rb,9.009306e-01_rb,8.987010e-01_rb,8.965177e-01_rb,8.943774e-01_rb,&
+       & 8.922869e-01_rb,8.902430e-01_rb,8.882551e-01_rb,8.863182e-01_rb,8.844373e-01_rb,&
+       & 8.826143e-01_rb,8.808499e-01_rb,8.791413e-01_rb,8.774940e-01_rb,8.759019e-01_rb,&
+       & 8.743650e-01_rb,8.728941e-01_rb,8.714712e-01_rb,8.701065e-01_rb,8.688008e-01_rb,&
+       & 8.675409e-01_rb,8.663295e-01_rb,8.651714e-01_rb,8.640637e-01_rb,8.629943e-01_rb,&
+       & 8.619762e-01_rb,8.609995e-01_rb,8.600581e-01_rb /)
+!     BAND  19
+      ssaliq1(:, 19) = (/ &
+       & 9.910612e-01_rb,9.854226e-01_rb,9.795008e-01_rb,9.742920e-01_rb,9.695996e-01_rb,&
+       & 9.652274e-01_rb,9.610648e-01_rb,9.570521e-01_rb,9.531397e-01_rb,9.493086e-01_rb,&
+       & 9.455413e-01_rb,9.418362e-01_rb,9.381902e-01_rb,9.346016e-01_rb,9.310718e-01_rb,&
+       & 9.275957e-01_rb,9.241757e-01_rb,9.208038e-01_rb,9.174802e-01_rb,9.142058e-01_rb,&
+       & 9.109753e-01_rb,9.077895e-01_rb,9.046433e-01_rb,9.015409e-01_rb,8.984784e-01_rb,&
+       & 8.954572e-01_rb,8.924748e-01_rb,8.895367e-01_rb,8.866395e-01_rb,8.837864e-01_rb,&
+       & 8.809819e-01_rb,8.782267e-01_rb,8.755231e-01_rb,8.728712e-01_rb,8.702802e-01_rb,&
+       & 8.677443e-01_rb,8.652733e-01_rb,8.628678e-01_rb,8.605300e-01_rb,8.582593e-01_rb,&
+       & 8.560596e-01_rb,8.539352e-01_rb,8.518782e-01_rb,8.498915e-01_rb,8.479790e-01_rb,&
+       & 8.461384e-01_rb,8.443645e-01_rb,8.426613e-01_rb,8.410229e-01_rb,8.394495e-01_rb,&
+       & 8.379428e-01_rb,8.364967e-01_rb,8.351117e-01_rb,8.337820e-01_rb,8.325091e-01_rb,&
+       & 8.312874e-01_rb,8.301169e-01_rb,8.289985e-01_rb /)
+!     BAND  20
+      ssaliq1(:, 20) = (/ &
+       & 9.969802e-01_rb,9.950445e-01_rb,9.931448e-01_rb,9.914272e-01_rb,9.898652e-01_rb,&
+       & 9.884250e-01_rb,9.870637e-01_rb,9.857482e-01_rb,9.844558e-01_rb,9.831755e-01_rb,&
+       & 9.819068e-01_rb,9.806477e-01_rb,9.794000e-01_rb,9.781666e-01_rb,9.769461e-01_rb,&
+       & 9.757386e-01_rb,9.745459e-01_rb,9.733650e-01_rb,9.721953e-01_rb,9.710398e-01_rb,&
+       & 9.698936e-01_rb,9.687583e-01_rb,9.676334e-01_rb,9.665192e-01_rb,9.654132e-01_rb,&
+       & 9.643208e-01_rb,9.632374e-01_rb,9.621625e-01_rb,9.611003e-01_rb,9.600518e-01_rb,&
+       & 9.590144e-01_rb,9.579922e-01_rb,9.569864e-01_rb,9.559948e-01_rb,9.550239e-01_rb,&
+       & 9.540698e-01_rb,9.531382e-01_rb,9.522280e-01_rb,9.513409e-01_rb,9.504772e-01_rb,&
+       & 9.496360e-01_rb,9.488220e-01_rb,9.480327e-01_rb,9.472693e-01_rb,9.465333e-01_rb,&
+       & 9.458211e-01_rb,9.451344e-01_rb,9.444732e-01_rb,9.438372e-01_rb,9.432268e-01_rb,&
+       & 9.426391e-01_rb,9.420757e-01_rb,9.415308e-01_rb,9.410102e-01_rb,9.405115e-01_rb,&
+       & 9.400326e-01_rb,9.395716e-01_rb,9.391313e-01_rb /)
+!     BAND  21
+      ssaliq1(:, 21) = (/ &
+       & 9.980034e-01_rb,9.968572e-01_rb,9.958696e-01_rb,9.949747e-01_rb,9.941241e-01_rb,&
+       & 9.933043e-01_rb,9.924971e-01_rb,9.916978e-01_rb,9.909023e-01_rb,9.901046e-01_rb,&
+       & 9.893087e-01_rb,9.885146e-01_rb,9.877195e-01_rb,9.869283e-01_rb,9.861379e-01_rb,&
+       & 9.853523e-01_rb,9.845715e-01_rb,9.837945e-01_rb,9.830217e-01_rb,9.822567e-01_rb,&
+       & 9.814935e-01_rb,9.807356e-01_rb,9.799815e-01_rb,9.792332e-01_rb,9.784845e-01_rb,&
+       & 9.777424e-01_rb,9.770042e-01_rb,9.762695e-01_rb,9.755416e-01_rb,9.748152e-01_rb,&
+       & 9.740974e-01_rb,9.733873e-01_rb,9.726813e-01_rb,9.719861e-01_rb,9.713010e-01_rb,&
+       & 9.706262e-01_rb,9.699647e-01_rb,9.693144e-01_rb,9.686794e-01_rb,9.680596e-01_rb,&
+       & 9.674540e-01_rb,9.668657e-01_rb,9.662926e-01_rb,9.657390e-01_rb,9.652019e-01_rb,&
+       & 9.646820e-01_rb,9.641784e-01_rb,9.636945e-01_rb,9.632260e-01_rb,9.627743e-01_rb,&
+       & 9.623418e-01_rb,9.619227e-01_rb,9.615194e-01_rb,9.611341e-01_rb,9.607629e-01_rb,&
+       & 9.604057e-01_rb,9.600622e-01_rb,9.597322e-01_rb /)
+!     BAND  22
+      ssaliq1(:, 22) = (/ &
+       & 9.988219e-01_rb,9.981767e-01_rb,9.976168e-01_rb,9.971066e-01_rb,9.966195e-01_rb,&
+       & 9.961566e-01_rb,9.956995e-01_rb,9.952481e-01_rb,9.947982e-01_rb,9.943495e-01_rb,&
+       & 9.938955e-01_rb,9.934368e-01_rb,9.929825e-01_rb,9.925239e-01_rb,9.920653e-01_rb,&
+       & 9.916096e-01_rb,9.911552e-01_rb,9.907067e-01_rb,9.902594e-01_rb,9.898178e-01_rb,&
+       & 9.893791e-01_rb,9.889453e-01_rb,9.885122e-01_rb,9.880837e-01_rb,9.876567e-01_rb,&
+       & 9.872331e-01_rb,9.868121e-01_rb,9.863938e-01_rb,9.859790e-01_rb,9.855650e-01_rb,&
+       & 9.851548e-01_rb,9.847491e-01_rb,9.843496e-01_rb,9.839521e-01_rb,9.835606e-01_rb,&
+       & 9.831771e-01_rb,9.827975e-01_rb,9.824292e-01_rb,9.820653e-01_rb,9.817124e-01_rb,&
+       & 9.813644e-01_rb,9.810291e-01_rb,9.807020e-01_rb,9.803864e-01_rb,9.800782e-01_rb,&
+       & 9.797821e-01_rb,9.794958e-01_rb,9.792179e-01_rb,9.789509e-01_rb,9.786940e-01_rb,&
+       & 9.784460e-01_rb,9.782090e-01_rb,9.779789e-01_rb,9.777553e-01_rb,9.775425e-01_rb,&
+       & 9.773387e-01_rb,9.771420e-01_rb,9.769529e-01_rb /)
+!     BAND  23
+      ssaliq1(:, 23) = (/ &
+       & 9.998902e-01_rb,9.998395e-01_rb,9.997915e-01_rb,9.997442e-01_rb,9.997016e-01_rb,&
+       & 9.996600e-01_rb,9.996200e-01_rb,9.995806e-01_rb,9.995411e-01_rb,9.995005e-01_rb,&
+       & 9.994589e-01_rb,9.994178e-01_rb,9.993766e-01_rb,9.993359e-01_rb,9.992948e-01_rb,&
+       & 9.992533e-01_rb,9.992120e-01_rb,9.991723e-01_rb,9.991313e-01_rb,9.990906e-01_rb,&
+       & 9.990510e-01_rb,9.990113e-01_rb,9.989716e-01_rb,9.989323e-01_rb,9.988923e-01_rb,&
+       & 9.988532e-01_rb,9.988140e-01_rb,9.987761e-01_rb,9.987373e-01_rb,9.986989e-01_rb,&
+       & 9.986597e-01_rb,9.986239e-01_rb,9.985861e-01_rb,9.985485e-01_rb,9.985123e-01_rb,&
+       & 9.984762e-01_rb,9.984415e-01_rb,9.984065e-01_rb,9.983722e-01_rb,9.983398e-01_rb,&
+       & 9.983078e-01_rb,9.982758e-01_rb,9.982461e-01_rb,9.982157e-01_rb,9.981872e-01_rb,&
+       & 9.981595e-01_rb,9.981324e-01_rb,9.981068e-01_rb,9.980811e-01_rb,9.980580e-01_rb,&
+       & 9.980344e-01_rb,9.980111e-01_rb,9.979908e-01_rb,9.979690e-01_rb,9.979492e-01_rb,&
+       & 9.979316e-01_rb,9.979116e-01_rb,9.978948e-01_rb /)
+!     BAND  24
+      ssaliq1(:, 24) = (/ &
+       & 9.999978e-01_rb,9.999948e-01_rb,9.999915e-01_rb,9.999905e-01_rb,9.999896e-01_rb,&
+       & 9.999887e-01_rb,9.999888e-01_rb,9.999888e-01_rb,9.999870e-01_rb,9.999854e-01_rb,&
+       & 9.999855e-01_rb,9.999856e-01_rb,9.999839e-01_rb,9.999834e-01_rb,9.999829e-01_rb,&
+       & 9.999809e-01_rb,9.999816e-01_rb,9.999793e-01_rb,9.999782e-01_rb,9.999779e-01_rb,&
+       & 9.999772e-01_rb,9.999764e-01_rb,9.999756e-01_rb,9.999744e-01_rb,9.999744e-01_rb,&
+       & 9.999736e-01_rb,9.999729e-01_rb,9.999716e-01_rb,9.999706e-01_rb,9.999692e-01_rb,&
+       & 9.999690e-01_rb,9.999675e-01_rb,9.999673e-01_rb,9.999660e-01_rb,9.999654e-01_rb,&
+       & 9.999647e-01_rb,9.999647e-01_rb,9.999625e-01_rb,9.999620e-01_rb,9.999614e-01_rb,&
+       & 9.999613e-01_rb,9.999607e-01_rb,9.999604e-01_rb,9.999594e-01_rb,9.999589e-01_rb,&
+       & 9.999586e-01_rb,9.999567e-01_rb,9.999550e-01_rb,9.999557e-01_rb,9.999542e-01_rb,&
+       & 9.999546e-01_rb,9.999539e-01_rb,9.999536e-01_rb,9.999526e-01_rb,9.999523e-01_rb,&
+       & 9.999508e-01_rb,9.999534e-01_rb,9.999507e-01_rb /)
+!     BAND  25
+      ssaliq1(:, 25) = (/ &
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,&
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,&
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,&
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,9.999995e-01_rb,&
+       & 9.999995e-01_rb,9.999990e-01_rb,9.999991e-01_rb,9.999991e-01_rb,9.999990e-01_rb,&
+       & 9.999989e-01_rb,9.999988e-01_rb,9.999988e-01_rb,9.999986e-01_rb,9.999988e-01_rb,&
+       & 9.999986e-01_rb,9.999987e-01_rb,9.999986e-01_rb,9.999985e-01_rb,9.999985e-01_rb,&
+       & 9.999985e-01_rb,9.999985e-01_rb,9.999983e-01_rb,9.999983e-01_rb,9.999981e-01_rb,&
+       & 9.999981e-01_rb,9.999986e-01_rb,9.999985e-01_rb,9.999983e-01_rb,9.999984e-01_rb,&
+       & 9.999982e-01_rb,9.999983e-01_rb,9.999982e-01_rb,9.999980e-01_rb,9.999981e-01_rb,&
+       & 9.999978e-01_rb,9.999979e-01_rb,9.999985e-01_rb,9.999985e-01_rb,9.999983e-01_rb,&
+       & 9.999983e-01_rb,9.999983e-01_rb,9.999983e-01_rb /)
+!     BAND  26
+      ssaliq1(:, 26) = (/ &
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,&
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,&
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,&
+       & 1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,1.000000e+00_rb,9.999991e-01_rb,&
+       & 9.999990e-01_rb,9.999992e-01_rb,9.999995e-01_rb,9.999986e-01_rb,9.999994e-01_rb,&
+       & 9.999985e-01_rb,9.999980e-01_rb,9.999984e-01_rb,9.999983e-01_rb,9.999979e-01_rb,&
+       & 9.999969e-01_rb,9.999977e-01_rb,9.999971e-01_rb,9.999969e-01_rb,9.999969e-01_rb,&
+       & 9.999965e-01_rb,9.999970e-01_rb,9.999985e-01_rb,9.999973e-01_rb,9.999961e-01_rb,&
+       & 9.999968e-01_rb,9.999952e-01_rb,9.999970e-01_rb,9.999974e-01_rb,9.999965e-01_rb,&
+       & 9.999969e-01_rb,9.999970e-01_rb,9.999970e-01_rb,9.999960e-01_rb,9.999923e-01_rb,&
+       & 9.999958e-01_rb,9.999937e-01_rb,9.999960e-01_rb,9.999953e-01_rb,9.999946e-01_rb,&
+       & 9.999946e-01_rb,9.999957e-01_rb,9.999951e-01_rb /)
+!     BAND  27
+      ssaliq1(:, 27) = (/ &
+       & 1.000000e+00_rb,1.000000e+00_rb,9.999983e-01_rb,9.999979e-01_rb,9.999965e-01_rb,&
+       & 9.999949e-01_rb,9.999948e-01_rb,9.999918e-01_rb,9.999917e-01_rb,9.999923e-01_rb,&
+       & 9.999908e-01_rb,9.999889e-01_rb,9.999902e-01_rb,9.999895e-01_rb,9.999881e-01_rb,&
+       & 9.999882e-01_rb,9.999876e-01_rb,9.999866e-01_rb,9.999866e-01_rb,9.999858e-01_rb,&
+       & 9.999860e-01_rb,9.999852e-01_rb,9.999836e-01_rb,9.999831e-01_rb,9.999818e-01_rb,&
+       & 9.999808e-01_rb,9.999816e-01_rb,9.999800e-01_rb,9.999783e-01_rb,9.999780e-01_rb,&
+       & 9.999763e-01_rb,9.999746e-01_rb,9.999731e-01_rb,9.999713e-01_rb,9.999762e-01_rb,&
+       & 9.999740e-01_rb,9.999670e-01_rb,9.999703e-01_rb,9.999687e-01_rb,9.999666e-01_rb,&
+       & 9.999683e-01_rb,9.999667e-01_rb,9.999611e-01_rb,9.999635e-01_rb,9.999600e-01_rb,&
+       & 9.999635e-01_rb,9.999594e-01_rb,9.999601e-01_rb,9.999586e-01_rb,9.999559e-01_rb,&
+       & 9.999569e-01_rb,9.999558e-01_rb,9.999523e-01_rb,9.999535e-01_rb,9.999529e-01_rb,&
+       & 9.999553e-01_rb,9.999495e-01_rb,9.999490e-01_rb /)
+!     BAND  28
+      ssaliq1(:, 28) = (/ &
+       & 9.999920e-01_rb,9.999873e-01_rb,9.999855e-01_rb,9.999832e-01_rb,9.999807e-01_rb,&
+       & 9.999778e-01_rb,9.999754e-01_rb,9.999721e-01_rb,9.999692e-01_rb,9.999651e-01_rb,&
+       & 9.999621e-01_rb,9.999607e-01_rb,9.999567e-01_rb,9.999546e-01_rb,9.999521e-01_rb,&
+       & 9.999491e-01_rb,9.999457e-01_rb,9.999439e-01_rb,9.999403e-01_rb,9.999374e-01_rb,&
+       & 9.999353e-01_rb,9.999315e-01_rb,9.999282e-01_rb,9.999244e-01_rb,9.999234e-01_rb,&
+       & 9.999189e-01_rb,9.999130e-01_rb,9.999117e-01_rb,9.999073e-01_rb,9.999020e-01_rb,&
+       & 9.998993e-01_rb,9.998987e-01_rb,9.998922e-01_rb,9.998893e-01_rb,9.998869e-01_rb,&
+       & 9.998805e-01_rb,9.998778e-01_rb,9.998751e-01_rb,9.998708e-01_rb,9.998676e-01_rb,&
+       & 9.998624e-01_rb,9.998642e-01_rb,9.998582e-01_rb,9.998547e-01_rb,9.998546e-01_rb,&
+       & 9.998477e-01_rb,9.998487e-01_rb,9.998466e-01_rb,9.998403e-01_rb,9.998412e-01_rb,&
+       & 9.998406e-01_rb,9.998342e-01_rb,9.998326e-01_rb,9.998333e-01_rb,9.998328e-01_rb,&
+       & 9.998290e-01_rb,9.998276e-01_rb,9.998249e-01_rb /)
+!     BAND  29
+      ssaliq1(:, 29) = (/ &
+       & 8.383753e-01_rb,8.461471e-01_rb,8.373325e-01_rb,8.212889e-01_rb,8.023834e-01_rb,&
+       & 7.829501e-01_rb,7.641777e-01_rb,7.466000e-01_rb,7.304023e-01_rb,7.155998e-01_rb,&
+       & 7.021259e-01_rb,6.898840e-01_rb,6.787615e-01_rb,6.686479e-01_rb,6.594414e-01_rb,&
+       & 6.510417e-01_rb,6.433668e-01_rb,6.363335e-01_rb,6.298788e-01_rb,6.239398e-01_rb,&
+       & 6.184633e-01_rb,6.134055e-01_rb,6.087228e-01_rb,6.043786e-01_rb,6.003439e-01_rb,&
+       & 5.965910e-01_rb,5.930917e-01_rb,5.898280e-01_rb,5.867798e-01_rb,5.839264e-01_rb,&
+       & 5.812576e-01_rb,5.787592e-01_rb,5.764163e-01_rb,5.742189e-01_rb,5.721598e-01_rb,&
+       & 5.702286e-01_rb,5.684182e-01_rb,5.667176e-01_rb,5.651237e-01_rb,5.636253e-01_rb,&
+       & 5.622228e-01_rb,5.609074e-01_rb,5.596713e-01_rb,5.585089e-01_rb,5.574223e-01_rb,&
+       & 5.564002e-01_rb,5.554411e-01_rb,5.545397e-01_rb,5.536914e-01_rb,5.528967e-01_rb,&
+       & 5.521495e-01_rb,5.514457e-01_rb,5.507818e-01_rb,5.501623e-01_rb,5.495750e-01_rb,&
+       & 5.490192e-01_rb,5.484980e-01_rb,5.480046e-01_rb /)
+!     BAND  16
+      asyliq1(:, 16) = (/ &
+       & 8.038165e-01_rb,8.014154e-01_rb,7.942381e-01_rb,7.970521e-01_rb,8.086621e-01_rb,&
+       & 8.233392e-01_rb,8.374127e-01_rb,8.495742e-01_rb,8.596945e-01_rb,8.680497e-01_rb,&
+       & 8.750005e-01_rb,8.808589e-01_rb,8.858749e-01_rb,8.902403e-01_rb,8.940939e-01_rb,&
+       & 8.975379e-01_rb,9.006450e-01_rb,9.034741e-01_rb,9.060659e-01_rb,9.084561e-01_rb,&
+       & 9.106675e-01_rb,9.127198e-01_rb,9.146332e-01_rb,9.164194e-01_rb,9.180970e-01_rb,&
+       & 9.196658e-01_rb,9.211421e-01_rb,9.225352e-01_rb,9.238443e-01_rb,9.250841e-01_rb,&
+       & 9.262541e-01_rb,9.273620e-01_rb,9.284081e-01_rb,9.294002e-01_rb,9.303395e-01_rb,&
+       & 9.312285e-01_rb,9.320715e-01_rb,9.328716e-01_rb,9.336271e-01_rb,9.343427e-01_rb,&
+       & 9.350219e-01_rb,9.356647e-01_rb,9.362728e-01_rb,9.368495e-01_rb,9.373956e-01_rb,&
+       & 9.379113e-01_rb,9.383987e-01_rb,9.388608e-01_rb,9.392986e-01_rb,9.397132e-01_rb,&
+       & 9.401063e-01_rb,9.404776e-01_rb,9.408299e-01_rb,9.411641e-01_rb,9.414800e-01_rb,&
+       & 9.417787e-01_rb,9.420633e-01_rb,9.423364e-01_rb /)
+!     BAND  17
+      asyliq1(:, 17) = (/ &
+       & 8.941000e-01_rb,9.054049e-01_rb,9.049510e-01_rb,9.027216e-01_rb,9.021636e-01_rb,&
+       & 9.037878e-01_rb,9.069852e-01_rb,9.109817e-01_rb,9.152013e-01_rb,9.193040e-01_rb,&
+       & 9.231177e-01_rb,9.265712e-01_rb,9.296606e-01_rb,9.324048e-01_rb,9.348419e-01_rb,&
+       & 9.370131e-01_rb,9.389529e-01_rb,9.406954e-01_rb,9.422727e-01_rb,9.437088e-01_rb,&
+       & 9.450221e-01_rb,9.462308e-01_rb,9.473488e-01_rb,9.483830e-01_rb,9.493492e-01_rb,&
+       & 9.502541e-01_rb,9.510999e-01_rb,9.518971e-01_rb,9.526455e-01_rb,9.533554e-01_rb,&
+       & 9.540249e-01_rb,9.546571e-01_rb,9.552551e-01_rb,9.558258e-01_rb,9.563603e-01_rb,&
+       & 9.568713e-01_rb,9.573569e-01_rb,9.578141e-01_rb,9.582485e-01_rb,9.586604e-01_rb,&
+       & 9.590525e-01_rb,9.594218e-01_rb,9.597710e-01_rb,9.601052e-01_rb,9.604181e-01_rb,&
+       & 9.607159e-01_rb,9.609979e-01_rb,9.612655e-01_rb,9.615184e-01_rb,9.617564e-01_rb,&
+       & 9.619860e-01_rb,9.622009e-01_rb,9.624031e-01_rb,9.625957e-01_rb,9.627792e-01_rb,&
+       & 9.629530e-01_rb,9.631171e-01_rb,9.632746e-01_rb /)
+!     BAND  18
+      asyliq1(:, 18) = (/ &
+       & 8.574638e-01_rb,8.351383e-01_rb,8.142977e-01_rb,8.083068e-01_rb,8.129284e-01_rb,&
+       & 8.215827e-01_rb,8.307238e-01_rb,8.389963e-01_rb,8.460481e-01_rb,8.519273e-01_rb,&
+       & 8.568153e-01_rb,8.609116e-01_rb,8.643892e-01_rb,8.673941e-01_rb,8.700248e-01_rb,&
+       & 8.723707e-01_rb,8.744902e-01_rb,8.764240e-01_rb,8.782057e-01_rb,8.798593e-01_rb,&
+       & 8.814063e-01_rb,8.828573e-01_rb,8.842261e-01_rb,8.855196e-01_rb,8.867497e-01_rb,&
+       & 8.879164e-01_rb,8.890316e-01_rb,8.900941e-01_rb,8.911118e-01_rb,8.920832e-01_rb,&
+       & 8.930156e-01_rb,8.939091e-01_rb,8.947663e-01_rb,8.955888e-01_rb,8.963786e-01_rb,&
+       & 8.971350e-01_rb,8.978617e-01_rb,8.985590e-01_rb,8.992243e-01_rb,8.998631e-01_rb,&
+       & 9.004753e-01_rb,9.010602e-01_rb,9.016192e-01_rb,9.021542e-01_rb,9.026644e-01_rb,&
+       & 9.031535e-01_rb,9.036194e-01_rb,9.040656e-01_rb,9.044894e-01_rb,9.048933e-01_rb,&
+       & 9.052789e-01_rb,9.056481e-01_rb,9.060004e-01_rb,9.063343e-01_rb,9.066544e-01_rb,&
+       & 9.069604e-01_rb,9.072512e-01_rb,9.075290e-01_rb /)
+!     BAND  19
+      asyliq1(:, 19) = (/ &
+       & 8.349569e-01_rb,8.034579e-01_rb,7.932136e-01_rb,8.010156e-01_rb,8.137083e-01_rb,&
+       & 8.255339e-01_rb,8.351938e-01_rb,8.428286e-01_rb,8.488944e-01_rb,8.538187e-01_rb,&
+       & 8.579255e-01_rb,8.614473e-01_rb,8.645338e-01_rb,8.672908e-01_rb,8.697947e-01_rb,&
+       & 8.720843e-01_rb,8.742015e-01_rb,8.761718e-01_rb,8.780160e-01_rb,8.797479e-01_rb,&
+       & 8.813810e-01_rb,8.829250e-01_rb,8.843907e-01_rb,8.857822e-01_rb,8.871059e-01_rb,&
+       & 8.883724e-01_rb,8.895810e-01_rb,8.907384e-01_rb,8.918456e-01_rb,8.929083e-01_rb,&
+       & 8.939284e-01_rb,8.949060e-01_rb,8.958463e-01_rb,8.967486e-01_rb,8.976129e-01_rb,&
+       & 8.984463e-01_rb,8.992439e-01_rb,9.000094e-01_rb,9.007438e-01_rb,9.014496e-01_rb,&
+       & 9.021235e-01_rb,9.027699e-01_rb,9.033859e-01_rb,9.039772e-01_rb,9.045419e-01_rb,&
+       & 9.050819e-01_rb,9.055975e-01_rb,9.060907e-01_rb,9.065607e-01_rb,9.070093e-01_rb,&
+       & 9.074389e-01_rb,9.078475e-01_rb,9.082388e-01_rb,9.086117e-01_rb,9.089678e-01_rb,&
+       & 9.093081e-01_rb,9.096307e-01_rb,9.099410e-01_rb /)
+!     BAND  20
+      asyliq1(:, 20) = (/ &
+       & 8.109692e-01_rb,7.846657e-01_rb,7.881928e-01_rb,8.009509e-01_rb,8.131208e-01_rb,&
+       & 8.230400e-01_rb,8.309448e-01_rb,8.372920e-01_rb,8.424837e-01_rb,8.468166e-01_rb,&
+       & 8.504947e-01_rb,8.536642e-01_rb,8.564256e-01_rb,8.588513e-01_rb,8.610011e-01_rb,&
+       & 8.629122e-01_rb,8.646262e-01_rb,8.661720e-01_rb,8.675752e-01_rb,8.688582e-01_rb,&
+       & 8.700379e-01_rb,8.711300e-01_rb,8.721485e-01_rb,8.731027e-01_rb,8.740010e-01_rb,&
+       & 8.748499e-01_rb,8.756564e-01_rb,8.764239e-01_rb,8.771542e-01_rb,8.778523e-01_rb,&
+       & 8.785211e-01_rb,8.791601e-01_rb,8.797725e-01_rb,8.803589e-01_rb,8.809173e-01_rb,&
+       & 8.814552e-01_rb,8.819705e-01_rb,8.824611e-01_rb,8.829311e-01_rb,8.833791e-01_rb,&
+       & 8.838078e-01_rb,8.842148e-01_rb,8.846044e-01_rb,8.849756e-01_rb,8.853291e-01_rb,&
+       & 8.856645e-01_rb,8.859841e-01_rb,8.862904e-01_rb,8.865801e-01_rb,8.868551e-01_rb,&
+       & 8.871182e-01_rb,8.873673e-01_rb,8.876059e-01_rb,8.878307e-01_rb,8.880462e-01_rb,&
+       & 8.882501e-01_rb,8.884453e-01_rb,8.886339e-01_rb /)
+!     BAND  21
+      asyliq1(:, 21) = (/ &
+       & 7.838510e-01_rb,7.803151e-01_rb,7.980477e-01_rb,8.144160e-01_rb,8.261784e-01_rb,&
+       & 8.344240e-01_rb,8.404278e-01_rb,8.450391e-01_rb,8.487593e-01_rb,8.518741e-01_rb,&
+       & 8.545484e-01_rb,8.568890e-01_rb,8.589560e-01_rb,8.607983e-01_rb,8.624504e-01_rb,&
+       & 8.639408e-01_rb,8.652945e-01_rb,8.665301e-01_rb,8.676634e-01_rb,8.687121e-01_rb,&
+       & 8.696855e-01_rb,8.705933e-01_rb,8.714448e-01_rb,8.722454e-01_rb,8.730014e-01_rb,&
+       & 8.737180e-01_rb,8.743982e-01_rb,8.750436e-01_rb,8.756598e-01_rb,8.762481e-01_rb,&
+       & 8.768089e-01_rb,8.773427e-01_rb,8.778532e-01_rb,8.783434e-01_rb,8.788089e-01_rb,&
+       & 8.792530e-01_rb,8.796784e-01_rb,8.800845e-01_rb,8.804716e-01_rb,8.808411e-01_rb,&
+       & 8.811923e-01_rb,8.815276e-01_rb,8.818472e-01_rb,8.821504e-01_rb,8.824408e-01_rb,&
+       & 8.827155e-01_rb,8.829777e-01_rb,8.832269e-01_rb,8.834631e-01_rb,8.836892e-01_rb,&
+       & 8.839034e-01_rb,8.841075e-01_rb,8.843021e-01_rb,8.844866e-01_rb,8.846631e-01_rb,&
+       & 8.848304e-01_rb,8.849910e-01_rb,8.851425e-01_rb /)
+!     BAND  22
+      asyliq1(:, 22) = (/ &
+       & 7.760783e-01_rb,7.890215e-01_rb,8.090192e-01_rb,8.230252e-01_rb,8.321369e-01_rb,&
+       & 8.384258e-01_rb,8.431529e-01_rb,8.469558e-01_rb,8.501499e-01_rb,8.528899e-01_rb,&
+       & 8.552899e-01_rb,8.573956e-01_rb,8.592570e-01_rb,8.609098e-01_rb,8.623897e-01_rb,&
+       & 8.637169e-01_rb,8.649184e-01_rb,8.660097e-01_rb,8.670096e-01_rb,8.679338e-01_rb,&
+       & 8.687896e-01_rb,8.695880e-01_rb,8.703365e-01_rb,8.710422e-01_rb,8.717092e-01_rb,&
+       & 8.723378e-01_rb,8.729363e-01_rb,8.735063e-01_rb,8.740475e-01_rb,8.745661e-01_rb,&
+       & 8.750560e-01_rb,8.755275e-01_rb,8.759731e-01_rb,8.764000e-01_rb,8.768071e-01_rb,&
+       & 8.771942e-01_rb,8.775628e-01_rb,8.779126e-01_rb,8.782483e-01_rb,8.785626e-01_rb,&
+       & 8.788610e-01_rb,8.791482e-01_rb,8.794180e-01_rb,8.796765e-01_rb,8.799207e-01_rb,&
+       & 8.801522e-01_rb,8.803707e-01_rb,8.805777e-01_rb,8.807749e-01_rb,8.809605e-01_rb,&
+       & 8.811362e-01_rb,8.813047e-01_rb,8.814647e-01_rb,8.816131e-01_rb,8.817588e-01_rb,&
+       & 8.818930e-01_rb,8.820230e-01_rb,8.821445e-01_rb /)
+!     BAND  23
+      asyliq1(:, 23) = (/ &
+       & 7.847907e-01_rb,8.099917e-01_rb,8.257428e-01_rb,8.350423e-01_rb,8.411971e-01_rb,&
+       & 8.457241e-01_rb,8.493010e-01_rb,8.522565e-01_rb,8.547660e-01_rb,8.569311e-01_rb,&
+       & 8.588181e-01_rb,8.604729e-01_rb,8.619296e-01_rb,8.632208e-01_rb,8.643725e-01_rb,&
+       & 8.654050e-01_rb,8.663363e-01_rb,8.671835e-01_rb,8.679590e-01_rb,8.686707e-01_rb,&
+       & 8.693308e-01_rb,8.699433e-01_rb,8.705147e-01_rb,8.710490e-01_rb,8.715497e-01_rb,&
+       & 8.720219e-01_rb,8.724669e-01_rb,8.728849e-01_rb,8.732806e-01_rb,8.736550e-01_rb,&
+       & 8.740099e-01_rb,8.743435e-01_rb,8.746601e-01_rb,8.749610e-01_rb,8.752449e-01_rb,&
+       & 8.755143e-01_rb,8.757688e-01_rb,8.760095e-01_rb,8.762375e-01_rb,8.764532e-01_rb,&
+       & 8.766579e-01_rb,8.768506e-01_rb,8.770323e-01_rb,8.772049e-01_rb,8.773690e-01_rb,&
+       & 8.775226e-01_rb,8.776679e-01_rb,8.778062e-01_rb,8.779360e-01_rb,8.780587e-01_rb,&
+       & 8.781747e-01_rb,8.782852e-01_rb,8.783892e-01_rb,8.784891e-01_rb,8.785824e-01_rb,&
+       & 8.786705e-01_rb,8.787546e-01_rb,8.788336e-01_rb /)
+!     BAND  24
+      asyliq1(:, 24) = (/ &
+       & 8.054324e-01_rb,8.266282e-01_rb,8.378075e-01_rb,8.449848e-01_rb,8.502166e-01_rb,&
+       & 8.542268e-01_rb,8.573477e-01_rb,8.598022e-01_rb,8.617689e-01_rb,8.633859e-01_rb,&
+       & 8.647536e-01_rb,8.659354e-01_rb,8.669807e-01_rb,8.679143e-01_rb,8.687577e-01_rb,&
+       & 8.695222e-01_rb,8.702207e-01_rb,8.708591e-01_rb,8.714446e-01_rb,8.719836e-01_rb,&
+       & 8.724812e-01_rb,8.729426e-01_rb,8.733689e-01_rb,8.737665e-01_rb,8.741373e-01_rb,&
+       & 8.744834e-01_rb,8.748070e-01_rb,8.751131e-01_rb,8.754011e-01_rb,8.756676e-01_rb,&
+       & 8.759219e-01_rb,8.761599e-01_rb,8.763857e-01_rb,8.765984e-01_rb,8.767999e-01_rb,&
+       & 8.769889e-01_rb,8.771669e-01_rb,8.773373e-01_rb,8.774969e-01_rb,8.776469e-01_rb,&
+       & 8.777894e-01_rb,8.779237e-01_rb,8.780505e-01_rb,8.781703e-01_rb,8.782820e-01_rb,&
+       & 8.783886e-01_rb,8.784894e-01_rb,8.785844e-01_rb,8.786736e-01_rb,8.787584e-01_rb,&
+       & 8.788379e-01_rb,8.789130e-01_rb,8.789849e-01_rb,8.790506e-01_rb,8.791141e-01_rb,&
+       & 8.791750e-01_rb,8.792324e-01_rb,8.792867e-01_rb /)
+!     BAND  25
+      asyliq1(:, 25) = (/ &
+       & 8.249534e-01_rb,8.391988e-01_rb,8.474107e-01_rb,8.526860e-01_rb,8.563983e-01_rb,&
+       & 8.592389e-01_rb,8.615144e-01_rb,8.633790e-01_rb,8.649325e-01_rb,8.662504e-01_rb,&
+       & 8.673841e-01_rb,8.683741e-01_rb,8.692495e-01_rb,8.700309e-01_rb,8.707328e-01_rb,&
+       & 8.713650e-01_rb,8.719432e-01_rb,8.724676e-01_rb,8.729498e-01_rb,8.733922e-01_rb,&
+       & 8.737981e-01_rb,8.741745e-01_rb,8.745225e-01_rb,8.748467e-01_rb,8.751512e-01_rb,&
+       & 8.754315e-01_rb,8.756962e-01_rb,8.759450e-01_rb,8.761774e-01_rb,8.763945e-01_rb,&
+       & 8.766021e-01_rb,8.767970e-01_rb,8.769803e-01_rb,8.771511e-01_rb,8.773151e-01_rb,&
+       & 8.774689e-01_rb,8.776147e-01_rb,8.777533e-01_rb,8.778831e-01_rb,8.780050e-01_rb,&
+       & 8.781197e-01_rb,8.782301e-01_rb,8.783323e-01_rb,8.784312e-01_rb,8.785222e-01_rb,&
+       & 8.786096e-01_rb,8.786916e-01_rb,8.787688e-01_rb,8.788411e-01_rb,8.789122e-01_rb,&
+       & 8.789762e-01_rb,8.790373e-01_rb,8.790954e-01_rb,8.791514e-01_rb,8.792018e-01_rb,&
+       & 8.792517e-01_rb,8.792990e-01_rb,8.793429e-01_rb /)
+!     BAND  26
+      asyliq1(:, 26) = (/ &
+       & 8.323091e-01_rb,8.429776e-01_rb,8.498123e-01_rb,8.546929e-01_rb,8.584295e-01_rb,&
+       & 8.613489e-01_rb,8.636324e-01_rb,8.654303e-01_rb,8.668675e-01_rb,8.680404e-01_rb,&
+       & 8.690174e-01_rb,8.698495e-01_rb,8.705666e-01_rb,8.711961e-01_rb,8.717556e-01_rb,&
+       & 8.722546e-01_rb,8.727063e-01_rb,8.731170e-01_rb,8.734933e-01_rb,8.738382e-01_rb,&
+       & 8.741590e-01_rb,8.744525e-01_rb,8.747295e-01_rb,8.749843e-01_rb,8.752210e-01_rb,&
+       & 8.754437e-01_rb,8.756524e-01_rb,8.758472e-01_rb,8.760288e-01_rb,8.762030e-01_rb,&
+       & 8.763603e-01_rb,8.765122e-01_rb,8.766539e-01_rb,8.767894e-01_rb,8.769130e-01_rb,&
+       & 8.770310e-01_rb,8.771422e-01_rb,8.772437e-01_rb,8.773419e-01_rb,8.774355e-01_rb,&
+       & 8.775221e-01_rb,8.776047e-01_rb,8.776802e-01_rb,8.777539e-01_rb,8.778216e-01_rb,&
+       & 8.778859e-01_rb,8.779473e-01_rb,8.780031e-01_rb,8.780562e-01_rb,8.781097e-01_rb,&
+       & 8.781570e-01_rb,8.782021e-01_rb,8.782463e-01_rb,8.782845e-01_rb,8.783235e-01_rb,&
+       & 8.783610e-01_rb,8.783953e-01_rb,8.784273e-01_rb /)
+!     BAND  27
+      asyliq1(:, 27) = (/ &
+       & 8.396448e-01_rb,8.480172e-01_rb,8.535934e-01_rb,8.574145e-01_rb,8.600835e-01_rb,&
+       & 8.620347e-01_rb,8.635500e-01_rb,8.648003e-01_rb,8.658758e-01_rb,8.668248e-01_rb,&
+       & 8.676697e-01_rb,8.684220e-01_rb,8.690893e-01_rb,8.696807e-01_rb,8.702046e-01_rb,&
+       & 8.706676e-01_rb,8.710798e-01_rb,8.714478e-01_rb,8.717778e-01_rb,8.720747e-01_rb,&
+       & 8.723431e-01_rb,8.725889e-01_rb,8.728144e-01_rb,8.730201e-01_rb,8.732129e-01_rb,&
+       & 8.733907e-01_rb,8.735541e-01_rb,8.737100e-01_rb,8.738533e-01_rb,8.739882e-01_rb,&
+       & 8.741164e-01_rb,8.742362e-01_rb,8.743485e-01_rb,8.744530e-01_rb,8.745512e-01_rb,&
+       & 8.746471e-01_rb,8.747373e-01_rb,8.748186e-01_rb,8.748973e-01_rb,8.749732e-01_rb,&
+       & 8.750443e-01_rb,8.751105e-01_rb,8.751747e-01_rb,8.752344e-01_rb,8.752902e-01_rb,&
+       & 8.753412e-01_rb,8.753917e-01_rb,8.754393e-01_rb,8.754843e-01_rb,8.755282e-01_rb,&
+       & 8.755662e-01_rb,8.756039e-01_rb,8.756408e-01_rb,8.756722e-01_rb,8.757072e-01_rb,&
+       & 8.757352e-01_rb,8.757653e-01_rb,8.757932e-01_rb /)
+!     BAND  28
+      asyliq1(:, 28) = (/ &
+       & 8.374590e-01_rb,8.465669e-01_rb,8.518701e-01_rb,8.547627e-01_rb,8.565745e-01_rb,&
+       & 8.579065e-01_rb,8.589717e-01_rb,8.598632e-01_rb,8.606363e-01_rb,8.613268e-01_rb,&
+       & 8.619560e-01_rb,8.625340e-01_rb,8.630689e-01_rb,8.635601e-01_rb,8.640084e-01_rb,&
+       & 8.644180e-01_rb,8.647885e-01_rb,8.651220e-01_rb,8.654218e-01_rb,8.656908e-01_rb,&
+       & 8.659294e-01_rb,8.661422e-01_rb,8.663334e-01_rb,8.665037e-01_rb,8.666543e-01_rb,&
+       & 8.667913e-01_rb,8.669156e-01_rb,8.670242e-01_rb,8.671249e-01_rb,8.672161e-01_rb,&
+       & 8.672993e-01_rb,8.673733e-01_rb,8.674457e-01_rb,8.675103e-01_rb,8.675713e-01_rb,&
+       & 8.676267e-01_rb,8.676798e-01_rb,8.677286e-01_rb,8.677745e-01_rb,8.678178e-01_rb,&
+       & 8.678601e-01_rb,8.678986e-01_rb,8.679351e-01_rb,8.679693e-01_rb,8.680013e-01_rb,&
+       & 8.680334e-01_rb,8.680624e-01_rb,8.680915e-01_rb,8.681178e-01_rb,8.681428e-01_rb,&
+       & 8.681654e-01_rb,8.681899e-01_rb,8.682103e-01_rb,8.682317e-01_rb,8.682498e-01_rb,&
+       & 8.682677e-01_rb,8.682861e-01_rb,8.683041e-01_rb /)
+!     BAND  29
+      asyliq1(:, 29) = (/ &
+       & 7.877069e-01_rb,8.244281e-01_rb,8.367971e-01_rb,8.409074e-01_rb,8.429859e-01_rb,&
+       & 8.454386e-01_rb,8.489350e-01_rb,8.534141e-01_rb,8.585814e-01_rb,8.641267e-01_rb,&
+       & 8.697999e-01_rb,8.754223e-01_rb,8.808785e-01_rb,8.860944e-01_rb,8.910354e-01_rb,&
+       & 8.956837e-01_rb,9.000392e-01_rb,9.041091e-01_rb,9.079071e-01_rb,9.114479e-01_rb,&
+       & 9.147462e-01_rb,9.178234e-01_rb,9.206903e-01_rb,9.233663e-01_rb,9.258668e-01_rb,&
+       & 9.282006e-01_rb,9.303847e-01_rb,9.324288e-01_rb,9.343418e-01_rb,9.361356e-01_rb,&
+       & 9.378176e-01_rb,9.393939e-01_rb,9.408736e-01_rb,9.422622e-01_rb,9.435670e-01_rb,&
+       & 9.447900e-01_rb,9.459395e-01_rb,9.470199e-01_rb,9.480335e-01_rb,9.489852e-01_rb,&
+       & 9.498782e-01_rb,9.507168e-01_rb,9.515044e-01_rb,9.522470e-01_rb,9.529409e-01_rb,&
+       & 9.535946e-01_rb,9.542071e-01_rb,9.547838e-01_rb,9.553256e-01_rb,9.558351e-01_rb,&
+       & 9.563139e-01_rb,9.567660e-01_rb,9.571915e-01_rb,9.575901e-01_rb,9.579685e-01_rb,&
+       & 9.583239e-01_rb,9.586602e-01_rb,9.589766e-01_rb /)
+
+
+! Spherical Ice Particle Parameterization
+! extinction units (ext coef/iwc): [(m^-1)/(g m^-3)]
+      extice2(:, 16) = (/ &
+! band 16
+        & 4.101824e-01_rb,2.435514e-01_rb,1.713697e-01_rb,1.314865e-01_rb,1.063406e-01_rb,&
+        & 8.910701e-02_rb,7.659480e-02_rb,6.711784e-02_rb,5.970353e-02_rb,5.375249e-02_rb,&
+        & 4.887577e-02_rb,4.481025e-02_rb,4.137171e-02_rb,3.842744e-02_rb,3.587948e-02_rb,&
+        & 3.365396e-02_rb,3.169419e-02_rb,2.995593e-02_rb,2.840419e-02_rb,2.701091e-02_rb,&
+        & 2.575336e-02_rb,2.461293e-02_rb,2.357423e-02_rb,2.262443e-02_rb,2.175276e-02_rb,&
+        & 2.095012e-02_rb,2.020875e-02_rb,1.952199e-02_rb,1.888412e-02_rb,1.829018e-02_rb,&
+        & 1.773586e-02_rb,1.721738e-02_rb,1.673144e-02_rb,1.627510e-02_rb,1.584579e-02_rb,&
+        & 1.544122e-02_rb,1.505934e-02_rb,1.469833e-02_rb,1.435654e-02_rb,1.403251e-02_rb,&
+        & 1.372492e-02_rb,1.343255e-02_rb,1.315433e-02_rb /)
+      extice2(:, 17) = (/ &
+! band 17
+        & 3.836650e-01_rb,2.304055e-01_rb,1.637265e-01_rb,1.266681e-01_rb,1.031602e-01_rb,&
+        & 8.695191e-02_rb,7.511544e-02_rb,6.610009e-02_rb,5.900909e-02_rb,5.328833e-02_rb,&
+        & 4.857728e-02_rb,4.463133e-02_rb,4.127880e-02_rb,3.839567e-02_rb,3.589013e-02_rb,&
+        & 3.369280e-02_rb,3.175027e-02_rb,3.002079e-02_rb,2.847121e-02_rb,2.707493e-02_rb,&
+        & 2.581031e-02_rb,2.465962e-02_rb,2.360815e-02_rb,2.264363e-02_rb,2.175571e-02_rb,&
+        & 2.093563e-02_rb,2.017592e-02_rb,1.947015e-02_rb,1.881278e-02_rb,1.819901e-02_rb,&
+        & 1.762463e-02_rb,1.708598e-02_rb,1.657982e-02_rb,1.610330e-02_rb,1.565390e-02_rb,&
+        & 1.522937e-02_rb,1.482768e-02_rb,1.444706e-02_rb,1.408588e-02_rb,1.374270e-02_rb,&
+        & 1.341619e-02_rb,1.310517e-02_rb,1.280857e-02_rb /)
+      extice2(:, 18) = (/ &
+! band 18
+        & 4.152673e-01_rb,2.436816e-01_rb,1.702243e-01_rb,1.299704e-01_rb,1.047528e-01_rb,&
+        & 8.756039e-02_rb,7.513327e-02_rb,6.575690e-02_rb,5.844616e-02_rb,5.259609e-02_rb,&
+        & 4.781531e-02_rb,4.383980e-02_rb,4.048517e-02_rb,3.761891e-02_rb,3.514342e-02_rb,&
+        & 3.298525e-02_rb,3.108814e-02_rb,2.940825e-02_rb,2.791096e-02_rb,2.656858e-02_rb,&
+        & 2.535869e-02_rb,2.426297e-02_rb,2.326627e-02_rb,2.235602e-02_rb,2.152164e-02_rb,&
+        & 2.075420e-02_rb,2.004613e-02_rb,1.939091e-02_rb,1.878296e-02_rb,1.821744e-02_rb,&
+        & 1.769015e-02_rb,1.719741e-02_rb,1.673600e-02_rb,1.630308e-02_rb,1.589615e-02_rb,&
+        & 1.551298e-02_rb,1.515159e-02_rb,1.481021e-02_rb,1.448726e-02_rb,1.418131e-02_rb,&
+        & 1.389109e-02_rb,1.361544e-02_rb,1.335330e-02_rb /)
+      extice2(:, 19) = (/ &
+! band 19
+        & 3.873250e-01_rb,2.331609e-01_rb,1.655002e-01_rb,1.277753e-01_rb,1.038247e-01_rb,&
+        & 8.731780e-02_rb,7.527638e-02_rb,6.611873e-02_rb,5.892850e-02_rb,5.313885e-02_rb,&
+        & 4.838068e-02_rb,4.440356e-02_rb,4.103167e-02_rb,3.813804e-02_rb,3.562870e-02_rb,&
+        & 3.343269e-02_rb,3.149539e-02_rb,2.977414e-02_rb,2.823510e-02_rb,2.685112e-02_rb,&
+        & 2.560015e-02_rb,2.446411e-02_rb,2.342805e-02_rb,2.247948e-02_rb,2.160789e-02_rb,&
+        & 2.080438e-02_rb,2.006139e-02_rb,1.937238e-02_rb,1.873177e-02_rb,1.813469e-02_rb,&
+        & 1.757689e-02_rb,1.705468e-02_rb,1.656479e-02_rb,1.610435e-02_rb,1.567081e-02_rb,&
+        & 1.526192e-02_rb,1.487565e-02_rb,1.451020e-02_rb,1.416396e-02_rb,1.383546e-02_rb,&
+        & 1.352339e-02_rb,1.322657e-02_rb,1.294392e-02_rb /)
+      extice2(:, 20) = (/ &
+! band 20
+        & 3.784280e-01_rb,2.291396e-01_rb,1.632551e-01_rb,1.263775e-01_rb,1.028944e-01_rb,&
+        & 8.666975e-02_rb,7.480952e-02_rb,6.577335e-02_rb,5.866714e-02_rb,5.293694e-02_rb,&
+        & 4.822153e-02_rb,4.427547e-02_rb,4.092626e-02_rb,3.804918e-02_rb,3.555184e-02_rb,&
+        & 3.336440e-02_rb,3.143307e-02_rb,2.971577e-02_rb,2.817912e-02_rb,2.679632e-02_rb,&
+        & 2.554558e-02_rb,2.440903e-02_rb,2.337187e-02_rb,2.242173e-02_rb,2.154821e-02_rb,&
+        & 2.074249e-02_rb,1.999706e-02_rb,1.930546e-02_rb,1.866212e-02_rb,1.806221e-02_rb,&
+        & 1.750152e-02_rb,1.697637e-02_rb,1.648352e-02_rb,1.602010e-02_rb,1.558358e-02_rb,&
+        & 1.517172e-02_rb,1.478250e-02_rb,1.441413e-02_rb,1.406498e-02_rb,1.373362e-02_rb,&
+        & 1.341872e-02_rb,1.311911e-02_rb,1.283371e-02_rb /)
+      extice2(:, 21) = (/ &
+! band 21
+        & 3.719909e-01_rb,2.259490e-01_rb,1.613144e-01_rb,1.250648e-01_rb,1.019462e-01_rb,&
+        & 8.595358e-02_rb,7.425064e-02_rb,6.532618e-02_rb,5.830218e-02_rb,5.263421e-02_rb,&
+        & 4.796697e-02_rb,4.405891e-02_rb,4.074013e-02_rb,3.788776e-02_rb,3.541071e-02_rb,&
+        & 3.324008e-02_rb,3.132280e-02_rb,2.961733e-02_rb,2.809071e-02_rb,2.671645e-02_rb,&
+        & 2.547302e-02_rb,2.434276e-02_rb,2.331102e-02_rb,2.236558e-02_rb,2.149614e-02_rb,&
+        & 2.069397e-02_rb,1.995163e-02_rb,1.926272e-02_rb,1.862174e-02_rb,1.802389e-02_rb,&
+        & 1.746500e-02_rb,1.694142e-02_rb,1.644994e-02_rb,1.598772e-02_rb,1.555225e-02_rb,&
+        & 1.514129e-02_rb,1.475286e-02_rb,1.438515e-02_rb,1.403659e-02_rb,1.370572e-02_rb,&
+        & 1.339124e-02_rb,1.309197e-02_rb,1.280685e-02_rb /)
+      extice2(:, 22) = (/ &
+! band 22
+        & 3.713158e-01_rb,2.253816e-01_rb,1.608461e-01_rb,1.246718e-01_rb,1.016109e-01_rb,&
+        & 8.566332e-02_rb,7.399666e-02_rb,6.510199e-02_rb,5.810290e-02_rb,5.245608e-02_rb,&
+        & 4.780702e-02_rb,4.391478e-02_rb,4.060989e-02_rb,3.776982e-02_rb,3.530374e-02_rb,&
+        & 3.314296e-02_rb,3.123458e-02_rb,2.953719e-02_rb,2.801794e-02_rb,2.665043e-02_rb,&
+        & 2.541321e-02_rb,2.428868e-02_rb,2.326224e-02_rb,2.232173e-02_rb,2.145688e-02_rb,&
+        & 2.065899e-02_rb,1.992067e-02_rb,1.923552e-02_rb,1.859808e-02_rb,1.800356e-02_rb,&
+        & 1.744782e-02_rb,1.692721e-02_rb,1.643855e-02_rb,1.597900e-02_rb,1.554606e-02_rb,&
+        & 1.513751e-02_rb,1.475137e-02_rb,1.438586e-02_rb,1.403938e-02_rb,1.371050e-02_rb,&
+        & 1.339793e-02_rb,1.310050e-02_rb,1.281713e-02_rb /)
+      extice2(:, 23) = (/ &
+! band 23
+        & 3.605883e-01_rb,2.204388e-01_rb,1.580431e-01_rb,1.229033e-01_rb,1.004203e-01_rb,&
+        & 8.482616e-02_rb,7.338941e-02_rb,6.465105e-02_rb,5.776176e-02_rb,5.219398e-02_rb,&
+        & 4.760288e-02_rb,4.375369e-02_rb,4.048111e-02_rb,3.766539e-02_rb,3.521771e-02_rb,&
+        & 3.307079e-02_rb,3.117277e-02_rb,2.948303e-02_rb,2.796929e-02_rb,2.660560e-02_rb,&
+        & 2.537086e-02_rb,2.424772e-02_rb,2.322182e-02_rb,2.228114e-02_rb,2.141556e-02_rb,&
+        & 2.061649e-02_rb,1.987661e-02_rb,1.918962e-02_rb,1.855009e-02_rb,1.795330e-02_rb,&
+        & 1.739514e-02_rb,1.687199e-02_rb,1.638069e-02_rb,1.591845e-02_rb,1.548276e-02_rb,&
+        & 1.507143e-02_rb,1.468249e-02_rb,1.431416e-02_rb,1.396486e-02_rb,1.363318e-02_rb,&
+        & 1.331781e-02_rb,1.301759e-02_rb,1.273147e-02_rb /)
+      extice2(:, 24) = (/ &
+! band 24
+        & 3.527890e-01_rb,2.168469e-01_rb,1.560090e-01_rb,1.216216e-01_rb,9.955787e-02_rb,&
+        & 8.421942e-02_rb,7.294827e-02_rb,6.432192e-02_rb,5.751081e-02_rb,5.199888e-02_rb,&
+        & 4.744835e-02_rb,4.362899e-02_rb,4.037847e-02_rb,3.757910e-02_rb,3.514351e-02_rb,&
+        & 3.300546e-02_rb,3.111382e-02_rb,2.942853e-02_rb,2.791775e-02_rb,2.655584e-02_rb,&
+        & 2.532195e-02_rb,2.419892e-02_rb,2.317255e-02_rb,2.223092e-02_rb,2.136402e-02_rb,&
+        & 2.056334e-02_rb,1.982160e-02_rb,1.913258e-02_rb,1.849087e-02_rb,1.789178e-02_rb,&
+        & 1.733124e-02_rb,1.680565e-02_rb,1.631187e-02_rb,1.584711e-02_rb,1.540889e-02_rb,&
+        & 1.499502e-02_rb,1.460354e-02_rb,1.423269e-02_rb,1.388088e-02_rb,1.354670e-02_rb,&
+        & 1.322887e-02_rb,1.292620e-02_rb,1.263767e-02_rb /)
+      extice2(:, 25) = (/ &
+! band 25
+        & 3.477874e-01_rb,2.143515e-01_rb,1.544887e-01_rb,1.205942e-01_rb,9.881779e-02_rb,&
+        & 8.366261e-02_rb,7.251586e-02_rb,6.397790e-02_rb,5.723183e-02_rb,5.176908e-02_rb,&
+        & 4.725658e-02_rb,4.346715e-02_rb,4.024055e-02_rb,3.746055e-02_rb,3.504080e-02_rb,&
+        & 3.291583e-02_rb,3.103507e-02_rb,2.935891e-02_rb,2.785582e-02_rb,2.650042e-02_rb,&
+        & 2.527206e-02_rb,2.415376e-02_rb,2.313142e-02_rb,2.219326e-02_rb,2.132934e-02_rb,&
+        & 2.053122e-02_rb,1.979169e-02_rb,1.910456e-02_rb,1.846448e-02_rb,1.786680e-02_rb,&
+        & 1.730745e-02_rb,1.678289e-02_rb,1.628998e-02_rb,1.582595e-02_rb,1.538835e-02_rb,&
+        & 1.497499e-02_rb,1.458393e-02_rb,1.421341e-02_rb,1.386187e-02_rb,1.352788e-02_rb,&
+        & 1.321019e-02_rb,1.290762e-02_rb,1.261913e-02_rb /)
+      extice2(:, 26) = (/ &
+! band 26
+        & 3.453721e-01_rb,2.130744e-01_rb,1.536698e-01_rb,1.200140e-01_rb,9.838078e-02_rb,&
+        & 8.331940e-02_rb,7.223803e-02_rb,6.374775e-02_rb,5.703770e-02_rb,5.160290e-02_rb,&
+        & 4.711259e-02_rb,4.334110e-02_rb,4.012923e-02_rb,3.736150e-02_rb,3.495208e-02_rb,&
+        & 3.283589e-02_rb,3.096267e-02_rb,2.929302e-02_rb,2.779560e-02_rb,2.644517e-02_rb,&
+        & 2.522119e-02_rb,2.410677e-02_rb,2.308788e-02_rb,2.215281e-02_rb,2.129165e-02_rb,&
+        & 2.049602e-02_rb,1.975874e-02_rb,1.907365e-02_rb,1.843542e-02_rb,1.783943e-02_rb,&
+        & 1.728162e-02_rb,1.675847e-02_rb,1.626685e-02_rb,1.580401e-02_rb,1.536750e-02_rb,&
+        & 1.495515e-02_rb,1.456502e-02_rb,1.419537e-02_rb,1.384463e-02_rb,1.351139e-02_rb,&
+        & 1.319438e-02_rb,1.289246e-02_rb,1.260456e-02_rb /)
+      extice2(:, 27) = (/ &
+! band 27
+        & 3.417883e-01_rb,2.113379e-01_rb,1.526395e-01_rb,1.193347e-01_rb,9.790253e-02_rb,&
+        & 8.296715e-02_rb,7.196979e-02_rb,6.353806e-02_rb,5.687024e-02_rb,5.146670e-02_rb,&
+        & 4.700001e-02_rb,4.324667e-02_rb,4.004894e-02_rb,3.729233e-02_rb,3.489172e-02_rb,&
+        & 3.278257e-02_rb,3.091499e-02_rb,2.924987e-02_rb,2.775609e-02_rb,2.640859e-02_rb,&
+        & 2.518695e-02_rb,2.407439e-02_rb,2.305697e-02_rb,2.212303e-02_rb,2.126273e-02_rb,&
+        & 2.046774e-02_rb,1.973090e-02_rb,1.904610e-02_rb,1.840801e-02_rb,1.781204e-02_rb,&
+        & 1.725417e-02_rb,1.673086e-02_rb,1.623902e-02_rb,1.577590e-02_rb,1.533906e-02_rb,&
+        & 1.492634e-02_rb,1.453580e-02_rb,1.416571e-02_rb,1.381450e-02_rb,1.348078e-02_rb,&
+        & 1.316327e-02_rb,1.286082e-02_rb,1.257240e-02_rb /)
+      extice2(:, 28) = (/ &
+! band 28
+        & 3.416111e-01_rb,2.114124e-01_rb,1.527734e-01_rb,1.194809e-01_rb,9.804612e-02_rb,&
+        & 8.310287e-02_rb,7.209595e-02_rb,6.365442e-02_rb,5.697710e-02_rb,5.156460e-02_rb,&
+        & 4.708957e-02_rb,4.332850e-02_rb,4.012361e-02_rb,3.736037e-02_rb,3.495364e-02_rb,&
+        & 3.283879e-02_rb,3.096593e-02_rb,2.929589e-02_rb,2.779751e-02_rb,2.644571e-02_rb,&
+        & 2.522004e-02_rb,2.410369e-02_rb,2.308271e-02_rb,2.214542e-02_rb,2.128195e-02_rb,&
+        & 2.048396e-02_rb,1.974429e-02_rb,1.905679e-02_rb,1.841614e-02_rb,1.781774e-02_rb,&
+        & 1.725754e-02_rb,1.673203e-02_rb,1.623807e-02_rb,1.577293e-02_rb,1.533416e-02_rb,&
+        & 1.491958e-02_rb,1.452727e-02_rb,1.415547e-02_rb,1.380262e-02_rb,1.346732e-02_rb,&
+        & 1.314830e-02_rb,1.284439e-02_rb,1.255456e-02_rb /)
+      extice2(:, 29) = (/ &
+! band 29
+        & 4.196611e-01_rb,2.493642e-01_rb,1.761261e-01_rb,1.357197e-01_rb,1.102161e-01_rb,&
+        & 9.269376e-02_rb,7.992985e-02_rb,7.022538e-02_rb,6.260168e-02_rb,5.645603e-02_rb,&
+        & 5.139732e-02_rb,4.716088e-02_rb,4.356133e-02_rb,4.046498e-02_rb,3.777303e-02_rb,&
+        & 3.541094e-02_rb,3.332137e-02_rb,3.145954e-02_rb,2.978998e-02_rb,2.828419e-02_rb,&
+        & 2.691905e-02_rb,2.567559e-02_rb,2.453811e-02_rb,2.349350e-02_rb,2.253072e-02_rb,&
+        & 2.164042e-02_rb,2.081464e-02_rb,2.004652e-02_rb,1.933015e-02_rb,1.866041e-02_rb,&
+        & 1.803283e-02_rb,1.744348e-02_rb,1.688894e-02_rb,1.636616e-02_rb,1.587244e-02_rb,&
+        & 1.540539e-02_rb,1.496287e-02_rb,1.454295e-02_rb,1.414392e-02_rb,1.376423e-02_rb,&
+        & 1.340247e-02_rb,1.305739e-02_rb,1.272784e-02_rb /)
+
+! single-scattering albedo: unitless
+      ssaice2(:, 16) = (/ &
+! band 16
+        & 6.630615e-01_rb,6.451169e-01_rb,6.333696e-01_rb,6.246927e-01_rb,6.178420e-01_rb,&
+        & 6.121976e-01_rb,6.074069e-01_rb,6.032505e-01_rb,5.995830e-01_rb,5.963030e-01_rb,&
+        & 5.933372e-01_rb,5.906311e-01_rb,5.881427e-01_rb,5.858395e-01_rb,5.836955e-01_rb,&
+        & 5.816896e-01_rb,5.798046e-01_rb,5.780264e-01_rb,5.763429e-01_rb,5.747441e-01_rb,&
+        & 5.732213e-01_rb,5.717672e-01_rb,5.703754e-01_rb,5.690403e-01_rb,5.677571e-01_rb,&
+        & 5.665215e-01_rb,5.653297e-01_rb,5.641782e-01_rb,5.630643e-01_rb,5.619850e-01_rb,&
+        & 5.609381e-01_rb,5.599214e-01_rb,5.589328e-01_rb,5.579707e-01_rb,5.570333e-01_rb,&
+        & 5.561193e-01_rb,5.552272e-01_rb,5.543558e-01_rb,5.535041e-01_rb,5.526708e-01_rb,&
+        & 5.518551e-01_rb,5.510561e-01_rb,5.502729e-01_rb /)
+      ssaice2(:, 17) = (/ &
+! band 17
+        & 7.689749e-01_rb,7.398171e-01_rb,7.205819e-01_rb,7.065690e-01_rb,6.956928e-01_rb,&
+        & 6.868989e-01_rb,6.795813e-01_rb,6.733606e-01_rb,6.679838e-01_rb,6.632742e-01_rb,&
+        & 6.591036e-01_rb,6.553766e-01_rb,6.520197e-01_rb,6.489757e-01_rb,6.461991e-01_rb,&
+        & 6.436531e-01_rb,6.413075e-01_rb,6.391375e-01_rb,6.371221e-01_rb,6.352438e-01_rb,&
+        & 6.334876e-01_rb,6.318406e-01_rb,6.302918e-01_rb,6.288315e-01_rb,6.274512e-01_rb,&
+        & 6.261436e-01_rb,6.249022e-01_rb,6.237211e-01_rb,6.225953e-01_rb,6.215201e-01_rb,&
+        & 6.204914e-01_rb,6.195055e-01_rb,6.185592e-01_rb,6.176492e-01_rb,6.167730e-01_rb,&
+        & 6.159280e-01_rb,6.151120e-01_rb,6.143228e-01_rb,6.135587e-01_rb,6.128177e-01_rb,&
+        & 6.120984e-01_rb,6.113993e-01_rb,6.107189e-01_rb /)
+      ssaice2(:, 18) = (/ &
+! band 18
+        & 9.956167e-01_rb,9.814770e-01_rb,9.716104e-01_rb,9.639746e-01_rb,9.577179e-01_rb,&
+        & 9.524010e-01_rb,9.477672e-01_rb,9.436527e-01_rb,9.399467e-01_rb,9.365708e-01_rb,&
+        & 9.334672e-01_rb,9.305921e-01_rb,9.279118e-01_rb,9.253993e-01_rb,9.230330e-01_rb,&
+        & 9.207954e-01_rb,9.186719e-01_rb,9.166501e-01_rb,9.147199e-01_rb,9.128722e-01_rb,&
+        & 9.110997e-01_rb,9.093956e-01_rb,9.077544e-01_rb,9.061708e-01_rb,9.046406e-01_rb,&
+        & 9.031598e-01_rb,9.017248e-01_rb,9.003326e-01_rb,8.989804e-01_rb,8.976655e-01_rb,&
+        & 8.963857e-01_rb,8.951389e-01_rb,8.939233e-01_rb,8.927370e-01_rb,8.915785e-01_rb,&
+        & 8.904464e-01_rb,8.893392e-01_rb,8.882559e-01_rb,8.871951e-01_rb,8.861559e-01_rb,&
+        & 8.851373e-01_rb,8.841383e-01_rb,8.831581e-01_rb /)
+      ssaice2(:, 19) = (/ &
+! band 19
+        & 9.723177e-01_rb,9.452119e-01_rb,9.267592e-01_rb,9.127393e-01_rb,9.014238e-01_rb,&
+        & 8.919334e-01_rb,8.837584e-01_rb,8.765773e-01_rb,8.701736e-01_rb,8.643950e-01_rb,&
+        & 8.591299e-01_rb,8.542942e-01_rb,8.498230e-01_rb,8.456651e-01_rb,8.417794e-01_rb,&
+        & 8.381324e-01_rb,8.346964e-01_rb,8.314484e-01_rb,8.283687e-01_rb,8.254408e-01_rb,&
+        & 8.226505e-01_rb,8.199854e-01_rb,8.174348e-01_rb,8.149891e-01_rb,8.126403e-01_rb,&
+        & 8.103808e-01_rb,8.082041e-01_rb,8.061044e-01_rb,8.040765e-01_rb,8.021156e-01_rb,&
+        & 8.002174e-01_rb,7.983781e-01_rb,7.965941e-01_rb,7.948622e-01_rb,7.931795e-01_rb,&
+        & 7.915432e-01_rb,7.899508e-01_rb,7.884002e-01_rb,7.868891e-01_rb,7.854156e-01_rb,&
+        & 7.839779e-01_rb,7.825742e-01_rb,7.812031e-01_rb /)
+      ssaice2(:, 20) = (/ &
+! band 20
+        & 9.933294e-01_rb,9.860917e-01_rb,9.811564e-01_rb,9.774008e-01_rb,9.743652e-01_rb,&
+        & 9.718155e-01_rb,9.696159e-01_rb,9.676810e-01_rb,9.659531e-01_rb,9.643915e-01_rb,&
+        & 9.629667e-01_rb,9.616561e-01_rb,9.604426e-01_rb,9.593125e-01_rb,9.582548e-01_rb,&
+        & 9.572607e-01_rb,9.563227e-01_rb,9.554347e-01_rb,9.545915e-01_rb,9.537888e-01_rb,&
+        & 9.530226e-01_rb,9.522898e-01_rb,9.515874e-01_rb,9.509130e-01_rb,9.502643e-01_rb,&
+        & 9.496394e-01_rb,9.490366e-01_rb,9.484542e-01_rb,9.478910e-01_rb,9.473456e-01_rb,&
+        & 9.468169e-01_rb,9.463039e-01_rb,9.458056e-01_rb,9.453212e-01_rb,9.448499e-01_rb,&
+        & 9.443910e-01_rb,9.439438e-01_rb,9.435077e-01_rb,9.430821e-01_rb,9.426666e-01_rb,&
+        & 9.422607e-01_rb,9.418638e-01_rb,9.414756e-01_rb /)
+      ssaice2(:, 21) = (/ &
+! band 21
+        & 9.900787e-01_rb,9.828880e-01_rb,9.779258e-01_rb,9.741173e-01_rb,9.710184e-01_rb,&
+        & 9.684012e-01_rb,9.661332e-01_rb,9.641301e-01_rb,9.623352e-01_rb,9.607083e-01_rb,&
+        & 9.592198e-01_rb,9.578474e-01_rb,9.565739e-01_rb,9.553856e-01_rb,9.542715e-01_rb,&
+        & 9.532226e-01_rb,9.522314e-01_rb,9.512919e-01_rb,9.503986e-01_rb,9.495472e-01_rb,&
+        & 9.487337e-01_rb,9.479549e-01_rb,9.472077e-01_rb,9.464897e-01_rb,9.457985e-01_rb,&
+        & 9.451322e-01_rb,9.444890e-01_rb,9.438673e-01_rb,9.432656e-01_rb,9.426826e-01_rb,&
+        & 9.421173e-01_rb,9.415684e-01_rb,9.410351e-01_rb,9.405164e-01_rb,9.400115e-01_rb,&
+        & 9.395198e-01_rb,9.390404e-01_rb,9.385728e-01_rb,9.381164e-01_rb,9.376707e-01_rb,&
+        & 9.372350e-01_rb,9.368091e-01_rb,9.363923e-01_rb /)
+      ssaice2(:, 22) = (/ &
+! band 22
+        & 9.986793e-01_rb,9.985239e-01_rb,9.983911e-01_rb,9.982715e-01_rb,9.981606e-01_rb,&
+        & 9.980562e-01_rb,9.979567e-01_rb,9.978613e-01_rb,9.977691e-01_rb,9.976798e-01_rb,&
+        & 9.975929e-01_rb,9.975081e-01_rb,9.974251e-01_rb,9.973438e-01_rb,9.972640e-01_rb,&
+        & 9.971855e-01_rb,9.971083e-01_rb,9.970322e-01_rb,9.969571e-01_rb,9.968830e-01_rb,&
+        & 9.968099e-01_rb,9.967375e-01_rb,9.966660e-01_rb,9.965951e-01_rb,9.965250e-01_rb,&
+        & 9.964555e-01_rb,9.963867e-01_rb,9.963185e-01_rb,9.962508e-01_rb,9.961836e-01_rb,&
+        & 9.961170e-01_rb,9.960508e-01_rb,9.959851e-01_rb,9.959198e-01_rb,9.958550e-01_rb,&
+        & 9.957906e-01_rb,9.957266e-01_rb,9.956629e-01_rb,9.955997e-01_rb,9.955367e-01_rb,&
+        & 9.954742e-01_rb,9.954119e-01_rb,9.953500e-01_rb /)
+      ssaice2(:, 23) = (/ &
+! band 23
+        & 9.997944e-01_rb,9.997791e-01_rb,9.997664e-01_rb,9.997547e-01_rb,9.997436e-01_rb,&
+        & 9.997327e-01_rb,9.997219e-01_rb,9.997110e-01_rb,9.996999e-01_rb,9.996886e-01_rb,&
+        & 9.996771e-01_rb,9.996653e-01_rb,9.996533e-01_rb,9.996409e-01_rb,9.996282e-01_rb,&
+        & 9.996152e-01_rb,9.996019e-01_rb,9.995883e-01_rb,9.995743e-01_rb,9.995599e-01_rb,&
+        & 9.995453e-01_rb,9.995302e-01_rb,9.995149e-01_rb,9.994992e-01_rb,9.994831e-01_rb,&
+        & 9.994667e-01_rb,9.994500e-01_rb,9.994329e-01_rb,9.994154e-01_rb,9.993976e-01_rb,&
+        & 9.993795e-01_rb,9.993610e-01_rb,9.993422e-01_rb,9.993230e-01_rb,9.993035e-01_rb,&
+        & 9.992837e-01_rb,9.992635e-01_rb,9.992429e-01_rb,9.992221e-01_rb,9.992008e-01_rb,&
+        & 9.991793e-01_rb,9.991574e-01_rb,9.991352e-01_rb /)
+      ssaice2(:, 24) = (/ &
+! band 24
+        & 9.999949e-01_rb,9.999947e-01_rb,9.999943e-01_rb,9.999939e-01_rb,9.999934e-01_rb,&
+        & 9.999927e-01_rb,9.999920e-01_rb,9.999913e-01_rb,9.999904e-01_rb,9.999895e-01_rb,&
+        & 9.999885e-01_rb,9.999874e-01_rb,9.999863e-01_rb,9.999851e-01_rb,9.999838e-01_rb,&
+        & 9.999824e-01_rb,9.999810e-01_rb,9.999795e-01_rb,9.999780e-01_rb,9.999764e-01_rb,&
+        & 9.999747e-01_rb,9.999729e-01_rb,9.999711e-01_rb,9.999692e-01_rb,9.999673e-01_rb,&
+        & 9.999653e-01_rb,9.999632e-01_rb,9.999611e-01_rb,9.999589e-01_rb,9.999566e-01_rb,&
+        & 9.999543e-01_rb,9.999519e-01_rb,9.999495e-01_rb,9.999470e-01_rb,9.999444e-01_rb,&
+        & 9.999418e-01_rb,9.999392e-01_rb,9.999364e-01_rb,9.999336e-01_rb,9.999308e-01_rb,&
+        & 9.999279e-01_rb,9.999249e-01_rb,9.999219e-01_rb /)
+      ssaice2(:, 25) = (/ &
+! band 25
+        & 9.999997e-01_rb,9.999997e-01_rb,9.999997e-01_rb,9.999996e-01_rb,9.999996e-01_rb,&
+        & 9.999995e-01_rb,9.999994e-01_rb,9.999993e-01_rb,9.999993e-01_rb,9.999992e-01_rb,&
+        & 9.999991e-01_rb,9.999989e-01_rb,9.999988e-01_rb,9.999987e-01_rb,9.999986e-01_rb,&
+        & 9.999984e-01_rb,9.999983e-01_rb,9.999981e-01_rb,9.999980e-01_rb,9.999978e-01_rb,&
+        & 9.999976e-01_rb,9.999974e-01_rb,9.999972e-01_rb,9.999971e-01_rb,9.999969e-01_rb,&
+        & 9.999966e-01_rb,9.999964e-01_rb,9.999962e-01_rb,9.999960e-01_rb,9.999957e-01_rb,&
+        & 9.999955e-01_rb,9.999953e-01_rb,9.999950e-01_rb,9.999947e-01_rb,9.999945e-01_rb,&
+        & 9.999942e-01_rb,9.999939e-01_rb,9.999936e-01_rb,9.999934e-01_rb,9.999931e-01_rb,&
+        & 9.999928e-01_rb,9.999925e-01_rb,9.999921e-01_rb /)
+      ssaice2(:, 26) = (/ &
+! band 26
+        & 9.999997e-01_rb,9.999996e-01_rb,9.999996e-01_rb,9.999995e-01_rb,9.999994e-01_rb,&
+        & 9.999993e-01_rb,9.999992e-01_rb,9.999991e-01_rb,9.999990e-01_rb,9.999989e-01_rb,&
+        & 9.999987e-01_rb,9.999986e-01_rb,9.999984e-01_rb,9.999982e-01_rb,9.999980e-01_rb,&
+        & 9.999978e-01_rb,9.999976e-01_rb,9.999974e-01_rb,9.999972e-01_rb,9.999970e-01_rb,&
+        & 9.999967e-01_rb,9.999965e-01_rb,9.999962e-01_rb,9.999959e-01_rb,9.999956e-01_rb,&
+        & 9.999954e-01_rb,9.999951e-01_rb,9.999947e-01_rb,9.999944e-01_rb,9.999941e-01_rb,&
+        & 9.999938e-01_rb,9.999934e-01_rb,9.999931e-01_rb,9.999927e-01_rb,9.999923e-01_rb,&
+        & 9.999920e-01_rb,9.999916e-01_rb,9.999912e-01_rb,9.999908e-01_rb,9.999904e-01_rb,&
+        & 9.999899e-01_rb,9.999895e-01_rb,9.999891e-01_rb /)
+      ssaice2(:, 27) = (/ &
+! band 27
+        & 9.999987e-01_rb,9.999987e-01_rb,9.999985e-01_rb,9.999984e-01_rb,9.999982e-01_rb,&
+        & 9.999980e-01_rb,9.999978e-01_rb,9.999976e-01_rb,9.999973e-01_rb,9.999970e-01_rb,&
+        & 9.999967e-01_rb,9.999964e-01_rb,9.999960e-01_rb,9.999956e-01_rb,9.999952e-01_rb,&
+        & 9.999948e-01_rb,9.999944e-01_rb,9.999939e-01_rb,9.999934e-01_rb,9.999929e-01_rb,&
+        & 9.999924e-01_rb,9.999918e-01_rb,9.999913e-01_rb,9.999907e-01_rb,9.999901e-01_rb,&
+        & 9.999894e-01_rb,9.999888e-01_rb,9.999881e-01_rb,9.999874e-01_rb,9.999867e-01_rb,&
+        & 9.999860e-01_rb,9.999853e-01_rb,9.999845e-01_rb,9.999837e-01_rb,9.999829e-01_rb,&
+        & 9.999821e-01_rb,9.999813e-01_rb,9.999804e-01_rb,9.999796e-01_rb,9.999787e-01_rb,&
+        & 9.999778e-01_rb,9.999768e-01_rb,9.999759e-01_rb /)
+      ssaice2(:, 28) = (/ &
+! band 28
+        & 9.999989e-01_rb,9.999989e-01_rb,9.999987e-01_rb,9.999986e-01_rb,9.999984e-01_rb,&
+        & 9.999982e-01_rb,9.999980e-01_rb,9.999978e-01_rb,9.999975e-01_rb,9.999972e-01_rb,&
+        & 9.999969e-01_rb,9.999966e-01_rb,9.999962e-01_rb,9.999958e-01_rb,9.999954e-01_rb,&
+        & 9.999950e-01_rb,9.999945e-01_rb,9.999941e-01_rb,9.999936e-01_rb,9.999931e-01_rb,&
+        & 9.999925e-01_rb,9.999920e-01_rb,9.999914e-01_rb,9.999908e-01_rb,9.999902e-01_rb,&
+        & 9.999896e-01_rb,9.999889e-01_rb,9.999883e-01_rb,9.999876e-01_rb,9.999869e-01_rb,&
+        & 9.999861e-01_rb,9.999854e-01_rb,9.999846e-01_rb,9.999838e-01_rb,9.999830e-01_rb,&
+        & 9.999822e-01_rb,9.999814e-01_rb,9.999805e-01_rb,9.999796e-01_rb,9.999787e-01_rb,&
+        & 9.999778e-01_rb,9.999769e-01_rb,9.999759e-01_rb /)
+      ssaice2(:, 29) = (/ &
+! band 29
+        & 7.042143e-01_rb,6.691161e-01_rb,6.463240e-01_rb,6.296590e-01_rb,6.166381e-01_rb,&
+        & 6.060183e-01_rb,5.970908e-01_rb,5.894144e-01_rb,5.826968e-01_rb,5.767343e-01_rb,&
+        & 5.713804e-01_rb,5.665256e-01_rb,5.620867e-01_rb,5.579987e-01_rb,5.542101e-01_rb,&
+        & 5.506794e-01_rb,5.473727e-01_rb,5.442620e-01_rb,5.413239e-01_rb,5.385389e-01_rb,&
+        & 5.358901e-01_rb,5.333633e-01_rb,5.309460e-01_rb,5.286277e-01_rb,5.263988e-01_rb,&
+        & 5.242512e-01_rb,5.221777e-01_rb,5.201719e-01_rb,5.182280e-01_rb,5.163410e-01_rb,&
+        & 5.145062e-01_rb,5.127197e-01_rb,5.109776e-01_rb,5.092766e-01_rb,5.076137e-01_rb,&
+        & 5.059860e-01_rb,5.043911e-01_rb,5.028266e-01_rb,5.012904e-01_rb,4.997805e-01_rb,&
+        & 4.982951e-01_rb,4.968326e-01_rb,4.953913e-01_rb /)
+
+! asymmetry factor: unitless
+      asyice2(:, 16) = (/ &
+! band 16
+        & 7.946655e-01_rb,8.547685e-01_rb,8.806016e-01_rb,8.949880e-01_rb,9.041676e-01_rb,&
+        & 9.105399e-01_rb,9.152249e-01_rb,9.188160e-01_rb,9.216573e-01_rb,9.239620e-01_rb,&
+        & 9.258695e-01_rb,9.274745e-01_rb,9.288441e-01_rb,9.300267e-01_rb,9.310584e-01_rb,&
+        & 9.319665e-01_rb,9.327721e-01_rb,9.334918e-01_rb,9.341387e-01_rb,9.347236e-01_rb,&
+        & 9.352551e-01_rb,9.357402e-01_rb,9.361850e-01_rb,9.365942e-01_rb,9.369722e-01_rb,&
+        & 9.373225e-01_rb,9.376481e-01_rb,9.379516e-01_rb,9.382352e-01_rb,9.385010e-01_rb,&
+        & 9.387505e-01_rb,9.389854e-01_rb,9.392070e-01_rb,9.394163e-01_rb,9.396145e-01_rb,&
+        & 9.398024e-01_rb,9.399809e-01_rb,9.401508e-01_rb,9.403126e-01_rb,9.404670e-01_rb,&
+        & 9.406144e-01_rb,9.407555e-01_rb,9.408906e-01_rb /)
+      asyice2(:, 17) = (/ &
+! band 17
+        & 9.078091e-01_rb,9.195850e-01_rb,9.267250e-01_rb,9.317083e-01_rb,9.354632e-01_rb,&
+        & 9.384323e-01_rb,9.408597e-01_rb,9.428935e-01_rb,9.446301e-01_rb,9.461351e-01_rb,&
+        & 9.474555e-01_rb,9.486259e-01_rb,9.496722e-01_rb,9.506146e-01_rb,9.514688e-01_rb,&
+        & 9.522476e-01_rb,9.529612e-01_rb,9.536181e-01_rb,9.542251e-01_rb,9.547883e-01_rb,&
+        & 9.553124e-01_rb,9.558019e-01_rb,9.562601e-01_rb,9.566904e-01_rb,9.570953e-01_rb,&
+        & 9.574773e-01_rb,9.578385e-01_rb,9.581806e-01_rb,9.585054e-01_rb,9.588142e-01_rb,&
+        & 9.591083e-01_rb,9.593888e-01_rb,9.596569e-01_rb,9.599135e-01_rb,9.601593e-01_rb,&
+        & 9.603952e-01_rb,9.606219e-01_rb,9.608399e-01_rb,9.610499e-01_rb,9.612523e-01_rb,&
+        & 9.614477e-01_rb,9.616365e-01_rb,9.618192e-01_rb /)
+      asyice2(:, 18) = (/ &
+! band 18
+        & 8.322045e-01_rb,8.528693e-01_rb,8.648167e-01_rb,8.729163e-01_rb,8.789054e-01_rb,&
+        & 8.835845e-01_rb,8.873819e-01_rb,8.905511e-01_rb,8.932532e-01_rb,8.955965e-01_rb,&
+        & 8.976567e-01_rb,8.994887e-01_rb,9.011334e-01_rb,9.026221e-01_rb,9.039791e-01_rb,&
+        & 9.052237e-01_rb,9.063715e-01_rb,9.074349e-01_rb,9.084245e-01_rb,9.093489e-01_rb,&
+        & 9.102154e-01_rb,9.110303e-01_rb,9.117987e-01_rb,9.125253e-01_rb,9.132140e-01_rb,&
+        & 9.138682e-01_rb,9.144910e-01_rb,9.150850e-01_rb,9.156524e-01_rb,9.161955e-01_rb,&
+        & 9.167160e-01_rb,9.172157e-01_rb,9.176959e-01_rb,9.181581e-01_rb,9.186034e-01_rb,&
+        & 9.190330e-01_rb,9.194478e-01_rb,9.198488e-01_rb,9.202368e-01_rb,9.206126e-01_rb,&
+        & 9.209768e-01_rb,9.213301e-01_rb,9.216731e-01_rb /)
+      asyice2(:, 19) = (/ &
+! band 19
+        & 8.116560e-01_rb,8.488278e-01_rb,8.674331e-01_rb,8.788148e-01_rb,8.865810e-01_rb,&
+        & 8.922595e-01_rb,8.966149e-01_rb,9.000747e-01_rb,9.028980e-01_rb,9.052513e-01_rb,&
+        & 9.072468e-01_rb,9.089632e-01_rb,9.104574e-01_rb,9.117713e-01_rb,9.129371e-01_rb,&
+        & 9.139793e-01_rb,9.149174e-01_rb,9.157668e-01_rb,9.165400e-01_rb,9.172473e-01_rb,&
+        & 9.178970e-01_rb,9.184962e-01_rb,9.190508e-01_rb,9.195658e-01_rb,9.200455e-01_rb,&
+        & 9.204935e-01_rb,9.209130e-01_rb,9.213067e-01_rb,9.216771e-01_rb,9.220262e-01_rb,&
+        & 9.223560e-01_rb,9.226680e-01_rb,9.229636e-01_rb,9.232443e-01_rb,9.235112e-01_rb,&
+        & 9.237652e-01_rb,9.240074e-01_rb,9.242385e-01_rb,9.244594e-01_rb,9.246708e-01_rb,&
+        & 9.248733e-01_rb,9.250674e-01_rb,9.252536e-01_rb /)
+      asyice2(:, 20) = (/ &
+! band 20
+        & 8.047113e-01_rb,8.402864e-01_rb,8.570332e-01_rb,8.668455e-01_rb,8.733206e-01_rb,&
+        & 8.779272e-01_rb,8.813796e-01_rb,8.840676e-01_rb,8.862225e-01_rb,8.879904e-01_rb,&
+        & 8.894682e-01_rb,8.907228e-01_rb,8.918019e-01_rb,8.927404e-01_rb,8.935645e-01_rb,&
+        & 8.942943e-01_rb,8.949452e-01_rb,8.955296e-01_rb,8.960574e-01_rb,8.965366e-01_rb,&
+        & 8.969736e-01_rb,8.973740e-01_rb,8.977422e-01_rb,8.980820e-01_rb,8.983966e-01_rb,&
+        & 8.986889e-01_rb,8.989611e-01_rb,8.992153e-01_rb,8.994533e-01_rb,8.996766e-01_rb,&
+        & 8.998865e-01_rb,9.000843e-01_rb,9.002709e-01_rb,9.004474e-01_rb,9.006146e-01_rb,&
+        & 9.007731e-01_rb,9.009237e-01_rb,9.010670e-01_rb,9.012034e-01_rb,9.013336e-01_rb,&
+        & 9.014579e-01_rb,9.015767e-01_rb,9.016904e-01_rb /)
+      asyice2(:, 21) = (/ &
+! band 21
+        & 8.179122e-01_rb,8.480726e-01_rb,8.621945e-01_rb,8.704354e-01_rb,8.758555e-01_rb,&
+        & 8.797007e-01_rb,8.825750e-01_rb,8.848078e-01_rb,8.865939e-01_rb,8.880564e-01_rb,&
+        & 8.892765e-01_rb,8.903105e-01_rb,8.911982e-01_rb,8.919689e-01_rb,8.926446e-01_rb,&
+        & 8.932419e-01_rb,8.937738e-01_rb,8.942506e-01_rb,8.946806e-01_rb,8.950702e-01_rb,&
+        & 8.954251e-01_rb,8.957497e-01_rb,8.960477e-01_rb,8.963223e-01_rb,8.965762e-01_rb,&
+        & 8.968116e-01_rb,8.970306e-01_rb,8.972347e-01_rb,8.974255e-01_rb,8.976042e-01_rb,&
+        & 8.977720e-01_rb,8.979298e-01_rb,8.980784e-01_rb,8.982188e-01_rb,8.983515e-01_rb,&
+        & 8.984771e-01_rb,8.985963e-01_rb,8.987095e-01_rb,8.988171e-01_rb,8.989195e-01_rb,&
+        & 8.990172e-01_rb,8.991104e-01_rb,8.991994e-01_rb /)
+      asyice2(:, 22) = (/ &
+! band 22
+        & 8.169789e-01_rb,8.455024e-01_rb,8.586925e-01_rb,8.663283e-01_rb,8.713217e-01_rb,&
+        & 8.748488e-01_rb,8.774765e-01_rb,8.795122e-01_rb,8.811370e-01_rb,8.824649e-01_rb,&
+        & 8.835711e-01_rb,8.845073e-01_rb,8.853103e-01_rb,8.860068e-01_rb,8.866170e-01_rb,&
+        & 8.871560e-01_rb,8.876358e-01_rb,8.880658e-01_rb,8.884533e-01_rb,8.888044e-01_rb,&
+        & 8.891242e-01_rb,8.894166e-01_rb,8.896851e-01_rb,8.899324e-01_rb,8.901612e-01_rb,&
+        & 8.903733e-01_rb,8.905706e-01_rb,8.907545e-01_rb,8.909265e-01_rb,8.910876e-01_rb,&
+        & 8.912388e-01_rb,8.913812e-01_rb,8.915153e-01_rb,8.916419e-01_rb,8.917617e-01_rb,&
+        & 8.918752e-01_rb,8.919829e-01_rb,8.920851e-01_rb,8.921824e-01_rb,8.922751e-01_rb,&
+        & 8.923635e-01_rb,8.924478e-01_rb,8.925284e-01_rb /)
+      asyice2(:, 23) = (/ &
+! band 23
+        & 8.387642e-01_rb,8.569979e-01_rb,8.658630e-01_rb,8.711825e-01_rb,8.747605e-01_rb,&
+        & 8.773472e-01_rb,8.793129e-01_rb,8.808621e-01_rb,8.821179e-01_rb,8.831583e-01_rb,&
+        & 8.840361e-01_rb,8.847875e-01_rb,8.854388e-01_rb,8.860094e-01_rb,8.865138e-01_rb,&
+        & 8.869634e-01_rb,8.873668e-01_rb,8.877310e-01_rb,8.880617e-01_rb,8.883635e-01_rb,&
+        & 8.886401e-01_rb,8.888947e-01_rb,8.891298e-01_rb,8.893477e-01_rb,8.895504e-01_rb,&
+        & 8.897393e-01_rb,8.899159e-01_rb,8.900815e-01_rb,8.902370e-01_rb,8.903833e-01_rb,&
+        & 8.905214e-01_rb,8.906518e-01_rb,8.907753e-01_rb,8.908924e-01_rb,8.910036e-01_rb,&
+        & 8.911094e-01_rb,8.912101e-01_rb,8.913062e-01_rb,8.913979e-01_rb,8.914856e-01_rb,&
+        & 8.915695e-01_rb,8.916498e-01_rb,8.917269e-01_rb /)
+      asyice2(:, 24) = (/ &
+! band 24
+        & 8.522208e-01_rb,8.648132e-01_rb,8.711224e-01_rb,8.749901e-01_rb,8.776354e-01_rb,&
+        & 8.795743e-01_rb,8.810649e-01_rb,8.822518e-01_rb,8.832225e-01_rb,8.840333e-01_rb,&
+        & 8.847224e-01_rb,8.853162e-01_rb,8.858342e-01_rb,8.862906e-01_rb,8.866962e-01_rb,&
+        & 8.870595e-01_rb,8.873871e-01_rb,8.876842e-01_rb,8.879551e-01_rb,8.882032e-01_rb,&
+        & 8.884316e-01_rb,8.886425e-01_rb,8.888380e-01_rb,8.890199e-01_rb,8.891895e-01_rb,&
+        & 8.893481e-01_rb,8.894968e-01_rb,8.896366e-01_rb,8.897683e-01_rb,8.898926e-01_rb,&
+        & 8.900102e-01_rb,8.901215e-01_rb,8.902272e-01_rb,8.903276e-01_rb,8.904232e-01_rb,&
+        & 8.905144e-01_rb,8.906014e-01_rb,8.906845e-01_rb,8.907640e-01_rb,8.908402e-01_rb,&
+        & 8.909132e-01_rb,8.909834e-01_rb,8.910507e-01_rb /)
+      asyice2(:, 25) = (/ &
+! band 25
+        & 8.578202e-01_rb,8.683033e-01_rb,8.735431e-01_rb,8.767488e-01_rb,8.789378e-01_rb,&
+        & 8.805399e-01_rb,8.817701e-01_rb,8.827485e-01_rb,8.835480e-01_rb,8.842152e-01_rb,&
+        & 8.847817e-01_rb,8.852696e-01_rb,8.856949e-01_rb,8.860694e-01_rb,8.864020e-01_rb,&
+        & 8.866997e-01_rb,8.869681e-01_rb,8.872113e-01_rb,8.874330e-01_rb,8.876360e-01_rb,&
+        & 8.878227e-01_rb,8.879951e-01_rb,8.881548e-01_rb,8.883033e-01_rb,8.884418e-01_rb,&
+        & 8.885712e-01_rb,8.886926e-01_rb,8.888066e-01_rb,8.889139e-01_rb,8.890152e-01_rb,&
+        & 8.891110e-01_rb,8.892017e-01_rb,8.892877e-01_rb,8.893695e-01_rb,8.894473e-01_rb,&
+        & 8.895214e-01_rb,8.895921e-01_rb,8.896597e-01_rb,8.897243e-01_rb,8.897862e-01_rb,&
+        & 8.898456e-01_rb,8.899025e-01_rb,8.899572e-01_rb /)
+      asyice2(:, 26) = (/ &
+! band 26
+        & 8.625615e-01_rb,8.713831e-01_rb,8.755799e-01_rb,8.780560e-01_rb,8.796983e-01_rb,&
+        & 8.808714e-01_rb,8.817534e-01_rb,8.824420e-01_rb,8.829953e-01_rb,8.834501e-01_rb,&
+        & 8.838310e-01_rb,8.841549e-01_rb,8.844338e-01_rb,8.846767e-01_rb,8.848902e-01_rb,&
+        & 8.850795e-01_rb,8.852484e-01_rb,8.854002e-01_rb,8.855374e-01_rb,8.856620e-01_rb,&
+        & 8.857758e-01_rb,8.858800e-01_rb,8.859759e-01_rb,8.860644e-01_rb,8.861464e-01_rb,&
+        & 8.862225e-01_rb,8.862935e-01_rb,8.863598e-01_rb,8.864218e-01_rb,8.864800e-01_rb,&
+        & 8.865347e-01_rb,8.865863e-01_rb,8.866349e-01_rb,8.866809e-01_rb,8.867245e-01_rb,&
+        & 8.867658e-01_rb,8.868050e-01_rb,8.868423e-01_rb,8.868778e-01_rb,8.869117e-01_rb,&
+        & 8.869440e-01_rb,8.869749e-01_rb,8.870044e-01_rb /)
+      asyice2(:, 27) = (/ &
+! band 27
+        & 8.587495e-01_rb,8.684764e-01_rb,8.728189e-01_rb,8.752872e-01_rb,8.768846e-01_rb,&
+        & 8.780060e-01_rb,8.788386e-01_rb,8.794824e-01_rb,8.799960e-01_rb,8.804159e-01_rb,&
+        & 8.807660e-01_rb,8.810626e-01_rb,8.813175e-01_rb,8.815390e-01_rb,8.817335e-01_rb,&
+        & 8.819057e-01_rb,8.820593e-01_rb,8.821973e-01_rb,8.823220e-01_rb,8.824353e-01_rb,&
+        & 8.825387e-01_rb,8.826336e-01_rb,8.827209e-01_rb,8.828016e-01_rb,8.828764e-01_rb,&
+        & 8.829459e-01_rb,8.830108e-01_rb,8.830715e-01_rb,8.831283e-01_rb,8.831817e-01_rb,&
+        & 8.832320e-01_rb,8.832795e-01_rb,8.833244e-01_rb,8.833668e-01_rb,8.834071e-01_rb,&
+        & 8.834454e-01_rb,8.834817e-01_rb,8.835164e-01_rb,8.835495e-01_rb,8.835811e-01_rb,&
+        & 8.836113e-01_rb,8.836402e-01_rb,8.836679e-01_rb /)
+      asyice2(:, 28) = (/ &
+! band 28
+        & 8.561110e-01_rb,8.678583e-01_rb,8.727554e-01_rb,8.753892e-01_rb,8.770154e-01_rb,&
+        & 8.781109e-01_rb,8.788949e-01_rb,8.794812e-01_rb,8.799348e-01_rb,8.802952e-01_rb,&
+        & 8.805880e-01_rb,8.808300e-01_rb,8.810331e-01_rb,8.812058e-01_rb,8.813543e-01_rb,&
+        & 8.814832e-01_rb,8.815960e-01_rb,8.816956e-01_rb,8.817839e-01_rb,8.818629e-01_rb,&
+        & 8.819339e-01_rb,8.819979e-01_rb,8.820560e-01_rb,8.821089e-01_rb,8.821573e-01_rb,&
+        & 8.822016e-01_rb,8.822425e-01_rb,8.822801e-01_rb,8.823150e-01_rb,8.823474e-01_rb,&
+        & 8.823775e-01_rb,8.824056e-01_rb,8.824318e-01_rb,8.824564e-01_rb,8.824795e-01_rb,&
+        & 8.825011e-01_rb,8.825215e-01_rb,8.825408e-01_rb,8.825589e-01_rb,8.825761e-01_rb,&
+        & 8.825924e-01_rb,8.826078e-01_rb,8.826224e-01_rb /)
+      asyice2(:, 29) = (/ &
+! band 29
+        & 8.311124e-01_rb,8.688197e-01_rb,8.900274e-01_rb,9.040696e-01_rb,9.142334e-01_rb,&
+        & 9.220181e-01_rb,9.282195e-01_rb,9.333048e-01_rb,9.375689e-01_rb,9.412085e-01_rb,&
+        & 9.443604e-01_rb,9.471230e-01_rb,9.495694e-01_rb,9.517549e-01_rb,9.537224e-01_rb,&
+        & 9.555057e-01_rb,9.571316e-01_rb,9.586222e-01_rb,9.599952e-01_rb,9.612656e-01_rb,&
+        & 9.624458e-01_rb,9.635461e-01_rb,9.645756e-01_rb,9.655418e-01_rb,9.664513e-01_rb,&
+        & 9.673098e-01_rb,9.681222e-01_rb,9.688928e-01_rb,9.696256e-01_rb,9.703237e-01_rb,&
+        & 9.709903e-01_rb,9.716280e-01_rb,9.722391e-01_rb,9.728258e-01_rb,9.733901e-01_rb,&
+        & 9.739336e-01_rb,9.744579e-01_rb,9.749645e-01_rb,9.754546e-01_rb,9.759294e-01_rb,&
+        & 9.763901e-01_rb,9.768376e-01_rb,9.772727e-01_rb /)
+
+! Hexagonal Ice Particle Parameterization
+! extinction units (ext coef/iwc): [(m^-1)/(g m^-3)]
+      extice3(:, 16) = (/ &
+! band 16
+        & 5.194013e-01_rb,3.215089e-01_rb,2.327917e-01_rb,1.824424e-01_rb,1.499977e-01_rb,&
+        & 1.273492e-01_rb,1.106421e-01_rb,9.780982e-02_rb,8.764435e-02_rb,7.939266e-02_rb,&
+        & 7.256081e-02_rb,6.681137e-02_rb,6.190600e-02_rb,5.767154e-02_rb,5.397915e-02_rb,&
+        & 5.073102e-02_rb,4.785151e-02_rb,4.528125e-02_rb,4.297296e-02_rb,4.088853e-02_rb,&
+        & 3.899690e-02_rb,3.727251e-02_rb,3.569411e-02_rb,3.424393e-02_rb,3.290694e-02_rb,&
+        & 3.167040e-02_rb,3.052340e-02_rb,2.945654e-02_rb,2.846172e-02_rb,2.753188e-02_rb,&
+        & 2.666085e-02_rb,2.584322e-02_rb,2.507423e-02_rb,2.434967e-02_rb,2.366579e-02_rb,&
+        & 2.301926e-02_rb,2.240711e-02_rb,2.182666e-02_rb,2.127551e-02_rb,2.075150e-02_rb,&
+        & 2.025267e-02_rb,1.977725e-02_rb,1.932364e-02_rb,1.889035e-02_rb,1.847607e-02_rb,&
+        & 1.807956e-02_rb /)
+      extice3(:, 17) = (/ &
+! band 17
+        & 4.901155e-01_rb,3.065286e-01_rb,2.230800e-01_rb,1.753951e-01_rb,1.445402e-01_rb,&
+        & 1.229417e-01_rb,1.069777e-01_rb,9.469760e-02_rb,8.495824e-02_rb,7.704501e-02_rb,&
+        & 7.048834e-02_rb,6.496693e-02_rb,6.025353e-02_rb,5.618286e-02_rb,5.263186e-02_rb,&
+        & 4.950698e-02_rb,4.673585e-02_rb,4.426164e-02_rb,4.203904e-02_rb,4.003153e-02_rb,&
+        & 3.820932e-02_rb,3.654790e-02_rb,3.502688e-02_rb,3.362919e-02_rb,3.234041e-02_rb,&
+        & 3.114829e-02_rb,3.004234e-02_rb,2.901356e-02_rb,2.805413e-02_rb,2.715727e-02_rb,&
+        & 2.631705e-02_rb,2.552828e-02_rb,2.478637e-02_rb,2.408725e-02_rb,2.342734e-02_rb,&
+        & 2.280343e-02_rb,2.221264e-02_rb,2.165242e-02_rb,2.112043e-02_rb,2.061461e-02_rb,&
+        & 2.013308e-02_rb,1.967411e-02_rb,1.923616e-02_rb,1.881783e-02_rb,1.841781e-02_rb,&
+        & 1.803494e-02_rb /)
+      extice3(:, 18) = (/ &
+! band 18
+        & 5.056264e-01_rb,3.160261e-01_rb,2.298442e-01_rb,1.805973e-01_rb,1.487318e-01_rb,&
+        & 1.264258e-01_rb,1.099389e-01_rb,9.725656e-02_rb,8.719819e-02_rb,7.902576e-02_rb,&
+        & 7.225433e-02_rb,6.655206e-02_rb,6.168427e-02_rb,5.748028e-02_rb,5.381296e-02_rb,&
+        & 5.058572e-02_rb,4.772383e-02_rb,4.516857e-02_rb,4.287317e-02_rb,4.079990e-02_rb,&
+        & 3.891801e-02_rb,3.720217e-02_rb,3.563133e-02_rb,3.418786e-02_rb,3.285686e-02_rb,&
+        & 3.162569e-02_rb,3.048352e-02_rb,2.942104e-02_rb,2.843018e-02_rb,2.750395e-02_rb,&
+        & 2.663621e-02_rb,2.582160e-02_rb,2.505539e-02_rb,2.433337e-02_rb,2.365185e-02_rb,&
+        & 2.300750e-02_rb,2.239736e-02_rb,2.181878e-02_rb,2.126937e-02_rb,2.074699e-02_rb,&
+        & 2.024968e-02_rb,1.977567e-02_rb,1.932338e-02_rb,1.889134e-02_rb,1.847823e-02_rb,&
+        & 1.808281e-02_rb /)
+      extice3(:, 19) = (/ &
+! band 19
+        & 4.881605e-01_rb,3.055237e-01_rb,2.225070e-01_rb,1.750688e-01_rb,1.443736e-01_rb,&
+        & 1.228869e-01_rb,1.070054e-01_rb,9.478893e-02_rb,8.509997e-02_rb,7.722769e-02_rb,&
+        & 7.070495e-02_rb,6.521211e-02_rb,6.052311e-02_rb,5.647351e-02_rb,5.294088e-02_rb,&
+        & 4.983217e-02_rb,4.707539e-02_rb,4.461398e-02_rb,4.240288e-02_rb,4.040575e-02_rb,&
+        & 3.859298e-02_rb,3.694016e-02_rb,3.542701e-02_rb,3.403655e-02_rb,3.275444e-02_rb,&
+        & 3.156849e-02_rb,3.046827e-02_rb,2.944481e-02_rb,2.849034e-02_rb,2.759812e-02_rb,&
+        & 2.676226e-02_rb,2.597757e-02_rb,2.523949e-02_rb,2.454400e-02_rb,2.388750e-02_rb,&
+        & 2.326682e-02_rb,2.267909e-02_rb,2.212176e-02_rb,2.159253e-02_rb,2.108933e-02_rb,&
+        & 2.061028e-02_rb,2.015369e-02_rb,1.971801e-02_rb,1.930184e-02_rb,1.890389e-02_rb,&
+        & 1.852300e-02_rb /)
+      extice3(:, 20) = (/ &
+! band 20
+        & 5.103703e-01_rb,3.188144e-01_rb,2.317435e-01_rb,1.819887e-01_rb,1.497944e-01_rb,&
+        & 1.272584e-01_rb,1.106013e-01_rb,9.778822e-02_rb,8.762610e-02_rb,7.936938e-02_rb,&
+        & 7.252809e-02_rb,6.676701e-02_rb,6.184901e-02_rb,5.760165e-02_rb,5.389651e-02_rb,&
+        & 5.063598e-02_rb,4.774457e-02_rb,4.516295e-02_rb,4.284387e-02_rb,4.074922e-02_rb,&
+        & 3.884792e-02_rb,3.711438e-02_rb,3.552734e-02_rb,3.406898e-02_rb,3.272425e-02_rb,&
+        & 3.148038e-02_rb,3.032643e-02_rb,2.925299e-02_rb,2.825191e-02_rb,2.731612e-02_rb,&
+        & 2.643943e-02_rb,2.561642e-02_rb,2.484230e-02_rb,2.411284e-02_rb,2.342429e-02_rb,&
+        & 2.277329e-02_rb,2.215686e-02_rb,2.157231e-02_rb,2.101724e-02_rb,2.048946e-02_rb,&
+        & 1.998702e-02_rb,1.950813e-02_rb,1.905118e-02_rb,1.861468e-02_rb,1.819730e-02_rb,&
+        & 1.779781e-02_rb /)
+      extice3(:, 21) = (/ &
+! band 21
+        & 5.031161e-01_rb,3.144511e-01_rb,2.286942e-01_rb,1.796903e-01_rb,1.479819e-01_rb,&
+        & 1.257860e-01_rb,1.093803e-01_rb,9.676059e-02_rb,8.675183e-02_rb,7.861971e-02_rb,&
+        & 7.188168e-02_rb,6.620754e-02_rb,6.136376e-02_rb,5.718050e-02_rb,5.353127e-02_rb,&
+        & 5.031995e-02_rb,4.747218e-02_rb,4.492952e-02_rb,4.264544e-02_rb,4.058240e-02_rb,&
+        & 3.870979e-02_rb,3.700242e-02_rb,3.543933e-02_rb,3.400297e-02_rb,3.267854e-02_rb,&
+        & 3.145345e-02_rb,3.031691e-02_rb,2.925967e-02_rb,2.827370e-02_rb,2.735203e-02_rb,&
+        & 2.648858e-02_rb,2.567798e-02_rb,2.491555e-02_rb,2.419710e-02_rb,2.351893e-02_rb,&
+        & 2.287776e-02_rb,2.227063e-02_rb,2.169491e-02_rb,2.114821e-02_rb,2.062840e-02_rb,&
+        & 2.013354e-02_rb,1.966188e-02_rb,1.921182e-02_rb,1.878191e-02_rb,1.837083e-02_rb,&
+        & 1.797737e-02_rb /)
+      extice3(:, 22) = (/ &
+! band 22
+        & 4.949453e-01_rb,3.095918e-01_rb,2.253402e-01_rb,1.771964e-01_rb,1.460446e-01_rb,&
+        & 1.242383e-01_rb,1.081206e-01_rb,9.572235e-02_rb,8.588928e-02_rb,7.789990e-02_rb,&
+        & 7.128013e-02_rb,6.570559e-02_rb,6.094684e-02_rb,5.683701e-02_rb,5.325183e-02_rb,&
+        & 5.009688e-02_rb,4.729909e-02_rb,4.480106e-02_rb,4.255708e-02_rb,4.053025e-02_rb,&
+        & 3.869051e-02_rb,3.701310e-02_rb,3.547745e-02_rb,3.406631e-02_rb,3.276512e-02_rb,&
+        & 3.156153e-02_rb,3.044494e-02_rb,2.940626e-02_rb,2.843759e-02_rb,2.753211e-02_rb,&
+        & 2.668381e-02_rb,2.588744e-02_rb,2.513839e-02_rb,2.443255e-02_rb,2.376629e-02_rb,&
+        & 2.313637e-02_rb,2.253990e-02_rb,2.197428e-02_rb,2.143718e-02_rb,2.092649e-02_rb,&
+        & 2.044032e-02_rb,1.997694e-02_rb,1.953478e-02_rb,1.911241e-02_rb,1.870855e-02_rb,&
+        & 1.832199e-02_rb /)
+      extice3(:, 23) = (/ &
+! band 23
+        & 5.052816e-01_rb,3.157665e-01_rb,2.296233e-01_rb,1.803986e-01_rb,1.485473e-01_rb,&
+        & 1.262514e-01_rb,1.097718e-01_rb,9.709524e-02_rb,8.704139e-02_rb,7.887264e-02_rb,&
+        & 7.210424e-02_rb,6.640454e-02_rb,6.153894e-02_rb,5.733683e-02_rb,5.367116e-02_rb,&
+        & 5.044537e-02_rb,4.758477e-02_rb,4.503066e-02_rb,4.273629e-02_rb,4.066395e-02_rb,&
+        & 3.878291e-02_rb,3.706784e-02_rb,3.549771e-02_rb,3.405488e-02_rb,3.272448e-02_rb,&
+        & 3.149387e-02_rb,3.035221e-02_rb,2.929020e-02_rb,2.829979e-02_rb,2.737397e-02_rb,&
+        & 2.650663e-02_rb,2.569238e-02_rb,2.492651e-02_rb,2.420482e-02_rb,2.352361e-02_rb,&
+        & 2.287954e-02_rb,2.226968e-02_rb,2.169136e-02_rb,2.114220e-02_rb,2.062005e-02_rb,&
+        & 2.012296e-02_rb,1.964917e-02_rb,1.919709e-02_rb,1.876524e-02_rb,1.835231e-02_rb,&
+        & 1.795707e-02_rb /)
+      extice3(:, 24) = (/ &
+! band 24
+        & 5.042067e-01_rb,3.151195e-01_rb,2.291708e-01_rb,1.800573e-01_rb,1.482779e-01_rb,&
+        & 1.260324e-01_rb,1.095900e-01_rb,9.694202e-02_rb,8.691087e-02_rb,7.876056e-02_rb,&
+        & 7.200745e-02_rb,6.632062e-02_rb,6.146600e-02_rb,5.727338e-02_rb,5.361599e-02_rb,&
+        & 5.039749e-02_rb,4.754334e-02_rb,4.499500e-02_rb,4.270580e-02_rb,4.063815e-02_rb,&
+        & 3.876135e-02_rb,3.705016e-02_rb,3.548357e-02_rb,3.404400e-02_rb,3.271661e-02_rb,&
+        & 3.148877e-02_rb,3.034969e-02_rb,2.929008e-02_rb,2.830191e-02_rb,2.737818e-02_rb,&
+        & 2.651279e-02_rb,2.570039e-02_rb,2.493624e-02_rb,2.421618e-02_rb,2.353650e-02_rb,&
+        & 2.289390e-02_rb,2.228541e-02_rb,2.170840e-02_rb,2.116048e-02_rb,2.063950e-02_rb,&
+        & 2.014354e-02_rb,1.967082e-02_rb,1.921975e-02_rb,1.878888e-02_rb,1.837688e-02_rb,&
+        & 1.798254e-02_rb /)
+      extice3(:, 25) = (/ &
+! band 25
+        & 5.022507e-01_rb,3.139246e-01_rb,2.283218e-01_rb,1.794059e-01_rb,1.477544e-01_rb,&
+        & 1.255984e-01_rb,1.092222e-01_rb,9.662516e-02_rb,8.663439e-02_rb,7.851688e-02_rb,&
+        & 7.179095e-02_rb,6.612700e-02_rb,6.129193e-02_rb,5.711618e-02_rb,5.347351e-02_rb,&
+        & 5.026796e-02_rb,4.742530e-02_rb,4.488721e-02_rb,4.260724e-02_rb,4.054790e-02_rb,&
+        & 3.867866e-02_rb,3.697435e-02_rb,3.541407e-02_rb,3.398029e-02_rb,3.265824e-02_rb,&
+        & 3.143535e-02_rb,3.030085e-02_rb,2.924551e-02_rb,2.826131e-02_rb,2.734130e-02_rb,&
+        & 2.647939e-02_rb,2.567026e-02_rb,2.490919e-02_rb,2.419203e-02_rb,2.351509e-02_rb,&
+        & 2.287507e-02_rb,2.226903e-02_rb,2.169434e-02_rb,2.114862e-02_rb,2.062975e-02_rb,&
+        & 2.013578e-02_rb,1.966496e-02_rb,1.921571e-02_rb,1.878658e-02_rb,1.837623e-02_rb,&
+        & 1.798348e-02_rb /)
+      extice3(:, 26) = (/ &
+! band 26
+        & 5.068316e-01_rb,3.166869e-01_rb,2.302576e-01_rb,1.808693e-01_rb,1.489122e-01_rb,&
+        & 1.265423e-01_rb,1.100080e-01_rb,9.728926e-02_rb,8.720201e-02_rb,7.900612e-02_rb,&
+        & 7.221524e-02_rb,6.649660e-02_rb,6.161484e-02_rb,5.739877e-02_rb,5.372093e-02_rb,&
+        & 5.048442e-02_rb,4.761431e-02_rb,4.505172e-02_rb,4.274972e-02_rb,4.067050e-02_rb,&
+        & 3.878321e-02_rb,3.706244e-02_rb,3.548710e-02_rb,3.403948e-02_rb,3.270466e-02_rb,&
+        & 3.146995e-02_rb,3.032450e-02_rb,2.925897e-02_rb,2.826527e-02_rb,2.733638e-02_rb,&
+        & 2.646615e-02_rb,2.564920e-02_rb,2.488078e-02_rb,2.415670e-02_rb,2.347322e-02_rb,&
+        & 2.282702e-02_rb,2.221513e-02_rb,2.163489e-02_rb,2.108390e-02_rb,2.056002e-02_rb,&
+        & 2.006128e-02_rb,1.958591e-02_rb,1.913232e-02_rb,1.869904e-02_rb,1.828474e-02_rb,&
+        & 1.788819e-02_rb /)
+      extice3(:, 27) = (/ &
+! band 27
+        & 5.077707e-01_rb,3.172636e-01_rb,2.306695e-01_rb,1.811871e-01_rb,1.491691e-01_rb,&
+        & 1.267565e-01_rb,1.101907e-01_rb,9.744773e-02_rb,8.734125e-02_rb,7.912973e-02_rb,&
+        & 7.232591e-02_rb,6.659637e-02_rb,6.170530e-02_rb,5.748120e-02_rb,5.379634e-02_rb,&
+        & 5.055367e-02_rb,4.767809e-02_rb,4.511061e-02_rb,4.280423e-02_rb,4.072104e-02_rb,&
+        & 3.883015e-02_rb,3.710611e-02_rb,3.552776e-02_rb,3.407738e-02_rb,3.274002e-02_rb,&
+        & 3.150296e-02_rb,3.035532e-02_rb,2.928776e-02_rb,2.829216e-02_rb,2.736150e-02_rb,&
+        & 2.648961e-02_rb,2.567111e-02_rb,2.490123e-02_rb,2.417576e-02_rb,2.349098e-02_rb,&
+        & 2.284354e-02_rb,2.223049e-02_rb,2.164914e-02_rb,2.109711e-02_rb,2.057222e-02_rb,&
+        & 2.007253e-02_rb,1.959626e-02_rb,1.914181e-02_rb,1.870770e-02_rb,1.829261e-02_rb,&
+        & 1.789531e-02_rb /)
+      extice3(:, 28) = (/ &
+! band 28
+        & 5.062281e-01_rb,3.163402e-01_rb,2.300275e-01_rb,1.807060e-01_rb,1.487921e-01_rb,&
+        & 1.264523e-01_rb,1.099403e-01_rb,9.723879e-02_rb,8.716516e-02_rb,7.898034e-02_rb,&
+        & 7.219863e-02_rb,6.648771e-02_rb,6.161254e-02_rb,5.740217e-02_rb,5.372929e-02_rb,&
+        & 5.049716e-02_rb,4.763092e-02_rb,4.507179e-02_rb,4.277290e-02_rb,4.069649e-02_rb,&
+        & 3.881175e-02_rb,3.709331e-02_rb,3.552008e-02_rb,3.407442e-02_rb,3.274141e-02_rb,&
+        & 3.150837e-02_rb,3.036447e-02_rb,2.930037e-02_rb,2.830801e-02_rb,2.738037e-02_rb,&
+        & 2.651132e-02_rb,2.569547e-02_rb,2.492810e-02_rb,2.420499e-02_rb,2.352243e-02_rb,&
+        & 2.287710e-02_rb,2.226604e-02_rb,2.168658e-02_rb,2.113634e-02_rb,2.061316e-02_rb,&
+        & 2.011510e-02_rb,1.964038e-02_rb,1.918740e-02_rb,1.875471e-02_rb,1.834096e-02_rb,&
+        & 1.794495e-02_rb /)
+      extice3(:, 29) = (/ &
+! band 29
+        & 1.338834e-01_rb,1.924912e-01_rb,1.755523e-01_rb,1.534793e-01_rb,1.343937e-01_rb,&
+        & 1.187883e-01_rb,1.060654e-01_rb,9.559106e-02_rb,8.685880e-02_rb,7.948698e-02_rb,&
+        & 7.319086e-02_rb,6.775669e-02_rb,6.302215e-02_rb,5.886236e-02_rb,5.517996e-02_rb,&
+        & 5.189810e-02_rb,4.895539e-02_rb,4.630225e-02_rb,4.389823e-02_rb,4.171002e-02_rb,&
+        & 3.970998e-02_rb,3.787493e-02_rb,3.618537e-02_rb,3.462471e-02_rb,3.317880e-02_rb,&
+        & 3.183547e-02_rb,3.058421e-02_rb,2.941590e-02_rb,2.832256e-02_rb,2.729724e-02_rb,&
+        & 2.633377e-02_rb,2.542675e-02_rb,2.457136e-02_rb,2.376332e-02_rb,2.299882e-02_rb,&
+        & 2.227443e-02_rb,2.158707e-02_rb,2.093400e-02_rb,2.031270e-02_rb,1.972091e-02_rb,&
+        & 1.915659e-02_rb,1.861787e-02_rb,1.810304e-02_rb,1.761055e-02_rb,1.713899e-02_rb,&
+        & 1.668704e-02_rb /)
+
+! single-scattering albedo: unitless
+      ssaice3(:, 16) = (/ &
+! band 16
+        & 6.749442e-01_rb,6.649947e-01_rb,6.565828e-01_rb,6.489928e-01_rb,6.420046e-01_rb,&
+        & 6.355231e-01_rb,6.294964e-01_rb,6.238901e-01_rb,6.186783e-01_rb,6.138395e-01_rb,&
+        & 6.093543e-01_rb,6.052049e-01_rb,6.013742e-01_rb,5.978457e-01_rb,5.946030e-01_rb,&
+        & 5.916302e-01_rb,5.889115e-01_rb,5.864310e-01_rb,5.841731e-01_rb,5.821221e-01_rb,&
+        & 5.802624e-01_rb,5.785785e-01_rb,5.770549e-01_rb,5.756759e-01_rb,5.744262e-01_rb,&
+        & 5.732901e-01_rb,5.722524e-01_rb,5.712974e-01_rb,5.704097e-01_rb,5.695739e-01_rb,&
+        & 5.687747e-01_rb,5.679964e-01_rb,5.672238e-01_rb,5.664415e-01_rb,5.656340e-01_rb,&
+        & 5.647860e-01_rb,5.638821e-01_rb,5.629070e-01_rb,5.618452e-01_rb,5.606815e-01_rb,&
+        & 5.594006e-01_rb,5.579870e-01_rb,5.564255e-01_rb,5.547008e-01_rb,5.527976e-01_rb,&
+        & 5.507005e-01_rb /)
+      ssaice3(:, 17) = (/ &
+! band 17
+        & 7.628550e-01_rb,7.567297e-01_rb,7.508463e-01_rb,7.451972e-01_rb,7.397745e-01_rb,&
+        & 7.345705e-01_rb,7.295775e-01_rb,7.247881e-01_rb,7.201945e-01_rb,7.157894e-01_rb,&
+        & 7.115652e-01_rb,7.075145e-01_rb,7.036300e-01_rb,6.999044e-01_rb,6.963304e-01_rb,&
+        & 6.929007e-01_rb,6.896083e-01_rb,6.864460e-01_rb,6.834067e-01_rb,6.804833e-01_rb,&
+        & 6.776690e-01_rb,6.749567e-01_rb,6.723397e-01_rb,6.698109e-01_rb,6.673637e-01_rb,&
+        & 6.649913e-01_rb,6.626870e-01_rb,6.604441e-01_rb,6.582561e-01_rb,6.561163e-01_rb,&
+        & 6.540182e-01_rb,6.519554e-01_rb,6.499215e-01_rb,6.479099e-01_rb,6.459145e-01_rb,&
+        & 6.439289e-01_rb,6.419468e-01_rb,6.399621e-01_rb,6.379686e-01_rb,6.359601e-01_rb,&
+        & 6.339306e-01_rb,6.318740e-01_rb,6.297845e-01_rb,6.276559e-01_rb,6.254825e-01_rb,&
+        & 6.232583e-01_rb /)
+      ssaice3(:, 18) = (/ &
+! band 18
+        & 9.924147e-01_rb,9.882792e-01_rb,9.842257e-01_rb,9.802522e-01_rb,9.763566e-01_rb,&
+        & 9.725367e-01_rb,9.687905e-01_rb,9.651157e-01_rb,9.615104e-01_rb,9.579725e-01_rb,&
+        & 9.544997e-01_rb,9.510901e-01_rb,9.477416e-01_rb,9.444520e-01_rb,9.412194e-01_rb,&
+        & 9.380415e-01_rb,9.349165e-01_rb,9.318421e-01_rb,9.288164e-01_rb,9.258373e-01_rb,&
+        & 9.229027e-01_rb,9.200106e-01_rb,9.171589e-01_rb,9.143457e-01_rb,9.115688e-01_rb,&
+        & 9.088263e-01_rb,9.061161e-01_rb,9.034362e-01_rb,9.007846e-01_rb,8.981592e-01_rb,&
+        & 8.955581e-01_rb,8.929792e-01_rb,8.904206e-01_rb,8.878803e-01_rb,8.853562e-01_rb,&
+        & 8.828464e-01_rb,8.803488e-01_rb,8.778616e-01_rb,8.753827e-01_rb,8.729102e-01_rb,&
+        & 8.704421e-01_rb,8.679764e-01_rb,8.655112e-01_rb,8.630445e-01_rb,8.605744e-01_rb,&
+        & 8.580989e-01_rb /)
+      ssaice3(:, 19) = (/ &
+! band 19
+        & 9.629413e-01_rb,9.517182e-01_rb,9.409209e-01_rb,9.305366e-01_rb,9.205529e-01_rb,&
+        & 9.109569e-01_rb,9.017362e-01_rb,8.928780e-01_rb,8.843699e-01_rb,8.761992e-01_rb,&
+        & 8.683536e-01_rb,8.608204e-01_rb,8.535873e-01_rb,8.466417e-01_rb,8.399712e-01_rb,&
+        & 8.335635e-01_rb,8.274062e-01_rb,8.214868e-01_rb,8.157932e-01_rb,8.103129e-01_rb,&
+        & 8.050336e-01_rb,7.999432e-01_rb,7.950294e-01_rb,7.902798e-01_rb,7.856825e-01_rb,&
+        & 7.812250e-01_rb,7.768954e-01_rb,7.726815e-01_rb,7.685711e-01_rb,7.645522e-01_rb,&
+        & 7.606126e-01_rb,7.567404e-01_rb,7.529234e-01_rb,7.491498e-01_rb,7.454074e-01_rb,&
+        & 7.416844e-01_rb,7.379688e-01_rb,7.342485e-01_rb,7.305118e-01_rb,7.267468e-01_rb,&
+        & 7.229415e-01_rb,7.190841e-01_rb,7.151628e-01_rb,7.111657e-01_rb,7.070811e-01_rb,&
+        & 7.028972e-01_rb /)
+      ssaice3(:, 20) = (/ &
+! band 20
+        & 9.942270e-01_rb,9.909206e-01_rb,9.876775e-01_rb,9.844960e-01_rb,9.813746e-01_rb,&
+        & 9.783114e-01_rb,9.753049e-01_rb,9.723535e-01_rb,9.694553e-01_rb,9.666088e-01_rb,&
+        & 9.638123e-01_rb,9.610641e-01_rb,9.583626e-01_rb,9.557060e-01_rb,9.530928e-01_rb,&
+        & 9.505211e-01_rb,9.479895e-01_rb,9.454961e-01_rb,9.430393e-01_rb,9.406174e-01_rb,&
+        & 9.382288e-01_rb,9.358717e-01_rb,9.335446e-01_rb,9.312456e-01_rb,9.289731e-01_rb,&
+        & 9.267255e-01_rb,9.245010e-01_rb,9.222980e-01_rb,9.201147e-01_rb,9.179496e-01_rb,&
+        & 9.158008e-01_rb,9.136667e-01_rb,9.115457e-01_rb,9.094359e-01_rb,9.073358e-01_rb,&
+        & 9.052436e-01_rb,9.031577e-01_rb,9.010763e-01_rb,8.989977e-01_rb,8.969203e-01_rb,&
+        & 8.948423e-01_rb,8.927620e-01_rb,8.906778e-01_rb,8.885879e-01_rb,8.864907e-01_rb,&
+        & 8.843843e-01_rb /)
+      ssaice3(:, 21) = (/ &
+! band 21
+        & 9.934014e-01_rb,9.899331e-01_rb,9.865537e-01_rb,9.832610e-01_rb,9.800523e-01_rb,&
+        & 9.769254e-01_rb,9.738777e-01_rb,9.709069e-01_rb,9.680106e-01_rb,9.651862e-01_rb,&
+        & 9.624315e-01_rb,9.597439e-01_rb,9.571212e-01_rb,9.545608e-01_rb,9.520605e-01_rb,&
+        & 9.496177e-01_rb,9.472301e-01_rb,9.448954e-01_rb,9.426111e-01_rb,9.403749e-01_rb,&
+        & 9.381843e-01_rb,9.360370e-01_rb,9.339307e-01_rb,9.318629e-01_rb,9.298313e-01_rb,&
+        & 9.278336e-01_rb,9.258673e-01_rb,9.239302e-01_rb,9.220198e-01_rb,9.201338e-01_rb,&
+        & 9.182700e-01_rb,9.164258e-01_rb,9.145991e-01_rb,9.127874e-01_rb,9.109884e-01_rb,&
+        & 9.091999e-01_rb,9.074194e-01_rb,9.056447e-01_rb,9.038735e-01_rb,9.021033e-01_rb,&
+        & 9.003320e-01_rb,8.985572e-01_rb,8.967766e-01_rb,8.949879e-01_rb,8.931888e-01_rb,&
+        & 8.913770e-01_rb /)
+      ssaice3(:, 22) = (/ &
+! band 22
+        & 9.994833e-01_rb,9.992055e-01_rb,9.989278e-01_rb,9.986500e-01_rb,9.983724e-01_rb,&
+        & 9.980947e-01_rb,9.978172e-01_rb,9.975397e-01_rb,9.972623e-01_rb,9.969849e-01_rb,&
+        & 9.967077e-01_rb,9.964305e-01_rb,9.961535e-01_rb,9.958765e-01_rb,9.955997e-01_rb,&
+        & 9.953230e-01_rb,9.950464e-01_rb,9.947699e-01_rb,9.944936e-01_rb,9.942174e-01_rb,&
+        & 9.939414e-01_rb,9.936656e-01_rb,9.933899e-01_rb,9.931144e-01_rb,9.928390e-01_rb,&
+        & 9.925639e-01_rb,9.922889e-01_rb,9.920141e-01_rb,9.917396e-01_rb,9.914652e-01_rb,&
+        & 9.911911e-01_rb,9.909171e-01_rb,9.906434e-01_rb,9.903700e-01_rb,9.900967e-01_rb,&
+        & 9.898237e-01_rb,9.895510e-01_rb,9.892784e-01_rb,9.890062e-01_rb,9.887342e-01_rb,&
+        & 9.884625e-01_rb,9.881911e-01_rb,9.879199e-01_rb,9.876490e-01_rb,9.873784e-01_rb,&
+        & 9.871081e-01_rb /)
+      ssaice3(:, 23) = (/ &
+! band 23
+        & 9.999343e-01_rb,9.998917e-01_rb,9.998492e-01_rb,9.998067e-01_rb,9.997642e-01_rb,&
+        & 9.997218e-01_rb,9.996795e-01_rb,9.996372e-01_rb,9.995949e-01_rb,9.995528e-01_rb,&
+        & 9.995106e-01_rb,9.994686e-01_rb,9.994265e-01_rb,9.993845e-01_rb,9.993426e-01_rb,&
+        & 9.993007e-01_rb,9.992589e-01_rb,9.992171e-01_rb,9.991754e-01_rb,9.991337e-01_rb,&
+        & 9.990921e-01_rb,9.990505e-01_rb,9.990089e-01_rb,9.989674e-01_rb,9.989260e-01_rb,&
+        & 9.988846e-01_rb,9.988432e-01_rb,9.988019e-01_rb,9.987606e-01_rb,9.987194e-01_rb,&
+        & 9.986782e-01_rb,9.986370e-01_rb,9.985959e-01_rb,9.985549e-01_rb,9.985139e-01_rb,&
+        & 9.984729e-01_rb,9.984319e-01_rb,9.983910e-01_rb,9.983502e-01_rb,9.983094e-01_rb,&
+        & 9.982686e-01_rb,9.982279e-01_rb,9.981872e-01_rb,9.981465e-01_rb,9.981059e-01_rb,&
+        & 9.980653e-01_rb /)
+      ssaice3(:, 24) = (/ &
+! band 24
+        & 9.999978e-01_rb,9.999965e-01_rb,9.999952e-01_rb,9.999939e-01_rb,9.999926e-01_rb,&
+        & 9.999913e-01_rb,9.999900e-01_rb,9.999887e-01_rb,9.999873e-01_rb,9.999860e-01_rb,&
+        & 9.999847e-01_rb,9.999834e-01_rb,9.999821e-01_rb,9.999808e-01_rb,9.999795e-01_rb,&
+        & 9.999782e-01_rb,9.999769e-01_rb,9.999756e-01_rb,9.999743e-01_rb,9.999730e-01_rb,&
+        & 9.999717e-01_rb,9.999704e-01_rb,9.999691e-01_rb,9.999678e-01_rb,9.999665e-01_rb,&
+        & 9.999652e-01_rb,9.999639e-01_rb,9.999626e-01_rb,9.999613e-01_rb,9.999600e-01_rb,&
+        & 9.999587e-01_rb,9.999574e-01_rb,9.999561e-01_rb,9.999548e-01_rb,9.999535e-01_rb,&
+        & 9.999522e-01_rb,9.999509e-01_rb,9.999496e-01_rb,9.999483e-01_rb,9.999470e-01_rb,&
+        & 9.999457e-01_rb,9.999444e-01_rb,9.999431e-01_rb,9.999418e-01_rb,9.999405e-01_rb,&
+        & 9.999392e-01_rb /)
+      ssaice3(:, 25) = (/ &
+! band 25
+        & 9.999994e-01_rb,9.999993e-01_rb,9.999991e-01_rb,9.999990e-01_rb,9.999989e-01_rb,&
+        & 9.999987e-01_rb,9.999986e-01_rb,9.999984e-01_rb,9.999983e-01_rb,9.999982e-01_rb,&
+        & 9.999980e-01_rb,9.999979e-01_rb,9.999977e-01_rb,9.999976e-01_rb,9.999975e-01_rb,&
+        & 9.999973e-01_rb,9.999972e-01_rb,9.999970e-01_rb,9.999969e-01_rb,9.999967e-01_rb,&
+        & 9.999966e-01_rb,9.999965e-01_rb,9.999963e-01_rb,9.999962e-01_rb,9.999960e-01_rb,&
+        & 9.999959e-01_rb,9.999957e-01_rb,9.999956e-01_rb,9.999954e-01_rb,9.999953e-01_rb,&
+        & 9.999952e-01_rb,9.999950e-01_rb,9.999949e-01_rb,9.999947e-01_rb,9.999946e-01_rb,&
+        & 9.999944e-01_rb,9.999943e-01_rb,9.999941e-01_rb,9.999940e-01_rb,9.999939e-01_rb,&
+        & 9.999937e-01_rb,9.999936e-01_rb,9.999934e-01_rb,9.999933e-01_rb,9.999931e-01_rb,&
+        & 9.999930e-01_rb /)
+      ssaice3(:, 26) = (/ &
+! band 26
+        & 9.999997e-01_rb,9.999995e-01_rb,9.999992e-01_rb,9.999990e-01_rb,9.999987e-01_rb,&
+        & 9.999985e-01_rb,9.999983e-01_rb,9.999980e-01_rb,9.999978e-01_rb,9.999976e-01_rb,&
+        & 9.999973e-01_rb,9.999971e-01_rb,9.999969e-01_rb,9.999967e-01_rb,9.999965e-01_rb,&
+        & 9.999963e-01_rb,9.999960e-01_rb,9.999958e-01_rb,9.999956e-01_rb,9.999954e-01_rb,&
+        & 9.999952e-01_rb,9.999950e-01_rb,9.999948e-01_rb,9.999946e-01_rb,9.999944e-01_rb,&
+        & 9.999942e-01_rb,9.999939e-01_rb,9.999937e-01_rb,9.999935e-01_rb,9.999933e-01_rb,&
+        & 9.999931e-01_rb,9.999929e-01_rb,9.999927e-01_rb,9.999925e-01_rb,9.999923e-01_rb,&
+        & 9.999920e-01_rb,9.999918e-01_rb,9.999916e-01_rb,9.999914e-01_rb,9.999911e-01_rb,&
+        & 9.999909e-01_rb,9.999907e-01_rb,9.999905e-01_rb,9.999902e-01_rb,9.999900e-01_rb,&
+        & 9.999897e-01_rb /)
+      ssaice3(:, 27) = (/ &
+! band 27
+        & 9.999991e-01_rb,9.999985e-01_rb,9.999980e-01_rb,9.999974e-01_rb,9.999968e-01_rb,&
+        & 9.999963e-01_rb,9.999957e-01_rb,9.999951e-01_rb,9.999946e-01_rb,9.999940e-01_rb,&
+        & 9.999934e-01_rb,9.999929e-01_rb,9.999923e-01_rb,9.999918e-01_rb,9.999912e-01_rb,&
+        & 9.999907e-01_rb,9.999901e-01_rb,9.999896e-01_rb,9.999891e-01_rb,9.999885e-01_rb,&
+        & 9.999880e-01_rb,9.999874e-01_rb,9.999869e-01_rb,9.999863e-01_rb,9.999858e-01_rb,&
+        & 9.999853e-01_rb,9.999847e-01_rb,9.999842e-01_rb,9.999836e-01_rb,9.999831e-01_rb,&
+        & 9.999826e-01_rb,9.999820e-01_rb,9.999815e-01_rb,9.999809e-01_rb,9.999804e-01_rb,&
+        & 9.999798e-01_rb,9.999793e-01_rb,9.999787e-01_rb,9.999782e-01_rb,9.999776e-01_rb,&
+        & 9.999770e-01_rb,9.999765e-01_rb,9.999759e-01_rb,9.999754e-01_rb,9.999748e-01_rb,&
+        & 9.999742e-01_rb /)
+      ssaice3(:, 28) = (/ &
+! band 28
+        & 9.999975e-01_rb,9.999961e-01_rb,9.999946e-01_rb,9.999931e-01_rb,9.999917e-01_rb,&
+        & 9.999903e-01_rb,9.999888e-01_rb,9.999874e-01_rb,9.999859e-01_rb,9.999845e-01_rb,&
+        & 9.999831e-01_rb,9.999816e-01_rb,9.999802e-01_rb,9.999788e-01_rb,9.999774e-01_rb,&
+        & 9.999759e-01_rb,9.999745e-01_rb,9.999731e-01_rb,9.999717e-01_rb,9.999702e-01_rb,&
+        & 9.999688e-01_rb,9.999674e-01_rb,9.999660e-01_rb,9.999646e-01_rb,9.999631e-01_rb,&
+        & 9.999617e-01_rb,9.999603e-01_rb,9.999589e-01_rb,9.999574e-01_rb,9.999560e-01_rb,&
+        & 9.999546e-01_rb,9.999532e-01_rb,9.999517e-01_rb,9.999503e-01_rb,9.999489e-01_rb,&
+        & 9.999474e-01_rb,9.999460e-01_rb,9.999446e-01_rb,9.999431e-01_rb,9.999417e-01_rb,&
+        & 9.999403e-01_rb,9.999388e-01_rb,9.999374e-01_rb,9.999359e-01_rb,9.999345e-01_rb,&
+        & 9.999330e-01_rb /)
+      ssaice3(:, 29) = (/ &
+! band 29
+        & 4.526500e-01_rb,5.287890e-01_rb,5.410487e-01_rb,5.459865e-01_rb,5.485149e-01_rb,&
+        & 5.498914e-01_rb,5.505895e-01_rb,5.508310e-01_rb,5.507364e-01_rb,5.503793e-01_rb,&
+        & 5.498090e-01_rb,5.490612e-01_rb,5.481637e-01_rb,5.471395e-01_rb,5.460083e-01_rb,&
+        & 5.447878e-01_rb,5.434946e-01_rb,5.421442e-01_rb,5.407514e-01_rb,5.393309e-01_rb,&
+        & 5.378970e-01_rb,5.364641e-01_rb,5.350464e-01_rb,5.336582e-01_rb,5.323140e-01_rb,&
+        & 5.310283e-01_rb,5.298158e-01_rb,5.286914e-01_rb,5.276704e-01_rb,5.267680e-01_rb,&
+        & 5.260000e-01_rb,5.253823e-01_rb,5.249311e-01_rb,5.246629e-01_rb,5.245946e-01_rb,&
+        & 5.247434e-01_rb,5.251268e-01_rb,5.257626e-01_rb,5.266693e-01_rb,5.278653e-01_rb,&
+        & 5.293698e-01_rb,5.312022e-01_rb,5.333823e-01_rb,5.359305e-01_rb,5.388676e-01_rb,&
+        & 5.422146e-01_rb /)
+
+! asymmetry factor: unitless
+      asyice3(:, 16) = (/ &
+! band 16
+        & 8.340752e-01_rb,8.435170e-01_rb,8.517487e-01_rb,8.592064e-01_rb,8.660387e-01_rb,&
+        & 8.723204e-01_rb,8.780997e-01_rb,8.834137e-01_rb,8.882934e-01_rb,8.927662e-01_rb,&
+        & 8.968577e-01_rb,9.005914e-01_rb,9.039899e-01_rb,9.070745e-01_rb,9.098659e-01_rb,&
+        & 9.123836e-01_rb,9.146466e-01_rb,9.166734e-01_rb,9.184817e-01_rb,9.200886e-01_rb,&
+        & 9.215109e-01_rb,9.227648e-01_rb,9.238661e-01_rb,9.248304e-01_rb,9.256727e-01_rb,&
+        & 9.264078e-01_rb,9.270505e-01_rb,9.276150e-01_rb,9.281156e-01_rb,9.285662e-01_rb,&
+        & 9.289806e-01_rb,9.293726e-01_rb,9.297557e-01_rb,9.301435e-01_rb,9.305491e-01_rb,&
+        & 9.309859e-01_rb,9.314671e-01_rb,9.320055e-01_rb,9.326140e-01_rb,9.333053e-01_rb,&
+        & 9.340919e-01_rb,9.349861e-01_rb,9.360000e-01_rb,9.371451e-01_rb,9.384329e-01_rb,&
+        & 9.398744e-01_rb /)
+      asyice3(:, 17) = (/ &
+! band 17
+        & 8.728160e-01_rb,8.777333e-01_rb,8.823754e-01_rb,8.867535e-01_rb,8.908785e-01_rb,&
+        & 8.947611e-01_rb,8.984118e-01_rb,9.018408e-01_rb,9.050582e-01_rb,9.080739e-01_rb,&
+        & 9.108976e-01_rb,9.135388e-01_rb,9.160068e-01_rb,9.183106e-01_rb,9.204595e-01_rb,&
+        & 9.224620e-01_rb,9.243271e-01_rb,9.260632e-01_rb,9.276788e-01_rb,9.291822e-01_rb,&
+        & 9.305817e-01_rb,9.318853e-01_rb,9.331012e-01_rb,9.342372e-01_rb,9.353013e-01_rb,&
+        & 9.363013e-01_rb,9.372450e-01_rb,9.381400e-01_rb,9.389939e-01_rb,9.398145e-01_rb,&
+        & 9.406092e-01_rb,9.413856e-01_rb,9.421511e-01_rb,9.429131e-01_rb,9.436790e-01_rb,&
+        & 9.444561e-01_rb,9.452517e-01_rb,9.460729e-01_rb,9.469270e-01_rb,9.478209e-01_rb,&
+        & 9.487617e-01_rb,9.497562e-01_rb,9.508112e-01_rb,9.519335e-01_rb,9.531294e-01_rb,&
+        & 9.544055e-01_rb /)
+      asyice3(:, 18) = (/ &
+! band 18
+        & 7.897566e-01_rb,7.948704e-01_rb,7.998041e-01_rb,8.045623e-01_rb,8.091495e-01_rb,&
+        & 8.135702e-01_rb,8.178290e-01_rb,8.219305e-01_rb,8.258790e-01_rb,8.296792e-01_rb,&
+        & 8.333355e-01_rb,8.368524e-01_rb,8.402343e-01_rb,8.434856e-01_rb,8.466108e-01_rb,&
+        & 8.496143e-01_rb,8.525004e-01_rb,8.552737e-01_rb,8.579384e-01_rb,8.604990e-01_rb,&
+        & 8.629597e-01_rb,8.653250e-01_rb,8.675992e-01_rb,8.697867e-01_rb,8.718916e-01_rb,&
+        & 8.739185e-01_rb,8.758715e-01_rb,8.777551e-01_rb,8.795734e-01_rb,8.813308e-01_rb,&
+        & 8.830315e-01_rb,8.846799e-01_rb,8.862802e-01_rb,8.878366e-01_rb,8.893534e-01_rb,&
+        & 8.908350e-01_rb,8.922854e-01_rb,8.937090e-01_rb,8.951099e-01_rb,8.964925e-01_rb,&
+        & 8.978609e-01_rb,8.992192e-01_rb,9.005718e-01_rb,9.019229e-01_rb,9.032765e-01_rb,&
+        & 9.046369e-01_rb /)
+      asyice3(:, 19) = (/ &
+! band 19
+        & 7.812615e-01_rb,7.887764e-01_rb,7.959664e-01_rb,8.028413e-01_rb,8.094109e-01_rb,&
+        & 8.156849e-01_rb,8.216730e-01_rb,8.273846e-01_rb,8.328294e-01_rb,8.380166e-01_rb,&
+        & 8.429556e-01_rb,8.476556e-01_rb,8.521258e-01_rb,8.563753e-01_rb,8.604131e-01_rb,&
+        & 8.642481e-01_rb,8.678893e-01_rb,8.713455e-01_rb,8.746254e-01_rb,8.777378e-01_rb,&
+        & 8.806914e-01_rb,8.834948e-01_rb,8.861566e-01_rb,8.886854e-01_rb,8.910897e-01_rb,&
+        & 8.933779e-01_rb,8.955586e-01_rb,8.976402e-01_rb,8.996311e-01_rb,9.015398e-01_rb,&
+        & 9.033745e-01_rb,9.051436e-01_rb,9.068555e-01_rb,9.085185e-01_rb,9.101410e-01_rb,&
+        & 9.117311e-01_rb,9.132972e-01_rb,9.148476e-01_rb,9.163905e-01_rb,9.179340e-01_rb,&
+        & 9.194864e-01_rb,9.210559e-01_rb,9.226505e-01_rb,9.242784e-01_rb,9.259476e-01_rb,&
+        & 9.276661e-01_rb /)
+      asyice3(:, 20) = (/ &
+! band 20
+        & 7.640720e-01_rb,7.691119e-01_rb,7.739941e-01_rb,7.787222e-01_rb,7.832998e-01_rb,&
+        & 7.877304e-01_rb,7.920177e-01_rb,7.961652e-01_rb,8.001765e-01_rb,8.040551e-01_rb,&
+        & 8.078044e-01_rb,8.114280e-01_rb,8.149294e-01_rb,8.183119e-01_rb,8.215791e-01_rb,&
+        & 8.247344e-01_rb,8.277812e-01_rb,8.307229e-01_rb,8.335629e-01_rb,8.363046e-01_rb,&
+        & 8.389514e-01_rb,8.415067e-01_rb,8.439738e-01_rb,8.463560e-01_rb,8.486568e-01_rb,&
+        & 8.508795e-01_rb,8.530274e-01_rb,8.551039e-01_rb,8.571122e-01_rb,8.590558e-01_rb,&
+        & 8.609378e-01_rb,8.627618e-01_rb,8.645309e-01_rb,8.662485e-01_rb,8.679178e-01_rb,&
+        & 8.695423e-01_rb,8.711251e-01_rb,8.726697e-01_rb,8.741792e-01_rb,8.756571e-01_rb,&
+        & 8.771065e-01_rb,8.785307e-01_rb,8.799331e-01_rb,8.813169e-01_rb,8.826854e-01_rb,&
+        & 8.840419e-01_rb /)
+      asyice3(:, 21) = (/ &
+! band 21
+        & 7.602598e-01_rb,7.651572e-01_rb,7.699014e-01_rb,7.744962e-01_rb,7.789452e-01_rb,&
+        & 7.832522e-01_rb,7.874205e-01_rb,7.914538e-01_rb,7.953555e-01_rb,7.991290e-01_rb,&
+        & 8.027777e-01_rb,8.063049e-01_rb,8.097140e-01_rb,8.130081e-01_rb,8.161906e-01_rb,&
+        & 8.192645e-01_rb,8.222331e-01_rb,8.250993e-01_rb,8.278664e-01_rb,8.305374e-01_rb,&
+        & 8.331153e-01_rb,8.356030e-01_rb,8.380037e-01_rb,8.403201e-01_rb,8.425553e-01_rb,&
+        & 8.447121e-01_rb,8.467935e-01_rb,8.488022e-01_rb,8.507412e-01_rb,8.526132e-01_rb,&
+        & 8.544210e-01_rb,8.561675e-01_rb,8.578554e-01_rb,8.594875e-01_rb,8.610665e-01_rb,&
+        & 8.625951e-01_rb,8.640760e-01_rb,8.655119e-01_rb,8.669055e-01_rb,8.682594e-01_rb,&
+        & 8.695763e-01_rb,8.708587e-01_rb,8.721094e-01_rb,8.733308e-01_rb,8.745255e-01_rb,&
+        & 8.756961e-01_rb /)
+      asyice3(:, 22) = (/ &
+! band 22
+        & 7.568957e-01_rb,7.606995e-01_rb,7.644072e-01_rb,7.680204e-01_rb,7.715402e-01_rb,&
+        & 7.749682e-01_rb,7.783057e-01_rb,7.815541e-01_rb,7.847148e-01_rb,7.877892e-01_rb,&
+        & 7.907786e-01_rb,7.936846e-01_rb,7.965084e-01_rb,7.992515e-01_rb,8.019153e-01_rb,&
+        & 8.045011e-01_rb,8.070103e-01_rb,8.094444e-01_rb,8.118048e-01_rb,8.140927e-01_rb,&
+        & 8.163097e-01_rb,8.184571e-01_rb,8.205364e-01_rb,8.225488e-01_rb,8.244958e-01_rb,&
+        & 8.263789e-01_rb,8.281993e-01_rb,8.299586e-01_rb,8.316580e-01_rb,8.332991e-01_rb,&
+        & 8.348831e-01_rb,8.364115e-01_rb,8.378857e-01_rb,8.393071e-01_rb,8.406770e-01_rb,&
+        & 8.419969e-01_rb,8.432682e-01_rb,8.444923e-01_rb,8.456706e-01_rb,8.468044e-01_rb,&
+        & 8.478952e-01_rb,8.489444e-01_rb,8.499533e-01_rb,8.509234e-01_rb,8.518561e-01_rb,&
+        & 8.527528e-01_rb /)
+      asyice3(:, 23) = (/ &
+! band 23
+        & 7.575066e-01_rb,7.606912e-01_rb,7.638236e-01_rb,7.669035e-01_rb,7.699306e-01_rb,&
+        & 7.729046e-01_rb,7.758254e-01_rb,7.786926e-01_rb,7.815060e-01_rb,7.842654e-01_rb,&
+        & 7.869705e-01_rb,7.896211e-01_rb,7.922168e-01_rb,7.947574e-01_rb,7.972428e-01_rb,&
+        & 7.996726e-01_rb,8.020466e-01_rb,8.043646e-01_rb,8.066262e-01_rb,8.088313e-01_rb,&
+        & 8.109796e-01_rb,8.130709e-01_rb,8.151049e-01_rb,8.170814e-01_rb,8.190001e-01_rb,&
+        & 8.208608e-01_rb,8.226632e-01_rb,8.244071e-01_rb,8.260924e-01_rb,8.277186e-01_rb,&
+        & 8.292856e-01_rb,8.307932e-01_rb,8.322411e-01_rb,8.336291e-01_rb,8.349570e-01_rb,&
+        & 8.362244e-01_rb,8.374312e-01_rb,8.385772e-01_rb,8.396621e-01_rb,8.406856e-01_rb,&
+        & 8.416476e-01_rb,8.425479e-01_rb,8.433861e-01_rb,8.441620e-01_rb,8.448755e-01_rb,&
+        & 8.455263e-01_rb /)
+      asyice3(:, 24) = (/ &
+! band 24
+        & 7.568829e-01_rb,7.597947e-01_rb,7.626745e-01_rb,7.655212e-01_rb,7.683337e-01_rb,&
+        & 7.711111e-01_rb,7.738523e-01_rb,7.765565e-01_rb,7.792225e-01_rb,7.818494e-01_rb,&
+        & 7.844362e-01_rb,7.869819e-01_rb,7.894854e-01_rb,7.919459e-01_rb,7.943623e-01_rb,&
+        & 7.967337e-01_rb,7.990590e-01_rb,8.013373e-01_rb,8.035676e-01_rb,8.057488e-01_rb,&
+        & 8.078802e-01_rb,8.099605e-01_rb,8.119890e-01_rb,8.139645e-01_rb,8.158862e-01_rb,&
+        & 8.177530e-01_rb,8.195641e-01_rb,8.213183e-01_rb,8.230149e-01_rb,8.246527e-01_rb,&
+        & 8.262308e-01_rb,8.277483e-01_rb,8.292042e-01_rb,8.305976e-01_rb,8.319275e-01_rb,&
+        & 8.331929e-01_rb,8.343929e-01_rb,8.355265e-01_rb,8.365928e-01_rb,8.375909e-01_rb,&
+        & 8.385197e-01_rb,8.393784e-01_rb,8.401659e-01_rb,8.408815e-01_rb,8.415240e-01_rb,&
+        & 8.420926e-01_rb /)
+      asyice3(:, 25) = (/ &
+! band 25
+        & 7.548616e-01_rb,7.575454e-01_rb,7.602153e-01_rb,7.628696e-01_rb,7.655067e-01_rb,&
+        & 7.681249e-01_rb,7.707225e-01_rb,7.732978e-01_rb,7.758492e-01_rb,7.783750e-01_rb,&
+        & 7.808735e-01_rb,7.833430e-01_rb,7.857819e-01_rb,7.881886e-01_rb,7.905612e-01_rb,&
+        & 7.928983e-01_rb,7.951980e-01_rb,7.974588e-01_rb,7.996789e-01_rb,8.018567e-01_rb,&
+        & 8.039905e-01_rb,8.060787e-01_rb,8.081196e-01_rb,8.101115e-01_rb,8.120527e-01_rb,&
+        & 8.139416e-01_rb,8.157764e-01_rb,8.175557e-01_rb,8.192776e-01_rb,8.209405e-01_rb,&
+        & 8.225427e-01_rb,8.240826e-01_rb,8.255585e-01_rb,8.269688e-01_rb,8.283117e-01_rb,&
+        & 8.295856e-01_rb,8.307889e-01_rb,8.319198e-01_rb,8.329767e-01_rb,8.339579e-01_rb,&
+        & 8.348619e-01_rb,8.356868e-01_rb,8.364311e-01_rb,8.370930e-01_rb,8.376710e-01_rb,&
+        & 8.381633e-01_rb /)
+      asyice3(:, 26) = (/ &
+! band 26
+        & 7.491854e-01_rb,7.518523e-01_rb,7.545089e-01_rb,7.571534e-01_rb,7.597839e-01_rb,&
+        & 7.623987e-01_rb,7.649959e-01_rb,7.675737e-01_rb,7.701303e-01_rb,7.726639e-01_rb,&
+        & 7.751727e-01_rb,7.776548e-01_rb,7.801084e-01_rb,7.825318e-01_rb,7.849230e-01_rb,&
+        & 7.872804e-01_rb,7.896020e-01_rb,7.918862e-01_rb,7.941309e-01_rb,7.963345e-01_rb,&
+        & 7.984951e-01_rb,8.006109e-01_rb,8.026802e-01_rb,8.047009e-01_rb,8.066715e-01_rb,&
+        & 8.085900e-01_rb,8.104546e-01_rb,8.122636e-01_rb,8.140150e-01_rb,8.157072e-01_rb,&
+        & 8.173382e-01_rb,8.189063e-01_rb,8.204096e-01_rb,8.218464e-01_rb,8.232148e-01_rb,&
+        & 8.245130e-01_rb,8.257391e-01_rb,8.268915e-01_rb,8.279682e-01_rb,8.289675e-01_rb,&
+        & 8.298875e-01_rb,8.307264e-01_rb,8.314824e-01_rb,8.321537e-01_rb,8.327385e-01_rb,&
+        & 8.332350e-01_rb /)
+      asyice3(:, 27) = (/ &
+! band 27
+        & 7.397086e-01_rb,7.424069e-01_rb,7.450955e-01_rb,7.477725e-01_rb,7.504362e-01_rb,&
+        & 7.530846e-01_rb,7.557159e-01_rb,7.583283e-01_rb,7.609199e-01_rb,7.634888e-01_rb,&
+        & 7.660332e-01_rb,7.685512e-01_rb,7.710411e-01_rb,7.735009e-01_rb,7.759288e-01_rb,&
+        & 7.783229e-01_rb,7.806814e-01_rb,7.830024e-01_rb,7.852841e-01_rb,7.875246e-01_rb,&
+        & 7.897221e-01_rb,7.918748e-01_rb,7.939807e-01_rb,7.960380e-01_rb,7.980449e-01_rb,&
+        & 7.999995e-01_rb,8.019000e-01_rb,8.037445e-01_rb,8.055311e-01_rb,8.072581e-01_rb,&
+        & 8.089235e-01_rb,8.105255e-01_rb,8.120623e-01_rb,8.135319e-01_rb,8.149326e-01_rb,&
+        & 8.162626e-01_rb,8.175198e-01_rb,8.187025e-01_rb,8.198089e-01_rb,8.208371e-01_rb,&
+        & 8.217852e-01_rb,8.226514e-01_rb,8.234338e-01_rb,8.241306e-01_rb,8.247399e-01_rb,&
+        & 8.252599e-01_rb /)
+      asyice3(:, 28) = (/ &
+! band 28
+        & 7.224533e-01_rb,7.251681e-01_rb,7.278728e-01_rb,7.305654e-01_rb,7.332444e-01_rb,&
+        & 7.359078e-01_rb,7.385539e-01_rb,7.411808e-01_rb,7.437869e-01_rb,7.463702e-01_rb,&
+        & 7.489291e-01_rb,7.514616e-01_rb,7.539661e-01_rb,7.564408e-01_rb,7.588837e-01_rb,&
+        & 7.612933e-01_rb,7.636676e-01_rb,7.660049e-01_rb,7.683034e-01_rb,7.705612e-01_rb,&
+        & 7.727767e-01_rb,7.749480e-01_rb,7.770733e-01_rb,7.791509e-01_rb,7.811789e-01_rb,&
+        & 7.831556e-01_rb,7.850791e-01_rb,7.869478e-01_rb,7.887597e-01_rb,7.905131e-01_rb,&
+        & 7.922062e-01_rb,7.938372e-01_rb,7.954044e-01_rb,7.969059e-01_rb,7.983399e-01_rb,&
+        & 7.997047e-01_rb,8.009985e-01_rb,8.022195e-01_rb,8.033658e-01_rb,8.044357e-01_rb,&
+        & 8.054275e-01_rb,8.063392e-01_rb,8.071692e-01_rb,8.079157e-01_rb,8.085768e-01_rb,&
+        & 8.091507e-01_rb /)
+      asyice3(:, 29) = (/ &
+! band 29
+        & 8.850026e-01_rb,9.005489e-01_rb,9.069242e-01_rb,9.121799e-01_rb,9.168987e-01_rb,&
+        & 9.212259e-01_rb,9.252176e-01_rb,9.289028e-01_rb,9.323000e-01_rb,9.354235e-01_rb,&
+        & 9.382858e-01_rb,9.408985e-01_rb,9.432734e-01_rb,9.454218e-01_rb,9.473557e-01_rb,&
+        & 9.490871e-01_rb,9.506282e-01_rb,9.519917e-01_rb,9.531904e-01_rb,9.542374e-01_rb,&
+        & 9.551461e-01_rb,9.559298e-01_rb,9.566023e-01_rb,9.571775e-01_rb,9.576692e-01_rb,&
+        & 9.580916e-01_rb,9.584589e-01_rb,9.587853e-01_rb,9.590851e-01_rb,9.593729e-01_rb,&
+        & 9.596632e-01_rb,9.599705e-01_rb,9.603096e-01_rb,9.606954e-01_rb,9.611427e-01_rb,&
+        & 9.616667e-01_rb,9.622826e-01_rb,9.630060e-01_rb,9.638524e-01_rb,9.648379e-01_rb,&
+        & 9.659788e-01_rb,9.672916e-01_rb,9.687933e-01_rb,9.705014e-01_rb,9.724337e-01_rb,&
+        & 9.746084e-01_rb /)
+
+! fdelta: unitless
+      fdlice3(:, 16) = (/ &
+! band 16
+        & 4.959277e-02_rb,4.685292e-02_rb,4.426104e-02_rb,4.181231e-02_rb,3.950191e-02_rb,&
+        & 3.732500e-02_rb,3.527675e-02_rb,3.335235e-02_rb,3.154697e-02_rb,2.985578e-02_rb,&
+        & 2.827395e-02_rb,2.679666e-02_rb,2.541909e-02_rb,2.413640e-02_rb,2.294378e-02_rb,&
+        & 2.183639e-02_rb,2.080940e-02_rb,1.985801e-02_rb,1.897736e-02_rb,1.816265e-02_rb,&
+        & 1.740905e-02_rb,1.671172e-02_rb,1.606585e-02_rb,1.546661e-02_rb,1.490917e-02_rb,&
+        & 1.438870e-02_rb,1.390038e-02_rb,1.343939e-02_rb,1.300089e-02_rb,1.258006e-02_rb,&
+        & 1.217208e-02_rb,1.177212e-02_rb,1.137536e-02_rb,1.097696e-02_rb,1.057210e-02_rb,&
+        & 1.015596e-02_rb,9.723704e-03_rb,9.270516e-03_rb,8.791565e-03_rb,8.282026e-03_rb,&
+        & 7.737072e-03_rb,7.151879e-03_rb,6.521619e-03_rb,5.841467e-03_rb,5.106597e-03_rb,&
+        & 4.312183e-03_rb /)
+      fdlice3(:, 17) = (/ &
+! band 17
+        & 5.071224e-02_rb,5.000217e-02_rb,4.933872e-02_rb,4.871992e-02_rb,4.814380e-02_rb,&
+        & 4.760839e-02_rb,4.711170e-02_rb,4.665177e-02_rb,4.622662e-02_rb,4.583426e-02_rb,&
+        & 4.547274e-02_rb,4.514007e-02_rb,4.483428e-02_rb,4.455340e-02_rb,4.429544e-02_rb,&
+        & 4.405844e-02_rb,4.384041e-02_rb,4.363939e-02_rb,4.345340e-02_rb,4.328047e-02_rb,&
+        & 4.311861e-02_rb,4.296586e-02_rb,4.282024e-02_rb,4.267977e-02_rb,4.254248e-02_rb,&
+        & 4.240640e-02_rb,4.226955e-02_rb,4.212995e-02_rb,4.198564e-02_rb,4.183462e-02_rb,&
+        & 4.167494e-02_rb,4.150462e-02_rb,4.132167e-02_rb,4.112413e-02_rb,4.091003e-02_rb,&
+        & 4.067737e-02_rb,4.042420e-02_rb,4.014854e-02_rb,3.984840e-02_rb,3.952183e-02_rb,&
+        & 3.916683e-02_rb,3.878144e-02_rb,3.836368e-02_rb,3.791158e-02_rb,3.742316e-02_rb,&
+        & 3.689645e-02_rb /)
+      fdlice3(:, 18) = (/ &
+! band 18
+        & 1.062938e-01_rb,1.065234e-01_rb,1.067822e-01_rb,1.070682e-01_rb,1.073793e-01_rb,&
+        & 1.077137e-01_rb,1.080693e-01_rb,1.084442e-01_rb,1.088364e-01_rb,1.092439e-01_rb,&
+        & 1.096647e-01_rb,1.100970e-01_rb,1.105387e-01_rb,1.109878e-01_rb,1.114423e-01_rb,&
+        & 1.119004e-01_rb,1.123599e-01_rb,1.128190e-01_rb,1.132757e-01_rb,1.137279e-01_rb,&
+        & 1.141738e-01_rb,1.146113e-01_rb,1.150385e-01_rb,1.154534e-01_rb,1.158540e-01_rb,&
+        & 1.162383e-01_rb,1.166045e-01_rb,1.169504e-01_rb,1.172741e-01_rb,1.175738e-01_rb,&
+        & 1.178472e-01_rb,1.180926e-01_rb,1.183080e-01_rb,1.184913e-01_rb,1.186405e-01_rb,&
+        & 1.187538e-01_rb,1.188291e-01_rb,1.188645e-01_rb,1.188580e-01_rb,1.188076e-01_rb,&
+        & 1.187113e-01_rb,1.185672e-01_rb,1.183733e-01_rb,1.181277e-01_rb,1.178282e-01_rb,&
+        & 1.174731e-01_rb /)
+      fdlice3(:, 19) = (/ &
+! band 19
+        & 1.076195e-01_rb,1.065195e-01_rb,1.054696e-01_rb,1.044673e-01_rb,1.035099e-01_rb,&
+        & 1.025951e-01_rb,1.017203e-01_rb,1.008831e-01_rb,1.000808e-01_rb,9.931116e-02_rb,&
+        & 9.857151e-02_rb,9.785939e-02_rb,9.717230e-02_rb,9.650774e-02_rb,9.586322e-02_rb,&
+        & 9.523623e-02_rb,9.462427e-02_rb,9.402484e-02_rb,9.343544e-02_rb,9.285358e-02_rb,&
+        & 9.227675e-02_rb,9.170245e-02_rb,9.112818e-02_rb,9.055144e-02_rb,8.996974e-02_rb,&
+        & 8.938056e-02_rb,8.878142e-02_rb,8.816981e-02_rb,8.754323e-02_rb,8.689919e-02_rb,&
+        & 8.623517e-02_rb,8.554869e-02_rb,8.483724e-02_rb,8.409832e-02_rb,8.332943e-02_rb,&
+        & 8.252807e-02_rb,8.169175e-02_rb,8.081795e-02_rb,7.990419e-02_rb,7.894796e-02_rb,&
+        & 7.794676e-02_rb,7.689809e-02_rb,7.579945e-02_rb,7.464834e-02_rb,7.344227e-02_rb,&
+        & 7.217872e-02_rb /)
+      fdlice3(:, 20) = (/ &
+! band 20
+        & 1.119014e-01_rb,1.122706e-01_rb,1.126690e-01_rb,1.130947e-01_rb,1.135456e-01_rb,&
+        & 1.140199e-01_rb,1.145154e-01_rb,1.150302e-01_rb,1.155623e-01_rb,1.161096e-01_rb,&
+        & 1.166703e-01_rb,1.172422e-01_rb,1.178233e-01_rb,1.184118e-01_rb,1.190055e-01_rb,&
+        & 1.196025e-01_rb,1.202008e-01_rb,1.207983e-01_rb,1.213931e-01_rb,1.219832e-01_rb,&
+        & 1.225665e-01_rb,1.231411e-01_rb,1.237050e-01_rb,1.242561e-01_rb,1.247926e-01_rb,&
+        & 1.253122e-01_rb,1.258132e-01_rb,1.262934e-01_rb,1.267509e-01_rb,1.271836e-01_rb,&
+        & 1.275896e-01_rb,1.279669e-01_rb,1.283134e-01_rb,1.286272e-01_rb,1.289063e-01_rb,&
+        & 1.291486e-01_rb,1.293522e-01_rb,1.295150e-01_rb,1.296351e-01_rb,1.297104e-01_rb,&
+        & 1.297390e-01_rb,1.297189e-01_rb,1.296480e-01_rb,1.295244e-01_rb,1.293460e-01_rb,&
+        & 1.291109e-01_rb /)
+      fdlice3(:, 21) = (/ &
+! band 21
+        & 1.133298e-01_rb,1.136777e-01_rb,1.140556e-01_rb,1.144615e-01_rb,1.148934e-01_rb,&
+        & 1.153492e-01_rb,1.158269e-01_rb,1.163243e-01_rb,1.168396e-01_rb,1.173706e-01_rb,&
+        & 1.179152e-01_rb,1.184715e-01_rb,1.190374e-01_rb,1.196108e-01_rb,1.201897e-01_rb,&
+        & 1.207720e-01_rb,1.213558e-01_rb,1.219389e-01_rb,1.225194e-01_rb,1.230951e-01_rb,&
+        & 1.236640e-01_rb,1.242241e-01_rb,1.247733e-01_rb,1.253096e-01_rb,1.258309e-01_rb,&
+        & 1.263352e-01_rb,1.268205e-01_rb,1.272847e-01_rb,1.277257e-01_rb,1.281415e-01_rb,&
+        & 1.285300e-01_rb,1.288893e-01_rb,1.292173e-01_rb,1.295118e-01_rb,1.297710e-01_rb,&
+        & 1.299927e-01_rb,1.301748e-01_rb,1.303154e-01_rb,1.304124e-01_rb,1.304637e-01_rb,&
+        & 1.304673e-01_rb,1.304212e-01_rb,1.303233e-01_rb,1.301715e-01_rb,1.299638e-01_rb,&
+        & 1.296983e-01_rb /)
+      fdlice3(:, 22) = (/ &
+! band 22
+        & 1.145360e-01_rb,1.153256e-01_rb,1.161453e-01_rb,1.169929e-01_rb,1.178666e-01_rb,&
+        & 1.187641e-01_rb,1.196835e-01_rb,1.206227e-01_rb,1.215796e-01_rb,1.225522e-01_rb,&
+        & 1.235383e-01_rb,1.245361e-01_rb,1.255433e-01_rb,1.265579e-01_rb,1.275779e-01_rb,&
+        & 1.286011e-01_rb,1.296257e-01_rb,1.306494e-01_rb,1.316703e-01_rb,1.326862e-01_rb,&
+        & 1.336951e-01_rb,1.346950e-01_rb,1.356838e-01_rb,1.366594e-01_rb,1.376198e-01_rb,&
+        & 1.385629e-01_rb,1.394866e-01_rb,1.403889e-01_rb,1.412678e-01_rb,1.421212e-01_rb,&
+        & 1.429469e-01_rb,1.437430e-01_rb,1.445074e-01_rb,1.452381e-01_rb,1.459329e-01_rb,&
+        & 1.465899e-01_rb,1.472069e-01_rb,1.477819e-01_rb,1.483128e-01_rb,1.487976e-01_rb,&
+        & 1.492343e-01_rb,1.496207e-01_rb,1.499548e-01_rb,1.502346e-01_rb,1.504579e-01_rb,&
+        & 1.506227e-01_rb /)
+      fdlice3(:, 23) = (/ &
+! band 23
+        & 1.153263e-01_rb,1.161445e-01_rb,1.169932e-01_rb,1.178703e-01_rb,1.187738e-01_rb,&
+        & 1.197016e-01_rb,1.206516e-01_rb,1.216217e-01_rb,1.226099e-01_rb,1.236141e-01_rb,&
+        & 1.246322e-01_rb,1.256621e-01_rb,1.267017e-01_rb,1.277491e-01_rb,1.288020e-01_rb,&
+        & 1.298584e-01_rb,1.309163e-01_rb,1.319736e-01_rb,1.330281e-01_rb,1.340778e-01_rb,&
+        & 1.351207e-01_rb,1.361546e-01_rb,1.371775e-01_rb,1.381873e-01_rb,1.391820e-01_rb,&
+        & 1.401593e-01_rb,1.411174e-01_rb,1.420540e-01_rb,1.429671e-01_rb,1.438547e-01_rb,&
+        & 1.447146e-01_rb,1.455449e-01_rb,1.463433e-01_rb,1.471078e-01_rb,1.478364e-01_rb,&
+        & 1.485270e-01_rb,1.491774e-01_rb,1.497857e-01_rb,1.503497e-01_rb,1.508674e-01_rb,&
+        & 1.513367e-01_rb,1.517554e-01_rb,1.521216e-01_rb,1.524332e-01_rb,1.526880e-01_rb,&
+        & 1.528840e-01_rb /)
+      fdlice3(:, 24) = (/ &
+! band 24
+        & 1.160842e-01_rb,1.169118e-01_rb,1.177697e-01_rb,1.186556e-01_rb,1.195676e-01_rb,&
+        & 1.205036e-01_rb,1.214616e-01_rb,1.224394e-01_rb,1.234349e-01_rb,1.244463e-01_rb,&
+        & 1.254712e-01_rb,1.265078e-01_rb,1.275539e-01_rb,1.286075e-01_rb,1.296664e-01_rb,&
+        & 1.307287e-01_rb,1.317923e-01_rb,1.328550e-01_rb,1.339149e-01_rb,1.349699e-01_rb,&
+        & 1.360179e-01_rb,1.370567e-01_rb,1.380845e-01_rb,1.390991e-01_rb,1.400984e-01_rb,&
+        & 1.410803e-01_rb,1.420429e-01_rb,1.429840e-01_rb,1.439016e-01_rb,1.447936e-01_rb,&
+        & 1.456579e-01_rb,1.464925e-01_rb,1.472953e-01_rb,1.480642e-01_rb,1.487972e-01_rb,&
+        & 1.494923e-01_rb,1.501472e-01_rb,1.507601e-01_rb,1.513287e-01_rb,1.518511e-01_rb,&
+        & 1.523252e-01_rb,1.527489e-01_rb,1.531201e-01_rb,1.534368e-01_rb,1.536969e-01_rb,&
+        & 1.538984e-01_rb /)
+      fdlice3(:, 25) = (/ &
+! band 25
+        & 1.168725e-01_rb,1.177088e-01_rb,1.185747e-01_rb,1.194680e-01_rb,1.203867e-01_rb,&
+        & 1.213288e-01_rb,1.222923e-01_rb,1.232750e-01_rb,1.242750e-01_rb,1.252903e-01_rb,&
+        & 1.263187e-01_rb,1.273583e-01_rb,1.284069e-01_rb,1.294626e-01_rb,1.305233e-01_rb,&
+        & 1.315870e-01_rb,1.326517e-01_rb,1.337152e-01_rb,1.347756e-01_rb,1.358308e-01_rb,&
+        & 1.368788e-01_rb,1.379175e-01_rb,1.389449e-01_rb,1.399590e-01_rb,1.409577e-01_rb,&
+        & 1.419389e-01_rb,1.429007e-01_rb,1.438410e-01_rb,1.447577e-01_rb,1.456488e-01_rb,&
+        & 1.465123e-01_rb,1.473461e-01_rb,1.481483e-01_rb,1.489166e-01_rb,1.496492e-01_rb,&
+        & 1.503439e-01_rb,1.509988e-01_rb,1.516118e-01_rb,1.521808e-01_rb,1.527038e-01_rb,&
+        & 1.531788e-01_rb,1.536037e-01_rb,1.539764e-01_rb,1.542951e-01_rb,1.545575e-01_rb,&
+        & 1.547617e-01_rb /)
+      fdlice3(:, 26) = (/ &
+!band 26
+        & 1.180509e-01_rb,1.189025e-01_rb,1.197820e-01_rb,1.206875e-01_rb,1.216171e-01_rb,&
+        & 1.225687e-01_rb,1.235404e-01_rb,1.245303e-01_rb,1.255363e-01_rb,1.265564e-01_rb,&
+        & 1.275888e-01_rb,1.286313e-01_rb,1.296821e-01_rb,1.307392e-01_rb,1.318006e-01_rb,&
+        & 1.328643e-01_rb,1.339284e-01_rb,1.349908e-01_rb,1.360497e-01_rb,1.371029e-01_rb,&
+        & 1.381486e-01_rb,1.391848e-01_rb,1.402095e-01_rb,1.412208e-01_rb,1.422165e-01_rb,&
+        & 1.431949e-01_rb,1.441539e-01_rb,1.450915e-01_rb,1.460058e-01_rb,1.468947e-01_rb,&
+        & 1.477564e-01_rb,1.485888e-01_rb,1.493900e-01_rb,1.501580e-01_rb,1.508907e-01_rb,&
+        & 1.515864e-01_rb,1.522428e-01_rb,1.528582e-01_rb,1.534305e-01_rb,1.539578e-01_rb,&
+        & 1.544380e-01_rb,1.548692e-01_rb,1.552494e-01_rb,1.555767e-01_rb,1.558490e-01_rb,&
+        & 1.560645e-01_rb /)
+      fdlice3(:, 27) = (/ &
+! band 27
+        & 1.200480e-01_rb,1.209267e-01_rb,1.218304e-01_rb,1.227575e-01_rb,1.237059e-01_rb,&
+        & 1.246739e-01_rb,1.256595e-01_rb,1.266610e-01_rb,1.276765e-01_rb,1.287041e-01_rb,&
+        & 1.297420e-01_rb,1.307883e-01_rb,1.318412e-01_rb,1.328988e-01_rb,1.339593e-01_rb,&
+        & 1.350207e-01_rb,1.360813e-01_rb,1.371393e-01_rb,1.381926e-01_rb,1.392396e-01_rb,&
+        & 1.402783e-01_rb,1.413069e-01_rb,1.423235e-01_rb,1.433263e-01_rb,1.443134e-01_rb,&
+        & 1.452830e-01_rb,1.462332e-01_rb,1.471622e-01_rb,1.480681e-01_rb,1.489490e-01_rb,&
+        & 1.498032e-01_rb,1.506286e-01_rb,1.514236e-01_rb,1.521863e-01_rb,1.529147e-01_rb,&
+        & 1.536070e-01_rb,1.542614e-01_rb,1.548761e-01_rb,1.554491e-01_rb,1.559787e-01_rb,&
+        & 1.564629e-01_rb,1.568999e-01_rb,1.572879e-01_rb,1.576249e-01_rb,1.579093e-01_rb,&
+        & 1.581390e-01_rb /)
+      fdlice3(:, 28) = (/ &
+! band 28
+        & 1.247813e-01_rb,1.256496e-01_rb,1.265417e-01_rb,1.274560e-01_rb,1.283905e-01_rb,&
+        & 1.293436e-01_rb,1.303135e-01_rb,1.312983e-01_rb,1.322964e-01_rb,1.333060e-01_rb,&
+        & 1.343252e-01_rb,1.353523e-01_rb,1.363855e-01_rb,1.374231e-01_rb,1.384632e-01_rb,&
+        & 1.395042e-01_rb,1.405441e-01_rb,1.415813e-01_rb,1.426140e-01_rb,1.436404e-01_rb,&
+        & 1.446587e-01_rb,1.456672e-01_rb,1.466640e-01_rb,1.476475e-01_rb,1.486157e-01_rb,&
+        & 1.495671e-01_rb,1.504997e-01_rb,1.514117e-01_rb,1.523016e-01_rb,1.531673e-01_rb,&
+        & 1.540073e-01_rb,1.548197e-01_rb,1.556026e-01_rb,1.563545e-01_rb,1.570734e-01_rb,&
+        & 1.577576e-01_rb,1.584054e-01_rb,1.590149e-01_rb,1.595843e-01_rb,1.601120e-01_rb,&
+        & 1.605962e-01_rb,1.610349e-01_rb,1.614266e-01_rb,1.617693e-01_rb,1.620614e-01_rb,&
+        & 1.623011e-01_rb /)
+      fdlice3(:, 29) = (/ &
+! band 29
+        & 1.006055e-01_rb,9.549582e-02_rb,9.063960e-02_rb,8.602900e-02_rb,8.165612e-02_rb,&
+        & 7.751308e-02_rb,7.359199e-02_rb,6.988496e-02_rb,6.638412e-02_rb,6.308156e-02_rb,&
+        & 5.996942e-02_rb,5.703979e-02_rb,5.428481e-02_rb,5.169657e-02_rb,4.926719e-02_rb,&
+        & 4.698880e-02_rb,4.485349e-02_rb,4.285339e-02_rb,4.098061e-02_rb,3.922727e-02_rb,&
+        & 3.758547e-02_rb,3.604733e-02_rb,3.460497e-02_rb,3.325051e-02_rb,3.197604e-02_rb,&
+        & 3.077369e-02_rb,2.963558e-02_rb,2.855381e-02_rb,2.752050e-02_rb,2.652776e-02_rb,&
+        & 2.556772e-02_rb,2.463247e-02_rb,2.371415e-02_rb,2.280485e-02_rb,2.189670e-02_rb,&
+        & 2.098180e-02_rb,2.005228e-02_rb,1.910024e-02_rb,1.811781e-02_rb,1.709709e-02_rb,&
+        & 1.603020e-02_rb,1.490925e-02_rb,1.372635e-02_rb,1.247363e-02_rb,1.114319e-02_rb,&
+        & 9.727157e-03_rb /)
+
+      end subroutine swcldpr
+
+      end module rrtmg_sw_init
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_rad.nomcica.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_rad.nomcica.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_rad.nomcica.f90	(revision 3477)
@@ -0,0 +1,1097 @@
+!     path:      $Source$
+!     author:    $Author: miacono $
+!     revision:  $Revision: 23308 $
+!     created:   $Date: 2013-12-27 17:23:51 -0500 (Fri, 27 Dec 2013) $
+!
+
+       module rrtmg_sw_rad
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+!
+! ****************************************************************************
+! *                                                                          *
+! *                             RRTMG_SW                                     *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                 a rapid radiative transfer model                         *
+! *                  for the solar spectral region                           *
+! *           for application to general circulation models                  *
+! *                                                                          *
+! *                                                                          *
+! *           Atmospheric and Environmental Research, Inc.                   *
+! *                       131 Hartwell Avenue                                *
+! *                       Lexington, MA 02421                                *
+! *                                                                          *
+! *                                                                          *
+! *                          Eli J. Mlawer                                   *
+! *                       Jennifer S. Delamere                               *
+! *                        Michael J. Iacono                                 *
+! *                        Shepard A. Clough                                 *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                                                                          *
+! *                      email:  emlawer@aer.com                             *
+! *                      email:  jdelamer@aer.com                            *
+! *                      email:  miacono@aer.com                             *
+! *                                                                          *
+! *       The authors wish to acknowledge the contributions of the           *
+! *       following people:  Steven J. Taubman, Patrick D. Brown,            *
+! *       Ronald E. Farren, Luke Chen, Robert Bergstrom.                     *
+! *                                                                          *
+! ****************************************************************************
+
+! --------- Modules ---------
+      use parkind, only : im => kind_im, rb => kind_rb
+      use rrsw_vsn
+      use rrtmg_sw_cldprop, only: cldprop_sw
+! *** Move the required call to rrtmg_sw_ini below and the following 
+! use association to GCM initialization area ***
+!      use rrtmg_sw_init, only: rrtmg_sw_ini
+      use rrtmg_sw_setcoef, only: setcoef_sw
+      use rrtmg_sw_spcvrt, only: spcvrt_sw
+
+      implicit none
+
+! public interfaces/functions/subroutines
+      public :: rrtmg_sw, inatm_sw, earth_sun
+
+!------------------------------------------------------------------
+      contains
+!------------------------------------------------------------------
+
+!------------------------------------------------------------------
+! Public subroutines
+!------------------------------------------------------------------
+
+      subroutine rrtmg_sw &
+            (ncol    ,nlay    ,icld    ,iaer    , &
+             play    ,plev    ,tlay    ,tlev    , &
+             tsfc    ,h2ovmr  ,o3vmr   ,co2vmr  , &
+             ch4vmr  ,n2ovmr  ,o2vmr   ,asdir   , &
+             asdif   ,aldir   ,aldif   ,coszen  , &
+             adjes   ,dyofyr  ,scon    ,inflgsw , &
+             iceflgsw,liqflgsw,cldfr   ,taucld  , &
+             ssacld  ,asmcld  ,fsfcld  ,cicewp  , &
+             cliqwp  ,reice   ,reliq   ,tauaer  , &
+             ssaaer  ,asmaer  ,ecaer   ,swuflx  , &
+             swdflx  ,swhr    ,swuflxc ,swdflxc , &
+             swhrc   ,dirdflux,difdflux)
+
+! ------- Description -------
+
+! This program is the driver for RRTMG_SW, the AER SW radiation model for 
+!  application to GCMs, that has been adapted from RRTM_SW for improved
+!  efficiency and to provide fractional cloudiness and cloud overlap
+!  capability using McICA.
+!
+! Note: The call to RRTMG_SW_INI should be moved to the GCM initialization 
+!  area, since this has to be called only once. 
+!
+! This routine
+!    b) calls INATM_SW to read in the atmospheric profile from GCM;
+!       all layering in RRTMG is ordered from surface to toa. 
+!    c) calls CLDPROP_SW to set cloud optical depth based on input
+!       cloud properties
+!    d) calls SETCOEF_SW to calculate various quantities needed for 
+!       the radiative transfer algorithm
+!    e) calls SPCVRT to call the two-stream model that in turn 
+!       calls TAUMOL to calculate gaseous optical depths for each 
+!       of the 16 spectral bands and to perform the radiative transfer;
+!    f) passes the calculated fluxes and cooling rates back to GCM
+!
+! Two modes of operation are possible:
+!     The mode is chosen by using either rrtmg_sw.nomcica.f90 (to not use
+!     McICA) or rrtmg_sw.f90 (to use McICA) to interface with a GCM.
+!
+!    1) Standard, single forward model calculation (imca = 0); this is 
+!       valid only for clear sky or fully overcast clouds
+!    2) Monte Carlo Independent Column Approximation (McICA, Pincus et al., 
+!       JC, 2003) method is applied to the forward model calculation (imca = 1)
+!       This method is valid for clear sky and full or partial cloud conditions.
+!
+! Two methods of cloud property input are possible:
+!     Cloud properties can be input in one of two ways (controlled by input 
+!     flags inflag, iceflag and liqflag; see text file rrtmg_sw_instructions
+!     and subroutine rrtmg_sw_cldprop.f90 for further details):
+!
+!    1) Input cloud fraction, cloud optical depth, single scattering albedo 
+!       and asymmetry parameter directly (inflgsw = 0)
+!    2) Input cloud fraction and cloud physical properties: ice fracion,
+!       ice and liquid particle sizes (inflgsw = 1 or 2);  
+!       cloud optical properties are calculated by cldprop or cldprmc based
+!       on input settings of iceflgsw and liqflgsw
+!
+! Two methods of aerosol property input are possible:
+!     Aerosol properties can be input in one of two ways (controlled by input 
+!     flag iaer, see text file rrtmg_sw_instructions for further details):
+!
+!    1) Input aerosol optical depth, single scattering albedo and asymmetry
+!       parameter directly by layer and spectral band (iaer=10)
+!    2) Input aerosol optical depth and 0.55 micron directly by layer and use
+!       one or more of six ECMWF aerosol types (iaer=6)
+!
+!
+! ------- Modifications -------
+!
+! This version of RRTMG_SW has been modified from RRTM_SW to use a reduced
+! set of g-point intervals and a two-stream model for application to GCMs. 
+!
+!-- Original version (derived from RRTM_SW)
+!     2002: AER. Inc.
+!-- Conversion to F90 formatting; addition of 2-stream radiative transfer
+!     Feb 2003: J.-J. Morcrette, ECMWF
+!-- Additional modifications for GCM application
+!     Aug 2003: M. J. Iacono, AER Inc.
+!-- Total number of g-points reduced from 224 to 112.  Original
+!   set of 224 can be restored by exchanging code in module parrrsw.f90 
+!   and in file rrtmg_sw_init.f90.
+!     Apr 2004: M. J. Iacono, AER, Inc.
+!-- Modifications to include output for direct and diffuse 
+!   downward fluxes.  There are output as "true" fluxes without
+!   any delta scaling applied.  Code can be commented to exclude
+!   this calculation in source file rrtmg_sw_spcvrt.f90.
+!     Jan 2005: E. J. Mlawer, M. J. Iacono, AER, Inc.
+!-- Reformatted for consistency with rrtmg_lw.
+!     Feb 2007: M. J. Iacono, AER, Inc.
+!-- Modifications to formatting to use assumed-shape arrays. 
+!     Aug 2007: M. J. Iacono, AER, Inc.
+!-- Modified to output direct and diffuse fluxes either with or without
+!   delta scaling based on setting of idelm flag. 
+!     Dec 2008: M. J. Iacono, AER, Inc.
+!-- Added the output direct and diffuse fluxes to the argument of rrtmg_sw
+!     Aug 2018: M. Salim, Humboldt Uni, Berlin, Germany
+
+! --------- Modules ---------
+
+      use parrrsw, only : nbndsw, ngptsw, naerec, nstr, nmol, mxmol, &
+                          jpband, jpb1, jpb2
+      use rrsw_aer, only : rsrtaua, rsrpiza, rsrasya
+      use rrsw_con, only : heatfac, oneminus, pi
+      use rrsw_wvn, only : wavenum1, wavenum2
+
+! ------- Declarations
+
+! ----- Input -----
+! Note: All volume mixing ratios are in dimensionless units of mole fraction obtained
+! by scaling mass mixing ratio (g/g) with the appropriate molecular weights (g/mol) 
+      integer(kind=im), intent(in) :: ncol            ! Number of horizontal columns     
+      integer(kind=im), intent(in) :: nlay            ! Number of model layers
+      integer(kind=im), intent(inout) :: icld         ! Cloud overlap method
+                                                      !    0: Clear only
+                                                      !    1: Random
+                                                      !    2: Maximum/random
+                                                      !    3: Maximum
+      integer(kind=im), intent(inout) :: iaer         ! Aerosol option flag
+                                                      !    0: No aerosol
+                                                      !    6: ECMWF method
+                                                      !    10:Input aerosol optical 
+                                                      !       properties
+
+      real(kind=rb), intent(in) :: play(:,:)          ! Layer pressures (hPa, mb)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: plev(:,:)          ! Interface pressures (hPa, mb)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tlay(:,:)          ! Layer temperatures (K)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: tlev(:,:)          ! Interface temperatures (K)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tsfc(:)            ! Surface temperature (K)
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: h2ovmr(:,:)        ! H2O volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o3vmr(:,:)         ! O3 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: co2vmr(:,:)        ! CO2 volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: ch4vmr(:,:)        ! Methane volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: n2ovmr(:,:)        ! Nitrous oxide volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o2vmr(:,:)         ! Oxygen volume mixing ratio
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: asdir(:)           ! UV/vis surface albedo direct rad
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: aldir(:)           ! Near-IR surface albedo direct rad
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: asdif(:)           ! UV/vis surface albedo: diffuse rad
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: aldif(:)           ! Near-IR surface albedo: diffuse rad
+                                                      !    Dimensions: (ncol)
+
+      integer(kind=im), intent(in) :: dyofyr          ! Day of the year (used to get Earth/Sun
+                                                      !  distance if adjflx not provided)
+      real(kind=rb), intent(in) :: adjes              ! Flux adjustment for Earth/Sun distance
+      real(kind=rb), intent(in) :: coszen(:)          ! Cosine of solar zenith angle
+                                                      !    Dimensions: (ncol)
+      real(kind=rb), intent(in) :: scon               ! Solar constant (W/m2)
+
+      integer(kind=im), intent(in) :: inflgsw         ! Flag for cloud optical properties
+      integer(kind=im), intent(in) :: iceflgsw        ! Flag for ice particle specification
+      integer(kind=im), intent(in) :: liqflgsw        ! Flag for liquid droplet specification
+
+      real(kind=rb), intent(in) :: cldfr(:,:)         ! Cloud fraction
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: taucld(:,:,:)      ! In-cloud optical depth
+                                                      !    Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: ssacld(:,:,:)      ! In-cloud single scattering albedo
+                                                      !    Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: asmcld(:,:,:)      ! In-cloud asymmetry parameter
+                                                      !    Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: fsfcld(:,:,:)      ! In-cloud forward scattering fraction
+                                                      !    Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: cicewp(:,:)        ! In-cloud ice water path (g/m2)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cliqwp(:,:)        ! In-cloud liquid water path (g/m2)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: reice(:,:)         ! Cloud ice effective radius (microns)
+                                                      !    Dimensions: (ncol,nlay)
+                                                      ! specific definition of reice depends on setting of iceflgsw:
+                                                      ! iceflgsw = 0: (inactive)
+                                                      !              
+                                                      ! iceflgsw = 1: ice effective radius, r_ec, (Ebert and Curry, 1992),
+                                                      !               r_ec range is limited to 13.0 to 130.0 microns
+                                                      ! iceflgsw = 2: ice effective radius, r_k, (Key, Streamer Ref. Manual, 1996)
+                                                      !               r_k range is limited to 5.0 to 131.0 microns
+                                                      ! iceflgsw = 3: generalized effective size, dge, (Fu, 1996),
+                                                      !               dge range is limited to 5.0 to 140.0 microns
+                                                      !               [dge = 1.0315 * r_ec]
+      real(kind=rb), intent(in) :: reliq(:,:)         ! Cloud water drop effective radius (microns)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: tauaer(:,:,:)      ! Aerosol optical depth (iaer=10 only)
+                                                      !    Dimensions: (ncol,nlay,nbndsw)
+                                                      ! (non-delta scaled)      
+      real(kind=rb), intent(in) :: ssaaer(:,:,:)      ! Aerosol single scattering albedo (iaer=10 only)
+                                                      !    Dimensions: (ncol,nlay,nbndsw)
+                                                      ! (non-delta scaled)      
+      real(kind=rb), intent(in) :: asmaer(:,:,:)      ! Aerosol asymmetry parameter (iaer=10 only)
+                                                      !    Dimensions: (ncol,nlay,nbndsw)
+                                                      ! (non-delta scaled)      
+      real(kind=rb), intent(in) :: ecaer(:,:,:)       ! Aerosol optical depth at 0.55 micron (iaer=6 only)
+                                                      !    Dimensions: (ncol,nlay,naerec)
+                                                      ! (non-delta scaled)      
+
+! ----- Output -----
+
+      real(kind=rb), intent(out) :: swuflx(:,:)       ! Total sky shortwave upward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: swdflx(:,:)       ! Total sky shortwave downward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: swhr(:,:)         ! Total sky shortwave radiative heating rate (K/d)
+                                                      !    Dimensions: (ncol,nlay)
+      real(kind=rb), intent(out) :: swuflxc(:,:)      ! Clear sky shortwave upward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: swdflxc(:,:)      ! Clear sky shortwave downward flux (W/m2)
+                                                      !    Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(out) :: swhrc(:,:)        ! Clear sky shortwave radiative heating rate (K/d)
+                                                      !    Dimensions: (ncol,nlay)
+
+! ----- Local -----
+
+! Control
+      integer(kind=im) :: nlayers             ! total number of layers
+      integer(kind=im) :: istart              ! beginning band of calculation
+      integer(kind=im) :: iend                ! ending band of calculation
+      integer(kind=im) :: icpr                ! cldprop/cldprmc use flag
+      integer(kind=im) :: iout                ! output option flag
+      integer(kind=im) :: idelm               ! delta-m scaling flag
+                                              ! [0 = direct and diffuse fluxes are unscaled]
+                                              ! [1 = direct and diffuse fluxes are scaled]
+                                              ! (total downward fluxes are always delta scaled)
+      integer(kind=im) :: isccos              ! instrumental cosine response flag (inactive)
+      integer(kind=im) :: iplon               ! column loop index
+      integer(kind=im) :: i                   ! layer loop index                       ! jk
+      integer(kind=im) :: ib                  ! band loop index                        ! jsw
+      integer(kind=im) :: ia, ig              ! indices
+      integer(kind=im) :: k                   ! layer loop index
+      integer(kind=im) :: ims                 ! value for changing mcica permute seed
+      integer(kind=im) :: imca                ! flag for mcica [0=off, 1=on]
+
+      real(kind=rb) :: zepsec, zepzen         ! epsilon
+      real(kind=rb) :: zdpgcp                 ! flux to heating conversion ratio
+
+! Atmosphere
+      real(kind=rb) :: pavel(nlay+1)          ! layer pressures (mb) 
+      real(kind=rb) :: tavel(nlay+1)          ! layer temperatures (K)
+      real(kind=rb) :: pz(0:nlay+1)           ! level (interface) pressures (hPa, mb)
+      real(kind=rb) :: tz(0:nlay+1)           ! level (interface) temperatures (K)
+      real(kind=rb) :: tbound                 ! surface temperature (K)
+      real(kind=rb) :: pdp(nlay+1)            ! layer pressure thickness (hPa, mb)
+      real(kind=rb) :: coldry(nlay+1)         ! dry air column amount
+      real(kind=rb) :: wkl(mxmol,nlay+1)      ! molecular amounts (mol/cm-2)
+
+!      real(kind=rb) :: earth_sun             ! function for Earth/Sun distance factor
+      real(kind=rb) :: cossza                 ! Cosine of solar zenith angle
+      real(kind=rb) :: adjflux(jpband)        ! adjustment for current Earth/Sun distance
+      real(kind=rb) :: solvar(jpband)         ! solar constant scaling factor from rrtmg_sw
+                                              !  default value of 1368.22 Wm-2 at 1 AU
+      real(kind=rb) :: albdir(nbndsw)         ! surface albedo, direct          ! zalbp
+      real(kind=rb) :: albdif(nbndsw)         ! surface albedo, diffuse         ! zalbd
+
+      real(kind=rb) :: taua(nlay+1,nbndsw)    ! Aerosol optical depth
+      real(kind=rb) :: ssaa(nlay+1,nbndsw)    ! Aerosol single scattering albedo
+      real(kind=rb) :: asma(nlay+1,nbndsw)    ! Aerosol asymmetry parameter
+
+! Atmosphere - setcoef
+      integer(kind=im) :: laytrop             ! tropopause layer index
+      integer(kind=im) :: layswtch            ! tropopause layer index
+      integer(kind=im) :: laylow              ! tropopause layer index
+      integer(kind=im) :: jp(nlay+1)          ! 
+      integer(kind=im) :: jt(nlay+1)          !
+      integer(kind=im) :: jt1(nlay+1)         !
+
+      real(kind=rb) :: colh2o(nlay+1)         ! column amount (h2o)
+      real(kind=rb) :: colco2(nlay+1)         ! column amount (co2)
+      real(kind=rb) :: colo3(nlay+1)          ! column amount (o3)
+      real(kind=rb) :: coln2o(nlay+1)         ! column amount (n2o)
+      real(kind=rb) :: colch4(nlay+1)         ! column amount (ch4)
+      real(kind=rb) :: colo2(nlay+1)          ! column amount (o2)
+      real(kind=rb) :: colmol(nlay+1)         ! column amount
+      real(kind=rb) :: co2mult(nlay+1)        ! column amount 
+
+      integer(kind=im) :: indself(nlay+1)
+      integer(kind=im) :: indfor(nlay+1)
+      real(kind=rb) :: selffac(nlay+1)
+      real(kind=rb) :: selffrac(nlay+1)
+      real(kind=rb) :: forfac(nlay+1)
+      real(kind=rb) :: forfrac(nlay+1)
+
+      real(kind=rb) :: &                      !
+                         fac00(nlay+1), fac01(nlay+1), &
+                         fac10(nlay+1), fac11(nlay+1) 
+
+! Atmosphere/clouds - cldprop
+      integer(kind=im) :: ncbands             ! number of cloud spectral bands
+      integer(kind=im) :: inflag              ! flag for cloud property method
+      integer(kind=im) :: iceflag             ! flag for ice cloud properties
+      integer(kind=im) :: liqflag             ! flag for liquid cloud properties
+
+      real(kind=rb) :: cldfrac(nlay+1)        ! layer cloud fraction
+      real(kind=rb) :: tauc(nbndsw,nlay+1)    ! in-cloud optical depth (non-delta scaled)
+      real(kind=rb) :: ssac(nbndsw,nlay+1)    ! in-cloud single scattering albedo (non-delta scaled)
+      real(kind=rb) :: asmc(nbndsw,nlay+1)    ! in-cloud asymmetry parameter (non-delta scaled)
+      real(kind=rb) :: fsfc(nbndsw,nlay+1)    ! in-cloud forward scattering fraction (non-delta scaled)
+      real(kind=rb) :: ciwp(nlay+1)           ! in-cloud ice water path
+      real(kind=rb) :: clwp(nlay+1)           ! in-cloud liquid water path
+      real(kind=rb) :: rel(nlay+1)            ! cloud liquid particle effective radius (microns)
+      real(kind=rb) :: rei(nlay+1)            ! cloud ice particle effective size (microns)
+
+      real(kind=rb) :: taucloud(nlay+1,jpband)  ! in-cloud optical depth
+      real(kind=rb) :: taucldorig(nlay+1,jpband)! in-cloud optical depth (non-delta scaled)
+      real(kind=rb) :: ssacloud(nlay+1,jpband)  ! in-cloud single scattering albedo
+      real(kind=rb) :: asmcloud(nlay+1,jpband)  ! in-cloud asymmetry parameter
+
+! Atmosphere/clouds/aerosol - spcvrt,spcvmc
+      real(kind=rb) :: ztauc(nlay+1,nbndsw)     ! cloud optical depth
+      real(kind=rb) :: ztaucorig(nlay+1,nbndsw) ! unscaled cloud optical depth
+      real(kind=rb) :: zasyc(nlay+1,nbndsw)     ! cloud asymmetry parameter 
+                                                !  (first moment of phase function)
+      real(kind=rb) :: zomgc(nlay+1,nbndsw)     ! cloud single scattering albedo
+      real(kind=rb) :: ztaua(nlay+1,nbndsw)     ! total aerosol optical depth
+      real(kind=rb) :: zasya(nlay+1,nbndsw)     ! total aerosol asymmetry parameter 
+      real(kind=rb) :: zomga(nlay+1,nbndsw)     ! total aerosol single scattering albedo
+
+      real(kind=rb) :: zbbfu(nlay+2)          ! temporary upward shortwave flux (w/m2)
+      real(kind=rb) :: zbbfd(nlay+2)          ! temporary downward shortwave flux (w/m2)
+      real(kind=rb) :: zbbcu(nlay+2)          ! temporary clear sky upward shortwave flux (w/m2)
+      real(kind=rb) :: zbbcd(nlay+2)          ! temporary clear sky downward shortwave flux (w/m2)
+      real(kind=rb) :: zbbfddir(nlay+2)       ! temporary downward direct shortwave flux (w/m2)
+      real(kind=rb) :: zbbcddir(nlay+2)       ! temporary clear sky downward direct shortwave flux (w/m2)
+      real(kind=rb) :: zuvfd(nlay+2)          ! temporary UV downward shortwave flux (w/m2)
+      real(kind=rb) :: zuvcd(nlay+2)          ! temporary clear sky UV downward shortwave flux (w/m2)
+      real(kind=rb) :: zuvfddir(nlay+2)       ! temporary UV downward direct shortwave flux (w/m2)
+      real(kind=rb) :: zuvcddir(nlay+2)       ! temporary clear sky UV downward direct shortwave flux (w/m2)
+      real(kind=rb) :: znifd(nlay+2)          ! temporary near-IR downward shortwave flux (w/m2)
+      real(kind=rb) :: znicd(nlay+2)          ! temporary clear sky near-IR downward shortwave flux (w/m2)
+      real(kind=rb) :: znifddir(nlay+2)       ! temporary near-IR downward direct shortwave flux (w/m2)
+      real(kind=rb) :: znicddir(nlay+2)       ! temporary clear sky near-IR downward direct shortwave flux (w/m2)
+
+! Optional output fields 
+      real(kind=rb) :: swnflx(nlay+2)         ! Total sky shortwave net flux (W/m2)
+      real(kind=rb) :: swnflxc(nlay+2)        ! Clear sky shortwave net flux (W/m2)
+      real(kind=rb), intent(out) :: dirdflux(nlay+2)       ! Direct downward shortwave surface flux
+      real(kind=rb), intent(out) :: difdflux(nlay+2)       ! Diffuse downward shortwave surface flux
+      real(kind=rb) :: uvdflx(nlay+2)         ! Total sky downward shortwave flux, UV/vis  
+      real(kind=rb) :: nidflx(nlay+2)         ! Total sky downward shortwave flux, near-IR 
+      real(kind=rb) :: dirdnuv(nlay+2)        ! Direct downward shortwave flux, UV/vis
+      real(kind=rb) :: difdnuv(nlay+2)        ! Diffuse downward shortwave flux, UV/vis
+      real(kind=rb) :: dirdnir(nlay+2)        ! Direct downward shortwave flux, near-IR
+      real(kind=rb) :: difdnir(nlay+2)        ! Diffuse downward shortwave flux, near-IR
+
+! Output - inactive
+!      real(kind=rb) :: zuvfu(nlay+2)         ! temporary upward UV shortwave flux (w/m2)
+!      real(kind=rb) :: zuvfd(nlay+2)         ! temporary downward UV shortwave flux (w/m2)
+!      real(kind=rb) :: zuvcu(nlay+2)         ! temporary clear sky upward UV shortwave flux (w/m2)
+!      real(kind=rb) :: zuvcd(nlay+2)         ! temporary clear sky downward UV shortwave flux (w/m2)
+!      real(kind=rb) :: zvsfu(nlay+2)         ! temporary upward visible shortwave flux (w/m2)
+!      real(kind=rb) :: zvsfd(nlay+2)         ! temporary downward visible shortwave flux (w/m2)
+!      real(kind=rb) :: zvscu(nlay+2)         ! temporary clear sky upward visible shortwave flux (w/m2)
+!      real(kind=rb) :: zvscd(nlay+2)         ! temporary clear sky downward visible shortwave flux (w/m2)
+!      real(kind=rb) :: znifu(nlay+2)         ! temporary upward near-IR shortwave flux (w/m2)
+!      real(kind=rb) :: znifd(nlay+2)         ! temporary downward near-IR shortwave flux (w/m2)
+!      real(kind=rb) :: znicu(nlay+2)         ! temporary clear sky upward near-IR shortwave flux (w/m2)
+!      real(kind=rb) :: znicd(nlay+2)         ! temporary clear sky downward near-IR shortwave flux (w/m2)
+
+
+! Initializations
+
+      zepsec = 1.e-06_rb
+      zepzen = 1.e-10_rb
+      oneminus = 1.0_rb - zepsec
+      pi = 2._rb * asin(1._rb)
+
+      istart = jpb1
+      iend = jpb2
+      iout = 0
+      icpr = 0
+
+! In a GCM with or without McICA, set nlon to the longitude dimension
+!
+! Set imca to select calculation type:
+!  imca = 0, use standard forward model calculation (clear and overcast only)
+!  imca = 1, use McICA for Monte Carlo treatment of sub-grid cloud variability
+!            (clear, overcast or partial cloud conditions)
+
+! *** This version does not use McICA (imca = 0) ***
+
+! Set icld to select of clear or cloud calculation and cloud 
+! overlap method (read by subroutine readprof from input file INPUT_RRTM):  
+! Without McICA, SW calculation is limited to clear or fully overcast conditions. 
+! icld = 0, clear only
+! icld = 1, with clouds using random cloud overlap (McICA only)
+! icld = 2, with clouds using maximum/random cloud overlap (McICA only)
+! icld = 3, with clouds using maximum cloud overlap (McICA only)
+      if (icld.lt.0.or.icld.gt.3) icld = 2
+
+! Set iaer to select aerosol option
+! iaer = 0, no aerosols
+! iaer = 6, use six ECMWF aerosol types
+!           input aerosol optical depth at 0.55 microns for each aerosol type (ecaer)
+! iaer = 10, input total aerosol optical depth, single scattering albedo 
+!            and asymmetry parameter (tauaer, ssaaer, asmaer) directly
+      if (iaer.ne.0.and.iaer.ne.6.and.iaer.ne.10) iaer = 0
+
+! Set idelm to select between delta-M scaled or unscaled output direct and diffuse fluxes
+! NOTE: total downward fluxes are always delta scaled
+! idelm = 0, output direct and diffuse flux components are not delta scaled
+!            (direct flux does not include forward scattering peak)
+! idelm = 1, output direct and diffuse flux components are delta scaled (default)
+!            (direct flux includes part or most of forward scattering peak)
+      idelm = 1
+
+! Call model and data initialization, compute lookup tables, perform
+! reduction of g-points from 224 to 112 for input absorption
+! coefficient data and other arrays.
+!
+! In a GCM this call should be placed in the model initialization
+! area, since this has to be called only once.  
+!      call rrtmg_sw_ini(cpdair)
+
+! This is the main longitude/column loop in RRTMG.
+! Modify to loop over all columns (nlon) or over daylight columns
+
+      do iplon = 1, ncol
+
+! Prepare atmosphere profile from GCM for use in RRTMG, and define
+! other input parameters
+
+         call inatm_sw (iplon, nlay, icld, iaer, &
+              play, plev, tlay, tlev, tsfc, h2ovmr, &
+              o3vmr, co2vmr, ch4vmr, n2ovmr, o2vmr, &
+              adjes, dyofyr, scon, inflgsw, iceflgsw, liqflgsw, &
+              cldfr, taucld, ssacld, asmcld, fsfcld, cicewp, cliqwp, &
+              reice, reliq, tauaer, ssaaer, asmaer, &
+              nlayers, pavel, pz, pdp, tavel, tz, tbound, coldry, wkl, &
+              adjflux, solvar, inflag, iceflag, liqflag, cldfrac, tauc, &
+              ssac, asmc, fsfc, ciwp, clwp, rei, rel, taua, ssaa, asma)
+
+!  For cloudy atmosphere, use cldprop to set cloud optical properties based on
+!  input cloud physical properties.  Select method based on choices described
+!  in cldprop.  Cloud fraction, water path, liquid droplet and ice particle
+!  effective radius must be passed in cldprop.  Cloud fraction and cloud
+!  optical properties are transferred to rrtmg_sw arrays in cldprop.  
+
+!  Without McICA, SW calculation is limited to clear or fully overcast conditions. 
+!  Stop model if partial cloudiness is present.  
+
+         do i = 1, nlayers
+            if (cldfrac(i).gt.zepsec .and. cldfrac(i).lt.oneminus) then
+               stop 'PARTIAL CLOUD NOT ALLOWED'
+            endif
+         enddo
+         call cldprop_sw(nlayers, inflag, iceflag, liqflag, cldfrac, &
+                         tauc, ssac, asmc, fsfc, ciwp, clwp, rei, rel, &
+                         taucldorig, taucloud, ssacloud, asmcloud)
+         icpr = 1
+
+! Calculate coefficients for the temperature and pressure dependence of the 
+! molecular absorption coefficients by interpolating data from stored
+! reference atmospheres.
+
+         call setcoef_sw(nlayers, pavel, tavel, pz, tz, tbound, coldry, wkl, &
+                         laytrop, layswtch, laylow, jp, jt, jt1, &
+                         co2mult, colch4, colco2, colh2o, colmol, coln2o, &
+                         colo2, colo3, fac00, fac01, fac10, fac11, &
+                         selffac, selffrac, indself, forfac, forfrac, indfor)
+
+
+! Cosine of the solar zenith angle 
+!  Prevent using value of zero; ideally, SW model is not called from host model when sun 
+!  is below horizon
+
+         cossza = coszen(iplon)
+         if (cossza .lt. zepzen) cossza = zepzen
+
+
+! Transfer albedo, cloud and aerosol properties into arrays for 2-stream radiative transfer 
+
+! Surface albedo
+!  Near-IR bands 16-24 and 29 (1-9 and 14), 820-16000 cm-1, 0.625-12.195 microns
+         do ib=1,9
+            albdir(ib) = aldir(iplon)
+            albdif(ib) = aldif(iplon)
+         enddo
+         albdir(nbndsw) = aldir(iplon)
+         albdif(nbndsw) = aldif(iplon)
+!  UV/visible bands 25-28 (10-13), 16000-50000 cm-1, 0.200-0.625 micron
+         do ib=10,13
+            albdir(ib) = asdir(iplon)
+            albdif(ib) = asdif(iplon)
+         enddo
+
+
+! Clouds
+         if (icld.eq.0) then
+
+            ztauc(:,:) = 0._rb
+            ztaucorig(:,:) = 0._rb
+            zasyc(:,:) = 0._rb
+            zomgc(:,:) = 1._rb
+
+         elseif (icld.ge.1) then
+            do i=1,nlayers
+               do ib=1,nbndsw
+                  ztauc(i,ib) = taucloud(i,jpb1-1+ib)
+                  ztaucorig(i,ib) = taucldorig(i,jpb1-1+ib)
+                  zasyc(i,ib) = asmcloud(i,jpb1-1+ib)
+                  zomgc(i,ib) = ssacloud(i,jpb1-1+ib)
+               enddo
+            enddo
+
+         endif   
+
+! Aerosol
+! IAER = 0: no aerosols
+         if (iaer.eq.0) then
+
+            ztaua(:,:) = 0._rb
+            zasya(:,:) = 0._rb
+            zomga(:,:) = 1._rb
+
+! IAER = 6: Use ECMWF six aerosol types. See rrsw_aer.f90 for details.
+! Input aerosol optical thickness at 0.55 micron for each aerosol type (ecaer), 
+! or set manually here for each aerosol and layer.
+         elseif (iaer.eq.6) then
+
+!            do i = 1, nlayers
+!               do ia = 1, naerec
+!                  ecaer(iplon,i,ia) = 1.0e-15_rb
+!               enddo
+!            enddo
+
+            do i = 1, nlayers
+               do ib = 1, nbndsw
+                  ztaua(i,ib) = 0._rb
+                  zasya(i,ib) = 0._rb
+                  zomga(i,ib) = 0._rb
+                  do ia = 1, naerec
+                     ztaua(i,ib) = ztaua(i,ib) + rsrtaua(ib,ia) * ecaer(iplon,i,ia)
+                     zomga(i,ib) = zomga(i,ib) + rsrtaua(ib,ia) * ecaer(iplon,i,ia) * &
+                                   rsrpiza(ib,ia)
+                     zasya(i,ib) = zasya(i,ib) + rsrtaua(ib,ia) * ecaer(iplon,i,ia) * &
+                                   rsrpiza(ib,ia) * rsrasya(ib,ia)
+                  enddo
+                  if (ztaua(i,ib) == 0._rb) then
+                     ztaua(i,ib) = 0._rb
+                     zasya(i,ib) = 0._rb
+                     zomga(i,ib) = 1._rb
+                  else
+                     if (zomga(i,ib) /= 0._rb) then
+                        zasya(i,ib) = zasya(i,ib) / zomga(i,ib)
+                     endif
+                     if (ztaua(i,ib) /= 0._rb) then
+                        zomga(i,ib) = zomga(i,ib) / ztaua(i,ib)
+                     endif
+                  endif
+               enddo
+            enddo
+
+! IAER=10: Direct specification of aerosol optical properties from GCM
+         elseif (iaer.eq.10) then
+
+            do i = 1 ,nlayers
+               do ib = 1 ,nbndsw
+                  ztaua(i,ib) = taua(i,ib)
+                  zasya(i,ib) = asma(i,ib)
+                  zomga(i,ib) = ssaa(i,ib)
+               enddo
+            enddo
+
+         endif
+
+
+! Call the 2-stream radiation transfer model
+
+         do i=1,nlayers+1
+            zbbcu(i) = 0._rb
+            zbbcd(i) = 0._rb
+            zbbfu(i) = 0._rb
+            zbbfd(i) = 0._rb
+            zbbcddir(i) = 0._rb
+            zbbfddir(i) = 0._rb
+            zuvcd(i) = 0._rb
+            zuvfd(i) = 0._rb
+            zuvcddir(i) = 0._rb
+            zuvfddir(i) = 0._rb
+            znicd(i) = 0._rb
+            znifd(i) = 0._rb
+            znicddir(i) = 0._rb
+            znifddir(i) = 0._rb
+         enddo
+
+         call spcvrt_sw &
+             (nlayers, istart, iend, icpr, idelm, iout, &
+              pavel, tavel, pz, tz, tbound, albdif, albdir, &
+              cldfrac, ztauc, zasyc, zomgc, ztaucorig, &
+              ztaua, zasya, zomga, cossza, coldry, wkl, adjflux, &	 
+              laytrop, layswtch, laylow, jp, jt, jt1, &
+              co2mult, colch4, colco2, colh2o, colmol, coln2o, colo2, colo3, &
+              fac00, fac01, fac10, fac11, &
+              selffac, selffrac, indself, forfac, forfrac, indfor, &
+              zbbfd, zbbfu, zbbcd, zbbcu, zuvfd, zuvcd, znifd, znicd, &
+              zbbfddir, zbbcddir, zuvfddir, zuvcddir, znifddir, znicddir)
+
+! Transfer up and down, clear and total sky fluxes to output arrays.
+! Vertical indexing goes from bottom to top; reverse here for GCM if necessary.
+
+         do i = 1, nlayers+1
+            swuflxc(iplon,i) = zbbcu(i)
+            swdflxc(iplon,i) = zbbcd(i)
+            swuflx(iplon,i) = zbbfu(i)
+            swdflx(iplon,i) = zbbfd(i)
+            uvdflx(i) = zuvfd(i)
+            nidflx(i) = znifd(i)
+!  Direct/diffuse fluxes
+            dirdflux(i) = zbbfddir(i)
+            difdflux(i) = swdflx(iplon,i) - dirdflux(i)
+!  UV/visible direct/diffuse fluxes
+            dirdnuv(i) = zuvfddir(i)
+            difdnuv(i) = zuvfd(i) - dirdnuv(i)
+!  Near-IR direct/diffuse fluxes
+            dirdnir(i) = znifddir(i)
+            difdnir(i) = znifd(i) - dirdnir(i)
+         enddo
+
+!  Total and clear sky net fluxes
+         do i = 1, nlayers+1
+            swnflxc(i) = swdflxc(iplon,i) - swuflxc(iplon,i)
+            swnflx(i) = swdflx(iplon,i) - swuflx(iplon,i)
+         enddo
+
+!  Total and clear sky heating rates
+         do i = 1, nlayers
+            zdpgcp = heatfac / pdp(i)
+            swhrc(iplon,i) = (swnflxc(i+1) - swnflxc(i)) * zdpgcp
+            swhr(iplon,i) = (swnflx(i+1) - swnflx(i)) * zdpgcp
+         enddo
+         swhrc(iplon,nlayers) = 0._rb
+         swhr(iplon,nlayers) = 0._rb
+
+! End longitude loop
+      enddo
+
+      end subroutine rrtmg_sw
+
+!*************************************************************************
+      real(kind=rb) function earth_sun(idn)
+!*************************************************************************
+!
+!  Purpose: Function to calculate the correction factor of Earth's orbit
+!  for current day of the year
+
+!  idn        : Day of the year
+!  earth_sun  : square of the ratio of mean to actual Earth-Sun distance
+
+! ------- Modules -------
+
+      use rrsw_con, only : pi
+
+      integer(kind=im), intent(in) :: idn
+
+      real(kind=rb) :: gamma
+
+      gamma = 2._rb*pi*(idn-1)/365._rb
+
+! Use Iqbal's equation 1.2.1
+
+      earth_sun = 1.000110_rb + .034221_rb * cos(gamma) + .001289_rb * sin(gamma) + &
+                   .000719_rb * cos(2._rb*gamma) + .000077_rb * sin(2._rb*gamma)
+
+      end function earth_sun
+
+!***************************************************************************
+      subroutine inatm_sw (iplon, nlay, icld, iaer, &
+            play, plev, tlay, tlev, tsfc, h2ovmr, &
+            o3vmr, co2vmr, ch4vmr, n2ovmr, o2vmr, &
+            adjes, dyofyr, scon, inflgsw, iceflgsw, liqflgsw, &
+            cldfr, taucld, ssacld, asmcld, fsfcld, cicewp, cliqwp, &
+            reice, reliq, tauaer, ssaaer, asmaer, &
+            nlayers, pavel, pz, pdp, tavel, tz, tbound, coldry, wkl, &
+            adjflux, solvar, inflag, iceflag, liqflag, cldfrac, tauc, &
+            ssac, asmc, fsfc, ciwp, clwp, rei, rel, taua, ssaa, asma)
+!***************************************************************************
+!
+!  Input atmospheric profile from GCM, and prepare it for use in RRTMG_SW.
+!  Set other RRTMG_SW input parameters.  
+!
+!***************************************************************************
+
+! --------- Modules ----------
+
+      use parrrsw, only : nbndsw, ngptsw, nstr, nmol, mxmol, &
+                          jpband, jpb1, jpb2, rrsw_scon
+      use rrsw_con, only : fluxfac, heatfac, oneminus, pi, grav, avogad
+      use rrsw_wvn, only : ng, nspa, nspb, wavenum1, wavenum2, delwave
+
+! ------- Declarations -------
+
+! ----- Input -----
+! Note: All volume mixing ratios are in dimensionless units of mole fraction obtained
+! by scaling mass mixing ratio (g/g) with the appropriate molecular weights (g/mol) 
+      integer(kind=im), intent(in) :: iplon           ! column loop index
+      integer(kind=im), intent(in) :: nlay            ! number of model layers
+      integer(kind=im), intent(in) :: icld            ! clear/cloud flag
+      integer(kind=im), intent(in) :: iaer            ! aerosol option flag
+
+      real(kind=rb), intent(in) :: play(:,:)          ! Layer pressures (hPa, mb)
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: plev(:,:)          ! Interface pressures (hPa, mb)
+                                                      ! Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tlay(:,:)          ! Layer temperatures (K)
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: tlev(:,:)          ! Interface temperatures (K)
+                                                      ! Dimensions: (ncol,nlay+1)
+      real(kind=rb), intent(in) :: tsfc(:)            ! Surface temperature (K)
+                                                      ! Dimensions: (ncol)
+      real(kind=rb), intent(in) :: h2ovmr(:,:)        ! H2O volume mixing ratio
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o3vmr(:,:)         ! O3 volume mixing ratio
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: co2vmr(:,:)        ! CO2 volume mixing ratio
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: ch4vmr(:,:)        ! Methane volume mixing ratio
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: n2ovmr(:,:)        ! Nitrous oxide volume mixing ratio
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: o2vmr(:,:)         ! Oxygen volume mixing ratio
+                                                      ! Dimensions: (ncol,nlay)
+
+      integer(kind=im), intent(in) :: dyofyr          ! Day of the year (used to get Earth/Sun
+                                                      !  distance if adjflx not provided)
+      real(kind=rb), intent(in) :: adjes              ! Flux adjustment for Earth/Sun distance
+      real(kind=rb), intent(in) :: scon               ! Solar constant (W/m2)
+
+      integer(kind=im), intent(in) :: inflgsw         ! Flag for cloud optical properties
+      integer(kind=im), intent(in) :: iceflgsw        ! Flag for ice particle specification
+      integer(kind=im), intent(in) :: liqflgsw        ! Flag for liquid droplet specification
+
+      real(kind=rb), intent(in) :: cldfr(:,:)         ! Cloud fraction
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: taucld(:,:,:)      ! In-cloud optical depth (optional)
+                                                      ! Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: ssacld(:,:,:)      ! In-cloud single scattering albedo
+                                                      ! Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: asmcld(:,:,:)      ! In-cloud asymmetry parameter
+                                                      ! Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: fsfcld(:,:,:)      ! In-cloud forward scattering fraction
+                                                      ! Dimensions: (nbndsw,ncol,nlay)
+      real(kind=rb), intent(in) :: cicewp(:,:)        ! In-cloud ice water path (g/m2)
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: cliqwp(:,:)        ! In-cloud liquid water path (g/m2)
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: reice(:,:)         ! Cloud ice effective size (microns)
+                                                      ! Dimensions: (ncol,nlay)
+      real(kind=rb), intent(in) :: reliq(:,:)         ! Cloud water drop effective radius (microns)
+                                                      ! Dimensions: (ncol,nlay)
+
+      real(kind=rb), intent(in) :: tauaer(:,:,:)      ! Aerosol optical depth
+                                                      ! Dimensions: (ncol,nlay,nbndsw)
+      real(kind=rb), intent(in) :: ssaaer(:,:,:)      ! Aerosol single scattering albedo
+                                                      ! Dimensions: (ncol,nlay,nbndsw)
+      real(kind=rb), intent(in) :: asmaer(:,:,:)      ! Aerosol asymmetry parameter
+                                                      ! Dimensions: (ncol,nlay,nbndsw)
+
+! Atmosphere
+      integer(kind=im), intent(out) :: nlayers        ! number of layers
+
+      real(kind=rb), intent(out) :: pavel(:)          ! layer pressures (mb) 
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: tavel(:)          ! layer temperatures (K)
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: pz(0:)            ! level (interface) pressures (hPa, mb)
+                                                      ! Dimensions: (0:nlay)
+      real(kind=rb), intent(out) :: tz(0:)            ! level (interface) temperatures (K)
+                                                      ! Dimensions: (0:nlay)
+      real(kind=rb), intent(out) :: tbound            ! surface temperature (K)
+      real(kind=rb), intent(out) :: pdp(:)            ! layer pressure thickness (hPa, mb)
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: coldry(:)         ! dry air column density (mol/cm2)
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: wkl(:,:)          ! molecular amounts (mol/cm-2)
+                                                      ! Dimensions: (mxmol,nlay)
+
+      real(kind=rb), intent(out) :: adjflux(:)        ! adjustment for current Earth/Sun distance
+                                                      ! Dimensions: (jpband)
+      real(kind=rb), intent(out) :: solvar(:)         ! solar constant scaling factor from rrtmg_sw
+                                                      ! Dimensions: (jpband)
+                                                      !  default value of 1368.22 Wm-2 at 1 AU
+      real(kind=rb), intent(out) :: taua(:,:)         ! Aerosol optical depth
+                                                      ! Dimensions: (nlay,nbndsw)
+      real(kind=rb), intent(out) :: ssaa(:,:)         ! Aerosol single scattering albedo
+                                                      ! Dimensions: (nlay,nbndsw)
+      real(kind=rb), intent(out) :: asma(:,:)         ! Aerosol asymmetry parameter
+                                                      ! Dimensions: (nlay,nbndsw)
+
+! Atmosphere/clouds - cldprop
+      integer(kind=im), intent(out) :: inflag         ! flag for cloud property method
+      integer(kind=im), intent(out) :: iceflag        ! flag for ice cloud properties
+      integer(kind=im), intent(out) :: liqflag        ! flag for liquid cloud properties
+
+      real(kind=rb), intent(out) :: cldfrac(:)        ! layer cloud fraction
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: tauc(:,:)         ! in-cloud optical depth (non-delta scaled)
+                                                      ! Dimensions: (nbndsw,nlay)
+      real(kind=rb), intent(out) :: ssac(:,:)         ! in-cloud single scattering albedo (non-delta-scaled)
+                                                      ! Dimensions: (nbndsw,nlay)
+      real(kind=rb), intent(out) :: asmc(:,:)         ! in-cloud asymmetry parameter (non-delta scaled)
+                                                      ! Dimensions: (nbndsw,nlay)
+      real(kind=rb), intent(out) :: fsfc(:,:)         ! in-cloud forward scattering fraction (non-delta scaled)
+                                                      ! Dimensions: (nbndsw,nlay)
+      real(kind=rb), intent(out) :: ciwp(:)           ! in-cloud ice water path
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: clwp(:)           ! in-cloud liquid water path
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: rel(:)            ! cloud liquid particle effective radius (microns)
+                                                      ! Dimensions: (nlay)
+      real(kind=rb), intent(out) :: rei(:)            ! cloud ice particle effective size (microns)
+                                                      ! Dimensions: (nlay)
+
+! ----- Local -----
+      real(kind=rb), parameter :: amd = 28.9660_rb    ! Effective molecular weight of dry air (g/mol)
+      real(kind=rb), parameter :: amw = 18.0160_rb    ! Molecular weight of water vapor (g/mol)
+!      real(kind=rb), parameter :: amc = 44.0098_rb   ! Molecular weight of carbon dioxide (g/mol)
+!      real(kind=rb), parameter :: amo = 47.9998_rb   ! Molecular weight of ozone (g/mol)
+!      real(kind=rb), parameter :: amo2 = 31.9999_rb  ! Molecular weight of oxygen (g/mol)
+!      real(kind=rb), parameter :: amch4 = 16.0430_rb ! Molecular weight of methane (g/mol)
+!      real(kind=rb), parameter :: amn2o = 44.0128_rb ! Molecular weight of nitrous oxide (g/mol)
+
+! Set molecular weight ratios (for converting mmr to vmr)
+!  e.g. h2ovmr = h2ommr * amdw)
+      real(kind=rb), parameter :: amdw = 1.607793_rb  ! Molecular weight of dry air / water vapor
+      real(kind=rb), parameter :: amdc = 0.658114_rb  ! Molecular weight of dry air / carbon dioxide
+      real(kind=rb), parameter :: amdo = 0.603428_rb  ! Molecular weight of dry air / ozone
+      real(kind=rb), parameter :: amdm = 1.805423_rb  ! Molecular weight of dry air / methane
+      real(kind=rb), parameter :: amdn = 0.658090_rb  ! Molecular weight of dry air / nitrous oxide
+      real(kind=rb), parameter :: amdo2 = 0.905140_rb ! Molecular weight of dry air / oxygen
+
+      real(kind=rb), parameter :: sbc = 5.67e-08_rb   ! Stefan-Boltzmann constant (W/m2K4)
+
+      integer(kind=im) :: isp, l, ix, n, imol, ib       ! Loop indices
+      real(kind=rb) :: amm, summol                      ! 
+      real(kind=rb) :: adjflx                           ! flux adjustment for Earth/Sun distance
+!      real(kind=rb) :: earth_sun                        ! function for Earth/Sun distance adjustment
+
+! Add one to nlayers here to include extra model layer at top of atmosphere
+      nlayers = nlay
+
+!  Initialize all molecular amounts to zero here, then pass input amounts
+!  into RRTM array WKL below.
+
+      wkl(:,:) = 0.0_rb
+      cldfrac(:) = 0.0_rb
+      tauc(:,:) = 0.0_rb
+      ssac(:,:) = 1.0_rb
+      asmc(:,:) = 0.0_rb
+      fsfc(:,:) = 0.0_rb
+      ciwp(:) = 0.0_rb
+      clwp(:) = 0.0_rb
+      rei(:) = 0.0_rb
+      rel(:) = 0.0_rb
+      taua(:,:) = 0.0_rb
+      ssaa(:,:) = 1.0_rb
+      asma(:,:) = 0.0_rb
+ 
+! Set flux adjustment for current Earth/Sun distance (two options).
+! 1) Use Earth/Sun distance flux adjustment provided by GCM (input as adjes);
+      adjflx = adjes
+!
+! 2) Calculate Earth/Sun distance from DYOFYR, the cumulative day of the year.
+!    (Set adjflx to 1. to use constant Earth/Sun distance of 1 AU). 
+      if (dyofyr .gt. 0) then
+         adjflx = earth_sun(dyofyr)
+      endif
+
+! Set incoming solar flux adjustment to include adjustment for
+! current Earth/Sun distance (ADJFLX) and scaling of default internal
+! solar constant (rrsw_scon = 1368.22 Wm-2) by band (SOLVAR).  SOLVAR can be set 
+! to a single scaling factor as needed, or to a different value in each 
+! band, which may be necessary for paleoclimate simulations. 
+! 
+      do ib = jpb1,jpb2
+!         solvar(ib) = 1._rb
+         solvar(ib) = scon / rrsw_scon
+         adjflux(ib) = adjflx * solvar(ib)
+      enddo
+
+!  Set surface temperature.
+      tbound = tsfc(iplon)
+
+!  Install input GCM arrays into RRTMG_SW arrays for pressure, temperature,
+!  and molecular amounts.  
+!  Pressures are input in mb, or are converted to mb here.
+!  Molecular amounts are input in volume mixing ratio, or are converted from 
+!  mass mixing ratio (or specific humidity for h2o) to volume mixing ratio
+!  here. These are then converted to molecular amount (molec/cm2) below.  
+!  The dry air column COLDRY (in molec/cm2) is calculated from the level 
+!  pressures, pz (in mb), based on the hydrostatic equation and includes a 
+!  correction to account for h2o in the layer.  The molecular weight of moist 
+!  air (amm) is calculated for each layer.  
+!  Note: In RRTMG, layer indexing goes from bottom to top, and coding below
+!  assumes GCM input fields are also bottom to top. Input layer indexing
+!  from GCM fields should be reversed here if necessary.
+
+      pz(0) = plev(iplon,1)
+      tz(0) = tlev(iplon,1)
+      do l = 1, nlayers
+         pavel(l) = play(iplon,l)
+         tavel(l) = tlay(iplon,l)
+         pz(l) = plev(iplon,l+1)
+         tz(l) = tlev(iplon,l+1)
+         pdp(l) = pz(l-1) - pz(l)
+! For h2o input in vmr:
+         wkl(1,l) = h2ovmr(iplon,l)
+! For h2o input in mmr:
+!         wkl(1,l) = h2o(iplon,l)*amdw
+! For h2o input in specific humidity;
+!         wkl(1,l) = (h2o(iplon,l)/(1._rb - h2o(iplon,l)))*amdw
+         wkl(2,l) = co2vmr(iplon,l)
+         wkl(3,l) = o3vmr(iplon,l)
+         wkl(4,l) = n2ovmr(iplon,l)
+         wkl(6,l) = ch4vmr(iplon,l)
+         wkl(7,l) = o2vmr(iplon,l)
+         amm = (1._rb - wkl(1,l)) * amd + wkl(1,l) * amw            
+         coldry(l) = (pz(l-1)-pz(l)) * 1.e3_rb * avogad / &
+                     (1.e2_rb * grav * amm * (1._rb + wkl(1,l)))
+      enddo
+
+! The following section can be used to set values for an additional layer (from
+! the GCM top level to 1.e-4 mb) for improved calculation of TOA fluxes. 
+! Temperature and molecular amounts in the extra model layer are set to 
+! their values in the top GCM model layer, though these can be modified
+! here if necessary. 
+! If this feature is utilized, increase nlayers by one above, limit the two
+! loops above to (nlayers-1), and set the top most (nlayers) layer values here. 
+
+!      pavel(nlayers) = 0.5_rb * pz(nlayers-1)
+!      tavel(nlayers) = tavel(nlayers-1)
+!      pz(nlayers) = 1.e-4_rb
+!      tz(nlayers-1) = 0.5_rb * (tavel(nlayers)+tavel(nlayers-1))
+!      tz(nlayers) = tz(nlayers-1)
+!      pdp(nlayers) = pz(nlayers-1) - pz(nlayers)
+!      wkl(1,nlayers) = wkl(1,nlayers-1)
+!      wkl(2,nlayers) = wkl(2,nlayers-1)
+!      wkl(3,nlayers) = wkl(3,nlayers-1)
+!      wkl(4,nlayers) = wkl(4,nlayers-1)
+!      wkl(6,nlayers) = wkl(6,nlayers-1)
+!      wkl(7,nlayers) = wkl(7,nlayers-1)
+!      amm = (1._rb - wkl(1,nlayers-1)) * amd + wkl(1,nlayers-1) * amw
+!      coldry(nlayers) = (pz(nlayers-1)) * 1.e3_rb * avogad / &
+!                        (1.e2_rb * grav * amm * (1._rb + wkl(1,nlayers-1)))
+
+! At this point all molecular amounts in wkl are in volume mixing ratio; 
+! convert to molec/cm2 based on coldry for use in rrtm.  
+
+      do l = 1, nlayers
+         do imol = 1, nmol
+            wkl(imol,l) = coldry(l) * wkl(imol,l)
+         enddo
+      enddo
+
+! Transfer aerosol optical properties to RRTM variables;
+! modify to reverse layer indexing here if necessary.
+
+      if (iaer .ge. 1) then 
+         do l = 1, nlayers
+            do ib = 1, nbndsw
+               taua(l,ib) = tauaer(iplon,l,ib)
+               ssaa(l,ib) = ssaaer(iplon,l,ib)
+               asma(l,ib) = asmaer(iplon,l,ib)
+            enddo
+         enddo
+      endif
+
+! Transfer cloud fraction and cloud optical properties to RRTM variables;
+! modify to reverse layer indexing here if necessary.
+
+      if (icld .ge. 1) then 
+         inflag = inflgsw
+         iceflag = iceflgsw
+         liqflag = liqflgsw
+
+! Move incoming GCM cloud arrays to RRTMG cloud arrays.
+! For GCM input, incoming reice is defined based on selected ice parameterization (inflglw)
+
+         do l = 1, nlayers
+            cldfrac(l) = cldfr(iplon,l)
+            ciwp(l) = cicewp(iplon,l)
+            clwp(l) = cliqwp(iplon,l)
+            rei(l) = reice(iplon,l)
+            rel(l) = reliq(iplon,l)
+            do n = 1,nbndsw
+               tauc(n,l) = taucld(n,iplon,l)
+               ssac(n,l) = ssacld(n,iplon,l)
+               asmc(n,l) = asmcld(n,iplon,l)
+               fsfc(n,l) = fsfcld(n,iplon,l)
+            enddo
+         enddo
+
+! If an extra layer is being used in RRTMG, set all cloud properties to zero in the extra layer.
+
+!         cldfrac(nlayers) = 0.0_rb
+!         tauc(:,nlayers) = 0.0_rb
+!         ssac(:,nlayers) = 1.0_rb
+!         asmc(:,nlayers) = 0.0_rb
+!         fsfc(:,nlayers) = 0.0_rb
+!         ciwp(nlayers) = 0.0_rb
+!         clwp(nlayers) = 0.0_rb
+!         rei(nlayers) = 0.0_rb
+!         rel(nlayers) = 0.0_rb
+      
+      endif
+
+      end subroutine inatm_sw
+
+      end module rrtmg_sw_rad
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_read_nc.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_read_nc.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_read_nc.f90	(revision 3477)
@@ -0,0 +1,796 @@
+!     path:      $Source$
+!     author:    $Author: mike $
+!     revision:  $Revision: 11660 $
+!     created:   $Date: 2009-05-22 18:20:11 -0400 (Fri, 22 May 2009) $
+
+!=============================================================================== 
+! rrtmg_read_nc.f90
+!
+! Description: This program reads all of the RRTM shortwave data from a NetCDF
+!              file in band by band subroutines, as a replacement for the 
+!              rrtmg_sw_k_g.f90 data statements.
+!
+! Written By: Patrick Hofmann
+! Last Update: 4/3/2009
+!===============================================================================
+
+!*******************************************************************************
+subroutine sw_kgb16
+	use rrsw_kg16, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, no16
+	use rrsw_ncpar
+	use netcdf
+	
+	implicit none
+	save 
+	
+	integer(kind=im), parameter :: bandNumber = 1, numGPoints = no16
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+	 
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+													 
+	status(14) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 16 variables from file" 
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb16
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb17
+        use rrsw_kg17, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, no17
+	use rrsw_ncpar
+	use netcdf
+    
+        implicit none
+        save
+		
+   	integer(kind=im), parameter :: bandNumber = 2
+	integer(kind=im), parameter :: numGPoints = no17
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionUpperAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keyupper,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keyupper,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo(1:3,:), start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+													 
+	status(14) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsUpperAtmos",varID)
+	status(15) = nf90_get_var(ncid, varID, forrefo(4,:), start = (/2,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,numGPoints,1,1/))	
+	
+	status(14) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 17 variables from file"
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb17
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb18
+	use rrsw_kg18, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, no18
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+        integer(kind=im), parameter :: bandNumber = 3
+	integer(kind=im), parameter :: numGPoints = no18
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+	
+	status(14) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 18 variables from file"
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb18
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb19
+        use rrsw_kg19, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, no19
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+		
+        integer(kind=im), parameter :: bandNumber = 4
+	integer(kind=im), parameter :: numGPoints = no19
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+	
+	status(14) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 19 variables from file"
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb19
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb20
+        use rrsw_kg20, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, absch4o, no20
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    
+        integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 5
+	integer(kind=im), parameter :: numGPoints = no20
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo(1:3,:), start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+													 
+	status(14) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsUpperAtmos",varID)
+	status(15) = nf90_get_var(ncid, varID, forrefo(4,:), start = (/2,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,numGPoints,1,1/))												 
+													 
+	!Get absorber index for CH4
+	call getAbsorberIndex('CH4',ab)
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, absch4o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+																				 
+	status(16) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 20 variables from file"																		 
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb20
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb21
+        use rrsw_kg21, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, no21
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+        integer(kind=im), parameter :: bandNumber = 6
+	integer(kind=im), parameter :: numGPoints = no21
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keyupper,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo(1:3,:), start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+													 
+	status(14) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsUpperAtmos",varID)
+	status(15) = nf90_get_var(ncid, varID, forrefo(4,:), start = (/2,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,numGPoints,1,1/))			
+													 
+	status(14) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 21 variables from file"
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb21
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb22	
+        use rrsw_kg22, only: sfluxrefo, kao, kbo, selfrefo, forrefo, rayl, no22
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+   	integer(kind=im), parameter :: bandNumber = 7
+	integer(kind=im), parameter :: numGPoints = no22
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+	
+	status(14) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 22 variables from file"
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb22
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb23		
+        use rrsw_kg23, only: sfluxrefo, kao, selfrefo, forrefo, raylo, no23
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+        integer(kind=im), parameter :: bandNumber = 8
+	integer(kind=im), parameter :: numGPoints = no23
+        integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+        status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, raylo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	 
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(9)  = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(11) = nf90_get_var(ncid, varID, forrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+	
+	status(12) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 23 variables from file"
+	
+end subroutine sw_kgb23
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb24	
+        use rrsw_kg24, only: sfluxrefo, kao, kbo, selfrefo, forrefo, &
+						 raylao, raylbo, abso3ao, abso3bo, no24
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+        integer(kind=im) :: ab
+        integer(kind=im), parameter :: bandNumber = 9
+	integer(kind=im), parameter :: numGPoints = no24
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, raylao, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keylower,1,1/))
+	 
+	status(6)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsUpperAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, raylbo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+		
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(11) = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(13) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(14) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(15) = nf90_get_var(ncid, varID, forrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+	
+	!Get absorber index for O3
+	call getAbsorberIndex('O3',ab)
+	status(16) = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(17) = nf90_get_var(ncid, varID, abso3ao, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,numGPoints,1,1,1/))
+	status(18) = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(19) = nf90_get_var(ncid, varID, abso3bo, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,numGPoints,1,1,1/))
+											
+	status(20) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 24 variables from file"
+	
+end subroutine sw_kgb24
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb25		
+        use rrsw_kg25, only: sfluxrefo, kao, raylo, abso3ao, abso3bo, no25
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    	
+        integer(kind=im) :: ab	
+   	integer(kind=im), parameter :: bandNumber = 10
+	integer(kind=im), parameter :: numGPoints = no25
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, raylo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	 
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	!Get absorber index for O3
+	call getAbsorberIndex('O3',ab)
+	status(8)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, abso3ao, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,numGPoints,1,1,1/))
+	status(10) = nf90_inq_varid(ncid,"AbsorptionCoefficientsUpperAtmos",varID)
+	status(11) = nf90_get_var(ncid, varID, abso3bo, &
+                     start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,numGPoints,1,1,1/))
+											
+	status(12) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 25 variables from file"
+	
+end subroutine sw_kgb25
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb26
+        use rrsw_kg26, only: sfluxrefo, raylo, no26
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+	integer(kind=im), parameter :: bandNumber = 11
+	integer(kind=im), parameter :: numGPoints = no26
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, raylo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	 
+	status(6)  = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 26 variables from file"										
+	
+end subroutine sw_kgb26
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb27
+        use rrsw_kg27, only: sfluxrefo, kao, kbo, raylo, no27
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+		
+	integer(kind=im), parameter :: bandNumber = 12
+	integer(kind=im), parameter :: numGPoints = no27
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, raylo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 27 variables from file"	
+	
+end subroutine sw_kgb27
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb28		
+        use rrsw_kg28, only: sfluxrefo, kao, kbo, rayl, no28
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+    
+	integer(kind=im), parameter :: bandNumber = 13
+	integer(kind=im), parameter :: numGPoints = no28  
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionUpperAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,keyupper,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keylower,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/keyupper,Tdiff,pupper,numGPoints,1,1/))
+				
+	status(10) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 28 variables from file"										
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb28
+!*******************************************************************************
+
+!*******************************************************************************
+subroutine sw_kgb29	
+        use rrsw_kg29, only: sfluxrefo, kao, kbo, selfrefo, forrefo, &
+						 absh2oo, absco2o, rayl, no29
+	use rrsw_ncpar
+	use netcdf
+	
+        implicit none
+        save
+	
+	integer(kind=im) :: ab
+	integer(kind=im), parameter :: bandNumber = 14
+	integer(kind=im), parameter :: numGPoints = no29
+	integer(kind=im), parameter :: gPointSetNumber = 1
+	integer(kind=im) :: ncid, varID
+	
+	real(kind=rb) :: ncrayl(1)
+	
+	status(:)  = nf90_NoErr
+	status(1)  = nf90_open('rrtmg_sw.nc',nf90_nowrite,ncid)
+	
+	status(2)  = nf90_inq_varid(ncid,"SolarSourceFunctionLowerAtmos",varID)
+	status(3)  = nf90_get_var(ncid, varID, sfluxrefo, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/numGPoints,1,1,1/))
+	
+	status(4)  = nf90_inq_varid(ncid,"RayleighExtinctionCoefficientsLowerAtmos",varID)
+	status(5)  = nf90_get_var(ncid, varID, ncrayl, &
+                     start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,1,1,1/))
+		
+	status(6)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsLowerAtmos",varID)
+	status(7)  = nf90_get_var(ncid, varID, kao, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,plower,numGPoints,1,1/))
+	
+	status(8)  = nf90_inq_varid(ncid,"KeySpeciesAbsorptionCoefficientsUpperAtmos",varID)
+	status(9)  = nf90_get_var(ncid, varID, kbo, &
+                     start = (/1,1,1,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,Tdiff,pupper,numGPoints,1,1/))
+	
+	status(10) = nf90_inq_varid(ncid,"H2OSelfAbsorptionCoefficients",varID)
+	status(11) = nf90_get_var(ncid, varID, selfrefo, start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tself,numGPoints,1,1/))
+	
+	status(12) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsLowerAtmos",varID)
+	status(13) = nf90_get_var(ncid, varID, forrefo(1:3,:), start = (/1,1,bandNumber,gPointSetNumber/), &
+                     count = (/Tforeignlower,numGPoints,1,1/))
+													 
+	status(14) = nf90_inq_varid(ncid,"H2OForeignAbsorptionCoefficientsUpperAtmos",varID)
+	status(15) = nf90_get_var(ncid, varID, forrefo(4,:), start = (/2,1,bandNumber,gPointSetNumber/), &
+                     count = (/1,numGPoints,1,1/))	
+	
+	!Get absorber index for H2O
+	call getAbsorberIndex('H2O',ab)
+	status(16)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(17)  = nf90_get_var(ncid, varID, absh2oo, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+							
+	!Get absorber index for CO2
+	call getAbsorberIndex('CO2',ab)
+	status(18)  = nf90_inq_varid(ncid,"AbsorptionCoefficientsLowerAtmos",varID)
+	status(19)  = nf90_get_var(ncid, varID, absco2o, &
+                      start = (/1,1,1,ab,bandNumber,gPointSetNumber/), &
+                      count = (/1,1,numGPoints,1,1,1/))
+	
+	status(18) = nf90_close(ncid)
+	
+	if(any(status(:) /= nf90_NoErr)) stop  "Error reading band 29 variables from file"	
+	
+	rayl = ncrayl(1)
+	
+end subroutine sw_kgb29
+!*******************************************************************************
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_reftra.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_reftra.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_reftra.f90	(revision 3477)
@@ -0,0 +1,308 @@
+!     path:      $Source$
+!     author:    $Author: mike $
+!     revision:  $Revision: 11661 $
+!     created:   $Date: 2009-05-22 18:22:22 -0400 (Fri, 22 May 2009) $
+
+      module rrtmg_sw_reftra
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use rrsw_tbl, only : tblint, bpade, od_lo, exp_tbl
+      use rrsw_vsn, only : hvrrft, hnamrft
+
+      implicit none
+
+      contains
+
+! --------------------------------------------------------------------
+      subroutine reftra_sw(nlayers, lrtchk, pgg, prmuz, ptau, pw, &
+                           pref, prefd, ptra, ptrad)
+! --------------------------------------------------------------------
+  
+! Purpose: computes the reflectivity and transmissivity of a clear or 
+!   cloudy layer using a choice of various approximations.
+!
+! Interface:  *rrtmg_sw_reftra* is called by *rrtmg_sw_spcvrt*
+!
+! Description:
+! explicit arguments :
+! --------------------
+! inputs
+! ------ 
+!      lrtchk  = .t. for all layers in clear profile
+!      lrtchk  = .t. for cloudy layers in cloud profile 
+!              = .f. for clear layers in cloud profile
+!      pgg     = assymetry factor
+!      prmuz   = cosine solar zenith angle
+!      ptau    = optical thickness
+!      pw      = single scattering albedo
+!
+! outputs
+! -------
+!      pref    : collimated beam reflectivity
+!      prefd   : diffuse beam reflectivity 
+!      ptra    : collimated beam transmissivity
+!      ptrad   : diffuse beam transmissivity
+!
+!
+! Method:
+! -------
+!      standard delta-eddington, p.i.f.m., or d.o.m. layer calculations.
+!      kmodts  = 1 eddington (joseph et al., 1976)
+!              = 2 pifm (zdunkowski et al., 1980)
+!              = 3 discrete ordinates (liou, 1973)
+!
+!
+! Modifications:
+! --------------
+! Original: J-JMorcrette, ECMWF, Feb 2003
+! Revised for F90 reformatting: MJIacono, AER, Jul 2006
+! Revised to add exponential lookup table: MJIacono, AER, Aug 2007
+!
+! ------------------------------------------------------------------
+
+! ------- Declarations ------
+
+! ------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers
+
+      logical, intent(in) :: lrtchk(:)                         ! Logical flag for reflectivity and
+                                                               ! and transmissivity calculation; 
+                                                               !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: pgg(:)                      ! asymmetry parameter
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: ptau(:)                     ! optical depth
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: pw(:)                       ! single scattering albedo 
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: prmuz                       ! cosine of solar zenith angle
+
+! ------- Output -------
+
+      real(kind=rb), intent(inout) :: pref(:)                  ! direct beam reflectivity
+                                                               !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(inout) :: prefd(:)                 ! diffuse beam reflectivity
+                                                               !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(inout) :: ptra(:)                  ! direct beam transmissivity
+                                                               !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(inout) :: ptrad(:)                 ! diffuse beam transmissivity
+                                                               !   Dimensions: (nlayers+1)
+
+! ------- Local -------
+
+      integer(kind=im) :: jk, jl, kmodts
+      integer(kind=im) :: itind
+
+      real(kind=rb) :: tblind
+      real(kind=rb) :: za, za1, za2
+      real(kind=rb) :: zbeta, zdend, zdenr, zdent
+      real(kind=rb) :: ze1, ze2, zem1, zem2, zemm, zep1, zep2
+      real(kind=rb) :: zg, zg3, zgamma1, zgamma2, zgamma3, zgamma4, zgt
+      real(kind=rb) :: zr1, zr2, zr3, zr4, zr5
+      real(kind=rb) :: zrk, zrk2, zrkg, zrm1, zrp, zrp1, zrpp
+      real(kind=rb) :: zsr3, zt1, zt2, zt3, zt4, zt5, zto1
+      real(kind=rb) :: zw, zwcrit, zwo
+
+      real(kind=rb), parameter :: eps = 1.e-08_rb
+
+!     ------------------------------------------------------------------
+
+! Initialize
+
+      hvrrft = '$Revision: 11661 $'
+
+      zsr3=sqrt(3._rb)
+      zwcrit=0.9999995_rb
+      kmodts=2
+
+      do jk=1, nlayers
+         if (.not.lrtchk(jk)) then
+            pref(jk) =0._rb
+            ptra(jk) =1._rb
+            prefd(jk)=0._rb
+            ptrad(jk)=1._rb
+         else
+            zto1=ptau(jk)
+            zw  =pw(jk)
+            zg  =pgg(jk)  
+
+! General two-stream expressions
+
+            zg3= 3._rb * zg
+            if (kmodts == 1) then
+               zgamma1= (7._rb - zw * (4._rb + zg3)) * 0.25_rb
+               zgamma2=-(1._rb - zw * (4._rb - zg3)) * 0.25_rb
+               zgamma3= (2._rb - zg3 * prmuz ) * 0.25_rb
+            else if (kmodts == 2) then  
+               zgamma1= (8._rb - zw * (5._rb + zg3)) * 0.25_rb
+               zgamma2=  3._rb *(zw * (1._rb - zg )) * 0.25_rb
+               zgamma3= (2._rb - zg3 * prmuz ) * 0.25_rb
+            else if (kmodts == 3) then  
+               zgamma1= zsr3 * (2._rb - zw * (1._rb + zg)) * 0.5_rb
+               zgamma2= zsr3 * zw * (1._rb - zg ) * 0.5_rb
+               zgamma3= (1._rb - zsr3 * zg * prmuz ) * 0.5_rb
+            end if
+            zgamma4= 1._rb - zgamma3
+    
+! Recompute original s.s.a. to test for conservative solution
+
+            zwo= zw / (1._rb - (1._rb - zw) * (zg / (1._rb - zg))**2)
+    
+            if (zwo >= zwcrit) then
+! Conservative scattering
+
+               za  = zgamma1 * prmuz 
+               za1 = za - zgamma3
+               zgt = zgamma1 * zto1
+        
+! Homogeneous reflectance and transmittance,
+! collimated beam
+
+               ze1 = min ( zto1 / prmuz , 500._rb)
+!               ze2 = exp( -ze1 )
+
+! Use exponential lookup table for transmittance, or expansion of 
+! exponential for low tau
+               if (ze1 .le. od_lo) then 
+                  ze2 = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+               else
+                  tblind = ze1 / (bpade + ze1)
+                  itind = tblint * tblind + 0.5_rb
+                  ze2 = exp_tbl(itind)
+               endif
+!
+
+               pref(jk) = (zgt - za1 * (1._rb - ze2)) / (1._rb + zgt)
+               ptra(jk) = 1._rb - pref(jk)
+
+! isotropic incidence
+
+               prefd(jk) = zgt / (1._rb + zgt)
+               ptrad(jk) = 1._rb - prefd(jk)        
+
+! This is applied for consistency between total (delta-scaled) and direct (unscaled) 
+! calculations at very low optical depths (tau < 1.e-4) when the exponential lookup
+! table returns a transmittance of 1.0.
+               if (ze2 .eq. 1.0_rb) then 
+                  pref(jk) = 0.0_rb
+                  ptra(jk) = 1.0_rb
+                  prefd(jk) = 0.0_rb
+                  ptrad(jk) = 1.0_rb
+               endif
+
+            else
+! Non-conservative scattering
+
+               za1 = zgamma1 * zgamma4 + zgamma2 * zgamma3
+               za2 = zgamma1 * zgamma3 + zgamma2 * zgamma4
+               zrk = sqrt ( zgamma1**2 - zgamma2**2)
+               zrp = zrk * prmuz               
+               zrp1 = 1._rb + zrp
+               zrm1 = 1._rb - zrp
+               zrk2 = 2._rb * zrk
+               zrpp = 1._rb - zrp*zrp
+               zrkg = zrk + zgamma1
+               zr1  = zrm1 * (za2 + zrk * zgamma3)
+               zr2  = zrp1 * (za2 - zrk * zgamma3)
+               zr3  = zrk2 * (zgamma3 - za2 * prmuz )
+               zr4  = zrpp * zrkg
+               zr5  = zrpp * (zrk - zgamma1)
+               zt1  = zrp1 * (za1 + zrk * zgamma4)
+               zt2  = zrm1 * (za1 - zrk * zgamma4)
+               zt3  = zrk2 * (zgamma4 + za1 * prmuz )
+               zt4  = zr4
+               zt5  = zr5
+
+! mji - reformulated code to avoid potential floating point exceptions
+!               zbeta = - zr5 / zr4
+               zbeta = (zgamma1 - zrk) / zrkg
+!!
+        
+! Homogeneous reflectance and transmittance
+
+               ze1 = min ( zrk * zto1, 500._rb)
+               ze2 = min ( zto1 / prmuz , 500._rb)
+!
+! Original
+!              zep1 = exp( ze1 )
+!              zem1 = exp(-ze1 )
+!              zep2 = exp( ze2 )
+!              zem2 = exp(-ze2 )
+!
+! Revised original, to reduce exponentials
+!              zep1 = exp( ze1 )
+!              zem1 = 1._rb / zep1
+!              zep2 = exp( ze2 )
+!              zem2 = 1._rb / zep2
+!
+! Use exponential lookup table for transmittance, or expansion of 
+! exponential for low tau
+               if (ze1 .le. od_lo) then 
+                  zem1 = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+                  zep1 = 1._rb / zem1
+               else
+                  tblind = ze1 / (bpade + ze1)
+                  itind = tblint * tblind + 0.5_rb
+                  zem1 = exp_tbl(itind)
+                  zep1 = 1._rb / zem1
+               endif
+
+               if (ze2 .le. od_lo) then 
+                  zem2 = 1._rb - ze2 + 0.5_rb * ze2 * ze2
+                  zep2 = 1._rb / zem2
+               else
+                  tblind = ze2 / (bpade + ze2)
+                  itind = tblint * tblind + 0.5_rb
+                  zem2 = exp_tbl(itind)
+                  zep2 = 1._rb / zem2
+               endif
+
+! collimated beam
+
+! mji - reformulated code to avoid potential floating point exceptions
+!               zdenr = zr4*zep1 + zr5*zem1
+!               pref(jk) = zw * (zr1*zep1 - zr2*zem1 - zr3*zem2) / zdenr
+!               zdent = zt4*zep1 + zt5*zem1
+!               ptra(jk) = zem2 - zem2 * zw * (zt1*zep1 - zt2*zem1 - zt3*zep2) / zdent
+
+               zdenr = zr4*zep1 + zr5*zem1
+               zdent = zt4*zep1 + zt5*zem1
+               if (zdenr .ge. -eps .and. zdenr .le. eps) then
+                  pref(jk) = eps
+                  ptra(jk) = zem2
+               else 
+                  pref(jk) = zw * (zr1*zep1 - zr2*zem1 - zr3*zem2) / zdenr
+                  ptra(jk) = zem2 - zem2 * zw * (zt1*zep1 - zt2*zem1 - zt3*zep2) / zdent
+               endif
+!!
+
+! diffuse beam
+
+               zemm = zem1*zem1
+               zdend = 1._rb / ( (1._rb - zbeta*zemm ) * zrkg)
+               prefd(jk) =  zgamma2 * (1._rb - zemm) * zdend
+               ptrad(jk) =  zrk2*zem1*zdend
+
+            endif
+
+         endif         
+
+      enddo    
+
+      end subroutine reftra_sw
+
+      end module rrtmg_sw_reftra
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_setcoef.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_setcoef.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_setcoef.f90	(revision 3477)
@@ -0,0 +1,347 @@
+!     path:      $Source$
+!     author:    $Author: miacono $
+!     revision:  $Revision: 23308 $
+!     created:   $Date: 2013-12-27 17:23:51 -0500 (Fri, 27 Dec 2013) $
+
+      module rrtmg_sw_setcoef
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : mxmol
+      use rrsw_ref, only : pref, preflog, tref
+      use rrsw_vsn, only : hvrset, hnamset
+
+      implicit none
+
+      contains
+
+!----------------------------------------------------------------------------
+      subroutine setcoef_sw(nlayers, pavel, tavel, pz, tz, tbound, coldry, wkl, &
+                            laytrop, layswtch, laylow, jp, jt, jt1, &
+                            co2mult, colch4, colco2, colh2o, colmol, coln2o, &
+                            colo2, colo3, fac00, fac01, fac10, fac11, &
+                            selffac, selffrac, indself, forfac, forfrac, indfor)
+!----------------------------------------------------------------------------
+!
+! Purpose:  For a given atmosphere, calculate the indices and
+! fractions related to the pressure and temperature interpolations.
+
+! Modifications:
+! Original: J. Delamere, AER, Inc. (version 2.5, 02/04/01)
+! Revised: Rewritten and adapted to ECMWF F90, JJMorcrette 030224
+! Revised: For uniform rrtmg formatting, MJIacono, Jul 2006
+
+! ------ Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers         ! total number of layers
+
+      real(kind=rb), intent(in) :: pavel(:)           ! layer pressures (mb) 
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tavel(:)           ! layer temperatures (K)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: pz(0:)             ! level (interface) pressures (hPa, mb)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tz(0:)             ! level (interface) temperatures (K)
+                                                      !    Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tbound             ! surface temperature (K)
+      real(kind=rb), intent(in) :: coldry(:)          ! dry air column density (mol/cm2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: wkl(:,:)           ! molecular amounts (mol/cm-2)
+                                                      !    Dimensions: (mxmol,nlayers)
+
+! ----- Output -----
+      integer(kind=im), intent(out) :: laytrop        ! tropopause layer index
+      integer(kind=im), intent(out) :: layswtch       ! 
+      integer(kind=im), intent(out) :: laylow         ! 
+
+      integer(kind=im), intent(out) :: jp(:)          ! 
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(out) :: jt(:)          !
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(out) :: jt1(:)         !
+                                                      !    Dimensions: (nlayers)
+
+      real(kind=rb), intent(out) :: colh2o(:)         ! column amount (h2o)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colco2(:)         ! column amount (co2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colo3(:)          ! column amount (o3)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: coln2o(:)         ! column amount (n2o)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colch4(:)         ! column amount (ch4)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colo2(:)          ! column amount (o2)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: colmol(:)         ! 
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: co2mult(:)        !
+                                                      !    Dimensions: (nlayers)
+
+      integer(kind=im), intent(out) :: indself(:)
+                                                      !    Dimensions: (nlayers)
+      integer(kind=im), intent(out) :: indfor(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: selffac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: selffrac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: forfac(:)
+                                                      !    Dimensions: (nlayers)
+      real(kind=rb), intent(out) :: forfrac(:)
+                                                      !    Dimensions: (nlayers)
+
+      real(kind=rb), intent(out) :: &                 !
+                         fac00(:), fac01(:), &        !    Dimensions: (nlayers)
+                         fac10(:), fac11(:) 
+
+! ----- Local -----
+
+      integer(kind=im) :: indbound
+      integer(kind=im) :: indlev0
+      integer(kind=im) :: lay
+      integer(kind=im) :: jp1
+
+      real(kind=rb) :: stpfac
+      real(kind=rb) :: tbndfrac
+      real(kind=rb) :: t0frac
+      real(kind=rb) :: plog
+      real(kind=rb) :: fp
+      real(kind=rb) :: ft
+      real(kind=rb) :: ft1
+      real(kind=rb) :: water
+      real(kind=rb) :: scalefac
+      real(kind=rb) :: factor
+      real(kind=rb) :: co2reg
+      real(kind=rb) :: compfp
+
+
+! Initializations
+      stpfac = 296._rb/1013._rb
+
+      indbound = tbound - 159._rb
+      tbndfrac = tbound - int(tbound)
+      indlev0  = tz(0) - 159._rb
+      t0frac   = tz(0) - int(tz(0))
+
+      laytrop  = 0
+      layswtch = 0
+      laylow   = 0
+
+! Begin layer loop
+      do lay = 1, nlayers
+! Find the two reference pressures on either side of the
+! layer pressure.  Store them in JP and JP1.  Store in FP the
+! fraction of the difference (in ln(pressure)) between these
+! two values that the layer pressure lies.
+
+         plog = log(pavel(lay))
+         jp(lay) = int(36._rb - 5*(plog+0.04_rb))
+         if (jp(lay) .lt. 1) then
+            jp(lay) = 1
+         elseif (jp(lay) .gt. 58) then
+            jp(lay) = 58
+         endif
+         jp1 = jp(lay) + 1
+         fp = 5._rb * (preflog(jp(lay)) - plog)
+
+! Determine, for each reference pressure (JP and JP1), which
+! reference temperature (these are different for each  
+! reference pressure) is nearest the layer temperature but does
+! not exceed it.  Store these indices in JT and JT1, resp.
+! Store in FT (resp. FT1) the fraction of the way between JT
+! (JT1) and the next highest reference temperature that the 
+! layer temperature falls.
+
+         jt(lay) = int(3._rb + (tavel(lay)-tref(jp(lay)))/15._rb)
+         if (jt(lay) .lt. 1) then
+            jt(lay) = 1
+         elseif (jt(lay) .gt. 4) then
+            jt(lay) = 4
+         endif
+         ft = ((tavel(lay)-tref(jp(lay)))/15._rb) - real((jt(lay)-3),kind=rb)
+         jt1(lay) = int(3._rb + (tavel(lay)-tref(jp1))/15._rb)
+         if (jt1(lay) .lt. 1) then
+            jt1(lay) = 1
+         elseif (jt1(lay) .gt. 4) then
+            jt1(lay) = 4
+         endif
+         ft1 = ((tavel(lay)-tref(jp1))/15._rb) - real((jt1(lay)-3),kind=rb)
+
+         water = wkl(1,lay)/coldry(lay)
+         scalefac = pavel(lay) * stpfac / tavel(lay)
+
+! If the pressure is less than ~100mb, perform a different
+! set of species interpolations.
+
+         if (plog .le. 4.56_rb) go to 5300
+         laytrop =  laytrop + 1
+         if (plog .ge. 6.62_rb) laylow = laylow + 1
+
+! Set up factors needed to separately include the water vapor
+! foreign-continuum in the calculation of absorption coefficient.
+
+         forfac(lay) = scalefac / (1.+water)
+         factor = (332.0_rb-tavel(lay))/36.0_rb
+         indfor(lay) = min(2, max(1, int(factor)))
+         forfrac(lay) = factor - real(indfor(lay),kind=rb)
+
+! Set up factors needed to separately include the water vapor
+! self-continuum in the calculation of absorption coefficient.
+
+         selffac(lay) = water * forfac(lay)
+         factor = (tavel(lay)-188.0_rb)/7.2_rb
+         indself(lay) = min(9, max(1, int(factor)-7))
+         selffrac(lay) = factor - real((indself(lay) + 7),kind=rb)
+
+! Calculate needed column amounts.
+
+         colh2o(lay) = 1.e-20_rb * wkl(1,lay)
+         colco2(lay) = 1.e-20_rb * wkl(2,lay)
+         colo3(lay) = 1.e-20_rb * wkl(3,lay)
+!           colo3(lay) = 0._rb
+!           colo3(lay) = colo3(lay)/1.16_rb
+         coln2o(lay) = 1.e-20_rb * wkl(4,lay)
+         colch4(lay) = 1.e-20_rb * wkl(6,lay)
+         colo2(lay) = 1.e-20_rb * wkl(7,lay)
+         colmol(lay) = 1.e-20_rb * coldry(lay) + colh2o(lay)
+!           colco2(lay) = 0._rb
+!           colo3(lay) = 0._rb
+!           coln2o(lay) = 0._rb
+!           colch4(lay) = 0._rb
+!           colo2(lay) = 0._rb
+!           colmol(lay) = 0._rb
+         if (colco2(lay) .eq. 0._rb) colco2(lay) = 1.e-32_rb * coldry(lay)
+         if (coln2o(lay) .eq. 0._rb) coln2o(lay) = 1.e-32_rb * coldry(lay)
+         if (colch4(lay) .eq. 0._rb) colch4(lay) = 1.e-32_rb * coldry(lay)
+         if (colo2(lay) .eq. 0._rb) colo2(lay) = 1.e-32_rb * coldry(lay)
+! Using E = 1334.2 cm-1.
+         co2reg = 3.55e-24_rb * coldry(lay)
+         co2mult(lay)= (colco2(lay) - co2reg) * &
+               272.63_rb*exp(-1919.4_rb/tavel(lay))/(8.7604e-4_rb*tavel(lay))
+         goto 5400
+
+! Above laytrop.
+ 5300    continue
+
+! Set up factors needed to separately include the water vapor
+! foreign-continuum in the calculation of absorption coefficient.
+
+         forfac(lay) = scalefac / (1.+water)
+         factor = (tavel(lay)-188.0_rb)/36.0_rb
+         indfor(lay) = 3
+         forfrac(lay) = factor - 1.0_rb
+
+! Calculate needed column amounts.
+
+         colh2o(lay) = 1.e-20_rb * wkl(1,lay)
+         colco2(lay) = 1.e-20_rb * wkl(2,lay)
+         colo3(lay)  = 1.e-20_rb * wkl(3,lay)
+         coln2o(lay) = 1.e-20_rb * wkl(4,lay)
+         colch4(lay) = 1.e-20_rb * wkl(6,lay)
+         colo2(lay)  = 1.e-20_rb * wkl(7,lay)
+         colmol(lay) = 1.e-20_rb * coldry(lay) + colh2o(lay)
+         if (colco2(lay) .eq. 0._rb) colco2(lay) = 1.e-32_rb * coldry(lay)
+         if (coln2o(lay) .eq. 0._rb) coln2o(lay) = 1.e-32_rb * coldry(lay)
+         if (colch4(lay) .eq. 0._rb) colch4(lay) = 1.e-32_rb * coldry(lay)
+         if (colo2(lay)  .eq. 0._rb) colo2(lay)  = 1.e-32_rb * coldry(lay)
+         co2reg = 3.55e-24_rb * coldry(lay)
+         co2mult(lay)= (colco2(lay) - co2reg) * &
+               272.63_rb*exp(-1919.4_rb/tavel(lay))/(8.7604e-4_rb*tavel(lay))
+
+         selffac(lay) = 0._rb
+         selffrac(lay)= 0._rb
+         indself(lay) = 0
+
+ 5400    continue
+
+! We have now isolated the layer ln pressure and temperature,
+! between two reference pressures and two reference temperatures 
+! (for each reference pressure).  We multiply the pressure 
+! fraction FP with the appropriate temperature fractions to get 
+! the factors that will be needed for the interpolation that yields
+! the optical depths (performed in routines TAUGBn for band n).
+
+         compfp = 1._rb - fp
+         fac10(lay) = compfp * ft
+         fac00(lay) = compfp * (1._rb - ft)
+         fac11(lay) = fp * ft1
+         fac01(lay) = fp * (1._rb - ft1)
+
+! End layer loop
+      enddo
+
+      end subroutine setcoef_sw
+
+!***************************************************************************
+      subroutine swatmref
+!***************************************************************************
+
+      save
+ 
+! These pressures are chosen such that the ln of the first pressure
+! has only a few non-zero digits (i.e. ln(PREF(1)) = 6.96000) and
+! each subsequent ln(pressure) differs from the previous one by 0.2.
+
+      pref(:) = (/ &
+          1.05363e+03_rb,8.62642e+02_rb,7.06272e+02_rb,5.78246e+02_rb,4.73428e+02_rb, &
+          3.87610e+02_rb,3.17348e+02_rb,2.59823e+02_rb,2.12725e+02_rb,1.74164e+02_rb, &
+          1.42594e+02_rb,1.16746e+02_rb,9.55835e+01_rb,7.82571e+01_rb,6.40715e+01_rb, &
+          5.24573e+01_rb,4.29484e+01_rb,3.51632e+01_rb,2.87892e+01_rb,2.35706e+01_rb, &
+          1.92980e+01_rb,1.57998e+01_rb,1.29358e+01_rb,1.05910e+01_rb,8.67114e+00_rb, &
+          7.09933e+00_rb,5.81244e+00_rb,4.75882e+00_rb,3.89619e+00_rb,3.18993e+00_rb, &
+          2.61170e+00_rb,2.13828e+00_rb,1.75067e+00_rb,1.43333e+00_rb,1.17351e+00_rb, &
+          9.60789e-01_rb,7.86628e-01_rb,6.44036e-01_rb,5.27292e-01_rb,4.31710e-01_rb, &
+          3.53455e-01_rb,2.89384e-01_rb,2.36928e-01_rb,1.93980e-01_rb,1.58817e-01_rb, &
+          1.30029e-01_rb,1.06458e-01_rb,8.71608e-02_rb,7.13612e-02_rb,5.84256e-02_rb, &
+          4.78349e-02_rb,3.91639e-02_rb,3.20647e-02_rb,2.62523e-02_rb,2.14936e-02_rb, &
+          1.75975e-02_rb,1.44076e-02_rb,1.17959e-02_rb,9.65769e-03_rb /)
+
+      preflog(:) = (/ &
+           6.9600e+00_rb, 6.7600e+00_rb, 6.5600e+00_rb, 6.3600e+00_rb, 6.1600e+00_rb, &
+           5.9600e+00_rb, 5.7600e+00_rb, 5.5600e+00_rb, 5.3600e+00_rb, 5.1600e+00_rb, &
+           4.9600e+00_rb, 4.7600e+00_rb, 4.5600e+00_rb, 4.3600e+00_rb, 4.1600e+00_rb, &
+           3.9600e+00_rb, 3.7600e+00_rb, 3.5600e+00_rb, 3.3600e+00_rb, 3.1600e+00_rb, &
+           2.9600e+00_rb, 2.7600e+00_rb, 2.5600e+00_rb, 2.3600e+00_rb, 2.1600e+00_rb, &
+           1.9600e+00_rb, 1.7600e+00_rb, 1.5600e+00_rb, 1.3600e+00_rb, 1.1600e+00_rb, &
+           9.6000e-01_rb, 7.6000e-01_rb, 5.6000e-01_rb, 3.6000e-01_rb, 1.6000e-01_rb, &
+          -4.0000e-02_rb,-2.4000e-01_rb,-4.4000e-01_rb,-6.4000e-01_rb,-8.4000e-01_rb, &
+          -1.0400e+00_rb,-1.2400e+00_rb,-1.4400e+00_rb,-1.6400e+00_rb,-1.8400e+00_rb, &
+          -2.0400e+00_rb,-2.2400e+00_rb,-2.4400e+00_rb,-2.6400e+00_rb,-2.8400e+00_rb, &
+          -3.0400e+00_rb,-3.2400e+00_rb,-3.4400e+00_rb,-3.6400e+00_rb,-3.8400e+00_rb, &
+          -4.0400e+00_rb,-4.2400e+00_rb,-4.4400e+00_rb,-4.6400e+00_rb /)
+
+! These are the temperatures associated with the respective 
+! pressures for the MLS standard atmosphere. 
+
+      tref(:) = (/ &
+           2.9420e+02_rb, 2.8799e+02_rb, 2.7894e+02_rb, 2.6925e+02_rb, 2.5983e+02_rb, &
+           2.5017e+02_rb, 2.4077e+02_rb, 2.3179e+02_rb, 2.2306e+02_rb, 2.1578e+02_rb, &
+           2.1570e+02_rb, 2.1570e+02_rb, 2.1570e+02_rb, 2.1706e+02_rb, 2.1858e+02_rb, &
+           2.2018e+02_rb, 2.2174e+02_rb, 2.2328e+02_rb, 2.2479e+02_rb, 2.2655e+02_rb, &
+           2.2834e+02_rb, 2.3113e+02_rb, 2.3401e+02_rb, 2.3703e+02_rb, 2.4022e+02_rb, &
+           2.4371e+02_rb, 2.4726e+02_rb, 2.5085e+02_rb, 2.5457e+02_rb, 2.5832e+02_rb, &
+           2.6216e+02_rb, 2.6606e+02_rb, 2.6999e+02_rb, 2.7340e+02_rb, 2.7536e+02_rb, &
+           2.7568e+02_rb, 2.7372e+02_rb, 2.7163e+02_rb, 2.6955e+02_rb, 2.6593e+02_rb, &
+           2.6211e+02_rb, 2.5828e+02_rb, 2.5360e+02_rb, 2.4854e+02_rb, 2.4348e+02_rb, & 
+           2.3809e+02_rb, 2.3206e+02_rb, 2.2603e+02_rb, 2.2000e+02_rb, 2.1435e+02_rb, &
+           2.0887e+02_rb, 2.0340e+02_rb, 1.9792e+02_rb, 1.9290e+02_rb, 1.8809e+02_rb, &
+           1.8329e+02_rb, 1.7849e+02_rb, 1.7394e+02_rb, 1.7212e+02_rb /)
+
+      end subroutine swatmref
+
+      end module rrtmg_sw_setcoef
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_spcvmc.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_spcvmc.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_spcvmc.f90	(revision 3477)
@@ -0,0 +1,628 @@
+!     path:      $Source$
+!     author:    $Author: mike $
+!     revision:  $Revision: 11661 $
+!     created:   $Date: 2009-05-22 18:22:22 -0400 (Fri, 22 May 2009) $
+
+      module rrtmg_sw_spcvmc
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : nbndsw, ngptsw, mxmol, jpband
+      use rrsw_tbl, only : tblint, bpade, od_lo, exp_tbl
+      use rrsw_vsn, only : hvrspc, hnamspc
+      use rrsw_wvn, only : ngc, ngs
+      use rrtmg_sw_reftra, only: reftra_sw
+      use rrtmg_sw_taumol, only: taumol_sw
+      use rrtmg_sw_vrtqdr, only: vrtqdr_sw
+
+      implicit none
+
+      contains
+
+! ---------------------------------------------------------------------------
+      subroutine spcvmc_sw &
+            (nlayers, istart, iend, icpr, idelm, iout, &
+             pavel, tavel, pz, tz, tbound, palbd, palbp, &
+             pcldfmc, ptaucmc, pasycmc, pomgcmc, ptaormc, &
+             ptaua, pasya, pomga, prmu0, coldry, wkl, adjflux, &
+             laytrop, layswtch, laylow, jp, jt, jt1, &
+             co2mult, colch4, colco2, colh2o, colmol, coln2o, colo2, colo3, &
+             fac00, fac01, fac10, fac11, &
+             selffac, selffrac, indself, forfac, forfrac, indfor, &
+             pbbfd, pbbfu, pbbcd, pbbcu, puvfd, puvcd, pnifd, pnicd, &
+             pbbfddir, pbbcddir, puvfddir, puvcddir, pnifddir, pnicddir)
+! ---------------------------------------------------------------------------
+!
+! Purpose: Contains spectral loop to compute the shortwave radiative fluxes, 
+!          using the two-stream method of H. Barker and McICA, the Monte-Carlo
+!          Independent Column Approximation, for the representation of 
+!          sub-grid cloud variability (i.e. cloud overlap).
+!
+! Interface:  *spcvmc_sw* is called from *rrtmg_sw.F90* or rrtmg_sw.1col.F90*
+!
+! Method:
+!    Adapted from two-stream model of H. Barker;
+!    Two-stream model options (selected with kmodts in rrtmg_sw_reftra.F90):
+!        1: Eddington, 2: PIFM, Zdunkowski et al., 3: discret ordinates
+!
+! Modifications:
+!
+! Original: H. Barker
+! Revision: Merge with RRTMG_SW: J.-J.Morcrette, ECMWF, Feb 2003
+! Revision: Add adjustment for Earth/Sun distance : MJIacono, AER, Oct 2003
+! Revision: Bug fix for use of PALBP and PALBD: MJIacono, AER, Nov 2003
+! Revision: Bug fix to apply delta scaling to clear sky: AER, Dec 2004
+! Revision: Code modified so that delta scaling is not done in cloudy profiles
+!           if routine cldprop is used; delta scaling can be applied by swithcing
+!           code below if cldprop is not used to get cloud properties. 
+!           AER, Jan 2005
+! Revision: Modified to use McICA: MJIacono, AER, Nov 2005
+! Revision: Uniform formatting for RRTMG: MJIacono, AER, Jul 2006 
+! Revision: Use exponential lookup table for transmittance: MJIacono, AER, 
+!           Aug 2007 
+!
+! ------------------------------------------------------------------
+
+! ------- Declarations ------
+
+! ------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers
+      integer(kind=im), intent(in) :: istart
+      integer(kind=im), intent(in) :: iend
+      integer(kind=im), intent(in) :: icpr
+      integer(kind=im), intent(in) :: idelm   ! delta-m scaling flag
+                                              ! [0 = direct and diffuse fluxes are unscaled]
+                                              ! [1 = direct and diffuse fluxes are scaled]
+      integer(kind=im), intent(in) :: iout
+      integer(kind=im), intent(in) :: laytrop
+      integer(kind=im), intent(in) :: layswtch
+      integer(kind=im), intent(in) :: laylow
+
+      integer(kind=im), intent(in) :: indfor(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: indself(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jp(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt1(:)
+                                                               !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: pavel(:)                    ! layer pressure (hPa, mb) 
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tavel(:)                    ! layer temperature (K)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: pz(0:)                      ! level (interface) pressure (hPa, mb)
+                                                               !   Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tz(0:)                      ! level temperatures (hPa, mb)
+                                                               !   Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tbound                      ! surface temperature (K)
+      real(kind=rb), intent(in) :: wkl(:,:)                    ! molecular amounts (mol/cm2) 
+                                                               !   Dimensions: (mxmol,nlayers)
+      real(kind=rb), intent(in) :: coldry(:)                   ! dry air column density (mol/cm2)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colmol(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: adjflux(:)                  ! Earth/Sun distance adjustment
+                                                               !   Dimensions: (jpband)
+
+      real(kind=rb), intent(in) :: palbd(:)                    ! surface albedo (diffuse)
+                                                               !   Dimensions: (nbndsw)
+      real(kind=rb), intent(in) :: palbp(:)                    ! surface albedo (direct)
+                                                               !   Dimensions: (nbndsw)
+      real(kind=rb), intent(in) :: prmu0                       ! cosine of solar zenith angle
+      real(kind=rb), intent(in) :: pcldfmc(:,:)                ! cloud fraction [mcica]
+                                                               !   Dimensions: (nlayers,ngptsw)
+      real(kind=rb), intent(in) :: ptaucmc(:,:)                ! cloud optical depth [mcica]
+                                                               !   Dimensions: (nlayers,ngptsw)
+      real(kind=rb), intent(in) :: pasycmc(:,:)                ! cloud asymmetry parameter [mcica]
+                                                               !   Dimensions: (nlayers,ngptsw)
+      real(kind=rb), intent(in) :: pomgcmc(:,:)                ! cloud single scattering albedo [mcica]
+                                                               !   Dimensions: (nlayers,ngptsw)
+      real(kind=rb), intent(in) :: ptaormc(:,:)                ! cloud optical depth, non-delta scaled [mcica]
+                                                               !   Dimensions: (nlayers,ngptsw)
+      real(kind=rb), intent(in) :: ptaua(:,:)                  ! aerosol optical depth
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: pasya(:,:)                  ! aerosol asymmetry parameter
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: pomga(:,:)                  ! aerosol single scattering albedo
+                                                               !   Dimensions: (nlayers,nbndsw)
+
+      real(kind=rb), intent(in) :: colh2o(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colco2(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colch4(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: co2mult(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo3(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo2(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: coln2o(:)
+                                                               !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: forfac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: forfrac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffrac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac00(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac01(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac10(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac11(:)
+                                                               !   Dimensions: (nlayers)
+
+! ------- Output -------
+                                                               !   All Dimensions: (nlayers+1)
+      real(kind=rb), intent(out) :: pbbcd(:)
+      real(kind=rb), intent(out) :: pbbcu(:)
+      real(kind=rb), intent(out) :: pbbfd(:)
+      real(kind=rb), intent(out) :: pbbfu(:)
+      real(kind=rb), intent(out) :: pbbfddir(:)
+      real(kind=rb), intent(out) :: pbbcddir(:)
+
+      real(kind=rb), intent(out) :: puvcd(:)
+      real(kind=rb), intent(out) :: puvfd(:)
+      real(kind=rb), intent(out) :: puvcddir(:)
+      real(kind=rb), intent(out) :: puvfddir(:)
+
+      real(kind=rb), intent(out) :: pnicd(:)
+      real(kind=rb), intent(out) :: pnifd(:)
+      real(kind=rb), intent(out) :: pnicddir(:)
+      real(kind=rb), intent(out) :: pnifddir(:)
+
+! Output - inactive                                            !   All Dimensions: (nlayers+1)
+!      real(kind=rb), intent(out) :: puvcu(:)
+!      real(kind=rb), intent(out) :: puvfu(:)
+!      real(kind=rb), intent(out) :: pnicu(:)
+!      real(kind=rb), intent(out) :: pnifu(:)
+!      real(kind=rb), intent(out) :: pvscd(:)
+!      real(kind=rb), intent(out) :: pvscu(:)
+!      real(kind=rb), intent(out) :: pvsfd(:)
+!      real(kind=rb), intent(out) :: pvsfu(:)
+
+! ------- Local -------
+
+      logical :: lrtchkclr(nlayers),lrtchkcld(nlayers)
+
+      integer(kind=im)  :: klev
+      integer(kind=im) :: ib1, ib2, ibm, igt, ikl, ikp, ikx
+      integer(kind=im) :: iw, jb, jg, jl, jk
+!      integer(kind=im), parameter :: nuv = ?? 
+!      integer(kind=im), parameter :: nvs = ?? 
+      integer(kind=im) :: itind
+
+      real(kind=rb) :: tblind, ze1
+      real(kind=rb) :: zclear, zcloud
+      real(kind=rb) :: zdbt(nlayers+1), zdbt_nodel(nlayers+1)
+      real(kind=rb) :: zgc(nlayers), zgcc(nlayers), zgco(nlayers)
+      real(kind=rb) :: zomc(nlayers), zomcc(nlayers), zomco(nlayers)
+      real(kind=rb) :: zrdnd(nlayers+1), zrdndc(nlayers+1)
+      real(kind=rb) :: zref(nlayers+1), zrefc(nlayers+1), zrefo(nlayers+1)
+      real(kind=rb) :: zrefd(nlayers+1), zrefdc(nlayers+1), zrefdo(nlayers+1)
+      real(kind=rb) :: zrup(nlayers+1), zrupd(nlayers+1)
+      real(kind=rb) :: zrupc(nlayers+1), zrupdc(nlayers+1)
+      real(kind=rb) :: zs1(nlayers+1)
+      real(kind=rb) :: ztauc(nlayers), ztauo(nlayers)
+      real(kind=rb) :: ztdn(nlayers+1), ztdnd(nlayers+1), ztdbt(nlayers+1)
+      real(kind=rb) :: ztoc(nlayers), ztor(nlayers)
+      real(kind=rb) :: ztra(nlayers+1), ztrac(nlayers+1), ztrao(nlayers+1)
+      real(kind=rb) :: ztrad(nlayers+1), ztradc(nlayers+1), ztrado(nlayers+1)
+      real(kind=rb) :: zdbtc(nlayers+1), ztdbtc(nlayers+1)
+      real(kind=rb) :: zincflx(ngptsw), zdbtc_nodel(nlayers+1) 
+      real(kind=rb) :: ztdbt_nodel(nlayers+1), ztdbtc_nodel(nlayers+1)
+
+      real(kind=rb) :: zdbtmc, zdbtmo, zf, zgw, zreflect
+      real(kind=rb) :: zwf, tauorig, repclc
+!     real(kind=rb) :: zincflux                                   ! inactive
+
+! Arrays from rrtmg_sw_taumoln routines
+
+!      real(kind=rb) :: ztaug(nlayers,16), ztaur(nlayers,16)
+!      real(kind=rb) :: zsflxzen(16)
+      real(kind=rb) :: ztaug(nlayers,ngptsw), ztaur(nlayers,ngptsw)
+      real(kind=rb) :: zsflxzen(ngptsw)
+
+! Arrays from rrtmg_sw_vrtqdr routine
+
+      real(kind=rb) :: zcd(nlayers+1,ngptsw), zcu(nlayers+1,ngptsw)
+      real(kind=rb) :: zfd(nlayers+1,ngptsw), zfu(nlayers+1,ngptsw)
+
+! Inactive arrays
+!     real(kind=rb) :: zbbcd(nlayers+1), zbbcu(nlayers+1)
+!     real(kind=rb) :: zbbfd(nlayers+1), zbbfu(nlayers+1)
+!     real(kind=rb) :: zbbfddir(nlayers+1), zbbcddir(nlayers+1)
+
+! ------------------------------------------------------------------
+
+! Initializations
+
+      ib1 = istart
+      ib2 = iend
+      klev = nlayers
+      iw = 0
+      repclc = 1.e-12_rb
+!      zincflux = 0.0_rb
+
+      do jk=1,klev+1
+         pbbcd(jk)=0._rb
+         pbbcu(jk)=0._rb
+         pbbfd(jk)=0._rb
+         pbbfu(jk)=0._rb
+         pbbcddir(jk)=0._rb
+         pbbfddir(jk)=0._rb
+         puvcd(jk)=0._rb
+         puvfd(jk)=0._rb
+         puvcddir(jk)=0._rb
+         puvfddir(jk)=0._rb
+         pnicd(jk)=0._rb
+         pnifd(jk)=0._rb
+         pnicddir(jk)=0._rb
+         pnifddir(jk)=0._rb
+      enddo
+
+
+! Calculate the optical depths for gaseous absorption and Rayleigh scattering
+
+      call taumol_sw(klev, &
+                     colh2o, colco2, colch4, colo2, colo3, colmol, &
+                     laytrop, jp, jt, jt1, &
+                     fac00, fac01, fac10, fac11, &
+                     selffac, selffrac, indself, forfac, forfrac, indfor, &
+                     zsflxzen, ztaug, ztaur)
+
+! Top of shortwave spectral band loop, jb = 16 -> 29; ibm = 1 -> 14
+
+      do jb = ib1, ib2
+         ibm = jb-15
+         igt = ngc(ibm)
+
+! Reinitialize g-point counter for each band if output for each band is requested.
+         if (iout.gt.0.and.ibm.ge.2) iw = ngs(ibm-1)
+
+!        do jk=1,klev+1
+!           zbbcd(jk)=0.0_rb
+!           zbbcu(jk)=0.0_rb
+!           zbbfd(jk)=0.0_rb
+!           zbbfu(jk)=0.0_rb
+!        enddo
+
+! Top of g-point interval loop within each band (iw is cumulative counter) 
+         do jg = 1,igt
+            iw = iw+1
+
+! Apply adjustment for correct Earth/Sun distance and zenith angle to incoming solar flux
+            zincflx(iw) = adjflux(jb) * zsflxzen(iw) * prmu0
+!             zincflux = zincflux + adjflux(jb) * zsflxzen(iw) * prmu0           ! inactive
+
+! Compute layer reflectances and transmittances for direct and diffuse sources, 
+! first clear then cloudy
+
+! zrefc(jk)  direct albedo for clear
+! zrefo(jk)  direct albedo for cloud
+! zrefdc(jk) diffuse albedo for clear
+! zrefdo(jk) diffuse albedo for cloud
+! ztrac(jk)  direct transmittance for clear
+! ztrao(jk)  direct transmittance for cloudy
+! ztradc(jk) diffuse transmittance for clear
+! ztrado(jk) diffuse transmittance for cloudy
+!  
+! zref(jk)   direct reflectance
+! zrefd(jk)  diffuse reflectance
+! ztra(jk)   direct transmittance
+! ztrad(jk)  diffuse transmittance
+!
+! zdbtc(jk)  clear direct beam transmittance
+! zdbto(jk)  cloudy direct beam transmittance
+! zdbt(jk)   layer mean direct beam transmittance
+! ztdbt(jk)  total direct beam transmittance at levels
+
+! Clear-sky    
+!   TOA direct beam    
+            ztdbtc(1)=1.0_rb
+            ztdbtc_nodel(1)=1.0_rb
+!   Surface values
+            zdbtc(klev+1) =0.0_rb
+            ztrac(klev+1) =0.0_rb
+            ztradc(klev+1)=0.0_rb
+            zrefc(klev+1) =palbp(ibm)
+            zrefdc(klev+1)=palbd(ibm)
+            zrupc(klev+1) =palbp(ibm)
+            zrupdc(klev+1)=palbd(ibm)
+           
+! Cloudy-sky    
+!   Surface values
+            ztrao(klev+1) =0.0_rb
+            ztrado(klev+1)=0.0_rb
+            zrefo(klev+1) =palbp(ibm)
+            zrefdo(klev+1)=palbd(ibm)
+           
+! Total sky    
+!   TOA direct beam    
+            ztdbt(1)=1.0_rb
+            ztdbt_nodel(1)=1.0_rb
+!   Surface values
+            zdbt(klev+1) =0.0_rb
+            ztra(klev+1) =0.0_rb
+            ztrad(klev+1)=0.0_rb
+            zref(klev+1) =palbp(ibm)
+            zrefd(klev+1)=palbd(ibm)
+            zrup(klev+1) =palbp(ibm)
+            zrupd(klev+1)=palbd(ibm)
+    
+! Top of layer loop
+            do jk=1,klev
+
+! Note: two-stream calculations proceed from top to bottom; 
+!   RRTMG_SW quantities are given bottom to top and are reversed here
+
+               ikl=klev+1-jk
+
+! Set logical flag to do REFTRA calculation
+!   Do REFTRA for all clear layers
+               lrtchkclr(jk)=.true.
+
+!   Do REFTRA only for cloudy layers in profile, since already done for clear layers
+               lrtchkcld(jk)=.false.
+               lrtchkcld(jk)=(pcldfmc(ikl,iw) > repclc)
+
+! Clear-sky optical parameters - this section inactive     
+!   Original
+!               ztauc(jk) = ztaur(ikl,iw) + ztaug(ikl,iw)
+!               zomcc(jk) = ztaur(ikl,iw) / ztauc(jk)
+!               zgcc(jk) = 0.0001_rb
+!   Total sky optical parameters        
+!               ztauo(jk) = ztaur(ikl,iw) + ztaug(ikl,iw) + ptaucmc(ikl,iw)
+!               zomco(jk) = ptaucmc(ikl,iw) * pomgcmc(ikl,iw) + ztaur(ikl,iw)
+!               zgco (jk) = (ptaucmc(ikl,iw) * pomgcmc(ikl,iw) * pasycmc(ikl,iw) + &
+!                           ztaur(ikl,iw) * 0.0001_rb) / zomco(jk)
+!               zomco(jk) = zomco(jk) / ztauo(jk)
+
+! Clear-sky optical parameters including aerosols
+               ztauc(jk) = ztaur(ikl,iw) + ztaug(ikl,iw) + ptaua(ikl,ibm)
+               zomcc(jk) = ztaur(ikl,iw) * 1.0_rb + ptaua(ikl,ibm) * pomga(ikl,ibm)
+               zgcc(jk) = pasya(ikl,ibm) * pomga(ikl,ibm) * ptaua(ikl,ibm) / zomcc(jk)
+               zomcc(jk) = zomcc(jk) / ztauc(jk)
+
+! Pre-delta-scaling clear and cloudy direct beam transmittance (must use 'orig', unscaled cloud OD)       
+!   \/\/\/ This block of code is only needed for unscaled direct beam calculation
+               if (idelm .eq. 0) then
+!     
+                  zclear = 1.0_rb - pcldfmc(ikl,iw)
+                  zcloud = pcldfmc(ikl,iw)
+
+! Clear
+!                   zdbtmc = exp(-ztauc(jk) / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of exponential for low tau
+                  ze1 = ztauc(jk) / prmu0
+                  if (ze1 .le. od_lo) then
+                     zdbtmc = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+                  else 
+                     tblind = ze1 / (bpade + ze1)
+                     itind = tblint * tblind + 0.5_rb
+                     zdbtmc = exp_tbl(itind)
+                  endif
+
+                  zdbtc_nodel(jk) = zdbtmc
+                  ztdbtc_nodel(jk+1) = zdbtc_nodel(jk) * ztdbtc_nodel(jk)
+
+! Clear + Cloud
+                  tauorig = ztauc(jk) + ptaormc(ikl,iw)
+!                   zdbtmo = exp(-tauorig / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of exponential for low tau
+                  ze1 = tauorig / prmu0
+                  if (ze1 .le. od_lo) then
+                     zdbtmo = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+                  else
+                     tblind = ze1 / (bpade + ze1)
+                     itind = tblint * tblind + 0.5_rb
+                     zdbtmo = exp_tbl(itind)
+                  endif
+
+                  zdbt_nodel(jk) = zclear*zdbtmc + zcloud*zdbtmo
+                  ztdbt_nodel(jk+1) = zdbt_nodel(jk) * ztdbt_nodel(jk)
+
+               endif
+!   /\/\/\ Above code only needed for unscaled direct beam calculation
+
+
+! Delta scaling - clear   
+               zf = zgcc(jk) * zgcc(jk)
+               zwf = zomcc(jk) * zf
+               ztauc(jk) = (1.0_rb - zwf) * ztauc(jk)
+               zomcc(jk) = (zomcc(jk) - zwf) / (1.0_rb - zwf)
+               zgcc (jk) = (zgcc(jk) - zf) / (1.0_rb - zf)
+
+! Total sky optical parameters (cloud properties already delta-scaled)
+!   Use this code if cloud properties are derived in rrtmg_sw_cldprop       
+               if (icpr .ge. 1) then
+                  ztauo(jk) = ztauc(jk) + ptaucmc(ikl,iw)
+                  zomco(jk) = ztauc(jk) * zomcc(jk) + ptaucmc(ikl,iw) * pomgcmc(ikl,iw) 
+                  zgco (jk) = (ptaucmc(ikl,iw) * pomgcmc(ikl,iw) * pasycmc(ikl,iw) + &
+                              ztauc(jk) * zomcc(jk) * zgcc(jk)) / zomco(jk)
+                  zomco(jk) = zomco(jk) / ztauo(jk)
+
+! Total sky optical parameters (if cloud properties not delta scaled)
+!   Use this code if cloud properties are not derived in rrtmg_sw_cldprop       
+               elseif (icpr .eq. 0) then
+                  ztauo(jk) = ztaur(ikl,iw) + ztaug(ikl,iw) + ptaua(ikl,ibm) + ptaucmc(ikl,iw)
+                  zomco(jk) = ptaua(ikl,ibm) * pomga(ikl,ibm) + ptaucmc(ikl,iw) * pomgcmc(ikl,iw) + &
+                              ztaur(ikl,iw) * 1.0_rb
+                  zgco (jk) = (ptaucmc(ikl,iw) * pomgcmc(ikl,iw) * pasycmc(ikl,iw) + &
+                              ptaua(ikl,ibm)*pomga(ikl,ibm)*pasya(ikl,ibm)) / zomco(jk)
+                  zomco(jk) = zomco(jk) / ztauo(jk)
+
+! Delta scaling - clouds 
+!   Use only if subroutine rrtmg_sw_cldprop is not used to get cloud properties and to apply delta scaling
+                  zf = zgco(jk) * zgco(jk)
+                  zwf = zomco(jk) * zf
+                  ztauo(jk) = (1._rb - zwf) * ztauo(jk)
+                  zomco(jk) = (zomco(jk) - zwf) / (1.0_rb - zwf)
+                  zgco (jk) = (zgco(jk) - zf) / (1.0_rb - zf)
+               endif 
+
+! End of layer loop
+            enddo    
+
+! Clear sky reflectivities
+            call reftra_sw (klev, &
+                            lrtchkclr, zgcc, prmu0, ztauc, zomcc, &
+                            zrefc, zrefdc, ztrac, ztradc)
+
+! Total sky reflectivities      
+            call reftra_sw (klev, &
+                            lrtchkcld, zgco, prmu0, ztauo, zomco, &
+                            zrefo, zrefdo, ztrao, ztrado)
+
+            do jk=1,klev
+
+! Combine clear and cloudy contributions for total sky
+               ikl = klev+1-jk 
+               zclear = 1.0_rb - pcldfmc(ikl,iw)
+               zcloud = pcldfmc(ikl,iw)
+
+               zref(jk) = zclear*zrefc(jk) + zcloud*zrefo(jk)
+               zrefd(jk)= zclear*zrefdc(jk) + zcloud*zrefdo(jk)
+               ztra(jk) = zclear*ztrac(jk) + zcloud*ztrao(jk)
+               ztrad(jk)= zclear*ztradc(jk) + zcloud*ztrado(jk)
+
+! Direct beam transmittance        
+
+! Clear
+!                zdbtmc = exp(-ztauc(jk) / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of 
+! exponential for low tau
+               ze1 = ztauc(jk) / prmu0
+               if (ze1 .le. od_lo) then
+                  zdbtmc = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+               else
+                  tblind = ze1 / (bpade + ze1)
+                  itind = tblint * tblind + 0.5_rb
+                  zdbtmc = exp_tbl(itind)
+               endif
+
+               zdbtc(jk) = zdbtmc
+               ztdbtc(jk+1) = zdbtc(jk)*ztdbtc(jk)
+
+! Clear + Cloud
+!                zdbtmo = exp(-ztauo(jk) / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of 
+! exponential for low tau
+               ze1 = ztauo(jk) / prmu0
+               if (ze1 .le. od_lo) then
+                  zdbtmo = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+               else
+                  tblind = ze1 / (bpade + ze1)
+                  itind = tblint * tblind + 0.5_rb
+                  zdbtmo = exp_tbl(itind)
+               endif
+
+               zdbt(jk) = zclear*zdbtmc + zcloud*zdbtmo
+               ztdbt(jk+1) = zdbt(jk)*ztdbt(jk)
+        
+            enddo           
+                 
+! Vertical quadrature for clear-sky fluxes
+
+            call vrtqdr_sw(klev, iw, &
+                           zrefc, zrefdc, ztrac, ztradc, &
+                           zdbtc, zrdndc, zrupc, zrupdc, ztdbtc, &
+                           zcd, zcu)
+      
+! Vertical quadrature for cloudy fluxes
+
+            call vrtqdr_sw(klev, iw, &
+                           zref, zrefd, ztra, ztrad, &
+                           zdbt, zrdnd, zrup, zrupd, ztdbt, &
+                           zfd, zfu)
+
+! Upwelling and downwelling fluxes at levels
+!   Two-stream calculations go from top to bottom; 
+!   layer indexing is reversed to go bottom to top for output arrays
+
+            do jk=1,klev+1
+               ikl=klev+2-jk
+
+! Accumulate spectral fluxes over bands - inactive
+!               zbbfu(ikl) = zbbfu(ikl) + zincflx(iw)*zfu(jk,iw)  
+!               zbbfd(ikl) = zbbfd(ikl) + zincflx(iw)*zfd(jk,iw)
+!               zbbcu(ikl) = zbbcu(ikl) + zincflx(iw)*zcu(jk,iw)
+!               zbbcd(ikl) = zbbcd(ikl) + zincflx(iw)*zcd(jk,iw)
+!               zbbfddir(ikl) = zbbfddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+!               zbbcddir(ikl) = zbbcddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+
+! Accumulate spectral fluxes over whole spectrum  
+               pbbfu(ikl) = pbbfu(ikl) + zincflx(iw)*zfu(jk,iw)
+               pbbfd(ikl) = pbbfd(ikl) + zincflx(iw)*zfd(jk,iw)
+               pbbcu(ikl) = pbbcu(ikl) + zincflx(iw)*zcu(jk,iw)
+               pbbcd(ikl) = pbbcd(ikl) + zincflx(iw)*zcd(jk,iw)
+               if (idelm .eq. 0) then 
+                  pbbfddir(ikl) = pbbfddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+                  pbbcddir(ikl) = pbbcddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+               elseif (idelm .eq. 1) then
+                  pbbfddir(ikl) = pbbfddir(ikl) + zincflx(iw)*ztdbt(jk)
+                  pbbcddir(ikl) = pbbcddir(ikl) + zincflx(iw)*ztdbtc(jk)
+               endif
+
+! Accumulate direct fluxes for UV/visible bands
+               if (ibm >= 10 .and. ibm <= 13) then
+                  puvcd(ikl) = puvcd(ikl) + zincflx(iw)*zcd(jk,iw)
+                  puvfd(ikl) = puvfd(ikl) + zincflx(iw)*zfd(jk,iw)
+                  if (idelm .eq. 0) then 
+                     puvfddir(ikl) = puvfddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+                     puvcddir(ikl) = puvcddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+                  elseif (idelm .eq. 1) then
+                     puvfddir(ikl) = puvfddir(ikl) + zincflx(iw)*ztdbt(jk)
+                     puvcddir(ikl) = puvcddir(ikl) + zincflx(iw)*ztdbtc(jk)
+                  endif
+! Accumulate direct fluxes for near-IR bands
+               else if (ibm == 14 .or. ibm <= 9) then  
+                  pnicd(ikl) = pnicd(ikl) + zincflx(iw)*zcd(jk,iw)
+                  pnifd(ikl) = pnifd(ikl) + zincflx(iw)*zfd(jk,iw)
+                  if (idelm .eq. 0) then 
+                     pnifddir(ikl) = pnifddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+                     pnicddir(ikl) = pnicddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+                  elseif (idelm .eq. 1) then
+                     pnifddir(ikl) = pnifddir(ikl) + zincflx(iw)*ztdbt(jk)
+                     pnicddir(ikl) = pnicddir(ikl) + zincflx(iw)*ztdbtc(jk)
+                  endif
+               endif
+
+            enddo
+
+! End loop on jg, g-point interval
+         enddo             
+
+! End loop on jb, spectral band
+      enddo                    
+
+      end subroutine spcvmc_sw
+
+      end module rrtmg_sw_spcvmc
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_spcvrt.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_spcvrt.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_spcvrt.f90	(revision 3477)
@@ -0,0 +1,630 @@
+!     path:      $Source$
+!     author:    $Author: mike $
+!     revision:  $Revision: 11661 $
+!     created:   $Date: 2009-05-22 18:22:22 -0400 (Fri, 22 May 2009) $
+
+      module rrtmg_sw_spcvrt
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+      use parrrsw, only : nbndsw, ngptsw, mxmol, jpband
+      use rrsw_tbl, only : tblint, bpade, od_lo, exp_tbl
+      use rrsw_vsn, only : hvrspv, hnamspv
+      use rrsw_wvn, only : ngc, ngs
+      use rrtmg_sw_reftra, only: reftra_sw
+      use rrtmg_sw_taumol, only: taumol_sw
+      use rrtmg_sw_vrtqdr, only: vrtqdr_sw
+
+      implicit none
+
+      contains
+
+! ---------------------------------------------------------------------------
+      subroutine spcvrt_sw &
+            (nlayers, istart, iend, icpr, idelm, iout, &
+             pavel, tavel, pz, tz, tbound, palbd, palbp, &
+             pclfr, ptauc, pasyc, pomgc, ptaucorig, &
+             ptaua, pasya, pomga, prmu0, coldry, wkl, adjflux, &
+             laytrop, layswtch, laylow, jp, jt, jt1, &
+             co2mult, colch4, colco2, colh2o, colmol, coln2o, colo2, colo3, &
+             fac00, fac01, fac10, fac11, &
+             selffac, selffrac, indself, forfac, forfrac, indfor, &
+             pbbfd, pbbfu, pbbcd, pbbcu, puvfd, puvcd, pnifd, pnicd, &
+             pbbfddir, pbbcddir, puvfddir, puvcddir, pnifddir, pnicddir)
+! ---------------------------------------------------------------------------
+!
+! Purpose: Contains spectral loop to compute the shortwave radiative fluxes, 
+!          using the two-stream method of H. Barker. 
+!
+! Interface:  *spcvrt_sw* is called from *rrtmg_sw.F90* or rrtmg_sw.1col.F90*
+!
+! Method:
+!    Adapted from two-stream model of H. Barker;
+!    Two-stream model options (selected with kmodts in rrtmg_sw_reftra.F90):
+!        1: Eddington, 2: PIFM, Zdunkowski et al., 3: discret ordinates
+!
+! Modifications:
+!
+! Original: H. Barker
+! Revision: Merge with RRTMG_SW: J.-J.Morcrette, ECMWF, Feb 2003
+! Revision: Add adjustment for Earth/Sun distance : MJIacono, AER, Oct 2003
+! Revision: Bug fix for use of PALBP and PALBD: MJIacono, AER, Nov 2003
+! Revision: Bug fix to apply delta scaling to clear sky: AER, Dec 2004
+! Revision: Code modified so that delta scaling is not done in cloudy profiles
+!           if routine cldprop is used; delta scaling can be applied by swithcing
+!           code below if cldprop is not used to get cloud properties. 
+!           AER, Jan 2005
+! Revision: Uniform formatting for RRTMG: MJIacono, AER, Jul 2006 
+! Revision: Use exponential lookup table for transmittance: MJIacono, AER, 
+!           Aug 2007 
+!
+! ------------------------------------------------------------------
+
+! ------- Declarations ------
+
+! -------- Input -------
+
+      integer(kind=im), intent(in) :: nlayers
+      integer(kind=im), intent(in) :: istart
+      integer(kind=im), intent(in) :: iend
+      integer(kind=im), intent(in) :: icpr
+      integer(kind=im), intent(in) :: idelm   ! delta-m scaling flag
+                                              ! [0 = direct and diffuse fluxes are unscaled]
+                                              ! [1 = direct and diffuse fluxes are scaled]
+      integer(kind=im), intent(in) :: iout
+      integer(kind=im), intent(in) :: laytrop
+      integer(kind=im), intent(in) :: layswtch
+      integer(kind=im), intent(in) :: laylow
+
+      integer(kind=im), intent(in) :: indfor(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: indself(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jp(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt(:)
+                                                               !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt1(:)
+                                                               !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: pavel(:)                    ! layer pressure (hPa, mb) 
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: tavel(:)                    ! layer temperature (K)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: pz(0:)                      ! level (interface) pressure (hPa, mb)
+                                                               !   Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tz(0:)                      ! level temperatures (hPa, mb)
+                                                               !   Dimensions: (0:nlayers)
+      real(kind=rb), intent(in) :: tbound                      ! surface temperature (K)
+      real(kind=rb), intent(in) :: wkl(:,:)                    ! molecular amounts (mol/cm2) 
+                                                               !   Dimensions: (mxmol,nlayers)
+      real(kind=rb), intent(in) :: coldry(:)                   ! dry air column density (mol/cm2)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colmol(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: adjflux(:)                  ! Earth/Sun distance adjustment
+                                                               !   Dimensions: (jpband)
+
+      real(kind=rb), intent(in) :: palbd(:)                    ! surface albedo (diffuse)
+                                                               !   Dimensions: (nbndsw)
+      real(kind=rb), intent(in) :: palbp(:)                    ! surface albedo (direct)
+                                                               !   Dimensions: (nbndsw)
+      real(kind=rb), intent(in) :: prmu0                       ! cosine of solar zenith angle
+      real(kind=rb), intent(in) :: pclfr(:)                    ! cloud fraction
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: ptauc(:,:)                  ! cloud optical depth
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: pasyc(:,:)                  ! cloud asymmetry parameter
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: pomgc(:,:)                  ! cloud single scattering albedo
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: ptaucorig(:,:)              ! cloud optical depth, non-delta scaled
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: ptaua(:,:)                  ! aerosol optical depth
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: pasya(:,:)                  ! aerosol asymmetry parameter
+                                                               !   Dimensions: (nlayers,nbndsw)
+      real(kind=rb), intent(in) :: pomga(:,:)                  ! aerosol single scattering albedo
+                                                               !   Dimensions: (nlayers,nbndsw)
+
+      real(kind=rb), intent(in) :: colh2o(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colco2(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colch4(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: co2mult(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo3(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo2(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: coln2o(:)
+                                                               !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: forfac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: forfrac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffrac(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac00(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac01(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac10(:)
+                                                               !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: fac11(:)
+                                                               !   Dimensions: (nlayers)
+
+! ------- Output -------
+                                                               !   All Dimensions: (nlayers+1)
+      real(kind=rb), intent(out) :: pbbcd(:)
+      real(kind=rb), intent(out) :: pbbcu(:)
+      real(kind=rb), intent(out) :: pbbfd(:)
+      real(kind=rb), intent(out) :: pbbfu(:)
+      real(kind=rb), intent(out) :: pbbfddir(:)
+      real(kind=rb), intent(out) :: pbbcddir(:)
+
+      real(kind=rb), intent(out) :: puvcd(:)
+      real(kind=rb), intent(out) :: puvfd(:)
+      real(kind=rb), intent(out) :: puvcddir(:)
+      real(kind=rb), intent(out) :: puvfddir(:)
+
+      real(kind=rb), intent(out) :: pnicd(:)
+      real(kind=rb), intent(out) :: pnifd(:)
+      real(kind=rb), intent(out) :: pnicddir(:)
+      real(kind=rb), intent(out) :: pnifddir(:)
+
+! Output - inactive                                            !   All Dimensions: (nlayers+1)
+!      real(kind=rb), intent(out) :: puvcu(:)
+!      real(kind=rb), intent(out) :: puvfu(:)
+!      real(kind=rb), intent(out) :: pnicu(:)
+!      real(kind=rb), intent(out) :: pnifu(:)
+!      real(kind=rb), intent(out) :: pvscd(:)
+!      real(kind=rb), intent(out) :: pvscu(:)
+!      real(kind=rb), intent(out) :: pvsfd(:)
+!      real(kind=rb), intent(out) :: pvsfu(:)
+
+
+! ------- Local -------
+
+      logical :: lrtchkclr(nlayers),lrtchkcld(nlayers)
+
+      integer(kind=im)  :: klev
+      integer(kind=im) :: ib1, ib2, ibm, igt, ikl, ikp, ikx
+      integer(kind=im) :: iw, jb, jg, jl, jk
+!      integer(kind=im), parameter :: nuv = ?? 
+!      integer(kind=im), parameter :: nvs = ?? 
+      integer(kind=im) :: itind
+
+      real(kind=rb) :: tblind, ze1
+      real(kind=rb) :: zclear, zcloud
+      real(kind=rb) :: zdbt(nlayers+1), zdbt_nodel(nlayers+1)
+      real(kind=rb) :: zgc(nlayers), zgcc(nlayers), zgco(nlayers)
+      real(kind=rb) :: zomc(nlayers), zomcc(nlayers), zomco(nlayers)
+      real(kind=rb) :: zrdnd(nlayers+1), zrdndc(nlayers+1)
+      real(kind=rb) :: zref(nlayers+1), zrefc(nlayers+1), zrefo(nlayers+1)
+      real(kind=rb) :: zrefd(nlayers+1), zrefdc(nlayers+1), zrefdo(nlayers+1)
+      real(kind=rb) :: zrup(nlayers+1), zrupd(nlayers+1)
+      real(kind=rb) :: zrupc(nlayers+1), zrupdc(nlayers+1)
+      real(kind=rb) :: zs1(nlayers+1)
+      real(kind=rb) :: ztauc(nlayers), ztauo(nlayers)
+      real(kind=rb) :: ztdn(nlayers+1), ztdnd(nlayers+1), ztdbt(nlayers+1)
+      real(kind=rb) :: ztoc(nlayers), ztor(nlayers)
+      real(kind=rb) :: ztra(nlayers+1), ztrac(nlayers+1), ztrao(nlayers+1)
+      real(kind=rb) :: ztrad(nlayers+1), ztradc(nlayers+1), ztrado(nlayers+1)
+      real(kind=rb) :: zdbtc(nlayers+1), ztdbtc(nlayers+1)
+      real(kind=rb) :: zincflx(ngptsw), zdbtc_nodel(nlayers+1) 
+      real(kind=rb) :: ztdbt_nodel(nlayers+1), ztdbtc_nodel(nlayers+1)
+
+      real(kind=rb) :: zdbtmc, zdbtmo, zf, zgw, zreflect
+      real(kind=rb) :: zwf, tauorig, repclc
+!     real(kind=rb) :: zincflux                                   ! inactive
+
+! Arrays from rrtmg_sw_taumoln routines
+
+!      real(kind=rb) :: ztaug(nlayers,16), ztaur(nlayers,16)
+!      real(kind=rb) :: zsflxzen(16)
+      real(kind=rb) :: ztaug(nlayers,ngptsw), ztaur(nlayers,ngptsw)
+      real(kind=rb) :: zsflxzen(ngptsw)
+
+! Arrays from rrtmg_sw_vrtqdr routine
+
+      real(kind=rb) :: zcd(nlayers+1,ngptsw), zcu(nlayers+1,ngptsw)
+      real(kind=rb) :: zfd(nlayers+1,ngptsw), zfu(nlayers+1,ngptsw)
+
+! Inactive arrays
+!     real(kind=rb) :: zbbcd(nlayers+1), zbbcu(nlayers+1)
+!     real(kind=rb) :: zbbfd(nlayers+1), zbbfu(nlayers+1)
+!     real(kind=rb) :: zbbfddir(nlayers+1), zbbcddir(nlayers+1)
+
+! ------------------------------------------------------------------
+
+! Initializations
+
+      ib1 = istart
+      ib2 = iend
+      klev = nlayers
+      iw = 0
+      repclc = 1.e-12_rb
+!      zincflux = 0.0_rb
+
+      do jk=1,klev+1
+         pbbcd(jk)=0._rb
+         pbbcu(jk)=0._rb
+         pbbfd(jk)=0._rb
+         pbbfu(jk)=0._rb
+         pbbcddir(jk)=0._rb
+         pbbfddir(jk)=0._rb
+         puvcd(jk)=0._rb
+         puvfd(jk)=0._rb
+         puvcddir(jk)=0._rb
+         puvfddir(jk)=0._rb
+         pnicd(jk)=0._rb
+         pnifd(jk)=0._rb
+         pnicddir(jk)=0._rb
+         pnifddir(jk)=0._rb
+      enddo
+
+
+! Calculate the optical depths for gaseous absorption and Rayleigh scattering
+
+      call taumol_sw(klev, &
+                     colh2o, colco2, colch4, colo2, colo3, colmol, &
+                     laytrop, jp, jt, jt1, &
+                     fac00, fac01, fac10, fac11, &
+                     selffac, selffrac, indself, forfac, forfrac, indfor, &
+                     zsflxzen, ztaug, ztaur)
+
+
+! Top of shortwave spectral band loop, jb = 16 -> 29; ibm = 1 -> 14
+
+      do jb = ib1, ib2
+         ibm = jb-15
+         igt = ngc(ibm)
+
+! Reinitialize g-point counter for each band if output for each band is requested.
+         if (iout.gt.0.and.ibm.ge.2) iw = ngs(ibm-1)
+
+!        do jk=1,klev+1
+!           zbbcd(jk)=0.0_rb
+!           zbbcu(jk)=0.0_rb
+!           zbbfd(jk)=0.0_rb
+!           zbbfu(jk)=0.0_rb
+!        enddo
+
+! Top of g-point interval loop within each band (iw is cumulative counter) 
+         do jg = 1,igt
+            iw = iw+1
+
+! Apply adjustments for correct Earth/Sun distance and zenith angle to incoming solar flux
+            zincflx(iw) = adjflux(jb) * zsflxzen(iw) * prmu0
+!             zincflux = zincflux + adjflux(jb) * zsflxzen(iw) * prmu0           ! inactive
+
+! Compute layer reflectances and transmittances for direct and diffuse sources, 
+! first clear then cloudy
+
+! zrefc(jk)  direct albedo for clear
+! zrefo(jk)  direct albedo for cloud
+! zrefdc(jk) diffuse albedo for clear
+! zrefdo(jk) diffuse albedo for cloud
+! ztrac(jk)  direct transmittance for clear
+! ztrao(jk)  direct transmittance for cloudy
+! ztradc(jk) diffuse transmittance for clear
+! ztrado(jk) diffuse transmittance for cloudy
+!  
+! zref(jk)   direct reflectance
+! zrefd(jk)  diffuse reflectance
+! ztra(jk)   direct transmittance
+! ztrad(jk)  diffuse transmittance
+!
+! zdbtc(jk)  clear direct beam transmittance
+! zdbto(jk)  cloudy direct beam transmittance
+! zdbt(jk)   layer mean direct beam transmittance
+! ztdbt(jk)  total direct beam transmittance at levels
+
+! Clear-sky    
+!   TOA direct beam    
+            ztdbtc(1)=1.0_rb
+            ztdbtc_nodel(1)=1.0_rb
+!   Surface values
+            zdbtc(klev+1) =0.0_rb
+            ztrac(klev+1) =0.0_rb
+            ztradc(klev+1)=0.0_rb
+            zrefc(klev+1) =palbp(ibm)
+            zrefdc(klev+1)=palbd(ibm)
+            zrupc(klev+1) =palbp(ibm)
+            zrupdc(klev+1)=palbd(ibm)
+           
+! Cloudy-sky    
+!   Surface values
+            ztrao(klev+1) =0.0_rb
+            ztrado(klev+1)=0.0_rb
+            zrefo(klev+1) =palbp(ibm)
+            zrefdo(klev+1)=palbd(ibm)
+           
+! Total sky    
+!   TOA direct beam    
+            ztdbt(1)=1.0_rb
+            ztdbt_nodel(1)=1.0_rb
+!   Surface values
+            zdbt(klev+1) =0.0_rb
+            ztra(klev+1) =0.0_rb
+            ztrad(klev+1)=0.0_rb
+            zref(klev+1) =palbp(ibm)
+            zrefd(klev+1)=palbd(ibm)
+            zrup(klev+1) =palbp(ibm)
+            zrupd(klev+1)=palbd(ibm)
+    
+    
+! Top of layer loop
+            do jk=1,klev
+
+! Note: two-stream calculations proceed from top to bottom; 
+!   RRTMG_SW quantities are given bottom to top and are reversed here
+
+               ikl=klev+1-jk
+
+! Set logical flag to do REFTRA calculation
+!   Do REFTRA for all clear layers
+               lrtchkclr(jk)=.true.
+
+!   Do REFTRA only for cloudy layers in profile, since already done for clear layers
+               lrtchkcld(jk)=.false.
+               lrtchkcld(jk)=(pclfr(ikl) > repclc)
+
+! Clear-sky optical parameters - this section inactive     
+!   Original
+!               ztauc(jk) = ztaur(ikl,iw) + ztaug(ikl,iw)
+!               zomcc(jk) = ztaur(ikl,iw) / ztauc(jk)
+!               zgcc(jk) = 0.0001_rb
+!   Total sky optical parameters        
+!               ztauo(jk) = ztaur(ikl,iw) + ztaug(ikl,iw) + ptauc(ikl,ibm)
+!               zomco(jk) = ptauc(ikl,ibm) * pomgc(ikl,ibm) + ztaur(ikl,iw)
+!               zgco (jk) = (ptauc(ikl,ibm) * pomgc(ikl,ibm) * pasyc(ikl,ibm) + &
+!                           ztaur(ikl,iw) * 0.0001_rb) / zomco(jk)
+!               zomco(jk) = zomco(jk) / ztauo(jk)
+
+! Clear-sky optical parameters including aerosols
+               ztauc(jk) = ztaur(ikl,iw) + ztaug(ikl,iw) + ptaua(ikl,ibm)
+               zomcc(jk) = ztaur(ikl,iw) * 1.0_rb + ptaua(ikl,ibm) * pomga(ikl,ibm)
+               zgcc(jk) = pasya(ikl,ibm) * pomga(ikl,ibm) * ptaua(ikl,ibm) / zomcc(jk)
+               zomcc(jk) = zomcc(jk) / ztauc(jk)
+
+! Pre-delta-scaling clear and cloudy direct beam transmittance (must use 'orig', unscaled cloud OD)       
+!   \/\/\/ This block of code is only needed for unscaled direct beam calculation
+               if (idelm .eq. 0) then
+!     
+                  zclear = 1.0_rb - pclfr(ikl)
+                  zcloud = pclfr(ikl)
+
+! Clear
+!                   zdbtmc = exp(-ztauc(jk) / prmu0)
+ 
+! Use exponential lookup table for transmittance, or expansion of exponential for low tau
+                  ze1 = ztauc(jk) / prmu0
+                  if (ze1 .le. od_lo) then
+                     zdbtmc = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+                  else 
+                     tblind = ze1 / (bpade + ze1)
+                     itind = tblint * tblind + 0.5_rb
+                     zdbtmc = exp_tbl(itind)
+                  endif
+
+                  zdbtc_nodel(jk) = zdbtmc
+                  ztdbtc_nodel(jk+1) = zdbtc_nodel(jk) * ztdbtc_nodel(jk)
+
+! Clear + Cloud
+                  tauorig = ztauc(jk) + ptaucorig(ikl,ibm)
+!                   zdbtmo = exp(-tauorig / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of exponential for low tau
+                  ze1 = tauorig / prmu0
+                  if (ze1 .le. od_lo) then
+                     zdbtmo = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+                  else
+                     tblind = ze1 / (bpade + ze1)
+                     itind = tblint * tblind + 0.5_rb
+                     zdbtmo = exp_tbl(itind)
+                  endif
+
+                  zdbt_nodel(jk) = zclear * zdbtmc + zcloud * zdbtmo
+                  ztdbt_nodel(jk+1) = zdbt_nodel(jk) * ztdbt_nodel(jk)
+
+               endif
+!   /\/\/\ Above code only needed for unscaled direct beam calculation
+
+
+! Delta scaling - clear   
+               zf = zgcc(jk) * zgcc(jk)
+               zwf = zomcc(jk) * zf
+               ztauc(jk) = (1.0_rb - zwf) * ztauc(jk)
+               zomcc(jk) = (zomcc(jk) - zwf) / (1.0_rb - zwf)
+               zgcc (jk) = (zgcc(jk) - zf) / (1.0_rb - zf)
+
+! Total sky optical parameters (cloud properties already delta-scaled)
+!   Use this code if cloud properties are derived in rrtmg_sw_cldprop       
+               if (icpr .ge. 1) then
+                  ztauo(jk) = ztauc(jk) + ptauc(ikl,ibm)
+                  zomco(jk) = ztauc(jk) * zomcc(jk) + ptauc(ikl,ibm) * pomgc(ikl,ibm) 
+                  zgco (jk) = (ptauc(ikl,ibm) * pomgc(ikl,ibm) * pasyc(ikl,ibm) + &
+                              ztauc(jk) * zomcc(jk) * zgcc(jk)) / zomco(jk)
+                  zomco(jk) = zomco(jk) / ztauo(jk)
+
+! Total sky optical parameters (if cloud properties not delta scaled)
+!   Use this code if cloud properties are not derived in rrtmg_sw_cldprop       
+               elseif (icpr .eq. 0) then
+                  ztauo(jk) = ztaur(ikl,iw) + ztaug(ikl,iw) + ptaua(ikl,ibm) + ptauc(ikl,ibm)
+                  zomco(jk) = ptaua(ikl,ibm) * pomga(ikl,ibm) + ptauc(ikl,ibm) * pomgc(ikl,ibm) + &
+                              ztaur(ikl,iw) * 1.0_rb
+                  zgco (jk) = (ptauc(ikl,ibm) * pomgc(ikl,ibm) * pasyc(ikl,ibm) + &
+                              ptaua(ikl,ibm)*pomga(ikl,ibm)*pasya(ikl,ibm)) / zomco(jk)
+                  zomco(jk) = zomco(jk) / ztauo(jk)
+
+! Delta scaling - clouds 
+!   Use only if subroutine rrtmg_sw_cldprop is not used to get cloud properties and to apply delta scaling
+                  zf = zgco(jk) * zgco(jk)
+                  zwf = zomco(jk) * zf
+                  ztauo(jk) = (1._rb - zwf) * ztauo(jk)
+                  zomco(jk) = (zomco(jk) - zwf) / (1.0_rb - zwf)
+                  zgco (jk) = (zgco(jk) - zf) / (1.0_rb - zf)
+               endif 
+
+! End of layer loop
+            enddo    
+
+
+! Clear sky reflectivities
+            call reftra_sw (klev, &
+                            lrtchkclr, zgcc, prmu0, ztauc, zomcc, &
+                            zrefc, zrefdc, ztrac, ztradc)
+
+! Total sky reflectivities      
+            call reftra_sw (klev, &
+                            lrtchkcld, zgco, prmu0, ztauo, zomco, &
+                            zrefo, zrefdo, ztrao, ztrado)
+
+
+            do jk=1,klev
+
+! Combine clear and cloudy contributions for total sky
+               ikl = klev+1-jk 
+               zclear = 1.0_rb - pclfr(ikl)
+               zcloud = pclfr(ikl)
+
+               zref(jk) = zclear*zrefc(jk) + zcloud*zrefo(jk)
+               zrefd(jk)= zclear*zrefdc(jk) + zcloud*zrefdo(jk)
+               ztra(jk) = zclear*ztrac(jk) + zcloud*ztrao(jk)
+               ztrad(jk)= zclear*ztradc(jk) + zcloud*ztrado(jk)
+
+! Direct beam transmittance        
+
+! Clear
+!                zdbtmc = exp(-ztauc(jk) / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of 
+! exponential for low tau
+               ze1 = ztauc(jk) / prmu0
+               if (ze1 .le. od_lo) then
+                  zdbtmc = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+               else
+                  tblind = ze1 / (bpade + ze1)
+                  itind = tblint * tblind + 0.5_rb
+                  zdbtmc = exp_tbl(itind)
+               endif
+
+               zdbtc(jk) = zdbtmc
+               ztdbtc(jk+1) = zdbtc(jk)*ztdbtc(jk)
+
+! Clear + Cloud
+!                zdbtmo = exp(-ztauo(jk) / prmu0)
+
+! Use exponential lookup table for transmittance, or expansion of 
+! exponential for low tau
+               ze1 = ztauo(jk) / prmu0
+               if (ze1 .le. od_lo) then
+                  zdbtmo = 1._rb - ze1 + 0.5_rb * ze1 * ze1
+               else
+                  tblind = ze1 / (bpade + ze1)
+                  itind = tblint * tblind + 0.5_rb
+                  zdbtmo = exp_tbl(itind)
+               endif
+
+               zdbt(jk) = zclear*zdbtmc + zcloud*zdbtmo
+               ztdbt(jk+1) = zdbt(jk)*ztdbt(jk)
+        
+            enddo           
+                 
+! Vertical quadrature for clear-sky fluxes
+
+            call vrtqdr_sw (klev, iw, &
+                            zrefc, zrefdc, ztrac, ztradc, &
+                            zdbtc, zrdndc, zrupc, zrupdc, ztdbtc, &
+                            zcd, zcu)
+      
+! Vertical quadrature for cloudy fluxes
+
+            call vrtqdr_sw (klev, iw, &
+                            zref, zrefd, ztra, ztrad, &
+                            zdbt, zrdnd, zrup, zrupd, ztdbt, &
+                            zfd, zfu)
+
+! Upwelling and downwelling fluxes at levels
+!   Two-stream calculations go from top to bottom; 
+!   layer indexing is reversed to go bottom to top for output arrays
+
+            do jk=1,klev+1
+               ikl=klev+2-jk
+
+! Accumulate spectral fluxes over bands - inactive
+!               zbbfu(ikl) = zbbfu(ikl) + zincflx(iw)*zfu(jk,iw)  
+!               zbbfd(ikl) = zbbfd(ikl) + zincflx(iw)*zfd(jk,iw)
+!               zbbcu(ikl) = zbbcu(ikl) + zincflx(iw)*zcu(jk,iw)
+!               zbbcd(ikl) = zbbcd(ikl) + zincflx(iw)*zcd(jk,iw)
+!               zbbfddir(ikl) = zbbfddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+!               zbbcddir(ikl) = zbbcddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+
+! Accumulate spectral fluxes over whole spectrum  
+               pbbfu(ikl) = pbbfu(ikl) + zincflx(iw)*zfu(jk,iw)
+               pbbfd(ikl) = pbbfd(ikl) + zincflx(iw)*zfd(jk,iw)
+               pbbcu(ikl) = pbbcu(ikl) + zincflx(iw)*zcu(jk,iw)
+               pbbcd(ikl) = pbbcd(ikl) + zincflx(iw)*zcd(jk,iw)
+               if (idelm .eq. 0) then 
+                  pbbfddir(ikl) = pbbfddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+                  pbbcddir(ikl) = pbbcddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+               elseif (idelm .eq. 1) then
+                  pbbfddir(ikl) = pbbfddir(ikl) + zincflx(iw)*ztdbt(jk)
+                  pbbcddir(ikl) = pbbcddir(ikl) + zincflx(iw)*ztdbtc(jk)
+               endif
+
+! Accumulate direct fluxes for UV/visible bands
+               if (ibm >= 10 .and. ibm <= 13) then
+                  puvcd(ikl) = puvcd(ikl) + zincflx(iw)*zcd(jk,iw)
+                  puvfd(ikl) = puvfd(ikl) + zincflx(iw)*zfd(jk,iw)
+                  if (idelm .eq. 0) then 
+                     puvfddir(ikl) = puvfddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+                     puvcddir(ikl) = puvcddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+                  elseif (idelm .eq. 1) then
+                     puvfddir(ikl) = puvfddir(ikl) + zincflx(iw)*ztdbt(jk)
+                     puvcddir(ikl) = puvcddir(ikl) + zincflx(iw)*ztdbtc(jk)
+                  endif
+! Accumulate direct fluxes for near-IR bands
+               else if (ibm == 14 .or. ibm <= 9) then  
+                  pnicd(ikl) = pnicd(ikl) + zincflx(iw)*zcd(jk,iw)
+                  pnifd(ikl) = pnifd(ikl) + zincflx(iw)*zfd(jk,iw)
+                  if (idelm .eq. 0) then 
+                     pnifddir(ikl) = pnifddir(ikl) + zincflx(iw)*ztdbt_nodel(jk)
+                     pnicddir(ikl) = pnicddir(ikl) + zincflx(iw)*ztdbtc_nodel(jk)
+                  elseif (idelm .eq. 1) then
+                     pnifddir(ikl) = pnifddir(ikl) + zincflx(iw)*ztdbt(jk)
+                     pnicddir(ikl) = pnicddir(ikl) + zincflx(iw)*ztdbtc(jk)
+                  endif
+               endif
+
+            enddo
+
+! End loop on jg, g-point interval
+         enddo             
+
+! End loop on jb, spectral band
+      enddo                    
+
+      end subroutine spcvrt_sw
+
+      end module rrtmg_sw_spcvrt
+
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_taumol.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_taumol.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_taumol.f90	(revision 3477)
@@ -0,0 +1,1541 @@
+!     path:      $Source$
+!     author:    $Author: mike $
+!     revision:  $Revision: 11661 $
+!     created:   $Date: 2009-05-22 18:22:22 -0400 (Fri, 22 May 2009) $
+
+      module rrtmg_sw_taumol
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only : im => kind_im, rb => kind_rb
+!      use parrrsw, only : mg, jpband, nbndsw, ngptsw
+      use rrsw_con, only: oneminus
+      use rrsw_wvn, only: nspa, nspb
+      use rrsw_vsn, only: hvrtau, hnamtau
+
+      implicit none
+
+      contains
+
+!----------------------------------------------------------------------------
+      subroutine taumol_sw(nlayers, &
+                           colh2o, colco2, colch4, colo2, colo3, colmol, &
+                           laytrop, jp, jt, jt1, &
+                           fac00, fac01, fac10, fac11, &
+                           selffac, selffrac, indself, forfac, forfrac, indfor, &
+                           sfluxzen, taug, taur)
+!----------------------------------------------------------------------------
+
+! ******************************************************************************
+! *                                                                            *
+! *                 Optical depths developed for the                           *
+! *                                                                            *
+! *               RAPID RADIATIVE TRANSFER MODEL (RRTM)                        *
+! *                                                                            *
+! *                                                                            *
+! *           ATMOSPHERIC AND ENVIRONMENTAL RESEARCH, INC.                     *
+! *                       131 HARTWELL AVENUE                                  *
+! *                       LEXINGTON, MA 02421                                  *
+! *                                                                            *
+! *                                                                            *
+! *                          ELI J. MLAWER                                     *
+! *                        JENNIFER DELAMERE                                   *
+! *                        STEVEN J. TAUBMAN                                   *
+! *                        SHEPARD A. CLOUGH                                   *
+! *                                                                            *
+! *                                                                            *
+! *                                                                            *
+! *                                                                            *
+! *                      email:  mlawer@aer.com                                *
+! *                      email:  jdelamer@aer.com                              *
+! *                                                                            *
+! *       The authors wish to acknowledge the contributions of the             *
+! *       following people:  Patrick D. Brown, Michael J. Iacono,              *
+! *       Ronald E. Farren, Luke Chen, Robert Bergstrom.                       *
+! *                                                                            *
+! ******************************************************************************
+! *    TAUMOL                                                                  *
+! *                                                                            *
+! *    This file contains the subroutines TAUGBn (where n goes from            *
+! *    1 to 28).  TAUGBn calculates the optical depths and Planck fractions    *
+! *    per g-value and layer for band n.                                       *
+! *                                                                            *
+! * Output:  optical depths (unitless)                                         *
+! *          fractions needed to compute Planck functions at every layer       *
+! *              and g-value                                                   *
+! *                                                                            *
+! *    COMMON /TAUGCOM/  TAUG(MXLAY,MG)                                        *
+! *    COMMON /PLANKG/   FRACS(MXLAY,MG)                                       *
+! *                                                                            *
+! * Input                                                                      *
+! *                                                                            *
+! *    PARAMETER (MG=16, MXLAY=203, NBANDS=14)                                 *
+! *                                                                            *
+! *    COMMON /FEATURES/ NG(NBANDS),NSPA(NBANDS),NSPB(NBANDS)                  *
+! *    COMMON /PRECISE/  ONEMINUS                                              *
+! *    COMMON /PROFILE/  NLAYERS,PAVEL(MXLAY),TAVEL(MXLAY),                    *
+! *   &                  PZ(0:MXLAY),TZ(0:MXLAY),TBOUND                        *
+! *    COMMON /PROFDATA/ LAYTROP,LAYSWTCH,LAYLOW,                              *
+! *   &                  COLH2O(MXLAY),COLCO2(MXLAY),                          *
+! *   &                  COLO3(MXLAY),COLN2O(MXLAY),COLCH4(MXLAY),             *
+! *   &                  COLO2(MXLAY),CO2MULT(MXLAY)                           *
+! *    COMMON /INTFAC/   FAC00(MXLAY),FAC01(MXLAY),                            *
+! *   &                  FAC10(MXLAY),FAC11(MXLAY)                             *
+! *    COMMON /INTIND/   JP(MXLAY),JT(MXLAY),JT1(MXLAY)                        *
+! *    COMMON /SELF/     SELFFAC(MXLAY), SELFFRAC(MXLAY), INDSELF(MXLAY)       *
+! *                                                                            *
+! *    Description:                                                            *
+! *    NG(IBAND) - number of g-values in band IBAND                            *
+! *    NSPA(IBAND) - for the lower atmosphere, the number of reference         *
+! *                  atmospheres that are stored for band IBAND per            *
+! *                  pressure level and temperature.  Each of these            *
+! *                  atmospheres has different relative amounts of the         *
+! *                  key species for the band (i.e. different binary           *
+! *                  species parameters).                                      *
+! *    NSPB(IBAND) - same for upper atmosphere                                 *
+! *    ONEMINUS - since problems are caused in some cases by interpolation     *
+! *               parameters equal to or greater than 1, for these cases       *
+! *               these parameters are set to this value, slightly < 1.        *
+! *    PAVEL - layer pressures (mb)                                            *
+! *    TAVEL - layer temperatures (degrees K)                                  *
+! *    PZ - level pressures (mb)                                               *
+! *    TZ - level temperatures (degrees K)                                     *
+! *    LAYTROP - layer at which switch is made from one combination of         *
+! *              key species to another                                        *
+! *    COLH2O, COLCO2, COLO3, COLN2O, COLCH4 - column amounts of water         *
+! *              vapor,carbon dioxide, ozone, nitrous ozide, methane,          *
+! *              respectively (molecules/cm**2)                                *
+! *    CO2MULT - for bands in which carbon dioxide is implemented as a         *
+! *              trace species, this is the factor used to multiply the        *
+! *              band's average CO2 absorption coefficient to get the added    *
+! *              contribution to the optical depth relative to 355 ppm.        *
+! *    FACij(LAY) - for layer LAY, these are factors that are needed to        *
+! *                 compute the interpolation factors that multiply the        *
+! *                 appropriate reference k-values.  A value of 0 (1) for      *
+! *                 i,j indicates that the corresponding factor multiplies     *
+! *                 reference k-value for the lower (higher) of the two        *
+! *                 appropriate temperatures, and altitudes, respectively.     *
+! *    JP - the index of the lower (in altitude) of the two appropriate        *
+! *         reference pressure levels needed for interpolation                 *
+! *    JT, JT1 - the indices of the lower of the two appropriate reference     *
+! *              temperatures needed for interpolation (for pressure           *
+! *              levels JP and JP+1, respectively)                             *
+! *    SELFFAC - scale factor needed to water vapor self-continuum, equals     *
+! *              (water vapor density)/(atmospheric density at 296K and        *
+! *              1013 mb)                                                      *
+! *    SELFFRAC - factor needed for temperature interpolation of reference     *
+! *               water vapor self-continuum data                              *
+! *    INDSELF - index of the lower of the two appropriate reference           *
+! *              temperatures needed for the self-continuum interpolation      *
+! *                                                                            *
+! * Data input                                                                 *
+! *    COMMON /Kn/ KA(NSPA(n),5,13,MG), KB(NSPB(n),5,13:59,MG), SELFREF(10,MG) *
+! *       (note:  n is the band number)                                        *
+! *                                                                            *
+! *    Description:                                                            *
+! *    KA - k-values for low reference atmospheres (no water vapor             *
+! *         self-continuum) (units: cm**2/molecule)                            *
+! *    KB - k-values for high reference atmospheres (all sources)              *
+! *         (units: cm**2/molecule)                                            *
+! *    SELFREF - k-values for water vapor self-continuum for reference         *
+! *              atmospheres (used below LAYTROP)                              *
+! *              (units: cm**2/molecule)                                       *
+! *                                                                            *
+! *    DIMENSION ABSA(65*NSPA(n),MG), ABSB(235*NSPB(n),MG)                     *
+! *    EQUIVALENCE (KA,ABSA),(KB,ABSB)                                         *
+! *                                                                            *
+! *****************************************************************************
+!
+! Modifications
+!
+! Revised: Adapted to F90 coding, J.-J.Morcrette, ECMWF, Feb 2003
+! Revised: Modified for g-point reduction, MJIacono, AER, Dec 2003
+! Revised: Reformatted for consistency with rrtmg_lw, MJIacono, AER, Jul 2006
+!
+! ------- Declarations -------
+
+! ----- Input -----
+      integer(kind=im), intent(in) :: nlayers            ! total number of layers
+
+      integer(kind=im), intent(in) :: laytrop            ! tropopause layer index
+      integer(kind=im), intent(in) :: jp(:)              ! 
+                                                         !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt(:)              !
+                                                         !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: jt1(:)             !
+                                                         !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: colh2o(:)             ! column amount (h2o)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colco2(:)             ! column amount (co2)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo3(:)              ! column amount (o3)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colch4(:)             ! column amount (ch4)
+                                                         !   Dimensions: (nlayers)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colo2(:)              ! column amount (o2)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: colmol(:)             ! 
+                                                         !   Dimensions: (nlayers)
+
+      integer(kind=im), intent(in) :: indself(:)    
+                                                         !   Dimensions: (nlayers)
+      integer(kind=im), intent(in) :: indfor(:)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffac(:)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: selffrac(:)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: forfac(:)
+                                                         !   Dimensions: (nlayers)
+      real(kind=rb), intent(in) :: forfrac(:)
+                                                         !   Dimensions: (nlayers)
+
+      real(kind=rb), intent(in) :: &                     !
+                       fac00(:), fac01(:), &             !   Dimensions: (nlayers)
+                       fac10(:), fac11(:) 
+
+! ----- Output -----
+      real(kind=rb), intent(out) :: sfluxzen(:)          ! solar source function
+                                                         !   Dimensions: (ngptsw)
+      real(kind=rb), intent(out) :: taug(:,:)            ! gaseous optical depth 
+                                                         !   Dimensions: (nlayers,ngptsw)
+      real(kind=rb), intent(out) :: taur(:,:)            ! Rayleigh 
+                                                         !   Dimensions: (nlayers,ngptsw)
+!      real(kind=rb), intent(out) :: ssa(:,:)            ! single scattering albedo (inactive)
+                                                         !   Dimensions: (nlayers,ngptsw)
+
+      hvrtau = '$Revision: 11661 $'
+
+! Calculate gaseous optical depth and planck fractions for each spectral band.
+
+      call taumol16
+      call taumol17
+      call taumol18
+      call taumol19
+      call taumol20
+      call taumol21
+      call taumol22
+      call taumol23
+      call taumol24
+      call taumol25
+      call taumol26
+      call taumol27
+      call taumol28
+      call taumol29
+
+!-------------
+      contains
+!-------------
+
+!----------------------------------------------------------------------------
+      subroutine taumol16
+!----------------------------------------------------------------------------
+!
+!     band 16:  2600-3250 cm-1 (low - h2o,ch4; high - ch4)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng16
+      use rrsw_kg16, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat1
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat1 = 252.131_rb
+      layreffr = 18
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         speccomb = colh2o(lay) + strrat1*colch4(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(16) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(16) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng16
+            taug(lay,ig) = speccomb * &
+                (fac000 * absa(ind0   ,ig) + &
+                 fac100 * absa(ind0 +1,ig) + &
+                 fac010 * absa(ind0 +9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1   ,ig) + &
+                 fac101 * absa(ind1 +1,ig) + &
+                 fac011 * absa(ind1 +9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colh2o(lay) * &
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) 
+!            ssa(lay,ig) = tauray/taug(lay,ig)
+            taur(lay,ig) = tauray
+         enddo
+      enddo
+
+      laysolfr = nlayers
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         if (jp(lay-1) .lt. layreffr .and. jp(lay) .ge. layreffr) &
+            laysolfr = lay
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(16) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(16) + 1
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng16
+            taug(lay,ig) = colch4(lay) * &
+                (fac00(lay) * absb(ind0  ,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1  ,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) 
+!            ssa(lay,ig) = tauray/taug(lay,ig)
+            if (lay .eq. laysolfr) sfluxzen(ig) = sfluxref(ig) 
+            taur(lay,ig) = tauray  
+         enddo
+      enddo
+
+      end subroutine taumol16
+
+!----------------------------------------------------------------------------
+      subroutine taumol17
+!----------------------------------------------------------------------------
+!
+!     band 17:  3250-4000 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng17, ngs16
+      use rrsw_kg17, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 0.364641_rb
+      layreffr = 30
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         speccomb = colh2o(lay) + strrat*colco2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(17) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(17) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng17
+            taug(lay,ngs16+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colh2o(lay) * &
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) 
+!             ssa(lay,ngs16+ig) = tauray/taug(lay,ngs16+ig)
+            taur(lay,ngs16+ig) = tauray
+         enddo
+      enddo
+
+      laysolfr = nlayers
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         if (jp(lay-1) .lt. layreffr .and. jp(lay) .ge. layreffr) &
+            laysolfr = lay
+         speccomb = colh2o(lay) + strrat*colco2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 4._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(17) + js
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(17) + js
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng17
+            taug(lay,ngs16+ig) = speccomb * &
+                (fac000 * absb(ind0,ig) + &
+                 fac100 * absb(ind0+1,ig) + &
+                 fac010 * absb(ind0+5,ig) + &
+                 fac110 * absb(ind0+6,ig) + &
+                 fac001 * absb(ind1,ig) + &
+                 fac101 * absb(ind1+1,ig) + &
+                 fac011 * absb(ind1+5,ig) + &
+                 fac111 * absb(ind1+6,ig)) + &
+                 colh2o(lay) * &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))) 
+!            ssa(lay,ngs16+ig) = tauray/taug(lay,ngs16+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs16+ig) = sfluxref(ig,js) &
+               + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs16+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol17
+
+!----------------------------------------------------------------------------
+      subroutine taumol18
+!----------------------------------------------------------------------------
+!
+!     band 18:  4000-4650 cm-1 (low - h2o,ch4; high - ch4)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng18, ngs17
+      use rrsw_kg18, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 38.9589_rb
+      layreffr = 6
+      laysolfr = laytrop
+      
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         speccomb = colh2o(lay) + strrat*colch4(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(18) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(18) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng18
+            taug(lay,ngs17+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colh2o(lay) * &
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) 
+!            ssa(lay,ngs17+ig) = tauray/taug(lay,ngs17+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs17+ig) = sfluxref(ig,js) &
+               + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs17+ig) = tauray
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(18) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(18) + 1
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng18
+            taug(lay,ngs17+ig) = colch4(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &	  
+                 fac11(lay) * absb(ind1+1,ig)) 
+!           ssa(lay,ngs17+ig) = tauray/taug(lay,ngs17+ig)
+           taur(lay,ngs17+ig) = tauray
+         enddo
+       enddo
+
+       end subroutine taumol18
+
+!----------------------------------------------------------------------------
+      subroutine taumol19
+!----------------------------------------------------------------------------
+!
+!     band 19:  4650-5150 cm-1 (low - h2o,co2; high - co2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng19, ngs18
+      use rrsw_kg19, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 5.49281_rb
+      layreffr = 3
+      laysolfr = laytrop
+
+! Lower atmosphere loop      
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         speccomb = colh2o(lay) + strrat*colco2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(19) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(19) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1 , ng19
+            taug(lay,ngs18+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colh2o(lay) * &
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + & 
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) 
+!            ssa(lay,ngs18+ig) = tauray/taug(lay,ngs18+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs18+ig) = sfluxref(ig,js) &
+               + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs18+ig) = tauray   
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(19) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(19) + 1
+         tauray = colmol(lay) * rayl
+
+         do ig = 1 , ng19
+            taug(lay,ngs18+ig) = colco2(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) 
+!            ssa(lay,ngs18+ig) = tauray/taug(lay,ngs18+ig) 
+            taur(lay,ngs18+ig) = tauray   
+         enddo
+      enddo
+
+      end subroutine taumol19
+
+!----------------------------------------------------------------------------
+      subroutine taumol20
+!----------------------------------------------------------------------------
+!
+!     band 20:  5150-6150 cm-1 (low - h2o; high - h2o)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng20, ngs19
+      use rrsw_kg20, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, absch4, rayl
+
+      implicit none
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      layreffr = 3
+      laysolfr = laytrop
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(20) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(20) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng20
+            taug(lay,ngs19+ig) = colh2o(lay) * &
+               ((fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) + &
+                 selffac(lay) * (selfref(inds,ig) + & 
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) &
+                 + colch4(lay) * absch4(ig)
+!            ssa(lay,ngs19+ig) = tauray/taug(lay,ngs19+ig)
+            taur(lay,ngs19+ig) = tauray 
+            if (lay .eq. laysolfr) sfluxzen(ngs19+ig) = sfluxref(ig) 
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(20) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(20) + 1
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng20
+            taug(lay,ngs19+ig) = colh2o(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) + &
+                 colch4(lay) * absch4(ig)
+!            ssa(lay,ngs19+ig) = tauray/taug(lay,ngs19+ig)
+            taur(lay,ngs19+ig) = tauray 
+         enddo
+      enddo
+
+      end subroutine taumol20
+
+!----------------------------------------------------------------------------
+      subroutine taumol21
+!----------------------------------------------------------------------------
+!
+!     band 21:  6150-7700 cm-1 (low - h2o,co2; high - h2o,co2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng21, ngs20
+      use rrsw_kg21, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 0.0045321_rb
+      layreffr = 8
+      laysolfr = laytrop
+      
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         speccomb = colh2o(lay) + strrat*colco2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(21) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(21) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng21
+            taug(lay,ngs20+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colh2o(lay) * &
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))))
+!            ssa(lay,ngs20+ig) = tauray/taug(lay,ngs20+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs20+ig) = sfluxref(ig,js) &
+               + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs20+ig) = tauray
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         speccomb = colh2o(lay) + strrat*colco2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 4._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(21) + js
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(21) + js
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng21
+            taug(lay,ngs20+ig) = speccomb * &
+                (fac000 * absb(ind0,ig) + &
+                 fac100 * absb(ind0+1,ig) + &
+                 fac010 * absb(ind0+5,ig) + &
+                 fac110 * absb(ind0+6,ig) + &
+                 fac001 * absb(ind1,ig) + &
+                 fac101 * absb(ind1+1,ig) + &
+                 fac011 * absb(ind1+5,ig) + &
+                 fac111 * absb(ind1+6,ig)) + &
+                 colh2o(lay) * &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))
+!            ssa(lay,ngs20+ig) = tauray/taug(lay,ngs20+ig)
+            taur(lay,ngs20+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol21
+
+!----------------------------------------------------------------------------
+      subroutine taumol22
+!----------------------------------------------------------------------------
+!
+!     band 22:  7700-8050 cm-1 (low - h2o,o2; high - o2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng22, ngs21
+      use rrsw_kg22, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, o2adj, o2cont, strrat
+
+! The following factor is the ratio of total O2 band intensity (lines 
+! and Mate continuum) to O2 band intensity (line only).  It is needed
+! to adjust the optical depths since the k's include only lines.
+      o2adj = 1.6_rb
+      
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 0.022708_rb
+      layreffr = 2
+      laysolfr = laytrop
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         o2cont = 4.35e-4_rb*colo2(lay)/(350.0_rb*2.0_rb)
+         speccomb = colh2o(lay) + o2adj*strrat*colo2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+!         odadj = specparm + o2adj * (1._rb - specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(22) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(22) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng22
+            taug(lay,ngs21+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colh2o(lay) * &
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                  (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) &
+                 + o2cont
+!            ssa(lay,ngs21+ig) = tauray/taug(lay,ngs21+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs21+ig) = sfluxref(ig,js) &
+                + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs21+ig) = tauray
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         o2cont = 4.35e-4_rb*colo2(lay)/(350.0_rb*2.0_rb)
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(22) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(22) + 1
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng22
+            taug(lay,ngs21+ig) = colo2(lay) * o2adj * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) + &
+                 o2cont
+!            ssa(lay,ngs21+ig) = tauray/taug(lay,ngs21+ig)
+            taur(lay,ngs21+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol22
+
+!----------------------------------------------------------------------------
+      subroutine taumol23
+!----------------------------------------------------------------------------
+!
+!     band 23:  8050-12850 cm-1 (low - h2o; high - nothing)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng23, ngs22
+      use rrsw_kg23, only : absa, ka, forref, selfref, &
+                            sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, givfac
+
+! Average Giver et al. correction factor for this band.
+      givfac = 1.029_rb
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      layreffr = 6
+      laysolfr = laytrop
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(23) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(23) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+
+         do ig = 1, ng23
+            tauray = colmol(lay) * rayl(ig)
+            taug(lay,ngs22+ig) = colh2o(lay) * &
+                (givfac * (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) + &
+                 selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + &
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) 
+!            ssa(lay,ngs22+ig) = tauray/taug(lay,ngs22+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs22+ig) = sfluxref(ig) 
+            taur(lay,ngs22+ig) = tauray
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         do ig = 1, ng23
+!            taug(lay,ngs22+ig) = colmol(lay) * rayl(ig)
+!            ssa(lay,ngs22+ig) = 1.0_rb
+            taug(lay,ngs22+ig) = 0._rb
+            taur(lay,ngs22+ig) = colmol(lay) * rayl(ig) 
+         enddo
+      enddo
+
+      end subroutine taumol23
+
+!----------------------------------------------------------------------------
+      subroutine taumol24
+!----------------------------------------------------------------------------
+!
+!     band 24:  12850-16000 cm-1 (low - h2o,o2; high - o2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng24, ngs23
+      use rrsw_kg24, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, abso3a, abso3b, rayla, raylb
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 0.124692_rb
+      layreffr = 1
+      laysolfr = laytrop
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         speccomb = colh2o(lay) + strrat*colo2(lay)
+         specparm = colh2o(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(24) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(24) + js
+         inds = indself(lay)
+         indf = indfor(lay)
+
+         do ig = 1, ng24
+            tauray = colmol(lay) * (rayla(ig,js) + &
+               fs * (rayla(ig,js+1) - rayla(ig,js)))
+            taug(lay,ngs23+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) + &
+                 colo3(lay) * abso3a(ig) + &
+                 colh2o(lay) * & 
+                 (selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + & 
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig))))
+!            ssa(lay,ngs23+ig) = tauray/taug(lay,ngs23+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs23+ig) = sfluxref(ig,js) &
+               + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs23+ig) = tauray
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(24) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(24) + 1
+
+         do ig = 1, ng24
+            tauray = colmol(lay) * raylb(ig)
+            taug(lay,ngs23+ig) = colo2(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) + &
+                 colo3(lay) * abso3b(ig)
+!            ssa(lay,ngs23+ig) = tauray/taug(lay,ngs23+ig)
+            taur(lay,ngs23+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol24
+
+!----------------------------------------------------------------------------
+      subroutine taumol25
+!----------------------------------------------------------------------------
+!
+!     band 25:  16000-22650 cm-1 (low - h2o; high - nothing)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng25, ngs24
+      use rrsw_kg25, only : absa, ka, &
+                            sfluxref, abso3a, abso3b, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      layreffr = 2
+      laysolfr = laytrop
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         if (jp(lay) .lt. layreffr .and. jp(lay+1) .ge. layreffr) &
+            laysolfr = min(lay+1,laytrop)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(25) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(25) + 1
+
+         do ig = 1, ng25
+            tauray = colmol(lay) * rayl(ig)
+            taug(lay,ngs24+ig) = colh2o(lay) * &
+                (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) + &
+                 colo3(lay) * abso3a(ig) 
+!            ssa(lay,ngs24+ig) = tauray/taug(lay,ngs24+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs24+ig) = sfluxref(ig) 
+            taur(lay,ngs24+ig) = tauray
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         do ig = 1, ng25
+            tauray = colmol(lay) * rayl(ig)
+            taug(lay,ngs24+ig) = colo3(lay) * abso3b(ig) 
+!            ssa(lay,ngs24+ig) = tauray/taug(lay,ngs24+ig)
+            taur(lay,ngs24+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol25
+
+!----------------------------------------------------------------------------
+      subroutine taumol26
+!----------------------------------------------------------------------------
+!
+!     band 26:  22650-29000 cm-1 (low - nothing; high - nothing)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng26, ngs25
+      use rrsw_kg26, only : sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      laysolfr = laytrop
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         do ig = 1, ng26 
+!            taug(lay,ngs25+ig) = colmol(lay) * rayl(ig)
+!            ssa(lay,ngs25+ig) = 1.0_rb
+            if (lay .eq. laysolfr) sfluxzen(ngs25+ig) = sfluxref(ig) 
+            taug(lay,ngs25+ig) = 0._rb
+            taur(lay,ngs25+ig) = colmol(lay) * rayl(ig) 
+         enddo
+      enddo
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         do ig = 1, ng26
+!            taug(lay,ngs25+ig) = colmol(lay) * rayl(ig)
+!            ssa(lay,ngs25+ig) = 1.0_rb
+            taug(lay,ngs25+ig) = 0._rb
+            taur(lay,ngs25+ig) = colmol(lay) * rayl(ig) 
+         enddo
+      enddo
+
+      end subroutine taumol26
+
+!----------------------------------------------------------------------------
+      subroutine taumol27
+!----------------------------------------------------------------------------
+!
+!     band 27:  29000-38000 cm-1 (low - o3; high - o3)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng27, ngs26
+      use rrsw_kg27, only : absa, ka, absb, kb, sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, scalekur
+
+! Kurucz solar source function
+! The values in sfluxref were obtained using the "low resolution"
+! version of the Kurucz solar source function.  For unknown reasons,
+! the total irradiance in this band differs from the corresponding
+! total in the "high-resolution" version of the Kurucz function.
+! Therefore, these values are scaled below by the factor SCALEKUR.
+
+      scalekur = 50.15_rb/48.37_rb
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      layreffr = 32
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(27) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(27) + 1
+
+         do ig = 1, ng27
+            tauray = colmol(lay) * rayl(ig)
+            taug(lay,ngs26+ig) = colo3(lay) * &
+                (fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig))
+!            ssa(lay,ngs26+ig) = tauray/taug(lay,ngs26+ig)
+            taur(lay,ngs26+ig) = tauray
+         enddo
+      enddo
+
+      laysolfr = nlayers
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         if (jp(lay-1) .lt. layreffr .and. jp(lay) .ge. layreffr) &
+            laysolfr = lay
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(27) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(27) + 1
+
+         do ig = 1, ng27
+            tauray = colmol(lay) * rayl(ig)
+            taug(lay,ngs26+ig) = colo3(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + & 
+                 fac11(lay) * absb(ind1+1,ig))
+!            ssa(lay,ngs26+ig) = tauray/taug(lay,ngs26+ig)
+            if (lay.eq.laysolfr) sfluxzen(ngs26+ig) = scalekur * sfluxref(ig) 
+            taur(lay,ngs26+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol27
+
+!----------------------------------------------------------------------------
+      subroutine taumol28
+!----------------------------------------------------------------------------
+!
+!     band 28:  38000-50000 cm-1 (low - o3,o2; high - o3,o2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng28, ngs27
+      use rrsw_kg28, only : absa, ka, absb, kb, sfluxref, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray, strrat
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      strrat = 6.67029e-07_rb
+      layreffr = 58
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         speccomb = colo3(lay) + strrat*colo2(lay)
+         specparm = colo3(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 8._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(28) + js
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(28) + js
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng28
+            taug(lay,ngs27+ig) = speccomb * &
+                (fac000 * absa(ind0,ig) + &
+                 fac100 * absa(ind0+1,ig) + &
+                 fac010 * absa(ind0+9,ig) + &
+                 fac110 * absa(ind0+10,ig) + &
+                 fac001 * absa(ind1,ig) + &
+                 fac101 * absa(ind1+1,ig) + &
+                 fac011 * absa(ind1+9,ig) + &
+                 fac111 * absa(ind1+10,ig)) 
+!            ssa(lay,ngs27+ig) = tauray/taug(lay,ngs27+ig)
+            taur(lay,ngs27+ig) = tauray
+         enddo
+      enddo
+
+      laysolfr = nlayers
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         if (jp(lay-1) .lt. layreffr .and. jp(lay) .ge. layreffr) &
+            laysolfr = lay
+         speccomb = colo3(lay) + strrat*colo2(lay)
+         specparm = colo3(lay)/speccomb 
+         if (specparm .ge. oneminus) specparm = oneminus
+         specmult = 4._rb*(specparm)
+         js = 1 + int(specmult)
+         fs = mod(specmult, 1._rb )
+         fac000 = (1._rb - fs) * fac00(lay)
+         fac010 = (1._rb - fs) * fac10(lay)
+         fac100 = fs * fac00(lay)
+         fac110 = fs * fac10(lay)
+         fac001 = (1._rb - fs) * fac01(lay)
+         fac011 = (1._rb - fs) * fac11(lay)
+         fac101 = fs * fac01(lay)
+         fac111 = fs * fac11(lay)
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(28) + js
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(28) + js
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng28
+            taug(lay,ngs27+ig) = speccomb * &
+                (fac000 * absb(ind0,ig) + &
+                 fac100 * absb(ind0+1,ig) + &
+                 fac010 * absb(ind0+5,ig) + &
+                 fac110 * absb(ind0+6,ig) + &
+                 fac001 * absb(ind1,ig) + &
+                 fac101 * absb(ind1+1,ig) + &
+                 fac011 * absb(ind1+5,ig) + &
+                 fac111 * absb(ind1+6,ig)) 
+!            ssa(lay,ngs27+ig) = tauray/taug(lay,ngs27+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs27+ig) = sfluxref(ig,js) &
+               + fs * (sfluxref(ig,js+1) - sfluxref(ig,js))
+            taur(lay,ngs27+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol28
+
+!----------------------------------------------------------------------------
+      subroutine taumol29
+!----------------------------------------------------------------------------
+!
+!     band 29:  820-2600 cm-1 (low - h2o; high - co2)
+!
+!----------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parrrsw, only : ng29, ngs28
+      use rrsw_kg29, only : absa, ka, absb, kb, forref, selfref, &
+                            sfluxref, absh2o, absco2, rayl
+
+! ------- Declarations -------
+
+! Local
+
+      integer(kind=im) :: ig, ind0, ind1, inds, indf, js, lay, laysolfr, &
+                          layreffr
+      real(kind=rb) :: fac000, fac001, fac010, fac011, fac100, fac101, &
+                       fac110, fac111, fs, speccomb, specmult, specparm, &
+                       tauray
+
+! Compute the optical depth by interpolating in ln(pressure), 
+! temperature, and appropriate species.  Below LAYTROP, the water
+! vapor self-continuum is interpolated (in temperature) separately.  
+
+      layreffr = 49
+
+! Lower atmosphere loop
+      do lay = 1, laytrop
+         ind0 = ((jp(lay)-1)*5+(jt(lay)-1))*nspa(29) + 1
+         ind1 = (jp(lay)*5+(jt1(lay)-1))*nspa(29) + 1
+         inds = indself(lay)
+         indf = indfor(lay)
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng29
+            taug(lay,ngs28+ig) = colh2o(lay) * &
+               ((fac00(lay) * absa(ind0,ig) + &
+                 fac10(lay) * absa(ind0+1,ig) + &
+                 fac01(lay) * absa(ind1,ig) + &
+                 fac11(lay) * absa(ind1+1,ig)) + &
+                 selffac(lay) * (selfref(inds,ig) + &
+                 selffrac(lay) * &
+                 (selfref(inds+1,ig) - selfref(inds,ig))) + &
+                 forfac(lay) * (forref(indf,ig) + & 
+                 forfrac(lay) * &
+                 (forref(indf+1,ig) - forref(indf,ig)))) &
+                 + colco2(lay) * absco2(ig) 
+!            ssa(lay,ngs28+ig) = tauray/taug(lay,ngs28+ig)
+            taur(lay,ngs28+ig) = tauray
+         enddo
+      enddo
+
+      laysolfr = nlayers
+
+! Upper atmosphere loop
+      do lay = laytrop+1, nlayers
+         if (jp(lay-1) .lt. layreffr .and. jp(lay) .ge. layreffr) &
+            laysolfr = lay
+         ind0 = ((jp(lay)-13)*5+(jt(lay)-1))*nspb(29) + 1
+         ind1 = ((jp(lay)-12)*5+(jt1(lay)-1))*nspb(29) + 1
+         tauray = colmol(lay) * rayl
+
+         do ig = 1, ng29
+            taug(lay,ngs28+ig) = colco2(lay) * &
+                (fac00(lay) * absb(ind0,ig) + &
+                 fac10(lay) * absb(ind0+1,ig) + &
+                 fac01(lay) * absb(ind1,ig) + &
+                 fac11(lay) * absb(ind1+1,ig)) &  
+                 + colh2o(lay) * absh2o(ig) 
+!            ssa(lay,ngs28+ig) = tauray/taug(lay,ngs28+ig)
+            if (lay .eq. laysolfr) sfluxzen(ngs28+ig) = sfluxref(ig) 
+            taur(lay,ngs28+ig) = tauray
+         enddo
+      enddo
+
+      end subroutine taumol29
+
+      end subroutine taumol_sw
+
+      end module rrtmg_sw_taumol
+
Index: /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_vrtqdr.f90
===================================================================
--- /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_vrtqdr.f90	(revision 3477)
+++ /palm/tags/release-6.0/LIB/rrtmg/rrtmg_sw_vrtqdr.f90	(revision 3477)
@@ -0,0 +1,154 @@
+!     path:      $Source$
+!     author:    $Author: mike $
+!     revision:  $Revision: 11661 $
+!     created:   $Date: 2009-05-22 18:22:22 -0400 (Fri, 22 May 2009) $
+!
+      module rrtmg_sw_vrtqdr
+
+!  --------------------------------------------------------------------------
+! |                                                                          |
+! |  Copyright 2002-2009, Atmospheric & Environmental Research, Inc. (AER).  |
+! |  This software may be used, copied, or redistributed as long as it is    |
+! |  not sold and this copyright notice is reproduced on each copy made.     |
+! |  This model is provided as is without any express or implied warranties. |
+! |                       (http://www.rtweb.aer.com/)                        |
+! |                                                                          |
+!  --------------------------------------------------------------------------
+
+! ------- Modules -------
+
+      use parkind, only: im => kind_im, rb => kind_rb
+!      use parrrsw, only: ngptsw
+
+      implicit none
+
+      contains
+
+! --------------------------------------------------------------------------
+      subroutine vrtqdr_sw(klev, kw, &
+                           pref, prefd, ptra, ptrad, &
+                           pdbt, prdnd, prup, prupd, ptdbt, &
+                           pfd, pfu)
+! --------------------------------------------------------------------------
+ 
+! Purpose: This routine performs the vertical quadrature integration
+!
+! Interface:  *vrtqdr_sw* is called from *spcvrt_sw* and *spcvmc_sw*
+!
+! Modifications.
+! 
+! Original: H. Barker
+! Revision: Integrated with rrtmg_sw, J.-J. Morcrette, ECMWF, Oct 2002
+! Revision: Reformatted for consistency with rrtmg_lw: MJIacono, AER, Jul 2006
+!
+!-----------------------------------------------------------------------
+
+! ------- Declarations -------
+
+! Input
+
+      integer(kind=im), intent (in) :: klev                   ! number of model layers
+      integer(kind=im), intent (in) :: kw                     ! g-point index
+
+      real(kind=rb), intent(in) :: pref(:)                    ! direct beam reflectivity
+                                                              !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(in) :: prefd(:)                   ! diffuse beam reflectivity
+                                                              !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(in) :: ptra(:)                    ! direct beam transmissivity
+                                                              !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(in) :: ptrad(:)                   ! diffuse beam transmissivity
+                                                              !   Dimensions: (nlayers+1)
+
+      real(kind=rb), intent(in) :: pdbt(:)
+                                                              !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(in) :: ptdbt(:)
+                                                              !   Dimensions: (nlayers+1)
+
+      real(kind=rb), intent(inout) :: prdnd(:)
+                                                              !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(inout) :: prup(:)
+                                                              !   Dimensions: (nlayers+1)
+      real(kind=rb), intent(inout) :: prupd(:)
+                                                              !   Dimensions: (nlayers+1)
+
+! Output
+      real(kind=rb), intent(out) :: pfd(:,:)                  ! downwelling flux (W/m2)
+                                                              !   Dimensions: (nlayers+1,ngptsw)
+                                                              ! unadjusted for earth/sun distance or zenith angle
+      real(kind=rb), intent(out) :: pfu(:,:)                  ! upwelling flux (W/m2)
+                                                              !   Dimensions: (nlayers+1,ngptsw)
+                                                              ! unadjusted for earth/sun distance or zenith angle
+
+! Local
+
+      integer(kind=im) :: ikp, ikx, jk
+
+      real(kind=rb) :: zreflect
+      real(kind=rb) :: ztdn(klev+1)  
+
+! Definitions
+!
+! pref(jk)   direct reflectance
+! prefd(jk)  diffuse reflectance
+! ptra(jk)   direct transmittance
+! ptrad(jk)  diffuse transmittance
+!
+! pdbt(jk)   layer mean direct beam transmittance
+! ptdbt(jk)  total direct beam transmittance at levels
+!
+!-----------------------------------------------------------------------------
+                   
+! Link lowest layer with surface
+             
+      zreflect = 1._rb / (1._rb - prefd(klev+1) * prefd(klev))
+      prup(klev) = pref(klev) + (ptrad(klev) * &
+                 ((ptra(klev) - pdbt(klev)) * prefd(klev+1) + &
+                   pdbt(klev) * pref(klev+1))) * zreflect
+      prupd(klev) = prefd(klev) + ptrad(klev) * ptrad(klev) * &
+                    prefd(klev+1) * zreflect
+
+! Pass from bottom to top 
+
+      do jk = 1,klev-1
+         ikp = klev+1-jk                       
+         ikx = ikp-1
+         zreflect = 1._rb / (1._rb -prupd(ikp) * prefd(ikx))
+         prup(ikx) = pref(ikx) + (ptrad(ikx) * &
+                   ((ptra(ikx) - pdbt(ikx)) * prupd(ikp) + &
+                     pdbt(ikx) * prup(ikp))) * zreflect
+         prupd(ikx) = prefd(ikx) + ptrad(ikx) * ptrad(ikx) * &
+                      prupd(ikp) * zreflect
+      enddo
+    
+! Upper boundary conditions
+
+      ztdn(1) = 1._rb
+      prdnd(1) = 0._rb
+      ztdn(2) = ptra(1)
+      prdnd(2) = prefd(1)
+
+! Pass from top to bottom
+
+      do jk = 2,klev
+         ikp = jk+1
+         zreflect = 1._rb / (1._rb - prefd(jk) * prdnd(jk))
+         ztdn(ikp) = ptdbt(jk) * ptra(jk) + &
+                    (ptrad(jk) * ((ztdn(jk) - ptdbt(jk)) + &
+                     ptdbt(jk) * pref(jk) * prdnd(jk))) * zreflect
+         prdnd(ikp) = prefd(jk) + ptrad(jk) * ptrad(jk) * &
+                      prdnd(jk) * zreflect
+      enddo
+    
+! Up and down-welling fluxes at levels
+
+      do jk = 1,klev+1
+         zreflect = 1._rb / (1._rb - prdnd(jk) * prupd(jk))
+         pfu(jk,kw) = (ptdbt(jk) * prup(jk) + &
+                      (ztdn(jk) - ptdbt(jk)) * prupd(jk)) * zreflect
+         pfd(jk,kw) = ptdbt(jk) + (ztdn(jk) - ptdbt(jk)+ &
+                      ptdbt(jk) * prup(jk) * prdnd(jk)) * zreflect
+      enddo
+
+      end subroutine vrtqdr_sw
+
+      end module rrtmg_sw_vrtqdr
Index: /palm/tags/release-6.0/SCRIPTS/.dvrserver.config
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.dvrserver.config	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.dvrserver.config	(revision 3477)
@@ -0,0 +1,8 @@
+SOCKBUF=262144
+MTU=262144
+BASEDIR=<replace by dvr data directory>
+RTSPPORT=1876
+DATAPORT=1878
+UID=<replace by user id>
+GID=<replace by group id>
+# comment
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.crayb
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.crayb	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.crayb	(revision 3477)
@@ -0,0 +1,72 @@
+#$Id$
+#column 1          column 2
+#name of variable  value of variable (~ must not be used)
+#----------------------------------------------------------------------------
+%base_data           ~/palm/current_version/JOBS
+%base_directory      $HOME/palm/current_version
+%source_path         $HOME/palm/current_version/trunk/SOURCE
+%user_source_path    $base_directory/JOBS/$run_identifier/USER_CODE
+%fast_io_catalog     /gfs2/tmp/<replace_by_your_HLRN_username>
+%local_jobcatalog    /home/<replace_by_your_local_username>/job_logfiles
+%remote_jobcatalog   /home/h/<replace_by_your_HLRN_username>/job_logfiles
+#
+%local_ip            130.75.105.106
+%local_username      <replace_by_your_local_username>
+%remote_ip           130.73.233.1
+%remote_loginnode    blogin1
+%remote_username     <replace_by_your_HLRN_username>
+%ssh_key             id_rsa_hlrn
+%defaultqueue        mpp2testq
+%submit_command      /opt/moab/default/bin/msub -E
+#
+%compiler_name       ftn
+%compiler_name_ser   ftn
+%cpp_options         -e Z -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__parallel -D__netcdf -D__netcdf4 -D__netcdf4_parallel -D__fftw
+%make_options        -j 4
+%compiler_options    -em -O3 -hnoomp -hnoacc -hfp3 -hdynamic -K trap=fp
+%linker_options      -em -O3 -hnoomp -hnoacc -hfp3 -hdynamic -dynamic -K trap=fp
+%execute_command     aprun  -n {{mpi_tasks}}  -N {{tasks_per_node}}  palm
+%execute_command_for_combine     aprun  -n 1  -N 1  ./combine_plot_fields.x
+%memory              2300
+%module_commands     module switch craype-ivybridge craype-haswell; module load fftw cray-hdf5-parallel cray-netcdf-hdf5parallel
+#
+#
+# BATCH-directives to be used for batch jobs
+BD:#!/bin/bash
+BD:#PBS -A {{project_account}}
+BD:#PBS -N {{run_id}}
+BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}}
+BD:#PBS -l nodes={{nodes}}:ppn={{tasks_per_node}}
+BD:#PBS -o {{job_protocol_file}}
+BD:#PBS -j oe
+BD:#PBS -q {{queue}}
+#
+
+#
+# BATCH-directives for batch jobs used to send back the jobfile from a remote to a local host
+BDT:#!/bin/bash
+BDT:#PBS -A {{project_account}}
+BDT:#PBS -N job_protocol_transfer
+BDT:#PBS -l walltime=00:30:00
+BDT:#PBS -l nodes=1:ppn=1
+BDT:#PBS -o {{job_transfer_protocol_file}}
+BDT:#PBS -j oe
+BDT:#PBS -q dataq
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+IC:export ATP_ENABLED=1
+IC:export MPICH_GNI_BTE_MULTI_CHANNEL=disabled
+IC:ulimit  -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+OC:echo \\\"PALM run with job id {{run_id}} finished\\\" | mail <replace_by_your_mail_address>
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.crayb_debug
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.crayb_debug	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.crayb_debug	(revision 3477)
@@ -0,0 +1,73 @@
+#$Id$
+#column 1          column 2
+#name of variable  value of variable (~ must not be used)
+#----------------------------------------------------------------------------
+%base_data           ~/palm/current_version/JOBS
+%base_directory      $HOME/palm/current_version
+%source_path         $HOME/palm/current_version/trunk/SOURCE
+%user_source_path    $base_directory/JOBS/$run_identifier/USER_CODE
+%fast_io_catalog     /gfs2/tmp/<replace_by_your_HLRN_username>
+%local_jobcatalog    /home/<replace_by_your_local_username>/job_logfiles
+%remote_jobcatalog   /home/h/<replace_by_your_HLRN_username>/job_logfiles
+#
+%local_ip            130.75.105.106
+%local_username      <replace_by_your_local_username>
+%remote_ip           130.73.233.1
+%remote_loginnode    blogin1
+%remote_username     <replace_by_your_HLRN_username>
+%ssh_key             id_rsa_hlrn
+%defaultqueue        mpp2testq
+%submit_command      /opt/moab/default/bin/msub -E
+#
+%compiler_name       ftn
+%compiler_name_ser   ftn
+%cpp_options         -e Z -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__parallel -D__netcdf -D__netcdf4 -D__netcdf4_parallel -D__fftw
+%make_options        -j 4
+%compiler_options    -ei -eD -em -g -R b -K trap=fp,ovf,unf -O0 -hnoomp
+%linker_options      -ei -eD -em -g -R b -K trap=fp,ovf,unf -O0 -hnoomp -dynamic
+%execute_command     aprun  -n {{mpi_tasks}}  -N {{tasks_per_node}}  palm
+%execute_command_for_combine     aprun  -n 1  -N 1  ./combine_plot_fields.x
+%memory              2300
+%module_commands     module switch craype-ivybridge craype-haswell; module load fftw cray-hdf5-parallel cray-netcdf-hdf5parallel
+#
+#
+# BATCH-directives to be used for batch jobs
+BD:#!/bin/bash
+BD:#PBS -A {{project_account}}
+BD:#PBS -N {{run_id}}
+BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}}
+BD:#PBS -l nodes={{nodes}}:ppn={{tasks_per_node}}
+BD:#PBS -o {{job_protocol_file}}
+BD:#PBS -j oe
+BD:#PBS -q {{queue}}
+#
+
+#
+# BATCH-directives for batch jobs used to send back the jobfile from a remote to a local host
+BDT:#!/bin/bash
+BDT:#PBS -A {{project_account}}
+BDT:#PBS -N job_protocol_transfer
+BDT:#PBS -l walltime=00:30:00
+BDT:#PBS -l nodes=1:ppn=1
+BDT:#PBS -o {{job_transfer_protocol_file}}
+BDT:#PBS -j oe
+BDT:#PBS -q dataq
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+IC:export ATP_ENABLED=1
+IC:export MPICH_GNI_BTE_MULTI_CHANNEL=disabled
+IC:ulimit  -s unlimited
+IC:echo \\\"PALM run with job id {{run_id}} started\\\" | mail <replace_by_your_mail_address>
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+OC:echo \\\"PALM run with job id {{run_id}} finished\\\" | mail <replace_by_your_mail_address>
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.default
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.default	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.default	(revision 3477)
@@ -0,0 +1,129 @@
+#$Id$
+#column 1          column 2
+#name of variable  value of variable (~ must not be used except for base_data)
+#-----------------------------------------------------------------------------
+# working directory from where palmrun or palmbuild are called
+%base_directory    $HOME/palm/current_version
+
+# directory where PALM I/O is stored (used in .palm.iofiles)
+%base_data         ~/palm/current_version/JOBS
+
+# path to PALM's FORTRAN sources (installation folder)
+%source_path       $HOME/palm/current_version/trunk/SOURCE
+
+# path to user interface routines
+%user_source_path  $base_directory/JOBS/$run_identifier/USER_CODE
+
+# path to file system with fast discs (if available). This folder
+# is used for temporary catalogs generated by palmrun and to store large
+# I/O files (used in .palm.iofiles). This folder must be accessible from
+# all compute nodes, i.e. it must reside in a global file system
+%fast_io_catalog   <replace by a folder name which allows for fast I/O>
+
+# folder for job protocols
+#%local_jobcatalog    $HOME/job_logfiles
+
+# folder for job protocols to be used on the remote host
+#%remote_jobcatalog   <path/to/directory on remote host>
+
+# local ip of your computer. Use 127.0.0.0 if you are running PALM
+# in interactive mode on your local computer
+%local_ip            <replace by your computers IP address>
+
+# your local UNIX username
+%local_username      <replace by your unix username>
+
+# ip address of the remote host
+#%remote_ip           <ip>
+
+# username on the remote host
+#%remote_username     <username>
+
+# ssh-key to be used for ssh/scp calls to the remote host
+#%ssh_key             ~/.ssh/id_rsa
+
+# name of login-node on the remote machine
+#%remote_loginnode    <loginnode>
+
+# default queue to be used if palmrun-option -q is omitted
+#%defaultqueue        <queue>
+
+# command to submit batch jobs
+#%submit_command      /opt/moab/default/bin/msub -E
+
+# compilername to generate MPI executables
+%compiler_name       mpif90
+
+# compilername to generate non-MPI executables running on one core
+%compiler_name_ser   ifort
+
+# preprocessor directives to be used for compiling the PALM code
+%cpp_options         -cpp -D__parallel -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__fftw -D__netcdf
+
+# used for parallel compilation
+%make_options        -j 4
+
+# options to be used to compile PALM
+%compiler_options    -fpe0 -O3 -xHost -fp-model source -ftz -no-prec-div -no-prec-sqrt -ip -I /muksoft/packages/fftw/3.3.4/include -L/muksoft/packages/fftw/3.3.4/lib64 -lfftw3 -I /muksoft/packages/netcdf/4_intel/include -L/muksoft/packages/netcdf/4_intel/lib -lnetcdf -lnetcdff
+
+# options to be used to link the PALM executable
+%linker_options      -fpe0 -O3 -xHost -fp-model source -ftz -no-prec-div -no-prec-sqrt -ip -I /muksoft/packages/fftw/3.3.4/include -L/muksoft/packages/fftw/3.3.4/lib64 -lfftw3 -I /muksoft/packages/netcdf/4_intel/include -L/muksoft/packages/netcdf/4_intel/lib -lnetcdf -lnetcdff
+
+# name of hostfile to be used
+%hostfile            auto
+
+# command to start the PALM executable
+%execute_command     mpiexec  -machinefile hostfile  -n {{mpi_tasks}}  palm
+
+# memory request per core
+#%memory              2300
+
+# module commands to load required libraries
+#%module_commands     module switch craype-ivybridge craype-haswell; module load fftw cray-hdf5-parallel cray-netcdf-hdf5parallel
+
+# special commands to be carried out at login and start of batch jobs on the remote host
+#%login_init_cmd      .execute_special_profile
+
+
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+#IC:ulimit -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+#EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#OC:echo \\\"PALM job finished\\\" | mailx user@somewhere
+
+
+#-------------------------------------------------------------------------------
+# Directives to be used for batch jobs
+# Lines must start with "BD:". If $-characters are required, hide them with \
+# Internal variables can be used as {{variable_name}}. Please see documentation.
+#-------------------------------------------------------------------------------
+BD:#!/bin/bash
+BD:#PBS -N {{job_id}}
+BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}}
+BD:#PBS -l nodes={{nodes}}:ppn={{tasks_per_node}}
+BD:#PBS -o {{job_protocol_file}}
+BD:#PBS -j oe
+BD:#PBS -q {{queue}}
+
+
+#-------------------------------------------------------------------------------
+# Directives for batch jobs used to send back the jobfiles from a remote to a local host
+# Lines must start with "BDT:". If $-characters are required, excape them with triple backslash
+# Internal variables can be used as {{variable_name}}. Please see documentation.
+#-------------------------------------------------------------------------------
+BDT:#!/bin/bash
+BDT:#PBS -N job_protocol_transfer
+BDT:#PBS -l walltime=00:30:00
+BDT:#PBS -l nodes=1:ppn=1
+BDT:#PBS -o {{job_transfer_protocol_file}}
+BDT:#PBS -j oe
+BDT:#PBS -q dataq
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.default.in
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.default.in	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.default.in	(revision 3477)
@@ -0,0 +1,93 @@
+################################################################################
+# This is a configuration file for PALM. It must be named: .palm.config.<suffix>
+# in order to use it, call palmbuild and palmrun with the option: -h <suffix>
+# Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/jobcontrol
+################################################################################
+#
+#-------------------------------------------------------------------------------
+# General compiler and host configuration section.
+# Variable declaration lines must start with a percent character
+# Internal variables can be used as {{VARIABLE_NAME}}. Please see documentation.
+#-------------------------------------------------------------------------------
+%base_directory      @CMAKE_INSTALL_PREFIX@
+%base_data           @CMAKE_INSTALL_PREFIX@/JOBS
+%source_path         @CMAKE_INSTALL_PREFIX@/trunk/SOURCE
+%user_source_path    @CMAKE_INSTALL_PREFIX@/JOBS/$run_identifier/USER_CODE
+%fast_io_catalog     @CMAKE_INSTALL_PREFIX@/tmp
+%local_jobcatalog    @CMAKE_INSTALL_PREFIX@/job_logfiles
+#%remote_jobcatalog   <path/to/directory>
+#
+%local_ip            127.0.0.1
+%local_hostname      @PALM_HOSTNAME@
+%local_username      @CMAKE_USERNAME@
+#
+#%remote_ip           <ip>
+#%remote_hostname     <hostname>
+#%remote_loginnode    <loginnode>
+#%remote_username     <username>
+#%ssh_key             ~/.ssh/id_rsa
+#
+#%defaultqueue        <queue>
+#%submit_command      /opt/moab/default/bin/msub -E
+#
+%compiler_name       @MPI_Fortran_COMPILER@
+%compiler_name_ser   @CMAKE_Fortran_COMPILER@
+%cpp_options         @PALM_CPP_OPTIONS_STR@
+%make_options        -j @PALM_CORES@
+%compiler_options    @PALM_COMPILER_OPTIONS@
+%linker_options      @PALM_LINKER_OPTIONS@
+%execute_command     mpirun -n {{mpi_tasks}} ./palm
+#%memory              2300
+#%module_commands     module switch craype-ivybridge craype-haswell; module load fftw cray-hdf5-parallel cray-netcdf-hdf5parallel
+#%login_init_cmd      .execute_special_profile
+#
+#-------------------------------------------------------------------------------
+# Directives to be used for batch jobs
+# Lines must start with "BD:". If $-characters are required, hide them with \
+# Internal variables can be used as {{variable_name}}. Please see documentation.
+#-------------------------------------------------------------------------------
+BD:#!/bin/bash
+BD:#PBS -N {{job_id}}
+BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}}
+BD:#PBS -l nodes={{nodes}}:ppn={{tasks_per_node}}
+BD:#PBS -o {{job_protocol_file}}
+BD:#PBS -j oe
+BD:#PBS -q {{queue}}
+#
+#-------------------------------------------------------------------------------
+# Directives for batch jobs used to send back the jobfiles from a remote to a local host
+# Lines must start with "BDT:". If $-characters are required, excape them with triple backslash
+# Internal variables can be used as {{variable_name}}. Please see documentation.
+#-------------------------------------------------------------------------------
+BDT:#!/bin/bash
+BDT:#PBS -N job_protocol_transfer
+BDT:#PBS -l walltime=00:30:00
+BDT:#PBS -l nodes=1:ppn=1
+BDT:#PBS -o {{job_transfer_protocol_file}}
+BDT:#PBS -j oe
+BDT:#PBS -q dataq
+#
+#-------------------------------------------------------------------------------
+# INPUT-commands. These commands are executed before running PALM 
+# Lines must start with "IC:" 
+#-------------------------------------------------------------------------------
+IC:ulimit  -s unlimited
+#
+#-------------------------------------------------------------------------------
+# ERROR-commands. These commands are executed when PALM terminates abnormally
+# Lines must start with "EC:" 
+#-------------------------------------------------------------------------------
+EC:[[ $locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#-------------------------------------------------------------------------------
+# OUTPUT-commands. These commands are executed when PALM terminates normally
+# Lines must start with "OC:" 
+#-------------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
+
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.default_trace
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.default_trace	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.default_trace	(revision 3477)
@@ -0,0 +1,129 @@
+#$Id$
+#column 1          column 2
+#name of variable  value of variable (~ must not be used except for base_data)
+#-----------------------------------------------------------------------------
+# working directory from where palmrun or palmbuild are called
+%base_directory    $HOME/palm/current_version
+
+# directory where PALM I/O is stored (used in .palm.iofiles)
+%base_data         ~/palm/current_version/JOBS
+
+# path to PALM's FORTRAN sources (installation folder)
+%source_path       $HOME/palm/current_version/trunk/SOURCE
+
+# path to user interface routines
+%user_source_path  $base_directory/JOBS/$run_identifier/USER_CODE
+
+# path to file system with fast discs (if available). This folder
+# is used for temporary catalogs generated by palmrun and to store large
+# I/O files (used in .palm.iofiles). This folder must be accessible from
+# all compute nodes, i.e. it must reside in a global file system
+%fast_io_catalog   <replace by a folder name which allows for fast I/O>
+
+# folder for job protocols
+#%local_jobcatalog    $HOME/job_logfiles
+
+# folder for job protocols to be used on the remote host
+#%remote_jobcatalog   <path/to/directory on remote host>
+
+# local ip of your computer. Use 127.0.0.0 if you are running PALM
+# in interactive mode on your local computer
+%local_ip            <replace by your computers IP address>
+
+# your local UNIX username
+%local_username      <replace by your unix username>
+
+# ip address of the remote host
+#%remote_ip           <ip>
+
+# username on the remote host
+#%remote_username     <username>
+
+# ssh-key to be used for ssh/scp calls to the remote host
+#%ssh_key             ~/.ssh/id_rsa
+
+# name of login-node on the remote machine
+#%remote_loginnode    <loginnode>
+
+# default queue to be used if palmrun-option -q is omitted
+#%defaultqueue        <queue>
+
+# command to submit batch jobs
+#%submit_command      /opt/moab/default/bin/msub -E
+
+# compilername to generate MPI executables
+%compiler_name       mpif90
+
+# compilername to generate non-MPI executables running on one core
+%compiler_name_ser   ifort
+
+# preprocessor directives to be used for compiling the PALM code
+%cpp_options         -cpp -D__parallel -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__fftw -D__netcdf
+
+# used for parallel compilation
+%make_options        -j 4
+
+# options to be used to compile PALM in debug mode
+%compiler_options    -fpe0 -O0 -check -check nooutput_conversion -traceback -g -I /muksoft/packages/fftw/3.3.4/include -L/muksoft/packages/fftw/3.3.4/lib64 -lfftw3 -I /muksoft/packages/netcdf/4_intel/include -L/muksoft/packages/netcdf/4_intel/lib -lnetcdf -lnetcdff
+
+# options to be used to link the PALM executable
+%linker_options      -fpe0 -O0 -check -check nooutput_conversion -traceback -g -I /muksoft/packages/fftw/3.3.4/include -L/muksoft/packages/fftw/3.3.4/lib64 -lfftw3 -I /muksoft/packages/netcdf/4_intel/include -L/muksoft/packages/netcdf/4_intel/lib -lnetcdf -lnetcdff
+
+# name of hostfile to be used
+%hostfile            auto
+
+# command to start the PALM executable
+%execute_command     mpiexec  -machinefile hostfile  -n {{mpi_tasks}}  palm
+
+# memory request per core
+#%memory              2300
+
+# module commands to load required libraries
+#%module_commands     module switch craype-ivybridge craype-haswell; module load fftw cray-hdf5-parallel cray-netcdf-hdf5parallel
+
+# special commands to be carried out at login and start of batch jobs on the remote host
+#%login_init_cmd      .execute_special_profile
+
+
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+#IC:ulimit -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+#EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#OC:echo \\\"PALM job finished\\\" | mailx user@somewhere
+
+
+#-------------------------------------------------------------------------------
+# Directives to be used for batch jobs
+# Lines must start with "BD:". If $-characters are required, hide them with \
+# Internal variables can be used as {{variable_name}}. Please see documentation.
+#-------------------------------------------------------------------------------
+BD:#!/bin/bash
+BD:#PBS -N {{job_id}}
+BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}}
+BD:#PBS -l nodes={{nodes}}:ppn={{tasks_per_node}}
+BD:#PBS -o {{job_protocol_file}}
+BD:#PBS -j oe
+BD:#PBS -q {{queue}}
+
+
+#-------------------------------------------------------------------------------
+# Directives for batch jobs used to send back the jobfiles from a remote to a local host
+# Lines must start with "BDT:". If $-characters are required, excape them with triple backslash
+# Internal variables can be used as {{variable_name}}. Please see documentation.
+#-------------------------------------------------------------------------------
+BDT:#!/bin/bash
+BDT:#PBS -N job_protocol_transfer
+BDT:#PBS -l walltime=00:30:00
+BDT:#PBS -l nodes=1:ppn=1
+BDT:#PBS -o {{job_transfer_protocol_file}}
+BDT:#PBS -j oe
+BDT:#PBS -q dataq
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.eddy_gfort
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.eddy_gfort	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.eddy_gfort	(revision 3477)
@@ -0,0 +1,65 @@
+#$Id: .palm.config.eddy_gfort 3193 2018-08-07 09:55:00Z witha $
+#column 1          column 2
+#name of variable  value of variable (~ must not be used)
+#----------------------------------------------------------------------------
+%base_data           $HOME/palm/current_version/JOBS
+%output_data         $WORK/palm/current_version/JOBS
+%base_directory      $HOME/palm/current_version
+%source_path         $HOME/palm/current_version/trunk/SOURCE
+%user_source_path    $base_directory/JOBS/$run_identifier/USER_CODE
+%fast_io_catalog     $WORK/palm_restart_tmp
+%local_jobcatalog    $HOME/job_queue
+################################################################################
+# Replace abcd1234 by your username on Eddy:
+################################################################################
+%local_username      abcd1234
+#
+%defaultqueue        eddy.p
+%submit_command      sbatch
+#
+%compiler_name       mpifort
+%compiler_name_ser   gfortran
+%cpp_options         -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__lc -D__netcdf -D__netcdf4 -D__parallel
+%make_options        -j 4
+%compiler_options    -O3 -mtune=native -march=native -cpp -fconvert=little-endian -I/cm/shared/uniol/software/netCDF-Fortran/4.4.4-goolf-5.2.01/include
+%linker_options      -O3 -mtune=native -march=native -cpp -lnetcdff -lnetcdf
+%execute_command     mpirun -n {{mpi_tasks}} palm
+%execute_command_for_combine     mpirun  -n 1  ./combine_plot_fields.x
+%memory              2333
+%module_commands     module load PALMDependencies/.gcc
+#
+# BATCH-directives to be used for batch jobs
+BD:#!/bin/bash
+BD:#SBATCH -J {{run_id}}
+BD:#SBATCH -t {{timestring}}
+BD:#SBATCH -n {{mpi_tasks}}
+BD:#SBATCH -N {{nodes}}
+BD:#SBATCH --cpus-per-task 1
+BD:#SBATCH -p {{queue}}
+BD:#SBATCH -o {{job_protocol_file}}
+BD:#SBATCH -e {{job_protocol_file}}
+BD:#SBATCH --mem-per-cpu {{memory}}
+BD:#SBATCH --exclusive
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+IC:export ATP_ENABLED=1
+IC:export MPICH_GNI_BTE_MULTI_CHANNEL=disabled
+IC:ulimit  -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.eddy_ifort
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.eddy_ifort	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.eddy_ifort	(revision 3477)
@@ -0,0 +1,65 @@
+#$Id: .palm.config.eddy_ifort 3193 2018-08-07 09:55:00Z witha $
+#column 1          column 2
+#name of variable  value of variable (~ must not be used)
+#----------------------------------------------------------------------------
+%base_data           $HOME/palm/current_version/JOBS
+%output_data         $WORK/palm/current_version/JOBS
+%base_directory      $HOME/palm/current_version
+%source_path         $HOME/palm/current_version/trunk/SOURCE
+%user_source_path    $base_directory/JOBS/$run_identifier/USER_CODE
+%fast_io_catalog     $WORK/palm_restart_tmp
+%local_jobcatalog    $HOME/job_queue
+################################################################################
+# Replace abcd1234 by your username on Eddy:
+################################################################################
+%local_username      abcd1234
+#
+%defaultqueue        eddy.p
+%submit_command      sbatch
+#
+%compiler_name       mpiifort
+%compiler_name_ser   ifort
+%cpp_options         -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__lc -D__netcdf -D__netcdf4 -D__parallel
+%make_options        -j 4
+%compiler_options    -O3 -mtune=native -march=native -cpp -I/cm/shared/uniol/software2/netCDF-Fortran/4.4.4-intel-2017a/include
+%linker_options      -O3 -mtune=native -march=native -cpp -lnetcdff -lnetcdf
+%execute_command     mpirun -n {{mpi_tasks}} palm
+%execute_command_for_combine     mpirun  -n 1  ./combine_plot_fields.x
+%memory              2333
+%module_commands     module load PALMDependencies/icc      
+#
+# BATCH-directives to be used for batch jobs
+BD:#!/bin/bash
+BD:#SBATCH -J {{run_id}}
+BD:#SBATCH -t {{timestring}}
+BD:#SBATCH -n {{mpi_tasks}}
+BD:#SBATCH -N {{nodes}}
+BD:#SBATCH --cpus-per-task 1
+BD:#SBATCH -p {{queue}}
+BD:#SBATCH -o {{job_protocol_file}}
+BD:#SBATCH -e {{job_protocol_file}}
+BD:#SBATCH --mem-per-cpu {{memory}}
+BD:#SBATCH --exclusive
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+IC:export ATP_ENABLED=1
+IC:export MPICH_GNI_BTE_MULTI_CHANNEL=disabled
+IC:ulimit  -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.idefix
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.idefix	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.idefix	(revision 3477)
@@ -0,0 +1,76 @@
+#$Id$
+#This configuration file is for running jobs locally (interactive or batch mode)
+#on host idefix.
+#-------------------------------------------------------------------------------
+#column 1          column 2
+#name of variable  value of variable (~ must not be used)
+#-------------------------------------------------------------------------------
+%base_data          ~/palm/current_version/JOBS
+%base_directory     $HOME/palm/current_version
+%fast_io_catalog    /work/<replace_by_your_IDEFIX_username>
+%local_jobcatalog   $HOME/job_logfiles
+%output_path        /work/<replace_by_your_IDEFIX_username>/JOBS/$run_identifier
+%remote_jobcatalog  $HOME/job_logfiles
+%source_path        $HOME/palm/current_version/trunk/SOURCE
+%user_source_path   $base_directory/JOBS/$run_identifier/USER_CODE
+#
+%local_ip            130.75.105.239
+%local_username      <replace_by_your_IDEFIX_username>
+%defaultqueue        workq
+%submit_command      /opt/pbspro/default/bin/qsub
+#
+%compiler_name       mpif90
+%compiler_name_ser   ifort
+%cpp_options         -cpp -D__parallel -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf -D__netcdf4 -D__netcdf4_parallel -D__fftw -D__intel_compiler
+%make_options        -j 4
+%compiler_options    -fpe0 -O3 -cpp -fp-model source -ftz -no-prec-div -no-prec-sqrt -ip -I /opt/netcdf4_hdf5parallel/4411c_443f/intel/include -L/opt/netcdf4_hdf5parallel/4411c_443f/intel/lib -L/opt/hdf5-parallel/1.10.0-patch1/intel/lib -lnetcdf -lnetcdff -I /opt/fftw/3.3.6-pl1/mvapich2-intel/include -L/opt/fftw/3.3.6-pl1/mvapich2-intel/lib -lfftw3
+%linker_options      -fpe0 -O3 -cpp -fp-model source -ftz -no-prec-div -no-prec-sqrt -ip -I /opt/netcdf4_hdf5parallel/4411c_443f/intel/include -L/opt/netcdf4_hdf5parallel/4411c_443f/intel/lib -L/opt/hdf5-parallel/1.10.0-patch1/intel/lib -lnetcdf -lnetcdff -I /opt/fftw/3.3.6-pl1/mvapich2-intel/include -L/opt/fftw/3.3.6-pl1/mvapich2-intel/lib -lfftw3
+%hostfile            auto
+%module_commands     module load intel-compiler/2017.1.132 mvapich2/2.2/intel fftw/3.3.6-pl1/mvapich2-intel hdf5-parallel/1.10.0-patch1/intel netcdf4_hdf5parallel/4411c_443f/intel
+#
+%execute_command     mpirun  -machinefile hostfile  -n {{mpi_tasks}} palm
+#
+#
+# BATCH-directives to be used for batch jobs.
+BD:#!/bin/bash
+BD:#PBS -N{{run_id}}
+BD:#PBS -l walltime={{cpu_hours}}:{{cpu_minutes}}:{{cpu_seconds}}
+BD:#PBS -l ncpus={{cores}}
+BD:#PBS -o{{job_protocol_file}}
+BD:#PBS -j oe
+BD:#PBS -q{{queue}}
+#
+# BATCH-directives for batch jobs used to send back the jobfile from a remote to a local host
+BDT:#!/bin/bash
+BDT:#PBS -N job_protocol_transfer
+BDT:#PBS -l walltime=00:30:00
+BDT:#PBS -l ncpus=1
+BDT:#PBS -o{{job_transfer_protocol_file}}
+BDT:#PBS -j oe
+BDT:#PBS -q workq
+#
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+IC:export MV2_ENABLE_AFFINITY=0
+IC:export MV2_SHOW_CPU_BINDING=1
+IC:export MV2_CPU_BINDING_POLICY=scatter
+IC:ulimit -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+EC:[[ \$locat = execution ]]  &&  cat  PARTICLE_INFOS/*
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
Index: /palm/tags/release-6.0/SCRIPTS/.palm.config.imuk
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.config.imuk	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.config.imuk	(revision 3477)
@@ -0,0 +1,42 @@
+#$Id$
+#column 1          column 2
+#name of variable  value of variable (~ must not be used)
+#----------------------------------------------------------------------------
+%base_data         ~/palm/current_version/JOBS
+%base_directory    $HOME/palm/current_version
+%fast_io_catalog   /localdata/<your user directory>
+%source_path       $HOME/palm/current_version/trunk/SOURCE
+%user_source_path  $base_directory/JOBS/$run_identifier/USER_CODE
+#
+%local_ip            130.75.105.<your pc's id>
+%local_username      <username>
+%compiler_name       mpif90
+%compiler_name_ser   ifort
+%cpp_options         -cpp -D__parallel -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__fftw -D__netcdf -D__netcdf4 -D__netcdf4_parallel
+%make_options        -j 4
+%compiler_options    -fpe0 -O3 -xHost -fp-model source -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -I /muksoft/packages/fftw/3.3.7/mvapich2-2.3rc1/gnu/include/ -I /muksoft/packages/netcdf4_hdf5parallel/4411c_443f/hdf5-1.10.0-patch1/mvapich2-2.3rc1/intel/2018.1.163/include/
+%linker_options      -fpe0 -O3 -xHost -fp-model source -ftz -fno-alias -no-prec-div -no-prec-sqrt -ip -L/muksoft/packages/fftw/3.3.7/mvapich2-2.3rc1/gnu/lib64/ -lfftw3 -L/muksoft/packages/netcdf4_hdf5parallel/4411c_443f/hdf5-1.10.0-patch1/mvapich2-2.3rc1/intel/2018.1.163/lib64/ -lnetcdf -lnetcdff
+%hostfile            auto
+%execute_command     mpiexec  -machinefile hostfile  -n {{mpi_tasks}}  palm
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+IC:ulimit -s unlimited
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+EC:[[ \$locat = execution ]]  &&  cat  PARTICLE_INFOS/*
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
Index: /palm/tags/release-6.0/SCRIPTS/.palm.iofiles
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/.palm.iofiles	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/.palm.iofiles	(revision 3477)
@@ -0,0 +1,81 @@
+#$Id$
+#
+#---------------------------------------------------------------------------------------------
+# List of input-files
+#---------------------------------------------------------------------------------------------
+PARIN                    in:tr      d3#      $base_data/$run_identifier/INPUT          _p3d*
+PARIN                    in:tr      d3r      $base_data/$run_identifier/INPUT          _p3dr*
+PARIN                    in:tr      pcr      $base_data/$run_identifier/INPUT          _pcr*
+NAVIGATION_DATA          inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _nav*
+TOPOGRAPHY_DATA          inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _topo*
+PIDS_STATIC              inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _static*
+PIDS_DYNAMIC             inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _dynamic*
+PIDS_SALSA               inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _salsa*
+PIDS_CHEM                inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _chemistry*
+PIDS_UVEM                inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _uvlookup*
+PIDS_VM                  inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _vmeas*
+rrtmg_lw.nc              inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _rlw
+rrtmg_sw.nc              inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _rsw
+WTM_DATA                 inopt:tr   d3#:d3r  $base_data/$run_identifier/INPUT          _wtm
+BININ                    in:lnpe    d3r:rec  $fast_io_catalog/$run_identifier/RESTART  _d3d*
+PARTICLE_RESTART_DATA_IN in:lnpe    prtr     $fast_io_catalog/$run_identifier/RESTART  _rprt
+SVFIN                    in:lnpe    svfin    $fast_io_catalog/$run_identifier/SVF      _svf*
+DATA_1D_PR_NETCDF        inopt      prr      $base_data/$run_identifier/OUTPUT         _pr*       nc
+DATA_1D_SP_NETCDF        inopt      spr      $base_data/$run_identifier/OUTPUT         _sp*       nc
+DATA_1D_TS_NETCDF        inopt      tsr      $base_data/$run_identifier/OUTPUT         _ts*       nc
+DATA_1D_PTS_NETCDF       inopt      ptsr     $base_data/$run_identifier/OUTPUT         _pts*      nc
+DATA_2D_XY_NETCDF        inopt      xyr      $base_data/$run_identifier/OUTPUT         _xy*       nc
+DATA_2D_XY_AV_NETCDF     inopt      xyr      $base_data/$run_identifier/OUTPUT         _av_xy*    nc
+DATA_2D_XZ_NETCDF        inopt      xzr      $base_data/$run_identifier/OUTPUT         _xz*       nc
+DATA_2D_XZ_AV_NETCDF     inopt      xzr      $base_data/$run_identifier/OUTPUT         _av_xz*    nc
+DATA_2D_YZ_NETCDF        inopt      yzr      $base_data/$run_identifier/OUTPUT         _yz*       nc
+DATA_2D_YZ_AV_NETCDF     inopt      yzr      $base_data/$run_identifier/OUTPUT         _av_yz*    nc
+DATA_3D_NETCDF           inopt      3dr      $base_data/$run_identifier/OUTPUT         _3d*       nc
+DATA_3D_AV_NETCDF        inopt      3dr      $base_data/$run_identifier/OUTPUT         _av_3d*    nc
+DATA_MASK_NETCDF         inopt      mar      $base_data/$run_identifier/OUTPUT         _masked    nc
+DATA_MASK_AV_NETCDF      inopt      mar      $base_data/$run_identifier/OUTPUT         _av_masked nc
+DATA_PRT_NETCDF          inopt:pe   prtr     $base_data/$run_identifier/OUTPUT         _prt*
+#
+#---------------------------------------------------------------------------------------------
+# List of output-files
+#---------------------------------------------------------------------------------------------
+BINOUT*                    out:lnpe restart   $fast_io_catalog/$run_identifier/RESTART  _d3d
+PARTICLE_RESTART_DATA_OUT* out:lnpe prt#:prtr $fast_io_catalog/$run_identifier/RESTART  _rprt
+SVFOUT*                    out:lnpe svfout    $fast_io_catalog/$run_identifier/SVF      _svf
+#
+STDOUT*                    out:tr   d3#:pcr   $base_data/$run_identifier/MONITORING     _stdout
+STDOUT*                    out:tra  d3r       $base_data/$run_identifier/MONITORING     _stdout
+RUN_CONTROL*               out:tr   d3#:pcr   $base_data/$run_identifier/MONITORING     _rc
+RUN_CONTROL*               out:tra  d3r       $base_data/$run_identifier/MONITORING     _rc
+HEADER*                    out:tr   d3#:pcr   $base_data/$run_identifier/MONITORING     _header
+HEADER*                    out:tra  d3r       $base_data/$run_identifier/MONITORING     _header
+CPU_MEASURES*              out:tr   d3#:pcr   $base_data/$run_identifier/MONITORING     _cpu
+CPU_MEASURES*              out:tra  d3r       $base_data/$run_identifier/MONITORING     _cpu
+PARTICLE_INFO*             out:tr   pt#       $base_data/$run_identifier/MONITORING     _prt_info
+PARTICLE_INFO*             out:tra  ptr       $base_data/$run_identifier/MONITORING     _prt_info
+LIST_PROFIL*               out:tr   *         $base_data/$run_identifier/MONITORING     _list_pr
+#
+SURFACE_DATA_BIN*          out:tr   *         $base_data/$run_identifier/OUTPUT         _surf      bin
+SURFACE_DATA_AV_BIN*       out:tr   *         $base_data/$run_identifier/OUTPUT         _av_surf   bin
+#
+DATA_1D_PR_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _pr        nc
+DATA_1D_SP_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _sp        nc
+DATA_1D_TS_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _ts        nc
+DATA_1D_PTS_NETCDF         out:tr   *         $base_data/$run_identifier/OUTPUT         _pts       nc
+DATA_2D_XY_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _xy        nc
+DATA_2D_XY_AV_NETCDF*      out:tr   *         $base_data/$run_identifier/OUTPUT         _av_xy     nc
+DATA_2D_XZ_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _xz        nc
+DATA_2D_XZ_AV_NETCDF*      out:tr   *         $base_data/$run_identifier/OUTPUT         _av_xz     nc
+DATA_2D_YZ_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _yz        nc
+DATA_2D_YZ_AV_NETCDF*      out:tr   *         $base_data/$run_identifier/OUTPUT         _av_yz     nc
+DATA_3D_NETCDF*            out:tr   *         $base_data/$run_identifier/OUTPUT         _3d        nc
+DATA_3D_AV_NETCDF*         out:tr   *         $base_data/$run_identifier/OUTPUT         _av_3d     nc
+DATA_MASK_NETCDF*          out:tr   *         $base_data/$run_identifier/OUTPUT         _masked    nc
+DATA_MASK_AV_NETCDF*       out:tr   *         $base_data/$run_identifier/OUTPUT         _av_masked nc
+DATA_AGT_NETCDF*           out:tr   *         $base_data/$run_identifier/OUTPUT         _agt       nc
+#
+DATA_PRT_NETCDF*           out:pe   *         $base_data/$run_identifier/OUTPUT         _prt
+DATA_PRT_NETCDF*           out:trpe *         $base_data/$run_identifier/OUTPUT         _prt
+PARTICLE_DATA*             out:lnpe *         $base_data/$run_identifier/OUTPUT         _prt_dat
+#
+WTM_OUTPUT_DATA*           out:tr   *         $base_data/$run_identifier/MONITORING     _wtm
Index: /palm/tags/release-6.0/SCRIPTS/NCL/.hluresfile
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/.hluresfile	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/.hluresfile	(revision 3477)
@@ -0,0 +1,34 @@
+!********************************************************* 
+! If .hluresfile is copied to the home directory the default
+! graphical display of NCL is changed (x11)
+! Further information are available at: 
+! http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml
+!*********************************************************
+
+! comments for ".res" files are preceded by a "!"
+! remember quotations are not used in .res files
+
+! White background/black foreground
+*wkForegroundColor  : (/0.,0.,0./)
+*wkBackgroundColor  : (/1.,1.,1./)
+
+*wkColorMap         : rainbow+gray
+
+! Font stuff
+*Font           : helvetica 
+
+! Function Codes [Default is a colon ]
+*TextFuncCode               : ~     
+ 
+! Make default X11 window larger (adjust as necessary)
+*wkWidth                     : 1000
+*wkHeight                    : 800
+
+! Have a favorite colormap that you use for everything? You can
+! make it your default here (note the name is NOT in quotes):
+! *wkColorMap  : temp1
+
+! Increase the default (16mb) contour memory
+! If you gave gridded data > 500 x 500, you may need this
+*wsMaximumSize: 100000000
+!********************************************************* 
Index: /palm/tags/release-6.0/SCRIPTS/NCL/.ncl.config.default
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/.ncl.config.default	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/.ncl.config.default	(revision 3477)
@@ -0,0 +1,2474 @@
+;********************************************************* 
+; Copying .hluresfile in the home directory
+;*********************************************************
+
+command = "ksh 'if [ ! -f $HOME/.hluresfile ]; then; "+\
+          "cp $PALM_BIN/NCL/.hluresfile $HOME; fi'"
+system(command)
+   
+;*********************************************************
+
+
+begin
+
+;********************************************************* 
+
+script=which_script
+
+   ;******************************************************
+   ; BE AWARE: NCl uses double quotes (") to denote strings
+   ;       to retrieve the double quote character - use dq:
+
+    dq=str_get_dq()
+
+   ;******************************************************
+   
+;*********************************************************
+   
+   ;******************************************************
+   ; parameters used by CROSS_SECTIONS
+   ;******************************************************
+   
+   if (script .EQ. "cross_section")then
+   
+      ;***************************************************
+      ; REQUIRED --file_1-- INPUT FILE
+      ;
+      ; input file produced by PALM; if there is more than one file for 
+      ; all timesteps 
+      ; of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 'start_f' and 
+      ; 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_1 = "/path_to_file/file_xy_av"      if you use more than 
+      ;                                                   one cycle number
+      ;          file_1 = "/path_to_file/file_xy_av.4.nc" if you use one file 
+      ;                                              (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_1"))then
+
+
+         file_1 = "File in"
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL/REQUIRED if more than one file of a job chain 
+      ;          --start_f-- START OF CYCLIC NUMBER
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   start_f = 3 (if first file: example_xy_av.3.nc) and 
+      ;            start_f = 0 (if first file: example_xy_av.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f"))then  
+      
+          
+         start_f = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED if more than one file of a job chain 
+      ;          --end_f-- END OF CYCLIC NUMBER
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps you'd like 
+      ; to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   end_f = 48 (if last file: example_xy_av.48.nc) and 
+      ;            end_f = 0 (if last file: example_xy_av.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f"))then  
+      
+          
+         end_f = -1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --format_out-- OUTPUT FORMAT
+      ;
+      ; format of the output file; 
+      ; supported file formats: x11, pdf, ps, eps, epsi ncgm or png 
+      ;
+      ; data type: string
+      ;
+      ; example: format_out = "pdf"
+      ;
+      ; default:   "x11" 
+      ;***************************************************
+      if(.not. isvar("format_out"))then	 
+      
+      
+         format_out = "x11"
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --file_out-- OUTPUT FILE
+      ;
+      ; path and name of the output file
+      ;
+      ; data type: string
+      ;
+      ; example: file_out = "/home/path_to_output/test_cs"
+      ;
+      ; default:   "~/test_cs" 
+      ;***************************************************
+      if(.not. isvar("file_out"))then	 
+      
+      
+         file_out = "~/test_cs"
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --var-- OUTPUT VARIABLES
+      ;
+      ; names of output variables; 
+      ; inidcate them with one comma before and after each variable;
+      ; if the name contains double quotes (") use dq and the '+' operation to 
+      ; concatenate the strings
+      ;
+      ; data type: string 
+      ; 
+      ; example: var = ",u,v,w,"
+      ;
+      ; default:   "all" (all available variables are plotted)
+      ;***************************************************
+      if(.not. isvar("var"))then
+      
+      	 
+         var = "all"
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --start_time_step-- FIRST TIME STEP
+      ;
+      ; first time step of plot; there is no need to specify a precise time 
+      ; value from the input file,
+      ; 'start_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   start_time_step = 0.5d 
+      ;
+      ; default:   -1.d (first available time step)
+      ;***************************************************
+      if(.not. isvar("start_time_step"))then
+      
+      	 
+         start_time_step = -1.d
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --end_time_step-- LAST TIME STEP
+      ;
+      ; last time step of plot; there is no need to specify a precise time 
+      ; value from the input file,
+      ; 'end_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   end_time_step = 2.0d
+      ;
+      ; default:   -1.d (last available time step)
+      ;***************************************************
+      if(.not. isvar("end_time_step"))then	 
+      
+      
+         end_time_step = -1.d
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --xs-- MINIMUM X-AXIS 
+      ;
+      ; value for minimum of x-axis, selectable if there are 
+      ; NO preset layers 
+      ; for x (as for XY or XZ 2D-DATA);
+      ; there is no need to specify a precise meter value from the input file, 
+      ; it is rounded to the next existent value
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: xs = 150.0d
+      ;
+      ; default:   -1.d (minimum of range)
+      ;***************************************************
+      if(.not. isvar("xs"))then      
+      
+      
+         xs = -1.d
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --xe-- MAXIMUM X-AXIS 
+      ;
+      ; value for maximum of x-axis, selectable if there are 
+      ; NO preset layers 
+      ; for x (as for XY or XZ 2D-DATA);
+      ; there is no need to specify a precise meter value from the input file, 
+      ; it is rounded to the next existent value
+      ;
+      ; data type: double; dimension: [meter] 
+      ;
+      ; example: xe = 300.0d
+      ;
+      ; default:   -1.d (maximum of range)
+      ;***************************************************
+      if(.not. isvar("xe"))then      
+      
+      
+         xe = -1.d
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --ys-- MINIMUM Y-AXIS 
+      ;
+      ; value for minimum of y-axis, selectable if there are 
+      ; NO preset layers 
+      ; for y (as for XY or YZ 2D-DATA);
+      ; there is no need to specify a precise meter value from the input file, 
+      ; it is rounded to the next existent value
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: ys = 150.0d
+      ;
+      ; default:   -1.d (minimum of range)
+      ;***************************************************
+      if(.not. isvar("ys"))then      
+      
+      
+         ys = -1.d
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --ye-- MAXIMUM Y-AXIS 
+      ;
+      ; value for maximum of y-axis, selectable if there are NO preset layers
+      ; for y (as for XY or YZ 2D-DATA);
+      ; there is no need to specify a precise meter value from the input file,
+      ; it is rounded to the next existent value 
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: ye = 300.0d
+      ;
+      ; default:   -1.d (maximum of range)
+      ;***************************************************
+      if(.not. isvar("ye"))then   
+      
+         
+         ye = -1.d
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --zs-- MINIMUM Z-AXIS 
+      ;
+      ; index for minimum of z-axis, selectable if there are 
+      ; NO preset layers 
+      ; for z (as for XZ or YZ 2D-DATA);
+      ; you cannot specify a meter value from the input file due to 
+      ; grid stretching  
+      ;
+      ; data type: integer
+      ;
+      ; example: zs = 0
+      ;
+      ; default:   -1 (minimum of range)
+      ;***************************************************
+      if(.not. isvar("zs"))then      
+      
+      
+         zs = -1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --ze-- MAXIMUM Z-AXIS 
+      ;
+      ; index for maximum of z-axis, selectable if there are 
+      ; NO preset layers
+      ; for z (as for XZ or YZ 2D-DATA);
+      ; you cannot specify a meter value from the input file due to 
+      ; grid stretching  
+      ;
+      ; data type: integer
+      ;
+      ; example: ze = 15
+      ;
+      ; default:   -1 (maximum of range)
+      ;***************************************************
+      if(.not. isvar("ze"))then
+      
+            
+         ze = -1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_columns = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if(.not. isvar("no_columns"))then	 
+      
+      
+         no_columns = 1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_rows = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if(.not. isvar("no_rows"))then	 
+      
+      
+         no_rows = 2
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --sort-- TYPE OF SORTING 
+      ;
+      ; sequence of plots; sorting either by time step [="time"] or 
+      ; by layer/height [="layer"]
+      ;
+      ; data type: string
+      ;
+      ; example: sort = "layer"
+      ;
+      ; default:   "layer" 
+      ;***************************************************
+      if(.not. isvar("sort"))then	 
+      
+      
+         sort = "layer"
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --mode-- TYPE OF PLOT 
+      ;
+      ; isoline plots [="Line"], contour plots [="Fill"] or both [="Both"] 
+      ; can be choosen 
+      ;
+      ; data type: string
+      ;
+      ; example: mode = "Fill"
+      ;
+      ; default:   "Fill" 
+      ;***************************************************
+      if(.not. isvar("mode"))then	 
+      
+      
+         mode = "Fill"
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --fill_mode-- TYPE OF FILLING 
+      ;
+      ; area fill [="AreaFill"], raster fill [="RasterFill"] or 
+      ; cell fill [="CellFill"] can be choosen 
+      ;
+      ; data type: string
+      ;
+      ; example: fill_mode = "AreaFill"
+      ;
+      ; default:    "RasterFill"
+      ;***************************************************
+      if(.not. isvar("fill_mode"))then	 
+      
+      
+         fill_mode = "RasterFill"
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --shape-- ASPECT RATIO 
+      ;
+      ; aspect ratio of axis is kept [=1] or not[=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: shape = 1
+      ;
+      ; default:   1 
+      ;***************************************************
+      if(.not. isvar("shape"))then
+      
+      	 
+         shape = 1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
+      ;
+      ; font size can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size = 0.04
+      ;
+      ; default:   0.04 
+      ;***************************************************
+      if(.not. isvar("font_size"))then
+      
+      	 
+         font_size = 0.04
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 
+      ;
+      ; font size of the legend can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size_legend = 0.04
+      ;
+      ; default:   0.04 
+      ;***************************************************
+      if(.not. isvar("font_size_legend"))then
+      
+      	 
+         font_size_legend = 0.04
+	 
+	 
+      end if	
+      ;***************************************************
+      ; OPTIONAL --legend_label_stride-- REDUCTION OF THE NUMBER 
+      ;                                  OF LABELS IN THE LEGEND
+      ;
+      ; if legend_label_stride is set to 1 every label is shown; 
+      ; if set to 2 every second, ...
+      ;
+      ; data type: integer
+      ;
+      ; example: legend_label_stride = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if(.not. isvar("legend_label_reduction"))then
+      
+      	 
+         legend_label_stride = 2
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --axes_explicit-- 
+      ;          EXPLICIT SETTINGS OF X- AND Y-AXES ARE SWITCHED ON
+      ;
+      ; to use several parameters to set up the axes, 'axes_explicit' 
+      ; must be switched on [=1]; if switched off [=0] units of axes are [m]
+      ;
+      ; data type: integer
+      ;
+      ; example: axes_explicit = 0
+      ;
+      ; default:   0 
+      ;***************************************************
+      if(.not. isvar("axes_explicit"))then
+      
+      	 
+         axes_explicit = 0
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL if axes_explicit = 1 --major_ticks_x-- 
+      ;                              NUMBER OF MAJOR TICK MARKS AT X-AXIS
+      ;
+      ; major_ticks_x can be set to any integer, best segmentation of x-axis 
+      ; can be achieved, if 
+      ; (number of gripdpoints in x-direction)/(major_ticks_x-1)=INTEGER, 
+      ; e.g. 128/8 = 16 -> major_ticks_x should be set to 9
+      ;
+      ; data type: integer
+      ;
+      ; example: major_ticks_x = 6
+      ;
+      ; default:   6 
+      ;***************************************************
+      if(.not. isvar("major_ticks_x"))then
+      
+      	 
+         major_ticks_x = 6
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL if axes_explicit = 1 --major_ticks_y-- 
+      ;                              NUMBER OF MAJOR TICK MARKS AT Y-AXIS
+      ;
+      ; major_ticks_y can be set to any integer, best segmentation of y-axis 
+      ; can be achieved, if 
+      ; (number of gripdpoints in y-direction)/(major_ticks_y-1)=INTEGER, 
+      ; e.g. 128/8 = 16 -> major_ticks_y should be set to 9
+      ;
+      ; data type: integer
+      ;
+      ; example: major_ticks_y = 6
+      ;
+      ; default:   6 
+      ;***************************************************
+      if(.not. isvar("major_ticks_y"))then
+      
+      	 
+         major_ticks_y = 6
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL if axes_explicit = 1 --norm_x--norm_y--norm_z-- 
+      ;                              NORMALISE X-, Y- and Z-AXES
+      ;
+      ; normalising the axes with the given value; 
+      ; units can explicitly be set; 
+      ; by default no normalising is used and units are [meter]
+      ;
+      ; data type: float
+      ;
+      ; default:   1.0 
+      ;***************************************************
+      if(.not. isvar("norm_x"))then      
+      	 
+         norm_x = 1.0	 
+	 
+      end if
+      if(.not. isvar("norm_y"))then      
+      	 
+         norm_y = 1.0	 
+	 
+      end if
+      if(.not. isvar("norm_z"))then      
+      	 
+         norm_z = 1.0	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL if axes_explicit = 1 --unit_x--unit_y--unit_z-- 
+      ;                              UNITS OF X-, Y- and Z-AXES
+      ;
+      ; units of the axes can be set; by default no units are given, 
+      ; if norm_x, norm_y or norm_z are unequal 1., otherwise units are [meter]
+      ;
+      ; data type: string, 
+      ;
+      ; example: unit_x = "m/s"
+      ;
+      ; default:   " " 
+      ;***************************************************
+      if(.not. isvar("unit_x"))then      
+      	 
+         unit_x = " "	 
+	 
+      end if
+      if(.not. isvar("unit_y"))then      
+      	 
+         unit_y = " "	 
+	 
+      end if
+      if(.not. isvar("unit_z"))then      
+      	 
+         unit_z = " "	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --vector-- VECTOR PLOT 
+      ;
+      ; a vector plot for one defined vector is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: vector = 0
+      ;
+      ; default:   0 
+      ;***************************************************
+      if(.not. isvar("vector"))then
+      
+      	 
+         vector = 0
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; REQUIRED IF vector=1 --vec1, vec2-- VECTOR FOR VECTOR PLOT 
+      ;
+      ; variables for the vector, vec1 hast to be set to component 1 and 
+      ; vec2 to component 2;
+      ; inidcate them with one comma before and after each variable;
+      ;
+      ; data type: string
+      ;
+      ; example: vec1=",u,"
+      ;          vec2=",v,"
+      ;
+      ; default:   vec1 = "component1", vec2 = "component2" 
+      ;***************************************************
+      if(.not. isvar("vec1"))then     
+      	 
+         vec1 = "component1"
+	 
+      end if
+      if (.not. isvar("vec2"))then 
+      
+	 vec2 = "component2"	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --plotvec-- VARIABLE FOR EXTRA VECTOR PLOT
+      ;
+      ; the vector plot can be combined with other plots of variables; 
+      ; if this is desired inidcate the variables, 
+      ; where a vector plot shall overlay; inidcate them with one comma 
+      ; before and after each variable
+      ;
+      ; data type: string
+      ;
+      ; example: plotvec = ",u,w,"
+      ;
+      ; default:   "plotvec" (no combining, 
+      ;                       the vector plot is created seperately) 
+      ;***************************************************
+      if(.not. isvar("plotvec"))then
+      
+      	 
+         plotvec = "plotvec"
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --ref_mag-- REFERENCE VECTOR 
+      ;
+      ; length of the reference vector in a vector plot
+      ;
+      ; data type: float
+      ;
+      ; example: ref_mag = 0.05
+      ;
+      ; default:   0.05 
+      ;***************************************************
+      if(.not. isvar("ref_mag"))then
+      
+      	 
+         ref_mag = 0.05 
+	 
+	 
+      end if      	 
+      ;***************************************************
+
+   end if 
+
+   ;******************************************************
+   ; parameters used by PROFILES
+   ;******************************************************
+   
+   if (script .EQ. "profiles")then
+
+      ;***************************************************
+      ; REQUIRED --file_1-- 1ST INPUT FILE
+      ;
+      ; 1st input file produced by PALM; if there is more than one file for 
+      ; all timesteps of a job chain, declare path and file name without 
+      ; cycle number and ".nc" (first and last cycle numbers are given with 
+      ; the parameters 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_1 = "/path_to_file/file_pr"      
+      ;                     if you use more than one cycle number
+      ;          file_1 = "/path_to_file/file_pr.4.nc" 
+      ;                     if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_1"))then
+
+
+         file_1 = "File in"
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --start_f-- if more than one file of a job chain
+      ;                    START OF CYCLIC NUMBER OF THE 1ST INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   3 (if first file: example_pr.3.nc) and 
+      ;            0 (if first file: example_pr.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f"))then  
+      
+          
+         start_f = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --end_f--  if more than one file of a job chain
+      ;            END OF CYCLIC NUMBER OF THE 1ST INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   48 (if last file: example_pr.48.nc) and 
+      ;             0 (if last file: example_pr.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f"))then  
+      
+          
+         end_f = -1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --format_out-- OUTPUT FORMAT
+      ;
+      ; supported file formats: x11, pdf, ps, eps, epsi, ncgm or png 
+      ;
+      ; data type: string
+      ;
+      ; default:   "x11" 
+      ;***************************************************
+      if (.not. isvar("format_out"))then	 
+      
+      
+         format_out = "x11"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --file_out-- OUTPUT FILE
+      ;
+      ; declare path and name of the output file
+      ;
+      ; data type: string
+      ;
+      ; default:   "~/test_pr" 
+      ;***************************************************
+      if (.not. isvar("file_out"))then	
+      
+       
+         file_out = "~/test_pr"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --var-- OUTPUT VARIABLES
+      ;
+      ; names of output variables; 
+      ; inidcate them with one comma before and after each variable
+      ; if the name contains double quotes (") use dq and the '+' operation to 
+      ; concatenate the strings
+      ;
+      ; data type: string 
+      ; 
+      ; example: var = ",u,v,w,w*pt*,w"+dq+"pt"+dq+",wpt," 
+      ;
+      ; default:   ",cross_profiles," (profiles are plotted together according 
+      ;                                to the d3par parameter cross_profiles)
+      ;***************************************************
+      if (.not. isvar("var"))then
+      
+      	 
+         var = ",cross_profiles,"
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --start_time_step-- FIRST TIME STEP
+      ;
+      ; first time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'start_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   start_time_step = 0.5d
+      ;
+      ; default:   -1.d (first available time step)
+      ;***************************************************
+      if (.not. isvar("start_time_step"))then	
+      
+       
+         start_time_step = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --end_time_step-- LAST TIME STEP
+      ;
+      ; last time step of plot; there is no need to specify a precise
+      ; time value from the input file,
+      ; 'end_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   end_time_step = 2.0d
+      ;
+      ; default:   -1.d (last available time step)
+      ;***************************************************
+      if (.not. isvar("end_time_step"))then
+      
+      	 
+         end_time_step = -1.d    
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --time_stride-- TEMPORAL STRIDE 
+      ;
+      ; temporal stride for the plots; if time_stride=1 all the profiles 
+      ; between first_time_step and end_time_step are plotted 
+      ; (including first_time_step and end_time_step), 
+      ; if time_stride=3 every third time step between start_time_step and 
+      ; end_time_step is plotted
+      ;
+      ; data type: integer
+      ;
+      ; example:   time_stride = 3
+      ;
+      ; default:   1 
+      ;***************************************************
+      if (.not. isvar("time_stride"))then	
+      
+       
+         time_stride = 1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --xs-- MINIMUM X-AXIS 
+      ;
+      ; value for minimum of x-axis
+      ;
+      ; data type: float; dimension of variable
+      ;
+      ; example: xs = 300. (e.g. if var=",pt")
+      ;
+      ; default:   -1. (minimum of range)
+      ;***************************************************
+      if (.not. isvar("xs"))then   
+      
+         
+         xs = -1.
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --xe-- MAXIMUM X-AXIS 
+      ;
+      ; value for maximum of x-axis
+      ;
+      ; data type: float; dimension of variable
+      ;
+      ; example: xe = 302. (e.g. if var=",pt")
+      ;
+      ; default:   -1. (maximum of range)
+      ;***************************************************
+      if (.not. isvar("xe"))then  
+      
+          
+         xe = -1.
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --min_z-- MINIMUM Z-AXIS 
+      ;
+      ; value for minimum height of z-axis
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: min_z = 0.0d
+      ;
+      ; default:   -1.d (related to the minimum of z-axis in input file)
+      ;***************************************************
+      if (.not. isvar("min_z"))then   
+      
+         
+         min_z = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --max_z-- MAXIMUM Z-AXIS 
+      ;
+      ; value for maximum height of z-axis
+      ;
+      ; data type: double; dimension: [meter]
+      ;
+      ; example: max_z = 1000.0d
+      ;
+      ; default:   -1.d (related to the maximum of z-axis in input file)
+      ;***************************************************
+      if (.not. isvar("max_z"))then   
+      
+         
+         max_z = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --start_x-- STARTVALUE IN X-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose a startvalue 
+      ; in x-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: start_x = 0
+      ;
+      ; default:   0 (minimum of range)
+      ;***************************************************
+      if (.not. isvar("start_x"))then   
+      
+         
+         start_x = 0
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --end_x-- ENDVALUE IN X-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose an endvalue 
+      ; in x-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: end_x = 200
+      ;
+      ; default:   -1 (maximum of range excluding ghostpoint)
+      ;***************************************************
+      if (.not. isvar("end_x"))then   
+      
+         
+         end_x = -1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --start_y-- STARTVALUE IN Y-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose a startvalue 
+      ; in y-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: start_y = 0
+      ;
+      ; default:   0 (minimum of range)
+      ;***************************************************
+      if (.not. isvar("start_y"))then   
+      
+         
+         start_y = 0
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --end_y-- ENDVALUE IN Y-DIRECTION  
+      ;
+      ; if 3D data is used for profiles you can choose an endvalue 
+      ; in y-direction for horizontal averaging 
+      ;
+      ; data type: integer; dimension [grippoint]
+      ;
+      ; example: end_y = 200
+      ;
+      ; default:   -1 (maximum of range excluding ghostpoint)
+      ;***************************************************
+      if (.not. isvar("end_y"))then   
+      
+         
+         end_y = -1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ;
+      ; default:   -1      (profiles are plotted according 
+      ;                     to the d3par parameter profile_columns)
+      ;***************************************************
+      if (.not. isvar("no_columns"))then	 
+      
+      
+         no_columns = -1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ;
+      ; default:   -1      (profiles are plotted according 
+      ;                     to the d3par parameter profile_rows)
+      ;***************************************************
+      if (.not. isvar("no_rows"))then	
+      
+       
+         no_rows = -1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --log_z-- LOGARITHMIC SCALE OF Z-AXIS 
+      ;
+      ; logarithmic scale for z-axis is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: log_z = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("log_z"))then 
+      
+           
+         log_z = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --norm_z-- NORMALISING Z-AXIS 
+      ;
+      ; value for normalising the z-axis
+      ;
+      ; data type: float
+      ;
+      ; example: norm_z = 1.
+      ;
+      ; default:   1. (no normalising)
+      ;***************************************************
+      if (.not. isvar("norm_z"))then 
+      
+           
+         norm_z = 1.
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --over-- OVERLAYING
+      ;
+      ; predefined overlaying of standard variables is switched 
+      ; on [=1] or off [=0];
+      ; this feature cannot be used with statistic regions
+      ;
+      ; data type: integer
+      ;
+      ; example: over = 0
+      ;
+      ; default:   0 
+      ;***************************************************
+      if (.not. isvar("over"))then
+      
+      	 
+         over = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --combine-- COMBINING 
+      ;
+      ; combining of two or three individual variables is possible and 
+      ; switched on [=1] or off[=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: combine = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("combine"))then  
+      
+          
+         combine = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; REQUIRED IF combine=1 --number_comb-- NUMBER FOR COMBINING 
+      ;
+      ; number of variables for combining; 2 or 3 is valid 
+      ;
+      ; data type: integer
+      ;
+      ; example: number_comb = 2
+      ;
+      ; default:   -1
+      ;***************************************************
+      if (.not. isvar("number_comb"))then 
+      
+           
+         number_comb = -1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; REQUIRED IF combine=1 --c_var-- VARIABLES FOR COMBINING 
+      ;
+      ; names of variables; 
+      ; inidcate them with one comma before and after each variable
+      ; if the name contains double quotes (") use dq and the '+' operation to 
+      ; concatenate the strings
+      ;
+      ; data type: string
+      ;
+      ; example: c_var = ",u,v,w,w*pt*,w"+dq+"pt"+dq+",wpt," 
+      ;
+      ; default:   "c_variables"
+      ;***************************************************
+      if (.not. isvar("c_var"))then 
+      
+           
+         c_var = "c_variables"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --black-- BLACK OR COLOR LINES
+      ;
+      ; colored [=0] or black and white [=1] plots
+      ;
+      ; data type: integer
+      ;
+      ; example: black = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("black"))then 
+      
+           
+         black = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --dash-- DASHED LINES 
+      ;
+      ; use of different line patterns [=1] or continous lines [=0] 
+      ; for different time steps
+      ;
+      ; data type: integer
+      ;
+      ; example: dash = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("dash"))then     
+      
+       
+         dash = 0      
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
+      ;
+      ; font size can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size = 0.02
+      ;
+      ; default:   0.02 
+      ;***************************************************
+      if(.not. isvar("font_size"))then
+      
+      	 
+         font_size = 0.02
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --legend-- SWITCHES ON A LEGEND
+      ;
+      ; a legend is switched on [=1] or off [=0]
+      ;
+      ; data type: integer 
+      ; 
+      ; example: legend = 1 
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("legend"))then
+      
+      	 
+         legend = 1 
+	 
+	 
+      end if    
+      ;***************************************************
+      ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 
+      ;
+      ; font size of the legend can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size_legend = 0.02
+      ;
+      ; default:   0.02 
+      ;***************************************************
+      if(.not. isvar("font_size_legend"))then
+      
+      	 
+         font_size_legend = 0.02
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL ---no_files-- NUMBER OF INPUT FILES
+      ;
+      ; up to 6 input files of different runs can be used; all input files 
+      ; must contain the same variables and dimensionalties;
+      ; identical variables are merged in one plot;
+      ; combining or overlaying of any variables is not feasible;
+      ; an extra legend (besides the time step legend) is drawn where you 
+      ; can explicitily name the items
+      ;
+      ; data type: integer
+      ;
+      ; default:   1 
+      ;***************************************************
+      if (.not. isvar("no_files"))then
+      
+      	 
+         no_files = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --name_legend_1-- 1st LEGEND ITEM
+      ;
+      ; if no_files > 1: name of 1st item in extra legend
+      ;
+      ; data type: string
+      ;
+      ; default:   "File 1" 
+      ;***************************************************
+      if (.not. isvar("name_legend_1"))then 
+      
+           
+         name_legend_1 = "File 1"
+	 
+	 
+      end if
+      ;***************************************************
+      ; REQUIRED if no_files > 1 --file_2-- 2ND INPUT FILE
+      ;
+      ; 2nd input file produced by PALM; if there is more than one file 
+      ; for all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_2 = "/path_to_file/file_pr"      
+      ;                    if you use more than one cycle number
+      ;          file_2 = "/path_to_file/file_pr.4.nc" 
+      ;                    if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_2"))then
+
+
+         file_2 = "File in" 
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --start_f_2-- if more than one file of a job chain
+      ;                       START OF CYCLIC NUMBER OF THE 2ND INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   3 (if first file: example_ts.3.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f_2"))then  
+      
+          
+         start_f_2 = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; REQUIRED --end_f_2-- if more than one file of a job chain
+      ;                      END OF CYCLIC NUMBER OF THE 2ND INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   48 (if last file: example_ts.48.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f_2"))then  
+      
+          
+         end_f_2 = -1 
+	 
+	 
+      end if 	 	 
+      ;***************************************************
+      ; OPTIONAL --name_legend_2-- 2nd LEGEND ITEM
+      ;
+      ; if no_files > 1: name of 2nd item in extra legend
+      ;
+      ; data type: string
+      ;
+      ; default:   "File 2" 
+      ;***************************************************
+      if (.not. isvar("name_legend_2"))then   
+      
+         
+         name_legend_2 = "File 2"
+	 
+	 
+      end if 
+      ;***************************************************
+      ; REQUIRED if no_files > 2 --file_3-- 3RD INPUT FILE
+      ;
+      ; 3rd input file produced by PALM; if there is more than one file 
+      ; for all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_3 = "/path_to_file/file_pr"      
+      ;                     if you use more than one cycle number
+      ;          file_3 = "/path_to_file/file_pr.4.nc" 
+      ;                     if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_3"))then
+
+
+         file_3 = "File in" 
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --start_f_3-- if more than one file of a job chain
+      ;                        START OF CYCLIC NUMBER OF THE 3RD INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   3 (if first file: example_ts.3.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f_3"))then  
+      
+          
+         start_f_3 = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --end_f_3-- if more than one file of a job chain
+      ;                    END OF CYCLIC NUMBER OF THE 3RD INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare 
+      ; the last cyclicnumber which contains timesteps you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   48 (if last file: example_ts.48.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f_3"))then  
+      
+          
+         end_f_3 = -1 
+	 
+	 
+      end if   
+      ;***************************************************
+      ; OPTIONAL --name_legend_3-- 3rd LEGEND ITEM
+      ;
+      ; if no_files > 2: name of 3rd item in extra legend
+      ;
+      ; data type: string
+      ;
+      ; default:   "File 3" 
+      ;***************************************************
+      if (.not. isvar("name_legend_3"))then 
+      
+           
+         name_legend_3 = "File 3"
+	 
+	 
+      end if
+      ;***************************************************
+      ; REQUIRED if no_files > 3 --file_4-- 4TH INPUT FILE
+      ;
+      ; 4th input file produced by PALM; if there is more than one file for 
+      ; all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_4 = "/path_to_file/file_pr"      
+      ;                     if you use more than one cycle number
+      ;          file_4 = "/path_to_file/file_pr.4.nc" 
+      ;                      if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_4"))then
+
+
+         file_4 = "File in" 
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --start_f_4-- if more than one file of a job chain
+      ;                          START OF CYCLIC NUMBER OF THE 4TH INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   3 (if first file: example_ts.3.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f_4"))then  
+      
+          
+         start_f_4 = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --end_f_4-- if more than one file of a job chain
+      ;                   END OF CYCLIC NUMBER OF THE 4TH INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   48 (if last file: example_ts.48.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f_4"))then  
+      
+          
+         end_f_4 = -1 
+	 
+	 
+      end if  
+      ;***************************************************
+      ; OPTIONAL --name_legend_4-- 4th LEGEND ITEM
+      ;
+      ; if no_files > 3: name of 4th item in extra legend
+      ;
+      ; data type: string
+      ;
+      ; default:   "File 4" 
+      ;***************************************************
+      if (.not. isvar("name_legend_4"))then    
+      
+        
+         name_legend_4 = "File 4"
+	 
+	 
+      end if
+      ;***************************************************
+      ; REQUIRED if no_files > 4 --file_5-- 5TH INPUT FILE
+      ;
+      ; 5th input file produced by PALM; if there is more than one file for 
+      ; all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_5 = "/path_to_file/file_pr"      
+      ;                     if you use more than one cycle number
+      ;          file_5 = "/path_to_file/file_pr.4.nc" 
+      ;                     if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_5"))then
+
+
+         file_5 = "File in" 
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --start_f_5-- if more than one file of a job chain
+      ;                     START OF CYCLIC NUMBER OF THE 5TH INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   3 (if first file: example_ts.3.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f_5"))then  
+      
+          
+         start_f_5 = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --end_f_5-- if more than one file of a job chain
+      ;END OF CYCLIC NUMBER OF THE 5TH INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   48 (if last file: example_ts.48.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f_5"))then  
+      
+          
+         end_f_5 = -1 
+	 
+	 
+      end if   	 
+      ;***************************************************
+      ; OPTIONAL --name_legend_5-- 5th LEGEND ITEM
+      ;
+      ; if no_files > 4: name of 5th item in extra legend
+      ;
+      ; data type: string
+      ;
+      ; default:   "File 5" 
+      ;***************************************************
+      if (.not. isvar("name_legend_5"))then 
+      
+           
+         name_legend_5 = "File 5"
+	 
+	 
+      end if
+      ;***************************************************
+      ; REQUIRED if no_files > 5 --file_6-- 6TH INPUT FILE
+      ;
+      ; 6th input file produced by PALM; if there is more than one file for 
+      ; all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_6 = "/path_to_file/file_pr"      
+      ;                     if you use more than one cycle number
+      ;          file_6 = "/path_to_file/file_pr.4.nc" 
+      ;                     if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_6"))then
+
+
+         file_6 = "File in" 
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --start_f_6-- if more than one file of a job chain
+      ;                     START OF CYCLIC NUMBER OF THE 6TH INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   3 (if first file: example_ts.3.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f_6"))then  
+      
+          
+         start_f_6 = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED --end_f_6-- if more than one file of a job chain
+      ; END OF CYCLIC NUMBER OF THE 6TH INPUT FILE
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   48 (if last file: example_ts.48.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f_6"))then  
+      
+          
+         end_f_6 = -1 
+	 
+	 
+      end if       	  	 
+      ;***************************************************
+      ; OPTIONAL --name_legend_6-- 6TH LEGEND ITEM
+      ;
+      ; if no_files > 5: name of 6th item in extra legend
+      ;
+      ; data type: string
+      ;
+      ; default:   "File 6" 
+      ;***************************************************
+      if (.not. isvar("name_legend_6"))then 
+      
+           
+         name_legend_6 = "File 6"
+	 
+	 
+      end if 	  	 
+      ;***************************************************
+   end if
+
+   ;******************************************************
+   ; parameters used by SPECTRA
+   ;******************************************************
+   
+   if (script .EQ. "spectra") then
+
+      ;***************************************************
+      ; REQUIRED --file_1-- INPUT FILE
+      ;
+      ; input file produced by PALM; if there is more than one file for 
+      ; all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_1 = "/path_to_file/file_sp"      
+      ;                     if you use more than one cycle number
+      ;          file_1 = "/path_to_file/file_sp.4.nc" 
+      ;                     if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_1"))then
+
+
+         file_1 = "File in" 
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL/REQUIRED if more than one file of a job chain 
+      ;           --start_f-- START OF CYCLIC NUMBER
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   start_f = 3 (if first file: example_sp.3.nc) and
+      ;            start_f = 0 (if first file: example_sp.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f"))then  
+      
+          
+         start_f = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED if more than one file of a job chain 
+      ;          --end_f-- END OF CYCLIC NUMBER
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   end_f = 48 (if last file: example_sp.48.nc) and 
+      ;            end_f =  0 (if last file: example_sp.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f"))then  
+      
+          
+         end_f = -1
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --format_out-- OUTPUT FORMAT
+      ;
+      ; format of the output file; 
+      ; supported file formats: x11, pdf, ps, eps, epsi, ncgm or png 
+      ;
+      ; data type: string
+      ;
+      ; example: format_out = "pdf"
+      ;
+      ; default:   "x11" 
+      ;***************************************************
+      if (.not. isvar("format_out"))then	
+      
+       
+         format_out = "x11"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --file_out-- OUTPUT FILE
+      ;
+      ; path and name of the output file
+      ;
+      ; data type: string
+      ;
+      ; example: file_out = "/home/path_to_output/test_sp"
+      ;
+      ; default:   "~/test_sp" 
+      ;***************************************************
+      if (.not. isvar("file_out"))then	
+      
+       
+         file_out = "~/test_sp"
+	 
+	 
+      end if 	
+      ;***************************************************
+      ; OPTIONAL --var-- OUTPUT VARIABLES
+      ;
+      ; names of output variables;
+      ; inidcate them with one comma before and after each variable
+      ; if the name contains double quotes (") use dq and the '+' operation to 
+      ; concatenate the strings
+      ;
+      ; data type: string 
+      ; 
+      ; example: var = ",u,v,w,"
+      ;
+      ; default:   "all" (all available variables are plotted)
+      ;***************************************************
+      if (.not. isvar("var"))then
+      
+      	 
+         var = "all"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --start_time_step-- FIRST TIME STEP
+      ;
+      ; first time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'start_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   start_time_step = 0.5d
+      ;
+      ; default:   -1.d (first available time step)
+      ;***************************************************
+      if (.not. isvar("start_time_step"))then
+      
+      	 
+         start_time_step = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --end_time_step-- LAST TIME STEP
+      ;
+      ; last time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'end_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   end_time_step = 2.0d
+      ;
+      ; default:   -1.d (last available time step)
+      ;***************************************************
+      if (.not. isvar("end_time_step"))then
+      
+      	 
+         end_time_step = -1.d
+	 
+	 
+      end if    
+      ;***************************************************
+      ; OPTIONAL --height_level-- HEIGHT LEVELS 
+      ;
+      ; defines if all levels or selected levels are output; 
+      ; a 1D array with up to 100 elements
+      ; from 0 to 99 must be indicated
+      ;
+      ; data type: integer array
+      ;
+      ; example: height_level=(/0,3,7/)
+      ;
+      ; default:   (/-1/) (all levels are output)
+      ;***************************************************
+      if (.not. isvar("height_level"))then
+      
+      	 
+         height_level = (/-1/)
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --sort-- TYPE OF SORTING 
+      ;
+      ; defines if all heights [="height"] or all timesteps [="time"] 
+      ; are merged in one plot
+      ;
+      ; data type: string
+      ;
+      ; example: sort = "height"
+      ;
+      ; default:   "height" 
+      ;***************************************************
+      if (.not. isvar("sort"))then
+      
+      	 
+         sort = "height"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_columns = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("no_columns"))then	 
+      
+      
+         no_columns = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_rows = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if (.not. isvar("no_rows"))then
+      
+      	 
+         no_rows = 2
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --log_x-- LOGARITHMIC SCALE X-AXIS
+      ;
+      ; logarithmic scale for x-axis is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: log_x = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("log_x"))then   
+      
+         
+         log_x = 1
+	 
+	 
+      end if	 
+      ;***************************************************
+      ; OPTIONAL --log_y-- LOGARITHMIC SCALE Y-AXIS 
+      ;
+      ; logarithmic scale for y-axis is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: log_y = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("log_y"))then   
+      
+         
+         log_y = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --norm_height-- NORMALISING X-AXIS WITH HEIGHT
+      ;
+      ; normalising the x-axis with the height of each spectra 
+      ; is switched on [=1] or off [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: norm_height = 0
+      ;
+      ; default:   0 (no normalising)
+      ;***************************************************
+      if (.not. isvar("norm_height"))then   
+      
+         
+         norm_height = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --norm_x-- NORMALISING X-AXIS 
+      ;
+      ; value for normalising the x-axis
+      ;
+      ; data type: float
+      ;
+      ; example: norm_x = 1.
+      ;
+      ; default:   1. (no normalising)
+      ;***************************************************
+      if (.not. isvar("norm_x"))then   
+      
+         
+         norm_x = 1.
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --norm_y-- NORMALISE Y-AXIS 
+      ;
+      ; value for normalising the y-axis
+      ;
+      ; data type: float
+      ;
+      ; example: norm_y = 1.
+      ;
+      ; default:   1. (no normalising)
+      ;***************************************************
+      if (.not. isvar("norm_y"))then     
+      
+       
+         norm_y = 1.
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --unit_x--unit_y-- UNITS OF X-, Y-AXES
+      ;
+      ; unit of the x-axis can be set if norm_x is unequal 1, 
+      ; otherwise the unit is [1/m]; by default no unit is set for the y-axis 
+      ; 
+      ; data type: string, 
+      ;
+      ; example: unit_x = "100/m"
+      ;
+      ; default:   " " 
+      ;***************************************************
+      if(.not. isvar("unit_x"))then      
+      	 
+         unit_x = " "	 
+	 
+      end if
+      if(.not. isvar("unit_y"))then      
+      	 
+         unit_y = " "	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --black-- BLACK OR COLOR LINES
+      ;
+      ; colored [=0] or black and white [=1] plots
+      ;
+      ; data type: integer
+      ;
+      ; example: black = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("black"))then 
+      
+           
+         black = 0
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --dash-- DASHED LINES 
+      ;
+      ; use of different line patterns [=1] or continous lines [=0]
+      ;
+      ; data type: integer
+      ;
+      ; example: dash = 0
+      ;
+      ; default:   0
+      ;***************************************************
+      if (.not. isvar("dash"))then   
+      
+         
+         dash = 0
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
+      ;
+      ; font size can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size = 0.02
+      ;
+      ; default:   0.02 
+      ;***************************************************
+      if(.not. isvar("font_size"))then
+      
+      	 
+         font_size = 0.02
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --font_size_legend-- FONT SIZE OF LEGEND STRINGS 
+      ;
+      ; font size of the legend can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size_legend = 0.02
+      ;
+      ; default:   0.02 
+      ;***************************************************
+      if(.not. isvar("font_size_legend"))then
+      
+      	 
+         font_size_legend = 0.02
+	 
+	 
+      end if	 
+      ;***************************************************
+     
+   end if
+
+   ;******************************************************
+   ; parameters used by TIMESERIES
+   ;******************************************************
+
+   if (script .EQ. "timeseries") then
+
+      ;***************************************************
+      ; REQUIRED --file_1-- INPUT FILE
+      ;
+      ; input file produced by PALM; if there is more than one file for 
+      ; all timesteps of a job chain, 
+      ; declare path and file name without cycle number and ".nc" (first and 
+      ; last cycle numbers are given with the parameters 
+      ; 'start_f' and 'end_f'); 
+      ; otherwise declare path and full file name
+      ;
+      ; data type: string
+      ;
+      ; example: file_1 = "/path_to_file/file_ts"      
+      ;                      if you use more than one cycle number
+      ;          file_1 = "/path_to_file/file_ts.4.nc" 
+      ;                      if you use one file (e.g. with cycle number 4)
+      ;
+      ; default:   "File in" 
+      ;***************************************************
+      if(.not. isvar("file_1"))then
+
+
+         file_1 = "File in"
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL/REQUIRED if more than one file of a job chain 
+      ;          --start_f-- START OF CYCLIC NUMBER
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the first cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   start_f = 3 (if first file: example_ts.3.nc) and 
+      ;            start_f = 0 (if first file: example_ts.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("start_f"))then  
+      
+          
+         start_f = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL/REQUIRED if more than one file of a job chain 
+      ;           --end_f-- END OF CYCLIC NUMBER
+      ;
+      ; if there is more than one file for all timesteps of a job chain, 
+      ; declare the last cyclicnumber which contains timesteps 
+      ; you'd like to use
+      ;
+      ; data type: integer
+      ;
+      ; example:   end_f = 48 (if last file: example_ts.48.nc) and 
+      ;            end_f = 0 (if last file: example_ts.nc)
+      ;
+      ; default:   -1  
+      ;***************************************************
+      if (.not. isvar("end_f"))then  
+      
+          
+         end_f = -1
+	 
+	 
+      end if 
+      ;***************************************************
+      ; OPTIONAL --format_out-- OUTPUT FORMAT
+      ;
+      ; format of the output file; 
+      ; supported file formats: x11, pdf, ps, eps, epsi, ncgm or png 
+      ;
+      ; data type: string
+      ;
+      ; example: format_out = "pdf"
+      ;
+      ; default:   "x11" 
+      ;***************************************************
+      if (.not. isvar("format_out"))then	 
+      
+      
+         format_out = "x11"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --file_out-- OUTPUT FILE
+      ;
+      ; path and name of the output file
+      ;
+      ; data type: string
+      ;
+      ; example: file_out = "/home/path_to_output/test_ts"
+      ;
+      ; default:   "~/test_ts" 
+      ;***************************************************
+      if (.not. isvar("file_out"))then	
+      
+       
+         file_out = "~/test_ts"
+	 
+	 
+      end if 
+ ;***************************************************
+      ; OPTIONAL --var-- OUTPUT VARIABLES
+      ;
+      ; names of output variables; 
+      ; inidcate them with one comma before and after each variable
+      ; if the name contains double quotes (") use dq and the '+' operation to 
+      ; concatenate the strings
+      ;
+      ; data type: string 
+      ; 
+      ; example: var = ",umax,vmax,wmax,w"+dq+"pt"+dq+"0,"
+      ;
+      ; default:   "all" (all available variables are plotted)
+      ;***************************************************
+      if (.not. isvar("var"))then
+      
+      	 
+         var = "all"
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --start_time_step-- FIRST TIME STEP
+      ;
+      ; first time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'start_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   start_time_step = 0.5d
+      ;
+      ; default:   -1.d (first available time step)
+      ;***************************************************
+      if (.not. isvar("start_time_step"))then
+      
+      	 
+         start_time_step = -1.d
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --end_time_step-- LAST TIME STEP
+      ;
+      ; last time step of plot; there is no need to specify a precise 
+      ; time value from the input file,
+      ; 'end_time_step' is rounded to the next existent time step
+      ;
+      ; data type: double; dimension: [hour]
+      ;
+      ; example:   end_time_step = 2.0d
+      ;
+      ; default:   -1.d (last available time step)
+      ;***************************************************
+      if (.not. isvar("end_time_step"))then
+      
+      	 
+         end_time_step = -1.d
+	 
+
+      end if 	 	 
+      ;***************************************************
+      ; OPTIONAL --over-- OVERLAYING
+      ;
+      ; predefined overlaying of standard variables are switched
+      ; on [=1] or off [=0];
+      ; this feature cannot be used with statistic regions
+      ;
+      ; data type: integer
+      ;
+      ; example: over = 0
+      ;
+      ; default:   0 
+      ;***************************************************
+      if (.not. isvar("over"))then
+      
+      	 
+         over = 0
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --norm_t-- NORMALISING X-AXIS OF TIMESERIES PLOTS (T-AXIS)
+      ;
+      ; normalising the x-axis with the given value; 
+      ; the unit can be set explicitly; 
+      ; by default no normalising and unit is set to [s]
+      ;
+      ; data type: float
+      ;
+      ; example: norm_t = 3600.
+      ;
+      ; default:   1. 
+      ;***************************************************
+      if(.not. isvar("norm_t"))then
+      
+      	 
+         norm_t = 1.
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --unit_t-- UNIT OF X-AXIS OF TIMESERIES PLOTS (T-AXIS)
+      ;
+      ; unit of the x-axis can be set; by default unit is set to [s]
+      ;
+      ; data type: string
+      ;
+      ; example: unit_t = "h"
+      ;
+      ; default:   " " 
+      ;***************************************************
+      if(.not. isvar("unit_t"))then
+      
+      	 
+         unit_t = " "
+	 
+	 
+      end if
+      ;***************************************************
+      ; OPTIONAL --no_columns-- NUMBER OF COLUMNS
+      ;
+      ; number of plots in one row 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_columns = 1
+      ;
+      ; default:   1
+      ;***************************************************
+      if (.not. isvar("no_columns"))then	
+      
+       
+         no_columns = 1
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --no_rows-- NUMBER OF ROWS
+      ;
+      ; number of plots in one column 
+      ;
+      ; data type: integer
+      ; 
+      ; example: no_rows = 2
+      ;
+      ; default:   2 
+      ;***************************************************
+      if (.not. isvar("no_rows"))then
+      
+      	 
+         no_rows = 2
+	 
+	 
+      end if 	 
+      ;***************************************************
+      ; OPTIONAL --font_size-- FONT SIZE OF STRINGS 
+      ;
+      ; font size can be changed to fit to the current plot
+      ;
+      ; data type: float
+      ;
+      ; example: font_size = 0.07
+      ;
+      ; default:   0.07 
+      ;***************************************************
+      if(.not. isvar("font_size"))then
+      
+      	 
+         font_size = 0.07
+	 
+	 
+      end if 
+      ;***************************************************
+
+   end if
+	 
+;*********************************************************	 
+   
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/Archive/.ncl_preferences
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/Archive/.ncl_preferences	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/Archive/.ncl_preferences	(revision 3477)
@@ -0,0 +1,129 @@
+___Parameter list_______________________________________________________________________________________
+___Please write your values/strings(wihtout " ") below the corresponding parameter line_________________
+________________________________________________________________________________________________________
+___parameter name__________example____________________________________default value______________used by
+________________________________________________________________________________________________________
+
+___'file_1'________________[path/name.nc; i.e. ~/.../example.nc]______default = File in_________[ALL]
+File in
+___'format_out'____________[ncgm; ps; eps; epsi; pdf; x11]____________default = x11_____________[ALL]
+x11
+___'file_out'______________[path/name; i.e. ~/.../test]_______________default = test____________[ALL]
+test
+___start_time_step_________[0;1;...]__________________________________default = t(0)____________[ALL]
+t(0)
+___end_time_step___________[1;2;...]__________________________________default = t(end)__________[ALL]
+t(end)
+___no_columns______________[1;2;...]__________________________________default = 1_______________[ALL]
+1
+___no_lines________________[1;2;...]__________________________________default = 2_______________[ALL]
+2
+___'var'___________________[,E,dt,umax,;...]__________________________default = variables_______[ALL]
+variables
+___combine_________________[0] or [1]_________________________________default = 0_______________[PR]
+0
+___number_comb_____________[2] or [3]_________________________________default = 0_______________[PR]
+0
+___'c_var'_________________[,us2,vs2,ws2,;...]________________________default = c_variables_____[PR]
+c_variables
+___dash____________________[0] or [1]_________________________________default = 0_______________[PR+SP]
+0
+___black___________________[0] or [1]_________________________________default = 0_______________[PR+SP]
+0
+___min_z___________________[0;10;...]_________________________________default = 0_______________[PR]
+0
+___max_z___________________[100;1000;...]_____________________________default = max(z_u)________[PR] 
+max(z_u)
+___over____________________[0] or [1]_________________________________default = 0_______________[PR+TS]
+0
+___vector__________________[0] or [1]_________________________________default = 0_______________[CS]
+0
+___'vec1'__________________[,u,;,v,;...]______________________________default = vec1____________[CS]
+vec1
+___'vec2'__________________[,u,;,v,;...]______________________________default = vec2____________[CS]
+vec2
+__'plotvec'________________[,u,;,v,;...]______________________________default = plotvec_________[CS]
+plotvec
+___ref_mag_________________[0.1;0.02;...]_____________________________default = 0.05____________[CS]
+0.05
+___'mode'__________________[Fill], [Line] or [Both]___________________default = Fill____________[CS]
+Fill
+___'sort'__________________[time] or [layer]__________________________default = layer___________[CS+SP]
+layer
+___'fill_mode'_____________[AreaFill], [RasterFill] or [CellFill]_____default = AreaFill________[CS]
+AreaFill
+___shape___________________[0] or [1]_________________________________default = 1_______________[CS]
+1
+___xyc_____________________[0] or [1]_________________________________default = 0_______________[CS]
+0
+___xzc_____________________[0] or [1]_________________________________default = 0_______________[CS]
+0
+___yzc_____________________[0] or [1]_________________________________default = 0_______________[CS]
+0
+___xs______________________[0,1,...]__________________________________default = x0______________[CS+PR]
+x0
+___xe______________________[1;2;...]__________________________________default = xdim____________[CS+PR]
+xdim
+___ys______________________[0;1;...]__________________________________default = y0______________[CS]
+y0
+___ye______________________[1;2;...]__________________________________default = ydim____________[CS]
+ydim
+___zs______________________[0;1;...]__________________________________default = z0______________[CS]
+z0
+___ze______________________[1;2;...]__________________________________default = zdim____________[CS]
+zdim
+___prof3d__________________[0] or [1]_________________________________default = 0_______________[PR]
+0
+___logy____________________[0] or [1]_________________________________default = 0_______________[PR+SP]
+0
+___norm____________________[1;5.4;233;...]____________________________default = 1_______________[PR+SP]
+1
+___no_files________________[1;2,3;...]________________________________default = 1_______________[PR]
+1
+___'name_legend_1'_________[i.e. File 2]______________________________default = File 1__________[PR]
+File 1
+___'file_2'________________[path/name.nc; i.e. ~/.../example.2.nc]____default = File in_________[PR]
+File in
+___'name_legend_2'_________[i.e. File 2]______________________________default = File 2__________[PR]
+File 2
+___'file_3'________________[path/name.nc; i.e. ~/.../example.3.nc]____default = File in_________[PR]
+File in
+___'name_legend_3'_________[i.e. File 3]______________________________default = File 3__________[PR]
+File 3
+___'file_4'________________[path/name.nc; i.e. ~/.../example.4.nc]____default = File in_________[PR]
+File in
+___'name_legend_4'_________[i.e. File 4]______________________________default = File 4__________[PR]
+File 4
+___'file_5'________________[path/name.nc; i.e. ~/.../example.5.nc]____default = File in_________[PR]
+File in
+___'name_legend_5'_________[i.e. File 5]______________________________default = File 5__________[PR]
+File 5
+___'file_6'________________[path/name.nc; i.e. ~/.../example.6.nc]____default = File in_________[PR]
+File in
+___'name_legend_6'_________[i.e. File 6]______________________________default = File 6__________[PR]
+File 6
+___'file_7'________________[path/name.nc; i.e. ~/.../example.7.nc]____default = File in_________[PR]
+File in
+___'name_legend_7'_________[i.e. File 7]______________________________default = File 7__________[PR]
+File 7
+___'file_8'________________[path/name.nc; i.e. ~/.../example.8.nc]____default = File in_________[PR]
+File in
+___'name_legend_8'_________[i.e. File 8]______________________________default = File 8__________[PR]
+File 8
+___'file_9'________________[path/name.nc; i.e. ~/.../example.9.nc]____default = File in_________[PR]
+File in
+___'name_legend_9'_________[i.e. File 9]______________________________default = File 9__________[PR]
+File 9
+___'file_10'_______________[path/name.nc; i.e. ~/.../example.10.nc]___default = File in_________[PR]
+File in
+___'name_legend_10'________[i.e. File 10]_____________________________default = File 10_________[PR]
+File 10
+___'file_11'_______________[path/name.nc; i.e. ~/.../example.11.nc]___default = File in_________[PR]
+File in
+___'name_legend_11'________[i.e. File 11]_____________________________default = File 11_________[PR]
+File 11
+___'file_12'_______________[path/name.nc; i.e. ~/.../example.12.nc]___default = File in_________[PR]
+File in
+___'name_legend_12'________[i.e. File 12]_____________________________default = File 12_________[PR]
+File 12
+___end of file ".ncl_preferences"_______________________________________________________________________
Index: /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections.ncl	(revision 3477)
@@ -0,0 +1,154 @@
+load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+; cross-sections
+; last change: $Id: crosssections.ncl 127 2007-10-23 11:05:25Z letzel $
+
+begin
+;
+; set default value(s) for shell script variables assigned on command line
+  if ( .not. isvar("cm") ) then     ; colormap
+    cm = "ncview_default"
+  end if
+  if ( .not. isvar("di") ) then     ; input directory (with final /)
+    di = ""
+  end if
+  if ( .not. isvar("d") ) then      ; output directory (with final /)
+    d = di
+  end if
+  if ( .not. isvar("fi") ) then     ; base name of input file (without suffix)
+    fi = "example_xy"
+  end if
+  if ( .not. isvar("fill_mode") ) then ; "AreaFill", "RasterFill" or "CellFill"
+    fill_mode = "AreaFill"
+  end if
+  if ( .not. isvar("fo") ) then     ; base name of output files (without suffix)
+    fo = ""
+  end if
+  if ( .not. isvar("mode") ) then   ; output mode ("Fill" or "Line")
+    mode = "Fill"
+  end if
+  if ( .not. isvar("t") ) then      ; output time step
+    t = 0
+  end if
+  if ( .not. isvar("var") ) then    ; variable to be output
+    var = "u_xy"
+  end if
+  if ( .not. isvar("xs") ) then     ; output x-coordinate range start (in m)
+    xs = -1e+38
+  end if
+  if ( .not. isvar("xe") ) then     ; output x-coordinate range end (in m)
+    xe = 1e+38
+  end if
+  if ( .not. isvar("ys") ) then     ; output y-coordinate range start (in m)
+    ys = -1e+38
+  end if
+  if ( .not. isvar("ye") ) then     ; output y-coordinate range end (in m)
+    ye = 1e+38
+  end if
+  if ( .not. isvar("zs") ) then     ; output z-coordinate range start (in m)
+    zs = -1e+38
+  end if
+  if ( .not. isvar("ze") ) then     ; output z-coordinate range end (in m)
+    ze = 1e+38
+  end if
+;
+; open input file
+  f  = addfile( di + fi  + ".nc", "r" )
+;
+; open workstation(s) and set colormap
+  wks_x11 = gsn_open_wks("x11","cross-section") ; X11 workstation
+  gsn_define_colormap(wks_x11,cm)
+  if ( isvar("fo") ) then
+    wks_pdf = gsn_open_wks("pdf",d+fo)  ; optional workstations
+    gsn_define_colormap(wks_pdf,cm)
+    wks_eps = gsn_open_wks("eps",d+fo)  ; for output on file
+    gsn_define_colormap(wks_eps,cm)
+    wks_ps  = gsn_open_wks("ps",d+fo)
+    gsn_define_colormap(wks_ps,cm)
+  end if
+;
+; read input data using 'coordinate subscripting'
+; NCL uses the closest corresponding values (in case of two equally distant 
+; values NCL chooses the smaller one)
+  raw_data = f->$var$(t:t,{zs:ze},{ys:ye},{xs:xe})
+  raw_data!0 = "t"
+  raw_data!1 = "z"
+  raw_data!2 = "y"
+  raw_data!3 = "x"
+  time = raw_data&t
+;
+; reduce variable dimensions from 4D to 2D according to output ranges
+  if ( zs .eq. ze ) then
+    data = raw_data(0,0,:,:)
+    x_axis = "x"
+    y_axis = "y"
+    plane  = "z"
+    if ( raw_data&z .eq. -1 ) then
+      level = "-average"
+    else
+      level = "=" + raw_data&z + "m"
+    end if
+  else
+    if ( ys .eq. ye ) then
+      data = raw_data(0,:,0,:)
+      x_axis = "x"
+      y_axis = "z"
+      plane  = "y"
+      if ( raw_data&y .eq. -1 ) then
+        level = "-average"
+      else
+        level = "=" + raw_data&y + "m"
+      end if
+    else
+      if ( xs .eq. xe ) then
+        data = raw_data(0,:,:,0)
+        x_axis = "y"
+        y_axis = "z"
+        plane  = "x"
+        if ( raw_data&x .eq. -1 ) then
+          level = "-average"
+        else
+          level = "=" + raw_data&x + "m"
+        end if
+      end if
+    end if
+  end if
+  delete( raw_data )
+;
+; set up resources
+  cs_res                         = True
+  cs_res@gsnMaximize             = True 
+  cs_res@gsnPaperOrientation     = "portrait"
+  cs_res@gsnPaperWidth           = 8.27
+  cs_res@gsnPaperHeight          = 11.69
+  cs_res@gsnPaperMargin          = 0.79
+  cs_res@tiMainFuncCode          = "~"
+  cs_res@tiMainFontHeightF       = 0.015
+  cs_res@tiMainString            = f@title
+  cs_res@tiXAxisString           = x_axis + " [m]"
+  cs_res@tiYAxisString           = y_axis + " [m]"
+;  cs_res@gsnLeftString           = ""   ; gsn_csm_* scripts use default data
+  cs_res@gsnCenterString         = "t=" + time + "s  " + plane + level
+;  cs_res@gsnRightString          = ""   ; gsn_csm_* scripts use default data
+  cs_res@tmXBMode                ="Automatic"
+  cs_res@tmYLMode                ="Automatic"
+  if ( mode .eq. "Fill" ) then
+    cs_res@cnFillOn                = True
+    cs_res@gsnSpreadColors         = True
+    cs_res@cnFillMode              = fill_mode
+    cs_res@lbOrientation           = "Vertical"  ; vertical label bar
+    cs_res@cnLinesOn               = False
+    cs_res@cnLineLabelsOn          = False
+  end if
+;
+; data output
+  plot_x11 = gsn_csm_contour(wks_x11,data,cs_res)
+  if ( isvar("fo") ) then
+    plot_pdf = gsn_csm_contour(wks_pdf,data,cs_res)
+    plot_eps = gsn_csm_contour(wks_eps,data,cs_res)
+    plot_ps  = gsn_csm_contour(wks_ps, data,cs_res)
+  end if
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections.usage.txt
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections.usage.txt	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections.usage.txt	(revision 3477)
@@ -0,0 +1,58 @@
+Usage of PALM NCL script crosssections.ncl
+==========================================
+Last change: $Id: crosssections.usage.txt 127 2007-10-23 11:05:25Z letzel $
+Marcus Letzel, 17 July 2007
+
+Command-line syntax
+===================
+ncl crosssections.ncl [parameters]
+
+The parameter syntax depends on their data type:
+A) numeric data    : parameter=value      (for example t=0)
+B) character string: 'parameter="string"' (for example 'var="u_xy"')
+
+Alphabetical parameter list
+===========================
+Name	Default value		Meaning
+-----------------------------------------------------------------------------
+cm	"ncview_default"	colormap
+di	""			input directory (with final /)
+d	=di			output directory (with final /)
+fi	"example_xy"		base name of input file (without suffix)
+fo	""			base name of output files (without suffix)
+fill_mode "AreaFill"		fill mode for mode="Fill":
+				"AreaFill", "RasterFill" or "CellFill"
+mode	"Fill"			output mode ("Fill" or "Line")
+t	0			output time step
+var	"u_xy"			variable to be output
+xs	-1e+38			output x-coordinate range start (in m)
+xe	+1e+38			output x-coordinate range end   (in m)
+ys	-1e+38			output y-coordinate range start (in m)
+ye	+1e+38			output y-coordinate range end   (in m)
+zs	-1e+38			output z-coordinate range start (in m)
+ze	+1e+38			output z-coordinate range end   (in m)
+
+Usage
+=====
+This script draws NCL contour plots from two-dimensional cross-sections of 
+NetCDF data produced by PALM. Instantaneous or time-averaged xy-, xz-, yz- or 
+3D-data can be used with this script.
+
+The sectional plane has neither a default orientation nor a default position.
+Both must be specified together using the coordinate range parameters:
+- For xy cross-sections specify zs and ze (with zs=za).
+- For xz cross-sections specify ys and ye (with ys=ya).
+- For yz cross-sections specify xs and xe (with xs=xa).
+
+The remaining coordinate range parameters can optionally be used to restrict 
+the output coordinate range.
+
+By default, only screen output is produced. Additional file output is optional
+and requires to specify the parameter fo. This will create three files: fo.pdf,
+fo.eps and fo.ps.
+
+Input and output files can optionally be preceeded by an input and output
+directory di and d, respectively. If not specified, this scripts expects the
+input file to reside in the current directory.
+
+The contours can be drawn either in "Fill" (default) or "Line" mode.
Index: /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections_new.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections_new.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections_new.ncl	(revision 3477)
@@ -0,0 +1,473 @@
+load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+; cross-sections
+; last change: $Id: crosssections_new.ncl 127 2007-10-23 11:05:25Z letzel $
+
+begin
+;
+; set default value(s) for shell script variables assigned on command line
+  if ( .not. isvar("cm") ) then     ; colormap
+    cm = "ncview_default"
+  end if
+  if ( .not. isvar("di") ) then     ; input directory (with final /)
+    di = ""
+  end if
+  if ( .not. isvar("d") ) then      ; output directory (with final /)
+    d = di
+  end if
+  if ( .not. isvar("fi") ) then     ; base name of input file (without suffix)
+    fi = "example_xy"
+  end if
+  if ( .not. isvar("fill_mode") ) then ; "AreaFill", "RasterFill" or "CellFill"
+    fill_mode = "AreaFill"
+  end if
+  if ( .not. isvar("fo") ) then     ; base name of output files (without suffix)
+    fo = ""
+  end if
+  if ( .not. isvar("mode") ) then   ; output mode ("Fill" or "Line")
+    mode = "Fill"
+  end if
+  if ( .not. isvar("t") ) then      ; output time step
+    t = 0
+  end if
+  if ( .not. isvar("var") ) then    ; variable to be output
+    var = "u_xy"
+  end if
+  if ( .not. isvar("xs") ) then     ; output x-coordinate range start (in m)
+    xs = -1e+38
+  end if
+  if ( .not. isvar("xe") ) then     ; output x-coordinate range end (in m)
+    xe = 1e+38
+  end if
+  if ( .not. isvar("ys") ) then     ; output y-coordinate range start (in m)
+    ys = -1e+38
+  end if
+  if ( .not. isvar("ye") ) then     ; output y-coordinate range end (in m)
+    ye = 1e+38
+  end if
+  if ( .not. isvar("zs") ) then     ; output z-coordinate range start (in m)
+    zs = -1e+38
+  end if
+  if ( .not. isvar("ze") ) then     ; output z-coordinate range end (in m)
+    ze = 1e+38
+  end if
+;
+; open input file
+  f  = addfile( di + fi  + ".nc", "r" )
+;
+; open workstation(s) and set colormap
+  wks_x11 = gsn_open_wks("x11","cross-section") ; X11 workstation
+  gsn_define_colormap(wks_x11,cm)
+  if ( isvar("fo") ) then
+    wks_pdf = gsn_open_wks("pdf",d+fo)  ; optional workstations
+    gsn_define_colormap(wks_pdf,cm)
+    wks_eps = gsn_open_wks("eps",d+fo)  ; for output on file
+    gsn_define_colormap(wks_eps,cm)
+    wks_ps  = gsn_open_wks("ps",d+fo)
+    gsn_define_colormap(wks_ps,cm)
+  end if
+;
+; read input data using 'coordinate subscripting'
+; NCL uses the closest corresponding values (in case of two equally distant 
+; values NCL chooses the smaller one)
+  raw_data = f->$var$(t:t,{zs:ze},{ys:ye},{xs:xe})
+  raw_data!0 = "t"
+  raw_data!1 = "z"
+  raw_data!2 = "y"
+  raw_data!3 = "x"
+  time = raw_data&t
+;
+; reduce variable dimensions from 4D to 2D according to output ranges
+  if ( zs .eq. ze ) then
+    data = raw_data(0,0,:,:)
+    x_axis = "x"
+    y_axis = "y"
+    plane  = "z"
+
+    dx =  f->x(1)
+    dy =  f->y(1)
+
+    if ( raw_data&z .eq. -1 ) then
+      level = "-average"
+    else
+      level = "=" + raw_data&z + "m"
+    end if
+  else
+    if ( ys .eq. ye ) then
+      data = raw_data(0,:,0,:)
+      x_axis = "x"
+      y_axis = "z"
+      plane  = "y"
+
+      dx =  f->x(1)
+      if (isfilevar(f, "zw_3d")) then
+        dz =  f->zw_3d(1)
+      else
+        dz =  f->zw(1)
+      end if
+
+      if ( raw_data&y .eq. -1 ) then
+        level = "-average"
+      else
+        level = "=" + raw_data&y + "m"
+      end if
+    else
+      if ( xs .eq. xe ) then
+        data = raw_data(0,:,:,0)
+        x_axis = "y"
+        y_axis = "z"
+        plane  = "x"
+
+        dy =  f->y(1)
+        if (isfilevar(f, "zw_3d")) then
+          dz =  f->zw_3d(1)
+        else
+          dz =  f->zw(1)
+        end if
+
+        if ( raw_data&x .eq. -1 ) then
+          level = "-average"
+        else
+          level = "=" + raw_data&x + "m"
+        end if
+      end if
+    end if
+  end if
+  delete( raw_data )
+;
+; set up resources
+  cs_res                         = True
+  cs_res@gsnDraw                 = False  
+  cs_res@gsnFrame                = False 
+  cs_res@gsnMaximize             = True 
+  cs_res@gsnPaperOrientation     = "portrait"
+  cs_res@gsnPaperWidth           = 8.27
+  cs_res@gsnPaperHeight          = 11.69
+  cs_res@gsnPaperMargin          = 0.79
+  cs_res@tiMainFuncCode          = "~"
+  cs_res@tiMainFontHeightF       = 0.015
+  cs_res@tiMainString            = f@title
+  cs_res@tiXAxisString           = x_axis + " [m]"
+  cs_res@tiYAxisString           = y_axis + " [m]"
+;  cs_res@gsnLeftString           = ""   ; gsn_csm_* scripts use default data
+  cs_res@gsnCenterString         = "t=" + time + "s  " + plane + level
+;  cs_res@gsnRightString          = ""   ; gsn_csm_* scripts use default data
+  cs_res@tmXBMode                ="Automatic"
+  cs_res@tmYLMode                ="Automatic"
+  if ( mode .eq. "Fill" ) then
+    cs_res@cnFillOn                = True
+    cs_res@gsnSpreadColors         = True
+    cs_res@cnFillMode              = fill_mode
+    cs_res@lbOrientation           = "Vertical"  ; vertical label bar
+    cs_res@cnLinesOn               = False
+    cs_res@cnLineLabelsOn          = False
+  end if
+
+  vector     = True
+  co_overlay = True
+
+  if ( .not. isvar("wv1") ) then
+    vector = False
+  end if
+  if ( .not. isvar("wv2") ) then
+    vector = False
+  end if
+  if ( .not. isvar("co") ) then
+    co_overlay = False
+  end if
+
+  if ( vector .eq. True ) then
+
+    if ( wv1 .eq. "u_xy" .or.  wv1 .eq. "u_xz" .or. wv1 .eq. "u_yz" ) then
+
+      raw_data = f->$wv1$(t:t,{zs:ze},{ys:ye},{xs-(0.5*dx):xe-(0.5*dx)}) 
+      raw_data!0 = "t"
+      raw_data!1 = "z"
+      raw_data!2 = "y"
+      raw_data!3 = "x"
+      time = raw_data&t
+
+    else
+
+      if ( wv1 .eq. "v_xy" .or.  wv1 .eq. "v_xz" .or. wv1 .eq. "v_yz" ) then
+
+        raw_data = f->$wv1$(t:t,{zs:ze},{ys-(0.5*dy):ye-(0.5*dy)},{xs:xe}) 
+        raw_data!0 = "t"
+        raw_data!1 = "z"
+        raw_data!2 = "y"
+        raw_data!3 = "x"
+        time = raw_data&t
+
+      else
+
+        if ( wv1 .eq. "w_xy" .or.  wv1 .eq. "w_xz" .or. wv1 .eq. "w_yz" ) then
+
+          raw_data = f->$wv1$(t:t,{zs+(0.5*dz):ze+(0.5*dz)},{ys:ye},{xs:xe}) 
+          raw_data!0 = "t"
+          raw_data!1 = "z"
+          raw_data!2 = "y"
+          raw_data!3 = "x"
+          time = raw_data&t
+
+        end if
+      end if
+    end if
+
+    if ( zs .eq. ze ) then
+      data_u = raw_data(0,0,:,:)
+    else
+      if ( ys .eq. ye ) then
+        data_u = raw_data(0,:,0,:)
+      else
+        if ( xs .eq. xe ) then
+          data_u = raw_data(0,:,:,0)
+        end if
+      end if
+    end if
+    delete( raw_data )
+
+    if ( wv2 .eq. "u_xy" .or.  wv2 .eq. "u_xz" .or. wv2 .eq. "u_yz" ) then
+
+      raw_data = f->$wv2$(t:t,{zs:ze},{ys:ye},{xs-(0.5*dx):xe-(0.5*dx)}) 
+      raw_data!0 = "t"
+      raw_data!1 = "z"
+      raw_data!2 = "y"
+      raw_data!3 = "x"
+      time = raw_data&t
+
+    else
+
+      if ( wv2 .eq. "v_xy" .or.  wv2 .eq. "v_xz" .or. wv2 .eq. "v_yz" ) then
+
+        raw_data = f->$wv2$(t:t,{zs:ze},{ys-(0.5*dy):ye-(0.5*dy)},{xs:xe}) 
+        raw_data!0 = "t"
+        raw_data!1 = "z"
+        raw_data!2 = "y"
+        raw_data!3 = "x"
+        time = raw_data&t
+
+      else
+
+        if ( wv2 .eq. "w_xy" .or.  wv2 .eq. "w_xz" .or. wv2 .eq. "w_yz" ) then
+
+          raw_data = f->$wv2$(t:t,{zs+(0.5*dz):ze+(0.5*dz)},{ys:ye},{xs:xe}) 
+          raw_data!0 = "t"
+          raw_data!1 = "z"
+          raw_data!2 = "y"
+          raw_data!3 = "x"
+          time = raw_data&t
+
+        end if
+      end if
+    end if
+
+
+    if ( zs .eq. ze ) then
+      data_v = raw_data(0,0,:,:)
+    else
+      if ( ys .eq. ye ) then
+        data_v = raw_data(0,:,0,:)
+      else
+        if ( xs .eq. xe ) then
+          data_v = raw_data(0,:,:,0)
+        end if
+      end if
+    end if
+    delete( raw_data )
+
+    wv_res                     = True
+    wv_res@gsnDraw             = False  
+    wv_res@gsnFrame            = False
+    wv_res@gsnRightString      = ""
+    wv_res@gsnLeftString       = ""
+    wv_res@gsnCenterString     = ""
+    wv_res@vpClipOn            = True
+
+  end if
+
+  if ( co_overlay .eq. True ) then
+
+    raw_data = f->$co$(t:t,{zs:ze},{ys:ye},{xs:xe}) 
+    raw_data!0 = "t"
+    raw_data!1 = "z"
+    raw_data!2 = "y"
+    raw_data!3 = "x"
+    time = raw_data&t
+
+    if ( zs .eq. ze ) then
+      data2 = raw_data(0,0,:,:)
+    else
+      if ( ys .eq. ye ) then
+        data2 = raw_data(0,:,0,:)
+      else
+        if ( xs .eq. xe ) then
+          data2 = raw_data(0,:,:,0)
+        end if
+      end if
+    end if
+    delete( raw_data )
+
+    co_res                              = True
+    co_res@cnLineThicknessF             = 1.0
+    co_res@gsnDraw                      = False
+    co_res@gsnFrame                     = False
+    co_res@gsnContourZeroLineThicknessF = 2.0
+    co_res@gsnContourNegLineDashPattern = 4
+    co_res@cnLineColor                  = "Black"
+    co_res@gsnRightString   = ""
+    co_res@gsnLeftString    = ""
+    co_res@gsnCenterString  = ""
+
+;    co_res1@cnLevelSelectionMode = "ManualLevels"     ; set manual contour levels
+;    co_res1@cnMinLevelValF       = -5.                ; set min contour level
+;    co_res1@cnMaxLevelValF       =  5.                ; set max contour level
+;    co_res1@cnLevelSpacingF      =  0.5               ; set contour spacing
+     co_res@cnLineLabelsOn        = True
+     co_res@cnLineLabelPlacementMode   = "constant"
+;    co_res@cnLineLabelBackgroundColor = "white"
+
+  end if
+
+  if ( co_overlay .eq. True .and. vector .eq. True ) then 
+
+    if ( isvar("fo") ) then
+
+      plot_pdf2 = gsn_csm_contour(wks_pdf,data2,co_res)
+      plot_pdf1 = gsn_csm_contour(wks_pdf,data,cs_res)
+      plot_pdf3 = gsn_csm_vector(wks_pdf,data_u,data_v,wv_res)
+      overlay(plot_pdf1,plot_pdf2)
+      overlay(plot_pdf1,plot_pdf3)
+      draw(plot_pdf1)
+      frame(wks_pdf)
+
+      plot_eps2 = gsn_csm_contour(wks_eps,data2,co_res)
+      plot_eps1 = gsn_csm_contour(wks_eps,data,cs_res)
+      plot_eps3 = gsn_csm_vector(wks_eps,data_u,data_v,wv_res)
+      overlay(plot_eps1,plot_eps2)
+      overlay(plot_eps1,plot_eps3)
+      draw(plot_eps1)
+      frame(wks_eps)
+
+      plot_ps2 = gsn_csm_contour(wks_ps,data2,co_res)
+      plot_ps1 = gsn_csm_contour(wks_ps,data,cs_res)
+      plot_ps3 = gsn_csm_vector(wks_ps,data_u,data_v,wv_res)
+      overlay(plot_ps1,plot_ps2)
+      overlay(plot_ps1,plot_ps3)
+      draw(plot_ps1)
+      frame(wks_ps)
+
+    end if
+
+    plot1 = gsn_csm_contour(wks_x11,data,cs_res)
+    plot2 = gsn_csm_contour(wks_x11,data2,co_res)
+    plot3 = gsn_csm_vector(wks_x11,data_u,data_v,wv_res)
+
+    overlay(plot1,plot2)
+    overlay(plot1,plot3)
+
+    draw(plot1)
+    frame(wks_x11)
+
+  else
+
+    if ( co_overlay .eq. True .and. vector .ne. True ) then
+
+      if ( isvar("fo") ) then
+
+        plot_pdf2 = gsn_csm_contour(wks_pdf,data2,co_res)
+        plot_pdf1 = gsn_csm_contour(wks_pdf,data,cs_res)
+        overlay(plot_pdf1,plot_pdf2)
+        draw(plot_pdf1)       
+        frame(wks_pdf)
+
+        plot_eps2 = gsn_csm_contour(wks_eps,data2,co_res)
+        plot_eps1 = gsn_csm_contour(wks_eps,data,cs_res)
+        overlay(plot_eps1,plot_eps2)
+        draw(plot_eps1)
+        frame(wks_eps)
+
+        plot_ps2 = gsn_csm_contour(wks_ps,data2,co_res)
+        plot_ps1 = gsn_csm_contour(wks_ps,data,cs_res)
+        overlay(plot_ps1,plot_ps2)
+        draw(plot_ps1)
+        frame(wks_ps)
+
+      end if 
+
+      plot1 = gsn_csm_contour(wks_x11,data,cs_res)
+      plot2 = gsn_csm_contour(wks_x11,data2,co_res)
+
+      overlay(plot1,plot2)
+
+      draw(plot1)
+      frame(wks_x11)
+
+    else
+
+    if ( co_overlay .ne. True .and. vector .eq. True ) then 
+
+      if ( isvar("fo") ) then
+
+        plot_pdf1 = gsn_csm_contour(wks_pdf,data,cs_res)
+        plot_pdf3 = gsn_csm_vector(wks_pdf,data_u,data_v,wv_res)
+        overlay(plot_pdf1,plot_pdf3)
+        draw(plot_pdf1)
+        frame(wks_pdf)
+
+        plot_eps1 = gsn_csm_contour(wks_eps,data,cs_res)
+        plot_eps3 = gsn_csm_vector(wks_eps,data_u,data_v,wv_res)
+        overlay(plot_eps1,plot_eps3)
+        draw(plot_eps1)
+        frame(wks_eps)
+
+        plot_ps1 = gsn_csm_contour(wks_ps,data,cs_res)
+        plot_ps3 = gsn_csm_vector(wks_ps,data_u,data_v,wv_res)
+        overlay(plot_ps1,plot_ps3)
+        draw(plot_ps1)
+        frame(wks_ps)
+
+      end if 
+
+      plot1 = gsn_csm_contour(wks_x11,data,cs_res)
+      plot3 = gsn_csm_vector(wks_x11,data_u,data_v,wv_res)
+
+      overlay(plot1,plot3)
+
+      draw(plot1)
+      frame(wks_x11)
+
+    else
+
+    if ( co_overlay .ne. True .and. vector .ne. True) then 
+
+      if ( isvar("fo") ) then
+
+        plot_pdf1 = gsn_csm_contour(wks_pdf,data,cs_res)
+        draw(plot_pdf1)
+        frame(wks_pdf)
+
+        plot_eps1 = gsn_csm_contour(wks_eps,data,cs_res)
+        draw(plot_eps1)
+        frame(wks_eps)
+
+        plot_ps1 = gsn_csm_contour(wks_ps,data,cs_res)
+        draw(plot_ps1)
+        frame(wks_ps)
+
+      end if 
+
+      plot1 = gsn_csm_contour(wks_x11,data,cs_res)
+
+      draw(plot1)
+      frame(wks_x11)
+
+    end if
+    end if
+    end if
+
+  end if
+
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections_new.usage.txt
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections_new.usage.txt	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/Archive/crosssections_new.usage.txt	(revision 3477)
@@ -0,0 +1,65 @@
+Usage of PALM NCL script crosssections_new.ncl
+==============================================
+Last change: $Id: crosssections_new.usage.txt 127 2007-10-23 11:05:25Z letzel $
+initial version: Marcus Letzel, 17 July 2007
+contour and vector overlay: Theres Franke/Marcus Letzel, 26 July 2007
+
+Command-line syntax
+===================
+ncl crosssections_new.ncl [parameters]
+
+The parameter syntax depends on their data type:
+A) numeric data    : parameter=value      (for example t=0)
+B) character string: 'parameter="string"' (for example 'var="u_xy"')
+
+Alphabetical parameter list
+===========================
+Name	Default value		Meaning
+-----------------------------------------------------------------------------
+cm	"ncview_default"	colormap
+di	""			input directory (with final /)
+d	=di			output directory (with final /)
+fi	"example_xy"		base name of input file (without suffix)
+fo	""			base name of output files (without suffix)
+fill_mode "AreaFill"		fill mode for mode="Fill":
+				"AreaFill", "RasterFill" or "CellFill"
+mode	"Fill"			output mode ("Fill" or "Line")
+t	0			output time step
+var	"u_xy"			variable to be output
+xs	-1e+38			output x-coordinate range start (in m)
+xe	+1e+38			output x-coordinate range end   (in m)
+ys	-1e+38			output y-coordinate range start (in m)
+ye	+1e+38			output y-coordinate range end   (in m)
+zs	-1e+38			output z-coordinate range start (in m)
+ze	+1e+38			output z-coordinate range end   (in m)
+co                              variable to be output as contour overlay
+wv1                             first component of wind vector overlay
+wv2                             second component of wind vector overlay
+
+Usage
+=====
+This script draws NCL contour plots from two-dimensional cross-sections of 
+NetCDF data produced by PALM. Instantaneous or time-averaged xy-, xz-, yz- or 
+3D-data can be used with this script.
+
+The sectional plane has neither a default orientation nor a default position.
+Both must be specified together using the coordinate range parameters:
+- For xy cross-sections specify zs and ze (with zs=za).
+- For xz cross-sections specify ys and ye (with ys=ya).
+- For yz cross-sections specify xs and xe (with xs=xa).
+
+The remaining coordinate range parameters can optionally be used to restrict 
+the output coordinate range.
+
+By default, only screen output is produced. Additional file output is optional
+and requires to specify the parameter fo. This will create three files: fo.pdf,
+fo.eps and fo.ps.
+
+Input and output files can optionally be preceeded by an input and output
+directory di and d, respectively. If not specified, this scripts expects the
+input file to reside in the current directory.
+
+The contours can be drawn either in "Fill" (default) or "Line" mode.
+
+The parameter co activates an optional contour overlay; the parameters wv1 and
+wv2 activate an optional vector overlay.
Index: /palm/tags/release-6.0/SCRIPTS/NCL/Archive/plotts.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/Archive/plotts.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/Archive/plotts.ncl	(revision 3477)
@@ -0,0 +1,111 @@
+load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+; time series
+; last change: $Id: plotts.ncl 127 2007-10-23 11:05:25Z letzel $
+
+begin
+;
+; set default value(s) for shell script variables assigned on command line
+  if ( .not. isvar("cm") ) then     ; colormap
+    cm = "ncview_default"
+  end if
+  if ( .not. isvar("di") ) then     ; input directory (with final /)
+    di = ""
+  end if
+  if ( .not. isvar("d") ) then      ; output directory (with final /)
+    d = di
+  end if
+  if ( .not. isvar("fi") ) then     ; base name of input file (without suffix)
+    fi = "example_xy"
+  end if
+  if ( .not. isvar("fo") ) then     ; base name of output files (without suffix)
+    fo = ""
+  end if
+  if ( .not. isvar("ts") ) then      ; output time step
+    ts = 0
+  end if
+  if ( .not. isvar("te") ) then     ; output x-coordinate range start (in m)
+    te = 0
+  end if
+;
+; open input file
+  f  = addfile( di + fi  + ".nc", "r" )
+;
+; open workstation(s) and set colormap
+  wks_x11 = gsn_open_wks("x11","cross-section") ; X11 workstation
+  gsn_define_colormap(wks_x11,cm)
+  if ( isvar("fo") ) then
+    wks_pdf = gsn_open_wks("pdf",d+fo)  ; optional workstations
+    gsn_define_colormap(wks_pdf,cm)
+    wks_eps = gsn_open_wks("eps",d+fo)  ; for output on file
+    gsn_define_colormap(wks_eps,cm)
+    wks_ps  = gsn_open_wks("ps",d+fo)
+    gsn_define_colormap(wks_ps,cm)
+  end if
+;
+; read input data using 'coordinate subscripting'
+; NCL uses the closest corresponding values (in case of two equally distant 
+; values NCL chooses the smaller one)
+
+  if ( .not. isvar("var1") .and. .not. isvar("var2") .and. .not. isvar("var3")  .and. .not. isvar("var4") .and. .not. isvar("var5") .and. .not. isvar("var6")) then
+    vNam = getfilevarnames(f)
+    n2 = dimsizes(vNam)-1
+
+    print(vNam)
+
+  else
+
+    vNam = new((/6/), string)
+
+    vNam(0) = var1
+    vNam(1) = var2
+    vNam(2) = var3
+    vNam(3) = var4
+    vNam(4) = var5
+    vNam(5) = var6
+    n2 = 6
+  end if
+
+  t= f ->time({ts:te})
+
+  res=True
+  res@gsnDraw=False
+  res@gsnFrame=False
+
+  resP = True
+  resP@txString="time series"
+
+  res@vpWidthF=4
+
+  plot=new(40,graphic)                 ; create a plot array
+  plot_pdf=new(40,graphic)             ; create a plot array
+  plot_ps=new(40,graphic)              ; create a plot array
+  plot_eps=new(40,graphic)             ; create a plot array
+
+  n = 0
+
+  do while ( n .lt. n2)
+    data = f ->$vNam(n)$({ts:te})
+    plot(n) = gsn_csm_xy(wks_x11,t,data,res)
+    plot_pdf(n) = gsn_csm_xy(wks_pdf,t,data,res)
+    plot_eps(n) = gsn_csm_xy(wks_eps,t,data,res)
+    plot_ps(n) = gsn_csm_xy(wks_ps,t,data,res)
+    n = n + 1
+  end do
+
+  pa = 0
+  pb = 5
+
+  do while ( pa .lt. dimsizes(plot) )
+    gsn_panel(wks_pdf,plot_pdf(pa:pb),(/6,1/),resP) ; Panel the plots, first using rows x columns, then using number of plots per row
+    gsn_panel(wks_eps,plot_eps(pa:pb),(/6,1/),resP)
+    gsn_panel(wks_ps,plot_ps(pa:pb),(/6,1/),resP)
+    gsn_panel(wks_x11,plot(pa:pb),(/6,1/),resP)
+    pa = pa + 6
+    pb = pb + 6
+  end do
+
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/cross_sections.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/cross_sections.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/cross_sections.ncl	(revision 3477)
@@ -0,0 +1,2305 @@
+load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+;***************************************************
+; Checking the kind of the script
+;***************************************************
+
+function which_script()
+local script 
+begin 
+   script = "cross_section"
+   return(script)
+end
+
+;***************************************************
+; Retrieving the NCL version used
+;***************************************************
+   
+ncl_version_ch = systemfunc("ncl -V") 
+ncl_version    = stringtofloat(ncl_version_ch)
+
+;***************************************************
+; Function for checking file existence in dependence
+; on NCL version
+;***************************************************
+
+function file_exists(version:string,file_name:string)
+begin
+   if( version .GE. "6.2.1" ) then
+      existing = fileexists(file_name)
+   else
+      existing = isfilepresent(file_name)
+   end if
+   return(existing)
+end
+  
+;***************************************************
+; load .ncl.config or .ncl.config.default
+;***************************************************
+
+existing_file = file_exists(ncl_version_ch,file_config)
+if (existing_file) then
+   loadscript(file_config)
+else
+   palm_bin_path = getenv("PALM_BIN")
+   print(" ")
+   print("Neither the personal configuration file '.ncl.config' exists in")
+   print("~/palm/current_version")
+   print("nor the default configuration file '.ncl.config.default' "+\
+         "exists in")
+   print(palm_bin_path + "/NCL")
+   print(" ")
+   exit
+end if
+
+
+begin
+
+   ; ***************************************************
+   ; Retrieving the double quote character
+   ; ***************************************************
+   
+   dq=str_get_dq()
+
+   ; ***************************************************
+   ; set default parameter values and strings if not assigned 
+   ; in prompt or parameter list
+   ; ***************************************************
+
+   ; Selection of type of cross section is done in palmplot
+   if (.not. isvar("xyc"))then        
+      xyc = 0	
+   end if
+   if (.not. isvar("xzc"))then  
+      xzc = 0	
+   end if
+   if (.not. isvar("yzc"))then     
+      yzc = 0
+   end if
+   
+   if (file_1 .EQ. "File in") then
+      print(" ")
+      print("Declare input file 'file_1=' in '.ncl.config' or prompt")
+      print(" ")
+      exit 
+   else
+      file_in = file_1   
+   end if
+
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
+       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+       format_out .NE. "png") then
+      print(" ")
+      print("'format_out = "+format_out+"' is invalid and set to'x11'")
+      print(" ")
+      format_out="x11"
+   end if
+
+   if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then
+      print(" ")
+      print("Output of png files not available")
+      print("png output is avaiable with NCL version 5.2.0 and higher ")
+      print("NCL version used: " + ncl_version_ch)
+      print(" ")
+      exit
+   end if
+
+   if (sort .NE. "layer" .AND. sort .NE. "time") then  
+      print(" ")
+      print("'sort'= "+sort+" is invalid and set to 'layer'")
+      print(" ")
+      sort = "layer"  
+   end if
+   
+   if (mode .NE. "Fill" .AND. mode .NE. "Line" .AND. mode .NE. "Both") then
+      print(" ")
+      print("'mode'= "+mode+" is invalid and set to 'Fill'")
+      print(" ")
+      mode = "Fill"
+   end if
+
+   if (fill_mode .NE. "AreaFill" .AND. fill_mode .NE. "RasterFill" .AND.\
+       fill_mode .NE. "CellFill") then
+      print(" ")
+      print("'fill_mode'= "+fill_mode+" is invalid and set to 'AreaFill'")
+      print(" ")
+      fill_mode = "AreaFill"
+   end if
+   
+   if (shape .NE. 0 .AND. shape .NE. 1) then
+      print(" ")
+      print("'shape'= "+shape+" is invalid and set to 1")
+      print(" ")
+      shape = 1
+   end if 
+
+   if (xyc .NE. 0 .AND. xyc .NE. 1)then
+      print(" ")
+      print("'xyc'= "+xyc+" is invalid and set to 0")
+      print(" ")
+      xyc = 0  
+   end if
+   
+   if (xzc .NE. 0 .AND. xzc .NE. 1)then
+      print(" ")
+      print("'xzc'= "+xzc+" is invalid and set to 0")
+      print(" ")
+      xyc = 0  
+   end if
+   
+   if (yzc .NE. 0 .AND. yzc .NE. 1)then
+      print(" ")
+      print("'yzc'= "+yzc+" is invalid and set to 0")
+      print(" ")
+      xyc = 0  
+   end if
+   
+   if (xyc .EQ. 0 .AND. xzc .EQ. 0 .AND. yzc .EQ. 0) then
+      print(" ")
+      print("Select one crossection (xyc=1 or xzc=1 or yzc=1)")
+      print(" ")
+      exit
+   end if
+   if (xyc .EQ. 1 ) then 
+      if (xzc .EQ. 1 .OR. yzc .EQ. 1) then
+         print(" ")
+         print("Select just one crossection (xyc=1 or xzc=1 or yzc=1)")
+         print(" ") 
+         exit
+      end if
+   end if
+   if (xzc .EQ. 1) then
+      if (xyc .EQ. 1 .OR. yzc .EQ. 1) then
+         print(" ")
+         print("Select just one crossection (xyc=1 or xzc=1 or yzc=1)")
+         print(" ")
+         exit
+      end if
+   end if
+   if (yzc .EQ. 1) then
+      if (xyc .EQ. 1 .OR. xzc .EQ. 1) then
+         print(" ")
+         print("Select just one crossection (xyc=1 or xzc=1 or yzc=1)")
+         print(" ")
+         exit
+      end if
+   end if
+
+   if (vector .NE. 0 .AND. vector .NE. 1) then
+      print(" ")
+      print("Set 'vector' to 0 or 1")
+      print(" ")
+      exit
+   end if  
+   
+   if (norm_x .EQ. 0) then 
+      print(" ")
+      print("Normalising with 0 is not allowed, 'norm_x' is set to 1.0")
+      print(" ")
+      norm_x = 1.0
+   end if
+   if (norm_y .EQ. 0) then 
+      print(" ")
+      print("Normalising with 0 is not allowed, 'norm_y' is set to 1.0")
+      print(" ")
+      norm_y = 1.0
+   end if 
+   if (norm_z .EQ. 0) then 
+      print(" ")
+      print("Normalising with 0 is not allowed, 'norm_z' is set to 1.0")
+      print(" ")
+      norm_z = 1.0
+   end if 
+ 
+   ; ***************************************************
+   ; open input file
+   ; ***************************************************
+   
+   file_in_1 = False
+   if (isStrSubset(file_in, ".nc"))then
+      start_f = -2
+      end_f = -2 
+      file_in_1 = True     
+   end if
+
+   if (start_f .EQ. -1)then
+      print(" ")
+      print("'start_f' must be one of the cyclic numbers (at least 0) "+\
+            "of your input file(s)")
+      print(" ")  
+      exit
+   end if 
+   if (end_f .EQ. -1)then
+      print(" ")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
+      print(" ")  
+      exit
+   end if 
+
+   files=new(end_f-start_f+1,string)
+
+   if (file_in_1)then
+      if (isfilepresent(file_in))then
+         files(0)=file_in
+      else
+         print(" ")
+         print("1st input file: '"+file_in+"' does not exist")
+         print(" ")
+         exit
+      end if
+   else   
+      if (start_f .EQ. 0)then
+         if (isfilepresent(file_in+".nc"))then
+            files(0)=file_in+".nc"
+            do i=1,end_f
+	       if (isfilepresent(file_in+"."+i+".nc"))then    
+                  files(i)=file_in+"."+i+".nc"
+	       else
+	          print(" ")
+                  print("Input file: '"+file_in+"."+i+".nc' does not exist")
+                  print(" ")
+                  exit  
+	       end if	    
+            end do         
+         else
+            print(" ")
+            print("Input file: '"+file_in+".nc' does not exist")
+            print(" ")
+            exit
+         end if
+      else
+         do i=start_f,end_f
+            if (isfilepresent(file_in+"."+i+".nc"))then    
+               files(i-start_f)=file_in+"."+i+".nc"
+	    else
+	       print(" ")
+               print("Input file: '"+file_in+"."+i+".nc' does not exist")
+               print(" ")
+               exit  
+	    end if
+         end do
+      end if
+   end if
+   
+   f=addfiles(files,"r")
+   f_att=addfile(files(0),"r")
+   ListSetType(f,"cat")
+
+   vNam  = getfilevarnames(f_att) 
+   if( ncl_version .GE. 6.1 ) then
+      vNam = vNam(::-1)
+   end if
+   vType = getfilevartypes(f_att,vNam) 
+
+   if ((all(vType .eq. "double"))) then ;distinction if data is double or float
+      check_vType = True
+   else
+      check_vType = False
+   end if 
+
+   print(" ")
+   print("Variables in input file:")
+   print("- "+ vNam)
+   print(" ")
+   dim   = dimsizes(vNam)
+
+   ; ***************************************************
+   ; check for kind of input file
+   ; ***************************************************
+
+   check_3d = True
+   do varn=0,dim-1
+      checkxy = isStrSubset( vNam(varn),"xy")
+      checkxz = isStrSubset( vNam(varn),"xz")
+      checkyz = isStrSubset( vNam(varn),"yz")
+      if (checkxy .OR. checkxz .OR. checkyz) then
+         check_3d = False
+         break
+      end if
+   end do
+   if (.not. check_3d) then
+      if (xyc .EQ. 1)then
+         if (.not. checkxy) then
+            print(" ")
+            print("Your input file doesn't have values for xy cross-sections")
+            if (checkxz)then
+               print("Select another input file or xz cross-sections")
+            else
+               print("Select another input file or yz cross-sections")
+            end if
+            print(" ")
+            exit
+         else
+            print(" ")
+            print("Your input file contains xy data")
+            print(" ") 
+	 end if
+      end if
+      if (xzc .EQ. 1)then
+         if (.not. checkxz) then
+            print(" ")
+            print("Your input file doesn't have values for xz cross-sections")
+            if (checkxy)then
+               print("Select another input file or xy cross-sections")
+            else
+               print("Select another input file or yz cross-sections")
+            end if
+            print(" ")
+            exit
+         else
+            print(" ")
+            print("Your input file contains xz data")
+            print(" ")
+	 end if
+      end if
+      if (yzc .EQ. 1)then
+         if (.not. checkyz) then
+            print(" ")
+            print("Your input file doesn't have values for yz cross-sections")
+            if (checkxy)then
+               print("Select another input file or xy cross-sections")
+            else
+               print("Select another input file or xz cross-sections")
+            end if
+            print(" ")
+            exit
+         else
+            print(" ")
+            print("Your input file contains yz data")
+            print(" ")
+	 end if
+      end if
+   else
+      print(" ")
+      print("Your input file contains 3d or other data")
+      print(" ")
+   end if
+   
+   if (dim .EQ. 0) then
+      print(" ")
+      print("There is no data on file")
+      print(" ")
+      exit
+   end if
+
+   ; ***************************************************
+   ; set up recourses
+   ; ***************************************************
+
+   cs_res                          = True
+   vecres                          = True
+   cs_res@gsnYAxisIrregular2Linear = True  
+   vecres@gsnYAxisIrregular2Linear = True
+  
+   cs_res@gsnDraw                 = False
+   cs_res@gsnFrame                = False
+   cs_res@gsnMaximize                = True
+   
+   cs_res@tmXBLabelFontHeightF   = font_size
+   cs_res@tmYLLabelFontHeightF   = font_size
+   cs_res@tiXAxisFontHeightF     = font_size
+   cs_res@tiYAxisFontHeightF     = font_size
+   cs_res@tmXBMode                ="Automatic"
+   cs_res@tmYLMode                ="Automatic"
+  
+   cs_res@cnLevelSelectionMode    = "AutomaticLevels"
+   cs_res@lbLabelFontHeightF = font_size_legend
+   cs_res@lbLabelStride = legend_label_stride
+   
+
+   cs_resP = True
+   cs_resP@gsnMaximize                = True
+   cs_resP@gsnPanelXWhiteSpacePercent = 4.0
+   cs_resP@gsnPanelYWhiteSpacePercent = 4.0
+   cs_resP@txFont                     = "helvetica"
+   cs_resP@txString                   = f_att@title
+   cs_resP@txFuncCode                 = "~"         	
+   cs_resP@txFontHeightF              = 0.0105        
+  
+   if ( mode .eq. "Fill" ) then
+      cs_res@cnFillOn             = True
+      cs_res@gsnSpreadColors      = True
+      cs_res@cnFillMode           = fill_mode	
+      cs_res@cnLinesOn            = False	
+      cs_res@cnLineLabelsOn       = False
+   end if
+
+   if ( mode .eq. "Both" ) then
+      cs_res@cnFillOn             = True
+      cs_res@gsnSpreadColors      = True
+      cs_res@cnFillMode           = fill_mode 
+      cs_res@cnLinesOn            = True
+      cs_res@cnLineLabelsOn       = True
+   end if
+
+   ; *********************************************
+   ; set up of start_time_step and end_time_step
+   ; *********************************************
+
+   t_all         = f[:]->time
+   nt            = dimsizes(t_all)
+
+   if (nt .EQ. 1)then
+      delta_t=t_all(nt-1)/nt
+   else
+      delta_t_array = new(nt-1,double)
+
+      do i=0,nt-2
+         delta_t_array(i) = t_all(i+1)-t_all(i)
+      end do
+
+      delta_t = min(delta_t_array)
+      delete(delta_t_array)
+   end if
+
+
+   ; ****************************************************	
+   ; start of time step and different types of mistakes that could be done
+   ; ****************************************************
+
+   if (start_time_step .EQ. -1.) then   	
+      start_time_step=t_all(0)/3600      
+   else 
+      if (start_time_step .GT. t_all(nt-1)/3600)
+         print(" ")
+         print("'start_time_step' = "+ start_time_step +"h is greater than "+\
+               "last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print(" ")
+         print("Select another 'start_time_step'")
+         print(" ")
+         exit
+      end if
+      if (start_time_step .LT. t_all(0)/3600)
+         print(" ")
+         print("'start_time_step' = "+ start_time_step +"h is lower than "+\
+               "first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+         print(" ")
+         print("Select another 'start_time_step'")
+         print(" ")
+         exit
+      end if
+   end if
+   do i=0,nt-1    
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+         st=i
+         break
+      else
+         st=0
+      end if
+   end do
+
+        
+   ; ****************************************************
+   ; end of time step and different types of mistakes that could be done
+   ; ****************************************************
+
+   if (end_time_step .EQ. -1.) then     	
+      end_time_step = t_all(nt-1)/3600  
+   else  
+      if (end_time_step .LT. t_all(0)/3600)
+         print(" ")
+         print("'end_time_step' = "+end_time_step+ "h is lower than "+\
+               "first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+         print(" ")
+         print("Select another 'end_time_step'")
+         print(" ")
+         exit
+      end if
+      if (end_time_step .GT. t_all(nt-1)/3600)
+         print(" ")
+         print("'end_time_step' = "+ end_time_step +"h is greater than "+\
+               "last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print(" ")
+         print("Select another 'end_time_step'")  
+         print(" ")
+         exit
+      end if
+      if (end_time_step .LT. start_time_step/3600)
+         print(" ")
+         print("'end_time_step' = "+ end_time_step +"h is lower than "+\
+               "'start_time_step' = "+start_time_step+"h")
+         print(" ")
+         print("Select another 'start_time_step' or 'end_time_step'")
+         print(" ")
+         exit
+      end if
+   end if
+   do i=0,nt-1     
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+         et=i
+         break
+      else
+         et=0
+      end if
+   end do 
+  
+   delete(start_time_step)
+   start_time_step=round(st,3)
+   delete(end_time_step)
+   end_time_step=round(et,3)
+
+   print(" ")
+   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
+                t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(end_time_step)/3600+" h = "  +\
+                t_all(end_time_step)+" s => index = "+end_time_step)
+   print(" ")
+  
+   no_time=(end_time_step-start_time_step)+1
+
+   ; ****************************************************
+   ; set up variables for vector plot if required
+   ; ****************************************************   
+
+   if (vector .EQ. 1) then
+      if (vec1 .EQ. "component1") then
+         print(" ")
+         print("Indicate Vector 1 ('vec1') for Vector-Plot or "+\
+               "set 'vector' to 0")
+         print(" ")
+         exit
+      end if
+      if (vec2 .EQ. "component2") then
+         print(" ")
+         print("Indicate Vector 2 ('vec2') for Vector-Plot or "+\
+               "set 'vector' to 0")
+         print(" ")
+         exit
+      end if            
+   end if 
+
+   check_vec1 = False
+   check_vec2 = False
+   check_vecp = False
+
+   ; ****************************************************
+   ; get data for plots
+   ; ****************************************************
+
+   if (xyc .EQ. 1) then
+      do varn=0,dim-1
+         if (vNam(varn) .eq. "xu" .OR. vNam(varn) .eq. "x")then    
+            x_d     = f_att->$vNam(varn)$
+            xdim    = dimsizes(x_d)-1
+            delta_x = x_d(1)-x_d(0)
+            break
+         end if
+      end do 
+      do varn=0,dim-1
+         if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y")then   
+            y_d     = f_att->$vNam(varn)$
+            ydim    = dimsizes(y_d)-1
+            delta_y = y_d(1)-y_d(0)
+            break
+         end if
+      end do
+      do varn=0,dim-1
+         if (vNam(varn) .eq. "zu_3d" .OR. vNam(varn) .eq. "zw_3d")then
+            z_d     = f_att->$vNam(varn)$
+            zdim    = dimsizes(z_d)-1
+            delta_z = 0
+            break
+         else
+            if (vNam(varn) .eq. "zu_xy" .OR. vNam(varn) .eq. "zw_xy") then
+               z_d     = f_att->$vNam(varn)$
+               zdim    = dimsizes(z_d)-1 
+               delta_z = -1.d
+               break
+            else
+               zdim    = 0
+               delta_z = -1.d
+            end if
+         end if
+         if (vNam(varn) .eq. "zu1_xy") then
+            zu1    = f_att->$vNam(varn)$
+         end if
+      end do
+   end if
+   if (xzc .EQ. 1) then
+      do varn=0,dim-1
+         if (vNam(varn) .eq. "xu"  .OR. vNam(varn) .eq. "x") then 
+            x_d     = f_att->$vNam(varn)$
+            xdim    = dimsizes(x_d)-1
+            delta_x = x_d(1)-x_d(0)
+            break
+         end if
+      end do
+      do varn=0,dim-1   
+         if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. \
+             vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then
+            z_d     = f_att->$vNam(varn)$
+            zdim    = dimsizes(z_d)-1 
+            delta_z = z_d(1)-z_d(0)
+            break
+         end if
+      end do
+      do varn=0,dim-1 
+         if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y") then
+            y_d     = f_att->$vNam(varn)$
+            ydim    = dimsizes(y_d)-1
+            delta_y = y_d(1)-y_d(0)
+            break
+         else
+            if (vNam(varn) .eq. "y_xz" .or. vNam(varn) .eq. "yv_xz") then
+               y_d     = f_att->$vNam(varn)$
+               ydim    = dimsizes(y_d)-1 
+               delta_y = -1.d
+               break
+            else
+               ydim    = 0
+               delta_y = -1.d
+            end if
+         end if 
+      end do
+   end if
+   if (yzc .EQ. 1) then
+      do varn=0,dim-1  
+         if (vNam(varn) .eq. "yv" .or. vNam(varn) .eq. "y") then
+            y_d     = f_att->$vNam(varn)$
+            ydim    = dimsizes(y_d)-1
+            delta_y = y_d(1)-y_d(0)
+            break
+         end if
+      end do
+      do varn=0,dim-1 
+         if (vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "zu" .OR. \
+             vNam(varn) .eq. "zu_3d" .or. vNam(varn) .eq. "zw_3d") then
+            z_d     = f_att->$vNam(varn)$
+            zdim    = dimsizes(z_d)-1 
+            delta_z = z_d(1)-z_d(0)
+            break
+         end if
+      end do
+      do varn=0,dim-1 
+         if (vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "x")
+            x_d     = f_att->$vNam(varn)$
+            xdim    = dimsizes(x_d)-1 
+            delta_x = x_d(1)-x_d(0)
+            break
+         else
+            if (vNam(varn) .eq. "xu_yz" .or. vNam(varn) .eq. "x_yz" ) then
+               x_d     = f_att->$vNam(varn)$
+               xdim    = dimsizes(x_d)-1 
+               delta_x = -1.d
+               break
+            else
+               xdim    = 0
+               delta_x = -1.d
+            end if
+         end if 
+      end do
+   end if
+ 
+   ; ****************************************************
+   ; set up ranges of x-, y- and z-coordinates
+   ; ****************************************************         
+                    
+   if (xs .EQ. -1.d) then     		
+      xs = x_d(0)
+      if (delta_x .EQ. -1) then
+         print(" ") 
+         print("You cannot choose a start value for x, "+\
+               "there are preset layers for x")
+         print(" ")
+         xstart=0
+      end if
+   else 
+      if (delta_x .EQ. -1) then
+         print(" ") 
+         print("You cannot choose a start value for x, "+\
+               "there are preset layers for x")
+         print(" ")
+         xstart=0
+      else
+         if (xs .LT. 0-delta_x/2) then
+            print(" ")
+            print("range start for x-coordinate = "+\
+                   xs+"m is lower than first value = "+(0-delta_x/2)+"m")
+            print(" ")
+            exit
+         end if
+         if (xyc .EQ. 1 .OR. xzc .EQ. 1) then
+            if (xs .GE. xdim*delta_x) then
+               print(" ")
+               print("range start for x-coordinate = "+\
+                     xs+"m is equal or greater than last value = "+\
+                     xdim*delta_x+"m")
+               print(" ")
+               exit
+            end if 
+         else
+            if (xs .GT. xdim*delta_x) then
+               print(" ")
+               print("range start for x-coordinate = "+\
+                     xs+"m is greater than last value = "+\
+                     xdim*delta_x+"m")
+               print(" ")
+               exit
+            end if 
+         end if
+      end if
+   end if 
+
+   if (ys .EQ. -1.d) then    
+      ys = y_d(0)
+      if (delta_y .EQ. -1) then
+         print(" ") 
+         print("You cannot choose a start value for y, "+\
+               "there are preset layers for y")
+         print(" ")
+         ystart=0
+      end if
+   else
+      if (delta_y .EQ. -1) then
+         print(" ") 
+         print("You cannot choose a start value for y, "+\
+                "there are preset layers for y")
+         print(" ")
+         ystart=0
+      else
+         if (ys .LT. 0-delta_y/2) then
+            print(" ")
+            print("range start for y-coordinate = "+\
+                  ys+"m is lower than first value = "+0-delta_y/2+"m")
+            print(" ")
+            exit
+         end if
+         if (xyc .EQ. 1 .OR. yzc .EQ. 1) then
+            if (ys .GE. ydim*delta_y) then
+               print(" ")
+               print("range start for y-coordinate = "+\
+                     ys+"m is equal or greater than last value = "+\
+                     ydim*delta_y+"m")
+               print(" ")
+               exit
+            end if
+         else
+            if (ys .GT. ydim*delta_y) then
+               print(" ")
+               print("range start for y-coordinate = "+\
+                     ys+"m is greater than last value = "+ydim*delta_y+"m")
+               print(" ")
+               exit
+            end if
+         end if
+      end if
+   end if
+  
+   if (zs .EQ. -1) then     			
+      zs = 0
+      if (delta_z .EQ. -1) then
+         print(" ") 
+         print("You cannot choose a start value for z, "+\
+               "there are preset layers for z")
+         print(" ")
+      end if
+   else
+      if (delta_z .EQ. -1) then
+         print(" ") 
+         print("You cannot choose a start value for z, "+\
+               "there are preset layers for z")
+         print(" ")
+         zs = 0
+      else
+         if (zs .LT. 0) then
+            print(" ")
+            print("range start for z-coordinate = "+\
+                  zs+" is lower than first gridpoint = 0")
+            print(" ")
+            exit
+         end if
+         if (xzc .EQ. 1 .OR. yzc .EQ. 1) then
+            if (zs .GE. zdim) then
+               print(" ")
+               print("range start for z-coordinate = "+\
+                     zs+" is equal or greater than last gridpoint = "+zdim)
+               print(" ")
+               exit
+            end if
+         else
+            if (zs .GT. zdim) then
+               print(" ")
+               print("range start for z-coordinate = "+\
+                     zs+" is greater than last gridpoint = "+zdim)
+               print(" ")
+               exit
+            end if
+         end if
+      end if
+   end if  
+
+   if (xe .EQ. -1) then    
+      xe = x_d(xdim)
+      if (delta_x .EQ. -1) then
+         print(" ") 
+         print("You cannot choose an end value for x, "+\
+               "there are preset layers for x")
+         print(" ")
+         xend=xdim
+      end if
+   else
+      if (delta_x .EQ. -1) then
+         print(" ") 
+         print("You cannot choose an end value for x, "+\
+               "there are preset layers for x")
+         print(" ")
+         xend=xdim
+      else
+         if (xe .GT. xdim*delta_x) then
+            print(" ")
+            print("range end for x-coordinate = "+\
+                  xe+"m is greater than last value = "+xdim*delta_x+"m")
+            print(" ") 
+            exit 
+         end if 
+         if (xyc .EQ. 1 .OR. xzc .EQ. 1) then
+            if (xe .LE. 0-delta_x/2)
+               print(" ")
+               print("range end for x-coordinate = "+\
+                     xe+"m is equal or lower than first value = "+\
+                     (0-delta_x/2)+"m")
+               print(" ")
+               exit
+            end if
+            if (xe .LE. xs) then
+               print(" ")
+               print("range end for x-coordinate = "+\
+                     xe+"m is equal or lower than start range = "+xs+"m")
+               print(" ")
+               exit
+            end if
+            if (xe .EQ. xs+1) then
+               print(" ")
+               print("range end for x-coordinate = "+\
+                     xe+"m must be at least two more gridpoints "+\
+                     "greater than start range = "+xs+"m")
+               print(" ")
+               exit
+            end if
+         else
+            if (xe .LT. 0-delta_x/2)
+               print(" ")
+               print("range end for x-coordinate = "+\
+                     xe+"m is lower than first value = "+(0-delta_x/2)+"m")
+               print(" ")
+               exit
+            end if
+            if (xe .LT. xs) then
+               print(" ")
+               print("range end for x-coordinate = "+\
+                     xe+"m is lower than start range = "+xs+"m")
+               print(" ")
+               exit
+            end if
+         end if 
+      end if               
+   end if
+   
+   if (ye .EQ. -1) then  
+      ye = y_d(ydim)
+      if (delta_y .EQ. -1) then
+         print(" ") 
+         print("You cannot choose an end value for y, "+\
+               "there are preset layers for y")
+         print(" ")
+         yend=ydim
+      end if
+   else
+      if (delta_y .EQ. -1) then
+         print(" ") 
+         print("You cannot choose an end value for y, "+\
+               "there are preset layers for y")
+         print(" ")
+         yend=ydim
+      else
+         if (ye .GT. ydim*delta_y) then
+            print(" ")
+            print("range end for y-coordinate = "+\
+                  ye+"m is greater than last value = "+ydim*delta_y+"m")
+            print(" ") 
+            exit 
+         end if 
+         if (xyc .EQ. 1 .OR. yzc .EQ. 1) then
+            if (ye .LE. 0-delta_y/2)
+               print(" ")
+               print("range end for y-coordinate = "+\
+                     ye+"m is equal or lower than first value = "+\
+                     (0-delta_y/2)+"m")
+               print(" ")
+               exit
+            end if
+            if (ye .LE. ys) then
+               print(" ")
+               print("range end for y-coordinate = "+\
+                    ye+"m is equal or lower than start range = "+ys+"m")
+               print(" ")
+               exit
+            end if
+            if (ye .EQ. ys+1) then
+               print(" ")
+               print("range end for y-coordinate = "+\
+                     ye+"m must be at least two more gridpoints greater "+\
+                     "than start range = "+ys+"m")
+               print(" ")
+               exit
+            end if
+         else
+            if (ye .LT. 0-delta_y/2)
+               print(" ")
+               print("range end for y-coordinate = "+\
+                     ye+"m is lower than first value = "+(0-delta_y/2)+"m")
+               print(" ")
+               exit
+            end if
+            if (ye .LT. ys) then
+               print(" ")
+               print("range end for y-coordinate = "+\
+                     ye+"m is lower than start range = "+ys+"m")
+               print(" ")
+               exit
+            end if
+         end if
+      end if
+   end if 
+ 
+   if (ze .EQ. -1) then  
+      ze = zdim
+      if (delta_z .EQ. -1) then
+         print(" ") 
+         print("You cannot choose an end value for z, "+\
+               "there are preset layers for z")
+         print(" ")
+         ze = zdim
+      end if
+   else
+      if (delta_z .EQ. -1) then
+         print(" ") 
+         print("You cannot choose an end value for z, "+\
+               "there are preset layers for z")
+         print(" ")
+         ze = zdim
+      else
+         if (ze .GT. zdim) then
+            print(" ")
+            print("range end for z-coordinate = "+\
+                  ze+" is greater than last gridpoint = "+zdim)
+            print(" ") 
+            exit 
+         end if 
+         if (xzc .EQ. 1 .OR. yzc .EQ. 1) then
+            if (ze .LE. 0)
+               print(" ")
+               print("range end for z-coordinate = "+\
+                     ze+" is equal or lower than first gridpoint = 0")
+               print(" ")
+               exit
+            end if
+            if (ze .LE. zs) then
+               print(" ")
+               print("range end for z-coordinate = "+\
+                     ze+" is equal or lower than start range = "+zs)
+               print(" ")
+               exit
+            end if
+            if (ze .EQ. zs+1) then
+               print(" ")
+               print("range end for z-coordinate = "+\
+                     ze+" must be at least two more gridpoints "+\
+                     "greater than start range = "+zs)
+               print(" ")
+               exit
+            end if
+         else
+            if (ze .LT. 0)
+               print(" ")
+               print("range end for z-coordinate = "+\
+                     ze+" is lower than first gridpoint = 0")
+               print(" ")
+               exit
+            end if
+            if (ze .LT. zs) then
+               print(" ")
+               print("range end for z-coordinate = "+\
+                     ze+" is lower than start range = "+zs)
+               print(" ")
+               exit
+            end if
+         end if
+      end if
+   end if 
+
+   if (delta_x .NE. -1) then
+      do i=0,xdim    
+         if (xs .GT. x_d(i)-delta_x/2 .AND. xs .LE. x_d(i)+delta_x/2)then
+            xstart=i
+            break
+         end if
+      end do 
+      do i=0,xdim    
+         if (xe .GT. x_d(i)-delta_x/2 .AND. xe .LE. x_d(i)+delta_x/2)then
+            xend=i
+            break
+         end if
+      end do
+   end if
+   if (delta_y .NE. -1) then
+      do i=0,ydim    
+         if (ys .GT. y_d(i)-delta_y/2 .AND. ys .LE. y_d(i)+delta_y/2)then
+            ystart=i
+            break
+         end if
+      end do 
+      do i=0,ydim    
+         if (ye .GT. y_d(i)-delta_y/2 .AND. ye .LE. y_d(i)+delta_y/2)then
+            yend=i
+            break
+         end if
+      end do 
+   end if
+
+   if( shape .eq. 1 ) then 
+      if (xyc .EQ. 1)then
+         cs_res@vpWidthF    = (xe-xs)/(ye-ys)        
+         cs_res@vpHeightF   = 1
+	 vecres@vpWidthF    = (xe-xs)/(ye-ys)        
+         vecres@vpHeightF   = 1
+	 if (xe-xs .GT. ye-ys)then
+	    if (no_rows .LE. no_columns)then
+	       cs_res@gsnPaperOrientation     = "landscape"
+	       vecres@gsnPaperOrientation     = "landscape"
+	       cs_res@lbOrientation = "Horizontal" 
+	    else 
+	       cs_res@gsnPaperOrientation     = "portrait"
+	       vecres@gsnPaperOrientation     = "portrait"
+	       cs_res@lbOrientation = "Vertical"
+	    end if  
+	 else
+	    if (no_rows .GE. no_columns)then
+	       cs_res@gsnPaperOrientation     = "portrait"
+	       vecres@gsnPaperOrientation     = "portrait"
+	       cs_res@lbOrientation = "Vertical" 
+	    else
+	       cs_res@gsnPaperOrientation     = "landscape"
+	       vecres@gsnPaperOrientation     = "landscape"
+	       cs_res@lbOrientation = "Horizontal"
+	    end if
+	 end if
+      end if
+      if (xzc .EQ. 1)then
+         cs_res@vpWidthF    = (xe-xs)/(delta_x*(ze-zs))        
+         cs_res@vpHeightF   = 1
+	 vecres@vpWidthF    = (xe-xs)/(delta_x*(ze-zs))        
+         vecres@vpHeightF   = 1
+	 if (xe-xs .GT. (delta_x*(ze-zs)))then
+	    if (no_rows .LE. no_columns)then
+	       cs_res@gsnPaperOrientation     = "landscape"
+	       vecres@gsnPaperOrientation     = "landscape"
+	       cs_res@lbOrientation = "Horizontal" 
+	    else 
+	       cs_res@gsnPaperOrientation     = "portrait"
+	       vecres@gsnPaperOrientation     = "portrait"
+	       cs_res@lbOrientation = "Vertical"
+	    end if  
+	 else
+	    if (no_rows .GE. no_columns)then
+	       cs_res@gsnPaperOrientation     = "portrait"
+	       vecres@gsnPaperOrientation     = "portrait"
+	       cs_res@lbOrientation = "Vertical" 
+	    else
+	       cs_res@gsnPaperOrientation     = "landscape"
+	       vecres@gsnPaperOrientation     = "landscape"
+	       cs_res@lbOrientation = "Horizontal"
+	    end if
+	 end if
+      end if
+      if (yzc .EQ. 1)then
+         cs_res@vpWidthF    = (ye-ys)/(delta_y*(ze-zs))        
+         cs_res@vpHeightF   = 1
+	 vecres@vpWidthF    = (ye-ys)/(delta_y*(ze-zs))        
+         vecres@vpHeightF   = 1
+	 if (ye-ys .GT. (delta_y*(ze-zs)))then
+            if (no_rows .LE. no_columns)then
+	       cs_res@gsnPaperOrientation     = "landscape"
+	       vecres@gsnPaperOrientation     = "landscape"
+	       cs_res@lbOrientation = "Horizontal" 
+	    else 
+	       cs_res@gsnPaperOrientation     = "portrait"
+	       vecres@gsnPaperOrientation     = "portrait"
+	       cs_res@lbOrientation = "Vertical"
+	    end if  
+	 else
+	    if (no_rows .GE. no_columns)then
+	       cs_res@gsnPaperOrientation     = "portrait"
+	       vecres@gsnPaperOrientation     = "portrait"
+	       cs_res@lbOrientation = "Vertical" 
+	    else
+	       cs_res@gsnPaperOrientation     = "landscape"
+	       vecres@gsnPaperOrientation     = "landscape"
+	       cs_res@lbOrientation = "Horizontal"
+	    end if
+	 end if
+      end if
+   end if
+
+   delete(xs)
+   delete(xe)   
+   delete(ys)
+   delete(ye)
+
+   xs=xstart
+   xe=xend
+   ys=ystart
+   ye=yend
+
+   if (xyc .EQ. 1) then
+      d= (ye-ys+1)/(major_ticks_y-1)
+      e=(xe-xs+1)/(major_ticks_x-1)
+      array_yl       =new(major_ticks_y,integer)
+      array_yl_labels=new(major_ticks_y,double)
+      array_minor_yl =new((major_ticks_y-1)*4,double)
+      array_xb       =new(major_ticks_x,integer)
+      array_xb_labels=new(major_ticks_x,double)
+      array_minor_xb =new((major_ticks_x-1)*4,double)
+      array_yl(0)=ys
+      array_xb(0)=xs
+      array_yl_labels(0)=y_d(ys)
+      array_xb_labels(0)=x_d(xs)
+      do ar=1,major_ticks_y-1
+         array_yl(ar)=d*(ar-1)+d-1
+	 array_yl_labels(ar) = y_d(array_yl(ar))
+	 if (ar .GT. 0)
+	    do min_ar=0,3
+                array_minor_yl(4*(ar-1)+min_ar)= y_d(array_yl(ar-1))+\
+                         (y_d(array_yl(ar))-y_d(array_yl(ar-1)))/5*(min_ar+1)
+	    end do 
+	 end if	 
+      end do 
+      do br=1,major_ticks_x-1
+         array_xb(br)=e*(br-1)+e-1 
+	 array_xb_labels(br) = x_d(array_xb(br)) 
+	 if (br .GT. 0)
+	    do min_br=0,3
+	       array_minor_xb(4*(br-1)+min_br)= x_d(array_xb(br-1))+\
+                         (x_d(array_xb(br))-x_d(array_xb(br-1)))/5*(min_br+1)
+	    end do 
+	 end if	
+      end do 
+   end if
+ 
+   if (xzc .EQ. 1) then
+      d=(ze-zs+1)/(major_ticks_y-1)
+      e=(xe-xs+1)/(major_ticks_x-1)
+      array_yl       =new(major_ticks_y,integer)
+      array_yl_labels=new(major_ticks_y,double)
+      array_minor_yl =new((major_ticks_y-1)*4,double)
+      array_xb       =new(major_ticks_x,integer)
+      array_xb_labels=new(major_ticks_x,double)
+      array_minor_xb =new((major_ticks_x-1)*4,double)
+      array_yl(0)=zs
+      array_xb(0)=xs
+      array_yl_labels(0)=z_d(zs)
+      array_xb_labels(0)=x_d(xs)
+      do ar=1,major_ticks_y-1
+         array_yl(ar)=d*(ar-1)+d-1
+	 array_yl_labels(ar) = z_d(array_yl(ar))
+	 if (ar .GT. 0)
+	    do min_ar=0,3
+	       array_minor_yl(4*(ar-1)+min_ar)= z_d(array_yl(ar-1))+\
+                          (z_d(array_yl(ar))-z_d(array_yl(ar-1)))/5*(min_ar+1)
+	    end do 
+	 end if	 
+      end do 
+      do br=1,major_ticks_x-1
+         array_xb(br)=e*(br-1)+e-1 
+	 array_xb_labels(br) = x_d(array_xb(br)) 
+	 if (br .GT. 0)
+	    do min_br=0,3
+	       array_minor_xb(4*(br-1)+min_br)= x_d(array_xb(br-1))+\
+                         (x_d(array_xb(br))-x_d(array_xb(br-1)))/5*(min_br+1)
+	    end do 
+	 end if	
+      end do 
+   end if
+
+   if (yzc .EQ. 1) then
+      d=(ze-zs+1)/(major_ticks_y-1)
+      e=(ye-ys+1)/(major_ticks_x-1)
+      array_yl       =new(major_ticks_y,integer)
+      array_yl_labels=new(major_ticks_y,double)
+      array_minor_yl =new((major_ticks_y-1)*4,double)
+      array_xb       =new(major_ticks_x,integer)
+      array_xb_labels=new(major_ticks_x,double)
+      array_minor_xb =new((major_ticks_x-1)*4,double)
+      array_yl(0)=zs
+      array_xb(0)=ys
+      array_yl_labels(0)=z_d(zs)
+      array_xb_labels(0)=y_d(ys)
+      do ar=1,major_ticks_y-1
+         array_yl(ar)=d*(ar-1)+d-1
+	 array_yl_labels(ar) = z_d(array_yl(ar))
+	 if (ar .GT. 0)
+	    do min_ar=0,3
+               array_minor_yl(4*(ar-1)+min_ar)= z_d(array_yl(ar-1))+\
+                         (z_d(array_yl(ar))-z_d(array_yl(ar-1)))/5*(min_ar+1)
+	    end do 
+	 end if	 
+      end do 
+      do br=1,major_ticks_x-1
+         array_xb(br)=e*(br-1)+e-1 
+	 array_xb_labels(br) = y_d(array_xb(br)) 
+	 if (br .GT. 0)
+	    do min_br=0,3
+	       array_minor_xb(4*(br-1)+min_br)= y_d(array_xb(br-1))+\
+                         (y_d(array_xb(br))-y_d(array_xb(br-1)))/5*(min_br+1)
+	    end do 
+	 end if	
+      end do
+   end if
+ 
+   if (axes_explicit .EQ. 1)then
+      cs_res@tmYLMode = "Explicit"
+      cs_res@tmXBMode = "Explicit"
+      if (xyc .EQ. 1)then 
+         cs_res@tmYLValues = y_d(array_yl) 
+         cs_res@tmXBValues = x_d(array_xb)      
+         cs_res@tmYLLabels = array_yl_labels/norm_y
+	 cs_res@tmXBLabels = array_xb_labels/norm_x
+	 if (norm_x .NE. 1.)then
+	    cs_res@tiXAxisString = "x ("+unit_x+")"
+	 else
+	    cs_res@tiXAxisString = "x (m)"
+	 end if 
+	 if (norm_y .NE. 1.)then
+            cs_res@tiYAxisString = "y ("+unit_y+")"
+	 else
+	    cs_res@tiYAxisString = "y (m)"
+	 end if   
+      end if
+      if (xzc .EQ. 1)then
+         cs_res@tmYLValues = z_d(array_yl) 
+         cs_res@tmXBValues = x_d(array_xb)  
+         cs_res@tmYLLabels = array_yl_labels/norm_z
+	 cs_res@tmXBLabels = array_xb_labels/norm_x
+	 if (norm_x .NE. 1.)then
+	    cs_res@tiXAxisString = "x ("+unit_x+")"
+	 else
+	    cs_res@tiXAxisString = "x (m)"
+	 end if 
+	 if (norm_z .NE. 1.)then
+            cs_res@tiYAxisString = "z ("+unit_z+")"
+	 else
+	    cs_res@tiYAxisString = "z (m)"
+	 end if
+      end if
+      if (yzc .EQ. 1)then
+         cs_res@tmYLValues = z_d(array_yl) 
+         cs_res@tmXBValues = y_d(array_xb)  
+         cs_res@tmYLLabels = array_yl_labels/norm_z
+	 cs_res@tmXBLabels = array_xb_labels/norm_y
+	 if (norm_y .NE. 1.)then
+	    cs_res@tiXAxisString = "y ("+unit_y+")"
+	 else
+	    cs_res@tiXAxisString = "y (m)"
+	 end if 
+	 if (norm_z .NE. 1.)then
+            cs_res@tiYAxisString = "z ("+unit_z+")"
+	 else
+	    cs_res@tiYAxisString = "z (m)"
+	 end if
+      end if
+      cs_res@tmYLMinorValues = array_minor_yl
+      cs_res@tmXBMinorValues = array_minor_xb
+   else 
+      if (axes_explicit .EQ. 0)then  
+         cs_res@tmYLMinorPerMajor = 4
+         cs_res@tmXBMinorPerMajor = 4
+      else
+         print(" ")
+	 print("'axes_explicit' is invalid and set to 0")
+	 print(" ")
+	 axes_explicit = 0
+	 cs_res@tmYLMinorPerMajor = 4
+         cs_res@tmXBMinorPerMajor = 4
+      end if
+      if (xyc .EQ. 1)then
+         cs_res@tiXAxisString = "x (m)"
+         cs_res@tiYAxisString = "y (m)"
+      end if
+      if (xzc .EQ. 1)then
+         cs_res@tiXAxisString = "x (m)"
+         cs_res@tiYAxisString = "z (m)"
+      end if
+      if (yzc .EQ. 1)then
+         cs_res@tiXAxisString = "y (m)"
+         cs_res@tiYAxisString = "z (m)"
+      end if
+   end if
+
+   if (xyc .EQ. 1 .OR. xzc .EQ.1)then
+      if (xe .EQ. xs+1) then
+         print(" ")
+         print("range end for x-coordinate="+xe*delta_x+\
+               "m must be at least two") 
+         print("more gridpoints(="+2*delta_x+"m) greater than start range="+\
+               xs*delta_x+"m)")
+         print(" ")
+         exit
+      end if 
+   end if
+   if (xyc .EQ. 1 .OR. yzc .EQ.1)then
+      if (ye .EQ. ys+1) then
+         print(" ")
+         print("range end for y-coordinate="+ye*delta_y+\
+               "m must be at least two") 
+         print("more gridpoints(="+2*delta_y+"m greater than start range="+\
+               ys*delta_y+"m)")
+         print(" ")
+         exit
+      end if 
+   end if
+   if (xzc .EQ. 1 .OR. yzc .EQ.1)then
+      if (ze .EQ. zs+1) then
+         print(" ")
+         print("range end for z-coordinate="+ze+" must be at least two") 
+         print("more gridpoints greater than start range="+zs+")")
+         print(" ")
+         exit
+      end if 
+   end if
+  
+   if (xyc .EQ. 1) then
+      no_layer = (ze-zs)+1
+      if (check_vType) then
+         data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),double)
+      else
+         data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float)
+      end if
+   end if
+   if (xzc .EQ. 1) then
+      no_layer = (ye-ys)+1
+      if (check_vType) then
+         data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),double)
+      else
+         data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float)
+      end if
+   end if
+   if (yzc .EQ. 1) then
+      no_layer = (xe-xs)+1
+      if (check_vType) then
+         data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),double)
+      else
+         data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float)
+      end if
+   end if
+
+   if (check_vType) then
+      MinVal = new(dim,double)
+      MaxVal = new(dim,double)
+   else
+      MinVal = new(dim,float)
+      MaxVal = new(dim,float)
+   end if
+   unit   = new(dim,string) 
+
+   ; ****************************************************
+   ; define inner and outer loops depending on "sort"
+   ; ****************************************************       
+    
+   if ( xyc .eq. 1 ) then
+      lays = zs
+      laye = ze
+   end if
+   if ( xzc .eq. 1 ) then
+      lays = ys
+      laye = ye
+   end if
+   if ( yzc .eq. 1) then
+      lays = xs
+      laye = xe
+   end if
+
+   if ( sort .eq. "time" ) then
+      lis = start_time_step
+      lie = end_time_step
+      los = lays
+      loe = laye
+   else
+      lis = lays
+      lie = laye
+      los = start_time_step 
+      loe = end_time_step
+   end if 
+
+   check  = True
+   v1     = 0
+   v2     = 0
+   no_var = 0
+   n      = 0
+   no_zu1 = 0
+   no_topo= 0
+
+   ;****************************************************
+   ; Preparation of vector plots
+   ; ****************************************************       
+
+   do varn=dim-1,0,1 
+
+     if (vector .EQ. 1) then    
+        check_vec1 = isStrSubset( vec1,","+vNam(varn)+",")
+        if (check_vec1) then
+            temp = f[:]->$vNam(varn)$
+	    data_att = f_att->$vNam(varn)$
+            vect1=temp(:,zs:ze,ys:ye,xs:xe) 
+            delete(temp)
+         end if
+
+         check_vec2 = isStrSubset( vec2,","+vNam(varn)+",")
+         if (check_vec2) then
+            temp = f[:]->$vNam(varn)$
+	    data_att = f_att->$vNam(varn)$
+            vect2=temp(:,zs:ze,ys:ye,xs:xe) 
+            delete(temp)
+         end if
+    
+         if (","+vNam(varn)+"," .EQ. vec1) then
+            v1=v1+1
+         end if
+         if (","+vNam(varn)+"," .EQ. vec2) then
+             v2=v2+1
+          end if
+     end if
+
+   end do
+
+
+
+   do varn=dim-1,0,1     
+           
+      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or.          \
+           vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or.          \
+           vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or.     \
+           vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or.         \
+           vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or.        \
+           vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or.   \
+           vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or.  \
+           vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. \
+           vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or.     \
+           vNam(varn) .eq. "ind_x_yz") then
+         check = False
+      else
+         check = True
+      end if  
+
+      if (var .NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," ) 
+      end if
+
+      if(check) then
+      
+         no_var=no_var+1
+
+         if (xyc .EQ. 1) then
+	    temp = f[:]->$vNam(varn)$
+            if (vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi")
+	       dummy=0
+            else
+               data_att = f_att->$vNam(varn)$
+            end if
+            if(vNam(varn) .eq. "lwps_xy" .or. vNam(varn) .eq. "pras_xy"     \
+              .or. vNam(varn) .eq. "prrs_xy" .or. vNam(varn) .eq. "qsws_xy" \
+              .or. vNam(varn) .eq. "shfs_xy" .or. vNam(varn) .eq. "ts_xy"   \
+              .or. vNam(varn) .eq. "us_xy" .or. vNam(varn) .eq. "z0s_xy"    \
+              .or. vNam(varn) .eq. "lwp*_xy" .or. vNam(varn) .eq. "pra*_xy" \
+              .or. vNam(varn) .eq. "prr*_xy" .or. vNam(varn) .eq. "qsws*_xy"\
+              .or. vNam(varn) .eq. "shf*_xy" .or. vNam(varn) .eq. "t*_xy"   \
+              .or. vNam(varn) .eq. "u*_xy" .or. vNam(varn) .eq. "z0*_xy") then
+              ;these variables depend on zu1_xy and that's why they have 
+              ;only one z-layer
+              data(varn,:,0,:,:)=temp(:,0,ys:ye,xs:xe) 
+              no_zu1=no_zu1+1
+            else
+              if (vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi")
+                  ;these variables depend on x and y
+                  data(varn,0,0,:,:)=doubletofloat(temp(ys:ye,xs:xe))
+                  no_topo=no_topo+1
+               else
+                  data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 
+               end if
+            end if
+            delete(temp)	    	
+         end if
+         if ( xzc .eq. 1 ) then
+	    temp = f[:]->$vNam(varn)$
+	    data_att = f_att->$vNam(varn)$
+            data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 
+            delete(temp)
+         end if
+         if ( yzc .eq. 1) then
+	    temp = f[:]->$vNam(varn)$
+	    data_att = f_att->$vNam(varn)$
+            data(varn,:,:,:,:)=temp(:,zs:ze,ys:ye,xs:xe) 
+            delete(temp)
+         end if
+
+         data!0 = "var"
+   	 data!1 = "t"
+   	 data!2 = "z"
+   	 data!3 = "y"
+   	 data!4 = "x"  
+
+         MinVal(varn) = min(data(varn,start_time_step:end_time_step,\
+                                               0:(ze-zs),0:(ye-ys),0:(xe-xs)))
+         MaxVal(varn) = max(data(varn,start_time_step:end_time_step,\
+                                               0:(ze-zs),0:(ye-ys),0:(xe-xs)))
+	 
+         if (vNam(varn) .eq. "zwwi" .or. vNam(varn) .eq. "zusi")
+	    unit(varn) = "meters"
+          else
+            unit(varn) = data_att@units
+            delete(data_att)
+          end if
+
+      end if
+
+   end do
+
+   if (no_var .EQ. 0) then
+      print(" ")
+      print("The variables var='"+var+"' do not exist on your input file;")
+      print("be sure to have one comma before and after each variable")
+      print(" ")
+      exit
+   end if
+
+   var_input=new(no_var,string)
+   numb=0
+   no_var=0
+   
+   do varn=dim-1,0,1   
+           
+      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or.          \
+           vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or.          \
+           vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or.     \
+           vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or.         \
+           vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or.        \
+           vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or.   \
+           vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or.  \
+           vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. \
+           vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or.     \
+           vNam(varn) .eq. "ind_x_yz") then
+         check = False
+      else
+         check = True
+      end if  
+
+      if (var .NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," ) 
+      end if
+
+      if(check) then     
+         var_input(numb)=vNam(varn) 
+	 numb=numb+1     
+      end if
+      
+      if (check) then
+         no_var = no_var+1
+      end if
+      
+   end do
+
+   if (no_var .EQ. 0) then
+      print(" ")
+      print("The variables var='"+var+"' do not exist on your input file;")
+      print("be sure to have one comma before and after each variable")
+      print(" ")
+      exit
+   end if
+
+   if (vector .EQ. 1) then
+      if (v1 .EQ. 0)then
+         print(" ")
+         print("Component 1 for the vector-plot ('vec1') must be one "+\
+               "of the variables on the input file:")
+	 print("- "+var_input)
+	 print("be sure to have one comma before and after the variable")
+         print(" ")
+         exit
+      end if
+
+      if (v2 .EQ. 0)then
+         print(" ")
+         print("Component 2 for the vector-plot ('vec2') must be one "+\
+               "of the variables on the input file:")
+	 print("- "+var_input)
+	 print("be sure to have one comma before and after the variable")
+         print(" ")
+         exit
+      end if
+   end if
+
+   ; ***************************************************
+   ; open workstation(s) 
+   ; ***************************************************
+
+   if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then
+      format_out@wkPaperSize = "A4"
+   end if
+   if ( format_out .EQ. "png" ) then
+      format_out@wkWidth  = 1000
+      format_out@wkHeight = 1000
+   end if
+
+   wks_ps  = gsn_open_wks(format_out,file_out)
+   gsn_define_colormap(wks_ps,"rainbow+white")
+
+   if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+      plot=new((/no_time*no_layer/),graphic)
+   else
+      plot=new((/no_time*no_layer*(no_var-no_topo) + no_topo - \
+                       no_time*(no_layer-1)*no_zu1/),graphic)
+   end if
+   dim_plot=dimsizes(plot)
+
+   page = 0
+   n=0
+   print(" ")
+   print("Plots sorted by '"+sort+"'")
+   print(" ")
+
+   ; ***************************************************
+   ; create plots 
+   ; ***************************************************
+
+
+   if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+      do lo = los, loe           				
+         do li = lis, lie
+	    if (xyc .EQ. 1)then
+	       if (sort .EQ. "time")then
+                  if(z_d(lo) .eq. -1.d) then
+                    level = "z-average"
+                  else
+                    level = "z=" + z_d(lo) + "m"
+                  end if
+	       else
+                  if(z_d(li) .eq. -1.d) then
+                    level = "z-average"
+                  else
+	            level = "z=" + z_d(li) + "m"
+                  end if
+	       end if
+	    end if
+	    if (xzc .EQ. 1)then
+	       if (sort .EQ. "time")then
+                 if(y_d(lo) .eq. -1.d) then
+                   level = "y-average"
+                 else
+                   level = "y=" + y_d(lo) + "m" 
+                 end if
+	       else
+                  if(y_d(li) .eq. -1.d) then
+                    level = "y-average"
+                  else
+	            level = "y=" + y_d(li) + "m"
+                  end if
+	       end if
+	    end if
+	    if (yzc .EQ. 1)then
+	       if (sort .EQ. "time")then
+                 if(x_d(lo) .eq. -1.d) then
+                    level = "x-average"
+                 else
+                    level = "x=" + x_d(lo) + "m" 
+                 end if
+	       else
+                 if(x_d(li) .eq. -1.d) then
+                    level = "x-average"
+                 else
+	            level = "x=" + x_d(li) + "m" 
+                 end if
+	       end if
+	    end if	    	  
+            vecres                  = True            ; vector only resources
+            vecres@gsnDraw          = False           ; don't draw
+  	    vecres@gsnFrame         = False           ; don't advance frame
+            vecres@vcGlyphStyle     = "CurlyVector"   ; curly vectors
+  	    vecres@vcRefMagnitudeF  = ref_mag         ; define vector ref mag
+  	    vecres@vcRefLengthF     = 0.05            ; define length of 
+                                                      ; vec ref
+  	    vecres@gsnRightString   = "Vector plot of "+vec1+" and "+vec2
+	    vecres@tmXBLabelFontHeightF   = font_size
+            vecres@tmYLLabelFontHeightF   = font_size
+            vecres@tiXAxisFontHeightF     = font_size
+            vecres@tiYAxisFontHeightF     = font_size
+	    if (sort .EQ. "time")then
+               vecres@gsnLeftString = "t=" + \
+                             decimalPlaces(t_all(li)/3600,2,True) +"h   "+level
+	    else
+	       vecres@gsnLeftString = "t=" + \
+                             decimalPlaces(t_all(lo)/3600,2,True) +"h   "+level
+	    end if
+	    if (xyc .EQ. 1) then  
+               vecres@tiXAxisString = "x (m)"
+	       vecres@tiYAxisString = "y (m)"   
+	       if (sort .EQ. "time")then
+                  plot(n) = gsn_csm_vector(wks_ps,vect1(li,lo-los,:,:),\
+                                               vect2(li,lo-los,:,:),vecres)
+	       else
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),\
+                                                vect2(lo,li-lis,:,:),vecres)
+	       end if
+	    end if
+	    if (xzc .EQ. 1) then
+               vecres@tiXAxisString = "x (m)"
+	       vecres@tiYAxisString = "z (m)" 
+	       if (sort .EQ. "time")then 
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),\
+                                               vect2(li,:,lo-los,:),vecres)
+	       else
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,li-lis,:),\
+                                                vect2(lo,:,li-lis,:),vecres)
+	       end if
+	    end if
+	    if (yzc .EQ. 1) then
+               vecres@tiXAxisString = "y (m)"
+	       vecres@tiYAxisString = "z (m)" 
+	       if (sort .EQ. "time")then 
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),\
+                                                vect2(li,:,:,lo-los),vecres)
+	       else
+	          plot(n) = gsn_csm_vector(wks_ps,vect1(lo,:,:,li-lis),\
+                                                vect2(lo,:,:,li-lis),vecres)
+	       end if
+	    end if
+            n=n+1
+         end do
+      end do
+   end if
+ 
+   do varn=dim-1,0,1 
+
+      if (vector .EQ. 1 ) then    
+         check_vecp = isStrSubset( plotvec,","+vNam(varn)+",")
+      end if 
+     
+      if ( vNam(varn) .eq. "zw" .or. vNam(varn) .eq. "yv" .or.          \
+           vNam(varn) .eq. "xu" .or. vNam(varn) .eq. "zu" .or.          \
+           vNam(varn) .eq. "time" .or. vNam(varn) .eq. "zu_3d" .or.     \
+           vNam(varn) .eq. "zw_3d" .or. vNam(varn) .eq. "x".or.         \
+           vNam(varn) .eq. "y" .or. vNam(varn) .eq. "zu_xy" .or.        \
+           vNam(varn) .eq. "zw_xy" .or. vNam(varn) .eq. "zu1_xy" .or.   \
+           vNam(varn) .eq. "ind_z_xy" .or. vNam(varn) .eq. "y_xz" .or.  \
+           vNam(varn) .eq. "yv_xz" .or. vNam(varn) .eq. "ind_y_xz" .or. \
+           vNam(varn) .eq. "x_yz" .or. vNam(varn) .eq. "xu_yz" .or.     \
+           vNam(varn) .eq. "ind_x_yz") then
+         check = False 
+      else
+         check = True
+      end if   
+  
+      if (var .NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," ) 
+      end if 
+    
+      if(check) then
+
+         space=(decimalPlaces(MaxVal(varn),3,True)-decimalPlaces(MinVal(varn),3,True))/24
+  
+         ;cs_res@cnMinLevelValF = decimalPlaces(MinVal(varn),3,True)
+         ;cs_res@cnMaxLevelValF = decimalPlaces(MaxVal(varn),3,True)
+
+         ;cs_res@cnLevelSpacingF = space
+         cs_res@cnMaxLevelCount = 26
+      
+         ; ****************************************************
+         ; loops over time and layer
+         ; **************************************************** 
+
+         
+         do lo = los, loe           				
+            do li = lis, lie
+
+               ; ****************************************************
+               ; xy cross section
+               ; ****************************************************
+
+               if ( xyc .eq. 1 ) then 
+          
+                  cs_res@gsnLeftString = "Plot of "+vNam(varn)
+		  cs_res@gsnRightString = unit(varn)
+                  
+                  if ( sort .eq. "time" ) then
+                     if ( z_d(lo) .eq. -1)then
+		        if (delta_z .EQ. -1) then
+                           level = "-average"
+			else
+			   level = "=" + z_d(lo) + "m"
+			end if
+                     else 
+                        level = "=" + z_d(lo) + "m"
+                     end if
+
+                     if(vNam(varn) .eq. "zwwi"  .or. \
+                        vNam(varn) .eq. "zusi") then
+                         loe = 0
+                         los = 0
+                         lie  = 0
+                         lis = 0
+                         level = ""
+                     end if
+
+                     if(vNam(varn) .eq. "lwps_xy"  .or. \
+                        vNam(varn) .eq. "pras_xy"  .or. \
+                        vNam(varn) .eq. "prrs_xy"  .or. \
+                        vNam(varn) .eq. "qsws_xy"  .or. \
+                        vNam(varn) .eq. "shfs_xy"  .or. \
+                        vNam(varn) .eq. "ts_xy"    .or. \
+                        vNam(varn) .eq. "us_xy"    .or. \
+                        vNam(varn) .eq. "z0s_xy"   .or. \
+                        vNam(varn) .eq. "lwp*_xy"  .or. \
+                        vNam(varn) .eq. "pra*_xy"  .or. \
+                        vNam(varn) .eq. "prr*_xy"  .or. \
+                        vNam(varn) .eq. "qsws*_xy" .or. \
+                        vNam(varn) .eq. "shf*_xy"  .or. \
+                        vNam(varn) .eq. "t*_xy"    .or. \
+                        vNam(varn) .eq. "u*_xy"    .or. \
+                        vNam(varn) .eq. "z0*_xy") then
+                         loe = 0
+                         level = "=" + zu1(0) + "m"
+                      else
+                         lis = start_time_step
+                         lie = end_time_step
+                         los = lays
+                         loe = laye
+                     end if                 
+
+                     if(vNam(varn) .eq. "zwwi"  .or. \
+                        vNam(varn) .eq. "zusi") then
+                         cs_res@gsnCenterString = ""
+                     else
+                         cs_res@gsnCenterString = "t=" + \
+                          decimalPlaces(t_all(li)/3600,2,True) +"h  z"+level
+                     end if
+
+                     if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+                        ;nothing to be done
+                     else
+                         plot(n) = gsn_csm_contour(wks_ps,\
+                                           data(varn,li,lo-los,:,:),cs_res) 
+                     end if
+
+
+                     if (vector .EQ. 1 .AND. check_vecp) then
+                        vecres                 = True           ; vector only
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  	                vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  	                vecres@vcGlyphStyle    = "CurlyVector"  ; curly 
+                                                                ; vectors
+  		        vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  		        vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref  
+                        vecres@gsnRightString  = " "
+                        vecres@gsnLeftString   = " " 
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,\
+                              vect1(li,lo-los,:,:),vect2(li,lo-los,:,:),vecres)
+                        overlay(plot(n), plot_vec)
+                     end if                         
+                  end if
+                 
+                  if ( sort .eq. "layer" ) then
+		     if (z_d(li) .eq. -1) then
+		        if (delta_z .EQ. -1) then
+                           level = "-average"
+			else
+			   level = "=" + z_d(li) + "m"
+			end if
+                     else 
+                        level = "=" + z_d(li) + "m"
+                     end if 
+
+                     if(vNam(varn) .eq. "zwwi"  .or. \
+                        vNam(varn) .eq. "zusi") then
+                         lie = 0
+                         lis = 0
+                         loe = 0
+                         los = 0
+                         level = ""
+                      end if
+
+                     if(vNam(varn) .eq. "lwps_xy"  .or. \
+                        vNam(varn) .eq. "pras_xy"  .or. \
+                        vNam(varn) .eq. "prrs_xy"  .or. \
+                        vNam(varn) .eq. "qsws_xy"  .or. \
+                        vNam(varn) .eq. "shfs_xy"  .or. \
+                        vNam(varn) .eq. "ts_xy"    .or. \
+                        vNam(varn) .eq. "us_xy"    .or. \
+                        vNam(varn) .eq. "z0s_xy"   .or. \
+                        vNam(varn) .eq. "lwp*_xy"  .or. \
+                        vNam(varn) .eq. "pra*_xy"  .or. \
+                        vNam(varn) .eq. "prr*_xy"  .or. \
+                        vNam(varn) .eq. "qsws*_xy" .or. \
+                        vNam(varn) .eq. "shf*_xy"  .or. \
+                        vNam(varn) .eq. "t*_xy"    .or. \
+                        vNam(varn) .eq. "u*_xy"    .or. \
+                        vNam(varn) .eq. "z0*_xy") then
+                         lie = 0
+                         level = "=" + zu1(0) + "m"
+                     else
+                         lis = lays
+                         lie = laye
+                         los = start_time_step 
+                         loe = end_time_step
+                     end if
+
+                     if(vNam(varn) .eq. "zwwi"  .or. \
+                        vNam(varn) .eq. "zusi") then
+                         cs_res@gsnCenterString = ""
+                     else
+                         cs_res@gsnCenterString = "t=" + \
+                          decimalPlaces(t_all(lo)/3600,2,True) +"h  z"+level
+                     end if
+
+                     ;if (topo .EQ. 0) then
+                        ;nothing to be done
+                     ;else
+                     ;   print("'topo' is set to " + topo)
+
+                        ;plot(n) = gsn_csm_contour(wks_ps,\
+                                            ;data(varn,lo,li-lis,:,:),cs_res)
+                        ;if(vNam(varn) .EQ. "zwwi" .OR. \
+                         ;  vNam(varn) .EQ. "zusi") then
+                          ; to_res@cnFillPalette = "GMT_gray"
+                           ;plot_topo = gsn_csm_contour(wks_ps,\
+                            ;  data(varn,lo,li-lis,:,:),to_res)
+                         ;end if
+                        ;overlay(plot(n), plot_topo) 
+                     ;end if
+
+                     if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+                        ;nothing to be done
+                     else
+                        plot(n) = gsn_csm_contour(wks_ps,\
+                                            data(varn,lo,li-lis,:,:),cs_res)
+                     end if
+
+                     if (vector .EQ. 1 .AND. check_vecp) then
+                        vecres                 = True           ; vector only
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,li-lis,:,:),\
+                                                   vect2(lo,li-lis,:,:),vecres)
+                        overlay(plot(n), plot_vec)
+                     end if
+                  end if
+               end if
+
+               ; ****************************************************
+               ; xz cross section
+               ; ****************************************************
+
+               if ( xzc .eq. 1 ) then
+                  
+		  cs_res@gsnLeftString = "Plot of "+vNam(varn)
+               
+                  if ( sort .eq. "time" ) then
+                     if ( y_d(lo) .eq. -1 ) then
+                        level = "-average"
+                     else 
+                        level = "=" + y_d(lo) + "m"
+                     end if
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(li)/3600,2,True) + "h  y"+ level
+
+                     if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+                        ;nothing to be done
+                     else
+                         plot(n) = gsn_csm_contour(wks_ps,\
+                                              data(varn,li,:,lo-los,:),cs_res)
+                     end if
+
+                     if (vector .EQ. 1 .AND. check_vecp) then
+                        vecres                 = True           ; vector only 
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,lo-los,:),\
+                                                   vect2(li,:,lo-los,:),vecres)
+                        overlay(plot(n), plot_vec)
+                     end if
+                  end if
+
+                  if ( sort .eq. "layer" ) then
+                     if ( y_d(li) .eq. -1 ) then
+                        level = "-average"
+                     else 
+                        level = "=" + y_d(li) + "m"
+                     end if
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(lo)/3600,2,True) + "h  y"+ level
+
+                     if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+                        ;nothing to be done
+                     else
+                         plot(n) = gsn_csm_contour(wks_ps,\
+                                              data(varn,lo,:,li-lis,:),cs_res)  
+                     end if
+
+                     if (vector .EQ. 1 .AND. check_vecp) then
+                        vecres                 = True           ; vector only 
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,li-lis,:),\
+                                                   vect2(lo,:,li-lis,:),vecres)
+                        overlay(plot(n), plot_vec)
+                     end if
+                  end if                  
+               end if
+
+               ; ****************************************************
+               ; yz cross section
+               ; ****************************************************
+
+               if ( yzc .eq. 1 ) then
+                                  
+		  cs_res@gsnLeftString = "Plot of "+vNam(varn)
+
+                  if ( sort .eq. "time" ) then
+                     if ( x_d(lo) .eq. -1 ) then
+                        level = "-average"
+                     else 
+                        level = "=" + x_d(lo) + "m"
+                     end if
+                     cs_res@gsnCenterString = "t=" + \
+                          decimalPlaces(t_all(li)/3600,2,True) + "h  x"+ level
+
+                     if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+                        ;nothing to be done
+                     else
+                        plot(n) = gsn_csm_contour(wks_ps,\
+                                          data(varn,li,:,:,lo-los),cs_res)
+                     end if
+
+    	             if (vector .EQ. 1 .AND. check_vecp) then
+                        vecres                 = True           ; vector only 
+                                                                ; resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(li,:,:,lo-los),\
+                                                   vect2(li,:,:,lo-los),vecres)
+                        overlay(plot(n), plot_vec)
+                     end if
+                  end if
+
+                  if ( sort .eq. "layer" ) then
+                     if ( x_d(li) .eq. -1 ) then
+                        level = "-average"
+                     else 
+                        level = "=" + x_d(li) + "m"
+                     end if
+                     cs_res@gsnCenterString = "t=" + \
+                           decimalPlaces(t_all(lo)/3600,2,True) + "h  x"+ level
+
+                     if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then
+                        ;nothing to be done
+                     else
+                        plot(n) = gsn_csm_contour(wks_ps,\
+                                          data(varn,lo,:,:,li-lis),cs_res)
+                     end if
+
+                     if (vector .EQ. 1 .AND. check_vecp)then
+                        vecres                 = True           ; vector only 
+                                                                ;resources
+  			vecres@gsnDraw         = False          ; don't draw
+  			vecres@gsnFrame        = False          ; don't 
+                                                                ; advance frame
+  			vecres@vcGlyphStyle    = "CurlyVector"  ; curly vectors
+  			vecres@vcRefMagnitudeF = ref_mag        ; define 
+                                                                ; vector ref 
+                                                                ; mag
+  			vecres@vcRefLengthF    = 0.05           ; define 
+                                                                ; length of 
+                                                                ; vec ref
+  			vecres@gsnRightString  = " "            ; turn off 
+                                                                ; right string
+  			vecres@gsnLeftString   = " "            ; turn off 
+                                                                ; left string
+  			vecres@tiXAxisString   = " "   
+                        plot_vec=gsn_csm_vector(wks_ps,vect1(lo,:,:,li-lis),\
+                                                   vect2(lo,:,:,li-lis),vecres)
+                        overlay(plot(n), plot_vec)
+                     end if 
+                  end if
+               end if	      
+               n=n+1  
+            end do 	
+         end do  
+      end if
+   end do
+
+   ; ***************************************************
+   ; merge plots onto one page 
+   ; ***************************************************   
+
+   no_frames = 0
+
+   if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then 
+      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+           no_time*no_layer*(no_var+1) .gt. no_rows*no_columns) then
+         gsn_panel(wks_ps,plot(0:(no_time*no_layer*(no_var+1))-1),\
+                                       (/no_var+1,no_layer*no_time/),cs_resP)
+         print(" ")
+         print("Outputs to .eps or .epsi have only one frame")
+         print(" ")
+      else
+         do np = 0,dim_plot-1,no_rows*no_columns   
+            if ( np + no_rows*no_columns .gt. dim_plot-1) then 
+               gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),\
+                                                                      cs_resP)
+               no_frames = no_frames + 1
+            else
+               gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),\
+                                              (/no_rows,no_columns/),cs_resP)
+               no_frames = no_frames + 1
+            end if
+         end do
+      end if
+   else       
+      if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") \
+                               .AND. dim_plot .gt. no_rows*no_columns) then 
+         gsn_panel(wks_ps,plot(0:dim_plot-1),(/dim_plot,1/),cs_resP)
+         print(" ")
+         print("Outputs to .eps or .epsi have only one frame")
+         print(" ")
+      else
+         do np = 0,dim_plot-1,no_rows*no_columns  
+            if ( np + no_rows*no_columns .gt. dim_plot-1) then
+               gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),\
+                                                                     cs_resP)
+               no_frames = no_frames + 1
+            else
+               gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),\
+                                              (/no_rows,no_columns/),cs_resP)
+               no_frames = no_frames + 1
+            end if
+         end do
+      end if
+   end if
+
+   if (format_out .EQ. "png" ) then
+     png_output = new((/no_frames/), string)
+     j = 0
+
+     if (no_frames .eq. 1) then
+        if (ncl_version .GE. 6 ) then
+           png_output(0) = file_out+".png"
+        else
+           png_output(0) = file_out+".00000"+1+".png"
+        end if
+        ;using imagemagick's convert for reducing the white 
+        ;space around the plot
+        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+              png_output(0) + " " + png_output(0)
+       system(cmd)
+     else
+
+       do i=0, no_frames-1
+         j = i + 1
+         if (j .LE. 9) then
+           png_output(i) = file_out+".00000"+j+".png"
+         end if
+         if (j .GT. 9 .AND. j .LE. 99) then
+           png_output(i) = file_out+".0000"+j+".png"
+         end if
+         if (j .GT. 99 .AND. j .LE. 999) then
+           png_output(i) = file_out+".000"+j+".png"
+         end if
+         if (j .GT. 999) then
+           png_output(i) = file_out+".00"+j+".png"
+         end if
+
+         ;using imagemagick's convert for reducing the white 
+         ;space around the plot
+         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+                png_output(i) + " " + png_output(i)
+         system(cmd)
+       end do
+     end if
+
+     print(" ")
+     print("Output to: "+ png_output)
+     print(" ")
+   else
+     print(" ")
+     print("Output to: " + file_out +"."+ format_out)
+     print(" ")
+   end if
+
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/profiles.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/profiles.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/profiles.ncl	(revision 3477)
@@ -0,0 +1,4787 @@
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+
+;***************************************************
+; Checking the kind of the script
+;***************************************************
+
+function which_script()
+local script 
+begin 
+   script = "profiles"
+   return(script)
+end
+
+;***************************************************
+; Retrieving the NCL version used
+;***************************************************
+   
+ncl_version_ch = systemfunc("ncl -V") 
+ncl_version    = stringtofloat(ncl_version_ch)
+
+;***************************************************
+; Function for checking file existence in dependence
+; on NCL version
+;***************************************************
+
+function file_exists(version:string,file_name:string)
+begin
+   if( version .GE. "6.2.1" ) then
+      existing = fileexists(file_name)
+   else
+      existing = isfilepresent(file_name)
+   end if
+   return(existing)
+end
+  
+;***************************************************
+; load .ncl.config or .ncl.config.default
+;***************************************************
+
+existing_file = file_exists(ncl_version_ch,file_config)
+if (existing_file) then
+   loadscript(file_config)
+else
+   palm_bin_path = getenv("PALM_BIN")
+   print(" ")
+   print("Neither the personal configuration file '.ncl.config' exists in")
+   print("~/palm/current_version")
+   print("nor the default configuration file '.ncl.config.default' "+\
+         "exists in")
+   print(palm_bin_path + "/NCL")
+   print(" ")
+   exit
+end if
+
+    
+begin
+
+   ;***************************************************
+   ; Retrieving the double quote character
+   ;***************************************************
+   
+   dq=str_get_dq()
+
+   ;***************************************************
+   ; set up default parameter values and strings 
+   ;***************************************************
+
+   if (no_files .LT. 1 .OR. no_files .GT. 6) then
+      print(" ")
+      print("Assign 'no_files' between 1 and 6")  
+      print(" ")
+      exit
+   end if
+   
+   file_in   = new(no_files,string)
+   file_in_1 = new(no_files,logical)
+   start_f_t = new(no_files,integer)
+   end_f_t   = new(no_files,integer)
+   
+   if (file_1 .EQ. "File in") then
+      print(" ")
+      print("Declare 1st input file 'file_1=' in '.ncl.config' or prompt")
+      print(" ")
+      exit 
+   else
+      file_in(0) = file_1   
+   end if      
+   file_in_1(0) = False
+   if (isStrSubset(file_in(0), ".nc"))then
+      start_f = -2
+      end_f = -2 
+      file_in_1(0) = True     
+   end if  
+   if (start_f .EQ. -1)then
+      print(" ")
+      print("'start_f' must be one of the cyclic numbers (at least 0) "+\
+            "of your input file(s)")
+      print(" ")  
+      exit
+   end if 
+   if (end_f .EQ. -1)then
+      print(" ")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
+      print(" ")  
+      exit
+   end if            
+   start_f_t(0) = start_f 
+   end_f_t(0) = end_f   
+ 
+   if (no_files .GT. 1) then
+      if (file_2 .EQ. "File in") then
+         print(" ")
+         print("Declare 2nd input file 'file_2=' in '.ncl.config' or prompt")
+         print(" ")
+         exit 
+      else
+         file_in(1) = file_2   
+      end if      
+      file_in_1(1) = False
+      if (isStrSubset(file_in(1), ".nc"))then
+         start_f_2 = -2
+         end_f_2 = -2 
+         file_in_1(1) = True     
+      end if
+      if (start_f_2 .EQ. -1)then
+         print(" ")
+         print("'start_f_2' must be one of the cyclic numbers (at least 0) "+\
+              "of your input file(s)")
+         print(" ")  
+         exit
+      end if 
+      if (end_f_2 .EQ. -1)then
+         print(" ")
+         print("'end_f_2' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if      
+      start_f_t(1) = start_f_2 
+      end_f_t(1) = end_f_2   
+   end if    
+    
+   if (no_files .GT. 2) then
+      if (file_3 .EQ. "File in") then
+         print(" ")
+         print("Declare 3rd input file 'file_3=' in '.ncl.config' or prompt")
+         print(" ")
+         exit 
+      else
+         file_in(2) = file_3   
+      end if      
+      file_in_1(2) = False
+      if (isStrSubset(file_in(2), ".nc"))then
+         start_f_3 = -2
+         end_f_3 = -2 
+         file_in_1(2) = True     
+      end if
+      if (start_f_3 .EQ. -1)then
+         print(" ")
+         print("'start_f_3' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if 
+      if (end_f_3 .EQ. -1)then
+         print(" ")
+         print("'end_f_3' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if      
+      start_f_t(2) = start_f_3 
+      end_f_t(2) = end_f_3  
+   end if 
+   
+   if (no_files .GT. 3) then
+      if (file_4 .EQ. "File in") then
+         print(" ")
+         print("Declare 4th input file 'file_4=' in '.ncl.config' or prompt")
+         print(" ")
+         exit 
+      else
+         file_in(3) = file_4   
+      end if      
+      file_in_1(3) = False
+      if (isStrSubset(file_in(3), ".nc"))then
+         start_f_4 = -2
+         end_f_4 = -2 
+         file_in_1(3) = True     
+      end if
+      if (start_f_4 .EQ. -1)then
+         print(" ")
+         print("'start_f_4' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if 
+      if (end_f_4 .EQ. -1)then
+         print(" ")
+         print("'end_f_4' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if      
+      start_f_t(3) = start_f_4 
+      end_f_t(3) = end_f_4 
+   end if 
+   
+   if (no_files .GT. 4) then
+      if (file_5 .EQ. "File in") then
+         print(" ")
+         print("Declare 5th input file 'file_5=' in '.ncl.config' or prompt")
+         print(" ")
+         exit 
+      else
+         file_in(4) = file_5   
+      end if      
+      file_in_1(4) = False
+      if (isStrSubset(file_in(4), ".nc"))then
+         start_f_5 = -2
+         end_f_5 = -2 
+         file_in_1(4) = True     
+      end if
+      if (start_f_5 .EQ. -1)then
+         print(" ")
+         print("'start_f_5' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if 
+      if (end_f_5 .EQ. -1)then
+         print(" ")
+         print("'end_f_5' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if      
+      start_f_t(4) = start_f_5 
+      end_f_t(4) = end_f_5    
+   end if 
+   
+   if (no_files .GT. 5) then
+      if (file_6 .EQ. "File in") then
+         print(" ")
+         print("Declare 6th input file 'file_6=' in '.ncl.config' or prompt")
+         print(" ")
+         exit 
+      else
+         file_in(5) = file_6   
+      end if      
+      file_in_1(5) = False
+      if (isStrSubset(file_in(5), ".nc"))then
+         start_f_6 = -2
+         end_f_6 = -2 
+         file_in_1(5) = True     
+      end if
+      if (start_f_6 .EQ. -1)then
+         print(" ")
+         print("'start_f_6' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if 
+      if (end_f_6 .EQ. -1)then
+         print(" ")
+         print("'end_f_6' must be one of the cyclic numbers (at least 0) "+\
+               "of your input file(s)")
+         print(" ")  
+         exit
+      end if      
+      start_f_t(5) = start_f_6 
+      end_f_t(5) = end_f_6    
+   end if 
+
+   
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.  \
+      format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+      format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+      format_out .NE. "png")then
+      print(" ")
+      print("'format_out = "+format_out+"' is invalid and set to'x11'")
+      print(" ")
+      format_out="x11"
+   end if  
+
+   if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then
+      print(" ")
+      print("Output of png files not available")
+      print("png output is avaiable with NCL version 5.2.0 and higher ")
+      print("NCL version used: " + ncl_version_ch)
+      print(" ")
+      exit
+   end if
+
+   if (over .NE. 0 .AND. over .NE. 1) then
+      print(" ")
+      print("'over'= "+over+" is invalid and set to 0")
+      print(" ")
+      over = 0
+   end if
+   if (no_files .GT. 1) then
+      over = 0
+      print(" ")
+      print("If you have more than one input file - you cannot overlay "+\
+            "variables: over is set to 0")
+      print(" ")
+   end if
+   if (no_files .GT. 1 .AND. var .EQ. ",cross_profiles,") then
+      var = "all"
+      print(" ")
+      print("If you have more than one input file - you cannot combine "+\
+            "profiles with cross_profiles ")
+      print(" ")
+   end if
+
+   ;************************************************************************
+   ; check if cross_profiles is defined in file_1
+   ;************************************************************************
+
+    if (isStrSubset(file_in(0), ".nc")) then
+      firstfile=addfile(file_1,"r")
+    else
+      firstfile=addfile(file_in(0) + "." + start_f + ".nc","r")
+    end if
+
+   cross_check=isatt(firstfile,"cross_profiles")
+
+   if (var .EQ. "all") then
+      VAR_LIST = firstfile@VAR_LIST
+      no_plots = str_fields_count(VAR_LIST, ";")
+   else
+      no_plots = str_fields_count(var, ",")
+   end if
+
+   if ((.not. cross_check) .AND. (var .EQ. ",cross_profiles,")) then
+       print(" ")
+       print("cross_profiles is not defined in the NetCDF header."+\
+             "Using var='all' instead.")
+       print(" ") 
+       var="all"
+   end if
+
+   wks_gsn_log = True
+
+   ;************************************************************************
+   ; check if cross_profiles can be used
+   ;************************************************************************
+   
+   VAR_LIST = firstfile@VAR_LIST
+   if ( var .EQ. ",cross_profiles," .AND. str_fields_count(VAR_LIST,"_") \
+        .GT. str_fields_count(VAR_LIST,";") ) then
+       var = "all"
+       print(" ")
+       print("It is not possible to use var='cross_profiles' for"+\
+             " statistic regions. Using var='all' instead.")
+       print(" ")
+   end if
+
+   if ( var .EQ. ",cross_profiles," .AND. cross_check .AND. (over .EQ. 0) \
+       .AND. (no_files .LT. 2)) then 
+      c_var_log = 1
+   else
+      c_var_log = 0
+   end if
+
+   if ((no_rows .EQ. -1) .AND. isatt(firstfile,"no_rows")) then
+      no_rows = firstfile@no_rows
+   else if ((no_rows .EQ. -1) .AND. .not. isatt(firstfile,"no_rows")) then
+       print(" ")
+       print("no_rows is not defined in the NetCDF header."+\
+             "Using no_rows=3 instead.")
+       print(" ")
+      no_rows = 3
+   end if
+   end if
+
+   if ((no_columns .EQ. -1) .AND. isatt(firstfile,"no_columns")) then
+      no_columns = firstfile@no_columns
+   else if ((no_columns .EQ. -1) .AND. .not. isatt(firstfile,"no_columns")) then
+       print(" ")
+       print("no_columns is not defined in the NetCDF header."+\
+             "Using no_columns=2 instead.")
+       print(" ")
+      no_columns = 2
+   end if
+   end if
+
+   if (c_var_log .EQ. 1) then 
+      c_var_str = firstfile@cross_profiles
+
+      c_var_all = str_split(c_var_str,";")
+
+      c_var_all = ","+c_var_all+","
+
+      ;************************************************************************
+      ; check if an additional combined plot is demanded by the user
+      ;************************************************************************
+
+      if ((c_var .EQ. "c_variables") .AND. (number_comb .EQ. -1) .AND. \
+             (combine .EQ. 0)) then
+         max_com_i = max(dimsizes(c_var_all)) - 1
+      else
+         max_com_i = max(dimsizes(c_var_all))
+         c_var_all_temp = c_var_all
+         delete(c_var_all)
+         c_var_all = new(max_com_i+1,string)
+         c_var_all(0:max_com_i-1) = c_var_all_temp
+         delete(c_var_all_temp)
+         c_var_all(max_com_i) = c_var
+      end if
+      number_comb_all = str_fields_count(c_var_all,",")
+
+      ;************************************************************************
+      ; currently, more than 3 plots cannot be drawn together. the profiles 
+      ; are split to a maximum of 3 plots per panel.
+      ;***********************************************************************
+
+      do com_i = 0, max_com_i
+         if(number_comb_all(com_i) .GT. 3) then
+            print(" ")
+            print("Currently, it is not possible to plot more than three "+\
+                  "profiles together ("+c_var_all(com_i)+"). Hence, they "+\
+                  "are split to a maximum of three profiles per "+\
+                  "coordinate plane.")
+            print(" ") 
+	    c_var_all_temp = c_var_all
+            number_comb_all_temp = number_comb_all
+	    delete(c_var_all)
+            delete(number_comb_all)
+            max_com_i = max_com_i + 1 
+	    c_var_all = new(max_com_i+1,string)
+            number_comb_all = new(max_com_i+1, integer)
+            if (com_i-1 .GE. 0) then
+	      c_var_all(0:com_i-1) = c_var_all_temp(0:com_i-1)
+	      number_comb_all(0:com_i-1) = number_comb_all_temp(0:com_i-1)
+            end if
+	    c_var_long = str_split(c_var_all_temp(com_i),",")
+            c_var_all(com_i) = "," + c_var_long(0) + "," + c_var_long(1) + "," + c_var_long(2) + ","
+            number_comb_all(com_i) = 3
+            c_var_all(com_i + 1) = ","
+            do com_j = 3, max(dimsizes(c_var_long)) - 1 
+               c_var_all(com_i + 1) = c_var_all(com_i + 1) + c_var_long(com_j) + ","
+            end do
+            number_comb_all(com_i+1) = max(dimsizes(c_var_long)) - 3 
+            if (com_i+2 .le. max_com_i) then
+	       c_var_all(com_i+2:max_com_i) = c_var_all_temp(com_i+1:max_com_i-1)
+               number_comb_all(com_i+2:max_com_i) = number_comb_all_temp(com_i+1:max_com_i-1)
+            end if
+	    delete(c_var_all_temp)
+            delete(number_comb_all_temp)
+            delete(c_var_long)
+	 end if
+      end do
+
+      c_var_plot = new(max_com_i+1,graphic)
+      c_var_end_time_step = end_time_step
+      c_var_start_time_step = start_time_step
+      number_comb_1_log = 0
+      number_comb_23_log = 0
+   else
+      max_com_i = 0
+   end if
+
+   do com_i = 0,max_com_i
+
+      ;************************************************************************
+      ; changes basic properties of the plots according to cross_profiles
+      ;************************************************************************
+
+      if (c_var_log .EQ. 1) then
+         if (number_comb_all(com_i) .EQ. 1) then
+            number_combine= -1
+	    combine = 0
+	    c_var = "c_variables"
+	    var = c_var_all(com_i)
+	    delete(end_time_step)
+	    delete(start_time_step)
+	    end_time_step = c_var_end_time_step
+            start_time_step= c_var_start_time_step
+	    if (number_comb_1_log .EQ. 1) then
+		delete(var_char)
+	    end if
+	    number_comb_1_log=1
+	 else
+	    var = "all"
+	    number_comb = number_comb_all(com_i)
+	    combine = 1
+	    c_var = c_var_all(com_i)
+	    delete(end_time_step)
+	    delete(start_time_step)
+	    end_time_step = c_var_end_time_step
+            start_time_step= c_var_start_time_step
+            if ((number_comb_1_log .EQ. 1) .OR. (number_comb_23_log .EQ. 1)) then
+		delete(label)
+	    end if
+	    if (number_comb_23_log .EQ. 1) then
+		delete(plot_o)
+;		delete(label)
+		delete(color_o)
+		delete(mini)
+		delete(maxi)
+		delete(plot)
+	    end if
+	    number_comb_23_log=1
+	 end if
+      end if
+
+      if (combine .NE. 0 .AND. combine .NE. 1)then
+	  print(" ")
+	  print("Your 'combine'= "+combine+" is invalid and set to 0")
+	  print(" ")
+	  combine = 0
+      end if
+      if (no_files .GT. 1) then
+	  combine = 0
+	  print(" ")
+	  print("If you have more than one input file you cannot combine "+\
+		"variables: combine is set to 0")
+	  print(" ")
+      end if   
+      if (combine .EQ. 1 .AND. number_comb .EQ. -1) then
+	  print(" ") 
+	  print("Set 'number_comb' to 2 or 3 or combine to 0")
+	  print(" ")
+	  exit
+      end if 
+      if (combine .EQ. 1)then
+	  if (number_comb .EQ. -1) then
+	    print(" ") 
+	    print("Set 'number_comb' to 2 or 3 or combine to 0")
+	    print(" ")
+	    exit
+	  end if
+	  if (number_comb .NE. 2 .AND. number_comb .NE. 3) then
+	    print(" ") 
+	    print("Set 'number_comb' to 2 or 3 or combine to 0")
+	    print(" ")
+	    exit
+	  end if
+      end if  
+      if (combine .EQ. 1 .AND. c_var .EQ. "c_variables") then
+	  print(" ") 
+	  print("Select variables for overlaying ('c_var') or set combine to 0")
+	  print(" ")
+	  exit
+      end if
+
+      if (log_z .NE. 0 .AND. log_z .NE. 1)then
+	  print(" ")
+	  print("'log_z'= "+log_z+" is invalid and set to 0")
+	  print(" ")
+	  log_z = 0
+      end if    
+      
+      if (norm_z .EQ. 0) then 
+	  print(" ")
+	  print("Normalising with 0 is not allowed, 'norm_z' is set to 1.0")
+	  print(" ")
+	  norm_z = 1.0
+      end if
+
+      ;***************************************************
+      ; open input file
+      ;***************************************************
+
+      do nof=0,no_files-1
+
+      if (com_i .EQ. 0)
+      files=new(end_f_t(nof)-start_f_t(nof)+1,string)
+      if (file_in_1(nof))then
+	  if (isfilepresent(file_in(nof)))then
+	    files(0)=file_in(nof)
+	  else
+	    print(" ")
+	    print("1st input file: '"+file_in(nof)+"' does not exist")
+	    print(" ")
+	    exit
+	  end if
+      else
+	  if (start_f_t(nof) .EQ. 0)then
+	    if (isfilepresent(file_in(nof)+".nc"))then
+		files(0)=file_in(nof)+".nc"
+		do i=1,end_f_t(nof)
+		  if (isfilepresent(file_in(nof)+"."+i+".nc"))then    
+		      files(i)=file_in(nof)+"."+i+".nc"
+		  else
+		      print(" ")
+		      print("Input file: '"+file_in(nof)+"."+i+".nc' does not "+\
+			    "exist")
+		      print(" ")
+		      exit  
+		  end if	    
+		end do         
+	    else
+		print(" ")
+		print("Input file: '"+file_in(nof)+".nc' does not exist")
+		print(" ")
+		exit
+	    end if
+	  else
+	    do i=start_f_t(nof),end_f_t(nof)
+		if (isfilepresent(file_in(nof)+"."+i+".nc"))then    
+		  files(i-start_f_t(nof))=file_in(nof)+"."+i+".nc"
+		else
+		  print(" ")
+		  print("Input file: '"+file_in(nof)+"."+i+".nc' does not exist")
+		  print(" ")
+		  exit  
+		end if
+	    end do
+	  end if
+      end if
+
+      f=addfiles(files,"r")
+      f_att=addfile(files(0),"r")
+      ListSetType(f,"cat")
+      
+      vNam  = getfilevarnames(f_att)
+      if( ncl_version .GE. 6.1 ) then
+         vNam = vNam(::-1)
+      end if
+      vType = getfilevartypes(f_att,vNam) 
+
+      if ((all(vType .eq. "double"))) then ;distinction if data is double or float
+	  check_vType = True
+      else
+	  check_vType = False
+      end if
+      
+      if (nof .EQ. 0)then
+	  vNam0=vNam
+      end if
+      if (nof .NE. 0)then
+	  if (dim0 .NE. dim)then
+	    print(" ")
+	    print("There are 'no_files'="+no_files+" input files but they do "+\
+		  "not contain the same variables")
+	    print(" ")
+	    exit
+	  else
+	    do i=0,dim0-1
+		if (vNam0(i) .NE. vNam(i))then
+		  print(" ")
+		  print("There are 'no_files'="+no_files+" input files but "+\
+			"they do not contain the same variables")
+		  print(" ")
+		  exit
+		end if
+	    end do
+	  end if
+      end if
+      nof=nof+1
+      if (com_i .EQ. 0) then
+	  print(" ")
+	  print("Variables in input file "+nof+":")
+	  print("- "+ vNam)
+	  print(" ")
+      end if
+      nof=nof-1
+      dim = dimsizes(vNam)
+      dim0=dim
+      
+      if (dim .EQ. 0) then
+	  print(" ")
+	  print("There is no data on file")
+	  print(" ")
+      end if
+      
+      prof3d = 0
+      do varn = dim-1,0,1
+	  if ( isStrSubset( vNam(varn), "zu_3d") .OR. \
+	      isStrSubset( vNam(varn), "zw_3d")) then
+	    prof3d = 1
+	    break
+	  end if
+      end do
+      
+      end if
+
+      if (var .NE. "all" ) then
+	  ;rearrange the order of the variables in vNam so that the variables 
+	  ;specified by "var" are in the top of vNam
+
+	  vNam_static = new((/dim/),string)
+	  vNam_temp   = new((/dim/),string)
+
+	  var_char    = stringtocharacter(var)
+	  no_char     = dimsizes(var_char)
+	  comma       = 0
+	  
+	  do j=0,no_char-1
+	    if(var_char(j) .eq. ",")
+		comma = comma + 1
+	    end if
+	  end do
+
+	  if(comma .le. 1)
+	      print(" ")
+	      print("The variables 'var="+var+"'" )
+	      print("do not exist on your input file;")
+	      print("be sure to have one comma before and after each variable")
+	      print(" ")
+	      exit
+	  end if
+
+	  if(comma .gt. dim)
+	      print(" ")
+	      print("The variables 'var="+var+"'" )
+	      print("do not exist on your input file;")
+	      print("be sure to have one comma before and after each variable")
+	      print(" ")
+	      exit
+	  end if
+
+	  indices = new((/comma/),integer)
+	  comma   = 0
+	    
+	  do j=0,no_char-1
+	    if(var_char(j) .eq. ",")
+	      indices(comma) = j
+	      comma          = comma + 1
+	    end if
+	  end do
+
+	  do j=0,comma-2
+	    vNam_temp(j) = charactertostring(\
+				      var_char(indices(j)+1:indices(j+1)-1))
+	  end do
+
+	  do j=0,comma-2
+	    count_check = 0
+	    do varn=0,dim-1 
+	      if(vNam_temp(j) .ne. vNam(varn)) 
+		count_check=count_check+1
+	      end if
+	    end do    
+
+	    if(count_check .eq. dim)
+		print(" ")
+		print("The variables 'var="+var+"'" )
+		print("do not exist on your input file;")
+		print("be sure to have one comma before and after each variable")
+		print(" ")
+		exit
+	    end if
+
+	    vNam_static(j) = vNam_temp(comma - 2 - j)
+	  end do
+
+	  vNam_temp   = vNam_static
+	  vNam_static = ""
+
+	  if (prof3d .EQ. 0) then
+	    i = 0
+	    do j=0,dim-1,2
+		vNam_static(j)   = vNam_temp(i)
+		vNam_static(j+1) = "z" + vNam_static(j)
+		i = i+1
+		if(i .eq. comma-1)
+		    break
+		end if
+	    end do
+
+	    delete(vNam_temp)
+	    count_variable = 2*(comma-1) 
+	  else
+	    i = 0
+	      do j=0,dim-1,1
+		vNam_static(j) = vNam_temp(i)
+		i = i+1
+		if(i .eq. comma-1)
+		    break
+		end if
+	      end do
+
+	      delete(vNam_temp)
+	      count_variable = comma-1 
+	  end if
+
+	  counter  = 0
+	  counter2 = 0
+
+	  do j=0,dim-1
+	    counter = 0
+	    do i = 0, count_variable - 1        
+		if(vNam_static(i) .ne. vNam(j))
+		  counter = counter + 1
+		end if
+	    end do
+	  
+	    if (counter .eq. count_variable)
+		vNam_static(count_variable + counter2) = vNam(j)
+		counter2 = counter2 + 1
+	    end if
+	  end do
+	
+	  vNam = vNam_static 
+	  delete(vNam_static)
+	end if
+
+      ;---------below steps only for first file -> nof=0
+      if (nof .EQ. 0) then
+
+	  plot = new(dim,graphic)
+	  plot_ = new(dim,graphic)
+	  if (no_files .GT. 1) then
+	    multi_plot = new((/no_files,dim/),graphic)
+	    if (check_vType) then
+	      max_nof = new((/no_files,dim/),double)
+	      min_nof = new((/no_files,dim/),double)
+	    else
+	      max_nof = new((/no_files,dim/),float)
+	      min_nof = new((/no_files,dim/),float)
+	    end if
+	    name    = new((/no_files,dim/),string)
+	    unit_   = new((/no_files,dim/),string)
+	  end if
+
+      if (prof3d .EQ. 0) then
+    
+      do varn=0,dim-1
+	  if ( isStrSubset( vNam(varn), "time") .OR. \
+	      isStrSubset( vNam(varn), "NORM")) then
+	    continue
+	  end if
+	  if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_"))then
+	    z_u = f_att->$vNam(varn+1)$
+	    break
+	  else
+	    if (vNam(varn) .EQ. "v" .OR. isStrSubset(vNam(varn), "v_"))then  
+		z_u = f_att->$vNam(varn+1)$
+		break
+	    else
+		if(vNam(varn) .EQ. "pt" .OR. isStrSubset(vNam(varn), "pt_"))then
+		  z_u = f_att->$vNam(varn+1)$
+		  break
+		else
+		  if(vNam(varn) .EQ. "vpt" .OR. isStrSubset(vNam(varn), "vpt_"))then
+		      z_u = f_att->$vNam(varn+1)$
+		      break
+		  else
+		      if(vNam(varn) .EQ. "lpt" .OR. isStrSubset(vNam(varn), "lpt_"))then
+			z_u = f_att->$vNam(varn+1)$ 
+			break
+		      else   
+			if(vNam(varn) .EQ. "q" .OR. isStrSubset(vNam(varn), "q_") )then
+			    z_u = f_att->$vNam(varn+1)$ 
+			    break
+			else
+			    if(vNam(varn) .EQ. "qv" .OR. isStrSubset(vNam(varn), "qv_"))then
+			      z_u = f_att->$vNam(varn+1)$ 
+			      break
+			    else
+			      if(vNam(varn) .EQ. "ql" .OR. isStrSubset(vNam(varn), "ql_"))then
+				  z_u = f_att->$vNam(varn+1)$ 
+				  break
+			      else
+				  if(vNam(varn) .EQ. "rho" .OR. isStrSubset(vNam(varn), "rho_"))then
+				    z_u = f_att->$vNam(varn+1)$ 
+				    break
+				  else
+				    if(vNam(varn) .EQ. "s" .OR. isStrSubset(vNam(varn), "s_") )then
+					z_u = f_att->$vNam(varn+1)$ 
+					break
+				    else
+					if(vNam(varn) .EQ. "sa" .OR. isStrSubset(vNam(varn), "sa_"))then
+					  z_u = f_att->$vNam(varn+1)$ 
+					  break
+					else
+					  if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then
+					    
+					      z_u = f_att->$vNam(varn+1)$ 
+					      break
+					  else
+					      if(vNam(varn) .EQ. "es" .OR. \
+					      isStrSubset(vNam(varn), "es_") .OR. vNam(varn) .EQ. "e*" .OR. isStrSubset(vNam(varn), "e*_"))then
+						z_u = f_att->$vNam(varn+1)$ 
+						break
+					      else
+						if(vNam(varn) .EQ. "km" .OR. isStrSubset(vNam(varn), "km_"))then
+						    z_u = f_att->$vNam(varn+1)$ 
+						    break
+						else
+						    if(vNam(varn) .EQ. "kh" .OR. isStrSubset(vNam(varn), "kh_"))then
+						      z_u = f_att->$vNam(varn+1)$ 
+						      break
+						    else
+						      if(vNam(varn) .EQ. "l" .OR. isStrSubset(vNam(varn), "l_"))then
+							  z_u = f_att->$vNam(varn+1)$ 
+							  break
+						      else
+							  if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_")\
+							    .OR. vNam(varn) .EQ. "u*2" .OR. isStrSubset(vNam(varn), "u*2_"))then
+							    z_u = f_att->$vNam(varn+1)$ 
+							    break
+							  else
+							    if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_")\
+								.OR. vNam(varn) .EQ. "v*2" .OR. isStrSubset(vNam(varn), "v*2_"))then
+								z_u = f_att->$vNam(varn+1)$ 
+								break
+							    else
+								if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_")\
+								  .OR. vNam(varn) .EQ. "pt*2" .OR. isStrSubset(vNam(varn), "pt*2_"))then
+								  z_u = f_att->$vNam(varn+1)$ 
+								  break
+								else
+								  if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_")\
+								      .OR. vNam(varn) .EQ. "w*u*u*:dz" .OR. isStrSubset(vNam(varn), "w*u*u*:dz_"))then
+								      z_u = f_att->$vNam(varn+1)$ 
+								      break
+								  else
+								      if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_")\
+									.OR. vNam(varn) .EQ. "w*p*:dz" .OR. isStrSubset(vNam(varn), "w*p*:dz_"))then
+									z_u = f_att->$vNam(varn+1)$ 
+									break
+								      else
+									if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_")\
+									    .OR. vNam(varn) .EQ. "w"+dq+"e:dz" .OR. isStrSubset(vNam(varn), "w"+dq+"e:dz_"))then
+									    z_u = f_att->$vNam(varn+1)$
+									    break   
+									else
+									    if(vNam(varn) .EQ. "qs2" .OR. isStrSubset(vNam(varn), "qs2_")\
+									      .OR. vNam(varn) .EQ. "q*2" .OR. isStrSubset(vNam(varn), "q*2_"))then
+									      z_u = f_att->$vNam(varn+1)$
+									      break  
+									  end if               
+									end if
+								      end if
+								  end if
+								end if
+							    end if
+							  end if
+						      end if
+						    end if
+						end if
+					      end if
+					  end if
+					end if
+				    end if
+				  end if
+			      end if
+			    end if
+			end if
+		      end if
+		  end if
+		end if 
+	    end if
+	  end if
+      end do
+
+      do varn=0,dim-1
+	  if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then
+	    continue
+	  end if 
+	  if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_"))then
+	    z_w = f_att->$vNam(varn+1)$
+	    break
+	  else
+	    if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_")\
+		.OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"u"+dq+"_"))then
+		z_w = f_att->$vNam(varn+1)$
+		break
+	    else
+		if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_")\
+		  .OR. vNam(varn) .EQ. "w*u*" .OR. isStrSubset(vNam(varn), "w*u*_"))then
+		  z_w = f_att->$vNam(varn+1)$
+		  break
+		else
+		  if(vNam(varn) .EQ. "wu" .OR. isStrSubset(vNam(varn), "wu_"))then
+		      z_w = f_att->$vNam(varn+1)$ 
+		      break
+		  else
+		      if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_")\
+			.OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"v"+dq+"_"))then
+			z_w = f_att->$vNam(varn+1)$ 
+			break
+		      else   
+			if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_")\
+			    .OR. vNam(varn) .EQ. "w*v*" .OR. isStrSubset(vNam(varn), "w*v*_"))then
+			    z_w = f_att->$vNam(varn+1)$ 
+			    break
+			else
+			    if(vNam(varn) .EQ. "wv" .OR. isStrSubset(vNam(varn), "wv_"))then
+			      z_w = f_att->$vNam(varn+1)$ 
+			      break
+			    else
+			      if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_")\
+				  .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"pt"+dq+"_"))then
+				  z_w = f_att->$vNam(varn+1)$ 
+				  break
+			      else
+				  if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_")\
+				    .OR. vNam(varn) .EQ. "w*pt*" .OR. isStrSubset(vNam(varn), "w*pt*_"))then
+				    z_w = f_att->$vNam(varn+1)$ 
+				    break
+				  else
+				    if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpt_"))then
+					z_w = f_att->$vNam(varn+1)$
+					break
+				    else
+					if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_")\
+					  .OR. vNam(varn) .EQ. "w*pt*BC" .OR. isStrSubset(vNam(varn), "w*pt*BC_"))then
+					  z_w = f_att->$vNam(varn+1)$ 
+					  break
+					else
+					  if(vNam(varn) .EQ. "wptBC" .OR. isStrSubset(vNam(varn), "wptBC_"))then
+					      z_w = f_att->$vNam(varn+1)$ 
+					      break
+					  else
+					      if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_")\
+						  .OR. vNam(varn) .EQ. "w"+dq+"vpt"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"vpt"+dq+"_"))then
+						z_w = f_att->$vNam(varn+1)$ 
+						break
+					      else
+						if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_")\
+						  .OR. vNam(varn) .EQ. "w*vpt*" .OR. isStrSubset(vNam(varn), "w*vpt*_"))then
+						    z_w = f_att->$vNam(varn+1)$
+						    break
+						else
+						    if(vNam(varn) .EQ. "wvpt" .OR. isStrSubset(vNam(varn), "wvpt_"))then
+						      z_w = f_att->$vNam(varn+1)$ 
+						      break
+						    else
+						      if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_")\
+							  .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"q"+dq+"_"))then
+							  z_w = f_att->$vNam(varn+1)$ 
+							  break
+						      else
+							  if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_")\
+							    .OR. vNam(varn) .EQ. "w*q*" .OR. isStrSubset(vNam(varn), "w*q*_"))then
+							    z_w = f_att->$vNam(varn+1)$ 
+							    break
+							  else
+							    if(vNam(varn) .EQ. "wq" .OR. isStrSubset(vNam(varn), "wq_"))then
+								z_w = f_att->$vNam(varn+1)$ 
+								break
+							    else
+								if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_")\
+								  .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"qv"+dq+"_"))then
+								  z_w = f_att->$vNam(varn+1)$ 
+								  break
+								else
+								  if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_")\
+								      .OR. vNam(varn) .EQ. "w*qv*" .OR. isStrSubset(vNam(varn), "w*qv*_"))then
+								      z_w = f_att->$vNam(varn+1)$ 
+								      break
+								  else
+								      if(vNam(varn) .EQ. "wqv" .OR. isStrSubset(vNam(varn), "wqv_"))then
+									z_w = f_att->$vNam(varn+1)$ 
+									break
+								      else
+									if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_")\
+									    .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"s"+dq+"_"))then
+									    z_w = f_att->$vNam(varn+1)$
+									    break 
+									else
+									    if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_")\
+										.OR. vNam(varn) .EQ. "w*s*" .OR. isStrSubset(vNam(varn), "w*s*_"))then
+									      z_w = f_att->$vNam(varn+1)$
+									      break 
+									    else
+									      if(vNam(varn) .EQ. "ws" .OR. isStrSubset(vNam(varn), "ws_"))then
+										  z_w = f_att->$vNam(varn+1)$
+										  break 
+									      else
+										  if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_")\
+										      .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR. isStrSubset(vNam(varn), "w"+dq+"sa"+dq+"_"))then
+										    z_w = f_att->$vNam(varn+1)$
+										    break 
+										  else
+										    if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_")\
+											.OR. vNam(varn) .EQ. "w*sa*" .OR. isStrSubset(vNam(varn), "w*sa*_"))then
+											z_w = f_att->$vNam(varn+1)$
+											break 
+										    else
+											if(vNam(varn) .EQ. "wsa" .OR. isStrSubset(vNam(varn), "wsa_"))then
+											  z_w = f_att->$vNam(varn+1)$
+											  break 
+											else
+											  if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_")\
+											      .OR. vNam(varn) .EQ. "w*e*" .OR. isStrSubset(vNam(varn), "w*e*_"))then
+											      z_w = f_att->$vNam(varn+1)$
+											      break 
+											  else
+											      if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_")\
+												.OR. vNam(varn) .EQ. "w*2" .OR. isStrSubset(vNam(varn), "w*2_"))then
+												z_w = f_att->$vNam(varn+1)$
+												break 
+											      else
+												if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_")\
+												    .OR. vNam(varn) .EQ. "w*3" .OR. isStrSubset(vNam(varn), "w*3_"))then
+												    z_w = f_att->$vNam(varn+1)$
+												    break 
+												else
+												    if(vNam(varn) .EQ. "Sw" .OR. isStrSubset(vNam(varn), "Sw_"))then
+												      z_w = f_att->$vNam(varn+1)$
+												      break 
+												    else
+												      if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_")\
+													  .OR. vNam(varn) .EQ. "w*2pt*" .OR. isStrSubset(vNam(varn), "w*2pt*_"))then
+													  z_w = f_att->$vNam(varn+1)$
+													  break 
+												      else
+													  if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_")\
+													    .OR. vNam(varn) .EQ. "w*pt*2" .OR. isStrSubset(vNam(varn), "w*pt*2_"))then
+													    z_w = f_att->$vNam(varn+1)$
+													    break                                            
+													  end if
+												      end if 
+												    end if
+												end if
+											      end if
+											  end if
+											end if
+										    end if
+										  end if
+									      end if
+									    end if    
+									end if
+								      end if
+								  end if
+								end if
+							    end if
+							  end if
+						      end if
+						    end if
+						end if
+					      end if
+					  end if
+					end if
+				    end if
+				  end if
+			      end if
+			    end if
+			end if
+		      end if
+		  end if
+		end if 
+	    end if
+	  end if
+      end do
+      
+      if (.not. isvar("z_u") .AND. .not. isvar ("z_w")) then
+	  co=0
+	  do varn=0,dim-1      
+	    if ( isStrSubset( vNam(varn), "time") .OR. \
+		  isStrSubset( vNam(varn), "NORM")) then
+		check = False
+	    else
+		check = True
+		if (var .NE. "all") then
+		  check = isStrSubset( var,","+vNam(varn)+"," )
+		end if          
+	    end if
+	    if (check)then
+		co=co+1
+		z = f_att->$vNam(varn+1)$
+		if (getvardims(z) .EQ. "zu")then
+		  z_u = z
+		else
+		  if (getvardims(z) .EQ. "zw")then
+		      z_w = z
+		  end if
+		end if
+		dimz = dimsizes(z)
+		break
+	    end if   
+	  end do
+	  if (co .EQ. 0) then
+	    print(" ")
+	    print("The variables 'var="+var+"'" )
+	    print("do not exist on your input file;")
+	    print("be sure to have one comma before and after each variable")
+	    print(" ")
+	    exit           
+	  end if
+      end if
+
+      if (isvar("z_u") ) then 
+	  dimz  = dimsizes(z_u)
+      else
+	  if (isvar("z_w"))then 
+	    dimz  = dimsizes(z_w)
+	  end if
+      end if
+
+      else
+
+	  do varn = dim-1,0,1
+	    if (vNam(varn) .EQ. "zu_3d")then
+		z_u = f_att->zu_3d  
+		dimz  = dimsizes(z_u)         
+	    else 
+		if (vNam(varn) .EQ. "zw_3d")then
+		  z_w = f_att->zw_3d
+		  dimz  = dimsizes(z_w)
+		end if
+	    end if
+	    if (vNam(varn) .EQ. "x")then
+		x = f_att->x
+		dimx=dimsizes(x)
+	    else
+		if (vNam(varn) .EQ. "xu")then
+		  x = f_att->xu
+		  dimx=dimsizes(x)
+		end if
+	    end if
+	    if (vNam(varn) .EQ. "y")then
+		y = f_att->y
+		dimy=dimsizes(y)
+	    else
+		if (vNam(varn) .EQ. "yv")then
+		  y = f_att->yv
+		  dimy=dimsizes(y)
+		end if
+	    end if
+	  end do
+
+      end if
+;
+;--   Since no other z-variables have been found, a z-variable has been derived 
+;--   from the user profiles 
+      if (.not. isvar("z_u") .AND. .not. isvar ("z_w")) then
+         do varn=0,dim-2  
+            if( isStrSubset( vNam(varn+1), vNam(varn)) ) then
+               z_u = f_att->$vNam(varn+1)$
+               break
+            end if
+         end do
+      end if
+
+      if(.not. isvar("z_u") .AND. .not. isvar("z_w"))then
+	  print(" ")
+	  print("Program aborts - there are no z-variables available")
+	  print("Be sure if 'plot_3d' is set correctly")
+	  print(" ")
+	  exit
+      end if
+      
+
+      t_all = f[:]->time
+      nt    = dimsizes(t_all)
+
+      
+      if (nt .EQ. 1)then
+	  delta_t=t_all(nt-1)/nt
+      else
+	  delta_t=(t_all(nt-1)-t_all(0))/(nt-1)
+      end if
+
+      ; ****************************************************	
+      ; start of time step and different types of mistakes that could be done
+      ; ****************************************************
+      
+      if (start_time_step .EQ. -1.) then   
+	  delete(start_time_step)	
+	  start_time_step=t_all(0)/3600    
+      else 
+	  if (start_time_step .GT. t_all(nt-1)/3600)then
+	    print(" ")
+	    print("'start_time_step' = "+ start_time_step +"h is greater "+\
+		  "than last time step = " \
+		  + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+	    print(" ")
+	    print("Select another 'start_time_step'")
+	    print(" ")
+	    exit
+	  end if
+	  if (start_time_step .LT. t_all(0)/3600)then
+	    print(" ")
+	    print("'start_time_step' = "+ start_time_step +"h is lower "+\
+		  "than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h")
+	    print(" ")
+	    exit
+	  end if
+      end if
+
+      do i=0,nt-1    
+	  if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\
+	      start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+	    st=i
+	    break
+	  else
+	    st=0
+	  end if
+      end do
+      
+      ; ****************************************************
+      ; end of time step and different types of mistakes that could be done
+      ; ****************************************************
+
+      if (end_time_step .EQ. -1.) then     	
+	  delete(end_time_step)
+	  end_time_step = t_all(nt-1)/3600  
+      else
+	  if (end_time_step .GT. t_all(nt-1)/3600)then
+	    print(" ")
+	    print("'end_time_step' = "+ end_time_step +"h is greater "+\
+		  "than last time step = " +\
+		    t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+	    print(" ")
+	    print("Select another 'end_time_step'")  
+	    print(" ")
+	    exit
+	  end if
+	  if (end_time_step .LT. start_time_step/3600)then
+	    print(" ")
+	    print("'end_time_step' = "+ end_time_step +"h is lower "+\
+		  "than 'start_time_step' = "+start_time_step+"h")
+	    print(" ")
+	    print("Select another 'start_time_step' or 'end_time_step'")
+	    print(" ")
+	    exit
+	  end if
+      end if
+
+      do i=0,nt-1     
+	  if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND.\
+	      end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+	    et=i
+	    break
+	  else
+	    et=0
+	  end if
+      end do 
+      
+      delete(start_time_step)
+      start_time_step=round(st,3)
+      delete(end_time_step)
+      end_time_step=round(et,3)
+
+      no_time = end_time_step-start_time_step+1
+      
+      ; ****************************************************
+      ; time_stride and different types of mistakes that could be done
+      ; ****************************************************
+    
+      if (time_stride .LT. 1) then
+	  print(" ")
+	  print("'time_stride' has to be positive and is set to 1")
+	  print(" ")
+	  time_stride = 1
+      end if
+
+      if (time_stride .GT. no_time) then
+	  print(" ")
+	  print("'time_stride' is greater than number of available "+\
+	      "time steps,")
+	  print("=> 'time_stride' is set to 1")
+	  time_stride = 1
+      end if
+
+      ti_in = ispan(start_time_step,end_time_step,time_stride) ;ti_in contents 
+								;the time indices 
+								;to plot
+      np    = dimsizes(ti_in)  
+
+      if (com_i .EQ. max_com_i) then
+	  print(" ")
+	  print("Output of time steps from "+t_all(start_time_step)/3600+\
+	    " h = "+t_all(start_time_step)+" s => index = "+start_time_step)
+	  print("                     till "+t_all(ti_in(np-1))/3600+" h = "\
+	    +t_all(ti_in(np-1))+" s => index = "+end_time_step)
+	  print("                     with temporal stride = "+time_stride)
+	  print(" ")
+      end if
+
+      if (com_i .EQ. 0) then
+
+      ; ***************************************************
+      ; set up minimum and maximum height
+      ; *************************************************** 
+
+      if (log_z .EQ. 1)then
+	  if (min_z .EQ. -1)then
+	    if (isvar("z_u"))then
+		min_z=z_u(1)
+	    else
+		min_z=z_w(1)
+	    end if       
+	  else
+	    if (isvar("z_w"))then
+		if (min_z .GE. max(z_w) ) then
+		  print(" ")
+		  print("Minimum of height ('min_z'="+min_z+") is greater "+\
+			"than available heights (="+max(z_w)+")")
+		  print(" ")
+		  exit
+		end if	    
+	    else
+		if (min_z .GE. max(z_u) ) then
+		  print(" ")
+		  print("Minimum of height ('min_z'="+min_z+") is greater "+\
+			"than available heights (="+max(z_u)+")")
+		  print(" ")
+		  exit
+		end if 
+	    end if
+	    if (isvar("z_u"))then   
+		if (min_z .LT. z_u(1) ) then
+		  print(" ")
+		  print("Begin height 'min_z' at least at level k=1 (="+\
+			z_u(1)+"m) due to the logarithmic scale of the y-axis")
+		  print(" ")
+		  exit
+		end if
+	    else
+		if (min_z .LT. z_w(1) ) then
+		  print(" ")
+		  print("Begin height 'min_z' at least at level k=1 (="+\
+			z_w(1)+"m) due to the logarithmic scale of the y-axis")
+		  print(" ")
+		  exit
+		end if   
+	    end if
+	  end if
+      else
+	  if (isvar("z_u"))then
+	    if (min_z .EQ. -1)then
+		min_z=z_u(0)
+	    end if 
+	  else
+	    if (min_z .EQ. -1)then
+		min_z=z_w(0)
+	    end if    
+	  end if
+      
+	  if (isvar("z_w"))then
+	    if (min_z .GE. max(z_w) ) then
+		print(" ")
+		print("Minimum of height ('min_z'="+min_z+") is greater than "+\
+		      "available heights (="+max(z_w)+")")
+		print(" ")
+		exit
+	    end if
+	  else
+	    if (min_z .EQ. -1)then
+		min_z=z_u(0)
+	    end if
+	    if (min_z .GE. max(z_u) ) then
+		print(" ")
+		print("Minimum of height ('min_z'="+min_z+") is greater than "+\
+		      "available heights (="+max(z_u)+")")
+		print(" ")
+		exit
+	    end if 
+	  end if
+      end if
+      
+      if (isvar("z_w"))then
+	  if (max_z .EQ. -1)then
+	    max_z=max(z_w)
+	  end if 
+      else
+	  if (max_z .EQ. -1)then
+	    max_z=max(z_u)
+	  end if    
+      end if
+      
+      if (isvar("z_w"))then
+	  if (max_z .GT. max(z_w) ) then
+	    print(" ")
+	    print("Maximum of height ('max_z'="+max_z+") is greater than "+\
+		  "available heights (="+max(z_w)+")")
+	    print(" ")
+	    exit
+	  end if
+      end if
+
+      min_z=min_z/norm_z
+      max_z=max_z/norm_z
+
+      end if
+
+      ; ****************************************************
+      ; set up legend and colors 
+      ; ****************************************************
+      
+      legend_label=new(np,string)
+      do p=0, np-1
+	  legend_label(p)=sprintf("%6.2f", t_all(ti_in(p))/3600)
+      end do
+
+      ; ***************************************************
+      ; set up recourses
+      ; ***************************************************
+
+      res                         = True
+      res@gsnDraw                 = False
+      res@gsnFrame                = False
+      res@txFont                  = "helvetica"
+      res@tiMainFont              = "helvetica"
+      res@tiXAxisFont             = "helvetica"
+      res@tiYAxisFont             = "helvetica"
+      res@tmXBLabelFont           = "helvetica"
+      res@tmYLLabelFont           = "helvetica"
+      res@lgLabelFont             = "helvetica"
+      res@tmLabelAutoStride       = True
+
+
+      if (legend .EQ. 1)then
+	  res@pmLegendDisplayMode  = "Always"
+      end if
+
+      res@pmLegendSide            = "Left";"Right"
+      res@xyExplicitLegendLabels  = legend_label
+      res@pmLegendWidthF          = 0.12
+      res@pmLegendHeightF         = 0.05*np
+      res@pmLegendParallelPosF    = 1.0
+
+      if (max_z .GE. 1000.) then
+         res@pmLegendOrthogonalPosF  = -1.227
+      else if ((max_z .LT. 1000.) .AND. (max_z .GE. 100.)) then
+         res@pmLegendOrthogonalPosF  = -1.202
+      else if ((max_z .LT. 100.) .AND. (max_z .GE. 10.)) then
+         res@pmLegendOrthogonalPosF  = -1.177
+      else if ((max_z .LT. 10.) .AND. (max_z .GE. 1.)) then
+         res@pmLegendOrthogonalPosF  = -1.190
+      else if ((max_z .LT. 1.)) then
+         res@pmLegendOrthogonalPosF  = -1.215
+      end if
+      end if
+      end if
+      end if
+      end if
+      res@lgLabelFontHeightF      = font_size_legend
+      res@lgTitleString           = "Time (h)"
+      res@lgTitleFontHeightF      = font_size
+      res@txFontHeightF           = font_size
+      res@tiXAxisFontHeightF      = font_size
+      res@tiYAxisFontHeightF      = font_size
+      res@tmXBLabelFontHeightF    = font_size
+      res@tmYLLabelFontHeightF    = font_size
+      res@tiXAxisString           = " " 
+      res@lgJustification         = "TopLeft"
+
+      if ( black .eq. 0 ) then  
+	  res@xyLineColors = -(ispan(-237,-2,235/np))
+      end if
+      if (norm_z .EQ. 1)then
+	  res@tiYAxisString = "Height (m)"
+      else   
+	  res@tiYAxisString = "Height / "+norm_z+" (m)"
+      end if
+	
+      if (log_z .EQ. 1) then
+	  res@trYLog = True 
+      end if
+
+      if (dash .EQ. 0 ) then
+	  res@xyMonoDashPattern = True 
+      else
+	  res@xyMonoDashPattern = False
+	  if (no_files .GT. 1)
+	    res@xyMonoDashPattern = True  
+	    print(" ") 
+	    print("If you use more than one file, patterns for different "+\
+		  "timesteps cannot be used")
+	    print(" ") 
+	  end if       
+      end if 
+
+      res@tmXBMinorPerMajor = 4
+      res@tmYLMinorPerMajor = 4
+
+      resP                            = True
+      resP@gsnMaximize                = True
+      if ( no_files .EQ. 1 )  then
+         resP@gsnPanelXWhiteSpacePercent = 6.0
+         resP@gsnPanelYWhiteSpacePercent = 6.0
+      else
+         resP@gsnPanelXWhiteSpacePercent = 6.0
+         resP@gsnPanelYWhiteSpacePercent = 0.0
+      end if
+      resP@txFont                     = "helvetica"
+      resP@txString                   = f_att@title
+      resP@txFuncCode                 = "~"
+      resP@txFontHeightF              = 0.0105
+
+      ; ***************************************************
+      ; set up graphics for plot
+      ; ***************************************************
+
+      if (combine .EQ. 1) then
+	  plot_o = new(number_comb,graphic)  
+          label=new(number_comb,string)
+	  color_o=new(number_comb,integer)
+
+	  if (check_vType) then
+	    mini=new(number_comb,double)
+	    maxi=new(number_comb,double)
+	  else
+	    mini=new(number_comb,float)
+	    maxi=new(number_comb,float)
+	  end if
+      end if
+    
+      if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then
+	  format_out@wkPaperSize = "A4"
+      end if
+      if ( format_out .EQ. "png" ) then
+	  format_out@wkWidth  = 1000
+	  format_out@wkHeight = 1000
+      end if
+
+      if (wks_gsn_log) then
+	  wks=gsn_open_wks(format_out,file_out)
+	  gsn_define_colormap(wks,"rainbow+white") 
+	  wks_gsn_log = False
+      end if
+
+      ; ***************************************************
+      ; read data and create plots
+      ; ***************************************************
+	  
+      do ti =0,np-1
+	  if( t_all(ti_in(ti)) .lt. 10^36) then
+	    start_time_step = ti
+	    break
+	  end if
+      end do  
+      
+      if (log_z .EQ. 1) then      
+	  if (check_vType) then
+	    data   = new((/dim,np,dimz-1/),double) 
+	    data_0 = new((/np,dimz-1/),double)
+	  else
+	    data   = new((/dim,np,dimz-1/),float) 
+	    data_0 = new((/np,dimz-1/),float)
+	  end if
+	  data@_FillValue=9.96921e+36
+	  data_0 = 0.1
+	  t      = new((/np,dimz-1/),float) 
+	  t      = 0.0
+	  unit   = new(dim,string)
+	  if (isvar("z_u"))then
+	    if (typeof(z_u) .EQ. "double")then
+		z_v    = new((/dim,dimz/),double)
+		z_     = new((/dim,dimz-1/),double)
+	    else
+		if (typeof(z_u) .EQ. "float")then 
+		  z_v    = new((/dim,dimz/),float)
+		  z_     = new((/dim,dimz-1/),float)
+		end if
+	    end if
+	  else
+	    if (isvar("z_w"))then
+		if (typeof(z_w) .EQ. "double")then
+		  z_v    = new((/dim,dimz/),double)
+		  z_     = new((/dim,dimz-1/),double)
+		else
+		  if (typeof(z_w) .EQ. "float")then 
+		      z_v    = new((/dim,dimz/),float)
+		      z_     = new((/dim,dimz-1/),float)
+		  end if
+		end if
+	    end if
+	  end if
+      else
+	  if (check_vType) then
+	    data   = new((/dim,np,dimz/),double) 
+	    data_0 = new((/np,dimz/),double)
+	  else
+	    data   = new((/dim,np,dimz/),float) 
+	    data_0 = new((/np,dimz/),float)
+	  end if
+	  data@_FillValue=9.96921e+36      
+	  data_0 = 0.0
+	  t      = new((/np,dimz/),float) 
+	  t      = 0.0
+	  unit   = new(dim,string)
+	  if (isvar("z_u"))then
+	    if (typeof(z_u) .EQ. "double")then
+		z_v    = new((/dim,dimz/),double)
+		z_     = new((/dim,dimz/),double)
+	    else
+		if (typeof(z_u) .EQ. "float")then 
+		  z_v    = new((/dim,dimz/),float)
+		  z_     = new((/dim,dimz/),float)
+		end if
+	    end if
+	  else
+	    if (isvar("z_w"))then
+		if (typeof(z_w) .EQ. "double")then
+		  z_v    = new((/dim,dimz/),double)
+		  z_     = new((/dim,dimz/),double)
+		else
+		  if (typeof(z_w) .EQ. "float")then 
+		      z_v    = new((/dim,dimz/),float)
+		      z_     = new((/dim,dimz/),float)
+		  end if
+		end if
+	    end if
+	  end if
+      end if
+
+      end if
+      ;-------above steps only for first file
+
+      ; ***************************************************
+      ; indicate plot number 
+      ; ***************************************************
+      
+      if (combine .EQ. 1) then
+	  n = 1
+      else
+	  n = 0
+      end if
+
+      if (over .EQ. 1) then 
+	  plot_u         = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_v         = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_w         = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_pt        = gsn_csm_xy(wks,t,data_0(:,:),res)      
+	  plot_vpt       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_lpt       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_q         = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_qv        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_ql        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_rho       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_s         = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_sa        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_e         = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_es        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_km        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_kh        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_l         = gsn_csm_xy(wks,t,data_0(:,:),res)     
+	  plot_wpup      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsus      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wu        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpvp      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsvs      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wv        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpptp     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wspts     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpt       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsptsBC   = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wptBC     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpvptp    = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsvpts    = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wvpt      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpqp      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsqs      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wq        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpqvp     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsqvs     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wqv       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpsp      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsss      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_ws        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpsap     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wssas     = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsa       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wses      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_us2       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_vs2       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_ws2       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_pts2      = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_ws3       = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_Sw        = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_ws2pts    = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wspts2    = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wsususodz = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wspsodz   = gsn_csm_xy(wks,t,data_0(:,:),res)
+	  plot_wpeodz    = gsn_csm_xy(wks,t,data_0(:,:),res)
+      
+	  if (check_vType) then
+	    miniu         =  100000.d
+	    maxiu         = -100000.d
+	    miniv         =  100000.d
+	    maxiv         = -100000.d
+	    miniw         =  100000.d
+	    maxiw         = -100000.d
+	    minipt        =  100000.d
+	    maxipt        = -100000.d
+	    minivpt       =  100000.d
+	    maxivpt       = -100000.d
+	    minilpt       =  100000.d
+	    maxilpt       = -100000.d
+	    miniq         =  100000.d
+	    maxiq         = -100000.d
+	    miniqv        =  100000.d
+	    maxiqv        = -100000.d
+	    miniql        =  100000.d
+	    maxiql        = -100000.d
+	    minie         =  100000.d
+	    maxie         = -100000.d
+	    minies        =  100000.d
+	    maxies        = -100000.d
+	    minikm        =  100000.d
+	    maxikm        = -100000.d
+	    minikh        =  100000.d
+	    maxikh        = -100000.d
+	    miniwpup      =  100000.d
+	    maxiwpup      = -100000.d
+	    miniwsus      =  100000.d
+	    maxiwsus      = -100000.d
+	    miniwu        =  100000.d
+	    maxiwu        = -100000.d
+	    miniwpvp      =  100000.d
+	    maxiwpvp      = -100000.d
+	    miniwsvs      =  100000.d
+	    maxiwsvs      = -100000.d
+	    miniwv        =  100000.d
+	    maxiwv        = -100000.d
+	    miniwpptp     =  100000.d
+	    maxiwpptp     = -100000.d
+	    miniwspts     =  100000.d
+	    maxiwspts     = -100000.d
+	    miniwpt       =  100000.d
+	    maxiwpt       = -100000.d
+	    miniwsptsBC   =  100000.d
+	    maxiwsptsBC   = -100000.d
+	    miniwptBC     =  100000.d
+	    maxiwptBC     = -100000.d
+	    miniwpvptp    =  100000.d
+	    maxiwpvptp    = -100000.d
+	    miniwsvpts    =  100000.d
+	    maxiwsvpts    = -100000.d
+	    miniwvpt      =  100000.d
+	    maxiwvpt      = -100000.d
+	    miniwpqp      =  100000.d
+	    maxiwpqp      = -100000.d
+	    miniwsqs      =  100000.d
+	    maxiwsqs      = -100000.d
+	    miniwq        =  100000.d
+	    maxiwq        = -100000.d
+	    miniwpqvp     =  100000.d
+	    maxiwpqvp     = -100000.d
+	    miniwsqvs     =  100000.d
+	    maxiwsqvs     = -100000.d
+	    miniwqv       =  100000.d
+	    maxiwqv       = -100000.d
+	    miniwpsp      =  100000.d
+	    maxiwpsp      = -100000.d
+	    miniwsss      =  100000.d
+	    maxiwsss      = -100000.d
+	    miniws        =  100000.d
+	    maxiws        = -100000.d
+	    miniwpsap     =  100000.d
+	    maxiwpsap     = -100000.d
+	    miniwssas     =  100000.d
+	    maxiwssas     = -100000.d
+	    miniwsa       =  100000.d
+	    maxiwsa       = -100000.d
+	    minius2       =  100000.d
+	    maxius2       = -100000.d
+	    minivs2       =  100000.d
+	    maxivs2       = -100000.d
+	    miniws2       =  100000.d
+	    maxiws2       = -100000.d
+	    miniwsususodz =  100000.d
+	    maxiwsususodz = -100000.d
+	    miniwspsodz   =  100000.d
+	    maxiwspsodz   = -100000.d
+	    miniwpeodz    =  100000.d
+	    maxiwpeodz    = -100000.d
+	  else
+	    miniu         =  100000.
+	    maxiu         = -100000.
+	    miniv         =  100000.
+	    maxiv         = -100000.
+	    miniw         =  100000.
+	    maxiw         = -100000.
+	    minipt        =  100000.
+	    maxipt        = -100000.
+	    minivpt       =  100000.
+	    maxivpt       = -100000.
+	    minilpt       =  100000.
+	    maxilpt       = -100000.
+	    miniq         =  100000.
+	    maxiq         = -100000.
+	    miniqv        =  100000.
+	    maxiqv        = -100000.
+	    miniql        =  100000.
+	    maxiql        = -100000.
+	    minie         =  100000.
+	    maxie         = -100000.
+	    minies        =  100000.
+	    maxies        = -100000.
+	    minikm        =  100000.
+	    maxikm        = -100000.
+	    minikh        =  100000.
+	    maxikh        = -100000.
+	    miniwpup      =  100000.
+	    maxiwpup      = -100000.
+	    miniwsus      =  100000.
+	    maxiwsus      = -100000.
+	    miniwu        =  100000.
+	    maxiwu        = -100000.
+	    miniwpvp      =  100000.
+	    maxiwpvp      = -100000.
+	    miniwsvs      =  100000.
+	    maxiwsvs      = -100000.
+	    miniwv        =  100000.
+	    maxiwv        = -100000.
+	    miniwpptp     =  100000.
+	    maxiwpptp     = -100000.
+	    miniwspts     =  100000.
+	    maxiwspts     = -100000.
+	    miniwpt       =  100000.
+	    maxiwpt       = -100000.
+	    miniwsptsBC   =  100000.
+	    maxiwsptsBC   = -100000.
+	    miniwptBC     =  100000.
+	    maxiwptBC     = -100000.
+	    miniwpvptp    =  100000.
+	    maxiwpvptp    = -100000.
+	    miniwsvpts    =  100000.
+	    maxiwsvpts    = -100000.
+	    miniwvpt      =  100000.
+	    maxiwvpt      = -100000.
+	    miniwpqp      =  100000.
+	    maxiwpqp      = -100000.
+	    miniwsqs      =  100000.
+	    maxiwsqs      = -100000.
+	    miniwq        =  100000.
+	    maxiwq        = -100000.
+	    miniwpqvp     =  100000.
+	    maxiwpqvp     = -100000.
+	    miniwsqvs     =  100000.
+	    maxiwsqvs     = -100000.
+	    miniwqv       =  100000.
+	    maxiwqv       = -100000.
+	    miniwpsp      =  100000.
+	    maxiwpsp      = -100000.
+	    miniwsss      =  100000.
+	    maxiwsss      = -100000.
+	    miniws        =  100000.
+	    maxiws        = -100000.
+	    miniwpsap     =  100000.
+	    maxiwpsap     = -100000.
+	    miniwssas     =  100000.
+	    maxiwssas     = -100000.
+	    miniwsa       =  100000.
+	    maxiwsa       = -100000.
+	    minius2       =  100000.
+	    maxius2       = -100000.
+	    minivs2       =  100000.
+	    maxivs2       = -100000.
+	    miniws2       =  100000.
+	    maxiws2       = -100000.
+	    miniwsususodz =  100000.
+	    maxiwsususodz = -100000.
+	    miniwspsodz   =  100000.
+	    maxiwspsodz   = -100000.
+	    miniwpeodz    =  100000.
+	    maxiwpeodz    = -100000.
+	  end if
+
+      end if
+
+      if (prof3d .EQ. 1)then
+
+      if (end_x .EQ. -1) then 
+	  end_x=dimx-2
+      end if
+      if (end_y .EQ. -1)then
+	  end_y=dimy-2
+      end if
+      if (start_x .LT. 0)then
+	  print(" ")
+	  print("'start_x' is lower than 0 and set to 0")
+	  print(" ")
+	  start_x=0
+      end if
+      if (start_x .GT. dimx-1)then
+	  print(" ")
+	  print("'start_x' is greater than available x-range and set to "+\
+		"maximum of x-range (excluding ghostpoint)")
+	  print(" ")
+	  start_x=dimx-2
+      end if
+      if (end_x .EQ. dimx-1)then
+	  print(" ")
+	  print("'end_x' = "+end_x+" and includes the ghostpoint")
+	  print(" ")
+      end if
+      if (end_x .GT. dimx-1)then
+	  print(" ")
+	  print("'end_x' = "+end_x+" is greater than available x-range and set "+\
+		"to maximum of x-range (excluding ghostpoint)")
+	  print(" ")
+	  end_x=dimx-2
+      end if
+      if (end_x .LT. start_x)then
+	  print(" ")
+	  print("'end_x' = "+end_x+" is lower than 'start_x' = "+start_x+\
+		" and set to maximum of x-range (excluding ghostpoint)")
+	  print(" ")
+	  end_x=dimx-2
+      end if
+      if (start_y .LT. 0)then
+	  print(" ")
+	  print("'start_y' is lower than 0 and set to 0")
+	  print(" ")
+	  start_y=0
+      end if
+      if (start_y .GT. dimy-1)then
+	  print(" ")
+	  print("'start_y' is greater than available y-range and set to "+\
+		"maximum of y-range (excluding ghostpoint)")
+	  print(" ")
+	  start_x=dimy-2
+      end if
+      if (end_y .EQ. dimy-1)then
+	  print(" ")
+	  print("'end_y' = "+end_y+" and includes the ghostpoint")
+	  print(" ")
+      end if
+      if (end_y .GT. dimy-1)then
+	  print(" ")
+	  print("'end_y' = "+end_y+" is greater than available y-range and "+\
+		"set to maximum of y-range (excluding ghostpoint)")
+	  print(" ")
+	  end_x=dimy-2
+      end if
+      if (end_y .LT. start_y)then
+	  print(" ")
+	  print("'end_y' = "+end_y+" is lower than 'start_y' = "+start_y+\
+		" and set to maximum of y-range (excluding ghostpoint)")
+	  print(" ")
+	  end_y=dimy-2
+      end if
+      
+      end if
+      
+      n_o=0
+      count_var=0
+
+      res@xyDashPattern = 1*nof
+
+      over_remind = False
+      if ( over .eq. 1)then
+	over_remind = True
+      end if 
+
+      do varn = 0,dim-1 
+
+	  check = True
+	  
+	  if (prof3d .EQ. 0) then
+	    if ( isStrSubset( vNam(varn), "time") .OR. \
+		  isStrSubset( vNam(varn), "NORM")) then
+		check = False
+	    end if
+	  else
+	    if ( isStrSubset( vNam(varn), "time") .OR.  \
+		  isStrSubset( vNam(varn), "zusi") .OR.  \
+		  isStrSubset( vNam(varn), "zwwi") .OR.  \
+		  isStrSubset( vNam(varn), "x") .OR.     \
+		  isStrSubset( vNam(varn), "xu") .OR.    \
+		  isStrSubset( vNam(varn), "y") .OR.     \
+		  isStrSubset( vNam(varn), "yv") .OR.    \ 
+		  isStrSubset( vNam(varn), "zu_3d") .OR. \
+		  isStrSubset( vNam(varn), "zw_3d")) then
+		check = False
+	    end if
+	  end if
+
+	  if (var .NE. "all") then
+	    check = isStrSubset( var,","+vNam(varn)+"," )
+	  end if
+
+	  if (combine .EQ. 1) then         
+	    com=isStrSubset(c_var,","+vNam(varn)+"," )      
+	    if (com) then      
+		if (prof3d .EQ. 0) then	      	     
+		  temp     = f[:]->$vNam(varn)$	      
+		  temp_att = f_att->$vNam(varn)$ 
+		  if (log_z .EQ. 1) then
+		      do j=0,np-1
+			data(varn,j,:) = temp(ti_in(j),1:dimz-1)
+		      end do
+		  else
+		      do j=0,np-1
+			data(varn,j,:) = temp(ti_in(j),0:dimz-1)
+		      end do
+		  end if
+		else
+		  if (log_z .EQ. 1) then
+		      do i=1,dimz-1
+			do j=0,np-1
+			    temp = f[:]->$vNam(varn)$
+			    temp_att = f_att->$vNam(varn)$ 
+			    data_temp = temp(ti_in(j),i,\
+					    start_y:end_y,start_x:end_x)
+			    data(varn,j,i-1) = dim_avg_Wrap(\
+						      dim_avg_Wrap(data_temp))
+			end do
+		      end do
+		  else
+		      do i=0,dimz-1
+			do j=0,np-1
+			    temp = f[:]->$vNam(varn)$
+			    temp_att = f_att->$vNam(varn)$ 
+			    data_temp = temp(ti_in(j),i,\
+						start_y:end_y,start_x:end_x)
+			    data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
+			end do
+		      end do
+		  end if
+		  print(" ")
+		  print("Variable for combine '"+vNam(varn)+"' is read")
+		  print(" ")
+		end if                 
+		unit(varn) = temp_att@units
+		if (n_o .GT. number_comb-1) then
+		  print(" ")
+		  print("Set 'number_comb' to the number of overlaying "+\
+			"variables ('c_var' = "+c_var+")")
+		  print(" ")
+		  exit
+		end if 
+		if (abs(min(data(varn,:,:))) .GT. 10)then
+		  min_value = abs(0.01*min(data(varn,:,:)))
+		  max_value = abs(0.01*max(data(varn,:,:)))
+		else
+		  if (abs(min(data(varn,:,:))) .LT. 0.01 .AND. \
+		      abs(max(data(varn,:,:))) .GT. 0.01)then
+		      min_value = abs(0.1*max(data(varn,:,:)))
+		      max_value = abs(0.1*max(data(varn,:,:)))
+		  else
+		      if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \
+			  abs(min(data(varn,:,:))) .GT. 0.01)then
+			min_value = abs(0.1*min(data(varn,:,:)))
+			max_value = abs(0.1*min(data(varn,:,:)))
+		      else
+			min_value = abs(0.1*min(data(varn,:,:)))
+			max_value = abs(0.1*max(data(varn,:,:)))
+		      end if
+		  end if
+		end if 
+		if (min(data(varn,:,:)) .EQ. 0 .AND. \
+		    max(data(varn,:,:)) .EQ. 0)then
+		  min_value = 0.1
+		  max_value = 0.1
+		end if
+		mini(n_o)=min(data(varn,:,:))
+		maxi(n_o)=max(data(varn,:,:)) 
+		n_o=n_o+1
+	    end if
+	  end if
+
+	  if(check) then
+	    
+	    count_var=count_var+1
+
+	    if (prof3d .EQ. 0) then	  
+		temp = f[:]->$vNam(varn)$
+		temp_att = f_att->$vNam(varn)$ 
+	    else
+		if (log_z .EQ. 1) then
+		  do i=1,dimz-1
+		      do j=0,np-1
+			temp= f[:]->$vNam(varn)$
+			temp_att = f_att->$vNam(varn)$ 
+			data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x)
+			data(varn,j,i-1) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
+			delete(data_temp)
+		      end do
+		  end do
+		else
+		  do i=0,dimz-1
+		      do j=0,np-1
+			temp= f[:]->$vNam(varn)$
+			temp_att = f_att->$vNam(varn)$ 
+			data_temp = temp(ti_in(j),i,start_y:end_y,start_x:end_x)
+			data_temp!0 = "t"
+			data_temp!1 = "z"
+			data(varn,j,i) = dim_avg_Wrap(dim_avg_Wrap(data_temp))
+			delete(data_temp)
+		      end do
+		  end do
+		end if
+		print(" ")
+		print("Variable '"+vNam(varn)+"' is read")
+		print(" ")
+		unit(varn) = temp_att@units
+		a=getvardims(temp_att)
+		b=dimsizes(a)
+	    end if
+
+	    if (prof3d .EQ. 0) then
+		if (log_z .EQ. 1) then
+		  z = f_att->$vNam(varn+1)$(1:dimz-1) 
+		  unit(varn) = temp_att@units
+		  do j=0,np-1
+		      data(varn,j,:) = temp(ti_in(j),1:dimz-1) 
+		  end do
+		else
+		  z = f_att->$vNam(varn+1)$ 
+		  unit(varn) = temp_att@units
+		  do j=0,np-1
+		      data(varn,j,:) = temp(ti_in(j),:) 
+		  end do
+		end if
+	    else 
+		do i=0,b-1           
+		  if (isStrSubset( a(i),"zu_3d" ))then
+		      z_v(varn,:) = z_u
+		      if (log_z .EQ. 1) then
+			z = z_v(varn,1:dimz-1)
+		      else
+			z = z_v(varn,:)
+		      end if 
+		  else
+		      if (isStrSubset( a(i),"zw_3d" ))then
+			z_v(varn,:) = z_w
+			if (log_z .EQ. 1) then
+			    z = z_v(varn,1:dimz-1)
+			else
+			    z = z_v(varn,:)
+			end if
+		      end if                   
+		  end if
+		end do            
+	    end if
+
+	    if (isStrSubset(data@long_name," SR " ) ) then
+	      over = 0
+	    end if 
+	    
+	    ;if (nof .EQ. 0) then
+		;z_(n,:)=z/norm_z
+		;z    = z_(n,:)
+	    ;else
+		z=z/norm_z
+	    ;end if
+
+	    delta_z = z(2) - z(1)
+
+	    max_z_int=doubletoint(max_z/delta_z)
+	    min_z_int=doubletoint(min_z/delta_z)
+
+	    if(max_z_int .eq. min_z_int)
+		print(" ")
+		print("Please increase 'max_z' or decrease 'min_z' so that "+\
+		      "there are")
+		print("at least two layers for the z-axis to plot")
+		print(" ")
+		exit
+	    end if
+
+	    if(min_z_int .gt. max_z_int)
+		print(" ")
+		print("'min_z' is greater than 'max_z',")
+		print("please change this")
+		print(" ")
+		exit
+	    end if
+
+	    if (max_z_int .ge. dimz-1)
+		max_z_int = dimz-1
+		if (log_z .EQ. 1) then
+		max_z_int = max_z_int - 1
+		end if
+	    end if
+
+	    if (min_z_int .lt. 0)
+		min_z_int = 0
+		if (log_z .EQ. 1) then
+		  min_z_int = min_z_int + 1
+		end if
+	    end if         
+
+	    ;data can contain missing values in case of output of t=0h (inital profiles)
+	    ;where no output is possible
+	    n_not_ismissing = num(.not.ismissing(data(varn,:,:)))
+
+	    if (n_not_ismissing .GT. 0 ) then    
+    
+	      if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then
+		  min_value = abs(0.001*min(data(varn,:,min_z_int:max_z_int)))
+		  max_value = abs(0.001*max(data(varn,:,min_z_int:max_z_int)))
+	      else
+		  if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \
+		      abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then
+		    min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int)))
+		    max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int)))
+		  else
+		    if (abs(max(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND.\
+			abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then
+			min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int)))
+			max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int)))
+		    else
+			min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int)))
+			max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int)))
+		    end if
+		  end if
+	      end if 
+	    
+	      if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND. \
+		  max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then
+		  min_value = 0.1
+		  max_value = 0.1
+	      end if
+
+	    else     
+	      print(" ")
+	      print(vNam(varn) + " contains only missing values")
+	      print(" ")
+	    end if   
+
+	    if (over .EQ. 0) then  
+		res@gsnLeftString      = " "
+		res@tiXAxisString      = "("+unit(varn)+")"
+		res@gsnRightString     = " "
+		res@trYMinF            = min_z
+		res@trYMaxF            = max_z 
+		if (xs .EQ. -1) then 
+		  res@trXMinF            = min(data(varn,:,min_z_int:max_z_int))-\
+									  min_value
+		else 
+		  res@trXMinF            = xs     
+		end if
+		if (xe .EQ. -1) then 
+		  res@trXMaxF            = max(data(varn,:,min_z_int:max_z_int))+\
+									  max_value
+		else 
+		  res@trXMaxF            = xe  
+		end if         
+
+		if (c_var_log .EQ. 1) then
+		  if ((mod(com_i, no_rows * no_columns) .EQ. 0) .AND. (no_files .LT. 2))then
+		    res@pmLegendDisplayMode  = "Always"
+		  else
+		    res@pmLegendDisplayMode  = "Never"
+		  end if
+		else
+		  if ((mod(no_plots-1-n+combine, no_rows * no_columns) .EQ. 0) .AND. (no_files .LT. 2))then
+		    res@pmLegendDisplayMode  = "Always"
+		  else
+		    res@pmLegendDisplayMode  = "Never"
+		  end if
+		end if
+
+		plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)  
+
+	    end if
+      
+	
+	    if (vNam(varn) .EQ. "u" ) then
+		  miniu=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiu=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_u = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "                 
+		      if (xs .EQ. -1) then  
+			res@trXMinF            = miniu
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiu 
+		      else 
+			res@trXMaxF            = xe  
+		      end if                
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)  
+		  end if
+		end if
+		if (vNam(varn) .EQ. "v") then 
+		  miniv=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiv=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyMonoDashPattern = True
+		      res@xyDashPattern  = 1
+		      plot_v = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "                  
+		      if (xs .EQ. -1) then
+			res@trXMinF            = miniv
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF            = maxiv
+		      else 
+			res@trXMaxF            = xe  
+		      end if                
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if  
+		end if
+		if (vNam(varn) .EQ. "w") then
+		  miniw=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiw=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern = 2
+		      plot_w = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF            = miniw
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF            = maxiw
+		      else 
+			res@trXMaxF            = xe  
+		      end if           
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if   
+		end if
+
+		if (vNam(varn) .EQ. "pt") then
+		  minipt=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxipt=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_pt = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minipt
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then       
+			res@trXMaxF            = maxipt 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if  
+		end if
+		if (vNam(varn) .EQ. "vpt") then
+		  minivpt=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxivpt=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_vpt = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minivpt 
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then       
+			res@trXMaxF            = maxivpt 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "lpt") then
+		  minilpt=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxilpt=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2
+		      plot_lpt = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minilpt
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxilpt
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+
+		if (vNam(varn) .EQ. "q") then
+		  miniq=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiq=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_q = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniq
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiq
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+		if (vNam(varn) .EQ. "qv") then
+		  miniqv=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiqv=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then 
+		      res@xyDashPattern  = 1
+		      plot_qv = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniqv
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then         
+			res@trXMaxF            = maxiqv 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "ql") then
+		  miniql=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiql=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2
+		      plot_ql = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniql
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then       
+			res@trXMaxF            = maxiql 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "e") then
+		  minie=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxie=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_e = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minie
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then       
+			res@trXMaxF            = maxie 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "es" .OR. vNam(varn) .EQ. "e*") then
+		  minies=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxies=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_es = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF            = minies
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxies
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "km") then
+		  minikm=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxikm=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_km = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF            = minikm
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then      
+			res@trXMaxF            = maxikm
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "kh") then
+		  minikh=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxikh=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_kh = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minikh
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then     
+			res@trXMaxF            = maxikh
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq) then
+		  miniwpup=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpup=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpup = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpup
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF            = maxiwpup 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wsus" .OR. vNam(varn) .EQ. "w*u*") then
+		  miniwsus=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsus=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wsus = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsus
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then      
+			res@trXMaxF            = maxiwsus 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wu") then
+		  miniwu=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwu=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2 
+		      plot_wu = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF            = miniwu
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then 
+			res@trXMaxF            = maxiwu 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq) then
+		  miniwpvp=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpvp=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpvp = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpvp
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then     
+			res@trXMaxF            = maxiwpvp 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wsvs" .OR. vNam(varn) .EQ. "w*v*") then
+		  miniwsvs=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsvs=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wsvs = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF            = miniwsvs
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then      
+			res@trXMaxF            = maxiwsvs 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wv") then
+		  miniwv=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwv=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2 
+		      plot_wv = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwv
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwv 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) \
+		  .EQ. "w"+dq+"pt"+dq) then
+		  miniwpptp=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpptp=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpptp = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpptp
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpptp 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*") then
+		  miniwspts=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwspts=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wspts = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwspts
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwspts 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wpt") then       
+		  miniwpt=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpt=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2 
+		      plot_wpt = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpt
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpt 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wsptsBC".OR. vNam(varn) .EQ. "w*pt*BC" ) then
+		  miniwsptsBC=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsptsBC=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wsptsBC = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsptsBC
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsptsBC 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if             
+		if (vNam(varn) .EQ. "wptBC") then
+		  miniwptBC=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwptBC=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wptBC = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwptBC
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwptBC 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) \
+		    .EQ. "w"+dq+"vpt"+dq) then
+		  miniwpvptp=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpvptp=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpvptp = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpvptp
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpvptp 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wsvpts" .OR. vNam(varn) .EQ. "w*vpt*") then
+		  miniwsvpts=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsvpts=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wsvpts = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsvpts
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsvpts 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wvpt") then
+		  miniwvpt=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwvpt=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2 
+		      plot_wvpt = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwvpt
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwvpt 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq) then
+		  miniwpqp=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpqp=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpqp = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpqp
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpqp 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wsqs".OR. vNam(varn) .EQ. "w*s*" ) then
+		  miniwsqs=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsqs=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wsqs = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsqs
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsqs 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wq") then
+		  miniwq=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwq=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2
+		      plot_wq = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwq
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwq 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpqvp" .OR. \
+		  vNam(varn) .EQ. "w"+dq+"qv"+dq) then
+		  miniwpqvp=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpqvp=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0 
+		      plot_wpqvp = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpqvp
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpqvp 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "wsqvs" .OR. vNam(varn) .EQ. "w*qv*") then
+		  miniwsqvs=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsqvs=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wsqvs = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsqvs
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsqvs 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wqv") then
+		  miniwqv=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwqv=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2
+		      plot_wqv = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwqv
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwqv 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq) then
+		  miniwpsp=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpsp=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpsp = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpsp
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpsp 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if 
+		if (vNam(varn) .EQ. "wsss" .OR. vNam(varn) .EQ. "w*s*" ) then
+		  miniwsss=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsss=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1 
+		      plot_wsss = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsss
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsss 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "ws") then
+		  miniws=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiws=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2
+		      plot_ws = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniws
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiws 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+
+		if (vNam(varn) .EQ. "wpsap" .OR. \
+		    vNam(varn) .EQ. "w"+dq+"sa"+dq) then
+		  miniwpsap=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpsap=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wpsap = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpsap
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpsap 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "wssas" .OR. vNam(varn) .EQ. "w*sa*") then
+		  miniwssas=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwssas=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wssas = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwssas
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwssas 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wsa") then
+		  miniwsa=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsa=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2
+		      plot_wsa = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsa
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsa 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "u*2") then
+		  minius2=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxius2=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_us2 = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minius2
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxius2 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "vs2" .OR. vNam(varn) .EQ. "v*2") then
+		  minivs2=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxivs2=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_vs2 = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = minivs2
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxivs2 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if
+		end if
+		if (vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "w*2") then
+		  miniws2=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiws2=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2 
+		      plot_ws2 = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniws2
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiws2 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if
+
+		if (vNam(varn) .EQ. "wsususodz" .OR. \
+		    vNam(varn) .EQ. "w*u*u*:dz") then
+		  miniwsususodz=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwsususodz=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 0
+		      plot_wsususodz = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwsususodz
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwsususodz 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if  
+		end if
+		if (vNam(varn) .EQ. "wspsodz" .OR. vNam(varn) .EQ. "w*p*:dz") then
+		  miniwspsodz=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwspsodz=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 1
+		      plot_wspsodz = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwspsodz
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwspsodz 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  end if 
+		end if
+		if (vNam(varn) .EQ. "wpeodz" .OR. \
+		    vNam(varn) .EQ. "w"+dq+"p:dz") then
+		  miniwpeodz=min(data(varn,:,min_z_int:max_z_int))-min_value
+		  maxiwpeodz=max(data(varn,:,min_z_int:max_z_int))+max_value
+		  if (over .EQ. 1) then
+		      res@xyDashPattern  = 2 
+		      plot_wpeodz = gsn_csm_xy(wks,data(varn,:,:),z,res)
+		  else
+		      res@gsnLeftString      = " "
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then 
+			res@trXMinF            = miniwpeodz
+		      else 
+			res@trXMinF            = xs
+		      end if
+		      if (xe .EQ. -1) then        
+			res@trXMaxF            = maxiwpeodz 
+		      else 
+			res@trXMaxF            = xe  
+		      end if
+		      plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  end if
+		end if 
+
+		; ***************************************************
+		; legend for each plot
+		; ***************************************************
+		
+		if (over .EQ. 0) then
+
+		   label = " " + vNam(varn)
+
+		   lgres1                    = True
+		   lgMonoDashIndex           = False
+		   lgres1@lgDashIndexes      = (/0,1,2/)
+		   lgres1@lgLabelFont        = "helvetica"    
+		   lgres1@lgLabelFontHeightF = font_size_legend * 10.0 * 0.7
+		   lgres1@vpWidthF           = 0.14           
+		   lgres1@vpHeightF          = 0.1 / 3.0 + 0.01         
+		
+		   lbid = gsn_create_legend(wks,1,label,lgres1)       
+
+		   amres = True
+		   amres@amParallelPosF   = -0.5		    
+		   amres@amOrthogonalPosF = -0.5   
+		   amres@amJust           = "TopLeft"
+
+		   annoid1 = gsn_add_annotation(plot(n),lbid,amres) 
+      
+		end if
+
+	    if (no_files .GT. 1) then
+;		print("nof="+nof+" und n="+n)
+		multi_plot(nof,n)=plot(n) 
+		max_nof(nof,n)=max(data(varn,:,min_z_int:max_z_int))
+		min_nof(nof,n)=min(data(varn,:,min_z_int:max_z_int))
+		name(nof,n)   =vNam(varn)
+		unit_(nof,n)  =unit(varn)
+	    end if
+	    if (over .EQ. 0) then
+		n=n+1  
+	    end if  
+	    if (prof3d .EQ. 0)then    
+		varn=varn+1
+	    end if
+	    delete(temp) 
+	    delete(temp_att)
+	  end if          
+      end do
+      if (no_files .GT. 1) then
+	  delete(vNam)
+	  delete(files)
+      end if
+      
+      end do
+
+      ;#########ENDE DO LOOP FOR no_files GT 1#############
+
+      if (isStrSubset(data@long_name," SR " ) .and. over_remind) then
+	  print(" ")
+	  print("If you have outputs of statistic regions you cannot overlay "+\
+		"variables;")
+	  print("'over' is set to 0" )
+	  print(" ")
+	  over = 0
+      end if 
+
+      if (count_var .EQ. 0) then
+	  print(" ")
+	  print("The variables 'var="+var+"'" )
+	  print("do not exist on your input file;")
+	  print("be sure to have one comma before and after each variable")
+	  print(" ")
+	  exit        
+      end if
+      
+      if (no_files .GT. 1) then 
+	  multi_legend=new(6,string)
+	  string_len=new(6,integer)
+	  multi_dash=new(no_files,string)
+	  multi_legend(0)="  "+name_legend_1
+	  string_len(0)=strlen(multi_legend(0))
+	  multi_legend(1)="  "+name_legend_2 
+	  string_len(1)=strlen(multi_legend(1))
+	  multi_legend(2)="  "+name_legend_3
+	  string_len(2)=strlen(multi_legend(2))
+	  multi_legend(3)="  "+name_legend_4 
+	  string_len(3)=strlen(multi_legend(3))
+	  multi_legend(4)="  "+name_legend_5 
+	  string_len(4)=strlen(multi_legend(4))
+	  multi_legend(5)="  "+name_legend_6 
+	  string_len(5)=strlen(multi_legend(5))
+	  do ml=1,no_files
+	    multi_dash(ml-1)=ml-1
+	  end do
+	  delete(plot)
+	  plot = new(dim,graphic)
+	  do pl=0,n-1
+	    plot0 = new(1,graphic)
+	    res@trXMinF = min(min_nof(:,pl))
+	    res@trXMaxF = max(max_nof(:,pl))
+            res@xyDashPattern=0
+	    res@gsnLeftString  = " "; name(0,pl)
+	    res@gsnRightString = " ";unit_(0,pl) 
+	    res@tiXAxisString  = "(" + unit_(0,pl) + ")"
+	    data_0(:,:) = min(min_nof(:,pl))
+
+	    if ( (mod(no_plots - pl, no_rows * no_columns) .EQ. 1) .OR. (no_rows * no_columns .EQ. 1) ) then
+		res@pmLegendDisplayMode  = "Always"
+	    else
+		res@pmLegendDisplayMode  = "Never"
+	    end if
+
+	    plot0 = gsn_csm_xy(wks,data_0(:,:),z_(pl,:),res)
+
+	    ; ***************************************************
+	    ; legend for combined plot (File 1, File 2, ...)
+	    ; ***************************************************
+
+	    if ( (mod(no_plots - pl, no_rows * no_columns) .EQ. 1) .OR. (no_rows * no_columns .EQ. 1) )then
+		lgres                    = True
+		lgMonoDashIndex          = False
+		lgres@lgLabelFont        = "helvetica"    
+		lgres@lgLabelFontHeightF = font_size_legend * 10.0       
+		lgres@vpWidthF           = max(string_len)*0.02;0.015           
+		lgres@vpHeightF          = 0.035*no_files    
+		lgres@lgDashIndexes      = multi_dash(no_files-1:0)
+                lgres@lgLineDashSegLenF  = 0.075
+		lbid = gsn_create_legend(\
+				    wks,no_files,multi_legend(no_files-1:0),lgres)
+
+		amres = True
+		amres@amParallelPosF   = -0.5	    
+		amres@amOrthogonalPosF = -0.55
+		amres@amJust           = "BottomLeft"
+		annoid1 = gsn_add_annotation(plot0,lbid,amres) 
+	    end if
+
+	    do plo=0,no_files-1
+		overlay(plot0,multi_plot(plo,pl))
+		plot(pl)=plot0
+	    end do
+	    delete(plot0)
+	  end do
+      end if
+
+      if (count_var .EQ. 0) then
+	  print(" ")
+	  print("Select a variable 'var=' or use the default value")
+	  print(" ")
+	  print("Your selection '"+var+"' does not exist on the input file")
+	  print(" ")
+	  exit
+      end if
+
+      if (over .EQ. 1 ) then
+
+	  overlay(plot_u,plot_v)
+	  overlay(plot_u,plot_w)
+	  u=0
+	  overlay(plot_pt,plot_vpt)
+	  overlay(plot_pt,plot_lpt)
+	  pt=0
+	  overlay(plot_q,plot_qv)
+	  overlay(plot_q,plot_ql)
+	  q=0
+	  overlay(plot_e,plot_es)
+	  e=0
+	  overlay(plot_km,plot_kh)
+	  km=0
+	  overlay(plot_wpup,plot_wsus)
+	  overlay(plot_wpup,plot_wu)
+	  wpup=0
+	  overlay(plot_wpvp,plot_wsvs)
+	  overlay(plot_wpvp,plot_wv)
+	  wpvp=0
+	  overlay(plot_wpptp,plot_wspts)
+	  overlay(plot_wpptp,plot_wpt)
+	  wpptp=0
+	  overlay(plot_wsptsBC,plot_wptBC)
+	  wsptsBC=0
+	  overlay(plot_wpvptp,plot_wsvpts)
+	  overlay(plot_wpvptp,plot_wvpt)
+	  wpvptp=0
+	  overlay(plot_wpqp,plot_wsqs)
+	  overlay(plot_wpqp,plot_wq)
+	  wpqp=0
+	  overlay(plot_wpqvp,plot_wsqvs)
+	  overlay(plot_wpqvp,plot_wqv)
+	  wpqvp=0
+	  overlay(plot_wpsp,plot_wsss)
+	  overlay(plot_wpsp,plot_ws)
+	  wpsp=0
+	  overlay(plot_wpsap,plot_wssas)
+	  overlay(plot_wpsap,plot_wsa)
+	  wpsap=0
+	  overlay(plot_us2,plot_vs2)
+	  overlay(plot_us2,plot_ws2)
+	  us2=0
+	  overlay(plot_wsususodz,plot_wspsodz)
+	  overlay(plot_wsususodz,plot_wpeodz)
+	  wsususodz=0
+
+      end if
+
+      if (over .EQ. 1) then 
+      
+	  do varn = 0,dim-1    
+	    
+	    check = True
+	  
+	    if (prof3d .EQ. 0) then
+		if ( isStrSubset( vNam(varn), "time") .OR. \
+		    isStrSubset( vNam(varn), "NORM")) then
+		  check = False
+		end if
+	    else
+		if ( isStrSubset( vNam(varn), "time") .OR.  \
+		    isStrSubset( vNam(varn), "zusi") .OR.  \
+		    isStrSubset( vNam(varn), "zwwi") .OR.  \
+		    isStrSubset( vNam(varn), "x") .OR.     \
+		    isStrSubset( vNam(varn), "xu") .OR.    \
+		    isStrSubset( vNam(varn), "y") .OR.     \
+		    isStrSubset( vNam(varn), "yv") .OR.    \
+		    isStrSubset( vNam(varn), "zu_3d") .OR. \
+		    isStrSubset( vNam(varn), "zw_3d")) then
+		  check = False
+		end if
+	    end if
+
+	    if (var .NE. "all") then      
+		check = isStrSubset( var,","+vNam(varn)+"," )
+	    end if      
+
+	    if (check)then
+
+		if (prof3d .EQ. 0) then
+		  if (log_z .EQ. 1) then
+		      z = f_att->$vNam(varn+1)$(1:dimz-1) 
+		  else
+		      z = f_att->$vNam(varn+1)$               
+		  end if
+		else 
+		  do i=0,b-1            
+		      if (isStrSubset( a(i),"zu_3d" ))then
+			z_v(varn,:) = z_u
+			if (log_z .EQ. 1) then
+			    z = z_v(varn,1:dimz-1)
+			else
+			    z = z_v(varn,:)
+			end if 
+		      else
+			if (isStrSubset( a(i),"zw_3d" ))then
+			    z_v(varn,:) = z_w
+			    if (log_z .EQ. 1) then
+			      z = z_v(varn,1:dimz-1)
+			    else
+			      z = z_v(varn,:)
+			    end if
+			end if                   
+		      end if
+		  end do            
+		end if
+
+		z=z/norm_z
+		
+		if (abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 10)then
+		  min_value = abs(0.01*min(data(varn,:,min_z_int:max_z_int)))
+		  max_value = abs(0.01*max(data(varn,:,min_z_int:max_z_int)))
+		else
+		  if (abs(min(data(varn,:,min_z_int:max_z_int))) .LT. 0.01 .AND. \
+		      abs(max(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then
+		      min_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int)))
+		      max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int)))
+		  else
+		      if (abs(max(data(varn,:,:))) .LT. 0.01 .AND. \
+			  abs(min(data(varn,:,min_z_int:max_z_int))) .GT. 0.01)then
+			min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int)))
+			max_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int)))
+		      else
+			min_value = abs(0.1*min(data(varn,:,min_z_int:max_z_int)))
+			max_value = abs(0.1*max(data(varn,:,min_z_int:max_z_int)))
+		      end if
+		  end if
+		end if 
+		if (min(data(varn,:,min_z_int:max_z_int)) .EQ. 0 .AND.\
+		    max(data(varn,:,min_z_int:max_z_int)) .EQ. 0)then
+		  min_value = 0.1
+		  max_value = 0.1
+		end if
+
+		res@gsnLeftString      = vNam(varn)
+		res@tiXAxisString      = "("+unit(varn)+")"
+		res@gsnRightString     = " "
+		res@trYMinF            = min_z
+		res@trYMaxF            = max_z  
+		res@xyDashPattern = 0
+
+		if (xs .EQ. -1) then 
+		  res@trXMinF = min(data(varn,:,min_z_int:max_z_int))-min_value
+		else 
+		  res@trXMinF = xs
+		end if
+		if (xe .EQ. -1) then 
+		  res@trXMaxF = max(data(varn,:,min_z_int:max_z_int))+max_value
+		else 
+		  res@trXMaxF = xe  
+		end if 
+		plot(n) = gsn_csm_xy(wks,data(varn,:,:),z,res)  
+		
+		if (vNam(varn) .EQ. "u" .OR. vNam(varn) .EQ. "v" .OR. \
+		    vNam(varn) .EQ. "w") then
+		  if (u .EQ. 0) then
+		      res@gsnLeftString      = "u, v and w"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniu,miniv,miniw/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiu,maxiv,maxiw/))
+		      else 
+			res@trXMaxF = xe  
+		      end if  
+		      if (vNam(varn) .EQ. "v")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "w")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.07           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(wks,3,(/"u","v","w"/),lgres)       
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_u)
+		      u=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue
+		  end if        
+		end if  
+	
+		if (vNam(varn) .EQ. "pt" .OR. vNam(varn) .EQ. "vpt" .OR. \
+		    vNam(varn) .EQ. "lpt") then
+		  if (pt .EQ. 0) then
+		      res@gsnLeftString      = "pt, vpt and lpt"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/minipt,minivpt,minilpt/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxipt,maxivpt,maxilpt/))
+		      else 
+			res@trXMaxF = xe  
+		      end if
+		      if (vNam(varn) .EQ. "vpt")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "lpt")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0          
+		      lgres@vpWidthF           = 0.07           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(wks,3,(/"pt","vpt","lpt"/),lgres) 
+		      amres = True
+		      amres@amParallelPosF   = 0.88	    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_pt)
+		      pt=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue       
+		  end if
+		end if            
+		if (vNam(varn) .EQ. "q" .OR. vNam(varn) .EQ. "qv" .OR. \
+		    vNam(varn) .EQ. "ql") then
+		  if (q .EQ. 0) then
+		      res@gsnLeftString      = "q, qv and ql"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniq,miniqv,miniql/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiq,maxiqv,maxiql/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "qv")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "ql")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0          
+		      lgres@vpWidthF           = 0.07          
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(wks,3,(/"q","qv","ql"/),lgres)
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_q)
+		      q=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if    
+	      
+		if (vNam(varn) .EQ. "e" .OR. vNam(varn) .EQ. "es" .OR. \
+		    vNam(varn) .EQ. "e*" ) then
+		  if (e .EQ. 0) then
+		      res@gsnLeftString      = "e and e*"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/minie,minies/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxie,maxies/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "es")then
+			res@xyDashPattern = 1
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0           
+		      lgres@vpWidthF           = 0.07           
+		      lgres@vpHeightF          = 0.08          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(wks,2,(/"e","e*"/),lgres)       
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.365            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_e)
+		      e=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if            
+		if (vNam(varn) .EQ. "km" .OR. vNam(varn) .EQ. "kh") then
+		  if (km .EQ. 0) then
+		      res@gsnLeftString      = "km and kh"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/minikm,minikh/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxikm,maxikh/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "kh")then
+			res@xyDashPattern = 1
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0           
+		      lgres@vpWidthF           = 0.07           
+		      lgres@vpHeightF          = 0.08          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(wks,2,(/"km","kh"/),lgres)       
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.365            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_km) 
+		      km=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if           
+	      
+		if (vNam(varn) .EQ. "wpup" .OR. vNam(varn) .EQ. "wsus" .OR.      \
+		    vNam(varn) .EQ. "wu" .OR. vNam(varn) .EQ. "w"+dq+"u"+dq .OR. \
+		    vNam(varn) .EQ. "w*u*") then
+		  if (wpup .EQ. 0) then
+		      res@gsnLeftString      = "w"+dq+"u"+dq+", w*u* and wu"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpup,miniwsus,miniwu/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpup,maxiwsus,maxiwu/))
+		      else 
+			res@trXMaxF = xe  
+		      end if  
+		      if (vNam(varn) .EQ. "wsus")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wu")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.08           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+				    wks,3,(/"w"+dq+"u"+dq,"w*u*","wu"/),lgres)
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpup)
+		      wpup=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue    
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wpvp" .OR. vNam(varn) .EQ. "wsvs" .OR.     \
+		  vNam(varn) .EQ. "wv" .OR. vNam(varn) .EQ. "w"+dq+"v"+dq .OR. \
+		  vNam(varn) .EQ. "w*v*") then
+		  if (wpvp .EQ. 0) then
+		      res@gsnLeftString      = "w"+dq+"v"+dq+", w*v* and wv"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpvp,miniwsvs,miniwv/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpvp,maxiwsvs,maxiwv/))
+		      else 
+			res@trXMaxF = xe  
+		      end if
+		      if (vNam(varn) .EQ. "wsvs")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wv")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.08          
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+				wks,3,(/"w"+dq+"v"+dq,"w*v*","wv"/),lgres)       
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpvp)
+		      wpvp=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wspts" .OR.     \
+		    vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq .OR.\
+		    vNam(varn) .EQ. "w*pt*") then
+		  if (wpptp .EQ. 0) then                 
+		      res@gsnLeftString      = "w"+dq+"pt"+dq+", w*pt* and wpt"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpptp,miniwspts,miniwpt/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpptp,maxiwspts,maxiwpt/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wspts" .OR. vNam(varn) .EQ. "w*pt*")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wpt")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.09           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)              
+		      lbid = gsn_create_legend(\
+				  wks,3,(/"w"+dq+"pt"+dq,"w*pt*","wpt"/),lgres)
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpptp)
+		      wpptp=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue    
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wsptsBC" .OR. vNam(varn) .EQ. "wptBC" .OR.\
+		    vNam(varn) .EQ. "w*pt*BC") then
+		  if (wsptsBC .EQ. 0) then
+		      res@gsnLeftString      = "w*pt*BC and wptBC"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwsptsBC,miniwptBC/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwsptsBC,maxiwptBC/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wptBC")then
+			res@xyDashPattern = 1
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.1           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+					    wks,3,(/"w*pt*BC","wptBC"/),lgres)
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wsptsBC)
+		      wsptsBC=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if  
+		end if             
+		if (vNam(varn) .EQ. "wpvptp" .OR. vNam(varn) .EQ. "wsvpts" .OR. \
+		    vNam(varn) .EQ. "wvpt" .OR. vNam(varn) .EQ. \
+		    "w"+dq+"vpt"+dq .OR. vNam(varn) .EQ. "w*vpt*") then
+		  if (wpvptp .EQ. 0) then
+		      res@gsnLeftString      = "w"+dq+"vpt"+dq+", w*vpt* and wvpt"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpvptp,miniwsvpts,miniwvpt/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpvptp,maxiwsvpts,maxiwvpt/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wsvpts")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wvpt")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.1           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+				wks,3,(/"w"+dq+"vpt"+dq,"w*vpt*","wvpt"/),lgres)
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpvptp)
+		      wpvptp=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wpqp" .OR. vNam(varn) .EQ. "wsqs" .OR.      \
+		    vNam(varn) .EQ. "wq" .OR. vNam(varn) .EQ. "w"+dq+"q"+dq .OR. \
+		    vNam(varn) .EQ. "w*q*") then
+		  if (wpqp .EQ. 0) then 
+		      res@gsnLeftString      = "w"+dq+"q"+dq+", w*q* and wq"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpqp,miniwsqs,miniwq/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpqp,maxiwsqs,maxiwq/))
+		      else 
+			res@trXMaxF = xe  
+		      end if  
+		      if (vNam(varn) .EQ. "wsqs")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wq")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0           
+		      lgres@vpWidthF           = 0.08           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+				wks,3,(/"w"+dq+"q"+dq,"w*q*","wq"/),lgres)       
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpqp)
+		      wpqp=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if 
+		      continue   
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wpqvp" .OR. vNam(varn) .EQ. "wsqvs" .OR.     \
+		    vNam(varn) .EQ. "wqv" .OR. vNam(varn) .EQ. "w"+dq+"qv"+dq .OR.\
+		    vNam(varn) .EQ. "w*qv*") then
+		  if (wpqvp .EQ. 0) then
+		      res@gsnLeftString      ="w"+dq+"qv"+dq+" , w*qv* and wqv"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpqp,miniwsqvs,miniwqv/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpqp,maxiwsqvs,maxiwqv/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wsqvs")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wqv")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.09           
+		      lgres@vpHeightF          = 0.12         
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+				    wks,3,(/"w"+dq+"qv"+dq,"w*qv*","wqv"/),lgres)
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpqvp) 
+		      wpqvp=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if
+		if (vNam(varn) .EQ. "wpsp" .OR. vNam(varn) .EQ. "wsss" .OR.     \
+		    vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w"+dq+"s"+dq .OR.\
+		    vNam(varn) .EQ. "w*s*") then
+		  if (wpsp .EQ. 0) then
+		      res@gsnLeftString      = "w"+dq+"s"+dq+", w*s* and ws"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpsp,miniwsss,miniws/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpsp,maxiwsss,maxiws/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wsss")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "ws")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.08           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+			      wks,3,(/"w"+dq+"s"+dq,"w*s*","ws"/),lgres)       
+
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpsp)
+		      wpsp=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if 
+		if (vNam(varn) .EQ. "wpsap" .OR.vNam(varn) .EQ. "wssas" .OR.      \
+		    vNam(varn) .EQ. "wsa" .OR. vNam(varn) .EQ. "w"+dq+"sa"+dq .OR.\
+		    vNam(varn) .EQ. "w*sa*") then
+		  if (wpsap .EQ. 0) then
+		      res@gsnLeftString      = "w"+dq+"sa"+dq+", w*sa* and wsa"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwpsap,miniwssas,miniwsa/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwpsap,maxiwssas,maxiwsa/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wssas")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wsa")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.09           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+				wks,3,(/"w"+dq+"sa"+dq,"w*sa*","wsa"/),lgres)
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wpsap)
+		      wpsap=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if
+	      
+		if (vNam(varn) .EQ. "us2" .OR. vNam(varn) .EQ. "vs2" .OR. \
+		    vNam(varn) .EQ. "ws2" .OR. vNam(varn) .EQ. "u*2" .OR. \
+		    vNam(varn) .EQ. "v*2" .OR. vNam(varn) .EQ. "w*2" ) then
+		  if (us2 .EQ. 0) then
+		      res@gsnLeftString      = "u*2, v*2 and w*2"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/minius2,minivs2,miniws2/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxius2,maxivs2,maxiws2/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "vs2")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "ws2")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0            
+		      lgres@vpWidthF           = 0.07           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(wks,3,(/"u*2","v*2","w*2"/),lgres)
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_us2)
+		      us2=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if
+	      
+		if (vNam(varn) .EQ. "wsususodz" .OR. \
+		    vNam(varn) .EQ. "wspsodz" .OR.   \
+		    vNam(varn) .EQ. "wpeodz" .OR.    \
+		    vNam(varn) .EQ. "w*u*u*:dz" .OR. \
+		    vNam(varn) .EQ. "w*p*:dz" .OR.   \
+		    vNam(varn) .EQ. "w"+dq+"e:dz") then
+		  if (wsususodz .EQ. 0) then 
+		      res@gsnLeftString      = "w*u*u*:dz, w*p*:dz and w"+dq+"e:dz"
+		      res@tiXAxisString      = "("+unit(varn)+")"
+		      res@gsnRightString     = " "
+		      if (xs .EQ. -1) then
+			res@trXMinF = min((/miniwsususodz,\
+						      miniwspsodz,miniwpeodz/))
+		      else 
+			res@trXMinF = xs
+		      end if
+		      if (xe .EQ. -1) then
+			res@trXMaxF = max((/maxiwsususodz,maxiwspsodz,\
+								  maxiwpeodz/))
+		      else 
+			res@trXMaxF = xe  
+		      end if 
+		      if (vNam(varn) .EQ. "wspsodz")then
+			res@xyDashPattern = 1
+		      end if
+		      if (vNam(varn) .EQ. "wpeodz")then
+			res@xyDashPattern = 2
+		      end if
+		      plot(n) =  gsn_csm_xy(wks,data(varn,:,:),z,res) 
+
+		      ; ***************************************************
+		      ; legend for overlaid plot
+		      ; ***************************************************
+	  
+		      lgres                    = True
+		      lgMonoDashIndex          = False
+		      lgres@lgLabelFont        = "helvetica"    
+		      lgres@lgLabelFontHeightF = font_size_legend*10.0           
+		      lgres@vpWidthF           = 0.12           
+		      lgres@vpHeightF          = 0.12          
+		      lgres@lgDashIndexes      = (/0,1,2/)
+		      lbid = gsn_create_legend(\
+			      wks,3,(/"w*u*u*:dz","w*p*:dz","w"+dq+"e:dz"/),lgres)
+		      amres = True
+		      amres@amParallelPosF   = 0.88		    
+		      amres@amOrthogonalPosF = 0.33            
+		      annoid1 = gsn_add_annotation(plot(n),lbid,amres)
+		      overlay(plot(n),plot_wsususodz)
+		      wsususodz=1
+		  else
+		      if (prof3d .EQ. 0)then
+			varn=varn+1
+		      end if
+		      continue   
+		  end if
+		end if     
+		n=n+1 
+		if (prof3d .EQ. 0)then
+		  varn=varn+1
+		end if   
+	    end if
+	  end do 
+      end if 
+      
+      if (com_i .NE. 0) then
+	  delete(com_var_avail)
+      end if
+      com_var_avail=new(count_var,string)    
+
+      if (combine .EQ. 1) then
+	  co=0     
+	  n_o=0
+	  do varn = 0,dim-1
+    
+	    check = True
+	  
+	    if (prof3d .EQ. 0) then
+		if ( isStrSubset( vNam(varn), "time") .OR. \
+		    isStrSubset( vNam(varn), "NORM")) then
+		  check = False
+		end if
+	    else
+		if ( isStrSubset( vNam(varn), "time") .OR.  \
+		    isStrSubset( vNam(varn), "zusi") .OR.  \
+		    isStrSubset( vNam(varn), "zwwi") .OR.  \
+		    isStrSubset( vNam(varn), "x") .OR.     \
+		    isStrSubset( vNam(varn), "xu") .OR.    \
+		    isStrSubset( vNam(varn), "y") .OR.     \
+		    isStrSubset( vNam(varn), "yv") .OR.    \
+		    isStrSubset( vNam(varn), "zu_3d") .OR. \
+		    isStrSubset( vNam(varn), "zw_3d")) then
+		  check = False
+		end if
+	    end if
+
+	    if (var .NE. "all") then         
+		check = isStrSubset( var,","+vNam(varn)+"," )
+	    end if      
+
+	    if (check)then
+		
+		if (prof3d .EQ. 0) then
+		  if (log_z .EQ. 1) then
+		      z = f_att->$vNam(varn+1)$(1:dimz-1) 
+		  else
+		      z = f_att->$vNam(varn+1)$               
+		  end if
+		else 
+		  do i=0,b-1            
+		      if (isStrSubset( a(i),"zu_3d" ))then
+			z_v(varn,:) = z_u
+			if (log_z .EQ. 1) then
+			    z = z_v(varn,1:dimz-1)
+			else
+			    z = z_v(varn,:)
+			end if 
+		      else
+			if (isStrSubset( a(i),"zw_3d" ))then
+			    z_v(varn,:) = z_w
+			    if (log_z .EQ. 1) then
+			      z = z_v(varn,1:dimz-1)
+			    else
+			      z = z_v(varn,:)
+			    end if
+			end if                   
+		      end if
+		  end do            
+		end if
+
+		z=z/norm_z
+		
+		com_var_avail(n_o)=vNam(varn)
+		
+		com=isStrSubset( c_var,","+vNam(varn)+"," )
+		if (com)then 
+		  co = co+1           
+		  if (n_o .EQ. 1) then
+		      res@xyDashPattern  = 1                                   
+		  else            
+		      if (n_o .EQ. 2) then
+			res@xyDashPattern  = 2
+		      else
+			res@xyDashPattern  = 0
+			res@gsnLeftString  = " " ; "Combined Plot of "+c_var_name
+			res@tiXAxisString  = "("+unit(varn)+")"
+			res@gsnRightString = " "
+			if (xs .EQ. -1) then 
+			    res@trXMinF = min(mini)
+			else 
+			    res@trXMinF = xs
+			end if
+			if (xe .EQ. -1) then 
+			    res@trXMaxF = max(maxi)
+			else 
+			    res@trXMaxF = xe  
+			end if 
+		      end if
+		  end if
+		  label(n_o)=" " + vNam(varn)
+		  color_o(n_o)=237
+		  plot_o(n_o)=gsn_csm_xy(wks,data(varn,:,:),z,res) 
+		  n_o=n_o+1
+		end if 
+		if (prof3d .EQ. 0)then
+		  varn=varn+1
+		end if           
+	    end if
+	  end do
+      
+	  if(number_comb .EQ. 2)then
+	    if (co .EQ. 2)then 
+		overlay(plot_o(0),plot_o(1))
+	    else
+		print(" ")
+		print("combining is not possible,")
+		print("'c_var'(= "+c_var+") must include two variables of "+\
+		      "the general plots = ")
+		print("- "+com_var_avail)
+		print("be sure to have one comma before and after the variable")
+		print(" ")
+		exit  
+	    end if 
+	  end if
+	  if(number_comb .EQ. 3)then
+	    if (co .EQ. 3)then 
+		overlay(plot_o(0),plot_o(1))
+		overlay(plot_o(0),plot_o(2))
+	    else
+		print(" ")
+		print("combining is not possible,")
+		print("'c_var'(= "+c_var+") must include three variables of "+\
+		      "the general plots = ")
+		print("- "+com_var_avail)
+		print("be sure to have one comma before and after the variable")
+		print(" ")
+		exit
+	    end if 
+	  end if
+
+	  ; ***************************************************
+	  ; legend for combined plot
+	  ; ***************************************************
+	  
+	  lgres                    = True
+	  lgMonoDashIndex          = False
+          lgres@lgLineDashSegLenF  = 0.075
+	  lgres@lgDashIndexes      = (/0,1,2/)
+	  lgres@lgLabelFont        = "helvetica"    
+	  lgres@vpWidthF           = 0.14           
+	  lgres@vpHeightF          = 0.1 * number_comb / 3.0 + (number_comb + 1) * 0.01        
+          lgres@lgLabelFontHeightF = 10.0 * font_size_legend * ((number_comb \
+				     - 2.0) * 0.35 + 0.65)
+
+	  lbid = gsn_create_legend(wks,number_comb,label,lgres)       
+
+	  amres = True
+	  amres@amParallelPosF   = -0.5		    
+	  amres@amOrthogonalPosF = -0.5   
+	  amres@amJust           = "TopLeft"
+
+	  annoid1 = gsn_add_annotation(plot_o(0),lbid,amres) 
+	
+	  plot(0) = plot_o(0)
+
+      end if
+
+      if (c_var_log .EQ. 1) then
+	  c_var_plot(com_i) = plot(0)
+      end if
+
+   end do
+
+   ; ***************************************************
+   ; merge plots onto one page 
+   ; ***************************************************
+
+   if (c_var_log .EQ. 1) then
+      delete(plot_)
+      plot_=new(max_com_i+1,graphic)
+      plot_=c_var_plot
+      n = max_com_i + 1 
+   else
+      do m=0,n-1
+         plot_(m)=plot(n-1-m)
+      end do
+   end if
+
+   no_frames = 0
+
+   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+       n .gt. no_rows*no_columns) then
+      gsn_panel(wks,plot_,(/n,1/),resP)
+      print(" ")
+      print("Outputs to .eps or .epsi have only one frame")
+      print(" ")
+   else    
+      do i = 0,n-1, no_rows*no_columns
+         if( (i+no_rows*no_columns) .gt. (n-1)) then
+            gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP)
+            no_frames = no_frames + 1  
+         else
+            gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),\
+                                                (/no_rows,no_columns/),resP)
+            no_frames = no_frames + 1  
+         end if
+      end do
+   end if
+
+
+   if (format_out .EQ. "png" ) then
+     png_output = new((/no_frames/), string)
+     j = 0
+
+     if (no_frames .eq. 1) then
+        if (ncl_version .GE. 6 ) then
+           png_output(0) = file_out+".png"
+        else
+           png_output(0) = file_out+".00000"+1+".png"
+        end if
+        ;using imagemagick's convert for reducing the white 
+        ;space around the plot
+        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+              png_output(0) + " " + png_output(0)
+       system(cmd)
+     else
+
+       do i=0, no_frames-1
+         j = i + 1
+         if (j .LE. 9) then
+           png_output(i) = file_out+".00000"+j+".png"
+         end if
+         if (j .GT. 9 .AND. j .LE. 99) then
+           png_output(i) = file_out+".0000"+j+".png"
+         end if
+         if (j .GT. 99 .AND. j .LE. 999) then
+           png_output(i) = file_out+".000"+j+".png"
+         end if
+         if (j .GT. 999) then
+           png_output(i) = file_out+".00"+j+".png"
+         end if
+
+         ;using imagemagick's convert for reducing the white 
+         ;space around the plot
+         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+                png_output(i) + " " + png_output(i)
+         system(cmd)
+       end do
+     end if
+
+     print(" ")
+     print("Output to: "+ png_output)
+     print(" ")
+   else
+     print(" ")
+     print("Output to: " + file_out +"."+ format_out)
+     print(" ")
+   end if
+
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/spectra.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/spectra.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/spectra.ncl	(revision 3477)
@@ -0,0 +1,822 @@
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+
+;***************************************************
+; Checking the kind of the script
+;***************************************************
+
+function which_script()
+local script 
+begin 
+   script = "spectra"
+   return(script)
+end
+
+;***************************************************
+; Retrieving the NCL version used
+;***************************************************
+   
+ncl_version_ch = systemfunc("ncl -V") 
+ncl_version    = stringtofloat(ncl_version_ch)
+
+;***************************************************
+; Function for checking file existence in dependence
+; on NCL version
+;***************************************************
+
+function file_exists(version:string,file_name:string)
+begin
+   if( version .GE. "6.2.1" ) then
+      existing = fileexists(file_name)
+   else
+      existing = isfilepresent(file_name)
+   end if
+   return(existing)
+end
+  
+;***************************************************
+; load .ncl.config or .ncl.config.default
+;***************************************************
+
+existing_file = file_exists(ncl_version_ch,file_config)
+if (existing_file) then
+   loadscript(file_config)
+else
+   palm_bin_path = getenv("PALM_BIN")
+   print(" ")
+   print("Neither the personal configuration file '.ncl.config' exists in")
+   print("~/palm/current_version")
+   print("nor the default configuration file '.ncl.config.default' "+\
+         "exists in")
+   print(palm_bin_path + "/NCL")
+   print(" ")
+   exit
+end if
+
+
+begin
+
+   ;***************************************************
+   ; Retrieving the double quote character
+   ;***************************************************
+   
+   dq=str_get_dq()
+
+   ;***************************************************
+   ; set up default parameter values and strings
+   ;***************************************************
+  
+   if (file_1 .EQ. "File in") then
+      print(" ")
+      print("Declare input file 'file_1=' in '.ncl.config' or prompt")
+      print(" ")
+      exit 
+   else
+      file_in = file_1   
+   end if
+
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
+       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+       format_out .NE. "png")then
+      print(" ")
+      print("'format_out = "+format_out+"' is invalid and set to'x11'")
+      print(" ")
+      format_out="x11"
+   end if 
+
+   if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then
+      print(" ")
+      print("Output of png files not available")
+      print("png output is avaiable with NCL version 5.2.0 and higher ")
+      print("NCL version used: " + ncl_version_ch)
+      print(" ")
+      exit
+   end if
+   
+   if (log_x .NE. 0 .AND. log_x .NE. 1)then
+      print(" ")
+      print("'log_x'= "+log_x+" is invalid and set to 1")
+      print(" ")
+      log_x = 1
+   end if  
+   
+   if (log_y .NE. 0 .AND. log_y .NE. 1)then
+      print(" ")
+      print("'log_y'= "+log_y+" is invalid and set to 1")
+      print(" ")
+      log_y = 1
+   end if    
+  
+   if (norm_y .EQ. 0.) then 
+      print(" ")
+      print("Normalising with 0 is not allowed, 'norm_y' is set to 1.0")
+      print(" ")
+      norm_y = 1.0
+   end if
+   if (norm_x .EQ. 0.) then 
+      print(" ")
+      print("Normalising with 0 is not allowed, 'norm_x' is set to 1.0")
+      print(" ")
+      norm_x= 1.0
+   end if
+   
+   if (sort .NE. "height" .AND. sort .NE. "time") then  
+      print(" ")
+      print("'sort'= "+sort+" is invalid and set to 'height'")
+      print(" ")
+      sort = "height"  
+   end if
+   
+   if (black .NE. 0 .AND. black .NE. 1)then
+      print(" ")
+      print("'black'= "+black+" is invalid and set to 0")
+      print(" ")
+      black = 0
+   end if
+ 
+   if (dash .NE. 0 .AND. dash .NE. 1)then
+      print(" ")
+      print("'dash'= "+dash+" is invalid and set to 0")
+      print(" ")
+      dash = 0
+   end if
+
+   ;***************************************************
+   ; open input file
+   ;***************************************************
+   
+   file_in_1 = False
+   if (isStrSubset(file_in, ".nc"))then
+      start_f = -2
+      end_f = -2 
+      file_in_1 = True     
+   end if
+
+   if (start_f .EQ. -1)then
+      print(" ")
+      print("'start_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
+      print(" ")  
+      exit
+   end if 
+   if (end_f .EQ. -1)then
+      print(" ")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
+      print(" ")  
+      exit
+   end if 
+
+   files=new(end_f-start_f+1,string)
+   
+   if (file_in_1)then
+      if (isfilepresent(file_in))then
+         files(0)=file_in
+      else
+         print(" ")
+         print("1st input file: '"+file_in+"' does not exist")
+         print(" ")
+         exit
+      end if
+   else   
+      if (start_f .EQ. 0)then
+         if (isfilepresent(file_in+".nc"))then
+            files(0)=file_in+".nc"
+            do i=1,end_f
+	       if (isfilepresent(file_in+"."+i+".nc"))then    
+                  files(i)=file_in+"."+i+".nc"
+	       else
+	          print(" ")
+                  print("Input file: '"+file_in+"."+i+".nc' does not exist")
+                  print(" ")
+                  exit  
+	       end if	    
+            end do         
+         else
+            print(" ")
+            print("Input file: '"+file_in+".nc' does not exist")
+            print(" ")
+            exit
+         end if
+      else
+         do i=start_f,end_f
+            if (isfilepresent(file_in+"."+i+".nc"))then    
+               files(i-start_f)=file_in+"."+i+".nc"
+	    else
+	       print(" ")
+               print("Input file: '"+file_in+"."+i+".nc' does not exist")
+               print(" ")
+               exit  
+	    end if
+         end do
+      end if
+   end if
+
+   f=addfiles(files,"r")
+   f_att=addfile(files(0),"r")
+   ListSetType(f,"cat")
+   
+   vNam = getfilevarnames(f_att) 
+   if( ncl_version .GE. 6.1 ) then
+      vNam = vNam(::-1)
+   end if
+   vType = getfilevartypes(f_att,vNam) 
+
+   if ((all(vType .eq. "double"))) then ;distinction if data is double or float
+      check_vType = True
+   else
+      check_vType = False
+   end if 
+
+   print(" ")
+   print("Variables in input file:")
+   print("- "+ vNam)
+   print(" ")
+   dim = dimsizes(vNam)
+   vDim = getfiledimsizes(f_att) 
+ 
+   t_all = f[:]->time
+   nt    = dimsizes(t_all)
+
+   if (nt .EQ. 1)then
+      delta_t=t_all(nt-1)/nt
+   else
+      delta_t_array = new(nt-1,double)
+
+      do i=0,nt-2
+         delta_t_array(i) = t_all(i+1)-t_all(i)
+      end do
+
+      delta_t = min(delta_t_array)
+      delete(delta_t_array)
+   end if
+   
+   k_x=f_att->k_x
+   dimx=dimsizes(k_x)
+   k_y=f_att->k_y
+   dimy=dimsizes(k_y)
+   
+   
+   dim_level=dimsizes(height_level)
+
+   do i=0,dim-1
+      if (vNam(i) .EQ. "zu_sp")then
+         zu=f_att->zu_sp	 
+	 if (height_level(0) .EQ. -1)then
+	    dimz=dimsizes(zu)
+	 else
+	    if (dim_level .GT. dimsizes(zu))then
+               print(" ")
+               print("'height_level' has more elements than available "+\
+                     "height levels in input file (= "+dimsizes(zu)+")")
+               print(" ")
+               exit
+	    else
+	       zuh=new(dim_level,double)
+	       do le=0,dim_level-1
+                  if (height_level(le) .GE. dimsizes(zu)) then
+                     no_levels=dimsizes(zu)-1
+                     print(" ")
+                     print("Element "+le+" of 'height_level' is greater "  +\
+                          "than the maximum available index in input file "+\
+                          "which is "+no_levels+". Note that the first "   +\
+                          "element has the index 0.")
+                     print(" ")
+                     exit
+                  end if
+	          zuh(le)=zu(height_level(le))
+	       end do
+	       dimz=dim_level
+            end if   
+	 end if	 
+      else 
+         if (vNam(i) .EQ. "zw_sp")then
+	    zw=f_att->zw_sp
+	    if (height_level(0) .EQ. -1)then              
+               dimz=dimsizes(zw)
+	    else
+	       if (dim_level .GT. dimsizes(zw))then
+                  print(" ")
+                  print("'height_level' has more elements than available "+\
+                        "height levels in input file (= "+dimsizes(zw)+")")
+                  print(" ")
+                  exit
+	       else
+	          zwh=new(dim_level,double)
+	          do le=0,dim_level-1
+                     if (height_level(le) .GE. dimsizes(zw)) then
+                        no_levels=dimsizes(zw)-1
+                        print(" ")
+                        print("Element "+le+" of 'height_level' is greater "+\
+                              "than the maximum available index in input "  +\
+                              "file which is "+no_levels+". Note that the " +\
+                              "first element has the index 0.")
+                        print(" ")
+                        exit
+                     end if
+	             zwh(le)=zw(height_level(le))
+	          end do
+	          dimz=dim_level
+               end if   
+	    end if
+         end if
+      end if
+   end do
+
+   ;****************************************************	
+   ; start of time step and different types of mistakes that could be done
+   ;****************************************************
+   
+   if (start_time_step .EQ. -1.d) then   	
+      start_time_step=t_all(0)/3600
+   else
+      if (start_time_step .GT. t_all(nt-1)/3600)then
+         print(" ")
+         print("'start_time_step' = "+ start_time_step +"h is greater than "+\
+               "last time step = "+ t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print(" ")
+         print("Select another 'start_time_step'")
+         print(" ")
+         exit
+      end if
+      if (start_time_step .LT. t_all(0)/3600)then
+         print(" ")
+         print("'start_time_step' = "+ start_time_step +"h is lower than "+\
+               "first time step = "+ t_all(0)+"s = "+t_all(0)/3600+"h")        
+         exit
+      end if
+   end if
+
+   do i=0,nt-1     
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+         st=i
+         break
+      else
+         st=0
+      end if
+   end do
+   
+   ;****************************************************
+   ; end of time step and different types of mistakes that could be done
+   ;****************************************************
+
+   if (end_time_step .EQ. -1.d) then     	
+      end_time_step = t_all(nt-1)/3600
+   else
+      if (end_time_step .GT. t_all(nt-1)/3600)then
+         print(" ")
+         print("'end_time_step' = "+ end_time_step +"h is greater than "+\
+               "last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print(" ")
+         print("Select another 'end_time_step'")  
+         print(" ")
+         exit
+      end if
+      if (end_time_step .LT. start_time_step/3600)then
+         print(" ")
+         print("'end_time_step' = "+ end_time_step +"h is lower than "+\
+               "'start_time_step' = "+start_time_step+"h")
+         print(" ")
+         print("Select another 'start_time_step' or 'end_time_step'")
+         print(" ")
+         exit
+      end if
+   end if
+
+   do i=0,nt-1     
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+         et=i
+         break
+       else
+         et=0
+      end if
+   end do 
+
+   delete(start_time_step)
+   start_time_step=round(st,3)
+   delete(end_time_step)
+   end_time_step=round(et,3)
+
+   print(" ")
+   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
+         t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(end_time_step)/3600+" h = "+\
+         t_all(end_time_step)+" s => index = "+end_time_step)
+   print(" ")
+
+   dimt = end_time_step-start_time_step+1
+ 
+   ;***************************************************
+   ; set up recourses
+   ;***************************************************
+     
+   res = True
+   res@gsnDraw                 = False
+   res@gsnFrame                = False
+   res@txFont                  = "helvetica"
+   res@tiMainFont              = "helvetica"
+   res@tiXAxisFont             = "helvetica"
+   res@tiYAxisFont             = "helvetica"
+   res@tmXBLabelFont           = "helvetica"
+   res@tmYLLabelFont           = "helvetica"
+   res@lgLabelFont             = "helvetica"
+   res@tmLabelAutoStride       = True
+   
+   res@lgLabelFontHeightF     = font_size_legend 
+   res@lgTitleFontHeightF     = font_size
+   res@txFontHeightF      = font_size
+   res@tiXAxisFontHeightF = font_size
+   res@tiYAxisFontHeightF = font_size
+   res@tmXBLabelFontHeightF = font_size
+   res@tmYLLabelFontHeightF = font_size
+   
+   res@tmXBMinorPerMajor = 4
+   res@tmYLMinorPerMajor = 4
+   
+   if (log_x .EQ. 1) then
+      res@trXLog = True 
+   else
+      res@trXLog = False 
+   end if
+   if (log_y .EQ. 1)then
+      res@trYLog = True 
+   else  
+      res@trYLog = False
+   end if
+
+   legend_label=new(dimt,string)
+   legend_label_zu=new(dimz,double)
+   legend_label_zw=new(dimz,double)
+   legend_label_z=new(dimz,double)
+   do p=start_time_step,end_time_step
+      legend_label(p-start_time_step)=sprintf("%6.2f", t_all(p)/3600)
+   end do  
+   if (sort .EQ. "time")
+      plot  = new(dim*dimz,graphic)
+      np=dimt
+      res@lgTitleString = "Time (h)"
+   else
+      plot  = new(dim*dimt,graphic)
+      np=dimz
+      
+      do p=0,dimz-1
+         if (height_level(0) .EQ. -1)then
+            legend_label_zu(p)=round(zu(p),3)
+            legend_label_zw(p)=round(zw(p),3)
+	 else
+	    legend_label_zu(p)=round(zuh(p),3)
+	    legend_label_zw(p)=round(zwh(p),3)
+	 end if
+      end do
+   end if
+
+   if (black .eq. 0 ) then 
+      if (np .EQ. 1)then
+         color = 237
+      else   
+         step=round(235/(np-1),3) 
+         color = ispan(2,237,step)
+      end if
+   else
+      color = 2
+   end if
+   if ( dash .eq. 0 ) then
+      res@xyMonoDashPattern = True 
+   end if
+
+   if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then
+      format_out@wkPaperSize = "A4"
+   end if
+   if ( format_out .EQ. "png" ) then
+      format_out@wkWidth  = 1000
+      format_out@wkHeight = 1000
+   end if
+
+   wks=gsn_open_wks(format_out,file_out)
+   gsn_define_colormap(wks,"rainbow+white") 
+
+   n=0
+   do varn =dim-1,0,1 
+      
+      check = True
+
+      if ( isStrSubset( vNam(varn), "time") .OR.  \
+           isStrSubset( vNam(varn), "zu_sp") .OR. \
+           isStrSubset( vNam(varn), "zw_sp") .OR. \
+           isStrSubset( vNam(varn), "k_x") .OR.   \
+           isStrSubset( vNam(varn), "k_y")) then
+            check = False
+      end if
+
+      if (var .NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," )
+      end if
+
+      if(check) then 
+
+         temp = f[:]->$vNam(varn)$
+	 data = temp(start_time_step:end_time_step,0:dimz-1,:) 
+
+         temp_att = f_att->$vNam(varn)$
+         a=getvardims(temp_att)
+         b=dimsizes(a)
+         delete(temp_att)
+
+         if (height_level(0) .NE. -1)then
+	    do te=0,dimz-1
+	       data(:,te,:) = temp(start_time_step:end_time_step,\
+                                                    height_level(te),:)	       
+	    end do
+	 end if
+
+         data=data/(norm_y*norm_x) 
+            
+         do i=0,b-1            
+            if (isStrSubset( a(i),"zu_sp" ))then
+               legend_label_z=legend_label_zu
+	       if (height_level(0) .NE. -1)then
+	          z=zuh
+	       else
+	          z=zu
+	       end if
+            else
+               if (isStrSubset( a(i),"zw_sp" ))then
+                  legend_label_z=legend_label_zw 
+		  if (height_level(0) .NE. -1)then
+	             z=zwh
+	          else
+	             z=zw
+	          end if   
+               end if
+            end if
+         end do  
+	 
+         if (check_vType) then
+            min_y=new(dimz,double)
+	    max_y=new(dimz,double)
+         else
+            min_y=new(dimz,float)
+	    max_y=new(dimz,float)
+         end if 
+         min_x=new(dimz,double)
+	 max_x=new(dimz,double)
+	 
+	 plot_h  = new(dimz,graphic)
+	 
+         if (isStrSubset(vNam(varn),"x"))then
+	    x_axis = new((/dimz,dimx/),double)
+	    do q=0,dimz-1
+               x_axis(q,:) = f_att->k_x
+	       x_axis = x_axis/norm_x
+	    end do
+	    if (norm_x .NE. 1.)then
+               res@tiXAxisString = "k~B~x~N~ ("+unit_x+")"
+	    else
+	       if (norm_height .EQ. 1)then
+	          res@tiXAxisString = "k~B~x~N~ x z (1)"
+	       else
+	          res@tiXAxisString = "k~B~x~N~ (1/m)"
+	       end if
+	    end if
+	    dim_r=dimx
+         else
+	    x_axis=new((/dimz,dimy/),double)
+	    do q=0,dimz-1
+               x_axis(q,:) = f_att->k_y 
+	       x_axis = x_axis/norm_x
+	    end do
+	    if (norm_x .NE. 1.)then
+               res@tiXAxisString = "k~B~y~N~ ("+unit_x+")"
+	    else
+	       if (norm_height .EQ. 1)then
+	          res@tiXAxisString = "k~B~y~N~ x z (1)"
+	       else
+	          res@tiXAxisString = "k~B~y~N~ (1/m)"
+	       end if 
+	    end if
+	    dim_r=dimy
+         end if
+        
+         if (sort .EQ. "time")
+	    res@xyLineColors = color
+	    res@pmLegendDisplayMode     = "Always"
+            res@pmLegendSide            = "Top"
+            res@pmLegendParallelPosF    = 1.2
+            res@pmLegendOrthogonalPosF  = -1.0
+            res@pmLegendWidthF          = 0.12
+            res@pmLegendHeightF         = 0.04*\
+                                          (end_time_step-start_time_step+1)
+            do p=dimz-1,0,1
+	       if (log_y .EQ. 1)then  
+                  do q=0,dimt-1
+                     do r=0,dim_r-1 
+                        if (data(q,p,r) .EQ. 0)then
+                           st=p+start_time_step
+                           print(" ")
+                           print("'"+vNam(varn)+"("+st+","+q+","+r+")' is "+\
+                                 "equal 0. Logarithmic scale for y-axis "+\
+                                 "and height "+z(p)+" cannot be used")
+                           print(" ")
+                           res@trYLog = False
+                        end if
+                     end do
+                  end do
+	       end if
+               res@gsnLeftString      = vNam(varn)
+               res@gsnRightString     = "Height = "+z(p)+"m"               
+               res@tiYAxisString      = "("+unit_y+")"           
+               res@xyExplicitLegendLabels  = legend_label	       
+	       if (norm_height .EQ. 1)then
+	          data(:,p,:)=data(:,p,:)*doubletofloat(z(p))
+		  x_axis(p,:) = x_axis(p,:)*z(p)
+	       end if
+	       res@trXMinF = min(x_axis(p,:))
+               res@trXMaxF = max(x_axis(p,:))
+               plot(n)  = gsn_csm_xy(wks,x_axis(p,:),data(:,p,:),res)
+               n=n+1
+            end do
+         else
+            if (sort .EQ. "height")
+               do p=0,dimt-1 	       
+                  do q=0,dimz-1
+                     do r=0,dim_r-1 
+                        if (data(p,q,r) .EQ. 0)then
+                           st=p+start_time_step
+                           print(" ")
+                           print("'"+vNam(varn)+"("+st+","+q+","+r+")' "+\
+                                 "is equal 0. Logarithmic scale for y-axis "+\
+                                 "and time "+legend_label(p)+" h cannot be used")
+                           print(" ")
+                           res@trYLog = False
+                        end if
+                     end do
+		     if (norm_height .EQ. 1 .AND. p .EQ. 0)then
+		        data(p,q,:) = data(p,q,:)*\
+                                           doubletofloat(legend_label_z(q))
+			x_axis(q,:) = x_axis(q,:)*\
+                                           doubletofloat(legend_label_z(q))
+		     end if
+	             max_y(q)=max(data(p,q,:))
+		     min_y(q)=min(data(p,q,:))
+		     min_x(q)=min(x_axis(q,:))
+		     max_x(q)=max(x_axis(q,:))
+                  end do 
+		  do q=0,dimz-1
+		     res@xyLineColor = color(q)
+		     if (dash .EQ. 1)then
+		        res@xyDashPattern = q
+	             end if
+		     if (q .EQ. 0)then
+		        res@tiYAxisString      = "("+unit_y+")"
+		        res@gsnLeftString      = vNam(varn)
+                        res@gsnRightString     = "Time = "+legend_label(p)+"h"
+		        res@trXMinF = min(min_x)
+                        res@trXMaxF = max(max_x)
+                        res@trYMinF = min(min_y)
+                        res@trYMaxF = max(max_y*10)
+			
+			plot_h(q)  = gsn_csm_xy(wks,x_axis(q,:),\
+                                                         data(p,q,:),res)
+			
+			lgres = True
+			if (dash .EQ. 0)then
+                           lgres@lgMonoDashIndex = True
+			else
+                           lgres@lgDashIndexes   = ispan(0,dimz-1,1)
+			end if
+			if (black .EQ. 1)then
+			   lgres@lgMonoLineColors = True
+			else
+			   lgres@lgLineColors = color
+			end if
+			lgres@lgTitleString      = "Height (m)"  
+                        lgres@lgLabelFont        = "helvetica"
+			lgres@lgLabelFontHeightF = font_size_legend*6 
+                        lgres@lgTitleFontHeightF = font_size      
+                        lgres@vpWidthF           = 0.12           
+                        lgres@vpHeightF          = font_size_legend*(dimz+3)
+  
+                        lbid = gsn_create_legend(wks,dimz,legend_label_z,lgres)
+
+                        amres = True
+                        amres@amParallelPosF   = 0.75		    
+                        amres@amOrthogonalPosF = 0.15            
+                        annoid1 = gsn_add_annotation(plot_h(q),lbid,amres)
+		     else
+		        plot_h(q)  = gsn_csm_xy(wks,x_axis(q,:),\
+                                                        data(p,q,:),res) 
+			overlay(plot_h(0),plot_h(q))
+		     end if
+		  end do              
+		  plot(n)=plot_h(0)
+		  n=n+1
+               end do
+            end if
+	 end if
+         delete(data)
+	 delete(temp)
+         delete(x_axis)
+	 delete(min_x)
+	 delete(max_x)
+	 delete(min_y)
+	 delete(max_y)
+	 delete(plot_h)
+      end if
+   end do
+
+   if (n .EQ. 0) then
+      print(" ")
+      print("The variables 'var="+var+"' do not exist on your input file;")
+      print("be sure to have one comma berfore and after each variable")
+      print(" ")
+      exit
+   end if
+  
+   ; ***************************************************
+   ; merge plots onto one page 
+   ; ***************************************************
+
+   resP                            = True
+   resP@gsnMaximize                = True 
+   resP@gsnPanelXWhiteSpacePercent = 4.0
+   resP@gsnPanelYWhiteSpacePercent = 4.0
+   resP@txFont                     = "helvetica"
+   resP@txString                   = f_att@title
+   resP@txFuncCode                 = "~"
+   resP@txFontHeightF              = 0.0105
+
+   no_frames = 0
+
+   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+                                          n .gt. no_rows*no_columns) then
+      gsn_panel(wks,plot,(/n,1/),resP)
+      print(" ")
+      print("Outputs to .eps or .epsi have only one frame")
+      print(" ")
+   else    
+      do i = 0,n-1, no_rows*no_columns
+         if( (i+no_rows*no_columns) .gt. (n-1)) then
+            gsn_panel(wks,plot(i:n-1),(/no_rows,no_columns/),resP)
+            no_frames = no_frames + 1
+         else
+            gsn_panel(wks,plot(i:i+no_rows*no_columns-1),\
+                                           (/no_rows,no_columns/),resP)
+            no_frames = no_frames + 1   
+         end if
+      end do
+   end if
+
+   if (format_out .EQ. "png" ) then
+     png_output = new((/no_frames/), string)
+     j = 0
+
+     if (no_frames .eq. 1) then
+        if (ncl_version .GE. 6 ) then
+           png_output(0) = file_out+".png"
+        else
+           png_output(0) = file_out+".00000"+1+".png"
+        end if
+        ;using imagemagick's convert for reducing the white 
+        ;space around the plot
+        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+              png_output(0) + " " + png_output(0)
+       system(cmd)
+     else
+
+       do i=0, no_frames-1
+         j = i + 1
+         if (j .LE. 9) then
+           png_output(i) = file_out+".00000"+j+".png"
+         end if
+         if (j .GT. 9 .AND. j .LE. 99) then
+           png_output(i) = file_out+".0000"+j+".png"
+         end if
+         if (j .GT. 99 .AND. j .LE. 999) then
+           png_output(i) = file_out+".000"+j+".png"
+         end if
+         if (j .GT. 999) then
+           png_output(i) = file_out+".00"+j+".png"
+         end if
+
+         ;using imagemagick's convert for reducing the white 
+         ;space around the plot
+         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+                png_output(i) + " " + png_output(i)
+         system(cmd)
+       end do
+     end if
+
+     print(" ")
+     print("Output to: "+ png_output)
+     print(" ")
+   else
+     print(" ")
+     print("Output to: " + file_out +"."+ format_out)
+     print(" ")
+   end if
+   
+end
Index: /palm/tags/release-6.0/SCRIPTS/NCL/timeseries.ncl
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/NCL/timeseries.ncl	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/NCL/timeseries.ncl	(revision 3477)
@@ -0,0 +1,1410 @@
+load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+;***************************************************
+; Checking the kind of the script
+;***************************************************
+
+function which_script()
+local script 
+begin 
+   script = "timeseries"
+   return(script)
+end
+
+;***************************************************
+; Retrieving the NCL version used
+;***************************************************
+   
+ncl_version_ch = systemfunc("ncl -V") 
+ncl_version    = stringtofloat(ncl_version_ch)
+
+;***************************************************
+; Function for checking file existence in dependence
+; on NCL version
+;***************************************************
+
+function file_exists(version:string,file_name:string)
+begin
+   if( version .GE. "6.2.1" ) then
+      existing = fileexists(file_name)
+   else
+      existing = isfilepresent(file_name)
+   end if
+   return(existing)
+end
+  
+;***************************************************
+; load .ncl.config or .ncl.config.default
+;***************************************************
+
+existing_file = file_exists(ncl_version_ch,file_config)
+if (existing_file) then
+   loadscript(file_config)
+else
+   palm_bin_path = getenv("PALM_BIN")
+   print(" ")
+   print("Neither the personal configuration file '.ncl.config' exists in")
+   print("~/palm/current_version")
+   print("nor the default configuration file '.ncl.config.default' "+\
+         "exists in")
+   print(palm_bin_path + "/NCL")
+   print(" ")
+   exit
+end if
+
+
+begin
+
+   ;***************************************************
+   ; Retrieving the double quote character
+   ;***************************************************
+   
+   dq=str_get_dq()
+
+   ;***************************************************
+   ; set up default parameter values and strings
+   ;***************************************************
+   
+   if (file_1 .EQ. "File in") then
+      print(" ")
+      print("Declare input file 'file_1=' in '.ncl.config' or prompt")
+      print(" ")
+      exit 
+   else
+      file_in = file_1   
+   end if
+
+   if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND.   \
+       format_out .NE. "eps" .AND. format_out .NE. "ps" .AND.    \
+       format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \
+       format_out .NE. "png")then
+      print(" ")
+      print("'format_out = "+format_out+"' is invalid and set to'x11'")
+      print(" ")
+      format_out="x11"
+   end if  
+
+   if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then
+      print(" ")
+      print("Output of png files not available")
+      print("png output is avaiable with NCL version 5.2.0 and higher ")
+      print("NCL version used: " + ncl_version_ch)
+      print(" ")
+      exit
+   end if
+
+   if (over .NE. 0 .AND. over .NE. 1) then
+      print(" ")
+      print("'over'= "+over+" is invalid and set to 0")
+      print(" ")
+      over = 0
+   end if  
+   
+   if (norm_t .EQ. 0) then 
+      print(" ")
+      print("Normalising with 0 is not allowed, 'norm_t' is set to 1.0")
+      print(" ")
+      norm_t = 1.0
+   end if 
+ 
+
+   ;***************************************************
+   ; open input file
+   ;***************************************************
+   
+   file_in_1 = False
+   if (isStrSubset(file_in, ".nc"))then
+      start_f = -2
+      end_f = -2 
+      file_in_1 = True     
+   end if
+
+   if (start_f .EQ. -1)then
+      print(" ")
+      print("'start_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
+      print(" ")  
+      exit
+   end if 
+   if (end_f .EQ. -1)then
+      print(" ")
+      print("'end_f' must be one of the cyclic numbers (at least 0) of "+\
+            "your input file(s)")
+      print(" ")  
+      exit
+   end if 
+
+   files=new(end_f-start_f+1,string)
+
+   if (file_in_1)then
+      if (isfilepresent(file_in))then
+         files(0)=file_in
+      else
+         print(" ")
+         print("1st input file: '"+file_in+"' does not exist")
+         print(" ")
+         exit
+      end if
+   else   
+      if (start_f .EQ. 0)then
+         if (isfilepresent(file_in+".nc"))then
+            files(0)=file_in+".nc"
+            do i=1,end_f
+	       if (isfilepresent(file_in+"."+i+".nc"))then    
+                  files(i)=file_in+"."+i+".nc"
+	       else
+	          print(" ")
+                  print("Input file: '"+file_in+"."+i+".nc' does not exist")
+                  print(" ")
+                  exit  
+	       end if	    
+            end do         
+         else
+            print(" ")
+            print("Input file: '"+file_in+".nc' does not exist")
+            print(" ")
+            exit
+         end if
+      else
+         do i=start_f,end_f
+            if (isfilepresent(file_in+"."+i+".nc"))then    
+               files(i-start_f)=file_in+"."+i+".nc"
+	    else
+	       print(" ")
+               print("Input file: '"+file_in+"."+i+".nc' does not exist")
+               print(" ")
+               exit  
+	    end if
+         end do
+      end if
+   end if
+
+   f=addfiles(files,"r")
+   f_att=addfile(files(0),"r")
+   ListSetType(f,"cat")
+
+   vNam  =getfilevarnames(f_att)
+   if( ncl_version .GE. 6.1 ) then
+       vNam = vNam(::-1)
+   end if
+   vType = getfilevartypes(f_att,vNam) 
+   vNam_static = vNam
+
+   if ((all(vType .eq. "double"))) then ;distinction if data is double or float
+      check_vType = True
+   else
+      check_vType = False
+   end if
+
+   print(" ")
+   print("Variables in input file:")
+   print("- "+ vNam)
+   print(" ")
+   dim = dimsizes(vNam)
+   if (dim .EQ. 0) then
+      print(" ")
+      print("There is no data on file")
+      print(" ")
+   end if
+
+   t_all   = f[:]->time
+   nt      = dimsizes(t_all)
+
+   if (nt .EQ. 1)then
+      delta_t=t_all(nt-1)/nt
+   else
+      delta_t_array = new(nt-1,double)
+
+      do i=0,nt-2
+         delta_t_array(i) = t_all(i+1)-t_all(i)
+      end do
+
+      delta_t = min(delta_t_array)
+      delete(delta_t_array)
+   end if
+
+   if (nt .LE. 1) then
+      print(" ")
+      print("Input file contains only one time step -> " +\
+            "plot of timeseries is not possible ")
+      print(" ")
+      exit
+   end if
+
+   ;****************************************************	
+   ; start of time step and different types of mistakes that could be done
+   ;****************************************************
+
+   if (start_time_step .EQ. -1.) then   	
+      start_time_step=t_all(0)/3600      
+   else 
+      if (start_time_step .GE. t_all(nt-1)/3600)
+         print(" ")
+         print("'start_time_step' = "+ start_time_step +\
+               "h is equal or greater than last time step = " + \
+               t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h")
+         print(" ")
+         print("Select another 'start_time_step'")
+         print(" ")
+         exit
+      end if
+      if (start_time_step .LT. t_all(0)/3600)
+         print(" ")
+         print("'start_time_step' = "+ start_time_step +\
+               "h is lower than first time step = " + t_all(0)+"s = "+\
+               t_all(0)/3600+"h")
+         print(" ")
+         print("Select another 'start_time_step'")
+         print(" ")
+         exit
+      end if
+   end if
+   do i=0,nt-2     
+      if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          start_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+         st=i
+         break
+       else
+         st=0
+      end if
+   end do
+   if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. \
+       start_time_step .LT. t_all(nt-1)) then
+      st=nt-2   
+    else
+      st=0
+   end if
+      
+   ;****************************************************
+   ; end of time step and different types of mistakes that could be done
+   ;****************************************************
+
+   if (end_time_step .EQ. -1.) then     	
+      end_time_step = t_all(nt-1)/3600  
+   else
+      if (end_time_step .LE. t_all(0)/3600)
+         print(" ")
+         print("'end_time_step' = "+end_time_step+ \
+              "h is lower or equal than first time step = " + \
+               t_all(0)+"s = "+t_all(0)/3600+"h")
+         print(" ")
+         print("Select another 'end_time_step'")
+         print(" ")
+         exit
+      end if
+      if (end_time_step .GT. t_all(nt-1)/3600)
+         print(" ")
+         print("'end_time_step' = "+ end_time_step +\
+               "h is greater than last time step = " + t_all(nt-1)+"s = "+\
+               t_all(nt-1)/3600+"h")
+         print(" ")
+         print("Select another 'end_time_step'")  
+         print(" ")
+         exit
+      end if
+      if (end_time_step .LE. start_time_step/3600)
+         print(" ")
+         print("'end_time_step' = "+ end_time_step +\
+               "h is equal or lower than 'start_time_step' = "+\
+               start_time_step+"h")
+         print(" ")
+         print("Select another 'start_time_step' or 'end_time_step'")
+         print(" ")
+         exit
+      end if
+   end if
+   do i=0,nt-1     
+      if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \
+          end_time_step .LT. (t_all(i)+delta_t/2)/3600)then
+         et=i
+         break
+       else
+         et=0
+      end if
+   end do 
+ 
+   delete(start_time_step)
+   start_time_step=round(st,3)
+   delete(end_time_step)
+   end_time_step=round(et,3)
+
+   print(" ")
+   print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\
+         t_all(start_time_step)+" s => index = "+start_time_step)
+   print("                     till "+t_all(end_time_step)/3600+" h = "+\
+         t_all(end_time_step)+" s => index = "+end_time_step)
+   print(" ")
+
+   t = t_all(start_time_step:end_time_step)/norm_t
+  
+   ; ***************************************************
+   ; set up recourses
+   ; ***************************************************
+
+   res                         = True
+   res@gsnDraw                 = False
+   res@gsnFrame                = False
+   res@tmXBMode                = True
+   res@tmYLMode                = True
+   res@txFont                  = "helvetica"
+   res@tiMainFont              = "helvetica"
+   res@tiXAxisFont             = "helvetica"
+   res@tiYAxisFont             = "helvetica"
+   res@tmXBLabelFont           = "helvetica"
+   res@tmYLLabelFont           = "helvetica" 
+   res@xyLineColors            = (/237/) 
+   res@trXMaxF                 = t(start_time_step)
+   res@trXMinF                 = t(end_time_step)
+   
+   res@lgLabelFontHeightF     = 0.02
+
+   resP                            = True
+   resP@gsnMaximize                = True
+   resP@gsnPanelXWhiteSpacePercent = 4.0
+   resP@gsnPanelYWhiteSpacePercent = 4.0
+   resP@txFont                     = "helvetica"
+   resP@txString                   = f_att@title+" time series "
+   resP@txFuncCode                 = "~" 
+   if (format_out .NE. "x11") then
+      if (no_rows .GE. 5) then
+         resP@txFontHeightF        = 0.0105
+      else
+         resP@txFontHeightF        = 0.015
+      end if
+   else
+      resP@txFontHeightF           = 0.015
+   end if
+   res@tmXBMinorPerMajor = 4
+   res@tmYLMinorPerMajor = 4
+
+   res@vpWidthF=4
+
+   txres = True
+
+   ; ***************************************************
+   ; read data and create plots
+   ; ***************************************************
+   
+   if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then
+      format_out@wkPaperSize = "A4"
+   end if
+   if ( format_out .EQ. "png" ) then
+      format_out@wkWidth  = 1000
+      format_out@wkHeight = 1000
+   end if
+
+   wks_ps = gsn_open_wks(format_out,file_out)		
+   gsn_define_colormap(wks_ps,"rainbow+white") 
+   plot_ps=new(dim,graphic) 
+                           	 
+   n=0 
+   if (check_vType) then
+      minE  =  100000.d
+      maxE  = -100000.d
+      minus =  100000.d
+      maxus = -100000.d
+      minu  =  100000.d
+      maxu  = -100000.d
+      minz  =  100000.d
+      maxz  = -100000.d
+      minw  =  100000.d
+      maxw  = -100000.d
+      minp  =  100000.d
+      maxp  = -100000.d
+      mins  =  100000.d
+      maxs  = -100000.d
+   else
+      minE  =  100000.
+      maxE  = -100000.
+      minus =  100000.
+      maxus = -100000.
+      minu  =  100000.
+      maxu  = -100000.
+      minz  =  100000.
+      maxz  = -100000.
+      minw  =  100000.
+      maxw  = -100000.
+      minp  =  100000.
+      maxp  = -100000.
+      mins  =  100000.
+      maxs  = -100000.
+   end if
+
+   if (check_vType) then
+      data   = new((/dim,(end_time_step-start_time_step)+1/),double)
+      data_0 = new((end_time_step-start_time_step)+1,double) 
+      mini   = new(dim,double)
+      maxi   = new(dim,double)
+   else
+      data   = new((/dim,(end_time_step-start_time_step)+1/),float) 
+      data_0 = new((end_time_step-start_time_step)+1,float) 
+      mini   = new(dim,float)
+      maxi   = new(dim,float)
+   end if 
+   unit   = new(dim,string)   
+   data_0 = 0.0
+  
+   
+   if (over .EQ. 1) then 
+      plot_E       = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_Es      = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_us      = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_ws      = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_umax    = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_vmax    = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_wmax    = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_z_i_wpt = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_z_i_pt  = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_wpptp0  = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_wpptp   = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_wpt     = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_pt_0_   = gsn_csm_xy(wks_ps,t,data_0(:),res)
+      plot_pt_zp_  = gsn_csm_xy(wks_ps,t,data_0(:),res)
+   end if
+
+
+   if (var .NE. "all") then
+      vNam_temp = new((/dim/),string)
+      comma     = 0
+      var_char  = stringtocharacter(var)
+      no_char   = dimsizes(var_char)
+       
+      do j = 0, no_char-1
+         if(var_char(j) .eq. ",")
+            comma = comma + 1
+         end if
+      end do
+
+      if(comma .eq. 0 .or. comma .eq. 1)
+          print(" ")
+          print("The variables 'var="+var+"'" )
+          print("do not exist on your input file;")
+          print("be sure to have one comma before and after each variable")
+          print(" ")
+          exit
+      end if
+
+      indices = new((/comma/), integer)
+      comma   = 0
+        
+      do j = 0, no_char-1
+         if(var_char(j) .eq. ",")
+           indices(comma) = j
+           comma = comma + 1
+         end if
+      end do
+
+      do j = 0, comma -2
+         vNam_temp(j) = charactertostring(\
+                                   var_char(indices(j)+1:indices(j+1)-1))
+      end do
+     
+      delete(vNam)
+      vNam = new((/comma-1/),string)
+      do varn = 0, comma - 2
+         vNam(varn) = vNam_temp(comma - 2 - varn)
+      end do
+     
+      do j = 0, comma-2
+        count_check = 0
+        do varn = 0, dim-1 
+           if(vNam(j) .ne. vNam_static(varn)) 
+             count_check=count_check+1
+           end if
+        end do    
+
+        if(count_check .eq. dim)
+            print(" ")
+            print("The variables 'var="+var+"'" )
+            print("do not exist on your input file;")
+            print("be sure to have one comma before and after each variable")
+            print(" ")
+            exit
+        end if
+      end do
+
+      dim = comma-1
+    end if
+
+
+   do varn = dim-1, 0, 1 
+
+      if( isStrSubset (vNam(varn), "time") )
+         check = False
+      else
+         check = True
+      end if
+     
+      if(check) then
+
+         data_all = f[:]->$vNam(varn)$ 
+	 data_att = f_att->$vNam(varn)$
+         unit(varn) = data_att@units
+  
+      
+         data(varn,:)=data_all(start_time_step:end_time_step)
+         
+         if (over .EQ. 1) then
+
+            mini(varn) = min(data(varn,:))
+            maxi(varn) = max(data(varn,:))
+           
+            if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. \
+                vNam(varn) .EQ. "E*") then
+               if (mini(varn) .EQ. maxi(varn)) then
+                  if (min(data(varn,:)) .EQ. 0)then
+                     mini(varn)= mini(varn)-0.1
+                     maxi(varn)= maxi(varn)+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     mini(varn)= mini(varn)-1.+(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     mini(varn)= mini(varn)-1.-(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
+                  end if
+               end if
+               minE=min((/minE,mini(varn)/))
+               maxE=max((/maxE,maxi(varn)/))
+            end if
+
+            if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "ws"\
+                .OR. vNam(varn) .EQ. "u*" .OR. vNam(varn) .EQ. "w*") then
+               if (mini(varn) .EQ. maxi(varn)) then
+                  if (min(data(varn,:)) .EQ. 0)then
+                     mini(varn)= mini(varn)-0.1
+                     maxi(varn)= maxi(varn)+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     mini(varn)= mini(varn)-1.+(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     mini(varn)= mini(varn)-1.-(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
+                  end if
+               end if
+               minus=min((/minus,mini(varn)/))
+               maxus=max((/maxus,maxi(varn)/))
+            end if
+
+            if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. \
+                vNam(varn) .EQ. "wmax") then
+               if (mini(varn) .EQ. maxi(varn)) then
+                  if (mini(varn) .EQ. 0)then
+                     mini(varn)= mini(varn)-0.1
+                     maxi(varn)= maxi(varn)+0.1
+                  end if
+                  if (mini(varn) .LT. 0)then
+                     mini(varn)= mini(varn)-1.+(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
+                  end if
+                  if (mini(varn) .GT. 0)then
+                     mini(varn)= mini(varn)-1.-(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
+                  end if
+               end if
+               minu=min((/minu,mini(varn)/))
+               maxu=max((/maxu,maxi(varn)/))
+            end if
+
+            if (vNam(varn) .EQ. "z_i_wpt" .OR. vNam(varn) .EQ. "z_i_pt") then
+               if (mini(varn) .EQ. maxi(varn)) then
+                  if (min(data(varn,:)) .EQ. 0)then
+                     mini(varn)= mini(varn)-0.1
+                     maxi(varn)= maxi(varn)+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     mini(varn)= mini(varn)-1.+(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     mini(varn)= mini(varn)-1.-(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
+                  end if
+               end if
+               minz=min((/minz,mini(varn)/))
+               maxz=max((/maxz,maxi(varn)/))
+            end if
+
+            if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. \
+                vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. \
+                "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then
+               if (mini(varn) .EQ. maxi(varn)) then
+                  if (min(data(varn,:)) .EQ. 0)then
+                     mini(varn)= mini(varn)-0.1
+                     maxi(varn)= maxi(varn)+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     mini(varn)= mini(varn)-1.+(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     mini(varn)= mini(varn)-1.-(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
+                  end if
+               end if
+               minw=min((/minw,mini(varn)/))
+               maxw=max((/maxw,maxi(varn)/))
+            end if
+
+            if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt_zp_"\
+               .OR. vNam(varn) .EQ. "pt(0)" .OR. vNam(varn) .EQ. "pt(zp)") then
+               if (mini(varn) .EQ. maxi(varn)) then
+                  if (min(data(varn,:)) .EQ. 0)then
+                     mini(varn)= mini(varn)-0.1
+                     maxi(varn)= maxi(varn)+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     mini(varn)= mini(varn)-1.+(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.-(maxi(varn))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     mini(varn)= mini(varn)-1.-(mini(varn))/2
+                     maxi(varn)= maxi(varn)+1.+(maxi(varn))/2
+                  end if
+               end if
+               minp=min((/minp,mini(varn)/))
+               maxp=max((/maxp,maxi(varn)/))
+            end if
+            
+         end if
+      end if
+   end do
+ 
+  if (isStrSubset(data@long_name," SR " ))then
+      print(" ")
+      print("If you have outputs of statistic regions you cannot overlay "+\
+            "variables;")
+      print("'over' is set to 0" )
+      print(" ")
+      over = 0
+   end if
+
+   do varn = dim-1, 0, 1 
+      
+      if( isStrSubset (vNam(varn), "time") )
+         check = False
+      else
+         check = True
+      end if     
+    
+      if (var .NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," ) 
+      end if 
+  
+      if(check) then
+       
+        if (over .EQ. 1) then
+ 
+            res@gsnLeftString       = "overlayed plot"
+            res@gsnRightString      = unit(varn)
+	    if (norm_t .NE. 1.)then
+               res@tiXAxisString        = "t ("+unit_t+")"
+	    else
+	       res@tiXAxisString        = "t (s)"
+	    end if
+	    res@tiYAxisString = " "
+            res@tiXAxisFontHeightF   = font_size
+            res@txFontHeightF        = font_size
+            res@tiYAxisFontHeightF   = font_size            
+
+            if (vNam(varn) .EQ. "E")
+               E=0
+               res@xyLineColors     = (/237/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 237
+               res@trYMaxF           = maxE
+               res@trYMinF           = minE
+               plot_E = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if
+            if (vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*")
+               Es=0
+               res@xyLineColors            = (/144/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 144
+               plot_Es = gsn_csm_xy(wks_ps,t,data(varn,:),res) 
+            end if 
+             
+            if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*")
+               us=0
+               res@xyLineColors            = (/237/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 237
+               res@trYMaxF           = maxus
+               res@trYMinF           = minus
+               plot_us = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if             
+            if (vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*")
+               ws=0
+               res@xyLineColors            = (/144/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 144
+               plot_ws = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if
+             
+            if (vNam(varn) .EQ. "umax")
+               u=0
+               res@xyLineColors            = (/237/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 237
+               res@trYMaxF           = maxu
+               res@trYMinF           = minu
+               plot_umax = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if
+            if (vNam(varn) .EQ. "vmax")
+               v=0
+               res@xyLineColors            = (/144/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 144
+               plot_vmax = gsn_csm_xy(wks_ps,t,data(varn,:),res) 
+            end if
+            if (vNam(varn) .EQ. "wmax")
+               w=0
+               res@xyLineColors            = (/80/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 80
+               plot_wmax = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if 
+   
+            if (vNam(varn) .EQ. "z_i_wpt")
+               zw=0
+               res@xyLineColors            = (/237/) 
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 237
+               res@trYMaxF           = maxz
+               res@trYMinF           = minz 
+               plot_z_i_wpt = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if
+            if (vNam(varn) .EQ. "z_i_pt")
+               z=0
+               res@xyLineColors            = (/144/)  
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 144 
+               plot_z_i_pt = gsn_csm_xy(wks_ps,t,data(varn,:),res) 
+            end if
+
+            if (vNam(varn) .EQ. "wpptp0" .OR. \
+                vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" )
+               w0=0
+               res@xyLineColors            = (/237/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 237
+               res@trYMaxF           = maxw
+               res@trYMinF           = minw
+               plot_wpptp0 = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if
+            if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq)
+               wp=0
+               res@xyLineColors            = (/144/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 144
+               plot_wpptp = gsn_csm_xy(wks_ps,t,data(varn,:),res)  
+            end if
+            if (vNam(varn) .EQ. "wpt")
+               wt=0
+               res@xyLineColors            = (/80/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 80
+               plot_wpt = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+            end if
+
+            if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)")
+               p=0
+               res@xyLineColors            = (/237/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 237
+               res@trYMaxF           = maxp
+               res@trYMinF           = minp
+               plot_pt_0_ = gsn_csm_xy(wks_ps,t,data(varn,:),res)  
+            end if
+            if (vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)")
+               pz=0
+               res@xyLineColors            = (/144/)
+               res@xyLineLabelFontHeightF = 0.05 
+               res@xyLineLabelFontColor   = 144
+               plot_pt_zp_ = gsn_csm_xy(wks_ps,t,data(varn,:),res) 
+            end if
+
+         end if
+      end if
+   end do
+
+
+   do varn = dim-1, 0, 1 
+   
+      if( isStrSubset (vNam(varn), "time") )
+         check = False
+      else 
+         check = True
+      end if    
+  
+      if (var.NE. "all") then
+         check = isStrSubset( var,","+vNam(varn)+"," ) 
+      end if 
+    
+      if(check) then
+        
+         if (over .EQ. 1) then       
+   	
+            if (vNam(varn) .EQ. "E" .AND. Es .NE. 1) then 
+               E=1   
+               overlay(plot_E,plot_Es)
+               n=n+1
+               plot_ps(n) = plot_E    
+
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"E","E*"/),lgres)       
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)            
+            end if
+            if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. \
+                E .NE. 1) then
+               Es=1
+               overlay(plot_E,plot_Es)
+               n=n+1
+               plot_ps(n) = plot_E  
+
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"E","E*"/),lgres)       
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)         
+            end if
+
+            if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. \
+                 ws .NE. 1) then
+               us=1
+               overlay(plot_us,plot_ws)
+               n=n+1
+               plot_ps(n) = plot_us
+
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1           
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"u*","w*"/),lgres)       
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+            end if
+            if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. \
+                 us .NE. 1) then
+               ws=1
+               overlay(plot_us,plot_ws)
+               n=n+1
+               plot_ps(n) = plot_us
+
+               ; ***************************************************
+               ; legend for overlaid  plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"u*","w*"/),lgres)       
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+            end if
+         
+            if (vNam(varn) .EQ. "umax" .AND. v .NE. 1)
+               if (w .NE. 1) then 
+                  u=1          
+                  overlay(plot_umax,plot_vmax)
+                  overlay(plot_umax,plot_wmax)
+                
+                  n=n+1
+                  plot_ps(n) = plot_umax
+
+                  ; ***************************************************
+                  ; legend for overlaid plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = .1            
+                  lgres@vpWidthF           = 0.4           
+                  lgres@vpHeightF          = 0.4          
+                  lgres@lgDashIndexes      = (/0,0,0/)
+                  lgres@lgLineColors       = (/237,144,80/)
+                  lbid = gsn_create_legend(\
+                                  wks_ps,3,(/"umax","vmax","wmax"/),lgres)
+
+                  amres = True
+                  amres@amParallelPosF   = 0.6		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+               end if
+            end if
+            if (vNam(varn) .EQ. "vmax" .AND. u .NE. 1)
+               if (w .NE. 1) then
+                  v=1  
+                  overlay(plot_umax,plot_vmax)
+                  overlay(plot_umax,plot_wmax)
+                  n=n+1
+                  plot_ps(n) = plot_umax
+
+                  ; ***************************************************
+                  ; legend for overlaid plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = .1          
+                  lgres@vpWidthF           = 0.4           
+                  lgres@vpHeightF          = 0.4          
+                  lgres@lgDashIndexes      = (/0,0,0/)
+                  lgres@lgLineColors       = (/237,144,80/)
+                  lbid = gsn_create_legend(\
+                                      wks_ps,3,(/"umax","vmax","wmax"/),lgres)
+                  amres = True
+                  amres@amParallelPosF   = 0.6		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+               end if
+            end if
+            if (vNam(varn) .EQ. "wmax" .AND. v .NE. 1)
+               if(u .NE. 1) then  
+                  w=1        
+                  overlay(plot_umax,plot_vmax)
+                  overlay(plot_umax,plot_wmax)
+                  n=n+1
+                  plot_ps(n) = plot_umax
+
+                  ; ***************************************************
+                  ; legend for overlaid plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = .1            
+                  lgres@vpWidthF           = 0.4           
+                  lgres@vpHeightF          = 0.4          
+                  lgres@lgDashIndexes      = (/0,0,0/)
+                  lgres@lgLineColors       = (/237,144,80/)
+                  lbid = gsn_create_legend(\
+                                       wks_ps,3,(/"umax","vmax","wmax"/),lgres)
+                  amres = True
+                  amres@amParallelPosF   = 0.6		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+               end if
+            end if
+            
+            if (vNam(varn) .EQ. "z_i_wpt" .AND. z .NE. 1) then
+               zw=1       
+               overlay(plot_z_i_wpt,plot_z_i_pt)
+               n=n+1
+               plot_ps(n) = plot_z_i_wpt 
+       
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres)
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)          
+            end if 
+            if (vNam(varn) .EQ. "z_i_pt" .AND. zw .NE. 1) then
+               z=1      
+               overlay(plot_z_i_wpt,plot_z_i_pt)
+               n=n+1
+               plot_ps(n) = plot_z_i_wpt
+
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)           
+            end if    
+         
+            if ((vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0") .AND. wp .NE. 1)
+               if (wt .NE. 1) then
+                  w0=1
+                  overlay(plot_wpptp0,plot_wpptp)
+                  overlay(plot_wpptp0,plot_wpt) 
+                  n=n+1
+                  plot_ps(n) = plot_wpptp0 
+
+                  ; ***************************************************
+                  ; legend for overlaid plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = .1            
+                  lgres@vpWidthF           = 0.4           
+                  lgres@vpHeightF          = 0.4          
+                  lgres@lgDashIndexes      = (/0,0,0/)
+                  lgres@lgLineColors       = (/237,144,80/)
+                  lbid = gsn_create_legend(\
+                                    wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
+                  amres = True
+                  amres@amParallelPosF   = 0.6		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+               end if            
+            end if
+            if ((vNam(varn) .EQ. "wpptp" .OR. \
+                 vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1)
+               if (wt .NE. 1) then
+                 wp=1
+                 overlay(plot_wpptp0,plot_wpptp)
+                 overlay(plot_wpptp0,plot_wpt) 
+                 n=n+1
+                 plot_ps(n) = plot_wpptp0
+                 
+                 ; ***************************************************
+                  ; legend for overlaid plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = .1            
+                  lgres@vpWidthF           = 0.4           
+                  lgres@vpHeightF          = 0.4          
+                  lgres@lgDashIndexes      = (/0,0,0/)
+                  lgres@lgLineColors       = (/237,144,80/)
+                  lbid = gsn_create_legend(\
+                                     wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
+
+                  amres = True
+                  amres@amParallelPosF   = 0.6		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)  
+               end if           
+            end if
+            if (vNam(varn) .EQ. "wpt" .AND. wp .NE. 1)
+               if (w0 .NE. 1) then
+                  wt=1
+                  overlay(plot_wpptp0,plot_wpptp)
+                  overlay(plot_wpptp0,plot_wpt) 
+                  n=n+1
+                  plot_ps(n) = plot_wpptp0
+
+                  ; ***************************************************
+                  ; legend for overlaid plot
+                  ; ***************************************************
+      
+                  lgres                    = True
+                  lgMonoDashIndex          = False
+                  lgres@lgLabelFont        = "helvetica"    
+                  lgres@lgLabelFontHeightF = .1            
+                  lgres@vpWidthF           = 0.4           
+                  lgres@vpHeightF          = 0.4          
+                  lgres@lgDashIndexes      = (/0,0,0/)
+                  lgres@lgLineColors       = (/237,144,80/)
+                  lbid = gsn_create_legend(\
+                                  wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)
+                  amres = True
+                  amres@amParallelPosF   = 0.6		    
+                  amres@amOrthogonalPosF = -0.2            
+                  annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+               end if
+            end if
+
+            if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. \
+                pz .NE. 1) then
+               p=1      
+               overlay(plot_pt_0_,plot_pt_zp_)
+               n=n+1 
+               plot_ps(n) = plot_pt_0_  
+      
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+            end if 
+            if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND.\
+                 p .NE. 1) then
+               pz=1        
+               overlay(plot_pt_0_,plot_pt_zp_)
+               n=n+1 
+               plot_ps(n) = plot_pt_0_   
+
+               ; ***************************************************
+               ; legend for overlaid plot
+               ; ***************************************************
+      
+               lgres                    = True
+               lgMonoDashIndex          = False
+               lgres@lgLabelFont        = "helvetica"    
+               lgres@lgLabelFontHeightF = .1            
+               lgres@vpWidthF           = 0.4           
+               lgres@vpHeightF          = 0.4          
+               lgres@lgDashIndexes      = (/0,0,0/)
+               lgres@lgLineColors       = (/237,144,80/)
+               lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres)
+
+               amres = True
+               amres@amParallelPosF   = 0.6		    
+               amres@amOrthogonalPosF = -0.2            
+               annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+            end if
+
+            if(vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt(zp)" .AND. \
+               vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND.   \
+               vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND.     \
+               vNam(varn) .NE. "w"+dq+"pt"+dq .AND.                          \
+               vNam(varn) .NE. "wpptp0" .AND.                                \
+               vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND.                      \
+               vNam(varn) .NE. "z_i_pt" .AND.                                \
+               vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND.  \
+               vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND.     \
+               vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND.         \
+               vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND.         \
+               vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND.         \
+               vNam(varn) .NE. "E") then
+
+               n=n+1
+               res@xyLineColors   = (/237/)
+               res@xyLabelMode    = False
+               res@gsnLeftString  = vNam(varn)
+               res@gsnRightString = unit(varn) 
+               res@trYMaxF        = max(data(varn,:))
+               res@trYMinF        = min(data(varn,:))
+               if (min(data(varn,:)) .EQ. max(data(varn,:))) then
+                  if (min(data(varn,:)) .EQ. 0)then
+                     res@trYMaxF = max(data(varn,:))-0.1
+                     res@trYMinF = min(data(varn,:))+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     res@trYMaxF = max(data(varn,:))+(min(data(varn,:)))/2
+                     res@trYMinF = min(data(varn,:))-(max(data(varn,:)))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     res@trYMaxF = max(data(varn,:))-(min(data(varn,:)))/2
+                     res@trYMinF = min(data(varn,:))+(max(data(varn,:)))/2
+                  end if
+               end if
+               plot_ps(n) = gsn_csm_xy(wks_ps,t,data(varn,:),res)  
+            end if
+
+            ; ***************************************************
+            ; transparent legend as placeholder for single plots
+            ; ***************************************************
+            lgresmono                    = True
+            lgMonoDashIndex              = False
+            lgresmono@lgMonoLineColor    = True
+            lgresmono@lgLabelFont        = "helvetica"    
+            lgresmono@lgLabelFontHeightF = .1            
+            lgresmono@vpWidthF           = 0.4           
+            lgresmono@vpHeightF          = 0.4          
+            lgresmono@lgLineColor        = 0
+            lgresmono@lgPerimOn          = False
+            lbid = gsn_create_legend(wks_ps,1,(/""/),lgresmono)       
+
+            amres = True
+            amres@amParallelPosF   = 0.6		    
+            amres@amOrthogonalPosF = -0.2            
+            annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres)
+       
+         else
+            
+            print("plot of " + vNam(varn)) 
+            
+            n=n+1
+            res@xyLineColors            = (/237/)
+            res@gsnLeftString       = vNam(varn)
+            res@gsnRightString      = unit(varn)
+        
+	    if (norm_t .NE. 1.)then
+               res@tiXAxisString        = "t ("+unit_t+")"
+	    else
+	       res@tiXAxisString        = "t (s)"
+	    end if
+	    res@tiYAxisString = " "
+            res@tiXAxisFontHeightF   = font_size
+            res@txFontHeightF        = font_size
+            res@tiYAxisFontHeightF   = font_size
+	    res@tmXBLabelFontHeightF = font_size
+            res@tmYLLabelFontHeightF = font_size
+            res@trYMaxF        = max(data(varn,:))
+            res@trYMinF        = min(data(varn,:)) 
+            if (min(data(varn,:)) .EQ. max(data(varn,:))) then
+               if (min(data(varn,:)) .EQ. 0)then
+                     res@trYMaxF = max(data(varn,:))-0.1
+                     res@trYMinF = min(data(varn,:))+0.1
+                  end if
+                  if (min(data(varn,:)) .LT. 0)then
+                     res@trYMaxF = max(data(varn,:))+(min(data(varn,:)))/2
+                     res@trYMinF = min(data(varn,:))-(max(data(varn,:)))/2
+                  end if
+                  if (min(data(varn,:)) .GT. 0)then
+                     res@trYMaxF = max(data(varn,:))-(min(data(varn,:)))/2
+                     res@trYMinF = min(data(varn,:))+(max(data(varn,:)))/2
+                  end if
+            end if
+            plot_ps(n) = gsn_csm_xy(wks_ps,t,data(varn,:),res)
+           
+         end if     
+      end if
+   end do
+  
+   ; ***************************************************
+   ; merge plots onto one page 
+   ; ***************************************************
+
+   no_frames = 0
+ 
+   if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \
+        n .gt. no_rows*no_columns) then
+      gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
+      print(" ")
+      print("Outputs to .eps or .epsi have only one frame")
+      print(" ")
+   else
+      do np = 1,n,no_rows*no_columns    
+         if ( np + no_rows*no_columns .gt. n) then   
+            gsn_panel(wks_ps, plot_ps(np:n),(/no_rows,no_columns/),resP)
+            no_frames = no_frames + 1            
+         else
+            gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),\
+                                                   (/no_rows,no_columns/),resP)
+            no_frames = no_frames + 1
+         end if
+      end do
+   end if
+
+   if (format_out .EQ. "png" ) then
+     png_output = new((/no_frames/), string)
+     j = 0
+
+     if (no_frames .eq. 1) then
+        if (ncl_version .GE. 6 ) then
+           png_output(0) = file_out+".png"
+        else
+           png_output(0) = file_out+".00000"+1+".png"
+        end if
+        ;using imagemagick's convert for reducing the white 
+        ;space around the plot
+        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+              png_output(0) + " " + png_output(0)
+       system(cmd)
+     else
+
+       do i=0, no_frames-1
+         j = i + 1
+         if (j .LE. 9) then
+           png_output(i) = file_out+".00000"+j+".png"
+         end if
+         if (j .GT. 9 .AND. j .LE. 99) then
+           png_output(i) = file_out+".0000"+j+".png"
+         end if
+         if (j .GT. 99 .AND. j .LE. 999) then
+           png_output(i) = file_out+".000"+j+".png"
+         end if
+         if (j .GT. 999) then
+           png_output(i) = file_out+".00"+j+".png"
+         end if
+
+         ;using imagemagick's convert for reducing the white 
+         ;space around the plot
+         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
+                png_output(i) + " " + png_output(i)
+         system(cmd)
+       end do
+     end if
+
+     print(" ")
+     print("Output to: "+ png_output)
+     print(" ")
+   else
+     print(" ")
+     print("Output to: " + file_out +"."+ format_out)
+     print(" ")
+   end if
+
+end
Index: /palm/tags/release-6.0/SCRIPTS/batch_scp
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/batch_scp	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/batch_scp	(revision 3477)
@@ -0,0 +1,761 @@
+#! /bin/bash
+
+# batch_scp - script for automatic file/directory transfer using scp
+
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+# 
+# 2715 2017-12-27 11:31:43Z raasch
+# last commit documented
+# 
+# 2714 2017-12-27 11:25:57Z raasch
+# bugfix: variable cycle explicitly interpreted with 10 as the number base
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2600 2017-11-01 14:11:20Z raasch
+# cycle numbers made three digits wide
+# host depending code completely removed
+# 
+# 2261 2017-06-08 14:25:57Z raasch
+# option usecycle added, script is running under bash now,
+# filenames are allowed to contain arbitrary number of dots "."
+#
+# 1310 2014-03-14 08:01:56Z raasch
+#
+# 1202 2013-07-10 16:22:07Z witha
+# adjustments for Forwind cluster (lcflow): using absolute paths for ssh
+#
+# 1099 2013-02-10 01:47:43Z raasch
+# LANG variable is unset in some ssh calls to guarantee messages in English
+#
+# 1094 2013-02-03 01:52:12Z raasch
+# new option -P for explicit setting of ssh/scp port
+#
+# 1090 2013-02-02 07:06:13Z raasch 
+# code put under GPL (PALM 3.9) 
+# adjustments for Kyushu-University computing center (lckyut)
+# old changelog messages removed
+#
+# 08/03/11 - Siggi - adjustments for ibmkisti: this machine allows
+#                    outgoing ssh/scp connections only from the
+#                    interactive nodes (gaiad). All ssh/scp traffic is
+#                    done via this interactive node.
+# 04/01/02 - Siggi - first version finished
+# 29/11/01 - Siggi - script development started
+#
+#--------------------------------------------------------------------------------#
+# batch_scp - script for automatic file/directory transfers using scp
+#
+# batch_scp has up to 5 arguments (first 4 are mandatory):
+#               $1 = IP-addres of remote (target) machine
+#               $2 = file to be transferred
+#               $3 = directory of remote machine, where file should be copied to
+#               $4 = filename that file should be given on remote machine
+#               $5 = file extension (optional argument)
+#
+# ATTENTION: problems might occur if directories on remote machine include very
+#            old files for which "ls -al" does give "year" as modification
+#            time instead of "hh:mm". In such a case, batch_scp cannot check the
+#            filename and may not find the file (e.g. if option -g is used).
+#--------------------------------------------------------------------------------#
+
+
+ 
+    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE 
+ random=$RANDOM
+
+ absolut=false
+ append=false
+ catalog_copy=false
+ check=false
+ cyclestring=""
+ delete=false
+ errfile=batch_scp.errfile.$random
+ filelist=filelist.$random
+ get=false
+ local_host=`hostname`
+ local_wdir=`pwd`
+ locat=normal
+ make_catalog=false
+ overwrite=false
+ print_local_filename=false
+ quote_wait=false
+ remote_user=""
+ silent=false
+ transfermode=binary
+ typeset -i iii icycle maxcycle=0 usecycle wait=0
+
+    # FEHLERBEHANDLUNG
+    # BEI EXIT:
+ trap 'if [[ $locat != normal ]]
+       then
+          [[ -f "$filelist" ]]  &&  cat $filelist
+          [[ -f "$errfile"  ]]  &&  cat $errfile
+          rm -rf $filelist $errfile
+          printf " +++ BATCH_SCP terminated \n"
+          printf "     locat     = $locat \n"
+          printf "     arguments = $1 $2 $3 $4 \n\n"
+          exit 1
+       fi' exit
+
+
+    # BEI TERMINAL-BREAK:
+ trap 'rm -rf $filelist $errfile
+       printf " +++ BATCH_SCP terminated \n\n"
+       exit 1
+      ' 2
+
+
+    # SHELLSCRIPT-OPTIONEN EINLESEN
+ while  getopts  :aAbcCdgmnoP:qsu:U:w:  option
+ do
+   case  $option  in
+       (a)   absolut=true;;
+       (A)   append=true;;
+       (b)   transfermode=binary;;
+       (c)   catalog_copy=true;;
+       (C)   check=true;;
+       (d)   delete=true;;
+       (g)   get=true;;
+       (m)   make_catalog=true;;
+       (n)   print_local_filename=true;;  # Option ist nicht dokumentiert !
+       (o)   overwrite=true;;
+       (P)   scp_port=$OPTARG;;
+       (q)   quote_wait=true;;
+       (s)   silent=true;;
+       (u)   remote_user=$OPTARG;;
+       (U)   usecycle=$OPTARG;;
+       (w)   wait=$OPTARG;;
+       (\?)  printf "  +++ option $OPTARG unknown \n"
+             printf "  --> call: batch_scp [-aAbcCdgmnoqsuw] <IP-adress> <localfile> <remotepath> <remotefile>\n"
+             locat=parameter;exit;;
+   esac
+ done
+
+ (( to_shift = $OPTIND - 1 ))
+ shift $to_shift
+
+
+
+ 
+    # KURZE AUFRUFBESCHREIBUNG WIRD HIER AUSGEGEBEN
+ if [ "$1" = "?" ]
+ then
+   (printf "\n  *** batch_scp can be called as follows:\n"
+    printf "\n      batch_scp -a -b -d -g -o -q -s -u.. -U.. -w..  <param1> <param2> <param3> <param4>\n"
+    printf "\n      Description of available options:\n"
+    printf "\n      Option  Description                            Default-Value"
+    printf "\n        -a    Filenames are absolute. No cycle-      ---"
+    printf "\n              numbers will be determined"
+    printf "\n        -A    append to destination file             ---"
+    printf "\n        -b    use binary-modus for transfer          ASCII-modus"
+    printf "\n        -c    transfer of directory                  ---"
+    printf "\n        -C    check-Modus, no transfer               ---"
+    printf "\n        -d    file to be transferred will be         ---"
+    printf "\n              deleted after successful transfer"
+    printf "\n        -g    change of transfer direction, i.e.     ---"
+    printf "\n              file will be transferred from"
+    printf "\n              destination host"
+    printf "\n        -o    any existing file will be overwritten  ---"
+    printf "\n        -q    switch on  \"quote wait\"  on          ---"
+    printf "\n              estination host"
+    printf "\n        -s    do not display informative messages    ---"
+    printf "\n        -u    username on remote machine             <username>"
+    printf "\n        -U    cycle number to be used                ---"
+    printf "\n        -w    waiting time in seconds, before trans- 0"
+    printf "\n              fer will be initiated"
+    printf "\n "
+    printf "\n      The positional parameters <param1> - <param4> must be provided at"
+    printf "\n      any time and have the following meaning:"
+    printf "\n        <param1>  -  IP-adress of destination host"
+    printf "\n                     or \"?\"  (creates this outline)"
+    printf "\n        <param2>  -  abs. or rel. path of file to be transferred"
+    printf "\n        <param3>  -  directory (abs.!) on destination host. Special cahracters"
+    printf "\n                     like \~ are allowed but must be quoted by \"."
+    printf "\n        <param4>  -  filename (without path!) on destination host; must not"
+    printf "\n                     be given, if option -c is used."
+    printf "\n      When using option -g, file will be copied from destination host to file"
+    printf "\n      <param2>. In this case, no overwriting is possible.") | more
+    exit
+ fi
+
+
+    # PRUEFEN, OB ALLE ARGUMENTE VORLIEGEN
+ if [[ "$1" = "" ]]
+ then
+    printf " +++ 1. argument missing \n"
+    locat=argument; exit
+ elif [[ "$2" = "" ]]
+ then
+    printf " +++ 2. argument missing \n"
+    locat=argument; exit
+ elif [[ "$3" = "" ]]
+ then
+    printf " +++ 3. argument missing \n"
+    locat=argument; exit
+ elif [[ "$4" = "" ]]
+ then
+    printf " +++ 4. argument missing \n"
+    locat=argument; exit
+ fi
+
+
+    # USER-NAME AUF ZIELRECHNER AUS .NETRC-DATEI ERMITTELN
+ if [[ -z $remote_user ]]
+ then
+
+       # PRUEFEN, OB NETRC-DATEI VORHANDEN
+    if [[ ! -f ~/.netrc ]]
+    then
+       printf " +++ option -u not given; \n"
+       printf "     getting remote-username from password file failed \n"
+       printf "     because ~/.netrc does not exist \n"
+       locat=netrc; exit
+    fi
+    grep  $1  ~/.netrc | read dum dum dum remote_user dum dum
+ fi
+
+
+    # APPEND IST NUR BEI TRANSFER EINZELNER DATEIEN OHNE UEBERSCHREIBEN
+    # ERLAUBT. GET IST DABEI EBENFALLS NICHT ERLAUBT
+ if [[ $append = true  &&  ( $get = true || $catalog_copy = true || $overwrite = true ) ]]
+ then
+    printf " +++ options -g, -c and -o are not allowed, if -A is given \n"
+    locat=parameter; exit
+ fi
+
+
+    # QUOTE WAIT FUNKTIONIERT NICHT BEIM KOPIEREN GANZER VERZEICHNISSE
+ if [[ $quote_wait = true  &&  $catalog_copy = true ]]
+ then
+    printf " +++ options  -c  and  -q  must not be used simultaneously\n"
+    locat=parameter; exit
+ fi
+
+
+    # IM CHECK-MODUS WIRD SCRIPT HIER BEENDET
+ [[ $check = true ]]  &&  exit
+
+
+    # BESTIMMTE ZEIT WARTEN, BIS WEITERGEMACHT WIRD (NOETIG Z.B. BEI TRANSFER
+    # VON JOBPROTOKOLLEN AUS JOBS HERAUS)
+ sleep  $wait
+
+
+    # Set port number option for calls of ssh/scp, subjob and batch_scp scripts
+ if [[ "$scp_port" != "" ]]
+ then
+    PORTOPT="-P $scp_port"
+    SSH_PORTOPT="-p $scp_port"
+ fi
+
+
+    # PRUEFEN, OB LOKALE DATEI/LOKALES VERZEICHNIS VORHANDEN BZW. NICHT VORHANDEN
+ if [[ $get = false ]]
+ then
+    if [[ $catalog_copy = false ]]
+    then
+       if [[ ! -f $2 ]]
+       then
+          printf " +++ file \"$2\" to be transferred does not exist \n"
+          locat=localfile; exit
+       fi
+    else
+       if [[ ! -d $2 ]]
+       then
+          printf " +++ directory \"$2\" to be transferred does not exist\n"
+          printf "     or is not a directory \n"
+          locat=localfile; exit
+       fi
+    fi
+ else
+    if [[ $catalog_copy = false ]]
+    then
+       if [[ -f $2 ]]
+       then
+          if [[ $overwrite = true ]]
+          then
+             rm  $2
+          else
+             printf " +++ local file \"$2\" is already existing \n"
+             locat=localfile; exit
+          fi
+       else
+
+             # PRUEFEN, OB SICH LOKALE DATEI ANLEGEN LAESST
+          local_dirname=`dirname $2`
+          if [[ ! -d $local_dirname ]]
+          then
+             printf " +++ local directory \"$local_dirname\" \n"
+             printf "     does not exist or is not a directory \n"
+             printf " +++ cannot copy file \"$3/$4\" \n"
+             printf "     from \"$1\" to \"$local_host\" \n"
+             locat=localfile; exit
+          fi
+       fi
+    else
+       if [[ -d $2  ||  -f $2 ]]
+       then
+          printf " +++ local directory \"$2\" is already existing, \n"
+          printf "     or a file with the same name exists \n"
+          locat=localfile; exit
+       fi
+    fi
+ fi
+
+
+    # VERZEICHNISLSTE DES ZIELRECHNERS ERSTELLEN
+ ssh $SSH_PORTOPT $1 -l $remote_user "unset LANG; cd $3; ls -1; echo '*** list complete'" > $filelist  2>&1
+ ssh_status=$?
+
+ if [[ $ssh_status != 0 ]]
+ then
+    if [[ ! -f $filelist ]]
+    then
+       echo " local_host = $local_host   ssh_status = $ssh_status"
+       locat=ssh_failed_1; exit
+    else
+       if [[ $(grep -c "*** list complete" $filelist) = 0 ]]
+       then
+          echo " local_host = $local_host   ssh_status = $ssh_status"
+          locat=ssh_failed_2; exit
+       fi
+    fi
+ fi
+
+
+    # PRUEFEN, OB VERZEICHNIS VORHANDEN IST. WENN GANZES VERZEICHNISS ZUM
+    # ZIELRECHNER KOPIERT WERDEN SOLL, DARF DORT NOCH KEIN ENTSPRECHENDES
+    # VERZEICHNIS VORHANDEN SEIN
+ if [[ $(cat $filelist | grep -c "not found") != 0  || \
+       $(cat $filelist | grep -c "No such file or directory") != 0 ]]
+ then
+    if [[ ! ( $catalog_copy = true  &&  $get = false ) ]]
+    then
+       if [[ $make_catalog = false ]]
+       then
+          printf " +++ directory \"$3\" does not exist on destination host (\"$1\") \n"
+          locat=directory; exit
+       else
+          if [[ $silent = false ]]
+          then
+             printf "  >>> directory \"$3\" does not exist on destination host (\"$1\")"
+             printf "\n      trying to create \"$3\" \n"
+          fi
+
+          make_catalog=force
+       fi
+    fi
+ fi
+
+
+    # PRUEFEN, OB DATEI/VERZEICHNIS VORHANDEN, WENN JA, HOECHSTEN ZYKLUS
+    # ERMITTELN (BZW. IM ABSOLUT-MODUS PRUEFEN, OB DATEI VORHANDEN IST)
+    # DAS GANZE ABER NUR, WENN NICHT OVERWRITE-MODUS GEWAEHLT WURDE, DIE
+    # EVENTUELL VORHANDENE DATEI ALSO UEBERSCHRIEBEN WERDEN SOLL
+ found=false
+ if [[ ( $overwrite = false   &&  $get = false )  ||  $get = true ]]
+ then
+    while  read zeile
+    do
+       if [[ $absolut = false ]]
+       then
+             # REMOVE EXTENSION, IF EXISTING AND GIVEN AS ARGUMENT
+          if [[ "$5" != ""  &&  "$5" != " " ]]
+          then
+             extension=${zeile##*.}
+             if [[ $extension = $5 ]]
+             then
+                text=${zeile%.*}
+             else
+                text=${zeile}
+             fi
+          else
+             text=${zeile}
+          fi
+
+             # GET AND REMOVE CYCLE NUMBER, IF EXISTING, AND CHECK, IF FILE EXISTS
+          cycle=${text##*.}
+          if [[ $cycle = $text ]]
+          then
+                # filename contains no dot, i.e. no cycle number
+             if [[ "$text" = "$4" ]]
+             then
+                found=true
+                (( icycle = 0 ))
+             fi
+          else
+                # filename contains at least one dot
+                # find out if the string after the last dot is a number
+             if [[ $cycle =~ ^-?[0-9]+$ ]]
+             then
+                text=${text%.*}
+                if [[ "$text" = "$4" ]]
+                then
+                   found=true
+                   (( icycle = $((10#$cycle)) ))
+                fi
+             else
+                if [[ "$text" = "$4" ]]
+                then
+                   found=true
+                   (( icycle = 0 ))
+                fi
+             fi
+          fi
+
+          if (( icycle > maxcycle ))
+          then
+             (( maxcycle = icycle ))
+
+                 # FOR COMPATIBILITY REASONS WITH OLDER VERSIONS
+                 # CHECK IF CYCLE NUMBER CONTAINS LEADING ZEROS
+              if [[ $(echo $cycle | cut -c1) = 0 ]]
+              then
+                 leading_zero=true
+              else
+                 leading_zero=false
+              fi
+          fi
+
+       else
+
+             # IM ABSOLUT-MODUS MUSS NUR GEPRUEFT WERDEN, OB DIE DATEI
+             # VORHANDEN IST
+          [[ $4 = $zeile ]]  &&  found=true
+       fi
+
+    done <$filelist
+ fi
+
+ if [[ $found = true ]]
+ then
+    if [[ $get = false ]]
+    then
+       if [[ $absolut = false ]]
+       then
+          if [[ $append = false ]]
+          then
+             (( maxcycle = maxcycle + 1 ))
+
+                # TRY TO USE FIXED CYCLE NUMBER, IF GIVEN AS OPTION
+             if [[ "$usecycle" != "" ]]
+             then
+                if (( usecycle >= maxcycle ))
+                then
+                   (( maxcycle = usecycle ))
+                else
+                    printf "  >>> Unfied cycle number cannot be used\n"
+                fi
+             fi
+             cyclestring=`printf ".%03d" $maxcycle`
+          else
+             if (( maxcycle == 0 ))
+             then
+                cyclestring=""
+             else
+                cyclestring=`printf ".%03d" $maxcycle`
+             fi
+          fi
+       else
+          if [[ $overwrite = false ]]
+          then
+             printf "  +++ file \"$3/$4\" \n"
+             printf "      already exists on destination host (use -o, if necessary) \n"
+             locat=file; exit
+          fi
+       fi
+    else
+       if [[ $absolut = false ]]
+       then
+          if (( maxcycle == 0 ))
+          then
+             cyclestring=""
+          else
+
+                # MAKE CYCLE NUMBER THREE DIGITS WIDE
+             if [[ $leading_zero = true ]]
+             then
+                cyclestring=`printf ".%03d" $maxcycle`
+             else
+                cyclestring=.$maxcycle
+             fi
+             (( maxcycle = 0 ))
+          fi
+       else
+          cyclestring=""
+       fi
+    fi
+
+ else
+
+    if [[ "$usecycle" != "" ]]
+    then
+       (( maxcycle = usecycle ))
+       cyclestring=`printf ".%03d" $usecycle`
+    else
+       cyclestring=""
+    fi
+
+       # ABBRUCH, WENN DATEI VON ZIELRECHNER GEHOLT WERDEN SOLL, DORT ABER
+       # NICHT VORHANDEN IST
+    if [[ $get = true ]]
+    then
+       printf " +++ file \"$3/$4\" \n"
+       printf "     does not exist on destination host (\"$1\") \n"
+       locat=remotefile; exit
+    fi
+ fi
+
+
+    # FALLS KATALOG ERZEUGT WIRD, DARF DIE DATEI IN KEINEM FALL EINE
+    # ZYKLUSNUMMER BESITZEN, DA SIE JA NOCh GARNICHT EXISTIEREN KANN
+ if [[ $make_catalog = force ]]
+ then
+    cyclestring=""
+    (( maxcycle = 0 ))
+ fi
+
+ 
+    # FALLS NAMENSOPTION (-n) GEWAEHLT WURDE, NUR DEN ERMITTELTEN LOKALEN
+    # DATEINAMEN DES ZIELRECHNERS AUSGEBEN UND SCRIPT BEENDEN
+ if [[ $print_local_filename = true ]]
+ then
+    printf "$4$cyclestring\n"
+    rm -r $filelist
+    exit
+ fi
+
+
+    # FALLS 5. ARGUMENT ANGEGEBEN WURDE, WIRD DIES ALS FILE-EXTENSION
+    # HINTER DIE ZYKLUS-NUMMER GEHAENGT (FUNKTIONIERT NUR BEI KOPIEREN EINER
+    # DATEI AUF ZIELRECHNER
+ if [[ "$5" != ""  &&  $get = false ]]
+ then
+    cyclestring=${cyclestring}.$5
+ fi
+
+
+    # BEI VERZEICHNISTRANSFER VON ZIELRECHNER AUF LOKALEN RECHNER PRUEFEN, OB
+    # $3 AUF ZIELRECHNER WIRKLICH EIN VERZEICHNIS IST
+ if [[ $catalog_copy = true  &&  $get = true ]]
+ then
+
+    rm -rf $filelist
+    ssh $SSH_PORTOPT $1 -l $remote_user "cd $3" > $filelist
+
+    if [[ $? != 0 ]]
+    then
+       locat=ssh_failed_3; exit
+    fi
+
+    if [[ $(cat $filelist | grep -c "Not a directory") != 0 ]]
+    then
+       printf " +++ \"$3\" on destination host is not a directory \n"
+       locat=directory; exit
+    fi
+
+ fi
+
+
+    # BEI KATALOGTRANSFER AUF LOKALEN RECHNER ENTSPRECHENDES VERZEICHNIS
+    # ANLEGEN
+ if [[ $catalog_copy = true ]]
+ then
+    if [[ $get = true ]]
+    then
+       mkdir $2
+    fi
+ fi
+
+
+ catalog_name=$3
+ [[ "$catalog_name" != "" ]]  &&  catalog_name=${catalog_name}/
+
+
+    # DATEI/VERZEICHNIS PER SCP UEBERTRAGEN
+ if [[ $get = false ]]
+ then
+    if [[ $make_catalog != force ]]
+    then
+       if [[ $append = false ]]
+       then
+
+          if [[ $catalog_copy = false ]]
+          then
+             scp $PORTOPT -p $2 $remote_user@$1:$catalog_name$4$cyclestring  > /dev/null
+          else
+             scp $PORTOPT -p -r $2 $remote_user@$1:$catalog_name$4$cyclestring  > /dev/null
+          fi
+          scp_status=$?
+
+          if [[ $scp_status != 0 ]]
+          then
+                # CHECK, OB DATEIGROESSEN AUF LOKALEM UND REMOTERECHNER
+                # UEBEREINSTIMMEN
+             local_size=`ls -al  $2`
+             local_size=`echo $local_size | cut -d" " -f5`
+
+             remote_size=`ssh $SSH_PORTOPT $1 -l $remote_user "ls -al $catalog_name$4$cyclestring"`
+             remote_size=`echo $remote_size | cut -d" " -f5`
+
+             if [[ "$remote_size" != "$local_size" ]]
+             then
+                echo " +++ scp failed on host \"$local_host\" with exit $scp_status"
+                echo "     local size = \"$local_size\"  remote size = \"$remote_size\" "
+                date
+                locat=scp_failed; exit
+             fi
+          fi
+
+       else
+
+          scp $PORTOPT -p $2 $remote_user@$1:${catalog_name}batch_scp_append_file.$random  > /dev/null
+
+          if [[ $? != 0 ]]
+          then
+                # CHECK, OB DATEIGROESSEN AUF LOKALEM UND REMOTERECHNER
+                # UEBEREINSTIMMEN
+             local_size=`ls -al  $2`
+             local_size=`echo $local_size | cut -d" " -f5`
+
+             remote_size=`ssh $SSH_PORTOPT $1 -l $remote_user "ls -al ${catalog_name}batch_scp_append_file.$random"`
+             remote_size=`echo $remote_size | cut -d" " -f5`
+
+             if [[ "$remote_size" != "$local_size" ]]
+             then
+                echo " +++ scp failed on host \"$local_host\" with exit $scp_status"
+                echo "     local size = \"$local_size\"  remote size = \"$remote_size\" "
+                date
+                locat=scp_for_append_failed; exit
+             fi
+          fi
+
+          rm  $filelist
+
+          ssh $SSH_PORTOPT $1 -l $remote_user "cd $3; cat batch_scp_append_file.$random >> $4$cyclestring; rm batch_scp_append_file.$random; echo '*** append complete'" > $filelist
+
+          if [[ $? != 0 ]]
+          then
+             if [[ ! -f $filelist ]]
+             then
+                locat=append_via_ssh_failed; exit
+             else
+                if [[ $(grep -c "*** append complete" $filelist) = 0 ]]
+                then
+                   locat=append_via_ssh_failed; exit
+                fi
+             fi
+          fi
+       fi
+
+    else
+
+       ssh $SSH_PORTOPT $1 -l $remote_user "mkdir -p $3"
+
+       if [[ $? != 0 ]]
+       then
+          locat=ssh_failed_4; exit
+       fi
+
+       scp $PORTOPT -p $2 $remote_user@$1:$catalog_name$4$cyclestring  > /dev/null
+
+       if [[ $? != 0 ]]
+       then
+          locat=scp_failed; exit
+       fi
+    fi
+
+ else
+
+    if [[ $catalog_copy = false ]]
+    then
+       if [[ $quote_wait = true ]]
+       then
+
+          printf " +++ quote wait not realized with BATCH_SCP"
+          locat=unavailable_feature; exit
+
+       else
+
+          scp $PORTOPT -p $remote_user@$1:$catalog_name$4$cyclestring $2  > /dev/null
+
+          if [[ $? != 0 ]]
+          then
+             locat=scp_failed; exit
+          fi
+
+       fi
+
+    else
+
+       printf " +++ get of whole cataloges not realized with BATCH_SCP so far"
+       locat=unavailable_feature; exit
+
+    fi
+
+ fi
+
+
+
+    # EVTL. TRANSFERIERTE DATEI AUF LOKALEM RECHNER LOESCHEN
+ if [[ $delete = true  &&  $get = false ]]
+ then
+    rm -rf  $2
+ fi
+
+
+
+    # ABSCHLUSSMELDUNG
+ if [[ $silent = false ]]
+ then
+    if (( maxcycle == 0 ))
+    then
+       if [[ $append = false ]]
+       then
+          printf "  >>> transfer successful \n"
+       else
+          printf "  >>> file was appended \n"
+       fi
+    else
+       printf "  >>> transfer successful \n"
+       if [[ $append = false ]]
+       then
+          if [[ $catalog_copy = false ]]
+          then
+             printf "      new file has cycle number .%03d \n" $maxcycle
+          else
+             printf "      new catalog has cycle number .%03d \n" $maxcycle
+          fi
+       else
+          printf "      append to cycle number .%03d \n" $maxcycle
+       fi
+    fi
+ fi
+
+ rm -rf  $filelist  $errfile
Index: /palm/tags/release-6.0/SCRIPTS/compile_tutorial
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/compile_tutorial	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/compile_tutorial	(revision 3477)
@@ -0,0 +1,185 @@
+#!/bin/ksh
+
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+#
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# Typo removed
+# 981 2012-08-09 14:57:44Z maronga
+#
+# 915 2012-05-30 15:11:11Z maronga
+# Initial revision
+#
+# Description:
+# ------------
+# This script compiles all LaTeX files that are located in TUTORIAL/SOURCE/.
+# Three PDFs are generated for each source file: 
+# the lecture version has a step-by-step layout, the handout version contains 
+# lines for notes, the web version can contain additional comments by the 
+# authors and has no step-by-step layout.
+# If a file is given as input parameter, only this file will be compiled.
+#
+# Execution:
+# ----------
+# compile_tutorial                 --> compiles all *.tex files in directory.
+# compile_tutorial -f filename.tex --> compiles filename.tex only.
+#------------------------------------------------------------------------------!
+
+    cycles=3
+    debug=false
+    file=""
+
+    full_name=`readlink -f $0`
+    directory="$(dirname $full_name)/../TUTORIAL/SOURCE"
+    output_dir="$(dirname $full_name)/../TUTORIAL"
+    cd $directory
+
+    while  getopts  :df: option
+    do
+       case  $option  in
+          (d)   debug=true;;
+          (f)   file=$OPTARG;;
+          (\?)  printf "\n  +++ unknown option $OPTARG \n"
+                printf "\n  --> type \"$0 ?\" for available options \n"
+                locat=parameter;exit;;
+       esac
+    done
+
+    shift OPTIND-1
+
+
+#   Print help
+    if [[ "$1" = "?" ]]
+    then
+       (printf "\n  *** compile_tutorial can be called as follows:\n"
+        printf "\n     compile_tutorial  -d  -f..\n"
+        printf "\n     Description of available options:\n"
+        printf "\n      Option      Description                                 Default-Value"
+        printf "\n        -d        show all debug output                               false"
+        printf "\n        -f        Filename (single file compilation mode)                \"\""
+        printf "\n         ?        this outline \n\n") | more
+        exit
+    fi
+
+    if [[ "$file" != "" ]] then
+       file_list=`readlink -f $(basename $file)`
+    else
+       file_list="$directory/*.tex"
+    fi
+
+
+    if [[ ! -d $output_dir/LECTURE ]] then
+       printf " $output_dir/LECTURE will be created.\n"
+       mkdir -p $output_dir/LECTURE
+    fi
+
+    if [[ ! -d $output_dir/HANDOUT ]] then
+       printf " $output_dir/HANDOUT will be created.\n"
+       mkdir -p $output_dir/HANDOUT
+    fi
+
+    if [[ ! -d $output_dir/WEB ]] then
+       printf " $output_dir/WEB will be created.\n"
+       mkdir -p $output_dir/WEB
+    fi
+
+    for i in $file_list;
+    do 
+       if [[ "$(echo $(basename $i)|cut -c1-6)" != "header" ]] then
+          printf "\n Compiling $i.\ Please wait..."
+
+#         Check if file exists
+          if [[ ! -f "$i" ]] then
+             printf " error."
+             printf "\n File $i does not exist. Skipping..."
+             break
+          fi
+
+          compiling_type="LECTURE"
+          for (( j=0; j<=2; j+=1 ))
+          do
+             rm -rf tmp_dir
+             mkdir tmp_dir
+             cp header_${compiling_type}.tex header_tmp.tex
+             for (( k=1; k<=$cycles; k+=1 ))
+             do
+                if ( $debug ) then
+                   printf "\n pdflatex output:\n\n\n"
+                   pdflatex -halt-on-error -output-directory=tmp_dir $i
+                   if [[ "$?" != "0" ]] 
+                   then
+                      printf "\n\n Compilation aborted. Please check your source code.\n"
+                      rm -rf tmp_dir
+                      exit
+                    fi
+                else
+                   pdflatex -halt-on-error -output-directory=tmp_dir $i  2>&1 > error_file
+
+                   if [[ "$?" != "0" ]] 
+                   then
+                      printf " error."
+                      printf "\n The following error occured during the compilation:\n\n\n"
+                      cat error_file |grep "Error"
+                      printf "\n\n Compilation aborted. Please check your source code.\n"
+                      rm -rf tmp_dir
+                      rm error_file
+                      exit
+                   fi
+                fi
+                mv tmp_dir/*.pdf $output_dir/$compiling_type
+             done
+             if [[ "$compiling_type" = "LECTURE" ]]
+             then
+                compiling_type="WEB"
+             elif [[ "$compiling_type" = "WEB" ]]
+             then
+                compiling_type="HANDOUT"
+             fi
+          done  
+          printf " done."
+       fi
+
+#      Cleaning up
+       if [[ -f header_tmp.tex ]] then
+          rm header_tmp.tex
+       fi
+       if [[ -f error_file ]] then
+          rm error_file
+       fi
+       if [[ -d tmp_dir ]] then
+          rm -rf tmp_dir
+       fi
+
+    done
+
+    printf "\n\n *** All actions finished.\n"
+
+exit
Index: /palm/tags/release-6.0/SCRIPTS/document_changes
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/document_changes	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/document_changes	(revision 3477)
@@ -0,0 +1,306 @@
+#!/bin/ksh
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the 
+# terms of the GNU General Public License as published by the Free Software 
+# Foundation, either version 3 of the License, or (at your option) any later 
+# version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018 Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2235 2017-05-31 08:03:49Z maronga
+# Changed the submission procedure in order to reduce the number of required
+# commits to one per change.
+# 
+# 2117 2017-01-16 16:28:44Z maronga
+# 
+# 1827 2016-04-07 12:12:23Z maronga
+# Added note that the script does not work on MAC OS
+# 
+# 1813 2016-04-06 09:38:56Z maronga
+# Added update of the copyright statements in the file headers.
+# 
+# 1810 2016-04-05 20:25:29Z maronga
+# document_changes now checks all subdirectories. Modified printing to screen.
+# 
+# 1804 2016-04-05 16:30:18Z maronga
+# Removed printing of "this is an alpha version"
+# 
+# 1326 2014-03-21 10:44:31Z maronga
+# Initial revision
+# 
+# Description:
+# ------------
+# This tool moves text from "Current Revisions:" to "Former Revisions:" and
+# adds the svn timestamp. It works with the folders SOURCE and SCRIPTS
+#
+# Usage:
+# a) go to the source directory (e.g. current_version/trunk and perform:
+#    "document_changes",
+# b) or call "document_changes" directly and add the path to the source code as
+#    argument
+#    (e.g. document_changes trunk)
+#
+# Note:
+# The script will only work properly if the two following conditions are met:
+# 1) the 2nd line after "Current Revisions:" must contain text,
+# 2) the last line before "Former Revisions:" must not contain text.
+#------------------------------------------------------------------------------#
+
+#
+#-- define variables
+    comments=""         #: variable contains the CR text
+    comment_char=="!"   #: comment character
+    count_changes=0     #: count the number of files with CR text
+    count_updates=0     #: count the number of files with copyright update
+    count_files=0       #: count the number of files
+    fn=""               #: current file name to be scanned
+    file_firstchar=""   #: first character of filename
+    file_lastchar=""    #: last character of filename
+    file_extension=""   #: filename extension
+    found_comment=false #: true/false if a CR text was found
+    IFS=''              #: set standard delimiter to empty string
+    input_dir=""        #: directory of the source code
+    line=""             #: containts the current line of filename
+    line_count=0        #: counter to the line no. of the file
+    line_start=9999999  #: line no. where CR text starts
+    line_stop=0         #: line no. where CR text ends
+    line_tmp=""         #: first 19 characters of line
+    list_delete=""      #: contains the line no. that must be deleted from CR
+    timestamp=""        #: the svn timestamp of the file
+    current_year=$(date +"%Y")
+
+#
+#-- get input directory
+    input_dir=$1
+    if  [[ "$input_dir" == "" ]]
+    then
+       input_dir=`pwd`
+    fi
+    
+    printf "\n"
+    printf "#------------------------------------------------------------------------# \n"
+    printf "| \e[1mdocument_changes\e[0m                                                       | \n"
+    printf "|                                                                        | \n"
+    printf "| This tool moves the change comments in the all PALM file headers from  | \n"
+    printf "| 'Current revisions' to 'Former revisions' and saves the time stamp.    | \n"  
+    printf "#------------------------------------------------------------------------# \n"
+    
+    printf "\n  *** Checking files in $input_dir and all recursive subdirectories...\n"
+
+    
+#
+#-- scan all (sub-)directories for files.
+    IFS=$'\n';
+    for fn in $(find $input_dir -not -name '*.pdf'  -and -not -name '*.x'      \
+                           -and -not -name '*.eps'  -and -not -name '*.png'    \
+                           -and -not -name '*.svn*' -and -not -name '*~'       \
+                           -and -not -name '*.tar'); do
+
+#
+#--    exclude invisible files
+       file_firstchar=${fn:0:1}
+       file_lastchar=`echo -n $fn| tail -c -1`
+       file_extension=${fn##*.}
+       if [[ "$file_firstchar" == "." ]]
+       then
+          continue
+       fi
+       
+       (( count_files = count_files + 1 ))
+
+       line_count=0
+       found_comment=false
+       list_delete=""
+       line_start=9999999
+       line_stop=0
+       comments=""
+
+#
+#--    read one line at a time and move revision comments
+       while read line
+       do
+
+          (( line_count = line_count + 1 ))
+          line_tmp=""
+          line_tmp=${line:2:17}
+
+#
+#--       check if stopping point is reached
+          if [[ $line_stop -eq 0 && "$line_tmp" == "Former revisions:" ]]
+          then
+             line_stop=$line_count
+          fi
+
+#
+#--       check if starting point is reached
+          if [[ $line_start -eq 9999999 && "$line_tmp" == "Current revisions" ]]
+          then
+             (( line_start = line_count + 2 ))
+             comment_char=${line:0:1}
+          fi
+
+#
+#--       read comment line
+          if [[ $line_count -ge $line_start && $line_stop -eq 0 ]]
+          then
+
+#
+#--          check for empty comments
+             line_no_space=`echo ${line:2:10} | sed -e 's/^[ \t]*//'`
+             if [[ $line_count -eq $line_start && "$line_no_space" != "" ]]
+             then
+
+             
+                printf "\r%$(tput cols)s" " "   
+                printf "\r  \e[1;92m*** Comments found in $fn\e[0m\n"
+             
+                found_comment=true
+                cp $fn $fn~
+             fi
+
+#
+#--          when comments are found, save comment lines to $comments
+             if [[ "$found_comment" == true ]]
+             then
+                comments="$comments\n$line"
+                list_delete="$list_delete;${line_count}d"
+             fi
+          fi
+          
+#
+#--       get the timestamp from the current revision
+          if [[ "$comments" != "" && $line_count -eq $line_stop+2 ]]
+          then
+            comments="$comment_char $line$comments"
+            timestamp=`echo $line | cut -d" " -s -f4-7`
+            timestamp_string="$comment_char $timestamp"
+          fi
+
+          
+          
+          
+       done <"$fn"
+
+       
+       
+#
+#--    check for updates of the copyright statement
+       found_update_year=false
+
+       while read line 
+       do 
+
+          line_tmp=""
+          line_tmp2=""     
+          line_tmp=${line:22:29}
+          line_tmp2=${line:2:15}
+          
+#           echo "$line_tmp $line_tmp2"
+          
+          if  [[ "$line_tmp" == "Leibniz Universitaet Hannover" && "$line_tmp2" == "Copyright 1997-" ]]
+          then
+          
+             year_in_file=${line:17:4}
+             if  [[ "$year_in_file" != "$current_year" ]]
+             then
+      
+                printf "\r%$(tput cols)s" " "   
+                printf "\r  \e[1;33m*** Copyright update required in $fn\e[0m\n"
+
+                comment_char=${line:0:1}
+                found_update_year=true             
+                cp $fn $fn~
+                
+             fi
+          fi
+       
+       done <"$fn"
+         
+       printf "\r%$(tput cols)s" " "   
+       printf "\r\e[1m  *** Searched files: $count_files. Comments found: $count_changes. Copyright updates found: $count_updates\e[0m"
+       
+#
+#--    move comments from current revisions to former revisions
+       if [[ "$found_comment" == true ]]
+       then
+
+          (( count_changes = count_changes + 1 ))
+
+#
+#--       remove leading \n characters in string
+          comments=${comments:2}
+ 
+ 
+          
+#
+#--       fix old time stamp
+          (( line_time = line_stop + 2 ))
+          sed -i "${line_time}d" $fn      
+          sed -i "${line_time}i$timestamp_string" $fn
+
+
+
+#
+#--       insert comments to Former Revisions
+          (( line_stop = line_stop + 2 ))
+          sed -i "${line_stop}i$comments" $fn
+          
+
+
+#
+#--       delete comments from current revisions and insert two blank lines
+          list_delete=${list_delete#?}
+          sed -i "$list_delete" $fn
+          sed -i "${line_start}i${comment_char} " $fn
+          sed -i "${line_start}i${comment_char} " $fn
+
+       fi
+
+#
+#--    move comments from current revisions to former revisions
+       if [[ "$found_update_year" == true ]]
+       then
+
+          (( count_updates = count_updates + 1 ))  
+          
+           sed -i "s/$comment_char Copyright 1997-.*Leibniz Universitaet Hannover/$comment_char Copyright 1997-$current_year Leibniz Universitaet Hannover/" $fn
+     
+       fi
+       
+    done
+
+#
+#-- inform the user about the changes
+    printf "\r%$(tput cols)s" " "
+    printf "\r\e[1m  *** Searched files: $count_files. Comments found: $count_changes. Copyright updates found: $count_updates\e[0m. - \e[1;32mfinished.\e[0m\n\n"
+
+    if  [[ $count_changes -gt 0 ]]
+    then
+       printf "  *** You can now proceed with\n      \e[0;91msvn commit -m 'your commit message' trunk\e[0m\n"
+       printf "  *** Please do not forget to commit your changes in the changelog at\n      \e[0;91mhttps://palm.muk.uni-hannover.de/trac/wiki/doc/tec/changelog\e[0m!\n"    
+    else
+        printf "  *** No comments found in files!\n"   
+    
+    fi
Index: /palm/tags/release-6.0/SCRIPTS/generate_documentation
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/generate_documentation	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/generate_documentation	(revision 3477)
@@ -0,0 +1,98 @@
+#!/bin/bash
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+# svn propset keyword
+# 
+# 
+#
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+# 
+# 1714 knoop
+# Initial revision
+# 
+#--------------------------------------------------------------------------------#
+# generate_documentation - script for generating the PALM code documentation
+#--------------------------------------------------------------------------------#
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+  SOURCE="$(readlink "$SOURCE")"
+  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
+done
+SCRIPT_LOCATION="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+
+working_dir=$(readlink -f "${SCRIPT_LOCATION}/../../")
+
+echo "Generating PALM source code documentation..."
+
+
+doc_dir=$working_dir/documentation
+
+# Checking for doxygen
+if type -t doxygen; then
+
+   # Removing old documentation
+   if [[ -d $doc_dir ]];then
+      echo "Remove old documentation"
+      rm -r $doc_dir
+   fi
+   # Generating HTML documentation
+   echo "found doxygen. Continuing..."
+   cd $SCRIPT_LOCATION
+   doxygen palm2doxygen.config
+   if [[ $? -ne 0 ]];then
+      echo "doxygen detected an error."
+      exit 1
+   fi
+   cd $doc_dir
+   doc_dir=$(pwd)
+   ln -s $(pwd)/html/index.html PALM_doc.html
+   echo "HTML source code documentation generated."
+   
+   # Checking for pdflatex
+   if type -t pdflatex; then
+   
+      # Generating PDF documentation
+      cd $doc_dir/latex
+      make pdf
+      cd $doc_dir
+      ln -s $(pwd)/latex/refman.pdf PALM_doc.pdf
+      echo "PDF source code documentation generated."
+   
+   else
+      echo "ERROR: pdflatex not found."
+      echo "Skipping PDF documentation generation. Terminating!"
+      exit 1
+   fi
+else
+   echo "ERROR: doxygen not found."
+   echo "Skipping PALM documentation generation. Terminating!"
+   exit 1
+fi
+
+echo "The PALM source code documentation is located in: $doc_dir"
+echo "Done."
Index: /palm/tags/release-6.0/SCRIPTS/palm2doxygen.config
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm2doxygen.config	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm2doxygen.config	(revision 3477)
@@ -0,0 +1,2364 @@
+#$Id: palm2doxygen.config 1683 2015-10-07 23:57:51Z knoop $
+
+# Doxyfile 1.8.9.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for palm.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "PALM"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =../../documentation/
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = YES
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  =../SOURCE/
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS          =*.f90
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = */message.f90 */cpulog.f90  */tridia_solver.f90
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 255
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = YES
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = YES
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = NO
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = YES
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH      =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 100
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 6
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
Index: /palm/tags/release-6.0/SCRIPTS/palm_find_lowest_available_error_number
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_find_lowest_available_error_number	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_find_lowest_available_error_number	(revision 3477)
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 2018-2018  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+#
+#
+# Former revisions:
+# -----------------
+# $Id$
+# Initial revision
+#
+#------------------------------------------------------------------------------#
+# palm_find_lowest_available_error_number does what its name indicates
+#------------------------------------------------------------------------------#
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+  SOURCE="$(readlink "$SOURCE")"
+  # if $SOURCE was a relative symlink, we need to resolve it
+  # relative to the path where the symlink file was located
+  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+done
+SCRIPT_LOCATION="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+
+working_dir=$(readlink -f "${SCRIPT_LOCATION}/../../")
+trunk_dir=$(readlink -f "${SCRIPT_LOCATION}/../")
+source_dir=${trunk_dir}/SOURCE
+
+contains() {
+    [[ ${1} =~ (^|[[:space:]])${2}($|[[:space:]]) ]] && return 0 || return 1
+}
+
+error_code_prefix="PA"
+
+all_found_error_codes=$(grep -A10 -P "CALL message\( " ${source_dir}/*.f90 \
+      | sed -e ':a;N;$!ba;s/ *& *\n */ /g' \
+      | grep -P "CALL message\( " \
+      | grep -oP "${error_code_prefix}(?<!\d)\d{4}(?!\d)" | sort | uniq -c  \
+      | grep -oP "${error_code_prefix}(?<!\d)\d{4}(?!\d)")
+
+for n in {1..9999} ; do
+   current_code=$(printf "${error_code_prefix}%04d" $((10#${n})))
+   if ! contains "$all_found_error_codes" "$current_code"; then
+     echo $current_code
+     break
+   fi
+done
Index: /palm/tags/release-6.0/SCRIPTS/palm_find_lowest_available_log_point_index
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_find_lowest_available_log_point_index	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_find_lowest_available_log_point_index	(revision 3477)
@@ -0,0 +1,85 @@
+#!/usr/bin/env bash
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 2018-2018  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+#
+#
+# Former revisions:
+# -----------------
+# $Id$
+# Initial revision
+#
+#------------------------------------------------------------------------------#
+# palm_find_lowest_available_log_point_index does what its name indicates
+#------------------------------------------------------------------------------#
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+  SOURCE="$(readlink "$SOURCE")"
+  # if $SOURCE was a relative symlink, we need to resolve it
+  # relative to the path where the symlink file was located
+  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+done
+SCRIPT_LOCATION="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+
+working_dir=$(readlink -f "${SCRIPT_LOCATION}/../../")
+trunk_dir=$(readlink -f "${SCRIPT_LOCATION}/../")
+
+contains() {
+    [[ ${1} =~ (^|[[:space:]])${2}($|[[:space:]]) ]] && return 0 || return 1
+}
+
+all_found_log_point=$(grep -P "CALL +cpu_log\( +log_point\(" ${trunk_dir}/SOURCE/* \
+      | grep -oP "(?<!\d)\d+(?!\d)" | sort -n | uniq \
+      | grep -oP "(?<!\d)\d+(?!\d)")
+
+log_point_size=$(grep -oP "TYPE\(logpoint\), DIMENSION\(\d+\) ::  log_point =" \
+      ${trunk_dir}/SOURCE/cpulog_mod.f90 \
+      | grep -oP "(?<!\d)\d+(?!\d)")
+
+for n in $(seq 1 ${log_point_size}) ; do
+   if ! contains "$all_found_log_point" "$n"; then
+     echo "log_point($n)   is the lowest available log_point   index."
+     break
+   fi
+   if [[ ${n} -ge ${log_point_size} ]]; then
+      echo "ERROR: array log_point (size: ${log_point_size}) is full. " \
+           "Please increase its size in file \"cpulog_mod.f90\"."
+   fi
+done
+
+
+all_found_log_point_s=$(grep -P "CALL +cpu_log\( +log_point_s\(" ${trunk_dir}/SOURCE/* \
+      | grep -oP "(?<!\d)\d+(?!\d)" | sort -n | uniq \
+      | grep -oP "(?<!\d)\d+(?!\d)")
+
+log_point_s_size=$(grep -oP "TYPE\(logpoint\), DIMENSION\(\d+\) ::  log_point_s =" \
+      ${trunk_dir}/SOURCE/cpulog_mod.f90 \
+      | grep -oP "(?<!\d)\d+(?!\d)")
+
+for n in $(seq 1 ${log_point_s_size}) ; do
+   if ! contains "$all_found_log_point_s" "$n"; then
+     echo "log_point_s($n) is the lowest available log_point_s index."
+     break
+   fi
+   if [[ ${n} -ge ${log_point_s_size} ]]; then
+      echo "ERROR: array log_point_s (size: ${log_point_s_size}) is full. " \
+           "Please increase its size in file \"cpulog_mod.f90\"."
+   fi
+done
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf	(revision 3477)
@@ -0,0 +1,798 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Modified header
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2309 2017-07-10 15:55:55Z gronemeier
+# some further bugfixes for palm_gf
+#
+# 2308 2017-07-10 12:15:43Z gronemeier
+# new version of palm_gf (bugfixes, changes and new options)
+#
+# 2116 2017-01-16 16:15:24Z maronga
+# Initial revision
+# 
+# 
+#
+# Description:
+# ------------
+# 
+#
+# Instructions:
+# -------------
+#
+#------------------------------------------------------------------------------!
+
+import sys
+import os
+import time
+import palm_gf_files.palm_gf_exec as execute_script
+import palm_gf_files.palm_gf_conf as config_wr
+import sqlite3
+import subprocess as sub
+
+
+from PyQt4 import QtCore, QtGui, uic, Qt
+from PyQt4.QtCore import QCoreApplication
+from palm_gf_files.palm_gf_tools import MyApp3
+
+# Determine PALM directories
+try: 
+   devnull = open(os.devnull, 'w')
+   out = sub.check_output("echo $PALM_BIN", shell=True, stderr=sub.STDOUT)
+   palm_bin = out.rstrip()
+   palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1]
+   out = None
+except:   
+   print "Error. $PALM_BIN is not set."
+   raise SystemExit
+
+qtCreatorFile = palm_bin + '/palm_gf_files/palm_gf.ui'
+
+Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)
+
+
+class MyApp1(QtGui.QMainWindow, Ui_MainWindow):
+    def __init__(self):
+
+
+
+        QtGui.QMainWindow.__init__(self)
+        Ui_MainWindow.__init__(self)
+        #self.setWindowTitle('Gridfinder')
+
+        frameGm = self.frameGeometry()
+        screen = QtGui.QApplication.desktop().screenNumber(QtGui.QApplication.desktop().cursor().pos())
+        centerPoint = QtGui.QApplication.desktop().screenGeometry(screen).center()
+        frameGm.moveCenter(centerPoint)
+        self.move(frameGm.topLeft())
+
+
+        #centerPoint = str(centerPoint)
+        #xcenter = centerPoint.split('(')[1].split(',')[0]
+        #ycenter = centerPoint.split('(')[1].split(',')[1].split(')')[0]
+        #print xcenter, ycenter
+        #centerPoint = QtCore.QPoint(int(xcenter) - 418, int(ycenter))
+        #frameGm.moveCenter(centerPoint)
+        #self.move(frameGm.topLeft())
+
+        self.setupUi(self)
+        self.startbutton.clicked.connect(self.input_check)  # starts grid_calculation
+        self.psolver_box.currentIndexChanged.connect(self.vis)  # triggers visibility of fft_method option
+        self.save_button.clicked.connect(self.save_results)  # saves .db file under given name
+        self.fft_method_box.setVisible(False)
+        self.fft_method_label.setVisible(False)
+        self.result_headline.setVisible(False)
+        self.result_label.setVisible(False)
+        #self.line_res_up.setVisible(False)
+        self.line_res_down.setVisible(False)
+        self.view_result_button.setVisible(False)
+        #self.tableWidget.setVisible(False)
+        self.load_text_label.setVisible(False)
+        self.nor_spinbox.setVisible(False)
+        self.filename_line.setVisible(False)
+        self.save_button.setVisible(False)
+        self.testbar.setVisible(False)
+        self.d_box.setVisible(False)
+        self.tpn_box.setVisible(False)
+        self.tolerance_bar.setVisible(False)
+        self.tolerance_value.setVisible(False)
+        self.view_result_button.clicked.connect(self.load_gui)
+        self.threadclass = Threadclass()
+        self.actionSetting.triggered.connect(self.settings)
+        self.question_box.clicked.connect(self.settings)
+        self.warning_label.setVisible(False)
+
+
+
+
+    def closeEvent(self, QCloseEvent):
+
+        config_wr.closing_cleanup()
+        QCloseEvent.accept()
+
+
+    def input_check(self):
+
+        if int(self.nx_min_box.value()) <= int(self.nx_max_box.value()) and int(self.ny_min_box.value()) <= int(self.nx_max_box.value()) and int(self.nz_min_box.value()) <= int(self.nz_max_box.value()):
+            self.warning_label.setVisible(False)
+            self.run_program()
+
+        else:
+
+            self.warning_label.setStyleSheet('color: red')
+            self.warning_label.setVisible(True)
+
+
+
+
+
+
+
+    def settings(self):
+
+        self.w = MyPopup()
+        #self.w.setGeometry(Qt.QRect(100, 100, 400, 200))
+        frameGm = self.frameGeometry()
+        screen = QtGui.QApplication.desktop().screenNumber(QtGui.QApplication.desktop().cursor().pos())
+        centerPoint = QtGui.QApplication.desktop().screenGeometry(screen).center()
+        frameGm.moveCenter(centerPoint)
+        self.w.move(frameGm.topLeft())
+        self.w.show()
+
+
+
+    def vis(self):
+
+        if str(self.psolver_box.currentIndex()) == str(1):
+            self.fft_method_box.setVisible(True)
+            self.fft_method_label.setVisible(True)
+
+        if str(self.psolver_box.currentIndex()) != str(1):
+            self.fft_method_box.setVisible(False)
+            self.fft_method_label.setVisible(False)
+
+    def load_gui(self):
+        self.child_win = MyApp3()
+        self.child_win.show()
+
+    def run_transfer(self):
+        self.threadclass = Threadclass()
+        self.connect(self.threadclass, QtCore.SIGNAL('finish'), self.behind_run)
+        #self.connect(self.threadclass, QtCore.SIGNAL('progress'), self.up2date)
+        self.connect(self.threadclass, QtCore.SIGNAL('startqmsg'), self.takeoff)
+        self.connect(self.threadclass, QtCore.SIGNAL('check'), self.checkme)
+        self.threadclass.runx()
+
+    def run_program(self):
+
+
+        self.result_label.setText('Starting calculation...')
+        #self.QtCore.QCoreApplication.processEvents()
+        QtGui.QApplication.processEvents()
+        #self.setEnabled(False)
+        # self.Ui_MainWindow.setDisabled(True)
+        #self.qmsg_wait(0)
+        #print("bool state ", self.npex_npey_box.checkState())                                 # XXX
+        np_min = str(self.np_min_box.value())
+        np_max = str(self.np_max_box.value())
+        nx_min = str(self.nx_min_box.value())
+        nx_max = str(self.nx_max_box.value())
+        ny_min = str(self.ny_min_box.value())
+        ny_max = str(self.ny_max_box.value())
+        nz_min = str(self.nz_min_box.value())
+        nz_max = str(self.nz_max_box.value())
+        tpn = str(self.tpn_box.value())
+        dnpexnpey = str(self.d_box.value())
+        dnpexnpey_tolerance = str(self.tolerance_value.value())
+        dnxny = str(self.dnxny_box.value())
+        myobject = MyPopup()
+        ld_thrs = myobject.load_thres.value()
+        rslt_thrs = myobject.result_thres.value()
+
+        if str(self.psolver_box.currentIndex()) == str(1):
+            poisfft = True
+            switch = True
+            if str(self.fft_method_box.currentIndex()) == str(2):
+                temperton = True
+            else:
+                temperton = False
+        else:
+            poisfft = False
+            temperton = False
+            switch = False
+
+        if str(self.psolver_box.currentIndex()) == str(2):
+            mlt_grid = True
+        else:
+            mlt_grid = False
+
+        if str(self.Oos_checkbox.checkState()) == str(2):
+            spctre = True
+            poisfft = True
+        else:
+            spctre = False
+
+        if int(self.strict_box.checkState()) != 2:
+            tpn = 0
+
+        if int(self.npex_npey_box.checkState()) != 2:
+            dnpexnpey = 0
+            dnpexnpey_tolerance = 0
+
+        #print(poisfft, switch, temperton, mlt_grid, spctre)
+        config_wr.write_config(np_min, np_max, nx_min, nx_max, ny_min, ny_max, nz_min, nz_max, tpn, dnpexnpey,dnpexnpey_tolerance, dnxny,
+                               str(poisfft), str(switch), str(temperton), str(mlt_grid), str(spctre), rslt_thrs, ld_thrs)
+        #time.sleep(1)
+        # execute_script.grid_executer() temp deactive
+        self.testbar.setVisible(True)
+        QtCore.QCoreApplication.processEvents()
+        self.run_transfer()
+
+
+    def behind_run(self):
+        trigger_bool = False
+        #print("behind_run executed")
+        checkfile = open(".palm_gf_tmp", "r")
+        #self.result_label.setText(str(checkfile.readline()))
+        res_text = str(checkfile.readline())          # XXX
+        self.result_label.setText(res_text)
+        result_nr = res_text.split(' ')[2]
+        if int(checkfile.readline()) == 1:
+            self.view_result_button.setVisible(True)
+            trigger_bool = True
+        self.result_label.setVisible(True)
+        self.result_headline.setVisible(True)
+        self.line_res_down.setVisible(True)
+        #self.line_res_up.setVisible(True)
+        self.load_text_label.setVisible(False)
+        self.nor_spinbox.setVisible(False)
+        checkfile.close()
+        #self.setEnabled(True)
+        self.filename_line.setVisible(True)
+        self.save_button.setVisible(True)
+        parameters = config_wr.read_config()
+
+
+        if trigger_bool is True and int(result_nr) < int(parameters[18]):
+            self.result_label.setText(res_text + 'Loading Ui...')
+            self.load_gui()                                              # XXXX
+            self.result_label.setText(res_text)
+            #self.close()
+            #frameGm = self.frameGeometry()
+            #screen = QtGui.QApplication.desktop().screenNumber(QtGui.QApplication.desktop().cursor().pos())
+            #centerPoint = QtGui.QApplication.desktop().screenGeometry(screen).center()
+            #frameGm = self.frameGeometry()
+            #screen = QtGui.QApplication.desktop().screenNumber(QtGui.QApplication.desktop().cursor().pos())
+            #centerPoint = str(centerPoint)
+            #xcenter = centerPoint.split('(')[1].split(',')[0]
+            #ycenter = centerPoint.split('(')[1].split(',')[1].split(')')[0]
+            ##print xcenter, ycenter
+            #centerPoint = QtCore.QPoint(int(xcenter) - 292, int(ycenter))
+            #frameGm.moveCenter(centerPoint)
+            #self.move(frameGm.topLeft())
+
+
+
+
+
+
+
+    def get_path(wildcard):
+        import wx
+        app = wx.App(None)
+        style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
+        dialog = wx.FileDialog(None, 'Open', wildcard='*.db')
+        if dialog.ShowModal() == wx.ID_OK:
+            path = dialog.GetPath()
+
+            print(path, file)
+        else:
+            path = None
+        dialog.Destroy()
+        return
+
+
+
+    def save_results(self):
+
+        #self.get_path()
+
+
+
+        import os
+        import shutil
+        prvs = '.palm_gf_data.db'
+        new = str(self.filename_line.text())
+        print(new)
+        shutil.copy(prvs, new)
+        print(prvs, new)
+
+    def qmsg(self):
+        msgbox = QtGui.QMessageBox()
+        msgbox.setWindowTitle("Information")
+        # msgbox.setVisible(False)
+        msgbox.Information
+        msgbox.setText("Calculating, please be patient.")
+        # msgbox.
+        msgbox.setModal(True)
+        msgbox.exec_()
+
+    def tester(self):
+        #print("tester was executed from run method")
+        pass
+
+    def qmsg_wait(self, progress):
+        global msgbox
+        msgbox = QtGui.QMessageBox()
+        layout = msgbox.layout()
+        layout.itemAtPosition(layout.rowCount() - 1, 0).widget().hide()
+        global progressx
+        progressx = QtGui.QProgressBar()
+        layout.addWidget(progressx, layout.rowCount(), 0, 1, layout.columnCount())
+
+        msgbox.setWindowTitle("Progress")
+        msgbox.Information
+        msgbox.setText("Calculating, please be patient.")
+
+        progressx.setValue(int(progress))
+        #msgbox.setModal(False)
+        msgbox.exec_()
+
+    def up2date(self, progress):
+
+        progressx.setValue(int(progress))
+        if progress == 100:
+            msgbox.done(1)
+
+    def takeoff(self):
+        #self.qmsg_wait(0)
+        pass
+
+    def checkme(self, check):
+        #print(check)
+        self.testbar.setValue(int(check))
+
+        if check == 100:
+            self.testbar.setVisible(False)
+        QtGui.QApplication.processEvents()
+
+
+
+
+
+class Threadclass(QtCore.QThread):
+    def __init__(self, parent = None):
+        super(Threadclass, self).__init__(parent)
+
+    def runx(self):
+        #print("runx exec.")
+        self.execute()
+
+
+
+    def execute(self):
+        self.emit(QtCore.SIGNAL('startqmsg'), 0)
+
+        parameters = config_wr.read_config()
+        min_procs = int(parameters[0])
+        max_procs = int(parameters[1])
+        tpn = int(parameters[2])
+        dnpexnpey = float(parameters[3])
+        dnpexnpey_tol = int(parameters[4])
+        dnxny = float(parameters[5])
+        nx_min = int(parameters[6])
+        nx_max = int(parameters[7])
+        ny_min = int(parameters[8])
+        ny_max = int(parameters[9])
+        nz_min = int(parameters[10])
+        nz_max = int(parameters[11])
+        poisfft = parameters[12]
+        switch = parameters[13]
+        tempterton = parameters[14]
+        mlt_grid = parameters[15]
+        spectr = parameters[16]
+        result_thrs = parameters[17]
+
+
+        path = "/localdata/.palm_gf_data.db"
+        pathx = parameters[19] + '/.palm_gf_data.db'
+
+
+        conn = sqlite3.connect(pathx)
+        #conn = sqlite3.connect(".palm_gf_data.db")
+        c = conn.cursor()
+        c.execute("DROP TABLE IF EXISTS grid_current")
+        c.execute("DROP TABLE IF EXISTS grid_limits")
+        c.execute(
+            "CREATE TABLE IF NOT EXISTS grid_current(nx INT, ny INT, nz INT, npex INT, npey INT, npxnpy FLOAT, np INT, ngpts INT, nxnpex FLOAT, nynpey FLOAT)")
+        c.execute(
+            "CREATE TABLE IF NOT EXISTS grid_limits(nx INT, ny INT, nz INT, npex INT, npey INT, npxnpy FLOAT, np INT, ngpts INT, nxnpex FLOAT, nynpey FLOAT)")
+        conn.commit()
+        main_bool = True
+
+
+
+
+        if poisfft == str(True):
+            poisfft = True
+        else:
+            poisfft = False
+
+        if switch == str(True):
+            switch = True
+        else:
+            switch = False
+
+        if tempterton == str(True):
+            tempterton = True
+        else:
+            tempterton = False
+
+        if mlt_grid == str(True):
+            mlt_grid = True
+        else:
+            mlt_grid = False
+
+        if spectr == str(True):
+            spectr = True
+        else:
+            spectr = False
+
+        #print(spectr, type(spectr))
+        #print(poisfft, switch, tempterton, mlt_grid, spectr)
+
+        np_used = min_procs
+        counter = 0
+
+        nx = nx_min
+        ny = ny_min
+        nz = nz_min
+
+        from math import floor
+
+        def factors(n):
+            result = []
+            for i in range(2, n + 1):  # test all integers between 2 and n
+                s = 0
+                while n / i == floor(n / float(i)):  # is n/i an integer?
+                    n = n / float(i)
+                    s += 1
+                if s > 0:
+                    for k in range(s):
+                        result.append(i)  # i is a pf s times
+                        if n == 1:
+                            return result
+
+        while np_used <= max_procs:
+            a = 1
+
+            while a <= np_used:
+                prcs_var = np_used % a
+                if prcs_var != 0:
+                    a += 1
+                elif prcs_var == 0:
+                    npex = a
+                    npey = int(np_used / npex)
+
+                    if tpn != 0:                                   # XXX
+
+                        if np_used % tpn != 0:
+                            a += 1
+                            continue
+
+                    if dnpexnpey != 0 and npex / npey != dnpexnpey:
+                        a += 1
+                        continue
+
+                    if dnpexnpey != 0:
+
+
+                        if float(npex) / float(npey) < (dnpexnpey - dnpexnpey*dnpexnpey_tol/100):
+                            a += 1
+                            continue
+
+                        if float(npex) / float(npey) > (dnpexnpey + dnpexnpey*dnpexnpey_tol/100):
+                            a += 1
+                            continue
+
+                    while nx <= nx_max:
+                        if (nx + 1) % npex != 0:
+                            nx += 1
+                            continue
+
+                        if mlt_grid is True and (nx + 1) % 2 != 0:
+                            nx += 1
+                            continue
+
+                        if switch is True and (nx + 1) % npey != 0:
+                            nx += 1
+                            continue
+                        if npex > nx:
+                            nx += 1
+                            continue
+
+                        while ny <= ny_max:
+
+                            if dnxny != 0 and float(nx) / float(ny) != float(dnxny):
+                                ny += 1
+                                continue
+                            if (ny + 1) % npey != 0:
+                                ny += 1
+                                continue
+
+                            #if mlt_grid is True and ny % 2 != 0:       mlt and mlt_noOpt have same cond.
+                            #    ny += 1
+                            #    continue
+
+                            if (ny + 1) % npex != 0 and switch is True:
+                                ny += 1
+                                continue
+                            if npey > ny:
+                                ny += 1
+                                continue
+
+                            while nz <= nz_max:
+
+                                if mlt_grid is True and nz % 2 != 0:
+                                    nz += 1
+                                    continue
+
+                                if poisfft is True and nz % npex != 0:
+                                    nz += 1
+                                    continue
+
+                                if spectr is True and nz % npey != 0:
+                                    nz += 1
+                                    continue
+
+                                if tempterton is True and nx > 1 and ny > 1:  # and nz < 1:
+
+                                    nx_list = factors(nx + 1)
+
+                                    i = 0
+                                    nx_var = nx_list[i]
+
+
+                                    while i < len(nx_list):
+                                        if nx_var != 2 or nx_var != 3 or nx_var != 5:
+                                            i += 1
+                                            continue
+
+                                        i += 1
+                                    ny_list = factors(ny + 1)
+                                    i = 0
+                                    ny_var = ny_list[i]
+                                    while i < len(ny_list):
+                                        if ny_var != 2 or ny_var != 3 or ny_var != 5:
+                                            i += 1
+                                            continue
+                                        i += 1
+
+                                counter += 1
+                                if counter > int(result_thrs):
+                                    break
+
+                                npxnpy = format(float(npex) / float(npey), '.2f')
+                                nxpex = float(nx+1) /float(npex)
+                                nypey = float(ny+1) /float(npey)
+
+                                c.execute(
+                                    """INSERT OR REPLACE INTO grid_current(nx, ny, nz, npex, npey, npxnpy, np, ngpts, nxnpex, nynpey) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
+                                    (nx, ny, nz, npex, npey, npxnpy, (npex * npey), (nx * ny * nz), nxpex, nypey))
+
+                                nz += 1
+                            nz = nz_min
+                            ny += 1
+                        ny = ny_min
+                        nx += 1
+                    nx = nx_min
+                    a += 1
+                    #  a += 1
+            np_used += 1
+            progr_act = 100*(float(np_used-1)/float(max_procs))
+            self.emit(QtCore.SIGNAL('check'), progr_act)
+            #print(np_used, max_procs, progr_act)
+            self.emit(QtCore.SIGNAL('progress'), progr_act)
+
+            conn.commit()
+
+        conn.commit()
+        #c.close()
+        #conn.close()
+        #
+        ## ********************************
+        #
+        #conn = sqlite3.connect(parameters[19] + '/.palm_gf_data.db')
+        #print parameters[19] + '/.palm_gf_data.db'
+        #c = conn.cursor()
+        try:
+            c.execute("SELECT nx FROM grid_current ORDER BY nx DESC LIMIT 1")
+            mx_nx = c.fetchone()[0]
+            # print(mx_nx)
+            c.execute("SELECT nx FROM grid_current ORDER BY nx  LIMIT 1")
+            mn_nx = c.fetchone()[0]
+            # print(mn_nx)
+            c.execute("SELECT ny FROM grid_current ORDER BY ny DESC LIMIT 1")
+            mx_ny = c.fetchone()[0]
+            # print(mx_ny)
+            c.execute("SELECT ny FROM grid_current ORDER BY ny  LIMIT 1")
+            mn_ny = c.fetchone()[0]
+            # print(mn_ny)
+            c.execute("SELECT nz FROM grid_current ORDER BY nz DESC LIMIT 1")
+            mx_nz = c.fetchone()[0]
+            # print(mx_nz)
+            c.execute("SELECT nz FROM grid_current ORDER BY nz  LIMIT 1")
+            mn_nz = c.fetchone()[0]
+            # print(mn_nz)
+            c.execute("SELECT npex FROM grid_current ORDER BY npex DESC LIMIT 1")
+            mx_npex = c.fetchone()[0]
+            # print(mx_npex)
+            c.execute("SELECT npex FROM grid_current ORDER BY npex  LIMIT 1")
+            mn_npex = c.fetchone()[0]
+            # print(mn_npex)
+            c.execute("SELECT npey FROM grid_current ORDER BY npey DESC LIMIT 1")
+            mx_npey = c.fetchone()[0]
+            # print(mx_npey)
+            c.execute("SELECT npey FROM grid_current ORDER BY npey  LIMIT 1")
+            mn_npey = c.fetchone()[0]
+            # print(mn_npey)
+            c.execute("SELECT npxnpy FROM grid_current ORDER BY npxnpy DESC LIMIT 1")
+            mx_npxnpy = c.fetchone()[0]
+            # print(mx_npxnpy)
+            c.execute("SELECT npxnpy FROM grid_current ORDER BY npxnpy  LIMIT 1")
+            mn_npxnpy = c.fetchone()[0]
+            # print(mn_npxnpy)
+            c.execute("SELECT np FROM grid_current ORDER BY np DESC LIMIT 1")
+            mx_np = c.fetchone()[0]
+            # print(mx_np)
+            c.execute("SELECT np FROM grid_current ORDER BY np LIMIT 1")
+            mn_np = c.fetchone()[0]
+            # print(mn_np)
+            c.execute("SELECT ngpts FROM grid_current ORDER BY ngpts DESC LIMIT 1")
+            mx_ngpts = c.fetchone()[0]
+            # print(mx_ngpts)
+            c.execute("SELECT ngpts FROM grid_current ORDER BY ngpts LIMIT 1")
+            mn_ngpts = c.fetchone()[0]
+            # print(mn_ngpts)
+            c.execute("SELECT nxnpex FROM grid_current ORDER BY nxnpex DESC LIMIT 1")
+            mx_nxpex = c.fetchone()[0]
+            c.execute("SELECT nxnpex FROM grid_current ORDER BY nxnpex LIMIT 1")
+            mn_nxpex = c.fetchone()[0]
+            c.execute("SELECT nynpey FROM grid_current ORDER BY nynpey DESC LIMIT 1")
+            mx_nypey = c.fetchone()[0]
+            c.execute("SELECT nynpey FROM grid_current ORDER BY nynpey LIMIT 1")
+            mn_nypey = c.fetchone()[0]
+
+
+
+            conn.commit()
+            c.execute(
+                """INSERT OR REPLACE INTO grid_limits(nx, ny, nz, npex, npey, npxnpy, np, ngpts, nxnpex, nynpey) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
+                (mn_nx, mn_ny, mn_nz, mn_npex, mn_npey, mn_npxnpy, mn_np, mn_ngpts, mn_nxpex, mn_nypey))
+
+            c.execute(
+                """INSERT OR REPLACE INTO grid_limits(nx, ny, nz, npex, npey, npxnpy, np, ngpts, nxnpex, nynpey) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
+                (mx_nx, mx_ny, mx_nz, mx_npex, mx_npey, mx_npxnpy, mx_np, mx_ngpts, mx_nxpex, mx_nypey))
+            conn.commit()
+
+            c.close()
+            conn.close()
+        except TypeError:
+
+            checkfile = open(".palm_gf_tmp", "w")
+            if counter != 0:
+                checkfile.write("Gridfinder found " + str(counter) + " results.\n1")
+            else:
+                checkfile.write("Check input, no Results found.\n0")
+            checkfile.close()
+
+        checkfile = open(".palm_gf_tmp", "w")
+        if counter != 0:
+            checkfile.write("Gridfinder found " + str(counter) + " results.\n1")
+        else:
+            checkfile.write("Check input, no Results found.\n0")
+        checkfile.close()
+        self.emit(QtCore.SIGNAL('finish'), 1)
+        #print("finished with main execute")
+
+
+
+
+
+qtpopupFile = palm_bin + '/palm_gf_files/palm_gf_settings.ui'
+Ui_Pop, QtBaseClass = uic.loadUiType(qtpopupFile)
+
+
+class MyPopup(QtGui.QWidget, Ui_Pop):
+
+    def __init__(self):
+        Qt.QWidget.__init__(self)
+        Ui_Pop.__init__(self)
+
+        self.setupUi(self)
+        self.show
+        self.savepath.clicked.connect(self.path_to_save)
+        self.begin_check()
+        self.buttonBox.accepted.connect(self.end_check)
+        self.buttonBox.rejected.connect(self.close)
+
+
+    def begin_check(self):
+        file_check = palm_dir + '/trunk/SCRIPTS/.palm_gf_config'
+        if os.path.isfile(file_check) is True:
+            parameters = config_wr.read_config_settings()
+            self.linepath.setText(parameters[0])
+            self.result_thres.setValue(int(parameters[1]))
+            self.load_thres.setValue(int(parameters[2]))
+
+    def end_check(self):
+        config_wr.write_config_settings(self.linepath.text(), self.result_thres.value(), self.load_thres.value())
+
+        self.close()
+
+
+
+
+
+    def path_to_save(self, wildcard= None):
+        import wx
+        app = wx.App(None)
+        style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
+        dialog = wx.DirDialog(None, 'Open')
+        if dialog.ShowModal() == wx.ID_OK:
+            path = str(dialog.GetPath())
+
+            print(path)
+            self.linepath.setText(path)
+
+
+
+        else:
+            path = None
+        dialog.Destroy()
+        return
+
+
+
+
+
+
+
+
+if __name__ == "__main__":
+    import time
+    app = QtGui.QApplication(sys.argv)
+    window = MyApp1()
+    window.setWindowTitle('Gridfinder')
+    window.show()
+    sys.exit(app.exec_())
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf.ui	(revision 3477)
@@ -0,0 +1,1322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>584</width>
+    <height>386</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>584</width>
+    <height>375</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>584</width>
+    <height>622</height>
+   </size>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QFrame" name="frame_2">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>361</width>
+      <height>201</height>
+     </rect>
+    </property>
+    <property name="frameShape">
+     <enum>QFrame::StyledPanel</enum>
+    </property>
+    <property name="frameShadow">
+     <enum>QFrame::Raised</enum>
+    </property>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>237</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Define numerical grid</string>
+     </property>
+    </widget>
+    <widget class="QWidget" name="horizontalLayoutWidget_2">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>60</y>
+       <width>283</width>
+       <height>41</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QSpinBox" name="nx_min_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum of number of Gridpoints in X-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="ny_min_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum of number of Gridpoints in Y-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="nz_min_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum of number of Gridpoints in Z-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QWidget" name="horizontalLayoutWidget_3">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>100</y>
+       <width>283</width>
+       <height>41</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_3">
+      <item>
+       <widget class="QSpinBox" name="nx_max_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Maximum of number of Gridpoints in X-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="autoFillBackground">
+         <bool>false</bool>
+        </property>
+        <property name="styleSheet">
+         <string notr="true"/>
+        </property>
+        <property name="frame">
+         <bool>true</bool>
+        </property>
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="ny_max_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Maxmimum of number of Gridpoints in Y-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="nz_max_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Maximum of number of Gridpoints in Z-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="minimum">
+         <number>1</number>
+        </property>
+        <property name="maximum">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QDoubleSpinBox" name="dnxny_box">
+     <property name="geometry">
+      <rect>
+       <x>150</x>
+       <y>160</y>
+       <width>72</width>
+       <height>22</height>
+      </rect>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Defines Ratio between the number of Gridpoints in X- and Y-direction.&lt;/p&gt;&lt;p&gt;If nx/ny = 0 , option is deactivated&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="maximum">
+      <double>1000.000000000000000</double>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_11">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>160</y>
+       <width>149</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Defines Ratio between the number of Gridpoints in X- and Y-direction.&lt;/p&gt;&lt;p&gt;If nx/ny = 0 , option is deactivated&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="text">
+      <string>Set fixed ratio (nx / ny):</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_3">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>41</y>
+       <width>86</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>24</height>
+      </size>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of Gridpoints in X-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="text">
+      <string>  nx</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_5">
+     <property name="geometry">
+      <rect>
+       <x>260</x>
+       <y>41</y>
+       <width>41</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>24</height>
+      </size>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of Gridpoints in Y-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="text">
+      <string>   nz</string>
+     </property>
+     <property name="scaledContents">
+      <bool>false</bool>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_4">
+     <property name="geometry">
+      <rect>
+       <x>162</x>
+       <y>41</y>
+       <width>41</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>27</height>
+      </size>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of Gridpoints in Z-direction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="text">
+      <string>    ny</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_6">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>60</y>
+       <width>80</width>
+       <height>37</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Minimum</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_7">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>104</y>
+       <width>83</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Maximum</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="warning_label">
+     <property name="geometry">
+      <rect>
+       <x>230</x>
+       <y>155</y>
+       <width>121</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="autoFillBackground">
+      <bool>false</bool>
+     </property>
+     <property name="styleSheet">
+      <string notr="true"/>
+     </property>
+     <property name="text">
+      <string>Input error! Min &gt; Max</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QFrame" name="frame">
+    <property name="geometry">
+     <rect>
+      <x>360</x>
+      <y>0</y>
+      <width>211</width>
+      <height>221</height>
+     </rect>
+    </property>
+    <property name="frameShape">
+     <enum>QFrame::StyledPanel</enum>
+    </property>
+    <property name="frameShadow">
+     <enum>QFrame::Raised</enum>
+    </property>
+    <widget class="QLabel" name="label_2">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>204</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Define processor topology</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_14">
+     <property name="geometry">
+      <rect>
+       <x>20</x>
+       <y>40</y>
+       <width>141</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>141</width>
+       <height>16</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>141</width>
+       <height>16</height>
+      </size>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of processors used for calculation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="text">
+      <string>Number of processors:</string>
+     </property>
+    </widget>
+    <widget class="Line" name="line">
+     <property name="geometry">
+      <rect>
+       <x>0</x>
+       <y>105</y>
+       <width>201</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_20">
+     <property name="geometry">
+      <rect>
+       <x>22</x>
+       <y>61</y>
+       <width>89</width>
+       <height>22</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Minimum</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_21">
+     <property name="geometry">
+      <rect>
+       <x>22</x>
+       <y>94</y>
+       <width>61</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Maximum</string>
+     </property>
+    </widget>
+    <widget class="QSpinBox" name="np_max_box">
+     <property name="geometry">
+      <rect>
+       <x>110</x>
+       <y>90</y>
+       <width>83</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>83</width>
+       <height>25</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>83</width>
+       <height>25</height>
+      </size>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Maximum of number of processors used for calculation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="minimum">
+      <number>1</number>
+     </property>
+     <property name="maximum">
+      <number>10000000</number>
+     </property>
+    </widget>
+    <widget class="QSpinBox" name="np_min_box">
+     <property name="geometry">
+      <rect>
+       <x>110</x>
+       <y>59</y>
+       <width>83</width>
+       <height>25</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>83</width>
+       <height>25</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>83</width>
+       <height>25</height>
+      </size>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum of number of processors used for calculation.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="minimum">
+      <number>1</number>
+     </property>
+     <property name="maximum">
+      <number>10000</number>
+     </property>
+    </widget>
+    <widget class="QWidget" name="layoutWidget">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>130</y>
+       <width>182</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QCheckBox" name="strict_box">
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fixed value for the tasks per node&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="text">
+         <string>Strict Matching</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="tpn_box">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>72</width>
+          <height>25</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>72</width>
+          <height>25</height>
+         </size>
+        </property>
+        <property name="toolTip">
+         <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fixed value for the tasks per node&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+        </property>
+        <property name="maximum">
+         <number>10000</number>
+        </property>
+        <property name="value">
+         <number>24</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+    <widget class="QSlider" name="tolerance_bar">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>190</y>
+       <width>121</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tolerance for npex / npey&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="value">
+      <number>10</number>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QSpinBox" name="tolerance_value">
+     <property name="geometry">
+      <rect>
+       <x>131</x>
+       <y>190</y>
+       <width>61</width>
+       <height>22</height>
+      </rect>
+     </property>
+     <property name="toolTip">
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tolerance for npex / npey in percent&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="value">
+      <number>10</number>
+     </property>
+    </widget>
+    <widget class="QWidget" name="layoutWidget">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>160</y>
+       <width>181</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_4">
+      <item>
+       <widget class="QCheckBox" name="npex_npey_box">
+        <property name="text">
+         <string>npex / npey</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QDoubleSpinBox" name="d_box">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>72</width>
+          <height>25</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>72</width>
+          <height>25</height>
+         </size>
+        </property>
+        <property name="maximum">
+         <double>1000.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </widget>
+   <widget class="QFrame" name="frame_3">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>200</y>
+      <width>172</width>
+      <height>131</height>
+     </rect>
+    </property>
+    <property name="frameShape">
+     <enum>QFrame::StyledPanel</enum>
+    </property>
+    <property name="frameShadow">
+     <enum>QFrame::Raised</enum>
+    </property>
+    <widget class="QLabel" name="label_9">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>161</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Pressure solver</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_12">
+     <property name="geometry">
+      <rect>
+       <x>12</x>
+       <y>37</y>
+       <width>119</width>
+       <height>15</height>
+      </rect>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>1</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>Method (psolver):</string>
+     </property>
+    </widget>
+    <widget class="QComboBox" name="psolver_box">
+     <property name="geometry">
+      <rect>
+       <x>11</x>
+       <y>57</y>
+       <width>119</width>
+       <height>20</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Ignored" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>18</height>
+      </size>
+     </property>
+     <property name="acceptDrops">
+      <bool>true</bool>
+     </property>
+     <property name="frame">
+      <bool>true</bool>
+     </property>
+     <item>
+      <property name="text">
+       <string>-</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>poisfft</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>multigrid_noopt</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>multigrid</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>sor</string>
+      </property>
+     </item>
+    </widget>
+    <widget class="QLabel" name="fft_method_label">
+     <property name="geometry">
+      <rect>
+       <x>12</x>
+       <y>80</y>
+       <width>131</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Specify FFT-method:</string>
+     </property>
+    </widget>
+    <widget class="QComboBox" name="fft_method_box">
+     <property name="geometry">
+      <rect>
+       <x>11</x>
+       <y>99</y>
+       <width>119</width>
+       <height>20</height>
+      </rect>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>18</height>
+      </size>
+     </property>
+     <item>
+      <property name="text">
+       <string>-</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>FFTW</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Temperton</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Singleton</string>
+      </property>
+     </item>
+    </widget>
+   </widget>
+   <widget class="QFrame" name="frame_4">
+    <property name="geometry">
+     <rect>
+      <x>170</x>
+      <y>200</y>
+      <width>181</width>
+      <height>131</height>
+     </rect>
+    </property>
+    <property name="frameShape">
+     <enum>QFrame::StyledPanel</enum>
+    </property>
+    <property name="frameShadow">
+     <enum>QFrame::Raised</enum>
+    </property>
+    <widget class="QLabel" name="label_16">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>91</width>
+       <height>16</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>Misc</string>
+     </property>
+    </widget>
+    <widget class="QCheckBox" name="Oos_checkbox">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>161</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="toolTip">
+      <string>Hallo, ich bin ein Test-toolTip. Hier kÃ¶nnte eine tolle erklÃ€rung zu dieser SchaltflÃ€che stehen.</string>
+     </property>
+     <property name="text">
+      <string>Output of spectra</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="filename_line">
+     <property name="geometry">
+      <rect>
+       <x>24</x>
+       <y>104</y>
+       <width>100</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>23</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>100</width>
+       <height>23</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>FILENAME.db</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="save_button">
+     <property name="geometry">
+      <rect>
+       <x>125</x>
+       <y>104</y>
+       <width>45</width>
+       <height>23</height>
+      </rect>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>23</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>45</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>Save</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="verticalLayoutWidget_8">
+    <property name="geometry">
+     <rect>
+      <x>380</x>
+      <y>240</y>
+      <width>197</width>
+      <height>31</height>
+     </rect>
+    </property>
+    <layout class="QVBoxLayout" name="verticalLayout_8">
+     <item>
+      <widget class="QLabel" name="result_label">
+       <property name="text">
+        <string>placeholder, should never be seen</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </widget>
+   <widget class="QLabel" name="result_headline">
+    <property name="geometry">
+     <rect>
+      <x>370</x>
+      <y>218</y>
+      <width>179</width>
+      <height>20</height>
+     </rect>
+    </property>
+    <property name="font">
+     <font>
+      <weight>75</weight>
+      <bold>true</bold>
+     </font>
+    </property>
+    <property name="toolTip">
+     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;tolerance for npex / npey&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+    </property>
+    <property name="text">
+     <string>Results</string>
+    </property>
+   </widget>
+   <widget class="Line" name="line_res_down">
+    <property name="geometry">
+     <rect>
+      <x>360</x>
+      <y>300</y>
+      <width>201</width>
+      <height>20</height>
+     </rect>
+    </property>
+    <property name="orientation">
+     <enum>Qt::Horizontal</enum>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="view_result_button">
+    <property name="geometry">
+     <rect>
+      <x>490</x>
+      <y>281</y>
+      <width>75</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="text">
+     <string>View results</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="load_text_label">
+    <property name="geometry">
+     <rect>
+      <x>379</x>
+      <y>281</y>
+      <width>42</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>0</width>
+      <height>23</height>
+     </size>
+    </property>
+    <property name="toolTip">
+     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of results you want to load in this Ui.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+    </property>
+    <property name="text">
+     <string>  Load</string>
+    </property>
+   </widget>
+   <widget class="QSpinBox" name="nor_spinbox">
+    <property name="enabled">
+     <bool>false</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>420</x>
+      <y>281</y>
+      <width>61</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>0</width>
+      <height>23</height>
+     </size>
+    </property>
+    <property name="maximum">
+     <number>9999</number>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="startbutton">
+    <property name="geometry">
+     <rect>
+      <x>490</x>
+      <y>324</y>
+      <width>75</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>0</width>
+      <height>23</height>
+     </size>
+    </property>
+    <property name="maximumSize">
+     <size>
+      <width>16777215</width>
+      <height>23</height>
+     </size>
+    </property>
+    <property name="toolTip">
+     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Starts calculation with the given parameters.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+    </property>
+    <property name="text">
+     <string>Start</string>
+    </property>
+    <property name="iconSize">
+     <size>
+      <width>18</width>
+      <height>18</height>
+     </size>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="quitbutton">
+    <property name="geometry">
+     <rect>
+      <x>415</x>
+      <y>324</y>
+      <width>75</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>0</width>
+      <height>23</height>
+     </size>
+    </property>
+    <property name="text">
+     <string>Quit</string>
+    </property>
+    <property name="iconSize">
+     <size>
+      <width>18</width>
+      <height>18</height>
+     </size>
+    </property>
+   </widget>
+   <widget class="QProgressBar" name="testbar">
+    <property name="geometry">
+     <rect>
+      <x>364</x>
+      <y>239</y>
+      <width>206</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="value">
+     <number>0</number>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="question_box">
+    <property name="geometry">
+     <rect>
+      <x>395</x>
+      <y>324</y>
+      <width>21</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>?</string>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>584</width>
+     <height>20</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuGridfinder">
+    <property name="title">
+     <string>Gridfinder</string>
+    </property>
+    <addaction name="actionSetting"/>
+    <addaction name="actionSchlie_en"/>
+   </widget>
+   <addaction name="menuGridfinder"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionSchlie_en">
+   <property name="text">
+    <string>SchlieÃen</string>
+   </property>
+  </action>
+  <action name="actionSetting">
+   <property name="text">
+    <string>Settings</string>
+   </property>
+  </action>
+ </widget>
+ <tabstops>
+  <tabstop>nx_min_box</tabstop>
+  <tabstop>nx_max_box</tabstop>
+  <tabstop>ny_min_box</tabstop>
+  <tabstop>ny_max_box</tabstop>
+  <tabstop>nz_min_box</tabstop>
+  <tabstop>nz_max_box</tabstop>
+  <tabstop>np_min_box</tabstop>
+  <tabstop>np_max_box</tabstop>
+  <tabstop>tpn_box</tabstop>
+  <tabstop>d_box</tabstop>
+  <tabstop>dnxny_box</tabstop>
+  <tabstop>psolver_box</tabstop>
+  <tabstop>fft_method_box</tabstop>
+  <tabstop>startbutton</tabstop>
+  <tabstop>nor_spinbox</tabstop>
+  <tabstop>view_result_button</tabstop>
+  <tabstop>save_button</tabstop>
+  <tabstop>quitbutton</tabstop>
+  <tabstop>filename_line</tabstop>
+  <tabstop>Oos_checkbox</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>quitbutton</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>448</x>
+     <y>335</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>291</x>
+     <y>187</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>strict_box</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>tpn_box</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>422</x>
+     <y>193</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>514</x>
+     <y>193</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>npex_npey_box</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>d_box</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>422</x>
+     <y>193</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>513</x>
+     <y>193</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>tolerance_bar</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>tolerance_value</receiver>
+   <slot>setValue(int)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>430</x>
+     <y>221</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>521</x>
+     <y>220</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>npex_npey_box</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>tolerance_bar</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>422</x>
+     <y>193</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>430</x>
+     <y>221</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>npex_npey_box</sender>
+   <signal>clicked(bool)</signal>
+   <receiver>tolerance_value</receiver>
+   <slot>setVisible(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>422</x>
+     <y>193</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>521</x>
+     <y>220</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>tolerance_value</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>tolerance_bar</receiver>
+   <slot>setValue(int)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>521</x>
+     <y>220</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>430</x>
+     <y>221</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_conf.py
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_conf.py	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_conf.py	(revision 3477)
@@ -0,0 +1,290 @@
+def write_config(np_min, np_max, nx_min, nx_max, ny_min, ny_max, nz_min, nz_max, tpn, dnpexnpey, dnpexnpey_tolerance, dnxny, poisfft, switch,
+                 temperton, mlt_grid, spectr, rslt_thrs, ld_thrs):
+    #from configparser import ConfigParser  # windows
+    from ConfigParser import ConfigParser  # Linux
+
+    # if __name__ == "__main__":
+    cfg = ConfigParser()
+
+    import os.path
+    if os.path.exists('.palm_gf_conf') is False:
+        cfg.add_section("processor_topology")
+        cfg.add_section("numerical_grid")
+        cfg.add_section("method")
+
+    #cfg.add_section("processor_topology")
+    cfg.set("processor_topology", "np_min", np_min)
+    cfg.set("processor_topology", "np_max", np_max)
+    cfg.set("processor_topology", "tasks_per_node", tpn)
+    cfg.set("processor_topology", "dnpexnpey", dnpexnpey)
+    cfg.set("processor_topology", "dnpexnpey_tolerance", dnpexnpey_tolerance)
+    cfg.set("processor_topology", "dnxny", dnxny)
+
+    #cfgadd_section("numerical_grid").
+    cfg.set("numerical_grid", "nx_min", nx_min)
+    cfg.set("numerical_grid", "nx_max", nx_max)
+    cfg.set("numerical_grid", "ny_min", ny_min)
+    cfg.set("numerical_grid", "ny_max", ny_max)
+    cfg.set("numerical_grid", "nz_min", nz_min)
+    cfg.set("numerical_grid", "nz_max", nz_max)
+
+    #cfg.add_section("method")
+    cfg.set("method", "poisfft", poisfft)
+    cfg.set("method", "switch", switch)
+    cfg.set("method", "temperton", temperton)
+    cfg.set("method", "mlt_grid", mlt_grid)
+    cfg.set("method", "spectr", spectr)
+
+    #cfg.add_section("settings")
+    #cfg.set("settings", "path", path)
+    #cfg.set("settings", "result_threshold", rslt_thrs)
+    #cfg.set("settings", "load_threshold", ld_thrs)
+
+
+    with open(".palm_gf_config", "a") as configfile:
+        cfg.write(configfile)
+
+
+def read_config():
+    #from configparser import ConfigParser  # windows
+    from ConfigParser import ConfigParser  # Linux
+
+
+    cfg = ConfigParser()
+
+    cfg.read(".palm_gf_config")
+    np_min = cfg.get("processor_topology", "np_min")
+    np_max = cfg.get("processor_topology", "np_max")
+    tpn = cfg.get("processor_topology", "tasks_per_node")
+    dnpexnpey = cfg.get("processor_topology", "dnpexnpey")
+    dnpexnpey_tolerance = cfg.get("processor_topology", "dnpexnpey_tolerance")
+    dnxny = cfg.get("processor_topology", "dnxny")
+
+    nx_min = cfg.get("numerical_grid", "nx_min")
+    nx_max = cfg.get("numerical_grid", "nx_max")
+    ny_min = cfg.get("numerical_grid", "ny_min")
+    ny_max = cfg.get("numerical_grid", "ny_max")
+    nz_min = cfg.get("numerical_grid", "nz_min")
+    nz_max = cfg.get("numerical_grid", "nz_max")
+
+    poisfft = cfg.get("method", "poisfft")
+    switch = cfg.get("method", "switch")
+    temperton = cfg.get("method", "temperton")
+    mlt_grid = cfg.get("method", "mlt_grid")
+    spectr = cfg.get("method", "spectr")
+
+    import ConfigParser as conf
+    try:
+        result_threshold = cfg.get("settings", "result_threshold")
+        load_threshold = cfg.get("settings", "load_threshold")
+        path = cfg.get("settings", 'path')
+
+    except conf.NoSectionError:
+
+        path = '/localdata/'
+        result_threshold = 250000
+        load_threshold = 100000
+
+    return np_min, np_max, tpn, dnpexnpey, dnpexnpey_tolerance, dnxny, nx_min, nx_max, ny_min, ny_max, nz_min, nz_max, poisfft, switch, temperton, mlt_grid, spectr, result_threshold, load_threshold, path
+
+
+def write_config_settings(path, rslt_thrs, ld_thrs):
+
+    from ConfigParser import ConfigParser
+
+    cfg = ConfigParser()
+
+    cfg.add_section('settings')
+
+    cfg.set('settings', 'path', path)
+    cfg.set('settings', "result_threshold", rslt_thrs)
+    cfg.set('settings', "load_threshold", ld_thrs)
+
+    with open(".palm_gf_config", "a") as configfile:
+        cfg.write(configfile)
+
+
+def read_config_settings():
+
+    from ConfigParser import ConfigParser
+    import ConfigParser as con
+
+    cfg = ConfigParser()
+    cfg.read(".palm_gf_config")
+
+    try:
+        path = cfg.get("settings", "path")
+        result_thrs = cfg.get("settings", "result_threshold")
+        load_thrs = cfg.get("settings", "load_threshold")
+
+    except con.NoSectionError:
+
+        path = '/localdata/'
+        result_thrs = 250000
+        load_thrs = 100000
+
+    except con.NoOptionError:
+
+        path = '/localdata/'
+        result_thrs = 250000
+        load_thrs = 100000
+
+    #print path, result_thrs, load_thrs
+
+    return path, result_thrs, load_thrs
+
+
+# ***********************************************
+
+
+def closing_cleanup():
+    from ConfigParser import ConfigParser  # Linux
+    import ConfigParser as conf
+    import os, shutil, time
+
+    cfg = ConfigParser()
+
+    try:
+
+        cfg.read(".palm_gf_config")
+        np_min = cfg.get("processor_topology", "np_min")
+        np_max = cfg.get("processor_topology", "np_max")
+        tpn = cfg.get("processor_topology", "tasks_per_node")
+        dnpexnpey = cfg.get("processor_topology", "dnpexnpey")
+        dnpexnpey_tolerance = cfg.get("processor_topology", "dnpexnpey_tolerance")
+        dnxny = cfg.get("processor_topology", "dnxny")
+
+        nx_min = cfg.get("numerical_grid", "nx_min")
+        nx_max = cfg.get("numerical_grid", "nx_max")
+        ny_min = cfg.get("numerical_grid", "ny_min")
+        ny_max = cfg.get("numerical_grid", "ny_max")
+        nz_min = cfg.get("numerical_grid", "nz_min")
+        nz_max = cfg.get("numerical_grid", "nz_max")
+
+        poisfft = cfg.get("method", "poisfft")
+        switch = cfg.get("method", "switch")
+        temperton = cfg.get("method", "temperton")
+        mlt_grid = cfg.get("method", "mlt_grid")
+        spectr = cfg.get("method", "spectr")
+
+        var1_bool = True
+
+    except conf.NoSectionError:
+        np_min = 0
+        np_max = 0
+        tpn = 0
+        dnpexnpey = 0
+        dnpexnpey_tolerance = 0
+        dnxny = 0
+
+        nx_min = 0
+        nx_max = 0
+        ny_min = 0
+        ny_max = 0
+        nz_min = 0
+        nz_max = 0
+
+        poisfft = False
+        switch = False
+        temperton = False
+        mlt_grid = False
+        spectr = False
+        var1_bool = False
+
+    with open(".palm_gf_config", "w") as configfile:
+        cfg.write(configfile)
+
+    try:
+        cfg.read(".palm_gf_config")
+        rslt_thrs = cfg.get("settings", "result_threshold")
+        ld_thrs = cfg.get("settings", "load_threshold")
+        path = cfg.get("settings", 'path')
+
+        var2_bool = True
+
+    except conf.NoSectionError:
+
+        path = '/localdata/'
+        rslt_thrs = 250000
+        ld_thrs = 100000
+
+        var2_bool = False
+
+
+
+    with open(".palm_gf_config", "w") as configfile:
+        cfg.write(configfile)
+
+
+
+    #os.remove('.palm_gf_config')
+
+
+
+    try:
+        cfg.set("processor_topology", "np_min", np_min)
+        cfg.set("processor_topology", "np_max", np_max)
+        cfg.set("processor_topology", "tasks_per_node", tpn)
+        cfg.set("processor_topology", "dnpexnpey", dnpexnpey)
+        cfg.set("processor_topology", "dnpexnpey_tolerance", dnpexnpey_tolerance)
+        cfg.set("processor_topology", "dnxny", dnxny)
+
+
+        cfg.set("numerical_grid", "nx_min", nx_min)
+        cfg.set("numerical_grid", "nx_max", nx_max)
+        cfg.set("numerical_grid", "ny_min", ny_min)
+        cfg.set("numerical_grid", "ny_max", ny_max)
+        cfg.set("numerical_grid", "nz_min", nz_min)
+        cfg.set("numerical_grid", "nz_max", nz_max)
+
+
+        cfg.set("method", "poisfft", poisfft)
+        cfg.set("method", "switch", switch)
+        cfg.set("method", "temperton", temperton)
+        cfg.set("method", "mlt_grid", mlt_grid)
+        cfg.set("method", "spectr", spectr)
+
+    except conf.NoSectionError:
+        cfg.add_section("processor_topology")
+        cfg.set("processor_topology", "np_min", np_min)
+        cfg.set("processor_topology", "np_max", np_max)
+        cfg.set("processor_topology", "tasks_per_node", tpn)
+        cfg.set("processor_topology", "dnpexnpey", dnpexnpey)
+        cfg.set("processor_topology", "dnpexnpey_tolerance", dnpexnpey_tolerance)
+        cfg.set("processor_topology", "dnxny", dnxny)
+
+        cfg.add_section("numerical_grid")
+        cfg.set("numerical_grid", "nx_min", nx_min)
+        cfg.set("numerical_grid", "nx_max", nx_max)
+        cfg.set("numerical_grid", "ny_min", ny_min)
+        cfg.set("numerical_grid", "ny_max", ny_max)
+        cfg.set("numerical_grid", "nz_min", nz_min)
+        cfg.set("numerical_grid", "nz_max", nz_max)
+
+        cfg.add_section("method")
+        cfg.set("method", "poisfft", poisfft)
+        cfg.set("method", "switch", switch)
+        cfg.set("method", "temperton", temperton)
+        cfg.set("method", "mlt_grid", mlt_grid)
+        cfg.set("method", "spectr", spectr)
+
+
+    try:
+        cfg.set("settings", "path", path)
+        cfg.set("settings", "result_threshold", rslt_thrs)
+        cfg.set("settings", "load_threshold", ld_thrs)
+
+    except conf.NoSectionError:
+        cfg.add_section("settings")
+        cfg.set("settings", "path", path)
+        cfg.set("settings", "result_threshold", rslt_thrs)
+        cfg.set("settings", "load_threshold", ld_thrs)
+
+
+
+
+
+
+    with open(".palm_gf_config", "w") as configfile:
+        cfg.write(configfile)
+
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_exec.py
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_exec.py	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_exec.py	(revision 3477)
@@ -0,0 +1,320 @@
+def grid_executer():
+    import palm_gf_conf as config_wr
+    import sqlite3
+    conn = sqlite3.connect(".palm_gf_data.db")
+    c = conn.cursor()
+    c.execute("DROP TABLE IF EXISTS grid_current")
+    c.execute("DROP TABLE IF EXISTS grid_limits")
+    c.execute("CREATE TABLE IF NOT EXISTS grid_current(nx INT, ny INT, nz INT, npex INT, npey INT, npxnpy FLOAT, np INT, ngpts INT)")
+    c.execute("CREATE TABLE IF NOT EXISTS grid_limits(nx INT, ny INT, nz INT, npex INT, npey INT, npxnpy FLOAT, np INT, ngpts INT)")
+    conn.commit()
+    main_bool = True
+    parameters = config_wr.read_config()
+    print(parameters)
+    min_procs = int(parameters[0])
+    max_procs = int(parameters[1])
+    tpn = int(parameters[2])
+    dnpexnpey = float(parameters[3])
+    dnxny = float(parameters[4])
+    nx_min = int(parameters[5])
+    nx_max = int(parameters[6])
+    ny_min = int(parameters[7])
+    ny_max = int(parameters[8])
+    nz_min = int(parameters[9])
+    nz_max = int(parameters[10])
+    poisfft = parameters[11]
+    switch = parameters[12]
+    tempterton = parameters[13]
+    mlt_grid = parameters[14]
+    spectr = parameters[15]
+
+    if poisfft == str(True):
+        poisfft = True
+    else:
+        poisfft = False
+
+    if switch == str(True):
+        switch = True
+    else:
+        switch = False
+
+    if tempterton == str(True):
+        tempterton = True
+    else:
+        tempterton = False
+
+    if mlt_grid == str(True):
+        mlt_grid = True
+    else:
+        mlt_grid = False
+
+    if spectr == str(True):
+        spectr = True
+    else:
+        spectr = False
+
+    print(spectr, type(spectr))
+    print(poisfft, switch, tempterton, mlt_grid, spectr)
+
+    np_used = min_procs
+    counter = 0
+
+    nx = nx_min
+    ny = ny_min
+    nz = nz_min
+
+    from math import floor
+
+    def factors(n):
+        result = []
+        for i in range(2, n + 1):  # test all integers between 2 and n
+            s = 0
+            while n / i == floor(n / float(i)):  # is n/i an integer?
+                n = n / float(i)
+                s += 1
+            if s > 0:
+                for k in range(s):
+                    result.append(i)  # i is a pf s times
+                    if n == 1:
+                        return result
+
+    while np_used <= max_procs:
+        a = 1
+
+        while a <= np_used:
+            prcs_var = np_used % a
+            if prcs_var != 0:
+                a += 1
+            elif prcs_var == 0:
+                npex = a
+                npey = int(np_used / npex)
+
+                if tpn != 0:
+                    if np_used % tpn != 0:
+                        a += 1
+                        continue
+
+                if dnpexnpey != 0 and npex / npey != dnpexnpey:
+                    a += 1
+                    continue
+
+                while nx <= nx_max:
+                    if (nx + 1) % npex != 0:
+                        nx += 1
+                        continue
+
+                    if mlt_grid is True and (nx + 1) % 2 != 0:
+                        nx += 1
+                        continue
+
+                    if switch is True and (nx + 1) % npey != 0:
+                        nx += 1
+                        continue
+                    if npex > nx:
+                        nx += 1
+                        continue
+
+                    while ny <= ny_max:
+
+                        if dnxny != 0 and float(nx) / float(ny) != float(dnxny):
+                            ny += 1
+                            continue
+                        if (ny + 1) % npey != 0:
+                            ny += 1
+                            continue
+
+                        if mlt_grid is True and ny % 2 != 0:
+                            ny += 1
+                            continue
+
+                        if (ny + 1) % npex != 0 and switch is True:
+                            ny += 1
+                            continue
+                        if npey > ny:
+                            ny += 1
+                            continue
+
+                        while nz <= nz_max:
+
+                            if mlt_grid is True and nz % 2 != 0:
+                                nz += 1
+                                continue
+
+                            if poisfft is True and nz % npex != 0:
+                                nz += 1
+                                continue
+
+                            if spectr is True and nz % npey != 0:
+                                nz += 1
+                                continue
+
+                            if tempterton is True and nx > 1 and ny > 1:  # and nz < 1:
+
+                                nx_list = factors(nx + 1)
+                                i = 0
+                                nx_var = nx_list[i]
+
+                                while i < len(nx_list):
+                                    if nx_var != 2 or nx_var != 3 or nx_var != 5:
+
+                                        i += 1
+                                        continue
+
+                                    i += 1
+                                ny_list = factors(ny + 1)
+                                i = 0
+                                ny_var = ny_list[i]
+                                while i < len(ny_list):
+                                    if ny_var != 2 or ny_var != 3 or ny_var != 5:
+
+                                        i += 1
+                                        continue
+                                    i += 1
+
+                            counter += 1
+
+                            npxnpy = format(float(npex)/float(npey), '.2f')
+                            c.execute("""INSERT OR REPLACE INTO grid_current(nx, ny, nz, npex, npey, npxnpy, np, ngpts) VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
+                            (nx, ny, nz, npex, npey, npxnpy, (npex * npey), (nx*ny*nz)))
+
+                            nz += 11
+                        nz = nz_min
+                        ny += 1
+                    ny = ny_min
+                    nx += 1
+                nx = nx_min
+                a += 1
+                #  a += 1
+        np_used += 1
+
+        conn.commit()
+
+
+
+    conn.commit()
+    c.close()
+    conn.close()
+
+    #********************************
+
+    conn = sqlite3.connect(".palm_gf_data.db")
+    c = conn.cursor()
+    try:
+        c.execute("SELECT nx FROM grid_current ORDER BY nx DESC LIMIT 1")
+        mx_nx = c.fetchone()[0]
+        #print(mx_nx)
+        c.execute("SELECT nx FROM grid_current ORDER BY nx  LIMIT 1")
+        mn_nx = c.fetchone()[0]
+        #print(mn_nx)
+        c.execute("SELECT ny FROM grid_current ORDER BY ny DESC LIMIT 1")
+        mx_ny = c.fetchone()[0]
+        #print(mx_ny)
+        c.execute("SELECT ny FROM grid_current ORDER BY ny  LIMIT 1")
+        mn_ny = c.fetchone()[0]
+        #print(mn_ny)
+        c.execute("SELECT nz FROM grid_current ORDER BY nz DESC LIMIT 1")
+        mx_nz = c.fetchone()[0]
+        #print(mx_nz)
+        c.execute("SELECT nz FROM grid_current ORDER BY nz  LIMIT 1")
+        mn_nz = c.fetchone()[0]
+        #print(mn_nz)
+        c.execute("SELECT npex FROM grid_current ORDER BY npex DESC LIMIT 1")
+        mx_npex = c.fetchone()[0]
+        #print(mx_npex)
+        c.execute("SELECT npex FROM grid_current ORDER BY npex  LIMIT 1")
+        mn_npex = c.fetchone()[0]
+        #print(mn_npex)
+        c.execute("SELECT npey FROM grid_current ORDER BY npey DESC LIMIT 1")
+        mx_npey = c.fetchone()[0]
+        #print(mx_npey)
+        c.execute("SELECT npey FROM grid_current ORDER BY npey  LIMIT 1")
+        mn_npey = c.fetchone()[0]
+        #print(mn_npey)
+        c.execute("SELECT npxnpy FROM grid_current ORDER BY npxnpy DESC LIMIT 1")
+        mx_npxnpy = c.fetchone()[0]
+        #print(mx_npxnpy)
+        c.execute("SELECT npxnpy FROM grid_current ORDER BY npxnpy  LIMIT 1")
+        mn_npxnpy = c.fetchone()[0]
+        #print(mn_npxnpy)
+        c.execute("SELECT np FROM grid_current ORDER BY np DESC LIMIT 1")
+        mx_np = c.fetchone()[0]
+        #print(mx_np)
+        c.execute("SELECT np FROM grid_current ORDER BY np LIMIT 1")
+        mn_np = c.fetchone()[0]
+        #print(mn_np)
+        c.execute("SELECT ngpts FROM grid_current ORDER BY ngpts DESC LIMIT 1")
+        mx_ngpts = c.fetchone()[0]
+        #print(mx_ngpts)
+        c.execute("SELECT ngpts FROM grid_current ORDER BY ngpts LIMIT 1")
+        mn_ngpts = c.fetchone()[0]
+        #print(mn_ngpts)
+
+        conn.commit()
+        c.execute(
+            """INSERT OR REPLACE INTO grid_limits(nx, ny, nz, npex, npey, npxnpy, np, ngpts) VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
+            (mn_nx, mn_ny, mn_nz, mn_npex, mn_npey, mn_npxnpy, mn_np, mn_ngpts))
+        #conn.commit()
+        #print("test", mn_nx)
+        c.execute(
+            """INSERT OR REPLACE INTO grid_limits(nx, ny, nz, npex, npey, npxnpy, np, ngpts) VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
+            (mx_nx, mx_ny, mx_nz, mx_npex, mx_npey, mx_npxnpy, mx_np, mx_ngpts))
+        conn.commit()
+
+        c.close()
+        conn.close()
+    except TypeError:
+
+        checkfile = open(".palm_gf_tmp", "w")
+        if counter != 0:
+            checkfile.write("Gridfinder found " + str(counter) + " results.\n1")
+        else:
+            checkfile.write("Check input, no Results found.\n0")
+        checkfile.close()
+
+
+
+    checkfile = open(".palm_gf_tmp", "w")
+    if counter != 0:
+        checkfile.write("Gridfinder found " + str(counter) + " results.\n1")
+    else:
+        checkfile.write("Check input, no Results found.\n0")
+    checkfile.close()
+    return main_bool
+
+
+
+def grid_maxmin():
+
+    import palm_gf_conf
+    import sqlite3
+
+    conn = sqlite3.connect("grid_current.db")
+    c = conn.cursor()
+    c.execute("DROP TABLE IF EXISTS grid_maxmin")
+    c.execute("CREATE TABLE IF NOT EXISTS grid_maxmin(np_min INT,np_max INT, npex_min INT,npex_max INT, npey_min INT,npey_max INT, nx_min INT,nx_max INT,"
+              " ny_min INT,ny_max INT, nz_min INT, nz_max INT)")
+    parm = config_wr.read_config()
+    min_procs = int(parm[0])
+    max_procs = int(parameters[1])
+    tpn = int(parameters[2])
+    dnpexnpey = float(parameters[3])
+    dnxny = float(parameters[4])
+    nx_min = int(parameters[5])
+    nx_max = int(parameters[6])
+    ny_min = int(parameters[7])
+    ny_max = int(parameters[8])
+    nz_min = int(parameters[9])
+    nz_max = int(parameters[10])
+
+
+
+
+
+    c.execute(
+        """INSERT OR REPLACE INTO grid_maxmin(np_min, np_max, npex_min, npex_max, npey_min, npey_max, nx_min, nx_max,
+         ny_min, ny_max, nz_min, nz_max) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
+        (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
+
+    conn.commit()
+    c.close()
+    conn.close()
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_settings.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_settings.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_settings.ui	(revision 3477)
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>560</width>
+    <height>145</height>
+   </rect>
+  </property>
+  <property name="contextMenuPolicy">
+   <enum>Qt::DefaultContextMenu</enum>
+  </property>
+  <property name="windowTitle">
+   <string>Settings</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>70</x>
+     <y>100</y>
+     <width>181</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>20</y>
+     <width>231</width>
+     <height>78</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="Line" name="line">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QPushButton" name="savepath">
+        <property name="text">
+         <string>path to save</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>result threshold</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>load threshold</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <item>
+       <widget class="QLineEdit" name="linepath">
+        <property name="text">
+         <string>/localdata/</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="result_thres">
+        <property name="maximum">
+         <number>9999999</number>
+        </property>
+        <property name="singleStep">
+         <number>10000</number>
+        </property>
+        <property name="value">
+         <number>250000</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSpinBox" name="load_thres">
+        <property name="maximum">
+         <number>9999999</number>
+        </property>
+        <property name="singleStep">
+         <number>10000</number>
+        </property>
+        <property name="value">
+         <number>100000</number>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QTextBrowser" name="textBrowser">
+   <property name="geometry">
+    <rect>
+     <x>280</x>
+     <y>10</y>
+     <width>271</width>
+     <height>131</height>
+    </rect>
+   </property>
+   <property name="html">
+    <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Current Version Remarks:&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- Default Values for thresholds: &lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;        results = 250000&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;        load      = 100000&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- it is recommended to keep threshold values as low as possible&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;- gridfinder shows you the complete number of results, but only saves up to the result threshold value&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;-when using FFTW / Temperton, always activate strict matching (for now)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_table.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_table.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_table.ui	(revision 3477)
@@ -0,0 +1,1407 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1030</width>
+    <height>439</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QTableWidget" name="tableWidget">
+   <property name="geometry">
+    <rect>
+     <x>5</x>
+     <y>166</y>
+     <width>1005</width>
+     <height>266</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Expanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="acceptDrops">
+    <bool>false</bool>
+   </property>
+   <property name="horizontalScrollBarPolicy">
+    <enum>Qt::ScrollBarAlwaysOff</enum>
+   </property>
+   <property name="autoScroll">
+    <bool>true</bool>
+   </property>
+   <property name="dragEnabled">
+    <bool>false</bool>
+   </property>
+   <property name="dragDropOverwriteMode">
+    <bool>false</bool>
+   </property>
+   <property name="selectionMode">
+    <enum>QAbstractItemView::MultiSelection</enum>
+   </property>
+   <property name="selectionBehavior">
+    <enum>QAbstractItemView::SelectItems</enum>
+   </property>
+   <property name="sortingEnabled">
+    <bool>false</bool>
+   </property>
+   <property name="rowCount">
+    <number>8</number>
+   </property>
+   <property name="columnCount">
+    <number>10</number>
+   </property>
+   <attribute name="horizontalHeaderVisible">
+    <bool>false</bool>
+   </attribute>
+   <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
+    <bool>true</bool>
+   </attribute>
+   <attribute name="verticalHeaderVisible">
+    <bool>false</bool>
+   </attribute>
+   <row>
+    <property name="text">
+     <string>1</string>
+    </property>
+   </row>
+   <row>
+    <property name="text">
+     <string>8</string>
+    </property>
+   </row>
+   <row>
+    <property name="text">
+     <string>3</string>
+    </property>
+   </row>
+   <row>
+    <property name="text">
+     <string>4</string>
+    </property>
+   </row>
+   <row>
+    <property name="text">
+     <string>5</string>
+    </property>
+   </row>
+   <row>
+    <property name="text">
+     <string>6</string>
+    </property>
+   </row>
+   <row>
+    <property name="text">
+     <string>7</string>
+    </property>
+   </row>
+   <row/>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column>
+    <property name="text">
+     <string/>
+    </property>
+   </column>
+   <column/>
+   <column/>
+  </widget>
+  <widget class="Line" name="line">
+   <property name="geometry">
+    <rect>
+     <x>831</x>
+     <y>60</y>
+     <width>30</width>
+     <height>75</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Vertical</enum>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_11">
+   <property name="geometry">
+    <rect>
+     <x>851</x>
+     <y>112</y>
+     <width>131</width>
+     <height>17</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="nx_max">
+   <property name="geometry">
+    <rect>
+     <x>145</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="ny_max">
+   <property name="geometry">
+    <rect>
+     <x>208</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="nz_max">
+   <property name="geometry">
+    <rect>
+     <x>271</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="npex_max">
+   <property name="geometry">
+    <rect>
+     <x>334</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="npey_max">
+   <property name="geometry">
+    <rect>
+     <x>397</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QDoubleSpinBox" name="npxnpy_max">
+   <property name="geometry">
+    <rect>
+     <x>460</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="np_max">
+   <property name="geometry">
+    <rect>
+     <x>523</x>
+     <y>110</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="ngpts_max">
+   <property name="geometry">
+    <rect>
+     <x>587</x>
+     <y>110</y>
+     <width>80</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>80</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>80</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="autoFillBackground">
+    <bool>false</bool>
+   </property>
+   <property name="wrapping">
+    <bool>false</bool>
+   </property>
+   <property name="frame">
+    <bool>true</bool>
+   </property>
+   <property name="buttonSymbols">
+    <enum>QAbstractSpinBox::UpDownArrows</enum>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999999</number>
+   </property>
+   <property name="value">
+    <number>0</number>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>115</x>
+     <y>107</y>
+     <width>47</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Max</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>115</x>
+     <y>83</y>
+     <width>48</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Min</string>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="nx_min">
+   <property name="geometry">
+    <rect>
+     <x>146</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="ny_min">
+   <property name="geometry">
+    <rect>
+     <x>209</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="nz_min">
+   <property name="geometry">
+    <rect>
+     <x>272</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="npex_min">
+   <property name="geometry">
+    <rect>
+     <x>335</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="npey_min">
+   <property name="geometry">
+    <rect>
+     <x>398</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QDoubleSpinBox" name="npxnpy_min">
+   <property name="geometry">
+    <rect>
+     <x>461</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="np_min">
+   <property name="geometry">
+    <rect>
+     <x>524</x>
+     <y>86</y>
+     <width>62</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>62</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999</number>
+   </property>
+  </widget>
+  <widget class="QSpinBox" name="ngpts_min">
+   <property name="geometry">
+    <rect>
+     <x>587</x>
+     <y>86</y>
+     <width>80</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>80</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>80</width>
+     <height>22</height>
+    </size>
+   </property>
+   <property name="correctionMode">
+    <enum>QAbstractSpinBox::CorrectToNearestValue</enum>
+   </property>
+   <property name="maximum">
+    <number>99999999</number>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_12">
+   <property name="geometry">
+    <rect>
+     <x>851</x>
+     <y>70</y>
+     <width>52</width>
+     <height>14</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Status:</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="calc_label">
+   <property name="geometry">
+    <rect>
+     <x>851</x>
+     <y>90</y>
+     <width>131</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+  </widget>
+  <widget class="Line" name="line_2">
+   <property name="geometry">
+    <rect>
+     <x>100</x>
+     <y>55</y>
+     <width>8</width>
+     <height>80</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Vertical</enum>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>149</x>
+     <y>67</y>
+     <width>58</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>59</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>  nx</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_4">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="geometry">
+    <rect>
+     <x>213</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>  ny</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_5">
+   <property name="geometry">
+    <rect>
+     <x>275</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>  nz</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_6">
+   <property name="geometry">
+    <rect>
+     <x>340</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string> npex</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_8">
+   <property name="geometry">
+    <rect>
+     <x>400</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string> npey</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_7">
+   <property name="geometry">
+    <rect>
+     <x>461</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string> npx/npy</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_9">
+   <property name="geometry">
+    <rect>
+     <x>525</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>   np</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_10">
+   <property name="geometry">
+    <rect>
+     <x>590</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>  ngpts</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="nx_table">
+   <property name="geometry">
+    <rect>
+     <x>6</x>
+     <y>149</y>
+     <width>102</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>nx</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="autoRepeat">
+    <bool>false</bool>
+   </property>
+   <property name="autoDefault">
+    <bool>true</bool>
+   </property>
+   <property name="default">
+    <bool>false</bool>
+   </property>
+   <property name="flat">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="ny_table">
+   <property name="geometry">
+    <rect>
+     <x>105</x>
+     <y>149</y>
+     <width>104</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>ny</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="nz_table">
+   <property name="geometry">
+    <rect>
+     <x>206</x>
+     <y>149</y>
+     <width>102</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>nz</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="npex_table">
+   <property name="geometry">
+    <rect>
+     <x>305</x>
+     <y>149</y>
+     <width>103</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>npex</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+   <property name="autoRepeat">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="npey_table">
+   <property name="geometry">
+    <rect>
+     <x>405</x>
+     <y>149</y>
+     <width>104</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>npey</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="npexnpey_table">
+   <property name="geometry">
+    <rect>
+     <x>506</x>
+     <y>149</y>
+     <width>102</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>npex/npey</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="np_table">
+   <property name="geometry">
+    <rect>
+     <x>605</x>
+     <y>149</y>
+     <width>103</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>np</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="ngpts_table">
+   <property name="geometry">
+    <rect>
+     <x>705</x>
+     <y>149</y>
+     <width>104</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>ngpts</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>5</x>
+     <y>25</y>
+     <width>97</width>
+     <height>106</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QPushButton" name="save_to_file_button">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="toolTip">
+       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Currently Disabled&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      </property>
+      <property name="text">
+       <string>Save to file</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="pushButton_3">
+      <property name="toolTip">
+       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Loads all calculated results. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      </property>
+      <property name="text">
+       <string>Load all</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="pushButton">
+      <property name="text">
+       <string>Execute filter</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QPushButton" name="pushButton_2">
+      <property name="text">
+       <string>Reset limits</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QPushButton" name="nxpex_table">
+   <property name="geometry">
+    <rect>
+     <x>806</x>
+     <y>149</y>
+     <width>104</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>nx+1 / npex</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="nypey_table">
+   <property name="geometry">
+    <rect>
+     <x>907</x>
+     <y>149</y>
+     <width>104</width>
+     <height>23</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>ny+1 / npey</string>
+   </property>
+   <property name="checkable">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_13">
+   <property name="geometry">
+    <rect>
+     <x>677</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>nx / npex</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_14">
+   <property name="geometry">
+    <rect>
+     <x>755</x>
+     <y>67</y>
+     <width>57</width>
+     <height>19</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>57</width>
+     <height>19</height>
+    </size>
+   </property>
+   <property name="text">
+    <string>ny / npey</string>
+   </property>
+  </widget>
+  <widget class="QDoubleSpinBox" name="nxpex_min">
+   <property name="geometry">
+    <rect>
+     <x>670</x>
+     <y>86</y>
+     <width>71</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="maximum">
+    <double>1000000.000000000000000</double>
+   </property>
+  </widget>
+  <widget class="QDoubleSpinBox" name="nxpex_max">
+   <property name="geometry">
+    <rect>
+     <x>670</x>
+     <y>110</y>
+     <width>71</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="maximum">
+    <double>1000000.000000000000000</double>
+   </property>
+  </widget>
+  <widget class="QDoubleSpinBox" name="nypey_min">
+   <property name="geometry">
+    <rect>
+     <x>747</x>
+     <y>86</y>
+     <width>71</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="maximum">
+    <double>1000000.000000000000000</double>
+   </property>
+  </widget>
+  <widget class="QDoubleSpinBox" name="nypey_max">
+   <property name="geometry">
+    <rect>
+     <x>747</x>
+     <y>110</y>
+     <width>71</width>
+     <height>22</height>
+    </rect>
+   </property>
+   <property name="maximum">
+    <double>1000000.000000000000000</double>
+   </property>
+  </widget>
+ </widget>
+ <tabstops>
+  <tabstop>pushButton_3</tabstop>
+  <tabstop>nx_min</tabstop>
+  <tabstop>nx_max</tabstop>
+  <tabstop>ny_min</tabstop>
+  <tabstop>ny_max</tabstop>
+  <tabstop>nz_min</tabstop>
+  <tabstop>nz_max</tabstop>
+  <tabstop>npex_min</tabstop>
+  <tabstop>npex_max</tabstop>
+  <tabstop>npey_min</tabstop>
+  <tabstop>npey_max</tabstop>
+  <tabstop>npxnpy_min</tabstop>
+  <tabstop>npxnpy_max</tabstop>
+  <tabstop>np_min</tabstop>
+  <tabstop>np_max</tabstop>
+  <tabstop>ngpts_min</tabstop>
+  <tabstop>ngpts_max</tabstop>
+  <tabstop>pushButton</tabstop>
+  <tabstop>pushButton_2</tabstop>
+  <tabstop>tableWidget</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_tools.py
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_tools.py	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_gf_files/palm_gf_tools.py	(revision 3477)
@@ -0,0 +1,701 @@
+import sys
+import os
+import sqlite3
+from PyQt4 import QtCore, QtGui, uic
+import subprocess as sub
+import palm_gf_conf as configwr
+   
+out = sub.check_output("echo $PALM_BIN", shell=True, stderr=sub.STDOUT)
+palm_bin = out.rstrip()
+
+qtCreatorFile = palm_bin + '/palm_gf_files/palm_gf_table.ui'
+
+Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)
+
+class MyApp3(QtGui.QMainWindow, Ui_MainWindow):
+
+    class MyTableWidgetItem(QtGui.QTableWidgetItem):
+        def __init__(self, text, sortKey):
+            QtGui.QTableWidgetItem.__init__(self, text, QtGui.QTableWidgetItem.UserType)
+            self.sortKey = sortKey
+
+        def __lt__(self, other):
+            return self.sortKey < other.sortKey
+
+    def __init__(self):   #     def __init__(self, parent=None):
+        QtGui.QMainWindow.__init__(self)
+        Ui_MainWindow.__init__(self)
+
+        framegm = self.frameGeometry()
+        screen = QtGui.QApplication.desktop().screenNumber(QtGui.QApplication.desktop().cursor().pos())
+        centerpoint = QtGui.QApplication.desktop().screenGeometry(screen).center()
+        framegm.moveCenter(centerpoint)
+
+        #centerpoint = str(centerpoint)
+        #xcenter = centerpoint.split('(')[1].split(',')[0]
+        #ycenter = centerpoint.split('(')[1].split(',')[1].split(')')[0]
+        ##print xcenter, ycenter
+        #centerpoint = QtCore.QPoint(int(xcenter) + 418, int(ycenter))
+        #framegm.moveCenter(centerpoint)
+        self.move(framegm.topLeft())
+
+
+
+        self.setupUi(self)
+        self.pushButton_3.clicked.connect(self.load_result)
+        #self.nx_min.valueChanged.connect(self.check)
+        self.load_trigger()
+        self.pushButton.clicked.connect(self.filter_results)
+        #self.Sortnow_button.clicked.connect(self.sort_order)
+        self.pushButton_2.clicked.connect(self.load_trigger)
+        self.tableWidget.horizontalHeader().setClickable(True)
+
+
+        self.nx_table.clicked.connect(lambda: self.sort_table(str("nx")))
+        self.ny_table.clicked.connect(lambda: self.sort_table(str("ny")))
+        self.nz_table.clicked.connect(lambda: self.sort_table(str("nz")))
+        self.npex_table.clicked.connect(lambda: self.sort_table(str("npex")))
+        self.npey_table.clicked.connect(lambda: self.sort_table(str("npey")))
+        self.npexnpey_table.clicked.connect(lambda: self.sort_table(str("npexnpey")))
+        self.np_table.clicked.connect(lambda: self.sort_table(str("np")))
+        self.ngpts_table.clicked.connect(lambda: self.sort_table(str("ngpts")))
+        self.nxpex_table.clicked.connect(lambda: self.sort_table(str("nxnpex")))
+        self.nypey_table.clicked.connect(lambda: self.sort_table(str("nynpey")))
+
+        self.instant()
+
+        self.save_to_file_button.clicked.connect(self.get_path)
+
+    def instant(self):
+        checkfile = open(".palm_gf_tmp", "r")
+        # self.result_label.setText(str(checkfile.readline()))
+        res_text = str(checkfile.readline())  # XXX
+        result_nr = res_text.split(' ')[2]
+        checkfile.close()
+        if int(result_nr) < 100000:
+            self.load_result()
+
+
+
+    def load_trigger(self):
+        pathx = configwr.read_config()
+        pathx = pathx[19]
+
+
+        dtb = str('.palm_gf_data.db')
+        #con = sqlite3.connect("/localdata/.palm_gf_data.db")
+
+        pathx = pathx + '/.palm_gf_data.db'
+        con = sqlite3.connect(pathx)
+        c = con.cursor()
+        c.execute("SELECT * FROM " + 'grid_limits')
+        mini = c.fetchone()
+        max = c.fetchone()
+        self.nx_min.setValue(mini[0])
+        self.nx_max.setValue(max[0])
+
+        self.ny_min.setValue(mini[1])
+        self.ny_max.setValue(max[1])
+        self.nz_min.setValue(mini[2])
+        self.nz_max.setValue(max[2])
+        self.npex_min.setValue(mini[3])
+        self.npex_max.setValue(max[3])
+        self.npey_min.setValue(mini[4])
+        self.npey_max.setValue(max[4])
+        self.npxnpy_min.setValue(mini[5])
+        self.npxnpy_max.setValue(max[5])
+        self.np_min.setValue(mini[6])
+        self.np_max.setValue(max[6])
+        self.ngpts_min.setValue(mini[7])
+        self.ngpts_max.setValue(max[7])
+        self.nxpex_min.setValue(mini[8])
+        self.nxpex_max.setValue(max[8])
+        self.nypey_min.setValue(mini[9])
+        self.nypey_max.setValue(max[9])
+
+        self.nx_min.setMinimum(mini[0])
+        self.nx_max.setMaximum(max[0])
+        self.ny_min.setMinimum(mini[1])
+        self.ny_max.setMaximum(max[1])
+        self.nz_min.setMinimum(mini[2])
+        self.nz_max.setMaximum(max[2])
+        self.npex_min.setMinimum(mini[3])
+        self.npex_max.setMaximum(max[3])
+        self.npey_min.setMinimum(mini[4])
+        self.npey_max.setMaximum(max[4])
+        self.npxnpy_min.setMinimum(mini[5])
+        self.npxnpy_max.setMaximum(max[5])
+        self.np_min.setMinimum(mini[6])
+        self.np_max.setMaximum(max[6])
+
+        self.ngpts_min.setMinimum(mini[7])
+        self.ngpts_max.setMaximum(max[7])
+        self.ngpts_min.setMaximum(max[7])
+        self.ngpts_max.setMinimum(mini[7])
+
+        self.nxpex_min.setMinimum(mini[8])
+        self.nxpex_max.setMaximum(max[8])
+        self.nxpex_min.setMaximum(max[8])
+        self.nxpex_max.setMinimum(mini[8])
+
+        self.nypey_min.setMinimum(mini[9])
+        self.nypey_max.setMaximum(max[9])
+        self.nypey_min.setMaximum(max[9])
+        self.nypey_max.setMinimum(mini[9])
+
+
+
+
+
+        con.commit()
+        c.close()
+        con.close()
+
+
+
+
+    def check(self):
+        pathx = configwr.read_config()
+        pathx = pathx[19]
+
+        dtb = str('.palm_gf_data.db')
+        #con = sqlite3.connect("/localdata/.palm_gf_data.db")
+        con = sqlite3.connect(pathx + '/.palm_gf_data.db')
+        c = con.cursor()
+        c.execute("SELECT * FROM " + 'grid_limits')
+        mini = c.fetchone()
+        max = c.fetchone()
+        if self.nx_min.value() < mini[0]:
+
+            self.nx_min.setValue(mini[0])
+
+
+    def process1(self):
+        self.calc_label.setText('loading...')
+        QtGui.QApplication.processEvents()
+
+
+
+    def load_result(self):
+        #print("LOADED!!!")
+        import decimal
+
+        pathx = configwr.read_config()
+        pathx = pathx[19]
+
+        self.setEnabled(False)
+        QtGui.QApplication.processEvents()
+        self.load_trigger()
+        self.process1()
+        database = str('.palm_gf_data.db')
+        conn = sqlite3.connect(pathx + '/.palm_gf_data.db')
+        c = conn.cursor()
+        c.execute("SELECT * FROM " + 'grid_current')
+        results = c.fetchall()
+
+        self.tableWidget.setRowCount(len(results))
+
+        i = 0
+        j = 0
+        k = 0
+
+        while i < len(results):
+            line = results[i]
+            while j < 10:
+                var = line[j]
+
+                if j == 7:
+                    self.tableWidget.setItem(i, j, self.MyTableWidgetItem(str("%.1e" % var), j + i))
+                    #print("%.2e" % int(var), "%.4e" % int(1782))
+
+                else:
+                    self.tableWidget.setItem(i, j, self.MyTableWidgetItem(str(var), j+i))
+                #item = self.MyTableWidgetItem(str(var), k)
+                #self.tableWidget.setItem(i, j, item)
+
+                j += 1
+                #if j == 3:
+                    #print(k)
+                #k += 1
+            #k -= 7
+            k += 1
+            j = 0
+            i += 1
+
+        c.close()
+        conn.close()
+        self.calc_label.setText('loading completed')
+        self.label_11.setText(str(len(results)) + ' results ')
+        self.setEnabled(True)
+        QtGui.QApplication.processEvents()
+
+    def filter_results(self):
+
+        pathx = configwr.read_config()
+        pathx = pathx[19]
+
+        self.setEnabled(False)
+        self.calc_label.setText('calculating...')
+        QtGui.QApplication.processEvents()
+        database = str('.palm_gf_data.db')
+        conn = sqlite3.connect(pathx + '/.palm_gf_data.db')
+        c = conn.cursor()
+        c.execute("SELECT * FROM " + "grid_current")
+        results = c.fetchall()
+        #print(results)
+
+        self.tableWidget.setRowCount(len(results))
+
+        i = 0
+        j = 0
+        row_cnt = -1
+        while i < len(results):
+            line = results[i]
+
+            if line[0] <= self.nx_max.value():
+
+                if line[0] >= self.nx_min.value():
+
+                    if line[1] <= self.ny_max.value():
+
+                        if line[1] >= self.ny_min.value():
+
+                            if line[2] <= self.nz_max.value():
+
+                                if line[2] >= self.nz_min.value():
+
+                                    if line[3] <= self.npex_max.value():
+
+                                        if line[3] >= self.npex_min.value():
+
+                                            if line[4] <= self.npey_max.value():
+
+                                                if line[4] >= self.npey_min.value():
+
+                                                    if line[5] <= self.npxnpy_max.value():
+
+                                                        if line[5] >= self.npxnpy_min.value():
+
+                                                            if line[6] <= self.np_max.value():
+
+                                                                if line[6] >= self.np_min.value():
+
+                                                                    if line[7] <= self.ngpts_max.value():
+
+                                                                        if line[7] >= self.ngpts_min.value():
+
+                                                                            if line[8] <= self.nxpex_max.value():
+
+                                                                                if line[8] >= self.nxpex_min.value():
+
+                                                                                    if line[9] <= self.nypey_max.value():
+
+                                                                                        if line[9] >= self.nypey_min.value():
+
+                                                                                            row_cnt += 1
+                                                                                            while j < 10:
+                                                                                                var = line[j]
+
+                                                                                                if j == 7:
+                                                                                                    self.tableWidget.setItem(row_cnt, j, self.MyTableWidgetItem(str("%.1e" % var), i))
+
+                                                                                                else:
+                                                                                                    self.tableWidget.setItem(row_cnt, j, self.MyTableWidgetItem(str(var), i))
+
+                                                                                                j += 1
+
+            j = 0
+            i += 1
+
+        c.close()
+        conn.close()
+        self.tableWidget.setRowCount(row_cnt + 1)
+        self.setEnabled(True)
+        self.calc_label.setText('calculation completed')
+        self.label_11.setText(str(row_cnt + 1) + ' results')
+        QtGui.QApplication.processEvents()
+
+
+
+    def sort_table(self, column):
+
+        fnx_mn = self.nx_min.value()
+        fnx_mx = self.nx_max.value()
+        fny_mn = self.ny_min.value()
+        fny_mx = self.ny_max.value()
+        fnz_mn = self.nz_min.value()
+        fnz_mx = self.nz_max.value()
+        fnpex_mn = self.npex_min.value()
+        fnpex_mx = self.npex_max.value()
+        fnpey_mn = self.npex_min.value()
+        fnpey_mx = self.npey_max.value()
+        fnpxnpy_mn = self.npxnpy_min.value()
+        fnpxnpy_mx = self.npxnpy_max.value()
+        fnp_mn = self.np_min.value()
+        fnp_mx = self.np_max.value()
+        fngpts_mn = self.ngpts_min.value()
+        fngpts_mx = self.ngpts_max.value()
+        nxpex_mn = self.nxpex_min.value()
+        nxpex_mx = self.nxpex_max.value()
+        nypey_mn = self.nypey_min.value()
+        nypey_mx = self.nypey_max.value()
+
+
+        if column == str("nx"):
+            sorted_col = "nx"
+
+            if self.nx_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("ny"):
+            sorted_col = "ny"
+
+            if self.ny_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.nx_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("nz"):
+            sorted_col = "nz"
+
+            if self.nz_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.nx_table.setChecked(False)
+            self.ny_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("npex"):
+            sorted_col = "npex"
+
+            if self.npex_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("npey"):
+            sorted_col = "npey"
+
+            if self.npey_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("npexnpey"):
+            sorted_col = "npxnpy"
+
+            if self.npexnpey_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("np"):
+            sorted_col = "np"
+
+            if self.np_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("ngpts"):
+            sorted_col = "ngpts"
+
+            if self.ngpts_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("nxnpex"):
+            sorted_col = "nxnpex"
+
+            if self.nxpex_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nypey_table.setChecked(False)
+
+        if column == str("nynpey"):
+            sorted_col = "nynpey"
+
+            if self.nypey_table.isChecked() is True:
+                order = " DESC"
+
+            else:
+
+                order = " ASC"
+
+            self.ny_table.setChecked(False)
+            self.nz_table.setChecked(False)
+            self.npex_table.setChecked(False)
+            self.npey_table.setChecked(False)
+            self.npexnpey_table.setChecked(False)
+            self.np_table.setChecked(False)
+            self.nx_table.setChecked(False)
+            self.ngpts_table.setChecked(False)
+            self.nxpex_table.setChecked(False)
+
+        else:
+            pass
+
+        pathx = configwr.read_config()
+        pathx = pathx[19]
+
+
+        conn = sqlite3.connect(pathx + "/.palm_gf_data.db")
+        c = conn.cursor()
+        c.execute("SELECT * FROM grid_current  WHERE nx <= " + str(fnx_mx) + " AND nx >= "  + str(fnx_mn) + " AND ny <= " + str(fny_mx) + " AND ny >= " + str(fny_mn) + " AND nz <= " + str(fnz_mx) +
+                  " AND nz >= " + str(fnz_mn) + " AND npex <= " + str(fnpex_mx) + " AND npex >= " +
+        str(fnpex_mn) + " AND npey <= " + str(fnpey_mx) + " AND npey >= " + str(fnpey_mn) + " AND "
+                  "npxnpy <= " + str(fnpxnpy_mx) + " AND npxnpy >= " + str(fnpxnpy_mn) + " AND np <= " + str(fnp_mx) + " AND np >= " + str(fnp_mn) + " AND ngpts <= " + str(fngpts_mx) + " AND ngpts >= " + str(fngpts_mn) +
+        " AND nxnpex <= " + str(nxpex_mx) + " AND nxnpex >= " + str(nxpex_mn) + " AND nynpey <= " + str(nypey_mx) + " AND nynpey >= " + str(nypey_mn) +
+        " ORDER BY " + str(sorted_col) + str(order))
+
+
+
+        sorted = c.fetchall()
+
+
+        c.close()
+        conn.close()
+        self.tableWidget.setRowCount(len(sorted))
+
+        for row_indx in range(0,len(sorted)):
+
+            for col_indx in range(0,10):
+                row = sorted[row_indx]
+                value = row[col_indx]
+                if col_indx == 7:
+                    self.tableWidget.setItem(row_indx, col_indx, QtGui.QTableWidgetItem(str("%.1e" % value)))
+                else:
+                    self.tableWidget.setItem(row_indx, col_indx, QtGui.QTableWidgetItem(str(value)))
+
+
+
+    def sort_order(self):
+
+        sorted = 0
+        fnx_mn = self.nx_min.value()
+        fnx_mx = self.nx_max.value()
+        fny_mn = self.ny_min.value()
+        fny_mx = self.ny_max.value()
+        fnz_mn = self.nz_min.value()
+        fnz_mx = self.nz_max.value()
+        fnpex_mn = self.npex_min.value()
+        fnpex_mx = self.npex_max.value()
+        fnpey_mn = self.npex_min.value()
+        fnpey_mx = self.npey_max.value()
+        fnpxnpy_mn = self.npxnpy_min.value()
+        fnpxnpy_mx = self.npxnpy_max.value()
+        fnp_mn = self.np_min.value()
+        fnp_mx = self.np_max.value()
+        fngpts_mn = self.ngpts_min.value()
+        fngpts_mx = self.ngpts_max.value()
+
+        if str(self.Sortvariable_box.currentIndex()) == str(1):
+
+
+            sorted_col = "nx"
+        if str(self.Sortvariable_box.currentIndex()) == str(2):
+
+            sorted_col = "ny"
+        if str(self.Sortvariable_box.currentIndex()) == str(3):
+
+            sorted_col = "nz"
+        if str(self.Sortvariable_box.currentIndex()) == str(4):
+
+            sorted_col = "npex"
+        if str(self.Sortvariable_box.currentIndex()) == str(5):
+
+            sorted_col = "npey"
+        if str(self.Sortvariable_box.currentIndex()) == str(6):
+
+            sorted_col = "npxnpy"
+        if str(self.Sortvariable_box.currentIndex()) == str(7):
+
+            sorted_col = "np"
+        if str(self.Sortvariable_box.currentIndex()) == str(8):
+
+            sorted_col = "ngpts"
+
+        #print(self.Sortvariable_box.currentIndex())
+
+        if str(self.Sortorder_box.currentIndex()) == str(1):
+
+            order = " ASC"
+
+        if str(self.Sortorder_box.currentIndex()) == str(2):
+
+            order = " DESC"
+
+
+
+        conn = sqlite3.connect("/localdata/.palm_gf_data.db")
+        c = conn.cursor()
+        c.execute("SELECT * FROM grid_current  WHERE nx <= " + str(fnx_mx) + " AND nx >= "  + str(fnx_mn) + " AND ny <= " + str(fny_mx) + " AND ny >= " + str(fny_mn) + " AND nz <= " + str(fnz_mx) +
+                  " AND nz >= " + str(fnz_mn) + " AND npex <= " + str(fnpex_mx) + " AND npex >= " +
+        str(fnpex_mn) + " AND npey <= " + str(fnpey_mx) + " AND npey >= " + str(fnpey_mn) + " AND "
+                  "npxnpy <= " + str(fnpxnpy_mx) + " AND npxnpy >= " + str(fnpxnpy_mn) + " AND np <= " + str(fnp_mx) + " AND np >= " + str(fnp_mn) + " AND ngpts <= " + str(fngpts_mx) + " AND ngpts >= " + str(fngpts_mn) +
+        " ORDER BY " + str(sorted_col) + str(order))
+
+
+
+        sorted = c.fetchall()
+
+        c.close()
+        conn.close()
+        self.tableWidget.setRowCount(len(sorted))
+
+        for row_indx in range(0,len(sorted)):
+
+            for col_indx in range(0,8):
+                row = sorted[row_indx]
+                value = row[col_indx]
+                self.tableWidget.setItem(row_indx, col_indx, QtGui.QTableWidgetItem(str(var)))
+
+
+
+
+
+
+        #print(len(sorted))
+        #print(sorted)
+
+    def get_path(wildcard):
+        import wx
+        app = wx.App(None)
+        style = wx.FD_OPEN | wx.FD_FILE_MUST_EXIST
+        dialog = wx.FileDialog(None, 'Open', wildcard='*.db')
+        if dialog.ShowModal() == wx.ID_OK:
+            path = dialog.GetPath()
+
+            print(path, file)
+        else:
+            path = None
+        dialog.Destroy()
+        return
+
+
+
+
+
+
+
+
+
+
+
+if __name__ == "__main__":
+    app = QtGui.QApplication(sys.argv)
+    window = MyApp3()
+    window.setWindowTitle('Gridfilter')
+    window.show()
+    sys.exit(app.exec_())
+
Index: /palm/tags/release-6.0/SCRIPTS/palm_jm
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_jm	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_jm	(revision 3477)
@@ -0,0 +1,423 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+##--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Modified header
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2504 2017-09-27 10:36:13Z maronga
+# Bugfix: jobs were not loaded on start.
+# 
+# 2484 2017-09-20 14:22:42Z maronga
+# Adapted for palmrun with USER_CODE always stored under /JOBS/name/USER_CODE/.
+# Added PALM logo
+# 
+# 2068 2016-11-11 21:59:39Z maronga
+#
+# 2067 2016-11-11 21:55:49Z maronga
+# Minor bugfix: palm_jm can now be called from any location
+#
+# 2065 2016-11-11 12:25:10Z maronga
+# Initial revision
+#
+#
+# Description:
+# ------------
+# PALM job manager works a file manager for PALM input files. It lists all jobs in
+# the working directory and displays associated input and user code files, which
+# can be opened directly from the interface. Also, it is possible to copy jobs and
+# to create entire new sets of jobs based on a reference job.
+# 
+# Instructions:
+# -------------
+# 1) Start palm_jm either from mrungui or from shell by "nohup palm_jm&"
+#
+# To do:
+# ------
+# 1) Add display for the MONITORING and OUTPUT folder
+# 2) Add zip function to export single or multiple jobs
+# 3) Allow for copying INPUT files to a remote host
+#------------------------------------------------------------------------------!
+
+import os
+from PyQt4 import QtGui, QtCore, uic
+from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT
+import shutil
+import subprocess as sub
+import sys
+
+set_list = []
+
+
+# Determine PALM directories
+try: 
+   devnull = open(os.devnull, 'w')
+   out = sub.check_output("echo $PALM_BIN", shell=True, stderr=sub.STDOUT)
+   palm_bin = out.rstrip()
+   palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1]
+   out = None
+      
+   job_dir = palm_dir + '/JOBS'
+   user_dir = palm_dir + '/USER_CODE'
+   
+except:   
+   print "Error. $PALM_BIN is not set."
+   raise SystemExit
+
+
+
+# MainWindow class
+class JobManager(QtGui.QMainWindow):
+    
+    def __init__(self):
+        super(JobManager, self).__init__()
+        
+        self.InitUi()   
+        
+   
+    # Initialized MainWindow UI
+    def InitUi(self):
+
+        # Load predefined mainwindow
+        uic.loadUi(palm_bin + '/palm_jm_files/palm_jm.ui', self)
+
+        self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir  + "/trunk/SCRIPTS/palmrungui_files/logo.png"))
+
+
+    
+        # Display MainWindow
+        self.show()
+        QtGui.QApplication.processEvents()
+
+        self.load_jobs()
+
+    
+    def update_all(self):
+ 
+       self.setEnabled(False)
+       self.list_input.clear() 
+       self.list_user.clear()
+       self.load_jobs()
+       self.setEnabled(True)
+
+    # Load jobs into list
+    def load_jobs(self):
+       
+       self.list_jobs.clear() 
+       self.push_copy.setEnabled(False)
+       self.push_create_set.setEnabled(False)      
+      
+       self.line_path.setText(job_dir + "/")
+       
+       list_of_files = os.listdir(job_dir)
+             
+       for i in range(0,len(list_of_files)):
+          tmp_file = job_dir + "/" + list_of_files[i]
+
+          if ( os.path.isdir(tmp_file) ):
+	     self.list_jobs.addItem(str(list_of_files[i]))
+
+
+    # Update input and user code lists
+    def update_input(self):
+      
+       self.list_input.clear() 
+       self.list_user.clear()
+       self.push_copy.setEnabled(True)
+       self.push_create_set.setEnabled(True)
+      
+       job_to_show = job_dir + "/" + self.list_jobs.currentItem().text() + "/INPUT"
+
+       if ( os.path.isdir(job_to_show) ):
+
+          list_of_files = os.listdir(job_to_show)
+         
+          for i in range(0,len(list_of_files)):
+             tmp_file = job_to_show + "/" + list_of_files[i]
+             
+             if ( os.path.isfile(tmp_file) ):
+	        self.list_input.addItem(str(list_of_files[i]))
+  
+       job_to_show = job_dir + "/" + self.list_jobs.currentItem().text() + "/USER_CODE"
+       
+       if ( os.path.isdir(job_to_show) ):
+          
+          list_of_files = os.listdir(job_to_show)
+          
+          for i in range(0,len(list_of_files)):
+             tmp_file = job_to_show + "/" + list_of_files[i]
+
+             if ( os.path.isfile(tmp_file) ):
+	        self.list_user.addItem(str(list_of_files[i]))
+  
+  
+    # Make a copy of a job
+    def copy_job(self):
+  
+       self.setEnabled(False)
+       old_job_name = self.list_jobs.currentItem().text()
+       
+       text, ret = QtGui.QInputDialog.getText(self, "Copy job", "Enter new job name:", mode = QtGui.QLineEdit.Normal, text = old_job_name)
+       
+       if ( ret ):
+          new_job_name = str(text)
+       else:
+	   self.setEnabled(True)
+	   return
+	 
+       new_input_dir  = job_dir + "/" + new_job_name + "/INPUT"
+
+#      check if a job exists with the new job name  
+       if ( os.path.isdir(new_input_dir) ):
+	   notify = QtGui.QMessageBox.warning(self,'Create new job directory',"Error. Could not create job directory. A job with the new name already exists.")
+	   self.setEnabled(True)
+	   return
+       else:
+	   os.makedirs(new_input_dir)
+
+#      copy and rename input files (if present)       
+       job_to_copy = job_dir + "/" + old_job_name + "/INPUT"
+
+       if ( os.path.isdir(job_to_copy) ):
+
+          list_of_files = os.listdir(job_to_copy)
+         
+          for i in range(0,len(list_of_files)):
+
+             tmp_file = job_to_copy + "/" + list_of_files[i]          
+             new_file = new_input_dir + "/" + list_of_files[i].replace(old_job_name, new_job_name)
+             shutil.copy(tmp_file, new_file)
+
+
+
+
+       new_user_dir  = job_dir + "/" + new_job_name + "/USER_CODE"
+       
+#      check if user code exists in the new job directory 
+       if ( os.path.isdir(new_user_dir) ):
+	   notify = QtGui.QMessageBox.warning(self,'Create new user code directory',"Error. Could not create user code directory. A user code directiory with the new name already exists.")
+	   self.setEnabled(True)
+	   return
+       else:
+	   os.makedirs(new_user_dir)
+
+
+#      copy user code files (if present)       
+       user_to_copy = job_dir + "/" + old_job_name + "/USER_CODE"
+
+       if ( os.path.isdir(user_to_copy) ):
+
+          list_of_files = os.listdir(user_to_copy)
+         
+          for i in range(0,len(list_of_files)):
+
+             tmp_file = user_to_copy + "/" + list_of_files[i]          
+             new_file = new_user_dir + "/" + list_of_files[i]
+             shutil.copy(tmp_file, new_file)
+
+       self.load_jobs()
+       self.list_input.clear() 
+       self.list_user.clear()
+       self.setEnabled(True)
+
+
+    # Create a whole set of jobs
+    def create_set(self):
+  
+       global set_list
+#      disable mainwindow  
+       self.setEnabled(False)
+      
+#      show Options Dialog      
+       opt = CreateSetBox()
+       opt.exec_()
+
+       old_job_name = self.list_jobs.currentItem().text()
+
+       for j in range(0,len(set_list)):
+
+          if ( set_list[j] != "" ):
+	     new_job_name   = str(set_list[j])
+             new_input_dir  = job_dir + "/" + str(set_list[j]) + "/INPUT"
+          else:
+	     continue
+
+#         check if a job exists with the new job name  
+          if ( os.path.isdir(new_input_dir) ):
+	     notify = QtGui.QMessageBox.warning(self,'Create new job directory',"Error. Could not create job directory. A job with the new name already exists.")
+	     self.setEnabled(True)
+	     return
+          else:
+	     os.makedirs(new_input_dir)
+
+#         copy and rename input files (if present)       
+          job_to_copy = job_dir + "/" + old_job_name + "/INPUT"
+
+          if ( os.path.isdir(job_to_copy) ):
+
+             list_of_files = os.listdir(job_to_copy)
+         
+             for i in range(0,len(list_of_files)):
+
+                tmp_file = job_to_copy + "/" + list_of_files[i]          
+                new_file = new_input_dir + "/" + list_of_files[i].replace(old_job_name, new_job_name)
+                shutil.copy(tmp_file, new_file)
+
+
+          new_user_dir  = job_dir + "/" + new_job_name + "/USER_CODE"
+       
+#         check if user code exists in the new job directory 
+          if ( os.path.isdir(new_user_dir) ):
+	      notify = QtGui.QMessageBox.warning(self,'Create new user code directory',"Error. Could not create user code directory. A user code directiory with the new name already exists.")
+	      self.setEnabled(True)
+	      return
+          else:
+	      os.makedirs(new_user_dir)
+
+
+#         copy user code files (if present)       
+          user_to_copy = job_dir + "/" + old_job_name + "/USER_CODE"
+
+          if ( os.path.isdir(user_to_copy) ):
+
+             list_of_files = os.listdir(user_to_copy)
+         
+             for i in range(0,len(list_of_files)):
+
+                tmp_file = user_to_copy + "/" + list_of_files[i]          
+                new_file = new_user_dir + "/" + list_of_files[i]
+                shutil.copy(tmp_file, new_file)
+
+          self.load_jobs()
+          self.list_input.clear() 
+          self.list_user.clear()
+
+       self.setEnabled(True) 
+   
+   
+ # Add a custom context menu
+    def openmenuinput(self, position):
+
+        menu = QtGui.QMenu()
+
+        selection = self.list_input.selectedItems()
+        
+        if ( len(selection) != 0 ):
+
+           openAction = menu.addAction('Open selected files')     
+           openAction.setStatusTip('Open file(s) in your favorite editor')
+           openAction.triggered.connect(self.OpenFilesInput)
+           action = menu.exec_(self.list_input.mapToGlobal(position))
+
+ # Add a custom context menu
+    def openmenuuser(self, position):
+
+        menu = QtGui.QMenu()
+
+        selection = self.list_user.selectedItems()
+        
+        if ( len(selection) != 0 ):
+
+           openAction = menu.addAction('Open selected files')     
+           openAction.setStatusTip('Open file(s) in your favorite editor')
+           openAction.triggered.connect(self.OpenFilesUser)
+           action = menu.exec_(self.list_user.mapToGlobal(position))
+
+
+    def OpenFilesInput(self):
+   
+       sel_job = self.list_jobs.currentItem().text()
+       sel_files = self.list_input.selectedItems()
+       
+       input_dir = job_dir + "/" + sel_job + "/INPUT/"
+       
+       open_files = ""
+       for i in range(0,len(sel_files)):
+          open_files = open_files + "xdg-open " + input_dir +  sel_files[i].text() + "; "
+
+       os.system(str(open_files))
+
+    def OpenFilesUser(self):
+   
+       sel_job = self.list_jobs.currentItem().text()
+       sel_files = self.list_user.selectedItems()
+       
+       input_dir = job_dir + "/" + sel_job + "/USER_CODE/"
+       
+       open_files = ""
+       for i in range(0,len(sel_files)):
+          open_files = open_files + "xdg-open " + input_dir +  sel_files[i].text() + "; "
+
+       os.system(str(open_files)) 
+       selection = self.list_jobs.selectedItems()
+  
+  
+  
+# Message box for showing RUN_CONTROL output
+class CreateSetBox(QtGui.QDialog):
+    def __init__(self):
+      
+        super(CreateSetBox, self).__init__()
+        
+        uic.loadUi(palm_bin + '/palm_jm_files/palm_jm_create_set.ui', self)
+        
+        self.show()
+        
+        return
+
+#   Cancel button
+    def rejected(self):
+      
+       self.close()
+     
+       return
+  
+
+#   OK button
+    def accept(self):
+      
+       global set_list
+       
+       text = self.list.toPlainText() 
+       set_list = text.split('\n')
+       self.close()
+     
+       return
+  
+# Main loop       
+def main():
+    
+    app = QtGui.QApplication(sys.argv)
+    res = JobManager() 
+    sys.exit(app.exec_())
+
+
+if __name__ == '__main__':
+    main()   
Index: /palm/tags/release-6.0/SCRIPTS/palm_jm_files/palm_jm.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_jm_files/palm_jm.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_jm_files/palm_jm.ui	(revision 3477)
@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>735</width>
+    <height>456</height>
+   </rect>
+  </property>
+  <property name="contextMenuPolicy">
+   <enum>Qt::NoContextMenu</enum>
+  </property>
+  <property name="windowTitle">
+   <string>PALM job manager</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QLineEdit" name="line_path">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>139</x>
+      <y>28</y>
+      <width>584</width>
+      <height>23</height>
+     </rect>
+    </property>
+    <property name="readOnly">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="push_copy">
+    <property name="geometry">
+     <rect>
+      <x>276</x>
+      <y>335</y>
+      <width>114</width>
+      <height>24</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Copy</string>
+    </property>
+   </widget>
+   <widget class="QListWidget" name="list_input">
+    <property name="geometry">
+     <rect>
+      <x>271</x>
+      <y>71</y>
+      <width>220</width>
+      <height>257</height>
+     </rect>
+    </property>
+    <property name="contextMenuPolicy">
+     <enum>Qt::CustomContextMenu</enum>
+    </property>
+    <property name="alternatingRowColors">
+     <bool>true</bool>
+    </property>
+    <property name="selectionMode">
+     <enum>QAbstractItemView::MultiSelection</enum>
+    </property>
+    <property name="sortingEnabled">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label">
+    <property name="geometry">
+     <rect>
+      <x>282</x>
+      <y>55</y>
+      <width>74</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>INPUT files:</string>
+    </property>
+   </widget>
+   <widget class="QListWidget" name="list_user">
+    <property name="geometry">
+     <rect>
+      <x>504</x>
+      <y>73</y>
+      <width>220</width>
+      <height>257</height>
+     </rect>
+    </property>
+    <property name="contextMenuPolicy">
+     <enum>Qt::CustomContextMenu</enum>
+    </property>
+    <property name="alternatingRowColors">
+     <bool>true</bool>
+    </property>
+    <property name="selectionMode">
+     <enum>QAbstractItemView::MultiSelection</enum>
+    </property>
+    <property name="sortingEnabled">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_2">
+    <property name="geometry">
+     <rect>
+      <x>510</x>
+      <y>55</y>
+      <width>156</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>USER_CODE files:</string>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="push_create_set">
+    <property name="geometry">
+     <rect>
+      <x>275</x>
+      <y>359</y>
+      <width>114</width>
+      <height>24</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Create Set</string>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="push_close">
+    <property name="geometry">
+     <rect>
+      <x>275</x>
+      <y>384</y>
+      <width>115</width>
+      <height>24</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Quit</string>
+    </property>
+   </widget>
+   <widget class="QListWidget" name="list_jobs">
+    <property name="geometry">
+     <rect>
+      <x>9</x>
+      <y>73</y>
+      <width>256</width>
+      <height>338</height>
+     </rect>
+    </property>
+    <property name="contextMenuPolicy">
+     <enum>Qt::NoContextMenu</enum>
+    </property>
+    <property name="sortingEnabled">
+     <bool>true</bool>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_3">
+    <property name="geometry">
+     <rect>
+      <x>15</x>
+      <y>55</y>
+      <width>121</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Available jobs:</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label_4">
+    <property name="geometry">
+     <rect>
+      <x>145</x>
+      <y>11</y>
+      <width>145</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Job directory:</string>
+    </property>
+   </widget>
+   <widget class="QPushButton" name="push_update">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>29</y>
+      <width>128</width>
+      <height>24</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Update job list</string>
+    </property>
+   </widget>
+   <widget class="QLabel" name="palm_logo">
+    <property name="geometry">
+     <rect>
+      <x>630</x>
+      <y>340</y>
+      <width>79</width>
+      <height>72</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string/>
+    </property>
+    <property name="pixmap">
+     <pixmap>../../../../nesting_version/trunk/SCRIPTS/palm_jm_files/palm_logo_black_and_blue.png</pixmap>
+    </property>
+    <property name="scaledContents">
+     <bool>true</bool>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>735</width>
+     <height>21</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>push_close</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>319</x>
+     <y>418</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>429</x>
+     <y>442</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>list_jobs</sender>
+   <signal>itemActivated(QListWidgetItem*)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>update_input()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>196</x>
+     <y>290</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>521</x>
+     <y>384</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>push_copy</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>copy_job()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>341</x>
+     <y>366</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>409</x>
+     <y>368</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>push_create_set</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>create_set()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>340</x>
+     <y>389</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>488</x>
+     <y>418</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>push_update</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>update_all()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>85</x>
+     <y>57</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>654</x>
+     <y>385</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>list_input</sender>
+   <signal>customContextMenuRequested(QPoint)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>openmenuinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>389</x>
+     <y>110</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>448</x>
+     <y>29</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>list_user</sender>
+   <signal>customContextMenuRequested(QPoint)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>openmenuuser()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>570</x>
+     <y>127</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>615</x>
+     <y>36</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>update_input()</slot>
+  <slot>copy_job()</slot>
+  <slot>rename_job()</slot>
+  <slot>create_set()</slot>
+  <slot>update_all()</slot>
+  <slot>openmenuinput()</slot>
+  <slot>openmenuuser()</slot>
+ </slots>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_jm_files/palm_jm_create_set.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_jm_files/palm_jm_create_set.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_jm_files/palm_jm_create_set.ui	(revision 3477)
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>280</width>
+    <height>281</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Create job set</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>245</y>
+     <width>256</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation">
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons">
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>15</x>
+     <y>10</y>
+     <width>261</width>
+     <height>16</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Enter new job names (one job per line):</string>
+   </property>
+  </widget>
+  <widget class="QTextEdit" name="list">
+   <property name="geometry">
+    <rect>
+     <x>11</x>
+     <y>32</y>
+     <width>257</width>
+     <height>216</height>
+    </rect>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>270</x>
+     <y>265</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_simple_build
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_simple_build	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_simple_build	(revision 3477)
@@ -0,0 +1,165 @@
+#!/usr/bin/env bash
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# added file update functionality
+# 
+# 2868 2018-03-09 13:25:09Z hellstea
+# Bugfix: adjusted name of build_dir
+# 
+# 2852 2018-03-05 14:43:22Z knoop
+# Refactoring of the palm_simple_ build and run scripts
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+#
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2225 2017-05-16 11:36:20Z raasch
+# shell changed to bash
+#
+# 1310 2014-03-14 08:01:56Z raasch
+# update GPL copyright
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# palm_simple_install - a script for simple installation and compilation of
+#                       the palm code without using mbuild
+# This script creates (from the working copy of the palm repository)
+# a subdirectory MAKE_DEPOSITORY_simple which contains a copy of the
+# palm source code and  a modified makefile which loads required compiler
+# and preprocessor settings via "include MAKE.inc"
+
+# Options: -i <include file>
+#          one of the include files in ~/palm/current_version/trunk/INSTALL
+
+# Last changes:
+# 25/01/10 - Siggi - Generating the first version
+# 18/03/10 - Siggi - switch to palm/current_version removed: working
+#                    copy can be in any directory
+#------------------------------------------------------------------------------#
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+  SOURCE="$(readlink "$SOURCE")"
+  # if $SOURCE was a relative symlink, we need to resolve it
+  # relative to the path where the symlink file was located
+  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+done
+SCRIPT_LOCATION="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+
+working_dir=$(readlink -f "${SCRIPT_LOCATION}/../../")
+trunk_dir=$(readlink -f "${SCRIPT_LOCATION}/../")
+
+
+get_number_of_cpu_cores() {
+   {
+      n=$(sysctl -n machdep.cpu.core_count 2> /dev/null)
+   } || {
+      n=$(grep -c ^processor /proc/cpuinfo 2> /dev/null)
+   } || {
+   if ! [[ $n =~ ^-?[0-9]+$ ]]; then
+      n=1
+   fi
+   }
+   echo $n
+}
+
+print_help() {
+   echo "Usage: palm_simple_run -b <build-config> [-x]"
+   echo ""
+   echo "List of allowed option:"
+   echo ""
+   echo "   -b <build-config>   Suffix of any MAKE.inc.<build-config> file in the trunk/INSTALL dir."
+   echo "   -x                  Clean the build directory from last build attempts"
+   echo ""
+}
+
+build_config=unknown
+clean="false"
+
+# Read shellscript options
+while  getopts  :b:xh  option
+do
+  case  $option  in
+      (b)   build_config=$OPTARG;;
+      (x)   clean="true";;
+      (h)   print_help
+            exit 0;;
+      (\?)  echo "Unknown option -$OPTARG"
+            print_help
+            exit 1;;
+  esac
+done
+
+if [[ ${build_config} == "unknown" ]]; then
+   echo "Missing option -b <build-config>"
+   print_help
+   exit 1
+fi
+
+
+build_dir=${working_dir}/BUILD_$build_config
+
+
+# Check, if include file exists
+build_config_file=${trunk_dir}/INSTALL/MAKE.inc.$build_config
+if [[ ! -f ${build_config_file} ]]; then
+   echo "+++ ERROR: no such make include file:"
+   echo "    \"${build_config_file}\""
+   exit 1
+fi
+
+
+# Create the make depository
+if [[ ! -d ${build_dir} ]]; then
+   mkdir -p ${build_dir}
+else
+   if [[ ${clean} == "true" ]]; then
+      echo "Cleaning the build directory..."
+      rm -rf ${build_dir}/*
+   fi
+fi
+
+
+# Copy makefile and all source code files to make depository
+cp -u ${trunk_dir}/SOURCE/Makefile  ${build_dir}/Makefile_in
+cp -u ${build_config_file}          ${build_dir}/MAKE.inc
+cp -u ${trunk_dir}/SOURCE/*.f90     ${build_dir}
+
+
+# Replace comment in makefile by include statement
+sed  's/#to_be_replaced_by_include/include MAKE.inc/g'  ${build_dir}/Makefile_in  >  ${build_dir}/Makefile
+rm  ${build_dir}/Makefile_in
+
+cd ${build_dir}
+make -j $(get_number_of_cpu_cores)
+cd ../
+
+
+echo "*** PALM build finished. Executable can be found in:"
+echo "    \"${build_dir}\""
+exit 0
Index: /palm/tags/release-6.0/SCRIPTS/palm_simple_run
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_simple_run	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_simple_run	(revision 3477)
@@ -0,0 +1,261 @@
+#!/usr/bin/env bash
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# bugfix: envpar namelist adjusted to current PALM revision
+# 
+# 2875 2018-03-13 11:00:25Z knoop
+# made RUN dirs unique with timestamp again
+# 
+# 2850 2018-03-05 14:24:40Z knoop
+# Refactoring of the palm_simple_ build and run scripts
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+#
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2225 2017-05-16 11:36:20Z raasch
+# shell changed to bash
+#
+# 1310 2014-03-14 08:01:56Z raasch
+# update GPL copyright
+#
+# 1221 2013-09-10 08:59:13Z raasch
+# setting of PGI_ACC_SYNCHRONOUS=1 for running with pgi-openacc
+#
+# 1172 2013-05-30 11:46:00Z raasch
+# for performance reasons set PGI_ACC_SYNCHRONOUS=1 for pgi/openacc execution
+#
+# 1171 2013-05-30 11:27:45Z raasch
+# new option -e which defines the execution command to be used to run PALM
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# 29/08/11 - BjornW - Adapted for lcflow (ForWind cluster in Oldenburg)
+# 18/03/10 - Siggi  - Some comments changed
+# 25/01/10 - Siggi  - Generating the first version
+
+
+#--------------------------------------------------------------------------------#
+# palm_simple_run - a simple method for running the palm code without
+#                   using the mrun script
+#
+# This script runs the palm code in a unique subdirectory (OUTPUT...,
+# current time/date and number of processors are part of the subdirectory
+# name).
+# It requires that palm has been installed with command
+# palm_simple_install and that the executable palm has been created
+# with make in directory  ...../MAKE_DEPOSITORY_simple
+#--------------------------------------------------------------------------------#
+SOURCE="${BASH_SOURCE[0]}"
+while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
+  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+  SOURCE="$(readlink "$SOURCE")"
+  # if $SOURCE was a relative symlink, we need to resolve it
+  # relative to the path where the symlink file was located
+  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+done
+SCRIPT_LOCATION="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+
+working_dir=$(readlink -f "${SCRIPT_LOCATION}/../../")
+trunk_dir=$(readlink -f "${SCRIPT_LOCATION}/../")
+
+# Variable declarations + default values
+build_config=unknown
+run_config=unknown
+test_case=unknown
+mpi_ranks=1
+mpi_ranks_per_node=1
+openmp_threads=1
+localhost_realname=$(hostname)
+cpumax=999999
+
+print_help() {
+   echo "Usage: palm_simple_run -b <build-config> -c <run-config> -s <test-case>"
+   echo "                       [-n <mpi-ranks-per-node>] [-p <mpi-ranks>]"
+   echo "                       [-t <openmp-threads>]"
+   echo ""
+   echo "List of allowed option:"
+   echo ""
+   echo "   -b <build-config>        Suffix of any MAKE.inc.<build-config> file in the trunk/INSTALL dir."
+   echo "   -c <run-config>          Suffix of any RUN.cmd.<run-config> file in the trunk/INSTALL dir."
+   echo "   -n <mpi-ranks-per-node>  Number of MPI ranks per compute node."
+   echo "   -p <mpi-ranks>           Number of MPI ranks in total."
+   echo "   -s <test-case>           Prefix of any <test-case>_p3d file in the trunk/INSTALL dir."
+   echo "   -t <openmp-threads>      Number of OpenMP threads"
+   echo ""
+   echo ""
+}
+
+
+   # Read shellscript options
+while  getopts  :b:c:n:p:s:t:h  option
+do
+  case  $option  in
+      (b)   build_config=$OPTARG;;
+      (c)   run_config=$OPTARG;;
+      (n)   mpi_ranks_per_node=$OPTARG;;
+      (p)   mpi_ranks=$OPTARG;;
+      (s)   test_case=$OPTARG;;
+      (t)   openmp_threads=$OPTARG;;
+      (h)   print_help
+            exit 0;;
+      (\?)  echo "Unknown option -$OPTARG"
+            print_help
+            exit 1;;
+  esac
+done
+
+if [[ ${build_config} == "unknown" ]]
+then
+   echo "Missing option -b <build-config>"
+   print_help
+   exit 1
+fi
+
+if [[ ${run_config} == "unknown" ]]
+then
+   echo "Missing option -c <run-config>"
+   print_help
+   exit 1
+fi
+
+if [[ ${test_case} == "unknown" ]]
+then
+   echo "Missing option -s <test-case>"
+   print_help
+   exit 1
+fi
+
+build_dir=${working_dir}/BUILD_${build_config}
+
+if [[ ! -d ${build_dir} ]]
+then
+   echo "+++ ERROR: No build for configuration ${build_config} exists! "
+   echo "           Please run \"palm_simple_install -b ${build_config}\""
+   echo "           or specify a different build that this run should be based on"
+   exit 1
+fi
+
+   # Check, if include file exists
+run_config_file=${trunk_dir}/INSTALL/RUN.cmd.${run_config}
+if [[ ! -f ${run_config_file} ]]
+then
+   echo "+++ ERROR: no such run command file:"
+   echo "    \"${run_config_file}\""
+   exit 1
+fi
+
+   # Find out the global svn revision number
+global_revision=$(svnversion ${trunk_dir}  2>/dev/null)
+global_revision="Rev: $global_revision"
+
+
+   # Generate unique directory/files for this run
+timedate="$(date +%F_%H:%M:%S)"
+suffix=${build_config}_${run_config}_${test_case}_${mpi_ranks}_${mpi_ranks_per_node}_${openmp_threads}_${timedate}
+execution_dir=${working_dir}/RUN_${suffix}
+
+if [[ ! -d ${execution_dir} ]]
+then
+   mkdir -p ${execution_dir}
+   echo "*** PALM running in directory ${execution_dir}"
+else
+   echo "+++ ERROR: ${execution_dir} exists\!   Must be unique.  Exiting."
+   exit 1
+fi
+
+
+# Check if palm has been installed and copy executable into the run
+# directory
+if [[ ! -f ${build_dir}/palm ]]
+then
+   echo "+++ ERROR: palm executable does not exist."
+   echo "           Please run \"palm_simple_install\"."
+   exit 1
+else
+   cp  ${build_dir}/palm  ${execution_dir}/palm
+fi
+
+
+# Check, if parameter file exists and copy into the run directory
+if [[ ! -f ${trunk_dir}/INSTALL/${test_case}_p3d ]]
+then
+   echo "+++ ERROR: parameter file"
+   echo "           \"${trunk_dir}/INSTALL/${test_case}_p3d\""
+   echo "           does not exist."
+   exit 1
+else
+   cp  ${trunk_dir}/INSTALL/${test_case}_p3d  ${execution_dir}/PARIN
+fi
+
+
+
+
+# Create NAMELIST file containing environment values needed by palm
+cat  >  ${execution_dir}/ENVPAR  <<  EOF
+&envpar  run_identifier = '${test_case}',
+         host = 'localhost',
+         revision = '${global_revision}',
+         tasks_per_node = ${mpi_ranks_per_node},
+         maximum_parallel_io_streams = ${mpi_ranks_per_node},
+         progress_bar_disabled = .TRUE.,
+         write_binary = .FALSE.,
+         maximum_cpu_time_allowed = ${cpumax}.,
+         local_dvrserver_running = .FALSE.,
+/
+EOF
+
+
+# Coupled runs cannot be carried out with this simple run script
+echo "no_coupling"  >  ${execution_dir}/runfile_atmos
+
+
+# Generate hostfile (if neccessary)
+(( ii = 1 ))
+while (( ii <= $mpi_ranks ))
+do
+   echo  $localhost_realname  >>  ${execution_dir}/hostfile
+   (( ii = ii + 1 ))
+done
+
+
+# Switch to run directory
+cd  ${execution_dir}
+
+# Start palm run
+echo "*** PALM will be executed with configuration: ${run_config}"
+echo "       MPI ranks in total: $mpi_ranks"
+echo "       MPI ranks per node: $mpi_ranks_per_node"
+echo "       OpenMP threads:     $openmp_threads"
+
+# execute according to the run command file
+source ${run_config_file}
+
+echo "*** PALM execution finished. Results can be found in:"
+echo "    \"${execution_dir}\""
+exit 0
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd	(revision 3477)
@@ -0,0 +1,972 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Modified header
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2416 2017-09-06 14:28:14Z maronga
+# Adapted for palmrun
+# 
+# 1754 2016-02-22 13:50:22Z maronga
+#
+# 1753 2016-02-22 13:49:49Z maronga
+# Bugfix: use of global variables is required after updating configuration file
+# 
+# 1751 2016-02-15 07:44:16Z maronga
+# Bugfixes: runs on multiple hosts caused crash of the watchdog. Progress bar
+# occasionally showed wrong progress.
+# New: Hosts can be switched on/off and update_frequency can be modified via 
+# File->Options. Security check for cancelation of jobs.
+# 
+# 1618 2015-07-13 06:52:15Z maronga
+# Added steering via configuration file .wd.config, to be place in the local
+# palm directory. Watchdog save files are automatically created upon first start.
+# 
+# 1613 2015-07-08 14:53:29Z maronga
+# Bugfix: tooltip for queuing name did not show up on first update.
+# New: added contect menu for showing the parameter file and the run control
+# output
+# 
+# 1611 2015-07-07 12:23:22Z maronga
+# Initial revision
+# 
+#
+# Description:
+# ------------
+# PALM watchdog client for monitoring batch jobs on a variety of hosts specified
+# by the user
+# 
+# Instructions:
+# -------------
+# 1) Modify the header section of palm_wd
+# 2) Move .wd.olddata and .wd.newdata to your palm directory 
+#    (e.g. /home/user/current_version/.wd.newdata etc.)
+# 3) Modify a copy of palm_wdd for each host to be monitored and move it to the
+#    respective hosts
+# 4) Start the client either from mrungui or from shell by "nohup palm_wd&"
+
+# To do:
+# ------
+# 1) Add "Options", "Help" and "Manual"
+# 2) Move user settings to a configuration file
+#------------------------------------------------------------------------------!
+
+import ConfigParser
+import datetime
+import os
+from PyQt4 import QtGui, QtCore, uic
+from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT
+import shutil
+import subprocess as sub
+import sys
+import time
+
+# Determine PALM directories
+try: 
+   devnull = open(os.devnull, 'w')
+   out = sub.check_output("echo $PALM_BIN", shell=True, stderr=sub.STDOUT)
+   palm_bin = out.rstrip()
+   palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1]
+   out = None
+except:   
+   print "Error. $PALM_BIN is not set."
+   raise SystemExit
+
+
+# Read configuration file
+# First check if the configuration file exists
+if ( os.path.exists(palm_dir + '/.wd.config') == False ):
+    print "Error. No configuration file .wd.config found in " + palm_dir
+    raise SystemExit     
+
+config = ConfigParser.RawConfigParser()
+config.read(palm_dir + '/.wd.config')
+
+description = []
+hostname = []
+username = []
+
+for i in range(0,len(config.sections())):
+
+    description_tmp = config.sections()[i]
+ 
+    if ( description_tmp != 'Settings' ):
+      
+       if ( config.get(description_tmp, 'enabled') == 'true' ):
+          description.append(description_tmp)
+          hostname.append(config.get(description_tmp, 'hostname'))
+          username.append(config.get(description_tmp, 'username')) 
+    else:
+       update_frequency = int(config.get(description_tmp, 'update_frequency'))*60000
+
+# Check if .wd.olddata and .wd.newdata exist. Otherwise create the files
+if ( os.path.exists(palm_dir + '/.wd.olddata') == False ):
+   print "No .wd.olddata found. Creating..."
+   file1 = open(palm_dir + '/.wd.olddata', 'a')
+   file1.close()
+   
+
+if ( os.path.exists(palm_dir + '/.wd.newdata') == False ):
+   print "No .wd.newdata found. Creating..."  
+   file1 = open(palm_dir + '/.wd.newdata', 'a')
+   file1.close()
+
+# Dummy variables for the jobname and the progressbars
+jobname = ""
+timestamp = ""
+pbars = []
+job_data_list = []
+
+# Message box for showing RUN_CONTROL output
+class MessageBoxScroll(QtGui.QMessageBox):
+    def __init__(self):
+        QtGui.QMessageBox.__init__(self)
+        self.setSizeGripEnabled(True)
+
+    def event(self, e):
+        result = QtGui.QMessageBox.event(self, e)
+
+        self.setMinimumHeight(100)
+        self.setMaximumHeight(16777215)
+        self.setMinimumWidth(400)
+        self.setMaximumWidth(16777215)
+        self.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+
+        textEdit = self.findChild(QtGui.QTextEdit)
+        if textEdit != None :
+            textEdit.setMinimumHeight(800)
+            textEdit.setMaximumHeight(16777215)
+            textEdit.setMinimumWidth(1000)
+            textEdit.setMaximumWidth(16777215)
+            textEdit.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+            f = QtGui.QFont('not_a_font') # 
+            f.setStyleHint(f.TypeWriter, f.PreferDefault)
+            textEdit.setFont(f)
+
+        return result
+
+
+# Message box for showing RUN_CONTROL output
+class OptionBox(QtGui.QDialog):
+    def __init__(self):
+      
+        super(OptionBox, self).__init__()
+      
+        uic.loadUi(palm_bin + '/palm_wd_files/wdoptions.ui', self)
+        
+        hostname = []
+        self.checkbox = []
+        j = -1
+        ypos = 0
+   
+        self.vbox = QtGui.QVBoxLayout(self)
+        self.vbox.setSpacing(0)
+        self.vbox.setMargin(0)       
+    
+        config.read(palm_dir + '/.wd.config')
+    
+        for i in range(0,len(config.sections())):
+
+           description_tmp = config.sections()[i]
+ 
+           if ( description_tmp != 'Settings' ):
+              description.append(description_tmp)
+              hostname.append(config.get(description_tmp, 'hostname'))
+              
+              j = j + 1
+              self.checkbox.append(j)
+              self.checkbox[j] = QtGui.QCheckBox(description_tmp, self)   
+              ypos = ypos + 20
+              self.checkbox[j].move(10,0)
+              if ( config.get(description_tmp, 'enabled') == 'true' ):
+                 self.checkbox[j].toggle()
+                       
+              self.vbox.addWidget(self.checkbox[j])
+           else:
+	      self.update_spin.setValue(int(config.get(description_tmp, 'update_frequency')))
+     
+        self.hostBox.setLayout(self.vbox)
+        self.hostBox.setGeometry(0, 0, 272, 50+ypos)
+        self.settingBox.setGeometry(281, 0, 214, 50+ypos)
+        self.ok.setGeometry(385, 50+ypos, 111, 24)
+        self.cancel.setGeometry(270, 50+ypos, 111, 24)
+        
+        self.setGeometry(0, 0, 500, 80+ypos)
+        self.show()
+        
+        return
+
+#   save updtes to file
+    def SaveAndClose(self):
+      
+       for i in range(0,len(self.checkbox)):
+          
+          if ( self.checkbox[i].checkState() == 0 ):
+	     config.set(str(self.checkbox[i].text()),'enabled','false')
+	  else:
+	     config.set(str(self.checkbox[i].text()),'enabled','true')       
+       
+       config.set('Settings','update_frequency',self.update_spin.text())  
+
+       with open(palm_dir + '/.wd.config', 'wb') as configfile:
+          config.write(configfile)
+
+
+       self.close()
+     
+       return
+
+
+
+# MainWindow class
+class Watchdog(QtGui.QMainWindow):
+    
+    def __init__(self):
+        super(Watchdog, self).__init__()
+        
+        self.InitUi()   
+        
+   
+    # Initialized MainWindow UI
+    def InitUi(self):
+
+        # Load predefined mainwindow
+        uic.loadUi(palm_bin + '/palm_wd_files/wd.ui', self)
+
+        # Resize columns and set number of rows to zero. Column 6 is hidden and
+        # contains the remote jobname (e.g. hannover.174610)
+        self.table.setColumnWidth(0,230)
+        self.table.setColumnWidth(1,80)
+        self.table.setColumnWidth(2,50)
+        self.table.setColumnWidth(3,80)     
+        self.table.setColumnWidth(4,180)
+        self.table.setColumnWidth(5,115)   
+        self.table.setColumnHidden(6, True)
+        self.table.setRowCount(0) 
+    
+        # Display MainWindow
+        self.show()
+        QtGui.QApplication.processEvents()
+
+        # Start refresh timer. On timeout perform update
+        self.timer = QtCore.QTimer(self)
+        self.timer.timeout.connect(self.Refresh)
+        self.timer.setSingleShot(False)
+        self.timer.start(update_frequency)
+
+        # The timetimer counts the time since last update
+        self.timetimer= QtCore.QElapsedTimer()
+        self.timetimer.start()
+
+        # The labeltimer induces the update of the remaining time in the UI
+        self.labeltimer = QtCore.QTimer(self)
+        self.labeltimer.timeout.connect(self.UpdateLabel)
+        self.labeltimer.setSingleShot(False)
+
+        # Update in the UI will be performed at each 1/10 of the update interval
+        self.labeltimer.start(update_frequency/10)   
+        self.label.setText("Next update in " + str(update_frequency/1000/60) + "min")
+
+        # Update the list now
+        self.Refresh()
+        
+
+    # Add a custom context menu
+    def OpenContextMenu(self, position):
+        menu = QtGui.QMenu()
+       
+        # "Show details" -> fetch details for the selected job
+        detailsjobAction = menu.addAction('Show job details')     
+        detailsjobAction.setStatusTip('Display detailed info for job')
+        detailsjobAction.triggered.connect(self.ShowDetails)
+
+        # "Show parameter file" -> show the contents of PARIN
+        parinAction = menu.addAction('Show parameter file')     
+        parinAction.setStatusTip('Display the parameter file of the job (e.g. PARIN / _p3d)')
+        parinAction.triggered.connect(self.ShowPARIN)
+        
+        rcAction = menu.addAction('Show run control file')     
+        rcAction.setStatusTip('Display the current run control file (e.g. RUN_CONTROL / _rc)')
+        rcAction.triggered.connect(self.ShowRC)
+        
+        # "Cancel job" -> remove job from queuing system
+        canceljobAction = menu.addAction('Cancel job')
+        canceljobAction.setStatusTip('Remove job from queueing system')
+        canceljobAction.triggered.connect(self.CancelJob)
+        
+        # "Force stop" -> force termination of job
+        stopjobAction = menu.addAction('Force stop')
+        stopjobAction.setStatusTip('Terminate job properly')
+        stopjobAction.triggered.connect(self.DoStop)
+   
+        # "Force restart" -> force rermination and restart of job
+        restartjobAction = menu.addAction('Force restart')
+        restartjobAction.setStatusTip('Terminate job properly and initiate restart')
+        restartjobAction.triggered.connect(self.DoRestart)
+  
+        # "Remove from list" -> remove a completed job from the list
+        removefromlistAction = menu.addAction('Remove from list')     
+        removefromlistAction.setStatusTip('Remove finished job')
+        removefromlistAction.triggered.connect(lambda: self.RemoveFromList(-1))     
+
+        
+        # Activate/deactive contect menu items based on the status of the runs
+        state = self.table.item(self.table.currentRow(),3).text()
+        if (state == "Canceled" or state == "Completed" or state == "Terminated"):
+            detailsjobAction.setEnabled(False)
+            canceljobAction.setEnabled(False)  
+            removefromlistAction.setEnabled(True)  
+        else:
+            detailsjobAction.setEnabled(True)
+            canceljobAction.setEnabled(True)  
+            removefromlistAction.setEnabled(False)   
+ 
+        if ( state == "Running" ):
+	    stopjobAction.setEnabled(True) 
+            restartjobAction.setEnabled(True)   
+            parinAction.setEnabled(True)
+            rcAction.setEnabled(True)          
+        else:
+	    stopjobAction.setEnabled(False) 
+            restartjobAction.setEnabled(False)   
+            parinAction.setEnabled(False)
+            rcAction.setEnabled(False)  
+            
+        # Show the context menu
+        action = menu.exec_(self.table.mapToGlobal(position))
+
+
+    # Collecting watchdog data and display in the UI
+    def Refresh(self):
+      
+        # Use global variables
+        global pbars
+        global update_frequency
+
+        # Deactivate timer processes until update is finished
+        # QtGui.QApplication.processEvents() updates the UI whenever needed
+        self.labeltimer.stop() 
+        self.label.setText("Updating...") 
+        QtGui.QApplication.processEvents()
+        self.setEnabled(False)
+        QtGui.QApplication.processEvents()
+
+        # Get current timestamp
+        timestamp = datetime.datetime.now().strftime("%d/%m/%Y %H:%M")
+        
+        # Open an empty file for the watchdog data        
+        file = open(palm_dir + '/.wd.newdata', 'w')
+        
+ 
+        # Set all required variables to their initial values. Sorting must be
+        # disabled.
+        self.table.setRowCount(0) 
+        self.table.setSortingEnabled(False)
+        i = -1
+        job_data_list = []
+        pbars = []
+        
+        # Scan all hosts in the variable hostname. For each host perform the
+        # update loop
+        for h in range(0,len(hostname)):
+	  
+	    # Perform ssh command
+            host    = username[h] + "@" + hostname[h]
+            ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd queue " + username[h]],
+                           shell=False,
+                           stdout=sub.PIPE,
+                           stderr=sub.PIPE)
+            result = ssh.stdout.readlines()
+            result = filter(None, result)
+ 
+ 
+     	    # Delete all job data
+	    job_data_tmp = []
+            job_data = []
+            job_data_n = []    
+	    job_progress = 0
+
+            # In case of errors display error message
+            if ( len(result) < 1 ):
+                error = ssh.stderr.readlines()
+                if ( error != [] ):
+                    notify = QtGui.QMessageBox.warning(self,'Collect data',"Error. An error occured during read of job data for user " + username[h] +" for host " + description[h] + ".\n\nError message:\n" + ''.join(error))
+
+            # No error -> save job data
+            else:        
+
+                # Successively write to job_data
+                for j in range(0,len(result)):
+   
+  		    job_data_tmp.append(j)
+                    job_data_tmp[j] = result[j].split(" ")
+                    job_data_tmp[j] = filter(None, job_data_tmp[j])
+  
+                    job_data.append(j)   
+                    job_data[j] = [job_data_tmp[j][0], description[h], job_data_tmp[j][2],                  
+				   job_data_tmp[j][3], int(float(job_data_tmp[j][4])*100), job_data_tmp[j][5], 
+				   job_data_tmp[j][1], job_data_tmp[j][6].rstrip()]
+                    job_data_n.append(j)
+                    job_data_n[j] = job_data_tmp[j][1]
+
+            del(result)
+
+
+
+            # Now read the data from the last update from file. These data are
+            # already in the prefered format
+            file2 = open(palm_dir + '/.wd.olddata', 'r')
+	    result = file2.readlines()
+	    file2.close()
+
+	    job_data_old = []
+	    job_data_old_n = []
+            k = -1
+            for j in range(0,len(result)):
+	        if ( result[j].split()[1] == description[h] ):
+		    k = k + 1
+		    job_data_old.append(k)
+                    job_data_old[k] = result[j].split(" ")
+                    job_data_old[k] = filter(None, job_data_old[k])
+                    job_data_old[k] = [line.rstrip('\n') for line in job_data_old[k]]
+                    job_data_old_n.append(k)
+                    job_data_old_n[k] = job_data_old[k][6]
+
+            # Merge the job_data and job_data_old to find completed, new and
+            # still queued jobs     
+            if ( len(job_data_n) > 0 and len(job_data_old_n) > 0 ):
+               jobs_full  = list(set(job_data_old_n) | set(job_data_n))
+               jobs_known    = list(set(job_data_old_n) & set(job_data_n))
+               jobs_complete = set(job_data_old_n) - set(job_data_n)
+               jobs_new      = set(job_data_n) - set(job_data_old_n)
+            elif ( len(job_data_n) > 0 ):
+	       jobs_full  = job_data_n
+	       jobs_known    = []
+	       jobs_new = job_data_n
+	       jobs_complete = []
+	    elif ( len(job_data_old_n) > 0 ):
+	       jobs_full  = job_data_old_n
+	       jobs_known    = []
+	       jobs_new = []
+	       jobs_complete = job_data_old_n   
+	    else:
+	       jobs_full  = []
+	       jobs_known    = []         
+	       jobs_new = []
+	       jobs_complete = []
+
+            # Display all known jobs
+            to_display = [list(job_data_n).index(item) for item in list(jobs_known) if list(jobs_known) and list(job_data_n)]
+            for j in range(0,len(to_display)):
+	        i = i + 1
+                self.table.insertRow(i)
+                item = QtGui.QTableWidgetItem(job_data[to_display[j]][0])
+                item.setToolTip("Queuing name: " + job_data[to_display[j]][6])
+                self.table.setItem(i, 0, item)            
+                self.table.setItem(i, 1, QtGui.QTableWidgetItem(job_data[to_display[j]][1])) 
+                self.table.setItem(i, 2, QtGui.QTableWidgetItem(job_data[to_display[j]][2]))   
+                self.table.setItem(i, 3, QtGui.QTableWidgetItem(job_data[to_display[j]][3]))
+                item = QtGui.QTableWidgetItem(job_data[to_display[j]][5])
+                item.setToolTip("Estimated job start: " + job_data[to_display[j]][7])               
+                self.table.setItem(i, 5, item)  
+                self.table.setItem(i, 6, QtGui.QTableWidgetItem(job_data[to_display[j]][6]))  
+                self.table.item(i,2).setTextAlignment(QtCore.Qt.AlignRight)
+                self.table.item(i,5).setTextAlignment(QtCore.Qt.AlignRight)
+                pbars.append(i)
+                pbars[i] = QtGui.QProgressBar(self)
+                pbars[i].setValue(int(job_data[to_display[j]][4])) 
+ 
+                # Apply a color depending on the status of the job
+                if ( job_data[to_display[j]][3] == "Running" ):
+                    self.table.setCellWidget(i,4,pbars[i]) 
+		    self.table.item(i,0).setBackground(QtGui.QColor(255, 251, 168))
+		    self.table.item(i,1).setBackground(QtGui.QColor(255, 251, 168))
+		    self.table.item(i,2).setBackground(QtGui.QColor(255, 251, 168))
+                    self.table.item(i,3).setBackground(QtGui.QColor(255, 251, 168))
+                    self.table.item(i,5).setBackground(QtGui.QColor(255, 251, 168))
+                    self.table.item(i,6).setBackground(QtGui.QColor(255, 251, 168))
+                else:
+		    pbars[j].setEnabled(False)
+		    self.table.setCellWidget(i,4,pbars[i])
+                    self.table.item(i,0).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,1).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,2).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,3).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,5).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,6).setBackground(QtGui.QColor(255, 112, 118))
+                
+                # Save the job data to file
+                job_data_list.append(i)
+                job_data_list[i] = job_data[to_display[j]][0]
+                
+                printstring = str(job_data[to_display[j]][0]) + " " + \
+                              str(job_data[to_display[j]][1]) + " " + \
+                              str(job_data[to_display[j]][2]) + " " + \
+                              str(job_data[to_display[j]][3]) + " " + \
+                              str(job_data[to_display[j]][4]) + " " + \
+                              str(job_data[to_display[j]][5]) + " " + \
+                              str(job_data[to_display[j]][6]) + " " + \
+                              str(job_data[to_display[j]][7]) + "\n"
+                file.write(printstring)
+
+
+            # Display all new jobs
+            to_display = [list(job_data_n).index(item) for item in list(jobs_new) if list(jobs_new) and list(job_data_n)]
+            for j in range(0,len(to_display)):
+	        i = i + 1
+                self.table.insertRow(i)
+                item = QtGui.QTableWidgetItem(job_data[to_display[j]][0])
+                item.setToolTip("Queuing name: " + job_data[to_display[j]][6])
+                self.table.setItem(i, 0, item)   
+                self.table.setItem(i, 1, QtGui.QTableWidgetItem(job_data[to_display[j]][1])) 
+                self.table.setItem(i, 2, QtGui.QTableWidgetItem(job_data[to_display[j]][2]))   
+                self.table.setItem(i, 3, QtGui.QTableWidgetItem(job_data[to_display[j]][3])) 
+                item = QtGui.QTableWidgetItem(job_data[to_display[j]][5])
+                item.setToolTip("Estimated job start: " + job_data[to_display[j]][7])               
+                self.table.setItem(i, 5, item)  
+                self.table.setItem(i, 6, QtGui.QTableWidgetItem(job_data[to_display[j]][6]))  
+                self.table.item(i,2).setTextAlignment(QtCore.Qt.AlignRight)
+                self.table.item(i,5).setTextAlignment(QtCore.Qt.AlignRight)
+                
+                pbars.append(i)
+                pbars[i] = QtGui.QProgressBar(self)
+                pbars[i].setValue(int(job_data[to_display[j]][4]))   
+
+                # Apply a color depending on the status of the job
+                if ( job_data[to_display[j]][3] == "Running" ):
+		    self.table.setCellWidget(i,4,pbars[i])           
+		    self.table.item(i,0).setBackground(QtGui.QColor(255, 251, 168))
+		    self.table.item(i,1).setBackground(QtGui.QColor(255, 251, 168))
+		    self.table.item(i,2).setBackground(QtGui.QColor(255, 251, 168))
+                    self.table.item(i,3).setBackground(QtGui.QColor(255, 251, 168))
+                    self.table.item(i,5).setBackground(QtGui.QColor(255, 251, 168))
+                    self.table.item(i,6).setBackground(QtGui.QColor(255, 251, 168))
+                else:
+		    pbars[j].setEnabled(False)
+		    self.table.setCellWidget(i,4,pbars[i])
+                    self.table.item(i,0).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,1).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,2).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,3).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,5).setBackground(QtGui.QColor(255, 112, 118))
+                    self.table.item(i,6).setBackground(QtGui.QColor(255, 112, 118))
+          
+                # Save job data to file
+                job_data_list.append(i)
+                job_data_list[i] = job_data[to_display[j]][0]
+                
+                printstring = str(job_data[to_display[j]][0]) + " " + \
+                              str(job_data[to_display[j]][1]) + " " + \
+                              str(job_data[to_display[j]][2]) + " " + \
+                              str(job_data[to_display[j]][3]) + " " + \
+                              str(job_data[to_display[j]][4]) + " " + \
+                              str(job_data[to_display[j]][5]) + " " + \
+                              str(job_data[to_display[j]][6]) + " " + \
+                              str(job_data[to_display[j]][7]) + "\n"
+                file.write(printstring)
+
+
+            # Display all completed/canceled/aborted jobs. The watchdog cannot
+            # distinguish why the job has been finished
+            to_display = [list(job_data_old_n).index(item) for item in list(jobs_complete) if list(jobs_complete) and list(job_data_old_n)]
+            for j in range(0,len(to_display)):
+	        i = i + 1
+                self.table.insertRow(i)
+                item = QtGui.QTableWidgetItem(job_data_old[to_display[j]][0])
+                item.setToolTip("Queuing name: " + job_data_old[to_display[j]][6])
+                self.table.setItem(i, 0, item)          
+                self.table.setItem(i, 1, QtGui.QTableWidgetItem(job_data_old[to_display[j]][1])) 
+                self.table.setItem(i, 2, QtGui.QTableWidgetItem(job_data_old[to_display[j]][2]))   
+                self.table.setItem(i, 3, QtGui.QTableWidgetItem(job_data_old[to_display[j]][3]))  
+                pbars.append(i)
+                pbars[j] = QtGui.QProgressBar(self)
+                pbars[j].setValue(int(job_data_old[to_display[j]][4]))  
+                pbars[j].setEnabled(False)
+                self.table.setCellWidget(i,4,pbars[j]) 
+                item = QtGui.QTableWidgetItem(job_data_old[to_display[j]][5])
+                item.setToolTip("Estimated job start: " + job_data_old[to_display[j]][7])               
+                self.table.setItem(i, 5, item)  
+                self.table.setItem(i, 6, QtGui.QTableWidgetItem(job_data_old[to_display[j]][6]))  
+                self.table.item(i,2).setTextAlignment(QtCore.Qt.AlignRight)
+                self.table.item(i,5).setTextAlignment(QtCore.Qt.AlignRight)
+                self.table.setItem(i, 3, QtGui.QTableWidgetItem("Completed"))
+                
+                # Apply a color depending on the status of the job
+                self.table.item(i,0).setBackground(QtGui.QColor(172, 252, 175))
+                self.table.item(i,1).setBackground(QtGui.QColor(172, 252, 175))
+                self.table.item(i,2).setBackground(QtGui.QColor(172, 252, 175))
+                self.table.item(i,3).setBackground(QtGui.QColor(172, 252, 175))
+                self.table.item(i,5).setBackground(QtGui.QColor(172, 252, 175))
+                self.table.item(i,6).setBackground(QtGui.QColor(172, 252, 175))
+
+          
+                # Save job data to file
+                job_data_list.append(i)
+                job_data_list[i] = job_data_old[to_display[j]][0]
+
+                printstring = str(job_data_old[to_display[j]][0]) + " " + \
+                              str(job_data_old[to_display[j]][1]) + " " + \
+                              str(job_data_old[to_display[j]][2]) + " " + \
+                              str(job_data_old[to_display[j]][3]) + " " + \
+                              str(job_data_old[to_display[j]][4]) + " " + \
+                              str(job_data_old[to_display[j]][5]) + " " + \
+	                      str(job_data_old[to_display[j]][6]) + " " + \
+                              str(job_data_old[to_display[j]][7]) + "\n"
+                file.write(printstring)
+
+            del(jobs_complete)
+            del(jobs_new)
+            del(result)
+            del(job_data_old)
+            del(job_data_old_n)
+            
+        file.close()
+
+        
+        # Update is complete, sorting can thus be re-enabled                
+        self.table.setSortingEnabled(True) 
+
+        # Update the logfile
+        if ( os.path.isfile(palm_dir + '/.wd.newdata') ):
+            shutil.copy(palm_dir + '/.wd.newdata',palm_dir + '/.wd.olddata')
+
+        # Re-enable timer processes             
+        self.setEnabled(True)
+        self.label2.setText("Last update: " + timestamp)
+        self.label.setText("Update complete.")
+        self.timetimer.start()
+        self.timer.start(update_frequency)
+        self.labeltimer.start(update_frequency/10)
+        self.UpdateLabel()
+        QtGui.QApplication.processEvents()
+       
+    # Canceling selected job from table
+    def CancelJob(self):
+
+        # Return internal jobname
+        jobname = self.table.item(self.table.currentRow(),6).text()
+        jobrealname = self.table.item(self.table.currentRow(),0).text()     
+ 
+        # Check description of job in order to login on the correct host
+        descr = self.table.item(self.table.currentRow(),1).text()
+        
+        querybox = QtGui.QMessageBox()
+        querybox.setText("Attention!\nYou are trying to cancel a job. It will not be able to terminate properly.")
+        querybox.setInformativeText("Do you really want to cancel " + jobname + " on host " + descr + "?")
+        querybox.setStandardButtons(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
+        querybox.setDefaultButton(QtGui.QMessageBox.No)
+        returnvalue = querybox.exec_()
+       
+        if ( returnvalue == QtGui.QMessageBox.Yes ):
+        
+           for h in range(0,len(description)):
+	       if ( descr == description[h] ):
+                  host = username[h] + "@" + hostname[h]
+
+           ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd cancel " + jobname],
+                              shell=False,
+                              stdout=sub.PIPE,
+                              stderr=sub.PIPE)
+           result = ssh.stdout.readlines()
+           result = filter(None, result)
+        
+           # In case of error display a warning message
+           if ( len(result) == 0 ):
+               error = ssh.stderr.readlines()
+               notify = QtGui.QMessageBox.warning(self,'Cancel job',"Error. Could not cancel job " + jobname + ".\n\nError message:\n" + ''.join(error))
+
+           # Otherwise inform the user and mark the job in the table
+           else:
+	       self.table.setItem(self.table.currentRow(),3,QtGui.QTableWidgetItem("Canceled"))
+               notify = QtGui.QMessageBox.information(self,'Cancel job',"Job" + jobname + " canceled!\n\nServer message:\n" + ''.join(result))
+
+
+    # Show detailed information on job. For documentation see above
+    def ShowDetails(self):
+
+        jobname = self.table.item(self.table.currentRow(),6).text()  
+        descr   = self.table.item(self.table.currentRow(),1).text()
+        for h in range(0,len(description)):
+	    if ( descr == description[h] ):
+                host = username[h] + "@" + hostname[h]
+
+        ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd check " + jobname],
+                           shell=False,
+                           stdout=sub.PIPE,
+                           stderr=sub.PIPE)
+        result = ssh.stdout.readlines()
+        result = filter(None, result)
+
+        if ( len(result) == 0 ):
+            error = ssh.stderr.readlines()
+            notify = QtGui.QMessageBox.warning(self,'Show job details',"Error. Could not fetch job details for " + jobname + ".\n\nError message:\n" + ''.join(error))
+        else:
+            notify = QtGui.QMessageBox.information(self,'Job details',"Details for job " + jobname + ":\n\n" + ''.join(result))
+
+
+    # Perform a forced stop on the job
+    def DoStop(self):
+
+        # Return internal jobname
+        jobname = self.table.item(self.table.currentRow(),6).text()
+        jobrealname = self.table.item(self.table.currentRow(),0).text()   
+        # Check description of job in order to login on the correct host
+        descr = self.table.item(self.table.currentRow(),1).text()
+        for h in range(0,len(description)):
+	    if ( descr == description[h] ):
+                host = username[h] + "@" + hostname[h]
+                user = username[h]
+
+        ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd stop " + jobrealname],
+                           shell=False,
+                           stdout=sub.PIPE,
+                           stderr=sub.PIPE)
+        result = ssh.stdout.readlines()
+        result = filter(None, result) 
+        
+        # In case of error display a warning message
+        if ( len(result) == 0 ):
+            error = ssh.stderr.readlines()
+            notify = QtGui.QMessageBox.warning(self,'Proper termination of job',"Error. Could not stop job " + jobname + ".\n\nError message:\n" + ''.join(error))
+
+        # Otherwise inform the user and mark the job in the table
+        else:
+	    self.table.setItem(self.table.currentRow(),3,QtGui.QTableWidgetItem("Terminated"))
+            notify = QtGui.QMessageBox.information(self,'Terminate job',"Termination of job " + jobname + " was initiated!\n\nServer message:\n" + ''.join(result))
+
+
+    # Perform a forced stop on the job
+    def DoRestart(self):
+
+        # Return internal jobname
+        jobname = self.table.item(self.table.currentRow(),6).text()
+        jobrealname = self.table.item(self.table.currentRow(),0).text()   
+         
+        # Check description of job in order to login on the correct host
+        descr = self.table.item(self.table.currentRow(),1).text()
+        for h in range(0,len(description)):
+	    if ( descr == description[h] ):
+                host = username[h] + "@" + hostname[h]
+                user = username[h]
+
+        ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd restart " + jobrealname],
+                           shell=False,
+                           stdout=sub.PIPE,
+                           stderr=sub.PIPE)
+        result = ssh.stdout.readlines()
+        result = filter(None, result)
+        
+        # In case of error display a warning message
+        if ( len(result) == 0 ):
+            error = ssh.stderr.readlines()
+            notify = QtGui.QMessageBox.warning(self,'Proper termination of job',"Error. Could not stop job " + jobname + ".\n\nError message:\n" + ''.join(error))
+
+        # Otherwise inform the user and mark the job in the table
+        else:
+	    self.table.setItem(self.table.currentRow(),3,QtGui.QTableWidgetItem("Terminated"))
+            notify = QtGui.QMessageBox.information(self,'Terminate job for restart',"Restart for job" + jobname + " was initiated!\n\nServer message:\n" + ''.join(result))
+            
+
+    # Read the PARIN file of the job
+    def ShowPARIN(self):
+
+        # Return internal jobname
+        jobname = self.table.item(self.table.currentRow(),6).text()
+        jobrealname = self.table.item(self.table.currentRow(),0).text()     
+ 
+        # Check description of job in order to login on the correct host
+        descr = self.table.item(self.table.currentRow(),1).text()
+        for h in range(0,len(description)):
+	    if ( descr == description[h] ):
+                host = username[h] + "@" + hostname[h]
+                user = username[h]
+
+        ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd parin " + jobrealname],
+                           shell=False,
+                           stdout=sub.PIPE,
+                           stderr=sub.PIPE)
+        result = ssh.stdout.readlines()
+        result = filter(None, result)
+        
+        # In case of error display a warning message
+        if ( len(result) == 0 ):
+            error = ssh.stderr.readlines()
+            notify = QtGui.QMessageBox.warning(self,'Showing parameter file',"Error. Could not fetch parameter file for job " + jobrealname + " (" + jobname + ").\n\nError message:\n" + ''.join(error))
+
+        # Otherwise inform the user and mark the job in the table
+        else:
+	   mb = MessageBoxScroll()
+           mb.setText("Parameter file for job: " + jobrealname + "")
+           mb.setDetailedText(''.join(result))
+           mb.exec_()
+
+    # Read the PARIN file of the job
+    def ShowRC(self):
+
+        # Return internal jobname and real job name
+        jobname = self.table.item(self.table.currentRow(),6).text()
+        jobrealname = self.table.item(self.table.currentRow(),0).text()      
+ 
+        # Check description of job in order to login on the correct host
+        descr = self.table.item(self.table.currentRow(),1).text()
+        for h in range(0,len(description)):
+	    if ( descr == description[h] ):
+                host = username[h] + "@" + hostname[h]
+                user = username[h]
+
+        ssh = sub.Popen(["ssh", "%s" % host, "/sw/tools/python/2.7.6/generic/bin/python palm_wdd rc " + jobrealname],
+                           shell=False,
+                           stdout=sub.PIPE,
+                           stderr=sub.PIPE)
+        result = ssh.stdout.readlines()
+        result = filter(None, result)
+        
+        # In case of error display a warning message
+        if ( len(result) == 0 ):
+            error = ssh.stderr.readlines()
+            notify = QtGui.QMessageBox.warning(self,'Showing run control',"Error. Could not fetch run control file for job " + jobrealname + "(" + jobname + ").\n\nError message:\n" + ''.join(error))
+
+        # Otherwise inform the user and mark the job in the table
+        else:
+	   mb = MessageBoxScroll()
+	   lastline = result[len(result)-2].split()[2]
+           mb.setText("Simulated time for job " + jobrealname + " is currently: " + lastline)
+           mb.setDetailedText(''.join(result))
+           mb.exec_()
+
+    # Remove a job from list - removes the current row from the table and from
+    # save file
+    def RemoveFromList(self, row):
+        if ( row == -1 ):
+	    row = self.table.currentRow()
+
+        # Read data from save file
+        job_to_delete = self.table.item(row,6).text()
+        self.table.removeRow(row)
+        file = open(palm_dir + '/.wd.olddata', 'r')
+        result = file.readlines()
+        result = filter(None, result)
+	file.close()
+        file = open(palm_dir + '/.wd.olddata', 'w')
+	
+	job_data_old = []
+	
+        if ( len(result) == 0 ):
+            notify = QtGui.QMessageBox.warning(self,'Read from .wd.olddata',"Error message:\n\nCould not read from file. I/O error.")
+	else: 
+	    # Save data in array job_data_old
+	    for j in range(0,len(result)):
+                job_data_old.append(j)
+                job_data_old[j] = result[j].split(" ")
+                job_data_old[j] = filter(None, job_data_old[j])
+                job_data_old[j] = [line.rstrip('\n') for line in job_data_old[j]]
+                
+                # Check if line j is the selected job, if not -> save to file
+                if ( job_data_old[j][6] != job_to_delete ):
+                    printstring = str(job_data_old[j][0]) + " " + \
+                                  str(job_data_old[j][1]) + " " + \
+                                  str(job_data_old[j][2]) + " " + \
+                                  str(job_data_old[j][3]) + " " + \
+                                  str(job_data_old[j][4]) + " " + \
+                                  str(job_data_old[j][5]) + " " + \
+                                  str(job_data_old[j][6]) + " " + \
+                                  str(job_data_old[j][7]) + "\n"
+                    file.write(printstring)
+           
+        file.close() 
+
+    # Remove all completed jobs from list
+    def ClearList(self):
+      
+       num_of_lines = self.table.rowCount()
+       
+       # Delete all lines with completed/canceled jobs from list. The counter
+       # must decrease as the line numbers would be messed up otherwise
+       for j in range(num_of_lines-1,-1,-1): 
+           state = self.table.item(j,3).text()
+           if ( state == "Completed" or state == "Canceled" or state == "Terminated"):
+              self.RemoveFromList(j)
+         
+    # Update the label
+    def UpdateLabel(self):
+        remaining_time = (update_frequency - self.timetimer.elapsed()) / 1000 / 60
+        self.label.setText("Next update in " + str(remaining_time) + " min")
+        
+
+    # Enter Options menu
+    def Options(self):
+  
+#       disable mainwindow  
+        self.setEnabled(False)
+      
+#       show Options Dialog      
+        opt = OptionBox()
+        opt.exec_()
+
+        self.UpdateHosts()
+        self.setEnabled(True)
+
+# Update settings
+    def UpdateHosts(self):
+
+       global update_frequency
+       global description
+       global hostname
+       global username
+       
+       description = []
+       hostname = []
+       username = []
+
+       for i in range(0,len(config.sections())):
+
+          description_tmp = config.sections()[i]
+ 
+          if ( description_tmp != 'Settings' ):
+      
+             if ( config.get(description_tmp, 'enabled') == 'true' ):
+                description.append(description_tmp)
+                hostname.append(config.get(description_tmp, 'hostname'))
+                username.append(config.get(description_tmp, 'username')) 
+          else:
+             update_frequency = int(config.get(description_tmp, 'update_frequency'))*60000
+
+
+# Main loop       
+def main():
+    
+    app = QtGui.QApplication(sys.argv)
+    res = Watchdog() 
+    sys.exit(app.exec_())
+
+
+if __name__ == '__main__':
+    main()   
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wd.config.default
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wd.config.default	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wd.config.default	(revision 3477)
@@ -0,0 +1,15 @@
+#$Id$
+# Configuration file for palm_wd
+
+[<Replace_by_your_description_of_hostname_1>]
+enabled=true
+hostname=<replace_by_the_remote_hostname_1>
+username=<replace_by_your_remote_username_1>
+
+[<Replace_by_your_description_of_hostname_2>]
+enabled=true
+hostname=<replace_by_the_remote_hostname_2>
+username=<replace_by_your_remote_username_2>
+
+[Settings]
+update_frequency=10
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wd.config.hlrnIII
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wd.config.hlrnIII	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wd.config.hlrnIII	(revision 3477)
@@ -0,0 +1,16 @@
+# $Id$
+# Configuration file for palm_wd
+# Preconfigured for HLRN-III
+
+[Hannover]
+enabled=true
+hostname=hlogin.hlrn.de
+username=<replace_by_your_remote_username>
+
+[Berlin]
+enabled=true
+hostname=blogin.hlrn.de
+username=<replace_by_your_remote_username>
+
+[Settings]
+update_frequency=10
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wdd.config.default
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wdd.config.default	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wdd.config.default	(revision 3477)
@@ -0,0 +1,11 @@
+# $Id$
+# Configuration file for palm_wdd
+
+[Settings]
+readqueue=<replace_by_queuing_system_command>
+tmpdir=<replace_by_%tmp_user_catalog>
+canceljob=<replace_by_command_for_canceling_jobs>
+checkjob=<replace_by_command_for_showing_job_information>
+realname_grep=<replace_by_string_identifier_to_get_job_name>
+starttime=<replace_by_command_for_showing_estimated_start_time>
+starttime_grep=<replace_by_string_identifier_to_get_start_time>
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wdd.config.hlrnIII
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wdd.config.hlrnIII	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd_files/.wdd.config.hlrnIII	(revision 3477)
@@ -0,0 +1,12 @@
+# $Id$
+# Configuration file for palm_wdd
+# Preconfigured for HLRN-III
+
+[Settings]
+readqueue="showq | egrep"
+tmpdir="/gfs1/work/"
+canceljob="canceljob"
+checkjob="checkjob"
+realname_grep="AName"
+starttime="showstart"
+starttime_grep="start in"
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd_files/wd.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd_files/wd.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd_files/wd.ui	(revision 3477)
@@ -0,0 +1,687 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>798</width>
+    <height>197</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>758</width>
+    <height>117</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>1500</width>
+    <height>1000</height>
+   </size>
+  </property>
+  <property name="contextMenuPolicy">
+   <enum>Qt::CustomContextMenu</enum>
+  </property>
+  <property name="windowTitle">
+   <string>PALM Watchdog</string>
+  </property>
+  <property name="windowIcon">
+   <iconset>
+    <normaloff>wd.ico</normaloff>wd.ico</iconset>
+  </property>
+  <property name="animated">
+   <bool>true</bool>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="minimumSize">
+    <size>
+     <width>0</width>
+     <height>0</height>
+    </size>
+   </property>
+   <property name="maximumSize">
+    <size>
+     <width>16777215</width>
+     <height>16777215</height>
+    </size>
+   </property>
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="1" column="0">
+     <widget class="QLabel" name="label2">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>210</width>
+        <height>20</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>190</width>
+        <height>20</height>
+       </size>
+      </property>
+      <property name="frameShape">
+       <enum>QFrame::Box</enum>
+      </property>
+      <property name="frameShadow">
+       <enum>QFrame::Plain</enum>
+      </property>
+      <property name="text">
+       <string>Last update: 27-08-2014 12:50</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="0" colspan="6">
+     <widget class="QTableWidget" name="table">
+      <property name="enabled">
+       <bool>true</bool>
+      </property>
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>20</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>0</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="sizeIncrement">
+       <size>
+        <width>0</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="contextMenuPolicy">
+       <enum>Qt::CustomContextMenu</enum>
+      </property>
+      <property name="frameShape">
+       <enum>QFrame::StyledPanel</enum>
+      </property>
+      <property name="frameShadow">
+       <enum>QFrame::Plain</enum>
+      </property>
+      <property name="lineWidth">
+       <number>1</number>
+      </property>
+      <property name="verticalScrollBarPolicy">
+       <enum>Qt::ScrollBarAsNeeded</enum>
+      </property>
+      <property name="horizontalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOff</enum>
+      </property>
+      <property name="autoScroll">
+       <bool>false</bool>
+      </property>
+      <property name="editTriggers">
+       <set>QAbstractItemView::NoEditTriggers</set>
+      </property>
+      <property name="tabKeyNavigation">
+       <bool>false</bool>
+      </property>
+      <property name="showDropIndicator" stdset="0">
+       <bool>false</bool>
+      </property>
+      <property name="dragDropOverwriteMode">
+       <bool>false</bool>
+      </property>
+      <property name="alternatingRowColors">
+       <bool>false</bool>
+      </property>
+      <property name="selectionMode">
+       <enum>QAbstractItemView::SingleSelection</enum>
+      </property>
+      <property name="selectionBehavior">
+       <enum>QAbstractItemView::SelectRows</enum>
+      </property>
+      <property name="textElideMode">
+       <enum>Qt::ElideLeft</enum>
+      </property>
+      <property name="showGrid">
+       <bool>true</bool>
+      </property>
+      <property name="gridStyle">
+       <enum>Qt::SolidLine</enum>
+      </property>
+      <property name="sortingEnabled">
+       <bool>true</bool>
+      </property>
+      <property name="wordWrap">
+       <bool>false</bool>
+      </property>
+      <property name="cornerButtonEnabled">
+       <bool>false</bool>
+      </property>
+      <property name="rowCount">
+       <number>3</number>
+      </property>
+      <attribute name="horizontalHeaderVisible">
+       <bool>true</bool>
+      </attribute>
+      <attribute name="horizontalHeaderCascadingSectionResizes">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="horizontalHeaderDefaultSectionSize">
+       <number>128</number>
+      </attribute>
+      <attribute name="horizontalHeaderHighlightSections">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="horizontalHeaderStretchLastSection">
+       <bool>true</bool>
+      </attribute>
+      <attribute name="verticalHeaderVisible">
+       <bool>false</bool>
+      </attribute>
+      <attribute name="verticalHeaderDefaultSectionSize">
+       <number>20</number>
+      </attribute>
+      <attribute name="verticalHeaderMinimumSectionSize">
+       <number>18</number>
+      </attribute>
+      <attribute name="verticalHeaderStretchLastSection">
+       <bool>false</bool>
+      </attribute>
+      <row/>
+      <row/>
+      <row/>
+      <column>
+       <property name="text">
+        <string>Job</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignJustify|AlignVCenter</set>
+       </property>
+      </column>
+      <column>
+       <property name="text">
+        <string>Host</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignJustify|AlignVCenter</set>
+       </property>
+      </column>
+      <column>
+       <property name="text">
+        <string>Nodes</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </column>
+      <column>
+       <property name="text">
+        <string>Status</string>
+       </property>
+      </column>
+      <column>
+       <property name="text">
+        <string>Progress</string>
+       </property>
+       <property name="font">
+        <font>
+         <weight>50</weight>
+         <bold>false</bold>
+        </font>
+       </property>
+       <property name="textAlignment">
+        <set>AlignJustify|AlignVCenter</set>
+       </property>
+      </column>
+      <column>
+       <property name="text">
+        <string>Remaining time</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </column>
+      <column>
+       <property name="text">
+        <string>Jobname</string>
+       </property>
+      </column>
+      <item row="0" column="0">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="0" column="1">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="0" column="2">
+       <property name="text">
+        <string>1</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </item>
+      <item row="0" column="3">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="0" column="4">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="0" column="5">
+       <property name="text">
+        <string>1</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </item>
+      <item row="1" column="0">
+       <property name="text">
+        <string>11</string>
+       </property>
+      </item>
+      <item row="1" column="1">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="1" column="2">
+       <property name="text">
+        <string>1</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </item>
+      <item row="1" column="3">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="1" column="4">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="1" column="5">
+       <property name="text">
+        <string>1</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </item>
+      <item row="2" column="0">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="2" column="1">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="2" column="2">
+       <property name="text">
+        <string>1</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </item>
+      <item row="2" column="3">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="2" column="4">
+       <property name="text">
+        <string>1</string>
+       </property>
+      </item>
+      <item row="2" column="5">
+       <property name="text">
+        <string>1</string>
+       </property>
+       <property name="textAlignment">
+        <set>AlignRight|AlignVCenter</set>
+       </property>
+      </item>
+     </widget>
+    </item>
+    <item row="1" column="1">
+     <widget class="QLabel" name="label">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>150</width>
+        <height>20</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>135</width>
+        <height>20</height>
+       </size>
+      </property>
+      <property name="frameShape">
+       <enum>QFrame::Box</enum>
+      </property>
+      <property name="frameShadow">
+       <enum>QFrame::Plain</enum>
+      </property>
+      <property name="text">
+       <string>Next update in 120min</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="2">
+     <widget class="QPushButton" name="button_update">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize">
+       <size>
+        <width>120</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>100</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>Update list</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="3">
+     <widget class="QPushButton" name="button_clear">
+      <property name="minimumSize">
+       <size>
+        <width>120</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>100</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>Clear list</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="4">
+     <widget class="QPushButton" name="button_quit">
+      <property name="minimumSize">
+       <size>
+        <width>120</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>100</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="text">
+       <string>Quit</string>
+      </property>
+      <property name="shortcut">
+       <string>Ctrl+Q</string>
+      </property>
+      <property name="checkable">
+       <bool>false</bool>
+      </property>
+      <property name="autoRepeat">
+       <bool>false</bool>
+      </property>
+      <property name="default">
+       <bool>false</bool>
+      </property>
+      <property name="flat">
+       <bool>false</bool>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>798</width>
+     <height>21</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>File</string>
+    </property>
+    <addaction name="actionRefresh"/>
+    <addaction name="actionOptions"/>
+    <addaction name="actionQuit"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>Help</string>
+    </property>
+    <addaction name="actionManual"/>
+    <addaction name="actionAbout"/>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionRefresh">
+   <property name="text">
+    <string>Refresh</string>
+   </property>
+   <property name="statusTip">
+    <string>Update job list</string>
+   </property>
+   <property name="shortcut">
+    <string>F5</string>
+   </property>
+  </action>
+  <action name="actionQuit">
+   <property name="icon">
+    <iconset>
+     <normaloff>exit.png</normaloff>exit.png</iconset>
+   </property>
+   <property name="text">
+    <string>Quit</string>
+   </property>
+   <property name="iconText">
+    <string>Quit</string>
+   </property>
+   <property name="toolTip">
+    <string>Quit PALM Watchdog</string>
+   </property>
+   <property name="statusTip">
+    <string>Quit PALM Watchdog</string>
+   </property>
+   <property name="shortcut">
+    <string>Ctrl+Q</string>
+   </property>
+  </action>
+  <action name="actionOptions">
+   <property name="text">
+    <string>Options</string>
+   </property>
+  </action>
+  <action name="actionManual">
+   <property name="text">
+    <string>Manual</string>
+   </property>
+  </action>
+  <action name="actionAbout">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>actionQuit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>338</x>
+     <y>135</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>table</sender>
+   <signal>customContextMenuRequested(QPoint)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>OpenContextMenu()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>360</x>
+     <y>45</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>383</x>
+     <y>114</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionRefresh</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>Refresh()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>374</x>
+     <y>72</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_update</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>Refresh()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>491</x>
+     <y>172</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>562</x>
+     <y>134</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_clear</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>ClearList()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>615</x>
+     <y>172</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>634</x>
+     <y>136</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_quit</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>739</x>
+     <y>172</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>656</x>
+     <y>150</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionOptions</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>Options()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>398</x>
+     <y>98</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>OpenContextMenu()</slot>
+  <slot>Refresh()</slot>
+  <slot>ClearList()</slot>
+ </slots>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_wd_files/wdoptions.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wd_files/wdoptions.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wd_files/wdoptions.ui	(revision 3477)
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Options</class>
+ <widget class="QDialog" name="Options">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>500</width>
+    <height>112</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+    <horstretch>0</horstretch>
+    <verstretch>1</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>Watchdog Options</string>
+  </property>
+  <widget class="QPushButton" name="ok">
+   <property name="geometry">
+    <rect>
+     <x>385</x>
+     <y>85</y>
+     <width>111</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Save and Quit</string>
+   </property>
+  </widget>
+  <widget class="QGroupBox" name="hostBox">
+   <property name="geometry">
+    <rect>
+     <x>7</x>
+     <y>8</y>
+     <width>272</width>
+     <height>83</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="title">
+    <string>Active Hosts</string>
+   </property>
+   <property name="flat">
+    <bool>false</bool>
+   </property>
+   <property name="checkable">
+    <bool>false</bool>
+   </property>
+  </widget>
+  <widget class="QGroupBox" name="settingBox">
+   <property name="geometry">
+    <rect>
+     <x>281</x>
+     <y>9</y>
+     <width>214</width>
+     <height>77</height>
+    </rect>
+   </property>
+   <property name="title">
+    <string>Settings</string>
+   </property>
+   <property name="flat">
+    <bool>false</bool>
+   </property>
+   <property name="checkable">
+    <bool>false</bool>
+   </property>
+   <widget class="QSpinBox" name="update_spin">
+    <property name="geometry">
+     <rect>
+      <x>155</x>
+      <y>27</y>
+      <width>52</width>
+      <height>23</height>
+     </rect>
+    </property>
+   </widget>
+   <widget class="QLabel" name="label">
+    <property name="geometry">
+     <rect>
+      <x>10</x>
+      <y>31</y>
+      <width>148</width>
+      <height>16</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>Update frequency (min)</string>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QPushButton" name="cancel">
+   <property name="geometry">
+    <rect>
+     <x>280</x>
+     <y>85</y>
+     <width>101</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Cancel</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>ok</sender>
+   <signal>clicked()</signal>
+   <receiver>Options</receiver>
+   <slot>SaveAndClose()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>431</x>
+     <y>96</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>343</x>
+     <y>96</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>cancel</sender>
+   <signal>clicked()</signal>
+   <receiver>Options</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>363</x>
+     <y>89</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>216</x>
+     <y>97</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palm_wdd
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palm_wdd	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palm_wdd	(revision 3477)
@@ -0,0 +1,275 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Modified header
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2421 2017-09-07 10:36:34Z maronga
+# Fixed display of job progress.
+# 
+# 2416 2017-09-06 14:28:14Z maronga
+# Adapted for palmrun
+# 
+# 1619 2015-07-13 06:53:19Z maronga
+#
+# 1618 2015-07-13 06:52:15Z maronga
+# Added steering via configuration file, to be placed in the home directory of the
+# remote host to be monitored.
+# 
+# 1613 2015-07-08 14:53:29Z maronga
+# Bugfix: tooltip for queuing name did not show up on first update.
+# New: added contect menu for showing the parameter file and the run control
+# output
+# 
+# 1611 2015-07-07 12:23:22Z maronga
+# Initial revision
+# 
+#
+# Description:
+# ------------
+# PALM watchdog client for monitoring batch jobs on a variety of hosts specified
+# by the user. The watchdog server requires python 2.7 or higher installed on
+# host to be monitored.
+# 
+# Instructions:
+# -------------
+# 1) Modify the header section of palm_wd
+# 2) Move .wd.olddata and .wd.newdata to your palm directory 
+#    (e.g. /home/user/current_version/.wd.newdata etc.)
+# 3) Modify a copy of palm_wdd for each host to be monitored and move it to the
+#    respective hosts
+# 4) Start the client either from mrungui or from shell by "nohup palm_wd&"
+#
+# To do:
+# ------
+# 1) Add "Options", "Help" and "Manual"
+# 2) Move user settings to a configuration file
+#------------------------------------------------------------------------------!
+
+import ConfigParser
+import os
+import pwd
+from subprocess import check_output
+import sys
+
+
+# Read configuration file
+# First check if the configuration file exists
+if ( os.path.exists('.wdd.config') == False ):
+    print "Error. No configuration file .wdd.config found."
+    raise SystemExit     
+
+config = ConfigParser.RawConfigParser()
+config.read('.wdd.config')
+
+cmd_readqueue      = config.get('Settings', 'readqueue').strip('"')
+cmd_tmpdir         = config.get('Settings', 'tmpdir').strip('"')
+cmd_canceljob      = config.get('Settings', 'canceljob').strip('"')
+cmd_checkjob       = config.get('Settings', 'checkjob').strip('"')
+cmd_realname_grep  = config.get('Settings', 'realname_grep').strip('"')
+cmd_starttime      = config.get('Settings', 'starttime').strip('"')
+cmd_starttime_grep = config.get('Settings', 'starttime_grep').strip('"')
+
+
+action   = str(sys.argv[1])
+data     = str(sys.argv[2])
+
+cmd_readqueue = cmd_readqueue + " " + pwd.getpwuid( os.getuid() )[ 0 ]
+cmd_tmpdir    = cmd_tmpdir + pwd.getpwuid( os.getuid() )[ 0 ]
+
+# reading queuing system
+def ReadQueue(username):
+  
+#  collect queuing information
+   try:
+      out = check_output(cmd_readqueue, shell=True)
+      job_list = out.splitlines()
+      out = None
+#  do nothing for empty results list
+   except:
+      job_list = []
+  
+ 
+   job_data_tmp = []
+   for j in range(0,len(job_list)):
+
+      # Write temporary data array containing the job information.
+      job_data_tmp.append(j)
+      job_data_tmp[j] = job_list[j].split(" ")
+      job_data_tmp[j] = filter(None, job_data_tmp[j])
+
+      cmd_realname = cmd_checkjob + " " + job_data_tmp[j][0] + "|grep " + cmd_realname_grep 
+
+      # retrieve real job name for all jobs
+      try:  
+         out = check_output(cmd_realname, shell=True)
+         job_realname = out.split(" ")[1].rstrip()
+      except:
+         job_realname = "error"
+
+
+      # for running jobs, determine progress                  
+      if ( job_data_tmp[j][2] == "Running" ):
+  
+         # collect progress information
+         cmd_progress = "cat " + cmd_tmpdir + "/" + job_realname + "/PROGRESS"
+         try: 
+
+            devnull = open(os.devnull, 'w')
+            out = check_output(cmd_progress, shell=True, stderr=devnull)
+            progress_lines = out.splitlines()
+            job_progress = progress_lines[1].split(" ")[3]
+            out = None
+         except:
+            job_progress = "0" 
+
+      else:
+         job_progress = "0" 
+
+      # return the job data
+      job_starttime = GetStartTime(job_data_tmp[j][0])
+      print job_realname + " " + job_data_tmp[j][0] + " " + job_data_tmp[j][3] + " " + job_data_tmp[j][2] + " " + job_progress + " "  + job_data_tmp[j][4] + " " + job_starttime
+
+
+# check details of specific job
+def CheckJob(jobid):
+
+   cmd_checkjob_tmp = cmd_checkjob + " " + jobid
+
+   try:  
+      out = check_output(cmd_checkjob_tmp, shell=True)
+      job_details = out
+   except:
+      job_details = "No details available." 
+
+   return job_details
+
+
+# cancel a specific job
+def CancelJob(jobid):
+
+   cmd_canceljob_tmp = cmd_canceljob + " " + jobid
+
+   try:  
+      out = check_output(cmd_canceljob_tmp, shell=True)
+      job_canceled = out
+   except:
+      job_canceled = "Action failed." 
+
+   return job_canceled
+
+
+# retrieve estimated start time of job
+def GetStartTime(jobid):
+
+   cmd_starttime_tmp = cmd_starttime + " " + jobid + "|grep \"" + cmd_starttime_grep + "\"" 
+
+   try:  
+      out = check_output(cmd_starttime_tmp, shell=True)
+      job_starttime = out.split()[5]
+   except:
+      job_starttime = "Action failed." 
+
+   return job_starttime
+
+
+def DoStopNow(jobid):
+
+   # collect progress information
+   cmd_dostop = "touch " + cmd_tmpdir + "/" + jobid + "/DO_STOP_NOW"
+   try: 
+      devnull = open(os.devnull, 'w')
+      out = check_output(cmd_dostop, shell=True, stderr=devnull)
+      out = None
+   except:
+      return_message = "Action failed."  
+      return return_message
+
+def DoRestartNow(jobid):
+
+   # collect progress information
+   cmd_dorestart = "touch " + cmd_tmpdir + "/" + jobid + "/DO_RESTART_NOW"
+   try: 
+      devnull = open(os.devnull, 'w')
+      out = check_output(cmd_dorestart, shell=True, stderr=devnull)
+      out = None
+   except:
+      return_message = "Action failed."  
+      return return_message
+
+def GetPARIN(jobid):
+
+   # collect progress information
+   cmd_dorestart = "cat " + cmd_tmpdir + "/" + jobid + "/PARIN"
+   try: 
+      devnull = open(os.devnull, 'w')
+      out = check_output(cmd_dorestart, shell=True, stderr=devnull)
+      return_message = out
+      out = None
+   except:
+      return_message = "Action failed."   + "cat " + cmd_tmpdir + "/" + jobid + "/PARIN" 
+      
+   return return_message
+
+def GetRC(jobid):
+
+   # collect progress information
+   cmd_dorestart = "cat " + cmd_tmpdir + "/" + jobid + "/RUN_CONTROL"
+   try: 
+      devnull = open(os.devnull, 'w')
+      out = check_output(cmd_dorestart, shell=True, stderr=devnull)
+      return_message = out
+      out = None
+   except:
+      return_message = "Action failed."
+      
+   return return_message
+
+# START OF MAIN
+if ( action == "queue" ):
+   ReadQueue(data)
+elif ( action == "check"):
+   print CheckJob(data)
+elif ( action == "cancel"):
+   print CancelJob(data)
+elif ( action == "start"):
+   print GetStartTime(data)
+elif ( action == "stop"):
+   print DoStopNow(data)
+elif ( action == "restart"):
+   print DoRestartNow(data)
+elif ( action == "parin"):
+   print GetPARIN(data)
+elif ( action == "rc"):
+   print GetRC(data)  
+else:
+   print "Error. Action " + action + " unknown."
+
Index: /palm/tags/release-6.0/SCRIPTS/palmbuild
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmbuild	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmbuild	(revision 3477)
@@ -0,0 +1,944 @@
+#!/bin/bash
+
+# palmbuild - script for compiling the PALM code and its utility programs
+
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 2017-2018  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# options -h and -d renamed -c and -r, respectively
+# 
+# 3312 2018-10-06 14:15:46Z knoop
+# "host identifier" in header output renamed "config. identifier",
+# host_configuration renamed configuration_identifier,
+# jobname renamed run_identifier
+# header output of PALM code revision,
+# options -m, -s, and -S removed
+# 
+# 3210 2018-08-28 07:31:13Z sward
+# Bugfix: agent_preprocessing stays in MAKE_DEPOSITORY after compilation
+# 
+# 3208 2018-08-27 13:10:50Z sward
+# Added building of agent_preprocessing
+# 
+# 3033 2018-05-23 15:26:19Z raasch
+# "fname" renamed to "jobname"
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2566 2017-10-20 08:50:47Z raasch
+# informative messages switched of almost completely in silent mode
+# two header blocks merged into one
+# 
+# 2506 2017-09-29 08:30:37Z raasch
+# option -V added to check for an existing SOURCES_FOR_RUN_... folder
+# host configuration added to SOURCES_FOR_RUN_... folder name
+# SOURCES_FOR_RUN_... folder is deleted in case of compilation errors
+# host_identifier renamed host_configuration
+# 
+# 2500 2017-09-25 11:10:03Z raasch
+# bugfix for r2492
+# 
+# 2492 2017-09-21 14:18:48Z raasch
+# ask for compilation, if SOURCES_FOR_RUN_... exists
+# 
+# 2487 2017-09-21 11:30:10Z raasch
+# bugfix: abort in case of compiling/linking errors in silent mode
+# 
+# 2422 2017-09-08 08:25:41Z raasch
+# initial revision
+# 
+#------------------------------------------------------------------------------#
+# palmbuild - script for compiling the PALM code and its utility programs
+#
+# Procedure to compile code on local and remote hosts using the
+# make-mechanism. The source code must be provided on the local host.
+#
+# @note This script does not work on MAC OS
+#------------------------------------------------------------------------------#
+
+
+    # VARIABLE DECLARATIONS + DEFAULT VALUES
+ calltime=""
+ column1=""
+ column2=""
+ configuration_identifier=default
+ global_revision=""
+ locat=normal
+ makefile=""
+ make_options=""
+ module_commands=""
+ program_name=palm
+ remote_ip=""
+ silent=false
+ ssh_key=""
+ suf=f90
+ use_existing_sources_folder=false
+ version="palmbuild  1.0  Rev$Rev$"
+ working_directory=`pwd`
+
+
+    # ERROR HANDLING IN CASE OF EXIT
+ trap 'rm -rf  ${source_path}/${configuration_identifier}_last_make_protocol
+       if [[ $locat != normal  &&  $locat != control_c ]]
+       then
+          printf "\n\n+++ palmbuild crashed \n\n"
+          exit 1
+       elif [[ $locat != normal ]]
+       then
+          printf "\n+++ palmbuild killed by \"^C\" \n\n"
+          exit 2
+       else
+          if [[ $silent = false ]]
+          then
+            printf "\n --> palmbuild finished\n\n"
+          fi
+          exit 0
+       fi' exit
+
+
+    # ACTIONS IN CASE OF TERMINAL-BREAK (CONTROL-C):
+ trap 'locat=control_c
+       exit 1
+      ' 2
+
+
+
+    # READ SHELLSCRIPT-OPTIONS
+ while  getopts  :c:r:uvV  option
+ do
+   case  $option  in
+       (c)   configuration_identifier=$OPTARG;;
+       (r)   run_identifier=$OPTARG;;
+       (v)   silent=true;;
+       (V)   use_existing_sources_folder=true;;
+       (\?)  printf "\n  +++ unknown option $OPTARG \n";
+             locat=parameter; exit;;
+   esac
+ done
+
+
+    # BUILD THE CONFIGURATION-FILE NAME AND THE SOURCES_FOR_RUN-FOLDER NAME
+ config_file=.palm.config.$configuration_identifier
+ sources_for_run_catalog=SOURCES_FOR_RUN_${configuration_identifier}_$run_identifier
+
+
+    # CHECK, IF CONFIGURATION-FILE EXISTS
+ if [[ ! -f $config_file ]]
+ then
+    printf "\n  +++ configuration file: "
+    printf "\n           $config_file"
+    printf "\n      does not exist"
+    locat=configuration; exit  
+ fi
+
+
+    # ### is this really required?
+ config_file=$PWD/$config_file
+
+
+    # READ VARIABLE SETTINGS FROM CONFIG FILE LINE BY LINE
+ while  read line
+ do
+
+       # FIRST REPLACE ENVIRONMENT-VARIABLES BY THEIR RESPECTIVE VALUES
+    eval  line=\"$line\"
+
+
+       # INTERPRET THE LINE
+    if [[ "$(echo $line)" = "" ]]
+    then
+
+          # EMPTY LINE, NO ACTION
+       continue
+
+    elif [[ "$(echo $line | cut -c1)"  =  "#" ]]
+    then
+
+          # LINE IS A COMMENT LINE
+       continue
+
+    elif [[ "$(echo $line | cut -c1)"  =  "%" ]]
+    then
+
+          # LINE DEFINES AN ENVIRONMENT-VARIABLE
+       var=`echo $line | cut -d" " -s -f1 | cut -c2-`
+       value=`echo $line | cut -d" " -s -f2-`
+
+          # REPLACE ":" BY " " IN COMPILER- CPP- OR LINKER-OPTIONS,
+          # "::" IS REPLACED BY ":".
+       #value=`echo $value | sed 's/::/%DUM%/g' | sed 's/:/ /g' | sed 's/%DUM%/:/g'`
+
+
+          # VALUE FROM THE CONFIGURATION-FILE IS ASSIGNED TO THE
+          # ENVIRONMENT-VARIABLE, BUT ONLY IF NO VALUE HAS BEEN ALREADY
+          # ASSIGNED WITHIN THIS SCRIPT (E.G. BY SCRIPT-OPTIONS).
+          # NON-ASSIGNED VARIABLES HAVE VALUE "" OR 0 (IN CASE OF INTEGER).
+          # HENCE THE GENERAL RULE IS: SCRIPT-OPTION OVERWRITES THE
+          # CONFIGURATION-FILE.
+       if [[ "$(eval echo \$$var)" = ""  ||  "$(eval echo \$$var)" = "0" ]]
+       then
+          eval  export  $var="\$value"
+
+             # TERMINAL OUTPUT OF ENVIRONMENT-VARIABLES, IF TRACEBACK IS SWITCHED on
+          if [[ $do_trace = true ]]
+          then
+             printf "\n*** ENVIRONMENT-VARIABLE $var = $value"
+          fi
+       fi
+
+    else
+
+          # SKIP ALL OTHER LINES
+       continue
+
+    fi
+
+ done < $config_file
+
+ 
+    # CHECK, IF THE BASE DIRECTORY PATH HAS BEEN GIVEN
+ if [[ "$base_directory" = "" ]]
+ then
+    printf "\n  +++ no base directory found in configuration file"
+    locat=config_file; exit
+ else
+    if [[ ! -d $base_directory ]]
+    then
+       printf "\n\n  +++ base directory \"$base_directory\" "
+       printf "\n      does not exist"
+       locat=source_path; exit
+    fi
+ fi
+
+
+    # CHECK SOURCE-CODE PATH
+ if [[ "$source_path" = "" ]]
+ then
+    printf "\n  +++ no source path found in configuration file"
+    locat=config_file; exit
+ else
+    if [[ ! -d $source_path ]]
+    then
+       printf "\n\n  +++ source path \"$source_path\" "
+       printf "\n      does not exist"
+       locat=source_path; exit
+    fi
+ fi
+
+
+    # CHECK MAKEFILE
+ makefile=$source_path/Makefile
+ if [[ ! -f $makefile ]]
+ then
+    printf "\n  +++ makefile: "
+    printf "\n           $makefile"
+    printf "\n      does not exist"
+    locat=makefile; exit  
+ fi
+
+
+    # CHECK COMPILERNAME
+ if [[ "$compiler_name" = "" ]]
+ then
+    printf "\n  +++ no compiler name found in configuration file"
+    locat=config_file; exit
+ fi
+
+
+    # CHECK SERIAL COMPILERNAME
+ if [[ "$compiler_name_ser" = "" ]]
+ then
+    printf "\n  +++ no compiler name for serial compilation in configuration file"
+    locat=config_file; exit
+ fi
+
+
+    # DETERMINE SSH-KEY TO BE USED
+ if [[ "$ssh_key" != "" ]]
+ then
+    ssh_key="-i $HOME/.ssh/`echo $line | cut -d" " -s -f2`"
+ fi
+
+
+    #CHECK CPP-OPTIONS
+ if [[ "$cpp_options" = "" ]]
+ then
+    printf "\n  +++ WARNING: no cpp-options found in configuration file"
+ fi
+
+
+    # CHECK SETTINGS IN CASE OF COMPILING ON REMOTE MACHINE
+ if [[ "$remote_ip" != "" ]]
+ then
+ 
+    if [[ "$remote_username" = "" ]]
+    then
+       printf "\n  +++ no user name given in configuration file"
+       locat=config_file; exit
+    fi
+
+       # GET SOURCE AND DEPOSITORY PATH ON THE REMOTE MACHINE WITHOUT EVALUATING
+       # THE $
+       # IF NOT GIVEN, USE THE LOCAL SOURCE AND DEPOSITORY PATH
+    line=`grep %remote_source_path $config_file`
+    if [[ "$line" != "" ]]
+    then
+       remote_source_path=`echo $line | cut -d" " -s -f2`
+    else
+       line=`grep %source_path $config_file`
+       remote_source_path=`echo $line | cut -d" " -s -f2`
+    fi
+
+    line=`grep %base_directory $config_file`
+    make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${configuration_identifier}
+
+ else
+
+    make_depository=${base_directory}/MAKE_DEPOSITORY_${configuration_identifier}
+
+ fi
+
+
+    # GET THE GLOBAL REVISION-NUMBER OF THE SVN-REPOSITORY
+ global_revision=`svnversion $source_path  2>/dev/null`
+ global_revision="Rev: $global_revision"
+
+
+    # HEADER-OUTPUT (PART1: MESSAGES CONCERNING THE LOCAL HOST)
+ if [[ $silent = false ]]
+ then
+    calltime=$(date)
+    printf "\n"
+    printf "#------------------------------------------------------------------------# \n"
+    printf "| %-40s%30s | \n" "$version" "$calltime"
+    printf "| %-40s%30s | \n" "PALM code       $global_revision" " "
+    printf "|                                                                        | \n"
+    printf "| %-13s%-57s | \n" "called on:" "$(hostname) (IP:$local_ip)"
+    column2=$(echo $config_file | cut -c1-57 )
+    printf "| %-13s%-57s | \n" "config file:" "$column2"
+    line=$(echo "$config_file" | cut -c58-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo $line | cut -c1-57 )
+       printf "| %-13s%-57s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c58-)
+    done
+    column2=$(echo $makefile | cut -c1-57 )
+    printf "| %-13s%-57s | \n" "makefile:" "$column2"
+    line=$(echo "$makefile" | cut -c58-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo $line | cut -c1-57 )
+       printf "| %-13s%-57s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c58-)
+    done
+    column2=$(echo $source_path | cut -c1-57 )
+    printf "| %-13s%-57s | \n" "source path:" "$column2"
+    line=$(echo "$source_path" | cut -c58-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo $line | cut -c1-57 )
+       printf "| %-13s%-57s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c58-)
+    done
+    printf "|                                                                        | \n"
+   
+    if [[ "$remote_ip" != "" ]]
+    then
+       column2="$configuration_identifier"
+       printf "| %-20s%-50s | \n" "config. identifier:" "$column2"
+       column2=$(echo "$make_depository" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "remote depository:" "$column2"
+    else
+       column2="$configuration_identifier"
+       printf "| %-20s%-50s | \n" "config. identifier:" "$column2"
+       column2=$(echo "$make_depository" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "local depository:" "$column2"
+    fi
+    line=$(echo "$make_depository" | cut -c51-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c51-)
+    done
+   
+    if [[ "$remote_ip" != "" ]]
+    then
+       printf "| %-20s%-50s | \n" "remote username:" "$remote_username"
+       printf "| %-20s%-50s | \n" "remote address:" "$remote_ip"
+    else
+       printf "| %-20s%-50s | \n" "username:" "$local_username"
+       printf "| %-20s%-50s | \n" "address:" "$local_ip"
+    fi
+   
+    printf "| %-20s%-50s | \n" "compiler:" "$compiler_name"
+    printf "| %-20s%-50s | \n" "serial compiler:" "$compiler_name_ser"
+   
+    if [[ "$make_options" != "" ]]
+    then
+       printf "| %-20s%-50s | \n" "make options:" "$make_options"
+    fi
+    column2=$(echo "$cpp_options" | cut -c1-50 )
+    printf "| %-20s%-50s | \n" "cpp options:" "$column2"
+    line=$(echo "$cpp_options" | cut -c51-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c51-)
+    done
+    column2=$(echo "$compiler_options" | cut -c1-50 )
+    printf "| %-20s%-50s | \n" "compiler options:" "$column2"
+    line=$(echo "$compiler_options" | cut -c51-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c51-)
+    done
+    column2=$(echo "$linker_options" | cut -c1-50 )
+    printf "| %-20s%-50s | \n" "linker options:" "$column2"
+    line=$(echo "$linker_options" | cut -c51-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c51-)
+    done
+    if [[ "$login_init_cmd" != "" ]]
+    then
+       column2=$(echo "$login_init_cmd" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "login init command:" "$column2"
+       line=$(echo "$login_init_cmd" | cut -c51-)
+       while [[ "$line" != "" ]]
+       do
+          column1=""
+          column2=$(echo "$line" | cut -c1-50 )
+          printf "| %-20s%-50s | \n" "$column1" "$column2"
+          line=$(echo "$line" | cut -c51-)
+       done
+    fi
+    if [[ "$module_commands" != "" ]]
+    then
+       column2=$(echo "$module_commands" | cut -c1-50 )
+       printf "| %-20s%-50s | \n" "module command(s):" "$column2"
+       line=$(echo "$module_commands" | cut -c51-)
+       while [[ "$line" != "" ]]
+       do
+          column1=""
+          column2=$(echo "$line" | cut -c1-50 )
+          printf "| %-20s%-50s | \n" "$column1" "$column2"
+          line=$(echo "$line" | cut -c51-)
+       done
+    fi
+    printf "#------------------------------------------------------------------------# \n"
+
+    answer=dummy
+    printf "\n"
+    while [[ "$answer" != y  &&  "$answer" != Y  && "$answer" != c  &&  "$answer" != C  && "$answer" != s  &&  "$answer" != S  &&  "$answer" != a  &&  "$answer" != A ]]
+    do
+       printf " >>> continue (y(es)/c(ontinue)/a(bort)) ?  "
+       read  answer
+    done
+    if [[ $answer = a  ||  $answer = A ]]
+    then
+       locat=user_abort; exit
+    fi
+    if [[ $answer = c  ||  $answer = C ]]
+    then
+       silent=true
+    fi
+ fi
+
+
+    # TAR THE SOURCES AND MAKEFILES
+    # UTILITIES ARE TEMPORARILY COPIED TO THE SOURCE DIRECTORY IN ORDER TO TAR
+    # THEM TOO
+ if [[ $silent = false ]]
+ then
+    printf "\n\n  *** tar of makefile and source files in"
+    printf "\n      $source_path\n"
+ fi
+ cd  $source_path
+ cp -p  ../UTIL/combine_plot_fields.f90  .
+ cp -p  ../UTIL/compare_palm_logs.f90  .
+ cp -p  ../UTIL/agent_preprocessing/agent_preprocessing.f90  .
+ cp -p  ../UTIL/Makefile_utilities  .
+ tar -cf  ${program_name}_sources.tar  Makefile*  *.$suf
+ rm  combine_plot_fields.f90  compare_palm_logs.f90 agent_preprocessing.f90  Makefile_utilities
+
+
+    # MAKE ON REMOTE HOST
+ if [[ "$remote_ip" != "" ]]
+ then
+
+       # NEXT IS THE BRANCH FOR CREATING THE MAKE_DEPOSITORY_...
+    if [[ "$run_identifier" = "" ]]
+    then
+
+          # COPY CURRENT SOURCE CODE TO SOURCE-CODE DIRECTORY ON THE REMOTE HOST
+          # CREATE THIS DIRECTORY, IF IT DOES NOT EXIST
+       if [[ $silent = false ]]
+       then
+          echo " "
+          echo "  *** copying \"${program_name}_sources.tar\" to \"${remote_ip}:${make_depository}/\" "
+          echo "[[ ! -d ${make_depository} ]]  &&  (echo \"  *** ${make_depository} will be created\"; mkdir -p  ${make_depository})"  |  ssh  -q  $ssh_key ${remote_username}@${remote_ip}  2>&1
+          scp  $ssh_key ${source_path}/${program_name}_sources.tar  ${remote_username}@${remote_ip}:${make_depository}/${program_name}_sources.tar
+       else
+          echo "[[ ! -d ${make_depository} ]]  &&  mkdir -p  ${make_depository}"  |  ssh  -q  $ssh_key ${remote_username}@${remote_ip}  2>&1
+          scp  $ssh_key ${source_path}/${program_name}_sources.tar  ${remote_username}@${remote_ip}:${make_depository}/${program_name}_sources.tar  >  /dev/null
+       fi
+
+
+
+
+          # UNTAR PREVIOUS UPDATE ON REMOTE HOST, IF EXISTING
+       if [[ $silent = false ]]
+       then
+          echo "  *** untar previous update on remote host, if existing"
+       fi
+       echo "cd ${make_depository}; [[ -f ${program_name}_current_version.tar ]]  &&  tar -xf  ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+
+
+          # UNTAR CURRENT SOURCES ON REMOTE HOST
+       if [[ $silent = false ]]
+       then
+          echo "  *** untar current sources on remote host"
+       fi
+       echo  "cd ${make_depository}; tar -xf  ${program_name}_sources.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+
+
+          # CREATE INIT AND MODULE COAMMNDS
+       [[ "$login_init_cmd" != "" ]]   &&  login_init_cmd=${login_init_cmd}";"
+       [[ "$module_commands" != "" ]]  &&  module_commands=${module_commands}";"
+
+
+          # FIRST CREATE EXECUTABLES FOR THE UTILITY ROUTINES
+       if [[ $silent = false ]]
+       then
+          echo " "
+          echo "  *** creating utilities on remote host"
+       fi
+       make_call_string="make  -f Makefile_utilities  $make_options  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
+       echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${configuration_identifier}_last_make_protocol
+
+       if [[ $(grep -c MAKE_ERROR ${configuration_identifier}_last_make_protocol) != 0 ]]
+       then
+          printf "\a\n  +++ error(s) occurred during compiling or linking of utilities"
+          printf "\n      for host configuration \"$configuration_identifier\" "
+          if [[ $silent = false ]]
+          then
+             answer=dummy
+             printf "\n"
+             while [[ "$answer" != c  &&  "$answer" != k ]]
+             do
+                printf "  >>> continue / list errors / kill palmbuild (c/l/k) ? "
+                read  answer
+                if [[ "$answer" = l ]]
+                then
+                   more ${configuration_identifier}_last_make_protocol
+                fi
+             done
+             if [[ $answer = k ]]
+             then
+                locat=user_abort; exit
+             fi
+          else
+                # ABORT ANYWAY
+             locat=user_abort; exit
+          fi
+       fi
+
+          # NOW COMPILE THE PALM CODE
+          # COMMANDS WILL BE COMMUNICATED TO SSH VIA PIPE, SINCE THIS WAY THE SYSTEM- AND
+          # USER-PROFILES OF THE SHELL ARE COMPLETELY EXECUTED (OTHERWISE, MAKE
+          # MAY E.G. MISS THE COMPILER-PATHS)
+       if [[ $silent = false ]]
+       then
+          echo " "
+          echo "  *** compile PALM sources on remote host"
+       fi
+       make_call_string="make  $make_options  PROG=$program_name  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
+       echo "$login_init_cmd $module_commands cd ${make_depository}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${configuration_identifier}_last_make_protocol
+
+       if [[ $(grep -c MAKE_ERROR ${configuration_identifier}_last_make_protocol) != 0 ]]
+       then
+          printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
+          if [[ $silent = false ]]
+          then
+             answer=dummy
+             printf "\n"
+             while [[ "$answer" != c  &&  "$answer" != k ]]
+             do
+                printf "  >>> continue / list errors / kill palmbuild (c/l/k) ? "
+                read  answer
+                if [[ "$answer" = l ]]
+                then
+                   more ${configuration_identifier}_last_make_protocol
+                fi
+             done
+             if [[ $answer = k ]]
+             then
+                locat=user_abort; exit
+             fi
+          else
+                # ABORT ANYWAY
+             locat=user_abort; exit
+          fi
+       fi
+
+          # TAR UPDATED VERSION ON THE REMOTE HOST
+       if [[ $silent = false ]]
+       then
+          printf "\n  *** tar update on remote host ..."
+       fi
+       echo  "cd ${make_depository}; chmod u+w *; tar -cf  ${program_name}_current_version.tar  ${program_name}  *.f90 *.o *.mod *.x"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+
+
+       # NOW COMES THE BRANCH FOR CREATING THE EXECUTABLE FOR THE CURRENT RUN
+       # INCLUDING E.G. USER-INTERFACE ROUTINES. ALSO ADD OTHER UTILITY EXECUTABLES. EVERYTHING IS
+       # COLLECTED IN DIRECTORY SOURCES_FOR_RUN_...
+    elif [[ "$run_identifier" != "" ]]
+    then
+
+          # FIRST CHECK, IF COMPILED SOURCES FOR THIS RUN IDENTIFIER EXISTS
+          # AND ASK, IF THEY SHALL BE USED
+       echo  "[[ -d ${fast_io_catalog}/${sources_for_run_catalog} ]]  &&  echo sources for run found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1  >  ${configuration_identifier}_last_make_protocol
+       if [[ $(grep -c "sources for run found" ${configuration_identifier}_last_make_protocol) != 0  &&  $use_existing_sources_folder = true ]]
+       then
+          printf "\a\n  *** compiled sources for run \"$run_identifier\" found on remote host in folder"
+          printf "\n      ${fast_io_catalog}/${sources_for_run_catalog}"
+          printf "\n      will be used!"
+          exit
+       fi
+
+          # COPY MAKE DEPOSITORY ON REMOTE MACHINE TO SOURCES_FOR_RUN_...
+       if [[ $silent = false ]]
+       then
+          printf "\n  *** copy MAKE_DEPOSITORY_${configuration_identifier} on remote host to $sources_for_run_catalog \n"
+       fi
+       echo  "rm -rf ${fast_io_catalog}/${sources_for_run_catalog}; mkdir -p ${fast_io_catalog}/${sources_for_run_catalog}; cp ${make_depository}/${program_name}_current_version.tar  ${fast_io_catalog}/${sources_for_run_catalog}; cd ${fast_io_catalog}/${sources_for_run_catalog}; tar xf ${program_name}_current_version.tar"  |  ssh  -q  $ssh_key  ${remote_username}@${remote_ip}  2>&1
+
+
+          # COPY CONTENTS OF SOURCES_FOR_RUN_... TO SOURCES_FOR_RUN_... ON THE REMOTE MACHINE
+       if [[ $silent = false ]]
+       then
+          printf "\n  *** copy ${base_directory}/${sources_for_run_catalog}"
+          printf "\n      to $sources_for_run_catalog on remote host \n"
+       fi
+       scp  -q  $ssh_key  ${base_directory}/${sources_for_run_catalog}/{*,.[!.]*}  ${remote_username}@${remote_ip}:${fast_io_catalog}/${sources_for_run_catalog}
+
+
+          # CREATE EXECUTABLE FROM THE NEW/MODIFIED SOURCE FILES, IF THERE ARE ANY
+       if [[ $(ls -1 ${base_directory}/${sources_for_run_catalog}/ | grep -c .$suf) != 0 ]]
+       then
+
+          make_call_string="make  $make_options  PROG=$program_name  F90=$compiler_name  COPT=\"$cpp_options\"  F90FLAGS=\"$compiler_options\"  LDFLAGS=\"$linker_options\" "
+          [[ "$login_init_cmd" != "" ]]   &&  login_init_cmd=${login_init_cmd}";"
+          [[ "$module_commands" != "" ]]  &&  module_commands=${module_commands}";"
+          if [[ $silent = false ]]
+          then
+             echo "  *** execute \"make\" on remote host"
+          fi
+          echo "$login_init_cmd $module_commands cd ${fast_io_catalog}/${sources_for_run_catalog}; echo $make_call_string > LAST_MAKE_CALL; chmod u+x LAST_MAKE_CALL; $make_call_string; [[ \$? != 0 ]] && echo MAKE_ERROR" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1 | tee ${configuration_identifier}_last_make_protocol
+
+          if [[ $(grep -c MAKE_ERROR ${configuration_identifier}_last_make_protocol) != 0 ]]
+          then
+             printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
+             if [[ $silent = false ]]
+             then
+                answer=dummy
+                printf "\n"
+                while [[ "$answer" != c  &&  "$answer" != k ]]
+                do
+                   printf "  >>> continue / list errors / kill palmbuild (c/l/k) ? "
+                   read  answer
+                   if [[ "$answer" = l ]]
+                   then
+                      more ${configuration_identifier}_last_make_protocol
+                   fi
+                done
+                if [[ $answer = k ]]
+                then
+                   echo "rm -rf ${fast_io_catalog}/${sources_for_run_catalog}" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1
+                   locat=user_abort; exit
+                fi
+             else
+                   # ABORT ANYWAY
+                echo "rm -rf ${fast_io_catalog}/${sources_for_run_catalog}" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1
+                locat=user_abort; exit
+             fi
+          fi
+
+       else
+
+          echo "  *** nothing to compile for this run"
+
+       fi
+
+    fi
+
+    rm -rf  ${source_path}/${configuration_identifier}_last_make_protocol
+
+
+    # MAKE ON LOCAL HOST
+ else
+
+
+       # NEXT IS THE BRANCH FOR CREATING THE MAKE_DEPOSITORY_... ON THE
+       # LOCAL HOST
+    if [[ "$run_identifier" = "" ]]
+    then
+
+          # SET THE ENVIRONMENT (EXECUTE INIT AND MODULE COMMANDS)
+       if [[ "$login_init_cmd" != "" ]]
+       then
+          $login_init_cmd
+       fi
+
+       if [[ "$module_commands" != "" ]]
+       then
+          $module_commands
+       fi
+
+
+          # CREATE MAKE-DEPOSITORY, IF IT DOES NOT EXIST
+       eval make_depository=$make_depository
+       if [[ ! -d $make_depository ]]
+       then
+          if  mkdir -p $make_depository
+          then
+             if [[ $silent = false ]]
+             then
+                printf "\n\n  *** directory for local make depository:"
+                printf "\n           $make_depository"
+                printf "\n      was created\n"
+             fi
+          else
+             printf "\n  +++ directory for local make depository:"
+             printf "\n           $make_depository"
+             printf "\n      cannot be created"
+             locat=local_depository; exit
+          fi
+       fi
+
+          # COPY SOURCE-CODE FROM REPOSITORY TO MAKE-DEPOSITORY
+       if [[ $silent = false ]]
+       then
+          echo " "
+          echo "  *** untar current source sources on local host in"
+          echo "      $make_depository"
+       fi
+       cd  $make_depository
+       cp  $source_path/${program_name}_sources.tar  .
+       tar xf  ${program_name}_sources.tar
+
+
+          # FIRST CREATE EXECUTABLES FOR THE UTILITY ROUTINES
+       if [[ $silent = false ]]
+       then
+          echo " "
+          echo "  *** creating utilities on local host"
+       fi
+       make  -f Makefile_utilities  $make_options  F90=$compiler_name  F90_SER=$compiler_name_ser  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options" | tee ${configuration_identifier}_last_make_protocol
+
+       if [[ ${PIPESTATUS[0]} != 0 ]]
+       then
+          printf "\a\n  +++ error(s) occurred during compiling of the utilities for host configuration \"$configuration_identifier\" "
+          if [[ $silent = false ]]
+          then
+             answer=dummy
+             printf "\n"
+             while [[ "$answer" != c  &&  "$answer" != k ]]
+             do
+                printf "  >>> continue / list errors / kill palmbuild (c/l/k) ? "
+                read  answer
+                if [[ "$answer" = l ]]
+                then
+                   more ${configuration_identifier}_last_make_protocol
+                fi
+             done
+             if [[ $answer = k ]]
+             then
+                locat=user_abort; exit
+             fi
+          else
+             # ABORT ANYWAY
+             locat=user_abort; exit
+          fi
+       else
+          cp agent_preprocessing $source_path/../SCRIPTS/.
+       fi
+
+
+          # CALL MAKE ON LOCAL HOST USING THE  OPTIONS DETERMINED FURTHER ABOVE
+       if [[ $silent = false ]]
+       then
+          echo " "
+          echo "  *** compile PALM sources on local host"
+       fi
+
+       make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"  2>&1 | tee ${configuration_identifier}_last_make_protocol
+
+       if [[ ${PIPESTATUS[0]} != 0 ]]
+       then
+          printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
+          if [[ $silent = false ]]
+          then
+             answer=dummy
+             printf "\n"
+             while [[ "$answer" != c  &&  "$answer" != k ]]
+             do
+                printf "  >>> continue / list errors / kill palmbuild (c/l/k) ? "
+                read  answer
+                if [[ "$answer" = l ]]
+                then
+                   more ${configuration_identifier}_last_make_protocol
+                fi
+             done
+             if [[ $answer = k ]]
+             then
+                locat=user_abort; exit
+             fi
+          else
+                # ABORT ANYWAY
+             locat=user_abort; exit
+          fi
+       fi
+
+
+          # TAR NEW VERSION ON LOCAL HOST
+       if [[ $silent = false ]]
+       then
+          printf "\n  *** tar update on local host ..."
+       fi
+       tar -cf  ${program_name}_current_version.tar  ${program_name} *.$suf *.o *.mod *.x
+
+    else
+
+          # NOW COMES THE BRANCH FOR CREATING THE EXECUTABLE FOR THE CURRENT RUN
+          # INCLUDING E.G. USER-INTERFACE ROUTINES. ALSO ADD OTHER UTILITY EXECUTABLES. EVERYTHING IS
+          # COLLECTED IN DIRECTORY SOURCES_FOR_RUN_...
+
+          # FIRST CHECK, IF COMPILED SOURCES FOR THIS RUN IDENTIFIER EXISTS
+          # AND ASK, IF THEY SHALL BE USED
+       if [[ -d ${fast_io_catalog}/${sources_for_run_catalog}  &&  $use_existing_sources_folder = true ]]
+       then
+          printf "\a\n  *** compiled sources for run \"$run_identifier\" found on local host in folder"
+          printf "\n      ${fast_io_catalog}/${sources_for_run_catalog}"
+          printf "\n      will be used!"
+          exit
+       fi
+
+          # SECOND CHECK, IF A DEPOSITORY EXISTS ON THE LOCAL MACHINE
+       if [[ ! -d ${make_depository} ]]
+       then
+          printf "\n  +++ directory for local make depository:"
+          printf "\n           $make_depository"
+          printf "\n      not found. Please run \"palmbuild -c $configuration_identifier\" "
+          locat=make_depository; exit
+       fi
+
+
+          # COPY MAKE DEPOSITORY ON LOCAL MACHINE TO SOURCES_FOR_RUN_...
+       if [[ $silent = false ]]
+       then
+          printf "\n  *** copy MAKE_DEPOSITORY_${configuration_identifier} on local host to "
+          printf "\n      ${fast_io_catalog}/${sources_for_run_catalog} \n"
+       fi
+       rm -rf ${fast_io_catalog}/${sources_for_run_catalog}
+       mkdir -p ${fast_io_catalog}/${sources_for_run_catalog}
+       cp ${make_depository}/${program_name}_current_version.tar  ${fast_io_catalog}/${sources_for_run_catalog}
+       cd $fast_io_catalog/${sources_for_run_catalog}
+       tar xf ${program_name}_current_version.tar
+
+
+          # COPY CONTENTS OF SOURCES_FOR_RUN_... TO SOURCES_FOR_RUN_...
+          # IN THE FAST_IO_CATALOG ON THE LOCAL MACHINE
+       if [[ $silent = false ]]
+       then
+          printf "\n  *** copy ${base_directory}/${sources_for_run_catalog} to"
+          printf "\n      ${fast_io_catalog}/${sources_for_run_catalog} on local host \n"
+       fi
+       cp  ${base_directory}/${sources_for_run_catalog}/{*,.[!.]*}  ${fast_io_catalog}/${sources_for_run_catalog}
+
+
+          # CREATE EXECUTABLE FROM THE NEW/MODIFIED SOURCE FILES, IF THERE ARE ANY
+       if [[ $(ls -1 ${base_directory}/${sources_for_run_catalog}/ | grep -c .$suf) != 0 ]]
+       then
+
+          if [[ $silent = false ]]
+          then
+             echo "  *** execute \"make\" on local host"
+          fi
+          [[ "$login_init_cmd" != "" ]]   &&  $login_init_cmd
+          [[ "$module_commands" != "" ]]  &&  $module_commands
+
+          make  $make_options  PROG=$program_name  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$compiler_options"  LDFLAGS="$linker_options"
+
+          if [[ ${PIPESTATUS[0]} != 0 ]]
+          then
+
+             printf "\a\n  +++ error(s) occurred during compiling or linking for host configuration \"$configuration_identifier\" "
+             if [[ $silent = false ]]
+             then
+                answer=dummy
+                printf "\n"
+                while [[ "$answer" != c  &&  "$answer" != k ]]
+                do
+                   printf "  >>> continue / kill palmbuild (c/k) ? "
+                   read  answer
+                done
+                if [[ $answer = k ]]
+                then
+                   rm -rf ${fast_io_catalog}/${sources_for_run_catalog}
+                   locat=user_abort; exit
+                fi
+             else
+                   # ABORT ANYWAY
+                rm -rf ${fast_io_catalog}/${sources_for_run_catalog}
+                locat=user_abort; exit
+             fi
+          fi
+
+       else
+
+          echo "  *** nothing to compile for this run"
+
+       fi
+
+    fi
+ fi
Index: /palm/tags/release-6.0/SCRIPTS/palmplot
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmplot	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmplot	(revision 3477)
@@ -0,0 +1,230 @@
+#!/bin/bash
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Unix-Shell has been changed to bash 
+# 
+# 2885 2018-03-14 11:02:46Z Giersch
+# assign configuration file within palmplot call
+# 
+# 2837 2018-02-26 14:04:53Z gronemeier
+# Corrected "Former revisions" section
+#
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 1310 2014-03-14 08:01:56Z raasch
+# update GPL copyright
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# palmplot - script for running the NCL scripts
+    # Using the available NCL scripts via the shell script palmplot
+
+    # Last changes
+    # 16/03/10 - Rieke - initial revision
+    # 30/03/10 - Rieke - substituting double quotes (") with a character 
+    #                    variable (dq) containing double quotes 
+    # 31/03/10 - Rieke - list of variable names can be specified using 
+    #                    blank separated lists instead of comma 
+    #                    separated lists
+    # 01/04/10 - Rieke - bugfix - treatment of special character *
+    #                    in NCL variables containing lists corrected
+    # 23/08/10 - Rieke - bugfix - "" had to be added in if-queries 
+    # 30/09/10 - Rieke - Link to new online documentation of PALM NCL scripts
+    # 31/10/11 - Rieke - Adjustement so that palmplot also works on 
+    #                    DKRZ (ibmh)
+
+
+ # SHORT INTRODUCTION FOR USING THIS SCRIPT
+ if [[ "$1" = "?"  || "$1" = "--help" || "$1" = "-h" ]]
+  then
+    (printf "\n   palmplot is designed to run the NCL scripts of PALM \n"
+     printf "\n   palmplot can be called as follows:"
+     printf "\n   palmplot script_identifier file_1=OUTPUT/test.nc file_out=test format_out=pdf var='pt w\"pt\" w*pt* u' no_rows=2 ...\n"
+     printf "\n   script_identifier has to be one of the following:"
+     printf "\n    xy, xz, yz, pr, ts, sp"
+     printf "\n   in dependence on the data that wants to be plotted\n"
+     printf "\n   the further arguments control the plot"
+     printf "\n   they can also be set in the configuration file .ncl.config"
+     printf "\n   a documentation is available at"
+     printf "\n   http://palm.muk.uni-hannover.de/wiki/doc/app/ncl \n\n")
+     exit
+ fi
+
+
+ # DEFINITION OF VARIABLES
+ a=""
+ arg=""
+ b=""
+ key=""
+ script=""
+ value=""
+ CMDLINE=""
+ STRINGPARAMS=""
+ STRINGPARAMS_CO=""
+ STRINGPARAMS_CS=""
+ STRINGPARAMS_PR="" 
+ STRINGPARAMS_SP=""
+ STRINGPARAMS_TS=""
+ STRINGPARAMS_VA=""
+
+
+ # LIST OF THE PARAMETERS OF THE NCL SCRIPTS WHICH NCL EXPECTED TO BE STRINGS
+ # CO: PARAMETERS WHICH ARE COMMON FOR ALL NCL SCRIPTS
+ # CS: cross_sections.ncl PR: profiles.ncl SP: spectra.ncl TS: timeseries.ncl
+ # VA: PARAMETERS WHICH CONTAIN LISTS OF VARIABLE NAMES
+ STRINGPARAMS_CO="file_1 format_out file_out var file_config "
+ STRINGPARAMS_CS="sort mode fill_mode unit_x unit_y unit_z vec1 vec2 plotvec"
+ STRINGPARAMS_PR="file_2 file_3 file_4 file_5 file_6 name_legend_1 name_legend_2 name_legend_3 name_legend_4 name_legend_5 name_legend_6 c_var"
+ STRINGPARAMS_SP="sort unit_x unit_y"
+ STRINGPARAMS_TS="unit_t"
+ STRINGPARAMS_VA="var c_var vec1 vec2 plotvec"
+
+
+ # CHOICE OF THE PARTICULAR NCL SCRIPT
+ if [[ "$1" == "xy" ]]
+  then 
+    script="cross_sections.ncl"
+    STRINGPARAMS=$STRINGPARAMS_CO$STRINGPARAMS_CS
+    CMDLINE="xyc=1 "
+  elif [[ "$1" == "xz" ]]
+    then 
+    script="cross_sections.ncl"
+    STRINGPARAMS=$STRINGPARAMS_CO$STRINGPARAMS_CS
+    CMDLINE="xzc=1 "
+  elif [[ "$1" == "yz" ]]
+    then 
+    script="cross_sections.ncl"
+    STRINGPARAMS=$STRINGPARAMS_CO$STRINGPARAMS_CS
+    CMDLINE="yzc=1 "
+  elif [[ "$1" == "pr" ]]
+    then 
+    script="profiles.ncl"
+    STRINGPARAMS=$STRINGPARAMS_CO$STRINGPARAMS_PR
+  elif [[ "$1" == "ts" ]]
+    then 
+    script="timeseries.ncl"
+    STRINGPARAMS=$STRINGPARAMS_CO$STRINGPARAMS_TS
+  elif [[ "$1" == "sp" ]]
+    then 
+    script="spectra.ncl"
+    STRINGPARAMS=$STRINGPARAMS_CO$STRINGPARAMS_SP
+   else
+     (printf "\n  first argument has to be one of the following:"
+      printf "\n   xy, xz, yz, pr, ts or sp \n" 
+      printf "\n  type \"palmplot ?\" for information about the usage of this script\n")
+     exit
+ fi
+
+ # SHIFTING THE FIRST COMMAND LINE ARGUMENT
+ shift 
+
+ # PROCESSING THE COMMAND LINE ARGUMENTS
+ while [ $# -gt 0 ] 
+ do
+    arg=$1
+    key=${arg%%=*}
+    value=${arg#*=}
+
+    # ALLOWING RELATIVE AND ABSOLUTE FILE PATHS 
+    if [[ "$key" ==  @(file_*) && "$value" != @(~/*|/*) ]]
+    then
+       value=$PWD/$value
+    fi
+
+    # USE CONFIG FILE SPECIFIED BY USER
+    if [ "$key" = "file_config" ]
+    then
+       if [ -f $value ]
+       then
+          use_user_config=true
+       else
+          printf "\n  configuration file \"$value\" not found."
+          printf "\n  trying to use one of the standard configuraion files...\n"
+       fi
+    fi
+
+    # PROCESSING STRINGS
+    for a in $STRINGPARAMS
+    do
+      if [ "$key" = "$a" ]
+      then
+
+         # PROCESSING STRINGS CONTAINING LISTS OF VARIABLES
+         for b in $STRINGPARAMS_VA
+         do
+           if [ "$key" = "$b" ]
+           then
+              if [[ "$value" != "all" ]]
+              then
+                 # SUBSTITUTING BLANKS WITH COMMAS IN 
+                 # PARAMETERS CONTAINING LISTS OF VARIABLES
+                 value=`echo $value | sed 's/ /,/g'`   
+                 # ALLOWING THE USAGE OF COMMA SEPARATED LIST AS WELL    
+            
+                 if [[ "$value" == "${value#,}" ]]
+                 then
+                    value=,$value
+                 fi
+                 if [[ "$value" == "${value%,}" ]]
+                 then
+                    value=$value,
+                 fi          
+                 value=${value/%\*,,/\*,}                 
+                 break
+              fi
+           fi
+         done
+
+         # SUBSTITUTING DOUBLE QUOTES - REQUIRED BY NCL
+         value=`echo $value | sed 's/\"/\"+dq+\"/g'`
+         # SETTING ENTIRE STRING IN DOUBLE QUOTES - REQUIRED BY NCL
+         value=\"$value\"
+      fi
+    done
+
+    CMDLINE=$CMDLINE"$key=$value "
+    shift
+ done
+
+ # SET CONFIGURATION FILE TO ONE OF THE DEFAULT FILES IF NOT SPECIFIED BY USER
+ if [ "$use_user_config" != true ]
+ then
+    key="file_config"
+
+    if [ -f $PALM_BIN/../../.ncl.config ]
+    then
+       value="\"$PALM_BIN/../../.ncl.config\""
+    else
+       value="\"$PALM_BIN/NCL/.ncl.config.default\""
+    fi
+
+    CMDLINE=$CMDLINE"$key=$value "
+ fi
+
+ # EXECUTING THE PARTICULAR NCL SCRIPT
+ cd $PALM_BIN/NCL
+ ncl 'dq=str_get_dq()' $script $CMDLINE 
Index: /palm/tags/release-6.0/SCRIPTS/palmrun
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmrun	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmrun	(revision 3477)
@@ -0,0 +1,3014 @@
+#!/bin/bash
+
+# palmrun - script for running PALM jobs
+
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 2017-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# options -h and -d renamed -c and -r, respectively
+# 
+# 3402 2018-10-23 11:49:24Z knoop
+# job_id is set for compatibility reasons with older versions of config files
+# 
+# 3313 2018-10-06 15:22:48Z knoop
+# more detailed error message for outdated fileconnection file
+# 
+# 3236 2018-09-10 09:07:06Z raasch
+# warning issued in case of file connection file version mismatch,
+# host_configuration renamed configuration_identifier,
+# "host identifier" in header output renamed "config. identifier",
+# jobname renamed run_identifier,
+# run_id renamed run_id_number
+# job_id renamed run_id
+# option -r renamed -i
+# 
+# 3151 2018-07-19 08:45:38Z raasch
+# removed additional listing of files to be compiled, print PALM code revision
+# in header
+# 
+# 3132 2018-07-16 11:44:58Z raasch
+# create consistent error messages in case of failed restarts,
+# check existence of remote job catalog
+# 
+# 3043 2018-05-25 10:47:54Z raasch
+# check for setting of fast_io_catalog
+# 
+# 3033 2018-05-23 15:26:19Z raasch
+# -T option not required for interactive runs (tasks per node =
+# total number of cores is assumed as default, if option is not given),
+# reformatting of a few messages,
+# bugfix: destination output directory is created if attribute "pe" is set in
+# .palm.iofiles
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# bugfix of r2990
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# bugfix: temporary SOURCES_FOR_RUN_CATALOG now created in base_directory and
+#         not in the working directory from where palmrun is called
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# svfout in the activation string will be replaced now by svfin in case of 
+# automatic restarts
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Introduction of new ENVIRONMENT variables read_svf and write_svf to consider
+# the possible output or input of sky view factors
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# "fname" renamed to "jobname"
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# parameters are allowed in output commands (OC:)
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# bugfix: exit if no queue has been given neither with option -q nor in the
+# configuration file 
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# file connection file from trunk/SCRIPTS is taken by default
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2693 2017-12-13 12:33:49Z raasch
+# replacement of variables given by {{<variable>}} in configuration file is now
+# done in a more general way, variable names are written in small letters
+# 
+# 2670 2017-12-06 16:32:19Z raasch
+# test printouts removed
+# 
+# 2669 2017-12-06 16:03:27Z raasch
+# file attributes in .palm.iofiles restructured, "loc" attribute completely
+# removed,
+# wildcard (*) allowed in .palm.iofiles as file activation string for output
+# files,
+# informative messages in case of missing optional input files shortened
+# bugfix: variable cycle explicitly interpreted with 10 as the number base
+# 
+# 2638 2017-11-23 12:44:23Z raasch
+# use of wildcards in file connection statements enabled
+# 
+# 2605 2017-11-09 15:31:46Z raasch
+# in case of remote jobs, input files with "job" or "jobopt" (new) attribute
+# will not be sent with the job file any more, but copied into the
+# SOURCES_FOR_RUN... folder on the remote host, before the job is submitted
+# 
+# 2600 2017-11-01 14:11:20Z raasch
+# cycle numbers are made three digits wide
+# 
+# 2566 2017-10-20 08:50:47Z raasch
+# execute command for combine_plot_fields added
+# "TEMPDIR" renamed "tempdir"
+# temporary working directory for local batch jobs is created immediately within
+# the user's palmrun call, due to a requirement of the "grid engine" batch
+# system, where the working directory is given with batch directive -wd and must
+# already exist when the job is submitted,
+# informative messages in non-trace mode reduced and partly reformatted
+# 
+# 2551 2017-10-18 07:25:11Z raasch
+# TEMPDIR added as replacement string to be used in batch directives
+# 
+# 2512 2017-10-04 08:26:59Z raasch
+# bugfix for determining cycle numbers of NetCDF input files
+# 
+# 2506 2017-09-29 08:30:37Z raasch
+# option -V added to check for an existing SOURCES_FOR_RUN_... folder
+# host configuration added to SOURCES_FOR_RUN_... folder name
+# host_identifier renamed host_configuration
+# option -W added to allow for job dependencies
+# 
+# 2501 2017-09-26 11:41:55Z raasch
+# default value for number of cores (option -X) set to 1
+# bugfix for mechanism which overwrites configuration file settings with values
+# provided by palmrun options
+# 
+# 2499 2017-09-22 16:47:58Z kanani
+# option -h named configuration identifier
+# 
+# 2480 2017-09-19 06:24:14Z maronga
+# bugfix for last revision
+# 
+# 2479 2017-09-19 06:12:16Z raasch
+# option -A (project account number) added
+# 
+# 2422 2017-09-08 08:25:41Z raasch
+# initial revision
+# 
+#--------------------------------------------------------------------------------#
+# palmrun - script for running PALM jobs on local and remote hosts
+#--------------------------------------------------------------------------------#
+
+
+ 
+    # DECLARATION OF VARIABLES AND THEIR DEFAULT VALUES
+
+ set +o allexport    # SUPPRESS EXPORT OF ALL VARIABLES, SINCE IN THE PAST THIS
+                     # LEAD TO PROBLEMS IN ROUTINES CALLED BY PALMRUN
+                     # (TOO MANY ARGUMENTS - PROBLEM)
+ set +o noclobber    # EXISTING FILES ARE ALLOWED TO BE OVERWRITTEN
+
+ typeset -i  ibd=0 ibdt=0 iec=0 iic=0 iin=0 ioc=0 iout=0 nr_of_input_files=0
+ typeset -i  nr_of_output_files=0
+ typeset -x -i  memory=0   # HAS TO BE EXPORTED HERE, OTHERWISE AN UNKNOWN SIDE
+                           # SIDE EFFECT MAY CAUSE DATA LOSS WHEN GETOPTS IS READING THE
+                           # SCRIPT-OPTION ARGUMENTS
+ typeset -i  cores cputime cpu_hours cpu_minutes cpu_seconds i ii iia iii iio
+ typeset -i  icycle inode ival maxcycle mpi_tasks
+ typeset -i  nodes remaining_cores run_number tasks_per_node threads_per_task
+
+ activation_string_list=""
+ AddFilenames=""
+ combine_plot_fields=true
+ compiler_name=""
+ compiler_name_ser=""
+ compiler_options=""
+ configuration_identifier="default"
+ cores=1
+ cores_atmos=0
+ cores_ocean=0
+ coupled_dist=""
+ cpp_options=""
+ cpumax=0
+ create_batch_job=false
+ create_jobfile_only=false
+ create_remote_batch_job=false
+ dashes="  ----------------------------------------------------------------------------"
+ defaultqueue=""
+ delete_temporary_catalog=true
+ do_compile=true
+ do_trace=false
+ executable=""
+ execute_command=""
+ execution_error=false
+ fileconnection_file=trunk/SCRIPTS/.palm.iofiles
+ global_revision=""
+ hostfile=""
+ hp=""
+ keep_data_from_previous_run=false
+ link_local_input=false
+ link_local_output=false
+ linker_options=""
+ local_jobcatalog=""
+ locat=normal
+ makefile=""
+ max_par_io_str=""
+ prc=$0
+ while [[ $(echo $prc | grep -c "/") != 0 ]]
+ do
+    prc=`echo $prc | cut -f2- -d"/"`
+ done
+ module_calls=""
+ palmrun_memory=""
+ palmrun_script_name=$prc
+ openmp=false
+ previous_job=""
+ project_account=""
+ queue=none
+ read_svf=""
+ restart_run=false
+ return_address=""
+ remote_jobcatalog=""
+ remote_username=""
+ running_in_batch_mode=false
+ running_in_test_mode=false
+ run_coupled_model=false
+ run_id=""
+ run_id_number=""
+ run_identifier=test
+ silent=false
+ source_list=""
+ source_path=""
+ tasks_per_node=0
+ threads_per_task=1
+ transfer_problems=false
+ user_source_path=""
+ use_existing_sources_folder=""
+ use_openmp=false
+ version="palmrun  1.0 Rev$Rev$"
+ working_directory=`pwd`
+ write_binary=""
+ write_svf=""
+
+
+    # ERROR HANDLING IN CASE OF EXIT
+ trap 'if [[ $locat != normal  &&  $locat != control_c ]]
+       then
+
+              # CARRY OUT ERROR-COMMANDS GIVEN IN THE CONFIGURATION FILE (EC:)
+          (( i = 0 ))
+          while (( i < iec ))
+          do
+             (( i = i + 1 ))
+             printf "\n  *** Execution of ERROR-command:\n"
+             printf "  >>> ${err_command[$i]}\n"
+             eval  ${err_command[$i]}
+          done
+          [[ $delete_temporary_catalog = true ]]  &&  (cd; rm -rf $tempdir)
+          printf "\n\n+++ palmrun crashed \n\n"
+          exit 1
+       elif [[ $locat != normal ]]
+       then
+          [[ $delete_temporary_catalog = true ]]  &&  (cd; rm -rf $tempdir)
+          printf "\n+++ palmrun killed by \"^C\" \n\n"
+          exit 2
+       else
+          printf "\n --> palmrun finished\n\n"
+          exit 0
+       fi' exit
+
+
+    # ACTIONS IN CASE OF TERMINAL-BREAK (CONTROL-C):
+ trap 'locat=control_c
+       exit 1
+      ' 2
+
+
+    # READ SHELLSCRIPT-OPTIONS AND REBUILD THE PALMRUN-COMMAND STRING (prc),
+    # WHICH WILL BE USED TO START RESTART-JOBS
+ while  getopts  :a:A:bBc:CFG:i:jkm:M:O:q:r:R:s:t:T:u:U:vVw:W:xX:yY:zZ option
+ do
+   case  $option  in
+       (a)   activation_string_list=$OPTARG; prc="$prc -a'$OPTARG'";;
+       (A)   project_account=$OPTARG; prc="$prc -A'$OPTARG'";;
+       (b)   create_batch_job=true; prc="$prc -b";;
+       (B)   delete_temporary_catalog=false; prc="$prc -B";;
+       (c)   configuration_identifier=$OPTARG; prc="$prc -c$OPTARG";;
+       (C)   restart_run=true; prc="$prc -C";;
+       (F)   create_jobfile_only=true;;
+       (G)   global_revision=$OPTARG; prc="$prc -G'$OPTARG'";;
+       (i)   run_id_number=$OPTARG;;
+       (j)   running_in_batch_mode=true;;
+       (k)   keep_data_from_previous_run=true; prc="$prc -k";;
+       (m)   palmrun_memory=$OPTARG; prc="$prc -m$OPTARG";;
+       (M)   makefile=$OPTARG; prc="$prc -M$OPTARG";;
+       (O)   use_openmp=true; threads_per_task=$OPTARG; prc="$prc -O$OPTARG";;
+       (q)   queue=$OPTARG; prc="$prc -q$OPTARG";;
+       (r)   run_identifier=$OPTARG; prc="$prc -r$OPTARG";;
+       (R)   return_address=$OPTARG;;
+       (s)   source_list=$OPTARG;;
+       (t)   palmrun_cpumax=$OPTARG; prc="$prc -t$OPTARG";;
+       (T)   palmrun_tasks_per_node=$OPTARG; prc="$prc -T$OPTARG";;
+       (u)   remote_username=$OPTARG; prc="$prc -u$OPTARG";;
+       (U)   return_username=$OPTARG; prc="$prc -U$OPTARG";;
+       (v)   silent=true; prc="$prc -v";;
+       (V)   use_existing_sources_folder="-V";;
+       (w)   max_par_io_str=$OPTARG; prc="$prc -w$OPTARG";;
+       (W)   previous_job=$OPTARG;;
+       (x)   do_trace=true;set -x; prc="$prc -x";;
+       (X)   palmrun_cores=$OPTARG; prc="$prc -X$OPTARG";;
+       (y)   ocean_file_appendix=true; prc="$prc -y";;
+       (Y)   run_coupled_model=true; coupled_dist=$OPTARG; prc="$prc -Y'$OPTARG'";;
+       (z)   running_in_test_mode=true;;
+       (Z)   combine_plot_fields=false; prc="$prc -Z";;
+       (\?)  printf "\n  +++ unknown option $OPTARG \n"
+             printf "\n  --> type \"$0 ?\" for available options \n"
+             locat=parameter;exit;;
+   esac
+ done
+
+
+    # SKIP GIVEN OPTIONS TO READ POSITIONAL PARAMETER, IF GIVEN
+    # CURRENTLY ONLY PARAMETER ? (TO OUTPUT A SHORT COMMAND INFO) IS ALLOWED
+ (( to_shift = $OPTIND - 1 ))
+ shift $to_shift
+
+    # PRINT SHORT DESCRIPTION OF PALMRUN OPTIONS
+ if [[ "$1" = "?" ]]
+ then
+   (printf "\n  *** Description of available palmrun options:\n"
+    printf "\n      Option  Description                              Default-Value"
+    printf "\n        -a    activation string list                   \"\" "
+    printf "\n        -A    project account number                   ---"
+    printf "\n        -b    batch-job on local machine               ---"
+    printf "\n        -B    do not delete temporary directory at end ---"
+    printf "\n        -c    configuration identifier                 \"default\" "
+    printf "\n        -F    create batch job file only               ---"
+    printf "\n        -k    keep data from previous run"
+    printf "\n        -m    memory demand in MB (batch-jobs)         0 MB"
+    printf "\n        -M    Makefile name                            Makefile"
+    printf "\n        -O    threads per openMP task                  ---"
+    printf "\n        -q    queue                                    \"$queue\" "
+    printf "\n        -r    run identifier                           test"
+    printf "\n        -s    filenames of routines to be compiled     \"\" "
+    printf "\n              must end with .f, .f90, .F, or .c !"
+    printf "\n              use \"..\" for more than one file and wildcards"
+    printf "\n              -s LM compiles all locally modified files"
+    printf "\n        -t    allowed cpu-time in seconds (batch)      0"
+    printf "\n        -T    tasks per node                           ---"
+    printf "\n        -u    username on remote machine               \"\" "
+    printf "\n        -v    no prompt for confirmation               ---"
+    printf "\n        -V    check if SOURCES_FOR_RUN_... exists      ---"
+    printf "\n        -w    maximum parallel io streams              as given by -X"
+    printf "\n        -W    name of job to wait for                  ---"
+    printf "\n        -x    tracing of palmrun for debug purposes    ---"
+    printf "\n        -X    # of processors (on parallel machines)   1"
+    printf "\n        -y    add appendix \"_O\" to all local output"
+    printf "\n              files (ocean precursor runs followed by"
+    printf "\n              coupled atmosphere-ocean runs)           ---"
+    printf "\n        -Y    run coupled model, \"#1 #2\" with" 
+    printf "\n              #1 atmosphere and #2 ocean processors    \"#/2 #/2\" depending on -X"
+    printf "\n        -Z    skip combine_plot_fields at the end of      "
+    printf "\n              the simulation                           ---"
+    printf "\n "
+    printf "\n      Possible values of positional parameter <modus>:"
+    printf "\n        \"?\"       -  this outline \n\n") | more
+    exit
+ elif [[ "$1" != "" ]]
+ then
+    printf "\n  +++ positional parameter $1 unknown \n"
+    locat=parameter; exit
+ fi
+
+
+
+    # SHORT STARTING MESSAGE
+ printf "\n*** $version "
+ printf "\n    will be executed.     Please wait ..."
+
+
+    # BUILD THE CONFIGURATION-FILE NAME AND THE SOURCES_FOR_RUN-FOLDER NAME
+ config_file=.palm.config.$configuration_identifier
+ sources_for_run_catalog=SOURCES_FOR_RUN_${configuration_identifier}_$run_identifier
+
+
+    # CHECK, IF CONFIGURATION FILE EXISTS
+ if [[ ! -f $config_file ]]
+ then
+    printf "\n\n  +++ configuration file: "
+    printf "\n           $config_file"
+    printf "\n      does not exist"
+    locat=connect; exit  
+ fi
+
+
+    # CHECK, IF USER PROVIDES OWN FILE CONNECTION FILE
+ if [[ -f .palm.iofiles ]]
+ then
+
+       # CHECK VERSION MISMATCH
+    if [[ $running_in_batch_mode != true ]]
+    then
+       if [[ $(head -n1 $fileconnection_file) != $(head -n1 .palm.iofiles) ]]
+       then
+          printf "\n\n  +++ WARNING: A file connection file has been found in your"
+          printf "\n               working directory, but its revision does not match"
+          printf "\n               the revision of the default (trunk) version."
+          printf "\n               You may need to update your connection file"
+          printf "\n               \"${working_directory}/.palm.iofiles\" !"
+       fi
+    fi
+
+    fileconnection_file=.palm.iofiles
+
+ fi
+
+
+    # CHECK, IF FILE CONNECTION FILE EXISTS
+ if [[ ! -f $fileconnection_file ]]
+ then
+    printf "\n\n  +++ file connection file: "
+    printf "\n           $fileconnection_file"
+    printf "\n      does not exist"
+    locat=connect; exit  
+ fi
+
+
+    # CHECK, IF THE ACTIVATION_STRING_LIST HAS BEEN GIVEN
+ if [[ "$activation_string_list" = "" ]]
+ then
+    printf "\n\n  +++ no activation string list given: "
+    printf "\n        please set palmrun option \"-a\" "
+    locat=palmrun_option; exit  
+ fi
+
+
+    # SET VARIABLE TO ACTIVATE PALM BINARY OUTPUT FOR RESTARTS
+ if [[ $(echo $activation_string_list | grep -c "restart") != 0 ]]
+ then
+    write_binary=true
+ else
+    write_binary=false
+ fi
+
+    # SET VARIABLE TO ACTIVATE WRITING OF SVF DATA
+ if [[ $(echo $activation_string_list | grep -c "svfout") != 0 ]]
+ then
+    write_svf=true
+ else
+    write_svf=false
+ fi
+
+    # SET VARIABLE TO ACTIVATE READING OF SVF DATA 
+ if [[ $(echo $activation_string_list | grep -c "svfin") != 0 ]]
+ then
+    read_svf=true
+ else
+    read_svf=false
+ fi
+
+
+    # READ AND EVALUATE THE CONFIGURATION-FILE
+ [[ $silent = false ]]  &&  printf "\n\n    Reading the configuration file... "
+
+    # READ VARIABLE SETTINGS FROM CONFIG FILE LINE BY LINE
+ while  read line
+ do
+
+       # FIRST REPLACE ENVIRONMENT-VARIABLES BY THEIR RESPECTIVE VALUES
+    eval  line=\"$line\"
+
+
+       # INTERPRET THE LINE
+    if [[ "$(echo $line)" = "" ]]
+    then
+
+          # EMPTY LINE, NO ACTION
+       continue
+
+    elif [[ "$(echo $line | cut -c1)"  =  "#" ]]
+    then
+
+          # LINE IS A COMMENT LINE
+       continue
+
+    elif [[ "$(echo $line | cut -c1)"  =  "%" ]]
+    then
+
+          # LINE DEFINES AN ENVIRONMENT-VARIABLE
+       var=`echo $line | cut -d" " -s -f1 | cut -c2-`
+       value=`echo $line | cut -d" " -s -f2-`
+
+
+          # VALUE FROM THE CONFIGURATION-FILE IS ASSIGNED TO THE
+          # ENVIRONMENT-VARIABLE, BUT ONLY IF NO VALUE HAS BEEN ALREADY
+          # ASSIGNED WITHIN THIS SCRIPT (E.G. BY SCRIPT-OPTIONS).
+          # NON-ASSIGNED VARIABLES HAVE VALUE "" OR 0 (IN CASE OF INTEGER).
+          # HENCE THE GENERAL RULE IS: SCRIPT-OPTION OVERWRITES THE
+          # CONFIGURATION-FILE.
+       if [[ "$(eval echo \$$var)" = ""  ||  "$(eval echo \$$var)" = "0" ]]
+       then
+          eval  export  $var="\$value"
+
+             # TERMINAL OUTPUT OF ENVIRONMENT-VARIABLES, IF TRACEBACK IS SWITCHED on
+          if [[ $do_trace = true ]]
+          then
+             printf "\n*** ENVIRONMENT-VARIABLE $var = $value"
+          fi
+       fi
+
+    elif [[ "$(echo $line | cut -c1-3)" = "BD:" ]]
+    then
+
+          # LINE DEFINES BATCH-DIRECTIVE
+       (( ibd = ibd + 1 ))
+       line=$(echo $line | cut -c4-)
+       batch_directive[$ibd]="$line"
+
+    elif [[ "$(echo $line | cut -c1-4)" = "BDT:" ]]
+    then
+
+          # LINE DEFINES BATCH-DIRECTIVE FOR SENDING BACK THE JOBFILE FROM A
+          # REMOTE TO A LOCAL HOST
+       (( ibdt = ibdt + 1 ))
+       line=$(echo $line | cut -c5-)
+       batch_directive_transfer[$ibdt]="$line"
+
+    elif [[ "$(echo $line | cut -c1-3)" = "EC:" ]]
+    then
+
+          # LINE DEFINES ERROR-COMMAND
+       (( iec = iec + 1 ))
+       line=$(echo $line | cut -c4-)
+       err_command[$iec]="$line"
+
+    elif [[ "$(echo $line | cut -c1-3)" = "IC:" ]]
+    then
+
+          # LINE DEFINES INPUT-COMMAND
+       (( iic = iic + 1 ))
+       line=$(echo $line | cut -c4-)
+       in_command[$iic]="$line"
+
+    elif [[ "$(echo $line | cut -c1-3)" = "OC:" ]]
+    then
+
+          # LINE DEFINES OUTPUT-COMMAND
+       (( ioc = ioc + 1 ))
+       line=$(echo $line | cut -c4-)
+       out_command[$ioc]="$line"
+
+    else
+
+          # SKIP ALL OTHER LINES
+       continue
+
+    fi
+
+ done < $config_file
+
+
+    # CHECK SETTING OF REQUIRED PARAMETERS
+ if [[ "$fast_io_catalog" = "" ]]
+ then
+    printf "\n  +++ no fast_io_catalog found in $config_file"
+    printf "\n      Please add line \"fast_io_catalog ...\" to that file."
+    locat=config_file; exit
+ fi
+ if [[ "$compiler_name" = "" ]]
+ then
+    printf "\n  +++ no compiler name found in $config_file"
+    printf "\n      Please add line \"compiler_name ...\" to that file."
+    locat=config_file; exit
+ fi
+ if [[ "$compiler_name_ser" = "" ]]
+ then
+    printf "\n  +++ no compiler name for non-paralle compilation found in $config_file"
+    printf "\n      Please add line \"compiler_name_ser ...\" to that file."
+    locat=config_file; exit
+ fi
+ if [[ "$compiler_options" = "" ]]
+ then
+    printf "\n  +++ no compiler options found in $config_file"
+    printf "\n      Please add line \"compiler_options ...\" to that file."
+    locat=config_file; exit
+ fi
+ if [[ "$linker_options" = "" ]]
+ then
+    printf "\n  +++ no linker options found in $config_file"
+    printf "\n      Please add line \"linker_options ...\" to that file."
+    locat=config_file; exit
+ fi
+ if [[ "$execute_command" = "" ]]
+ then
+    printf "\n  +++ no execute command found in $config_file"
+    printf "\n      Please add line \"execute_command ...\" to that file."
+    locat=config_file; exit
+ fi
+
+ if [[ "$hostfile" != "" ]]
+ then
+    if [[ $hostfile != auto  &&  ! -f $hostfile ]]
+    then
+       printf "\n  +++ no hostfile \"$hostfile\" found"
+       printf "\n      Please check line \"hostfile ...\" in $config_file"
+       locat=config_file; exit    
+    fi
+ fi
+
+
+    # DETERMINE THE CALL STATUS
+ if [[ "$return_address" != "" ]]
+ then
+ 
+       # I AM RUNNING ON A REMOTE HOST, WHICH ALSO MEANS THAT I AM RUNNING IN
+       # BATCH MODE AND ...
+    running_on_remote=true
+ 
+ else
+
+       # I HAVE BEEN CALLED INTERACTIVELY ON THIS HOST
+     if [[ "$remote_ip" != "" ]]
+     then
+
+           # I HAVE TO CREATE A BATCH JOB TO RUN PALM ON THE REMOTE HOST
+        create_remote_batch_job=true
+
+           # CHECK THAT THE REMOTE JOBCATALOG HAS BEEN SET
+        if [[ "$remote_jobcatalog" = "" ]]
+        then
+           printf "\n  +++ no remote jobcatalog found in $config_file"
+           printf "\n      Please add line \"remote_jobcatalog ...\" to that file."
+           locat=config_file; exit
+        fi
+ 
+
+     fi
+     running_on_remote=false
+ fi
+
+
+
+    # READ AND EVALUATE THE I/O-FILE LIST
+ [[ $silent = false ]]  &&  printf "\n    Reading the I/O files... "
+
+    # READ THE FILE CONNECTION FILE LINE BY LINE
+ while  read line
+ do
+
+       # REPLACE REPEATING SPACES BETWEEN THE COLUMNS BY A SINGLE SPACE
+    line=`echo "$line" | sed -e "s/\s\{1,\}/ /g"`
+
+       # INTERPRET THE LINE
+    if [[ "$(echo $line)" = "" ]]
+    then
+          # EMPTY LINE, NO ACTION
+       continue
+
+    elif [[ "$(echo $line | cut -c1)"  =  "#" ]]
+    then
+
+          # LINE IS A COMMENT LINE
+       true
+
+    else
+
+          # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES.
+          # s2a: in/out - field
+          # s2b: action - field (optional)
+       s1=`echo "$line" | cut -d" " -f1`
+       s2=`echo "$line" | cut -d" " -s -f2`
+       if [[ $(echo $s2 | grep -c ":") = 0 ]]
+       then
+          s2a=$s2
+          s2b=""
+       else
+          s2a=`echo $s2 | cut -d":" -f1`
+          s2b=`echo $s2 | cut -d":" -f2`
+       fi
+       s3=`echo "$line" | cut -d" " -f3 | sed 's/*/wildcard /g'`
+       s4=`echo "$line" | cut -d" " -s -f4`
+       eval s4=\"$s4\"    # REPLACE ENVIRONMENT-VARIABLES IN PATH BY THEIR RESPECTIVE VALUES
+       s5=`echo "$line" | cut -d" " -s -f5`
+       s6=`echo "$line" | cut -d" " -s -f6`
+
+       
+          # STORE FILE CONNECTION, IF ACTIVATED BY ACTIVATION-STRING FROM
+          # INPUT- OR OUTPUT-LIST.
+          # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":").
+          # IF EXECUTION IS SCHEDULED FOR A REMOTE-MACHINE AND THE FILE IS ONLY
+          # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b != tr), THE FILE CONNECTION
+          # IS NOT CHECKED AND STORED.
+       IFSALT="$IFS"; IFS="$IFS:"      # ADD ":" AS FIELD SEPARATOR
+       if [[ ( "$s2a" = in  || "$s2a" = inopt )  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" != tr ) ]]
+       then
+          found=false
+          for  actual  in  $activation_string_list
+          do
+             for  formal  in  $s3
+             do
+                [[ $actual = $formal  ||  "$formal" = "-" ]]  &&  found=true
+             done
+          done
+          if [[ $found = true ]]
+          then
+             (( iin = iin + 1 ))
+             localin_pre[$iin]=$s1; actionin_pre[$iin]=$s2b;
+             pathin_pre[$iin]=$s4; endin_pre[$iin]=$s5; extin_pre[$iin]=$s6
+             if [[ "$s2a" = inopt ]]
+             then
+                optin_pre[$iin]=yes
+             else
+                optin_pre[$iin]=no
+             fi 
+
+                # FILES WITH JOB-ATTRIBUTE ARE STORED IN THE SOURCES_FOR_RUN
+                # FOLDER IF THE JOB IS RUNNING ON A REMOTE HOST
+             if [[ $running_on_remote = true  &&  "$s2b" = tr ]]
+             then
+                pathin_pre[$iin]=${fast_io_catalog}/${sources_for_run_catalog}
+             fi
+
+                # CHECK FOR MULTIPLE FILES, SET A RESPECTIVE FLAG AND REMOVE
+                # THE WILDCARD FROM THE ENDING
+             if [[ "${s5: -1}" = "*" ]]
+             then
+                if [[ "$s2b" = "di" ]]
+                then
+                   printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
+                   printf "\n        see file \"$fileconnection_file\", line"
+                   printf "\n$line"
+                   locat=iofiles_file; exit
+                fi
+                multin[$iin]=true
+                string=${endin_pre[$iin]}
+                endin_pre[$iin]="${string%?}"
+             else
+                multin[$iin]=false
+             fi
+          fi
+       elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true ) ]]
+       then
+          found=false
+          for  actual  in  $activation_string_list
+          do
+             for  formal  in  $s3  
+             do
+                [[ $actual = $formal  ||  $formal = wildcard  ]]  &&  found=true
+             done
+          done
+          if [[ $found = true ]]
+          then
+             (( iout = iout + 1 ))
+             localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2b
+             pathout_pre[$iout]=$s4; endout_pre[$iout]=$s5; extout_pre[$iout]=$s6
+
+                # CHECK IF WILDCARD IS USED AS ACTIVATION STRING
+                # IN SUCH CASES, NO WARNING WILL LATER BE OUTPUT IF LOCAL FILES DO NOT EXIST
+             if [[ $formal = wildcard  ]]
+             then
+                warnout_pre[$iout]=false
+             else
+                warnout_pre[$iout]=true
+             fi
+
+                # CHECK FOR MULTIPLE FILES, SET A RESPECTIVE FLAG AND REMOVE
+                # THE WILDCARD FROM THE LOCAL FILENAME
+             if [[ "${s1: -1}" = "*" ]]
+             then
+                if [[ "$s2b" = "di" ]]
+                then
+                   printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
+                   printf "\n        see file \"$fileconnection_file\", line"
+                   printf "\n$line"
+                   locat=iofiles_file; exit
+                fi
+                multout[$iout]=true
+                string=${localout_pre[$iout]}
+                localout_pre[$iout]="${string%?}"
+             else
+                multout[$iout]=false
+             fi
+          fi
+       elif [[ "$s2a" != in  &&  "$s2a" != inopt  &&  "$s2a" != out ]]
+       then
+          printf "\n  +++ I/O-attribute in file $fileconnection_file has invalid"
+          printf "\n      value \"$s2\". Only \"in\", \"inopt\", and \"out\" are allowed!"
+          locat=connect; exit
+       fi
+       IFS="$IFSALT"
+    fi
+
+ done < $fileconnection_file
+
+
+
+    # VALUES OF PALMRUN-OPTIONS OVERWRITE THOSE FROM THE CONFIGURATION-FILE
+ [[ "$palmrun_memory" != "" ]]  &&  memory=$palmrun_memory
+ [[ "$palmrun_cpumax" != "" ]]  &&  cpumax=$palmrun_cpumax
+ [[ "$palmrun_cores"  != "" ]]  &&  cores=$palmrun_cores
+ [[ "$max_par_io_str" != "" ]]  &&  maximum_parallel_io_streams=$max_par_io_str
+ [[ "$palmrun_tasks_per_node" != "" ]]  &&  tasks_per_node=$palmrun_tasks_per_node
+
+
+
+      # EVALUATE MODEL COUPLING FEATURES (OPTION -Y)
+ if [[ $run_coupled_model = true ]] 
+ then
+
+    cores_atmos=`echo $coupled_dist | cut -d" " -s -f1`
+    cores_ocean=`echo $coupled_dist | cut -d" " -s -f2`
+
+    if (( $cores_ocean + $cores_atmos != $cores ))
+    then
+
+       printf "\n  +++ number of processors does not fit to specification by \"-Y\"."
+       printf "\n      PEs (total)     : $cores"
+       printf "\n      PEs (atmosphere): $cores_atmos"
+       printf "\n      PEs (ocean)     : $cores_ocean"
+       locat=coupling; exit
+
+    fi
+
+ fi
+
+
+    # IF I AM IN BATCH MODE, CHECK IF EXECUTABLE AND OTHER REQUIRED FILES
+    # HAVE BEEN GENERATED BY PALMBUILD AND STORED IN THE SOURCES_FOR_RUN_...
+    # FOLDER
+ if [[ $running_in_batch_mode = true ]]
+ then
+ 
+    if [[ ! -d ${fast_io_catalog}/${sources_for_run_catalog} ]]
+    then
+       printf "\n  +++ directory ${fast_io_catalog}/${sources_for_run_catalog} is missing"
+       printf "\n      Please check the output of the palmrun-call"
+       printf "\n      that you did on your local host."
+       locat=SOURCES_FOR_RUN; exit
+    fi
+
+ else
+
+       # CREATE THE SOURCES_FOR_RUN_... FOLDER, BUT NOT IF I AM PART OF AN
+       # AUTOMATIC RESTART RUN
+       # AUTOMATIC RESTART RUNS JUST ACCESS THE DIRECTORY CREATED BY THE INITIAL RUN
+    if [[ $restart_run = false ]]
+    then
+
+          # COLLECT FILES TO BE COMPILED IN THE SOURCES_FOR_RUN_... FOLDER ON
+          # THE LOCAL HOST
+       if [[ ! -d $source_path ]]
+       then
+          printf "\n\n  +++ source path \"$source_path\" on local host"
+          printf "\n      \"$(hostname)\" does not exist"
+          locat=source_path; exit
+       fi
+
+       rm -rf   ${base_directory}/${sources_for_run_catalog}
+       mkdir -p ${base_directory}/${sources_for_run_catalog}
+
+       if [[ "$source_list" = LM ]]
+       then
+
+             # DETERMINE MODIFIED FILES OF THE SVN WORKING COPY
+          source_list=""
+          cd  $source_path
+
+
+             # CHECK, IF TRUNK-DIRECTORY IS UNDER SVN CONTROL
+          if [[ ! -d ../.svn ]]
+          then
+             printf "\n\n  +++ source directory"
+             printf "\n         \"$source_path\" "
+             printf "\n         is not under control of \"subversion\"."
+             printf "\n         Please do not use palmrun-option \"-s LM\"\n"
+          fi
+
+
+             # LIST ALL MODIFIED SOURCE CODE FILES
+          Filenames=""
+          svn status  >  tmp_svnstatus
+          while  read line
+          do
+             firstc=`echo $line | cut -c1`
+             if [[ $firstc = M  ||  $firstc = "?" ]]
+             then
+                Name=`echo "$line" | cut -c8-`
+                extension=`echo $Name | cut -d. -f2`
+                if [[ "$extension" = f90 || "$extension" = F90 || "$extension" = f || "$extension" = F || "$extension" = c ]]
+                then
+                   Filenames="$Filenames "$Name
+                fi
+             fi
+          done < tmp_svnstatus
+          rm -rf  tmp_svnstatus
+
+
+             # COPY FILES TO SOURCES_FOR_RUN_...
+          for  filename  in  $Filenames
+          do
+             cp  $filename  ${base_directory}/${sources_for_run_catalog}
+             source_list=$source_list"$filename "
+          done
+
+          cd -  > /dev/null
+
+
+          # COPY FILES GIVEN BY OPTION -s TO DIRECTORY SOURCES_FOR_RUN_...
+       elif [[ "$source_list" != "" ]]
+       then
+
+          cd  $source_path
+
+          for  filename  in  $source_list
+          do
+
+                # SOURCE CODE FILE IS NOT ALLOWED TO INCLUDE PATH
+             if [[ $(echo $filename | grep -c "/") != 0 ]]
+             then
+                printf "\n  +++ source code file:  $filename"
+                printf "\n      must not contain (\"/\") "
+                locat=source; exit
+             fi
+
+             if [[ ! -f $filename ]]
+             then
+                printf "\n  +++ source code file:  $filename"
+                printf "\n      does not exist"
+                locat=source; exit
+             else
+                cp  $filename  ${base_directory}/${sources_for_run_catalog}
+             fi
+
+          done
+
+          cd -  > /dev/null
+
+       fi
+
+          # CHECK, IF MAKEFILE EXISTS AND COPY IT TO THE SOURCES_FOR_RUN... DIRECTORY
+       [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
+       if [[ ! -f $makefile ]]
+       then
+          printf "\n  +++ file \"$makefile\" does not exist"
+          locat=make; exit
+       else
+          cp  $makefile  ${base_directory}/${sources_for_run_catalog}/Makefile 
+       fi
+
+
+          # COPY FILES FROM OPTIONAL SOURCE PATH GIVEN IN THE CONFIGURATION FILE
+       if [[ "$user_source_path" != "" ]]
+       then
+
+             # DOES THE DIRECTORY EXIST?
+          if [[ ! -d $user_source_path ]]
+          then
+
+             printf "\n\n  *** INFORMATIVE: additional source code directory"
+             printf "\n      \"$user_source_path\" "
+             printf "\n      does not exist or is not a directory."
+             printf "\n      No source code will be used from this directory!\n"
+             user_source_path=""
+             if [[ $silent == false ]]
+             then
+                sleep 2
+             fi
+
+          else
+
+             cd $user_source_path
+
+             Names=$(ls -1 *.f90 2>&1)
+             [[ $(echo $Names | grep -c '*.f90') = 0 ]]  &&  AddFilenames="$Names"
+             Names=$(ls -1 *.F90 2>&1)
+             [[ $(echo $Names | grep -c '*.F90') = 0 ]]  &&  AddFilenames="$AddFilenames $Names"
+             Names=$(ls -1 *.F 2>&1)
+             [[ $(echo $Names | grep -c '*.F') = 0   ]]  &&  AddFilenames="$AddFilenames $Names"
+             Names=$(ls -1 *.f 2>&1)
+             [[ $(echo $Names | grep -c '*.f') = 0   ]]  &&  AddFilenames="$AddFilenames $Names"
+             Names=$(ls -1 *.c 2>&1)
+             [[ $(echo $Names | grep -c '*.c') = 0   ]]  &&  AddFilenames="$AddFilenames $Names"
+
+             cd -  > /dev/null
+             cd  ${base_directory}/${sources_for_run_catalog}
+
+                # COPY MAKEFILE IF EXISTING
+             if [[ -f $user_source_path/Makefile ]]
+             then
+                printf "\n\n  *** user Makefile from directory"
+                printf "\n      \"$user_source_path\" is used \n"
+                if [[ $silent == false ]]
+                then
+                   sleep 1
+                fi
+                cp  $user_source_path/Makefile  .
+             fi
+
+             for  filename  in  $AddFilenames
+             do
+                if [[ -f $filename ]]
+                then
+                   printf "\n  +++ source code file \"$filename\" found in additional"
+                   printf "\n      source code directory \"$user_source_path\" "
+                   printf "\n      but was also given with option \"-s\" which means that it should be taken"
+                   printf "\n      from directory \"$source_path\"."
+                   locat=source; exit
+                fi
+
+                cp  $user_source_path/$filename  .
+                source_list="$source_list $filename"
+
+                   # CHECK IF FILE IS CONTAINED IN MAKEFILE
+                if [[ $(grep -c $filename Makefile) = 0 ]]
+                then
+                   printf "\n\n  +++ user file \"$filename\" "
+                   printf "\n      is not listed in Makefile \n"
+                   locat=source; exit
+                fi
+             done
+             cd -  > /dev/null
+          fi
+       fi
+
+          # COPY CONFIGURATION FILES
+       cp  $config_file  ${base_directory}/${sources_for_run_catalog}
+       cp  $fileconnection_file  ${base_directory}/${sources_for_run_catalog}
+
+          # COPY SHELLSCRIPTS
+       cp  ${source_path}/../SCRIPTS/palmrun    ${base_directory}/${sources_for_run_catalog}
+       cp  ${source_path}/../SCRIPTS/batch_scp  ${base_directory}/${sources_for_run_catalog}
+
+    fi
+
+ fi
+
+
+    # GET THE GLOBAL REVISION-NUMBER OF THE SVN-REPOSITORY
+    # (HANDED OVER TO RESTART-RUNS USING OPTION -G)
+ if [[ "$global_revision" = "" ]]
+ then
+    global_revision=`svnversion $source_path  2>/dev/null`
+    global_revision="Rev: $global_revision"
+ fi
+
+
+    # IN CASE OF PARALLEL EXECUTION, CHECK SOME SPECIFICATIONS CONCERNING PROCESSOR NUMBERS
+ if [[ -n $cores ]]
+ then
+
+       # CHECK, IF THE NUMBER OF CORES PER NODE HAS BEEN GIVEN UND IF IT IS AN
+       # INTEGRAL DIVISOR OF THE TOTAL NUMBER OF CORES GIVEN BY OPTION -X
+    if [[ $tasks_per_node = 0 ]]
+    then
+       if [[ $create_batch_job = true  ||  $create_remote_batch_job = true ]]
+       then
+          printf "\n"
+          printf "\n  +++ option \"-T\" (tasks per node) is missing"
+          printf "\n      set -T option or define tasks_per_node in the config file"
+          locat=tasks_per_node; (( iec = 0 )); exit
+       else
+             # DEFAULT FOR INTERACTIVE RUN
+          tasks_per_node=$cores
+       fi
+    fi
+
+    if (( cores < tasks_per_node ))
+    then
+       printf "\n"
+       printf "\n  +++ tasks per node (-T) cannot exceed total number of cores (-X)"
+       printf "\n      given values: -T $tasks_per_node  -X $cores"
+       locat=tasks_per_node; (( iec = 0 )); exit 
+    fi
+
+    (( nodes = cores / ( tasks_per_node * threads_per_task ) ))
+    (( mpi_tasks = cores / threads_per_task ))
+    [[ $mpi_tasks = 0 ]]  &&  (( mpi_tasks = 1 ))
+    (( ii = cores / tasks_per_node ))
+    (( remaining_cores =  cores - ii * tasks_per_node ))
+    if (( remaining_cores > 0 ))
+    then
+       printf "\n"
+       printf "\n  +++ WARNING: tasks per node (option \"-T\") is not an integral"
+       printf "\n      divisor of the total number of cores (option \"-X\")"
+       printf "\n      values of this palmrun-call: \"-T $tasks_per_node\" \"-X $cores\""
+       printf "\n      One of the nodes is filled with $remaining_cores instead of $tasks_per_node tasks"
+       (( nodes = nodes + 1 ))
+    fi
+
+ fi
+
+
+    # SET DEFAULT VALUE FOR THE MAXIMUM NUMBER OF PARALLEL IO STREAMS
+ if [[ "$maximum_parallel_io_streams" = "" ]]
+ then
+    maximum_parallel_io_streams=$cores
+ fi
+
+
+    # SET PORT NUMBER OPTION FOR CALLS OF SSH/SCP AND batch_scp SCRIPT
+ if [[ "$scp_port" != "" ]]
+ then
+    PORTOPT="-P $scp_port"
+    SSH_PORTOPT="-p $scp_port"
+ fi
+
+
+    # DETERMINE THE SSH-OPTION IN CASE THAT AN SSH-KEY IS EXPLICITLY GIVEN IN THE
+    # CONFIG-FILE
+ if [[ "$ssh_key" != "" ]]
+ then
+    ssh_key="-i $HOME/.ssh/$ssh_key"
+ fi
+
+
+    # SET QUEUE, IF NOT GIVEN
+ if [[ $create_batch_job = true  ||  $create_remote_batch_job = true ]]
+ then
+
+    if [[ $queue = none  &&  "$defaultqueue" = "" ]]
+    then
+       printf "\n"
+       printf "\n  +++ no default queue given in configuration file and no queue"
+       printf "\n      given with option -q"
+       locat=queue; exit
+    fi
+    if [[ $queue = none ]]
+    then
+       queue=$defaultqueue
+    fi
+
+ fi
+
+
+    # GENERATE FULL FILENAMES OF INPUT-FILES, INCLUDING THEIR PATH
+    # CHECK, IF INPUT-FILES EXIST, AND DETERMINE HIGHEST CYCLE NUMBER (IF CYCLES EXIST)
+ (( i = 0 ))
+ (( nr_of_input_files = 0 ))
+ while (( i < iin ))
+ do
+    (( i = i + 1 ))
+
+       # GENERATE PATH AND FULL FILE NAME (then-BRANCH: FIXED FULL NAME IS GIVEN, I.E. THE
+       # FILE IDENTIFIER IS NOT PART OF THE FILENAME))
+    if [[ "${actionin_pre[$i]}" = di ]]
+    then
+       eval filename=${pathin_pre[$i]}/${endin_pre[$i]}
+    else
+       eval filename=${pathin_pre[$i]}/${run_identifier}${endin_pre[$i]}
+    fi
+
+
+       # CHECK IF FILE EXISTS
+    if ! ls $filename* 1>/dev/null 2>&1
+    then
+
+          # FILES WITH ATTRIBUTE opt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
+       if [[ "${optin_pre[$i]}" != "yes" ]]
+       then
+          printf "\n\n  +++ INPUT-file: "
+          if [[ "${extin_pre[$i]}" = ""  ||  "${extin_pre[$i]}" = " " ]]
+          then
+             printf "\n           $filename"
+          else
+             printf "\n           $filename.${extin_pre[$i]}"
+          fi
+          printf "\n      does not exist\n"
+          locat=input; exit
+       else
+          (( nr_of_input_files = nr_of_input_files + 1 ))
+          localin[$nr_of_input_files]="${localin_pre[$i]}"
+          optin[$nr_of_input_files]="${optin_pre[$i]}"
+          actionin[$nr_of_input_files]="unavailable"
+          pathin[$nr_of_input_files]="${pathin_pre[$i]}"
+          endin[$nr_of_input_files]="${endin_pre[$i]}"
+          extin[$nr_of_input_files]="${extin_pre[$i]}"
+       fi
+
+    else
+
+          # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME BASENAME
+          # ($run_identifier) AND CREATE A LIST FOR THE DETECTED BASENAME
+          # ENDINGS
+       if [[ "${multin[$i]}" = true ]]
+       then
+             # DETERMINE THE EXISTING EXTENSIONS FROM THE LIST OF FILES
+          ls -1 -d ${filename}    >   filelist  2>/dev/null
+          ls -1 -d ${filename}.*  >>  filelist  2>/dev/null
+          ls -1 -d ${filename}_*  >>  filelist  2>/dev/null
+
+          endings=""
+          while  read line
+          do
+                 # filename without path (i.e. after the last "/")
+              basefilename=$(basename ${line})
+
+                 # check if there is an extension and remove it
+              ext=${basefilename##*.}
+              if [[ "$ext" = "${extin_pre[$i]}" ]]
+              then
+                 basefilename=${basefilename%.*}
+              fi
+
+                 # check for an existing cycle number and remove it
+              cycle=${basefilename##*.}
+              if [[ $cycle =~ ^-?[0-9]+$ ]]
+              then
+                 basefilename=${basefilename%.*}
+              fi
+
+                 # remove the run_identifier from the beginning
+              length_run_identifier=${#run_identifier}
+              ending=${basefilename:${length_run_identifier}}
+
+                 # remove the ending given in the .iofiles from the beginning
+              endingstring="${endin_pre[$i]}"
+              length_ending=${#endingstring}
+              ending=${ending:${length_ending}}
+
+              if [[ "$ending" = "" ]]
+              then
+                    # standard ending as given in the .iofiles
+                 if [[ $(echo $endings | grep -c DEFAULT) = 0 ]]
+                 then
+                    endings="$endings DEFAULT"
+                 fi
+              else
+                    # ending must start with "_", otherwise its a different file
+                 if [[ "${ending:0:1}" = "_" ]]
+                 then
+                    if [[ $(echo $endings | grep -c "$ending") = 0 ]]
+                    then
+                       endings="$endings $ending"
+                    fi
+                 fi
+              fi
+ 
+          done <filelist
+
+          rm filelist
+
+       else
+
+             # SINGLE NAME
+          endings=DEFAULT
+
+       fi
+
+          # FOR EACH BASENAME ENDING CREATE AN ENTRY IN THE FINAL INPUT FILE LIST
+       for  ending  in  $endings
+       do
+
+             # DEFAULT MEANS THAT THE ENDING GIVEN IN .iofiles SHALL BE USED
+          if [[ $ending = DEFAULT ]]
+          then
+             ending=""
+          fi
+
+             # NEW ENTRY (ENDING IS ALSO ADDED TO LOCAL FILENAME READ BY PALM!)
+          (( nr_of_input_files = nr_of_input_files + 1 ))
+          localin[$nr_of_input_files]="${localin_pre[$i]}"$ending
+          optin[$nr_of_input_files]="${optin_pre[$i]}"
+          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
+          pathin[$nr_of_input_files]="${pathin_pre[$i]}"
+          endin[$nr_of_input_files]="${endin_pre[$i]}"$ending
+          extin[$nr_of_input_files]="${extin_pre[$i]}"
+
+
+             # GENERATE PATH AND FULL FILE NAME (then-BRANCH: FIXED FULL NAME IS GIVEN, I.E. THE
+             # FILE IDENTIFIER IS NOT PART OF THE FILENAME))
+          if [[ "${actionin[$nr_of_input_files]}" = di ]]
+          then
+             eval filename=${pathin[$nr_of_input_files]}/${endin[$nr_of_input_files]}
+          else
+             eval filename=${pathin[$nr_of_input_files]}/${run_identifier}${endin[$nr_of_input_files]}
+          fi
+
+             # DETERMINE THE FILE'S CYCLE NUMBER
+          (( maxcycle = 0 ))
+          ls -1 -d $filename    >   filelist  2>/dev/null
+          ls -1 -d $filename.*  >>  filelist  2>/dev/null
+          while  read line
+          do
+                 # filename without path (i.e. after the last "/")
+              basefilename=$(basename ${line})
+   
+                 # check if there is an extension
+              extension=${basefilename##*.}
+              if [[ "$extension" = "${extin[$nr_of_input_files]}" ]]
+              then
+                 basefilename=${basefilename%.*}
+              fi
+   
+                 # check for an existing cycle number
+              cycle=${basefilename##*.}
+              if [[ $cycle =~ ^-?[0-9]+$ ]]
+              then
+                    # NUMBERS WITH LEADING ZEROS ARE INTERPRETED AS OCTAL NUMBERS
+                    # 10# EXPLICITLY SPECIFIES THE NUMBER BASE AS 10
+                 (( icycle = $((10#$cycle)) ))
+              else
+                 (( icycle = 0 ))
+              fi
+   
+              if (( icycle > maxcycle ))
+              then
+                 (( maxcycle = icycle ))
+   
+                    # FOR COMPATIBILITY REASONS WITH OLDER VERSIONS
+                    # CHECK IF CYCLE NUMBER CONTAINS LEADING ZEROS
+                 if [[ $(echo $cycle | cut -c1) = 0 ]]
+                 then
+                    leading_zero=true
+                 else
+                    leading_zero=false
+                 fi
+              fi
+   
+          done <filelist
+          rm filelist
+   
+             # MAKE CYCLE NUMBER THREE DIGITS WIDE
+          if [[ $leading_zero = true ]]
+          then
+             cyclestring=`printf "%03d" $maxcycle`
+          else
+             cyclestring=$maxcycle
+          fi
+   
+             # APPEND CYCLE NUMBER TO FILENAME
+          if (( maxcycle > 0 ))
+          then
+             if [[ "${extin[$nr_of_input_files]}" != " "  &&   "${extin[$nr_of_input_files]}" != "" ]]
+             then
+                filename=${filename}.$cyclestring.${extin[$nr_of_input_files]}
+             else
+                filename=${filename}.$cyclestring
+             fi
+          else
+             if [[ "${extin[$nr_of_input_files]}" != " "  &&   "${extin[$nr_of_input_files]}" != "" ]]
+             then
+                filename=${filename}.${extin[$nr_of_input_files]}
+             fi
+          fi
+          
+             # STORE FILENAME WITHOUT PATH BUT WITH CYCLE NUMBER,
+             # IS LATER USED FOR TRANSFERRING FILES WIHIN THE JOB (SEE END OF FILE)
+          absnamein[$nr_of_input_files]=$filename
+          if (( maxcycle > 0 ))
+          then
+             if [[ "${actionin[$nr_of_input_files]}" = di ]]
+             then
+                frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}.$cyclestring
+             else
+                frelin[$nr_of_input_files]=${run_identifier}${endin[$nr_of_input_files]}.$cyclestring
+             fi
+          else
+             if [[ "${actionin[$nr_of_input_files]}" = di ]]
+             then
+                frelin[$nr_of_input_files]=${endin[$nr_of_input_files]}
+             else
+                frelin[$nr_of_input_files]=${run_identifier}${endin[$nr_of_input_files]}
+             fi
+          fi
+
+       done
+
+    fi
+
+ done
+
+
+    # GENERATE FULL FILENAMES OF OUTPUT-FILES (WITHOUT $ OR ~),
+    # CHECK, IF OUTPUT-FILES EXIST, AND DETERMINE HIGHEST CYCLE NUMBER (IF CYCLES EXIST),
+    # OR, IN CASE THAT FILE DOES NOT EXIST, CHECK, IF IT CAN BE CREATED  
+    # THESE ACTIONS ARE NOT CARRIED OUT, IF FILES SHALL BE TRANSFERRED FROM THE REMOTE TO
+    # THE LOCAL HOST (BECAUSE THEIR IS NO DIRECT ACCESS TO THE LOCAL DIRECTORIES FROM THE
+    # REMOTE HOST)
+ (( i = 0 ))
+ while (( i < iout ))
+ do
+    (( i = i + 1 ))
+    if [[ ! ( $running_on_remote = true  &&  ( "${actionout_pre[$i]}" = tr || "${actionout_pre[$i]}" = tra || "${actionout_pre[$i]}" = trpe ) ) ]]
+    then
+       if [[ "${actionout_pre[$i]}" = tr ]]
+       then
+          actionout_pre[$i]=""
+       elif [[ "${actionout_pre[$i]}" = trpe ]]
+       then
+          actionout_pre[$i]=pe
+       elif [[ "${actionout_pre[$i]}" = tra ]]
+       then
+          actionout_pre[$i]=a
+       fi
+       (( maxcycle = 0 ))
+       eval filename=${pathout_pre[$i]}/${run_identifier}${endout_pre[$i]}
+       eval catalogname=${pathout_pre[$i]}
+       if ! ls $filename* 1>/dev/null 2>&1
+       then
+      
+             # IF OUTPUT-FILE DOES NOT EXIST CHECK, IF IT CAN BE CREATED
+          if  cat /dev/null > $filename  
+          then
+             rm  $filename
+          else
+
+                # CHECK, IF THE DIRECTORY WHERE FILE SHALL BE COPIED TO EXISTS
+                # IF IT DOES NOT EXIST, TRY TO CREATE IT
+             if [[ ! -d $catalogname ]]
+             then
+                if  mkdir -p  $catalogname
+                then
+                   printf "\n\n  *** directory:"
+                   printf "\n           $catalogname"
+                   printf "\n      was created\n"
+                else
+                   printf "\n\n  +++ OUTPUT-file:"
+                   printf "\n           $filename"
+                   printf "\n      cannot be created, because directory does not exist"
+                   printf "\n      and cannot be created either"
+                   printf "\n"
+                   locat=output  ; exit
+                fi 2>/dev/null 
+             else
+                printf "\n\n  +++ OUTPUT-file:"
+                printf "\n           $filename"
+                printf "\n      cannot be created, although directory exists"
+                printf "\n"
+                locat=output  ; exit
+             fi
+          fi 2>/dev/null
+
+       fi
+
+    fi
+ done
+
+
+    # DETERMINE THE NAME OF PALMRUN'S TEMPORARY WORKING DIRECTORY
+ if [[ $running_in_batch_mode = false ]]
+ then
+    run_id_number=$RANDOM
+    run_id=${run_identifier}.$run_id_number
+
+    tempdir=$fast_io_catalog/$run_id
+
+       # FOR COMPATIBILITY REASONS WITH OLDER VERSIONS SET JOB_ID
+    export job_id=$run_id
+
+ fi
+
+
+    # CHECK SETTINGS REQUIRED FOR BATCH JOBS
+ if [[ $create_batch_job = true  ||  $create_remote_batch_job = true ]]
+ then
+
+       # CHECK, IF JOB DIRECTIVES HAVE BEEN GIVEN IN CONFIGURATION FILE
+    if [[ $ibd = 0 ]]
+    then
+       printf "\n"
+       printf "\n  +++ no batch directives found in configuration file"
+       locat=config_file_batch_directives; (( iec = 0 )); exit 
+    fi
+
+       # CHECK IF CPUTIME IS GIVEN FOR JOB
+    done=false
+    cputime=$cpumax
+    while [[ $done = false ]]
+    do
+       if (( cputime == 0 ))
+       then
+          printf "\n  +++ cpu-time is undefined"
+          printf "\n  >>> Please type CPU-time in seconds as INTEGER:"
+          printf "\n  >>> "
+          read  cputime   1>/dev/null  2>&1
+       else
+          done=true
+       fi
+    done
+    cpumax=$cputime
+
+       # CHECK THE MEMORY DEMAND
+    done=false
+    while [[ $done = false ]]
+    do
+       if (( memory == 0 ))
+       then
+          printf "\n  +++ memory demand is undefined"
+          printf "\n  >>> Please type memory in  MByte per process  as INTEGER:"
+          printf "\n  >>> "
+          read  memory  1>/dev/null  2>&1
+       else
+          done=true
+       fi
+    done
+
+       # IN CASE OF REMOTE-JOBS CHECK, IF A USERNAME FOR THE REMOTE HOST IS GIVEN
+    if [[ $create_remote_batch_job = true  &&  -z $remote_username ]]
+    then
+       while [[ -z $remote_username ]]
+       do
+          printf "\n  +++ username on remote host with IP \"$remote_ip\" is undefined"
+          printf "\n  >>> Please type username:"
+          printf "\n  >>> "
+          read  remote_username
+       done
+    fi
+
+ else
+
+    if [[ $running_in_batch_mode = false ]]
+    then
+       cputime=10000000  # NO LIMT FOR INTERACTIVE RUNS
+       cpumax=$cputime
+    else
+       cputime=$cpumax
+    fi
+
+ fi
+
+
+    # CALCULATE HOURS/MINUTES/SECONDS, E.G. FOR BATCH-DIRECTIVES
+ (( cpu_hours  = cputime / 3600 ))
+ (( resttime = cputime - cpu_hours * 3600 ))
+ (( cpu_minutes  = resttime / 60 ))
+ (( cpu_seconds = resttime - cpu_minutes * 60 ))
+ timestring=${cpu_hours}:${cpu_minutes}:${cpu_seconds}
+
+
+    # OUTPUT OF THE PALMRUN-HEADER
+ calltime=$(date)
+ printf "\n"
+ printf "#------------------------------------------------------------------------# \n"
+ printf "| %-35s%35s | \n" "$version" "$calltime"
+ printf "| %-35s%35s | \n" "PALM code    $global_revision" " "
+ printf "|                                                                        | \n"
+ column1="called on:"; column2=$(hostname)
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+ if [[ $create_remote_batch_job = true ]]
+ then
+    column1="execution on:"; column2="$configuration_identifier (username: $remote_username)"
+ else
+    if [[ $running_on_remote = true ]]
+    then
+       column1="config. identifier:"; column2="$configuration_identifier (execute on IP: $remote_ip)"
+    else
+       column1="config. identifier:"; column2="$configuration_identifier (execute on IP: $local_ip)"
+    fi
+ fi
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+
+ column1="running in:"
+ if [[ $running_in_batch_mode = true ]]
+ then
+    column2="batch job mode"
+ else
+    if [[ $create_batch_job = true  ||  $create_remote_batch_job = true ]]
+    then
+       column2="job creation mode"
+    else
+       column2="interactive run mode"
+    fi
+ fi
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+
+ if  [[ $running_in_batch_mode = true  ||  $create_batch_job = true  ||  $create_remote_batch_job = true ]]
+ then
+    if [[ "$project_account" != "" ]]
+    then
+       column1="project account number:"
+       column2="$project_account"
+       printf "| %-25s%-45s | \n" "$column1" "$column2"
+    fi
+ fi
+
+ if [[ -n $cores ]]
+ then
+    if [[ $run_coupled_model = false ]]
+    then
+       column1="number of cores:"; column2=$cores
+    else
+       column1="number of cores:"; column2="$cores  (atmosphere: $cores_atmos, ocean: $cores_ocean)"
+    fi
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+ fi
+ if [[ -n $tasks_per_node ]]
+ then
+    column1="tasks per node:"; column2="$tasks_per_node (number of nodes: $nodes)"
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    if (( remaining_cores > 0 ))
+    then
+       column1=" "; column2="one of the nodes only filled with $remaining_cores tasks"
+       printf "| %-25s%-45s | \n" "$column1" "$column2"
+    fi
+ fi
+ if [[ $maximum_parallel_io_streams != $cores ]]
+ then
+    column1="max par io streams:"; column2="$maximum_parallel_io_streams"
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+ fi
+ if [[ $use_openmp = true ]]
+ then
+    column1="threads per task:"; column2="$threads_per_task"
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+ fi
+ if [[ $create_batch_job = true  ||  $create_remote_batch_job = true  ||  $running_in_batch_mode = true ]]
+ then
+    column1="memory demand / PE":; column2="$memory MB"
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    column1="job cpu time (h:m:s):"; column2="$timestring"
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+ fi
+ printf "|                                                                        | \n"
+ if [[ "$source_list" != "" ]]
+ then
+    if [[ "$make_options" != "" ]]
+    then
+       column1="make options:"; column2=$(echo "$make_options" | cut -c-45)
+       printf "| %-25s%-45s | \n" "$column1" "$column2"
+       line=$(echo "$make_options" | cut -c46-)
+       while [[ "$line" != "" ]]
+       do
+          column1=""
+          column2=$(echo "$line" | cut -c-45)
+          printf "| %-25s%-45s | \n" "$column1" "$column2"
+          line=$(echo "$line" | cut -c46-)
+       done
+    fi
+ fi
+
+ column1="cpp directives:"; column2=$(echo "$cpp_options" | cut -c-45)
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+ line=$(echo "$cpp_options" | cut -c46-)
+ while [[ "$line" != "" ]]
+ do
+    column1=""
+    column2=$(echo "$line" | cut -c-45)
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    line=$(echo "$line" | cut -c46-)
+ done
+
+ column1="compiler options:"; column2=$(echo "$compiler_options" | cut -c-45)
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+ line=$(echo "$compiler_options" | cut -c46-)
+ while [[ "$line" != "" ]]
+ do
+    column1=""
+    column2=$(echo "$line" | cut -c-45)
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    line=$(echo "$line" | cut -c46-)
+ done
+
+ column1="linker options:"; column2=$(echo "$linker_options" | cut -c-45)
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+ line=$(echo "$linker_options" | cut -c46-)
+ while [[ "$line" != "" ]]
+ do
+    column1=""
+    column2=$(echo "$line" | cut -c-45)
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    line=$(echo "$line" | cut -c46-)
+ done
+
+ if [[ "$login_init_cmd" != "" ]]
+ then
+    column1="login init commands:"; column2=$(echo "$login_init_cmd" | cut -c-45)
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    line=$(echo "$login_init_cmd" | cut -c46-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c-45)
+       printf "| %-25s%-45s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c46-)
+    done
+ fi
+
+ if [[ "$module_commands" != "" ]]
+ then
+    column1="module commands:"; column2=$(echo "$module_commands" | cut -c-45)
+    printf "| %-25s%-45s | \n" "$column1" "$column2"
+    line=$(echo "$module_commands" | cut -c46-)
+    while [[ "$line" != "" ]]
+    do
+       column1=""
+       column2=$(echo "$line" | cut -c-45)
+       printf "| %-25s%-45s | \n" "$column1" "$column2"
+       line=$(echo "$line" | cut -c46-)
+    done
+ fi
+ printf "|                                                                        | \n"
+ column1="run identifier:"; column2=$run_identifier
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+ column1="activation string list:"; column2=$(echo $activation_string_list)
+ printf "| %-25s%-45s | \n" "$column1" "$column2"
+
+ if [[ "$ocean_file_appendix" = true ]]
+ then
+    printf "| %-35s%-35s | \n" "suffix \"_O\" is added to local files" " "
+ fi
+
+ if [[ "$source_list" != "" ]]
+ then
+    printf "|                                                                        | \n"
+    printf "| Files to be compiled:                                                  | \n"
+    line=$source_list
+    while [[ "$line" != "" ]]
+    do
+       linestart=$(echo $line | cut -c-70)
+       printf "| %-70s | \n" "$linestart"
+       line=$(echo "$line" | cut -c71-)
+    done
+ fi
+ printf "#------------------------------------------------------------------------#"
+
+
+
+    # OUTPUT OF FILE CONNECTIONS IN CASE OF TRACEBACK
+ if [[ $do_trace = true ]]
+ then
+    (( i = 0 ))
+    while (( i < nr_of_input_files ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n >>> INPUT-file assignments:\n"
+       fi
+       printf "\n     ${localin[$i]} :  ${absnamein[$i]}"
+    done
+    (( i = 0 ))
+    while (( i < iout ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n >>> OUTPUT-file assignments:\n"
+       fi
+       printf "\n     ${localout[$i]} :  ${pathout[$i]}"
+    done
+    (( i = 0 ))
+    while (( i < iic ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n >>> INPUT-commands:\n"
+       fi
+       printf "\n     ${in_command[$i]}" 
+    done
+    (( i = 0 ))
+    while (( i < ioc ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n >>> OUTPUT-commands:\n"
+       fi
+       printf "\n     ${out_command[$i]}" 
+    done
+ fi
+
+    # QUERY FOR CONTINUE
+ if [[ $silent = false  &&  $running_in_batch_mode = false ]]
+ then
+    antwort=dummy
+    printf "\n\n"
+    printf " >>> everything o.k. (y/n) ?  "
+    while  read antwort
+    do
+       if [[ "$antwort" != y  &&  "$antwort" != Y  &&  "$antwort" != n  &&  "$antwort" != N ]]
+       then
+          printf " >>> everything o.k. (y/n) ?  "
+       else
+          break
+       fi
+    done
+    if [[ $antwort = n  ||  $antwort = N ]]
+    then
+       locat=user_abort; (( iec = 0 )); exit
+    fi
+    if [[ $create_batch_job = true  ||  $create_remote_batch_job = true ]]
+    then
+       printf "\n ***  batch-job will be created and submitted"
+    else
+       printf "\n ***  PALMRUN will now continue to execute on this machine"
+    fi
+ fi
+
+ 
+
+    # PROVIDE FILES TO EXECUTE PALM AND CREATE THE EXECUTABLE
+ if [[ $restart_run = false  &&  $running_in_batch_mode = false ]]
+ then
+
+    if [[ $create_batch_job = true  ||  $create_remote_batch_job  = true ]]
+    then
+       printf "\n\n  *** creating executable and other sources for the remote host\n"
+    else
+       printf "\n\n  *** creating executable and other sources for the local host\n"
+    fi
+
+       # FIRST CHECK, IF A MAKE DEPOSITORY EXISTS, AND IF NOT, ASK THE USER IF
+       # IT SHALL BE CREATED
+    ask_for_make_depository=false
+    if [[ $create_remote_batch_job = true ]]
+    then
+
+       line=`grep %base_directory $config_file`
+       make_depository=`echo $line | cut -d" " -s -f2`/MAKE_DEPOSITORY_${configuration_identifier}
+       echo  "[[ ! -d ${make_depository} ]]  &&  echo depository not found" | ssh  -q  $ssh_key  ${remote_username}@${remote_ip} 2>&1  | tee ${configuration_identifier}_last_make_protokoll
+
+       if [[ $(grep -c "depository not found" ${configuration_identifier}_last_make_protokoll) != 0 ]]
+       then
+          printf "\n\n  +++ make depository \"${make_depository}\""
+          printf "\n      on remote host not found!"
+          ask_for_make_depository=true
+       fi
+       rm ${configuration_identifier}_last_make_protokoll
+
+    else
+
+          # CHECK FOR MAKE_DEPOSITORY ON THE LOCAL HOST
+       make_depository=${base_directory}/MAKE_DEPOSITORY_${configuration_identifier}
+       if [[ ! -d ${make_depository} ]]
+       then
+          printf "\n\n  +++ make depository \"${make_depository}\""
+          printf "\n      on local host not found!"
+          ask_for_make_depository=true
+       fi
+
+    fi
+
+    if [[ $ask_for_make_depository = true ]]
+    then
+
+       antwort=dummy
+       printf "\n\n"
+       printf "  >>> Create a new one (y/n) ?  "
+       while  read antwort
+       do
+          if [[ "$antwort" != y  &&  "$antwort" != Y  &&  "$antwort" != n  &&  "$antwort" != N ]]
+          then
+             printf "  >>> Create a new one (y/n) ?  "
+          else
+             break
+          fi
+       done
+       if [[ $antwort = n  ||  $antwort = N ]]
+       then
+          locat=user_abort; (( iec = 0 )); exit
+       fi
+
+       if [[ $do_trace = true ]]
+       then
+          palmbuild  -c $configuration_identifier
+       else
+          palmbuild  -v  -c $configuration_identifier
+       fi
+
+       if [[ ${PIPESTATUS[0]} != 0 ]]
+       then
+   
+              # ABORT IN CASE OF COMPILATION PROBLEMS
+          printf "\n  +++ error while compiling for the MAKE_DEPOSITORY"
+          locat=make_depository
+          exit
+       else
+          echo "  *** now continue with creating executable and other sources"
+       fi
+
+    fi
+
+       # NOW CREATE THE SOURCES_FOR_RUN FOLDER
+    palmbuild  -v  $use_existing_sources_folder  -c $configuration_identifier  -r $run_identifier
+
+    if [[ ${PIPESTATUS[0]} != 0 ]]
+    then
+
+           # ABORT IN CASE OF COMPILATION PROBLEMS
+       printf "\n  +++ error while creating executable and/or other sources"
+       locat=execution
+       rm -rf  ${base_directory}/${sources_for_run_catalog}
+       exit
+
+    else
+
+       printf "  *** executable and other sources created\n"
+       rm -rf  ${base_directory}/${sources_for_run_catalog}
+
+    fi
+
+ fi
+
+
+    # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH TRANSFER-ATTRIBUT
+    # WILL BE COPIED TO THE REMOTE HOST
+ if [[ $create_remote_batch_job = true ]]
+ then
+    (( i = 0 ))
+    while (( i < nr_of_input_files ))
+    do
+       (( i = i + 1 ))
+       if [[ "${actionin[$i]}" = tr ]]
+       then
+          eval inputfile=${pathin[$i]}/${frelin[$i]}
+          scp  -q $ssh_key  $PORTOPT  $inputfile  ${remote_username}@${remote_ip}:${fast_io_catalog}/${sources_for_run_catalog}/${frelin[$i]}
+       fi
+    done
+    if (( i > 0 ))
+    then
+       printf "\n\n  *** input files have been copied to the remote host\n"
+    fi
+ fi
+ 
+
+    # NOW PERFORM THOSE ACTIONS REQUIRED TO EXECUTE THE PROGRAM (PALM) ON THIS MACHINE
+    # (COMPILING/LINKING, EXECUTING, COPYING I/O FILES)
+ if [[ $create_batch_job = false  &&  $create_remote_batch_job = false ]]
+ then
+
+       # CHANGE TO THE TEMPORARY WORKING DIRECTORY
+    if [[ $running_in_batch_mode = false ]]
+    then
+          # CREATE THE DIRECTORY AND COPY FILES FROM SOURCES_FOR_RUN_... TO THAT
+          # FOLDER
+       mkdir -p  $tempdir
+       chmod  go+rx  $tempdir
+       cd  $tempdir
+       cp  ${fast_io_catalog}/${sources_for_run_catalog}/{*,.[!.]*}  $tempdir
+       printf "\n  *** changed to temporary directory: $tempdir"
+
+    else
+
+          # IN BATCH MODE PALMRUN IS CALLED FROM TEMPDIR
+       printf "\n  *** running in temporary directory: $tempdir"
+
+    fi
+
+
+       # PROVIDE THE INPUT FILES
+       # LOOP OVER ALL ACTIVATED FILES (LISTED IN THE CONFIGURATION FILE)
+    optional_files_missing=false
+    (( i = 0 ))
+    while (( i < nr_of_input_files ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n  *** providing INPUT-files:\n$dashes"
+       fi
+
+
+          # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST
+       if [[ "${actionin[$i]}" = unavailable ]]
+       then
+          optional_files_missing=true
+          continue
+       fi
+
+          # CHECK FOR SINGLE FILE (SERIAL RUN) OR DIRECTORY (ONE FILE PER CORE FOR PARELLEL EXECUTION)
+       files_for_cores=false; filetype=file
+       if [[ "${actionin[$i]}" = pe  &&  -n $cores ]]
+       then
+          files_for_cores=true; filetype=files
+          actionin[$i]=""
+       elif [[ "${actionin[$i]}" = pe  &&  ! -n $cores ]]
+       then
+          actionin[$i]=""
+       elif [[ "${actionin[$i]}" = lnpe  &&  -n $cores ]]
+       then
+          files_for_cores=true; filetype=files
+          actionin[$i]="ln"
+       elif [[ "${actionin[$i]}" = lnpe  &&  ! -n $cores ]]
+       then
+          actionin[$i]="ln"
+       fi
+
+       if [[ $files_for_cores = true ]]
+       then
+          printf "\n  >>> INPUT: ${absnamein[$i]}/....  to  ${localin[$i]}"
+       else
+          printf "\n  >>> INPUT: ${absnamein[$i]}  to  ${localin[$i]}"
+       fi
+
+          # INPUT-FILES TO BE LINKED
+       if [[ "${actionin[$i]}" = ln ]]
+       then
+
+          printf "\n      $filetype will be linked"
+          if [[ $files_for_cores = false ]]
+          then
+             if [[ -f "${absnamein[$i]}" ]]
+             then
+                ln  ${absnamein[$i]}  ${localin[$i]}
+                got_tmp[$i]=true
+             fi
+          else
+             if [[ -d "${absnamein[$i]}" ]]
+             then
+                mkdir -p ${localin[$i]}
+                cd ${absnamein[$i]}
+                for file in $(ls *)
+                do
+                   ln $file $tempdir/${localin[$i]}
+                done >|/dev/null 2>&1
+                cd $tempdir
+             fi
+
+                # IF "ln -f" HAS FAILED DO A NORMAL COPY "cp -r"
+             if [[ ! -f "${localin[$i]}/_000000" ]]
+             then
+                printf "\n  --- WARNING: ln failed, using cp instead (might be time consuming...)"
+                cp -r  ${absnamein[$i]}/*  ${localin[$i]}
+             fi
+
+             got_tmp[$i]=true
+          fi
+       fi
+
+          # FILE IS STORED IN THE RESPECTIVE DIRECTORY GIVEN IN THE CONFIGURATION FILE
+       if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "tr"  ||  "${actionin[$i]}" = "npe" ]]
+       then
+
+          if [[ "${actionin[$i]}" = "npe"  &&  -n $cores ]]
+          then
+
+                # FILE COPIES ARE PROVIDED FOR ALL CORES
+                # EACH FILE GETS A UNIQUE FILENAME WITH A FOUR DIGIT NUMBER
+             printf "\n      file will be provided for $cores processors"
+             mkdir -p ${localin[$i]}
+             ival=$cores
+             (( ii = 0 ))
+             while (( ii <= ival-1 ))
+             do
+                if (( ii < 10 ))
+                then
+                   cp  ${absnamein[$i]}  ${localin[$i]}/_000$ii
+                elif (( ii < 100 ))
+                then
+                   cp  ${absnamein[$i]}  ${localin[$i]}/_00$ii
+                elif (( ii < 1000 ))
+                then
+                   cp  ${absnamein[$i]}  ${localin[$i]}/_0$ii
+                else
+                   cp  ${absnamein[$i]}  ${localin[$i]}/_$ii
+                fi
+                (( ii = ii + 1 ))
+             done
+
+          else
+
+             if [[ $files_for_cores = true ]]
+             then
+
+                   # PROVIDE FILES FOR EACH CORE
+                   # FIRST CREATE THE LOCAL DIRECTORY, THEN COPY FILES
+                   # FROM THE PERMANENT DIRECTORY BY LINKING THEM TO THE LOCAL ONE
+                printf "\n      providing $cores files for the respective cores"
+                mkdir -p ${localin[$i]}
+	              	if [[ $link_local_input = true ]]
+		              then
+		                 printf "      files will be linked\n"
+		                 cd ${absnamein[$i]}
+		                 for file in $(ls *)
+		                 do
+		                    ln -f $file  ${localin[$i]}
+		                 done
+		                 cd $tempdir
+		              fi
+
+                   # IF "ln -f" FAILED OR IF "$link_local_input = false" DO A NORMAL "cp -r"
+		              if [[ ! -f "${localin[$i]}/_000000" ]]
+		              then
+		                 if [[ $link_local_input = true ]]
+		                	then
+	                   		printf "\n  --- WARNING: ln failed, using cp instead (might be time consuming...)"
+		                 fi
+		                 cp -r  ${absnamein[$i]}/*  ${localin[$i]}
+		              fi
+
+             else
+
+                   # PROVIDE FILE FOR RUNS ON A SINGLE CORE
+              		if [[ $link_local_input = true ]]
+	              	then
+		                 printf "      file will be linked\n"
+		                 ln -f  ${absnamein[$i]}  ${localin[$i]}
+	              	fi
+	                 	# If "ln -f" fails or if "$link_local_input = false" do a normal "cp"
+	              	if [[ ! -f "${localin[$i]}" ]]
+                then
+		                 if [[ $link_local_input = true ]]
+	                  then
+                      printf "\n  --- WARNING: ln failed, using cp instead (might be time consuming...)"
+		                 fi
+                   if [[ $running_on_remote = true  &&  "${actionin[$i]}" = tr ]]
+                   then
+                      mv  ${absnamein[$i]}  ${localin[$i]}
+                   else
+   		                 cp  ${absnamein[$i]}  ${localin[$i]}
+                   fi
+                fi
+             fi
+          fi
+       fi
+
+    done
+    if (( i != 0 ))
+    then
+       if [[ $optional_files_missing = true ]]
+       then
+          printf "\n  *** INFORMATIVE: some optional INPUT-files are not present"
+       fi
+       printf "\n$dashes\n  *** all INPUT-files provided \n"
+    fi
+
+
+       # EXECUTE INPUT-COMMANDS GIVEN IN THE CONFIGURATION FILE
+    (( i = 0 ))
+    while (( i < iic ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n  *** execution of INPUT-commands:\n$dashes"
+       fi
+       printf "\n  >>> ${in_command[$i]}"
+       eval  ${in_command[$i]}
+       if (( i == iic ))
+       then
+          printf "\n$dashes\n"
+       fi
+    done
+
+
+    # CHECK IF THE PROGRESS BAR NEEDS TO BE DISABLED
+    if [[ $running_in_batch_mode = true  ||  $running_in_test_mode = true ]]
+    then
+       progress_bar_disabled=true
+    else
+       progress_bar_disabled=false
+    fi
+
+
+       # CREATE THE NAMELIST-FILE WITH VALUES OF ENVIRONMENT-VARIABLES REQUIRED BY PALM
+       # (FILE ENVPAR WILL BE READ BY PALM)
+    cat  >  ENVPAR  <<  EOF
+ &envpar  run_identifier = '$run_identifier', host = '$configuration_identifier',
+          write_svf = .${write_svf}., write_binary = .${write_binary}., 
+          read_svf = .${read_svf}., tasks_per_node = $tasks_per_node,
+          maximum_parallel_io_streams = $maximum_parallel_io_streams,
+          maximum_cpu_time_allowed = ${cpumax}.,
+          revision = '$global_revision',
+          progress_bar_disabled = .${progress_bar_disabled}. /
+
+EOF
+
+
+       # STARTING THE EXECUTABLE
+    printf "\n\n  *** execution starts in directory\n      \"`pwd`\"\n$dashes\n"
+    PATH=$PATH:$tempdir
+
+
+       # REPLACE PARAMETERS IN THE EXECUTION COMMAND WITH REAL VALUES
+    line=`echo  "${execute_command}" | sed 's/{{/$/g' | sed 's/}}//g'`
+    line2=`echo  "${execute_command}" | sed 's/{{mpi_tasks}}/1/g' | sed 's/{{tasks_per_node}}/1/g' | sed 's/palm/combine_plot_fields.x/g'`
+    eval line=\"$line\"
+    execute_command="$line"
+
+
+       # EXECUTION COMMAND FOR COMBINE_PLOT_FIELDS
+    if [[ "$execute_command_for_combine" = "" ]]
+    then
+       eval line2=\"$line2\"
+       execute_command_for_combine="$line2"
+    fi
+    
+
+
+       # PROVIDE A HOSTFILE, IF REQUIRED
+    if [[ "$hostfile" != "" ]]
+    then
+
+       if [[ $hostfile = auto ]]
+       then
+             # CREATE A NEW HOSTFILE
+          (( ii = 1 ))
+          while (( ii <= cores / threads_per_task ))
+          do
+             echo  $(hostname)  >>  hostfile
+             (( ii = ii + 1 ))
+          done
+          if (( cores / threads_per_task == 0 ))
+          then
+             echo  $(hostname)  >>  hostfile
+          fi
+       
+       else
+          cp  $hostfile  hostfile
+       fi
+       eval line=\"`head -n $ii  hostfile`\"
+       printf "\n  *** running on: $line"
+    fi
+
+
+
+       # SET THE NUMBER OF OPENMP-THREADS
+    if [[ $use_openmp = true ]]
+    then
+       export OMP_NUM_THREADS=$threads_per_task
+       printf "\n  *** number of OpenMP threads per MPI-task: $OMP_NUM_THREADS"
+    else
+       export OMP_NUM_THREADS=1
+    fi
+
+
+       # PROVIDE DATA FOR ATMOSPHERE OCEAN COUPLING
+    if [[ $run_coupled_model = false ]]
+    then
+       if [[ "$ocean_file_appendix" = true ]]
+       then
+          echo "precursor_ocean"  >  coupling_steering
+       else
+          echo "precursor_atmos"  >  coupling_steering
+      fi
+    else
+       (( iia = $cores_atmos / $threads_per_task ))
+       (( iio = $cores_ocean / $threads_per_task ))
+       printf "\n      coupled run ($iia atmosphere, $iio ocean)"
+       printf "\n\n"
+       echo "coupled_run $iia $iio"  >  coupling_steering
+    fi
+
+    printf "\n  *** execute command:"
+    printf "\n      \"$execute_command\" \n\n"
+
+
+    if [[ $progress_bar_disabled = true ]]
+    then
+       $execute_command  <  coupling_steering  &> >(grep -v --line-buffered -e '^STOP 1$' -e '^1$' &> >(tee STDOUT) )
+       exit_code=${PIPESTATUS[0]}
+    else
+       $execute_command  <  coupling_steering  &> >(tee STDOUT)
+       exit_code=${PIPESTATUS[0]}
+    fi
+
+    if [[ ${exit_code} != 0 ]]
+    then
+
+           # ABORT IN CASE OF RUNTIME ERRORS
+       printf "\n  +++ runtime error occured"
+       locat=execution
+       exit
+
+    else
+
+       printf "\n$dashes\n  *** execution finished \n"
+
+    fi
+
+
+       # CALL OF combine_plot_fields IN ORDER TO MERGE SINGLE FILES WRITTEN
+       # BY EACH CORE INTO ONE FILE
+   if [[ ! -f combine_plot_fields.x ]]
+   then
+
+      printf "\n\n\n  +++ WARNING: no combine_plot_fields found"
+      printf "\n      2d- and/or 3d-data may be incomplete!"
+      printf "\n      Your previous palmbuild may have failed. Please check.\n"
+
+   elif [[ "$combine_plot_fields" == true ]]
+   then
+
+      printf "\n\n\n *** post-processing: now executing \"$execute_command_for_combine\" ..."
+      $execute_command_for_combine
+
+   else
+
+         # TEMPORARY SOLUTION TO SKIP combine_plot_fields. THIS IS REQUIRED IN CASE OF HUGE AMOUNT OF
+         # DATA OUTPUT
+      printf "\n\n\n *** post-processing: skipping combine_plot_fields (-Z option set) ..."
+   fi
+
+
+
+       # EXECUTE OUTPUT-COMMANDS GIVEN IN THE CONFIGURATION FILE
+    (( i = 0 ))
+    while (( i < ioc ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n  *** execution of OUTPUT-commands:\n$dashes"
+       fi
+
+          # REPLACE PARAMETERS IN THE OUTPUT COMMAND WITH REAL VALUES
+       out_command[$i]=`echo  "${out_command[$i]}" | sed 's/{{/$/g' | sed 's/}}//g'`
+
+       printf "\n  >>> ${out_command[$i]}"
+       eval  ${out_command[$i]}
+       if (( i == ioc ))
+       then
+          printf "\n$dashes\n"
+       fi
+    done
+
+
+       # IN A FIRST PASS, ADD ADDITIONAL OUTPUT FILE CONNECTIONS IN CASE OF
+       # WILDCARDS
+    (( i = 0 ))
+    (( nr_of_output_files = 0 ))
+
+    while (( i < iout ))
+    do
+
+       (( i = i + 1 ))
+
+          # FIRST CHECK FOR MULTIPLE NAMES WITH THE SAME LOCAL NAME AND
+          # CREATE A LIST FOR THE DETECTED ENDINGS
+       if [[ "${multout[$i]}" = true ]]
+       then
+             # DETERMINE THE EXISTING EXTENSIONS FROM THE LIST OF FILES
+          ls -1 -d ${localout_pre[$i]}    >   filelist  2>/dev/null
+          ls -1 -d ${localout_pre[$i]}_*  >>  filelist  2>/dev/null
+
+          endings="DEFAULT"
+          while  read line
+          do
+                 # remove the local name from the beginning
+              localnamestring="${localout_pre[$i]}"
+              length_localname=${#localnamestring}
+              ending=${line:${length_localname}}
+
+              if [[ "$ending" != "" ]]
+              then
+                 endings="$endings $ending"
+              fi
+ 
+          done <filelist
+
+          rm filelist
+
+       else
+
+             # SINGLE NAME
+          endings=DEFAULT
+
+       fi
+
+          # FOR EACH BASENAME ENDING CREATE AN ENTRY IN THE FINAL OUTPUT FILE LIST
+       for  ending  in  $endings
+       do
+
+             # DEFAULT MEANS THAT THE ENDING GIVEN IN .iofiles SHALL BE USED
+          if [[ $ending = DEFAULT ]]
+          then
+             ending=""
+          fi
+
+             # NEW ENTRY (ENDING IS ALSO ADDED TO LOCAL FILENAME READ BY PALM!)
+          (( nr_of_output_files = nr_of_output_files + 1 ))
+          localout[$nr_of_output_files]="${localout_pre[$i]}"$ending
+          transout[$nr_of_output_files]="${transout_pre[$i]}"
+          actionout[$nr_of_output_files]="${actionout_pre[$i]}"
+          pathout[$nr_of_output_files]="${pathout_pre[$i]}"
+          endout[$nr_of_output_files]="${endout_pre[$i]}"$ending
+          extout[$nr_of_output_files]="${extout_pre[$i]}"
+          warnout[$nr_of_output_files]="${warnout_pre[$i]}"
+
+       done
+
+    done
+
+
+
+
+       # COPY LOCAL OUTPUT-FILES TO THEIR PERMANENT DESTINATIONS
+    (( i = 0 ))
+    while (( i < nr_of_output_files ))
+    do
+       (( i = i + 1 ))
+       if (( i == 1 ))
+       then
+          printf "\n\n  *** saving OUTPUT-files:"
+
+             # GET RUN NUMBER ASSIGNED BY PALM
+          if [[ -f RUN_NUMBER ]]
+          then
+              read  run_number  <  RUN_NUMBER
+              printf "\n  *** PALM generated run_number = "$run_number" will be used as unified cycle number for all output files"
+              usecycle_option="-U $run_number"
+          else
+              run_number=0
+              usecycle_option=""
+          fi
+          if [[ $running_on_remote = true  &&  "$remote_loginnode" != "" ]]
+          then
+             printf "\n  *** in case of SCP transfers to local host"
+             printf "\n      they will be done via remote login-node \"$remote_loginnode\" "
+          fi
+          printf "\n$dashes"
+       fi
+
+       if [[ ! ( $running_on_remote = true  &&  ( "${actionout[$i]}" = tr || "${actionout[$i]}" = tra || "${actionout[$i]}" = trpe ) ) ]]
+       then
+
+          eval filename=${pathout[$i]}/${run_identifier}${endout[$i]}
+
+             # DETERMINE THE CYCLE NUMBER
+          ls -1 -d $filename    >   filelist  2>/dev/null
+          ls -1 -d $filename.*  >>  filelist  2>/dev/null
+          while  read line
+          do
+   
+                # filename without path (i.e. after the last "/")
+             basefilename=$(basename ${line})
+   
+                # check if there is an extension
+             extension=${basefilename##*.}
+             if [[ "$extension" = "${extout[$i]}" ]]
+             then
+                basefilename=${basefilename%.*}
+             fi
+   
+                # check for an existing cycle number
+             cycle=${basefilename##*.}
+             if [[ $cycle =~ ^-?[0-9]+$ ]]
+             then
+                   # NUMBERS WITH LEADING ZEROS ARE INTERPRETED AS OCTAL NUMBERS
+                   # 10# EXPLICITLY SPECIFIES THE NUMBER BASE AS 10
+                (( icycle = $((10#$cycle)) + 1 ))
+             else
+                (( icycle = 1 ))
+             fi
+   
+             if (( icycle > maxcycle ))
+             then
+                (( maxcycle = icycle ))
+             fi
+   
+          done <filelist
+          rm filelist
+
+   
+             # SET THE CYCLE NUMBER
+             # IN CASE OF FILE-APPEND, IT MUST BE THE HIGHEST EXISTING CYCLE NUMBER
+          if [[ "${actionout[$i]}" = a ]]
+          then
+             (( maxcycle = maxcycle - 1 ))
+          fi
+          
+          (( cycnum[$i] = maxcycle ))
+          pathout[$i]=$filename
+
+
+             # ADD CYCLE NUMBER TO FILENAME
+             # IN APPEND MODE, FILES KEEP THEIR CURRENT CYCLE NUMBER
+          if [[ "${actionout[$i]}" != "a" ]]
+          then
+                # SET RUN NUMBER AS CYCLE NUMBER, IF THERE IS NOT A CONFLICT
+                # WITH AN EXISTING CYCLE NUMBER
+             if (( run_number >= cycnum[$i] ))
+             then
+                (( cycnum[$i] = run_number ))
+             else
+                if (( run_number > 0 ))
+                then
+                   printf "\n  --- INFORMATIVE: The following file cannot get a unified cycle number"
+                fi
+             fi
+          fi
+          if (( cycnum[$i] > 0 ))
+          then
+             cyclestring=`printf "%03d" ${cycnum[$i]}`
+             pathout[$i]=${pathout[$i]}.$cyclestring
+          fi
+       fi           
+
+          # CHECK FOR SINGLE FILE (SERIAL RUN) OR DIRECTORY (ONE FILE PER CORE FOR PARELLEL EXECUTION)
+       files_for_cores=false; filetype=file
+       link_local_output=false
+       if [[ "${actionout[$i]}" = pe  &&  -n $cores ]]
+       then
+          files_for_cores=true; filetype=directory
+          actionout[$i]=""
+       elif [[ "${actionout[$i]}" = pe  &&  ! -n $cores ]]
+       then
+          actionout[$i]=""
+       elif [[ "${actionout[$i]}" = lnpe  &&  -n $cores ]]
+       then
+          files_for_cores=true; filetype=directory
+          link_local_output=true
+          actionout[$i]=""
+       elif [[ "${actionout[$i]}" = lnpe  &&  ! -n $cores ]]
+       then
+          link_local_output
+          actionout[$i]=""
+       elif [[ "${actionout[$i]}" = trpe  &&  -n $cores ]]
+       then
+          files_for_cores=true; filetype=directory
+          actionout[$i]="tr"
+       elif [[ "${actionout[$i]}" = trpe  &&  ! -n $cores ]]
+       then
+          actionout[$i]="tr"
+       fi
+
+       if [[ ! -f ${localout[$i]}  &&  $files_for_cores = false ]]
+       then
+          if [[ ${warnout[$i]} = true ]]
+          then
+             printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}  does not exist\n"
+          fi
+       elif [[ ! -d ${localout[$i]}  &&  $files_for_cores = true ]]
+       then
+          if [[ ${warnout[$i]} = true ]]
+          then
+             printf "\n  +++ temporary OUTPUT-file  ${localout[$i]}/....  does not exist\n"
+          fi
+       else
+
+
+             # COPY VIA SCP TO LOCAL HOST (ALWAYS IN BINARY MODE USING batch_scp option -m)
+             # IF TARGET DIRECTORY DOES NOT EXISTS, TRY TO CREATE IT
+          if [[ "${actionout[$i]}" = tr  ||  "${actionout[$i]}" = tra ]]
+          then
+             if [[ $running_on_remote = true ]]
+             then
+
+                   # SET OPTIONS FOR TRANSFER
+                if [[ "${actionout[$i]}" = tr ]]
+                then
+                   if [[ $files_for_cores = false ]]
+                   then
+                      catalog_option=""
+                      catalog_string=""
+                   else
+                      catalog_option="-c"
+                      catalog_string="/"
+                   fi
+                   append_option=""
+                   append_string=""
+                else
+                   append_option="-A"
+                   append_string="append"
+                fi
+
+                transfer_failed=false
+                printf "\n  >>> OUTPUT: ${localout[$i]}$catalog_string  $append_string by SCP to"
+                printf "\n              ${pathout[$i]}/${configuration_identifier}_${run_identifier}${endout[$i]}$catalog_string\n"
+
+                   # TRANSFER VIA SCP
+                if [[ "$remote_loginnode" != "" ]]
+                then
+                   echo "cd $tempdir; ${fast_io_catalog}/${sources_for_run_catalog}/batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} \"${pathout[$i]}\" ${configuration_identifier}_${run_identifier}${endout[$i]}  ${extout[$i]}"  |  ssh -q $remote_username@$remote_loginnode
+                else
+                   batch_scp $PORTOPT $catalog_option $append_option -b -m $usecycle_option -u $local_username $return_address  ${localout[$i]} "${pathout[$i]}" ${configuration_identifier}_${run_identifier}${endout[$i]}  ${extout[$i]}
+                fi
+                [[ ${PIPESTATUS[0]} != 0 ]]  &&  transfer_failed=true
+
+
+                   # IF TRANSFER FAILED, CREATE BACKUP COPY ON THIS MACHINE
+                if [[ $transfer_failed = true ]]
+                then
+                   printf "  +++ transfer failed. Trying to save a copy on this host under:\n"
+                   printf "      ${pathout[$i]}/${configuration_identifier}_${run_identifier}${endout[$i]}_$run_id_number\n"
+
+                      # FIRST CHECK, IF DIRECTORY EXISTS, AND CREATE IT, IF NECESSARY
+                   eval  local_catalog=${pathout[$i]}
+                   if [[ ! -d $local_catalog ]]
+                   then
+                      printf "  *** local directory does not exist. Trying to create:\n"
+                      printf "      $local_catalog \n"
+                      mkdir -p  $local_catalog
+                   fi
+                   eval  cp  ${localout[$i]}  ${pathout[$i]}/${configuration_identifier}_${run_identifier}${endout[$i]}_$run_id_number
+                   transfer_problems=true
+                fi
+
+             else
+
+                   # UNSET actionout. DUE TO THIS SETTING, FILE WILL LATER JUST
+                   # BE COPIED OR APPENDED ON THIS MACHINE
+                if [[ "${actionout[$i]}" = tr ]]
+                then
+                   actionout[$i]=""
+                else
+                   actionout[$i]="a"
+                fi
+             fi
+          fi
+
+
+             # APPEND ON THIS MACHINE
+          if [[ "${actionout[$i]}" = "a" ]]
+          then
+             if [[ "${extout[$i]}" != " "  &&  "${extout[$i]}" != "" ]]
+             then
+                printf "\n  >>> OUTPUT: ${localout[$i]}  append to"
+                printf "\n              ${pathout[$i]}.${extout[$i]}\n"
+                cat  ${localout[$i]}  >>  ${pathout[$i]}.${extout[$i]}
+             else
+                printf "\n  >>> OUTPUT: ${localout[$i]}  append to"
+                printf "\n              ${pathout[$i]}\n"
+                cat  ${localout[$i]}  >>  ${pathout[$i]}
+             fi
+          fi
+
+             # COPY ON THIS MACHINE
+             # COPY HAS TO BE USED, BECAUSE MOVE DOES NOT WORK IF FILE-ORIGIN AND TARGET ARE
+             # ON DIFFERENT FILE-SYSTEMS
+          if [[ "${actionout[$i]}" = ""  &&  $files_for_cores = false ]]
+          then
+
+                # COPY IN CASE OF RUNS ON SINGLE CORES
+             if [[ "${extout[$i]}" != " "  &&  "${extout[$i]}" != "" ]]
+             then
+                printf "\n  >>> OUTPUT: ${localout[$i]}  to"
+                printf "\n              ${pathout[$i]}.${extout[$i]}\n"
+		              if [[ $link_local_output = true ]]
+		              then
+		                 printf "      file will be linked\n"
+		                 ln -f  ${localout[$i]}  ${pathout[$i]}.${extout[$i]}
+		              fi
+		                 # If "ln -f" fails of if "$link_local_output = false" do a normal "cp"
+		              if [[ ! -f "${pathout[$i]}.${extout[$i]}" ]]
+                then
+		                 if [[ $link_local_output = true ]]
+	                  then
+                      printf "  --- WARNING: ln failed, using cp instead (might be time consuming...)\n"
+		                 fi
+		                 cp  ${localout[$i]}  ${pathout[$i]}.${extout[$i]}
+		              else
+                   printf "+++ no copy because file ${pathout[$i]}.${extout[$i]} exists\n"
+                fi
+             else
+                printf "\n  >>> OUTPUT: ${localout[$i]}  to"
+                printf "\n              ${pathout[$i]}\n"
+		              if [[ $link_local_output = true ]]
+		              then
+		                 printf "      file will be linked\n"
+		                 ln -f  ${localout[$i]}  ${pathout[$i]}
+		              fi
+		                 # If "ln -f" fails of if "$link_local_output = false" do a normal "cp"
+	              	if [[ ! -f "${pathout[$i]}" ]]
+                then
+		                 if [[ $link_local_output = true ]]
+	                  then
+                      printf "  --- WARNING: ln failed, using cp instead (might be time consuming...)\n"
+		                 fi
+		                 cp  ${localout[$i]}  ${pathout[$i]}
+		              else
+		                 printf "+++ no copy because file ${pathout[$i]} exists\n"
+                fi
+             fi
+
+          elif [[ "${actionout[$i]}" = ""  &&  $files_for_cores = true ]]
+          then
+
+                # FILES FROM THE DIFFERENT CORES ARE MOVED WITH ln-COMMAND TO THE PERMANENT DIRECTORY
+                # AS A FIRST STEP, THE PERMANENT DIRECTORY IS CREATED
+             printf "\n  >>> OUTPUT: ${localout[$i]}/_....  to"
+             printf "\n              ${pathout[$i]}\n"
+	            if [[ $link_local_output = true ]]
+	            then
+		              printf "      files will be linked\n"
+		              mkdir -p ${pathout[$i]}
+		              cd ${localout[$i]}
+		              for file in $(ls *)
+		              do
+		                 ln -f $file  ${pathout[$i]}
+		              done >|/dev/null 2>&1
+		              cd $tempdir
+	            fi
+
+                # IF "ln -f" HAS FAILED OR IF "$link_local_output = false" DO A NORMAL COPY "cp -r"
+	            if [[ ! -f "${pathout[$i]}/_000000" ]]
+             then
+		              if [[ $link_local_output = true ]]
+		              then
+                   printf "  --- WARNING: ln failed, using cp instead (might be time consuming...)\n"
+		              fi
+		              [[ ! -d "${pathout[$i]}" ]]  &&  mkdir  ${pathout[$i]}
+		              cp -r  ${localout[$i]}/*  ${pathout[$i]}
+       	     fi
+
+          fi
+       fi
+    done
+
+    if (( i != 0 ))
+    then
+       if [[ $transfer_problems = true ]]
+       then
+          printf "\n$dashes\n  *** OUTPUT-files saved"
+          printf "\n  +++ WARNING: some data transfers failed! \n"
+       else
+          printf "\n$dashes\n  *** all OUTPUT-files saved \n"
+       fi
+    fi
+
+
+       # IF REQUIRED, START A RESTART-JOB
+       # FILE CONTINUE_RUN MUST HAVE BEEN CREATED BY THE EXECUTABLE (PALM)
+    if [[ -f CONTINUE_RUN ]]
+    then
+
+          # ADD RESTART-OPTIONS TO THE PALMRUN-CALL (IF THEY ARE NOT USED ALREADY):
+          # -C TELLS PALMRUN THAT IT IS A RESTART-RUN
+          # -v SILENT MODE WITHOUT INTERACTIVE QUERIES
+          # -b START A BATCH JOB
+       [[ $(echo $prc | grep -c "\-C") = 0 ]]  &&  prc="$prc -C"
+       [[ $(echo $prc | grep -c "\-v") = 0 ]]  &&  prc="$prc -v"
+       [[ $(echo $prc | grep -c "\-b") = 0 ]]  &&  prc="$prc -b"
+
+          # REPLACE SVFOUT IN THE ACTIVATION STRINGS (GIVEN WITH OPTION -a)
+          # SO THAT RESTARTS USE SVF DATA CREATED BY THE INITIAL RUN
+       if [[ $(echo $prc | grep -c "svfout") != 0 ]]
+       then
+          prc=`echo $prc | sed 's/svfout/svfin/g'`
+       fi
+
+          # REPLACE THE HASH IN THE ACTIVATION STRINGS (GIVEN WITH OPTION -a)
+          # SO THAT RESTARTS ACCESS DIFFERENT FILES THAN THE INITIAL RUN
+       if [[ $(echo $prc | grep -c "#") != 0 ]]
+       then
+          prc=`echo $prc | sed 's/#/r/g'`
+       fi
+
+
+          # START THE RESTART-JOB
+       printf "\n\n  *** initiating restart-run on \"$local_ip\" using command:\n"
+       echo "      $prc"
+       printf "\n$dashes\n"
+       if [[ $running_on_remote = true ]]
+       then
+
+          echo "*** ssh will be used to initiate restart-runs!"
+          echo "    return_address=\"$return_address\" "
+          echo "    return_username=\"$local_username\" "
+
+          if [[ "$remote_loginnode" != "" ]]
+          then
+             echo "echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" |  ssh -q $SSH_PORTOPT  $local_username@$return_address  " |  ssh -q $remote_username@$remote_loginnode  |  tee palmrun_restart.log
+          else
+             echo \" PATH=\\\$PATH:$LOCAL_PALMRUN_PATH; cd $LOCAL_PWD; $prc\" |  ssh -q $SSH_PORTOPT  $local_username@$return_address  |  tee palmrun_restart.log
+          fi
+
+             # WAIT TO ALLOW THE RESTART-JOB TO BE QUEUED, BEFORE THE CURRENT JOB IS FINISHED
+          sleep 30
+
+       else
+
+             # START THE RESTART JOB ON THE LOCAL HOST
+          eval  $prc  |  tee palmrun_restart.log              # THE ' MUST BE EVALUATED
+          cd -  > /dev/null
+
+       fi
+
+          # CHECK, IF RESTART JOB HAS BEEN STARTED
+       if [[ $( grep -c "+++ palmrun killed"  palmrun_restart.log ) != 0 ]]
+       then
+          printf "\n$dashes\n  +++ creating restart run failed \n"
+          locat=create_restart
+          rm  palmrun_restart.log
+          exit
+       else
+          printf "\n$dashes\n  *** restart run initiated \n"
+          rm  palmrun_restart.log
+       fi
+
+
+          # DELETE INPUT-(RESTART)FILES, WHICH HAVE BEEN FETCHED FROM THE TEMPORARY DATA
+          # DIRECTORY, BACAUSE THEY ARE NOT REQUIRED BY THE RESTART-JOB.
+          # THIS IS DONE IN ORDER TO AVOID EXCEEDING DISC QUOTAS OR DISC SPACE (RESTART-FILES
+          # MAY BE VERY HUGE)
+       (( i = 0 ))
+       while (( i < nr_of_input_files ))
+       do
+          (( i = i + 1 ))
+          if [[ "${got_tmp[$i]}" = true   &&  $keep_data_from_previous_run = false ]]
+          then
+             rm -r  ${absnamein[$i]}
+          fi
+       done
+
+    fi
+
+
+       # ALL ACTIONS FINISHED, TEMPORARY WORKING-DIRECTORY CAN BE DELETED
+    cd  $HOME
+    [[ $delete_temporary_catalog = true ]]  &&  rm -rf $tempdir
+
+
+ else
+
+
+       # PREPARING ACTIONS,
+       # IF A BATCH-JOB IS TO BE GENERATED AND TO BE STARTED ON A LOCAL OR REMOTE-MACHINE
+
+       # BUILD THE PALMRUN-COMMAND TO BE CALLED IN THE BATCH-JOB
+    palmrun_com="$palmrun_script_name -r $run_identifier -c $configuration_identifier -m $memory -t $cpumax -q $queue -i $run_id_number -U $local_username"
+    [[ "$activation_string_list" != "" ]]  &&  palmrun_com=${palmrun_com}" -a \"$activation_string_list\""
+    [[ "$global_revision" != "" ]]  &&  palmrun_com=${palmrun_com}" -G \"$global_revision\""
+    [[ $keep_data_from_previous_run = true ]]  &&  palmrun_com=${palmrun_com}" -k"
+    [[ $do_trace = true ]]        &&  palmrun_com=${palmrun_com}" -x"
+    [[ "$cores" != "" ]]       &&  palmrun_com=${palmrun_com}" -X $cores"
+    [[ $use_openmp = true ]]  &&  palmrun_com=${palmrun_com}" -O $threads_per_task"
+    [[ $tasks_per_node != 0 ]]  &&  palmrun_com=${palmrun_com}" -T $tasks_per_node"
+    [[ $delete_temporary_catalog = false ]]  &&  palmrun_com=${palmrun_com}" -B"
+    [[ "$ocean_file_appendix" = true ]]  &&  palmrun_com=${palmrun_com}" -y"
+    [[ $run_coupled_model = true ]]  &&  palmrun_com=${palmrun_com}" -Y \"$coupled_dist\""
+    [[ "$combine_plot_fields" = false ]]  &&  palmrun_com=${palmrun_com}" -Z"
+    [[ "$max_par_io_str" != "" ]]  &&  palmrun_com=${palmrun_com}" -w $max_par_io_str"
+    [[ "$project_account" != "" ]]  &&  palmrun_com=${palmrun_com}" -A $project_account"
+    if [[ $create_remote_batch_job = true ]]
+    then
+       palmrun_com=${palmrun_com}" -j -u $remote_username -R $local_ip"
+       if [[ $do_trace = true ]]
+       then
+          printf "\n *** PALMRUN-command on remote host:\n     $palmrun_com \n"
+       fi
+    elif [[ $create_batch_job = true ]]
+    then
+       palmrun_com=${palmrun_com}" -j"
+       if [[ $do_trace = true ]]
+       then
+          printf "\n *** PALMRUN-command on local host:\n     $palmrun_com \n"
+       fi
+    fi
+
+
+       # DETERMINE THE FULL PATHS FOR THE JOB PROTOCOL FILES ON THE LOCAL AND
+       # REMOTE HOST
+    job_protocol_file_local=${local_jobcatalog}/${configuration_identifier}_${run_id}
+    job_protocol_file=$job_protocol_file_local
+    if [[ $create_remote_batch_job = true ]]
+    then
+       job_protocol_file_remote=${remote_jobcatalog}/${configuration_identifier}_${run_id}
+       job_protocol_file=$job_protocol_file_remote
+       job_transfer_protocol_file=${remote_jobcatalog}/last_job_transfer_protocol
+       scpjob_file=${remote_jobcatalog}/scpjob.$run_id_number
+    fi
+
+
+       # BUILD THE JOB-SCRIPTS ON FILE jobfile
+    jobfile=jobfile.$run_id_number
+
+
+       # FIRST CREATE THE BATCH DIRECTIVES
+    (( i = 0 ))
+    while (( i < ibd ))
+    do
+       (( i = i + 1 ))
+       line=`echo  "${batch_directive[$i]}" | sed 's/{{/$/g' | sed 's/}}//g'`
+       eval line=\"$line\"
+       echo  "$line"                               >>  $jobfile
+    done
+    echo " "                                       >>  $jobfile
+
+
+       # FOR BATCH JOBS ON REMOTE HOSTS, ADD THE JOBFILE TO SEND BACK THE JOB
+       # PROTOCOL
+    if [[ $create_remote_batch_job = true ]]
+    then
+       echo "set +vx"                                   >>  $jobfile
+       echo "trap '"                                    >>  $jobfile
+       echo "set +vx"                                   >>  $jobfile
+       echo "cd ${remote_jobcatalog}"                   >>  $jobfile
+       echo "cat >  scpjob.$run_id_number << %%END%%"   >>  $jobfile
+
+          # ADD THE BATCH DIRECTIVES
+       (( i = 0 ))
+       while (( i < ibdt ))
+       do
+          (( i = i + 1 ))
+          line=`echo  "${batch_directive_transfer[$i]}" | sed 's/{{/$/g' | sed 's/}}//g'`
+          eval line=\"$line\"
+          echo  "$line"                            >>  $jobfile
+       done
+       echo " "                                    >>  $jobfile
+
+       echo "set -x"                               >>  $jobfile
+       echo "${fast_io_catalog}/${sources_for_run_catalog}/batch_scp  $PORTOPT  -d  -w 10  -u $local_username $local_ip  $job_protocol_file_remote  \"$local_jobcatalog\"  ${configuration_identifier}_${run_identifier}"  >>  $jobfile
+       echo "%%END%%"                              >>  $jobfile
+       echo "echo \" *** submitting job for transfering the job protocol file to $local_ip\" "  >>  $jobfile
+       echo "$submit_command  $scpjob_file"        >>  $jobfile
+       echo "rm $scpjob_file"                      >>  $jobfile
+       echo "rm -rf $job_transfer_protocol_file"   >>  $jobfile
+       echo "set -x"                               >>  $jobfile
+       echo "     ' exit"                          >>  $jobfile
+    fi
+
+
+       # ACTIVATE ERROR-TRACEBACK
+    if [[ $do_trace = true ]]
+    then
+       echo  "set -x"                                    >>  $jobfile
+    else
+       echo  "set +vx"                                   >>  $jobfile
+    fi
+
+
+       # INITIALIZE THE ENVIRONMENT AND LOAD MODULES
+    if [[ "$login_init_cmd" != "" ]]
+    then
+       echo  "$login_init_cmd"        >>  $jobfile
+    fi
+    if [[ "$module_commands" != "" ]]
+    then
+       echo  "$module_commands"     >>  $jobfile
+    fi
+
+
+       # CREATE TEMPORARY DIRECTORY AND SWITCH TO IT
+    if [[ $create_remote_batch_job = true ]]
+    then
+       echo  "mkdir  $tempdir"           >>  $jobfile
+       echo  "chmod  go+rx  $tempdir"    >>  $jobfile
+    else
+          # DIRECTORY FOR LOCAL BATCH JOBS IS CREATED NOW, DUE TO A
+          # REQUIREMENT OF THE GRID ENGINE BATCH SYSTEM (WORKING DIR IS GIVEN IN
+          # BATCH DIRECTIVE -wd AND MUST ALREADY EXIST WHEN THE JOB IS SUBMITTED)
+       mkdir  $tempdir
+       chmod  go+rx  $tempdir
+    fi
+    echo  "cd  $tempdir"                 >>  $jobfile
+    echo  "export tempdir=$tempdir"      >>  $jobfile
+    echo  "cp  ${fast_io_catalog}/${sources_for_run_catalog}/{*,.[!.]*}  ."  >>  $jobfile
+    echo  "export PATH=.:\$PATH"         >>  $jobfile
+    echo  "export execute_palmrun=true"  >>  $jobfile
+
+
+       # PROVIDE NAME OF THE CURRENT WORKING-DIRECTORY ON THE LOCAL MACHINE (FROM WHERE THE JOB IS
+       # STARTED) BY SETTING AN ENVIRONMENT-VARIABLE. THIS INFORMATION IS USED IN THE JOB BY PALMRUN
+       # IN CASE THAT RESTART-RUNS HAVE TO BE GENERATED
+    echo  "LOCAL_PWD=$working_directory"                >>  $jobfile
+    echo  "export LOCAL_PWD"                            >>  $jobfile
+
+
+       # PROVIDE THE PATH OF THE LOCAL PALMRUN-SCRIPT FOR THE SAME REASON 
+    echo  "LOCAL_PALMRUN_PATH=${source_path}/../SCRIPTS"   >>  $jobfile
+    echo  "export LOCAL_PALMRUN_PATH"                      >>  $jobfile
+
+
+       # CALL PALMRUN WITHIN THE JOB
+       # AS FINAL ACTION, REMOVE THE TEMPORARY DIRECTORY CREATED AT THE BEGINNING OF THE JOB
+    echo  "set -x"                                              >>  $jobfile
+    echo  "[[ \$execute_palmrun = true ]]  &&  $palmrun_com"    >>  $jobfile
+
+
+       # TRANSFER JOBFILE TO THE TARGET HOST
+    if [[ $create_jobfile_only = false ]]
+    then
+
+       if [[ $create_remote_batch_job = true ]]
+       then
+
+          echo " "
+          echo " *** transfer of job to remote host via scp"
+          if [[ $do_trace = true ]]
+          then
+             echo "     scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${configuration_identifier}_${run_id}"
+          fi
+          scp $ssh_key $PORTOPT $jobfile ${remote_username}@${remote_ip}:${remote_jobcatalog}/${configuration_identifier}_${run_id}  >  /dev/null
+
+          printf " *** submit the job (output of submit command, e.g. the job-id, may follow)"
+          if [[ $do_trace = true ]]
+          then
+             echo "     cd $remote_jobcatalog; $submit_command ${configuration_identifier}_${run_id}; rm ${configuration_identifier}_${run_id}  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1"
+          fi
+          echo "cd $remote_jobcatalog; $submit_command ${configuration_identifier}_${run_id}; rm ${configuration_identifier}_${run_id}"  |  ssh  -q  $ssh_key $SSH_PORTOPT  ${remote_username}@${remote_ip}  2>&1
+
+       elif [[ $create_batch_job = true ]]
+       then
+
+          eval  local_jobcatalog=$local_jobcatalog
+          cp  $jobfile  ${local_jobcatalog}/${configuration_identifier}_${run_id}
+          cd $local_jobcatalog
+          echo " "
+          echo " *** submit the job"
+          if [[ $do_trace = true ]]
+          then
+             echo "$submit_command ${configuration_identifier}_${run_id}"
+          fi
+          $submit_command ${configuration_identifier}_${run_id}
+          rm ${configuration_identifier}_${run_id}
+          cd -  > /dev/null
+
+       fi
+
+       rm -rf  $jobfile
+
+    else
+
+       printf "\n *** jobfile created under name \"$jobfile\" "
+       printf "\n     no batch-job has been sent!"
+
+    fi
+
+ fi  # END OF REMOTE-PART
Index: /palm/tags/release-6.0/SCRIPTS/palmrungui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmrungui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmrungui	(revision 3477)
@@ -0,0 +1,1049 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Adjusted to work with newest version of palmrun
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2484 2017-09-20 14:22:42Z maronga
+# Added PALM logo
+# 
+# 2480 2017-09-19 06:24:14Z maronga
+# option -A (project account number) added
+# 
+# 2477 2017-09-18 08:42:29Z maronga
+# Renamed restart run appendix from "f" to "r". Bugfix for displaying restart runs.>
+# Revised list of recently submitted jobs
+# 
+# 2413 2017-09-06 12:48:29Z maronga
+# Renamed to palmrungui and adapted for use with palmrun instead of mrun.
+# 
+# 2316 2017-07-20 07:53:42Z maronga
+# Initial revision in python
+# 
+# 
+#
+# Description:
+# ------------
+# Graphical user interface for the palmrun script.
+# @author Felix Gaschler
+# @author BjÃ¶rn Maronga (maronga@muk.uni-hannover.de)
+#
+# Instructions:
+# -------------
+#
+#------------------------------------------------------------------------------!
+
+import sys
+import subprocess
+from PyQt4 import QtCore, QtGui, uic
+from PyQt4.QtCore import QProcess
+from time import strftime
+import os
+
+
+# Determine PALM directories
+try: 
+   devnull = open(os.devnull, 'w')
+   out = subprocess.check_output("echo $PALM_BIN", shell=True, stderr=subprocess.STDOUT)
+   palm_bin = out.rstrip()
+   palm_dir = out.split("palm")[0] + "palm/" + out.split("palm")[1].split("/")[1]
+   out = None
+except:   
+   print "Error. $PALM_BIN is not set."
+   raise SystemExit
+
+
+palmrunline = ""
+name_of_file = os.path.basename(__file__)
+
+palmrungui_path = os.path.realpath(__file__)
+version_path = palmrungui_path[:len(palmrungui_path)-14-len(name_of_file)-1]
+
+Ui_MainWindow = uic.loadUiType("%s/palmrungui_files/mainwindow.ui" % (palm_bin))[0]
+Ui_helpDialog = uic.loadUiType("%s/palmrungui_files/help.ui" % (palm_bin))[0]
+Ui_aboutDialog = uic.loadUiType("%s/palmrungui_files/about.ui" % (palm_bin))[0]
+
+class HelpDialog(QtGui.QDialog,Ui_helpDialog):
+    def __init__(self, parent=None):
+        super(HelpDialog,self).__init__()
+        self.setupUi(self)
+        
+class AboutDialog(QtGui.QDialog,Ui_aboutDialog):
+    def __init__(self, parent=None):
+        super(AboutDialog,self).__init__()
+        self.setupUi(self)        
+
+class Mainwindow(QtGui.QMainWindow, Ui_MainWindow):
+    def __init__(self, parent=None):
+        super(Mainwindow, self).__init__()
+        self.setupUi(self)
+        
+        self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir + "/trunk/SCRIPTS/palmrungui_files/logo.png"))   
+        
+        self.recent_jobs(50)
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        commandline.setText("")
+        
+        self.tabWidget.setCurrentIndex(0)  
+        
+        
+        filename = "%s/.palmrun.gui.default" % (version_path)  
+        if os.path.exists(filename):
+            pass
+        else:
+            return
+        
+        file = open(filename, "r")
+        if ( file is not None ):
+            # File opened successfully
+            palmrunline = file.readline()
+            #if neue zeile zeichen
+            palmrunline = palmrunline[:len(palmrunline)-1]
+            file.close() 
+
+        # In case a palmrunline was found, load it to mainwindow
+        if ( palmrunline != ""):
+            palmrunline = palmrunline[17:] 
+            commandline.setText(palmrunline)
+            self.setup_gui(palmrunline)
+                      
+        
+    # starts xterm with palmrun commandline
+    #######################################
+    def startpalmrun(self):
+        palmrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())
+        userline = str(self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text())
+        
+        # Check for empty line
+        palmrunline_save = palmrunline;
+        if (userline != ""):
+            palmrunline = "%s %s" % (palmrunline,userline)
+        history_line = palmrunline       
+        
+        # Disable the main window
+        self.tabWidget.setEnabled(False)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("wait...")      
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText("Executing palmrun in xterm...")        
+        
+        # Wait until all commands have been executed (ugly) ?
+        #for i in range(0,21):
+        #    qApp->processEvents()       
+        
+        # Start xterm as QProcess
+        palmrun = QProcess()
+        palmrun.setProcessChannelMode(QProcess.MergedChannels) # mergedChannels
+        palmrun.setWorkingDirectory(version_path)
+    
+        geomet = self.frameGeometry()
+        
+        posx = geomet.x()+geomet.width()
+        posy = geomet.y()
+      
+        s = " -title \"Executing palmrun...\" -fa \"Monospace\" -fs 11 -geometry \"80x38+%d+%d\" -e \"" % (posx,posy)
+        palmrunline = "%s%s;echo -n '--> Press enter to continue...';read yesno\"</dev/stdin" % (s, palmrunline.replace("\"","\'"))
+        
+        mString = "xterm %s" % (palmrunline)
+        palmrun.start(mString);
+    
+        if( palmrun.waitForStarted() is False ):
+            return
+        
+        # Wait until palmrun has finished or wait for 200 minutes
+        palmrun.waitForFinished(3600000);        
+        
+        # Jobs has been submitted or aborted. Continuing...
+        # Save the palmrun command to history file
+        filename = "%s/.palm.history" % (version_path)
+        tmstamp = strftime("%Y/%m/%d %H:%M")
+    
+        file = open(filename,"a")
+        s = "%s %s\n" % (tmstamp,history_line)
+        file.write(s)
+        file.close()              
+        
+        # Enable main window again
+        self.tabWidget.setEnabled(True)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True)
+        self.groupBox.findChild(QtGui.QPushButton,"button_start").setText("Start palmrun") 
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline_save);
+        
+        # Reload recent jobs
+        self.recent_jobs(50)
+        
+        
+    # loads recent jobs 
+    ######################################
+    def recent_jobs(self, number):
+        fileDir = "%s/.palm.history" % (version_path)
+        if os.path.exists(fileDir):
+            pass
+        else:
+            return
+        
+        file = open(fileDir,"r")
+        history = file.readlines()
+        tmphistory = list()
+        file.close();
+        j = 0;
+
+        list_jobname = self.group_job.findChild(QtGui.QListWidget,"list_jobname")
+        list_jobname.clear()
+
+        # Read history entries and append to recent job list
+        i=len(history)-1
+        count = 0
+        while i>=0 and count<number:
+            timestamp = history[i][:16]
+            listitem = history[i][17:len(history[i])-1]
+            matchitems = list_jobname.findItems(listitem, QtCore.Qt.MatchExactly)
+
+            if ( len(matchitems) == 0 ):
+                listitem = filter(None,listitem.split(" -d"))[1]
+                listitem = filter(None,listitem.split(" -"))[0]
+                listitem = listitem.replace(" ",""); 
+                list_jobname.addItem(listitem);
+                s = "%s (%s)" % (listitem,timestamp)
+                tmphistory.append(s);
+                count = count +1
+                j = j+1
+                
+            if ( j == number ):
+                break
+            i = i-1
+            
+        # Send to list
+        list_jobname.clear();
+        
+        i=0
+        while i<len(tmphistory):
+            list_jobname.addItem(tmphistory[i]);
+            i = i+1
+            
+
+    # Enables coupled settings
+    ###############################
+    def enable_coupled(self):
+        coupledState = self.group_job.findChild(QtGui.QComboBox, "drop_job").currentText()
+        group = self.group_execution.findChild(QtGui.QGroupBox, "group_coupled")
+        
+        if (coupledState == "Restart run (coupled atmosphere ocean)" or coupledState == "Initial run (coupled atmosphere ocean)"):
+            self.group_coupled.setEnabled(True)
+        else: 
+            self.group_coupled.setEnabled(False)
+            
+            
+    # select a job via "select"-button
+    ################################
+    def choosejob(self):
+        jobDir = "%s/JOBS" % (version_path)        
+
+        # Pick a job from dialog
+        filename = QtGui.QFileDialog.getExistingDirectory(self, "Open a folder", jobDir, QtGui.QFileDialog.ShowDirsOnly)
+        
+        # If a file was selected, load it into mainwindow
+        if ( filename != ""):
+	    jobname = os.path.basename(unicode(filename))
+            self.group_job.findChild(QtGui.QLineEdit,"line_jobname").setText(jobname)
+            self.group_job.findChild(QtGui.QListWidget,"list_jobname").clearSelection()
+
+            # Change palmrunline accordingly
+            self.change_commandline("d","")
+            self.change_commandline("a","")
+            return
+        else:
+            return
+    
+        
+    # select a job via click from list
+    #################################
+    def choosejob_list(self):
+        #  Get selected item from list
+        list_jobname = self.group_job.findChild(QtGui.QListWidget,"list_jobname")
+        filename = str(list_jobname.currentItem().text())
+        itemint = list_jobname.currentRow()
+    
+        # Reload list
+        self.setupUi(self)
+        self.recent_jobs(50)
+    
+        # Set selected item to jobname
+        list_jobname.item(itemint).setSelected(True);
+    
+        timestamp = filename[len(filename)-17:][:16]
+        jobname = filename[:len(filename) - 19];
+    
+        fileDir = "%s/.palm.history" % (version_path)
+        file = open(fileDir,"r")
+        history = file.readlines()
+        tmphistory = list()
+        file.close();        
+    
+        i = len(history)
+        while i>=1:
+            listitem = history[i-1][17:len(history[i-1])-1]
+            listitem = filter(None,listitem.split(" -d"))[1]
+            listitem = filter(None,listitem.split(" -"))[0]
+            listitem = listitem.replace(" ","");                
+
+            # Select command line with correct timestamp and jobname
+            if (history[i-1][:16] == timestamp and listitem == jobname):
+                palmrunline = history[i-1]
+                palmrunline = palmrunline[17:]
+                palmrunline = palmrunline[:len(palmrunline)-1]
+                self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline);
+                self.setup_gui(palmrunline);
+                self.list_jobname.item(itemint).setSelected(True);    
+                
+                return
+            i = i-1
+                
+    # Change run identifer (initial, restart, coupled...)
+    ######################################################
+    def change_rc_list(self):
+        drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()    
+        self.change_commandline("a","")
+    
+        # Enable PE distribution for atmosphere/ocean
+        if ( drop_job == "Restart run (coupled atmosphere ocean)" or drop_job == "Initial run (coupled atmosphere ocean)"):
+            drop_atmos = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").text() 
+            drop_ocean = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").text() 
+            s = "%s %s" % (drop_atmos,drop_ocean)
+            self.change_commandline("Y",s)
+    
+    
+        if ( drop_job == "Restart run" or drop_job == "Restart run (coupled atmosphere ocean)"):
+           self.change_commandline("d","")
+
+        # Check of ocean runs
+        else:
+            self.delete_commandline("Y")
+            if (drop_job == "Precursor run (ocean)"):
+                self.activate_flag("y")
+            else:
+                self.deactivate_flag("y")
+            
+    # changes commandline depending on parameters
+    ##########################################################      
+    def change_commandline(self, id_str, fwt_str):
+        fwt_str = str(fwt_str) 
+        initialize = False
+        palmrunline = str(self.groupBox.findChild(QtGui.QLineEdit,"commandline").text())    
+        s = " -%s " % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+
+        if ( len(splitline) == 0 ):
+                splitline.append("palmrun")
+                splitline.append(" ")
+                initialize = True
+
+        elif ( len(splitline) == 1 ):
+            splitline.append(" ")
+        
+        param = splitline[1].split("-")
+    
+        # Change in parameter "d" (jobname)
+        if (id_str == "d"):
+            filename = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())
+            s = filename.split("JOBS/") 
+            param[0] = s[len(s)-1]
+     
+            if ( initialize == True ):#and self.group_runcontrol.isEnabled() == True ):
+                self.group_execution.setEnabled(True)
+                self.group_job.findChild(QtGui.QComboBox,"drop_job").setEnabled(True)
+                self.group_advanced.setEnabled(True)
+                self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
+                self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
+            
+            elif ( param[0] == ""):            
+                self.group_execution.setEnabled(False)
+                self.group_job.findChild(QtGui.QComboBox,"drop_job").setEnabled(False)
+                self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 
+                self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False)
+                self.group_advanced.setEnabled(False)
+                self.delete_commandline("d")
+                self.change_commandline("a","remove")
+                self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("")
+                return 1 
+            
+            else:
+                # Check if user code is available
+                usercode = "%s/JOBS/%s/USER_CODE" % (version_path,param[0])
+                                
+                if (os.path.exists(usercode) is True): 
+                    self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='green'>User code found.</font>")
+               
+                else:               
+                    self.group_job.findChild(QtGui.QLabel,"label_usercode").setText("<font color='red'>Warning: no user code found!</font>")
+               
+
+                # Check if _pdf file is available, otherwise notice user
+                drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()
+                if ( self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").checkState() == 2 or 
+                     drop_job == "Restart run" or drop_job == "Restart run (coupled atmosphere ocean)"     ):
+
+                    jobname = self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text()
+                    restartfile = "%s/JOBS/%s/INPUT/%s_p3dr" % (version_path,jobname,jobname)
+
+                    if (os.path.exists(restartfile) == True):                  
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
+               
+
+                        if ( drop_job == "Restart run (coupled atmosphere ocean)" ):
+		            restartfileo = "%s/JOBS/%s/INPUT/%s_p3dor" % (version_path,jobname,jobname)
+                            if (os.path.exists(restartfileo) == True):                  
+                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("hooo")
+                  
+                            else:       
+                                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dor file found!</font>")   
+               
+                    else:       
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dr file found!</font>")
+         
+               
+                        
+                self.group_execution.setEnabled(True)
+                self.drop_job.setEnabled(True)
+                self.group_advanced.setEnabled(True)
+                   
+        # Change in parameter "a" (run control list)
+        elif (id_str == "a"): 
+    
+            drop_job = self.group_job.findChild(QtGui.QComboBox,"drop_job").currentText()
+            rc_flag = "#"
+    
+            if (drop_job == "Initial run"):
+                rc_flag = "#"
+            
+            elif (drop_job == "Restart run"):            
+                rc_flag = "r"
+            
+            elif (drop_job == "Precursor run (atmosphere)"):            
+                rc_flag = "#"
+            
+            elif (drop_job == "Precursor run (ocean)"):            
+                rc_flag = "o#"
+
+            elif (drop_job == "Initial run (coupled atmosphere ocean)"):            
+                rc_flag = "#"
+            
+            elif (drop_job == "Restart run (coupled atmosphere ocean)"):            
+                rc_flag = "r"
+            
+            param[0] = "\"d3%s" % (rc_flag)
+    
+    
+            if (drop_job == "Restart run (coupled atmosphere ocean)" or drop_job == "Initial run (coupled atmosphere ocean)"):
+                if (rc_flag == "#"):
+                   rc_flag = "o#"
+                else:
+                   rc_flag = "or"
+
+                param[0] = "%s d3%s" % (param[0],rc_flag)
+    
+            status_restarts = self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").checkState()
+
+            if (status_restarts == 2):
+                param[0]="%s restart" % (param[0])
+    
+                # Check if _p3dr file is available, otherwise notice user
+                if (status_restarts == 2):
+                    jobname = str(self.group_job.findChild(QtGui.QLineEdit, "line_jobname").text())[len(version_path)+len("/JOBS/"):]
+                    restartfile = "%s/JOBS/%s/INPUT/%s_p3dr" % (version_path,jobname,jobname)
+                    
+                    if (os.path.exists(restartfile) == True):                   
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
+                   
+                    else:                   
+                        self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dr file found!</font>")
+
+            else:  
+                self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("")
+
+            status_cycfill = self.group_execution.findChild(QtGui.QCheckBox,"check_cycfill").checkState()
+    
+            if (status_cycfill == 2):            
+                param[0]="%s fill" % (param[0])
+            
+            status_svf = self.group_execution.findChild(QtGui.QCheckBox,"check_svf").checkState()
+    
+            if (status_svf == 2):            
+                param[0]="%s svf" % (param[0])
+
+            param[0]="%s\"" % (param[0])
+ 
+ 
+            if ( fwt_str == "remove"):            
+                self.delete_commandline(id_str)
+                return 1
+            
+            else:            
+                self.button_start.setEnabled(True)
+                self.action_save.setEnabled(True)
+
+        # Change in any other parameter
+        else:
+            if ( fwt_str != ""):            
+                param[0] = "\"%s\"" % (fwt_str)
+            
+            else:            
+                self.delete_commandline(id_str)
+                return 1
+                        
+        # Join the new palmrunline
+        splitline[1]= " -".join(param)
+                
+                
+        s = " -%s " % (id_str)
+        newpalmrunline = s.join(splitline)
+    
+        # Pr the new palmrunline to mainwindow
+        newpalmrunline = newpalmrunline.replace("  "," ")
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(newpalmrunline)
+
+    # change lineinput depending on sender
+    ###################################################################################
+    def change_lineinput(self):
+        if ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit, "line_host") ):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_host").text()
+            self.change_commandline("h",tmptext)
+
+        elif ( self.sender() == self.group_job.findChild(QtGui.QLineEdit, "line_jobname") ):
+            tmptext = self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text()
+            self.change_commandline("d",tmptext)
+
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_q")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_q").text()
+            self.change_commandline("q",tmptext)
+        
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_account")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_account").text()
+            self.change_commandline("A",tmptext)
+        
+        elif ( self.sender() ==  self.group_execution.findChild(QtGui.QLineEdit,"line_pe")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_pe").text()
+            self.change_commandline("X",tmptext)
+        
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_tpn")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_tpn").text()
+            self.change_commandline("T",tmptext)
+                
+        elif ( self.sender() == self.group_execution.findChild(QtGui.QLineEdit,"line_time")):
+            tmptext = self.group_execution.findChild(QtGui.QLineEdit,"line_time").text()
+            self.change_commandline("t",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_M")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_M").text()
+            self.change_commandline("M",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_m")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_m").text()
+            self.change_commandline("m",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_D")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_D").text()
+            self.change_commandline("D",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_c")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_c").text()
+            if ( tmptext == ".palmgui.config"):
+                tmptext = ""
+            self.change_commandline("c",tmptext)
+        
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_s")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_s").text()
+            self.change_commandline("s",tmptext)
+                
+        elif ( self.sender() == self.group_advanced.findChild(QtGui.QLineEdit,"line_w")):
+            tmptext = self.group_advanced.findChild(QtGui.QLineEdit,"line_w").text()
+            self.change_commandline("w",tmptext)
+        
+        elif ( self.sender() == self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos") or 
+               self.sender() == self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean")):
+            t1 = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").text()
+            t2 = self.group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").text()            
+            tmptext = "%s %s" % (t1,t2)
+            
+            self.change_commandline("Y",tmptext)
+
+            # try catch sowas in der art
+            pe1 = 0
+            pe2 = 0
+            
+            try:
+                pe1 = int(t1)
+            except ValueError:            
+                pass
+                
+            try:
+                pe2 = int(t2)
+            except ValueError:
+                pass
+                
+            PE_total = pe1+pe2   
+            self.group_execution.findChild(QtGui.QLineEdit,"line_pe").setText(str(PE_total))
+            self.change_commandline("X",str(PE_total))
+          
+    # deletes parameter from commandline
+    ##################################################################################### 
+    def delete_commandline(self, id_str):   
+        # Read palmrunline
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        palmrunline = str(commandline.text())
+        s = " -%s" % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+        
+        if ( len(splitline) == 1):
+            return 1
+        else:
+            param = splitline[1].split("-")
+            param[0] = ""
+            splitline[1]= " -".join(param)
+            newpalmrunline = "".join(splitline)
+            newpalmrunline = newpalmrunline.replace("  "," ")
+    
+            # Print new palmrunline to screen
+            commandline.setText(newpalmrunline)
+        
+    # controls flags
+    ###################################################################################
+    def check_flags(self):
+        status = self.group_execution.findChild(QtGui.QCheckBox,"check_delete_tmp_files" ).checkState()
+        if (status == 2):      
+            self.activate_flag("B")
+        else:
+            self.deactivate_flag("B")
+    
+        status = self.group_execution.findChild(QtGui.QCheckBox,"check_verbose" ).checkState()
+        if (status == 2):
+            self.activate_flag("v") 
+        else:
+            self.deactivate_flag("v")
+        
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_b" ).checkState() 
+        if (status == 2):
+            self.activate_flag("b")
+        else:
+            self.deactivate_flag("b")
+    
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_F" ).checkState()   
+        if (status == 2):
+            self.activate_flag("F")
+        else:
+            self.deactivate_flag("F")
+            
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_I" ).checkState() 
+        if (status == 2):
+            self.activate_flag("I")
+        else:
+            self.deactivate_flag("I")
+
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_k" ).checkState() 
+        if (status == 2):
+            self.activate_flag("k")
+        else:
+            self.deactivate_flag("k")
+
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_O" ).checkState() 
+        if (status == 2):
+            self.activate_flag("O")
+        else:
+            self.deactivate_flag("O")
+
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_x" ).checkState() 
+        if (status == 2):
+            self.activate_flag("x")
+        else:
+            self.deactivate_flag("x")
+        
+        status = self.group_advanced.findChild(QtGui.QCheckBox,"check_Z" ).checkState() 
+        if (status == 2):
+            self.activate_flag("Z")
+        else:
+            self.deactivate_flag("Z")
+        
+    # changes flag to parameter 
+    ##################################################################################    
+    def activate_flag(self, id_str):
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        palmrunline = str(commandline.text())
+        s = " -%s" % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+        
+        if ( len(splitline) == 1):
+            splitline.append("")
+            s = " -%s" % (id_str)
+            newpalmrunline = s.join(splitline)
+            newpalmrunline = newpalmrunline.replace("  "," ")
+            commandline.setText(newpalmrunline)                
+        
+    # deletes flag in commandline
+    ####################################################################################    
+    def deactivate_flag(self, id_str):
+        commandline = self.groupBox.findChild(QtGui.QLineEdit,"commandline")
+        palmrunline = str(commandline.text())
+        s = " -%s" % (id_str)
+        splitline = filter(None,palmrunline.split(s))
+ 
+        newpalmrunline = "".join(splitline)
+        newpalmrunline = newpalmrunline.replace("  "," ")
+        commandline.setText(newpalmrunline)     
+
+    # Clears window 
+    #################################################################################
+    def reset_window(self):
+        self.setupUi(self)
+        self.tabWidget.setCurrentIndex(0)
+        self.recent_jobs(50)
+        
+    # Safes current commandline and user Parameters to .sav file
+    #################################################################################
+    def save_to_file(self):
+        user_string = self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text()
+        cmd_string = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
+        
+        string_to_file = cmd_string
+        if (user_string != ""): 
+            string_to_file = "%s%s" % (string_to_file,user_string)
+            
+        #filename = QtGui.QInputDialog.getText(self, "Save File naming Dialog", "Insert filename", QtGui.QLineEdit.Normal)
+        filename = str(QtGui.QFileDialog.getSaveFileName(self, "Save File","filename.sav"))
+        extension = ".sav"
+        filename = "%s%s" % (filename, "")
+        tmstamp = strftime("%Y/%m/%d %H:%M")
+        
+        file = open(filename,"w")
+        s = "%s %s" % (tmstamp, string_to_file)
+        file.write(s)
+        file.close()
+        
+    # Safes current commandline and user parameters to default file
+    ################################################################################
+    def save_default(self):
+        user_string = self.group_advanced.findChild(QtGui.QLineEdit,"line_user").text()
+        cmd_string = self.groupBox.findChild(QtGui.QLineEdit,"commandline").text()
+        
+        string_to_file = cmd_string
+        if (user_string != ""): 
+            string_to_file = "%s%s" % (string_to_file,user_string)
+        
+        filename ="%s/.palmgui.default" % (version_path)
+        tmstamp = strftime("%Y/%m/%d %H:%M")
+        
+        file = open(filename,"w")
+        s = "%s %s" % (tmstamp, string_to_file)
+        file.write(s)
+        file.close()        
+
+    # Execute command which starts jobmanager (start palm_jm)
+    #######################################################
+    def start_jobmanager(self):
+        subprocess.Popen(["nohup","palm_jm",">>","/dev/null", "2>&1","&"])        
+        
+    # Executes command which starts watchdog (start palm_wd)
+    ########################################################
+    def start_watchdog(self):
+        subprocess.Popen(["nohup","palm_wd",">>","/dev/null", "2>&1","&"])
+
+    # Opens "help" dialog
+    #################################
+    def help(self):        
+        dialog = HelpDialog()
+        dialog.exec_()
+
+    # Opens "about" dialog
+    ##################################
+    def about_gui(self):
+        dialog = AboutDialog()
+        dialog.exec_()
+
+    # commandline to buttons etc
+    ##############################
+    def setup_gui(self, palmrun_str):  
+      
+        self.palm_logo.setPixmap(QtGui.QPixmap(palm_dir + "/trunk/SCRIPTS/palmrungui_files/logo.png"))   
+      
+        #  Some initial settings
+        user = "" 
+        coupled_run = False 
+        ocean_run   = False 
+        nojob       = False 
+
+        #Split parameters in palmrunline
+        splitline = palmrun_str.split(" -")
+        
+        if ( splitline[0] != "palmrun"):
+            return 1
+
+        else:
+            self.group_job.setEnabled(True) 
+
+        # Loop for all parameters in palmrunline
+        i = len(splitline)-1
+        while i >= 1:
+
+            # Determine parameter
+            splitparameter = splitline[i].split(" ")
+
+            parameter = splitparameter[0] 
+            splitparameter.pop(0)
+            options = " ".join(splitparameter) 
+            options = options.replace("\"","") 
+
+            # Check for suitable switch
+            if ( parameter == "d"):
+              
+                if ( options != ""):
+                    self.group_job.findChild(QtGui.QLineEdit,"line_jobname").setText(options) 
+                    nojob = False 
+                
+                else:                 
+                    nojob = True 
+                
+            elif ( parameter == "h"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_host").setText(options) 
+             
+            elif ( parameter == "q"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_q").setText(options) 
+             
+            elif ( parameter == "A"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_account").setText(options) 
+             
+            elif ( parameter == "X"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_pe").setText(options) 
+             
+            elif ( parameter == "T"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_tpn").setText(options) 
+             
+            elif ( parameter == "t"):
+                self.group_execution.findChild(QtGui.QLineEdit,"line_time").setText(options) 
+             
+            elif ( parameter == "B"):
+                self.group_execution.findChild(QtGui.QCheckBox,"check_delete_tmp_files").setChecked(True) 
+             
+            elif ( parameter == "v"):
+                self.group_execution.findChild(QtGui.QCheckBox,"check_verbose").setChecked(True) 
+                          
+            elif ( parameter == "b"): 
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_b").setChecked(True)  
+             
+            elif ( parameter == "F"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_F").setChecked(True) 
+             
+            elif ( parameter == "I"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_I").setChecked(True) 
+             
+            elif ( parameter == "k"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_k").setChecked(True) 
+             
+            elif ( parameter == "O"): 
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_O").setChecked(True) 
+             
+            elif ( parameter == "x"):              
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_x").setChecked(True) 
+             
+            elif ( parameter == "Z"):
+                self.group_advanced.findChild(QtGui.QCheckBox,"check_Z").setChecked(True) 
+               
+            elif ( parameter == "m"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_m").setText(options) 
+             
+            elif ( parameter == "M"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_M").setText(options) 
+                          
+            elif ( parameter == "D"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_D").setText(options) 
+             
+            elif ( parameter == "c"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_c").setText(options) 
+                          
+            elif ( parameter == "s"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_s").setText(options) 
+             
+            elif ( parameter == "w"):
+                self.group_advanced.findChild(QtGui.QLineEdit,"line_w").setText(options) 
+             
+
+            # Determine settings for coupled restart runs
+            elif ( parameter == "Y"):
+                optionssplit = options.split(" ") 
+                
+                group_coupled = self.group_execution.findChild(QtGui.QGroupBox,"group_coupled")
+                group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupled1").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupled2").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupled3").setEnabled(True) 
+                group_coupled.findChild(QtGui.QLabel,"label_coupling").setEnabled(True) 
+
+                if (optionssplit.count() == 2):
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setEnabled(optionssplit[0]) 
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setEnabled(optionssplit[1])
+                 
+                else:                  
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_atmos").setText("") 
+                    group_coupled.findChild(QtGui.QLineEdit,"line_PE_ocean").setText("") 
+ 
+                 
+                coupled_run = True 
+            
+            elif ( parameter == "y"):              
+                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(3) 
+             
+
+            # Determine settings for the run control list
+            elif ( parameter == "a"):
+              
+                optionssplit = options.split(" ") 
+
+                options_2 = None
+                options_all = None
+                
+                j = 0
+                while j < len(optionssplit):
+                 
+                    options_all = optionssplit[j] 
+                    options_2 = optionssplit[j][:2] 
+                                              
+                    if (options_2 == "d3"):      
+                        if (options_all[:3][-1] == "#"):
+                            self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(0) 
+                        elif (options_all[:3][-1] == "r"):
+                            self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(1) 
+                        
+                        elif (options_all[:3][-1] == "o"):
+                            ocean_run = True 
+                        
+                    if (options_all == "restart"):
+                        self.group_execution.findChild(QtGui.QCheckBox,"check_restarts").setChecked(True) 
+                        # Check if _pdf file is available, otherwise notice user
+                        jobname = str(self.group_job.findChild(QtGui.QLineEdit,"line_jobname").text())[len(version_path)+len("/JOBS/"):] 
+                        
+                        restartfile = "%sJOBS/%s/INPUT/%s_p3dr" % (version_path,jobname,jobname)
+                        if (os.path.exists(restartfile) == True):   
+                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("") 
+                       
+                        else:
+                            self.group_execution.findChild(QtGui.QLabel,"label_restart").setText("<font color='red'>Warning: No p3dr file \found!</font>") 
+                    j = j+1
+
+            # All unknown parameters are set as extra user parameters
+            else: 
+	        print parameter
+                user = "%s-%s \"%s\" " % (user,parameter,options)
+                splitline.removeAt(i) 
+
+            i = i-1
+        # Change drop box state in case of ocean precursor or coupled restart runs
+        if ( ocean_run == True ):
+            if ( coupled_run == True ):
+                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(4) 
+            
+            else:
+                self.group_job.findChild(QtGui.QComboBox, "drop_job").setCurrentIndex(3) 
+
+        if ( user != ""):
+            self.group_advanced.findChild(QtGui.QLineEdit,"line_user").setText(user)
+
+        # Join palmrunline and post it to mainwindow
+        palmrunline = " -".join(splitline) 
+        self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline)          
+
+        # Disable mainwindow if no job was found, otherwise enable
+        if ( nojob == True ):
+            self.group_execution.setEnabled(False) 
+            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(False) 
+            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(False) 
+            self.group_job.findChild(QtGui.QComboBox, "drop_job").setEnabled(False) 
+            self.group_advanced.setEnabled(False) 
+            self.check_advanced.setEnabled(False) 
+         
+        else:
+            self.group_execution.setEnabled(True) 
+            self.groupBox.findChild(QtGui.QPushButton,"button_start").setEnabled(True) 
+            self.menuBar.findChild(QtGui.QMenu,"menuStart").actions()[3].setEnabled(True)
+            self.group_job.findChild(QtGui.QComboBox, "drop_job").setEnabled(True) 
+            self.group_advanced.setEnabled(True) 
+         
+        self.tabWidget.setCurrentIndex(0)
+         
+    # open saved commandline
+    ##################################
+    def open_from_file(self):
+        
+        # Select filename and open it
+        filename = QtGui.QFileDialog.getOpenFileName(self, "Open File","Save files (*.sav)") 
+        
+        if ( filename != ""):
+            file = open(filename, "r")
+          
+            if ( file is not None ):
+                # File opened successfully
+                palmrunline = file.read()
+                file.close() 
+    
+            # In case a palmrunline was found, load it to mainwindow
+            if ( palmrunline != ""):
+                palmrunline = palmrunline[17:] 
+                self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline) 
+                self.setup_gui(palmrunline)
+         
+    # open saved commandline   
+    ##################################
+    def open_last(self): 
+        # Select filename and open it
+        filename = "%s/.palm.history" % (version_path)
+        
+        if os.path.exists(filename):
+            pass
+        else:
+            return
+        
+        file = open(filename, "r")  
+        if ( file is not None ):
+            # File opened successfully
+            lines = file.readlines()
+            palmrunline = lines[len(lines)-1]
+            palmrunline = palmrunline[:len(palmrunline)-1]
+            file.close() 
+
+        # In case a palmrunline was found, load it to mainwindow
+        if ( palmrunline != ""):
+            palmrunline = palmrunline[17:len(palmrunline)] 
+            self.groupBox.findChild(QtGui.QLineEdit,"commandline").setText(palmrunline) 
+            self.setup_gui(palmrunline)        
+        
+
+if __name__ == "__main__":
+    app = QtGui.QApplication(sys.argv)
+    window = Mainwindow()
+    window.show()
+    sys.exit(app.exec_())
Index: /palm/tags/release-6.0/SCRIPTS/palmrungui_files/about.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmrungui_files/about.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmrungui_files/about.ui	(revision 3477)
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>about</class>
+ <widget class="QDialog" name="about">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>349</width>
+    <height>127</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>About palmrungui</string>
+  </property>
+  <widget class="QPushButton" name="button_ok">
+   <property name="geometry">
+    <rect>
+     <x>195</x>
+     <y>95</y>
+     <width>91</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>0</y>
+     <width>261</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>16</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>palmrungui</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_5">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>60</y>
+     <width>261</width>
+     <height>36</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Visit http://palm-model.org</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignHCenter|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>25</y>
+     <width>291</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>12</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>A graphical user interface for palmrun</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_ok</sender>
+   <signal>clicked()</signal>
+   <receiver>about</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>80</x>
+     <y>197</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>196</x>
+     <y>204</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palmrungui_files/help.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmrungui_files/help.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmrungui_files/help.ui	(revision 3477)
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>child_help</class>
+ <widget class="QDialog" name="child_help">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>359</width>
+    <height>129</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QLabel" name="label_2">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>5</y>
+     <width>171</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <pointsize>16</pointsize>
+     <weight>75</weight>
+     <bold>true</bold>
+    </font>
+   </property>
+   <property name="text">
+    <string>palmrungui help</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="button_ok">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>100</y>
+     <width>91</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Close</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="label_3">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>50</y>
+     <width>311</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>For help</string>
+   </property>
+   <property name="alignment">
+    <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+   </property>
+   <property name="wordWrap">
+    <bool>true</bool>
+   </property>
+  </widget>
+  <widget class="QTextBrowser" name="textBrowser">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="geometry">
+    <rect>
+     <x>70</x>
+     <y>40</y>
+     <width>261</width>
+     <height>31</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <italic>false</italic>
+     <underline>false</underline>
+     <kerning>false</kerning>
+    </font>
+   </property>
+   <property name="focusPolicy">
+    <enum>Qt::NoFocus</enum>
+   </property>
+   <property name="contextMenuPolicy">
+    <enum>Qt::NoContextMenu</enum>
+   </property>
+   <property name="acceptDrops">
+    <bool>false</bool>
+   </property>
+   <property name="layoutDirection">
+    <enum>Qt::LeftToRight</enum>
+   </property>
+   <property name="autoFillBackground">
+    <bool>false</bool>
+   </property>
+   <property name="frameShadow">
+    <enum>QFrame::Plain</enum>
+   </property>
+   <property name="lineWidth">
+    <number>0</number>
+   </property>
+   <property name="readOnly">
+    <bool>true</bool>
+   </property>
+   <property name="html">
+    <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://palm-model.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#006e28;&quot;&gt;visit official PALM web page&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   </property>
+   <property name="acceptRichText">
+    <bool>true</bool>
+   </property>
+   <property name="openExternalLinks">
+    <bool>true</bool>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_ok</sender>
+   <signal>clicked()</signal>
+   <receiver>child_help</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>187</x>
+     <y>111</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>253</x>
+     <y>104</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palmrungui_files/mainwindow.ui
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmrungui_files/mainwindow.ui	(revision 3477)
@@ -0,0 +1,1950 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>600</width>
+    <height>700</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>600</width>
+    <height>700</height>
+   </size>
+  </property>
+  <property name="maximumSize">
+   <size>
+    <width>600</width>
+    <height>700</height>
+   </size>
+  </property>
+  <property name="focusPolicy">
+   <enum>Qt::NoFocus</enum>
+  </property>
+  <property name="windowTitle">
+   <string>palmrungui</string>
+  </property>
+  <property name="iconSize">
+   <size>
+    <width>72</width>
+    <height>72</height>
+   </size>
+  </property>
+  <property name="toolButtonStyle">
+   <enum>Qt::ToolButtonIconOnly</enum>
+  </property>
+  <property name="animated">
+   <bool>false</bool>
+  </property>
+  <property name="documentMode">
+   <bool>false</bool>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <widget class="QGroupBox" name="groupBox">
+    <property name="enabled">
+     <bool>true</bool>
+    </property>
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>570</y>
+      <width>601</width>
+      <height>81</height>
+     </rect>
+    </property>
+    <property name="focusPolicy">
+     <enum>Qt::NoFocus</enum>
+    </property>
+    <property name="title">
+     <string/>
+    </property>
+    <property name="flat">
+     <bool>true</bool>
+    </property>
+    <widget class="QPushButton" name="button_exit">
+     <property name="geometry">
+      <rect>
+       <x>150</x>
+       <y>20</y>
+       <width>90</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Quit</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="button_start">
+     <property name="enabled">
+      <bool>false</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>20</y>
+       <width>131</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <weight>75</weight>
+       <bold>true</bold>
+      </font>
+     </property>
+     <property name="text">
+      <string>palmrun</string>
+     </property>
+     <property name="checkable">
+      <bool>false</bool>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="button_clear">
+     <property name="geometry">
+      <rect>
+       <x>250</x>
+       <y>20</y>
+       <width>90</width>
+       <height>21</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Clear</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="commandline">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>50</y>
+       <width>581</width>
+       <height>26</height>
+      </rect>
+     </property>
+     <property name="mouseTracking">
+      <bool>false</bool>
+     </property>
+     <property name="acceptDrops">
+      <bool>false</bool>
+     </property>
+     <property name="frame">
+      <bool>false</bool>
+     </property>
+     <property name="dragEnabled">
+      <bool>false</bool>
+     </property>
+     <property name="readOnly">
+      <bool>false</bool>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QTabWidget" name="tabWidget">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>5</y>
+      <width>591</width>
+      <height>581</height>
+     </rect>
+    </property>
+    <property name="sizePolicy">
+     <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+      <horstretch>0</horstretch>
+      <verstretch>0</verstretch>
+     </sizepolicy>
+    </property>
+    <property name="font">
+     <font>
+      <strikeout>false</strikeout>
+     </font>
+    </property>
+    <property name="focusPolicy">
+     <enum>Qt::NoFocus</enum>
+    </property>
+    <property name="autoFillBackground">
+     <bool>false</bool>
+    </property>
+    <property name="currentIndex">
+     <number>0</number>
+    </property>
+    <widget class="QWidget" name="tab">
+     <attribute name="title">
+      <string>Default</string>
+     </attribute>
+     <widget class="QGroupBox" name="group_job">
+      <property name="enabled">
+       <bool>true</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>571</width>
+        <height>296</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <weight>50</weight>
+        <bold>false</bold>
+       </font>
+      </property>
+      <property name="title">
+       <string notr="true">Job name</string>
+      </property>
+      <property name="flat">
+       <bool>true</bool>
+      </property>
+      <widget class="QLineEdit" name="line_jobname">
+       <property name="geometry">
+        <rect>
+         <x>90</x>
+         <y>30</y>
+         <width>481</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="pushButton">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>30</y>
+         <width>71</width>
+         <height>24</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Select</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>65</y>
+         <width>151</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Recently submitted jobs:</string>
+       </property>
+      </widget>
+      <widget class="QListWidget" name="list_jobname">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>85</y>
+         <width>561</width>
+         <height>181</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QComboBox" name="drop_job">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>70</x>
+         <y>270</y>
+         <width>271</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <item>
+        <property name="text">
+         <string>Initial run</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Restart run</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Precursor run (atmosphere)</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Precursor run (ocean)</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Initial run (coupled atmosphere ocean)</string>
+        </property>
+       </item>
+       <item>
+        <property name="text">
+         <string>Restart run (coupled atmosphere ocean)</string>
+        </property>
+       </item>
+      </widget>
+      <widget class="QLabel" name="label_usercode">
+       <property name="enabled">
+        <bool>true</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>350</x>
+         <y>267</y>
+         <width>231</width>
+         <height>31</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_8">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>275</y>
+         <width>81</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Job type:</string>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QGroupBox" name="group_execution">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>305</y>
+        <width>431</width>
+        <height>231</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string>Execution</string>
+      </property>
+      <property name="flat">
+       <bool>false</bool>
+      </property>
+      <widget class="QLineEdit" name="line_q">
+       <property name="geometry">
+        <rect>
+         <x>340</x>
+         <y>30</y>
+         <width>81</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_2">
+       <property name="geometry">
+        <rect>
+         <x>260</x>
+         <y>25</y>
+         <width>71</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Queue:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_pe">
+       <property name="geometry">
+        <rect>
+         <x>120</x>
+         <y>55</y>
+         <width>101</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_3">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>55</y>
+         <width>111</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Processing cores:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_tpn">
+       <property name="geometry">
+        <rect>
+         <x>340</x>
+         <y>55</y>
+         <width>61</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_4">
+       <property name="geometry">
+        <rect>
+         <x>230</x>
+         <y>50</y>
+         <width>101</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Tasks per node:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_account">
+       <property name="geometry">
+        <rect>
+         <x>340</x>
+         <y>80</y>
+         <width>81</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_5">
+       <property name="geometry">
+        <rect>
+         <x>230</x>
+         <y>80</y>
+         <width>101</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Project account:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_6">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>80</y>
+         <width>101</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Wallclock time:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_time">
+       <property name="geometry">
+        <rect>
+         <x>120</x>
+         <y>80</y>
+         <width>101</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_7">
+       <property name="geometry">
+        <rect>
+         <x>20</x>
+         <y>30</y>
+         <width>91</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Configuration:</string>
+       </property>
+       <property name="scaledContents">
+        <bool>false</bool>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_host">
+       <property name="geometry">
+        <rect>
+         <x>120</x>
+         <y>30</y>
+         <width>101</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="Line" name="line">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>105</y>
+         <width>431</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_restarts">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>120</y>
+         <width>121</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Allow restarts</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_delete_tmp_files">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>140</y>
+         <width>281</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Do not delete temporary directory at end</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_verbose">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>160</y>
+         <width>261</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>No prompt on confirmation (silent)</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_restart">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>130</x>
+         <y>120</y>
+         <width>291</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_cycfill">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>180</y>
+         <width>261</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Use cyclic fill method</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_svf">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>200</y>
+         <width>261</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Read sky view factors from file</string>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QLabel" name="palm_logo">
+      <property name="geometry">
+       <rect>
+        <x>490</x>
+        <y>440</y>
+        <width>77</width>
+        <height>72</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>TextLabel</string>
+      </property>
+      <property name="scaledContents">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </widget>
+    <widget class="QWidget" name="tab_2">
+     <attribute name="title">
+      <string>Advanced</string>
+     </attribute>
+     <widget class="QGroupBox" name="group_advanced">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>5</y>
+        <width>501</width>
+        <height>401</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string>Advanced settings</string>
+      </property>
+      <property name="flat">
+       <bool>true</bool>
+      </property>
+      <widget class="QCheckBox" name="check_x">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>175</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-x  (tracing of palmrun for debug purposes)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_O">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>150</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-O  (use OpenMP)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_k">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>125</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-k  (keep data from previous run)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_I">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>100</y>
+         <width>441</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-I  (archiving errors of previous batch-jobs will be ignored)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_F">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>75</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-F (create remote job file only)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_b">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>50</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-b  (batch-job on local machine)</string>
+       </property>
+      </widget>
+      <widget class="QCheckBox" name="check_Z">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>200</y>
+         <width>421</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-Z  (disable combine_plot_fields at the end of job)</string>
+       </property>
+      </widget>
+      <widget class="Line" name="line_2">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>220</y>
+         <width>581</width>
+         <height>20</height>
+        </rect>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_w">
+       <property name="geometry">
+        <rect>
+         <x>220</x>
+         <y>345</y>
+         <width>191</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_s">
+       <property name="geometry">
+        <rect>
+         <x>220</x>
+         <y>320</y>
+         <width>191</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_D">
+       <property name="geometry">
+        <rect>
+         <x>220</x>
+         <y>295</y>
+         <width>191</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_M">
+       <property name="geometry">
+        <rect>
+         <x>220</x>
+         <y>270</y>
+         <width>191</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_m">
+       <property name="geometry">
+        <rect>
+         <x>220</x>
+         <y>245</y>
+         <width>81</width>
+         <height>25</height>
+        </rect>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_user">
+       <property name="geometry">
+        <rect>
+         <x>220</x>
+         <y>370</y>
+         <width>191</width>
+         <height>25</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+     </widget>
+     <widget class="QLabel" name="label_20">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>375</y>
+        <width>211</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>User parameters (no preview):</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_18">
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>300</y>
+        <width>201</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Preprocessor directives (cpp):</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_17">
+      <property name="geometry">
+       <rect>
+        <x>-10</x>
+        <y>350</y>
+        <width>221</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Number of parallel I/O streams:</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_16">
+      <property name="geometry">
+       <rect>
+        <x>110</x>
+        <y>255</y>
+        <width>101</width>
+        <height>16</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Memory (MB):</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_19">
+      <property name="geometry">
+       <rect>
+        <x>20</x>
+        <y>325</y>
+        <width>191</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Filenames to be compiled:</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_21">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>275</y>
+        <width>171</width>
+        <height>20</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Makefile:</string>
+      </property>
+      <property name="alignment">
+       <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+      </property>
+     </widget>
+     <widget class="QGroupBox" name="group_coupled">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>10</x>
+        <y>410</y>
+        <width>401</width>
+        <height>101</height>
+       </rect>
+      </property>
+      <property name="title">
+       <string/>
+      </property>
+      <widget class="QLineEdit" name="line_PE_ocean">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>70</y>
+         <width>111</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled3">
+       <property name="geometry">
+        <rect>
+         <x>40</x>
+         <y>65</y>
+         <width>51</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Ocean:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLineEdit" name="line_PE_atmos">
+       <property name="geometry">
+        <rect>
+         <x>100</x>
+         <y>45</y>
+         <width>111</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="frame">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>45</y>
+         <width>81</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Atmosphere:</string>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled1">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>1</y>
+         <width>181</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="autoFillBackground">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>Processor distribution</string>
+       </property>
+       <property name="scaledContents">
+        <bool>false</bool>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignJustify</set>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupled1_2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>20</y>
+         <width>281</width>
+         <height>21</height>
+        </rect>
+       </property>
+       <property name="autoFillBackground">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>(Coupled atmosphere-ocean runs only)</string>
+       </property>
+       <property name="scaledContents">
+        <bool>false</bool>
+       </property>
+       <property name="alignment">
+        <set>Qt::AlignBottom|Qt::AlignJustify</set>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_coupling">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="geometry">
+        <rect>
+         <x>160</x>
+         <y>5</y>
+         <width>55</width>
+         <height>15</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+      </widget>
+     </widget>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>600</width>
+     <height>30</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuStart">
+    <property name="geometry">
+     <rect>
+      <x>341</x>
+      <y>82</y>
+      <width>129</width>
+      <height>189</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Sta&amp;rt</string>
+    </property>
+    <property name="separatorsCollapsible">
+     <bool>false</bool>
+    </property>
+    <addaction name="action_open"/>
+    <addaction name="separator"/>
+    <addaction name="action_last"/>
+    <addaction name="action_save"/>
+    <addaction name="action_default"/>
+    <addaction name="action_quit"/>
+   </widget>
+   <widget class="QMenu" name="menuHelp">
+    <property name="title">
+     <string>He&amp;lp</string>
+    </property>
+    <addaction name="action_help"/>
+    <addaction name="action_about"/>
+   </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>&amp;Tools</string>
+    </property>
+    <addaction name="action_start_watchdog"/>
+    <addaction name="action_start_jobmanager"/>
+   </widget>
+   <addaction name="menuStart"/>
+   <addaction name="menuTools"/>
+   <addaction name="menuHelp"/>
+  </widget>
+  <action name="action_open">
+   <property name="text">
+    <string>&amp;Open from File</string>
+   </property>
+  </action>
+  <action name="action_save">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>&amp;Save to File</string>
+   </property>
+  </action>
+  <action name="action_last">
+   <property name="text">
+    <string>&amp;Load Last Job</string>
+   </property>
+  </action>
+  <action name="action_quit">
+   <property name="text">
+    <string>&amp;Quit</string>
+   </property>
+  </action>
+  <action name="action_help">
+   <property name="text">
+    <string>&amp;Help</string>
+   </property>
+  </action>
+  <action name="action_about">
+   <property name="text">
+    <string>&amp;About palmrungui</string>
+   </property>
+  </action>
+  <action name="action_default">
+   <property name="enabled">
+    <bool>true</bool>
+   </property>
+   <property name="text">
+    <string>Save as &amp;Default</string>
+   </property>
+  </action>
+  <action name="actionCheck_parameter_file">
+   <property name="enabled">
+    <bool>false</bool>
+   </property>
+   <property name="text">
+    <string>Check parameter file</string>
+   </property>
+  </action>
+  <action name="action_start_wd">
+   <property name="text">
+    <string>Start watchdog</string>
+   </property>
+  </action>
+  <action name="actionStart_job_manager">
+   <property name="text">
+    <string>Start job manager</string>
+   </property>
+  </action>
+  <action name="action_start_watchdog">
+   <property name="text">
+    <string>&amp;Watchdog</string>
+   </property>
+  </action>
+  <action name="action_start_jobmanager">
+   <property name="text">
+    <string>&amp;Job manager</string>
+   </property>
+  </action>
+ </widget>
+ <layoutdefault spacing="1" margin="11"/>
+ <tabstops>
+  <tabstop>pushButton</tabstop>
+  <tabstop>drop_job</tabstop>
+  <tabstop>line_host</tabstop>
+  <tabstop>line_q</tabstop>
+  <tabstop>line_pe</tabstop>
+  <tabstop>line_tpn</tabstop>
+  <tabstop>line_time</tabstop>
+  <tabstop>line_account</tabstop>
+  <tabstop>check_restarts</tabstop>
+  <tabstop>check_delete_tmp_files</tabstop>
+  <tabstop>check_verbose</tabstop>
+  <tabstop>check_cycfill</tabstop>
+  <tabstop>button_start</tabstop>
+  <tabstop>button_exit</tabstop>
+  <tabstop>button_clear</tabstop>
+  <tabstop>commandline</tabstop>
+  <tabstop>list_jobname</tabstop>
+  <tabstop>line_jobname</tabstop>
+  <tabstop>check_b</tabstop>
+  <tabstop>check_F</tabstop>
+  <tabstop>check_I</tabstop>
+  <tabstop>check_k</tabstop>
+  <tabstop>check_O</tabstop>
+  <tabstop>check_x</tabstop>
+  <tabstop>check_Z</tabstop>
+  <tabstop>line_m</tabstop>
+  <tabstop>line_M</tabstop>
+  <tabstop>line_D</tabstop>
+  <tabstop>line_s</tabstop>
+  <tabstop>line_w</tabstop>
+  <tabstop>line_user</tabstop>
+  <tabstop>line_PE_atmos</tabstop>
+  <tabstop>line_PE_ocean</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>button_exit</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>160</x>
+     <y>652</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>16</x>
+     <y>19</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_start</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>startpalmrun()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>73</x>
+     <y>652</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>14</x>
+     <y>63</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>drop_job</sender>
+   <signal>activated(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>enable_coupled()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>226</x>
+     <y>361</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>261</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>pushButton</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>choosejob()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>57</x>
+     <y>120</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>535</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>list_jobname</sender>
+   <signal>itemActivated(QListWidgetItem*)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>choosejob_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>313</x>
+     <y>178</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>430</x>
+     <y>0</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>drop_job</sender>
+   <signal>currentIndexChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>264</x>
+     <y>361</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>334</x>
+     <y>356</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_restarts</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>76</x>
+     <y>527</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>1</x>
+     <y>530</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_delete_tmp_files</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>80</x>
+     <y>547</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>3</x>
+     <y>562</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_verbose</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>61</x>
+     <y>567</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>5</x>
+     <y>623</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_b</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>139</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>67</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_F</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>164</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>103</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_I</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>454</x>
+     <y>189</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>129</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_k</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>214</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>158</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_O</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>239</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>188</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_x</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>282</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>255</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_host</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>127</x>
+     <y>434</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>26</x>
+     <y>362</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_pe</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>124</x>
+     <y>459</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>5</x>
+     <y>440</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_time</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>187</x>
+     <y>484</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>480</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_q</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>346</x>
+     <y>435</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>507</x>
+     <y>387</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_account</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>369</x>
+     <y>484</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>506</x>
+     <y>416</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_tpn</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>344</x>
+     <y>460</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>505</x>
+     <y>447</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_m</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>304</x>
+     <y>330</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>328</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_D</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>414</x>
+     <y>380</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>396</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_s</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>414</x>
+     <y>405</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>522</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_w</sender>
+   <signal>textEdited(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>414</x>
+     <y>446</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>612</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_user</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>414</x>
+     <y>479</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>650</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>button_clear</sender>
+   <signal>clicked()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>reset_window()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>299</x>
+     <y>654</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>689</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_M</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>414</x>
+     <y>355</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>599</x>
+     <y>287</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_quit</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_save</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>save_to_file()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_last</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>open_last()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_open</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>open_from_file()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_help</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>help()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_about</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>about_gui()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_default</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>save_default()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>479</x>
+     <y>366</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>line_jobname</sender>
+   <signal>textChanged(QString)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_lineinput()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>179</x>
+     <y>121</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>122</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_Z</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>check_flags()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>434</x>
+     <y>307</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>458</x>
+     <y>344</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_cycfill</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>274</x>
+     <y>585</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>4</x>
+     <y>510</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_start_jobmanager</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>start_jobmanager()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>458</x>
+     <y>344</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>action_start_watchdog</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>start_watchdog()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>458</x>
+     <y>344</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>check_svf</sender>
+   <signal>stateChanged(int)</signal>
+   <receiver>MainWindow</receiver>
+   <slot>change_rc_list()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>172</x>
+     <y>593</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>596</x>
+     <y>494</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+ <slots>
+  <slot>startpalmrun()</slot>
+  <slot>enable_advanced()</slot>
+  <slot>enable_coupled()</slot>
+  <slot>choosejob()</slot>
+  <slot>choosejob_list()</slot>
+  <slot>change_rc_list()</slot>
+  <slot>check_flags()</slot>
+  <slot>change_lineinput()</slot>
+  <slot>reset_window()</slot>
+  <slot>save_to_file()</slot>
+  <slot>open_from_file()</slot>
+  <slot>open_last()</slot>
+  <slot>about()</slot>
+  <slot>about_gui()</slot>
+  <slot>save_default()</slot>
+  <slot>help()</slot>
+  <slot>start_watchdog()</slot>
+  <slot>start_jobmanager()</slot>
+ </slots>
+</ui>
Index: /palm/tags/release-6.0/SCRIPTS/palmtest
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/palmtest	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/palmtest	(revision 3477)
@@ -0,0 +1,1387 @@
+#!/usr/bin/env python3
+# PYTHON_ARGCOMPLETE_OK
+
+import os
+import sys
+import shutil
+from datetime import datetime
+import subprocess
+import multiprocessing
+import socket
+import getpass
+import math
+import re
+import threading
+import queue
+from contextlib import ContextDecorator
+
+try:
+    from argparse import ArgumentParser
+    from argparse import RawTextHelpFormatter
+except ImportError:
+    sys.exit(
+        'ERROR: You need argparse!\n' +
+        '   install it from http://pypi.python.org/pypi/argparse\n' +
+        '   or run \"pip install argparse\".'
+    )
+
+try:
+    import numpy as np
+except ImportError:
+    sys.exit(
+        'ERROR: You need numpy!\n' +
+        '   install it from http://pypi.python.org/pypi/numpy\n' +
+        '   or run \"python3 -m pip install numpy\".'
+    )
+
+try:
+    import netCDF4
+except ImportError:
+    sys.exit(
+        'ERROR: You need netCDF4!\n' +
+        '   install it from http://pypi.python.org/pypi/netCDF4\n' +
+        '   or run \"python3 -m pip install netCDF4\".'
+    )
+
+try:
+    import yaml
+except ImportError:
+    sys.exit(
+        'ERROR: You need PyYAML!\n' +
+        '   install it from http://pypi.python.org/pypi/PyYAML\n' +
+        '   or run \"python3 -m pip install PyYAML\".'
+    )
+
+try:
+    import argcomplete
+except ImportError:
+    print(
+        'INFO: To use Tab-completion you need argcomplete!\n' +
+        '   install it from http://pypi.python.org/pypi/argcomplete\n' +
+        '   or run \"python3 -m pip install argcomplete\".'
+    )
+    has_argcomplete = False
+else:
+    has_argcomplete = True
+
+try:
+    from termcolor import colored as tcolored
+except ImportError:
+    def tcolored(string, color):
+        return string
+
+disable_colored_output = False
+
+
+def colored(string, color):
+    if not disable_colored_output:
+        return tcolored(string, color)
+    else:
+        return string
+
+
+version = '1.0.1'
+
+scripts_dir = os.path.dirname(os.path.realpath(__file__))
+trunk_dir = os.path.realpath(os.path.join(scripts_dir, '..'))
+workspace_dir = os.path.realpath(os.path.join(trunk_dir, '..'))
+
+trunk_tests_dir = os.path.join(trunk_dir, 'TESTS')
+trunk_tests_cases_dir = os.path.join(trunk_tests_dir, 'cases')
+trunk_tests_builds_dir = os.path.join(trunk_tests_dir, 'builds')
+
+tests_dir = os.path.join(workspace_dir, 'tests')
+
+available_cores = multiprocessing.cpu_count()
+terminal_columns, terminal_lines = shutil.get_terminal_size()
+hline = '#' * min(terminal_columns, 300) + '\n'
+table_width_intro = 12
+table_width_builds = len(max([s for s in next(os.walk(trunk_tests_builds_dir))[1] if not s[0] == '.'], key=len)) + len('_debug')
+table_width_cases = len(max([s for s in next(os.walk(trunk_tests_cases_dir))[1] if not s[0] == '.'], key=len))
+table_width_cores = 7
+table_width_total = table_width_intro + table_width_builds + table_width_cases + table_width_cores + 3
+
+task_table_line_template = \
+    '{:' + str(table_width_intro) + '} ' + \
+    '{:' + str(table_width_cases) + '} ' + \
+    '{:' + str(table_width_builds) + '} ' + \
+    '{:' + str(table_width_cores) + '} '
+
+config_table_line_template = \
+    '{:' + str(table_width_intro) + '} ' + \
+    '{:' + str(max(table_width_builds, table_width_cases)) + '} ' + \
+    '{:8} '
+
+file_table_line_template = \
+    '{:' + str(table_width_intro) + '} ' + \
+    '{:' + str(table_width_cases + 13) + '} '
+
+# for debugging
+exist_ok = False
+
+
+class SignificantDigitsRounder:
+
+    @staticmethod
+    def _round(value, digits=10):
+        if value == 0.0:
+            return value
+        negative = value < 0.0
+        value = -value if negative else value
+        rounded_value = round(value, -int(math.floor(math.log10(value))) + (digits - 1))
+        rounded_value = -rounded_value if negative else rounded_value
+        return rounded_value
+
+
+    vectorized_round = np.vectorize(_round)
+
+    _vectorized_round = np.vectorize(round)
+
+
+    @classmethod
+    def around(cls, array, digits=10):
+        # TODO: divide both arrays and check decimal point
+        sign_mask = np.ma.masked_where(array >= 0.0, array).mask
+        pos_array = np.where(sign_mask, array, -array)
+        non_zero_maks = np.ma.masked_where(pos_array == 0.0, pos_array).mask
+        non_zero_array = np.where(non_zero_maks, 1.0, pos_array)
+        i1 = -np.floor(np.log10(non_zero_array)).astype(int) + (digits - 1)
+        rounded_non_zero_array = cls._vectorized_round(non_zero_array, i1)
+        rounded_pos_array = np.where(non_zero_maks, 0.0, rounded_non_zero_array)
+        return np.where(sign_mask, rounded_pos_array, -rounded_pos_array)
+
+
+
+class Logger(ContextDecorator):
+
+    def __init__(self, logfile_dir, logfile_name='palmtest.log', logfile_mode='a', verbose=False):
+        self.logfile_path = os.path.join(logfile_dir, logfile_name)
+        self.logfile_mode = logfile_mode
+        self.verbose = verbose
+
+    def __enter__(self):
+        self._file = open(self.logfile_path, self.logfile_mode)
+        return self
+
+    def to_file(self, message):
+        self._file.write(message)
+        self._file.flush()
+
+    def to_log(self, message):
+        if self.verbose:
+            sys.stdout.write(message)
+            sys.stdout.flush()
+        self._file.write(message)
+        self._file.flush()
+
+    def to_all(self, message):
+        sys.stdout.write(message)
+        sys.stdout.flush()
+        self._file.write(message)
+        self._file.flush()
+
+    def __exit__(self, *exc):
+        self._file.close()
+        return False
+
+
+class Executor:
+
+    @staticmethod
+    def _enqueue_output(out, queue):
+        for line in iter(out.readline, b''):
+            queue.put(line)
+        out.close()
+
+    @staticmethod
+    def execute(cmd, cwd='.', verbose=True, dry_run=False):
+        assert isinstance(cmd, list)
+        if dry_run:
+            cmd = ['echo'] + cmd
+        cmd_str = ' '.join(cmd)
+        p = subprocess.Popen(cmd_str, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, bufsize=1)
+        q = queue.Queue()
+        t = threading.Thread(target=Executor._enqueue_output, args=(p.stdout, q))
+        t.daemon = True # thread dies with the program
+        t.start()
+
+        with Logger(cwd, verbose=verbose) as logger:
+            # read line without blocking
+            logger.to_log(hline)
+            logger.to_log('CMD: ' + cmd_str + '\n')
+            logger.to_log(hline)
+            while t.is_alive():
+                try:
+                    line = q.get_nowait()  # or q.get(timeout=.1)
+                except queue.Empty:
+                    pass  # print('no output yet')
+                else:  # got line
+                    logger.to_log(line.decode("utf-8"))
+            line = True
+            while line:
+                try:
+                    line = q.get_nowait()  # or q.get(timeout=.1)
+                except queue.Empty:
+                    line = False
+                else:  # got line
+                    logger.to_log(line.decode("utf-8"))
+            logger.to_log(hline)
+
+        rc = p.poll()
+        failed = rc != 0
+        return failed
+
+
+class NetCDFInterface:
+
+    def __init__(self, filename):
+        self.filename = filename
+
+    def is_healthy(self):
+        try:
+            self.get_run_name()
+        except:
+            return False
+        else:
+            return True
+
+    def get_run_name(self):
+        with netCDF4.Dataset(self.filename, mode='r') as netcdf:
+            l = getattr(netcdf, 'title').split()
+            i = l.index('run:')
+            return l[i+1]
+
+    def get_var_list(self):
+        with netCDF4.Dataset(self.filename, mode='r') as netcdf:
+            var_list = getattr(netcdf, 'VAR_LIST').split(';')
+            var_list = filter(None, var_list)
+            return sorted(var_list)
+
+    def show_content(self):
+        with netCDF4.Dataset(self.filename, mode='r') as netcdf:
+            for name in netcdf.ncattrs():
+                print("Global attr", name, "=", getattr(netcdf, name))
+            print(netcdf)
+            for v in netcdf.variables:
+                print(v)
+
+    def get_times_list(self):
+        attributes, times = self.read_var('time')
+        times = [str(time) for time in times]
+        times = list(filter(None, times))
+        return times
+
+    def contains(self, variable):
+        return variable in self.get_var_list()
+
+    def read_var(self, variable):
+        with netCDF4.Dataset(self.filename, mode='r') as netcdf:
+            values = netcdf.variables[variable][:]  # extract values
+            attributes = dict(
+                long_name=netcdf.variables[variable].name,
+                unit=netcdf.variables[variable].units,
+            )
+        return attributes, values
+
+
+class FileComparator:
+
+    @staticmethod
+    def compare_ascii(file_path1, file_path2, start_string=None):
+        try:
+            with open(file_path1, 'r') as file1:
+                content1 = file1.readlines()
+        except OSError:
+            return True, colored('[reference file not found]', 'red')
+        try:
+            with open(file_path2, 'r') as file2:
+                content2 = file2.readlines()
+        except OSError:
+            return True, colored('[output file not found]', 'red')
+        if start_string:
+            index1 = content1.index(start_string)
+            index2 = content2.index(start_string)
+            comparable_content1 = content1[index1:]
+            comparable_content2 = content2[index2:]
+            ln = index2 + 1
+        else:
+            comparable_content1 = content1
+            comparable_content2 = content2
+            ln = 1
+        if len(comparable_content1) != len(comparable_content2):
+            return True, colored('[mismatch in total number of lines]', 'red')
+        for line1, line2 in zip(comparable_content1, comparable_content2):
+                if not line1 == line2:
+                    return True, colored('[mismatch in content starting line ' + str(ln) + ']', 'red')
+                ln += 1
+        return False, colored('[file ok]', 'green')
+
+    @staticmethod
+    def compare_netcdf(file_path1, file_path2, digits=None):
+        nci1 = NetCDFInterface(file_path1)
+        nci2 = NetCDFInterface(file_path2)
+        if not nci1.is_healthy():
+            return True, colored('[reference file not found]', 'red')
+        if not nci2.is_healthy():
+            return True, colored('[output file not found]', 'red')
+        times_list1 = nci1.get_times_list()
+        times_list2 = nci2.get_times_list()
+        if not times_list1 == times_list2:
+            return True, colored('[wrong time dimension]', 'red')
+        else:
+            time_list = times_list1
+        var_list1 = nci1.get_var_list()
+        var_list2 = nci2.get_var_list()
+        if not var_list1 == var_list2:
+            return True, colored('[wrong set of variables]', 'red')
+        else:
+            var_list = var_list1
+        content1 = dict()
+        content2 = dict()
+        for var in var_list:
+            attributes1, values1 = nci1.read_var(var)
+            attributes2, values2 = nci2.read_var(var)
+            if sorted(attributes1.keys()) != sorted(attributes2.keys()):
+                return True, colored('[wrong set of attributes in variable \"'+var+'\"]', 'red')
+            if isinstance(digits, int):
+                values1 = SignificantDigitsRounder.around(values1, digits=digits)
+                values2 = SignificantDigitsRounder.around(values2, digits=digits)
+            content1[var] = values1
+            content2[var] = values2
+        #for decimals in
+        for i, time in enumerate(time_list):
+            for var in var_list:
+                t_content1 = content1[var][i]
+                t_content2 = content2[var][i]
+                if not (t_content1==t_content2).all():
+                    if isinstance(digits, int):
+                        return True, colored('[1st mismatch within ' + str(digits) + ' digits at time index ' + str(i) + ' in variable \"' + var + '\"]', 'red')
+                    else:
+                        return True, colored('[1st mismatch at time index ' + str(i) + ' in variable \"' + var + '\"]', 'red')
+        return False, colored('[file ok]', 'green')
+
+
+class OutputChecker:
+
+    def __init__(self, test_dir, setup_name, build_name, cores, significant_digits=None, verbose=True, dry_run=False):
+        self.test_dir = test_dir
+        self.setup_name = setup_name
+        self.build_name = build_name
+        self.cores = cores
+        self.significant_digits = significant_digits
+        self.verbose = verbose
+        self.dry_run = dry_run
+        self.job_name = self.setup_name + '__' + build_name + '__' + str(self.cores)
+        self.job_dir = os.path.join(self.test_dir, 'JOBS', self.job_name)
+        self.ref_monitoring_dir = os.path.join(trunk_tests_cases_dir, self.setup_name, 'MONITORING')
+        self.ref_output_dir = os.path.join(trunk_tests_cases_dir, self.setup_name, 'OUTPUT')
+        self.res_monitoring_dir = os.path.join(self.job_dir, 'MONITORING')
+        self.res_output_dir = os.path.join(self.job_dir, 'OUTPUT')
+        self.failed = None
+
+    def get_checkable_file_dicts(self):
+        if os.path.isdir(self.ref_monitoring_dir):
+            file_names_monitoring = [s for s in next(os.walk(self.ref_monitoring_dir))[2]]
+        else:
+            file_names_monitoring = []
+        file_paths_monitoring = []
+        for file_name in file_names_monitoring:
+            file_specific_ending = file_name[len(self.setup_name):]
+            file_specific_ending_split = file_specific_ending.split('.')
+            postfix = file_specific_ending_split[0]
+            if len(file_specific_ending_split) > 1:
+                extension = file_specific_ending_split[-1]
+            else:
+                extension = ''
+            if len(file_specific_ending_split) > 2:
+                cycle_info = file_specific_ending_split[1: -1]
+            else:
+                cycle_info = []
+            file_paths_monitoring.append(
+                dict(
+                    postfix=postfix,
+                    cycle_info=cycle_info,
+                    extension=extension,
+                    ref_path=self.ref_monitoring_dir,
+                    res_path=self.res_monitoring_dir,
+                )
+            )
+        if os.path.isdir(self.ref_output_dir):
+            file_names_output = [s for s in next(os.walk(self.ref_output_dir))[2]]
+        else:
+            file_names_output = []
+        file_paths_output = []
+        for file_name in file_names_output:
+            file_specific_ending = file_name[len(self.setup_name):]
+            file_specific_ending_split = file_specific_ending.split('.')
+            postfix = file_specific_ending_split[0]
+            if len(file_specific_ending_split) > 1:
+                extension = file_specific_ending_split[-1]
+            else:
+                extension = ''
+            if len(file_specific_ending_split) > 2:
+                cycle_info = file_specific_ending_split[1: -1]
+            else:
+                cycle_info = []
+            file_paths_output.append(
+                dict(
+                    postfix=postfix,
+                    cycle_info=cycle_info,
+                    extension=extension,
+                    ref_path=self.ref_output_dir,
+                    res_path=self.res_output_dir,
+                )
+            )
+        return file_paths_monitoring + file_paths_output
+
+    def check(self):
+        with Logger(self.test_dir, verbose=self.verbose) as logger:
+            logger.to_log('Checking output files:')
+            logger.to_all('\n')
+            failed = False
+            for file_dict in self.get_checkable_file_dicts():
+                file_failed = False
+                ext_list = [file_dict['extension']] if file_dict['extension'] else []
+                file_specific_ending = '.'.join([file_dict['postfix']] + file_dict['cycle_info'] + ext_list )
+                logger.to_all(file_table_line_template.format('Checking:', self.setup_name + file_specific_ending))
+                ref_file_path = os.path.join(file_dict['ref_path'], self.setup_name + file_specific_ending)
+                res_file_path = os.path.join(file_dict['res_path'], self.job_name + file_specific_ending)
+                if re.match('_rc', file_dict['postfix']) and not file_dict['extension']:
+                    file_failed, message = FileComparator.compare_ascii(ref_file_path, res_file_path, start_string='Run-control output:\n')
+                elif re.match('nc', file_dict['extension']):
+                    if self.significant_digits is not None:
+                        if re.match('_ts', file_dict['postfix']) and 'timeseries' in self.significant_digits:
+                            file_failed, message = FileComparator.compare_netcdf(ref_file_path, res_file_path,
+                                                                                 digits=self.significant_digits['timeseries'])
+                        elif re.match('_pr', file_dict['postfix']) and 'profiles' in self.significant_digits:
+                            file_failed, message = FileComparator.compare_netcdf(ref_file_path, res_file_path,
+                                                                                 digits=self.significant_digits['profiles'])
+                        else:
+                            file_failed, message = FileComparator.compare_netcdf(ref_file_path, res_file_path,
+                                                                                 digits=self.significant_digits['other'])
+                    else:
+                        file_failed, message = FileComparator.compare_netcdf(ref_file_path, res_file_path)
+                else:
+                    message = colored('[ignored]', 'blue')
+                if file_failed:
+                    failed = True
+                logger.to_all(message + '\n')
+            if self.dry_run:
+                failed = False
+        return failed
+
+
+class PALMJob:
+    """The PALM job class deals with the execution of a single PALM job"""
+
+    @staticmethod
+    def get_job_name(setup_name, build_name, cores):
+        return setup_name + '__' + build_name + '__' + str(cores)
+
+    def __init__(self, test_dir, test_case, build_name, cores, verbose=False, dry_run=False):
+        self.test_dir = test_dir
+        self.test_case = test_case
+        self.build_name = build_name
+        self.cores = cores
+        self.verbose = verbose
+        self.dry_run = dry_run
+
+        self.attempted_debug = False
+        self.failed_debug = None
+        self.attempted_non_debug = False
+        self.failed_non_debug = None
+
+    def _link_restart_files(self, build_name):
+        if self.dry_run:
+            return True, colored('[restart data dry]', 'blue')
+        name = self.get_job_name(self.test_case.name, build_name, self.cores)
+        source_name = self.get_job_name(self.test_case.use_binary_files_from, build_name, self.cores)
+        source_restart_dir = os.path.join(self.test_dir, 'JOBS', source_name, 'RESTART')
+        try:
+            source_data_dirs_grp = [d for r, d, f in os.walk(source_restart_dir)]
+        except:
+            source_data_dirs_grp = []
+        if len(source_data_dirs_grp) == 0:
+            source_data_dirs = []
+        else:
+            source_data_dirs = source_data_dirs_grp[0]
+        if len(source_data_dirs) == 0 and re.match('.+_debug', build_name):
+            source_build_name = build_name[:-len('_debug')]
+            source_name = self.get_job_name(self.test_case.use_binary_files_from, source_build_name, self.cores)
+            source_restart_dir = os.path.join(self.test_dir, 'JOBS', source_name, 'RESTART')
+            try:
+                source_data_dirs_grp = [d for r, d, f in os.walk(source_restart_dir)]
+            except:
+                source_data_dirs_grp = []
+            if len(source_data_dirs_grp) == 0:
+                source_data_dirs = []
+            else:
+                source_data_dirs = source_data_dirs_grp[0]
+        if len(source_data_dirs) == 0:
+            source_data_dir = 'no_restart_data'
+        else:
+            source_data_dir = sorted(source_data_dirs)[-1]
+        source_data_dir_path = os.path.join(source_restart_dir, source_data_dir)
+        if os.path.isdir(source_data_dir_path) and re.match('.+_d3d.*', source_data_dir):
+            job_restart_dir = os.path.join(self.test_dir, 'JOBS', name, 'RESTART')
+            os.makedirs(job_restart_dir, exist_ok=exist_ok)
+            job_data_dir_path = os.path.join(job_restart_dir, name + '_d3d')
+            os.symlink(source_data_dir_path, job_data_dir_path, target_is_directory=True)
+            return False, colored('[linked restart data from: ' + source_data_dir_path + ']', 'green')
+        else:
+            return True, colored('[no restart data found]', 'red')
+
+    def _execute(self, name, build_name):
+        execution_failed = Executor.execute(
+            [
+                os.path.join(self.test_dir, 'trunk', 'SCRIPTS', 'palmrun'),
+                '-c', '\"' + build_name + '\"',
+                '-r', name,
+                '-a', '\"' + ' '.join(self.test_case.activation_strings) + '\"',
+                '-X', str(self.cores),
+                '-T', str(self.cores),
+                '-B',
+                '-v',
+                '-z',
+            ],
+            cwd=self.test_dir,
+            verbose=self.verbose,
+            dry_run=self.dry_run,
+        )
+
+        if self.dry_run:
+            return False, colored('[execution dry]', 'blue')
+        elif execution_failed:
+            return True, colored('[execution failed]', 'red')
+        else:
+            return False, colored('[execution ok]', 'green')
+
+    def _check(self, build_name):
+        checker = OutputChecker(
+            self.test_dir,
+            self.test_case.name,
+            build_name,
+            self.cores,
+            significant_digits=self.test_case.significant_digits,
+            verbose=self.verbose,
+            dry_run=self.dry_run,
+        )
+        check_failed = checker.check()
+
+        if self.dry_run:
+            return False, colored('[checks dry]', 'blue')
+        if check_failed:
+            return True, colored('[checks failed]', 'red')
+        else:
+            return False, colored('[checks ok]', 'green')
+
+    def execute(self, debug=False):
+        if debug:
+            attempted = self.attempted_debug
+            build_name = self.build_name + '_debug'
+            failed = self.failed_debug
+        else:
+            attempted = self.attempted_non_debug
+            build_name = self.build_name
+            failed = self.failed_non_debug
+
+        if not attempted:
+            with Logger(self.test_dir, verbose=self.verbose) as logger:
+                status_prefix = task_table_line_template.format('Testing:', self.test_case.name, build_name, self.cores)
+                logger.to_all(status_prefix)
+                logger.to_log('[started]' + '\n')
+                attempted = True
+
+                name = self.get_job_name(self.test_case.name, build_name, self.cores)
+
+                input_dir = os.path.join(self.test_dir, 'JOBS', name, 'INPUT')
+                os.makedirs(input_dir, exist_ok=exist_ok)
+
+                # copying needs to be done per file, because input files need to be renamed
+                for input_file in self.test_case.input_file_names:
+                    postfix = input_file[len(self.test_case.name):]
+                    src = os.path.join(self.test_case.input_dir, input_file)
+                    dst = os.path.join(input_dir, name + postfix)
+                    shutil.copy(src, dst)
+
+                # copying the entire directory is ok, because source files do not need to be renamed
+                user_code_dir = os.path.join(self.test_dir, 'JOBS', name, 'USER_CODE')
+                if os.path.isdir(self.test_case.user_code_dir):
+                    shutil.copytree(self.test_case.user_code_dir, user_code_dir, copy_function=shutil.copy)
+
+                if self.test_case.requires_binary_files:
+                    link_restart_files_failed, message = self._link_restart_files(build_name)
+                    logger.to_log(status_prefix)
+                    logger.to_log(message + ' ')
+                    logger.to_log('\n')
+
+                failed, message = self._execute(name, build_name)
+                logger.to_log(status_prefix)
+                logger.to_all(message + ' ')
+                logger.to_log('\n')
+
+                failed, message = self._check(build_name)
+                logger.to_log(status_prefix)
+                logger.to_log(message + ' ')
+
+                logger.to_all('\n')
+
+        if debug:
+            self.attempted_debug = attempted
+            self.failed_debug = failed
+        else:
+            self.attempted_non_debug = attempted
+            self.failed_non_debug = failed
+
+        return failed
+
+    def status(self):
+        return dict(
+            attempted=self.attempted_non_debug or self.attempted_debug,
+            failed=self.failed_non_debug and self.failed_debug,
+            debugged=self.attempted_debug,
+            non_debug_failed=self.failed_non_debug,
+        )
+
+
+class PALMBuild:
+    """The PALM build class deals with configuration and execution of all required PALM builds"""
+
+    def __init__(self, test_dir, build_name, verbose=False, dry_run=False):
+        self.test_dir = test_dir
+        self.build_name = build_name
+        self.verbose = verbose
+        self.dry_run = dry_run
+        self.configured = False
+        self.executed = False
+        self.available = False
+        self.requires_mpi = False
+        self.requires_netcdf = False
+        self.requires_fftw = False
+        self.requires_rrtmg = False
+        self.attempted_non_debug = False
+        self.attempted_debug = False
+        self.failed_non_debug = None
+        self.failed_debug = None
+
+    def configure(self):
+        try:
+            with open(os.path.join(trunk_tests_builds_dir, self.build_name, 'build_config.yml'), 'r') as f:
+                build_config = yaml.load(f)
+        except:
+            return True, colored('[build not found]', 'red')
+
+        if 'compiler' in build_config:
+            self.compiler = build_config['compiler']
+        else:
+            return True, colored('[missing \"compiler\" keyword]', 'red')
+
+        if not isinstance(self.compiler, dict):
+            return True, colored('[\"compiler\" keyword must be dict]', 'red')
+
+        if 'linker' in build_config:
+            self.linker = build_config['linker']
+        else:
+            return True, colored('[missing \"linker\" keyword]', 'red')
+
+        if not isinstance(self.linker, dict):
+            return True, colored('[\"linker\" keyword must be dict]', 'red')
+
+        if 'mpi_wrapper' in self.compiler:
+            if 'mpi_wrapper}}' in self.compiler['mpi_wrapper']:
+                self.requires_mpi = True
+        else:
+            return True, colored('[missing \"mpi_wrapper\" keyword]', 'red')
+
+        if 'includes' in self.compiler:
+            for include in self.compiler['includes']:
+                if 'include.netcdf}}' in include:
+                    self.requires_netcdf = True
+                if 'include.fftw}}' in include:
+                    self.requires_fftw = True
+                if 'include.rrtmg}}' in include:
+                    self.requires_rrtmg = True
+        else:
+            return True, colored('[missing \"includes\" keyword in compiler]', 'red')
+
+        if 'options' in self.linker:
+            for lib in self.linker['options']:
+                if 'lib.netcdf}}' in lib:
+                    self.requires_netcdf = True
+                if 'lib.fftw}}' in lib:
+                    self.requires_fftw = True
+                if 'lib.rrtmg}}' in lib:
+                    self.requires_rrtmg = True
+        else:
+            return True, colored('[missing \"options\" keyword in linker]', 'red')
+
+        library_names = []
+        if self.requires_netcdf:
+            library_names.append('netcdf')
+        if self.requires_fftw:
+            library_names.append('fftw')
+        if self.requires_rrtmg:
+            library_names.append('rrtmg')
+
+        if not 'executable' in self.compiler:
+            return True, colored('[missing \"executable\" keyword in compiler]', 'red')
+
+        if not 'definitions' in self.compiler:
+            return True, colored('[missing \"definitions\" keyword in compiler]', 'red')
+
+        if not 'options' in self.compiler:
+            return True, colored('[missing \"options\" keyword in compiler]', 'red')
+
+        if not 'default' in self.compiler['options']:
+            return True, colored('[missing \"default\" keyword in compiler.options]', 'red')
+
+        if not 'debug' in self.compiler['options']:
+            return True, colored('[missing \"debug\" keyword in compiler.options]', 'red')
+
+        try:
+            with open(os.path.join(workspace_dir, 'palmtest.yml'), 'r') as f:
+                palmtest_config = yaml.load(f)
+        except:
+            return True, colored('[palmtest.yml not found]', 'red')
+
+        if 'palm_config_template' in palmtest_config:
+            if isinstance(palmtest_config['palm_config_template'], str):
+                custom_template = palmtest_config['palm_config_template']
+        try:
+            with open(os.path.join(custom_template), 'r') as palm_config_template_file:
+                template = palm_config_template_file.read()
+        except:
+            try:
+                with open(os.path.join(scripts_dir, '.palm.config.default.in'), 'r') as palm_config_template_file:
+                    template = palm_config_template_file.read()
+            except:
+                return True, colored('[trunk/SCRIPTS/.palm.config.default.in not found]', 'red')
+
+        template = template.replace('@CMAKE_INSTALL_PREFIX@', self.test_dir)
+        template = template.replace('@PALM_HOSTNAME@', socket.gethostname())
+        template = template.replace('@CMAKE_USERNAME@', getpass.getuser())
+        template = template.replace('@MPI_Fortran_COMPILER@', self.compiler['mpi_wrapper'])
+        template = template.replace('@CMAKE_Fortran_COMPILER@', self.compiler['executable'])
+        cpp_options_str = ['-D' + s for s in self.compiler['definitions']]
+        template = template.replace('@PALM_CPP_OPTIONS_STR@', ' '.join(cpp_options_str))
+        template = template.replace('@PALM_CORES@', str(available_cores))
+        template = template.replace('@PALM_COMPILER_OPTIONS@', '{{palmtest.compiler.options}} ' + ' '.join(self.compiler['includes']))
+        template = template.replace('@PALM_LINKER_OPTIONS@', ' '.join(self.linker['options']))
+
+        if 'environments' in palmtest_config:
+            available_environments = palmtest_config['environments']
+        else:
+            return True, colored('[missing \"environments\" keyword in palmtest.yml]', 'red')
+
+        if 'id' in self.compiler:
+            c_id = self.compiler['id']
+        else:
+            return True, colored('[missing \"id\" keyword in compiler]', 'red')
+
+        if c_id in available_environments:
+            self.available = True
+
+            environment = available_environments[c_id]
+            if 'executable' not in environment:
+                return True, colored('[palmtest.yml environment \"' + c_id + '\" has no \"executable\"]', 'red')
+            value = environment['executable']
+            if isinstance(value, str):
+                template = template.replace('{{' + '.'.join([c_id, 'executable']) + '}}', value)
+            if self.requires_mpi:
+                if 'mpi_wrapper' not in environment:
+                    return True, colored('[palmtest.yml environment \"' + c_id + '\" has no \"mpi_wrapper\"]', 'red')
+                value = environment['mpi_wrapper']
+                if isinstance(value, str):
+                    template = template.replace('{{' + '.'.join([c_id, 'mpi_wrapper']) + '}}', value)
+            if 'include' not in environment:
+                return True, colored('[palmtest.yml environment \"' + c_id + '\" has no \"include\"]', 'red')
+            if 'lib' not in environment:
+                return True, colored('[palmtest.yml environment \"' + c_id + '\" has no \"lib\"]', 'red')
+            for lib in library_names:
+                if lib not in environment['include']:
+                    return True, colored('[palmtest.yml environment \"' + c_id + '\" has no \"include.'+lib+'\"]', 'red')
+                value = environment['include'][lib]
+                if isinstance(value, str):
+                    template = template.replace('{{' + '.'.join([c_id, 'include', lib]) + '}}', value)
+                if lib not in environment['lib']:
+                    return True, colored('[palmtest.yml environment \"' + c_id + '\" has no \"lib.'+lib+'\"]', 'red')
+                value = environment['lib'][lib]
+                if isinstance(value, str):
+                    template = template.replace('{{' + '.'.join([c_id, 'lib', lib]) + '}}', value)
+
+            with open(os.path.join(self.test_dir, '.palm.config.' + self.build_name), 'w') as palm_config_file:
+                palm_config_file.write(
+                    template.replace(
+                        '{{palmtest.compiler.options}}',
+                        ' '.join(self.compiler['options']['default']),
+                    )
+                )
+            with open(os.path.join(self.test_dir, '.palm.config.' + self.build_name + '_debug'), 'w') as palm_config_file:
+                palm_config_file.write(
+                    template.replace(
+                        '{{palmtest.compiler.options}}',
+                        ' '.join(self.compiler['options']['debug']),
+                    )
+                )
+            self.configured = True
+            return False, colored('[configuration ok]', 'green')
+
+        else:
+            return True, colored('[palmtest.yml environment \"' + c_id + '\" not found]', 'red')
+
+    def _execute(self, build_name):
+        self.attempted = True
+        build_failed = Executor.execute(
+            [
+                os.path.join(self.test_dir, 'trunk', 'SCRIPTS', 'palmbuild'),
+                '-c', '\"' + build_name + '\"',
+                '-v',
+            ],
+            cwd=self.test_dir,
+            verbose=self.verbose,
+            dry_run=self.dry_run,
+        )
+
+        if self.dry_run:
+            return False, colored('[build dry]', 'blue')
+        if build_failed:
+            return True, colored('[build failed]', 'red')
+        else:
+            return False, colored('[build ok]', 'green')
+
+    def build(self, debug=False):
+        if debug:
+            attempted = self.attempted_debug
+            build_name = self.build_name + '_debug'
+            failed = self.failed_debug
+        else:
+            attempted = self.attempted_non_debug
+            build_name = self.build_name
+            failed = self.failed_non_debug
+
+        if not attempted:
+            with Logger(self.test_dir, verbose=self.verbose) as logger:
+                status_prefix = task_table_line_template.format('Building:', '', build_name, '')
+                logger.to_all(status_prefix)
+                logger.to_log('[started]' + '\n')
+                attempted = True
+
+                failed, message = self._execute(build_name)
+                logger.to_log(status_prefix)
+                logger.to_all(message + ' ')
+                logger.to_all('\n')
+
+        if debug:
+            self.attempted_debug = attempted
+            self.failed_debug = failed
+        else:
+            self.attempted_non_debug = attempted
+            self.failed_non_debug = failed
+
+        return failed
+
+    def report(self):
+        return dict(
+            failed_debug=self.failed_debug,
+            failed_non_debug=self.failed_non_debug,
+        )
+
+
+class PALMTestCase:
+    """The PALM test case class deals with the configuration and execution of all PALM test cases"""
+
+    def __init__(self,test_dir,  name, verbose=False, dry_run=False):
+        self.test_dir = test_dir
+        self.name = name
+        self.verbose = verbose
+        self.dry_run = dry_run
+        self.user_code_dir = os.path.join(trunk_tests_cases_dir, self.name, 'USER_CODE')
+        self.input_dir = os.path.join(trunk_tests_cases_dir, self.name, 'INPUT')
+        self.number_of_cores = []
+        self.build_names = []
+        self.input_file_names = []
+        self.configured = False
+
+    def configure(self, requested_build_names, requested_cores):
+        f_name = os.path.join(trunk_tests_cases_dir, self.name, 'case_config.yml')
+        try:
+            with open(f_name, 'r') as f:
+                config = yaml.load(f)
+        except:
+            return True, colored('[Case \"' + self.name + '\" could not be found.]', 'red')
+        try:
+            self.use_binary_files_from = config['use_binary_files_from']
+        except:
+            self.use_binary_files_from = None
+        self.requires_binary_files = bool(self.use_binary_files_from)
+
+        if 'allowed_builds' not in config:
+            return True, colored('[missing \"allowed_builds\" keyword]', 'red')
+        self.allowed_build_names = config['allowed_builds']
+
+        if 'allowed_number_of_cores' not in config:
+            return True, colored('[missing \"allowed_number_of_cores\" keyword]', 'red')
+        self.allowed_number_of_cores = config['allowed_number_of_cores']
+
+        if 'activation_strings' not in config:
+            return True, colored('[missing \"activation_strings\" keyword]', 'red')
+        self.activation_strings = config['activation_strings']
+
+        if 'significant_digits_for_netcdf_checks' not in config:
+            return True, colored('[missing \"significant_digits_for_netcdf_checks\" keyword]', 'red')
+        self.significant_digits = config['significant_digits_for_netcdf_checks']
+
+        if 'timeseries' not in config['significant_digits_for_netcdf_checks']:
+            return True, colored('[missing \"timeseries\" keyword in significant_digits_for_netcdf_checks]', 'red')
+
+        if 'profiles' not in config['significant_digits_for_netcdf_checks']:
+            return True, colored('[missing \"profiles\" keyword in significant_digits_for_netcdf_checks]', 'red')
+
+        if 'other' not in config['significant_digits_for_netcdf_checks']:
+            return True, colored('[missing \"other\" keyword in significant_digits_for_netcdf_checks]', 'red')
+
+        self.number_of_cores = sorted(set(requested_cores).intersection(self.allowed_number_of_cores))
+        self.build_names = sorted(set(requested_build_names).intersection(self.allowed_build_names))
+        self.input_file_names = [s for s in next(os.walk(self.input_dir))[2]]
+        self.configured = True
+        if len(self.number_of_cores) == 0 :
+            return True, colored('[no allowed cores requested]', 'blue')
+        if len(self.build_names) == 0:
+            return True, colored('[no allowed builds requested]', 'blue')
+        if len(self.input_file_names) == 0:
+            return True, colored('[no input files found]', 'red')
+        return False, colored('[configuration ok]', 'green')
+
+
+
+class PALMTest:
+
+    def __init__(self, args):
+        self.verbose = args.verbose
+        self.no_auto_debug = args.no_auto_debug
+        self.force_debug = args.force_debug
+        self.fail_on_debug = args.fail_on_debug
+        self.dry_run = args.dry_run
+        self.no_color = args.no_color
+        self.test_id = args.test_id
+        self.test_case_names = args.cases
+        self.requested_build_names = args.builds
+        self.requested_cores = args.cores
+        self.test_case_queue = []
+        self.build_database = dict()
+
+    def prepare(self):
+        global disable_colored_output
+        disable_colored_output = self.no_color
+        self.test_dir = os.path.join(tests_dir, self.test_id)
+        try:
+            os.makedirs(self.test_dir, exist_ok=exist_ok)
+        except:
+            print('ERROR: Found existing test directory: ' + self.test_dir)
+            exit(1)
+        with Logger(self.test_dir, verbose=self.verbose) as logger:
+            logger.to_all(hline)
+            logger.to_all('This is the PALM tester  (version: ' + version + ')' + '\n')
+            logger.to_all(hline)
+            try:
+                with open(os.path.join(workspace_dir, 'palmtest.yml'), 'r') as f:
+                    pass
+            except:
+                logger.to_all('ERROR: No palmtest.yml file was found in your working directory!\n')
+                logger.to_all('INFO:  A template for this file can be found at: trunk/TESTS/palmtest.yml\n')
+                logger.to_all('       Please copy the template to your working directory and adjust it to your system!\n')
+                exit(1)
+
+            self.execution_trunk_dir = os.path.join(self.test_dir, 'trunk')
+            os.symlink(trunk_dir, self.execution_trunk_dir)
+            self.execution_jobs_dir = os.path.join(self.test_dir, 'JOBS')
+            os.makedirs(self.execution_jobs_dir, exist_ok=exist_ok)
+
+            try:
+                with open(os.path.join(scripts_dir, '.palm.iofiles'), 'r') as iofiles_template_file:
+                    iofiles_template = iofiles_template_file.read()
+                with open(os.path.join(self.test_dir, '.palm.iofiles'), 'w') as iofiles_file:
+                    iofiles_file.write(iofiles_template.replace('$fast_io_catalog', '$base_data'))
+            except:
+                logger.to_all('ERROR: No .palm.iofiles file was found in trunk/SCRIPTS/')
+                exit(1)
+
+            final_cores_list = list(filter(lambda x: x <= available_cores, self.requested_cores))
+
+            logger.to_all(config_table_line_template.format('Object:', 'Name:', 'Action:') + 'Status:\n')
+            logger.to_all(hline)
+
+            if 'all' in self.requested_build_names:
+                self.requested_build_names = [name for name in next(os.walk(trunk_tests_builds_dir))[1] if not name[0] == '.']
+            found_build_names = []
+            for build_name in self.requested_build_names:
+                build = PALMBuild(self.test_dir, build_name, verbose=self.verbose, dry_run=self.dry_run)
+                configuration_failed, message = build.configure()
+                if not configuration_failed:
+                    self.build_database[build_name] = build
+                    found_build_names.append(build_name)
+                    logger.to_all(config_table_line_template.format('Build', build_name, 'approved'))
+                    logger.to_all(message + '\n')
+                else:
+                    logger.to_all(config_table_line_template.format('Build', build_name, 'rejected'))
+                    logger.to_all(message + '\n')
+            final_build_list = found_build_names
+
+            if 'all' in self.test_case_names:
+                self.test_case_names = sorted([name for name in next(os.walk(trunk_tests_cases_dir))[1] if not name[0] == '.'])
+
+            additional_initial_runs_2 = [self.test_case_names]
+            while len(additional_initial_runs_2[-1]) > 0:
+                additional_initial_runs_1 = []
+                for test_case_name in additional_initial_runs_2[-1]:
+                    test_case = PALMTestCase(self.test_dir, test_case_name, verbose=self.verbose)
+                    test_case_configuration_failed, message = test_case.configure(final_build_list, final_cores_list)
+                    if not test_case_configuration_failed:
+                        if test_case.requires_binary_files:
+                            additional_initial_runs_1.append(test_case.use_binary_files_from)
+                additional_initial_runs_2.append(sorted(set(additional_initial_runs_1)))
+
+            test_case_order = []
+            for i in range(len(additional_initial_runs_2)-1):
+                # low and high refer to priority
+                low = additional_initial_runs_2[i]
+                high = additional_initial_runs_2[i+1]
+                for item in high:
+                    while item in low:
+                        low.remove(item)
+                test_case_order.append(low)
+
+            test_case_order_no_dublicates = []
+            for test_cases in test_case_order:
+                seen = set()
+                seen_add = seen.add
+                test_case_order_no_dublicates.append( [x for x in test_cases if not (x in seen or seen_add(x))] )
+
+            approved_test_case_order = [[]] + list(reversed(test_case_order_no_dublicates))
+            for i, test_cases in enumerate(list(approved_test_case_order)):
+                info = 'Case (dep)' if i < len(approved_test_case_order)-1 else 'Case'
+                for test_case_name in list(test_cases):
+                    sys.stdout.flush()
+                    test_case = PALMTestCase(self.test_dir, test_case_name, verbose=self.verbose)
+                    test_case_configuration_failed, message = test_case.configure(final_build_list, final_cores_list)
+                    if test_case_configuration_failed:
+                        # removing as configuration failed should only apply to added dependencies
+                        approved_test_case_order[i].remove(test_case_name)
+                        logger.to_all(config_table_line_template.format(info, test_case_name, 'rejected'))
+                        logger.to_all(message + '\n')
+                    elif test_case.requires_binary_files:
+                        if test_case.use_binary_files_from not in approved_test_case_order[i-1]:
+                            # removing as dependency is already removed
+                            approved_test_case_order[i].remove(test_case_name)
+                            logger.to_all(config_table_line_template.format(info, test_case_name, 'disabled'))
+                            logger.to_all(colored('[requires dependency \"' + test_case.use_binary_files_from + '\"]', 'red') + '\n')
+                        else:
+                            logger.to_all(config_table_line_template.format(info, test_case_name, 'approved'))
+                            logger.to_all(message + '\n')
+                    else:
+                        logger.to_all(config_table_line_template.format(info, test_case_name, 'approved'))
+                        logger.to_all(message + '\n')
+
+            final_case_list = []
+            for cases in approved_test_case_order:
+                for case in cases:
+                    if case not in final_case_list:
+                        final_case_list.append(case)
+
+            for build_name in final_build_list:
+                build = PALMBuild(
+                    self.test_dir,
+                    build_name,
+                    verbose=self.verbose,
+                    dry_run=self.dry_run,
+                )
+                configuration_failed, message = build.configure()
+                if not configuration_failed:
+                    self.build_database[build_name] = build
+                else:
+                    logger.to_all(message + '\n')
+
+            for case_name in final_case_list:
+                test_case = PALMTestCase(
+                    self.test_dir,
+                    case_name,
+                    verbose=self.verbose,
+                    dry_run=self.dry_run,
+                )
+                test_case_configuration_failed, message = test_case.configure(final_build_list, final_cores_list)
+                if not test_case_configuration_failed:
+                    self.test_case_queue.append(test_case)
+            logger.to_all(hline)
+
+            r = '{:' + str(table_width_intro) + '} '
+
+            logger.to_all(r.format('Test ID:') + self.test_id + '\n')
+            logger.to_all(r.format('Builds:') + str('\n' + r.format('')).join(sorted(self.build_database.keys())) + '\n')
+            logger.to_all(r.format('Cases:') + str('\n' + r.format('')).join([c.name for c in self.test_case_queue]) + '\n')
+            logger.to_all(r.format('Cores:') + ' '.join([str(i) for i in final_cores_list]) + '\n')
+
+    def _execute(self, test_case, build_name, cores):
+        job = PALMJob(
+            self.test_dir,
+            test_case,
+            build_name,
+            cores,
+            verbose=self.verbose,
+            dry_run=self.dry_run
+        )
+        if self.force_debug:
+            build_failed_non_debug = True
+            job_failed_non_debug = True
+            build_failed_debug = self.build_database[build_name].build(debug=True)
+            if build_failed_debug:
+                job_failed_debug = True
+            else:
+                job_failed_debug = job.execute(debug=True)
+        elif self.no_auto_debug:
+            build_failed_non_debug = self.build_database[build_name].build(debug=False)
+            if build_failed_non_debug:
+                job_failed_non_debug = True
+            else:
+                job_failed_non_debug = job.execute(debug=False)
+            build_failed_debug = None
+            job_failed_debug = None
+        else:
+            build_failed_non_debug = self.build_database[build_name].build(debug=False)
+            if build_failed_non_debug:
+                job_failed_non_debug = True
+                build_failed_debug = self.build_database[build_name].build(debug=True)
+                if build_failed_debug:
+                    job_failed_debug = False
+                else:
+                    job_failed_debug = job.execute(debug=True)
+            else:
+                job_failed_non_debug = job.execute(debug=False)
+                if job_failed_non_debug:
+                    build_failed_debug = self.build_database[build_name].build(debug=True)
+                    if build_failed_debug:
+                        job_failed_debug = True
+                    else:
+                        job_failed_debug = job.execute(debug=True)
+                else:
+                    build_failed_debug = None
+                    job_failed_debug = None
+        return dict(
+            build_failed_non_debug=build_failed_non_debug,
+            job_failed_non_debug=job_failed_non_debug,
+            build_failed_debug=build_failed_debug,
+            job_failed_debug=job_failed_debug,
+        )
+
+    def execute(self):
+        with Logger(self.test_dir, verbose=self.verbose) as logger:
+            logger.to_all(hline)
+            logger.to_all(task_table_line_template.format('Task:', 'Case:', 'Build:', 'Cores:') + 'Status:\n')
+            logger.to_all(hline)
+            self.test_report = dict()
+            for test_case in self.test_case_queue:
+                logger.to_log(hline)
+                logger.to_file(hline)
+                logger.to_file(hline)
+                status_dict = dict()
+                for build_name in test_case.build_names:
+                    status_dict[build_name] = dict()
+                    for cores in test_case.number_of_cores:
+                        status_dict[build_name][cores] = self._execute(test_case, build_name, cores)
+                self.test_report[test_case.name] = status_dict
+                logger.to_log(hline)
+                logger.to_file('\n' * 10)
+
+    def report(self):
+        with Logger(self.test_dir, verbose=self.verbose) as logger:
+            logger.to_all(hline)
+            r = '{:10}' + '    total: ' + '{:<3d}' + \
+                             '    ok: ' + colored('{:<3d}', 'green') + \
+                       '    debugged: ' + colored('{:<3d}', 'yellow') + \
+                         '    failed: ' + colored('{:<3d}', 'red')
+            n_all = 0
+            n_ok = 0
+            n_debugged = 0
+            n_failed = 0
+            for build_name, build in self.build_database.items():
+                status = build.report()
+                b = status['failed_non_debug']
+                bd = status['failed_debug']
+                n_all += 1
+                if not b and b is not None:
+                    n_ok += 1
+                if bd is not None:
+                    n_debugged += 1
+                if b and (bd or bd is None):
+                    n_failed += 1
+            logger.to_all(r.format('Builds:', n_all, n_ok, n_debugged, n_failed) + '\n')
+            total_failed = n_failed
+            total_debugged = n_debugged
+            n_all = 0
+            n_ok = 0
+            n_debugged = 0
+            n_failed = 0
+            # {'case_name': {'build_name': {4: {'build_failed_debug': None,
+            #                                   'build_failed_non_debug': False,
+            #                                   'job_failed_debug': None,
+            #                                   'job_failed_non_debug': False}}},
+            for case_name, case in self.test_report.items():
+                for build_name, build in case.items():
+                    for cores, results in build.items():
+                        n_all += 1
+                        b = results['build_failed_non_debug']
+                        bd = results['build_failed_debug']
+                        j = results['job_failed_non_debug']
+                        jd = results['job_failed_debug']
+                        if not j:
+                            n_ok += 1
+                        if jd is not None:
+                            n_debugged += 1
+                        if j and (jd or jd is None):
+                            n_failed += 1
+            logger.to_all(r.format('Tests:', n_all, n_ok, n_debugged, n_failed) + '\n')
+            total_failed += n_failed
+            total_debugged += n_debugged
+        if self.fail_on_debug:
+            return (total_failed + total_debugged) > 0
+        else:
+            return total_failed > 0
+
+
+class CustomCompleter:
+
+    def __init__(self):
+        pass
+
+    def __call__(self, prefix, parsed_args, **kwargs):
+        return (i for i in self.get_items() if i.startswith(prefix))
+
+    def get_items(self):
+        return []
+
+
+class CaseCompleter(CustomCompleter):
+
+    def get_items(self):
+        case_names = [name for name in next(os.walk(trunk_tests_cases_dir))[1] if not name[0] == '.']
+        return case_names + ['all']
+
+
+class BuildCompleter(CustomCompleter):
+
+    def get_items(self):
+        build_names = [name for name in next(os.walk(trunk_tests_builds_dir))[1] if not name[0] == '.']
+        return build_names + ['all']
+
+
+class PALMTestArgumentParser(ArgumentParser):
+
+    def __init__(self):
+        super().__init__(
+            description='This is the PALM tester\n' +
+                        'Developer Support: knoop@muk.uni-hannover.de',
+            formatter_class=RawTextHelpFormatter,
+            add_help=True,
+        )
+        self.add_argument(
+            '--version',
+            action='version',
+            version=version,
+        )
+        self.add_argument(
+            '--verbose',
+            action='store_true',
+            dest='verbose',
+            help='Increase verbosity of terminal output.',
+            required=False,
+        )
+        self.add_argument(
+            '--no-auto-debug',
+            action='store_true',
+            dest='no_auto_debug',
+            help='Disable automatic debugging in case of test failure.',
+            required=False,
+        )
+        self.add_argument(
+            '--force-debug',
+            action='store_true',
+            dest='force_debug',
+            help='Force debugging regardless of test failure (ignores --no-auto-debug).',
+            required=False,
+        )
+        self.add_argument(
+            '--fail-on-debug',
+            action='store_true',
+            dest='fail_on_debug',
+            help='Return a non-zero exit status in case debugging was required.',
+            required=False,
+        )
+        self.add_argument(
+            '--dry-run',
+            action='store_true',
+            dest='dry_run',
+            help='Prepare and process all requested tests without actually building or executing PALM.',
+            required=False,
+        )
+        self.add_argument(
+            '--no-color',
+            action='store_true',
+            dest='no_color',
+            help='Disable colored terminal output.',
+            required=False,
+        )
+        self.add_argument(
+            '--cases',
+            action='store',
+            dest='cases',
+            default=['all'],
+            help='A list of test cases to be executed. (default: %(default)s)',
+            nargs='+',
+            required=False,
+            type=str,
+            metavar='STR',
+        ).completer = CaseCompleter()
+        self.add_argument(
+            '--builds',
+            action='store',
+            dest='builds',
+            default=['all'],
+            help='A list of builds to be executed. (default: %(default)s)',
+            nargs='+',
+            required=False,
+            type=str,
+            metavar='STR',
+        ).completer = BuildCompleter()
+        self.add_argument(
+            '--cores',
+            action='store',
+            dest='cores',
+            default=[i for i in range(1, available_cores+1)],
+            choices=[i for i in range(1, available_cores+1)],
+            help='The number of cores tests are supposed to be executed on. (default: %(default)s)',
+            nargs='+',
+            required=False,
+            type=int,
+            metavar='INT',
+        )
+        self.add_argument(
+            '--test-id',
+            action='store',
+            dest='test_id',
+            default=datetime.now().strftime('%Y-%m-%d_%H:%M:%S.%f'),
+            help='An individual test id. (default: current timestamp)',
+            required=False,
+            type=str,
+            metavar='STR',
+        )
+
+
+if __name__ == '__main__':
+    parser = PALMTestArgumentParser()
+    if has_argcomplete:
+        argcomplete.autocomplete(parser)
+    args = parser.parse_args()
+    palm_test = PALMTest(args)
+    palm_test.prepare()
+    palm_test.execute()
+    failed = palm_test.report()
+    exit(1 if failed else 0)
Index: /palm/tags/release-6.0/SCRIPTS/process_dvr_output
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/process_dvr_output	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/process_dvr_output	(revision 3477)
@@ -0,0 +1,463 @@
+#!/bin/ksh
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+#
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 1310 2014-03-14 08:01:56Z raasch
+# update GPL copyright
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# process_dvr_output - a script processing dvr steering + data files
+
+     # This script determines the number of streams opened by the dvr software
+     # and creates one single dvrs- and html-file which allow the dvr-plugin
+     # to display all streams in one sequence.
+
+     # Last changes:
+     # 16/03/09 - Siggi - Generating the first version
+
+
+
+    # Variable declarations + default values
+ camera=false
+ create_config_file=false
+ create_sequence_output=false
+ data_catalog=`pwd`
+ dvrp_output=rtsp
+ file_identifier=all_streams
+ groundplate=false
+ palm_run_identifier="unknown_run"
+ topography=false
+
+ typeset  -i  a acceleration=1 k i j nstream nscenes
+
+
+    # Read shellscript options
+ while  getopts  :a:cd:f:ls option
+ do
+   case  $option  in
+       (a)   acceleration=$OPTARG;;
+       (c)   create_config_file=true;;
+       (d)   data_catalog=$OPTARG;;
+       (f)   file_identifier=$OPTARG;;
+       (l)   dvrp_output=local;;
+       (s)   create_sequence_output=true;;
+       (\?)  printf "\n  +++ unknown option $OPTARG \n"
+             printf "\n      allowed option are -d, -f, -l, -s \n"
+             exit;;
+   esac
+ done
+
+
+    # Create the config file for the streaming server; do nothing else
+ if [[ $create_config_file = true ]]
+ then
+    cp  ${PALM_BIN}/.dvrserver.config  .
+
+       # Entering the BASEDIR, UID and GID into this file
+    user_id=`id -u`
+    group_id=`id -g`
+
+       # data directory is always the current working directory
+    sed "s/<replace by dvr data directory>/./g" .dvrserver.config > .dvrserver.1
+    sed "s/<replace by user id>/$user_id/g"    .dvrserver.1 > .dvrserver.2
+    sed "s/<replace by group id>/$group_id/g"  .dvrserver.2 > .dvrserver.3
+    mv  .dvrserver.3  .dvrserver.config
+    rm  .dvrserver.1  .dvrserver.2
+    exit
+ fi
+
+
+    # Find out the PALM run identifier
+ if [[ -f CPU_MEASURES ]]
+ then
+    palm_run_identifier=`head -1  CPU_MEASURES`
+ fi
+
+
+    # Process the streaming server output
+ if [[ $dvrp_output = rtsp ]]
+ then
+
+       # Change to the given directory
+    cd $data_catalog
+
+
+       # Find out the number of streams
+    (( i = 0 ))
+    while true
+    do
+       (( i = i + 1 ))
+       if (( i < 10 ))
+       then
+          cstream=0$i
+       else
+          cstream=$i
+       fi
+
+       if [[ $(ls -1 *.* | grep -c $cstream) = 0 ]]
+       then
+          (( i = i - 1 ))
+          break
+       fi
+
+          # find out the stream name
+       streamname[$i]=`ls -1 ${cstream}_*-ge.dvrs | cut -f1 -d"-"`
+
+          # get addres
+       adr[$i]=`grep ADR= ${streamname[$i]}.dvrs | grep '*' | cut -f2 -d"="`
+
+          # get maxbytes
+       maxbytes[$i]=`head -1 ${streamname[$i]}.max`
+
+          # get number of frames
+       frames[$i]=`tail -1 ${streamname[$i]}.max`
+
+    done
+
+    nstream=$i
+    nscenes=$nstream
+
+
+       # Check, if there are files containing the camera data, the ground plate
+       # and topography data.
+       # Check the first stream only, because all streams have the same files.
+    if [[ -f ${streamname[1]}_camera.max ]]
+    then
+       camera=true
+       adr_camera=`grep ADR= ${streamname[1]}.dvrs | grep 'camera' | cut -f2 -d"="`
+       maxbytes_camera=`head -1 ${streamname[1]}_camera.max`
+       (( nscenes = nscenes + 1 ))
+    fi
+    if [[ -f ${streamname[1]}_groundplate.max ]]
+    then
+       groundplate=true
+       adr_groundplate=`echo $adr_camera | sed "s/camera/groundplate/g"`
+       maxbytes_groundplate=`head -1 ${streamname[1]}_groundplate.max`
+       (( nscenes = nscenes + 1 ))
+    fi
+    if [[ -f ${streamname[1]}_topography.max ]]
+    then
+       topography=true
+       adr_topography=`echo $adr_camera | sed "s/camera/topography/g"`
+       maxbytes_topography=`head -1 ${streamname[1]}_topography.max`
+       (( nscenes = nscenes + 1 ))
+    fi
+
+
+
+       # Start with writing the dvrs file for the combined streams
+    dvr_file=${file_identifier}_streaming.dvrs
+
+    echo  "SCENES=$nscenes"  >  $dvr_file
+
+       # First, add the static scenes
+    if [[ $camera = true ]]
+    then
+       echo  "MED=TCP"                    >>  $dvr_file
+       echo  "ADR=$adr_camera"            >>  $dvr_file
+       echo  "MAXBYTES=$maxbytes_camera"  >>  $dvr_file
+       echo  "FRAMES=1"                   >>  $dvr_file
+       echo  "FRAMES_P_SEC=0"             >>  $dvr_file
+       echo  "SCENEEND"                   >>  $dvr_file
+    fi
+
+    if [[ $groundplate = true ]]
+    then
+       echo  "MED=TCP"                         >>  $dvr_file
+       echo  "ADR=$adr_groundplate"            >>  $dvr_file
+       echo  "MAXBYTES=$maxbytes_groundplate"  >>  $dvr_file
+       echo  "FRAMES=1"                        >>  $dvr_file
+       echo  "FRAMES_P_SEC=0"                  >>  $dvr_file
+       echo  "SCENEEND"                        >>  $dvr_file
+    fi
+
+    if [[ $topography = true ]]
+    then
+       echo  "MED=TCP"                        >>  $dvr_file
+       echo  "ADR=$adr_topography"            >>  $dvr_file
+       echo  "MAXBYTES=$maxbytes_topography"  >>  $dvr_file
+       echo  "FRAMES=1"                       >>  $dvr_file
+       echo  "FRAMES_P_SEC=0"                 >>  $dvr_file
+       echo  "SCENEEND"                       >>  $dvr_file
+    fi
+
+
+       # Now add the streams
+    (( i = 0 ))
+    while (( i < nstream ))
+    do
+
+       (( i = i + 1 ))
+
+       echo  "MED=TCP"                   >>  $dvr_file
+       echo  "ADR=${adr[$i]}"            >>  $dvr_file
+       echo  "MAXBYTES=${maxbytes[$i]}"  >>  $dvr_file
+       echo  "FRAMES=${frames[$i]}"      >>  $dvr_file
+       echo  "FRAMES_P_SEC=25"           >>  $dvr_file
+       echo  "SCENEEND"                  >>  $dvr_file
+
+    done
+
+
+       # Change path to the current file identifier
+       # Remove path because BASEDIR of streaming server is set to "."
+#    sed  "s/DATA_DVR/${file_identifier}_dvr/g"  $dvr_file > tmp_file
+    sed  "s/DATA_DVR\///g"  $dvr_file > tmp_file
+    mv  tmp_file  $dvr_file
+
+
+       # If there is a dvr configuration file, set the BASEDIR to the parent
+       # directory of the above given path (i.e. ".")
+    if [[ -f .dvrserver.config ]]
+    then
+       old_path=`grep  BASEDIR  .dvrserver.config`
+       sed  "s&${old_path}&BASEDIR=.&g"  .dvrserver.config  >  .dvrserver.config.new
+       mv  .dvrserver.config.new  .dvrserver.config
+    fi
+
+
+       # Create the html file for the combined streames
+    cp  01_*-ge.html  tmp.html
+    replace=$(echo `grep src= tmp.html`)
+    sed "s&${replace}&src=\"${file_identifier}_streaming.dvrs\"&g" tmp.html > tmp1.html
+    if [[ "$palm_run_identifier" = "" ]]
+    then
+       cp  tmp1.html  ${file_identifier}_streaming.html
+    else
+       sed "s&DATA_DVR/${streamname[1]}/\*\*\*\*\*.dvr (DVR 3D Streaming)&DVR 3D streaming generated by $palm_run_identifier&g"  tmp1.html  >  ${file_identifier}_streaming.html
+    fi
+    rm  tmp.html  tmp1.html
+
+
+       # Informative messages
+    printf "\n\n  *** processing dvr stream output:"
+    printf "\n      number of detected streams = $nstream"
+    printf "\n      stream names:"
+
+    (( i = 0 ))
+    while (( i < nstream ))
+    do
+
+       (( i = i + 1 ))
+       printf " ${streamname[$i]}"
+
+    done
+    printf "\n"
+
+
+ else
+
+       # This is the branch for local output (dvrp_output=local).
+       # Find out the number of streams.
+    (( i = 0 ))
+    while true
+    do
+
+       (( i = i + 1 ))
+       if (( i < 10 ))
+       then
+          cstream=0$i
+       else
+          cstream=$i
+       fi
+
+       if [[ $(ls -1 *.* | grep -c ${cstream}_) = 0 ]]
+       then
+          (( i = i - 1 ))
+          break
+       fi
+
+          # find out the stream name
+       streamname[$i]=`ls -1 ${cstream}_*.camera.dvr | cut -f1 -d"."`
+
+    done
+
+       # Exit, if there are no streams.
+    [[ $i = 0 ]]  &&  exit
+
+    nstream=$i
+
+    mkdir -p  ${data_catalog}/sequence_data
+
+
+       # First, merge static scenes into one file
+    if [[ -f ${streamname[1]}.camera.dvr ]]
+    then
+       cat  ${streamname[1]}.camera.dvr  >>  ${data_catalog}/sequence_data/static_scenes.dvr
+    fi
+
+    if [[ -f ${streamname[1]}.groundplate.dvr ]]
+    then
+       cat  ${streamname[1]}.groundplate.dvr  >>  ${data_catalog}/sequence_data/static_scenes.dvr
+    fi
+
+    if [[ -f ${streamname[1]}.topography.dvr ]]
+    then
+       cat  ${streamname[1]}.topography.dvr  >>  ${data_catalog}/sequence_data/static_scenes.dvr
+    fi
+
+
+       # Find out the number of frames
+    frames[1]=`grep sequence ${streamname[1]}_00000.html | cut -f2 -d";" | cut -f1 -d'"' | cut -f2 -d"-"`
+
+
+       # Now, merge the data, frame by frame
+    (( j = 0 ))
+    while (( j < ${frames[1]} ))
+    do
+
+       nframe=`printf "%05d" $j`
+
+       (( i = 0 ))
+       while (( i < nstream ))
+       do
+          (( i = i + 1 ))
+          cat  ${streamname[$i]}_$nframe.dvr  >>  ${data_catalog}/sequence_data/$nframe.dvr
+       done
+
+       (( j = j + 1 ))
+
+    done
+
+
+       # Create the html file to be used for the sequence mode
+    cp  ${streamname[1]}_00000.html  tmp1.html
+    sed  "s&${streamname[1]}_camera.dvr&sequence_data/static_scenes.dvr&g"  tmp1.html  >  tmp2.html
+    sed  "s&${streamname[1]}_&sequence_data/&g"  tmp2.html  >  tmp3.html
+    if [[ "$palm_run_identifier" = "" ]]
+    then
+       cp  tmp3.html  ${file_identifier}_sequence.html
+    else
+       sed "s&sequence_data/%05d.dvr (DVR 3D Sequence)&DVR 3D sequence generated by $palm_run_identifier&g"  tmp3.html  >  ${file_identifier}_sequence.html
+    fi
+    rm  tmp1.html  tmp2.html  tmp3.html
+    mv  ${file_identifier}_sequence.html  ${data_catalog}
+
+
+       # Informative messages
+    printf "\n\n  *** processing dvr local output (using dvrp_output=local):"
+    printf "\n      number of detected streams = $nstream"
+    printf "\n      stream names:"
+
+    (( i = 0 ))
+    while (( i < nstream ))
+    do
+
+       (( i = i + 1 ))
+       printf " ${streamname[$i]}"
+
+    done
+    printf "\n"
+
+ fi
+
+
+    # Create output for viewing dvr data in sequence mode
+ if [[ $create_sequence_output = true ]]
+ then
+
+    rm -rf  sequence_data
+    mkdir  sequence_data
+
+       # First, merge static scenes into one file
+    if [[ $camera = true ]]
+    then
+       cat  ${streamname[1]}/camera.dvr  >>  sequence_data/static_scenes.dvr
+    fi
+
+    if [[ $groundplate = true ]]
+    then
+       cat  ${streamname[1]}/groundplate.dvr  >>  sequence_data/static_scenes.dvr
+    fi
+
+    if [[ $topography = true ]]
+    then
+       cat  ${streamname[1]}/topography.dvr  >>  sequence_data/static_scenes.dvr
+    fi
+
+
+       # Now, merge the data, frame by frame
+    (( j = 0 ))
+    (( k = 0 ))
+    (( a = 0 ))
+    while (( j < ${frames[1]} ))
+    do
+
+       rframe=`printf "%05d" $j`
+
+       if (( a == 0 ))
+       then
+
+          wframe=`printf "%05d" $k`
+          (( k = k + 1 ))
+
+          (( i = 0 ))
+          while (( i < nstream ))
+          do
+             (( i = i + 1 ))
+             cat  ${streamname[$i]}/$rframe.dvr  >>  sequence_data/$wframe.dvr
+          done
+
+
+       fi
+
+       (( a = a + 1 ))
+       if (( a == acceleration ))
+       then
+          (( a = 0 ))
+       fi
+
+       (( j = j + 1 ))
+
+    done
+
+
+       # Create the html file to be used for the sequence mode
+    cp  ${streamname[1]}.html  tmp1.html
+    sed  "s/camera.dvr/static_scenes.dvr/g"  tmp1.html  >  tmp2.html
+    sed  "s&${streamname[1]}&sequence_data&g"  tmp2.html  >  tmp3.html
+    sed  "s/;0-0/;0-$wframe/g"  tmp3.html  >  tmp4.html
+    if [[ "$palm_run_identifier" = "" ]]
+    then
+       cp  tmp4.html  ${file_identifier}_sequence.html
+    else
+       sed "s&DATA_DVR/sequence_data/\*\*\*\*\*.dvr (DVR 3D Sequence)&DVR 3D sequence generated by $palm_run_identifier&g"  tmp4.html  >  ${file_identifier}_sequence.html
+    fi
+    rm  tmp1.html  tmp2.html  tmp3.html  tmp4.html
+
+    printf "      data for using sequence mode generated"
+
+ fi
+
+
+
+    # Change back to directory from where script has been called
+ cd - > /dev/null  2>&1
Index: /palm/tags/release-6.0/SCRIPTS/release_tutorial
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/release_tutorial	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/release_tutorial	(revision 3477)
@@ -0,0 +1,89 @@
+#!/bin/bash
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 1841 2016-04-07 19:14:06Z raasch
+# script now running under bash
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# 981 2012-08-09 14:57:44Z maronga
+# Typo removed
+#
+# 955 2012-07-20 09:54:04Z maronga
+# The pdf files are now directly transfered to the trac system. A user account
+# on the palm server is required. Without ssh-key, the passwort has to be given
+# four times.
+#
+# 946 2012-07-17 16:02:40Z maronga
+# Typo removed
+#
+# 915 2012-05-30 15:11:11Z maronga
+# Initial revision
+#
+# Description:
+# ------------
+# Script for copying the compiled PDFs to a desired web directory. This script
+# should be used by user raasch only.
+#
+# Execution:
+# ----------
+# release_tutorial --> Copy all PDF files to $release_directory on
+# the trac server (see below)
+#------------------------------------------------------------------------------!
+
+    release_directory="/palmdata/trac/htdocs/tutorial"
+    server="palm"
+    mod_lecture="664"
+    mod_handout="664"
+    mod_web="664"
+
+    full_name=`readlink -f $0`
+    directory="$(dirname $full_name)/../TUTORIAL/SOURCE"
+    input_dir="$(dirname $full_name)/../TUTORIAL"
+    cd $input_dir
+
+    printf "\n Files will be released in $release_directory/."
+    printf "\n Start copying...\n"
+
+#   copy files to trac system
+    scp LECTURE/*.pdf $USER@$server:"$release_directory/LECTURE/"
+    scp HANDOUT/*.pdf $USER@$server:"$release_directory/HANDOUT/"
+    scp WEB/*.pdf $USER@$server:"$release_directory/WEB/"
+
+#   change permissions
+    ssh $server -l $USER "cd $release_directory/LECTURE; chmod $mod_lecture $release_directory/LECTURE/*; chmod $mod_handout $release_directory/HANDOUT/*; chmod $mod_web $release_directory/WEB/*"
+
+    printf " \n *** All actions finished.\n"
+
+exit
+
+
+
Index: /palm/tags/release-6.0/SCRIPTS/testsuite
===================================================================
--- /palm/tags/release-6.0/SCRIPTS/testsuite	(revision 3477)
+++ /palm/tags/release-6.0/SCRIPTS/testsuite	(revision 3477)
@@ -0,0 +1,169 @@
+#!/usr/bin/env bash
+
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Corrected "Former revisions" section
+# 
+# 
+#
+# 2696 kanani
+# Change in file header (GPL part)
+#
+# 2410 giersch
+# Change of option -h argument
+#
+# 2372 sward
+# Change of option -h argument
+#
+# 2349 giersch
+# Change of option -h argument
+#
+# 2347 knoop
+# Initial revision
+#
+# Description:
+# ------------
+# Testsuite execution script
+#------------------------------------------------------------------------------#
+
+hrule() {
+   printf "#"
+   printf -- '-%.0s' {1..72}
+   printf "#\n"
+}
+
+get_number_of_cpu_cores() {
+   {
+      n=$(sysctl -n machdep.cpu.core_count 2> /dev/null)
+   } || {
+      n=$(grep -c ^processor /proc/cpuinfo 2> /dev/null)
+   } || {
+   if ! [[ $n =~ ^-?[0-9]+$ ]]; then
+      n=1
+   fi
+   }
+   echo $n
+}
+
+
+configure() {
+   hrule
+   printf "Configuring .mrun.config ..."
+   if [[ -f ${existing_working_dir}/.mrun.config ]]; then
+      cp ${existing_working_dir}/.mrun.config ${tester_prefix}/.mrun.config
+      sed -i -e "s#%base_directory .*#%base_directory    ${tester_prefix}#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#%base_data .*#%base_data         ${tester_prefix}/JOBS#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#%tmp_user_catalog .*#%tmp_user_catalog  ${tester_prefix}/tmp#g" ${tester_prefix}/.mrun.config
+      printf " finished (adapted existing .mrun.config)\n"
+   else
+      cp ${PALM_BIN}/.mrun.config.gfortran ${tester_prefix}/.mrun.config
+      sed -i -e "s/<replace_with_your_hostname>/${HOSTNAME}/g" ${tester_prefix}/.mrun.config
+      sed -i -e "s/<replace_with_your_local_username>/${USER}/g" ${tester_prefix}/.mrun.config
+      sed -i -e "s/<hi>/lcmuk/g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#%base_directory    \$HOME/palm/current_version#%base_directory    ${tester_prefix}#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#%base_data         ~/palm/current_version/JOBS#%base_data         ${tester_prefix}/JOBS#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#%tmp_user_catalog  \$HOME/palm/tmp#%tmp_user_catalog  ${tester_prefix}/tmp#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#<replace_by_netcdf_include_path>#/usr/include#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#-L:<replace_by_netcdf_library_path>:-lnetcdf#/usr/lib/x86_64-linux-gnu/libnetcdff.so#g" ${tester_prefix}/.mrun.config
+      sed -i -e "s#-j:4#-j:1#g" ${tester_prefix}/.mrun.config
+      printf " finished (created .mrun.config from template)\n"
+   fi
+}
+
+build() {
+   hrule
+   rm -rf ${tester_prefix}/JOBS
+   rm -rf ${tester_prefix}/MAKE_DEPOSITORY*
+   rm -rf ${tester_prefix}/SOURCES_FOR_RUN_*
+   bash ${trunk_dir}/SCRIPTS/mbuild -h "lcmuk" -K "parallel" -v -u
+   bash ${trunk_dir}/SCRIPTS/mbuild -h "lcmuk" -K "parallel" -v
+}
+
+palm_installer_test() {
+   hrule
+   printf "Testing with \"${1}\"... "
+   local input_dir=${tester_prefix}/JOBS/${1}/INPUT
+   local monitoring_dir=${tester_prefix}/JOBS/${1}/MONITORING
+   local test_dir=${trunk_dir}/INSTALL
+   if [[ ! -f ${test_dir}/${1}_p3d ]] || [[ ! -f ${test_dir}/${1}_rc ]]; then
+      printf " test not found\n"
+      return 1
+   fi
+   rm -rf ${monitoring_dir}
+   mkdir -p ${input_dir}
+   mkdir -p ${monitoring_dir}
+   cp ${test_dir}/${1}_p3d ${input_dir}/${1}_p3d
+   cp ${test_dir}/${1}_rc ${monitoring_dir}/${1}_rc_reference
+   [[ -f ${test_dir}/${1}_topo ]] && cp ${test_dir}/${1}_topo ${input_dir}/
+   bash ${trunk_dir}/SCRIPTS/mrun -d ${1} -r "d3#" -h "lcmuk" -K "parallel" -X "$NUM_PROC" -T "$NUM_PROC" -v -B > ${monitoring_dir}/${1}_stdout 2>&1
+   grep -A 99999 "Run-control output" ${monitoring_dir}/${1}_rc 1> ${monitoring_dir}/RC 2> /dev/null
+   grep -A 99999 "Run-control output" ${monitoring_dir}/${1}_rc_reference 1> ${monitoring_dir}/RC_REF 2> /dev/null
+   diff_output=$(diff ${monitoring_dir}/RC_REF ${monitoring_dir}/RC)
+   rm ${monitoring_dir}/RC ${monitoring_dir}/RC_REF
+   if [[ "${diff_output}" == "" ]]; then
+      printf " passed\n"
+      return 0
+   else
+      printf " failed\n"
+      test_status="failed"
+      return 1
+   fi
+}
+
+palm_installer_test_suite() {
+   for test_path in ${trunk_dir}/INSTALL/*_p3d; do
+      testname_p3d=$(basename $test_path)
+      palm_installer_test "${testname_p3d%_p3d}"
+   done
+   hrule
+   if [[ "${test_status}" == "failed" ]]; then
+      echo "Some tests failed!"
+      hrule
+      exit 1
+   else
+      echo "All found tests passed. :-)"
+      rm -rf ${tester_prefix}/tmp/*
+      hrule
+      exit 0
+   fi
+}
+
+NUM_PROC=$(get_number_of_cpu_cores)
+existing_trunk_dir=$(readlink -f "${PALM_BIN}/../")
+existing_working_dir=$(readlink -f "${PALM_BIN}/../../")
+tester_prefix=${existing_working_dir}/tests/${BUILD_NUMBER:-$(date +%Y-%m-%d_%H%M%S)}
+trunk_dir=${tester_prefix}/trunk
+
+# redirect PALM_BIN for duration of tests
+export PALM_BIN=${trunk_dir}/SCRIPTS
+
+mkdir -p ${tester_prefix}
+cd ${tester_prefix}
+
+ln -s ${existing_trunk_dir}
+
+configure
+build
+palm_installer_test_suite
Index: /palm/tags/release-6.0/SOURCE/Makefile
===================================================================
--- /palm/tags/release-6.0/SOURCE/Makefile	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/Makefile	(revision 3477)
@@ -0,0 +1,2012 @@
+#--------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# WARNING: don't write filenames with extension .f90 in this header!!!!
+#
+# Current revisions:
+# ------------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Add virtual measurement module
+# 
+# 3472 2018-10-30 20:43:50Z suehring
+# Add indoor model (kanani, srissman, tlang),
+# minor formatting
+# 
+# 3467 2018-10-30 19:05:21Z suehring
+# Implementation of a new aerosol module salsa.
+# 
+# 
+# 3458 2018-10-30 14:51:23Z kanani
+# from chemistry branch r3443, banzhafs, Russo, forkel, basit:
+# radiation_model_mod added to chemistry_model_mod
+# Added some missing dependencies and replaced blanks with tabs
+# Added chemistry emission module
+# chemistry_model_mod added to flow_statistics
+# 
+# 3448 2018-10-29 18:14:31Z kanani
+# Adjustment of biometeorology dependencies
+# 
+# 3436 2018-10-26 18:35:15Z gronemeier
+# Add surface_mod to user_data_output_mask
+# 
+# 3435 2018-10-26 18:25:44Z gronemeier
+# - Add surface_mod to data_output_mask
+# - Add chemistry_model_mod and surface_mod to init_masks
+# 
+# 3421 2018-10-24 18:39:32Z gronemeier
+# Add netcdf_data_input_mod to netcdf_interface_mod
+# bugfix: add dependencies to chemistry_model_mod
+# Add module for surface data output
+# 
+# 3381 2018-10-19 13:09:06Z raasch
+# dependencies for ocean_mod fixed
+# 
+# 3355 2018-10-16 14:03:34Z knoop
+# Add module for offline nesting;
+# Add surface_mod to synthetic-turbulence generator;
+# Bugfix, missing dependency for turbulence generator in init_3d_model;
+# Some formatting ajdustments
+# 
+# 3343 2018-10-15 10:38:52Z suehring
+# (from branch resler)
+# Add biometeorology
+# 
+# 
+# 3322 2018-10-09 10:02:39Z kanani
+# Formatting and cleanup
+# 
+# 3298 2018-10-02 12:21:11Z kanani
+# Added missing dependencies and replaced blanks with tabs (forkel)
+# Added chemistry emission module (Russo)
+# Added chemistry_model_mod to flow_statistics (basit)
+#
+# 3294 2018-10-01 02:37:10Z raasch
+# changes related to modularization of the ocean mode,
+# bugfix: dependency to advec_ws was missed in chemistry_model_mod
+# 
+# 3274 2018-09-24 15:42:55Z knoop
+# Added palm dependency of multi_agent_system_mod, because of mas_last_actions
+# call at the end of palm run
+# 
+# 3167 2018-07-24 18:17:30Z suehring
+# Bugfix, add missing dependencies for multi-agent system
+# 
+# 3159 2018-07-20 11:20:01Z sward
+# Added multi agent system
+# 
+# 3130 2018-07-16 11:08:55Z gronemeier
+# add surface_layer_fluxes_mod to turbulence_closure_mod
+# 
+# 3129 2018-07-16 07:45:13Z gronemeier
+# add turbulence_closure_mod to parin
+# 
+# 2963 2018-04-12 14:47:44Z suehring
+# Introduce index for vegetation/wall, pavement/green-wall and water/window 
+# surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+# 
+# 2955 2018-04-09 15:14:01Z suehring
+# Add log-points to measure CPU time of NetCDF data input.
+# 
+# 2938 2018-03-27 15:52:42Z suehring
+# No initialization of child domains via dynamic input file, except for soil
+# moisture and temperature
+# Apply turbulence generator at non-cyclic lateral boundary in nesting case
+# 
+# 2936 2018-03-27 14:49:27Z suehring
+# Added dependencies for parent and child synchronization
+# 
+# 2921 2018-03-22 15:05:23Z Giersch
+# date_and_time_mod dependency has been added to read/write_restart_data_mod
+# 
+# 2918 2018-03-21 15:52:14Z gronemeier
+# read/write_3d_binary and read/write_var_list has been removed, 
+# read/write_restart_data_mod, wrd_write_string and
+# user_read/write_restart_data_mod has been added, dependencies with respect to 
+# the aforementioned routines have been added/removed
+#
+# 2847 2018-03-02 21:45:58Z suehring
+# Changed format and enforced sorting
+# 
+# 2817 2018-02-19 16:32:21Z knoop
+# Preliminary gust module interface implemented
+# 
+# 2802 2018-02-14 16:21:39Z thiele
+# Changed lpm from subroutine to module.
+# Introduce particle transfer in nested models.
+# 
+# 2773 2018-01-30 14:12:54Z suehring
+# Nesting of chemical species
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2697 2017-12-14 17:57:20Z kanani
+# Bugfix, missing dependencies
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+# Implementation of uv exposure model (FK)
+# Bugfix, removed loop dependcy for vertical_nesting_mod and 
+# turbulence_closure_mod, added depencies for vertical_nesting_mod (TG)
+# implemented turbulence_closure_mod (TG)
+# Additional dependencies for chemistry module (FK)
+# Additional dependencies for chemistry module (FK)
+# Implementation of chemistry module (FK)
+# For LSM, add dependency on calc_mean_profile (??)
+# poismg_noopt modularized and renamed into poismg_noopt_mod
+# add dependencies for netcdf_data_input_mod, calc_mean_profile, 
+# radiation_module_mod, land_surface_model_mod (MS)
+# 
+# 2608 2017-11-13 14:04:26Z schwenkel
+# Added diagnostic_quantities_mod 
+# 
+# 2600 2017-11-01 14:11:20Z raasch
+# comment line concerning bound checks removed
+# 
+# 2599 2017-11-01 13:18:45Z hellstea
+# virtual_flight_mod, synthetic_turbulence_generator_mod and
+# wind_turbine_model_mod were added to read_var_list
+#
+# 2563 2017-10-19 15:36:10Z Giersch
+# wind_turbine_model_mod and synthetic_turbulence_generator_mod were added to
+# write_var_list and virtual_flight_mod was deleted from read_var_list 
+#
+# 2544 2017-10-13 18:09:32Z maronga
+# Added date_and_time_mod 
+# 
+# 2371 2017-08-24 13:01:17Z kanani
+# Corrected dependencies for vertical_nesting_mod
+# 
+# 2370 2017-08-23 06:11:43Z raasch
+# dependency bugfix for synthetic_turbulence_generator
+# 
+# 2365 2017-08-21 14:59:59Z kanani
+# Added dependencies for vertical_nesting_mod
+# 
+# 2339 2017-08-07 13:55:26Z gronemeier
+# corrected timestamp in header
+# 
+# 2338 2017-08-07 12:15:38Z gronemeier
+# Modularize 1D model
+# 
+# 2320 2017-07-21 12:47:43Z suehring
+# -ls_forcing nudging
+# +large_scale_forcing_nudging
+# 
+# 2318 2017-07-20 17:27:44Z suehring
+# Add further dependencies on surface_mod
+# 
+# 2317 2017-07-20 17:27:19Z suehring
+# Added time_integration_spinup
+# 
+# 2269 2017-06-09 11:57:32Z suehring
+# Add dependency in read_3d_binary
+# 
+# 2263 2017-06-08 14:59:01Z schwenkel
+# Implemented splitting and merging algorithm
+# 
+# 2259 2017-06-08 09:09:11Z gronemeier
+# Implemented synthetic turbulence generator
+#
+# 2256 2017-06-07 13:58:08Z suehring
+# Remove ring dependency in init_pegrid
+# 
+# 2238 2017-05-31 16:49:16Z suehring
+# Bugfix, further missing dependency on surface_mod
+# 
+# 2237 2017-05-31 10:34:53Z suehring
+# Bugfix, add dependencies on surface_mod for surface_coupler, 
+# plant_canopy_model_mod and ls_forcing_mod 
+# 
+# 2233 2017-05-30 18:08:54Z suehring
+#
+# 2232 2017-05-30 17:47:52Z suehring
+# +dependencies for surface_mod
+# -wall_fluxes
+# 
+# 2130 2017-01-24 16:25:39Z raasch
+# dependency for timestep updated
+#
+# 2118 2017-01-17 16:38:49Z raasch
+# -cuda_fft_interfaces_mod
+# 
+# 2050 2016-11-08 15:00:55Z gronemeier
+# Implement turbulent outflow method
+# 
+# 2007 2016-08-24 15:47:17Z kanani
+# urban surface module added,
+# cleaned up some lines (compiler flags/options), which were accidentally
+# added in rev1938
+# 
+# 1998 2016-08-20 18:45:34Z knoop
+# Bugfix: added netcdf_interface to dependency list for user_init_land_surface
+#
+# 1986 2016-08-10 14:07:17Z gronemeier
+# POSIX-calls module added
+# 
+# 1972 2016-07-26 07:52:02Z maronga
+# Removed some dependencies due to further modularization of land surface model
+# 
+# 1957 2016-07-07 10:43:48Z suehring
+# flight module added
+#
+# 1946 2016-06-15 11:38:13Z suehring
+# Bugfix dependency init_grid on advec_ws
+#
+# 1938 2016-06-13 15:26:05Z hellstea
+# Some dependency errors corrected 
+# 
+# 1934 2016-06-13 09:46:57Z hellstea
+# poismg renamed poismg_noopt, poismg_fast_mod renamed poismg_mod
+# 
+# 1914 2016-05-26 14:44:07Z witha
+# Added wind_turbine_model_mod
+#
+# 1900 2016-05-04 15:27:53Z raasch
+# pmc_general renamed pmc_general_mod
+#
+# 1871 2016-04-15 11:46:09Z hoffmann
+# dependencies for package_parin corrected
+#
+# 1850 2016-04-08 13:29:27Z maronga
+# Adapted for modularization of microphysics 
+# Several files renamed --> _mod
+# Bugfix for previous commit
+#
+# 1849 2016-04-08 11:33:18Z hoffmann
+# Adapted for modularization of microphysics
+#
+# 1837 2016-04-07 18:21:57Z raasch
+# further bug removed from r1835
+#
+# 1835 2016-04-07 16:31:50Z raasch
+# bugfix: merge comments removed
+#
+# 1833 2016-04-07 14:23:03Z raasch
+# spectrum renamed spectra_mod, depencies for spectra changed
+# 
+# 1826 2016-04-07 12:01:39Z maronga
+# Renamed radiation_model to radiation_model_mod.
+# Renamed plant_canopy_model to plant_canopy_model_mod.
+# 
+# 1822 2016-04-07 07:49:42Z hoffmann
+# Tails removed. lpm_release_set removed. calc_precipitation, impact_of_latent_heat
+# removed. 
+#
+# 1817 2016-04-06 15:44:20Z maronga
+# Renamed land_surface_model to land_surface_model_mod.
+# 
+# 1808 2016-04-05 19:44:00Z raasch
+# -local_flush, -local_getenv
+#
+# 1797 2016-03-21 16:50:28Z raasch
+# dependcy for check_for_restart updated
+#
+# 1791 2016-03-11 10:41:25Z raasch
+# dependencies of header changed
+#
+# 1786 2016-03-08 05:49:27Z raasch
+# rename calc_spectra to spectrum + modularization of spectrum
+#
+# 2016-03-06 18:36:17Z raasch
+# name change of netcdf routines and respective dependencies
+#
+# 1779 2016-03-03 08:01:28Z raasch
+# dependencies changed for init_peprid
+#
+# 1766 2016-02-29 08:37:15Z raasch
+# update dependency for swap_timelevel
+#
+# 1764 2016-02-28 12:45:19Z raasch
+# several updates of dependencies
+#
+# 1762 2016-02-25 12:31:13Z hellstea
+# +pmc_interface, +pmc routines 
+#
+# 1747 2016-02-08 12:25:53Z raasch
+# dependencies for routine palm updated
+#
+# 1691 2015-10-26 16:17:44Z maronga
+# Replaced prandtl_fluxes with surface_layer_fluxes. Added radiation_model to 
+# prognostic_equations
+# 
+# 1585 2015-04-30 07:05:52Z maronga
+# Added user_init_radiation.f90
+# 
+# 1575 2015-03-27 09:56:27Z raasch
+# +poismg_fast
+#
+# 1551 2015-03-03 14:18:16Z maronga
+# Bugfix: further adjustments for the land surface model and radiation model
+# 
+# 1517 2015-01-07 19:12:25Z hoffmann
+# advec_s_bc added to prognostic_equations
+#
+# 1500 2014-12-03 17:42:41Z maronga
+# Bugfix: missing adjustments for land surface model and radiation model
+# 
+# 1496 2014-12-02 17:25:50Z maronga
+# Added land surface model and radiation model files: land_surface_model, 
+# radiation_model, user_init_land_surface
+# 
+# 1484 2014-10-21 10:53:05Z kanani
+# plant_canopy_model-dependency added for check_parameters, header, init_3d_model,
+# package_parin, read_var_list, user_init_plant_canopy, write_var_list
+# 
+# 1444 2014-08-02 20:10:32Z letzel
+# bugfix: cpulog added to lpm_advec
+# 
+# 1404 2014-05-14 09:01:39Z keck
+# bugfix: dependencies added for progress_bar
+#
+# 1402 2014-05-09 14:25:13Z raasch
+# progress_bar added
+# 
+# 1400 2014-05-09 14:03:54Z knoop
+# Added new module random_generator_parallel
+# 
+# 1380 2014-04-28 12:40:45Z heinze
+# bugfix: mod_particle_attributes  added to check_open
+# nudging added to time_integration 
+#
+# 1374 2014-04-25 12:55:07Z raasch
+# bugfix: missing dependency added for check_open
+#
+# 1365 2014-04-22 15:03:56Z boeske
+# Added new module calc_mean_profile, previously in module buoyancy,
+# removed buoyancy dependency from nudging
+# 
+# 1363 2014-04-17 12:28:49Z keck
+# bugfix: cpulog added to lpm_pack_arrays
+#
+# 1361 2014-04-16 15:17:48Z hoffmann
+# cpulog added to microphysics
+# 
+# 1359 2014-04-11 17:15:14Z hoffmann
+# mod_particle_attributes added, lpm_sort_arrays removed, 
+# lpm_extend_particle_array removed
+#
+# 1336 2014-03-25 15:07:20Z raasch
+# -write_compressed
+#
+# 2014-03-20 16:38:49Z raasch
+# cpulog-dependency added for disturb_heatflux
+#
+# 1320 2014-03-20 08:40:49Z raasch
+# +mod_kinds in dependency list
+#
+# 1318 2014-03-17 13:35:16Z raasch
+# +cpulog, dependencies for cpulog added
+# -cpu_log, cpu_statistics
+#
+# 1311 2014-03-14 12:13:39Z heinze
+# bugfix: buoyancy dependency added to nudging
+#
+# 1306 2014-03-13 14:30:59Z raasch
+# +mod_kinds
+#
+# 1241 2013-10-30 11:36:58Z heinze
+# +nudging, ls_forcing
+#
+# 1212 2013-08-15 08:46:27Z raasch
+# +tridia_solver, -poisfft_hybrid
+#
+# 1210 2013-08-14 10:58:20Z raasch
+# object file list replaced by one line statement
+#
+# 1128 2013-04-12 06:19:32Z raasch
+# dependencies for time_integration modified
+#
+# 1111 2013-03-08 23:54:10Z raasch
+# dependencies removed from init_pegrid
+# bugfix: dependency added for cuda_fft_interfaces
+#
+# 1106 2013-03-04 05:31:38Z raasch
+# +cuda_fft_interfaces
+#
+# 1053 2012-11-13 17:11:03Z hoffmann
+# +microphysics for two-moment cloud physics
+#
+# 1036 2012-10-22 13:43:42Z raasch
+# code put under GPL (PALM 3.9)
+#
+# 1001 2012-09-13 14:08:46Z raasch
+# -asselin_filter, advec_s|u|v|w_ups, spline_x|y|z
+#
+# 872 2012-03-29 15:57:54Z franke
+# lpm depends on modules
+#
+# 849 2012-03-15 10:35:09Z raasch
+# +lpm_advec, lpm_data_output_particles, lpm_droplet_collision,
+# lpm_droplet_condensation,
+# lpm_exchange_horiz, lpm_extend_particle_array, lpm_extend_tails,
+# lpm_extend_tail_array, lpm_init_sgs_tke, lpm_pack_arrays,
+# lpm_read_restart_file, lpm_release_set, lpm_sort_arrays,
+# lpm_write_exchange_statistics, lpm_write_restart_file
+# advec_particles renamed lpm,
+# init_particles renamed lpm_init,
+# user_advec_particles renamed user_lpm_advec,
+# particle_boundary_conds renamed lpm_boundary_conds,
+# set_particle_attributes renamed lpm_set_attributes
+# user_init_particles renamed user_lpm_init,
+# user_particle_attributes renamed user_lpm_set_attributes
+#
+# 828 2012-02-21 12:00:36Z raasch
+# init_particles depends on lpm_collision_kernels
+#
+# 825 2012-02-19 03:03:44Z raasch
+# wang_kernel renamed lpm_collision_kernels
+#
+# 790 2011-11-29 03:11:20Z raasch
+# +wang_kernel
+#
+# 667 2010-12-23 12:06:00Z suehring/gryschka
+# +advec_ws
+#
+# 421 2010-01-25 15:50:10Z raasch
+# comment line for simple install method added, which will be replaced
+# by an include command for preprocessor and compiler options when the simple
+# install process is used instead of mbuild/mrun,
+# +set_particle_attributes, set_slicer_attributes_dvrp
+# +subsidence
+#
+# 410 2009-12-04 17:05:40Z letzel
+# +data_output_mask, init_masks, user_data_output_mask
+#
+# 217 2008-12-09 18:00:48Z letzel
+# former file user_interface split into one file per subroutine
+# +init_coupling, message
+#
+# 151 2008-03-07 13:42:18Z raasch
+# +plant_canopy_model, inflow_turbulence
+# +surface_coupler
+#
+# 96 2007-06-04 08:07:41Z raasch
+# +eqn_state_seawater, init_ocean
+#
+# 82 2007-04-16 15:40:52Z raasch
+# +local_flush
+#
+# 58 2007-03-09 14:27:38Z raasch
+# default suffixes removed from the suffix list to avoid calling of m2c in
+# case of .mod files
+# +wall_fluxes, +particle_boundary_conds
+#
+# RCS Log replace by Id keyword, revision history cleaned up
+#
+# Revision 1.13  2006/08/04 14:45:31  raasch
+# +data_output_ptseries
+#
+# Revision 1.1  2002/06/11 13:42:20  raasch
+# Initial revision
+#
+#
+# Description:
+# ------------
+# Makefile for the parallelized LES model (PALM) to be used by the
+# shellscript "mrun"
+#------------------------------------------------------------------------------!
+
+PROG =  palm
+
+SOURCES = \
+	advec_s_bc.f90 \
+	advec_s_pw.f90 \
+	advec_s_up.f90 \
+	advec_u_pw.f90 \
+	advec_u_up.f90 \
+	advec_v_pw.f90 \
+	advec_v_up.f90 \
+	advec_w_pw.f90 \
+	advec_ws.f90 \
+	advec_w_up.f90 \
+	average_3d_data.f90 \
+	basic_constants_and_equations_mod.f90 \
+	biometeorology_mod.f90 \
+	biometeorology_ipt_mod.f90 \
+	biometeorology_pt_mod.f90 \
+	biometeorology_pet_mod.f90 \
+	biometeorology_utci_mod.f90 \
+	boundary_conds.f90 \
+	buoyancy.f90 \
+	calc_mean_profile.f90 \
+	check_for_restart.f90 \
+	check_open.f90 \
+	check_parameters.f90 \
+	chem_emissions_mod.f90 \
+	chem_gasphase_mod.f90 \
+	chemistry_model_mod.f90 \
+	chem_modules.f90 \
+	chem_photolysis_mod.f90 \
+	close_file.f90 \
+	compute_vpt.f90 \
+	coriolis.f90 \
+	cpulog_mod.f90 \
+	data_log.f90 \
+	data_output_2d.f90 \
+	data_output_3d.f90 \
+	data_output_dvrp.f90 \
+	data_output_flight.f90\
+	data_output_mask.f90 \
+	data_output_profiles.f90 \
+	data_output_ptseries.f90 \
+	data_output_spectra.f90 \
+	data_output_tseries.f90 \
+	date_and_time_mod.f90 \
+	diffusion_s.f90 \
+	diffusion_u.f90 \
+	diffusion_v.f90 \
+	diffusion_w.f90 \
+	disturb_field.f90 \
+	disturb_heatflux.f90 \
+	exchange_horiz_2d.f90 \
+	exchange_horiz.f90 \
+	fft_xy_mod.f90 \
+	flow_statistics.f90 \
+	global_min_max.f90 \
+	gust_mod.f90 \
+	header.f90 \
+	indoor_model_mod.f90 \
+	inflow_turbulence.f90 \
+	init_3d_model.f90 \
+	init_advec.f90 \
+	init_coupling.f90 \
+	init_dvrp.f90 \
+	init_grid.f90 \
+	init_masks.f90 \
+	init_pegrid.f90 \
+	init_pt_anomaly.f90 \
+	init_rankine.f90 \
+	init_slope.f90 \
+	init_vertical_profiles.f90 \
+	interaction_droplets_ptq.f90 \
+	land_surface_model_mod.f90 \
+	large_scale_forcing_nudging_mod.f90 \
+	local_stop.f90 \
+	local_system.f90 \
+	local_tremain.f90 \
+	local_tremain_ini.f90 \
+	lpm_advec.f90 \
+	lpm_boundary_conds.f90 \
+	lpm_calc_liquid_water_content.f90 \
+	lpm_collision_kernels.f90 \
+	lpm_data_output_particles.f90 \
+	lpm_droplet_collision.f90 \
+	lpm_droplet_condensation.f90 \
+	lpm_exchange_horiz.f90 \
+	lpm.f90 \
+	lpm_init.f90 \
+	lpm_init_sgs_tke.f90 \
+	lpm_merging.f90 \
+	lpm_pack_arrays.f90 \
+	lpm_read_restart_file.f90 \
+	lpm_set_attributes.f90 \
+	lpm_splitting.f90 \
+	lpm_write_exchange_statistics.f90 \
+	lpm_write_restart_file.f90 \
+	message.f90 \
+	bulk_cloud_model_mod.f90 \
+	model_1d_mod.f90 \
+	mod_kinds.f90 \
+	mod_particle_attributes.f90 \
+	modules.f90 \
+	multi_agent_system_mod.f90 \
+	netcdf_data_input_mod.f90 \
+	netcdf_interface_mod.f90 \
+	nesting_offl_mod.f90 \
+	ocean_mod.f90 \
+	outflow_turbulence.f90 \
+	package_parin.f90 \
+	palm.f90 \
+	parin.f90 \
+	plant_canopy_model_mod.f90 \
+	pmc_child_mod.f90 \
+	pmc_general_mod.f90 \
+	pmc_handle_communicator_mod.f90 \
+	pmc_interface_mod.f90 \
+	pmc_mpi_wrapper_mod.f90 \
+	pmc_parent_mod.f90 \
+	pmc_particle_interface.f90 \
+	poisfft_mod.f90 \
+	poismg_mod.f90 \
+	poismg_noopt_mod.f90 \
+	posix_calls_from_fortran.f90 \
+	pres.f90 \
+	print_1d.f90 \
+	prognostic_equations.f90 \
+	progress_bar_mod.f90 \
+	radiation_model_mod.f90 \
+	random_function_mod.f90 \
+	random_gauss.f90 \
+	random_generator_parallel_mod.f90 \
+	read_restart_data_mod.f90 \
+	run_control.f90 \
+	salsa_mod.f90 \
+	salsa_util_mod.f90 \
+	set_slicer_attributes_dvrp.f90 \
+	singleton_mod.f90 \
+	sor.f90 \
+	spectra_mod.f90 \
+	subsidence_mod.f90 \
+	sum_up_3d_data.f90 \
+	surface_coupler.f90 \
+	surface_layer_fluxes_mod.f90 \
+	surface_mod.f90 \
+	surface_output_mod.f90 \
+	swap_timelevel.f90 \
+	synthetic_turbulence_generator_mod.f90 \
+	temperton_fft_mod.f90 \
+	time_integration.f90 \
+	time_integration_spinup.f90 \
+	timestep.f90 \
+	timestep_scheme_steering.f90 \
+	time_to_string.f90 \
+	transpose.f90 \
+	tridia_solver_mod.f90 \
+	turbulence_closure_mod.f90 \
+	urban_surface_mod.f90 \
+	user_3d_data_averaging.f90 \
+	user_actions.f90 \
+	user_additional_routines.f90 \
+	user_check_data_output.f90 \
+	user_check_data_output_pr.f90 \
+	user_check_parameters.f90 \
+	user_data_output_2d.f90 \
+	user_data_output_3d.f90 \
+	user_data_output_dvrp.f90 \
+	user_data_output_mask.f90 \
+	user_define_netcdf_grid.f90 \
+	user_dvrp_coltab.f90 \
+	user_flight.f90\
+	user_header.f90 \
+	user_init_3d_model.f90 \
+	user_init.f90 \
+	user_init_flight.f90 \
+	user_init_grid.f90 \
+	user_init_land_surface.f90 \
+	user_init_plant_canopy.f90 \
+	user_init_radiation.f90 \
+	user_init_urban_surface.f90 \
+	user_last_actions.f90 \
+	user_lpm_advec.f90 \
+	user_lpm_init.f90 \
+	user_lpm_set_attributes.f90 \
+	user_module.f90 \
+	user_parin.f90 \
+	user_read_restart_data_mod.f90 \
+	user_spectra.f90 \
+	user_statistics.f90 \
+	user_write_restart_data_mod.f90 \
+	uv_exposure_model_mod.f90 \
+	vertical_nesting_mod.f90 \
+	virtual_flight_mod.f90 \
+	virtual_measurement_mod.f90 \
+	wind_turbine_model_mod.f90 \
+	wrd_write_string.f90 \
+	write_restart_data_mod.f90
+
+
+OBJS=$(SOURCES:.f90=.o)
+
+CC = cc
+CFLAGS = -O 
+
+F90 =
+COPT =
+F90FLAGS =
+LDFLAGS =
+
+
+# The following line is needed for palm_simple_install, don't remove it!
+#to_be_replaced_by_include
+
+.SUFFIXES:
+.SUFFIXES: .o .f90
+
+
+all: $(PROG)
+
+$(PROG): $(OBJS)
+	$(F90) -o $(PROG) $(OBJS) $(LDFLAGS)
+
+clean:
+	rm -f $(PROG) $(OBJS) *.mod *.i *.lst
+
+.f90.o:
+	$(F90) $(F90FLAGS) $(COPT) -c $<
+
+
+advec_s_bc.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+advec_s_pw.o: \
+	mod_kinds.o \
+	modules.o
+advec_s_up.o: \
+	mod_kinds.o \
+	modules.o
+advec_u_pw.o: \
+	mod_kinds.o \
+	modules.o
+advec_u_up.o: \
+	mod_kinds.o \
+	modules.o
+advec_v_pw.o: \
+	mod_kinds.o \
+	modules.o
+advec_v_up.o: \
+	mod_kinds.o \
+	modules.o
+advec_ws.o: \
+	bulk_cloud_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+        salsa_util_mod.o
+advec_w_pw.o: \
+	mod_kinds.o \
+	modules.o
+advec_w_up.o: \
+	mod_kinds.o \
+	modules.o
+average_3d_data.o: \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	exchange_horiz_2d.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	ocean_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o
+basic_constants_and_equations_mod.o: \
+	mod_kinds.o
+biometeorology_ipt_mod.o: \
+	biometeorology_pt_mod.o \
+	mod_kinds.o
+biometeorology_mod.o: \
+	modules.o \
+	mod_kinds.o \
+	radiation_model_mod.o \
+	biometeorology_ipt_mod.o \
+	biometeorology_pt_mod.o \
+	biometeorology_pet_mod.o \
+	biometeorology_utci_mod.o
+biometeorology_pt_mod.o: \
+	mod_kinds.o
+biometeorology_pet_mod.o: \
+	mod_kinds.o
+biometeorology_utci_mod.o: \
+	mod_kinds.o
+boundary_conds.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o \
+	salsa_mod.o \
+	surface_mod.o \
+	turbulence_closure_mod.o
+bulk_cloud_model_mod.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+buoyancy.o: \
+	basic_constants_and_equations_mod.o \
+	mod_kinds.o \
+	modules.o
+calc_mean_profile.o: \
+	mod_kinds.o \
+	modules.o
+check_for_restart.o: \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o
+check_open.o: \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	posix_calls_from_fortran.o
+check_parameters.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	chem_emissions_mod.o \
+	gust_mod.o \
+	init_vertical_profiles.o \
+	land_surface_model_mod.o \
+	large_scale_forcing_nudging_mod.o \
+	model_1d_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	netcdf_interface_mod.o \
+	ocean_mod.o \
+	plant_canopy_model_mod.o \
+	pmc_interface_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	spectra_mod.o \
+	subsidence_mod.o \
+	surface_output_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o \
+	uv_exposure_model_mod.o \
+	vertical_nesting_mod.o \
+	wind_turbine_model_mod.o
+chem_emissions_mod.o: \
+	chem_gasphase_mod.o \
+	chem_modules.o \
+	date_and_time_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	salsa_mod.o \
+	surface_mod.o
+chemistry_model_mod.o: \
+	advec_ws.o \
+	chem_gasphase_mod.o \
+	chem_modules.o \
+	date_and_time_mod.o \
+	diffusion_s.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	radiation_model_mod.o \
+	surface_mod.o \
+	user_module.o
+chem_gasphase_mod.o: \
+	mod_kinds.o \
+	modules.o
+chem_modules.o: \
+	chem_gasphase_mod.o \
+	mod_kinds.o \
+	modules.o
+chem_photolysis_mod.o: \
+	basic_constants_and_equations_mod.o \
+	chem_gasphase_mod.o \
+	chemistry_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	radiation_model_mod.o
+close_file.o: \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o
+compute_vpt.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	mod_kinds.o \
+	modules.o
+coriolis.o: \
+	mod_kinds.o \
+	modules.o
+cpulog_mod.o: \
+	mod_kinds.o \
+	modules.o
+cpu_statistics.o: \
+	mod_kinds.o \
+	modules.o
+data_log.o: \
+	mod_kinds.o \
+	modules.o
+data_output_dvrp.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+data_output_mask.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	salsa_mod.o \
+	surface_mod.o
+data_output_profiles.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o
+data_output_ptseries.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o
+data_output_spectra.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	spectra_mod.o
+data_output_tseries.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o
+data_output_flight.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	virtual_flight_mod.o
+data_output_2d.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o\
+	cpulog_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	ocean_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	surface_mod.o \
+	urban_surface_mod.o \
+	uv_exposure_model_mod.o
+data_output_3d.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	ocean_mod.o \
+	salsa_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o
+date_and_time_mod.o: \
+	mod_kinds.o \
+	modules.o
+diffusion_s.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+diffusion_u.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+diffusion_v.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+diffusion_w.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+disturb_field.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	random_function_mod.o \
+	random_generator_parallel_mod.o
+disturb_heatflux.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	random_generator_parallel_mod.o \
+	surface_mod.o
+exchange_horiz.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+exchange_horiz_2d.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o
+fft_xy_mod.o: \
+	mod_kinds.o \
+	modules.o \
+	singleton_mod.o \
+	temperton_fft_mod.o
+flow_statistics.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	large_scale_forcing_nudging_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	radiation_model_mod.o \
+	surface_mod.o
+global_min_max.o: \
+	mod_kinds.o \
+	modules.o
+gust_mod.o: \
+	mod_kinds.o \
+	modules.o
+header.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	date_and_time_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	large_scale_forcing_nudging_mod.o \
+	model_1d_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	nesting_offl_mod.o \
+	ocean_mod.o \
+	plant_canopy_model_mod.o \
+	pmc_handle_communicator_mod.o \
+	pmc_interface_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	spectra_mod.o \
+	subsidence_mod.o \
+	surface_mod.o \
+	virtual_flight_mod.o
+indoor_model_mod.o: \
+	cpulog_mod.o \
+	date_and_time_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	surface_mod.o \
+	urban_surface_mod.o
+inflow_turbulence.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+init_3d_model.o: \
+	advec_ws.o \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chem_emissions_mod.o \
+	cpulog_mod.o \
+	disturb_heatflux.o \
+	gust_mod.o \
+	indoor_model_mod.o \
+	land_surface_model_mod.o \
+	large_scale_forcing_nudging_mod.o \
+	lpm_init.o \
+	model_1d_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	multi_agent_system_mod.o \
+	netcdf_data_input_mod.o \
+	netcdf_interface_mod.o \
+	nesting_offl_mod.o \
+	ocean_mod.o \
+	plant_canopy_model_mod.o \
+	pmc_interface_mod.o \
+	radiation_model_mod.o \
+	random_function_mod.o \
+	random_generator_parallel_mod.o \
+	read_restart_data_mod.o \
+	salsa_mod.o \
+	surface_layer_fluxes_mod.o \
+	surface_mod.o \
+	surface_output_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o \
+	uv_exposure_model_mod.o \
+	virtual_flight_mod.o \
+	virtual_measurement_mod.o \
+	wind_turbine_model_mod.o
+init_advec.o: \
+	mod_kinds.o \
+	modules.o
+init_coupling.o: \
+	mod_kinds.o \
+	modules.o \
+	vertical_nesting_mod.o
+init_dvrp.o: \
+	mod_kinds.o \
+	modules.o
+init_grid.o: \
+	advec_ws.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	netcdf_interface_mod.o \
+	poismg_noopt_mod.o \
+	surface_mod.o \
+	vertical_nesting_mod.o
+init_masks.o: \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o
+init_pegrid.o: \
+	mod_kinds.o \
+	modules.o \
+	spectra_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	vertical_nesting_mod.o
+init_pt_anomaly.o: \
+	mod_kinds.o \
+	modules.o
+init_rankine.o: \
+	basic_constants_and_equations_mod.o \
+	mod_kinds.o \
+	modules.o
+init_slope.o: \
+	basic_constants_and_equations_mod.o \
+	mod_kinds.o \
+	modules.o
+init_vertical_profiles.o: \
+	modules.o \
+	mod_kinds.o
+interaction_droplets_ptq.o: \
+	basic_constants_and_equations_mod.o \
+	mod_kinds.o \
+	modules.o
+land_surface_model_mod.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	calc_mean_profile.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	pmc_interface_mod.o \
+	radiation_model_mod.o \
+	surface_mod.o
+large_scale_forcing_nudging_mod.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+local_stop.o: \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o \
+	vertical_nesting_mod.o
+local_tremain.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+local_tremain_ini.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+lpm.o: \
+	cpulog_mod.o \
+	lpm_exchange_horiz.o \
+	lpm_init.o \
+	lpm_merging.o \
+	lpm_pack_arrays.o \
+	lpm_splitting.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	pmc_interface_mod.o \
+	pmc_particle_interface.o
+lpm_advec.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	surface_mod.o
+lpm_boundary_conds.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	surface_mod.o
+lpm_calc_liquid_water_content.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_collision_kernels.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_data_output_particles.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o
+lpm_droplet_collision.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	lpm_collision_kernels.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_droplet_condensation.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	lpm_collision_kernels.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_exchange_horiz.o: \
+	cpulog_mod.o \
+	lpm_pack_arrays.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o
+lpm_init.o: \
+	basic_constants_and_equations_mod.o \
+	lpm_collision_kernels.o \
+	lpm_exchange_horiz.o \
+	lpm_pack_arrays.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	pmc_particle_interface.o \
+	random_function_mod.o \
+	random_generator_parallel_mod.o \
+	surface_mod.o
+lpm_init_sgs_tke.o: \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	surface_mod.o
+lpm_merging.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_pack_arrays.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_read_restart_file.o: \
+	lpm_pack_arrays.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_set_attributes.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_splitting.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	lpm_exchange_horiz.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+lpm_write_exchange_statistics.o: \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	pmc_particle_interface.o
+lpm_write_restart_file.o: \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+message.o: \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o
+model_1d_mod.o: \
+	basic_constants_and_equations_mod.o \
+	mod_kinds.o \
+	modules.o \
+	time_to_string.o
+modules.o: \
+	mod_kinds.o
+multi_agent_system_mod.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	surface_mod.o
+mod_kinds.o: \
+
+mod_particle_attributes.o: \
+	mod_kinds.o
+netcdf_data_input_mod.o: \
+	chem_modules.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o   \
+	surface_mod.o
+netcdf_interface_mod.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	chemistry_model_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	ocean_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	spectra_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o \
+	uv_exposure_model_mod.o
+nesting_offl_mod.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	surface_mod.o
+ocean_mod.o: \
+	advec_s_pw.o \
+	advec_s_up.o \
+	advec_ws.o \
+	basic_constants_and_equations_mod.o \
+	diffusion_s.o \
+	init_vertical_profiles.o \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o \
+	surface_mod.o \
+	user_actions.o
+outflow_turbulence.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+package_parin.o: \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o
+palm.o: \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	chem_photolysis_mod.o \
+	cpulog_mod.o \
+	date_and_time_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	multi_agent_system_mod.o \
+	netcdf_data_input_mod.o \
+	pmc_interface_mod.o \
+	pmc_particle_interface.o \
+	salsa_mod.o \
+	surface_layer_fluxes_mod.o \
+	time_to_string.o \
+	write_restart_data_mod.o
+parin.o: \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	chem_modules.o \
+	cpulog_mod.o \
+	date_and_time_mod.o \
+	gust_mod.o \
+	indoor_model_mod.o \
+	land_surface_model_mod.o \
+	model_1d_mod.o \
+	mod_kinds.o \
+	modules.o \
+	multi_agent_system_mod.o \
+	nesting_offl_mod.o \
+	netcdf_interface_mod.o \
+	ocean_mod.o \
+	plant_canopy_model_mod.o \
+	pmc_interface_mod.o \
+	progress_bar_mod.o \
+	radiation_model_mod.o \
+	read_restart_data_mod.o \
+	salsa_mod.o \
+	spectra_mod.o \
+	surface_output_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	turbulence_closure_mod.o \
+	uv_exposure_model_mod.o \
+	vertical_nesting_mod.o \
+	virtual_flight_mod.o \
+	virtual_measurement_mod.o \
+	wind_turbine_model_mod.o
+plant_canopy_model_mod.o: \
+	bulk_cloud_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	surface_mod.o
+pmc_particle_interface.o: \
+	lpm_exchange_horiz.o \
+	lpm_pack_arrays.o \
+	mod_particle_attributes.o \
+	modules.o \
+	pmc_child_mod.o \
+	pmc_interface_mod.o \
+	pmc_parent_mod.o
+pmc_interface_mod.o: \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	chem_modules.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	pmc_child_mod.o \
+	pmc_general_mod.o \
+	pmc_handle_communicator_mod.o \
+	pmc_mpi_wrapper_mod.o \
+	pmc_parent_mod.o \
+	salsa_mod.o \
+	surface_mod.o
+pmc_child_mod.o: \
+	mod_kinds.o \
+	pmc_general_mod.o \
+	pmc_handle_communicator_mod.o \
+	pmc_mpi_wrapper_mod.o
+pmc_general_mod.o: \
+	mod_kinds.o
+pmc_handle_communicator_mod.o: \
+	mod_kinds.o \
+	modules.o \
+	pmc_general_mod.o
+pmc_mpi_wrapper_mod.o: \
+	pmc_handle_communicator_mod.o
+pmc_parent_mod.o: \
+	pmc_general_mod.o \
+	pmc_handle_communicator_mod.o \
+	pmc_mpi_wrapper_mod.o
+poisfft_mod.o: \
+	cpulog_mod.o \
+	fft_xy_mod.o \
+	mod_kinds.o \
+	modules.o \
+	tridia_solver_mod.o
+poismg_mod.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+poismg_noopt_mod.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+posix_calls_from_fortran.o: \
+
+pres.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o \
+	poisfft_mod.o \
+	poismg_mod.o \
+	poismg_noopt_mod.o \
+	surface_mod.o
+print_1d.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+prognostic_equations.o: \
+	advec_s_bc.o \
+	advec_s_pw.o \
+	advec_s_up.o \
+	advec_u_pw.o \
+	advec_u_up.o \
+	advec_v_pw.o \
+	advec_v_up.o \
+	advec_w_pw.o \
+	advec_ws.o \
+	advec_w_up.o \
+	bulk_cloud_model_mod.o \
+	buoyancy.o \
+	chemistry_model_mod.o \
+	chem_modules.o \
+	chem_photolysis_mod.o \
+	coriolis.o \
+	cpulog_mod.o \
+	cpulog_mod.o \
+	diffusion_s.o \
+	diffusion_u.o \
+	diffusion_v.o \
+	diffusion_w.o \
+	large_scale_forcing_nudging_mod.o \
+	mod_kinds.o \
+	mod_kinds.o \
+	modules.o \
+	modules.o \
+	ocean_mod.o \
+	plant_canopy_model_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	subsidence_mod.o \
+	surface_mod.o \
+	surface_mod.o \
+	turbulence_closure_mod.o \
+	user_actions.o \
+	wind_turbine_model_mod.o
+progress_bar_mod.o: \
+	mod_kinds.o \
+	modules.o
+radiation_model_mod.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	calc_mean_profile.o \
+	date_and_time_mod.o \
+	mod_particle_attributes.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	plant_canopy_model_mod.o \
+	surface_mod.o
+random_function_mod.o: \
+	mod_kinds.o
+random_gauss.o: \
+	mod_kinds.o \
+	random_function_mod.o \
+	random_generator_parallel_mod.o
+random_generator_parallel_mod.o: \
+	mod_kinds.o \
+	modules.o
+read_restart_data_mod.o: \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	date_and_time_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	modules.o \
+	mod_kinds.o \
+	model_1d_mod.o \
+	netcdf_interface_mod.o \
+	radiation_model_mod.o \
+	random_function_mod.o\
+	random_generator_parallel_mod.o \
+	salsa_mod.o \
+	spectra_mod.o \
+	surface_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	urban_surface_mod.o \
+	user_read_restart_data_mod.o \
+	vertical_nesting_mod.o \
+	virtual_flight_mod.o \
+	wind_turbine_model_mod.o
+run_control.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+salsa_mod.o: \
+	modules.o \
+	mod_kinds.o \
+	advec_ws.o \
+	advec_s_pw.o \
+	advec_s_up.o \
+        chemistry_model_mod.o \
+	diffusion_s.o \
+	netcdf_data_input_mod.o \
+	plant_canopy_model_mod.o \
+	salsa_util_mod.o \
+	surface_mod.o \
+	netcdf_data_input_mod.o
+salsa_util_mod.o: \
+	mod_kinds.o \
+	modules.o
+set_slicer_attributes_dvrp.o: \
+	mod_kinds.o \
+	modules.o
+singleton_mod.o: \
+	mod_kinds.o
+sor.o: \
+	mod_kinds.o \
+	modules.o
+spectra_mod.o: \
+	cpulog_mod.o \
+	fft_xy_mod.o \
+	mod_kinds.o \
+	modules.o
+subsidence_mod.o: \
+	mod_kinds.o \
+	modules.o
+sum_up_3d_data.o: \
+	basic_constants_and_equations_mod.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	surface_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o \
+	uv_exposure_model_mod.o
+surface_coupler.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+surface_layer_fluxes_mod.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	chem_modules.o \
+	exchange_horiz_2d.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o \
+	urban_surface_mod.o
+surface_mod.o: \
+	chem_modules.o \
+	model_1d_mod.o \
+	mod_kinds.o \
+	modules.o
+surface_output_mod.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o
+swap_timelevel.o: \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	cpulog_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	ocean_mod.o \
+	pmc_interface_mod.o \
+	salsa_mod.o \
+	turbulence_closure_mod.o \
+	urban_surface_mod.o
+synthetic_turbulence_generator_mod.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	nesting_offl_mod.o \
+	pmc_interface_mod.o \
+	surface_mod.o
+temperton_fft_mod.o: \
+	mod_kinds.o \
+	modules.o
+time_integration.o: \
+	advec_ws.o \
+	biometeorology_mod.o \
+	bulk_cloud_model_mod.o \
+	buoyancy.o \
+	calc_mean_profile.o \
+	chem_emissions_mod.o \
+	chemistry_model_mod.o \
+	chem_modules.o \
+	cpulog_mod.o \
+	data_output_flight.o \
+	disturb_heatflux.o \
+	gust_mod.o \
+	indoor_model_mod.o \
+	interaction_droplets_ptq.o \
+	land_surface_model_mod.o \
+	large_scale_forcing_nudging_mod.o \
+	lpm.o \
+	mod_kinds.o \
+	modules.o \
+	multi_agent_system_mod.o \
+	nesting_offl_mod.o \
+	ocean_mod.o \
+	pmc_interface_mod.o \
+	prognostic_equations.o \
+	progress_bar_mod.o \
+	radiation_model_mod.o \
+	salsa_mod.o \
+	spectra_mod.o \
+	surface_layer_fluxes_mod.o \
+	surface_mod.o \
+	surface_output_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	time_to_string.o \
+	turbulence_closure_mod.o\
+	urban_surface_mod.o \
+	user_actions.o \
+	uv_exposure_model_mod.o \
+	vertical_nesting_mod.o \
+	virtual_flight_mod.o \
+	virtual_measurement_mod.o \
+	wind_turbine_model_mod.o
+time_integration_spinup.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	date_and_time_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o \
+	radiation_model_mod.o \
+	surface_layer_fluxes_mod.o \
+	time_to_string.o \
+	urban_surface_mod.o
+time_to_string.o: \
+	mod_kinds.o
+timestep.o: \
+	bulk_cloud_model_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	pmc_interface_mod.o \
+	vertical_nesting_mod.o
+timestep_scheme_steering.o: \
+	mod_kinds.o \
+	modules.o
+transpose.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+tridia_solver_mod.o: \
+	basic_constants_and_equations_mod.o \
+	mod_kinds.o \
+	modules.o
+turbulence_closure_mod.o: \
+	advec_s_bc.o \
+	advec_s_pw.o \
+	advec_s_up.o \
+	advec_ws.o \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	modules.o \
+	ocean_mod.o \
+	plant_canopy_model_mod.o \
+	pmc_interface_mod.o \
+	surface_layer_fluxes_mod.o \
+	surface_mod.o \
+	user_actions.o
+urban_surface_mod.o: \
+	basic_constants_and_equations_mod.o \
+	date_and_time_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	plant_canopy_model_mod.o \
+	radiation_model_mod.o \
+	surface_mod.o
+user_3d_data_averaging.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_actions.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_additional_routines.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_check_data_output.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_check_data_output_pr.o: \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	user_module.o
+user_check_parameters.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_data_output_2d.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o \
+	user_module.o
+user_data_output_3d.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_data_output_mask.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o \
+	user_module.o
+user_data_output_dvrp.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_define_netcdf_grid.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_dvrp_coltab.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_flight.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_header.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_init.o: \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	user_module.o
+user_init_3d_model.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o \
+	user_module.o
+user_init_flight.o: \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	user_module.o
+user_init_grid.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_init_land_surface.o: \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	surface_mod.o \
+	user_module.o
+user_init_plant_canopy.o: \
+	mod_kinds.o \
+	modules.o \
+	plant_canopy_model_mod.o \
+	user_module.o
+user_init_radiation.o: \
+	mod_kinds.o \
+	modules.o \
+	radiation_model_mod.o \
+	user_module.o
+user_init_urban_surface.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o \
+	urban_surface_mod.o \
+	user_module.o
+user_last_actions.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_lpm_advec.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_lpm_init.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_lpm_set_attributes.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_module.o: \
+	mod_kinds.o
+user_parin.o: \
+	mod_kinds.o \
+	modules.o \
+	user_module.o
+user_read_restart_data_mod.o: \
+	modules.o \
+	user_module.o
+user_spectra.o: \
+	mod_kinds.o \
+	modules.o \
+	spectra_mod.o \
+	user_module.o
+user_statistics.o: \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	user_module.o
+user_write_restart_data_mod.o: \
+	user_module.o
+uv_exposure_model_mod.o: \
+	basic_constants_and_equations_mod.o \
+	date_and_time_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	radiation_model_mod.o
+vertical_nesting_mod.o: \
+	mod_kinds.o \
+	modules.o \
+	surface_mod.o \
+	turbulence_closure_mod.o
+virtual_flight_mod.o: \
+	basic_constants_and_equations_mod.o \
+	bulk_cloud_model_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	user_flight.o \
+	user_init_flight.o
+virtual_measurement_mod.o: \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o \
+	netcdf_data_input_mod.o \
+	netcdf_interface_mod.o
+wind_turbine_model_mod.o: \
+	basic_constants_and_equations_mod.o \
+	cpulog_mod.o \
+	mod_kinds.o \
+	modules.o
+wrd_write_string.o: \
+	mod_kinds.o
+write_restart_data_mod.o: \
+	bulk_cloud_model_mod.o \
+	chemistry_model_mod.o \
+	date_and_time_mod.o \
+	gust_mod.o \
+	land_surface_model_mod.o \
+	mod_kinds.o \
+	mod_particle_attributes.o \
+	model_1d_mod.o \
+	modules.o \
+	netcdf_interface_mod.o \
+	ocean_mod.o \
+	radiation_model_mod.o \
+	random_function_mod.o \
+	random_generator_parallel_mod.o \
+	spectra_mod.o surface_mod.o \
+	synthetic_turbulence_generator_mod.o \
+	urban_surface_mod.o \
+	user_write_restart_data_mod.o \
+	vertical_nesting_mod.o \
+	virtual_flight_mod.o \
+	wind_turbine_model_mod.o
Index: /palm/tags/release-6.0/SOURCE/advec_s_bc.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_s_bc.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_s_bc.f90	(revision 3477)
@@ -0,0 +1,1427 @@
+!> @file advec_s_bc.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2300 2017-06-29 13:31:14Z raasch
+! NEC related code removed
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! New CASE statement to treat scalars and humidity separately
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! comment change
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Formatting corrections
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+! 
+! 1517 2015-01-07 19:12:25Z hoffmann
+! interface added to advec_s_bc
+!
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY list
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! nr and qr added
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of 
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! Revision 1.1  1997/08/29 08:53:46  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for scalar quantities using the Bott-Chlond scheme.
+!> Computation in individual steps for each of the three dimensions.
+!> Limiting assumptions:
+!> So far the scheme has been assuming equidistant grid spacing. As this is not
+!> the case in the stretched portion of the z-direction, there dzw(k) is used as
+!> a substitute for a constant grid length. This certainly causes incorrect
+!> results; however, it is hoped that they are not too apparent for weakly 
+!> stretched grids.
+!> NOTE: This is a provisional, non-optimised version!
+!------------------------------------------------------------------------------!
+MODULE advec_s_bc_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_s_bc
+
+    INTERFACE advec_s_bc
+       MODULE PROCEDURE advec_s_bc
+    END INTERFACE advec_s_bc
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_bc( sk, sk_char )
+
+       USE advection,                                                             &
+           ONLY:  aex, bex, dex, eex
+
+       USE arrays_3d,                                                             &
+           ONLY:  d, ddzw, dzu, dzw, tend, u, v, w
+
+       USE control_parameters,                                                    &
+           ONLY:  dt_3d, bc_pt_t_val, bc_q_t_val, bc_s_t_val, ibc_pt_b, ibc_pt_t, &
+                  ibc_q_t, ibc_s_t, message_string, pt_slope_offset,              &
+                  sloping_surface, u_gtrans, v_gtrans
+
+       USE cpulog,                                                                &
+           ONLY:  cpu_log, log_point_s
+
+       USE grid_variables,                                                        &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                               &
+           ONLY:  nx, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+
+       USE kinds
+
+       USE pegrid
+
+       USE statistics,                                                            &
+           ONLY:  rmask, statistic_regions, sums_wsts_bc_l
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  sk_char !<
+
+       INTEGER(iwp) ::  i         !<
+       INTEGER(iwp) ::  ix        !<
+       INTEGER(iwp) ::  j         !<
+       INTEGER(iwp) ::  k         !<
+       INTEGER(iwp) ::  ngp       !<
+       INTEGER(iwp) ::  sr        !<
+       INTEGER(iwp) ::  type_xz_2 !<
+
+       REAL(wp) ::  cim    !<
+       REAL(wp) ::  cimf   !<
+       REAL(wp) ::  cip    !<
+       REAL(wp) ::  cipf   !<
+       REAL(wp) ::  d_new  !<
+       REAL(wp) ::  denomi !< denominator
+       REAL(wp) ::  fminus !<
+       REAL(wp) ::  fplus  !<
+       REAL(wp) ::  f2     !<
+       REAL(wp) ::  f4     !<
+       REAL(wp) ::  f8     !<
+       REAL(wp) ::  f12    !<
+       REAL(wp) ::  f24    !<
+       REAL(wp) ::  f48    !<
+       REAL(wp) ::  f1920  !<
+       REAL(wp) ::  im     !<
+       REAL(wp) ::  ip     !<
+       REAL(wp) ::  m1n    !<
+       REAL(wp) ::  m1z    !<
+       REAL(wp) ::  m2     !<
+       REAL(wp) ::  m3     !<
+       REAL(wp) ::  numera !< numerator
+       REAL(wp) ::  snenn  !<
+       REAL(wp) ::  sterm  !<
+       REAL(wp) ::  tendcy !<
+       REAL(wp) ::  t1     !<
+       REAL(wp) ::  t2     !<
+
+       REAL(wp) ::  fmax(2)   !<
+       REAL(wp) ::  fmax_l(2) !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  sk
+#endif
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  a0   !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  a1   !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  a12  !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  a2   !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  a22  !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  immb !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  imme !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  impb !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  impe !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ipmb !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ipme !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ippb !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ippe !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  m1   !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sw   !<
+       
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  sk_p !<
+
+!
+!--    Array sk_p requires 2 extra elements for each dimension
+       ALLOCATE( sk_p(nzb-2:nzt+3,nys-3:nyn+3,nxl-3:nxr+3) )
+       sk_p = 0.0_wp
+
+!
+!--    Assign reciprocal values in order to avoid divisions later
+       f2    = 0.5_wp
+       f4    = 0.25_wp
+       f8    = 0.125_wp
+       f12   = 0.8333333333333333E-01_wp
+       f24   = 0.4166666666666666E-01_wp
+       f48   = 0.2083333333333333E-01_wp
+       f1920 = 0.5208333333333333E-03_wp
+
+!
+!--    Advection in x-direction:
+
+!
+!--    Save the quantity to be advected in a local array
+!--    add an enlarged boundary in x-direction
+       DO  i = nxl-1, nxr+1
+          DO  j = nys, nyn
+             DO  k = nzb, nzt+1
+                sk_p(k,j,i) = sk(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+#if defined( __parallel )
+       ngp = 2 * ( nzt - nzb + 6 ) * ( nyn - nys + 7 )
+       CALL cpu_log( log_point_s(11), 'advec_s_bc:sendrecv', 'start' )
+!
+!--    Send left boundary, receive right boundary
+       CALL MPI_SENDRECV( sk_p(nzb-2,nys-3,nxl+1), ngp, MPI_REAL, pleft,  0,      &
+                          sk_p(nzb-2,nys-3,nxr+2), ngp, MPI_REAL, pright, 0,      &
+                          comm2d, status, ierr )
+!
+!--    Send right boundary, receive left boundary
+       CALL MPI_SENDRECV( sk_p(nzb-2,nys-3,nxr-2), ngp, MPI_REAL, pright, 1,      &
+                          sk_p(nzb-2,nys-3,nxl-3), ngp, MPI_REAL, pleft,  1,      &
+                          comm2d, status, ierr )
+       CALL cpu_log( log_point_s(11), 'advec_s_bc:sendrecv', 'pause' )
+#else
+
+!
+!--    Cyclic boundary conditions
+       sk_p(:,nys:nyn,nxl-3) = sk_p(:,nys:nyn,nxr-2)
+       sk_p(:,nys:nyn,nxl-2) = sk_p(:,nys:nyn,nxr-1)
+       sk_p(:,nys:nyn,nxr+2) = sk_p(:,nys:nyn,nxl+1)
+       sk_p(:,nys:nyn,nxr+3) = sk_p(:,nys:nyn,nxl+2)
+#endif
+
+!
+!--    In case of a sloping surface, the additional gridpoints in x-direction
+!--    of the temperature field at the left and right boundary of the total
+!--    domain must be adjusted by the temperature difference between this distance
+       IF ( sloping_surface  .AND.  sk_char == 'pt' )  THEN
+          IF ( nxl ==  0 )  THEN
+             sk_p(:,nys:nyn,nxl-3) = sk_p(:,nys:nyn,nxl-3) - pt_slope_offset
+             sk_p(:,nys:nyn,nxl-2) = sk_p(:,nys:nyn,nxl-2) - pt_slope_offset
+          ENDIF
+          IF ( nxr == nx )  THEN
+             sk_p(:,nys:nyn,nxr+2) = sk_p(:,nys:nyn,nxr+2) + pt_slope_offset
+             sk_p(:,nys:nyn,nxr+3) = sk_p(:,nys:nyn,nxr+3) + pt_slope_offset
+          ENDIF
+       ENDIF
+
+!
+!--    Initialise control density
+       d = 0.0_wp
+
+!
+!--    Determine maxima of the first and second derivative in x-direction
+       fmax_l = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                numera = ABS( sk_p(k,j,i+1) - 2.0_wp * sk_p(k,j,i) + sk_p(k,j,i-1) )
+                denomi  = ABS( sk_p(k,j,i+1) - sk_p(k,j,i-1) )
+                fmax_l(1) = MAX( fmax_l(1) , numera )
+                fmax_l(2) = MAX( fmax_l(2) , denomi  )
+             ENDDO
+          ENDDO
+       ENDDO
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmax_l, fmax, 2, MPI_REAL, MPI_MAX, comm2d, ierr )
+#else
+       fmax = fmax_l
+#endif
+
+       fmax = 0.04_wp * fmax
+
+!
+!--    Allocate temporary arrays
+       ALLOCATE( a0(nzb+1:nzt,nxl-1:nxr+1),   a1(nzb+1:nzt,nxl-1:nxr+1),          &
+                 a2(nzb+1:nzt,nxl-1:nxr+1),   a12(nzb+1:nzt,nxl-1:nxr+1),         &
+                 a22(nzb+1:nzt,nxl-1:nxr+1),  immb(nzb+1:nzt,nxl-1:nxr+1),        &
+                 imme(nzb+1:nzt,nxl-1:nxr+1), impb(nzb+1:nzt,nxl-1:nxr+1),        &
+                 impe(nzb+1:nzt,nxl-1:nxr+1), ipmb(nzb+1:nzt,nxl-1:nxr+1),        &
+                 ipme(nzb+1:nzt,nxl-1:nxr+1), ippb(nzb+1:nzt,nxl-1:nxr+1),        &
+                 ippe(nzb+1:nzt,nxl-1:nxr+1), m1(nzb+1:nzt,nxl-2:nxr+2),          &
+                 sw(nzb+1:nzt,nxl-1:nxr+1)                                        &
+               )
+       imme = 0.0_wp; impe = 0.0_wp; ipme = 0.0_wp; ippe = 0.0_wp
+
+!
+!--    Initialise point of time measuring of the exponential portion (this would
+!--    not work if done locally within the loop)
+       CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'start' )
+       CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'pause' )
+
+!
+!--    Outer loop of all j
+       DO  j = nys, nyn
+
+!
+!--       Compute polynomial coefficients
+          DO  i = nxl-1, nxr+1
+             DO  k = nzb+1, nzt
+                a12(k,i) = 0.5_wp * ( sk_p(k,j,i+1) - sk_p(k,j,i-1) )
+                a22(k,i) = 0.5_wp * ( sk_p(k,j,i+1) - 2.0_wp * sk_p(k,j,i)        &
+                                                    + sk_p(k,j,i-1) )
+                a0(k,i) = ( 9.0_wp * sk_p(k,j,i+2)    - 116.0_wp * sk_p(k,j,i+1)  &
+                            + 2134.0_wp * sk_p(k,j,i) - 116.0_wp * sk_p(k,j,i-1)  &
+                            + 9.0_wp * sk_p(k,j,i-2) ) * f1920
+                a1(k,i) = ( -5.0_wp * sk_p(k,j,i+2)   + 34.0_wp * sk_p(k,j,i+1)   &
+                            - 34.0_wp * sk_p(k,j,i-1) + 5.0_wp * sk_p(k,j,i-2)    &
+                          ) * f48
+                a2(k,i) = ( -3.0_wp * sk_p(k,j,i+2) + 36.0_wp * sk_p(k,j,i+1)     &
+                            - 66.0_wp * sk_p(k,j,i) + 36.0_wp * sk_p(k,j,i-1)     &
+                            - 3.0_wp * sk_p(k,j,i-2) ) * f48
+             ENDDO
+          ENDDO
+
+!
+!--       Fluxes using the Bott scheme
+!--       *VOCL LOOP,UNROLL(2)
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                cip  =  MAX( 0.0_wp, ( u(k,j,i+1) - u_gtrans ) * dt_3d * ddx )
+                cim  = -MIN( 0.0_wp, ( u(k,j,i+1) - u_gtrans ) * dt_3d * ddx )
+                cipf = 1.0_wp - 2.0_wp * cip
+                cimf = 1.0_wp - 2.0_wp * cim
+                ip   =   a0(k,i)   * f2  * ( 1.0_wp - cipf )                      &
+                       + a1(k,i)   * f8  * ( 1.0_wp - cipf*cipf )                 &
+                       + a2(k,i)   * f24 * ( 1.0_wp - cipf*cipf*cipf )
+                im   =   a0(k,i+1) * f2  * ( 1.0_wp - cimf )                      &
+                       - a1(k,i+1) * f8  * ( 1.0_wp - cimf*cimf )                 &
+                       + a2(k,i+1) * f24 * ( 1.0_wp - cimf*cimf*cimf )
+                ip   = MAX( ip, 0.0_wp )
+                im   = MAX( im, 0.0_wp )
+                ippb(k,i) = ip * MIN( 1.0_wp, sk_p(k,j,i)   / (ip+im+1E-15_wp) )
+                impb(k,i) = im * MIN( 1.0_wp, sk_p(k,j,i+1) / (ip+im+1E-15_wp) )
+
+                cip  =  MAX( 0.0_wp, ( u(k,j,i) - u_gtrans ) * dt_3d * ddx )
+                cim  = -MIN( 0.0_wp, ( u(k,j,i) - u_gtrans ) * dt_3d * ddx )
+                cipf = 1.0_wp - 2.0_wp * cip
+                cimf = 1.0_wp - 2.0_wp * cim
+                ip   =   a0(k,i-1) * f2  * ( 1.0_wp - cipf )                      &
+                       + a1(k,i-1) * f8  * ( 1.0_wp - cipf*cipf )                 &
+                       + a2(k,i-1) * f24 * ( 1.0_wp - cipf*cipf*cipf )
+                im   =   a0(k,i)   * f2  * ( 1.0_wp - cimf )                      &
+                       - a1(k,i)   * f8  * ( 1.0_wp - cimf*cimf )                 &
+                       + a2(k,i)   * f24 * ( 1.0_wp - cimf*cimf*cimf )
+                ip   = MAX( ip, 0.0_wp )
+                im   = MAX( im, 0.0_wp )
+                ipmb(k,i) = ip * MIN( 1.0_wp, sk_p(k,j,i-1) / (ip+im+1E-15_wp) )
+                immb(k,i) = im * MIN( 1.0_wp, sk_p(k,j,i)   / (ip+im+1E-15_wp) )
+             ENDDO
+          ENDDO
+
+!
+!--       Compute monitor function m1
+          DO  i = nxl-2, nxr+2
+             DO  k = nzb+1, nzt
+                m1z = ABS( sk_p(k,j,i+1) - 2.0_wp * sk_p(k,j,i) + sk_p(k,j,i-1) )
+                m1n = ABS( sk_p(k,j,i+1) - sk_p(k,j,i-1) )
+                IF ( m1n /= 0.0_wp  .AND.  m1n >= m1z )  THEN
+                   m1(k,i) = m1z / m1n
+                   IF ( m1(k,i) /= 2.0_wp  .AND.  m1n < fmax(2) )  m1(k,i) = 0.0_wp
+                ELSEIF ( m1n < m1z )  THEN
+                   m1(k,i) = -1.0_wp
+                ELSE
+                   m1(k,i) = 0.0_wp
+                ENDIF
+             ENDDO
+          ENDDO
+
+!
+!--       Compute switch sw
+          sw = 0.0_wp
+          DO  i = nxl-1, nxr+1
+             DO  k = nzb+1, nzt
+                m2 = 2.0_wp * ABS( a1(k,i) - a12(k,i) ) /                         &
+                     MAX( ABS( a1(k,i) + a12(k,i) ), 1E-35_wp )
+                IF ( ABS( a1(k,i) + a12(k,i) ) < fmax(2) )  m2 = 0.0_wp
+
+                m3 = 2.0_wp * ABS( a2(k,i) - a22(k,i) ) /                         &
+                     MAX( ABS( a2(k,i) + a22(k,i) ), 1E-35_wp )
+                IF ( ABS( a2(k,i) + a22(k,i) ) < fmax(1) )  m3 = 0.0_wp
+
+                t1 = 0.35_wp
+                t2 = 0.35_wp
+                IF ( m1(k,i) == -1.0_wp )  t2 = 0.12_wp
+
+!--             *VOCL STMT,IF(10)
+                IF ( m1(k,i-1) == 1.0_wp .OR. m1(k,i) == 1.0_wp                   &
+                     .OR. m1(k,i+1) == 1.0_wp .OR.  m2 > t2  .OR.  m3 > t2  .OR.  &
+                     ( m1(k,i) > t1  .AND.  m1(k,i-1) /= -1.0_wp  .AND.           &
+                       m1(k,i) /= -1.0_wp  .AND.  m1(k,i+1) /= -1.0_wp )          &
+                   )  sw(k,i) = 1.0_wp
+             ENDDO
+          ENDDO
+
+!
+!--       Fluxes using the exponential scheme
+          CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'continue' )
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,i) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i+1) - sk_p(k,j,i-1)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i) - sk_p(k,j,i-1) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cip =  MAX( 0.0_wp, ( u(k,j,i+1) - u_gtrans ) * dt_3d * ddx )
+
+                   ippe(k,i) = sk_p(k,j,i-1) * cip + snenn * (                    &
+                               aex(ix) * cip + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cip ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  ippe(k,i) = sk_p(k,j,i) * cip
+                   IF ( sterm == 0.9999_wp )  ippe(k,i) = sk_p(k,j,i) * cip
+
+                   snenn = sk_p(k,j,i-1) - sk_p(k,j,i+1)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i) - sk_p(k,j,i+1) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cim = -MIN( 0.0_wp, ( u(k,j,i) - u_gtrans ) * dt_3d * ddx )
+
+                   imme(k,i) = sk_p(k,j,i+1) * cim + snenn * (                    &
+                               aex(ix) * cim + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cim ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  imme(k,i) = sk_p(k,j,i) * cim
+                   IF ( sterm == 0.9999_wp )  imme(k,i) = sk_p(k,j,i) * cim
+                ENDIF
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,i+1) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i) - sk_p(k,j,i+2)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i+1) - sk_p(k,j,i+2) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cim = -MIN( 0.0_wp, ( u(k,j,i+1) - u_gtrans ) * dt_3d * ddx )
+
+                   impe(k,i) = sk_p(k,j,i+2) * cim + snenn * (                    &
+                               aex(ix) * cim + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cim ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  impe(k,i) = sk_p(k,j,i+1) * cim
+                   IF ( sterm == 0.9999_wp )  impe(k,i) = sk_p(k,j,i+1) * cim
+                ENDIF
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,i-1) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i) - sk_p(k,j,i-2)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i-1) - sk_p(k,j,i-2) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cip = MAX( 0.0_wp, ( u(k,j,i) - u_gtrans ) * dt_3d * ddx )
+
+                   ipme(k,i) = sk_p(k,j,i-2) * cip + snenn * (                    &
+                               aex(ix) * cip + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cip ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  ipme(k,i) = sk_p(k,j,i-1) * cip
+                   IF ( sterm == 0.9999_wp )  ipme(k,i) = sk_p(k,j,i-1) * cip
+                ENDIF
+
+             ENDDO
+          ENDDO
+          CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'pause' )
+
+!
+!--       Prognostic equation
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                fplus  = ( 1.0_wp - sw(k,i)   ) * ippb(k,i) + sw(k,i)   * ippe(k,i)  &
+                       - ( 1.0_wp - sw(k,i+1) ) * impb(k,i) - sw(k,i+1) * impe(k,i)
+                fminus = ( 1.0_wp - sw(k,i-1) ) * ipmb(k,i) + sw(k,i-1) * ipme(k,i)  &
+                       - ( 1.0_wp - sw(k,i)   ) * immb(k,i) - sw(k,i)   * imme(k,i)
+                tendcy = fplus - fminus
+!
+!--             Removed in order to optimize speed
+!                ffmax   = MAX( ABS( fplus ), ABS( fminus ), 1E-35_wp )
+!                IF ( ( ABS( tendcy ) / ffmax ) < 1E-7_wp )  tendcy = 0.0
+!
+!--             Density correction because of possible remaining divergences
+                d_new = d(k,j,i) - ( u(k,j,i+1) - u(k,j,i) ) * dt_3d * ddx
+                sk_p(k,j,i) = ( ( 1.0_wp + d(k,j,i) ) * sk_p(k,j,i) - tendcy ) /    &
+                              ( 1.0_wp + d_new )
+                d(k,j,i)  = d_new
+             ENDDO
+          ENDDO
+
+       ENDDO   ! End of the advection in x-direction
+
+!
+!--    Deallocate temporary arrays
+       DEALLOCATE( a0, a1, a2, a12, a22, immb, imme, impb, impe, ipmb, ipme,      &
+                   ippb, ippe, m1, sw )
+
+
+!
+!--    Enlarge boundary of local array cyclically in y-direction
+#if defined( __parallel )
+       ngp = ( nzt - nzb + 6 ) * ( nyn - nys + 7 )
+       CALL MPI_TYPE_VECTOR( nxr-nxl+7, 3*(nzt-nzb+6), ngp, MPI_REAL,             &
+                             type_xz_2, ierr )
+       CALL MPI_TYPE_COMMIT( type_xz_2, ierr )
+!
+!--    Send front boundary, receive rear boundary
+       CALL cpu_log( log_point_s(11), 'advec_s_bc:sendrecv', 'continue' )
+       CALL MPI_SENDRECV( sk_p(nzb-2,nys,nxl-3),   1, type_xz_2, psouth, 0,       &
+                          sk_p(nzb-2,nyn+1,nxl-3), 1, type_xz_2, pnorth, 0,       &
+                          comm2d, status, ierr )
+!
+!--    Send rear boundary, receive front boundary
+       CALL MPI_SENDRECV( sk_p(nzb-2,nyn-2,nxl-3), 1, type_xz_2, pnorth, 1,       &
+                          sk_p(nzb-2,nys-3,nxl-3), 1, type_xz_2, psouth, 1,       &
+                          comm2d, status, ierr )
+       CALL MPI_TYPE_FREE( type_xz_2, ierr )
+       CALL cpu_log( log_point_s(11), 'advec_s_bc:sendrecv', 'pause' )
+#else
+       DO  i = nxl, nxr
+          DO  k = nzb+1, nzt
+             sk_p(k,nys-1,i) = sk_p(k,nyn,i)
+             sk_p(k,nys-2,i) = sk_p(k,nyn-1,i)
+             sk_p(k,nys-3,i) = sk_p(k,nyn-2,i)
+             sk_p(k,nyn+1,i) = sk_p(k,nys,i)
+             sk_p(k,nyn+2,i) = sk_p(k,nys+1,i)
+             sk_p(k,nyn+3,i) = sk_p(k,nys+2,i)
+          ENDDO
+       ENDDO
+#endif
+
+!
+!--    Determine the maxima of the first and second derivative in y-direction
+       fmax_l = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                numera = ABS( sk_p(k,j+1,i) - 2.0_wp * sk_p(k,j,i) + sk_p(k,j-1,i) )
+                denomi  = ABS( sk_p(k,j+1,i) - sk_p(k,j-1,i) )
+                fmax_l(1) = MAX( fmax_l(1) , numera )
+                fmax_l(2) = MAX( fmax_l(2) , denomi  )
+             ENDDO
+          ENDDO
+       ENDDO
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmax_l, fmax, 2, MPI_REAL, MPI_MAX, comm2d, ierr )
+#else
+       fmax = fmax_l
+#endif
+
+       fmax = 0.04_wp * fmax
+
+!
+!--    Allocate temporary arrays
+       ALLOCATE( a0(nzb+1:nzt,nys-1:nyn+1),   a1(nzb+1:nzt,nys-1:nyn+1),          &
+                 a2(nzb+1:nzt,nys-1:nyn+1),   a12(nzb+1:nzt,nys-1:nyn+1),         &
+                 a22(nzb+1:nzt,nys-1:nyn+1),  immb(nzb+1:nzt,nys-1:nyn+1),        &
+                 imme(nzb+1:nzt,nys-1:nyn+1), impb(nzb+1:nzt,nys-1:nyn+1),        &
+                 impe(nzb+1:nzt,nys-1:nyn+1), ipmb(nzb+1:nzt,nys-1:nyn+1),        &
+                 ipme(nzb+1:nzt,nys-1:nyn+1), ippb(nzb+1:nzt,nys-1:nyn+1),        &
+                 ippe(nzb+1:nzt,nys-1:nyn+1), m1(nzb+1:nzt,nys-2:nyn+2),          &
+                 sw(nzb+1:nzt,nys-1:nyn+1)                                        &
+               )
+       imme = 0.0_wp; impe = 0.0_wp; ipme = 0.0_wp; ippe = 0.0_wp
+
+!
+!--    Outer loop of all i
+       DO  i = nxl, nxr
+
+!
+!--       Compute polynomial coefficients
+          DO  j = nys-1, nyn+1
+             DO  k = nzb+1, nzt
+                a12(k,j) = 0.5_wp * ( sk_p(k,j+1,i) - sk_p(k,j-1,i) )
+                a22(k,j) = 0.5_wp * ( sk_p(k,j+1,i) - 2.0_wp * sk_p(k,j,i)        &
+                                                    + sk_p(k,j-1,i) )
+                a0(k,j) = ( 9.0_wp * sk_p(k,j+2,i)    - 116.0_wp * sk_p(k,j+1,i)  &
+                            + 2134.0_wp * sk_p(k,j,i) - 116.0_wp * sk_p(k,j-1,i)  &
+                            + 9.0_wp * sk_p(k,j-2,i) ) * f1920
+                a1(k,j) = ( -5.0_wp   * sk_p(k,j+2,i) + 34.0_wp * sk_p(k,j+1,i)   &
+                            - 34.0_wp * sk_p(k,j-1,i) + 5.0_wp  * sk_p(k,j-2,i)   &
+                          ) * f48
+                a2(k,j) = ( -3.0_wp * sk_p(k,j+2,i) + 36.0_wp * sk_p(k,j+1,i)     &
+                            - 66.0_wp * sk_p(k,j,i) + 36.0_wp * sk_p(k,j-1,i)     &
+                            - 3.0_wp * sk_p(k,j-2,i) ) * f48
+             ENDDO
+          ENDDO
+
+!
+!--       Fluxes using the Bott scheme
+!--       *VOCL LOOP,UNROLL(2)
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                cip  =  MAX( 0.0_wp, ( v(k,j+1,i) - v_gtrans ) * dt_3d * ddy )
+                cim  = -MIN( 0.0_wp, ( v(k,j+1,i) - v_gtrans ) * dt_3d * ddy )
+                cipf = 1.0_wp - 2.0_wp * cip
+                cimf = 1.0_wp - 2.0_wp * cim
+                ip   =   a0(k,j)   * f2  * ( 1.0_wp - cipf )                      &
+                       + a1(k,j)   * f8  * ( 1.0_wp - cipf*cipf )                 &
+                       + a2(k,j)   * f24 * ( 1.0_wp - cipf*cipf*cipf )
+                im   =   a0(k,j+1) * f2  * ( 1.0_wp - cimf )                      &
+                       - a1(k,j+1) * f8  * ( 1.0_wp - cimf*cimf )                 &
+                       + a2(k,j+1) * f24 * ( 1.0_wp - cimf*cimf*cimf )
+                ip   = MAX( ip, 0.0_wp )
+                im   = MAX( im, 0.0_wp )
+                ippb(k,j) = ip * MIN( 1.0_wp, sk_p(k,j,i)   / (ip+im+1E-15_wp) )
+                impb(k,j) = im * MIN( 1.0_wp, sk_p(k,j+1,i) / (ip+im+1E-15_wp) )
+
+                cip  =  MAX( 0.0_wp, ( v(k,j,i) - v_gtrans ) * dt_3d * ddy )
+                cim  = -MIN( 0.0_wp, ( v(k,j,i) - v_gtrans ) * dt_3d * ddy )
+                cipf = 1.0_wp - 2.0_wp * cip
+                cimf = 1.0_wp - 2.0_wp * cim
+                ip   =   a0(k,j-1) * f2  * ( 1.0_wp - cipf )                      &
+                       + a1(k,j-1) * f8  * ( 1.0_wp - cipf*cipf )                 &
+                       + a2(k,j-1) * f24 * ( 1.0_wp - cipf*cipf*cipf )
+                im   =   a0(k,j)   * f2  * ( 1.0_wp - cimf )                      &
+                       - a1(k,j)   * f8  * ( 1.0_wp - cimf*cimf )                 &
+                       + a2(k,j)   * f24 * ( 1.0_wp - cimf*cimf*cimf )
+                ip   = MAX( ip, 0.0_wp )
+                im   = MAX( im, 0.0_wp )
+                ipmb(k,j) = ip * MIN( 1.0_wp, sk_p(k,j-1,i) / (ip+im+1E-15_wp) )
+                immb(k,j) = im * MIN( 1.0_wp, sk_p(k,j,i)   / (ip+im+1E-15_wp) )
+             ENDDO
+          ENDDO
+
+!
+!--       Compute monitor function m1
+          DO  j = nys-2, nyn+2
+             DO  k = nzb+1, nzt
+                m1z = ABS( sk_p(k,j+1,i) - 2.0_wp * sk_p(k,j,i) + sk_p(k,j-1,i) )
+                m1n = ABS( sk_p(k,j+1,i) - sk_p(k,j-1,i) )
+                IF ( m1n /= 0.0_wp  .AND.  m1n >= m1z )  THEN
+                   m1(k,j) = m1z / m1n
+                   IF ( m1(k,j) /= 2.0_wp  .AND.  m1n < fmax(2) )  m1(k,j) = 0.0_wp
+                ELSEIF ( m1n < m1z )  THEN
+                   m1(k,j) = -1.0_wp
+                ELSE
+                   m1(k,j) = 0.0_wp
+                ENDIF
+             ENDDO
+          ENDDO
+
+!
+!--       Compute switch sw
+          sw = 0.0_wp
+          DO  j = nys-1, nyn+1
+             DO  k = nzb+1, nzt
+                m2 = 2.0_wp * ABS( a1(k,j) - a12(k,j) ) /                            &
+                     MAX( ABS( a1(k,j) + a12(k,j) ), 1E-35_wp )
+                IF ( ABS( a1(k,j) + a12(k,j) ) < fmax(2) )  m2 = 0.0_wp
+
+                m3 = 2.0_wp * ABS( a2(k,j) - a22(k,j) ) /                            &
+                     MAX( ABS( a2(k,j) + a22(k,j) ), 1E-35_wp )
+                IF ( ABS( a2(k,j) + a22(k,j) ) < fmax(1) )  m3 = 0.0_wp
+
+                t1 = 0.35_wp
+                t2 = 0.35_wp
+                IF ( m1(k,j) == -1.0_wp )  t2 = 0.12_wp
+
+!--             *VOCL STMT,IF(10)
+                IF ( m1(k,j-1) == 1.0_wp .OR. m1(k,j) == 1.0_wp                   &
+                     .OR. m1(k,j+1) == 1.0_wp .OR.  m2 > t2  .OR.  m3 > t2  .OR.  &
+                     ( m1(k,j) > t1  .AND.  m1(k,j-1) /= -1.0_wp  .AND.           &
+                       m1(k,j) /= -1.0_wp  .AND.  m1(k,j+1) /= -1.0_wp )          &
+                   )  sw(k,j) = 1.0_wp
+             ENDDO
+          ENDDO
+
+!
+!--       Fluxes using exponential scheme
+          CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'continue' )
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,j) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j+1,i) - sk_p(k,j-1,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i) - sk_p(k,j-1,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cip =  MAX( 0.0_wp, ( v(k,j+1,i) - v_gtrans ) * dt_3d * ddy )
+
+                   ippe(k,j) = sk_p(k,j-1,i) * cip + snenn * (                    &
+                               aex(ix) * cip + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cip ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  ippe(k,j) = sk_p(k,j,i) * cip
+                   IF ( sterm == 0.9999_wp )  ippe(k,j) = sk_p(k,j,i) * cip
+
+                   snenn = sk_p(k,j-1,i) - sk_p(k,j+1,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i) - sk_p(k,j+1,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cim = -MIN( 0.0_wp, ( v(k,j,i) - v_gtrans ) * dt_3d * ddy )
+
+                   imme(k,j) = sk_p(k,j+1,i) * cim + snenn * (                    &
+                               aex(ix) * cim + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cim ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  imme(k,j) = sk_p(k,j,i) * cim
+                   IF ( sterm == 0.9999_wp )  imme(k,j) = sk_p(k,j,i) * cim
+                ENDIF
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,j+1) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i) - sk_p(k,j+2,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j+1,i) - sk_p(k,j+2,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cim = -MIN( 0.0_wp, ( v(k,j+1,i) - v_gtrans ) * dt_3d * ddy )
+
+                   impe(k,j) = sk_p(k,j+2,i) * cim + snenn * (                    &
+                               aex(ix) * cim + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cim ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  impe(k,j) = sk_p(k,j+1,i) * cim
+                   IF ( sterm == 0.9999_wp )  impe(k,j) = sk_p(k,j+1,i) * cim
+                ENDIF
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,j-1) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i) - sk_p(k,j-2,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j-1,i) - sk_p(k,j-2,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cip = MAX( 0.0_wp, ( v(k,j,i) - v_gtrans ) * dt_3d * ddy )
+
+                   ipme(k,j) = sk_p(k,j-2,i) * cip + snenn * (                    &
+                               aex(ix) * cip + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cip ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  ipme(k,j) = sk_p(k,j-1,i) * cip
+                   IF ( sterm == 0.9999_wp )  ipme(k,j) = sk_p(k,j-1,i) * cip
+                ENDIF
+
+             ENDDO
+          ENDDO
+          CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'pause' )
+
+!
+!--       Prognostic equation
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                fplus  = ( 1.0_wp - sw(k,j)   ) * ippb(k,j) + sw(k,j)   * ippe(k,j) &
+                       - ( 1.0_wp - sw(k,j+1) ) * impb(k,j) - sw(k,j+1) * impe(k,j)
+                fminus = ( 1.0_wp - sw(k,j-1) ) * ipmb(k,j) + sw(k,j-1) * ipme(k,j) &
+                       - ( 1.0_wp - sw(k,j)   ) * immb(k,j) - sw(k,j)   * imme(k,j)
+                tendcy = fplus - fminus
+!
+!--             Removed in order to optimise speed
+!                ffmax   = MAX( ABS( fplus ), ABS( fminus ), 1E-35_wp )
+!                 IF ( ( ABS( tendcy ) / ffmax ) < 1E-7_wp )  tendcy = 0.0
+!
+!--             Density correction because of possible remaining divergences
+                d_new = d(k,j,i) - ( v(k,j+1,i) - v(k,j,i) ) * dt_3d * ddy
+                sk_p(k,j,i) = ( ( 1.0_wp + d(k,j,i) ) * sk_p(k,j,i) - tendcy ) /  &
+                              ( 1.0_wp + d_new )
+                d(k,j,i)  = d_new
+             ENDDO
+          ENDDO
+
+       ENDDO   ! End of the advection in y-direction
+       CALL cpu_log( log_point_s(11), 'advec_s_bc:sendrecv', 'continue' )
+       CALL cpu_log( log_point_s(11), 'advec_s_bc:sendrecv', 'stop' )
+
+!
+!--    Deallocate temporary arrays
+       DEALLOCATE( a0, a1, a2, a12, a22, immb, imme, impb, impe, ipmb, ipme,      &
+                   ippb, ippe, m1, sw )
+
+
+!
+!--    Initialise for the computation of heat fluxes (see below; required in
+!--    UP flow_statistics)
+       IF ( sk_char == 'pt' )  sums_wsts_bc_l = 0.0_wp
+
+!
+!--    Add top and bottom boundaries according to the relevant boundary conditions
+       IF ( sk_char == 'pt' )  THEN
+
+!
+!--       Temperature boundary condition at the bottom boundary
+          IF ( ibc_pt_b == 0 )  THEN
+!
+!--       Dirichlet (fixed surface temperature)
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                   sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+                ENDDO
+             ENDDO
+
+          ELSE
+!
+!--          Neumann (i.e. here zero gradient)
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                   sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                   sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+!
+!--       Temperature boundary condition at the top boundary
+          IF ( ibc_pt_t == 0  .OR.  ibc_pt_t == 1 )  THEN
+!
+!--          Dirichlet or Neumann (zero gradient)
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                   sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+                ENDDO
+             ENDDO
+
+          ELSEIF ( ibc_pt_t == 2 )  THEN
+!
+!--          Neumann: dzu(nzt+2:3) are not defined, dzu(nzt+1) is used instead
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i) + bc_pt_t_val * dzu(nzt+1)
+                   sk_p(nzt+3,j,i)   = sk_p(nzt+2,j,i) + bc_pt_t_val * dzu(nzt+1)
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+       ELSEIF ( sk_char == 'sa' )  THEN
+
+!
+!--       Salinity boundary condition at the bottom boundary.
+!--       So far, always Neumann (i.e. here zero gradient) is used
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Salinity boundary condition at the top boundary.
+!--       Dirichlet or Neumann (zero gradient)
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+             ENDDO
+          ENDDO
+
+       ELSEIF ( sk_char == 'q' )  THEN
+
+!
+!--       Specific humidity boundary condition at the bottom boundary.
+!--       Dirichlet (fixed surface humidity) or Neumann (i.e. zero gradient)
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Specific humidity boundary condition at the top boundary
+          IF ( ibc_q_t == 0 )  THEN
+!
+!--          Dirichlet
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                   sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+                ENDDO
+             ENDDO
+
+          ELSE
+!
+!--          Neumann: dzu(nzt+2:3) are not defined, dzu(nzt+1) is used instead
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i) + bc_q_t_val * dzu(nzt+1)
+                   sk_p(nzt+3,j,i)   = sk_p(nzt+2,j,i) + bc_q_t_val * dzu(nzt+1)
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+       ELSEIF ( sk_char == 's' )  THEN
+!
+!--       Specific scalar boundary condition at the bottom boundary.
+!--       Dirichlet (fixed surface humidity) or Neumann (i.e. zero gradient)
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Specific scalar boundary condition at the top boundary
+          IF ( ibc_s_t == 0 )  THEN
+!
+!--          Dirichlet
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                   sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+                ENDDO
+             ENDDO
+
+          ELSE
+!
+!--          Neumann: dzu(nzt+2:3) are not defined, dzu(nzt+1) is used instead
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i) + bc_s_t_val * dzu(nzt+1)
+                   sk_p(nzt+3,j,i)   = sk_p(nzt+2,j,i) + bc_s_t_val * dzu(nzt+1)
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+       ELSEIF ( sk_char == 'qc' )  THEN
+
+!
+!--       Cloud water content boundary condition at the bottom boundary:
+!--       Dirichlet (fixed surface rain water content).
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Cloud water content boundary condition at the top boundary: Dirichlet
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+             ENDDO
+          ENDDO
+
+       ELSEIF ( sk_char == 'qr' )  THEN
+
+!
+!--       Rain water content boundary condition at the bottom boundary:
+!--       Dirichlet (fixed surface rain water content).
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Rain water content boundary condition at the top boundary: Dirichlet
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+             ENDDO
+          ENDDO
+
+       ELSEIF ( sk_char == 'nc' )  THEN
+
+!
+!--       Cloud drop concentration boundary condition at the bottom boundary:
+!--       Dirichlet (fixed surface cloud drop concentration).
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Cloud drop concentration boundary condition at the top boundary: Dirichlet
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+             ENDDO
+          ENDDO
+
+       ELSEIF ( sk_char == 'nr' )  THEN
+
+!
+!--       Rain drop concentration boundary condition at the bottom boundary:
+!--       Dirichlet (fixed surface rain drop concentration).
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+             ENDDO
+          ENDDO
+
+!
+!--       Rain drop concentration boundary condition at the top boundary: Dirichlet
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzt+2,j,i)   = sk_p(nzt+1,j,i)
+                sk_p(nzt+3,j,i)   = sk_p(nzt+1,j,i)
+             ENDDO
+          ENDDO
+
+       ELSEIF ( sk_char == 'e' )  THEN
+
+!
+!--       TKE boundary condition at bottom and top boundary (generally Neumann)
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                sk_p(nzb,j,i)   = sk_p(nzb+1,j,i)
+                sk_p(nzb-1,j,i) = sk_p(nzb,j,i)
+                sk_p(nzb-2,j,i) = sk_p(nzb,j,i)
+                sk_p(nzt+2,j,i) = sk_p(nzt+1,j,i)
+                sk_p(nzt+3,j,i) = sk_p(nzt+1,j,i)
+             ENDDO
+          ENDDO
+
+       ELSE
+
+          WRITE( message_string, * ) 'no vertical boundary condi',                &
+                                   'tion for variable "', sk_char, '"'
+          CALL message( 'advec_s_bc', 'PA0158', 1, 2, 0, 6, 0 )
+         
+       ENDIF
+
+!
+!--    Determine the maxima of the first and second derivative in z-direction
+       fmax_l = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb, nzt+1
+                numera = ABS( sk_p(k+1,j,i) - 2.0_wp * sk_p(k,j,i) + sk_p(k-1,j,i) )
+                denomi  = ABS( sk_p(k+1,j,i+1) - sk_p(k-1,j,i) )
+                fmax_l(1) = MAX( fmax_l(1) , numera )
+                fmax_l(2) = MAX( fmax_l(2) , denomi  )
+             ENDDO
+          ENDDO
+       ENDDO
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmax_l, fmax, 2, MPI_REAL, MPI_MAX, comm2d, ierr )
+#else
+       fmax = fmax_l
+#endif
+
+       fmax = 0.04_wp * fmax
+
+!
+!--    Allocate temporary arrays
+       ALLOCATE( a0(nzb:nzt+1,nys:nyn),   a1(nzb:nzt+1,nys:nyn),                  &
+                 a2(nzb:nzt+1,nys:nyn),   a12(nzb:nzt+1,nys:nyn),                 &
+                 a22(nzb:nzt+1,nys:nyn),  immb(nzb+1:nzt,nys:nyn),                &
+                 imme(nzb+1:nzt,nys:nyn), impb(nzb+1:nzt,nys:nyn),                &
+                 impe(nzb+1:nzt,nys:nyn), ipmb(nzb+1:nzt,nys:nyn),                &
+                 ipme(nzb+1:nzt,nys:nyn), ippb(nzb+1:nzt,nys:nyn),                &
+                 ippe(nzb+1:nzt,nys:nyn), m1(nzb-1:nzt+2,nys:nyn),                &
+                 sw(nzb:nzt+1,nys:nyn)                                            &
+               )
+       imme = 0.0_wp; impe = 0.0_wp; ipme = 0.0_wp; ippe = 0.0_wp
+
+!
+!--    Outer loop of all i
+       DO  i = nxl, nxr
+
+!
+!--       Compute polynomial coefficients
+          DO  j = nys, nyn
+             DO  k = nzb, nzt+1
+                a12(k,j) = 0.5_wp * ( sk_p(k+1,j,i) - sk_p(k-1,j,i) )
+                a22(k,j) = 0.5_wp * ( sk_p(k+1,j,i) - 2.0_wp * sk_p(k,j,i)        &
+                                                    + sk_p(k-1,j,i) )
+                a0(k,j) = ( 9.0_wp * sk_p(k+2,j,i)    - 116.0_wp * sk_p(k+1,j,i)  &
+                            + 2134.0_wp * sk_p(k,j,i) - 116.0_wp * sk_p(k-1,j,i)  &
+                            + 9.0_wp * sk_p(k-2,j,i) ) * f1920
+                a1(k,j) = ( -5.0_wp   * sk_p(k+2,j,i) + 34.0_wp * sk_p(k+1,j,i)   &
+                            - 34.0_wp * sk_p(k-1,j,i) + 5.0_wp  * sk_p(k-2,j,i)   &
+                          ) * f48
+                a2(k,j) = ( -3.0_wp * sk_p(k+2,j,i) + 36.0_wp * sk_p(k+1,j,i)     &
+                            - 66.0_wp * sk_p(k,j,i) + 36.0_wp * sk_p(k-1,j,i)     &
+                            - 3.0_wp * sk_p(k-2,j,i) ) * f48
+             ENDDO
+          ENDDO
+
+!
+!--       Fluxes using the Bott scheme
+!--       *VOCL LOOP,UNROLL(2)
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                cip  =  MAX( 0.0_wp, w(k,j,i) * dt_3d * ddzw(k) )
+                cim  = -MIN( 0.0_wp, w(k,j,i) * dt_3d * ddzw(k) )
+                cipf = 1.0_wp - 2.0_wp * cip
+                cimf = 1.0_wp - 2.0_wp * cim
+                ip   =   a0(k,j)   * f2  * ( 1.0_wp - cipf )                      &
+                       + a1(k,j)   * f8  * ( 1.0_wp - cipf*cipf )                 &
+                       + a2(k,j)   * f24 * ( 1.0_wp - cipf*cipf*cipf )
+                im   =   a0(k+1,j) * f2  * ( 1.0_wp - cimf )                      &
+                       - a1(k+1,j) * f8  * ( 1.0_wp - cimf*cimf )                 &
+                       + a2(k+1,j) * f24 * ( 1.0_wp - cimf*cimf*cimf )
+                ip   = MAX( ip, 0.0_wp )
+                im   = MAX( im, 0.0_wp )
+                ippb(k,j) = ip * MIN( 1.0_wp, sk_p(k,j,i)   / (ip+im+1E-15_wp) )
+                impb(k,j) = im * MIN( 1.0_wp, sk_p(k+1,j,i) / (ip+im+1E-15_wp) )
+
+                cip  =  MAX( 0.0_wp, w(k-1,j,i) * dt_3d * ddzw(k) )
+                cim  = -MIN( 0.0_wp, w(k-1,j,i) * dt_3d * ddzw(k) )
+                cipf = 1.0_wp - 2.0_wp * cip
+                cimf = 1.0_wp - 2.0_wp * cim
+                ip   =   a0(k-1,j) * f2  * ( 1.0_wp - cipf )                      &
+                       + a1(k-1,j) * f8  * ( 1.0_wp - cipf*cipf )                 &
+                       + a2(k-1,j) * f24 * ( 1.0_wp - cipf*cipf*cipf )
+                im   =   a0(k,j)   * f2  * ( 1.0_wp - cimf )                      &
+                       - a1(k,j)   * f8  * ( 1.0_wp - cimf*cimf )                 &
+                       + a2(k,j)   * f24 * ( 1.0_wp - cimf*cimf*cimf )
+                ip   = MAX( ip, 0.0_wp )
+                im   = MAX( im, 0.0_wp )
+                ipmb(k,j) = ip * MIN( 1.0_wp, sk_p(k-1,j,i) / (ip+im+1E-15_wp) )
+                immb(k,j) = im * MIN( 1.0_wp, sk_p(k,j,i)   / (ip+im+1E-15_wp) )
+             ENDDO
+          ENDDO
+
+!
+!--       Compute monitor function m1
+          DO  j = nys, nyn
+             DO  k = nzb-1, nzt+2
+                m1z = ABS( sk_p(k+1,j,i) - 2.0_wp * sk_p(k,j,i) + sk_p(k-1,j,i) )
+                m1n = ABS( sk_p(k+1,j,i) - sk_p(k-1,j,i) )
+                IF ( m1n /= 0.0_wp  .AND.  m1n >= m1z )  THEN
+                   m1(k,j) = m1z / m1n
+                   IF ( m1(k,j) /= 2.0_wp  .AND.  m1n < fmax(2) )  m1(k,j) = 0.0_wp
+                ELSEIF ( m1n < m1z )  THEN
+                   m1(k,j) = -1.0_wp
+                ELSE
+                   m1(k,j) = 0.0_wp
+                ENDIF
+             ENDDO
+          ENDDO
+
+!
+!--       Compute switch sw
+          sw = 0.0_wp
+          DO  j = nys, nyn
+             DO  k = nzb, nzt+1
+                m2 = 2.0_wp * ABS( a1(k,j) - a12(k,j) ) /                         &
+                     MAX( ABS( a1(k,j) + a12(k,j) ), 1E-35_wp )
+                IF ( ABS( a1(k,j) + a12(k,j) ) < fmax(2) )  m2 = 0.0_wp
+
+                m3 = 2.0_wp * ABS( a2(k,j) - a22(k,j) ) /                         &
+                     MAX( ABS( a2(k,j) + a22(k,j) ), 1E-35_wp )
+                IF ( ABS( a2(k,j) + a22(k,j) ) < fmax(1) )  m3 = 0.0_wp
+
+                t1 = 0.35_wp
+                t2 = 0.35_wp
+                IF ( m1(k,j) == -1.0_wp )  t2 = 0.12_wp
+
+!--             *VOCL STMT,IF(10)
+                IF ( m1(k-1,j) == 1.0_wp .OR. m1(k,j) == 1.0_wp                   &
+                     .OR. m1(k+1,j) == 1.0_wp .OR.  m2 > t2  .OR.  m3 > t2  .OR.  &
+                     ( m1(k,j) > t1  .AND.  m1(k-1,j) /= -1.0_wp  .AND.           &
+                       m1(k,j) /= -1.0_wp  .AND.  m1(k+1,j) /= -1.0_wp )          &
+                   )  sw(k,j) = 1.0_wp
+             ENDDO
+          ENDDO
+
+!
+!--       Fluxes using exponential scheme
+          CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'continue' )
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k,j) == 1.0_wp )  THEN
+                   snenn = sk_p(k+1,j,i) - sk_p(k-1,j,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i) - sk_p(k-1,j,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cip =  MAX( 0.0_wp, w(k,j,i) * dt_3d * ddzw(k) )
+
+                   ippe(k,j) = sk_p(k-1,j,i) * cip + snenn * (                    &
+                               aex(ix) * cip + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cip ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  ippe(k,j) = sk_p(k,j,i) * cip
+                   IF ( sterm == 0.9999_wp )  ippe(k,j) = sk_p(k,j,i) * cip
+
+                   snenn = sk_p(k-1,j,i) - sk_p(k+1,j,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k,j,i) - sk_p(k+1,j,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cim = -MIN( 0.0_wp, w(k-1,j,i) * dt_3d * ddzw(k) )
+
+                   imme(k,j) = sk_p(k+1,j,i) * cim + snenn * (                    &
+                               aex(ix) * cim + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cim ) ) &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  imme(k,j) = sk_p(k,j,i) * cim
+                   IF ( sterm == 0.9999_wp )  imme(k,j) = sk_p(k,j,i) * cim
+                ENDIF
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k+1,j) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i) - sk_p(k+2,j,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k+1,j,i) - sk_p(k+2,j,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cim = -MIN( 0.0_wp, w(k,j,i) * dt_3d * ddzw(k) )
+
+                   impe(k,j) = sk_p(k+2,j,i) * cim + snenn * (                    &
+                               aex(ix) * cim + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cim ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  impe(k,j) = sk_p(k+1,j,i) * cim
+                   IF ( sterm == 0.9999_wp )  impe(k,j) = sk_p(k+1,j,i) * cim
+                ENDIF
+
+!--             *VOCL STMT,IF(10)
+                IF ( sw(k-1,j) == 1.0_wp )  THEN
+                   snenn = sk_p(k,j,i) - sk_p(k-2,j,i)
+                   IF ( ABS( snenn ) < 1E-9_wp )  snenn = 1E-9_wp
+                   sterm = ( sk_p(k-1,j,i) - sk_p(k-2,j,i) ) / snenn
+                   sterm = MIN( sterm, 0.9999_wp )
+                   sterm = MAX( sterm, 0.0001_wp )
+
+                   ix = INT( sterm * 1000 ) + 1
+
+                   cip = MAX( 0.0_wp, w(k-1,j,i) * dt_3d * ddzw(k) )
+
+                   ipme(k,j) = sk_p(k-2,j,i) * cip + snenn * (                    &
+                               aex(ix) * cip + bex(ix) / dex(ix) * (              &
+                               eex(ix) -                                          &
+                               EXP( dex(ix)*0.5_wp * ( 1.0_wp - 2.0_wp * cip ) )  &
+                                                                   )              &
+                                                             )
+                   IF ( sterm == 0.0001_wp )  ipme(k,j) = sk_p(k-1,j,i) * cip
+                   IF ( sterm == 0.9999_wp )  ipme(k,j) = sk_p(k-1,j,i) * cip
+                ENDIF
+
+             ENDDO
+          ENDDO
+          CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'pause' )
+
+!
+!--       Prognostic equation
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                fplus  = ( 1.0_wp - sw(k,j)   ) * ippb(k,j) + sw(k,j)   * ippe(k,j) &
+                       - ( 1.0_wp - sw(k+1,j) ) * impb(k,j) - sw(k+1,j) * impe(k,j)
+                fminus = ( 1.0_wp - sw(k-1,j) ) * ipmb(k,j) + sw(k-1,j) * ipme(k,j) &
+                       - ( 1.0_wp - sw(k,j)   ) * immb(k,j) - sw(k,j)   * imme(k,j)
+                tendcy = fplus - fminus
+!
+!--              Removed in order to optimise speed
+!                ffmax   = MAX( ABS( fplus ), ABS( fminus ), 1E-35_wp )
+!                IF ( ( ABS( tendcy ) / ffmax ) < 1E-7_wp )  tendcy = 0.0
+!
+!--             Density correction because of possible remaining divergences
+                d_new = d(k,j,i) - ( w(k,j,i) - w(k-1,j,i) ) * dt_3d * ddzw(k)
+                sk_p(k,j,i) = ( ( 1.0_wp + d(k,j,i) ) * sk_p(k,j,i) - tendcy ) /  &
+                              ( 1.0_wp + d_new )
+!
+!--             Store heat flux for subsequent statistics output.
+!--             array m1 is here used as temporary storage
+                m1(k,j) = fplus / dt_3d * dzw(k)
+             ENDDO
+          ENDDO
+
+!
+!--       Sum up heat flux in order to order to obtain horizontal averages
+          IF ( sk_char == 'pt' )  THEN
+             DO  sr = 0, statistic_regions
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      sums_wsts_bc_l(k,sr) = sums_wsts_bc_l(k,sr) +               &
+                                             m1(k,j) * rmask(j,i,sr)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+       ENDDO   ! End of the advection in z-direction
+       CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'continue' )
+       CALL cpu_log( log_point_s(12), 'advec_s_bc:exp', 'stop' )
+
+!
+!--    Deallocate temporary arrays
+       DEALLOCATE( a0, a1, a2, a12, a22, immb, imme, impb, impe, ipmb, ipme,      &
+                   ippb, ippe, m1, sw )
+
+!
+!--    Store results as tendency and deallocate local array
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = tend(k,j,i) + ( sk_p(k,j,i) - sk(k,j,i) ) / dt_3d
+             ENDDO
+          ENDDO
+       ENDDO
+
+       DEALLOCATE( sk_p )
+
+    END SUBROUTINE advec_s_bc
+
+ END MODULE advec_s_bc_mod
Index: /palm/tags/release-6.0/SOURCE/advec_s_pw.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_s_pw.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_s_pw.f90	(revision 3477)
@@ -0,0 +1,241 @@
+!> @file advec_s_pw.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Stokes drift velocity added
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY list
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! Revision 1.1  1997/08/29 08:54:20  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for scalar variables using the Piacsek and Williams scheme
+!> (form C3). Contrary to PW itself, for reasons of accuracy their scheme is
+!> slightly modified as follows: the values of those scalars that are used for
+!> the computation of the flux divergence are reduced by the value of the
+!> relevant scalar at the location where the difference is computed (sk(k,j,i)).
+!> NOTE: at the first grid point above the surface computation still takes place!
+!------------------------------------------------------------------------------!
+ MODULE advec_s_pw_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_s_pw
+
+    INTERFACE advec_s_pw
+       MODULE PROCEDURE advec_s_pw
+       MODULE PROCEDURE advec_s_pw_ij
+    END INTERFACE
+ 
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_pw( sk )
+
+       USE arrays_3d,                                                          &
+           ONLY:  dd2zu, tend, u, u_stokes_zu, v, v_stokes_zu, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb,             &
+                  nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp)     ::  gu  !< local additional advective velocity
+       REAL(wp)     ::  gv  !< local additional advective velocity
+
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  sk
+#endif
+ 
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+
+!
+!--             Galilean transformation + Stokes drift velocity (ocean only)
+                gu = u_gtrans - u_stokes_zu(k)
+                gv = v_gtrans - v_stokes_zu(k)
+
+                tend(k,j,i) = tend(k,j,i) +                                    &
+                                     ( -0.5_wp * ( ( u(k,j,i+1) - gu       ) * &
+                                                   ( sk(k,j,i+1) - sk(k,j,i) ) &
+                                                 - ( u(k,j,i)   - gu       ) * &
+                                                   ( sk(k,j,i-1) - sk(k,j,i) ) &
+                                                 ) * ddx                       &
+                                       -0.5_wp * ( ( v(k,j+1,i) - gv       ) * &
+                                                   ( sk(k,j+1,i) - sk(k,j,i) ) &
+                                                 - ( v(k,j,i)   - gv       ) * &
+                                                   ( sk(k,j-1,i) - sk(k,j,i) ) &
+                                                 ) * ddy                       &
+                                       -         (   w(k,j,i)                * &
+                                                   ( sk(k+1,j,i) - sk(k,j,i) ) &
+                                                 -   w(k-1,j,i)              * &
+                                                   ( sk(k-1,j,i) - sk(k,j,i) ) &
+                                                 ) * dd2zu(k)                  &
+                                      ) * MERGE( 1.0_wp, 0.0_wp,               &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_s_pw
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_pw_ij( i, j, sk )
+
+       USE arrays_3d,                                                          &
+           ONLY:  dd2zu, tend, u, u_stokes_zu, v, v_stokes_zu, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp)     ::  gu  !< local additional advective velocity
+       REAL(wp)     ::  gv  !< local additional advective velocity
+
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  sk
+#endif
+
+
+       DO  k = nzb+1, nzt
+
+!
+!--       Galilean transformation + Stokes drift velocity (ocean only)
+          gu = u_gtrans - u_stokes_zu(k)
+          gv = v_gtrans - v_stokes_zu(k)
+
+          tend(k,j,i) = tend(k,j,i) +                                          &
+                                    ( -0.5_wp * ( ( u(k,j,i+1) - gu        ) * &
+                                                  ( sk(k,j,i+1) - sk(k,j,i) )  &
+                                                - ( u(k,j,i)   - gu        ) * &
+                                                  ( sk(k,j,i-1) - sk(k,j,i) )  &
+                                                ) * ddx                        &
+                                      -0.5_wp * ( ( v(k,j+1,i) - gv       ) *  &
+                                                  ( sk(k,j+1,i) - sk(k,j,i) )  &
+                                                - ( v(k,j,i)   - gv       ) *  &
+                                                  ( sk(k,j-1,i) - sk(k,j,i) )  &
+                                                ) * ddy                        &
+                                      -         (   w(k,j,i)                *  &
+                                                  ( sk(k+1,j,i) - sk(k,j,i) )  &
+                                                -   w(k-1,j,i)              *  &
+                                                  ( sk(k-1,j,i) - sk(k,j,i) )  &
+                                                ) * dd2zu(k)                   &
+                                    ) * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+       ENDDO
+
+    END SUBROUTINE advec_s_pw_ij
+
+ END MODULE advec_s_pw_mod
Index: /palm/tags/release-6.0/SOURCE/advec_s_up.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_s_up.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_s_up.f90	(revision 3477)
@@ -0,0 +1,277 @@
+!> @file advec_s_up.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY list
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! 981 2012-08-09 14:57:44Z maronga
+! Typo removed
+!
+! Revision 1.1  1997/08/29 08:54:33  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for scalar quantities using the Upstream scheme.
+!> NOTE: vertical advection at k=1 still has wrong grid spacing for w>0!
+!>       The same problem occurs for all topography boundaries!
+!------------------------------------------------------------------------------!
+ MODULE advec_s_up_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_s_up
+
+    INTERFACE advec_s_up
+       MODULE PROCEDURE advec_s_up
+       MODULE PROCEDURE advec_s_up_ij
+    END INTERFACE advec_s_up
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_up( sk )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,        &
+                  wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+       REAL(wp) ::  wkomp !<
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  sk
+#endif
+
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             x-direction
+                ukomp = 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - u_gtrans
+                IF ( ukomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( sk(k,j,i) - sk(k,j,i-1) ) * ddx     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( sk(k,j,i+1) - sk(k,j,i) ) * ddx     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDIF
+!
+!--             y-direction
+                vkomp = 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - v_gtrans
+                IF ( vkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( sk(k,j,i) - sk(k,j-1,i) ) * ddy     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( sk(k,j+1,i) - sk(k,j,i) ) * ddy     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDIF
+!
+!--             z-direction
+                wkomp = 0.5_wp * ( w(k,j,i) + w(k-1,j,i) )
+                IF ( wkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
+                                         ( sk(k,j,i) - sk(k-1,j,i) ) * ddzu(k) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
+                                         ( sk(k+1,j,i)-sk(k,j,i) ) * ddzu(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_s_up
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_up_ij( i, j, sk )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+       REAL(wp) ::  wkomp !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  sk
+#endif
+
+
+       DO  k = nzb+1, nzt
+!
+!--       x-direction
+          ukomp = 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - u_gtrans
+          IF ( ukomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( sk(k,j,i) - sk(k,j,i-1) ) * ddx     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( sk(k,j,i+1) - sk(k,j,i) ) * ddx     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ENDIF
+!
+!--       y-direction
+          vkomp = 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - v_gtrans
+          IF ( vkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( sk(k,j,i) - sk(k,j-1,i) ) * ddy     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( sk(k,j+1,i) - sk(k,j,i) ) * ddy     &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ENDIF
+!
+!--       z-direction
+          wkomp = 0.5_wp * ( w(k,j,i) + w(k-1,j,i) )
+          IF ( wkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
+                                         ( sk(k,j,i) - sk(k-1,j,i) ) * ddzu(k) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
+                                         ( sk(k+1,j,i)-sk(k,j,i) ) * ddzu(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE advec_s_up_ij
+
+ END MODULE advec_s_up_mod
Index: /palm/tags/release-6.0/SOURCE/advec_u_pw.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_u_pw.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_u_pw.f90	(revision 3477)
@@ -0,0 +1,193 @@
+!> @file advec_u_pw.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/11 06:09:21  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for u velocity-component using Piacsek and Williams.
+!> Vertical advection at the first grid point above the surface is done with
+!> normal centred differences, because otherwise no information from the surface
+!> would be communicated upwards due to w=0 at K=nzb.
+!------------------------------------------------------------------------------!
+ MODULE advec_u_pw_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_u_pw
+
+    INTERFACE advec_u_pw
+       MODULE PROCEDURE advec_u_pw
+       MODULE PROCEDURE advec_u_pw_ij
+    END INTERFACE advec_u_pw
+ 
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_u_pw
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxlu, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+       
+       REAL(wp)    ::  gu !<
+       REAL(wp)    ::  gv !<
+ 
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+       DO  i = nxlu, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = tend(k,j,i) - 0.25_wp * (                        &
+                         ( u(k,j,i+1) * ( u(k,j,i+1) + u(k,j,i) - gu )         &
+                         - u(k,j,i-1) * ( u(k,j,i) + u(k,j,i-1) - gu ) ) * ddx &
+                       + ( u(k,j+1,i) * ( v(k,j+1,i) + v(k,j+1,i-1) - gv )     &
+                         - u(k,j-1,i) * ( v(k,j,i) + v(k,j,i-1) - gv ) ) * ddy &
+                       + ( u(k+1,j,i) * ( w(k,j,i) + w(k,j,i-1) )              &
+                         - u(k-1,j,i) * ( w(k-1,j,i) + w(k-1,j,i-1) ) )        &
+                                                                  * ddzw(k)    &
+                                                      )                        &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_u_pw
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_u_pw_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+       
+       REAL(wp)    ::  gu !<
+       REAL(wp)    ::  gv !<
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+       DO  k = nzb+1, nzt
+          tend(k,j,i) = tend(k,j,i) - 0.25_wp * (                              &
+                         ( u(k,j,i+1) * ( u(k,j,i+1) + u(k,j,i) - gu )         &
+                         - u(k,j,i-1) * ( u(k,j,i) + u(k,j,i-1) - gu ) ) * ddx &
+                       + ( u(k,j+1,i) * ( v(k,j+1,i) + v(k,j+1,i-1) - gv )     &
+                         - u(k,j-1,i) * ( v(k,j,i) + v(k,j,i-1) - gv ) ) * ddy &
+                       + ( u(k+1,j,i) * ( w(k,j,i) + w(k,j,i-1) )              &
+                         - u(k-1,j,i) * ( w(k-1,j,i) + w(k-1,j,i-1) ) )        &
+                                                                  * ddzw(k)    &
+                                                )                              &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+       ENDDO
+
+    END SUBROUTINE advec_u_pw_ij
+
+ END MODULE advec_u_pw_mod
Index: /palm/tags/release-6.0/SOURCE/advec_u_up.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_u_up.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_u_up.f90	(revision 3477)
@@ -0,0 +1,259 @@
+!> @file advec_u_up.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/29 08:55:25  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for the u velocity-component using upstream scheme.
+!> NOTE: vertical advection at k=1 still has wrong grid spacing for w>0!
+!>       The same problem occurs for all topography boundaries!
+!------------------------------------------------------------------------------!
+ MODULE advec_u_up_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_u_up
+
+    INTERFACE advec_u_up
+       MODULE PROCEDURE advec_u_up
+       MODULE PROCEDURE advec_u_up_ij
+    END INTERFACE advec_u_up
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_u_up
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxlu, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+       REAL(wp) ::  wkomp !<
+
+       
+       DO  i = nxlu, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             x-direction
+                ukomp = u(k,j,i) - u_gtrans
+                IF ( ukomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( u(k,j,i) - u(k,j,i-1) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                          ( u(k,j,i+1) - u(k,j,i) ) * ddx      &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                ENDIF
+!
+!--             y-direction
+                vkomp = 0.25_wp * ( v(k,j,i)   + v(k,j+1,i) +                  &
+                                 v(k,j,i-1) + v(k,j+1,i-1) ) - v_gtrans
+                IF ( vkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( u(k,j,i) - u(k,j-1,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( u(k,j+1,i) - u(k,j,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                ENDIF
+!
+!--             z-direction
+                wkomp = 0.25_wp * ( w(k,j,i)   + w(k-1,j,i) +                  &
+                                 w(k,j,i-1) + w(k-1,j,i-1) )
+                IF ( wkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
+                                         ( u(k,j,i) - u(k-1,j,i) ) * ddzu(k)   &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
+                                         ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_u_up
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_u_up_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+       REAL(wp) ::  wkomp !<
+
+
+       DO  k = nzb+1, nzt
+!
+!--       x-direction
+          ukomp = u(k,j,i) - u_gtrans
+          IF ( ukomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( u(k,j,i) - u(k,j,i-1) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( u(k,j,i+1) - u(k,j,i) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+          ENDIF
+!
+!--       y-direction
+          vkomp = 0.25_wp * ( v(k,j,i) + v(k,j+1,i) + v(k,j,i-1) + v(k,j+1,i-1) &
+                         ) - v_gtrans
+          IF ( vkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( u(k,j,i) - u(k,j-1,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( u(k,j+1,i) - u(k,j,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+          ENDIF
+!
+!--       z-direction
+          wkomp = 0.25_wp * ( w(k,j,i) + w(k-1,j,i) + w(k,j,i-1) + w(k-1,j,i-1) )
+          IF ( wkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
+                                         ( u(k,j,i) - u(k-1,j,i) ) * ddzu(k)   &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
+                                         ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE advec_u_up_ij
+
+ END MODULE advec_u_up_mod
Index: /palm/tags/release-6.0/SOURCE/advec_v_pw.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_v_pw.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_v_pw.f90	(revision 3477)
@@ -0,0 +1,197 @@
+!> @file advec_v_pw.f90
+!------------------------------------------------------------------------------!
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/11 06:09:57  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for v velocity-component using Piacsek and Williams.
+!> Vertical advection at the first grid point above the surface is done with
+!> normal centred differences, because otherwise no information from the surface
+!> would be communicated upwards due to w=0 at K=nzb.
+!------------------------------------------------------------------------------!
+ MODULE advec_v_pw_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_v_pw
+
+    INTERFACE advec_v_pw
+       MODULE PROCEDURE advec_v_pw
+       MODULE PROCEDURE advec_v_pw_ij
+    END INTERFACE advec_v_pw
+ 
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_v_pw
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nysv, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+       
+       REAL(wp)    ::  gu !<
+       REAL(wp)    ::  gv !<
+ 
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+       DO  i = nxl, nxr
+          DO  j = nysv, nyn
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = tend(k,j,i) - 0.25_wp * (                        &
+                         ( v(k,j,i+1) * ( u(k,j-1,i+1) + u(k,j,i+1) - gu )     &
+                         - v(k,j,i-1) * ( u(k,j-1,i) + u(k,j,i) - gu ) ) * ddx &
+                       + ( v(k,j+1,i) * ( v(k,j+1,i) + v(k,j,i) - gv )         &
+                         - v(k,j-1,i) * ( v(k,j,i) + v(k,j-1,i) - gv ) ) * ddy &
+                       + ( v(k+1,j,i) * ( w(k,j-1,i) + w(k,j,i) )              &
+                         - v(k-1,j,i) * ( w(k-1,j-1,i) + w(k-1,j,i) ) )        &
+                                                                  * ddzw(k)    &
+                                                      )                        &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_v_pw
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_v_pw_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+       
+       REAL(wp)    ::  gu !<
+       REAL(wp)    ::  gv !<
+
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+       DO  k = nzb+1, nzt
+          tend(k,j,i) = tend(k,j,i) - 0.25_wp * (                              &
+                         ( v(k,j,i+1) * ( u(k,j-1,i+1) + u(k,j,i+1) - gu )     &
+                         - v(k,j,i-1) * ( u(k,j-1,i) + u(k,j,i) - gu ) ) * ddx &
+                       + ( v(k,j+1,i) * ( v(k,j+1,i) + v(k,j,i) - gv )         &
+                         - v(k,j-1,i) * ( v(k,j,i) + v(k,j-1,i) - gv ) ) * ddy &
+                       + ( v(k+1,j,i) * ( w(k,j-1,i) + w(k,j,i) )              &
+                         - v(k-1,j,i) * ( w(k-1,j-1,i) + w(k-1,j,i) ) )        &
+                                                                  * ddzw(k)    &
+                                                )                              &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+       ENDDO
+ 
+    END SUBROUTINE advec_v_pw_ij
+
+ END MODULE advec_v_pw_mod
+ 
Index: /palm/tags/release-6.0/SOURCE/advec_v_up.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_v_up.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_v_up.f90	(revision 3477)
@@ -0,0 +1,259 @@
+!> @file advec_v_up.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/29 08:56:05  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for the v velocity-component using upstream scheme.
+!> NOTE: vertical advection at k=1 still has wrong grid spacing for w>0!
+!>       The same problem occurs for all topography boundaries!
+!------------------------------------------------------------------------------!
+ MODULE advec_v_up_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_v_up
+
+    INTERFACE advec_v_up
+       MODULE PROCEDURE advec_v_up
+       MODULE PROCEDURE advec_v_up_ij
+    END INTERFACE advec_v_up
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_v_up
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nysv, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+       REAL(wp) ::  wkomp !<       
+
+
+       DO  i = nxl, nxr
+          DO  j = nysv, nyn
+             DO  k = nzb+1, nzt
+!
+!--             x-direction
+                ukomp = 0.25_wp * ( u(k,j,i)   + u(k,j-1,i) +                  &
+                                 u(k,j,i+1) + u(k,j-1,i+1) ) - u_gtrans
+                IF ( ukomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( v(k,j,i) - v(k,j,i-1) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( v(k,j,i+1) - v(k,j,i) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ENDIF
+!
+!--             y-direction
+                vkomp = v(k,j,i) - v_gtrans
+                IF ( vkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( v(k,j,i) - v(k,j-1,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( v(k,j+1,i) - v(k,j,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ENDIF
+!
+!--             z-direction
+                wkomp = 0.25_wp * ( w(k,j,i)  + w(k-1,j,i) +                   &
+                                 w(k,j-1,i) + w(k-1,j-1,i) )
+                IF ( wkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
+                                         ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)   &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - wkomp *                         &
+                                         ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_v_up
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_v_up_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+       REAL(wp) ::  wkomp !<
+
+
+       DO  k = nzb+1, nzt
+!
+!--       x-direction
+          ukomp = 0.25_wp * ( u(k,j,i) + u(k,j-1,i) + u(k,j,i+1) + u(k,j-1,i+1) &
+                         ) - u_gtrans
+          IF ( ukomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( v(k,j,i) - v(k,j,i-1) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( v(k,j,i+1) - v(k,j,i) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+          ENDIF
+!
+!--       y-direction
+          vkomp = v(k,j,i) - v_gtrans
+          IF ( vkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( v(k,j,i) - v(k,j-1,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( v(k,j+1,i) - v(k,j,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+          ENDIF
+!
+!--       z-direction
+          wkomp = 0.25_wp * ( w(k,j,i) + w(k-1,j,i) + w(k,j-1,i) + w(k-1,j-1,i) )
+          IF ( wkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
+                                         ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k)   &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - wkomp *                               &
+                                         ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE advec_v_up_ij
+
+ END MODULE advec_v_up_mod
Index: /palm/tags/release-6.0/SOURCE/advec_w_pw.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_w_pw.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_w_pw.f90	(revision 3477)
@@ -0,0 +1,193 @@
+!> @file advec_w_pw.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/11 06:10:29  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for w velocity-component using Piacsek and Williams.
+!> Vertical advection at the first grid point above the surface is done with
+!> normal centred differences, because otherwise no information from the surface
+!> would be communicated upwards due to w=0 at k=nzb.
+!------------------------------------------------------------------------------!
+ MODULE advec_w_pw_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_w_pw
+
+    INTERFACE advec_w_pw
+       MODULE PROCEDURE advec_w_pw
+       MODULE PROCEDURE advec_w_pw_ij
+    END INTERFACE advec_w_pw
+ 
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_w_pw
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+       
+       REAL(wp)    ::  gu !<
+       REAL(wp)    ::  gv !<
+
+ 
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = tend(k,j,i) - 0.25_wp * (                        &
+                         ( w(k,j,i+1) * ( u(k+1,j,i+1) + u(k,j,i+1) - gu )     &
+                         - w(k,j,i-1) * ( u(k+1,j,i) + u(k,j,i) - gu ) ) * ddx &
+                       + ( w(k,j+1,i) * ( v(k+1,j+1,i) + v(k,j+1,i) - gv )     &
+                         - w(k,j-1,i) * ( v(k+1,j,i) + v(k,j,i) - gv ) ) * ddy &
+                       + ( w(k+1,j,i) * ( w(k+1,j,i) + w(k,j,i) )              &
+                         - w(k-1,j,i) * ( w(k,j,i) + w(k-1,j,i) ) )            &
+                                                                  * ddzu(k+1)  &
+                                                      )                        &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_w_pw
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_w_pw_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+       
+       REAL(wp)    ::  gu !<
+       REAL(wp)    ::  gv !<
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+       DO  k = nzb+1, nzt
+          tend(k,j,i) = tend(k,j,i) - 0.25_wp * (                              &
+                         ( w(k,j,i+1) * ( u(k+1,j,i+1) + u(k,j,i+1) - gu )     &
+                         - w(k,j,i-1) * ( u(k+1,j,i) + u(k,j,i) - gu ) ) * ddx &
+                       + ( w(k,j+1,i) * ( v(k+1,j+1,i) + v(k,j+1,i) - gv )     &
+                         - w(k,j-1,i) * ( v(k+1,j,i) + v(k,j,i) - gv ) ) * ddy &
+                       + ( w(k+1,j,i) * ( w(k+1,j,i) + w(k,j,i) )              &
+                         - w(k-1,j,i) * ( w(k,j,i) + w(k-1,j,i) ) )            &
+                                                                  * ddzu(k+1)  &
+                                                )                              &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+       ENDDO
+    END SUBROUTINE advec_w_pw_ij
+
+ END MODULE advec_w_pw_mod
Index: /palm/tags/release-6.0/SOURCE/advec_w_up.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_w_up.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_w_up.f90	(revision 3477)
@@ -0,0 +1,259 @@
+!> @file advec_w_up.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Missing wall flags added
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! topography representation via flags
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/29 08:56:33  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Advection term for the w velocity-component using upstream scheme.
+!> NOTE: vertical advection at k=1 still has wrong grid spacing for w>0
+!>       The same problem occurs for all topography boundaries!
+!------------------------------------------------------------------------------!
+ MODULE advec_w_up_mod
+ 
+
+    PRIVATE
+    PUBLIC advec_w_up
+
+    INTERFACE advec_w_up
+       MODULE PROCEDURE advec_w_up
+       MODULE PROCEDURE advec_w_up_ij
+    END INTERFACE advec_w_up
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_w_up
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt-1
+!
+!--             x-direction
+                ukomp = 0.25_wp * ( u(k,j,i)   + u(k,j,i+1) +                  &
+                                 u(k+1,j,i) + u(k+1,j,i+1) ) - u_gtrans
+                IF ( ukomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( w(k,j,i) - w(k,j,i-1) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - ukomp *                         &
+                                         ( w(k,j,i+1) - w(k,j,i) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                ENDIF
+!
+!--             y-direction
+                vkomp = 0.25_wp * ( v(k,j,i) + v(k,j+1,i) +                    &
+                                 v(k+1,j,i) + v(k+1,j+1,i) ) - v_gtrans
+                IF ( vkomp > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( w(k,j,i) - w(k,j-1,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - vkomp *                         &
+                                         ( w(k,j+1,i) - w(k,j,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                ENDIF
+!
+!--             z-direction
+                IF ( w(k,j,i) > 0.0_wp )  THEN
+                   tend(k,j,i) = tend(k,j,i) - w(k,j,i) *                      &
+                                         ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k)   &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                ELSE
+                   tend(k,j,i) = tend(k,j,i) - w(k,j,i) *                      &
+                                         ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_w_up
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_w_up_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, tend, u, v, w
+
+       USE control_parameters,                                                 &
+           ONLY:  u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+
+       USE kinds
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp) ::  ukomp !<
+       REAL(wp) ::  vkomp !<
+
+
+       DO  k = nzb+1, nzt-1
+!
+!--       x-direction
+          ukomp = 0.25_wp * ( u(k,j,i) + u(k,j,i+1) + u(k+1,j,i) + u(k+1,j,i+1) &
+                         ) - u_gtrans
+          IF ( ukomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( w(k,j,i) - w(k,j,i-1) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - ukomp *                               &
+                                         ( w(k,j,i+1) - w(k,j,i) ) * ddx       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+          ENDIF
+!
+!--       y-direction
+          vkomp = 0.25_wp * ( v(k,j,i) + v(k,j+1,i) + v(k+1,j,i) + v(k+1,j+1,i) &
+                         ) - v_gtrans
+          IF ( vkomp > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( w(k,j,i) - w(k,j-1,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - vkomp *                               &
+                                         ( w(k,j+1,i) - w(k,j,i) ) * ddy       &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+          ENDIF
+!
+!--       z-direction
+          IF ( w(k,j,i) > 0.0_wp )  THEN
+             tend(k,j,i) = tend(k,j,i) - w(k,j,i) *                            &
+                                         ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k)   &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+          ELSE
+             tend(k,j,i) = tend(k,j,i) - w(k,j,i) *                            &
+                                         ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE advec_w_up_ij
+
+ END MODULE advec_w_up_mod
Index: /palm/tags/release-6.0/SOURCE/advec_ws.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/advec_ws.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/advec_ws.f90	(revision 3477)
@@ -0,0 +1,5258 @@
+!> @file advec_ws.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3302 2018-10-03 02:39:40Z raasch
+! Stokes drift velocity added in scalar advection
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Add formatted note from ketelsen about statistics for chemistry
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! ocean renamed ocean_mode
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables for boundary-condition flags and for offline nesting mode 
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Bugfix in calculation of left-sided fluxes for u-component in OpenMP case.
+! 
+! 2731 2018-01-09 17:44:02Z suehring
+! Enable loop vectorization by splitting the k-loop
+!
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implement advection for TKE-dissipation in case of RANS-TKE-e closure (TG)
+! Allocate advc_flags_1/2 within ws_init_flags instead of init_grid
+! Change argument list for exchange_horiz_2d_int (MS)
+! 
+! 2329 2017-08-03 14:24:56Z knoop
+! Bugfix concerning density in divergence correction close to buildings
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+! 
+! 2232 2017-05-30 17:47:52Z suehring
+! Rename wall_flags_0 and wall_flags_00 into advc_flags_1 and advc_flags_2, 
+! respectively.
+! Set advc_flags_1/2 on basis of wall_flags_0/00 instead of nzb_s/u/v/w_inner.
+! Setting advc_flags_1/2 also for downward-facing walls
+! 
+! 2200 2017-04-11 11:37:51Z suehring
+! monotonic_adjustment removed
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutines removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1996 2016-08-18 11:42:29Z suehring
+! Bugfix concerning calculation of turbulent of turbulent fluxes
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! 
+! 1942 2016-06-14 12:18:18Z suehring
+! Initialization of flags for ws-scheme moved from init_grid.
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme removed, microphysics_seifert added
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1630 2015-08-26 16:57:23Z suehring
+! 
+! 
+! 1629 2015-08-26 16:56:11Z suehring
+! Bugfix concerning wall_flags at left and south PE boundaries
+!
+! 1581 2015-04-10 13:45:59Z suehring
+! 
+! 
+! 1580 2015-04-10 13:43:49Z suehring
+! Bugfix: statistical evaluation of scalar fluxes in case of monotonic limiter
+!
+! 1567 2015-03-10 17:57:55Z suehring
+! Bugfixes in monotonic limiter.
+!
+! 2015-03-09 13:10:37Z heinze
+! Bugfix: REAL constants provided with KIND-attribute in call of 
+! intrinsic functions like MAX and MIN 
+! 
+! 1557 2015-03-05 16:43:04Z suehring
+! Enable monotone advection for scalars using monotonic limiter
+!
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY list
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! accelerator and vector version for qr and nr added
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute,
+! module kinds added
+! some formatting adjustments
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! accelerator loop directives removed
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! wall_flags_00 introduced, which holds bits 32-...
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! calculation of qr and nr is restricted to precipitation
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! necessary expansions according to the two new prognostic equations (nr, qr) 
+! of the two-moment cloud physics scheme:
+! +flux_l_*, flux_s_*, diss_l_*, diss_s_*, sums_ws*s_ws_l 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1027 2012-10-15 17:18:39Z suehring
+! Bugfix in calculation indices k_mm, k_pp in accelerator version
+!
+! 1019 2012-09-28 06:46:45Z raasch
+! small change in comment lines
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator versions (*_acc) added
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! 888 2012-04-20 15:03:46Z suehring
+! Number of IBITS() calls with identical arguments is reduced.
+!
+! 862 2012-03-26 14:21:38Z suehring
+! ws-scheme also work with topography in combination with vector version.
+! ws-scheme also work with outflow boundaries in combination with
+! vector version.
+! Degradation of the applied order of scheme is now steered by multiplying with
+! Integer advc_flags_1. 2nd order scheme, WS3 and WS5 are calculated on each
+! grid point and mulitplied with the appropriate flag.
+! 2nd order numerical dissipation term changed. Now the appropriate 2nd order
+! term derived according to the 4th and 6th order terms is applied. It turns
+! out that diss_2nd does not provide sufficient dissipation near walls.
+! Therefore, the function diss_2nd is removed.
+! Near walls a divergence correction is necessary to overcome numerical
+! instabilities due to too less divergence reduction of the velocity field.
+! boundary_flags and logicals steering the degradation are removed.
+! Empty SUBROUTINE local_diss removed.
+! Further formatting adjustments.
+!
+! 801 2012-01-10 17:30:36Z suehring
+! Bugfix concerning OpenMP parallelization. Summation of sums_wsus_ws_l,
+! sums_wsvs_ws_l, sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l, sums_wspts_ws_l,
+! sums_wsqs_ws_l, sums_wssas_ws_l is now thread-safe by adding an additional
+! dimension.
+!
+! Initial revision
+!
+! 411 2009-12-11 12:31:43 Z suehring
+!
+! Description:
+! ------------
+!> Advection scheme for scalars and momentum using the flux formulation of
+!> Wicker and Skamarock 5th order. Additionally the module contains of a 
+!> routine using for initialisation and steering of the statical evaluation. 
+!> The computation of turbulent fluxes takes place inside the advection
+!> routines.
+!> Near non-cyclic boundaries the order of the applied advection scheme is
+!> degraded.
+!> A divergence correction is applied. It is necessary for topography, since
+!> the divergence is not sufficiently reduced, resulting in erroneous fluxes and
+!> partly numerical instabilities. 
+!-----------------------------------------------------------------------------!
+ MODULE advec_ws
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    REAL(wp) ::  adv_mom_1            !< 1/4 - constant used in 5th-order advection scheme for momentum advection (1st-order part)
+    REAL(wp) ::  adv_mom_3            !< 1/24 - constant used in 5th-order advection scheme for momentum advection (3rd-order part)
+    REAL(wp) ::  adv_mom_5            !< 1/120 - constant used in 5th-order advection scheme for momentum advection (5th-order part)
+    REAL(wp) ::  adv_sca_1            !< 1/2 - constant used in 5th-order advection scheme for scalar advection (1st-order part)
+    REAL(wp) ::  adv_sca_3            !< 1/12 - constant used in 5th-order advection scheme for scalar advection (3rd-order part)
+    REAL(wp) ::  adv_sca_5            !< 1/60 - constant used in 5th-order advection scheme for scalar advection (5th-order part)
+
+    PRIVATE
+    PUBLIC   advec_s_ws, advec_u_ws, advec_v_ws, advec_w_ws, ws_init,          &
+             ws_init_flags, ws_statistics
+
+    INTERFACE ws_init
+       MODULE PROCEDURE ws_init
+    END INTERFACE ws_init
+
+    INTERFACE ws_init_flags
+       MODULE PROCEDURE ws_init_flags
+    END INTERFACE ws_init_flags
+
+    INTERFACE ws_statistics
+       MODULE PROCEDURE ws_statistics
+    END INTERFACE ws_statistics
+
+    INTERFACE advec_s_ws
+       MODULE PROCEDURE advec_s_ws
+       MODULE PROCEDURE advec_s_ws_ij
+    END INTERFACE advec_s_ws
+
+    INTERFACE advec_u_ws
+       MODULE PROCEDURE advec_u_ws
+       MODULE PROCEDURE advec_u_ws_ij
+    END INTERFACE advec_u_ws
+
+    INTERFACE advec_v_ws
+       MODULE PROCEDURE advec_v_ws
+       MODULE PROCEDURE advec_v_ws_ij
+    END INTERFACE advec_v_ws
+
+    INTERFACE advec_w_ws
+       MODULE PROCEDURE advec_w_ws
+       MODULE PROCEDURE advec_w_ws_ij
+    END INTERFACE advec_w_ws
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of WS-scheme
+!------------------------------------------------------------------------------!
+    SUBROUTINE ws_init
+
+       USE arrays_3d,                                                          &
+           ONLY:  diss_l_diss, diss_l_e, diss_l_nc, diss_l_nr, diss_l_pt,      &
+                  diss_l_q, diss_l_qc, diss_l_qr, diss_l_s, diss_l_sa,         &
+                  diss_l_u, diss_l_v, diss_l_w, flux_l_diss, flux_l_e,         & 
+                  flux_l_nc, flux_l_nr, flux_l_pt, flux_l_q, flux_l_qc,        &
+                  flux_l_qr, flux_l_s, flux_l_sa, flux_l_u, flux_l_v,          &
+                  flux_l_w, diss_s_diss, diss_s_e, diss_s_nc,  diss_s_nr,      &
+                  diss_s_pt, diss_s_q, diss_s_qc, diss_s_qr, diss_s_s,         &
+                  diss_s_sa, diss_s_u, diss_s_v,  diss_s_w, flux_s_diss,       &
+                  flux_s_e, flux_s_nc, flux_s_nr, flux_s_pt, flux_s_q,         &
+                  flux_s_qc, flux_s_qr, flux_s_s, flux_s_sa, flux_s_u,         &
+                  flux_s_v, flux_s_w
+
+       USE control_parameters,                                                 &
+           ONLY:  humidity, loop_optimization, passive_scalar, ocean_mode,     &
+                  rans_tke_e, ws_scheme_mom, ws_scheme_sca
+
+       USE indices,                                                            &
+           ONLY:  nyn, nys, nzb, nzt
+
+       USE kinds
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+       USE pegrid
+
+       USE salsa_util_mod,                                                     &
+           ONLY:  sums_salsa_ws_l   
+       
+       USE statistics,                                                         &
+           ONLY:  sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l, sums_wsncs_ws_l,& 
+                  sums_wsnrs_ws_l,sums_wspts_ws_l, sums_wsqcs_ws_l,            &
+                  sums_wsqrs_ws_l, sums_wsqs_ws_l, sums_wsss_ws_l,             &
+                  sums_wssas_ws_l,  sums_wsss_ws_l, sums_wsus_ws_l,            &
+                  sums_wsvs_ws_l
+  
+
+!
+!--    Set the appropriate factors for scalar and momentum advection.
+       adv_sca_5 = 1.0_wp /  60.0_wp
+       adv_sca_3 = 1.0_wp /  12.0_wp
+       adv_sca_1 = 1.0_wp /   2.0_wp
+       adv_mom_5 = 1.0_wp / 120.0_wp
+       adv_mom_3 = 1.0_wp /  24.0_wp
+       adv_mom_1 = 1.0_wp /   4.0_wp
+!         
+!--    Arrays needed for statical evaluation of fluxes.
+       IF ( ws_scheme_mom )  THEN
+
+          ALLOCATE( sums_wsus_ws_l(nzb:nzt+1,0:threads_per_task-1),            &
+                    sums_wsvs_ws_l(nzb:nzt+1,0:threads_per_task-1),            &
+                    sums_us2_ws_l(nzb:nzt+1,0:threads_per_task-1),             &
+                    sums_vs2_ws_l(nzb:nzt+1,0:threads_per_task-1),             &
+                    sums_ws2_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+
+          sums_wsus_ws_l = 0.0_wp
+          sums_wsvs_ws_l = 0.0_wp
+          sums_us2_ws_l  = 0.0_wp
+          sums_vs2_ws_l  = 0.0_wp
+          sums_ws2_ws_l  = 0.0_wp
+
+       ENDIF
+
+       IF ( ws_scheme_sca )  THEN
+
+          ALLOCATE( sums_wspts_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+          sums_wspts_ws_l = 0.0_wp
+
+          IF ( humidity  )  THEN
+             ALLOCATE( sums_wsqs_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             sums_wsqs_ws_l = 0.0_wp
+          ENDIF
+          
+          IF ( passive_scalar )  THEN
+             ALLOCATE( sums_wsss_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             sums_wsss_ws_l = 0.0_wp
+          ENDIF
+
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             ALLOCATE( sums_wsqcs_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             ALLOCATE( sums_wsncs_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             sums_wsqcs_ws_l = 0.0_wp
+             sums_wsncs_ws_l = 0.0_wp
+          ENDIF
+
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             ALLOCATE( sums_wsqrs_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             ALLOCATE( sums_wsnrs_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             sums_wsqrs_ws_l = 0.0_wp
+             sums_wsnrs_ws_l = 0.0_wp
+          ENDIF
+
+          IF ( ocean_mode )  THEN
+             ALLOCATE( sums_wssas_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+             sums_wssas_ws_l = 0.0_wp
+          ENDIF        
+!          
+!--       Mona: Now always allocated
+          ALLOCATE( sums_salsa_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+          sums_salsa_ws_l = 0.0_wp         
+
+       ENDIF
+
+!
+!--    Arrays needed for reasons of speed optimization for cache version.
+!--    For the vector version the buffer arrays are not necessary,
+!--    because the the fluxes can swapped directly inside the loops of the 
+!--    advection routines.
+       IF ( loop_optimization /= 'vector' )  THEN
+
+          IF ( ws_scheme_mom )  THEN
+
+             ALLOCATE( flux_s_u(nzb+1:nzt,0:threads_per_task-1),               &
+                       flux_s_v(nzb+1:nzt,0:threads_per_task-1),               &
+                       flux_s_w(nzb+1:nzt,0:threads_per_task-1),               &
+                       diss_s_u(nzb+1:nzt,0:threads_per_task-1),               &
+                       diss_s_v(nzb+1:nzt,0:threads_per_task-1),               &
+                       diss_s_w(nzb+1:nzt,0:threads_per_task-1) )
+             ALLOCATE( flux_l_u(nzb+1:nzt,nys:nyn,0:threads_per_task-1),       &
+                       flux_l_v(nzb+1:nzt,nys:nyn,0:threads_per_task-1),       &
+                       flux_l_w(nzb+1:nzt,nys:nyn,0:threads_per_task-1),       &
+                       diss_l_u(nzb+1:nzt,nys:nyn,0:threads_per_task-1),       &
+                       diss_l_v(nzb+1:nzt,nys:nyn,0:threads_per_task-1),       &
+                       diss_l_w(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )
+
+          ENDIF
+
+          IF ( ws_scheme_sca )  THEN
+
+             ALLOCATE( flux_s_pt(nzb+1:nzt,0:threads_per_task-1),              &
+                       flux_s_e(nzb+1:nzt,0:threads_per_task-1),               &
+                       diss_s_pt(nzb+1:nzt,0:threads_per_task-1),              &
+                       diss_s_e(nzb+1:nzt,0:threads_per_task-1) ) 
+             ALLOCATE( flux_l_pt(nzb+1:nzt,nys:nyn,0:threads_per_task-1),      &
+                       flux_l_e(nzb+1:nzt,nys:nyn,0:threads_per_task-1),       &
+                       diss_l_pt(nzb+1:nzt,nys:nyn,0:threads_per_task-1),      &
+                       diss_l_e(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )
+
+             IF ( rans_tke_e )  THEN
+                ALLOCATE( flux_s_diss(nzb+1:nzt,0:threads_per_task-1),         &
+                          diss_s_diss(nzb+1:nzt,0:threads_per_task-1) )
+                ALLOCATE( flux_l_diss(nzb+1:nzt,nys:nyn,0:threads_per_task-1), &
+                          diss_l_diss(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )
+             ENDIF
+
+             IF ( humidity )  THEN
+                ALLOCATE( flux_s_q(nzb+1:nzt,0:threads_per_task-1),            &
+                          diss_s_q(nzb+1:nzt,0:threads_per_task-1) )
+                ALLOCATE( flux_l_q(nzb+1:nzt,nys:nyn,0:threads_per_task-1),    &
+                          diss_l_q(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )
+             ENDIF
+             
+             IF ( passive_scalar )  THEN
+                ALLOCATE( flux_s_s(nzb+1:nzt,0:threads_per_task-1),            &
+                          diss_s_s(nzb+1:nzt,0:threads_per_task-1) )
+                ALLOCATE( flux_l_s(nzb+1:nzt,nys:nyn,0:threads_per_task-1),    &
+                          diss_l_s(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )
+             ENDIF
+
+             IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+                ALLOCATE( flux_s_qc(nzb+1:nzt,0:threads_per_task-1),           &
+                          diss_s_qc(nzb+1:nzt,0:threads_per_task-1),           &
+                          flux_s_nc(nzb+1:nzt,0:threads_per_task-1),           &
+                          diss_s_nc(nzb+1:nzt,0:threads_per_task-1) )
+                ALLOCATE( flux_l_qc(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          diss_l_qc(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          flux_l_nc(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          diss_l_nc(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 
+             ENDIF                  
+
+             IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+                ALLOCATE( flux_s_qr(nzb+1:nzt,0:threads_per_task-1),           &
+                          diss_s_qr(nzb+1:nzt,0:threads_per_task-1),           &
+                          flux_s_nr(nzb+1:nzt,0:threads_per_task-1),           &
+                          diss_s_nr(nzb+1:nzt,0:threads_per_task-1) )
+                ALLOCATE( flux_l_qr(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          diss_l_qr(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          flux_l_nr(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          diss_l_nr(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 
+             ENDIF
+
+             IF ( ocean_mode )  THEN
+                ALLOCATE( flux_s_sa(nzb+1:nzt,0:threads_per_task-1),           &
+                          diss_s_sa(nzb+1:nzt,0:threads_per_task-1) )
+                ALLOCATE( flux_l_sa(nzb+1:nzt,nys:nyn,0:threads_per_task-1),   &
+                          diss_l_sa(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )
+             ENDIF
+
+          ENDIF
+
+       ENDIF
+
+    END SUBROUTINE ws_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of flags for WS-scheme used to degrade the order of the scheme
+!> near walls.
+!------------------------------------------------------------------------------!
+    SUBROUTINE ws_init_flags
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
+                  bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
+                  bc_radiation_r, bc_radiation_s, momentum_advec, scalar_advec
+
+       USE indices,                                                            &
+           ONLY:  advc_flags_1, advc_flags_2, nbgp, nxl, nxlg, nxlu, nxr, nxrg,&
+                  nyn, nyng, nys, nysg, nysv, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i     !< index variable along x
+       INTEGER(iwp) ::  j     !< index variable along y
+       INTEGER(iwp) ::  k     !< index variable along z
+       INTEGER(iwp) ::  k_mm  !< dummy index along z
+       INTEGER(iwp) ::  k_pp  !< dummy index along z
+       INTEGER(iwp) ::  k_ppp !< dummy index along z
+       
+       LOGICAL      ::  flag_set !< steering variable for advection flags
+   
+       ALLOCATE( advc_flags_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                  &
+                 advc_flags_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       advc_flags_1 = 0
+       advc_flags_2 = 0
+       IF ( scalar_advec == 'ws-scheme' )  THEN
+!
+!--       Set flags to steer the degradation of the advection scheme in advec_ws
+!--       near topography, inflow- and outflow boundaries as well as bottom and
+!--       top of model domain. advc_flags_1 remains zero for all non-prognostic
+!--       grid points.
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+!
+!--                scalar - x-direction
+!--                WS1 (0), WS3 (1), WS5 (2)
+                   IF ( ( .NOT. BTEST(wall_flags_0(k,j,i+1),0)                 &
+                    .OR.  .NOT. BTEST(wall_flags_0(k,j,i+2),0)                 &   
+                    .OR.  .NOT. BTEST(wall_flags_0(k,j,i-1),0) )               &
+                      .OR.  ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
+                            .AND.  i == nxl   )                                &
+                      .OR.  ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                            .AND.  i == nxr   ) )                              &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 0 )
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j,i+3),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j,i+1),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j,i+2),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j,i-1),0)             &
+                            )                       .OR.                       &
+                            ( .NOT. BTEST(wall_flags_0(k,j,i-2),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j,i+1),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j,i+2),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j,i-1),0)             &
+                            )                                                  &
+                                                    .OR.                       &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                              .AND. i == nxr-1 )    .OR.                       &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
+                              .AND. i == nxlu  ) )                             & ! why not nxl+1
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 1 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j,i+1),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j,i+2),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j,i+3),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j,i-1),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j,i-2),0) )                   &
+                   THEN 
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 2 )
+                   ENDIF
+!
+!--                scalar - y-direction
+!--                WS1 (3), WS3 (4), WS5 (5)
+                   IF ( ( .NOT. BTEST(wall_flags_0(k,j+1,i),0)                 &
+                    .OR.  .NOT. BTEST(wall_flags_0(k,j+2,i),0)                 &   
+                    .OR.  .NOT. BTEST(wall_flags_0(k,j-1,i),0))                &
+                      .OR.  ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                            .AND.  j == nys   )                                &
+                      .OR.  ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                            .AND.  j == nyn   ) )                              &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 3 )
+!
+!--                WS3
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j+3,i),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j+1,i),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j+2,i),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j-1,i),0)             &
+                            )                       .OR.                       &
+                            ( .NOT. BTEST(wall_flags_0(k,j-2,i),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j+1,i),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j+2,i),0)             &
+                       .AND.        BTEST(wall_flags_0(k,j-1,i),0)             &
+                            )                                                  &
+                                                    .OR.                       &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                              .AND. j == nysv  )    .OR.                       & ! why not nys+1
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                              .AND. j == nyn-1 ) )                             &          
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 4 )
+!
+!--                WS5
+                   ELSEIF ( BTEST(wall_flags_0(k,j+1,i),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j+2,i),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j+3,i),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j-1,i),0)                     &
+                      .AND. BTEST(wall_flags_0(k,j-2,i),0) )                   &
+                   THEN 
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 5 )
+                   ENDIF
+! 
+!--                scalar - z-direction
+!--                WS1 (6), WS3 (7), WS5 (8)
+                   IF ( k == nzb+1 )  THEN
+                      k_mm = nzb
+                   ELSE 
+                      k_mm = k - 2
+                   ENDIF
+                   IF ( k > nzt-1 )  THEN
+                      k_pp = nzt+1
+                   ELSE 
+                      k_pp = k + 2
+                   ENDIF
+                   IF ( k > nzt-2 )  THEN
+                      k_ppp = nzt+1
+                   ELSE 
+                      k_ppp = k + 3
+                   ENDIF
+
+                   flag_set = .FALSE.
+                   IF ( .NOT. BTEST(wall_flags_0(k-1,j,i),0)  .AND.            &
+                              BTEST(wall_flags_0(k,j,i),0)    .OR.             &
+                        .NOT. BTEST(wall_flags_0(k_pp,j,i),0) .AND.            &                              
+                              BTEST(wall_flags_0(k,j,i),0)    .OR.             &
+                        k == nzt )                                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 6 )
+                      flag_set = .TRUE.
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k_mm,j,i),0)    .OR.    &
+                              .NOT. BTEST(wall_flags_0(k_ppp,j,i),0) ) .AND.   & 
+                                  BTEST(wall_flags_0(k-1,j,i),0)  .AND.        &
+                                  BTEST(wall_flags_0(k,j,i),0)    .AND.        &
+                                  BTEST(wall_flags_0(k+1,j,i),0)  .AND.        &
+                                  BTEST(wall_flags_0(k_pp,j,i),0) .OR.         &    
+                            k == nzt - 1 )                                     &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 7 )
+                      flag_set = .TRUE.
+                   ELSEIF ( BTEST(wall_flags_0(k_mm,j,i),0)                    &
+                     .AND.  BTEST(wall_flags_0(k-1,j,i),0)                     &
+                     .AND.  BTEST(wall_flags_0(k,j,i),0)                       &
+                     .AND.  BTEST(wall_flags_0(k+1,j,i),0)                     &
+                     .AND.  BTEST(wall_flags_0(k_pp,j,i),0)                    &
+                     .AND.  BTEST(wall_flags_0(k_ppp,j,i),0)                   &
+                     .AND. .NOT. flag_set )                                    &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 8 )
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( momentum_advec == 'ws-scheme' )  THEN
+!
+!--       Set advc_flags_1 to steer the degradation of the advection scheme in advec_ws
+!--       near topography, inflow- and outflow boundaries as well as bottom and
+!--       top of model domain. advc_flags_1 remains zero for all non-prognostic
+!--       grid points.
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+!  
+!--                At first, set flags to WS1. 
+!--                Since fluxes are swapped in advec_ws.f90, this is necessary to 
+!--                in order to handle the left/south flux.
+!--                near vertical walls. 
+                   advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 9 )
+                   advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 12 )
+!
+!--                u component - x-direction
+!--                WS1 (9), WS3 (10), WS5 (11)
+                   IF ( .NOT. BTEST(wall_flags_0(k,j,i+1),1)  .OR.             &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
+                              .AND. i <= nxlu  )    .OR.                       &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                              .AND. i == nxr   ) )                             &
+                   THEN
+                       advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 9 )
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j,i+2),1)  .AND.      &
+                                    BTEST(wall_flags_0(k,j,i+1),1)  .OR.       &
+                              .NOT. BTEST(wall_flags_0(k,j,i-1),1) )           &
+                                                        .OR.                   &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                              .AND. i == nxr-1 )    .OR.                       &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
+                              .AND. i == nxlu+1) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 10 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 9 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j,i+1),1)  .AND.              &
+                            BTEST(wall_flags_0(k,j,i+2),1)  .AND.              &
+                            BTEST(wall_flags_0(k,j,i-1),1) )                   &
+                   THEN    
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 11 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 9 )
+                   ENDIF
+!
+!--                u component - y-direction
+!--                WS1 (12), WS3 (13), WS5 (14)
+                   IF ( .NOT. BTEST(wall_flags_0(k,j+1,i),1)   .OR.            &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                              .AND. j == nys   )    .OR.                       &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                              .AND. j == nyn   ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 12 )
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j+2,i),1)  .AND.      &
+                                    BTEST(wall_flags_0(k,j+1,i),1)  .OR.       &
+                              .NOT. BTEST(wall_flags_0(k,j-1,i),1) )           &
+                                                        .OR.                   &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                              .AND. j == nysv  )    .OR.                       &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                              .AND. j == nyn-1 ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 13 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 12 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j+1,i),1)  .AND.              &
+                            BTEST(wall_flags_0(k,j+2,i),1)  .AND.              &
+                            BTEST(wall_flags_0(k,j-1,i),1) )                   &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 14 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 12 )
+                   ENDIF
+!
+!--                u component - z-direction
+!--                WS1 (15), WS3 (16), WS5 (17)
+                   IF ( k == nzb+1 )  THEN
+                      k_mm = nzb
+                   ELSE 
+                      k_mm = k - 2
+                   ENDIF
+                   IF ( k > nzt-1 )  THEN
+                      k_pp = nzt+1
+                   ELSE 
+                      k_pp = k + 2
+                   ENDIF
+                   IF ( k > nzt-2 )  THEN
+                      k_ppp = nzt+1
+                   ELSE 
+                      k_ppp = k + 3
+                   ENDIF                   
+
+                   flag_set = .FALSE.
+                   IF ( .NOT. BTEST(wall_flags_0(k-1,j,i),1)  .AND.            &
+                              BTEST(wall_flags_0(k,j,i),1)    .OR.             &
+                        .NOT. BTEST(wall_flags_0(k_pp,j,i),1) .AND.            &                              
+                              BTEST(wall_flags_0(k,j,i),1)    .OR.             &
+                        k == nzt )                                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 15 )
+                      flag_set = .TRUE.                      
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k_mm,j,i),1)    .OR.    &
+                              .NOT. BTEST(wall_flags_0(k_ppp,j,i),1) ) .AND.   & 
+                                  BTEST(wall_flags_0(k-1,j,i),1)  .AND.        &
+                                  BTEST(wall_flags_0(k,j,i),1)    .AND.        &
+                                  BTEST(wall_flags_0(k+1,j,i),1)  .AND.        &
+                                  BTEST(wall_flags_0(k_pp,j,i),1) .OR.         &
+                                  k == nzt - 1 )                               &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 16 )
+                      flag_set = .TRUE.
+                   ELSEIF ( BTEST(wall_flags_0(k_mm,j,i),1)  .AND.             &
+                            BTEST(wall_flags_0(k-1,j,i),1)   .AND.             &
+                            BTEST(wall_flags_0(k,j,i),1)     .AND.             &
+                            BTEST(wall_flags_0(k+1,j,i),1)   .AND.             &
+                            BTEST(wall_flags_0(k_pp,j,i),1)  .AND.             &
+                            BTEST(wall_flags_0(k_ppp,j,i),1) .AND.             &
+                            .NOT. flag_set )                                   &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 17 )
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+!
+!--                At first, set flags to WS1. 
+!--                Since fluxes are swapped in advec_ws.f90, this is necessary to 
+!--                in order to handle the left/south flux.
+                   advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 18 )
+                   advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 21 )
+!
+!--                v component - x-direction
+!--                WS1 (18), WS3 (19), WS5 (20)
+                   IF ( .NOT. BTEST(wall_flags_0(k,j,i+1),2)  .OR.             &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
+                              .AND. i == nxl   )    .OR.                       &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                              .AND. i == nxr   ) )                             &
+                  THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 18 )
+!
+!--                WS3
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j,i+2),2)   .AND.     &
+                                    BTEST(wall_flags_0(k,j,i+1),2) ) .OR.      &
+                              .NOT. BTEST(wall_flags_0(k,j,i-1),2)             &
+                                                    .OR.                       &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                              .AND. i == nxr-1 )    .OR.                       &
+                            ( ( bc_dirichlet_l .OR. bc_radiation_l )           &
+                              .AND. i == nxlu  ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 19 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 18 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j,i+1),2)  .AND.              &
+                            BTEST(wall_flags_0(k,j,i+2),2)  .AND.              &
+                            BTEST(wall_flags_0(k,j,i-1),2) )                   &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 20 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 18 )
+                   ENDIF
+!
+!--                v component - y-direction
+!--                WS1 (21), WS3 (22), WS5 (23)
+                   IF ( .NOT. BTEST(wall_flags_0(k,j+1,i),2) .OR.              &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                              .AND. j <= nysv  )    .OR.                       &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                              .AND. j == nyn   ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 21 )
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j+2,i),2)  .AND.      &
+                                    BTEST(wall_flags_0(k,j+1,i),2)  .OR.       &
+                              .NOT. BTEST(wall_flags_0(k,j-1,i),2) )           &
+                                                        .OR.                   &
+                            ( (  bc_dirichlet_s .OR. bc_radiation_s )          &
+                              .AND. j == nysv+1)    .OR.                       &
+                            ( (  bc_dirichlet_n .OR. bc_radiation_n )          &
+                              .AND. j == nyn-1 ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 22 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 21 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j+1,i),2)  .AND.              &
+                            BTEST(wall_flags_0(k,j+2,i),2)  .AND.              &
+                            BTEST(wall_flags_0(k,j-1,i),2) )                   & 
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 23 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 21 )
+                   ENDIF
+!
+!--                v component - z-direction
+!--                WS1 (24), WS3 (25), WS5 (26)
+                   IF ( k == nzb+1 )  THEN
+                      k_mm = nzb
+                   ELSE 
+                      k_mm = k - 2
+                   ENDIF
+                   IF ( k > nzt-1 )  THEN
+                      k_pp = nzt+1
+                   ELSE 
+                      k_pp = k + 2
+                   ENDIF
+                   IF ( k > nzt-2 )  THEN
+                      k_ppp = nzt+1
+                   ELSE 
+                      k_ppp = k + 3
+                   ENDIF  
+                   
+                   flag_set = .FALSE.
+                   IF ( .NOT. BTEST(wall_flags_0(k-1,j,i),2)  .AND.            &
+                              BTEST(wall_flags_0(k,j,i),2)    .OR.             &
+                        .NOT. BTEST(wall_flags_0(k_pp,j,i),2) .AND.            &                              
+                              BTEST(wall_flags_0(k,j,i),2)    .OR.             &
+                        k == nzt )                                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 24 )
+                      flag_set = .TRUE.
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k_mm,j,i),2)    .OR.    &
+                              .NOT. BTEST(wall_flags_0(k_ppp,j,i),2) ) .AND.   & 
+                                  BTEST(wall_flags_0(k-1,j,i),2)  .AND.        &
+                                  BTEST(wall_flags_0(k,j,i),2)    .AND.        &
+                                  BTEST(wall_flags_0(k+1,j,i),2)  .AND.        &
+                                  BTEST(wall_flags_0(k_pp,j,i),2)  .OR.        &
+                                  k == nzt - 1 )                               &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 25 )
+                      flag_set = .TRUE.
+                   ELSEIF ( BTEST(wall_flags_0(k_mm,j,i),2)  .AND.             &
+                            BTEST(wall_flags_0(k-1,j,i),2)   .AND.             &
+                            BTEST(wall_flags_0(k,j,i),2)     .AND.             &
+                            BTEST(wall_flags_0(k+1,j,i),2)   .AND.             &
+                            BTEST(wall_flags_0(k_pp,j,i),2)  .AND.             &
+                            BTEST(wall_flags_0(k_ppp,j,i),2) .AND.             &
+                            .NOT. flag_set )                                   &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 26 )
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+!
+!--                At first, set flags to WS1. 
+!--                Since fluxes are swapped in advec_ws.f90, this is necessary to 
+!--                in order to handle the left/south flux.
+                   advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 27 )
+                   advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 30 )
+!
+!--                w component - x-direction
+!--                WS1 (27), WS3 (28), WS5 (29)
+                   IF ( .NOT. BTEST(wall_flags_0(k,j,i+1),3) .OR.              &
+                            ( (  bc_dirichlet_l .OR. bc_radiation_l )          &
+                              .AND. i == nxl   )    .OR.                       &
+                            ( (  bc_dirichlet_r .OR. bc_radiation_r )          &
+                              .AND. i == nxr   ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 27 )
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j,i+2),3)  .AND.      &
+                                    BTEST(wall_flags_0(k,j,i+1),3)  .OR.       &
+                              .NOT. BTEST(wall_flags_0(k,j,i-1),3) )           &
+                                                        .OR.                   &
+                            ( ( bc_dirichlet_r .OR. bc_radiation_r )           &
+                              .AND. i == nxr-1 )    .OR.                       &
+                            ( ( bc_dirichlet_l .OR.  bc_radiation_l )          &
+                              .AND. i == nxlu  ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 28 )
+!   
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 27 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j,i+1),3)  .AND.              &
+                            BTEST(wall_flags_0(k,j,i+2),3)  .AND.              &
+                            BTEST(wall_flags_0(k,j,i-1),3) )                   &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i),29 )
+!   
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 27 )
+                   ENDIF
+!
+!--                w component - y-direction
+!--                WS1 (30), WS3 (31), WS5 (32)
+                   IF ( .NOT. BTEST(wall_flags_0(k,j+1,i),3) .OR.              &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                              .AND. j == nys   )    .OR.                       &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                              .AND. j == nyn   ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 30 )
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k,j+2,i),3)  .AND.      &
+                                    BTEST(wall_flags_0(k,j+1,i),3)  .OR.       &
+                              .NOT. BTEST(wall_flags_0(k,j-1,i),3) )           &
+                                                        .OR.                   &
+                            ( ( bc_dirichlet_s .OR. bc_radiation_s )           &
+                              .AND. j == nysv  )    .OR.                       &
+                            ( ( bc_dirichlet_n .OR. bc_radiation_n )           &
+                              .AND. j == nyn-1 ) )                             &
+                   THEN
+                      advc_flags_1(k,j,i) = IBSET( advc_flags_1(k,j,i), 31 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 30 )
+                   ELSEIF ( BTEST(wall_flags_0(k,j+1,i),3)  .AND.              &
+                            BTEST(wall_flags_0(k,j+2,i),3)  .AND.              &
+                            BTEST(wall_flags_0(k,j-1,i),3) )                   &
+                   THEN
+                      advc_flags_2(k,j,i) = IBSET( advc_flags_2(k,j,i), 0 )
+!
+!--                   Clear flag for WS1
+                      advc_flags_1(k,j,i) = IBCLR( advc_flags_1(k,j,i), 30 )
+                   ENDIF
+!
+!--                w component - z-direction
+!--                WS1 (33), WS3 (34), WS5 (35)
+                   flag_set = .FALSE.
+                   IF ( k == nzb+1 )  THEN
+                      k_mm = nzb
+                   ELSE
+                      k_mm = k - 2
+                   ENDIF
+                   IF ( k > nzt-1 )  THEN
+                      k_pp = nzt+1
+                   ELSE 
+                      k_pp = k + 2
+                   ENDIF
+                   IF ( k > nzt-2 )  THEN
+                      k_ppp = nzt+1
+                   ELSE 
+                      k_ppp = k + 3
+                   ENDIF  
+                   
+                   IF ( ( .NOT. BTEST(wall_flags_0(k-1,j,i),3)  .AND.          &
+                          .NOT. BTEST(wall_flags_0(k,j,i),3)    .AND.          &
+                                BTEST(wall_flags_0(k+1,j,i),3) )  .OR.         &
+                        ( .NOT. BTEST(wall_flags_0(k-1,j,i),3)  .AND.          &
+                                BTEST(wall_flags_0(k,j,i),3) )  .OR.           &
+                        ( .NOT. BTEST(wall_flags_0(k+1,j,i),3)  .AND.          &
+                                BTEST(wall_flags_0(k,j,i),3) )  .OR.           &        
+                        k == nzt )                                             &
+                   THEN
+!
+!--                   Please note, at k == nzb_w_inner(j,i) a flag is explictely
+!--                   set, although this is not a prognostic level. However, 
+!--                   contrary to the advection of u,v and s this is necessary
+!--                   because flux_t(nzb_w_inner(j,i)) is used for the tendency
+!--                   at k == nzb_w_inner(j,i)+1.
+                      advc_flags_2(k,j,i) = IBSET( advc_flags_2(k,j,i), 1 )
+                      flag_set = .TRUE.
+                   ELSEIF ( ( .NOT. BTEST(wall_flags_0(k_mm,j,i),3)     .OR.   &
+                              .NOT. BTEST(wall_flags_0(k_ppp,j,i),3) ) .AND.   &
+                                    BTEST(wall_flags_0(k-1,j,i),3)  .AND.      &
+                                    BTEST(wall_flags_0(k,j,i),3)    .AND.      &
+                                    BTEST(wall_flags_0(k+1,j,i),3)  .OR.       &
+                            k == nzt - 1 )                                     &
+                   THEN
+                      advc_flags_2(k,j,i) = IBSET( advc_flags_2(k,j,i), 2 )
+                      flag_set = .TRUE.
+                   ELSEIF ( BTEST(wall_flags_0(k_mm,j,i),3)  .AND.             &
+                            BTEST(wall_flags_0(k-1,j,i),3)   .AND.             &
+                            BTEST(wall_flags_0(k,j,i),3)     .AND.             &
+                            BTEST(wall_flags_0(k+1,j,i),3)   .AND.             &
+                            BTEST(wall_flags_0(k_pp,j,i),3)  .AND.             &
+                            BTEST(wall_flags_0(k_ppp,j,i),3) .AND.             &
+                            .NOT. flag_set )                                   &
+                   THEN
+                      advc_flags_2(k,j,i) = IBSET( advc_flags_2(k,j,i), 3 )
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+
+!
+!--    Exchange 3D integer wall_flags.
+       IF ( momentum_advec == 'ws-scheme' .OR. scalar_advec == 'ws-scheme'     &
+          )  THEN  
+!
+!--       Exchange ghost points for advection flags
+          CALL exchange_horiz_int( advc_flags_1, nys, nyn, nxl, nxr, nzt, nbgp )
+          CALL exchange_horiz_int( advc_flags_2, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!--       Set boundary flags at inflow and outflow boundary in case of 
+!--       non-cyclic boundary conditions.
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+             advc_flags_1(:,:,nxl-1) = advc_flags_1(:,:,nxl)
+             advc_flags_2(:,:,nxl-1) = advc_flags_2(:,:,nxl)
+          ENDIF
+
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+            advc_flags_1(:,:,nxr+1) = advc_flags_1(:,:,nxr)
+            advc_flags_2(:,:,nxr+1) = advc_flags_2(:,:,nxr)
+          ENDIF
+
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+             advc_flags_1(:,nyn+1,:) = advc_flags_1(:,nyn,:)
+             advc_flags_2(:,nyn+1,:) = advc_flags_2(:,nyn,:)
+          ENDIF
+
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+             advc_flags_1(:,nys-1,:) = advc_flags_1(:,nys,:)
+             advc_flags_2(:,nys-1,:) = advc_flags_2(:,nys,:)
+          ENDIF
+  
+       ENDIF
+
+
+    END SUBROUTINE ws_init_flags
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize variables used for storing statistic quantities (fluxes, variances)
+!------------------------------------------------------------------------------!
+    SUBROUTINE ws_statistics
+    
+       USE control_parameters,                                                 &
+           ONLY:  humidity, passive_scalar, ocean_mode, ws_scheme_mom,         &
+                  ws_scheme_sca
+
+       USE kinds  
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+       USE salsa_util_mod,                                                     &
+           ONLY:  sums_salsa_ws_l            
+           
+       USE statistics,                                                         &
+           ONLY:  sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l, sums_wsncs_ws_l,&
+                  sums_wsnrs_ws_l, sums_wspts_ws_l, sums_wsqcs_ws_l,           &
+                  sums_wsqrs_ws_l, sums_wsqs_ws_l, sums_wsss_ws_l,             &
+                  sums_wssas_ws_l, sums_wsus_ws_l, sums_wsvs_ws_l
+                   
+
+       IMPLICIT NONE
+
+!       
+!--    The arrays needed for statistical evaluation are set to to 0 at the 
+!--    beginning of prognostic_equations.
+       IF ( ws_scheme_mom )  THEN
+          sums_wsus_ws_l = 0.0_wp
+          sums_wsvs_ws_l = 0.0_wp
+          sums_us2_ws_l  = 0.0_wp
+          sums_vs2_ws_l  = 0.0_wp
+          sums_ws2_ws_l  = 0.0_wp
+       ENDIF
+
+       IF ( ws_scheme_sca )  THEN
+          sums_wspts_ws_l = 0.0_wp
+          IF ( humidity       )  sums_wsqs_ws_l = 0.0_wp
+          IF ( passive_scalar )  sums_wsss_ws_l = 0.0_wp
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             sums_wsqcs_ws_l = 0.0_wp
+             sums_wsncs_ws_l = 0.0_wp
+          ENDIF
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             sums_wsqrs_ws_l = 0.0_wp
+             sums_wsnrs_ws_l = 0.0_wp
+          ENDIF
+          IF ( ocean_mode )  sums_wssas_ws_l = 0.0_wp
+       
+          sums_salsa_ws_l = 0.0_wp
+         
+          
+       ENDIF
+
+    END SUBROUTINE ws_statistics
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Scalar advection - Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_ws_ij( i, j, sk, sk_char, swap_flux_y_local,            &
+                              swap_diss_y_local, swap_flux_x_local,            &
+                              swap_diss_x_local, i_omp, tn )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, drho_air, rho_air_zw, tend, u, u_stokes_zu, v,         &
+                  v_stokes_zu, w
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans 
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max,    &
+                  nzt, advc_flags_1
+
+       USE kinds
+
+       USE pegrid
+
+       USE salsa_util_mod,                                                     &
+           ONLY:  sums_salsa_ws_l   
+
+       USE statistics,                                                         &
+           ONLY:  hom, sums_wsncs_ws_l, sums_wsnrs_ws_l, sums_wspts_ws_l,      &
+                  sums_wsqcs_ws_l,  sums_wsqrs_ws_l, sums_wsqs_ws_l,           &
+                  sums_wssas_ws_l, sums_wsss_ws_l, weight_substep
+                  
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN = *), INTENT(IN) ::  sk_char !<
+       
+       INTEGER(iwp) ::  i     !<
+       INTEGER(iwp) ::  ibit0 !<
+       INTEGER(iwp) ::  ibit1 !<
+       INTEGER(iwp) ::  ibit2 !<
+       INTEGER(iwp) ::  ibit3 !<
+       INTEGER(iwp) ::  ibit4 !<
+       INTEGER(iwp) ::  ibit5 !<
+       INTEGER(iwp) ::  ibit6 !<
+       INTEGER(iwp) ::  ibit7 !<
+       INTEGER(iwp) ::  ibit8 !<
+       INTEGER(iwp) ::  i_omp !<
+       INTEGER(iwp) ::  j     !<
+       INTEGER(iwp) ::  k     !<
+       INTEGER(iwp) ::  k_mm  !<
+       INTEGER(iwp) ::  k_pp  !<
+       INTEGER(iwp) ::  k_ppp !<
+       INTEGER(iwp) ::  tn    !<
+       
+       REAL(wp)     ::  diss_d !<
+       REAL(wp)     ::  div    !<
+       REAL(wp)     ::  flux_d !<
+       REAL(wp)     ::  u_comp !<
+       REAL(wp)     ::  v_comp !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER    ::  sk     !<
+#endif
+       REAL(wp), DIMENSION(nzb:nzt+1)         ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1)         ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1)         ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1)         ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1)         ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1)         ::  flux_t !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt,0:threads_per_task-1) ::  swap_diss_y_local !<
+       REAL(wp), DIMENSION(nzb+1:nzt,0:threads_per_task-1) ::  swap_flux_y_local !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ::  swap_diss_x_local !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ::  swap_flux_x_local !<
+       
+
+!
+!--    Compute southside fluxes of the respective PE bounds.
+       IF ( j == nys )  THEN
+!
+!--       Up to the top of the highest topography.
+          DO  k = nzb+1, nzb_max
+
+             ibit5 = IBITS(advc_flags_1(k,j-1,i),5,1)
+             ibit4 = IBITS(advc_flags_1(k,j-1,i),4,1)
+             ibit3 = IBITS(advc_flags_1(k,j-1,i),3,1)
+
+             v_comp                  = v(k,j,i) - v_gtrans + v_stokes_zu(k)
+             swap_flux_y_local(k,tn) = v_comp *         (                     &
+                                               ( 37.0_wp * ibit5 * adv_sca_5  &
+                                            +     7.0_wp * ibit4 * adv_sca_3  &
+                                            +              ibit3 * adv_sca_1  &
+                                               ) *                            &
+                                           ( sk(k,j,i)  + sk(k,j-1,i)     )   &
+                                         -     (  8.0_wp * ibit5 * adv_sca_5  &
+                                            +              ibit4 * adv_sca_3  &
+                                                ) *                           &
+                                           ( sk(k,j+1,i) + sk(k,j-2,i)    )   &
+                                         +     (           ibit5 * adv_sca_5  &
+                                               ) *                            &
+                                           ( sk(k,j+2,i) + sk(k,j-3,i)    )   &
+                                                        )
+
+             swap_diss_y_local(k,tn) = -ABS( v_comp ) * (                     &
+                                               ( 10.0_wp * ibit5 * adv_sca_5  &
+                                            +     3.0_wp * ibit4 * adv_sca_3  &
+                                            +              ibit3 * adv_sca_1  &
+                                               ) *                            &
+                                            ( sk(k,j,i)   - sk(k,j-1,i)  )    &
+                                        -      (  5.0_wp * ibit5 * adv_sca_5  &
+                                            +              ibit4 * adv_sca_3  &
+                                            ) *                               &
+                                            ( sk(k,j+1,i) - sk(k,j-2,i)  )    &
+                                        +      (           ibit5 * adv_sca_5  &
+                                               ) *                            &
+                                            ( sk(k,j+2,i) - sk(k,j-3,i)  )    &
+                                                        )
+
+          ENDDO
+!
+!--       Above to the top of the highest topography. No degradation necessary.
+          DO  k = nzb_max+1, nzt
+
+             v_comp                  = v(k,j,i) - v_gtrans + v_stokes_zu(k)
+             swap_flux_y_local(k,tn) = v_comp * (                             &
+                                    37.0_wp * ( sk(k,j,i)   + sk(k,j-1,i) )   &
+                                  -  8.0_wp * ( sk(k,j+1,i) + sk(k,j-2,i) )   &
+                                  +           ( sk(k,j+2,i) + sk(k,j-3,i) )   &
+                                                ) * adv_sca_5
+              swap_diss_y_local(k,tn) = -ABS( v_comp ) * (                    &
+                                    10.0_wp * ( sk(k,j,i)   - sk(k,j-1,i) )   &
+                                  -  5.0_wp * ( sk(k,j+1,i) - sk(k,j-2,i) )   &
+                                  +             sk(k,j+2,i) - sk(k,j-3,i)     &
+                                                         ) * adv_sca_5
+
+          ENDDO
+
+       ENDIF
+!
+!--    Compute leftside fluxes of the respective PE bounds.
+       IF ( i == i_omp )  THEN
+        
+          DO  k = nzb+1, nzb_max
+
+             ibit2 = IBITS(advc_flags_1(k,j,i-1),2,1)
+             ibit1 = IBITS(advc_flags_1(k,j,i-1),1,1)
+             ibit0 = IBITS(advc_flags_1(k,j,i-1),0,1)
+
+             u_comp                     = u(k,j,i) - u_gtrans + u_stokes_zu(k)
+             swap_flux_x_local(k,j,tn) = u_comp * (                           &
+                                               ( 37.0_wp * ibit2 * adv_sca_5  &
+                                            +     7.0_wp * ibit1 * adv_sca_3  &
+                                            +              ibit0 * adv_sca_1  &
+                                               ) *                            &
+                                            ( sk(k,j,i)   + sk(k,j,i-1)    )  &
+                                        -      (  8.0_wp * ibit2 * adv_sca_5  &
+                                            +              ibit1 * adv_sca_3  &
+                                               ) *                            &
+                                            ( sk(k,j,i+1) + sk(k,j,i-2)    )  &
+                                        +      (           ibit2 * adv_sca_5  &
+                                               ) *                            &
+                                            ( sk(k,j,i+2) + sk(k,j,i-3)    )  &
+                                                  )
+
+              swap_diss_x_local(k,j,tn) = -ABS( u_comp ) * (                  &
+                                               ( 10.0_wp * ibit2 * adv_sca_5  &
+                                            +     3.0_wp * ibit1 * adv_sca_3  &
+                                            +              ibit0 * adv_sca_1  &
+                                               ) *                            &
+                                            ( sk(k,j,i)   - sk(k,j,i-1)    )  &
+                                        -      (  5.0_wp * ibit2 * adv_sca_5  &
+                                            +              ibit1 * adv_sca_3  &
+                                               ) *                            &
+                                            ( sk(k,j,i+1) - sk(k,j,i-2)    )  &
+                                        +      (           ibit2 * adv_sca_5  &
+                                               ) *                            &
+                                            ( sk(k,j,i+2) - sk(k,j,i-3)    )  &
+                                                           )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp                 = u(k,j,i) - u_gtrans + u_stokes_zu(k)
+             swap_flux_x_local(k,j,tn) = u_comp * (                           &
+                                      37.0_wp * ( sk(k,j,i)   + sk(k,j,i-1) ) &
+                                    -  8.0_wp * ( sk(k,j,i+1) + sk(k,j,i-2) ) &
+                                    +           ( sk(k,j,i+2) + sk(k,j,i-3) ) &
+                                                  ) * adv_sca_5
+
+             swap_diss_x_local(k,j,tn) = -ABS( u_comp ) * (                   &
+                                      10.0_wp * ( sk(k,j,i)   - sk(k,j,i-1) ) &
+                                    -  5.0_wp * ( sk(k,j,i+1) - sk(k,j,i-2) ) &
+                                    +           ( sk(k,j,i+2) - sk(k,j,i-3) ) &
+                                                          ) * adv_sca_5
+
+          ENDDO
+           
+       ENDIF
+
+       flux_t(0) = 0.0_wp
+       diss_t(0) = 0.0_wp
+!        
+!--    Now compute the fluxes and tendency terms for the horizontal and
+!--    vertical parts up to the top of the highest topography.
+       DO  k = nzb+1, nzb_max
+!
+!--       Note: It is faster to conduct all multiplications explicitly, e.g.
+!--       * adv_sca_5 ... than to determine a factor and multiplicate the
+!--       flux at the end. 
+
+          ibit2 = IBITS(advc_flags_1(k,j,i),2,1)
+          ibit1 = IBITS(advc_flags_1(k,j,i),1,1)
+          ibit0 = IBITS(advc_flags_1(k,j,i),0,1)
+
+          u_comp    = u(k,j,i+1) - u_gtrans + u_stokes_zu(k)
+          flux_r(k) = u_comp * (                                              &
+                     ( 37.0_wp * ibit2 * adv_sca_5                            &
+                  +     7.0_wp * ibit1 * adv_sca_3                            &
+                  +              ibit0 * adv_sca_1                            &
+                     ) *                                                      &
+                             ( sk(k,j,i+1) + sk(k,j,i)   )                    &
+              -      (  8.0_wp * ibit2 * adv_sca_5                            &
+                  +              ibit1 * adv_sca_3                            &
+                     ) *                                                      &
+                             ( sk(k,j,i+2) + sk(k,j,i-1) )                    &
+              +      (           ibit2 * adv_sca_5                            &
+                     ) *                                                      &
+                             ( sk(k,j,i+3) + sk(k,j,i-2) )                    &
+                               )
+
+          diss_r(k) = -ABS( u_comp ) * (                                      &
+                     ( 10.0_wp * ibit2 * adv_sca_5                            &
+                  +     3.0_wp * ibit1 * adv_sca_3                            &
+                  +              ibit0 * adv_sca_1                            &
+                     ) *                                                      &
+                             ( sk(k,j,i+1) - sk(k,j,i)  )                     &
+              -      (  5.0_wp * ibit2 * adv_sca_5                            &
+                  +              ibit1 * adv_sca_3                            &
+                     ) *                                                      &
+                             ( sk(k,j,i+2) - sk(k,j,i-1) )                    &
+              +      (           ibit2 * adv_sca_5                            &
+                     ) *                                                      &
+                             ( sk(k,j,i+3) - sk(k,j,i-2) )                    &
+                                       )
+
+          ibit5 = IBITS(advc_flags_1(k,j,i),5,1)
+          ibit4 = IBITS(advc_flags_1(k,j,i),4,1)
+          ibit3 = IBITS(advc_flags_1(k,j,i),3,1)
+
+          v_comp    = v(k,j+1,i) - v_gtrans + v_stokes_zu(k)
+          flux_n(k) = v_comp * (                                              &
+                     ( 37.0_wp * ibit5 * adv_sca_5                            &
+                  +     7.0_wp * ibit4 * adv_sca_3                            &
+                  +              ibit3 * adv_sca_1                            &
+                     ) *                                                      &
+                             ( sk(k,j+1,i) + sk(k,j,i)   )                    &
+              -      (  8.0_wp * ibit5 * adv_sca_5                            &
+                  +              ibit4 * adv_sca_3                            &
+                     ) *                                                      &
+                             ( sk(k,j+2,i) + sk(k,j-1,i) )                    &
+              +      (           ibit5 * adv_sca_5                            &
+                     ) *                                                      &
+                             ( sk(k,j+3,i) + sk(k,j-2,i) )                    &
+                               )
+
+          diss_n(k) = -ABS( v_comp ) * (                                      &
+                     ( 10.0_wp * ibit5 * adv_sca_5                            &
+                  +     3.0_wp * ibit4 * adv_sca_3                            &
+                  +              ibit3 * adv_sca_1                            &
+                     ) *                                                      &
+                             ( sk(k,j+1,i) - sk(k,j,i)   )                    &
+              -      (  5.0_wp * ibit5 * adv_sca_5                            &
+                  +              ibit4 * adv_sca_3                            &
+                     ) *                                                      &
+                             ( sk(k,j+2,i) - sk(k,j-1,i) )                    &
+              +      (           ibit5 * adv_sca_5                            &
+                     ) *                                                      &
+                             ( sk(k,j+3,i) - sk(k,j-2,i) )                    &
+                                       )
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit8 = IBITS(advc_flags_1(k,j,i),8,1)
+          ibit7 = IBITS(advc_flags_1(k,j,i),7,1)
+          ibit6 = IBITS(advc_flags_1(k,j,i),6,1)
+
+          k_ppp = k + 3 * ibit8
+          k_pp  = k + 2 * ( 1 - ibit6  )
+          k_mm  = k - 2 * ibit8
+
+
+          flux_t(k) = w(k,j,i) * rho_air_zw(k) * (                            &
+                     ( 37.0_wp * ibit8 * adv_sca_5                            &
+                  +     7.0_wp * ibit7 * adv_sca_3                            &
+                  +              ibit6 * adv_sca_1                            &
+                     ) *                                                      &
+                             ( sk(k+1,j,i)  + sk(k,j,i)    )                  &
+              -      (  8.0_wp * ibit8 * adv_sca_5                            &
+                  +              ibit7 * adv_sca_3                            &
+                     ) *                                                      &
+                             ( sk(k_pp,j,i) + sk(k-1,j,i)  )                  &
+              +      (           ibit8 * adv_sca_5                            &
+                     ) *     ( sk(k_ppp,j,i)+ sk(k_mm,j,i) )                  &
+                                 )
+
+          diss_t(k) = -ABS( w(k,j,i) ) * rho_air_zw(k) * (                    &
+                     ( 10.0_wp * ibit8 * adv_sca_5                            &
+                  +     3.0_wp * ibit7 * adv_sca_3                            &
+                  +              ibit6 * adv_sca_1                            &
+                     ) *                                                      &
+                             ( sk(k+1,j,i)   - sk(k,j,i)    )                 &
+              -      (  5.0_wp * ibit8 * adv_sca_5                            &
+                  +              ibit7 * adv_sca_3                            &
+                     ) *                                                      &
+                             ( sk(k_pp,j,i)  - sk(k-1,j,i)  )                 &
+              +      (           ibit8 * adv_sca_5                            &
+                     ) *                                                      &
+                             ( sk(k_ppp,j,i) - sk(k_mm,j,i) )                 &
+                                         )
+       ENDDO
+
+       DO  k = nzb+1, nzb_max
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities caused
+!--       by a not sufficient reduction of divergences near topography. 
+          div         =   ( u(k,j,i+1) * ( ibit0 + ibit1 + ibit2 )             &
+                          - u(k,j,i)   * ( IBITS(advc_flags_1(k,j,i-1),0,1)    &
+                                         + IBITS(advc_flags_1(k,j,i-1),1,1)    &
+                                         + IBITS(advc_flags_1(k,j,i-1),2,1)    &
+                                         )                                     &
+                          ) * ddx                                              &
+                        + ( v(k,j+1,i) * ( ibit3 + ibit4 + ibit5 )             &
+                          - v(k,j,i)   * ( IBITS(advc_flags_1(k,j-1,i),3,1)    &
+                                         + IBITS(advc_flags_1(k,j-1,i),4,1)    &
+                                         + IBITS(advc_flags_1(k,j-1,i),5,1)    &
+                                         )                                     &
+                          ) * ddy                                              &
+                        + ( w(k,j,i) * rho_air_zw(k) *                         &
+                                         ( ibit6 + ibit7 + ibit8 )             &
+                          - w(k-1,j,i) * rho_air_zw(k-1) *                     &
+                                         ( IBITS(advc_flags_1(k-1,j,i),6,1)    &
+                                         + IBITS(advc_flags_1(k-1,j,i),7,1)    &
+                                         + IBITS(advc_flags_1(k-1,j,i),8,1)    &
+                                         )                                     &      
+                          ) * drho_air(k) * ddzw(k)
+
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                        ( flux_r(k) + diss_r(k) - swap_flux_x_local(k,j,tn) - &
+                          swap_diss_x_local(k,j,tn)            ) * ddx        &
+                      + ( flux_n(k) + diss_n(k) - swap_flux_y_local(k,tn)   - &
+                          swap_diss_y_local(k,tn)              ) * ddy        &
+                      + ( ( flux_t(k) + diss_t(k) ) -                         &
+                          ( flux_d    + diss_d    )                           &
+                                                    ) * drho_air(k) * ddzw(k) &
+                                      ) + sk(k,j,i) * div
+
+          swap_flux_y_local(k,tn)   = flux_n(k)
+          swap_diss_y_local(k,tn)   = diss_n(k)
+          swap_flux_x_local(k,j,tn) = flux_r(k)
+          swap_diss_x_local(k,j,tn) = diss_r(k)
+
+       ENDDO
+!
+!--    Now compute the fluxes and tendency terms for the horizontal and
+!--    vertical parts above the top of the highest topography. No degradation
+!--    for the horizontal parts, but for the vertical it is stell needed.
+       DO  k = nzb_max+1, nzt
+
+          u_comp    = u(k,j,i+1) - u_gtrans + u_stokes_zu(k)
+          flux_r(k) = u_comp * (                                              &
+                      37.0_wp * ( sk(k,j,i+1) + sk(k,j,i)   )                 &
+                    -  8.0_wp * ( sk(k,j,i+2) + sk(k,j,i-1) )                 &
+                    +           ( sk(k,j,i+3) + sk(k,j,i-2) ) ) * adv_sca_5
+          diss_r(k) = -ABS( u_comp ) * (                                      &
+                      10.0_wp * ( sk(k,j,i+1) - sk(k,j,i)   )                 &
+                    -  5.0_wp * ( sk(k,j,i+2) - sk(k,j,i-1) )                 &
+                    +           ( sk(k,j,i+3) - sk(k,j,i-2) ) ) * adv_sca_5
+
+          v_comp    = v(k,j+1,i) - v_gtrans + v_stokes_zu(k)
+          flux_n(k) = v_comp * (                                              &
+                      37.0_wp * ( sk(k,j+1,i) + sk(k,j,i)   )                 &
+                    -  8.0_wp * ( sk(k,j+2,i) + sk(k,j-1,i) )                 &
+                    +           ( sk(k,j+3,i) + sk(k,j-2,i) ) ) * adv_sca_5
+          diss_n(k) = -ABS( v_comp ) * (                                      &
+                      10.0_wp * ( sk(k,j+1,i) - sk(k,j,i)   )                 &
+                    -  5.0_wp * ( sk(k,j+2,i) - sk(k,j-1,i) )                 &
+                    +           ( sk(k,j+3,i) - sk(k,j-2,i) ) ) * adv_sca_5
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit8 = IBITS(advc_flags_1(k,j,i),8,1)
+          ibit7 = IBITS(advc_flags_1(k,j,i),7,1)
+          ibit6 = IBITS(advc_flags_1(k,j,i),6,1)
+
+          k_ppp = k + 3 * ibit8
+          k_pp  = k + 2 * ( 1 - ibit6  )
+          k_mm  = k - 2 * ibit8
+
+          flux_t(k) = w(k,j,i) * rho_air_zw(k) * (                            &
+                    ( 37.0_wp * ibit8 * adv_sca_5                             &
+                 +     7.0_wp * ibit7 * adv_sca_3                             &
+                 +              ibit6 * adv_sca_1                             &
+                    ) *                                                       &
+                             ( sk(k+1,j,i)  + sk(k,j,i)   )                   &
+              -     (  8.0_wp * ibit8 * adv_sca_5                             &
+                  +              ibit7 * adv_sca_3                            &
+                    ) *                                                       &
+                             ( sk(k_pp,j,i) + sk(k-1,j,i) )                   &
+              +     (           ibit8 * adv_sca_5                             &
+                    ) *     ( sk(k_ppp,j,i)+ sk(k_mm,j,i) )                   &
+                                 )
+
+          diss_t(k) = -ABS( w(k,j,i) ) * rho_air_zw(k) * (                    &
+                    ( 10.0_wp * ibit8 * adv_sca_5                             &
+                 +     3.0_wp * ibit7 * adv_sca_3                             &
+                 +              ibit6 * adv_sca_1                             &
+                    ) *                                                       &
+                             ( sk(k+1,j,i)   - sk(k,j,i)    )                 &
+              -     (  5.0_wp * ibit8 * adv_sca_5                             &
+                 +              ibit7 * adv_sca_3                             &
+                    ) *                                                       &
+                             ( sk(k_pp,j,i)  - sk(k-1,j,i)  )                 &
+              +     (           ibit8 * adv_sca_5                             &
+                    ) *                                                       &
+                             ( sk(k_ppp,j,i) - sk(k_mm,j,i) )                 &
+                                         )
+
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography.
+          div         =   ( u(k,j,i+1) - u(k,j,i)   ) * ddx                   &
+                        + ( v(k,j+1,i) - v(k,j,i)   ) * ddy                   &
+                        + ( w(k,j,i)   * rho_air_zw(k) -                      &
+                            w(k-1,j,i) * rho_air_zw(k-1)                      &
+                          ) * drho_air(k) * ddzw(k)
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                        ( flux_r(k) + diss_r(k) - swap_flux_x_local(k,j,tn) - &
+                          swap_diss_x_local(k,j,tn)            ) * ddx        &
+                      + ( flux_n(k) + diss_n(k) - swap_flux_y_local(k,tn)   - &
+                          swap_diss_y_local(k,tn)              ) * ddy        &
+                      + ( ( flux_t(k) + diss_t(k) ) -                         &
+                          ( flux_d    + diss_d    )                           &
+                                                    ) * drho_air(k) * ddzw(k) &
+                                      ) + sk(k,j,i) * div
+
+
+          swap_flux_y_local(k,tn)   = flux_n(k)
+          swap_diss_y_local(k,tn)   = diss_n(k)
+          swap_flux_x_local(k,j,tn) = flux_r(k)
+          swap_diss_x_local(k,j,tn) = diss_r(k)
+
+       ENDDO
+
+!
+!--    Evaluation of statistics.
+       SELECT CASE ( sk_char )
+
+          CASE ( 'pt' )
+
+             DO  k = nzb, nzt
+                sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) +                &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+            
+          CASE ( 'sa' )
+
+             DO  k = nzb, nzt
+                sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) +                &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+            
+          CASE ( 'q' )
+
+             DO  k = nzb, nzt
+                sums_wsqs_ws_l(k,tn)  = sums_wsqs_ws_l(k,tn) +                 &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+          CASE ( 'qc' )
+
+             DO  k = nzb, nzt
+                sums_wsqcs_ws_l(k,tn)  = sums_wsqcs_ws_l(k,tn) +               &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+
+          CASE ( 'qr' )
+
+             DO  k = nzb, nzt
+                sums_wsqrs_ws_l(k,tn)  = sums_wsqrs_ws_l(k,tn) +               &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+          CASE ( 'nc' )
+
+             DO  k = nzb, nzt
+                sums_wsncs_ws_l(k,tn)  = sums_wsncs_ws_l(k,tn) +               &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+          CASE ( 'nr' )
+
+             DO  k = nzb, nzt
+                sums_wsnrs_ws_l(k,tn)  = sums_wsnrs_ws_l(k,tn) +               &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+             
+          CASE ( 's' )
+          
+             DO  k = nzb, nzt
+                sums_wsss_ws_l(k,tn)  = sums_wsss_ws_l(k,tn) +                 &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO
+                  
+         CASE ( 'aerosol_mass', 'aerosol_number', 'salsa_gas' )
+         
+             DO  k = nzb, nzt
+                sums_salsa_ws_l(k,tn)  = sums_salsa_ws_l(k,tn) +               &
+                    ( flux_t(k) / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                    + diss_t(k) / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS( w(k,j,i) - hom(k,1,3,0)            )  &
+                    ) * weight_substep(intermediate_timestep_count)
+             ENDDO             
+
+!          CASE ( 'kc' )
+          !kk Has to be implemented for kpp chemistry
+
+
+         END SELECT
+         
+    END SUBROUTINE advec_s_ws_ij
+
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Advection of u-component - Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_u_ws_ij( i, j, i_omp, tn )
+
+       USE arrays_3d,                                                         &
+           ONLY:  ddzw, diss_l_u, diss_s_u, flux_l_u, flux_s_u, tend, u, v, w,&
+                  drho_air, rho_air_zw
+
+       USE control_parameters,                                                &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans
+
+       USE grid_variables,                                                    &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                           &
+           ONLY:  nxlu, nys, nzb, nzb_max, nzt, advc_flags_1
+
+       USE kinds
+
+       USE statistics,                                                        &
+           ONLY:  hom, sums_us2_ws_l, sums_wsus_ws_l, weight_substep
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  ibit9  !<
+       INTEGER(iwp) ::  ibit10 !<
+       INTEGER(iwp) ::  ibit11 !<
+       INTEGER(iwp) ::  ibit12 !<
+       INTEGER(iwp) ::  ibit13 !<
+       INTEGER(iwp) ::  ibit14 !<
+       INTEGER(iwp) ::  ibit15 !<
+       INTEGER(iwp) ::  ibit16 !<
+       INTEGER(iwp) ::  ibit17 !<
+       INTEGER(iwp) ::  i_omp  !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_mm   !<
+       INTEGER(iwp) ::  k_pp   !<
+       INTEGER(iwp) ::  k_ppp  !<
+       INTEGER(iwp) ::  tn     !<
+       
+       REAL(wp)    ::  diss_d   !<
+       REAL(wp)    ::  div      !<
+       REAL(wp)    ::  flux_d   !<
+       REAL(wp)    ::  gu       !<
+       REAL(wp)    ::  gv       !<
+       REAL(wp)    ::  u_comp_l !<
+       
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  flux_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  u_comp !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  v_comp !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  w_comp !<
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+!
+!--    Compute southside fluxes for the respective boundary of PE
+       IF ( j == nys  )  THEN
+       
+          DO  k = nzb+1, nzb_max
+
+             ibit14 = IBITS(advc_flags_1(k,j-1,i),14,1)
+             ibit13 = IBITS(advc_flags_1(k,j-1,i),13,1)
+             ibit12 = IBITS(advc_flags_1(k,j-1,i),12,1)
+
+             v_comp(k)      = v(k,j,i) + v(k,j,i-1) - gv
+             flux_s_u(k,tn) = v_comp(k) * (                                   &
+                            ( 37.0_wp * ibit14 * adv_mom_5                    &
+                         +     7.0_wp * ibit13 * adv_mom_3                    &
+                         +              ibit12 * adv_mom_1                    &
+                            ) *                                               &
+                                        ( u(k,j,i)   + u(k,j-1,i) )           &
+                     -      (  8.0_wp * ibit14 * adv_mom_5                    &
+                         +              ibit13 * adv_mom_3                    &
+                            ) *                                               &
+                                        ( u(k,j+1,i) + u(k,j-2,i) )           &
+                     +      (           ibit14 * adv_mom_5                    &
+                            ) *                                               &
+                                        ( u(k,j+2,i) + u(k,j-3,i) )           &
+                                          )
+
+             diss_s_u(k,tn) = - ABS ( v_comp(k) ) * (                         &
+                            ( 10.0_wp * ibit14 * adv_mom_5                    &
+                         +     3.0_wp * ibit13 * adv_mom_3                    &
+                         +              ibit12 * adv_mom_1                    &
+                            ) *                                               &
+                                        ( u(k,j,i)   - u(k,j-1,i) )           &
+                     -      (  5.0_wp * ibit14 * adv_mom_5                    &
+                         +              ibit13 * adv_mom_3                    &
+                            ) *                                               &
+                                        ( u(k,j+1,i) - u(k,j-2,i) )           &
+                     +      (           ibit14 * adv_mom_5                    &
+                            ) *                                               &
+                                        ( u(k,j+2,i) - u(k,j-3,i) )           &
+                                                    )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             v_comp(k)      = v(k,j,i) + v(k,j,i-1) - gv
+             flux_s_u(k,tn) = v_comp(k) * (                                   &
+                           37.0_wp * ( u(k,j,i) + u(k,j-1,i)   )              &
+                         -  8.0_wp * ( u(k,j+1,i) + u(k,j-2,i) )              &
+                         +           ( u(k,j+2,i) + u(k,j-3,i) ) ) * adv_mom_5
+             diss_s_u(k,tn) = - ABS(v_comp(k)) * (                            &
+                           10.0_wp * ( u(k,j,i) - u(k,j-1,i)   )              &
+                         -  5.0_wp * ( u(k,j+1,i) - u(k,j-2,i) )              &
+                         +           ( u(k,j+2,i) - u(k,j-3,i) ) ) * adv_mom_5
+
+          ENDDO
+          
+       ENDIF
+!
+!--    Compute leftside fluxes for the respective boundary of PE
+       IF ( i == i_omp  .OR.  i == nxlu )  THEN
+       
+          DO  k = nzb+1, nzb_max
+
+             ibit11 = IBITS(advc_flags_1(k,j,i-1),11,1)
+             ibit10 = IBITS(advc_flags_1(k,j,i-1),10,1)
+             ibit9  = IBITS(advc_flags_1(k,j,i-1),9,1)
+
+             u_comp_l         = u(k,j,i) + u(k,j,i-1) - gu
+             flux_l_u(k,j,tn) = u_comp_l * (                                  &
+                              ( 37.0_wp * ibit11 * adv_mom_5                  &
+                           +     7.0_wp * ibit10 * adv_mom_3                  &
+                           +              ibit9  * adv_mom_1                  &
+                              ) *                                             &
+                                          ( u(k,j,i)   + u(k,j,i-1) )         &
+                       -      (  8.0_wp * ibit11 * adv_mom_5                  &
+                           +              ibit10 * adv_mom_3                  &
+                              ) *                                             &
+                                          ( u(k,j,i+1) + u(k,j,i-2) )         &
+                       +      (           ibit11 * adv_mom_5                  &
+                              ) *                                             &
+                                          ( u(k,j,i+2) + u(k,j,i-3) )         &
+                                           )
+
+              diss_l_u(k,j,tn) = - ABS( u_comp_l ) * (                        &
+                              ( 10.0_wp * ibit11 * adv_mom_5                  &
+                           +     3.0_wp * ibit10 * adv_mom_3                  &
+                           +              ibit9  * adv_mom_1                  &
+                              ) *                                             &
+                                        ( u(k,j,i)   - u(k,j,i-1) )           &
+                       -      (  5.0_wp * ibit11 * adv_mom_5                  &
+                           +              ibit10 * adv_mom_3                  &
+                              ) *                                             &
+                                        ( u(k,j,i+1) - u(k,j,i-2) )           &
+                       +      (           ibit11 * adv_mom_5                  &
+                              ) *                                             &
+                                        ( u(k,j,i+2) - u(k,j,i-3) )           &
+                                                     )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp_l         = u(k,j,i) + u(k,j,i-1) - gu
+             flux_l_u(k,j,tn) = u_comp_l * (                                   &
+                             37.0_wp * ( u(k,j,i) + u(k,j,i-1)   )             &
+                           -  8.0_wp * ( u(k,j,i+1) + u(k,j,i-2) )             &
+                           +           ( u(k,j,i+2) + u(k,j,i-3) ) ) * adv_mom_5
+             diss_l_u(k,j,tn) = - ABS(u_comp_l) * (                            &
+                             10.0_wp * ( u(k,j,i) - u(k,j,i-1)   )             &
+                           -  5.0_wp * ( u(k,j,i+1) - u(k,j,i-2) )             &
+                           +           ( u(k,j,i+2) - u(k,j,i-3) ) ) * adv_mom_5
+
+          ENDDO
+          
+       ENDIF
+
+       flux_t(0) = 0.0_wp
+       diss_t(0) = 0.0_wp
+       w_comp(0) = 0.0_wp
+!
+!--    Now compute the fluxes tendency terms for the horizontal and
+!--    vertical parts.
+       DO  k = nzb+1, nzb_max
+
+          ibit11 = IBITS(advc_flags_1(k,j,i),11,1)
+          ibit10 = IBITS(advc_flags_1(k,j,i),10,1)
+          ibit9  = IBITS(advc_flags_1(k,j,i),9,1)
+
+          u_comp(k) = u(k,j,i+1) + u(k,j,i)
+          flux_r(k) = ( u_comp(k) - gu ) * (                                  &
+                     ( 37.0_wp * ibit11 * adv_mom_5                           &
+                  +     7.0_wp * ibit10 * adv_mom_3                           &
+                  +              ibit9  * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( u(k,j,i+1) + u(k,j,i)   )               &
+              -      (  8.0_wp * ibit11 * adv_mom_5                           &
+                  +              ibit10 * adv_mom_3                           & 
+                     ) *                                                      &
+                                    ( u(k,j,i+2) + u(k,j,i-1) )               &
+              +      (           ibit11 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( u(k,j,i+3) + u(k,j,i-2) )               &
+                                           )
+
+          diss_r(k) = - ABS( u_comp(k) - gu ) * (                             &
+                     ( 10.0_wp * ibit11 * adv_mom_5                           &
+                  +     3.0_wp * ibit10 * adv_mom_3                           &
+                  +              ibit9  * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( u(k,j,i+1) - u(k,j,i)   )               &
+              -      (  5.0_wp * ibit11 * adv_mom_5                           &
+                  +              ibit10 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( u(k,j,i+2) - u(k,j,i-1) )               &
+              +      (           ibit11 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( u(k,j,i+3) - u(k,j,i-2) )               &
+                                                )
+
+          ibit14 = IBITS(advc_flags_1(k,j,i),14,1)
+          ibit13 = IBITS(advc_flags_1(k,j,i),13,1)
+          ibit12 = IBITS(advc_flags_1(k,j,i),12,1)
+
+          v_comp(k) = v(k,j+1,i) + v(k,j+1,i-1) - gv
+          flux_n(k) = v_comp(k) * (                                           &
+                     ( 37.0_wp * ibit14 * adv_mom_5                           &
+                  +     7.0_wp * ibit13 * adv_mom_3                           &
+                  +              ibit12 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( u(k,j+1,i) + u(k,j,i)   )               &
+              -      (  8.0_wp * ibit14 * adv_mom_5                           &
+                  +              ibit13 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( u(k,j+2,i) + u(k,j-1,i) )               &
+              +      (           ibit14 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( u(k,j+3,i) + u(k,j-2,i) )               &
+                                  )
+
+          diss_n(k) = - ABS ( v_comp(k) ) * (                                 &
+                     ( 10.0_wp * ibit14 * adv_mom_5                           &
+                  +     3.0_wp * ibit13 * adv_mom_3                           &
+                  +              ibit12 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( u(k,j+1,i) - u(k,j,i)   )               &
+              -      (  5.0_wp * ibit14 * adv_mom_5                           &
+                  +              ibit13 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( u(k,j+2,i) - u(k,j-1,i) )               &
+              +      (           ibit14 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( u(k,j+3,i) - u(k,j-2,i) )               &
+                                            )
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit17 = IBITS(advc_flags_1(k,j,i),17,1)
+          ibit16 = IBITS(advc_flags_1(k,j,i),16,1)
+          ibit15 = IBITS(advc_flags_1(k,j,i),15,1)
+
+          k_ppp = k + 3 * ibit17
+          k_pp  = k + 2 * ( 1 - ibit15 )
+          k_mm  = k - 2 * ibit17
+
+          w_comp(k) = w(k,j,i) + w(k,j,i-1)
+          flux_t(k) = w_comp(k) * rho_air_zw(k) * (                           &
+                     ( 37.0_wp * ibit17 * adv_mom_5                           &
+                  +     7.0_wp * ibit16 * adv_mom_3                           &
+                  +              ibit15 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( u(k+1,j,i)  + u(k,j,i)     )                &
+              -      (  8.0_wp * ibit17 * adv_mom_5                           &
+                  +              ibit16 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( u(k_pp,j,i) + u(k-1,j,i)   )                &
+              +      (           ibit17 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( u(k_ppp,j,i) + u(k_mm,j,i) )                &
+                                                  )
+
+          diss_t(k) = - ABS( w_comp(k) ) * rho_air_zw(k) * (                  &
+                     ( 10.0_wp * ibit17 * adv_mom_5                           &
+                  +     3.0_wp * ibit16 * adv_mom_3                           &
+                  +              ibit15 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( u(k+1,j,i)   - u(k,j,i)    )                &
+              -      (  5.0_wp * ibit17 * adv_mom_5                           &
+                  +              ibit16 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( u(k_pp,j,i)  - u(k-1,j,i)  )                &
+              +      (           ibit17 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( u(k_ppp,j,i) - u(k_mm,j,i) )                &
+                                                           )
+       ENDDO
+
+       DO  k = nzb+1, nzb_max
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography. 
+          div = ( ( u_comp(k)       * ( ibit9 + ibit10 + ibit11 )             &
+                - ( u(k,j,i)   + u(k,j,i-1)   )                               &
+                                    * ( IBITS(advc_flags_1(k,j,i-1),9,1)      &
+                                      + IBITS(advc_flags_1(k,j,i-1),10,1)     &
+                                      + IBITS(advc_flags_1(k,j,i-1),11,1)     &
+                                      )                                       &
+                  ) * ddx                                                     &
+               +  ( ( v_comp(k) + gv ) * ( ibit12 + ibit13 + ibit14 )         &
+                  - ( v(k,j,i)   + v(k,j,i-1 )  )                             &
+                                    * ( IBITS(advc_flags_1(k,j-1,i),12,1)     &
+                                      + IBITS(advc_flags_1(k,j-1,i),13,1)     &
+                                      + IBITS(advc_flags_1(k,j-1,i),14,1)     &
+                                      )                                       &
+                  ) * ddy                                                     &
+               +  ( w_comp(k)   * rho_air_zw(k) * ( ibit15 + ibit16 + ibit17 )&
+                -   w_comp(k-1) * rho_air_zw(k-1)                             &
+                                    * ( IBITS(advc_flags_1(k-1,j,i),15,1)     &
+                                      + IBITS(advc_flags_1(k-1,j,i),16,1)     &
+                                      + IBITS(advc_flags_1(k-1,j,i),17,1)     &
+                                      )                                       &  
+                  ) * drho_air(k) * ddzw(k)                                   &
+                ) * 0.5_wp
+
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                            ( flux_r(k) + diss_r(k)                           &
+                          -   flux_l_u(k,j,tn) - diss_l_u(k,j,tn) ) * ddx     &
+                          + ( flux_n(k) + diss_n(k)                           &
+                          -   flux_s_u(k,tn) - diss_s_u(k,tn)     ) * ddy     &
+                          + ( ( flux_t(k) + diss_t(k) )                       &
+                          -   ( flux_d    + diss_d )                          &
+                                                    ) * drho_air(k) * ddzw(k) &
+                                       ) + div * u(k,j,i)
+
+           flux_l_u(k,j,tn) = flux_r(k)
+           diss_l_u(k,j,tn) = diss_r(k)
+           flux_s_u(k,tn)   = flux_n(k)
+           diss_s_u(k,tn)   = diss_n(k)
+!
+!--        Statistical Evaluation of u'u'. The factor has to be applied for
+!--        right evaluation when gallilei_trans = .T. .
+           sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn)                           &
+                + ( flux_r(k)                                                  &
+                    * ( u_comp(k) - 2.0_wp * hom(k,1,1,0)                   )  &
+                    / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) )  &
+                  + diss_r(k)                                                  &
+                    *   ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0)              )  &
+                    / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--        Statistical Evaluation of w'u'.
+           sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn)                         &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp(k) - 2.0_wp * hom(k,1,3,0)                )     &
+                    / ( w_comp(k) + SIGN( 1.0E-20_wp, w_comp(k) )        )     &
+                  + diss_t(k)                                                  &
+                    *   ABS( w_comp(k) - 2.0_wp * hom(k,1,3,0)           )     &
+                    / ( ABS( w_comp(k) ) + 1.0E-20_wp                    )     &
+                  ) *   weight_substep(intermediate_timestep_count)
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          u_comp(k) = u(k,j,i+1) + u(k,j,i)
+          flux_r(k) = ( u_comp(k) - gu ) * (                                  &
+                         37.0_wp * ( u(k,j,i+1) + u(k,j,i)   )                &
+                       -  8.0_wp * ( u(k,j,i+2) + u(k,j,i-1) )                &
+                       +           ( u(k,j,i+3) + u(k,j,i-2) ) ) * adv_mom_5
+          diss_r(k) = - ABS( u_comp(k) - gu ) * (                             &
+                         10.0_wp * ( u(k,j,i+1) - u(k,j,i)   )                &
+                       -  5.0_wp * ( u(k,j,i+2) - u(k,j,i-1) )                &
+                       +           ( u(k,j,i+3) - u(k,j,i-2) ) ) * adv_mom_5
+
+          v_comp(k) = v(k,j+1,i) + v(k,j+1,i-1) - gv
+          flux_n(k) = v_comp(k) * (                                           &
+                         37.0_wp * ( u(k,j+1,i) + u(k,j,i)   )                &
+                       -  8.0_wp * ( u(k,j+2,i) + u(k,j-1,i) )                &
+                       +           ( u(k,j+3,i) + u(k,j-2,i) ) ) * adv_mom_5
+          diss_n(k) = - ABS( v_comp(k) ) * (                                  &
+                         10.0_wp * ( u(k,j+1,i) - u(k,j,i)   )                &
+                       -  5.0_wp * ( u(k,j+2,i) - u(k,j-1,i) )                &
+                       +           ( u(k,j+3,i) - u(k,j-2,i) ) ) * adv_mom_5
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit17 = IBITS(advc_flags_1(k,j,i),17,1)
+          ibit16 = IBITS(advc_flags_1(k,j,i),16,1)
+          ibit15 = IBITS(advc_flags_1(k,j,i),15,1)
+
+          k_ppp = k + 3 * ibit17
+          k_pp  = k + 2 * ( 1 - ibit15 )
+          k_mm  = k - 2 * ibit17
+
+          w_comp(k) = w(k,j,i) + w(k,j,i-1)
+          flux_t(k) = w_comp(k) * rho_air_zw(k) * (                           &
+                     ( 37.0_wp * ibit17 * adv_mom_5                           &
+                  +     7.0_wp * ibit16 * adv_mom_3                           &
+                  +              ibit15 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( u(k+1,j,i)  + u(k,j,i)     )                &
+              -      (  8.0_wp * ibit17 * adv_mom_5                           &
+                  +              ibit16 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( u(k_pp,j,i) + u(k-1,j,i)   )                &
+              +      (           ibit17 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( u(k_ppp,j,i) + u(k_mm,j,i) )                &
+                                                  )
+
+          diss_t(k) = - ABS( w_comp(k) ) * rho_air_zw(k) * (                  &
+                     ( 10.0_wp * ibit17 * adv_mom_5                           &
+                  +     3.0_wp * ibit16 * adv_mom_3                           &
+                  +              ibit15 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( u(k+1,j,i)   - u(k,j,i)    )                &
+              -      (  5.0_wp * ibit17 * adv_mom_5                           &
+                  +              ibit16 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( u(k_pp,j,i)  - u(k-1,j,i)  )                &
+              +      (           ibit17 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( u(k_ppp,j,i) - u(k_mm,j,i) )                &
+                                                           )
+
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography.
+          div = ( ( u_comp(k)      - ( u(k,j,i)   + u(k,j,i-1)   ) ) * ddx    &
+               +  ( v_comp(k) + gv - ( v(k,j,i)   + v(k,j,i-1 )  ) ) * ddy    &
+               +  ( w_comp(k)   * rho_air_zw(k)   -                           &
+                    w_comp(k-1) * rho_air_zw(k-1)                             &
+                  ) * drho_air(k) * ddzw(k)                                   &
+                ) * 0.5_wp
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                            ( flux_r(k) + diss_r(k)                           &
+                          -   flux_l_u(k,j,tn) - diss_l_u(k,j,tn) ) * ddx     &
+                          + ( flux_n(k) + diss_n(k)                           &
+                          -   flux_s_u(k,tn) - diss_s_u(k,tn)     ) * ddy     &
+                          + ( ( flux_t(k) + diss_t(k) )                       &
+                          -   ( flux_d    + diss_d    )                       &
+                                                    ) * drho_air(k) * ddzw(k) &
+                                       ) + div * u(k,j,i)
+
+           flux_l_u(k,j,tn) = flux_r(k)
+           diss_l_u(k,j,tn) = diss_r(k)
+           flux_s_u(k,tn)   = flux_n(k)
+           diss_s_u(k,tn)   = diss_n(k)
+!
+!--        Statistical Evaluation of u'u'. The factor has to be applied for
+!--        right evaluation when gallilei_trans = .T. .
+           sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn)                           &
+                + ( flux_r(k)                                                  &
+                    * ( u_comp(k) - 2.0_wp * hom(k,1,1,0)                   )  &
+                    / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) )  &
+                  + diss_r(k)                                                  &
+                    *   ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0)              )  &
+                    / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--        Statistical Evaluation of w'u'.
+           sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn)                         &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp(k) - 2.0_wp * hom(k,1,3,0)                   )  &
+                    / ( w_comp(k) + SIGN( 1.0E-20_wp, w_comp(k) )           )  &
+                  + diss_t(k)                                                  &
+                    *   ABS( w_comp(k) - 2.0_wp * hom(k,1,3,0)              )  &
+                    / ( ABS( w_comp(k) ) + 1.0E-20_wp                       )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+       ENDDO
+
+       sums_us2_ws_l(nzb,tn) = sums_us2_ws_l(nzb+1,tn)
+
+
+
+    END SUBROUTINE advec_u_ws_ij
+
+
+
+!-----------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Advection of v-component - Call for grid point i,j
+!-----------------------------------------------------------------------------!
+   SUBROUTINE advec_v_ws_ij( i, j, i_omp, tn )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, diss_l_v, diss_s_v, flux_l_v, flux_s_v, tend, u, v, w, &
+                  drho_air, rho_air_zw
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nysv, nzb, nzb_max, nzt, advc_flags_1
+
+       USE kinds
+
+       USE statistics,                                                         &
+           ONLY:  hom, sums_vs2_ws_l, sums_wsvs_ws_l, weight_substep
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)  ::  i      !<
+       INTEGER(iwp)  ::  ibit18 !<
+       INTEGER(iwp)  ::  ibit19 !<
+       INTEGER(iwp)  ::  ibit20 !<
+       INTEGER(iwp)  ::  ibit21 !<
+       INTEGER(iwp)  ::  ibit22 !<
+       INTEGER(iwp)  ::  ibit23 !<
+       INTEGER(iwp)  ::  ibit24 !<
+       INTEGER(iwp)  ::  ibit25 !<
+       INTEGER(iwp)  ::  ibit26 !<
+       INTEGER(iwp)  ::  i_omp  !<
+       INTEGER(iwp)  ::  j      !<
+       INTEGER(iwp)  ::  k      !<
+       INTEGER(iwp)  ::  k_mm   !<
+       INTEGER(iwp)  ::  k_pp   !<
+       INTEGER(iwp)  ::  k_ppp  !<
+       INTEGER(iwp)  ::  tn     !<
+       
+       REAL(wp)     ::  diss_d   !<
+       REAL(wp)     ::  div      !<
+       REAL(wp)     ::  flux_d   !<
+       REAL(wp)     ::  gu       !<
+       REAL(wp)     ::  gv       !<
+       REAL(wp)     ::  v_comp_l !<
+       
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  flux_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  u_comp !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  v_comp !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  w_comp !<
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+
+!       
+!--    Compute leftside fluxes for the respective boundary.
+       IF ( i == i_omp )  THEN
+
+          DO  k = nzb+1, nzb_max
+
+             ibit20 = IBITS(advc_flags_1(k,j,i-1),20,1)
+             ibit19 = IBITS(advc_flags_1(k,j,i-1),19,1)
+             ibit18 = IBITS(advc_flags_1(k,j,i-1),18,1)
+
+             u_comp(k)        = u(k,j-1,i) + u(k,j,i) - gu
+             flux_l_v(k,j,tn) = u_comp(k) * (                                 &
+                              ( 37.0_wp * ibit20 * adv_mom_5                  &
+                           +     7.0_wp * ibit19 * adv_mom_3                  &
+                           +              ibit18 * adv_mom_1                  &
+                              ) *                                             &
+                                        ( v(k,j,i)   + v(k,j,i-1) )           &
+                       -      (  8.0_wp * ibit20 * adv_mom_5                  &
+                           +              ibit19 * adv_mom_3                  &
+                              ) *                                             &
+                                        ( v(k,j,i+1) + v(k,j,i-2) )           &
+                       +      (           ibit20 * adv_mom_5                  &
+                              ) *                                             &
+                                        ( v(k,j,i+2) + v(k,j,i-3) )           &
+                                            )
+
+              diss_l_v(k,j,tn) = - ABS( u_comp(k) ) * (                       &
+                              ( 10.0_wp * ibit20 * adv_mom_5                  &
+                           +     3.0_wp * ibit19 * adv_mom_3                  &
+                           +              ibit18 * adv_mom_1                  &
+                              ) *                                             &
+                                        ( v(k,j,i)   - v(k,j,i-1) )           &
+                       -      (  5.0_wp * ibit20 * adv_mom_5                  &
+                           +              ibit19 * adv_mom_3                  &
+                              ) *                                             &
+                                        ( v(k,j,i+1) - v(k,j,i-2) )           &
+                       +      (           ibit20 * adv_mom_5                  &
+                              ) *                                             &
+                                        ( v(k,j,i+2) - v(k,j,i-3) )           &
+                                                      )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp(k)           = u(k,j-1,i) + u(k,j,i) - gu
+             flux_l_v(k,j,tn) = u_comp(k) * (                                 &
+                             37.0_wp * ( v(k,j,i) + v(k,j,i-1)   )            &
+                           -  8.0_wp * ( v(k,j,i+1) + v(k,j,i-2) )            &
+                           +           ( v(k,j,i+2) + v(k,j,i-3) ) ) * adv_mom_5
+             diss_l_v(k,j,tn) = - ABS( u_comp(k) ) * (                        &
+                             10.0_wp * ( v(k,j,i) - v(k,j,i-1)   )            &
+                           -  5.0_wp * ( v(k,j,i+1) - v(k,j,i-2) )            &
+                           +           ( v(k,j,i+2) - v(k,j,i-3) ) ) * adv_mom_5
+
+          ENDDO
+          
+       ENDIF
+!
+!--    Compute southside fluxes for the respective boundary.
+       IF ( j == nysv )  THEN
+       
+          DO  k = nzb+1, nzb_max
+
+             ibit23 = IBITS(advc_flags_1(k,j-1,i),23,1)
+             ibit22 = IBITS(advc_flags_1(k,j-1,i),22,1)
+             ibit21 = IBITS(advc_flags_1(k,j-1,i),21,1)
+
+             v_comp_l       = v(k,j,i) + v(k,j-1,i) - gv
+             flux_s_v(k,tn) = v_comp_l * (                                    &
+                            ( 37.0_wp * ibit23 * adv_mom_5                    &
+                         +     7.0_wp * ibit22 * adv_mom_3                    &
+                         +              ibit21 * adv_mom_1                    &
+                            ) *                                               &
+                                        ( v(k,j,i)   + v(k,j-1,i) )           &
+                     -      (  8.0_wp * ibit23 * adv_mom_5                    &
+                         +              ibit22 * adv_mom_3                    &
+                            ) *                                               &
+                                        ( v(k,j+1,i) + v(k,j-2,i) )           &
+                     +      (           ibit23 * adv_mom_5                    &
+                            ) *                                               &
+                                        ( v(k,j+2,i) + v(k,j-3,i) )           &
+                                         )
+
+             diss_s_v(k,tn) = - ABS( v_comp_l ) * (                           &
+                            ( 10.0_wp * ibit23 * adv_mom_5                    &
+                         +     3.0_wp * ibit22 * adv_mom_3                    &
+                         +              ibit21 * adv_mom_1                    &
+                            ) *                                               &
+                                        ( v(k,j,i)   - v(k,j-1,i) )           &
+                     -      (  5.0_wp * ibit23 * adv_mom_5                    &
+                         +              ibit22 * adv_mom_3                    &
+                            ) *                                               &
+                                        ( v(k,j+1,i) - v(k,j-2,i) )           &
+                     +      (           ibit23 * adv_mom_5                    &
+                            ) *                                               &
+                                        ( v(k,j+2,i) - v(k,j-3,i) )           &
+                                                  )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             v_comp_l       = v(k,j,i) + v(k,j-1,i) - gv
+             flux_s_v(k,tn) = v_comp_l * (                                    &
+                           37.0_wp * ( v(k,j,i) + v(k,j-1,i)   )              &
+                         -  8.0_wp * ( v(k,j+1,i) + v(k,j-2,i) )              &
+                         +           ( v(k,j+2,i) + v(k,j-3,i) ) ) * adv_mom_5
+             diss_s_v(k,tn) = - ABS( v_comp_l ) * (                           &
+                           10.0_wp * ( v(k,j,i) - v(k,j-1,i)   )              &
+                         -  5.0_wp * ( v(k,j+1,i) - v(k,j-2,i) )              &
+                         +           ( v(k,j+2,i) - v(k,j-3,i) ) ) * adv_mom_5
+
+          ENDDO
+          
+       ENDIF
+
+       flux_t(0) = 0.0_wp
+       diss_t(0) = 0.0_wp
+       w_comp(0) = 0.0_wp
+!
+!--    Now compute the fluxes and tendency terms for the horizontal and
+!--    verical parts.
+       DO  k = nzb+1, nzb_max
+
+          ibit20 = IBITS(advc_flags_1(k,j,i),20,1)
+          ibit19 = IBITS(advc_flags_1(k,j,i),19,1)
+          ibit18 = IBITS(advc_flags_1(k,j,i),18,1)
+ 
+          u_comp(k) = u(k,j-1,i+1) + u(k,j,i+1) - gu
+          flux_r(k) = u_comp(k) * (                                           &
+                     ( 37.0_wp * ibit20 * adv_mom_5                           &
+                  +     7.0_wp * ibit19 * adv_mom_3                           &
+                  +              ibit18 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( v(k,j,i+1) + v(k,j,i)   )               &
+              -      (  8.0_wp * ibit20 * adv_mom_5                           &
+                  +              ibit19 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( v(k,j,i+2) + v(k,j,i-1) )               &
+              +      (           ibit20 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( v(k,j,i+3) + v(k,j,i-2) )               &
+                                  )
+
+          diss_r(k) = - ABS( u_comp(k) ) * (                                  &
+                     ( 10.0_wp * ibit20 * adv_mom_5                           &
+                  +     3.0_wp * ibit19 * adv_mom_3                           &
+                  +              ibit18 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( v(k,j,i+1) - v(k,j,i)  )                &
+              -      (  5.0_wp * ibit20 * adv_mom_5                           &
+                  +              ibit19 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( v(k,j,i+2) - v(k,j,i-1) )               &
+              +      (           ibit20 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( v(k,j,i+3) - v(k,j,i-2) )               &
+                                           )
+
+          ibit23 = IBITS(advc_flags_1(k,j,i),23,1)
+          ibit22 = IBITS(advc_flags_1(k,j,i),22,1)
+          ibit21 = IBITS(advc_flags_1(k,j,i),21,1)
+
+
+          v_comp(k) = v(k,j+1,i) + v(k,j,i)
+          flux_n(k) = ( v_comp(k) - gv ) * (                                  &
+                     ( 37.0_wp * ibit23 * adv_mom_5                           &
+                  +     7.0_wp * ibit22 * adv_mom_3                           &
+                  +              ibit21 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( v(k,j+1,i) + v(k,j,i)   )               &
+              -      (  8.0_wp * ibit23 * adv_mom_5                           &
+                  +              ibit22 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( v(k,j+2,i) + v(k,j-1,i) )               &
+              +      (           ibit23 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( v(k,j+3,i) + v(k,j-2,i) )               &
+                                           )
+
+          diss_n(k) = - ABS( v_comp(k) - gv ) * (                             &
+                     ( 10.0_wp * ibit23 * adv_mom_5                           &
+                  +     3.0_wp * ibit22 * adv_mom_3                           &
+                  +              ibit21 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( v(k,j+1,i) - v(k,j,i)   )               &
+              -      (  5.0_wp * ibit23 * adv_mom_5                           &
+                  +              ibit22 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( v(k,j+2,i) - v(k,j-1,i) )               &
+              +      (           ibit23 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( v(k,j+3,i) - v(k,j-2,i) )               &
+                                                )
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit26 = IBITS(advc_flags_1(k,j,i),26,1)
+          ibit25 = IBITS(advc_flags_1(k,j,i),25,1)
+          ibit24 = IBITS(advc_flags_1(k,j,i),24,1)
+
+          k_ppp = k + 3 * ibit26
+          k_pp  = k + 2 * ( 1 - ibit24  )
+          k_mm  = k - 2 * ibit26
+
+          w_comp(k) = w(k,j-1,i) + w(k,j,i)
+          flux_t(k) = w_comp(k) * rho_air_zw(k) * (                           &
+                     ( 37.0_wp * ibit26 * adv_mom_5                           &
+                  +     7.0_wp * ibit25 * adv_mom_3                           &
+                  +              ibit24 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( v(k+1,j,i)   + v(k,j,i)    )                &
+              -      (  8.0_wp * ibit26 * adv_mom_5                           &
+                  +              ibit25 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( v(k_pp,j,i)  + v(k-1,j,i)  )                &
+              +      (           ibit26 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( v(k_ppp,j,i) + v(k_mm,j,i) )                &
+                                                  )
+
+          diss_t(k) = - ABS( w_comp(k) ) * rho_air_zw(k) * (                  &
+                     ( 10.0_wp * ibit26 * adv_mom_5                           &
+                  +     3.0_wp * ibit25 * adv_mom_3                           &
+                  +              ibit24 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( v(k+1,j,i)   - v(k,j,i)    )                &
+              -      (  5.0_wp * ibit26 * adv_mom_5                           &
+                  +              ibit25 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( v(k_pp,j,i)  - v(k-1,j,i)  )                &
+              +      (           ibit26 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( v(k_ppp,j,i) - v(k_mm,j,i) )                &
+                                                           )
+       ENDDO
+
+       DO  k = nzb+1, nzb_max
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography. 
+          div = ( ( ( u_comp(k)     + gu )                                    &
+                                       * ( ibit18 + ibit19 + ibit20 )         &
+                  - ( u(k,j-1,i) + u(k,j,i) )                                 &
+                                       * ( IBITS(advc_flags_1(k,j,i-1),18,1)  &
+                                         + IBITS(advc_flags_1(k,j,i-1),19,1)  &
+                                         + IBITS(advc_flags_1(k,j,i-1),20,1)  &
+                                         )                                    &
+                  ) * ddx                                                     &
+               +  ( v_comp(k)                                                 &
+                                       * ( ibit21 + ibit22 + ibit23 )         &
+                - ( v(k,j,i)     + v(k,j-1,i) )                               &
+                                       * ( IBITS(advc_flags_1(k,j-1,i),21,1)  &
+                                         + IBITS(advc_flags_1(k,j-1,i),22,1)  &
+                                         + IBITS(advc_flags_1(k,j-1,i),23,1)  &
+                                         )                                    &
+                  ) * ddy                                                     &
+               +  ( w_comp(k)   * rho_air_zw(k) * ( ibit24 + ibit25 + ibit26 )&
+                -   w_comp(k-1) * rho_air_zw(k-1)                             &
+                                       * ( IBITS(advc_flags_1(k-1,j,i),24,1)  &
+                                         + IBITS(advc_flags_1(k-1,j,i),25,1)  &
+                                         + IBITS(advc_flags_1(k-1,j,i),26,1)  &
+                                         )                                    &
+                   ) * drho_air(k) * ddzw(k)                                  &
+                ) * 0.5_wp
+
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                         ( flux_r(k) + diss_r(k)                              &
+                       -   flux_l_v(k,j,tn) - diss_l_v(k,j,tn)   ) * ddx      &
+                       + ( flux_n(k) + diss_n(k)                              &
+                       -   flux_s_v(k,tn) - diss_s_v(k,tn)       ) * ddy      &
+                       + ( ( flux_t(k) + diss_t(k) )                          &
+                       -   ( flux_d    + diss_d    )                          &
+                                                   ) * drho_air(k) * ddzw(k)  &
+                                      ) + v(k,j,i) * div
+
+           flux_l_v(k,j,tn) = flux_r(k)
+           diss_l_v(k,j,tn) = diss_r(k)
+           flux_s_v(k,tn)   = flux_n(k)
+           diss_s_v(k,tn)   = diss_n(k)
+
+!
+!--        Statistical Evaluation of v'v'. The factor has to be applied for
+!--        right evaluation when gallilei_trans = .T. .
+           sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn)                           &
+                + ( flux_n(k)                                                  &
+                    * ( v_comp(k) - 2.0_wp * hom(k,1,2,0)                   )  &
+                    / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) )  &
+                  + diss_n(k)                                                  &
+                    *   ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0)              )  &
+                    / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--        Statistical Evaluation of w'u'.
+           sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn)                         &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp(k) - 2.0_wp * hom(k,1,3,0)                   )  &
+                    / ( w_comp(k) + SIGN( 1.0E-20_wp, w_comp(k) )           )  &
+                  + diss_t(k)                                                  &
+                    *   ABS( w_comp(k) - 2.0_wp * hom(k,1,3,0)              )  &
+                    / ( ABS( w_comp(k) ) + 1.0E-20_wp                       )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          u_comp(k) = u(k,j-1,i+1) + u(k,j,i+1) - gu
+          flux_r(k) = u_comp(k) * (                                           &
+                      37.0_wp * ( v(k,j,i+1) + v(k,j,i)   )                   &
+                    -  8.0_wp * ( v(k,j,i+2) + v(k,j,i-1) )                   &
+                    +           ( v(k,j,i+3) + v(k,j,i-2) ) ) * adv_mom_5
+
+          diss_r(k) = - ABS( u_comp(k) ) * (                                  &
+                      10.0_wp * ( v(k,j,i+1) - v(k,j,i) )                     &
+                    -  5.0_wp * ( v(k,j,i+2) - v(k,j,i-1) )                   &
+                    +           ( v(k,j,i+3) - v(k,j,i-2) ) ) * adv_mom_5
+
+
+          v_comp(k) = v(k,j+1,i) + v(k,j,i)
+          flux_n(k) = ( v_comp(k) - gv ) * (                                  &
+                      37.0_wp * ( v(k,j+1,i) + v(k,j,i)   )                   &
+                    -  8.0_wp * ( v(k,j+2,i) + v(k,j-1,i) )                   &
+                      +         ( v(k,j+3,i) + v(k,j-2,i) ) ) * adv_mom_5
+
+          diss_n(k) = - ABS( v_comp(k) - gv ) * (                             &
+                      10.0_wp * ( v(k,j+1,i) - v(k,j,i)   )                   &
+                    -  5.0_wp * ( v(k,j+2,i) - v(k,j-1,i) )                   &
+                    +           ( v(k,j+3,i) - v(k,j-2,i) ) ) * adv_mom_5
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit26 = IBITS(advc_flags_1(k,j,i),26,1)
+          ibit25 = IBITS(advc_flags_1(k,j,i),25,1)
+          ibit24 = IBITS(advc_flags_1(k,j,i),24,1)
+
+          k_ppp = k + 3 * ibit26
+          k_pp  = k + 2 * ( 1 - ibit24  )
+          k_mm  = k - 2 * ibit26
+
+          w_comp(k) = w(k,j-1,i) + w(k,j,i)
+          flux_t(k) = w_comp(k) * rho_air_zw(k) * (                           &
+                     ( 37.0_wp * ibit26 * adv_mom_5                           &
+                  +     7.0_wp * ibit25 * adv_mom_3                           &
+                  +              ibit24 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( v(k+1,j,i)   + v(k,j,i)    )                &
+              -      (  8.0_wp * ibit26 * adv_mom_5                           &
+                  +              ibit25 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( v(k_pp,j,i)  + v(k-1,j,i)  )                &
+              +      (           ibit26 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( v(k_ppp,j,i) + v(k_mm,j,i) )                &
+                                                  )
+
+          diss_t(k) = - ABS( w_comp(k) ) * rho_air_zw(k) * (                  &
+                     ( 10.0_wp * ibit26 * adv_mom_5                           &
+                  +     3.0_wp * ibit25 * adv_mom_3                           &
+                  +              ibit24 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( v(k+1,j,i)   - v(k,j,i)    )                &
+              -      (  5.0_wp * ibit26 * adv_mom_5                           &
+                  +              ibit25 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( v(k_pp,j,i)  - v(k-1,j,i)  )                &
+              +      (           ibit26 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( v(k_ppp,j,i) - v(k_mm,j,i) )                &
+                                                           )
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography.
+          div = ( ( u_comp(k) + gu - ( u(k,j-1,i)   + u(k,j,i)   ) ) * ddx    &
+               +  ( v_comp(k)      - ( v(k,j,i)     + v(k,j-1,i) ) ) * ddy    &
+               +  ( w_comp(k)   * rho_air_zw(k)   -                           &
+                    w_comp(k-1) * rho_air_zw(k-1)                             &
+                  ) * drho_air(k) * ddzw(k)                                   &
+                ) * 0.5_wp
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                         ( flux_r(k) + diss_r(k)                              &
+                       -   flux_l_v(k,j,tn) - diss_l_v(k,j,tn)   ) * ddx      &
+                       + ( flux_n(k) + diss_n(k)                              &
+                       -   flux_s_v(k,tn) - diss_s_v(k,tn)       ) * ddy      &
+                       + ( ( flux_t(k) + diss_t(k) )                          &
+                       -   ( flux_d    + diss_d    )                          &
+                                                   ) * drho_air(k) * ddzw(k)  &
+                                      ) + v(k,j,i) * div
+
+           flux_l_v(k,j,tn) = flux_r(k)
+           diss_l_v(k,j,tn) = diss_r(k)
+           flux_s_v(k,tn)   = flux_n(k)
+           diss_s_v(k,tn)   = diss_n(k)
+!
+!--        Statistical Evaluation of v'v'. The factor has to be applied for
+!--        right evaluation when gallilei_trans = .T. .
+           sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn)                           &
+                + ( flux_n(k)                                                  &
+                    * ( v_comp(k) - 2.0_wp * hom(k,1,2,0)                   )  &
+                    / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) )  &
+                  + diss_n(k)                                                  &
+                    *   ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0)              )  &
+                    / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--        Statistical Evaluation of w'u'.
+           sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn)                         &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp(k) - 2.0_wp * hom(k,1,3,0)                   )  &
+                    / ( w_comp(k) + SIGN( 1.0E-20_wp, w_comp(k) )           )  &
+                  + diss_t(k)                                                  &
+                    *   ABS( w_comp(k) - 2.0_wp * hom(k,1,3,0)              )  &
+                    / ( ABS( w_comp(k) ) + 1.0E-20_wp                       )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+
+       ENDDO
+       sums_vs2_ws_l(nzb,tn) = sums_vs2_ws_l(nzb+1,tn)
+
+
+    END SUBROUTINE advec_v_ws_ij
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Advection of w-component - Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_w_ws_ij( i, j, i_omp, tn )
+
+       USE arrays_3d,                                                         &
+           ONLY:  ddzu, diss_l_w, diss_s_w, flux_l_w, flux_s_w, tend, u, v, w,&
+                  drho_air_zw, rho_air
+
+       USE control_parameters,                                                &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans
+
+       USE grid_variables,                                                    &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                           &
+           ONLY:  nys, nzb, nzb_max, nzt, advc_flags_1, advc_flags_2
+
+       USE kinds
+       
+       USE statistics,                                                        &
+           ONLY:  hom, sums_ws2_ws_l, weight_substep
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  ibit27 !<
+       INTEGER(iwp) ::  ibit28 !<
+       INTEGER(iwp) ::  ibit29 !<
+       INTEGER(iwp) ::  ibit30 !<
+       INTEGER(iwp) ::  ibit31 !<
+       INTEGER(iwp) ::  ibit32 !<
+       INTEGER(iwp) ::  ibit33 !<
+       INTEGER(iwp) ::  ibit34 !<
+       INTEGER(iwp) ::  ibit35 !<
+       INTEGER(iwp) ::  i_omp  !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_mm   !<
+       INTEGER(iwp) ::  k_pp   !<
+       INTEGER(iwp) ::  k_ppp  !<
+       INTEGER(iwp) ::  tn     !<
+       
+       REAL(wp)    ::  diss_d  !<
+       REAL(wp)    ::  div     !<
+       REAL(wp)    ::  flux_d  !<
+       REAL(wp)    ::  gu      !<
+       REAL(wp)    ::  gv      !<
+       
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  flux_t !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  u_comp !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  v_comp !<
+       REAL(wp), DIMENSION(nzb:nzt+1)  ::  w_comp !<
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+
+!
+!--    Compute southside fluxes for the respective boundary.
+       IF ( j == nys )  THEN
+
+          DO  k = nzb+1, nzb_max
+             ibit32 = IBITS(advc_flags_2(k,j-1,i),0,1)
+             ibit31 = IBITS(advc_flags_1(k,j-1,i),31,1)
+             ibit30 = IBITS(advc_flags_1(k,j-1,i),30,1)
+
+             v_comp(k)      = v(k+1,j,i) + v(k,j,i) - gv
+             flux_s_w(k,tn) = v_comp(k) * (                                   &
+                            ( 37.0_wp * ibit32 * adv_mom_5                    &
+                         +     7.0_wp * ibit31 * adv_mom_3                    &
+                         +              ibit30 * adv_mom_1                    &
+                            ) *                                               &
+                                        ( w(k,j,i)   + w(k,j-1,i) )           &
+                     -      (  8.0_wp * ibit32 * adv_mom_5                    &
+                         +              ibit31 * adv_mom_3                    &
+                            ) *                                               &
+                                        ( w(k,j+1,i) + w(k,j-2,i) )           &
+                     +      (           ibit32 * adv_mom_5                    &
+                            ) *                                               &
+                                        ( w(k,j+2,i) + w(k,j-3,i) )           &
+                                          )
+
+             diss_s_w(k,tn) = - ABS( v_comp(k) ) * (                          &
+                            ( 10.0_wp * ibit32 * adv_mom_5                    &
+                         +     3.0_wp * ibit31 * adv_mom_3                    &
+                         +              ibit30 * adv_mom_1                    &
+                            ) *                                               &
+                                        ( w(k,j,i)   - w(k,j-1,i) )           &
+                     -      (  5.0_wp * ibit32 * adv_mom_5                    &
+                         +              ibit31 * adv_mom_3                    &
+                            ) *                                               &
+                                        ( w(k,j+1,i) - w(k,j-2,i) )           &
+                     +      (           ibit32 * adv_mom_5                    &
+                            ) *                                               &
+                                        ( w(k,j+2,i) - w(k,j-3,i) )           &
+                                                   )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             v_comp(k)      = v(k+1,j,i) + v(k,j,i) - gv
+             flux_s_w(k,tn) = v_comp(k) * (                                   &
+                           37.0_wp * ( w(k,j,i) + w(k,j-1,i)   )              &
+                         -  8.0_wp * ( w(k,j+1,i) +w(k,j-2,i)  )              &
+                         +           ( w(k,j+2,i) + w(k,j-3,i) ) ) * adv_mom_5
+             diss_s_w(k,tn) = - ABS( v_comp(k) ) * (                         &
+                           10.0_wp * ( w(k,j,i) - w(k,j-1,i)   )              &
+                         -  5.0_wp * ( w(k,j+1,i) - w(k,j-2,i) )              &
+                         +           ( w(k,j+2,i) - w(k,j-3,i) ) ) * adv_mom_5
+
+          ENDDO
+
+       ENDIF
+!
+!--    Compute leftside fluxes for the respective boundary.
+       IF ( i == i_omp ) THEN
+
+          DO  k = nzb+1, nzb_max
+
+             ibit29 = IBITS(advc_flags_1(k,j,i-1),29,1)
+             ibit28 = IBITS(advc_flags_1(k,j,i-1),28,1)
+             ibit27 = IBITS(advc_flags_1(k,j,i-1),27,1)
+
+             u_comp(k)        = u(k+1,j,i) + u(k,j,i) - gu
+             flux_l_w(k,j,tn) = u_comp(k) * (                                 &
+                             ( 37.0_wp * ibit29 * adv_mom_5                   &
+                          +     7.0_wp * ibit28 * adv_mom_3                   &
+                          +              ibit27 * adv_mom_1                   &
+                             ) *                                              &
+                                        ( w(k,j,i)   + w(k,j,i-1) )           &
+                      -      (  8.0_wp * ibit29 * adv_mom_5                   &
+                          +              ibit28 * adv_mom_3                   &
+                             ) *                                              &
+                                        ( w(k,j,i+1) + w(k,j,i-2) )           &
+                      +      (           ibit29 * adv_mom_5                   &
+                             ) *                                              &
+                                        ( w(k,j,i+2) + w(k,j,i-3) )           &
+                                            )
+
+               diss_l_w(k,j,tn) = - ABS( u_comp(k) ) * (                      &
+                             ( 10.0_wp * ibit29 * adv_mom_5                   &
+                          +     3.0_wp * ibit28 * adv_mom_3                   &
+                          +              ibit27 * adv_mom_1                   &
+                             ) *                                              &
+                                        ( w(k,j,i)   - w(k,j,i-1) )           &
+                      -      (  5.0_wp * ibit29 * adv_mom_5                   &
+                          +              ibit28 * adv_mom_3                   &
+                             ) *                                              &
+                                        ( w(k,j,i+1) - w(k,j,i-2) )           &
+                      +      (           ibit29 * adv_mom_5                   &
+                             ) *                                              &
+                                        ( w(k,j,i+2) - w(k,j,i-3) )           &
+                                                       )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp(k)        = u(k+1,j,i) + u(k,j,i) - gu
+             flux_l_w(k,j,tn) = u_comp(k) * (                                 &
+                            37.0_wp * ( w(k,j,i) + w(k,j,i-1)   )             &
+                          -  8.0_wp * ( w(k,j,i+1) + w(k,j,i-2) )             &
+                          +           ( w(k,j,i+2) + w(k,j,i-3) ) ) * adv_mom_5
+             diss_l_w(k,j,tn) = - ABS( u_comp(k) ) * (                        &
+                            10.0_wp * ( w(k,j,i) - w(k,j,i-1)   )             &
+                          -  5.0_wp * ( w(k,j,i+1) - w(k,j,i-2) )             &
+                          +           ( w(k,j,i+2) - w(k,j,i-3) ) ) * adv_mom_5 
+
+          ENDDO
+
+       ENDIF
+!
+!--    The lower flux has to be calculated explicetely for the tendency at
+!--    the first w-level. For topography wall this is done implicitely by
+!--    advc_flags_1.
+       k         = nzb + 1
+       w_comp(k) = w(k,j,i) + w(k-1,j,i)
+       flux_t(0) = w_comp(k)       * ( w(k,j,i) + w(k-1,j,i) ) * adv_mom_1
+       diss_t(0) = -ABS(w_comp(k)) * ( w(k,j,i) - w(k-1,j,i) ) * adv_mom_1
+!
+!--    Now compute the fluxes and tendency terms for the horizontal
+!--    and vertical parts.
+       DO  k = nzb+1, nzb_max
+
+          ibit29 = IBITS(advc_flags_1(k,j,i),29,1)
+          ibit28 = IBITS(advc_flags_1(k,j,i),28,1)
+          ibit27 = IBITS(advc_flags_1(k,j,i),27,1)
+
+          u_comp(k) = u(k+1,j,i+1) + u(k,j,i+1) - gu
+          flux_r(k) = u_comp(k) * (                                           &
+                     ( 37.0_wp * ibit29 * adv_mom_5                           &
+                  +     7.0_wp * ibit28 * adv_mom_3                           &
+                  +              ibit27 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( w(k,j,i+1) + w(k,j,i)   )               &
+              -      (  8.0_wp * ibit29 * adv_mom_5                           &
+                  +              ibit28 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( w(k,j,i+2) + w(k,j,i-1) )               &
+              +      (           ibit29 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( w(k,j,i+3) + w(k,j,i-2) )               &
+                                  )
+
+          diss_r(k) = - ABS( u_comp(k) ) * (                                  &
+                     ( 10.0_wp * ibit29 * adv_mom_5                           &
+                  +     3.0_wp * ibit28 * adv_mom_3                           &
+                  +              ibit27 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( w(k,j,i+1) - w(k,j,i)   )               &
+              -      (  5.0_wp * ibit29 * adv_mom_5                           &
+                  +              ibit28 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( w(k,j,i+2) - w(k,j,i-1) )               &
+              +      (           ibit29 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( w(k,j,i+3) - w(k,j,i-2) )               &
+                                           )
+
+          ibit32 = IBITS(advc_flags_2(k,j,i),0,1)
+          ibit31 = IBITS(advc_flags_1(k,j,i),31,1)
+          ibit30 = IBITS(advc_flags_1(k,j,i),30,1)
+
+          v_comp(k) = v(k+1,j+1,i) + v(k,j+1,i) - gv
+          flux_n(k) = v_comp(k) * (                                           &
+                     ( 37.0_wp * ibit32 * adv_mom_5                           &
+                  +     7.0_wp * ibit31 * adv_mom_3                           &
+                  +              ibit30 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( w(k,j+1,i) + w(k,j,i)   )               &
+              -      (  8.0_wp * ibit32 * adv_mom_5                           &
+                  +              ibit31 * adv_mom_3                           &
+                     ) *                                                      &
+                                    ( w(k,j+2,i) + w(k,j-1,i) )               &
+              +      (           ibit32 * adv_mom_5                           &
+                     ) *                                                      &
+                                    ( w(k,j+3,i) + w(k,j-2,i) )               &
+                                  )
+
+          diss_n(k) = - ABS( v_comp(k) ) * (                                  &
+                     ( 10.0_wp * ibit32 * adv_mom_5                           &
+                  +     3.0_wp * ibit31 * adv_mom_3                           &
+                  +              ibit30 * adv_mom_1                           &
+                     ) *                                                      &
+                                    ( w(k,j+1,i) - w(k,j,i)  )                &
+              -      (  5.0_wp * ibit32 * adv_mom_5                           &
+                  +              ibit31 * adv_mom_3                           &
+                     ) *                                                      &
+                                   ( w(k,j+2,i) - w(k,j-1,i) )                &
+              +      (           ibit32 * adv_mom_5                           &
+                     ) *                                                      &
+                                   ( w(k,j+3,i) - w(k,j-2,i) )                &
+                                           )
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit35 = IBITS(advc_flags_2(k,j,i),3,1)
+          ibit34 = IBITS(advc_flags_2(k,j,i),2,1)
+          ibit33 = IBITS(advc_flags_2(k,j,i),1,1)
+
+          k_ppp = k + 3 * ibit35
+          k_pp  = k + 2 * ( 1 - ibit33  )
+          k_mm  = k - 2 * ibit35
+
+          w_comp(k) = w(k+1,j,i) + w(k,j,i)
+          flux_t(k) = w_comp(k) * rho_air(k+1) * (                            &
+                     ( 37.0_wp * ibit35 * adv_mom_5                           &
+                  +     7.0_wp * ibit34 * adv_mom_3                           &
+                  +              ibit33 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( w(k+1,j,i)  + w(k,j,i)     )                &
+              -      (  8.0_wp * ibit35 * adv_mom_5                           &
+                  +              ibit34 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( w(k_pp,j,i)  + w(k-1,j,i)  )                &
+              +      (           ibit35 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( w(k_ppp,j,i) + w(k_mm,j,i) )                &
+                                                 )
+
+          diss_t(k) = - ABS( w_comp(k) ) * rho_air(k+1) * (                   &
+                     ( 10.0_wp * ibit35 * adv_mom_5                           &
+                  +     3.0_wp * ibit34 * adv_mom_3                           &
+                  +              ibit33 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( w(k+1,j,i)   - w(k,j,i)    )                &
+              -      (  5.0_wp * ibit35 * adv_mom_5                           &
+                  +              ibit34 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( w(k_pp,j,i)  - w(k-1,j,i)  )                &
+              +      (           ibit35 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( w(k_ppp,j,i) - w(k_mm,j,i) )                &
+                                                          )
+       ENDDO
+
+       DO  k = nzb+1, nzb_max
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography. 
+          div = ( ( ( u_comp(k) + gu ) * ( ibit27 + ibit28 + ibit29 )         &
+                  - ( u(k+1,j,i) + u(k,j,i)   )                               & 
+                                    * ( IBITS(advc_flags_1(k,j,i-1),27,1)     &
+                                      + IBITS(advc_flags_1(k,j,i-1),28,1)     &
+                                      + IBITS(advc_flags_1(k,j,i-1),29,1)     &
+                                      )                                       &
+                  ) * ddx                                                     &
+              +   ( ( v_comp(k) + gv ) * ( ibit30 + ibit31 + ibit32 )         & 
+                  - ( v(k+1,j,i) + v(k,j,i)   )                               &
+                                    * ( IBITS(advc_flags_1(k,j-1,i),30,1)     &
+                                      + IBITS(advc_flags_1(k,j-1,i),31,1)     &
+                                      + IBITS(advc_flags_2(k,j-1,i),0,1)      &
+                                      )                                       &
+                  ) * ddy                                                     &
+              +   ( w_comp(k)               * rho_air(k+1)                    &
+                                            * ( ibit33 + ibit34 + ibit35 )    &
+                - ( w(k,j,i) + w(k-1,j,i) ) * rho_air(k)                      &
+                                    * ( IBITS(advc_flags_2(k-1,j,i),1,1)      &
+                                      + IBITS(advc_flags_2(k-1,j,i),2,1)      &
+                                      + IBITS(advc_flags_2(k-1,j,i),3,1)      &
+                                      )                                       & 
+                  ) * drho_air_zw(k) * ddzu(k+1)                              &
+                ) * 0.5_wp
+
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                      ( flux_r(k) + diss_r(k)                                 &
+                    -   flux_l_w(k,j,tn) - diss_l_w(k,j,tn)   ) * ddx         &
+                    + ( flux_n(k) + diss_n(k)                                 &
+                    -   flux_s_w(k,tn) - diss_s_w(k,tn)       ) * ddy         &
+                    + ( ( flux_t(k) + diss_t(k) )                             &
+                    -   ( flux_d    + diss_d    )                             &
+                                              ) * drho_air_zw(k) * ddzu(k+1)  &
+                                      ) + div * w(k,j,i)
+
+          flux_l_w(k,j,tn) = flux_r(k)
+          diss_l_w(k,j,tn) = diss_r(k)
+          flux_s_w(k,tn)   = flux_n(k)
+          diss_s_w(k,tn)   = diss_n(k)
+!
+!--       Statistical Evaluation of w'w'.
+          sums_ws2_ws_l(k,tn)  = sums_ws2_ws_l(k,tn)                          &
+                      + ( flux_t(k)                                           &
+                       * ( w_comp(k) - 2.0_wp * hom(k,1,3,0)                ) &
+                       / ( w_comp(k) + SIGN( 1.0E-20_wp, w_comp(k) )        ) &
+                        + diss_t(k)                                           &
+                       *   ABS( w_comp(k) - 2.0_wp * hom(k,1,3,0)           ) &
+                       / ( ABS( w_comp(k) ) + 1.0E-20_wp                    ) &
+                        ) *   weight_substep(intermediate_timestep_count)
+
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          u_comp(k) = u(k+1,j,i+1) + u(k,j,i+1) - gu
+          flux_r(k) = u_comp(k) * (                                           &
+                      37.0_wp * ( w(k,j,i+1) + w(k,j,i)   )                   &
+                    -  8.0_wp * ( w(k,j,i+2) + w(k,j,i-1) )                   &
+                    +           ( w(k,j,i+3) + w(k,j,i-2) ) ) * adv_mom_5
+
+          diss_r(k) = - ABS( u_comp(k) ) * (                                  &
+                      10.0_wp * ( w(k,j,i+1) - w(k,j,i)   )                   &
+                    -  5.0_wp * ( w(k,j,i+2) - w(k,j,i-1) )                   &
+                    +           ( w(k,j,i+3) - w(k,j,i-2) ) ) * adv_mom_5
+
+          v_comp(k) = v(k+1,j+1,i) + v(k,j+1,i) - gv
+          flux_n(k) = v_comp(k) * (                                           &
+                      37.0_wp * ( w(k,j+1,i) + w(k,j,i)   )                   &
+                    -  8.0_wp * ( w(k,j+2,i) + w(k,j-1,i) )                   &
+                    +           ( w(k,j+3,i) + w(k,j-2,i) ) ) * adv_mom_5
+
+          diss_n(k) = - ABS( v_comp(k) ) * (                                  &
+                      10.0_wp * ( w(k,j+1,i) - w(k,j,i)   )                   &
+                    -  5.0_wp * ( w(k,j+2,i) - w(k,j-1,i) )                   &
+                    +           ( w(k,j+3,i) - w(k,j-2,i) ) ) * adv_mom_5
+!
+!--       k index has to be modified near bottom and top, else array
+!--       subscripts will be exceeded.
+          ibit35 = IBITS(advc_flags_2(k,j,i),3,1)
+          ibit34 = IBITS(advc_flags_2(k,j,i),2,1)
+          ibit33 = IBITS(advc_flags_2(k,j,i),1,1)
+
+          k_ppp = k + 3 * ibit35
+          k_pp  = k + 2 * ( 1 - ibit33  )
+          k_mm  = k - 2 * ibit35
+
+          w_comp(k) = w(k+1,j,i) + w(k,j,i)
+          flux_t(k) = w_comp(k) * rho_air(k+1) * (                            &
+                     ( 37.0_wp * ibit35 * adv_mom_5                           &
+                  +     7.0_wp * ibit34 * adv_mom_3                           &
+                  +              ibit33 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( w(k+1,j,i)  + w(k,j,i)     )                &
+              -      (  8.0_wp * ibit35 * adv_mom_5                           &
+                  +              ibit34 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( w(k_pp,j,i)  + w(k-1,j,i)  )                &
+              +      (           ibit35 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( w(k_ppp,j,i) + w(k_mm,j,i) )                &
+                                                 )
+
+          diss_t(k) = - ABS( w_comp(k) ) * rho_air(k+1) * (                   &
+                     ( 10.0_wp * ibit35 * adv_mom_5                           &
+                  +     3.0_wp * ibit34 * adv_mom_3                           &
+                  +              ibit33 * adv_mom_1                           &
+                     ) *                                                      &
+                                ( w(k+1,j,i)   - w(k,j,i)    )                &
+              -      (  5.0_wp * ibit35 * adv_mom_5                           &
+                  +              ibit34 * adv_mom_3                           &
+                     ) *                                                      &
+                                ( w(k_pp,j,i)  - w(k-1,j,i)  )                &
+              +      (           ibit35 * adv_mom_5                           &
+                     ) *                                                      &
+                                ( w(k_ppp,j,i) - w(k_mm,j,i) )                &
+                                                          )
+       ENDDO
+
+       DO  k = nzb_max+1, nzt
+
+          flux_d    = flux_t(k-1)
+          diss_d    = diss_t(k-1)
+!
+!--       Calculate the divergence of the velocity field. A respective
+!--       correction is needed to overcome numerical instabilities introduced
+!--       by a not sufficient reduction of divergences near topography.
+          div = ( ( u_comp(k) + gu - ( u(k+1,j,i) + u(k,j,i)   ) ) * ddx      &
+              +   ( v_comp(k) + gv - ( v(k+1,j,i) + v(k,j,i)   ) ) * ddy      &
+              +   ( w_comp(k)               * rho_air(k+1) -                  &
+                  ( w(k,j,i) + w(k-1,j,i) ) * rho_air(k)                      &
+                  ) * drho_air_zw(k) * ddzu(k+1)                              &
+                ) * 0.5_wp
+
+          tend(k,j,i) = tend(k,j,i) - (                                       &
+                      ( flux_r(k) + diss_r(k)                                 &
+                    -   flux_l_w(k,j,tn) - diss_l_w(k,j,tn)   ) * ddx         &
+                    + ( flux_n(k) + diss_n(k)                                 &
+                    -   flux_s_w(k,tn) - diss_s_w(k,tn)       ) * ddy         &
+                    + ( ( flux_t(k) + diss_t(k) )                             &
+                    -   ( flux_d    + diss_d    )                             &
+                                              ) * drho_air_zw(k) * ddzu(k+1)  &
+                                      ) + div * w(k,j,i)
+
+          flux_l_w(k,j,tn) = flux_r(k)
+          diss_l_w(k,j,tn) = diss_r(k)
+          flux_s_w(k,tn)   = flux_n(k)
+          diss_s_w(k,tn)   = diss_n(k)
+!
+!--       Statistical Evaluation of w'w'.
+          sums_ws2_ws_l(k,tn)  = sums_ws2_ws_l(k,tn)                          &
+                      + ( flux_t(k)                                           &
+                       * ( w_comp(k) - 2.0_wp * hom(k,1,3,0)                ) &
+                       / ( w_comp(k) + SIGN( 1.0E-20_wp, w_comp(k) )        ) &
+                        + diss_t(k)                                           &
+                       *   ABS( w_comp(k) - 2.0_wp * hom(k,1,3,0)           ) &
+                       / ( ABS( w_comp(k) ) + 1.0E-20_wp                    ) &
+                        ) *   weight_substep(intermediate_timestep_count)
+
+       ENDDO
+
+
+    END SUBROUTINE advec_w_ws_ij
+    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Scalar advection - Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_s_ws( sk, sk_char )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, drho_air, rho_air_zw, tend, u, u_stokes_zu, v,         &
+                  v_stokes_zu, w
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans 
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max,    &
+                  nzt, advc_flags_1
+           
+       USE kinds
+       
+       USE salsa_util_mod,                                                     &
+           ONLY:  sums_salsa_ws_l      
+       
+       USE statistics,                                                         &
+           ONLY:  hom, sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l,       &
+                  sums_wsqcs_ws_l, sums_wsqrs_ws_l, sums_wsncs_ws_l,           &
+                  sums_wsnrs_ws_l, sums_wsss_ws_l, weight_substep  
+                  
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN = *), INTENT(IN)    ::  sk_char !<
+       
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  ibit0  !<
+       INTEGER(iwp) ::  ibit1  !<
+       INTEGER(iwp) ::  ibit2  !<
+       INTEGER(iwp) ::  ibit3  !<
+       INTEGER(iwp) ::  ibit4  !<
+       INTEGER(iwp) ::  ibit5  !<
+       INTEGER(iwp) ::  ibit6  !<
+       INTEGER(iwp) ::  ibit7  !<
+       INTEGER(iwp) ::  ibit8  !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_mm   !<
+       INTEGER(iwp) ::  k_pp   !<
+       INTEGER(iwp) ::  k_ppp  !<
+       INTEGER(iwp) ::  tn = 0 !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sk !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  sk !<
+#endif
+
+       REAL(wp) ::  diss_d !<
+       REAL(wp) ::  div    !<
+       REAL(wp) ::  flux_d !<
+       REAL(wp) ::  u_comp !<
+       REAL(wp) ::  v_comp !<
+       
+       REAL(wp), DIMENSION(nzb:nzt)   ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt)   ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt)   ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt)   ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt)   ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt)   ::  flux_t !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt) ::  swap_diss_y_local !<
+       REAL(wp), DIMENSION(nzb+1:nzt) ::  swap_flux_y_local !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_diss_x_local !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_flux_x_local !<
+        
+
+!
+!--    Compute the fluxes for the whole left boundary of the processor domain.
+       i = nxl
+       DO  j = nys, nyn
+
+          DO  k = nzb+1, nzb_max
+
+             ibit2 = IBITS(advc_flags_1(k,j,i-1),2,1)
+             ibit1 = IBITS(advc_flags_1(k,j,i-1),1,1)
+             ibit0 = IBITS(advc_flags_1(k,j,i-1),0,1)
+
+             u_comp                 = u(k,j,i) - u_gtrans + u_stokes_zu(k)
+             swap_flux_x_local(k,j) = u_comp * (                              &
+                                             ( 37.0_wp * ibit2 * adv_sca_5    &
+                                          +     7.0_wp * ibit1 * adv_sca_3    &
+                                          +              ibit0 * adv_sca_1    &
+                                             ) *                              &
+                                          ( sk(k,j,i)   + sk(k,j,i-1)    )    &
+                                      -      (  8.0_wp * ibit2 * adv_sca_5    &
+                                          +              ibit1 * adv_sca_3    &
+                                             ) *                              &
+                                          ( sk(k,j,i+1) + sk(k,j,i-2)    )    &
+                                      +      (           ibit2 * adv_sca_5    & 
+                                             ) *                              &
+                                          ( sk(k,j,i+2) + sk(k,j,i-3)    )    &
+                                               )
+
+              swap_diss_x_local(k,j) = -ABS( u_comp ) * (                     &
+                                             ( 10.0_wp * ibit2 * adv_sca_5    &
+                                          +     3.0_wp * ibit1 * adv_sca_3    &
+                                          +              ibit0 * adv_sca_1    &
+                                             ) *                              &
+                                          ( sk(k,j,i)   - sk(k,j,i-1) )       &
+                                      -      (  5.0_wp * ibit2 * adv_sca_5    &
+                                          +              ibit1 * adv_sca_3    &
+                                             ) *                              &
+                                         ( sk(k,j,i+1) - sk(k,j,i-2)  )       &
+                                      +      (           ibit2 * adv_sca_5    &
+                                             ) *                              &
+                                          ( sk(k,j,i+2) - sk(k,j,i-3) )       &
+                                                        )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp                 = u(k,j,i) - u_gtrans + u_stokes_zu(k)
+             swap_flux_x_local(k,j) = u_comp * (                              &
+                                      37.0_wp * ( sk(k,j,i)   + sk(k,j,i-1) ) &
+                                    -  8.0_wp * ( sk(k,j,i+1) + sk(k,j,i-2) ) &
+                                    +           ( sk(k,j,i+2) + sk(k,j,i-3) ) &
+                                               ) * adv_sca_5
+
+             swap_diss_x_local(k,j) = -ABS( u_comp ) * (                      &
+                                      10.0_wp * ( sk(k,j,i)   - sk(k,j,i-1) ) &
+                                    -  5.0_wp * ( sk(k,j,i+1) - sk(k,j,i-2) ) &
+                                    +           ( sk(k,j,i+2) - sk(k,j,i-3) ) &
+                                                       ) * adv_sca_5
+
+          ENDDO
+
+       ENDDO
+
+       DO  i = nxl, nxr
+
+          j = nys
+          DO  k = nzb+1, nzb_max
+
+             ibit5 = IBITS(advc_flags_1(k,j-1,i),5,1)
+             ibit4 = IBITS(advc_flags_1(k,j-1,i),4,1)
+             ibit3 = IBITS(advc_flags_1(k,j-1,i),3,1)
+
+             v_comp               = v(k,j,i) - v_gtrans + v_stokes_zu(k)
+             swap_flux_y_local(k) = v_comp * (                                &
+                                             ( 37.0_wp * ibit5 * adv_sca_5    &
+                                          +     7.0_wp * ibit4 * adv_sca_3    &
+                                          +              ibit3 * adv_sca_1    &
+                                             ) *                              &
+                                         ( sk(k,j,i)  + sk(k,j-1,i)     )     &
+                                       -     (  8.0_wp * ibit5 * adv_sca_5    &
+                                          +              ibit4 * adv_sca_3    &
+                                              ) *                             &
+                                         ( sk(k,j+1,i) + sk(k,j-2,i)    )     &
+                                      +      (           ibit5 * adv_sca_5    &
+                                             ) *                              &
+                                        ( sk(k,j+2,i) + sk(k,j-3,i)     )     &
+                                             )
+
+             swap_diss_y_local(k) = -ABS( v_comp ) * (                        &
+                                             ( 10.0_wp * ibit5 * adv_sca_5    &
+                                          +     3.0_wp * ibit4 * adv_sca_3    &
+                                          +              ibit3 * adv_sca_1    &
+                                             ) *                              &
+                                          ( sk(k,j,i)   - sk(k,j-1,i)    )    &
+                                      -      (  5.0_wp * ibit5 * adv_sca_5    &
+                                          +              ibit4 * adv_sca_3    &
+                                             ) *                              &
+                                          ( sk(k,j+1,i) - sk(k,j-2,i)    )    &
+                                      +      (           ibit5 * adv_sca_5    &
+                                             ) *                              &
+                                          ( sk(k,j+2,i) - sk(k,j-3,i)    )    &
+                                                     )
+
+          ENDDO
+!
+!--       Above to the top of the highest topography. No degradation necessary.
+          DO  k = nzb_max+1, nzt
+
+             v_comp               = v(k,j,i) - v_gtrans + v_stokes_zu(k)
+             swap_flux_y_local(k) = v_comp * (                               &
+                                    37.0_wp * ( sk(k,j,i)   + sk(k,j-1,i) )  &
+                                  -  8.0_wp * ( sk(k,j+1,i) + sk(k,j-2,i) )  &
+                                  +           ( sk(k,j+2,i) + sk(k,j-3,i) )  &
+                                             ) * adv_sca_5
+             swap_diss_y_local(k) = -ABS( v_comp ) * (                       &
+                                    10.0_wp * ( sk(k,j,i)   - sk(k,j-1,i) )  &
+                                  -  5.0_wp * ( sk(k,j+1,i) - sk(k,j-2,i) )  &
+                                  +             sk(k,j+2,i) - sk(k,j-3,i)    &
+                                                      ) * adv_sca_5
+
+          ENDDO
+
+          DO  j = nys, nyn
+
+             flux_t(0) = 0.0_wp
+             diss_t(0) = 0.0_wp
+             flux_d    = 0.0_wp
+             diss_d    = 0.0_wp
+
+             DO  k = nzb+1, nzb_max
+
+                ibit2 = IBITS(advc_flags_1(k,j,i),2,1)
+                ibit1 = IBITS(advc_flags_1(k,j,i),1,1)
+                ibit0 = IBITS(advc_flags_1(k,j,i),0,1)
+
+                u_comp    = u(k,j,i+1) - u_gtrans + u_stokes_zu(k)
+                flux_r(k) = u_comp * (                                        &
+                          ( 37.0_wp * ibit2 * adv_sca_5                       &
+                      +      7.0_wp * ibit1 * adv_sca_3                       &
+                      +               ibit0 * adv_sca_1                       &
+                          ) *                                                 &
+                             ( sk(k,j,i+1) + sk(k,j,i)   )                    &
+                   -      (  8.0_wp * ibit2 * adv_sca_5                       &
+                       +              ibit1 * adv_sca_3                       &
+                          ) *                                                 &
+                             ( sk(k,j,i+2) + sk(k,j,i-1) )                    &
+                   +      (           ibit2 * adv_sca_5                       &
+                          ) *                                                 &
+                             ( sk(k,j,i+3) + sk(k,j,i-2) )                    &
+                                     )
+
+                diss_r(k) = -ABS( u_comp ) * (                                &
+                          ( 10.0_wp * ibit2 * adv_sca_5                       &
+                       +     3.0_wp * ibit1 * adv_sca_3                       &
+                       +              ibit0 * adv_sca_1                       &
+                          ) *                                                 &
+                             ( sk(k,j,i+1) - sk(k,j,i)   )                    &
+                   -      (  5.0_wp * ibit2 * adv_sca_5                       &
+                       +              ibit1 * adv_sca_3                       &
+                          ) *                                                 &
+                             ( sk(k,j,i+2) - sk(k,j,i-1) )                    &
+                   +      (           ibit2 * adv_sca_5                       &
+                          ) *                                                 &
+                             ( sk(k,j,i+3) - sk(k,j,i-2) )                    &
+                                             )
+
+                ibit5 = IBITS(advc_flags_1(k,j,i),5,1)
+                ibit4 = IBITS(advc_flags_1(k,j,i),4,1)
+                ibit3 = IBITS(advc_flags_1(k,j,i),3,1)
+
+                v_comp    = v(k,j+1,i) - v_gtrans + v_stokes_zu(k)
+                flux_n(k) = v_comp * (                                        &
+                          ( 37.0_wp * ibit5 * adv_sca_5                       &
+                       +     7.0_wp * ibit4 * adv_sca_3                       &
+                       +              ibit3 * adv_sca_1                       &
+                          ) *                                                 &
+                             ( sk(k,j+1,i) + sk(k,j,i)   )                    &
+                   -      (  8.0_wp * ibit5 * adv_sca_5                       &
+                       +              ibit4 * adv_sca_3                       &
+                          ) *                                                 &
+                             ( sk(k,j+2,i) + sk(k,j-1,i) )                    &
+                   +      (           ibit5 * adv_sca_5                       &
+                          ) *                                                 &
+                             ( sk(k,j+3,i) + sk(k,j-2,i) )                    &
+                                     )
+
+                diss_n(k) = -ABS( v_comp ) * (                                &
+                          ( 10.0_wp * ibit5 * adv_sca_5                       &
+                       +     3.0_wp * ibit4 * adv_sca_3                       &
+                       +              ibit3 * adv_sca_1                       &
+                          ) *                                                 &
+                             ( sk(k,j+1,i) - sk(k,j,i)    )                   &
+                   -      (  5.0_wp * ibit5 * adv_sca_5                       &
+                       +              ibit4 * adv_sca_3                       &
+                          ) *                                                 &
+                             ( sk(k,j+2,i) - sk(k,j-1,i)  )                   &
+                   +      (           ibit5 * adv_sca_5                       &
+                          ) *                                                 &
+                             ( sk(k,j+3,i) - sk(k,j-2,i) )                    &
+                                             )
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit8 = IBITS(advc_flags_1(k,j,i),8,1)
+                ibit7 = IBITS(advc_flags_1(k,j,i),7,1)
+                ibit6 = IBITS(advc_flags_1(k,j,i),6,1)
+
+                k_ppp = k + 3 * ibit8
+                k_pp  = k + 2 * ( 1 - ibit6  )
+                k_mm  = k - 2 * ibit8
+
+
+                flux_t(k) = w(k,j,i) * rho_air_zw(k) * (                      &
+                           ( 37.0_wp * ibit8 * adv_sca_5                      &
+                        +     7.0_wp * ibit7 * adv_sca_3                      &
+                        +           ibit6 * adv_sca_1                         &
+                           ) *                                                &
+                                   ( sk(k+1,j,i)  + sk(k,j,i)    )            &
+                    -      (  8.0_wp * ibit8 * adv_sca_5                      &
+                        +              ibit7 * adv_sca_3                      &
+                           ) *                                                &
+                                   ( sk(k_pp,j,i) + sk(k-1,j,i)  )            &
+                    +      (           ibit8 * adv_sca_5                      &
+                           ) *     ( sk(k_ppp,j,i)+ sk(k_mm,j,i) )            &
+                                       )
+
+                diss_t(k) = -ABS( w(k,j,i) ) * rho_air_zw(k) * (              &
+                           ( 10.0_wp * ibit8 * adv_sca_5                      &
+                        +     3.0_wp * ibit7 * adv_sca_3                      &
+                        +              ibit6 * adv_sca_1                      &
+                           ) *                                                &
+                                   ( sk(k+1,j,i)   - sk(k,j,i)    )           &
+                    -      (  5.0_wp * ibit8 * adv_sca_5                      &
+                        +              ibit7 * adv_sca_3                      &
+                           ) *                                                &
+                                   ( sk(k_pp,j,i)  - sk(k-1,j,i)  )           &
+                    +      (           ibit8 * adv_sca_5                      &
+                           ) *                                                &
+                                   ( sk(k_ppp,j,i) - sk(k_mm,j,i) )           &
+                                               )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div   =   ( u(k,j,i+1) * ( ibit0 + ibit1 + ibit2 )             &
+                          - u(k,j,i)   * ( IBITS(advc_flags_1(k,j,i-1),0,1)    &
+                                         + IBITS(advc_flags_1(k,j,i-1),1,1)    &
+                                         + IBITS(advc_flags_1(k,j,i-1),2,1)    &
+                                         )                                     &
+                          ) * ddx                                              &
+                        + ( v(k,j+1,i) * ( ibit3 + ibit4 + ibit5 )             &
+                          - v(k,j,i)   * ( IBITS(advc_flags_1(k,j-1,i),3,1)    &
+                                         + IBITS(advc_flags_1(k,j-1,i),4,1)    &
+                                         + IBITS(advc_flags_1(k,j-1,i),5,1)    &
+                                         )                                     &
+                          ) * ddy                                              &
+                        + ( w(k,j,i) * rho_air_zw(k) *                         &
+                                         ( ibit6 + ibit7 + ibit8 )             &
+                          - w(k-1,j,i) * rho_air_zw(k-1) *                     &
+                                         ( IBITS(advc_flags_1(k-1,j,i),6,1)    &
+                                         + IBITS(advc_flags_1(k-1,j,i),7,1)    &
+                                         + IBITS(advc_flags_1(k-1,j,i),8,1)    &
+                                         )                                     &      
+                          ) * drho_air(k) * ddzw(k)
+
+
+                tend(k,j,i) = tend(k,j,i) - (                                 &
+                        ( flux_r(k) + diss_r(k) - swap_flux_x_local(k,j) -    &
+                          swap_diss_x_local(k,j)            ) * ddx           &
+                      + ( flux_n(k) + diss_n(k) - swap_flux_y_local(k)   -    &
+                          swap_diss_y_local(k)              ) * ddy           &
+                      + ( ( flux_t(k) + diss_t(k) ) -                         &
+                          ( flux_d    + diss_d    )                           &
+                                                    ) * drho_air(k) * ddzw(k) &
+                                            ) + sk(k,j,i) * div
+
+                swap_flux_y_local(k)   = flux_n(k)
+                swap_diss_y_local(k)   = diss_n(k)
+                swap_flux_x_local(k,j) = flux_r(k)
+                swap_diss_x_local(k,j) = diss_r(k)
+                flux_d                 = flux_t(k)
+                diss_d                 = diss_t(k)
+
+             ENDDO
+
+             DO  k = nzb_max+1, nzt
+
+                u_comp    = u(k,j,i+1) - u_gtrans + u_stokes_zu(k)
+                flux_r(k) = u_comp * (                                        &
+                      37.0_wp * ( sk(k,j,i+1) + sk(k,j,i)   )                 &
+                    -  8.0_wp * ( sk(k,j,i+2) + sk(k,j,i-1) )                 &
+                    +           ( sk(k,j,i+3) + sk(k,j,i-2) ) ) * adv_sca_5
+                diss_r(k) = -ABS( u_comp ) * (                                &
+                      10.0_wp * ( sk(k,j,i+1) - sk(k,j,i)   )                 &
+                    -  5.0_wp * ( sk(k,j,i+2) - sk(k,j,i-1) )                 &
+                    +           ( sk(k,j,i+3) - sk(k,j,i-2) ) ) * adv_sca_5
+
+                v_comp    = v(k,j+1,i) - v_gtrans + v_stokes_zu(k)
+                flux_n(k) = v_comp * (                                        &
+                      37.0_wp * ( sk(k,j+1,i) + sk(k,j,i)   )                 &
+                    -  8.0_wp * ( sk(k,j+2,i) + sk(k,j-1,i) )                 &
+                    +           ( sk(k,j+3,i) + sk(k,j-2,i) ) ) * adv_sca_5
+                diss_n(k) = -ABS( v_comp ) * (                                &
+                      10.0_wp * ( sk(k,j+1,i) - sk(k,j,i)   )                 &
+                    -  5.0_wp * ( sk(k,j+2,i) - sk(k,j-1,i) )                 &
+                    +           ( sk(k,j+3,i) - sk(k,j-2,i) ) ) * adv_sca_5
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit8 = IBITS(advc_flags_1(k,j,i),8,1)
+                ibit7 = IBITS(advc_flags_1(k,j,i),7,1)
+                ibit6 = IBITS(advc_flags_1(k,j,i),6,1)
+
+                k_ppp = k + 3 * ibit8
+                k_pp  = k + 2 * ( 1 - ibit6  )
+                k_mm  = k - 2 * ibit8
+
+
+                flux_t(k) = w(k,j,i) * rho_air_zw(k) * (                      &
+                           ( 37.0_wp * ibit8 * adv_sca_5                      &
+                        +     7.0_wp * ibit7 * adv_sca_3                      &
+                        +              ibit6 * adv_sca_1                      &
+                           ) *                                                &
+                                   ( sk(k+1,j,i)  + sk(k,j,i)     )           &
+                    -      (  8.0_wp * ibit8 * adv_sca_5                      &
+                        +              ibit7 * adv_sca_3                      &
+                           ) *                                                &
+                                   ( sk(k_pp,j,i) + sk(k-1,j,i)   )           &
+                    +      (           ibit8 * adv_sca_5                      &
+                           ) *     ( sk(k_ppp,j,i)+ sk(k_mm,j,i)  )           &
+                                       )
+
+                diss_t(k) = -ABS( w(k,j,i) ) * rho_air_zw(k) * (              &
+                           ( 10.0_wp * ibit8 * adv_sca_5                      &
+                        +     3.0_wp * ibit7 * adv_sca_3                      &
+                        +              ibit6 * adv_sca_1                      &
+                           ) *                                                &
+                                   ( sk(k+1,j,i)   - sk(k,j,i)    )           &
+                    -      (  5.0_wp * ibit8 * adv_sca_5                      &
+                        +              ibit7 * adv_sca_3                      &
+                           ) *                                                &
+                                   ( sk(k_pp,j,i)  - sk(k-1,j,i)  )           &
+                    +      (           ibit8 * adv_sca_5                      &
+                           ) *                                                &
+                                   ( sk(k_ppp,j,i) - sk(k_mm,j,i) )           &
+                                               )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities introduced
+!--             by a not sufficient reduction of divergences near topography.
+                div         =   ( u(k,j,i+1) - u(k,j,i)   ) * ddx              &
+                              + ( v(k,j+1,i) - v(k,j,i)   ) * ddy              &
+                              + ( w(k,j,i)   * rho_air_zw(k) -                 &
+                                  w(k-1,j,i) * rho_air_zw(k-1)                 &
+                                ) * drho_air(k) * ddzw(k)
+
+                tend(k,j,i) = tend(k,j,i) - (                                 &
+                        ( flux_r(k) + diss_r(k) - swap_flux_x_local(k,j) -    &
+                          swap_diss_x_local(k,j)            ) * ddx           &
+                      + ( flux_n(k) + diss_n(k) - swap_flux_y_local(k)   -    &
+                          swap_diss_y_local(k)              ) * ddy           &
+                      + ( ( flux_t(k) + diss_t(k) ) -                         &
+                          ( flux_d    + diss_d    )                           &
+                                                    ) * drho_air(k) * ddzw(k) &
+                                            ) + sk(k,j,i) * div
+
+                swap_flux_y_local(k)   = flux_n(k)
+                swap_diss_y_local(k)   = diss_n(k)
+                swap_flux_x_local(k,j) = flux_r(k)
+                swap_diss_x_local(k,j) = diss_r(k)
+                flux_d                 = flux_t(k)
+                diss_d                 = diss_t(k)
+
+             ENDDO
+!
+!--          Evaluation of statistics. 
+             SELECT CASE ( sk_char )
+
+                 CASE ( 'pt' )
+                    DO  k = nzb, nzt
+                       sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn)           &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 'sa' )
+                    DO  k = nzb, nzt
+                       sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn)           &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 'q' )
+                    DO  k = nzb, nzt
+                       sums_wsqs_ws_l(k,tn)  = sums_wsqs_ws_l(k,tn)            &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 'qc' )
+                    DO  k = nzb, nzt
+                       sums_wsqcs_ws_l(k,tn)  = sums_wsqcs_ws_l(k,tn)          &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 'qr' )
+                    DO  k = nzb, nzt
+                       sums_wsqrs_ws_l(k,tn)  = sums_wsqrs_ws_l(k,tn)          &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 'nc' )
+                    DO  k = nzb, nzt
+                       sums_wsncs_ws_l(k,tn)  = sums_wsncs_ws_l(k,tn)          &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 'nr' )
+                    DO  k = nzb, nzt
+                       sums_wsnrs_ws_l(k,tn)  = sums_wsnrs_ws_l(k,tn)          &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO
+                 CASE ( 's' )
+                    DO  k = nzb, nzt
+                       sums_wsss_ws_l(k,tn)  = sums_wsss_ws_l(k,tn)            &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                    ENDDO  
+     
+                 CASE ( 'aerosol_mass', 'aerosol_number', 'salsa_gas' )
+                     DO  k = nzb, nzt
+                        sums_salsa_ws_l(k,tn)  = sums_salsa_ws_l(k,tn)         &
+                          + ( flux_t(k)                                        &
+                                / ( w(k,j,i) + SIGN( 1.0E-20_wp, w(k,j,i) ) )  &
+                                * ( w(k,j,i) - hom(k,1,3,0)                 )  &
+                            + diss_t(k)                                        &
+                                / ( ABS(w(k,j,i)) + 1.0E-20_wp              )  &
+                                *   ABS(w(k,j,i) - hom(k,1,3,0)             )  &
+                            ) * weight_substep(intermediate_timestep_count)
+                     ENDDO                    
+                                   
+
+              END SELECT
+
+         ENDDO
+      ENDDO
+
+    END SUBROUTINE advec_s_ws
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Advection of u - Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_u_ws
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, drho_air, tend, u, v, w, rho_air_zw
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxlu, nxr, nyn, nys, nzb, nzb_max, nzt, advc_flags_1
+           
+       USE kinds
+       
+       USE statistics,                                                         &
+           ONLY:  hom, sums_us2_ws_l, sums_wsus_ws_l, weight_substep
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  ibit9  !<
+       INTEGER(iwp) ::  ibit10 !<
+       INTEGER(iwp) ::  ibit11 !<
+       INTEGER(iwp) ::  ibit12 !<
+       INTEGER(iwp) ::  ibit13 !<
+       INTEGER(iwp) ::  ibit14 !<
+       INTEGER(iwp) ::  ibit15 !<
+       INTEGER(iwp) ::  ibit16 !<
+       INTEGER(iwp) ::  ibit17 !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_mm   !<
+       INTEGER(iwp) ::  k_pp   !<
+       INTEGER(iwp) ::  k_ppp  !<
+       INTEGER(iwp) ::  tn = 0 !<
+       
+       REAL(wp)    ::  diss_d !<
+       REAL(wp)    ::  div    !<
+       REAL(wp)    ::  flux_d !<
+       REAL(wp)    ::  gu     !<
+       REAL(wp)    ::  gv     !<
+       REAL(wp)    ::  v_comp !<
+       REAL(wp)    ::  w_comp !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt) ::  swap_diss_y_local_u !<
+       REAL(wp), DIMENSION(nzb+1:nzt) ::  swap_flux_y_local_u !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_diss_x_local_u !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_flux_x_local_u !<
+       
+       REAL(wp), DIMENSION(nzb:nzt) ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  flux_t !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  u_comp !<
+ 
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+
+!
+!--    Compute the fluxes for the whole left boundary of the processor domain.
+       i = nxlu
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzb_max
+
+             ibit11 = IBITS(advc_flags_1(k,j,i-1),11,1)
+             ibit10 = IBITS(advc_flags_1(k,j,i-1),10,1)
+             ibit9  = IBITS(advc_flags_1(k,j,i-1),9,1)
+
+             u_comp(k)                = u(k,j,i) + u(k,j,i-1) - gu
+             swap_flux_x_local_u(k,j) = u_comp(k) * (                          &
+                                       ( 37.0_wp * ibit11 * adv_mom_5             &
+                                    +     7.0_wp * ibit10 * adv_mom_3             &
+                                    +              ibit9  * adv_mom_1             &
+                                       ) *                                     &
+                                     ( u(k,j,i)   + u(k,j,i-1) )               &
+                                -      (  8.0_wp * ibit11 * adv_mom_5             &
+                                    +              ibit10 * adv_mom_3             &
+                                       ) *                                     &
+                                     ( u(k,j,i+1) + u(k,j,i-2) )               &
+                                +      (           ibit11 * adv_mom_5             &
+                                       ) *                                     &
+                                     ( u(k,j,i+2) + u(k,j,i-3) )               &
+                                                   )
+
+              swap_diss_x_local_u(k,j) = - ABS( u_comp(k) ) * (                &
+                                       ( 10.0_wp * ibit11 * adv_mom_5             &
+                                    +     3.0_wp * ibit10 * adv_mom_3             &
+                                    +              ibit9  * adv_mom_1             &
+                                       ) *                                     &
+                                     ( u(k,j,i)   - u(k,j,i-1) )               &
+                                -      (  5.0_wp * ibit11 * adv_mom_5             &
+                                    +              ibit10 * adv_mom_3             &
+                                       ) *                                     &
+                                     ( u(k,j,i+1) - u(k,j,i-2) )               &
+                                +      (           ibit11 * adv_mom_5             &
+                                       ) *                                     &
+                                     ( u(k,j,i+2) - u(k,j,i-3) )               &
+                                                             )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp(k)         = u(k,j,i) + u(k,j,i-1) - gu
+             swap_flux_x_local_u(k,j) = u_comp(k) * (                          &
+                             37.0_wp * ( u(k,j,i) + u(k,j,i-1)   )                &
+                           -  8.0_wp * ( u(k,j,i+1) + u(k,j,i-2) )                &
+                           +           ( u(k,j,i+2) + u(k,j,i-3) ) ) * adv_mom_5
+             swap_diss_x_local_u(k,j) = - ABS(u_comp(k)) * (                   &
+                             10.0_wp * ( u(k,j,i) - u(k,j,i-1)   )                &
+                           -  5.0_wp * ( u(k,j,i+1) - u(k,j,i-2) )                &
+                           +           ( u(k,j,i+2) - u(k,j,i-3) ) ) * adv_mom_5
+
+          ENDDO
+       ENDDO
+
+       DO i = nxlu, nxr
+!       
+!--       The following loop computes the fluxes for the south boundary points
+          j = nys
+          DO  k = nzb+1, nzb_max
+
+             ibit14 = IBITS(advc_flags_1(k,j-1,i),14,1)
+             ibit13 = IBITS(advc_flags_1(k,j-1,i),13,1)
+             ibit12 = IBITS(advc_flags_1(k,j-1,i),12,1)
+
+             v_comp                 = v(k,j,i) + v(k,j,i-1) - gv
+             swap_flux_y_local_u(k) = v_comp * (                              &
+                                   ( 37.0_wp * ibit14 * adv_mom_5                &
+                                +     7.0_wp * ibit13 * adv_mom_3                &
+                                +              ibit12 * adv_mom_1                &
+                                   ) *                                        &
+                                     ( u(k,j,i)   + u(k,j-1,i) )              &
+                            -      (  8.0_wp * ibit14 * adv_mom_5                &
+                            +                  ibit13 * adv_mom_3                    &
+                                   ) *                                        &
+                                     ( u(k,j+1,i) + u(k,j-2,i) )              &
+                        +      (               ibit14 * adv_mom_5                    &
+                               ) *                                            &
+                                     ( u(k,j+2,i) + u(k,j-3,i) )              &
+                                               )
+
+             swap_diss_y_local_u(k) = - ABS ( v_comp ) * (                    &
+                                   ( 10.0_wp * ibit14 * adv_mom_5                &
+                                +     3.0_wp * ibit13 * adv_mom_3                &
+                                +              ibit12 * adv_mom_1                &
+                                   ) *                                        &
+                                     ( u(k,j,i)   - u(k,j-1,i) )              &
+                            -      (  5.0_wp * ibit14 * adv_mom_5                &
+                                +              ibit13 * adv_mom_3                &
+                                   ) *                                        &
+                                     ( u(k,j+1,i) - u(k,j-2,i) )              &
+                            +      (           ibit14 * adv_mom_5                &
+                                   ) *                                        &
+                                     ( u(k,j+2,i) - u(k,j-3,i) )              &
+                                                         )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             v_comp                 = v(k,j,i) + v(k,j,i-1) - gv
+             swap_flux_y_local_u(k) = v_comp * (                              &
+                           37.0_wp * ( u(k,j,i) + u(k,j-1,i)   )                 &
+                         -  8.0_wp * ( u(k,j+1,i) + u(k,j-2,i) )                 &
+                         +           ( u(k,j+2,i) + u(k,j-3,i) ) ) * adv_mom_5
+             swap_diss_y_local_u(k) = - ABS(v_comp) * (                       &
+                           10.0_wp * ( u(k,j,i) - u(k,j-1,i)   )                 &
+                         -  5.0_wp * ( u(k,j+1,i) - u(k,j-2,i) )                 &
+                         +           ( u(k,j+2,i) - u(k,j-3,i) ) ) * adv_mom_5
+
+          ENDDO
+!
+!--       Computation of interior fluxes and tendency terms
+          DO  j = nys, nyn
+
+             flux_t(0) = 0.0_wp
+             diss_t(0) = 0.0_wp
+             flux_d    = 0.0_wp
+             diss_d    = 0.0_wp
+
+             DO  k = nzb+1, nzb_max
+
+                ibit11 = IBITS(advc_flags_1(k,j,i),11,1)
+                ibit10 = IBITS(advc_flags_1(k,j,i),10,1)
+                ibit9  = IBITS(advc_flags_1(k,j,i),9,1)
+
+                u_comp(k) = u(k,j,i+1) + u(k,j,i)
+                flux_r(k) = ( u_comp(k) - gu ) * (                           &
+                          ( 37.0_wp * ibit11 * adv_mom_5                        &
+                       +     7.0_wp * ibit10 * adv_mom_3                        &
+                       +              ibit9  * adv_mom_1                        &
+                          ) *                                                &
+                                 ( u(k,j,i+1) + u(k,j,i)   )                 &
+                   -      (  8.0_wp * ibit11 * adv_mom_5                        &
+                       +              ibit10 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( u(k,j,i+2) + u(k,j,i-1) )                 &
+                   +      (           ibit11 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( u(k,j,i+3) + u(k,j,i-2) )                 &
+                                                 )
+
+                diss_r(k) = - ABS( u_comp(k) - gu ) * (                      &
+                          ( 10.0_wp * ibit11 * adv_mom_5                        &
+                       +     3.0_wp * ibit10 * adv_mom_3                        & 
+                       +              ibit9  * adv_mom_1                        &
+                          ) *                                                &
+                                 ( u(k,j,i+1) - u(k,j,i)  )                  &
+                   -      (  5.0_wp * ibit11 * adv_mom_5                        &
+                       +              ibit10 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( u(k,j,i+2) - u(k,j,i-1) )                 &
+                   +      (           ibit11 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( u(k,j,i+3) - u(k,j,i-2) )                 &
+                                                     )
+
+                ibit14 = IBITS(advc_flags_1(k,j,i),14,1)
+                ibit13 = IBITS(advc_flags_1(k,j,i),13,1)
+                ibit12 = IBITS(advc_flags_1(k,j,i),12,1)
+
+                v_comp    = v(k,j+1,i) + v(k,j+1,i-1) - gv
+                flux_n(k) = v_comp * (                                       &
+                          ( 37.0_wp * ibit14 * adv_mom_5                        &
+                       +     7.0_wp * ibit13 * adv_mom_3                        &
+                       +              ibit12 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( u(k,j+1,i) + u(k,j,i)   )                 &
+                   -      (  8.0_wp * ibit14 * adv_mom_5                        &
+                       +              ibit13 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( u(k,j+2,i) + u(k,j-1,i) )                 &
+                   +      (           ibit14 * adv_mom_5                        & 
+                          ) *                                                &
+                                 ( u(k,j+3,i) + u(k,j-2,i) )                 &
+                                                 )
+
+                diss_n(k) = - ABS ( v_comp ) * (                             &
+                          ( 10.0_wp * ibit14 * adv_mom_5                        &
+                       +     3.0_wp * ibit13 * adv_mom_3                        &
+                       +              ibit12 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( u(k,j+1,i) - u(k,j,i)  )                  &
+                   -      (  5.0_wp * ibit14 * adv_mom_5                        &
+                       +              ibit13 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( u(k,j+2,i) - u(k,j-1,i) )                 &
+                   +      (           ibit14 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( u(k,j+3,i) - u(k,j-2,i) )                 &
+                                                      )
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit17 = IBITS(advc_flags_1(k,j,i),17,1)
+                ibit16 = IBITS(advc_flags_1(k,j,i),16,1)
+                ibit15 = IBITS(advc_flags_1(k,j,i),15,1)
+
+                k_ppp = k + 3 * ibit17
+                k_pp  = k + 2 * ( 1 - ibit15  )
+                k_mm  = k - 2 * ibit17
+
+                w_comp    = w(k,j,i) + w(k,j,i-1)
+                flux_t(k) = w_comp * rho_air_zw(k) * (                       &
+                          ( 37.0_wp * ibit17 * adv_mom_5                        &
+                       +     7.0_wp * ibit16 * adv_mom_3                        &
+                       +              ibit15 * adv_mom_1                        & 
+                          ) *                                                &
+                             ( u(k+1,j,i)  + u(k,j,i)     )                  &
+                   -      (  8.0_wp * ibit17 * adv_mom_5                        &
+                       +              ibit16 * adv_mom_3                        &
+                          ) *                                                &
+                             ( u(k_pp,j,i) + u(k-1,j,i)   )                  &
+                   +      (           ibit17 * adv_mom_5                        &
+                          ) *                                                &
+                             ( u(k_ppp,j,i) + u(k_mm,j,i) )                  &
+                                      )
+
+                diss_t(k) = - ABS( w_comp ) * rho_air_zw(k) * (              &
+                          ( 10.0_wp * ibit17 * adv_mom_5                        &
+                       +     3.0_wp * ibit16 * adv_mom_3                        &
+                       +              ibit15 * adv_mom_1                        &
+                          ) *                                                &
+                             ( u(k+1,j,i)   - u(k,j,i)    )                  &
+                   -      (  5.0_wp * ibit17 * adv_mom_5                        &
+                       +              ibit16 * adv_mom_3                        &
+                          ) *                                                &
+                             ( u(k_pp,j,i)  - u(k-1,j,i)  )                  &
+                   +      (           ibit17 * adv_mom_5                        &
+                           ) *                                               &
+                             ( u(k_ppp,j,i) - u(k_mm,j,i) )                  &
+                                              )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div = ( ( u_comp(k) * ( ibit9 + ibit10 + ibit11 )             &
+                - ( u(k,j,i)   + u(k,j,i-1)   )                               &
+                                    * ( IBITS(advc_flags_1(k,j,i-1),9,1)      &
+                                      + IBITS(advc_flags_1(k,j,i-1),10,1)     &
+                                      + IBITS(advc_flags_1(k,j,i-1),11,1)     &
+                                      )                                       &
+                  ) * ddx                                                     &
+               +  ( ( v_comp + gv ) * ( ibit12 + ibit13 + ibit14 )            &
+                  - ( v(k,j,i)   + v(k,j,i-1 )  )                             &
+                                    * ( IBITS(advc_flags_1(k,j-1,i),12,1)     &
+                                      + IBITS(advc_flags_1(k,j-1,i),13,1)     &
+                                      + IBITS(advc_flags_1(k,j-1,i),14,1)     &
+                                      )                                       &
+                  ) * ddy                                                     &
+               +  ( w_comp * rho_air_zw(k) * ( ibit15 + ibit16 + ibit17 )     &
+                - ( w(k-1,j,i) + w(k-1,j,i-1) ) * rho_air_zw(k-1)             &
+                                    * ( IBITS(advc_flags_1(k-1,j,i),15,1)     &
+                                      + IBITS(advc_flags_1(k-1,j,i),16,1)     &
+                                      + IBITS(advc_flags_1(k-1,j,i),17,1)     &
+                                      )                                       &  
+                  ) * drho_air(k) * ddzw(k)                                   &
+                ) * 0.5_wp
+
+
+
+                tend(k,j,i) = tend(k,j,i) - (                                  &
+                 ( flux_r(k) + diss_r(k)                                       &
+               -   swap_flux_x_local_u(k,j) - swap_diss_x_local_u(k,j) ) * ddx &
+               + ( flux_n(k) + diss_n(k)                                       &
+               -   swap_flux_y_local_u(k)   - swap_diss_y_local_u(k)   ) * ddy &
+               + ( ( flux_t(k) + diss_t(k) )                                   &
+               -   ( flux_d    + diss_d    )                                   &
+                                                    ) * drho_air(k) * ddzw(k)  &
+                                           ) + div * u(k,j,i)
+
+                swap_flux_x_local_u(k,j) = flux_r(k)
+                swap_diss_x_local_u(k,j) = diss_r(k)
+                swap_flux_y_local_u(k)   = flux_n(k)
+                swap_diss_y_local_u(k)   = diss_n(k)
+                flux_d                   = flux_t(k)
+                diss_d                   = diss_t(k)
+!
+!--             Statistical Evaluation of u'u'. The factor has to be applied
+!--             for right evaluation when gallilei_trans = .T. .
+                sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn)                      &
+                + ( flux_r(k)                                                  &
+                    * ( u_comp(k) - 2.0_wp * hom(k,1,1,0)                   )  &
+                    / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) )  &
+                  + diss_r(k)                                                  &
+                    *   ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0)              )  &
+                    / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--             Statistical Evaluation of w'u'.
+                sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn)                    &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp - 2.0_wp * hom(k,1,3,0)                   )     &
+                    / ( w_comp + SIGN( 1.0E-20_wp, w_comp )              )     &
+                  + diss_t(k)                                                  &
+                    *   ABS( w_comp - 2.0_wp * hom(k,1,3,0)              )     &
+                    / ( ABS( w_comp ) + 1.0E-20_wp                       )     &
+                  ) *   weight_substep(intermediate_timestep_count)
+
+             ENDDO
+
+             DO  k = nzb_max+1, nzt
+
+                u_comp(k) = u(k,j,i+1) + u(k,j,i)
+                flux_r(k) = ( u_comp(k) - gu ) * (                            &
+                         37.0_wp * ( u(k,j,i+1) + u(k,j,i)   )                   &
+                       -  8.0_wp * ( u(k,j,i+2) + u(k,j,i-1) )                   &
+                       +           ( u(k,j,i+3) + u(k,j,i-2) ) ) * adv_mom_5
+                diss_r(k) = - ABS( u_comp(k) - gu ) * (                       &
+                         10.0_wp * ( u(k,j,i+1) - u(k,j,i)   )                   &
+                       -  5.0_wp * ( u(k,j,i+2) - u(k,j,i-1) )                   &
+                       +           ( u(k,j,i+3) - u(k,j,i-2) ) ) * adv_mom_5
+
+                v_comp    = v(k,j+1,i) + v(k,j+1,i-1) - gv
+                flux_n(k) = v_comp * (                                        &
+                         37.0_wp * ( u(k,j+1,i) + u(k,j,i)   )                   &
+                       -  8.0_wp * ( u(k,j+2,i) + u(k,j-1,i) )                   &
+                       +           ( u(k,j+3,i) + u(k,j-2,i) ) ) * adv_mom_5
+                diss_n(k) = - ABS( v_comp ) * (                               &
+                         10.0_wp * ( u(k,j+1,i) - u(k,j,i)   )                   &
+                       -  5.0_wp * ( u(k,j+2,i) - u(k,j-1,i) )                   &
+                       +           ( u(k,j+3,i) - u(k,j-2,i) ) ) * adv_mom_5
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit17 = IBITS(advc_flags_1(k,j,i),17,1)
+                ibit16 = IBITS(advc_flags_1(k,j,i),16,1)
+                ibit15 = IBITS(advc_flags_1(k,j,i),15,1)
+
+                k_ppp = k + 3 * ibit17
+                k_pp  = k + 2 * ( 1 - ibit15  )
+                k_mm  = k - 2 * ibit17
+
+                w_comp    = w(k,j,i) + w(k,j,i-1)
+                flux_t(k) = w_comp * rho_air_zw(k) * (                       &
+                          ( 37.0_wp * ibit17 * adv_mom_5                        &
+                       +     7.0_wp * ibit16 * adv_mom_3                        &
+                       +              ibit15 * adv_mom_1                        &
+                          ) *                                                &
+                             ( u(k+1,j,i)  + u(k,j,i)     )                  &
+                   -      (  8.0_wp * ibit17 * adv_mom_5                        &
+                       +              ibit16 * adv_mom_3                        &
+                          ) *                                                &
+                             ( u(k_pp,j,i) + u(k-1,j,i)   )                  &
+                   +      (           ibit17 * adv_mom_5                        &
+                          ) *                                                &
+                             ( u(k_ppp,j,i) + u(k_mm,j,i) )                  &
+                                      )
+
+                diss_t(k) = - ABS( w_comp ) * rho_air_zw(k) * (              &
+                          ( 10.0_wp * ibit17 * adv_mom_5                        &
+                       +     3.0_wp * ibit16 * adv_mom_3                        &
+                       +              ibit15 * adv_mom_1                        &
+                          ) *                                                &
+                             ( u(k+1,j,i)   - u(k,j,i)    )                  &
+                   -      (  5.0_wp * ibit17 * adv_mom_5                        &
+                       +              ibit16 * adv_mom_3                        &
+                          ) *                                                &
+                             ( u(k_pp,j,i)  - u(k-1,j,i)  )                  &
+                   +      (           ibit17 * adv_mom_5                        &
+                           ) *                                               &
+                             ( u(k_ppp,j,i) - u(k_mm,j,i) )                  &
+                                              )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div = ( ( u_comp(k)   - ( u(k,j,i)   + u(k,j,i-1)   ) ) * ddx &
+                     +  ( v_comp + gv - ( v(k,j,i)   + v(k,j,i-1 )  ) ) * ddy &
+                     +  (   w_comp                      * rho_air_zw(k) -     &
+                          ( w(k-1,j,i) + w(k-1,j,i-1) ) * rho_air_zw(k-1)     &
+                        ) * drho_air(k) * ddzw(k)                             &
+                      ) * 0.5_wp
+
+                tend(k,j,i) = tend(k,j,i) - (                                  &
+                 ( flux_r(k) + diss_r(k)                                       &
+               -   swap_flux_x_local_u(k,j) - swap_diss_x_local_u(k,j) ) * ddx &
+               + ( flux_n(k) + diss_n(k)                                       &
+               -   swap_flux_y_local_u(k)   - swap_diss_y_local_u(k)   ) * ddy &
+               + ( ( flux_t(k) + diss_t(k) )                                   &
+               -   ( flux_d    + diss_d    )                                   &
+                                                    ) * drho_air(k) * ddzw(k)  &
+                                           ) + div * u(k,j,i)
+
+                swap_flux_x_local_u(k,j) = flux_r(k)
+                swap_diss_x_local_u(k,j) = diss_r(k)
+                swap_flux_y_local_u(k)   = flux_n(k)
+                swap_diss_y_local_u(k)   = diss_n(k)
+                flux_d                   = flux_t(k)
+                diss_d                   = diss_t(k)
+!
+!--             Statistical Evaluation of u'u'. The factor has to be applied
+!--             for right evaluation when gallilei_trans = .T. .
+                sums_us2_ws_l(k,tn) = sums_us2_ws_l(k,tn)                      &
+                + ( flux_r(k)                                                  &
+                    * ( u_comp(k) - 2.0_wp * hom(k,1,1,0)                   )  &
+                    / ( u_comp(k) - gu + SIGN( 1.0E-20_wp, u_comp(k) - gu ) )  &
+                  + diss_r(k)                                                  &
+                    *   ABS( u_comp(k) - 2.0_wp * hom(k,1,1,0)              )  &
+                    / ( ABS( u_comp(k) - gu ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--             Statistical Evaluation of w'u'.
+                sums_wsus_ws_l(k,tn) = sums_wsus_ws_l(k,tn)                    &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp - 2.0_wp * hom(k,1,3,0)                   )     &
+                    / ( w_comp + SIGN( 1.0E-20_wp, w_comp )              )     &
+                  + diss_t(k)                                                  &
+                    *   ABS( w_comp - 2.0_wp * hom(k,1,3,0)              )     &
+                    / ( ABS( w_comp ) + 1.0E-20_wp                       )     &
+                  ) *   weight_substep(intermediate_timestep_count)
+             ENDDO
+          ENDDO
+       ENDDO
+       sums_us2_ws_l(nzb,tn) = sums_us2_ws_l(nzb+1,tn)
+
+
+    END SUBROUTINE advec_u_ws
+    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Advection of v - Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_v_ws
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzw, drho_air, tend, u, v, w, rho_air_zw
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nys, nysv, nzb, nzb_max, nzt, advc_flags_1
+
+       USE kinds
+
+       USE statistics,                                                         &
+           ONLY:  hom, sums_vs2_ws_l, sums_wsvs_ws_l, weight_substep
+
+       IMPLICIT NONE
+
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  ibit18 !<
+       INTEGER(iwp) ::  ibit19 !<
+       INTEGER(iwp) ::  ibit20 !<
+       INTEGER(iwp) ::  ibit21 !<
+       INTEGER(iwp) ::  ibit22 !<
+       INTEGER(iwp) ::  ibit23 !<
+       INTEGER(iwp) ::  ibit24 !<
+       INTEGER(iwp) ::  ibit25 !<
+       INTEGER(iwp) ::  ibit26 !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_mm   !<
+       INTEGER(iwp) ::  k_pp   !<
+       INTEGER(iwp) ::  k_ppp  !<
+       INTEGER(iwp) ::  tn = 0 !<
+       
+       REAL(wp)    ::  diss_d !<
+       REAL(wp)    ::  div    !<
+       REAL(wp)    ::  flux_d !<
+       REAL(wp)    ::  gu     !<
+       REAL(wp)    ::  gv     !<
+       REAL(wp)    ::  u_comp !<
+       REAL(wp)    ::  w_comp !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt) ::  swap_diss_y_local_v !<
+       REAL(wp), DIMENSION(nzb+1:nzt) ::  swap_flux_y_local_v !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_diss_x_local_v !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_flux_x_local_v !<
+       
+       REAL(wp), DIMENSION(nzb:nzt) ::  diss_n !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  diss_r !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  flux_n !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  flux_r !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  flux_t !<
+       REAL(wp), DIMENSION(nzb:nzt) ::  v_comp !<
+
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+!
+!--    First compute the whole left boundary of the processor domain
+       i = nxl
+       DO  j = nysv, nyn
+          DO  k = nzb+1, nzb_max
+
+             ibit20 = IBITS(advc_flags_1(k,j,i-1),20,1)
+             ibit19 = IBITS(advc_flags_1(k,j,i-1),19,1)
+             ibit18 = IBITS(advc_flags_1(k,j,i-1),18,1)
+
+             u_comp                   = u(k,j-1,i) + u(k,j,i) - gu
+             swap_flux_x_local_v(k,j) = u_comp * (                             &
+                                      ( 37.0_wp * ibit20 * adv_mom_5              &
+                                   +     7.0_wp * ibit19 * adv_mom_3              &
+                                   +              ibit18 * adv_mom_1              &
+                                      ) *                                      &
+                                     ( v(k,j,i)   + v(k,j,i-1) )               &
+                               -      (  8.0_wp * ibit20 * adv_mom_5              &
+                                   +              ibit19 * adv_mom_3              &
+                                      ) *                                      &
+                                     ( v(k,j,i+1) + v(k,j,i-2) )               &
+                               +      (           ibit20 * adv_mom_5              &
+                                      ) *                                      &
+                                     ( v(k,j,i+2) + v(k,j,i-3) )               &
+                                                 )
+
+              swap_diss_x_local_v(k,j) = - ABS( u_comp ) * (                   &
+                                      ( 10.0_wp * ibit20 * adv_mom_5              &
+                                   +     3.0_wp * ibit19 * adv_mom_3              &
+                                   +              ibit18 * adv_mom_1              &
+                                      ) *                                      &
+                                     ( v(k,j,i)   - v(k,j,i-1) )               &
+                               -      (  5.0_wp * ibit20 * adv_mom_5              &
+                                   +              ibit19 * adv_mom_3              &
+                                      ) *                                      &
+                                     ( v(k,j,i+1) - v(k,j,i-2) )               &
+                               +      (           ibit20 * adv_mom_5              &
+                                      ) *                                      &
+                                     ( v(k,j,i+2) - v(k,j,i-3) )               &
+                                                           )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp                   = u(k,j-1,i) + u(k,j,i) - gu
+             swap_flux_x_local_v(k,j) = u_comp * (                            &
+                             37.0_wp * ( v(k,j,i) + v(k,j,i-1)   )               &
+                           -  8.0_wp * ( v(k,j,i+1) + v(k,j,i-2) )               &
+                           +           ( v(k,j,i+2) + v(k,j,i-3) ) ) * adv_mom_5
+             swap_diss_x_local_v(k,j) = - ABS( u_comp ) * (                   &
+                             10.0_wp * ( v(k,j,i) - v(k,j,i-1)   )               &
+                           -  5.0_wp * ( v(k,j,i+1) - v(k,j,i-2) )               &
+                           +           ( v(k,j,i+2) - v(k,j,i-3) ) ) * adv_mom_5
+
+          ENDDO
+
+       ENDDO
+
+       DO i = nxl, nxr
+
+          j = nysv
+          DO  k = nzb+1, nzb_max
+
+             ibit23 = IBITS(advc_flags_1(k,j-1,i),23,1)
+             ibit22 = IBITS(advc_flags_1(k,j-1,i),22,1)
+             ibit21 = IBITS(advc_flags_1(k,j-1,i),21,1)
+
+             v_comp(k)              = v(k,j,i) + v(k,j-1,i) - gv
+             swap_flux_y_local_v(k) = v_comp(k) * (                           &
+                                   ( 37.0_wp * ibit23 * adv_mom_5                &
+                                +     7.0_wp * ibit22 * adv_mom_3                &
+                                +              ibit21 * adv_mom_1                &
+                                   ) *                                        &
+                                     ( v(k,j,i)   + v(k,j-1,i) )              &
+                            -      (  8.0_wp * ibit23 * adv_mom_5                &
+                                +              ibit22 * adv_mom_3                &
+                                   ) *                                        &
+                                     ( v(k,j+1,i) + v(k,j-2,i) )              &
+                            +      (           ibit23 * adv_mom_5                &
+                                   ) *                                        &
+                                     ( v(k,j+2,i) + v(k,j-3,i) )              &
+                                                 )
+
+             swap_diss_y_local_v(k) = - ABS( v_comp(k) ) * (                  &
+                                   ( 10.0_wp * ibit23 * adv_mom_5                &
+                                +     3.0_wp * ibit22 * adv_mom_3                &
+                                +              ibit21 * adv_mom_1                &
+                                   ) *                                        &
+                                     ( v(k,j,i)   - v(k,j-1,i) )              &
+                            -      (  5.0_wp * ibit23 * adv_mom_5                &
+                                +              ibit22 * adv_mom_3                &
+                                   ) *                                        &
+                                     ( v(k,j+1,i) - v(k,j-2,i) )              &
+                            +      (           ibit23 * adv_mom_5                &
+                                   ) *                                        &
+                                     ( v(k,j+2,i) - v(k,j-3,i) )              &
+                                                          )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             v_comp(k)              = v(k,j,i) + v(k,j-1,i) - gv
+             swap_flux_y_local_v(k) = v_comp(k) * (                           &
+                           37.0_wp * ( v(k,j,i) + v(k,j-1,i)   )                 &
+                         -  8.0_wp * ( v(k,j+1,i) + v(k,j-2,i) )                 &
+                         +           ( v(k,j+2,i) + v(k,j-3,i) ) ) * adv_mom_5
+             swap_diss_y_local_v(k) = - ABS( v_comp(k) ) * (                  &
+                           10.0_wp * ( v(k,j,i) - v(k,j-1,i)   )                 &
+                         -  5.0_wp * ( v(k,j+1,i) - v(k,j-2,i) )                 &
+                         +           ( v(k,j+2,i) - v(k,j-3,i) ) ) * adv_mom_5
+
+          ENDDO
+
+          DO  j = nysv, nyn
+
+             flux_t(0) = 0.0_wp
+             diss_t(0) = 0.0_wp
+             flux_d    = 0.0_wp
+             diss_d    = 0.0_wp
+
+             DO  k = nzb+1, nzb_max
+
+                ibit20 = IBITS(advc_flags_1(k,j,i),20,1)
+                ibit19 = IBITS(advc_flags_1(k,j,i),19,1)
+                ibit18 = IBITS(advc_flags_1(k,j,i),18,1)
+
+                u_comp    = u(k,j-1,i+1) + u(k,j,i+1) - gu
+                flux_r(k) = u_comp * (                                       &
+                          ( 37.0_wp * ibit20 * adv_mom_5                        &
+                       +     7.0_wp * ibit19 * adv_mom_3                        &
+                       +              ibit18 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( v(k,j,i+1) + v(k,j,i)   )                 &
+                   -      (  8.0_wp * ibit20 * adv_mom_5                        &
+                       +              ibit19 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( v(k,j,i+2) + v(k,j,i-1) )                 &
+                   +      (           ibit20 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( v(k,j,i+3) + v(k,j,i-2) )                 &
+                                     )
+
+                diss_r(k) = - ABS( u_comp ) * (                              &
+                          ( 10.0_wp * ibit20 * adv_mom_5                        &
+                       +     3.0_wp * ibit19 * adv_mom_3                        &
+                       +              ibit18 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( v(k,j,i+1) - v(k,j,i)  )                  &
+                   -      (  5.0_wp * ibit20 * adv_mom_5                        &
+                       +              ibit19 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( v(k,j,i+2) - v(k,j,i-1) )                 &
+                   +      (           ibit20 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( v(k,j,i+3) - v(k,j,i-2) )                 &
+                                              )
+
+                ibit23 = IBITS(advc_flags_1(k,j,i),23,1)
+                ibit22 = IBITS(advc_flags_1(k,j,i),22,1)
+                ibit21 = IBITS(advc_flags_1(k,j,i),21,1)
+
+                v_comp(k) = v(k,j+1,i) + v(k,j,i)
+                flux_n(k) = ( v_comp(k) - gv ) * (                           &
+                          ( 37.0_wp * ibit23 * adv_mom_5                        &
+                       +     7.0_wp * ibit22 * adv_mom_3                        &
+                       +              ibit21 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( v(k,j+1,i) + v(k,j,i)   )                 &
+                   -      (  8.0_wp * ibit23 * adv_mom_5                        &
+                       +              ibit22 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( v(k,j+2,i) + v(k,j-1,i) )                 &
+                   +      (           ibit23 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( v(k,j+3,i) + v(k,j-2,i) )                 &
+                                     )
+
+                diss_n(k) = - ABS( v_comp(k) - gv ) * (                      &
+                          ( 10.0_wp * ibit23 * adv_mom_5                        &
+                       +     3.0_wp * ibit22 * adv_mom_3                        &
+                       +              ibit21 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( v(k,j+1,i) - v(k,j,i)  )                  &
+                   -      (  5.0_wp * ibit23 * adv_mom_5                        &
+                       +              ibit22 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( v(k,j+2,i) - v(k,j-1,i) )                 &
+                   +      (           ibit23 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( v(k,j+3,i) - v(k,j-2,i) )                 &
+                                                      )
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit26 = IBITS(advc_flags_1(k,j,i),26,1)
+                ibit25 = IBITS(advc_flags_1(k,j,i),25,1)
+                ibit24 = IBITS(advc_flags_1(k,j,i),24,1)
+
+                k_ppp = k + 3 * ibit26
+                k_pp  = k + 2 * ( 1 - ibit24  )
+                k_mm  = k - 2 * ibit26
+
+                w_comp    = w(k,j-1,i) + w(k,j,i)
+                flux_t(k) = w_comp * rho_air_zw(k) * (                       &
+                          ( 37.0_wp * ibit26 * adv_mom_5                        &
+                       +     7.0_wp * ibit25 * adv_mom_3                        &
+                       +              ibit24 * adv_mom_1                        &
+                          ) *                                                &
+                             ( v(k+1,j,i)   + v(k,j,i)    )                  &
+                   -      (  8.0_wp * ibit26 * adv_mom_5                        &
+                       +              ibit25 * adv_mom_3                        &
+                          ) *                                                &
+                             ( v(k_pp,j,i)  + v(k-1,j,i)  )                  &
+                   +      (           ibit26 * adv_mom_5                        &
+                          ) *                                                &
+                             ( v(k_ppp,j,i) + v(k_mm,j,i) )                  &
+                                      )
+
+                diss_t(k) = - ABS( w_comp ) * rho_air_zw(k) * (              &
+                          ( 10.0_wp * ibit26 * adv_mom_5                        &
+                       +     3.0_wp * ibit25 * adv_mom_3                        &
+                       +              ibit24 * adv_mom_1                        &
+                          ) *                                                &
+                             ( v(k+1,j,i)   - v(k,j,i)    )                  &
+                   -      (  5.0_wp * ibit26 * adv_mom_5                        &
+                       +              ibit25 * adv_mom_3                        &
+                          ) *                                                &
+                             ( v(k_pp,j,i)  - v(k-1,j,i)  )                  &
+                   +      (           ibit26 * adv_mom_5                        &
+                          ) *                                                &
+                             ( v(k_ppp,j,i) - v(k_mm,j,i) )                  &
+                                               )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div = ( ( ( u_comp     + gu )                                 &
+                                       * ( ibit18 + ibit19 + ibit20 )         &
+                - ( u(k,j-1,i)   + u(k,j,i) )                                 &
+                                       * ( IBITS(advc_flags_1(k,j,i-1),18,1)  &
+                                         + IBITS(advc_flags_1(k,j,i-1),19,1)  &
+                                         + IBITS(advc_flags_1(k,j,i-1),20,1)  &
+                                         )                                    &
+                  ) * ddx                                                     &
+               +  ( v_comp(k)                                                 &
+                                       * ( ibit21 + ibit22 + ibit23 )         &
+                - ( v(k,j,i)     + v(k,j-1,i) )                               &
+                                       * ( IBITS(advc_flags_1(k,j-1,i),21,1)  &
+                                         + IBITS(advc_flags_1(k,j-1,i),22,1)  &
+                                         + IBITS(advc_flags_1(k,j-1,i),23,1)  &
+                                         )                                    &
+                  ) * ddy                                                     &
+               +  ( w_comp * rho_air_zw(k)                                    &
+                                       * ( ibit24 + ibit25 + ibit26 )         &
+                - ( w(k-1,j-1,i) + w(k-1,j,i) ) * rho_air_zw(k-1)             &
+                                       * ( IBITS(advc_flags_1(k-1,j,i),24,1)  &
+                                         + IBITS(advc_flags_1(k-1,j,i),25,1)  &
+                                         + IBITS(advc_flags_1(k-1,j,i),26,1)  &
+                                         )                                    &
+                   ) * drho_air(k) * ddzw(k)                                  &
+                ) * 0.5_wp
+
+
+                tend(k,j,i) = tend(k,j,i) - (                                 &
+                       ( flux_r(k) + diss_r(k)                                &
+                     -   swap_flux_x_local_v(k,j) - swap_diss_x_local_v(k,j)  &
+                       ) * ddx                                                &
+                     + ( flux_n(k) + diss_n(k)                                &
+                     -   swap_flux_y_local_v(k) - swap_diss_y_local_v(k)      &
+                       ) * ddy                                                &
+                     + ( ( flux_t(k) + diss_t(k) )                            &
+                     -   ( flux_d    + diss_d    )                            &
+                       ) * drho_air(k) * ddzw(k)                              &
+                                            )  + v(k,j,i) * div
+
+                swap_flux_x_local_v(k,j) = flux_r(k)
+                swap_diss_x_local_v(k,j) = diss_r(k)
+                swap_flux_y_local_v(k)   = flux_n(k)
+                swap_diss_y_local_v(k)   = diss_n(k)
+                flux_d                   = flux_t(k)
+                diss_d                   = diss_t(k)
+
+!
+!--             Statistical Evaluation of v'v'. The factor has to be applied
+!--             for right evaluation when gallilei_trans = .T. .
+                sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn)                      &
+                + ( flux_n(k)                                                  &
+                    * ( v_comp(k) - 2.0_wp * hom(k,1,2,0)                   )  &
+                    / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) )  &
+               +   diss_n(k)                                                   &
+                    *   ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0)              )  &
+                    / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--             Statistical Evaluation of w'u'.
+                sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn)                    &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp - 2.0_wp * hom(k,1,3,0)                   )     &
+                    / ( w_comp + SIGN( 1.0E-20_wp, w_comp )              )     &
+               +   diss_t(k)                                                   &
+                    *   ABS( w_comp - 2.0_wp * hom(k,1,3,0)              )     &
+                    / ( ABS( w_comp ) + 1.0E-20_wp                       )     &
+                  ) *   weight_substep(intermediate_timestep_count)
+
+             ENDDO
+
+             DO  k = nzb_max+1, nzt
+
+                u_comp    = u(k,j-1,i+1) + u(k,j,i+1) - gu
+                flux_r(k) = u_comp * (                                        &
+                      37.0_wp * ( v(k,j,i+1) + v(k,j,i)   )                      &
+                    -  8.0_wp * ( v(k,j,i+2) + v(k,j,i-1) )                      &
+                    +           ( v(k,j,i+3) + v(k,j,i-2) ) ) * adv_mom_5
+
+                diss_r(k) = - ABS( u_comp ) * (                               &
+                      10.0_wp * ( v(k,j,i+1) - v(k,j,i) )                        &
+                    -  5.0_wp * ( v(k,j,i+2) - v(k,j,i-1) )                      &
+                    +           ( v(k,j,i+3) - v(k,j,i-2) ) ) * adv_mom_5
+
+
+                v_comp(k) = v(k,j+1,i) + v(k,j,i)
+                flux_n(k) = ( v_comp(k) - gv ) * (                            &
+                      37.0_wp * ( v(k,j+1,i) + v(k,j,i)   )                      &
+                    -  8.0_wp * ( v(k,j+2,i) + v(k,j-1,i) )                      &
+                      +         ( v(k,j+3,i) + v(k,j-2,i) ) ) * adv_mom_5
+
+                diss_n(k) = - ABS( v_comp(k) - gv ) * (                       &
+                      10.0_wp * ( v(k,j+1,i) - v(k,j,i)   )                      &
+                    -  5.0_wp * ( v(k,j+2,i) - v(k,j-1,i) )                      &
+                    +           ( v(k,j+3,i) - v(k,j-2,i) ) ) * adv_mom_5
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit26 = IBITS(advc_flags_1(k,j,i),26,1)
+                ibit25 = IBITS(advc_flags_1(k,j,i),25,1)
+                ibit24 = IBITS(advc_flags_1(k,j,i),24,1)
+
+                k_ppp = k + 3 * ibit26
+                k_pp  = k + 2 * ( 1 - ibit24  )
+                k_mm  = k - 2 * ibit26
+
+                w_comp    = w(k,j-1,i) + w(k,j,i)
+                flux_t(k) = w_comp * rho_air_zw(k) * (                       &
+                          ( 37.0_wp * ibit26 * adv_mom_5                        &
+                       +     7.0_wp * ibit25 * adv_mom_3                        &
+                       +              ibit24 * adv_mom_1                        &
+                          ) *                                                &
+                             ( v(k+1,j,i)   + v(k,j,i)    )                  &
+                   -      (  8.0_wp * ibit26 * adv_mom_5                        &
+                       +              ibit25 * adv_mom_3                        &
+                          ) *                                                &
+                             ( v(k_pp,j,i)  + v(k-1,j,i)  )                  &
+                   +      (           ibit26 * adv_mom_5                        &
+                          ) *                                                &
+                             ( v(k_ppp,j,i) + v(k_mm,j,i) )                  &
+                                      )
+
+                diss_t(k) = - ABS( w_comp ) * rho_air_zw(k) * (              &
+                          ( 10.0_wp * ibit26 * adv_mom_5                        &
+                       +     3.0_wp * ibit25 * adv_mom_3                        &
+                       +              ibit24 * adv_mom_1                        &
+                          ) *                                                &
+                             ( v(k+1,j,i)   - v(k,j,i)    )                  &
+                   -      (  5.0_wp * ibit26 * adv_mom_5                        &
+                       +              ibit25 * adv_mom_3                        &
+                          ) *                                                &
+                             ( v(k_pp,j,i)  - v(k-1,j,i)  )                  &
+                   +      (           ibit26 * adv_mom_5                        &
+                          ) *                                                &
+                             ( v(k_ppp,j,i) - v(k_mm,j,i) )                  &
+                                               )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div = ( ( u_comp + gu - ( u(k,j-1,i)   + u(k,j,i)   ) ) * ddx &
+                     +  ( v_comp(k)   - ( v(k,j,i)     + v(k,j-1,i) ) ) * ddy &
+                     +  (   w_comp                      * rho_air_zw(k) -     &
+                          ( w(k-1,j-1,i) + w(k-1,j,i) ) * rho_air_zw(k-1)     &
+                        ) * drho_air(k) * ddzw(k)                             &
+                      ) * 0.5_wp
+ 
+                tend(k,j,i) = tend(k,j,i) - (                                 &
+                       ( flux_r(k) + diss_r(k)                                &
+                     -   swap_flux_x_local_v(k,j) - swap_diss_x_local_v(k,j)  &
+                       ) * ddx                                                &
+                     + ( flux_n(k) + diss_n(k)                                &
+                     -   swap_flux_y_local_v(k) - swap_diss_y_local_v(k)      &
+                       ) * ddy                                                &
+                     + ( ( flux_t(k) + diss_t(k) )                            &
+                     -   ( flux_d    + diss_d    )                            &
+                       ) * drho_air(k) * ddzw(k)                              &
+                                            )  + v(k,j,i) * div
+
+                swap_flux_x_local_v(k,j) = flux_r(k)
+                swap_diss_x_local_v(k,j) = diss_r(k)
+                swap_flux_y_local_v(k)   = flux_n(k)
+                swap_diss_y_local_v(k)   = diss_n(k)
+                flux_d                   = flux_t(k)
+                diss_d                   = diss_t(k)
+
+!
+!--             Statistical Evaluation of v'v'. The factor has to be applied
+!--             for right evaluation when gallilei_trans = .T. .
+                sums_vs2_ws_l(k,tn) = sums_vs2_ws_l(k,tn)                      &
+                + ( flux_n(k)                                                  &
+                    * ( v_comp(k) - 2.0_wp * hom(k,1,2,0)                   )  &
+                    / ( v_comp(k) - gv + SIGN( 1.0E-20_wp, v_comp(k) - gv ) )  &
+               +   diss_n(k)                                                   &
+                    *   ABS( v_comp(k) - 2.0_wp * hom(k,1,2,0)              )  &
+                    / ( ABS( v_comp(k) - gv ) + 1.0E-20_wp                  )  &
+                  ) *   weight_substep(intermediate_timestep_count)
+!
+!--             Statistical Evaluation of w'u'.
+                sums_wsvs_ws_l(k,tn) = sums_wsvs_ws_l(k,tn)                    &
+                + ( flux_t(k)                                                  &
+                    * ( w_comp - 2.0_wp * hom(k,1,3,0)                   )     &
+                    / ( w_comp + SIGN( 1.0E-20_wp, w_comp )              )     &
+               +   diss_t(k)                                                   &
+                    *   ABS( w_comp - 2.0_wp * hom(k,1,3,0)              )     &
+                    / ( ABS( w_comp ) + 1.0E-20_wp                       )     &
+                  ) *   weight_substep(intermediate_timestep_count)
+
+             ENDDO
+          ENDDO
+       ENDDO
+       sums_vs2_ws_l(nzb,tn) = sums_vs2_ws_l(nzb+1,tn)
+
+
+    END SUBROUTINE advec_v_ws
+    
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Advection of w - Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE advec_w_ws
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, drho_air_zw, tend, u, v, w, rho_air
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count, u_gtrans, v_gtrans
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nys, nzb, nzb_max, nzt, advc_flags_1,         &
+                  advc_flags_2
+
+       USE kinds
+       
+       USE statistics,                                                         &
+           ONLY:  hom, sums_ws2_ws_l, weight_substep
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  ibit27 !<
+       INTEGER(iwp) ::  ibit28 !<
+       INTEGER(iwp) ::  ibit29 !<
+       INTEGER(iwp) ::  ibit30 !<
+       INTEGER(iwp) ::  ibit31 !<
+       INTEGER(iwp) ::  ibit32 !<
+       INTEGER(iwp) ::  ibit33 !<
+       INTEGER(iwp) ::  ibit34 !<
+       INTEGER(iwp) ::  ibit35 !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_mm   !<
+       INTEGER(iwp) ::  k_pp   !<
+       INTEGER(iwp) ::  k_ppp  !<
+       INTEGER(iwp) ::  tn = 0 !<
+       
+       REAL(wp)    ::  diss_d !<
+       REAL(wp)    ::  div    !<
+       REAL(wp)    ::  flux_d !<
+       REAL(wp)    ::  gu     !<
+       REAL(wp)    ::  gv     !<
+       REAL(wp)    ::  u_comp !<
+       REAL(wp)    ::  v_comp !<
+       REAL(wp)    ::  w_comp !<
+       
+       REAL(wp), DIMENSION(nzb:nzt)    ::  diss_t !<
+       REAL(wp), DIMENSION(nzb:nzt)    ::  flux_t !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt)  ::  diss_n !<
+       REAL(wp), DIMENSION(nzb+1:nzt)  ::  diss_r !<
+       REAL(wp), DIMENSION(nzb+1:nzt)  ::  flux_n !<
+       REAL(wp), DIMENSION(nzb+1:nzt)  ::  flux_r !<
+       REAL(wp), DIMENSION(nzb+1:nzt)  ::  swap_diss_y_local_w !<
+       REAL(wp), DIMENSION(nzb+1:nzt)  ::  swap_flux_y_local_w !<
+       
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_diss_x_local_w !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  swap_flux_x_local_w !<
+ 
+       gu = 2.0_wp * u_gtrans
+       gv = 2.0_wp * v_gtrans
+!
+!--   compute the whole left boundary of the processor domain
+       i = nxl
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzb_max
+
+             ibit29 = IBITS(advc_flags_1(k,j,i-1),29,1)
+             ibit28 = IBITS(advc_flags_1(k,j,i-1),28,1)
+             ibit27 = IBITS(advc_flags_1(k,j,i-1),27,1)
+
+             u_comp                   = u(k+1,j,i) + u(k,j,i) - gu
+             swap_flux_x_local_w(k,j) = u_comp * (                             &
+                                      ( 37.0_wp * ibit29 * adv_mom_5              &
+                                   +     7.0_wp * ibit28 * adv_mom_3              &
+                                   +              ibit27 * adv_mom_1              &
+                                      ) *                                      &
+                                     ( w(k,j,i)   + w(k,j,i-1) )               &
+                               -      (  8.0_wp * ibit29 * adv_mom_5              &
+                                   +              ibit28 * adv_mom_3              &
+                                      ) *                                      &
+                                     ( w(k,j,i+1) + w(k,j,i-2) )               &
+                               +      (           ibit29 * adv_mom_5              &
+                                      ) *                                      &
+                                     ( w(k,j,i+2) + w(k,j,i-3) )               &
+                                                 )
+
+               swap_diss_x_local_w(k,j) = - ABS( u_comp ) * (                  &
+                                        ( 10.0_wp * ibit29 * adv_mom_5            &
+                                     +     3.0_wp * ibit28 * adv_mom_3            &
+                                     +              ibit27 * adv_mom_1            &
+                                        ) *                                    &
+                                     ( w(k,j,i)   - w(k,j,i-1) )               &
+                                 -      (  5.0_wp * ibit29 * adv_mom_5            &
+                                     +              ibit28 * adv_mom_3            &
+                                        ) *                                    &
+                                     ( w(k,j,i+1) - w(k,j,i-2) )               &
+                                 +      (           ibit29 * adv_mom_5            &
+                                        ) *                                    &
+                                     ( w(k,j,i+2) - w(k,j,i-3) )               &
+                                                            )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             u_comp                   = u(k+1,j,i) + u(k,j,i) - gu
+             swap_flux_x_local_w(k,j) = u_comp * (                             &
+                            37.0_wp * ( w(k,j,i) + w(k,j,i-1)   )                 &
+                          -  8.0_wp * ( w(k,j,i+1) + w(k,j,i-2) )                 &
+                          +           ( w(k,j,i+2) + w(k,j,i-3) ) ) * adv_mom_5
+             swap_diss_x_local_w(k,j) = - ABS( u_comp ) * (                    &
+                            10.0_wp * ( w(k,j,i) - w(k,j,i-1)   )                 &
+                          -  5.0_wp * ( w(k,j,i+1) - w(k,j,i-2) )                 &
+                          +           ( w(k,j,i+2) - w(k,j,i-3) ) ) * adv_mom_5
+
+          ENDDO
+
+       ENDDO
+
+       DO i = nxl, nxr
+
+          j = nys
+          DO  k = nzb+1, nzb_max
+
+             ibit32 = IBITS(advc_flags_2(k,j-1,i),0,1)
+             ibit31 = IBITS(advc_flags_1(k,j-1,i),31,1)
+             ibit30 = IBITS(advc_flags_1(k,j-1,i),30,1)
+
+             v_comp                 = v(k+1,j,i) + v(k,j,i) - gv
+             swap_flux_y_local_w(k) = v_comp * (                              &
+                                    ( 37.0_wp * ibit32 * adv_mom_5               &
+                                 +     7.0_wp * ibit31 * adv_mom_3               &
+                                 +              ibit30 * adv_mom_1               &
+                                    ) *                                        &
+                                     ( w(k,j,i)   + w(k,j-1,i) )              &
+                             -      (  8.0_wp * ibit32 * adv_mom_5               &
+                                 +              ibit31 * adv_mom_3               &
+                                    ) *                                       &
+                                     ( w(k,j+1,i) + w(k,j-2,i) )              &
+                             +      (           ibit32 * adv_mom_5               &
+                                    ) *                                       &
+                                     ( w(k,j+2,i) + w(k,j-3,i) )              &
+                                               )
+
+             swap_diss_y_local_w(k) = - ABS( v_comp ) * (                     &
+                                    ( 10.0_wp * ibit32 * adv_mom_5               &
+                                 +     3.0_wp * ibit31 * adv_mom_3               &
+                                 +              ibit30 * adv_mom_1               &
+                                    ) *                                       &
+                                     ( w(k,j,i)   - w(k,j-1,i) )              &
+                             -      (  5.0_wp * ibit32 * adv_mom_5               &
+                                 +              ibit31 * adv_mom_3               &
+                                    ) *                                       &
+                                     ( w(k,j+1,i) - w(k,j-2,i) )              &
+                             +      (           ibit32 * adv_mom_5               &
+                                    ) *                                       &
+                                     ( w(k,j+2,i) - w(k,j-3,i) )              &
+                                                        )
+
+          ENDDO
+
+          DO  k = nzb_max+1, nzt
+
+             v_comp                 = v(k+1,j,i) + v(k,j,i) - gv
+             swap_flux_y_local_w(k) = v_comp * (                              &
+                           37.0_wp * ( w(k,j,i) + w(k,j-1,i)   )                 &
+                         -  8.0_wp * ( w(k,j+1,i) +w(k,j-2,i)  )                 &
+                         +           ( w(k,j+2,i) + w(k,j-3,i) ) ) * adv_mom_5
+             swap_diss_y_local_w(k) = - ABS( v_comp ) * (                     &
+                           10.0_wp * ( w(k,j,i) - w(k,j-1,i)   )                 &
+                         -  5.0_wp * ( w(k,j+1,i) - w(k,j-2,i) )                 &
+                         +           ( w(k,j+2,i) - w(k,j-3,i) ) ) * adv_mom_5
+
+          ENDDO
+
+          DO  j = nys, nyn
+
+!
+!--          The lower flux has to be calculated explicetely for the tendency
+!--          at the first w-level. For topography wall this is done implicitely
+!--          by advc_flags_1.
+             k         = nzb + 1
+             w_comp    = w(k,j,i) + w(k-1,j,i)
+             flux_t(0) = w_comp       * ( w(k,j,i) + w(k-1,j,i) ) * adv_mom_1
+             diss_t(0) = -ABS(w_comp) * ( w(k,j,i) - w(k-1,j,i) ) * adv_mom_1
+             flux_d    = flux_t(0)
+             diss_d    = diss_t(0)
+
+             DO  k = nzb+1, nzb_max
+
+                ibit29 = IBITS(advc_flags_1(k,j,i),29,1)
+                ibit28 = IBITS(advc_flags_1(k,j,i),28,1)
+                ibit27 = IBITS(advc_flags_1(k,j,i),27,1)
+
+                u_comp    = u(k+1,j,i+1) + u(k,j,i+1) - gu
+                flux_r(k) = u_comp * (                                       &
+                          ( 37.0_wp * ibit29 * adv_mom_5                        &
+                       +     7.0_wp * ibit28 * adv_mom_3                        &
+                       +              ibit27 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( w(k,j,i+1) + w(k,j,i)   )                 &
+                   -      (  8.0_wp * ibit29 * adv_mom_5                        &
+                       +              ibit28 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( w(k,j,i+2) + w(k,j,i-1) )                 &
+                   +      (           ibit29 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( w(k,j,i+3) + w(k,j,i-2) )                 &
+                                     )
+
+                diss_r(k) = - ABS( u_comp ) * (                              &
+                          ( 10.0_wp * ibit29 * adv_mom_5                        &
+                       +     3.0_wp * ibit28 * adv_mom_3                        &
+                       +              ibit27 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( w(k,j,i+1) - w(k,j,i)  )                  &
+                   -      (  5.0_wp * ibit29 * adv_mom_5                        &
+                       +              ibit28 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( w(k,j,i+2) - w(k,j,i-1) )                 &
+                   +      (           ibit29 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( w(k,j,i+3) - w(k,j,i-2) )                 &
+                                              )
+
+                ibit32 = IBITS(advc_flags_2(k,j,i),0,1)
+                ibit31 = IBITS(advc_flags_1(k,j,i),31,1)
+                ibit30 = IBITS(advc_flags_1(k,j,i),30,1)
+
+                v_comp    = v(k+1,j+1,i) + v(k,j+1,i) - gv
+                flux_n(k) = v_comp * (                                       &
+                          ( 37.0_wp * ibit32 * adv_mom_5                        &
+                       +     7.0_wp * ibit31 * adv_mom_3                        &
+                       +              ibit30 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( w(k,j+1,i) + w(k,j,i)   )                 &
+                   -      (  8.0_wp * ibit32 * adv_mom_5                        &
+                       +              ibit31 * adv_mom_3                        &
+                          ) *                                                 &
+                                 ( w(k,j+2,i) + w(k,j-1,i) )                 &
+                   +      (           ibit32 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( w(k,j+3,i) + w(k,j-2,i) )                 &
+                                     )
+
+                diss_n(k) = - ABS( v_comp ) * (                              &
+                          ( 10.0_wp * ibit32 * adv_mom_5                        &
+                       +     3.0_wp * ibit31 * adv_mom_3                        &
+                       +              ibit30 * adv_mom_1                        &
+                          ) *                                                &
+                                 ( w(k,j+1,i) - w(k,j,i)  )                  &
+                   -      (  5.0_wp * ibit32 * adv_mom_5                        &
+                       +              ibit31 * adv_mom_3                        &
+                          ) *                                                &
+                                 ( w(k,j+2,i) - w(k,j-1,i) )                 &
+                   +      (           ibit32 * adv_mom_5                        &
+                          ) *                                                &
+                                 ( w(k,j+3,i) - w(k,j-2,i) )                 &
+                                              )
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit35 = IBITS(advc_flags_2(k,j,i),3,1)
+                ibit34 = IBITS(advc_flags_2(k,j,i),2,1)
+                ibit33 = IBITS(advc_flags_2(k,j,i),1,1)
+
+                k_ppp = k + 3 * ibit35
+                k_pp  = k + 2 * ( 1 - ibit33  )
+                k_mm  = k - 2 * ibit35
+
+                w_comp    = w(k+1,j,i) + w(k,j,i)
+                flux_t(k) = w_comp * rho_air(k+1) * (                        &
+                          ( 37.0_wp * ibit35 * adv_mom_5                        &
+                       +     7.0_wp * ibit34 * adv_mom_3                        &
+                       +              ibit33 * adv_mom_1                        &
+                          ) *                                                &
+                             ( w(k+1,j,i)  + w(k,j,i)     )                  &
+                   -      (  8.0_wp * ibit35 * adv_mom_5                        &
+                       +              ibit34 * adv_mom_3                        &
+                          ) *                                                &
+                             ( w(k_pp,j,i)  + w(k-1,j,i)  )                  &
+                   +      (           ibit35 * adv_mom_5                        &
+                          ) *                                                &
+                             ( w(k_ppp,j,i) + w(k_mm,j,i) )                  &
+                                       )
+
+                diss_t(k) = - ABS( w_comp ) * rho_air(k+1) * (               &
+                          ( 10.0_wp * ibit35 * adv_mom_5                        &
+                       +     3.0_wp * ibit34 * adv_mom_3                        &
+                       +              ibit33 * adv_mom_1                        &
+                          ) *                                                &
+                             ( w(k+1,j,i)   - w(k,j,i)    )                  &
+                   -      (  5.0_wp * ibit35 * adv_mom_5                        &
+                       +              ibit34 * adv_mom_3                        &
+                          ) *                                                &
+                             ( w(k_pp,j,i)  - w(k-1,j,i)  )                  &
+                   +      (           ibit35 * adv_mom_5                        &
+                          ) *                                                &
+                             ( w(k_ppp,j,i) - w(k_mm,j,i) )                  &
+                                               )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div = ( ( ( u_comp + gu ) * ( ibit27 + ibit28 + ibit29 )      &
+                  - ( u(k+1,j,i) + u(k,j,i)   )                               & 
+                                    * ( IBITS(advc_flags_1(k,j,i-1),27,1)     &
+                                      + IBITS(advc_flags_1(k,j,i-1),28,1)     &
+                                      + IBITS(advc_flags_1(k,j,i-1),29,1)     &
+                                      )                                       &
+                  ) * ddx                                                     &
+              +   ( ( v_comp + gv ) * ( ibit30 + ibit31 + ibit32 )            &
+                  - ( v(k+1,j,i) + v(k,j,i)   )                               &
+                                    * ( IBITS(advc_flags_1(k,j-1,i),30,1)     &
+                                      + IBITS(advc_flags_1(k,j-1,i),31,1)     &
+                                      + IBITS(advc_flags_2(k,j-1,i),0,1)      &
+                                      )                                       &
+                  ) * ddy                                                     &
+              +   ( w_comp * rho_air(k+1) * ( ibit33 + ibit34 + ibit35 )      &
+                - ( w(k,j,i)   + w(k-1,j,i)   ) * rho_air(k)                  &
+                                    * ( IBITS(advc_flags_2(k-1,j,i),1,1)      &
+                                      + IBITS(advc_flags_2(k-1,j,i),2,1)      &
+                                      + IBITS(advc_flags_2(k-1,j,i),3,1)      &
+                                      )                                       & 
+                  ) * drho_air_zw(k) * ddzu(k+1)                              &
+                ) * 0.5_wp
+
+
+
+                tend(k,j,i) = tend(k,j,i) - (                                 &
+                      ( flux_r(k) + diss_r(k)                                 &
+                    -   swap_flux_x_local_w(k,j) - swap_diss_x_local_w(k,j)   &
+                      ) * ddx                                                 &
+                    + ( flux_n(k) + diss_n(k)                                 &
+                    -   swap_flux_y_local_w(k)   - swap_diss_y_local_w(k)     &
+                      ) * ddy                                                 &
+                    + ( ( flux_t(k) + diss_t(k) )                             &
+                    -   ( flux_d    + diss_d    )                             &
+                      ) * drho_air_zw(k) * ddzu(k+1)                          &
+                                            )  + div * w(k,j,i)
+
+                swap_flux_x_local_w(k,j) = flux_r(k)
+                swap_diss_x_local_w(k,j) = diss_r(k)
+                swap_flux_y_local_w(k)   = flux_n(k)
+                swap_diss_y_local_w(k)   = diss_n(k)
+                flux_d                   = flux_t(k)
+                diss_d                   = diss_t(k)
+
+                sums_ws2_ws_l(k,tn)  = sums_ws2_ws_l(k,tn)                    &
+                      + ( flux_t(k)                                           &
+                       * ( w_comp - 2.0_wp * hom(k,1,3,0)                   ) &
+                       / ( w_comp + SIGN( 1.0E-20_wp, w_comp )              ) &
+                        + diss_t(k)                                           &
+                       *   ABS( w_comp - 2.0_wp * hom(k,1,3,0)              ) &
+                       / ( ABS( w_comp ) + 1.0E-20_wp                       ) &
+                        ) *   weight_substep(intermediate_timestep_count)
+
+             ENDDO
+
+             DO  k = nzb_max+1, nzt
+
+                u_comp    = u(k+1,j,i+1) + u(k,j,i+1) - gu
+                flux_r(k) = u_comp * (                                      &
+                      37.0_wp * ( w(k,j,i+1) + w(k,j,i)   )                    &
+                    -  8.0_wp * ( w(k,j,i+2) + w(k,j,i-1) )                    &
+                    +           ( w(k,j,i+3) + w(k,j,i-2) ) ) * adv_mom_5
+
+                diss_r(k) = - ABS( u_comp ) * (                             &
+                      10.0_wp * ( w(k,j,i+1) - w(k,j,i)   )                    &
+                    -  5.0_wp * ( w(k,j,i+2) - w(k,j,i-1) )                    &
+                    +           ( w(k,j,i+3) - w(k,j,i-2) ) ) * adv_mom_5
+
+                v_comp    = v(k+1,j+1,i) + v(k,j+1,i) - gv
+                flux_n(k) = v_comp * (                                      &
+                      37.0_wp * ( w(k,j+1,i) + w(k,j,i)   )                    &
+                    -  8.0_wp * ( w(k,j+2,i) + w(k,j-1,i) )                    &
+                    +           ( w(k,j+3,i) + w(k,j-2,i) ) ) * adv_mom_5
+
+                diss_n(k) = - ABS( v_comp ) * (                             &
+                      10.0_wp * ( w(k,j+1,i) - w(k,j,i)   )                    &
+                    -  5.0_wp * ( w(k,j+2,i) - w(k,j-1,i) )                    &
+                    +           ( w(k,j+3,i) - w(k,j-2,i) ) ) * adv_mom_5
+!
+!--             k index has to be modified near bottom and top, else array
+!--             subscripts will be exceeded.
+                ibit35 = IBITS(advc_flags_2(k,j,i),3,1)
+                ibit34 = IBITS(advc_flags_2(k,j,i),2,1)
+                ibit33 = IBITS(advc_flags_2(k,j,i),1,1)
+
+                k_ppp = k + 3 * ibit35
+                k_pp  = k + 2 * ( 1 - ibit33  )
+                k_mm  = k - 2 * ibit35
+
+                w_comp    = w(k+1,j,i) + w(k,j,i)
+                flux_t(k) = w_comp * rho_air(k+1) * (                        &
+                          ( 37.0_wp * ibit35 * adv_mom_5                        &
+                       +     7.0_wp * ibit34 * adv_mom_3                        &
+                       +              ibit33 * adv_mom_1                        &
+                          ) *                                                &
+                             ( w(k+1,j,i)  + w(k,j,i)     )                  &
+                   -      (  8.0_wp * ibit35 * adv_mom_5                        &
+                       +              ibit34 * adv_mom_3                        &
+                          ) *                                                &
+                             ( w(k_pp,j,i)  + w(k-1,j,i)  )                  &
+                   +      (           ibit35 * adv_mom_5                        &
+                          ) *                                                &
+                             ( w(k_ppp,j,i) + w(k_mm,j,i) )                  &
+                                       )
+
+                diss_t(k) = - ABS( w_comp ) * rho_air(k+1) * (               &
+                          ( 10.0_wp * ibit35 * adv_mom_5                        &
+                       +     3.0_wp * ibit34 * adv_mom_3                        &
+                       +              ibit33 * adv_mom_1                        &
+                          ) *                                                &
+                             ( w(k+1,j,i)   - w(k,j,i)    )                  &
+                   -      (  5.0_wp * ibit35 * adv_mom_5                        &
+                       +              ibit34 * adv_mom_3                        &
+                          ) *                                                &
+                             ( w(k_pp,j,i)  - w(k-1,j,i)  )                  &
+                   +      (           ibit35 * adv_mom_5                        &
+                          ) *                                                &
+                             ( w(k_ppp,j,i) - w(k_mm,j,i) )                  &
+                                               )
+!
+!--             Calculate the divergence of the velocity field. A respective
+!--             correction is needed to overcome numerical instabilities caused
+!--             by a not sufficient reduction of divergences near topography.
+                div = ( ( u_comp + gu - ( u(k+1,j,i) + u(k,j,i)   ) ) * ddx  &
+                    +   ( v_comp + gv - ( v(k+1,j,i) + v(k,j,i)   ) ) * ddy  &
+                    +   (   w_comp                    * rho_air(k+1) -       &
+                          ( w(k,j,i)   + w(k-1,j,i) ) * rho_air(k)           &
+                        ) * drho_air_zw(k) * ddzu(k+1)                       &
+                      ) * 0.5_wp
+
+                tend(k,j,i) = tend(k,j,i) - (                                 &
+                      ( flux_r(k) + diss_r(k)                                 &
+                    -   swap_flux_x_local_w(k,j) - swap_diss_x_local_w(k,j)   &
+                      ) * ddx                                                 &
+                    + ( flux_n(k) + diss_n(k)                                 &
+                    -   swap_flux_y_local_w(k)   - swap_diss_y_local_w(k)     &
+                      ) * ddy                                                 &
+                    + ( ( flux_t(k) + diss_t(k) )                             &
+                    -   ( flux_d    + diss_d    )                             &
+                      ) * drho_air_zw(k) * ddzu(k+1)                          &
+                                            )  + div * w(k,j,i)
+
+                swap_flux_x_local_w(k,j) = flux_r(k)
+                swap_diss_x_local_w(k,j) = diss_r(k)
+                swap_flux_y_local_w(k)   = flux_n(k)
+                swap_diss_y_local_w(k)   = diss_n(k)
+                flux_d                   = flux_t(k)
+                diss_d                   = diss_t(k)
+
+                sums_ws2_ws_l(k,tn)  = sums_ws2_ws_l(k,tn)                    &
+                      + ( flux_t(k)                                           &
+                       * ( w_comp - 2.0_wp * hom(k,1,3,0)                   ) &
+                       / ( w_comp + SIGN( 1.0E-20_wp, w_comp )              ) &
+                        + diss_t(k)                                           &
+                       *   ABS( w_comp - 2.0_wp * hom(k,1,3,0)              ) &
+                       / ( ABS( w_comp ) + 1.0E-20_wp                       ) &
+                        ) *   weight_substep(intermediate_timestep_count)
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE advec_w_ws
+
+ END MODULE advec_ws
Index: /palm/tags/release-6.0/SOURCE/average_3d_data.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/average_3d_data.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/average_3d_data.f90	(revision 3477)
@@ -0,0 +1,607 @@
+!> @file average_3d_data.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa. 
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Adjustment of biometeorology calls
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! (from resler branch)
+! Add biometeorology output,
+! fix for chemistry output,
+! move of urban surface output
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Further allocation checks implemented, case z0q* added
+! 
+! 2885 2018-03-14 11:02:46Z Giersch
+! Preliminary gust module interface implemented
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! Enable output of ground-heat flux also at urban surfaces.
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2742 2018-01-12 14:59:47Z suehring
+! Enable output of surface temperature
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! output of r_a moved from land-surface to consider also urban-type surfaces
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implement call for turbulence_closure_mod (TG)
+! Implementation of chemistry module (FK)
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc).  
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new surface concept - additional ghost point exchange 
+! of surface variable required
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean and rho_av to rho_ocean_av
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters,
+! changed prefix for urban surface model output to "usm_",
+! introduced control parameter varnamelength for LEN of trimvar.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added support for new urban surface model (temporary modifications of 
+! SELECT CASE ( ) necessary, see variable trimvar),
+! added comments in variable declaration section
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Output of land surface quantities is now done directly in the respective module
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Treat humidity and passive scalar separately
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of Obukhov length and radiative heating rates for RRTMG. 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Adapted for RRTMG
+! 
+! 1555 2015-03-04 17:44:27Z maronga
+! Added output of r_a and r_s
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added support for land surface and radiation model parameters.
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! +qc
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! averaging of nr, qr added
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 978 2012-08-09 08:28:32Z fricke
+! +z0h_av
+!
+! Revision 1.1  2006/02/23 09:48:58  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Time-averaging of 3d-data-arrays.
+!------------------------------------------------------------------------------!
+ SUBROUTINE average_3d_data
+ 
+
+    USE averaging
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_3d_data_averaging
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_3d_data_averaging
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_3d_data_averaging
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, average_count_3d, biometeorology, doav, doav_n,  &
+               land_surface, ocean_mode, urban_surface, varnamelength
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE gust_mod,                                                              &
+        ONLY:  gust_3d_data_averaging, gust_module_enabled
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_3d_data_averaging
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_3d_data_averaging
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_3d_data_averaging
+           
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_3d_data_averaging 
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_3d_data_averaging
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_average_3d_data
+
+
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i   !< loop index
+    INTEGER(iwp) ::  ii  !< loop index
+    INTEGER(iwp) ::  j   !< loop index
+    INTEGER(iwp) ::  k   !< loop index
+
+    CHARACTER (LEN=varnamelength) ::  trimvar  !< TRIM of output-variable string
+
+
+    CALL cpu_log (log_point(35),'average_3d_data','start')
+
+!
+!-- Check, if averaging is necessary
+    IF ( average_count_3d <= 1 )  RETURN
+
+!
+!-- Loop of all variables to be averaged.
+    DO  ii = 1, doav_n
+
+       trimvar = TRIM( doav(ii) )
+
+!
+!--    Store the array chosen on the temporary array.
+       SELECT CASE ( trimvar )
+
+          CASE ( 'e' )
+             IF ( ALLOCATED( e_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         e_av(k,j,i) = e_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ghf*' )
+             IF ( ALLOCATED( ghf_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      ghf_av(j,i) = ghf_av(j,i)                                   &
+                                    / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( ghf_av, nbgp )
+             ENDIF
+
+          CASE ( 'qsws*' )
+             IF ( ALLOCATED( qsws_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      qsws_av(j,i) = qsws_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( qsws_av, nbgp )
+             ENDIF
+
+          CASE ( 'thetal' )
+             IF ( ALLOCATED( lpt_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         lpt_av(k,j,i) = lpt_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'lwp*' )
+             IF ( ALLOCATED( lwp_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      lwp_av(j,i) = lwp_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+         CASE ( 'ol*' )
+             IF ( ALLOCATED( ol_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      ol_av(j,i) = ol_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( ol_av, nbgp )
+             ENDIF
+
+          CASE ( 'p' )
+             IF ( ALLOCATED( p_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         p_av(k,j,i) = p_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'pc' )
+             IF ( ALLOCATED( pc_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         pc_av(k,j,i) = pc_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'pr' )
+             IF ( ALLOCATED( pr_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         pr_av(k,j,i) = pr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'theta' )
+             IF ( ALLOCATED( pt_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'q' )
+             IF ( ALLOCATED( q_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql' )
+             IF ( ALLOCATED( ql_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql_c' )
+             IF ( ALLOCATED( ql_c_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_c_av(k,j,i) = ql_c_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql_v' )
+             IF ( ALLOCATED( ql_v_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_v_av(k,j,i) = ql_v_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql_vp' )
+             IF ( ALLOCATED( ql_vp_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_vp_av(k,j,i) = ql_vp_av(k,j,i) /                      &
+                                           REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qv' )
+             IF ( ALLOCATED( qv_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         qv_av(k,j,i) = qv_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+         CASE ( 'r_a*' )
+             IF ( ALLOCATED( r_a_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      r_a_av(j,i) = r_a_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( r_a_av, nbgp )
+             ENDIF
+
+          CASE ( 's' )
+             IF ( ALLOCATED( s_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         s_av(k,j,i) = s_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+         CASE ( 'shf*' )
+             IF ( ALLOCATED( shf_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      shf_av(j,i) = shf_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( shf_av, nbgp )
+             ENDIF
+
+          CASE ( 'ssws*' )
+             IF ( ALLOCATED( ssws_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      ssws_av(j,i) = ssws_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( ssws_av, nbgp )
+             ENDIF
+
+          CASE ( 't*' )
+             IF ( ALLOCATED( ts_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      ts_av(j,i) = ts_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( ts_av, nbgp )
+             ENDIF
+
+         CASE ( 'tsurf*' )
+             IF ( ALLOCATED( tsurf_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      tsurf_av(j,i) = tsurf_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( tsurf_av, nbgp )
+             ENDIF
+
+          CASE ( 'u' )
+             IF ( ALLOCATED( u_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         u_av(k,j,i) = u_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'us*' )
+             IF ( ALLOCATED( us_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      us_av(j,i) = us_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( us_av, nbgp )
+             ENDIF
+
+          CASE ( 'v' )
+             IF ( ALLOCATED( v_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         v_av(k,j,i) = v_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'thetav' )
+             IF ( ALLOCATED( vpt_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         vpt_av(k,j,i) = vpt_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'w' )
+             IF ( ALLOCATED( w_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         w_av(k,j,i) = w_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'z0*' )
+             IF ( ALLOCATED( z0_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      z0_av(j,i) = z0_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( z0_av, nbgp )
+             ENDIF
+
+          CASE ( 'z0h*' )
+             IF ( ALLOCATED( z0h_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      z0h_av(j,i) = z0h_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( z0h_av, nbgp )
+             ENDIF
+
+          CASE ( 'z0q*' )
+             IF ( ALLOCATED( z0q_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      z0q_av(j,i) = z0q_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz_2d( z0q_av, nbgp )
+             ENDIF
+
+          CASE DEFAULT
+!
+!--          Averaging of data from other modules
+             IF ( air_chemistry .AND. &
+                  (trimvar(1:3) == 'kc_' .OR. trimvar(1:3) == 'em_')  )  THEN
+                CALL chem_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+
+             IF ( bulk_cloud_model )  THEN
+                CALL bcm_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+
+             IF ( gust_module_enabled )  THEN
+                CALL gust_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+
+             IF ( land_surface )  THEN
+                CALL lsm_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+
+             IF ( ocean_mode )  THEN
+                CALL ocean_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+
+             IF ( radiation )  THEN
+                CALL radiation_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+             
+             IF ( salsa )  THEN
+                CALL salsa_3d_data_averaging( 'average', doav(ii) )
+             ENDIF             
+
+             IF ( biometeorology )  THEN
+                CALL biom_3d_data_averaging( 'average', doav(ii) )
+             ENDIF
+
+             CALL tcm_3d_data_averaging( 'average', doav(ii) )
+
+             IF ( urban_surface  .AND.  trimvar(1:4) == 'usm_' )  THEN
+                CALL usm_average_3d_data( 'average', doav(ii) )
+             ENDIF
+
+!
+!--          User-defined quantities
+             CALL user_3d_data_averaging( 'average', doav(ii) )
+
+       END SELECT
+
+    ENDDO
+
+!
+!-- Reset the counter
+    average_count_3d = 0.0
+
+    CALL cpu_log( log_point(35), 'average_3d_data', 'stop' )
+
+
+ END SUBROUTINE average_3d_data
Index: /palm/tags/release-6.0/SOURCE/basic_constants_and_equations_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/basic_constants_and_equations_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/basic_constants_and_equations_mod.f90	(revision 3477)
@@ -0,0 +1,361 @@
+!> @file basic_constants_and_equations_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! +degc_to_k 
+! 
+! 3361 2018-10-16 20:39:37Z knoop
+! New module (introduced with modularization of bulk cloud physics model)
+!
+! 
+!
+!
+! Description:
+! ------------
+!> This module contains all basic (physical) constants
+!> and
+!> functions for the calculation of diagnostic quantities.
+!------------------------------------------------------------------------------!
+ MODULE basic_constants_and_equations_mod
+
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    REAL(wp), PARAMETER ::  c_p = 1005.0_wp                           !< heat capacity of dry air (J kg-1 K-1)
+    REAL(wp), PARAMETER ::  degc_to_k = 273.15_wp                     !< temperature (in K) of 0 deg C (K)
+    REAL(wp), PARAMETER ::  g = 9.81_wp                               !< gravitational acceleration (m s-2)
+    REAL(wp), PARAMETER ::  kappa = 0.4_wp                            !< von Karman constant
+    REAL(wp), PARAMETER ::  l_m = 0.33E+06_wp                         !< latent heat of water melting (J kg-1)
+    REAL(wp), PARAMETER ::  l_v = 2.5E+06_wp                          !< latent heat of water vaporization (J kg-1)
+    REAL(wp), PARAMETER ::  l_s = l_m + l_v                           !< latent heat of water sublimation (J kg-1)
+    REAL(wp), PARAMETER ::  molecular_weight_of_nacl = 0.05844_wp     !< mol. m. NaCl (kg mol-1)
+    REAL(wp), PARAMETER ::  molecular_weight_of_c3h4o4 = 0.10406_wp   !< mol. m. malonic acid (kg mol-1)
+    REAL(wp), PARAMETER ::  molecular_weight_of_nh4no3 = 0.08004_wp   !< mol. m. ammonium sulfate (kg mol-1)
+    REAL(wp), PARAMETER ::  molecular_weight_of_water = 0.01801528_wp !< mol. m. H2O (kg mol-1)
+    REAL(wp), PARAMETER ::  pi = 3.141592654_wp                       !< PI
+    REAL(wp), PARAMETER ::  rho_l = 1.0E3_wp                          !< density of water (kg m-3)
+    REAL(wp), PARAMETER ::  rho_nacl = 2165.0_wp                      !< density of NaCl (kg m-3)
+    REAL(wp), PARAMETER ::  rho_c3h4o4 = 1600.0_wp                    !< density of malonic acid (kg m-3)
+    REAL(wp), PARAMETER ::  rho_nh4no3 = 1720.0_wp                    !< density of ammonium sulfate (kg m-3)
+    REAL(wp), PARAMETER ::  r_d = 287.0_wp                            !< sp. gas const. dry air (J kg-1 K-1)
+    REAL(wp), PARAMETER ::  r_v = 461.51_wp                           !< sp. gas const. water vapor (J kg-1 K-1)
+    REAL(wp), PARAMETER ::  sigma_sb = 5.67037E-08_wp                 !< Stefan-Boltzmann constant
+    REAL(wp), PARAMETER ::  solar_constant = 1368.0_wp                !< solar constant at top of atmosphere
+    REAL(wp), PARAMETER ::  vanthoff_nacl = 2.0_wp                    !< van't Hoff factor for NaCl
+    REAL(wp), PARAMETER ::  vanthoff_c3h4o4 = 1.37_wp                 !< van't Hoff factor for malonic acid
+    REAL(wp), PARAMETER ::  vanthoff_nh4no3 = 2.31_wp                 !< van't Hoff factor for ammonium sulfate
+
+    REAL(wp), PARAMETER ::  p_0 = 100000.0_wp                         !< standard pressure reference state
+
+    REAL(wp), PARAMETER ::  g_d_cp  = g   / c_p   !< precomputed g / c_p
+    REAL(wp), PARAMETER ::  lv_d_cp = l_v / c_p   !< precomputed l_v / c_p
+    REAL(wp), PARAMETER ::  lv_d_rd = l_v / r_d   !< precomputed l_v / r_d
+    REAL(wp), PARAMETER ::  rd_d_rv = 0.622_wp !r_d / r_v  !< precomputed r_d / r_v
+    REAL(wp), PARAMETER ::  rd_d_cp = 0.286_wp !r_d / c_p  !< precomputed r_d / c_p
+    REAL(wp), PARAMETER ::  cp_d_rd = 1.0_wp/0.286_wp !c_p / r_d  !< precomputed c_p / r_d
+
+    REAL(wp) ::  molecular_weight_of_solute = molecular_weight_of_nacl  !< mol. m. NaCl (kg mol-1)
+    REAL(wp) ::  rho_s = rho_nacl                                       !< density of NaCl (kg m-3)
+    REAL(wp) ::  vanthoff = vanthoff_nacl                               !< van't Hoff factor for NaCl
+
+
+    SAVE
+
+    PRIVATE magnus_0d, &
+            magnus_1d, &
+            ideal_gas_law_rho_0d, &
+            ideal_gas_law_rho_1d, &
+            ideal_gas_law_rho_pt_0d, &
+            ideal_gas_law_rho_pt_1d, &
+            exner_function_0d, &
+            exner_function_1d, &
+            exner_function_invers_0d, &
+            exner_function_invers_1d, &
+            barometric_formula_0d, &
+            barometric_formula_1d
+
+    INTERFACE magnus
+       MODULE PROCEDURE magnus_0d
+       MODULE PROCEDURE magnus_1d
+    END INTERFACE magnus
+
+    INTERFACE ideal_gas_law_rho
+       MODULE PROCEDURE ideal_gas_law_rho_0d
+       MODULE PROCEDURE ideal_gas_law_rho_1d
+    END INTERFACE ideal_gas_law_rho
+
+    INTERFACE ideal_gas_law_rho_pt
+       MODULE PROCEDURE ideal_gas_law_rho_pt_0d
+       MODULE PROCEDURE ideal_gas_law_rho_pt_1d
+    END INTERFACE ideal_gas_law_rho_pt
+
+    INTERFACE exner_function
+       MODULE PROCEDURE exner_function_0d
+       MODULE PROCEDURE exner_function_1d
+    END INTERFACE exner_function
+
+    INTERFACE exner_function_invers
+       MODULE PROCEDURE exner_function_invers_0d
+       MODULE PROCEDURE exner_function_invers_1d
+    END INTERFACE exner_function_invers
+
+    INTERFACE barometric_formula
+       MODULE PROCEDURE barometric_formula_0d
+       MODULE PROCEDURE barometric_formula_1d
+    END INTERFACE barometric_formula
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This function computes the magnus formula (Press et al., 1992).
+!> The magnus formula is needed to calculate the saturation vapor pressure
+!------------------------------------------------------------------------------!
+    FUNCTION magnus_0d( t )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN) ::  t  !< temperature (K)
+
+       REAL(wp) ::  magnus_0d
+!
+!--    Saturation vapor pressure for a specific temperature:
+       magnus_0d =  611.2_wp * EXP( 17.62_wp * ( t - degc_to_k ) /             &
+                                                   ( t - 29.65_wp  ) )
+
+    END FUNCTION magnus_0d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This function computes the magnus formula (Press et al., 1992).
+!> The magnus formula is needed to calculate the saturation vapor pressure
+!------------------------------------------------------------------------------!
+    FUNCTION magnus_1d( t )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  t  !< temperature (K)
+
+       REAL(wp), DIMENSION(size(t)) ::  magnus_1d
+!
+!--    Saturation vapor pressure for a specific temperature:
+       magnus_1d =  611.2_wp * EXP( 17.62_wp * ( t - degc_to_k ) /             &
+                                               ( t - 29.65_wp  ) )
+
+    END FUNCTION magnus_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the ideal gas law for scalar arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION ideal_gas_law_rho_0d( p, t )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN) ::  p  !< pressure (Pa)
+       REAL(wp), INTENT(IN) ::  t  !< temperature (K)
+
+       REAL(wp) ::  ideal_gas_law_rho_0d
+!
+!--    compute density according to ideal gas law:
+       ideal_gas_law_rho_0d = p / (r_d * t)
+
+    END FUNCTION ideal_gas_law_rho_0d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the ideal gas law for 1-D array arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION ideal_gas_law_rho_1d( p, t )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  p  !< pressure (Pa)
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  t  !< temperature (K)
+
+       REAL(wp), DIMENSION(size(p)) ::  ideal_gas_law_rho_1d
+!
+!--    compute density according to ideal gas law:
+       ideal_gas_law_rho_1d = p / (r_d * t)
+
+    END FUNCTION ideal_gas_law_rho_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the ideal gas law for scalar arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION ideal_gas_law_rho_pt_0d( p, t )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN) ::  p  !< pressure (Pa)
+       REAL(wp), INTENT(IN) ::  t  !< temperature (K)
+
+       REAL(wp) ::  ideal_gas_law_rho_pt_0d
+!
+!--    compute density according to ideal gas law:
+       ideal_gas_law_rho_pt_0d = p / (r_d * (1.0_wp / exner_function_invers(p)) * t)
+
+    END FUNCTION ideal_gas_law_rho_pt_0d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the ideal gas law for 1-D array arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION ideal_gas_law_rho_pt_1d( p, t )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  p  !< pressure (Pa)
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  t  !< temperature (K)
+
+       REAL(wp), DIMENSION(size(p)) ::  ideal_gas_law_rho_pt_1d
+!
+!--    compute density according to ideal gas law:
+       ideal_gas_law_rho_pt_1d = p / (r_d * (1.0_wp / exner_function_invers(p)) * t)
+
+    END FUNCTION ideal_gas_law_rho_pt_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the exner function for scalar arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION exner_function_0d( p )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN) ::  p    !< pressure (Pa)
+
+       REAL(wp) ::  exner_function_0d
+!
+!--    compute exner function:
+       exner_function_0d = ( p / p_0 )**( rd_d_cp )
+
+    END FUNCTION exner_function_0d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the exner function for 1-D array arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION exner_function_1d( p )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  p  !< pressure (Pa)
+
+       REAL(wp), DIMENSION(size(p)) ::  exner_function_1d
+!
+!--    compute exner function:
+       exner_function_1d = ( p / p_0 )**( rd_d_cp )
+
+    END FUNCTION exner_function_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the exner function for scalar arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION exner_function_invers_0d( p )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN) ::  p    !< pressure (Pa)
+
+       REAL(wp) ::  exner_function_invers_0d
+!
+!--    compute exner function:
+       exner_function_invers_0d = ( p_0 / p )**( rd_d_cp )
+
+    END FUNCTION exner_function_invers_0d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the exner function for 1-D array arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION exner_function_invers_1d( p )
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  p  !< pressure (Pa)
+
+       REAL(wp), DIMENSION(size(p)) ::  exner_function_invers_1d
+!
+!--    compute exner function:
+       exner_function_invers_1d = ( p_0 / p )**( rd_d_cp )
+
+    END FUNCTION exner_function_invers_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the barometric formula for scalar arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION barometric_formula_0d( z, t_0, p_0)
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN) ::  z    !< height (m)
+       REAL(wp), INTENT(IN) ::  t_0  !< temperature reference state (K)
+       REAL(wp), INTENT(IN) ::  p_0  !< surface pressure (Pa)
+
+       REAL(wp) ::  barometric_formula_0d
+!
+!--    compute barometric formula:
+       barometric_formula_0d =  p_0 * ( (t_0 - g_d_cp * z) / t_0 )**( cp_d_rd )
+
+    END FUNCTION barometric_formula_0d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the barometric formula for 1-D array arguments.
+!------------------------------------------------------------------------------!
+    FUNCTION barometric_formula_1d( z, t_0, p_0)
+
+       IMPLICIT NONE
+
+       REAL(wp), INTENT(IN), DIMENSION(:) ::  z  !< height (m)
+       REAL(wp), INTENT(IN) ::  t_0              !< temperature reference state (K)
+       REAL(wp), INTENT(IN) ::  p_0              !< surface pressure (Pa)
+
+       REAL(wp), DIMENSION(size(z)) ::  barometric_formula_1d
+!
+!--    compute barometric formula:
+       barometric_formula_1d =  p_0 * ( (t_0 - g_d_cp * z) / t_0 )**( cp_d_rd )
+
+    END FUNCTION barometric_formula_1d
+
+ END MODULE basic_constants_and_equations_mod
Index: /palm/tags/release-6.0/SOURCE/biometeorology_ipt_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/biometeorology_ipt_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/biometeorology_ipt_mod.f90	(revision 3477)
@@ -0,0 +1,615 @@
+!> @file biometeorology_ipt_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2019, Deutscher Wetterdienst (DWD) / 
+! German Meteorological Service (DWD) and
+! Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions: 001
+! -----------------
+! 
+! 
+! Former revisions: 001
+! -----------------
+! $Id$
+! Initial revision 001
+!
+! 
+!
+! Authors:
+! --------
+! @author Dominik Froehlich <dominik.froehlich@mailbox.org>
+!
+!
+! Description:
+! ------------
+!> Module for the calculation of the dynamic thermal index iPT
+!>
+!> @todo 
+!>
+!> @note nothing now
+!>
+!> @bug  no known bugs by now
+!------------------------------------------------------------------------------!
+ MODULE biometeorology_ipt_mod
+!
+!-- Load required variables from existing modules
+    USE kinds  !< to set precision of INTEGER and REAL arrays according to PALM
+
+    USE biometeorology_pt_mod,                                                 &
+       ONLY: saturation_vapor_pressure, deltapmv, dpmv_adj, dpmv_cold,         &
+             calc_sultr, pt_regression, ireq_neutral, iso_ridder
+
+    IMPLICIT NONE
+
+    PRIVATE  !-- No private interfaces --!
+
+    PUBLIC ipt_cycle, ipt_init
+
+!-- PALM interfaces:
+    INTERFACE ipt_cycle
+       MODULE PROCEDURE ipt_cycle
+    END INTERFACE ipt_cycle
+
+    INTERFACE ipt_init
+       MODULE PROCEDURE ipt_init
+    END INTERFACE ipt_init
+
+
+ CONTAINS
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The SUBROUTINE surface area calculates the surface area of the individual
+!> according to its height (m), weight (kg), and age (y)
+!------------------------------------------------------------------------------!
+ SUBROUTINE surface_area ( height_cm, weight, age, surf )
+
+    IMPLICIT NONE
+
+    REAL(wp)    , INTENT(in)  :: weight
+    REAL(wp)    , INTENT(in)  :: height_cm
+    INTEGER(iwp), INTENT(in)  :: age
+    REAL(wp)    , INTENT(out) :: surf
+    REAL(wp)                  :: height
+
+    height = height_cm * 100._wp
+
+!-- According to Gehan-George, for children
+    IF ( age < 19_iwp ) THEN
+       IF ( age < 5_iwp ) THEN
+          surf = 0.02667_wp * height**0.42246_wp * weight**0.51456_wp
+          RETURN
+       END IF
+       surf = 0.03050_wp * height**0.35129_wp * weight**0.54375_wp
+       RETURN
+    END IF
+
+!-- DuBois D, DuBois EF: A formula to estimate the approximate surface area if 
+!   height and weight be known. In: Arch. Int. Med.. 17, 1916, S. 863?871.
+    surf = 0.007184_wp * height**0.725_wp * weight**0.425_wp
+    RETURN
+
+ END SUBROUTINE surface_area
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The SUBROUTINE persdat calculates
+!>  - the total internal energy production = metabolic + workload,
+!>  - the total internal energy production for a standardized surface (actlev)
+!>  - the DuBois - area (a_surf [m2])
+!> from
+!>  - the persons age (years),
+!>  - weight (kg),
+!>  - height (m),
+!>  - sex (1 = male, 2 = female),
+!>  - work load (W)
+!> for a sample human.
+!------------------------------------------------------------------------------!
+ SUBROUTINE persdat ( age, weight, height, sex, work, a_surf, actlev )
+!
+    IMPLICIT NONE
+
+    REAL(wp), INTENT(in) ::  age
+    REAL(wp), INTENT(in) ::  weight
+    REAL(wp), INTENT(in) ::  height
+    REAL(wp), INTENT(in) ::  work
+    INTEGER(iwp), INTENT(in) ::  sex
+    REAL(wp), INTENT(out) ::  actlev
+    REAL(wp) ::  a_surf
+    REAL(wp) ::  energieumsatz
+    REAL(wp) ::  s
+    REAL(wp) ::  factor
+    REAL(wp) ::  heightundumsatz
+
+    CALL surface_area ( height, weight, INT( age ), a_surf )
+    s = height * 100._wp / ( weight ** ( 1._wp / 3._wp ) )
+    factor = 1._wp + .004_wp  * ( 30._wp - age )
+    heightundumsatz = 0.
+    IF ( sex == 1_iwp ) THEN
+       heightundumsatz = 3.45_wp * weight ** ( 3._wp / 4._wp ) * ( factor +    &
+                     .01_wp  * ( s - 43.4_wp ) )
+    ELSE IF ( sex == 2_iwp ) THEN
+       heightundumsatz = 3.19_wp * weight ** ( 3._wp / 4._wp ) * ( factor +    &
+                    .018_wp * ( s - 42.1_wp ) )
+    END IF
+
+    energieumsatz = work + heightundumsatz
+    actlev = energieumsatz / a_surf
+
+ END SUBROUTINE persdat
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> SUBROUTINE ipt_init
+!> initializes the instationary perceived temperature
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE ipt_init (age, weight, height, sex, work, actlev, clo,             &
+     ta, vp, vau1m, tmrt, pb, dt, storage, t_clothing,                         &
+     ipt )
+
+    IMPLICIT NONE
+
+!-- Input parameters
+    REAL(wp), INTENT(in) ::  age        !< Persons age          (years)
+    REAL(wp), INTENT(in) ::  weight     !< Persons weight       (kg)
+    REAL(wp), INTENT(in) ::  height     !< Persons height       (m)
+    REAL(wp), INTENT(in) ::  work       !< Current workload     (W)
+    REAL(wp), INTENT(in) ::  ta         !< Air Temperature      (°C)
+    REAL(wp), INTENT(in) ::  vp         !< Vapor pressure       (hPa)
+    REAL(wp), INTENT(in) ::  vau1m      !< Wind speed in approx. 1.1m (m/s)
+    REAL(wp), INTENT(in) ::  tmrt       !< Mean radiant temperature   (°C)
+    REAL(wp), INTENT(in) ::  pb         !< Air pressure         (hPa)
+    REAL(wp), INTENT(in) ::  dt         !< Timestep             (s)
+    INTEGER(iwp), INTENT(in)  :: sex    !< Persons sex (1 = male, 2 = female)
+
+!-- Output parameters
+    REAL(wp), INTENT(out) ::  actlev
+    REAL(wp), INTENT(out) ::  clo
+    REAL(wp), INTENT(out) ::  storage
+    REAL(wp), INTENT(out) ::  t_clothing
+    REAL(wp), INTENT(out) ::  ipt
+
+!-- Internal variables
+    REAL(wp), PARAMETER :: eps = 0.0005_wp
+    REAL(wp), PARAMETER :: eta = 0._wp
+    REAL(wp) ::  uclo
+    REAL(wp) ::  oclo
+    REAL(wp) ::  d_pmv
+    REAL(wp) ::  svp_tt
+    REAL(wp) ::  sult_lim
+    REAL(wp) ::  dgtcm
+    REAL(wp) ::  dgtcstd
+    REAL(wp) ::  clon
+    REAL(wp) ::  ireq_minimal
+    REAL(wp) ::  clo_fanger
+    REAL(wp) ::  pmv_o
+    REAL(wp) ::  pmv_u
+    REAL(wp) ::  pmva
+    REAL(wp) ::  ptc
+    REAL(wp) ::  d_std
+    REAL(wp) ::  pmvs
+    REAL(wp) ::  top
+    REAL(wp) ::  a_surf
+    REAL(wp) ::  acti
+    INTEGER(iwp) ::  nzaehl
+    INTEGER(iwp) ::  nerr_kalt
+    INTEGER(iwp) ::  nerr
+
+    LOGICAL ::  sultrieness
+
+    storage = 0._wp
+    CALL persdat ( age, weight, height, sex, work, a_surf, actlev )
+
+!-- Initialise
+    t_clothing = -999.0_wp
+    ipt        = -999.0_wp
+    nerr       = 0_wp
+    nzaehl     = 0_wp
+    sultrieness    = .FALSE.
+!-- Tresholds: clothing insulation (account for model inaccuracies)
+!-- Summer clothing
+    uclo     = 0.44453_wp
+!-- Winter clothing
+    oclo     = 1.76267_wp
+
+!-- Decision: firstly calculate for winter or summer clothing
+    IF ( ta <= 10._wp ) THEN
+
+!--    First guess: winter clothing insulation: cold stress
+       clo = oclo
+       t_clothing = -999.0_wp  ! force initial run
+       CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,        &
+          t_clothing, storage, dt, pmva )
+       pmv_o = pmva
+
+       IF ( pmva > 0._wp ) THEN
+
+!--       Case summer clothing insulation: heat load ?            
+          clo = uclo
+          t_clothing = -999.0_wp  ! force initial run
+          CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,     &
+             t_clothing, storage, dt, pmva )
+          pmv_u = pmva
+          IF ( pmva <= 0._wp ) THEN
+!--          Case: comfort achievable by varying clothing insulation 
+!            between winter and summer set values
+             CALL iso_ridder ( ta, tmrt, vp, vau1m, pb, actlev, eta , uclo,    &
+                            pmv_u, oclo, pmv_o, eps, pmva, top, nzaehl, clo )
+             IF ( nzaehl < 0_iwp ) THEN
+                nerr = -1_iwp
+                RETURN
+             ENDIF
+          ELSE IF ( pmva > 0.06_wp ) THEN
+             clo = 0.5_wp
+             t_clothing = -999.0_wp
+             CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,  &
+                t_clothing, storage, dt, pmva )
+          ENDIF
+       ELSE IF ( pmva < -0.11_wp ) THEN
+          clo = 1.75_wp
+          t_clothing = -999.0_wp
+          CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,     &
+             t_clothing, storage, dt, pmva )
+       ENDIF
+
+    ELSE
+
+!--    First guess: summer clothing insulation: heat load
+       clo = uclo
+       t_clothing = -999.0_wp
+       CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,        &
+          t_clothing, storage, dt, pmva )
+       pmv_u = pmva
+
+       IF ( pmva < 0._wp ) THEN
+
+!--       Case winter clothing insulation: cold stress ?
+          clo = oclo
+          t_clothing = -999.0_wp
+          CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,     &
+             t_clothing, storage, dt, pmva )
+          pmv_o = pmva
+
+          IF ( pmva >= 0._wp ) THEN
+
+!--          Case: comfort achievable by varying clothing insulation 
+!            between winter and summer set values
+             CALL iso_ridder ( ta, tmrt, vp, vau1m, pb, actlev, eta, uclo,     &
+                               pmv_u, oclo, pmv_o, eps, pmva, top, nzaehl, clo )
+             IF ( nzaehl < 0_wp ) THEN
+                nerr = -1_iwp
+                RETURN
+             ENDIF
+          ELSE IF ( pmva < -0.11_wp ) THEN
+             clo = 1.75_wp
+             t_clothing = -999.0_wp
+             CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,  &
+                t_clothing, storage, dt, pmva )
+          ENDIF
+       ELSE IF ( pmva > 0.06_wp ) THEN
+          clo = 0.5_wp
+          t_clothing = -999.0_wp
+          CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,     &
+             t_clothing, storage, dt, pmva )
+       ENDIF
+
+    ENDIF
+
+!-- Determine perceived temperature by regression equation + adjustments
+    pmvs = pmva
+    CALL pt_regression ( pmva, clo, ipt )
+    ptc = ipt
+    IF ( clo >= 1.75_wp .AND. pmva <= -0.11_wp ) THEN
+!--    Adjust for cold conditions according to Gagge 1986
+       CALL dpmv_cold ( pmva, ta, vau1m, tmrt, nerr_kalt, d_pmv )
+       IF ( nerr_kalt > 0_iwp ) nerr = -5_iwp
+       pmvs = pmva - d_pmv
+       IF ( pmvs > -0.11_wp ) THEN
+          d_pmv  = 0._wp
+          pmvs   = -0.11_wp
+       ENDIF
+       CALL pt_regression ( pmvs, clo, ipt )
+    ENDIF
+    clo_fanger = clo
+    clon = clo
+    IF ( clo > 0.5_wp .AND. ipt <= 8.73_wp ) THEN
+!--    Required clothing insulation (ireq) is exclusively defined for 
+!      operative temperatures (top) less 10 (C) for a 
+!      reference wind of 0.2 m/s according to 8.73 (C) for 0.1 m/s
+       clon = ireq_neutral ( ipt, ireq_minimal, nerr )
+       clo = clon
+    ENDIF
+    CALL calc_sultr ( ptc, dgtcm, dgtcstd, sult_lim )
+    sultrieness    = .FALSE.
+    d_std      = -99._wp
+    IF ( pmva > 0.06_wp .AND. clo <= 0.5_wp ) THEN
+!--    Adjust for warm/humid conditions according to Gagge 1986
+       CALL saturation_vapor_pressure ( ta, svp_tt )
+       d_pmv  = deltapmv ( pmva, ta, vp, svp_tt, tmrt, vau1m, nerr )
+       pmvs   = pmva + d_pmv
+       CALL pt_regression ( pmvs, clo, ipt )
+       IF ( sult_lim < 99._wp ) THEN
+          IF ( (ipt - ptc) > sult_lim ) sultrieness = .TRUE.
+       ENDIF
+    ENDIF
+
+ 
+ END SUBROUTINE ipt_init
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> SUBROUTINE ipt_cycle
+!> Calculates one timestep for the instationary version of perceived
+!> temperature (iPT, °C) for
+!>  - standard measured/predicted meteorological values and TMRT 
+!>    as input;
+!>  - regressions for determination of PT;
+!>  - adjustment to Gagge's PMV* (2-node-model, 1986) as base of PT 
+!>    under warm/humid conditions (Icl= 0.50 clo) and under cold 
+!>    conditions (Icl= 1.75 clo)
+!>
+!------------------------------------------------------------------------------!
+ SUBROUTINE ipt_cycle( ta, vp, vau1m, tmrt, pb, dt, storage, t_clothing, clo,  &
+     actlev, work, ipt )
+
+    IMPLICIT NONE
+
+!-- Type of input of the argument list
+    REAL(wp), INTENT ( IN )  ::  ta      !< Air temperature             (°C)
+    REAL(wp), INTENT ( IN )  ::  vp      !< Vapor pressure              (hPa)
+    REAL(wp), INTENT ( IN )  ::  tmrt    !< Mean radiant temperature    (°C)
+    REAL(wp), INTENT ( IN )  ::  vau1m   !< Wind speed                  (m/s)
+    REAL(wp), INTENT ( IN )  ::  pb      !< Air pressure                (hPa)
+    REAL(wp), INTENT ( IN )  ::  dt      !< Timestep                    (s)
+    REAL(wp), INTENT ( IN )  ::  clo     !< Clothing index              (no dim)
+    REAL(wp), INTENT ( IN )  ::  actlev  !< Internal heat production    (W)
+    REAL(wp), INTENT ( IN )  ::  work    !< Mechanical work load        (W)
+
+!-- In and output parameters
+    REAL(wp), INTENT (INOUT) ::  storage     !< Heat storage            (W)
+    REAL(wp), INTENT (INOUT) ::  t_clothing  !< Clothig temperature     (°C)
+
+!-- Type of output of the argument list
+    REAL(wp), INTENT ( OUT ) ::  ipt  !< Instationary perceived temperature (°C)
+
+!-- Type of program variables
+    REAL(wp), PARAMETER ::  eps = 0.0005_wp
+    REAL(wp) ::  d_pmv
+    REAL(wp) ::  pmv_o
+    REAL(wp) ::  pmv_s
+    REAL(wp) ::  storage_rate
+    REAL(wp) ::  ener_in
+    REAL(wp) ::  svp_tt
+    REAL(wp) ::  sult_lim
+    REAL(wp) ::  dgtcm
+    REAL(wp) ::  dgtcstd
+    REAL(wp) ::  clon
+    REAL(wp) ::  ireq_minimal
+    REAL(wp) ::  clo_fanger
+    REAL(wp) ::  pmv_u
+    REAL(wp) ::  half_hour_frac
+    REAL(wp) ::  storage_delta
+    REAL(wp) ::  storage_delta_max
+    REAL(wp) ::  pmva
+    REAL(wp) ::  ptc
+    REAL(wp) ::  d_std
+    REAL(wp) ::  pmvs
+    REAL(wp) ::  top
+    INTEGER(iwp) ::  nzaehl
+    INTEGER(iwp) ::  nerr_kalt
+    INTEGER(iwp) ::  nerr
+
+    LOGICAL ::  sultrieness
+
+!-- Initialise
+    ipt = -999.0_wp
+
+    nerr     = 0_iwp
+    nzaehl   = 0_iwp
+    sultrieness  = .FALSE.
+
+!-- Determine pmv_adjusted for current conditions
+    CALL fanger_s_acti ( ta, tmrt, vp, vau1m, pb, clo, actlev, work,           &
+       t_clothing, storage, dt, pmva )
+    pmv_s = pmva  !< PMV considering storage
+
+!-- Determine perceived temperature by regression equation + adjustments
+    CALL pt_regression ( pmva, clo, ipt )
+
+    IF ( clo >= 1.75_wp .AND. pmva <= -0.11_wp ) THEN
+!--    Adjust for cold conditions according to Gagge 1986
+       CALL dpmv_cold ( pmva, ta, vau1m, tmrt, nerr_kalt, d_pmv )
+       IF ( nerr_kalt > 0_iwp ) nerr = -5_iwp
+       pmvs = pmva - d_pmv
+       IF ( pmvs > -0.11_wp ) THEN
+          d_pmv  = 0._wp
+          pmvs   = -0.11_wp
+       ENDIF
+       CALL pt_regression ( pmvs, clo, ipt )
+    ENDIF
+
+!-- Consider sultriness if appropriate
+    ptc = ipt
+    CALL calc_sultr ( ptc, dgtcm, dgtcstd, sult_lim )
+    sultrieness    = .FALSE.
+    d_std      = -99._wp
+    IF ( pmva > 0.06_wp .AND. clo <= 0.5_wp ) THEN
+!--    Adjust for warm/humid conditions according to Gagge 1986
+       CALL saturation_vapor_pressure ( ta, svp_tt )
+       d_pmv  = deltapmv ( pmva, ta, vp, svp_tt, tmrt, vau1m, nerr )
+       pmvs   = pmva + d_pmv
+       CALL pt_regression ( pmvs, clo, ipt )
+       IF ( sult_lim < 99._wp ) THEN
+          IF ( (ipt - ptc) > sult_lim ) sultrieness = .TRUE.
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE ipt_cycle
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> SUBROUTINE fanger_s calculates the 
+!> actual Predicted Mean Vote (dimensionless) according 
+!> to Fanger corresponding to meteorological (tt,tmrt,pa,vau,pb) 
+!> and individual variables (clo, actlev, eta) considering a storage
+!> and clothing temperature for a given timestep.
+!------------------------------------------------------------------------------!
+ SUBROUTINE fanger_s_acti( tt, tmrt, pa, in_vau, pb, in_clo, actlev,           &
+    activity, t_cloth, s, dt, pmva )
+
+    IMPLICIT NONE
+
+!--  Input argument types
+    REAL(wp), INTENT ( IN )  ::  tt       !< Air temperature          (°C)
+    REAL(wp), INTENT ( IN )  ::  tmrt     !< Mean radiant temperature (°C)
+    REAL(wp), INTENT ( IN )  ::  pa       !< Vapour pressure          (hPa)
+    REAL(wp), INTENT ( IN )  ::  pb       !< Air pressure             (hPa)
+    REAL(wp), INTENT ( IN )  ::  in_vau   !< Wind speed               (m/s)
+    REAL(wp), INTENT ( IN )  ::  actlev   !< Metabolic + work energy  (W/m²)
+    REAL(wp), INTENT ( IN )  ::  dt       !< Timestep                 (s)
+    REAL(wp), INTENT ( IN )  ::  activity !< Work load                (W/m²)
+    REAL(wp), INTENT ( IN )  ::  in_clo   !< Clothing index (clo)     (no dim)
+
+!-- Output argument types
+    REAL(wp), INTENT ( OUT ) ::  pmva  !< actual Predicted Mean Vote (no dim)
+
+    REAL(wp), INTENT (INOUT) ::  s  !< storage var. of energy balance (W/m2)
+    REAL(wp), INTENT (INOUT) ::  t_cloth  !< clothing temperature (°C)
+
+!-- Internal variables
+    REAL(wp) ::  f_cl
+    REAL(wp) ::  heat_convection
+    REAL(wp) ::  t_skin_aver
+    REAL(wp) ::  bc
+    REAL(wp) ::  cc
+    REAL(wp) ::  dc
+    REAL(wp) ::  ec
+    REAL(wp) ::  gc
+    REAL(wp) ::  hr
+    REAL(wp) ::  clo
+    REAL(wp) ::  vau
+    REAL(wp) ::  z1
+    REAL(wp) ::  z2
+    REAL(wp) ::  z3
+    REAL(wp) ::  z4
+    REAL(wp) ::  z5
+    REAL(wp) ::  z6
+    REAL(wp) ::  en
+    REAL(wp) ::  d_s
+    REAL(wp) ::  t_clothing   !< Clothing index value   (dimensionless)
+    REAL(wp) ::  adjustrate
+    REAL(wp) ::  adjustrate_cloth
+    REAL(wp), PARAMETER  ::  time_equil = 7200._wp
+    INTEGER(iwp) ::  i
+    INTEGER(iwp) ::  niter  !< Running index
+
+
+!-- Clo must be > 0. to avoid div. by 0!
+    clo = in_clo
+    IF ( clo < 001._wp ) clo = .001_wp
+
+!-- Increase in surface due to clothing
+    f_cl = 1._wp + .15_wp * clo
+
+!-- Case of free convection (vau < 0.1 m/s ) not considered
+    vau = in_vau
+    IF ( vau < .1_wp ) THEN
+       vau = .1_wp
+    ENDIF
+
+!-- Heat_convection = forced convection
+    heat_convection = 12.1_wp * SQRT ( vau * pb / 1013.25_wp )
+
+!-- Average skin temperature
+    t_skin_aver = 35.7_wp - .0275_wp * activity
+
+!-- Calculation of constants for evaluation below
+    bc = .155_wp * clo * 3.96_wp * 10._wp**( -8._wp ) * f_cl
+    cc = f_cl * heat_convection
+    ec = .155_wp * clo
+    dc = ( 1._wp + ec * cc ) / bc
+    gc = ( t_skin_aver + bc * ( tmrt + 273.2_wp )**4._wp + ec * cc * tt ) / bc
+
+!-- Calculation of clothing surface temperature (t_clothing) based on
+!   newton-approximation with air temperature as initial guess
+    niter = dt
+    adjustrate = 1._wp - EXP ( -1._wp * ( 10._wp / time_equil ) * dt )
+    IF ( adjustrate >= 1._wp ) adjustrate = 1._wp
+    adjustrate_cloth = adjustrate * 30._wp
+    t_clothing = t_cloth
+
+    IF ( t_cloth <= -998.0_wp ) THEN  ! If initial run
+       niter = 3_wp
+       adjustrate = 1._wp
+       adjustrate_cloth = 1._wp
+       t_clothing = tt
+    ENDIF
+
+    DO i = 1, niter
+       t_clothing = t_clothing - adjustrate_cloth * ( ( t_clothing +           &
+          273.2_wp )**4._wp + t_clothing *                                     &
+          dc - gc ) / ( 4._wp * ( t_clothing + 273.2_wp )**3._wp + dc )
+    ENDDO
+
+!-- Empiric factor for the adaption of the heat ballance equation
+!   to the psycho-physical scale (Equ. 40 in FANGER)
+    z1 = ( .303_wp * EXP ( -.036_wp * actlev ) + .0275_wp )
+
+!-- Water vapour diffution through the skin
+    z2 = .31_wp * ( 57.3_wp - .07_wp * activity-pa )
+
+!-- Sweat evaporation from the skin surface
+    z3 = .42_wp * ( activity - 58._wp )
+
+!-- Loss of latent heat through respiration
+    z4 = .0017_wp * actlev * ( 58.7_wp - pa ) + .0014_wp * actlev *            &
+      ( 34._wp - tt )
+
+!-- Loss of radiational heat
+    z5 = 3.96e-8_wp * f_cl * ( ( t_clothing + 273.2_wp )**4 - ( tmrt +         &
+       273.2_wp )**4 )
+
+!-- Heat loss through forced convection
+    z6 = cc * ( t_clothing - tt )
+
+!-- Write together as energy ballance
+    en = activity - z2 - z3 - z4 - z5 - z6
+
+!-- Manage storage
+    d_s = adjustrate * en + ( 1._wp - adjustrate ) * s
+
+!-- Predicted Mean Vote
+    pmva = z1 * d_s
+
+!-- Update storage
+    s = d_s
+    t_cloth = t_clothing
+
+ END SUBROUTINE fanger_s_acti
+
+
+ END MODULE biometeorology_ipt_mod
Index: /palm/tags/release-6.0/SOURCE/biometeorology_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/biometeorology_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/biometeorology_mod.f90	(revision 3477)
@@ -0,0 +1,1429 @@
+!> @file biometeorology_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2018-2018 Deutscher Wetterdienst (DWD)
+! Copyright 2018-2018 Institute of Computer Science, Academy of Sciences, Prague
+! Copyright 2018-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add option for using MRT from RTM instead of simplified global value
+! 
+! 3464 2018-10-30 18:08:55Z kanani
+! From branch resler@3462, pavelkrc:
+! make use of basic_constants_and_equations_mod
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Initial revision
+!
+! 
+!
+! Authors:
+! --------
+! @author Dominik Froehlich <dominik.froehlich@dwd.de>
+! @author Jaroslav Resler <resler@cs.cas.cz>
+!
+!
+! Description:
+! ------------
+!> Human thermal comfort module calculating thermal perception of a sample
+!> human being under the current meteorological conditions.
+!>
+!> @todo Alphabetical sorting of "USE ..." lists, "ONLY" list, variable declarations
+!>       (per subroutine: first all CHARACTERs, then INTEGERs, LOGICALs, REALs, )
+!> @todo Comments start with capital letter --> "!-- Include..." 
+!> @todo Variable and routine names strictly in lowercase letters and in English
+!>
+!> @note nothing now
+!>
+!> @bug  no known bugs by now
+!------------------------------------------------------------------------------!
+ MODULE biometeorology_mod
+
+    USE arrays_3d,                                                             &
+       ONLY:  pt, p, u, v, w, q
+
+    USE averaging,                                                             &
+       ONLY:  pt_av, q_av, u_av, v_av, w_av
+
+    USE basic_constants_and_equations_mod,                                     &
+       ONLY:  degc_to_k, magnus, sigma_sb
+
+    USE biometeorology_ipt_mod
+
+    USE biometeorology_pet_mod
+
+    USE biometeorology_pt_mod,                                                 &
+       ONLY: calculate_pt_static
+
+    USE biometeorology_utci_mod
+
+    USE control_parameters,                                                    &
+       ONLY:  average_count_3d, biometeorology, dz, dz_stretch_factor,         &
+              dz_stretch_level, humidity, initializing_actions, nz_do3d,       &
+              simulated_time, surface_pressure
+
+    USE grid_variables,                                                        &
+       ONLY:  ddx, dx, ddy, dy
+
+    USE indices,                                                               &
+       ONLY:  nxl, nxr, nys, nyn, nzb, nzt, nys, nyn, nxl, nxr
+
+    USE kinds  !< Set precision of INTEGER and REAL arrays according to PALM
+
+!-- Import radiation model to obtain input for mean radiant temperature
+    USE radiation_model_mod,                                                   &
+       ONLY: ix, iy, iz, id, mrt_nlevels, mrt_include_sw,                      &
+             mrtinsw, mrtinlw, mrtbl, nmrtbl, radiation,                       &
+             radiation_interactions, rad_sw_in,                                &
+             rad_sw_out, rad_lw_in, rad_lw_out
+
+    USE surface_mod,                                                           &
+       ONLY: get_topography_top_index_ji
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+!-- Declare all global variables within the module (alphabetical order)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tmrt_grid  !< tmrt results (Â°C)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pt_grid    !< PT results   (Â°C)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  utci_grid  !< UTCI results (Â°C)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pet_grid   !< PET results  (Â°C)
+!-- Grids for averaged thermal indices       
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pt_av_grid    !< PT results (aver. input)   (Â°C)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  utci_av_grid  !< UTCI results (aver. input) (Â°C)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pet_av_grid   !< PET results (aver. input)  (Â°C)
+!-- Grids for radiation_model
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  biom_mrt     !< biometeorology mean radiant temperature for each MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  biom_mrt_av  !< time average mean
+
+    INTEGER( iwp ) ::  biom_cell_level     !< cell level biom calculates for
+    REAL ( wp )    ::  biom_output_height  !< height output is calculated in m
+    REAL ( wp )    ::  time_biom_results   !< the time, the last set of biom results have been calculated for
+    REAL ( wp ), PARAMETER ::  human_absorb = 0.7_wp  !< SW absorbtivity of a human body (Fanger 1972)
+    REAL ( wp ), PARAMETER ::  human_emiss = 0.97_wp  !< LW emissivity of a human body after (Fanger 1972)
+!--
+
+    LOGICAL ::  aver_pt  = .FALSE.  !< switch: do pt averaging in this module? (if .FALSE. this is done globally)
+    LOGICAL ::  aver_q   = .FALSE.  !< switch: do e  averaging in this module?
+    LOGICAL ::  aver_u   = .FALSE.  !< switch: do u  averaging in this module?
+    LOGICAL ::  aver_v   = .FALSE.  !< switch: do v  averaging in this module?
+    LOGICAL ::  aver_w   = .FALSE.  !< switch: do w  averaging in this module?
+    LOGICAL ::  average_trigger_pt   = .FALSE.  !< update averaged input on call to biom_pt?
+    LOGICAL ::  average_trigger_utci = .FALSE.  !< update averaged input on call to biom_utci?
+    LOGICAL ::  average_trigger_pet  = .FALSE.  !< update averaged input on call to biom_pet?
+
+    LOGICAL ::  mrt_from_rtm   = .TRUE.   !< switch: use mrt calculated by RTM for calculation of thermal indices
+    LOGICAL ::  biom_pt        = .TRUE.   !< Turn index PT (instant. input) on or off
+    LOGICAL ::  biom_pt_av     = .TRUE.   !< Turn index PT (averaged input) on or off
+    LOGICAL ::  biom_pet       = .TRUE.   !< Turn index PET (instant. input) on or off
+    LOGICAL ::  biom_pet_av    = .TRUE.   !< Turn index PET (averaged input) on or off
+    LOGICAL ::  biom_utci      = .TRUE.   !< Turn index UTCI (instant. input) on or off
+    LOGICAL ::  biom_utci_av   = .TRUE.   !< Turn index UTCI (averaged input) on or off
+
+!-- Add INTERFACES that must be available to other modules (alphabetical order)
+
+    PUBLIC biom_3d_data_averaging, biom_check_data_output,                     &
+    biom_calculate_static_grid, biom_calc_ipt,                                 &
+    biom_check_parameters, biom_data_output_3d, biom_data_output_2d,           &
+    biom_define_netcdf_grid, biom_determine_input_at, biom_header, biom_init,  &
+    biom_init_arrays, biom_parin, biom_pt, biom_pt_av, biom_pet, biom_pet_av,  &
+    biom_utci, biom_utci_av, time_biom_results
+
+!
+!-- PALM interfaces:
+!
+!-- 3D averaging for HTCM _INPUT_ variables
+    INTERFACE biom_3d_data_averaging
+       MODULE PROCEDURE biom_3d_data_averaging
+    END INTERFACE biom_3d_data_averaging
+
+!-- Calculate static thermal indices PT, UTCI and/or PET
+    INTERFACE biom_calculate_static_grid
+       MODULE PROCEDURE biom_calculate_static_grid
+    END INTERFACE biom_calculate_static_grid
+
+!-- Calculate the dynamic index iPT (to be caled by the agent model)
+    INTERFACE biom_calc_ipt
+       MODULE PROCEDURE biom_calc_ipt
+    END INTERFACE biom_calc_ipt
+
+!-- Data output checks for 2D/3D data to be done in check_parameters
+     INTERFACE biom_check_data_output
+        MODULE PROCEDURE biom_check_data_output
+     END INTERFACE biom_check_data_output
+
+!-- Input parameter checks to be done in check_parameters
+    INTERFACE biom_check_parameters
+       MODULE PROCEDURE biom_check_parameters
+    END INTERFACE biom_check_parameters
+
+!-- Data output of 2D quantities
+    INTERFACE biom_data_output_2d
+       MODULE PROCEDURE biom_data_output_2d
+    END INTERFACE biom_data_output_2d
+
+!-- no 3D data, thus, no averaging of 3D data, removed
+    INTERFACE biom_data_output_3d
+       MODULE PROCEDURE biom_data_output_3d
+    END INTERFACE biom_data_output_3d
+
+!-- Definition of data output quantities
+    INTERFACE biom_define_netcdf_grid
+       MODULE PROCEDURE biom_define_netcdf_grid
+    END INTERFACE biom_define_netcdf_grid
+
+!-- Obtains all relevant input values to estimate local thermal comfort/stress
+    INTERFACE biom_determine_input_at
+       MODULE PROCEDURE biom_determine_input_at
+    END INTERFACE biom_determine_input_at
+
+!-- Output of information to the header file
+    INTERFACE biom_header
+       MODULE PROCEDURE biom_header
+    END INTERFACE biom_header
+
+!-- Initialization actions 
+    INTERFACE biom_init
+       MODULE PROCEDURE biom_init
+    END INTERFACE biom_init
+
+!-- Initialization of arrays
+    INTERFACE biom_init_arrays
+       MODULE PROCEDURE biom_init_arrays
+    END INTERFACE biom_init_arrays
+
+!-- Reading of NAMELIST parameters
+    INTERFACE biom_parin
+       MODULE PROCEDURE biom_parin
+    END INTERFACE biom_parin
+
+ 
+ CONTAINS
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sum up and time-average biom input quantities as well as allocate
+!> the array necessary for storing the average.
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_3d_data_averaging( mode, variable )
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode     !< 
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'biom_mrt' )
+                IF ( .NOT. ALLOCATED( biom_mrt_av ) )  THEN
+                   ALLOCATE( biom_mrt_av(nmrtbl) )
+                ENDIF
+                biom_mrt_av = 0.0_wp
+
+          CASE ( 'biom_pt', 'biom_utci', 'biom_pet' )
+
+!--          Indices in unknown order as depending on input file, determine 
+!            first index to average und update only once
+             IF ( .NOT. average_trigger_pt .AND. .NOT. average_trigger_utci    &
+                .AND. .NOT. average_trigger_pet ) THEN
+                IF ( TRIM( variable ) == 'biom_pt' ) THEN
+                    average_trigger_pt = .TRUE.
+                ENDIF
+                IF ( TRIM( variable ) == 'biom_utci' ) THEN
+                    average_trigger_utci = .TRUE.
+                ENDIF
+                IF ( TRIM( variable ) == 'biom_pet' ) THEN
+                    average_trigger_pet = .TRUE.
+                ENDIF
+             ENDIF
+
+!--          Only continue if updateindex
+             IF ( average_trigger_pt   .AND. TRIM( variable ) /= 'biom_pt')   RETURN
+             IF ( average_trigger_utci .AND. TRIM( variable ) /= 'biom_utci') RETURN
+             IF ( average_trigger_pet  .AND. TRIM( variable ) /= 'biom_pet')  RETURN
+
+!--          Set averaging switch to .TRUE. if not done by other module before!
+             IF ( .NOT. ALLOCATED( pt_av ) )  THEN
+                ALLOCATE( pt_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
+                aver_pt = .TRUE.
+             ENDIF
+             pt_av = 0.0_wp
+
+             IF ( .NOT. ALLOCATED( q_av ) )  THEN
+                ALLOCATE( q_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
+                aver_q = .TRUE.
+             ENDIF
+             q_av = 0.0_wp
+
+             IF ( .NOT. ALLOCATED( u_av ) )  THEN
+                ALLOCATE( u_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
+                aver_u = .TRUE.
+             ENDIF
+             u_av = 0.0_wp
+
+             IF ( .NOT. ALLOCATED( v_av ) )  THEN
+                ALLOCATE( v_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
+                aver_v = .TRUE.
+             ENDIF
+             v_av = 0.0_wp
+
+             IF ( .NOT. ALLOCATED( w_av ) )  THEN
+                ALLOCATE( w_av(nzb:nzt+1,nys:nyn,nxl:nxr) )
+                aver_w = .TRUE.
+             ENDIF
+             w_av = 0.0_wp
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'biom_mrt' )
+             IF ( ALLOCATED( biom_mrt_av ) )  THEN
+
+                 IF ( nmrtbl > 0 )  THEN
+                    IF ( mrt_include_sw )  THEN
+                       biom_mrt_av(:) = biom_mrt_av(:) + &
+                          ((human_absorb*mrtinsw(:) + human_emiss*mrtinlw(:))  &
+                          / (human_emiss*sigma_sb)) ** .25_wp - degc_to_k
+                    ELSE
+                       biom_mrt_av(:) = biom_mrt_av(:) + &
+                          (human_emiss * mrtinlw(:) / sigma_sb) ** .25_wp      &
+                          - degc_to_k
+                    ENDIF
+                 ENDIF
+             ENDIF
+
+          CASE ( 'biom_pt', 'biom_utci', 'biom_pet' )
+
+!--          Only continue if updateindex
+             IF ( average_trigger_pt   .AND. TRIM( variable ) /= 'biom_pt')    &
+                RETURN
+             IF ( average_trigger_utci .AND. TRIM( variable ) /= 'biom_utci')  &
+                RETURN
+             IF ( average_trigger_pet  .AND. TRIM( variable ) /= 'biom_pet')   &
+                RETURN
+
+             IF ( ALLOCATED( pt_av ) .AND. aver_pt ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( q_av )  .AND. aver_q ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         q_av(k,j,i) = q_av(k,j,i) + q(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( u_av )  .AND. aver_u ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         u_av(k,j,i) = u_av(k,j,i) + u(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( v_av )  .AND. aver_v ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         v_av(k,j,i) = v_av(k,j,i) + v(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( w_av )  .AND. aver_w ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         w_av(k,j,i) = w_av(k,j,i) + w(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+           CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'biom_mrt' )
+             IF ( ALLOCATED( biom_mrt_av ) )  THEN
+                biom_mrt_av(:) = biom_mrt_av(:) / REAL( average_count_3d, KIND=wp )
+             ENDIF
+
+          CASE ( 'biom_pt', 'biom_utci', 'biom_pet' )
+
+!--          Only continue if update index
+             IF ( average_trigger_pt   .AND. TRIM( variable ) /= 'biom_pt')    &
+                RETURN
+             IF ( average_trigger_utci .AND. TRIM( variable ) /= 'biom_utci')  &
+                RETURN
+             IF ( average_trigger_pet  .AND. TRIM( variable ) /= 'biom_pet')   &
+                RETURN
+
+             IF ( ALLOCATED( pt_av ) .AND. aver_pt ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         pt_av(k,j,i) = pt_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( q_av ) .AND. aver_q ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         q_av(k,j,i) = q_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( u_av ) .AND. aver_u ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         u_av(k,j,i) = u_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( v_av ) .AND. aver_v ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         v_av(k,j,i) = v_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( ALLOCATED( w_av ) .AND. aver_w ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         w_av(k,j,i) = w_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+!--          Udate thermal indices with derived averages
+             CALL biom_calculate_static_grid ( .TRUE. )
+
+        END SELECT
+
+    ENDIF
+
+
+ END SUBROUTINE biom_3d_data_averaging
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for biometeorology model
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_check_data_output( var, unit )
+
+       USE control_parameters,                                                 &
+           ONLY: data_output, message_string
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit     !< The unit for the variable var
+       CHARACTER (LEN=*) ::  var      !< The variable in question
+
+
+                unit = 'Â°C'
+                IF ( .NOT. biometeorology ) THEN
+                  message_string = 'output of "' // TRIM( var ) // '" req' //  &
+                        'uires biometeorology = .TRUE. in initialisati' &
+                        // 'on_parameters'
+                  CALL message( 'check_parameters', 'PA0114', 1, 2, 0, 6, 0 )
+                  unit = 'illegal'
+                ENDIF
+                IF ( .NOT.  radiation ) THEN
+                   message_string = 'output of "' // TRIM( var ) // '" require'&
+                                    // 's radiation = .TRUE.'
+                   CALL message( 'check_parameters', 'PA0509', 1, 2, 0, 6, 0 )
+                   unit = 'illegal'
+                ENDIF
+                IF ( mrt_nlevels == 0 ) THEN
+                   message_string = 'output of "' // TRIM( var ) // '" require'&
+                                    // 's mrt_nlevels > 0'
+                   CALL message( 'check_parameters', 'PA0510', 1, 2, 0, 6, 0 )
+                   unit = 'illegal'
+                ENDIF
+
+ END SUBROUTINE biom_check_data_output
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for biom module
+!> check_parameters 1302
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_check_parameters
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+
+    IMPLICIT NONE
+
+
+!--    Disabled as long as radiation model not available
+       IF ( .NOT. radiation )  THEN
+          message_string = 'The human thermal comfort module does require ' // &
+                           'radiation information in terms of the mean ' //    &
+                           'radiant temperature, but radiation is not enabled!'
+          CALL message( 'check_parameters', 'PAHU01', 0, 0, 0, 6, 0 )
+       ENDIF
+
+       IF ( .NOT. humidity )  THEN
+          message_string = 'The human thermal comfort module does require ' // &
+                           'air humidity information, but humidity module ' // &
+                           'is disabled!'
+          CALL message( 'check_parameters', 'PAHU02', 0, 0, 0, 6, 0 )
+       ENDIF
+
+ END SUBROUTINE biom_check_parameters
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables (dummy, always 2d!)
+!> data_output_3d 709ff
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+
+    USE indices
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+!-- Input variables
+    CHARACTER (LEN=*), INTENT(IN) ::  variable   !< Char identifier to select var for output
+    INTEGER(iwp), INTENT(IN) ::  av       !< Use averaged data? 0 = no, 1 = yes?
+    INTEGER(iwp), INTENT(IN) ::  nzb_do   !< Unused. 2D. nz bottom to nz top
+    INTEGER(iwp), INTENT(IN) ::  nzt_do   !< Unused.
+
+!-- Output variables
+    LOGICAL, INTENT(OUT) ::  found   !< Output found?
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf   !< Temp. result grid to return
+
+!-- Internal variables
+    INTEGER(iwp) ::  l    !< Running index, radiation grid
+    INTEGER(iwp) ::  i    !< Running index, x-dir
+    INTEGER(iwp) ::  j    !< Running index, y-dir
+    INTEGER(iwp) ::  k    !< Running index, z-dir
+
+    CHARACTER (LEN=:), allocatable ::  variable_short  !< Trimmed version of char variable
+
+    REAL(wp), PARAMETER ::  fill_value = -999._wp
+    REAL(wp) ::  mrt  !< Buffer for mean radiant temperature
+
+    found = .TRUE.
+    variable_short = TRIM( variable )
+
+    IF ( variable_short(1:4) /= 'biom' ) THEN
+!--   Nothing to do, set found to FALSE and return immediatelly
+      found = .FALSE.
+      RETURN
+    ENDIF
+
+    SELECT CASE ( variable_short )
+
+        CASE ( 'biom_mrt' )
+
+            local_pf = REAL( fill_value, KIND = wp )
+            DO  l = 1, nmrtbl
+                i = mrtbl(ix,l)
+                j = mrtbl(iy,l)
+                k = mrtbl(iz,l)
+                IF ( mrt_include_sw )  THEN
+                    mrt = ((human_absorb*mrtinsw(l) + human_emiss*mrtinlw(l)) &
+                           / (human_emiss*sigma_sb)) ** .25_wp
+                ELSE
+                    mrt = (human_emiss*mrtinlw(l) / sigma_sb) ** .25_wp
+                ENDIF
+                local_pf(i,j,k) = mrt
+            ENDDO
+
+        CASE ( 'biom_tmrt' )        ! 2d-array
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( tmrt_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+
+        CASE ( 'biom_pt' )        ! 2d-array
+            IF ( av == 0 )  THEN
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( pt_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+            ELSE
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( pt_av_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+            END IF
+
+        CASE ( 'biom_utci' )        ! 2d-array
+            IF ( av == 0 )  THEN
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( utci_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+            ELSE
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( utci_av_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+            END IF
+
+        CASE ( 'biom_pet' )        ! 2d-array
+            IF ( av == 0 )  THEN
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( pet_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+            ELSE
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb_do) = REAL( pet_av_grid(j,i), sp )
+                 ENDDO
+              ENDDO
+            END IF
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+ END SUBROUTINE biom_data_output_3d
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 2D output variables
+!> data_output_2d 1188ff
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_data_output_2d( av, variable, found, grid, local_pf,          &
+                                      two_d, nzb_do, nzt_do, fill_value )
+
+    USE indices,                                                               &
+       ONLY: nxl, nxl, nxr, nxr, nyn, nyn, nys, nys, nzb, nzt
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+!-- Input variables
+    CHARACTER (LEN=*), INTENT(IN) ::  variable    !< Char identifier to select var for output
+    INTEGER(iwp), INTENT(IN)      ::  av          !< Use averaged data? 0 = no, 1 = yes?
+    INTEGER(iwp), INTENT(IN)      ::  nzb_do      !< Unused. 2D. nz bottom to nz top
+    INTEGER(iwp), INTENT(IN)      ::  nzt_do      !< Unused.
+    REAL(wp), INTENT(in)          ::  fill_value  !< Fill value for unassigned locations
+
+!-- Output variables
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid   !< Grid type (always "zu1" for biom)
+    LOGICAL, INTENT(OUT)           ::  found  !< Output found?
+    LOGICAL, INTENT(OUT)           ::  two_d  !< Flag parameter that indicates 2D variables, horizontal cross sections, must be .TRUE.
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf  !< Temp. result grid to return
+
+!-- Internal variables
+    CHARACTER (LEN=:), allocatable ::  variable_short  !< Trimmed version of char variable
+    INTEGER(iwp) ::  i        !< Running index, x-dir
+    INTEGER(iwp) ::  j        !< Running index, y-dir
+    INTEGER(iwp) ::  k        !< Running index, z-dir
+
+
+    found = .TRUE.
+    variable_short = TRIM( variable )
+    IF ( variable_short(1:4) == 'biom' ) THEN
+       two_d = .TRUE.
+       grid = 'zu1'
+    ELSE
+       found = .FALSE.
+       grid  = 'none'
+       RETURN
+    ENDIF
+
+    local_pf = fill_value
+
+    SELECT CASE ( variable_short )
+
+
+        CASE ( 'biom_tmrt_xy' )        ! 2d-array
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,1) = tmrt_grid(j,i)
+                 ENDDO
+              ENDDO
+
+
+        CASE ( 'biom_pt_xy' )        ! 2d-array
+            IF ( av == 0 )  THEN
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb+1) = pt_grid(j,i)
+                 ENDDO
+              ENDDO
+            ELSE
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb+1) = pt_av_grid(j,i)
+                 ENDDO
+              ENDDO
+            END IF
+
+
+        CASE ( 'biom_utci_xy' )        ! 2d-array
+            IF ( av == 0 )  THEN
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb+1) = utci_grid(j,i)
+                 ENDDO
+              ENDDO
+            ELSE
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb+1) = utci_av_grid(j,i)
+                 ENDDO
+              ENDDO
+            END IF
+
+
+        CASE ( 'biom_pet_xy' )        ! 2d-array
+            IF ( av == 0 )  THEN
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb+1) = pet_grid(j,i)
+                 ENDDO
+              ENDDO
+            ELSE
+              DO  i = nxl, nxr
+                 DO  j = nys, nyn
+                    local_pf(i,j,nzb+1) = pet_av_grid(j,i)
+                 ENDDO
+              ENDDO
+            END IF
+
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+
+
+ END SUBROUTINE biom_data_output_2d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf_interface_mod.
+!> netcdf_interface_mod 918ff
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+
+    IMPLICIT NONE
+
+!-- Input variables
+    CHARACTER (LEN=*), INTENT(IN)  ::  var      !< Name of output variable
+
+!-- Output variables
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_x   !< x grid of output variable
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_y   !< y grid of output variable
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_z   !< z grid of output variable
+
+    LOGICAL, INTENT(OUT)           ::  found    !< Flag if output var is found
+
+!-- Local variables
+    LOGICAL      :: is2d  !< Var is 2d?
+
+    INTEGER(iwp) :: l     !< Length of the var array
+
+
+    found  = .FALSE.
+    grid_x = 'none'
+    grid_y = 'none'
+    grid_z = 'none'
+
+    l = MAX( 2, LEN_TRIM( var ) )
+    is2d = ( var(l-1:l) == 'xy' )
+
+
+    IF ( var(1:4) == 'biom' ) THEN
+       found  = .TRUE.
+       grid_x = 'x'
+       grid_y = 'y'
+       grid_z = 'zu'
+       IF ( is2d ) grid_z = 'zu1'
+    ENDIF
+
+ END SUBROUTINE biom_define_netcdf_grid
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for biom module
+!> header 982
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_header( io )
+
+    IMPLICIT NONE
+
+!-- Input variables
+    INTEGER(iwp), INTENT(IN) ::  io           !< Unit of the output file
+
+!-- Internal variables
+    CHARACTER (LEN=86) ::  output_height_chr  !< String for output height
+
+    WRITE( output_height_chr, '(F8.1,7X)' )  biom_output_height
+!
+!-- Write biom header
+    WRITE( io, 1 )
+    WRITE( io, 2 )  TRIM( output_height_chr )
+    WRITE( io, 3 )  TRIM( ACHAR( biom_cell_level ) )
+
+1   FORMAT (//' Human thermal comfort module information:'/                    &
+              ' ------------------------------'/)
+2   FORMAT ('    --> All indices calculated for a height of (m): ', A )
+3   FORMAT ('    --> This corresponds to cell level : ', A )
+
+ END SUBROUTINE biom_header
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the HTCM
+!> init_3d_model 1987ff
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_init
+
+    USE control_parameters,                                                 &
+        ONLY: message_string
+
+    IMPLICIT NONE
+
+!-- Internal vriables
+    REAL ( wp )  :: height  !< current height in meters
+
+    INTEGER ( iwp )  :: i  !< iteration index
+
+!-- Determine cell level corresponding to 1.1 m above ground level
+!   (gravimetric center of sample human)
+
+    time_biom_results = 0.0_wp
+    biom_cell_level = 0_iwp
+    biom_output_height = 0.5_wp * dz(1)
+    height = 0.0_wp
+
+    biom_cell_level = INT ( 1.099_wp / dz(1) )
+    biom_output_height = biom_output_height + biom_cell_level * dz(1)
+
+    IF ( .NOT. radiation_interactions .AND. mrt_from_rtm ) THEN
+       message_string = 'The mrt_from_rtm switch require ' // &
+                        'enabled radiation_interactions but it ' // &
+                        'is disabled! Set mrt_from_rtm to .F.'
+       CALL message( 'check_parameters', 'PAHU03', 0, 0, -1, 6, 0 )
+       mrt_from_rtm = .FALSE.
+    ENDIF
+
+ END SUBROUTINE biom_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate biom arrays and define pointers if required
+!> init_3d_model 1047ff
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_init_arrays
+
+    IMPLICIT NONE
+
+!-- Allocate a temporary array with the desired output dimensions.
+!   Initialization omitted for performance, will be overwritten anyway
+    IF ( .NOT. ALLOCATED( tmrt_grid ) ) THEN
+      ALLOCATE( tmrt_grid (nys:nyn,nxl:nxr) )
+    ENDIF
+
+    IF ( biom_pt ) THEN
+      IF ( .NOT. ALLOCATED( pt_grid ) ) THEN
+        ALLOCATE( pt_grid (nys:nyn,nxl:nxr) )
+      ENDIF
+    ENDIF
+
+    IF ( biom_utci ) THEN
+      IF ( .NOT. ALLOCATED( utci_grid ) ) THEN
+        ALLOCATE( utci_grid (nys:nyn,nxl:nxr) )
+      ENDIF
+    ENDIF
+
+    IF ( biom_pet ) THEN
+      IF ( .NOT. ALLOCATED( pet_grid ) ) THEN
+        ALLOCATE( pet_grid (nys:nyn,nxl:nxr) )
+      ENDIF
+    END IF
+
+    IF ( biom_pt_av ) THEN
+      IF ( .NOT. ALLOCATED( pt_av_grid ) ) THEN
+        ALLOCATE( pt_av_grid (nys:nyn,nxl:nxr) )
+      ENDIF
+    ENDIF
+
+    IF ( biom_utci_av ) THEN
+      IF ( .NOT. ALLOCATED( utci_av_grid ) ) THEN
+        ALLOCATE( utci_av_grid (nys:nyn,nxl:nxr) )
+      ENDIF
+    ENDIF
+
+    IF ( biom_pet_av ) THEN
+      IF ( .NOT. ALLOCATED( pet_av_grid ) ) THEN
+        ALLOCATE( pet_av_grid (nys:nyn,nxl:nxr) )
+      ENDIF
+
+    END IF
+
+ END SUBROUTINE biom_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &biometeorology_parameters for reading biomet parameters
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_parin
+
+    IMPLICIT NONE
+
+!
+!-- Internal variables
+    CHARACTER (LEN=80) ::  line  !< Dummy string for current line in parameter file 
+
+    NAMELIST /biometeorology_parameters/  mrt_from_rtm,                        &
+                                          biom_pet,                            &
+                                          biom_pet_av,                         &
+                                          biom_pt,                             &
+                                          biom_pt_av,                          &
+                                          biom_utci,                           &
+                                          biom_utci_av
+
+
+!-- Try to find biometeorology_parameters namelist
+    REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&biometeorology_parameters' ) == 0 )
+       READ ( 11, '(A)', END = 20 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read biometeorology_parameters namelist
+    READ ( 11, biometeorology_parameters, ERR = 10, END = 20 )
+
+!
+!-- Set flag that indicates that the biomet_module is switched on
+    biometeorology = .TRUE.
+
+    GOTO 20
+
+!
+!-- In case of error
+ 10 BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'biometeorology_parameters', line )
+
+!
+!-- Complete
+ 20 CONTINUE
+
+
+ END SUBROUTINE biom_parin
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the mean radiant temperature (tmrt) based on the Six-directions
+!> method according to VDI 3787 2.
+!------------------------------------------------------------------------------!
+ SUBROUTINE calculate_tmrt_6_directions( SW_N, SW_E, SW_S, SW_W,               &
+    SW_U, SW_D, LW_N, LW_E, LW_S, LW_W, LW_U, LW_D, tmrt )
+
+    IMPLICIT NONE
+
+!-- Type of input of the argument list
+!   Short- (SW_) and longwave (LW_) radiation fluxes from the six directions
+!   North (N), East (E), South (S), West (W), up (U) and down (D)
+    REAL(wp), INTENT ( IN )  ::  SW_N  !< Sw radflux density from N    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  SW_E  !< Sw radflux density from E    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  SW_S  !< Sw radflux density from S    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  SW_W  !< Sw radflux density from W    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  SW_U  !< Sw radflux density from U    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  SW_D  !< Sw radflux density from D    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  LW_N  !< Lw radflux density from N    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  LW_E  !< Lw radflux density from E    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  LW_S  !< Lw radflux density from S    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  LW_W  !< Lw radflux density from W    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  LW_U  !< Lw radflux density from U    (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  LW_D  !< Lw radflux density from D    (W/mÂ²)
+
+!-- Type of output of the argument list
+    REAL(wp), INTENT ( OUT ) ::  tmrt  !< Mean radiant temperature (Â°C)
+
+!-- Directional weighting factors
+    REAL(wp), PARAMETER      ::  weight_h  = 0.22_wp
+    REAL(wp), PARAMETER      ::  weight_v  = 0.06_wp
+
+    REAL(wp) ::  nrfd           !<  Net radiation flux density (W/mÂ²)
+
+!-- Initialise
+    nrfd = 0._wp
+
+!-- Compute mean radiation flux density absorbed by rotational symetric human
+    nrfd = ( weight_h * ( human_absorb * SW_N + human_emiss * LW_N ) ) +       &
+       ( weight_h * ( human_absorb * SW_E + human_emiss * LW_E ) ) +           &
+       ( weight_h * ( human_absorb * SW_S + human_emiss * LW_S ) ) +           &
+       ( weight_h * ( human_absorb * SW_W + human_emiss * LW_W ) ) +           &
+       ( weight_v * ( human_absorb * SW_U + human_emiss * LW_U ) ) +           &
+       ( weight_v * ( human_absorb * SW_D + human_emiss * LW_D ) )
+
+!-- Compute mean radiant temperature
+    tmrt = ( nrfd / (human_emiss * sigma_sb) )**0.25_wp - degc_to_k
+
+ END SUBROUTINE calculate_tmrt_6_directions
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Very crude approximation of mean radiant temperature based on upwards and 
+!> downwards radiation fluxes only (other directions curently not available, 
+!> replace as soon as possible!)
+!------------------------------------------------------------------------------!
+ SUBROUTINE calculate_tmrt_2_directions( sw_u, sw_d, lw_u, lw_d, ta, tmrt )
+
+    IMPLICIT NONE
+
+!-- Type of input of the argument list
+    REAL(wp), INTENT ( IN )  ::  sw_u  !< Shortwave radiation flux density from upper direction (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  sw_d  !< Shortwave radiation flux density from lower direction (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  lw_u  !< Longwave radiation flux density from upper direction (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  lw_d  !< Longwave radiation flux density from lower direction (W/mÂ²)
+    REAL(wp), INTENT ( IN )  ::  ta    !< Air temperature (Â°C)
+
+!-- Type of output of the argument list
+    REAL(wp), INTENT ( OUT ) ::  tmrt  !< mean radiant temperature, (Â°C)
+
+!-- Directional weighting factors and parameters
+    REAL(wp), PARAMETER ::  weight_h  = 0.22_wp     !< Weight for horizontal radiational gain after Fanger (1972)
+    REAL(wp), PARAMETER ::  weight_v  = 0.06_wp     !< Weight for vertical radiational gain after Fanger (1972)
+
+!-- Other internal variables
+    REAL(wp) ::  sw_in
+    REAL(wp) ::  sw_out
+    REAL(wp) ::  lw_in
+    REAL(wp) ::  lw_out
+    REAL(wp) ::  nrfd     !< Net radiation flux density (W/mÂ²)
+    REAL(wp) ::  lw_air   !< Longwave emission by surrounding air volume (W/mÂ²)
+    REAL(wp) ::  sw_side  !< Shortwave immission from the sides (W/mÂ²)
+
+    INTEGER(iwp) ::  no_input  !< Count missing input radiation fluxes
+
+!-- initialise
+    sw_in    = sw_u
+    sw_out   = sw_d
+    lw_in    = lw_u
+    lw_out   = lw_d
+    nrfd     = 0._wp
+    no_input = 0_iwp
+
+!-- test for missing input data
+    IF ( sw_in <= -998._wp .OR. sw_out <= -998._wp .OR. lw_in <= -998._wp .OR. &
+       lw_out <= -998._wp .OR. ta <= -998._wp ) THEN
+       IF ( sw_in <= -998._wp ) THEN
+          sw_in = 0.
+          no_input = no_input + 1
+       ENDIF
+       IF ( sw_out <= -998._wp ) THEN
+          sw_out = 0.
+          no_input = no_input + 1
+       ENDIF
+       IF ( lw_in <= -998._wp ) THEN
+          lw_in = 0.
+          no_input = no_input + 1
+       ENDIF
+       IF ( lw_out <= -998._wp ) THEN
+          lw_out = 0.
+          no_input = no_input + 1
+       ENDIF
+
+!-- Accept two missing radiation flux directions, fail otherwise as error might become too large
+       IF ( ta <= -998._wp .OR. no_input >= 3 ) THEN
+          tmrt = -999._wp
+          RETURN
+       ENDIF
+    ENDIF
+
+    sw_side = sw_in * 0.125_wp  ! distribute half of upper sw_in to the 4 sides
+    lw_air = ( sigma_sb * 0.95_wp * ( ta + degc_to_k )**4 )
+
+!-- Compute mean radiation flux density absorbed by rotational symetric human
+    nrfd = ( weight_h * ( human_absorb * sw_side + human_emiss * lw_air ) ) +         &
+       ( weight_h * ( human_absorb * sw_side + human_emiss * lw_air ) ) +             &
+       ( weight_h * ( human_absorb * sw_side + human_emiss * lw_air ) ) +             &
+       ( weight_h * ( human_absorb * sw_side + human_emiss * lw_air ) ) +             &
+       ( weight_v * ( human_absorb * (sw_in * 0.5_wp) + human_emiss * lw_in ) ) +     &
+       ( weight_v * ( human_absorb * sw_out + human_emiss * lw_out ) )
+
+!-- Compute mean radiant temperature
+    tmrt = ( nrfd / (human_emiss * sigma_sb) )**0.25_wp - degc_to_k
+
+ END SUBROUTINE calculate_tmrt_2_directions
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate static thermal indices for given meteorological conditions
+!------------------------------------------------------------------------------!
+ SUBROUTINE calculate_static_thermal_indices ( ta, vp, ws, pair, tmrt,         &
+    pt_static, utci_static, pet_static )
+
+    IMPLICIT NONE
+
+!-- Input parameters
+    REAL(wp), INTENT ( IN )  ::  ta           !< Air temperature                  (Â°C)
+    REAL(wp), INTENT ( IN )  ::  vp           !< Vapour pressure                  (hPa)
+    REAL(wp), INTENT ( IN )  ::  ws           !< Wind speed    (local level)      (m/s)
+    REAL(wp), INTENT ( IN )  ::  pair         !< Air pressure                     (hPa)
+    REAL(wp), INTENT ( IN )  ::  tmrt         !< Mean radiant temperature         (Â°C)
+!-- Output parameters
+    REAL(wp), INTENT ( OUT ) ::  pt_static    !< Perceived temperature            (Â°C)
+    REAL(wp), INTENT ( OUT ) ::  utci_static  !< Universal thermal climate index  (Â°C)
+    REAL(wp), INTENT ( OUT ) ::  pet_static   !< Physiologically equivalent temp. (Â°C)
+!-- Temporary field, not used here
+    REAL(wp)                 ::  clo          !< Clothing index (no dim.)
+
+    clo = -999._wp
+
+    IF ( biom_pt ) THEN
+!-- Estimate local perceived temperature
+       CALL calculate_pt_static( ta, vp, ws, tmrt, pair, clo, pt_static )
+    ENDIF
+
+    IF ( biom_utci ) THEN
+!-- Estimate local universal thermal climate index
+       CALL calculate_utci_static( ta, vp, ws, tmrt, biom_output_height,       &
+          utci_static )
+    ENDIF
+
+    IF ( biom_pet ) THEN
+!-- Estimate local physiologically equivalent temperature
+       CALL calculate_pet_static( ta, vp, ws, tmrt, pair, pet_static )
+    ENDIF
+
+ END SUBROUTINE calculate_static_thermal_indices
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate static thermal indices for 2D grid point i, j
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_determine_input_at( average_input, i, j, ta, vp, ws, pair,    &
+    tmrt )
+
+    IMPLICIT NONE
+
+!-- Input variables
+    LOGICAL,      INTENT ( IN ) ::  average_input  !< Determine averaged input conditions?
+    INTEGER(iwp), INTENT ( IN ) ::  i     !< Running index, x-dir
+    INTEGER(iwp), INTENT ( IN ) ::  j     !< Running index, y-dir
+
+!-- Output parameters
+    REAL(wp), INTENT ( OUT )    ::  tmrt  !< Mean radiant temperature        (Â°C)
+    REAL(wp), INTENT ( OUT )    ::  ta    !< Air temperature                 (Â°C)
+    REAL(wp), INTENT ( OUT )    ::  vp    !< Vapour pressure                 (hPa)
+    REAL(wp), INTENT ( OUT )    ::  ws    !< Wind speed    (local level)     (m/s)
+    REAL(wp), INTENT ( OUT )    ::  pair  !< Air pressure                    (hPa)
+
+!-- Internal variables
+    INTEGER(iwp)                ::  k     !< Running index, z-dir
+    INTEGER(iwp)                ::  k_wind  !< Running index, z-dir, wind speed only
+
+    REAL(wp)                    ::  vp_sat  !< Saturation vapor pressure     (hPa)
+
+
+!-- Determine cell level closest to 1.1m above ground
+!   by making use of truncation due to int cast
+    k = get_topography_top_index_ji(j, i, 's') + biom_cell_level  !< Vertical cell center closest to 1.1m
+    k_wind = k
+    IF( k_wind < 1_iwp ) THEN  ! Avoid horizontal u and v of 0.0 m/s close to ground
+       k_wind = 1_iwp
+    ENDIF
+
+!-- Determine local values:
+    IF ( average_input ) THEN
+!--    Calculate ta from Tp assuming dry adiabatic laps rate
+       ta = pt_av(k, j, i) - ( 0.0098_wp * dz(1) * (  k + .5_wp ) ) - degc_to_k
+
+       vp = 0.034_wp
+       IF ( humidity .AND. ALLOCATED( q_av ) ) THEN
+          vp = q_av(k, j, i)
+       ENDIF
+
+       ws = ( 0.5_wp * ABS( u_av(k_wind, j, i) + u_av(k_wind, j, i+1) )  +     &
+          0.5_wp * ABS( v_av(k_wind, j, i) + v_av(k_wind, j+1, i) )  +         &
+          0.5_wp * ABS( w_av(k_wind, j, i) + w_av(k_wind+1, j, i) ) )
+    ELSE
+!-- Calculate ta from Tp assuming dry adiabatic laps rate
+       ta = pt(k, j, i) - ( 0.0098_wp * dz(1) * (  k + .5_wp ) ) - degc_to_k
+
+       vp = q(k, j, i)
+
+       ws = ( 0.5_wp * ABS( u(k_wind, j, i) + u(k_wind, j, i+1) )  +           &
+          0.5_wp * ABS( v(k_wind, j, i) + v(k_wind, j+1, i) )  +               &
+          0.5_wp * ABS( w(k_wind, j, i) + w(k_wind+1, j, i) ) )
+
+    ENDIF
+
+!-- Local air pressure
+    pair = surface_pressure
+!
+!-- Calculate water vapour pressure at saturation and convert to hPa
+!-- The magnus formula is limited to temperatures up to 333.15 K to
+!   avoid negative values of vp_sat
+    vp_sat = 0.01_wp * magnus( MIN( ta + degc_to_k, 333.15_wp ) )
+    vp  = vp * pair / ( vp + 0.622_wp )
+    IF ( vp > vp_sat ) vp = vp_sat
+
+    tmrt = ta
+    IF ( radiation ) THEN
+       IF ( mrt_from_rtm ) THEN
+          tmrt = tmrt_grid(j, i)
+       ELSE
+          CALL calculate_tmrt_2_directions (rad_sw_in(0, j, i),                &
+             rad_sw_out(0, j, i), rad_lw_in(0, j, i), rad_lw_out(0, j, i), ta, &
+             tmrt )
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE biom_determine_input_at
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate static thermal indices for any point within a 2D grid
+!> time_integration.f90: 1065ff
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_calculate_static_grid ( average_input )
+
+    IMPLICIT NONE
+
+!-- Input attributes
+    LOGICAL, INTENT ( IN ) ::  average_input  !< Calculate based on averaged input? conditions?
+
+!-- Internal variables
+    INTEGER(iwp) ::  i, j, k, l   !< Running index
+
+    REAL(wp) ::  ta            !< Air temperature                  (Â°C)
+    REAL(wp) ::  vp            !< Vapour pressure                  (hPa)
+    REAL(wp) ::  ws            !< Wind speed    (local level)      (m/s)
+    REAL(wp) ::  pair          !< Air pressure                     (hPa)
+    REAL(wp) ::  tmrt_tmp      !< Mean radiant temperature
+    REAL(wp) ::  pt_tmp        !< Perceived temperature
+    REAL(wp) ::  utci_tmp      !< Universal thermal climate index
+    REAL(wp) ::  pet_tmp       !< Physiologically equivalent temperature
+
+
+    CALL biom_init_arrays
+
+    IF ( mrt_from_rtm ) THEN
+       tmrt_grid = -999._wp
+       DO  l = 1, nmrtbl
+           i = mrtbl(ix,l)
+           j = mrtbl(iy,l)
+           k = mrtbl(iz,l)
+           IF ( k - get_topography_top_index_ji( j, i, 's' ) == 1  ) THEN
+              IF ( mrt_include_sw )  THEN
+                  tmrt_tmp = ((human_absorb*mrtinsw(l) + human_emiss*mrtinlw(l)) &
+                             / (human_emiss*sigma_sb)) ** .25_wp
+              ELSE
+                  tmrt_tmp = (human_emiss*mrtinlw(l) / sigma_sb) ** .25_wp
+              ENDIF
+              tmrt_grid(j, i) = tmrt_tmp - degc_to_k
+           ENDIF
+       ENDDO
+    ENDIF
+
+    DO i = nxl, nxr
+       DO j = nys, nyn
+!--       Determine local input conditions
+          CALL biom_determine_input_at ( average_input, i, j, ta, vp, ws,      &
+               pair, tmrt_tmp )
+          tmrt_grid(j, i) = tmrt_tmp
+
+!--       Only proceed if tmrt is available
+          IF ( tmrt_tmp <= -998._wp ) THEN
+             pt_tmp   = -999._wp
+             utci_tmp = -999._wp
+             pet_tmp  = -999._wp
+             CYCLE
+          END IF
+
+!--       Calculate static thermal indices based on local tmrt
+          CALL calculate_static_thermal_indices ( ta, vp, ws,                  &
+             pair, tmrt_tmp, pt_tmp, utci_tmp, pet_tmp )
+
+          IF ( average_input ) THEN
+!--          Write results for selected averaged indices
+             IF ( biom_pt_av )  THEN
+                pt_av_grid(j, i)   = pt_tmp
+             END IF
+             IF ( biom_utci_av ) THEN
+                utci_av_grid(j, i) = utci_tmp
+             END IF
+             IF ( biom_pet_av ) THEN
+                pet_av_grid(j, i)  = pet_tmp
+             END IF
+          ELSE
+!--          Write result for selected indices
+             IF ( biom_pt )  THEN
+                pt_grid(j, i)   = pt_tmp
+             END IF
+             IF ( biom_utci ) THEN
+                utci_grid(j, i) = utci_tmp
+             END IF
+             IF ( biom_pet ) THEN
+                pet_grid(j, i)  = pet_tmp
+             END IF
+          END IF
+
+       END DO
+    END DO
+
+ END SUBROUTINE biom_calculate_static_grid
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate dynamic thermal indices (currently only iPT, but expandable)
+!------------------------------------------------------------------------------!
+ SUBROUTINE biom_calc_ipt( ta, vp, ws, pair, tmrt, dt, energy_storage,         &
+    t_clo, clo, actlev, age, weight, height, work, sex, ipt )
+
+    IMPLICIT NONE
+
+!-- Input parameters
+    REAL(wp), INTENT ( IN )  ::  ta   !< Air temperature                  (Â°C)
+    REAL(wp), INTENT ( IN )  ::  vp   !< Vapour pressure                  (hPa)
+    REAL(wp), INTENT ( IN )  ::  ws   !< Wind speed    (local level)      (m/s)
+    REAL(wp), INTENT ( IN )  ::  pair !< Air pressure                     (hPa)
+    REAL(wp), INTENT ( IN )  ::  tmrt !< Mean radiant temperature         (Â°C)
+    REAL(wp), INTENT ( IN )  ::  dt   !< Time past since last calculation (s)
+    REAL(wp), INTENT ( IN )  ::  age  !< Age of agent                     (y)
+    REAL(wp), INTENT ( IN )  ::  weight  !< Weight of agent               (Kg)
+    REAL(wp), INTENT ( IN )  ::  height  !< Height of agent               (m)
+    REAL(wp), INTENT ( IN )  ::  work    !< Mechanical workload of agent
+                                         !  (without metabolism!)         (W)
+    INTEGER(iwp), INTENT ( IN ) ::  sex  !< Sex of agent (1 = male, 2 = female)
+
+!-- Both, input and output parameters
+    Real(wp), INTENT ( INOUT )  ::  energy_storage    !< Energy storage   (W/mÂ²)
+    Real(wp), INTENT ( INOUT )  ::  t_clo   !< Clothing temperature       (Â°C)
+    Real(wp), INTENT ( INOUT )  ::  clo     !< Current clothing in sulation
+    Real(wp), INTENT ( INOUT )  ::  actlev  !< Individuals activity level
+                                            !  per unit surface area      (W/mÂ²)
+!-- Output parameters
+    REAL(wp), INTENT ( OUT ) ::  ipt    !< Instationary perceived temp.   (Â°C)
+
+!-- If clo equals the initial value, this is the initial call
+    IF ( clo <= -998._wp ) THEN
+!--    Initialize instationary perceived temperature with personalized 
+!      PT as an initial guess, set actlev and clo
+       CALL ipt_init ( age, weight, height, sex, work, actlev, clo,            &
+          ta, vp, ws, tmrt, pair, dt, energy_storage, t_clo,                   &
+          ipt )
+    ELSE
+!--    Estimate local instatinoary perceived temperature
+       CALL ipt_cycle ( ta, vp, ws, tmrt, pair, dt, energy_storage, t_clo,     &
+          clo, actlev, work, ipt )
+    ENDIF
+
+ END SUBROUTINE biom_calc_ipt
+
+ END MODULE biometeorology_mod
Index: /palm/tags/release-6.0/SOURCE/biometeorology_pet_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/biometeorology_pet_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/biometeorology_pet_mod.f90	(revision 3477)
@@ -0,0 +1,548 @@
+!> @file biometeorology_PET.f90
+!------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2019, Deutscher Wetterdienst (DWD) / 
+! German Meteorological Service (DWD)
+!------------------------------------------------------------------------------!
+!
+! Current revisions: 003
+! -----------------
+! 
+! 
+! Former revisions: 001
+! -----------------
+! $Id$
+! Initial revision 001
+!
+! 
+!
+! Authors:
+! --------
+! @author Peter HÃ¶ppe (original author)
+! @author Dominik Froehlich <dominik.froehlich@dwd.de> (PALM modification)
+!
+!------------------------------------------------------------------------------!
+ MODULE biometeorology_pet_mod
+
+!-- Load required variables from existing modules
+    USE kinds  !< to set precision of INTEGER and REAL according to PALM
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+!-- Internal constants:
+    REAL(wp), PARAMETER :: po   = 1013.25_wp      !< Air pressure at sea level (hPa)
+    REAL(wp), PARAMETER :: rob  =    1.06_wp      !< 
+    REAL(wp), PARAMETER :: cb   = 3640._wp        !< 
+    REAL(wp), PARAMETER :: food =    0._wp        !< Heat gain by food        (W)
+    REAL(wp), PARAMETER :: emsk =    0.99_wp      !< Longwave emission coef. of skin
+    REAL(wp), PARAMETER :: emcl =    0.95_wp      !< Longwave emission coef. of cloth
+    REAL(wp), PARAMETER :: evap = 2.42_wp * 10._wp **6._wp     !< 
+    REAL(wp), PARAMETER :: sigm = 5.67_wp * 10._wp **(-8._wp)  !< Stefan-Boltzmann-Const.
+    REAL(wp), PARAMETER :: cair = 1010._wp        !< 
+    REAL(wp), PARAMETER :: cels_offs = 273.15_wp  !< Kelvin Celsius Offset (K)
+
+!-- Internal variables:
+    REAL(wp) :: h           !< Internal heat        (W)
+
+!-- MEMI configuration
+    REAL(wp) :: age         !< Persons age          (a)
+    REAL(wp) :: mbody       !< Persons body mass    (kg)
+    REAL(wp) :: ht          !< Persons height       (m)
+    REAL(wp) :: work        !< Work load            (W)
+    REAL(wp) :: eta         !< Work efficiency      (dimensionless)
+    REAL(wp) :: icl         !< Clothing insulation index (clo)
+    REAL(wp) :: fcl         !< Surface area modification by clothing (factor)
+    INTEGER(iwp) :: pos     !< Posture: 1 = standing, 2 = sitting
+    INTEGER(iwp) :: sex     !< Sex: 1 = male, 2 = female
+
+    PUBLIC calculate_pet_static
+
+!-- PALM interfaces:
+    INTERFACE calculate_pet_static
+       MODULE PROCEDURE calculate_pet_static
+    END INTERFACE calculate_pet_static
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Physiologically Equivalent Temperature (PET),
+!  stationary (calculated based on MEMI),
+!  Subroutine based on PETBER vers. 1.5.1996 by P. Hoeppe
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE calculate_pet_static( ta, vpa, v, tmrt, p, tx )
+
+    IMPLICIT NONE
+
+!-- Input arguments:
+    REAL(wp), INTENT( IN ) ::  ta    !< Air temperature             (Â°C)
+    REAL(wp), INTENT( IN ) ::  tmrt  !< Mean radiant temperature    (Â°C)
+    REAL(wp), INTENT( IN ) ::  v     !< Wind speed                  (m/s)
+    REAL(wp), INTENT( IN ) ::  vpa   !< Vapor pressure              (hPa)
+    REAL(wp), INTENT( IN ) ::  p     !< Air pressure                (hPa)
+
+!-- Output arguments:
+    REAL(wp), INTENT ( OUT ) ::  tx  !< PET                         (Â°C)
+
+!-- Internal variables:
+    REAL(wp) ::  acl
+    REAL(wp) ::  adu
+    REAL(wp) ::  aeff
+    REAL(wp) ::  ere
+    REAL(wp) ::  erel
+    REAL(wp) ::  esw
+    REAL(wp) ::  facl
+    REAL(wp) ::  feff
+    REAL(wp) ::  rdcl
+    REAL(wp) ::  rdsk
+    REAL(wp) ::  rtv
+    REAL(wp) ::  vpts
+    REAL(wp) ::  tsk
+    REAL(wp) ::  tcl
+    REAL(wp) ::  wetsk
+
+!-- Configuration
+    age   = 35._wp
+    mbody = 75._wp
+    ht    =  1.75_wp
+    work  = 80._wp
+    eta   =  0._wp
+    icl   =  0.9_wp
+    fcl   =  1.15_wp
+
+!-- Call subfunctions
+    CALL in_body ( ere, erel, p, rtv, ta, vpa )
+
+    CALL heat_exch ( acl, adu, aeff, ere, erel, esw, facl, feff,               &
+            p, rdcl, rdsk, ta, tcl, tmrt, tsk, v, vpa, vpts, wetsk )
+
+    CALL pet_iteration ( acl, adu, aeff, esw, facl, feff, p, rdcl,             &
+            rdsk, rtv, ta, tcl, tsk, tx, vpts, wetsk )
+
+
+ END SUBROUTINE calculate_pet_static
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate internal energy ballance
+!------------------------------------------------------------------------------!
+ SUBROUTINE in_body ( ere, erel, p, rtv, ta, vpa )
+
+!-- Input arguments:
+    REAL(wp), INTENT( IN )  ::  p         !< air pressure     (hPa)
+    REAL(wp), INTENT( IN )  ::  ta        !< air temperature  (Â°C)
+    REAL(wp), INTENT( IN )  ::  vpa       !< vapor pressure   (hPa)
+
+!-- Output arguments:
+    REAL(wp), INTENT( OUT ) ::  ere       !< energy ballance          (W)
+    REAL(wp), INTENT( OUT ) ::  erel      !< latent energy ballance   (W)
+    REAL(wp), INTENT( OUT ) ::  rtv       !< 
+
+!-- Internal variables:
+    REAL(wp) ::  eres
+    REAL(wp) ::  met
+    REAL(wp) ::  tex
+    REAL(wp) ::  vpex
+
+    met = 3.45_wp * mbody ** ( 3._wp / 4._wp ) * (1._wp + 0.004_wp *           &
+          ( 30._wp - age) + 0.010_wp * ( ( ht * 100._wp /                      &
+          ( mbody ** ( 1._wp / 3._wp ) ) ) - 43.4_wp ) )
+
+    met = work + met
+
+    h = met * (1._wp - eta)
+
+!-- Sensible respiration energy
+    tex  = 0.47_wp * ta + 21.0_wp
+    rtv  = 1.44_wp * 10._wp ** (-6._wp) * met
+    eres = cair * (ta - tex) * rtv
+
+!-- Latent respiration energy
+    vpex = 6.11_wp * 10._wp ** ( 7.45_wp * tex / ( 235._wp + tex ) )
+    erel = 0.623_wp * evap / p * ( vpa - vpex ) * rtv
+
+!-- Sum of the results
+    ere = eres + erel
+
+ END SUBROUTINE in_body
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate heat gain or loss
+!------------------------------------------------------------------------------!
+ SUBROUTINE heat_exch ( acl, adu, aeff, ere, erel, esw, facl, feff,            &
+        p, rdcl, rdsk, ta, tcl, tmrt, tsk, v, vpa, vpts, wetsk )
+
+
+!-- Input arguments:
+    REAL(wp), INTENT( IN )  ::  ere    !< Energy ballance          (W)
+    REAL(wp), INTENT( IN )  ::  erel   !< Latent energy ballance   (W)
+    REAL(wp), INTENT( IN )  ::  p      !< Air pressure             (hPa)
+    REAL(wp), INTENT( IN )  ::  ta     !< Air temperature          (Â°C)
+    REAL(wp), INTENT( IN )  ::  tmrt   !< Mean radiant temperature (Â°C)
+    REAL(wp), INTENT( IN )  ::  v      !< Wind speed               (m/s)
+    REAL(wp), INTENT( IN )  ::  vpa    !< Vapor pressure           (hPa)
+
+!-- Output arguments:
+    REAL(wp), INTENT( OUT ) ::  acl    !< Clothing surface area        (mÂ²)
+    REAL(wp), INTENT( OUT ) ::  adu    !< Du-Bois area                 (mÂ²)
+    REAL(wp), INTENT( OUT ) ::  aeff   !< Effective surface area       (mÂ²)
+    REAL(wp), INTENT( OUT ) ::  esw    !< Energy-loss through sweat evap. (W)
+    REAL(wp), INTENT( OUT ) ::  facl   !< Surface area extension through clothing (factor)
+    REAL(wp), INTENT( OUT ) ::  feff   !< Surface modification by posture (factor)
+    REAL(wp), INTENT( OUT ) ::  rdcl   !< Diffusion resistence of clothing (factor)
+    REAL(wp), INTENT( OUT ) ::  rdsk   !< Diffusion resistence of skin (factor)
+    REAL(wp), INTENT( OUT ) ::  tcl    !< Clothing temperature         (Â°C)
+    REAL(wp), INTENT( OUT ) ::  tsk    !< Skin temperature             (Â°C)
+    REAL(wp), INTENT( OUT ) ::  vpts   !< Sat. vapor pressure over skin (hPa)
+    REAL(wp), INTENT( OUT ) ::  wetsk  !< Fraction of wet skin (dimensionless)
+
+!-- Internal variables
+    REAL(wp) ::  c(0:10)
+    REAL(wp) ::  cbare
+    REAL(wp) ::  cclo
+    REAL(wp) ::  csum
+    REAL(wp) ::  di
+    REAL(wp) ::  ed
+    REAL(wp) ::  enbal
+    REAL(wp) ::  enbal2
+    REAL(wp) ::  eswdif
+    REAL(wp) ::  eswphy
+    REAL(wp) ::  eswpot
+    REAL(wp) ::  fec
+    REAL(wp) ::  hc
+    REAL(wp) ::  he
+    REAL(wp) ::  htcl
+    REAL(wp) ::  r1
+    REAL(wp) ::  r2
+    REAL(wp) ::  rbare
+    REAL(wp) ::  rcl
+    REAL(wp) ::  rclo
+    REAL(wp) ::  rclo2
+    REAL(wp) ::  rsum
+    REAL(wp) ::  sw
+    REAL(wp) ::  swf
+    REAL(wp) ::  swm
+    REAL(wp) ::  tbody
+    REAL(wp) ::  tcore(1:7)
+    REAL(wp) ::  vb
+    REAL(wp) ::  vb1
+    REAL(wp) ::  vb2
+    REAL(wp) ::  wd
+    REAL(wp) ::  wr
+    REAL(wp) ::  ws
+    REAL(wp) ::  wsum
+    REAL(wp) ::  xx
+    REAL(wp) ::  y
+    INTEGER(iwp) ::  count1
+    INTEGER(iwp) ::  count3
+    INTEGER(iwp) ::  j
+    INTEGER(iwp) ::  i
+    LOGICAL ::  skipIncreaseCount
+
+    wetsk = 0._wp
+    adu = 0.203_wp * mbody ** 0.425_wp * ht ** 0.725_wp
+
+    hc = 2.67_wp + ( 6.5_wp * v ** 0.67_wp)
+    hc   = hc * (p /po) ** 0.55_wp
+    feff = 0.725_wp                     !< Posture: 0.725 for stading
+    facl = (- 2.36_wp + 173.51_wp * icl - 100.76_wp * icl * icl + 19.28_wp     &
+          * (icl ** 3._wp)) / 100._wp
+
+    IF ( facl > 1._wp )   facl = 1._wp
+    rcl = ( icl / 6.45_wp ) / facl
+    IF ( icl >= 2._wp )  y  = 1._wp
+
+    IF ( ( icl > 0.6_wp ) .AND. ( icl < 2._wp ) )  y = ( ht - 0.2_wp ) / ht
+    IF ( ( icl <= 0.6_wp ) .AND. ( icl > 0.3_wp ) ) y = 0.5_wp
+    IF ( ( icl <= 0.3_wp ) .AND. ( icl > 0._wp ) )  y = 0.1_wp
+
+    r2   = adu * (fcl - 1._wp + facl) / (2._wp * 3.14_wp * ht * y)
+    r1   = facl * adu / (2._wp * 3.14_wp * ht * y)
+
+    di   = r2 - r1
+
+!-- Skin temperatur
+    DO j = 1, 7
+
+       tsk    = 34._wp
+       count1 = 0_iwp
+       tcl    = ( ta + tmrt + tsk ) / 3._wp
+       count3 = 1_iwp
+       enbal2 = 0._wp
+
+       DO i = 1, 100  ! allow for 100 iterations max
+          acl   = adu * facl + adu * ( fcl - 1._wp )
+          rclo2 = emcl * sigm * ( ( tcl + cels_offs )**4._wp -                 &
+            ( tmrt + cels_offs )** 4._wp ) * feff
+          htcl  = 6.28_wp * ht * y * di / ( rcl * LOG( r2 / r1 ) * acl )
+          tsk   = 1._wp / htcl * ( hc * ( tcl - ta ) + rclo2 ) + tcl
+
+!--       Radiation saldo
+          aeff  = adu * feff
+          rbare = aeff * ( 1._wp - facl ) * emsk * sigm *                      &
+            ( ( tmrt + cels_offs )** 4._wp - ( tsk + cels_offs )** 4._wp )
+          rclo  = feff * acl * emcl * sigm *                                   &
+            ( ( tmrt + cels_offs )** 4._wp - ( tcl + cels_offs )** 4._wp )
+          rsum  = rbare + rclo
+
+!--       Convection
+          cbare = hc * ( ta - tsk ) * adu * ( 1._wp - facl )
+          cclo  = hc * ( ta - tcl ) * acl
+          csum  = cbare + cclo
+
+!--       Core temperature
+          c(0)  = h + ere
+          c(1)  = adu * rob * cb
+          c(2)  = 18._wp - 0.5_wp * tsk
+          c(3)  = 5.28_wp * adu * c(2)
+          c(4)  = 0.0208_wp * c(1)
+          c(5)  = 0.76075_wp * c(1)
+          c(6)  = c(3) - c(5) - tsk * c(4)
+          c(7)  = - c(0) * c(2) - tsk * c(3) + tsk * c(5)
+          c(8)  = c(6) * c(6) - 4._wp * c(4) * c(7)
+          c(9)  = 5.28_wp * adu - c(5) - c(4) * tsk
+          c(10) = c(9) * c(9) - 4._wp * c(4) *                                 &
+             ( c(5) * tsk - c(0) - 5.28_wp * adu * tsk )
+
+          IF ( tsk == 36._wp ) tsk = 36.01_wp
+          tcore(7) = c(0) / ( 5.28_wp * adu + c(1) * 6.3_wp / 3600._wp ) + tsk
+          tcore(3) = c(0) / ( 5.28_wp * adu + ( c(1) * 6.3_wp / 3600._wp ) /   &
+            ( 1._wp + 0.5_wp * ( 34._wp - tsk ) ) ) + tsk
+          IF ( c(10) >= 0._wp ) THEN
+             tcore(6) = ( - c(9) - c(10)**0.5_wp ) / ( 2._wp * c(4) )
+             tcore(1) = ( - c(9) + c(10)**0.5_wp ) / ( 2._wp * c(4) )
+          END IF
+
+          IF ( c(8) >= 0._wp ) THEN
+             tcore(2) = ( - c(6) + ABS( c(8) ) ** 0.5_wp ) / ( 2._wp * c(4) )
+             tcore(5) = ( - c(6) - ABS( c(8) ) ** 0.5_wp ) / ( 2._wp * c(4) )
+             tcore(4) = c(0) / ( 5.28_wp * adu + c(1) * 1._wp / 40._wp ) + tsk
+          END IF
+
+!--       Transpiration
+          tbody = 0.1_wp * tsk + 0.9_wp * tcore(j)
+          swm   = 304.94_wp * ( tbody - 36.6_wp ) * adu / 3600000._wp
+          vpts  = 6.11_wp * 10._wp**( 7.45_wp * tsk / ( 235._wp + tsk ) )
+
+          IF ( tbody <= 36.6_wp ) swm = 0._wp
+
+          sw = swm
+          eswphy = - sw * evap
+          he     = 0.633_wp * hc / ( p * cair )
+          fec    = 1._wp / ( 1._wp + 0.92_wp * hc * rcl )
+          eswpot = he * ( vpa - vpts ) * adu * evap * fec
+          wetsk  = eswphy / eswpot
+
+          IF ( wetsk > 1._wp ) wetsk = 1._wp
+
+          eswdif = eswphy - eswpot
+
+          IF ( eswdif <= 0._wp ) esw = eswpot
+          IF ( eswdif > 0._wp ) esw = eswphy
+          IF ( esw  > 0._wp )   esw = 0._wp
+
+!--       Diffusion
+          rdsk = 0.79_wp * 10._wp ** 7._wp
+          rdcl = 0._wp
+          ed   = evap / ( rdsk + rdcl ) * adu * ( 1._wp - wetsk ) * ( vpa -    &
+             vpts )
+
+!--       Max vb
+          vb1 = 34._wp - tsk
+          vb2 = tcore(j) - 36.6_wp
+
+          IF ( vb2 < 0._wp ) vb2 = 0._wp
+          IF ( vb1 < 0._wp ) vb1 = 0._wp
+          vb = ( 6.3_wp + 75._wp * vb2 ) / ( 1._wp + 0.5_wp * vb1 )
+
+!--       Energy ballence
+          enbal = h + ed + ere + esw + csum + rsum + food
+
+!--       Clothing temperature
+          xx = 0.001_wp
+          IF ( count1 == 0_iwp ) xx = 1._wp
+          IF ( count1 == 1_iwp ) xx = 0.1_wp
+          IF ( count1 == 2_iwp ) xx = 0.01_wp
+          IF ( count1 == 3_iwp ) xx = 0.001_wp
+
+          IF ( enbal > 0._wp ) tcl = tcl + xx
+          IF ( enbal < 0._wp ) tcl = tcl - xx
+
+          skipIncreaseCount = .FALSE.
+          IF ( ( (enbal <= 0._wp ) .AND. (enbal2 > 0._wp ) ) .OR.              &
+             ( ( enbal >= 0._wp ) .AND. ( enbal2 < 0._wp ) ) ) THEN
+             skipIncreaseCount = .TRUE.
+          ELSE
+             enbal2 = enbal
+             count3 = count3 + 1_iwp
+          END IF
+
+          IF ( ( count3 > 200_iwp ) .OR. skipIncreaseCount ) THEN
+             IF ( count1 < 3_iwp ) THEN
+                count1 = count1 + 1_iwp
+                enbal2 = 0._wp
+             ELSE
+                EXIT
+             END IF
+          END IF
+       END DO
+
+       IF ( count1 == 3_iwp ) THEN
+          SELECT CASE ( j )
+             CASE ( 2, 5) 
+                IF ( .NOT. ( ( tcore(j) >= 36.6_wp ) .AND.                     &
+                   ( tsk <= 34.050_wp ) ) ) CYCLE
+             CASE ( 6, 1 )
+                IF ( c(10) < 0._wp ) CYCLE
+                IF ( .NOT. ( ( tcore(j) >= 36.6_wp ) .AND.                     &
+                   ( tsk > 33.850_wp ) ) ) CYCLE
+             CASE ( 3 )
+                IF ( .NOT. ( ( tcore(j) < 36.6_wp ) .AND.                      &
+                   ( tsk <= 34.000_wp ) ) ) CYCLE
+             CASE ( 7 )
+                IF ( .NOT. ( ( tcore(j) < 36.6_wp ) .AND.                      &
+                   ( tsk > 34.000_wp ) ) ) CYCLE
+             CASE default
+          END SELECT
+       END IF
+
+       IF ( ( j /= 4_iwp ) .AND. ( vb >= 91._wp ) ) CYCLE
+       IF ( ( j == 4_iwp ) .AND. ( vb < 89._wp ) ) CYCLE
+       IF ( vb > 90._wp ) vb = 90._wp
+
+!--    Loses by water
+       ws = sw * 3600._wp * 1000._wp
+       IF ( ws > 2000._wp ) ws = 2000._wp
+       wd = ed / evap * 3600._wp * ( -1000._wp )
+       wr = erel / evap * 3600._wp * ( -1000._wp )
+
+       wsum = ws + wr + wd
+
+       RETURN
+    END DO
+ END SUBROUTINE heat_exch
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate PET
+!------------------------------------------------------------------------------!
+ SUBROUTINE pet_iteration ( acl, adu, aeff, esw, facl, feff, p, rdcl,          &
+        rdsk, rtv, ta, tcl, tsk, tx, vpts, wetsk )
+
+!-- Input arguments:
+    REAL(wp), INTENT( IN ) ::  acl   !< clothing surface area        (mÂ²)
+    REAL(wp), INTENT( IN ) ::  adu   !< Du-Bois area                 (mÂ²)
+    REAL(wp), INTENT( IN ) ::  esw   !< energy-loss through sweat evap. (W)
+    REAL(wp), INTENT( IN ) ::  facl  !< surface area extension through clothing (factor)
+    REAL(wp), INTENT( IN ) ::  feff  !< surface modification by posture (factor)
+    REAL(wp), INTENT( IN ) ::  p     !< air pressure                 (hPa)
+    REAL(wp), INTENT( IN ) ::  rdcl  !< diffusion resistence of clothing (factor)
+    REAL(wp), INTENT( IN ) ::  rdsk  !< diffusion resistence of skin (factor)
+    REAL(wp), INTENT( IN ) ::  rtv   !< 
+    REAL(wp), INTENT( IN ) ::  ta    !< air temperature              (Â°C)
+    REAL(wp), INTENT( IN ) ::  tcl   !< clothing temperature         (Â°C)
+    REAL(wp), INTENT( IN ) ::  tsk   !< skin temperature             (Â°C)
+    REAL(wp), INTENT( IN ) ::  vpts  !< sat. vapor pressure over skin (hPa)
+    REAL(wp), INTENT( IN ) ::  wetsk !< fraction of wet skin (dimensionless)
+
+!-- Output arguments:
+    REAL(wp), INTENT( OUT ) ::  aeff  !< effective surface area       (mÂ²)
+    REAL(wp), INTENT( OUT ) ::  tx    !< PET                          (Â°C)
+
+!-- Internal variables
+    REAL ( wp ) ::  cbare
+    REAL ( wp ) ::  cclo
+    REAL ( wp ) ::  csum
+    REAL ( wp ) ::  ed
+    REAL ( wp ) ::  enbal
+    REAL ( wp ) ::  enbal2
+    REAL ( wp ) ::  ere
+    REAL ( wp ) ::  erel
+    REAL ( wp ) ::  eres
+    REAL ( wp ) ::  hc
+    REAL ( wp ) ::  rbare
+    REAL ( wp ) ::  rclo
+    REAL ( wp ) ::  rsum
+    REAL ( wp ) ::  tex
+    REAL ( wp ) ::  vpex
+    REAL ( wp ) ::  xx
+
+    INTEGER ( iwp ) ::  count1
+    INTEGER ( iwp ) ::  i
+
+    tx = ta
+    enbal2 = 0._wp
+
+    DO count1 = 0, 3
+       DO i = 1, 125  ! 500 / 4
+          hc = 2.67_wp + 6.5_wp * 0.1_wp ** 0.67_wp
+          hc = hc * ( p / po ) ** 0.55_wp
+
+!--       Radiation
+          aeff  = adu * feff
+          rbare = aeff * ( 1._wp - facl ) * emsk * sigm *                      &
+              ( ( tx + cels_offs ) ** 4._wp - ( tsk + cels_offs ) ** 4._wp )
+          rclo  = feff * acl * emcl * sigm *                                   &
+              ( ( tx + cels_offs ) ** 4._wp - ( tcl + cels_offs ) ** 4._wp )
+          rsum  = rbare + rclo
+
+!--       Covection
+          cbare = hc * ( tx - tsk ) * adu * ( 1._wp - facl )
+          cclo  = hc * ( tx - tcl ) * acl
+          csum  = cbare + cclo
+
+!--       Diffusion
+          ed = evap / ( rdsk + rdcl ) * adu * ( 1._wp - wetsk ) * ( 12._wp -   &
+             vpts )
+
+!--       Respiration
+          tex  = 0.47_wp * tx + 21._wp
+          eres = cair * ( tx - tex ) * rtv
+          vpex = 6.11_wp * 10._wp ** ( 7.45_wp * tex / ( 235._wp + tex ) )
+          erel = 0.623_wp * evap / p * ( 12._wp - vpex ) * rtv
+          ere  = eres + erel
+
+!--       Energy ballance
+          enbal = h + ed + ere + esw + csum + rsum
+
+!--       Iteration concerning ta
+          IF ( count1 == 0_iwp )  xx = 1._wp
+          IF ( count1 == 1_iwp )  xx = 0.1_wp
+          IF ( count1 == 2_iwp )  xx = 0.01_wp
+          IF ( count1 == 3_iwp )  xx = 0.001_wp
+          IF ( enbal > 0._wp )  tx = tx - xx
+          IF ( enbal < 0._wp )  tx = tx + xx
+          IF ( ( enbal <= 0._wp ) .AND. ( enbal2 > 0._wp ) ) EXIT
+          IF ( ( enbal >= 0._wp ) .AND. ( enbal2 < 0._wp ) ) EXIT
+
+          enbal2 = enbal
+       END DO
+    END DO
+ END SUBROUTINE pet_iteration
+
+END MODULE biometeorology_pet_mod
Index: /palm/tags/release-6.0/SOURCE/biometeorology_pt_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/biometeorology_pt_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/biometeorology_pt_mod.f90	(revision 3477)
@@ -0,0 +1,1083 @@
+!> @file biometeorology_pt_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2019, Deutscher Wetterdienst (DWD) / 
+! German Meteorological Service (DWD) and
+! Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! From branch resler@3462, pavelkrc:
+! replace specific precision DLOG, DMOD intrinsics with generic precision for
+! compatibility with 'wp'
+! 
+! 
+! Initial revision
+!
+! 
+!
+! Authors:
+! --------
+! @author Dominik Froehlich <dominik.froehlich@mailbox.org>
+!
+!
+! Description:
+! ------------
+!> Module for the calculation of the thermal index perceived temperature (PT).
+!> The Perceived Temperature is the air temperature in a reference environ-
+!> ment that results in the same Predicted Mean Vote (Fanger 1972), PMV, as 
+!> the real environment. In the reference environment the mean radiant 
+!> temperature is equal to the air temperature and the wind speed is reduced 
+!> to a value set at 0.1 m/s. The Perceived Temperature is linked to a 
+!> reference individual: male aged 35 years, body height 1.75 m, weight
+!> 75 kg, walking with 4 km per hour on a horizontal plain (related to an
+!> internal heat production of 172.5 W). The person varies the thermal
+!> resistance of clothing (clo) in the range Icl=1.75 clo (winter) and 
+!> Icl=0.50 clo (summer) to achieve thermal comfort (PMV = 0) if possible. 
+!> If not possible the individual perceives cold stress (winter, 1.75 clo) 
+!> or heat load (summer, 0.5 clo).
+!>
+!> @todo 
+!>
+!> @note nothing now
+!>
+!> @bug  no known bugs by now
+!------------------------------------------------------------------------------!
+ MODULE biometeorology_pt_mod
+
+!-- Load required variables from existing modules
+    USE kinds  !< to set precision of INTEGER and REAL arrays according to PALM
+
+    IMPLICIT NONE
+
+    PRIVATE  !-- no private interfaces --!
+
+    PUBLIC calculate_pt_static, saturation_vapor_pressure, deltapmv, dpmv_adj, &
+           dpmv_cold, fanger, calc_sultr, pt_regression, ireq_neutral, iso_ridder
+
+!-- PALM interfaces:
+    INTERFACE calculate_pt_static
+       MODULE PROCEDURE calculate_pt_static
+    END INTERFACE calculate_pt_static
+
+    INTERFACE saturation_vapor_pressure
+      MODULE PROCEDURE saturation_vapor_pressure
+    END INTERFACE saturation_vapor_pressure
+
+    INTERFACE deltapmv
+      MODULE PROCEDURE deltapmv
+    END INTERFACE deltapmv
+
+    INTERFACE dpmv_adj
+      MODULE PROCEDURE dpmv_adj
+    END INTERFACE dpmv_adj
+
+    INTERFACE dpmv_cold
+      MODULE PROCEDURE dpmv_cold
+    END INTERFACE dpmv_cold
+
+    INTERFACE fanger
+      MODULE PROCEDURE fanger
+    END INTERFACE fanger
+
+    INTERFACE calc_sultr
+      MODULE PROCEDURE calc_sultr
+    END INTERFACE calc_sultr
+
+    INTERFACE pt_regression
+      MODULE PROCEDURE pt_regression
+    END INTERFACE pt_regression
+
+    INTERFACE ireq_neutral
+      MODULE PROCEDURE ireq_neutral
+    END INTERFACE ireq_neutral
+
+    INTERFACE iso_ridder
+      MODULE PROCEDURE iso_ridder
+    END INTERFACE iso_ridder
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> PT_BASIC.F90   Version of perceived temperature (PT, ï¿œC) for
+!> - standard measured/predicted meteorological values and TMRT 
+!> as input;
+!> - regressions for determination of PT;
+!> - adjustment to Gagge's PMV* (2-node-model, 1986) as base of PT 
+!> under warm/humid conditions (Icl= 0.50 clo) and under cold 
+!> conditions (Icl= 1.75 clo)
+!> 
+!> Function value is the Perceived Temperature, degree centigrade
+!------------------------------------------------------------------------------!
+ SUBROUTINE calculate_pt_static( tt2m, el2m, vau1m, tmrt, pb, clo, pt_basic )
+
+    IMPLICIT NONE
+
+!-- Type of input of the argument list
+    REAL(wp), INTENT ( IN )  :: tt2m   !< Local air temperature (ï¿œC)
+    REAL(wp), INTENT ( IN )  :: el2m   !< Local vapour pressure (hPa)
+    REAL(wp), INTENT ( IN )  :: tmrt   !< Local mean radiant temperature (ï¿œC)
+    REAL(wp), INTENT ( IN )  :: vau1m  !< Local wind velocitry (m/s)
+    REAL(wp), INTENT ( IN )  :: pb     !< Local barometric air pressure (hPa)
+
+!-- Type of output of the argument list
+    REAL(wp), INTENT ( OUT ) :: pt_basic  !< Perceived temperature (ï¿œC)
+    REAL(wp), INTENT ( OUT ) :: clo       !< Clothing index (dimensionless)
+
+!-- Parameters for standard "Klima-Michel"
+    REAL(wp), PARAMETER :: eta = 0._wp          !< Mechanical work efficiency for walking on flat ground (compare to Fanger (1972) pp 24f)
+    REAL(wp), PARAMETER :: actlev = 134.6862_wp !< Workload by activity per standardized surface (A_Du)
+
+!-- Type of program variables
+    REAL(wp), PARAMETER :: eps = 0.0005  !< Accuracy in clothing insulation (clo) for evaluation the root of Fanger's PMV (pmva=0)
+    REAL(wp) ::  uclo
+    REAL(wp) ::  oclo
+    REAL(wp) ::  d_pmv
+    REAL(wp) ::  svp_tt
+    REAL(wp) ::  sult_lim
+    REAL(wp) ::  dgtcm
+    REAL(wp) ::  dgtcstd
+    REAL(wp) ::  clon
+    REAL(wp) ::  ireq_minimal
+    REAL(wp) ::  clo_fanger
+    REAL(wp) ::  pmv_o
+    REAL(wp) ::  pmv_u
+    REAL(wp) ::  pmva
+    REAL(wp) ::  ptc
+    REAL(wp) ::  d_std
+    REAL(wp) ::  pmvs
+    REAL(wp) ::  top
+
+    INTEGER(iwp) :: nzaehl, nerr_kalt, nerr
+
+    LOGICAL :: sultrieness
+
+!-- Initialise
+    pt_basic = 9999.0_wp
+
+    nerr     = 0_iwp
+    nzaehl   = 0_iwp
+    sultrieness  = .FALSE.
+!-- Tresholds: clothing insulation (account for model inaccuracies)
+!   summer clothing
+    uclo     = 0.44453_wp
+!   winter clothing
+    oclo     = 1.76267_wp
+
+!-- decision: firstly calculate for winter or summer clothing
+    IF ( tt2m <= 10._wp ) THEN
+
+!--    First guess: winter clothing insulation: cold stress
+       clo = oclo
+       CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta, pmva, top )
+       pmv_o = pmva
+
+       IF ( pmva > 0._wp ) THEN
+
+!--       Case summer clothing insulation: heat load ?
+          clo = uclo
+          CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta, pmva,   &
+             top )
+          pmv_u = pmva
+          IF ( pmva <= 0._wp ) THEN
+!--          Case: comfort achievable by varying clothing insulation 
+!--          Between winter and summer set values
+             CALL iso_ridder ( tt2m, tmrt, el2m, vau1m, pb, actlev, eta, uclo, &
+                pmv_u, oclo, pmv_o, eps, pmva, top, nzaehl, clo )
+             IF ( nzaehl < 0_iwp ) THEN
+                nerr = -1_iwp
+                RETURN
+             ENDIF
+          ELSE IF ( pmva > 0.06_wp ) THEN
+             clo = 0.5_wp
+             CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta,      &
+                           pmva, top )
+          ENDIF
+       ELSE IF ( pmva < -0.11_wp ) THEN
+          clo = 1.75_wp
+          CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta, pmva,   &
+             top )
+       ENDIF
+    ELSE
+
+!--    First guess: summer clothing insulation: heat load
+       clo = uclo
+       CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta, pmva, top )
+       pmv_u = pmva
+
+       IF ( pmva < 0._wp ) THEN
+
+!--       Case winter clothing insulation: cold stress ?
+          clo = oclo
+          CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta, pmva,   &
+             top )
+          pmv_o = pmva
+
+          IF ( pmva >= 0._wp ) THEN
+
+!--          Case: comfort achievable by varying clothing insulation 
+!            between winter and summer set values
+             CALL iso_ridder ( tt2m, tmrt, el2m, vau1m, pb, actlev, eta, uclo, &
+                               pmv_u, oclo, pmv_o, eps, pmva, top, nzaehl, clo )
+             IF ( nzaehl < 0_iwp ) THEN
+                nerr = -1_iwp
+                RETURN
+             ENDIF
+          ELSE IF ( pmva < -0.11_wp ) THEN
+             clo = 1.75_wp
+             CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta,      &
+                           pmva, top )
+          ENDIF
+       ELSE IF ( pmva > 0.06_wp ) THEN
+          clo = 0.5_wp
+          CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, clo, actlev, eta, pmva,   &
+             top )
+       ENDIF
+
+    ENDIF
+
+!-- Determine perceived temperature by regression equation + adjustments
+    pmvs = pmva
+    CALL pt_regression ( pmva, clo, pt_basic )
+    ptc = pt_basic
+    IF ( clo >= 1.75_wp .AND. pmva <= -0.11_wp ) THEN
+!--    Adjust for cold conditions according to Gagge 1986
+       CALL dpmv_cold ( pmva, tt2m, vau1m, tmrt, nerr_kalt, d_pmv )
+       IF ( nerr_kalt > 0_iwp ) nerr = -5_iwp
+       pmvs = pmva - d_pmv
+       IF ( pmvs > -0.11_wp ) THEN
+          d_pmv  = 0._wp
+          pmvs   = -0.11_wp
+       ENDIF
+       CALL pt_regression ( pmvs, clo, pt_basic )
+    ENDIF
+    clo_fanger = clo
+    clon = clo
+    IF ( clo > 0.5_wp .AND. pt_basic <= 8.73_wp ) THEN
+!--    Required clothing insulation (ireq) is exclusively defined for 
+!      operative temperatures (top) less 10 (C) for a 
+!      reference wind of 0.2 m/s according to 8.73 (C) for 0.1 m/s
+       clon = ireq_neutral ( pt_basic, ireq_minimal, nerr )
+       clo = clon
+    ENDIF
+    CALL calc_sultr ( ptc, dgtcm, dgtcstd, sult_lim )
+    sultrieness    = .FALSE.
+    d_std = -99._wp
+    IF ( pmva > 0.06_wp .AND. clo <= 0.5_wp ) THEN
+!--    Adjust for warm/humid conditions according to Gagge 1986
+       CALL saturation_vapor_pressure ( tt2m, svp_tt )
+       d_pmv  = deltapmv ( pmva, tt2m, el2m, svp_tt, tmrt, vau1m, nerr )
+       pmvs   = pmva + d_pmv
+       CALL pt_regression ( pmvs, clo, pt_basic )
+       IF ( sult_lim < 99._wp ) THEN
+          IF ( (pt_basic - ptc) > sult_lim ) sultrieness = .TRUE.
+!--       Set factor to threshold for sultriness
+          IF ( dgtcstd /= 0_iwp ) THEN
+             d_std = ( ( pt_basic - ptc ) - dgtcm ) / dgtcstd
+          ENDIF
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE calculate_pt_static
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The SUBROUTINE calculates the saturation water vapour pressure 
+!> (hPa = hecto Pascal) for a given temperature tt (ï¿œC).
+!> For example, tt can be the air temperature or the dew point temperature.
+!------------------------------------------------------------------------------!
+ SUBROUTINE saturation_vapor_pressure( tt, p_st )
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT ( IN )  ::  tt   !< ambient air temperature (ï¿œC)
+    REAL(wp), INTENT ( OUT ) ::  p_st !< saturation water vapour pressure (hPa)
+
+    REAL(wp)      ::  b
+    REAL(wp)      ::  c
+
+
+    IF ( tt < 0._wp ) THEN
+!--    tt  < 0 (ï¿œC): saturation water vapour pressure over ice
+       b = 17.84362_wp
+       c = 245.425_wp
+    ELSE
+!--    tt >= 0 (ï¿œC): saturation water vapour pressure over water
+       b = 17.08085_wp
+       c = 234.175_wp
+    ENDIF
+
+!-- Saturation water vapour pressure
+    p_st = 6.1078_wp * EXP ( b * tt / ( c + tt ) )
+
+ END SUBROUTINE saturation_vapor_pressure
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+! Find the clothing insulation value clo_res (clo) to make Fanger's Predicted
+! Mean Vote (PMV) equal comfort (pmva=0) for actual meteorological conditions 
+! (tt2m,tmrt, el2m, vau1m, pb) and values of individual's activity level 
+! (Klima-Michel: 134.682 W/m2 = 2.3 met, mechanincal work load eta= 0 W/m2), 
+! i.e. find the root of Fanger's comfort equation
+!------------------------------------------------------------------------------!
+ SUBROUTINE iso_ridder( tt2m, tmrt, el2m, vau1m, pb, actlev, eta, uclo,        &
+                       pmv_u, oclo, pmv_o, eps, pmva, top, nerr,               &
+                       clo_res )
+
+    IMPLICIT NONE
+
+!-- Input variables of argument list:
+    REAL(wp), INTENT ( IN )  :: tt2m     !< Ambient temperature (ï¿œC)
+    REAL(wp), INTENT ( IN )  :: tmrt     !< Mean radiant temperature (ï¿œC)
+    REAL(wp), INTENT ( IN )  :: el2m     !< Water vapour pressure (hPa)
+    REAL(wp), INTENT ( IN )  :: vau1m    !< Wind speed (m/s) 1 m above ground
+    REAL(wp), INTENT ( IN )  :: pb       !< Barometric pressure (hPa)
+    REAL(wp), INTENT ( IN )  :: actlev   !< Individuals activity level per unit surface area (W/m2)
+    REAL(wp), INTENT ( IN )  :: eta      !< Individuals work efficiency (dimensionless)
+    REAL(wp), INTENT ( IN )  :: uclo     !< Lower threshold of bracketing clothing insulation (clo) 
+    REAL(wp), INTENT ( IN )  :: oclo     !< Upper threshold of bracketing clothing insulation (clo)
+    REAL(wp), INTENT ( IN )  :: eps      !< (0.05) accuracy in clothing insulation (clo) for 
+!                                          evaluation the root of Fanger's PMV (pmva=0)
+    REAL(wp), INTENT ( IN )  :: pmv_o    !< Fanger's PMV corresponding to oclo
+    REAL(wp), INTENT ( IN )  :: pmv_u    !< Fanger's PMV corresponding to uclo
+
+! Output variables of argument list:
+    REAL(wp), INTENT ( OUT ) :: pmva     !< 0 (set to zero, because clo is evaluated for comfort)
+    REAL(wp), INTENT ( OUT ) :: top      !< Operative temperature (ï¿œC) at found root of Fanger's PMV
+    REAL(wp), INTENT ( OUT ) :: clo_res  !< Resulting clothing insulation value (clo)
+    INTEGER(iwp), INTENT ( OUT ) :: nerr !< Error status / quality flag
+!           nerr >= 0, o.k., and nerr is the number of iterations for
+!                              convergence
+!           nerr = -1: error = malfunction of Ridder's convergence method
+!           nerr = -2: error = maximum iterations (max_iteration) exceeded 
+!           nerr = -3: error = root not bracketed between uclo and oclo
+
+!-- Type of program variables
+    INTEGER(iwp), PARAMETER  ::  max_iteration = 15_iwp
+    REAL(wp),     PARAMETER  ::  guess_0       = -1.11e30_wp
+    REAL(wp) ::  x_ridder
+    REAL(wp) ::  clo_u
+    REAL(wp) ::  clo_o
+    REAL(wp) ::  x_unten
+    REAL(wp) ::  x_oben
+    REAL(wp) ::  x_mittel
+    REAL(wp) ::  x_neu
+    REAL(wp) ::  y_unten
+    REAL(wp) ::  y_oben
+    REAL(wp) ::  y_mittel
+    REAL(wp) ::  y_neu
+    REAL(wp) ::  s
+    INTEGER(iwp) :: j
+
+!-- Initialise
+    nerr    = 0_iwp
+
+!-- Set pmva = 0 (comfort): Root of PMV depending on clothing insulation
+    pmva    = 0._wp
+    clo_u   = uclo
+    y_unten = pmv_u
+    clo_o   = oclo
+    y_oben  = pmv_o
+    IF ( ( y_unten > 0._wp .AND. y_oben < 0._wp ) .OR.                         &
+         ( y_unten < 0._wp .AND. y_oben > 0._wp ) ) THEN
+       x_unten  = clo_u
+       x_oben   = clo_o
+       x_ridder = guess_0
+
+       DO j = 1_iwp, max_iteration
+          x_mittel = 0.5_wp * ( x_unten + x_oben )
+          CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, x_mittel, actlev, eta,    &
+                        y_mittel, top )
+          s = SQRT ( y_mittel**2 - y_unten * y_oben )
+          IF ( s == 0._wp ) THEN
+             clo_res = x_mittel
+             nerr = j
+             RETURN
+          ENDIF
+          x_neu = x_mittel + ( x_mittel - x_unten ) *                          &
+                      ( SIGN ( 1._wp, y_unten - y_oben ) * y_mittel / s )
+          IF ( ABS ( x_neu - x_ridder ) <= eps ) THEN
+             clo_res = x_ridder
+             nerr       = j
+             RETURN
+          ENDIF
+          x_ridder = x_neu
+          CALL fanger ( tt2m, tmrt, el2m, vau1m, pb, x_ridder, actlev, eta,    &
+                        y_neu, top )
+          IF ( y_neu == 0._wp ) THEN
+             clo_res = x_ridder
+             nerr       = j
+             RETURN
+          ENDIF
+          IF ( SIGN ( y_mittel, y_neu ) /= y_mittel ) THEN
+             x_unten = x_mittel
+             y_unten = y_mittel
+             x_oben  = x_ridder
+             y_oben  = y_neu
+          ELSE IF ( SIGN ( y_unten, y_neu ) /= y_unten ) THEN
+             x_oben  = x_ridder
+             y_oben  = y_neu
+          ELSE IF ( SIGN ( y_oben, y_neu ) /= y_oben ) THEN
+             x_unten = x_ridder
+             y_unten = y_neu
+          ELSE
+!--          Never get here in x_ridder: singularity in y
+             nerr       = -1_iwp
+             clo_res = x_ridder
+             RETURN
+          ENDIF
+          IF ( ABS ( x_oben - x_unten ) <= eps ) THEN
+             clo_res = x_ridder
+             nerr       = j
+             RETURN
+          ENDIF
+       ENDDO
+!--    x_ridder exceed maximum iterations
+       nerr       = -2_iwp
+       clo_res = y_neu
+       RETURN
+    ELSE IF ( y_unten == 0. ) THEN
+       x_ridder = clo_u
+    ELSE IF ( y_oben == 0. ) THEN
+       x_ridder = clo_o
+    ELSE
+!--    x_ridder not bracketed by u_clo and o_clo
+       nerr = -3_iwp
+       clo_res = x_ridder
+       RETURN
+    ENDIF
+
+ END SUBROUTINE iso_ridder
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Regression relations between perceived temperature (gt) and (adjusted) 
+!> PMV (21.11.1996, files F3PMVPGT.TXT und F3CLOGT.TXT). Three cases:
+!>
+!> - PMV < 0: gt = 5.805 + 12.6784*pmv
+!> - PMV = 0 (gt depends on clothing insulation, FUNCTION iso_ridder): 
+!>            gt = 21.258 - 9.558*clo
+!> - PMV > 0: 16.826 + 6.163*pmv
+!>
+!> The regression presumes the Klima-Michel settings for reference 
+!> individual and reference environment.
+!------------------------------------------------------------------------------!
+ SUBROUTINE pt_regression( pmv, clo, pt )
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT ( IN ) ::  pmv   !< Fangers predicted mean vote (dimensionless)
+    REAL(wp), INTENT ( IN ) ::  clo   !< clothing insulation index (clo)
+    REAL(wp), INTENT ( OUT ) ::  pt   !< pt (ï¿œC) corresponding to given PMV / clo
+
+    IF ( pmv <= -0.11_wp ) THEN
+       pt = 5.805_wp + 12.6784_wp * pmv
+    ELSE
+       IF ( pmv >= + 0.01_wp ) THEN
+          pt = 16.826_wp + 6.163_wp * pmv
+       ELSE
+          pt = 21.258_wp - 9.558_wp * clo
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE pt_regression
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> FANGER.F90
+!>
+!> SI-VERSION: ACTLEV W m-2, DAMPFDRUCK hPa
+!> Berechnet das aktuelle Predicted Mean Vote nach Fanger
+!>
+!> The case of free convection (vau < 0.1 m/s) is dealt with vau = 0.1 m/s
+!------------------------------------------------------------------------------!
+ SUBROUTINE fanger( tt, tmrt, pa, in_vau, pb, in_clo, actlev, eta, pmva, top )
+
+    IMPLICIT NONE
+
+!-- Input variables of argument list:
+    REAL(wp), INTENT ( IN ) ::  tt       !< Ambient air temperature (ï¿œC)
+    REAL(wp), INTENT ( IN ) ::  tmrt     !< Mean radiant temperature (ï¿œC)
+    REAL(wp), INTENT ( IN ) ::  pa       !< Water vapour pressure (hPa)
+    REAL(wp), INTENT ( IN ) ::  pb       !< Barometric pressure (hPa) at site
+    REAL(wp), INTENT ( IN ) ::  in_vau   !< Wind speed (m/s) 1 m above ground
+    REAL(wp), INTENT ( IN ) ::  in_clo   !< Clothing insulation (clo)
+    REAL(wp), INTENT ( IN ) ::  actlev   !< Individuals activity level per unit surface area (W/m2)
+    REAL(wp), INTENT ( IN ) ::  eta      !< Individuals mechanical work efficiency (dimensionless)
+
+!-- Output variables of argument list:
+    REAL(wp), INTENT ( OUT ) ::  pmva     !< Actual Predicted Mean Vote (dimensionless) according 
+!            to Fanger corresponding to meteorological (tt,tmrt,pa,vau,pb) 
+!            and individual variables (clo, actlev, eta)
+    REAL(wp), INTENT ( OUT ) ::  top      !< operative temperature (ï¿œC)
+
+!-- Internal variables
+    REAL(wp), PARAMETER :: cels_offs = 273.15_wp  !< Kelvin Celsius Offset (K)
+    REAL(wp) ::  f_cl
+    REAL(wp) ::  heat_convection
+    REAL(wp) ::  activity
+    REAL(wp) ::  t_skin_aver
+    REAL(wp) ::  bc
+    REAL(wp) ::  cc
+    REAL(wp) ::  dc
+    REAL(wp) ::  ec
+    REAL(wp) ::  gc
+    REAL(wp) ::  t_clothing
+    REAL(wp) ::  hr
+    REAL(wp) ::  clo
+    REAL(wp) ::  vau
+    REAL(wp) ::  z1
+    REAL(wp) ::  z2
+    REAL(wp) ::  z3
+    REAL(wp) ::  z4
+    REAL(wp) ::  z5
+    REAL(wp) ::  z6
+    INTEGER(iwp) :: i
+
+!-- Clo must be > 0. to avoid div. by 0!
+    clo = in_clo
+    IF ( clo <= 0._wp ) clo = .001_wp
+
+!-- f_cl = Increase in surface due to clothing
+    f_cl = 1._wp + .15_wp * clo
+
+!-- Case of free convection (vau < 0.1 m/s ) not considered
+    vau = in_vau
+    IF ( vau < .1_wp ) THEN
+       vau = .1_wp
+    ENDIF
+
+!-- Heat_convection = forced convection
+    heat_convection = 12.1_wp * SQRT ( vau * pb / 1013.25_wp )
+
+!-- Activity = inner heat produktion per standardized surface
+    activity = actlev * ( 1._wp - eta )
+
+!-- T_skin_aver = average skin temperature
+    t_skin_aver = 35.7_wp - .0275_wp * activity
+
+!-- Calculation of constants for evaluation below
+    bc = .155_wp * clo * 3.96_wp * 10._wp**( -8 ) * f_cl
+    cc = f_cl * heat_convection
+    ec = .155_wp * clo
+    dc = ( 1._wp + ec * cc ) / bc
+    gc = ( t_skin_aver + bc * ( tmrt + cels_offs )**4 + ec * cc * tt ) / bc
+
+!-- Calculation of clothing surface temperature (t_clothing) based on
+!   Newton-approximation with air temperature as initial guess
+    t_clothing = tt
+    DO I = 1, 3
+       t_clothing = t_clothing - ( ( t_clothing + cels_offs )**4 + t_clothing  &
+          * dc - gc ) / ( 4._wp * ( t_clothing + cels_offs )**3 + dc )
+    ENDDO
+
+!-- Empiric factor for the adaption of the heat ballance equation
+!   to the psycho-physical scale (Equ. 40 in FANGER)
+    z1 = ( .303_wp * EXP ( -.036_wp * actlev ) + .0275_wp )
+
+!-- Water vapour diffution through the skin
+    z2 = .31_wp * ( 57.3_wp - .07_wp * activity-pa )
+
+!-- Sweat evaporation from the skin surface
+    z3 = .42_wp * ( activity - 58._wp )
+
+!-- Loss of latent heat through respiration
+    z4 = .0017_wp * actlev * ( 58.7_wp - pa ) + .0014_wp * actlev *            &
+      ( 34._wp - tt )
+
+!-- Loss of radiational heat
+    z5 = 3.96e-8_wp * f_cl * ( ( t_clothing + cels_offs )**4 - ( tmrt +        &
+       cels_offs )**4 )
+    IF ( ABS ( t_clothing - tmrt ) > 0._wp ) THEN
+       hr = z5 / f_cl / ( t_clothing - tmrt )
+    ELSE
+       hr = 0._wp
+    ENDIF
+
+!-- Heat loss through forced convection cc*(t_clothing-TT)
+    z6 = cc * ( t_clothing - tt )
+
+!-- Predicted Mean Vote
+    pmva = z1 * ( activity - z2 - z3 - z4 - z5 - z6 )
+
+!-- Operative temperatur
+    top = ( hr * tmrt + heat_convection * tt ) / ( hr + heat_convection )
+
+ END SUBROUTINE fanger
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> For pmva > 0 and clo =0.5 the increment (deltapmv) is calculated
+!> that converts pmva into Gagge's et al. (1986) PMV*.
+!------------------------------------------------------------------------------!
+ REAL(wp) FUNCTION deltapmv( pmva, tt2m, el2m, svp_tt, tmrt, vau1m, nerr )
+
+    IMPLICIT NONE
+
+!-- Input variables of argument list:
+    REAL(wp),     INTENT ( IN )  :: pmva     !< Actual Predicted Mean Vote (PMV) according to Fanger
+    REAL(wp),     INTENT ( IN )  :: tt2m     !< Ambient temperature (ï¿œC) at screen level
+    REAL(wp),     INTENT ( IN )  :: el2m     !< Water vapour pressure (hPa) at screen level
+    REAL(wp),     INTENT ( IN )  :: svp_tt   !< Saturation water vapour pressure (hPa) at tt2m
+    REAL(wp),     INTENT ( IN )  :: tmrt     !< Mean radiant temperature (ï¿œC) at screen level
+    REAL(wp),     INTENT ( IN )  :: vau1m    !< Wind speed (m/s) 1 m above ground
+
+!-- Output variables of argument list:
+    INTEGER(iwp), INTENT ( OUT ) :: nerr     !< Error status / quality flag
+!             0 = o.k.
+!            -2 = pmva outside valid regression range
+!            -3 = rel. humidity set to 5 % or 95 %, respectively
+!            -4 = deltapmv set to avoid pmvs < 0
+
+!-- Internal variable types:
+    REAL(wp) ::  pmv
+    REAL(wp) ::  pa_p50
+    REAL(wp) ::  pa
+    REAL(wp) ::  apa
+    REAL(wp) ::  dapa
+    REAL(wp) ::  sqvel
+    REAL(wp) ::  ta
+    REAL(wp) ::  dtmrt
+    REAL(wp) ::  p10
+    REAL(wp) ::  p95
+    REAL(wp) ::  gew
+    REAL(wp) ::  gew2
+    REAL(wp) ::  dpmv_1
+    REAL(wp) ::  dpmv_2
+    REAL(wp) ::  pmvs
+    REAL(wp) ::  bpmv(0:7)
+    REAL(wp) ::  bpa_p50(0:7)
+    REAL(wp) ::  bpa(0:7)
+    REAL(wp) ::  bapa(0:7)
+    REAL(wp) ::  bdapa(0:7)
+    REAL(wp) ::  bsqvel(0:7)
+    REAL(wp) ::  bta(0:7)
+    REAL(wp) ::  bdtmrt(0:7)
+    REAL(wp) ::  aconst(0:7)
+    INTEGER(iwp) :: nreg
+
+    DATA bpmv     /                                                            &
+     -0.0556602_wp, -0.1528680_wp, -0.2336104_wp, -0.2789387_wp, -0.3551048_wp,&
+     -0.4304076_wp, -0.4884961_wp, -0.4897495_wp /
+    DATA bpa_p50 /                                                             &
+     -0.1607154_wp, -0.4177296_wp, -0.4120541_wp, -0.0886564_wp, +0.4285938_wp,&
+     +0.6281256_wp, +0.5067361_wp, +0.3965169_wp /
+    DATA bpa     /                                                             &
+     +0.0580284_wp, +0.0836264_wp, +0.1009919_wp, +0.1020777_wp, +0.0898681_wp,&
+     +0.0839116_wp, +0.0853258_wp, +0.0866589_wp /
+    DATA bapa    /                                                             &
+     -1.7838788_wp, -2.9306231_wp, -1.6350334_wp, +0.6211547_wp, +3.3918083_wp,&
+     +5.5521025_wp, +8.4897418_wp, +16.6265851_wp /
+    DATA bdapa   /                                                             &
+     +1.6752720_wp, +2.7379504_wp, +1.2940526_wp, -1.0985759_wp, -3.9054732_wp,&
+     -6.0403012_wp, -8.9437119_wp, -17.0671201_wp /
+    DATA bsqvel  /                                                             &
+     -0.0315598_wp, -0.0286272_wp, -0.0009228_wp, +0.0483344_wp, +0.0992366_wp,&
+     +0.1491379_wp, +0.1951452_wp, +0.2133949_wp /
+    DATA bta     /                                                             &
+     +0.0953986_wp, +0.1524760_wp, +0.0564241_wp, -0.0893253_wp, -0.2398868_wp,&
+     -0.3515237_wp, -0.5095144_wp, -0.9469258_wp /
+    DATA bdtmrt  /                                                             &
+     -0.0004672_wp, -0.0000514_wp, -0.0018037_wp, -0.0049440_wp, -0.0069036_wp,&
+     -0.0075844_wp, -0.0079602_wp, -0.0089439_wp /
+    DATA aconst  /                                                             &
+     +1.8686215_wp, +3.4260713_wp, +2.0116185_wp, -0.7777552_wp, -4.6715853_wp,&
+     -7.7314281_wp, -11.7602578_wp, -23.5934198_wp /
+
+!-- Test for compliance with regression range
+    IF ( pmva < -1.0_wp .OR. pmva > 7.0_wp ) THEN
+       nerr = -2_iwp
+    ELSE
+       nerr = 0_iwp
+    ENDIF
+
+!-- Initialise classic PMV
+    pmv  = pmva
+
+!-- Water vapour pressure of air 
+    p10  = 0.05_wp * svp_tt
+    p95  = 1.00_wp * svp_tt
+    IF ( el2m >= p10 .AND. el2m <= p95 ) THEN
+       pa = el2m
+    ELSE
+       nerr = -3_iwp
+       IF ( el2m < p10 ) THEN
+!--       Due to conditions of regressï¿œon: r.H. >= 5 %
+          pa = p10
+       ELSE
+!--       Due to conditions of regressï¿œon: r.H. <= 95 %
+          pa = p95
+       ENDIF
+    ENDIF
+    IF ( pa > 0._wp ) THEN
+!--    Natural logarithm of pa
+       apa = LOG ( pa )
+    ELSE
+       apa = -5._wp
+    ENDIF
+
+!-- Ratio actual water vapour pressure to that of a r.H. of 50 %
+    pa_p50   = 0.5_wp * svp_tt
+    IF ( pa_p50 > 0._wp .AND. pa > 0._wp ) THEN
+       dapa   = apa - LOG ( pa_p50 )
+       pa_p50 = pa / pa_p50
+    ELSE
+       dapa   = -5._wp
+       pa_p50 = 0._wp
+    ENDIF
+!-- Square root of wind velocity
+    IF ( vau1m >= 0._wp ) THEN
+       sqvel = SQRT ( vau1m )
+    ELSE
+       sqvel = 0._wp
+    ENDIF
+!-- Air temperature
+    ta = tt2m
+!-- Difference mean radiation to air temperature
+    dtmrt = tmrt - ta
+
+!-- Select the valid regression coefficients
+    nreg = INT ( pmv )
+    IF ( nreg < 0_iwp ) THEN
+!--    value of the FUNCTION in the case pmv <= -1
+       deltapmv = 0._wp
+       RETURN
+    ENDIF
+    gew = MOD ( pmv, 1._wp )
+    IF ( gew < 0._wp ) gew = 0._wp
+    IF ( nreg > 5_iwp ) THEN
+       ! nreg=6
+       nreg  = 5_iwp
+       gew   = pmv - 5._wp
+       gew2  = pmv - 6._wp
+       IF ( gew2 > 0_iwp ) THEN
+          gew = ( gew - gew2 ) / gew
+       ENDIF
+    ENDIF
+
+!-- Regression valid for 0. <= pmv <= 6.
+    dpmv_1 =                                                                   &
+       + bpa ( nreg ) * pa                                                     &
+       + bpmv ( nreg ) * pmv                                                   &
+       + bapa ( nreg ) * apa                                                   &
+       + bta ( nreg ) * ta                                                     &
+       + bdtmrt ( nreg ) * dtmrt                                               &
+       + bdapa ( nreg ) * dapa                                                 &
+       + bsqvel ( nreg ) * sqvel                                               &
+       + bpa_p50 ( nreg ) * pa_p50                                             &
+       + aconst ( nreg )
+
+    dpmv_2 = 0._wp
+    IF ( nreg < 6_iwp ) THEN
+       dpmv_2 =                                                                &
+          + bpa ( nreg + 1_iwp )     * pa                                      &
+          + bpmv ( nreg + 1_iwp )    * pmv                                     &
+          + bapa ( nreg + 1_iwp )    * apa                                     &
+          + bta ( nreg + 1_iwp )     * ta                                      &
+          + bdtmrt ( nreg + 1_iwp )  * dtmrt                                   &
+          + bdapa ( nreg + 1_iwp )   * dapa                                    &
+          + bsqvel ( nreg + 1_iwp )  * sqvel                                   &
+          + bpa_p50 ( nreg + 1_iwp ) * pa_p50                                  &
+          + aconst ( nreg + 1_iwp )
+    ENDIF
+
+!-- Calculate pmv modification
+    deltapmv = ( 1._wp - gew ) * dpmv_1 + gew * dpmv_2
+    pmvs = pmva + deltapmv
+    IF ( ( pmvs ) < 0._wp ) THEN
+!--    Prevent negative pmv* due to problems with clothing insulation
+       nerr = -4_iwp
+       IF ( pmvs > -0.11_wp ) THEN
+!--       Threshold from FUNCTION pt_regression for winter clothing insulation
+          deltapmv = deltapmv + 0.11_wp
+       ELSE
+!--       Set pmvs to "0" for compliance with summer clothing insulation
+          deltapmv = -1._wp * pmva
+       ENDIF
+    ENDIF
+
+ END FUNCTION deltapmv
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The subroutine "calc_sultr" returns a threshold value to perceived 
+!> temperature allowing to decide whether the actual perceived temperature 
+!> is linked to perecption of sultriness. The threshold values depends 
+!> on the Fanger's classical PMV, expressed here as perceived temperature 
+!> gtc. It is derived from all synoptic observations 1966-1995 of the sites 
+!> 10170 Rostock-Warnemuende and 10803 Freiburg showing heat load. The 
+!> threshold value is valid for subjects acclimatised to Central European 
+!> climate conditions. It includes all effective influences as air 
+!> temperature, relative humidity, mean radiant temperature, and wind 
+!> velocity:
+!> - defined only under warm conditions: gtc based on 0.5 (clo) and
+!>                                       gtc > 16.826 (ï¿œC)
+!> - undefined: sultr_res set at +99.
+!------------------------------------------------------------------------------!
+ SUBROUTINE calc_sultr( gtc, dgtcm, dgtcstd, sultr_res )
+
+    IMPLICIT NONE
+
+!-- Input of the argument list:
+    REAL(wp), INTENT ( IN )  ::  gtc      !< Classical perceived temperature: Base is Fanger's PMV
+
+!-- Additional output variables of argument list:
+    REAL(wp), INTENT ( OUT ) ::  dgtcm    !< Mean deviation gtc (classical gt) to gt* (rational gt 
+!             calculated based on Gagge's rational PMV*)
+    REAL(wp), INTENT ( OUT ) ::  dgtcstd  !< dgtcm plus its standard deviation times a factor 
+!             determining the significance to perceive sultriness
+    REAL(wp), INTENT ( OUT ) ::  sultr_res
+
+!-- Types of coefficients mean deviation: third order polynomial
+    REAL(wp), PARAMETER ::  dgtcka = +7.5776086_wp
+    REAL(wp), PARAMETER ::  dgtckb = -0.740603_wp
+    REAL(wp), PARAMETER ::  dgtckc = +0.0213324_wp
+    REAL(wp), PARAMETER ::  dgtckd = -0.00027797237_wp
+
+!-- Types of coefficients mean deviation plus standard deviation
+!   regression coefficients: third order polynomial
+    REAL(wp), PARAMETER ::  dgtcsa = +0.0268918_wp
+    REAL(wp), PARAMETER ::  dgtcsb = +0.0465957_wp
+    REAL(wp), PARAMETER ::  dgtcsc = -0.00054709752_wp
+    REAL(wp), PARAMETER ::  dgtcsd = +0.0000063714823_wp
+
+!-- Factor to mean standard deviation defining SIGNificance for 
+!   sultriness
+    REAL(wp), PARAMETER :: faktor = 1._wp
+
+!-- Initialise
+    sultr_res = +99._wp
+    dgtcm     = 0._wp
+    dgtcstd   = 999999._wp
+
+    IF ( gtc < 16.826_wp .OR. gtc > 56._wp ) THEN
+!--    Unallowed classical PMV/gtc
+       RETURN
+    ENDIF
+
+!-- Mean deviation dependent on gtc
+    dgtcm = dgtcka + dgtckb * gtc + dgtckc * gtc**2._wp + dgtckd * gtc**3._wp
+
+!-- Mean deviation plus its standard deviation
+    dgtcstd = dgtcsa + dgtcsb * gtc + dgtcsc * gtc**2._wp + dgtcsd * gtc**3._wp
+
+!-- Value of the FUNCTION
+    sultr_res = dgtcm + faktor * dgtcstd
+    IF ( ABS ( sultr_res ) > 99._wp ) sultr_res = +99._wp
+
+ END SUBROUTINE calc_sultr
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Multiple linear regression to calculate an increment delta_kalt, 
+!> to adjust Fanger's classical PMV (pmva) by Gagge's 2 node model, 
+!> applying Fanger's convective heat transfer coefficient, hcf.
+!> Wind velocitiy of the reference environment is 0.10 m/s 
+!------------------------------------------------------------------------------!
+ SUBROUTINE dpmv_cold( pmva, tt2m, vau1m, tmrt, nerr, dpmv_cold_res )
+
+    IMPLICIT NONE
+
+!-- Type of input arguments
+    REAL(wp), INTENT ( IN ) :: pmva      !< Fanger's classical predicted mean vote
+    REAL(wp), INTENT ( IN ) :: tt2m      !< Air temperature (ï¿œC) 2 m above ground
+    REAL(wp), INTENT ( IN ) :: vau1m     !< Relative wind velocity 1 m above ground (m/s)
+    REAL(wp), INTENT ( IN ) :: tmrt      !< Mean radiant temperature (ï¿œC)
+
+!-- Type of output argument
+    INTEGER(iwp), INTENT ( OUT ) :: nerr !< Error indicator: 0 = o.k., +1 = denominator for intersection = 0
+    REAL(wp),     INTENT ( OUT ) :: dpmv_cold_res    !< Increment to adjust pmva according to the results of Gagge's 
+!               2 node model depending on the input
+
+!-- Type of program variables
+    REAL(wp) ::  delta_kalt(3)
+    REAL(wp) ::  pmv_cross(2)
+    REAL(wp) ::  reg_a(3)
+    REAL(wp) ::  coeff(3,5)
+    REAL(wp) ::  r_nenner
+    REAL(wp) ::  pmvc
+    REAL(wp) ::  dtmrt
+    REAL(wp) ::  SQRT_v1m
+    INTEGER(iwp) ::  i
+    INTEGER(iwp) ::  j
+    INTEGER(iwp) ::  i_bin
+
+!-- Coefficient of the 3 regression lines
+    !     1:const   2:*pmvc  3:*tt2m      4:*SQRT_v1m  5:*dtmrt
+    coeff(1,1:5) =                                                             &
+       (/ +0.161_wp, +0.130_wp, -1.125E-03_wp, +1.106E-03_wp, -4.570E-04_wp /)
+    coeff(2,1:5) =                                                             &
+       (/ 0.795_wp, 0.713_wp, -8.880E-03_wp, -1.803E-03_wp, -2.816E-03_wp/)
+    coeff(3,1:5) =                                                             &
+       (/ +0.05761_wp, +0.458_wp, -1.829E-02_wp, -5.577E-03_wp, -1.970E-03_wp /)
+
+!-- Initialise
+    nerr       = 0_iwp
+    dpmv_cold_res  = 0._wp
+    pmvc       = pmva
+    dtmrt      = tmrt - tt2m
+    SQRT_v1m   = vau1m
+    IF ( SQRT_v1m < 0.10_wp ) THEN
+       SQRT_v1m = 0.10_wp
+    ELSE
+       SQRT_v1m = SQRT ( SQRT_v1m )
+    ENDIF
+
+    DO i = 1, 3
+       delta_kalt (i) = 0._wp
+       IF ( i < 3 ) THEN
+          pmv_cross (i) = pmvc
+       ENDIF
+    ENDDO
+
+    DO i = 1, 3
+!--    Regression constant for given meteorological variables
+       reg_a(i) = coeff(i, 1) + coeff(i, 3) * tt2m + coeff(i, 4) * SQRT_v1m +    &
+                  coeff(i,5)*dtmrt 
+       delta_kalt(i) = reg_a(i) + coeff(i, 2) * pmvc
+    ENDDO
+
+!-- Intersection points of regression lines in terms of Fanger's PMV
+    DO i = 1, 2
+       r_nenner = coeff (i, 2) - coeff (i + 1, 2)
+       IF ( ABS ( r_nenner ) > 0.00001_wp ) THEN
+          pmv_cross(i) = ( reg_a (i + 1) - reg_a (i) ) / r_nenner
+       ELSE
+          nerr = 1_iwp
+          RETURN
+       ENDIF
+    ENDDO
+
+    i_bin = 3
+    DO i = 1, 2
+       IF ( pmva > pmv_cross (i) ) THEN
+          i_bin = i
+          EXIT
+       ENDIF
+    ENDDO
+!-- Adjust to operative temperature scaled according 
+!   to classical PMV (Fanger)
+    dpmv_cold_res = delta_kalt(i_bin) - dpmv_adj(pmva)
+
+ END SUBROUTINE dpmv_cold
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the summand dpmv_adj adjusting to the operative temperature 
+!> scaled according to classical PMV (Fanger)
+!> Reference environment: v_1m = 0.10 m/s, dTMRT = 0 K, r.h. = 50 %
+!------------------------------------------------------------------------------!
+ REAL(wp) FUNCTION dpmv_adj( pmva )
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT ( IN ) :: pmva
+    INTEGER(iwp), PARAMETER :: n_bin = 3
+    INTEGER(iwp), PARAMETER :: n_ca = 0
+    INTEGER(iwp), PARAMETER :: n_ce = 3
+    REAL(wp), dimension (n_bin, n_ca:n_ce) :: coef
+
+    REAL(wp)      :: pmv
+    INTEGER(iwp)  :: i, i_bin
+
+!                             range_1     range_2     range_3
+    DATA (coef(i, 0), i = 1, n_bin) /+0.0941540_wp, -0.1506620_wp, -0.0871439_wp/
+    DATA (coef(i, 1), i = 1, n_bin) /+0.0783162_wp, -1.0612651_wp, +0.1695040_wp/
+    DATA (coef(i, 2), i = 1, n_bin) /+0.1350144_wp, -1.0049144_wp, -0.0167627_wp/
+    DATA (coef(i, 3), i = 1, n_bin) /+0.1104037_wp, -0.2005277_wp, -0.0003230_wp/
+
+    IF ( pmva <= -2.1226_wp ) THEN
+       i_bin = 3_iwp
+    ELSE IF ( pmva <= -1.28_wp ) THEN
+       i_bin = 2_iwp
+    ELSE
+       i_bin = 1_iwp
+    ENDIF
+
+    dpmv_adj   = coef( i_bin, n_ca )
+    pmv        = 1._wp
+
+    DO i = n_ca + 1, n_ce
+       pmv      = pmv * pmva
+       dpmv_adj = dpmv_adj + coef(i_bin, i) * pmv
+    ENDDO
+    RETURN
+ END FUNCTION dpmv_adj
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Based on perceived temperature (gt) as input, ireq_neutral determines 
+!> the required clothing insulation (clo) for thermally neutral conditions 
+!> (neither body cooling nor body heating). It is related to the Klima- 
+!> Michel activity level (134.682 W/m2). IREQ_neutral is only defined 
+!> for gt < 10 (ï¿œC)
+!------------------------------------------------------------------------------!
+ REAL(wp) FUNCTION ireq_neutral( gt, ireq_minimal, nerr )
+
+    IMPLICIT NONE
+
+!-- Type declaration of arguments
+    REAL(wp),     INTENT ( IN )  :: gt
+    REAL(wp),     INTENT ( OUT ) :: ireq_minimal
+    INTEGER(iwp), INTENT ( OUT ) :: nerr
+
+!-- Type declaration for internal varables
+    REAL(wp)                     :: top02
+
+!-- Initialise
+    nerr = 0_iwp
+
+!-- Convert perceived temperature from basis 0.1 m/s to basis 0.2 m/s
+    top02 = 1.8788_wp + 0.9296_wp * gt
+
+!-- IREQ neutral conditions (thermal comfort)
+    ireq_neutral = 1.62_wp - 0.0564_wp * top02
+
+!-- Regression only defined for gt <= 10 (ï¿œC)
+    IF ( ireq_neutral < 0.5_wp ) THEN
+       IF ( ireq_neutral < 0.48_wp ) THEN
+          nerr = 1_iwp
+       ENDIF
+       ireq_neutral = 0.5_wp
+    ENDIF
+
+!-- Minimal required clothing insulation: maximal acceptable body cooling
+    ireq_minimal = 1.26_wp - 0.0588_wp * top02
+    IF ( nerr > 0_iwp ) THEN
+       ireq_minimal = ireq_neutral
+    ENDIF
+
+    RETURN
+ END FUNCTION ireq_neutral
+
+ END MODULE biometeorology_pt_mod
Index: /palm/tags/release-6.0/SOURCE/biometeorology_utci_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/biometeorology_utci_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/biometeorology_utci_mod.f90	(revision 3477)
@@ -0,0 +1,330 @@
+!> @file biometeorology_utci_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2018, Deutscher Wetterdienst (DWD) / 
+! German Meteorological Service (DWD)
+!
+! UTCI regression equation after
+! Bröde P, Fiala D, Blazejczyk K, Holmér I, Jendritzky G, Kampmann B, Tinz B, 
+! Havenith G (2012) Deriving the operational procedure for the Universal Thermal
+! Climate Index (UTCI). International Journal of Biometeorology 56 (3):481-494. 
+! doi:10.1007/s00484-011-0454-1
+!
+! original regression source available at
+! www.utci.org
+!------------------------------------------------------------------------------!
+ MODULE biometeorology_utci_mod
+
+!-- Load required variables from existing modules
+    USE kinds
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+!-- Add INTERFACES that must be available to other modules (alphabetical order)
+    PUBLIC calculate_utci_static
+
+
+    INTERFACE calculate_utci_static
+       MODULE PROCEDURE calculate_utci_static
+    END INTERFACE calculate_utci_static
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> SUBROUTINE for calculating UTCI Temperature (UTCI)
+!> computed by a 6th order approximation
+!------------------------------------------------------------------------------!
+ SUBROUTINE calculate_utci_static( ta_in, ehpa, v_hag, tmrt, hag, utci )
+
+    IMPLICIT NONE
+!-- Type of input of the argument list
+    REAL(WP), INTENT ( IN )  ::  ta_in  !< Local air temperature (°C)
+    REAL(WP), INTENT ( IN )  ::  ehpa   !< Loacl vapour pressure (hPa)
+    REAL(WP), INTENT ( IN )  ::  v_hag  !< Incident wind speed (m/s)
+    REAL(WP), INTENT ( IN )  ::  tmrt   !< Local mean radiant temperature (°C)
+    REAL(WP), INTENT ( IN )  ::  hag    !< Height of wind speed input (m)
+!-- Type of output of the argument list
+    REAL(wp), INTENT ( OUT ) ::  utci   !< Universal Thermal Climate Index (°C)
+
+!-- Make sure precission is sufficient for regression equation
+    DOUBLE PRECISION ::  ta
+    DOUBLE PRECISION ::  pa
+    DOUBLE PRECISION ::  d_tmrt
+    DOUBLE PRECISION ::  va
+    DOUBLE PRECISION ::  utci_d
+    DOUBLE PRECISION ::  offset
+
+!-- Initialize
+    offset = 0.d0
+    ta = DBLE( ta_in )
+    d_tmrt = DBLE( tmrt - ta_in )
+
+!-- Use vapour pressure in kpa
+    pa = DBLE( ehpa / 10.0_wp )
+
+!-- Wind altitude correction from hag to 10m after Broede et al. (2012), eq.3
+!   z(0) is set to 0.01 according to UTCI definition
+    va = DBLE( v_hag *  log ( 10.0_wp / 0.01_wp ) / log ( hag / 0.01_wp ) )
+
+!-- Check if input values in range after Broede et al. (2012)
+    IF ( ( d_tmrt > 70.d0 ) .OR. ( d_tmrt < -30.d0 ) .OR.                      &
+       ( ehpa .GE. 50._wp ) ) THEN
+       utci = -999.0_wp
+       RETURN
+    ENDIF
+
+!-- Apply eq. 2 in Broede et al. (2012) for ta out of bounds
+    IF ( ta > 50.d0 ) THEN
+       offset = ta - 50.d0
+       ta = 50.d0
+    ENDIF
+    IF ( ta < -50.d0 ) THEN
+       offset = ta + 50.d0
+       ta = -50.d0
+    ENDIF
+
+!-- For routine application. For wind speeds and relative
+!   humidity values below 0.5 m/s or 5%, respectively, the
+!   user is advised to use the lower bounds for the calculations.
+    IF ( va < 0.5d0 ) va  = 0.5d0
+    IF ( va > 17.0d0 ) va = 17.0d0
+
+!-- Calculate 6th order polynomial as approximation 
+    utci_d = ta +                                                              &
+       ( 6.07562052D-01 )   +                                                  &
+       ( -2.27712343D-02 ) * ta +                                              &
+       ( 8.06470249D-04 )  * ta * ta +                                         &
+       ( -1.54271372D-04 ) * ta * ta * ta +                                    &
+       ( -3.24651735D-06 ) * ta * ta * ta * ta +                               &
+       ( 7.32602852D-08 )  * ta * ta * ta * ta * ta +                          &
+       ( 1.35959073D-09 )  * ta * ta * ta * ta * ta * ta +                     &
+       ( -2.25836520D+00 ) * va +                                              &
+       ( 8.80326035D-02 )  * ta * va +                                         &
+       ( 2.16844454D-03 )  * ta * ta * va +                                    &
+       ( -1.53347087D-05 ) * ta * ta * ta * va +                               &
+       ( -5.72983704D-07 ) * ta * ta * ta * ta * va +                          &
+       ( -2.55090145D-09 ) * ta * ta * ta * ta * ta * va +                     &
+       ( -7.51269505D-01 ) * va * va +                                         &
+       ( -4.08350271D-03 ) * ta * va * va +                                    &
+       ( -5.21670675D-05 ) * ta * ta * va * va +                               &
+       ( 1.94544667D-06 )  * ta * ta * ta * va * va +                          &
+       ( 1.14099531D-08 )  * ta * ta * ta * ta * va * va +                     &
+       ( 1.58137256D-01 )  * va * va * va +                                    &
+       ( -6.57263143D-05 ) * ta * va * va * va +                               &
+       ( 2.22697524D-07 )  * ta * ta * va * va * va +                          &
+       ( -4.16117031D-08 ) * ta * ta * ta * va * va * va +                     &
+       ( -1.27762753D-02 ) * va * va * va * va +                               &
+       ( 9.66891875D-06 )  * ta * va * va * va * va +                          &
+       ( 2.52785852D-09 )  * ta * ta * va * va * va * va +                     &
+       ( 4.56306672D-04 )  * va * va * va * va * va +                          &
+       ( -1.74202546D-07 ) * ta * va * va * va * va * va +                     &
+       ( -5.91491269D-06 ) * va * va * va * va * va * va +                     &
+       ( 3.98374029D-01 )  * d_tmrt +                                          &
+       ( 1.83945314D-04 )  * ta * d_tmrt +                                     &
+       ( -1.73754510D-04 ) * ta * ta * d_tmrt +                                &
+       ( -7.60781159D-07 ) * ta * ta * ta * d_tmrt +                           &
+       ( 3.77830287D-08 )  * ta * ta * ta * ta * d_tmrt +                      &
+       ( 5.43079673D-10 )  * ta * ta * ta * ta * ta * d_tmrt +                 &
+       ( -2.00518269D-02 ) * va * d_tmrt +                                     &
+       ( 8.92859837D-04 )  * ta * va * d_tmrt +                                &
+       ( 3.45433048D-06 )  * ta * ta * va * d_tmrt +                           &
+       ( -3.77925774D-07 ) * ta * ta * ta * va * d_tmrt +                      &
+       ( -1.69699377D-09 ) * ta * ta * ta * ta * va * d_tmrt +                 &
+       ( 1.69992415D-04 )  * va * va * d_tmrt +                                &
+       ( -4.99204314D-05 ) * ta * va * va * d_tmrt +                           &
+       ( 2.47417178D-07 )  * ta * ta * va * va * d_tmrt +                      &
+       ( 1.07596466D-08 )  * ta * ta * ta * va * va * d_tmrt +                 &
+       ( 8.49242932D-05 )  * va * va * va * d_tmrt +                           &
+       ( 1.35191328D-06 )  * ta * va * va * va * d_tmrt +                      &
+       ( -6.21531254D-09 ) * ta * ta * va * va * va * d_tmrt +                 &
+       ( -4.99410301D-06 ) * va * va * va * va * d_tmrt +                      &
+       ( -1.89489258D-08 ) * ta * va * va * va * va * d_tmrt +                 &
+       ( 8.15300114D-08 )  * va * va * va * va * va * d_tmrt +                 &
+       ( 7.55043090D-04 )  * d_tmrt * d_tmrt +                                 &
+       ( -5.65095215D-05 ) * ta * d_tmrt * d_tmrt +                            &
+       ( -4.52166564D-07 ) * ta * ta * d_tmrt * d_tmrt +                       &
+       ( 2.46688878D-08 )  * ta * ta * ta * d_tmrt * d_tmrt +                  &
+       ( 2.42674348D-10 )  * ta * ta * ta * ta * d_tmrt * d_tmrt +             &
+       ( 1.54547250D-04 )  * va * d_tmrt * d_tmrt +                            &
+       ( 5.24110970D-06 )  * ta * va * d_tmrt * d_tmrt +                       &
+       ( -8.75874982D-08 ) * ta * ta * va * d_tmrt * d_tmrt +                  &
+       ( -1.50743064D-09 ) * ta * ta * ta * va * d_tmrt * d_tmrt +             &
+       ( -1.56236307D-05 ) * va * va * d_tmrt * d_tmrt +                       &
+       ( -1.33895614D-07 ) * ta * va * va * d_tmrt * d_tmrt +                  &
+       ( 2.49709824D-09 )  * ta * ta * va * va * d_tmrt * d_tmrt +             &
+       ( 6.51711721D-07 )  * va * va * va * d_tmrt * d_tmrt +                  &
+       ( 1.94960053D-09 )  * ta * va * va * va * d_tmrt * d_tmrt +             &
+       ( -1.00361113D-08 ) * va * va * va * va * d_tmrt * d_tmrt +             &
+       ( -1.21206673D-05 ) * d_tmrt * d_tmrt * d_tmrt +                        &
+       ( -2.18203660D-07 ) * ta * d_tmrt * d_tmrt * d_tmrt +                   &
+       ( 7.51269482D-09 )  * ta * ta * d_tmrt * d_tmrt * d_tmrt +              &
+       ( 9.79063848D-11 )  * ta * ta * ta * d_tmrt * d_tmrt * d_tmrt +         &
+       ( 1.25006734D-06 )  * va * d_tmrt * d_tmrt * d_tmrt +                   &
+       ( -1.81584736D-09 ) * ta * va * d_tmrt * d_tmrt * d_tmrt +              &
+       ( -3.52197671D-10 ) * ta * ta * va * d_tmrt * d_tmrt * d_tmrt +         &
+       ( -3.36514630D-08 ) * va * va * d_tmrt * d_tmrt * d_tmrt +              &
+       ( 1.35908359D-10 )  * ta * va * va * d_tmrt * d_tmrt * d_tmrt +         &
+       ( 4.17032620D-10 )  * va * va * va * d_tmrt * d_tmrt * d_tmrt +         &
+       ( -1.30369025D-09 ) * d_tmrt * d_tmrt * d_tmrt * d_tmrt +               &
+       ( 4.13908461D-10 )  * ta * d_tmrt * d_tmrt * d_tmrt * d_tmrt +          &
+       ( 9.22652254D-12 )  * ta * ta * d_tmrt * d_tmrt * d_tmrt * d_tmrt +     &
+       ( -5.08220384D-09 ) * va * d_tmrt * d_tmrt * d_tmrt * d_tmrt +          &
+       ( -2.24730961D-11 ) * ta * va * d_tmrt * d_tmrt * d_tmrt * d_tmrt +     &
+       ( 1.17139133D-10 )  * va * va * d_tmrt * d_tmrt * d_tmrt * d_tmrt +     &
+       ( 6.62154879D-10 )  * d_tmrt * d_tmrt * d_tmrt * d_tmrt * d_tmrt +      &
+       ( 4.03863260D-13 )  * ta * d_tmrt * d_tmrt * d_tmrt * d_tmrt * d_tmrt + &
+       ( 1.95087203D-12 )  * va * d_tmrt * d_tmrt * d_tmrt * d_tmrt * d_tmrt + &
+       ( -4.73602469D-12 ) * d_tmrt * d_tmrt * d_tmrt * d_tmrt * d_tmrt *      &
+       d_tmrt +                                                                &
+       ( 5.12733497D+00 )  * pa +                                              &
+       ( -3.12788561D-01 ) * ta * pa +                                         &
+       ( -1.96701861D-02 ) * ta * ta * pa +                                    &
+       ( 9.99690870D-04 )  * ta * ta * ta * pa +                               &
+       ( 9.51738512D-06 )  * ta * ta * ta * ta * pa +                          &
+       ( -4.66426341D-07 ) * ta * ta * ta * ta * ta * pa +                     &
+       ( 5.48050612D-01 )  * va * pa +                                         &
+       ( -3.30552823D-03 ) * ta * va * pa +                                    &
+       ( -1.64119440D-03 ) * ta * ta * va * pa +                               &
+       ( -5.16670694D-06 ) * ta * ta * ta * va * pa +                          &
+       ( 9.52692432D-07 )  * ta * ta * ta * ta * va * pa +                     &
+       ( -4.29223622D-02 ) * va * va * pa +                                    &
+       ( 5.00845667D-03 )  * ta * va * va * pa +                               &
+       ( 1.00601257D-06 )  * ta * ta * va * va * pa +                          &
+       ( -1.81748644D-06 ) * ta * ta * ta * va * va * pa +                     &
+       ( -1.25813502D-03 ) * va * va * va * pa +                               &
+       ( -1.79330391D-04 ) * ta * va * va * va * pa +                          &
+       ( 2.34994441D-06 )  * ta * ta * va * va * va * pa +                     &
+       ( 1.29735808D-04 )  * va * va * va * va * pa +                          &
+       ( 1.29064870D-06 )  * ta * va * va * va * va * pa +                     &
+       ( -2.28558686D-06 ) * va * va * va * va * va * pa +                     &
+       ( -3.69476348D-02 ) * d_tmrt * pa +                                     &
+       ( 1.62325322D-03 )  * ta * d_tmrt * pa +                                &
+       ( -3.14279680D-05 ) * ta * ta * d_tmrt * pa +                           &
+       ( 2.59835559D-06 )  * ta * ta * ta * d_tmrt * pa +                      &
+       ( -4.77136523D-08 ) * ta * ta * ta * ta * d_tmrt * pa +                 &
+       ( 8.64203390D-03 )  * va * d_tmrt * pa +                                &
+       ( -6.87405181D-04 ) * ta * va * d_tmrt * pa +                           &
+       ( -9.13863872D-06 ) * ta * ta * va * d_tmrt * pa +                      &
+       ( 5.15916806D-07 )  * ta * ta * ta * va * d_tmrt * pa +                 &
+       ( -3.59217476D-05 ) * va * va * d_tmrt * pa +                           &
+       ( 3.28696511D-05 )  * ta * va * va * d_tmrt * pa +                      &
+       ( -7.10542454D-07 ) * ta * ta * va * va * d_tmrt * pa +                 &
+       ( -1.24382300D-05 ) * va * va * va * d_tmrt * pa +                      &
+       ( -7.38584400D-09 ) * ta * va * va * va * d_tmrt * pa +                 &
+       ( 2.20609296D-07 )  * va * va * va * va * d_tmrt * pa +                 &
+       ( -7.32469180D-04 ) * d_tmrt * d_tmrt * pa +                            &
+       ( -1.87381964D-05 ) * ta * d_tmrt * d_tmrt * pa +                       &
+       ( 4.80925239D-06 )  * ta * ta * d_tmrt * d_tmrt * pa +                  &
+       ( -8.75492040D-08 ) * ta * ta * ta * d_tmrt * d_tmrt * pa +             &
+       ( 2.77862930D-05 )  * va * d_tmrt * d_tmrt * pa +                       &
+       ( -5.06004592D-06 ) * ta * va * d_tmrt * d_tmrt * pa +                  &
+       ( 1.14325367D-07 )  * ta * ta * va * d_tmrt * d_tmrt * pa +             &
+       ( 2.53016723D-06 )  * va * va * d_tmrt * d_tmrt * pa +                  &
+       ( -1.72857035D-08 ) * ta * va * va * d_tmrt * d_tmrt * pa +             &
+       ( -3.95079398D-08 ) * va * va * va * d_tmrt * d_tmrt * pa +             &
+       ( -3.59413173D-07 ) * d_tmrt * d_tmrt * d_tmrt * pa +                   &
+       ( 7.04388046D-07 )  * ta * d_tmrt * d_tmrt * d_tmrt * pa +              &
+       ( -1.89309167D-08 ) * ta * ta * d_tmrt * d_tmrt * d_tmrt * pa +         &
+       ( -4.79768731D-07 ) * va * d_tmrt * d_tmrt * d_tmrt * pa +              &
+       ( 7.96079978D-09 )  * ta * va * d_tmrt * d_tmrt * d_tmrt * pa +         &
+       ( 1.62897058D-09 )  * va * va * d_tmrt * d_tmrt * d_tmrt * pa +         &
+       ( 3.94367674D-08 )  * d_tmrt * d_tmrt * d_tmrt * d_tmrt * pa +          &
+       ( -1.18566247D-09 ) * ta * d_tmrt * d_tmrt * d_tmrt * d_tmrt * pa +     &
+       ( 3.34678041D-10 )  * va * d_tmrt * d_tmrt * d_tmrt * d_tmrt * pa +     &
+       ( -1.15606447D-10 ) * d_tmrt * d_tmrt * d_tmrt * d_tmrt * d_tmrt * pa + &
+       ( -2.80626406D+00 ) * pa * pa +                                         &
+       ( 5.48712484D-01 )  * ta * pa * pa +                                    &
+       ( -3.99428410D-03 ) * ta * ta * pa * pa +                               &
+       ( -9.54009191D-04 ) * ta * ta * ta * pa * pa +                          &
+       ( 1.93090978D-05 )  * ta * ta * ta * ta * pa * pa +                     &
+       ( -3.08806365D-01 ) * va * pa * pa +                                    &
+       ( 1.16952364D-02 )  * ta * va * pa * pa +                               &
+       ( 4.95271903D-04 )  * ta * ta * va * pa * pa +                          &
+       ( -1.90710882D-05 ) * ta * ta * ta * va * pa * pa +                     &
+       ( 2.10787756D-03 )  * va * va * pa * pa +                               &
+       ( -6.98445738D-04 ) * ta * va * va * pa * pa +                          &
+       ( 2.30109073D-05 )  * ta * ta * va * va * pa * pa +                     &
+       ( 4.17856590D-04 )  * va * va * va * pa * pa +                          &
+       ( -1.27043871D-05 ) * ta * va * va * va * pa * pa +                     &
+       ( -3.04620472D-06 ) * va * va * va * va * pa * pa +                     &
+       ( 5.14507424D-02 )  * d_tmrt * pa * pa +                                &
+       ( -4.32510997D-03 ) * ta * d_tmrt * pa * pa +                           &
+       ( 8.99281156D-05 )  * ta * ta * d_tmrt * pa * pa +                      &
+       ( -7.14663943D-07 ) * ta * ta * ta * d_tmrt * pa * pa +                 &
+       ( -2.66016305D-04 ) * va * d_tmrt * pa * pa +                           &
+       ( 2.63789586D-04 )  * ta * va * d_tmrt * pa * pa +                      &
+       ( -7.01199003D-06 ) * ta * ta * va * d_tmrt * pa * pa +                 &
+       ( -1.06823306D-04 ) * va * va * d_tmrt * pa * pa +                      &
+       ( 3.61341136D-06 )  * ta * va * va * d_tmrt * pa * pa +                 &
+       ( 2.29748967D-07 )  * va * va * va * d_tmrt * pa * pa +                 &
+       ( 3.04788893D-04 )  * d_tmrt * d_tmrt * pa * pa +                       &
+       ( -6.42070836D-05 ) * ta * d_tmrt * d_tmrt * pa * pa +                  &
+       ( 1.16257971D-06 )  * ta * ta * d_tmrt * d_tmrt * pa * pa +             &
+       ( 7.68023384D-06 )  * va * d_tmrt * d_tmrt * pa * pa +                  &
+       ( -5.47446896D-07 ) * ta * va * d_tmrt * d_tmrt * pa * pa +             &
+       ( -3.59937910D-08 ) * va * va * d_tmrt * d_tmrt * pa * pa +             &
+       ( -4.36497725D-06 ) * d_tmrt * d_tmrt * d_tmrt * pa * pa +              &
+       ( 1.68737969D-07 )  * ta * d_tmrt * d_tmrt * d_tmrt * pa * pa +         &
+       ( 2.67489271D-08 )  * va * d_tmrt * d_tmrt * d_tmrt * pa * pa +         &
+       ( 3.23926897D-09 )  * d_tmrt * d_tmrt * d_tmrt * d_tmrt * pa * pa +     &
+       ( -3.53874123D-02 ) * pa * pa * pa +                                    &
+       ( -2.21201190D-01 ) * ta * pa * pa * pa +                               &
+       ( 1.55126038D-02 )  * ta * ta * pa * pa * pa +                          &
+       ( -2.63917279D-04 ) * ta * ta * ta * pa * pa * pa +                     &
+       ( 4.53433455D-02 )  * va * pa * pa * pa +                               &
+       ( -4.32943862D-03 ) * ta * va * pa * pa * pa +                          &
+       ( 1.45389826D-04 )  * ta * ta * va * pa * pa * pa +                     &
+       ( 2.17508610D-04 )  * va * va * pa * pa * pa +                          &
+       ( -6.66724702D-05 ) * ta * va * va * pa * pa * pa +                     &
+       ( 3.33217140D-05 )  * va * va * va * pa * pa * pa +                     &
+       ( -2.26921615D-03 ) * d_tmrt * pa * pa * pa +                           &
+       ( 3.80261982D-04 )  * ta * d_tmrt * pa * pa * pa +                      &
+       ( -5.45314314D-09 ) * ta * ta * d_tmrt * pa * pa * pa +                 &
+       ( -7.96355448D-04 ) * va * d_tmrt * pa * pa * pa +                      &
+       ( 2.53458034D-05 )  * ta * va * d_tmrt * pa * pa * pa +                 &
+       ( -6.31223658D-06 ) * va * va * d_tmrt * pa * pa * pa +                 &
+       ( 3.02122035D-04 )  * d_tmrt * d_tmrt * pa * pa * pa +                  &
+       ( -4.77403547D-06 ) * ta * d_tmrt * d_tmrt * pa * pa * pa +             &
+       ( 1.73825715D-06 )  * va * d_tmrt * d_tmrt * pa * pa * pa +             &
+       ( -4.09087898D-07 ) * d_tmrt * d_tmrt * d_tmrt * pa * pa * pa +         &
+       ( 6.14155345D-01 )  * pa * pa * pa * pa +                               &
+       ( -6.16755931D-02 ) * ta * pa * pa * pa * pa +                          &
+       ( 1.33374846D-03 )  * ta * ta * pa * pa * pa * pa +                     &
+       ( 3.55375387D-03 )  * va * pa * pa * pa * pa +                          &
+       ( -5.13027851D-04 ) * ta * va * pa * pa * pa * pa +                     &
+       ( 1.02449757D-04 )  * va * va * pa * pa * pa * pa +                     &
+       ( -1.48526421D-03 ) * d_tmrt * pa * pa * pa * pa +                      &
+       ( -4.11469183D-05 ) * ta * d_tmrt * pa * pa * pa * pa +                 &
+       ( -6.80434415D-06 ) * va * d_tmrt * pa * pa * pa * pa +                 &
+       ( -9.77675906D-06 ) * d_tmrt * d_tmrt * pa * pa * pa * pa +             &
+       ( 8.82773108D-02 )  * pa * pa * pa * pa * pa +                          &
+       ( -3.01859306D-03 ) * ta * pa * pa * pa * pa * pa +                     &
+       ( 1.04452989D-03 )  * va * pa * pa * pa * pa * pa +                     &
+       ( 2.47090539D-04 )  * d_tmrt * pa * pa * pa * pa * pa +                 &
+       ( 1.48348065D-03 )  * pa * pa * pa * pa * pa * pa 
+
+!-- Cast result to working precision
+    utci = REAL( utci_d + offset, wp )
+
+ END SUBROUTINE calculate_utci_static
+
+
+ END MODULE biometeorology_utci_mod
Index: /palm/tags/release-6.0/SOURCE/boundary_conds.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/boundary_conds.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/boundary_conds.f90	(revision 3477)
@@ -0,0 +1,1386 @@
+!> @file boundary_conds.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! Bugfix in setting boundary conditions in offline nesting
+! 
+! 3341 2018-10-15 10:31:27Z suehring
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename some variables concerning LES-LES as well as offline nesting
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! - Use wall function for e_p and diss_p in case of rans_tke_e
+! - move limitation of diss_p from tcm_prognostic
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! Set boundary condition for TKE and TKE dissipation rate in case of nesting
+! and if parent model operates in RANS mode but child model in LES mode.
+! mode
+! 
+! 2793 2018-02-07 10:54:33Z suehring
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Adjust boundary conditions for e and diss in case of TKE-e closure (TG)
+! Implementation of chemistry module (FK)
+! 
+! 2569 2017-10-20 11:54:42Z kanani
+! Removed redundant code for ibc_s_b=1 and ibc_q_b=1
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical grid nesting implemented: exclude setting vertical velocity to zero 
+! on fine grid (SadiqHuq)
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Remove unused control parameter large_scale_forcing from only-list
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Set boundary conditions on topography top using flag method.
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! Adjustments for top boundary condition for passive scalar
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Treat humidity and passive scalar separately
+! 
+! 1823 2016-04-07 08:57:52Z hoffmann
+! Initial version of purely vertical nesting introduced.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme removed. microphyisics_seifert added.
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! index bug for u_p at left outflow removed
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1742 2016-01-13 09:50:06Z raasch
+! bugfix for outflow Neumann boundary conditions at bottom and top
+!
+! 1717 2015-11-11 15:09:47Z raasch
+! Bugfix: index error in outflow conditions for left boundary
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+! 
+! 1410 2014-05-23 12:16:18Z suehring
+! Bugfix: set dirichlet boundary condition for passive_scalar at model domain 
+! top 
+!
+! 1399 2014-05-07 11:16:25Z heinze
+! Bugfix: set inflow boundary conditions also if no humidity or passive_scalar
+! is used.
+! 
+! 1398 2014-05-07 11:15:00Z heinze
+! Dirichlet-condition at the top for u and v changed to u_init and v_init also 
+! for large_scale_forcing
+! 
+! 1380 2014-04-28 12:40:45Z heinze
+! Adjust Dirichlet-condition at the top for pt in case of nudging
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! Bottom and top boundary conditions of rain water content (qr) and 
+! rain drop concentration (nr) changed to Dirichlet
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!  
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! loop independent clauses added
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! Adjust ug and vg at each timestep in case of large_scale_forcing
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! Bugfix: Neumann boundary conditions for the velocity components at the
+! outflow are in fact radiation boundary conditions using the maximum phase
+! velocity that ensures numerical stability (CFL-condition).
+! Hence, logical operator use_cmax is now used instead of bc_lr_dirneu/_neudir.
+! Bugfix: In case of use_cmax at the outflow, u, v, w are replaced by
+! u_p, v_p, w_p  
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! boundary conditions of two-moment cloud scheme are restricted to Neumann-
+! boundary-conditions
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! GPU-porting
+! dummy argument "range" removed
+! Bugfix: wrong index in loops of radiation boundary condition
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! boundary conditions for the two new prognostic equations (nr, qr) of the 
+! two-moment cloud scheme
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+!
+! 978 2012-08-09 08:28:32Z fricke
+! Neumann boudnary conditions are added at the inflow boundary for the SGS-TKE.
+! Outflow boundary conditions for the velocity components can be set to Neumann
+! conditions or to radiation conditions with a horizontal averaged phase
+! velocity. 
+!
+! 875 2012-04-02 15:35:15Z gryschka
+! Bugfix in case of dirichlet inflow bc at the right or north boundary
+!
+! Revision 1.1  1997/09/12 06:21:34  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Boundary conditions for the prognostic quantities.
+!> One additional bottom boundary condition is applied for the TKE (=(u*)**2)
+!> in prandtl_fluxes. The cyclic lateral boundary conditions are implicitly
+!> handled in routine exchange_horiz. Pressure boundary conditions are
+!> explicitly set in routines pres, poisfft, poismg and sor.
+!------------------------------------------------------------------------------!
+ SUBROUTINE boundary_conds
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  c_u, c_u_m, c_u_m_l, c_v, c_v_m, c_v_m_l, c_w, c_w_m, c_w_m_l,  &
+               diss, diss_p, dzu, e_p, nc_p, nr_p, pt, pt_init, pt_p, q,       &
+               q_p, qc_p, qr_p, s, s_p, sa, sa_p, u, u_init, u_m_l, u_m_n,     &
+               u_m_r, u_m_s, u_p, v, v_init, v_m_l, v_m_n, v_m_r, v_m_s, v_p,  &
+               w, w_p, w_m_l, w_m_n, w_m_r, w_m_s
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  kappa
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_boundary_conds 
+              
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,  &
+               bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
+               bc_radiation_s, bc_pt_t_val, bc_q_t_val, bc_s_t_val,            &
+               child_domain, constant_diffusion, coupling_mode, &
+               dt_3d, humidity, ibc_pt_b, ibc_pt_t, ibc_q_b, ibc_q_t, ibc_s_b, &
+               ibc_s_t, ibc_uv_b, ibc_uv_t,                           &
+               intermediate_timestep_count, nesting_offline, nudging,          &
+               ocean_mode, passive_scalar, rans_mode, rans_tke_e, tsc, use_cmax
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy, dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb, nzt
+
+    USE kinds
+
+    USE ocean_mod,                                                             &
+        ONLY:  ibc_sa_t
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY : nesting_mode, rans_mode_parent
+ 
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_boundary_conds        
+
+    USE surface_mod,                                                           &
+        ONLY :  bc_h, surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v,          &
+                surf_usm_h, surf_usm_v
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  c_0
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< grid index x direction
+    INTEGER(iwp) ::  j  !< grid index y direction
+    INTEGER(iwp) ::  k  !< grid index z direction
+    INTEGER(iwp) ::  kb !< variable to set respective boundary value, depends on facing. 
+    INTEGER(iwp) ::  l  !< running index boundary type, for up- and downward-facing walls
+    INTEGER(iwp) ::  m  !< running index surface elements
+
+    REAL(wp)    ::  c_max !<
+    REAL(wp)    ::  denom !<
+
+
+!
+!-- Bottom boundary 
+    IF ( ibc_uv_b == 1 )  THEN
+       u_p(nzb,:,:) = u_p(nzb+1,:,:)
+       v_p(nzb,:,:) = v_p(nzb+1,:,:)
+    ENDIF
+!
+!-- Set zero vertical velocity at topography top (l=0), or bottom (l=1) in case
+!-- of downward-facing surfaces. 
+    DO  l = 0, 1
+!
+!--    Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--    for downward-facing surfaces at topography bottom (k+1). 
+       kb = MERGE( -1, 1, l == 0 )
+       !$OMP PARALLEL DO PRIVATE( i, j, k )
+       DO  m = 1, bc_h(l)%ns
+          i = bc_h(l)%i(m)            
+          j = bc_h(l)%j(m)
+          k = bc_h(l)%k(m)
+          w_p(k+kb,j,i) = 0.0_wp
+       ENDDO
+    ENDDO
+
+!
+!-- Top boundary. A nested domain ( ibc_uv_t = 3 ) does not require settings.
+    IF ( ibc_uv_t == 0 )  THEN
+        u_p(nzt+1,:,:) = u_init(nzt+1)
+        v_p(nzt+1,:,:) = v_init(nzt+1)
+    ELSEIF ( ibc_uv_t == 1 )  THEN
+        u_p(nzt+1,:,:) = u_p(nzt,:,:)
+        v_p(nzt+1,:,:) = v_p(nzt,:,:)
+    ENDIF
+
+!
+!-- Vertical nesting: Vertical velocity not zero at the top of the fine grid
+    IF (  .NOT.  child_domain  .AND.  .NOT.  nesting_offline  .AND.            &
+                 TRIM(coupling_mode) /= 'vnested_fine' )  THEN
+       w_p(nzt:nzt+1,:,:) = 0.0_wp  !< nzt is not a prognostic level (but cf. pres)
+    ENDIF
+
+!
+!-- Temperature at bottom and top boundary.
+!-- In case of coupled runs (ibc_pt_b = 2) the temperature is given by
+!-- the sea surface temperature of the coupled ocean model.
+!-- Dirichlet
+    IF ( ibc_pt_b == 0 )  THEN
+       DO  l = 0, 1
+!
+!--       Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--       for downward-facing surfaces at topography bottom (k+1). 
+          kb = MERGE( -1, 1, l == 0 )
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(l)%ns
+             i = bc_h(l)%i(m)            
+             j = bc_h(l)%j(m)
+             k = bc_h(l)%k(m)
+             pt_p(k+kb,j,i) = pt(k+kb,j,i)
+          ENDDO
+       ENDDO
+!
+!-- Neumann, zero-gradient
+    ELSEIF ( ibc_pt_b == 1 )  THEN
+       DO  l = 0, 1
+!
+!--       Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--       for downward-facing surfaces at topography bottom (k+1). 
+          kb = MERGE( -1, 1, l == 0 )
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(l)%ns
+             i = bc_h(l)%i(m)            
+             j = bc_h(l)%j(m)
+             k = bc_h(l)%k(m)
+             pt_p(k+kb,j,i) = pt_p(k,j,i)
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Temperature at top boundary
+    IF ( ibc_pt_t == 0 )  THEN
+        pt_p(nzt+1,:,:) = pt(nzt+1,:,:)
+!
+!--     In case of nudging adjust top boundary to pt which is
+!--     read in from NUDGING-DATA
+        IF ( nudging )  THEN
+           pt_p(nzt+1,:,:) = pt_init(nzt+1)
+        ENDIF
+    ELSEIF ( ibc_pt_t == 1 )  THEN
+        pt_p(nzt+1,:,:) = pt_p(nzt,:,:)
+    ELSEIF ( ibc_pt_t == 2 )  THEN
+        pt_p(nzt+1,:,:) = pt_p(nzt,:,:) + bc_pt_t_val * dzu(nzt+1)
+    ENDIF
+
+!
+!-- Boundary conditions for TKE.
+!-- Generally Neumann conditions with de/dz=0 are assumed.
+    IF ( .NOT. constant_diffusion )  THEN
+
+       IF ( .NOT. rans_tke_e )  THEN
+          DO  l = 0, 1
+!
+!--         Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--         for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                e_p(k+kb,j,i) = e_p(k,j,i)
+             ENDDO
+          ENDDO
+       ELSE
+!
+!--       Use wall function within constant-flux layer
+!--       Upward-facing surfaces
+!--       Default surfaces
+          DO  m = 1, surf_def_h(0)%ns
+             i = surf_def_h(0)%i(m)
+             j = surf_def_h(0)%j(m)
+             k = surf_def_h(0)%k(m)
+             e_p(k,j,i) = ( surf_def_h(0)%us(m) / c_0 )**2
+          ENDDO
+!
+!--       Natural surfaces
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+             k = surf_lsm_h%k(m)
+             e_p(k,j,i) = ( surf_lsm_h%us(m) / c_0 )**2
+          ENDDO
+!
+!--       Urban surfaces
+          DO  m = 1, surf_usm_h%ns
+             i = surf_usm_h%i(m)
+             j = surf_usm_h%j(m)
+             k = surf_usm_h%k(m)
+             e_p(k,j,i) = ( surf_usm_h%us(m) / c_0 )**2
+          ENDDO
+!
+!--       Vertical surfaces
+          DO  l = 0, 3
+!
+!--          Default surfaces
+             DO  m = 1, surf_def_v(l)%ns
+                i = surf_def_v(l)%i(m)
+                j = surf_def_v(l)%j(m)
+                k = surf_def_v(l)%k(m)
+                e_p(k,j,i) = ( surf_def_v(l)%us(m) / c_0 )**2
+             ENDDO
+!
+!--          Natural surfaces
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m)
+                j = surf_lsm_v(l)%j(m)
+                k = surf_lsm_v(l)%k(m)
+                e_p(k,j,i) = ( surf_lsm_v(l)%us(m) / c_0 )**2
+             ENDDO
+!
+!--          Urban surfaces
+             DO  m = 1, surf_usm_v(l)%ns
+                i = surf_usm_v(l)%i(m)
+                j = surf_usm_v(l)%j(m)
+                k = surf_usm_v(l)%k(m)
+                e_p(k,j,i) = ( surf_usm_v(l)%us(m) / c_0 )**2
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( .NOT. child_domain )  THEN
+          e_p(nzt+1,:,:) = e_p(nzt,:,:)
+!
+!--    Nesting case: if parent operates in RANS mode and child in LES mode,
+!--    no TKE is transfered. This case, set Neumann conditions at lateral and 
+!--    top child boundaries. 
+!--    If not ( both either in RANS or in LES mode ), TKE boundary condition
+!--    is treated in the nesting. 
+       ELSE
+
+          IF ( rans_mode_parent  .AND.  .NOT. rans_mode )  THEN
+
+             e_p(nzt+1,:,:) = e_p(nzt,:,:)
+             IF ( bc_dirichlet_l )  e_p(:,:,nxl-1) = e_p(:,:,nxl)
+             IF ( bc_dirichlet_r )  e_p(:,:,nxr+1) = e_p(:,:,nxr)
+             IF ( bc_dirichlet_s )  e_p(:,nys-1,:) = e_p(:,nys,:)
+             IF ( bc_dirichlet_n )  e_p(:,nyn+1,:) = e_p(:,nyn,:)
+
+          ENDIF
+       ENDIF
+    ENDIF
+
+!
+!-- Boundary conditions for TKE dissipation rate. 
+    IF ( rans_tke_e )  THEN
+!
+!--    Use wall function within constant-flux layer
+!--    Upward-facing surfaces
+!--    Default surfaces
+       DO  m = 1, surf_def_h(0)%ns
+          i = surf_def_h(0)%i(m)
+          j = surf_def_h(0)%j(m)
+          k = surf_def_h(0)%k(m)
+          diss_p(k,j,i) = surf_def_h(0)%us(m)**3          &
+                        / ( kappa * surf_def_h(0)%z_mo(m) )
+       ENDDO
+!
+!--    Natural surfaces
+       DO  m = 1, surf_lsm_h%ns
+          i = surf_lsm_h%i(m)
+          j = surf_lsm_h%j(m)
+          k = surf_lsm_h%k(m)
+          diss_p(k,j,i) = surf_lsm_h%us(m)**3          &
+                        / ( kappa * surf_lsm_h%z_mo(m) )
+       ENDDO
+!
+!--    Urban surfaces
+       DO  m = 1, surf_usm_h%ns
+          i = surf_usm_h%i(m)
+          j = surf_usm_h%j(m)
+          k = surf_usm_h%k(m)
+          diss_p(k,j,i) = surf_usm_h%us(m)**3          &
+                        / ( kappa * surf_usm_h%z_mo(m) )
+       ENDDO
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+!
+!--       Default surfaces
+          DO  m = 1, surf_def_v(l)%ns
+             i = surf_def_v(l)%i(m)
+             j = surf_def_v(l)%j(m)
+             k = surf_def_v(l)%k(m)
+             diss_p(k,j,i) = surf_def_v(l)%us(m)**3          &
+                           / ( kappa * surf_def_v(l)%z_mo(m) )
+          ENDDO
+!
+!--       Natural surfaces
+          DO  m = 1, surf_lsm_v(l)%ns
+             i = surf_lsm_v(l)%i(m)
+             j = surf_lsm_v(l)%j(m)
+             k = surf_lsm_v(l)%k(m)
+             diss_p(k,j,i) = surf_lsm_v(l)%us(m)**3          &
+                           / ( kappa * surf_lsm_v(l)%z_mo(m) )
+          ENDDO
+!
+!--       Urban surfaces
+          DO  m = 1, surf_usm_v(l)%ns
+             i = surf_usm_v(l)%i(m)
+             j = surf_usm_v(l)%j(m)
+             k = surf_usm_v(l)%k(m)
+             diss_p(k,j,i) = surf_usm_v(l)%us(m)**3          &
+                           / ( kappa * surf_usm_v(l)%z_mo(m) )
+          ENDDO
+       ENDDO
+!
+!--    Limit change of diss to be between -90% and +100%. Also, set an absolute
+!--    minimum value
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb, nzt+1
+                diss_p(k,j,i) = MAX( MIN( diss_p(k,j,i),          &
+                                          2.0_wp * diss(k,j,i) ), &
+                                     0.1_wp * diss(k,j,i),        &
+                                     0.0001_wp )
+             ENDDO
+          ENDDO
+       ENDDO
+
+       IF ( .NOT. child_domain )  THEN
+          diss_p(nzt+1,:,:) = diss_p(nzt,:,:)
+       ENDIF
+    ENDIF
+
+!
+!-- Boundary conditions for salinity
+    IF ( ocean_mode )  THEN
+!
+!--    Bottom boundary: Neumann condition because salinity flux is always
+!--    given.
+       DO  l = 0, 1
+!
+!--       Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--       for downward-facing surfaces at topography bottom (k+1). 
+          kb = MERGE( -1, 1, l == 0 )
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(l)%ns
+             i = bc_h(l)%i(m)            
+             j = bc_h(l)%j(m)
+             k = bc_h(l)%k(m)
+             sa_p(k+kb,j,i) = sa_p(k,j,i)
+          ENDDO
+       ENDDO
+!
+!--    Top boundary: Dirichlet or Neumann
+       IF ( ibc_sa_t == 0 )  THEN
+           sa_p(nzt+1,:,:) = sa(nzt+1,:,:)
+       ELSEIF ( ibc_sa_t == 1 )  THEN
+           sa_p(nzt+1,:,:) = sa_p(nzt,:,:)
+       ENDIF
+
+    ENDIF
+
+!
+!-- Boundary conditions for total water content,
+!-- bottom and top boundary (see also temperature)
+    IF ( humidity )  THEN
+!
+!--    Surface conditions for constant_humidity_flux
+!--    Run loop over all non-natural and natural walls. Note, in wall-datatype
+!--    the k coordinate belongs to the atmospheric grid point, therefore, set
+!--    q_p at k-1
+       IF ( ibc_q_b == 0 ) THEN
+
+          DO  l = 0, 1
+!
+!--          Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--          for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                q_p(k+kb,j,i) = q(k+kb,j,i)
+             ENDDO
+          ENDDO
+          
+       ELSE
+          
+          DO  l = 0, 1
+!
+!--          Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--          for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                q_p(k+kb,j,i) = q_p(k,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Top boundary
+       IF ( ibc_q_t == 0 ) THEN
+          q_p(nzt+1,:,:) = q(nzt+1,:,:)
+       ELSEIF ( ibc_q_t == 1 ) THEN
+          q_p(nzt+1,:,:) = q_p(nzt,:,:) + bc_q_t_val * dzu(nzt+1)
+       ENDIF
+
+       IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+!             
+!--       Surface conditions cloud water (Dirichlet)
+!--       Run loop over all non-natural and natural walls. Note, in wall-datatype
+!--       the k coordinate belongs to the atmospheric grid point, therefore, set
+!--       qr_p and nr_p at k-1
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             qc_p(k-1,j,i) = 0.0_wp
+             nc_p(k-1,j,i) = 0.0_wp
+          ENDDO
+!
+!--       Top boundary condition for cloud water (Dirichlet)
+          qc_p(nzt+1,:,:) = 0.0_wp
+          nc_p(nzt+1,:,:) = 0.0_wp
+           
+       ENDIF
+
+       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+!             
+!--       Surface conditions rain water (Dirichlet)
+!--       Run loop over all non-natural and natural walls. Note, in wall-datatype
+!--       the k coordinate belongs to the atmospheric grid point, therefore, set
+!--       qr_p and nr_p at k-1
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             qr_p(k-1,j,i) = 0.0_wp
+             nr_p(k-1,j,i) = 0.0_wp
+          ENDDO
+!
+!--       Top boundary condition for rain water (Dirichlet)
+          qr_p(nzt+1,:,:) = 0.0_wp
+          nr_p(nzt+1,:,:) = 0.0_wp
+           
+       ENDIF
+    ENDIF
+!
+!-- Boundary conditions for scalar,
+!-- bottom and top boundary (see also temperature)
+    IF ( passive_scalar )  THEN
+!
+!--    Surface conditions for constant_humidity_flux
+!--    Run loop over all non-natural and natural walls. Note, in wall-datatype
+!--    the k coordinate belongs to the atmospheric grid point, therefore, set
+!--    s_p at k-1
+       IF ( ibc_s_b == 0 ) THEN
+          
+          DO  l = 0, 1
+!
+!--          Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--          for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                s_p(k+kb,j,i) = s(k+kb,j,i)
+             ENDDO
+          ENDDO
+          
+       ELSE
+          
+          DO  l = 0, 1
+!
+!--          Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--          for downward-facing surfaces at topography bottom (k+1). 
+             kb = MERGE( -1, 1, l == 0 )
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, bc_h(l)%ns
+                i = bc_h(l)%i(m)            
+                j = bc_h(l)%j(m)
+                k = bc_h(l)%k(m)
+                s_p(k+kb,j,i) = s_p(k,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Top boundary condition
+       IF ( ibc_s_t == 0 )  THEN
+          s_p(nzt+1,:,:) = s(nzt+1,:,:)
+       ELSEIF ( ibc_s_t == 1 )  THEN
+          s_p(nzt+1,:,:) = s_p(nzt,:,:)
+       ELSEIF ( ibc_s_t == 2 )  THEN
+          s_p(nzt+1,:,:) = s_p(nzt,:,:) + bc_s_t_val * dzu(nzt+1)
+       ENDIF
+
+    ENDIF    
+!
+!-- Top/bottom boundary conditions for chemical species
+    IF ( air_chemistry )  CALL chem_boundary_conds( 'set_bc_bottomtop' )
+!
+!-- In case of inflow or nest boundary at the south boundary the boundary for v
+!-- is at nys and in case of inflow or nest boundary at the left boundary the
+!-- boundary for u is at nxl. Since in prognostic_equations (cache optimized
+!-- version) these levels are handled as a prognostic level, boundary values
+!-- have to be restored here.
+!-- For the SGS-TKE, Neumann boundary conditions are used at the inflow.
+    IF ( bc_dirichlet_s )  THEN
+       v_p(:,nys,:) = v_p(:,nys-1,:)
+       IF ( .NOT. constant_diffusion ) e_p(:,nys-1,:) = e_p(:,nys,:)
+    ELSEIF ( bc_dirichlet_n )  THEN
+       IF ( .NOT. constant_diffusion ) e_p(:,nyn+1,:) = e_p(:,nyn,:)
+    ELSEIF ( bc_dirichlet_l ) THEN
+       u_p(:,:,nxl) = u_p(:,:,nxl-1)
+       IF ( .NOT. constant_diffusion ) e_p(:,:,nxl-1) = e_p(:,:,nxl)
+    ELSEIF ( bc_dirichlet_r )  THEN
+       IF ( .NOT. constant_diffusion ) e_p(:,:,nxr+1) = e_p(:,:,nxr)
+    ENDIF
+
+!
+!-- The same restoration for u at i=nxl and v at j=nys as above must be made
+!-- in case of nest boundaries. This must not be done in case of vertical nesting 
+!-- mode as in that case the lateral boundaries are actually cyclic. 
+    IF ( nesting_mode /= 'vertical'  .OR.  nesting_offline )  THEN
+       IF ( bc_dirichlet_s )  THEN
+          v_p(:,nys,:) = v_p(:,nys-1,:)
+       ENDIF
+       IF ( bc_dirichlet_l )  THEN
+          u_p(:,:,nxl) = u_p(:,:,nxl-1)
+       ENDIF
+    ENDIF
+
+!
+!-- Lateral boundary conditions for scalar quantities at the outflow
+    IF ( bc_radiation_s )  THEN
+       pt_p(:,nys-1,:)     = pt_p(:,nys,:)
+       IF ( .NOT. constant_diffusion )  e_p(:,nys-1,:) = e_p(:,nys,:)
+       IF ( rans_tke_e )  diss_p(:,nys-1,:) = diss_p(:,nys,:)
+       IF ( humidity )  THEN
+          q_p(:,nys-1,:) = q_p(:,nys,:)
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             qc_p(:,nys-1,:) = qc_p(:,nys,:)
+             nc_p(:,nys-1,:) = nc_p(:,nys,:)
+          ENDIF
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             qr_p(:,nys-1,:) = qr_p(:,nys,:)
+             nr_p(:,nys-1,:) = nr_p(:,nys,:)
+          ENDIF
+       ENDIF
+       IF ( passive_scalar )  s_p(:,nys-1,:) = s_p(:,nys,:)
+    ELSEIF ( bc_radiation_n )  THEN
+       pt_p(:,nyn+1,:)     = pt_p(:,nyn,:)
+       IF ( .NOT. constant_diffusion )  e_p(:,nyn+1,:) = e_p(:,nyn,:)
+       IF ( rans_tke_e )  diss_p(:,nyn+1,:) = diss_p(:,nyn,:)
+       IF ( humidity )  THEN
+          q_p(:,nyn+1,:) = q_p(:,nyn,:)
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             qc_p(:,nyn+1,:) = qc_p(:,nyn,:)
+             nc_p(:,nyn+1,:) = nc_p(:,nyn,:)
+          ENDIF
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             qr_p(:,nyn+1,:) = qr_p(:,nyn,:)
+             nr_p(:,nyn+1,:) = nr_p(:,nyn,:)
+          ENDIF
+       ENDIF
+       IF ( passive_scalar )  s_p(:,nyn+1,:) = s_p(:,nyn,:)
+    ELSEIF ( bc_radiation_l )  THEN
+       pt_p(:,:,nxl-1)     = pt_p(:,:,nxl)
+       IF ( .NOT. constant_diffusion )  e_p(:,:,nxl-1) = e_p(:,:,nxl)
+       IF ( rans_tke_e )  diss_p(:,:,nxl-1) = diss_p(:,:,nxl)
+       IF ( humidity )  THEN
+          q_p(:,:,nxl-1) = q_p(:,:,nxl)
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             qc_p(:,:,nxl-1) = qc_p(:,:,nxl)
+             nc_p(:,:,nxl-1) = nc_p(:,:,nxl)
+          ENDIF
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             qr_p(:,:,nxl-1) = qr_p(:,:,nxl)
+             nr_p(:,:,nxl-1) = nr_p(:,:,nxl)
+          ENDIF
+       ENDIF
+       IF ( passive_scalar )  s_p(:,:,nxl-1) = s_p(:,:,nxl)
+    ELSEIF ( bc_radiation_r )  THEN
+       pt_p(:,:,nxr+1)     = pt_p(:,:,nxr)
+       IF ( .NOT. constant_diffusion )  e_p(:,:,nxr+1) = e_p(:,:,nxr)
+       IF ( rans_tke_e )  diss_p(:,:,nxr+1) = diss_p(:,:,nxr)
+       IF ( humidity )  THEN
+          q_p(:,:,nxr+1) = q_p(:,:,nxr)
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             qc_p(:,:,nxr+1) = qc_p(:,:,nxr)
+             nc_p(:,:,nxr+1) = nc_p(:,:,nxr)
+          ENDIF
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             qr_p(:,:,nxr+1) = qr_p(:,:,nxr)
+             nr_p(:,:,nxr+1) = nr_p(:,:,nxr)
+          ENDIF
+       ENDIF
+       IF ( passive_scalar )  s_p(:,:,nxr+1) = s_p(:,:,nxr)
+    ENDIF
+
+!
+!-- Lateral boundary conditions for chemical species
+    IF ( air_chemistry )  CALL chem_boundary_conds( 'set_bc_lateral' )    
+
+!
+!-- Radiation boundary conditions for the velocities at the respective outflow.
+!-- The phase velocity is either assumed to the maximum phase velocity that
+!-- ensures numerical stability (CFL-condition) or calculated after
+!-- Orlanski(1976) and averaged along the outflow boundary.
+    IF ( bc_radiation_s )  THEN
+
+       IF ( use_cmax )  THEN
+          u_p(:,-1,:) = u(:,0,:)
+          v_p(:,0,:)  = v(:,1,:)
+          w_p(:,-1,:) = w(:,0,:)          
+       ELSEIF ( .NOT. use_cmax )  THEN
+
+          c_max = dy / dt_3d
+
+          c_u_m_l = 0.0_wp 
+          c_v_m_l = 0.0_wp
+          c_w_m_l = 0.0_wp
+
+          c_u_m = 0.0_wp 
+          c_v_m = 0.0_wp
+          c_w_m = 0.0_wp
+
+!
+!--       Calculate the phase speeds for u, v, and w, first local and then
+!--       average along the outflow boundary.
+          DO  k = nzb+1, nzt+1
+             DO  i = nxl, nxr
+
+                denom = u_m_s(k,0,i) - u_m_s(k,1,i)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_u(k,i) = -c_max * ( u(k,0,i) - u_m_s(k,0,i) ) / ( denom * tsc(2) )
+                   IF ( c_u(k,i) < 0.0_wp )  THEN
+                      c_u(k,i) = 0.0_wp
+                   ELSEIF ( c_u(k,i) > c_max )  THEN
+                      c_u(k,i) = c_max
+                   ENDIF
+                ELSE
+                   c_u(k,i) = c_max
+                ENDIF
+
+                denom = v_m_s(k,1,i) - v_m_s(k,2,i)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_v(k,i) = -c_max * ( v(k,1,i) - v_m_s(k,1,i) ) / ( denom * tsc(2) )
+                   IF ( c_v(k,i) < 0.0_wp )  THEN
+                      c_v(k,i) = 0.0_wp
+                   ELSEIF ( c_v(k,i) > c_max )  THEN
+                      c_v(k,i) = c_max
+                   ENDIF
+                ELSE
+                   c_v(k,i) = c_max
+                ENDIF
+
+                denom = w_m_s(k,0,i) - w_m_s(k,1,i)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_w(k,i) = -c_max * ( w(k,0,i) - w_m_s(k,0,i) ) / ( denom * tsc(2) )
+                   IF ( c_w(k,i) < 0.0_wp )  THEN
+                      c_w(k,i) = 0.0_wp
+                   ELSEIF ( c_w(k,i) > c_max )  THEN
+                      c_w(k,i) = c_max
+                   ENDIF
+                ELSE
+                   c_w(k,i) = c_max
+                ENDIF
+
+                c_u_m_l(k) = c_u_m_l(k) + c_u(k,i)
+                c_v_m_l(k) = c_v_m_l(k) + c_v(k,i)
+                c_w_m_l(k) = c_w_m_l(k) + c_w(k,i)
+
+             ENDDO
+          ENDDO
+
+#if defined( __parallel )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dx, ierr )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dx, ierr )  
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dx, ierr )  
+#else
+          c_u_m = c_u_m_l
+          c_v_m = c_v_m_l
+          c_w_m = c_w_m_l
+#endif
+
+          c_u_m = c_u_m / (nx+1)
+          c_v_m = c_v_m / (nx+1)
+          c_w_m = c_w_m / (nx+1)
+
+!
+!--       Save old timelevels for the next timestep
+          IF ( intermediate_timestep_count == 1 )  THEN
+             u_m_s(:,:,:) = u(:,0:1,:)
+             v_m_s(:,:,:) = v(:,1:2,:)
+             w_m_s(:,:,:) = w(:,0:1,:)
+          ENDIF
+
+!
+!--       Calculate the new velocities
+          DO  k = nzb+1, nzt+1
+             DO  i = nxlg, nxrg
+                u_p(k,-1,i) = u(k,-1,i) - dt_3d * tsc(2) * c_u_m(k) *          &
+                                       ( u(k,-1,i) - u(k,0,i) ) * ddy
+
+                v_p(k,0,i)  = v(k,0,i)  - dt_3d * tsc(2) * c_v_m(k) *          &
+                                       ( v(k,0,i) - v(k,1,i) ) * ddy
+
+                w_p(k,-1,i) = w(k,-1,i) - dt_3d * tsc(2) * c_w_m(k) *          &
+                                       ( w(k,-1,i) - w(k,0,i) ) * ddy
+             ENDDO
+          ENDDO
+
+!
+!--       Bottom boundary at the outflow
+          IF ( ibc_uv_b == 0 )  THEN
+             u_p(nzb,-1,:) = 0.0_wp 
+             v_p(nzb,0,:)  = 0.0_wp  
+          ELSE                    
+             u_p(nzb,-1,:) =  u_p(nzb+1,-1,:)
+             v_p(nzb,0,:)  =  v_p(nzb+1,0,:)
+          ENDIF
+          w_p(nzb,-1,:) = 0.0_wp
+
+!
+!--       Top boundary at the outflow
+          IF ( ibc_uv_t == 0 )  THEN
+             u_p(nzt+1,-1,:) = u_init(nzt+1)
+             v_p(nzt+1,0,:)  = v_init(nzt+1)
+          ELSE
+             u_p(nzt+1,-1,:) = u_p(nzt,-1,:)
+             v_p(nzt+1,0,:)  = v_p(nzt,0,:)
+          ENDIF
+          w_p(nzt:nzt+1,-1,:) = 0.0_wp
+
+       ENDIF
+
+    ENDIF
+
+    IF ( bc_radiation_n )  THEN
+
+       IF ( use_cmax )  THEN
+          u_p(:,ny+1,:) = u(:,ny,:)
+          v_p(:,ny+1,:) = v(:,ny,:)
+          w_p(:,ny+1,:) = w(:,ny,:)          
+       ELSEIF ( .NOT. use_cmax )  THEN
+
+          c_max = dy / dt_3d
+
+          c_u_m_l = 0.0_wp 
+          c_v_m_l = 0.0_wp
+          c_w_m_l = 0.0_wp
+
+          c_u_m = 0.0_wp 
+          c_v_m = 0.0_wp
+          c_w_m = 0.0_wp
+
+!
+!--       Calculate the phase speeds for u, v, and w, first local and then
+!--       average along the outflow boundary.
+          DO  k = nzb+1, nzt+1
+             DO  i = nxl, nxr
+
+                denom = u_m_n(k,ny,i) - u_m_n(k,ny-1,i)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_u(k,i) = -c_max * ( u(k,ny,i) - u_m_n(k,ny,i) ) / ( denom * tsc(2) )
+                   IF ( c_u(k,i) < 0.0_wp )  THEN
+                      c_u(k,i) = 0.0_wp
+                   ELSEIF ( c_u(k,i) > c_max )  THEN
+                      c_u(k,i) = c_max
+                   ENDIF
+                ELSE
+                   c_u(k,i) = c_max
+                ENDIF
+
+                denom = v_m_n(k,ny,i) - v_m_n(k,ny-1,i)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_v(k,i) = -c_max * ( v(k,ny,i) - v_m_n(k,ny,i) ) / ( denom * tsc(2) )
+                   IF ( c_v(k,i) < 0.0_wp )  THEN
+                      c_v(k,i) = 0.0_wp
+                   ELSEIF ( c_v(k,i) > c_max )  THEN
+                      c_v(k,i) = c_max
+                   ENDIF
+                ELSE
+                   c_v(k,i) = c_max
+                ENDIF
+
+                denom = w_m_n(k,ny,i) - w_m_n(k,ny-1,i)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_w(k,i) = -c_max * ( w(k,ny,i) - w_m_n(k,ny,i) ) / ( denom * tsc(2) )
+                   IF ( c_w(k,i) < 0.0_wp )  THEN
+                      c_w(k,i) = 0.0_wp
+                   ELSEIF ( c_w(k,i) > c_max )  THEN
+                      c_w(k,i) = c_max
+                   ENDIF
+                ELSE
+                   c_w(k,i) = c_max
+                ENDIF
+
+                c_u_m_l(k) = c_u_m_l(k) + c_u(k,i)
+                c_v_m_l(k) = c_v_m_l(k) + c_v(k,i)
+                c_w_m_l(k) = c_w_m_l(k) + c_w(k,i)
+
+             ENDDO
+          ENDDO
+
+#if defined( __parallel )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dx, ierr )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dx, ierr )  
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dx, ierr )  
+#else
+          c_u_m = c_u_m_l
+          c_v_m = c_v_m_l
+          c_w_m = c_w_m_l
+#endif
+
+          c_u_m = c_u_m / (nx+1)
+          c_v_m = c_v_m / (nx+1)
+          c_w_m = c_w_m / (nx+1)
+
+!
+!--       Save old timelevels for the next timestep
+          IF ( intermediate_timestep_count == 1 )  THEN
+                u_m_n(:,:,:) = u(:,ny-1:ny,:)
+                v_m_n(:,:,:) = v(:,ny-1:ny,:)
+                w_m_n(:,:,:) = w(:,ny-1:ny,:)
+          ENDIF
+
+!
+!--       Calculate the new velocities
+          DO  k = nzb+1, nzt+1
+             DO  i = nxlg, nxrg
+                u_p(k,ny+1,i) = u(k,ny+1,i) - dt_3d * tsc(2) * c_u_m(k) *      &
+                                       ( u(k,ny+1,i) - u(k,ny,i) ) * ddy
+
+                v_p(k,ny+1,i) = v(k,ny+1,i)  - dt_3d * tsc(2) * c_v_m(k) *     &
+                                       ( v(k,ny+1,i) - v(k,ny,i) ) * ddy
+
+                w_p(k,ny+1,i) = w(k,ny+1,i) - dt_3d * tsc(2) * c_w_m(k) *      &
+                                       ( w(k,ny+1,i) - w(k,ny,i) ) * ddy
+             ENDDO
+          ENDDO
+
+!
+!--       Bottom boundary at the outflow
+          IF ( ibc_uv_b == 0 )  THEN
+             u_p(nzb,ny+1,:) = 0.0_wp
+             v_p(nzb,ny+1,:) = 0.0_wp   
+          ELSE                    
+             u_p(nzb,ny+1,:) =  u_p(nzb+1,ny+1,:)
+             v_p(nzb,ny+1,:) =  v_p(nzb+1,ny+1,:)
+          ENDIF
+          w_p(nzb,ny+1,:) = 0.0_wp
+
+!
+!--       Top boundary at the outflow
+          IF ( ibc_uv_t == 0 )  THEN
+             u_p(nzt+1,ny+1,:) = u_init(nzt+1)
+             v_p(nzt+1,ny+1,:) = v_init(nzt+1)
+          ELSE
+             u_p(nzt+1,ny+1,:) = u_p(nzt,nyn+1,:)
+             v_p(nzt+1,ny+1,:) = v_p(nzt,nyn+1,:)
+          ENDIF
+          w_p(nzt:nzt+1,ny+1,:) = 0.0_wp
+
+       ENDIF
+
+    ENDIF
+
+    IF ( bc_radiation_l )  THEN
+
+       IF ( use_cmax )  THEN
+          u_p(:,:,0)  = u(:,:,1)
+          v_p(:,:,-1) = v(:,:,0)
+          w_p(:,:,-1) = w(:,:,0)          
+       ELSEIF ( .NOT. use_cmax )  THEN
+
+          c_max = dx / dt_3d
+
+          c_u_m_l = 0.0_wp 
+          c_v_m_l = 0.0_wp
+          c_w_m_l = 0.0_wp
+
+          c_u_m = 0.0_wp 
+          c_v_m = 0.0_wp
+          c_w_m = 0.0_wp
+
+!
+!--       Calculate the phase speeds for u, v, and w, first local and then
+!--       average along the outflow boundary.
+          DO  k = nzb+1, nzt+1
+             DO  j = nys, nyn
+
+                denom = u_m_l(k,j,1) - u_m_l(k,j,2)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_u(k,j) = -c_max * ( u(k,j,1) - u_m_l(k,j,1) ) / ( denom * tsc(2) )
+                   IF ( c_u(k,j) < 0.0_wp )  THEN
+                      c_u(k,j) = 0.0_wp
+                   ELSEIF ( c_u(k,j) > c_max )  THEN
+                      c_u(k,j) = c_max
+                   ENDIF
+                ELSE
+                   c_u(k,j) = c_max
+                ENDIF
+
+                denom = v_m_l(k,j,0) - v_m_l(k,j,1)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_v(k,j) = -c_max * ( v(k,j,0) - v_m_l(k,j,0) ) / ( denom * tsc(2) )
+                   IF ( c_v(k,j) < 0.0_wp )  THEN
+                      c_v(k,j) = 0.0_wp
+                   ELSEIF ( c_v(k,j) > c_max )  THEN
+                      c_v(k,j) = c_max
+                   ENDIF
+                ELSE
+                   c_v(k,j) = c_max
+                ENDIF
+
+                denom = w_m_l(k,j,0) - w_m_l(k,j,1)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_w(k,j) = -c_max * ( w(k,j,0) - w_m_l(k,j,0) ) / ( denom * tsc(2) )
+                   IF ( c_w(k,j) < 0.0_wp )  THEN
+                      c_w(k,j) = 0.0_wp
+                   ELSEIF ( c_w(k,j) > c_max )  THEN
+                      c_w(k,j) = c_max
+                   ENDIF
+                ELSE
+                   c_w(k,j) = c_max
+                ENDIF
+
+                c_u_m_l(k) = c_u_m_l(k) + c_u(k,j)
+                c_v_m_l(k) = c_v_m_l(k) + c_v(k,j)
+                c_w_m_l(k) = c_w_m_l(k) + c_w(k,j)
+
+             ENDDO
+          ENDDO
+
+#if defined( __parallel )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dy, ierr )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dy, ierr )  
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dy, ierr )  
+#else
+          c_u_m = c_u_m_l
+          c_v_m = c_v_m_l
+          c_w_m = c_w_m_l
+#endif
+
+          c_u_m = c_u_m / (ny+1)
+          c_v_m = c_v_m / (ny+1)
+          c_w_m = c_w_m / (ny+1)
+
+!
+!--       Save old timelevels for the next timestep
+          IF ( intermediate_timestep_count == 1 )  THEN
+                u_m_l(:,:,:) = u(:,:,1:2)
+                v_m_l(:,:,:) = v(:,:,0:1)
+                w_m_l(:,:,:) = w(:,:,0:1)
+          ENDIF
+
+!
+!--       Calculate the new velocities
+          DO  k = nzb+1, nzt+1
+             DO  j = nysg, nyng
+                u_p(k,j,0) = u(k,j,0) - dt_3d * tsc(2) * c_u_m(k) *            &
+                                       ( u(k,j,0) - u(k,j,1) ) * ddx
+
+                v_p(k,j,-1) = v(k,j,-1) - dt_3d * tsc(2) * c_v_m(k) *          &
+                                       ( v(k,j,-1) - v(k,j,0) ) * ddx
+
+                w_p(k,j,-1) = w(k,j,-1) - dt_3d * tsc(2) * c_w_m(k) *          &
+                                       ( w(k,j,-1) - w(k,j,0) ) * ddx
+             ENDDO
+          ENDDO
+
+!
+!--       Bottom boundary at the outflow
+          IF ( ibc_uv_b == 0 )  THEN
+             u_p(nzb,:,0)  = 0.0_wp 
+             v_p(nzb,:,-1) = 0.0_wp
+          ELSE                    
+             u_p(nzb,:,0)  =  u_p(nzb+1,:,0)
+             v_p(nzb,:,-1) =  v_p(nzb+1,:,-1)
+          ENDIF
+          w_p(nzb,:,-1) = 0.0_wp
+
+!
+!--       Top boundary at the outflow
+          IF ( ibc_uv_t == 0 )  THEN
+             u_p(nzt+1,:,0)  = u_init(nzt+1)
+             v_p(nzt+1,:,-1) = v_init(nzt+1)
+          ELSE
+             u_p(nzt+1,:,0)  = u_p(nzt,:,0)
+             v_p(nzt+1,:,-1) = v_p(nzt,:,-1)
+          ENDIF
+          w_p(nzt:nzt+1,:,-1) = 0.0_wp
+
+       ENDIF
+
+    ENDIF
+
+    IF ( bc_radiation_r )  THEN
+
+       IF ( use_cmax )  THEN
+          u_p(:,:,nx+1) = u(:,:,nx)
+          v_p(:,:,nx+1) = v(:,:,nx)
+          w_p(:,:,nx+1) = w(:,:,nx)          
+       ELSEIF ( .NOT. use_cmax )  THEN
+
+          c_max = dx / dt_3d
+
+          c_u_m_l = 0.0_wp 
+          c_v_m_l = 0.0_wp
+          c_w_m_l = 0.0_wp
+
+          c_u_m = 0.0_wp 
+          c_v_m = 0.0_wp
+          c_w_m = 0.0_wp
+
+!
+!--       Calculate the phase speeds for u, v, and w, first local and then
+!--       average along the outflow boundary.
+          DO  k = nzb+1, nzt+1
+             DO  j = nys, nyn
+
+                denom = u_m_r(k,j,nx) - u_m_r(k,j,nx-1)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_u(k,j) = -c_max * ( u(k,j,nx) - u_m_r(k,j,nx) ) / ( denom * tsc(2) )
+                   IF ( c_u(k,j) < 0.0_wp )  THEN
+                      c_u(k,j) = 0.0_wp
+                   ELSEIF ( c_u(k,j) > c_max )  THEN
+                      c_u(k,j) = c_max
+                   ENDIF
+                ELSE
+                   c_u(k,j) = c_max
+                ENDIF
+
+                denom = v_m_r(k,j,nx) - v_m_r(k,j,nx-1)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_v(k,j) = -c_max * ( v(k,j,nx) - v_m_r(k,j,nx) ) / ( denom * tsc(2) )
+                   IF ( c_v(k,j) < 0.0_wp )  THEN
+                      c_v(k,j) = 0.0_wp
+                   ELSEIF ( c_v(k,j) > c_max )  THEN
+                      c_v(k,j) = c_max
+                   ENDIF
+                ELSE
+                   c_v(k,j) = c_max
+                ENDIF
+
+                denom = w_m_r(k,j,nx) - w_m_r(k,j,nx-1)
+
+                IF ( denom /= 0.0_wp )  THEN
+                   c_w(k,j) = -c_max * ( w(k,j,nx) - w_m_r(k,j,nx) ) / ( denom * tsc(2) )
+                   IF ( c_w(k,j) < 0.0_wp )  THEN
+                      c_w(k,j) = 0.0_wp
+                   ELSEIF ( c_w(k,j) > c_max )  THEN
+                      c_w(k,j) = c_max
+                   ENDIF
+                ELSE
+                   c_w(k,j) = c_max
+                ENDIF
+
+                c_u_m_l(k) = c_u_m_l(k) + c_u(k,j)
+                c_v_m_l(k) = c_v_m_l(k) + c_v(k,j)
+                c_w_m_l(k) = c_w_m_l(k) + c_w(k,j)
+
+             ENDDO
+          ENDDO
+
+#if defined( __parallel )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+          CALL MPI_ALLREDUCE( c_u_m_l(nzb+1), c_u_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dy, ierr )   
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+          CALL MPI_ALLREDUCE( c_v_m_l(nzb+1), c_v_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dy, ierr )  
+          IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+          CALL MPI_ALLREDUCE( c_w_m_l(nzb+1), c_w_m(nzb+1), nzt-nzb, MPI_REAL, &
+                              MPI_SUM, comm1dy, ierr )  
+#else
+          c_u_m = c_u_m_l
+          c_v_m = c_v_m_l
+          c_w_m = c_w_m_l
+#endif
+
+          c_u_m = c_u_m / (ny+1)
+          c_v_m = c_v_m / (ny+1)
+          c_w_m = c_w_m / (ny+1)
+
+!
+!--       Save old timelevels for the next timestep
+          IF ( intermediate_timestep_count == 1 )  THEN
+                u_m_r(:,:,:) = u(:,:,nx-1:nx)
+                v_m_r(:,:,:) = v(:,:,nx-1:nx)
+                w_m_r(:,:,:) = w(:,:,nx-1:nx)
+          ENDIF
+
+!
+!--       Calculate the new velocities
+          DO  k = nzb+1, nzt+1
+             DO  j = nysg, nyng
+                u_p(k,j,nx+1) = u(k,j,nx+1) - dt_3d * tsc(2) * c_u_m(k) *      &
+                                       ( u(k,j,nx+1) - u(k,j,nx) ) * ddx
+
+                v_p(k,j,nx+1) = v(k,j,nx+1) - dt_3d * tsc(2) * c_v_m(k) *      &
+                                       ( v(k,j,nx+1) - v(k,j,nx) ) * ddx
+
+                w_p(k,j,nx+1) = w(k,j,nx+1) - dt_3d * tsc(2) * c_w_m(k) *      &
+                                       ( w(k,j,nx+1) - w(k,j,nx) ) * ddx
+             ENDDO
+          ENDDO
+
+!
+!--       Bottom boundary at the outflow
+          IF ( ibc_uv_b == 0 )  THEN
+             u_p(nzb,:,nx+1) = 0.0_wp
+             v_p(nzb,:,nx+1) = 0.0_wp 
+          ELSE                    
+             u_p(nzb,:,nx+1) =  u_p(nzb+1,:,nx+1)
+             v_p(nzb,:,nx+1) =  v_p(nzb+1,:,nx+1)
+          ENDIF
+          w_p(nzb,:,nx+1) = 0.0_wp
+
+!
+!--       Top boundary at the outflow
+          IF ( ibc_uv_t == 0 )  THEN
+             u_p(nzt+1,:,nx+1) = u_init(nzt+1)
+             v_p(nzt+1,:,nx+1) = v_init(nzt+1)
+          ELSE
+             u_p(nzt+1,:,nx+1) = u_p(nzt,:,nx+1)
+             v_p(nzt+1,:,nx+1) = v_p(nzt,:,nx+1)
+          ENDIF
+          w_p(nzt:nzt+1,:,nx+1) = 0.0_wp
+
+       ENDIF
+
+    ENDIF
+    
+    IF ( salsa )  THEN
+       CALL salsa_boundary_conds
+    ENDIF 
+
+ END SUBROUTINE boundary_conds
Index: /palm/tags/release-6.0/SOURCE/bulk_cloud_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/bulk_cloud_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/bulk_cloud_model_mod.f90	(revision 3477)
@@ -0,0 +1,4324 @@
+!> @file bulk_cloud_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix for profiles output
+! 
+! 3445 2018-10-29 12:23:02Z schwenkel
+! Minor bugfix and use of subroutine for supersaturation calculation in case
+! of cache version
+! 
+! 3383 2018-10-19 14:22:58Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! unused variables removed
+! 
+! 3026 2018-05-22 10:30:53Z schwenkel
+! Changed the name specific humidity to mixing ratio, since we are computing
+! mixing ratios.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2608 2017-11-13 14:04:26Z schwenkel
+! Calculation of supersaturation in external module (diagnostic_quantities_mod).
+! Change: correct calculation of saturation specific humidity to saturation
+! mixing ratio (the factor of 0.378 vanishes).
+! 
+! 2522 2017-10-05 14:20:37Z schwenkel
+! Minor bugfix
+! 
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Improved aerosol initilization and some minor bugfixes 
+! for droplet sedimenation
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+!
+! 2317 2017-07-20 17:27:19Z suehring
+! s1 changed to log_sigma
+!
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
+! includes two more prognostic equations for cloud drop concentration (nc)
+! and cloud water content (qc).
+! - The process of activation is parameterized with a simple Twomey
+!   activion scheme or with considering solution and curvature
+!   effects (Khvorostyanov and Curry ,2006).
+! - The saturation adjustment scheme is replaced by the parameterization
+!   of condensation rates (Khairoutdinov and Kogan, 2000, Mon. Wea. Rev.,128).
+! - All other microphysical processes of Seifert and Beheng are used.
+!   Additionally, in those processes the reduction of cloud number concentration
+!   is considered.
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+!
+! 2155 2017-02-21 09:57:40Z hoffmann
+! Bugfix in the calculation of microphysical quantities on ghost points.
+!
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! Adapted for modularization of microphysics.
+!
+! 1845 2016-04-08 08:29:13Z raasch
+! nzb_2d replaced by nzb_s_inner, Kessler precipitation is stored at surface
+! point (instead of one point above surface)
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! turbulence renamed collision_turbulence,
+! drizzle renamed cloud_water_sedimentation. cloud_water_sedimentation also
+! avaialble for microphysics_kessler.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+! Kessler scheme integrated.
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added new routine calc_precipitation_amount. The routine now allows to account
+! for precipitation due to sedimenation of cloud (fog) droplets
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1646 2015-09-02 16:00:10Z hoffmann
+! Bugfix: Wrong computation of d_mean.
+!
+! 1361 2014-04-16 15:17:48Z hoffmann
+! Bugfix in sedimentation_rain: Index corrected.
+! Vectorized version of adjust_cloud added.
+! Little reformatting of the code.
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1334 2014-03-25 12:21:40Z heinze
+! Bugfix: REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! hyp and rho_ocean have to be calculated at each time step if data from external
+! file LSF_DATA are used
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! microphyical tendencies are calculated in bcm_actions in an optimized
+! way; unrealistic values are prevented; bugfix in evaporation; some reformatting
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! small changes in code formatting
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+! file put under GPL
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! Sedimentation process implemented according to Stevens and Seifert (2008).
+! Turbulence effects on autoconversion and accretion added (Seifert, Nuijens
+! and Stevens, 2010).
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! initial revision
+!
+! Description:
+! ------------
+!> Calculate bulk cloud microphysics.
+!------------------------------------------------------------------------------!
+ MODULE bulk_cloud_model_mod
+
+    USE arrays_3d,                                                             &
+#if defined (__nopointer)
+        ONLY:  ddzu, diss, dzu, dzw, hyp, hyrho,                               &
+               nc,                   nc_p, nr,                   nr_p,         &
+               precipitation_amount, prr, pt, d_exner, pt_init, q, ql,         &
+               qc,                   qc_p, qr,                   qr_p,         &
+               exner, zu, tnc_m, tnr_m, tqc_m, tqr_m
+#else
+        ONLY:  ddzu, diss, dzu, dzw, hyp, hyrho,                               &
+               nc, nc_1, nc_2, nc_3, nc_p, nr, nr_1, nr_2, nr_3, nr_p,         &
+               precipitation_amount, prr, pt, d_exner, pt_init, q, ql, ql_1,   &
+               qc, qc_1, qc_2, qc_3, qc_p, qr, qr_1, qr_2, qr_3, qr_p,         &
+               exner, zu, tnc_m, tnr_m, tqc_m, tqr_m
+#endif
+
+    USE averaging,                                                             &
+        ONLY:  nc_av, nr_av, prr_av, qc_av, ql_av, qr_av
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, g, lv_d_cp, lv_d_rd, l_v, magnus, molecular_weight_of_solute,&
+               molecular_weight_of_water, pi, rho_l, rho_s, r_d, r_v, vanthoff,&
+               exner_function, exner_function_invers, ideal_gas_law_rho,       &
+               ideal_gas_law_rho_pt, barometric_formula, rd_d_rv
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, dt_do2d_xy, intermediate_timestep_count,                 &
+               intermediate_timestep_count_max, large_scale_forcing,           &
+               lsf_surf, pt_surface, rho_surface, surface_pressure,            &
+               time_do2d_xy, message_string
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt,           &
+               wall_flags_0
+
+    USE  kinds
+
+    USE statistics,                                                            &
+        ONLY:  weight_pres, weight_substep
+
+    USE surface_mod,                                                           &
+        ONLY :  bc_h, get_topography_top_index_ji, surf_bulk_cloud_model,      &
+                surf_microphysics_morrison, surf_microphysics_seifert
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=20)   ::  aerosol_bulk = 'nacl'                        !< namelist parameter
+    CHARACTER (LEN=20)   ::  cloud_scheme = 'saturation_adjust'           !< namelist parameter
+
+    LOGICAL ::  aerosol_nacl =.TRUE.                             !< nacl aerosol for bulk scheme
+    LOGICAL ::  aerosol_c3h4o4 =.FALSE.                          !< malonic acid aerosol for bulk scheme
+    LOGICAL ::  aerosol_nh4no3 =.FALSE.                          !< malonic acid aerosol for bulk scheme
+
+    LOGICAL ::  bulk_cloud_model = .FALSE.                       !< namelist parameter
+
+    LOGICAL ::  cloud_water_sedimentation = .FALSE.       !< cloud water sedimentation
+    LOGICAL ::  curvature_solution_effects_bulk = .FALSE. !< flag for considering koehler theory
+    LOGICAL ::  limiter_sedimentation = .TRUE.            !< sedimentation limiter
+    LOGICAL ::  collision_turbulence = .FALSE.            !< turbulence effects
+    LOGICAL ::  ventilation_effect = .TRUE.               !< ventilation effect
+
+    LOGICAL ::  call_microphysics_at_all_substeps = .FALSE.      !< namelist parameter
+    LOGICAL ::  microphysics_sat_adjust = .FALSE.                !< use saturation adjust bulk scheme?
+    LOGICAL ::  microphysics_kessler = .FALSE.                   !< use kessler bulk scheme?
+    LOGICAL ::  microphysics_morrison = .FALSE.                  !< use 2-moment Morrison (add. prog. eq. for nc and qc)
+    LOGICAL ::  microphysics_seifert = .FALSE.                   !< use 2-moment Seifert and Beheng scheme
+    LOGICAL ::  precipitation = .FALSE.                          !< namelist parameter
+
+    REAL(wp) ::  precipitation_amount_interval = 9999999.9_wp    !< namelist parameter
+
+    REAL(wp) ::  a_1 = 8.69E-4_wp          !< coef. in turb. parametrization (cm-2 s3)
+    REAL(wp) ::  a_2 = -7.38E-5_wp         !< coef. in turb. parametrization (cm-2 s3)
+    REAL(wp) ::  a_3 = -1.40E-2_wp         !< coef. in turb. parametrization
+    REAL(wp) ::  a_term = 9.65_wp          !< coef. for terminal velocity (m s-1)
+    REAL(wp) ::  a_vent = 0.78_wp          !< coef. for ventilation effect
+    REAL(wp) ::  b_1 = 11.45E-6_wp         !< coef. in turb. parametrization (m)
+    REAL(wp) ::  b_2 = 9.68E-6_wp          !< coef. in turb. parametrization (m)
+    REAL(wp) ::  b_3 = 0.62_wp             !< coef. in turb. parametrization
+    REAL(wp) ::  b_term = 9.8_wp           !< coef. for terminal velocity (m s-1)
+    REAL(wp) ::  b_vent = 0.308_wp         !< coef. for ventilation effect
+    REAL(wp) ::  beta_cc = 3.09E-4_wp      !< coef. in turb. parametrization (cm-2 s3)
+    REAL(wp) ::  c_1 = 4.82E-6_wp          !< coef. in turb. parametrization (m)
+    REAL(wp) ::  c_2 = 4.8E-6_wp           !< coef. in turb. parametrization (m)
+    REAL(wp) ::  c_3 = 0.76_wp             !< coef. in turb. parametrization
+    REAL(wp) ::  c_const = 0.93_wp         !< const. in Taylor-microscale Reynolds number
+    REAL(wp) ::  c_evap = 0.7_wp           !< constant in evaporation
+    REAL(wp) ::  c_term = 600.0_wp         !< coef. for terminal velocity (m-1)
+    REAL(wp) ::  diff_coeff_l = 0.23E-4_wp  !< diffusivity of water vapor (m2 s-1)
+    REAL(wp) ::  eps_sb = 1.0E-10_wp       !< threshold in two-moments scheme
+    REAL(wp) ::  eps_mr = 0.0_wp           !< threshold for morrison scheme
+    REAL(wp) ::  k_cc = 9.44E09_wp         !< const. cloud-cloud kernel (m3 kg-2 s-1)
+    REAL(wp) ::  k_cr0 = 4.33_wp           !< const. cloud-rain kernel (m3 kg-1 s-1)
+    REAL(wp) ::  k_rr = 7.12_wp            !< const. rain-rain kernel (m3 kg-1 s-1)
+    REAL(wp) ::  k_br = 1000.0_wp          !< const. in breakup parametrization (m-1)
+    REAL(wp) ::  k_st = 1.2E8_wp           !< const. in drizzle parametrization (m-1 s-1)
+    REAL(wp) ::  kin_vis_air = 1.4086E-5_wp  !< kin. viscosity of air (m2 s-1)
+    REAL(wp) ::  prec_time_const = 0.001_wp  !< coef. in Kessler scheme (s-1)
+    REAL(wp) ::  ql_crit = 0.0005_wp       !< coef. in Kessler scheme (kg kg-1)
+    REAL(wp) ::  schmidt_p_1d3=0.8921121_wp  !< Schmidt number**0.33333, 0.71**0.33333
+    REAL(wp) ::  sigma_gc = 1.3_wp         !< geometric standard deviation cloud droplets
+    REAL(wp) ::  thermal_conductivity_l = 2.43E-2_wp  !< therm. cond. air (J m-1 s-1 K-1)
+    REAL(wp) ::  w_precipitation = 9.65_wp  !< maximum terminal velocity (m s-1)
+    REAL(wp) ::  x0 = 2.6E-10_wp           !< separating drop mass (kg)
+    REAL(wp) ::  xamin = 5.24E-19_wp       !< average aerosol mass (kg) (~ 0.05Âµm)
+    REAL(wp) ::  xcmin = 4.18E-15_wp       !< minimum cloud drop size (kg) (~ 1Âµm)
+    REAL(wp) ::  xrmin = 2.6E-10_wp        !< minimum rain drop size (kg)
+    REAL(wp) ::  xrmax = 5.0E-6_wp         !< maximum rain drop site (kg)
+
+    REAL(wp) ::  c_sedimentation = 2.0_wp        !< Courant number of sedimentation process
+    REAL(wp) ::  dpirho_l                        !< 6.0 / ( pi * rho_l )
+    REAL(wp) ::  dry_aerosol_radius = 0.05E-6_wp !< dry aerosol radius
+    REAL(wp) ::  dt_micro                        !< microphysics time step
+    REAL(wp) ::  sigma_bulk = 2.0_wp             !< width of aerosol spectrum
+    REAL(wp) ::  na_init = 100.0E6_wp            !< Total particle/aerosol concentration (cm-3)
+    REAL(wp) ::  nc_const = 70.0E6_wp            !< cloud droplet concentration
+    REAL(wp) ::  dt_precipitation = 100.0_wp     !< timestep precipitation (s)
+    REAL(wp) ::  sed_qc_const                    !< const. for sedimentation of cloud water
+    REAL(wp) ::  pirho_l                         !< pi * rho_l / 6.0;
+
+    REAL(wp) ::  e_s     !< saturation water vapor pressure
+    REAL(wp) ::  q_s     !< saturation mixing ratio
+    REAL(wp) ::  sat     !< supersaturation
+    REAL(wp) ::  t_l     !< actual temperature
+
+    SAVE
+
+    PRIVATE
+
+    PUBLIC bcm_parin, &
+           bcm_check_parameters, &
+           bcm_check_data_output, &
+           bcm_check_data_output_pr, &
+           bcm_header, &
+           bcm_init_arrays, &
+           bcm_init, &
+           bcm_3d_data_averaging, &
+           bcm_data_output_2d, &
+           bcm_data_output_3d, &
+           bcm_swap_timelevel, &
+           bcm_rrd_global, &
+           bcm_rrd_local, &
+           bcm_wrd_global, &
+           bcm_wrd_local, &
+           bcm_actions, &
+           calc_liquid_water_content
+
+    PUBLIC call_microphysics_at_all_substeps, &
+           cloud_water_sedimentation, &
+           bulk_cloud_model, &
+           cloud_scheme, &
+           collision_turbulence, &
+           dt_precipitation, &
+           microphysics_morrison, &
+           microphysics_sat_adjust, &
+           microphysics_seifert, &
+           na_init, &
+           nc_const, &
+           precipitation, &
+           sigma_gc
+
+
+    INTERFACE bcm_parin
+       MODULE PROCEDURE bcm_parin
+    END INTERFACE bcm_parin
+
+    INTERFACE bcm_check_parameters
+       MODULE PROCEDURE bcm_check_parameters
+    END INTERFACE bcm_check_parameters
+
+    INTERFACE bcm_check_data_output
+       MODULE PROCEDURE bcm_check_data_output
+    END INTERFACE bcm_check_data_output
+
+    INTERFACE bcm_check_data_output_pr
+       MODULE PROCEDURE bcm_check_data_output_pr
+    END INTERFACE bcm_check_data_output_pr
+
+    INTERFACE bcm_header
+       MODULE PROCEDURE bcm_header
+    END INTERFACE bcm_header
+
+    INTERFACE bcm_init_arrays
+       MODULE PROCEDURE bcm_init_arrays
+    END INTERFACE bcm_init_arrays
+
+    INTERFACE bcm_init
+       MODULE PROCEDURE bcm_init
+    END INTERFACE bcm_init
+
+    INTERFACE bcm_3d_data_averaging
+       MODULE PROCEDURE bcm_3d_data_averaging
+    END INTERFACE bcm_3d_data_averaging
+
+    INTERFACE bcm_data_output_2d
+       MODULE PROCEDURE bcm_data_output_2d
+    END INTERFACE bcm_data_output_2d
+
+    INTERFACE bcm_data_output_3d
+       MODULE PROCEDURE bcm_data_output_3d
+    END INTERFACE bcm_data_output_3d
+
+    INTERFACE bcm_swap_timelevel
+       MODULE PROCEDURE bcm_swap_timelevel
+    END INTERFACE bcm_swap_timelevel
+
+    INTERFACE bcm_rrd_global
+       MODULE PROCEDURE bcm_rrd_global
+    END INTERFACE bcm_rrd_global
+
+    INTERFACE bcm_rrd_local
+       MODULE PROCEDURE bcm_rrd_local
+    END INTERFACE bcm_rrd_local
+
+    INTERFACE bcm_wrd_global
+       MODULE PROCEDURE bcm_wrd_global
+    END INTERFACE bcm_wrd_global
+
+    INTERFACE bcm_wrd_local
+       MODULE PROCEDURE bcm_wrd_local
+    END INTERFACE bcm_wrd_local
+
+    INTERFACE bcm_actions
+       MODULE PROCEDURE bcm_actions
+       MODULE PROCEDURE bcm_actions_ij
+    END INTERFACE bcm_actions
+
+    INTERFACE adjust_cloud
+       MODULE PROCEDURE adjust_cloud
+       MODULE PROCEDURE adjust_cloud_ij
+    END INTERFACE adjust_cloud
+
+    INTERFACE activation
+       MODULE PROCEDURE activation
+       MODULE PROCEDURE activation_ij
+    END INTERFACE activation
+
+    INTERFACE condensation
+       MODULE PROCEDURE condensation
+       MODULE PROCEDURE condensation_ij
+    END INTERFACE condensation
+
+    INTERFACE autoconversion
+       MODULE PROCEDURE autoconversion
+       MODULE PROCEDURE autoconversion_ij
+    END INTERFACE autoconversion
+
+    INTERFACE autoconversion_kessler
+       MODULE PROCEDURE autoconversion_kessler
+       MODULE PROCEDURE autoconversion_kessler_ij
+    END INTERFACE autoconversion_kessler
+
+    INTERFACE accretion
+       MODULE PROCEDURE accretion
+       MODULE PROCEDURE accretion_ij
+    END INTERFACE accretion
+
+    INTERFACE selfcollection_breakup
+       MODULE PROCEDURE selfcollection_breakup
+       MODULE PROCEDURE selfcollection_breakup_ij
+    END INTERFACE selfcollection_breakup
+
+    INTERFACE evaporation_rain
+       MODULE PROCEDURE evaporation_rain
+       MODULE PROCEDURE evaporation_rain_ij
+    END INTERFACE evaporation_rain
+
+    INTERFACE sedimentation_cloud
+       MODULE PROCEDURE sedimentation_cloud
+       MODULE PROCEDURE sedimentation_cloud_ij
+    END INTERFACE sedimentation_cloud
+
+    INTERFACE sedimentation_rain
+       MODULE PROCEDURE sedimentation_rain
+       MODULE PROCEDURE sedimentation_rain_ij
+    END INTERFACE sedimentation_rain
+
+    INTERFACE calc_precipitation_amount
+       MODULE PROCEDURE calc_precipitation_amount
+       MODULE PROCEDURE calc_precipitation_amount_ij
+    END INTERFACE calc_precipitation_amount
+
+    INTERFACE supersaturation
+       MODULE PROCEDURE supersaturation
+    END INTERFACE supersaturation
+
+    INTERFACE calc_liquid_water_content
+       MODULE PROCEDURE calc_liquid_water_content
+    END INTERFACE calc_liquid_water_content
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &bulk_cloud_parameters for the bulk cloud module
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_parin
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80)  ::  line  !< dummy string that contains the current line of the parameter file
+
+       NAMELIST /bulk_cloud_parameters/  &
+          aerosol_bulk, &
+          c_sedimentation, &
+          call_microphysics_at_all_substeps, &
+          bulk_cloud_model, &
+          cloud_scheme, &
+          cloud_water_sedimentation, &
+          collision_turbulence, &
+          curvature_solution_effects_bulk, &
+          dry_aerosol_radius, &
+          limiter_sedimentation, &
+          na_init, &
+          nc_const, &
+          precipitation, &
+          precipitation_amount_interval, &
+          sigma_bulk, &
+          ventilation_effect
+
+       line = ' '
+!
+!--    Try to find bulk cloud module namelist
+       REWIND ( 11 )
+       line = ' '
+       DO   WHILE ( INDEX( line, '&bulk_cloud_parameters' ) == 0 )
+          READ ( 11, '(A)', END=10 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+!
+!--    Read user-defined namelist
+       READ ( 11, bulk_cloud_parameters )
+!
+!--    Set flag that indicates that the bulk cloud module is switched on
+       !bulk_cloud_model = .TRUE.
+
+10     CONTINUE
+
+
+    END SUBROUTINE bcm_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for bulk cloud module
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_check_parameters
+
+
+       IMPLICIT NONE
+!
+!--    Check cloud scheme
+       IF ( cloud_scheme == 'saturation_adjust' )  THEN
+          microphysics_sat_adjust = .TRUE.
+          microphysics_seifert    = .FALSE.
+          microphysics_kessler    = .FALSE.
+          precipitation           = .FALSE.
+       ELSEIF ( cloud_scheme == 'seifert_beheng' )  THEN
+          microphysics_sat_adjust = .FALSE.
+          microphysics_seifert    = .TRUE.
+          microphysics_kessler    = .FALSE.
+          microphysics_morrison  = .FALSE.
+          precipitation           = .TRUE.
+       ELSEIF ( cloud_scheme == 'kessler' )  THEN
+          microphysics_sat_adjust = .FALSE.
+          microphysics_seifert    = .FALSE.
+          microphysics_kessler    = .TRUE.
+          microphysics_morrison   = .FALSE.
+          precipitation           = .TRUE.
+       ELSEIF ( cloud_scheme == 'morrison' )  THEN
+          microphysics_sat_adjust = .FALSE.
+          microphysics_seifert    = .TRUE.
+          microphysics_kessler    = .FALSE.
+          microphysics_morrison   = .TRUE.
+          precipitation           = .TRUE.
+       ELSE
+          message_string = 'unknown cloud microphysics scheme cloud_scheme ="' // &
+                           TRIM( cloud_scheme ) // '"'
+          CALL message( 'check_parameters', 'PA0357', 1, 2, 0, 6, 0 )
+       ENDIF
+
+
+
+!
+!--    Set the default value for the integration interval of precipitation amount
+       IF ( microphysics_seifert  .OR.  microphysics_kessler )  THEN
+          IF ( precipitation_amount_interval == 9999999.9_wp )  THEN
+             precipitation_amount_interval = dt_do2d_xy
+          ELSE
+             IF ( precipitation_amount_interval > dt_do2d_xy )  THEN
+                WRITE( message_string, * )  'precipitation_amount_interval = ',   &
+                    precipitation_amount_interval, ' must not be larger than ',   &
+                    'dt_do2d_xy = ', dt_do2d_xy
+                CALL message( 'check_parameters', 'PA0090', 1, 2, 0, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+
+       ! TODO: find better sollution for circular dependency problem
+       surf_bulk_cloud_model = bulk_cloud_model
+       surf_microphysics_morrison = microphysics_morrison
+       surf_microphysics_seifert = microphysics_seifert
+
+!
+!--    Check aerosol
+       IF ( aerosol_bulk == 'nacl' )  THEN
+          aerosol_nacl   = .TRUE.
+          aerosol_c3h4o4 = .FALSE.
+          aerosol_nh4no3 = .FALSE.
+       ELSEIF ( aerosol_bulk == 'c3h4o4' )  THEN
+          aerosol_nacl   = .FALSE.
+          aerosol_c3h4o4 = .TRUE.
+          aerosol_nh4no3 = .FALSE.
+       ELSEIF ( aerosol_bulk == 'nh4no3' )  THEN
+          aerosol_nacl   = .FALSE.
+          aerosol_c3h4o4 = .FALSE.
+          aerosol_nh4no3 = .TRUE.
+       ELSE
+          message_string = 'unknown aerosol = "' // TRIM( aerosol_bulk ) // '"'
+          CALL message( 'check_parameters', 'PA0469', 1, 2, 0, 6, 0 )
+       ENDIF
+
+
+    END SUBROUTINE bcm_check_parameters
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for bulk cloud module
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_check_data_output( var, unit )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit  !<
+       CHARACTER (LEN=*) ::  var   !<
+
+       SELECT CASE ( TRIM( var ) )
+
+          CASE ( 'nc' )
+             IF ( .NOT.  microphysics_morrison )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" ' //       &
+                                 'requires ' //                                &
+                                 'cloud_scheme = "morrison"'
+                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = '1/m3'
+
+          CASE ( 'nr' )
+             IF ( .NOT.  microphysics_seifert )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" ' //       &
+                                 'requires ' //                                &
+                                 'cloud_scheme = "seifert_beheng"'
+                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = '1/m3'
+
+          CASE ( 'prr' )
+             IF ( microphysics_sat_adjust )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" ' //       &
+                                 'is not available for ' //                    &
+                                 'cloud_scheme = "saturation_adjust"'
+                CALL message( 'check_parameters', 'PA0423', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'kg/kg m/s'
+
+          CASE ( 'qc' )
+             unit = 'kg/kg'
+
+          CASE ( 'qr' )
+             IF ( .NOT.  microphysics_seifert ) THEN
+                message_string = 'output of "' // TRIM( var ) // '" ' //       &
+                                 'requires ' //                                &
+                                 'cloud_scheme = "seifert_beheng"'
+                CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'kg/kg'
+
+          CASE ( 'pra*' )
+             IF ( .NOT. microphysics_kessler  .AND.                            &
+                  .NOT. microphysics_seifert )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" ' //       &
+                                 'requires ' //                                &
+                                 'cloud_scheme = "kessler" or "seifert_beheng"'
+                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
+             ENDIF
+! TODO: find sollution (maybe connected to flow_statistics redesign?)
+!              IF ( j == 1 )  THEN
+!                 message_string = 'temporal averaging of precipitation ' //     &
+!                           'amount "' // TRIM( var ) // '" is not possible'
+!                 CALL message( 'check_parameters', 'PA0113', 1, 2, 0, 6, 0 )
+!              ENDIF
+             unit = 'mm'
+
+          CASE ( 'prr*' )
+             IF ( .NOT. microphysics_kessler  .AND.                            &
+                  .NOT. microphysics_seifert )  THEN
+                message_string = 'output of "' // TRIM( var ) // '"' //        &
+                         ' requires' //                                        &
+                         ' cloud_scheme = "kessler" or "seifert_beheng"'
+                CALL message( 'check_parameters', 'PA0112', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'mm/s'
+
+          CASE DEFAULT
+             unit = 'illegal'
+
+       END SELECT
+
+
+    END SUBROUTINE bcm_check_data_output
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output of profiles for bulk cloud module
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_check_data_output_pr( variable, var_count, unit, dopr_unit )
+
+       USE arrays_3d,                                                          &
+           ONLY: zu
+
+       USE control_parameters,                                                 &
+           ONLY: data_output_pr
+
+       USE profil_parameter,                                                   &
+           ONLY: dopr_index
+
+       USE statistics,                                                         &
+           ONLY: hom, statistic_regions, pr_palm
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit      !<
+       CHARACTER (LEN=*) ::  variable  !<
+       CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
+
+       INTEGER(iwp) ::  var_count      !<
+       INTEGER(iwp) ::  pr_index       !<
+
+       SELECT CASE ( TRIM( variable ) )
+
+! TODO: make index generic: pr_index = pr_palm+1
+
+          CASE ( 'nc' )
+             IF ( .NOT.  microphysics_morrison )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for' //                  &
+                                 ' cloud_scheme /= morrison'
+                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
+             ENDIF
+             pr_index = 123
+             dopr_index(var_count) = pr_index
+             dopr_unit     = '1/m3'
+             unit = dopr_unit
+             hom(:,2,pr_index,:)  = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'nr' )
+             IF ( .NOT.  microphysics_seifert )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for' //                  &
+                                 ' cloud_scheme /= seifert_beheng'
+                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
+             ENDIF
+             pr_index = 73
+             dopr_index(var_count) = pr_index
+             dopr_unit     = '1/m3'
+             unit = dopr_unit
+             hom(:,2,pr_index,:)  = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'prr' )
+             IF ( microphysics_sat_adjust )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not available for' //                    &
+                                 ' cloud_scheme = saturation_adjust'
+                CALL message( 'check_parameters', 'PA0422', 1, 2, 0, 6, 0 )
+             ENDIF 
+             pr_index = 76
+             dopr_index(var_count) = pr_index
+             dopr_unit     = 'kg/kg m/s'
+             unit = dopr_unit
+             hom(:,2,pr_index,:)  = SPREAD( zu, 2, statistic_regions+1 )
+          CASE ( 'qc' )
+             pr_index = 75
+             dopr_index(var_count) = pr_index
+             dopr_unit     = 'kg/kg'
+             unit = dopr_unit
+             hom(:,2,pr_index,:)  = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'qr' )
+             IF ( .NOT.  microphysics_seifert )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for' //                  &
+                                 ' cloud_scheme /= seifert_beheng'
+                CALL message( 'check_parameters', 'PA0358', 1, 2, 0, 6, 0 )
+             ENDIF
+             pr_index = 74
+             dopr_index(var_count) = pr_index
+             dopr_unit     = 'kg/kg'
+             unit = dopr_unit
+             hom(:,2,pr_index,:)  = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE DEFAULT
+             unit = 'illegal'
+
+       END SELECT
+
+    END SUBROUTINE bcm_check_data_output_pr
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate bulk cloud module arrays and define pointers
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_init_arrays
+
+       USE indices,                                                            &
+           ONLY:  nxlg, nxrg, nysg, nyng, nzb, nzt
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+!
+!--          Liquid water content
+#if defined( __nopointer )
+       ALLOCATE ( ql(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+       ALLOCATE ( ql_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+
+!
+!--    3D-cloud water content
+       IF ( .NOT. microphysics_morrison )  THEN
+#if defined( __nopointer )
+          ALLOCATE( qc(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+          ALLOCATE( qc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+       ENDIF
+!
+!--    Precipitation amount and rate (only needed if output is switched)
+       ALLOCATE( precipitation_amount(nysg:nyng,nxlg:nxrg) )
+
+!
+!--    3d-precipitation rate
+       ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+       IF ( microphysics_morrison )  THEN
+!
+!--       3D-cloud drop water content, cloud drop concentration arrays
+#if defined( __nopointer )
+          ALLOCATE( nc(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                    nc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qc(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                    qc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    tnc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                   &
+                    tqc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+          ALLOCATE( nc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    nc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    nc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+       ENDIF
+
+       IF ( microphysics_seifert )  THEN
+!
+!--       3D-rain water content, rain drop concentration arrays
+#if defined( __nopointer )
+          ALLOCATE( nr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                    nr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qr(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                    qr_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    tnr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                   &
+                    tqr_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+          ALLOCATE( nr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    nr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    nr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qr_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qr_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
+                    qr_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+       ENDIF
+
+#if ! defined( __nopointer )
+!
+!--    Initial assignment of the pointers
+       ql => ql_1
+       IF ( .NOT. microphysics_morrison )  THEN
+          qc => qc_1
+       ENDIF
+       IF ( microphysics_morrison )  THEN
+          qc => qc_1;  qc_p  => qc_2;  tqc_m  => qc_3
+          nc => nc_1;  nc_p  => nc_2;  tnc_m  => nc_3
+       ENDIF
+       IF ( microphysics_seifert )  THEN
+          qr => qr_1;  qr_p  => qr_2;  tqr_m  => qr_3
+          nr => nr_1;  nr_p  => nr_2;  tnr_m  => nr_3
+       ENDIF
+#endif
+
+
+    END SUBROUTINE bcm_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the bulk cloud module
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_init !( dots_label, dots_unit, dots_num, dots_max )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+!        INTEGER(iwp) ::  dots_num
+!        INTEGER(iwp) ::  dots_max
+!        CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_unit
+!        CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label
+
+       CALL location_message( 'initializing bulk cloud module', .FALSE. )
+
+       IF ( bulk_cloud_model )  THEN
+
+!           dots_label(dots_num+1) = 'some_var'
+!           dots_unit(dots_num+1)  = 'm/s'
+!
+!           dots_num_palm = dots_num
+!           dots_num = dots_num + 1
+! !
+! !--       Stuff for the module
+!
+!           abs_velocity   = 0.0_wp
+
+!
+!--       Initialize the remaining quantities
+          IF ( microphysics_morrison )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   qc(:,j,i) = 0.0_wp
+                   nc(:,j,i) = 0.0_wp
+                ENDDO
+             ENDDO
+          ENDIF
+
+          IF ( microphysics_seifert )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   qr(:,j,i) = 0.0_wp
+                   nr(:,j,i) = 0.0_wp
+                ENDDO
+             ENDDO
+          ENDIF
+
+!
+!--       Liquid water content and precipitation amount
+!--       are zero at beginning of the simulation
+          IF ( bulk_cloud_model )  THEN
+             ql = 0.0_wp
+! TODO ???
+             qc = 0.0_wp
+             precipitation_amount = 0.0_wp
+          ENDIF
+
+!
+!--       Initialize old and new time levels.
+          IF ( microphysics_morrison )  THEN
+             tqc_m = 0.0_wp
+             tnc_m = 0.0_wp
+             qc_p  = qc
+             nc_p  = nc
+          ENDIF
+          IF ( microphysics_seifert )  THEN
+             tqr_m = 0.0_wp
+             tnr_m = 0.0_wp
+             qr_p  = qr
+             nr_p  = nr
+          ENDIF
+
+!
+!--       constant for the sedimentation of cloud water (2-moment cloud physics)
+          sed_qc_const = k_st * ( 3.0_wp / ( 4.0_wp * pi * rho_l )                &
+                             )**( 2.0_wp / 3.0_wp ) *                             &
+                         EXP( 5.0_wp * LOG( sigma_gc )**2 )
+
+!
+!--       Calculate timestep according to precipitation
+          IF ( microphysics_seifert )  THEN
+             dt_precipitation = c_sedimentation * MINVAL( dzu(nzb+2:nzt) ) /      &
+                                w_precipitation
+          ENDIF
+
+!
+!--       Set constants for certain aerosol type
+          IF ( microphysics_morrison )  THEN
+             IF ( aerosol_nacl ) THEN
+                molecular_weight_of_solute = 0.05844_wp
+                rho_s                      = 2165.0_wp
+                vanthoff                   = 2.0_wp
+             ELSEIF ( aerosol_c3h4o4 ) THEN
+                molecular_weight_of_solute = 0.10406_wp
+                rho_s                      = 1600.0_wp
+                vanthoff                   = 1.37_wp
+             ELSEIF ( aerosol_nh4no3 ) THEN
+                molecular_weight_of_solute = 0.08004_wp
+                rho_s                      = 1720.0_wp
+                vanthoff                   = 2.31_wp
+             ENDIF
+          ENDIF
+
+!
+!--       Pre-calculate frequently calculated fractions of pi and rho_l
+          pirho_l  = pi * rho_l / 6.0_wp
+          dpirho_l = 1.0_wp / pirho_l
+
+          CALL location_message( 'finished', .TRUE. )
+
+       ELSE
+
+          CALL location_message( 'skipped', .TRUE. )
+
+       ENDIF
+
+    END SUBROUTINE bcm_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_swap_timelevel ( mod_count )
+
+       IMPLICIT NONE
+
+       INTEGER, INTENT(IN) :: mod_count
+
+       IF ( bulk_cloud_model )  THEN
+
+#if defined( __nopointer )
+          IF ( microphysics_morrison )  THEN
+             qc = qc_p
+             nc = nc_p
+          ENDIF
+          IF ( microphysics_seifert )  THEN
+             qr = qr_p
+             nr = nr_p
+          ENDIF
+#else
+          SELECT CASE ( mod_count )
+
+             CASE ( 0 )
+
+                IF ( microphysics_morrison )  THEN
+                   qc => qc_1;    qc_p => qc_2
+                   nc => nc_1;    nc_p => nc_2
+                ENDIF
+                IF ( microphysics_seifert )  THEN
+                   qr => qr_1;    qr_p => qr_2
+                   nr => nr_1;    nr_p => nr_2
+                ENDIF
+
+             CASE ( 1 )
+
+                IF ( microphysics_morrison )  THEN
+                   qc => qc_2;    qc_p => qc_1
+                   nc => nc_2;    nc_p => nc_1
+                ENDIF
+                IF ( microphysics_seifert )  THEN
+                   qr => qr_2;    qr_p => qr_1
+                   nr => nr_2;    nr_p => nr_1
+                ENDIF
+
+          END SELECT
+#endif
+
+       ENDIF
+
+    END SUBROUTINE bcm_swap_timelevel
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for bulk cloud module
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_header ( io )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  io  !< Unit of the output file
+
+!
+!--    Write bulk cloud module header
+       WRITE ( io, 1 )
+
+       WRITE ( io, 2 )
+       WRITE ( io, 3 )
+
+       IF ( microphysics_kessler )  THEN
+          WRITE ( io, 4 ) 'Kessler-Scheme'
+       ENDIF
+
+       IF ( microphysics_seifert )  THEN
+          WRITE ( io, 4 ) 'Seifert-Beheng-Scheme'
+          IF ( cloud_water_sedimentation )  WRITE ( io, 5 )
+          IF ( collision_turbulence )  WRITE ( io, 6 )
+          IF ( ventilation_effect )  WRITE ( io, 7 )
+          IF ( limiter_sedimentation )  WRITE ( io, 8 )
+       ENDIF
+
+       WRITE ( io, 20 )
+       WRITE ( io, 21 ) surface_pressure
+       WRITE ( io, 22 ) r_d
+       WRITE ( io, 23 ) rho_surface
+       WRITE ( io, 24 ) c_p
+       WRITE ( io, 25 ) l_v
+
+       IF ( microphysics_seifert )  THEN
+          WRITE ( io, 26 ) 1.0E-6_wp * nc_const
+          WRITE ( io, 27 ) c_sedimentation
+       ENDIF
+
+
+1   FORMAT ( //' Bulk cloud module information:'/ &
+               ' ------------------------------------------'/ )
+2   FORMAT ( '--> Bulk scheme with liquid water potential temperature and'/ &
+             '    total water content is used.' )
+3   FORMAT ( '--> Condensation is parameterized via 0% - or 100% scheme.' )
+4   FORMAT ( '--> Precipitation parameterization via ', A )
+
+5   FORMAT ( '--> Cloud water sedimentation parameterization via Stokes law' )
+6   FORMAT ( '--> Turbulence effects on precipitation process' )
+7   FORMAT ( '--> Ventilation effects on evaporation of rain drops' )
+8   FORMAT ( '--> Slope limiter used for sedimentation process' )
+
+20  FORMAT ( '--> Essential parameters:' )
+21  FORMAT ( '       Surface pressure             :   p_0   = ', F7.2, ' hPa')
+22  FORMAT ( '       Gas constant                 :   R     = ', F5.1, ' J/(kg K)')
+23  FORMAT ( '       Density of air               :   rho_0 = ', F6.3, ' kg/m**3')
+24  FORMAT ( '       Specific heat cap.           :   c_p   = ', F6.1, ' J/(kg K)')
+25  FORMAT ( '       Vapourization heat           :   L_v   = ', E9.2, ' J/kg')
+26  FORMAT ( '       Droplet density              :   N_c   = ', F6.1, ' 1/cm**3' )
+27  FORMAT ( '       Sedimentation Courant number :   C_s   = ', F4.1 )
+
+
+    END SUBROUTINE bcm_header
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_3d_data_averaging( mode, variable )
+
+       USE control_parameters,                                                 &
+           ONLY:  average_count_3d
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  mode     !<
+       CHARACTER (LEN=*) ::  variable !<
+
+       INTEGER(iwp) ::  i       !< local index
+       INTEGER(iwp) ::  j       !< local index
+       INTEGER(iwp) ::  k       !< local index
+
+       IF ( mode == 'allocate' )  THEN
+
+          SELECT CASE ( TRIM( variable ) )
+
+             CASE ( 'nc' )
+                IF ( .NOT. ALLOCATED( nc_av ) )  THEN
+                   ALLOCATE( nc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                nc_av = 0.0_wp
+
+             CASE ( 'nr' )
+                IF ( .NOT. ALLOCATED( nr_av ) )  THEN
+                   ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                nr_av = 0.0_wp
+
+             CASE ( 'prr' )
+                IF ( .NOT. ALLOCATED( prr_av ) )  THEN
+                   ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                prr_av = 0.0_wp
+
+             CASE ( 'qc' )
+                IF ( .NOT. ALLOCATED( qc_av ) )  THEN
+                   ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qc_av = 0.0_wp
+
+             CASE ( 'ql' )
+                IF ( .NOT. ALLOCATED( ql_av ) )  THEN
+                   ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ql_av = 0.0_wp
+
+             CASE ( 'qr' )
+                IF ( .NOT. ALLOCATED( qr_av ) )  THEN
+                   ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qr_av = 0.0_wp
+
+             CASE DEFAULT
+                CONTINUE
+
+          END SELECT
+
+       ELSEIF ( mode == 'sum' )  THEN
+
+          SELECT CASE ( TRIM( variable ) )
+
+             CASE ( 'nc' )
+                IF ( ALLOCATED( nc_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            nc_av(k,j,i) = nc_av(k,j,i) + nc(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'nr' )
+                IF ( ALLOCATED( nr_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            nr_av(k,j,i) = nr_av(k,j,i) + nr(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'prr' )
+                IF ( ALLOCATED( prr_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            prr_av(k,j,i) = prr_av(k,j,i) + prr(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'qc' )
+                IF ( ALLOCATED( qc_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            qc_av(k,j,i) = qc_av(k,j,i) + qc(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'ql' )
+                IF ( ALLOCATED( ql_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            ql_av(k,j,i) = ql_av(k,j,i) + ql(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'qr' )
+                IF ( ALLOCATED( qr_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            qr_av(k,j,i) = qr_av(k,j,i) + qr(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE DEFAULT
+                CONTINUE
+
+          END SELECT
+
+       ELSEIF ( mode == 'average' )  THEN
+
+          SELECT CASE ( TRIM( variable ) )
+
+             CASE ( 'nc' )
+                IF ( ALLOCATED( nc_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            nc_av(k,j,i) = nc_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'nr' )
+                IF ( ALLOCATED( nr_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            nr_av(k,j,i) = nr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'prr' )
+                IF ( ALLOCATED( prr_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            prr_av(k,j,i) = prr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'qc' )
+                IF ( ALLOCATED( qc_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            qc_av(k,j,i) = qc_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'ql' )
+                IF ( ALLOCATED( ql_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            ql_av(k,j,i) = ql_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE ( 'qr' )
+                IF ( ALLOCATED( qr_av ) ) THEN
+                   DO  i = nxlg, nxrg
+                      DO  j = nysg, nyng
+                         DO  k = nzb, nzt+1
+                            qr_av(k,j,i) = qr_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+             CASE DEFAULT
+                CONTINUE
+
+          END SELECT
+
+       ENDIF
+
+    END SUBROUTINE bcm_3d_data_averaging
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define 2D output variables.
+!------------------------------------------------------------------------------!
+ SUBROUTINE bcm_data_output_2d( av, variable, found, grid, mode, local_pf,     &
+                                two_d, nzb_do, nzt_do )
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(INOUT) ::  grid       !< name of vertical grid
+    CHARACTER (LEN=*), INTENT(IN) ::  mode       !< either 'xy', 'xz' or 'yz'
+    CHARACTER (LEN=*), INTENT(IN) ::  variable   !< name of variable
+
+    INTEGER(iwp), INTENT(IN) ::  av        !< flag for (non-)average output
+    INTEGER(iwp), INTENT(IN) ::  nzb_do    !< vertical output index (bottom)
+    INTEGER(iwp), INTENT(IN) ::  nzt_do    !< vertical output index (top)
+
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+
+    INTEGER(iwp) ::  i         !< loop index along x-direction
+    INTEGER(iwp) ::  j         !< loop index along y-direction
+    INTEGER(iwp) ::  k         !< loop index along z-direction
+
+    LOGICAL, INTENT(INOUT) ::  found   !< flag if output variable is found
+    LOGICAL, INTENT(INOUT) ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
+    LOGICAL ::  resorted  !< flag if output is already resorted
+
+    REAL(wp), PARAMETER ::  fill_value = -999.0_wp  !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) ::  local_pf !< local
+       !< array to which output data is resorted to
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to selected output variable
+
+    found = .TRUE.
+    resorted = .FALSE.
+!
+!-- Set masking flag for topography for not resorted arrays
+    flag_nr = 0    ! 0 = scalar, 1 = u, 2 = v, 3 = w
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'nc_xy', 'nc_xz', 'nc_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => nc
+          ELSE
+             IF ( .NOT. ALLOCATED( nc_av ) ) THEN
+                ALLOCATE( nc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                nc_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => nc_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'nr_xy', 'nr_xz', 'nr_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => nr
+          ELSE
+             IF ( .NOT. ALLOCATED( nr_av ) ) THEN
+                ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                nr_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => nr_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'pra*_xy' )        ! 2d-array / integral quantity => no av
+!                CALL exchange_horiz_2d( precipitation_amount )
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                local_pf(i,j,nzb+1) =  precipitation_amount(j,i)
+             ENDDO
+          ENDDO
+          precipitation_amount = 0.0_wp   ! reset for next integ. interval
+          resorted = .TRUE.
+          two_d = .TRUE.
+          IF ( mode == 'xy' ) grid = 'zu1'
+
+       CASE ( 'prr_xy', 'prr_xz', 'prr_yz' )
+          IF ( av == 0 )  THEN
+!                   CALL exchange_horiz( prr, nbgp )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = prr(k,j,i) * hyrho(nzb+1)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( prr_av ) ) THEN
+                ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                prr_av = REAL( fill_value, KIND = wp )
+             ENDIF
+!                   CALL exchange_horiz( prr_av, nbgp )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = prr_av(k,j,i) * hyrho(nzb+1)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          resorted = .TRUE.
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'qc_xy', 'qc_xz', 'qc_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => qc
+          ELSE
+             IF ( .NOT. ALLOCATED( qc_av ) ) THEN
+                ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                qc_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => qc_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'ql_xy', 'ql_xz', 'ql_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => ql
+          ELSE
+             IF ( .NOT. ALLOCATED( ql_av ) ) THEN
+                ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ql_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => ql_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'qr_xy', 'qr_xz', 'qr_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => qr
+          ELSE
+             IF ( .NOT. ALLOCATED( qr_av ) ) THEN
+                ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                qr_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => qr_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+
+    IF ( found .AND. .NOT. resorted )  THEN
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb_do, nzt_do
+                local_pf(i,j,k) = MERGE( &
+                                     to_be_resorted(k,j,i),                    &
+                                     REAL( fill_value, KIND = wp ),            &
+                                     BTEST( wall_flags_0(k,j,i), flag_nr )     &
+                                  )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE bcm_data_output_2d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define 3D output variables.
+!------------------------------------------------------------------------------!
+ SUBROUTINE bcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(IN) ::  variable   !< name of variable
+
+    INTEGER(iwp), INTENT(IN) ::  av        !< flag for (non-)average output
+    INTEGER(iwp), INTENT(IN) ::  nzb_do    !< lower limit of the data output (usually 0)
+    INTEGER(iwp), INTENT(IN) ::  nzt_do    !< vertical upper limit of the data output (usually nz_do3d)
+
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+
+    INTEGER(iwp) ::  i         !< loop index along x-direction
+    INTEGER(iwp) ::  j         !< loop index along y-direction
+    INTEGER(iwp) ::  k         !< loop index along z-direction
+
+    LOGICAL, INTENT(INOUT) ::  found     !< flag if output variable is found
+    LOGICAL ::  resorted  !< flag if output is already resorted
+
+    REAL(wp) ::  fill_value = -999.0_wp  !< value for the _FillValue attribute
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do), INTENT(INOUT) ::  local_pf   !< local
+       !< array to which output data is resorted to
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to selected output variable
+
+    found = .TRUE.
+    resorted = .FALSE.
+!
+!-- Set masking flag for topography for not resorted arrays
+    flag_nr = 0    ! 0 = scalar, 1 = u, 2 = v, 3 = w
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'nc' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => nc
+          ELSE
+             IF ( .NOT. ALLOCATED( nc_av ) ) THEN
+                ALLOCATE( nc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                nc_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => nc_av
+          ENDIF
+
+       CASE ( 'nr' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => nr
+          ELSE
+             IF ( .NOT. ALLOCATED( nr_av ) ) THEN
+                ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                nr_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => nr_av
+          ENDIF
+
+       CASE ( 'prr' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = prr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( prr_av ) ) THEN
+                ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                prr_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = prr_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          resorted = .TRUE.
+
+       CASE ( 'qc' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => qc
+          ELSE
+             IF ( .NOT. ALLOCATED( qc_av ) ) THEN
+                ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                qc_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => qc_av
+          ENDIF
+
+       CASE ( 'ql' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => ql
+          ELSE
+             IF ( .NOT. ALLOCATED( ql_av ) ) THEN
+                ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ql_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => ql_av
+          ENDIF
+
+       CASE ( 'qr' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => qr
+          ELSE
+             IF ( .NOT. ALLOCATED( qr_av ) ) THEN
+                ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                qr_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => qr_av
+          ENDIF
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+    IF ( found .AND. .NOT. resorted )  THEN
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb_do, nzt_do
+                local_pf(i,j,k) = MERGE(                                       &
+                                     to_be_resorted(k,j,i),                    &
+                                     REAL( fill_value, KIND = wp ),            &
+                                     BTEST( wall_flags_0(k,j,i), flag_nr )     &
+                                  )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE bcm_data_output_3d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data for the bulk cloud module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_rrd_global( found )
+
+
+       USE control_parameters,                                                 &
+           ONLY: length, restart_string
+
+
+       IMPLICIT NONE
+
+       LOGICAL, INTENT(OUT)  ::  found
+
+
+       found = .TRUE.
+
+       SELECT CASE ( restart_string(1:length) )
+
+          CASE ( 'c_sedimentation' )
+             READ ( 13 )  c_sedimentation
+
+          CASE ( 'bulk_cloud_model' )
+             READ ( 13 )  bulk_cloud_model
+
+          CASE ( 'cloud_scheme' )
+             READ ( 13 )  cloud_scheme
+
+          CASE ( 'cloud_water_sedimentation' )
+             READ ( 13 )  cloud_water_sedimentation
+
+          CASE ( 'collision_turbulence' )
+             READ ( 13 )  collision_turbulence
+
+          CASE ( 'limiter_sedimentation' )
+             READ ( 13 )  limiter_sedimentation
+
+          CASE ( 'nc_const' )
+             READ ( 13 )  nc_const
+
+          CASE ( 'precipitation' )
+             READ ( 13 ) precipitation
+
+          CASE ( 'ventilation_effect' )
+             READ ( 13 )  ventilation_effect
+
+!          CASE ( 'global_paramter' )
+!             READ ( 13 )  global_parameter
+!          CASE ( 'global_array' )
+!             IF ( .NOT. ALLOCATED( global_array ) )  ALLOCATE( global_array(1:10) )
+!             READ ( 13 )  global_array
+
+          CASE DEFAULT
+
+             found = .FALSE.
+
+       END SELECT
+
+
+    END SUBROUTINE bcm_rrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data for the bulk cloud module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,       &
+                              nxr_on_file, nynf, nync, nyn_on_file, nysf,      &
+                              nysc, nys_on_file, tmp_2d, tmp_3d, found )
+
+
+       USE control_parameters
+
+       USE indices
+
+       USE pegrid
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i               !<
+       INTEGER(iwp) ::  k               !<
+       INTEGER(iwp) ::  nxlc            !<
+       INTEGER(iwp) ::  nxlf            !<
+       INTEGER(iwp) ::  nxl_on_file     !<
+       INTEGER(iwp) ::  nxrc            !<
+       INTEGER(iwp) ::  nxrf            !<
+       INTEGER(iwp) ::  nxr_on_file     !<
+       INTEGER(iwp) ::  nync            !<
+       INTEGER(iwp) ::  nynf            !<
+       INTEGER(iwp) ::  nyn_on_file     !<
+       INTEGER(iwp) ::  nysc            !<
+       INTEGER(iwp) ::  nysf            !<
+       INTEGER(iwp) ::  nys_on_file     !<
+
+       LOGICAL, INTENT(OUT)  ::  found
+
+       REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_2d   !<
+       REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !<
+
+!
+!-- Here the reading of user-defined restart data follows:
+!-- Sample for user-defined output
+
+
+       found = .TRUE.
+
+       SELECT CASE ( restart_string(1:length) )
+
+          CASE ( 'nc' )
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             nc(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'nc_av' )
+             IF ( .NOT. ALLOCATED( nc_av ) )  THEN
+                ALLOCATE( nc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             nc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'nr' )
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             nr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'nr_av' )
+             IF ( .NOT. ALLOCATED( nr_av ) )  THEN
+                ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             nr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'precipitation_amount' )
+             IF ( k == 1 )  READ ( 13 )  tmp_2d
+             precipitation_amount(nysc-nbgp:nync+nbgp,                   &
+                                  nxlc-nbgp:nxrc+nbgp)  =                &
+                   tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'prr' )
+             IF ( .NOT. ALLOCATED( prr ) )  THEN
+                ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             prr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =            &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'prr_av' )
+             IF ( .NOT. ALLOCATED( prr_av ) )  THEN
+                ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             prr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'qc' )
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             qc(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'qc_av' )
+             IF ( .NOT. ALLOCATED( qc_av ) )  THEN
+                ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             qc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'ql' )
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             ql(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'ql_av' )
+             IF ( .NOT. ALLOCATED( ql_av ) )  THEN
+                ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             ql_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'qr' )
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             qr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+          CASE ( 'qr_av' )
+             IF ( .NOT. ALLOCATED( qr_av ) )  THEN
+                ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             IF ( k == 1 )  READ ( 13 )  tmp_3d
+             qr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+!
+          CASE DEFAULT
+
+             found = .FALSE.
+
+          END SELECT
+
+
+    END SUBROUTINE bcm_rrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data for the bulk cloud module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_wrd_global
+
+
+       IMPLICIT NONE
+
+       CALL wrd_write_string( 'c_sedimentation' )
+       WRITE ( 14 )  c_sedimentation
+
+       CALL wrd_write_string( 'bulk_cloud_model' )
+       WRITE ( 14 )  bulk_cloud_model
+
+       CALL wrd_write_string( 'cloud_scheme' )
+       WRITE ( 14 )  cloud_scheme
+
+       CALL wrd_write_string( 'cloud_water_sedimentation' )
+       WRITE ( 14 )  cloud_water_sedimentation
+
+       CALL wrd_write_string( 'collision_turbulence' )
+       WRITE ( 14 )  collision_turbulence
+
+       CALL wrd_write_string( 'limiter_sedimentation' )
+       WRITE ( 14 )  limiter_sedimentation
+
+       CALL wrd_write_string( 'nc_const' )
+       WRITE ( 14 )  nc_const
+
+       CALL wrd_write_string( 'precipitation' )
+       WRITE ( 14 )  precipitation
+
+       CALL wrd_write_string( 'ventilation_effect' )
+       WRITE ( 14 )  ventilation_effect
+
+! needs preceeding allocation if array
+!       CALL wrd_write_string( 'global_parameter' )
+!       WRITE ( 14 )  global_parameter
+
+!       IF ( ALLOCATED( inflow_damping_factor ) )  THEN
+!          CALL wrd_write_string( 'inflow_damping_factor' )
+!          WRITE ( 14 )  inflow_damping_factor
+!       ENDIF
+
+
+    END SUBROUTINE bcm_wrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data for the bulk cloud module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_wrd_local
+
+
+       IMPLICIT NONE
+
+       IF ( ALLOCATED( prr ) )  THEN
+          CALL wrd_write_string( 'prr' )
+          WRITE ( 14 )  prr
+       ENDIF
+
+       IF ( ALLOCATED( prr_av ) )  THEN
+          CALL wrd_write_string( 'prr_av' )
+          WRITE ( 14 )  prr_av
+       ENDIF
+
+       IF ( ALLOCATED( precipitation_amount ) )  THEN
+          CALL wrd_write_string( 'precipitation_amount' )
+          WRITE ( 14 )  precipitation_amount
+       ENDIF
+
+       CALL wrd_write_string( 'ql' )
+       WRITE ( 14 )  ql
+
+       IF ( ALLOCATED( ql_av ) )  THEN
+          CALL wrd_write_string( 'ql_av' )
+          WRITE ( 14 )  ql_av
+       ENDIF
+
+       CALL wrd_write_string( 'qc' )
+       WRITE ( 14 )  qc
+
+       IF ( ALLOCATED( qc_av ) )  THEN
+          CALL wrd_write_string( 'qc_av' )
+          WRITE ( 14 )  qc_av
+       ENDIF
+
+       IF ( microphysics_morrison )  THEN
+
+          CALL wrd_write_string( 'nc' )
+          WRITE ( 14 )  nc
+
+          IF ( ALLOCATED( nc_av ) )  THEN
+             CALL wrd_write_string( 'nc_av' )
+             WRITE ( 14 )  nc_av
+          ENDIF
+
+       ENDIF
+
+       IF ( microphysics_seifert )  THEN
+
+          CALL wrd_write_string( 'nr' )
+          WRITE ( 14 )  nr
+
+          IF ( ALLOCATED( nr_av ) )  THEN
+             CALL wrd_write_string( 'nr_av' )
+             WRITE ( 14 )  nr_av
+          ENDIF
+
+          CALL wrd_write_string( 'qr' )
+          WRITE ( 14 )  qr
+
+          IF ( ALLOCATED( qr_av ) )  THEN
+             CALL wrd_write_string( 'qr_av' )
+             WRITE ( 14 )  qr_av
+          ENDIF
+
+       ENDIF
+
+
+    END SUBROUTINE bcm_wrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Control of microphysics for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE bcm_actions
+
+       IMPLICIT NONE
+
+       IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
+!
+!--       Calculate vertical profile of the hydrostatic pressure (hyp)
+          hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
+          d_exner = exner_function_invers(hyp)
+          exner = 1.0_wp / exner_function_invers(hyp)
+          hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
+!
+!--       Compute reference density
+          rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+       ENDIF
+
+!
+!--    Compute length of time step
+       IF ( call_microphysics_at_all_substeps )  THEN
+          dt_micro = dt_3d * weight_pres(intermediate_timestep_count)
+       ELSE
+          dt_micro = dt_3d
+       ENDIF
+
+!
+!--    Reset precipitation rate
+       IF ( intermediate_timestep_count == 1 )  prr = 0.0_wp
+
+!
+!--    Compute cloud physics
+       IF ( microphysics_kessler )  THEN
+
+          CALL autoconversion_kessler
+          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud
+
+       ELSEIF ( microphysics_seifert )  THEN
+
+          CALL adjust_cloud
+          IF ( microphysics_morrison )  CALL activation
+          IF ( microphysics_morrison )  CALL condensation
+          CALL autoconversion
+          CALL accretion
+          CALL selfcollection_breakup
+          CALL evaporation_rain
+          CALL sedimentation_rain
+          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud
+
+       ENDIF
+
+       CALL calc_precipitation_amount
+
+    END SUBROUTINE bcm_actions
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Adjust number of raindrops to avoid nonlinear effects in sedimentation and
+!> evaporation of rain drops due to too small or too big weights
+!> of rain drops (Stevens and Seifert, 2008).
+!------------------------------------------------------------------------------!
+    SUBROUTINE adjust_cloud
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp) ::  flag                  !< flag to indicate first grid level above
+
+       CALL cpu_log( log_point_s(54), 'adjust_cloud', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( qr(k,j,i) <= eps_sb )  THEN
+                   qr(k,j,i) = 0.0_wp
+                   nr(k,j,i) = 0.0_wp
+                ELSE
+                   IF ( nr(k,j,i) * xrmin > qr(k,j,i) * hyrho(k) )  THEN
+                      nr(k,j,i) = qr(k,j,i) * hyrho(k) / xrmin * flag
+                   ELSEIF ( nr(k,j,i) * xrmax < qr(k,j,i) * hyrho(k) )  THEN
+                      nr(k,j,i) = qr(k,j,i) * hyrho(k) / xrmax * flag
+                   ENDIF
+                ENDIF
+
+                IF ( microphysics_morrison ) THEN
+                   IF ( qc(k,j,i) <= eps_sb )  THEN
+                      qc(k,j,i) = 0.0_wp
+                      nc(k,j,i) = 0.0_wp
+                   ELSE
+                      IF ( nc(k,j,i) * xcmin > qc(k,j,i) * hyrho(k) )  THEN
+                         nc(k,j,i) = qc(k,j,i) * hyrho(k) / xcmin * flag
+                      ENDIF
+                   ENDIF
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(54), 'adjust_cloud', 'stop' )
+
+    END SUBROUTINE adjust_cloud
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate number of activated condensation nucleii after simple activation
+!> scheme of Twomey, 1959.
+!------------------------------------------------------------------------------!
+    SUBROUTINE activation
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  activ             !<
+       REAL(wp)     ::  afactor           !<
+       REAL(wp)     ::  beta_act          !<
+       REAL(wp)     ::  bfactor           !<
+       REAL(wp)     ::  k_act             !<
+       REAL(wp)     ::  n_act             !<
+       REAL(wp)     ::  n_ccn             !<
+       REAL(wp)     ::  s_0               !<
+       REAL(wp)     ::  sat_max           !<
+       REAL(wp)     ::  sigma             !<
+       REAL(wp)     ::  sigma_act         !<
+
+       REAL(wp) ::  flag                  !< flag to indicate first grid level above
+
+       CALL cpu_log( log_point_s(65), 'activation', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+!
+!--             Call calculation of supersaturation located in subroutine
+                CALL supersaturation ( i, j, k )
+!
+!--             Prescribe parameters for activation
+!--             (see: Bott + Trautmann, 2002, Atm. Res., 64)
+                k_act  = 0.7_wp
+                activ  = 0.0_wp
+
+
+                IF ( sat > 0.0 .AND. .NOT. curvature_solution_effects_bulk ) THEN
+!
+!--                Compute the number of activated Aerosols
+!--                (see: Twomey, 1959, Pure and applied Geophysics, 43)
+                   n_act     = na_init * sat**k_act
+!
+!--                Compute the number of cloud droplets
+!--                (see: Morrison + Grabowski, 2007, JAS, 64)
+!                  activ = MAX( n_act - nc(k,j,i), 0.0_wp) / dt_micro
+
+!
+!--                Compute activation rate after Khairoutdinov and Kogan
+!--                (see: Khairoutdinov + Kogan, 2000, Mon. Wea. Rev., 128)
+                   sat_max = 1.0_wp / 100.0_wp
+                   activ   = MAX( 0.0_wp, ( (na_init + nc(k,j,i) ) * MIN       &
+                      ( 1.0_wp, ( sat / sat_max )**k_act) - nc(k,j,i) ) ) /    &
+                       dt_micro
+                ELSEIF ( sat > 0.0 .AND. curvature_solution_effects_bulk ) THEN
+!
+!--                Curvature effect (afactor) with surface tension
+!--                parameterization by Straka (2009)
+                   sigma = 0.0761_wp - 0.000155_wp * ( t_l - 273.15_wp )
+                   afactor = 2.0_wp * sigma / ( rho_l * r_v * t_l )
+!
+!--                Solute effect (bfactor)
+                   bfactor = vanthoff * molecular_weight_of_water *            &
+                       rho_s / ( molecular_weight_of_solute * rho_l )
+
+!
+!--                Prescribe power index that describes the soluble fraction
+!--                of an aerosol particle (beta) 
+!--                (see: Morrison + Grabowski, 2007, JAS, 64)
+                   beta_act  = 0.5_wp
+                   sigma_act = sigma_bulk**( 1.0_wp + beta_act )
+!
+!--                Calculate mean geometric supersaturation (s_0) with
+!--                parameterization by Khvorostyanov and Curry (2006)
+                   s_0   = dry_aerosol_radius **(- ( 1.0_wp + beta_act ) ) *    &
+                       ( 4.0_wp * afactor**3 / ( 27.0_wp * bfactor ) )**0.5_wp
+
+!
+!--                Calculate number of activated CCN as a function of
+!--                supersaturation and taking Koehler theory into account
+!--                (see: Khvorostyanov + Curry, 2006, J. Geo. Res., 111)
+                   n_ccn = ( na_init / 2.0_wp ) * ( 1.0_wp - ERF(              &
+                      LOG( s_0 / sat ) / ( SQRT(2.0_wp) * LOG(sigma_act) ) ) )
+                   activ = MAX( ( n_ccn - nc(k,j,i) ) / dt_micro, 0.0_wp )
+                ENDIF
+
+                nc(k,j,i) = MIN( (nc(k,j,i) + activ * dt_micro * flag), na_init)
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(65), 'activation', 'stop' )
+
+    END SUBROUTINE activation
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate condensation rate for cloud water content (after Khairoutdinov and
+!> Kogan, 2000).
+!------------------------------------------------------------------------------!
+    SUBROUTINE condensation
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  cond              !<
+       REAL(wp)     ::  cond_max          !<
+       REAL(wp)     ::  dc                !<
+       REAL(wp)     ::  evap              !<
+       REAL(wp)     ::  g_fac             !<
+       REAL(wp)     ::  nc_0              !<
+       REAL(wp)     ::  temp              !<
+       REAL(wp)     ::  xc                !<
+
+       REAL(wp) ::  flag                  !< flag to indicate first grid level above
+
+       CALL cpu_log( log_point_s(66), 'condensation', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--             Call calculation of supersaturation 
+                CALL supersaturation ( i, j, k )
+!
+!--             Actual temperature:
+                temp = t_l + lv_d_cp * ( qc(k,j,i) + qr(k,j,i) )
+
+                g_fac  = 1.0_wp / ( ( l_v / ( r_v * temp ) - 1.0_wp ) *        &
+                                    l_v / ( thermal_conductivity_l * temp )    &
+                                    + r_v * temp / ( diff_coeff_l * e_s )      &
+                                    )
+!
+!--             Mean weight of cloud drops
+                IF ( nc(k,j,i) <= 0.0_wp) CYCLE
+                xc = MAX( (hyrho(k) * qc(k,j,i) / nc(k,j,i)), xcmin)
+!
+!--             Weight averaged diameter of cloud drops:
+                dc   = ( xc * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--             Integral diameter of cloud drops
+                nc_0 = nc(k,j,i) * dc
+!
+!--             Condensation needs only to be calculated in supersaturated regions
+                IF ( sat > 0.0_wp )  THEN
+!
+!--                Condensation rate of cloud water content
+!--                after KK scheme.
+!--                (see: Khairoutdinov + Kogan, 2000, Mon. Wea. Rev.,128)
+                   cond      = 2.0_wp * pi * nc_0 * g_fac * sat / hyrho(k)
+                   cond_max  = q(k,j,i) - q_s - qc(k,j,i) - qr(k,j,i)
+                   cond      = MIN( cond, cond_max / dt_micro )
+
+                   qc(k,j,i) = qc(k,j,i) + cond * dt_micro * flag
+                ELSEIF ( sat < 0.0_wp ) THEN
+                   evap      = 2.0_wp * pi * nc_0 * g_fac * sat / hyrho(k)
+                   evap      = MAX( evap, -qc(k,j,i) / dt_micro )
+
+                   qc(k,j,i) = qc(k,j,i) + evap * dt_micro * flag
+                ENDIF
+                IF ( nc(k,j,i) * xcmin > qc(k,j,i) * hyrho(k) )  THEN
+                   nc(k,j,i) = qc(k,j,i) * hyrho(k) / xcmin
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(66), 'condensation', 'stop' )
+
+    END SUBROUTINE condensation
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Autoconversion rate (Seifert and Beheng, 2006).
+!------------------------------------------------------------------------------!
+    SUBROUTINE autoconversion
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  alpha_cc          !<
+       REAL(wp)     ::  autocon           !<
+       REAL(wp)     ::  dissipation       !<
+       REAL(wp)     ::  flag              !< flag to mask topography grid points
+       REAL(wp)     ::  k_au              !<
+       REAL(wp)     ::  l_mix             !<
+       REAL(wp)     ::  nc_auto           !<
+       REAL(wp)     ::  nu_c              !<
+       REAL(wp)     ::  phi_au            !<
+       REAL(wp)     ::  r_cc              !<
+       REAL(wp)     ::  rc                !<
+       REAL(wp)     ::  re_lambda         !<
+       REAL(wp)     ::  sigma_cc          !<
+       REAL(wp)     ::  tau_cloud         !<
+       REAL(wp)     ::  xc                !<
+
+       CALL cpu_log( log_point_s(55), 'autoconversion', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( microphysics_morrison ) THEN
+                   nc_auto = nc(k,j,i)
+                ELSE
+                   nc_auto = nc_const
+                ENDIF
+
+                IF ( qc(k,j,i) > eps_sb  .AND.  nc_auto > eps_mr )  THEN
+
+                   k_au = k_cc / ( 20.0_wp * x0 )
+!
+!--                Intern time scale of coagulation (Seifert and Beheng, 2006):
+!--                (1.0_wp - qc(k,j,i) / ( qc(k,j,i) + qr(k,j,i) ))
+                   tau_cloud = MAX( 1.0_wp - qc(k,j,i) / ( qr(k,j,i) +         &
+                                    qc(k,j,i) ), 0.0_wp )
+!
+!--                Universal function for autoconversion process
+!--                (Seifert and Beheng, 2006):
+                   phi_au = 600.0_wp * tau_cloud**0.68_wp *                    &
+                            ( 1.0_wp - tau_cloud**0.68_wp )**3
+!
+!--                Shape parameter of gamma distribution (Geoffroy et al., 2010):
+!--                (Use constant nu_c = 1.0_wp instead?)
+                   nu_c = 1.0_wp !MAX( 0.0_wp, 1580.0_wp * hyrho(k) * qc(k,j,i) - 0.28_wp )
+!
+!--                Mean weight of cloud droplets:
+                   xc = MAX( hyrho(k) * qc(k,j,i) / nc_auto, xcmin) 
+!
+!--                Parameterized turbulence effects on autoconversion (Seifert,
+!--                Nuijens and Stevens, 2010)
+                   IF ( collision_turbulence )  THEN
+!
+!--                   Weight averaged radius of cloud droplets:
+                      rc = 0.5_wp * ( xc * dpirho_l )**( 1.0_wp / 3.0_wp )
+
+                      alpha_cc = ( a_1 + a_2 * nu_c ) / ( 1.0_wp + a_3 * nu_c )
+                      r_cc     = ( b_1 + b_2 * nu_c ) / ( 1.0_wp + b_3 * nu_c )
+                      sigma_cc = ( c_1 + c_2 * nu_c ) / ( 1.0_wp + c_3 * nu_c )
+!
+!--                   Mixing length (neglecting distance to ground and
+!--                   stratification)
+                      l_mix = ( dx * dy * dzu(k) )**( 1.0_wp / 3.0_wp )
+!
+!--                   Limit dissipation rate according to Seifert, Nuijens and
+!--                   Stevens (2010)
+                      dissipation = MIN( 0.06_wp, diss(k,j,i) )
+!
+!--                   Compute Taylor-microscale Reynolds number:
+                      re_lambda = 6.0_wp / 11.0_wp *                           &
+                                  ( l_mix / c_const )**( 2.0_wp / 3.0_wp ) *   &
+                                  SQRT( 15.0_wp / kin_vis_air ) *              &
+                                  dissipation**( 1.0_wp / 6.0_wp )
+!
+!--                   The factor of 1.0E4 is needed to convert the dissipation
+!--                   rate from m2 s-3 to cm2 s-3.
+                      k_au = k_au * ( 1.0_wp +                                 &
+                                      dissipation * 1.0E4_wp *                 &
+                                      ( re_lambda * 1.0E-3_wp )**0.25_wp *     &
+                                      ( alpha_cc * EXP( -1.0_wp * ( ( rc -     &
+                                                                      r_cc ) / &
+                                                        sigma_cc )**2          &
+                                                      ) + beta_cc              &
+                                      )                                        &
+                                    )
+                   ENDIF
+!
+!--                Autoconversion rate (Seifert and Beheng, 2006):
+                   autocon = k_au * ( nu_c + 2.0_wp ) * ( nu_c + 4.0_wp ) /    &
+                             ( nu_c + 1.0_wp )**2 * qc(k,j,i)**2 * xc**2 *     &
+                             ( 1.0_wp + phi_au / ( 1.0_wp - tau_cloud )**2 ) * &
+                             rho_surface
+                   autocon = MIN( autocon, qc(k,j,i) / dt_micro )
+
+                   qr(k,j,i) = qr(k,j,i) + autocon * dt_micro * flag
+                   qc(k,j,i) = qc(k,j,i) - autocon * dt_micro * flag
+                   nr(k,j,i) = nr(k,j,i) + autocon / x0 * hyrho(k) * dt_micro  &
+                                                              * flag
+                   IF ( microphysics_morrison ) THEN
+                      nc(k,j,i) = nc(k,j,i) - MIN( nc(k,j,i), 2.0_wp *         &
+                                    autocon / x0 * hyrho(k) * dt_micro * flag )
+                   ENDIF
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(55), 'autoconversion', 'stop' )
+
+    END SUBROUTINE autoconversion
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Autoconversion process (Kessler, 1969).
+!------------------------------------------------------------------------------!
+    SUBROUTINE autoconversion_kessler
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_wall !< topgraphy top index
+
+       REAL(wp)    ::  dqdt_precip !<
+       REAL(wp)    ::  flag        !< flag to mask topography grid points
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+!
+!--          Determine vertical index of topography top
+             k_wall = get_topography_top_index_ji( j, i, 's' )
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( qc(k,j,i) > ql_crit )  THEN
+                   dqdt_precip = prec_time_const * ( qc(k,j,i) - ql_crit )
+                ELSE
+                   dqdt_precip = 0.0_wp
+                ENDIF
+
+                qc(k,j,i) = qc(k,j,i) - dqdt_precip * dt_micro * flag
+                q(k,j,i)  = q(k,j,i)  - dqdt_precip * dt_micro * flag
+                pt(k,j,i) = pt(k,j,i) + dqdt_precip * dt_micro * lv_d_cp *     &
+                                        d_exner(k)              * flag
+
+!
+!--             Compute the rain rate (stored on surface grid point)
+                prr(k_wall,j,i) = prr(k_wall,j,i) + dqdt_precip * dzw(k) * flag
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+   END SUBROUTINE autoconversion_kessler
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Accretion rate (Seifert and Beheng, 2006).
+!------------------------------------------------------------------------------!
+    SUBROUTINE accretion
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  accr              !<
+       REAL(wp)     ::  flag              !< flag to mask topography grid points
+       REAL(wp)     ::  k_cr              !<
+       REAL(wp)     ::  nc_accr           !<
+       REAL(wp)     ::  phi_ac            !<
+       REAL(wp)     ::  tau_cloud         !<
+       REAL(wp)     ::  xc                !<
+
+
+       CALL cpu_log( log_point_s(56), 'accretion', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( microphysics_morrison ) THEN
+                   nc_accr = nc(k,j,i)
+                ELSE
+                   nc_accr = nc_const
+                ENDIF
+
+                IF ( ( qc(k,j,i) > eps_sb )  .AND.  ( qr(k,j,i) > eps_sb )    &
+                                             .AND.  ( nc_accr > eps_mr ) ) THEN
+!
+!--                Intern time scale of coagulation (Seifert and Beheng, 2006):
+                   tau_cloud = 1.0_wp - qc(k,j,i) / ( qc(k,j,i) + qr(k,j,i) )
+!
+!--                Universal function for accretion process (Seifert and
+!--                Beheng, 2001):
+                   phi_ac = ( tau_cloud / ( tau_cloud + 5.0E-5_wp ) )**4
+
+!
+!--                Mean weight of cloud drops
+                   xc = MAX( (hyrho(k) * qc(k,j,i) / nc_accr), xcmin)
+!
+!--                Parameterized turbulence effects on autoconversion (Seifert,
+!--                Nuijens and Stevens, 2010). The factor of 1.0E4 is needed to
+!--                convert the dissipation rate (diss) from m2 s-3 to cm2 s-3.
+                   IF ( collision_turbulence )  THEN
+                      k_cr = k_cr0 * ( 1.0_wp + 0.05_wp *                      &
+                                       MIN( 600.0_wp,                          &
+                                            diss(k,j,i) * 1.0E4_wp )**0.25_wp  &
+                                     )
+                   ELSE
+                      k_cr = k_cr0
+                   ENDIF
+!
+!--                Accretion rate (Seifert and Beheng, 2006):
+                   accr = k_cr * qc(k,j,i) * qr(k,j,i) * phi_ac *              &
+                          SQRT( rho_surface * hyrho(k) )
+                   accr = MIN( accr, qc(k,j,i) / dt_micro )
+
+                   qr(k,j,i) = qr(k,j,i) + accr * dt_micro * flag
+                   qc(k,j,i) = qc(k,j,i) - accr * dt_micro * flag
+                   IF ( microphysics_morrison )  THEN
+                      nc(k,j,i) = nc(k,j,i) - MIN( nc(k,j,i),                  &
+                                         accr / xc * hyrho(k) * dt_micro * flag)
+                   ENDIF
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(56), 'accretion', 'stop' )
+
+    END SUBROUTINE accretion
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Collisional breakup rate (Seifert, 2008).
+!------------------------------------------------------------------------------!
+    SUBROUTINE selfcollection_breakup
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  breakup           !<
+       REAL(wp)     ::  dr                !<
+       REAL(wp)     ::  flag              !< flag to mask topography grid points
+       REAL(wp)     ::  phi_br            !<
+       REAL(wp)     ::  selfcoll          !<
+
+       CALL cpu_log( log_point_s(57), 'selfcollection', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( qr(k,j,i) > eps_sb )  THEN
+!
+!--                Selfcollection rate (Seifert and Beheng, 2001):
+                   selfcoll = k_rr * nr(k,j,i) * qr(k,j,i) *                   &
+                              SQRT( hyrho(k) * rho_surface )
+!
+!--                Weight averaged diameter of rain drops:
+                   dr = ( hyrho(k) * qr(k,j,i) /                               &
+                          nr(k,j,i) * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--                Collisional breakup rate (Seifert, 2008):
+                   IF ( dr >= 0.3E-3_wp )  THEN
+                      phi_br  = k_br * ( dr - 1.1E-3_wp )
+                      breakup = selfcoll * ( phi_br + 1.0_wp )
+                   ELSE
+                      breakup = 0.0_wp
+                   ENDIF
+
+                   selfcoll = MAX( breakup - selfcoll, -nr(k,j,i) / dt_micro )
+                   nr(k,j,i) = nr(k,j,i) + selfcoll * dt_micro * flag
+
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(57), 'selfcollection', 'stop' )
+
+    END SUBROUTINE selfcollection_breakup
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Evaporation of precipitable water. Condensation is neglected for
+!> precipitable water.
+!------------------------------------------------------------------------------!
+    SUBROUTINE evaporation_rain
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  dr                !<
+       REAL(wp)     ::  evap              !<
+       REAL(wp)     ::  evap_nr           !<
+       REAL(wp)     ::  f_vent            !<
+       REAL(wp)     ::  flag              !< flag to mask topography grid points
+       REAL(wp)     ::  g_evap            !<
+       REAL(wp)     ::  lambda_r          !<
+       REAL(wp)     ::  mu_r              !<
+       REAL(wp)     ::  mu_r_2            !<
+       REAL(wp)     ::  mu_r_5d2          !<
+       REAL(wp)     ::  nr_0              !<
+       REAL(wp)     ::  temp              !<
+       REAL(wp)     ::  xr                !<
+
+       CALL cpu_log( log_point_s(58), 'evaporation', 'start' )
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( qr(k,j,i) > eps_sb )  THEN
+
+!
+!--                Call calculation of supersaturation  
+                   CALL supersaturation ( i, j, k )
+!
+!--                Evaporation needs only to be calculated in subsaturated regions
+                   IF ( sat < 0.0_wp )  THEN
+!
+!--                   Actual temperature:
+                      temp = t_l + lv_d_cp * ( qc(k,j,i) + qr(k,j,i) )
+
+                      g_evap = 1.0_wp / ( ( l_v / ( r_v * temp ) - 1.0_wp ) *     &
+                                          l_v / ( thermal_conductivity_l * temp ) &
+                                          + r_v * temp / ( diff_coeff_l * e_s )   &
+                                        )
+!
+!--                   Mean weight of rain drops
+                      xr = hyrho(k) * qr(k,j,i) / nr(k,j,i)
+!
+!--                   Weight averaged diameter of rain drops:
+                      dr = ( xr * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--                   Compute ventilation factor and intercept parameter
+!--                   (Seifert and Beheng, 2006; Seifert, 2008):
+                      IF ( ventilation_effect )  THEN
+!
+!--                      Shape parameter of gamma distribution (Milbrandt and Yau,
+!--                      2005; Stevens and Seifert, 2008):
+                         mu_r = 10.0_wp * ( 1.0_wp + TANH( 1.2E3_wp *          &
+                                                          ( dr - 1.4E-3_wp ) ) )
+!
+!--                      Slope parameter of gamma distribution (Seifert, 2008):
+                         lambda_r = ( ( mu_r + 3.0_wp ) * ( mu_r + 2.0_wp ) *  &
+                                      ( mu_r + 1.0_wp )                        &
+                                    )**( 1.0_wp / 3.0_wp ) / dr
+
+                         mu_r_2   = mu_r + 2.0_wp
+                         mu_r_5d2 = mu_r + 2.5_wp
+
+                         f_vent = a_vent * gamm( mu_r_2 ) *                     &
+                                  lambda_r**( -mu_r_2 ) + b_vent *              &
+                                  schmidt_p_1d3 * SQRT( a_term / kin_vis_air ) *&
+                                  gamm( mu_r_5d2 ) * lambda_r**( -mu_r_5d2 ) *  &
+                                  ( 1.0_wp -                                    &
+                                    0.5_wp * ( b_term / a_term ) *              &
+                                    ( lambda_r / ( c_term + lambda_r )          &
+                                    )**mu_r_5d2 -                               &
+                                    0.125_wp * ( b_term / a_term )**2 *         &
+                                    ( lambda_r / ( 2.0_wp * c_term + lambda_r ) &
+                                    )**mu_r_5d2 -                               &
+                                    0.0625_wp * ( b_term / a_term )**3 *        &
+                                    ( lambda_r / ( 3.0_wp * c_term + lambda_r ) &
+                                    )**mu_r_5d2 -                               &
+                                    0.0390625_wp * ( b_term / a_term )**4 *     &
+                                    ( lambda_r / ( 4.0_wp * c_term + lambda_r ) &
+                                    )**mu_r_5d2                                 &
+                                  )
+
+                         nr_0   = nr(k,j,i) * lambda_r**( mu_r + 1.0_wp ) /    &
+                                  gamm( mu_r + 1.0_wp )
+                      ELSE
+                         f_vent = 1.0_wp
+                         nr_0   = nr(k,j,i) * dr
+                      ENDIF
+   !
+   !--                Evaporation rate of rain water content (Seifert and
+   !--                Beheng, 2006):
+                      evap    = 2.0_wp * pi * nr_0 * g_evap * f_vent * sat /   &
+                                hyrho(k)
+                      evap    = MAX( evap, -qr(k,j,i) / dt_micro )
+                      evap_nr = MAX( c_evap * evap / xr * hyrho(k),            &
+                                     -nr(k,j,i) / dt_micro )
+
+                      qr(k,j,i) = qr(k,j,i) + evap    * dt_micro * flag
+                      nr(k,j,i) = nr(k,j,i) + evap_nr * dt_micro * flag
+
+                   ENDIF
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(58), 'evaporation', 'stop' )
+
+    END SUBROUTINE evaporation_rain
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sedimentation of cloud droplets (Ackermann et al., 2009, MWR).
+!------------------------------------------------------------------------------!
+    SUBROUTINE sedimentation_cloud
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !<
+       INTEGER(iwp) ::  j             !<
+       INTEGER(iwp) ::  k             !<
+
+       REAL(wp) ::  flag              !< flag to mask topography grid points
+       REAL(wp) ::  nc_sedi           !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_qc !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_nc !<
+
+
+       CALL cpu_log( log_point_s(59), 'sed_cloud', 'start' )
+
+       sed_qc(nzt+1) = 0.0_wp
+       sed_nc(nzt+1) = 0.0_wp
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzt, nzb+1, -1
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( microphysics_morrison ) THEN
+                   nc_sedi = nc(k,j,i)
+                ELSE
+                   nc_sedi = nc_const
+                ENDIF
+
+!
+!--             Sedimentation fluxes for number concentration are only calculated
+!--             for cloud_scheme = 'morrison'
+                IF ( microphysics_morrison ) THEN
+                   IF ( qc(k,j,i) > eps_sb  .AND.  nc(k,j,i) > eps_mr )  THEN
+                      sed_nc(k) = sed_qc_const *                               &
+                              ( qc(k,j,i) * hyrho(k) )**( 2.0_wp / 3.0_wp ) *  &
+                              ( nc(k,j,i) )**( 1.0_wp / 3.0_wp )
+                   ELSE
+                      sed_nc(k) = 0.0_wp
+                   ENDIF
+
+                   sed_nc(k) = MIN( sed_nc(k), hyrho(k) * dzu(k+1) *           &
+                                    nc(k,j,i) / dt_micro + sed_nc(k+1)         &
+                                  ) * flag
+
+                   nc(k,j,i) = nc(k,j,i) + ( sed_nc(k+1) - sed_nc(k) ) *       &
+                                         ddzu(k+1) / hyrho(k) * dt_micro * flag
+                ENDIF
+
+                IF ( qc(k,j,i) > eps_sb .AND.  nc_sedi > eps_mr )  THEN
+                   sed_qc(k) = sed_qc_const * nc_sedi**( -2.0_wp / 3.0_wp ) *  &
+                               ( qc(k,j,i) * hyrho(k) )**( 5.0_wp / 3.0_wp ) * &
+                                                                           flag
+                ELSE
+                   sed_qc(k) = 0.0_wp
+                ENDIF
+
+                sed_qc(k) = MIN( sed_qc(k), hyrho(k) * dzu(k+1) * q(k,j,i) /   &
+                                            dt_micro + sed_qc(k+1)             &
+                               ) * flag
+
+                q(k,j,i)  = q(k,j,i)  + ( sed_qc(k+1) - sed_qc(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * dt_micro * flag
+                qc(k,j,i) = qc(k,j,i) + ( sed_qc(k+1) - sed_qc(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * dt_micro * flag
+                pt(k,j,i) = pt(k,j,i) - ( sed_qc(k+1) - sed_qc(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * lv_d_cp *       &
+                                        d_exner(k) * dt_micro            * flag
+
+!
+!--             Compute the precipitation rate due to cloud (fog) droplets
+                IF ( call_microphysics_at_all_substeps )  THEN
+                   prr(k,j,i) = prr(k,j,i) +  sed_qc(k) / hyrho(k)             &
+                                * weight_substep(intermediate_timestep_count)  &
+                                * flag
+                ELSE
+                   prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k) * flag
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(59), 'sed_cloud', 'stop' )
+
+    END SUBROUTINE sedimentation_cloud
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of sedimentation flux. Implementation according to Stevens
+!> and Seifert (2008). Code is based on UCLA-LES.
+!------------------------------------------------------------------------------!
+    SUBROUTINE sedimentation_rain
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  k_run         !<
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp)     ::  c_run                      !<
+       REAL(wp)     ::  d_max                      !<
+       REAL(wp)     ::  d_mean                     !<
+       REAL(wp)     ::  d_min                      !<
+       REAL(wp)     ::  dr                         !<
+       REAL(wp)     ::  flux                       !<
+       REAL(wp)     ::  flag                       !< flag to mask topography grid points
+       REAL(wp)     ::  lambda_r                   !<
+       REAL(wp)     ::  mu_r                       !<
+       REAL(wp)     ::  z_run                      !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_nr     !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_qr     !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  nr_slope !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  qr_slope !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_nr   !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_qr   !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  w_nr     !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  w_qr     !<
+
+       CALL cpu_log( log_point_s(60), 'sed_rain', 'start' )
+
+!
+!--    Compute velocities
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                IF ( qr(k,j,i) > eps_sb )  THEN
+!
+!--                Weight averaged diameter of rain drops:
+                   dr = ( hyrho(k) * qr(k,j,i) /                               &
+                          nr(k,j,i) * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--                Shape parameter of gamma distribution (Milbrandt and Yau, 2005;
+!--                Stevens and Seifert, 2008):
+                   mu_r = 10.0_wp * ( 1.0_wp + TANH( 1.2E3_wp *                &
+                                                     ( dr - 1.4E-3_wp ) ) )
+!
+!--                Slope parameter of gamma distribution (Seifert, 2008):
+                   lambda_r = ( ( mu_r + 3.0_wp ) * ( mu_r + 2.0_wp ) *        &
+                                ( mu_r + 1.0_wp ) )**( 1.0_wp / 3.0_wp ) / dr
+
+                   w_nr(k) = MAX( 0.1_wp, MIN( 20.0_wp,                        &
+                                               a_term - b_term * ( 1.0_wp +    &
+                                                  c_term /                     &
+                                                  lambda_r )**( -1.0_wp *      &
+                                                  ( mu_r + 1.0_wp ) )          &
+                                              )                                &
+                                ) * flag
+
+                   w_qr(k) = MAX( 0.1_wp, MIN( 20.0_wp,                        &
+                                               a_term - b_term * ( 1.0_wp +    &
+                                                  c_term /                     &
+                                                  lambda_r )**( -1.0_wp *      &
+                                                  ( mu_r + 4.0_wp ) )          &
+                                             )                                 &
+                                ) * flag
+                ELSE
+                   w_nr(k) = 0.0_wp
+                   w_qr(k) = 0.0_wp
+                ENDIF
+             ENDDO
+!
+!--          Adjust boundary values using surface data type.
+!--          Upward-facing
+             surf_s = bc_h(0)%start_index(j,i)
+             surf_e = bc_h(0)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k         = bc_h(0)%k(m)
+                w_nr(k-1) = w_nr(k)
+                w_qr(k-1) = w_qr(k)
+             ENDDO
+!
+!--          Downward-facing
+             surf_s = bc_h(1)%start_index(j,i)
+             surf_e = bc_h(1)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k         = bc_h(1)%k(m)
+                w_nr(k+1) = w_nr(k)
+                w_qr(k+1) = w_qr(k)
+             ENDDO
+!
+!--          Model top boundary value
+             w_nr(nzt+1) = 0.0_wp
+             w_qr(nzt+1) = 0.0_wp
+!
+!--          Compute Courant number
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                c_nr(k) = 0.25_wp * ( w_nr(k-1) +                              &
+                                      2.0_wp * w_nr(k) + w_nr(k+1) ) *         &
+                          dt_micro * ddzu(k) * flag
+                c_qr(k) = 0.25_wp * ( w_qr(k-1) +                              &
+                                      2.0_wp * w_qr(k) + w_qr(k+1) ) *         &
+                          dt_micro * ddzu(k) * flag
+             ENDDO
+!
+!--          Limit slopes with monotonized centered (MC) limiter (van Leer, 1977):
+             IF ( limiter_sedimentation )  THEN
+
+                DO k = nzb+1, nzt
+!
+!--                Predetermine flag to mask topography
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                   d_mean = 0.5_wp * ( qr(k+1,j,i) - qr(k-1,j,i) )
+                   d_min  = qr(k,j,i) - MIN( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) )
+                   d_max  = MAX( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) ) - qr(k,j,i)
+
+                   qr_slope(k) = SIGN(1.0_wp, d_mean) * MIN ( 2.0_wp * d_min,  &
+                                                              2.0_wp * d_max,  &
+                                                              ABS( d_mean ) )  &
+                                                      * flag
+
+                   d_mean = 0.5_wp * ( nr(k+1,j,i) - nr(k-1,j,i) )
+                   d_min  = nr(k,j,i) - MIN( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) )
+                   d_max  = MAX( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) ) - nr(k,j,i)
+
+                   nr_slope(k) = SIGN(1.0_wp, d_mean) * MIN ( 2.0_wp * d_min,  &
+                                                              2.0_wp * d_max,  &
+                                                              ABS( d_mean ) )
+                ENDDO
+
+             ELSE
+
+                nr_slope = 0.0_wp
+                qr_slope = 0.0_wp
+
+             ENDIF
+
+             sed_nr(nzt+1) = 0.0_wp
+             sed_qr(nzt+1) = 0.0_wp
+!
+!--          Compute sedimentation flux
+             DO  k = nzt, nzb+1, -1
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--             Sum up all rain drop number densities which contribute to the flux
+!--             through k-1/2
+                flux  = 0.0_wp
+                z_run = 0.0_wp ! height above z(k)
+                k_run = k
+                c_run = MIN( 1.0_wp, c_nr(k) )
+                DO WHILE ( c_run > 0.0_wp  .AND.  k_run <= nzt )
+                   flux  = flux + hyrho(k_run) *                               &
+                           ( nr(k_run,j,i) + nr_slope(k_run) *                 &
+                           ( 1.0_wp - c_run ) * 0.5_wp ) * c_run * dzu(k_run)  &
+                                              * flag
+                   z_run = z_run + dzu(k_run) * flag
+                   k_run = k_run + 1          * flag
+                   c_run = MIN( 1.0_wp, c_nr(k_run) - z_run * ddzu(k_run) )    &
+                                              * flag
+                ENDDO
+!
+!--             It is not allowed to sediment more rain drop number density than
+!--             available
+                flux = MIN( flux,                                              &
+                            hyrho(k) * dzu(k+1) * nr(k,j,i) + sed_nr(k+1) *    &
+                            dt_micro                                           &
+                          )
+
+                sed_nr(k) = flux / dt_micro * flag
+                nr(k,j,i) = nr(k,j,i) + ( sed_nr(k+1) - sed_nr(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * dt_micro * flag
+!
+!--             Sum up all rain water content which contributes to the flux
+!--             through k-1/2
+                flux  = 0.0_wp
+                z_run = 0.0_wp ! height above z(k)
+                k_run = k
+                c_run = MIN( 1.0_wp, c_qr(k) )
+
+                DO WHILE ( c_run > 0.0_wp  .AND.  k_run <= nzt )
+
+                   flux  = flux + hyrho(k_run) * ( qr(k_run,j,i) +             &
+                                  qr_slope(k_run) * ( 1.0_wp - c_run ) *       &
+                                  0.5_wp ) * c_run * dzu(k_run) * flag
+                   z_run = z_run + dzu(k_run)                   * flag
+                   k_run = k_run + 1                            * flag
+                   c_run = MIN( 1.0_wp, c_qr(k_run) - z_run * ddzu(k_run) )    &
+                                                                * flag
+
+                ENDDO
+!
+!--             It is not allowed to sediment more rain water content than
+!--             available
+                flux = MIN( flux,                                              &
+                            hyrho(k) * dzu(k) * qr(k,j,i) + sed_qr(k+1) *      &
+                            dt_micro                                           &
+                          )
+
+                sed_qr(k) = flux / dt_micro * flag
+
+                qr(k,j,i) = qr(k,j,i) + ( sed_qr(k+1) - sed_qr(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * dt_micro * flag
+                q(k,j,i)  = q(k,j,i)  + ( sed_qr(k+1) - sed_qr(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * dt_micro * flag
+                pt(k,j,i) = pt(k,j,i) - ( sed_qr(k+1) - sed_qr(k) ) *          &
+                                        ddzu(k+1) / hyrho(k) * lv_d_cp *       &
+                                        d_exner(k) * dt_micro            * flag
+!
+!--             Compute the rain rate
+                IF ( call_microphysics_at_all_substeps )  THEN
+                   prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k)             &
+                                * weight_substep(intermediate_timestep_count) &
+                                * flag
+                ELSE
+                   prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k) * flag
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(60), 'sed_rain', 'stop' )
+
+    END SUBROUTINE sedimentation_rain
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of the precipitation amount due to gravitational settling of
+!> rain and cloud (fog) droplets
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_precipitation_amount
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index y direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+
+       IF ( ( dt_do2d_xy - time_do2d_xy ) < precipitation_amount_interval .AND.&
+            ( .NOT. call_microphysics_at_all_substeps .OR.                     &
+            intermediate_timestep_count == intermediate_timestep_count_max ) ) &
+       THEN
+!
+!--       Run over all upward-facing surface elements, i.e. non-natural,
+!--       natural and urban
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             precipitation_amount(j,i) = precipitation_amount(j,i) +           &
+                                               prr(k,j,i) * hyrho(k) * dt_3d
+          ENDDO
+
+       ENDIF
+
+    END SUBROUTINE calc_precipitation_amount
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Control of microphysics for grid points i,j
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE bcm_actions_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+
+       IF ( large_scale_forcing  .AND.  lsf_surf ) THEN
+!
+!--       Calculate vertical profile of the hydrostatic pressure (hyp)
+          hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
+          d_exner = exner_function_invers(hyp)
+          exner = 1.0_wp / exner_function_invers(hyp)
+          hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
+!
+!--       Compute reference density
+          rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+       ENDIF
+
+!
+!--    Compute length of time step
+       IF ( call_microphysics_at_all_substeps )  THEN
+          dt_micro = dt_3d * weight_pres(intermediate_timestep_count)
+       ELSE
+          dt_micro = dt_3d
+       ENDIF
+!
+!--    Reset precipitation rate
+       IF ( intermediate_timestep_count == 1 )  prr(:,j,i) = 0.0_wp
+
+!
+!--    Compute cloud physics
+       IF( microphysics_kessler )  THEN
+
+          CALL autoconversion_kessler( i,j )
+          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud( i,j )
+
+       ELSEIF ( microphysics_seifert )  THEN
+
+          CALL adjust_cloud( i,j )
+          IF ( microphysics_morrison ) CALL activation( i,j )
+          IF ( microphysics_morrison ) CALL condensation( i,j )
+          CALL autoconversion( i,j )
+          CALL accretion( i,j )
+          CALL selfcollection_breakup( i,j )
+          CALL evaporation_rain( i,j )
+          CALL sedimentation_rain( i,j )
+          IF ( cloud_water_sedimentation )  CALL sedimentation_cloud( i,j )
+
+       ENDIF
+
+       CALL calc_precipitation_amount( i,j )
+
+    END SUBROUTINE bcm_actions_ij
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Adjust number of raindrops to avoid nonlinear effects in
+!> sedimentation and evaporation of rain drops due to too small or
+!> too big weights of rain drops (Stevens and Seifert, 2008).
+!> The same procedure is applied to cloud droplets if they are determined
+!> prognostically. Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE adjust_cloud_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp) ::  flag                  !< flag to indicate first grid level above surface
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          IF ( qr(k,j,i) <= eps_sb )  THEN
+             qr(k,j,i) = 0.0_wp
+             nr(k,j,i) = 0.0_wp
+          ELSE
+!
+!--          Adjust number of raindrops to avoid nonlinear effects in
+!--          sedimentation and evaporation of rain drops due to too small or
+!--          too big weights of rain drops (Stevens and Seifert, 2008).
+             IF ( nr(k,j,i) * xrmin > qr(k,j,i) * hyrho(k) )  THEN
+                nr(k,j,i) = qr(k,j,i) * hyrho(k) / xrmin * flag
+             ELSEIF ( nr(k,j,i) * xrmax < qr(k,j,i) * hyrho(k) )  THEN
+                nr(k,j,i) = qr(k,j,i) * hyrho(k) / xrmax * flag
+             ENDIF
+
+          ENDIF
+
+          IF ( microphysics_morrison ) THEN
+             IF ( qc(k,j,i) <= eps_sb )  THEN
+                qc(k,j,i) = 0.0_wp
+                nc(k,j,i) = 0.0_wp
+             ELSE
+                IF ( nc(k,j,i) * xcmin > qc(k,j,i) * hyrho(k) )  THEN
+                   nc(k,j,i) = qc(k,j,i) * hyrho(k) / xamin * flag
+                ENDIF
+             ENDIF
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE adjust_cloud_ij
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate number of activated condensation nucleii after simple activation
+!> scheme of Twomey, 1959.
+!------------------------------------------------------------------------------!
+    SUBROUTINE activation_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  activ             !<
+       REAL(wp)     ::  afactor           !<
+       REAL(wp)     ::  beta_act          !<
+       REAL(wp)     ::  bfactor           !<
+       REAL(wp)     ::  flag              !< flag to indicate first grid level above surface
+       REAL(wp)     ::  k_act             !<
+       REAL(wp)     ::  n_act             !<
+       REAL(wp)     ::  n_ccn             !<
+       REAL(wp)     ::  s_0               !<
+       REAL(wp)     ::  sat_max           !<
+       REAL(wp)     ::  sigma             !<
+       REAL(wp)     ::  sigma_act         !<
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--       Call calculation of supersaturation  
+          CALL supersaturation ( i, j, k )
+!
+!--       Prescribe parameters for activation
+!--       (see: Bott + Trautmann, 2002, Atm. Res., 64)
+          k_act  = 0.7_wp
+          activ  = 0.0_wp
+
+          IF ( sat > 0.0 .AND. .NOT. curvature_solution_effects_bulk )  THEN
+!
+!--          Compute the number of activated Aerosols
+!--          (see: Twomey, 1959, Pure and applied Geophysics, 43)
+             n_act     = na_init * sat**k_act
+!
+!--          Compute the number of cloud droplets
+!--          (see: Morrison + Grabowski, 2007, JAS, 64)
+!            activ = MAX( n_act - nc_d1(k), 0.0_wp) / dt_micro
+
+!
+!--          Compute activation rate after Khairoutdinov and Kogan
+!--          (see: Khairoutdinov + Kogan, 2000, Mon. Wea. Rev., 128)
+             sat_max = 0.8_wp / 100.0_wp
+             activ   = MAX( 0.0_wp, ( (na_init + nc(k,j,i) ) * MIN             &
+                 ( 1.0_wp, ( sat / sat_max )**k_act) - nc(k,j,i) ) ) /         &
+                  dt_micro
+
+             nc(k,j,i) = MIN( (nc(k,j,i) + activ * dt_micro), na_init)
+          ELSEIF ( sat > 0.0 .AND. curvature_solution_effects_bulk )  THEN
+!
+!--          Curvature effect (afactor) with surface tension
+!--          parameterization by Straka (2009)
+             sigma = 0.0761_wp - 0.000155_wp * ( t_l - 273.15_wp )
+             afactor = 2.0_wp * sigma / ( rho_l * r_v * t_l )
+!
+!--          Solute effect (bfactor)
+             bfactor = vanthoff * molecular_weight_of_water *                  &
+                  rho_s / ( molecular_weight_of_solute * rho_l )
+
+!
+!--          Prescribe power index that describes the soluble fraction
+!--          of an aerosol particle (beta).
+!--          (see: Morrison + Grabowski, 2007, JAS, 64)
+             beta_act  = 0.5_wp
+             sigma_act = sigma_bulk**( 1.0_wp + beta_act )
+!
+!--          Calculate mean geometric supersaturation (s_0) with
+!--          parameterization by Khvorostyanov and Curry (2006)
+             s_0   = dry_aerosol_radius **(- ( 1.0_wp + beta_act ) ) *         &
+               ( 4.0_wp * afactor**3 / ( 27.0_wp * bfactor ) )**0.5_wp
+
+!
+!--          Calculate number of activated CCN as a function of
+!--          supersaturation and taking Koehler theory into account
+!--          (see: Khvorostyanov + Curry, 2006, J. Geo. Res., 111)
+             n_ccn = ( na_init / 2.0_wp ) * ( 1.0_wp - ERF(                    &
+                LOG( s_0 / sat ) / ( SQRT(2.0_wp) * LOG(sigma_act) ) ) )
+             activ = MAX( ( n_ccn ) / dt_micro, 0.0_wp )
+
+             nc(k,j,i) = MIN( (nc(k,j,i) + activ * dt_micro * flag), na_init)
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE activation_ij
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate condensation rate for cloud water content (after Khairoutdinov and
+!> Kogan, 2000).
+!------------------------------------------------------------------------------!
+    SUBROUTINE condensation_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  cond              !<
+       REAL(wp)     ::  cond_max          !<
+       REAL(wp)     ::  dc                !<
+       REAL(wp)     ::  evap              !<
+       REAL(wp)     ::  flag              !< flag to indicate first grid level above surface
+       REAL(wp)     ::  g_fac             !<
+       REAL(wp)     ::  nc_0              !<
+       REAL(wp)     ::  temp              !<
+       REAL(wp)     ::  xc                !<
+
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--       Call calculation of supersaturation  
+          CALL supersaturation ( i, j, k )
+!
+!--       Actual temperature:
+          temp = t_l + lv_d_cp * ( qc(k,j,i) + qr(k,j,i) )
+
+          g_fac  = 1.0_wp / ( ( l_v / ( r_v * temp ) - 1.0_wp ) *        &
+                              l_v / ( thermal_conductivity_l * temp )    &
+                              + r_v * temp / ( diff_coeff_l * e_s )      &
+                            )
+!
+!--       Mean weight of cloud drops
+          IF ( nc(k,j,i) <= 0.0_wp) CYCLE
+          xc = MAX( (hyrho(k) * qc(k,j,i) / nc(k,j,i)), xcmin)
+!
+!--       Weight averaged diameter of cloud drops:
+          dc   = ( xc * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--       Integral diameter of cloud drops
+          nc_0 = nc(k,j,i) * dc
+!
+!--       Condensation needs only to be calculated in supersaturated regions
+          IF ( sat > 0.0_wp )  THEN
+!
+!--          Condensation rate of cloud water content
+!--          after KK scheme.
+!--          (see: Khairoutdinov + Kogan, 2000, Mon. Wea. Rev.,128)
+             cond      = 2.0_wp * pi * nc_0 * g_fac * sat / hyrho(k)
+             cond_max  = q(k,j,i) - q_s - qc(k,j,i) - qr(k,j,i)
+             cond      = MIN( cond, cond_max / dt_micro )
+
+             qc(k,j,i) = qc(k,j,i) + cond * dt_micro * flag
+          ELSEIF ( sat < 0.0_wp ) THEN
+             evap      = 2.0_wp * pi * nc_0 * g_fac * sat / hyrho(k)
+             evap      = MAX( evap, -qc(k,j,i) / dt_micro )
+
+             qc(k,j,i) = qc(k,j,i) + evap * dt_micro * flag
+          ENDIF
+       ENDDO
+
+    END SUBROUTINE condensation_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Autoconversion rate (Seifert and Beheng, 2006). Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE autoconversion_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  alpha_cc          !<
+       REAL(wp)     ::  autocon           !<
+       REAL(wp)     ::  dissipation       !<
+       REAL(wp)     ::  flag              !< flag to indicate first grid level above surface
+       REAL(wp)     ::  k_au              !<
+       REAL(wp)     ::  l_mix             !<
+       REAL(wp)     ::  nc_auto           !<
+       REAL(wp)     ::  nu_c              !<
+       REAL(wp)     ::  phi_au            !<
+       REAL(wp)     ::  r_cc              !<
+       REAL(wp)     ::  rc                !<
+       REAL(wp)     ::  re_lambda         !<
+       REAL(wp)     ::  sigma_cc          !<
+       REAL(wp)     ::  tau_cloud         !<
+       REAL(wp)     ::  xc                !<
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+          nc_auto = MERGE ( nc(k,j,i), nc_const, microphysics_morrison )
+
+          IF ( qc(k,j,i) > eps_sb  .AND.  nc_auto > eps_mr )  THEN
+
+             k_au = k_cc / ( 20.0_wp * x0 )
+!
+!--          Intern time scale of coagulation (Seifert and Beheng, 2006):
+!--          (1.0_wp - qc(k,j,i) / ( qc(k,j,i) + qr(k,j,i) ))
+             tau_cloud = MAX( 1.0_wp - qc(k,j,i) / ( qr(k,j,i) + qc(k,j,i) ),     &
+                              0.0_wp )
+!
+!--          Universal function for autoconversion process
+!--          (Seifert and Beheng, 2006):
+             phi_au = 600.0_wp * tau_cloud**0.68_wp * ( 1.0_wp - tau_cloud**0.68_wp )**3
+!
+!--          Shape parameter of gamma distribution (Geoffroy et al., 2010):
+!--          (Use constant nu_c = 1.0_wp instead?)
+             nu_c = 1.0_wp !MAX( 0.0_wp, 1580.0_wp * hyrho(k) * qc(k,j,i) - 0.28_wp )
+!
+!--          Mean weight of cloud droplets:
+             xc = hyrho(k) * qc(k,j,i) / nc_auto
+!
+!--          Parameterized turbulence effects on autoconversion (Seifert,
+!--          Nuijens and Stevens, 2010)
+             IF ( collision_turbulence )  THEN
+!
+!--             Weight averaged radius of cloud droplets:
+                rc = 0.5_wp * ( xc * dpirho_l )**( 1.0_wp / 3.0_wp )
+
+                alpha_cc = ( a_1 + a_2 * nu_c ) / ( 1.0_wp + a_3 * nu_c )
+                r_cc     = ( b_1 + b_2 * nu_c ) / ( 1.0_wp + b_3 * nu_c )
+                sigma_cc = ( c_1 + c_2 * nu_c ) / ( 1.0_wp + c_3 * nu_c )
+!
+!--             Mixing length (neglecting distance to ground and stratification)
+                l_mix = ( dx * dy * dzu(k) )**( 1.0_wp / 3.0_wp )
+!
+!--             Limit dissipation rate according to Seifert, Nuijens and
+!--             Stevens (2010)
+                dissipation = MIN( 0.06_wp, diss(k,j,i) )
+!
+!--             Compute Taylor-microscale Reynolds number:
+                re_lambda = 6.0_wp / 11.0_wp *                                 &
+                            ( l_mix / c_const )**( 2.0_wp / 3.0_wp ) *         &
+                            SQRT( 15.0_wp / kin_vis_air ) *                    &
+                            dissipation**( 1.0_wp / 6.0_wp )
+!
+!--             The factor of 1.0E4 is needed to convert the dissipation rate
+!--             from m2 s-3 to cm2 s-3.
+                k_au = k_au * ( 1.0_wp +                                       &
+                                dissipation * 1.0E4_wp *                       &
+                                ( re_lambda * 1.0E-3_wp )**0.25_wp *           &
+                                ( alpha_cc * EXP( -1.0_wp * ( ( rc - r_cc ) /  &
+                                                  sigma_cc )**2                &
+                                                ) + beta_cc                    &
+                                )                                              &
+                              )
+             ENDIF
+!
+!--          Autoconversion rate (Seifert and Beheng, 2006):
+             autocon = k_au * ( nu_c + 2.0_wp ) * ( nu_c + 4.0_wp ) /          &
+                       ( nu_c + 1.0_wp )**2 * qc(k,j,i)**2 * xc**2 *            &
+                       ( 1.0_wp + phi_au / ( 1.0_wp - tau_cloud )**2 ) *       &
+                       rho_surface
+             autocon = MIN( autocon, qc(k,j,i) / dt_micro )
+
+             qr(k,j,i) = qr(k,j,i) + autocon * dt_micro                 * flag
+             qc(k,j,i) = qc(k,j,i) - autocon * dt_micro                 * flag
+             nr(k,j,i) = nr(k,j,i) + autocon / x0 * hyrho(k) * dt_micro * flag
+             IF ( microphysics_morrison ) THEN
+                nc(k,j,i) = nc(k,j,i) - MIN( nc(k,j,i), 2.0_wp *                &
+                                    autocon / x0 * hyrho(k) * dt_micro * flag )
+             ENDIF
+
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE autoconversion_ij
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Autoconversion process (Kessler, 1969).
+!------------------------------------------------------------------------------!
+    SUBROUTINE autoconversion_kessler_ij( i, j )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  k      !<
+       INTEGER(iwp) ::  k_wall !< topography top index
+
+       REAL(wp)    ::  dqdt_precip !<
+       REAL(wp)    ::  flag              !< flag to indicate first grid level above surface
+
+!
+!--    Determine vertical index of topography top
+       k_wall = get_topography_top_index_ji( j, i, 's' )
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          IF ( qc(k,j,i) > ql_crit )  THEN
+             dqdt_precip = prec_time_const * ( qc(k,j,i) - ql_crit )
+          ELSE
+             dqdt_precip = 0.0_wp
+          ENDIF
+
+          qc(k,j,i) = qc(k,j,i) - dqdt_precip * dt_micro * flag
+          q(k,j,i)  = q(k,j,i)  - dqdt_precip * dt_micro * flag
+          pt(k,j,i) = pt(k,j,i) + dqdt_precip * dt_micro * lv_d_cp * d_exner(k)  &
+                                                                 * flag
+
+!
+!--       Compute the rain rate (stored on surface grid point)
+          prr(k_wall,j,i) = prr(k_wall,j,i) + dqdt_precip * dzw(k) * flag
+
+       ENDDO
+
+    END SUBROUTINE autoconversion_kessler_ij
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Accretion rate (Seifert and Beheng, 2006). Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE accretion_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  accr              !<
+       REAL(wp)     ::  flag              !< flag to indicate first grid level above surface
+       REAL(wp)     ::  k_cr              !<
+       REAL(wp)     ::  nc_accr           !<
+       REAL(wp)     ::  phi_ac            !<
+       REAL(wp)     ::  tau_cloud         !<
+       REAL(wp)     ::  xc                !<
+
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+          nc_accr = MERGE ( nc(k,j,i), nc_const, microphysics_morrison )
+
+          IF ( ( qc(k,j,i) > eps_sb )  .AND.  ( qr(k,j,i) > eps_sb )  .AND.  &
+               ( nc_accr > eps_mr ) )  THEN
+!
+!--          Intern time scale of coagulation (Seifert and Beheng, 2006):
+             tau_cloud = 1.0_wp - qc(k,j,i) / ( qc(k,j,i) + qr(k,j,i) )
+!
+!--          Universal function for accretion process
+!--          (Seifert and Beheng, 2001):
+             phi_ac = ( tau_cloud / ( tau_cloud + 5.0E-5_wp ) )**4
+
+!
+!--          Mean weight of cloud drops
+             xc = MAX( (hyrho(k) * qc(k,j,i) / nc_accr), xcmin)
+!
+!--          Parameterized turbulence effects on autoconversion (Seifert,
+!--          Nuijens and Stevens, 2010). The factor of 1.0E4 is needed to
+!--          convert the dissipation rate (diss) from m2 s-3 to cm2 s-3.
+             IF ( collision_turbulence )  THEN
+                k_cr = k_cr0 * ( 1.0_wp + 0.05_wp *                            &
+                                 MIN( 600.0_wp,                                &
+                                      diss(k,j,i) * 1.0E4_wp )**0.25_wp        &
+                               )
+             ELSE
+                k_cr = k_cr0
+             ENDIF
+!
+!--          Accretion rate (Seifert and Beheng, 2006):
+             accr = k_cr * qc(k,j,i) * qr(k,j,i) * phi_ac *                      &
+                    SQRT( rho_surface * hyrho(k) )
+             accr = MIN( accr, qc(k,j,i) / dt_micro )
+
+             qr(k,j,i) = qr(k,j,i) + accr * dt_micro * flag
+             qc(k,j,i) = qc(k,j,i) - accr * dt_micro * flag
+             IF ( microphysics_morrison )  THEN
+                nc(k,j,i) = nc(k,j,i) - MIN( nc(k,j,i), accr / xc *               &
+                                             hyrho(k) * dt_micro * flag        &
+                                         )
+             ENDIF
+
+
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE accretion_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Collisional breakup rate (Seifert, 2008). Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE selfcollection_breakup_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  breakup           !<
+       REAL(wp)     ::  dr                !<
+       REAL(wp)     ::  flag              !< flag to indicate first grid level above surface
+       REAL(wp)     ::  phi_br            !<
+       REAL(wp)     ::  selfcoll          !<
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          IF ( qr(k,j,i) > eps_sb )  THEN
+!
+!--          Selfcollection rate (Seifert and Beheng, 2001):
+             selfcoll = k_rr * nr(k,j,i) * qr(k,j,i) * SQRT( hyrho(k) * rho_surface )
+!
+!--          Weight averaged diameter of rain drops:
+             dr = ( hyrho(k) * qr(k,j,i) / nr(k,j,i) * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--          Collisional breakup rate (Seifert, 2008):
+             IF ( dr >= 0.3E-3_wp )  THEN
+                phi_br  = k_br * ( dr - 1.1E-3_wp )
+                breakup = selfcoll * ( phi_br + 1.0_wp )
+             ELSE
+                breakup = 0.0_wp
+             ENDIF
+
+             selfcoll = MAX( breakup - selfcoll, -nr(k,j,i) / dt_micro )
+             nr(k,j,i) = nr(k,j,i) + selfcoll * dt_micro * flag
+
+          ENDIF
+       ENDDO
+
+    END SUBROUTINE selfcollection_breakup_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Evaporation of precipitable water. Condensation is neglected for
+!> precipitable water. Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE evaporation_rain_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                 !<
+       INTEGER(iwp) ::  j                 !<
+       INTEGER(iwp) ::  k                 !<
+
+       REAL(wp)     ::  dr                !<
+       REAL(wp)     ::  evap              !<
+       REAL(wp)     ::  evap_nr           !<
+       REAL(wp)     ::  f_vent            !<
+       REAL(wp)     ::  flag              !< flag to indicate first grid level above surface
+       REAL(wp)     ::  g_evap            !<
+       REAL(wp)     ::  lambda_r          !<
+       REAL(wp)     ::  mu_r              !<
+       REAL(wp)     ::  mu_r_2            !<
+       REAL(wp)     ::  mu_r_5d2          !<
+       REAL(wp)     ::  nr_0              !<
+       REAL(wp)     ::  temp              !<
+       REAL(wp)     ::  xr                !<
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          IF ( qr(k,j,i) > eps_sb )  THEN
+!
+!--          Call calculation of supersaturation  
+             CALL supersaturation ( i, j, k )
+!
+!--          Evaporation needs only to be calculated in subsaturated regions
+             IF ( sat < 0.0_wp )  THEN
+!
+!--             Actual temperature:
+                temp = t_l + lv_d_cp * ( qc(k,j,i) + qr(k,j,i) )
+
+                g_evap = 1.0_wp / ( ( l_v / ( r_v * temp ) - 1.0_wp ) * l_v /  &
+                                    ( thermal_conductivity_l * temp ) +        &
+                                    r_v * temp / ( diff_coeff_l * e_s )        &
+                                  )
+!
+!--             Mean weight of rain drops
+                xr = hyrho(k) * qr(k,j,i) / nr(k,j,i)
+!
+!--             Weight averaged diameter of rain drops:
+                dr = ( xr * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--             Compute ventilation factor and intercept parameter
+!--             (Seifert and Beheng, 2006; Seifert, 2008):
+                IF ( ventilation_effect )  THEN
+!
+!--                Shape parameter of gamma distribution (Milbrandt and Yau, 2005;
+!--                Stevens and Seifert, 2008):
+                   mu_r = 10.0_wp * ( 1.0_wp + TANH( 1.2E3_wp * ( dr - 1.4E-3_wp ) ) )
+!
+!--                Slope parameter of gamma distribution (Seifert, 2008):
+                   lambda_r = ( ( mu_r + 3.0_wp ) * ( mu_r + 2.0_wp ) *        &
+                                ( mu_r + 1.0_wp )                              &
+                              )**( 1.0_wp / 3.0_wp ) / dr
+
+                   mu_r_2   = mu_r + 2.0_wp
+                   mu_r_5d2 = mu_r + 2.5_wp
+
+                   f_vent = a_vent * gamm( mu_r_2 ) * lambda_r**( -mu_r_2 ) +  &
+                            b_vent * schmidt_p_1d3 *                           &
+                            SQRT( a_term / kin_vis_air ) * gamm( mu_r_5d2 ) *  &
+                            lambda_r**( -mu_r_5d2 ) *                          &
+                            ( 1.0_wp -                                         &
+                              0.5_wp * ( b_term / a_term ) *                   &
+                              ( lambda_r / ( c_term + lambda_r )               &
+                              )**mu_r_5d2 -                                    &
+                              0.125_wp * ( b_term / a_term )**2 *              &
+                              ( lambda_r / ( 2.0_wp * c_term + lambda_r )      &
+                              )**mu_r_5d2 -                                    &
+                              0.0625_wp * ( b_term / a_term )**3 *             &
+                              ( lambda_r / ( 3.0_wp * c_term + lambda_r )      &
+                              )**mu_r_5d2 -                                    &
+                              0.0390625_wp * ( b_term / a_term )**4 *          &
+                              ( lambda_r / ( 4.0_wp * c_term + lambda_r )      &
+                              )**mu_r_5d2                                      &
+                            )
+
+                   nr_0   = nr(k,j,i) * lambda_r**( mu_r + 1.0_wp ) /           &
+                            gamm( mu_r + 1.0_wp )
+                ELSE
+                   f_vent = 1.0_wp
+                   nr_0   = nr(k,j,i) * dr
+                ENDIF
+!
+!--             Evaporation rate of rain water content (Seifert and Beheng, 2006):
+                evap    = 2.0_wp * pi * nr_0 * g_evap * f_vent * sat / hyrho(k)
+                evap    = MAX( evap, -qr(k,j,i) / dt_micro )
+                evap_nr = MAX( c_evap * evap / xr * hyrho(k),                  &
+                               -nr(k,j,i) / dt_micro )
+
+                qr(k,j,i) = qr(k,j,i) + evap    * dt_micro * flag
+                nr(k,j,i) = nr(k,j,i) + evap_nr * dt_micro * flag
+
+             ENDIF
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE evaporation_rain_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sedimentation of cloud droplets (Ackermann et al., 2009, MWR).
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE sedimentation_cloud_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !<
+       INTEGER(iwp) ::  j             !<
+       INTEGER(iwp) ::  k             !<
+
+       REAL(wp)     ::  flag    !< flag to indicate first grid level above surface
+       REAL(wp)     ::  nc_sedi !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_nc  !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_qc  !<
+
+       sed_qc(nzt+1) = 0.0_wp
+       sed_nc(nzt+1) = 0.0_wp
+
+
+       DO  k = nzt, nzb+1, -1
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+          nc_sedi = MERGE( nc(k,j,i), nc_const, microphysics_morrison )
+!
+!--       Sedimentation fluxes for number concentration are only calculated
+!--       for cloud_scheme = 'morrison'
+          IF ( microphysics_morrison ) THEN
+             IF ( qc(k,j,i) > eps_sb  .AND.  nc(k,j,i) > eps_mr )  THEN
+                sed_nc(k) = sed_qc_const *                                     &
+                            ( qc(k,j,i) * hyrho(k) )**( 2.0_wp / 3.0_wp ) *     &
+                            ( nc(k,j,i) )**( 1.0_wp / 3.0_wp )
+             ELSE
+                sed_nc(k) = 0.0_wp
+             ENDIF
+
+             sed_nc(k) = MIN( sed_nc(k), hyrho(k) * dzu(k+1) *                 &
+                              nc(k,j,i) / dt_micro + sed_nc(k+1)                &
+                            ) * flag
+
+             nc(k,j,i) = nc(k,j,i) + ( sed_nc(k+1) - sed_nc(k) ) *               &
+                                         ddzu(k+1) / hyrho(k) * dt_micro * flag
+          ENDIF
+
+          IF ( qc(k,j,i) > eps_sb  .AND.  nc_sedi > eps_mr )  THEN
+             sed_qc(k) = sed_qc_const * nc_sedi**( -2.0_wp / 3.0_wp ) *        &
+                         ( qc(k,j,i) * hyrho(k) )**( 5.0_wp / 3.0_wp )  * flag
+          ELSE
+             sed_qc(k) = 0.0_wp
+          ENDIF
+
+          sed_qc(k) = MIN( sed_qc(k), hyrho(k) * dzu(k+1) * q(k,j,i) /          &
+                                      dt_micro + sed_qc(k+1)                   &
+                         ) * flag
+
+          q(k,j,i)  = q(k,j,i)  + ( sed_qc(k+1) - sed_qc(k) ) * ddzu(k+1) /      &
+                                hyrho(k) * dt_micro * flag
+          qc(k,j,i) = qc(k,j,i) + ( sed_qc(k+1) - sed_qc(k) ) * ddzu(k+1) /      &
+                                hyrho(k) * dt_micro * flag
+          pt(k,j,i) = pt(k,j,i) - ( sed_qc(k+1) - sed_qc(k) ) * ddzu(k+1) /      &
+                                hyrho(k) * lv_d_cp * d_exner(k) * dt_micro     &
+                                                                * flag
+
+!
+!--       Compute the precipitation rate of cloud (fog) droplets
+          IF ( call_microphysics_at_all_substeps )  THEN
+             prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k) *                  &
+                              weight_substep(intermediate_timestep_count) * flag
+          ELSE
+             prr(k,j,i) = prr(k,j,i) + sed_qc(k) / hyrho(k) * flag
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE sedimentation_cloud_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of sedimentation flux. Implementation according to Stevens
+!> and Seifert (2008). Code is based on UCLA-LES. Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE sedimentation_rain_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  k_run         !<
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp)     ::  c_run                      !<
+       REAL(wp)     ::  d_max                      !<
+       REAL(wp)     ::  d_mean                     !<
+       REAL(wp)     ::  d_min                      !<
+       REAL(wp)     ::  dr                         !<
+       REAL(wp)     ::  flux                       !<
+       REAL(wp)     ::  flag                       !< flag to indicate first grid level above surface
+       REAL(wp)     ::  lambda_r                   !<
+       REAL(wp)     ::  mu_r                       !<
+       REAL(wp)     ::  z_run                      !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_nr     !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  c_qr     !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  nr_slope !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  qr_slope !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_nr   !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  sed_qr   !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  w_nr     !<
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  w_qr     !<
+
+!
+!--    Compute velocities
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          IF ( qr(k,j,i) > eps_sb )  THEN
+!
+!--          Weight averaged diameter of rain drops:
+             dr = ( hyrho(k) * qr(k,j,i) / nr(k,j,i) * dpirho_l )**( 1.0_wp / 3.0_wp )
+!
+!--          Shape parameter of gamma distribution (Milbrandt and Yau, 2005;
+!--          Stevens and Seifert, 2008):
+             mu_r = 10.0_wp * ( 1.0_wp + TANH( 1.2E3_wp * ( dr - 1.4E-3_wp ) ) )
+!
+!--          Slope parameter of gamma distribution (Seifert, 2008):
+             lambda_r = ( ( mu_r + 3.0_wp ) * ( mu_r + 2.0_wp ) *              &
+                          ( mu_r + 1.0_wp ) )**( 1.0_wp / 3.0_wp ) / dr
+
+             w_nr(k) = MAX( 0.1_wp, MIN( 20.0_wp,                              &
+                                         a_term - b_term * ( 1.0_wp +          &
+                                            c_term / lambda_r )**( -1.0_wp *   &
+                                            ( mu_r + 1.0_wp ) )                &
+                                        )                                      &
+                          ) * flag
+             w_qr(k) = MAX( 0.1_wp, MIN( 20.0_wp,                              &
+                                         a_term - b_term * ( 1.0_wp +          &
+                                            c_term / lambda_r )**( -1.0_wp *   &
+                                            ( mu_r + 4.0_wp ) )                &
+                                       )                                       &
+                          ) * flag
+          ELSE
+             w_nr(k) = 0.0_wp
+             w_qr(k) = 0.0_wp
+          ENDIF
+       ENDDO
+!
+!--    Adjust boundary values using surface data type.
+!--    Upward facing non-natural
+       surf_s = bc_h(0)%start_index(j,i)
+       surf_e = bc_h(0)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k         = bc_h(0)%k(m)
+          w_nr(k-1) = w_nr(k)
+          w_qr(k-1) = w_qr(k)
+       ENDDO
+!
+!--    Downward facing non-natural
+       surf_s = bc_h(1)%start_index(j,i)
+       surf_e = bc_h(1)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k         = bc_h(1)%k(m)
+          w_nr(k+1) = w_nr(k)
+          w_qr(k+1) = w_qr(k)
+       ENDDO
+!
+!--    Neumann boundary condition at model top
+       w_nr(nzt+1) = 0.0_wp
+       w_qr(nzt+1) = 0.0_wp
+!
+!--    Compute Courant number
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          c_nr(k) = 0.25_wp * ( w_nr(k-1) + 2.0_wp * w_nr(k) + w_nr(k+1) ) *   &
+                    dt_micro * ddzu(k) * flag
+          c_qr(k) = 0.25_wp * ( w_qr(k-1) + 2.0_wp * w_qr(k) + w_qr(k+1) ) *   &
+                    dt_micro * ddzu(k) * flag
+       ENDDO
+!
+!--    Limit slopes with monotonized centered (MC) limiter (van Leer, 1977):
+       IF ( limiter_sedimentation )  THEN
+
+          DO k = nzb+1, nzt
+!
+!--          Predetermine flag to mask topography
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+             d_mean = 0.5_wp * ( qr(k+1,j,i) - qr(k-1,j,i) )
+             d_min  = qr(k,j,i) - MIN( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) )
+             d_max  = MAX( qr(k+1,j,i), qr(k,j,i), qr(k-1,j,i) ) - qr(k,j,i)
+
+             qr_slope(k) = SIGN(1.0_wp, d_mean) * MIN ( 2.0_wp * d_min,        &
+                                                        2.0_wp * d_max,        &
+                                                        ABS( d_mean ) ) * flag
+
+             d_mean = 0.5_wp * ( nr(k+1,j,i) - nr(k-1,j,i) )
+             d_min  = nr(k,j,i) - MIN( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) )
+             d_max  = MAX( nr(k+1,j,i), nr(k,j,i), nr(k-1,j,i) ) - nr(k,j,i)
+
+             nr_slope(k) = SIGN(1.0_wp, d_mean) * MIN ( 2.0_wp * d_min,        &
+                                                        2.0_wp * d_max,        &
+                                                        ABS( d_mean ) ) * flag
+          ENDDO
+
+       ELSE
+
+          nr_slope = 0.0_wp
+          qr_slope = 0.0_wp
+
+       ENDIF
+
+       sed_nr(nzt+1) = 0.0_wp
+       sed_qr(nzt+1) = 0.0_wp
+!
+!--    Compute sedimentation flux
+       DO  k = nzt, nzb+1, -1
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--       Sum up all rain drop number densities which contribute to the flux
+!--       through k-1/2
+          flux  = 0.0_wp
+          z_run = 0.0_wp ! height above z(k)
+          k_run = k
+          c_run = MIN( 1.0_wp, c_nr(k) )
+          DO WHILE ( c_run > 0.0_wp  .AND.  k_run <= nzt )
+             flux  = flux + hyrho(k_run) *                                     &
+                     ( nr(k_run,j,i) + nr_slope(k_run) * ( 1.0_wp - c_run ) *  &
+                     0.5_wp ) * c_run * dzu(k_run) * flag
+             z_run = z_run + dzu(k_run)            * flag
+             k_run = k_run + 1                     * flag
+             c_run = MIN( 1.0_wp, c_nr(k_run) - z_run * ddzu(k_run) ) * flag
+          ENDDO
+!
+!--       It is not allowed to sediment more rain drop number density than
+!--       available
+          flux = MIN( flux,                                                    &
+                      hyrho(k) * dzu(k+1) * nr(k,j,i) + sed_nr(k+1) * dt_micro )
+
+          sed_nr(k) = flux / dt_micro * flag
+          nr(k,j,i)  = nr(k,j,i) + ( sed_nr(k+1) - sed_nr(k) ) * ddzu(k+1) /     &
+                                    hyrho(k) * dt_micro * flag
+!
+!--       Sum up all rain water content which contributes to the flux
+!--       through k-1/2
+          flux  = 0.0_wp
+          z_run = 0.0_wp ! height above z(k)
+          k_run = k
+          c_run = MIN( 1.0_wp, c_qr(k) )
+
+          DO WHILE ( c_run > 0.0_wp  .AND.  k_run <= nzt )
+
+             flux  = flux + hyrho(k_run) *                                     &
+                     ( qr(k_run,j,i) + qr_slope(k_run) * ( 1.0_wp - c_run ) *  &
+                     0.5_wp ) * c_run * dzu(k_run) * flag
+             z_run = z_run + dzu(k_run)            * flag
+             k_run = k_run + 1                     * flag
+             c_run = MIN( 1.0_wp, c_qr(k_run) - z_run * ddzu(k_run) ) * flag
+
+          ENDDO
+!
+!--       It is not allowed to sediment more rain water content than available
+          flux = MIN( flux,                                                    &
+                      hyrho(k) * dzu(k) * qr(k,j,i) + sed_qr(k+1) * dt_micro )
+
+          sed_qr(k) = flux / dt_micro * flag
+
+          qr(k,j,i) = qr(k,j,i) + ( sed_qr(k+1) - sed_qr(k) ) * ddzu(k+1) /      &
+                                hyrho(k) * dt_micro * flag
+          q(k,j,i)  = q(k,j,i)  + ( sed_qr(k+1) - sed_qr(k) ) * ddzu(k+1) /      &
+                                hyrho(k) * dt_micro * flag
+          pt(k,j,i) = pt(k,j,i) - ( sed_qr(k+1) - sed_qr(k) ) * ddzu(k+1) /      &
+                                hyrho(k) * lv_d_cp * d_exner(k) * dt_micro     &
+                                                                * flag
+!
+!--       Compute the rain rate
+          IF ( call_microphysics_at_all_substeps )  THEN
+             prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k)                    &
+                          * weight_substep(intermediate_timestep_count) * flag
+          ELSE
+             prr(k,j,i) = prr(k,j,i) + sed_qr(k) / hyrho(k) * flag
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE sedimentation_rain_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine computes the precipitation amount due to gravitational
+!> settling of rain and cloud (fog) droplets
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_precipitation_amount_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       IF ( ( dt_do2d_xy - time_do2d_xy ) < precipitation_amount_interval .AND.&
+            ( .NOT. call_microphysics_at_all_substeps .OR.                     &
+            intermediate_timestep_count == intermediate_timestep_count_max ) ) &
+       THEN
+
+          surf_s = bc_h(0)%start_index(j,i)
+          surf_e = bc_h(0)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k                         = bc_h(0)%k(m)
+             precipitation_amount(j,i) = precipitation_amount(j,i) +           &
+                                               prr(k,j,i) * hyrho(k) * dt_3d
+          ENDDO
+
+       ENDIF
+
+    END SUBROUTINE calc_precipitation_amount_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of the diagnostic supersaturation sat, actual liquid water
+!< temperature t_l and saturation water vapor mixing ratio q_s
+!------------------------------------------------------------------------------!
+    SUBROUTINE supersaturation ( i,j,k )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i   !< running index
+       INTEGER(iwp) ::  j   !< running index
+       INTEGER(iwp) ::  k   !< running index
+
+       REAL(wp) ::  alpha   !< correction factor
+!
+!--    Actual liquid water temperature:
+       t_l = exner(k) * pt(k,j,i)
+!
+!--    Calculate water vapor saturation pressure
+       e_s = magnus( t_l )
+!
+!--    Computation of saturation mixing ratio:
+       q_s   = rd_d_rv * e_s / ( hyp(k) - e_s )
+!
+!--    Correction factor
+       alpha = rd_d_rv * lv_d_rd * lv_d_cp / ( t_l * t_l )
+!
+!--    Correction of the approximated value
+!--    (see: Cuijpers + Duynkerke, 1993, JAS, 23)
+       q_s   = q_s * ( 1.0_wp + alpha * q(k,j,i) ) / ( 1.0_wp + alpha * q_s )
+!
+!--    Supersaturation:
+!--    Not in case of microphysics_kessler or microphysics_sat_adjust
+!--    since qr is unallocated
+       IF ( .NOT. microphysics_kessler  .AND.                                  &
+            .NOT.  microphysics_sat_adjust )  THEN
+          sat   = ( q(k,j,i) - qr(k,j,i) - qc(k,j,i) ) / q_s - 1.0_wp
+       ENDIF
+
+    END SUBROUTINE supersaturation
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of the liquid water content (0%-or-100%-scheme). This scheme is
+!> used by the one and the two moment cloud physics scheme. Using the two moment
+!> scheme, this calculation results in the cloud water content.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_liquid_water_content
+
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+       REAL(wp)     ::  flag !< flag to indicate first grid level above surface
+
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+   !
+   !--          Call calculation of supersaturation located
+                CALL supersaturation( i, j, k )
+
+   !
+   !--          Compute the liquid water content
+                IF ( microphysics_seifert  .AND. .NOT. microphysics_morrison ) &
+                THEN
+                   IF ( ( q(k,j,i) - q_s - qr(k,j,i) ) > 0.0_wp )  THEN
+                      qc(k,j,i) = ( q(k,j,i) - q_s - qr(k,j,i) ) * flag
+                      ql(k,j,i) = ( qc(k,j,i) + qr(k,j,i) ) * flag
+                   ELSE
+                      IF ( q(k,j,i) < qr(k,j,i) )  q(k,j,i) = qr(k,j,i)
+                      qc(k,j,i) = 0.0_wp
+                      ql(k,j,i) = qr(k,j,i) * flag
+                   ENDIF
+                ELSEIF ( microphysics_morrison )  THEN
+                   ql(k,j,i) = qc(k,j,i) + qr(k,j,i) * flag
+                ELSE
+                   IF ( ( q(k,j,i) - q_s ) > 0.0_wp )  THEN
+                      qc(k,j,i) = ( q(k,j,i) - q_s ) * flag
+                      ql(k,j,i) = qc(k,j,i) * flag
+                   ELSE
+                      qc(k,j,i) = 0.0_wp
+                      ql(k,j,i) = 0.0_wp
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE calc_liquid_water_content
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This function computes the gamma function (Press et al., 1992).
+!> The gamma function is needed for the calculation of the evaporation
+!> of rain drops.
+!------------------------------------------------------------------------------!
+    FUNCTION gamm( xx )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  j            !<
+
+       REAL(wp)     ::  gamm         !<
+       REAL(wp)     ::  ser          !<
+       REAL(wp)     ::  tmp          !<
+       REAL(wp)     ::  x_gamm       !<
+       REAL(wp)     ::  xx           !<
+       REAL(wp)     ::  y_gamm       !<
+
+
+       REAL(wp), PARAMETER  ::  stp = 2.5066282746310005_wp               !<
+       REAL(wp), PARAMETER  ::  cof(6) = (/ 76.18009172947146_wp,      &
+                                           -86.50532032941677_wp,      &
+                                            24.01409824083091_wp,      &
+                                            -1.231739572450155_wp,     &
+                                             0.1208650973866179E-2_wp, &
+                                            -0.5395239384953E-5_wp /)     !<
+
+       x_gamm = xx
+       y_gamm = x_gamm
+       tmp = x_gamm + 5.5_wp
+       tmp = ( x_gamm + 0.5_wp ) * LOG( tmp ) - tmp
+       ser = 1.000000000190015_wp
+
+       DO  j = 1, 6
+          y_gamm = y_gamm + 1.0_wp
+          ser    = ser + cof( j ) / y_gamm
+       ENDDO
+
+!
+!--    Until this point the algorithm computes the logarithm of the gamma
+!--    function. Hence, the exponential function is used.
+!       gamm = EXP( tmp + LOG( stp * ser / x_gamm ) )
+       gamm = EXP( tmp ) * stp * ser / x_gamm
+
+       RETURN
+
+    END FUNCTION gamm
+
+ END MODULE bulk_cloud_model_mod
Index: /palm/tags/release-6.0/SOURCE/buoyancy.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/buoyancy.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/buoyancy.f90	(revision 3477)
@@ -0,0 +1,318 @@
+!> @file buoyancy.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! module use statements moved to global declaration section
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused Variable removed
+!
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY list
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Calculation of reference state in subroutine calc_mean_profile moved to
+! subroutine time_integration,
+! subroutine calc_mean_profile moved to new file calc_mean_profile.f90
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! vector length (32) removed from openacc clause
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! Generalize calc_mean_profile for wider use: use additional steering 
+! character loc 
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! steering of reference state revised (var_reference and pr removed from
+! parameter list), use_reference renamed use_single_reference_value
+!
+! 1171 2013-05-30 11:27:45Z raasch
+! openacc statements added to use_reference-case in accelerator version
+!
+! 1153 2013-05-10 14:33:08Z raasch
+! code adjustments of accelerator version required by PGI 12.3 / CUDA 5.0
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator version (*_acc) added
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! Revision 1.1  1997/08/29 08:56:48  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Buoyancy term of the third component of the equation of motion.
+!> @attention Humidity is not regarded when using a sloping surface!
+!------------------------------------------------------------------------------!
+ MODULE buoyancy_mod
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt, pt_slope_ref, ref_state, tend
+
+    USE control_parameters,                                                    &
+        ONLY:  atmos_ocean_sign, cos_alpha_surface, message_string, pt_surface,&
+               sin_alpha_surface, sloping_surface
+
+    USE kinds
+
+    PRIVATE
+    PUBLIC buoyancy
+
+    INTERFACE buoyancy
+       MODULE PROCEDURE buoyancy
+       MODULE PROCEDURE buoyancy_ij
+    END INTERFACE buoyancy
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE buoyancy( var, wind_component )
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxlu, nxr, nxrg, nyn, nyng, nys, nysg, nzb,       &
+                  nzt, wall_flags_0
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i              !<
+       INTEGER(iwp) ::  j              !<
+       INTEGER(iwp) ::  k              !<
+       INTEGER(iwp) ::  wind_component !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  var
+#endif
+
+
+       IF ( .NOT. sloping_surface )  THEN
+!
+!--       Normal case: horizontal surface
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt-1
+                   tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5_wp *  &
+                          (                                                     &
+                             ( var(k,j,i)   - ref_state(k) )   / ref_state(k) + &
+                             ( var(k+1,j,i) - ref_state(k+1) ) / ref_state(k+1) &
+                          ) * MERGE( 1.0_wp, 0.0_wp,                            &
+                                     BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ELSE
+!
+!--       Buoyancy term for a surface with a slope in x-direction. The equations
+!--       for both the u and w velocity-component contain proportionate terms.
+!--       Temperature field at time t=0 serves as environmental temperature.
+!--       Reference temperature (pt_surface) is the one at the lower left corner
+!--       of the total domain.
+          IF ( wind_component == 1 )  THEN
+
+             DO  i = nxlu, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt-1
+                      tend(k,j,i) = tend(k,j,i) + g * sin_alpha_surface *         &
+                           0.5_wp * ( ( pt(k,j,i-1)         + pt(k,j,i)         ) &
+                                    - ( pt_slope_ref(k,i-1) + pt_slope_ref(k,i) ) &
+                                    ) / pt_surface                                &
+                                      * MERGE( 1.0_wp, 0.0_wp,                    &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          ELSEIF ( wind_component == 3 )  THEN
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt-1
+                      tend(k,j,i) = tend(k,j,i) + g * cos_alpha_surface *         &
+                           0.5_wp * ( ( pt(k,j,i)         + pt(k+1,j,i)         ) &
+                                    - ( pt_slope_ref(k,i) + pt_slope_ref(k+1,i) ) &
+                                    ) / pt_surface                                &
+                                      * MERGE( 1.0_wp, 0.0_wp,                    &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+            ENDDO
+
+          ELSE
+             
+             WRITE( message_string, * ) 'no term for component "',             &
+                                       wind_component,'"'
+             CALL message( 'buoyancy', 'PA0159', 1, 2, 0, 6, 0 )
+
+          ENDIF
+
+       ENDIF
+
+    END SUBROUTINE buoyancy
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!> @attention PGI-compiler creates SIGFPE if opt>1 is used! Therefore, opt=1 is
+!>            forced by compiler-directive.
+!------------------------------------------------------------------------------!
+!pgi$r opt=1
+    SUBROUTINE buoyancy_ij( i, j, var, wind_component )
+
+
+       USE indices,                                                            &
+           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i              !<
+       INTEGER(iwp) ::  j              !<
+       INTEGER(iwp) ::  k              !<
+       INTEGER(iwp) ::  wind_component !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  var
+#endif
+
+
+       IF ( .NOT. sloping_surface )  THEN
+!
+!--       Normal case: horizontal surface
+          DO  k = nzb+1, nzt-1
+              tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5_wp * (    &
+                        ( var(k,j,i)   - ref_state(k)   ) / ref_state(k)   +   &
+                        ( var(k+1,j,i) - ref_state(k+1) ) / ref_state(k+1)     &
+                                                                          )    &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+          ENDDO
+
+       ELSE
+!
+!--       Buoyancy term for a surface with a slope in x-direction. The equations
+!--       for both the u and w velocity-component contain proportionate terms.
+!--       Temperature field at time t=0 serves as environmental temperature.
+!--       Reference temperature (pt_surface) is the one at the lower left corner
+!--       of the total domain.
+          IF ( wind_component == 1 )  THEN
+
+             DO  k = nzb+1, nzt-1
+                tend(k,j,i) = tend(k,j,i) + g * sin_alpha_surface *               &
+                           0.5_wp * ( ( pt(k,j,i-1)         + pt(k,j,i)         ) &
+                                    - ( pt_slope_ref(k,i-1) + pt_slope_ref(k,i) ) &
+                                    ) / pt_surface                                &
+                                      * MERGE( 1.0_wp, 0.0_wp,                    &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+
+          ELSEIF ( wind_component == 3 )  THEN
+
+             DO  k = nzb+1, nzt-1
+                tend(k,j,i) = tend(k,j,i) + g * cos_alpha_surface *               &
+                           0.5_wp * ( ( pt(k,j,i)         + pt(k+1,j,i)         ) &
+                                    - ( pt_slope_ref(k,i) + pt_slope_ref(k+1,i) ) &
+                                    ) / pt_surface                                &
+                                      * MERGE( 1.0_wp, 0.0_wp,                    &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+
+          ELSE
+
+             WRITE( message_string, * ) 'no term for component "',             &
+                                       wind_component,'"'
+             CALL message( 'buoyancy', 'PA0159', 1, 2, 0, 6, 0 )
+
+          ENDIF
+
+       ENDIF
+
+    END SUBROUTINE buoyancy_ij
+
+ END MODULE buoyancy_mod
Index: /palm/tags/release-6.0/SOURCE/calc_mean_profile.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/calc_mean_profile.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/calc_mean_profile.f90	(revision 3477)
@@ -0,0 +1,174 @@
+!> @file calc_mean_profile.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! omp_get_thread_num now declared in openmp directive,
+! unused variable removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Enable usage also during initialization, required for initialization of 
+! radiation and land-surface model (MS)
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+!
+! 1738 2015-12-18 13:56:05Z raasch
+! bugfix: if a layer is completely filled with topography, no mean is calculated
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Initial revision
+!
+! Description:
+! ------------
+!> Calculate the horizontally averaged vertical temperature profile (pr=4 in case
+!> of potential temperature, 44 in case of virtual potential temperature, and 64
+!> in case of density (ocean runs)).
+!------------------------------------------------------------------------------!
+ MODULE calc_mean_profile_mod
+ 
+
+    PRIVATE
+    PUBLIC calc_mean_profile
+
+    INTERFACE calc_mean_profile
+       MODULE PROCEDURE calc_mean_profile
+    END INTERFACE calc_mean_profile
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_mean_profile( var, pr )
+
+       USE control_parameters,                                                 &
+           ONLY:  intermediate_timestep_count
+
+       USE indices,                                                            &
+           ONLY:  ngp_2dh_s_inner, nxl, nxr, nyn, nys, nzb, nzb, nzt,          &
+                  wall_flags_0
+
+       USE kinds
+
+       USE pegrid
+
+       USE statistics,                                                         &
+           ONLY:  flow_statistics_called, hom, sums, sums_l
+
+
+       IMPLICIT NONE
+       
+       INTEGER(iwp) ::  i                  !<
+       INTEGER(iwp) ::  j                  !<
+       INTEGER(iwp) ::  k                  !<
+       INTEGER(iwp) ::  pr                 !< 
+!$     INTEGER(iwp) ::  omp_get_thread_num !<
+       INTEGER(iwp) ::  tn                 !<
+       
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(:,:,:) ::  var  !<
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  var
+#endif
+
+!
+!--    Computation of the horizontally averaged profile of variable var, unless
+!--    already done by the relevant call from flow_statistics. The calculation
+!--    is done only for the first respective intermediate timestep in order to
+!--    spare communication time and to produce identical model results with jobs
+!--    which are calling flow_statistics at different time intervals. At 
+!--    initialization, intermediate_timestep_count = 0 is considered as well.
+
+       IF ( .NOT. flow_statistics_called  .AND.                                &
+            intermediate_timestep_count <= 1 )  THEN
+
+!
+!--       Horizontal average of variable var
+          tn           =   0  ! Default thread number in case of one thread
+          !$OMP PARALLEL PRIVATE( i, j, k, tn )
+!$        tn = omp_get_thread_num()
+          sums_l(:,pr,tn) = 0.0_wp
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j =  nys, nyn
+                DO  k = nzb, nzt+1
+                   sums_l(k,pr,tn) = sums_l(k,pr,tn) + var(k,j,i)              &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 22 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+          !$OMP END PARALLEL
+
+          DO  i = 1, threads_per_task-1
+             sums_l(:,pr,0) = sums_l(:,pr,0) + sums_l(:,pr,i)
+          ENDDO
+
+#if defined( __parallel )
+
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( sums_l(nzb,pr,0), sums(nzb,pr), nzt+2-nzb,       &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+
+#else
+
+          sums(:,pr) = sums_l(:,pr,0)
+
+#endif
+
+          DO  k = nzb, nzt+1
+             IF ( ngp_2dh_s_inner(k,0) /= 0 )  THEN
+                hom(k,1,pr,0) = sums(k,pr) / ngp_2dh_s_inner(k,0)
+             ENDIF
+          ENDDO
+
+       ENDIF
+
+
+    END SUBROUTINE calc_mean_profile
+
+ END MODULE calc_mean_profile_mod
Index: /palm/tags/release-6.0/SOURCE/check_for_restart.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/check_for_restart.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/check_for_restart.f90	(revision 3477)
@@ -0,0 +1,304 @@
+!> @file check_for_restart.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2298 2017-06-29 09:28:18Z raasch
+! type of write_binary changed from CHARACTER to LOGICAL
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! check accounts for nesting mode now
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1509 2014-12-16 08:56:46Z heinze
+! bugfix: prevent infinite loop in case of automatic restarts
+!
+! 1468 2014-09-24 14:06:57Z maronga
+! Added support for unscheduled job termination using the flag files
+! DO_STOP_NOW and DO_RESTART_NOW
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1032 2012-10-21 13:03:21Z letzel
+! minor reformatting
+!
+! Revision 1.1  1998/03/18 20:06:51  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Set stop flag, if restart is neccessary because of expiring cpu-time or
+!> if it is forced by user
+!------------------------------------------------------------------------------!
+ SUBROUTINE check_for_restart
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_mode, dt_restart, end_time, message_string,            &
+               run_description_header, simulated_time, terminate_coupled,      &
+               terminate_coupled_remote, terminate_run,                        &
+               termination_time_needed, time_restart,                          &
+               time_since_reference_point, write_binary
+
+    USE kinds
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  comm_world_nesting, cpl_id, nested_run
+
+    IMPLICIT NONE
+
+    INTEGER ::  global_communicator       !< global communicator to be used here
+
+    LOGICAL ::  terminate_run_l           !<
+    LOGICAL ::  do_stop_now = .FALSE.     !<
+    LOGICAL ::  do_restart_now = .FALSE.  !<
+
+    REAL(wp) ::  remaining_time !<
+
+
+!
+!-- Check remaining CPU-time
+    CALL local_tremain( remaining_time )
+
+!
+!-- If necessary set a flag to stop the model run
+    terminate_run_l = .FALSE.
+    IF ( remaining_time <= termination_time_needed  .AND.  write_binary )  THEN
+
+       terminate_run_l = .TRUE.
+    ENDIF
+
+!
+!-- Set the global communicator to be used (depends on the mode in which PALM is
+!-- running)
+    IF ( nested_run )  THEN
+       global_communicator = comm_world_nesting
+    ELSE
+       global_communicator = comm2d
+    ENDIF
+
+#if defined( __parallel )
+!
+!-- Make a logical OR for all processes. Stop the model run if at least
+!-- one process has reached the time limit.
+    IF ( collective_wait )  CALL MPI_BARRIER( global_communicator, ierr )
+    CALL MPI_ALLREDUCE( terminate_run_l, terminate_run, 1, MPI_LOGICAL,     &
+                        MPI_LOR, global_communicator, ierr )
+#else
+    terminate_run = terminate_run_l
+#endif
+
+!
+!-- Output that job will be terminated
+    IF ( terminate_run  .AND.  myid == 0 )  THEN
+       WRITE( message_string, * ) 'run will be terminated because it is ',     &
+                       'running out of job cpu limit & ',                      &
+                       'remaining time:         ', remaining_time, ' s &',     &
+                       'termination time needed:', termination_time_needed, ' s'
+       CALL message( 'check_for_restart', 'PA0163', 0, 1, 0, 6, 0 )
+    ENDIF
+
+!
+!-- In case of coupled runs inform the remote model of the termination 
+!-- and its reason, provided the remote model has not already been 
+!-- informed of another termination reason (terminate_coupled > 0) before, 
+!-- or vice versa (terminate_coupled_remote > 0).
+    IF ( terminate_run .AND. TRIM( coupling_mode ) /= 'uncoupled'  .AND.       &
+         terminate_coupled == 0  .AND.  terminate_coupled_remote == 0 )  THEN
+
+       terminate_coupled = 3
+
+#if defined( __parallel )
+       IF ( myid == 0 ) THEN
+          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,         &
+                             target_id, 0,                                     &
+                             terminate_coupled_remote, 1, MPI_INTEGER,         &
+                             target_id, 0,                                     &
+                             comm_inter, status, ierr )
+       ENDIF
+       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d,    &
+                       ierr )
+#endif
+    ENDIF
+
+
+!
+!-- Check if a flag file exists that forces a termination of the model
+    IF ( myid == 0 )  THEN
+       INQUIRE(FILE="DO_STOP_NOW", EXIST=do_stop_now)
+       INQUIRE(FILE="DO_RESTART_NOW", EXIST=do_restart_now)
+
+       IF ( do_stop_now .OR. do_restart_now )  THEN
+
+          terminate_run_l = .TRUE.
+
+          WRITE( message_string, * ) 'run will be terminated because user ',   &
+                                  'forced a job finalization using a flag',    &
+                                  'file:',                                     &
+                                  '&DO_STOP_NOW: ', do_stop_now,               &
+                                  '&DO_RESTART_NOW: ', do_restart_now 
+          CALL message( 'check_for_restart', 'PA0398', 0, 0, 0, 6, 0 )
+
+       ENDIF
+    ENDIF
+
+
+#if defined( __parallel )
+!
+!-- Make a logical OR for all processes. Stop the model run if a flag file has
+!-- been detected above.
+    IF ( collective_wait )  CALL MPI_BARRIER( global_communicator, ierr )
+    CALL MPI_ALLREDUCE( terminate_run_l, terminate_run, 1, MPI_LOGICAL,        &
+                        MPI_LOR, global_communicator, ierr )
+#else
+    terminate_run = terminate_run_l
+#endif
+
+!
+!-- In case of coupled runs inform the remote model of the termination 
+!-- and its reason, provided the remote model has not already been 
+!-- informed of another termination reason (terminate_coupled > 0) before,
+!-- or vice versa (terminate_coupled_remote > 0).
+    IF ( terminate_run .AND. coupling_mode /= 'uncoupled' .AND.                &
+         terminate_coupled == 0 .AND.  terminate_coupled_remote == 0 )  THEN
+
+       terminate_coupled = 6
+
+#if defined( __parallel )
+       IF ( myid == 0 ) THEN
+          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,      &
+                             target_id,  0,                                 &
+                             terminate_coupled_remote, 1, MPI_INTEGER,      &
+                             target_id,  0,                                 &
+                             comm_inter, status, ierr )   
+       ENDIF
+       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0,         &
+                       comm2d, ierr )  
+#endif
+
+    ENDIF
+
+!
+!-- Set the stop flag also, if restart is forced by user settings
+    IF ( time_restart /= 9999999.9_wp  .AND.                                   &
+         time_restart < time_since_reference_point )  THEN
+
+!
+!--    Restart is not neccessary, if the end time of the run (given by
+!--    the user) has been reached
+       IF ( simulated_time < end_time )  THEN
+          terminate_run = .TRUE.
+!
+!--       Increment restart time, if forced by user, otherwise set restart
+!--       time to default (no user restart)
+          IF ( dt_restart /= 9999999.9_wp )  THEN
+             time_restart = time_restart + dt_restart
+          ELSE
+             time_restart = 9999999.9_wp
+          ENDIF
+
+          WRITE( message_string, * ) 'run will be terminated due to user ',    &
+                                  'settings of ',                              &
+                                  'restart_time / dt_restart, ',               &
+                                  'new restart time is: ', time_restart, ' s' 
+          CALL message( 'check_for_restart', 'PA0164', 0, 0, 0, 6, 0 )
+ 
+!
+!--       In case of coupled runs inform the remote model of the termination 
+!--       and its reason, provided the remote model has not already been 
+!--       informed of another termination reason (terminate_coupled > 0) before,
+!--       or vice versa (terminate_coupled_remote > 0).
+          IF ( coupling_mode /= 'uncoupled' .AND. terminate_coupled == 0       &
+               .AND.  terminate_coupled_remote == 0 )  THEN
+
+             IF ( dt_restart /= 9999999.9_wp )  THEN
+                terminate_coupled = 4
+             ELSE
+                terminate_coupled = 5
+             ENDIF
+#if defined( __parallel )
+             IF ( myid == 0 ) THEN
+                CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,   &
+                                   target_id,  0,                              &
+                                   terminate_coupled_remote, 1, MPI_INTEGER,   &
+                                   target_id,  0,                              &
+                                   comm_inter, status, ierr )   
+             ENDIF
+             CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0,      &
+                             comm2d, ierr )  
+#endif
+          ENDIF
+       ELSE
+          time_restart = 9999999.9_wp
+       ENDIF
+    ENDIF
+
+!
+!-- If the run is stopped, set a flag file which is necessary to initiate
+!-- the start of a continuation run, except if the user forced to stop the
+!-- run without restart
+    IF ( terminate_run  .AND.  myid == 0  .AND.  cpl_id == 1  .AND.            &
+         .NOT. do_stop_now)  THEN
+
+       OPEN ( 90, FILE='CONTINUE_RUN', FORM='FORMATTED' )
+       WRITE ( 90, '(A)' )  TRIM( run_description_header )
+       CLOSE ( 90 )
+
+    ENDIF
+
+
+ END SUBROUTINE check_for_restart
Index: /palm/tags/release-6.0/SOURCE/check_open.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/check_open.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/check_open.f90	(revision 3477)
@@ -0,0 +1,1275 @@
+!> @file check_open.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Open files for surface data
+! 
+! 3399 2018-10-22 20:13:45Z gronemeier
+! unused variables and format statements removed
+! 
+! 3159 2018-07-20 11:20:01Z sward
+! Added multi agent system
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Output case 108 disabled
+! 
+! 2964 2018-04-12 16:04:03Z Giersch
+! Error message moved to radiation_model_mod
+! 
+! 2957 2018-04-11 08:48:06Z Giersch
+! Error message has been corrected in case of writing sky view factors
+! 
+! 2906 2018-03-19 08:56:40Z Giersch
+! CASE 88 and 89 has been added for the input/output of sky view factors
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2669 2017-12-06 16:03:27Z raasch
+! file name extension for masked data files is changed to "_M##" and is now
+! appended at the end of the filename,
+! file ids not used any more have been removed
+! 
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! upper bounds of cross section and 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! iso2d-related parts removed
+! 
+! 2300 2017-06-29 13:31:14Z raasch
+! -host
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! -return_addres, return_username, avs_coor_file_..., avs_data_file_...,
+! cross_ts_numbers, cross_ts_number_count
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2063 2016-11-10 17:14:35Z raasch
+! bugfix: opening of PROGRESS file moved out of the NetCDF block
+!
+! 2040 2016-10-26 16:58:09Z gronemeier
+! Removed open of file 'PLOTTS_DATA' ( CASE(50:59) ) as it is no longer needed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1988 2016-08-10 14:49:06Z gronemeier
+! informative message added if files cannot be opened in newly created directory
+! 
+! 1986 2016-08-10 14:07:17Z gronemeier
+! Bugfix: check if output can be opened in newly created directory. If not
+! wait one second and try again.
+! 
+! 1974 2016-07-26 08:43:25Z gronemeier
+! Bugfix: MPI barriers after deleting non-extendable files must only be called
+! in case of parallel I/O
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! flight module added
+!
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! coupling_char is trimmed at every place it occurs, because it can have
+! different length now
+!
+! 1745 2016-02-05 13:06:51Z gronemeier
+! Bugfix: added MPI barrier after deleting existing non-extendable file by PE0
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Removed redundant output for combine_plot_fields
+! 
+! 1468 2014-09-24 14:06:57Z maronga
+! Adapted for use on up to 6-digit processor cores
+! Added file unit 117 (PROGRESS)
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! Format of particle exchange statistics extended to reasonable numbers of      
+! particles.
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute,
+! declaration for unused variables xkoor, ykoor, zkoor removed
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! parts concerning iso2d and avs output removed
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! array_kind renamed precision_kind
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented,
+! opening of netCDF files are done by new routines create_netcdf_file and
+! open_write_netcdf_file
+!
+! 964 2012-07-26 09:14:24Z raasch
+! old profil-units (40:49) removed,
+! append feature removed from unit 14
+!
+! 849 2012-03-15 10:35:09Z raasch
+! comment changed
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! Revision 1.1  1997/08/11 06:10:55  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Check if file unit is open. If not, open file and, if necessary, write a
+!> header or start other initializing actions, respectively.
+!------------------------------------------------------------------------------!
+SUBROUTINE check_open( file_id )
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_char, data_output_2d_on_each_pe,                       &
+               max_masks, message_string, mid, nz_do3d, openfile,              &
+               run_description_header
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxr, ny, nyn, nys, nz, nzb, nzt
+
+    USE kinds
+
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_interface,                                                      &
+        ONLY:  id_set_agt, id_set_fl, id_set_mask, id_set_pr,                  &
+               id_set_pts, id_set_sp, id_set_ts, id_set_xy, id_set_xz,         &
+               id_set_yz, id_set_3d, nc_stat, netcdf_create_file,              &
+               netcdf_data_format, netcdf_define_header, netcdf_handle_error,  &
+               netcdf_open_write_file
+
+    USE particle_attributes,                                                   &
+        ONLY:  max_number_of_particle_groups, number_of_particle_groups,       &
+               particle_groups
+
+    USE pegrid
+
+    USE posix_calls_from_fortran,                                              &
+        ONLY:  fortran_sleep
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=4)   ::  mask_char               !<
+    CHARACTER (LEN=30)  ::  filename                !<
+    CHARACTER (LEN=80)  ::  rtext                   !<
+
+    INTEGER(iwp) ::  av          !<
+    INTEGER(iwp) ::  file_id     !<
+    INTEGER(iwp) ::  ioerr       !< IOSTAT flag for IO-commands ( 0 = no error )
+    
+    LOGICAL ::  netcdf_extend    !<
+
+!
+!-- Immediate return if file already open
+    IF ( openfile(file_id)%opened )  RETURN
+
+!
+!-- Only certain files are allowed to be re-opened
+!-- NOTE: some of the other files perhaps also could be re-opened, but it
+!--       has not been checked so far, if it works!
+    IF ( openfile(file_id)%opened_before )  THEN
+       SELECT CASE ( file_id )
+          CASE ( 13, 14, 21, 22, 23, 80, 85, 117 )
+             IF ( file_id == 14 .AND. openfile(file_id)%opened_before )  THEN
+                message_string = 're-open of unit ' //                         &
+                                 '14 is not verified. Please check results!'
+                CALL message( 'check_open', 'PA0165', 0, 1, 0, 6, 0 )       
+             ENDIF
+
+          CASE DEFAULT
+             WRITE( message_string, * ) 're-opening of file-id ', file_id,     &
+                                        ' is not allowed'
+             CALL message( 'check_open', 'PA0166', 0, 1, 0, 6, 0 )    
+               
+             RETURN
+
+       END SELECT
+    ENDIF
+
+!
+!-- Check if file may be opened on the relevant PE
+    SELECT CASE ( file_id )
+
+       CASE ( 15, 16, 17, 18, 19, 50:59, 104:105, 107, 109, 117 )
+      
+          IF ( myid /= 0 )  THEN
+             WRITE( message_string, * ) 'opening file-id ',file_id,            &
+                                        ' not allowed for PE ',myid
+             CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
+          ENDIF
+
+       CASE ( 101:103, 106, 111:113, 116, 201:200+2*max_masks )
+
+          IF ( netcdf_data_format < 5 )  THEN
+          
+             IF ( myid /= 0 )  THEN
+                WRITE( message_string, * ) 'opening file-id ',file_id,         &
+                                           ' not allowed for PE ',myid
+                CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
+             ENDIF
+     
+          ENDIF
+
+       CASE ( 21, 22, 23 )
+
+          IF ( .NOT.  data_output_2d_on_each_pe )  THEN
+             IF ( myid /= 0 )  THEN
+                WRITE( message_string, * ) 'opening file-id ',file_id,         &
+                                           ' not allowed for PE ',myid
+                CALL message( 'check_open', 'PA0167', 2, 2, -1, 6, 1 )
+             END IF
+          ENDIF
+
+       CASE ( 90:99 )
+
+!
+!--       File-ids that are used temporarily in other routines
+          WRITE( message_string, * ) 'opening file-id ',file_id,               &
+                                    ' is not allowed since it is used otherwise'
+          CALL message( 'check_open', 'PA0168', 0, 1, 0, 6, 0 ) 
+          
+    END SELECT
+
+!
+!-- Open relevant files
+    SELECT CASE ( file_id )
+
+       CASE ( 11 )
+
+          OPEN ( 11, FILE='PARIN'//TRIM( coupling_char ), FORM='FORMATTED',    &
+                     STATUS='OLD' )
+
+       CASE ( 13 )
+
+          IF ( myid_char == '' )  THEN
+             OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//myid_char,        &
+                        FORM='UNFORMATTED', STATUS='OLD' )
+          ELSE
+!
+!--          First opening of unit 13 openes file _000000 on all PEs because
+!--          only this file contains the global variables
+             IF ( .NOT. openfile(file_id)%opened_before )  THEN
+                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/_000000',    &
+                           FORM='UNFORMATTED', STATUS='OLD' )
+             ELSE
+                OPEN ( 13, FILE='BININ'//TRIM( coupling_char )//'/'//          &
+                           myid_char, FORM='UNFORMATTED', STATUS='OLD' )
+             ENDIF
+          ENDIF
+
+       CASE ( 14 )
+
+          IF ( myid_char == '' )  THEN
+             OPEN ( 14, FILE='BINOUT'//TRIM( coupling_char )//myid_char,       &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ELSE
+             IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before )  THEN
+                CALL local_system( 'mkdir  BINOUT' // TRIM( coupling_char ) )
+             ENDIF
+#if defined( __parallel )
+!
+!--          Set a barrier in order to allow that all other processors in the 
+!--          directory created by PE0 can open their file
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ioerr = 1
+             DO WHILE ( ioerr /= 0 )
+                OPEN ( 14, FILE='BINOUT'//TRIM(coupling_char)//'/'//myid_char, &
+                           FORM='UNFORMATTED', IOSTAT=ioerr )
+                IF ( ioerr /= 0 )  THEN
+                   WRITE( 9, * )  '*** could not open "BINOUT'//         &
+                                  TRIM(coupling_char)//'/'//myid_char//  &
+                                  '"! Trying again in 1 sec.'
+                   CALL fortran_sleep( 1 )
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+       CASE ( 15 )
+
+          OPEN ( 15, FILE='RUN_CONTROL'//TRIM( coupling_char ),                &
+                     FORM='FORMATTED' )
+
+       CASE ( 16 )
+
+          OPEN ( 16, FILE='LIST_PROFIL'//TRIM( coupling_char ),                &
+                     FORM='FORMATTED' )
+
+       CASE ( 17 )
+
+          OPEN ( 17, FILE='LIST_PROFIL_1D'//TRIM( coupling_char ),             &
+                     FORM='FORMATTED' )
+
+       CASE ( 18 )
+
+          OPEN ( 18, FILE='CPU_MEASURES'//TRIM( coupling_char ),               &
+                     FORM='FORMATTED' )
+
+       CASE ( 19 )
+
+          OPEN ( 19, FILE='HEADER'//TRIM( coupling_char ), FORM='FORMATTED' )
+
+       CASE ( 20 )
+
+          IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before )  THEN
+             CALL local_system( 'mkdir  DATA_LOG' // TRIM( coupling_char ) )
+          ENDIF
+          IF ( myid_char == '' )  THEN
+             OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/_000000',    &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ELSE
+#if defined( __parallel )
+!
+!--          Set a barrier in order to allow that all other processors in the 
+!--          directory created by PE0 can open their file
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ioerr = 1
+             DO WHILE ( ioerr /= 0 )
+                OPEN ( 20, FILE='DATA_LOG'//TRIM( coupling_char )//'/'//       &
+                           myid_char, FORM='UNFORMATTED', POSITION='APPEND',   &
+                           IOSTAT=ioerr )
+                IF ( ioerr /= 0 )  THEN
+                   WRITE( 9, * )  '*** could not open "DATA_LOG'//         &
+                                  TRIM( coupling_char )//'/'//myid_char//  &
+                                  '"! Trying again in 1 sec.'
+                   CALL fortran_sleep( 1 )
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+       CASE ( 21 )
+
+          IF ( data_output_2d_on_each_pe )  THEN
+             OPEN ( 21, FILE='PLOT2D_XY'//TRIM( coupling_char )//myid_char,    &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ELSE
+             OPEN ( 21, FILE='PLOT2D_XY'//TRIM( coupling_char ),                       &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ENDIF
+
+          IF ( myid == 0  .AND.  .NOT. openfile(file_id)%opened_before )  THEN
+!
+!--          Write index bounds of total domain for combine_plot_fields
+             IF ( data_output_2d_on_each_pe  .AND.  myid_char /= '' )  THEN
+                WRITE (21)   0, nx,  0, ny
+             ENDIF
+
+          ENDIF
+
+       CASE ( 22 )
+
+          IF ( data_output_2d_on_each_pe )  THEN
+             OPEN ( 22, FILE='PLOT2D_XZ'//TRIM( coupling_char )//myid_char,    &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ELSE
+             OPEN ( 22, FILE='PLOT2D_XZ'//TRIM( coupling_char ),               &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ENDIF
+
+          IF ( myid == 0  .AND.  .NOT. openfile(file_id)%opened_before )  THEN
+!
+!--          Write index bounds of total domain for combine_plot_fields
+             IF ( data_output_2d_on_each_pe  .AND.  myid_char /= '' )  THEN
+                WRITE (22)   0, nx, 0, nz+1    ! output part
+             ENDIF
+
+          ENDIF
+
+       CASE ( 23 )
+
+          IF ( data_output_2d_on_each_pe )  THEN
+             OPEN ( 23, FILE='PLOT2D_YZ'//TRIM( coupling_char )//myid_char,    &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ELSE
+             OPEN ( 23, FILE='PLOT2D_YZ'//TRIM( coupling_char ),               &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ENDIF
+
+          IF ( myid == 0  .AND.  .NOT. openfile(file_id)%opened_before )  THEN
+!
+!--          Write index bounds of total domain for combine_plot_fields
+             IF ( data_output_2d_on_each_pe  .AND.  myid_char /= '' )  THEN
+                WRITE (23)   0, ny, 0, nz+1    ! output part
+             ENDIF
+
+          ENDIF
+          
+       CASE ( 25 )
+!
+!--       Binary files for surface data
+          OPEN ( 25, FILE='SURFACE_DATA_BIN'//TRIM( coupling_char )//myid_char,  &
+                 FORM='UNFORMATTED', POSITION='APPEND' )
+
+       CASE ( 26 )
+!
+!--       Binary files for averaged surface data
+          OPEN ( 26, FILE='SURFACE_DATA_AV_BIN'//TRIM( coupling_char )//myid_char,  &
+                 FORM='UNFORMATTED', POSITION='APPEND' )
+       
+
+       CASE ( 30 )
+
+          OPEN ( 30, FILE='PLOT3D_DATA'//TRIM( coupling_char )//myid_char,     &
+                     FORM='UNFORMATTED' )
+!
+!--       Specifications for combine_plot_fields
+          IF ( myid == 0 )  THEN
+#if defined( __parallel )
+             WRITE ( 30 )  0, nx, 0, ny, 0, nz_do3d
+#endif
+          ENDIF
+
+       CASE ( 80 )
+
+          IF ( myid_char == '' )  THEN
+             OPEN ( 80, FILE='PARTICLE_INFOS'//TRIM(coupling_char)//myid_char, &
+                        FORM='FORMATTED', POSITION='APPEND' )
+          ELSE
+             IF ( myid == 0  .AND.  .NOT. openfile(80)%opened_before )  THEN
+                CALL local_system( 'mkdir  PARTICLE_INFOS' //                  &
+                                   TRIM( coupling_char ) )
+             ENDIF
+#if defined( __parallel )
+!
+!--          Set a barrier in order to allow that thereafter all other
+!--          processors in the directory created by PE0 can open their file.
+!--          WARNING: The following barrier will lead to hanging jobs, if
+!--                   check_open is first called from routine
+!--                   allocate_prt_memory!
+             IF ( .NOT. openfile(80)%opened_before )  THEN
+                CALL MPI_BARRIER( comm2d, ierr )
+             ENDIF
+#endif
+             OPEN ( 80, FILE='PARTICLE_INFOS'//TRIM( coupling_char )//'/'//    &
+                             myid_char,                                        &
+                        FORM='FORMATTED', POSITION='APPEND' )
+          ENDIF
+
+          IF ( .NOT. openfile(80)%opened_before )  THEN
+             WRITE ( 80, 8000 )  TRIM( run_description_header )
+          ENDIF
+
+       CASE ( 85 )
+
+          IF ( myid_char == '' )  THEN
+             OPEN ( 85, FILE='PARTICLE_DATA'//TRIM(coupling_char)//myid_char,  &
+                        FORM='UNFORMATTED', POSITION='APPEND' )
+          ELSE
+             IF ( myid == 0  .AND.  .NOT. openfile(85)%opened_before )  THEN
+                CALL local_system( 'mkdir  PARTICLE_DATA' //                   &
+                                   TRIM( coupling_char ) )
+             ENDIF
+#if defined( __parallel )
+!
+!--          Set a barrier in order to allow that thereafter all other
+!--          processors in the directory created by PE0 can open their file
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ioerr = 1
+             DO WHILE ( ioerr /= 0 )
+                OPEN ( 85, FILE='PARTICLE_DATA'//TRIM( coupling_char )//'/'//  &
+                           myid_char,                                          &
+                           FORM='UNFORMATTED', POSITION='APPEND', IOSTAT=ioerr )
+                IF ( ioerr /= 0 )  THEN
+                   WRITE( 9, * )  '*** could not open "PARTICLE_DATA'//        &
+                                  TRIM( coupling_char )//'/'//myid_char//      &
+                                  '"! Trying again in 1 sec.'
+                   CALL fortran_sleep( 1 )
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+          IF ( .NOT. openfile(85)%opened_before )  THEN
+             WRITE ( 85 )  run_description_header
+!
+!--          Attention: change version number whenever the output format on
+!--                     unit 85 is changed (see also in routine
+!--                     lpm_data_output_particles)
+             rtext = 'data format version 3.1'
+             WRITE ( 85 )  rtext
+             WRITE ( 85 )  number_of_particle_groups,                          &
+                           max_number_of_particle_groups
+             WRITE ( 85 )  particle_groups
+             WRITE ( 85 )  nxl, nxr, nys, nyn, nzb, nzt, nbgp
+          ENDIF
+
+!
+!--    File where sky-view factors and further required data is stored will be 
+!--    read
+       CASE ( 88 )
+
+          IF ( myid_char == '' )  THEN
+             OPEN ( 88, FILE='SVFIN'//TRIM( coupling_char )//myid_char,        &
+                        FORM='UNFORMATTED', STATUS='OLD', IOSTAT=ioerr )
+          ELSE
+
+             OPEN ( 88, FILE='SVFIN'//TRIM( coupling_char )//'/'//myid_char,   &
+                        FORM='UNFORMATTED', STATUS='OLD', IOSTAT=ioerr )
+          ENDIF
+
+!
+!--    File where sky-view factors and further required data is stored will be
+!--    created
+       CASE ( 89 )
+
+          IF ( myid_char == '' )  THEN
+             OPEN ( 89, FILE='SVFOUT'//TRIM( coupling_char )//myid_char,       &
+                        FORM='UNFORMATTED', STATUS='NEW' )
+          ELSE
+             IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before )  THEN
+                CALL local_system( 'mkdir  SVFOUT' // TRIM( coupling_char ) )
+             ENDIF
+#if defined( __parallel )
+!
+!--          Set a barrier in order to allow that all other processors in the 
+!--          directory created by PE0 can open their file
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ioerr = 1
+             DO WHILE ( ioerr /= 0 )
+                OPEN ( 89, FILE='SVFOUT'//TRIM(coupling_char)//'/'//myid_char, &
+                           FORM='UNFORMATTED', STATUS='NEW', IOSTAT=ioerr )
+                IF ( ioerr /= 0 )  THEN
+                   WRITE( 9, * )  '*** could not open "SVFOUT'//               &
+                                  TRIM(coupling_char)//'/'//myid_char//        &
+                                  '"! Trying again in 1 sec.'
+                   CALL fortran_sleep( 1 )
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+!
+!--    Progress file that is used by the PALM watchdog
+       CASE ( 117 )
+
+          OPEN ( 117, FILE='PROGRESS'//TRIM( coupling_char ),                  &
+                      STATUS='REPLACE', FORM='FORMATTED' )
+
+#if defined( __netcdf )
+       CASE ( 101, 111 )
+!
+!--       Set filename depending on unit number
+          IF ( file_id == 101 )  THEN
+             filename = 'DATA_2D_XY_NETCDF' // TRIM( coupling_char )
+             av = 0
+          ELSE
+             filename = 'DATA_2D_XY_AV_NETCDF' // TRIM( coupling_char )
+             av = 1
+          ENDIF
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its dimensions and variables match the
+!--       actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_xy(av), .TRUE., 20 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'xy', netcdf_extend, av )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_xy(av) )
+                CALL netcdf_handle_error( 'check_open', 21 )
+                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
+#if defined( __parallel )
+!
+!--             Set a barrier in order to assure that PE0 deleted the old file
+!--             before any other processor tries to open a new file.
+!--             Barrier is only needed in case of parallel I/O
+                IF ( netcdf_data_format > 4 )  CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ENDIF
+
+          ENDIF
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_xy(av), .TRUE., 22 )
+
+!
+!--          Define the header
+             CALL netcdf_define_header( 'xy', netcdf_extend, av )
+
+!
+!--          In case of parallel netCDF output, create flag file which tells
+!--          combine_plot_fields that nothing is to do.
+             IF ( myid == 0  .AND.  netcdf_data_format > 4 )  THEN
+                OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_XY' )
+                WRITE ( 99, '(A)' )  'no combine_plot_fields.x neccessary'
+                CLOSE( 99 )
+             ENDIF
+
+          ENDIF
+
+       CASE ( 102, 112 )
+!
+!--       Set filename depending on unit number
+          IF ( file_id == 102 )  THEN
+             filename = 'DATA_2D_XZ_NETCDF' // TRIM( coupling_char )
+             av = 0
+          ELSE
+             filename = 'DATA_2D_XZ_AV_NETCDF' // TRIM( coupling_char )
+             av = 1
+          ENDIF
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its dimensions and variables match the
+!--       actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_xz(av), .TRUE., 23 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'xz', netcdf_extend, av )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_xz(av) )
+                CALL netcdf_handle_error( 'check_open', 24 )
+                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
+#if defined( __parallel )
+!
+!--             Set a barrier in order to assure that PE0 deleted the old file
+!--             before any other processor tries to open a new file
+!--             Barrier is only needed in case of parallel I/O
+                IF ( netcdf_data_format > 4 )  CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ENDIF
+
+          ENDIF
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_xz(av), .TRUE., 25 )
+
+!
+!--          Define the header
+             CALL netcdf_define_header( 'xz', netcdf_extend, av )
+
+!
+!--          In case of parallel netCDF output, create flag file which tells
+!--          combine_plot_fields that nothing is to do.
+             IF ( myid == 0  .AND.  netcdf_data_format > 4 )  THEN
+                OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_XZ' )
+                WRITE ( 99, '(A)' )  'no combine_plot_fields.x neccessary'
+                CLOSE( 99 )
+             ENDIF
+
+          ENDIF
+
+       CASE ( 103, 113 )
+!
+!--       Set filename depending on unit number
+          IF ( file_id == 103 )  THEN
+             filename = 'DATA_2D_YZ_NETCDF' // TRIM( coupling_char )
+             av = 0
+          ELSE
+             filename = 'DATA_2D_YZ_AV_NETCDF' // TRIM( coupling_char )
+             av = 1
+          ENDIF
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its dimensions and variables match the
+!--       actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_yz(av), .TRUE., 26 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'yz', netcdf_extend, av )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_yz(av) )
+                CALL netcdf_handle_error( 'check_open', 27 )
+                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
+#if defined( __parallel )
+!
+!--             Set a barrier in order to assure that PE0 deleted the old file
+!--             before any other processor tries to open a new file
+!--             Barrier is only needed in case of parallel I/O
+                IF ( netcdf_data_format > 4 )  CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ENDIF
+
+          ENDIF
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_yz(av), .TRUE., 28 )
+
+!
+!--          Define the header
+             CALL netcdf_define_header( 'yz', netcdf_extend, av )
+
+!
+!--          In case of parallel netCDF output, create flag file which tells
+!--          combine_plot_fields that nothing is to do.
+             IF ( myid == 0  .AND.  netcdf_data_format > 4 )  THEN
+                OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_YZ' )
+                WRITE ( 99, '(A)' )  'no combine_plot_fields.x neccessary'
+                CLOSE( 99 )
+             ENDIF
+
+          ENDIF
+
+       CASE ( 104 )
+!
+!--       Set filename
+          filename = 'DATA_1D_PR_NETCDF' // TRIM( coupling_char )
+
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_pr, .FALSE., 29 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'pr', netcdf_extend, 0 )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_pr )
+                CALL netcdf_handle_error( 'check_open', 30 )
+                CALL local_system( 'rm ' // TRIM( filename ) )
+             ENDIF
+
+          ENDIF          
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_pr, .FALSE., 31 )
+!
+!--          Define the header
+             CALL netcdf_define_header( 'pr', netcdf_extend, 0 )
+
+          ENDIF
+
+       CASE ( 105 )
+!
+!--       Set filename
+          filename = 'DATA_1D_TS_NETCDF' // TRIM( coupling_char )
+
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_ts, .FALSE., 32 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'ts', netcdf_extend, 0 )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_ts )
+                CALL netcdf_handle_error( 'check_open', 33 )
+                CALL local_system( 'rm ' // TRIM( filename ) )
+             ENDIF
+
+          ENDIF          
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_ts, .FALSE., 34 )
+!
+!--          Define the header
+             CALL netcdf_define_header( 'ts', netcdf_extend, 0 )
+
+          ENDIF
+
+
+       CASE ( 106, 116 )
+!
+!--       Set filename depending on unit number
+          IF ( file_id == 106 )  THEN
+             filename = 'DATA_3D_NETCDF' // TRIM( coupling_char )
+             av = 0
+          ELSE
+             filename = 'DATA_3D_AV_NETCDF' // TRIM( coupling_char )
+             av = 1
+          ENDIF
+!
+!--       Inquire, if there is a netCDF file from a previous run. This should
+!--       be opened for extension, if its dimensions and variables match the
+!--       actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_3d(av), .TRUE., 35 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( '3d', netcdf_extend, av )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_3d(av) )
+                CALL netcdf_handle_error( 'check_open', 36 )
+                IF ( myid == 0 )  CALL local_system( 'rm ' // TRIM( filename ) )
+#if defined( __parallel )
+!
+!--             Set a barrier in order to assure that PE0 deleted the old file
+!--             before any other processor tries to open a new file
+!--             Barrier is only needed in case of parallel I/O
+                IF ( netcdf_data_format > 4 )  CALL MPI_BARRIER( comm2d, ierr )
+#endif
+             ENDIF
+
+          ENDIF
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_3d(av), .TRUE., 37 )
+
+!
+!--          Define the header
+             CALL netcdf_define_header( '3d', netcdf_extend, av )
+
+!
+!--          In case of parallel netCDF output, create flag file which tells
+!--          combine_plot_fields that nothing is to do.
+             IF ( myid == 0  .AND.  netcdf_data_format > 4 )  THEN
+                OPEN( 99, FILE='NO_COMBINE_PLOT_FIELDS_3D' )
+                WRITE ( 99, '(A)' )  'no combine_plot_fields.x neccessary'
+                CLOSE( 99 )
+             ENDIF
+
+          ENDIF
+
+
+       CASE ( 107 )
+!
+!--       Set filename
+          filename = 'DATA_1D_SP_NETCDF' // TRIM( coupling_char )
+
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_sp, .FALSE., 38 )
+
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'sp', netcdf_extend, 0 )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_sp )
+                CALL netcdf_handle_error( 'check_open', 39 )
+                CALL local_system( 'rm ' // TRIM( filename ) )
+             ENDIF
+
+          ENDIF          
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_sp, .FALSE., 40 )
+!
+!--          Define the header
+             CALL netcdf_define_header( 'sp', netcdf_extend, 0 )
+
+          ENDIF
+
+!
+!--     Currently disabled
+!       CASE ( 108 )
+
+!          IF ( myid_char == '' )  THEN
+!             filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char )
+!          ELSE
+!             filename = 'DATA_PRT_NETCDF' // TRIM( coupling_char ) // '/' //   &
+!                        myid_char
+!          ENDIF
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+!          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+!          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+!             CALL netcdf_open_write_file( filename, id_set_prt, .FALSE., 41 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+!             CALL netcdf_define_header( 'pt', netcdf_extend, 0 )
+
+!
+!--          Remove the local file, if it can not be extended
+!             IF ( .NOT. netcdf_extend )  THEN
+!                nc_stat = NF90_CLOSE( id_set_prt )
+!                CALL netcdf_handle_error( 'check_open', 42 )
+!                CALL local_system( 'rm ' // TRIM( filename ) )
+!             ENDIF
+
+!          ENDIF          
+
+!          IF ( .NOT. netcdf_extend )  THEN
+
+!
+!--          For runs on multiple processors create the subdirectory
+!             IF ( myid_char /= '' )  THEN
+!                IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before )  &
+!                THEN    ! needs modification in case of non-extendable sets
+!                   CALL local_system( 'mkdir  DATA_PRT_NETCDF' //              &
+!                                       TRIM( coupling_char ) // '/' )
+!                ENDIF
+#if defined( __parallel )
+! 
+!--             Set a barrier in order to allow that all other processors in the
+!--             directory created by PE0 can open their file
+!                CALL MPI_BARRIER( comm2d, ierr )
+#endif
+!             ENDIF
+
+!
+!--          Create a new netCDF output file with requested netCDF format
+!             CALL netcdf_create_file( filename, id_set_prt, .FALSE., 43 )
+
+!
+!--          Define the header
+!             CALL netcdf_define_header( 'pt', netcdf_extend, 0 )
+
+!          ENDIF
+
+       CASE ( 109 )
+!
+!--       Set filename
+          filename = 'DATA_1D_PTS_NETCDF' // TRIM( coupling_char )
+
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_pts, .FALSE., 393 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'ps', netcdf_extend, 0 )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_pts )
+                CALL netcdf_handle_error( 'check_open', 394 )
+                CALL local_system( 'rm ' // TRIM( filename ) )
+             ENDIF
+
+          ENDIF          
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_pts, .FALSE., 395 )
+!
+!--          Define the header
+             CALL netcdf_define_header( 'ps', netcdf_extend, 0 )
+
+          ENDIF
+
+       CASE ( 118 )
+
+          IF ( myid == 0 )  THEN
+             filename = 'DATA_AGT_NETCDF'
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_agt, .FALSE., 43 )
+
+!
+!--          Define the header
+             CALL netcdf_define_header( 'ag', netcdf_extend, 0 )
+          ENDIF
+
+!           IF ( netcdf_extend )  THEN
+! !
+! !--          Open an existing netCDF file for output
+!              CALL netcdf_open_write_file( filename, id_set_agt, .FALSE., 41 )
+! !
+! !--          Read header information and set all ids. If there is a mismatch
+! !--          between the previuos and the actual run, netcdf_extend is returned
+! !--          as .FALSE.
+!              CALL netcdf_define_header( 'ag', netcdf_extend, 0 )
+! 
+! !
+! !--          Remove the local file, if it can not be extended
+!              IF ( .NOT. netcdf_extend )  THEN
+!                 nc_stat = NF90_CLOSE( id_set_agt )
+!                 CALL netcdf_handle_error( 'check_open', 42 )
+!                 CALL local_system( 'rm ' // TRIM( filename ) )
+!              ENDIF
+! 
+!           ENDIF
+
+          IF ( .NOT. netcdf_extend )  THEN
+
+!
+! !--          For runs on multiple processors create the subdirectory
+!              IF ( myid_char /= '' )  THEN
+!                 IF ( myid == 0  .AND. .NOT. openfile(file_id)%opened_before )  &
+!                 THEN    ! needs modification in case of non-extendable sets
+!                    CALL local_system( 'mkdir  DATA_PRT_NETCDF' //              &
+!                                        TRIM( coupling_char ) // '/' )
+!                 ENDIF
+! #if defined( __parallel )
+! ! 
+! !--             Set a barrier in order to allow that all other processors in the
+! !--             directory created by PE0 can open their file
+!                 CALL MPI_BARRIER( comm2d, ierr )
+! #endif
+!              ENDIF
+
+          ENDIF
+
+
+!
+!--    nc-file for virtual flight measurements
+       CASE ( 199 )
+!
+!--       Set filename
+          filename = 'DATA_1D_FL_NETCDF' // TRIM( coupling_char )
+
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its variables match the actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_fl, .FALSE., 532 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'fl', netcdf_extend, 0 )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_fl )
+                CALL netcdf_handle_error( 'check_open', 533 )
+                CALL local_system( 'rm ' // TRIM( filename ) )
+             ENDIF
+
+          ENDIF          
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_fl, .FALSE., 534 )
+!
+!--          Define the header
+             CALL netcdf_define_header( 'fl', netcdf_extend, 0 )
+
+          ENDIF
+
+
+       CASE ( 201:200+2*max_masks )
+!
+!--       Set filename depending on unit number
+          IF ( file_id <= 200+max_masks )  THEN
+             mid = file_id - 200
+             WRITE ( mask_char,'(A2,I2.2)')  '_M', mid
+             filename = 'DATA_MASK_NETCDF' // TRIM( coupling_char ) //         &
+                        mask_char
+             av = 0
+          ELSE
+             mid = file_id - (200+max_masks)
+             WRITE ( mask_char,'(A2,I2.2)')  '_M', mid
+             filename = 'DATA_MASK_AV_NETCDF' // TRIM( coupling_char ) //      &
+                        mask_char
+             av = 1
+          ENDIF
+!
+!--       Inquire, if there is a netCDF file from a previuos run. This should
+!--       be opened for extension, if its dimensions and variables match the
+!--       actual run.
+          INQUIRE( FILE=filename, EXIST=netcdf_extend )
+
+          IF ( netcdf_extend )  THEN
+!
+!--          Open an existing netCDF file for output
+             CALL netcdf_open_write_file( filename, id_set_mask(mid,av),       &
+                                          .TRUE., 456 )
+!
+!--          Read header information and set all ids. If there is a mismatch
+!--          between the previuos and the actual run, netcdf_extend is returned
+!--          as .FALSE.
+             CALL netcdf_define_header( 'ma', netcdf_extend, file_id )
+
+!
+!--          Remove the local file, if it can not be extended
+             IF ( .NOT. netcdf_extend )  THEN
+                nc_stat = NF90_CLOSE( id_set_mask(mid,av) )
+                CALL netcdf_handle_error( 'check_open', 457 )
+                CALL local_system('rm ' // TRIM( filename ) )
+             ENDIF
+
+          ENDIF          
+
+          IF ( .NOT. netcdf_extend )  THEN
+!
+!--          Create a new netCDF output file with requested netCDF format
+             CALL netcdf_create_file( filename, id_set_mask(mid,av), .TRUE., 458 )
+!
+!--          Define the header
+             CALL netcdf_define_header( 'ma', netcdf_extend, file_id )
+
+          ENDIF
+
+
+#else
+
+       CASE ( 101:109, 111:113, 116, 201:200+2*max_masks )
+
+!
+!--       Nothing is done in case of missing netcdf support
+          RETURN
+
+#endif
+
+       CASE DEFAULT
+
+          WRITE( message_string, * ) 'no OPEN-statement for file-id ',file_id
+          CALL message( 'check_open', 'PA0172', 2, 2, -1, 6, 1 )
+
+    END SELECT
+
+!
+!-- Set open flag
+    openfile(file_id)%opened = .TRUE.
+
+!
+!-- Formats
+8000 FORMAT (A/                                                                &
+             '  step    time    # of parts     lPE sent/recv  rPE sent/recv  ',&
+             'sPE sent/recv  nPE sent/recv    max # of parts  '/               &
+             109('-'))
+
+ END SUBROUTINE check_open
Index: /palm/tags/release-6.0/SOURCE/check_parameters.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/check_parameters.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/check_parameters.f90	(revision 3477)
@@ -0,0 +1,4092 @@
+!> @file check_parameters.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+!
+! 2017-10-10 11:29:14Z monakurppa
+! Implementation of a new aerosol module salsa.
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix: Missing air_chemistry statement for profile check
+! 
+! 3452 2018-10-30 13:13:34Z schwenkel
+! Bugfix for profiles output
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Add biometeorology
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! Add checks for surface data output
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! Remove offline nesting in if clause for pressure top boundary condition
+! 
+! 3343 2018-10-15 10:38:52Z suehring
+! (from branch resler)
+! Add biometeorology,
+! fix for chemistry output,
+! increase of uv_heights dimension
+! 
+! 3312 2018-10-06 14:15:46Z knoop
+! small code rearrangements
+! 
+! 3301 2018-10-02 17:10:50Z gronemeier
+! corrected former revision section
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! - Minor formatting and remarks
+! - Call of chem_emissions_check_parameters commented 
+!   (preliminary, as there is still a bug in this subroutine) (forkel)
+! - Corrected call for chemistry profile output added (basit)
+! - Call for init_vertical_profiles for chemistry removed (basit)
+! - Call for chem_init_profiles removed (basit)
+! - Setting of initial profiles for chemstry (constant and call of 
+!   init_vertical_profiles) commented (forkel)
+!
+! 3294 2018-10-01 raasch
+! changes concerning modularization of ocean option,
+! init_vertical_profiles moved to separate file to avoid circular dependency
+! 
+! 3274 2018-09-24 knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 raasch
+! unused variables removed
+! 
+! 3232 2018-09-07 raasch
+! references to mrun replaced by palmrun, and updated
+! 
+! 3182 2018-07-27 suehring
+! Rename boundary conditions in offline nesting
+! 
+! 3083 2018-06-19 gronemeier
+! Add inital profile output for e (TG)
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by dz(1), error message revised
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! add variable description
+! 
+! 3046 2018-05-29 08:02:15Z Giersch
+! Error messages revised
+!
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3035 2018-05-24 09:35:20Z schwenkel
+! Add option to initialize warm air bubble close to surface
+!
+! 3034 2018-05-24 08:41:20Z raasch
+! bugfix: check that initializing_actions has been set
+!
+! 2980 2018-04-17 15:19:27Z suehring
+! Further improvement for spinup checks.
+! 
+! 2974 2018-04-16 12:59:52Z gronemeier
+! Bugfix: check if dt_data_output_av is zero in case of parallel NetCDF output
+! 
+! 2970 2018-04-13 15:09:23Z suehring
+! Bugfix in old large-scale forcing mode
+! 
+! 2964 2018-04-12 16:04:03Z Giersch
+! Calculation of fixed number of output time levels for parallel netcdf output
+! has been revised (based on calculations in netcdf_interface_mod)
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! - Revise start and end indices for imposing random disturbances in case of
+!   nesting or large-scale forcing.
+! - Remove check for inifor initialization in case of nested runs. 
+! - Adapt call to check for synthetic turbulence geneartor settings.
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! Check spinup in case of nested runs, spinup time and timestep must be 
+! identical to assure synchronuous simulations. 
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed particles_par to particle_parameters
+! 
+! 2918 2018-03-21 15:52:14Z gronemeier
+! Add check for 1D model
+! 
+! 2883 2018-03-14 08:29:10Z Giersch
+! dt_dopr_listing is not set to the default value zero anymore
+! 
+! 2851 2018-03-05 14:39:31Z maronga
+! Bugfix: calculation of output time levels in case of restart runs (parallel
+! NetCDF)
+! 
+! 2836 2018-02-26 13:40:05Z Giersch
+! dt_dopr_listing is set to the default value zero 
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2798 2018-02-09 17:16:39Z suehring
+! Consider also default-type surfaces for surface temperature output. 
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! Enable output of ground-heat flux also at urban surfaces.
+! 
+! 2776 2018-01-31 10:44:42Z Giersch
+! Variable synthetic_turbulence_generator has been abbreviated
+! 
+! 2773 2018-01-30 14:12:54Z suehring
+! Check for consistent initialization in nesting mode added.
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2765 2018-01-22 11:34:58Z maronga
+! Renamed simulation_time_since_reference to 
+! time_to_be_simulated_from_reference_point
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2743 2018-01-12 16:03:39Z suehring
+! In case of natural- and urban-type surfaces output surfaces fluxes in W/m2.
+! 
+! 2742 2018-01-12 14:59:47Z suehring
+! Enable output of surface temperature
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! output of r_a moved from land-surface to consider also urban-type surfaces
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of uv exposure model (FK)
+! + new possible value for dissipation_1d
+! Added checks for turbulence_closure_mod (TG)
+! Implementation of chemistry module (FK)
+! 
+! 2689 2017-12-12 17:46:55Z Giersch
+! Bugfix in if query
+! 
+! 2688 2017-12-12 17:27:04Z Giersch
+! Check if humidity is set to TRUE in the _p3d file for coupled runs
+! 
+! 2669 2017-12-06 16:03:27Z raasch
+! mrun-string replaced by palmrun
+! 
+! 2628 2017-11-20 12:40:38Z schwenkel
+! Enabled particle advection with grid stretching -> Removed parameter check
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Renamed phi --> latitude
+! 
+! 2564 2017-10-19 15:56:56Z Giersch
+! Variable wind_turbine was added to control_parameters.
+! 
+! 2550 2017-10-16 17:12:01Z boeske
+! Added checks for complex terrain simulations
+! 
+! 2513 2017-10-04 09:24:39Z kanani
+! Bugfix for some dopr(_initial)_index values and units connected to 
+! passive-scalar output
+! 
+! 2508 2017-10-02 08:57:09Z suehring
+! Bugfix, change default value of vertical_gradient level in order to consider 
+! also ocean runs 
+! 
+! 2422 2017-09-08 08:25:41Z raasch
+! error message in case of missing "restart" file activation string
+! 
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Added aerosol for bulk microphysics
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical grid nesting implemented: Check coupling mode. Generate file header
+! (SadiqHuq)
+! 
+! 2354 2017-08-17 10:49:36Z schwenkel
+! Bugfix correlated to lsm_check_data_output_pr.
+! If-statement for following checks is essential, otherwise units for lsm output 
+! are set to 'illegal' and palm will be aborted.
+! 
+! 2348 2017-08-10 10:40:10Z kanani
+! New: Check for simultaneous use of geostrophic wind and u_profile/v_profile
+! 
+! 2345 2017-08-09 11:50:30Z Giersch
+! Remove error message PA0156 and the conserve_volume_flow_mode option 
+! inflow_profile
+! 
+! 2339 2017-08-07 13:55:26Z raasch
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! Modularize 1D model
+! 
+! 2329 2017-08-03 14:24:56Z knoop
+! Bugfix: index corrected for rho_air and rho_air_zw output
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Modularize large-scale forcing and nudging
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! PA0349 and PA0420 removed.
+!
+! 2300 2017-06-29 13:31:14Z raasch
+! host-specific settings and checks removed
+!
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
+! includes two more prognostic equations for cloud drop concentration (nc)
+! and cloud water content (qc).
+!
+! 2274 2017-06-09 13:27:48Z Giersch
+! Changed error messages
+!
+! 2271 2017-06-09 12:34:55Z sward
+! roughness-length check altered
+! Error messages fixed
+!
+! 2270 2017-06-09 12:18:47Z maronga
+! Revised numbering (removed 2 timeseries)
+!
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2251 2017-06-06 15:10:46Z Giersch
+!
+! 2250 2017-06-06 15:07:12Z Giersch
+! Doxygen comment added
+!
+! 2248 2017-06-06 13:52:54Z sward
+! Error message fixed
+!
+! 2209 2017-04-19 09:34:46Z kanani
+! Check for plant canopy model output
+!
+! 2200 2017-04-11 11:37:51Z suehring
+! monotonic_adjustment removed
+!
+! 2178 2017-03-17 11:07:39Z hellstea
+! Index limits for perturbations are now set also in case of nested
+! boundary conditions
+!
+! 2169 2017-03-06 18:16:35Z suehring
+! Bugfix, move setting for topography grid convention to init_grid
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC related parts of code removed
+!
+! 2088 2016-12-19 16:30:25Z suehring
+! Bugfix in initial salinity profile
+!
+! 2084 2016-12-09 15:59:42Z knoop
+! Removed anelastic + multigrid error message
+!
+! 2052 2016-11-08 15:14:59Z gronemeier
+! Bugfix: remove setting of default value for recycling_width
+!
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Implement turbulent outflow condition
+!
+! 2044 2016-11-02 16:44:25Z knoop
+! Added error code for anelastic approximation
+!
+! 2042 2016-11-02 13:47:31Z suehring
+! Additional checks for wall_heatflux, wall_humidityflux and wall_scalarflux.
+! Bugfix, check for constant_scalarflux.
+!
+! 2040 2016-10-26 16:58:09Z gronemeier
+! Removed check for statistic_regions > 9.
+!
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+!
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+!
+! 2026 2016-10-18 10:27:02Z suehring
+! Bugfix, enable output of s*2
+!
+! 2024 2016-10-12 16:42:37Z kanani
+! Added missing CASE, error message and unit for ssws*,
+! increased number of possible output quantities to 500.
+!
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters,
+! changed prefix for urban surface model output to "usm_",
+! added flag lsf_exception (inipar-Namelist parameter) to allow explicit
+! enabling of large scale forcing together with buildings on flat terrain,
+! introduced control parameter varnamelength for LEN of var.
+!
+! 2007 2016-08-24 15:47:17Z kanani
+! Added checks for the urban surface model,
+! increased counter in DO WHILE loop over data_output (for urban surface output)
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1994 2016-08-15 09:52:21Z suehring
+! Add missing check for bulk_cloud_model and cloud_droplets
+!
+! 1992 2016-08-12 15:14:59Z suehring
+! New checks for top_scalarflux
+! Bugfixes concerning data output of profiles in case of passive_scalar
+!
+! 1984 2016-08-01 14:48:05Z suehring
+! Bugfix: checking for bottom and top boundary condition for humidity and scalars
+!
+! 1972 2016-07-26 07:52:02Z maronga
+! Removed check of lai* (done in land surface module)
+!
+! 1970 2016-07-18 14:27:12Z suehring
+! Bugfix, check for ibc_q_b and constant_waterflux in case of land-surface scheme
+!
+! 1962 2016-07-13 09:16:44Z suehring
+! typo removed
+!
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate checks and calculations for humidity and passive scalar. Therefore,
+! a subroutine to calculate vertical gradients is introduced, in order  to reduce
+! redundance.
+! Additional check - large-scale forcing is not implemented for passive scalars
+! so far.
+!
+! 1931 2016-06-10 12:06:59Z suehring
+! Rename multigrid into multigrid_noopt and multigrid_fast into multigrid
+!
+! 1929 2016-06-09 16:25:25Z suehring
+! Bugfix in check for use_upstream_for_tke
+!
+! 1918 2016-05-27 14:35:57Z raasch
+! setting of a fixed reference state ('single_value') for ocean runs removed
+!
+! 1914 2016-05-26 14:44:07Z witha
+! Added checks for the wind turbine model
+!
+! 1841 2016-04-07 19:14:06Z raasch
+! redundant location message removed
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! check of spectra quantities moved to spectra_mod
+!
+! 1829 2016-04-07 12:16:29Z maronga
+! Bugfix: output of user defined data required reset of the string 'unit'
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Moved checks for radiation model to the respective module.
+! Moved checks for plant canopy model to the respective module.
+! Bugfix for check of too large roughness_length
+!
+! 1824 2016-04-07 09:55:29Z gronemeier
+! Check if roughness_length < dz/2. Moved location_message(finished) to the end.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! PALM collision kernel deleted. Collision algorithms are checked for correct
+! spelling.
+!
+! Tails removed.
+! !
+! Checks for use_sgs_for_particles adopted for the use of droplets with
+! use_sgs_for_particles adopted.
+!
+! Unused variables removed.
+!
+! 1817 2016-04-06 15:44:20Z maronga
+! Moved checks for land_surface model to the respective module
+!
+! 1806 2016-04-05 18:55:35Z gronemeier
+! Check for recycling_yshift
+!
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1795 2016-03-18 15:00:53Z raasch
+! Bugfix: setting of initial scalar profile in ocean
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Added check for use of most_method = 'lookup' in combination with water
+! surface presribed in the land surface model. Added output of z0q.
+! Syntax layout improved.
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! cpp-direktives for spectra removed, check of spectra level removed
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf variables and module name changed,
+! check of netcdf precision removed (is done in the netcdf module)
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! output of nest id in run description header,
+! bugfix: check of validity of lateral boundary conditions moved to parin
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1745 2016-02-05 13:06:51Z gronemeier
+! Bugfix: check data output intervals to be /= 0.0 in case of parallel NetCDF4
+!
+! 1701 2015-11-02 07:43:04Z maronga
+! Bugfix: definition of rad_net timeseries was missing
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of Obukhov length (ol) and radiative heating rates for RRTMG.
+! Added checks for use of radiation / lsm with topography.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1606 2015-06-29 10:43:37Z maronga
+! Added check for use of RRTMG without netCDF.
+!
+! 1587 2015-05-04 14:19:01Z maronga
+! Added check for set of albedos when using RRTMG
+!
+! 1585 2015-04-30 07:05:52Z maronga
+! Added support for RRTMG
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! multigrid_fast added as allowed pressure solver
+!
+! 1573 2015-03-23 17:53:37Z suehring
+! Bugfix: check for advection schemes in case of non-cyclic boundary conditions
+!
+! 1557 2015-03-05 16:43:04Z suehring
+! Added checks for monotonic limiter
+!
+! 1555 2015-03-04 17:44:27Z maronga
+! Added output of r_a and r_s. Renumbering of LSM PA-messages.
+!
+! 1553 2015-03-03 17:33:54Z maronga
+! Removed check for missing soil temperature profile as default values were added.
+!
+! 1551 2015-03-03 14:18:16Z maronga
+! Added various checks for land surface and radiation model. In the course of this
+! action, the length of the variable var has to be increased
+!
+! 1504 2014-12-04 09:23:49Z maronga
+! Bugfix: check for large_scale forcing got lost.
+!
+! 1500 2014-12-03 17:42:41Z maronga
+! Boundary conditions changed to dirichlet for land surface model
+!
+! 1496 2014-12-02 17:25:50Z maronga
+! Added checks for the land surface model
+!
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   module plant_canopy_model_mod added,
+!   checks regarding usage of new method for leaf area density profile
+!   construction added,
+!   lad-profile construction moved to new subroutine init_plant_canopy within
+!   the module plant_canopy_model_mod,
+!   drag_coefficient renamed to canopy_drag_coeff.
+! Missing KIND-attribute for REAL constant added
+!
+! 1455 2014-08-29 10:47:47Z heinze
+! empty time records in volume, cross-section and masked data output prevented
+! in case of non-parallel netcdf-output in restart runs
+!
+! 1429 2014-07-15 12:53:45Z knoop
+! run_description_header exended to provide ensemble_member_nr if specified
+!
+! 1425 2014-07-05 10:57:53Z knoop
+! bugfix: perturbation domain modified for parallel random number generator
+!
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages modified
+!
+! 1400 2014-05-09 14:03:54Z knoop
+! Check random generator extended by option random-parallel
+!
+! 1384 2014-05-02 14:31:06Z raasch
+! location messages added
+!
+! 1365 2014-04-22 15:03:56Z boeske
+! Usage of large scale forcing for pt and q enabled:
+! output for profiles of large scale advection (td_lsa_lpt, td_lsa_q),
+! large scale subsidence (td_sub_lpt, td_sub_q)
+! and nudging tendencies (td_nud_lpt, td_nud_q, td_nud_u and td_nud_v) added,
+! check if use_subsidence_tendencies is used correctly
+!
+! 1361 2014-04-16 15:17:48Z hoffmann
+! PA0363 removed
+! PA0362 changed
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! Do not allow the execution of PALM with use_particle_tails, since particle
+! tails are currently not supported by our new particle structure.
+!
+! PA0084 not necessary for new particle structure
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1330 2014-03-24 17:29:32Z suehring
+! In case of SGS-particle velocity advection of TKE is also allowed with
+! dissipative 5th-order scheme.
+!
+! 1327 2014-03-21 11:00:16Z raasch
+! "baroclinicity" renamed "baroclinity", "ocean version" replaced by "ocean mode"
+! bugfix: duplicate error message 56 removed,
+! check of data_output_format and do3d_compress removed
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! some REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! Kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1308 2014-03-13 14:58:42Z fricke
+! +netcdf_data_format_save
+! Calculate fixed number of output time levels for parallel netcdf output.
+! For masked data, parallel netcdf output is not tested so far, hence
+! netcdf_data_format is switched back to non-paralell output.
+!
+! 1299 2014-03-06 13:15:21Z heinze
+! enable usage of large_scale subsidence in combination with large_scale_forcing
+! output for profile of large scale vertical velocity w_subs added
+!
+! 1276 2014-01-15 13:40:41Z heinze
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! output for profiles of ug and vg added
+! set surface_heatflux and surface_waterflux also in dependence on
+! large_scale_forcing
+! checks for nudging and large scale forcing from external file
+!
+! 1236 2013-09-27 07:21:13Z raasch
+! check number of spectra levels
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! check for transpose_compute_overlap (temporary)
+!
+! 1214 2013-08-21 12:29:17Z kanani
+! additional check for simultaneous use of vertical grid stretching
+! and particle advection
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! checks for poisfft_hybrid removed
+!
+! 1210 2013-08-14 10:58:20Z raasch
+! check for fftw
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! checks and settings of buoyancy parameters and switches revised,
+! initial profile for rho_ocean added to hom (id=77)
+!
+! 1174 2013-05-31 10:28:08Z gryschka
+! Bugfix in computing initial profiles for ug, vg, lad, q in case of Atmosphere
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! bc_lr/ns_dirneu/neudir removed
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! unused variables removed
+! drizzle can be used without precipitation
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! ibc_p_b = 2 removed
+!
+! 1103 2013-02-20 02:15:53Z raasch
+! Bugfix: turbulent inflow must not require cyclic fill in restart runs
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1069 2012-11-28 16:18:43Z maronga
+! allow usage of topography in combination with cloud physics
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! Bugfix: It is not allowed to use cloud_scheme = seifert_beheng without
+!         precipitation in order to save computational resources.
+!
+! 1060 2012-11-21 07:19:51Z raasch
+! additional check for parameter turbulent_inflow
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! necessary changes for the new two-moment cloud physics scheme added:
+! - check cloud physics scheme (Kessler or Seifert and Beheng)
+! - plant_canopy is not allowed
+! - currently, only cache loop_optimization is allowed
+! - initial profiles of nr, qr
+! - boundary condition of nr, qr
+! - check output quantities (qr, nr, prr)
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031/1034 2012-10-22 11:32:49Z raasch
+! check of netcdf4 parallel file support
+!
+! 1019 2012-09-28 06:46:45Z raasch
+! non-optimized version of prognostic_equations not allowed any more
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! acc allowed for loop optimization,
+! checks for adjustment of mixing length to the Prandtl mixing length removed
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! checks for cases with unequal subdomain sizes removed
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog- and upstream-spline-scheme removed
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+
+! 978 2012-08-09 08:28:32Z fricke
+! setting of bc_lr/ns_dirneu/neudir
+! outflow damping layer removed
+! check for z0h*
+! check for pt_damping_width
+!
+! 964 2012-07-26 09:14:24Z raasch
+! check of old profil-parameters removed
+!
+! 940 2012-07-09 14:31:00Z raasch
+! checks for parameter neutral
+!
+! 924 2012-06-06 07:44:41Z maronga
+! Bugfix: preprocessor directives caused error during compilation
+!
+! 892 2012-05-02 13:51:44Z maronga
+! Bugfix for parameter file check ( excluding __netcdf4 )
+!
+! 866 2012-03-28 06:44:41Z raasch
+! use only 60% of the geostrophic wind as translation speed in case of Galilean
+! transformation and use_ug_for_galilei_tr = .T. in order to mimimize the
+! timestep
+!
+! 861 2012-03-26 14:18:34Z suehring
+! Check for topography and ws-scheme removed.
+! Check for loop_optimization = 'vector' and ws-scheme removed.
+!
+! 845 2012-03-07 10:23:05Z maronga
+! Bugfix: exclude __netcdf4 directive part from namelist file check compilation
+!
+! 828 2012-02-21 12:00:36Z raasch
+! check of collision_kernel extended
+!
+! 825 2012-02-19 03:03:44Z raasch
+! check for collision_kernel and curvature_solution_effects
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! Revision 1.1  1997/08/26 06:29:23  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Check control parameters and deduce further quantities.
+!------------------------------------------------------------------------------!
+ SUBROUTINE check_parameters
+
+
+    USE arrays_3d
+
+    USE basic_constants_and_equations_mod
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_check_data_output, biom_check_parameters
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_check_parameters, bcm_check_data_output,  &
+               bcm_check_data_output_pr
+
+    USE chem_emissions_mod,                                                    &
+        ONLY:  chem_emissions_check_parameters
+
+    USE chem_modules
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_boundary_conds, chem_check_data_output,                    &
+               chem_check_data_output_pr, chem_check_parameters, chem_species
+
+    USE control_parameters
+
+    USE dvrp_variables
+
+    USE grid_variables
+
+    USE gust_mod,                                                              &
+        ONLY: gust_check_data_output, gust_check_data_output_pr,               &
+              gust_check_parameters, gust_module_enabled
+
+    USE kinds
+
+    USE indices
+
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_check_data_output, lsm_check_data_output_pr,                 &
+              lsm_check_parameters
+
+    USE lsf_nudging_mod,                                                       &
+        ONLY:  lsf_nudging_check_parameters, lsf_nudging_check_data_output_pr
+
+    USE model_1d_mod,                                                          &
+        ONLY:  damp_level_1d, damp_level_ind_1d
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  init_model, input_pids_static, netcdf_data_input_check_dynamic, &
+               netcdf_data_input_check_static
+
+    USE netcdf_interface,                                                      &
+        ONLY:  dopr_unit, do2d_unit, do3d_unit, netcdf_data_format,            &
+               netcdf_data_format_string, dots_unit, heatflux_output_unit,     &
+               waterflux_output_unit, momentumflux_output_unit
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_check_data_output, ocean_check_data_output_pr,            &
+               ocean_check_parameters
+
+    USE particle_attributes
+
+    USE pegrid
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pcm_check_data_output, pcm_check_parameters
+
+    USE pmc_interface,                                                         &
+        ONLY:  cpl_id, nested_run
+
+    USE profil_parameter
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_check_data_output,                         &
+               radiation_check_data_output_pr, radiation_check_parameters
+                            
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_check_data_output, salsa_check_parameters        
+
+    USE spectra_mod,                                                           &
+        ONLY:  calculate_spectra, spectra_check_parameters
+
+    USE statistics
+
+    USE subsidence_mod
+
+    USE statistics
+
+    USE surface_output_mod,                                                    &
+        ONLY:  surface_output_check_parameters
+
+    USE synthetic_turbulence_generator_mod,                                    &
+        ONLY:  stg_check_parameters
+
+    USE transpose_indices
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_check_data_output, tcm_check_parameters
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_check_data_output, usm_check_parameters
+
+    USE uv_exposure_model_mod,                                                 &
+        ONLY:  uvem_check_data_output
+
+    USE wind_turbine_model_mod,                                                &
+        ONLY:  wtm_check_parameters
+
+    USE vertical_nesting_mod,                                                  &
+        ONLY:  vnested, vnest_check_parameters
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=varnamelength)  ::  var           !< variable name
+    CHARACTER (LEN=7)   ::  unit                     !< unit of variable
+    CHARACTER (LEN=8)   ::  date                     !< current date string
+    CHARACTER (LEN=10)  ::  time                     !< current time string
+    CHARACTER (LEN=20)  ::  ensemble_string          !< string containing number of ensemble member
+    CHARACTER (LEN=15)  ::  nest_string              !< string containing id of nested domain
+    CHARACTER (LEN=40)  ::  coupling_string          !< string containing type of coupling
+    CHARACTER (LEN=100) ::  action                   !< flag string
+
+    INTEGER(iwp) ::  i                               !< loop index
+    INTEGER(iwp) ::  ilen                            !< string length
+    INTEGER(iwp) ::  j                               !< loop index
+    INTEGER(iwp) ::  k                               !< loop index
+    INTEGER(iwp) ::  kk                              !< loop index
+    INTEGER(iwp) ::  netcdf_data_format_save         !< initial value of netcdf_data_format
+    INTEGER(iwp) ::  position                        !< index position of string
+    INTEGER(iwp) ::  lsp                             !< running index for chem spcs.
+
+    LOGICAL     ::  found                            !< flag, true if output variable is already marked for averaging
+
+    REAL(wp)    ::  dt_spinup_max                    !< maximum spinup timestep in nested domains
+    REAL(wp)    ::  dum                              !< dummy variable
+    REAL(wp)    ::  gradient                         !< local gradient
+    REAL(wp)    ::  remote = 0.0_wp                  !< MPI id of remote processor
+    REAL(wp)    ::  spinup_time_max                  !< maximum spinup time in nested domains
+    REAL(wp)    ::  time_to_be_simulated_from_reference_point  !< time to be simulated from reference point
+
+
+    CALL location_message( 'checking parameters', .FALSE. )
+!
+!-- At first, check static and dynamic input for consistency
+    CALL netcdf_data_input_check_dynamic
+    CALL netcdf_data_input_check_static
+!
+!-- Check for overlap combinations, which are not realized yet
+    IF ( transpose_compute_overlap  .AND. numprocs == 1 )  THEN
+          message_string = 'transpose-compute-overlap not implemented for single PE runs'
+          CALL message( 'check_parameters', 'PA0000', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check the coupling mode
+    IF ( coupling_mode /= 'uncoupled'            .AND.                         &
+         coupling_mode /= 'precursor_atmos'      .AND.                         &
+         coupling_mode /= 'precursor_ocean'      .AND.                         &
+         coupling_mode /= 'vnested_crse'         .AND.                         &
+         coupling_mode /= 'vnested_fine'         .AND.                         &
+         coupling_mode /= 'atmosphere_to_ocean'  .AND.                         &
+         coupling_mode /= 'ocean_to_atmosphere' )  THEN
+       message_string = 'illegal coupling mode: ' // TRIM( coupling_mode )
+       CALL message( 'check_parameters', 'PA0002', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check if humidity is set to TRUE in case of the atmospheric run (for coupled runs)
+    IF ( coupling_mode == 'atmosphere_to_ocean' .AND. .NOT. humidity) THEN
+       message_string = ' Humidity has to be set to .T. in the _p3d file ' //  &
+                        'for coupled runs between ocean and atmosphere.'
+       CALL message( 'check_parameters', 'PA0476', 1, 2, 0, 6, 0 )
+    ENDIF
+   
+!
+!-- Check dt_coupling, restart_time, dt_restart, end_time, dx, dy, nx and ny
+    IF ( coupling_mode /= 'uncoupled'       .AND.                              &
+         coupling_mode(1:8) /= 'vnested_'   .AND.                              &
+         coupling_mode /= 'precursor_atmos' .AND.                              &
+         coupling_mode /= 'precursor_ocean' )  THEN
+
+       IF ( dt_coupling == 9999999.9_wp )  THEN
+          message_string = 'dt_coupling is not set but required for coup' //   &
+                           'ling mode "' //  TRIM( coupling_mode ) // '"'
+          CALL message( 'check_parameters', 'PA0003', 1, 2, 0, 6, 0 )
+       ENDIF
+
+#if defined( __parallel )
+
+
+       IF ( myid == 0 ) THEN
+          CALL MPI_SEND( dt_coupling, 1, MPI_REAL, target_id, 11, comm_inter,  &
+                         ierr )
+          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 11, comm_inter,       &
+                         status, ierr )
+       ENDIF
+       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+       IF ( dt_coupling /= remote )  THEN
+          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
+                 '": dt_coupling = ', dt_coupling, '& is not equal to ',       &
+                 'dt_coupling_remote = ', remote
+          CALL message( 'check_parameters', 'PA0004', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( dt_coupling <= 0.0_wp )  THEN
+
+          IF ( myid == 0  ) THEN
+             CALL MPI_SEND( dt_max, 1, MPI_REAL, target_id, 19, comm_inter, ierr )
+             CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 19, comm_inter,    &
+                            status, ierr )
+          ENDIF
+          CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+          dt_coupling = MAX( dt_max, remote )
+          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
+                 '": dt_coupling <= 0.0 & is not allowed and is reset to ',    &
+                 'MAX(dt_max(A,O)) = ', dt_coupling
+          CALL message( 'check_parameters', 'PA0005', 0, 1, 0, 6, 0 )
+       ENDIF
+
+       IF ( myid == 0 ) THEN
+          CALL MPI_SEND( restart_time, 1, MPI_REAL, target_id, 12, comm_inter, &
+                         ierr )
+          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 12, comm_inter,       &
+                         status, ierr )
+       ENDIF
+       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+       IF ( restart_time /= remote )  THEN
+          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
+                 '": restart_time = ', restart_time, '& is not equal to ',     &
+                 'restart_time_remote = ', remote
+          CALL message( 'check_parameters', 'PA0006', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( myid == 0 ) THEN
+          CALL MPI_SEND( dt_restart, 1, MPI_REAL, target_id, 13, comm_inter,   &
+                         ierr )
+          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 13, comm_inter,       &
+                         status, ierr )
+       ENDIF
+       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+       IF ( dt_restart /= remote )  THEN
+          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
+                 '": dt_restart = ', dt_restart, '& is not equal to ',         &
+                 'dt_restart_remote = ', remote
+          CALL message( 'check_parameters', 'PA0007', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       time_to_be_simulated_from_reference_point = end_time-coupling_start_time
+
+       IF  ( myid == 0 ) THEN
+          CALL MPI_SEND( time_to_be_simulated_from_reference_point, 1,         &
+                         MPI_REAL, target_id, 14, comm_inter, ierr )
+          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 14, comm_inter,       &
+                         status, ierr )
+       ENDIF
+       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+       IF ( time_to_be_simulated_from_reference_point /= remote )  THEN
+          WRITE( message_string, * ) 'coupling mode "', TRIM( coupling_mode ), &
+                 '": time_to_be_simulated_from_reference_point = ',            &
+                 time_to_be_simulated_from_reference_point, '& is not equal ', &
+                 'to time_to_be_simulated_from_reference_point_remote = ',     &
+                 remote
+          CALL message( 'check_parameters', 'PA0008', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( myid == 0 ) THEN
+          CALL MPI_SEND( dx, 1, MPI_REAL, target_id, 15, comm_inter, ierr )
+          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 15, comm_inter,       &
+                                                             status, ierr )
+       ENDIF
+       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+
+       IF ( coupling_mode == 'atmosphere_to_ocean') THEN
+
+          IF ( dx < remote ) THEN
+             WRITE( message_string, * ) 'coupling mode "',                     &
+                   TRIM( coupling_mode ),                                      &
+           '": dx in Atmosphere is not equal to or not larger than dx in ocean'
+             CALL message( 'check_parameters', 'PA0009', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( (nx_a+1)*dx /= (nx_o+1)*remote )  THEN
+             WRITE( message_string, * ) 'coupling mode "',                     &
+                    TRIM( coupling_mode ),                                     &
+             '": Domain size in x-direction is not equal in ocean and atmosphere'
+             CALL message( 'check_parameters', 'PA0010', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDIF
+
+       IF ( myid == 0) THEN
+          CALL MPI_SEND( dy, 1, MPI_REAL, target_id, 16, comm_inter, ierr )
+          CALL MPI_RECV( remote, 1, MPI_REAL, target_id, 16, comm_inter,       &
+                         status, ierr )
+       ENDIF
+       CALL MPI_BCAST( remote, 1, MPI_REAL, 0, comm2d, ierr)
+
+       IF ( coupling_mode == 'atmosphere_to_ocean') THEN
+
+          IF ( dy < remote )  THEN
+             WRITE( message_string, * ) 'coupling mode "',                     &
+                    TRIM( coupling_mode ),                                     &
+                 '": dy in Atmosphere is not equal to or not larger than dy in ocean'
+             CALL message( 'check_parameters', 'PA0011', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( (ny_a+1)*dy /= (ny_o+1)*remote )  THEN
+             WRITE( message_string, * ) 'coupling mode "',                     &
+                   TRIM( coupling_mode ),                                      &
+             '": Domain size in y-direction is not equal in ocean and atmosphere'
+             CALL message( 'check_parameters', 'PA0012', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( MOD(nx_o+1,nx_a+1) /= 0 )  THEN
+             WRITE( message_string, * ) 'coupling mode "',                     &
+                   TRIM( coupling_mode ),                                      &
+             '": nx+1 in ocean is not divisible by nx+1 in',                   &
+             ' atmosphere without remainder'
+             CALL message( 'check_parameters', 'PA0339', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( MOD(ny_o+1,ny_a+1) /= 0 )  THEN
+             WRITE( message_string, * ) 'coupling mode "',                     &
+                   TRIM( coupling_mode ),                                      &
+             '": ny+1 in ocean is not divisible by ny+1 in', &
+             ' atmosphere without remainder'
+
+             CALL message( 'check_parameters', 'PA0340', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDIF
+#else
+       WRITE( message_string, * ) 'coupling requires PALM to be compiled with',&
+            ' cpp-option "-D__parallel"'
+       CALL message( 'check_parameters', 'PA0141', 1, 2, 0, 6, 0 )
+#endif
+    ENDIF
+
+#if defined( __parallel )
+!
+!-- Exchange via intercommunicator
+    IF ( coupling_mode == 'atmosphere_to_ocean' .AND. myid == 0 )  THEN
+       CALL MPI_SEND( humidity, 1, MPI_LOGICAL, target_id, 19, comm_inter,     &
+                      ierr )
+    ELSEIF ( coupling_mode == 'ocean_to_atmosphere' .AND. myid == 0)  THEN
+       CALL MPI_RECV( humidity_remote, 1, MPI_LOGICAL, target_id, 19,          &
+                      comm_inter, status, ierr )
+    ENDIF
+    CALL MPI_BCAST( humidity_remote, 1, MPI_LOGICAL, 0, comm2d, ierr)
+
+#endif
+
+!
+!-- User settings for restart times requires that "restart" has been given as
+!-- file activation string. Otherwise, binary output would not be saved by
+!-- palmrun.
+    IF (  ( restart_time /= 9999999.9_wp  .OR.  dt_restart /= 9999999.9_wp )   &
+         .AND.  .NOT. write_binary )  THEN
+       WRITE( message_string, * ) 'manual restart settings requires file ',    &
+                                  'activation string "restart"'
+       CALL message( 'check_parameters', 'PA0001', 1, 2, 0, 6, 0 )
+    ENDIF
+
+
+!
+!-- Generate the file header which is used as a header for most of PALM's
+!-- output files
+    CALL DATE_AND_TIME( date, time )
+    run_date = date(7:8)//'-'//date(5:6)//'-'//date(3:4)
+    run_time = time(1:2)//':'//time(3:4)//':'//time(5:6)
+    IF ( coupling_mode == 'uncoupled' )  THEN
+       coupling_string = ''
+    ELSEIF ( coupling_mode == 'vnested_crse' )  THEN
+       coupling_string = ' nested (coarse)'
+    ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+       coupling_string = ' nested (fine)'
+    ELSEIF ( coupling_mode == 'atmosphere_to_ocean' )  THEN
+       coupling_string = ' coupled (atmosphere)'
+    ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
+       coupling_string = ' coupled (ocean)'
+    ENDIF
+    IF ( ensemble_member_nr /= 0 )  THEN
+       WRITE( ensemble_string, '(2X,A,I2.2)' )  'en-no: ', ensemble_member_nr
+    ELSE
+       ensemble_string = ''
+    ENDIF
+    IF ( nested_run )  THEN
+       WRITE( nest_string, '(2X,A,I2.2)' )  'nest-id: ', cpl_id
+    ELSE
+       nest_string = ''
+    ENDIF
+
+    WRITE ( run_description_header,                                            &
+            '(A,2X,A,2X,A,A,A,I2.2,A,A,A,2X,A,A,2X,A,1X,A)' )                  &
+          TRIM( version ), TRIM( revision ), 'run: ',                          &
+          TRIM( run_identifier ), '.', runnr, TRIM( coupling_string ),         &
+          TRIM( nest_string ), TRIM( ensemble_string), 'host: ', TRIM( host ), &
+          run_date, run_time
+
+!
+!-- Check the general loop optimization method
+    SELECT CASE ( TRIM( loop_optimization ) )
+
+       CASE ( 'cache', 'vector' )
+          CONTINUE
+
+       CASE DEFAULT
+          message_string = 'illegal value given for loop_optimization: "' //   &
+                           TRIM( loop_optimization ) // '"'
+          CALL message( 'check_parameters', 'PA0013', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+!
+!-- Check topography setting (check for illegal parameter combinations)
+    IF ( topography /= 'flat' )  THEN
+       action = ' '
+       IF ( scalar_advec /= 'pw-scheme' .AND. scalar_advec /= 'ws-scheme'      &
+          )  THEN
+          WRITE( action, '(A,A)' )  'scalar_advec = ', scalar_advec
+       ENDIF
+       IF ( momentum_advec /= 'pw-scheme' .AND. momentum_advec /= 'ws-scheme' )&
+       THEN
+          WRITE( action, '(A,A)' )  'momentum_advec = ', momentum_advec
+       ENDIF
+       IF ( psolver == 'sor' )  THEN
+          WRITE( action, '(A,A)' )  'psolver = ', psolver
+       ENDIF
+       IF ( sloping_surface )  THEN
+          WRITE( action, '(A)' )  'sloping surface = .TRUE.'
+       ENDIF
+       IF ( galilei_transformation )  THEN
+          WRITE( action, '(A)' )  'galilei_transformation = .TRUE.'
+       ENDIF
+       IF ( cloud_droplets )  THEN
+          WRITE( action, '(A)' )  'cloud_droplets = .TRUE.'
+       ENDIF
+       IF ( .NOT. constant_flux_layer )  THEN
+          WRITE( action, '(A)' )  'constant_flux_layer = .FALSE.'
+       ENDIF
+       IF ( action /= ' ' )  THEN
+          message_string = 'a non-flat topography does not allow ' //          &
+                           TRIM( action )
+          CALL message( 'check_parameters', 'PA0014', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ENDIF
+
+!
+!-- Check approximation
+    IF ( TRIM( approximation ) /= 'boussinesq'   .AND.                         &
+         TRIM( approximation ) /= 'anelastic' )  THEN
+       message_string = 'unknown approximation: approximation = "' //          &
+                        TRIM( approximation ) // '"'
+       CALL message( 'check_parameters', 'PA0446', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check approximation requirements
+    IF ( TRIM( approximation ) == 'anelastic'   .AND.                          &
+         TRIM( momentum_advec ) /= 'ws-scheme' )  THEN
+       message_string = 'Anelastic approximation requires ' //                 &
+                        'momentum_advec = "ws-scheme"'
+       CALL message( 'check_parameters', 'PA0447', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( TRIM( approximation ) == 'anelastic'   .AND.                          &
+         TRIM( psolver ) == 'multigrid' )  THEN
+       message_string = 'Anelastic approximation currently only supports ' //  &
+                        'psolver = "poisfft", ' //                             &
+                        'psolver = "sor" and ' //                              &
+                        'psolver = "multigrid_noopt"'
+       CALL message( 'check_parameters', 'PA0448', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( TRIM( approximation ) == 'anelastic'   .AND.                          &
+         conserve_volume_flow )  THEN
+       message_string = 'Anelastic approximation is not allowed with ' //      &
+                        'conserve_volume_flow = .TRUE.'
+       CALL message( 'check_parameters', 'PA0449', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check flux input mode
+    IF ( TRIM( flux_input_mode ) /= 'dynamic'    .AND.                         &
+         TRIM( flux_input_mode ) /= 'kinematic'  .AND.                         &
+         TRIM( flux_input_mode ) /= 'approximation-specific' )  THEN
+       message_string = 'unknown flux input mode: flux_input_mode = "' //      &
+                        TRIM( flux_input_mode ) // '"'
+       CALL message( 'check_parameters', 'PA0450', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- Set flux input mode according to approximation if applicable
+    IF ( TRIM( flux_input_mode ) == 'approximation-specific' )  THEN
+       IF ( TRIM( approximation ) == 'anelastic' )  THEN
+          flux_input_mode = 'dynamic'
+       ELSEIF ( TRIM( approximation ) == 'boussinesq' )  THEN
+          flux_input_mode = 'kinematic'
+       ENDIF
+    ENDIF
+
+!
+!-- Check flux output mode
+    IF ( TRIM( flux_output_mode ) /= 'dynamic'    .AND.                        &
+         TRIM( flux_output_mode ) /= 'kinematic'  .AND.                        &
+         TRIM( flux_output_mode ) /= 'approximation-specific' )  THEN
+       message_string = 'unknown flux output mode: flux_output_mode = "' //    &
+                        TRIM( flux_output_mode ) // '"'
+       CALL message( 'check_parameters', 'PA0451', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- Set flux output mode according to approximation if applicable
+    IF ( TRIM( flux_output_mode ) == 'approximation-specific' )  THEN
+       IF ( TRIM( approximation ) == 'anelastic' )  THEN
+          flux_output_mode = 'dynamic'
+       ELSEIF ( TRIM( approximation ) == 'boussinesq' )  THEN
+          flux_output_mode = 'kinematic'
+       ENDIF
+    ENDIF
+
+
+!
+!-- When the land- or urban-surface model is used, the flux output must be 
+!-- dynamic.
+    IF ( land_surface  .OR.  urban_surface )  THEN
+       flux_output_mode = 'dynamic'
+    ENDIF
+
+!
+!-- Set the flux output units according to flux_output_mode
+    IF ( TRIM( flux_output_mode ) == 'kinematic' ) THEN
+        heatflux_output_unit              = 'K m/s'
+        waterflux_output_unit             = 'kg/kg m/s'
+        momentumflux_output_unit          = 'm2/s2'
+    ELSEIF ( TRIM( flux_output_mode ) == 'dynamic' ) THEN
+        heatflux_output_unit              = 'W/m2'
+        waterflux_output_unit             = 'W/m2'
+        momentumflux_output_unit          = 'N/m2'
+    ENDIF
+
+!
+!-- set time series output units for fluxes
+    dots_unit(14:16) = heatflux_output_unit
+    dots_unit(21)    = waterflux_output_unit
+    dots_unit(19:20) = momentumflux_output_unit
+
+!
+!-- Check whether there are any illegal values
+!-- Pressure solver:
+    IF ( psolver /= 'poisfft'  .AND.  psolver /= 'sor'  .AND.                  &
+         psolver /= 'multigrid'  .AND.  psolver /= 'multigrid_noopt' )  THEN
+       message_string = 'unknown solver for perturbation pressure: psolver' // &
+                        ' = "' // TRIM( psolver ) // '"'
+       CALL message( 'check_parameters', 'PA0016', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+       IF ( cycle_mg == 'w' )  THEN
+          gamma_mg = 2
+       ELSEIF ( cycle_mg == 'v' )  THEN
+          gamma_mg = 1
+       ELSE
+          message_string = 'unknown multigrid cycle: cycle_mg = "' //          &
+                           TRIM( cycle_mg ) // '"'
+          CALL message( 'check_parameters', 'PA0020', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( fft_method /= 'singleton-algorithm'  .AND.                            &
+         fft_method /= 'temperton-algorithm'  .AND.                            &
+         fft_method /= 'fftw'                 .AND.                            &
+         fft_method /= 'system-specific' )  THEN
+       message_string = 'unknown fft-algorithm: fft_method = "' //             &
+                        TRIM( fft_method ) // '"'
+       CALL message( 'check_parameters', 'PA0021', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF( momentum_advec == 'ws-scheme' .AND.                                    &
+        .NOT. call_psolver_at_all_substeps  ) THEN
+        message_string = 'psolver must be called at each RK3 substep when "'// &
+                      TRIM(momentum_advec) // ' "is used for momentum_advec'
+        CALL message( 'check_parameters', 'PA0344', 1, 2, 0, 6, 0 )
+    END IF
+!
+!-- Advection schemes:
+    IF ( momentum_advec /= 'pw-scheme'  .AND.                                  &  
+         momentum_advec /= 'ws-scheme'  .AND.                                  &
+         momentum_advec /= 'up-scheme' )                                       &
+    THEN
+       message_string = 'unknown advection scheme: momentum_advec = "' //      &
+                        TRIM( momentum_advec ) // '"'
+       CALL message( 'check_parameters', 'PA0022', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( ( momentum_advec == 'ws-scheme' .OR.  scalar_advec == 'ws-scheme' )   &
+           .AND. ( timestep_scheme == 'euler' .OR.                             &
+                   timestep_scheme == 'runge-kutta-2' ) )                      &
+    THEN
+       message_string = 'momentum_advec or scalar_advec = "'                   &
+         // TRIM( momentum_advec ) // '" is not allowed with ' //              &
+         'timestep_scheme = "' // TRIM( timestep_scheme ) // '"'
+       CALL message( 'check_parameters', 'PA0023', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( scalar_advec /= 'pw-scheme'  .AND.  scalar_advec /= 'ws-scheme' .AND. &
+         scalar_advec /= 'bc-scheme' .AND. scalar_advec /= 'up-scheme' )       &
+    THEN
+       message_string = 'unknown advection scheme: scalar_advec = "' //        &
+                        TRIM( scalar_advec ) // '"'
+       CALL message( 'check_parameters', 'PA0024', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( scalar_advec == 'bc-scheme'  .AND.  loop_optimization == 'cache' )    &
+    THEN
+       message_string = 'advection_scheme scalar_advec = "'                    &
+         // TRIM( scalar_advec ) // '" not implemented for ' //                &
+         'loop_optimization = "' // TRIM( loop_optimization ) // '"'
+       CALL message( 'check_parameters', 'PA0026', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( use_sgs_for_particles  .AND.  .NOT. cloud_droplets  .AND.             &
+         .NOT. use_upstream_for_tke  .AND.                                     &
+         scalar_advec /= 'ws-scheme'                                           &
+       )  THEN
+       use_upstream_for_tke = .TRUE.
+       message_string = 'use_upstream_for_tke is set to .TRUE. because ' //    &
+                        'use_sgs_for_particles = .TRUE. '          //          &
+                        'and scalar_advec /= ws-scheme'
+       CALL message( 'check_parameters', 'PA0025', 0, 1, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Set LOGICAL switches to enhance performance
+    IF ( momentum_advec == 'ws-scheme' )  ws_scheme_mom = .TRUE.
+    IF ( scalar_advec   == 'ws-scheme' )  ws_scheme_sca = .TRUE.
+
+
+!
+!-- Timestep schemes:
+    SELECT CASE ( TRIM( timestep_scheme ) )
+
+       CASE ( 'euler' )
+          intermediate_timestep_count_max = 1
+
+       CASE ( 'runge-kutta-2' )
+          intermediate_timestep_count_max = 2
+
+       CASE ( 'runge-kutta-3' )
+          intermediate_timestep_count_max = 3
+
+       CASE DEFAULT
+          message_string = 'unknown timestep scheme: timestep_scheme = "' //   &
+                           TRIM( timestep_scheme ) // '"'
+          CALL message( 'check_parameters', 'PA0027', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+    IF ( (momentum_advec /= 'pw-scheme' .AND. momentum_advec /= 'ws-scheme')   &
+         .AND. timestep_scheme(1:5) == 'runge' ) THEN
+       message_string = 'momentum advection scheme "' // &
+                        TRIM( momentum_advec ) // '" & does not work with ' // &
+                        'timestep_scheme "' // TRIM( timestep_scheme ) // '"'
+       CALL message( 'check_parameters', 'PA0029', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- Check for proper settings for microphysics
+    IF ( bulk_cloud_model  .AND.  cloud_droplets )  THEN
+       message_string = 'bulk_cloud_model = .TRUE. is not allowed with ' //    &
+                        'cloud_droplets = .TRUE.'
+       CALL message( 'check_parameters', 'PA0442', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Collision kernels:
+    SELECT CASE ( TRIM( collision_kernel ) )
+
+       CASE ( 'hall', 'hall_fast' )
+          hall_kernel = .TRUE.
+
+       CASE ( 'wang', 'wang_fast' )
+          wang_kernel = .TRUE.
+
+       CASE ( 'none' )
+
+
+       CASE DEFAULT
+          message_string = 'unknown collision kernel: collision_kernel = "' // &
+                           TRIM( collision_kernel ) // '"'
+          CALL message( 'check_parameters', 'PA0350', 1, 2, 0, 6, 0 )
+
+    END SELECT
+    IF ( collision_kernel(6:9) == 'fast' )  use_kernel_tables = .TRUE.
+
+!
+!-- Initializing actions must have been set by the user
+    IF ( TRIM( initializing_actions ) == '' )  THEN
+       message_string = 'no value specified for initializing_actions'
+       CALL message( 'check_parameters', 'PA0149', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+!
+!--    No restart run: several initialising actions are possible
+       action = initializing_actions
+       DO  WHILE ( TRIM( action ) /= '' )
+          position = INDEX( action, ' ' )
+          SELECT CASE ( action(1:position-1) )
+
+             CASE ( 'set_constant_profiles', 'set_1d-model_profiles',          &
+                    'by_user', 'initialize_vortex', 'initialize_ptanom',       &
+                    'initialize_bubble', 'inifor' )
+                action = action(position+1:)
+
+             CASE DEFAULT
+                message_string = 'initializing_action = "' //                  &
+                                 TRIM( action ) // '" unknown or not allowed'
+                CALL message( 'check_parameters', 'PA0030', 1, 2, 0, 6, 0 )
+
+          END SELECT
+       ENDDO
+    ENDIF
+
+    IF ( TRIM( initializing_actions ) == 'initialize_vortex'  .AND.            &
+         conserve_volume_flow ) THEN
+         message_string = 'initializing_actions = "initialize_vortex"' //      &
+                        ' is not allowed with conserve_volume_flow = .T.'
+       CALL message( 'check_parameters', 'PA0343', 1, 2, 0, 6, 0 )
+    ENDIF
+
+
+    IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0  .AND.    &
+         INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+       message_string = 'initializing_actions = "set_constant_profiles"' //    &
+                        ' and "set_1d-model_profiles" are not allowed ' //     &
+                        'simultaneously'
+       CALL message( 'check_parameters', 'PA0031', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0  .AND.    &
+         INDEX( initializing_actions, 'by_user' ) /= 0 )  THEN
+       message_string = 'initializing_actions = "set_constant_profiles"' //    &
+                        ' and "by_user" are not allowed simultaneously'
+       CALL message( 'check_parameters', 'PA0032', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( INDEX( initializing_actions, 'by_user' ) /= 0  .AND.                  &
+         INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+       message_string = 'initializing_actions = "by_user" and ' //             &
+                        '"set_1d-model_profiles" are not allowed simultaneously'
+       CALL message( 'check_parameters', 'PA0033', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- In case of spinup and nested run, spinup end time must be identical 
+!-- in order to have synchronously running simulations. 
+    IF ( nested_run )  THEN
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( spinup_time, spinup_time_max, 1, MPI_REAL,          &
+                           MPI_MAX, MPI_COMM_WORLD, ierr )
+       CALL MPI_ALLREDUCE( dt_spinup,   dt_spinup_max,   1, MPI_REAL,          &
+                           MPI_MAX, MPI_COMM_WORLD, ierr )
+
+       IF ( spinup_time /= spinup_time_max  .OR.  dt_spinup /= dt_spinup_max ) &
+       THEN
+          message_string = 'In case of nesting, spinup_time and ' //           &
+                           'dt_spinup must be identical in all parent ' //     &
+                           'and child domains.'
+          CALL message( 'check_parameters', 'PA0489', 3, 2, 0, 6, 0 )
+       ENDIF
+#endif
+    ENDIF
+
+    IF ( bulk_cloud_model  .AND.  .NOT.  humidity )  THEN
+       WRITE( message_string, * ) 'bulk_cloud_model = ', bulk_cloud_model,     &
+              ' is not allowed with humidity = ', humidity
+       CALL message( 'check_parameters', 'PA0034', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( humidity  .AND.  sloping_surface )  THEN
+       message_string = 'humidity = .TRUE. and sloping_surface = .TRUE. ' //   &
+                        'are not allowed simultaneously'
+       CALL message( 'check_parameters', 'PA0036', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!   Check for chem_emission_mod parameters setting
+!   IF ( air_chemistry ) CALL chem_emissions_check_parameters   ! forkel preliminary
+
+
+!   Check for chemitry_model_mod parameters setting
+    IF ( air_chemistry )  CALL chem_check_parameters
+
+
+!-- Check the module settings
+    IF ( biometeorology )       CALL biom_check_parameters
+    IF ( bulk_cloud_model )     CALL bcm_check_parameters
+    IF ( gust_module_enabled )  CALL gust_check_parameters
+    IF ( large_scale_forcing  .OR.  nudging )                                  &
+                                CALL lsf_nudging_check_parameters
+    IF ( land_surface )         CALL lsm_check_parameters
+    IF ( ocean_mode )           CALL ocean_check_parameters
+    IF ( plant_canopy )         CALL pcm_check_parameters
+    IF ( radiation )            CALL radiation_check_parameters
+    IF ( calculate_spectra )    CALL spectra_check_parameters
+    CALL stg_check_parameters
+    CALL tcm_check_parameters
+    IF ( urban_surface )        CALL usm_check_parameters
+    IF ( wind_turbine )         CALL wtm_check_parameters
+!
+!-- Checks for surface data output
+    IF ( surface_data_output )  CALL surface_output_check_parameters
+!    
+!-- When SALSA is used, perform additional checks 
+    IF ( salsa )  CALL salsa_check_parameters     
+
+!
+!-- In case of no restart run, check initialising parameters and calculate
+!-- further quantities
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+
+!
+!--    Initial profiles for 1D and 3D model, respectively (u,v further below)
+       pt_init = pt_surface
+       IF ( humidity       )  q_init  = q_surface
+       IF ( passive_scalar )  s_init  = s_surface
+!
+!--    TODO
+!--    Russo: Is done in chem_init and would overwrite what is done there
+!--    --> kanani: Revise
+!      IF ( air_chemistry )  THEN
+!        DO lsp = 1, nvar
+!           chem_species(lsp)%conc_pr_init = cs_surface(lsp)      
+!        ENDDO
+!      ENDIF
+!
+!--
+!--    If required, compute initial profile of the geostrophic wind
+!--    (component ug)
+       i = 1
+       gradient = 0.0_wp
+
+       IF ( .NOT. ocean_mode )  THEN
+
+          ug_vertical_gradient_level_ind(1) = 0
+          ug(0) = ug_surface
+          DO  k = 1, nzt+1
+             IF ( i < 11 )  THEN
+                IF ( ug_vertical_gradient_level(i) < zu(k)  .AND.              &
+                     ug_vertical_gradient_level(i) >= 0.0_wp )  THEN
+                   gradient = ug_vertical_gradient(i) / 100.0_wp
+                   ug_vertical_gradient_level_ind(i) = k - 1
+                   i = i + 1
+                ENDIF
+             ENDIF
+             IF ( gradient /= 0.0_wp )  THEN
+                IF ( k /= 1 )  THEN
+                   ug(k) = ug(k-1) + dzu(k) * gradient
+                ELSE
+                   ug(k) = ug_surface + dzu(k) * gradient
+                ENDIF
+             ELSE
+                ug(k) = ug(k-1)
+             ENDIF
+          ENDDO
+
+       ELSE
+
+          ug_vertical_gradient_level_ind(1) = nzt+1
+          ug(nzt+1) = ug_surface
+          DO  k = nzt, nzb, -1
+             IF ( i < 11 )  THEN
+                IF ( ug_vertical_gradient_level(i) > zu(k)  .AND.              &
+                     ug_vertical_gradient_level(i) <= 0.0_wp )  THEN
+                   gradient = ug_vertical_gradient(i) / 100.0_wp
+                   ug_vertical_gradient_level_ind(i) = k + 1
+                   i = i + 1
+                ENDIF
+             ENDIF
+             IF ( gradient /= 0.0_wp )  THEN
+                IF ( k /= nzt )  THEN
+                   ug(k) = ug(k+1) - dzu(k+1) * gradient
+                ELSE
+                   ug(k)   = ug_surface - 0.5_wp * dzu(k+1) * gradient
+                   ug(k+1) = ug_surface + 0.5_wp * dzu(k+1) * gradient
+                ENDIF
+             ELSE
+                ug(k) = ug(k+1)
+             ENDIF
+          ENDDO
+
+       ENDIF
+
+!
+!--    In case of no given gradients for ug, choose a zero gradient
+       IF ( ug_vertical_gradient_level(1) == -9999999.9_wp )  THEN
+          ug_vertical_gradient_level(1) = 0.0_wp
+       ENDIF
+
+!
+!--
+!--    If required, compute initial profile of the geostrophic wind
+!--    (component vg)
+       i = 1
+       gradient = 0.0_wp
+
+       IF ( .NOT. ocean_mode )  THEN
+
+          vg_vertical_gradient_level_ind(1) = 0
+          vg(0) = vg_surface
+          DO  k = 1, nzt+1
+             IF ( i < 11 )  THEN
+                IF ( vg_vertical_gradient_level(i) < zu(k)  .AND.              &
+                     vg_vertical_gradient_level(i) >= 0.0_wp )  THEN
+                   gradient = vg_vertical_gradient(i) / 100.0_wp
+                   vg_vertical_gradient_level_ind(i) = k - 1
+                   i = i + 1
+                ENDIF
+             ENDIF
+             IF ( gradient /= 0.0_wp )  THEN
+                IF ( k /= 1 )  THEN
+                   vg(k) = vg(k-1) + dzu(k) * gradient
+                ELSE
+                   vg(k) = vg_surface + dzu(k) * gradient
+                ENDIF
+             ELSE
+                vg(k) = vg(k-1)
+             ENDIF
+          ENDDO
+
+       ELSE
+
+          vg_vertical_gradient_level_ind(1) = nzt+1
+          vg(nzt+1) = vg_surface
+          DO  k = nzt, nzb, -1
+             IF ( i < 11 )  THEN
+                IF ( vg_vertical_gradient_level(i) > zu(k)  .AND.              &
+                     vg_vertical_gradient_level(i) <= 0.0_wp )  THEN
+                   gradient = vg_vertical_gradient(i) / 100.0_wp
+                   vg_vertical_gradient_level_ind(i) = k + 1
+                   i = i + 1
+                ENDIF
+             ENDIF
+             IF ( gradient /= 0.0_wp )  THEN
+                IF ( k /= nzt )  THEN
+                   vg(k) = vg(k+1) - dzu(k+1) * gradient
+                ELSE
+                   vg(k)   = vg_surface - 0.5_wp * dzu(k+1) * gradient
+                   vg(k+1) = vg_surface + 0.5_wp * dzu(k+1) * gradient
+                ENDIF
+             ELSE
+                vg(k) = vg(k+1)
+             ENDIF
+          ENDDO
+
+       ENDIF
+
+!
+!--    In case of no given gradients for vg, choose a zero gradient
+       IF ( vg_vertical_gradient_level(1) == -9999999.9_wp )  THEN
+          vg_vertical_gradient_level(1) = 0.0_wp
+       ENDIF
+
+!
+!--    Let the initial wind profiles be the calculated ug/vg profiles or
+!--    interpolate them from wind profile data (if given)
+       IF ( u_profile(1) == 9999999.9_wp  .AND.  v_profile(1) == 9999999.9_wp )  THEN
+
+          u_init = ug
+          v_init = vg
+
+       ELSEIF ( u_profile(1) == 0.0_wp  .AND.  v_profile(1) == 0.0_wp )  THEN
+
+          IF ( uv_heights(1) /= 0.0_wp )  THEN
+             message_string = 'uv_heights(1) must be 0.0'
+             CALL message( 'check_parameters', 'PA0345', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( omega /= 0.0_wp )  THEN
+             message_string = 'Coriolis force must be switched off (by setting omega=0.0)' //  &
+                              ' when prescribing the forcing by u_profile and v_profile'
+             CALL message( 'check_parameters', 'PA0347', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          use_prescribed_profile_data = .TRUE.
+
+          kk = 1
+          u_init(0) = 0.0_wp
+          v_init(0) = 0.0_wp
+
+          DO  k = 1, nz+1
+
+             IF ( kk < 200 )  THEN
+                DO  WHILE ( uv_heights(kk+1) <= zu(k) )
+                   kk = kk + 1
+                   IF ( kk == 200 )  EXIT
+                ENDDO
+             ENDIF
+
+             IF ( kk < 200  .AND.  uv_heights(kk+1) /= 9999999.9_wp )  THEN
+                u_init(k) = u_profile(kk) + ( zu(k) - uv_heights(kk) ) /       &
+                                       ( uv_heights(kk+1) - uv_heights(kk) ) * &
+                                       ( u_profile(kk+1) - u_profile(kk) )
+                v_init(k) = v_profile(kk) + ( zu(k) - uv_heights(kk) ) /       &
+                                       ( uv_heights(kk+1) - uv_heights(kk) ) * &
+                                       ( v_profile(kk+1) - v_profile(kk) )
+             ELSE
+                u_init(k) = u_profile(kk)
+                v_init(k) = v_profile(kk)
+             ENDIF
+
+          ENDDO
+
+       ELSE
+
+          message_string = 'u_profile(1) and v_profile(1) must be 0.0'
+          CALL message( 'check_parameters', 'PA0346', 1, 2, 0, 6, 0 )
+
+       ENDIF
+
+!
+!--    Compute initial temperature profile using the given temperature gradients
+       IF (  .NOT.  neutral )  THEN
+          CALL init_vertical_profiles( pt_vertical_gradient_level_ind,          &
+                                       pt_vertical_gradient_level,              &
+                                       pt_vertical_gradient, pt_init,           &
+                                       pt_surface, bc_pt_t_val )
+       ENDIF
+!
+!--    Compute initial humidity profile using the given humidity gradients
+       IF ( humidity )  THEN
+          CALL init_vertical_profiles( q_vertical_gradient_level_ind,          &
+                                       q_vertical_gradient_level,              &
+                                       q_vertical_gradient, q_init,            &
+                                       q_surface, bc_q_t_val )
+       ENDIF
+!
+!--    Compute initial scalar profile using the given scalar gradients
+       IF ( passive_scalar )  THEN
+          CALL init_vertical_profiles( s_vertical_gradient_level_ind,          &
+                                       s_vertical_gradient_level,              &
+                                       s_vertical_gradient, s_init,            &
+                                       s_surface, bc_s_t_val )
+       ENDIF
+!
+!--    TODO
+!--    Compute initial chemistry profile using the given chemical species gradients
+!--    Russo: Is done in chem_init --> kanani: Revise
+
+    ENDIF
+
+!
+!-- Check if the control parameter use_subsidence_tendencies is used correctly
+    IF ( use_subsidence_tendencies  .AND.  .NOT.  large_scale_subsidence )  THEN
+       message_string = 'The usage of use_subsidence_tendencies ' //           &
+                            'requires large_scale_subsidence = .T..'
+       CALL message( 'check_parameters', 'PA0396', 1, 2, 0, 6, 0 )
+    ELSEIF ( use_subsidence_tendencies  .AND.  .NOT. large_scale_forcing )  THEN
+       message_string = 'The usage of use_subsidence_tendencies ' //           &
+                            'requires large_scale_forcing = .T..'
+       CALL message( 'check_parameters', 'PA0397', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Initialize large scale subsidence if required
+    If ( large_scale_subsidence )  THEN
+       IF ( subs_vertical_gradient_level(1) /= -9999999.9_wp  .AND.            &
+                                     .NOT.  large_scale_forcing )  THEN
+          CALL init_w_subsidence
+       ENDIF
+!
+!--    In case large_scale_forcing is used, profiles for subsidence velocity
+!--    are read in from file LSF_DATA
+
+       IF ( subs_vertical_gradient_level(1) == -9999999.9_wp  .AND.            &
+            .NOT.  large_scale_forcing )  THEN
+          message_string = 'There is no default large scale vertical ' //      &
+                           'velocity profile set. Specify the subsidence ' //  &
+                           'velocity profile via subs_vertical_gradient ' //   &
+                           'and subs_vertical_gradient_level.'
+          CALL message( 'check_parameters', 'PA0380', 1, 2, 0, 6, 0 )
+       ENDIF
+    ELSE
+        IF ( subs_vertical_gradient_level(1) /= -9999999.9_wp )  THEN
+           message_string = 'Enable usage of large scale subsidence by ' //    &
+                            'setting large_scale_subsidence = .T..'
+          CALL message( 'check_parameters', 'PA0381', 1, 2, 0, 6, 0 )
+        ENDIF
+    ENDIF
+
+!
+!-- Overwrite latitude if necessary and compute Coriolis parameter. 
+!-- @todo - move initialization of f and fs to coriolis_mod.
+    IF ( input_pids_static )  THEN
+       latitude  = init_model%latitude
+       longitude = init_model%longitude
+    ENDIF
+
+    f  = 2.0_wp * omega * SIN( latitude / 180.0_wp * pi )
+    fs = 2.0_wp * omega * COS( latitude / 180.0_wp * pi )
+
+!
+!-- Check and set buoyancy related parameters and switches
+    IF ( reference_state == 'horizontal_average' )  THEN
+       CONTINUE
+    ELSEIF ( reference_state == 'initial_profile' )  THEN
+       use_initial_profile_as_reference = .TRUE.
+    ELSEIF ( reference_state == 'single_value' )  THEN
+       use_single_reference_value = .TRUE.
+       IF ( pt_reference == 9999999.9_wp )  pt_reference = pt_surface
+       vpt_reference = pt_reference * ( 1.0_wp + 0.61_wp * q_surface )
+    ELSE
+       message_string = 'illegal value for reference_state: "' //              &
+                        TRIM( reference_state ) // '"'
+       CALL message( 'check_parameters', 'PA0056', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- In case of a given slope, compute the relevant quantities
+    IF ( alpha_surface /= 0.0_wp )  THEN
+       IF ( ABS( alpha_surface ) > 90.0_wp )  THEN
+          WRITE( message_string, * ) 'ABS( alpha_surface = ', alpha_surface,   &
+                                     ' ) must be < 90.0'
+          CALL message( 'check_parameters', 'PA0043', 1, 2, 0, 6, 0 )
+       ENDIF
+       sloping_surface = .TRUE.
+       cos_alpha_surface = COS( alpha_surface / 180.0_wp * pi )
+       sin_alpha_surface = SIN( alpha_surface / 180.0_wp * pi )
+    ENDIF
+
+!
+!-- Check time step and cfl_factor
+    IF ( dt /= -1.0_wp )  THEN
+       IF ( dt <= 0.0_wp )  THEN
+          WRITE( message_string, * ) 'dt = ', dt , ' <= 0.0'
+          CALL message( 'check_parameters', 'PA0044', 1, 2, 0, 6, 0 )
+       ENDIF
+       dt_3d = dt
+       dt_fixed = .TRUE.
+    ENDIF
+
+    IF ( cfl_factor <= 0.0_wp  .OR.  cfl_factor > 1.0_wp )  THEN
+       IF ( cfl_factor == -1.0_wp )  THEN
+          IF ( timestep_scheme == 'runge-kutta-2' )  THEN
+             cfl_factor = 0.8_wp
+          ELSEIF ( timestep_scheme == 'runge-kutta-3' )  THEN
+             cfl_factor = 0.9_wp
+          ELSE
+             cfl_factor = 0.9_wp
+          ENDIF
+       ELSE
+          WRITE( message_string, * ) 'cfl_factor = ', cfl_factor,              &
+                 ' out of range &0.0 < cfl_factor <= 1.0 is required'
+          CALL message( 'check_parameters', 'PA0045', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Store simulated time at begin
+    simulated_time_at_begin = simulated_time
+
+!
+!-- Store reference time for coupled runs and change the coupling flag,
+!-- if ...
+    IF ( simulated_time == 0.0_wp )  THEN
+       IF ( coupling_start_time == 0.0_wp )  THEN
+          time_since_reference_point = 0.0_wp
+       ELSEIF ( time_since_reference_point < 0.0_wp )  THEN
+          run_coupled = .FALSE.
+       ENDIF
+    ENDIF
+
+!
+!-- Set wind speed in the Galilei-transformed system
+    IF ( galilei_transformation )  THEN
+       IF ( use_ug_for_galilei_tr                    .AND.                     &
+            ug_vertical_gradient_level(1) == 0.0_wp  .AND.                     &
+            ug_vertical_gradient(1) == 0.0_wp        .AND.                     &
+            vg_vertical_gradient_level(1) == 0.0_wp  .AND.                     &
+            vg_vertical_gradient(1) == 0.0_wp )  THEN
+          u_gtrans = ug_surface * 0.6_wp
+          v_gtrans = vg_surface * 0.6_wp
+       ELSEIF ( use_ug_for_galilei_tr  .AND.                                   &
+                ( ug_vertical_gradient_level(1) /= 0.0_wp  .OR.                &
+                ug_vertical_gradient(1) /= 0.0_wp ) )  THEN
+          message_string = 'baroclinity (ug) not allowed simultaneously' //    &
+                           ' with galilei transformation'
+          CALL message( 'check_parameters', 'PA0046', 1, 2, 0, 6, 0 )
+       ELSEIF ( use_ug_for_galilei_tr  .AND.                                   &
+                ( vg_vertical_gradient_level(1) /= 0.0_wp  .OR.                &
+                vg_vertical_gradient(1) /= 0.0_wp ) )  THEN
+          message_string = 'baroclinity (vg) not allowed simultaneously' //    &
+                           ' with galilei transformation'
+          CALL message( 'check_parameters', 'PA0047', 1, 2, 0, 6, 0 )
+       ELSE
+          message_string = 'variable translation speed used for Galilei-' //   &
+             'transformation, which may cause & instabilities in stably ' //   &
+             'stratified regions'
+          CALL message( 'check_parameters', 'PA0048', 0, 1, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- In case of using a prandtl-layer, calculated (or prescribed) surface
+!-- fluxes have to be used in the diffusion-terms
+    IF ( constant_flux_layer )  use_surface_fluxes = .TRUE.
+
+!
+!-- Check boundary conditions and set internal variables:
+!-- Attention: the lateral boundary conditions have been already checked in
+!-- parin
+!
+!-- Non-cyclic lateral boundaries require the multigrid method and Piascek-
+!-- Willimas or Wicker - Skamarock advection scheme. Several schemes
+!-- and tools do not work with non-cyclic boundary conditions.
+    IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
+       IF ( psolver(1:9) /= 'multigrid' )  THEN
+          message_string = 'non-cyclic lateral boundaries do not allow ' //    &
+                           'psolver = "' // TRIM( psolver ) // '"'
+          CALL message( 'check_parameters', 'PA0051', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( momentum_advec /= 'pw-scheme'  .AND.                               &
+            momentum_advec /= 'ws-scheme' )  THEN
+
+          message_string = 'non-cyclic lateral boundaries do not allow ' //    &
+                           'momentum_advec = "' // TRIM( momentum_advec ) // '"'
+          CALL message( 'check_parameters', 'PA0052', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( scalar_advec /= 'pw-scheme'  .AND.                                 &
+            scalar_advec /= 'ws-scheme' )  THEN
+          message_string = 'non-cyclic lateral boundaries do not allow ' //    &
+                           'scalar_advec = "' // TRIM( scalar_advec ) // '"'
+          CALL message( 'check_parameters', 'PA0053', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( galilei_transformation )  THEN
+          message_string = 'non-cyclic lateral boundaries do not allow ' //    &
+                           'galilei_transformation = .T.'
+          CALL message( 'check_parameters', 'PA0054', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Bottom boundary condition for the turbulent Kinetic energy
+    IF ( bc_e_b == 'neumann' )  THEN
+       ibc_e_b = 1
+    ELSEIF ( bc_e_b == '(u*)**2+neumann' )  THEN
+       ibc_e_b = 2
+       IF ( .NOT. constant_flux_layer )  THEN
+          bc_e_b = 'neumann'
+          ibc_e_b = 1
+          message_string = 'boundary condition bc_e_b changed to "' //         &
+                           TRIM( bc_e_b ) // '"'
+          CALL message( 'check_parameters', 'PA0057', 0, 1, 0, 6, 0 )
+       ENDIF
+    ELSE
+       message_string = 'unknown boundary condition: bc_e_b = "' //            &
+                        TRIM( bc_e_b ) // '"'
+       CALL message( 'check_parameters', 'PA0058', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Boundary conditions for perturbation pressure
+    IF ( bc_p_b == 'dirichlet' )  THEN
+       ibc_p_b = 0
+    ELSEIF ( bc_p_b == 'neumann' )  THEN
+       ibc_p_b = 1
+    ELSE
+       message_string = 'unknown boundary condition: bc_p_b = "' //            &
+                        TRIM( bc_p_b ) // '"'
+       CALL message( 'check_parameters', 'PA0059', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( bc_p_t == 'dirichlet' )  THEN
+       ibc_p_t = 0
+!-- TO_DO: later set bc_p_t to neumann before, in case of nested domain
+    ELSEIF ( bc_p_t == 'neumann' .OR. bc_p_t == 'nested' )  THEN
+       ibc_p_t = 1
+    ELSE
+       message_string = 'unknown boundary condition: bc_p_t = "' //            &
+                        TRIM( bc_p_t ) // '"'
+       CALL message( 'check_parameters', 'PA0061', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Boundary conditions for potential temperature
+    IF ( coupling_mode == 'atmosphere_to_ocean' )  THEN
+       ibc_pt_b = 2
+    ELSE
+       IF ( bc_pt_b == 'dirichlet' )  THEN
+          ibc_pt_b = 0
+       ELSEIF ( bc_pt_b == 'neumann' )  THEN
+          ibc_pt_b = 1
+       ELSE
+          message_string = 'unknown boundary condition: bc_pt_b = "' //        &
+                           TRIM( bc_pt_b ) // '"'
+          CALL message( 'check_parameters', 'PA0062', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( bc_pt_t == 'dirichlet' )  THEN
+       ibc_pt_t = 0
+    ELSEIF ( bc_pt_t == 'neumann' )  THEN
+       ibc_pt_t = 1
+    ELSEIF ( bc_pt_t == 'initial_gradient' )  THEN
+       ibc_pt_t = 2
+    ELSEIF ( bc_pt_t == 'nested'  .OR.  bc_pt_t == 'nesting_offline' )  THEN
+       ibc_pt_t = 3
+    ELSE
+       message_string = 'unknown boundary condition: bc_pt_t = "' //           &
+                        TRIM( bc_pt_t ) // '"'
+       CALL message( 'check_parameters', 'PA0063', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( ANY( wall_heatflux /= 0.0_wp )  .AND.                        &
+         surface_heatflux == 9999999.9_wp )  THEN
+       message_string = 'wall_heatflux additionally requires ' //     &
+                        'setting of surface_heatflux'
+       CALL message( 'check_parameters', 'PA0443', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!   This IF clause needs revision, got too complex!!
+    IF ( surface_heatflux == 9999999.9_wp  )  THEN
+       constant_heatflux = .FALSE.
+       IF ( large_scale_forcing  .OR.  land_surface  .OR.  urban_surface )  THEN
+          IF ( ibc_pt_b == 0 )  THEN
+             constant_heatflux = .FALSE.
+          ELSEIF ( ibc_pt_b == 1 )  THEN
+             constant_heatflux = .TRUE.
+             surface_heatflux = 0.0_wp
+          ENDIF
+       ENDIF
+    ELSE
+       constant_heatflux = .TRUE.
+    ENDIF
+
+    IF ( top_heatflux     == 9999999.9_wp )  constant_top_heatflux = .FALSE.
+
+    IF ( neutral )  THEN
+
+       IF ( surface_heatflux /= 0.0_wp  .AND.                                  &
+            surface_heatflux /= 9999999.9_wp )  THEN
+          message_string = 'heatflux must not be set for pure neutral flow'
+          CALL message( 'check_parameters', 'PA0351', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( top_heatflux /= 0.0_wp  .AND.  top_heatflux /= 9999999.9_wp )      &
+       THEN
+          message_string = 'heatflux must not be set for pure neutral flow'
+          CALL message( 'check_parameters', 'PA0351', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ENDIF
+
+    IF ( top_momentumflux_u /= 9999999.9_wp  .AND.                             &
+         top_momentumflux_v /= 9999999.9_wp )  THEN
+       constant_top_momentumflux = .TRUE.
+    ELSEIF (  .NOT. ( top_momentumflux_u == 9999999.9_wp  .AND.                &
+           top_momentumflux_v == 9999999.9_wp ) )  THEN
+       message_string = 'both, top_momentumflux_u AND top_momentumflux_v ' //  &
+                        'must be set'
+       CALL message( 'check_parameters', 'PA0064', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- A given surface temperature implies Dirichlet boundary condition for
+!-- temperature. In this case specification of a constant heat flux is
+!-- forbidden.
+    IF ( ibc_pt_b == 0  .AND.  constant_heatflux  .AND.                        &
+         surface_heatflux /= 0.0_wp )  THEN
+       message_string = 'boundary_condition: bc_pt_b = "' // TRIM( bc_pt_b ) //&
+                        '& is not allowed with constant_heatflux = .TRUE.'
+       CALL message( 'check_parameters', 'PA0065', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( constant_heatflux  .AND.  pt_surface_initial_change /= 0.0_wp )  THEN
+       WRITE ( message_string, * )  'constant_heatflux = .TRUE. is not allo',  &
+               'wed with pt_surface_initial_change (/=0) = ',                  &
+               pt_surface_initial_change
+       CALL message( 'check_parameters', 'PA0066', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- A given temperature at the top implies Dirichlet boundary condition for
+!-- temperature. In this case specification of a constant heat flux is
+!-- forbidden.
+    IF ( ibc_pt_t == 0  .AND.  constant_top_heatflux  .AND.                    &
+         top_heatflux /= 0.0_wp )  THEN
+       message_string = 'boundary_condition: bc_pt_t = "' // TRIM( bc_pt_t ) //&
+                        '" is not allowed with constant_top_heatflux = .TRUE.'
+       CALL message( 'check_parameters', 'PA0067', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Set boundary conditions for total water content
+    IF ( humidity )  THEN
+
+       IF ( ANY( wall_humidityflux /= 0.0_wp )  .AND.                        &
+            surface_waterflux == 9999999.9_wp )  THEN
+          message_string = 'wall_humidityflux additionally requires ' //     &
+                           'setting of surface_waterflux'
+          CALL message( 'check_parameters', 'PA0444', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       CALL set_bc_scalars( 'q', bc_q_b, bc_q_t, ibc_q_b, ibc_q_t,           &
+                            'PA0071', 'PA0072' )
+
+       IF ( surface_waterflux == 9999999.9_wp  )  THEN
+          constant_waterflux = .FALSE.
+          IF ( large_scale_forcing .OR. land_surface )  THEN
+             IF ( ibc_q_b == 0 )  THEN
+                constant_waterflux = .FALSE.
+             ELSEIF ( ibc_q_b == 1 )  THEN
+                constant_waterflux = .TRUE.
+             ENDIF
+          ENDIF
+       ELSE
+          constant_waterflux = .TRUE.
+       ENDIF
+
+       CALL check_bc_scalars( 'q', bc_q_b, ibc_q_b, 'PA0073', 'PA0074',        &
+                              constant_waterflux, q_surface_initial_change )
+
+    ENDIF
+
+    IF ( passive_scalar )  THEN
+
+       IF ( ANY( wall_scalarflux /= 0.0_wp )  .AND.                            &
+            surface_scalarflux == 9999999.9_wp )  THEN
+          message_string = 'wall_scalarflux additionally requires ' //         &
+                           'setting of surface_scalarflux'
+          CALL message( 'check_parameters', 'PA0445', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( surface_scalarflux == 9999999.9_wp )  constant_scalarflux = .FALSE.
+
+       CALL set_bc_scalars( 's', bc_s_b, bc_s_t, ibc_s_b, ibc_s_t,             &
+                            'PA0071', 'PA0072' )
+
+       CALL check_bc_scalars( 's', bc_s_b, ibc_s_b, 'PA0073', 'PA0074',        &
+                              constant_scalarflux, s_surface_initial_change )
+
+       IF ( top_scalarflux == 9999999.9_wp )  constant_top_scalarflux = .FALSE.
+!
+!--    A fixed scalar concentration at the top implies Dirichlet boundary
+!--    condition for scalar. Hence, in this case specification of a constant
+!--    scalar flux is forbidden.
+       IF ( ( ibc_s_t == 0 .OR. ibc_s_t == 2 )  .AND.  constant_top_scalarflux &
+               .AND.  top_scalarflux /= 0.0_wp )  THEN
+          message_string = 'boundary condition: bc_s_t = "' //                 &
+                           TRIM( bc_s_t ) // '" is not allowed with ' //       &
+                           'top_scalarflux /= 0.0'
+          CALL message( 'check_parameters', 'PA0441', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Boundary conditions for chemical species
+    IF ( air_chemistry )  CALL chem_boundary_conds( 'init' )
+
+!
+!-- Boundary conditions for horizontal components of wind speed
+    IF ( bc_uv_b == 'dirichlet' )  THEN
+       ibc_uv_b = 0
+    ELSEIF ( bc_uv_b == 'neumann' )  THEN
+       ibc_uv_b = 1
+       IF ( constant_flux_layer )  THEN
+          message_string = 'boundary condition: bc_uv_b = "' //                &
+               TRIM( bc_uv_b ) // '" is not allowed with constant_flux_layer'  &
+               // ' = .TRUE.'
+          CALL message( 'check_parameters', 'PA0075', 1, 2, 0, 6, 0 )
+       ENDIF
+    ELSE
+       message_string = 'unknown boundary condition: bc_uv_b = "' //           &
+                        TRIM( bc_uv_b ) // '"'
+       CALL message( 'check_parameters', 'PA0076', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- In case of coupled simulations u and v at the ground in atmosphere will be
+!-- assigned with the u and v values of the ocean surface
+    IF ( coupling_mode == 'atmosphere_to_ocean' )  THEN
+       ibc_uv_b = 2
+    ENDIF
+
+    IF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
+       bc_uv_t = 'neumann'
+       ibc_uv_t = 1
+    ELSE
+       IF ( bc_uv_t == 'dirichlet' .OR. bc_uv_t == 'dirichlet_0' )  THEN
+          ibc_uv_t = 0
+          IF ( bc_uv_t == 'dirichlet_0' )  THEN
+!
+!--          Velocities for the initial u,v-profiles are set zero at the top
+!--          in case of dirichlet_0 conditions
+             u_init(nzt+1)    = 0.0_wp
+             v_init(nzt+1)    = 0.0_wp
+          ENDIF
+       ELSEIF ( bc_uv_t == 'neumann' )  THEN
+          ibc_uv_t = 1
+       ELSEIF ( bc_uv_t == 'nested'  .OR.  bc_uv_t == 'nesting_offline' )  THEN
+          ibc_uv_t = 3
+       ELSE
+          message_string = 'unknown boundary condition: bc_uv_t = "' //        &
+                           TRIM( bc_uv_t ) // '"'
+          CALL message( 'check_parameters', 'PA0077', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Compute and check, respectively, the Rayleigh Damping parameter
+    IF ( rayleigh_damping_factor == -1.0_wp )  THEN
+       rayleigh_damping_factor = 0.0_wp
+    ELSE
+       IF ( rayleigh_damping_factor < 0.0_wp  .OR.                             &
+            rayleigh_damping_factor > 1.0_wp )  THEN
+          WRITE( message_string, * )  'rayleigh_damping_factor = ',            &
+                              rayleigh_damping_factor, ' out of range [0.0,1.0]'
+          CALL message( 'check_parameters', 'PA0078', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( rayleigh_damping_height == -1.0_wp )  THEN
+       IF (  .NOT.  ocean_mode )  THEN
+          rayleigh_damping_height = 0.66666666666_wp * zu(nzt)
+       ELSE
+          rayleigh_damping_height = 0.66666666666_wp * zu(nzb)
+       ENDIF
+    ELSE
+       IF (  .NOT.  ocean_mode )  THEN
+          IF ( rayleigh_damping_height < 0.0_wp  .OR.                          &
+               rayleigh_damping_height > zu(nzt) )  THEN
+             WRITE( message_string, * )  'rayleigh_damping_height = ',         &
+                   rayleigh_damping_height, ' out of range [0.0,', zu(nzt), ']'
+             CALL message( 'check_parameters', 'PA0079', 1, 2, 0, 6, 0 )
+          ENDIF
+       ELSE
+          IF ( rayleigh_damping_height > 0.0_wp  .OR.                          &
+               rayleigh_damping_height < zu(nzb) )  THEN
+             WRITE( message_string, * )  'rayleigh_damping_height = ',         &
+                   rayleigh_damping_height, ' out of range [0.0,', zu(nzb), ']'
+             CALL message( 'check_parameters', 'PA0079', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+    ENDIF
+
+!
+!-- Check number of chosen statistic regions
+    IF ( statistic_regions < 0 )  THEN
+       WRITE ( message_string, * ) 'number of statistic_regions = ',           &
+                   statistic_regions+1, ' is not allowed'
+       CALL message( 'check_parameters', 'PA0082', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( normalizing_region > statistic_regions  .OR.                          &
+         normalizing_region < 0)  THEN
+       WRITE ( message_string, * ) 'normalizing_region = ',                    &
+                normalizing_region, ' must be >= 0 and <= ',statistic_regions, &
+                ' (value of statistic_regions)'
+       CALL message( 'check_parameters', 'PA0083', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Set the default intervals for data output, if necessary
+!-- NOTE: dt_dosp has already been set in spectra_parin
+    IF ( dt_data_output /= 9999999.9_wp )  THEN
+       IF ( dt_dopr           == 9999999.9_wp )  dt_dopr           = dt_data_output
+       IF ( dt_dopts          == 9999999.9_wp )  dt_dopts          = dt_data_output
+       IF ( dt_do2d_xy        == 9999999.9_wp )  dt_do2d_xy        = dt_data_output
+       IF ( dt_do2d_xz        == 9999999.9_wp )  dt_do2d_xz        = dt_data_output
+       IF ( dt_do2d_yz        == 9999999.9_wp )  dt_do2d_yz        = dt_data_output
+       IF ( dt_do3d           == 9999999.9_wp )  dt_do3d           = dt_data_output
+       IF ( dt_data_output_av == 9999999.9_wp )  dt_data_output_av = dt_data_output
+       DO  mid = 1, max_masks
+          IF ( dt_domask(mid) == 9999999.9_wp )  dt_domask(mid)    = dt_data_output
+       ENDDO
+    ENDIF
+
+!
+!-- Set the default skip time intervals for data output, if necessary
+    IF ( skip_time_dopr    == 9999999.9_wp )                                   &
+                                       skip_time_dopr    = skip_time_data_output
+    IF ( skip_time_do2d_xy == 9999999.9_wp )                                   &
+                                       skip_time_do2d_xy = skip_time_data_output
+    IF ( skip_time_do2d_xz == 9999999.9_wp )                                   &
+                                       skip_time_do2d_xz = skip_time_data_output
+    IF ( skip_time_do2d_yz == 9999999.9_wp )                                   &
+                                       skip_time_do2d_yz = skip_time_data_output
+    IF ( skip_time_do3d    == 9999999.9_wp )                                   &
+                                       skip_time_do3d    = skip_time_data_output
+    IF ( skip_time_data_output_av == 9999999.9_wp )                            &
+                                skip_time_data_output_av = skip_time_data_output
+    DO  mid = 1, max_masks
+       IF ( skip_time_domask(mid) == 9999999.9_wp )                            &
+                                skip_time_domask(mid)    = skip_time_data_output
+    ENDDO
+
+!
+!-- Check the average intervals (first for 3d-data, then for profiles)
+    IF ( averaging_interval > dt_data_output_av )  THEN
+       WRITE( message_string, * )  'averaging_interval = ',                    &
+             averaging_interval, ' must be <= dt_data_output_av = ',           &
+             dt_data_output_av
+       CALL message( 'check_parameters', 'PA0085', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( averaging_interval_pr == 9999999.9_wp )  THEN
+       averaging_interval_pr = averaging_interval
+    ENDIF
+
+    IF ( averaging_interval_pr > dt_dopr )  THEN
+       WRITE( message_string, * )  'averaging_interval_pr = ',                 &
+             averaging_interval_pr, ' must be <= dt_dopr = ', dt_dopr
+       CALL message( 'check_parameters', 'PA0086', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Set the default interval for profiles entering the temporal average
+    IF ( dt_averaging_input_pr == 9999999.9_wp )  THEN
+       dt_averaging_input_pr = dt_averaging_input
+    ENDIF
+
+!
+!-- Set the default interval for the output of timeseries to a reasonable
+!-- value (tries to minimize the number of calls of flow_statistics)
+    IF ( dt_dots == 9999999.9_wp )  THEN
+       IF ( averaging_interval_pr == 0.0_wp )  THEN
+          dt_dots = MIN( dt_run_control, dt_dopr )
+       ELSE
+          dt_dots = MIN( dt_run_control, dt_averaging_input_pr )
+       ENDIF
+    ENDIF
+
+!
+!-- Check the sample rate for averaging (first for 3d-data, then for profiles)
+    IF ( dt_averaging_input > averaging_interval )  THEN
+       WRITE( message_string, * )  'dt_averaging_input = ',                    &
+                dt_averaging_input, ' must be <= averaging_interval = ',       &
+                averaging_interval
+       CALL message( 'check_parameters', 'PA0088', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( dt_averaging_input_pr > averaging_interval_pr )  THEN
+       WRITE( message_string, * )  'dt_averaging_input_pr = ',                 &
+                dt_averaging_input_pr, ' must be <= averaging_interval_pr = ', &
+                averaging_interval_pr
+       CALL message( 'check_parameters', 'PA0089', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Determine the number of output profiles and check whether they are
+!-- permissible
+    DO  WHILE ( data_output_pr(dopr_n+1) /= '          ' )
+
+       dopr_n = dopr_n + 1
+       i = dopr_n
+
+!
+!--    Determine internal profile number (for hom, homs)
+!--    and store height levels
+       SELECT CASE ( TRIM( data_output_pr(i) ) )
+
+          CASE ( 'u', '#u' )
+             dopr_index(i) = 1
+             dopr_unit(i)  = 'm/s'
+             hom(:,2,1,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 5
+                hom(:,2,5,:)          = SPREAD( zu, 2, statistic_regions+1 )
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'v', '#v' )
+             dopr_index(i) = 2
+             dopr_unit(i)  = 'm/s'
+             hom(:,2,2,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 6
+                hom(:,2,6,:)          = SPREAD( zu, 2, statistic_regions+1 )
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'w' )
+             dopr_index(i) = 3
+             dopr_unit(i)  = 'm/s'
+             hom(:,2,3,:)  = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'theta', '#theta' )
+             IF ( .NOT. bulk_cloud_model ) THEN
+                dopr_index(i) = 4
+                dopr_unit(i)  = 'K'
+                hom(:,2,4,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 7
+                   hom(:,2,7,:)          = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,7,:)        = 0.0_wp    ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ELSE
+                dopr_index(i) = 43
+                dopr_unit(i)  = 'K'
+                hom(:,2,43,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 28
+                   hom(:,2,28,:)         = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,28,:)       = 0.0_wp    ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ENDIF
+
+          CASE ( 'e', '#e' )
+             dopr_index(i)  = 8
+             dopr_unit(i)   = 'm2/s2'
+             hom(:,2,8,:)   = SPREAD( zu, 2, statistic_regions+1 )
+             hom(nzb,2,8,:) = 0.0_wp
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 8
+                hom(:,2,8,:)          = SPREAD( zu, 2, statistic_regions+1 )
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'km', '#km' )
+             dopr_index(i)  = 9
+             dopr_unit(i)   = 'm2/s'
+             hom(:,2,9,:)   = SPREAD( zu, 2, statistic_regions+1 )
+             hom(nzb,2,9,:) = 0.0_wp
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 23
+                hom(:,2,23,:)         = hom(:,2,9,:)
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'kh', '#kh' )
+             dopr_index(i)   = 10
+             dopr_unit(i)    = 'm2/s'
+             hom(:,2,10,:)   = SPREAD( zu, 2, statistic_regions+1 )
+             hom(nzb,2,10,:) = 0.0_wp
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 24
+                hom(:,2,24,:)         = hom(:,2,10,:)
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'l', '#l' )
+             dopr_index(i)   = 11
+             dopr_unit(i)    = 'm'
+             hom(:,2,11,:)   = SPREAD( zu, 2, statistic_regions+1 )
+             hom(nzb,2,11,:) = 0.0_wp
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 25
+                hom(:,2,25,:)         = hom(:,2,11,:)
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'w"u"' )
+             dopr_index(i) = 12
+             dopr_unit(i)  = TRIM ( momentumflux_output_unit )
+             hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 )
+             IF ( constant_flux_layer )  hom(nzb,2,12,:) = zu(1)
+
+          CASE ( 'w*u*' )
+             dopr_index(i) = 13
+             dopr_unit(i)  = TRIM ( momentumflux_output_unit )
+             hom(:,2,13,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w"v"' )
+             dopr_index(i) = 14
+             dopr_unit(i)  = TRIM ( momentumflux_output_unit )
+             hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 )
+             IF ( constant_flux_layer )  hom(nzb,2,14,:) = zu(1)
+
+          CASE ( 'w*v*' )
+             dopr_index(i) = 15
+             dopr_unit(i)  = TRIM ( momentumflux_output_unit )
+             hom(:,2,15,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w"theta"' )
+             dopr_index(i) = 16
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,16,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w*theta*' )
+             dopr_index(i) = 17
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,17,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'wtheta' )
+             dopr_index(i) = 18
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,18,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'wu' )
+             dopr_index(i) = 19
+             dopr_unit(i)  = TRIM ( momentumflux_output_unit )
+             hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 )
+             IF ( constant_flux_layer )  hom(nzb,2,19,:) = zu(1)
+
+          CASE ( 'wv' )
+             dopr_index(i) = 20
+             dopr_unit(i)  = TRIM ( momentumflux_output_unit )
+             hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 )
+             IF ( constant_flux_layer )  hom(nzb,2,20,:) = zu(1)
+
+          CASE ( 'w*theta*BC' )
+             dopr_index(i) = 21
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,21,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'wthetaBC' )
+             dopr_index(i) = 22
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,22,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'u*2' )
+             dopr_index(i) = 30
+             dopr_unit(i)  = 'm2/s2'
+             hom(:,2,30,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'v*2' )
+             dopr_index(i) = 31
+             dopr_unit(i)  = 'm2/s2'
+             hom(:,2,31,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'w*2' )
+             dopr_index(i) = 32
+             dopr_unit(i)  = 'm2/s2'
+             hom(:,2,32,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'theta*2' )
+             dopr_index(i) = 33
+             dopr_unit(i)  = 'K2'
+             hom(:,2,33,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'e*' )
+             dopr_index(i) = 34
+             dopr_unit(i)  = 'm2/s2'
+             hom(:,2,34,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'w*2pt*' )
+             dopr_index(i) = 35
+             dopr_unit(i)  = 'K m2/s2'
+             hom(:,2,35,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w*pt*2' )
+             dopr_index(i) = 36
+             dopr_unit(i)  = 'K2 m/s'
+             hom(:,2,36,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w*e*' )
+             dopr_index(i) = 37
+             dopr_unit(i)  = 'm3/s3'
+             hom(:,2,37,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w*3' )
+             dopr_index(i) = 38
+             dopr_unit(i)  = 'm3/s3'
+             hom(:,2,38,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'Sw' )
+             dopr_index(i) = 39
+             dopr_unit(i)  = 'none'
+             hom(:,2,39,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'p' )
+             dopr_index(i) = 40
+             dopr_unit(i)  = 'Pa'
+             hom(:,2,40,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'q', '#q' )
+             IF ( .NOT. humidity )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 41
+                dopr_unit(i)  = 'kg/kg'
+                hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 26
+                   hom(:,2,26,:)         = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,26,:)       = 0.0_wp    ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ENDIF
+
+          CASE ( 's', '#s' )
+             IF ( .NOT. passive_scalar )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 115
+                dopr_unit(i)  = 'kg/m3'
+                hom(:,2,115,:) = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 121
+                   hom(:,2,121,:)        = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,121,:)      = 0.0_wp    ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ENDIF
+
+          CASE ( 'qv', '#qv' )
+             IF ( .NOT. bulk_cloud_model ) THEN
+                dopr_index(i) = 41
+                dopr_unit(i)  = 'kg/kg'
+                hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 26
+                   hom(:,2,26,:)         = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,26,:)       = 0.0_wp    ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ELSE
+                dopr_index(i) = 42
+                dopr_unit(i)  = 'kg/kg'
+                hom(:,2,42,:) = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 27
+                   hom(:,2,27,:)         = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,27,:)       = 0.0_wp   ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ENDIF
+
+          CASE ( 'thetal', '#thetal' )
+             IF ( .NOT. bulk_cloud_model ) THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for bulk_cloud_model = .FALSE.'
+                CALL message( 'check_parameters', 'PA0094', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 4
+                dopr_unit(i)  = 'K'
+                hom(:,2,4,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                   dopr_initial_index(i) = 7
+                   hom(:,2,7,:)          = SPREAD( zu, 2, statistic_regions+1 )
+                   hom(nzb,2,7,:)        = 0.0_wp    ! because zu(nzb) is negative
+                   data_output_pr(i)     = data_output_pr(i)(2:)
+                ENDIF
+             ENDIF
+
+          CASE ( 'thetav', '#thetav' )
+             dopr_index(i) = 44
+             dopr_unit(i)  = 'K'
+             hom(:,2,44,:) = SPREAD( zu, 2, statistic_regions+1 )
+             IF ( data_output_pr(i)(1:1) == '#' )  THEN
+                dopr_initial_index(i) = 29
+                hom(:,2,29,:)         = SPREAD( zu, 2, statistic_regions+1 )
+                hom(nzb,2,29,:)       = 0.0_wp    ! because zu(nzb) is negative
+                data_output_pr(i)     = data_output_pr(i)(2:)
+             ENDIF
+
+          CASE ( 'w"thetav"' )
+             dopr_index(i) = 45
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,45,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w*thetav*' )
+             dopr_index(i) = 46
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,46,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'wthetav' )
+             dopr_index(i) = 47
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,47,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w"q"' )
+             IF (  .NOT.  humidity )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 48
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'w*q*' )
+             IF (  .NOT.  humidity )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 49
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'wq' )
+             IF (  .NOT.  humidity )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 50
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'w"s"' )
+             IF (  .NOT.  passive_scalar )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 117
+                dopr_unit(i)  = 'kg/m3 m/s'
+                hom(:,2,117,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'w*s*' )
+             IF (  .NOT.  passive_scalar )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 114
+                dopr_unit(i)  = 'kg/m3 m/s'
+                hom(:,2,114,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'ws' )
+             IF (  .NOT.  passive_scalar )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL message( 'check_parameters', 'PA0093', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 118
+                dopr_unit(i)  = 'kg/m3 m/s'
+                hom(:,2,118,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'w"qv"' )
+             IF ( humidity  .AND.  .NOT.  bulk_cloud_model )  THEN
+                dopr_index(i) = 48
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ELSEIF ( humidity  .AND.  bulk_cloud_model )  THEN
+                dopr_index(i) = 51
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ELSE
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 )
+             ENDIF
+
+          CASE ( 'w*qv*' )
+             IF ( humidity  .AND.  .NOT. bulk_cloud_model )  THEN
+                dopr_index(i) = 49
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ELSEIF( humidity .AND. bulk_cloud_model ) THEN
+                dopr_index(i) = 52
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ELSE
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 )
+             ENDIF
+
+          CASE ( 'wqv' )
+             IF ( humidity  .AND.  .NOT.  bulk_cloud_model )  THEN
+                dopr_index(i) = 50
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ELSEIF ( humidity  .AND.  bulk_cloud_model )  THEN
+                dopr_index(i) = 53
+                dopr_unit(i)  = TRIM ( waterflux_output_unit )
+                hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 )
+             ELSE
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0095', 1, 2, 0, 6, 0 )
+             ENDIF
+
+          CASE ( 'ql' )
+             IF (  .NOT.  bulk_cloud_model  .AND.  .NOT.  cloud_droplets )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for bulk_cloud_model = .FALSE. ' // &
+                                 'and cloud_droplets = .FALSE.'
+                CALL message( 'check_parameters', 'PA0096', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 54
+                dopr_unit(i)  = 'kg/kg'
+                hom(:,2,54,:)  = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'w*u*u*:dz' )
+             dopr_index(i) = 55
+             dopr_unit(i)  = 'm2/s3'
+             hom(:,2,55,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'w*p*:dz' )
+             dopr_index(i) = 56
+             dopr_unit(i)  = 'm2/s3'
+             hom(:,2,56,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'w"e:dz' )
+             dopr_index(i) = 57
+             dopr_unit(i)  = 'm2/s3'
+             hom(:,2,57,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'u"theta"' )
+             dopr_index(i) = 58
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,58,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'u*theta*' )
+             dopr_index(i) = 59
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,59,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'utheta_t' )
+             dopr_index(i) = 60
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,60,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'v"theta"' )
+             dopr_index(i) = 61
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,61,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'v*theta*' )
+             dopr_index(i) = 62
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,62,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'thetav_t' )
+             dopr_index(i) = 63
+             dopr_unit(i)  = TRIM ( heatflux_output_unit )
+             hom(:,2,63,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'w*p*' )
+             dopr_index(i) = 68
+             dopr_unit(i)  = 'm3/s3'
+             hom(:,2,68,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'w"e' )
+             dopr_index(i) = 69
+             dopr_unit(i)  = 'm3/s3'
+             hom(:,2,69,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'q*2' )
+             IF (  .NOT.  humidity )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for humidity = .FALSE.'
+                CALL message( 'check_parameters', 'PA0092', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 70
+                dopr_unit(i)  = 'kg2/kg2'
+                hom(:,2,70,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'hyp' )
+             dopr_index(i) = 72
+             dopr_unit(i)  = 'hPa'
+             hom(:,2,72,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'rho' )
+             dopr_index(i)  = 119
+             dopr_unit(i)   = 'kg/m3'
+             hom(:,2,119,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'rho_zw' )
+             dopr_index(i)  = 120
+             dopr_unit(i)   = 'kg/m3'
+             hom(:,2,120,:) = SPREAD( zw, 2, statistic_regions+1 )
+
+          CASE ( 'ug' )
+             dopr_index(i) = 78
+             dopr_unit(i)  = 'm/s'
+             hom(:,2,78,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'vg' )
+             dopr_index(i) = 79
+             dopr_unit(i)  = 'm/s'
+             hom(:,2,79,:) = SPREAD( zu, 2, statistic_regions+1 )
+
+          CASE ( 'w_subs' )
+             IF (  .NOT.  large_scale_subsidence )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for large_scale_subsidence = .FALSE.'
+                CALL message( 'check_parameters', 'PA0382', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 80
+                dopr_unit(i)  = 'm/s'
+                hom(:,2,80,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 's*2' )
+             IF (  .NOT.  passive_scalar )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(i) ) // ' is not imp' // &
+                                 'lemented for passive_scalar = .FALSE.'
+                CALL message( 'check_parameters', 'PA0185', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(i) = 116
+                dopr_unit(i)  = 'kg2/m6'
+                hom(:,2,116,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE DEFAULT
+             unit = 'illegal'
+!
+!--          Check for other modules
+             IF ( unit == 'illegal' .AND.  bulk_cloud_model )  THEN
+                CALL bcm_check_data_output_pr( data_output_pr(i), i, unit,     &
+                                               dopr_unit(i) )
+             ENDIF
+
+             IF ( unit == 'illegal' .AND.  air_chemistry )  THEN
+                CALL chem_check_data_output_pr( data_output_pr(i), i, unit,    &
+                                                dopr_unit(i) )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  gust_module_enabled  )  THEN
+                CALL gust_check_data_output_pr( data_output_pr(i), i, unit,    &
+                                                dopr_unit(i) )
+             ENDIF
+
+             IF ( unit == 'illegal' )  THEN
+                CALL lsf_nudging_check_data_output_pr( data_output_pr(i), i,   &
+                                                       unit, dopr_unit(i) )
+             ENDIF
+
+             IF ( unit == 'illegal' )  THEN
+                CALL lsm_check_data_output_pr( data_output_pr(i), i, unit,        &
+                                            dopr_unit(i) )
+             ENDIF
+             IF ( unit == 'illegal' )  THEN
+                CALL ocean_check_data_output_pr( data_output_pr(i), i, unit,   &
+                                                 dopr_unit(i) )
+             ENDIF
+
+             IF ( unit == 'illegal' )  THEN
+                CALL radiation_check_data_output_pr( data_output_pr(i), i,     &
+                                                     unit, dopr_unit(i) )
+             ENDIF
+
+!
+!--          Finally, check for user defined quantities
+             IF ( unit == 'illegal' )  THEN
+                unit = ''
+                CALL user_check_data_output_pr( data_output_pr(i), i, unit )
+             ENDIF
+
+!
+!--          No valid quantity found
+             IF ( unit == 'illegal' )  THEN
+                IF ( data_output_pr_user(1) /= ' ' )  THEN
+                   message_string = 'illegal value for data_output_pr or ' //  &
+                                    'data_output_pr_user = "' //               &
+                                    TRIM( data_output_pr(i) ) // '"'
+                   CALL message( 'check_parameters', 'PA0097', 1, 2, 0, 6, 0 )
+                ELSE
+                   message_string = 'illegal value for data_output_pr = "' //  &
+                                    TRIM( data_output_pr(i) ) // '"'
+                   CALL message( 'check_parameters', 'PA0098', 1, 2, 0, 6, 0 )
+                ENDIF
+             ENDIF
+
+       END SELECT
+
+    ENDDO
+
+
+!
+!-- Append user-defined data output variables to the standard data output
+    IF ( data_output_user(1) /= ' ' )  THEN
+       i = 1
+       DO  WHILE ( data_output(i) /= ' '  .AND.  i <= 500 )
+          i = i + 1
+       ENDDO
+       j = 1
+       DO  WHILE ( data_output_user(j) /= ' '  .AND.  j <= 500 )
+          IF ( i > 500 )  THEN
+             message_string = 'number of output quantitities given by data' // &
+                '_output and data_output_user exceeds the limit of 500'
+             CALL message( 'check_parameters', 'PA0102', 1, 2, 0, 6, 0 )
+          ENDIF
+          data_output(i) = data_output_user(j)
+          i = i + 1
+          j = j + 1
+       ENDDO
+    ENDIF
+
+!
+!-- Check and set steering parameters for 2d/3d data output and averaging
+    i   = 1
+    DO  WHILE ( data_output(i) /= ' '  .AND.  i <= 500 )
+!
+!--    Check for data averaging
+       ilen = LEN_TRIM( data_output(i) )
+       j = 0                                                 ! no data averaging
+       IF ( ilen > 3 )  THEN
+          IF ( data_output(i)(ilen-2:ilen) == '_av' )  THEN
+             j = 1                                           ! data averaging
+             data_output(i) = data_output(i)(1:ilen-3)
+          ENDIF
+       ENDIF
+!
+!--    Check for cross section or volume data
+       ilen = LEN_TRIM( data_output(i) )
+       k = 0                                                   ! 3d data
+       var = data_output(i)(1:ilen)
+       IF ( ilen > 3 )  THEN
+          IF ( data_output(i)(ilen-2:ilen) == '_xy'  .OR.                      &
+               data_output(i)(ilen-2:ilen) == '_xz'  .OR.                      &
+               data_output(i)(ilen-2:ilen) == '_yz' )  THEN
+             k = 1                                             ! 2d data
+             var = data_output(i)(1:ilen-3)
+          ENDIF
+       ENDIF
+
+!
+!--    Check for allowed value and set units
+       SELECT CASE ( TRIM( var ) )
+
+          CASE ( 'e' )
+             IF ( constant_diffusion )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res constant_diffusion = .FALSE.'
+                CALL message( 'check_parameters', 'PA0103', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'm2/s2'
+
+          CASE ( 'thetal' )
+             IF (  .NOT.  bulk_cloud_model )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                         'res bulk_cloud_model = .TRUE.'
+                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'K'
+
+          CASE ( 'pc', 'pr' )
+             IF (  .NOT.  particle_advection )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requir' // &
+                   'es a "particle_parameters"-NAMELIST in the parameter ' //  &
+                   'file (PARIN)'
+                CALL message( 'check_parameters', 'PA0104', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'pc' )  unit = 'number'
+             IF ( TRIM( var ) == 'pr' )  unit = 'm'
+
+          CASE ( 'q', 'thetav' )
+             IF (  .NOT.  humidity )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res humidity = .TRUE.'
+                CALL message( 'check_parameters', 'PA0105', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'q'   )  unit = 'kg/kg'
+             IF ( TRIM( var ) == 'thetav' )  unit = 'K'
+
+          CASE ( 'ql' )
+             IF ( .NOT.  ( bulk_cloud_model  .OR.  cloud_droplets ) )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                      'res bulk_cloud_model = .TRUE. or cloud_droplets = .TRUE.'
+                CALL message( 'check_parameters', 'PA0106', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'kg/kg'
+
+          CASE ( 'ql_c', 'ql_v', 'ql_vp' )
+             IF (  .NOT.  cloud_droplets )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res cloud_droplets = .TRUE.'
+                CALL message( 'check_parameters', 'PA0107', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'ql_c'  )  unit = 'kg/kg'
+             IF ( TRIM( var ) == 'ql_v'  )  unit = 'm3'
+             IF ( TRIM( var ) == 'ql_vp' )  unit = 'none'
+
+          CASE ( 'qv' )
+             IF (  .NOT.  bulk_cloud_model )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res bulk_cloud_model = .TRUE.'
+                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'kg/kg'
+
+          CASE ( 's' )
+             IF (  .NOT.  passive_scalar )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res passive_scalar = .TRUE.'
+                CALL message( 'check_parameters', 'PA0110', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'kg/m3'
+
+          CASE ( 'p', 'theta', 'u', 'v', 'w' )
+             IF ( TRIM( var ) == 'p'  )  unit = 'Pa'
+             IF ( TRIM( var ) == 'theta' )  unit = 'K'
+             IF ( TRIM( var ) == 'u'  )  unit = 'm/s'
+             IF ( TRIM( var ) == 'v'  )  unit = 'm/s'
+             IF ( TRIM( var ) == 'w'  )  unit = 'm/s'
+             CONTINUE
+
+          CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*',                       &
+                 'shf*', 'ssws*', 't*', 'tsurf*', 'us*', 'z0*', 'z0h*', 'z0q*' )
+             IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
+                message_string = 'illegal value for data_output: "' //         &
+                                 TRIM( var ) // '" & only 2d-horizontal ' //   &
+                                 'cross sections are allowed for this value'
+                CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             IF ( TRIM( var ) == 'lwp*'  .AND.  .NOT. bulk_cloud_model )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res bulk_cloud_model = .TRUE.'
+                CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'qsws*'  .AND.  .NOT.  humidity )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res humidity = .TRUE.'
+                CALL message( 'check_parameters', 'PA0322', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             IF ( TRIM( var ) == 'ghf*'  .AND.  .NOT.  land_surface )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res land_surface = .TRUE.'
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             IF ( ( TRIM( var ) == 'r_a*' .OR.  TRIM( var ) == 'ghf*' )        &
+                 .AND.  .NOT.  land_surface  .AND.  .NOT.  urban_surface )     &         
+             THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res land_surface = .TRUE. or ' //            &
+                                 'urban_surface = .TRUE.'
+                CALL message( 'check_parameters', 'PA0404', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'ssws*'  .AND.  .NOT.  passive_scalar )  THEN
+                message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                                 'res passive_scalar = .TRUE.'
+                CALL message( 'check_parameters', 'PA0361', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             IF ( TRIM( var ) == 'ghf*'   )  unit = 'W/m2'
+             IF ( TRIM( var ) == 'lwp*'   )  unit = 'kg/m2'
+             IF ( TRIM( var ) == 'ol*'    )  unit = 'm'
+             IF ( TRIM( var ) == 'qsws*'  )  unit = 'kgm/kgs'
+             IF ( TRIM( var ) == 'r_a*'   )  unit = 's/m'     
+             IF ( TRIM( var ) == 'shf*'   )  unit = 'K*m/s'
+             IF ( TRIM( var ) == 'ssws*'  )  unit = 'kg/m2*s'
+             IF ( TRIM( var ) == 't*'     )  unit = 'K'
+             IF ( TRIM( var ) == 'tsurf*' )  unit = 'K'  
+             IF ( TRIM( var ) == 'us*'    )  unit = 'm/s'
+             IF ( TRIM( var ) == 'z0*'    )  unit = 'm'
+             IF ( TRIM( var ) == 'z0h*'   )  unit = 'm'
+!
+!--          Output of surface latent and sensible heat flux will be in W/m2 
+!--          in case of natural- and urban-type surfaces, even if 
+!--          flux_output_mode is set to kinematic units.
+             IF ( land_surface  .OR.  urban_surface )  THEN
+                IF ( TRIM( var ) == 'shf*'   )  unit = 'W/m2'
+                IF ( TRIM( var ) == 'qsws*'  )  unit = 'W/m2'
+             ENDIF
+
+          CASE DEFAULT
+
+             CALL tcm_check_data_output( var, unit )
+
+!
+!--          Check for other modules
+             IF ( unit == 'illegal'  .AND.  bulk_cloud_model  )  THEN
+                CALL bcm_check_data_output( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  air_chemistry                      &
+                  .AND.  (var(1:3) == 'kc_' .OR. var(1:3) == 'em_') )  THEN
+                CALL chem_check_data_output( var, unit, i, ilen, k )
+             ENDIF
+
+             IF ( unit == 'illegal' )  THEN
+                CALL lsm_check_data_output ( var, unit, i, ilen, k )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  gust_module_enabled  )  THEN
+                CALL gust_check_data_output ( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  biometeorology )  THEN
+                CALL biom_check_data_output( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  ocean_mode )  THEN
+                CALL ocean_check_data_output( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  plant_canopy                       &
+                                     .AND.  var(1:4) == 'pcm_' )  THEN
+                CALL pcm_check_data_output( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal' )  THEN
+                CALL radiation_check_data_output( var, unit, i, ilen, k )
+             ENDIF
+
+             IF ( unit == 'illegal' .AND. salsa ) THEN
+                 CALL salsa_check_data_output( var, unit )
+             ENDIF   
+
+             IF ( unit == 'illegal'  .AND.  urban_surface                      &
+                                     .AND.  var(1:4) == 'usm_' )  THEN
+                 CALL usm_check_data_output( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal'  .AND.  uv_exposure                        &
+                                     .AND.  var(1:5) == 'uvem_' )  THEN
+                CALL uvem_check_data_output( var, unit, i, ilen, k )
+             ENDIF
+
+!
+!--          Finally, check for user-defined quantities
+             IF ( unit == 'illegal' )  THEN
+                unit = ''
+                CALL user_check_data_output( var, unit )
+             ENDIF
+
+             IF ( unit == 'illegal' )  THEN
+                IF ( data_output_user(1) /= ' ' )  THEN
+                   message_string = 'illegal value for data_output or ' //     &
+                         'data_output_user = "' // TRIM( data_output(i) ) // '"'
+                   CALL message( 'check_parameters', 'PA0114', 1, 2, 0, 6, 0 )
+                ELSE
+                   message_string = 'illegal value for data_output = "' //     &
+                                    TRIM( data_output(i) ) // '"'
+                   CALL message( 'check_parameters', 'PA0115', 1, 2, 0, 6, 0 )
+                ENDIF
+             ENDIF
+
+       END SELECT
+!
+!--    Set the internal steering parameters appropriately
+       IF ( k == 0 )  THEN
+          do3d_no(j)              = do3d_no(j) + 1
+          do3d(j,do3d_no(j))      = data_output(i)
+          do3d_unit(j,do3d_no(j)) = unit
+       ELSE
+          do2d_no(j)              = do2d_no(j) + 1
+          do2d(j,do2d_no(j))      = data_output(i)
+          do2d_unit(j,do2d_no(j)) = unit
+          IF ( data_output(i)(ilen-2:ilen) == '_xy' )  THEN
+             data_output_xy(j) = .TRUE.
+          ENDIF
+          IF ( data_output(i)(ilen-2:ilen) == '_xz' )  THEN
+             data_output_xz(j) = .TRUE.
+          ENDIF
+          IF ( data_output(i)(ilen-2:ilen) == '_yz' )  THEN
+             data_output_yz(j) = .TRUE.
+          ENDIF
+       ENDIF
+
+       IF ( j == 1 )  THEN
+!
+!--       Check, if variable is already subject to averaging
+          found = .FALSE.
+          DO  k = 1, doav_n
+             IF ( TRIM( doav(k) ) == TRIM( var ) )  found = .TRUE.
+          ENDDO
+
+          IF ( .NOT. found )  THEN
+             doav_n = doav_n + 1
+             doav(doav_n) = var
+          ENDIF
+       ENDIF
+
+       i = i + 1
+    ENDDO
+
+!
+!-- Averaged 2d or 3d output requires that an averaging interval has been set
+    IF ( doav_n > 0  .AND.  averaging_interval == 0.0_wp )  THEN
+       WRITE( message_string, * )  'output of averaged quantity "',            &
+                                   TRIM( doav(1) ), '_av" requires to set a ', &
+                                   'non-zero averaging interval'
+       CALL message( 'check_parameters', 'PA0323', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check sectional planes and store them in one shared array
+    IF ( ANY( section_xy > nz + 1 ) )  THEN
+       WRITE( message_string, * )  'section_xy must be <= nz + 1 = ', nz + 1
+       CALL message( 'check_parameters', 'PA0319', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( ANY( section_xz > ny + 1 ) )  THEN
+       WRITE( message_string, * )  'section_xz must be <= ny + 1 = ', ny + 1
+       CALL message( 'check_parameters', 'PA0320', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( ANY( section_yz > nx + 1 ) )  THEN
+       WRITE( message_string, * )  'section_yz must be <= nx + 1 = ', nx + 1
+       CALL message( 'check_parameters', 'PA0321', 1, 2, 0, 6, 0 )
+    ENDIF
+    section(:,1) = section_xy
+    section(:,2) = section_xz
+    section(:,3) = section_yz
+
+!
+!-- Upper plot limit for 3D arrays
+    IF ( nz_do3d == -9999 )  nz_do3d = nzt + 1
+
+!
+!-- Set output format string (used in header)
+    SELECT CASE ( netcdf_data_format )
+       CASE ( 1 )
+          netcdf_data_format_string = 'netCDF classic'
+       CASE ( 2 )
+          netcdf_data_format_string = 'netCDF 64bit offset'
+       CASE ( 3 )
+          netcdf_data_format_string = 'netCDF4/HDF5'
+       CASE ( 4 )
+          netcdf_data_format_string = 'netCDF4/HDF5 classic'
+       CASE ( 5 )
+          netcdf_data_format_string = 'parallel netCDF4/HDF5'
+       CASE ( 6 )
+          netcdf_data_format_string = 'parallel netCDF4/HDF5 classic'
+
+    END SELECT
+
+!
+!-- Check mask conditions
+    DO mid = 1, max_masks
+       IF ( data_output_masks(mid,1) /= ' '  .OR.                              &
+            data_output_masks_user(mid,1) /= ' ' ) THEN
+          masks = masks + 1
+       ENDIF
+    ENDDO
+
+    IF ( masks < 0  .OR.  masks > max_masks )  THEN
+       WRITE( message_string, * )  'illegal value: masks must be >= 0 and ',   &
+            '<= ', max_masks, ' (=max_masks)'
+       CALL message( 'check_parameters', 'PA0325', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( masks > 0 )  THEN
+       mask_scale(1) = mask_scale_x
+       mask_scale(2) = mask_scale_y
+       mask_scale(3) = mask_scale_z
+       IF ( ANY( mask_scale <= 0.0_wp ) )  THEN
+          WRITE( message_string, * )                                           &
+               'illegal value: mask_scale_x, mask_scale_y and mask_scale_z',   &
+               'must be > 0.0'
+          CALL message( 'check_parameters', 'PA0326', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Generate masks for masked data output
+!--    Parallel netcdf output is not tested so far for masked data, hence
+!--    netcdf_data_format is switched back to non-parallel output.
+       netcdf_data_format_save = netcdf_data_format
+       IF ( netcdf_data_format > 4 )  THEN
+          IF ( netcdf_data_format == 5 ) netcdf_data_format = 3
+          IF ( netcdf_data_format == 6 ) netcdf_data_format = 4
+          message_string = 'netCDF file formats '//                            &
+                           '5 (parallel netCDF 4) and ' //                     &
+                           '6 (parallel netCDF 4 Classic model) '//            &
+                           '& are currently not supported (not yet tested) ' //&
+                           'for masked data. &Using respective non-parallel' //&
+                           ' output for masked data.'
+          CALL message( 'check_parameters', 'PA0383', 0, 0, 0, 6, 0 )
+       ENDIF
+       CALL init_masks
+       netcdf_data_format = netcdf_data_format_save
+    ENDIF
+
+!
+!-- Check the NetCDF data format
+    IF ( netcdf_data_format > 2 )  THEN
+#if defined( __netcdf4 )
+       CONTINUE
+#else
+       message_string = 'netCDF: netCDF4 format requested but no ' //          &
+                        'cpp-directive __netcdf4 given & switch '  //          &
+                        'back to 64-bit offset format'
+       CALL message( 'check_parameters', 'PA0171', 0, 1, 0, 6, 0 )
+       netcdf_data_format = 2
+#endif
+    ENDIF
+    IF ( netcdf_data_format > 4 )  THEN
+#if defined( __netcdf4 ) && defined( __netcdf4_parallel )
+       CONTINUE
+#else
+       message_string = 'netCDF: netCDF4 parallel output requested but no ' // &
+                        'cpp-directive __netcdf4_parallel given & switch '   //&
+                        'back to netCDF4 non-parallel output'
+       CALL message( 'check_parameters', 'PA0099', 0, 1, 0, 6, 0 )
+       netcdf_data_format = netcdf_data_format - 2
+#endif
+    ENDIF
+
+!
+!-- Calculate fixed number of output time levels for parallel netcdf output.
+!-- The time dimension has to be defined as limited for parallel output,
+!-- because otherwise the I/O performance drops significantly.
+    IF ( netcdf_data_format > 4 )  THEN
+
+!
+!--    Check if any of the follwoing data output interval is 0.0s, which is
+!--    not allowed for parallel output.
+       CALL check_dt_do( dt_do3d,           'dt_do3d'           )
+       CALL check_dt_do( dt_do2d_xy,        'dt_do2d_xy'        )
+       CALL check_dt_do( dt_do2d_xz,        'dt_do2d_xz'        )
+       CALL check_dt_do( dt_do2d_yz,        'dt_do2d_yz'        )
+       CALL check_dt_do( dt_data_output_av, 'dt_data_output_av' )
+
+!--    Set needed time levels (ntdim) to 
+!--    saved time levels + to be saved time levels.
+       ntdim_3d(0) = do3d_time_count(0) + CEILING(                             &
+                     ( end_time - MAX( skip_time_do3d,                         &
+                                       simulated_time_at_begin )               &
+                     ) / dt_do3d )
+       IF ( do3d_at_begin ) ntdim_3d(0) = ntdim_3d(0) + 1
+
+       ntdim_3d(1) = do3d_time_count(1) + CEILING(                             &
+                     ( end_time - MAX( skip_time_data_output_av,               &
+                                       simulated_time_at_begin )               &
+                     ) / dt_data_output_av )
+
+       ntdim_2d_xy(0) = do2d_xy_time_count(0) + CEILING(                       &
+                        ( end_time - MAX( skip_time_do2d_xy,                   &
+                                          simulated_time_at_begin )            &
+                        ) / dt_do2d_xy )
+
+       ntdim_2d_xz(0) = do2d_xz_time_count(0) + CEILING(                       &
+                        ( end_time - MAX( skip_time_do2d_xz,                   &
+                                          simulated_time_at_begin )            &
+                        ) / dt_do2d_xz )
+
+       ntdim_2d_yz(0) = do2d_yz_time_count(0) + CEILING(                       &
+                        ( end_time - MAX( skip_time_do2d_yz,                   &
+                                          simulated_time_at_begin )            &
+                        ) / dt_do2d_yz )
+
+       IF ( do2d_at_begin )  THEN
+          ntdim_2d_xy(0) = ntdim_2d_xy(0) + 1
+          ntdim_2d_xz(0) = ntdim_2d_xz(0) + 1
+          ntdim_2d_yz(0) = ntdim_2d_yz(0) + 1
+       ENDIF
+
+       ntdim_2d_xy(1) = do2d_xy_time_count(1) + CEILING(                       &
+                        ( end_time - MAX( skip_time_data_output_av,            &
+                                          simulated_time_at_begin )            &
+                        ) / dt_data_output_av )
+
+       ntdim_2d_xz(1) = do2d_xz_time_count(1) + CEILING(                       &
+                        ( end_time - MAX( skip_time_data_output_av,            &
+                                          simulated_time_at_begin )            &
+                                 ) / dt_data_output_av )
+
+       ntdim_2d_yz(1) = do2d_yz_time_count(1) + CEILING(                       &
+                        ( end_time - MAX( skip_time_data_output_av,            &
+                                          simulated_time_at_begin )            &
+                        ) / dt_data_output_av )
+
+    ENDIF
+
+!
+!-- Check, whether a constant diffusion coefficient shall be used
+    IF ( km_constant /= -1.0_wp )  THEN
+       IF ( km_constant < 0.0_wp )  THEN
+          WRITE( message_string, * )  'km_constant = ', km_constant, ' < 0.0'
+          CALL message( 'check_parameters', 'PA0121', 1, 2, 0, 6, 0 )
+       ELSE
+          IF ( prandtl_number < 0.0_wp )  THEN
+             WRITE( message_string, * )  'prandtl_number = ', prandtl_number,  &
+                                         ' < 0.0'
+             CALL message( 'check_parameters', 'PA0122', 1, 2, 0, 6, 0 )
+          ENDIF
+          constant_diffusion = .TRUE.
+
+          IF ( constant_flux_layer )  THEN
+             message_string = 'constant_flux_layer is not allowed with fixed ' &
+                              // 'value of km'
+             CALL message( 'check_parameters', 'PA0123', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+    ENDIF
+
+!
+!-- In case of non-cyclic lateral boundaries and a damping layer for the
+!-- potential temperature, check the width of the damping layer
+    IF ( bc_lr /= 'cyclic' ) THEN
+       IF ( pt_damping_width < 0.0_wp  .OR.                                    &
+            pt_damping_width > REAL( (nx+1) * dx ) )  THEN
+          message_string = 'pt_damping_width out of range'
+          CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( bc_ns /= 'cyclic' )  THEN
+       IF ( pt_damping_width < 0.0_wp  .OR.                                    &
+            pt_damping_width > REAL( (ny+1) * dy ) )  THEN
+          message_string = 'pt_damping_width out of range'
+          CALL message( 'check_parameters', 'PA0124', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Check value range for zeta = z/L
+    IF ( zeta_min >= zeta_max )  THEN
+       WRITE( message_string, * )  'zeta_min = ', zeta_min, ' must be less ',  &
+                                   'than zeta_max = ', zeta_max
+       CALL message( 'check_parameters', 'PA0125', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check random generator
+    IF ( (random_generator /= 'system-specific'      .AND.                     &
+          random_generator /= 'random-parallel'   )  .AND.                     &
+          random_generator /= 'numerical-recipes' )  THEN
+       message_string = 'unknown random generator: random_generator = "' //    &
+                        TRIM( random_generator ) // '"'
+       CALL message( 'check_parameters', 'PA0135', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Determine upper and lower hight level indices for random perturbations
+    IF ( disturbance_level_b == -9999999.9_wp )  THEN
+       IF ( ocean_mode )  THEN
+          disturbance_level_b     = zu((nzt*2)/3)
+          disturbance_level_ind_b = ( nzt * 2 ) / 3
+       ELSE
+          disturbance_level_b     = zu(nzb+3)
+          disturbance_level_ind_b = nzb + 3
+       ENDIF
+    ELSEIF ( disturbance_level_b < zu(3) )  THEN
+       WRITE( message_string, * )  'disturbance_level_b = ',                   &
+                           disturbance_level_b, ' must be >= ', zu(3), '(zu(3))'
+       CALL message( 'check_parameters', 'PA0126', 1, 2, 0, 6, 0 )
+    ELSEIF ( disturbance_level_b > zu(nzt-2) )  THEN
+       WRITE( message_string, * )  'disturbance_level_b = ',                   &
+                   disturbance_level_b, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
+       CALL message( 'check_parameters', 'PA0127', 1, 2, 0, 6, 0 )
+    ELSE
+       DO  k = 3, nzt-2
+          IF ( disturbance_level_b <= zu(k) )  THEN
+             disturbance_level_ind_b = k
+             EXIT
+          ENDIF
+       ENDDO
+    ENDIF
+
+    IF ( disturbance_level_t == -9999999.9_wp )  THEN
+       IF ( ocean_mode )  THEN
+          disturbance_level_t     = zu(nzt-3)
+          disturbance_level_ind_t = nzt - 3
+       ELSE
+          disturbance_level_t     = zu(nzt/3)
+          disturbance_level_ind_t = nzt / 3
+       ENDIF
+    ELSEIF ( disturbance_level_t > zu(nzt-2) )  THEN
+       WRITE( message_string, * )  'disturbance_level_t = ',                   &
+                   disturbance_level_t, ' must be <= ', zu(nzt-2), '(zu(nzt-2))'
+       CALL message( 'check_parameters', 'PA0128', 1, 2, 0, 6, 0 )
+    ELSEIF ( disturbance_level_t < disturbance_level_b )  THEN
+       WRITE( message_string, * )  'disturbance_level_t = ',                   &
+                   disturbance_level_t, ' must be >= disturbance_level_b = ',  &
+                   disturbance_level_b
+       CALL message( 'check_parameters', 'PA0129', 1, 2, 0, 6, 0 )
+    ELSE
+       DO  k = 3, nzt-2
+          IF ( disturbance_level_t <= zu(k) )  THEN
+             disturbance_level_ind_t = k
+             EXIT
+          ENDIF
+       ENDDO
+    ENDIF
+
+!
+!-- Check again whether the levels determined this way are ok.
+!-- Error may occur at automatic determination and too few grid points in
+!-- z-direction.
+    IF ( disturbance_level_ind_t < disturbance_level_ind_b )  THEN
+       WRITE( message_string, * )  'disturbance_level_ind_t = ',               &
+                disturbance_level_ind_t, ' must be >= ',                       &
+                'disturbance_level_ind_b = ', disturbance_level_ind_b
+       CALL message( 'check_parameters', 'PA0130', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Determine the horizontal index range for random perturbations.
+!-- In case of non-cyclic horizontal boundaries, no perturbations are imposed
+!-- near the inflow and the perturbation area is further limited to ...(1)
+!-- after the initial phase of the flow.
+
+    IF ( bc_lr /= 'cyclic' )  THEN
+       IF ( inflow_disturbance_begin == -1 )  THEN
+          inflow_disturbance_begin = MIN( 10, nx/2 )
+       ENDIF
+       IF ( inflow_disturbance_begin < 0  .OR.  inflow_disturbance_begin > nx )&
+       THEN
+          message_string = 'inflow_disturbance_begin out of range'
+          CALL message( 'check_parameters', 'PA0131', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( inflow_disturbance_end == -1 )  THEN
+          inflow_disturbance_end = MIN( 100, 3*nx/4 )
+       ENDIF
+       IF ( inflow_disturbance_end < 0  .OR.  inflow_disturbance_end > nx )    &
+       THEN
+          message_string = 'inflow_disturbance_end out of range'
+          CALL message( 'check_parameters', 'PA0132', 1, 2, 0, 6, 0 )
+       ENDIF
+    ELSEIF ( bc_ns /= 'cyclic' )  THEN
+       IF ( inflow_disturbance_begin == -1 )  THEN
+          inflow_disturbance_begin = MIN( 10, ny/2 )
+       ENDIF
+       IF ( inflow_disturbance_begin < 0  .OR.  inflow_disturbance_begin > ny )&
+       THEN
+          message_string = 'inflow_disturbance_begin out of range'
+          CALL message( 'check_parameters', 'PA0131', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( inflow_disturbance_end == -1 )  THEN
+          inflow_disturbance_end = MIN( 100, 3*ny/4 )
+       ENDIF
+       IF ( inflow_disturbance_end < 0  .OR.  inflow_disturbance_end > ny )    &
+       THEN
+          message_string = 'inflow_disturbance_end out of range'
+          CALL message( 'check_parameters', 'PA0132', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( random_generator == 'random-parallel' )  THEN
+       dist_nxl = nxl;  dist_nxr = nxr
+       dist_nys = nys;  dist_nyn = nyn
+       IF ( bc_lr == 'radiation/dirichlet' )  THEN
+          dist_nxr    = MIN( nx - inflow_disturbance_begin, nxr )
+          dist_nxl(1) = MAX( nx - inflow_disturbance_end, nxl )
+       ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
+          dist_nxl    = MAX( inflow_disturbance_begin, nxl )
+          dist_nxr(1) = MIN( inflow_disturbance_end, nxr )
+       ELSEIF ( bc_lr == 'nested'  .OR.  bc_lr == 'nesting_offline' )  THEN
+          dist_nxl    = MAX( inflow_disturbance_begin, nxl )
+          dist_nxr    = MIN( nx - inflow_disturbance_begin, nxr )
+       ENDIF
+       IF ( bc_ns == 'dirichlet/radiation' )  THEN
+          dist_nyn    = MIN( ny - inflow_disturbance_begin, nyn )
+          dist_nys(1) = MAX( ny - inflow_disturbance_end, nys )
+       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
+          dist_nys    = MAX( inflow_disturbance_begin, nys )
+          dist_nyn(1) = MIN( inflow_disturbance_end, nyn )
+       ELSEIF ( bc_ns == 'nested'  .OR.  bc_ns == 'nesting_offline' )  THEN
+          dist_nys    = MAX( inflow_disturbance_begin, nys )
+          dist_nyn    = MIN( ny - inflow_disturbance_begin, nyn )
+       ENDIF
+    ELSE
+       dist_nxl = 0;  dist_nxr = nx
+       dist_nys = 0;  dist_nyn = ny
+       IF ( bc_lr == 'radiation/dirichlet' )  THEN
+          dist_nxr    = nx - inflow_disturbance_begin
+          dist_nxl(1) = nx - inflow_disturbance_end
+       ELSEIF ( bc_lr == 'dirichlet/radiation' )  THEN
+          dist_nxl    = inflow_disturbance_begin
+          dist_nxr(1) = inflow_disturbance_end
+       ELSEIF ( bc_lr == 'nested'  .OR.  bc_lr == 'nesting_offline' )  THEN
+          dist_nxr    = nx - inflow_disturbance_begin
+          dist_nxl    = inflow_disturbance_begin
+       ENDIF
+       IF ( bc_ns == 'dirichlet/radiation' )  THEN
+          dist_nyn    = ny - inflow_disturbance_begin
+          dist_nys(1) = ny - inflow_disturbance_end
+       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
+          dist_nys    = inflow_disturbance_begin
+          dist_nyn(1) = inflow_disturbance_end
+       ELSEIF ( bc_ns == 'nested'  .OR.  bc_ns == 'nesting_offline' )  THEN
+          dist_nyn    = ny - inflow_disturbance_begin
+          dist_nys    = inflow_disturbance_begin
+       ENDIF
+    ENDIF
+
+!
+!-- A turbulent inflow requires Dirichlet conditions at the respective inflow
+!-- boundary (so far, a turbulent inflow is realized from the left side only)
+    IF ( turbulent_inflow  .AND.  bc_lr /= 'dirichlet/radiation' )  THEN
+       message_string = 'turbulent_inflow = .T. requires a Dirichlet ' //      &
+                        'condition at the inflow boundary'
+       CALL message( 'check_parameters', 'PA0133', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Turbulent inflow requires that 3d arrays have been cyclically filled with
+!-- data from prerun in the first main run
+    IF ( turbulent_inflow  .AND.  initializing_actions /= 'cyclic_fill'  .AND. &
+         initializing_actions /= 'read_restart_data' )  THEN
+       message_string = 'turbulent_inflow = .T. requires ' //                  &
+                        'initializing_actions = ''cyclic_fill'' or ' //        &
+                        'initializing_actions = ''read_restart_data'' '
+       CALL message( 'check_parameters', 'PA0055', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- In case of turbulent inflow calculate the index of the recycling plane
+    IF ( turbulent_inflow )  THEN
+       IF ( recycling_width <= dx  .OR.  recycling_width >= nx * dx )  THEN
+          WRITE( message_string, * )  'illegal value for recycling_width: ',   &
+                                      recycling_width
+          CALL message( 'check_parameters', 'PA0134', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Calculate the index
+       recycling_plane = recycling_width / dx
+!
+!--    Because the y-shift is done with a distance of INT( npey / 2 ) no shift
+!--    is possible if there is only one PE in y direction.
+       IF ( recycling_yshift .AND. pdims(2) < 2 )  THEN
+          WRITE( message_string, * )  'recycling_yshift = .T. requires more',  &
+                                      ' than one processor in y direction'
+          CALL message( 'check_parameters', 'PA0421', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+
+    IF ( turbulent_outflow )  THEN
+!
+!--    Turbulent outflow requires Dirichlet conditions at the respective inflow
+!--    boundary (so far, a turbulent outflow is realized at the right side only)
+       IF ( bc_lr /= 'dirichlet/radiation' )  THEN
+          message_string = 'turbulent_outflow = .T. requires ' //              &
+                           'bc_lr = "dirichlet/radiation"'
+          CALL message( 'check_parameters', 'PA0038', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    The ouflow-source plane must lay inside the model domain
+       IF ( outflow_source_plane < dx  .OR.  &
+            outflow_source_plane > nx * dx )  THEN
+          WRITE( message_string, * )  'illegal value for outflow_source'//     &
+                                      '_plane: ', outflow_source_plane
+          CALL message( 'check_parameters', 'PA0145', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Determine damping level index for 1D model
+    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+       IF ( damp_level_1d == -1.0_wp )  THEN
+          damp_level_1d     = zu(nzt+1)
+          damp_level_ind_1d = nzt + 1
+       ELSEIF ( damp_level_1d < 0.0_wp  .OR.  damp_level_1d > zu(nzt+1) )  THEN
+          WRITE( message_string, * )  'damp_level_1d = ', damp_level_1d,       &
+                 ' must be >= 0.0 and <= ', zu(nzt+1), '(zu(nzt+1))'
+          CALL message( 'check_parameters', 'PA0136', 1, 2, 0, 6, 0 )
+       ELSE
+          DO  k = 1, nzt+1
+             IF ( damp_level_1d <= zu(k) )  THEN
+                damp_level_ind_1d = k
+                EXIT
+             ENDIF
+          ENDDO
+       ENDIF
+    ENDIF
+
+!
+!-- Check some other 1d-model parameters
+    IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND.                   &
+         TRIM( mixing_length_1d ) /= 'blackadar' )  THEN
+       message_string = 'mixing_length_1d = "' // TRIM( mixing_length_1d ) //  &
+                        '" is unknown'
+       CALL message( 'check_parameters', 'PA0137', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( TRIM( dissipation_1d ) /= 'as_in_3d_model'  .AND.                     &
+         TRIM( dissipation_1d ) /= 'detering'  .AND.                           &
+         TRIM( dissipation_1d ) /= 'prognostic' )  THEN
+       message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) //      &
+                        '" is unknown'
+       CALL message( 'check_parameters', 'PA0138', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( TRIM( mixing_length_1d ) /= 'as_in_3d_model'  .AND.                   &
+         TRIM( dissipation_1d ) == 'as_in_3d_model' )  THEN
+       message_string = 'dissipation_1d = "' // TRIM( dissipation_1d ) //      &
+                        '" requires mixing_length_1d = "as_in_3d_model"'
+       CALL message( 'check_parameters', 'PA0485', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Set time for the next user defined restart (time_restart is the
+!-- internal parameter for steering restart events)
+    IF ( restart_time /= 9999999.9_wp )  THEN
+       IF ( restart_time > time_since_reference_point )  THEN
+          time_restart = restart_time
+       ENDIF
+    ELSE
+!
+!--    In case of a restart run, set internal parameter to default (no restart)
+!--    if the NAMELIST-parameter restart_time is omitted
+       time_restart = 9999999.9_wp
+    ENDIF
+
+!
+!-- Check pressure gradient conditions
+    IF ( dp_external  .AND.  conserve_volume_flow )  THEN
+       WRITE( message_string, * )  'Both dp_external and conserve_volume_flo', &
+            'w are .TRUE. but one of them must be .FALSE.'
+       CALL message( 'check_parameters', 'PA0150', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( dp_external )  THEN
+       IF ( dp_level_b < zu(nzb)  .OR.  dp_level_b > zu(nzt) )  THEN
+          WRITE( message_string, * )  'dp_level_b = ', dp_level_b, ' is out ', &
+               ' of range [zu(nzb), zu(nzt)]'
+          CALL message( 'check_parameters', 'PA0151', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( .NOT. ANY( dpdxy /= 0.0_wp ) )  THEN
+          WRITE( message_string, * )  'dp_external is .TRUE. but dpdxy is ze', &
+               'ro, i.e. the external pressure gradient will not be applied'
+          CALL message( 'check_parameters', 'PA0152', 0, 1, 0, 6, 0 )
+       ENDIF
+    ENDIF
+    IF ( ANY( dpdxy /= 0.0_wp )  .AND.  .NOT.  dp_external )  THEN
+       WRITE( message_string, * )  'dpdxy is nonzero but dp_external is ',     &
+            '.FALSE., i.e. the external pressure gradient & will not be applied'
+       CALL message( 'check_parameters', 'PA0153', 0, 1, 0, 6, 0 )
+    ENDIF
+    IF ( conserve_volume_flow )  THEN
+       IF ( TRIM( conserve_volume_flow_mode ) == 'default' )  THEN
+
+          conserve_volume_flow_mode = 'initial_profiles'
+
+       ELSEIF ( TRIM( conserve_volume_flow_mode ) /= 'initial_profiles' .AND.  &
+            TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' )  THEN
+          WRITE( message_string, * )  'unknown conserve_volume_flow_mode: ',   &
+               conserve_volume_flow_mode
+          CALL message( 'check_parameters', 'PA0154', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( (bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic')  .AND.                &
+          TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
+          WRITE( message_string, * )  'non-cyclic boundary conditions ',       &
+               'require  conserve_volume_flow_mode = ''initial_profiles'''
+          CALL message( 'check_parameters', 'PA0155', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+    IF ( ( u_bulk /= 0.0_wp  .OR.  v_bulk /= 0.0_wp )  .AND.                   &
+         ( .NOT. conserve_volume_flow  .OR.                                    &
+         TRIM( conserve_volume_flow_mode ) /= 'bulk_velocity' ) )  THEN
+       WRITE( message_string, * )  'nonzero bulk velocity requires ',          &
+            'conserve_volume_flow = .T. and ',                                 &
+            'conserve_volume_flow_mode = ''bulk_velocity'''
+       CALL message( 'check_parameters', 'PA0157', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check particle attributes
+    IF ( particle_color /= 'none' )  THEN
+       IF ( particle_color /= 'absuv'  .AND.  particle_color /= 'pt*'  .AND.   &
+            particle_color /= 'z' )  THEN
+          message_string = 'illegal value for parameter particle_color: ' //   &
+                           TRIM( particle_color)
+          CALL message( 'check_parameters', 'PA0313', 1, 2, 0, 6, 0 )
+       ELSE
+          IF ( color_interval(2) <= color_interval(1) )  THEN
+             message_string = 'color_interval(2) <= color_interval(1)'
+             CALL message( 'check_parameters', 'PA0315', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+    ENDIF
+
+    IF ( particle_dvrpsize /= 'none' )  THEN
+       IF ( particle_dvrpsize /= 'absw' )  THEN
+          message_string = 'illegal value for parameter particle_dvrpsize:' // &
+                           ' ' // TRIM( particle_dvrpsize)
+          CALL message( 'check_parameters', 'PA0314', 1, 2, 0, 6, 0 )
+       ELSE
+          IF ( dvrpsize_interval(2) <= dvrpsize_interval(1) )  THEN
+             message_string = 'dvrpsize_interval(2) <= dvrpsize_interval(1)'
+             CALL message( 'check_parameters', 'PA0316', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+    ENDIF
+
+!
+!-- Prevent empty time records in volume, cross-section and masked data in case
+!-- of non-parallel netcdf-output in restart runs
+    IF ( netcdf_data_format < 5 )  THEN
+       IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
+          do3d_time_count    = 0
+          do2d_xy_time_count = 0
+          do2d_xz_time_count = 0
+          do2d_yz_time_count = 0
+          domask_time_count  = 0
+       ENDIF
+    ENDIF
+
+!
+!-- Check for valid setting of most_method
+    IF ( TRIM( most_method ) /= 'circular'  .AND.                              &
+         TRIM( most_method ) /= 'newton'    .AND.                              &
+         TRIM( most_method ) /= 'lookup' )  THEN
+       message_string = 'most_method = "' // TRIM( most_method ) //            &
+                        '" is unknown'
+       CALL message( 'check_parameters', 'PA0416', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check roughness length, which has to be smaller than dz/2
+    IF ( ( constant_flux_layer .OR.  &
+           INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )       &
+         .AND. roughness_length >= 0.5 * dz(1) )  THEN
+       message_string = 'roughness_length must be smaller than dz/2'
+       CALL message( 'check_parameters', 'PA0424', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Vertical nesting: check fine and coarse grid compatibility for data exchange
+    IF ( vnested )  CALL vnest_check_parameters
+
+!
+!-- Check if topography is read from file in case of complex terrain simulations
+    IF ( complex_terrain  .AND.  TRIM( topography ) /= 'read_from_file' )  THEN
+       message_string = 'complex_terrain requires topography' //               &
+                        ' = ''read_from_file'''
+       CALL message( 'check_parameters', 'PA0295', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check if vertical grid stretching is switched off in case of complex 
+!-- terrain simulations
+    IF ( complex_terrain  .AND.                                                &
+         ANY( dz_stretch_level_start /= -9999999.9_wp ) )  THEN
+       message_string = 'Vertical grid stretching is not allowed for ' //      &
+                        'complex_terrain = .T.'
+       CALL message( 'check_parameters', 'PA0473', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    CALL location_message( 'finished', .TRUE. )
+!
+!-- Check &userpar parameters
+    CALL user_check_parameters
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check the length of data output intervals. In case of parallel NetCDF output
+!> the time levels of the output files need to be fixed. Therefore setting the
+!> output interval to 0.0s (usually used to output each timestep) is not
+!> possible as long as a non-fixed timestep is used.
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE check_dt_do( dt_do, dt_do_name )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*), INTENT (IN) :: dt_do_name !< parin variable name
+
+       REAL(wp), INTENT (INOUT)       :: dt_do      !< data output interval
+
+       IF ( dt_do == 0.0_wp )  THEN
+          IF ( dt_fixed )  THEN
+             WRITE( message_string, '(A,F9.4,A)' )  'Output at every '  //     &
+                    'timestep is wanted (' // dt_do_name // ' = 0.0).&'//      &
+                    'The output interval is set to the fixed timestep dt '//   &
+                    '= ', dt, 's.'
+             CALL message( 'check_parameters', 'PA0060', 0, 0, 0, 6, 0 )
+             dt_do = dt
+          ELSE
+             message_string = dt_do_name // ' = 0.0 while using a ' //         &
+                              'variable timestep and parallel netCDF4 ' //     &
+                              'is not allowed.'
+             CALL message( 'check_parameters', 'PA0081', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+    END SUBROUTINE check_dt_do
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Set the bottom and top boundary conditions for humidity and scalars.
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE set_bc_scalars( sq, bc_b, bc_t, ibc_b, ibc_t, err_nr_b, err_nr_t )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=1)   ::  sq         !< name of scalar quantity
+       CHARACTER (LEN=*)   ::  bc_b       !< bottom boundary condition
+       CHARACTER (LEN=*)   ::  bc_t       !< top boundary condition
+       CHARACTER (LEN=*)   ::  err_nr_b   !< error number if bottom bc is unknown
+       CHARACTER (LEN=*)   ::  err_nr_t   !< error number if top bc is unknown
+
+       INTEGER(iwp)        ::  ibc_b      !< index for bottom boundary condition
+       INTEGER(iwp)        ::  ibc_t      !< index for top boundary condition
+
+!
+!--    Set Integer flags and check for possilbe errorneous settings for bottom
+!--    boundary condition
+       IF ( bc_b == 'dirichlet' )  THEN
+          ibc_b = 0
+       ELSEIF ( bc_b == 'neumann' )  THEN
+          ibc_b = 1
+       ELSE
+          message_string = 'unknown boundary condition: bc_' // TRIM( sq ) //  &
+                           '_b ="' // TRIM( bc_b ) // '"'
+          CALL message( 'check_parameters', err_nr_b, 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Set Integer flags and check for possilbe errorneous settings for top
+!--    boundary condition
+       IF ( bc_t == 'dirichlet' )  THEN
+          ibc_t = 0
+       ELSEIF ( bc_t == 'neumann' )  THEN
+          ibc_t = 1
+       ELSEIF ( bc_t == 'initial_gradient' )  THEN
+          ibc_t = 2
+       ELSEIF ( bc_t == 'nested'  .OR.  bc_t == 'nesting_offline' )  THEN
+          ibc_t = 3
+       ELSE
+          message_string = 'unknown boundary condition: bc_' // TRIM( sq ) //  &
+                           '_t ="' // TRIM( bc_t ) // '"'
+          CALL message( 'check_parameters', err_nr_t, 1, 2, 0, 6, 0 )
+       ENDIF
+
+
+    END SUBROUTINE set_bc_scalars
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check for consistent settings of bottom boundary conditions for humidity
+!> and scalars.
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE check_bc_scalars( sq, bc_b, ibc_b,                      &
+                                 err_nr_1, err_nr_2,                   &
+                                 constant_flux, surface_initial_change )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=1)   ::  sq                       !< name of scalar quantity
+       CHARACTER (LEN=*)   ::  bc_b                     !< bottom boundary condition
+       CHARACTER (LEN=*)   ::  err_nr_1                 !< error number of first error
+       CHARACTER (LEN=*)   ::  err_nr_2                 !< error number of second error
+
+       INTEGER(iwp)        ::  ibc_b                    !< index of bottom boundary condition
+
+       LOGICAL             ::  constant_flux            !< flag for constant-flux layer
+
+       REAL(wp)            ::  surface_initial_change   !< value of initial change at the surface
+
+!
+!--    A given surface value implies Dirichlet boundary condition for
+!--    the respective quantity. In this case specification of a constant flux is
+!--    forbidden. However, an exception is made for large-scale forcing as well
+!--    as land-surface model.
+       IF ( .NOT. land_surface  .AND.  .NOT. large_scale_forcing )  THEN
+          IF ( ibc_b == 0  .AND.  constant_flux )  THEN
+             message_string = 'boundary condition: bc_' // TRIM( sq ) //       &
+                              '_b ' // '= "' // TRIM( bc_b ) //                &
+                              '" is not allowed with prescribed surface flux'
+             CALL message( 'check_parameters', err_nr_1, 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+       IF ( constant_flux  .AND.  surface_initial_change /= 0.0_wp )  THEN
+          WRITE( message_string, * )  'a prescribed surface flux is not allo', &
+                 'wed with ', sq, '_surface_initial_change (/=0) = ',          &
+                 surface_initial_change
+          CALL message( 'check_parameters', err_nr_2, 1, 2, 0, 6, 0 )
+       ENDIF
+
+
+    END SUBROUTINE check_bc_scalars
+
+
+
+ END SUBROUTINE check_parameters
Index: /palm/tags/release-6.0/SOURCE/chem_emissions_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/chem_emissions_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/chem_emissions_mod.f90	(revision 3477)
@@ -0,0 +1,1722 @@
+!> @file chem_emissions_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2018-2018 Leibniz Universitaet Hannover
+! Copyright 2018-2018 Freie Universitaet Berlin
+! Copyright 2018-2018 Karlsruhe Institute of Technology
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Enabled PARAMETRIZED mode for default surfaces when LSM is not applied but 
+! salsa is used
+! 
+! 3458 2018-10-30 14:51:23Z kanani
+! from chemistry branch r3443, banzhafs, Russo:
+! Additional correction for index of input file of pre-processed mode
+! Removed atomic and molecular weights as now available in chem_modules and
+! added par_emis_time_factor (formerly in netcdf_data_input_mod)
+! Added correction for index of input file of pre-processed mode
+! Added a condition for default mode necessary for information read from ncdf file
+! in pre-processed and default mode
+! Correction of multiplying factor necessary for scaling emission values in time
+! Introduced correction for scaling units in the case of DEFAULT emission mode
+! 
+! 3373 2018-10-18 15:25:56Z kanani
+! Fix wrong location of __netcdf directive
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! (from branch resler)
+! Formatting
+! 
+! 3312 2018-10-06 14:15:46Z knoop
+! Initial revision
+!
+! 3286 2018-09-28 07:41:39Z forkel
+!
+! Authors:
+! --------
+! @author Emmanuele Russo (Fu-Berlin)
+! @author Sabine Banzhaf  (FU-Berlin)
+! @author Martijn Schaap  (FU-Berlin, TNO Utrecht)
+! 
+! Description:
+! ------------
+!>  MODULE for reading-in Chemistry Emissions data
+!>
+!> @todo Check_parameters routine should be developed: for now it includes just one condition
+!> @todo Use of Restart files not contempled at the moment
+!> @todo revise indices of files read from the netcdf: preproc_emission_data and expert_emission_data
+!> @todo for now emission data may be passed on a singular vertical level: need to be more flexible
+!> @note <Enter notes on the module>
+!> @bug  <Enter known bugs here>
+!------------------------------------------------------------------------------!
+
+ MODULE chem_emissions_mod
+
+    USE arrays_3d,                                                             &
+       ONLY: rho_air
+
+    USE control_parameters,                                                    &
+       ONLY:  initializing_actions, end_time, message_string,                  &
+              intermediate_timestep_count, dt_3d
+ 
+    USE indices
+
+    USE kinds
+
+#if defined ( __netcdf )
+
+    USE netcdf_data_input_mod,                                                  &
+       ONLY: chem_emis_att_type, chem_emis_val_type
+
+    USE NETCDF
+
+#endif
+
+    USE date_and_time_mod,                                                      &
+       ONLY: time_default_indices, time_preprocessed_indices,                  &
+             month_of_year, day_of_month, hour_of_day,                          &
+             index_mm, index_dd, index_hh
+
+    USE chem_gasphase_mod,                                                      &
+       ONLY: spc_names
+ 
+    USE chem_modules
+
+    USE statistics,                                                             &   
+           ONLY:  weight_pres
+
+    IMPLICIT NONE
+
+!-- Declare all global variables within the module 
+    
+    CHARACTER (LEN=80)                               :: filename_emis                   !> Variable for the name of the netcdf input file
+
+    INTEGER(iwp)                                     :: i                               !> index 1st selected dimension (some dims are not spatial)
+    INTEGER(iwp)                                     :: j                               !> index 2nd selected dimension 
+    INTEGER(iwp)                                     :: i_start                         !> Index to start read variable from netcdf along one dims
+    INTEGER(iwp)                                     :: i_end                           !> Index to end read variable from netcdf in one dims
+    INTEGER(iwp)                                     :: j_start                         !> Index to start read variable from netcdf in additional dims
+    INTEGER(iwp)                                     :: j_end                           !> Index to end read variable from netcdf in additional dims
+    INTEGER(iwp)                                     :: z_start                         !> Index to start read variable from netcdf in additional dims
+    INTEGER(iwp)                                     :: z_end                           !> Index to end read variable from netcdf in additional     dims
+    INTEGER(iwp)                                     :: dt_emis                         !> Time Step Emissions 
+    INTEGER(iwp)                                     :: len_index                       !> length of index (used for several indices)
+    INTEGER(iwp)                                     :: len_index_voc                   !> length of voc index
+    INTEGER(iwp)                                     :: len_index_pm                    !> length of PMs index
+    REAL(wp)                                         :: con_factor                      !> Units Conversion Factor
+ 
+
+    ! ---------------------------------------------------------------
+    ! Set Values of molecules, mols, etc
+    ! ---------------------------------------------------------------
+  
+    !> Avogadro number
+    REAL, PARAMETER        ::  Avog = 6.02205e23    ! mlc/mol
+ 
+    !> Dobson units:
+    REAL, PARAMETER        ::  Dobs = 2.68668e16    ! (mlc/cm2) / DU
+
+    !> sesalt composition:
+    ! (Seinfeld and Pandis, "Atmospheric Chemistry and Physics",
+    !  table 7.8 "Composition of Sea-Salt", p. 444)
+    REAL, PARAMETER        ::  massfrac_Cl_in_seasalt  = 0.5504       ! (kg Cl )/(kg seasalt)
+    REAL, PARAMETER        ::  massfrac_Na_in_seasalt  = 0.3061       ! (kg Na )/(kg seasalt)
+    REAL, PARAMETER        ::  massfrac_SO4_in_seasalt = 0.0768       ! (kg SO4)/(kg seasalt)
+  
+    !> other numbers 
+    REAL, PARAMETER        ::  xm_seasalt =  74.947e-3                ! kg/mol : NaCl, SO4, ..
+    REAL, PARAMETER        ::  rho_seasalt = 2.2e3                    ! kg/m3
+
+    !> * amonium sulphate
+  
+    REAL, PARAMETER        ::  xm_NH4HSO4  =  xm_NH4 + xm_H + xm_SO4  ! kg/mol
+    REAL, PARAMETER        ::  rho_NH4HSO4a = 1.8e3                   ! kg/m3
+
+    ! ---------------------------------------------------------------
+    ! gas
+    ! ---------------------------------------------------------------
+  
+    !> gas constant                        
+    REAL, PARAMETER        ::  Rgas = 8.3144     ! J/mol/K
+  
+    !> gas constant for dry air
+    REAL, PARAMETER        ::  Rgas_air = Rgas / xm_air   ! J/kg/K
+  
+    !> water vapour
+    REAL, PARAMETER        ::  Rgas_h2o = Rgas / xm_h2o   ! J/kg/K
+  
+    !> standard pressure
+    REAL, PARAMETER        ::  p0 = 1.0e5    ! Pa
+
+    !> sea-level pressure
+    REAL, PARAMETER        ::  p_sealevel = 1.01325e5    ! Pa  <-- suggestion Bram Bregman
+
+    !> global mean pressure
+    REAL, PARAMETER        ::  p_global = 98500.0   ! Pa
+
+    !> specific heat of dry air at constant pressure
+    REAL, PARAMETER        ::  cp_air = 1004.0           ! J/kg/K
+
+    !> Latent heat of evaporation
+    REAL, PARAMETER        ::  lvap = 2.5e6     !  [J kg-1]
+
+    !> Latent heat of condensation at 0 deg Celcius
+    !  (heat (J) necesarry to evaporate 1 kg of water)
+    REAL, PARAMETER        ::  Lc = 22.6e5           ! J/kg
+  
+    !> kappa = R/cp = 2/7
+    REAL, PARAMETER        ::  kappa = 2.0/7.0
+
+    !> Von Karman constant (dry_dep)
+    REAL, PARAMETER        ::  vkarman = 0.4
+
+    !> Boltzmann constant:
+    REAL, PARAMETER        ::  kbolz = 1.38066e-23_wp    ! J/K
+
+    !> Inverse Reference Pressure (1/Pa)    
+    REAL(wp), PARAMETER     ::  pref_i  = 1.0_wp / 100000.0_wp       
+ 
+    !>
+    REAL(wp), PARAMETER     ::  r_cp    = 0.286_wp                  !< R / cp (exponent for potential temperature)
+
+
+    SAVE
+
+!-- Interfaces Part
+
+!-- Checks Input parameters
+    INTERFACE chem_emissions_check_parameters
+       MODULE PROCEDURE chem_emissions_check_parameters
+    END INTERFACE chem_emissions_check_parameters
+
+!-- Reading of NAMELIST parameters
+!    INTERFACE chem_emissions_parin
+!       MODULE PROCEDURE chem_emissions_parin
+!    END INTERFACE chem_emissions_parin
+
+!-- Output of information to the header file
+!    INTERFACE chem_emissions_header
+!       MODULE PROCEDURE chem_emissions_header
+!    END INTERFACE chem_emissions_header
+
+!-- Matching Emissions actions  
+    INTERFACE chem_emissions_match
+       MODULE PROCEDURE chem_emissions_match
+    END INTERFACE chem_emissions_match
+
+!-- Initialization actions  
+    INTERFACE chem_emissions_init
+       MODULE PROCEDURE chem_emissions_init
+    END INTERFACE chem_emissions_init
+
+!-- Setup of Emissions
+    INTERFACE chem_emissions_setup
+       MODULE PROCEDURE chem_emissions_setup
+    END INTERFACE chem_emissions_setup
+
+
+!-- Public Interfaces
+    PUBLIC chem_emissions_init,chem_emissions_match,chem_emissions_setup
+
+!-- Public Variables
+
+    PUBLIC con_factor, len_index,len_index_voc,len_index_pm
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine for checking input parameters
+!------------------------------------------------------------------------------!
+ SUBROUTINE chem_emissions_check_parameters
+
+
+    !TBD: Where Should we put the call to chem_emissions_check_parameters? In chem_init or in check_parameters?
+
+    IMPLICIT NONE
+
+    INTEGER(iwp)           ::  tmp
+
+    TYPE(chem_emis_att_type)   ::  emt
+!
+!--    Call routine for controlling chem_emissions namelist 
+!    CALL chem_emissions_parin
+
+!TBD: In case the given emission values do not coincide with the passed names we should think of a solution: 
+!  I would personally do that if the name of the species differ from the number of emission values, I would 
+!  print a warning that says that in correspondance of that particular species the value is zero. 
+!  An alternative would be to initialize the cs_surface_flux values to a negative number. 
+
+!-- Check Emission Species Number equal to number of passed names for the chemistry species: 
+   IF ( SIZE(emt%species_name) /= emt%nspec  )  THEN
+
+       message_string = 'Numbers of input emission species names and number of species'             //          &
+                         'for which emission values are given do not match'                  
+       CALL message( 'chem_emissions_check_parameters', 'CM0437', 2, 2, 0, 6, 0 ) 
+
+
+    ENDIF
+
+    !-- Check Emission Species Number equals to number of passed names for the species
+    !IF ( SIZE(emt%species_name) /= SIZE(emt%species_index)  )  THEN
+    !      message_string = 'Number of input emission species names and '             //          &
+    !                       ' number of passed species indices do not match'                  
+    !      CALL message( 'chem_emissions_check_parameters', 'CM0101', 2, 2, 0, 6, 0 ) 
+
+    !ENDIF
+
+    !-- Check Emission Categories
+!    IF ( SIZE(chem_emis%cat_name) /= SIZE(chem_emis%cat_index)  )  THEN
+!       WRITE( message_string, * )                                                        &
+!       'Number of input emission categories name and categories index does not match\\'  
+!       CALL message( 'chem_emissions_check_parameters', 'CM0101', 1, 2, 0, 6, 0 ) 
+!    ENDIF
+
+
+
+    !TBD: Check which other consistency controls should be included
+
+   !TBD: Include check for spatial dimension of netcdf file. If they do not match with the ones 
+   !     of the simulation, the model should print an error.  
+
+END SUBROUTINE chem_emissions_check_parameters
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Matching the chemical species indices. The routine checks what are the indices of the emission input species 
+!  and the corresponding ones of the model species. The routine gives as output a vector containing the number 
+!  of common species: it is important to note that while the model species are distinct, their values could be 
+!  given to a single species in input: for example, in the case of NO2 and NO, values may be passed in input as NOx values.
+!------------------------------------------------------------------------------!
+SUBROUTINE chem_emissions_match(emt_att,len_index)   
+
+
+    INTEGER(iwp), INTENT(INOUT)              ::  len_index        !< Variable where to store the number of common species between the input dataset and the model species   
+
+    TYPE(chem_emis_att_type), INTENT(INOUT)  ::  emt_att          !< Chemistry Emission Array containing information for all the input chemical emission species
+   
+    INTEGER(iwp)                             ::  ind_mod, ind_inp !< Parameters for cycling through chemical model and input species 
+    INTEGER(iwp)                             ::  nspec_emis_inp   !< Variable where to store the number of the emission species in input
+
+    INTEGER(iwp)                             ::  ind_voc          !< Indices to check whether a split for voc should be done
+
+    INTEGER(iwp)                             ::  ispec            !> index for cycle over effective number of emission species
+
+
+    !> Tell the user where we are!!
+    CALL location_message( 'Matching input emissions and model chemistry species', .FALSE. )
+
+    !> Number of input emission species.
+
+    nspec_emis_inp=emt_att%nspec 
+
+    !> Check the emission mode: DEFAULT, PRE-PROCESSED or PARAMETERIZED  !TBD: Add option for capital or small letters
+    SELECT CASE(TRIM(mode_emis)) 
+
+       !> PRE-PROCESSED case: in this case the input species have to coincide with the ones of the model (except VOCs for which we have the VOC split): NO and NO2 in input and not NOx.
+       CASE ("PRE-PROCESSED")
+
+          CALL location_message( 'chem_emissions PRE-PROCESSED_mode_matching', .FALSE. )
+
+          len_index=0
+          len_index_voc=0 
+
+          !> The first condition is that both the number of model and input emissions species are not null 
+          IF ( (SIZE(spc_names) .GT. 0) .AND. (nspec_emis_inp .GT. 0)) THEN
+
+             !> Cycle over model species
+             DO ind_mod = 1, SIZE(spc_names)
+                !> Cycle over Input species  
+                DO ind_inp = 1, nspec_emis_inp
+
+           !> In the PRE-PROCESSED mode each emission species is given input values, made exception for the VOCs, having the total number of VOCs in input: the model then executes a split through the different VOC species
+                   ! > Check for VOC Species: In input in this case we only have one species (VOC)  
+                   IF (TRIM(emt_att%species_name(ind_inp))=="VOC") THEN
+                      !> Cycle over the input voc species: they have to be one of the VOCs of the mechanism used. A list of VOC species for different mechanisms is provided in the module documentation
+                      DO ind_voc= 1,emt_att%nvoc
+                         !> Determine the indices of the coinciding species in the two cases and assign them to matching arrays 
+                         IF (TRIM(emt_att%voc_name(ind_voc))==TRIM(spc_names(ind_mod))) THEN
+                            len_index=len_index+1
+                            len_index_voc=len_index_voc+1
+                         ENDIF
+                      END DO
+                   ENDIF
+                   !> Other Species
+                   IF (TRIM(emt_att%species_name(ind_inp))==TRIM(spc_names(ind_mod))) THEN
+                      len_index=len_index+1
+                   ENDIF
+                ENDDO
+             ENDDO
+
+             !> Allocate array for storing the indices of the matched species
+             IF (len_index>0) THEN
+ 
+                ALLOCATE(match_spec_input(len_index)) 
+ 
+                ALLOCATE(match_spec_model(len_index))
+
+                IF (len_index_voc>0) THEN
+
+                   ALLOCATE(match_spec_voc_model(len_index_voc))   !> Contains indices of the VOC model species 
+
+                   ALLOCATE(match_spec_voc_input(len_index_voc))   !> In input there is only one value for VOCs in the DEFAULT mode. This array contains the indices of the different values of VOC compositions of the input variable VOC_composition
+
+                ENDIF
+
+                !> Repeat the same cycle of above but passing the species indices to the newly declared arrays
+                len_index=0
+
+                !> Cycle over model species
+                DO ind_mod = 1, SIZE(spc_names)  
+                   !> Cycle over Input species  
+                   DO ind_inp = 1, nspec_emis_inp
+
+                   !> Determine the indices of the coinciding species in the two cases and assign them to matching arrays 
+
+                      ! > VOCs
+                      IF ( TRIM(emt_att%species_name(ind_inp))=="VOC" .AND. ALLOCATED(match_spec_voc_input) ) THEN      
+                         DO ind_voc= 1,emt_att%nvoc
+                            IF (TRIM(emt_att%voc_name(ind_voc))==TRIM(spc_names(ind_mod))) THEN
+                               len_index=len_index+1
+                               len_index_voc=len_index_voc+1
+                        
+                               match_spec_input(len_index)=ind_inp
+                               match_spec_model(len_index)=ind_mod
+
+                               match_spec_voc_input(len_index_voc)=ind_voc
+                               match_spec_voc_model(len_index_voc)=ind_mod                         
+                            ENDIF
+                         END DO
+                      ENDIF
+
+                      !>Other Species
+                      IF (TRIM(emt_att%species_name(ind_inp))==TRIM(spc_names(ind_mod))) THEN
+                         len_index=len_index+1
+                         match_spec_input(len_index)=ind_inp
+                         match_spec_model(len_index)=ind_mod
+                      ENDIF
+                   END DO
+                END DO
+
+             !> In the case there are no species matching, the emission module should not be called
+             ELSE
+
+                message_string = 'Given Chemistry Emission Species'            //          &
+                                 ' DO NOT MATCH'                                //          &
+                                 ' model chemical species:'                      //          &
+                                 ' Chemistry Emissions routine is not called'  
+                CALL message( 'chem_emissions_matching', 'CM0438', 0, 0, 0, 6, 0 )
+             ENDIF !> IF (len_index>0)
+ 
+          ELSE
+
+             !In this case either spc_names is null or nspec_emis_inp is not allocated
+
+             message_string = 'Array of Emission species not allocated:'             //          &
+                              ' Either no emission species are provided as input or'  //          &
+                              ' no chemical species are used by PALM:'                //          &
+                              ' Chemistry Emissions routine is not called'                  
+             CALL message( 'chem_emissions_matching', 'CM0439', 0, 2, 0, 6, 0 ) 
+
+          ENDIF !> IF ( (SIZE(spc_names) .GT. 0) .AND. ALLOCATED(nspec_emis_inp))
+
+       !> ------------------------------------------------------------------
+       !> DEFAULT case
+
+       CASE ("DEFAULT")
+
+          CALL location_message( 'chem_emissions DEFAULT_mode_matching', .FALSE. )
+
+          len_index=0      !>  index for TOTAL number of species   
+          len_index_voc=0  !>  index for TOTAL number of VOCs
+          len_index_pm=3   !>  index for TOTAL number of PM Types: PM1, PM2.5, PM10. It is needed because the number of emission inputs and the one of PMs in the model may not be the same.
+
+          !> The first condition is that both the number of model and input emissions species are not null 
+          IF ( (SIZE(spc_names) .GT. 0) .AND. (nspec_emis_inp .GT. 0) ) THEN
+
+             !> Cycle over model species
+             DO ind_mod = 1, SIZE(spc_names)
+                !> Cycle over input species
+                DO ind_inp = 1, nspec_emis_inp
+
+                   ! > Check for VOC Species: In input in this case we only have one species (VOC)  
+                   IF (TRIM(emt_att%species_name(ind_inp))=="VOC") THEN
+                      !> Cycle over the voc species given in input: they have to be one of the VOCs of the mechanism used. A list of VOC species for different mechanisms is provided in the module documentation 
+                      DO ind_voc= 1,emt_att%nvoc
+                         !> Determine the indices of the coinciding species in the two cases and assign them to matching arrays 
+                         IF (TRIM(emt_att%voc_name(ind_voc))==TRIM(spc_names(ind_mod))) THEN
+                            len_index=len_index+1
+                            len_index_voc=len_index_voc+1
+                         ENDIF
+                      END DO
+                   ENDIF
+
+                   !> PMs: For PMs there is only one input species name for all the PM types. This variable has 3 dimensions, one for each PM type.
+                   IF (TRIM(emt_att%species_name(ind_inp))=="PM") THEN
+                      !>pm1
+                      IF (TRIM(spc_names(ind_mod))=="PM1") THEN
+                         len_index=len_index+1
+                      !>pm2.5
+                      ELSE IF (TRIM(spc_names(ind_mod))=="PM25") THEN
+                         len_index=len_index+1
+                      !>pm10
+                      ELSE IF (TRIM(spc_names(ind_mod))=="PM10") THEN
+                         len_index=len_index+1   
+                      ENDIF
+                   ENDIF
+
+                   !> NOx: for NOx by definition we have 2 splits. The Emission Input Name in this case is only one: NOx, while in the model we can have NO2 and NO    
+                   IF (TRIM(emt_att%species_name(ind_inp))=="NOx") THEN 
+                      !>no
+                      IF (TRIM(spc_names(ind_mod))=="NO") THEN
+                         len_index=len_index+1
+                      !>no2
+                      ELSE IF (TRIM(spc_names(ind_mod))=="NO2") THEN
+                         len_index=len_index+1                        
+                      ENDIF
+                   ENDIF
+
+                   !>SOX: same as for NOx, but with SO2 and SO4
+                   IF (TRIM(emt_att%species_name(ind_inp))=="SOx") THEN
+                      !>no
+                      IF (TRIM(spc_names(ind_mod))=="SO2") THEN
+                         len_index=len_index+1
+                      !>no2
+                      ELSE IF (TRIM(spc_names(ind_mod))=="SO4") THEN
+                         len_index=len_index+1                        
+                      ENDIF
+                   ENDIF
+
+                   !> Other Species
+                   IF (TRIM(emt_att%species_name(ind_inp))==TRIM(spc_names(ind_mod))) THEN
+                      len_index=len_index+1
+                   ENDIF
+                END DO   !> number of emission input species
+             END DO   !> number of model species
+
+
+             !> Allocate Arrays
+             IF (len_index>0) THEN
+
+                ALLOCATE(match_spec_input(len_index))
+                ALLOCATE(match_spec_model(len_index))
+
+                IF (len_index_voc>0) THEN
+                   ALLOCATE(match_spec_voc_model(len_index_voc))   !> contains indices of the VOC model species 
+                   ALLOCATE(match_spec_voc_input(len_index_voc))   !> In input there is only one value for VOCs in the DEFAULT mode. 
+                                                                   !  This array contains the indices of the different values of VOC compositions of the input variable VOC_composition
+                ENDIF
+
+                !> ASSIGN INDICES
+                !> Repeat the same cycles of above, but passing the species indices to the newly declared arrays
+                len_index=0
+                len_index_voc=0
+                
+                DO ind_mod = 1, SIZE(spc_names)
+                   DO ind_inp = 1, nspec_emis_inp 
+
+                      ! > VOCs
+                      IF ( TRIM(emt_att%species_name(ind_inp))=="VOC" .AND. ALLOCATED(match_spec_voc_input) ) THEN      
+                         DO ind_voc= 1,emt_att%nvoc
+                            IF (TRIM(emt_att%voc_name(ind_voc))==TRIM(spc_names(ind_mod))) THEN
+                               len_index=len_index+1
+                               len_index_voc=len_index_voc+1
+                        
+                               match_spec_input(len_index)=ind_inp
+                               match_spec_model(len_index)=ind_mod
+
+                               match_spec_voc_input(len_index_voc)=ind_voc
+                               match_spec_voc_model(len_index_voc)=ind_mod                         
+                            ENDIF
+                         END DO
+                      ENDIF
+
+                      !> PMs:In this case the Inputs have only PM while the model has three different possible types: PM1, PM2.5, PM10. We need an additional index for matching each PM index in the model. 
+                      IF (TRIM(emt_att%species_name(ind_inp))=="PM") THEN
+                         !>pm1
+                         IF (TRIM(spc_names(ind_mod))=="PM1") THEN
+                            len_index=len_index+1
+
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                            !match_spec_pm(1)=ind_mod
+                         !>pm2.5
+                         ELSE IF (TRIM(spc_names(ind_mod))=="PM25") THEN
+                            len_index=len_index+1
+
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                            !match_spec_pm(2)=ind_mod
+                         !>pm10
+                         ELSE IF (TRIM(spc_names(ind_mod))=="PM10") THEN
+                            len_index=len_index+1
+    
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                            !match_spec_pm(3)=ind_mod
+                         ENDIF
+                      ENDIF
+
+                      !> NOx - The same as for PMs but here the model species are only 2: NO and NO2
+                      IF (TRIM(emt_att%species_name(ind_inp))=="NOx") THEN
+                         !>no
+                         IF (TRIM(spc_names(ind_mod))=="NO") THEN
+                            len_index=len_index+1
+
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                            !match_spec_nox(1)=ind_mod
+                         !>no2
+                         ELSE IF (TRIM(spc_names(ind_mod))=="NO2") THEN
+                            len_index=len_index+1
+
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                           ! match_spec_nox(2)=ind_mod
+                         ENDIF
+                      ENDIF
+
+                      !> SOx 
+                      IF (TRIM(emt_att%species_name(ind_inp))=="SOx") THEN
+                         !>so2
+                         IF (TRIM(spc_names(ind_mod))=="SO2") THEN
+                            len_index=len_index+1
+
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                           ! match_spec_sox(1)=ind_mod
+                         !>so4
+                         ELSE IF (TRIM(spc_names(ind_mod))=="SO4") THEN
+                            len_index=len_index+1
+
+                            match_spec_input(len_index)=ind_inp
+                            match_spec_model(len_index)=ind_mod
+  
+                           ! match_spec_sox(2)=ind_mod
+                         ENDIF
+                      ENDIF
+
+                      !> Other Species
+                      IF (TRIM(emt_att%species_name(ind_inp))==TRIM(spc_names(ind_mod))) THEN
+                         len_index=len_index+1
+                            
+                         match_spec_input(len_index)=ind_inp
+                         match_spec_model(len_index)=ind_mod
+                      ENDIF
+                   END DO
+                END DO
+
+             ELSE
+
+                message_string = 'Given Chemistry Emission Species'            //          &
+                                 ' DO NOT MATCH'                                //          &
+                                 ' model chemical species'                      //          &
+                                 ' Chemistry Emissions routine is not called'         
+                CALL message( 'chem_emissions_matching', 'CM0440', 0, 0, 0, 6, 0 ) 
+
+             ENDIF
+
+          ELSE
+
+             message_string = 'Array of Emission species not allocated: '            //          &
+                              ' Either no emission species are provided as input or'  //          &
+                              ' no chemical species are used by PALM:'                //          &
+                              ' Chemistry Emissions routine is not called'                                   
+             CALL message( 'chem_emissions_matching', 'CM0441', 0, 2, 0, 6, 0 ) 
+ 
+          ENDIF
+
+!-- CASE parameterized: In the parameterized case the user gives in input the exact species names of the chemical mechanism: no split is required for NOx, SOx, PMs and VOCs, but units of emissions inputs must be in (mole/m**)/s, made exception for PMs. 
+
+       CASE ("PARAMETERIZED")
+
+          len_index=0
+
+         !spc_names have to be greater than zero for proceeding
+          IF ( (SIZE(spc_names) .GT. 0) .AND. (nspec_emis_inp .GT. 0) ) THEN
+
+
+             !cycle over model species
+             DO ind_mod = 1, SIZE(spc_names)
+                ind_inp=1
+                DO  WHILE ( TRIM( surface_csflux_name( ind_inp ) ) /= 'novalue' )   !<'novalue' is the default  
+                   IF (TRIM(surface_csflux_name( ind_inp ))==TRIM(spc_names(ind_mod))) THEN
+                      len_index=len_index+1
+                   ENDIF
+                   ind_inp=ind_inp+1
+
+                ENDDO
+             ENDDO
+
+             !Proceed only if there are matched species
+             IF ( len_index .GT. 0 ) THEN
+
+                !Allocation of Arrays of the matched species
+                ALLOCATE(match_spec_input(len_index)) 
+ 
+                ALLOCATE(match_spec_model(len_index))
+
+                !Assign corresponding indices of input and model matched species
+                len_index=0
+
+                DO ind_mod = 1, SIZE(spc_names)  
+                   ind_inp = 1
+                   DO  WHILE ( TRIM( surface_csflux_name( ind_inp ) ) /= 'novalue' )   !<'novalue' is the default  
+                      IF (TRIM( surface_csflux_name( ind_inp ) ) == TRIM(spc_names(ind_mod)))           THEN
+                         len_index=len_index+1
+                         match_spec_input(len_index)=ind_inp
+                         match_spec_model(len_index)=ind_mod
+                      ENDIF
+                   ind_inp=ind_inp+1
+                   END DO
+                END DO
+
+                ! also, Add AN if to check that when the surface_csflux are passed to the namelist, also the street factor values are provided
+                DO  ispec = 1 , len_index
+
+                   IF ( emiss_factor_main(match_spec_input(ispec)) .LT. 0 .AND. emiss_factor_side(match_spec_input(ispec)) .LT. 0 ) THEN
+
+                      message_string = 'PARAMETERIZED emissions mode selected:'            //          &
+                                       ' EMISSIONS POSSIBLE ONLY ON STREET SURFACES'        //          &
+                                       ' but values of scaling factors for street types'    //          &
+                                       ' emiss_factor_main AND emiss_factor_side'           //          &
+                                       ' not provided for each of the emissions species'    //          &
+                                       ' or not provided at all: PLEASE set a finite value' //          &
+                                       ' for these parameters in the chemistry namelist'          
+                      CALL message( 'chem_emissions_matching', 'CM0442', 2, 2, 0, 6, 0 ) 
+                   ENDIF
+                END DO
+
+
+             ELSE
+                
+                message_string = 'Given Chemistry Emission Species'            //          &
+                                 ' DO NOT MATCH'                                //          &
+                                 ' model chemical species'                      //          &
+                                 ' Chemistry Emissions routine is not called'         
+                CALL message( 'chem_emissions_matching', 'CM0443', 0, 0, 0, 6, 0 ) 
+             ENDIF
+
+          ELSE
+     
+             message_string = 'Array of Emission species not allocated: '            //          &
+                              ' Either no emission species are provided as input or'  //          &
+                              ' no chemical species are used by PALM.'                //          &
+                              ' Chemistry Emissions routine is not called'                                   
+             CALL message( 'chem_emissions_matching', 'CM0444', 0, 2, 0, 6, 0 ) 
+ 
+          ENDIF             
+
+
+!-- CASE when emission module is switched on but mode_emis is not specified or it is given the wrong name
+       CASE DEFAULT
+
+          message_string = 'Chemistry Emissions Module switched ON, but'            //          &
+                           ' either no emission mode specified or incorrectly given :'  //          &
+                           ' please, pass the correct value to the namelist parameter "mode_emis"'                  
+          CALL message( 'chem_emissions_matching', 'CM0445', 2, 2, 0, 6, 0 )              
+
+       END SELECT
+
+END SUBROUTINE chem_emissions_match
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization:
+!> Netcdf reading, arrays allocation and first calculation of cssws fluxes at timestep 0
+!>  
+!------------------------------------------------------------------------------!
+ SUBROUTINE chem_emissions_init(emt_att,emt,nspec_out)
+
+#if defined( __netcdf )
+
+    USE surface_mod,                                                           &
+       ONLY:  surf_lsm_h,surf_def_h,surf_usm_h
+    
+    IMPLICIT NONE
+ 
+    TYPE(chem_emis_att_type),INTENT(INOUT)                            :: emt_att   !> variable where to store all the information of 
+                                                                                   !  emission inputs whose values do not depend
+                                                                                   !  on the considered species
+
+    TYPE(chem_emis_val_type),INTENT(INOUT), ALLOCATABLE, DIMENSION(:) ::  emt      !> variable where to store emission inputs values, 
+                                                                                   !  depending on the considered species
+    
+    INTEGER(iwp),INTENT(INOUT)                                        :: nspec_out !> number of outputs of chemistry emission routines
+
+    CHARACTER (LEN=80)                                                :: units     !> units of chemistry inputs
+ 
+    INTEGER(iwp)                                                      :: ispec     !> Index to go through the emission chemical species
+
+
+!-- Actions for initial runs : TBD: needs to be updated
+  IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+!--    ... 
+    
+!
+!-- Actions for restart runs
+  ELSE
+!--    ...
+
+  ENDIF
+
+
+  CALL location_message( 'Starting initialization of chemistry emissions arrays', .FALSE. )
+
+
+  !-- Match Input and Model emissions
+  CALL  chem_emissions_match(emt_att,nspec_out)
+
+  !> If nspec_out==0, then do not use emission module: The corresponding message is already printed in the matching routine 
+  IF ( nspec_out == 0 ) THEN
+  
+     emission_output_required=.FALSE.
+
+  ELSE
+
+     emission_output_required=.TRUE.
+
+
+!-----------------------------------------------------------------
+     !> Set molecule masses' 
+     ALLOCATE(emt_att%xm(nspec_out))
+     ! loop over emisisons:
+
+     DO ispec = 1, nspec_out
+       ! switch:
+        SELECT CASE ( TRIM(spc_names(match_spec_model(ispec))) )
+           CASE ( 'SO2','SO4' ) ; emt_att%xm(ispec) = xm_S + xm_O * 2      ! kg/mole
+           CASE ( 'NO','NO2' )  ; emt_att%xm(ispec) = xm_N + xm_O * 2      ! kg/mole  NO2 equivalent
+           CASE ( 'NH3' ) ; emt_att%xm(ispec) = xm_N + xm_H * 3  ! kg/mole
+           CASE ( 'CO'  ) ; emt_att%xm(ispec) = xm_C + xm_O      ! kg/mole
+           CASE ( 'CO2' ) ; emt_att%xm(ispec) = xm_C + xm_O * 2  ! kg/mole
+           CASE ( 'CH4' ) ; emt_att%xm(ispec) = xm_C + xm_H * 4  ! kg/mole     
+           CASE ( 'HNO3' ); emt_att%xm(ispec) = xm_H + xm_N + xm_O*3 !kg/mole  
+           CASE DEFAULT
+             !--  TBD: check if this hase to be removed
+              !emt_att%xm(ispec) = 1.0_wp
+        END SELECT
+     ENDDO
+
+    
+     !> ASSIGN EMISSION VALUES for the different emission modes
+     SELECT CASE(TRIM(mode_emis))   !TBD: Add the option for CApital or small letters 
+
+
+        !> PRE-PROCESSED case
+        CASE ("PRE-PROCESSED")
+
+           IF ( .NOT. ALLOCATED( emis_distribution) ) ALLOCATE(emis_distribution(nzb:nzt+1,0:ny,0:nx,nspec_out))  
+
+           CALL location_message( 'emis_distribution array allocated in PRE-PROCESSED mode', .FALSE. )
+ 
+           !> Calculate the values of the emissions at the first time step
+           CALL chem_emissions_setup(emt_att,emt,nspec_out)
+
+        !> Default case
+        CASE ("DEFAULT")
+
+           IF ( .NOT. ALLOCATED( emis_distribution) ) ALLOCATE( emis_distribution( 1, 0:ny, 0:nx, nspec_out ) ) 
+        
+           CALL location_message( 'emis_distribution array allocated in DEFAULT mode', .FALSE. )
+
+           !> Calculate the values of the emissions at the first time step
+           CALL chem_emissions_setup(emt_att,emt,nspec_out)
+
+        !> PARAMETERIZED case
+        CASE ("PARAMETERIZED")
+
+           CALL location_message( 'emis_distribution array allocated in PARAMETERIZED mode', .FALSE. )
+
+           ! For now for PAR and DEF values only, first vertical level of emis_distribution is allocated, while for PRE-PROCESSED all. 
+           IF ( .NOT. ALLOCATED( emis_distribution) ) ALLOCATE(emis_distribution(1,0:ny,0:nx,nspec_out))
+
+           !> Calculate the values of the emissions at the first time step
+           CALL chem_emissions_setup(emt_att,emt,nspec_out)
+
+     END SELECT
+
+  ENDIF    
+
+#endif
+
+
+ END SUBROUTINE chem_emissions_init
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine for Update of Emission values at each timestep 
+!-------------------------------------------------------------------------------!
+
+ SUBROUTINE chem_emissions_setup(emt_att,emt,nspec_out)
+
+   USE arrays_3d,                                                    &
+       ONLY:  dzw
+   USE grid_variables,                                                        &
+       ONLY: dx, dy
+   USE indices,                                                               &
+       ONLY: nnx,nny,nnz 
+   USE salsa_mod,                                                             &
+       ONLY:  salsa
+   USE surface_mod,                                                           &
+       ONLY:  surf_lsm_h,surf_def_h,surf_usm_h
+   USE netcdf_data_input_mod,                                                 &
+       ONLY:  street_type_f
+   USE arrays_3d,                                                             &        
+       ONLY: hyp, pt 
+
+ IMPLICIT NONE
+
+#if defined( __netcdf )
+  
+    !--- IN/OUT
+
+    TYPE(chem_emis_att_type),INTENT(INOUT)                            ::  emt_att    !> variable where to store all the information of 
+                                                                                     !  emission inputs whose values do not depend
+                                                                                     !  on the considered species
+
+    TYPE(chem_emis_val_type),INTENT(INOUT), ALLOCATABLE, DIMENSION(:) ::  emt        !> variable where to store emission inputs values, 
+                                                                                     !  depending on the considered species
+
+    INTEGER,INTENT(IN)                                                ::  nspec_out  !> Output of routine chem_emis_matching with number
+                                                                                     !  of matched species
+    !---
+
+    REAL(wp),ALLOCATABLE,DIMENSION(:,:)                               ::  delta_emis !> Term to add to the emission_distribution array 
+                                                                                     !  for each of the categories at each time step 
+                                                                                     !  in the default mode
+
+    CHARACTER(LEN=80)                                                 ::  units      !> Units of the emissions
+
+    INTEGER(iwp)                                                      ::  icat       !> Index for number of categories
+    INTEGER(iwp)                                                      ::  ispec      !> index for number of species
+    INTEGER(iwp)                                                      ::  i_pm_comp  !> index for number of PM components
+    INTEGER(iwp)                                                      ::  ivoc       !> Index for number of components of  VOCs
+    INTEGER(iwp)                                                      ::  time_index !> Index for time
+    
+    REAL(wp),ALLOCATABLE, DIMENSION(:)                                ::  time_factor !> factor for time scaling of emissions
+    REAL(wp),ALLOCATABLE, DIMENSION(:,:)                              ::  emis
+
+    REAL(wp), DIMENSION(24)                                           :: par_emis_time_factor      !< time factors 
+                                                                                      !  for the parameterized mode: these are fixed for each hour
+                                                                                      !  of a single day.
+    REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr)                    ::  conv_to_ratio !> factor used for converting input 
+                                                                                        !  to adimensional concentration ratio
+
+   ! ------------------------------------------
+    ! variables for the conversion of indices i and j according to surface_mod
+
+    INTEGER(iwp)                                                      ::  i          !> running index for grid in x-direction
+    INTEGER(iwp)                                                      ::  j          !> running index for grid in y-direction
+    INTEGER(iwp)                                                      ::  k          !> running index for grid in z-direction
+    INTEGER(iwp)                                                      ::  m          !> running index for horizontal surfaces
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr)                    ::  tmp_temp
+
+    ! --- const -------------------------------
+    !-CONVERSION FACTORS: TIME
+    ! number of sec per hour = 3600   
+    REAL, PARAMETER   ::  s_per_hour = 3600.0  !  (s)/(hour)
+    ! number of sec per day = 86400   
+    REAL, PARAMETER   ::  s_per_day = 86400.0  !  (s)/(day)
+    ! number of hours in a year of 365 days:
+    REAL, PARAMETER   ::  hour_per_year = 8760.0 !> TBD: What about leap years?
+    ! number of hours in a day:
+    REAL, PARAMETER   ::  hour_per_day = 24.0
+
+    ! conversion from hours to seconds (s/hour) = 1/3600.0 ~ 0.2777778   
+    REAL, PARAMETER   ::  hour_to_s = 1/s_per_hour  !  (hour)/(s)
+    ! conversion from day to seconds (s/day) = 1/86400.0 ~ 1.157407e-05   
+    REAL, PARAMETER   ::  day_to_s = 1/s_per_day   !  (day)/(s)
+    ! conversion from year to sec (s/year) = 1/31536000.0 ~ 3.170979e-08   
+    REAL, PARAMETER   ::  year_to_s = 1/(s_per_hour*hour_per_year)  !  (year)/(s)
+
+    !-CONVERSION FACTORS: WEIGHT
+    !  Conversion from tons to kg (kg/tons) = 100.0/1 ~ 100
+    REAL, PARAMETER   ::  tons_to_kg = 100  !  (tons)/(kg)
+    !  Conversion from g to kg (kg/g) = 1/1000.0 ~ 0.001
+    REAL, PARAMETER   ::  g_to_kg = 0.001  !  (g)/(kg)
+    !  Conversion from g to kg (kg/g) = 1/1000.0 ~ 0.001
+    REAL, PARAMETER   ::  miug_to_kg = 0.000000001  !  (microng)/(kg)
+
+    !< CONVERSION FACTORS: fraction to ppm
+    REAL(wp), PARAMETER   ::  ratio2ppm  = 1.0e06_wp  
+    !------------------------------------------------------    
+
+    IF ( emission_output_required ) THEN
+
+    !>  Set emis_dt  !TBD: this is the same as dt_chem. We should consider the fact that dt_emis should be the timestep of input emissions or better defined, the timestep at which the emission routines are called: for now one hour. It should be made changeable.
+
+       IF ( call_chem_at_all_substeps )  THEN
+
+          dt_emis = dt_3d * weight_pres(intermediate_timestep_count)
+
+       ELSE
+
+          dt_emis = dt_3d
+
+       ENDIF
+
+
+    ! --- CHECK UNITS
+    !>-----------------------------------------------------
+    !> Conversion of the units to the ones employed in PALM. 
+    !> Possible temporal units of input emissions data are: year, hour and second; 
+    !> the mass could be expressed in: tons, kilograms or grams. 
+    !> IN the PARAMETERIZED mode no conversion is possible: in this case INPUTS have to have fixed units.
+    !>-----------------------------------------------------
+
+        IF (TRIM(mode_emis)=="DEFAULT" .OR. TRIM(mode_emis)=="PRE-PROCESSED" ) THEN
+
+          SELECT CASE(TRIM(emt_att%units))
+          !> kilograms
+             CASE ( 'kg/m2/s','KG/M2/S') 
+                CALL location_message( 'Units of the emissions are consistent with'  //          &
+                                       ' the ones employed in the PALM-4U model ', .FALSE. )
+                con_factor=1
+
+             CASE ('kg/m2/hour','KG/M2/HOUR')
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=hour_to_s
+
+             CASE ( 'kg/m2/day','KG/M2/DAY' ) 
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=day_to_s
+
+             CASE ( 'kg/m2/year','KG/M2/YEAR' )
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=year_to_s
+
+          !> Tons
+             CASE ( 'ton/m2/s','TON/M2/S' ) 
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=tons_to_kg
+
+             CASE ( 'ton/m2/hour','TON/M2/HOUR' ) 
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=tons_to_kg*hour_to_s
+
+             CASE ( 'ton/m2/year','TON/M2/YEAR' ) 
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=tons_to_kg*year_to_s
+
+          !> Grams
+             CASE ( 'g/m2/s','G/M2/S' )
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=g_to_kg
+
+             CASE ( 'g/m2/hour','G/M2/HOUR' ) 
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=g_to_kg*hour_to_s
+
+             CASE ( 'g/m2/year','G/M2/YEAR' )
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=g_to_kg*year_to_s
+
+          !> Micro Grams
+             CASE ( 'micrograms/m2/s','MICROGRAMS/M2/S' )
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=miug_to_kg
+
+             CASE ( 'micrograms/m2/hour','MICROGRAMS/M2/HOUR' ) 
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=miug_to_kg*hour_to_s
+
+             CASE ( 'micrograms/m2/year','MICROGRAMS/M2/YEAR' )
+                CALL location_message( 'Units of emission inputs need conversion', .FALSE. )
+
+                con_factor=miug_to_kg*year_to_s
+
+             CASE DEFAULT  
+                message_string = 'The Units of the provided input chemistry emission species' // &
+                                 ' are not the ones required by PALM-4U: please check '      // &
+                                 ' chemistry emission module documentation.'                                 
+                CALL message( 'chem_emissions_setup', 'CM0446', 2, 2, 0, 6, 0 )
+
+          END SELECT
+
+         
+       !> PRE-PROCESSED and parameterized mode
+       ELSE 
+ 
+          message_string = 'No Units conversion required for units of chemistry emissions' // &
+                           ' of the PARAMETERIZED mode: units have to be provided in'     //  & 
+                           ' micromole/m**2/day for GASES and'                            //  &
+                           ' kg/m**2/day for PMs'                      
+          CALL message( 'chem_emissions_setup', 'CM0447', 0, 0, 0, 6, 0 ) 
+
+       ENDIF
+
+    !> Conversion factors (if the units are kg/m**2/s) we have to convert them to ppm/s
+     DO i=nxl,nxr
+          DO j=nys,nyn
+          !> Derive Temperature from Potential Temperature
+             tmp_temp(nzb:nzt+1,j,i) = pt(nzb:nzt+1,j,i) * ( hyp(nzb:nzt+1) * pref_i )**r_cp
+
+             !> We need to pass to cssws<- (ppm/s) * dz. 
+             !  Input is Nmole/(m^2*s)
+             !  To go to ppm*dz basically we need to multiply the input by (m**2/N)*dz
+             !  (m**2/N)*dz == V/N 
+             !  V/N=RT/P 
+
+             !>    m**3/Nmole              (J/mol)*K^-1           K                      Pa         
+             conv_to_ratio(nzb:nzt+1,j,i) = ( (Rgas * tmp_temp(nzb:nzt+1,j,i)) / ((hyp(nzb:nzt+1))) )  
+          ENDDO
+       ENDDO
+
+    !>------------------------------------------------
+    !> Start The Processing of the input data
+
+        emis_distribution(:,nys:nyn,nxl:nxr,:) = 0.0_wp
+
+    !>-----------------------------------------------
+    !> Distinguish between DEFAULT, PRE-PROCESSED and PARAMETERIZED mode when calculating time_factors: only done for DEFAULT mode. For the PARAMETERIZED mode there is a time factor but it is fixed in the model 
+  
+    !> PRE-PROCESSED MODE 
+       IF (TRIM(mode_emis)=="PRE-PROCESSED") THEN
+
+          !> Update time indices
+          CALL time_preprocessed_indices(index_hh)
+
+          CALL location_message( 'PRE-PROCESSED MODE: No time-factor specification required', .FALSE. )
+
+       ELSEIF (TRIM(mode_emis)=="DEFAULT") THEN
+
+          CALL location_message( 'DEFAULT MODE: time-factor specification required', .FALSE. )
+ 
+       !> Allocate array where to store temporary emission values      
+          IF(.NOT. ALLOCATED(emis)) ALLOCATE(emis(nys:nyn,nxl:nxr))
+
+       !> Allocate time factor per emitted component category
+          ALLOCATE(time_factor(emt_att%ncat))  
+
+       !> Read-in HOURLY emission time factor
+          IF (TRIM(time_fac_type)=="HOUR") THEN
+
+          !> Update time indices
+             CALL time_default_indices(month_of_year,day_of_month,hour_of_day,index_hh)
+
+          !> Check if the index is less or equal to the temporal dimension of HOURLY emission files              
+             IF (index_hh .LE. SIZE(emt_att%hourly_emis_time_factor(1,:))) THEN
+
+             !> Read-in the correspondant time factor              
+                time_factor(:)= emt_att%hourly_emis_time_factor(:,index_hh)      
+
+             ELSE
+
+                message_string = 'The "HOUR" time-factors (DEFAULT mode) of the chemistry emission species'           // &
+                              ' are not provided for each hour of the total simulation time'      
+                CALL message( 'chem_emissions_setup', 'CM0448', 2, 2, 0, 6, 0 ) 
+
+             ENDIF
+
+       !> Read-in MDH emissions time factors
+          ELSEIF (TRIM(time_fac_type)=="MDH") THEN
+
+          !> Update time indices      
+             CALL time_default_indices(daytype_mdh,month_of_year,day_of_month,hour_of_day,index_mm,index_dd,index_hh)
+
+
+          !> Check if the index is less or equal to the temporal dimension of MDH emission files              
+             IF ((index_hh+index_dd+index_mm) .LE. SIZE(emt_att%mdh_emis_time_factor(1,:))) THEN
+
+             !> Read-in the correspondant time factor              
+                time_factor(:)=emt_att%mdh_emis_time_factor(:,index_mm)*emt_att%mdh_emis_time_factor(:,index_dd)*   &
+                                                                         emt_att%mdh_emis_time_factor(:,index_hh)
+     
+             ELSE
+
+                message_string = 'The "MDH" time-factors (DEFAULT mode) of the chemistry emission species'           // &
+                              ' are not provided for each hour/day/month  of the total simulation time'      
+                CALL message( 'chem_emissions_setup', 'CM0449', 2, 2, 0, 6, 0 )
+
+             ENDIF 
+
+          ELSE
+          !> condition when someone used the DEFAULT mode but forgets to indicate the time-factor in the namelist
+             
+             message_string = 'The time-factor (DEFAULT mode) of the chemistry emission species'           // &
+                              ' is not provided in the NAMELIST'      
+             CALL message( 'chem_emissions_setup', 'CM0450', 2, 2, 0, 6, 0 )
+         
+          ENDIF
+
+       !> PARAMETERIZED MODE
+       ELSEIF (TRIM(mode_emis)=="PARAMETERIZED") THEN
+          CALL location_message( 'PARAMETERIZED MODE: time-factor specification is fixed: '                         // &
+                                 ' 24 values for every day of the year ', .FALSE. )
+        
+          !Assign Constant Values of time factors, diurnal time profile for traffic sector:
+          par_emis_time_factor( : ) = (/ 0.009, 0.004, 0.004, 0.009, 0.029, 0.039, 0.056, 0.053, 0.051, 0.051, 0.052, 0.055, &
+                                                 0.059, 0.061, 0.064, 0.067, 0.069, 0.069, 0.049, 0.039, 0.039, 0.029, 0.024, 0.019 /)
+          
+          !> in this case allocate time factor each hour in a day
+          IF (.NOT. ALLOCATED(time_factor)) ALLOCATE(time_factor(1))
+
+          !>Pass the values of time factors in the parameterized mode to the time_factor variable. in this case index_hh==hour_of_day
+          index_hh=hour_of_day
+
+          time_factor(1) = par_emis_time_factor(index_hh)
+
+       ENDIF
+
+!--------------------------------
+!--  EMISSION DISTRIBUTION Calculation
+
+       !> PARAMETERIZED CASE
+       IF ( mode_emis == "PARAMETERIZED" ) THEN
+
+          DO ispec=1,nspec_out
+
+             !> Values are still micromoles/(m**2*s). Units in this case are always micromoles/m**2*day (or kilograms/m**2*day for PMs)
+             emis_distribution(1,nys:nyn,nxl:nxr,ispec)=surface_csflux(match_spec_input(ispec))*time_factor(1)*hour_to_s
+
+          ENDDO 
+
+       !> PRE-PROCESSED CASE
+       ELSEIF (TRIM(mode_emis)=="PRE-PROCESSED") THEN
+
+          !> Start Cycle over Species
+          DO ispec=1,nspec_out !> nspec_out represents the number of species in common between 
+                               !  the emission input data and the chemistry mechanism used
+    
+             emis_distribution(1,nys:nyn,nxl:nxr,ispec) = emt(match_spec_input(ispec))%                               &
+                                                                   preproc_emission_data(index_hh,1,nys+1:nyn+1,nxl+1:nxr+1)* &
+                                                                      con_factor
+          
+          ENDDO
+
+      !TBD: At the moment the default mode considers a single vertical level (the surface). So we need to change it accordingly or eventually include the variable vertical_profile to be used in the default mode i we want to consider additional levels.
+
+       ELSE IF (TRIM(mode_emis)=="DEFAULT") THEN
+
+       !> Allocate array for the emission value corresponding to a specific category and time factor
+          ALLOCATE(delta_emis(nys:nyn,nxl:nxr))  
+
+
+       !> Start Cycle over categories
+          DO icat = 1, emt_att%ncat
+ 
+          !> Start Cycle over Species
+             DO ispec=1,nspec_out !> nspec_out represents the number of species in common between 
+                                  !  the emission input data and the chemistry mechanism used
+
+                emis(nys:nyn,nxl:nxr) = emt(match_spec_input(ispec))%default_emission_data(icat,nys+1:nyn+1,nxl+1:nxr+1)
+
+!TBD: The consideration of dt_emis of the input data is still missing. Basically the emissions could be provided every 10, 30 minutes and not always at one hour. This should be eventually solved in the date_and_time mode routine.
+
+             !> the time factors are 24 for each day. When multiplied by a daily value, they allow to have an hourly value. Then to convert it to seconds, we still have to divide this value by 3600. 
+             !  So given any units, we convert them to seconds and finally multiply them by 24 ((value/sec)*(24*3600)=value/day ---- (value/day)*time_factor=value/hour ---(value/hour)/(3600)=value/sec )
+             !                                                                                 ((value/sec)*(24*3600)*time_factor)/3600=24*(value/sec)*time_factor                          
+
+             !> NOX Compositions
+                IF (TRIM(spc_names(match_spec_model(ispec)))=="NO") THEN
+                !>             Kg/m2*s                   kg/m2*s                                                    
+                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%nox_comp(icat,1)*con_factor*hour_per_day
+                   
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+
+                ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="NO2") THEN
+   
+                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%nox_comp(icat,2)*con_factor*hour_per_day
+
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+ 
+             !> SOX Compositions
+                      
+                ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="SO2") THEN
+                   !>             Kg/m2*s                   kg/m2*s                                                                        
+                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%sox_comp(icat,1)*con_factor*hour_per_day
+
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+
+                ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="SO4") THEN
+                   !>             Kg/m2*s                   kg/m2*s                                                                          
+                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%sox_comp(icat,2)*con_factor*hour_per_day
+
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+ 
+
+             !> PMs should be in kg/m**2/s, so conversion factor is here still required
+             !> PM1 Compositions
+                ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1") THEN
+
+                !> Cycle over the different pm components for PM1 type
+                   DO i_pm_comp= 1,SIZE(emt_att%pm_comp(1,:,1))
+
+                      delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,1)*con_factor*hour_per_day 
+                                                                                         
+
+                      emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+ 
+                   ENDDO
+
+             !> PM2.5 Compositions
+                ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="PM25") THEN
+
+                !> Cycle over the different pm components for PM2.5 type
+                   DO i_pm_comp= 1,SIZE(emt_att%pm_comp(1,:,2))
+
+                      delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,2)*con_factor*hour_per_day 
+                                                                                         
+
+                      emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr)
+ 
+                   ENDDO
+
+             !> PM10 Compositions
+                ELSE IF (TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+
+                !> Cycle over the different pm components for PM10 type
+                   DO i_pm_comp= 1,SIZE(emt_att%pm_comp(1,:,3))  
+                       
+                      delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*emt_att%pm_comp(icat,i_pm_comp,3)*con_factor*hour_per_day 
+                                                                                                 
+
+                      emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr) 
+
+                   ENDDO
+
+             !> VOCs Compositions: for VOCs, the input value is provided in kg/m**2*s but the composition is provided in mole/kg: a conversion factor for the input that could be eventually provided in, for example, tons/(m**2*s) is still required
+                ELSE IF  (SIZE(match_spec_voc_input) .GT. 0) THEN
+
+                  !TBD: maybe we can avoid the cycle 
+                   DO ivoc= 1,SIZE(match_spec_voc_input)
+
+                      IF (TRIM(spc_names(match_spec_model(ispec)))==TRIM(emt_att%voc_name(ivoc))) THEN    
+
+                         delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*                                    &
+                                                       emt_att%voc_comp(icat,match_spec_voc_input(ivoc))*con_factor*hour_per_day
+
+                         emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr) 
+
+                      ENDIF                       
+
+                   ENDDO
+                
+             !> General case (other species)
+                ELSE
+
+                   delta_emis(nys:nyn,nxl:nxr) = emis(nys:nyn,nxl:nxr)*time_factor(icat)*con_factor*hour_per_day
+ 
+                   emis_distribution(1,nys:nyn,nxl:nxr,ispec)=emis_distribution(1,nys:nyn,nxl:nxr,ispec)+delta_emis(nys:nyn,nxl:nxr) 
+
+                ENDIF  ! IF (spc_names==)
+
+                !> for every species and category set emis to 0 so to avoid overwriting. TBD: discuss whether necessary
+
+                emis(:,:)= 0 
+
+             ENDDO
+
+          !> for every category set delta_emis to 0 so to avoid overwriting. TBD: discuss whether necessary
+
+          delta_emis(:,:)=0 
+ 
+          ENDDO
+
+       ENDIF  !> mode_emis
+
+!-------------------------------------------------------------------------------------------------------
+!--- Cycle to transform x,y coordinates to the one of surface_mod and to assign emission values to cssws
+!-------------------------------------------------------------------------------------------------------
+
+!-- PARAMETERIZED mode
+       !> For the PARAMETERIZED mode units of inputs are always micromoles/(m**2*s). In this case we do not need the molar mass for conversion into ppms
+       IF (TRIM(mode_emis)=="PARAMETERIZED") THEN
+
+          IF ( street_type_f%from_file )  THEN
+
+       !> Streets are lsm surfaces, hence, no usm surface treatment required
+             IF (surf_lsm_h%ns .GT. 0 ) THEN
+                DO  m = 1, surf_lsm_h%ns
+                   i = surf_lsm_h%i(m)
+                   j = surf_lsm_h%j(m)
+                   k = surf_lsm_h%k(m)
+
+
+                   IF ( street_type_f%var(j,i) >= main_street_id  .AND. street_type_f%var(j,i) < max_street_id )  THEN
+
+                   !> Cycle over already matched species
+                      DO  ispec=1,nspec_out
+
+                         !> PMs are already in mass units: kilograms 
+                         IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                             .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+
+                            !              kg/(m^2*s) *kg/m^3                                
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec)) * &
+                            !                                                       kg/(m^2*s)
+                                                                                emis_distribution(1,j,i,ispec)*        &
+                            !                                                    kg/m^3
+                                                                                rho_air(k)   
+
+                         ELSE
+
+                         !> Other Species: inputs are micromoles: they have to be converted in moles
+                         !                 ppm/s *m *kg/m^3                
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_main(match_spec_input(ispec))*   &
+                         !                                                    micromoles/(m^2*s)
+                                                                          emis_distribution(1,j,i,ispec) *              &
+                         !                                                    m^3/Nmole
+                                                                          conv_to_ratio(k,j,i)*                         &       
+                         !                                                    kg/m^3
+                                                                          rho_air(k)   
+ 
+
+                         ENDIF
+
+                      ENDDO
+
+
+                   ELSEIF ( street_type_f%var(j,i) >= side_street_id  .AND. street_type_f%var(j,i) < main_street_id )  THEN
+
+                   !> Cycle over already matched species
+                      DO  ispec=1,nspec_out
+
+                         !> PMs are already in mass units: micrograms
+                         IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                             .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+
+                            !              kg/(m^2*s) *kg/m^3                               
+                            surf_lsm_h%cssws(match_spec_model(ispec),m)= emiss_factor_side(match_spec_input(ispec)) *   &
+                            !                                                       kg/(m^2*s)
+                                                                                emis_distribution(1,j,i,ispec)*        &
+                            !                                                    kg/m^3
+                                                                                rho_air(k)   
+                         ELSE
+                       
+
+                         !>Other Species: inputs are micromoles
+                         !                 ppm/s *m *kg/m^3                
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emiss_factor_side(match_spec_input(ispec)) *   &
+                         !                                                    micromoles/(m^2*s)
+                                                                          emis_distribution(1,j,i,ispec) *              &
+                         !                                                    m^3/Nmole
+                                                                          conv_to_ratio(k,j,i)*                         &       
+                         !                                                    kg/m^3
+                                                                          rho_air(k)   
+                         ENDIF
+
+                      ENDDO
+
+                   ELSE
+
+                   !> If no street type is defined, then assign null emissions to all the species
+                      surf_lsm_h%cssws(:,m) = 0.0_wp
+
+                   ENDIF
+
+                ENDDO
+             ELSEIF ( salsa ) THEN
+                DO  m = 1, surf_def_h(0)%ns
+                   i = surf_def_h(0)%i(m)
+                   j = surf_def_h(0)%j(m)
+                   k = surf_def_h(0)%k(m)
+
+
+                   IF ( street_type_f%var(j,i) >= main_street_id  .AND.        &
+                        street_type_f%var(j,i) < max_street_id )               &
+                   THEN
+
+                      !> Cycle over already matched species
+                      DO  ispec=1,nspec_out
+
+                         !> PMs are already in mass units:micrograms: have to be converted to kilograms 
+                         IF ( TRIM(spc_names(match_spec_model(ispec)))=="PM1"       &
+                              .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25" &
+                              .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10")&
+                         THEN
+                                  
+                            surf_def_h(0)%cssws(match_spec_model(ispec),m) =   &
+                                  emiss_factor_main(match_spec_input(ispec)) * &
+                                  emis_distribution(1,j,i,ispec) * rho_air(k) /&
+                                  time_factor(1)
+                         ELSE
+
+                         !> Other Species: inputs are micromoles: have to be converted              
+                            surf_def_h(0)%cssws(match_spec_model(ispec),m) =   &
+                               emiss_factor_main(match_spec_input(ispec)) *    &
+                               emis_distribution(1,j,i,ispec) *                &
+                               conv_to_ratio(k,j,i) *  rho_air(k) / time_factor(1)
+                         ENDIF
+                      ENDDO
+
+                   ELSEIF ( street_type_f%var(j,i) >= side_street_id  .AND.    &
+                            street_type_f%var(j,i) < main_street_id )          &
+                   THEN
+
+                   !> Cycle over already matched species
+                      DO  ispec=1,nspec_out
+
+                         !> PMs are already in mass units: micrograms
+                         IF ( TRIM(spc_names(match_spec_model(ispec)))=="PM1"   &
+                              .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25" &
+                              .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10")&
+                         THEN
+
+                            surf_def_h(0)%cssws(match_spec_model(ispec),m) =   &
+                               emiss_factor_side(match_spec_input(ispec)) *    &
+                               emis_distribution(1,j,i,ispec) * rho_air(k) /   &
+                               time_factor(1)  
+                         ELSE
+               
+                            surf_def_h(0)%cssws(match_spec_model(ispec),m) =   &
+                               emiss_factor_side(match_spec_input(ispec)) *    &
+                               emis_distribution(1,j,i,ispec) *                &
+                               conv_to_ratio(k,j,i) * rho_air(k) / time_factor(1)
+                         ENDIF
+
+                      ENDDO
+
+                   ELSE
+
+                   !> If no street type is defined, then assign null emissions to all the species
+                      surf_def_h(0)%cssws(:,m) = 0.0_wp
+
+                   ENDIF
+
+                ENDDO
+
+             ENDIF
+
+          ENDIF
+
+       !> For both DEFAULT and PRE-PROCESSED
+       ELSE    
+       
+
+          DO ispec=1,nspec_out 
+                                !TBD: for the PRE-PROCESSED mode in the future, values at different heights should be included!            
+             !> Default surface type
+             IF (surf_def_h(0)%ns .GT. 0) THEN
+
+                DO  m = 1, surf_def_h(0)%ns
+
+                   i = surf_def_h(0)%i(m)
+                   j = surf_def_h(0)%j(m)
+
+                   IF ( emis_distribution(1,j,i,ispec) > 0.0_wp )  THEN
+
+
+                      !> Distinguish between PMs (no needing conversion in ppms), 
+                      !  VOC (already converted to moles/(m**2*s) using conv_factors: they do not need molar masses for their conversion to PPMs ) and
+                      ! other Species (still expressed in Kg/(m**2*s) at this point)
+
+                      !> PMs
+                      IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                             .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+                   
+                         !            kg/(m^2*s) *kg/m^3                         kg/(m^2*s)                 
+                         surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec)*   &
+                         !                                                  kg/m^3
+                                                                          rho_air(nzb)   
+ 
+ 
+                      ELSE
+
+                         !> VOCs
+                         IF ( len_index_voc .GT. 0 .AND. emt_att%species_name(match_spec_input(ispec))=="VOC" ) THEN
+                            !          ( ppm/s) * m * kg/m^3                         mole/(m^2/s)   
+                            surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *      &
+                                                                            !    m^3/mole          ppm
+                                                                             conv_to_ratio(nzb,j,i)*ratio2ppm *      &
+                         !                                                    kg/m^3
+                                                                             rho_air(nzb)   
+
+
+                         !> OTHER SPECIES
+                         ELSE
+
+                            !               ( ppm/s )*m  * kg/m^3                      kg/(m^2/s)                      
+                            surf_def_h(0)%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *      &
+                                                                               !  mole/Kg        
+                                                                             (1/emt_att%xm(ispec))*                &
+                            !                                                    m^3/mole          ppm
+                                                                             conv_to_ratio(nzb,j,i)*ratio2ppm*       &
+                            !                                                  kg/m^3
+                                                                             rho_air(nzb)   
+  
+
+                         ENDIF
+
+                      ENDIF
+
+                   ENDIF
+
+                ENDDO
+
+             END IF
+         
+             !-- Land Surface Mode surface type
+             IF (surf_lsm_h%ns .GT. 0) THEN
+
+                DO m = 1, surf_lsm_h%ns
+
+                   i = surf_lsm_h%i(m)
+                   j = surf_lsm_h%j(m)
+                   k = surf_lsm_h%k(m)
+
+                   IF ( emis_distribution(1,j,i,ispec) > 0.0_wp )  THEN
+
+                      !> Distinguish between PMs (no needing conversion in ppms), 
+                      !  VOC (already converted to moles/(m**2*s) using conv_factors: they do not need molar masses for their conversion to PPMs ) and
+                      ! other Species (still expressed in Kg/(m**2*s) at this point)
+
+                      !> PMs
+                      IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                             .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+   
+                         !         kg/(m^2*s) * kg/m^3                           kg/(m^2*s)            
+                         surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *              &
+                         !                                                  kg/m^3
+                                                                          rho_air(k)   
+ 
+                      ELSE
+
+                         !> VOCs
+                         IF ( len_index_voc .GT. 0 .AND. emt_att%species_name(match_spec_input(ispec))=="VOC" ) THEN
+                            !          ( ppm/s) * m * kg/m^3                        mole/(m^2/s)   
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *      &
+                                                                          !    m^3/mole          ppm
+                                                                          conv_to_ratio(k,j,i)*ratio2ppm*    &
+                         !                                                 kg/m^3
+                                                                          rho_air(k)   
+
+                         !> OTHER SPECIES
+                         ELSE
+   
+                            !         ( ppm/s) * m * kg/m^3                        kg/(m^2/s)                      
+                            surf_lsm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *               &
+                                                                               !  mole/Kg    
+                                                                         (1/emt_att%xm(ispec))*                          &
+                            !                                                m^3/mole           ppm
+                                                                         conv_to_ratio(k,j,i)*ratio2ppm*                 &
+                            !                                            kg/m^3
+                                                                         rho_air(k)   
+                                                      
+                         ENDIF
+
+                      ENDIF
+
+                   ENDIF
+
+                ENDDO
+
+             END IF
+
+             !-- Urban Surface Mode surface type
+             IF (surf_usm_h%ns .GT. 0) THEN
+
+
+                DO m = 1, surf_usm_h%ns
+
+                   i = surf_usm_h%i(m)
+                   j = surf_usm_h%j(m)
+                   k = surf_usm_h%k(m)
+
+                   IF ( emis_distribution(1,j,i,ispec) > 0.0_wp )  THEN
+
+                      !> PMs
+                      IF (TRIM(spc_names(match_spec_model(ispec)))=="PM1" .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM25"  &
+                             .OR. TRIM(spc_names(match_spec_model(ispec)))=="PM10") THEN
+                      
+                         !          kg/(m^2*s) *kg/m^3                             kg/(m^2*s)                     
+                         surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec)*        & 
+                         !                                              kg/m^3
+                                                                       rho_air(k)   
+
+ 
+                      ELSE
+
+                         !> VOCs
+                         IF ( len_index_voc .GT. 0 .AND. emt_att%species_name(match_spec_input(ispec))=="VOC" ) THEN
+                            !          ( ppm/s) * m * kg/m^3                        mole/(m^2/s)   
+                            surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *   &
+                                                                          !    m^3/mole          ppm
+                                                                          conv_to_ratio(k,j,i)*ratio2ppm*    &
+                         !                                                kg/m^3
+                                                                          rho_air(k)   
+
+                         !> OTHER SPECIES
+                         ELSE
+
+
+                         !            ( ppm/s) * m * kg/m^3                        kg/(m^2/s)                      
+                            surf_usm_h%cssws(match_spec_model(ispec),m) = emis_distribution(1,j,i,ispec) *      &
+                                                                             !  mole/Kg    
+                                                                         (1/emt_att%xm(ispec))*                 &
+                            !                                                m^3/mole           ppm
+                                                                         conv_to_ratio(k,j,i)*ratio2ppm*        &
+                            !                                            kg/m^3
+                                                                         rho_air(k)   
+
+
+                         ENDIF
+
+                      ENDIF
+
+                   ENDIF
+ 
+                ENDDO
+             END IF
+          ENDDO
+
+       ENDIF 
+
+
+    !> At the end of each call to chem_emissions setup, the time_factor is deallocated (ALLOCATED ONLY in the DEFAULT mode) 
+
+       IF ( ALLOCATED ( time_factor ) ) DEALLOCATE( time_factor )
+
+   ENDIF !> emis_output_required
+
+
+#endif
+
+ END SUBROUTINE chem_emissions_setup
+
+ END MODULE chem_emissions_mod
Index: /palm/tags/release-6.0/SOURCE/chem_gasphase_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/chem_gasphase_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/chem_gasphase_mod.f90	(revision 3477)
@@ -0,0 +1,2328 @@
+MODULE chem_gasphase_mod
+ 
+!   Mechanism: passive
+!
+!------------------------------------------------------------------------------!
+!
+! ******Module chem_gasphase_mod is automatically generated by kpp4palm ******
+!
+!   *********Please do NOT change this Code,it will be ovewritten *********
+!
+!------------------------------------------------------------------------------!
+! This file was created by KPP (http://people.cs.vt.edu/asandu/Software/Kpp/)
+! and kpp4palm (created by Klaus Ketelsen). kpp4palm is an adapted version 
+! of KP4 (JÃ¶ckel,P.,Kerkweg,A.,Pozzer,A.,Sander,R.,Tost,H.,Riede,
+! H.,Baumgaertner,A.,Gromov,S.,and Kern,B.,2010: Development cycle 2 of
+! the Modular Earth Submodel System (MESSy2),Geosci. Model Dev.,3,717-752,
+! https://doi.org/10.5194/gmd-3-717-2010). KP4 is part of the Modular Earth 
+! Submodel System (MESSy),which is is available under the  GNU General Public 
+! License (GPL).
+!
+! KPP is free software; you can redistribute it and/or modify it under the terms 
+! of the General Public Licence as published by the Free Software Foundation; 
+! either version 2 of the License,or (at your option) any later version. 
+! KPP is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; 
+! without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+! PURPOSE. See the GNU General Public Licence for more details. 
+!
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation,either version 3 of the License,or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful,but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not,see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id: chem_gasphase_mod.f90 3287 2018-09-28 10:19:58Z forkel $
+! forkel June 2018: qvap,fakt added
+! forkel June 2018: reset case in  Initialize,Integrate,Update_rconst
+! 
+! 
+! 3287 2018-09-28 10:19:58Z forkel
+!
+! forkel Sept. 2017: Variables for photolyis added
+!
+!
+! Nov. 2016: Intial version (Klaus Ketelsen)
+!
+!------------------------------------------------------------------------------!
+!
+
+
+! Set kpp Double Precision to PALM Default Precision
+
+  USE kinds,           ONLY: dp=>wp
+
+  USE pegrid,          ONLY: myid, threads_per_task
+
+  IMPLICIT        NONE
+  PRIVATE
+  !SAVE  ! note: occurs again in automatically generated code ...
+
+!  PUBLIC :: IERR_NAMES
+ 
+! PUBLIC :: SPC_NAMES,EQN_NAMES,EQN_TAGS,REQ_HET,REQ_AEROSOL,REQ_PHOTRAT &
+!         ,REQ_MCFCT,IP_MAX,jname
+
+  PUBLIC :: eqn_names, phot_names, spc_names
+  PUBLIC :: nmaxfixsteps
+  PUBLIC :: atol, rtol
+  PUBLIC :: nspec, nreact
+  PUBLIC :: temp
+  PUBLIC :: qvap
+  PUBLIC :: fakt
+  PUBLIC :: phot 
+  PUBLIC :: rconst
+  PUBLIC :: nvar
+  PUBLIC :: nphot
+  PUBLIC :: vl_dim                     ! PUBLIC to ebable other MODULEs to distiguish between scalar and vec
+ 
+  PUBLIC :: initialize, integrate, update_rconst
+  PUBLIC :: chem_gasphase_integrate
+  PUBLIC :: initialize_kpp_ctrl
+
+! END OF MODULE HEADER TEMPLATE
+                                                                 
+! Variables used for vector mode                                 
+                                                                 
+  LOGICAL, PARAMETER          :: l_vector = .FALSE.            
+  INTEGER, PARAMETER          :: i_lu_di = 2
+  INTEGER, PARAMETER          :: vl_dim = 1
+  INTEGER                     :: vl                              
+                                                                 
+  INTEGER                     :: vl_glo                          
+  INTEGER                     :: is, ie                           
+                                                                 
+                                                                 
+  INTEGER, DIMENSION(vl_dim)  :: kacc, krej                       
+  INTEGER, DIMENSION(vl_dim)  :: ierrv                           
+  LOGICAL                     :: data_loaded = .FALSE.             
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Parameter Module File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Parameters.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+
+! NSPEC - Number of chemical species
+  INTEGER, PARAMETER :: nspec = 2 
+! NVAR - Number of Variable species
+  INTEGER, PARAMETER :: nvar = 2 
+! NVARACT - Number of Active species
+  INTEGER, PARAMETER :: nvaract = 2 
+! NFIX - Number of Fixed species
+  INTEGER, PARAMETER :: nfix = 1 
+! NREACT - Number of reactions
+  INTEGER, PARAMETER :: nreact = 2 
+! NVARST - Starting of variables in conc. vect.
+  INTEGER, PARAMETER :: nvarst = 1 
+! NFIXST - Starting of fixed in conc. vect.
+  INTEGER, PARAMETER :: nfixst = 3 
+! NONZERO - Number of nonzero entries in Jacobian
+  INTEGER, PARAMETER :: nonzero = 2 
+! LU_NONZERO - Number of nonzero entries in LU factoriz. of Jacobian
+  INTEGER, PARAMETER :: lu_nonzero = 2 
+! CNVAR - (NVAR+1) Number of elements in compressed row format
+  INTEGER, PARAMETER :: cnvar = 3 
+! CNEQN - (NREACT+1) Number stoicm elements in compressed col format
+  INTEGER, PARAMETER :: cneqn = 3 
+! NHESS - Length of Sparse Hessian
+  INTEGER, PARAMETER :: nhess = 1 
+! NMASS - Number of atoms to check mass balance
+  INTEGER, PARAMETER :: nmass = 1 
+
+! Index declaration for variable species in C and VAR
+!   VAR(ind_spc) = C(ind_spc)
+
+  INTEGER, PARAMETER, PUBLIC :: ind_pm10 = 1 
+  INTEGER, PARAMETER, PUBLIC :: ind_pm25 = 2 
+
+! Index declaration for fixed species in C
+!   C(ind_spc)
+
+
+! Index declaration for fixed species in FIX
+!    FIX(indf_spc) = C(ind_spc) = C(NVAR+indf_spc)
+
+
+! NJVRP - Length of sparse Jacobian JVRP
+  INTEGER, PARAMETER :: njvrp = 2 
+
+! NSTOICM - Length of Sparse Stoichiometric Matrix
+  INTEGER, PARAMETER :: nstoicm = 1 
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Global Data Module File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Global.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+
+! Declaration of global variables
+
+! C - Concentration of all species
+  REAL(kind=dp):: c(nspec)
+! VAR - Concentrations of variable species (global)
+  REAL(kind=dp):: var(nvar)
+! 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)
+! TIME - Current integration time
+  REAL(kind=dp):: time
+! TEMP - Temperature
+  REAL(kind=dp):: temp
+! TSTART - Integration start time
+  REAL(kind=dp):: tstart
+! ATOL - Absolute tolerance
+  REAL(kind=dp):: atol(nvar)
+! RTOL - Relative tolerance
+  REAL(kind=dp):: rtol(nvar)
+! STEPMIN - Lower bound for integration step
+  REAL(kind=dp):: stepmin
+! CFACTOR - Conversion factor for concentration units
+  REAL(kind=dp):: cfactor
+
+! INLINED global variable declarations
+
+! QVAP - Water vapor
+  REAL(kind=dp):: qvap
+! FAKT - Conversion factor
+  REAL(kind=dp):: fakt
+
+
+! INLINED global variable declarations
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Sparse Jacobian Data Structures File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_JacobianSP.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+
+! Sparse Jacobian Data
+
+
+  INTEGER, PARAMETER, DIMENSION(2):: lu_irow =  (/ &
+       1, 2 /) 
+
+  INTEGER, PARAMETER, DIMENSION(2):: lu_icol =  (/ &
+       1, 2 /) 
+
+  INTEGER, PARAMETER, DIMENSION(3):: lu_crow =  (/ &
+       1, 2, 3 /) 
+
+  INTEGER, PARAMETER, DIMENSION(3):: lu_diag =  (/ &
+       1, 2, 3 /) 
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Utility Data Module File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Monitor.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+  CHARACTER(len=15), PARAMETER, DIMENSION(2):: spc_names =  (/ &
+     'PM10           ','PM25           ' /)
+
+  CHARACTER(len=100), PARAMETER, DIMENSION(2):: eqn_names =  (/ &
+     'PM10 --> PM10                                                                                       ',&
+     'PM25 --> PM25                                                                                       ' /)
+
+! INLINED global variables
+
+  !   inline f90_data: declaration of global variables for photolysis
+  !   REAL(kind=dp):: phot(nphot)must eventually be moved to global later for 
+  INTEGER, PARAMETER :: nphot = 1
+  !   phot photolysis frequencies
+  REAL(kind=dp):: phot(nphot)
+
+  INTEGER, PARAMETER, PUBLIC :: j_no2 = 1
+
+  CHARACTER(len=15), PARAMETER, DIMENSION(nphot):: phot_names =   (/ &
+     'J_NO2          '/)
+
+! End INLINED global variables
+
+
+! Automatic generated PUBLIC Statements for ip_ and ihs_ variables 
+ 
+! Automatic generated PUBLIC Statements for ip_ and ihs_ variables 
+ 
+! Automatic generated PUBLIC Statements for ip_ and ihs_ variables 
+ 
+! Automatic generated PUBLIC Statements for ip_ and ihs_ variables 
+ 
+ 
+!  variable definations from  individual module headers 
+ 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Initialization File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Initialize.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Numerical Integrator (Time-Stepping) File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Integrator.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! INTEGRATE - Integrator routine
+!   Arguments :
+!      TIN       - Start Time for Integration
+!      TOUT      - End Time for Integration
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Rosenbrock - Implementation of several Rosenbrock methods:             !
+!               *Ros2                                                    !
+!               *Ros3                                                    !
+!               *Ros4                                                    !
+!               *Rodas3                                                  !
+!               *Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu,August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu,May 2006                  !                               !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+
+  SAVE
+  
+!~~~>  statistics on the work performed by the rosenbrock method
+  INTEGER, PARAMETER :: nfun=1, njac=2, nstp=3, nacc=4, &
+                        nrej=5, ndec=6, nsol=7, nsng=8, &
+                        ntexit=1, nhexit=2, nhnew = 3
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Linear Algebra Data and Routines File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_LinearAlgebra.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! The ODE Jacobian of Chemical Model File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Jacobian.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! The ODE Function of Chemical Model File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Function.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+! A - Rate for each equation
+  REAL(kind=dp):: a(nreact)
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! The Reaction Rates File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Rates.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+! Auxiliary Routines File
+! 
+! Generated by KPP-2.2.3 symbolic chemistry Kinetics PreProcessor
+!       (http://www.cs.vt.edu/~asandu/Software/KPP)
+! KPP is distributed under GPL,the general public licence
+!       (http://www.gnu.org/copyleft/gpl.html)
+! (C) 1995-1997,V. Damian & A. Sandu,CGRER,Univ. Iowa
+! (C) 1997-2005,A. Sandu,Michigan Tech,Virginia Tech
+!     With important contributions from:
+!        M. Damian,Villanova University,USA
+!        R. Sander,Max-Planck Institute for Chemistry,Mainz,Germany
+! 
+! File                 : chem_gasphase_mod_Util.f90
+! Time                 : Tue Sep 25 18:34:57 2018
+! Working directory    : /home/forkel-r/palmstuff/work/chemistry20180925/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Equation file        : chem_gasphase_mod.kpp
+! Output root filename : chem_gasphase_mod
+! 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+
+
+
+  ! header MODULE initialize_kpp_ctrl_template
+
+  ! notes:
+  ! - l_vector is automatically defined by kp4
+  ! - vl_dim is automatically defined by kp4
+  ! - i_lu_di is automatically defined by kp4
+  ! - wanted is automatically defined by xmecca
+  ! - icntrl rcntrl are automatically defined by kpp
+  ! - "USE messy_main_tools" is in MODULE_header of messy_mecca_kpp.f90
+  ! - SAVE will be automatically added by kp4
+
+  !SAVE
+
+  ! for fixed time step control
+  ! ... max. number of fixed time steps (sum must be 1)
+  INTEGER, PARAMETER         :: nmaxfixsteps = 50
+  ! ... switch for fixed time stepping
+  LOGICAL, PUBLIC            :: l_fixed_step = .FALSE.
+  INTEGER, PUBLIC            :: nfsteps = 1
+  ! ... number of kpp control PARAMETERs
+  INTEGER, PARAMETER, PUBLIC :: nkppctrl = 20
+  !
+  INTEGER, DIMENSION(nkppctrl), PUBLIC     :: icntrl = 0
+  REAL(dp), DIMENSION(nkppctrl), PUBLIC     :: rcntrl = 0.0_dp
+  REAL(dp), DIMENSION(nmaxfixsteps), PUBLIC :: t_steps = 0.0_dp
+
+  ! END header MODULE initialize_kpp_ctrl_template
+
+ 
+! Interface Block 
+ 
+  INTERFACE            initialize
+    MODULE PROCEDURE   initialize
+  END INTERFACE        initialize
+ 
+  INTERFACE            integrate
+    MODULE PROCEDURE   integrate
+  END INTERFACE        integrate
+ 
+  INTERFACE            fun
+    MODULE PROCEDURE   fun
+  END INTERFACE        fun
+ 
+  INTERFACE            kppsolve
+    MODULE PROCEDURE   kppsolve
+  END INTERFACE        kppsolve
+ 
+  INTERFACE            jac_sp
+    MODULE PROCEDURE   jac_sp
+  END INTERFACE        jac_sp
+ 
+  INTERFACE            k_arr
+    MODULE PROCEDURE   k_arr
+  END INTERFACE        k_arr
+ 
+  INTERFACE            update_rconst
+    MODULE PROCEDURE   update_rconst
+  END INTERFACE        update_rconst
+ 
+  INTERFACE            arr2
+    MODULE PROCEDURE   arr2
+  END INTERFACE        arr2
+ 
+  INTERFACE            initialize_kpp_ctrl
+    MODULE PROCEDURE   initialize_kpp_ctrl
+  END INTERFACE        initialize_kpp_ctrl
+ 
+  INTERFACE            error_output
+    MODULE PROCEDURE   error_output
+  END INTERFACE        error_output
+ 
+  INTERFACE            wscal
+    MODULE PROCEDURE   wscal
+  END INTERFACE        wscal
+ 
+!INTERFACE not working  INTERFACE            waxpy
+!INTERFACE not working    MODULE PROCEDURE   waxpy
+!INTERFACE not working  END INTERFACE        waxpy
+ 
+  INTERFACE            rosenbrock
+    MODULE PROCEDURE   rosenbrock
+  END INTERFACE        rosenbrock
+ 
+  INTERFACE            funtemplate
+    MODULE PROCEDURE   funtemplate
+  END INTERFACE        funtemplate
+ 
+  INTERFACE            jactemplate
+    MODULE PROCEDURE   jactemplate
+  END INTERFACE        jactemplate
+ 
+  INTERFACE            kppdecomp
+    MODULE PROCEDURE   kppdecomp
+  END INTERFACE        kppdecomp
+ 
+  INTERFACE            chem_gasphase_integrate
+    MODULE PROCEDURE   chem_gasphase_integrate
+  END INTERFACE        chem_gasphase_integrate
+ 
+ 
+ CONTAINS
+ 
+SUBROUTINE initialize()
+
+
+  INTEGER         :: j, k
+
+  INTEGER :: i
+  REAL(kind=dp):: x
+  k = is
+  cfactor = 1.000000e+00_dp
+
+  x = (0.) * cfactor
+  DO i = 1 , nvar
+  ENDDO
+
+  x = (0.) * cfactor
+  DO i = 1 , nfix
+    fix(i) = x
+  ENDDO
+
+! constant rate coefficients
+! END constant rate coefficients
+
+! INLINED initializations
+
+! End INLINED initializations
+
+      
+END SUBROUTINE initialize
+ 
+SUBROUTINE integrate( tin, tout, &
+  icntrl_u, rcntrl_u, istatus_u, rstatus_u, ierr_u)
+
+
+   REAL(kind=dp), INTENT(IN):: tin  ! start time
+   REAL(kind=dp), INTENT(IN):: tout ! END time
+   ! OPTIONAL input PARAMETERs and statistics
+   INTEGER,      INTENT(IN), OPTIONAL :: icntrl_u(20)
+   REAL(kind=dp), INTENT(IN), OPTIONAL :: rcntrl_u(20)
+   INTEGER,      INTENT(OUT), OPTIONAL :: istatus_u(20)
+   REAL(kind=dp), INTENT(OUT), OPTIONAL :: rstatus_u(20)
+   INTEGER,      INTENT(OUT), OPTIONAL :: ierr_u
+
+   REAL(kind=dp):: rcntrl(20), rstatus(20)
+   INTEGER       :: icntrl(20), istatus(20), ierr
+
+   INTEGER, SAVE :: ntotal = 0
+
+   icntrl(:) = 0
+   rcntrl(:) = 0.0_dp
+   istatus(:) = 0
+   rstatus(:) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+   icntrl(1) = 0      ! 0 - non- autonomous, 1 - autonomous
+   icntrl(2) = 0      ! 0 - vector tolerances, 1 - scalars
+
+   ! IF OPTIONAL PARAMETERs are given, and IF they are >0, 
+   ! THEN they overwrite default settings. 
+   IF (PRESENT(icntrl_u))THEN
+     WHERE(icntrl_u(:)> 0)icntrl(:) = icntrl_u(:)
+   ENDIF
+   IF (PRESENT(rcntrl_u))THEN
+     WHERE(rcntrl_u(:)> 0)rcntrl(:) = rcntrl_u(:)
+   ENDIF
+
+
+   CALL rosenbrock(nvar, var, tin, tout,  &
+         atol, rtol,               &
+         rcntrl, icntrl, rstatus, istatus, ierr)
+
+   !~~~> debug option: show no of steps
+   ! ntotal = ntotal + istatus(nstp)
+   ! PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=',VAR(ind_O3)
+
+   stepmin = rstatus(nhexit)
+   ! IF OPTIONAL PARAMETERs are given for output they 
+   ! are updated with the RETURN information
+   IF (PRESENT(istatus_u))istatus_u(:) = istatus(:)
+   IF (PRESENT(rstatus_u))rstatus_u(:) = rstatus(:)
+   IF (PRESENT(ierr_u))  ierr_u       = ierr
+
+END SUBROUTINE integrate
+ 
+SUBROUTINE fun(v, f, rct, vdot)
+
+! V - Concentrations of variable species (local)
+  REAL(kind=dp):: v(nvar)
+! F - Concentrations of fixed species (local)
+  REAL(kind=dp):: f(nfix)
+! RCT - Rate constants (local)
+  REAL(kind=dp):: rct(nreact)
+! Vdot - Time derivative of variable species concentrations
+  REAL(kind=dp):: vdot(nvar)
+
+
+! Computation of equation rates
+
+! Aggregate function
+  vdot(1) = 0
+  vdot(2) = 0
+      
+END SUBROUTINE fun
+ 
+SUBROUTINE kppsolve(jvs, x)
+
+! JVS - sparse Jacobian of variables
+  REAL(kind=dp):: jvs(lu_nonzero)
+! X - Vector for variables
+  REAL(kind=dp):: x(nvar)
+
+  x(2) = x(2) / jvs(2)
+  x(1) = x(1) / jvs(1)
+      
+END SUBROUTINE kppsolve
+ 
+SUBROUTINE jac_sp(v, f, rct, jvs)
+
+! V - Concentrations of variable species (local)
+  REAL(kind=dp):: v(nvar)
+! F - Concentrations of fixed species (local)
+  REAL(kind=dp):: f(nfix)
+! RCT - Rate constants (local)
+  REAL(kind=dp):: rct(nreact)
+! JVS - sparse Jacobian of variables
+  REAL(kind=dp):: jvs(lu_nonzero)
+
+
+! Local variables
+! B - Temporary array
+  REAL(kind=dp):: b(2)
+
+! B(1) = dA(1)/dV(1)
+  b(1) = rct(1)
+! B(2) = dA(2)/dV(2)
+  b(2) = rct(2)
+
+! Construct the Jacobian terms from B's
+! JVS(1) = Jac_FULL(1,1)
+  jvs(1) = 0
+! JVS(2) = Jac_FULL(2,2)
+  jvs(2) = 0
+      
+END SUBROUTINE jac_sp
+ 
+  elemental REAL(kind=dp)FUNCTION k_arr (k_298, tdep, temp)
+    ! arrhenius FUNCTION
+
+    REAL,    INTENT(IN):: k_298 ! k at t = 298.15k
+    REAL,    INTENT(IN):: tdep  ! temperature dependence
+    REAL(kind=dp), INTENT(IN):: temp  ! temperature
+
+    intrinsic exp
+
+    k_arr = k_298 * exp(tdep* (1._dp/temp- 3.3540e-3_dp))! 1/298.15=3.3540e-3
+
+  END FUNCTION k_arr
+ 
+SUBROUTINE update_rconst()
+ INTEGER         :: k
+
+  k = is
+
+! Begin INLINED RCONST
+
+
+! End INLINED RCONST
+
+  rconst(1) = (1.0_dp)
+  rconst(2) = (1.0_dp)
+      
+END SUBROUTINE update_rconst
+ 
+!  END FUNCTION ARR2
+REAL(kind=dp)FUNCTION arr2( a0, b0, temp)
+    REAL(kind=dp):: temp
+    REAL(kind=dp):: a0, b0
+    arr2 = a0 * exp( - b0 / temp)
+END FUNCTION arr2
+ 
+SUBROUTINE initialize_kpp_ctrl(status)
+
+
+  ! i/o
+  INTEGER,         INTENT(OUT):: status
+
+  ! local
+  REAL(dp):: tsum
+  INTEGER  :: i
+
+  ! check fixed time steps
+  tsum = 0.0_dp
+  DO i=1, nmaxfixsteps
+     IF (t_steps(i)< tiny(0.0_dp))exit
+     tsum = tsum + t_steps(i)
+  ENDDO
+
+  nfsteps = i- 1
+
+  l_fixed_step = (nfsteps > 0).and.((tsum - 1.0)< tiny(0.0_dp))
+
+  IF (l_vector)THEN
+     WRITE(*,*) ' MODE             : VECTOR (LENGTH=',VL_DIM,')'
+  ELSE
+     WRITE(*,*) ' MODE             : SCALAR'
+  ENDIF
+  !
+  WRITE(*,*) ' DE-INDEXING MODE :',I_LU_DI
+  !
+  WRITE(*,*) ' ICNTRL           : ',icntrl
+  WRITE(*,*) ' RCNTRL           : ',rcntrl
+  !
+  ! note: this is ONLY meaningful for vectorized (kp4)rosenbrock- methods
+  IF (l_vector)THEN
+     IF (l_fixed_step)THEN
+        WRITE(*,*) ' TIME STEPS       : FIXED (',t_steps(1:nfsteps),')'
+     ELSE
+        WRITE(*,*) ' TIME STEPS       : AUTOMATIC'
+     ENDIF
+  ELSE
+     WRITE(*,*) ' TIME STEPS       : AUTOMATIC '//&
+          &'(t_steps (CTRL_KPP) ignored in SCALAR MODE)'
+  ENDIF
+  ! mz_pj_20070531- 
+
+  status = 0
+
+
+END SUBROUTINE initialize_kpp_ctrl
+ 
+SUBROUTINE error_output(c, ierr, pe)
+
+
+  INTEGER, INTENT(IN):: ierr
+  INTEGER, INTENT(IN):: pe
+  REAL(dp), DIMENSION(:), INTENT(IN):: c
+
+  write(6,*) 'ERROR in chem_gasphase_mod ',ierr,C(1)
+
+
+END SUBROUTINE error_output
+ 
+      SUBROUTINE wscal(n, alpha, x, incx)
+!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+!     constant times a vector: x(1:N) <- Alpha*x(1:N) 
+!     only for incX=incY=1
+!     after BLAS
+!     replace this by the function from the optimized BLAS implementation:
+!         CALL SSCAL(N,Alpha,X,1) or  CALL DSCAL(N,Alpha,X,1)
+!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+      INTEGER  :: i, incx, m, mp1, n
+      REAL(kind=dp) :: x(n), alpha
+      REAL(kind=dp), PARAMETER  :: zero=0.0_dp, one=1.0_dp
+
+      IF (alpha .eq. one)RETURN
+      IF (n .le. 0)RETURN
+
+      m = mod(n, 5)
+      IF ( m .ne. 0)THEN
+        IF (alpha .eq. (- one))THEN
+          DO i = 1, m
+            x(i) = - x(i)
+          ENDDO
+        ELSEIF (alpha .eq. zero)THEN
+          DO i = 1, m
+            x(i) = zero
+          ENDDO
+        ELSE
+          DO i = 1, m
+            x(i) = alpha* x(i)
+          ENDDO
+        ENDIF
+        IF ( n .lt. 5)RETURN
+      ENDIF
+      mp1 = m + 1
+      IF (alpha .eq. (- one))THEN
+        DO i = mp1, n, 5
+          x(i)   = - x(i)
+          x(i + 1) = - x(i + 1)
+          x(i + 2) = - x(i + 2)
+          x(i + 3) = - x(i + 3)
+          x(i + 4) = - x(i + 4)
+        ENDDO
+      ELSEIF (alpha .eq. zero)THEN
+        DO i = mp1, n, 5
+          x(i)   = zero
+          x(i + 1) = zero
+          x(i + 2) = zero
+          x(i + 3) = zero
+          x(i + 4) = zero
+        ENDDO
+      ELSE
+        DO i = mp1, n, 5
+          x(i)   = alpha* x(i)
+          x(i + 1) = alpha* x(i + 1)
+          x(i + 2) = alpha* x(i + 2)
+          x(i + 3) = alpha* x(i + 3)
+          x(i + 4) = alpha* x(i + 4)
+        ENDDO
+      ENDIF
+
+      END SUBROUTINE wscal
+ 
+      SUBROUTINE waxpy(n, alpha, x, incx, y, incy)
+!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+!     constant times a vector plus a vector: y <- y + Alpha*x
+!     only for incX=incY=1
+!     after BLAS
+!     replace this by the function from the optimized BLAS implementation:
+!         CALL SAXPY(N,Alpha,X,1,Y,1) or  CALL DAXPY(N,Alpha,X,1,Y,1)
+!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
+
+      INTEGER  :: i, incx, incy, m, mp1, n
+      REAL(kind=dp):: x(n), y(n), alpha
+      REAL(kind=dp), PARAMETER :: zero = 0.0_dp
+
+      IF (alpha .eq. zero)RETURN
+      IF (n .le. 0)RETURN
+
+      m = mod(n, 4)
+      IF ( m .ne. 0)THEN
+        DO i = 1, m
+          y(i) = y(i) + alpha* x(i)
+        ENDDO
+        IF ( n .lt. 4)RETURN
+      ENDIF
+      mp1 = m + 1
+      DO i = mp1, n, 4
+        y(i) = y(i) + alpha* x(i)
+        y(i + 1) = y(i + 1) + alpha* x(i + 1)
+        y(i + 2) = y(i + 2) + alpha* x(i + 2)
+        y(i + 3) = y(i + 3) + alpha* x(i + 3)
+      ENDDO
+      
+      END SUBROUTINE waxpy
+ 
+SUBROUTINE rosenbrock(n, y, tstart, tend, &
+           abstol, reltol,             &
+           rcntrl, icntrl, rstatus, istatus, ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G *K_i = Fun( T_i,Y_i)+ \sum_{j=1}^S C(i,j)/H *K_j +
+!         gamma(i)*dF/dT(t0,Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics,Springer-Verlag,1996.
+!    The codes contained in the book inspired this implementation.
+!
+!    (C)  Adrian Sandu,August 2004
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu,May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   input arguments:
+!
+!-     y(n)  = vector of initial conditions (at t=tstart)
+!-    [tstart, tend]  = time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)
+!-    reltol, abstol = user precribed accuracy
+!- SUBROUTINE  fun( t, y, ydot) = ode FUNCTION, 
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE  jac( t, y, jcb) = jacobian of the ode FUNCTION, 
+!                       returns Jcb = dFun/dY
+!-    icntrl(1:20)  = INTEGER inputs PARAMETERs
+!-    rcntrl(1:20)  = REAL inputs PARAMETERs
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     output arguments:
+!
+!-    y(n)  - > vector of final states (at t- >tend)
+!-    istatus(1:20) - > INTEGER output PARAMETERs
+!-    rstatus(1:20) - > REAL output PARAMETERs
+!-    ierr            - > job status upon RETURN
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     input PARAMETERs:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1) = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2) = 0: AbsTol,RelTol are N-dimensional vectors
+!              = 1: AbsTol,RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :    Rodas3 (default)
+!        = 1 :    Ros2
+!        = 2 :    Ros3
+!        = 3 :    Ros4
+!        = 4 :    Rodas3
+!        = 5 :    Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4) =0) the default value of 100000 is used
+!
+!    RCNTRL(1)  -> Hmin,lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax,upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart,starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin,lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax,upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej,step decrease factor after multiple rejections
+!                          (default=0.1)
+!    RCNTRL(7)  -> FacSafe,by which the new step is slightly smaller
+!         than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IDID        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit,the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before exit
+!    RSTATUS(3)  -> Hnew,last predicted step (not yet taken)
+!                   For multiple restarts,use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~>  arguments
+   INTEGER,      INTENT(IN)  :: n
+   REAL(kind=dp), INTENT(INOUT):: y(n)
+   REAL(kind=dp), INTENT(IN)  :: tstart, tend
+   REAL(kind=dp), INTENT(IN)  :: abstol(n), reltol(n)
+   INTEGER,      INTENT(IN)  :: icntrl(20)
+   REAL(kind=dp), INTENT(IN)  :: rcntrl(20)
+   INTEGER,      INTENT(INOUT):: istatus(20)
+   REAL(kind=dp), INTENT(INOUT):: rstatus(20)
+   INTEGER, INTENT(OUT) :: ierr
+!~~~>  PARAMETERs of the rosenbrock method, up to 6 stages
+   INTEGER ::  ros_s, rosmethod
+   INTEGER, PARAMETER :: rs2=1, rs3=2, rs4=3, rd3=4, rd4=5, rg3=6
+   REAL(kind=dp):: ros_a(15), ros_c(15), ros_m(6), ros_e(6), &
+                    ros_alpha(6), ros_gamma(6), ros_elo
+   LOGICAL :: ros_newf(6)
+   CHARACTER(len=12):: ros_name
+!~~~>  local variables
+   REAL(kind=dp):: roundoff, facmin, facmax, facrej, facsafe
+   REAL(kind=dp):: hmin, hmax, hstart
+   REAL(kind=dp):: texit
+   INTEGER       :: i, uplimtol, max_no_steps
+   LOGICAL       :: autonomous, vectortol
+!~~~>   PARAMETERs
+   REAL(kind=dp), PARAMETER :: zero = 0.0_dp, one  = 1.0_dp
+   REAL(kind=dp), PARAMETER :: deltamin = 1.0e-5_dp
+
+!~~~>  initialize statistics
+   istatus(1:8) = 0
+   rstatus(1:3) = zero
+
+!~~~>  autonomous or time dependent ode. default is time dependent.
+   autonomous = .not.(icntrl(1) == 0)
+
+!~~~>  for scalar tolerances (icntrl(2).ne.0) the code uses abstol(1)and reltol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+   IF (icntrl(2) == 0)THEN
+      vectortol = .TRUE.
+      uplimtol  = n
+   ELSE
+      vectortol = .FALSE.
+      uplimtol  = 1
+   ENDIF
+
+!~~~>   initialize the particular rosenbrock method selected
+   select CASE (icntrl(3))
+     CASE (1)
+       CALL ros2
+     CASE (2)
+       CALL ros3
+     CASE (3)
+       CALL ros4
+     CASE (0, 4)
+       CALL rodas3
+     CASE (5)
+       CALL rodas4
+     CASE (6)
+       CALL rang3
+     CASE default
+       PRINT *,'Unknown Rosenbrock method: ICNTRL(3) =',ICNTRL(3) 
+       CALL ros_errormsg(- 2, tstart, zero, ierr)
+       RETURN
+   END select
+
+!~~~>   the maximum number of steps admitted
+   IF (icntrl(4) == 0)THEN
+      max_no_steps = 200000
+   ELSEIF (icntrl(4)> 0)THEN
+      max_no_steps=icntrl(4)
+   ELSE
+      PRINT *,'User-selected max no. of steps: ICNTRL(4) =',ICNTRL(4)
+      CALL ros_errormsg(- 1, tstart, zero, ierr)
+      RETURN
+   ENDIF
+
+!~~~>  unit roundoff (1+ roundoff>1)
+   roundoff = epsilon(one)
+
+!~~~>  lower bound on the step size: (positive value)
+   IF (rcntrl(1) == zero)THEN
+      hmin = zero
+   ELSEIF (rcntrl(1)> zero)THEN
+      hmin = rcntrl(1)
+   ELSE
+      PRINT *,'User-selected Hmin: RCNTRL(1) =',RCNTRL(1)
+      CALL ros_errormsg(- 3, tstart, zero, ierr)
+      RETURN
+   ENDIF
+!~~~>  upper bound on the step size: (positive value)
+   IF (rcntrl(2) == zero)THEN
+      hmax = abs(tend-tstart)
+   ELSEIF (rcntrl(2)> zero)THEN
+      hmax = min(abs(rcntrl(2)), abs(tend-tstart))
+   ELSE
+      PRINT *,'User-selected Hmax: RCNTRL(2) =',RCNTRL(2)
+      CALL ros_errormsg(- 3, tstart, zero, ierr)
+      RETURN
+   ENDIF
+!~~~>  starting step size: (positive value)
+   IF (rcntrl(3) == zero)THEN
+      hstart = max(hmin, deltamin)
+   ELSEIF (rcntrl(3)> zero)THEN
+      hstart = min(abs(rcntrl(3)), abs(tend-tstart))
+   ELSE
+      PRINT *,'User-selected Hstart: RCNTRL(3) =',RCNTRL(3)
+      CALL ros_errormsg(- 3, tstart, zero, ierr)
+      RETURN
+   ENDIF
+!~~~>  step size can be changed s.t.  facmin < hnew/hold < facmax
+   IF (rcntrl(4) == zero)THEN
+      facmin = 0.2_dp
+   ELSEIF (rcntrl(4)> zero)THEN
+      facmin = rcntrl(4)
+   ELSE
+      PRINT *,'User-selected FacMin: RCNTRL(4) =',RCNTRL(4)
+      CALL ros_errormsg(- 4, tstart, zero, ierr)
+      RETURN
+   ENDIF
+   IF (rcntrl(5) == zero)THEN
+      facmax = 6.0_dp
+   ELSEIF (rcntrl(5)> zero)THEN
+      facmax = rcntrl(5)
+   ELSE
+      PRINT *,'User-selected FacMax: RCNTRL(5) =',RCNTRL(5)
+      CALL ros_errormsg(- 4, tstart, zero, ierr)
+      RETURN
+   ENDIF
+!~~~>   facrej: factor to decrease step after 2 succesive rejections
+   IF (rcntrl(6) == zero)THEN
+      facrej = 0.1_dp
+   ELSEIF (rcntrl(6)> zero)THEN
+      facrej = rcntrl(6)
+   ELSE
+      PRINT *,'User-selected FacRej: RCNTRL(6) =',RCNTRL(6)
+      CALL ros_errormsg(- 4, tstart, zero, ierr)
+      RETURN
+   ENDIF
+!~~~>   facsafe: safety factor in the computation of new step size
+   IF (rcntrl(7) == zero)THEN
+      facsafe = 0.9_dp
+   ELSEIF (rcntrl(7)> zero)THEN
+      facsafe = rcntrl(7)
+   ELSE
+      PRINT *,'User-selected FacSafe: RCNTRL(7) =',RCNTRL(7)
+      CALL ros_errormsg(- 4, tstart, zero, ierr)
+      RETURN
+   ENDIF
+!~~~>  check IF tolerances are reasonable
+    DO i=1, uplimtol
+      IF ((abstol(i)<= zero).or. (reltol(i)<= 10.0_dp* roundoff)&
+         .or. (reltol(i)>= 1.0_dp))THEN
+        PRINT *,' AbsTol(',i,') = ',AbsTol(i)
+        PRINT *,' RelTol(',i,') = ',RelTol(i)
+        CALL ros_errormsg(- 5, tstart, zero, ierr)
+        RETURN
+      ENDIF
+    ENDDO
+
+
+!~~~>  CALL rosenbrock method
+   CALL ros_integrator(y, tstart, tend, texit,  &
+        abstol, reltol,                         &
+!  Integration parameters
+        autonomous, vectortol, max_no_steps,    &
+        roundoff, hmin, hmax, hstart,           &
+        facmin, facmax, facrej, facsafe,        &
+!  Error indicator
+        ierr)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS !  SUBROUTINEs internal to rosenbrock
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_errormsg(code, t, h, ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   REAL(kind=dp), INTENT(IN):: t, h
+   INTEGER, INTENT(IN) :: code
+   INTEGER, INTENT(OUT):: ierr
+   
+   ierr = code
+   print * , &
+     'Forced exit from Rosenbrock due to the following error:' 
+     
+   select CASE (code)
+    CASE (- 1)  
+      PRINT *,'--> Improper value for maximal no of steps'
+    CASE (- 2)  
+      PRINT *,'--> Selected Rosenbrock method not implemented'
+    CASE (- 3)  
+      PRINT *,'--> Hmin/Hmax/Hstart must be positive'
+    CASE (- 4)  
+      PRINT *,'--> FacMin/FacMax/FacRej must be positive'
+    CASE (- 5)
+      PRINT *,'--> Improper tolerance values'
+    CASE (- 6)
+      PRINT *,'--> No of steps exceeds maximum bound'
+    CASE (- 7)
+      PRINT *,'--> Step size too small: T + 10*H = T',&
+            ' or H < Roundoff'
+    CASE (- 8)  
+      PRINT *,'--> Matrix is repeatedly singular'
+    CASE default
+      PRINT *,'Unknown Error code: ',Code
+   END select
+   
+   print * , "t=", t, "and h=", h
+     
+ END SUBROUTINE ros_errormsg
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_integrator (y, tstart, tend, t, &
+        abstol, reltol,                         &
+!~~~> integration PARAMETERs
+        autonomous, vectortol, max_no_steps,    &
+        roundoff, hmin, hmax, hstart,           &
+        facmin, facmax, facrej, facsafe,        &
+!~~~> error indicator
+        ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method
+!      defined by ros_S (no of stages)
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~> input: the initial condition at tstart; output: the solution at t
+   REAL(kind=dp), INTENT(INOUT):: y(n)
+!~~~> input: integration interval
+   REAL(kind=dp), INTENT(IN):: tstart, tend
+!~~~> output: time at which the solution is RETURNed (t=tendIF success)
+   REAL(kind=dp), INTENT(OUT)::  t
+!~~~> input: tolerances
+   REAL(kind=dp), INTENT(IN)::  abstol(n), reltol(n)
+!~~~> input: integration PARAMETERs
+   LOGICAL, INTENT(IN):: autonomous, vectortol
+   REAL(kind=dp), INTENT(IN):: hstart, hmin, hmax
+   INTEGER, INTENT(IN):: max_no_steps
+   REAL(kind=dp), INTENT(IN):: roundoff, facmin, facmax, facrej, facsafe
+!~~~> output: error indicator
+   INTEGER, INTENT(OUT):: ierr
+! ~~~~ Local variables
+   REAL(kind=dp):: ynew(n), fcn0(n), fcn(n)
+   REAL(kind=dp):: k(n* ros_s), dfdt(n)
+#ifdef full_algebra    
+   REAL(kind=dp):: jac0(n, n), ghimj(n, n)
+#else
+   REAL(kind=dp):: jac0(lu_nonzero), ghimj(lu_nonzero)
+#endif
+   REAL(kind=dp):: h, hnew, hc, hg, fac, tau
+   REAL(kind=dp):: err, yerr(n)
+   INTEGER :: pivot(n), direction, ioffset, j, istage
+   LOGICAL :: rejectlasth, rejectmoreh, singular
+!~~~>  local PARAMETERs
+   REAL(kind=dp), PARAMETER :: zero = 0.0_dp, one  = 1.0_dp
+   REAL(kind=dp), PARAMETER :: deltamin = 1.0e-5_dp
+!~~~>  locally called FUNCTIONs
+!    REAL(kind=dp) WLAMCH
+!    EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~>  initial preparations
+   t = tstart
+   rstatus(nhexit) = zero
+   h = min( max(abs(hmin), abs(hstart)), abs(hmax))
+   IF (abs(h)<= 10.0_dp* roundoff)h = deltamin
+
+   IF (tend  >=  tstart)THEN
+     direction = + 1
+   ELSE
+     direction = - 1
+   ENDIF
+   h = direction* h
+
+   rejectlasth=.FALSE.
+   rejectmoreh=.FALSE.
+
+!~~~> time loop begins below
+
+timeloop: DO WHILE((direction > 0).and.((t- tend) + roundoff <= zero)&
+       .or. (direction < 0).and.((tend-t) + roundoff <= zero))
+
+   IF (istatus(nstp)> max_no_steps)THEN  ! too many steps
+      CALL ros_errormsg(- 6, t, h, ierr)
+      RETURN
+   ENDIF
+   IF (((t+ 0.1_dp* h) == t).or.(h <= roundoff))THEN  ! step size too small
+      CALL ros_errormsg(- 7, t, h, ierr)
+      RETURN
+   ENDIF
+
+!~~~>  limit h IF necessary to avoid going beyond tend
+   h = min(h, abs(tend-t))
+
+!~~~>   compute the FUNCTION at current time
+   CALL funtemplate(t, y, fcn0)
+   istatus(nfun) = istatus(nfun) + 1
+
+!~~~>  compute the FUNCTION derivative with respect to t
+   IF (.not.autonomous)THEN
+      CALL ros_funtimederivative(t, roundoff, y, &
+                fcn0, dfdt)
+   ENDIF
+
+!~~~>   compute the jacobian at current time
+   CALL jactemplate(t, y, jac0)
+   istatus(njac) = istatus(njac) + 1
+
+!~~~>  repeat step calculation until current step accepted
+untilaccepted: do
+
+   CALL ros_preparematrix(h, direction, ros_gamma(1), &
+          jac0, ghimj, pivot, singular)
+   IF (singular)THEN ! more than 5 consecutive failed decompositions
+       CALL ros_errormsg(- 8, t, h, ierr)
+       RETURN
+   ENDIF
+
+!~~~>   compute the stages
+stage: DO istage = 1, ros_s
+
+      ! current istage offset. current istage vector is k(ioffset+ 1:ioffset+ n)
+       ioffset = n* (istage-1)
+
+      ! for the 1st istage the FUNCTION has been computed previously
+       IF (istage == 1)THEN
+         !slim: CALL wcopy(n, fcn0, 1, fcn, 1)
+       fcn(1:n) = fcn0(1:n)
+      ! istage>1 and a new FUNCTION evaluation is needed at the current istage
+       ELSEIF(ros_newf(istage))THEN
+         !slim: CALL wcopy(n, y, 1, ynew, 1)
+       ynew(1:n) = y(1:n)
+         DO j = 1, istage-1
+           CALL waxpy(n, ros_a((istage-1) * (istage-2) /2+ j), &
+            k(n* (j- 1) + 1), 1, ynew, 1)
+         ENDDO
+         tau = t + ros_alpha(istage) * direction* h
+         CALL funtemplate(tau, ynew, fcn)
+         istatus(nfun) = istatus(nfun) + 1
+       ENDIF ! IF istage == 1 ELSEIF ros_newf(istage)
+       !slim: CALL wcopy(n, fcn, 1, k(ioffset+ 1), 1)
+       k(ioffset+ 1:ioffset+ n) = fcn(1:n)
+       DO j = 1, istage-1
+         hc = ros_c((istage-1) * (istage-2) /2+ j) /(direction* h)
+         CALL waxpy(n, hc, k(n* (j- 1) + 1), 1, k(ioffset+ 1), 1)
+       ENDDO
+       IF ((.not. autonomous).and.(ros_gamma(istage).ne.zero))THEN
+         hg = direction* h* ros_gamma(istage)
+         CALL waxpy(n, hg, dfdt, 1, k(ioffset+ 1), 1)
+       ENDIF
+       CALL ros_solve(ghimj, pivot, k(ioffset+ 1))
+
+   END DO stage
+
+
+!~~~>  compute the new solution
+   !slim: CALL wcopy(n, y, 1, ynew, 1)
+   ynew(1:n) = y(1:n)
+   DO j=1, ros_s
+         CALL waxpy(n, ros_m(j), k(n* (j- 1) + 1), 1, ynew, 1)
+   ENDDO
+
+!~~~>  compute the error estimation
+   !slim: CALL wscal(n, zero, yerr, 1)
+   yerr(1:n) = zero
+   DO j=1, ros_s
+        CALL waxpy(n, ros_e(j), k(n* (j- 1) + 1), 1, yerr, 1)
+   ENDDO
+   err = ros_errornorm(y, ynew, yerr, abstol, reltol, vectortol)
+
+!~~~> new step size is bounded by facmin <= hnew/h <= facmax
+   fac  = min(facmax, max(facmin, facsafe/err** (one/ros_elo)))
+   hnew = h* fac
+
+!~~~>  check the error magnitude and adjust step size
+   istatus(nstp) = istatus(nstp) + 1
+   IF ((err <= one).or.(h <= hmin))THEN  !~~~> accept step
+      istatus(nacc) = istatus(nacc) + 1
+      !slim: CALL wcopy(n, ynew, 1, y, 1)
+      y(1:n) = ynew(1:n)
+      t = t + direction* h
+      hnew = max(hmin, min(hnew, hmax))
+      IF (rejectlasth)THEN  ! no step size increase after a rejected step
+         hnew = min(hnew, h)
+      ENDIF
+      rstatus(nhexit) = h
+      rstatus(nhnew) = hnew
+      rstatus(ntexit) = t
+      rejectlasth = .FALSE.
+      rejectmoreh = .FALSE.
+      h = hnew
+      exit untilaccepted ! exit the loop: WHILE step not accepted
+   ELSE           !~~~> reject step
+      IF (rejectmoreh)THEN
+         hnew = h* facrej
+      ENDIF
+      rejectmoreh = rejectlasth
+      rejectlasth = .TRUE.
+      h = hnew
+      IF (istatus(nacc)>= 1) istatus(nrej) = istatus(nrej) + 1
+   ENDIF ! err <= 1
+
+   END DO untilaccepted
+
+   END DO timeloop
+
+!~~~> succesful exit
+   ierr = 1  !~~~> the integration was successful
+
+  END SUBROUTINE ros_integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  REAL(kind=dp)FUNCTION ros_errornorm(y, ynew, yerr, &
+                               abstol, reltol, vectortol)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> computes the "scaled norm" of the error vector yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+! Input arguments
+   REAL(kind=dp), INTENT(IN):: y(n), ynew(n), &
+          yerr(n), abstol(n), reltol(n)
+   LOGICAL, INTENT(IN)::  vectortol
+! Local variables
+   REAL(kind=dp):: err, scale, ymax
+   INTEGER  :: i
+   REAL(kind=dp), PARAMETER :: zero = 0.0_dp
+
+   err = zero
+   DO i=1, n
+     ymax = max(abs(y(i)), abs(ynew(i)))
+     IF (vectortol)THEN
+       scale = abstol(i) + reltol(i) * ymax
+     ELSE
+       scale = abstol(1) + reltol(1) * ymax
+     ENDIF
+     err = err+ (yerr(i) /scale) ** 2
+   ENDDO
+   err  = sqrt(err/n)
+
+   ros_errornorm = max(err, 1.0d-10)
+
+  END FUNCTION ros_errornorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_funtimederivative(t, roundoff, y, &
+                fcn0, dfdt)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> the time partial derivative of the FUNCTION by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~> input arguments
+   REAL(kind=dp), INTENT(IN):: t, roundoff, y(n), fcn0(n)
+!~~~> output arguments
+   REAL(kind=dp), INTENT(OUT):: dfdt(n)
+!~~~> local variables
+   REAL(kind=dp):: delta
+   REAL(kind=dp), PARAMETER :: one = 1.0_dp, deltamin = 1.0e-6_dp
+
+   delta = sqrt(roundoff) * max(deltamin, abs(t))
+   CALL funtemplate(t+ delta, y, dfdt)
+   istatus(nfun) = istatus(nfun) + 1
+   CALL waxpy(n, (- one), fcn0, 1, dfdt, 1)
+   CALL wscal(n, (one/delta), dfdt, 1)
+
+  END SUBROUTINE ros_funtimederivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_preparematrix(h, direction, gam, &
+             jac0, ghimj, pivot, singular)
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+
+!~~~> input arguments
+#ifdef full_algebra    
+   REAL(kind=dp), INTENT(IN)::  jac0(n, n)
+#else
+   REAL(kind=dp), INTENT(IN)::  jac0(lu_nonzero)
+#endif   
+   REAL(kind=dp), INTENT(IN)::  gam
+   INTEGER, INTENT(IN)::  direction
+!~~~> output arguments
+#ifdef full_algebra    
+   REAL(kind=dp), INTENT(OUT):: ghimj(n, n)
+#else
+   REAL(kind=dp), INTENT(OUT):: ghimj(lu_nonzero)
+#endif   
+   LOGICAL, INTENT(OUT)::  singular
+   INTEGER, INTENT(OUT)::  pivot(n)
+!~~~> inout arguments
+   REAL(kind=dp), INTENT(INOUT):: h   ! step size is decreased when lu fails
+!~~~> local variables
+   INTEGER  :: i, ising, nconsecutive
+   REAL(kind=dp):: ghinv
+   REAL(kind=dp), PARAMETER :: one  = 1.0_dp, half = 0.5_dp
+
+   nconsecutive = 0
+   singular = .TRUE.
+
+   DO WHILE (singular)
+
+!~~~>    construct ghimj = 1/(h* gam) - jac0
+#ifdef full_algebra    
+     !slim: CALL wcopy(n* n, jac0, 1, ghimj, 1)
+     !slim: CALL wscal(n* n, (- one), ghimj, 1)
+     ghimj = - jac0
+     ghinv = one/(direction* h* gam)
+     DO i=1, n
+       ghimj(i, i) = ghimj(i, i) + ghinv
+     ENDDO
+#else
+     !slim: CALL wcopy(lu_nonzero, jac0, 1, ghimj, 1)
+     !slim: CALL wscal(lu_nonzero, (- one), ghimj, 1)
+     ghimj(1:lu_nonzero) = - jac0(1:lu_nonzero)
+     ghinv = one/(direction* h* gam)
+     DO i=1, n
+       ghimj(lu_diag(i)) = ghimj(lu_diag(i)) + ghinv
+     ENDDO
+#endif   
+!~~~>    compute lu decomposition
+     CALL ros_decomp( ghimj, pivot, ising)
+     IF (ising == 0)THEN
+!~~~>    IF successful done
+        singular = .FALSE.
+     ELSE ! ising .ne. 0
+!~~~>    IF unsuccessful half the step size; IF 5 consecutive fails THEN RETURN
+        istatus(nsng) = istatus(nsng) + 1
+        nconsecutive = nconsecutive+1
+        singular = .TRUE.
+        PRINT*,'Warning: LU Decomposition returned ISING = ',ISING
+        IF (nconsecutive <= 5)THEN ! less than 5 consecutive failed decompositions
+           h = h* half
+        ELSE  ! more than 5 consecutive failed decompositions
+           RETURN
+        ENDIF  ! nconsecutive
+      ENDIF    ! ising
+
+   END DO ! WHILE singular
+
+  END SUBROUTINE ros_preparematrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_decomp( a, pivot, ising)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the LU decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> inout variables
+#ifdef full_algebra    
+   REAL(kind=dp), INTENT(INOUT):: a(n, n)
+#else   
+   REAL(kind=dp), INTENT(INOUT):: a(lu_nonzero)
+#endif
+!~~~> output variables
+   INTEGER, INTENT(OUT):: pivot(n), ising
+
+#ifdef full_algebra    
+   CALL  dgetrf( n, n, a, n, pivot, ising)
+#else   
+   CALL kppdecomp(a, ising)
+   pivot(1) = 1
+#endif
+   istatus(ndec) = istatus(ndec) + 1
+
+  END SUBROUTINE ros_decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_solve( a, pivot, b)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> input variables
+#ifdef full_algebra    
+   REAL(kind=dp), INTENT(IN):: a(n, n)
+   INTEGER :: ising
+#else   
+   REAL(kind=dp), INTENT(IN):: a(lu_nonzero)
+#endif
+   INTEGER, INTENT(IN):: pivot(n)
+!~~~> inout variables
+   REAL(kind=dp), INTENT(INOUT):: b(n)
+
+#ifdef full_algebra    
+   CALL  DGETRS( 'N',N ,1,A,N,Pivot,b,N,ISING)
+   IF (info < 0)THEN
+      print* , "error in dgetrs. ising=", ising
+   ENDIF  
+#else   
+   CALL kppsolve( a, b)
+#endif
+
+   istatus(nsol) = istatus(nsol) + 1
+
+  END SUBROUTINE ros_solve
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD,2 stages,order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   double precision g
+
+    g = 1.0_dp + 1.0_dp/sqrt(2.0_dp)
+    rosmethod = rs2
+!~~~> name of the method
+    ros_Name = 'ROS-2'
+!~~~> number of stages
+    ros_s = 2
+
+!~~~> the coefficient matrices a and c are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1),A(3,1) =ros_A(2),A(3,2) =ros_A(3),etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j)
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j)
+
+    ros_a(1) = (1.0_dp) /g
+    ros_c(1) = (- 2.0_dp) /g
+!~~~> does the stage i require a new FUNCTION evaluation (ros_newf(i) =true)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i) =FALSE)
+    ros_newf(1) = .TRUE.
+    ros_newf(2) = .TRUE.
+!~~~> m_i = coefficients for new step solution
+    ros_m(1) = (3.0_dp) /(2.0_dp* g)
+    ros_m(2) = (1.0_dp) /(2.0_dp* g)
+! E_i = Coefficients for error estimator
+    ros_e(1) = 1.0_dp/(2.0_dp* g)
+    ros_e(2) = 1.0_dp/(2.0_dp* g)
+!~~~> ros_elo = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_elo = 2.0_dp
+!~~~> y_stage_i ~ y( t + h* alpha_i)
+    ros_alpha(1) = 0.0_dp
+    ros_alpha(2) = 1.0_dp
+!~~~> gamma_i = \sum_j  gamma_{i, j}
+    ros_gamma(1) = g
+    ros_gamma(2) = -g
+
+ END SUBROUTINE ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD,3 stages,order 3,2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   rosmethod = rs3
+!~~~> name of the method
+   ros_Name = 'ROS-3'
+!~~~> number of stages
+   ros_s = 3
+
+!~~~> the coefficient matrices a and c are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1),A(3,1) =ros_A(2),A(3,2) =ros_A(3),etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j)
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j)
+
+   ros_a(1) = 1.0_dp
+   ros_a(2) = 1.0_dp
+   ros_a(3) = 0.0_dp
+
+   ros_c(1) = - 0.10156171083877702091975600115545e+01_dp
+   ros_c(2) =  0.40759956452537699824805835358067e+01_dp
+   ros_c(3) =  0.92076794298330791242156818474003e+01_dp
+!~~~> does the stage i require a new FUNCTION evaluation (ros_newf(i) =true)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i) =FALSE)
+   ros_newf(1) = .TRUE.
+   ros_newf(2) = .TRUE.
+   ros_newf(3) = .FALSE.
+!~~~> m_i = coefficients for new step solution
+   ros_m(1) =  0.1e+01_dp
+   ros_m(2) =  0.61697947043828245592553615689730e+01_dp
+   ros_m(3) = - 0.42772256543218573326238373806514_dp
+! E_i = Coefficients for error estimator
+   ros_e(1) =  0.5_dp
+   ros_e(2) = - 0.29079558716805469821718236208017e+01_dp
+   ros_e(3) =  0.22354069897811569627360909276199_dp
+!~~~> ros_elo = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_elo = 3.0_dp
+!~~~> y_stage_i ~ y( t + h* alpha_i)
+   ros_alpha(1) = 0.0_dp
+   ros_alpha(2) = 0.43586652150845899941601945119356_dp
+   ros_alpha(3) = 0.43586652150845899941601945119356_dp
+!~~~> gamma_i = \sum_j  gamma_{i, j}
+   ros_gamma(1) = 0.43586652150845899941601945119356_dp
+   ros_gamma(2) = 0.24291996454816804366592249683314_dp
+   ros_gamma(3) = 0.21851380027664058511513169485832e+01_dp
+
+  END SUBROUTINE ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4,WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+!
+!      E. HAIRER AND G. WANNER,SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+   rosmethod = rs4
+!~~~> name of the method
+   ros_Name = 'ROS-4'
+!~~~> number of stages
+   ros_s = 4
+
+!~~~> the coefficient matrices a and c are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1),A(3,1) =ros_A(2),A(3,2) =ros_A(3),etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j)
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j)
+
+   ros_a(1) = 0.2000000000000000e+01_dp
+   ros_a(2) = 0.1867943637803922e+01_dp
+   ros_a(3) = 0.2344449711399156_dp
+   ros_a(4) = ros_a(2)
+   ros_a(5) = ros_a(3)
+   ros_a(6) = 0.0_dp
+
+   ros_c(1) = -0.7137615036412310e+01_dp
+   ros_c(2) = 0.2580708087951457e+01_dp
+   ros_c(3) = 0.6515950076447975_dp
+   ros_c(4) = -0.2137148994382534e+01_dp
+   ros_c(5) = -0.3214669691237626_dp
+   ros_c(6) = -0.6949742501781779_dp
+!~~~> does the stage i require a new FUNCTION evaluation (ros_newf(i) =true)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i) =FALSE)
+   ros_newf(1) = .TRUE.
+   ros_newf(2) = .TRUE.
+   ros_newf(3) = .TRUE.
+   ros_newf(4) = .FALSE.
+!~~~> m_i = coefficients for new step solution
+   ros_m(1) = 0.2255570073418735e+01_dp
+   ros_m(2) = 0.2870493262186792_dp
+   ros_m(3) = 0.4353179431840180_dp
+   ros_m(4) = 0.1093502252409163e+01_dp
+!~~~> e_i  = coefficients for error estimator
+   ros_e(1) = -0.2815431932141155_dp
+   ros_e(2) = -0.7276199124938920e-01_dp
+   ros_e(3) = -0.1082196201495311_dp
+   ros_e(4) = -0.1093502252409163e+01_dp
+!~~~> ros_elo  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_elo  = 4.0_dp
+!~~~> y_stage_i ~ y( t + h* alpha_i)
+   ros_alpha(1) = 0.0_dp
+   ros_alpha(2) = 0.1145640000000000e+01_dp
+   ros_alpha(3) = 0.6552168638155900_dp
+   ros_alpha(4) = ros_alpha(3)
+!~~~> gamma_i = \sum_j  gamma_{i, j}
+   ros_gamma(1) = 0.5728200000000000_dp
+   ros_gamma(2) = -0.1769193891319233e+01_dp
+   ros_gamma(3) = 0.7592633437920482_dp
+   ros_gamma(4) = -0.1049021087100450_dp
+
+  END SUBROUTINE ros4
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- A STIFFLY-STABLE METHOD,4 stages,order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+   rosmethod = rd3
+!~~~> name of the method
+   ros_Name = 'RODAS-3'
+!~~~> number of stages
+   ros_s = 4
+
+!~~~> the coefficient matrices a and c are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1),A(3,1) =ros_A(2),A(3,2) =ros_A(3),etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j)
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j)
+
+   ros_a(1) = 0.0_dp
+   ros_a(2) = 2.0_dp
+   ros_a(3) = 0.0_dp
+   ros_a(4) = 2.0_dp
+   ros_a(5) = 0.0_dp
+   ros_a(6) = 1.0_dp
+
+   ros_c(1) = 4.0_dp
+   ros_c(2) = 1.0_dp
+   ros_c(3) = -1.0_dp
+   ros_c(4) = 1.0_dp
+   ros_c(5) = -1.0_dp
+   ros_c(6) = -(8.0_dp/3.0_dp)
+
+!~~~> does the stage i require a new FUNCTION evaluation (ros_newf(i) =true)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i) =FALSE)
+   ros_newf(1) = .TRUE.
+   ros_newf(2) = .FALSE.
+   ros_newf(3) = .TRUE.
+   ros_newf(4) = .TRUE.
+!~~~> m_i = coefficients for new step solution
+   ros_m(1) = 2.0_dp
+   ros_m(2) = 0.0_dp
+   ros_m(3) = 1.0_dp
+   ros_m(4) = 1.0_dp
+!~~~> e_i  = coefficients for error estimator
+   ros_e(1) = 0.0_dp
+   ros_e(2) = 0.0_dp
+   ros_e(3) = 0.0_dp
+   ros_e(4) = 1.0_dp
+!~~~> ros_elo  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_elo  = 3.0_dp
+!~~~> y_stage_i ~ y( t + h* alpha_i)
+   ros_alpha(1) = 0.0_dp
+   ros_alpha(2) = 0.0_dp
+   ros_alpha(3) = 1.0_dp
+   ros_alpha(4) = 1.0_dp
+!~~~> gamma_i = \sum_j  gamma_{i, j}
+   ros_gamma(1) = 0.5_dp
+   ros_gamma(2) = 1.5_dp
+   ros_gamma(3) = 0.0_dp
+   ros_gamma(4) = 0.0_dp
+
+  END SUBROUTINE rodas3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4,WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER,SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+    rosmethod = rd4
+!~~~> name of the method
+    ros_Name = 'RODAS-4'
+!~~~> number of stages
+    ros_s = 6
+
+!~~~> y_stage_i ~ y( t + h* alpha_i)
+    ros_alpha(1) = 0.000_dp
+    ros_alpha(2) = 0.386_dp
+    ros_alpha(3) = 0.210_dp
+    ros_alpha(4) = 0.630_dp
+    ros_alpha(5) = 1.000_dp
+    ros_alpha(6) = 1.000_dp
+
+!~~~> gamma_i = \sum_j  gamma_{i, j}
+    ros_gamma(1) = 0.2500000000000000_dp
+    ros_gamma(2) = -0.1043000000000000_dp
+    ros_gamma(3) = 0.1035000000000000_dp
+    ros_gamma(4) = -0.3620000000000023e-01_dp
+    ros_gamma(5) = 0.0_dp
+    ros_gamma(6) = 0.0_dp
+
+!~~~> the coefficient matrices a and c are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1),A(3,1) =ros_A(2),A(3,2) =ros_A(3),etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j)
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j)
+
+    ros_a(1) = 0.1544000000000000e+01_dp
+    ros_a(2) = 0.9466785280815826_dp
+    ros_a(3) = 0.2557011698983284_dp
+    ros_a(4) = 0.3314825187068521e+01_dp
+    ros_a(5) = 0.2896124015972201e+01_dp
+    ros_a(6) = 0.9986419139977817_dp
+    ros_a(7) = 0.1221224509226641e+01_dp
+    ros_a(8) = 0.6019134481288629e+01_dp
+    ros_a(9) = 0.1253708332932087e+02_dp
+    ros_a(10) = -0.6878860361058950_dp
+    ros_a(11) = ros_a(7)
+    ros_a(12) = ros_a(8)
+    ros_a(13) = ros_a(9)
+    ros_a(14) = ros_a(10)
+    ros_a(15) = 1.0_dp
+
+    ros_c(1) = -0.5668800000000000e+01_dp
+    ros_c(2) = -0.2430093356833875e+01_dp
+    ros_c(3) = -0.2063599157091915_dp
+    ros_c(4) = -0.1073529058151375_dp
+    ros_c(5) = -0.9594562251023355e+01_dp
+    ros_c(6) = -0.2047028614809616e+02_dp
+    ros_c(7) = 0.7496443313967647e+01_dp
+    ros_c(8) = -0.1024680431464352e+02_dp
+    ros_c(9) = -0.3399990352819905e+02_dp
+    ros_c(10) = 0.1170890893206160e+02_dp
+    ros_c(11) = 0.8083246795921522e+01_dp
+    ros_c(12) = -0.7981132988064893e+01_dp
+    ros_c(13) = -0.3152159432874371e+02_dp
+    ros_c(14) = 0.1631930543123136e+02_dp
+    ros_c(15) = -0.6058818238834054e+01_dp
+
+!~~~> m_i = coefficients for new step solution
+    ros_m(1) = ros_a(7)
+    ros_m(2) = ros_a(8)
+    ros_m(3) = ros_a(9)
+    ros_m(4) = ros_a(10)
+    ros_m(5) = 1.0_dp
+    ros_m(6) = 1.0_dp
+
+!~~~> e_i  = coefficients for error estimator
+    ros_e(1) = 0.0_dp
+    ros_e(2) = 0.0_dp
+    ros_e(3) = 0.0_dp
+    ros_e(4) = 0.0_dp
+    ros_e(5) = 0.0_dp
+    ros_e(6) = 1.0_dp
+
+!~~~> does the stage i require a new FUNCTION evaluation (ros_newf(i) =true)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i) =FALSE)
+    ros_newf(1) = .TRUE.
+    ros_newf(2) = .TRUE.
+    ros_newf(3) = .TRUE.
+    ros_newf(4) = .TRUE.
+    ros_newf(5) = .TRUE.
+    ros_newf(6) = .TRUE.
+
+!~~~> ros_elo  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_elo = 4.0_dp
+
+  END SUBROUTINE rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rang3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! STIFFLY-STABLE W METHOD OF ORDER 3,WITH 4 STAGES
+!
+! J. RANG and L. ANGERMANN
+! NEW ROSENBROCK W-METHODS OF ORDER 3
+! FOR PARTIAL DIFFERENTIAL ALGEBRAIC
+!        EQUATIONS OF INDEX 1                                             
+! BIT Numerical Mathematics (2005) 45: 761-787
+!  DOI: 10.1007/s10543-005-0035-y
+! Table 4.1-4.2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+    rosmethod = rg3
+!~~~> name of the method
+    ros_Name = 'RANG-3'
+!~~~> number of stages
+    ros_s = 4
+
+    ros_a(1) = 5.09052051067020d+00;
+    ros_a(2) = 5.09052051067020d+00;
+    ros_a(3) = 0.0d0;
+    ros_a(4) = 4.97628111010787d+00;
+    ros_a(5) = 2.77268164715849d-02;
+    ros_a(6) = 2.29428036027904d-01;
+
+    ros_c(1) = - 1.16790812312283d+01;
+    ros_c(2) = - 1.64057326467367d+01;
+    ros_c(3) = - 2.77268164715850d-01;
+    ros_c(4) = - 8.38103960500476d+00;
+    ros_c(5) = - 8.48328409199343d-01;
+    ros_c(6) =  2.87009860433106d-01;
+
+    ros_m(1) =  5.22582761233094d+00;
+    ros_m(2) = - 5.56971148154165d-01;
+    ros_m(3) =  3.57979469353645d-01;
+    ros_m(4) =  1.72337398521064d+00;
+
+    ros_e(1) = - 5.16845212784040d+00;
+    ros_e(2) = - 1.26351942603842d+00;
+    ros_e(3) = - 1.11022302462516d-16;
+    ros_e(4) =  2.22044604925031d-16;
+
+    ros_alpha(1) = 0.0d00;
+    ros_alpha(2) = 2.21878746765329d+00;
+    ros_alpha(3) = 2.21878746765329d+00;
+    ros_alpha(4) = 1.55392337535788d+00;
+
+    ros_gamma(1) =  4.35866521508459d-01;
+    ros_gamma(2) = - 1.78292094614483d+00;
+    ros_gamma(3) = - 2.46541900496934d+00;
+    ros_gamma(4) = - 8.05529997906370d-01;
+
+
+!~~~> does the stage i require a new FUNCTION evaluation (ros_newf(i) =true)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i) =FALSE)
+    ros_newf(1) = .TRUE.
+    ros_newf(2) = .TRUE.
+    ros_newf(3) = .TRUE.
+    ros_newf(4) = .TRUE.
+
+!~~~> ros_elo  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_elo = 3.0_dp
+
+  END SUBROUTINE rang3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   End of the set of internal Rosenbrock subroutines
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+END SUBROUTINE rosenbrock
+ 
+SUBROUTINE funtemplate( t, y, ydot)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> input variables
+   REAL(kind=dp):: t, y(nvar)
+!~~~> output variables
+   REAL(kind=dp):: ydot(nvar)
+!~~~> local variables
+   REAL(kind=dp):: told
+
+   told = time
+   time = t
+   CALL fun( y, fix, rconst, ydot)
+   time = told
+
+END SUBROUTINE funtemplate
+ 
+SUBROUTINE jactemplate( t, y, jcb)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> input variables
+    REAL(kind=dp):: t, y(nvar)
+!~~~> output variables
+#ifdef full_algebra    
+    REAL(kind=dp):: jv(lu_nonzero), jcb(nvar, nvar)
+#else
+    REAL(kind=dp):: jcb(lu_nonzero)
+#endif   
+!~~~> local variables
+    REAL(kind=dp):: told
+#ifdef full_algebra    
+    INTEGER :: i, j
+#endif   
+
+    told = time
+    time = t
+#ifdef full_algebra    
+    CALL jac_sp(y, fix, rconst, jv)
+    DO j=1, nvar
+      DO i=1, nvar
+         jcb(i, j) = 0.0_dp
+      ENDDO
+    ENDDO
+    DO i=1, lu_nonzero
+       jcb(lu_irow(i), lu_icol(i)) = jv(i)
+    ENDDO
+#else
+    CALL jac_sp( y, fix, rconst, jcb)
+#endif   
+    time = told
+
+END SUBROUTINE jactemplate
+ 
+  SUBROUTINE kppdecomp( jvs, ier)                                    
+  ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+  !        sparse lu factorization                                    
+  ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+  ! loop expansion generated by kp4                                   
+                                                                      
+    INTEGER  :: ier                                                   
+    REAL(kind=dp):: jvs(lu_nonzero), w(nvar), a             
+    INTEGER  :: k, kk, j, jj                                          
+                                                                      
+    a = 0.                                                            
+    ier = 0                                                           
+                                                                      
+!   i = 1
+!   i = 2
+    RETURN                                                            
+                                                                      
+  END SUBROUTINE kppdecomp                                            
+ 
+SUBROUTINE chem_gasphase_integrate (time_step_len, conc, tempi, qvapi, fakti, photo, ierrf, xnacc, xnrej, istatus, l_debug, pe, &
+                     icntrl_i, rcntrl_i) 
+                                                                    
+  IMPLICIT NONE                                                     
+                                                                    
+  REAL(dp), INTENT(IN)                  :: time_step_len           
+  REAL(dp), DIMENSION(:, :), INTENT(INOUT) :: conc                    
+  REAL(dp), DIMENSION(:, :), INTENT(IN)   :: photo                   
+  REAL(dp), DIMENSION(:), INTENT(IN)     :: tempi                   
+  REAL(dp), DIMENSION(:), INTENT(IN)     :: qvapi                   
+  REAL(dp), DIMENSION(:), INTENT(IN)     :: fakti                   
+  INTEGER, INTENT(OUT), OPTIONAL        :: ierrf(:)               
+  INTEGER, INTENT(OUT), OPTIONAL        :: xnacc(:)               
+  INTEGER, INTENT(OUT), OPTIONAL        :: xnrej(:)               
+  INTEGER, INTENT(INOUT), OPTIONAL      :: istatus(:)             
+  INTEGER, INTENT(IN), OPTIONAL         :: pe                      
+  LOGICAL, INTENT(IN), OPTIONAL         :: l_debug                 
+  INTEGER, DIMENSION(nkppctrl), INTENT(IN), OPTIONAL  :: icntrl_i         
+  REAL(dp), DIMENSION(nkppctrl), INTENT(IN), OPTIONAL  :: rcntrl_i         
+                                                                    
+  INTEGER                                 :: k   ! loop variable     
+  REAL(dp)                               :: dt                      
+  INTEGER, DIMENSION(20)                :: istatus_u               
+  INTEGER                                :: ierr_u                  
+  INTEGER                                :: istatf                  
+  INTEGER                                :: vl_dim_lo               
+                                                                    
+                                                                    
+  IF (PRESENT (istatus)) istatus = 0                             
+  IF (PRESENT (icntrl_i)) icntrl  = icntrl_i                      
+  IF (PRESENT (rcntrl_i)) rcntrl  = rcntrl_i                      
+                                                                    
+  vl_glo = size(tempi, 1)                                           
+                                                                    
+  vl_dim_lo = vl_dim                                                
+  DO k=1, vl_glo, vl_dim_lo                                           
+    is = k                                                          
+    ie = min(k+ vl_dim_lo-1, vl_glo)                                 
+    vl = ie-is+ 1                                                    
+                                                                    
+    c(:) = conc(is, :)                                            
+                                                                    
+    temp = tempi(is)                                             
+                                                                    
+    qvap = qvapi(is)                                             
+                                                                    
+    fakt = fakti(is)                                             
+                                                                    
+    CALL initialize                                                 
+                                                                    
+    phot(:) = photo(is, :)                                            
+                                                                    
+    CALL update_rconst                                              
+                                                                    
+    dt = time_step_len                                              
+                                                                    
+    ! integrate from t=0 to t=dt                                    
+    CALL integrate(0._dp, dt, icntrl, rcntrl, istatus_u = istatus_u, ierr_u=ierr_u)
+                                                                    
+                                                                    
+   IF (PRESENT(l_debug) .AND. PRESENT(pe)) THEN                       
+      IF (l_debug) CALL error_output(conc(is, :), ierr_u, pe)          
+   ENDIF                                                              
+                                                                      
+    conc(is, :) = c(:)                                                
+                                                                    
+    ! RETURN diagnostic information                                 
+                                                                    
+    IF (PRESENT(ierrf))   ierrf(is) = ierr_u                      
+    IF (PRESENT(xnacc))   xnacc(is) = istatus_u(4)               
+    IF (PRESENT(xnrej))   xnrej(is) = istatus_u(5)               
+                                                                    
+    IF (PRESENT (istatus)) THEN                                   
+      istatus(1:8) = istatus(1:8) + istatus_u(1:8)                
+    ENDIF                                                          
+                                                                    
+  END DO                                                            
+ 
+                                                                    
+! Deallocate input arrays                                           
+                                                                    
+                                                                    
+  data_loaded = .FALSE.                                             
+                                                                    
+  RETURN                                                            
+END SUBROUTINE chem_gasphase_integrate                                        
+
+END MODULE chem_gasphase_mod
+ 
Index: /palm/tags/release-6.0/SOURCE/chem_modules.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/chem_modules.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/chem_modules.f90	(revision 3477)
@@ -0,0 +1,207 @@
+!> @file chem_modules.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2018-2018 Leibniz Universitaet Hannover
+! Copyright 2018-2018 Karlsruhe Institute of Technology
+! Copyright 2018-2018 Freie Universitaet Berlin
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! from chemistry branch r3443:
+! ??
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! - Minor formatting
+! - Introduced Variables for Chemistry emissions Module (Russo)
+! - Variables and parameters added for 2d and profile output (basit)
+! - Converted scalar  emission factors  to 1-D array of 99 elements each (basit)
+! - Removed "__chem" directive (basit)
+! 
+! 3282 2018-09-27 10:49:12Z basit
+! Initial revision
+!
+! 
+!
+!
+! Authors:
+! --------
+! @author Farah Kanani-Suehring
+! @author Basit Khan
+! @author Sabine Banzhaf
+! @author Emmanuele Russo
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of global palm-4u chemistry variables
+!> (Module written to define global palm-4u chemistry variables. basit 16Nov2017)
+!------------------------------------------------------------------------------!
+!
+ MODULE chem_modules
+
+    USE chem_gasphase_mod,                                                     &   
+        ONLY: nspec, nvar, spc_names
+
+    USE control_parameters,                                                    &
+        ONLY: varnamelength
+
+    USE kinds
+
+    USE statistics,                                                            &
+        ONLY: pr_palm
+
+
+    IMPLICIT NONE
+
+    PUBLIC nspec
+    PUBLIC nvar
+    PUBLIC spc_names
+
+    INTEGER(iwp), DIMENSION(99)  :: cs_pr_index            = 0
+    INTEGER(iwp)  :: ibc_cs_b                                                      !< integer flag for bc_cs_b
+    INTEGER(iwp)  :: ibc_cs_t                                                      !< integer flag for bc_cs_t
+    INTEGER(iwp)  :: cs_pr_count                           = 0 
+    INTEGER(iwp)  :: max_pr_cs                             = 0
+    INTEGER(iwp)  :: cs_vertical_gradient_level_ind(99,10) = -9999                 !< grid index values of cs_vertical_gradient_level_ind(s)
+
+    LOGICAL       :: constant_top_csflux(99)               = .TRUE.                !< chem spcs at the top  orig .TRUE.
+    LOGICAL       :: constant_csflux(99)                   = .TRUE.                !< chem spcs at namelist parameter   orig TRUE
+    LOGICAL       :: call_chem_at_all_substeps             = .FALSE.               !< namelist parameter 
+    LOGICAL       :: chem_debug0                           = .FALSE.               !< namelist parameter flag for minimum print output
+    LOGICAL       :: chem_debug1                           = .FALSE.               !< namelist parameter flag for print output
+    LOGICAL       :: chem_debug2                           = .FALSE.               !< namelist parameter flag for further print output
+    LOGICAL       :: chem_gasphase_on                      = .TRUE.                !< namelist parameter 
+    LOGICAL       :: emission_output_required              = .TRUE.                !< Logical Variable for requiring Emission Outputs
+    LOGICAL       :: do_emis                               = .FALSE.               !< Flag for turning on chemistry emissions 
+    LOGICAL       :: cs_pr_namelist_found                  = .FALSE.               !< Namelist parameter: Names of t
+    LOGICAL       :: do_depo                               = .FALSE.               !< namelist parameter for activation of deposition calculation
+
+
+
+!-- Namelist parameters for creating initial chemistry profiles
+    REAL(wp) :: wall_csflux (99,0:5)               = 0.0_wp                        !< namelist parameter
+    REAL(wp) :: cs_vertical_gradient (99,10)       = 0.0_wp                        !< namelist parameter
+    REAL(wp) :: cs_vertical_gradient_level (99,10) = -999999.9_wp                  !< namelist parameter
+    REAL(wp) :: top_csflux ( 99 )                  = 0.0_wp                        !< namelist parameter 
+    REAL(wp) :: cs_surface_initial_change(99)      = 0.0_wp                        !< namelist parameter
+    REAL(wp) :: surface_csflux(99 )                = 0.0_wp                        !< namelist parameter: fluxes where 'surface_csflux_name' is in the namelist
+
+    REAL(wp), DIMENSION(:),  ALLOCATABLE              :: bc_cs_t_val
+    REAL(wp), DIMENSION(:),  ALLOCATABLE              ::  css                      !< scaling parameter for chem spcs
+    REAL(wp), DIMENSION(99)                           :: cs_surface = 0.0_wp       !< Namelist parameter: Surface conc of chem spcs'
+    REAL(wp), DIMENSION(99,100)                       :: cs_heights = 9999999.9_wp !< Namelist parameter: Height lvls(m) for cs_profiles
+    REAL(wp), DIMENSION(99,100)                       :: cs_profile = 9999999.9_wp !< Namelist parameter: Chem conc for each spcs defined
+
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET   :: cs                        !< chem spcs
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET   :: cs_p                      !< prognostic value of chem spc
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET   :: tcs_m                     !< weighted tendency of cs for previous sub-timestep (Runge-Kutta)
+
+#else                                                               
+! use pointers cs, cs_p and tcs_m to point arrays cs_1, cs_2, and cs_3
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET :: cs_1                      !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET :: cs_2                      !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, TARGET :: cs_3                      !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), POINTER               :: cs                        !< pointer: sgs chem spcs)
+    REAL(wp), DIMENSION(:,:,:), POINTER               :: cs_p                      !< pointer: prognostic value of sgs chem spcs 
+    REAL(wp), DIMENSION(:,:,:), POINTER               :: tcs_m                     !< pointer:
+
+#endif                                                                            
+ 
+    CHARACTER (LEN=20)                 :: bc_cs_b             = 'dirichlet'        !< namelist parameter
+    CHARACTER (LEN=20)                 :: bc_cs_t             = 'initial_gradient' !< namelist parameter
+    CHARACTER (LEN=11), DIMENSION(99)  :: cs_name             = 'novalue'          !< Namelist parameter: chem spcs names 
+    CHARACTER (LEN=11), DIMENSION(99)  :: cs_profile_name     = 'novalue'          !< Namelist parameter: Names of the chem for profiles
+    CHARACTER (LEN=11), DIMENSION(99)  :: surface_csflux_name = 'novalue'          !< Namelist parameter: chem species surface fluxes names
+                                                                                   !< active chem spcs, default is 'novalue')  ????
+    CHARACTER (LEN=80)                 :: mode_emis           ='PARAMETERIZED'     !< Mode of chemistry emissions: DEFAULT .OR. EXPERT .OR. 
+                                                                                   !  PARAMETERIZED
+    CHARACTER (LEN=80)                 :: time_fac_type       ='MDH'               !< Type of time treatment in the emis DEFAULT mode: HOUR .OR. MDH 
+    CHARACTER (LEN=80)                 :: daytype_mdh         ='workday'           !< Type of day in the MDH case: workday, weekend, holiday
+    CHARACTER (LEN=11), DIMENSION(99)  :: data_output_pr_cs   = 'novalue'          !< Namelist parameter: Names of the che    m for profile output
+                                                                                   !< by cs_name for each height lvls defined by cs_heights
+!
+!-- Namelist parameters for chem_emissions
+    INTEGER(iwp) ::  main_street_id = 0
+    INTEGER(iwp) ::  max_street_id  = 0
+    INTEGER(iwp) ::  side_street_id = 0
+!
+!-- Constant emission factors
+    REAL(wp) ::  emiss_factor_main ( 99 ) = -9999.0_wp
+    REAL(wp) ::  emiss_factor_side ( 99 ) = -9999.0_wp
+    
+!-- Other Emissions Variables
+    INTEGER(iwp) ::  nspec_out                                                     !< Output of routine chem_emis_matching with 
+                                                                                   !< number of matched species
+    REAL(wp),ALLOCATABLE, DIMENSION(:,:,:,:)         :: emis_distribution          !> Emissions Final Values (main module output)
+
+    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)            :: match_spec_input           !< Index of Input chem species for matching routine 
+    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)            :: match_spec_model           !< Index of Model chem species for matching routine
+    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)            :: match_spec_voc_input       !< index of VOC input components matching the model's VOCs
+    INTEGER(iwp),ALLOCATABLE,DIMENSION(:)            :: match_spec_voc_model       !< index of VOC model species matching the input VOCs comp.
+    INTEGER(iwp),DIMENSION(:)                        :: match_spec_pm(1:3)         !< results of matching the input and model's PMs
+    INTEGER(iwp),DIMENSION(:)                        :: match_spec_nox(1:2)        !< results of matching the input and model's NOx
+    INTEGER(iwp),DIMENSION(:)                        :: match_spec_sox(1:2)        !< results of matching the input and model's SOx! 
+                                                                                   ! TBD: evaluate whether to make them allocatable 
+                                                                                   ! and allocate their dimension in the matching 
+                                                                                   ! routine according to the number of components 
+                                                                                   ! matching between the model and the input files
+
+    
+    !-- Selected atomic/molecular weights:
+    
+    REAL, PARAMETER        ::  xm_H     =    1.00790e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_N     =   14.00670e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_C     =   12.01115e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_S     =   32.06400e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_O     =   15.99940e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_F     =   18.99840e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Na    =   22.98977e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Cl    =   35.45300e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Rn222 =  222.00000e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Pb210 =  210.00000e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Ca    =   40.07800e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_K     =   39.09800e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Mg    =   24.30500e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Pb    =  207.20000e-3           ! kg/mol
+    REAL, PARAMETER        ::  xm_Cd    =  112.41000e-3           ! kg/mol
+    
+    REAL, PARAMETER        ::  xm_h2o   = xm_H * 2 + xm_O         ! kg/mol
+    REAL, PARAMETER        ::  xm_o3    = xm_O * 3                ! kg/mol
+    REAL, PARAMETER        ::  xm_N2O5  = xm_N * 2 + xm_O * 5     ! kg/mol
+    REAL, PARAMETER        ::  xm_HNO3  = xm_H + xm_N + xm_O * 3  ! kg/mol
+    REAL, PARAMETER        ::  xm_NH4   = xm_N + xm_H * 4         ! kg/mol
+    REAL, PARAMETER        ::  xm_SO4   = xm_S + xm_O * 4         ! kg/mol
+    REAL, PARAMETER        ::  xm_NO3   = xm_N + xm_O * 3         ! kg/mol
+    REAL, PARAMETER        ::  xm_CO2   = xm_C + xm_O * 2         ! kg/mol
+    
+    ! mass of air
+    REAL, PARAMETER        ::  xm_air   =  28.964e-3              ! kg/mol
+        
+    ! dummy weight, used for complex molecules:
+    REAL, PARAMETER        ::  xm_dummy =  1000.0e-3              ! kg/mol
+
+    
+    SAVE
+ END MODULE chem_modules
+
Index: /palm/tags/release-6.0/SOURCE/chem_photolysis_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/chem_photolysis_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/chem_photolysis_mod.f90	(revision 3477)
@@ -0,0 +1,264 @@
+!> @file chem_photolysis_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2018-2018 Leibniz Universitaet Hannover
+! Copyright 2018-2018 Karlsruhe Institute of Technology
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Moved USE radiation_model_mod from MODULE section into Subroutine
+! in order to use constant photolysis without radiation module (forkel)
+! 
+! 3287 2018-09-28 10:19:58Z forkel
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables commented
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Initial revision
+!
+!
+! Authors:
+! --------
+! @author Renate Forkel
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> photolysis models and interfaces (Adapted from photolysis_model_mod.f90)
+!> @todo Alles!
+!------------------------------------------------------------------------------!
+ MODULE chem_photolysis_mod
+
+!   USE arrays_3d,                                                             &
+!       ONLY:  dzw, q, ql, zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  time_since_reference_point
+
+    USE pegrid,             ONLY: myid, threads_per_task
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+
+    USE control_parameters,                                                    &
+        ONLY:  initializing_actions           
+
+    USE chem_gasphase_mod,                                                     &
+        ONLY: nphot, phot_names, phot 
+
+    USE chemistry_model_mod,                                                   &
+        ONLY: phot_frequen, photolysis_scheme
+
+    USE chem_modules,                                                          &
+        ONLY: chem_debug2
+
+    USE kinds
+
+#if defined ( __netcdf )
+    USE NETCDF
+#endif
+
+
+    IMPLICIT NONE
+
+
+!   LOGICAL ::  unscheduled_photolysis_calls = .TRUE., & !< flag parameter indicating whether additional calls of the photolysis code are allowed
+!               constant_albedo = .FALSE.,           & !< flag parameter indicating whether the albedo may change depending on zenith
+!               force_photolysis_call = .FALSE.,     & !< flag parameter for unscheduled photolysis calls
+!               photolysis = .FALSE.,                & !< flag parameter indicating whether the photolysis model is used
+!               sun_up    = .TRUE.,                  & !< flag parameter indicating whether the sun is up or down
+!               photolysis = .TRUE.,                 & !< flag parameter indicing whether photolysis shall be calculated
+!               sun_direction = .FALSE.                !< flag parameter indicing whether solar direction shall be calculated
+
+!-- Parameters for constant photolysis frequencies
+    INTEGER,PARAMETER :: nconst  = 15               !< available predefined photolysis prequencies for constant 
+
+! Names for predefined fixed photolysis frequencies at zenith angle 0
+    CHARACTER(LEN=10), PARAMETER, DIMENSION(nconst) :: names_c =  (/                    &
+                     'J_O31D    ','J_O33P    ','J_NO2     ','J_HNO3    ','J_RCHO    ', &
+                     'J         ','J         ','J         ','J         ','J         ', &
+                     'J         ','J         ','J         ','J         ','J         ' /)
+! Photolysis frequency at zenith angle 0 in 1/s
+    REAL(wp), PARAMETER, DIMENSION(nconst) :: phot0 =  (/                             &
+                      2.489E-05_wp,3.556E-04_wp, 8.89E-03_wp,5.334E-07_wp,3.734E-05_wp, &
+                      0.0000E00_wp,0.0000E00_wp,0.0000E00_wp,0.0000E00_wp,0.0000E00_wp, &
+                      0.0000E00_wp,0.0000E00_wp,0.0000E00_wp,0.0000E00_wp,0.0000E00_wp /)
+
+
+!-- Parameters for simple photolysis frequencies
+    INTEGER,PARAMETER :: nsimple = 15               !< available predefined photolysis prequencies for simpel parameterisation
+! Names for simple photolysis frequencies parameterisation (
+     CHARACTER(LEN=10), PARAMETER, DIMENSION(nsimple) :: names_s =  (/                 &
+                     'J_O31D    ','J_O33P    ','J_H2O2    ','J_NO2     ','J_NO3_A   ', &
+                     'J_NO3_B   ','J_HONO    ','J_HNO3    ','J_HCHO_A  ','J_HCHO_B  ', &
+                     'J_CH3CHO  ','J         ','J         ','J         ','J_RCHO    ' /)
+
+!-- Parameters for simeple photolysis frequencies from MCM (http://mcm.leeds.ac.uk/MCM)
+!-- Saunders et al., 2003, Atmos. Chem. Phys., 3, 161-180
+     REAL(wp), PARAMETER, DIMENSION(nconst) :: par_l =  (/                             &
+                     6.073E-05_wp,4.775E-04_wp,1.041E-05_wp,1.165E-02_wp,2.485E-02_wp, &
+                     1.747E-01_wp,2.644E-03_wp,9.312E-07_wp,4.642E-05_wp,6.853E-05_wp, &
+                     7.344E-06_wp,0.0000E00_wp,0.0000E00_wp,0.000E00_wp, 6.853E-05_wp /)
+
+     REAL(wp), PARAMETER, DIMENSION(nconst) :: par_m =  (/                             &
+                         1.743_wp,    0.298_wp,    0.723_wp,    0.244_wp,    0.168_wp, &
+                         0.155_wp,    0.261_wp,    1.230_wp,    0.762_wp,    0.477_wp, &
+                         1.202_wp,    0.000_wp,    0.000_wp,    0.000_wp,    0.477_wp /)
+
+     REAL(wp), PARAMETER, DIMENSION(nconst) :: par_n =  (/                             &
+                         0.474_wp,    0.080_wp,    0.279_wp,    0.267_wp,    0.108_wp, &
+                         0.125_wp,    0.288_wp,    0.307_wp,    0.353_wp,    0.323_wp, &
+                         0.417_wp,    0.000_wp,    0.000_wp,    0.000_wp,    0.323_wp /)
+
+
+    REAL(wp) :: time_photolysis = 0.0_wp,         & !< time since last call of photolysis code
+                dt_photolysis = 0.0_wp,           & !< hotolysis model timestep
+                skip_time_do_photolysis = 0.0_wp    !< Radiation model is not called before this time
+
+    REAL(wp)     :: cosz = 0.7_wp                   !< cosine of Zenith angle (45 deg, if not specified otherwise)
+
+!
+    INTERFACE photolysis_constant
+       MODULE PROCEDURE photolysis_constant
+    END INTERFACE photolysis_constant
+ 
+    INTERFACE photolysis_simple
+       MODULE PROCEDURE photolysis_simple
+    END INTERFACE photolysis_simple
+!
+!   INTERFACE photolysis_fastj
+!      MODULE PROCEDURE photolysis_fastj
+!   END INTERFACE photolysis_fastj
+!
+    INTERFACE photolysis_control
+       MODULE PROCEDURE photolysis_control
+    END INTERFACE photolysis_control
+
+
+    SAVE
+
+    PRIVATE
+
+    PUBLIC  photolysis_control
+
+    PUBLIC  photolysis_scheme
+!
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine controls the calls of the photolysis schemes
+!------------------------------------------------------------------------------!
+    SUBROUTINE photolysis_control
+ 
+       IMPLICIT NONE
+
+       SELECT CASE ( TRIM( photolysis_scheme ) )
+
+          CASE ( 'constant' )
+             CALL photolysis_constant
+          
+          CASE ( 'simple' )
+             CALL photolysis_simple
+       
+!         CASE ( 'fastj' )
+!            CALL photolysis_fastj
+
+          CASE DEFAULT
+
+       END SELECT
+
+
+    END SUBROUTINE photolysis_control
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This scheme keeps the prescribed net radiation constant during the run
+!> Default zenith angle is 45 deg
+!------------------------------------------------------------------------------!
+    SUBROUTINE photolysis_constant
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: iphot,iav !< loop indix for photolysis reaction
+
+       DO iphot = 1,nphot
+          DO iav = 1,nconst
+             IF ( TRIM( names_c(iav) ) == TRIM( phot_names(iphot) ) ) then
+!--             Prescribe fixed photolysis frequencies  [1/s]
+                phot_frequen(iphot)%freq(nzb+1:nzt,:,:) =    &
+                             phot0(iav) * cosz
+             ENDIF
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE photolysis_constant
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This scheme applies a simple parameterisation for clear sky photolysis frequencies 
+!> from the Master Chemical Mechanism, MCM v3.2 (http://mcm.leeds.ac.uk/MCM).
+!> Reference: Saunders et al., Atmos. Chem. Phys., 3, 161, 2003
+!------------------------------------------------------------------------------!
+    SUBROUTINE photolysis_simple
+
+       USE radiation_model_mod,                                                   &
+           ONLY:  calc_zenith, zenith
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: iphot,iav !< loop indix for photolysis reaction
+       REAL(wp)     :: coszi     !< 1./cosine of zenith angle
+
+       DO iphot = 1,nphot
+          phot_frequen(iphot)%freq = 0.0_wp
+       ENDDO
+
+       CALL calc_zenith
+
+       IF ( zenith(0) > 0.0_wp ) THEN
+          coszi = 1. / zenith(0)
+
+          DO iphot = 1,nphot
+             DO iav = 1,nsimple
+                IF ( TRIM( names_s(iav) ) == TRIM( phot_names(iphot) ) ) then
+                   phot_frequen(iphot)%freq(nzb+1:nzt,:,:) =    &
+                                par_l(iav) * zenith(0)**par_m(iav) *  EXP( -par_n(iav) * coszi ) 
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF
+    END SUBROUTINE photolysis_simple
+
+ END MODULE chem_photolysis_mod
Index: /palm/tags/release-6.0/SOURCE/chemistry_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/chemistry_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/chemistry_model_mod.f90	(revision 3477)
@@ -0,0 +1,5494 @@
+!> @file chemistry_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017-2018 Leibniz Universitaet Hannover
+! Copyright 2017-2018 Karlsruhe Institute of Technology
+! Copyright 2017-2018 Freie Universitaet Berlin
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! from chemistry branch r3443, banzhafs, basit:
+! replace surf_lsm_h%qv1(m) by q(k,j,i) for mixing ratio in chem_depo
+! bug fix in chem_depo: allow different surface fractions for one
+! surface element and set lai to zero for non vegetated surfaces
+! bug fixed in chem_data_output_2d
+! bug fix in chem_depo subroutine
+! added code on deposition of gases and particles
+! removed cs_profile_name from chem_parin
+! bug fixed in output profiles and code cleaned
+! 
+! 3449 2018-10-29 19:36:56Z suehring
+! additional output - merged from branch resler
+! 
+! 3438 2018-10-28 19:31:42Z pavelkrc
+! Add terrain-following masked output
+! 
+! 3373 2018-10-18 15:25:56Z kanani
+! Remove MPI_Abort, replace by message
+!
+! 3318 2018-10-08 11:43:01Z sward
+! Fixed faulty syntax of message string
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Add remarks (kanani)
+! Merge with trunk, replaced cloud_physics by bulk_cloud_model         28.09.2018 forkel
+! Subroutines header and chem_check_parameters added                   25.09.2018 basit
+! Removed chem_emission routine now declared in chem_emissions.f90     30.07.2018 ERUSSO
+! Introduced emissions namelist parameters                             30.07.2018 ERUSSO
+!
+! Timestep steering added in subroutine chem_integrate_ij and 
+! output of chosen solver in chem_parin added                          30.07.2018 ketelsen
+!
+! chem_check_data_output_pr: added unit for PM compounds               20.07.2018 forkel
+! replaced : by nzb+1:nzt for pt,q,ql (found by kk)                    18.07.2018 forkel
+! debugged restart run for chem species               06.07.2018 basit
+! reorganized subroutines in alphabetical order.      27.06.2018 basit
+! subroutine chem_parin updated for profile output    27.06.2018 basit
+! Added humidity arrays to USE section and tmp_qvap in chem_integrate  26.6.2018 forkel
+! Merged chemistry with with trunk (nzb_do and nzt_do in 3d output)    26.6.2018 forkel
+!
+! reorganized subroutines in alphabetical order.      basit 22.06.2018
+! subroutine chem_parin updated for profile output    basit 22.06.2018
+! subroutine chem_statistics added                  
+! subroutine chem_check_data_output_pr add            21.06.2018 basit
+! subroutine chem_data_output_mask added              20.05.2018 basit
+! subroutine chem_data_output_2d added                20.05.2018 basit
+! subroutine chem_statistics added                    04.06.2018 basit
+! subroutine chem_emissions: Set cssws to zero before setting values 20.03.2018 forkel
+! subroutine chem_emissions: Introduced different conversion factors 
+! for PM and gaseous compounds                                    15.03.2018 forkel
+! subroutine chem_emissions updated to take variable number of chem_spcs and
+! emission factors.                                               13.03.2018 basit
+! chem_boundary_conds_decycle improved.                           05.03.2018 basit
+! chem_boundary_conds_decycle subroutine added                    21.02.2018 basit
+! chem_init_profiles subroutines re-activated after correction    21.02.2018 basit
+! 
+! 
+! 3293 2018-09-28 12:45:20Z forkel
+! Modularization of all bulk cloud physics code components
+!
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+!
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+!
+! 3241 2018-09-12 15:02:00Z raasch
+! +nest_chemistry
+! 
+! 3209 2018-08-27 16:58:37Z suehring
+! Rename flags indicating outflow boundary conditions
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Revise output of surface quantities in case of overhanging structures
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! error messages revised
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Bugfix: nzb_do and nzt_do were not used for 3d data output
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Comment concerning averaged data output added 
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed chemistry_par to chemistry_parameters
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Calculations of the index range of the subdomain on file which overlaps with
+! the current subdomain are already done in read_restart_data_mod,
+! chem_last_actions was renamed to chem_wrd_local, chem_read_restart_data was
+! renamed to chem_rrd_local, chem_write_var_list was renamed to 
+! chem_wrd_global, chem_read_var_list was renamed to chem_rrd_global, 
+! chem_skip_var_list has been removed, variable named found has been
+! introduced for checking if restart data was found, reading of restart strings
+! has been moved completely to read_restart_data_mod, chem_rrd_local is already
+! inside the overlap loop programmed in read_restart_data_mod, todo list has 
+! bees extended, redundant characters in chem_wrd_local have been removed, 
+! the marker *** end chemistry *** is not necessary anymore, strings and their 
+! respective lengths are written out and read now in case of restart runs to 
+! get rid of prescribed character lengths
+!
+! 2815 2018-02-19 11:29:57Z suehring
+! Bugfix in restart mechanism,
+! rename chem_tendency to chem_prognostic_equations,
+! implement vector-optimized version of chem_prognostic_equations,
+! some clean up (incl. todo list)
+! 
+! 2773 2018-01-30 14:12:54Z suehring
+! Declare variables required for nesting as public
+! 
+! 2772 2018-01-29 13:10:35Z suehring
+! Bugfix in string handling
+! 
+! 2768 2018-01-24 15:38:29Z kanani
+! Shorten lines to maximum length of 132 characters
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2756 2018-01-16 18:11:14Z suehring
+! Fill values in 3D output introduced.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Initial revision
+!
+! 
+!
+!
+! Authors:
+! --------
+! @author Renate Forkel
+! @author Farah Kanani-Suehring
+! @author Klaus Ketelsen
+! @author Basit Khan
+! @author Sabine Banzhaf
+!
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Chemistry model for PALM-4U
+!> @todo Adjust chem_rrd_local to CASE structure of others modules. It is not 
+!>       allowed to use the chemistry model in a precursor run and additionally 
+!>       not using it in a main run
+!> @todo Update/clean-up todo list! (FK)
+!> @todo Set proper fill values (/= 0) for chem output arrays! (FK)
+!> @todo Add routine chem_check_parameters, add checks for inconsistent or
+!>       unallowed parameter settings. 
+!>       CALL of chem_check_parameters from check_parameters. (FK)
+!> @todo Make routine chem_header available, CALL from header.f90
+!>       (see e.g. how it is done in routine lsm_header in 
+!>        land_surface_model_mod.f90). chem_header should include all setup
+!>        info about chemistry parameter settings. (FK)
+!> @todo Implement turbulent inflow of chem spcs in inflow_turbulence.
+!> @todo Separate boundary conditions for each chem spcs to be implemented
+!> @todo Currently only total concentration are calculated. Resolved, parameterized
+!>       and chemistry fluxes although partially and some completely coded but
+!>       are not operational/activated in this version. bK.
+!> @todo slight differences in passive scalar and chem spcs when chem reactions
+!>       turned off. Need to be fixed. bK
+!> @todo test nesting for chem spcs, was implemented by suehring (kanani)
+!> @todo chemistry error messages
+!> @todo Format this module according to PALM coding standard (see e.g. module
+!>       template under http://palm.muk.uni-hannover.de/mosaik/downloads/8 or
+!>       D3_coding_standard.pdf under https://palm.muk.uni-hannover.de/trac/downloads/16)
+! 
+!------------------------------------------------------------------------------!
+
+ MODULE chemistry_model_mod
+
+    USE kinds,              ONLY: wp, iwp
+    USE indices,            ONLY: nz, nzb,nzt,nysg,nyng,nxlg,nxrg,                                 &
+                                 nys,nyn,nx,nxl,nxr,ny,wall_flags_0
+    USE pegrid,             ONLY: myid, threads_per_task
+
+   USE bulk_cloud_model_mod,                                               &
+        ONLY:  bulk_cloud_model
+
+    USE control_parameters, ONLY: bc_lr_cyc, bc_ns_cyc, dt_3d, humidity,                           &
+                                 initializing_actions, message_string,                             &
+                                 omega, tsc, intermediate_timestep_count,                          &
+                                 intermediate_timestep_count_max, max_pr_user,                     &
+                                 timestep_scheme, use_prescribed_profile_data, ws_scheme_sca  
+   USE arrays_3d,          ONLY: exner, hyp, pt, q, ql, rdf_sc, tend, zu
+    USE chem_gasphase_mod,  ONLY: nspec, spc_names, nkppctrl, nmaxfixsteps,                        &
+                                 t_steps, chem_gasphase_integrate, vl_dim,                         &
+                                 nvar, nreact,  atol, rtol, nphot, phot_names
+    USE cpulog,             ONLY: cpu_log, log_point
+
+    USE chem_modules
+ 
+    USE statistics
+
+    IMPLICIT   NONE
+    PRIVATE
+    SAVE
+
+    LOGICAL ::  nest_chemistry = .TRUE. !< flag for nesting mode of chemical species, independent on parent or not
+!
+!- Define chemical variables
+    TYPE   species_def
+       CHARACTER(LEN=8)                                   :: name
+       CHARACTER(LEN=16)                                  :: unit
+       REAL(kind=wp),POINTER,DIMENSION(:,:,:)             :: conc
+       REAL(kind=wp),POINTER,DIMENSION(:,:,:)             :: conc_av
+       REAL(kind=wp),POINTER,DIMENSION(:,:,:)             :: conc_p
+       REAL(kind=wp),POINTER,DIMENSION(:,:,:)             :: tconc_m
+       REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:)           :: cssws_av           
+       REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:)           :: flux_s_cs
+       REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:)           :: diss_s_cs
+       REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:)         :: flux_l_cs
+       REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:)         :: diss_l_cs
+       REAL(kind=wp),ALLOCATABLE,DIMENSION(:)             :: conc_pr_init
+    END TYPE species_def
+
+
+    TYPE   photols_def                                                            
+       CHARACTER(LEN=8)                                   :: name
+       CHARACTER(LEN=16)                                  :: unit
+       REAL(kind=wp),POINTER,DIMENSION(:,:,:)             :: freq
+    END TYPE photols_def
+
+
+    PUBLIC  species_def
+    PUBLIC  photols_def
+
+
+    TYPE(species_def),ALLOCATABLE,DIMENSION(:),TARGET, PUBLIC     :: chem_species
+    TYPE(photols_def),ALLOCATABLE,DIMENSION(:),TARGET, PUBLIC     :: phot_frequen  
+
+    REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:,:),TARGET   :: spec_conc_1
+    REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:,:),TARGET   :: spec_conc_2
+    REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:,:),TARGET   :: spec_conc_3
+    REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:,:),TARGET   :: spec_conc_av       
+    REAL(kind=wp),ALLOCATABLE,DIMENSION(:,:,:,:),TARGET   :: freq_1
+
+    INTEGER,DIMENSION(nkppctrl)                           :: icntrl                            ! Fine tuning kpp
+    REAL(kind=wp),DIMENSION(nkppctrl)                     :: rcntrl                            ! Fine tuning kpp
+    LOGICAL :: decycle_chem_lr    = .FALSE.
+    LOGICAL :: decycle_chem_ns    = .FALSE.
+    CHARACTER (LEN=20), DIMENSION(4) ::  decycle_method = &
+                  (/'dirichlet','dirichlet','dirichlet','dirichlet'/)
+                                 !< Decycling method at horizontal boundaries, 
+                                 !< 1=left, 2=right, 3=south, 4=north
+                                 !< dirichlet = initial size distribution and 
+                                 !< chemical composition set for the ghost and 
+                                 !< first three layers
+                                 !< neumann = zero gradient
+
+    REAL(kind=wp), PUBLIC :: cs_time_step = 0._wp
+    CHARACTER(10), PUBLIC :: photolysis_scheme
+                                         ! 'constant',
+                                         ! 'simple' (Simple parameterisation from MCM, Saunders et al., 2003, Atmos. Chem. Phys., 3, 161-180
+                                         ! 'fastj'  (Wild et al., 2000, J. Atmos. Chem., 37, 245-282) STILL NOT IMPLEMENTED
+
+    
+    !-----------------------------------------------------------------------
+    ! Parameter needed for Deposition calculation using DEPAC model (van Zanten et al., 2010)
+    !
+    INTEGER(iwp), PARAMETER :: nlu_dep = 15                   ! Number of DEPAC landuse classes (lu's)
+    INTEGER(iwp), PARAMETER :: ncmp = 10                      ! Number of DEPAC gas components
+    !------------------------------------------------------------------------
+    ! DEPAC landuse classes as defined in LOTOS-EUROS model v2.1                              
+    !
+    INTEGER(iwp)  ::  ilu_grass	             = 1        
+    INTEGER(iwp)  ::  ilu_arable	     = 2        
+    INTEGER(iwp)  ::  ilu_permanent_crops    = 3         
+    INTEGER(iwp)  ::  ilu_coniferous_forest  = 4         
+    INTEGER(iwp)  ::  ilu_deciduous_forest   = 5         
+    INTEGER(iwp)  ::  ilu_water_sea	     = 6        
+    INTEGER(iwp)  ::  ilu_urban      	     = 7        
+    INTEGER(iwp)  ::  ilu_other              = 8  
+    INTEGER(iwp)  ::  ilu_desert             = 9  
+    INTEGER(iwp)  ::  ilu_ice                = 10 
+    INTEGER(iwp)  ::  ilu_savanna            = 11 
+    INTEGER(iwp)  ::  ilu_tropical_forest    = 12 
+    INTEGER(iwp)  ::  ilu_water_inland       = 13 
+    INTEGER(iwp)  ::  ilu_mediterrean_scrub  = 14 
+    INTEGER(iwp)  ::  ilu_semi_natural_veg   = 15 
+    ! 
+    !--------------------------------------------------------------------------
+    ! NH3/SO2 ratio regimes:
+    INTEGER, PARAMETER  ::  iratns_low	= 1       ! low ratio NH3/SO2
+    INTEGER, PARAMETER  ::  iratns_high	= 2       ! high ratio NH3/SO2
+    INTEGER, PARAMETER  ::  iratns_very_low = 3   ! very low ratio NH3/SO2
+    ! Default:
+    INTEGER, PARAMETER  ::  iratns_default = iratns_low
+    !
+    ! Set alpha for f_light (4.57 is conversion factor from 1./(mumol m-2 s-1) naar W m-2
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: alpha   =(/0.009,0.009, 0.009,0.006,0.006, -999., -999.,0.009,-999.,-999.,0.009,0.006,-999.,0.009,0.008/)*4.57
+    !
+    ! Set temperatures per land use for F_temp
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: Tmin =   (/12.0, 12.0,  12.0,  0.0,  0.0, -999., -999., 12.0, -999., -999., 12.0,  0.0, -999., 12.0,  8.0/)
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: Topt =   (/26.0, 26.0,  26.0, 18.0, 20.0, -999., -999., 26.0, -999., -999., 26.0, 20.0, -999., 26.0, 24.0 /)
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: Tmax =   (/40.0, 40.0,  40.0, 36.0, 35.0, -999., -999., 40.0, -999., -999., 40.0, 35.0, -999., 40.0, 39.0 /)
+    !
+    ! Set F_min:
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: F_min   =(/0.01, 0.01,  0.01, 0.1,  0.1,   -999., -999.,0.01, -999.,-999.,0.01,0.1,-999.,0.01, 0.04/)
+    
+    ! Set maximal conductance (m/s)
+    ! (R T/P) = 1/41000 mmol/m3 is given for 20 deg C to go from  mmol O3/m2/s to m/s
+    ! Could be refined to a function of T and P. in Jones
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: g_max   =(/270., 300.,  300., 140., 150.,  -999., -999.,270., -999.,-999.,270., 150.,-999.,300., 422./)/41000
+    !
+    ! Set max, min for vapour pressure deficit vpd;
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: vpd_max =(/1.3,  0.9,   0.9,  0.5,  1.0,   -999., -999.,1.3,  -999.,-999.,1.3,1.0,  -999.,0.9, 2.8/) 
+    REAL(wp), DIMENSION(nlu_dep), PARAMETER :: vpd_min =(/3.0,  2.8,   2.8,  3.0,  3.25,  -999., -999.,3.0,  -999.,-999.,3.0,3.25, -999.,2.8, 4.5/) 
+    !
+    !  
+    !------------------------------------------------------------------------
+
+    
+    PUBLIC nest_chemistry
+    PUBLIC nspec
+    PUBLIC nreact
+    PUBLIC nvar      
+    PUBLIC spc_names
+    PUBLIC spec_conc_2  
+
+!-  Interface section
+    INTERFACE chem_3d_data_averaging
+       MODULE PROCEDURE chem_3d_data_averaging 
+    END INTERFACE chem_3d_data_averaging
+
+    INTERFACE chem_boundary_conds
+       MODULE PROCEDURE chem_boundary_conds
+       MODULE PROCEDURE chem_boundary_conds_decycle
+    END INTERFACE chem_boundary_conds
+
+    INTERFACE chem_check_data_output
+       MODULE PROCEDURE chem_check_data_output
+    END INTERFACE chem_check_data_output
+
+    INTERFACE chem_data_output_2d
+       MODULE PROCEDURE chem_data_output_2d
+    END INTERFACE chem_data_output_2d
+
+    INTERFACE chem_data_output_3d
+       MODULE PROCEDURE chem_data_output_3d
+    END INTERFACE chem_data_output_3d
+
+    INTERFACE chem_data_output_mask
+       MODULE PROCEDURE chem_data_output_mask
+    END INTERFACE chem_data_output_mask
+
+    INTERFACE chem_check_data_output_pr
+       MODULE PROCEDURE chem_check_data_output_pr
+    END INTERFACE chem_check_data_output_pr
+
+    INTERFACE chem_check_parameters
+       MODULE PROCEDURE chem_check_parameters
+    END INTERFACE chem_check_parameters
+
+    INTERFACE chem_define_netcdf_grid
+       MODULE PROCEDURE chem_define_netcdf_grid
+    END INTERFACE chem_define_netcdf_grid
+
+    INTERFACE chem_header
+       MODULE PROCEDURE chem_header
+    END INTERFACE chem_header
+
+    INTERFACE chem_init
+       MODULE PROCEDURE chem_init
+    END INTERFACE chem_init
+
+    INTERFACE chem_init_profiles
+       MODULE PROCEDURE chem_init_profiles
+    END INTERFACE chem_init_profiles
+
+    INTERFACE chem_integrate
+       MODULE PROCEDURE chem_integrate_ij
+    END INTERFACE chem_integrate
+
+    INTERFACE chem_parin
+       MODULE PROCEDURE chem_parin
+    END INTERFACE chem_parin
+
+    INTERFACE chem_prognostic_equations
+       MODULE PROCEDURE chem_prognostic_equations
+       MODULE PROCEDURE chem_prognostic_equations_ij
+    END INTERFACE chem_prognostic_equations
+
+    INTERFACE chem_rrd_local
+       MODULE PROCEDURE chem_rrd_local
+    END INTERFACE chem_rrd_local
+
+    INTERFACE chem_statistics
+       MODULE PROCEDURE chem_statistics
+    END INTERFACE chem_statistics
+
+    INTERFACE chem_swap_timelevel
+       MODULE PROCEDURE chem_swap_timelevel
+    END INTERFACE chem_swap_timelevel
+
+    INTERFACE chem_wrd_local
+       MODULE PROCEDURE chem_wrd_local 
+    END INTERFACE chem_wrd_local
+
+    INTERFACE chem_depo
+       MODULE PROCEDURE chem_depo 
+    END INTERFACE chem_depo
+
+    INTERFACE drydepos_gas_depac
+       MODULE PROCEDURE drydepos_gas_depac 
+    END INTERFACE drydepos_gas_depac
+
+    INTERFACE rc_special
+       MODULE PROCEDURE rc_special 
+    END INTERFACE rc_special
+
+    INTERFACE  rc_gw
+       MODULE PROCEDURE rc_gw 
+    END INTERFACE rc_gw
+
+    INTERFACE rw_so2 
+       MODULE PROCEDURE rw_so2  
+    END INTERFACE rw_so2
+
+    INTERFACE rw_nh3_sutton
+       MODULE PROCEDURE rw_nh3_sutton 
+    END INTERFACE rw_nh3_sutton
+
+    INTERFACE rw_constant
+       MODULE PROCEDURE rw_constant 
+    END INTERFACE rw_constant
+
+    INTERFACE rc_gstom
+       MODULE PROCEDURE rc_gstom 
+    END INTERFACE rc_gstom
+
+    INTERFACE rc_gstom_emb
+       MODULE PROCEDURE rc_gstom_emb 
+    END INTERFACE rc_gstom_emb
+
+    INTERFACE par_dir_diff
+       MODULE PROCEDURE par_dir_diff 
+    END INTERFACE par_dir_diff
+
+    INTERFACE rc_get_vpd
+       MODULE PROCEDURE rc_get_vpd 
+    END INTERFACE rc_get_vpd
+
+    INTERFACE rc_gsoil_eff
+       MODULE PROCEDURE rc_gsoil_eff 
+    END INTERFACE rc_gsoil_eff
+
+    INTERFACE rc_rinc
+       MODULE PROCEDURE rc_rinc 
+    END INTERFACE rc_rinc
+
+    INTERFACE rc_rctot
+       MODULE PROCEDURE rc_rctot  
+    END INTERFACE rc_rctot
+
+    INTERFACE rc_comp_point_rc_eff
+       MODULE PROCEDURE rc_comp_point_rc_eff 
+    END INTERFACE rc_comp_point_rc_eff
+
+    INTERFACE drydepo_aero_zhang_vd
+       MODULE PROCEDURE drydepo_aero_zhang_vd 
+    END INTERFACE drydepo_aero_zhang_vd
+
+    INTERFACE get_rb_cell
+       MODULE PROCEDURE  get_rb_cell
+    END INTERFACE get_rb_cell
+
+    
+
+    PUBLIC chem_3d_data_averaging, chem_boundary_conds, chem_check_data_output, &
+           chem_check_data_output_pr, chem_check_parameters,                    &
+           chem_data_output_2d, chem_data_output_3d, chem_data_output_mask,     &
+           chem_define_netcdf_grid, chem_header, chem_init,                     &
+           chem_init_profiles, chem_integrate, chem_parin,                      &
+           chem_prognostic_equations, chem_rrd_local,                           &
+           chem_statistics, chem_swap_timelevel, chem_wrd_local, chem_depo 
+
+
+
+ CONTAINS
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data of chemical species. Due to the fact that 
+!> the averaged chem arrays are allocated in chem_init, no if-query concerning
+!> the allocation is required (in any mode). Attention: If you just specify an 
+!> averaged output quantity in the _p3dr file during restarts the first output
+!> includes the time between the beginning of the restart run and the first
+!> output time (not necessarily the whole averaging_interval you have 
+!> specified in your _p3d/_p3dr file )
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_3d_data_averaging ( mode, variable )
+
+       USE control_parameters
+
+       USE indices
+
+       USE kinds
+
+       USE surface_mod,                                                         &
+          ONLY: surf_def_h, surf_lsm_h, surf_usm_h   
+  
+       IMPLICIT NONE
+ 
+       CHARACTER (LEN=*) ::  mode    !< 
+       CHARACTER (LEN=*) :: variable !< 
+ 
+       LOGICAL      ::  match_def !< flag indicating natural-type surface
+       LOGICAL      ::  match_lsm !< flag indicating natural-type surface
+       LOGICAL      ::  match_usm !< flag indicating urban-type surface
+
+       INTEGER(iwp) ::  i                  !< grid index x direction
+       INTEGER(iwp) ::  j                  !< grid index y direction
+       INTEGER(iwp) ::  k                  !< grid index z direction
+       INTEGER(iwp) ::  m                  !< running index surface type
+       INTEGER(iwp) :: lsp                 !< running index for chem spcs
+
+
+       IF ( mode == 'allocate' )  THEN
+          DO lsp = 1, nspec
+             IF ( TRIM(variable(1:3)) == 'kc_' .AND. &
+                  TRIM(variable(4:)) == TRIM(chem_species(lsp)%name)) THEN
+                chem_species(lsp)%conc_av = 0.0_wp
+             ENDIF
+          ENDDO
+
+       ELSEIF ( mode == 'sum' )  THEN
+
+          DO lsp = 1, nspec
+             IF ( TRIM(variable(1:3)) == 'kc_' .AND. &
+                  TRIM(variable(4:)) == TRIM(chem_species(lsp)%name)) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                          chem_species(lsp)%conc_av(k,j,i) = chem_species(lsp)%conc_av(k,j,i) + &
+                                                             chem_species(lsp)%conc(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSEIF ( TRIM(variable(4:)) == TRIM('cssws*') )        THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=               &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=                  &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=                  &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         chem_species(lsp)%cssws_av(j,i) =                        &
+                                                chem_species(lsp)%cssws_av(j,i) + &
+                                                surf_def_h(0)%cssws(lsp,m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         chem_species(lsp)%cssws_av(j,i) =                        &
+                                                chem_species(lsp)%cssws_av(j,i) + &
+                                                surf_lsm_h%cssws(lsp,m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         chem_species(lsp)%cssws_av(j,i) =                        &
+                                                chem_species(lsp)%cssws_av(j,i) + &
+                                                surf_usm_h%cssws(lsp,m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDDO
+ 
+       ELSEIF ( mode == 'average' )  THEN
+          DO lsp = 1, nspec
+             IF ( TRIM(variable(1:3)) == 'kc_' .AND. &
+                  TRIM(variable(4:)) == TRIM(chem_species(lsp)%name)) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                          chem_species(lsp)%conc_av(k,j,i) = chem_species(lsp)%conc_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             ELSEIF (TRIM(variable(4:)) == TRIM('cssws*') )            THEN
+                DO i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                        chem_species(lsp)%cssws_av(j,i) = chem_species(lsp)%cssws_av(j,i) / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+                   CALL exchange_horiz_2d( chem_species(lsp)%cssws_av, nbgp )                 
+             ENDIF
+          ENDDO
+          
+       ENDIF     
+
+    END SUBROUTINE chem_3d_data_averaging
+
+!    
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine to initialize and set all boundary conditions for chemical species
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_boundary_conds( mode )                                           
+                                                                                     
+       USE control_parameters,                                                    &  
+          ONLY:  air_chemistry, bc_radiation_l, bc_radiation_n, bc_radiation_r,  &
+                 bc_radiation_s                
+       USE indices,                                                               &  
+          ONLY:  nxl, nxr,  nxlg, nxrg, nyng, nysg, nzt                              
+                                                                                     
+
+       USE arrays_3d,                                                             &     
+          ONLY:  dzu                                                
+       USE surface_mod,                                                           &
+          ONLY:  bc_h                                                           
+
+       CHARACTER (len=*), INTENT(IN) :: mode
+       INTEGER(iwp) ::  i                                                            !< grid index x direction.
+       INTEGER(iwp) ::  j                                                            !< grid index y direction.
+       INTEGER(iwp) ::  k                                                            !< grid index z direction.
+       INTEGER(iwp) ::  kb                                                           !< variable to set respective boundary value, depends on facing. 
+       INTEGER(iwp) ::  l                                                            !< running index boundary type, for up- and downward-facing walls.
+       INTEGER(iwp) ::  m                                                            !< running index surface elements.
+       INTEGER(iwp) ::  lsp                                                          !< running index for chem spcs.
+       INTEGER(iwp) ::  lph                                                          !< running index for photolysis frequencies
+
+
+       SELECT CASE ( TRIM( mode ) )        
+          CASE ( 'init' )
+
+             IF ( bc_cs_b == 'dirichlet' )    THEN
+                ibc_cs_b = 0 
+             ELSEIF ( bc_cs_b == 'neumann' )  THEN
+                ibc_cs_b = 1 
+             ELSE
+                message_string = 'unknown boundary condition: bc_cs_b ="' // TRIM( bc_cs_b ) // '"'  
+                CALL message( 'chem_boundary_conds', 'CM0429', 1, 2, 0, 6, 0 )     !<
+             ENDIF                                                                  
+!
+!--          Set Integer flags and check for possible erroneous settings for top
+!--          boundary condition. 
+             IF ( bc_cs_t == 'dirichlet' )             THEN
+                ibc_cs_t = 0 
+             ELSEIF ( bc_cs_t == 'neumann' )           THEN
+                ibc_cs_t = 1
+             ELSEIF ( bc_cs_t == 'initial_gradient' )  THEN
+                ibc_cs_t = 2
+             ELSEIF ( bc_cs_t == 'nested' )            THEN          
+                ibc_cs_t = 3
+             ELSE
+                message_string = 'unknown boundary condition: bc_c_t ="' // TRIM( bc_cs_t ) // '"'      
+                CALL message( 'check_parameters', 'CM0430', 1, 2, 0, 6, 0 )
+             ENDIF
+
+         
+          CASE ( 'set_bc_bottomtop' )                   
+!--          Bottom boundary condtions for chemical species      
+             DO lsp = 1, nspec                                                      
+                IF ( ibc_cs_b == 0 ) THEN                   
+                   DO l = 0, 1 
+!--                Set index kb: For upward-facing surfaces (l=0), kb=-1, i.e.
+!--                the chem_species(nspec)%conc_p value at the topography top (k-1)
+!--                is set; for downward-facing surfaces (l=1), kb=1, i.e. the 
+!--                value at the topography bottom (k+1) is set. 
+
+                      kb = MERGE( -1, 1, l == 0 )
+                      !$OMP PARALLEL DO PRIVATE( i, j, k )
+                      DO m = 1, bc_h(l)%ns
+                         i = bc_h(l)%i(m)            
+                         j = bc_h(l)%j(m)
+                         k = bc_h(l)%k(m)
+                         chem_species(lsp)%conc_p(k+kb,j,i) = chem_species(lsp)%conc(k+kb,j,i) 
+                      ENDDO                                        
+                   ENDDO                                       
+             
+                ELSEIF ( ibc_cs_b == 1 ) THEN
+!--             in boundary_conds there is som extra loop over m here for passive tracer
+                   DO l = 0, 1
+                      kb = MERGE( -1, 1, l == 0 )
+                      !$OMP PARALLEL DO PRIVATE( i, j, k )                                           
+                      DO m = 1, bc_h(l)%ns
+                         i = bc_h(l)%i(m)            
+                         j = bc_h(l)%j(m)
+                         k = bc_h(l)%k(m)
+                         chem_species(lsp)%conc_p(k+kb,j,i) = chem_species(lsp)%conc_p(k,j,i)
+
+                      ENDDO
+                   ENDDO
+                ENDIF
+          ENDDO    ! end lsp loop  
+
+!--    Top boundary conditions for chemical species - Should this not be done for all species?
+             IF ( ibc_cs_t == 0 )  THEN                    
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(nzt+1,:,:) = chem_species(lsp)%conc(nzt+1,:,:)        
+                ENDDO
+             ELSEIF ( ibc_cs_t == 1 )  THEN
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(nzt+1,:,:) = chem_species(lsp)%conc_p(nzt,:,:)
+                ENDDO
+             ELSEIF ( ibc_cs_t == 2 )  THEN
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(nzt+1,:,:) = chem_species(lsp)%conc_p(nzt,:,:) + bc_cs_t_val(lsp) * dzu(nzt+1)
+                ENDDO
+             ENDIF
+!
+          CASE ( 'set_bc_lateral' )                       
+!--             Lateral boundary conditions for chem species at inflow boundary
+!--             are automatically set when chem_species concentration is
+!--             initialized. The initially set value at the inflow boundary is not
+!--             touched during time integration, hence, this boundary value remains
+!--             at a constant value, which is the concentration that flows into the
+!--             domain.                                                           
+!--             Lateral boundary conditions for chem species at outflow boundary 
+
+             IF ( bc_radiation_s )  THEN
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(:,nys-1,:) = chem_species(lsp)%conc_p(:,nys,:)
+                ENDDO
+             ELSEIF ( bc_radiation_n )  THEN
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(:,nyn+1,:) = chem_species(lsp)%conc_p(:,nyn,:)
+                ENDDO
+             ELSEIF ( bc_radiation_l )  THEN
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(:,:,nxl-1) = chem_species(lsp)%conc_p(:,:,nxl)
+                ENDDO
+             ELSEIF ( bc_radiation_r )  THEN
+                DO lsp = 1, nspec
+                   chem_species(lsp)%conc_p(:,:,nxr+1) = chem_species(lsp)%conc_p(:,:,nxr)
+                ENDDO
+             ENDIF
+            
+       END SELECT
+
+    END SUBROUTINE chem_boundary_conds
+
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Boundary conditions for prognostic variables in chemistry: decycling in the 
+!> x-direction
+!-----------------------------------------------------------------------------
+    SUBROUTINE chem_boundary_conds_decycle (cs_3d, cs_pr_init )
+       USE pegrid,                                                             &
+                 ONLY: myid
+
+       IMPLICIT NONE 
+       INTEGER(iwp) ::  boundary !< 
+       INTEGER(iwp) ::  ee !<
+       INTEGER(iwp) ::  copied !< 
+       INTEGER(iwp) ::  i !< 
+       INTEGER(iwp) ::  j !< 
+       INTEGER(iwp) ::  k !< 
+       INTEGER(iwp) ::  ss !< 
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  cs_pr_init
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  cs_3d
+       REAL(wp) ::  flag !< flag to mask topography grid points
+
+       flag = 0.0_wp
+
+       
+!--    Left and right boundaries
+       IF ( decycle_chem_lr  .AND.  bc_lr_cyc )  THEN
+
+          DO  boundary = 1, 2
+
+             IF ( decycle_method(boundary) == 'dirichlet' )  THEN
+!    
+!--             Initial profile is copied to ghost and first three layers          
+                ss = 1
+                ee = 0
+                IF ( boundary == 1  .AND.  nxl == 0 )  THEN
+                   ss = nxlg
+                   ee = nxl+2
+                ELSEIF ( boundary == 2  .AND.  nxr == nx )  THEN
+                   ss = nxr-2
+                   ee = nxrg
+                ENDIF
+
+                DO  i = ss, ee
+                   DO  j = nysg, nyng
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                       BTEST( wall_flags_0(k,j,i), 0 ) )
+                         cs_3d(k,j,i) = cs_pr_init(k) * flag
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+           ELSEIF ( decycle_method(boundary) == 'neumann' )  THEN
+!
+!--             The value at the boundary is copied to the ghost layers to simulate
+!--             an outlet with zero gradient
+                ss = 1
+                ee = 0
+                IF ( boundary == 1  .AND.  nxl == 0 )  THEN
+                   ss = nxlg
+                   ee = nxl-1
+                   copied = nxl
+                ELSEIF ( boundary == 2  .AND.  nxr == nx )  THEN
+                   ss = nxr+1
+                   ee = nxrg
+                   copied = nxr
+                ENDIF
+
+                 DO  i = ss, ee
+                   DO  j = nysg, nyng
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                       BTEST( wall_flags_0(k,j,i), 0 ) )
+                        cs_3d(k,j,i) = cs_3d(k,j,copied) * flag
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             ELSE
+                WRITE(message_string,*)                                           &
+                                    'unknown decycling method: decycle_method (', &
+                        boundary, ') ="' // TRIM( decycle_method(boundary) ) // '"'
+                CALL message( 'chem_boundary_conds_decycle', 'CM0431',           &
+                              1, 2, 0, 6, 0 )
+             ENDIF
+          ENDDO
+       ENDIF
+
+       
+!--    South and north boundaries
+       IF ( decycle_chem_ns  .AND.  bc_ns_cyc )  THEN
+
+          DO  boundary = 3, 4
+
+             IF ( decycle_method(boundary) == 'dirichlet' )  THEN
+!    
+!--             Initial profile is copied to ghost and first three layers          
+                ss = 1
+                ee = 0
+                IF ( boundary == 3  .AND.  nys == 0 )  THEN
+                   ss = nysg
+                   ee = nys+2
+                ELSEIF ( boundary == 4  .AND.  nyn == ny )  THEN
+                   ss = nyn-2
+                   ee = nyng
+                ENDIF
+
+                DO  i = nxlg, nxrg
+                   DO  j = ss, ee
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                       BTEST( wall_flags_0(k,j,i), 0 ) )
+                         cs_3d(k,j,i) = cs_pr_init(k) * flag
+                      ENDDO
+                   ENDDO
+                ENDDO
+       
+       
+           ELSEIF ( decycle_method(boundary) == 'neumann' )  THEN
+!
+!--             The value at the boundary is copied to the ghost layers to simulate
+!--             an outlet with zero gradient
+                ss = 1
+                ee = 0
+                IF ( boundary == 3  .AND.  nys == 0 )  THEN
+                   ss = nysg
+                   ee = nys-1
+                   copied = nys
+                ELSEIF ( boundary == 4  .AND.  nyn == ny )  THEN
+                   ss = nyn+1
+                   ee = nyng
+                   copied = nyn
+                ENDIF
+
+                 DO  i = nxlg, nxrg
+                   DO  j = ss, ee
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                       BTEST( wall_flags_0(k,j,i), 0 ) )
+                         cs_3d(k,j,i) = cs_3d(k,copied,i) * flag
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+             ELSE
+                WRITE(message_string,*)                                           &
+                                    'unknown decycling method: decycle_method (', &
+                        boundary, ') ="' // TRIM( decycle_method(boundary) ) // '"'
+                CALL message( 'chem_boundary_conds_decycle', 'CM0432',           &
+                              1, 2, 0, 6, 0 )
+             ENDIF
+          ENDDO
+       ENDIF
+    END SUBROUTINE chem_boundary_conds_decycle
+   !
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for checking data output for chemical species
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_check_data_output( var, unit, i, ilen, k )
+
+
+       USE control_parameters,                                                 &
+          ONLY: data_output, message_string
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit     !<
+       CHARACTER (LEN=*) ::  var      !<
+
+       INTEGER(iwp) :: i, lsp
+       INTEGER(iwp) :: ilen
+       INTEGER(iwp) :: k
+
+       CHARACTER(len=16)    ::  spec_name
+
+       unit = 'illegal'
+
+       spec_name = TRIM(var(4:))             !< var 1:3 is 'kc_' or 'em_'.
+
+       IF ( TRIM(var(1:3)) == 'em_' )  THEN
+          DO lsp=1,nspec
+             IF (TRIM(spec_name) == TRIM(chem_species(lsp)%name))   THEN
+                unit = 'mol m-2 s-1'
+             ENDIF
+             !-- It is possible to plant PM10 and PM25 into the gasphase chemistry code
+             !-- as passive species (e.g. 'passive' in GASPHASE_PREPROC/mechanisms):
+             !-- set unit to micrograms per m**3 for PM10 and PM25 (PM2.5)
+             IF (spec_name(1:2) == 'PM')   THEN
+                unit = 'kg m-2 s-1'
+             ENDIF
+          ENDDO
+
+       ELSE
+
+          DO lsp=1,nspec
+             IF (TRIM(spec_name) == TRIM(chem_species(lsp)%name))   THEN
+                unit = 'ppm'
+             ENDIF
+!            It is possible  to plant PM10 and PM25 into the gasphase chemistry code 
+!            as passive species (e.g. 'passive' in GASPHASE_PREPROC/mechanisms):
+!            set unit to kilograms per m**3 for PM10 and PM25 (PM2.5)
+             IF (spec_name(1:2) == 'PM')   THEN  
+               unit = 'kg m-3'
+             ENDIF
+          ENDDO
+
+          DO lsp=1,nphot
+             IF (TRIM(spec_name) == TRIM(phot_frequen(lsp)%name))   THEN
+                unit = 'sec-1'
+             ENDIF
+          ENDDO
+       ENDIF
+
+
+       RETURN
+    END SUBROUTINE chem_check_data_output
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for checking data output of profiles for chemistry model
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_check_data_output_pr( variable, var_count, unit, dopr_unit )
+
+       USE arrays_3d
+       USE control_parameters,                                                    &
+           ONLY: data_output_pr, message_string, air_chemistry
+       USE indices
+       USE profil_parameter
+       USE statistics
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit     !< 
+       CHARACTER (LEN=*) ::  variable !< 
+       CHARACTER (LEN=*) ::  dopr_unit
+       CHARACTER(len=16) ::  spec_name
+    
+       INTEGER(iwp) ::  var_count, lsp  !<
+       
+
+       spec_name = TRIM(variable(4:))    
+
+          IF (  .NOT.  air_chemistry )  THEN
+             message_string = 'data_output_pr = ' //                        &
+             TRIM( data_output_pr(var_count) ) // ' is not imp' // &
+                         'lemented for air_chemistry = .FALSE.'
+             CALL message( 'chem_check_parameters', 'CM0433', 1, 2, 0, 6, 0 )              
+
+          ELSE
+             DO lsp = 1, nspec
+                IF (TRIM( spec_name ) == TRIM( chem_species(lsp)%name ) ) THEN 
+                   cs_pr_count = cs_pr_count+1
+                   cs_pr_index(cs_pr_count) = lsp
+                   dopr_index(var_count) = pr_palm+cs_pr_count  
+                   dopr_unit  = 'ppm'
+                   IF (spec_name(1:2) == 'PM')   THEN
+                        dopr_unit = 'kg m-3'
+                   ENDIF
+                      hom(:,2, dopr_index(var_count),:) = SPREAD( zu, 2, statistic_regions+1 )
+                      unit = dopr_unit  
+                ENDIF
+             ENDDO
+          ENDIF
+
+    END SUBROUTINE chem_check_data_output_pr
+
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for chemistry_model_mod
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_check_parameters
+
+       IMPLICIT NONE
+
+       LOGICAL                        ::  found
+       INTEGER (iwp)                  ::  lsp_usr      !< running index for user defined chem spcs 
+       INTEGER (iwp)                  ::  lsp          !< running index for chem spcs.
+
+
+!!--   check for chemical reactions status
+       IF ( chem_gasphase_on )  THEN
+          message_string = 'Chemical reactions: ON'
+          CALL message( 'chem_check_parameters', 'CM0421', 0, 0, 0, 6, 0 )
+       ELSEIF ( .not. (chem_gasphase_on) ) THEN
+          message_string = 'Chemical reactions: OFF'
+          CALL message( 'chem_check_parameters', 'CM0422', 0, 0, 0, 6, 0 )
+       ENDIF
+
+!--    check for chemistry time-step
+       IF ( call_chem_at_all_substeps )  THEN
+          message_string = 'Chemistry is calculated at all meteorology time-step'
+          CALL message( 'chem_check_parameters', 'CM0423', 0, 0, 0, 6, 0 )
+       ELSEIF ( .not. (call_chem_at_all_substeps) ) THEN
+          message_string = 'Sub-time-steps are skipped for chemistry time-steps'
+          CALL message( 'chem_check_parameters', 'CM0424', 0, 0, 0, 6, 0 )
+       ENDIF
+
+!--    check for photolysis scheme 
+       IF ( (photolysis_scheme /= 'simple') .AND. (photolysis_scheme /= 'constant')  )  THEN
+          message_string = 'Incorrect photolysis scheme selected, please check spelling'
+          CALL message( 'chem_check_parameters', 'CM0425', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!--    check for  decycling of chem species
+       IF ( (.not. any(decycle_method == 'neumann') ) .AND. (.not. any(decycle_method == 'dirichlet') ) )   THEN
+          message_string = 'Incorrect boundary conditions. Only neumann or '   &
+                   // 'dirichlet &available for decycling chemical species '
+          CALL message( 'chem_check_parameters', 'CM0426', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!---------------------
+!--    chem_check_parameters is called before the array chem_species is allocated!
+!--    temporary switch of this part of the check
+       RETURN
+!---------------------
+
+!--    check for initial chem species input
+       lsp_usr = 1
+       lsp     = 1
+       DO WHILE ( cs_name (lsp_usr) /= 'novalue')
+          found = .FALSE.
+          DO lsp = 1, nvar
+             IF ( TRIM(cs_name (lsp_usr)) == TRIM(chem_species(lsp)%name) ) THEN
+                found = .TRUE.
+                EXIT
+             ENDIF 
+          ENDDO
+          IF ( .not. found ) THEN
+             message_string = 'Incorrect input for initial surface vaue: ' // TRIM(cs_name(lsp_usr))
+             CALL message( 'chem_check_parameters', 'CM0427', 0, 1, 0, 6, 0 )
+          ENDIF
+          lsp_usr = lsp_usr + 1
+       ENDDO
+
+!--    check for surface  emission flux chem species
+
+       lsp_usr = 1
+       lsp     = 1
+       DO WHILE ( surface_csflux_name (lsp_usr) /= 'novalue')
+          found = .FALSE.
+          DO lsp = 1, nvar
+             IF ( TRIM(surface_csflux_name (lsp_usr)) == TRIM(chem_species(lsp)%name) ) THEN
+                found = .TRUE.
+                EXIT
+             ENDIF 
+          ENDDO
+          IF ( .not. found ) THEN
+             message_string = 'Incorrect input of chemical species for surface emission fluxes: '  &
+                               // TRIM(surface_csflux_name(lsp_usr))
+             CALL message( 'chem_check_parameters', 'CM0428', 0, 1, 0, 6, 0 )
+          ENDIF
+          lsp_usr = lsp_usr + 1
+       ENDDO
+
+    END SUBROUTINE chem_check_parameters
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 2D output variables for chemical species
+!> @todo: Remove "mode" from argument list, not used.
+!------------------------------------------------------------------------------!
+    
+    SUBROUTINE chem_data_output_2d( av, variable, found, grid, mode, local_pf,   &
+                                     two_d, nzb_do, nzt_do, fill_value )
+    
+       USE indices
+
+       USE kinds
+
+       USE pegrid,             ONLY: myid, threads_per_task
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  grid       !<
+       CHARACTER (LEN=*) ::  mode       !< 
+       CHARACTER (LEN=*) ::  variable   !< 
+       INTEGER(iwp) ::  av              !< flag to control data output of instantaneous or time-averaged data
+       INTEGER(iwp) ::  nzb_do          !< lower limit of the domain (usually nzb)
+       INTEGER(iwp) ::  nzt_do          !< upper limit of the domain (usually nzt+1)
+       LOGICAL      ::  found           !< 
+       LOGICAL      ::  two_d           !< flag parameter that indicates 2D variables (horizontal cross sections)
+       REAL(wp)     ::  fill_value 
+       REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb:nzt+1) ::  local_pf !< 
+
+       !-- local variables.
+       CHARACTER(len=16)    ::  spec_name
+       INTEGER(iwp) ::  lsp
+       INTEGER(iwp) ::  i               !< grid index along x-direction
+       INTEGER(iwp) ::  j               !< grid index along y-direction
+       INTEGER(iwp) ::  k               !< grid index along z-direction
+       INTEGER(iwp) ::  m               !< running index surface elements
+       INTEGER(iwp) ::  char_len        !< length of a character string
+       found = .TRUE.
+       char_len  = LEN_TRIM(variable)
+
+       spec_name = TRIM( variable(4:char_len-3) )
+
+          DO lsp=1,nspec
+             IF (TRIM(spec_name) == TRIM(chem_species(lsp)%name)    .AND.                             &
+                   ( (variable(char_len-2:) == '_xy')               .OR.                              &
+                     (variable(char_len-2:) == '_xz')               .OR.                              &
+                     (variable(char_len-2:) == '_yz') ) )               THEN             
+!
+!--   todo: remove or replace by "CALL message" mechanism (kanani)
+!                    IF(myid == 0)  WRITE(6,*) 'Output of species ' // TRIM(variable)  //               &
+!                                                             TRIM(chem_species(lsp)%name)       
+                IF (av == 0) THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                              local_pf(i,j,k) = MERGE(                                                &
+                                                 chem_species(lsp)%conc(k,j,i),                       &
+                                                 REAL( fill_value, KIND = wp ),                       &
+                                                 BTEST( wall_flags_0(k,j,i), 0 ) )
+
+
+                         ENDDO
+                      ENDDO
+                   ENDDO
+              
+                ELSE
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                              local_pf(i,j,k) = MERGE(                                                &
+                                                 chem_species(lsp)%conc_av(k,j,i),                    &
+                                                 REAL( fill_value, KIND = wp ),                       &
+                                                 BTEST( wall_flags_0(k,j,i), 0 ) )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                 grid = 'zu'           
+             ENDIF
+          ENDDO
+
+          RETURN
+     
+    END SUBROUTINE chem_data_output_2d      
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables for chemical species
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_data_output_3d( av, variable, found, local_pf, fill_value, nzb_do, nzt_do )
+
+
+       USE indices
+
+       USE kinds
+
+       USE surface_mod
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*)    ::  variable     !<
+       INTEGER(iwp)         ::  av           !<
+       INTEGER(iwp) ::  nzb_do               !< lower limit of the data output (usually 0)
+       INTEGER(iwp) ::  nzt_do               !< vertical upper limit of the data output (usually nz_do3d)
+
+       LOGICAL      ::  found                !<
+
+       REAL(wp)             ::  fill_value !<
+       REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf 
+
+
+       !-- local variables
+       CHARACTER(len=16)    ::  spec_name
+       INTEGER(iwp)         ::  i, j, k
+       INTEGER(iwp)         ::  m, l    !< running indices for surfaces
+       INTEGER(iwp)         ::  lsp  !< running index for chem spcs
+
+
+       found = .FALSE.
+       IF ( .NOT. (variable(1:3) == 'kc_' .OR. variable(1:3) == 'em_' ) ) THEN
+          RETURN
+       ENDIF
+
+       spec_name = TRIM(variable(4:))
+
+       IF ( variable(1:3) == 'em_' ) THEN
+
+         local_pf = 0.0_wp
+
+         DO lsp = 1, nvar  !!! cssws - nvar species, chem_species - nspec species !!!
+            IF ( TRIM(spec_name) == TRIM(chem_species(lsp)%name) )   THEN
+               ! no average for now
+               DO m = 1, surf_usm_h%ns
+                  local_pf(surf_usm_h%i(m),surf_usm_h%j(m),surf_usm_h%k(m)) = &
+                     local_pf(surf_usm_h%i(m),surf_usm_h%j(m),surf_usm_h%k(m)) + surf_usm_h%cssws(lsp,m)
+               ENDDO
+               DO m = 1, surf_lsm_h%ns
+                  local_pf(surf_lsm_h%i(m),surf_lsm_h%j(m),surf_lsm_h%k(m)) = &
+                     local_pf(surf_lsm_h%i(m),surf_lsm_h%j(m),surf_lsm_h%k(m)) + surf_lsm_h%cssws(lsp,m)
+               ENDDO
+               DO l = 0, 3
+                  DO m = 1, surf_usm_v(l)%ns
+                     local_pf(surf_usm_v(l)%i(m),surf_usm_v(l)%j(m),surf_usm_v(l)%k(m)) = &
+                        local_pf(surf_usm_v(l)%i(m),surf_usm_v(l)%j(m),surf_usm_v(l)%k(m)) + surf_usm_v(l)%cssws(lsp,m)
+                  ENDDO
+                  DO m = 1, surf_lsm_v(l)%ns
+                     local_pf(surf_lsm_v(l)%i(m),surf_lsm_v(l)%j(m),surf_lsm_v(l)%k(m)) = &
+                        local_pf(surf_lsm_v(l)%i(m),surf_lsm_v(l)%j(m),surf_lsm_v(l)%k(m)) + surf_lsm_v(l)%cssws(lsp,m)
+                  ENDDO
+               ENDDO
+               found = .TRUE.
+            ENDIF
+         ENDDO
+       ELSE
+         DO lsp=1,nspec
+            IF (TRIM(spec_name) == TRIM(chem_species(lsp)%name))   THEN
+!
+!--   todo: remove or replace by "CALL message" mechanism (kanani)
+!              IF(myid == 0 .AND. chem_debug0 )  WRITE(6,*) 'Output of species ' // TRIM(variable)  //  &
+!                                                           TRIM(chem_species(lsp)%name)       
+               IF (av == 0) THEN
+                  DO  i = nxl, nxr
+                     DO  j = nys, nyn
+                        DO  k = nzb_do, nzt_do
+                            local_pf(i,j,k) = MERGE(                             &
+                                                chem_species(lsp)%conc(k,j,i),   &
+                                                REAL( fill_value, KIND = wp ),   &
+                                                BTEST( wall_flags_0(k,j,i), 0 ) )
+                        ENDDO
+                     ENDDO
+                  ENDDO
+
+               ELSE
+                  DO  i = nxl, nxr
+                     DO  j = nys, nyn
+                        DO  k = nzb_do, nzt_do
+                            local_pf(i,j,k) = MERGE(                             &
+                                                chem_species(lsp)%conc_av(k,j,i),&
+                                                REAL( fill_value, KIND = wp ),   &
+                                                BTEST( wall_flags_0(k,j,i), 0 ) )
+                        ENDDO
+                     ENDDO
+                  ENDDO
+               ENDIF
+               found = .TRUE.
+            ENDIF
+         ENDDO
+       ENDIF
+
+       RETURN
+
+    END SUBROUTINE chem_data_output_3d
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining mask output variables for chemical species
+!------------------------------------------------------------------------------!
+    
+    SUBROUTINE chem_data_output_mask( av, variable, found, local_pf )
+    
+       USE control_parameters
+       USE indices
+       USE kinds
+       USE pegrid,             ONLY: myid, threads_per_task
+       USE surface_mod,        ONLY: get_topography_top_index_ji
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=5) ::  grid        !< flag to distinquish between staggered grids
+
+       CHARACTER (LEN=*)::  variable    !< 
+       INTEGER(iwp)     ::  av          !< flag to control data output of instantaneous or time-averaged data
+       LOGICAL          ::  found       !< 
+       REAL(wp), DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
+                 local_pf   !< 
+
+
+       !-- local variables.
+       CHARACTER(len=16)    ::  spec_name
+       INTEGER(iwp) ::  lsp
+       INTEGER(iwp) ::  i               !< grid index along x-direction
+       INTEGER(iwp) ::  j               !< grid index along y-direction
+       INTEGER(iwp) ::  k               !< grid index along z-direction
+       INTEGER(iwp) ::  topo_top_ind    !< k index of highest horizontal surface
+
+       found = .TRUE.
+       grid  = 's'
+
+       spec_name = TRIM( variable(4:) )
+
+       DO lsp=1,nspec
+          IF (TRIM(spec_name) == TRIM(chem_species(lsp)%name) )               THEN             
+!
+!--   todo: remove or replace by "CALL message" mechanism (kanani)
+!                 IF(myid == 0 .AND. chem_debug0 )  WRITE(6,*) 'Output of species ' // TRIM(variable)  // &
+!                                                           TRIM(chem_species(lsp)%name)       
+             IF (av == 0) THEN
+                IF ( .NOT. mask_surface(mid) )  THEN
+
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2) 
+                         DO  k = 1, mask_size(mid,3) 
+                             local_pf(i,j,k) = chem_species(lsp)%conc(  &
+                                                  mask_k(mid,k),        &
+                                                  mask_j(mid,j),        &
+                                                  mask_i(mid,i)      )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+
+                ELSE
+!              
+!--                Terrain-following masked output
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+!              
+!--                      Get k index of highest horizontal surface
+                         topo_top_ind = get_topography_top_index_ji( &
+                                           mask_j(mid,j),  &
+                                           mask_i(mid,i),  &
+                                           grid                    )
+!              
+!--                      Save output array
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = chem_species(lsp)%conc( &
+                                                 MIN( topo_top_ind+mask_k(mid,k), &
+                                                      nzt+1 ),        &
+                                                 mask_j(mid,j),       &
+                                                 mask_i(mid,i)      )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+
+                ENDIF
+             ELSE
+                IF ( .NOT. mask_surface(mid) )  THEN
+
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k =  1, mask_size_l(mid,3)
+                             local_pf(i,j,k) = chem_species(lsp)%conc_av(  &
+                                                  mask_k(mid,k),           &
+                                                  mask_j(mid,j),           &
+                                                  mask_i(mid,i)         )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+
+                ELSE
+!              
+!--                Terrain-following masked output
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+!              
+!--                      Get k index of highest horizontal surface
+                         topo_top_ind = get_topography_top_index_ji( &
+                                           mask_j(mid,j),  &
+                                           mask_i(mid,i),  &
+                                           grid                    )
+!              
+!--                      Save output array
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) = chem_species(lsp)%conc_av(  &
+                                                 MIN( topo_top_ind+mask_k(mid,k), &
+                                                      nzt+1 ),            &
+                                                 mask_j(mid,j),           &
+                                                 mask_i(mid,i)         )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+
+                ENDIF
+
+
+             ENDIF
+             found = .FALSE.
+          ENDIF
+       ENDDO
+
+       RETURN
+     
+    END SUBROUTINE chem_data_output_mask      
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*), INTENT(IN)  ::  var          !<
+       LOGICAL, INTENT(OUT)           ::  found        !<
+       CHARACTER (LEN=*), INTENT(OUT) ::  grid_x       !<
+       CHARACTER (LEN=*), INTENT(OUT) ::  grid_y       !<
+       CHARACTER (LEN=*), INTENT(OUT) ::  grid_z       !<
+
+       found  = .TRUE.
+
+       IF ( var(1:3) == 'kc_' .OR. var(1:3) == 'em_' )   THEN                   !< always the same grid for chemistry variables
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'                             
+       ELSE
+          found  = .FALSE.
+          grid_x = 'none'
+          grid_y = 'none'
+          grid_z = 'none'
+       ENDIF
+
+
+    END SUBROUTINE chem_define_netcdf_grid
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining header output for chemistry model
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_header ( io )
+       
+       IMPLICIT NONE 
+ 
+       INTEGER(iwp), INTENT(IN) ::  io            !< Unit of the output file
+       INTEGER(iwp)             :: lsp            !< running index for chem spcs
+       INTEGER(iwp)             :: cs_fixed 
+       CHARACTER (LEN=80)       :: docsflux_chr
+       CHARACTER (LEN=80)       :: docsinit_chr
+
+!
+!--    Write chemistry model  header
+       WRITE( io, 1 )
+
+!--    Gasphase reaction status
+       IF ( chem_gasphase_on )  THEN 
+          WRITE( io, 2 )
+       ELSE
+          WRITE( io, 3 )
+       ENDIF
+
+!      Chemistry time-step
+       WRITE ( io, 4 ) cs_time_step
+
+!--    Emission mode info
+       IF ( mode_emis == "DEFAULT" )  THEN 
+          WRITE( io, 5 ) 
+       ELSEIF ( mode_emis == "PARAMETERIZED" )  THEN 
+          WRITE( io, 6 )
+       ELSEIF ( mode_emis == "PRE-PROCESSED" )  THEN 
+          WRITE( io, 7 )
+       ENDIF 
+
+!--    Photolysis scheme info
+       IF ( photolysis_scheme == "simple" )      THEN
+          WRITE( io, 8 ) 
+       ELSEIF (photolysis_scheme == "conastant" ) THEN
+          WRITE( io, 9 )
+       ENDIF
+ 
+ !--   Emission flux info
+       lsp = 1
+       docsflux_chr ='Chemical species for surface emission flux: ' 
+       DO WHILE ( surface_csflux_name(lsp) /= 'novalue' )
+          docsflux_chr = TRIM( docsflux_chr ) // ' ' // TRIM( surface_csflux_name(lsp) ) // ','  
+          IF ( LEN_TRIM( docsflux_chr ) >= 75 )  THEN
+           WRITE ( io, 10 )  docsflux_chr
+           docsflux_chr = '       '
+          ENDIF
+          lsp = lsp + 1
+       ENDDO
+ 
+       IF ( docsflux_chr /= '' )  THEN
+          WRITE ( io, 10 )  docsflux_chr
+       ENDIF
+
+
+!--    initializatoin of Surface and profile chemical species
+
+       lsp = 1
+       docsinit_chr ='Chemical species for initial surface and profile emissions: ' 
+       DO WHILE ( cs_name(lsp) /= 'novalue' )
+          docsinit_chr = TRIM( docsinit_chr ) // ' ' // TRIM( cs_name(lsp) ) // ','  
+          IF ( LEN_TRIM( docsinit_chr ) >= 75 )  THEN
+           WRITE ( io, 11 )  docsinit_chr
+           docsinit_chr = '       '
+          ENDIF
+          lsp = lsp + 1
+       ENDDO
+ 
+       IF ( docsinit_chr /= '' )  THEN
+          WRITE ( io, 11 )  docsinit_chr
+       ENDIF
+
+!--    number of variable and fix chemical species and number of reactions
+       cs_fixed = nspec - nvar
+       WRITE ( io, * ) '   --> Chemical species, variable: ', nvar
+       WRITE ( io, * ) '   --> Chemical species, fixed   : ', cs_fixed
+       WRITE ( io, * ) '   --> Total number of reactions : ', nreact
+
+
+1   FORMAT (//' Chemistry model information:'/                                  &
+              ' ----------------------------'/)
+2   FORMAT ('    --> Chemical reactions are turned on')
+3   FORMAT ('    --> Chemical reactions are turned off')
+4   FORMAT ('    --> Time-step for chemical species: ',F6.2, ' s')
+5   FORMAT ('    --> Emission mode = DEFAULT ')
+6   FORMAT ('    --> Emission mode = PARAMETERIZED ')
+7   FORMAT ('    --> Emission mode = PRE-PROCESSED ')
+8   FORMAT ('    --> Photolysis scheme used =  simple ')
+9   FORMAT ('    --> Photolysis scheme used =  constant ')
+10  FORMAT (/'    ',A)  
+11  FORMAT (/'    ',A) 
+!
+!
+    END SUBROUTINE chem_header
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine initializating chemistry_model_mod
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_init
+
+       USE control_parameters,                                                  &
+          ONLY: message_string, io_blocks, io_group, turbulent_inflow
+       USE arrays_3d,                                                           &
+           ONLY: mean_inflow_profiles
+       USE pegrid
+
+       IMPLICIT   none
+   !-- local variables
+       INTEGER                 :: i,j               !< running index for for horiz numerical grid points
+       INTEGER                 :: lsp               !< running index for chem spcs
+       INTEGER                 :: lpr_lev           !< running index for chem spcs profile level
+!
+!-- NOPOINTER version not implemented yet
+! #if defined( __nopointer )
+!     message_string = 'The chemistry module only runs with POINTER version'
+!     CALL message( 'chemistry_model_mod', 'CM0001', 1, 2, 0, 6, 0 )      
+! #endif
+!
+!-- Allocate memory for chemical species
+       ALLOCATE( chem_species(nspec) )
+       ALLOCATE( spec_conc_1 (nzb:nzt+1,nysg:nyng,nxlg:nxrg,nspec) )
+       ALLOCATE( spec_conc_2 (nzb:nzt+1,nysg:nyng,nxlg:nxrg,nspec) )
+       ALLOCATE( spec_conc_3 (nzb:nzt+1,nysg:nyng,nxlg:nxrg,nspec) )
+       ALLOCATE( spec_conc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nspec) ) 
+       ALLOCATE( phot_frequen(nphot) ) 
+       ALLOCATE( freq_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nphot) )
+       ALLOCATE( bc_cs_t_val(nspec) )
+!
+!-- Initialize arrays
+       spec_conc_1 (:,:,:,:) = 0.0_wp
+       spec_conc_2 (:,:,:,:) = 0.0_wp
+       spec_conc_3 (:,:,:,:) = 0.0_wp
+       spec_conc_av(:,:,:,:) = 0.0_wp
+
+
+       DO lsp = 1, nspec
+          chem_species(lsp)%name    = spc_names(lsp)
+
+          chem_species(lsp)%conc   (nzb:nzt+1,nysg:nyng,nxlg:nxrg)       => spec_conc_1 (:,:,:,lsp)
+          chem_species(lsp)%conc_p (nzb:nzt+1,nysg:nyng,nxlg:nxrg)       => spec_conc_2 (:,:,:,lsp)
+          chem_species(lsp)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg)       => spec_conc_3 (:,:,:,lsp)
+          chem_species(lsp)%conc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg)       => spec_conc_av(:,:,:,lsp)     
+
+          ALLOCATE (chem_species(lsp)%cssws_av(nysg:nyng,nxlg:nxrg))                   
+          chem_species(lsp)%cssws_av    = 0.0_wp
+!
+!--       The following block can be useful when emission module is not applied. &
+!--       if emission module is applied the following block will be overwritten.
+          ALLOCATE (chem_species(lsp)%flux_s_cs(nzb+1:nzt,0:threads_per_task-1))   
+          ALLOCATE (chem_species(lsp)%diss_s_cs(nzb+1:nzt,0:threads_per_task-1))   
+          ALLOCATE (chem_species(lsp)%flux_l_cs(nzb+1:nzt,nys:nyn,0:threads_per_task-1)) 
+          ALLOCATE (chem_species(lsp)%diss_l_cs(nzb+1:nzt,nys:nyn,0:threads_per_task-1))   
+          chem_species(lsp)%flux_s_cs = 0.0_wp                                     
+          chem_species(lsp)%flux_l_cs = 0.0_wp                                     
+          chem_species(lsp)%diss_s_cs = 0.0_wp                                      
+          chem_species(lsp)%diss_l_cs = 0.0_wp                                     
+!
+!--   Allocate memory for initial concentration profiles
+!--   (concentration values come from namelist)
+!--   (@todo (FK): Because of this, chem_init is called in palm before
+!--               check_parameters, since conc_pr_init is used there.
+!--               We have to find another solution since chem_init should
+!--               eventually be called from init_3d_model!!)
+          ALLOCATE ( chem_species(lsp)%conc_pr_init(0:nz+1) )
+          chem_species(lsp)%conc_pr_init(:) = 0.0_wp
+
+       ENDDO
+
+!
+!--    Initial concentration of profiles is prescribed by parameters cs_profile
+!--    and cs_heights in the namelist &chemistry_parameters
+       CALL chem_init_profiles      
+            
+            
+!
+!-- Initialize model variables
+
+
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+            TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+
+
+!--    First model run of a possible job queue.
+!--    Initial profiles of the variables must be computed.
+          IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+            CALL location_message( 'initializing with 1D chemistry model profiles', .FALSE. )
+!
+!--        Transfer initial profiles to the arrays of the 3D model
+             DO lsp = 1, nspec
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO lpr_lev = 1, nz + 1
+                         chem_species(lsp)%conc(lpr_lev,j,i) = chem_species(lsp)%conc_pr_init(lpr_lev)
+                      ENDDO
+                   ENDDO
+                ENDDO   
+             ENDDO
+          
+          ELSEIF ( INDEX(initializing_actions, 'set_constant_profiles') /= 0 )    &
+          THEN
+             CALL location_message( 'initializing with constant chemistry profiles', .FALSE. )
+
+             DO lsp = 1, nspec 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      chem_species(lsp)%conc(:,j,i) = chem_species(lsp)%conc_pr_init    
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+!
+!--       If required, change the surface chem spcs at the start of the 3D run
+          IF ( cs_surface_initial_change(1) /= 0.0_wp ) THEN            
+             DO lsp = 1, nspec 
+                chem_species(lsp)%conc(nzb,:,:) = chem_species(lsp)%conc(nzb,:,:) +  &
+                                                  cs_surface_initial_change(lsp)
+             ENDDO
+          ENDIF 
+!
+!--      Initiale old and new time levels. 
+          DO lsp = 1, nvar
+             chem_species(lsp)%tconc_m = 0.0_wp                      
+             chem_species(lsp)%conc_p  = chem_species(lsp)%conc     
+          ENDDO
+
+       ENDIF
+
+
+
+!---   new code add above this line
+       DO lsp = 1, nphot
+          phot_frequen(lsp)%name = phot_names(lsp)
+!
+!--   todo: remove or replace by "CALL message" mechanism (kanani)
+!         IF( myid == 0 )  THEN
+!            WRITE(6,'(a,i4,3x,a)')  'Photolysis: ',lsp,trim(phot_names(lsp))
+!         ENDIF 
+             phot_frequen(lsp)%freq(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => freq_1(:,:,:,lsp)
+       ENDDO
+
+       RETURN
+
+ END SUBROUTINE chem_init
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining initial vertical profiles of chemical species (given by
+!> namelist parameters chem_profiles and chem_heights)  --> which should work
+!> analogue to parameters u_profile, v_profile and uv_heights)
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_init_profiles              !< SUBROUTINE is called from chem_init in case of 
+                                               !< TRIM( initializing_actions ) /= 'read_restart_data'
+                                               !< We still need to see what has to be done in case of restart run
+       USE chem_modules
+
+       IMPLICIT NONE
+
+   !-- Local variables
+       INTEGER ::  lsp        !< running index for number of species in derived data type species_def
+       INTEGER ::  lsp_usr     !< running index for number of species (user defined)  in cs_names, cs_profiles etc
+       INTEGER ::  lpr_lev    !< running index for profile level for each chem spcs. 
+       INTEGER ::  npr_lev    !< the next available profile lev
+
+!-----------------
+!-- Parameter "cs_profile" and "cs_heights" are used to prescribe user defined initial profiles
+!-- and heights. If parameter "cs_profile" is not prescribed then initial surface values
+!-- "cs_surface" are used as constant initial profiles for each species. If "cs_profile" and
+!-- "cs_heights" are prescribed, their values will!override the constant profile given by
+!-- "cs_surface".
+! 
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN 
+          lsp_usr = 1
+          DO  WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' )   !'novalue' is the default
+             DO  lsp = 1, nspec                                !
+!--             create initial profile (conc_pr_init) for each chemical species
+                IF ( TRIM( chem_species(lsp)%name ) == TRIM( cs_name(lsp_usr) ) )  THEN   !
+                   IF ( cs_profile(lsp_usr,1) == 9999999.9_wp ) THEN
+!--                set a vertically constant profile based on the surface conc (cs_surface(lsp_usr)) of each species
+                      DO lpr_lev = 0, nzt+1
+                         chem_species(lsp)%conc_pr_init(lpr_lev) = cs_surface(lsp_usr)
+                      ENDDO
+                   ELSE
+                      IF ( cs_heights(1,1) /= 0.0_wp )  THEN
+                         message_string = 'The surface value of cs_heights must be 0.0'
+                         CALL message( 'chem_check_parameters', 'CM0434', 1, 2, 0, 6, 0 )
+                      ENDIF
+     
+                      use_prescribed_profile_data = .TRUE.
+    
+                      npr_lev = 1
+!                     chem_species(lsp)%conc_pr_init(0) = 0.0_wp
+                      DO  lpr_lev = 1, nz+1
+                         IF ( npr_lev < 100 )  THEN
+                            DO  WHILE ( cs_heights(lsp_usr, npr_lev+1) <= zu(lpr_lev) )
+                               npr_lev = npr_lev + 1
+                               IF ( npr_lev == 100 )  THEN
+                                   message_string = 'number of chem spcs exceeding the limit'
+                                   CALL message( 'chem_check_parameters', 'CM0435', 1, 2, 0, 6, 0 )               
+                                   EXIT
+                               ENDIF
+                            ENDDO
+                         ENDIF
+                         IF ( npr_lev < 100  .AND.  cs_heights(lsp_usr, npr_lev + 1) /= 9999999.9_wp )  THEN
+                            chem_species(lsp)%conc_pr_init(lpr_lev) = cs_profile(lsp_usr, npr_lev) +                          &
+                                                    ( zu(lpr_lev) - cs_heights(lsp_usr, npr_lev) ) /                          &
+                                                    ( cs_heights(lsp_usr, (npr_lev + 1)) - cs_heights(lsp_usr, npr_lev ) ) *  &
+                                                    ( cs_profile(lsp_usr, (npr_lev + 1)) - cs_profile(lsp_usr, npr_lev ) )
+                         ELSE
+                               chem_species(lsp)%conc_pr_init(lpr_lev) = cs_profile(lsp_usr, npr_lev)
+                         ENDIF
+                      ENDDO
+                   ENDIF
+!-- If a profile is prescribed explicity using cs_profiles and cs_heights, then  
+!-- chem_species(lsp)%conc_pr_init is populated with the specific "lsp" based
+!-- on the cs_profiles(lsp_usr,:)  and cs_heights(lsp_usr,:). 
+                ENDIF
+             ENDDO
+             lsp_usr = lsp_usr + 1
+          ENDDO
+       ENDIF
+
+    END SUBROUTINE chem_init_profiles
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine to integrate chemical species in the given chemical mechanism
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_integrate_ij (i, j)
+
+       USE cpulog,                                                              &
+          ONLY: cpu_log, log_point
+       USE statistics,                                                          &
+          ONLY:  weight_pres
+        USE control_parameters,                                                 &
+          ONLY:  dt_3d, intermediate_timestep_count,simulated_time
+
+       IMPLICIT   none
+       INTEGER,INTENT(IN)       :: i,j
+
+ !--   local variables
+       INTEGER(iwp) ::  lsp                                                     !< running index for chem spcs.
+       INTEGER(iwp) ::  lph                                                     !< running index for photolysis frequencies
+       INTEGER                  :: k,m,istatf
+       INTEGER,DIMENSION(20)    :: istatus
+       REAL(kind=wp),DIMENSION(nzb+1:nzt,nspec)                :: tmp_conc
+       REAL(kind=wp),DIMENSION(nzb+1:nzt)                      :: tmp_temp
+       REAL(kind=wp),DIMENSION(nzb+1:nzt)                      :: tmp_qvap
+       REAL(kind=wp),DIMENSION(nzb+1:nzt,nphot)                :: tmp_phot
+       REAL(kind=wp),DIMENSION(nzb+1:nzt)                      :: tmp_fact
+       REAL(kind=wp),DIMENSION(nzb+1:nzt)                      :: tmp_fact_i    !< conversion factor between 
+                                                                                !<    molecules cm^{-3} and ppm
+
+       INTEGER,DIMENSION(nzb+1:nzt)                            :: nacc          !< Number of accepted steps
+       INTEGER,DIMENSION(nzb+1:nzt)                            :: nrej          !< Number of rejected steps
+
+       REAL(wp)                         ::  conv                                !< conversion factor
+       REAL(wp), PARAMETER              ::  ppm2fr  = 1.0e-6_wp                 !< Conversion factor ppm to fraction
+       REAL(wp), PARAMETER              ::  xm_air  = 28.96_wp                  !< Mole mass of dry air
+       REAL(wp), PARAMETER              ::  xm_h2o  = 18.01528_wp               !< Mole mass of water vapor
+       REAL(wp), PARAMETER              ::  pref_i  = 1._wp / 100000.0_wp       !< inverse reference pressure (1/Pa)
+       REAL(wp), PARAMETER              ::  t_std   = 273.15_wp                 !< standard pressure (Pa)
+       REAL(wp), PARAMETER              ::  p_std   = 101325.0_wp               !< standard pressure (Pa)
+       REAL(wp), PARAMETER              ::  vmolcm  = 22.414e3_wp               !< Mole volume (22.414 l) in cm^{-3}
+       REAL(wp), PARAMETER              ::  xna     = 6.022e23_wp               !< Avogadro number (molecules/mol)
+
+       REAL(wp),DIMENSION(size(rcntrl)) :: rcntrl_local
+
+
+       REAL(kind=wp)  :: dt_chem                                             
+
+       CALL cpu_log( log_point(80), '[chem_integrate_ij]', 'start' )
+!<     set chem_gasphase_on to .FALSE. if you want to skip computation of gas phase chemistry
+       IF (chem_gasphase_on) THEN
+          nacc = 0
+          nrej = 0
+
+       tmp_temp(:) = pt(nzb+1:nzt,j,i) * exner(nzb+1:nzt)
+!         ppm to molecules/cm**3
+!         tmp_fact = 1.e-6_wp*6.022e23_wp/(22.414_wp*1000._wp) * 273.15_wp * hyp(nzb+1:nzt)/( 101300.0_wp * tmp_temp )  
+          conv = ppm2fr * xna / vmolcm
+          tmp_fact(:) = conv * t_std * hyp(nzb+1:nzt) / (tmp_temp(:) * p_std)
+          tmp_fact_i = 1.0_wp/tmp_fact
+
+          IF ( humidity ) THEN
+             IF ( bulk_cloud_model )  THEN
+                tmp_qvap(:) = ( q(nzb+1:nzt,j,i) - ql(nzb+1:nzt,j,i) ) * xm_air/xm_h2o * tmp_fact(:)
+             ELSE
+                tmp_qvap(:) = q(nzb+1:nzt,j,i) * xm_air/xm_h2o * tmp_fact(:)
+             ENDIF
+          ELSE
+             tmp_qvap(:) = 0.01 * tmp_fact(:)                          !< Constant value for q if water vapor is not computed
+          ENDIF
+
+          DO lsp = 1,nspec
+             tmp_conc(:,lsp) = chem_species(lsp)%conc(nzb+1:nzt,j,i) * tmp_fact(:) 
+          ENDDO
+
+          DO lph = 1,nphot
+             tmp_phot(:,lph) = phot_frequen(lph)%freq(nzb+1:nzt,j,i)               
+          ENDDO
+!
+!--   todo: remove (kanani)
+!           IF(myid == 0 .AND. chem_debug0 ) THEN
+!              IF (i == 10 .and. j == 10) WRITE(0,*) 'begin chemics step ',dt_3d
+!           ENDIF
+
+!--       Compute length of time step
+          IF ( call_chem_at_all_substeps )  THEN
+             dt_chem = dt_3d * weight_pres(intermediate_timestep_count)
+          ELSE
+             dt_chem = dt_3d
+          ENDIF
+
+          cs_time_step = dt_chem
+
+          CALL cpu_log( log_point(81), '{chem_gasphase_integrate}', 'start' )
+
+          IF(maxval(rcntrl) > 0.0)   THEN    ! Only if rcntrl is set
+             IF( simulated_time <= 2*dt_3d)  THEN
+                 rcntrl_local = 0
+!
+!--   todo: remove (kanani)
+!                  WRITE(9,'(a,2f10.3)') 'USE Default rcntrl in the first steps ',simulated_time,dt_3d
+             ELSE
+                 rcntrl_local = rcntrl
+             ENDIF
+          ELSE
+             rcntrl_local = 0
+          END IF
+
+          CALL chem_gasphase_integrate (dt_chem, tmp_conc, tmp_temp, tmp_qvap, tmp_fact, tmp_phot, &
+                             icntrl_i = icntrl, rcntrl_i = rcntrl_local, xnacc = nacc, xnrej = nrej, istatus=istatus)
+
+          CALL cpu_log( log_point(81), '{chem_gasphase_integrate}', 'stop' )
+
+          DO lsp = 1,nspec
+             chem_species(lsp)%conc (nzb+1:nzt,j,i) = tmp_conc(:,lsp) * tmp_fact_i(:)
+          ENDDO
+
+
+       ENDIF
+          CALL cpu_log( log_point(80), '[chem_integrate_ij]', 'stop' )
+
+       RETURN
+    END SUBROUTINE chem_integrate_ij
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining parin for &chemistry_parameters for chemistry model
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_parin
+   
+       USE chem_modules
+       USE control_parameters
+      
+       USE kinds
+       USE pegrid
+       USE statistics
+           
+       IMPLICIT   NONE
+
+       CHARACTER (LEN=80) ::  line                        !< dummy string that contains the current line of the parameter file
+       CHARACTER (LEN=3)  ::  cs_prefix 
+
+       REAL(wp), DIMENSION(nmaxfixsteps) ::   my_steps    !< List of fixed timesteps   my_step(1) = 0.0 automatic stepping
+       INTEGER(iwp) ::  i                                 !< 
+       INTEGER(iwp) ::  j                                 !< 
+       INTEGER(iwp) ::  max_pr_cs_tmp                     !< 
+
+
+       NAMELIST /chemistry_parameters/  bc_cs_b,                          &
+                                        bc_cs_t,                          &
+                                        call_chem_at_all_substeps,        &
+                                        chem_debug0,                      &
+                                        chem_debug1,                      &
+                                        chem_debug2,                      &
+                                        chem_gasphase_on,                 &
+                                        cs_heights,                       &
+                                        cs_name,                          &
+                                        cs_profile,                       &
+                                        cs_surface,                       &
+                                        decycle_chem_lr,                  &
+                                        decycle_chem_ns,                  &            
+                                        decycle_method,                   &
+                                        do_depo,                          &
+                                        emiss_factor_main,                &
+                                        emiss_factor_side,                &                      
+                                        icntrl,                           &
+                                        main_street_id,                   &
+                                        max_street_id,                    &
+                                        my_steps,                         &
+                                        nest_chemistry,                   &
+                                        rcntrl,                           &
+                                        side_street_id,                   &
+                                        photolysis_scheme,                &
+                                        wall_csflux,                      &
+                                        cs_vertical_gradient,             &
+                                        top_csflux,                       & 
+                                        surface_csflux,                   &
+                                        surface_csflux_name,              &
+                                        cs_surface_initial_change,        &
+                                        cs_vertical_gradient_level,       &
+!                                       namelist parameters for emissions
+                                        mode_emis,                        &
+                                        time_fac_type,                    &
+                                        daytype_mdh,                      &
+                                        do_emis                              
+                             
+!-- analogue to chem_names(nspj) we could invent chem_surfaceflux(nspj) and chem_topflux(nspj)
+!-- so this way we could prescribe a specific flux value for each species
+!>  chemistry_parameters for initial profiles
+!>  cs_names = 'O3', 'NO2', 'NO', ...   to set initial profiles)
+!>  cs_heights(1,:) = 0.0, 100.0, 500.0, 2000.0, .... (height levels where concs will be prescribed for O3)
+!>  cs_heights(2,:) = 0.0, 200.0, 400.0, 1000.0, .... (same for NO2 etc.) 
+!>  cs_profiles(1,:) = 10.0, 20.0, 20.0, 30.0, .....  (chem spcs conc at height lvls chem_heights(1,:)) etc.
+!>  If the respective concentration profile should be constant with height, then use "cs_surface( number of spcs)"
+!>  then write these cs_surface values to chem_species(lsp)%conc_pr_init(:)
+
+!
+!--   Read chem namelist   
+
+       INTEGER             :: ier
+       CHARACTER(LEN=64)   :: text
+       CHARACTER(LEN=8)    :: solver_type
+
+       icntrl    = 0
+       rcntrl    = 0.0_wp
+       my_steps  = 0.0_wp
+       photolysis_scheme = 'simple'
+       atol = 1.0_wp
+       rtol = 0.01_wp
+ !
+ !--   Try to find chemistry package
+       REWIND ( 11 )
+       line = ' '
+       DO   WHILE ( INDEX( line, '&chemistry_parameters' ) == 0 )
+          READ ( 11, '(A)', END=20 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+ !
+ !--   Read chemistry namelist
+       READ ( 11, chemistry_parameters, ERR = 10, END = 20 )      
+ !
+ !--   Enable chemistry model
+       air_chemistry = .TRUE.                    
+       GOTO 20
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'chemistry_parameters', line )
+
+ 20    CONTINUE
+
+!
+!--    check for  emission mode for chem species
+       IF ( (mode_emis /= 'PARAMETERIZED')  .AND. ( mode_emis /= 'DEFAULT') .AND. (mode_emis /= 'PRE-PROCESSED'  ) )   THEN
+            message_string = 'Incorrect mode_emiss  option select. Please check spelling'
+            CALL message( 'chem_check_parameters', 'CM0436', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       t_steps = my_steps          
+                                   
+!--    Determine the number of user-defined profiles and append them to the
+!--    standard data output (data_output_pr)
+       max_pr_cs_tmp = 0 
+       i = 1
+
+       DO  WHILE ( data_output_pr(i)  /= ' '  .AND.  i <= 100 )
+          IF ( TRIM( data_output_pr(i)(1:3)) == 'kc_' ) THEN
+             max_pr_cs_tmp = max_pr_cs_tmp+1
+          ENDIF
+          i = i +1
+       ENDDO
+
+       IF ( max_pr_cs_tmp > 0 ) THEN
+          cs_pr_namelist_found = .TRUE.
+          max_pr_cs = max_pr_cs_tmp
+       ENDIF
+
+!      Set Solver Type
+       IF(icntrl(3) == 0)   THEN
+          solver_type = 'rodas3'           !Default
+       ELSE IF(icntrl(3) == 1)   THEN
+          solver_type = 'ros2'
+       ELSE IF(icntrl(3) == 2)   THEN
+          solver_type = 'ros3'
+       ELSE IF(icntrl(3) == 3)   THEN
+          solver_type = 'ro4'
+       ELSE IF(icntrl(3) == 4)   THEN
+          solver_type = 'rodas3'
+       ELSE IF(icntrl(3) == 5)   THEN
+          solver_type = 'rodas4'
+       ELSE IF(icntrl(3) == 6)   THEN
+          solver_type = 'Rang3'
+       ELSE
+           message_string = 'illegal solver type'
+           CALL message( 'chem_parin', 'PA0506', 1, 2, 0, 6, 0 )
+       END IF
+
+!
+!--   todo: remove or replace by "CALL message" mechanism (kanani)
+!       write(text,*) 'gas_phase chemistry: solver_type = ',trim(solver_type)
+!kk    Has to be changed to right calling sequence
+!kk       CALL location_message( trim(text), .FALSE. )
+!        IF(myid == 0)   THEN
+!           write(9,*) ' '
+!           write(9,*) 'kpp setup '
+!           write(9,*) ' '
+!           write(9,*) '    gas_phase chemistry: solver_type = ',trim(solver_type)
+!           write(9,*) ' '
+!           write(9,*) '    Hstart  = ',rcntrl(3)
+!           write(9,*) '    FacMin  = ',rcntrl(4)
+!           write(9,*) '    FacMax  = ',rcntrl(5)
+!           write(9,*) ' '
+!           IF(vl_dim > 1)    THEN
+!              write(9,*) '    Vector mode                   vektor length = ',vl_dim
+!           ELSE
+!              write(9,*) '    Scalar mode'
+!           ENDIF
+!           write(9,*) ' '
+!        END IF
+
+       RETURN
+
+    END SUBROUTINE chem_parin
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine calculating prognostic equations for chemical species 
+!> (vector-optimized).
+!> Routine is called separately for each chemical species over a loop from
+!> prognostic_equations.
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_prognostic_equations ( cs_scalar_p, cs_scalar, tcs_scalar_m,  &
+                                           pr_init_cs, ilsp )
+
+       USE advec_s_pw_mod,                                                        &
+           ONLY:  advec_s_pw
+       USE advec_s_up_mod,                                                        &
+           ONLY:  advec_s_up
+       USE advec_ws,                                                              &
+           ONLY:  advec_s_ws 
+       USE diffusion_s_mod,                                                       &
+           ONLY:  diffusion_s
+       USE indices,                                                               &
+           ONLY:  nxl, nxr, nyn, nys, wall_flags_0
+       USE pegrid
+       USE surface_mod,                                                           &
+           ONLY:  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,     &
+                  surf_usm_v
+
+       IMPLICIT NONE
+
+       INTEGER ::  i   !< running index
+       INTEGER ::  j   !< running index
+       INTEGER ::  k   !< running index
+
+       INTEGER(iwp),INTENT(IN) ::  ilsp          !<
+
+       REAL(wp), DIMENSION(0:nz+1) ::  pr_init_cs   !<
+
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  cs_scalar      !<
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  cs_scalar_p    !<
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  tcs_scalar_m   !<
+
+
+   !
+   !-- Tendency terms for chemical species
+       tend = 0.0_wp
+   !    
+   !-- Advection terms
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( ws_scheme_sca )  THEN
+             CALL advec_s_ws( cs_scalar, 'kc' )
+          ELSE
+             CALL advec_s_pw( cs_scalar )
+          ENDIF
+       ELSE
+            CALL advec_s_up( cs_scalar )
+       ENDIF
+   !
+   !-- Diffusion terms  (the last three arguments are zero)
+       CALL diffusion_s( cs_scalar,                                               &
+                         surf_def_h(0)%cssws(ilsp,:),                             &
+                         surf_def_h(1)%cssws(ilsp,:),                             &
+                         surf_def_h(2)%cssws(ilsp,:),                             &
+                         surf_lsm_h%cssws(ilsp,:),                                &
+                         surf_usm_h%cssws(ilsp,:),                                &
+                         surf_def_v(0)%cssws(ilsp,:),                             &
+                         surf_def_v(1)%cssws(ilsp,:),                             &
+                         surf_def_v(2)%cssws(ilsp,:),                             &
+                         surf_def_v(3)%cssws(ilsp,:),                             &
+                         surf_lsm_v(0)%cssws(ilsp,:),                             &
+                         surf_lsm_v(1)%cssws(ilsp,:),                             &
+                         surf_lsm_v(2)%cssws(ilsp,:),                             &
+                         surf_lsm_v(3)%cssws(ilsp,:),                             &
+                         surf_usm_v(0)%cssws(ilsp,:),                             &
+                         surf_usm_v(1)%cssws(ilsp,:),                             &
+                         surf_usm_v(2)%cssws(ilsp,:),                             &
+                         surf_usm_v(3)%cssws(ilsp,:) )
+   !    
+   !-- Prognostic equation for chemical species
+       DO  i = nxl, nxr
+          DO  j = nys, nyn    
+             DO  k = nzb+1, nzt
+                cs_scalar_p(k,j,i) =   cs_scalar(k,j,i)                           &
+                                     + ( dt_3d  *                                 &
+                                         (   tsc(2) * tend(k,j,i)                 &
+                                           + tsc(3) * tcs_scalar_m(k,j,i)         &
+                                         )                                        & 
+                                       - tsc(5) * rdf_sc(k)                       &
+                                                * ( cs_scalar(k,j,i) - pr_init_cs(k) )    &   
+                                       )                                          &
+                                       * MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )       
+
+                IF ( cs_scalar_p(k,j,i) < 0.0_wp )  cs_scalar_p(k,j,i) = 0.1_wp * cs_scalar(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+   !
+   !-- Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn   
+                   DO  k = nzb+1, nzt
+                      tcs_scalar_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+             intermediate_timestep_count_max )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tcs_scalar_m(k,j,i) = - 9.5625_wp * tend(k,j,i)             &
+                                            + 5.3125_wp * tcs_scalar_m(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+    END SUBROUTINE chem_prognostic_equations
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine calculating prognostic equations for chemical species 
+!> (cache-optimized).
+!> Routine is called separately for each chemical species over a loop from
+!> prognostic_equations.
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_prognostic_equations_ij ( cs_scalar_p, cs_scalar, tcs_scalar_m, pr_init_cs,    &
+                               i, j, i_omp_start, tn, ilsp, flux_s_cs, diss_s_cs,                  &
+                               flux_l_cs, diss_l_cs )
+       USE pegrid         
+       USE advec_ws,        ONLY:  advec_s_ws 
+       USE advec_s_pw_mod,  ONLY:  advec_s_pw
+       USE advec_s_up_mod,  ONLY:  advec_s_up
+       USE diffusion_s_mod, ONLY:  diffusion_s
+       USE indices,         ONLY:  wall_flags_0
+       USE surface_mod,     ONLY:  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,     &
+                                   surf_usm_v
+
+
+       IMPLICIT NONE
+
+       REAL(wp), DIMENSION(:,:,:), POINTER   :: cs_scalar_p, cs_scalar, tcs_scalar_m
+
+       INTEGER(iwp),INTENT(IN) :: i, j, i_omp_start, tn, ilsp
+       REAL(wp), DIMENSION(nzb+1:nzt,0:threads_per_task-1)         :: flux_s_cs   !<
+       REAL(wp), DIMENSION(nzb+1:nzt,0:threads_per_task-1)         :: diss_s_cs   !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn,0:threads_per_task-1) :: flux_l_cs   !<
+       REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn,0:threads_per_task-1) :: diss_l_cs   !<
+       REAL(wp), DIMENSION(0:nz+1)                                 :: pr_init_cs  !<
+
+!-- local variables
+
+       INTEGER :: k
+!
+!--    Tendency-terms for chem spcs.
+       tend(:,j,i) = 0.0_wp
+!    
+!-- Advection terms
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( ws_scheme_sca )  THEN
+             CALL advec_s_ws( i, j, cs_scalar, 'kc', flux_s_cs, diss_s_cs,                &
+                flux_l_cs, diss_l_cs, i_omp_start, tn )
+          ELSE
+             CALL advec_s_pw( i, j, cs_scalar )
+          ENDIF
+       ELSE
+            CALL advec_s_up( i, j, cs_scalar )
+       ENDIF
+
+!
+
+!-- Diffusion terms (the last three arguments are zero)
+
+         CALL diffusion_s( i, j, cs_scalar,                                                 &
+                           surf_def_h(0)%cssws(ilsp,:), surf_def_h(1)%cssws(ilsp,:),        &
+                           surf_def_h(2)%cssws(ilsp,:),                                     &
+                           surf_lsm_h%cssws(ilsp,:), surf_usm_h%cssws(ilsp,:),              &
+                           surf_def_v(0)%cssws(ilsp,:), surf_def_v(1)%cssws(ilsp,:),        &
+                           surf_def_v(2)%cssws(ilsp,:), surf_def_v(3)%cssws(ilsp,:),        &
+                           surf_lsm_v(0)%cssws(ilsp,:), surf_lsm_v(1)%cssws(ilsp,:),        &
+                           surf_lsm_v(2)%cssws(ilsp,:), surf_lsm_v(3)%cssws(ilsp,:),        &
+                           surf_usm_v(0)%cssws(ilsp,:), surf_usm_v(1)%cssws(ilsp,:),        &
+                           surf_usm_v(2)%cssws(ilsp,:), surf_usm_v(3)%cssws(ilsp,:) )
+    
+!    
+!-- Prognostic equation for chem spcs
+       DO k = nzb+1, nzt
+          cs_scalar_p(k,j,i) = cs_scalar(k,j,i) + ( dt_3d  *                       &
+                                                  ( tsc(2) * tend(k,j,i) +         &
+                                                    tsc(3) * tcs_scalar_m(k,j,i) ) & 
+                                                  - tsc(5) * rdf_sc(k)             &
+                                                           * ( cs_scalar(k,j,i) - pr_init_cs(k) )    &   
+                                                  )                                                  &
+                                                           * MERGE( 1.0_wp, 0.0_wp,                  &      
+                                                                   BTEST( wall_flags_0(k,j,i), 0 )   &             
+                                                                    )       
+
+          IF ( cs_scalar_p(k,j,i) < 0.0_wp )  cs_scalar_p(k,j,i) = 0.1_wp * cs_scalar(k,j,i)    !FKS6
+       ENDDO
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  k = nzb+1, nzt
+                tcs_scalar_m(k,j,i) = tend(k,j,i)
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+             intermediate_timestep_count_max )  THEN
+             DO  k = nzb+1, nzt
+                tcs_scalar_m(k,j,i) = -9.5625_wp * tend(k,j,i) + &
+                   5.3125_wp * tcs_scalar_m(k,j,i)
+             ENDDO
+          ENDIF
+       ENDIF
+
+    END SUBROUTINE chem_prognostic_equations_ij
+
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine to read restart data of chemical species
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,         &
+                               nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,  &
+                               nys_on_file, tmp_3d, found )    
+                                        
+       USE control_parameters
+               
+       USE indices
+       
+       USE pegrid
+
+       IMPLICIT NONE 
+
+       CHARACTER (LEN=20) :: spc_name_av !<   
+          
+       INTEGER(iwp) ::  i, lsp          !< 
+       INTEGER(iwp) ::  k               !< 
+       INTEGER(iwp) ::  nxlc            !< 
+       INTEGER(iwp) ::  nxlf            !< 
+       INTEGER(iwp) ::  nxl_on_file     !<   
+       INTEGER(iwp) ::  nxrc            !< 
+       INTEGER(iwp) ::  nxrf            !< 
+       INTEGER(iwp) ::  nxr_on_file     !<   
+       INTEGER(iwp) ::  nync            !< 
+       INTEGER(iwp) ::  nynf            !< 
+       INTEGER(iwp) ::  nyn_on_file     !<   
+       INTEGER(iwp) ::  nysc            !< 
+       INTEGER(iwp) ::  nysf            !< 
+       INTEGER(iwp) ::  nys_on_file     !<   
+       
+       LOGICAL, INTENT(OUT)  :: found 
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !< 3D array to temp store data
+
+
+       found = .FALSE.  
+
+
+          IF ( ALLOCATED(chem_species) )  THEN
+
+             DO  lsp = 1, nspec
+
+                 !< for time-averaged chemical conc.
+                spc_name_av  =  TRIM(chem_species(lsp)%name)//'_av'
+
+                IF (restart_string(1:length) == TRIM(chem_species(lsp)%name) )    &
+                THEN
+                   !< read data into tmp_3d
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d  
+                   !< fill ..%conc in the restart run    
+                   chem_species(lsp)%conc(:,nysc-nbgp:nync+nbgp,                  &
+                                          nxlc-nbgp:nxrc+nbgp) =                  & 
+                   tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                   found = .TRUE.
+                ELSEIF (restart_string(1:length) == spc_name_av )  THEN
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   chem_species(lsp)%conc_av(:,nysc-nbgp:nync+nbgp,               &
+                                             nxlc-nbgp:nxrc+nbgp) =               &
+                   tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                   found = .TRUE.
+                ENDIF
+
+             ENDDO
+
+          ENDIF
+
+
+    END SUBROUTINE chem_rrd_local
+!
+!-------------------------------------------------------------------------------!
+!> Description:
+!> Calculation of horizontally averaged profiles
+!> This routine is called for every statistic region (sr) defined by the user,
+!> but at least for the region "total domain" (sr=0).
+!> quantities.
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_statistics( mode, sr, tn )
+
+
+       USE arrays_3d
+       USE indices
+       USE kinds
+       USE pegrid
+       USE statistics
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode   !< 
+
+    INTEGER(iwp) :: i    !< running index on x-axis
+    INTEGER(iwp) :: j    !< running index on y-axis
+    INTEGER(iwp) :: k    !< vertical index counter
+    INTEGER(iwp) :: sr   !< statistical region
+    INTEGER(iwp) :: tn   !< thread number 
+    INTEGER(iwp) :: n    !<
+    INTEGER(iwp) :: m    !<
+    INTEGER(iwp) :: lpr  !< running index chem spcs
+!    REAL(wp),                                                                                      &
+!    DIMENSION(dots_num_palm+1:dots_max) ::                                                         &
+!          ts_value_l   !< 
+
+    IF ( mode == 'profiles' )  THEN
+!
+!--    Sample on how to calculate horizontally averaged profiles of user-
+!--    defined quantities. Each quantity is identified by the index
+!--    "pr_palm+#" where "#" is an integer starting from 1. These
+!--    user-profile-numbers must also be assigned to the respective strings
+!--    given by data_output_pr_cs in routine user_check_data_output_pr.
+!--    hom(:,:,:,:) =  dim-1 = vertical level, dim-2= 1: met-species,2:zu/zw, dim-3 = quantity( e.g.
+!                       w*pt*), dim-4 = statistical region.
+
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+              DO  k = nzb, nzt+1
+                DO lpr = 1, cs_pr_count
+
+                   sums_l(k,pr_palm+max_pr_user+lpr,tn) = sums_l(k,pr_palm+max_pr_user+lpr,tn) +    &
+                                                 chem_species(cs_pr_index(lpr))%conc(k,j,i) *       &
+                                                 rmask(j,i,sr)  *                                   &
+                                                 MERGE( 1.0_wp, 0.0_wp,                             &
+                                                 BTEST( wall_flags_0(k,j,i), 22 ) )
+                ENDDO                                                                          
+             ENDDO
+          ENDDO
+       ENDDO
+    ELSEIF ( mode == 'time_series' )  THEN
+       CALL location_message( 'Time series not calculated for chemistry', .TRUE. )
+    ENDIF
+
+    END SUBROUTINE chem_statistics
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for swapping of timelevels for chemical species
+!> called out from subroutine swap_timelevel
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE chem_swap_timelevel (level)
+
+          IMPLICIT   none
+
+          INTEGER,INTENT(IN)        :: level
+!--       local variables
+          INTEGER                   :: lsp
+
+
+          IF ( level == 0 ) THEN
+             DO lsp=1, nvar                                       
+                chem_species(lsp)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => spec_conc_1(:,:,:,lsp)
+                chem_species(lsp)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => spec_conc_2(:,:,:,lsp)
+             ENDDO
+          ELSE
+             DO lsp=1, nvar                                        
+                chem_species(lsp)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => spec_conc_2(:,:,:,lsp)
+                chem_species(lsp)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => spec_conc_1(:,:,:,lsp)
+             ENDDO
+          ENDIF
+
+       RETURN
+    END SUBROUTINE chem_swap_timelevel
+!
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine to write restart data for chemistry model
+!------------------------------------------------------------------------------!
+    SUBROUTINE chem_wrd_local
+
+       IMPLICIT NONE 
+
+       INTEGER(iwp) ::  lsp !< 
+
+       DO  lsp = 1, nspec
+          CALL wrd_write_string( TRIM( chem_species(lsp)%name ))
+          WRITE ( 14 )  chem_species(lsp)%conc
+          CALL wrd_write_string( TRIM( chem_species(lsp)%name )//'_av' )
+          WRITE ( 14 )  chem_species(lsp)%conc_av
+       ENDDO
+
+    END SUBROUTINE chem_wrd_local
+
+
+
+!-------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine to calculate the deposition of gases and PMs. For now deposition
+!> only takes place on lsm and usm horizontal surfaces. Default surfaces are NOT
+!> considered. The deposition of particles is derived following Zhang et al.,
+!> 2001, gases are deposited using the DEPAC module (van Zanten et al., 2010).
+!>     
+!> @TODO: Consider deposition on vertical surfaces    
+!> @TODO: Consider overlaying horizontal surfaces
+!> @TODO: Check error messages
+!-------------------------------------------------------------------------------!
+     
+    SUBROUTINE chem_depo (i,j)
+
+
+      USE control_parameters,                                                 &   
+           ONLY:  dt_3d, intermediate_timestep_count, latitude
+
+      USE arrays_3d,                                                          &
+           ONLY:  dzw, rho_air_zw
+
+      USE date_and_time_mod,                                                  &
+           ONLY: day_of_year
+
+      USE surface_mod,                                                          &
+           ONLY: surf_lsm_h, surf_usm_h, surf_type, ind_veg_wall,               &
+           ind_pav_green, ind_wat_win
+
+      USE radiation_model_mod,                                                   &
+           ONLY: zenith
+
+
+
+      IMPLICIT NONE
+
+      INTEGER,INTENT(IN)       :: i,j
+
+      INTEGER(iwp) ::  k                                        ! matching k to surface m at i,j
+      INTEGER(iwp) ::  lsp                                      ! running index for chem spcs.
+      INTEGER(iwp) ::  lu                                       ! running index for landuse classes
+      INTEGER(iwp) ::  lu_palm                                  ! index of PALM LSM vegetation_type at current surface element
+      INTEGER(iwp) ::  lup_palm                                 ! index of PALM LSM pavement_type at current surface element
+      INTEGER(iwp) ::  luw_palm                                 ! index of PALM LSM water_type at current surface element
+      INTEGER(iwp) ::  luu_palm                                 ! index of PALM USM walls/roofs at current surface element
+      INTEGER(iwp) ::  lug_palm                                 ! index of PALM USM green walls/roofs at current surface element
+      INTEGER(iwp) ::  lud_palm                                 ! index of PALM USM windows at current surface element
+      INTEGER(iwp) ::  lu_dep                                   ! matching DEPAC LU to lu_palm
+      INTEGER(iwp) ::  lup_dep                                  ! matching DEPAC LU to lup_palm
+      INTEGER(iwp) ::  luw_dep                                  ! matching DEPAC LU to luw_palm
+      INTEGER(iwp) ::  luu_dep                                  ! matching DEPAC LU to luu_palm
+      INTEGER(iwp) ::  lug_dep                                  ! matching DEPAC LU to lug_palm
+      INTEGER(iwp) ::  lud_dep                                  ! matching DEPAC LU to lud_palm
+      INTEGER(iwp) ::  m                                        ! index for horizontal surfaces
+
+      INTEGER(iwp) ::  pspec                                    ! running index
+      INTEGER(iwp) ::  i_pspec                                  ! index for matching depac gas component
+
+
+      ! Vegetation                                              !Match to DEPAC
+      INTEGER(iwp)  ::  ind_lu_user = 0                         ! --> ERROR  
+      INTEGER(iwp)  ::  ind_lu_b_soil = 1                       ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lu_mixed_crops = 2                  ! --> ilu_arable
+      INTEGER(iwp)  ::  ind_lu_s_grass = 3                      ! --> ilu_grass
+      INTEGER(iwp)  ::  ind_lu_ev_needle_trees = 4              ! --> ilu_coniferous_forest
+      INTEGER(iwp)  ::  ind_lu_de_needle_trees = 5              ! --> ilu_coniferous_forest
+      INTEGER(iwp)  ::  ind_lu_ev_broad_trees = 6               ! --> ilu_tropical_forest
+      INTEGER(iwp)  ::  ind_lu_de_broad_trees = 7               ! --> ilu_deciduous_forest
+      INTEGER(iwp)  ::  ind_lu_t_grass = 8                      ! --> ilu_grass
+      INTEGER(iwp)  ::  ind_lu_desert = 9                       ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lu_tundra = 10                      ! --> ilu_other
+      INTEGER(iwp)  ::  ind_lu_irr_crops = 11                   ! --> ilu_arable
+      INTEGER(iwp)  ::  ind_lu_semidesert = 12                  ! --> ilu_other
+      INTEGER(iwp)  ::  ind_lu_ice = 13                         ! --> ilu_ice
+      INTEGER(iwp)  ::  ind_lu_marsh = 14                       ! --> ilu_other
+      INTEGER(iwp)  ::  ind_lu_ev_shrubs = 15                   ! --> ilu_mediterrean_scrub
+      INTEGER(iwp)  ::  ind_lu_de_shrubs = 16                   ! --> ilu_mediterrean_scrub
+      INTEGER(iwp)  ::  ind_lu_mixed_forest = 17                ! --> ilu_coniferous_forest (ave(decid+conif))
+      INTEGER(iwp)  ::  ind_lu_intrup_forest = 18               ! --> ilu_other (ave(other+decid))
+
+      ! Water
+      INTEGER(iwp)  ::  ind_luw_user = 0                        ! --> ERROR
+      INTEGER(iwp)  ::  ind_luw_lake = 1                        ! --> ilu_water_inland
+      INTEGER(iwp)  ::  ind_luw_river = 2                       ! --> ilu_water_inland
+      INTEGER(iwp)  ::  ind_luw_ocean = 3                       ! --> ilu_water_sea
+      INTEGER(iwp)  ::  ind_luw_pond = 4                        ! --> ilu_water_inland
+      INTEGER(iwp)  ::  ind_luw_fountain = 5                    ! --> ilu_water_inland 
+
+      ! Pavement
+      INTEGER(iwp)  ::  ind_lup_user = 0                        ! --> ERROR
+      INTEGER(iwp)  ::  ind_lup_asph_conc = 1                   ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_asph = 2                        ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_conc = 3                        ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_sett = 4                        ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_pav_stones = 5                  ! --> ilu_desert 
+      INTEGER(iwp)  ::  ind_lup_cobblest = 6                    ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_metal = 7                       ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_wood = 8                        ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_gravel = 9                      ! --> ilu_desert 
+      INTEGER(iwp)  ::  ind_lup_f_gravel = 10                   ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_pebblest = 11                   ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_woodchips = 12                  ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_tartan = 13                     ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_art_turf = 14                   ! --> ilu_desert
+      INTEGER(iwp)  ::  ind_lup_clay = 15                       ! --> ilu_desert
+
+
+
+      !-- Particle parameters according to the respective aerosol classes (PM25, PM10)
+      INTEGER(iwp) ::  ind_p_size = 1     !< index for partsize in particle_pars
+      INTEGER(iwp) ::  ind_p_dens = 2     !< index for rhopart in particle_pars
+      INTEGER(iwp) ::  ind_p_slip = 3     !< index for slipcor in particle_pars
+
+      INTEGER(iwp) ::  part_type
+
+      INTEGER(iwp) :: nwet                ! wetness indicator dor DEPAC; nwet=0 -> dry; nwet=1 -> wet; nwet=9 -> snow
+
+      REAL(kind=wp)  :: dt_chem
+      REAL(kind=wp)  :: dh                
+      REAL(kind=wp)  :: inv_dh
+      REAL(kind=wp)  :: dt_dh
+
+      REAL(kind=wp)  :: dens              ! Density at lowest layer at i,j  
+      REAL(kind=wp)  :: r_aero_lu         ! aerodynamic resistance (s/m) at current surface element
+      REAL(kind=wp)  :: ustar_lu          ! ustar at current surface element
+      REAL(kind=wp)  :: z0h_lu            ! roughness length for heat at current surface element 
+      REAL(kind=wp)  :: glrad             ! rad_sw_in at current surface element 
+      REAL(kind=wp)  :: ppm_to_ugm3       ! conversion factor
+      REAL(kind=wp)  :: relh              ! relative humidity at current surface element
+      REAL(kind=wp)  :: lai               ! leaf area index at current surface element
+      REAL(kind=wp)  :: sai               ! surface area index at current surface element assumed to be lai + 1
+
+      REAL(kind=wp)  :: slinnfac        
+      REAL(kind=wp)  :: visc              ! Viscosity
+      REAL(kind=wp)  :: vs                ! Sedimentation velocity
+      REAL(kind=wp)  :: vd_lu             ! deposition velocity (m/s)
+      REAL(kind=wp)  :: Rs                ! Sedimentaion resistance (s/m)
+      REAL(kind=wp)  :: Rb                ! quasi-laminar boundary layer resistance (s/m)
+      REAL(kind=wp)  :: Rc_tot            ! total canopy resistance Rc (s/m)
+
+      REAL(kind=wp)  :: catm              ! gasconc. at i,j,k=1 in ug/m3
+      REAL(kind=wp)  :: diffc             ! Diffusivity
+
+
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now_lu       ! budget for LSM vegetation type at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now_lup      ! budget for LSM pavement type at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now_luw      ! budget for LSM water type at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now_luu       ! budget for USM walls/roofs at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now_lug      ! budget for USM green surfaces at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now_lud      ! budget for USM windows at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: bud_now          ! overall budget at current surface element
+      REAL(kind=wp),DIMENSION(nspec)            :: cc               ! concentration i,j,k
+      REAL(kind=wp),DIMENSION(nspec)            :: ccomp_tot        ! total compensation point (ug/m3) (= 0 for species that don't have a compensation)
+      ! For now kept to zero for all species!
+
+      REAL(kind=wp)                             :: ttemp          ! temperatur at i,j,k
+      REAL(kind=wp)                             :: ts             ! surface temperatur in degrees celsius
+      REAL(kind=wp)                             :: qv_tmp         ! surface mixing ratio at current surface element
+
+
+      !-- Particle parameters (PM10 (1), PM25 (2))
+      !-- partsize (diameter in m) ,    rhopart (density in kg/m3),     slipcor (slip correction factor DIMENSIONless, Seinfeld and Pandis 2006, Table 9.3)
+      REAL(wp), DIMENSION(1:3,1:2), PARAMETER   :: particle_pars = RESHAPE( (/ &
+           8.0e-6_wp, 1.14e3_wp, 1.016_wp, & !  1
+           0.7e-6_wp, 1.14e3_wp, 1.082_wp &  !  2
+           /), (/ 3, 2 /) )
+
+
+      LOGICAL                                   ::  match_lsm     ! flag indicating natural-type surface
+      LOGICAL                                   ::  match_usm     ! flag indicating urban-type surface
+
+
+
+      !-- List of names of possible tracers
+      CHARACTER(len=*), PARAMETER  ::  pspecnames(69) = (/ &
+           'NO2           ', &    ! NO2
+           'NO            ', &    ! NO
+           'O3            ', &    ! O3
+           'CO            ', &    ! CO
+           'form          ', &    ! FORM
+           'ald           ', &    ! ALD
+           'pan           ', &    ! PAN
+           'mgly          ', &    ! MGLY
+           'par           ', &    ! PAR
+           'ole           ', &    ! OLE
+           'eth           ', &    ! ETH
+           'tol           ', &    ! TOL
+           'cres          ', &    ! CRES
+           'xyl           ', &    ! XYL
+           'SO4a_f        ', &    ! SO4a_f
+           'SO2           ', &    ! SO2
+           'HNO2          ', &    ! HNO2
+           'CH4           ', &    ! CH4
+           'NH3           ', &    ! NH3
+           'NO3           ', &    ! NO3
+           'OH            ', &    ! OH
+           'HO2           ', &    ! HO2
+           'N2O5          ', &    ! N2O5
+           'SO4a_c        ', &    ! SO4a_c
+           'NH4a_f        ', &    ! NH4a_f
+           'NO3a_f        ', &    ! NO3a_f
+           'NO3a_c        ', &    ! NO3a_c
+           'C2O3          ', &    ! C2O3
+           'XO2           ', &    ! XO2
+           'XO2N          ', &    ! XO2N
+           'cro           ', &    ! CRO
+           'HNO3          ', &    ! HNO3
+           'H2O2          ', &    ! H2O2
+           'iso           ', &    ! ISO
+           'ispd          ', &    ! ISPD
+           'to2           ', &    ! TO2
+           'open          ', &    ! OPEN
+           'terp          ', &    ! TERP
+           'ec_f          ', &    ! EC_f
+           'ec_c          ', &    ! EC_c
+           'pom_f         ', &    ! POM_f
+           'pom_c         ', &    ! POM_c
+           'ppm_f         ', &    ! PPM_f
+           'ppm_c         ', &    ! PPM_c
+           'na_ff         ', &    ! Na_ff
+           'na_f          ', &    ! Na_f
+           'na_c          ', &    ! Na_c
+           'na_cc         ', &    ! Na_cc
+           'na_ccc        ', &    ! Na_ccc
+           'dust_ff       ', &    ! dust_ff
+           'dust_f        ', &    ! dust_f
+           'dust_c        ', &    ! dust_c
+           'dust_cc       ', &    ! dust_cc
+           'dust_ccc      ', &    ! dust_ccc
+           'tpm10         ', &    ! tpm10
+           'tpm25         ', &    ! tpm25
+           'tss           ', &    ! tss
+           'tdust         ', &    ! tdust
+           'tc            ', &    ! tc
+           'tcg           ', &    ! tcg
+           'tsoa          ', &    ! tsoa
+           'tnmvoc        ', &    ! tnmvoc
+           'SOxa          ', &    ! SOxa
+           'NOya          ', &    ! NOya
+           'NHxa          ', &    ! NHxa
+           'NO2_obs       ', &    ! NO2_obs
+           'tpm10_biascorr', &    ! tpm10_biascorr
+           'tpm25_biascorr', &    ! tpm25_biascorr
+           'O3_biascorr   ' /)    ! o3_biascorr
+
+
+
+      ! tracer mole mass:
+      REAL, PARAMETER  ::  specmolm(69) = (/ &
+           xm_O * 2 + xm_N, &                         ! NO2
+           xm_O + xm_N, &                             ! NO
+           xm_O * 3, &                                ! O3
+           xm_C + xm_O, &                             ! CO
+           xm_H * 2 + xm_C + xm_O, &                  ! FORM
+           xm_H * 3 + xm_C * 2 + xm_O, &              ! ALD
+           xm_H * 3 + xm_C * 2 + xm_O * 5 + xm_N, &   ! PAN
+           xm_H * 4 + xm_C * 3 + xm_O * 2, &          ! MGLY
+           xm_H * 3 + xm_C, &                         ! PAR
+           xm_H * 3 + xm_C * 2, &                     ! OLE
+           xm_H * 4 + xm_C * 2, &                     ! ETH
+           xm_H * 8 + xm_C * 7, &                     ! TOL
+           xm_H * 8 + xm_C * 7 + xm_O, &              ! CRES
+           xm_H * 10 + xm_C * 8, &                    ! XYL
+           xm_S + xm_O * 4, &                         ! SO4a_f
+           xm_S + xm_O * 2, &                         ! SO2
+           xm_H + xm_O * 2 + xm_N, &                  ! HNO2
+           xm_H * 4 + xm_C, &                         ! CH4
+           xm_H * 3 + xm_N, &                         ! NH3
+           xm_O * 3 + xm_N, &                         ! NO3
+           xm_H + xm_O, &                             ! OH
+           xm_H + xm_O * 2, &                         ! HO2
+           xm_O * 5 + xm_N * 2, &                     ! N2O5
+           xm_S + xm_O * 4, &                         ! SO4a_c
+           xm_H * 4 + xm_N, &                         ! NH4a_f
+           xm_O * 3 + xm_N, &                         ! NO3a_f
+           xm_O * 3 + xm_N, &                         ! NO3a_c
+           xm_C * 2 + xm_O * 3, &                     ! C2O3
+           xm_dummy, &                                ! XO2
+           xm_dummy, &                                ! XO2N
+           xm_dummy, &                                ! CRO
+           xm_H + xm_O * 3 + xm_N, &                  ! HNO3
+           xm_H * 2 + xm_O * 2, &                     ! H2O2
+           xm_H * 8 + xm_C * 5, &                     ! ISO
+           xm_dummy, &                                ! ISPD
+           xm_dummy, &                                ! TO2
+           xm_dummy, &                                ! OPEN
+           xm_H * 16 + xm_C * 10, &                   ! TERP
+           xm_dummy, &                                ! EC_f
+           xm_dummy, &                                ! EC_c
+           xm_dummy, &                                ! POM_f
+           xm_dummy, &                                ! POM_c
+           xm_dummy, &                                ! PPM_f
+           xm_dummy, &                                ! PPM_c
+           xm_Na, &                                   ! Na_ff
+           xm_Na, &                                   ! Na_f
+           xm_Na, &                                   ! Na_c
+           xm_Na, &                                   ! Na_cc
+           xm_Na, &                                   ! Na_ccc
+           xm_dummy, &                                ! dust_ff
+           xm_dummy, &                                ! dust_f
+           xm_dummy, &                                ! dust_c
+           xm_dummy, &                                ! dust_cc
+           xm_dummy, &                                ! dust_ccc
+           xm_dummy, &                                ! tpm10
+           xm_dummy, &                                ! tpm25
+           xm_dummy, &                                ! tss
+           xm_dummy, &                                ! tdust
+           xm_dummy, &                                ! tc
+           xm_dummy, &                                ! tcg
+           xm_dummy, &                                ! tsoa
+           xm_dummy, &                                ! tnmvoc
+           xm_dummy, &                                ! SOxa
+           xm_dummy, &                                ! NOya
+           xm_dummy, &                                ! NHxa
+           xm_O * 2 + xm_N, &                         ! NO2_obs
+           xm_dummy, &                                ! tpm10_biascorr
+           xm_dummy, &                                ! tpm25_biascorr
+           xm_O * 3 /)                                ! o3_biascorr
+
+
+
+      ! Initialize surface element m
+      m = 0
+      k = 0
+      ! LSM or USM surface present at i,j:
+      ! Default surfaces are NOT considered for deposition
+      match_lsm = surf_lsm_h%start_index(j,i) <= surf_lsm_h%end_index(j,i)
+      match_usm = surf_usm_h%start_index(j,i) <= surf_usm_h%end_index(j,i)
+
+
+      !!!!!!!
+      ! LSM !
+      !!!!!!!
+
+      IF ( match_lsm )  THEN
+
+         ! Get surface element information at i,j:
+         m = surf_lsm_h%start_index(j,i)
+
+         ! Get corresponding k
+         k = surf_lsm_h%k(m)
+
+         ! Get needed variables for surface element m
+         ustar_lu  = surf_lsm_h%us(m)
+         z0h_lu    = surf_lsm_h%z0h(m)
+         r_aero_lu = surf_lsm_h%r_a(m)
+         glrad     = surf_lsm_h%rad_sw_in(m)
+         lai = surf_lsm_h%lai(m)
+         sai = lai + 1
+
+         ! For small grid spacing neglect R_a
+         IF (dzw(k) <= 1.0) THEN
+            r_aero_lu = 0.0_wp
+         ENDIF
+
+         !Initialize lu's
+         lu_palm = 0
+         lu_dep = 0
+         lup_palm = 0
+         lup_dep = 0
+         luw_palm = 0
+         luw_dep = 0
+
+         !Initialize budgets
+         bud_now_lu  = 0.0_wp
+         bud_now_lup = 0.0_wp
+         bud_now_luw = 0.0_wp
+
+
+         ! Get land use for i,j and assign to DEPAC lu
+         IF (surf_lsm_h%frac(ind_veg_wall,m) > 0) THEN
+            lu_palm = surf_lsm_h%vegetation_type(m)
+            IF (lu_palm == ind_lu_user) THEN
+               message_string = 'No vegetation type defined. Please define vegetation type to enable deposition calculation'
+               CALL message( 'chem_depo', 'CM0451', 1, 2, 0, 6, 0 )
+            ELSEIF (lu_palm == ind_lu_b_soil) THEN
+               lu_dep = 9
+            ELSEIF (lu_palm == ind_lu_mixed_crops) THEN
+               lu_dep = 2
+            ELSEIF (lu_palm == ind_lu_s_grass) THEN
+               lu_dep = 1
+            ELSEIF (lu_palm == ind_lu_ev_needle_trees) THEN
+               lu_dep = 4
+            ELSEIF (lu_palm == ind_lu_de_needle_trees) THEN
+               lu_dep = 4
+            ELSEIF (lu_palm == ind_lu_ev_broad_trees) THEN
+               lu_dep = 12
+            ELSEIF (lu_palm == ind_lu_de_broad_trees) THEN
+               lu_dep = 5
+            ELSEIF (lu_palm == ind_lu_t_grass) THEN
+               lu_dep = 1
+            ELSEIF (lu_palm == ind_lu_desert) THEN
+               lu_dep = 9
+            ELSEIF (lu_palm == ind_lu_tundra ) THEN
+               lu_dep = 8
+            ELSEIF (lu_palm == ind_lu_irr_crops) THEN
+               lu_dep = 2
+            ELSEIF (lu_palm == ind_lu_semidesert) THEN
+               lu_dep = 8
+            ELSEIF (lu_palm == ind_lu_ice) THEN
+               lu_dep = 10
+            ELSEIF (lu_palm == ind_lu_marsh) THEN
+               lu_dep = 8
+            ELSEIF (lu_palm == ind_lu_ev_shrubs) THEN
+               lu_dep = 14
+            ELSEIF (lu_palm == ind_lu_de_shrubs ) THEN
+               lu_dep = 14
+            ELSEIF (lu_palm == ind_lu_mixed_forest) THEN
+               lu_dep = 4
+            ELSEIF (lu_palm == ind_lu_intrup_forest) THEN
+               lu_dep = 8      
+            ENDIF
+         ENDIF
+
+         IF (surf_lsm_h%frac(ind_pav_green,m) > 0) THEN
+            lup_palm = surf_lsm_h%pavement_type(m)
+            IF (lup_palm == ind_lup_user) THEN
+               message_string = 'No pavement type defined. Please define pavement type to enable deposition calculation'
+               CALL message( 'chem_depo', 'CM0452', 1, 2, 0, 6, 0 )
+            ELSEIF (lup_palm == ind_lup_asph_conc) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_asph) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm ==  ind_lup_conc) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm ==  ind_lup_sett) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_pav_stones) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_cobblest) THEN
+               lup_dep = 9       
+            ELSEIF (lup_palm == ind_lup_metal) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_wood) THEN
+               lup_dep = 9    
+            ELSEIF (lup_palm == ind_lup_gravel) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_f_gravel) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_pebblest) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_woodchips) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_tartan) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_art_turf) THEN
+               lup_dep = 9
+            ELSEIF (lup_palm == ind_lup_clay) THEN
+               lup_dep = 9
+            ENDIF
+         ENDIF
+
+         IF (surf_lsm_h%frac(ind_wat_win,m) > 0) THEN
+            luw_palm = surf_lsm_h%water_type(m)     
+            IF (luw_palm == ind_luw_user) THEN
+               message_string = 'No water type defined. Please define water type to enable deposition calculation'
+               CALL message( 'chem_depo', 'CM0453', 1, 2, 0, 6, 0 )
+            ELSEIF (luw_palm ==  ind_luw_lake) THEN
+               luw_dep = 13
+            ELSEIF (luw_palm == ind_luw_river) THEN
+               luw_dep = 13
+            ELSEIF (luw_palm == ind_luw_ocean) THEN
+               luw_dep = 6
+            ELSEIF (luw_palm == ind_luw_pond) THEN
+               luw_dep = 13
+            ELSEIF (luw_palm == ind_luw_fountain) THEN
+               luw_dep = 13 
+            ENDIF
+         ENDIF
+
+
+
+         ! Set wetness indicator to dry or wet for lsm vegetation or pavement
+         IF (surf_lsm_h%c_liq(m) > 0) THEN
+            nwet = 1
+         ELSE
+            nwet = 0
+         ENDIF
+
+         ! Compute length of time step 
+         IF ( call_chem_at_all_substeps )  THEN
+            dt_chem = dt_3d * weight_pres(intermediate_timestep_count)
+         ELSE
+            dt_chem = dt_3d
+         ENDIF
+
+
+         dh = dzw(k)
+         inv_dh = 1.0_wp / dh
+         dt_dh = dt_chem/dh
+
+         ! Concentration at i,j,k
+         DO lsp = 1, nspec
+            cc(lsp) = chem_species(lsp)%conc(k,j,i)
+         ENDDO
+
+
+         ! Temperature column at i,j
+         ttemp = pt(k,j,i) * ( hyp(k) / 100000.0_wp )**0.286_wp
+
+         ! Surface temperature in degrees Celcius:
+         ts       = ttemp - 273.15 ! in degrees celcius
+
+         ! Viscosity of air in lowest layer
+         visc = 1.496e-6 * ttemp**1.5 / (ttemp+120.0)
+
+         ! Air density in lowest layer
+         dens = rho_air_zw(k)
+
+         ! Calculate relative humidity from specific humidity for DEPAC
+         qv_tmp = max(q(k,j,i),0.0_wp)
+         relh = relativehumidity_from_specifichumidity(qv_tmp, ttemp, hyp(k) )
+
+
+
+         ! Check if surface fraction (vegetation, pavement or water) > 0 and calculate vd and budget
+         ! for each surface fraction. Then derive overall budget taking into account the surface fractions.
+
+         ! Vegetation
+         IF (surf_lsm_h%frac(ind_veg_wall,m) > 0) THEN
+
+
+            slinnfac = 1.0_wp
+
+            ! Get vd
+            DO lsp = 1, nvar
+               !Initialize 
+               vs = 0.0_wp
+               vd_lu = 0.0_wp
+               Rs = 0.0_wp
+               Rb = 0.0_wp
+               Rc_tot = 0.0_wp
+               IF (spc_names(lsp) == 'PM10') THEN
+                  part_type = 1
+                  ! sedimentation velocity in lowest layer
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lu_dep,  &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lu(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSEIF (spc_names(lsp) == 'PM25') THEN
+                  part_type = 2
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lu_dep , &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lu(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSE
+
+                  ! GASES
+
+                  ! Read spc_name of current species for gas parameter
+
+                  IF (ANY(pspecnames(:) == spc_names(lsp))) THEN
+                     i_pspec = 0
+                     DO pspec = 1, 69
+                        IF (pspecnames(pspec) == spc_names(lsp)) THEN
+                           i_pspec = pspec
+                        END IF
+                     ENDDO
+
+                  ELSE
+                     ! Species for now not deposited
+                     CYCLE
+                  ENDIF
+
+                  ! Factor used for conversion from ppb to ug/m3 :
+                  !   ppb (mole tr)/(mole air)/ppb (kg tr)/(mole tr) (ug tr)/(kg tr) &
+                  !   (mole air)/(kg air) (kg air)/(m3 air) (kg air(ug/m3)/ppb/(kg/mole) = / (kg/mole)
+                  !    c           1e-9              xm_tracer         1e9       /       xm_air            dens
+                  ! thus:
+                  !    c_in_ppb * xm_tracer * [ dens / xm_air ] = c_in_ugm3
+                  ! Use density at lowest layer:
+
+                  ppm_to_ugm3 =  (dens/xm_air)*0.001_wp  ! (mole air)/m3
+
+                  ! atmospheric concentration in DEPAC is requested in ug/m3:
+                  !  ug/m3              ppm          (ug/m3)/ppm/(kg/mole)     kg/mole
+                  catm = cc(lsp)         * ppm_to_ugm3 *   specmolm(i_pspec)  ! in ug/m3
+
+                  ! Diffusivity for DEPAC relevant gases
+                  ! Use default value 
+                  diffc            = 0.11e-4
+                  ! overwrite with known coefficients of diffusivity from Massman (1998)
+                  IF ( spc_names(lsp) == 'NO2' ) diffc = 0.136e-4 
+                  IF ( spc_names(lsp) == 'NO'  ) diffc = 0.199e-4
+                  IF ( spc_names(lsp) == 'O3'  ) diffc = 0.144e-4
+                  IF ( spc_names(lsp) == 'CO'  ) diffc = 0.176e-4
+                  IF ( spc_names(lsp) == 'SO2' ) diffc = 0.112e-4
+                  IF ( spc_names(lsp) == 'CH4' ) diffc = 0.191e-4
+                  IF ( spc_names(lsp) == 'NH3' ) diffc = 0.191e-4
+
+
+                  ! Get quasi-laminar boundary layer resistance Rb:
+                  CALL get_rb_cell( (lu_dep == ilu_water_sea) .or. (lu_dep == ilu_water_inland), &
+                       z0h_lu, ustar_lu, diffc, &
+                       Rb)
+
+                  ! Get Rc_tot
+                  CALL drydepos_gas_depac(spc_names(lsp), day_of_year, latitude, ts, ustar_lu, glrad, zenith(0), &
+                       relh, lai, sai, nwet, lu_dep, 2, Rc_tot, ccomp_tot(lsp), hyp(nzb), catm, diffc, &
+                       r_aero_lu , Rb)
+
+
+                  ! Calculate budget
+                  IF (Rc_tot .le. 0.0) THEN
+
+                     bud_now_lu(lsp) = 0.0_wp
+
+                  ELSE
+
+                     ! Compute exchange velocity for current lu:
+                     vd_lu = 1.0 / (r_aero_lu + Rb + Rc_tot )
+
+                     bud_now_lu(lsp) = - (cc(lsp) - ccomp_tot(lsp)) * &
+                          (1.0 - exp(-vd_lu*dt_dh ))*dh
+                  ENDIF
+
+               ENDIF
+            ENDDO
+         ENDIF
+
+
+         ! Pavement
+         IF (surf_lsm_h%frac(ind_pav_green,m) > 0) THEN
+
+
+            ! No vegetation on pavements:
+            lai = 0.0_wp
+            sai = 0.0_wp
+            
+            slinnfac = 1.0_wp
+
+            ! Get vd
+            DO lsp = 1, nvar
+               !Initialize
+               vs = 0.0_wp
+               vd_lu = 0.0_wp
+               Rs = 0.0_wp
+               Rb = 0.0_wp
+               Rc_tot = 0.0_wp
+               IF (spc_names(lsp) == 'PM10') THEN
+                  part_type = 1
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lup_dep,  &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lup(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSEIF (spc_names(lsp) == 'PM25') THEN
+                  part_type = 2
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lup_dep, &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lup(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSE
+
+                  ! GASES
+
+                  ! Read spc_name of current species for gas parameter
+
+                  IF (ANY(pspecnames(:) == spc_names(lsp))) THEN
+                     i_pspec = 0
+                     DO pspec = 1, 69
+                        IF (pspecnames(pspec) == spc_names(lsp)) THEN
+                           i_pspec = pspec
+                        END IF
+                     ENDDO
+
+                  ELSE
+                     ! Species for now not deposited
+                     CYCLE
+                  ENDIF
+
+                  ! Factor used for conversion from ppb to ug/m3 :
+                  !   ppb (mole tr)/(mole air)/ppb (kg tr)/(mole tr) (ug tr)/(kg tr) &
+                  !   (mole air)/(kg air) (kg air)/(m3 air) (kg air(ug/m3)/ppb/(kg/mole) = / (kg/mole)
+                  !    c           1e-9               xm_tracer         1e9       /       xm_air            dens
+                  ! thus:
+                  !    c_in_ppb * xm_tracer * [ dens / xm_air ] = c_in_ugm3
+                  ! Use density at lowest layer:
+
+                  ppm_to_ugm3 =  (dens/xm_air)*0.001_wp  ! (mole air)/m3
+
+                  ! atmospheric concentration in DEPAC is requested in ug/m3:
+                  !  ug/m3              ppm          (ug/m3)/ppm/(kg/mole)     kg/mole
+                  catm = cc(lsp)         * ppm_to_ugm3 *   specmolm(i_pspec)  ! in ug/m3
+
+                  ! Diffusivity for DEPAC relevant gases
+                  ! Use default value 
+                  diffc            = 0.11e-4
+                  ! overwrite with known coefficients of diffusivity from Massman (1998)
+                  IF ( spc_names(lsp) == 'NO2' ) diffc = 0.136e-4 
+                  IF ( spc_names(lsp) == 'NO'  ) diffc = 0.199e-4
+                  IF ( spc_names(lsp) == 'O3'  ) diffc = 0.144e-4
+                  IF ( spc_names(lsp) == 'CO'  ) diffc = 0.176e-4
+                  IF ( spc_names(lsp) == 'SO2' ) diffc = 0.112e-4
+                  IF ( spc_names(lsp) == 'CH4' ) diffc = 0.191e-4
+                  IF ( spc_names(lsp) == 'NH3' ) diffc = 0.191e-4
+
+
+                  ! Get quasi-laminar boundary layer resistance Rb:
+                  CALL get_rb_cell( (lup_dep == ilu_water_sea) .or. (lup_dep == ilu_water_inland), &
+                       z0h_lu, ustar_lu, diffc, &
+                       Rb)
+
+
+                  ! Get Rc_tot
+                  CALL drydepos_gas_depac(spc_names(lsp), day_of_year, latitude, ts, ustar_lu, glrad, zenith(0), &
+                       relh, lai, sai, nwet, lup_dep, 2, Rc_tot, ccomp_tot(lsp), hyp(nzb), catm, diffc, &
+                       r_aero_lu , Rb)
+
+
+                  ! Calculate budget
+                  IF (Rc_tot .le. 0.0) THEN
+
+                     bud_now_lup(lsp) = 0.0_wp
+
+                  ELSE
+
+                     ! Compute exchange velocity for current lu:
+                     vd_lu = 1.0 / (r_aero_lu + Rb + Rc_tot )
+
+                     bud_now_lup(lsp) = - (cc(lsp) - ccomp_tot(lsp)) * &
+                          (1.0 - exp(-vd_lu*dt_dh ))*dh
+                  ENDIF
+
+
+               ENDIF
+            ENDDO
+         ENDIF
+
+
+         ! Water
+         IF (surf_lsm_h%frac(ind_wat_win,m) > 0) THEN
+
+
+            ! No vegetation on water:
+            lai = 0.0_wp
+            sai = 0.0_wp
+            
+            slinnfac = 1.0_wp
+
+            ! Get vd
+            DO lsp = 1, nvar
+               !Initialize
+               vs = 0.0_wp
+               vd_lu = 0.0_wp
+               Rs = 0.0_wp
+               Rb = 0.0_wp
+               Rc_tot = 0.0_wp 
+               IF (spc_names(lsp) == 'PM10') THEN
+                  part_type = 1
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       luw_dep, &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_luw(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSEIF (spc_names(lsp) == 'PM25') THEN
+                  part_type = 2
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       luw_dep, &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_luw(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSE
+
+                  ! GASES
+
+                  ! Read spc_name of current species for gas PARAMETER
+
+                  IF (ANY(pspecnames(:) == spc_names(lsp))) THEN
+                     i_pspec = 0
+                     DO pspec = 1, 69
+                        IF (pspecnames(pspec) == spc_names(lsp)) THEN
+                           i_pspec = pspec
+                        END IF
+                     ENDDO
+
+                  ELSE
+                     ! Species for now not deposited
+                     CYCLE
+                  ENDIF
+
+                  ! Factor used for conversion from ppb to ug/m3 :
+                  !   ppb (mole tr)/(mole air)/ppb (kg tr)/(mole tr) (ug tr)/(kg tr) &
+                  !   (mole air)/(kg air) (kg air)/(m3 air) (kg air(ug/m3)/ppb/(kg/mole) = / (kg/mole)
+                  !    c           1e-9               xm_tracer         1e9       /       xm_air            dens
+                  ! thus:
+                  !    c_in_ppb * xm_tracer * [ dens / xm_air ] = c_in_ugm3
+                  ! Use density at lowest layer:
+
+                  ppm_to_ugm3 =  (dens/xm_air)*0.001_wp  ! (mole air)/m3
+
+                  ! atmospheric concentration in DEPAC is requested in ug/m3:
+                  !  ug/m3              ppm          (ug/m3)/ppm/(kg/mole)     kg/mole
+                  catm = cc(lsp)         * ppm_to_ugm3 *   specmolm(i_pspec)  ! in ug/m3
+
+                  ! Diffusivity for DEPAC relevant gases
+                  ! Use default value 
+                  diffc            = 0.11e-4
+                  ! overwrite with known coefficients of diffusivity from Massman (1998)
+                  IF ( spc_names(lsp) == 'NO2' ) diffc = 0.136e-4 
+                  IF ( spc_names(lsp) == 'NO'  ) diffc = 0.199e-4
+                  IF ( spc_names(lsp) == 'O3'  ) diffc = 0.144e-4
+                  IF ( spc_names(lsp) == 'CO'  ) diffc = 0.176e-4
+                  IF ( spc_names(lsp) == 'SO2' ) diffc = 0.112e-4
+                  IF ( spc_names(lsp) == 'CH4' ) diffc = 0.191e-4
+                  IF ( spc_names(lsp) == 'NH3' ) diffc = 0.191e-4
+
+
+                  ! Get quasi-laminar boundary layer resistance Rb:
+                  CALL get_rb_cell( (luw_dep == ilu_water_sea) .or. (luw_dep == ilu_water_inland), &
+                       z0h_lu, ustar_lu, diffc, &
+                       Rb)
+
+                  ! Get Rc_tot
+                  CALL drydepos_gas_depac(spc_names(lsp), day_of_year, latitude, ts, ustar_lu, glrad, zenith(0), &
+                       relh, lai, sai, nwet, luw_dep, 2, Rc_tot, ccomp_tot(lsp), hyp(nzb), catm, diffc, &
+                       r_aero_lu , Rb)
+
+
+                  ! Calculate budget 
+                  IF (Rc_tot .le. 0.0) THEN
+
+                     bud_now_luw(lsp) = 0.0_wp
+
+                  ELSE
+
+                     ! Compute exchange velocity for current lu:
+                     vd_lu = 1.0 / (r_aero_lu + Rb + Rc_tot )
+
+                     bud_now_luw(lsp) = - (cc(lsp) - ccomp_tot(lsp)) * &
+                          (1.0 - exp(-vd_lu*dt_dh ))*dh
+                  ENDIF
+
+               ENDIF
+            ENDDO
+         ENDIF
+
+
+         bud_now = 0.0_wp
+         ! Calculate budget for surface m and adapt concentration
+         DO lsp = 1, nspec
+
+
+            bud_now(lsp) = surf_lsm_h%frac(ind_veg_wall,m)*bud_now_lu(lsp) + &
+                 surf_lsm_h%frac(ind_pav_green,m)*bud_now_lup(lsp) + &
+                 surf_lsm_h%frac(ind_wat_win,m)*bud_now_luw(lsp)
+
+            ! Compute new concentration, add contribution of all exchange processes:
+            cc(lsp) = cc(lsp) + bud_now(lsp)*inv_dh
+            
+            chem_species(lsp)%conc(k,j,i) = max(0.0_wp, cc(lsp))
+ 
+         ENDDO
+
+      ENDIF
+
+
+
+      !!!!!!!
+      ! USM !
+      !!!!!!!    
+
+      IF ( match_usm )  THEN
+
+         ! Get surface element information at i,j:
+         m = surf_usm_h%start_index(j,i)
+
+         k = surf_usm_h%k(m)
+
+         ! Get needed variables for surface element m
+         ustar_lu  = surf_usm_h%us(m)
+         z0h_lu    = surf_usm_h%z0h(m)
+         r_aero_lu = surf_usm_h%r_a(m)
+         glrad     = surf_usm_h%rad_sw_in(m)
+         lai = surf_usm_h%lai(m)
+         sai = lai + 1
+
+         ! For small grid spacing neglect R_a
+         IF (dzw(k) <= 1.0) THEN
+            r_aero_lu = 0.0_wp
+         ENDIF
+
+         !Initialize lu's
+         luu_palm = 0
+         luu_dep = 0
+         lug_palm = 0
+         lug_dep = 0
+         lud_palm = 0
+         lud_dep = 0
+
+         !Initialize budgets
+         bud_now_luu  = 0.0_wp
+         bud_now_lug = 0.0_wp
+         bud_now_lud = 0.0_wp
+
+
+         ! Get land use for i,j and assign to DEPAC lu
+         IF (surf_usm_h%frac(ind_pav_green,m) > 0) THEN
+            ! For green urban surfaces (e.g. green roofs
+            ! assume LU short grass
+            lug_palm = ind_lu_s_grass
+            IF (lug_palm == ind_lu_user) THEN
+               message_string = 'No vegetation type defined. Please define vegetation type to enable deposition calculation'
+               CALL message( 'chem_depo', 'CM0454', 1, 2, 0, 6, 0 )
+            ELSEIF (lug_palm == ind_lu_b_soil) THEN
+               lug_dep = 9
+            ELSEIF (lug_palm == ind_lu_mixed_crops) THEN
+               lug_dep = 2
+            ELSEIF (lug_palm == ind_lu_s_grass) THEN
+               lug_dep = 1
+            ELSEIF (lug_palm == ind_lu_ev_needle_trees) THEN
+               lug_dep = 4
+            ELSEIF (lug_palm == ind_lu_de_needle_trees) THEN
+               lug_dep = 4
+            ELSEIF (lug_palm == ind_lu_ev_broad_trees) THEN
+               lug_dep = 12
+            ELSEIF (lug_palm == ind_lu_de_broad_trees) THEN
+               lug_dep = 5
+            ELSEIF (lug_palm == ind_lu_t_grass) THEN
+               lug_dep = 1
+            ELSEIF (lug_palm == ind_lu_desert) THEN
+               lug_dep = 9
+            ELSEIF (lug_palm == ind_lu_tundra ) THEN
+               lug_dep = 8
+            ELSEIF (lug_palm == ind_lu_irr_crops) THEN
+               lug_dep = 2
+            ELSEIF (lug_palm == ind_lu_semidesert) THEN
+               lug_dep = 8
+            ELSEIF (lug_palm == ind_lu_ice) THEN
+               lug_dep = 10
+            ELSEIF (lug_palm == ind_lu_marsh) THEN
+               lug_dep = 8
+            ELSEIF (lug_palm == ind_lu_ev_shrubs) THEN
+               lug_dep = 14
+            ELSEIF (lug_palm == ind_lu_de_shrubs ) THEN
+               lug_dep = 14
+            ELSEIF (lug_palm == ind_lu_mixed_forest) THEN
+               lug_dep = 4
+            ELSEIF (lug_palm == ind_lu_intrup_forest) THEN
+               lug_dep = 8      
+            ENDIF
+         ENDIF
+
+         IF (surf_usm_h%frac(ind_veg_wall,m) > 0) THEN
+            ! For walls in USM assume concrete walls/roofs,
+            ! assumed LU class desert as also assumed for
+            ! pavements in LSM
+            luu_palm = ind_lup_conc
+            IF (luu_palm == ind_lup_user) THEN
+               message_string = 'No pavement type defined. Please define pavement type to enable deposition calculation'
+               CALL message( 'chem_depo', 'CM0455', 1, 2, 0, 6, 0 )
+            ELSEIF (luu_palm == ind_lup_asph_conc) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_asph) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm ==  ind_lup_conc) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm ==  ind_lup_sett) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_pav_stones) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_cobblest) THEN
+               luu_dep = 9       
+            ELSEIF (luu_palm == ind_lup_metal) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_wood) THEN
+               luu_dep = 9    
+            ELSEIF (luu_palm == ind_lup_gravel) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_f_gravel) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_pebblest) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_woodchips) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_tartan) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_art_turf) THEN
+               luu_dep = 9
+            ELSEIF (luu_palm == ind_lup_clay) THEN
+               luu_dep = 9
+            ENDIF
+         ENDIF
+
+         IF (surf_usm_h%frac(ind_wat_win,m) > 0) THEN
+            ! For windows in USM assume metal as this is
+            ! as close as we get, assumed LU class desert
+            ! as also assumed for pavements in LSM
+            lud_palm = ind_lup_metal     
+            IF (lud_palm == ind_lup_user) THEN
+               message_string = 'No pavement type defined. Please define pavement type to enable deposition calculation'
+               CALL message( 'chem_depo', 'CM0456', 1, 2, 0, 6, 0 )
+            ELSEIF (lud_palm == ind_lup_asph_conc) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_asph) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm ==  ind_lup_conc) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm ==  ind_lup_sett) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_pav_stones) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_cobblest) THEN
+               lud_dep = 9       
+            ELSEIF (lud_palm == ind_lup_metal) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_wood) THEN
+               lud_dep = 9    
+            ELSEIF (lud_palm == ind_lup_gravel) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_f_gravel) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_pebblest) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_woodchips) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_tartan) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_art_turf) THEN
+               lud_dep = 9
+            ELSEIF (lud_palm == ind_lup_clay) THEN
+               lud_dep = 9
+            ENDIF
+         ENDIF
+
+
+         ! TODO: Activate these lines as soon as new ebsolver branch is merged:
+         ! Set wetness indicator to dry or wet for usm vegetation or pavement
+         !IF (surf_usm_h%c_liq(m) > 0) THEN
+         !   nwet = 1
+         !ELSE
+         nwet = 0
+         !ENDIF
+
+         ! Compute length of time step 
+         IF ( call_chem_at_all_substeps )  THEN
+            dt_chem = dt_3d * weight_pres(intermediate_timestep_count)
+         ELSE
+            dt_chem = dt_3d
+         ENDIF
+
+
+         dh = dzw(k)
+         inv_dh = 1.0_wp / dh
+         dt_dh = dt_chem/dh
+
+         ! Concentration at i,j,k
+         DO lsp = 1, nspec
+            cc(lsp) = chem_species(lsp)%conc(k,j,i)
+         ENDDO
+
+         ! Temperature at i,j,k
+         ttemp = pt(k,j,i) * ( hyp(k) / 100000.0_wp )**0.286_wp
+
+         ! Surface temperature in degrees Celcius:
+         ts       = ttemp - 273.15 ! in degrees celcius
+
+         ! Viscosity of air in lowest layer
+         visc = 1.496e-6 * ttemp**1.5 / (ttemp+120.0)
+
+         ! Air density in lowest layer
+         dens = rho_air_zw(k)
+
+         ! Calculate relative humidity from specific humidity for DEPAC
+         qv_tmp = max(q(k,j,i),0.0_wp)
+         relh = relativehumidity_from_specifichumidity(qv_tmp, ttemp, hyp(nzb) )
+
+
+
+         ! Check if surface fraction (vegetation, pavement or water) > 0 and calculate vd and budget
+         ! for each surface fraction. Then derive overall budget taking into account the surface fractions.
+
+         ! Walls/roofs
+         IF (surf_usm_h%frac(ind_veg_wall,m) > 0) THEN
+
+
+            ! No vegetation on non-green walls:
+            lai = 0.0_wp
+            sai = 0.0_wp
+            
+            slinnfac = 1.0_wp
+
+            ! Get vd
+            DO lsp = 1, nvar
+               !Initialize 
+               vs = 0.0_wp
+               vd_lu = 0.0_wp
+               Rs = 0.0_wp
+               Rb = 0.0_wp
+               Rc_tot = 0.0_wp
+               IF (spc_names(lsp) == 'PM10') THEN
+                  part_type = 1
+                  ! sedimentation velocity in lowest layer
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       luu_dep,  &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_luu(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSEIF (spc_names(lsp) == 'PM25') THEN
+                  part_type = 2
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       luu_dep , &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_luu(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSE
+
+                  ! GASES
+
+                  ! Read spc_name of current species for gas parameter
+
+                  IF (ANY(pspecnames(:) == spc_names(lsp))) THEN
+                     i_pspec = 0
+                     DO pspec = 1, 69
+                        IF (pspecnames(pspec) == spc_names(lsp)) THEN
+                           i_pspec = pspec
+                        END IF
+                     ENDDO
+
+                  ELSE
+                     ! Species for now not deposited
+                     CYCLE
+                  ENDIF
+
+                  ! Factor used for conversion from ppb to ug/m3 :
+                  !   ppb (mole tr)/(mole air)/ppb (kg tr)/(mole tr) (ug tr)/(kg tr) &
+                  !   (mole air)/(kg air) (kg air)/(m3 air) (kg air(ug/m3)/ppb/(kg/mole) = / (kg/mole)
+                  !    c           1e-9              xm_tracer         1e9       /       xm_air            dens
+                  ! thus:
+                  !    c_in_ppb * xm_tracer * [ dens / xm_air ] = c_in_ugm3
+                  ! Use density at lowest layer:
+
+                  ppm_to_ugm3 =  (dens/xm_air)*0.001_wp  ! (mole air)/m3
+
+                  ! atmospheric concentration in DEPAC is requested in ug/m3:
+                  !  ug/m3              ppm          (ug/m3)/ppm/(kg/mole)     kg/mole
+                  catm = cc(lsp)         * ppm_to_ugm3 *   specmolm(i_pspec)  ! in ug/m3
+
+                  ! Diffusivity for DEPAC relevant gases
+                  ! Use default value 
+                  diffc            = 0.11e-4
+                  ! overwrite with known coefficients of diffusivity from Massman (1998)
+                  IF ( spc_names(lsp) == 'NO2' ) diffc = 0.136e-4 
+                  IF ( spc_names(lsp) == 'NO'  ) diffc = 0.199e-4
+                  IF ( spc_names(lsp) == 'O3'  ) diffc = 0.144e-4
+                  IF ( spc_names(lsp) == 'CO'  ) diffc = 0.176e-4
+                  IF ( spc_names(lsp) == 'SO2' ) diffc = 0.112e-4
+                  IF ( spc_names(lsp) == 'CH4' ) diffc = 0.191e-4
+                  IF ( spc_names(lsp) == 'NH3' ) diffc = 0.191e-4
+
+
+                  ! Get quasi-laminar boundary layer resistance Rb:
+                  CALL get_rb_cell( (luu_dep == ilu_water_sea) .or. (luu_dep == ilu_water_inland), &
+                       z0h_lu, ustar_lu, diffc, &
+                       Rb)
+
+                  ! Get Rc_tot
+                  CALL drydepos_gas_depac(spc_names(lsp), day_of_year, latitude, ts, ustar_lu, glrad, zenith(0), &
+                       relh, lai, sai, nwet, luu_dep, 2, Rc_tot, ccomp_tot(lsp), hyp(nzb), catm, diffc, &
+                       r_aero_lu , Rb)
+
+
+                  ! Calculate budget
+                  IF (Rc_tot .le. 0.0) THEN
+
+                     bud_now_luu(lsp) = 0.0_wp
+
+                  ELSE
+
+                     ! Compute exchange velocity for current lu:
+                     vd_lu = 1.0 / (r_aero_lu + Rb + Rc_tot )
+
+                     bud_now_luu(lsp) = - (cc(lsp) - ccomp_tot(lsp)) * &
+                          (1.0 - exp(-vd_lu*dt_dh ))*dh
+                  ENDIF
+
+               ENDIF
+            ENDDO
+         ENDIF
+
+
+         ! Green usm surfaces
+         IF (surf_usm_h%frac(ind_pav_green,m) > 0) THEN
+
+
+            slinnfac = 1.0_wp
+
+            ! Get vd
+            DO lsp = 1, nvar
+               !Initialize
+               vs = 0.0_wp
+               vd_lu = 0.0_wp
+               Rs = 0.0_wp
+               Rb = 0.0_wp
+               Rc_tot = 0.0_wp
+               IF (spc_names(lsp) == 'PM10') THEN
+                  part_type = 1
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lug_dep,  &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lug(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSEIF (spc_names(lsp) == 'PM25') THEN
+                  part_type = 2
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lug_dep, &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lug(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSE
+
+                  ! GASES
+
+                  ! Read spc_name of current species for gas parameter
+
+                  IF (ANY(pspecnames(:) == spc_names(lsp))) THEN
+                     i_pspec = 0
+                     DO pspec = 1, 69
+                        IF (pspecnames(pspec) == spc_names(lsp)) THEN
+                           i_pspec = pspec
+                        END IF
+                     ENDDO
+
+                  ELSE
+                     ! Species for now not deposited
+                     CYCLE
+                  ENDIF
+
+                  ! Factor used for conversion from ppb to ug/m3 :
+                  !   ppb (mole tr)/(mole air)/ppb (kg tr)/(mole tr) (ug tr)/(kg tr) &
+                  !   (mole air)/(kg air) (kg air)/(m3 air) (kg air(ug/m3)/ppb/(kg/mole) = / (kg/mole)
+                  !    c           1e-9               xm_tracer         1e9       /       xm_air            dens
+                  ! thus:
+                  !    c_in_ppb * xm_tracer * [ dens / xm_air ] = c_in_ugm3
+                  ! Use density at lowest layer:
+
+                  ppm_to_ugm3 =  (dens/xm_air)*0.001_wp  ! (mole air)/m3
+
+                  ! atmospheric concentration in DEPAC is requested in ug/m3:
+                  !  ug/m3              ppm          (ug/m3)/ppm/(kg/mole)     kg/mole
+                  catm = cc(lsp)         * ppm_to_ugm3 *   specmolm(i_pspec)  ! in ug/m3
+
+                  ! Diffusivity for DEPAC relevant gases
+                  ! Use default value 
+                  diffc            = 0.11e-4
+                  ! overwrite with known coefficients of diffusivity from Massman (1998)
+                  IF ( spc_names(lsp) == 'NO2' ) diffc = 0.136e-4 
+                  IF ( spc_names(lsp) == 'NO'  ) diffc = 0.199e-4
+                  IF ( spc_names(lsp) == 'O3'  ) diffc = 0.144e-4
+                  IF ( spc_names(lsp) == 'CO'  ) diffc = 0.176e-4
+                  IF ( spc_names(lsp) == 'SO2' ) diffc = 0.112e-4
+                  IF ( spc_names(lsp) == 'CH4' ) diffc = 0.191e-4
+                  IF ( spc_names(lsp) == 'NH3' ) diffc = 0.191e-4
+
+
+                  ! Get quasi-laminar boundary layer resistance Rb:
+                  CALL get_rb_cell( (lug_dep == ilu_water_sea) .or. (lug_dep == ilu_water_inland), &
+                       z0h_lu, ustar_lu, diffc, &
+                       Rb)
+
+
+                  ! Get Rc_tot
+                  CALL drydepos_gas_depac(spc_names(lsp), day_of_year, latitude, ts, ustar_lu, glrad, zenith(0), &
+                       relh, lai, sai, nwet, lug_dep, 2, Rc_tot, ccomp_tot(lsp), hyp(nzb), catm, diffc, &
+                       r_aero_lu , Rb)
+
+
+                  ! Calculate budget
+                  IF (Rc_tot .le. 0.0) THEN
+
+                     bud_now_lug(lsp) = 0.0_wp
+
+                  ELSE
+
+                     ! Compute exchange velocity for current lu:
+                     vd_lu = 1.0 / (r_aero_lu + Rb + Rc_tot )
+
+                     bud_now_lug(lsp) = - (cc(lsp) - ccomp_tot(lsp)) * &
+                          (1.0 - exp(-vd_lu*dt_dh ))*dh
+                  ENDIF
+
+
+               ENDIF
+            ENDDO
+         ENDIF
+
+
+         ! Windows
+         IF (surf_usm_h%frac(ind_wat_win,m) > 0) THEN
+
+
+            ! No vegetation on windows:
+            lai = 0.0_wp
+            sai = 0.0_wp
+            
+            slinnfac = 1.0_wp
+
+            ! Get vd
+            DO lsp = 1, nvar
+               !Initialize
+               vs = 0.0_wp
+               vd_lu = 0.0_wp
+               Rs = 0.0_wp
+               Rb = 0.0_wp
+               Rc_tot = 0.0_wp 
+               IF (spc_names(lsp) == 'PM10') THEN
+                  part_type = 1
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lud_dep, &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lud(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSEIF (spc_names(lsp) == 'PM25') THEN
+                  part_type = 2
+                  ! sedimentation velocity in lowest layer:
+                  vs = slinnfac * sedimentation_velocity( particle_pars(ind_p_dens, part_type), &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       visc)
+
+
+                  CALL drydepo_aero_zhang_vd( vd_lu, Rs, &
+                       vs, &
+                       particle_pars(ind_p_size, part_type), &
+                       particle_pars(ind_p_slip, part_type), &
+                       nwet, ttemp, dens, visc, &
+                       lud_dep, &
+                       r_aero_lu, ustar_lu)
+
+                  bud_now_lud(lsp) = - cc(lsp) * &
+                       (1.0 - exp(-vd_lu*dt_dh ))*dh
+
+
+               ELSE
+
+                  ! GASES
+
+                  ! Read spc_name of current species for gas PARAMETER
+
+                  IF (ANY(pspecnames(:) == spc_names(lsp))) THEN
+                     i_pspec = 0
+                     DO pspec = 1, 69
+                        IF (pspecnames(pspec) == spc_names(lsp)) THEN
+                           i_pspec = pspec
+                        END IF
+                     ENDDO
+
+                  ELSE
+                     ! Species for now not deposited
+                     CYCLE
+                  ENDIF
+
+                  ! Factor used for conversion from ppb to ug/m3 :
+                  !   ppb (mole tr)/(mole air)/ppb (kg tr)/(mole tr) (ug tr)/(kg tr) &
+                  !   (mole air)/(kg air) (kg air)/(m3 air) (kg air(ug/m3)/ppb/(kg/mole) = / (kg/mole)
+                  !    c           1e-9               xm_tracer         1e9       /       xm_air            dens
+                  ! thus:
+                  !    c_in_ppb * xm_tracer * [ dens / xm_air ] = c_in_ugm3
+                  ! Use density at lowest layer:
+
+                  ppm_to_ugm3 =  (dens/xm_air)*0.001_wp  ! (mole air)/m3
+
+                  ! atmospheric concentration in DEPAC is requested in ug/m3:
+                  !  ug/m3              ppm          (ug/m3)/ppm/(kg/mole)     kg/mole
+                  catm = cc(lsp)         * ppm_to_ugm3 *   specmolm(i_pspec)  ! in ug/m3
+
+                  ! Diffusivity for DEPAC relevant gases
+                  ! Use default value 
+                  diffc            = 0.11e-4
+                  ! overwrite with known coefficients of diffusivity from Massman (1998)
+                  IF ( spc_names(lsp) == 'NO2' ) diffc = 0.136e-4 
+                  IF ( spc_names(lsp) == 'NO'  ) diffc = 0.199e-4
+                  IF ( spc_names(lsp) == 'O3'  ) diffc = 0.144e-4
+                  IF ( spc_names(lsp) == 'CO'  ) diffc = 0.176e-4
+                  IF ( spc_names(lsp) == 'SO2' ) diffc = 0.112e-4
+                  IF ( spc_names(lsp) == 'CH4' ) diffc = 0.191e-4
+                  IF ( spc_names(lsp) == 'NH3' ) diffc = 0.191e-4
+
+
+                  ! Get quasi-laminar boundary layer resistance Rb:
+                  CALL get_rb_cell( (lud_dep == ilu_water_sea) .or. (lud_dep == ilu_water_inland), &
+                       z0h_lu, ustar_lu, diffc, &
+                       Rb)
+
+                  ! Get Rc_tot
+                  CALL drydepos_gas_depac(spc_names(lsp), day_of_year, latitude, ts, ustar_lu, glrad, zenith(0), &
+                       relh, lai, sai, nwet, lud_dep, 2, Rc_tot, ccomp_tot(lsp), hyp(nzb), catm, diffc, &
+                       r_aero_lu , Rb)
+
+
+                  ! Calculate budget 
+                  IF (Rc_tot .le. 0.0) THEN
+
+                     bud_now_lud(lsp) = 0.0_wp
+
+                  ELSE
+
+                     ! Compute exchange velocity for current lu:
+                     vd_lu = 1.0 / (r_aero_lu + Rb + Rc_tot )
+
+                     bud_now_lud(lsp) = - (cc(lsp) - ccomp_tot(lsp)) * &
+                          (1.0 - exp(-vd_lu*dt_dh ))*dh
+                  ENDIF
+
+               ENDIF
+            ENDDO
+         ENDIF
+
+
+         bud_now = 0.0_wp
+         ! Calculate budget for surface m and adapt concentration
+         DO lsp = 1, nspec
+
+
+            bud_now(lsp) = surf_usm_h%frac(ind_veg_wall,m)*bud_now_luu(lsp) + &
+                 surf_usm_h%frac(ind_pav_green,m)*bud_now_lug(lsp) + &
+                 surf_usm_h%frac(ind_wat_win,m)*bud_now_lud(lsp)
+
+            ! Compute new concentration, add contribution of all exchange processes:
+            cc(lsp) = cc(lsp) + bud_now(lsp)*inv_dh
+
+            chem_species(lsp)%conc(k,j,i) = max(0.0_wp, cc(lsp))
+
+         ENDDO
+
+      ENDIF
+
+
+
+    END SUBROUTINE chem_depo
+
+  
+
+!----------------------------------------------------------------------------------
+!
+! DEPAC:
+! Code of the DEPAC routine and corresponding subroutines below from the DEPAC
+! module of the LOTOS-EUROS model (Manders et al., 2017)
+!   
+! Original DEPAC routines by RIVM and TNO (2015), for Documentation see
+! van Zanten et al., 2010.
+!---------------------------------------------------------------------------------
+!    
+!----------------------------------------------------------------------------------    
+!
+! depac: compute total canopy (or surface) resistance Rc for gases
+!----------------------------------------------------------------------------------
+
+    SUBROUTINE drydepos_gas_depac(compnam, day_of_year, lat, t, ust, glrad, sinphi, &
+         rh, lai, sai, nwet, lu, iratns, rc_tot, ccomp_tot, p, catm, diffc, &
+         ra, rb)  
+
+
+      ! The last four rows of depac arguments are OPTIONAL:
+      !
+      ! A. compute Rc_tot without compensation points (ccomp_tot will be zero):
+      !     CALL depac (compnam, day_of_year, lat, t, ust, glrad, sinphi, rh, nwet, lu, iratns, rc_tot, ccomp_tot, [smi])
+      !
+      ! B. compute Rc_tot with compensation points (used for LOTOS-EUROS):
+      !     CALL depac (compnam, day_of_year, lat, t, ust, glrad, sinphi, rh, nwet, lu, iratns, rc_tot, ccomp_tot, [smi], &
+      !                  c_ave_prev_nh3, c_ave_prev_so2, catm, gamma_soil_water)
+      !
+      ! C. compute effective Rc based on compensation points (used for OPS):
+      !     CALL depac (compnam, day_of_year, lat, t, ust, glrad, sinphi, rh, nwet, lu, iratns, rc_tot, ccomp_tot, [smi], &
+      !                 c_ave_prev_nh3, c_ave_prev_so2, catm, gamma_soil_water, &
+      !                 ra, rb, rc_eff)
+      ! X1. Extra (OPTIONAL) output variables: 
+      !     CALL depac (compnam, day_of_year, lat, t, ust, glrad, sinphi, rh, nwet, lu, iratns, rc_tot, ccomp_tot, [smi], &
+      !                 c_ave_prev_nh3, c_ave_prev_so2, catm, gamma_soil_water, &
+      !                 ra, rb, rc_eff, &
+      !                 gw_out, gstom_out, gsoil_eff_out, cw_out, cstom_out, csoil_out, lai_out, sai_out)
+      ! X2. Extra (OPTIONAL) needed for stomatal ozone flux calculation (only sunlit leaves): 
+      !     CALL depac (compnam, day_of_year, lat, t, ust, glrad, sinphi, rh, nwet, lu, iratns, rc_tot, ccomp_tot, [smi], &
+      !                 c_ave_prev_nh3, c_ave_prev_so2, catm, gamma_soil_water, &
+      !                 ra, rb, rc_eff, &
+      !                 gw_out, gstom_out, gsoil_eff_out, cw_out, cstom_out, csoil_out, lai_out, sai_out, &
+      !                 calc_stom_o3flux, frac_sto_o3_lu, fac_surface_area_2_PLA)
+
+
+      IMPLICIT NONE
+
+      CHARACTER(len=*)          , INTENT(in)       :: compnam          ! component name
+      ! 'HNO3','NO','NO2','O3','SO2','NH3'
+      INTEGER(iwp)              , INTENT(in)       :: day_of_year      ! day of year, 1 ... 365 (366)
+      REAL(kind=wp)             , INTENT(in)       :: lat                   ! latitude Northern hemisphere (degrees) (DEPAC cannot be used for S. hemisphere)
+      REAL(kind=wp)            , INTENT(in)        :: t	               ! temperature (C)
+      ! NB discussion issue is temp T_2m or T_surf or T_leaf?
+      REAL(kind=wp)             , INTENT(in)       :: ust              ! friction velocity (m/s)
+      REAL(kind=wp)             , INTENT(in)       :: glrad            ! global radiation (W/m2)
+      REAL(kind=wp)             , INTENT(in)       :: sinphi           ! sin of solar elevation angle
+      REAL(kind=wp)             , INTENT(in)       :: rh               ! relative humidity (%)
+      REAL(kind=wp)             , INTENT(in)       :: lai              ! one-sidedleaf area index (-)
+      REAL(kind=wp)             , INTENT(in)       :: sai              ! surface area index (-) (lai + branches and stems)
+      REAL(kind=wp)             , INTENT(in)       :: diffc            ! Diffusivity
+      INTEGER(iwp)              , INTENT(in)           :: nwet             ! wetness indicator; nwet=0 -> dry; nwet=1 -> wet; nwet=9 -> snow
+      INTEGER(iwp)              , INTENT(in)       :: lu               ! land use type, lu = 1,...,nlu
+      INTEGER(iwp)              , INTENT(in)       :: iratns           ! index for NH3/SO2 ratio used for SO2;
+      ! iratns = 1: low NH3/SO2
+      ! iratns = 2: high NH3/SO2
+      ! iratns = 3: very low NH3/SO2
+      REAL(kind=wp)             , INTENT(out)      :: rc_tot           ! total canopy resistance Rc (s/m)
+      REAL(kind=wp)             , INTENT(out)      :: ccomp_tot        ! total compensation point (ug/m3) [= 0 for species that don't have a compensation 
+      REAL(kind=wp)             ,INTENT(in)        :: p                ! pressure (Pa)
+      REAL(kind=wp), INTENT(in)  :: catm            ! actual atmospheric concentration (ug/m3)
+      REAL(kind=wp), INTENT(in)  :: ra              ! aerodynamic resistance (s/m)
+      REAL(kind=wp), INTENT(in)  :: rb              ! boundary layer resistance (s/m)
+
+      ! Local variables:
+      REAL(kind=wp)                           :: laimax          ! maximum leaf area index (-)
+      LOGICAL                        :: ready           ! Rc has been set
+      ! = 1 -> constant Rc
+      ! = 2 -> temperature dependent Rc
+      REAL(kind=wp)                           :: gw              ! external leaf conductance (m/s)
+      REAL(kind=wp)                           :: gstom           ! stomatal conductance (m/s)
+      REAL(kind=wp)                           :: gsoil_eff       ! effective soil conductance (m/s)
+      REAL(kind=wp)                           :: gc_tot          ! total canopy conductance (m/s)
+      REAL(kind=wp)                           :: cw              ! external leaf surface compensation point (ug/m3)
+      REAL(kind=wp)                           :: cstom           ! stomatal compensation point (ug/m3)
+      REAL(kind=wp)                           :: csoil           ! soil compensation point (ug/m3)
+
+      ! Vegetation indicators:
+      LOGICAL            :: LAI_present ! leaves are present for current land use type
+      LOGICAL            :: SAI_present ! vegetation is present for current land use type
+
+      ! Component number taken from component name, paramteres matched with include files
+      INTEGER(iwp)           ::  icmp
+
+      ! component numbers:
+      INTEGER(iwp), PARAMETER  ::  icmp_o3   = 1
+      INTEGER(iwp), PARAMETER  ::  icmp_so2  = 2
+      INTEGER(iwp), PARAMETER  ::  icmp_no2  = 3
+      INTEGER(iwp), PARAMETER  ::  icmp_no   = 4
+      INTEGER(iwp), PARAMETER  ::  icmp_nh3  = 5
+      INTEGER(iwp), PARAMETER  ::  icmp_co   = 6
+      INTEGER(iwp), PARAMETER  ::  icmp_no3  = 7
+      INTEGER(iwp), PARAMETER  ::  icmp_hno3 = 8
+      INTEGER(iwp), PARAMETER  ::  icmp_n2o5 = 9
+      INTEGER(iwp), PARAMETER  ::  icmp_h2o2 = 10
+
+
+
+      ! Define component number
+      SELECT CASE ( trim(compnam) )
+
+      CASE ( 'O3', 'o3' )
+         icmp = icmp_o3
+
+      CASE ( 'SO2', 'so2' )
+         icmp = icmp_so2
+
+      CASE ( 'NO2', 'no2' )
+         icmp = icmp_no2
+
+      CASE ( 'NO', 'no' )
+         icmp = icmp_no 
+
+      CASE ( 'NH3', 'nh3' )
+         icmp = icmp_nh3
+
+      CASE ( 'CO', 'co' )
+         icmp = icmp_co
+
+      CASE ( 'NO3', 'no3' )
+         icmp = icmp_no3
+
+      CASE ( 'HNO3', 'hno3' )
+         icmp = icmp_hno3
+
+      CASE ( 'N2O5', 'n2o5' )
+         icmp = icmp_n2o5
+
+      CASE ( 'H2O2', 'h2o2' )
+         icmp = icmp_h2o2
+
+      CASE default
+         !Component not part of DEPAC --> not deposited
+         RETURN
+
+      END SELECT
+
+      ! inititalize
+      gw        = 0.
+      gstom     = 0.
+      gsoil_eff = 0.
+      gc_tot    = 0.
+      cw        = 0.
+      cstom     = 0.
+      csoil     = 0.
+
+
+      ! Check whether vegetation is present (in that CASE the leaf or surface area index > 0):
+      LAI_present = (lai .gt. 0.0)
+      SAI_present = (sai .gt. 0.0)
+
+      ! Set Rc (i.e. rc_tot) in special cases:
+      CALL rc_special(icmp,compnam,lu,t, nwet,rc_tot,ready,ccomp_tot)
+
+      ! set effective resistance equal to total resistance, this will be changed for compensation points
+      !IF ( present(rc_eff) ) then
+      !   rc_eff = rc_tot
+      !END IF
+
+      ! IF Rc is not set:
+      IF (.not. ready) then
+
+         ! External conductance:
+         CALL rc_gw(compnam,iratns,t,rh,nwet,SAI_present,sai,gw)         
+
+         ! Stomatal conductance:
+         ! CALL rc_gstom(icmp,compnam,lu,LAI_present,lai,glrad,sinphi,t,rh,diffc,gstom,p,&
+         !     smi=smi,calc_stom_o3flux=calc_stom_o3flux)
+         CALL rc_gstom(icmp,compnam,lu,LAI_present,lai,glrad,sinphi,t,rh,diffc,gstom,p)
+         ! Effective soil conductance:
+         CALL rc_gsoil_eff(icmp,lu,sai,ust,nwet,t,gsoil_eff)
+
+         ! Total canopy conductance (gc_tot) and resistance Rc (rc_tot):
+         CALL rc_rctot(gstom,gsoil_eff,gw,gc_tot,rc_tot)
+
+         ! Compensation points (always returns ccomp_tot; currently ccomp_tot != 0 only for NH3):
+         ! CALL rc_comp_point( compnam,lu,day_of_year,t,gw,gstom,gsoil_eff,gc_tot,&
+         !     LAI_present, SAI_present, &
+         !     ccomp_tot, &
+         !     catm=catm,c_ave_prev_nh3=c_ave_prev_nh3, &
+         !     c_ave_prev_so2=c_ave_prev_so2,gamma_soil_water=gamma_soil_water, &
+         !     tsea=tsea,cw=cw,cstom=cstom,csoil=csoil )
+
+         ! Effective Rc based on compensation points:
+         ! IF ( present(rc_eff) ) then
+         ! check on required arguments:
+         !IF ( (.not. present(catm)) .or. (.not. present(ra)) .or. (.not. present(rb)) ) then
+         !   stop 'output argument rc_eff requires input arguments catm, ra and rb'
+         !END IF
+         ! compute rc_eff :
+         !CALL rc_comp_point_rc_eff(ccomp_tot,catm,ra,rb,rc_tot,rc_eff)
+         !ENDIF
+      ENDIF
+
+    END SUBROUTINE drydepos_gas_depac
+
+
+
+!-------------------------------------------------------------------
+! rc_special: compute total canopy resistance in special CASEs
+!-------------------------------------------------------------------
+    SUBROUTINE rc_special(icmp,compnam,lu,t,nwet,rc_tot,ready,ccomp_tot)
+
+      INTEGER(iwp)         , INTENT(in)  :: icmp            ! component index
+      CHARACTER(len=*)     , INTENT(in)  :: compnam         ! component name
+      INTEGER(iwp)         , INTENT(in)  :: lu              ! land use type, lu = 1,...,nlu
+      REAL(kind=wp)        , INTENT(in)  :: t               ! temperature (C)
+      ! = 1 -> constant Rc
+      ! = 2 -> temperature dependent Rc
+      INTEGER(iwp)         , INTENT(in)  :: nwet            ! wetness indicator; nwet=0 -> dry; nwet=1 -> wet; nwet=9 -> snow
+      REAL(kind=wp)        , INTENT(out) :: rc_tot          ! total canopy resistance Rc (s/m)
+      LOGICAL              , INTENT(out) :: ready           ! Rc has been set
+      REAL(kind=wp)        , INTENT(out) :: ccomp_tot       ! total compensation point (ug/m3)
+
+      ! rc_tot is not yet set:
+      ready = .false.
+
+      ! Default compensation point in special CASEs = 0:
+      ccomp_tot = 0.0
+
+      SELECT CASE(trim(compnam))
+      CASE('HNO3','N2O5','NO3','H2O2')
+         ! No separate resistances for HNO3; just one total canopy resistance:
+         IF (t .lt. -5.0 .and. nwet .eq. 9) then
+            ! T < 5 C and snow:
+            rc_tot = 50.
+         ELSE
+            ! all other circumstances:
+            rc_tot = 10.0
+         ENDIF
+         ready = .true.
+
+      CASE('NO','CO')
+         IF (lu .eq. ilu_water_sea .or. lu .eq. ilu_water_inland) then       ! water
+            rc_tot = 2000.
+            ready = .true.
+         ELSEIF (nwet .eq. 1) then ! wet
+            rc_tot = 2000.
+            ready = .true.
+         ENDIF
+      CASE('NO2','O3','SO2','NH3')
+         ! snow surface:
+         IF (nwet.eq.9) then
+            !CALL rc_snow(ipar_snow(icmp),t,rc_tot)
+            ready = .true.
+         ENDIF
+      CASE default
+         message_string = 'Component '// trim(compnam) // ' not supported'
+         CALL message( 'rc_special', 'CM0457', 1, 2, 0, 6, 0 )
+      END SELECT
+
+    END SUBROUTINE rc_special
+
+
+
+!-------------------------------------------------------------------
+! rc_gw: compute external conductance
+!-------------------------------------------------------------------
+    SUBROUTINE rc_gw( compnam, iratns,t,rh,nwet, SAI_present, sai, gw )
+
+      ! Input/output variables:
+      CHARACTER(len=*)     , INTENT(in)  :: compnam ! component name
+      INTEGER(iwp)         , INTENT(in)  :: iratns  ! index for NH3/SO2 ratio;
+      ! iratns = 1: low NH3/SO2
+      ! iratns = 2: high NH3/SO2
+      ! iratns = 3: very low NH3/SO2
+      REAL(kind=wp)         , INTENT(in)  :: t       ! temperature (C)
+      REAL(kind=wp)         , INTENT(in)  :: rh      ! relative humidity (%)
+      INTEGER(iwp)          , INTENT(in)  :: nwet    ! wetness indicator; nwet=0 -> dry; nwet=1 -> wet; nwet=9 -> snow
+      LOGICAL               , INTENT(in)  :: SAI_present
+      REAL(kind=wp)         , INTENT(in)  :: sai     ! one-sided leaf area index (-)
+      REAL(kind=wp)         , INTENT(out) :: gw      ! external leaf conductance (m/s)
+
+      SELECT CASE(trim(compnam))
+
+         !CASE('HNO3','N2O5','NO3','H2O2') this routine is not CALLed for HNO3
+
+      CASE('NO2')
+         CALL rw_constant(2000.0_wp,SAI_present,gw)
+
+      CASE('NO','CO')
+         CALL rw_constant(-9999.0_wp,SAI_present,gw)  ! see Erisman et al, 1994 section 3.2.3
+
+      CASE('O3')
+         CALL rw_constant(2500.0_wp,SAI_present,gw)
+
+      CASE('SO2')
+         CALL rw_so2( t, nwet, rh, iratns, SAI_present, gw )
+
+      CASE('NH3')
+         CALL rw_nh3_sutton(t,rh,SAI_present,gw)
+
+         ! conversion from leaf resistance to canopy resistance by multiplying with SAI:
+         Gw = sai*gw
+
+      CASE default
+         message_string = 'Component '// trim(compnam) // ' not supported'
+         CALL message( 'rc_gw', 'CM0458', 1, 2, 0, 6, 0 )
+      END SELECT
+
+    END SUBROUTINE rc_gw
+
+
+
+!-------------------------------------------------------------------
+! rw_so2: compute external leaf conductance for SO2
+!-------------------------------------------------------------------
+    SUBROUTINE rw_so2( t, nwet, rh, iratns, SAI_present, gw )
+
+      ! Input/output variables:
+      REAL(kind=wp)   , INTENT(in)  :: t      ! temperature (C)
+      INTEGER(iwp)    , INTENT(in)  :: nwet   ! wetness indicator; nwet=0 -> dry; nwet=1 -> wet; nwet=9 -> snow
+      REAL(kind=wp)   , INTENT(in)  :: rh     ! relative humidity (%)
+      INTEGER(iwp)    , INTENT(in)  :: iratns ! index for NH3/SO2 ratio;
+      ! iratns = 1: low NH3/SO2
+      ! iratns = 2: high NH3/SO2
+      ! iratns = 3: very low NH3/SO2
+      LOGICAL, INTENT(in)  :: SAI_present
+      REAL(kind=wp)   , INTENT(out) :: gw     ! external leaf conductance (m/s)
+
+      ! Variables from module:
+      ! SAI_present: vegetation is present
+
+      ! Local variables:
+      REAL(kind=wp)                 :: rw     ! external leaf resistance (s/m)
+
+      ! Check IF vegetation present:
+      IF (SAI_present) then
+
+         IF (nwet .eq. 0) then
+            !--------------------------
+            ! dry surface
+            !--------------------------
+            ! T > -1 C
+            IF (t .gt. -1.0) then
+               IF (rh .lt. 81.3) then
+                  rw = 25000*exp(-0.0693*rh)
+               ELSE
+                  rw = 0.58e12*exp(-0.278*rh) + 10.
+               ENDIF
+            ELSE
+               ! -5 C < T <= -1 C
+               IF (t .gt. -5.0) then
+                  rw=200
+               ELSE
+                  ! T <= -5 C
+                  rw=500
+               ENDIF
+            ENDIF
+         ELSE
+            !--------------------------
+            ! wet surface
+            !--------------------------
+            rw = 10. !see Table 5, Erisman et al, 1994 Atm. Environment, 0 is impl. as 10
+         ENDIF
+
+         ! very low NH3/SO2 ratio:
+         IF (iratns == iratns_very_low ) rw = rw+50.
+
+         ! Conductance:
+         gw = 1./rw
+      ELSE
+         ! no vegetation:
+         gw = 0.0
+      ENDIF
+
+    END SUBROUTINE rw_so2
+
+
+
+!-------------------------------------------------------------------
+! rw_nh3_sutton: compute external leaf conductance for NH3,
+!                  following Sutton & Fowler, 1993
+!-------------------------------------------------------------------
+    SUBROUTINE rw_nh3_sutton(tsurf,rh,SAI_present,gw)
+
+      ! Input/output variables:
+      REAL(kind=wp)   , INTENT(in)  :: tsurf     ! surface temperature (C)
+      REAL(kind=wp)   , INTENT(in)  :: rh        ! relative humidity (%)
+      LOGICAL, INTENT(in)  :: SAI_present
+      REAL(kind=wp)   , INTENT(out) :: gw        ! external leaf conductance (m/s)
+
+      ! Variables from module:
+      ! SAI_present: vegetation is present
+
+      ! Local variables:
+      REAL(kind=wp)                 :: rw                ! external leaf resistance (s/m)
+      REAL(kind=wp)                 :: sai_grass_haarweg ! surface area index at experimental site Haarweg
+
+      ! Fix SAI_grass at value valid for Haarweg data for which gamma_w parametrization is derived
+      sai_grass_haarweg = 3.5
+
+      !                  100 - rh
+      !  rw = 2.0 * exp(----------)
+      !                    12
+
+      IF (SAI_present) then
+
+         ! External resistance according to Sutton & Fowler, 1993
+         rw = 2.0 * exp((100.0 - rh)/12.0)
+         rw = sai_grass_haarweg * rw
+
+         ! Frozen soil (from Depac v1):
+         IF (tsurf .lt. 0) rw = 200
+
+         ! Conductance:
+         gw = 1./rw
+      ELSE
+         ! no vegetation:
+         gw = 0.0
+      ENDIF
+
+    END SUBROUTINE rw_nh3_sutton
+
+
+
+!-------------------------------------------------------------------
+! rw_constant: compute constant external leaf conductance
+!-------------------------------------------------------------------
+    SUBROUTINE rw_constant(rw_val,SAI_present,gw)
+
+      ! Input/output variables:
+      REAL(kind=wp)   , INTENT(in)  :: rw_val      ! constant value of Rw
+      LOGICAL         , INTENT(in)  :: SAI_present
+      REAL(kind=wp)   , INTENT(out) :: gw          ! wernal leaf conductance (m/s)
+
+      ! Variables from module:
+      ! SAI_present: vegetation is present
+
+      ! Compute conductance:
+      IF (SAI_present .and. .not.missing(rw_val)) then
+         gw = 1./rw_val
+      ELSE
+         gw = 0.
+      ENDIF
+
+    END SUBROUTINE rw_constant
+
+
+
+!-------------------------------------------------------------------
+! rc_gstom: compute stomatal conductance
+!-------------------------------------------------------------------
+    SUBROUTINE rc_gstom( icmp, compnam, lu, LAI_present, lai, glrad, sinphi, t, rh, diffc, &
+         gstom, &
+         p)
+
+      ! input/output variables:
+      INTEGER(iwp),           INTENT(in) :: icmp     	   ! component index
+      CHARACTER(len=*),       INTENT(in) :: compnam   	   ! component name
+      INTEGER(iwp),           INTENT(in) :: lu        	   ! land use type , lu = 1,...,nlu
+      LOGICAL,                INTENT(in) :: LAI_present
+      REAL(kind=wp),          INTENT(in) :: lai       	   ! one-sided leaf area index
+      REAL(kind=wp),          INTENT(in) :: glrad     	   ! global radiation (W/m2)
+      REAL(kind=wp),          INTENT(in) :: sinphi    	   ! sin of solar elevation angle
+      REAL(kind=wp),          INTENT(in) :: t         	   ! temperature (C)
+      REAL(kind=wp),          INTENT(in) :: rh        	   ! relative humidity (%)
+      REAL(kind=wp),          INTENT(in) :: diffc              ! diffusion coefficient of the gas involved
+      REAL(kind=wp),          INTENT(out):: gstom              ! stomatal conductance (m/s)
+      REAL(kind=wp), OPTIONAL,INTENT(in) :: p         	   ! pressure (Pa)
+
+
+      ! Local variables
+      REAL(kind=wp)                      :: vpd            ! vapour pressure deficit (kPa)
+
+      REAL(kind=wp), PARAMETER           :: dO3 = 0.13e-4  ! diffusion coefficient of ozon (m2/s)
+
+
+      SELECT CASE(trim(compnam))
+
+         !CASE('HNO3','N2O5','NO3','H2O2') this routine is not CALLed for HNO3
+
+      CASE('NO','CO')
+         ! for NO stomatal uptake is neglected:
+         gstom = 0.0
+
+      CASE('NO2','O3','SO2','NH3')
+
+         ! IF vegetation present:
+         IF (LAI_present) then
+
+            IF (glrad .gt. 0.0) then
+               CALL rc_get_vpd(t,rh,vpd)
+               CALL rc_gstom_emb( lu, glrad, t, vpd, LAI_present, lai, sinphi, gstom, p )
+               gstom = gstom*diffc/dO3       ! Gstom of Emberson is derived for ozone 
+            ELSE
+               gstom = 0.0
+            ENDIF
+         ELSE
+            ! no vegetation; zero conductance (infinite resistance):
+            gstom = 0.0
+         ENDIF
+
+      CASE default
+         message_string = 'Component '// trim(compnam) // ' not supported'
+         CALL message( 'rc_gstom', 'CM0459', 1, 2, 0, 6, 0 )
+      END SELECT
+
+    END SUBROUTINE rc_gstom
+
+
+
+!-------------------------------------------------------------------
+! rc_gstom_emb: stomatal conductance according to Emberson
+!-------------------------------------------------------------------
+    SUBROUTINE rc_gstom_emb( lu, glrad, T, vpd, LAI_present, lai, sinp, &
+         Gsto, p )
+      ! History
+      !   Original code from Lotos-Euros, TNO, M. Schaap
+      !   2009-08, M.C. van Zanten, Rivm
+      !     Updated and extended.
+      !   2009-09, Arjo Segers, TNO
+      !     Limitted temperature influence to range to avoid
+      !     floating point exceptions.
+      !
+      ! Method
+      !
+      !   Code based on Emberson et al, 2000, Env. Poll., 403-413
+      !   Notation conform Unified EMEP Model Description Part 1, ch 8
+      !
+      !   In the calculation of F_light the modification of L. Zhang 2001, AE to the PARshade and PARsun
+      !   parametrizations of Norman 1982 are applied
+      !
+      !   F_phen and F_SWP are set to 1
+      !
+      !   Land use types DEPAC versus Emberson (Table 5.1, EMEP model description)
+      !   DEPAC                     Emberson
+      !     1 = grass                 GR = grassland
+      !     2 = arable land           TC = temperate crops ( LAI according to RC = rootcrops)
+      !     3 = permanent crops       TC = temperate crops ( LAI according to RC = rootcrops)
+      !     4 = coniferous forest     CF = tempareate/boREAL(kind=wp) coniferous forest
+      !     5 = deciduous forest      DF = temperate/boREAL(kind=wp) deciduous forest
+      !     6 = water                 W  = water
+      !     7 = urban                 U  = urban
+      !     8 = other                 GR = grassland
+      !     9 = desert                DE = desert
+      !
+
+      ! Emberson specific declarations
+
+      ! Input/output variables:
+      INTEGER(iwp),               INTENT(in) :: lu                ! land use type, lu = 1,...,nlu
+      REAL(kind=wp),              INTENT(in) :: glrad             ! global radiation (W/m2)
+      REAL(kind=wp),              INTENT(in) :: T                 ! temperature (C)
+      REAL(kind=wp),              INTENT(in) :: vpd               ! vapour pressure deficit (kPa)
+      LOGICAL,                    INTENT(in) :: LAI_present
+      REAL(kind=wp),              INTENT(in) :: lai               ! one-sided leaf area index
+      REAL(kind=wp),              INTENT(in) :: sinp              ! sin of solar elevation angle
+      REAL(kind=wp),              INTENT(out):: Gsto              ! stomatal conductance (m/s)
+      REAL(kind=wp), OPTIONAL,    INTENT(in) :: p                 ! pressure (Pa)
+
+      ! Local variables:
+      REAL(kind=wp)                          ::  F_light, F_phen, F_temp, F_vpd, F_swp, bt, F_env
+      REAL(kind=wp)                          ::  pardir, pardiff, parshade, parsun, LAIsun, LAIshade, sinphi
+      REAL(kind=wp)                          ::  pres
+      REAL(kind=wp), PARAMETER               ::  p_sealevel = 1.01325e5    ! Pa
+
+
+      ! Check whether vegetation is present:
+      IF (LAI_present) then
+
+         ! calculation of correction factors for stomatal conductance
+         IF (sinp .le. 0.0) then  
+            sinphi = 0.0001
+         ELSE
+            sinphi = sinp
+         END IF
+
+         ! ratio between actual and sea-level pressure is used
+         ! to correct for height in the computation of par ;
+         ! should not exceed sea-level pressure therefore ...
+         IF ( present(p) ) then
+            pres = min( p, p_sealevel )
+         ELSE 
+            pres = p_sealevel
+         ENDIF
+
+         ! Direct and diffuse par, Photoactive (=visible) radiation:
+         CALL par_dir_diff( glrad, sinphi, pres, p_sealevel, pardir, pardiff )
+
+         ! par for shaded leaves (canopy averaged):
+         parshade = pardiff*exp(-0.5*LAI**0.7)+0.07*pardir*(1.1-0.1*LAI)*exp(-sinphi) ! Norman, 1982
+         IF (glrad .gt. 200 .and. LAI .gt. 2.5) then
+            parshade = pardiff*exp(-0.5*LAI**0.8)+0.07*pardir*(1.1-0.1*LAI)*exp(-sinphi) ! Zhang et al., 2001
+         END IF
+
+         ! par for sunlit leaves (canopy averaged):
+         ! alpha -> mean angle between leaves and the sun is fixed at 60 deg -> i.e. cos alpha = 0.5
+         parsun = pardir*0.5/sinphi + parshade ! Norman, 1982
+         IF (glrad .gt. 200 .and. LAI .gt. 2.5) then
+            parsun = pardir**0.8*0.5/sinphi + parshade ! Zhang et al., 2001
+         END IF
+
+         ! leaf area index for sunlit and shaded leaves:
+         IF (sinphi .gt. 0) then
+            LAIsun = 2*sinphi*(1-exp(-0.5*LAI/sinphi ))
+            LAIshade = LAI -LAIsun
+         ELSE
+            LAIsun = 0
+            LAIshade = LAI
+         END IF
+
+         F_light = (LAIsun*(1 - exp(-1.*alpha(lu)*parsun)) + LAIshade*(1 - exp(-1.*alpha(lu)*parshade)))/LAI 
+
+         F_light = max(F_light,F_min(lu))
+
+         !  temperature influence; only non-zero within range [Tmin,Tmax]:
+         IF ( (Tmin(lu) < T) .and. (T < Tmax(lu)) ) then
+            BT = (Tmax(lu)-Topt(lu))/(Topt(lu)-Tmin(lu))
+            F_temp = ((T-Tmin(lu))/(Topt(lu)-Tmin(lu))) * ((Tmax(lu)-T)/(Tmax(lu)-Topt(lu)))**BT
+         ELSE
+            F_temp = 0.0
+         END IF
+         F_temp = max(F_temp,F_min(lu))
+
+         ! vapour pressure deficit influence
+         F_vpd = min(1.,((1.-F_min(lu))*(vpd_min(lu)-vpd)/(vpd_min(lu)-vpd_max(lu)) + F_min(lu) ))
+         F_vpd = max(F_vpd,F_min(lu))
+
+         F_swp = 1.
+
+         ! influence of phenology on stom. conductance
+         ! ignored for now in DEPAC since influence of F_phen on lu classes in use is negligible.
+         ! When other EMEP classes (e.g. med. broadleaf) are used f_phen might be too important to ignore
+         F_phen = 1.
+
+         ! evaluate total stomatal conductance
+         F_env = F_temp*F_vpd*F_swp
+         F_env = max(F_env,F_min(lu))
+         gsto = G_max(lu) * F_light * F_phen * F_env
+
+         ! gstom expressed per m2 leafarea;
+         ! this is converted with LAI to m2 surface.
+         Gsto = lai*gsto    ! in m/s
+
+      ELSE
+         GSto = 0.0
+      ENDIF
+
+    END SUBROUTINE rc_gstom_emb
+
+
+
+!-------------------------------------------------------------------
+! par_dir_diff
+!-------------------------------------------------------------------
+    SUBROUTINE par_dir_diff(glrad,sinphi,pres,pres_0,par_dir,par_diff)
+      !
+      !     Weiss, A., Norman, J.M. (1985) Partitioning solar radiation into direct and
+      !     diffuse, visible and near-infrared components. Agric. Forest Meteorol.
+      !     34, 205-213.
+      !
+      !     From a SUBROUTINE obtained from Leiming Zhang (via Willem Asman),
+      !     MeteoroLOGICAL Service of Canada
+      !     e-mail: leiming.zhang@ec.gc.ca
+      !
+      !     Leiming uses solar irradiance. This should be equal to global radiation and
+      !     Willem Asman set it to global radiation
+
+      REAL(kind=wp),    INTENT(in)  :: glrad             ! global radiation (W m-2)
+      REAL(kind=wp),    INTENT(in)  :: sinphi            ! sine of the solar elevation
+      REAL(kind=wp),    INTENT(in)  :: pres              ! actual pressure (to correct for height) (Pa)
+      REAL(kind=wp),    INTENT(in)  :: pres_0            ! pressure at sea level (Pa)
+      REAL(kind=wp),    INTENT(out) :: par_dir           ! PAR direct : visible (photoactive) direct beam radiation (W m-2)
+      REAL(kind=wp),    INTENT(out) :: par_diff          ! PAR diffuse: visible (photoactive) diffuse radiation (W m-2)
+
+      !     fn              = near-infrared direct beam fraction (DIMENSIONless)
+      !     fv              = PAR direct beam fraction (DIMENSIONless)
+      !     ratio           = ratio measured to potential solar radiation (DIMENSIONless)
+      !     rdm             = potential direct beam near-infrared radiation (W m-2); "potential" means clear-sky
+      !     rdn             = potential diffuse near-infrared radiation (W m-2)
+      !     rdu             = visible (PAR) direct beam radiation (W m-2)
+      !     rdv             = potential visible (PAR) diffuse radiation (W m-2)
+      !     rn              = near-infrared radiation (W m-2)
+      !     rv              = visible radiation (W m-2)
+      !     ww              = water absorption in the near infrared for 10 mm of precipitable water
+
+      REAL(kind=wp) :: rdu,rdv,ww,rdm,rdn,rv,rn,ratio,sv,fv
+
+      !     Calculate visible (PAR) direct beam radiation
+      !     600 W m-2 represents average amount of PAR (400-700 nm wavelength)
+      !     at the top of the atmosphere; this is roughly 0.45*solar constant (solar constant=1320 Wm-2)
+      rdu=600.*exp(-0.185*(pres/pres_0)/sinphi)*sinphi
+
+      !     Calculate potential visible diffuse radiation
+      rdv=0.4*(600.- rdu)*sinphi
+
+      !     Calculate the water absorption in the-near infrared
+      ww=1320*10**( -1.195+0.4459*log10(1./sinphi)-0.0345*(log10(1./sinphi))**2 )
+
+      !     Calculate potential direct beam near-infrared radiation
+      rdm=(720.*exp(-0.06*(pres/pres_0)/sinphi)-ww)*sinphi     !720 = solar constant - 600
+
+      !     Calculate potential diffuse near-infrared radiation
+      rdn=0.6*(720-rdm-ww)*sinphi
+
+      ! Compute visible and near-infrared radiation
+      rv=max(0.1,rdu+rdv)
+      rn=max(0.01,rdm+rdn)
+
+      ! Compute ratio between input global radiation and total radiation computed here
+      ratio=min(0.9,glrad/(rv+rn))
+
+      !     Calculate total visible radiation
+      sv=ratio*rv
+
+      !     Calculate fraction of PAR in the direct beam
+      fv=min(0.99, (0.9-ratio)/0.7)            ! help variable
+      fv=max(0.01,rdu/rv*(1.0-fv**0.6667))     ! fraction of PAR in the direct beam
+
+      ! Compute direct and diffuse parts of PAR
+      par_dir=fv*sv
+      par_diff=sv-par_dir
+
+    END SUBROUTINE par_dir_diff
+
+!-------------------------------------------------------------------
+! rc_get_vpd: get vapour pressure deficit (kPa)
+!-------------------------------------------------------------------
+    SUBROUTINE rc_get_vpd(temp, relh,vpd)
+
+      IMPLICIT NONE
+
+      ! Input/output variables:
+      REAL(kind=wp)    , INTENT(in)  :: temp   ! temperature (C)
+      REAL(kind=wp)    , INTENT(in)  :: relh   ! relative humidity (%)
+      REAL(kind=wp)    , INTENT(out) :: vpd    ! vapour pressure deficit (kPa)
+
+      ! Local variables:
+      REAL(kind=wp) :: esat
+
+      ! fit PARAMETERs:
+      REAL(kind=wp), PARAMETER :: a1 = 6.113718e-1
+      REAL(kind=wp), PARAMETER :: a2 = 4.43839e-2
+      REAL(kind=wp), PARAMETER :: a3 = 1.39817e-3
+      REAL(kind=wp), PARAMETER :: a4 = 2.9295e-5
+      REAL(kind=wp), PARAMETER :: a5 = 2.16e-7
+      REAL(kind=wp), PARAMETER :: a6 = 3.0e-9
+
+      ! esat is saturation vapour pressure (kPa) at temp(C) following monteith(1973)
+      esat = a1 + a2*temp + a3*temp**2 + a4*temp**3 + a5*temp**4 + a6*temp**5
+      vpd  = esat * (1-relh/100)
+
+    END SUBROUTINE rc_get_vpd
+
+
+
+!-------------------------------------------------------------------
+! rc_gsoil_eff: compute effective soil conductance
+!-------------------------------------------------------------------
+    SUBROUTINE rc_gsoil_eff(icmp,lu,sai,ust,nwet,t,gsoil_eff)
+
+      ! Input/output variables:
+      INTEGER(iwp)    , INTENT(in)  :: icmp           ! component index
+      INTEGER(iwp)    , INTENT(in)  :: lu             ! land use type, lu = 1,...,nlu
+      REAL(kind=wp)   , INTENT(in)  :: sai            ! surface area index
+      REAL(kind=wp)   , INTENT(in)  :: ust            ! friction velocity (m/s)
+      INTEGER(iwp)    , INTENT(in)  :: nwet           ! index for wetness
+      ! nwet=0 -> dry; nwet=1 -> wet; nwet=9 -> snow
+      ! N.B. this routine cannot be CALLed with nwet = 9,
+      ! nwet = 9 should be handled outside this routine.
+      REAL(kind=wp)   , INTENT(in)  :: t              ! temperature (C)
+      REAL(kind=wp)   , INTENT(out) :: gsoil_eff      ! effective soil conductance (m/s)
+
+      ! local variables:
+      REAL(kind=wp)                 :: rinc           ! in canopy resistance  (s/m)
+      REAL(kind=wp)                 :: rsoil_eff      ! effective soil resistance (s/m)
+
+
+
+      ! Soil resistance (numbers matched with lu_classes and component numbers)
+      REAL(kind=wp), PARAMETER     :: rsoil(nlu_dep,ncmp) = reshape( (/ &
+                                ! grs    ara    crp    cnf    dec    wat    urb    oth    des    ice    sav    trf    wai    med    sem
+           1000.,  200.,  200.,  200.,  200., 2000.,  400., 1000., 2000., 2000., 1000.,  200., 2000.,  200.,  400., & ! O3
+           1000., 1000., 1000., 1000., 1000.,   10., 1000., 1000., 1000.,  500., 1000., 1000.,   10., 1000., 1000., & ! SO2
+           1000., 1000., 1000., 1000., 1000., 2000., 1000., 1000., 1000., 2000., 1000., 1000., 2000., 1000., 1000., & ! NO2
+           -999., -999., -999., -999., -999., 2000., 1000., -999., 2000., 2000., -999., -999., 2000., -999., -999., & ! NO
+           100.,  100.,  100.,  100.,  100.,   10.,  100.,  100.,  100., 1000.,  100.,  100.,   10.,  100.,  100.,  & ! NH3
+           -999., -999., -999., -999., -999., 2000., 1000., -999., 2000., 2000., -999., -999., 2000., -999., -999., & ! CO 
+           -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., & ! NO3 
+           -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., & ! HNO3
+           -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., & ! N2O5
+           -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999., -999. /),& ! H2O2   
+           (/nlu_dep,ncmp/) )
+
+      !  o3       so2       no2        no       nh3        co    no3   hno3   n2o5   h2o2
+
+
+      REAL(kind=wp), PARAMETER     :: rsoil_wet(ncmp)    = (/2000.,      10.,    2000.,    -999.,      10.,    -999., -999., -999., -999., -999./)
+      REAL(kind=wp), PARAMETER     :: rsoil_frozen(ncmp) = (/2000.,     500.,    2000.,    -999.,    1000.,    -999., -999., -999., -999., -999./)
+
+
+
+      ! Compute in canopy (in crop) resistance:
+      CALL rc_rinc(lu,sai,ust,rinc)
+
+      ! Check for missing deposition path:
+      IF (missing(rinc)) then
+         rsoil_eff = -9999.
+      ELSE
+         ! Frozen soil (temperature below 0):
+         IF (t .lt. 0.0) then
+            IF (missing(rsoil_frozen(icmp))) then
+               rsoil_eff = -9999.
+            ELSE
+               rsoil_eff = rsoil_frozen(icmp) + rinc
+            ENDIF
+         ELSE
+            ! Non-frozen soil; dry:
+            IF (nwet .eq. 0) then
+               IF (missing(rsoil(lu,icmp))) then
+                  rsoil_eff = -9999.
+               ELSE
+                  rsoil_eff = rsoil(lu,icmp) + rinc
+               ENDIF
+
+               ! Non-frozen soil; wet:
+            ELSEIF (nwet .eq. 1) then
+               IF (missing(rsoil_wet(icmp))) then
+                  rsoil_eff = -9999.
+               ELSE
+                  rsoil_eff = rsoil_wet(icmp) + rinc
+               ENDIF
+            ELSE
+               message_string = 'nwet can only be 0 or 1'
+               CALL message( 'rc_gsoil_eff', 'CM0460', 1, 2, 0, 6, 0 )
+            ENDIF
+         ENDIF
+      ENDIF
+
+      ! Compute conductance:
+      IF (rsoil_eff .gt. 0.0) then
+         gsoil_eff = 1./rsoil_eff
+      ELSE
+         gsoil_eff = 0.0
+      ENDIF
+
+    END SUBROUTINE rc_gsoil_eff
+
+
+
+!-------------------------------------------------------------------
+! rc_rinc: compute in canopy (or in crop) resistance
+! van Pul and Jacobs, 1993, BLM
+!-------------------------------------------------------------------
+    SUBROUTINE rc_rinc(lu,sai,ust,rinc)
+
+
+      ! Input/output variables:
+      INTEGER(iwp)    , INTENT(in)  :: lu          ! land use class, lu = 1, ..., nlu
+      REAL(kind=wp)   , INTENT(in)  :: sai         ! surface area index
+      REAL(kind=wp)   , INTENT(in)  :: ust         ! friction velocity (m/s)
+      REAL(kind=wp)   , INTENT(out) :: rinc        ! in canopy resistance (s/m)
+
+
+      ! b = empirical constant for computation of rinc (in canopy resistance) (= 14 m-1 or -999 IF not applicable)
+      ! h = vegetation height (m)                             grass arabl  crops conIF decid   water  urba   othr  desr   ice  sav  trf   wai   med semi
+      REAL(kind=wp), DIMENSION(nlu_dep), PARAMETER :: b = (/ -999,  14,    14,   14,   14,    -999,  -999, -999, -999, -999, -999, 14, -999, 14, 14 /)
+      REAL(kind=wp), DIMENSION(nlu_dep), PARAMETER :: h = (/ -999,  1,     1,    20,   20,    -999,  -999, -999, -999, -999, -999, 20,  -999, 1 ,  1 /)
+
+      ! Compute Rinc only for arable land, perm. crops, forest; otherwise Rinc = 0:
+      IF (b(lu) .gt. 0.0) then
+
+         ! Check for u* > 0 (otherwise denominator = 0):
+         IF (ust .gt. 0.0) then
+            rinc = b(lu)*h(lu)*sai/ust
+         ELSE
+            rinc = 1000.0
+         ENDIF
+      ELSE
+         IF (lu .eq. ilu_grass .or. lu .eq. ilu_other ) then
+            rinc = -999. ! no deposition path for grass, other, and semi-natural
+         ELSE
+            rinc = 0.0   ! no in-canopy resistance
+         ENDIF
+      ENDIF
+
+    END SUBROUTINE rc_rinc
+
+
+
+!-------------------------------------------------------------------
+! rc_rctot: compute total canopy (or surface) resistance Rc
+!-------------------------------------------------------------------
+    SUBROUTINE rc_rctot(gstom,gsoil_eff,gw,gc_tot,rc_tot)
+
+      ! Input/output variables:
+      REAL(kind=wp), INTENT(in)  :: gstom        ! stomatal conductance (s/m)
+      REAL(kind=wp), INTENT(in)  :: gsoil_eff    ! effective soil conductance (s/m)
+      REAL(kind=wp), INTENT(in)  :: gw           ! external leaf conductance (s/m)
+      REAL(kind=wp), INTENT(out) :: gc_tot       ! total canopy conductance (m/s)
+      REAL(kind=wp), INTENT(out) :: rc_tot       ! total canopy resistance Rc (s/m)
+
+      ! Total conductance:
+      gc_tot = gstom + gsoil_eff + gw
+
+      ! Total resistance (note: gw can be negative, but no total emission allowed here):
+      IF (gc_tot .le. 0.0 .or. gw .lt. 0.0) then
+         rc_tot = -9999.
+      ELSE
+         rc_tot = 1./gc_tot
+      ENDIF
+
+    END SUBROUTINE rc_rctot
+
+
+
+    !-------------------------------------------------------------------
+    ! rc_comp_point_rc_eff: calculate the effective resistance Rc
+    ! based on one or more compensation points
+    !-------------------------------------------------------------------
+    !
+    ! NH3rc (see depac v3.6 is based on Avero workshop Marc Sutton. p. 173.
+    ! Sutton 1998 AE 473-480)
+    !
+    ! Documentation by Ferd Sauter, 2008; see also documentation block in header of depac subroutine.
+    ! FS 2009-01-29: variable names made consistent with DEPAC 
+    ! FS 2009-03-04: use total compensation point
+    !
+    ! C: with total compensation point   ! D: approximation of C
+    !                                    !    with classical approach
+    !  zr --------- Catm                 !  zr --------- Catm    
+    !         |                          !         |       
+    !         Ra                         !         Ra      
+    !         |                          !         |       
+    !         Rb                         !         Rb      
+    !         |                          !         |       
+    !  z0 --------- Cc                   !  z0 --------- Cc
+    !         |                          !         |              
+    !        Rc                          !        Rc_eff          
+    !         |                          !         |              
+    !     --------- Ccomp_tot            !     --------- C=0
+    !
+    !
+    ! The effective Rc is defined such that instead of using
+    !
+    !   F = -vd*[Catm - Ccomp_tot]                                    (1)
+    !
+    ! we can use the 'normal' flux formula
+    !
+    !   F = -vd'*Catm,                                                (2)
+    !
+    ! with vd' = 1/(Ra + Rb + Rc')                                    (3)
+    !
+    ! and Rc' the effective Rc (rc_eff).
+    !                                                (Catm - Ccomp_tot)
+    ! vd'*Catm = vd*(Catm - Ccomp_tot) <=> vd' = vd* ------------------
+    !                                                      Catm
+    !
+    !                                        (Catm - Ccomp_tot)
+    ! 1/(Ra + Rb + Rc') = (1/Ra + Rb + Rc) * ------------------
+    !                                              Catm
+    !
+    !                                          Catm
+    ! (Ra + Rb + Rc') = (Ra + Rb + Rc) * ------------------
+    !                                     (Catm - Ccomp_tot)
+    !
+    !                              Catm
+    ! Rc' = (Ra + Rb + Rc) * ------------------ - Ra - Rb
+    !                        (Catm - Ccomp_tot)
+    !
+    !                        Catm                           Catm
+    ! Rc' = (Ra + Rb) [------------------ - 1 ] + Rc * ------------------
+    !                  (Catm - Ccomp_tot)              (Catm - Ccomp_tot)
+    !
+    ! Rc' = [(Ra + Rb)*Ccomp_tot + Rc*Catm ] / (Catm - Ccomp_tot)
+    !
+    ! This is not the most efficient way to DO this;
+    ! in the current LE version, (1) is used directly in the CALLing routine
+    ! and this routine is not used anymore.
+    !
+    ! -------------------------------------------------------------------------------------------
+    ! In fact it is the question IF this correct; note the difference in differential equations
+    !
+    !   dCatm                              !   dCatm
+    ! H ----- = F = -vd'*Catm,             ! H ----- = F = -vd*[Catm - Ccomp_tot],
+    !    dt                                !    dt
+    !
+    ! where in the left colum vd' is a function of Catm and not a constant anymore.
+    !
+    ! Another problem is that IF Catm -> 0, we end up with an infinite value of the exchange
+    ! velocity vd.
+    ! -------------------------------------------------------------------------------------------
+
+    SUBROUTINE rc_comp_point_rc_eff(ccomp_tot,catm,ra,rb,rc_tot,rc_eff)
+
+      IMPLICIT NONE
+
+      ! Input/output variables:
+      REAL(kind=wp), INTENT(in)  :: ccomp_tot  ! total compensation point (weighed average of separate compensation points) (ug/m3)
+      REAL(kind=wp), INTENT(in)  :: catm       ! atmospheric concentration (ug/m3)
+      REAL(kind=wp), INTENT(in)  :: ra         ! aerodynamic resistance (s/m)
+      REAL(kind=wp), INTENT(in)  :: rb         ! boundary layer resistance (s/m)
+      REAL(kind=wp), INTENT(in)  :: rc_tot     ! total canopy resistance (s/m)
+      REAL(kind=wp), INTENT(out) :: rc_eff     ! effective total canopy resistance (s/m)
+
+      ! Compute effective resistance:
+      IF ( ccomp_tot == 0.0 ) then
+         ! trace with no compensiation point ( or compensation point equal to zero)
+         rc_eff = rc_tot
+
+      ELSE IF ( ccomp_tot > 0 .and. ( abs( catm - ccomp_tot ) < 1.e-8 ) ) then
+         ! surface concentration (almoast) equal to atmospheric concentration
+         ! no exchange between surface and atmosphere, infinite RC --> vd=0
+         rc_eff = 9999999999.
+
+      ELSE IF ( ccomp_tot > 0 ) then
+         ! compensation point available, calculate effective restisance
+         rc_eff = ((ra + rb)*ccomp_tot + rc_tot*catm)/(catm-ccomp_tot)
+
+      ELSE
+         rc_eff = -999.
+         message_string = 'This should not be possible, check ccomp_tot'
+         CALL message( 'rc_comp_point_rc_eff', 'CM0461', 1, 2, 0, 6, 0 )
+      ENDIF
+
+      return
+    END SUBROUTINE rc_comp_point_rc_eff
+
+
+
+!-------------------------------------------------------------------
+! missing: check for data that correspond with a missing deposition path
+!          this data is represented by -999
+!-------------------------------------------------------------------
+
+    LOGICAL function missing(x)
+
+      REAL(kind=wp), INTENT(in) :: x
+
+      ! bandwidth for checking (in)equalities of floats
+      REAL(kind=wp), PARAMETER :: EPS = 1.0e-5
+
+      missing = (abs(x + 999.) .le. EPS)
+
+    END function missing
+
+
+
+    ELEMENTAL FUNCTION sedimentation_velocity(rhopart, partsize, slipcor, visc) RESULT (vs)
+
+
+      IMPLICIT NONE
+
+      ! --- in/out ---------------------------------
+
+      REAL(kind=wp), INTENT(in)        ::  rhopart    ! kg/m3
+      REAL(kind=wp), INTENT(in)        ::  partsize   ! m
+      REAL(kind=wp), INTENT(in)        ::  slipcor    ! m
+      REAL(kind=wp), INTENT(in)        ::  visc       ! viscosity
+      REAL(kind=wp)                    ::  vs
+
+      ! acceleration of gravity:
+      REAL(kind=wp), PARAMETER         ::  grav = 9.80665    ! m/s2
+
+      ! --- begin ----------------------------------
+
+      !viscosity & sedimentation velocity
+      vs = rhopart * (partsize**2) * grav * slipcor / (18*visc)
+
+    END FUNCTION sedimentation_velocity
+
+!------------------------------------------------------------------------
+! Boundary-layer deposition resistance following Zhang (2001)
+!------------------------------------------------------------------------
+    SUBROUTINE drydepo_aero_zhang_vd( vd, Rs, vs1, partsize, slipcor, &
+         nwet, tsurf, dens1, viscos1, &
+         luc, ftop_lu, ustar_lu)
+
+
+      IMPLICIT NONE  
+
+      ! --- in/out ---------------------------------
+
+      REAL(kind=wp), INTENT(out)        ::  vd          ! deposition velocity (m/s)
+      REAL(kind=wp), INTENT(out)        ::  Rs          ! Sedimentaion resistance (s/m)
+      REAL(kind=wp), INTENT(in)         ::  vs1         ! sedimentation velocity in lowest layer
+      REAL(kind=wp), INTENT(in)         ::  partsize    ! particle diameter (m)
+      REAL(kind=wp), INTENT(in)         ::  slipcor     ! slip correction factor
+      REAL(kind=wp), INTENT(in)         ::  tsurf       ! surface temperature (K)
+      REAL(kind=wp), INTENT(in)         ::  dens1       ! air density (kg/m3) in lowest layer
+      REAL(kind=wp), INTENT(in)         ::  viscos1     ! air viscosity in lowest layer
+      REAL(kind=wp), INTENT(in)         ::  ftop_lu     ! atmospheric resistnace Ra
+      REAL(kind=wp), INTENT(in)         ::  ustar_lu    ! friction velocity u*    
+
+      INTEGER(iwp),  INTENT(in)         ::  nwet        ! 1=rain, 9=snowcover
+      INTEGER(iwp),  INTENT(in)         ::  luc         ! DEPAC LU
+
+
+      ! --- const ----------------------------------
+
+
+
+      ! acceleration of gravity:
+      REAL(kind=wp), PARAMETER         ::  grav     = 9.80665    ! m/s2
+
+      REAL(kind=wp), PARAMETER         ::  beta     = 2.0
+      REAL(kind=wp), PARAMETER         ::  epsilon0 = 3.0
+      REAL(kind=wp), PARAMETER         ::  kb       = 1.38066e-23
+      REAL(kind=wp), PARAMETER         ::  pi = 3.141592654_wp  !< PI
+
+      REAL, PARAMETER :: alfa_lu(nlu_dep) = & 
+           (/1.2,  1.2,   1.2,  1.0,  1.0,   100.0, 1.5,  1.2, 50.0, 100.0, 1.2, 1.0, 100.0, 1.2, 50.0/)   
+      !           grass arabl  crops conif decid  water  urba  othr  desr  ice   sav   trf  wai   med  sem 
+      REAL, PARAMETER :: gamma_lu(nlu_dep) = &
+           (/0.54, 0.54,  0.54, 0.56, 0.56,  0.50,  0.56, 0.54, 0.58, 0.50, 0.54, 0.56, 0.50, 0.54, 0.54/) 
+      !           grass arabl  crops conif decid  water  urba  othr  desr  ice   sav   trf   wai   med   sem   
+      REAL, PARAMETER ::A_lu(nlu_dep) = &   
+           (/3.0,  3.0,   2.0,  2.0,  7.0,  -99.,   10.0, 3.0, -99., -99.,  3.0, 7.0, -99., 2.0, -99./)
+      !           grass arabl  crops conif decid  water  urba  othr  desr  ice   sav  trf   wai  med   sem     
+
+
+      ! --- local ----------------------------------
+
+      REAL(kind=wp)              ::  kinvisc, diff_part
+      REAL(kind=wp)              ::  schmidt,stokes, Ebrown, Eimpac, Einterc, Reffic
+
+      ! --- begin ----------------------------------
+
+      ! kinetic viscosity & diffusivity
+      kinvisc = viscos1 / dens1 ! only needed at surface
+
+      diff_part = kb * tsurf * slipcor / (3*pi*viscos1*partsize)
+
+      ! Schmidt number
+      schmidt = kinvisc / diff_part
+
+      ! calculate collection efficiencie E
+      Ebrown = Schmidt**(-gamma_lu(luc)) ! Brownian diffusion
+      ! determine Stokes number, interception efficiency 
+      ! and sticking efficiency R (1 = no rebound)
+      IF ( luc == ilu_ice .or. nwet.eq.9 .or. luc == ilu_water_sea .or. luc == ilu_water_inland ) THEN
+         stokes=vs1*ustar_lu**2/(grav*kinvisc)
+         Einterc=0.0
+         Reffic=1.0
+      ELSE IF ( luc == ilu_other .or. luc == ilu_desert ) THEN !tundra of desert
+         stokes=vs1*ustar_lu**2/(grav*kinvisc)
+         Einterc=0.0
+         Reffic=exp(-Stokes**0.5)
+      ELSE
+         stokes=vs1*ustar_lu/(grav*A_lu(luc)*1.e-3)
+         Einterc=0.5*(partsize/(A_lu(luc)*1e-3))**2
+         Reffic=exp(-Stokes**0.5)
+      END IF
+      ! when surface is wet all particles DO not rebound:
+      IF(nwet.eq.1) Reffic = 1.0
+      ! determine impaction efficiency:
+      Eimpac = ( stokes / (alfa_lu(luc)+stokes) )**beta
+
+      ! sedimentation resistance:
+      Rs = 1.0 / ( epsilon0 * ustar_lu * (Ebrown+Eimpac+Einterc) * Reffic )
+
+      ! deposition velocity according to Seinfeld and Pandis (= SP, 2006; eq 19.7):
+      !
+      !            1
+      !    vd = ------------------ + vs
+      !         Ra + Rs + Ra*Rs*vs
+      !
+      !    where: Rs = Rb (in SP, 2006)
+      !
+      !
+      vd = 1.0 / ( ftop_lu + Rs + ftop_lu*Rs*vs1) + vs1
+
+
+
+    END SUBROUTINE drydepo_aero_zhang_vd
+
+
+
+    SUBROUTINE get_rb_cell( is_water, z0h, ustar, diffc, Rb )    
+
+      ! Compute quasi-laminar boundary layer resistance as a function of landuse and tracer.
+      ! 
+      ! Original EMEP formulation by (Simpson et al, 2003) is used. 
+      !
+
+
+      IMPLICIT NONE
+
+      ! --- in/out ---------------------------------
+
+      LOGICAL      , INTENT(in)      ::  is_water
+      REAL(kind=wp), INTENT(in)      ::  z0h           ! roughness length for heat
+      REAL(kind=wp), INTENT(in)      ::  ustar         ! friction velocity
+      REAL(kind=wp), INTENT(in)      ::  diffc         ! coefficient of diffusivity
+      REAL(kind=wp), INTENT(out)     ::  Rb            ! boundary layer resistance
+
+      ! --- const ----------------------------------
+
+      ! thermal diffusivity of dry air 20 C
+      REAL(kind=wp), PARAMETER       ::  thk = 0.19e-4         ! http://en.wikipedia.org/wiki/Thermal_diffusivity  (@ T=300K)
+      REAL(kind=wp), PARAMETER       ::  kappa_stab = 0.35     ! von Karman constant
+
+      !  --- begin ---------------------------------
+
+
+      ! Use Simpson et al. (2003) 
+      !IF ( is_water ) THEN
+      !Rb = 1.0_wp / (kappa_stab*max(0.01_wp,ustar)) * log(z0h/diffc*kappa_stab*max(0.01_wp,ustar))
+      !TODO: Check Rb over water calculation!!!
+      !   Rb = 1.0_wp / (kappa_stab*max(0.1_wp,ustar)) * log(z0h/diffc*kappa_stab*max(0.1_wp,ustar))
+      !ELSE
+      Rb = 5.0_wp / max(0.01_wp,ustar) * (thk/diffc)**0.67_wp
+      !END IF
+
+    END SUBROUTINE get_rb_cell
+
+
+!-----------------------------------------------------------------
+!  Compute water vapor partial pressure (e_w)
+!  given specific humidity Q [(kg water)/(kg air)].
+!
+!  Use that gas law for volume V with temperature T
+!  holds for the total mixture as well as the water part:
+!
+!    R T / V = p_air / n_air = p_water / n_water
+!
+!  thus:
+!
+!    p_water = p_air n_water / n_air
+!
+!  Use:
+!    n_air =   m_air   /        xm_air
+!            [kg air]  /  [(kg air)/(mole air)]
+!  and:
+!    n_water =  m_air * Q  /     xm_water
+!              [kg water]  /  [(kg water)/(mole water)]
+!  thus:
+!    p_water = p_air Q / (xm_water/xm_air)
+!
+
+    ELEMENTAL FUNCTION watervaporpartialpressure( Q, p ) result ( p_w )
+
+
+      ! --- in/out ---------------------------------
+
+      REAL(kind=wp), INTENT(in)      ::  Q   ! specific humidity [(kg water)/(kg air)]
+      REAL(kind=wp), INTENT(in)      ::  p   ! air pressure [Pa]
+      REAL(kind=wp)                  ::  p_w  ! water vapor partial pressure [Pa]
+
+      ! --- const ----------------------------------
+
+      ! mole mass ratio:
+      REAL(kind=wp), PARAMETER  ::  eps = xm_H2O / xm_air  !  ~ 0.622
+
+      ! --- begin ----------------------------------
+
+      ! partial pressure of water vapor:
+      p_w = p * Q / eps
+
+    END function watervaporpartialpressure
+
+
+
+!------------------------------------------------------------------    
+!  Saturation vapor pressure.
+!  From (Stull 1988, eq. 7.5.2d):
+!
+!      e_sat = p0 exp( 17.67 * (T-273.16) / (T-29.66) )     [Pa]
+!
+!  where:
+!      p0 = 611.2 [Pa]   : reference pressure
+!
+!  Arguments:
+!      T  [K]  : air temperature
+!  Result:
+!      e_sat_w  [Pa]  : saturation vapor pressure
+!
+!  References:
+!      Roland B. Stull, 1988
+!      An introduction to boundary layer meteorology.
+!
+
+    ELEMENTAL FUNCTION saturationvaporpressure( T ) result( e_sat_w )
+
+
+      ! --- in/out ---------------------------------
+
+      REAL(kind=wp), INTENT(in)      ::  T        ! temperature [K]
+      REAL(kind=wp)                  ::  e_sat_w  ! saturation vapor pressure  [Pa]
+
+      ! --- const ----------------------------------
+
+      ! base pressure:
+      REAL(kind=wp), PARAMETER  ::  p0 = 611.2   ! [Pa]
+
+      ! --- begin ----------------------------------
+
+      ! saturation vapor pressure:
+      e_sat_w = p0 * exp( 17.67 * (T-273.16) / (T-29.66) )   ! [Pa]
+
+    END FUNCTION saturationvaporpressure
+
+
+
+!------------------------------------------------------------------------
+!  Relative humidity RH [%] is by definition:
+!
+!           e_w            # water vapor partial pressure
+!    Rh = -------- * 100
+!         e_sat_w          # saturation vapor pressure
+!
+!  Compute here from:
+!    Q specific humidity [(kg water)/(kg air)]
+!    T temperature [K]
+!    P pressure [Pa]
+!
+    
+    ELEMENTAL FUNCTION relativehumidity_from_specifichumidity( Q, T, p ) result( Rh )
+
+
+      ! --- in/out ---------------------------------
+
+      REAL(kind=wp), INTENT(in)      ::  Q   ! specific humidity [(kg water)/(kg air)]
+      REAL(kind=wp), INTENT(in)      ::  T   ! temperature [K]
+      REAL(kind=wp), INTENT(in)      ::  p   ! air pressure [Pa]
+      REAL(kind=wp)                  ::  Rh  ! relative humidity [%]
+
+      ! --- begin ----------------------------------
+
+      ! relative humidity:
+      Rh = watervaporpartialpressure( Q, p ) / saturationvaporpressure( T ) * 100.0
+
+    END FUNCTION relativehumidity_from_specifichumidity
+
+
+     
+ END MODULE chemistry_model_mod
+
Index: /palm/tags/release-6.0/SOURCE/close_file.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/close_file.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/close_file.f90	(revision 3477)
@@ -0,0 +1,277 @@
+!> @file close_file.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables and format statements removed
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! z_max_do2d removed and output case 108 disabled
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2300 2017-06-29 13:31:14Z raasch
+! -host
+! 
+! 2277 2017-06-12 10:47:51Z kanani
+! Removed unused variables do2d_xy_n, do2d_xz_n, do2d_yz_n, do3d_avs_n
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! -Close file containing flight data
+! -Some tabs removed.
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! parts concerning iso2d and avs output removed
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented
+!
+! 964 2012-07-26 09:14:24Z raasch
+! old profil-units (40:49) and respective code removed
+!
+! Revision 1.1 (close_files) 1997/08/11 06:11:18  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Close specified file or all open files, if "0" has been given as the
+!> calling argument. In that case, execute last actions for certain unit 
+!> numbers, if required.
+!------------------------------------------------------------------------------!
+ SUBROUTINE close_file( file_id )
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  max_masks, mid, openfile
+                
+    USE kinds
+    
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_interface,                                                      &
+        ONLY:  id_set_mask, id_set_pr, id_set_pts, id_set_sp,                  &
+               id_set_ts, id_set_xy, id_set_xz, id_set_yz, id_set_3d,          &
+               id_set_fl, nc_stat, netcdf_data_format, netcdf_handle_error
+                
+    USE pegrid                                           
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=10)  ::  datform = 'lit_endian' !< 
+    CHARACTER (LEN=80)  ::  title                  !< 
+
+    INTEGER(iwp) ::  av           !< 
+    INTEGER(iwp) ::  dimx         !< 
+    INTEGER(iwp) ::  dimy         !< 
+    INTEGER(iwp) ::  fid          !< 
+    INTEGER(iwp) ::  file_id      !< 
+    INTEGER(iwp) ::  planz        !< 
+
+    LOGICAL ::  checkuf = .TRUE.  !< 
+    LOGICAL ::  datleg = .TRUE.   !< 
+    LOGICAL ::  dbp = .FALSE.     !< 
+
+    NAMELIST /GLOBAL/  checkuf, datform, dimx, dimy, dbp, planz,               &
+                       title
+    NAMELIST /RAHMEN/  datleg
+
+!
+!-- Close specified unit number (if opened) and set a flag that it has
+!-- been opened one time at least
+    IF ( file_id /= 0 )  THEN
+       IF ( openfile(file_id)%opened )  THEN
+          CLOSE ( file_id )
+          openfile(file_id)%opened        = .FALSE.
+          openfile(file_id)%opened_before = .TRUE.
+       ENDIF
+       RETURN
+    ENDIF
+
+!
+!-- Close all open unit numbers
+    DO  fid = 1, 200+2*max_masks
+
+       IF ( openfile(fid)%opened .OR. openfile(fid)%opened_before )  THEN
+!
+!--       Last actions for certain unit numbers
+          SELECT CASE ( fid )
+
+#if defined( __netcdf )
+             CASE ( 101 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_xy(0) )
+                   CALL netcdf_handle_error( 'close_file', 44 )
+                ENDIF
+
+             CASE ( 102 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_xz(0) )
+                   CALL netcdf_handle_error( 'close_file', 45 )
+                ENDIF
+
+             CASE ( 103 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_yz(0) )
+                   CALL netcdf_handle_error( 'close_file', 46 )
+                ENDIF
+
+             CASE ( 104 )
+
+                IF ( myid == 0 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_pr )
+                   CALL netcdf_handle_error( 'close_file', 47 )
+                ENDIF
+
+             CASE ( 105 )
+
+                IF ( myid == 0 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_ts )
+                   CALL netcdf_handle_error( 'close_file', 48 )
+                ENDIF
+
+             CASE ( 106 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_3d(0) )
+                   CALL netcdf_handle_error( 'close_file', 49 )
+                ENDIF
+
+             CASE ( 107 )
+
+                IF ( myid == 0 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_sp )
+                   CALL netcdf_handle_error( 'close_file', 50 )
+                ENDIF
+
+!
+!--           Currently disabled
+!             CASE ( 108 )
+
+!                nc_stat = NF90_CLOSE( id_set_prt )
+!                CALL netcdf_handle_error( 'close_file', 51 )
+
+             CASE ( 109 ) 
+
+                nc_stat = NF90_CLOSE( id_set_pts )
+                CALL netcdf_handle_error( 'close_file', 412 )
+
+             CASE ( 111 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_xy(1) )
+                   CALL netcdf_handle_error( 'close_file', 52 )
+                ENDIF
+
+             CASE ( 112 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_xz(1) )
+                   CALL netcdf_handle_error( 'close_file', 352 )
+                ENDIF
+
+             CASE ( 113 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_yz(1) )
+                   CALL netcdf_handle_error( 'close_file', 353 )
+                ENDIF
+
+             CASE ( 116 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_3d(1) )
+                   CALL netcdf_handle_error( 'close_file', 353 )
+                ENDIF
+
+             CASE ( 199 )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_CLOSE( id_set_fl )
+                   CALL netcdf_handle_error( 'close_file', 353 )
+                ENDIF
+
+             CASE ( 201:200+2*max_masks )
+
+                IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+!
+!--                decompose fid into mid and av
+                   IF ( fid <= 200+max_masks )  THEN
+                      mid = fid - 200
+                      av = 0
+                   ELSE
+                      mid = fid - (200+max_masks)
+                      av = 1
+                   ENDIF
+                   nc_stat = NF90_CLOSE( id_set_mask(mid,av) )
+                   CALL netcdf_handle_error( 'close_file', 459 )
+
+                ENDIF
+
+#endif
+
+          END SELECT
+!
+!--       Close file
+          IF ( openfile(fid)%opened )  CLOSE ( fid )
+
+       ENDIF
+
+    ENDDO
+
+ END SUBROUTINE close_file
Index: /palm/tags/release-6.0/SOURCE/compute_vpt.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/compute_vpt.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/compute_vpt.f90	(revision 3477)
@@ -0,0 +1,103 @@
+!> @file compute_vpt.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 803 2012-01-16 15:48:46Z franke
+! Bugfix: wrong factor in calculation of vpt in case of cloud droplets
+!
+! Revision 1.1  2000/04/13 14:40:53  schroeter
+! Initial revision
+!
+!
+! Description:
+! -------------
+!> Computation of the virtual potential temperature 
+!------------------------------------------------------------------------------!
+ SUBROUTINE compute_vpt
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt, q, ql, vpt, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  lv_d_cp
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzt
+
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: k   !< 
+
+    IF ( .NOT. bulk_cloud_model  .AND.  .NOT. cloud_droplets )  THEN
+       vpt = pt * ( 1.0_wp + 0.61_wp * q )
+    ELSE IF (bulk_cloud_model)  THEN
+       DO  k = nzb, nzt+1
+          vpt(k,:,:) = ( pt(k,:,:) + d_exner(k) * lv_d_cp * ql(k,:,:) ) *      &
+                       ( 1.0_wp + 0.61_wp * q(k,:,:) - 1.61_wp * ql(k,:,:) ) 
+       ENDDO
+    ELSE
+       vpt = pt * ( 1.0_wp + 0.61_wp * q - ql ) 
+    ENDIF
+
+ END SUBROUTINE compute_vpt
Index: /palm/tags/release-6.0/SOURCE/coriolis.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/coriolis.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/coriolis.f90	(revision 3477)
@@ -0,0 +1,288 @@
+!> @file coriolis.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Remove masking of geostrophic wind forcing in offline nesting case
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Forcing implemented, preliminary (MS)
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! 
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator version (*_acc) added
+!
+! Revision 1.1  1997/08/29 08:57:38  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Computation of all Coriolis terms in the equations of motion.
+!------------------------------------------------------------------------------!
+ MODULE coriolis_mod
+ 
+
+    PRIVATE
+    PUBLIC coriolis
+
+    INTERFACE coriolis
+       MODULE PROCEDURE coriolis
+       MODULE PROCEDURE coriolis_ij
+    END INTERFACE coriolis
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE coriolis( component )
+
+       USE arrays_3d,                                                          &
+           ONLY:  tend, u, ug, v, vg, w 
+           
+       USE control_parameters,                                                 &
+           ONLY:  f, fs, message_string
+           
+       USE indices,                                                            &
+           ONLY:  nxl, nxlu, nxr, nyn, nys, nysv, nzb, nzt, wall_flags_0
+                   
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  component  !< 
+       INTEGER(iwp) ::  i          !< running index x direction 
+       INTEGER(iwp) ::  j          !< running index y direction 
+       INTEGER(iwp) ::  k          !< running index z direction 
+
+       REAL(wp)     ::  flag           !< flag to mask topography
+
+!
+!--    Compute Coriolis terms for the three velocity components
+       SELECT CASE ( component )
+
+!
+!--       u-component
+          CASE ( 1 )
+             DO  i = nxlu, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+!
+!--                   Predetermine flag to mask topography
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 1 ) )
+
+                      tend(k,j,i) = tend(k,j,i) + f  *    ( 0.25_wp *          &
+                                   ( v(k,j,i-1) + v(k,j,i) + v(k,j+1,i-1) +    &
+                                     v(k,j+1,i) ) - vg(k) ) * flag             &
+                                                - fs *    ( 0.25_wp *          &
+                                   ( w(k-1,j,i-1) + w(k-1,j,i) + w(k,j,i-1) +  &
+                                     w(k,j,i)   )                              &
+                                                          ) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+
+!
+!--       v-component
+          CASE ( 2 )
+             DO  i = nxl, nxr
+                DO  j = nysv, nyn
+                   DO  k = nzb+1, nzt
+!
+!--                   Predetermine flag to mask topography
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 2 ) )
+
+                      tend(k,j,i) = tend(k,j,i) - f *     ( 0.25_wp *          &
+                                   ( u(k,j-1,i) + u(k,j,i) + u(k,j-1,i+1) +    &
+                                     u(k,j,i+1) ) - ug(k) ) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+
+!
+!--       w-component
+          CASE ( 3 )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+!
+!--                   Predetermine flag to mask topography
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 3 ) )
+
+                      tend(k,j,i) = tend(k,j,i) + fs * 0.25_wp *               &
+                                   ( u(k,j,i) + u(k+1,j,i) + u(k,j,i+1) +      &
+                                     u(k+1,j,i+1) ) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE DEFAULT
+
+             WRITE( message_string, * ) ' wrong component: ', component
+             CALL message( 'coriolis', 'PA0173', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+    END SUBROUTINE coriolis
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE coriolis_ij( i, j, component )
+
+       USE arrays_3d,                                                          &
+           ONLY:  tend, u, ug, v, vg, w 
+           
+       USE control_parameters,                                                 &
+           ONLY:  f, fs, message_string
+           
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+           
+       USE kinds
+       
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  component  !< 
+       INTEGER(iwp) ::  i          !< running index x direction 
+       INTEGER(iwp) ::  j          !< running index y direction 
+       INTEGER(iwp) ::  k          !< running index z direction 
+
+       REAL(wp)     ::  flag       !< flag to mask topography
+
+!
+!--    Compute Coriolis terms for the three velocity components
+       SELECT CASE ( component )
+
+!
+!--       u-component
+          CASE ( 1 )
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 1 ) )
+
+                tend(k,j,i) = tend(k,j,i) + f  *     ( 0.25_wp *               &
+                                ( v(k,j,i-1) + v(k,j,i) + v(k,j+1,i-1) +       &
+                                  v(k,j+1,i) ) - vg(k)                         &
+                                                     ) * flag                  &
+                                          - fs *     ( 0.25_wp *               &
+                                ( w(k-1,j,i-1) + w(k-1,j,i) + w(k,j,i-1) +     &
+                                  w(k,j,i)   )       ) * flag
+             ENDDO
+
+!
+!--       v-component
+          CASE ( 2 )
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 2 ) )
+
+                tend(k,j,i) = tend(k,j,i) - f *        ( 0.25_wp *             &
+                                ( u(k,j-1,i) + u(k,j,i) + u(k,j-1,i+1) +       &
+                                  u(k,j,i+1) ) - ug(k) ) * flag
+             ENDDO
+
+!
+!--       w-component
+          CASE ( 3 )
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 3 ) )
+
+                tend(k,j,i) = tend(k,j,i) + fs * 0.25_wp *                     &
+                                ( u(k,j,i) + u(k+1,j,i) + u(k,j,i+1) +         &
+                                  u(k+1,j,i+1) ) * flag
+             ENDDO
+
+          CASE DEFAULT
+
+             WRITE( message_string, * ) ' wrong component: ', component
+             CALL message( 'coriolis', 'PA0173', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+    END SUBROUTINE coriolis_ij
+
+ END MODULE coriolis_mod
Index: /palm/tags/release-6.0/SOURCE/cpulog_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/cpulog_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/cpulog_mod.f90	(revision 3477)
@@ -0,0 +1,609 @@
+!> @file cpulog_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix in maximum time spent per log point: PE 0 was beeing ignored.
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3028 2018-05-23 10:27:23Z knoop
+! renamed d3par to runtime_parameters
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2266 2017-06-09 09:27:21Z raasch
+! bugfix: cpu-time per grid point is now calculated using ngp_3d in order to
+! avoid integer overflow,
+! some re-formatting
+! 
+! 2119 2017-01-17 16:51:50Z raasch
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC relevant code removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1931 2016-06-10 12:06:59Z suehring
+! Adjustment in character length and format statement
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! cpu measurements are done with standard FORTRAN routine on every machine
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages added
+!
+! 1369 2014-04-24 05:57:38Z raasch
+! routine description added
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! 
+! 1318 2014-03-17 13:35:16Z raasch
+! former files/routines cpu_log and cpu_statistics combined to one module,
+! which also includes the former data module cpulog from the modules-file
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/07/24 11:12:29  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> CPU-time measurements for any program part whatever. Results of the
+!> measurements are output at the end of the run in local file CPU_MEASURES.
+!>
+!> To measure the CPU-time (better to say the wallclock time) of a specific code
+!> segment, two calls of cpu_log have to be used as brackets in front and at the
+!> end of the segment:
+!>
+!>     CALL cpu_log( log_point(n), 'any identifier', 'start' )
+!>       ... code segment ...
+!>     CALL cpu_log( log_point(n), 'any identifier', 'stop' )
+!>
+!> Parts of the code segment can be excluded from the measurement by additional
+!> call of cpu_log:
+!>
+!>       ... first segment to be measured
+!>     CALL cpu_log( log_point(n), 'any identifier', 'pause' )
+!>       ... oart of segment to be excluded from measurement
+!>     CALL cpu_log( log_point(n), 'any identifier', 'continue' )
+!>       ... second segment to be mesasured
+!>
+!> n is an INTEGER within the interval [1,100] defining the id of the specific
+!> code segment, 'any identifier' is a string describing the code segment to be
+!> measured. It can be freely chosen and results will appear under this name in
+!> file CPU_MEASURES. ids can only be used once. If you like to do a
+!> measurement of a new part of the code, please look for an id which is unused
+!> ao far.
+!>
+!> runtime_parameters-parameter cpu_log_barrierwait can be used to set an MPI 
+!> barrier at the beginning of the measurement (modus 'start' or 'continue'), 
+!> to avoid that idle times (due to MPI calls in the code segment, which are
+!> waiting for other processes to be finished) affect the measurements.
+!> If barriers shall not be used at all, a fourth, optional parameter has to be
+!> given:
+!>
+!>     CALL cpu_log( ..., ..., 'start', cpu_log_nowait )
+!>
+!> Variable log_point should be used for non-overlapping code segments, and they
+!> should sum up to the total cpu-time required by the complete run.
+!> Variable log_point_s can be used for any other special (s) measurements.
+!------------------------------------------------------------------------------!
+ MODULE cpulog
+ 
+
+    USE control_parameters,                                                    &
+        ONLY: message_string, nr_timesteps_this_run, run_description_header,   &
+              synchronous_exchange
+               
+    USE indices,                                                               &
+        ONLY: ngp_3d, nx, ny, nz
+        
+    USE kinds
+    
+    USE pegrid
+
+    IMPLICIT NONE
+
+    PRIVATE
+    PUBLIC   cpu_log, cpu_log_barrierwait, cpu_log_nowait, cpu_statistics,     &
+             initial_wallclock_time, log_point, log_point_s
+
+    INTERFACE cpu_log
+       MODULE PROCEDURE cpu_log
+    END INTERFACE cpu_log
+
+    INTERFACE cpu_statistics
+       MODULE PROCEDURE cpu_statistics
+    END INTERFACE cpu_statistics
+
+    INTEGER(iwp), PARAMETER ::  cpu_log_continue = 0  !< 
+    INTEGER(iwp), PARAMETER ::  cpu_log_pause = 1     !< 
+    INTEGER(iwp), PARAMETER ::  cpu_log_start = 2     !< 
+    INTEGER(iwp), PARAMETER ::  cpu_log_stop = 3      !< 
+
+    LOGICAL            ::  cpu_log_barrierwait = .FALSE.  !< 
+    LOGICAL, PARAMETER ::  cpu_log_nowait = .FALSE.       !< 
+
+    REAL(wp) ::  initial_wallclock_time  !< 
+
+    TYPE logpoint
+       REAL(wp)           ::  isum       !< 
+       REAL(wp)           ::  ivect      !< 
+       REAL(wp)           ::  mean       !< 
+       REAL(wp)           ::  mtime      !< 
+       REAL(wp)           ::  mtimevec   !< 
+       REAL(wp)           ::  sum        !< 
+       REAL(wp)           ::  vector     !< 
+       INTEGER(iwp)       ::  counts     !< 
+       CHARACTER (LEN=25) ::  place      !< 
+    END TYPE logpoint
+
+    TYPE(logpoint), DIMENSION(100) ::  log_point = logpoint( 0.0_wp, 0.0_wp,   &
+                                       0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, &
+                                       0, ' ' )
+    TYPE(logpoint), DIMENSION(100) ::  log_point_s = logpoint( 0.0_wp, 0.0_wp, &
+                                       0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, &
+                                       0, ' ' )
+
+    SAVE
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE cpu_log( log_event, place, modus, barrierwait )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  modus              !< 
+       CHARACTER (LEN=*) ::  place              !< 
+       
+       LOGICAL           ::  wait_allowed       !< 
+       LOGICAL, OPTIONAL ::  barrierwait        !< 
+       LOGICAL, SAVE     ::  first = .TRUE.     !< 
+       
+       REAL(wp)          ::  mtime = 0.0_wp     !< 
+       REAL(wp)          ::  mtimevec = 0.0_wp  !< 
+       TYPE(logpoint)    ::  log_event          !< 
+
+       INTEGER(idp)     ::  count        !< 
+       INTEGER(idp)     ::  count_rate   !< 
+
+
+!
+!--    Initialize and check, respectively, point of measurement
+       IF ( log_event%place == ' ' )  THEN
+          log_event%place = place
+       ELSEIF ( log_event%place /= place )  THEN
+          WRITE( message_string, * ) 'wrong argument expected: ',              &
+                            TRIM(log_event%place), ' given: ',  TRIM( place )
+          CALL message( 'cpu_log', 'PA0174', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    Determine, if barriers are allowed to set
+       IF ( PRESENT( barrierwait ) )  THEN
+          wait_allowed = barrierwait
+       ELSE
+          wait_allowed = .TRUE.
+       ENDIF
+
+!
+!--    MPI barrier, if requested, in order to avoid measuring wait times
+!--    caused by MPI routines waiting for other MPI routines of other
+!--    PEs that have not yet finished
+#if defined( __parallel )
+       IF ( cpu_log_barrierwait  .AND.  wait_allowed  .AND.                    &
+            ( modus == 'start'  .OR.  modus == 'continue' ) )  THEN
+          CALL MPI_BARRIER( comm2d, ierr )
+       ENDIF
+#endif
+
+!
+!--    Take current time
+       CALL SYSTEM_CLOCK( count, count_rate )
+       mtime = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
+
+!
+!--    Start, stop or pause measurement
+       IF ( modus == 'start'  .OR.  modus == 'continue' )  THEN
+          log_event%mtime    = mtime
+          log_event%mtimevec = mtimevec
+       ELSEIF ( modus == 'pause' )  THEN
+          IF ( ( mtime - log_event%mtime ) < 0.0  .AND.  first )  THEN
+             WRITE( message_string, * ) 'negative time interval occured',      &
+                         '&PE',myid,' L=PAUSE "',TRIM(log_event%place),        &
+                         '" new=', mtime,' last=',log_event%mtime
+             CALL message( 'cpu_log', 'PA0176', 0, 1, -1, 6, 0 )
+             first = .FALSE.
+          ENDIF
+          log_event%isum     = log_event%isum + mtime - log_event%mtime
+          log_event%ivect    = log_event%ivect  + mtimevec - log_event%mtimevec
+       ELSEIF ( modus == 'stop' )  THEN
+          IF ( ( mtime - log_event%mtime + log_event%isum ) < 0.0  .AND.       &
+               first )  THEN
+             WRITE( message_string, * ) 'negative time interval occured',      &
+                       '&PE',myid,' L=STOP "',TRIM(log_event%place),'" new=',  &
+                       mtime,' last=',log_event%mtime,' isum=',log_event%isum
+             CALL message( 'cpu_log', 'PA0177', 0, 1, -1, 6, 0 )
+             first = .FALSE.
+          ENDIF
+          log_event%mtime    = mtime    - log_event%mtime    + log_event%isum
+          log_event%mtimevec = mtimevec - log_event%mtimevec + log_event%ivect
+          log_event%sum      = log_event%sum  + log_event%mtime
+          IF ( log_event%sum < 0.0  .AND.  first )  THEN
+             WRITE( message_string, * ) 'negative time interval occured',      &
+                       '&PE',myid,' L=STOP "',TRIM(log_event%place),'" sum=',  &
+                       log_event%sum,' mtime=',log_event%mtime
+             CALL message( 'cpu_log', 'PA0178', 0, 1, -1, 6, 0 )
+             first = .FALSE.
+          ENDIF
+          log_event%vector   = log_event%vector + log_event%mtimevec
+          log_event%counts   = log_event%counts + 1
+          log_event%isum     = 0.0_wp
+          log_event%ivect    = 0.0_wp
+       ELSE
+          message_string = 'unknown modus of time measurement: ' //            &
+                           TRIM( modus )
+          CALL message( 'cpu_log', 'PA0179', 0, 1, -1, 6, 0 )
+       ENDIF
+
+    END SUBROUTINE cpu_log
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Analysis and output of the cpu-times measured. All PE results are collected
+!> on PE0 in order to calculate the mean cpu-time over all PEs and other
+!> statistics. The output is sorted according to the amount of cpu-time consumed
+!> and output on PE0.
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE cpu_statistics
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)    ::  i               !< 
+       INTEGER(iwp)    ::  ii(1)           !< 
+       INTEGER(iwp)    ::  iii             !< 
+       INTEGER(iwp)    ::  sender          !< 
+       REAL(wp)       ::  average_cputime  !< 
+       REAL(wp), SAVE ::  norm = 1.0_wp    !< 
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_max        !< 
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_min        !< 
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_rms        !< 
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  pe_tmp        !< 
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  sum           !< 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pe_log_points !< 
+
+
+       CALL location_message( 'calculating cpu statistics', .FALSE. )
+
+!
+!--    Compute cpu-times in seconds
+       log_point%mtime  = log_point%mtime  / norm
+       log_point%sum    = log_point%sum    / norm
+       log_point%vector = log_point%vector / norm
+       WHERE ( log_point%counts /= 0 )
+          log_point%mean = log_point%sum / log_point%counts
+       END WHERE
+
+
+!
+!--    Collect cpu-times from all PEs and calculate statistics
+       IF ( myid == 0 )  THEN
+!
+!--       Allocate and initialize temporary arrays needed for statistics
+          ALLOCATE( pe_max( SIZE( log_point ) ), pe_min( SIZE( log_point ) ),  &
+                    pe_rms( SIZE( log_point ) ), pe_tmp( SIZE( log_point ) ),  &
+                    pe_log_points( SIZE( log_point ), 0:numprocs-1 ) )
+          pe_min = log_point%sum
+          pe_max = log_point%sum    ! need to be set in case of 1 PE
+          pe_rms = 0.0_wp
+          pe_tmp = 0.0_wp
+
+#if defined( __parallel )
+!
+!--       Receive data from all PEs
+          DO  i = 1, numprocs-1
+             CALL MPI_RECV( pe_tmp(1), SIZE( log_point ), MPI_REAL,            &
+                            i, i, comm2d, status, ierr )
+             sender = status(MPI_SOURCE)
+             pe_log_points(:,sender) = pe_tmp
+          ENDDO
+          pe_log_points(:,0) = log_point%sum   ! Results from PE0
+!
+!--       Calculate mean of all PEs, store it on log_point%sum
+!--       and find minimum and maximum
+          DO  iii = 1, SIZE( log_point )
+             DO  i = 1, numprocs-1
+                log_point(iii)%sum = log_point(iii)%sum + pe_log_points(iii,i)
+                pe_min(iii) = MIN( pe_min(iii), pe_log_points(iii,i) )
+                pe_max(iii) = MAX( pe_max(iii), pe_log_points(iii,i) )
+             ENDDO
+             log_point(iii)%sum = log_point(iii)%sum / numprocs
+!
+!--          Calculate rms
+             DO  i = 0, numprocs-1
+                pe_rms(iii) = pe_rms(iii) + (                                  &
+                                    pe_log_points(iii,i) - log_point(iii)%sum  &
+                                            )**2
+             ENDDO
+             pe_rms(iii) = SQRT( pe_rms(iii) / numprocs )
+          ENDDO
+       ELSE
+!
+!--       Send data to PE0 (pe_max is used as temporary storage to send
+!--       the data in order to avoid sending the data type log)
+          ALLOCATE( pe_max( SIZE( log_point ) ) )
+          pe_max = log_point%sum
+          CALL MPI_SEND( pe_max(1), SIZE( log_point ), MPI_REAL, 0, myid,      &
+                         comm2d, ierr )
+#endif
+
+       ENDIF
+
+!
+!--    Write cpu-times
+       IF ( myid == 0 )  THEN
+!
+!--       Re-store sums
+          ALLOCATE( sum( SIZE( log_point ) ) )
+          WHERE ( log_point%counts /= 0 )
+             sum = log_point%sum
+          ELSEWHERE
+             sum = -1.0_wp
+          ENDWHERE
+
+!
+!--       Get total time in order to calculate CPU-time per gridpoint and
+!--       timestep
+          IF ( nr_timesteps_this_run /= 0 )  THEN
+             average_cputime = log_point(1)%sum / REAL( ngp_3d(0), KIND=wp ) / &
+                               REAL( nr_timesteps_this_run, KIND=wp ) * 1E6_wp
+                               ! in micro-sec
+          ELSE
+             average_cputime = -1.0_wp
+          ENDIF
+
+!
+!--       Write cpu-times sorted by size
+          CALL check_open( 18 )
+#if defined( __parallel )
+          WRITE ( 18, 100 )  TRIM( run_description_header ),                   &
+                             numprocs * threads_per_task, pdims(1), pdims(2),  &
+                             threads_per_task, nx+1, ny+1, nz,                 &
+                             nr_timesteps_this_run, average_cputime
+
+          WRITE ( 18, 110 )
+#else
+          WRITE ( 18, 100 )  TRIM( run_description_header ),                   &
+                             numprocs * threads_per_task, 1, 1,                &
+                             threads_per_task, nx+1, ny+1, nz,                 &
+                             nr_timesteps_this_run, average_cputime
+
+          WRITE ( 18, 110 )
+#endif
+          DO
+             ii = MAXLOC( sum )
+             i = ii(1)
+             IF ( sum(i) /= -1.0_wp )  THEN
+                WRITE ( 18, 102 ) &
+              log_point(i)%place, log_point(i)%sum,                            &
+                   log_point(i)%sum / log_point(1)%sum * 100.0_wp,             &
+                   log_point(i)%counts, pe_min(i), pe_max(i), pe_rms(i)
+                sum(i) = -1.0_wp
+             ELSE
+                EXIT
+             ENDIF
+          ENDDO
+       ENDIF
+
+
+!
+!--    The same procedure again for the individual measurements.
+!
+!--    Compute cpu-times in seconds
+       log_point_s%mtime  = log_point_s%mtime  / norm
+       log_point_s%sum    = log_point_s%sum    / norm
+       log_point_s%vector = log_point_s%vector / norm
+       WHERE ( log_point_s%counts /= 0 )
+          log_point_s%mean = log_point_s%sum / log_point_s%counts
+       END WHERE
+
+!
+!--    Collect cpu-times from all PEs and calculate statistics
+#if defined( __parallel )
+!
+!--    Set barrier in order to avoid that PE0 receives log_point_s-data
+!--    while still busy with receiving log_point-data (see above)
+       CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       IF ( myid == 0 )  THEN
+!
+!--       Initialize temporary arrays needed for statistics
+          pe_min = log_point_s%sum
+          pe_max = log_point_s%sum    ! need to be set in case of 1 PE
+          pe_rms = 0.0_wp
+
+#if defined( __parallel )
+!
+!--       Receive data from all PEs
+          DO  i = 1, numprocs-1
+             CALL MPI_RECV( pe_tmp(1), SIZE( log_point ), MPI_REAL, &
+                            MPI_ANY_SOURCE, MPI_ANY_TAG, comm2d, status, ierr )
+             sender = status(MPI_SOURCE)
+             pe_log_points(:,sender) = pe_tmp
+          ENDDO
+          pe_log_points(:,0) = log_point_s%sum   ! Results from PE0
+!
+!--       Calculate mean of all PEs, store it on log_point_s%sum
+!--       and find minimum and maximum
+          DO  iii = 1, SIZE( log_point )
+             DO  i = 1, numprocs-1
+                log_point_s(iii)%sum = log_point_s(iii)%sum +                  &
+                                       pe_log_points(iii,i)
+                pe_min(iii) = MIN( pe_min(iii), pe_log_points(iii,i) )
+                pe_max(iii) = MAX( pe_max(iii), pe_log_points(iii,i) )
+             ENDDO
+             log_point_s(iii)%sum = log_point_s(iii)%sum / numprocs
+!
+!--          Calculate rms
+             DO  i = 0, numprocs-1
+                pe_rms(iii) = pe_rms(iii) + (                                  &
+                                   pe_log_points(iii,i) - log_point_s(iii)%sum &
+                                            )**2
+             ENDDO
+             pe_rms(iii) = SQRT( pe_rms(iii) / numprocs )
+          ENDDO
+       ELSE
+!
+!--       Send data to PE0 (pe_max is used as temporary storage to send
+!--       the data in order to avoid sending the data type log)
+          pe_max = log_point_s%sum
+          CALL MPI_SEND( pe_max(1), SIZE( log_point ), MPI_REAL, 0, 0, comm2d, &
+                         ierr )
+#endif
+
+       ENDIF
+
+!
+!--    Write cpu-times
+       IF ( myid == 0 )  THEN
+!
+!--       Re-store sums
+          WHERE ( log_point_s%counts /= 0 )
+             sum = log_point_s%sum
+          ELSEWHERE
+             sum = -1.0_wp
+          ENDWHERE
+
+!
+!--       Write cpu-times sorted by size
+          WRITE ( 18, 101 )
+          DO
+             ii = MAXLOC( sum )
+             i = ii(1)
+             IF ( sum(i) /= -1.0_wp )  THEN
+                WRITE ( 18, 102 )                                              &
+                   log_point_s(i)%place, log_point_s(i)%sum,                   &
+                   log_point_s(i)%sum / log_point(1)%sum * 100.0_wp,           &
+                   log_point_s(i)%counts, pe_min(i), pe_max(i), pe_rms(i)
+                sum(i) = -1.0_wp
+             ELSE
+                EXIT
+             ENDIF
+          ENDDO
+
+!
+!--       Output of handling of MPI operations
+          IF ( collective_wait )  THEN
+             WRITE ( 18, 103 )
+          ELSE
+             WRITE ( 18, 104 )
+          ENDIF
+          IF ( cpu_log_barrierwait )  WRITE ( 18, 111 )
+          IF ( synchronous_exchange )  THEN
+             WRITE ( 18, 105 )
+          ELSE
+             WRITE ( 18, 106 )
+          ENDIF
+
+!
+!--       Empty lines in order to create a gap to the results of the model
+!--       continuation runs
+          WRITE ( 18, 107 )
+
+!
+!--       Unit 18 is not needed anymore
+          CALL close_file( 18 )
+
+       ENDIF
+
+       CALL location_message( 'finished', .TRUE. )
+
+   100 FORMAT (A/11('-')//'CPU measures for ',I5,' PEs (',I5,'(x) * ',I5,'(y', &
+               &') tasks *',I5,' threads):'//                                  &
+               'gridpoints (x/y/z): ',20X,I5,' * ',I5,' * ',I5/                &
+               'nr of timesteps: ',22X,I6/                                     &
+               'cpu time per grid point and timestep: ',5X,F8.5,' * 10**-6 s')
+
+   101 FORMAT (/'special measures:'/ &
+               &'-----------------------------------------------------------', &
+               &'------------------------')
+
+   102 FORMAT (A25,2X,F9.3,2X,F7.2,1X,I7,3(1X,F9.3))
+   103 FORMAT (/'Barriers are set in front of collective operations')
+   104 FORMAT (/'No barriers are set in front of collective operations')
+   105 FORMAT (/'Exchange of ghostpoints via MPI_SENDRCV')
+   106 FORMAT (/'Exchange of ghostpoints via MPI_ISEND/MPI_IRECV')
+   107 FORMAT (//)
+   110 FORMAT ('-------------------------------------------------------------',     &
+               &'---------'//&
+               &'place:                              mean        counts      min  ',&
+               &'     max       rms'/ &
+               &'                                sec.      %                sec. ', &
+               &'     sec.      sec.'/  &
+               &'-----------------------------------------------------------',      &
+               &'------------------------')
+   111 FORMAT (/'Barriers are set at beginning (start/continue) of measurements')
+
+    END SUBROUTINE cpu_statistics
+
+ END MODULE cpulog
Index: /palm/tags/release-6.0/SOURCE/data_log.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_log.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_log.f90	(revision 3477)
@@ -0,0 +1,197 @@
+!> @file data_log.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.1  2006/02/23 10:09:29  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Complete logging of data
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_log( array, i1, i2, j1, j2, k1, k2 )
+ 
+#if defined( __logging )
+
+    USE control_parameters,                                                    &
+        ONLY:  log_message, simulated_time
+        
+    USE kinds
+        
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i1  !< 
+    INTEGER(iwp) ::  i2  !< 
+    INTEGER(iwp) ::  j1  !< 
+    INTEGER(iwp) ::  j2  !< 
+    INTEGER(iwp) ::  k1  !< 
+    INTEGER(iwp) ::  k2  !< 
+
+    REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2) ::  array  !< 
+
+
+!
+!-- Open the file for data logging
+    CALL check_open( 20 )
+
+!
+!-- Write the message string
+    WRITE ( 20 )  log_message
+
+!
+!-- Write the simulated time and the array indices
+    WRITE ( 20 )  simulated_time, i1, i2, j1, j2, k1, k2
+
+!
+!-- Write the array
+    WRITE ( 20 )  array
+
+#endif
+ END SUBROUTINE data_log
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Complete logging of data for 2d arrays
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE data_log_2d( array, i1, i2, j1, j2)
+
+#if defined( __logging )
+
+    USE control_parameters,                                                    &
+        ONLY:  log_message, simulated_time
+
+    USE kinds
+            
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i1  !< 
+    INTEGER(iwp) ::  i2  !< 
+    INTEGER(iwp) ::  j1  !< 
+    INTEGER(iwp) ::  j2  !< 
+
+    REAL(wp), DIMENSION(i1:i2,j1:j2) ::  array  !< 
+
+
+!
+!-- Open the file for data logging
+    CALL check_open( 20 )
+
+!
+!-- Write the message string
+    WRITE ( 20 )  log_message
+
+!
+!-- Write the simulated time and the array indices
+    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
+
+!
+!-- Write the array
+    WRITE ( 20 )  array
+
+#endif
+ END SUBROUTINE data_log_2d
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Complete logging of data for 2d integer arrays
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE data_log_2d_int( array, i1, i2, j1, j2)
+
+#if defined( __logging )
+
+    USE control_parameters,                                                    &
+        ONLY:  log_message, simulated_time
+
+    USE kinds
+            
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i1  !< 
+    INTEGER(iwp) ::  i2  !< 
+    INTEGER(iwp) ::  j1  !< 
+    INTEGER(iwp) ::  j2  !< 
+
+    INTEGER(iwp), DIMENSION(i1:i2,j1:j2) ::  array  !< 
+
+
+!
+!-- Open the file for data logging
+    CALL check_open( 20 )
+
+!
+!-- Write the message string
+    WRITE ( 20 )  log_message
+
+!
+!-- Write the simulated time and the array indices
+    WRITE ( 20 )  simulated_time, i1, i2, j1, j2
+
+!
+!-- Write the array
+    WRITE ( 20 )  array
+
+#endif
+ END SUBROUTINE data_log_2d_int
Index: /palm/tags/release-6.0/SOURCE/data_output_2d.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_2d.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_2d.f90	(revision 3477)
@@ -0,0 +1,2268 @@
+!> @file data_output_2d.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Add biometeorology
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! minor formatting (kanani)
+! chem_data_output_2d subroutine added (basit)
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3176 2018-07-26 17:12:48Z suehring
+! Remove output of latent heat flux at urban-surfaces and set fill values 
+! instead 
+! 
+! 3052 2018-05-31 06:11:20Z raasch
+! Do not open FORTRAN binary files in case of parallel netCDF I/O
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Added nzb_do and nzt_do for some modules for 2d output
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! precipitation_rate removed, case prr*_xy removed, to_be_resorted have to point
+! to ql_vp_av and not to ql_vp, allocation checks implemented (averaged data 
+! will be assigned to fill values if no allocation happened so far)   
+! 
+! 2963 2018-04-12 14:47:44Z suehring
+! Introduce index for vegetation/wall, pavement/green-wall and water/window 
+! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2805 2018-02-14 17:00:09Z suehring
+! Consider also default-type surfaces for surface temperature output. 
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! Enable output of ground-heat flux also at urban surfaces.
+! 
+! 2743 2018-01-12 16:03:39Z suehring
+! In case of natural- and urban-type surfaces output surfaces fluxes in W/m2.
+! 
+! 2742 2018-01-12 14:59:47Z suehring
+! Enable output of surface temperature
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! output of r_a moved from land-surface to consider also urban-type surfaces
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of uv exposure model (FK)
+! Implementation of turbulence_closure_mod (TG)
+! Set fill values at topography grid points or e.g. non-natural-type surface
+! in case of LSM output (MS)
+! 
+! 2512 2017-10-04 08:26:59Z raasch
+! upper bounds of cross section output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2277 2017-06-12 10:47:51Z kanani
+! Removed unused variables do2d_xy_n, do2d_xz_n, do2d_yz_n
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new surface concept
+! 
+!
+! 2190 2017-03-21 12:16:43Z raasch
+! bugfix for r2031: string rho replaced by rho_ocean
+!
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean and rho_av to rho_ocean_av
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1980 2016-07-29 15:51:57Z suehring
+! Bugfix, in order to steer user-defined output, setting flag found explicitly
+! to .F.
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Output of radiation quantities is now done directly in the respective module
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Output of land surface quantities is now done directly in the respective 
+! module
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Scalar surface flux added
+! Rename INTEGER variable s into s_ind, as s is already assigned to scalar
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! precipitation_amount, precipitation_rate, prr moved to arrays_3d
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Output of bulk cloud physics simplified.
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Added output of z0q
+! 
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1745 2016-02-05 13:06:51Z gronemeier
+! Bugfix: test if time axis limit exceeds moved to point after call of check_open
+!
+! 1703 2015-11-02 12:38:44Z raasch
+! bugfix for output of single (*) xy-sections in case of parallel netcdf I/O
+!
+! 1701 2015-11-02 07:43:04Z maronga
+! Bugfix in output of RRTGM data
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of Obukhov length (ol) and radiative heating rates  for RRTMG. 
+! Formatting corrections.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Added support for RRTMG
+! 
+! 1555 2015-03-04 17:44:27Z maronga
+! Added output of r_a and r_s
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added suppport for land surface model and radiation model output. In the course
+! of this action, the limits for vertical loops have been changed (from nzb and 
+! nzt+1 to nzb_do and nzt_do, respectively in order to allow soil model output).
+! Moreover, a new vertical grid zs was introduced.
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! parts concerning iso2d output removed,
+! -netcdf output queries
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log.
+! module interfaces removed
+!
+! 1311 2014-03-14 12:13:39Z heinze
+! bugfix: close #if defined( __netcdf )
+!
+! 1308 2014-03-13 14:58:42Z fricke
+! +local_2d_sections, local_2d_sections_l, ns
+! Check, if the limit of the time dimension is exceeded for parallel output
+! To increase the performance for parallel output, the following is done:
+! - Update of time axis is only done by PE0
+! - Cross sections are first stored on a local array and are written
+!   collectively to the output file by all PEs.
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! ql is calculated by calc_liquid_water_content
+!
+! 1076 2012-12-05 08:30:18Z hoffmann
+! Bugfix in output of ql 
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! Bugfix: Output of cross sections of ql
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! +qr, nr, qc and cross sections
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented
+!
+! 1007 2012-09-19 14:30:36Z franke
+! Bugfix: missing calculation of ql_vp added
+!
+! 978 2012-08-09 08:28:32Z fricke
+! +z0h
+!
+! Revision 1.1  1997/08/11 06:24:09  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Data output of cross-sections in netCDF format or binary format
+!> to be later converted to NetCDF by helper routine combine_plot_fields.
+!> Attention: The position of the sectional planes is still not always computed 
+!> ---------  correctly. (zu is used always)!
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_2d( mode, av )
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, e, heatflux_output_conversion, nc, nr, p, pt,              &
+               precipitation_amount, prr, q, qc, ql, ql_c, ql_v, qr, s, tend,  &
+               u, v, vpt, w, zu, zw, waterflux_output_conversion, hyrho, d_exner
+
+    USE averaging
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, lv_d_cp, l_v
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_data_output_2d
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_data_output_2d
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_data_output_2d
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, biometeorology, data_output_2d_on_each_pe,       &
+               data_output_xy, data_output_xz, data_output_yz, do2d,           &
+               do2d_xy_last_time, do2d_xy_time_count,                          &
+               do2d_xz_last_time, do2d_xz_time_count,                          &
+               do2d_yz_last_time, do2d_yz_time_count,                          &
+               ibc_uv_b, io_blocks, io_group, land_surface, message_string,    &
+               ntdim_2d_xy, ntdim_2d_xz, ntdim_2d_yz,                          &
+               ocean_mode, psolver, section, simulated_time,                   &
+               time_since_reference_point, uv_exposure
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point 
+        
+    USE gust_mod,                                                              &
+        ONLY:  gust_data_output_2d, gust_module_enabled
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg,       &
+               nzb, nzt, wall_flags_0
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_data_output_2d, zs
+
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_interface,                                                      &
+        ONLY:  fill_value, id_set_xy, id_set_xz, id_set_yz, id_var_do2d,       &
+               id_var_time_xy, id_var_time_xz, id_var_time_yz, nc_stat,        &
+               netcdf_data_format, netcdf_handle_error
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_data_output_2d
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, particle_advection_start,  &
+               particles, prt_count
+    
+    USE pegrid
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_data_output_2d
+   
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_data_output_2d    
+
+    USE surface_mod,                                                           &
+        ONLY:  ind_pav_green, ind_veg_wall, ind_wat_win, surf_def_h,           &
+               surf_lsm_h, surf_usm_h
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_data_output_2d
+
+    USE uv_exposure_model_mod,                                                 &
+        ONLY:  uvem_data_output_2d
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=2)  ::  do2d_mode    !< 
+    CHARACTER (LEN=2)  ::  mode         !< 
+    CHARACTER (LEN=4)  ::  grid         !< 
+    CHARACTER (LEN=50) ::  rtext        !< 
+    
+    INTEGER(iwp) ::  av        !< 
+    INTEGER(iwp) ::  ngp       !< 
+    INTEGER(iwp) ::  file_id   !< 
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+    INTEGER(iwp) ::  i         !< 
+    INTEGER(iwp) ::  if        !< 
+    INTEGER(iwp) ::  is        !< 
+    INTEGER(iwp) ::  iis       !< 
+    INTEGER(iwp) ::  j         !< 
+    INTEGER(iwp) ::  k         !< 
+    INTEGER(iwp) ::  l         !< 
+    INTEGER(iwp) ::  layer_xy  !< 
+    INTEGER(iwp) ::  m         !<
+    INTEGER(iwp) ::  n         !< 
+    INTEGER(iwp) ::  nis       !<
+    INTEGER(iwp) ::  ns        !< 
+    INTEGER(iwp) ::  nzb_do    !< lower limit of the data field (usually nzb)
+    INTEGER(iwp) ::  nzt_do    !< upper limit of the data field (usually nzt+1)
+    INTEGER(iwp) ::  s_ind     !< 
+    INTEGER(iwp) ::  sender    !< 
+    INTEGER(iwp) ::  ind(4)    !< 
+    
+    LOGICAL ::  found          !< 
+    LOGICAL ::  resorted       !< 
+    LOGICAL ::  two_d          !< 
+    
+    REAL(wp) ::  mean_r        !<
+    REAL(wp) ::  s_r2          !<
+    REAL(wp) ::  s_r3          !<
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE     ::  level_z             !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  local_2d            !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  local_2d_l          !<
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf            !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  local_2d_sections   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  local_2d_sections_l !<
+
+#if defined( __parallel )
+    REAL(wp), DIMENSION(:,:),   ALLOCATABLE ::  total_2d    !<
+#endif
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< 
+
+    NAMELIST /LOCAL/  rtext
+
+!
+!-- Immediate return, if no output is requested (no respective sections
+!-- found in parameter data_output)
+    IF ( mode == 'xy'  .AND.  .NOT. data_output_xy(av) )  RETURN
+    IF ( mode == 'xz'  .AND.  .NOT. data_output_xz(av) )  RETURN
+    IF ( mode == 'yz'  .AND.  .NOT. data_output_yz(av) )  RETURN
+
+    CALL cpu_log (log_point(3),'data_output_2d','start')
+
+    two_d = .FALSE.    ! local variable to distinguish between output of pure 2D
+                       ! arrays and cross-sections of 3D arrays.
+
+!
+!-- Depending on the orientation of the cross-section, the respective output 
+!-- files have to be opened.
+    SELECT CASE ( mode )
+
+       CASE ( 'xy' )
+          s_ind = 1
+          ALLOCATE( level_z(nzb:nzt+1), local_2d(nxl:nxr,nys:nyn) )
+
+          IF ( netcdf_data_format > 4 )  THEN
+             ns = 1
+             DO WHILE ( section(ns,s_ind) /= -9999  .AND.  ns <= 100 )
+                ns = ns + 1
+             ENDDO
+             ns = ns - 1
+             ALLOCATE( local_2d_sections(nxl:nxr,nys:nyn,1:ns) )
+             local_2d_sections = 0.0_wp
+          ENDIF
+
+!
+!--       Parallel netCDF4/HDF5 output is done on all PEs, all other on PE0 only
+          IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+             CALL check_open( 101+av*10 )
+          ENDIF
+          IF ( data_output_2d_on_each_pe  .AND.  netcdf_data_format < 5 )  THEN
+             CALL check_open( 21 )
+          ELSE
+             IF ( myid == 0 )  THEN
+#if defined( __parallel )
+                ALLOCATE( total_2d(0:nx,0:ny) )
+#endif
+             ENDIF
+          ENDIF
+
+       CASE ( 'xz' )
+          s_ind = 2
+          ALLOCATE( local_2d(nxl:nxr,nzb:nzt+1) )
+
+          IF ( netcdf_data_format > 4 )  THEN
+             ns = 1
+             DO WHILE ( section(ns,s_ind) /= -9999  .AND.  ns <= 100 )
+                ns = ns + 1
+             ENDDO
+             ns = ns - 1
+             ALLOCATE( local_2d_sections(nxl:nxr,1:ns,nzb:nzt+1) )
+             ALLOCATE( local_2d_sections_l(nxl:nxr,1:ns,nzb:nzt+1) )
+             local_2d_sections = 0.0_wp; local_2d_sections_l = 0.0_wp
+          ENDIF
+
+!
+!--       Parallel netCDF4/HDF5 output is done on all PEs, all other on PE0 only
+          IF ( myid == 0 .OR. netcdf_data_format > 4 )  THEN
+             CALL check_open( 102+av*10 )
+          ENDIF
+
+          IF ( data_output_2d_on_each_pe  .AND.  netcdf_data_format < 5 )  THEN
+             CALL check_open( 22 )
+          ELSE
+             IF ( myid == 0 )  THEN
+#if defined( __parallel )
+                ALLOCATE( total_2d(0:nx,nzb:nzt+1) )
+#endif
+             ENDIF
+          ENDIF
+
+       CASE ( 'yz' )
+          s_ind = 3
+          ALLOCATE( local_2d(nys:nyn,nzb:nzt+1) )
+
+          IF ( netcdf_data_format > 4 )  THEN
+             ns = 1
+             DO WHILE ( section(ns,s_ind) /= -9999  .AND.  ns <= 100 )
+                ns = ns + 1
+             ENDDO
+             ns = ns - 1
+             ALLOCATE( local_2d_sections(1:ns,nys:nyn,nzb:nzt+1) )
+             ALLOCATE( local_2d_sections_l(1:ns,nys:nyn,nzb:nzt+1) )
+             local_2d_sections = 0.0_wp; local_2d_sections_l = 0.0_wp
+          ENDIF
+
+!
+!--       Parallel netCDF4/HDF5 output is done on all PEs, all other on PE0 only
+          IF ( myid == 0 .OR. netcdf_data_format > 4 )  THEN
+             CALL check_open( 103+av*10 )
+          ENDIF
+
+          IF ( data_output_2d_on_each_pe  .AND.  netcdf_data_format < 5 )  THEN
+             CALL check_open( 23 )
+          ELSE
+             IF ( myid == 0 )  THEN
+#if defined( __parallel )
+                ALLOCATE( total_2d(0:ny,nzb:nzt+1) )
+#endif
+             ENDIF
+          ENDIF
+
+       CASE DEFAULT
+          message_string = 'unknown cross-section: ' // TRIM( mode )
+          CALL message( 'data_output_2d', 'PA0180', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+!
+!-- For parallel netcdf output the time axis must be limited. Return, if this
+!-- limit is exceeded. This could be the case, if the simulated time exceeds 
+!-- the given end time by the length of the given output interval.
+    IF ( netcdf_data_format > 4 )  THEN
+       IF ( mode == 'xy'  .AND.  do2d_xy_time_count(av) + 1 >                  &
+            ntdim_2d_xy(av) )  THEN
+          WRITE ( message_string, * ) 'Output of xy cross-sections is not ',   &
+                          'given at t=', simulated_time, '&because the',       & 
+                          ' maximum number of output time levels is exceeded.'
+          CALL message( 'data_output_2d', 'PA0384', 0, 1, 0, 6, 0 )
+          CALL cpu_log( log_point(3), 'data_output_2d', 'stop' )
+          RETURN
+       ENDIF
+       IF ( mode == 'xz'  .AND.  do2d_xz_time_count(av) + 1 >                  &
+            ntdim_2d_xz(av) )  THEN
+          WRITE ( message_string, * ) 'Output of xz cross-sections is not ',   &
+                          'given at t=', simulated_time, '&because the',       & 
+                          ' maximum number of output time levels is exceeded.'
+          CALL message( 'data_output_2d', 'PA0385', 0, 1, 0, 6, 0 )
+          CALL cpu_log( log_point(3), 'data_output_2d', 'stop' )
+          RETURN
+       ENDIF
+       IF ( mode == 'yz'  .AND.  do2d_yz_time_count(av) + 1 >                  &
+            ntdim_2d_yz(av) )  THEN
+          WRITE ( message_string, * ) 'Output of yz cross-sections is not ',   &
+                          'given at t=', simulated_time, '&because the',       & 
+                          ' maximum number of output time levels is exceeded.'
+          CALL message( 'data_output_2d', 'PA0386', 0, 1, 0, 6, 0 )
+          CALL cpu_log( log_point(3), 'data_output_2d', 'stop' )
+          RETURN
+       ENDIF
+    ENDIF
+
+!
+!-- Allocate a temporary array for resorting (kji -> ijk).
+    ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb:nzt+1) )
+    local_pf = 0.0
+
+!
+!-- Loop of all variables to be written.
+!-- Output dimensions chosen
+    if = 1
+    l = MAX( 2, LEN_TRIM( do2d(av,if) ) )
+    do2d_mode = do2d(av,if)(l-1:l)
+
+    DO  WHILE ( do2d(av,if)(1:1) /= ' ' )
+
+       IF ( do2d_mode == mode )  THEN
+!
+!--       Set flag to steer output of radiation, land-surface, or user-defined
+!--       quantities
+          found = .FALSE.
+
+          nzb_do = nzb
+          nzt_do = nzt+1
+!
+!--       Before each output, set array local_pf to fill value
+          local_pf = fill_value
+!
+!--       Set masking flag for topography for not resorted arrays
+          flag_nr = 0
+          
+!
+!--       Store the array chosen on the temporary array.
+          resorted = .FALSE.
+          SELECT CASE ( TRIM( do2d(av,if) ) )
+             CASE ( 'e_xy', 'e_xz', 'e_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => e
+                ELSE
+                   IF ( .NOT. ALLOCATED( e_av ) ) THEN
+                      ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      e_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => e_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'thetal_xy', 'thetal_xz', 'thetal_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => pt
+                ELSE
+                   IF ( .NOT. ALLOCATED( lpt_av ) ) THEN
+                      ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      lpt_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => lpt_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'lwp*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = SUM( ql(nzb:nzt,j,i) *          &
+                                                    dzw(1:nzt+1) )
+                      ENDDO
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( lwp_av ) ) THEN
+                      ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) )
+                      lwp_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = lwp_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'ghf*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  m = 1, surf_lsm_h%ns
+                      i                   = surf_lsm_h%i(m)            
+                      j                   = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%ghf(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i                   = surf_usm_h%i(m)            
+                      j                   = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%frac(ind_veg_wall,m)  *  &
+                                            surf_usm_h%wghf_eb(m)        +      &
+                                            surf_usm_h%frac(ind_pav_green,m) *  &
+                                            surf_usm_h%wghf_eb_green(m)  +      &
+                                            surf_usm_h%frac(ind_wat_win,m)   *  &
+                                            surf_usm_h%wghf_eb_window(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( ghf_av ) ) THEN
+                      ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) )
+                      ghf_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = ghf_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'ol*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%ol(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%ol(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%ol(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( ol_av ) ) THEN
+                      ALLOCATE( ol_av(nysg:nyng,nxlg:nxrg) )
+                      ol_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = ol_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'p_xy', 'p_xz', 'p_yz' )
+                IF ( av == 0 )  THEN
+                   IF ( psolver /= 'sor' )  CALL exchange_horiz( p, nbgp )
+                   to_be_resorted => p
+                ELSE
+                   IF ( .NOT. ALLOCATED( p_av ) ) THEN
+                      ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      p_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   IF ( psolver /= 'sor' )  CALL exchange_horiz( p_av, nbgp )
+                   to_be_resorted => p_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'pc_xy', 'pc_xz', 'pc_yz' )  ! particle concentration
+                IF ( av == 0 )  THEN
+                   IF ( simulated_time >= particle_advection_start )  THEN
+                      tend = prt_count
+!                      CALL exchange_horiz( tend, nbgp )
+                   ELSE
+                      tend = 0.0_wp
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nzt+1
+                            local_pf(i,j,k) = tend(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   resorted = .TRUE.
+                ELSE
+                   IF ( .NOT. ALLOCATED( pc_av ) ) THEN
+                      ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      pc_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+!                   CALL exchange_horiz( pc_av, nbgp )
+                   to_be_resorted => pc_av
+                ENDIF
+
+             CASE ( 'pr_xy', 'pr_xz', 'pr_yz' )  ! mean particle radius (effective radius)
+                IF ( av == 0 )  THEN
+                   IF ( simulated_time >= particle_advection_start )  THEN
+                      DO  i = nxl, nxr
+                         DO  j = nys, nyn
+                            DO  k = nzb, nzt+1
+                               number_of_particles = prt_count(k,j,i)
+                               IF (number_of_particles <= 0)  CYCLE
+                               particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                               s_r2 = 0.0_wp
+                               s_r3 = 0.0_wp
+                               DO  n = 1, number_of_particles
+                                  IF ( particles(n)%particle_mask )  THEN
+                                     s_r2 = s_r2 + particles(n)%radius**2 * &
+                                            particles(n)%weight_factor
+                                     s_r3 = s_r3 + particles(n)%radius**3 * &
+                                            particles(n)%weight_factor
+                                  ENDIF
+                               ENDDO
+                               IF ( s_r2 > 0.0_wp )  THEN
+                                  mean_r = s_r3 / s_r2
+                               ELSE
+                                  mean_r = 0.0_wp
+                               ENDIF
+                               tend(k,j,i) = mean_r
+                            ENDDO
+                         ENDDO
+                      ENDDO
+!                      CALL exchange_horiz( tend, nbgp )
+                   ELSE
+                      tend = 0.0_wp
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nzt+1
+                            local_pf(i,j,k) = tend(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   resorted = .TRUE.
+                ELSE
+                   IF ( .NOT. ALLOCATED( pr_av ) ) THEN
+                      ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      pr_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+!                   CALL exchange_horiz( pr_av, nbgp )
+                   to_be_resorted => pr_av
+                ENDIF
+
+             CASE ( 'theta_xy', 'theta_xz', 'theta_yz' )
+                IF ( av == 0 )  THEN
+                   IF ( .NOT. bulk_cloud_model ) THEN
+                      to_be_resorted => pt
+                   ELSE
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                            DO  k = nzb, nzt+1
+                               local_pf(i,j,k) = pt(k,j,i) + lv_d_cp *         &
+                                                             d_exner(k) *      &
+                                                             ql(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                      resorted = .TRUE.
+                   ENDIF
+                ELSE
+                   IF ( .NOT. ALLOCATED( pt_av ) ) THEN
+                      ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      pt_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => pt_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'q_xy', 'q_xz', 'q_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => q
+                ELSE
+                   IF ( .NOT. ALLOCATED( q_av ) ) THEN
+                      ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      q_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => q_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'ql_xy', 'ql_xz', 'ql_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => ql
+                ELSE
+                   IF ( .NOT. ALLOCATED( ql_av ) ) THEN
+                      ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      ql_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => ql_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'ql_c_xy', 'ql_c_xz', 'ql_c_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => ql_c
+                ELSE
+                   IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN
+                      ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      ql_c_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => ql_c_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'ql_v_xy', 'ql_v_xz', 'ql_v_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => ql_v
+                ELSE
+                   IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN
+                      ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      ql_v_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => ql_v_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'ql_vp_xy', 'ql_vp_xz', 'ql_vp_yz' )
+                IF ( av == 0 )  THEN
+                   IF ( simulated_time >= particle_advection_start )  THEN
+                      DO  i = nxl, nxr
+                         DO  j = nys, nyn
+                            DO  k = nzb, nzt+1
+                               number_of_particles = prt_count(k,j,i)
+                               IF (number_of_particles <= 0)  CYCLE
+                               particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                               DO  n = 1, number_of_particles
+                                  IF ( particles(n)%particle_mask )  THEN
+                                     tend(k,j,i) =  tend(k,j,i) +                 &
+                                                    particles(n)%weight_factor /  &
+                                                    prt_count(k,j,i)
+                                  ENDIF
+                               ENDDO
+                            ENDDO
+                         ENDDO
+                      ENDDO
+!                      CALL exchange_horiz( tend, nbgp )
+                   ELSE
+                      tend = 0.0_wp
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nzt+1
+                            local_pf(i,j,k) = tend(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   resorted = .TRUE.
+                ELSE
+                   IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN
+                      ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      ql_vp_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+!                   CALL exchange_horiz( ql_vp_av, nbgp )
+                   to_be_resorted => ql_vp_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'qsws*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   local_pf(:,:,nzb+1) = REAL( fill_value, KIND = wp )
+!
+!--                In case of default surfaces, clean-up flux by density.
+!--                In case of land-surfaces, convert fluxes into
+!--                dynamic units
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      k = surf_def_h(0)%k(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%qsws(m) *            &
+                                            waterflux_output_conversion(k)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      k = surf_lsm_h%k(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%qsws(m) * l_v
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( qsws_av ) ) THEN
+                      ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) )
+                      qsws_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn 
+                         local_pf(i,j,nzb+1) =  qsws_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'qv_xy', 'qv_xz', 'qv_yz' )
+                IF ( av == 0 )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nzt+1
+                            local_pf(i,j,k) = q(k,j,i) - ql(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   resorted = .TRUE.
+                ELSE
+                   IF ( .NOT. ALLOCATED( qv_av ) ) THEN
+                      ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      qv_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => qv_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'r_a*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  m = 1, surf_lsm_h%ns
+                      i                   = surf_lsm_h%i(m)            
+                      j                   = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%r_a(m)
+                   ENDDO
+
+                   DO  m = 1, surf_usm_h%ns
+                      i   = surf_usm_h%i(m)            
+                      j   = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) =                                          &
+                                 ( surf_usm_h%frac(ind_veg_wall,m)  *                &
+                                   surf_usm_h%r_a(m)       +                         & 
+                                   surf_usm_h%frac(ind_pav_green,m) *                &
+                                   surf_usm_h%r_a_green(m) +                         & 
+                                   surf_usm_h%frac(ind_wat_win,m)   *                &
+                                   surf_usm_h%r_a_window(m) )
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( r_a_av ) ) THEN
+                      ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) )
+                      r_a_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = r_a_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted       = .TRUE.
+                two_d          = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 's_xy', 's_xz', 's_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => s
+                ELSE
+                   IF ( .NOT. ALLOCATED( s_av ) ) THEN
+                      ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      s_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => s_av
+                ENDIF
+
+             CASE ( 'shf*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+!
+!--                In case of default surfaces, clean-up flux by density.
+!--                In case of land- and urban-surfaces, convert fluxes into
+!--                dynamic units.
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      k = surf_def_h(0)%k(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%shf(m) *             &
+                                            heatflux_output_conversion(k)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      k = surf_lsm_h%k(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%shf(m) * c_p
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      k = surf_usm_h%k(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%shf(m) * c_p
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( shf_av ) ) THEN
+                      ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) )
+                      shf_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) =  shf_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+                
+             CASE ( 'ssws*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%ssws(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%ssws(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%ssws(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( ssws_av ) ) THEN
+                      ALLOCATE( ssws_av(nysg:nyng,nxlg:nxrg) )
+                      ssws_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn 
+                         local_pf(i,j,nzb+1) =  ssws_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)                
+
+             CASE ( 't*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%ts(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%ts(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%ts(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( ts_av ) ) THEN
+                      ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) )
+                      ts_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = ts_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'tsurf*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i                   = surf_def_h(0)%i(m)            
+                      j                   = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%pt_surface(m)
+                   ENDDO
+
+                   DO  m = 1, surf_lsm_h%ns
+                      i                   = surf_lsm_h%i(m)            
+                      j                   = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%pt_surface(m)
+                   ENDDO
+
+                   DO  m = 1, surf_usm_h%ns
+                      i   = surf_usm_h%i(m)            
+                      j   = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%pt_surface(m)
+                   ENDDO
+
+                ELSE
+                   IF ( .NOT. ALLOCATED( tsurf_av ) ) THEN
+                      ALLOCATE( tsurf_av(nysg:nyng,nxlg:nxrg) )
+                      tsurf_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = tsurf_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted       = .TRUE.
+                two_d          = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'u_xy', 'u_xz', 'u_yz' )
+                flag_nr = 1
+                IF ( av == 0 )  THEN
+                   to_be_resorted => u
+                ELSE
+                   IF ( .NOT. ALLOCATED( u_av ) ) THEN
+                      ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      u_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => u_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+!
+!--             Substitute the values generated by "mirror" boundary condition
+!--             at the bottom boundary by the real surface values.
+                IF ( do2d(av,if) == 'u_xz'  .OR.  do2d(av,if) == 'u_yz' )  THEN
+                   IF ( ibc_uv_b == 0 )  local_pf(:,:,nzb) = 0.0_wp
+                ENDIF
+
+             CASE ( 'us*_xy' )        ! 2d-array
+                IF ( av == 0 )  THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%us(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%us(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%us(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( us_av ) ) THEN
+                      ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) )
+                      us_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) = us_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'v_xy', 'v_xz', 'v_yz' )
+                flag_nr = 2
+                IF ( av == 0 )  THEN
+                   to_be_resorted => v
+                ELSE
+                   IF ( .NOT. ALLOCATED( v_av ) ) THEN
+                      ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      v_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => v_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+!
+!--             Substitute the values generated by "mirror" boundary condition
+!--             at the bottom boundary by the real surface values.
+                IF ( do2d(av,if) == 'v_xz'  .OR.  do2d(av,if) == 'v_yz' )  THEN
+                   IF ( ibc_uv_b == 0 )  local_pf(:,:,nzb) = 0.0_wp
+                ENDIF
+
+             CASE ( 'thetav_xy', 'thetav_xz', 'thetav_yz' )
+                IF ( av == 0 )  THEN
+                   to_be_resorted => vpt
+                ELSE
+                   IF ( .NOT. ALLOCATED( vpt_av ) ) THEN
+                      ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      vpt_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => vpt_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zu
+
+             CASE ( 'w_xy', 'w_xz', 'w_yz' )
+                flag_nr = 3
+                IF ( av == 0 )  THEN
+                   to_be_resorted => w
+                ELSE
+                   IF ( .NOT. ALLOCATED( w_av ) ) THEN
+                      ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                      w_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   to_be_resorted => w_av
+                ENDIF
+                IF ( mode == 'xy' )  level_z = zw
+
+             CASE ( 'z0*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%z0(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%z0(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%z0(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( z0_av ) ) THEN
+                      ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) )
+                      z0_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) =  z0_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'z0h*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%z0h(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%z0h(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%z0h(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( z0h_av ) ) THEN
+                      ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) )
+                      z0h_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) =  z0h_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE ( 'z0q*_xy' )        ! 2d-array
+                IF ( av == 0 ) THEN
+                   DO  m = 1, surf_def_h(0)%ns
+                      i = surf_def_h(0)%i(m)
+                      j = surf_def_h(0)%j(m)
+                      local_pf(i,j,nzb+1) = surf_def_h(0)%z0q(m)
+                   ENDDO
+                   DO  m = 1, surf_lsm_h%ns
+                      i = surf_lsm_h%i(m)
+                      j = surf_lsm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_lsm_h%z0q(m)
+                   ENDDO
+                   DO  m = 1, surf_usm_h%ns
+                      i = surf_usm_h%i(m)
+                      j = surf_usm_h%j(m)
+                      local_pf(i,j,nzb+1) = surf_usm_h%z0q(m)
+                   ENDDO
+                ELSE
+                   IF ( .NOT. ALLOCATED( z0q_av ) ) THEN
+                      ALLOCATE( z0q_av(nysg:nyng,nxlg:nxrg) )
+                      z0q_av = REAL( fill_value, KIND = wp )
+                   ENDIF
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         local_pf(i,j,nzb+1) =  z0q_av(j,i)
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+                two_d = .TRUE.
+                level_z(nzb+1) = zu(nzb+1)
+
+             CASE DEFAULT
+
+!
+!--             Quantities of other modules
+                IF ( .NOT. found  .AND.  bulk_cloud_model )  THEN
+                   CALL bcm_data_output_2d( av, do2d(av,if), found, grid, mode,&
+                                            local_pf, two_d, nzb_do, nzt_do )
+                ENDIF
+
+                IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                   CALL gust_data_output_2d( av, do2d(av,if), found, grid,     &
+                                             local_pf, two_d, nzb_do, nzt_do )
+                ENDIF
+
+                IF ( .NOT. found  .AND.  biometeorology                        &
+                                  .AND.  mode == 'xy' )  THEN
+                   CALL biom_data_output_2d( av, do2d(av,if), found, grid,     &
+                                             local_pf, two_d, nzb_do, nzt_do,  &
+                                             fill_value )
+                ENDIF
+
+                IF ( .NOT. found  .AND.  land_surface )  THEN
+                   CALL lsm_data_output_2d( av, do2d(av,if), found, grid, mode,&
+                                            local_pf, two_d, nzb_do, nzt_do )
+                ENDIF
+
+                IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                   CALL ocean_data_output_2d( av, do2d(av,if), found, grid,    &
+                                              mode, local_pf, nzb_do, nzt_do )
+                ENDIF
+
+                IF ( .NOT. found  .AND.  radiation )  THEN
+                   CALL radiation_data_output_2d( av, do2d(av,if), found, grid,&
+                                                  mode, local_pf, two_d,       &
+                                                  nzb_do, nzt_do  )
+                ENDIF
+                
+                IF ( .NOT. found  .AND.  salsa )  THEN
+                   CALL salsa_data_output_2d( av, do2d(av,if), found, grid,    &
+                                              mode, local_pf, two_d )
+                ENDIF                 
+
+                IF ( .NOT. found  .AND.  uv_exposure )  THEN
+                   CALL uvem_data_output_2d( av, do2d(av,if), found, grid,     &
+                                             local_pf, two_d, nzb_do, nzt_do )
+                ENDIF
+
+                IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                   CALL chem_data_output_2d( av, do2d(av,if), found, grid, mode, &
+                                             local_pf, two_d, nzb_do, nzt_do, fill_value )
+                ENDIF
+!
+!--             User defined quantities
+                IF ( .NOT. found )  THEN
+                   CALL user_data_output_2d( av, do2d(av,if), found, grid,     &
+                                             local_pf, two_d, nzb_do, nzt_do )
+                ENDIF
+
+                resorted = .TRUE.
+
+                IF ( grid == 'zu' )  THEN
+                   IF ( mode == 'xy' )  level_z = zu
+                ELSEIF ( grid == 'zw' )  THEN
+                   IF ( mode == 'xy' )  level_z = zw
+                ELSEIF ( grid == 'zu1' ) THEN
+                   IF ( mode == 'xy' )  level_z(nzb+1) = zu(nzb+1)
+                ELSEIF ( grid == 'zs' ) THEN
+                   IF ( mode == 'xy' )  level_z = zs
+                ENDIF
+
+                IF ( .NOT. found )  THEN
+                   message_string = 'no output provided for: ' //              &
+                                    TRIM( do2d(av,if) )
+                   CALL message( 'data_output_2d', 'PA0181', 0, 0, 0, 6, 0 )
+                ENDIF
+
+          END SELECT
+
+!
+!--       Resort the array to be output, if not done above. Flag topography 
+!--       grid points with fill values, using the corresponding maksing flag.
+          IF ( .NOT. resorted )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),          &
+                                               REAL( fill_value, KIND = wp ),  &
+                                               BTEST( wall_flags_0(k,j,i),     &
+                                                      flag_nr ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+!
+!--       Output of the individual cross-sections, depending on the cross- 
+!--       section mode chosen.
+          is = 1
+   loop1: DO WHILE ( section(is,s_ind) /= -9999  .OR.  two_d )
+
+             SELECT CASE ( mode )
+
+                CASE ( 'xy' )
+!
+!--                Determine the cross section index
+                   IF ( two_d )  THEN
+                      layer_xy = nzb+1
+                   ELSE
+                      layer_xy = section(is,s_ind)
+                   ENDIF
+
+!
+!--                Exit the loop for layers beyond the data output domain
+!--                (used for soil model)
+                   IF ( layer_xy > nzt_do )  THEN 
+                      EXIT loop1
+                   ENDIF
+
+!
+!--                Update the netCDF xy cross section time axis.
+!--                In case of parallel output, this is only done by PE0
+!--                to increase the performance.
+                   IF ( simulated_time /= do2d_xy_last_time(av) )  THEN
+                      do2d_xy_time_count(av) = do2d_xy_time_count(av) + 1
+                      do2d_xy_last_time(av)  = simulated_time
+                      IF ( myid == 0 )  THEN
+                         IF ( .NOT. data_output_2d_on_each_pe  &
+                              .OR.  netcdf_data_format > 4 )   &
+                         THEN
+#if defined( __netcdf )
+                            nc_stat = NF90_PUT_VAR( id_set_xy(av),             &
+                                                    id_var_time_xy(av),        &
+                                             (/ time_since_reference_point /), &
+                                         start = (/ do2d_xy_time_count(av) /), &
+                                                    count = (/ 1 /) )
+                            CALL netcdf_handle_error( 'data_output_2d', 53 )
+#endif
+                         ENDIF
+                      ENDIF
+                   ENDIF
+!
+!--                If required, carry out averaging along z
+                   IF ( section(is,s_ind) == -1  .AND.  .NOT. two_d )  THEN
+
+                      local_2d = 0.0_wp
+!
+!--                   Carry out the averaging (all data are on the PE)
+                      DO  k = nzb_do, nzt_do
+                         DO  j = nys, nyn
+                            DO  i = nxl, nxr
+                               local_2d(i,j) = local_2d(i,j) + local_pf(i,j,k)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+
+                      local_2d = local_2d / ( nzt_do - nzb_do + 1.0_wp)
+
+                   ELSE
+!
+!--                   Just store the respective section on the local array
+                      local_2d = local_pf(:,:,layer_xy)
+
+                   ENDIF
+
+#if defined( __parallel )
+                   IF ( netcdf_data_format > 4 )  THEN
+!
+!--                   Parallel output in netCDF4/HDF5 format.
+                      IF ( two_d ) THEN
+                         iis = 1
+                      ELSE
+                         iis = is
+                      ENDIF
+
+#if defined( __netcdf )
+!
+!--                   For parallel output, all cross sections are first stored
+!--                   here on a local array and will be written to the output
+!--                   file afterwards to increase the performance.
+                      DO  i = nxl, nxr
+                         DO  j = nys, nyn
+                            local_2d_sections(i,j,iis) = local_2d(i,j)
+                         ENDDO
+                      ENDDO
+#endif
+                   ELSE
+
+                      IF ( data_output_2d_on_each_pe )  THEN
+!
+!--                      Output of partial arrays on each PE
+#if defined( __netcdf )
+                         IF ( myid == 0 )  THEN
+                            WRITE ( 21 )  time_since_reference_point,          &
+                                          do2d_xy_time_count(av), av
+                         ENDIF
+#endif
+                         DO  i = 0, io_blocks-1
+                            IF ( i == io_group )  THEN
+                               WRITE ( 21 )  nxl, nxr, nys, nyn, nys, nyn
+                               WRITE ( 21 )  local_2d
+                            ENDIF
+#if defined( __parallel )
+                            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+                         ENDDO
+
+                      ELSE
+!
+!--                      PE0 receives partial arrays from all processors and
+!--                      then outputs them. Here a barrier has to be set,
+!--                      because otherwise "-MPI- FATAL: Remote protocol queue
+!--                      full" may occur.
+                         CALL MPI_BARRIER( comm2d, ierr )
+
+                         ngp = ( nxr-nxl+1 ) * ( nyn-nys+1 )
+                         IF ( myid == 0 )  THEN
+!
+!--                         Local array can be relocated directly.
+                            total_2d(nxl:nxr,nys:nyn) = local_2d
+!
+!--                         Receive data from all other PEs.
+                            DO  n = 1, numprocs-1
+!
+!--                            Receive index limits first, then array.
+!--                            Index limits are received in arbitrary order from
+!--                            the PEs.
+                               CALL MPI_RECV( ind(1), 4, MPI_INTEGER,          &
+                                              MPI_ANY_SOURCE, 0, comm2d,       &
+                                              status, ierr )
+                               sender = status(MPI_SOURCE)
+                               DEALLOCATE( local_2d )
+                               ALLOCATE( local_2d(ind(1):ind(2),ind(3):ind(4)) )
+                               CALL MPI_RECV( local_2d(ind(1),ind(3)), ngp,    &
+                                              MPI_REAL, sender, 1, comm2d,     &
+                                              status, ierr )
+                               total_2d(ind(1):ind(2),ind(3):ind(4)) = local_2d
+                            ENDDO
+!
+!--                         Relocate the local array for the next loop increment
+                            DEALLOCATE( local_2d )
+                            ALLOCATE( local_2d(nxl:nxr,nys:nyn) )
+
+#if defined( __netcdf )
+                            IF ( two_d ) THEN
+                               nc_stat = NF90_PUT_VAR( id_set_xy(av),       &
+                                                       id_var_do2d(av,if),  &
+                                                       total_2d(0:nx,0:ny), &
+                             start = (/ 1, 1, 1, do2d_xy_time_count(av) /), &
+                                             count = (/ nx+1, ny+1, 1, 1 /) )
+                            ELSE
+                               nc_stat = NF90_PUT_VAR( id_set_xy(av),       &
+                                                       id_var_do2d(av,if),  &
+                                                       total_2d(0:nx,0:ny), &
+                            start = (/ 1, 1, is, do2d_xy_time_count(av) /), &
+                                             count = (/ nx+1, ny+1, 1, 1 /) )
+                            ENDIF
+                            CALL netcdf_handle_error( 'data_output_2d', 54 )
+#endif
+
+                         ELSE
+!
+!--                         First send the local index limits to PE0
+                            ind(1) = nxl; ind(2) = nxr
+                            ind(3) = nys; ind(4) = nyn
+                            CALL MPI_SEND( ind(1), 4, MPI_INTEGER, 0, 0,       &
+                                           comm2d, ierr )
+!
+!--                         Send data to PE0
+                            CALL MPI_SEND( local_2d(nxl,nys), ngp,             &
+                                           MPI_REAL, 0, 1, comm2d, ierr )
+                         ENDIF
+!
+!--                      A barrier has to be set, because otherwise some PEs may
+!--                      proceed too fast so that PE0 may receive wrong data on
+!--                      tag 0
+                         CALL MPI_BARRIER( comm2d, ierr )
+                      ENDIF
+
+                   ENDIF
+#else
+#if defined( __netcdf )
+                   IF ( two_d ) THEN
+                      nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+                                              id_var_do2d(av,if),           &
+                                              local_2d(nxl:nxr,nys:nyn),    &
+                             start = (/ 1, 1, 1, do2d_xy_time_count(av) /), &
+                                           count = (/ nx+1, ny+1, 1, 1 /) )
+                   ELSE
+                      nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+                                              id_var_do2d(av,if),           &
+                                              local_2d(nxl:nxr,nys:nyn),    &
+                            start = (/ 1, 1, is, do2d_xy_time_count(av) /), &
+                                           count = (/ nx+1, ny+1, 1, 1 /) )
+                   ENDIF
+                   CALL netcdf_handle_error( 'data_output_2d', 447 )
+#endif
+#endif
+
+!
+!--                For 2D-arrays (e.g. u*) only one cross-section is available.
+!--                Hence exit loop of output levels.
+                   IF ( two_d )  THEN
+                      IF ( netcdf_data_format < 5 )  two_d = .FALSE.
+                      EXIT loop1
+                   ENDIF
+
+                CASE ( 'xz' )
+!
+!--                Update the netCDF xz cross section time axis.
+!--                In case of parallel output, this is only done by PE0
+!--                to increase the performance.
+                   IF ( simulated_time /= do2d_xz_last_time(av) )  THEN
+                      do2d_xz_time_count(av) = do2d_xz_time_count(av) + 1
+                      do2d_xz_last_time(av)  = simulated_time
+                      IF ( myid == 0 )  THEN
+                         IF ( .NOT. data_output_2d_on_each_pe  &
+                              .OR.  netcdf_data_format > 4 )   &
+                         THEN
+#if defined( __netcdf )
+                            nc_stat = NF90_PUT_VAR( id_set_xz(av),             &
+                                                    id_var_time_xz(av),        &
+                                             (/ time_since_reference_point /), &
+                                         start = (/ do2d_xz_time_count(av) /), &
+                                                    count = (/ 1 /) )
+                            CALL netcdf_handle_error( 'data_output_2d', 56 )
+#endif
+                         ENDIF
+                      ENDIF
+                   ENDIF
+
+!
+!--                If required, carry out averaging along y
+                   IF ( section(is,s_ind) == -1 )  THEN
+
+                      ALLOCATE( local_2d_l(nxl:nxr,nzb_do:nzt_do) )
+                      local_2d_l = 0.0_wp
+                      ngp = ( nxr-nxl + 1 ) * ( nzt_do-nzb_do + 1 )
+!
+!--                   First local averaging on the PE
+                      DO  k = nzb_do, nzt_do
+                         DO  j = nys, nyn
+                            DO  i = nxl, nxr
+                               local_2d_l(i,k) = local_2d_l(i,k) +             &
+                                                 local_pf(i,j,k)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+#if defined( __parallel )
+!
+!--                   Now do the averaging over all PEs along y
+                      IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+                      CALL MPI_ALLREDUCE( local_2d_l(nxl,nzb_do),                &
+                                          local_2d(nxl,nzb_do), ngp, MPI_REAL,   &
+                                          MPI_SUM, comm1dy, ierr )
+#else
+                      local_2d = local_2d_l
+#endif
+                      local_2d = local_2d / ( ny + 1.0_wp )
+
+                      DEALLOCATE( local_2d_l )
+
+                   ELSE
+!
+!--                   Just store the respective section on the local array
+!--                   (but only if it is available on this PE!)
+                      IF ( section(is,s_ind) >= nys  .AND.  section(is,s_ind) <= nyn ) &
+                      THEN
+                         local_2d = local_pf(:,section(is,s_ind),nzb_do:nzt_do)
+                      ENDIF
+
+                   ENDIF
+
+#if defined( __parallel )
+                   IF ( netcdf_data_format > 4 )  THEN
+!
+!--                   Output in netCDF4/HDF5 format.
+!--                   Output only on those PEs where the respective cross
+!--                   sections reside. Cross sections averaged along y are
+!--                   output on the respective first PE along y (myidy=0).
+                      IF ( ( section(is,s_ind) >= nys  .AND.                   &
+                             section(is,s_ind) <= nyn )  .OR.                  &
+                           ( section(is,s_ind) == -1  .AND.  myidy == 0 ) )  THEN
+#if defined( __netcdf )
+!
+!--                      For parallel output, all cross sections are first
+!--                      stored here on a local array and will be written to the
+!--                      output file afterwards to increase the performance.
+                         DO  i = nxl, nxr
+                            DO  k = nzb_do, nzt_do
+                               local_2d_sections_l(i,is,k) = local_2d(i,k)
+                            ENDDO
+                         ENDDO
+#endif
+                      ENDIF
+
+                   ELSE
+
+                      IF ( data_output_2d_on_each_pe )  THEN
+!
+!--                      Output of partial arrays on each PE. If the cross
+!--                      section does not reside on the PE, output special
+!--                      index values.
+#if defined( __netcdf )
+                         IF ( myid == 0 )  THEN
+                            WRITE ( 22 )  time_since_reference_point,          &
+                                          do2d_xz_time_count(av), av
+                         ENDIF
+#endif
+                         DO  i = 0, io_blocks-1
+                            IF ( i == io_group )  THEN
+                               IF ( ( section(is,s_ind) >= nys  .AND.          &
+                                      section(is,s_ind) <= nyn )  .OR.         &
+                                    ( section(is,s_ind) == -1  .AND.           &
+                                      nys-1 == -1 ) )                          &
+                               THEN
+                                  WRITE (22)  nxl, nxr, nzb_do, nzt_do, nzb, nzt+1
+                                  WRITE (22)  local_2d
+                               ELSE
+                                  WRITE (22)  -1, -1, -1, -1, -1, -1
+                               ENDIF
+                            ENDIF
+#if defined( __parallel )
+                            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+                         ENDDO
+
+                      ELSE
+!
+!--                      PE0 receives partial arrays from all processors of the 
+!--                      respective cross section and outputs them. Here a 
+!--                      barrier has to be set, because otherwise 
+!--                      "-MPI- FATAL: Remote protocol queue full" may occur.
+                         CALL MPI_BARRIER( comm2d, ierr )
+
+                         ngp = ( nxr-nxl + 1 ) * ( nzt_do-nzb_do + 1 )
+                         IF ( myid == 0 )  THEN
+!
+!--                         Local array can be relocated directly.
+                            IF ( ( section(is,s_ind) >= nys  .AND.              &
+                                   section(is,s_ind) <= nyn )  .OR.             &
+                                 ( section(is,s_ind) == -1  .AND.               &
+                                   nys-1 == -1 ) )  THEN
+                               total_2d(nxl:nxr,nzb_do:nzt_do) = local_2d
+                            ENDIF
+!
+!--                         Receive data from all other PEs.
+                            DO  n = 1, numprocs-1
+!
+!--                            Receive index limits first, then array.
+!--                            Index limits are received in arbitrary order from
+!--                            the PEs.
+                               CALL MPI_RECV( ind(1), 4, MPI_INTEGER,          &
+                                              MPI_ANY_SOURCE, 0, comm2d,       &
+                                              status, ierr )
+!
+!--                            Not all PEs have data for XZ-cross-section.
+                               IF ( ind(1) /= -9999 )  THEN
+                                  sender = status(MPI_SOURCE)
+                                  DEALLOCATE( local_2d )
+                                  ALLOCATE( local_2d(ind(1):ind(2),            &
+                                                     ind(3):ind(4)) )
+                                  CALL MPI_RECV( local_2d(ind(1),ind(3)), ngp, &
+                                                 MPI_REAL, sender, 1, comm2d,  &
+                                                 status, ierr )
+                                  total_2d(ind(1):ind(2),ind(3):ind(4)) =      &
+                                                                        local_2d
+                               ENDIF
+                            ENDDO
+!
+!--                         Relocate the local array for the next loop increment
+                            DEALLOCATE( local_2d )
+                            ALLOCATE( local_2d(nxl:nxr,nzb_do:nzt_do) )
+
+#if defined( __netcdf )
+                            nc_stat = NF90_PUT_VAR( id_set_xz(av),             &
+                                                 id_var_do2d(av,if),           &
+                                                 total_2d(0:nx,nzb_do:nzt_do), &
+                               start = (/ 1, is, 1, do2d_xz_time_count(av) /), &
+                                          count = (/ nx+1, 1, nzt_do-nzb_do+1, 1 /) )
+                            CALL netcdf_handle_error( 'data_output_2d', 58 )
+#endif
+
+                         ELSE
+!
+!--                         If the cross section resides on the PE, send the
+!--                         local index limits, otherwise send -9999 to PE0.
+                            IF ( ( section(is,s_ind) >= nys  .AND.              &
+                                   section(is,s_ind) <= nyn )  .OR.             &
+                                 ( section(is,s_ind) == -1  .AND.  nys-1 == -1 ) ) &
+                            THEN
+                               ind(1) = nxl; ind(2) = nxr
+                               ind(3) = nzb_do;   ind(4) = nzt_do
+                            ELSE
+                               ind(1) = -9999; ind(2) = -9999
+                               ind(3) = -9999; ind(4) = -9999
+                            ENDIF
+                            CALL MPI_SEND( ind(1), 4, MPI_INTEGER, 0, 0,       &
+                                           comm2d, ierr )
+!
+!--                         If applicable, send data to PE0.
+                            IF ( ind(1) /= -9999 )  THEN
+                               CALL MPI_SEND( local_2d(nxl,nzb_do), ngp,         &
+                                              MPI_REAL, 0, 1, comm2d, ierr )
+                            ENDIF
+                         ENDIF
+!
+!--                      A barrier has to be set, because otherwise some PEs may
+!--                      proceed too fast so that PE0 may receive wrong data on
+!--                      tag 0
+                         CALL MPI_BARRIER( comm2d, ierr )
+                      ENDIF
+
+                   ENDIF
+#else
+#if defined( __netcdf )
+                   nc_stat = NF90_PUT_VAR( id_set_xz(av),                   &
+                                           id_var_do2d(av,if),              &
+                                           local_2d(nxl:nxr,nzb_do:nzt_do), &
+                            start = (/ 1, is, 1, do2d_xz_time_count(av) /), &
+                                       count = (/ nx+1, 1, nzt_do-nzb_do+1, 1 /) )
+                   CALL netcdf_handle_error( 'data_output_2d', 451 )
+#endif
+#endif
+
+                CASE ( 'yz' )
+!
+!--                Update the netCDF yz cross section time axis.
+!--                In case of parallel output, this is only done by PE0
+!--                to increase the performance.
+                   IF ( simulated_time /= do2d_yz_last_time(av) )  THEN
+                      do2d_yz_time_count(av) = do2d_yz_time_count(av) + 1
+                      do2d_yz_last_time(av)  = simulated_time
+                      IF ( myid == 0 )  THEN
+                         IF ( .NOT. data_output_2d_on_each_pe  &
+                              .OR.  netcdf_data_format > 4 )   &
+                         THEN
+#if defined( __netcdf )
+                            nc_stat = NF90_PUT_VAR( id_set_yz(av),             &
+                                                    id_var_time_yz(av),        &
+                                             (/ time_since_reference_point /), &
+                                         start = (/ do2d_yz_time_count(av) /), &
+                                                    count = (/ 1 /) )
+                            CALL netcdf_handle_error( 'data_output_2d', 59 )
+#endif
+                         ENDIF
+                      ENDIF
+                   ENDIF
+
+!
+!--                If required, carry out averaging along x
+                   IF ( section(is,s_ind) == -1 )  THEN
+
+                      ALLOCATE( local_2d_l(nys:nyn,nzb_do:nzt_do) )
+                      local_2d_l = 0.0_wp
+                      ngp = ( nyn-nys+1 ) * ( nzt_do-nzb_do+1 )
+!
+!--                   First local averaging on the PE
+                      DO  k = nzb_do, nzt_do
+                         DO  j = nys, nyn
+                            DO  i = nxl, nxr
+                               local_2d_l(j,k) = local_2d_l(j,k) +             &
+                                                 local_pf(i,j,k)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+#if defined( __parallel )
+!
+!--                   Now do the averaging over all PEs along x
+                      IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+                      CALL MPI_ALLREDUCE( local_2d_l(nys,nzb_do),                &
+                                          local_2d(nys,nzb_do), ngp, MPI_REAL,   &
+                                          MPI_SUM, comm1dx, ierr )
+#else
+                      local_2d = local_2d_l
+#endif
+                      local_2d = local_2d / ( nx + 1.0_wp )
+
+                      DEALLOCATE( local_2d_l )
+
+                   ELSE
+!
+!--                   Just store the respective section on the local array
+!--                   (but only if it is available on this PE!)
+                      IF ( section(is,s_ind) >= nxl  .AND.  section(is,s_ind) <= nxr ) &
+                      THEN
+                         local_2d = local_pf(section(is,s_ind),:,nzb_do:nzt_do)
+                      ENDIF
+
+                   ENDIF
+
+#if defined( __parallel )
+                   IF ( netcdf_data_format > 4 )  THEN
+!
+!--                   Output in netCDF4/HDF5 format.
+!--                   Output only on those PEs where the respective cross
+!--                   sections reside. Cross sections averaged along x are
+!--                   output on the respective first PE along x (myidx=0).
+                      IF ( ( section(is,s_ind) >= nxl  .AND.                       &
+                             section(is,s_ind) <= nxr )  .OR.                      &
+                           ( section(is,s_ind) == -1  .AND.  myidx == 0 ) )  THEN
+#if defined( __netcdf )
+!
+!--                      For parallel output, all cross sections are first
+!--                      stored here on a local array and will be written to the
+!--                      output file afterwards to increase the performance.
+                         DO  j = nys, nyn
+                            DO  k = nzb_do, nzt_do
+                               local_2d_sections_l(is,j,k) = local_2d(j,k)
+                            ENDDO
+                         ENDDO
+#endif
+                      ENDIF
+
+                   ELSE
+
+                      IF ( data_output_2d_on_each_pe )  THEN
+!
+!--                      Output of partial arrays on each PE. If the cross
+!--                      section does not reside on the PE, output special
+!--                      index values.
+#if defined( __netcdf )
+                         IF ( myid == 0 )  THEN
+                            WRITE ( 23 )  time_since_reference_point,          &
+                                          do2d_yz_time_count(av), av
+                         ENDIF
+#endif
+                         DO  i = 0, io_blocks-1
+                            IF ( i == io_group )  THEN
+                               IF ( ( section(is,s_ind) >= nxl  .AND.          &
+                                      section(is,s_ind) <= nxr )  .OR.         &
+                                    ( section(is,s_ind) == -1  .AND.           &
+                                      nxl-1 == -1 ) )                          &
+                               THEN
+                                  WRITE (23)  nys, nyn, nzb_do, nzt_do, nzb, nzt+1
+                                  WRITE (23)  local_2d
+                               ELSE
+                                  WRITE (23)  -1, -1, -1, -1, -1, -1
+                               ENDIF
+                            ENDIF
+#if defined( __parallel )
+                            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+                         ENDDO
+
+                      ELSE
+!
+!--                      PE0 receives partial arrays from all processors of the 
+!--                      respective cross section and outputs them. Here a
+!--                      barrier has to be set, because otherwise 
+!--                      "-MPI- FATAL: Remote protocol queue full" may occur.
+                         CALL MPI_BARRIER( comm2d, ierr )
+
+                         ngp = ( nyn-nys+1 ) * ( nzt_do-nzb_do+1 )
+                         IF ( myid == 0 )  THEN
+!
+!--                         Local array can be relocated directly.
+                            IF ( ( section(is,s_ind) >= nxl  .AND.             &
+                                   section(is,s_ind) <= nxr )   .OR.           &
+                                 ( section(is,s_ind) == -1  .AND.  nxl-1 == -1 ) ) &
+                            THEN
+                               total_2d(nys:nyn,nzb_do:nzt_do) = local_2d
+                            ENDIF
+!
+!--                         Receive data from all other PEs.
+                            DO  n = 1, numprocs-1
+!
+!--                            Receive index limits first, then array.
+!--                            Index limits are received in arbitrary order from
+!--                            the PEs.
+                               CALL MPI_RECV( ind(1), 4, MPI_INTEGER,          &
+                                              MPI_ANY_SOURCE, 0, comm2d,       &
+                                              status, ierr )
+!
+!--                            Not all PEs have data for YZ-cross-section.
+                               IF ( ind(1) /= -9999 )  THEN
+                                  sender = status(MPI_SOURCE)
+                                  DEALLOCATE( local_2d )
+                                  ALLOCATE( local_2d(ind(1):ind(2),            &
+                                                     ind(3):ind(4)) )
+                                  CALL MPI_RECV( local_2d(ind(1),ind(3)), ngp, &
+                                                 MPI_REAL, sender, 1, comm2d,  &
+                                                 status, ierr )
+                                  total_2d(ind(1):ind(2),ind(3):ind(4)) =      &
+                                                                        local_2d
+                               ENDIF
+                            ENDDO
+!
+!--                         Relocate the local array for the next loop increment
+                            DEALLOCATE( local_2d )
+                            ALLOCATE( local_2d(nys:nyn,nzb_do:nzt_do) )
+
+#if defined( __netcdf )
+                            nc_stat = NF90_PUT_VAR( id_set_yz(av),             &
+                                                 id_var_do2d(av,if),           &
+                                                 total_2d(0:ny,nzb_do:nzt_do), &
+                            start = (/ is, 1, 1, do2d_yz_time_count(av) /),    &
+                                       count = (/ 1, ny+1, nzt_do-nzb_do+1, 1 /) )
+                            CALL netcdf_handle_error( 'data_output_2d', 61 )
+#endif
+
+                         ELSE
+!
+!--                         If the cross section resides on the PE, send the
+!--                         local index limits, otherwise send -9999 to PE0.
+                            IF ( ( section(is,s_ind) >= nxl  .AND.              &
+                                   section(is,s_ind) <= nxr )  .OR.             &
+                                 ( section(is,s_ind) == -1  .AND.  nxl-1 == -1 ) ) &
+                            THEN
+                               ind(1) = nys; ind(2) = nyn
+                               ind(3) = nzb_do;   ind(4) = nzt_do
+                            ELSE
+                               ind(1) = -9999; ind(2) = -9999
+                               ind(3) = -9999; ind(4) = -9999
+                            ENDIF
+                            CALL MPI_SEND( ind(1), 4, MPI_INTEGER, 0, 0,       &
+                                           comm2d, ierr )
+!
+!--                         If applicable, send data to PE0.
+                            IF ( ind(1) /= -9999 )  THEN
+                               CALL MPI_SEND( local_2d(nys,nzb_do), ngp,         &
+                                              MPI_REAL, 0, 1, comm2d, ierr )
+                            ENDIF
+                         ENDIF
+!
+!--                      A barrier has to be set, because otherwise some PEs may
+!--                      proceed too fast so that PE0 may receive wrong data on
+!--                      tag 0
+                         CALL MPI_BARRIER( comm2d, ierr )
+                      ENDIF
+
+                   ENDIF
+#else
+#if defined( __netcdf )
+                   nc_stat = NF90_PUT_VAR( id_set_yz(av),                   &
+                                           id_var_do2d(av,if),              &
+                                           local_2d(nys:nyn,nzb_do:nzt_do), &
+                            start = (/ is, 1, 1, do2d_xz_time_count(av) /), &
+                                           count = (/ 1, ny+1, nzt_do-nzb_do+1, 1 /) )
+                   CALL netcdf_handle_error( 'data_output_2d', 452 )
+#endif
+#endif
+
+             END SELECT
+
+             is = is + 1
+          ENDDO loop1
+
+!
+!--       For parallel output, all data were collected before on a local array
+!--       and are written now to the netcdf file. This must be done to increase
+!--       the performance of the parallel output.
+#if defined( __netcdf )
+          IF ( netcdf_data_format > 4 )  THEN
+
+                SELECT CASE ( mode )
+
+                   CASE ( 'xy' )
+                      IF ( two_d ) THEN
+                         nis = 1
+                         two_d = .FALSE.
+                      ELSE
+                         nis = ns
+                      ENDIF
+!
+!--                   Do not output redundant ghost point data except for the
+!--                   boundaries of the total domain.
+!                      IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+!                         nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+!                                                 id_var_do2d(av,if),           &
+!                                                 local_2d_sections(nxl:nxr+1,  &
+!                                                    nys:nyn,1:nis),            &
+!                                                 start = (/ nxl+1, nys+1, 1,   &
+!                                                    do2d_xy_time_count(av) /), &
+!                                                 count = (/ nxr-nxl+2,         &
+!                                                            nyn-nys+1, nis, 1  &
+!                                                          /) )
+!                      ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+!                         nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+!                                                 id_var_do2d(av,if),           &
+!                                                 local_2d_sections(nxl:nxr,    &
+!                                                    nys:nyn+1,1:nis),          &
+!                                                 start = (/ nxl+1, nys+1, 1,   &
+!                                                    do2d_xy_time_count(av) /), &
+!                                                 count = (/ nxr-nxl+1,         &
+!                                                            nyn-nys+2, nis, 1  &
+!                                                          /) )
+!                      ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+!                         nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+!                                                 id_var_do2d(av,if),           &
+!                                                 local_2d_sections(nxl:nxr+1,  &
+!                                                    nys:nyn+1,1:nis),          &
+!                                                 start = (/ nxl+1, nys+1, 1,   &
+!                                                    do2d_xy_time_count(av) /), &
+!                                                 count = (/ nxr-nxl+2,         &
+!                                                            nyn-nys+2, nis, 1  &
+!                                                          /) )
+!                      ELSE
+                         nc_stat = NF90_PUT_VAR( id_set_xy(av),                &
+                                                 id_var_do2d(av,if),           &
+                                                 local_2d_sections(nxl:nxr,    &
+                                                    nys:nyn,1:nis),            &
+                                                 start = (/ nxl+1, nys+1, 1,   &
+                                                    do2d_xy_time_count(av) /), &
+                                                 count = (/ nxr-nxl+1,         &
+                                                            nyn-nys+1, nis, 1  &
+                                                          /) )
+!                      ENDIF    
+
+                      CALL netcdf_handle_error( 'data_output_2d', 55 )
+
+                   CASE ( 'xz' )
+!
+!--                   First, all PEs get the information of all cross-sections.
+!--                   Then the data are written to the output file by all PEs
+!--                   while NF90_COLLECTIVE is set in subroutine 
+!--                   define_netcdf_header. Although redundant information are
+!--                   written to the output file in that case, the performance 
+!--                   is significantly better compared to the case where only
+!--                   the first row of PEs in x-direction (myidx = 0) is given
+!--                   the output while NF90_INDEPENDENT is set.
+                      IF ( npey /= 1 )  THEN
+                         
+#if defined( __parallel )
+!
+!--                      Distribute data over all PEs along y
+                         ngp = ( nxr-nxl+1 ) * ( nzt_do-nzb_do+1 ) * ns
+                         IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr )
+                         CALL MPI_ALLREDUCE( local_2d_sections_l(nxl,1,nzb_do),  &
+                                             local_2d_sections(nxl,1,nzb_do),    &
+                                             ngp, MPI_REAL, MPI_SUM, comm1dy,  &
+                                             ierr )
+#else
+                         local_2d_sections = local_2d_sections_l
+#endif
+                      ENDIF
+!
+!--                   Do not output redundant ghost point data except for the
+!--                   boundaries of the total domain.
+!                      IF ( nxr == nx )  THEN
+!                         nc_stat = NF90_PUT_VAR( id_set_xz(av),                &
+!                                             id_var_do2d(av,if),               & 
+!                                             local_2d_sections(nxl:nxr+1,1:ns, &
+!                                                nzb_do:nzt_do),                &
+!                                             start = (/ nxl+1, 1, 1,           &
+!                                                do2d_xz_time_count(av) /),     &
+!                                             count = (/ nxr-nxl+2, ns, nzt_do-nzb_do+1,  &
+!                                                        1 /) )
+!                      ELSE
+                         nc_stat = NF90_PUT_VAR( id_set_xz(av),                &
+                                             id_var_do2d(av,if),               &
+                                             local_2d_sections(nxl:nxr,1:ns,   &
+                                                nzb_do:nzt_do),                &
+                                             start = (/ nxl+1, 1, 1,           &
+                                                do2d_xz_time_count(av) /),     &
+                                             count = (/ nxr-nxl+1, ns, nzt_do-nzb_do+1,  &
+                                                1 /) )
+!                      ENDIF
+
+                      CALL netcdf_handle_error( 'data_output_2d', 57 )
+
+                   CASE ( 'yz' )
+!
+!--                   First, all PEs get the information of all cross-sections.
+!--                   Then the data are written to the output file by all PEs
+!--                   while NF90_COLLECTIVE is set in subroutine 
+!--                   define_netcdf_header. Although redundant information are
+!--                   written to the output file in that case, the performance 
+!--                   is significantly better compared to the case where only
+!--                   the first row of PEs in y-direction (myidy = 0) is given
+!--                   the output while NF90_INDEPENDENT is set.
+                      IF ( npex /= 1 )  THEN
+
+#if defined( __parallel )
+!
+!--                      Distribute data over all PEs along x
+                         ngp = ( nyn-nys+1 ) * ( nzt-nzb + 2 ) * ns
+                         IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr )
+                         CALL MPI_ALLREDUCE( local_2d_sections_l(1,nys,nzb_do),  &
+                                             local_2d_sections(1,nys,nzb_do),    &
+                                             ngp, MPI_REAL, MPI_SUM, comm1dx,  &
+                                             ierr )
+#else
+                         local_2d_sections = local_2d_sections_l
+#endif
+                      ENDIF
+!
+!--                   Do not output redundant ghost point data except for the
+!--                   boundaries of the total domain.
+!                      IF ( nyn == ny )  THEN
+!                         nc_stat = NF90_PUT_VAR( id_set_yz(av),                &
+!                                             id_var_do2d(av,if),               &
+!                                             local_2d_sections(1:ns,           &
+!                                                nys:nyn+1,nzb_do:nzt_do),      &
+!                                             start = (/ 1, nys+1, 1,           &
+!                                                do2d_yz_time_count(av) /),     &
+!                                             count = (/ ns, nyn-nys+2,         &
+!                                                        nzt_do-nzb_do+1, 1 /) )
+!                      ELSE
+                         nc_stat = NF90_PUT_VAR( id_set_yz(av),                &
+                                             id_var_do2d(av,if),               &
+                                             local_2d_sections(1:ns,nys:nyn,   &
+                                                nzb_do:nzt_do),                &
+                                             start = (/ 1, nys+1, 1,           &
+                                                do2d_yz_time_count(av) /),     &
+                                             count = (/ ns, nyn-nys+1,         &
+                                                        nzt_do-nzb_do+1, 1 /) )
+!                      ENDIF
+
+                      CALL netcdf_handle_error( 'data_output_2d', 60 )
+
+                   CASE DEFAULT
+                      message_string = 'unknown cross-section: ' // TRIM( mode )
+                      CALL message( 'data_output_2d', 'PA0180', 1, 2, 0, 6, 0 )
+
+                END SELECT                     
+
+          ENDIF
+#endif
+       ENDIF
+
+       if = if + 1
+       l = MAX( 2, LEN_TRIM( do2d(av,if) ) )
+       do2d_mode = do2d(av,if)(l-1:l)
+
+    ENDDO
+
+!
+!-- Deallocate temporary arrays.
+    IF ( ALLOCATED( level_z ) )  DEALLOCATE( level_z )
+    IF ( netcdf_data_format > 4 )  THEN
+       DEALLOCATE( local_pf, local_2d, local_2d_sections )
+       IF( mode == 'xz' .OR. mode == 'yz' ) DEALLOCATE( local_2d_sections_l )
+    ENDIF
+#if defined( __parallel )
+    IF ( .NOT.  data_output_2d_on_each_pe  .AND.  myid == 0 )  THEN
+       DEALLOCATE( total_2d )
+    ENDIF
+#endif
+
+!
+!-- Close plot output file.
+    file_id = 20 + s_ind
+
+    IF ( data_output_2d_on_each_pe )  THEN
+       DO  i = 0, io_blocks-1
+          IF ( i == io_group )  THEN
+             CALL close_file( file_id )
+          ENDIF
+#if defined( __parallel )
+          CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       ENDDO
+    ELSE
+       IF ( myid == 0 )  CALL close_file( file_id )
+    ENDIF
+
+    CALL cpu_log( log_point(3), 'data_output_2d', 'stop' )
+
+ END SUBROUTINE data_output_2d
Index: /palm/tags/release-6.0/SOURCE/data_output_3d.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_3d.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_3d.f90	(revision 3477)
@@ -0,0 +1,897 @@
+!> @file data_output_3d.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Adjustment of biometeorology calls
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! bugfix: nx, ny are required in non-parallel case
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! (from branch resler)
+! Add Biometeorology
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables and format statements removed
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Added nzb_do and nzt_do for some modules for 3d output
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Allocation checks implemented (averaged data will be assigned to fill values 
+! if no allocation happened so far) 
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! bugfix: missing parallel cpp-directives added
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2756 2018-01-16 18:11:14Z suehring
+! Fill values for 3D output of chemical species introduced.
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of turbulence_closure_mod (TG)
+! Implementation of chemistry module (FK)
+! Set fill values at topography grid points or e.g. non-natural-type surface
+! in case of LSM output (MS)
+! 
+! 2512 2017-10-04 08:26:59Z raasch
+! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2209 2017-04-19 09:34:46Z kanani
+! Added plant canopy model output
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean and rho_av to rho_ocean_av
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters,
+! changed prefix for urban surface model output to "usm_",
+! introduced control parameter varnamelength for LEN of trimvar.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added support for new urban surface model (temporary modifications of 
+! SELECT CASE ( ) necessary, see variable trimvar)
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1980 2016-07-29 15:51:57Z suehring
+! Bugfix, in order to steer user-defined output, setting flag found explicitly
+! to .F.
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Output of radiation quantities is now done directly in the respective module
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Output of land surface quantities is now done directly in the respective module.
+! Unnecessary directive __parallel removed.
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Scalar surface flux added
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! prr moved to arrays_3d
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! prr vertical dimensions set to nzb_do to nzt_do. Unused variables deleted.
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! test output removed
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1745 2016-02-05 13:06:51Z gronemeier
+! Bugfix: test if time axis limit exceeds moved to point after call of check_open
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of radiative heating rates for RRTMG
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Added support for RRTMG
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added suppport for land surface model and radiation model output. In the course
+! of this action, the limits for vertical loops have been changed (from nzb and 
+! nzt+1 to nzb_do and nzt_do, respectively in order to allow soil model output).
+! Moreover, a new vertical grid zs was introduced.
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! parts concerning avs output removed,
+! -netcdf output queries
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1308 2014-03-13 14:58:42Z fricke
+! Check, if the limit of the time dimension is exceeded for parallel output
+! To increase the performance for parallel output, the following is done:
+! - Update of time axis is only done by PE0
+!
+! 1244 2013-10-31 08:16:56Z raasch
+! Bugfix for index bounds in case of 3d-parallel output
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! ql is calculated by calc_liquid_water_content
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! array_kind renamed precision_kind
+!
+! 1076 2012-12-05 08:30:18Z hoffmann
+! Bugfix in output of ql
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! +nr, qr, prr, qc and averaged quantities
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented
+!
+! 1007 2012-09-19 14:30:36Z franke
+! Bugfix: missing calculation of ql_vp added
+!
+! Revision 1.1  1997/09/03 06:29:36  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Output of the 3D-arrays in netCDF and/or AVS format.
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_3d( av )
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  d_exner, e, nc, nr, p, pt, prr, q, qc, ql, ql_c, ql_v, qr, s,   &
+               tend, u, v, vpt, w
+
+    USE averaging
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  lv_d_cp
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_data_output_3d
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_data_output_3d
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_data_output_3d
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, biometeorology, do3d, do3d_no, do3d_time_count,  &
+               io_blocks, io_group, land_surface, message_string,              &
+               ntdim_3d, nz_do3d,  ocean_mode, plant_canopy,                   &
+               psolver, simulated_time, time_since_reference_point,            &
+               urban_surface, varnamelength
+
+    USE cpulog,                                                                &
+        ONLY:  log_point, cpu_log
+
+    USE gust_mod,                                                              &
+        ONLY: gust_data_output_3d, gust_module_enabled
+
+#if defined( __parallel )
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,     &
+               wall_flags_0
+#else
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb,  &
+               nzt, wall_flags_0
+#endif
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_data_output_3d, nzb_soil, nzt_soil
+
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_interface,                                                      &
+        ONLY:  fill_value, id_set_3d, id_var_do3d, id_var_time_3d, nc_stat,    &
+               netcdf_data_format, netcdf_handle_error
+        
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_data_output_3d
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, particles,                 &
+               particle_advection_start, prt_count
+        
+    USE pegrid
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pcm_data_output_3d
+        
+    USE radiation_model_mod,                                                   &
+        ONLY:  nzub, nzut, radiation, radiation_data_output_3d
+               
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_data_output_3d     
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_data_output_3d
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_data_output_3d
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  av        !< 
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+    INTEGER(iwp) ::  i         !< 
+    INTEGER(iwp) ::  if        !< 
+    INTEGER(iwp) ::  j         !< 
+    INTEGER(iwp) ::  k         !< 
+    INTEGER(iwp) ::  n         !< 
+    INTEGER(iwp) ::  nzb_do    !< vertical lower limit for data output
+    INTEGER(iwp) ::  nzt_do    !< vertical upper limit for data output
+
+    LOGICAL      ::  found     !< 
+    LOGICAL      ::  resorted  !< 
+
+    REAL(wp)     ::  mean_r    !< 
+    REAL(wp)     ::  s_r2      !< 
+    REAL(wp)     ::  s_r3      !< 
+
+    REAL(sp), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf  !<
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< 
+
+    CHARACTER (LEN=varnamelength) ::  trimvar  !< TRIM of output-variable string
+
+!
+!-- Return, if nothing to output
+    IF ( do3d_no(av) == 0 )  RETURN
+
+    CALL cpu_log (log_point(14),'data_output_3d','start')
+
+!
+!-- Open output file.
+!-- For classic or 64bit netCDF output on more than one PE, each PE opens its
+!-- own file and writes the data of its subdomain in binary format. After the
+!-- run, these files are combined to one NetCDF file by combine_plot_fields.
+!-- For netCDF4/HDF5 output, data is written in parallel into one file.
+    IF ( netcdf_data_format < 5 )  THEN
+#if defined( __parallel )
+       CALL check_open( 30 )
+#endif
+       IF ( myid == 0 )  CALL check_open( 106+av*10 )
+    ELSE
+       CALL check_open( 106+av*10 )
+    ENDIF
+
+!
+!-- For parallel netcdf output the time axis must be limited. Return, if this
+!-- limit is exceeded. This could be the case, if the simulated time exceeds 
+!-- the given end time by the length of the given output interval.
+    IF ( netcdf_data_format > 4 )  THEN
+       IF ( do3d_time_count(av) + 1 > ntdim_3d(av) )  THEN
+          WRITE ( message_string, * ) 'Output of 3d data is not given at t=',  &
+                                      simulated_time, '&because the maximum ', & 
+                                      'number of output time levels is ',      &
+                                      'exceeded.'
+          CALL message( 'data_output_3d', 'PA0387', 0, 1, 0, 6, 0 )
+          CALL cpu_log( log_point(14), 'data_output_3d', 'stop' )
+          RETURN
+       ENDIF
+    ENDIF
+
+!
+!-- Update the netCDF time axis
+!-- In case of parallel output, this is only done by PE0 to increase the
+!-- performance.
+#if defined( __netcdf )
+    do3d_time_count(av) = do3d_time_count(av) + 1
+    IF ( myid == 0 )  THEN
+       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_time_3d(av),           &
+                               (/ time_since_reference_point /),            &
+                               start = (/ do3d_time_count(av) /),           &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_3d', 376 )
+    ENDIF
+#endif
+
+!
+!-- Loop over all variables to be written.
+    if = 1
+
+    DO  WHILE ( do3d(av,if)(1:1) /= ' ' )
+
+!
+!--    Temporary solution to account for data output within the new urban 
+!--    surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar ).
+!--    Store the array chosen on the temporary array.
+       trimvar = TRIM( do3d(av,if) )
+       IF ( urban_surface  .AND.  trimvar(1:4) == 'usm_' )  THEN
+          trimvar = 'usm_output'
+          resorted = .TRUE.
+          nzb_do   = nzub
+          nzt_do   = nzut
+       ELSE
+          resorted = .FALSE.
+          nzb_do   = nzb
+          nzt_do   = nz_do3d
+       ENDIF
+!
+!--    Set flag to steer output of radiation, land-surface, or user-defined
+!--    quantities
+       found = .FALSE.
+!
+!--    Allocate a temporary array with the desired output dimensions.
+       ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do) )
+!
+!--    Before each output, set array local_pf to fill value
+       local_pf = fill_value
+!
+!--    Set masking flag for topography for not resorted arrays
+       flag_nr = 0
+
+       SELECT CASE ( trimvar )
+
+          CASE ( 'e' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => e
+             ELSE
+                IF ( .NOT. ALLOCATED( e_av ) ) THEN
+                   ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   e_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => e_av
+             ENDIF
+
+          CASE ( 'thetal' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => pt
+             ELSE
+                IF ( .NOT. ALLOCATED( lpt_av ) ) THEN
+                   ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   lpt_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => lpt_av
+             ENDIF
+
+          CASE ( 'p' )
+             IF ( av == 0 )  THEN
+                IF ( psolver /= 'sor' )  CALL exchange_horiz( p, nbgp )
+                to_be_resorted => p
+             ELSE
+                IF ( .NOT. ALLOCATED( p_av ) ) THEN
+                   ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   p_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                IF ( psolver /= 'sor' )  CALL exchange_horiz( p_av, nbgp )
+                to_be_resorted => p_av
+             ENDIF
+
+          CASE ( 'pc' )  ! particle concentration (requires ghostpoint exchange)
+             IF ( av == 0 )  THEN
+                IF ( simulated_time >= particle_advection_start )  THEN
+                   tend = prt_count
+                ELSE
+                   tend = 0.0_wp
+                ENDIF
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+                resorted = .TRUE.
+             ELSE
+                IF ( .NOT. ALLOCATED( pc_av ) ) THEN
+                   ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   pc_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => pc_av
+             ENDIF
+
+          CASE ( 'pr' )  ! mean particle radius (effective radius)
+             IF ( av == 0 )  THEN
+                IF ( simulated_time >= particle_advection_start )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            number_of_particles = prt_count(k,j,i)
+                            IF (number_of_particles <= 0)  CYCLE
+                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                            s_r2 = 0.0_wp
+                            s_r3 = 0.0_wp
+                            DO  n = 1, number_of_particles
+                               IF ( particles(n)%particle_mask )  THEN
+                                  s_r2 = s_r2 + particles(n)%radius**2 * &
+                                         particles(n)%weight_factor
+                                  s_r3 = s_r3 + particles(n)%radius**3 * &
+                                         particles(n)%weight_factor
+                               ENDIF
+                            ENDDO
+                            IF ( s_r2 > 0.0_wp )  THEN
+                               mean_r = s_r3 / s_r2
+                            ELSE
+                               mean_r = 0.0_wp
+                            ENDIF
+                            tend(k,j,i) = mean_r
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+                   tend = 0.0_wp
+                ENDIF
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+                resorted = .TRUE.
+             ELSE
+                IF ( .NOT. ALLOCATED( pr_av ) ) THEN
+                   ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   pr_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => pr_av
+             ENDIF
+
+          CASE ( 'theta' )
+             IF ( av == 0 )  THEN
+                IF ( .NOT. bulk_cloud_model ) THEN
+                   to_be_resorted => pt
+                ELSE
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            local_pf(i,j,k) = pt(k,j,i) + lv_d_cp *            &
+                                                          d_exner(k) *         &
+                                                          ql(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   resorted = .TRUE.
+                ENDIF
+             ELSE
+                IF ( .NOT. ALLOCATED( pt_av ) ) THEN
+                   ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   pt_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => pt_av
+             ENDIF
+
+          CASE ( 'q' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => q
+             ELSE
+                IF ( .NOT. ALLOCATED( q_av ) ) THEN
+                   ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   q_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => q_av
+             ENDIF
+
+          CASE ( 'ql' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => ql
+             ELSE
+                IF ( .NOT. ALLOCATED( ql_av ) ) THEN
+                   ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ql_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => ql_av
+             ENDIF
+
+          CASE ( 'ql_c' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => ql_c
+             ELSE
+                IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN
+                   ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ql_c_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => ql_c_av
+             ENDIF
+
+          CASE ( 'ql_v' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => ql_v
+             ELSE
+                IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN
+                   ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ql_v_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => ql_v_av
+             ENDIF
+
+          CASE ( 'ql_vp' )
+             IF ( av == 0 )  THEN
+                IF ( simulated_time >= particle_advection_start )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb_do, nzt_do
+                            number_of_particles = prt_count(k,j,i)
+                            IF (number_of_particles <= 0)  CYCLE
+                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                            DO  n = 1, number_of_particles
+                               IF ( particles(n)%particle_mask )  THEN
+                                  tend(k,j,i) =  tend(k,j,i) +                 &
+                                                 particles(n)%weight_factor /  &
+                                                 prt_count(k,j,i)
+                               ENDIF
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+                   tend = 0.0_wp
+                ENDIF
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+                resorted = .TRUE.
+             ELSE
+                IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN
+                   ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ql_vp_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => ql_vp_av
+             ENDIF
+
+          CASE ( 'qv' )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_do, nzt_do
+                         local_pf(i,j,k) = q(k,j,i) - ql(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+                resorted = .TRUE.
+             ELSE
+                IF ( .NOT. ALLOCATED( qv_av ) ) THEN
+                   ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   qv_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => qv_av
+             ENDIF
+
+          CASE ( 's' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => s
+             ELSE
+                IF ( .NOT. ALLOCATED( s_av ) ) THEN
+                   ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   s_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => s_av
+             ENDIF
+
+          CASE ( 'u' )
+             flag_nr = 1
+             IF ( av == 0 )  THEN
+                to_be_resorted => u
+             ELSE
+                IF ( .NOT. ALLOCATED( u_av ) ) THEN
+                   ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   u_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => u_av
+             ENDIF
+
+          CASE ( 'v' )
+             flag_nr = 2
+             IF ( av == 0 )  THEN
+                to_be_resorted => v
+             ELSE
+                IF ( .NOT. ALLOCATED( v_av ) ) THEN
+                   ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   v_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => v_av
+             ENDIF
+
+          CASE ( 'thetav' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => vpt
+             ELSE
+                IF ( .NOT. ALLOCATED( vpt_av ) ) THEN
+                   ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   vpt_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => vpt_av
+             ENDIF
+
+          CASE ( 'w' )
+             flag_nr = 3
+             IF ( av == 0 )  THEN
+                to_be_resorted => w
+             ELSE
+                IF ( .NOT. ALLOCATED( w_av ) ) THEN
+                   ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   w_av = REAL( fill_value, KIND = wp )
+                ENDIF
+                to_be_resorted => w_av
+             ENDIF
+!             
+!--       Block of urban surface model outputs   
+          CASE ( 'usm_output' )
+             CALL usm_data_output_3d( av, do3d(av,if), found, local_pf,        &
+                                         nzb_do, nzt_do )
+
+          CASE DEFAULT
+
+!
+!--          Quantities of other modules
+             IF ( .NOT. found  .AND.  bulk_cloud_model )  THEN
+                CALL bcm_data_output_3d( av, do3d(av,if), found, local_pf,     &
+                                         nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                CALL chem_data_output_3d( av, do3d(av,if), found,              &
+                                          local_pf, fill_value, nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                CALL gust_data_output_3d( av, do3d(av,if), found, local_pf,    &
+                                          nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found  .AND.  land_surface )  THEN
+!
+!--             For soil model quantities, it is required to re-allocate local_pf
+                nzb_do = nzb_soil
+                nzt_do = nzt_soil
+
+                DEALLOCATE ( local_pf )
+                ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do) )
+                local_pf = fill_value
+
+                CALL lsm_data_output_3d( av, do3d(av,if), found, local_pf )
+                resorted = .TRUE.
+
+!
+!--             If no soil model variable was found, re-allocate local_pf
+                IF ( .NOT. found )  THEN
+                   nzb_do = nzb
+                   nzt_do = nz_do3d
+
+                   DEALLOCATE ( local_pf )
+                   ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do) )                 
+                ENDIF
+
+             ENDIF
+
+             IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                CALL ocean_data_output_3d( av, do3d(av,if), found, local_pf,   &
+                                           nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found  .AND.  plant_canopy )  THEN
+                CALL pcm_data_output_3d( av, do3d(av,if), found, local_pf,     &
+                                         fill_value, nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found  .AND.  radiation )  THEN
+                CALL radiation_data_output_3d( av, do3d(av,if), found,         &
+                                               local_pf, nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found )  THEN
+                CALL tcm_data_output_3d( av, do3d(av,if), found, local_pf,     &
+                                         nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+             
+!
+!--          SALSA output
+             IF ( .NOT. found  .AND.  salsa )  THEN
+                CALL salsa_data_output_3d( av, do3d(av,if), found, local_pf )
+                resorted = .TRUE.
+             ENDIF                  
+
+             IF ( .NOT. found  .AND.  biometeorology )  THEN
+                 CALL biom_data_output_3d( av, do3d(av,if), found, local_pf,   &
+                                           nzb_do, nzt_do )
+             ENDIF
+
+!
+!--          User defined quantities
+             IF ( .NOT. found )  THEN
+                CALL user_data_output_3d( av, do3d(av,if), found, local_pf,    &
+                                          nzb_do, nzt_do )
+                resorted = .TRUE.
+             ENDIF
+
+             IF ( .NOT. found )  THEN
+                message_string =  'no output available for: ' //               &
+                                  TRIM( do3d(av,if) )
+                CALL message( 'data_output_3d', 'PA0182', 0, 0, 0, 6, 0 )
+             ENDIF
+
+       END SELECT
+
+!
+!--    Resort the array to be output, if not done above
+       IF ( .NOT. resorted )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb_do, nzt_do
+                   local_pf(i,j,k) = MERGE(                                    &
+                                      to_be_resorted(k,j,i),                   &
+                                      REAL( fill_value, KIND = wp ),           &
+                                      BTEST( wall_flags_0(k,j,i), flag_nr ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    Output of the 3D-array
+#if defined( __parallel )
+       IF ( netcdf_data_format < 5 )  THEN
+!
+!--       Non-parallel netCDF output. Data is output in parallel in
+!--       FORTRAN binary format here, and later collected into one file by
+!--       combine_plot_fields
+          IF ( myid == 0 )  THEN
+             WRITE ( 30 )  time_since_reference_point,                   &
+                           do3d_time_count(av), av
+          ENDIF
+          DO  i = 0, io_blocks-1
+             IF ( i == io_group )  THEN
+                WRITE ( 30 )  nxl, nxr, nys, nyn, nzb_do, nzt_do
+                WRITE ( 30 )  local_pf(:,:,nzb_do:nzt_do)
+             ENDIF
+
+             CALL MPI_BARRIER( comm2d, ierr )
+
+          ENDDO
+
+       ELSE
+#if defined( __netcdf )
+!
+!--       Parallel output in netCDF4/HDF5 format.
+!          IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+!             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
+!                               local_pf(nxl:nxr+1,nys:nyn,nzb_do:nzt_do),    &
+!                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
+!                count = (/ nxr-nxl+2, nyn-nys+1, nzt_do-nzb_do+1, 1 /) )
+!          ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+!             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
+!                               local_pf(nxl:nxr,nys:nyn+1,nzb_do:nzt_do),    &
+!                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
+!                count = (/ nxr-nxl+1, nyn-nys+2, nzt_do-nzb_do+1, 1 /) )
+!          ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+!             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
+!                             local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do  ),  &
+!                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
+!                count = (/ nxr-nxl+2, nyn-nys+2, nzt_do-nzb_do+1, 1 /) )
+!          ELSE
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),  &
+                                 local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do),    &
+                start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /),  &
+                count = (/ nxr-nxl+1, nyn-nys+1, nzt_do-nzb_do+1, 1 /) )
+!          ENDIF
+          CALL netcdf_handle_error( 'data_output_3d', 386 )
+#endif
+       ENDIF
+#else
+#if defined( __netcdf )
+       nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if),        &
+                         local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do),        &
+                         start = (/ 1, 1, 1, do3d_time_count(av) /),     &
+                         count = (/ nx+1, ny+1, nzt_do-nzb_do+1, 1 /) )
+       CALL netcdf_handle_error( 'data_output_3d', 446 )
+#endif
+#endif
+
+       if = if + 1
+
+!
+!--    Deallocate temporary array
+       DEALLOCATE ( local_pf )
+
+    ENDDO
+
+    CALL cpu_log( log_point(14), 'data_output_3d', 'stop' )
+
+ END SUBROUTINE data_output_3d
Index: /palm/tags/release-6.0/SOURCE/data_output_dvrp.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_dvrp.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_dvrp.f90	(revision 3477)
@@ -0,0 +1,591 @@
+!> @file data_output_dvrp.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! Modularization of all bulk cloud physics code components
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Code adjusted according to PALM coding standards
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2274 2017-06-09 13:27:48Z Giersch
+! Changed error messages
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Particles and tails removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of 
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 828 2012-02-21 12:00:36Z raasch
+! particle feature color renamed class
+!
+! Revision 1.1  2000/04/27 06:27:17  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Plot of isosurface and slicers with dvrp-software
+!------------------------------------------------------------------------------!
+ MODULE dvrp_color
+ 
+
+    USE dvrp_variables
+    
+    USE kinds
+
+    IMPLICIT NONE
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE color_dvrp( value, color )
+
+       REAL(wp), INTENT(IN)  ::  value    !< 
+       REAL(wp), INTENT(OUT) ::  color(4) !< 
+
+       REAL(wp)              ::  scale    !< 
+
+       scale = ( value - slicer_range_limits_dvrp(1,islice_dvrp) ) /           &
+               ( slicer_range_limits_dvrp(2,islice_dvrp) -                     &
+                 slicer_range_limits_dvrp(1,islice_dvrp) )
+
+       scale = MODULO( 180.0_wp + 180.0_wp * scale, 360.0_wp )
+
+       color = (/ scale, 0.5_wp, 1.0_wp, 0.0_wp /)
+
+    END SUBROUTINE color_dvrp
+
+ END MODULE dvrp_color
+
+
+ RECURSIVE SUBROUTINE data_output_dvrp
+
+#if defined( __dvrp_graphics )
+
+    USE arrays_3d,                                                             &
+        ONLY:  p, pt, q, ql, s, ts, u, us, v, w, zu, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi, lv_d_cp
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, do2d, do3d, humidity, ibc_uv_b,                 &
+               message_string, nz_do3d, passive_scalar, simulated_time,        &
+               threshold
+        
+    USE cpulog,                                                                &
+        ONLY:  log_point, log_point_s, cpu_log
+        
+    USE DVRP
+    
+    USE dvrp_color
+        
+    USE dvrp_variables
+        
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+        
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb
+        
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=2) ::  section_chr      !< 
+    CHARACTER (LEN=6) ::  output_variable  !< 
+    
+    INTEGER(iwp) ::  c_mode           !<  
+    INTEGER(iwp) ::  c_size_x         !< 
+    INTEGER(iwp) ::  c_size_y         !< 
+    INTEGER(iwp) ::  c_size_z         !< 
+    INTEGER(iwp) ::  dvrp_nop         !< 
+    INTEGER(iwp) ::  dvrp_not         !< 
+    INTEGER(iwp) ::  gradient_normals !< 
+    INTEGER(iwp) ::  i                !< 
+    INTEGER(iwp) ::  ip               !< 
+    INTEGER(iwp) ::  j                !< 
+    INTEGER(iwp) ::  jp               !< 
+    INTEGER(iwp) ::  k                !< 
+    INTEGER(iwp) ::  l                !< 
+    INTEGER(iwp) ::  m                !< 
+    INTEGER(iwp) ::  n                !< 
+    INTEGER(iwp) ::  n_isosurface     !< 
+    INTEGER(iwp) ::  n_slicer         !< 
+    INTEGER(iwp) ::  nn               !< 
+    INTEGER(iwp) ::  section_mode     !< 
+    INTEGER(iwp) ::  vn               !< 
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  p_c  !< 
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  p_t  !< 
+
+    LOGICAL, DIMENSION(:), ALLOCATABLE ::  dvrp_mask  !< 
+
+    REAL(sp) ::  slicer_position  !< 
+    REAL(sp) ::  tmp_alpha        !< 
+    REAL(sp) ::  tmp_alpha_w      !< 
+    REAL(sp) ::  tmp_b            !< 
+    REAL(sp) ::  tmp_c_alpha      !< 
+    REAL(sp) ::  tmp_g            !< 
+    REAL(sp) ::  tmp_norm         !< 
+    REAL(sp) ::  tmp_pos          !< 
+    REAL(sp) ::  tmp_r            !< 
+    REAL(sp) ::  tmp_t            !< 
+    REAL(sp) ::  tmp_th           !< 
+    REAL(sp), DIMENSION(:),     ALLOCATABLE   ::  psize  !< 
+    REAL(sp), DIMENSION(:),     ALLOCATABLE   ::  p_x    !< 
+    REAL(sp), DIMENSION(:),     ALLOCATABLE   ::  p_y    !< 
+    REAL(sp), DIMENSION(:),     ALLOCATABLE   ::  p_z    !< 
+    REAL(sp), DIMENSION(:,:,:), ALLOCATABLE   ::  local_pf  !< 
+    REAL(sp), DIMENSION(:,:,:,:), ALLOCATABLE ::  local_pfi !< 
+
+
+    CALL cpu_log( log_point(27), 'data_output_dvrp', 'start' )
+
+!
+!-- Loop over all output modes choosed
+    m            = 1
+    n_isosurface = 0  ! isosurface counter (for threshold values and color)
+    n_slicer     = 0  ! slice plane counter (for range of values)
+    DO WHILE ( mode_dvrp(m) /= ' ' )
+!
+!--    Update of the steering variables
+       IF ( .NOT. lock_steering_update )  THEN
+!
+!--       Set lock to avoid recursive calls of DVRP_STEERING_UPDATE
+          lock_steering_update = .TRUE.
+!          CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
+          lock_steering_update = .FALSE.
+       ENDIF
+
+!
+!--    Determine the variable which shall be plotted (in case of slicers or
+!--    isosurfaces)
+       IF ( mode_dvrp(m)(1:10) == 'isosurface' )  THEN
+          READ ( mode_dvrp(m), '(10X,I2)' )  vn
+          output_variable = do3d(0,vn)
+          n_isosurface = n_isosurface + 1
+       ELSEIF ( mode_dvrp(m)(1:6) == 'slicer' )  THEN
+          READ ( mode_dvrp(m), '(6X,I2)' )  vn
+          output_variable = do2d(0,vn)
+          l = MAX( 2, LEN_TRIM( do2d(0,vn) ) )
+          section_chr = do2d(0,vn)(l-1:l)
+          SELECT CASE ( section_chr )
+             CASE ( 'xy' )
+                section_mode = 2
+                slicer_position = zu(MIN( slicer_position_dvrp(m), nz_do3d ))
+             CASE ( 'xz' )
+                section_mode = 1
+                slicer_position = slicer_position_dvrp(m) * dy
+             CASE ( 'yz' )
+                section_mode = 0
+                slicer_position = slicer_position_dvrp(m) * dx
+          END SELECT
+       ENDIF
+
+!
+!--    Select the plot mode (in case of isosurface or slicer only if user has
+!--    defined a variable which shall be plotted; otherwise do nothing)
+       IF ( ( mode_dvrp(m)(1:10) == 'isosurface'  .OR.                         &
+                  mode_dvrp(m)(1:6)  == 'slicer'           )                   &
+                  .AND.  output_variable /= ' ' )  THEN
+
+!
+!--       Create an intermediate array, properly dimensioned for plot-output 
+          ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1,          &
+                             nzb:nz_do3d) )
+
+!
+!--       Move original array to intermediate array
+          IF ( dvrp_overlap )  THEN
+
+             SELECT CASE ( output_variable )
+
+                CASE ( 'u', 'u_xy', 'u_xz', 'u_yz' )
+                   DO  i = nxl_dvrp, nxr_dvrp+1
+                      DO  j = nys_dvrp, nyn_dvrp+1
+                         DO  k = nzb, nz_do3d
+                            local_pf(i,j,k) = u(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+!
+!--                Replace mirrored values at lower surface by real surface
+!--                values
+                   IF ( output_variable == 'u_xz'  .OR.                        &
+                        output_variable == 'u_yz' )  THEN
+                      IF ( ibc_uv_b == 0 )  local_pf(:,:,nzb) = 0.0_wp
+                   ENDIF
+
+
+                CASE ( 'v', 'v_xy', 'v_xz', 'v_yz' )
+                   DO  i = nxl_dvrp, nxr_dvrp+1
+                      DO  j = nys_dvrp, nyn_dvrp+1
+                         DO  k = nzb, nz_do3d
+                            local_pf(i,j,k) = v(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+!
+!--                Replace mirrored values at lower surface by real surface
+!--                values
+                   IF ( output_variable == 'v_xz'  .OR.                        &
+                        output_variable == 'v_yz' )  THEN
+                      IF ( ibc_uv_b == 0 )  local_pf(:,:,nzb) = 0.0_wp
+                   ENDIF
+
+                CASE ( 'w', 'w_xy', 'w_xz', 'w_yz' )
+                   DO  i = nxl_dvrp, nxr_dvrp+1
+                      DO  j = nys_dvrp, nyn_dvrp+1
+                         DO  k = nzb, nz_do3d
+                            local_pf(i,j,k) = w(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+! Averaging for Langmuir circulation
+!                   DO  k = nzb, nz_do3d
+!                      DO  j = nys_dvrp+1, nyn_dvrp
+!                         DO  i = nxl_dvrp, nxr_dvrp+1
+!                            local_pf(i,j,k) = 0.25 * local_pf(i,j-1,k) + &
+!                                              0.50 * local_pf(i,j,k)   + &
+!                                              0.25 * local_pf(i,j+1,k)
+!                         ENDDO
+!                      ENDDO
+!                   ENDDO
+
+                CASE ( 'p', 'p_xy', 'p_xz', 'p_yz' )
+                   DO  i = nxl_dvrp, nxr_dvrp+1
+                      DO  j = nys_dvrp, nyn_dvrp+1
+                         DO  k = nzb, nz_do3d
+                            local_pf(i,j,k) = p(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+
+                CASE ( 'theta', 'theta_xy', 'theta_xz', 'theta_yz' )
+                   IF ( .NOT. bulk_cloud_model ) THEN
+                      DO  i = nxl_dvrp, nxr_dvrp+1
+                         DO  j = nys_dvrp, nyn_dvrp+1
+                            DO  k = nzb, nz_do3d
+                               local_pf(i,j,k) = pt(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ELSE
+                      DO  i = nxl_dvrp, nxr_dvrp+1
+                         DO  j = nys_dvrp, nyn_dvrp+1
+                            DO  k = nzb, nz_do3d
+                               local_pf(i,j,k) = pt(k,j,i) + lv_d_cp *         &
+                                                 d_exner(k) * ql(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ENDIF
+
+                CASE ( 'q', 'q_xy', 'q_xz', 'q_yz' )
+                   IF ( humidity )  THEN
+                      DO  i = nxl_dvrp, nxr_dvrp+1
+                         DO  j = nys_dvrp, nyn_dvrp+1
+                            DO  k = nzb, nz_do3d
+                               local_pf(i,j,k) = q(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO            
+                   ELSE                    
+                      message_string = 'if humidity = '    //                  & 
+                            '.FALSE. output of ' // TRIM( output_variable ) // &
+                            'is not provided' 
+                      CALL message( 'data_output_dvrp', 'PA0183',&
+                                                                 0, 0, 0, 6, 0 )
+                   ENDIF
+             
+                CASE ( 'ql', 'ql_xy', 'ql_xz', 'ql_yz' )
+                   IF ( bulk_cloud_model  .OR.  cloud_droplets )  THEN
+                      DO  i = nxl_dvrp, nxr_dvrp+1
+                         DO  j = nys_dvrp, nyn_dvrp+1
+                            DO  k = nzb, nz_do3d
+                               local_pf(i,j,k) = ql(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ELSE                     
+                      message_string = 'if bulk_cloud_model = .FALSE. and ' // &
+                                  'cloud_droplets = .FALSE. '
+                                  'output of ' // TRIM( output_variable) //    &
+                                  'is not provided' 
+                      CALL message( 'data_output_dvrp', 'PA0184',&
+                                                                 0, 0, 0, 6, 0 )
+                   ENDIF
+
+                CASE ( 's', 's_xy', 's_xz', 's_yz' )
+                   IF ( passive_scalar )  THEN
+                      DO  i = nxl_dvrp, nxr_dvrp+1
+                         DO  j = nys_dvrp, nyn_dvrp+1
+                            DO  k = nzb, nz_do3d
+                               local_pf(i,j,k) = s(k,j,i)
+                            ENDDO
+                         ENDDO
+                      ENDDO            
+                   ELSE                    
+                      message_string = 'if passive_scalar = '    //            & 
+                            '.FALSE. output of ' // TRIM( output_variable ) //   &
+                            'is not provided' 
+                      CALL message( 'data_output_dvrp', 'PA0183',&
+                                                                 0, 0, 0, 6, 0 )
+                   ENDIF
+
+                CASE ( 'us*_xy' )
+                   DO  i = nxl_dvrp, nxr_dvrp+1
+                      DO  j = nys_dvrp, nyn_dvrp+1
+                         local_pf(i,j,nzb+1) = us(j,i)
+                      ENDDO
+                   ENDDO
+                   slicer_position = zu(nzb+1)
+
+                CASE ( 't*_xy' )
+                   DO  i = nxl_dvrp, nxr_dvrp+1
+                      DO  j = nys_dvrp, nyn_dvrp+1
+                         local_pf(i,j,nzb+1) = ts(j,i)
+                      ENDDO
+                   ENDDO
+                   slicer_position = zu(nzb+1)
+
+
+                CASE DEFAULT
+!
+!--                The DEFAULT case is reached either if output_variable
+!--                contains unsupported variable or if the user has coded a
+!--                special case in the user interface. There, the subroutine
+!--                user_data_output_dvrp checks which of these two conditions
+!--                applies.
+                   CALL user_data_output_dvrp( output_variable, local_pf )
+
+
+             END SELECT
+
+          ELSE
+!
+!--          No overlap of clipping domain with the current subdomain
+             DO  i = nxl_dvrp, nxr_dvrp+1
+                DO  j = nys_dvrp, nyn_dvrp+1
+                   DO  k = nzb, nz_do3d
+                      local_pf(i,j,k) = 0.0_wp
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+          IF ( mode_dvrp(m)(1:10) == 'isosurface' )  THEN
+
+!
+!--          DVRP-Calls for plotting isosurfaces:
+             CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'start' )
+
+!
+!--          Definition of isosurface color
+             tmp_r = isosurface_color(1,n_isosurface)
+             tmp_g = isosurface_color(2,n_isosurface)
+             tmp_b = isosurface_color(3,n_isosurface)
+             tmp_t = 0.0_wp
+             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
+
+!
+!--          Compute and plot isosurface in dvr-format
+             CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp,      &
+                             cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
+
+             c_size_x = vc_size_x;  c_size_y = vc_size_y;  c_size_z = vc_size_z
+             CALL DVRP_CLUSTER_SIZE( m-1, c_size_x, c_size_y, c_size_z )
+
+             c_mode   = vc_mode 
+             CALL DVRP_CLUSTERING_MODE( m-1, c_mode )
+
+             gradient_normals = vc_gradient_normals
+             CALL DVRP_GRADIENTNORMALS( m-1, gradient_normals )
+
+!
+!--          A seperate procedure for setting vc_alpha will be in the next
+!--          version of libDVRP
+             tmp_c_alpha = vc_alpha 
+             CALL DVRP_THRESHOLD( -(m-1)-1, tmp_c_alpha )
+
+             IF ( dvrp_overlap )  THEN
+                tmp_th = threshold(n_isosurface)
+             ELSE
+                tmp_th = 1.0_wp  ! nothing is plotted because array values are 0
+             ENDIF
+
+             CALL DVRP_THRESHOLD( m-1, tmp_th )
+
+             CALL DVRP_VISUALIZE( m-1, 21, dvrp_filecount )
+
+             CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'stop' )
+
+          ELSEIF ( mode_dvrp(m)(1:6) == 'slicer' )  THEN
+
+!
+!--          DVRP-Calls for plotting slicers:
+             CALL cpu_log( log_point_s(27), 'dvrp_slicer', 'start' )
+
+!
+!--          Material and color definitions
+             tmp_r = 0.0_wp;  tmp_g = 0.0_wp;  tmp_b = 0.0_wp;  tmp_t = 0.0_wp
+             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
+
+             n_slicer = n_slicer + 1
+
+!
+!--           Using dolorfunction has not been properly tested
+!             islice_dvrp = n_slicer
+!             CALL DVRP_COLORFUNCTION( m-1, DVRP_CM_HLS, 25,                 &
+!                                      slicer_range_limits_dvrp(:,n_slicer), &
+!                                      color_dvrp )
+
+!
+!--          Set interval of values defining the colortable
+             CALL set_slicer_attributes_dvrp( n_slicer )
+
+!
+!--          Create user-defined colortable
+             CALL user_dvrp_coltab( 'slicer', output_variable )
+
+             CALL DVRP_COLORTABLE_HLS( m-1, 1, interval_values_dvrp,           &
+                                       interval_h_dvrp, interval_l_dvrp,       &
+                                       interval_s_dvrp, interval_a_dvrp )
+
+!
+!--          Compute and plot slicer in dvr-format
+             CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp,      &
+                             cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
+             tmp_pos = slicer_position
+             CALL DVRP_SLICER( m-1, section_mode, tmp_pos )
+
+             CALL DVRP_VISUALIZE( m-1, 2, dvrp_filecount )
+
+             CALL cpu_log( log_point_s(27), 'dvrp_slicer', 'stop' )
+
+          ENDIF
+
+          DEALLOCATE( local_pf )
+
+       ELSEIF ( mode_dvrp(m)(1:9) == 'pathlines' ) THEN
+
+          ALLOCATE( local_pfi(4,nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) )
+          DO  i = nxl, nxr+1
+             DO  j = nys, nyn+1
+                DO  k = nzb, nz_do3d
+                   local_pfi(1,i,j,k) = u(k,j,i)
+                   local_pfi(2,i,j,k) = v(k,j,i)
+                   local_pfi(3,i,j,k) = w(k,j,i)
+                   tmp_norm           = SQRT( u(k,j,i) * u(k,j,i) +            &
+                                              v(k,j,i) * v(k,j,i) +            &
+                                              w(k,j,i) * w(k,j,i) )
+                   tmp_alpha          = ACOS( 0.0_wp * u(k,j,i) / tmp_norm +   &
+                                              0.0_wp * v(k,j,i) / tmp_norm -   &
+                                              1.0_wp * w(k,j,i) / tmp_norm )
+                   tmp_alpha_w        = tmp_alpha / pi * 180.0_wp
+                   local_pfi(4,i,j,k) = tmp_alpha_w
+                ENDDO
+             ENDDO
+          ENDDO
+
+          CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'start' )
+
+          CALL DVRP_DATA( m-1, local_pfi, 4, nx_dvrp, ny_dvrp, nz_dvrp,        &
+                          cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
+          CALL DVRP_VISUALIZE( m-1, 20, dvrp_filecount )
+
+          CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'stop' )
+
+          DEALLOCATE( local_pfi )
+
+       ENDIF
+
+       m = m + 1
+
+    ENDDO
+
+    dvrp_filecount = dvrp_filecount + 1
+
+    CALL cpu_log( log_point(27), 'data_output_dvrp', 'stop' )
+
+#endif
+ END SUBROUTINE data_output_dvrp
Index: /palm/tags/release-6.0/SOURCE/data_output_flight.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_flight.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_flight.f90	(revision 3477)
@@ -0,0 +1,138 @@
+!> @file data_output_flight.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Writing data from flight measurements on file.
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_flight
+ 
+#if defined( __netcdf )
+    USE control_parameters,                                                    &
+        ONLY:  num_leg, num_var_fl, time_since_reference_point, virtual_flight
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE flight_mod,                                                            &
+        ONLY:  sensor, x_pos, y_pos, z_pos
+
+    USE kinds
+
+    USE NETCDF
+
+    USE netcdf_interface,                                                      &
+        ONLY:  dofl_time_count, id_set_fl, id_var_dofl, id_var_time_fl,        &
+               id_var_x_fl, id_var_y_fl, id_var_z_fl, netcdf_handle_error,     &
+               nc_stat 
+              
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i !< loop variable for output quantities
+    INTEGER(iwp) ::  l !< loop variable for flight legs
+    INTEGER(iwp) ::  k !< internal count for variable labels and units
+
+    CALL cpu_log( log_point(64), 'data_output_flight', 'start' )
+
+!
+!-- Check if virtual flights are carried out
+    IF ( .NOT. virtual_flight )  RETURN
+
+!
+!-- Output is only performed on PE0
+    IF ( myid == 0 )  THEN
+
+!
+!--    Open file for flight output in NetCDF format
+       CALL check_open( 199 )
+
+!
+!--    Increment the counter for number of output times
+       dofl_time_count = dofl_time_count + 1
+
+!
+!--    Update the flight-output time and spatial coordinates
+       nc_stat = NF90_PUT_VAR( id_set_fl, id_var_time_fl,                      &
+                               (/ time_since_reference_point /),               &
+                               start = (/ dofl_time_count /),                  &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_flight', 554 )
+
+       DO  l = 1, num_leg
+          nc_stat = NF90_PUT_VAR( id_set_fl, id_var_x_fl(l),                   &
+                                  (/ x_pos(l) /),                              &
+                                  start = (/ dofl_time_count /),               &
+                                  count = (/ 1 /) )
+          nc_stat = NF90_PUT_VAR( id_set_fl, id_var_y_fl(l),                   &
+                                  (/ y_pos(l) /),                              &
+                                  start = (/ dofl_time_count /),               &
+                                  count = (/ 1 /) )
+          nc_stat = NF90_PUT_VAR( id_set_fl, id_var_z_fl(l),                   &
+                                  (/ z_pos(l) /),                              &
+                                  start = (/ dofl_time_count /),               &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'data_output_flight', 555 )
+       ENDDO
+!
+!--    Output measured quantities
+       k = 1
+       DO  l = 1, num_leg
+          DO i = 1, num_var_fl
+             nc_stat = NF90_PUT_VAR( id_set_fl, id_var_dofl(k),                &
+                                     (/ sensor(i,l) /),                        &
+                                     start = (/ dofl_time_count /),            &
+                                     count = (/ 1 /) )
+
+             CALL netcdf_handle_error( 'data_output_flight', 556 )
+          
+             k = k + 1
+          ENDDO
+       ENDDO
+    ENDIF
+    
+    CALL cpu_log( log_point(64), 'data_output_flight', 'stop' )
+    
+#endif
+ END SUBROUTINE data_output_flight
Index: /palm/tags/release-6.0/SOURCE/data_output_mask.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_mask.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_mask.f90	(revision 3477)
@@ -0,0 +1,870 @@
+!> @file data_output_mask.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! Add terrain-following output
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! Minor formatting (kanani)
+! Call for chem_data_output_mask added (basit)
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variable removed
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! 
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3030 2018-05-23 14:37:00Z raasch
+! variable if renamed ivar
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean and rho_av to rho_ocean_av
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1980 2016-07-29 15:51:57Z suehring
+! Bugfix, in order to steer user-defined output, setting flag found explicitly
+! to .F.
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Output of radiation quantities is now done directly in the respective module
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+!
+! 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes,
+! switch back of netcdf data format moved from time integration routine to here
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of radiative heating rates for RRTMG
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Added support for RRTMG
+! 
+! 1438 2014-07-22 14:14:06Z heinze
+! +nr, qc, qr
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented
+!
+! 1007 2012-09-19 14:30:36Z franke
+! Bugfix: calculation of pr must depend on the particle weighting factor,
+! missing calculation of ql_vp added
+!
+! 410 2009-12-04 17:05:40Z letzel
+! Initial version
+!
+! Description:
+! ------------
+!> Masked data output in netCDF format for current mask (current value of mid).
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_mask( av )
+
+ 
+
+#if defined( __netcdf )
+    USE arrays_3d,                                                             &
+        ONLY:  e, nc, nr, p, pt, q, qc, ql, ql_c, ql_v, qr, rho_ocean, s, sa,  &
+               tend, u, v, vpt, w, d_exner
+
+    USE averaging,                                                             &
+        ONLY:  e_av, lpt_av, nc_av, nr_av, p_av, pc_av, pr_av, pt_av, q_av,    &
+               qc_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qv_av, qr_av,         &
+               rho_ocean_av, s_av, sa_av, u_av, v_av, vpt_av, w_av 
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  lv_d_cp
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_data_output_mask
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, domask, domask_no, domask_time_count, mask_i,    &
+               mask_j, mask_k, mask_size, mask_size_l, mask_start_l,           &
+               mask_surface,                                                   &
+               max_masks, message_string, mid, nz_do3d, simulated_time
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model
+    
+    USE NETCDF
+    
+    USE netcdf_interface,                                                      &
+        ONLY:  id_set_mask, id_var_domask, id_var_time_mask, nc_stat,          &
+               netcdf_data_format, netcdf_handle_error
+    
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, particles,                 &
+               particle_advection_start, prt_count
+    
+    USE pegrid
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_data_output_mask
+
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_data_output_mask     
+        
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_lsm_h, surf_usm_h, get_topography_top_index_ji      
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=5) ::  grid !< flag to distinquish between staggered grids
+
+    INTEGER(iwp) ::  av                      !< 
+    INTEGER(iwp) ::  ngp                     !< 
+    INTEGER(iwp) ::  i                       !< 
+    INTEGER(iwp) ::  ivar                    !<
+    INTEGER(iwp) ::  j                       !< 
+    INTEGER(iwp) ::  k                       !< 
+    INTEGER(iwp) ::  kk                      !< 
+    INTEGER(iwp) ::  n                       !< 
+    INTEGER(iwp) ::  netcdf_data_format_save !<
+    INTEGER(iwp) ::  sender                  !< 
+    INTEGER(iwp) ::  topo_top_ind            !< k index of highest horizontal surface
+    INTEGER(iwp) ::  ind(6)                  !< 
+
+    LOGICAL ::  found     !< 
+    LOGICAL ::  resorted  !< 
+
+    REAL(wp) ::  mean_r   !< 
+    REAL(wp) ::  s_r2     !< 
+    REAL(wp) ::  s_r3     !< 
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf    !<
+#if defined( __parallel )
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  total_pf    !<
+#endif
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !<
+
+!
+!-- Return, if nothing to output
+    IF ( domask_no(mid,av) == 0 )  RETURN
+
+    CALL cpu_log (log_point(49),'data_output_mask','start')
+
+!
+!-- Parallel netcdf output is not tested so far for masked data, hence
+!-- netcdf_data_format is switched back to non-paralell output.
+    netcdf_data_format_save = netcdf_data_format
+    IF ( netcdf_data_format == 5 ) netcdf_data_format = 3
+    IF ( netcdf_data_format == 6 ) netcdf_data_format = 4
+
+!
+!-- Open output file.
+    IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+       CALL check_open( 200+mid+av*max_masks )
+    ENDIF 
+
+!
+!-- Allocate total and local output arrays.
+#if defined( __parallel )
+    IF ( myid == 0 )  THEN
+       ALLOCATE( total_pf(mask_size(mid,1),mask_size(mid,2),mask_size(mid,3)) )
+    ENDIF
+#endif
+    ALLOCATE( local_pf(mask_size_l(mid,1),mask_size_l(mid,2), &
+                       mask_size_l(mid,3)) )
+
+!
+!-- Update the netCDF time axis.
+    domask_time_count(mid,av) = domask_time_count(mid,av) + 1
+    IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+       nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_time_mask(mid,av), &
+                               (/ simulated_time /),                          &
+                               start = (/ domask_time_count(mid,av) /),       &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_mask', 460 )
+    ENDIF
+
+!
+!-- Loop over all variables to be written.
+    ivar = 1
+
+    DO  WHILE ( domask(mid,av,ivar)(1:1) /= ' ' )
+!
+!--    Reallocate local_pf on PE 0 since its shape changes during MPI exchange
+       IF ( netcdf_data_format < 5   .AND.  myid == 0  .AND.  ivar > 1 )  THEN
+          DEALLOCATE( local_pf )
+          ALLOCATE( local_pf(mask_size_l(mid,1),mask_size_l(mid,2), &
+                             mask_size_l(mid,3)) )
+       ENDIF
+!
+!--    Set default grid for terrain-following output
+       grid = 's'
+!
+!--    Set flag to steer output of radiation, land-surface, or user-defined
+!--    quantities
+       found = .FALSE.
+!
+!--    Store the variable chosen.
+       resorted = .FALSE.
+       SELECT CASE ( TRIM( domask(mid,av,ivar) ) )
+
+          CASE ( 'e' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => e
+             ELSE
+                to_be_resorted => e_av
+             ENDIF
+
+          CASE ( 'thetal' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => pt
+             ELSE
+                to_be_resorted => lpt_av
+             ENDIF
+
+          CASE ( 'nc' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => nc
+             ELSE
+                to_be_resorted => nc_av
+             ENDIF
+
+          CASE ( 'nr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => nr
+             ELSE
+                to_be_resorted => nr_av
+             ENDIF
+
+          CASE ( 'p' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => p
+             ELSE
+                to_be_resorted => p_av
+             ENDIF
+
+          CASE ( 'pc' )  ! particle concentration (requires ghostpoint exchange)
+             IF ( av == 0 )  THEN
+                tend = prt_count
+                CALL exchange_horiz( tend, nbgp )
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) =  tend(mask_k(mid,k), &
+                                      mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+!
+!--                Terrain-following masked output
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+!
+!--                      Get k index of highest horizontal surface
+                         topo_top_ind =  &
+                            get_topography_top_index_ji( mask_j(mid,j),  &
+                                                         mask_i(mid,i),  &
+                                                         grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            kk = MIN( topo_top_ind+mask_k(mid,k), nzt+1 )
+                            local_pf(i,j,k) =  &
+                               tend(kk,mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                CALL exchange_horiz( pc_av, nbgp )
+                to_be_resorted => pc_av
+             ENDIF
+
+          CASE ( 'pr' )  ! mean particle radius (effective radius)
+             IF ( av == 0 )  THEN
+                IF ( simulated_time >= particle_advection_start )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nz_do3d
+                            number_of_particles = prt_count(k,j,i)
+                            IF (number_of_particles <= 0)  CYCLE
+                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                            s_r2 = 0.0_wp
+                            s_r3 = 0.0_wp
+                            DO  n = 1, number_of_particles
+                               IF ( particles(n)%particle_mask )  THEN
+                                  s_r2 = s_r2 + grid_particles(k,j,i)%particles(n)%radius**2 * &
+                                         grid_particles(k,j,i)%particles(n)%weight_factor
+                                  s_r3 = s_r3 + grid_particles(k,j,i)%particles(n)%radius**3 * &
+                                         grid_particles(k,j,i)%particles(n)%weight_factor
+                               ENDIF
+                            ENDDO
+                            IF ( s_r2 > 0.0_wp )  THEN
+                               mean_r = s_r3 / s_r2
+                            ELSE
+                               mean_r = 0.0_wp
+                            ENDIF
+                            tend(k,j,i) = mean_r
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   CALL exchange_horiz( tend, nbgp )
+                ELSE
+                   tend = 0.0_wp
+                ENDIF
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) =  tend(mask_k(mid,k), &
+                                      mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+!
+!--                Terrain-following masked output
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+!
+!--                      Get k index of highest horizontal surface
+                         topo_top_ind =  &
+                            get_topography_top_index_ji( mask_j(mid,j),  &
+                                                         mask_i(mid,i),  &
+                                                         grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            kk = MIN( topo_top_ind+mask_k(mid,k), nzt+1 )
+                            local_pf(i,j,k) =  &
+                               tend(kk,mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                CALL exchange_horiz( pr_av, nbgp )
+                to_be_resorted => pr_av
+             ENDIF
+
+          CASE ( 'theta' )
+             IF ( av == 0 )  THEN
+                IF ( .NOT. bulk_cloud_model ) THEN
+                   to_be_resorted => pt
+                ELSE
+                   IF ( .NOT. mask_surface(mid) )  THEN
+                      DO  i = 1, mask_size_l(mid,1)
+                         DO  j = 1, mask_size_l(mid,2)
+                            DO  k = 1, mask_size_l(mid,3)
+                               local_pf(i,j,k) =  &
+                                  pt(mask_k(mid,k),mask_j(mid,j),mask_i(mid,i)) &
+                                  + lv_d_cp * d_exner(mask_k(mid,k)) *          &
+                                    ql(mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ELSE
+!
+!--                   Terrain-following masked output
+                      DO  i = 1, mask_size_l(mid,1)
+                         DO  j = 1, mask_size_l(mid,2)
+!
+!--                         Get k index of highest horizontal surface
+                            topo_top_ind =  &
+                               get_topography_top_index_ji( mask_j(mid,j),  &
+                                                            mask_i(mid,i),  &
+                                                            grid )
+                            DO  k = 1, mask_size_l(mid,3)
+                               kk = MIN( topo_top_ind+mask_k(mid,k), nzt+1 )
+                               local_pf(i,j,k) =  &
+                                    pt(kk,mask_j(mid,j),mask_i(mid,i) ) &
+                                    + lv_d_cp * d_exner(kk) *           &
+                                      ql(kk,mask_j(mid,j),mask_i(mid,i))
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ENDIF                   
+                   resorted = .TRUE.
+                ENDIF
+             ELSE
+                to_be_resorted => pt_av
+             ENDIF
+
+          CASE ( 'q' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => q
+             ELSE
+                to_be_resorted => q_av
+             ENDIF
+
+          CASE ( 'qc' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => qc
+             ELSE
+                to_be_resorted => qc_av
+             ENDIF
+
+          CASE ( 'ql' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => ql
+             ELSE
+                to_be_resorted => ql_av
+             ENDIF
+
+          CASE ( 'ql_c' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => ql_c
+             ELSE
+                to_be_resorted => ql_c_av
+             ENDIF
+
+          CASE ( 'ql_v' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => ql_v
+             ELSE
+                to_be_resorted => ql_v_av
+             ENDIF
+
+          CASE ( 'ql_vp' )
+             IF ( av == 0 )  THEN
+                IF ( simulated_time >= particle_advection_start )  THEN
+                   DO  i = nxl, nxr
+                      DO  j = nys, nyn
+                         DO  k = nzb, nz_do3d
+                            number_of_particles = prt_count(k,j,i)
+                            IF (number_of_particles <= 0)  CYCLE
+                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                            DO  n = 1, number_of_particles
+                               IF ( particles(n)%particle_mask )  THEN
+                                  tend(k,j,i) = tend(k,j,i) + &
+                                          particles(n)%weight_factor / &
+                                          prt_count(k,j,i)
+                               ENDIF
+                            ENDDO
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                   CALL exchange_horiz( tend, nbgp )
+                ELSE
+                   tend = 0.0_wp
+                ENDIF
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) =  tend(mask_k(mid,k), &
+                                      mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+!
+!--                Terrain-following masked output
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+!
+!--                      Get k index of highest horizontal surface
+                         topo_top_ind =  &
+                            get_topography_top_index_ji( mask_j(mid,j),  &
+                                                         mask_i(mid,i),  &
+                                                         grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            kk = MIN( topo_top_ind+mask_k(mid,k), nzt+1 )
+                            local_pf(i,j,k) =  &
+                               tend(kk,mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                CALL exchange_horiz( ql_vp_av, nbgp )
+                to_be_resorted => ql_vp_av
+             ENDIF
+
+          CASE ( 'qv' )
+             IF ( av == 0 )  THEN
+                IF ( .NOT. mask_surface(mid) )  THEN
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+                         DO  k = 1, mask_size_l(mid,3)
+                            local_pf(i,j,k) =  &
+                                 q(mask_k(mid,k),mask_j(mid,j),mask_i(mid,i)) -  &
+                                 ql(mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+!
+!--                Terrain-following masked output
+                   DO  i = 1, mask_size_l(mid,1)
+                      DO  j = 1, mask_size_l(mid,2)
+!
+!--                      Get k index of highest horizontal surface
+                         topo_top_ind =  &
+                            get_topography_top_index_ji( mask_j(mid,j),  &
+                                                         mask_i(mid,i),  &
+                                                         grid )
+                         DO  k = 1, mask_size_l(mid,3)
+                            kk = MIN( topo_top_ind+mask_k(mid,k), nzt+1 )
+                            local_pf(i,j,k) =  &
+                                 q(kk,mask_j(mid,j),mask_i(mid,i)) -  &
+                                 ql(kk,mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+                resorted = .TRUE.
+             ELSE
+                to_be_resorted => qv_av
+             ENDIF
+
+          CASE ( 'qr' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => qr
+             ELSE
+                to_be_resorted => qr_av
+             ENDIF
+
+          CASE ( 'rho_sea_water' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => rho_ocean
+             ELSE
+                to_be_resorted => rho_ocean_av
+             ENDIF
+
+          CASE ( 's' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => s
+             ELSE
+                to_be_resorted => s_av
+             ENDIF
+
+          CASE ( 'sa' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => sa
+             ELSE
+                to_be_resorted => sa_av
+             ENDIF
+
+          CASE ( 'u' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => u
+             ELSE
+                to_be_resorted => u_av
+             ENDIF
+
+          CASE ( 'v' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => v
+             ELSE
+                to_be_resorted => v_av
+             ENDIF
+
+          CASE ( 'thetav' )
+             IF ( av == 0 )  THEN
+                to_be_resorted => vpt
+             ELSE
+                to_be_resorted => vpt_av
+             ENDIF
+
+          CASE ( 'w' )
+             grid = 'w'
+             IF ( av == 0 )  THEN
+                to_be_resorted => w
+             ELSE
+                to_be_resorted => w_av
+             ENDIF
+
+          CASE DEFAULT
+
+!
+!--          Radiation quantity
+             IF ( radiation )  THEN
+                CALL radiation_data_output_mask(av, domask(mid,av,ivar), found,&
+                                                local_pf )
+             ENDIF
+
+             IF ( air_chemistry )  THEN
+                CALL chem_data_output_mask(av, domask(mid,av,ivar), found,     &
+                                           local_pf )
+             ENDIF
+!
+!--          SALSA quantities
+             IF (  salsa )  THEN
+                CALL salsa_data_output_mask( av, domask(mid,av,ivar), found,   &
+                                             local_pf )
+             ENDIF         
+!
+!--          User defined quantity
+             IF ( .NOT. found )  THEN
+                CALL user_data_output_mask(av, domask(mid,av,ivar), found,     &
+                                           local_pf )
+             ENDIF
+
+             resorted = .TRUE.
+
+             IF ( .NOT. found )  THEN
+                WRITE ( message_string, * ) 'no masked output available for: ',&
+                                            TRIM( domask(mid,av,ivar) )
+                CALL message( 'data_output_mask', 'PA0327', 0, 0, 0, 6, 0 )
+             ENDIF
+
+       END SELECT
+
+!
+!--    Resort the array to be output, if not done above
+       IF ( .NOT. resorted )  THEN
+          IF ( .NOT. mask_surface(mid) )  THEN
+!
+!--          Default masked output
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      local_pf(i,j,k) =  to_be_resorted(mask_k(mid,k), &
+                                         mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          ELSE
+!
+!--          Terrain-following masked output
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+!
+!--                Get k index of highest horizontal surface
+                   topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), &
+                                                               mask_i(mid,i), &
+                                                               grid )
+!
+!--                Save output array
+                   DO  k = 1, mask_size_l(mid,3)
+                      local_pf(i,j,k) = to_be_resorted(                       &
+                                             MIN( topo_top_ind+mask_k(mid,k), &
+                                                  nzt+1 ),                    &
+                                             mask_j(mid,j),                   &
+                                             mask_i(mid,i)                     )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          ENDIF
+       ENDIF
+
+!
+!--    I/O block. I/O methods are implemented
+!--    (1) for parallel execution
+!--     a. with netCDF 4 parallel I/O-enabled library
+!--     b. with netCDF 3 library
+!--    (2) for serial execution.
+!--    The choice of method depends on the correct setting of preprocessor
+!--    directives __parallel and __netcdf4_parallel as well as on the parameter
+!--    netcdf_data_format.
+#if defined( __parallel )
+#if defined( __netcdf4_parallel )
+       IF ( netcdf_data_format > 4 )  THEN
+!
+!--       (1) a. Parallel I/O using netCDF 4 (not yet tested)
+          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),                         &
+               id_var_domask(mid,av,ivar), local_pf,                           &
+               start = (/ mask_start_l(mid,1), mask_start_l(mid,2),            &
+                          mask_start_l(mid,3), domask_time_count(mid,av) /),   &
+               count = (/ mask_size_l(mid,1), mask_size_l(mid,2),              &
+                          mask_size_l(mid,3), 1 /) )
+          CALL netcdf_handle_error( 'data_output_mask', 461 )
+       ELSE
+#endif
+!
+!--       (1) b. Conventional I/O only through PE0
+!--       PE0 receives partial arrays from all processors of the respective mask
+!--       and outputs them. Here a barrier has to be set, because otherwise 
+!--       "-MPI- FATAL: Remote protocol queue full" may occur.
+          CALL MPI_BARRIER( comm2d, ierr )
+
+          ngp = mask_size_l(mid,1) * mask_size_l(mid,2) * mask_size_l(mid,3)
+          IF ( myid == 0 )  THEN
+!
+!--          Local array can be relocated directly.
+             total_pf( &
+               mask_start_l(mid,1):mask_start_l(mid,1)+mask_size_l(mid,1)-1, &
+               mask_start_l(mid,2):mask_start_l(mid,2)+mask_size_l(mid,2)-1, &
+               mask_start_l(mid,3):mask_start_l(mid,3)+mask_size_l(mid,3)-1 ) &
+               = local_pf
+!
+!--          Receive data from all other PEs.
+             DO  n = 1, numprocs-1
+!
+!--             Receive index limits first, then array.
+!--             Index limits are received in arbitrary order from the PEs.
+                CALL MPI_RECV( ind(1), 6, MPI_INTEGER, MPI_ANY_SOURCE, 0,  &
+                     comm2d, status, ierr )
+!
+!--             Not all PEs have data for the mask
+                IF ( ind(1) /= -9999 )  THEN
+                   ngp = ( ind(2)-ind(1)+1 ) * (ind(4)-ind(3)+1 ) *  &
+                         ( ind(6)-ind(5)+1 )
+                   sender = status(MPI_SOURCE)
+                   DEALLOCATE( local_pf )
+                   ALLOCATE(local_pf(ind(1):ind(2),ind(3):ind(4),ind(5):ind(6)))
+                   CALL MPI_RECV( local_pf(ind(1),ind(3),ind(5)), ngp,  &
+                        MPI_REAL, sender, 1, comm2d, status, ierr )
+                   total_pf(ind(1):ind(2),ind(3):ind(4),ind(5):ind(6)) &
+                        = local_pf
+                ENDIF
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),                      &
+                  id_var_domask(mid,av,ivar), total_pf,                        &
+                  start = (/ 1, 1, 1, domask_time_count(mid,av) /),            &
+                  count = (/ mask_size(mid,1), mask_size(mid,2),               &
+                             mask_size(mid,3), 1 /) )
+             CALL netcdf_handle_error( 'data_output_mask', 462 )
+
+          ELSE
+!
+!--          If at least part of the mask resides on the PE, send the index
+!--          limits for the target array, otherwise send -9999 to PE0.
+             IF ( mask_size_l(mid,1) > 0 .AND.  mask_size_l(mid,2) > 0 .AND. &
+                  mask_size_l(mid,3) > 0  ) &
+                  THEN
+                ind(1) = mask_start_l(mid,1)
+                ind(2) = mask_start_l(mid,1) + mask_size_l(mid,1) - 1
+                ind(3) = mask_start_l(mid,2)
+                ind(4) = mask_start_l(mid,2) + mask_size_l(mid,2) - 1
+                ind(5) = mask_start_l(mid,3)
+                ind(6) = mask_start_l(mid,3) + mask_size_l(mid,3) - 1
+             ELSE
+                ind(1) = -9999; ind(2) = -9999
+                ind(3) = -9999; ind(4) = -9999
+                ind(5) = -9999; ind(6) = -9999
+             ENDIF
+             CALL MPI_SEND( ind(1), 6, MPI_INTEGER, 0, 0, comm2d, ierr )
+!
+!--          If applicable, send data to PE0.
+             IF ( ind(1) /= -9999 )  THEN
+                CALL MPI_SEND( local_pf(1,1,1), ngp, MPI_REAL, 0, 1, comm2d, &
+                     ierr )
+             ENDIF
+          ENDIF
+!
+!--       A barrier has to be set, because otherwise some PEs may proceed too
+!--       fast so that PE0 may receive wrong data on tag 0.
+          CALL MPI_BARRIER( comm2d, ierr )
+#if defined( __netcdf4_parallel )
+       ENDIF
+#endif
+#else
+!
+!--    (2) For serial execution of PALM, the single processor (PE0) holds all
+!--    data and writes them directly to file.
+       nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),                            &
+                               id_var_domask(mid,av,ivar), local_pf,           &
+                             start = (/ 1, 1, 1, domask_time_count(mid,av) /), &
+                             count = (/ mask_size_l(mid,1), mask_size_l(mid,2),&
+                               mask_size_l(mid,3), 1 /) )
+       CALL netcdf_handle_error( 'data_output_mask', 463 )
+#endif
+
+       ivar = ivar + 1
+
+    ENDDO
+
+!
+!-- Deallocate temporary arrays.
+    DEALLOCATE( local_pf )
+#if defined( __parallel )
+    IF ( myid == 0 )  THEN
+       DEALLOCATE( total_pf )
+    ENDIF
+#endif
+
+!
+!-- Switch back to original format given by user (see beginning of this routine)
+    netcdf_data_format = netcdf_data_format_save
+
+    CALL cpu_log( log_point(49), 'data_output_mask', 'stop' )
+#endif
+
+
+ END SUBROUTINE data_output_mask
Index: /palm/tags/release-6.0/SOURCE/data_output_profiles.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_profiles.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_profiles.f90	(revision 3477)
@@ -0,0 +1,351 @@
+!> @file data_output_profiles.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused format statements removed
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed d3par to runtime_parameters
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2026 2016-10-18 10:27:02Z suehring
+! Formatting adjustment
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf output queries
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! bugfix: initial time for preruns of coupled runs is output as
+! -coupling_start_time
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 964 2012-07-26 09:14:24Z raasch
+! code for profil-output removed
+!
+! Revision 1.1  1997/09/12 06:28:48  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Plot output of 1D-profiles for PROFIL
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_profiles
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  average_count_pr, averaging_interval_pr, coupling_start_time,   &
+               dopr_n, dopr_time_count, normalizing_region,                    &
+               time_since_reference_point
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzt
+
+    USE kinds
+
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_interface,                                                      &
+        ONLY:  id_set_pr, id_var_dopr, id_var_norm_dopr, id_var_time_pr,       &
+               nc_stat, netcdf_handle_error, output_for_t0
+
+    USE pegrid
+
+    USE profil_parameter
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, hom, hom_sum, pr_palm, statistic_regions
+
+    IMPLICIT NONE
+
+
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  sr !<
+
+!
+!-- If required, compute statistics
+    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
+
+!
+!-- Flow_statistics has its own CPU time measurement
+    CALL cpu_log( log_point(15), 'data_output_profiles', 'start' )
+
+!
+!-- If required, compute temporal average
+    IF ( averaging_interval_pr == 0.0_wp )  THEN
+       hom_sum(:,:,:) = hom(:,1,:,:)
+    ELSE
+       IF ( average_count_pr > 0 )  THEN
+          hom_sum = hom_sum / REAL( average_count_pr, KIND=wp )
+       ELSE
+!
+!--       This case may happen if dt_dopr is changed in the 
+!--       runtime_parameters-list of a restart run
+          RETURN
+       ENDIF
+    ENDIF
+
+    
+    IF ( myid == 0 )  THEN
+
+!
+!--    Plot-output for each (sub-)region
+
+!
+!--    Open file for profile output in NetCDF format
+       CALL check_open( 104 )
+
+!
+!--    Increment the counter for number of output times
+       dopr_time_count = dopr_time_count + 1
+
+!
+!--    Output of initial profiles
+       IF ( dopr_time_count == 1 )  THEN
+        
+          IF ( .NOT. output_for_t0 ) THEN 
+
+#if defined( __netcdf )          
+!
+!--          Store initial time to time axis, but only if an output
+!--          is required for at least one of the profiles. The initial time
+!--          is either 0, or, in case of a prerun for coupled atmosphere-ocean
+!--          runs, has a negative value
+             DO  i = 1, dopr_n
+                IF ( dopr_initial_index(i) /= 0 )  THEN
+                   nc_stat = NF90_PUT_VAR( id_set_pr, id_var_time_pr,          &
+                                        (/ -coupling_start_time /),            &
+                                        start = (/ 1 /), count = (/ 1 /) )
+                   CALL netcdf_handle_error( 'data_output_profiles', 329 )
+                   output_for_t0 = .TRUE.
+                   EXIT
+                ENDIF
+             ENDDO
+
+!
+!--          Store normalization factors
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(1), & ! wpt0
+                                  (/ hom_sum(nzb,18,normalizing_region) /), &
+                                     start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 330 )
+
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(2), & ! ws2
+                        (/ hom_sum(nzb+8,pr_palm,normalizing_region)**2 /), &
+                                     start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 331 )
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(3), & ! tsw2
+                        (/ hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), &
+                                  start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 332 )
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(4), & ! ws3
+                        (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 /), &
+                                     start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 333 )
+
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(5), &!ws2tsw
+                        (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 *   &
+                           hom_sum(nzb+3,pr_palm,normalizing_region)    /), &
+                                     start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 334 )
+
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(6), &!wstsw2
+                        (/ hom_sum(nzb+8,pr_palm,normalizing_region) *      &
+                           hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), &
+                                     start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 335 )
+
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(7), & ! z_i
+                           (/ hom_sum(nzb+6,pr_palm,normalizing_region) /), &
+                                     start = (/ 1 /), count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 336 )
+             
+#endif
+!
+!--          Loop over all 1D variables
+             DO  i = 1, dopr_n
+
+                IF ( dopr_initial_index(i) /= 0 )  THEN
+
+!
+!--                Output for the individual (sub-)regions
+                   DO  sr = 0, statistic_regions
+
+#if defined( __netcdf )
+!
+!--                   Write data to netcdf file
+                      nc_stat = NF90_PUT_VAR( id_set_pr, id_var_dopr(i,sr),    &
+                                    hom(nzb:nzt+1,1,dopr_initial_index(i),sr), &
+                                              start = (/ 1, 1 /),              &
+                                              count = (/ nzt-nzb+2, 1 /) )
+                      CALL netcdf_handle_error( 'data_output_profiles', 337 )
+#endif
+
+                   ENDDO
+
+                ENDIF   ! Initial profile available
+
+             ENDDO   ! Loop over dopr_n for initial profiles
+
+             IF ( output_for_t0 )  THEN
+                dopr_time_count = dopr_time_count + 1
+             ENDIF
+
+          END IF
+       ENDIF   ! Initial profiles
+
+#if defined( __netcdf )
+
+!
+!--    Store time to time axis
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_time_pr,        &
+                               (/ time_since_reference_point /), &
+                               start = (/ dopr_time_count /),    &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 338 )
+
+!
+!--    Store normalization factors
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(1), &  ! wpt0
+                               (/ hom_sum(nzb,18,normalizing_region) /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 339 )
+
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(2), &  ! ws2
+                     (/ hom_sum(nzb+8,pr_palm,normalizing_region)**2 /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 340 )
+
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(3), &  ! tsw2
+                     (/ hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 341 )
+
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(4), &  ! ws3
+                     (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 342 )
+
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(5), &  ! ws2tsw
+                     (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 *   &
+                        hom_sum(nzb+3,pr_palm,normalizing_region)    /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 343 )
+
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(6), &  ! wstsw2
+                     (/ hom_sum(nzb+8,pr_palm,normalizing_region) *      &
+                        hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 344 )
+
+       nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(7), &  ! z_i
+                        (/ hom_sum(nzb+6,pr_palm,normalizing_region) /), &
+                               start = (/ dopr_time_count /),               &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_profiles', 345 )
+#endif
+
+!
+!--    Output of the individual (non-initial) profiles
+       DO  i = 1, dopr_n
+
+!
+!--       Output for the individual (sub-)domains
+          DO  sr = 0, statistic_regions
+
+#if defined( __netcdf )
+!
+!--          Write data to netcdf file
+             nc_stat = NF90_PUT_VAR( id_set_pr, id_var_dopr(i,sr),          &
+                                     hom_sum(nzb:nzt+1,dopr_index(i),sr),&
+                                     start = (/ 1, dopr_time_count /),      &
+                                     count = (/ nzt-nzb+2, 1 /) )
+             CALL netcdf_handle_error( 'data_output_profiles', 346 )
+#endif
+
+          ENDDO
+
+       ENDDO
+
+    ENDIF  ! Output on PE0
+
+!
+!-- If averaging has been done above, the summation counter must be re-set.
+    IF ( averaging_interval_pr /= 0.0_wp )  THEN
+       average_count_pr = 0
+    ENDIF
+
+    CALL cpu_log( log_point(15), 'data_output_profiles','stop' )
+
+ END SUBROUTINE data_output_profiles
Index: /palm/tags/release-6.0/SOURCE/data_output_ptseries.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_ptseries.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_ptseries.f90	(revision 3477)
@@ -0,0 +1,399 @@
+!> @file data_output_ptseries.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! SGS velocities also possible for curvature_solution_effects = .TRUE. 
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! curvature_solution_effects moved to particle_attributes
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module name changed + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf output queries
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 825 2012-02-19 03:03:44Z raasch
+! mean/minimum/maximum particle radius added as output quantity,
+! particle attributes speed_x|y|z_sgs renamed rvar1|2|3
+!
+! Revision 1.1  2006/08/04 14:24:18  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Output of particle data timeseries in NetCDF format.
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_ptseries
+
+
+    USE control_parameters,                                                    &
+        ONLY:  dopts_time_count, time_since_reference_point
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE indices,                                                               &
+        ONLY: nxl, nxr, nys, nyn, nzb, nzt
+
+    USE kinds
+
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_interface,                                                      &
+        ONLY:  dopts_num, id_set_pts, id_var_dopts, id_var_time_pts, nc_stat,  &
+               netcdf_handle_error
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, number_of_particle_groups, &
+               particles, prt_count
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+
+    INTEGER(iwp) ::  i    !<
+    INTEGER(iwp) ::  inum !<
+    INTEGER(iwp) ::  j    !<
+    INTEGER(iwp) ::  jg   !<
+    INTEGER(iwp) ::  k    !<
+    INTEGER(iwp) ::  n    !<
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pts_value   !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pts_value_l !<
+
+
+    CALL cpu_log( log_point(36), 'data_output_ptseries', 'start' )
+
+    IF ( myid == 0 )  THEN
+!
+!--    Open file for time series output in NetCDF format
+       dopts_time_count = dopts_time_count + 1
+       CALL check_open( 109 )
+#if defined( __netcdf )
+!
+!--    Update the particle time series time axis
+       nc_stat = NF90_PUT_VAR( id_set_pts, id_var_time_pts,      &
+                               (/ time_since_reference_point /), &
+                               start = (/ dopts_time_count /), count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_ptseries', 391 )
+#endif
+
+    ENDIF
+
+    ALLOCATE( pts_value(0:number_of_particle_groups,dopts_num), &
+              pts_value_l(0:number_of_particle_groups,dopts_num) )
+
+    pts_value_l = 0.0_wp
+    pts_value_l(:,16) = 9999999.9_wp    ! for calculation of minimum radius
+
+!
+!-- Calculate or collect the particle time series quantities for all particles
+!-- and seperately for each particle group (if there is more than one group)
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb, nzt
+             number_of_particles = prt_count(k,j,i)
+             IF (number_of_particles <= 0)  CYCLE
+             particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+
+                IF ( particles(n)%particle_mask )  THEN  ! Restrict analysis to active particles
+
+                   pts_value_l(0,1)  = pts_value_l(0,1) + 1.0_wp  ! total # of particles
+                   pts_value_l(0,2)  = pts_value_l(0,2) +                      &
+                          ( particles(n)%x - particles(n)%origin_x )  ! mean x
+                   pts_value_l(0,3)  = pts_value_l(0,3) +                      &
+                          ( particles(n)%y - particles(n)%origin_y )  ! mean y
+                   pts_value_l(0,4)  = pts_value_l(0,4) +                      &
+                          ( particles(n)%z - particles(n)%origin_z )  ! mean z
+                   pts_value_l(0,5)  = pts_value_l(0,5) + particles(n)%z        ! mean z (absolute)
+                   pts_value_l(0,6)  = pts_value_l(0,6) + particles(n)%speed_x  ! mean u
+                   pts_value_l(0,7)  = pts_value_l(0,7) + particles(n)%speed_y  ! mean v
+                   pts_value_l(0,8)  = pts_value_l(0,8) + particles(n)%speed_z  ! mean w
+                   pts_value_l(0,9)  = pts_value_l(0,9)  + particles(n)%rvar1 ! mean sgsu
+                   pts_value_l(0,10) = pts_value_l(0,10) + particles(n)%rvar2 ! mean sgsv
+                   pts_value_l(0,11) = pts_value_l(0,11) + particles(n)%rvar3 ! mean sgsw
+                   IF ( particles(n)%speed_z > 0.0_wp )  THEN
+                      pts_value_l(0,12) = pts_value_l(0,12) + 1.0_wp  ! # of upward moving prts
+                      pts_value_l(0,13) = pts_value_l(0,13) +                  &
+                                              particles(n)%speed_z ! mean w upw.
+                   ELSE
+                      pts_value_l(0,14) = pts_value_l(0,14) +                  &
+                                              particles(n)%speed_z ! mean w down
+                   ENDIF
+                   pts_value_l(0,15) = pts_value_l(0,15) + particles(n)%radius ! mean rad
+                   pts_value_l(0,16) = MIN( pts_value_l(0,16), particles(n)%radius ) ! minrad
+                   pts_value_l(0,17) = MAX( pts_value_l(0,17), particles(n)%radius ) ! maxrad
+                   pts_value_l(0,18) = pts_value_l(0,18) + 1.0_wp
+                   pts_value_l(0,19) = pts_value_l(0,18) + 1.0_wp
+!
+!--                Repeat the same for the respective particle group
+                   IF ( number_of_particle_groups > 1 )  THEN
+                      jg = particles(n)%group
+
+                      pts_value_l(jg,1)  = pts_value_l(jg,1) + 1.0_wp
+                      pts_value_l(jg,2)  = pts_value_l(jg,2) +                   &
+                           ( particles(n)%x - particles(n)%origin_x )
+                      pts_value_l(jg,3)  = pts_value_l(jg,3) +                   &
+                           ( particles(n)%y - particles(n)%origin_y )
+                      pts_value_l(jg,4)  = pts_value_l(jg,4) +                   &
+                           ( particles(n)%z - particles(n)%origin_z )
+                      pts_value_l(jg,5)  = pts_value_l(jg,5) + particles(n)%z
+                      pts_value_l(jg,6)  = pts_value_l(jg,6) + particles(n)%speed_x
+                      pts_value_l(jg,7)  = pts_value_l(jg,7) + particles(n)%speed_y
+                      pts_value_l(jg,8)  = pts_value_l(jg,8) + particles(n)%speed_z
+                      pts_value_l(jg,9)  = pts_value_l(jg,9)  + particles(n)%rvar1
+                      pts_value_l(jg,10) = pts_value_l(jg,10) + particles(n)%rvar2
+                      pts_value_l(jg,11) = pts_value_l(jg,11) + particles(n)%rvar3
+                      IF ( particles(n)%speed_z > 0.0_wp )  THEN
+                         pts_value_l(jg,12) = pts_value_l(jg,12) + 1.0_wp
+                         pts_value_l(jg,13) = pts_value_l(jg,13) + particles(n)%speed_z
+                      ELSE
+                         pts_value_l(jg,14) = pts_value_l(jg,14) + particles(n)%speed_z
+                      ENDIF
+                      pts_value_l(jg,15) = pts_value_l(jg,15) + particles(n)%radius
+                      pts_value_l(jg,16) = MIN( pts_value(jg,16), particles(n)%radius )
+                      pts_value_l(jg,17) = MAX( pts_value(jg,17), particles(n)%radius )
+                      pts_value_l(jg,18) = pts_value_l(jg,18) + 1.0_wp
+                      pts_value_l(jg,19) = pts_value_l(jg,19) + 1.0_wp
+                   ENDIF
+
+                ENDIF
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+
+#if defined( __parallel )
+!
+!-- Sum values of the subdomains
+    inum = number_of_particle_groups + 1
+
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( pts_value_l(0,1), pts_value(0,1), 15*inum, MPI_REAL, &
+                        MPI_SUM, comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( pts_value_l(0,16), pts_value(0,16), inum, MPI_REAL, &
+                        MPI_MIN, comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( pts_value_l(0,17), pts_value(0,17), inum, MPI_REAL, &
+                        MPI_MAX, comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( pts_value_l(0,18), pts_value(0,18), inum, MPI_REAL, &
+                        MPI_MAX, comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( pts_value_l(0,19), pts_value(0,19), inum, MPI_REAL, &
+                        MPI_MIN, comm2d, ierr )
+#else
+    pts_value(:,1:19) = pts_value_l(:,1:19)
+#endif
+
+!
+!-- Normalize the above calculated quantities (except min/max values) with the
+!-- total number of particles
+    IF ( number_of_particle_groups > 1 )  THEN
+       inum = number_of_particle_groups
+    ELSE
+       inum = 0
+    ENDIF
+
+    DO  j = 0, inum
+
+       IF ( pts_value(j,1) > 0.0_wp )  THEN
+
+          pts_value(j,2:15) = pts_value(j,2:15) / pts_value(j,1)
+          IF ( pts_value(j,12) > 0.0_wp  .AND.  pts_value(j,12) < 1.0_wp )  THEN
+             pts_value(j,13) = pts_value(j,13) / pts_value(j,12)
+             pts_value(j,14) = pts_value(j,14) / ( 1.0_wp - pts_value(j,12) )
+          ELSEIF ( pts_value(j,12) == 0.0_wp )  THEN
+             pts_value(j,13) = -1.0_wp
+          ELSE
+             pts_value(j,14) = -1.0_wp
+          ENDIF
+
+       ENDIF
+
+    ENDDO
+
+!
+!-- Calculate higher order moments of particle time series quantities,
+!-- seperately for each particle group (if there is more than one group)
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb, nzt
+             number_of_particles = prt_count(k,j,i)
+             IF (number_of_particles <= 0)  CYCLE
+             particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+
+                pts_value_l(0,20) = pts_value_l(0,20) + ( particles(n)%x - &
+                                    particles(n)%origin_x - pts_value(0,2) )**2 ! x*2
+                pts_value_l(0,21) = pts_value_l(0,21) + ( particles(n)%y - &
+                                    particles(n)%origin_y - pts_value(0,3) )**2 ! y*2
+                pts_value_l(0,22) = pts_value_l(0,22) + ( particles(n)%z - &
+                                    particles(n)%origin_z - pts_value(0,4) )**2 ! z*2
+                pts_value_l(0,23) = pts_value_l(0,23) + ( particles(n)%speed_x - &
+                                                         pts_value(0,6) )**2   ! u*2
+                pts_value_l(0,24) = pts_value_l(0,24) + ( particles(n)%speed_y - &
+                                                          pts_value(0,7) )**2   ! v*2
+                pts_value_l(0,25) = pts_value_l(0,25) + ( particles(n)%speed_z - &
+                                                          pts_value(0,8) )**2   ! w*2
+                pts_value_l(0,26) = pts_value_l(0,26) + ( particles(n)%rvar1 - &
+                                                          pts_value(0,9) )**2   ! u"2
+                pts_value_l(0,27) = pts_value_l(0,27) + ( particles(n)%rvar2 - &
+                                                          pts_value(0,10) )**2  ! v"2
+                pts_value_l(0,28) = pts_value_l(0,28) + ( particles(n)%rvar3 - &
+                                                          pts_value(0,11) )**2  ! w"2
+!
+!--             Repeat the same for the respective particle group
+                IF ( number_of_particle_groups > 1 )  THEN
+                   jg = particles(n)%group
+
+                   pts_value_l(jg,20) = pts_value_l(jg,20) + ( particles(n)%x - &
+                                       particles(n)%origin_x - pts_value(jg,2) )**2
+                   pts_value_l(jg,21) = pts_value_l(jg,21) + ( particles(n)%y - &
+                                       particles(n)%origin_y - pts_value(jg,3) )**2
+                   pts_value_l(jg,22) = pts_value_l(jg,22) + ( particles(n)%z - &
+                                       particles(n)%origin_z - pts_value(jg,4) )**2
+                   pts_value_l(jg,23) = pts_value_l(jg,23) + ( particles(n)%speed_x - &
+                                                             pts_value(jg,6) )**2
+                   pts_value_l(jg,24) = pts_value_l(jg,24) + ( particles(n)%speed_y - &
+                                                             pts_value(jg,7) )**2
+                   pts_value_l(jg,25) = pts_value_l(jg,25) + ( particles(n)%speed_z - &
+                                                             pts_value(jg,8) )**2
+                   pts_value_l(jg,26) = pts_value_l(jg,26) + ( particles(n)%rvar1 - &
+                                                             pts_value(jg,9) )**2
+                   pts_value_l(jg,27) = pts_value_l(jg,27) + ( particles(n)%rvar2 - &
+                                                             pts_value(jg,10) )**2
+                   pts_value_l(jg,28) = pts_value_l(jg,28) + ( particles(n)%rvar3 - &
+                                                             pts_value(jg,11) )**2
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+    pts_value_l(0,29) = ( number_of_particles - pts_value(0,1) / numprocs )**2
+                                                 ! variance of particle numbers
+    IF ( number_of_particle_groups > 1 )  THEN
+       DO  j = 1, number_of_particle_groups
+          pts_value_l(j,29) = ( pts_value_l(j,1) - &
+                                pts_value(j,1) / numprocs )**2
+       ENDDO
+    ENDIF
+
+#if defined( __parallel )
+!
+!-- Sum values of the subdomains
+    inum = number_of_particle_groups + 1
+
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( pts_value_l(0,20), pts_value(0,20), inum*10, MPI_REAL, &
+                        MPI_SUM, comm2d, ierr )
+#else
+    pts_value(:,20:29) = pts_value_l(:,20:29)
+#endif
+
+!
+!-- Normalize the above calculated quantities with the total number of
+!-- particles
+    IF ( number_of_particle_groups > 1 )  THEN
+       inum = number_of_particle_groups
+    ELSE
+       inum = 0
+    ENDIF
+
+    DO  j = 0, inum
+
+       IF ( pts_value(j,1) > 0.0_wp )  THEN
+          pts_value(j,20:28) = pts_value(j,20:28) / pts_value(j,1)
+       ENDIF
+       pts_value(j,29) = pts_value(j,29) / numprocs
+
+    ENDDO
+
+#if defined( __netcdf )
+!
+!-- Output particle time series quantities in NetCDF format
+    IF ( myid == 0 )  THEN
+       DO  j = 0, inum
+          DO  i = 1, dopts_num
+             nc_stat = NF90_PUT_VAR( id_set_pts, id_var_dopts(i,j),  &
+                                     (/ pts_value(j,i) /),           &
+                                     start = (/ dopts_time_count /), &
+                                     count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_ptseries', 392 )
+          ENDDO
+       ENDDO
+    ENDIF
+#endif
+
+    DEALLOCATE( pts_value, pts_value_l )
+
+    CALL cpu_log( log_point(36), 'data_output_ptseries', 'stop' )
+
+ END SUBROUTINE data_output_ptseries
Index: /palm/tags/release-6.0/SOURCE/data_output_spectra.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_spectra.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_spectra.f90	(revision 3477)
@@ -0,0 +1,319 @@
+!> @file data_output_spectra.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Additional default spectra for passive scalar
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! spectrum renamed spectra_mod, spectra related variables moved to spectra_mod,
+! routines data_output_spectra_x/y removed
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! cpp-directives for spectra removed, immediate return if no spectra levels are
+! given
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf output queries
+!
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: module statistics and module spectrum added, missing variables in ONLY
+! arguments added
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 964 2012-07-26 09:14:24Z raasch
+! code for profil-output removed
+!
+! Revision 1.1  2001/01/05 15:14:20  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Writing spectra data on file, using a special format which allows
+!> plotting of these data with PROFIL-graphic-software
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_spectra
+ 
+#if defined( __netcdf )
+    USE control_parameters,                                                    &
+        ONLY:  message_string, time_since_reference_point
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE kinds
+
+    USE NETCDF
+
+    USE netcdf_interface,                                                      &
+        ONLY:  id_set_sp, id_var_time_sp, nc_stat, netcdf_handle_error
+
+    USE pegrid
+
+    USE spectra_mod,                                                           &
+        ONLY:  average_count_sp, averaging_interval_sp, comp_spectra_level,    &
+               data_output_sp, dosp_time_count, spectra_direction, spectrum_x, &
+               spectrum_y
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  m       !<
+    INTEGER(iwp) ::  pr      !<
+    
+    CALL cpu_log( log_point(31), 'data_output_spectra', 'start' )
+
+!
+!-- Check if user gave any levels for spectra to be calculated
+    IF ( comp_spectra_level(1) == 999999 )  RETURN
+
+!
+!-- Output is only performed on PE0
+    IF ( myid == 0 )  THEN
+
+!
+!--    Open file for spectra output in NetCDF format
+       CALL check_open( 107 )
+
+!
+!--    Increment the counter for number of output times
+       dosp_time_count = dosp_time_count + 1
+
+!
+!--    Update the spectra time axis
+       nc_stat = NF90_PUT_VAR( id_set_sp, id_var_time_sp,        &
+                               (/ time_since_reference_point /), &
+                               start = (/ dosp_time_count /), count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_spectra', 47 )
+
+!
+!--    If necessary, calculate time average and reset average counter
+       IF ( average_count_sp == 0 )  THEN
+           message_string = 'no spectra data available'
+           CALL message( 'data_output_spectra', 'PA0186', 0, 0, 0, 6, 0 )
+       ENDIF
+       IF ( average_count_sp /= 1 )  THEN
+          spectrum_x = spectrum_x / REAL( average_count_sp, KIND=wp )
+          spectrum_y = spectrum_y / REAL( average_count_sp, KIND=wp )
+          average_count_sp = 0
+       ENDIF
+
+!
+!--    Loop over all spectra defined by the user
+       m = 1
+       DO WHILE ( data_output_sp(m) /= ' '  .AND.  m <= 10 )
+
+          SELECT CASE ( TRIM( data_output_sp(m) ) )
+
+             CASE ( 'u' )
+                pr = 1
+
+             CASE ( 'v' )
+                pr = 2
+
+             CASE ( 'w' )
+                pr = 3
+
+             CASE ( 'theta' )
+                pr = 4
+
+             CASE ( 'q' )
+                pr = 5
+
+             CASE ( 's' )
+                pr = 6
+
+             CASE DEFAULT
+!
+!--             The DEFAULT case is reached either if the parameter 
+!--             data_output_sp(m) contains a wrong character string or if the 
+!--             user has coded a special case in the user interface. There, the 
+!--             subroutine user_spectra checks which of these two conditions 
+!--             applies.
+                CALL user_spectra( 'data_output', m, pr )
+
+          END SELECT
+
+!
+!--       Output of spectra in NetCDF format
+!--       Output of x-spectra
+          IF ( INDEX( spectra_direction(m), 'x' ) /= 0 ) THEN
+             CALL output_spectra_netcdf( m, 'x' )
+          ENDIF
+!
+!--       Output of y-spectra
+          IF ( INDEX( spectra_direction(m), 'y' ) /= 0 ) THEN
+             CALL output_spectra_netcdf( m, 'y' )
+          ENDIF
+
+!
+!--       Increase counter for next spectrum
+          m = m + 1
+
+       ENDDO
+
+!
+!--    Reset spectra values
+       spectrum_x = 0.0_wp; spectrum_y = 0.0_wp
+
+    ENDIF
+
+    CALL cpu_log( log_point(31), 'data_output_spectra', 'stop' )
+
+#if defined( __parallel )
+!    CALL MPI_BARRIER( comm2d, ierr )  ! really necessary
+#endif
+
+#endif
+ END SUBROUTINE data_output_spectra
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE output_spectra_netcdf( nsp, direction )
+#if defined( __netcdf )
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, ny
+
+    USE kinds
+
+    USE NETCDF
+
+    USE netcdf_interface,                                                      &
+        ONLY:  id_set_sp, id_var_dospx, id_var_dospy, nc_stat,                 &
+               netcdf_handle_error
+
+    USE spectra_mod,                                                           &
+        ONLY:  dosp_time_count, n_sp_x, n_sp_y, spectrum_x, spectrum_y
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=1), INTENT(IN) ::  direction     !<
+
+    INTEGER(iwp), INTENT(IN)      ::  nsp           !<
+
+    INTEGER(iwp)                  ::  i             !<
+    INTEGER(iwp)                  ::  k             !<
+
+    REAL(wp)                      ::  frequency     !<
+
+    REAL(wp), DIMENSION(nx/2)     ::  netcdf_data_x !<
+    REAL(wp), DIMENSION(ny/2)     ::  netcdf_data_y !<
+
+
+    IF ( direction == 'x' )  THEN
+
+       DO  k = 1, n_sp_x
+
+          DO  i = 1, nx/2
+             frequency = 2.0_wp * pi * i / ( dx * ( nx + 1 ) )
+             netcdf_data_x(i) = frequency * spectrum_x(i,k,nsp)
+          ENDDO
+
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospx(nsp), netcdf_data_x, &
+                                  start = (/ 1, k, dosp_time_count /), &
+                                  count = (/ nx/2, 1, 1 /) )
+          CALL netcdf_handle_error( 'data_output_spectra', 348 )
+
+       ENDDO
+
+    ENDIF
+
+    IF ( direction == 'y' )  THEN
+
+       DO  k = 1, n_sp_y
+
+          DO  i = 1, ny/2
+             frequency = 2.0_wp * pi * i / ( dy * ( ny + 1 ) )
+             netcdf_data_y(i) = frequency * spectrum_y(i,k,nsp)
+          ENDDO
+
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_dospy(nsp), netcdf_data_y, &
+                                  start = (/ 1, k, dosp_time_count /), &
+                                  count = (/ ny/2, 1, 1 /) )
+          CALL netcdf_handle_error( 'data_output_spectra', 349 )
+
+       ENDDO
+
+    ENDIF
+
+#endif
+ END SUBROUTINE output_spectra_netcdf
Index: /palm/tags/release-6.0/SOURCE/data_output_tseries.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/data_output_tseries.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/data_output_tseries.f90	(revision 3477)
@@ -0,0 +1,163 @@
+!> @file data_output_tseries.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused format removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1524 2015-01-14 13:18:19Z keck
+! Bugfix: increment dots_time_count after the call of subroutine check_open
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf output queries
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log.
+! module interfaces removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1998/03/03 08:00:13  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Time series output for PROFIL. Always all time series are stored. A selection
+!> can be applied via the PROFIL-parameters in close_file.
+!------------------------------------------------------------------------------!
+ SUBROUTINE data_output_tseries
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  dots_time_count, time_since_reference_point
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point  
+
+    USE kinds
+
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+    USE netcdf_interface,                                                      &
+        ONLY:  dots_num, id_set_ts, id_var_dots, id_var_time_ts, nc_stat,      &
+               netcdf_handle_error
+
+    USE pegrid
+
+    USE profil_parameter
+    
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, statistic_regions, ts_value
+
+    IMPLICIT NONE
+
+
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  sr !<
+
+
+!
+!-- If required, compute statistics.
+    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
+
+!
+!-- Flow_statistics has its own cpu-time measuring.
+    CALL cpu_log( log_point(21), 'data_output_tseries', 'start' )
+
+    IF ( myid == 0 )  THEN
+
+!
+!--    Open file for time series output in NetCDF format
+       CALL check_open( 105 )
+       
+!--    Increment the counter for number of output times
+!      CAUTION: The following line has to be after the call of the subroutine
+!               check_open, since check_open resets the counter dots_time_count
+!               to 0, if a new file is opened
+       dots_time_count = dots_time_count + 1
+       
+#if defined( __netcdf )
+!
+!--    Update the time series time axis
+       nc_stat = NF90_PUT_VAR( id_set_ts, id_var_time_ts,        &
+                               (/ time_since_reference_point /), &
+                               start = (/ dots_time_count /),    &
+                               count = (/ 1 /) )
+       CALL netcdf_handle_error( 'data_output_tseries', 350 )
+#endif
+
+!
+!--    Time series output for the total domain (and each subregion, if
+!--    applicable)
+       DO  sr = 0, statistic_regions
+
+#if defined( __netcdf )
+          DO  i = 1, dots_num
+             nc_stat = NF90_PUT_VAR( id_set_ts, id_var_dots(i,sr),  &
+                                     (/ ts_value(i,sr) /),          &
+                                     start = (/ dots_time_count /), &
+                                     count = (/ 1 /) )
+             CALL netcdf_handle_error( 'data_output_tseries', 351 )
+          ENDDO
+#endif
+
+       ENDDO
+
+    ENDIF
+
+
+    CALL cpu_log( log_point(21), 'data_output_tseries', 'stop' )
+
+ END SUBROUTINE data_output_tseries
Index: /palm/tags/release-6.0/SOURCE/date_and_time_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/date_and_time_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/date_and_time_mod.f90	(revision 3477)
@@ -0,0 +1,582 @@
+!> @file date_and_time_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Tabs removed
+! 
+! 3458 2018-10-30 14:51:23Z kanani
+! from chemistry branch r3443, banzhafs:
+! Added initial hour_of_day, hour_of_year, day_of_year and month_of_year to
+! init_date_and_time
+!
+! 3298 2018-10-02 12:21:11Z kanani
+! - Minor formatting (kanani)
+! - Added Routines for DEFAULT mode of chemistry emissions (Russo)
+! - Added routine for reading-in real dates: format has to be in DDMMYYYY and 
+!   passed in the namelist parameter date_init (Russo)
+! - Added calculation of several time indices useful in several routines 
+!   of the model (Russo)
+!
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+!
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in definition of d_seconds_year.
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! 
+! 2544 2017-10-13 18:09:32Z maronga
+! Initial revision
+! 
+! 
+
+!
+! Description:
+! ------------
+!> This routine calculates all needed information on date and time used by
+!> other modules
+!> @todo Further testing and revision of routines for updating indices of 
+!>       emissions in the default mode 
+!> @todo Add routine for recognizing leap years 
+!> @todo Add recognition of exact days of week (Monday, Tuesday, etc.)
+!> @todo Reconsider whether to remove day_of_year_init from the namelist: we 
+!>       already implemented changes for calculating it from date_init in 
+!>       calc_date_and_time
+!> @todo time_utc during spin-up  
+!------------------------------------------------------------------------------!
+ MODULE date_and_time_mod
+
+    USE control_parameters,                                                   &
+        ONLY:  coupling_start_time, days_since_reference_point,               &
+               message_string, simulated_time, time_since_reference_point
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+!-- Variables Declaration
+
+    INTEGER(iwp)        ::  day_of_year      = 0   !< day of the year (DOY)
+    INTEGER(iwp)        ::  day_of_year_init = 0   !< DOY at model start (default: 0)
+
+    ! --- Most of these indices are updated by the routine calc_date_and_time according to the current date and time of the simulation
+    INTEGER(iwp)        ::  hour_of_year = 1                        !< hour of the current year (1:8760(8784))
+    INTEGER(iwp)        ::  hour_of_day=1                           !< hour of the current day (1:24)
+    INTEGER(iwp)        ::  day_of_month=0                          !< day of the current month (1:31)
+    INTEGER(iwp)        ::  month_of_year=0                         !< month of the current year (1:12)
+    INTEGER(iwp)        ::  current_year=0                          !< current year
+    INTEGER(iwp)        ::  hour_call_emis=0                        !< index used to call the emissions just once every hour
+
+    INTEGER(iwp)        ::  ihour            
+    INTEGER(iwp)        ::  index_mm                                !< index months of the default emission mode
+    INTEGER(iwp)        ::  index_dd                                !< index days of the default emission mode
+    INTEGER(iwp)        ::  index_hh                                !< index hours of the emission mode
+    INTEGER(iwp)        ::  hours_since_reference_point             !< hours of current simulation
+
+    REAL(wp)            ::  time_utc                     !< current model time in UTC
+    REAL(wp)            ::  time_utc_emis                !< current emission module time in UTC
+    REAL(wp)            ::  time_utc_init = 43200.0_wp   !< UTC time at model start
+    REAL(wp)            ::  time_update                  !< used to calculate actual second of the simulation
+ 
+    REAL(wp), PARAMETER ::  d_hours_day    = 1.0_wp / 24.0_wp       !< inverse of hours per day (1/24)
+    REAL(wp), PARAMETER ::  d_seconds_hour = 1.0_wp / 3600.0_wp     !< inverse of seconds per hour (1/3600)
+    REAL(wp), PARAMETER ::  d_seconds_year = 1.0_wp / 31536000.0_wp !< inverse of the seconds per year (1/(365*86400))
+    
+    CHARACTER(len=8)    ::  date_init = "21062017"                  !< Starting date of simulation: We selected this because it was a monday
+ 
+    !> --- Parameters
+    INTEGER, PARAMETER, DIMENSION(12) :: days = (/31,28,31,30,31,30,31,31,30,31,30,31/) ! total number of days for each month (no leap year)
+
+    SAVE
+
+!-- INTERFACES PART
+    !-- Read initial day and time of simulation
+    INTERFACE init_date_and_time
+       MODULE PROCEDURE init_date_and_time
+    END INTERFACE init_date_and_time
+
+    !-- Get hour index in the DEAFULT case of chemistry emissions :
+    INTERFACE time_default_indices
+       MODULE PROCEDURE time_mdh_indices
+       MODULE PROCEDURE time_hour_indices
+    END INTERFACE time_default_indices
+
+    !-- Get hour index in the PRE-PROCESSED case of chemistry emissions :
+    INTERFACE time_preprocessed_indices
+       MODULE PROCEDURE time_preprocessed_indices
+    END INTERFACE time_preprocessed_indices
+
+
+    !-- Calculate current date and time
+    INTERFACE calc_date_and_time
+       MODULE PROCEDURE calc_date_and_time
+    END INTERFACE
+
+
+    !-- Public Interfaces
+    PUBLIC calc_date_and_time, time_default_indices, init_date_and_time, time_preprocessed_indices
+
+    !-- Public Variables
+    PUBLIC date_init, d_hours_day, d_seconds_hour, d_seconds_year,               &
+           day_of_year, day_of_year_init, time_utc, time_utc_init, day_of_month, &
+           month_of_year, index_mm, index_dd, index_hh, hour_of_day, hour_of_year, &
+           hour_call_emis
+
+ CONTAINS
+
+
+ !------------------------------------------------------------------------------!
+ !> Reads starting date from namelist
+ !------------------------------------------------------------------------------!
+  
+    SUBROUTINE init_date_and_time
+
+       IMPLICIT NONE
+
+       !--    Variables Definition
+       INTEGER ::  i_mon       !< Index for going through the different months
+
+       IF  (day_of_year_init == 0) THEN
+          ! Day of the month at starting time
+          READ(UNIT=date_init(1:2),fmt=*)day_of_month
+
+          ! Month of the year at starting time
+          READ(UNIT=date_init(3:4),fmt=*)month_of_year
+
+          ! Year at starting time
+          READ(UNIT=date_init(5:8),fmt=*)current_year
+       
+       ENDIF
+
+
+       !-- Calculate initial hour of the day: the first hour of the day is from 00:00:00 to 00:59:59. 
+
+       hour_of_day = INT( FLOOR( time_utc_init/3600.0_wp ) ) + 1
+
+       !-- Calculate initial day day_of_year_init in case date_init is given or day_of_year_init is given
+       IF ( day_of_year_init == 0 ) THEN
+
+          !> Condition for printing an error when date_init is not provided when day_of_year_init is not given in the namelist or when the format of the date is not the one required by PALM. 
+          IF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
+        
+             IF ( month_of_year == 1 ) THEN  !!month of year is read in input
+
+                day_of_year_init = day_of_month
+
+             ELSE
+
+                day_of_year_init= SUM(days( 1:(month_of_year-1) )) + day_of_month  !day_of_month is read in input in this case
+
+             ENDIF
+!kanani: Revise, we cannot force users to provide date_init, maybe set a default value?
+!           ELSE
+! 
+!              message_string = 'date_init not provided in the namelist or'             //          &
+!                               ' given in the wrong format: MUST BE DDMMYYYY'                        
+!              CALL message( 'calc_date_and_time', 'DT0100', 2, 2, 0, 6, 0 ) 
+     
+          ENDIF
+
+       ENDIF
+
+       
+       !-- Initial day of the year
+       day_of_year = day_of_year_init
+
+       !-- Initial hour of the year
+       hour_of_year = ( (day_of_year-1) * 24 ) + hour_of_day
+
+       !--Initial day of the month and month of the year
+       !> --------------------------------------------------------------------------------
+       !> The first case is when date_init is not provided: we only know day_of_year_init      
+       IF ( month_of_year == 0 .AND. day_of_month == 0) THEN
+
+         
+          IF ( day_of_year .LE. 31 ) THEN
+
+             month_of_year=1
+             day_of_month=day_of_year
+
+          ELSE
+
+             DO i_mon=2,12   !january is considered in the first case
+                IF ( day_of_year .LE. SUM(days(1:i_mon)) .AND. day_of_year .GT. SUM(days(1:(i_mon-1))) ) THEN
+           
+                   month_of_year=i_mon
+
+                   day_of_month=INT(MOD(day_of_year, SUM(days(1:(i_mon-1))))) 
+
+                   GOTO 38
+
+                ENDIF
+
+             38 ENDDO
+          ENDIF
+       !> --------------------------------------------------------------------------------
+       !> in the second condition both day of month and month_of_year are either given in input (passed to date_init) or we are in some day successive to the initial one, so that day_of_month has already be computed in previous step
+       !>TBD: something to calculate the current year is missing
+       ELSEIF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
+ 
+          !> calculate month_of_year. TBD: test the condition when day_of_year==31
+ 
+          IF (day_of_year==1) THEN  !> this allows to turn from december to January when passing from a year to another
+ 
+             month_of_year = 1
+        
+          ELSE IF (day_of_year .GT. 1 .AND. day_of_year .GT. SUM(days(1:month_of_year))) THEN
+
+             month_of_year = month_of_year + 1
+
+          ENDIF
+
+          !> calculate day_of_month
+          IF ( month_of_year == 1 ) THEN
+           
+            day_of_month=day_of_year
+
+          ELSE
+
+            day_of_month=INT(MOD(day_of_year, SUM(days(1:(month_of_year-1)))))
+
+          ENDIF
+
+
+       ELSE
+
+          !> Condition when date_init is provided but it is given in the wrong format
+          message_string = 'date_init not provided in the namelist or'            //          &
+                              ' given in the wrong format: MUST BE DDMMYYYY'                  
+          CALL message( 'init_date_and_time', 'DT0102', 2, 2, 0, 6, 0 ) 
+
+       ENDIF
+
+
+    END SUBROUTINE init_date_and_time
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate current date and time of the simulation 
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE calc_date_and_time
+
+       IMPLICIT NONE
+
+!--    Variables Definition
+       INTEGER		   		:: i_mon       !< Index for going through the different months
+
+       !> Update simulation time in seconds
+       time_update = simulated_time-coupling_start_time
+
+!--    Calculate current day of the simulated time
+       days_since_reference_point=INT(FLOOR( (time_utc_init + time_update) &
+                               / 86400.0_wp ) )
+
+!--    Calculate actual UTC time                        
+       time_utc = MOD((time_utc_init + time_since_reference_point), 86400.0_wp)
+       
+!sB    PRILIMINARY workaround for time_utc changes due to changes in time_since_reference_point in
+!sB    radiation_model_mod during runtime:
+       time_utc_emis = MOD((time_utc_init + time_update), 86400.0_wp)     
+
+!--    Calculate initial day of the year: it is calculated only once. In fact, day_of_year_init is initialized to 0 and then a positive value is passed. This condition is also called only when day_of_year_init is not given in the namelist. 
+
+       IF ( day_of_year_init == 0 ) THEN
+
+          !> Condition for printing an error when date_init is not provided when day_of_year_init is not given in the namelist or when the format of the date is not the one required by PALM. 
+          IF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
+        
+             IF ( month_of_year == 1 ) THEN  !!month of year is read in input
+
+                day_of_year_init = day_of_month
+
+             ELSE
+
+                day_of_year_init= SUM(days( 1:(month_of_year-1) )) + day_of_month  !day_of_month is read in input in this case
+
+             ENDIF
+!kanani: Revise, we cannot force users to provide date_init, maybe set a default value?
+!           ELSE
+! 
+!              message_string = 'date_init not provided in the namelist or'             //          &
+!                               ' given in the wrong format: MUST BE DDMMYYYY'                        
+!              CALL message( 'calc_date_and_time', 'DT0100', 2, 2, 0, 6, 0 ) 
+     
+          ENDIF
+
+       ENDIF
+
+      !-- Calculate actual hour of the day: the first hour of the day is from 00:00:00 to 00:59:59. 
+
+      hour_of_day = INT( FLOOR( time_utc_emis/3600.0_wp ) ) + 1
+
+!--    Calculate current day of the year !TBD: considetr leap years
+       IF ( (day_of_year_init + days_since_reference_point)  .GT. 365 ) THEN
+
+          day_of_year=INT(MOD((day_of_year_init + days_since_reference_point), 365.0_wp))
+
+       ELSE
+          
+          day_of_year = day_of_year_init + days_since_reference_point
+
+       ENDIF
+
+!
+!--    Calculate current hour of the year
+       hour_of_year = ( (day_of_year-1) * 24 ) + hour_of_day  !> actual hour of the year
+        
+
+!
+!--    UPDATE actual day of the month and month of the year
+       !> --------------------------------------------------------------------------------
+       !> The first case is when date_init is not provided: we only know day_of_year_init      
+       IF ( month_of_year == 0 .AND. day_of_month == 0) THEN
+
+          !> The first case is when date_init is not provided: we only know day_of_year_init
+          !DO i_mon=1,12
+             !IF (day_of_year .LE. SUM(days(1:i_mon))) THEN
+          IF ( day_of_year .LE. 31 ) THEN
+
+             month_of_year=1
+             day_of_month=day_of_year
+
+          ELSE
+
+             DO i_mon=2,12   !january is considered in the first case
+                IF ( day_of_year .LE. SUM(days(1:i_mon)) .AND. day_of_year .GT. SUM(days(1:(i_mon-1))) ) THEN
+           
+                   month_of_year=i_mon
+
+                   day_of_month=INT(MOD(day_of_year, SUM(days(1:(i_mon-1))))) 
+
+                   GOTO 38
+
+                ENDIF
+
+             38 ENDDO
+          ENDIF
+       !> --------------------------------------------------------------------------------
+       !> in the second condition both day of month and month_of_year are either given in input (passed to date_init) or we are in some day successive to the initial one, so that day_of_month has already be computed in previous step
+       !>TBD: something to calculate the current year is missing
+       ELSEIF ( day_of_month .GT. 0 .AND. day_of_month .LE. 31 .AND. month_of_year .GT. 0 .AND. month_of_year .LE. 12) THEN
+ 
+          !> calculate month_of_year. TBD: test the condition when day_of_year==31
+ 
+          IF (day_of_year==1) THEN  !> this allows to turn from december to January when passing from a year to another
+ 
+             month_of_year = 1
+        
+          ELSE IF (day_of_year .GT. 1 .AND. day_of_year .GT. SUM(days(1:month_of_year))) THEN
+
+             month_of_year = month_of_year + 1
+
+          ENDIF
+
+          !> calculate day_of_month
+          IF ( month_of_year == 1 ) THEN
+           
+            day_of_month=day_of_year
+
+          ELSE
+
+            day_of_month=INT(MOD(day_of_year, SUM(days(1:(month_of_year-1)))))
+
+          ENDIF
+
+
+
+
+      ELSE
+
+          !> Condition when date_init is provided but it is given in the wrong format
+          message_string = 'date_init not provided in the namelist or'            //          &
+                              ' given in the wrong format: MUST BE DDMMYYYY'                  
+          CALL message( 'calc_date_and_time', 'DT0101', 2, 2, 0, 6, 0 ) 
+
+      ENDIF       
+
+    END SUBROUTINE calc_date_and_time
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine determines the time factor index in the PRE-PROCESSED emissions mode.
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE time_preprocessed_indices(index_hh)
+
+    USE indices
+
+    IMPLICIT NONE
+
+!
+!-- In/output
+    INTEGER, INTENT(INOUT) ::  index_hh    !> Index Hour
+!
+!-- Additional Variables for calculateing indices
+!-- Constants
+    INTEGER, PARAMETER ::  nhour = 24
+
+    IF (days_since_reference_point == 0) THEN
+
+       index_hh=hour_of_day
+
+    ELSE
+
+       index_hh=(days_since_reference_point*nhour)+(hour_of_day)
+
+    ENDIF
+
+
+ END SUBROUTINE time_preprocessed_indices
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine determines the time factor index in the mdh case of the DEFAULT chemistry emissions mode.
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE time_mdh_indices(daytype_mdh,mo, dd, hh, index_mm, index_dd, index_hh)
+
+    USE indices
+
+    IMPLICIT NONE
+
+    !> IN/OUTPUT
+    INTEGER, INTENT(INOUT) :: mo          !> Month of year
+    INTEGER, INTENT(INOUT) :: dd          !> Day of month
+    INTEGER, INTENT(INOUT) :: hh          !> Hour of day
+    INTEGER, INTENT(INOUT) :: index_mm    !> Index Month
+    INTEGER, INTENT(INOUT) :: index_dd    !> Index Day
+    INTEGER, INTENT(INOUT) :: index_hh    !> Index Hour
+
+    CHARACTER(len=80), INTENT(INOUT) :: daytype_mdh !> type of the day in mdh mode: one of 1-WORKDAY
+                                                    !                                      2-WEEKEND
+                                                    !                                      3-HOLIDAY
+
+    REAL(wp)                         :: frac_day=0  
+
+    !> ------------------------------------------------------------------------
+
+    INTEGER                	     :: weekday
+
+    !> CONSTANTS
+    INTEGER, PARAMETER               :: nmonth = 12
+    INTEGER, PARAMETER               :: nday = 7
+    INTEGER, PARAMETER               :: nhour = 24
+
+    frac_day= (dd-1)/nday    !> indicates the week of the month, supposing the month starts on monday
+
+   ! 1:7      1:31  7                   (0:30)/7
+    weekday = dd-( nday * (INT( CEILING( frac_day ) ) ) ) ! for now we let the year start on Monday. 
+
+    !TBD: set weekday correct based on date
+    index_mm = mo
+    index_dd = nmonth + weekday  !> Index of the days in the mdh mode (13:20)
+
+    SELECT CASE(TRIM(daytype_mdh))
+
+		   CASE ("workday")
+	       
+	           index_hh = nmonth+ nday + hh 
+
+		   CASE ("weekend")
+	       
+	           index_hh = nmonth+ nday + nhour + hh 
+
+		   CASE ("holiday")
+	       
+	           index_hh = nmonth+ nday + 2*nhour + hh 
+    END SELECT
+
+
+ END SUBROUTINE time_mdh_indices
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine determines the time factor index in the HOURLY case of the DEFAULT emissions mode.
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE time_hour_indices(mo,dd,hh,index_hh)
+
+    USE indices
+
+    IMPLICIT NONE
+
+    !> IN/OUTPUT
+    INTEGER, INTENT(INOUT) 		:: mo          !> Month
+    INTEGER, INTENT(INOUT) 		:: hh          !> Hour
+    INTEGER, INTENT(INOUT) 		:: dd          !> Day
+    INTEGER, INTENT(INOUT) 		:: index_hh    !> Index Hour
+ 
+    !> Additional Variables for calculateing indices
+    INTEGER		   		:: index_mm    !> Index Month
+    INTEGER		   		:: index_dd    !> Index Day
+    INTEGER		   		:: i_mon       !> Index for going through the different months
+    INTEGER		   		:: sum_dd      !> Sum days
+
+    !> CONSTANTS
+    INTEGER, PARAMETER 			:: nmonth=12
+    INTEGER, PARAMETER 			:: nday = 7
+    INTEGER, PARAMETER 			:: nhour = 24
+    INTEGER, PARAMETER, DIMENSION(12)   :: days = (/31,28,31,30,31,30,31,31,30,31,30,31/) ! no leap year
+    
+
+    index_mm = mo-1
+    index_dd = dd-1
+    sum_dd=0
+
+    IF (mo == 1) THEN
+
+       index_hh=(index_dd*nhour)+hh
+
+    ELSE 
+
+    DO i_mon=1,index_mm
+       
+       sum_dd=sum_dd+days(i_mon)
+
+    ENDDO
+      
+    index_hh=(sum_dd*nhour)+(index_dd*nhour)+(hh)
+
+    ENDIF
+ 
+
+ END SUBROUTINE time_hour_indices
+
+
+END MODULE date_and_time_mod
Index: /palm/tags/release-6.0/SOURCE/diffusion_s.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/diffusion_s.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/diffusion_s.f90	(revision 3477)
@@ -0,0 +1,738 @@
+!> @file diffusion_s.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Major bugfix, horizontal diffusion at vertical surfaces corrected.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Formatting corrections.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY list
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! 
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator version (*_acc) added
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! some arrays comunicated by module instead of parameter list
+!
+! Revision 1.1  2000/04/13 14:54:02  schroeter
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Diffusion term of scalar quantities (temperature and water content)
+!------------------------------------------------------------------------------!
+ MODULE diffusion_s_mod
+ 
+
+    PRIVATE
+    PUBLIC diffusion_s
+
+    INTERFACE diffusion_s
+       MODULE PROCEDURE diffusion_s
+       MODULE PROCEDURE diffusion_s_ij
+    END INTERFACE diffusion_s
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_s( s, s_flux_def_h_up,    s_flux_def_h_down,          &
+                               s_flux_t,                                       &
+                               s_flux_lsm_h_up,    s_flux_usm_h_up,            &
+                               s_flux_def_v_north, s_flux_def_v_south,         &
+                               s_flux_def_v_east,  s_flux_def_v_west,          &
+                               s_flux_lsm_v_north, s_flux_lsm_v_south,         &
+                               s_flux_lsm_v_east,  s_flux_lsm_v_west,          &
+                               s_flux_usm_v_north, s_flux_usm_v_south,         &
+                               s_flux_usm_v_east,  s_flux_usm_v_west )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, kh, tend, drho_air, rho_air_zw
+       
+       USE control_parameters,                                                 & 
+           ONLY: use_surface_fluxes, use_top_fluxes
+       
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddx2, ddy, ddy2
+       
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb,             &
+                  nzt, wall_flags_0
+       
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, &
+                   surf_usm_v 
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp) ::  flag              !< flag to mask topography grid points
+       REAL(wp) ::  mask_bottom       !< flag to mask vertical upward-facing surface     
+       REAL(wp) ::  mask_east         !< flag to mask vertical surface east of the grid point 
+       REAL(wp) ::  mask_north        !< flag to mask vertical surface north of the grid point
+       REAL(wp) ::  mask_south        !< flag to mask vertical surface south of the grid point 
+       REAL(wp) ::  mask_west         !< flag to mask vertical surface west of the grid point
+       REAL(wp) ::  mask_top          !< flag to mask vertical downward-facing surface  
+
+       REAL(wp), DIMENSION(1:surf_def_v(0)%ns) ::  s_flux_def_v_north !< flux at north-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_v(1)%ns) ::  s_flux_def_v_south !< flux at south-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_v(2)%ns) ::  s_flux_def_v_east  !< flux at east-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_v(3)%ns) ::  s_flux_def_v_west  !< flux at west-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_h(0)%ns) ::  s_flux_def_h_up    !< flux at horizontal upward-facing default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_h(1)%ns) ::  s_flux_def_h_down  !< flux at horizontal donwward-facing default-type surfaces 
+       REAL(wp), DIMENSION(1:surf_lsm_h%ns)    ::  s_flux_lsm_h_up    !< flux at horizontal upward-facing natural-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(0)%ns) ::  s_flux_lsm_v_north !< flux at north-facing vertical natural-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(1)%ns) ::  s_flux_lsm_v_south !< flux at south-facing vertical natural-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(2)%ns) ::  s_flux_lsm_v_east  !< flux at east-facing vertical natural-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(3)%ns) ::  s_flux_lsm_v_west  !< flux at west-facing vertical natural-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_h%ns)    ::  s_flux_usm_h_up    !< flux at horizontal upward-facing urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(0)%ns) ::  s_flux_usm_v_north !< flux at north-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(1)%ns) ::  s_flux_usm_v_south !< flux at south-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(2)%ns) ::  s_flux_usm_v_east  !< flux at east-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(3)%ns) ::  s_flux_usm_v_west  !< flux at west-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_h(2)%ns) ::  s_flux_t           !< flux at model top
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  s  !< 
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  s  !< 
+#endif
+
+       DO  i = nxl, nxr
+          DO  j = nys,nyn
+!
+!--          Compute horizontal diffusion
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography and wall-bounded grid points
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 
+!
+!--             Predetermine flag to mask wall-bounded grid points, equivalent to
+!--             former s_outer array
+                mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 0 ) )
+                mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 0 ) )
+                mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 0 ) )
+                mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 0 ) )
+
+                tend(k,j,i) = tend(k,j,i)                                      &
+                                          + 0.5_wp * (                         &
+                        mask_east  * ( kh(k,j,i) + kh(k,j,i+1) )               &
+                                   * ( s(k,j,i+1) - s(k,j,i)   )               &
+                      - mask_west  * ( kh(k,j,i) + kh(k,j,i-1) )               &
+                                   * ( s(k,j,i)   - s(k,j,i-1) )               &
+                                                     ) * ddx2 * flag           &
+                                          + 0.5_wp * (                         &
+                        mask_north * ( kh(k,j,i) + kh(k,j+1,i) )               &
+                                   * ( s(k,j+1,i) - s(k,j,i)   )               &
+                      - mask_south * ( kh(k,j,i) + kh(k,j-1,i) )               &
+                                   * ( s(k,j,i)   - s(k,j-1,i) )               &
+                                                     ) * ddy2 * flag
+             ENDDO
+
+!
+!--          Apply prescribed horizontal wall heatflux where necessary. First,
+!--          determine start and end index for respective (j,i)-index. Please
+!--          note, in the flat case following loop will not be entered, as
+!--          surf_s=1 and surf_e=0. Furtermore, note, no vertical natural surfaces
+!--          so far. 
+!--          First, for default-type surfaces 
+!--          North-facing vertical default-type surfaces
+             surf_s = surf_def_v(0)%start_index(j,i)
+             surf_e = surf_def_v(0)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_def_v(0)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_def_v_north(m) * ddy
+             ENDDO
+!
+!--          South-facing vertical default-type surfaces
+             surf_s = surf_def_v(1)%start_index(j,i)
+             surf_e = surf_def_v(1)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_def_v(1)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_def_v_south(m) * ddy
+             ENDDO
+!
+!--          East-facing vertical default-type surfaces
+             surf_s = surf_def_v(2)%start_index(j,i)
+             surf_e = surf_def_v(2)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_def_v(2)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_def_v_east(m) * ddx
+             ENDDO
+!
+!--          West-facing vertical default-type surfaces
+             surf_s = surf_def_v(3)%start_index(j,i)
+             surf_e = surf_def_v(3)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_def_v(3)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_def_v_west(m) * ddx
+             ENDDO
+!
+!--          Now, for natural-type surfaces.
+!--          North-facing
+             surf_s = surf_lsm_v(0)%start_index(j,i)
+             surf_e = surf_lsm_v(0)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_lsm_v(0)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_north(m) * ddy
+             ENDDO
+!
+!--          South-facing
+             surf_s = surf_lsm_v(1)%start_index(j,i)
+             surf_e = surf_lsm_v(1)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_lsm_v(1)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_south(m) * ddy
+             ENDDO
+!
+!--          East-facing
+             surf_s = surf_lsm_v(2)%start_index(j,i)
+             surf_e = surf_lsm_v(2)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_lsm_v(2)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_east(m) * ddx
+             ENDDO
+!
+!--          West-facing
+             surf_s = surf_lsm_v(3)%start_index(j,i)
+             surf_e = surf_lsm_v(3)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_lsm_v(3)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_west(m) * ddx
+             ENDDO
+!
+!--          Now, for urban-type surfaces.
+!--          North-facing
+             surf_s = surf_usm_v(0)%start_index(j,i)
+             surf_e = surf_usm_v(0)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_usm_v(0)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_north(m) * ddy
+             ENDDO
+!
+!--          South-facing
+             surf_s = surf_usm_v(1)%start_index(j,i)
+             surf_e = surf_usm_v(1)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_usm_v(1)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_south(m) * ddy
+             ENDDO
+!
+!--          East-facing
+             surf_s = surf_usm_v(2)%start_index(j,i)
+             surf_e = surf_usm_v(2)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_usm_v(2)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_east(m) * ddx
+             ENDDO
+!
+!--          West-facing
+             surf_s = surf_usm_v(3)%start_index(j,i)
+             surf_e = surf_usm_v(3)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k           = surf_usm_v(3)%k(m)
+                tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_west(m) * ddx
+             ENDDO
+
+!
+!--          Compute vertical diffusion. In case that surface fluxes have been
+!--          prescribed or computed at bottom and/or top, index k starts/ends at
+!--          nzb+2 or nzt-1, respectively. Model top is also mask if top flux
+!--          is given.
+             DO  k = nzb+1, nzt
+!
+!--             Determine flags to mask topography below and above. Flag 0 is 
+!--             used to mask topography in general, and flag 8 implies 
+!--             information about use_surface_fluxes. Flag 9 is used to control 
+!--             flux at model top. 
+                mask_bottom = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+                mask_top    = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k+1,j,i), 8 ) ) *     &
+                              MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k+1,j,i), 9 ) ) 
+                flag        = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                tend(k,j,i) = tend(k,j,i)                                      &
+                                       + 0.5_wp * (                            &
+                                      ( kh(k,j,i) + kh(k+1,j,i) ) *            &
+                                          ( s(k+1,j,i)-s(k,j,i) ) * ddzu(k+1)  &
+                                                            * rho_air_zw(k)    &
+                                                            * mask_top         &
+                                    - ( kh(k,j,i) + kh(k-1,j,i) ) *            &
+                                          ( s(k,j,i)-s(k-1,j,i) ) * ddzu(k)    &
+                                                            * rho_air_zw(k-1)  &
+                                                            * mask_bottom      &
+                                                  ) * ddzw(k) * drho_air(k)    &
+                                                              * flag
+             ENDDO
+
+!
+!--          Vertical diffusion at horizontal walls.
+             IF ( use_surface_fluxes )  THEN
+!
+!--             Default-type surfaces, upward-facing               
+                surf_s = surf_def_h(0)%start_index(j,i)
+                surf_e = surf_def_h(0)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(0)%k(m)
+                   tend(k,j,i) = tend(k,j,i) + s_flux_def_h_up(m)              &
+                                       * ddzw(k) * drho_air(k)
+
+                ENDDO
+!
+!--             Default-type surfaces, downward-facing               
+                surf_s = surf_def_h(1)%start_index(j,i)
+                surf_e = surf_def_h(1)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(1)%k(m)
+                   tend(k,j,i) = tend(k,j,i) + s_flux_def_h_down(m)            &
+                                       * ddzw(k) * drho_air(k)
+
+                ENDDO
+!
+!--             Natural-type surfaces, upward-facing  
+                surf_s = surf_lsm_h%start_index(j,i)
+                surf_e = surf_lsm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_lsm_h%k(m)
+                   tend(k,j,i) = tend(k,j,i) + s_flux_lsm_h_up(m)              &
+                                       * ddzw(k) * drho_air(k)
+
+                ENDDO
+!
+!--             Urban-type surfaces, upward-facing     
+                surf_s = surf_usm_h%start_index(j,i)
+                surf_e = surf_usm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_usm_h%k(m)
+                   tend(k,j,i) = tend(k,j,i) + s_flux_usm_h_up(m)              &
+                                       * ddzw(k) * drho_air(k)
+
+                ENDDO
+
+             ENDIF
+!
+!--          Vertical diffusion at the last computational gridpoint along z-direction
+             IF ( use_top_fluxes )  THEN
+                surf_s = surf_def_h(2)%start_index(j,i)
+                surf_e = surf_def_h(2)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(2)%k(m)
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                           + ( - s_flux_t(m) ) * ddzw(k) * drho_air(k)
+                ENDDO
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE diffusion_s
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_s_ij( i, j, s,                                        &
+                               s_flux_def_h_up,    s_flux_def_h_down,          &
+                               s_flux_t,                                       &
+                               s_flux_lsm_h_up,    s_flux_usm_h_up,            &
+                               s_flux_def_v_north, s_flux_def_v_south,         &
+                               s_flux_def_v_east,  s_flux_def_v_west,          &
+                               s_flux_lsm_v_north, s_flux_lsm_v_south,         &
+                               s_flux_lsm_v_east,  s_flux_lsm_v_west,          &
+                               s_flux_usm_v_north, s_flux_usm_v_south,         &
+                               s_flux_usm_v_east,  s_flux_usm_v_west )       
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, kh, tend, drho_air, rho_air_zw
+           
+       USE control_parameters,                                                 & 
+           ONLY: use_surface_fluxes, use_top_fluxes
+       
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddx2, ddy, ddy2
+       
+       USE indices,                                                            &
+           ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt, wall_flags_0
+       
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, &
+                   surf_usm_v 
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp) ::  flag              !< flag to mask topography grid points
+       REAL(wp) ::  mask_bottom       !< flag to mask vertical upward-facing surface     
+       REAL(wp) ::  mask_east         !< flag to mask vertical surface east of the grid point 
+       REAL(wp) ::  mask_north        !< flag to mask vertical surface north of the grid point
+       REAL(wp) ::  mask_south        !< flag to mask vertical surface south of the grid point 
+       REAL(wp) ::  mask_west         !< flag to mask vertical surface west of the grid point
+       REAL(wp) ::  mask_top          !< flag to mask vertical downward-facing surface  
+
+       REAL(wp), DIMENSION(1:surf_def_v(0)%ns) ::  s_flux_def_v_north !< flux at north-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_v(1)%ns) ::  s_flux_def_v_south !< flux at south-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_v(2)%ns) ::  s_flux_def_v_east  !< flux at east-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_v(3)%ns) ::  s_flux_def_v_west  !< flux at west-facing vertical default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_h(0)%ns) ::  s_flux_def_h_up    !< flux at horizontal upward-facing default-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_h(1)%ns) ::  s_flux_def_h_down  !< flux at horizontal donwward-facing default-type surfaces 
+       REAL(wp), DIMENSION(1:surf_lsm_h%ns)    ::  s_flux_lsm_h_up    !< flux at horizontal upward-facing natural-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(0)%ns) ::  s_flux_lsm_v_north !< flux at north-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(1)%ns) ::  s_flux_lsm_v_south !< flux at south-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(2)%ns) ::  s_flux_lsm_v_east  !< flux at east-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_lsm_v(3)%ns) ::  s_flux_lsm_v_west  !< flux at west-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_h%ns)    ::  s_flux_usm_h_up    !< flux at horizontal upward-facing urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(0)%ns) ::  s_flux_usm_v_north !< flux at north-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(1)%ns) ::  s_flux_usm_v_south !< flux at south-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(2)%ns) ::  s_flux_usm_v_east  !< flux at east-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_usm_v(3)%ns) ::  s_flux_usm_v_west  !< flux at west-facing vertical urban-type surfaces
+       REAL(wp), DIMENSION(1:surf_def_h(2)%ns) ::  s_flux_t           !< flux at model top
+#if defined( __nopointer )
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  s !< 
+#else
+       REAL(wp), DIMENSION(:,:,:), POINTER ::  s  !< 
+#endif
+
+!
+!--    Compute horizontal diffusion
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography and wall-bounded grid points
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 
+!
+!--       Predetermine flag to mask wall-bounded grid points, equivalent to
+!--       former s_outer array
+          mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 0 ) )
+          mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 0 ) )
+          mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 0 ) )
+          mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 0 ) )
+!
+!--       Finally, determine flag to mask both topography itself as well
+!--       as wall-bounded grid points, which will be treated further below
+
+          tend(k,j,i) = tend(k,j,i)                                            &
+                                          + 0.5_wp * (                         &
+                            mask_east  * ( kh(k,j,i) + kh(k,j,i+1) )           &
+                                       * ( s(k,j,i+1) - s(k,j,i)   )           &
+                          - mask_west  * ( kh(k,j,i) + kh(k,j,i-1) )           &
+                                       * ( s(k,j,i)   - s(k,j,i-1) )           &
+                                                     ) * ddx2 * flag           &
+                                          + 0.5_wp * (                         &
+                            mask_north * ( kh(k,j,i) + kh(k,j+1,i) )           &
+                                       * ( s(k,j+1,i) - s(k,j,i)   )           &
+                          - mask_south * ( kh(k,j,i) + kh(k,j-1,i) )           &
+                                       * ( s(k,j,i)  - s(k,j-1,i)  )           &
+                                                     ) * ddy2 * flag
+       ENDDO
+
+!
+!--    Apply prescribed horizontal wall heatflux where necessary. First,
+!--    determine start and end index for respective (j,i)-index. Please
+!--    note, in the flat case following loops will not be entered, as
+!--    surf_s=1 and surf_e=0. Furtermore, note, no vertical natural surfaces
+!--    so far. 
+!--    First, for default-type surfaces
+!--    North-facing vertical default-type surfaces
+       surf_s = surf_def_v(0)%start_index(j,i)
+       surf_e = surf_def_v(0)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_def_v(0)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_def_v_north(m) * ddy
+       ENDDO
+!
+!--    South-facing vertical default-type surfaces
+       surf_s = surf_def_v(1)%start_index(j,i)
+       surf_e = surf_def_v(1)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_def_v(1)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_def_v_south(m) * ddy
+       ENDDO
+!
+!--    East-facing vertical default-type surfaces
+       surf_s = surf_def_v(2)%start_index(j,i)
+       surf_e = surf_def_v(2)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_def_v(2)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_def_v_east(m) * ddx
+       ENDDO
+!
+!--    West-facing vertical default-type surfaces
+       surf_s = surf_def_v(3)%start_index(j,i)
+       surf_e = surf_def_v(3)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_def_v(3)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_def_v_west(m) * ddx
+       ENDDO
+!
+!--    Now, for natural-type surfaces
+!--    North-facing
+       surf_s = surf_lsm_v(0)%start_index(j,i)
+       surf_e = surf_lsm_v(0)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_lsm_v(0)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_north(m) * ddy
+       ENDDO
+!
+!--    South-facing
+       surf_s = surf_lsm_v(1)%start_index(j,i)
+       surf_e = surf_lsm_v(1)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_lsm_v(1)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_south(m) * ddy
+       ENDDO
+!
+!--    East-facing
+       surf_s = surf_lsm_v(2)%start_index(j,i)
+       surf_e = surf_lsm_v(2)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_lsm_v(2)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_east(m) * ddx
+       ENDDO
+!
+!--    West-facing
+       surf_s = surf_lsm_v(3)%start_index(j,i)
+       surf_e = surf_lsm_v(3)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_lsm_v(3)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_lsm_v_west(m) * ddx
+       ENDDO
+!
+!--    Now, for urban-type surfaces
+!--    North-facing
+       surf_s = surf_usm_v(0)%start_index(j,i)
+       surf_e = surf_usm_v(0)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_usm_v(0)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_north(m) * ddy
+       ENDDO
+!
+!--    South-facing
+       surf_s = surf_usm_v(1)%start_index(j,i)
+       surf_e = surf_usm_v(1)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_usm_v(1)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_south(m) * ddy
+       ENDDO
+!
+!--    East-facing
+       surf_s = surf_usm_v(2)%start_index(j,i)
+       surf_e = surf_usm_v(2)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_usm_v(2)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_east(m) * ddx
+       ENDDO
+!
+!--    West-facing
+       surf_s = surf_usm_v(3)%start_index(j,i)
+       surf_e = surf_usm_v(3)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k           = surf_usm_v(3)%k(m)
+          tend(k,j,i) = tend(k,j,i) + s_flux_usm_v_west(m) * ddx
+       ENDDO
+
+
+!
+!--    Compute vertical diffusion. In case that surface fluxes have been
+!--    prescribed or computed at bottom and/or top, index k starts/ends at
+!--    nzb+2 or nzt-1, respectively. Model top is also mask if top flux 
+!--    is given. 
+       DO  k = nzb+1, nzt
+!
+!--       Determine flags to mask topography below and above. Flag 0 is 
+!--       used to mask topography in general, and flag 8 implies 
+!--       information about use_surface_fluxes. Flag 9 is used to control 
+!--       flux at model top.   
+          mask_bottom = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+          mask_top    = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k+1,j,i), 8 ) )  *          &
+                        MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k+1,j,i), 9 ) )
+          flag        = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          tend(k,j,i) = tend(k,j,i)                                            &
+                                       + 0.5_wp * (                            &
+                                      ( kh(k,j,i) + kh(k+1,j,i) ) *            &
+                                          ( s(k+1,j,i)-s(k,j,i) ) * ddzu(k+1)  &
+                                                            * rho_air_zw(k)    &
+                                                            * mask_top         &
+                                    - ( kh(k,j,i) + kh(k-1,j,i) ) *            &
+                                          ( s(k,j,i)-s(k-1,j,i) ) * ddzu(k)    &
+                                                            * rho_air_zw(k-1)  &
+                                                            * mask_bottom      &
+                                                  ) * ddzw(k) * drho_air(k)    &
+                                                              * flag
+       ENDDO
+
+!
+!--    Vertical diffusion at horizontal walls.
+!--    TO DO: Adjust for downward facing walls and mask already in main loop
+       IF ( use_surface_fluxes )  THEN
+!
+!--       Default-type surfaces, upward-facing
+          surf_s = surf_def_h(0)%start_index(j,i)
+          surf_e = surf_def_h(0)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(0)%k(m)
+
+             tend(k,j,i) = tend(k,j,i) + s_flux_def_h_up(m)                    &
+                                       * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Default-type surfaces, downward-facing
+          surf_s = surf_def_h(1)%start_index(j,i)
+          surf_e = surf_def_h(1)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(1)%k(m)
+
+             tend(k,j,i) = tend(k,j,i) + s_flux_def_h_down(m)                  &
+                                       * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Natural-type surfaces, upward-facing
+          surf_s = surf_lsm_h%start_index(j,i)
+          surf_e = surf_lsm_h%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k   = surf_lsm_h%k(m)
+
+             tend(k,j,i) = tend(k,j,i) + s_flux_lsm_h_up(m)                    &
+                                       * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Urban-type surfaces, upward-facing
+          surf_s = surf_usm_h%start_index(j,i)
+          surf_e = surf_usm_h%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k   = surf_usm_h%k(m)
+
+             tend(k,j,i) = tend(k,j,i) + s_flux_usm_h_up(m)                    &
+                                       * ddzw(k) * drho_air(k)
+          ENDDO
+       ENDIF
+!
+!--    Vertical diffusion at the last computational gridpoint along z-direction
+       IF ( use_top_fluxes )  THEN
+          surf_s = surf_def_h(2)%start_index(j,i)
+          surf_e = surf_def_h(2)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(2)%k(m)
+             tend(k,j,i) = tend(k,j,i)                                         &
+                           + ( - s_flux_t(m) ) * ddzw(k) * drho_air(k)
+          ENDDO
+       ENDIF
+
+    END SUBROUTINE diffusion_s_ij
+
+ END MODULE diffusion_s_mod
Index: /palm/tags/release-6.0/SOURCE/diffusion_u.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/diffusion_u.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/diffusion_u.f90	(revision 3477)
@@ -0,0 +1,579 @@
+!> @file diffusion_u.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2638 2017-11-23 12:44:23Z raasch
+! bugfix for constant top momentumflux
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 1740 2016-01-13 08:19:40Z raasch
+! unnecessary calculations of kmzm and kmzp in wall bounded parts removed
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Formatting corrections.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! 
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed, declare create moved after
+! the FORTRAN declaration statement
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator version (*_acc) added
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! arrays comunicated by module instead of parameter list
+!
+! 978 2012-08-09 08:28:32Z fricke
+! outflow damping layer removed
+! kmym_x/_y and kmyp_x/_y change to kmym and kmyp
+!
+! Revision 1.1  1997/09/12 06:23:51  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Diffusion term of the u-component
+!> @todo additional damping (needed for non-cyclic bc) causes bad vectorization
+!>       and slows down the speed on NEC about 5-10%
+!------------------------------------------------------------------------------!
+ MODULE diffusion_u_mod
+ 
+
+    PRIVATE
+    PUBLIC diffusion_u
+
+    INTERFACE diffusion_u
+       MODULE PROCEDURE diffusion_u
+       MODULE PROCEDURE diffusion_u_ij
+    END INTERFACE diffusion_u
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_u
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, km, tend, u, v, w, drho_air, rho_air_zw
+       
+       USE control_parameters,                                                 &
+           ONLY:  constant_top_momentumflux, use_surface_fluxes,               &
+                  use_top_fluxes
+       
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddx2, ddy
+       
+       USE indices,                                                            &
+           ONLY:  nxlu, nxr, nyn, nys, nzb, nzt, wall_flags_0
+     
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, &
+                   surf_usm_v
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  l             !< running index of surface type, south- or north-facing wall
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp)     ::  flag          !< flag to mask topography grid points
+       REAL(wp)     ::  kmym          !< 
+       REAL(wp)     ::  kmyp          !<
+       REAL(wp)     ::  kmzm          !<
+       REAL(wp)     ::  kmzp          !<
+       REAL(wp)     ::  mask_bottom   !< flag to mask vertical upward-facing surface       
+       REAL(wp)     ::  mask_north    !< flag to mask vertical surface north of the grid point 
+       REAL(wp)     ::  mask_south    !< flag to mask vertical surface south of the grid point 
+       REAL(wp)     ::  mask_top      !< flag to mask vertical downward-facing surface 
+
+
+
+       DO  i = nxlu, nxr
+          DO  j = nys, nyn
+!
+!--          Compute horizontal diffusion
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography and wall-bounded grid points. 
+!--             It is sufficient to masked only north- and south-facing surfaces, which
+!--             need special treatment for the u-component. 
+                flag       = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i),   1 ) ) 
+                mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 1 ) )
+                mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 1 ) )
+!
+!--             Interpolate eddy diffusivities on staggered gridpoints
+                kmyp = 0.25_wp *                                               &
+                       ( km(k,j,i)+km(k,j+1,i)+km(k,j,i-1)+km(k,j+1,i-1) )
+                kmym = 0.25_wp *                                               &
+                       ( km(k,j,i)+km(k,j-1,i)+km(k,j,i-1)+km(k,j-1,i-1) )
+
+                tend(k,j,i) = tend(k,j,i)                                      &
+                        + 2.0_wp * (                                           &
+                                  km(k,j,i)   * ( u(k,j,i+1) - u(k,j,i)   )    &
+                                - km(k,j,i-1) * ( u(k,j,i)   - u(k,j,i-1) )    &
+                                   ) * ddx2 * flag                             &
+                        +          ( mask_north * (                            &
+                            kmyp * ( u(k,j+1,i) - u(k,j,i)     ) * ddy         &
+                          + kmyp * ( v(k,j+1,i) - v(k,j+1,i-1) ) * ddx         &
+                                                  )                            &
+                                   - mask_south * (                            &
+                            kmym * ( u(k,j,i) - u(k,j-1,i) ) * ddy             &
+                          + kmym * ( v(k,j,i) - v(k,j,i-1) ) * ddx             &
+                                                  )                            &
+                                   ) * ddy  * flag                             
+             ENDDO
+!
+!--          Add horizontal momentum flux u'v' at north- (l=0) and south-facing (l=1)
+!--          surfaces. Note, in the the flat case, loops won't be entered as 
+!--          start_index > end_index. Furtermore, note, no vertical natural surfaces
+!--          so far.           
+!--          Default-type surfaces
+             DO  l = 0, 1
+                surf_s = surf_def_v(l)%start_index(j,i)
+                surf_e = surf_def_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_def_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &                    
+                                    surf_def_v(l)%mom_flux_uv(m) * ddy
+                ENDDO   
+             ENDDO
+!
+!--          Natural-type surfaces
+             DO  l = 0, 1
+                surf_s = surf_lsm_v(l)%start_index(j,i)
+                surf_e = surf_lsm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_lsm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &                    
+                                    surf_lsm_v(l)%mom_flux_uv(m) * ddy
+                ENDDO   
+             ENDDO
+!
+!--          Urban-type surfaces
+             DO  l = 0, 1
+                surf_s = surf_usm_v(l)%start_index(j,i)
+                surf_e = surf_usm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_usm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &                    
+                                    surf_usm_v(l)%mom_flux_uv(m) * ddy
+                ENDDO   
+             ENDDO
+
+!
+!--          Compute vertical diffusion. In case of simulating a surface layer,
+!--          respective grid diffusive fluxes are masked (flag 8) within this 
+!--          loop, and added further below, else, simple gradient approach is
+!--          applied. Model top is also mask if top-momentum flux is given. 
+             DO  k = nzb+1, nzt
+!
+!--             Determine flags to mask topography below and above. Flag 1 is 
+!--             used to mask topography in general, and flag 8 implies 
+!--             information about use_surface_fluxes. Flag 9 is used to control 
+!--             momentum flux at model top.  
+                mask_bottom = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+                mask_top    = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k+1,j,i), 8 ) ) *     &
+                              MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k+1,j,i), 9 ) ) 
+                flag        = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k,j,i), 1 ) ) 
+!
+!--             Interpolate eddy diffusivities on staggered gridpoints
+                kmzp = 0.25_wp *                                               &
+                       ( km(k,j,i)+km(k+1,j,i)+km(k,j,i-1)+km(k+1,j,i-1) )
+                kmzm = 0.25_wp *                                               &
+                       ( km(k,j,i)+km(k-1,j,i)+km(k,j,i-1)+km(k-1,j,i-1) )
+
+                tend(k,j,i) = tend(k,j,i)                                      &
+                        + ( kmzp * ( ( u(k+1,j,i) - u(k,j,i)   ) * ddzu(k+1)   &
+                                   + ( w(k,j,i)   - w(k,j,i-1) ) * ddx         &
+                                   ) * rho_air_zw(k)   * mask_top              &
+                          - kmzm * ( ( u(k,j,i)   - u(k-1,j,i)   ) * ddzu(k)   &
+                                   + ( w(k-1,j,i) - w(k-1,j,i-1) ) * ddx       &
+                                   ) * rho_air_zw(k-1) * mask_bottom           &
+                          ) * ddzw(k) * drho_air(k) * flag
+             ENDDO
+
+!
+!--          Vertical diffusion at the first grid point above the surface,
+!--          if the momentum flux at the bottom is given by the Prandtl law or
+!--          if it is prescribed by the user.
+!--          Difference quotient of the momentum flux is not formed over half
+!--          of the grid spacing (2.0*ddzw(k)) any more, since the comparison
+!--          with other (LES) models showed that the values of the momentum
+!--          flux becomes too large in this case.
+!--          The term containing w(k-1,..) (see above equation) is removed here
+!--          because the vertical velocity is assumed to be zero at the surface.
+             IF ( use_surface_fluxes )  THEN
+!
+!--             Default-type surfaces, upward-facing
+                surf_s = surf_def_h(0)%start_index(j,i)
+                surf_e = surf_def_h(0)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(0)%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - ( - surf_def_h(0)%usws(m) )                      &
+                          ) * ddzw(k) * drho_air(k)
+                ENDDO
+!
+!--             Default-type surfaces, dowward-facing
+                surf_s = surf_def_h(1)%start_index(j,i)
+                surf_e = surf_def_h(1)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(1)%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - surf_def_h(1)%usws(m)                            &
+                          ) * ddzw(k) * drho_air(k)
+                ENDDO
+!
+!--             Natural-type surfaces, upward-facing
+                surf_s = surf_lsm_h%start_index(j,i)
+                surf_e = surf_lsm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_lsm_h%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - ( - surf_lsm_h%usws(m) )                         &
+                          ) * ddzw(k) * drho_air(k)
+                ENDDO
+!
+!--             Urban-type surfaces, upward-facing
+                surf_s = surf_usm_h%start_index(j,i)
+                surf_e = surf_usm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_usm_h%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                       + ( - ( - surf_usm_h%usws(m) )                          &
+                         ) * ddzw(k) * drho_air(k)
+                ENDDO
+
+             ENDIF
+!
+!--          Add momentum flux at model top
+             IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
+                surf_s = surf_def_h(2)%start_index(j,i)
+                surf_e = surf_def_h(2)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(2)%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - surf_def_h(2)%usws(m) ) * ddzw(k) * drho_air(k)
+                ENDDO
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE diffusion_u
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_u_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, km, tend, u, v, w, drho_air, rho_air_zw
+       
+       USE control_parameters,                                                 &
+           ONLY:  constant_top_momentumflux, use_surface_fluxes,               &
+                  use_top_fluxes
+       
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddx2, ddy
+       
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+      
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, &
+                   surf_usm_v
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  l             !< running index of surface type, south- or north-facing wall
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp)     ::  flag          !< flag to mask topography grid points
+       REAL(wp)     ::  kmym          !< 
+       REAL(wp)     ::  kmyp          !<
+       REAL(wp)     ::  kmzm          !<
+       REAL(wp)     ::  kmzp          !<
+       REAL(wp)     ::  mask_bottom   !< flag to mask vertical upward-facing surface       
+       REAL(wp)     ::  mask_north    !< flag to mask vertical surface north of the grid point 
+       REAL(wp)     ::  mask_south    !< flag to mask vertical surface south of the grid point 
+       REAL(wp)     ::  mask_top      !< flag to mask vertical downward-facing surface 
+! 
+!--    Compute horizontal diffusion
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography and wall-bounded grid points. 
+!--       It is sufficient to masked only north- and south-facing surfaces, which
+!--       need special treatment for the u-component. 
+          flag       = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i),   1 ) ) 
+          mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 1 ) )
+          mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 1 ) )
+!
+!--       Interpolate eddy diffusivities on staggered gridpoints
+          kmyp = 0.25_wp * ( km(k,j,i)+km(k,j+1,i)+km(k,j,i-1)+km(k,j+1,i-1) )
+          kmym = 0.25_wp * ( km(k,j,i)+km(k,j-1,i)+km(k,j,i-1)+km(k,j-1,i-1) )
+
+          tend(k,j,i) = tend(k,j,i)                                            &
+                       + 2.0_wp * (                                            &
+                                 km(k,j,i)   * ( u(k,j,i+1) - u(k,j,i)   )     &
+                               - km(k,j,i-1) * ( u(k,j,i)   - u(k,j,i-1) )     &
+                                   ) * ddx2 * flag                             &
+                                 + (                                           &
+                  mask_north * kmyp * ( ( u(k,j+1,i) - u(k,j,i)     ) * ddy    &
+                                      + ( v(k,j+1,i) - v(k,j+1,i-1) ) * ddx    &
+                                      )                                        &
+                - mask_south * kmym * ( ( u(k,j,i)   - u(k,j-1,i)   ) * ddy    &
+                                      + ( v(k,j,i)   - v(k,j,i-1)   ) * ddx    &
+                                      )                                        &
+                                   ) * ddy  * flag
+       ENDDO
+
+!
+!--    Add horizontal momentum flux u'v' at north- (l=0) and south-facing (l=1)
+!--    surfaces. Note, in the the flat case, loops won't be entered as 
+!--    start_index > end_index. Furtermore, note, no vertical natural surfaces
+!--    so far.           
+!--    Default-type surfaces
+       DO  l = 0, 1
+          surf_s = surf_def_v(l)%start_index(j,i)
+          surf_e = surf_def_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_def_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) + surf_def_v(l)%mom_flux_uv(m) * ddy
+          ENDDO   
+       ENDDO
+!
+!--    Natural-type surfaces
+       DO  l = 0, 1
+          surf_s = surf_lsm_v(l)%start_index(j,i)
+          surf_e = surf_lsm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_lsm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) + surf_lsm_v(l)%mom_flux_uv(m) * ddy
+          ENDDO   
+       ENDDO
+!
+!--    Urban-type surfaces
+       DO  l = 0, 1
+          surf_s = surf_usm_v(l)%start_index(j,i)
+          surf_e = surf_usm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_usm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) + surf_usm_v(l)%mom_flux_uv(m) * ddy
+          ENDDO   
+       ENDDO
+!
+!--    Compute vertical diffusion. In case of simulating a surface layer,
+!--    respective grid diffusive fluxes are masked (flag 8) within this 
+!--    loop, and added further below, else, simple gradient approach is
+!--    applied. Model top is also mask if top-momentum flux is given.
+       DO  k = nzb+1, nzt
+!
+!--       Determine flags to mask topography below and above. Flag 1 is 
+!--       used to mask topography in general, and flag 8 implies 
+!--       information about use_surface_fluxes. Flag 9 is used to control 
+!--       momentum flux at model top. 
+          mask_bottom = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+          mask_top    = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k+1,j,i), 8 ) ) *           &
+                        MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k+1,j,i), 9 ) )
+          flag        = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k,j,i), 1 ) ) 
+!
+!--       Interpolate eddy diffusivities on staggered gridpoints
+          kmzp = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j,i-1)+km(k+1,j,i-1) )
+          kmzm = 0.25_wp * ( km(k,j,i)+km(k-1,j,i)+km(k,j,i-1)+km(k-1,j,i-1) )
+
+          tend(k,j,i) = tend(k,j,i)                                            &
+                        + ( kmzp * ( ( u(k+1,j,i) - u(k,j,i)   ) * ddzu(k+1)   &
+                                   + ( w(k,j,i)   - w(k,j,i-1) ) * ddx         &
+                                   ) * rho_air_zw(k)   * mask_top              &
+                          - kmzm * ( ( u(k,j,i)   - u(k-1,j,i)   ) * ddzu(k)   &
+                                   + ( w(k-1,j,i) - w(k-1,j,i-1) ) * ddx       &
+                                   ) * rho_air_zw(k-1) * mask_bottom           &
+                          ) * ddzw(k) * drho_air(k) * flag
+       ENDDO
+
+!
+!--    Vertical diffusion at the first surface grid points, if the
+!--    momentum flux at the bottom is given by the Prandtl law or if it is
+!--    prescribed by the user.
+!--    Difference quotient of the momentum flux is not formed over half of
+!--    the grid spacing (2.0*ddzw(k)) any more, since the comparison with 
+!--    other (LES) models showed that the values of the momentum flux becomes
+!--    too large in this case.
+       IF ( use_surface_fluxes )  THEN
+!
+!--       Default-type surfaces, upward-facing
+          surf_s = surf_def_h(0)%start_index(j,i)
+          surf_e = surf_def_h(0)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(0)%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - ( - surf_def_h(0)%usws(m) )                      &
+                          ) * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Default-type surfaces, dowward-facing (except for model-top fluxes)
+          surf_s = surf_def_h(1)%start_index(j,i)
+          surf_e = surf_def_h(1)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(1)%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - surf_def_h(1)%usws(m)                            &
+                          ) * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Natural-type surfaces, upward-facing
+          surf_s = surf_lsm_h%start_index(j,i)
+          surf_e = surf_lsm_h%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_lsm_h%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - ( - surf_lsm_h%usws(m) )                         &
+                          ) * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Urban-type surfaces, upward-facing
+          surf_s = surf_usm_h%start_index(j,i)
+          surf_e = surf_usm_h%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_usm_h%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                       + ( - ( - surf_usm_h%usws(m) )                          &
+                         ) * ddzw(k) * drho_air(k)
+          ENDDO
+
+       ENDIF
+!
+!--    Add momentum flux at model top
+       IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
+          surf_s = surf_def_h(2)%start_index(j,i)
+          surf_e = surf_def_h(2)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(2)%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                           + ( - surf_def_h(2)%usws(m) ) * ddzw(k) * drho_air(k)
+          ENDDO
+       ENDIF
+
+
+    END SUBROUTINE diffusion_u_ij
+
+ END MODULE diffusion_u_mod
Index: /palm/tags/release-6.0/SOURCE/diffusion_v.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/diffusion_v.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/diffusion_v.f90	(revision 3477)
@@ -0,0 +1,566 @@
+!> @file diffusion_v.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2638 2017-11-23 12:44:23Z raasch
+! bugfix for constant top momentumflux
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 1740 2016-01-13 08:19:40Z raasch
+! unnecessary calculations of kmzm and kmzp in wall bounded parts removed
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! 
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed, declare create moved after
+! the FORTRAN declaration statement
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator version (*_acc) added
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! arrays comunicated by module instead of parameter list
+!
+! 978 2012-08-09 08:28:32Z fricke
+! outflow damping layer removed
+! kmxm_x/_y and kmxp_x/_y change to kmxm and kmxp
+!
+! Revision 1.1  1997/09/12 06:24:01  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Diffusion term of the v-component
+!------------------------------------------------------------------------------!
+ MODULE diffusion_v_mod
+ 
+
+    PRIVATE
+    PUBLIC diffusion_v
+
+    INTERFACE diffusion_v
+       MODULE PROCEDURE diffusion_v
+       MODULE PROCEDURE diffusion_v_ij
+    END INTERFACE diffusion_v
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_v
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, km, tend, u, v, w, drho_air, rho_air_zw
+       
+       USE control_parameters,                                                 &
+           ONLY:  constant_top_momentumflux, use_surface_fluxes,               &
+                  use_top_fluxes
+       
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy, ddy2
+       
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nysv, nzb, nzt, wall_flags_0
+       
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, &
+                   surf_usm_v
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  l             !< running index of surface type, south- or north-facing wall
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp)     ::  flag          !< flag to mask topography grid points
+       REAL(wp)     ::  kmxm          !< 
+       REAL(wp)     ::  kmxp          !< 
+       REAL(wp)     ::  kmzm          !< 
+       REAL(wp)     ::  kmzp          !< 
+       REAL(wp)     ::  mask_bottom   !< flag to mask vertical upward-facing surface  
+       REAL(wp)     ::  mask_east     !< flag to mask vertical surface south of the grid point 
+       REAL(wp)     ::  mask_west     !< flag to mask vertical surface north of the grid point 
+       REAL(wp)     ::  mask_top      !< flag to mask vertical downward-facing surface      
+
+       DO  i = nxl, nxr
+          DO  j = nysv, nyn
+!
+!--          Compute horizontal diffusion
+             DO  k = nzb+1, nzt
+
+!
+!--             Predetermine flag to mask topography and wall-bounded grid points. 
+!--             It is sufficient to masked only east- and west-facing surfaces, which
+!--             need special treatment for the v-component. 
+                flag      = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i),   2 ) ) 
+                mask_east = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 2 ) )
+                mask_west = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 2 ) )
+!
+!--             Interpolate eddy diffusivities on staggered gridpoints
+                kmxp = 0.25_wp * ( km(k,j,i)+km(k,j,i+1)+km(k,j-1,i)+km(k,j-1,i+1) )
+                kmxm = 0.25_wp * ( km(k,j,i)+km(k,j,i-1)+km(k,j-1,i)+km(k,j-1,i-1) )
+
+                tend(k,j,i) = tend(k,j,i) +    (                             &
+                          mask_east * kmxp * (                               &
+                                 ( v(k,j,i+1) - v(k,j,i)     ) * ddx         &
+                               + ( u(k,j,i+1) - u(k,j-1,i+1) ) * ddy         &
+                                             )                               &
+                        - mask_west * kmxm * (                               &
+                                 ( v(k,j,i) - v(k,j,i-1) ) * ddx             &
+                               + ( u(k,j,i) - u(k,j-1,i) ) * ddy             &
+                                             )                               &
+                                               ) * ddx  * flag               &
+                                    + 2.0_wp * (                             &
+                                  km(k,j,i)   * ( v(k,j+1,i) - v(k,j,i)   )  &
+                                - km(k,j-1,i) * ( v(k,j,i)   - v(k,j-1,i) )  &
+                                               ) * ddy2 * flag
+
+             ENDDO
+
+!
+!--          Add horizontal momentum flux v'u' at east- (l=2) and west-facing (l=3)
+!--          surfaces. Note, in the the flat case, loops won't be entered as 
+!--          start_index > end_index. Furtermore, note, no vertical natural surfaces
+!--          so far.           
+!--          Default-type surfaces
+             DO  l = 2, 3
+                surf_s = surf_def_v(l)%start_index(j,i)
+                surf_e = surf_def_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_def_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                    surf_def_v(l)%mom_flux_uv(m) * ddx
+                ENDDO   
+             ENDDO
+!
+!--          Natural-type surfaces
+             DO  l = 2, 3
+                surf_s = surf_lsm_v(l)%start_index(j,i)
+                surf_e = surf_lsm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_lsm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                    surf_lsm_v(l)%mom_flux_uv(m) * ddx
+                ENDDO   
+             ENDDO
+!
+!--          Urban-type surfaces
+             DO  l = 2, 3
+                surf_s = surf_usm_v(l)%start_index(j,i)
+                surf_e = surf_usm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_usm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                    surf_usm_v(l)%mom_flux_uv(m) * ddx
+                ENDDO   
+             ENDDO
+!
+!--          Compute vertical diffusion. In case of simulating a surface layer,
+!--          respective grid diffusive fluxes are masked (flag 10) within this 
+!--          loop, and added further below, else, simple gradient approach is
+!--          applied. Model top is also mask if top-momentum flux is given. 
+             DO  k = nzb+1, nzt
+!
+!--             Determine flags to mask topography below and above. Flag 2 is 
+!--             used to mask topography in general, while flag 8 implies also
+!--             information about use_surface_fluxes. Flag 9 is used to control 
+!--             momentum flux at model top.  
+                mask_bottom = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+                mask_top    = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k+1,j,i), 8 ) ) *     &
+                              MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k+1,j,i), 9 ) ) 
+                flag        = MERGE( 1.0_wp, 0.0_wp,                           &
+                                     BTEST( wall_flags_0(k,j,i), 2 ) ) 
+!
+!--             Interpolate eddy diffusivities on staggered gridpoints
+                kmzp = 0.25_wp * &
+                       ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) )
+                kmzm = 0.25_wp * &
+                       ( km(k,j,i)+km(k-1,j,i)+km(k,j-1,i)+km(k-1,j-1,i) )
+
+                tend(k,j,i) = tend(k,j,i)                                      &
+                      & + ( kmzp * ( ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)     &
+                      &            + ( w(k,j,i) - w(k,j-1,i) ) * ddy           &
+                      &            ) * rho_air_zw(k)   * mask_top              &
+                      &   - kmzm * ( ( v(k,j,i)   - v(k-1,j,i)   ) * ddzu(k)   &
+                      &            + ( w(k-1,j,i) - w(k-1,j-1,i) ) * ddy       &
+                      &            ) * rho_air_zw(k-1) * mask_bottom           &
+                      &   ) * ddzw(k) * drho_air(k) * flag
+             ENDDO
+
+!
+!--          Vertical diffusion at the first grid point above the surface,
+!--          if the momentum flux at the bottom is given by the Prandtl law
+!--          or if it is prescribed by the user.
+!--          Difference quotient of the momentum flux is not formed over
+!--          half of the grid spacing (2.0*ddzw(k)) any more, since the
+!--          comparison with other (LES) models showed that the values of
+!--          the momentum flux becomes too large in this case.
+             IF ( use_surface_fluxes )  THEN
+!
+!--             Default-type surfaces, upward-facing
+                surf_s = surf_def_h(0)%start_index(j,i)
+                surf_e = surf_def_h(0)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k   = surf_def_h(0)%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - ( - surf_def_h(0)%vsws(m) )                      &
+                          ) * ddzw(k) * drho_air(k)
+                ENDDO
+!
+!--             Default-type surfaces, dowward-facing
+                surf_s = surf_def_h(1)%start_index(j,i)
+                surf_e = surf_def_h(1)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k   = surf_def_h(1)%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - surf_def_h(1)%vsws(m)                            &
+                          ) * ddzw(k) * drho_air(k)
+                ENDDO
+!
+!--             Natural-type surfaces, upward-facing
+                surf_s = surf_lsm_h%start_index(j,i)
+                surf_e = surf_lsm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k   = surf_lsm_h%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - ( - surf_lsm_h%vsws(m) )                         &
+                          ) * ddzw(k) * drho_air(k)
+
+                ENDDO
+!
+!--             Urban-type surfaces, upward-facing
+                surf_s = surf_usm_h%start_index(j,i)
+                surf_e = surf_usm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k   = surf_usm_h%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                        + ( - ( - surf_usm_h%vsws(m) )                         &
+                          ) * ddzw(k) * drho_air(k)
+
+                ENDDO
+             ENDIF
+!
+!--          Add momentum flux at model top
+             IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
+                surf_s = surf_def_h(2)%start_index(j,i)
+                surf_e = surf_def_h(2)%end_index(j,i)
+                DO  m = surf_s, surf_e
+
+                   k   = surf_def_h(2)%k(m)
+
+                   tend(k,j,i) = tend(k,j,i)                                   &
+                           + ( - surf_def_h(2)%vsws(m) ) * ddzw(k) * drho_air(k)
+                ENDDO
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE diffusion_v
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_v_ij( i, j )
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, km, tend, u, v, w, drho_air, rho_air_zw
+       
+       USE control_parameters,                                                 &
+           ONLY:  constant_top_momentumflux, use_surface_fluxes,               &
+                  use_top_fluxes
+       
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy, ddy2
+       
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, wall_flags_0
+       
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h, &
+                   surf_usm_v
+
+       IMPLICIT NONE
+
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  l             !< running index of surface type, south- or north-facing wall
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+
+       REAL(wp)     ::  flag          !< flag to mask topography grid points
+       REAL(wp)     ::  kmxm          !< 
+       REAL(wp)     ::  kmxp          !< 
+       REAL(wp)     ::  kmzm          !< 
+       REAL(wp)     ::  kmzp          !< 
+       REAL(wp)     ::  mask_bottom   !< flag to mask vertical upward-facing surface  
+       REAL(wp)     ::  mask_east     !< flag to mask vertical surface south of the grid point 
+       REAL(wp)     ::  mask_west     !< flag to mask vertical surface north of the grid point 
+       REAL(wp)     ::  mask_top      !< flag to mask vertical downward-facing surface
+
+!
+!--    Compute horizontal diffusion
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography and wall-bounded grid points. 
+!--       It is sufficient to masked only east- and west-facing surfaces, which
+!--       need special treatment for the v-component. 
+          flag      = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i),   2 ) ) 
+          mask_east = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 2 ) )
+          mask_west = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 2 ) )
+!
+!--       Interpolate eddy diffusivities on staggered gridpoints
+          kmxp = 0.25_wp * ( km(k,j,i)+km(k,j,i+1)+km(k,j-1,i)+km(k,j-1,i+1) )
+          kmxm = 0.25_wp * ( km(k,j,i)+km(k,j,i-1)+km(k,j-1,i)+km(k,j-1,i-1) )
+
+          tend(k,j,i) = tend(k,j,i) +          (                             &
+                          mask_east * kmxp * (                               &
+                                 ( v(k,j,i+1) - v(k,j,i)     ) * ddx         &
+                               + ( u(k,j,i+1) - u(k,j-1,i+1) ) * ddy         &
+                                             )                               &
+                        - mask_west * kmxm * (                               &
+                                 ( v(k,j,i) - v(k,j,i-1) ) * ddx             &
+                               + ( u(k,j,i) - u(k,j-1,i) ) * ddy             &
+                                             )                               &
+                                               ) * ddx  * flag               &
+                                    + 2.0_wp * (                             &
+                                  km(k,j,i)   * ( v(k,j+1,i) - v(k,j,i)   )  &
+                                - km(k,j-1,i) * ( v(k,j,i)   - v(k,j-1,i) )  &
+                                               ) * ddy2 * flag
+       ENDDO
+
+!
+!--    Add horizontal momentum flux v'u' at east- (l=2) and west-facing (l=3)
+!--    surfaces. Note, in the the flat case, loops won't be entered as 
+!--    start_index > end_index. Furtermore, note, no vertical natural surfaces
+!--    so far.           
+!--    Default-type surfaces
+       DO  l = 2, 3
+          surf_s = surf_def_v(l)%start_index(j,i)
+          surf_e = surf_def_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_def_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) + surf_def_v(l)%mom_flux_uv(m) * ddx
+          ENDDO   
+       ENDDO
+!
+!--    Natural-type surfaces
+       DO  l = 2, 3
+          surf_s = surf_lsm_v(l)%start_index(j,i)
+          surf_e = surf_lsm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_lsm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) + surf_lsm_v(l)%mom_flux_uv(m) * ddx
+          ENDDO   
+       ENDDO
+!
+!--    Urban-type surfaces
+       DO  l = 2, 3
+          surf_s = surf_usm_v(l)%start_index(j,i)
+          surf_e = surf_usm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_usm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) + surf_usm_v(l)%mom_flux_uv(m) * ddx
+          ENDDO   
+       ENDDO
+!
+!--    Compute vertical diffusion. In case of simulating a surface layer,
+!--    respective grid diffusive fluxes are masked (flag 8) within this 
+!--    loop, and added further below, else, simple gradient approach is
+!--    applied. Model top is also mask if top-momentum flux is given.
+       DO  k = nzb+1, nzt
+!
+!--       Determine flags to mask topography below and above. Flag 2 is 
+!--       used to mask topography in general, while flag 10 implies also
+!--       information about use_surface_fluxes. Flag 9 is used to control 
+!--       momentum flux at model top.  
+          mask_bottom = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k-1,j,i), 8 ) ) 
+          mask_top    = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k+1,j,i), 8 ) ) *           &
+                        MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k+1,j,i), 9 ) ) 
+          flag        = MERGE( 1.0_wp, 0.0_wp,                                 &
+                               BTEST( wall_flags_0(k,j,i), 2 ) )
+!
+!--       Interpolate eddy diffusivities on staggered gridpoints
+          kmzp = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) )
+          kmzm = 0.25_wp * ( km(k,j,i)+km(k-1,j,i)+km(k,j-1,i)+km(k-1,j-1,i) )
+
+          tend(k,j,i) = tend(k,j,i)                                            &
+                      & + ( kmzp * ( ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)     &
+                      &            + ( w(k,j,i) - w(k,j-1,i) ) * ddy           &
+                      &            ) * rho_air_zw(k)   * mask_top              &
+                      &   - kmzm * ( ( v(k,j,i)   - v(k-1,j,i)   ) * ddzu(k)   &
+                      &            + ( w(k-1,j,i) - w(k-1,j-1,i) ) * ddy       &
+                      &            ) * rho_air_zw(k-1) * mask_bottom           &
+                      &   ) * ddzw(k) * drho_air(k) * flag
+       ENDDO
+
+!
+!--    Vertical diffusion at the first grid point above the surface, if the
+!--    momentum flux at the bottom is given by the Prandtl law or if it is
+!--    prescribed by the user.
+!--    Difference quotient of the momentum flux is not formed over half of
+!--    the grid spacing (2.0*ddzw(k)) any more, since the comparison with 
+!--    other (LES) models showed that the values of the momentum flux becomes
+!--    too large in this case.
+       IF ( use_surface_fluxes )  THEN
+!
+!--       Default-type surfaces, upward-facing
+          surf_s = surf_def_h(0)%start_index(j,i)
+          surf_e = surf_def_h(0)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k   = surf_def_h(0)%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - ( - surf_def_h(0)%vsws(m) )                      &
+                          ) * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Default-type surfaces, dowward-facing
+          surf_s = surf_def_h(1)%start_index(j,i)
+          surf_e = surf_def_h(1)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k   = surf_def_h(1)%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - surf_def_h(1)%vsws(m)                            &
+                          ) * ddzw(k) * drho_air(k)
+          ENDDO
+!
+!--       Natural-type surfaces, upward-facing
+          surf_s = surf_lsm_h%start_index(j,i)
+          surf_e = surf_lsm_h%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k   = surf_lsm_h%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - ( - surf_lsm_h%vsws(m) )                         &
+                          ) * ddzw(k) * drho_air(k)
+
+          ENDDO
+!
+!--       Urban-type surfaces, upward-facing
+          surf_s = surf_usm_h%start_index(j,i)
+          surf_e = surf_usm_h%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k   = surf_usm_h%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                        + ( - ( - surf_usm_h%vsws(m) )                         &
+                          ) * ddzw(k) * drho_air(k)
+
+          ENDDO
+       ENDIF
+!
+!--    Add momentum flux at model top
+       IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
+          surf_s = surf_def_h(2)%start_index(j,i)
+          surf_e = surf_def_h(2)%end_index(j,i)
+          DO  m = surf_s, surf_e
+
+             k   = surf_def_h(2)%k(m)
+
+             tend(k,j,i) = tend(k,j,i)                                         &
+                           + ( - surf_def_h(2)%vsws(m) ) * ddzw(k) * drho_air(k)
+          ENDDO
+       ENDIF
+
+    END SUBROUTINE diffusion_v_ij
+
+ END MODULE diffusion_v_mod
Index: /palm/tags/release-6.0/SOURCE/diffusion_w.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/diffusion_w.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/diffusion_w.f90	(revision 3477)
@@ -0,0 +1,457 @@
+!> @file diffusion_w.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! vsws + vswst removed from acc-present-list
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed, declare create moved after
+! the FORTRAN declaration statement
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! accelerator version (*_acc) added
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! arrays comunicated by module instead of parameter list
+!
+! 978 2012-08-09 08:28:32Z fricke
+! outflow damping layer removed
+! kmxm_x/_z and kmxp_x/_z change to kmxm and kmxp
+! kmym_y/_z and kmyp_y/_z change to kmym and kmyp
+!
+! Revision 1.1  1997/09/12 06:24:11  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Diffusion term of the w-component
+!------------------------------------------------------------------------------!
+ MODULE diffusion_w_mod
+ 
+
+    PRIVATE
+    PUBLIC diffusion_w
+
+    INTERFACE diffusion_w
+       MODULE PROCEDURE diffusion_w
+       MODULE PROCEDURE diffusion_w_ij
+    END INTERFACE diffusion_w
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_w
+
+       USE arrays_3d,                                                          &          
+           ONLY :  ddzu, ddzw, km, tend, u, v, w, drho_air_zw, rho_air
+           
+       USE grid_variables,                                                     &     
+           ONLY :  ddx, ddy
+           
+       USE indices,                                                            &            
+           ONLY :  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+           
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_v, surf_lsm_v, surf_usm_v
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  l             !< running index of surface type, south- or north-facing wall
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+       
+       REAL(wp) ::  flag              !< flag to mask topography grid points
+       REAL(wp) ::  kmxm              !<
+       REAL(wp) ::  kmxp              !<
+       REAL(wp) ::  kmym              !<
+       REAL(wp) ::  kmyp              !< 
+       REAL(wp) ::  mask_west         !< flag to mask vertical wall west of the grid point
+       REAL(wp) ::  mask_east         !< flag to mask vertical wall east of the grid point 
+       REAL(wp) ::  mask_south        !< flag to mask vertical wall south of the grid point 
+       REAL(wp) ::  mask_north        !< flag to mask vertical wall north of the grid point 
+
+
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt-1
+!
+!--             Predetermine flag to mask topography and wall-bounded grid points. 
+                flag       = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i),   3 ) ) 
+                mask_east  = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i+1), 3 ) )
+                mask_west  = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i-1), 3 ) )
+                mask_south = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j-1,i), 3 ) )
+                mask_north = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j+1,i), 3 ) )
+!
+!--             Interpolate eddy diffusivities on staggered gridpoints
+                kmxp = 0.25_wp * ( km(k,j,i)   +   km(k,j,i+1) +               &
+                                   km(k+1,j,i) + km(k+1,j,i+1) )
+                kmxm = 0.25_wp * ( km(k,j,i)   + km(k,j,i-1)   +               &
+                                   km(k+1,j,i) + km(k+1,j,i-1) )
+                kmyp = 0.25_wp * ( km(k,j,i)   + km(k+1,j,i)   +               &
+                                   km(k,j+1,i) + km(k+1,j+1,i) )
+                kmym = 0.25_wp * ( km(k,j,i)   + km(k+1,j,i)   +               &
+                                   km(k,j-1,i) + km(k+1,j-1,i) )
+
+                tend(k,j,i) = tend(k,j,i)                                      &
+                       + ( mask_east *  kmxp * (                               &
+                                   ( w(k,j,i+1)   - w(k,j,i)   ) * ddx         &
+                                 + ( u(k+1,j,i+1) - u(k,j,i+1) ) * ddzu(k+1)   &
+                                               )                               &
+                         - mask_west * kmxm *  (                               &
+                                   ( w(k,j,i)     - w(k,j,i-1) ) * ddx         &
+                                 + ( u(k+1,j,i)   - u(k,j,i)   ) * ddzu(k+1)   &
+                                               )                               &
+                         ) * ddx                                 * flag        &
+                       + ( mask_north * kmyp * (                               &
+                                   ( w(k,j+1,i)   - w(k,j,i)   ) * ddy         &
+                                 + ( v(k+1,j+1,i) - v(k,j+1,i) ) * ddzu(k+1)   &
+                                               )                               &
+                         - mask_south * kmym * (                               &
+                                   ( w(k,j,i)     - w(k,j-1,i) ) * ddy         &
+                                 + ( v(k+1,j,i)   - v(k,j,i)   ) * ddzu(k+1)   &
+                                               )                               &
+                         ) * ddy                                 * flag        &
+                       + 2.0_wp * (                                            &
+                         km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) )   * ddzw(k+1) &
+                                     * rho_air(k+1)                            &
+                       - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k)   &
+                                     * rho_air(k)                              &
+                                  ) * ddzu(k+1) * drho_air_zw(k) * flag
+             ENDDO
+
+!
+!--          Add horizontal momentum flux v'w' at north- (l=0) and south-facing (l=1)
+!--          surfaces. Note, in the the flat case, loops won't be entered as 
+!--          start_index > end_index. Furtermore, note, no vertical natural surfaces
+!--          so far.           
+!--          Default-type surfaces
+             DO  l = 0, 1
+                surf_s = surf_def_v(l)%start_index(j,i)
+                surf_e = surf_def_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_def_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                     surf_def_v(l)%mom_flux_w(m) * ddy
+                ENDDO   
+             ENDDO
+!
+!--          Natural-type surfaces
+             DO  l = 0, 1
+                surf_s = surf_lsm_v(l)%start_index(j,i)
+                surf_e = surf_lsm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_lsm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                     surf_lsm_v(l)%mom_flux_w(m) * ddy
+                ENDDO   
+             ENDDO
+!
+!--          Urban-type surfaces
+             DO  l = 0, 1
+                surf_s = surf_usm_v(l)%start_index(j,i)
+                surf_e = surf_usm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_usm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                     surf_usm_v(l)%mom_flux_w(m) * ddy
+                ENDDO   
+             ENDDO
+!
+!--          Add horizontal momentum flux u'w' at east- (l=2) and west-facing (l=3)
+!--          surface.
+!--          Default-type surfaces
+             DO  l = 2, 3
+                surf_s = surf_def_v(l)%start_index(j,i)
+                surf_e = surf_def_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_def_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                     surf_def_v(l)%mom_flux_w(m) * ddx
+                ENDDO   
+             ENDDO
+!
+!--          Natural-type surfaces
+             DO  l = 2, 3
+                surf_s = surf_lsm_v(l)%start_index(j,i)
+                surf_e = surf_lsm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_lsm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                     surf_lsm_v(l)%mom_flux_w(m) * ddx
+                ENDDO   
+             ENDDO
+!
+!--          Urban-type surfaces
+             DO  l = 2, 3
+                surf_s = surf_usm_v(l)%start_index(j,i)
+                surf_e = surf_usm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_usm_v(l)%k(m)
+                   tend(k,j,i) = tend(k,j,i) +                                 &
+                                     surf_usm_v(l)%mom_flux_w(m) * ddx
+                ENDDO   
+             ENDDO
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE diffusion_w
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE diffusion_w_ij( i, j )
+
+       USE arrays_3d,                                                          &          
+           ONLY :  ddzu, ddzw, km, tend, u, v, w, drho_air_zw, rho_air
+           
+       USE grid_variables,                                                     &     
+           ONLY :  ddx, ddy
+           
+       USE indices,                                                            &            
+           ONLY :  nzb, nzt, wall_flags_0
+           
+       USE kinds
+
+       USE surface_mod,                                                        &
+           ONLY :  surf_def_v, surf_lsm_v, surf_usm_v
+
+       IMPLICIT NONE
+
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  l             !< running index of surface type, south- or north-facing wall
+       INTEGER(iwp) ::  m             !< running index surface elements
+       INTEGER(iwp) ::  surf_e        !< End index of surface elements at (j,i)-gridpoint
+       INTEGER(iwp) ::  surf_s        !< Start index of surface elements at (j,i)-gridpoint
+       
+       REAL(wp) ::  flag              !< flag to mask topography grid points
+       REAL(wp) ::  kmxm              !<
+       REAL(wp) ::  kmxp              !<
+       REAL(wp) ::  kmym              !<
+       REAL(wp) ::  kmyp              !< 
+       REAL(wp) ::  mask_west         !< flag to mask vertical wall west of the grid point
+       REAL(wp) ::  mask_east         !< flag to mask vertical wall east of the grid point 
+       REAL(wp) ::  mask_south        !< flag to mask vertical wall south of the grid point 
+       REAL(wp) ::  mask_north        !< flag to mask vertical wall north of the grid point 
+
+
+       DO  k = nzb+1, nzt-1
+!
+!--       Predetermine flag to mask topography and wall-bounded grid points. 
+          flag       = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i),   3 ) ) 
+          mask_east  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i+1), 3 ) )
+          mask_west  = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i-1), 3 ) )
+          mask_south = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j-1,i), 3 ) )
+          mask_north = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j+1,i), 3 ) )
+!
+!--       Interpolate eddy diffusivities on staggered gridpoints
+          kmxp = 0.25_wp * ( km(k,j,i)+km(k,j,i+1)+km(k+1,j,i)+km(k+1,j,i+1) )
+          kmxm = 0.25_wp * ( km(k,j,i)+km(k,j,i-1)+km(k+1,j,i)+km(k+1,j,i-1) )
+          kmyp = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j+1,i)+km(k+1,j+1,i) )
+          kmym = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) )
+
+          tend(k,j,i) = tend(k,j,i)                                            &
+                       + ( mask_east *  kmxp * (                               &
+                                   ( w(k,j,i+1)   - w(k,j,i)   ) * ddx         &
+                                 + ( u(k+1,j,i+1) - u(k,j,i+1) ) * ddzu(k+1)   &
+                                               )                               &
+                         - mask_west * kmxm *  (                               &
+                                   ( w(k,j,i)     - w(k,j,i-1) ) * ddx         &
+                                 + ( u(k+1,j,i)   - u(k,j,i)   ) * ddzu(k+1)   &
+                                               )                               &
+                         ) * ddx                                 * flag        &
+                       + ( mask_north * kmyp * (                               &
+                                   ( w(k,j+1,i)   - w(k,j,i)   ) * ddy         &
+                                 + ( v(k+1,j+1,i) - v(k,j+1,i) ) * ddzu(k+1)   &
+                                               )                               &
+                         - mask_south * kmym * (                               &
+                                   ( w(k,j,i)     - w(k,j-1,i) ) * ddy         &
+                                 + ( v(k+1,j,i)   - v(k,j,i)   ) * ddzu(k+1)   &
+                                               )                               &
+                         ) * ddy                                 * flag        &
+                       + 2.0_wp * (                                            &
+                         km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1)   &
+                                     * rho_air(k+1)                            &
+                       - km(k,j,i)   * ( w(k,j,i)   - w(k-1,j,i) ) * ddzw(k)   &
+                                     * rho_air(k)                              &
+                                  ) * ddzu(k+1) * drho_air_zw(k) * flag
+       ENDDO
+!
+!--    Add horizontal momentum flux v'w' at north- (l=0) and south-facing (l=1)
+!--    surfaces. Note, in the the flat case, loops won't be entered as 
+!--    start_index > end_index. Furtermore, note, no vertical natural surfaces
+!--    so far.           
+!--    Default-type surfaces
+       DO  l = 0, 1
+          surf_s = surf_def_v(l)%start_index(j,i)
+          surf_e = surf_def_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_def_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                                     surf_def_v(l)%mom_flux_w(m) * ddy
+          ENDDO   
+       ENDDO
+!
+!--    Natural-type surfaces
+       DO  l = 0, 1
+          surf_s = surf_lsm_v(l)%start_index(j,i)
+          surf_e = surf_lsm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_lsm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                                     surf_lsm_v(l)%mom_flux_w(m) * ddy
+          ENDDO   
+       ENDDO
+!
+!--    Urban-type surfaces
+       DO  l = 0, 1
+          surf_s = surf_usm_v(l)%start_index(j,i)
+          surf_e = surf_usm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_usm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                                     surf_usm_v(l)%mom_flux_w(m) * ddy
+          ENDDO   
+       ENDDO
+!
+!--    Add horizontal momentum flux u'w' at east- (l=2) and west-facing (l=3)
+!--    surfaces. 
+!--    Default-type surfaces
+       DO  l = 2, 3
+          surf_s = surf_def_v(l)%start_index(j,i)
+          surf_e = surf_def_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_def_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                                     surf_def_v(l)%mom_flux_w(m) * ddx
+          ENDDO   
+       ENDDO
+!
+!--    Natural-type surfaces
+       DO  l = 2, 3
+          surf_s = surf_lsm_v(l)%start_index(j,i)
+          surf_e = surf_lsm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_lsm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                                     surf_lsm_v(l)%mom_flux_w(m) * ddx
+          ENDDO   
+       ENDDO
+!
+!--    Urban-type surfaces
+       DO  l = 2, 3
+          surf_s = surf_usm_v(l)%start_index(j,i)
+          surf_e = surf_usm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_usm_v(l)%k(m)
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                                     surf_usm_v(l)%mom_flux_w(m) * ddx
+          ENDDO   
+       ENDDO
+
+
+    END SUBROUTINE diffusion_w_ij
+
+ END MODULE diffusion_w_mod
Index: /palm/tags/release-6.0/SOURCE/disturb_field.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/disturb_field.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/disturb_field.f90	(revision 3477)
@@ -0,0 +1,270 @@
+!> @file disturb_field.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2300 2017-06-29 13:31:14Z raasch
+! NEC related code removed
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Modify referenced parameter for disturb_field, instead of nzb_uv_inner, pass
+! character to identify the respective grid (u- or v-grid). 
+! Set perturbations within topography to zero using flags.
+! 
+! 2172 2017-03-08 15:55:25Z knoop
+! Bugfix removed id_random_array from USE list
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1425 2014-07-05 10:57:53Z knoop
+! bugfix: Parallel random number generator loop: print-statement no needed
+! 
+! 1400 2014-05-09 14:03:54Z knoop
+! Parallel random number generator added
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1998/02/04 15:40:45  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Imposing a random perturbation on a 3D-array.
+!> On parallel computers, the random number generator is as well called for all
+!> gridpoints of the total domain to ensure, regardless of the number of PEs
+!> used, that the elements of the array have the same values in the same
+!> order in every case. The perturbation range is steered by dist_range.
+!------------------------------------------------------------------------------!
+ SUBROUTINE disturb_field( var_char, dist1, field )
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  dist_nxl, dist_nxr, dist_nyn, dist_nys, dist_range,             &
+               disturbance_amplitude, disturbance_created,                     &
+               disturbance_level_ind_b, disturbance_level_ind_t, iran,         &
+               random_generator, topography
+                
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+        
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max, &
+               nzt, wall_flags_0
+        
+    USE kinds
+    
+    USE random_function_mod,                                                   &
+        ONLY: random_function
+        
+    USE random_generator_parallel,                                             &
+        ONLY:  random_number_parallel, random_seed_parallel, random_dummy,     &
+               seq_random_array
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN = *) ::  var_char !< flag to distinguish betwenn u- and v-component
+
+    INTEGER(iwp) ::  flag_nr !< number of respective flag for u- or v-grid 
+    INTEGER(iwp) ::  i       !< index variable
+    INTEGER(iwp) ::  j       !< index variable
+    INTEGER(iwp) ::  k       !< index variable
+
+    REAL(wp) ::  randomnumber  !<
+    
+    REAL(wp) ::  dist1(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !<
+    REAL(wp) ::  field(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !<
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  dist2  !<
+
+
+    CALL cpu_log( log_point(20), 'disturb_field', 'start' )
+!
+!-- Set flag number, 20 for u-grid, 21 for v-grid, required to mask topography
+    flag_nr = MERGE( 20, 21, TRIM(var_char) == 'u' )
+!
+!-- Create an additional temporary array and initialize the arrays needed
+!-- to store the disturbance
+    ALLOCATE( dist2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    dist1 = 0.0_wp
+    dist2 = 0.0_wp
+
+!
+!-- Create the random perturbation and store it on temporary array
+    IF ( random_generator == 'numerical-recipes' )  THEN
+       DO  i = dist_nxl(dist_range), dist_nxr(dist_range)
+          DO  j = dist_nys(dist_range), dist_nyn(dist_range)
+             DO  k = disturbance_level_ind_b, disturbance_level_ind_t
+                randomnumber = 3.0_wp * disturbance_amplitude *                &
+                               ( random_function( iran ) - 0.5_wp )
+                IF ( nxl <= i  .AND.  nxr >= i  .AND.  nys <= j  .AND.         &
+                     nyn >= j )                                                &
+                THEN
+                   dist1(k,j,i) = randomnumber
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ELSEIF ( random_generator == 'random-parallel' )  THEN
+       DO  i = dist_nxl(dist_range), dist_nxr(dist_range)
+          DO  j = dist_nys(dist_range), dist_nyn(dist_range)
+             CALL random_seed_parallel( put=seq_random_array(:, j, i) )
+             DO  k = disturbance_level_ind_b, disturbance_level_ind_t
+                CALL random_number_parallel( random_dummy )
+                randomnumber = 3.0_wp * disturbance_amplitude *                &
+                               ( random_dummy - 0.5_wp )
+                IF ( nxl <= i  .AND.  nxr >= i  .AND.  nys <= j  .AND.         &
+                     nyn >= j )                                                &
+                THEN
+                   dist1(k,j,i) = randomnumber
+                ENDIF
+             ENDDO
+             CALL random_seed_parallel( get=seq_random_array(:, j, i) )
+          ENDDO
+       ENDDO
+    ELSEIF ( random_generator == 'system-specific' )  THEN
+       DO  i = dist_nxl(dist_range), dist_nxr(dist_range)
+          DO  j = dist_nys(dist_range), dist_nyn(dist_range)
+             DO  k = disturbance_level_ind_b, disturbance_level_ind_t
+                CALL RANDOM_NUMBER( randomnumber )
+                randomnumber = 3.0_wp * disturbance_amplitude *                &
+                                ( randomnumber - 0.5_wp )
+                IF ( nxl <= i .AND. nxr >= i .AND. nys <= j .AND. nyn >= j )   &
+                THEN
+                   dist1(k,j,i) = randomnumber
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+!
+!-- Exchange of ghost points for the random perturbation
+
+    CALL exchange_horiz( dist1, nbgp )
+!
+!-- Applying the Shuman filter in order to smooth the perturbations.
+!-- Neighboured grid points in all three directions are used for the
+!-- filter operation.
+!-- Loop has been splitted to make runs reproducible on HLRN systems using
+!-- compiler option -O3
+     DO  i = nxl, nxr
+        DO  j = nys, nyn
+          DO  k = disturbance_level_ind_b-1, disturbance_level_ind_t+1
+             dist2(k,j,i) = ( dist1(k,j,i-1) + dist1(k,j,i+1)                  &
+                            + dist1(k,j+1,i) + dist1(k+1,j,i)                  &
+                            ) / 12.0_wp
+          ENDDO
+          DO  k = disturbance_level_ind_b-1, disturbance_level_ind_t+1
+              dist2(k,j,i) = dist2(k,j,i) + ( dist1(k,j-1,i) + dist1(k-1,j,i)  &
+                            + 6.0_wp * dist1(k,j,i)                            &
+                            ) / 12.0_wp
+          ENDDO
+        ENDDO
+     ENDDO
+
+!
+!-- Exchange of ghost points for the filtered perturbation.
+!-- Afterwards, filter operation and exchange of ghost points are repeated.
+    CALL exchange_horiz( dist2, nbgp )
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = disturbance_level_ind_b-2, disturbance_level_ind_t+2
+             dist1(k,j,i) = ( dist2(k,j,i-1) + dist2(k,j,i+1) + dist2(k,j-1,i) &
+                            + dist2(k,j+1,i) + dist2(k+1,j,i) + dist2(k-1,j,i) &
+                            + 6.0_wp * dist2(k,j,i)                            &
+                            ) / 12.0_wp
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CALL exchange_horiz( dist1, nbgp )
+
+!
+!-- Remove perturbations below topography (including one gridpoint above it
+!-- in order to allow for larger timesteps at the beginning of the simulation
+!-- (diffusion criterion))
+    IF ( TRIM( topography ) /= 'flat' )  THEN
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb, nzb_max
+                dist1(k,j,i) = MERGE( dist1(k,j,i), 0.0_wp,                    &
+                                      BTEST( wall_flags_0(k,j,i), flag_nr )    &
+                                    )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Random perturbation is added to the array to be disturbed.
+    DO  i = nxlg, nxrg
+       DO  j = nysg, nyng
+          DO  k = disturbance_level_ind_b-2, disturbance_level_ind_t+2
+             field(k,j,i) = field(k,j,i) + dist1(k,j,i)
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Deallocate the temporary array
+    DEALLOCATE( dist2 )
+
+!
+!-- Set a flag, which indicates that a random perturbation is imposed
+    disturbance_created = .TRUE.
+
+
+    CALL cpu_log( log_point(20), 'disturb_field', 'stop' )
+
+
+ END SUBROUTINE disturb_field
Index: /palm/tags/release-6.0/SOURCE/disturb_heatflux.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/disturb_heatflux.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/disturb_heatflux.f90	(revision 3477)
@@ -0,0 +1,168 @@
+!> @file disturb_heatflux.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variable removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustment according new surface data type.
+! Implemented parallel random number generator to obtain always the same 
+! random number distribution regardless of the processor distribution.
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1998/03/25 20:03:47  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Generate random, normally distributed heatflux values and store them as the
+!> near-surface heatflux.
+!------------------------------------------------------------------------------!
+ SUBROUTINE disturb_heatflux( surf )
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  heatflux_input_conversion
+        
+    USE control_parameters,                                                    &
+        ONLY:  iran, surface_heatflux, random_generator, wall_heatflux
+        
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+        
+    USE kinds
+    
+    USE indices,                                                               &
+        ONLY:  nzb
+
+    USE random_generator_parallel,                                             &
+        ONLY:  random_number_parallel, random_seed_parallel, random_dummy,     &
+               seq_random_array
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_type
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< grid index, x direction
+    INTEGER(iwp) ::  j  !< grid index, y direction
+    INTEGER(iwp) ::  k  !< grid index, z direction
+    INTEGER(iwp) ::  m  !< loop variables over surface elements
+    
+    REAL(wp) ::  random_gauss  !<
+    REAL(wp) ::  randomnumber  !<
+
+    TYPE(surf_type) ::  surf   !< surface-type variable
+
+
+    CALL cpu_log( log_point(23), 'disturb_heatflux', 'start' )
+
+!
+!-- Generate random disturbances and store them. Note, if 
+!-- random_generator /= 'random-parallel' it is not guaranteed to obtain  
+!-- the same random distribution if the number of processors is changed. 
+    IF ( random_generator /= 'random-parallel' )  THEN
+
+       DO  m = 1, surf%ns
+
+          k = surf%k(m)
+
+          randomnumber = random_gauss( iran, 5.0_wp )      
+!
+!--       k-1 is topography top index. If this is 0, set surface heatflux. Over
+!--       topography surface_heatflux is replaced by wall_heatflux(0).
+          IF ( k-1 == 0 )  THEN
+             surf%shf(m) = randomnumber * surface_heatflux                     &
+                              * heatflux_input_conversion(nzb)
+          ELSE
+             surf%shf(m) = randomnumber * wall_heatflux(0)                     &
+                              * heatflux_input_conversion(k-1)
+          ENDIF
+       ENDDO
+    ELSE
+
+       DO  m = 1, surf%ns
+
+          i = surf%i(m)
+          j = surf%j(m)
+          k = surf%k(m)
+
+          CALL random_seed_parallel( put=seq_random_array(:, j, i) )
+          CALL random_number_parallel( random_dummy )    
+!
+!--       k-1 is topography top index. If this is 0, set surface heatflux. Over
+!--       topography surface_heatflux is replaced by wall_heatflux(0).
+          IF ( k-1 == 0 )  THEN
+             surf%shf(m) = ( random_dummy - 0.5_wp ) * surface_heatflux        &
+                              * heatflux_input_conversion(nzb)
+          ELSE
+             surf%shf(m) = ( random_dummy - 0.5_wp ) * wall_heatflux(0)        &
+                              * heatflux_input_conversion(k-1)
+          ENDIF
+
+          CALL random_seed_parallel( get=seq_random_array(:, j, i) )
+
+       ENDDO
+
+    ENDIF
+
+    CALL cpu_log( log_point(23), 'disturb_heatflux', 'stop' )
+
+
+ END SUBROUTINE disturb_heatflux
Index: /palm/tags/release-6.0/SOURCE/exchange_horiz.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/exchange_horiz.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/exchange_horiz.f90	(revision 3477)
@@ -0,0 +1,369 @@
+!> @file exchange_horiz.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! 3D-Integer exchange on multigrid level (MS)
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! sendrecv_in_background related parts removed
+! 
+! 2119 2017-01-17 16:51:50Z raasch
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related code removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1677 2015-10-02 13:25:23Z boeske
+! Added new routine for exchange of three-dimensional integer arrays
+!
+! 1569 2015-03-12 07:54:38Z raasch
+! bugfix in background communication part
+!
+! 1348 2014-03-27 18:01:03Z raasch
+! bugfix: on_device added to ONLY-list
+!
+! 1344 2014-03-26 17:33:09Z kanani
+! Added missing parameters to ONLY-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! modifications for asynchronous transfer,
+! local variables req, wait_stat are global now, and have been moved to module
+! pegrid
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! GPU-porting for single-core (1PE) mode
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 841 2012-02-28 12:29:49Z maronga
+! Excluded routine from compilation of namelist_file_check
+!
+! Revision 1.1  1997/07/24 11:13:29  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Exchange of lateral boundary values (parallel computers) and cyclic
+!> lateral boundary conditions, respectively.
+!------------------------------------------------------------------------------!
+ SUBROUTINE exchange_horiz( ar, nbgp_local)
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, grid_level, mg_switch_to_pe0,             &
+               synchronous_exchange
+                
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+        
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+        
+    USE kinds
+    
+    USE pegrid
+
+    IMPLICIT NONE
+
+
+    INTEGER(iwp) ::  nbgp_local  !<
+    
+    REAL(wp), DIMENSION(nzb:nzt+1,nys-nbgp_local:nyn+nbgp_local,               &
+                        nxl-nbgp_local:nxr+nbgp_local) ::  ar  !<
+                        
+
+    CALL cpu_log( log_point_s(2), 'exchange_horiz', 'start' )
+
+#if defined( __parallel )
+
+!
+!-- Exchange in x-direction of lateral boundaries
+    IF ( pdims(1) == 1  .OR.  mg_switch_to_pe0 )  THEN
+!
+!--    One-dimensional decomposition along y, boundary values can be exchanged
+!--    within the PE memory
+       IF ( bc_lr_cyc )  THEN
+          ar(:,:,nxl-nbgp_local:nxl-1) = ar(:,:,nxr-nbgp_local+1:nxr)
+          ar(:,:,nxr+1:nxr+nbgp_local) = ar(:,:,nxl:nxl+nbgp_local-1)
+       ENDIF
+
+    ELSE
+
+       IF ( synchronous_exchange )  THEN
+!
+!--       Send left boundary, receive right one (synchronous)
+          CALL MPI_SENDRECV(                                                   &
+              ar(nzb,nys-nbgp_local,nxl),   1, type_yz(grid_level), pleft,  0, &
+              ar(nzb,nys-nbgp_local,nxr+1), 1, type_yz(grid_level), pright, 0, &
+              comm2d, status, ierr )
+!
+!--       Send right boundary, receive left one (synchronous)
+          CALL MPI_SENDRECV( ar(nzb,nys-nbgp_local,nxr+1-nbgp_local), 1,       &
+                             type_yz(grid_level), pright, 1,                   &
+                             ar(nzb,nys-nbgp_local,nxl-nbgp_local), 1,         &
+                             type_yz(grid_level), pleft,  1,                   &
+                             comm2d, status, ierr )
+
+       ELSE
+
+!
+!--       Asynchroneous exchange
+          IF ( send_receive == 'lr'  .OR.  send_receive == 'al' )  THEN
+
+             req(1:4)  = 0
+             req_count = 0
+!
+!--          Send left boundary, receive right one (asynchronous)
+             CALL MPI_ISEND( ar(nzb,nys-nbgp_local,nxl),   1, type_yz(grid_level), &
+                             pleft, req_count, comm2d, req(req_count+1), ierr )
+             CALL MPI_IRECV( ar(nzb,nys-nbgp_local,nxr+1), 1, type_yz(grid_level), &
+                             pright, req_count, comm2d, req(req_count+2), ierr )
+!
+!--          Send right boundary, receive left one (asynchronous)
+             CALL MPI_ISEND( ar(nzb,nys-nbgp_local,nxr+1-nbgp_local), 1,       &
+                             type_yz(grid_level), pright, req_count+1, comm2d, &
+                             req(req_count+3), ierr )
+             CALL MPI_IRECV( ar(nzb,nys-nbgp_local,nxl-nbgp_local),   1,       &
+                             type_yz(grid_level), pleft,  req_count+1, comm2d, &
+                             req(req_count+4), ierr )
+
+             CALL MPI_WAITALL( 4, req, wait_stat, ierr )
+
+          ENDIF
+
+       ENDIF
+
+    ENDIF
+
+
+    IF ( pdims(2) == 1  .OR.  mg_switch_to_pe0 )  THEN
+!
+!--    One-dimensional decomposition along x, boundary values can be exchanged
+!--    within the PE memory
+       IF ( bc_ns_cyc )  THEN
+          ar(:,nys-nbgp_local:nys-1,:) = ar(:,nyn-nbgp_local+1:nyn,:)
+          ar(:,nyn+1:nyn+nbgp_local,:) = ar(:,nys:nys+nbgp_local-1,:)
+       ENDIF
+
+    ELSE
+
+       IF ( synchronous_exchange )  THEN
+!
+!--       Send front boundary, receive rear one (synchronous)
+          CALL MPI_SENDRECV(                                                   &
+              ar(nzb,nys,nxl-nbgp_local),   1, type_xz(grid_level), psouth, 0, &
+              ar(nzb,nyn+1,nxl-nbgp_local), 1, type_xz(grid_level), pnorth, 0, &
+              comm2d, status, ierr )
+!
+!--       Send rear boundary, receive front one (synchronous)
+          CALL MPI_SENDRECV( ar(nzb,nyn-nbgp_local+1,nxl-nbgp_local), 1,       &
+                             type_xz(grid_level), pnorth, 1,                   &
+                             ar(nzb,nys-nbgp_local,nxl-nbgp_local),   1,       &
+                             type_xz(grid_level), psouth, 1,                   &
+                             comm2d, status, ierr )
+
+       ELSE
+
+!
+!--       Asynchroneous exchange
+          IF ( send_receive == 'ns'  .OR.  send_receive == 'al' )  THEN
+
+             req(1:4)  = 0
+             req_count = 0
+
+!
+!--          Send front boundary, receive rear one (asynchronous)
+             CALL MPI_ISEND( ar(nzb,nys,nxl-nbgp_local),   1, type_xz(grid_level), &
+                             psouth, req_count, comm2d, req(req_count+1), ierr )
+             CALL MPI_IRECV( ar(nzb,nyn+1,nxl-nbgp_local), 1, type_xz(grid_level), &
+                             pnorth, req_count, comm2d, req(req_count+2), ierr )
+!
+!--          Send rear boundary, receive front one (asynchronous)
+             CALL MPI_ISEND( ar(nzb,nyn-nbgp_local+1,nxl-nbgp_local), 1,       &
+                             type_xz(grid_level), pnorth, req_count+1, comm2d, &
+                             req(req_count+3), ierr )
+             CALL MPI_IRECV( ar(nzb,nys-nbgp_local,nxl-nbgp_local),   1,       &
+                             type_xz(grid_level), psouth, req_count+1, comm2d, &
+                             req(req_count+4), ierr )
+
+             CALL MPI_WAITALL( 4, req, wait_stat, ierr )
+
+          ENDIF
+
+       ENDIF
+
+    ENDIF
+
+#else
+
+!
+!-- Lateral boundary conditions in the non-parallel case.
+!-- Case dependent, because in GPU mode still not all arrays are on device. This
+!-- workaround has to be removed later. Also, since PGI compiler 12.5 has problems
+!-- with array syntax, explicit loops are used.
+    IF ( bc_lr_cyc )  THEN
+       ar(:,:,nxl-nbgp_local:nxl-1) = ar(:,:,nxr-nbgp_local+1:nxr)
+       ar(:,:,nxr+1:nxr+nbgp_local) = ar(:,:,nxl:nxl+nbgp_local-1)
+    ENDIF
+
+    IF ( bc_ns_cyc )  THEN
+       ar(:,nys-nbgp_local:nys-1,:) = ar(:,nyn-nbgp_local+1:nyn,:)
+       ar(:,nyn+1:nyn+nbgp_local,:) = ar(:,nys:nys+nbgp_local-1,:)
+    ENDIF
+
+#endif
+    CALL cpu_log( log_point_s(2), 'exchange_horiz', 'stop' )
+
+ END SUBROUTINE exchange_horiz
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE exchange_horiz_int( ar, nys_l, nyn_l, nxl_l, nxr_l, nzt_l, nbgp_local)
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, grid_level
+                       
+    USE indices,                                                               &
+        ONLY:  nzb
+        
+    USE kinds
+    
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  nxl_l       !< local index bound at current grid level, left side
+    INTEGER(iwp) ::  nxr_l       !< local index bound at current grid level, right side
+    INTEGER(iwp) ::  nyn_l       !< local index bound at current grid level, north side
+    INTEGER(iwp) ::  nys_l       !< local index bound at current grid level, south side
+    INTEGER(iwp) ::  nzt_l       !< local index bound at current grid level, top
+    INTEGER(iwp) ::  nbgp_local  !< number of ghost points
+    
+    INTEGER(iwp), DIMENSION(nzb:nzt_l+1,nys_l-nbgp_local:nyn_l+nbgp_local,     &
+                            nxl_l-nbgp_local:nxr_l+nbgp_local) ::  ar  !< treated array
+
+
+#if defined( __parallel )
+    IF ( pdims(1) == 1 )  THEN
+!
+!--    One-dimensional decomposition along y, boundary values can be exchanged
+!--    within the PE memory
+       IF ( bc_lr_cyc )  THEN
+          ar(:,:,nxl_l-nbgp_local:nxl_l-1) = ar(:,:,nxr_l-nbgp_local+1:nxr_l)
+          ar(:,:,nxr_l+1:nxr_l+nbgp_local) = ar(:,:,nxl_l:nxl_l+nbgp_local-1)
+       ENDIF
+    ELSE
+!
+!--    Send left boundary, receive right one (synchronous)
+       CALL MPI_SENDRECV(                                                          &
+           ar(nzb,nys_l-nbgp_local,nxl_l),   1, type_yz_int(grid_level), pleft,  0,&
+           ar(nzb,nys_l-nbgp_local,nxr_l+1), 1, type_yz_int(grid_level), pright, 0,&
+           comm2d, status, ierr )
+!
+!--    Send right boundary, receive left one (synchronous)
+       CALL MPI_SENDRECV(                                                          &
+           ar(nzb,nys_l-nbgp_local,nxr_l+1-nbgp_local), 1, type_yz_int(grid_level),&
+           pright, 1,                                                              &
+           ar(nzb,nys_l-nbgp_local,nxl_l-nbgp_local),   1, type_yz_int(grid_level),&
+           pleft,  1,                                                              &
+           comm2d, status, ierr )
+    ENDIF
+
+
+    IF ( pdims(2) == 1 )  THEN
+!
+!--    One-dimensional decomposition along x, boundary values can be exchanged
+!--    within the PE memory
+       IF ( bc_ns_cyc )  THEN
+          ar(:,nys_l-nbgp_local:nys_l-1,:) = ar(:,nyn_l-nbgp_local+1:nyn_l,:)
+          ar(:,nyn_l+1:nyn_l+nbgp_local,:) = ar(:,nys_l:nys_l+nbgp_local-1,:)
+       ENDIF
+
+    ELSE
+
+!
+!--    Send front boundary, receive rear one (synchronous)
+       CALL MPI_SENDRECV(                                                          &
+           ar(nzb,nys_l,nxl_l-nbgp_local),   1, type_xz_int(grid_level), psouth, 0,&
+           ar(nzb,nyn_l+1,nxl_l-nbgp_local), 1, type_xz_int(grid_level), pnorth, 0,&
+           comm2d, status, ierr )
+!
+!--    Send rear boundary, receive front one (synchronous)
+       CALL MPI_SENDRECV( ar(nzb,nyn_l-nbgp_local+1,nxl_l-nbgp_local), 1,          &
+                          type_xz_int(grid_level), pnorth, 1,                      &
+                          ar(nzb,nys_l-nbgp_local,nxl_l-nbgp_local),   1,          &
+                          type_xz_int(grid_level), psouth, 1,                      &
+                          comm2d, status, ierr )
+
+    ENDIF
+
+#else
+
+    IF ( bc_lr_cyc )  THEN
+       ar(:,:,nxl_l-nbgp_local:nxl_l-1) = ar(:,:,nxr_l-nbgp_local+1:nxr_l)
+       ar(:,:,nxr_l+1:nxr_l+nbgp_local) = ar(:,:,nxl_l:nxl_l+nbgp_local-1)
+    ENDIF
+
+    IF ( bc_ns_cyc )  THEN
+       ar(:,nys_l-nbgp_local:nys_l-1,:) = ar(:,nyn_l-nbgp_local+1:nyn_l,:)
+       ar(:,nyn_l+1:nyn_l+nbgp_local,:) = ar(:,nys_l:nys_l+nbgp_local-1,:)
+    ENDIF
+
+#endif
+
+
+ END SUBROUTINE exchange_horiz_int
Index: /palm/tags/release-6.0/SOURCE/exchange_horiz_2d.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/exchange_horiz_2d.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/exchange_horiz_2d.f90	(revision 3477)
@@ -0,0 +1,349 @@
+!> @file exchange_horiz_2d.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Rename variables in offline nesting mode and flags indicating lateral
+! boundary conditions
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Forcing implemented (MS)
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1968 2016-07-18 12:01:49Z suehring
+! 2D-INTEGER exchange adopted for different multigrid level
+! 
+! 1818 2016-04-06 15:53:27Z maronga
+! Initial version of purely vertical nesting introduced. 
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+! 
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1348 2014-03-27 18:01:03Z raasch
+! bugfix: bc_lr_cyc and bc_ns_cyc added to ONLY-list
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 841 2012-02-28 12:29:49Z maronga
+! Excluded routine from compilation of namelist_file_check
+!
+! Revision 1.1  1998/01/23 09:58:21  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Exchange of lateral (ghost) boundaries (parallel computers) and cyclic
+!> boundary conditions, respectively, for 2D-arrays.
+!------------------------------------------------------------------------------!
+ SUBROUTINE exchange_horiz_2d( ar )
+ 
+
+    USE control_parameters,                                                    &
+        ONLY :  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                &
+                bc_dirichlet_s, bc_lr_cyc, bc_ns_cyc, bc_radiation_l,          &
+                bc_radiation_n, bc_radiation_r, bc_radiation_s 
+                
+    USE cpulog,                                                                &
+        ONLY :  cpu_log, log_point_s
+        
+    USE indices,                                                               &
+        ONLY :  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg
+        
+    USE kinds
+    
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY : nesting_mode
+
+
+    IMPLICIT NONE
+
+
+    INTEGER(iwp) :: i  !<
+    
+    REAL(wp) ::  ar(nysg:nyng,nxlg:nxrg)  !<
+    
+
+    CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'start' )
+
+#if defined( __parallel )
+
+!
+!-- Exchange of lateral boundary values for parallel computers
+    IF ( pdims(1) == 1 )  THEN
+
+!
+!--    One-dimensional decomposition along y, boundary values can be exchanged
+!--    within the PE memory
+       ar(:,nxlg:nxl-1) = ar(:,nxr-nbgp+1:nxr)
+       ar(:,nxr+1:nxrg) = ar(:,nxl:nxl+nbgp-1)
+
+    ELSE
+!
+!--    Send left boundary, receive right one
+
+       CALL MPI_SENDRECV( ar(nysg,nxl), 1, type_y, pleft,  0,                 &
+                          ar(nysg,nxr+1), 1, type_y, pright, 0,               &
+                          comm2d, status, ierr )
+!
+!--    Send right boundary, receive left one
+       CALL MPI_SENDRECV( ar(nysg,nxr+1-nbgp), 1, type_y, pright,  1,         &
+                          ar(nysg,nxlg), 1, type_y, pleft,   1,               &
+                          comm2d, status, ierr )
+                          
+     
+    ENDIF
+
+    IF ( pdims(2) == 1 )  THEN
+!
+!--    One-dimensional decomposition along x, boundary values can be exchanged
+!--    within the PE memory
+       ar(nysg:nys-1,:) = ar(nyn-nbgp+1:nyn,:)
+       ar(nyn+1:nyng,:) = ar(nys:nys+nbgp-1,:)
+
+    ELSE
+!
+!--    Send front boundary, receive rear one
+
+       CALL MPI_SENDRECV( ar(nys,nxlg), 1, type_x, psouth, 0,                 &         
+                          ar(nyn+1,nxlg), 1, type_x, pnorth, 0,               &
+                          comm2d, status, ierr )
+!
+!--    Send rear boundary, receive front one
+       CALL MPI_SENDRECV( ar(nyn+1-nbgp,nxlg), 1, type_x, pnorth, 1,          &
+                          ar(nysg,nxlg), 1, type_x, psouth, 1,                &
+                          comm2d, status, ierr )
+
+    ENDIF
+
+#else
+
+!
+!-- Lateral boundary conditions in the non-parallel case
+    IF ( bc_lr_cyc )  THEN
+       ar(:,nxlg:nxl-1) = ar(:,nxr-nbgp+1:nxr)
+       ar(:,nxr+1:nxrg) = ar(:,nxl:nxl+nbgp-1)
+    ENDIF
+
+    IF ( bc_ns_cyc )  THEN
+       ar(nysg:nys-1,:) = ar(nyn-nbgp+1:nyn,:)
+       ar(nyn+1:nyng,:) = ar(nys:nys+nbgp-1,:)
+    ENDIF
+
+
+#endif
+
+!
+!-- Neumann-conditions at inflow/outflow/nested boundaries
+    IF ( nesting_mode /= 'vertical' )  THEN
+       IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+          DO  i = nbgp, 1, -1
+             ar(:,nxl-i) = ar(:,nxl)
+          ENDDO
+       ENDIF
+       IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+          DO  i = 1, nbgp
+             ar(:,nxr+i) = ar(:,nxr)
+          ENDDO
+       ENDIF
+       IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+          DO  i = nbgp, 1, -1
+             ar(nys-i,:) = ar(nys,:)
+          ENDDO
+       ENDIF
+       IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+          DO  i = 1, nbgp
+             ar(nyn+i,:) = ar(nyn,:)
+          ENDDO
+       ENDIF
+    ENDIF
+
+    CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' )
+
+ END SUBROUTINE exchange_horiz_2d
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Exchange of lateral (ghost) boundaries (parallel computers) and cyclic
+!> boundary conditions, respectively, for 2D integer arrays.
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE exchange_horiz_2d_int( ar, nys_l, nyn_l, nxl_l, nxr_l, nbgp_local )
+
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
+               bc_dirichlet_s, bc_lr_cyc, bc_ns_cyc, bc_radiation_l,           &
+               bc_radiation_n, bc_radiation_r, bc_radiation_s, grid_level
+        
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+               
+    USE kinds
+    
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i           !< dummy index to zero-gradient conditions at in/outflow boundaries
+    INTEGER(iwp) ::  nxl_l       !< local index bound at current grid level, left side
+    INTEGER(iwp) ::  nxr_l       !< local index bound at current grid level, right side
+    INTEGER(iwp) ::  nyn_l       !< local index bound at current grid level, north side
+    INTEGER(iwp) ::  nys_l       !< local index bound at current grid level, south side
+    INTEGER(iwp) ::  nbgp_local  !< number of ghost layers to be exchanged
+
+    INTEGER(iwp), DIMENSION(nys_l-nbgp_local:nyn_l+nbgp_local,                 &
+                            nxl_l-nbgp_local:nxr_l+nbgp_local) ::  ar  !< treated array
+
+    CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'start' )
+
+#if defined( __parallel )
+
+!
+!-- Exchange of lateral boundary values for parallel computers
+    IF ( pdims(1) == 1 )  THEN
+
+!
+!--    One-dimensional decomposition along y, boundary values can be exchanged
+!--    within the PE memory
+       ar(:,nxl_l-nbgp_local:nxl_l-1) = ar(:,nxr_l-nbgp_local+1:nxr_l)
+       ar(:,nxr_l+1:nxr_l+nbgp_local) = ar(:,nxl_l:nxl_l+nbgp_local-1)
+
+    ELSE
+!
+!--    Send left boundary, receive right one
+       CALL MPI_SENDRECV( ar(nys_l-nbgp_local,nxl_l),   1,                     &
+                          type_y_int(grid_level), pleft,  0,                   &
+                          ar(nys_l-nbgp_local,nxr_l+1), 1,                     &
+                          type_y_int(grid_level), pright, 0,                   &
+                          comm2d, status, ierr )
+!
+!--    Send right boundary, receive left one
+       CALL MPI_SENDRECV( ar(nys_l-nbgp_local,nxr_l+1-nbgp_local), 1,          &
+                          type_y_int(grid_level), pright, 1,                   &
+                          ar(nys_l-nbgp_local,nxl_l-nbgp_local),   1,          & 
+                          type_y_int(grid_level), pleft,  1,                   &
+                          comm2d, status, ierr )                         
+
+    ENDIF
+
+    IF ( pdims(2) == 1 )  THEN
+!
+!--    One-dimensional decomposition along x, boundary values can be exchanged
+!--    within the PE memory
+       ar(nys_l-nbgp_local:nys_l-1,:) = ar(nyn_l+1-nbgp_local:nyn_l,:)
+       ar(nyn_l+1:nyn_l+nbgp_local,:) = ar(nys_l:nys_l-1+nbgp_local,:)
+
+
+    ELSE
+!
+!--    Send front boundary, receive rear one
+       CALL MPI_SENDRECV( ar(nys_l,nxl_l-nbgp_local),   1,                    &
+                          type_x_int(grid_level), psouth, 0,                  &
+                          ar(nyn_l+1,nxl_l-nbgp_local), 1,                    &
+                          type_x_int(grid_level), pnorth, 0,                  &
+                          comm2d, status, ierr )                          
+
+!
+!--    Send rear boundary, receive front one
+       CALL MPI_SENDRECV( ar(nyn_l+1-nbgp_local,nxl_l-nbgp_local), 1,         &
+                          type_x_int(grid_level), pnorth, 1,                  &
+                          ar(nys_l-nbgp_local,nxl_l-nbgp_local),   1,         &
+                          type_x_int(grid_level), psouth, 1,                  &
+                          comm2d, status, ierr )
+
+    ENDIF
+
+#else
+
+!
+!-- Lateral boundary conditions in the non-parallel case
+    IF ( bc_lr_cyc )  THEN
+       ar(:,nxl_l-nbgp_local:nxl_l-1) = ar(:,nxr_l-nbgp_local+1:nxr_l)
+       ar(:,nxr_l+1:nxr_l+nbgp_local) = ar(:,nxl_l:nxl_l+nbgp_local-1)
+    ENDIF
+
+    IF ( bc_ns_cyc )  THEN
+       ar(nys_l-nbgp_local:nys_l-1,:) = ar(nyn_l+1-nbgp_local:nyn_l,:)
+       ar(nyn_l+1:nyn_l+nbgp_local,:) = ar(nys_l:nys_l-1+nbgp_local,:)
+    ENDIF
+
+#endif
+!
+!-- Neumann-conditions at inflow/outflow/nested boundaries
+    IF ( bc_dirichlet_l )  THEN
+       DO  i = nbgp_local, 1, -1
+         ar(:,nxl_l-i) = ar(:,nxl_l)
+       ENDDO
+    ENDIF
+    IF ( bc_dirichlet_r )  THEN
+       DO  i = 1, nbgp_local
+          ar(:,nxr_l+i) = ar(:,nxr_l)
+       ENDDO
+    ENDIF
+    IF ( bc_dirichlet_s )  THEN
+       DO  i = nbgp_local, 1, -1
+         ar(nys_l-i,:) = ar(nys_l,:)
+       ENDDO
+    ENDIF
+    IF ( bc_dirichlet_n )  THEN
+       DO  i = 1, nbgp_local
+         ar(nyn_l+i,:) = ar(nyn_l,:)
+       ENDDO
+    ENDIF
+
+    CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' )
+
+ END SUBROUTINE exchange_horiz_2d_int
Index: /palm/tags/release-6.0/SOURCE/fft_xy_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/fft_xy_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/fft_xy_mod.f90	(revision 3477)
@@ -0,0 +1,1774 @@
+!> @file fft_xy_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! preprocessor switches for variables that are required on NEC only
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2300 2017-06-29 13:31:14Z raasch
+! NEC related code partly removed, host replaced by loop_optimization
+! 
+! 2274 2017-06-09 13:27:48Z Giersch
+! Changed error messages
+! 
+! 2119 2017-01-17 16:51:50Z raasch
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and CUDA-fft related code removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1815 2016-04-06 13:49:59Z raasch
+! cpp-directives for ibmy removed
+!
+! 1749 2016-02-09 12:19:56Z raasch
+! small OpenACC bugfix
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1600 2015-06-11 15:50:12Z raasch
+! bugfix: openMP threadprivate statement moved after variable declaration
+!
+! 1482 2014-10-18 12:34:45Z raasch
+! cudafft workaround for data declaration of ar_tmp because of PGI 14.1 bug
+!
+! 1402 2014-05-09 14:25:13Z raasch
+! fortran bugfix for r1392
+! 
+! 1398 2014-05-07 11:15:00Z heinze
+! bugfix: typo removed for KIND in CMPLX function
+!
+! 1392 2014-05-06 09:10:05Z raasch
+! bugfix: KIND attribute added to CMPLX functions
+!
+! 1374 2014-04-25 12:55:07Z raasch
+! bugfixes: missing variables added to ONLY list, dpk renamed dp
+!
+! 1372 2014-04-24 06:29:32Z raasch
+! openMP-bugfix for fftw: some arrays defined as threadprivate
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1304 2014-03-12 10:29:42Z raasch
+! openmp bugfix: work1 used in Temperton algorithm must be private
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed, declare create moved after
+! the FORTRAN declaration statement
+!
+! 1219 2013-08-30 09:33:18Z heinze
+! bugfix: use own branch for fftw
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! fft_x and fft_y modified for parallel / ovverlapping execution of fft and
+! transpositions,
+! fftw implemented for 1d-decomposition (fft_x_1d, fft_y_1d)
+!
+! 1210 2013-08-14 10:58:20Z raasch
+! fftw added
+!
+! 1166 2013-05-24 13:55:44Z raasch
+! C_DOUBLE/COMPLEX reset to dpk
+!
+! 1153 2013-05-10 14:33:08Z raasch
+! code adjustment of data types for CUDA fft required by PGI 12.3 / CUDA 5.0
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! further openACC statements added, CUDA branch completely runs on GPU
+! bugfix: CUDA fft plans adjusted for domain decomposition (before they always
+! used total domain)
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! CUDA fft added
+! array_kind renamed precision_kind, 3D- instead of 1D-loops in fft_x and fft_y
+! old fft_x, fft_y become fft_x_1d, fft_y_1d and are used for 1D-decomposition
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! variable sizw declared for NEC case only
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  2002/06/11 13:00:49  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Fast Fourier transformation along x and y for 1d domain decomposition along x.
+!> Original version: Klaus Ketelsen (May 2002)
+!------------------------------------------------------------------------------!
+ MODULE fft_xy
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  fft_method, message_string
+        
+    USE indices,                                                               &
+        ONLY:  nx, ny, nz
+        
+#if defined( __fftw )
+    USE, INTRINSIC ::  ISO_C_BINDING
+#endif
+
+    USE kinds
+    
+    USE singleton,                                                             &
+        ONLY: fftn
+    
+    USE temperton_fft
+    
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxr_y, nyn_x, nys_x, nzb_x, nzb_y, nzt_x, nzt_y
+
+    IMPLICIT NONE
+
+    PRIVATE
+    PUBLIC fft_x, fft_x_1d, fft_y, fft_y_1d, fft_init, fft_x_m, fft_y_m
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE, SAVE ::  ifax_x  !<
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE, SAVE ::  ifax_y  !<
+
+    LOGICAL, SAVE ::  init_fft = .FALSE.  !<
+
+    REAL(wp), SAVE ::  dnx      !<
+    REAL(wp), SAVE ::  dny      !<
+    REAL(wp), SAVE ::  sqr_dnx  !<
+    REAL(wp), SAVE ::  sqr_dny  !<
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  trigs_x  !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  trigs_y  !<
+
+#if defined( __ibm )
+    INTEGER(iwp), PARAMETER ::  nau1 = 20000  !< 
+    INTEGER(iwp), PARAMETER ::  nau2 = 22000  !<
+!
+!-- The following working arrays contain tables and have to be "save" and
+!-- shared in OpenMP sense
+    REAL(wp), DIMENSION(nau1), SAVE ::  aux1  !< 
+    REAL(wp), DIMENSION(nau1), SAVE ::  auy1  !<
+    REAL(wp), DIMENSION(nau1), SAVE ::  aux3  !< 
+    REAL(wp), DIMENSION(nau1), SAVE ::  auy3  !<
+    
+#elif defined( __nec )
+    INTEGER(iwp), SAVE ::  nz1  !<
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  trig_xb  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  trig_xf  !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  trig_yb  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE ::  trig_yf  !<
+    
+#endif
+
+#if defined( __fftw )
+    INCLUDE  'fftw3.f03'
+    INTEGER(KIND=C_INT) ::  nx_c  !<
+    INTEGER(KIND=C_INT) ::  ny_c  !<
+    
+    COMPLEX(KIND=C_DOUBLE_COMPLEX), DIMENSION(:), ALLOCATABLE, SAVE ::  x_out  !<
+    COMPLEX(KIND=C_DOUBLE_COMPLEX), DIMENSION(:), ALLOCATABLE, SAVE ::         &
+       y_out  !<
+    
+    REAL(KIND=C_DOUBLE), DIMENSION(:), ALLOCATABLE, SAVE ::                    &
+       x_in   !<
+    REAL(KIND=C_DOUBLE), DIMENSION(:), ALLOCATABLE, SAVE ::                    &
+       y_in   !<
+    !$OMP THREADPRIVATE( x_out, y_out, x_in, y_in )
+    
+    
+    TYPE(C_PTR), SAVE ::  plan_xf, plan_xi, plan_yf, plan_yi
+#endif
+
+!
+!-- Public interfaces
+    INTERFACE fft_init
+       MODULE PROCEDURE fft_init
+    END INTERFACE fft_init
+
+    INTERFACE fft_x
+       MODULE PROCEDURE fft_x
+    END INTERFACE fft_x
+
+    INTERFACE fft_x_1d
+       MODULE PROCEDURE fft_x_1d
+    END INTERFACE fft_x_1d
+
+    INTERFACE fft_y
+       MODULE PROCEDURE fft_y
+    END INTERFACE fft_y
+
+    INTERFACE fft_y_1d
+       MODULE PROCEDURE fft_y_1d
+    END INTERFACE fft_y_1d
+
+    INTERFACE fft_x_m
+       MODULE PROCEDURE fft_x_m
+    END INTERFACE fft_x_m
+
+    INTERFACE fft_y_m
+       MODULE PROCEDURE fft_y_m
+    END INTERFACE fft_y_m
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE fft_init
+
+       IMPLICIT NONE
+
+!
+!--    The following temporary working arrays have to be on stack or private
+!--    in OpenMP sense
+#if defined( __ibm )
+       REAL(wp), DIMENSION(0:nx+2) ::  workx  !<
+       REAL(wp), DIMENSION(0:ny+2) ::  worky  !<
+       REAL(wp), DIMENSION(nau2)   ::  aux2   !< 
+       REAL(wp), DIMENSION(nau2)   ::  auy2   !< 
+       REAL(wp), DIMENSION(nau2)   ::  aux4   !< 
+       REAL(wp), DIMENSION(nau2)   ::  auy4   !<
+#elif defined( __nec )
+       REAL(wp), DIMENSION(0:nx+3,nz+1)   ::  work_x  !<
+       REAL(wp), DIMENSION(0:ny+3,nz+1)   ::  work_y  !<
+       REAL(wp), DIMENSION(6*(nx+3),nz+1) ::  workx   !<
+       REAL(wp), DIMENSION(6*(ny+3),nz+1) ::  worky   !<
+#endif 
+
+!
+!--    Return, if already called
+       IF ( init_fft )  THEN
+          RETURN
+       ELSE
+          init_fft = .TRUE.
+       ENDIF
+
+       IF ( fft_method == 'system-specific' )  THEN
+
+          dnx = 1.0_wp / ( nx + 1.0_wp )
+          dny = 1.0_wp / ( ny + 1.0_wp )
+          sqr_dnx = SQRT( dnx )
+          sqr_dny = SQRT( dny )
+#if defined( __ibm )
+!
+!--       Initialize tables for fft along x
+          CALL DRCFT( 1, workx, 1, workx, 1, nx+1, 1,  1, sqr_dnx, aux1, nau1, &
+                      aux2, nau2 )
+          CALL DCRFT( 1, workx, 1, workx, 1, nx+1, 1, -1, sqr_dnx, aux3, nau1, &
+                      aux4, nau2 )
+!
+!--       Initialize tables for fft along y
+          CALL DRCFT( 1, worky, 1, worky, 1, ny+1, 1,  1, sqr_dny, auy1, nau1, &
+                      auy2, nau2 )
+          CALL DCRFT( 1, worky, 1, worky, 1, ny+1, 1, -1, sqr_dny, auy3, nau1, &
+                      auy4, nau2 )
+#elif defined( __nec )
+          message_string = 'fft method "' // TRIM( fft_method) // &
+                           '" currently does not work on NEC'
+          CALL message( 'fft_init', 'PA0187', 1, 2, 0, 6, 0 )
+
+          ALLOCATE( trig_xb(2*(nx+1)), trig_xf(2*(nx+1)),                      &
+                    trig_yb(2*(ny+1)), trig_yf(2*(ny+1)) )
+
+          work_x = 0.0_wp
+          work_y = 0.0_wp
+          nz1  = nz + MOD( nz+1, 2 )  ! odd nz slows down fft significantly
+                                      ! when using the NEC ffts
+
+!
+!--       Initialize tables for fft along x (non-vector and vector case (M))
+          CALL DZFFT( 0, nx+1, sqr_dnx, work_x, work_x, trig_xf, workx, 0 )
+          CALL ZDFFT( 0, nx+1, sqr_dnx, work_x, work_x, trig_xb, workx, 0 )
+          CALL DZFFTM( 0, nx+1, nz1, sqr_dnx, work_x, nx+4, work_x, nx+4,      &
+                       trig_xf, workx, 0 )
+          CALL ZDFFTM( 0, nx+1, nz1, sqr_dnx, work_x, nx+4, work_x, nx+4,      &
+                       trig_xb, workx, 0 )
+!
+!--       Initialize tables for fft along y (non-vector and vector case (M))
+          CALL DZFFT( 0, ny+1, sqr_dny, work_y, work_y, trig_yf, worky, 0 )
+          CALL ZDFFT( 0, ny+1, sqr_dny, work_y, work_y, trig_yb, worky, 0 )
+          CALL DZFFTM( 0, ny+1, nz1, sqr_dny, work_y, ny+4, work_y, ny+4,      &
+                       trig_yf, worky, 0 )
+          CALL ZDFFTM( 0, ny+1, nz1, sqr_dny, work_y, ny+4, work_y, ny+4,      &
+                       trig_yb, worky, 0 )
+#else
+          message_string = 'no system-specific fft-call available'
+          CALL message( 'fft_init', 'PA0188', 1, 2, 0, 6, 0 )
+#endif
+       ELSEIF ( fft_method == 'temperton-algorithm' )  THEN
+!
+!--       Temperton-algorithm
+!--       Initialize tables for fft along x and y
+          ALLOCATE( ifax_x(nx+1), ifax_y(ny+1), trigs_x(nx+1), trigs_y(ny+1) )
+
+          CALL set99( trigs_x, ifax_x, nx+1 )
+          CALL set99( trigs_y, ifax_y, ny+1 )
+
+       ELSEIF ( fft_method == 'fftw' )  THEN
+!
+!--       FFTW
+#if defined( __fftw )
+          nx_c = nx+1
+          ny_c = ny+1
+          !$OMP PARALLEL
+          ALLOCATE( x_in(0:nx+2), y_in(0:ny+2), x_out(0:(nx+1)/2),             &
+                    y_out(0:(ny+1)/2) )
+          !$OMP END PARALLEL
+          plan_xf = FFTW_PLAN_DFT_R2C_1D( nx_c, x_in, x_out, FFTW_ESTIMATE )
+          plan_xi = FFTW_PLAN_DFT_C2R_1D( nx_c, x_out, x_in, FFTW_ESTIMATE )
+          plan_yf = FFTW_PLAN_DFT_R2C_1D( ny_c, y_in, y_out, FFTW_ESTIMATE )
+          plan_yi = FFTW_PLAN_DFT_C2R_1D( ny_c, y_out, y_in, FFTW_ESTIMATE )
+#else
+          message_string = 'preprocessor switch for fftw is missing'
+          CALL message( 'fft_init', 'PA0080', 1, 2, 0, 6, 0 )
+#endif
+
+       ELSEIF ( fft_method == 'singleton-algorithm' )  THEN
+
+          CONTINUE
+
+       ELSE
+
+          message_string = 'fft method "' // TRIM( fft_method) // &
+                           '" not available'
+          CALL message( 'fft_init', 'PA0189', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    END SUBROUTINE fft_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along x-direction.                 
+!> Version for 2D-decomposition.
+!> It uses internal algorithms (Singleton or Temperton) or      
+!> system-specific routines, if they are available           
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE fft_x( ar, direction, ar_2d )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  direction  !<
+       
+       COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
+
+       INTEGER(iwp) ::  i          !< 
+       INTEGER(iwp) ::  ishape(1)  !<
+       INTEGER(iwp) ::  j          !<
+       INTEGER(iwp) ::  k          !<
+
+       LOGICAL ::  forward_fft !<
+       
+       REAL(wp), DIMENSION(0:nx+2) ::  work   !<
+       REAL(wp), DIMENSION(nx+2)   ::  work1  !<
+       
+#if defined( __ibm )
+       REAL(wp), DIMENSION(nau2) ::  aux2  !< 
+       REAL(wp), DIMENSION(nau2) ::  aux4  !<
+#elif defined( __nec )
+       REAL(wp), DIMENSION(6*(nx+1)) ::  work2  !<
+#endif
+
+       REAL(wp), DIMENSION(0:nx,nys_x:nyn_x), OPTIONAL   ::                    &
+          ar_2d   !<
+       REAL(wp), DIMENSION(0:nx,nys_x:nyn_x,nzb_x:nzt_x) ::                    &
+          ar      !<
+
+       IF ( direction == 'forward' )  THEN
+          forward_fft = .TRUE.
+       ELSE
+          forward_fft = .FALSE.
+       ENDIF
+
+       IF ( fft_method == 'singleton-algorithm' )  THEN
+
+!
+!--       Performing the fft with singleton's software works on every system,
+!--       since it is part of the model
+          ALLOCATE( cwork(0:nx) )
+      
+          IF ( forward_fft )   then
+
+             !$OMP PARALLEL PRIVATE ( cwork, i, ishape, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   DO  i = 0, nx
+                      cwork(i) = CMPLX( ar(i,j,k), KIND=wp )
+                   ENDDO
+
+                   ishape = SHAPE( cwork )
+                   CALL FFTN( cwork, ishape )
+
+                   DO  i = 0, (nx+1)/2
+                      ar(i,j,k) = REAL( cwork(i), KIND=wp )
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      ar(nx+1-i,j,k) = -AIMAG( cwork(i) )
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( cwork, i, ishape, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   cwork(0) = CMPLX( ar(0,j,k), 0.0_wp, KIND=wp )
+                   DO  i = 1, (nx+1)/2 - 1
+                      cwork(i)      = CMPLX( ar(i,j,k), -ar(nx+1-i,j,k),       &
+                                             KIND=wp )
+                      cwork(nx+1-i) = CMPLX( ar(i,j,k),  ar(nx+1-i,j,k),       &
+                                             KIND=wp )
+                   ENDDO
+                   cwork((nx+1)/2) = CMPLX( ar((nx+1)/2,j,k), 0.0_wp, KIND=wp )
+
+                   ishape = SHAPE( cwork )
+                   CALL FFTN( cwork, ishape, inv = .TRUE. )
+
+                   DO  i = 0, nx
+                      ar(i,j,k) = REAL( cwork(i), KIND=wp )
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+
+          DEALLOCATE( cwork )
+
+       ELSEIF ( fft_method == 'temperton-algorithm' )  THEN
+
+!
+!--       Performing the fft with Temperton's software works on every system,
+!--       since it is part of the model
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, work1, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   work(0:nx) = ar(0:nx,j,k)
+                   CALL fft991cy( work, work1, trigs_x, ifax_x, 1, nx+1, nx+1, 1, -1 )
+
+                   DO  i = 0, (nx+1)/2
+                      ar(i,j,k) = work(2*i)
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      ar(nx+1-i,j,k) = work(2*i+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, work1, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   DO  i = 0, (nx+1)/2
+                      work(2*i) = ar(i,j,k)
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      work(2*i+1) = ar(nx+1-i,j,k)
+                   ENDDO
+                   work(1)    = 0.0_wp
+                   work(nx+2) = 0.0_wp
+
+                   CALL fft991cy( work, work1, trigs_x, ifax_x, 1, nx+1, nx+1, 1, 1 )
+                   ar(0:nx,j,k) = work(0:nx)
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+
+       ELSEIF ( fft_method == 'fftw' )  THEN
+
+#if defined( __fftw )
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   x_in(0:nx) = ar(0:nx,j,k)
+                   CALL FFTW_EXECUTE_DFT_R2C( plan_xf, x_in, x_out )
+
+                   IF ( PRESENT( ar_2d ) )  THEN
+
+                      DO  i = 0, (nx+1)/2
+                         ar_2d(i,j) = REAL( x_out(i), KIND=wp ) / ( nx+1 )
+                      ENDDO
+                      DO  i = 1, (nx+1)/2 - 1
+                         ar_2d(nx+1-i,j) = AIMAG( x_out(i) ) / ( nx+1 )
+                      ENDDO
+
+                   ELSE
+
+                      DO  i = 0, (nx+1)/2
+                         ar(i,j,k) = REAL( x_out(i), KIND=wp ) / ( nx+1 )
+                      ENDDO
+                      DO  i = 1, (nx+1)/2 - 1
+                         ar(nx+1-i,j,k) = AIMAG( x_out(i) ) / ( nx+1 )
+                      ENDDO
+
+                   ENDIF
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   IF ( PRESENT( ar_2d ) )  THEN
+
+                      x_out(0) = CMPLX( ar_2d(0,j), 0.0_wp, KIND=wp )
+                      DO  i = 1, (nx+1)/2 - 1
+                         x_out(i) = CMPLX( ar_2d(i,j), ar_2d(nx+1-i,j),        &
+                                           KIND=wp )
+                      ENDDO
+                      x_out((nx+1)/2) = CMPLX( ar_2d((nx+1)/2,j), 0.0_wp,      &
+                                               KIND=wp )
+
+                   ELSE
+
+                      x_out(0) = CMPLX( ar(0,j,k), 0.0_wp, KIND=wp )
+                      DO  i = 1, (nx+1)/2 - 1
+                         x_out(i) = CMPLX( ar(i,j,k), ar(nx+1-i,j,k), KIND=wp )
+                      ENDDO
+                      x_out((nx+1)/2) = CMPLX( ar((nx+1)/2,j,k), 0.0_wp,       &
+                                               KIND=wp )
+
+                   ENDIF
+
+                   CALL FFTW_EXECUTE_DFT_C2R( plan_xi, x_out, x_in)
+                   ar(0:nx,j,k) = x_in(0:nx)
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+#endif
+
+       ELSEIF ( fft_method == 'system-specific' )  THEN
+
+#if defined( __ibm )
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   CALL DRCFT( 0, ar, 1, work, 1, nx+1, 1, 1, sqr_dnx, aux1,   &
+                               nau1, aux2, nau2 )
+
+                   DO  i = 0, (nx+1)/2
+                      ar(i,j,k) = work(2*i)
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      ar(nx+1-i,j,k) = work(2*i+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   DO  i = 0, (nx+1)/2
+                      work(2*i) = ar(i,j,k)
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      work(2*i+1) = ar(nx+1-i,j,k)
+                   ENDDO
+                   work(1) = 0.0_wp
+                   work(nx+2) = 0.0_wp
+
+                   CALL DCRFT( 0, work, 1, work, 1, nx+1, 1, -1, sqr_dnx,      & 
+                               aux3, nau1, aux4, nau2 )
+
+                   DO  i = 0, nx
+                      ar(i,j,k) = work(i)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+
+#elif defined( __nec )
+
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   work(0:nx) = ar(0:nx,j,k)
+
+                   CALL DZFFT( 1, nx+1, sqr_dnx, work, work, trig_xf, work2, 0 )
+      
+                   DO  i = 0, (nx+1)/2
+                      ar(i,j,k) = work(2*i)
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      ar(nx+1-i,j,k) = work(2*i+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$END OMP PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_x, nzt_x
+                DO  j = nys_x, nyn_x
+
+                   DO  i = 0, (nx+1)/2
+                      work(2*i) = ar(i,j,k)
+                   ENDDO
+                   DO  i = 1, (nx+1)/2 - 1
+                      work(2*i+1) = ar(nx+1-i,j,k)
+                   ENDDO
+                   work(1) = 0.0_wp
+                   work(nx+2) = 0.0_wp
+
+                   CALL ZDFFT( -1, nx+1, sqr_dnx, work, work, trig_xb, work2, 0 )
+
+                   ar(0:nx,j,k) = work(0:nx)
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+
+#endif
+
+       ENDIF
+
+    END SUBROUTINE fft_x
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along x-direction.
+!> Version for 1D-decomposition.
+!> It uses internal algorithms (Singleton or Temperton) or
+!> system-specific routines, if they are available
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE fft_x_1d( ar, direction )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  direction  !<
+       
+       INTEGER(iwp) ::  i               !<
+       INTEGER(iwp) ::  ishape(1)       !<
+
+       LOGICAL ::  forward_fft          !<
+
+       REAL(wp), DIMENSION(0:nx)   ::  ar     !<
+       REAL(wp), DIMENSION(0:nx+2) ::  work   !<
+       REAL(wp), DIMENSION(nx+2)   ::  work1  !<
+       
+       COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
+       
+#if defined( __ibm )
+       REAL(wp), DIMENSION(nau2) ::  aux2       !<
+       REAL(wp), DIMENSION(nau2) ::  aux4       !<
+#elif defined( __nec )
+       REAL(wp), DIMENSION(6*(nx+1)) ::  work2  !<
+#endif
+
+       IF ( direction == 'forward' )  THEN
+          forward_fft = .TRUE.
+       ELSE
+          forward_fft = .FALSE.
+       ENDIF
+
+       IF ( fft_method == 'singleton-algorithm' )  THEN
+
+!
+!--       Performing the fft with singleton's software works on every system,
+!--       since it is part of the model
+          ALLOCATE( cwork(0:nx) )
+      
+          IF ( forward_fft )   then
+
+             DO  i = 0, nx
+                cwork(i) = CMPLX( ar(i), KIND=wp )
+             ENDDO
+             ishape = SHAPE( cwork )
+             CALL FFTN( cwork, ishape )
+             DO  i = 0, (nx+1)/2
+                ar(i) = REAL( cwork(i), KIND=wp )
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                ar(nx+1-i) = -AIMAG( cwork(i) )
+             ENDDO
+
+          ELSE
+
+             cwork(0) = CMPLX( ar(0), 0.0_wp, KIND=wp )
+             DO  i = 1, (nx+1)/2 - 1
+                cwork(i)      = CMPLX( ar(i), -ar(nx+1-i), KIND=wp )
+                cwork(nx+1-i) = CMPLX( ar(i),  ar(nx+1-i), KIND=wp )
+             ENDDO
+             cwork((nx+1)/2) = CMPLX( ar((nx+1)/2), 0.0_wp, KIND=wp )
+
+             ishape = SHAPE( cwork )
+             CALL FFTN( cwork, ishape, inv = .TRUE. )
+
+             DO  i = 0, nx
+                ar(i) = REAL( cwork(i), KIND=wp )
+             ENDDO
+
+          ENDIF
+
+          DEALLOCATE( cwork )
+
+       ELSEIF ( fft_method == 'temperton-algorithm' )  THEN
+
+!
+!--       Performing the fft with Temperton's software works on every system,
+!--       since it is part of the model
+          IF ( forward_fft )  THEN
+
+             work(0:nx) = ar
+             CALL fft991cy( work, work1, trigs_x, ifax_x, 1, nx+1, nx+1, 1, -1 )
+
+             DO  i = 0, (nx+1)/2
+                ar(i) = work(2*i)
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                ar(nx+1-i) = work(2*i+1)
+             ENDDO
+
+          ELSE
+
+             DO  i = 0, (nx+1)/2
+                work(2*i) = ar(i)
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                work(2*i+1) = ar(nx+1-i)
+             ENDDO
+             work(1)    = 0.0_wp
+             work(nx+2) = 0.0_wp
+
+             CALL fft991cy( work, work1, trigs_x, ifax_x, 1, nx+1, nx+1, 1, 1 )
+             ar = work(0:nx)
+
+          ENDIF
+
+       ELSEIF ( fft_method == 'fftw' )  THEN
+
+#if defined( __fftw )
+          IF ( forward_fft )  THEN
+
+             x_in(0:nx) = ar(0:nx)
+             CALL FFTW_EXECUTE_DFT_R2C( plan_xf, x_in, x_out )
+
+             DO  i = 0, (nx+1)/2
+                ar(i) = REAL( x_out(i), KIND=wp ) / ( nx+1 )
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                ar(nx+1-i) = AIMAG( x_out(i) ) / ( nx+1 )
+             ENDDO
+
+         ELSE
+
+             x_out(0) = CMPLX( ar(0), 0.0_wp, KIND=wp )
+             DO  i = 1, (nx+1)/2 - 1
+                x_out(i) = CMPLX( ar(i), ar(nx+1-i), KIND=wp )
+             ENDDO
+             x_out((nx+1)/2) = CMPLX( ar((nx+1)/2), 0.0_wp, KIND=wp )
+
+             CALL FFTW_EXECUTE_DFT_C2R( plan_xi, x_out, x_in)
+             ar(0:nx) = x_in(0:nx)
+
+         ENDIF
+#endif
+
+       ELSEIF ( fft_method == 'system-specific' )  THEN
+
+#if defined( __ibm )
+          IF ( forward_fft )  THEN
+
+             CALL DRCFT( 0, ar, 1, work, 1, nx+1, 1, 1, sqr_dnx, aux1, nau1,   &
+                         aux2, nau2 )
+
+             DO  i = 0, (nx+1)/2
+                ar(i) = work(2*i)
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                ar(nx+1-i) = work(2*i+1)
+             ENDDO
+
+          ELSE
+
+             DO  i = 0, (nx+1)/2
+                work(2*i) = ar(i)
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                work(2*i+1) = ar(nx+1-i)
+             ENDDO
+             work(1) = 0.0_wp
+             work(nx+2) = 0.0_wp
+
+             CALL DCRFT( 0, work, 1, work, 1, nx+1, 1, -1, sqr_dnx, aux3, nau1, &
+                         aux4, nau2 )
+
+             DO  i = 0, nx
+                ar(i) = work(i)
+             ENDDO
+
+          ENDIF
+#elif defined( __nec )
+          IF ( forward_fft )  THEN
+
+             work(0:nx) = ar(0:nx)
+
+             CALL DZFFT( 1, nx+1, sqr_dnx, work, work, trig_xf, work2, 0 )
+      
+             DO  i = 0, (nx+1)/2
+                ar(i) = work(2*i)
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                ar(nx+1-i) = work(2*i+1)
+             ENDDO
+
+          ELSE
+
+             DO  i = 0, (nx+1)/2
+                work(2*i) = ar(i)
+             ENDDO
+             DO  i = 1, (nx+1)/2 - 1
+                work(2*i+1) = ar(nx+1-i)
+             ENDDO
+             work(1) = 0.0_wp
+             work(nx+2) = 0.0_wp
+
+             CALL ZDFFT( -1, nx+1, sqr_dnx, work, work, trig_xb, work2, 0 )
+
+             ar(0:nx) = work(0:nx)
+
+          ENDIF
+#endif
+
+       ENDIF
+
+    END SUBROUTINE fft_x_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along y-direction.
+!> Version for 2D-decomposition.
+!> It uses internal algorithms (Singleton or Temperton) or
+!> system-specific routines, if they are available.
+!> 
+!> direction:  'forward' or 'backward'
+!> ar, ar_tr:  3D data arrays 
+!>             forward:   ar: before  ar_tr: after transformation
+!>             backward:  ar_tr: before  ar: after transfosition
+!> 
+!> In case of non-overlapping transposition/transformation:
+!> nxl_y_bound = nxl_y_l = nxl_y 
+!> nxr_y_bound = nxr_y_l = nxr_y 
+!> 
+!> In case of overlapping transposition/transformation
+!> - nxl_y_bound  and  nxr_y_bound have the original values of
+!>   nxl_y, nxr_y.  ar_tr is dimensioned using these values.
+!> - nxl_y_l = nxr_y_r.  ar is dimensioned with these values, so that
+!>   transformation is carried out for a 2D-plane only.
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE fft_y( ar, direction, ar_tr, nxl_y_bound, nxr_y_bound, nxl_y_l, &
+                      nxr_y_l )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  direction  !<
+       
+       INTEGER(iwp) ::  i            !<
+       INTEGER(iwp) ::  j            !< 
+       INTEGER(iwp) ::  jshape(1)    !<
+       INTEGER(iwp) ::  k            !<
+       INTEGER(iwp) ::  nxl_y_bound  !<
+       INTEGER(iwp) ::  nxl_y_l      !<
+       INTEGER(iwp) ::  nxr_y_bound  !<
+       INTEGER(iwp) ::  nxr_y_l      !<
+
+       LOGICAL ::  forward_fft  !<
+
+       REAL(wp), DIMENSION(0:ny+2) ::  work   !<
+       REAL(wp), DIMENSION(ny+2)   ::  work1  !<
+       
+       COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
+       
+#if defined( __ibm )
+       REAL(wp), DIMENSION(nau2) ::  auy2  !<
+       REAL(wp), DIMENSION(nau2) ::  auy4  !<
+#elif defined( __nec )
+       REAL(wp), DIMENSION(6*(ny+1)) ::  work2  !<
+#endif
+
+       REAL(wp), DIMENSION(0:ny,nxl_y_l:nxr_y_l,nzb_y:nzt_y)         ::        &
+          ar     !<
+       REAL(wp), DIMENSION(0:ny,nxl_y_bound:nxr_y_bound,nzb_y:nzt_y) ::        &
+          ar_tr  !<
+
+       IF ( direction == 'forward' )  THEN
+          forward_fft = .TRUE.
+       ELSE
+          forward_fft = .FALSE.
+       ENDIF
+
+       IF ( fft_method == 'singleton-algorithm' )  THEN
+
+!
+!--       Performing the fft with singleton's software works on every system,
+!--       since it is part of the model
+          ALLOCATE( cwork(0:ny) )
+
+          IF ( forward_fft )   then
+
+             !$OMP PARALLEL PRIVATE ( cwork, i, jshape, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   DO  j = 0, ny
+                      cwork(j) = CMPLX( ar(j,i,k), KIND=wp )
+                   ENDDO
+
+                   jshape = SHAPE( cwork )
+                   CALL FFTN( cwork, jshape )
+
+                   DO  j = 0, (ny+1)/2
+                      ar_tr(j,i,k) = REAL( cwork(j), KIND=wp )
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      ar_tr(ny+1-j,i,k) = -AIMAG( cwork(j) )
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( cwork, i, jshape, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   cwork(0) = CMPLX( ar_tr(0,i,k), 0.0_wp, KIND=wp )
+                   DO  j = 1, (ny+1)/2 - 1
+                      cwork(j)      = CMPLX( ar_tr(j,i,k), -ar_tr(ny+1-j,i,k), &
+                                             KIND=wp )
+                      cwork(ny+1-j) = CMPLX( ar_tr(j,i,k),  ar_tr(ny+1-j,i,k), &
+                                             KIND=wp )
+                   ENDDO
+                   cwork((ny+1)/2) = CMPLX( ar_tr((ny+1)/2,i,k), 0.0_wp,       &
+                                            KIND=wp )
+
+                   jshape = SHAPE( cwork )
+                   CALL FFTN( cwork, jshape, inv = .TRUE. )
+
+                   DO  j = 0, ny
+                      ar(j,i,k) = REAL( cwork(j), KIND=wp )
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+
+          DEALLOCATE( cwork )
+
+       ELSEIF ( fft_method == 'temperton-algorithm' )  THEN
+
+!
+!--       Performing the fft with Temperton's software works on every system,
+!--       since it is part of the model
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, work1, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   work(0:ny) = ar(0:ny,i,k)
+                   CALL fft991cy( work, work1, trigs_y, ifax_y, 1, ny+1, ny+1, 1, -1 )
+
+                   DO  j = 0, (ny+1)/2
+                      ar_tr(j,i,k) = work(2*j)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      ar_tr(ny+1-j,i,k) = work(2*j+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, work1, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   DO  j = 0, (ny+1)/2
+                      work(2*j) = ar_tr(j,i,k)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      work(2*j+1) = ar_tr(ny+1-j,i,k)
+                   ENDDO
+                   work(1)    = 0.0_wp
+                   work(ny+2) = 0.0_wp
+
+                   CALL fft991cy( work, work1, trigs_y, ifax_y, 1, ny+1, ny+1, 1, 1 )
+                   ar(0:ny,i,k) = work(0:ny)
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+
+       ELSEIF ( fft_method == 'fftw' )  THEN
+
+#if defined( __fftw )
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   y_in(0:ny) = ar(0:ny,i,k)
+                   CALL FFTW_EXECUTE_DFT_R2C( plan_yf, y_in, y_out )
+
+                   DO  j = 0, (ny+1)/2
+                      ar_tr(j,i,k) = REAL( y_out(j), KIND=wp ) / (ny+1)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      ar_tr(ny+1-j,i,k) = AIMAG( y_out(j) ) / (ny+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   y_out(0) = CMPLX( ar_tr(0,i,k), 0.0_wp, KIND=wp )
+                   DO  j = 1, (ny+1)/2 - 1
+                      y_out(j) = CMPLX( ar_tr(j,i,k), ar_tr(ny+1-j,i,k),       &
+                                        KIND=wp )
+                   ENDDO
+                   y_out((ny+1)/2) = CMPLX( ar_tr((ny+1)/2,i,k), 0.0_wp,       &
+                                            KIND=wp )
+
+                   CALL FFTW_EXECUTE_DFT_C2R( plan_yi, y_out, y_in )
+                   ar(0:ny,i,k) = y_in(0:ny)
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+#endif
+
+       ELSEIF ( fft_method == 'system-specific' )  THEN
+
+#if defined( __ibm )
+          IF ( forward_fft)  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   CALL DRCFT( 0, ar, 1, work, 1, ny+1, 1, 1, sqr_dny, auy1,   & 
+                               nau1, auy2, nau2 )
+
+                   DO  j = 0, (ny+1)/2
+                      ar_tr(j,i,k) = work(2*j)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      ar_tr(ny+1-j,i,k) = work(2*j+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   DO  j = 0, (ny+1)/2
+                      work(2*j) = ar_tr(j,i,k)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      work(2*j+1) = ar_tr(ny+1-j,i,k)
+                   ENDDO
+                   work(1)    = 0.0_wp
+                   work(ny+2) = 0.0_wp
+
+                   CALL DCRFT( 0, work, 1, work, 1, ny+1, 1, -1, sqr_dny,      &
+                               auy3, nau1, auy4, nau2 )
+
+                   DO  j = 0, ny
+                      ar(j,i,k) = work(j)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+#elif defined( __nec )
+          IF ( forward_fft )  THEN
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   work(0:ny) = ar(0:ny,i,k)
+
+                   CALL DZFFT( 1, ny+1, sqr_dny, work, work, trig_yf, work2, 0 )
+
+                   DO  j = 0, (ny+1)/2
+                      ar_tr(j,i,k) = work(2*j)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      ar_tr(ny+1-j,i,k) = work(2*j+1)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+             !$END OMP PARALLEL
+
+          ELSE
+
+             !$OMP PARALLEL PRIVATE ( work, i, j, k )
+             !$OMP DO
+             DO  k = nzb_y, nzt_y
+                DO  i = nxl_y_l, nxr_y_l
+
+                   DO  j = 0, (ny+1)/2
+                      work(2*j) = ar_tr(j,i,k)
+                   ENDDO
+                   DO  j = 1, (ny+1)/2 - 1
+                      work(2*j+1) = ar_tr(ny+1-j,i,k)
+                   ENDDO
+                   work(1) = 0.0_wp
+                   work(ny+2) = 0.0_wp
+
+                   CALL ZDFFT( -1, ny+1, sqr_dny, work, work, trig_yb, work2, 0 )
+
+                   ar(0:ny,i,k) = work(0:ny)
+
+                ENDDO
+             ENDDO
+             !$OMP END PARALLEL
+
+          ENDIF
+#endif
+
+       ENDIF
+
+    END SUBROUTINE fft_y
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along y-direction.
+!> Version for 1D-decomposition.
+!> It uses internal algorithms (Singleton or Temperton) or
+!> system-specific routines, if they are available.
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE fft_y_1d( ar, direction )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  direction
+       
+       INTEGER(iwp) ::  j          !<
+       INTEGER(iwp) ::  jshape(1)  !<
+
+       LOGICAL ::  forward_fft  !<
+
+       REAL(wp), DIMENSION(0:ny)    ::  ar     !<
+       REAL(wp), DIMENSION(0:ny+2)  ::  work   !<
+       REAL(wp), DIMENSION(ny+2)    ::  work1  !<
+       
+       COMPLEX(wp), DIMENSION(:), ALLOCATABLE ::  cwork  !<
+       
+#if defined( __ibm )
+       REAL(wp), DIMENSION(nau2) ::  auy2  !<
+       REAL(wp), DIMENSION(nau2) ::  auy4  !<
+#elif defined( __nec )
+       REAL(wp), DIMENSION(6*(ny+1)) ::  work2  !<
+#endif
+
+       IF ( direction == 'forward' )  THEN
+          forward_fft = .TRUE.
+       ELSE
+          forward_fft = .FALSE.
+       ENDIF
+
+       IF ( fft_method == 'singleton-algorithm' )  THEN
+
+!
+!--       Performing the fft with singleton's software works on every system,
+!--       since it is part of the model
+          ALLOCATE( cwork(0:ny) )
+
+          IF ( forward_fft )  THEN
+
+             DO  j = 0, ny
+                cwork(j) = CMPLX( ar(j), KIND=wp )
+             ENDDO
+
+             jshape = SHAPE( cwork )
+             CALL FFTN( cwork, jshape )
+
+             DO  j = 0, (ny+1)/2
+                ar(j) = REAL( cwork(j), KIND=wp )
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                ar(ny+1-j) = -AIMAG( cwork(j) )
+             ENDDO
+
+          ELSE
+
+             cwork(0) = CMPLX( ar(0), 0.0_wp, KIND=wp )
+             DO  j = 1, (ny+1)/2 - 1
+                cwork(j)      = CMPLX( ar(j), -ar(ny+1-j), KIND=wp )
+                cwork(ny+1-j) = CMPLX( ar(j),  ar(ny+1-j), KIND=wp )
+             ENDDO
+             cwork((ny+1)/2) = CMPLX( ar((ny+1)/2), 0.0_wp, KIND=wp )
+
+             jshape = SHAPE( cwork )
+             CALL FFTN( cwork, jshape, inv = .TRUE. )
+
+             DO  j = 0, ny
+                ar(j) = REAL( cwork(j), KIND=wp )
+             ENDDO
+
+          ENDIF
+
+          DEALLOCATE( cwork )
+
+       ELSEIF ( fft_method == 'temperton-algorithm' )  THEN
+
+!
+!--       Performing the fft with Temperton's software works on every system,
+!--       since it is part of the model
+          IF ( forward_fft )  THEN
+
+             work(0:ny) = ar
+             CALL fft991cy( work, work1, trigs_y, ifax_y, 1, ny+1, ny+1, 1, -1 )
+
+             DO  j = 0, (ny+1)/2
+                ar(j) = work(2*j)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                ar(ny+1-j) = work(2*j+1)
+             ENDDO
+
+          ELSE
+
+             DO  j = 0, (ny+1)/2
+                work(2*j) = ar(j)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                work(2*j+1) = ar(ny+1-j)
+             ENDDO
+             work(1)    = 0.0_wp
+             work(ny+2) = 0.0_wp
+
+             CALL fft991cy( work, work1, trigs_y, ifax_y, 1, ny+1, ny+1, 1, 1 )
+             ar = work(0:ny)
+
+          ENDIF
+
+       ELSEIF ( fft_method == 'fftw' )  THEN
+
+#if defined( __fftw )
+          IF ( forward_fft )  THEN
+
+             y_in(0:ny) = ar(0:ny)
+             CALL FFTW_EXECUTE_DFT_R2C( plan_yf, y_in, y_out )
+
+             DO  j = 0, (ny+1)/2
+                ar(j) = REAL( y_out(j), KIND=wp ) / (ny+1)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                ar(ny+1-j) = AIMAG( y_out(j) ) / (ny+1)
+             ENDDO
+
+          ELSE
+
+             y_out(0) = CMPLX( ar(0), 0.0_wp, KIND=wp )
+             DO  j = 1, (ny+1)/2 - 1
+                y_out(j) = CMPLX( ar(j), ar(ny+1-j), KIND=wp )
+             ENDDO
+             y_out((ny+1)/2) = CMPLX( ar((ny+1)/2), 0.0_wp, KIND=wp )
+
+             CALL FFTW_EXECUTE_DFT_C2R( plan_yi, y_out, y_in )
+             ar(0:ny) = y_in(0:ny)
+
+          ENDIF
+#endif
+
+       ELSEIF ( fft_method == 'system-specific' )  THEN
+
+#if defined( __ibm )
+          IF ( forward_fft )  THEN
+
+             CALL DRCFT( 0, ar, 1, work, 1, ny+1, 1, 1, sqr_dny, auy1, nau1,   &
+                         auy2, nau2 )
+
+             DO  j = 0, (ny+1)/2
+                ar(j) = work(2*j)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                ar(ny+1-j) = work(2*j+1)
+             ENDDO
+
+          ELSE
+
+             DO  j = 0, (ny+1)/2
+                work(2*j) = ar(j)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                work(2*j+1) = ar(ny+1-j)
+             ENDDO
+             work(1)    = 0.0_wp
+             work(ny+2) = 0.0_wp
+
+             CALL DCRFT( 0, work, 1, work, 1, ny+1, 1, -1, sqr_dny, auy3,      &
+                         nau1, auy4, nau2 )
+
+             DO  j = 0, ny
+                ar(j) = work(j)
+             ENDDO
+
+          ENDIF
+#elif defined( __nec )
+          IF ( forward_fft )  THEN
+
+             work(0:ny) = ar(0:ny)
+
+             CALL DZFFT( 1, ny+1, sqr_dny, work, work, trig_yf, work2, 0 )
+
+             DO  j = 0, (ny+1)/2
+                ar(j) = work(2*j)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                ar(ny+1-j) = work(2*j+1)
+             ENDDO
+
+          ELSE
+
+             DO  j = 0, (ny+1)/2
+                work(2*j) = ar(j)
+             ENDDO
+             DO  j = 1, (ny+1)/2 - 1
+                work(2*j+1) = ar(ny+1-j)
+             ENDDO
+             work(1) = 0.0_wp
+             work(ny+2) = 0.0_wp
+
+             CALL ZDFFT( -1, ny+1, sqr_dny, work, work, trig_yb, work2, 0 )
+
+             ar(0:ny) = work(0:ny)
+
+          ENDIF
+#endif
+
+       ENDIF
+
+    END SUBROUTINE fft_y_1d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along x-direction.
+!> Version for 1d domain decomposition
+!> using multiple 1D FFT from Math Keisan on NEC or Temperton-algorithm
+!> (no singleton-algorithm on NEC because it does not vectorize)
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE fft_x_m( ar, direction )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  direction  !<
+       
+       INTEGER(iwp) ::  i     !<
+       INTEGER(iwp) ::  k     !<
+       INTEGER(iwp) ::  siza  !<
+#if defined( __nec )
+       INTEGER(iwp) ::  sizw
+#endif
+
+       REAL(wp), DIMENSION(0:nx,nz)       ::  ar     !<
+       REAL(wp), DIMENSION(0:nx+3,nz+1)   ::  ai     !<
+       REAL(wp), DIMENSION(6*(nx+4),nz+1) ::  work1  !<
+       
+#if defined( __nec )
+       COMPLEX(wp), DIMENSION(:,:), ALLOCATABLE ::  work
+#endif
+
+       IF ( fft_method == 'temperton-algorithm' )  THEN
+
+          siza = SIZE( ai, 1 )
+
+          IF ( direction == 'forward')  THEN
+
+             ai(0:nx,1:nz) = ar(0:nx,1:nz)
+             ai(nx+1:,:)   = 0.0_wp
+
+             CALL fft991cy( ai, work1, trigs_x, ifax_x, 1, siza, nx+1, nz, -1 )
+
+             DO  k = 1, nz
+                DO  i = 0, (nx+1)/2
+                   ar(i,k) = ai(2*i,k)
+                ENDDO
+                DO  i = 1, (nx+1)/2 - 1
+                   ar(nx+1-i,k) = ai(2*i+1,k)
+                ENDDO
+             ENDDO
+
+          ELSE
+
+             DO  k = 1, nz
+                DO  i = 0, (nx+1)/2
+                   ai(2*i,k) = ar(i,k)
+                ENDDO
+                DO  i = 1, (nx+1)/2 - 1
+                   ai(2*i+1,k) = ar(nx+1-i,k)
+                ENDDO
+                ai(1,k) = 0.0_wp
+                ai(nx+2,k) = 0.0_wp
+             ENDDO
+
+             CALL fft991cy( ai, work1, trigs_x, ifax_x, 1, siza, nx+1, nz, 1 )
+
+             ar(0:nx,1:nz) = ai(0:nx,1:nz)
+
+          ENDIF
+
+       ELSEIF ( fft_method == 'system-specific' )  THEN
+
+#if defined( __nec )
+          ALLOCATE( work((nx+4)/2+1,nz+1) )
+          siza = SIZE( ai, 1 )
+          sizw = SIZE( work, 1 )
+
+          IF ( direction == 'forward')  THEN
+
+!
+!--          Tables are initialized once more. This call should not be
+!--          necessary, but otherwise program aborts in asymmetric case
+             CALL DZFFTM( 0, nx+1, nz1, sqr_dnx, work, nx+4, work, nx+4,       &
+                          trig_xf, work1, 0 )
+
+             ai(0:nx,1:nz) = ar(0:nx,1:nz)
+             IF ( nz1 > nz )  THEN
+                ai(:,nz1) = 0.0_wp
+             ENDIF
+
+             CALL DZFFTM( 1, nx+1, nz1, sqr_dnx, ai, siza, work, sizw,         &
+                          trig_xf, work1, 0 )
+
+             DO  k = 1, nz
+                DO  i = 0, (nx+1)/2
+                   ar(i,k) = REAL( work(i+1,k), KIND=wp )
+                ENDDO
+                DO  i = 1, (nx+1)/2 - 1
+                   ar(nx+1-i,k) = AIMAG( work(i+1,k) )
+                ENDDO
+             ENDDO
+
+          ELSE
+
+!
+!--          Tables are initialized once more. This call should not be
+!--          necessary, but otherwise program aborts in asymmetric case
+             CALL ZDFFTM( 0, nx+1, nz1, sqr_dnx, work, nx+4, work, nx+4,       &
+                          trig_xb, work1, 0 )
+
+             IF ( nz1 > nz )  THEN
+                work(:,nz1) = 0.0_wp
+             ENDIF
+             DO  k = 1, nz
+                work(1,k) = CMPLX( ar(0,k), 0.0_wp, KIND=wp )
+                DO  i = 1, (nx+1)/2 - 1
+                   work(i+1,k) = CMPLX( ar(i,k), ar(nx+1-i,k), KIND=wp )
+                ENDDO
+                work(((nx+1)/2)+1,k) = CMPLX( ar((nx+1)/2,k), 0.0_wp, KIND=wp )
+             ENDDO
+
+             CALL ZDFFTM( -1, nx+1, nz1, sqr_dnx, work, sizw, ai, siza, &
+                          trig_xb, work1, 0 )
+
+             ar(0:nx,1:nz) = ai(0:nx,1:nz)
+
+          ENDIF
+
+          DEALLOCATE( work )
+#endif
+
+       ENDIF
+
+    END SUBROUTINE fft_x_m
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along y-direction.
+!> Version for 1d domain decomposition
+!> using multiple 1D FFT from Math Keisan on NEC or Temperton-algorithm
+!> (no singleton-algorithm on NEC because it does not vectorize)
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE fft_y_m( ar, ny1, direction )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  direction  !<
+       
+       INTEGER(iwp) ::  j     !< 
+       INTEGER(iwp) ::  k     !<
+       INTEGER(iwp) ::  ny1   !<
+       INTEGER(iwp) ::  siza  !<
+#if defined( __nec )
+       INTEGER(iwp) ::  sizw
+#endif
+
+       REAL(wp), DIMENSION(0:ny1,nz)      ::  ar     !<
+       REAL(wp), DIMENSION(0:ny+3,nz+1)   ::  ai     !<
+       REAL(wp), DIMENSION(6*(ny+4),nz+1) ::  work1  !<
+
+#if defined( __nec )
+       COMPLEX(wp), DIMENSION(:,:), ALLOCATABLE ::  work
+#endif
+
+
+       IF ( fft_method == 'temperton-algorithm' )  THEN
+
+          siza = SIZE( ai, 1 )
+
+          IF ( direction == 'forward')  THEN
+
+             ai(0:ny,1:nz) = ar(0:ny,1:nz)
+             ai(ny+1:,:)   = 0.0_wp
+
+             CALL fft991cy( ai, work1, trigs_y, ifax_y, 1, siza, ny+1, nz, -1 )
+
+             DO  k = 1, nz
+                DO  j = 0, (ny+1)/2
+                   ar(j,k) = ai(2*j,k)
+                ENDDO
+                DO  j = 1, (ny+1)/2 - 1
+                   ar(ny+1-j,k) = ai(2*j+1,k)
+                ENDDO
+             ENDDO
+
+          ELSE
+
+             DO  k = 1, nz
+                DO  j = 0, (ny+1)/2
+                   ai(2*j,k) = ar(j,k)
+                ENDDO
+                DO  j = 1, (ny+1)/2 - 1
+                   ai(2*j+1,k) = ar(ny+1-j,k)
+                ENDDO
+                ai(1,k) = 0.0_wp
+                ai(ny+2,k) = 0.0_wp
+             ENDDO
+
+             CALL fft991cy( ai, work1, trigs_y, ifax_y, 1, siza, ny+1, nz, 1 )
+
+             ar(0:ny,1:nz) = ai(0:ny,1:nz)
+
+          ENDIF
+
+       ELSEIF ( fft_method == 'system-specific' )  THEN
+
+#if defined( __nec )
+          ALLOCATE( work((ny+4)/2+1,nz+1) )
+          siza = SIZE( ai, 1 )
+          sizw = SIZE( work, 1 )
+
+          IF ( direction == 'forward')  THEN
+
+!
+!--          Tables are initialized once more. This call should not be
+!--          necessary, but otherwise program aborts in asymmetric case
+             CALL DZFFTM( 0, ny+1, nz1, sqr_dny, work, ny+4, work, ny+4, &
+                          trig_yf, work1, 0 )
+
+             ai(0:ny,1:nz) = ar(0:ny,1:nz)
+             IF ( nz1 > nz )  THEN
+                ai(:,nz1) = 0.0_wp
+             ENDIF
+
+             CALL DZFFTM( 1, ny+1, nz1, sqr_dny, ai, siza, work, sizw, &
+                          trig_yf, work1, 0 )
+
+             DO  k = 1, nz
+                DO  j = 0, (ny+1)/2
+                   ar(j,k) = REAL( work(j+1,k), KIND=wp )
+                ENDDO
+                DO  j = 1, (ny+1)/2 - 1
+                   ar(ny+1-j,k) = AIMAG( work(j+1,k) )
+                ENDDO
+             ENDDO
+
+          ELSE
+
+!
+!--          Tables are initialized once more. This call should not be
+!--          necessary, but otherwise program aborts in asymmetric case
+             CALL ZDFFTM( 0, ny+1, nz1, sqr_dny, work, ny+4, work, ny+4, &
+                          trig_yb, work1, 0 )
+
+             IF ( nz1 > nz )  THEN
+                work(:,nz1) = 0.0_wp
+             ENDIF
+             DO  k = 1, nz
+                work(1,k) = CMPLX( ar(0,k), 0.0_wp, KIND=wp )
+                DO  j = 1, (ny+1)/2 - 1
+                   work(j+1,k) = CMPLX( ar(j,k), ar(ny+1-j,k), KIND=wp )
+                ENDDO
+                work(((ny+1)/2)+1,k) = CMPLX( ar((ny+1)/2,k), 0.0_wp, KIND=wp )
+             ENDDO
+
+             CALL ZDFFTM( -1, ny+1, nz1, sqr_dny, work, sizw, ai, siza, &
+                          trig_yb, work1, 0 )
+
+             ar(0:ny,1:nz) = ai(0:ny,1:nz)
+
+          ENDIF
+
+          DEALLOCATE( work )
+#endif
+
+       ENDIF
+
+    END SUBROUTINE fft_y_m
+
+
+ END MODULE fft_xy
Index: /palm/tags/release-6.0/SOURCE/flow_statistics.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/flow_statistics.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/flow_statistics.f90	(revision 3477)
@@ -0,0 +1,2299 @@
+!> @file flow_statistics.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! from chemistry branch r3443, basit:
+! bug fixed in chemistry profiles
+! 
+! 3452 2018-10-30 13:13:34Z schwenkel
+! Bugfix for profiles output
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! - Minor formatting (kanani)
+! - Added  .AND. max_pr_cs > 0 before MPI_ALLREDUCE call (forkel)
+! - Data arrays, sums, sums_l, hom, hom_sum updated for chem species (basit)
+! - Directives of parallelism added for chemistry (basit)
+! - Call for chem_statistics added (basit)
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! ocean renamed ocean_mode
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3042 2018-05-25 10:44:37Z schwenkel
+! Changed the name specific humidity to mixing ratio
+! 
+! 3040 2018-05-25 10:22:08Z schwenkel
+! Comments related to the calculation of the inversion height expanded
+! 
+! 3003 2018-04-23 10:22:58Z Giersch
+! The inversion height will not be calcuated before the first timestep in 
+! case of restarts.
+! 
+! 2968 2018-04-13 11:52:24Z suehring
+! Bugfix in output of timeseries quantities in case of elevated model surfaces.
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2773 2018-01-30 14:12:54Z suehring
+! Timeseries output of surface temperature.
+! 
+! 2753 2018-01-16 14:16:49Z suehring
+! Tile approach for spectral albedo implemented. 
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Bugfix in evaluation of surface quantities in case different surface types
+! are used (MS)
+! 
+! 2674 2017-12-07 11:49:21Z suehring
+! Bugfix in output conversion of resolved-scale momentum fluxes in case of 
+! PW advections scheme.
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Modularize large-scale forcing and nudging
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Enabled output of radiation quantities for radiation_scheme = 'constant'
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! Revised numbering (removed 2 timeseries)
+! 
+! 2252 2017-06-07 09:35:37Z knoop
+! perturbation pressure now depending on flux_output_mode
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+! 
+! 2073 2016-11-30 14:34:05Z raasch
+! openmp bugfix: large scale forcing calculations cannot be executed thread
+! parallel
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2026 2016-10-18 10:27:02Z suehring
+! Bugfix, enable output of s*2.
+! Change, calculation of domain-averaged perturbation energy.
+! Some formatting adjustments.
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Removed some unneeded __rrtmg preprocessor directives
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+!
+! 1918 2016-05-27 14:35:57Z raasch
+! in case of Wicker-Skamarock scheme, calculate disturbance kinetic energy here,
+! if flow_statistics is called before the first initial time step
+!
+! 1853 2016-04-11 09:00:35Z maronga
+! Adjusted for use with radiation_scheme = constant
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! prr moved to arrays_3d
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Output of bulk microphysics simplified.
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! cpp-directives for intel openmp bug removed
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! +module netcdf_interface
+!
+! 1747 2016-02-08 12:25:53Z raasch
+! small bugfixes for accelerator version
+!
+! 1738 2015-12-18 13:56:05Z raasch
+! bugfixes for calculations in statistical regions which do not contain grid
+! points in the lowest vertical levels, mean surface level height considered
+! in the calculation of the characteristic vertical velocity,
+! old upstream parts removed
+!
+! 1709 2015-11-04 14:47:01Z maronga
+! Updated output of Obukhov length
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Revised calculation of Obukhov length. Added output of radiative heating >
+! rates for RRTMG.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1658 2015-09-18 10:52:53Z raasch
+! bugfix: temporary reduction variables in the openacc branch are now
+! initialized to zero
+!
+! 1654 2015-09-17 09:20:17Z raasch
+! FORTRAN bugfix of r1652
+!
+! 1652 2015-09-17 08:12:24Z raasch
+! bugfix in calculation of energy production by turbulent transport of TKE
+!
+! 1593 2015-05-16 13:58:02Z raasch
+! FORTRAN errors removed from openacc branch
+!
+! 1585 2015-04-30 07:05:52Z maronga
+! Added output of timeseries and profiles for RRTMG
+! 
+! 1571 2015-03-12 16:12:49Z maronga
+! Bugfix: output of rad_net and rad_sw_in
+! 
+! 1567 2015-03-10 17:57:55Z suehring
+! Reverse modifications made for monotonic limiter.
+!
+! 1557 2015-03-05 16:43:04Z suehring
+! Adjustments for monotonic limiter
+!
+! 1555 2015-03-04 17:44:27Z maronga
+! Added output of r_a and r_s.
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added suppport for land surface model and radiation model output.
+!
+! 1498 2014-12-03 14:09:51Z suehring
+! Comments added
+!
+! 1482 2014-10-18 12:34:45Z raasch
+! missing ngp_sums_ls added in accelerator version
+!
+! 1450 2014-08-21 07:31:51Z heinze
+! bugfix: calculate fac only for simulated_time >= 0.0
+!
+! 1396 2014-05-06 13:37:41Z raasch
+! bugfix: "copyin" replaced by "update device" in openacc-branch
+!
+! 1386 2014-05-05 13:55:30Z boeske
+! bugfix: simulated time before the last timestep is needed for the correct 
+! calculation of the profiles of large scale forcing tendencies 
+! 
+! 1382 2014-04-30 12:15:41Z boeske
+! Renamed variables which store large scale forcing tendencies
+! pt_lsa -> td_lsa_lpt, pt_subs -> td_sub_lpt, 
+! q_lsa  -> td_lsa_q,   q_subs  -> td_sub_q,
+! added Neumann boundary conditions for profile data output of large scale
+! advection and subsidence terms at nzt+1
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! bugfix: syntax errors removed from openacc-branch
+! missing variables added to ONLY-lists
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Output of large scale advection, large scale subsidence and nudging tendencies
+! +sums_ls_l, ngp_sums_ls, use_subsidence_tendencies
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1299 2014-03-06 13:15:21Z heinze
+! Output of large scale vertical velocity w_subs
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc "end parallel" replaced by "end parallel loop"
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! Output of ug and vg
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! ported for openACC in separate #else branch
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! comment for profile 77 added
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! ql is calculated by calc_liquid_water_content
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! openACC directive added
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! additions for two-moment cloud physics scheme:
+! +nr, qr, qc, prr
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1007 2012-09-19 14:30:36Z franke
+! Calculation of buoyancy flux for humidity in case of WS-scheme is now using
+! turbulent fluxes of WS-scheme
+! Bugfix: Calculation of subgridscale buoyancy flux for humidity and cloud
+! droplets at nzb and nzt added
+!
+! 801 2012-01-10 17:30:36Z suehring
+! Calculation of turbulent fluxes in advec_ws is now thread-safe.
+!
+! Revision 1.1  1997/08/11 06:15:17  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Compute average profiles and further average flow quantities for the different
+!> user-defined (sub-)regions. The region indexed 0 is the total model domain.
+!>
+!> @note For simplicity, nzb_s_inner and nzb_diff_s_inner are being used as a
+!>       lower vertical index for k-loops for all variables, although strictly 
+!>       speaking the k-loops would have to be split up according to the staggered 
+!>       grid. However, this implies no error since staggered velocity components 
+!>       are zero at the walls and inside buildings.
+!------------------------------------------------------------------------------!
+ SUBROUTINE flow_statistics
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, ddzw, e, heatflux_output_conversion, hyp, km, kh,         &
+               momentumflux_output_conversion, nc, nr, p, prho, prr, pt, q,    &
+               qc, ql, qr, rho_air, rho_air_zw, rho_ocean, s,                  &
+               sa, u, ug, v, vg, vpt, w, w_subs, waterflux_output_conversion,  &
+               zw, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, lv_d_cp
+
+
+    USE chem_modules,                                                          &
+        ONLY:  max_pr_cs
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_species, chem_statistics
+
+    USE control_parameters,                                                    &
+        ONLY:   air_chemistry, average_count_pr, cloud_droplets, do_sum,       &
+                dt_3d, humidity, initializing_actions, land_surface,           &
+                large_scale_forcing, large_scale_subsidence, max_pr_user,      &
+                message_string, neutral, ocean_mode, passive_scalar,           &
+                simulated_time, simulated_time_at_begin,                       &
+                use_subsidence_tendencies, use_surface_fluxes, use_top_fluxes, &
+                ws_scheme_mom, ws_scheme_sca
+
+    USE cpulog,                                                                &
+        ONLY:   cpu_log, log_point
+
+    USE grid_variables,                                                        &
+        ONLY:   ddx, ddy
+
+    USE gust_mod,                                                              &
+        ONLY:  gust_module_enabled, gust_statistics
+        
+    USE indices,                                                               &
+        ONLY:   ngp_2dh, ngp_2dh_s_inner, ngp_3d, ngp_3d_inner, ngp_sums,      &
+                ngp_sums_ls, nxl, nxr, nyn, nys, nzb, nzt, topo_min_level,     &
+                wall_flags_0
+        
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+    
+    USE land_surface_model_mod,                                                &
+        ONLY:   m_soil_h, nzb_soil, nzt_soil, t_soil_h
+
+    USE lsf_nudging_mod,                                                       &
+        ONLY:   td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, time_vert
+
+    USE netcdf_interface,                                                      &
+        ONLY:  dots_rad, dots_soil, dots_max
+
+    USE pegrid
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_scheme,                                    &
+               rad_lw_in, rad_lw_out, rad_lw_cs_hr, rad_lw_hr,                 &
+               rad_sw_in, rad_sw_out, rad_sw_cs_hr, rad_sw_hr
+
+#if defined ( __rrtmg )
+    USE radiation_model_mod,                                                   &
+        ONLY:  rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir
+#endif
+  
+    USE statistics
+
+       USE surface_mod,                                                        &
+          ONLY :  surf_def_h, surf_lsm_h, surf_usm_h
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                   !<
+    INTEGER(iwp) ::  j                   !<
+    INTEGER(iwp) ::  k                   !<
+    INTEGER(iwp) ::  ki                  !< 
+    INTEGER(iwp) ::  k_surface_level     !<
+    INTEGER(iwp) ::  m                   !< loop variable over all horizontal wall elements 
+    INTEGER(iwp) ::  l                   !< loop variable over surface facing -- up- or downward-facing
+    INTEGER(iwp) ::  nt                  !<
+!$  INTEGER(iwp) ::  omp_get_thread_num  !<
+    INTEGER(iwp) ::  sr                  !<
+    INTEGER(iwp) ::  tn                  !<
+
+    LOGICAL ::  first  !<
+    
+    REAL(wp) ::  dptdz_threshold  !< 
+    REAL(wp) ::  fac              !<
+    REAL(wp) ::  flag             !<
+    REAL(wp) ::  height           !<
+    REAL(wp) ::  pts              !<
+    REAL(wp) ::  sums_l_etot      !<
+    REAL(wp) ::  ust              !<
+    REAL(wp) ::  ust2             !<
+    REAL(wp) ::  u2               !<
+    REAL(wp) ::  vst              !<
+    REAL(wp) ::  vst2             !<
+    REAL(wp) ::  v2               !<
+    REAL(wp) ::  w2               !<
+    
+    REAL(wp) ::  dptdz(nzb+1:nzt+1)    !<
+    REAL(wp) ::  sums_ll(nzb:nzt+1,2)  !<
+
+    CALL cpu_log( log_point(10), 'flow_statistics', 'start' )
+
+
+!
+!-- To be on the safe side, check whether flow_statistics has already been
+!-- called once after the current time step
+    IF ( flow_statistics_called )  THEN
+
+       message_string = 'flow_statistics is called two times within one ' // &
+                        'timestep'
+       CALL message( 'flow_statistics', 'PA0190', 1, 2, 0, 6, 0 )
+
+    ENDIF
+
+!
+!-- Compute statistics for each (sub-)region
+    DO  sr = 0, statistic_regions
+
+!
+!--    Initialize (local) summation array
+       sums_l = 0.0_wp
+
+!
+!--    Store sums that have been computed in other subroutines in summation
+!--    array
+       sums_l(:,11,:) = sums_l_l(:,sr,:)      ! mixing length from diffusivities
+!--    WARNING: next line still has to be adjusted for OpenMP 
+       sums_l(:,21,0) = sums_wsts_bc_l(:,sr) *                                 &
+                        heatflux_output_conversion  ! heat flux from advec_s_bc
+       sums_l(nzb+9,pr_palm,0)  = sums_divold_l(sr)  ! old divergence from pres
+       sums_l(nzb+10,pr_palm,0) = sums_divnew_l(sr)  ! new divergence from pres
+
+!
+!--    When calcuating horizontally-averaged total (resolved- plus subgrid-
+!--    scale) vertical fluxes and velocity variances by using commonly-
+!--    applied Reynolds-based methods ( e.g. <w'pt'> = (w-<w>)*(pt-<pt>) )
+!--    in combination with the 5th order advection scheme, pronounced 
+!--    artificial kinks could be observed in the vertical profiles near the 
+!--    surface. Please note: these kinks were not related to the model truth, 
+!--    i.e. these kinks are just related to an evaluation problem.   
+!--    In order avoid these kinks, vertical fluxes and horizontal as well 
+!--    vertical velocity variances are calculated directly within the advection
+!--    routines, according to the numerical discretization, to evaluate the 
+!--    statistical quantities as they will appear within the prognostic 
+!--    equations.
+!--    Copy the turbulent quantities, evaluated in the advection routines to 
+!--    the local array sums_l() for further computations.
+       IF ( ws_scheme_mom .AND. sr == 0 )  THEN
+
+!
+!--       According to the Neumann bc for the horizontal velocity components,
+!--       the corresponding fluxes has to satisfiy the same bc.
+          IF ( ocean_mode )  THEN
+             sums_us2_ws_l(nzt+1,:) = sums_us2_ws_l(nzt,:)
+             sums_vs2_ws_l(nzt+1,:) = sums_vs2_ws_l(nzt,:)
+          ENDIF
+
+          DO  i = 0, threads_per_task-1
+!
+!--          Swap the turbulent quantities evaluated in advec_ws.
+             sums_l(:,13,i) = sums_wsus_ws_l(:,i)                              &
+                              * momentumflux_output_conversion ! w*u*
+             sums_l(:,15,i) = sums_wsvs_ws_l(:,i)                              &
+                              * momentumflux_output_conversion ! w*v*
+             sums_l(:,30,i) = sums_us2_ws_l(:,i)        ! u*2 
+             sums_l(:,31,i) = sums_vs2_ws_l(:,i)        ! v*2 
+             sums_l(:,32,i) = sums_ws2_ws_l(:,i)        ! w*2 
+             sums_l(:,34,i) = sums_l(:,34,i) + 0.5_wp *                        & 
+                              ( sums_us2_ws_l(:,i) + sums_vs2_ws_l(:,i) +      &
+                                sums_ws2_ws_l(:,i) )    ! e*
+          ENDDO
+
+       ENDIF
+
+       IF ( ws_scheme_sca .AND. sr == 0 )  THEN
+
+          DO  i = 0, threads_per_task-1
+             sums_l(:,17,i)                        = sums_wspts_ws_l(:,i)      &
+                                           * heatflux_output_conversion  ! w*pt*
+             IF ( ocean_mode     ) sums_l(:,66,i)  = sums_wssas_ws_l(:,i) ! w*sa*
+             IF ( humidity       ) sums_l(:,49,i)  = sums_wsqs_ws_l(:,i)       &
+                                           * waterflux_output_conversion  ! w*q*
+             IF ( passive_scalar ) sums_l(:,114,i) = sums_wsss_ws_l(:,i)  ! w*s*
+          ENDDO
+
+       ENDIF
+! 
+!--    Horizontally averaged profiles of horizontal velocities and temperature.
+!--    They must have been computed before, because they are already required
+!--    for other horizontal averages.
+       tn = 0
+       !$OMP PARALLEL PRIVATE( i, j, k, tn, flag )
+       !$ tn = omp_get_thread_num()
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j =  nys, nyn
+             DO  k = nzb, nzt+1
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                sums_l(k,1,tn)  = sums_l(k,1,tn)  + u(k,j,i)  * rmask(j,i,sr)  &
+                                                              * flag
+                sums_l(k,2,tn)  = sums_l(k,2,tn)  + v(k,j,i)  * rmask(j,i,sr)  &
+                                                              * flag
+                sums_l(k,4,tn)  = sums_l(k,4,tn)  + pt(k,j,i) * rmask(j,i,sr)  &
+                                                              * flag
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Horizontally averaged profile of salinity
+       IF ( ocean_mode )  THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j =  nys, nyn
+                DO  k = nzb, nzt+1
+                   sums_l(k,23,tn)  = sums_l(k,23,tn) + sa(k,j,i)              &
+                                    * rmask(j,i,sr)                            &
+                                    * MERGE( 1.0_wp, 0.0_wp,                   &
+                                             BTEST( wall_flags_0(k,j,i), 22 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    Horizontally averaged profiles of virtual potential temperature,
+!--    total water content, water vapor mixing ratio and liquid water potential
+!--    temperature
+       IF ( humidity )  THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j =  nys, nyn
+                DO  k = nzb, nzt+1
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                   sums_l(k,44,tn)  = sums_l(k,44,tn) +                        &
+                                      vpt(k,j,i) * rmask(j,i,sr) * flag
+                   sums_l(k,41,tn)  = sums_l(k,41,tn) +                        &
+                                      q(k,j,i) * rmask(j,i,sr)   * flag
+                ENDDO
+             ENDDO
+          ENDDO
+          IF ( bulk_cloud_model )  THEN
+             !$OMP DO
+             DO  i = nxl, nxr
+                DO  j =  nys, nyn
+                   DO  k = nzb, nzt+1
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                      sums_l(k,42,tn) = sums_l(k,42,tn) +                      &
+                                      ( q(k,j,i) - ql(k,j,i) ) * rmask(j,i,sr) &
+                                                               * flag
+                      sums_l(k,43,tn) = sums_l(k,43,tn) + (                    &
+                                      pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i) &
+                                                          ) * rmask(j,i,sr)    &
+                                                            * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+!
+!--    Horizontally averaged profiles of passive scalar
+       IF ( passive_scalar )  THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j =  nys, nyn
+                DO  k = nzb, nzt+1
+                   sums_l(k,115,tn)  = sums_l(k,115,tn) + s(k,j,i)             &
+                                    * rmask(j,i,sr)                            &
+                                    * MERGE( 1.0_wp, 0.0_wp,                   &
+                                             BTEST( wall_flags_0(k,j,i), 22 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       !$OMP END PARALLEL
+!
+!--    Summation of thread sums
+       IF ( threads_per_task > 1 )  THEN
+          DO  i = 1, threads_per_task-1
+             sums_l(:,1,0) = sums_l(:,1,0) + sums_l(:,1,i)
+             sums_l(:,2,0) = sums_l(:,2,0) + sums_l(:,2,i)
+             sums_l(:,4,0) = sums_l(:,4,0) + sums_l(:,4,i)
+             IF ( ocean_mode )  THEN
+                sums_l(:,23,0) = sums_l(:,23,0) + sums_l(:,23,i)
+             ENDIF
+             IF ( humidity )  THEN
+                sums_l(:,41,0) = sums_l(:,41,0) + sums_l(:,41,i)
+                sums_l(:,44,0) = sums_l(:,44,0) + sums_l(:,44,i)
+                IF ( bulk_cloud_model )  THEN
+                   sums_l(:,42,0) = sums_l(:,42,0) + sums_l(:,42,i)
+                   sums_l(:,43,0) = sums_l(:,43,0) + sums_l(:,43,i)
+                ENDIF
+             ENDIF
+             IF ( passive_scalar )  THEN
+                sums_l(:,115,0) = sums_l(:,115,0) + sums_l(:,115,i)
+             ENDIF
+          ENDDO
+       ENDIF
+
+#if defined( __parallel )
+!
+!--    Compute total sum from local sums
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,1,0), sums(nzb,1), nzt+2-nzb, MPI_REAL,  &
+                           MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,2,0), sums(nzb,2), nzt+2-nzb, MPI_REAL,  &
+                           MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,4,0), sums(nzb,4), nzt+2-nzb, MPI_REAL,  &
+                           MPI_SUM, comm2d, ierr )
+       IF ( ocean_mode )  THEN
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( sums_l(nzb,23,0), sums(nzb,23), nzt+2-nzb,       &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+       ENDIF
+       IF ( humidity ) THEN
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( sums_l(nzb,44,0), sums(nzb,44), nzt+2-nzb,       &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( sums_l(nzb,41,0), sums(nzb,41), nzt+2-nzb,       &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+          IF ( bulk_cloud_model ) THEN
+             IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+             CALL MPI_ALLREDUCE( sums_l(nzb,42,0), sums(nzb,42), nzt+2-nzb,    &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+             IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+             CALL MPI_ALLREDUCE( sums_l(nzb,43,0), sums(nzb,43), nzt+2-nzb,    &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+          ENDIF
+       ENDIF
+
+       IF ( passive_scalar )  THEN
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( sums_l(nzb,115,0), sums(nzb,115), nzt+2-nzb,       &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+       ENDIF
+#else
+       sums(:,1) = sums_l(:,1,0)
+       sums(:,2) = sums_l(:,2,0)
+       sums(:,4) = sums_l(:,4,0)
+       IF ( ocean_mode )  sums(:,23) = sums_l(:,23,0)
+       IF ( humidity ) THEN
+          sums(:,44) = sums_l(:,44,0)
+          sums(:,41) = sums_l(:,41,0)
+          IF ( bulk_cloud_model ) THEN
+             sums(:,42) = sums_l(:,42,0)
+             sums(:,43) = sums_l(:,43,0)
+          ENDIF
+       ENDIF
+       IF ( passive_scalar )  sums(:,115) = sums_l(:,115,0)
+#endif
+
+!
+!--    Final values are obtained by division by the total number of grid points 
+!--    used for summation. After that store profiles.
+       sums(:,1) = sums(:,1) / ngp_2dh(sr)
+       sums(:,2) = sums(:,2) / ngp_2dh(sr)
+       sums(:,4) = sums(:,4) / ngp_2dh_s_inner(:,sr)
+       hom(:,1,1,sr) = sums(:,1)             ! u
+       hom(:,1,2,sr) = sums(:,2)             ! v
+       hom(:,1,4,sr) = sums(:,4)             ! pt
+
+
+!
+!--    Salinity
+       IF ( ocean_mode )  THEN
+          sums(:,23) = sums(:,23) / ngp_2dh_s_inner(:,sr)
+          hom(:,1,23,sr) = sums(:,23)             ! sa
+       ENDIF
+
+!
+!--    Humidity and cloud parameters
+       IF ( humidity ) THEN
+          sums(:,44) = sums(:,44) / ngp_2dh_s_inner(:,sr)
+          sums(:,41) = sums(:,41) / ngp_2dh_s_inner(:,sr)
+          hom(:,1,44,sr) = sums(:,44)             ! vpt
+          hom(:,1,41,sr) = sums(:,41)             ! qv (q)
+          IF ( bulk_cloud_model ) THEN
+             sums(:,42) = sums(:,42) / ngp_2dh_s_inner(:,sr)
+             sums(:,43) = sums(:,43) / ngp_2dh_s_inner(:,sr)
+             hom(:,1,42,sr) = sums(:,42)             ! qv
+             hom(:,1,43,sr) = sums(:,43)             ! pt
+          ENDIF
+       ENDIF
+
+!
+!--    Passive scalar
+       IF ( passive_scalar )  hom(:,1,115,sr) = sums(:,115) /                  &
+            ngp_2dh_s_inner(:,sr)                    ! s 
+
+!
+!--    Horizontally averaged profiles of the remaining prognostic variables,
+!--    variances, the total and the perturbation energy (single values in last
+!--    column of sums_l) and some diagnostic quantities.
+!--    NOTE: for simplicity, nzb_s_inner is used below, although strictly 
+!--    ----  speaking the following k-loop would have to be split up and 
+!--          rearranged according to the staggered grid.
+!--          However, this implies no error since staggered velocity components
+!--          are zero at the walls and inside buildings.
+       tn = 0
+       !$OMP PARALLEL PRIVATE( i, j, k, pts, sums_ll,                          &
+       !$OMP                   sums_l_etot, tn, ust, ust2, u2, vst, vst2, v2,  &
+       !$OMP                   w2, flag, m, ki, l )
+       !$ tn = omp_get_thread_num()
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j =  nys, nyn
+             sums_l_etot = 0.0_wp
+             DO  k = nzb, nzt+1
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+!
+!--             Prognostic and diagnostic variables
+                sums_l(k,3,tn)  = sums_l(k,3,tn)  + w(k,j,i)  * rmask(j,i,sr)  &
+                                                              * flag
+                sums_l(k,8,tn)  = sums_l(k,8,tn)  + e(k,j,i)  * rmask(j,i,sr)  &
+                                                              * flag
+                sums_l(k,9,tn)  = sums_l(k,9,tn)  + km(k,j,i) * rmask(j,i,sr)  &
+                                                              * flag
+                sums_l(k,10,tn) = sums_l(k,10,tn) + kh(k,j,i) * rmask(j,i,sr)  &
+                                                              * flag
+                sums_l(k,40,tn) = sums_l(k,40,tn) + ( p(k,j,i)                 &
+                                         / momentumflux_output_conversion(k) ) &
+                                                              * flag
+
+                sums_l(k,33,tn) = sums_l(k,33,tn) + &
+                                  ( pt(k,j,i)-hom(k,1,4,sr) )**2 * rmask(j,i,sr)&
+                                                                 * flag
+
+                IF ( humidity )  THEN
+                   sums_l(k,70,tn) = sums_l(k,70,tn) + &
+                                  ( q(k,j,i)-hom(k,1,41,sr) )**2 * rmask(j,i,sr)&
+                                                                 * flag
+                ENDIF
+                IF ( passive_scalar )  THEN
+                   sums_l(k,116,tn) = sums_l(k,116,tn) + &
+                                  ( s(k,j,i)-hom(k,1,115,sr) )**2 * rmask(j,i,sr)&
+                                                                  * flag
+                ENDIF
+!
+!--             Higher moments
+!--             (Computation of the skewness of w further below)
+                sums_l(k,38,tn) = sums_l(k,38,tn) + w(k,j,i)**3 * rmask(j,i,sr) &
+                                                                * flag
+
+                sums_l_etot  = sums_l_etot + &
+                                        0.5_wp * ( u(k,j,i)**2 + v(k,j,i)**2 +  &
+                                        w(k,j,i)**2 )            * rmask(j,i,sr)&
+                                                                 * flag
+             ENDDO
+!
+!--          Total and perturbation energy for the total domain (being
+!--          collected in the last column of sums_l). Summation of these
+!--          quantities is seperated from the previous loop in order to
+!--          allow vectorization of that loop.
+             sums_l(nzb+4,pr_palm,tn) = sums_l(nzb+4,pr_palm,tn) + sums_l_etot
+!
+!--          2D-arrays (being collected in the last column of sums_l)
+             IF ( surf_def_h(0)%end_index(j,i) >=                              &
+                  surf_def_h(0)%start_index(j,i) )  THEN
+                m = surf_def_h(0)%start_index(j,i)
+                sums_l(nzb,pr_palm,tn)   = sums_l(nzb,pr_palm,tn) +            &
+                                        surf_def_h(0)%us(m)   * rmask(j,i,sr)
+                sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) +          &
+                                        surf_def_h(0)%usws(m) * rmask(j,i,sr)
+                sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) +          &
+                                        surf_def_h(0)%vsws(m) * rmask(j,i,sr)
+                sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) +          &
+                                        surf_def_h(0)%ts(m)   * rmask(j,i,sr)
+                IF ( humidity )  THEN
+                   sums_l(nzb+12,pr_palm,tn) = sums_l(nzb+12,pr_palm,tn) +     &
+                                            surf_def_h(0)%qs(m)   * rmask(j,i,sr)
+                ENDIF
+                IF ( passive_scalar )  THEN
+                   sums_l(nzb+13,pr_palm,tn) = sums_l(nzb+13,pr_palm,tn) +     &
+                                            surf_def_h(0)%ss(m)   * rmask(j,i,sr)
+                ENDIF
+!
+!--             Summation of surface temperature.
+                sums_l(nzb+14,pr_palm,tn) = sums_l(nzb+14,pr_palm,tn)   +      &
+                                            surf_def_h(0)%pt_surface(m) *      &
+                                            rmask(j,i,sr)
+             ENDIF
+             IF ( surf_lsm_h%end_index(j,i) >= surf_lsm_h%start_index(j,i) )  THEN
+                m = surf_lsm_h%start_index(j,i)
+                sums_l(nzb,pr_palm,tn)   = sums_l(nzb,pr_palm,tn) +            &
+                                        surf_lsm_h%us(m)   * rmask(j,i,sr)
+                sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) +          &
+                                        surf_lsm_h%usws(m) * rmask(j,i,sr)
+                sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) +          &
+                                        surf_lsm_h%vsws(m) * rmask(j,i,sr)
+                sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) +          &
+                                        surf_lsm_h%ts(m)   * rmask(j,i,sr)
+                IF ( humidity )  THEN
+                   sums_l(nzb+12,pr_palm,tn) = sums_l(nzb+12,pr_palm,tn) +     &
+                                            surf_lsm_h%qs(m)   * rmask(j,i,sr)
+                ENDIF
+                IF ( passive_scalar )  THEN
+                   sums_l(nzb+13,pr_palm,tn) = sums_l(nzb+13,pr_palm,tn) +     &
+                                            surf_lsm_h%ss(m)   * rmask(j,i,sr)
+                ENDIF
+!
+!--             Summation of surface temperature.
+                sums_l(nzb+14,pr_palm,tn) = sums_l(nzb+14,pr_palm,tn)   +      &
+                                            surf_lsm_h%pt_surface(m)    *      &
+                                            rmask(j,i,sr)
+             ENDIF
+             IF ( surf_usm_h%end_index(j,i) >= surf_usm_h%start_index(j,i) )  THEN
+                m = surf_usm_h%start_index(j,i)
+                sums_l(nzb,pr_palm,tn)   = sums_l(nzb,pr_palm,tn) +            &
+                                        surf_usm_h%us(m)   * rmask(j,i,sr)
+                sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) +          &
+                                        surf_usm_h%usws(m) * rmask(j,i,sr)
+                sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) +          &
+                                        surf_usm_h%vsws(m) * rmask(j,i,sr)
+                sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) +          &
+                                        surf_usm_h%ts(m)   * rmask(j,i,sr)
+                IF ( humidity )  THEN
+                   sums_l(nzb+12,pr_palm,tn) = sums_l(nzb+12,pr_palm,tn) +     &
+                                            surf_usm_h%qs(m)   * rmask(j,i,sr)
+                ENDIF
+                IF ( passive_scalar )  THEN
+                   sums_l(nzb+13,pr_palm,tn) = sums_l(nzb+13,pr_palm,tn) +     &
+                                            surf_usm_h%ss(m)   * rmask(j,i,sr)
+                ENDIF
+!
+!--             Summation of surface temperature.
+                sums_l(nzb+14,pr_palm,tn) = sums_l(nzb+14,pr_palm,tn)   +      &
+                                            surf_usm_h%pt_surface(m)    *      &
+                                            rmask(j,i,sr)
+             ENDIF
+          ENDDO
+       ENDDO
+
+!
+!--    Computation of statistics when ws-scheme is not used. Else these 
+!--    quantities are evaluated in the advection routines.
+       IF ( .NOT. ws_scheme_mom .OR. sr /= 0 .OR. simulated_time == 0.0_wp )   &
+       THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j =  nys, nyn
+                DO  k = nzb, nzt+1
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+
+                   u2   = u(k,j,i)**2
+                   v2   = v(k,j,i)**2
+                   w2   = w(k,j,i)**2
+                   ust2 = ( u(k,j,i) - hom(k,1,1,sr) )**2
+                   vst2 = ( v(k,j,i) - hom(k,1,2,sr) )**2
+
+                   sums_l(k,30,tn) = sums_l(k,30,tn) + ust2 * rmask(j,i,sr)    &
+                                                            * flag
+                   sums_l(k,31,tn) = sums_l(k,31,tn) + vst2 * rmask(j,i,sr)    &
+                                                            * flag
+                   sums_l(k,32,tn) = sums_l(k,32,tn) + w2   * rmask(j,i,sr)    &
+                                                            * flag
+!
+!--                Perturbation energy
+
+                   sums_l(k,34,tn) = sums_l(k,34,tn) + 0.5_wp *                &
+                                  ( ust2 + vst2 + w2 )      * rmask(j,i,sr)    &
+                                                            * flag
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Computaion of domain-averaged perturbation energy. Please note, 
+!--    to prevent that perturbation energy is larger (even if only slightly) 
+!--    than the total kinetic energy, calculation is based on deviations from
+!--    the horizontal mean, instead of spatial descretization of the advection
+!--    term. 
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j =  nys, nyn
+             DO  k = nzb, nzt+1
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+
+                w2   = w(k,j,i)**2
+                ust2 = ( u(k,j,i) - hom(k,1,1,sr) )**2
+                vst2 = ( v(k,j,i) - hom(k,1,2,sr) )**2
+                w2   = w(k,j,i)**2
+
+                sums_l(nzb+5,pr_palm,tn) = sums_l(nzb+5,pr_palm,tn)            &
+                                 + 0.5_wp * ( ust2 + vst2 + w2 )               &
+                                 * rmask(j,i,sr)                               &
+                                 * flag
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Horizontally averaged profiles of the vertical fluxes
+
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+!
+!--          Subgridscale fluxes (without Prandtl layer from k=nzb, 
+!--          oterwise from k=nzb+1)
+!--          NOTE: for simplicity, nzb_diff_s_inner is used below, although
+!--          ----  strictly speaking the following k-loop would have to be
+!--                split up according to the staggered grid.
+!--                However, this implies no error since staggered velocity 
+!--                components are zero at the walls and inside buildings.
+!--          Flag 23 is used to mask surface fluxes as well as model-top fluxes,
+!--          which are added further below. 
+             DO  k = nzb, nzt
+                flag = MERGE( 1.0_wp, 0.0_wp,                                  &
+                              BTEST( wall_flags_0(k,j,i), 23 ) ) *             &
+                       MERGE( 1.0_wp, 0.0_wp,                                  &
+                              BTEST( wall_flags_0(k,j,i), 9  ) )
+!
+!--             Momentum flux w"u"
+                sums_l(k,12,tn) = sums_l(k,12,tn) - 0.25_wp * (                &
+                               km(k,j,i)+km(k+1,j,i)+km(k,j,i-1)+km(k+1,j,i-1) &
+                                                           ) * (               &
+                                   ( u(k+1,j,i) - u(k,j,i)   ) * ddzu(k+1)     &
+                                 + ( w(k,j,i)   - w(k,j,i-1) ) * ddx           &
+                                                           ) * rmask(j,i,sr)   &
+                                         * rho_air_zw(k)                       &
+                                         * momentumflux_output_conversion(k)   &
+                                         * flag
+!
+!--             Momentum flux w"v"
+                sums_l(k,14,tn) = sums_l(k,14,tn) - 0.25_wp * (                &
+                               km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) &
+                                                           ) * (               &
+                                   ( v(k+1,j,i) - v(k,j,i)   ) * ddzu(k+1)     &
+                                 + ( w(k,j,i)   - w(k,j-1,i) ) * ddy           &
+                                                           ) * rmask(j,i,sr)   &
+                                         * rho_air_zw(k)                       &
+                                         * momentumflux_output_conversion(k)   &
+                                         * flag
+!
+!--             Heat flux w"pt"
+                sums_l(k,16,tn) = sums_l(k,16,tn)                              &
+                                         - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )&
+                                               * ( pt(k+1,j,i) - pt(k,j,i) )   &
+                                               * rho_air_zw(k)                 &
+                                               * heatflux_output_conversion(k) &
+                                               * ddzu(k+1) * rmask(j,i,sr)     &
+                                               * flag
+
+
+!
+!--             Salinity flux w"sa"
+                IF ( ocean_mode )  THEN
+                   sums_l(k,65,tn) = sums_l(k,65,tn)                           &
+                                         - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )&
+                                               * ( sa(k+1,j,i) - sa(k,j,i) )   &
+                                               * ddzu(k+1) * rmask(j,i,sr)     &
+                                               * flag
+                ENDIF
+
+!
+!--             Buoyancy flux, water flux (humidity flux) w"q"
+                IF ( humidity ) THEN
+                   sums_l(k,45,tn) = sums_l(k,45,tn)                           &
+                                         - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )&
+                                               * ( vpt(k+1,j,i) - vpt(k,j,i) ) &
+                                               * rho_air_zw(k)                 &
+                                               * heatflux_output_conversion(k) &
+                                               * ddzu(k+1) * rmask(j,i,sr) * flag
+                   sums_l(k,48,tn) = sums_l(k,48,tn)                           &
+                                         - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )&
+                                               * ( q(k+1,j,i) - q(k,j,i) )     &
+                                               * rho_air_zw(k)                 &
+                                               * waterflux_output_conversion(k)&
+                                               * ddzu(k+1) * rmask(j,i,sr) * flag
+
+                   IF ( bulk_cloud_model ) THEN
+                      sums_l(k,51,tn) = sums_l(k,51,tn)                        &
+                                         - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )&
+                                               * ( ( q(k+1,j,i) - ql(k+1,j,i) )&
+                                                - ( q(k,j,i) - ql(k,j,i) ) )   &
+                                               * rho_air_zw(k)                 &
+                                               * waterflux_output_conversion(k)&
+                                               * ddzu(k+1) * rmask(j,i,sr) * flag
+                   ENDIF
+                ENDIF
+
+!
+!--             Passive scalar flux
+                IF ( passive_scalar )  THEN
+                   sums_l(k,117,tn) = sums_l(k,117,tn)                         &
+                                         - 0.5_wp * ( kh(k,j,i) + kh(k+1,j,i) )&
+                                                  * ( s(k+1,j,i) - s(k,j,i) )  &
+                                                  * ddzu(k+1) * rmask(j,i,sr)  &
+                                                              * flag
+                ENDIF
+
+             ENDDO
+
+!
+!--          Subgridscale fluxes in the Prandtl layer
+             IF ( use_surface_fluxes )  THEN
+                DO  l = 0, 1
+                   ki = MERGE( -1, 0, l == 0 )
+                   IF ( surf_def_h(l)%ns >= 1 )  THEN
+                      DO  m = surf_def_h(l)%start_index(j,i),                  &
+                              surf_def_h(l)%end_index(j,i)
+                         k = surf_def_h(l)%k(m)
+
+                         sums_l(k+ki,12,tn) = sums_l(k+ki,12,tn) + &
+                                    momentumflux_output_conversion(k+ki) * &
+                                    surf_def_h(l)%usws(m) * rmask(j,i,sr)     ! w"u"
+                         sums_l(k+ki,14,tn) = sums_l(k+ki,14,tn) + &
+                                    momentumflux_output_conversion(k+ki) * &
+                                    surf_def_h(l)%vsws(m) * rmask(j,i,sr)     ! w"v"
+                         sums_l(k+ki,16,tn) = sums_l(k+ki,16,tn) + &
+                                    heatflux_output_conversion(k+ki) * &
+                                    surf_def_h(l)%shf(m)  * rmask(j,i,sr)     ! w"pt"
+                         sums_l(k+ki,58,tn) = sums_l(k+ki,58,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! u"pt"
+                         sums_l(k+ki,61,tn) = sums_l(k+ki,61,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! v"pt"
+                         IF ( ocean_mode )  THEN
+                            sums_l(k+ki,65,tn) = sums_l(k+ki,65,tn) + &
+                                       surf_def_h(l)%sasws(m) * rmask(j,i,sr)  ! w"sa"
+                         ENDIF
+                         IF ( humidity )  THEN
+                            sums_l(k+ki,48,tn) = sums_l(k+ki,48,tn) +                     &
+                                       waterflux_output_conversion(k+ki) *      &
+                                       surf_def_h(l)%qsws(m) * rmask(j,i,sr)  ! w"q" (w"qv")
+                            sums_l(k+ki,45,tn) = sums_l(k+ki,45,tn) + (                   &
+                                       ( 1.0_wp + 0.61_wp * q(k+ki,j,i) ) *     &
+                                       surf_def_h(l)%shf(m) + 0.61_wp * pt(k+ki,j,i) *      &
+                                                  surf_def_h(l)%qsws(m) )                  &
+                                       * heatflux_output_conversion(k+ki)
+                            IF ( cloud_droplets )  THEN
+                               sums_l(k+ki,45,tn) = sums_l(k+ki,45,tn) + (                &
+                                         ( 1.0_wp + 0.61_wp * q(k+ki,j,i) -     &
+                                           ql(k+ki,j,i) ) * surf_def_h(l)%shf(m) +          &
+                                           0.61_wp * pt(k+ki,j,i) * surf_def_h(l)%qsws(m) ) &
+                                          * heatflux_output_conversion(k+ki)
+                            ENDIF
+                            IF ( bulk_cloud_model )  THEN
+!
+!--                            Formula does not work if ql(k+ki) /= 0.0
+                               sums_l(k+ki,51,tn) = sums_l(k+ki,51,tn) +                  &
+                                          waterflux_output_conversion(k+ki) *   &
+                                          surf_def_h(l)%qsws(m) * rmask(j,i,sr) ! w"q" (w"qv")
+                            ENDIF
+                         ENDIF
+                         IF ( passive_scalar )  THEN
+                            sums_l(k+ki,117,tn) = sums_l(k+ki,117,tn) +                     &
+                                        surf_def_h(l)%ssws(m) * rmask(j,i,sr) ! w"s"
+                         ENDIF
+
+                      ENDDO
+
+                   ENDIF
+                ENDDO
+                IF ( surf_lsm_h%end_index(j,i) >=                              &
+                     surf_lsm_h%start_index(j,i) )  THEN
+                   m = surf_lsm_h%start_index(j,i)
+                   sums_l(nzb,12,tn) = sums_l(nzb,12,tn) + &
+                                    momentumflux_output_conversion(nzb) * &
+                                    surf_lsm_h%usws(m) * rmask(j,i,sr)     ! w"u"
+                   sums_l(nzb,14,tn) = sums_l(nzb,14,tn) + &
+                                    momentumflux_output_conversion(nzb) * &
+                                    surf_lsm_h%vsws(m) * rmask(j,i,sr)     ! w"v"
+                   sums_l(nzb,16,tn) = sums_l(nzb,16,tn) + &
+                                    heatflux_output_conversion(nzb) * &
+                                    surf_lsm_h%shf(m)  * rmask(j,i,sr)     ! w"pt"
+                   sums_l(nzb,58,tn) = sums_l(nzb,58,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! u"pt"
+                   sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! v"pt"
+                   IF ( ocean_mode )  THEN
+                      sums_l(nzb,65,tn) = sums_l(nzb,65,tn) + &
+                                       surf_lsm_h%sasws(m) * rmask(j,i,sr)  ! w"sa"
+                   ENDIF
+                   IF ( humidity )  THEN
+                      sums_l(nzb,48,tn) = sums_l(nzb,48,tn) +                     &
+                                       waterflux_output_conversion(nzb) *      &
+                                       surf_lsm_h%qsws(m) * rmask(j,i,sr)  ! w"q" (w"qv")
+                      sums_l(nzb,45,tn) = sums_l(nzb,45,tn) + (                   &
+                                       ( 1.0_wp + 0.61_wp * q(nzb,j,i) ) *     &
+                                       surf_lsm_h%shf(m) + 0.61_wp * pt(nzb,j,i) *      &
+                                                  surf_lsm_h%qsws(m) )                  &
+                                       * heatflux_output_conversion(nzb)
+                      IF ( cloud_droplets )  THEN
+                         sums_l(nzb,45,tn) = sums_l(nzb,45,tn) + (                &
+                                         ( 1.0_wp + 0.61_wp * q(nzb,j,i) -     &
+                                           ql(nzb,j,i) ) * surf_lsm_h%shf(m) +          &
+                                           0.61_wp * pt(nzb,j,i) * surf_lsm_h%qsws(m) ) &
+                                          * heatflux_output_conversion(nzb)
+                      ENDIF
+                      IF ( bulk_cloud_model )  THEN
+!
+!--                      Formula does not work if ql(nzb) /= 0.0
+                         sums_l(nzb,51,tn) = sums_l(nzb,51,tn) +                  &
+                                          waterflux_output_conversion(nzb) *   &
+                                          surf_lsm_h%qsws(m) * rmask(j,i,sr) ! w"q" (w"qv")
+                      ENDIF
+                   ENDIF
+                   IF ( passive_scalar )  THEN
+                      sums_l(nzb,117,tn) = sums_l(nzb,117,tn) +                     &
+                                        surf_lsm_h%ssws(m) * rmask(j,i,sr) ! w"s"
+                   ENDIF
+
+
+                ENDIF
+                IF ( surf_usm_h%end_index(j,i) >=                              &
+                     surf_usm_h%start_index(j,i) )  THEN
+                   m = surf_usm_h%start_index(j,i)
+                   sums_l(nzb,12,tn) = sums_l(nzb,12,tn) + &
+                                    momentumflux_output_conversion(nzb) * &
+                                    surf_usm_h%usws(m) * rmask(j,i,sr)     ! w"u"
+                   sums_l(nzb,14,tn) = sums_l(nzb,14,tn) + &
+                                    momentumflux_output_conversion(nzb) * &
+                                    surf_usm_h%vsws(m) * rmask(j,i,sr)     ! w"v"
+                   sums_l(nzb,16,tn) = sums_l(nzb,16,tn) + &
+                                    heatflux_output_conversion(nzb) * &
+                                    surf_usm_h%shf(m)  * rmask(j,i,sr)     ! w"pt"
+                   sums_l(nzb,58,tn) = sums_l(nzb,58,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! u"pt"
+                   sums_l(nzb,61,tn) = sums_l(nzb,61,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! v"pt"
+                   IF ( ocean_mode )  THEN
+                      sums_l(nzb,65,tn) = sums_l(nzb,65,tn) + &
+                                       surf_usm_h%sasws(m) * rmask(j,i,sr)  ! w"sa"
+                   ENDIF
+                   IF ( humidity )  THEN
+                      sums_l(nzb,48,tn) = sums_l(nzb,48,tn) +                     &
+                                       waterflux_output_conversion(nzb) *      &
+                                       surf_usm_h%qsws(m) * rmask(j,i,sr)  ! w"q" (w"qv")
+                      sums_l(nzb,45,tn) = sums_l(nzb,45,tn) + (                   &
+                                       ( 1.0_wp + 0.61_wp * q(nzb,j,i) ) *     &
+                                       surf_usm_h%shf(m) + 0.61_wp * pt(nzb,j,i) *      &
+                                                  surf_usm_h%qsws(m) )                  &
+                                       * heatflux_output_conversion(nzb)
+                      IF ( cloud_droplets )  THEN
+                         sums_l(nzb,45,tn) = sums_l(nzb,45,tn) + (                &
+                                         ( 1.0_wp + 0.61_wp * q(nzb,j,i) -     &
+                                           ql(nzb,j,i) ) * surf_usm_h%shf(m) +          &
+                                           0.61_wp * pt(nzb,j,i) * surf_usm_h%qsws(m) ) &
+                                          * heatflux_output_conversion(nzb)
+                      ENDIF
+                      IF ( bulk_cloud_model )  THEN
+!
+!--                      Formula does not work if ql(nzb) /= 0.0
+                         sums_l(nzb,51,tn) = sums_l(nzb,51,tn) +                  &
+                                          waterflux_output_conversion(nzb) *   &
+                                          surf_usm_h%qsws(m) * rmask(j,i,sr) ! w"q" (w"qv")
+                      ENDIF
+                   ENDIF
+                   IF ( passive_scalar )  THEN
+                      sums_l(nzb,117,tn) = sums_l(nzb,117,tn) +                     &
+                                        surf_usm_h%ssws(m) * rmask(j,i,sr) ! w"s"
+                   ENDIF
+
+
+                ENDIF
+
+             ENDIF
+
+             IF ( .NOT. neutral )  THEN
+                IF ( surf_def_h(0)%end_index(j,i) >=                           &
+                     surf_def_h(0)%start_index(j,i) )  THEN
+                   m = surf_def_h(0)%start_index(j,i)
+                   sums_l(nzb,112,tn) = sums_l(nzb,112,tn) +                   &
+                                        surf_def_h(0)%ol(m)  * rmask(j,i,sr) ! L
+                ENDIF
+                IF ( surf_lsm_h%end_index(j,i) >=                              &
+                     surf_lsm_h%start_index(j,i) )  THEN
+                   m = surf_lsm_h%start_index(j,i)
+                   sums_l(nzb,112,tn) = sums_l(nzb,112,tn) +                   &
+                                        surf_lsm_h%ol(m)  * rmask(j,i,sr) ! L
+                ENDIF
+                IF ( surf_usm_h%end_index(j,i) >=                              &
+                     surf_usm_h%start_index(j,i) )  THEN
+                   m = surf_usm_h%start_index(j,i)
+                   sums_l(nzb,112,tn) = sums_l(nzb,112,tn) +                   &
+                                        surf_usm_h%ol(m)  * rmask(j,i,sr) ! L
+                ENDIF
+             ENDIF
+
+             IF ( radiation )  THEN
+                IF ( surf_def_h(0)%end_index(j,i) >=                           &
+                     surf_def_h(0)%start_index(j,i) )  THEN
+                   m = surf_def_h(0)%start_index(j,i)
+                   sums_l(nzb,99,tn)  = sums_l(nzb,99,tn)  +                   &
+                                        surf_def_h(0)%rad_net(m) * rmask(j,i,sr)
+                   sums_l(nzb,100,tn) = sums_l(nzb,100,tn)  +                  &
+                                        surf_def_h(0)%rad_lw_in(m) * rmask(j,i,sr)
+                   sums_l(nzb,101,tn) = sums_l(nzb,101,tn)  +                  &
+                                        surf_def_h(0)%rad_lw_out(m) * rmask(j,i,sr)
+                   sums_l(nzb,102,tn) = sums_l(nzb,102,tn)  +                  &
+                                        surf_def_h(0)%rad_sw_in(m) * rmask(j,i,sr)
+                   sums_l(nzb,103,tn) = sums_l(nzb,103,tn)  +                  &
+                                        surf_def_h(0)%rad_sw_out(m) * rmask(j,i,sr)
+                ENDIF
+                IF ( surf_lsm_h%end_index(j,i) >=                              &
+                     surf_lsm_h%start_index(j,i) )  THEN
+                   m = surf_lsm_h%start_index(j,i)
+                   sums_l(nzb,99,tn)  = sums_l(nzb,99,tn)  +                   &
+                                        surf_lsm_h%rad_net(m) * rmask(j,i,sr)
+                   sums_l(nzb,100,tn) = sums_l(nzb,100,tn)  +                  &
+                                        surf_lsm_h%rad_lw_in(m) * rmask(j,i,sr)
+                   sums_l(nzb,101,tn) = sums_l(nzb,101,tn)  +                  &
+                                        surf_lsm_h%rad_lw_out(m) * rmask(j,i,sr)
+                   sums_l(nzb,102,tn) = sums_l(nzb,102,tn)  +                  &
+                                        surf_lsm_h%rad_sw_in(m) * rmask(j,i,sr)
+                   sums_l(nzb,103,tn) = sums_l(nzb,103,tn)  +                  &
+                                        surf_lsm_h%rad_sw_out(m) * rmask(j,i,sr)
+                ENDIF
+                IF ( surf_usm_h%end_index(j,i) >=                              &
+                     surf_usm_h%start_index(j,i) )  THEN
+                   m = surf_usm_h%start_index(j,i)
+                   sums_l(nzb,99,tn)  = sums_l(nzb,99,tn)  +                   &
+                                        surf_usm_h%rad_net(m) * rmask(j,i,sr)
+                   sums_l(nzb,100,tn) = sums_l(nzb,100,tn)  +                  &
+                                        surf_usm_h%rad_lw_in(m) * rmask(j,i,sr)
+                   sums_l(nzb,101,tn) = sums_l(nzb,101,tn)  +                  &
+                                        surf_usm_h%rad_lw_out(m) * rmask(j,i,sr)
+                   sums_l(nzb,102,tn) = sums_l(nzb,102,tn)  +                  &
+                                        surf_usm_h%rad_sw_in(m) * rmask(j,i,sr)
+                   sums_l(nzb,103,tn) = sums_l(nzb,103,tn)  +                  &
+                                        surf_usm_h%rad_sw_out(m) * rmask(j,i,sr)
+                ENDIF
+
+#if defined ( __rrtmg )
+                IF ( radiation_scheme == 'rrtmg' )  THEN
+
+                   IF ( surf_def_h(0)%end_index(j,i) >=                        &
+                        surf_def_h(0)%start_index(j,i) )  THEN
+                      m = surf_def_h(0)%start_index(j,i)
+                      sums_l(nzb,108,tn)  = sums_l(nzb,108,tn)  +              &
+                                   surf_def_h(0)%rrtm_aldif(0,m) * rmask(j,i,sr)
+                      sums_l(nzb,109,tn) = sums_l(nzb,109,tn)  +               &
+                                   surf_def_h(0)%rrtm_aldir(0,m) * rmask(j,i,sr)
+                      sums_l(nzb,110,tn) = sums_l(nzb,110,tn)  +               &
+                                   surf_def_h(0)%rrtm_asdif(0,m) * rmask(j,i,sr)
+                      sums_l(nzb,111,tn) = sums_l(nzb,111,tn)  +               &
+                                   surf_def_h(0)%rrtm_asdir(0,m) * rmask(j,i,sr)
+                   ENDIF
+                   IF ( surf_lsm_h%end_index(j,i) >=                           &
+                        surf_lsm_h%start_index(j,i) )  THEN
+                      m = surf_lsm_h%start_index(j,i)
+                      sums_l(nzb,108,tn)  = sums_l(nzb,108,tn)  +              &
+                               SUM( surf_lsm_h%frac(:,m) *                     &
+                                    surf_lsm_h%rrtm_aldif(:,m) ) * rmask(j,i,sr)
+                      sums_l(nzb,109,tn) = sums_l(nzb,109,tn)  +               &
+                               SUM( surf_lsm_h%frac(:,m) *                     &
+                                    surf_lsm_h%rrtm_aldir(:,m) ) * rmask(j,i,sr)
+                      sums_l(nzb,110,tn) = sums_l(nzb,110,tn)  +               &
+                               SUM( surf_lsm_h%frac(:,m) *                     &
+                                    surf_lsm_h%rrtm_asdif(:,m) ) * rmask(j,i,sr)
+                      sums_l(nzb,111,tn) = sums_l(nzb,111,tn)  +               &
+                               SUM( surf_lsm_h%frac(:,m) *                     &
+                                    surf_lsm_h%rrtm_asdir(:,m) ) * rmask(j,i,sr)
+                   ENDIF
+                   IF ( surf_usm_h%end_index(j,i) >=                           &
+                        surf_usm_h%start_index(j,i) )  THEN
+                      m = surf_usm_h%start_index(j,i)
+                      sums_l(nzb,108,tn)  = sums_l(nzb,108,tn)  +              &
+                               SUM( surf_usm_h%frac(:,m) *                     &
+                                    surf_usm_h%rrtm_aldif(:,m) ) * rmask(j,i,sr)
+                      sums_l(nzb,109,tn) = sums_l(nzb,109,tn)  +               &
+                               SUM( surf_usm_h%frac(:,m) *                     &
+                                    surf_usm_h%rrtm_aldir(:,m) ) * rmask(j,i,sr)
+                      sums_l(nzb,110,tn) = sums_l(nzb,110,tn)  +               &
+                               SUM( surf_usm_h%frac(:,m) *                     &
+                                    surf_usm_h%rrtm_asdif(:,m) ) * rmask(j,i,sr)
+                      sums_l(nzb,111,tn) = sums_l(nzb,111,tn)  +               &
+                               SUM( surf_usm_h%frac(:,m) *                     &
+                                    surf_usm_h%rrtm_asdir(:,m) ) * rmask(j,i,sr)
+                   ENDIF
+
+                ENDIF
+#endif
+             ENDIF
+!
+!--          Subgridscale fluxes at the top surface
+             IF ( use_top_fluxes )  THEN
+                m = surf_def_h(2)%start_index(j,i)
+                sums_l(nzt:nzt+1,12,tn) = sums_l(nzt:nzt+1,12,tn) + &
+                                    momentumflux_output_conversion(nzt:nzt+1) * &
+                                    surf_def_h(2)%usws(m) * rmask(j,i,sr)    ! w"u"
+                sums_l(nzt:nzt+1,14,tn) = sums_l(nzt:nzt+1,14,tn) + &
+                                    momentumflux_output_conversion(nzt:nzt+1) * &
+                                    surf_def_h(2)%vsws(m) * rmask(j,i,sr)    ! w"v"
+                sums_l(nzt:nzt+1,16,tn) = sums_l(nzt:nzt+1,16,tn) + &
+                                    heatflux_output_conversion(nzt:nzt+1) * &
+                                    surf_def_h(2)%shf(m)  * rmask(j,i,sr)   ! w"pt"
+                sums_l(nzt:nzt+1,58,tn) = sums_l(nzt:nzt+1,58,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! u"pt"
+                sums_l(nzt:nzt+1,61,tn) = sums_l(nzt:nzt+1,61,tn) + &
+                                    0.0_wp * rmask(j,i,sr)        ! v"pt" 
+
+                IF ( ocean_mode )  THEN
+                   sums_l(nzt,65,tn) = sums_l(nzt,65,tn) + &
+                                       surf_def_h(2)%sasws(m) * rmask(j,i,sr)  ! w"sa"
+                ENDIF
+                IF ( humidity )  THEN
+                   sums_l(nzt,48,tn) = sums_l(nzt,48,tn) +                     &
+                                       waterflux_output_conversion(nzt) *      &
+                                       surf_def_h(2)%qsws(m) * rmask(j,i,sr) ! w"q" (w"qv")
+                   sums_l(nzt,45,tn) = sums_l(nzt,45,tn) + (                   &
+                                       ( 1.0_wp + 0.61_wp * q(nzt,j,i) ) *     &
+                                       surf_def_h(2)%shf(m) +                  &
+                                       0.61_wp * pt(nzt,j,i) *    &
+                                       surf_def_h(2)%qsws(m) )      &
+                                       * heatflux_output_conversion(nzt)
+                   IF ( cloud_droplets )  THEN
+                      sums_l(nzt,45,tn) = sums_l(nzt,45,tn) + (                &
+                                          ( 1.0_wp + 0.61_wp * q(nzt,j,i) -    &
+                                            ql(nzt,j,i) ) *                    &
+                                            surf_def_h(2)%shf(m) +             &
+                                           0.61_wp * pt(nzt,j,i) *             &
+                                           surf_def_h(2)%qsws(m) )&
+                                           * heatflux_output_conversion(nzt)
+                   ENDIF
+                   IF ( bulk_cloud_model )  THEN
+!
+!--                   Formula does not work if ql(nzb) /= 0.0
+                      sums_l(nzt,51,tn) = sums_l(nzt,51,tn) + &   ! w"q" (w"qv")
+                                          waterflux_output_conversion(nzt) *   &
+                                          surf_def_h(2)%qsws(m) * rmask(j,i,sr)
+                   ENDIF
+                ENDIF
+                IF ( passive_scalar )  THEN
+                   sums_l(nzt,117,tn) = sums_l(nzt,117,tn) + &
+                                        surf_def_h(2)%ssws(m) * rmask(j,i,sr) ! w"s"
+                ENDIF
+             ENDIF
+
+!
+!--          Resolved fluxes (can be computed for all horizontal points)
+!--          NOTE: for simplicity, nzb_s_inner is used below, although strictly 
+!--          ----  speaking the following k-loop would have to be split up and 
+!--                rearranged according to the staggered grid.
+             DO  k = nzb, nzt
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 22 ) )
+                ust = 0.5_wp * ( u(k,j,i)   - hom(k,1,1,sr) +                  &
+                                 u(k+1,j,i) - hom(k+1,1,1,sr) )
+                vst = 0.5_wp * ( v(k,j,i)   - hom(k,1,2,sr) +                  &
+                                 v(k+1,j,i) - hom(k+1,1,2,sr) )
+                pts = 0.5_wp * ( pt(k,j,i)   - hom(k,1,4,sr) +                 &
+                                 pt(k+1,j,i) - hom(k+1,1,4,sr) )
+
+!--             Higher moments
+                sums_l(k,35,tn) = sums_l(k,35,tn) + pts * w(k,j,i)**2 *        &
+                                                    rmask(j,i,sr) * flag
+                sums_l(k,36,tn) = sums_l(k,36,tn) + pts**2 * w(k,j,i) *        &
+                                                    rmask(j,i,sr) * flag
+
+!
+!--             Salinity flux and density (density does not belong to here,
+!--             but so far there is no other suitable place to calculate)
+                IF ( ocean_mode )  THEN
+                   IF( .NOT. ws_scheme_sca .OR. sr /= 0 )  THEN
+                      pts = 0.5_wp * ( sa(k,j,i)   - hom(k,1,23,sr) +          &
+                                       sa(k+1,j,i) - hom(k+1,1,23,sr) )
+                      sums_l(k,66,tn) = sums_l(k,66,tn) + pts * w(k,j,i) *     &
+                                        rmask(j,i,sr) * flag
+                   ENDIF
+                   sums_l(k,64,tn) = sums_l(k,64,tn) + rho_ocean(k,j,i) *      &
+                                                       rmask(j,i,sr) * flag
+                   sums_l(k,71,tn) = sums_l(k,71,tn) + prho(k,j,i) *           &
+                                                       rmask(j,i,sr) * flag
+                ENDIF
+
+!
+!--             Buoyancy flux, water flux, humidity flux, liquid water
+!--             content, rain drop concentration and rain water content
+                IF ( humidity )  THEN
+                   IF ( bulk_cloud_model .OR. cloud_droplets )  THEN
+                      pts = 0.5_wp * ( vpt(k,j,i)   - hom(k,1,44,sr) +         &
+                                    vpt(k+1,j,i) - hom(k+1,1,44,sr) )
+                      sums_l(k,46,tn) = sums_l(k,46,tn) + pts * w(k,j,i) *     &
+                                               heatflux_output_conversion(k) * &
+                                                          rmask(j,i,sr) * flag
+                      sums_l(k,54,tn) = sums_l(k,54,tn) + ql(k,j,i) * rmask(j,i,sr) &
+                                                                    * flag
+
+                      IF ( .NOT. cloud_droplets )  THEN
+                         pts = 0.5_wp *                                        &
+                              ( ( q(k,j,i) - ql(k,j,i) ) -                     &
+                              hom(k,1,42,sr) +                                 &
+                              ( q(k+1,j,i) - ql(k+1,j,i) ) -                   &
+                              hom(k+1,1,42,sr) )
+                         sums_l(k,52,tn) = sums_l(k,52,tn) + pts * w(k,j,i) *  &
+                                             waterflux_output_conversion(k) *  &
+                                                             rmask(j,i,sr)  *  &
+                                                             flag
+                         sums_l(k,75,tn) = sums_l(k,75,tn) + qc(k,j,i) *       &
+                                                             rmask(j,i,sr) *   &
+                                                             flag
+                         sums_l(k,76,tn) = sums_l(k,76,tn) + prr(k,j,i) *      &
+                                                             rmask(j,i,sr) *   &
+                                                             flag
+                         IF ( microphysics_morrison )  THEN
+                            sums_l(k,123,tn) = sums_l(k,123,tn) + nc(k,j,i) *  &
+                                                                rmask(j,i,sr) *&
+                                                                flag
+                         ENDIF
+                         IF ( microphysics_seifert )  THEN
+                            sums_l(k,73,tn) = sums_l(k,73,tn) + nr(k,j,i) *    &
+                                                                rmask(j,i,sr) *&
+                                                                flag 
+                            sums_l(k,74,tn) = sums_l(k,74,tn) + qr(k,j,i) *    &
+                                                                rmask(j,i,sr) *&
+                                                                flag
+                         ENDIF
+                      ENDIF
+
+                   ELSE
+                      IF( .NOT. ws_scheme_sca .OR. sr /= 0 )  THEN
+                         pts = 0.5_wp * ( vpt(k,j,i)   - hom(k,1,44,sr) +      &
+                                          vpt(k+1,j,i) - hom(k+1,1,44,sr) )
+                         sums_l(k,46,tn) = sums_l(k,46,tn) + pts * w(k,j,i) *  &
+                                              heatflux_output_conversion(k) *  &
+                                                             rmask(j,i,sr)  *  &
+                                                             flag
+                      ELSE IF ( ws_scheme_sca .AND. sr == 0 )  THEN
+                         sums_l(k,46,tn) = ( ( 1.0_wp + 0.61_wp *              & 
+                                               hom(k,1,41,sr) ) *              &
+                                             sums_l(k,17,tn) +                 &
+                                             0.61_wp * hom(k,1,4,sr) *         &
+                                             sums_l(k,49,tn)                   &
+                                           ) * heatflux_output_conversion(k) * &
+                                               flag
+                      END IF
+                   END IF
+                ENDIF
+!
+!--             Passive scalar flux
+                IF ( passive_scalar .AND. ( .NOT. ws_scheme_sca                &
+                     .OR. sr /= 0 ) )  THEN
+                   pts = 0.5_wp * ( s(k,j,i)   - hom(k,1,115,sr) +             &
+                                    s(k+1,j,i) - hom(k+1,1,115,sr) )
+                   sums_l(k,114,tn) = sums_l(k,114,tn) + pts * w(k,j,i) *      &
+                                                       rmask(j,i,sr) * flag
+                ENDIF
+
+!
+!--             Energy flux w*e*
+!--             has to be adjusted
+                sums_l(k,37,tn) = sums_l(k,37,tn) + w(k,j,i) * 0.5_wp *        &
+                                             ( ust**2 + vst**2 + w(k,j,i)**2 ) &
+                                           * rho_air_zw(k)                     &
+                                           * momentumflux_output_conversion(k) &
+                                           * rmask(j,i,sr) * flag
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+!
+!--    Treat land-surface quantities according to new wall model structure. 
+       IF ( land_surface )  THEN
+          tn = 0
+          !$OMP PARALLEL PRIVATE( i, j, m, tn )
+          !$ tn = omp_get_thread_num()
+          !$OMP DO
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+        
+             IF ( i >= nxl  .AND.  i <= nxr  .AND.                             &
+                  j >= nys  .AND.  j <= nyn )  THEN 
+                sums_l(nzb,93,tn)  = sums_l(nzb,93,tn) + surf_lsm_h%ghf(m)
+                sums_l(nzb,94,tn)  = sums_l(nzb,94,tn) + surf_lsm_h%qsws_liq(m)
+                sums_l(nzb,95,tn)  = sums_l(nzb,95,tn) + surf_lsm_h%qsws_soil(m)
+                sums_l(nzb,96,tn)  = sums_l(nzb,96,tn) + surf_lsm_h%qsws_veg(m)
+                sums_l(nzb,97,tn)  = sums_l(nzb,97,tn) + surf_lsm_h%r_a(m)
+                sums_l(nzb,98,tn) = sums_l(nzb,98,tn)+ surf_lsm_h%r_s(m)
+             ENDIF
+          ENDDO
+          !$OMP END PARALLEL
+
+          tn = 0
+          !$OMP PARALLEL PRIVATE( i, j, k, m, tn )
+          !$ tn = omp_get_thread_num()
+          !$OMP DO
+          DO  m = 1, surf_lsm_h%ns
+
+             i = surf_lsm_h%i(m)            
+             j = surf_lsm_h%j(m)
+
+             IF ( i >= nxl  .AND.  i <= nxr  .AND.                             &
+                  j >= nys  .AND.  j <= nyn )  THEN 
+
+                DO  k = nzb_soil, nzt_soil
+                   sums_l(k,89,tn)  = sums_l(k,89,tn)  + t_soil_h%var_2d(k,m)  &
+                                      * rmask(j,i,sr)
+                   sums_l(k,91,tn)  = sums_l(k,91,tn)  + m_soil_h%var_2d(k,m)  &
+                                      * rmask(j,i,sr)
+                ENDDO
+             ENDIF
+          ENDDO
+          !$OMP END PARALLEL
+       ENDIF
+!
+!--    For speed optimization fluxes which have been computed in part directly
+!--    inside the WS advection routines are treated seperatly
+!--    Momentum fluxes first:
+
+       tn = 0
+       !$OMP PARALLEL PRIVATE( i, j, k, tn, flag )
+       !$ tn = omp_get_thread_num()
+       IF ( .NOT. ws_scheme_mom .OR. sr /= 0  )  THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt
+!
+!--                Flag 23 is used to mask surface fluxes as well as model-top 
+!--                fluxes, which are added further below. 
+                   flag = MERGE( 1.0_wp, 0.0_wp,                               &
+                                 BTEST( wall_flags_0(k,j,i), 23 ) ) *          &
+                          MERGE( 1.0_wp, 0.0_wp,                               &
+                                 BTEST( wall_flags_0(k,j,i), 9  ) )
+
+                   ust = 0.5_wp * ( u(k,j,i)   - hom(k,1,1,sr) +               &
+                                    u(k+1,j,i) - hom(k+1,1,1,sr) )
+                   vst = 0.5_wp * ( v(k,j,i)   - hom(k,1,2,sr) +               &
+                                    v(k+1,j,i) - hom(k+1,1,2,sr) )
+!
+!--                Momentum flux w*u*
+                   sums_l(k,13,tn) = sums_l(k,13,tn) + 0.5_wp *                &
+                                                     ( w(k,j,i-1) + w(k,j,i) ) &
+                                           * rho_air_zw(k)                     &
+                                           * momentumflux_output_conversion(k) &
+                                                     * ust * rmask(j,i,sr)     &
+                                                           * flag
+!
+!--                Momentum flux w*v*
+                   sums_l(k,15,tn) = sums_l(k,15,tn) + 0.5_wp *                &
+                                                     ( w(k,j-1,i) + w(k,j,i) ) &
+                                           * rho_air_zw(k)                     &
+                                           * momentumflux_output_conversion(k) &
+                                                     * vst * rmask(j,i,sr)     &
+                                                           * flag
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ENDIF
+       IF ( .NOT. ws_scheme_sca .OR. sr /= 0 )  THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp,                               &
+                                 BTEST( wall_flags_0(k,j,i), 23 ) ) *          &
+                          MERGE( 1.0_wp, 0.0_wp,                               &
+                                 BTEST( wall_flags_0(k,j,i), 9  ) )
+!
+!--                Vertical heat flux
+                   sums_l(k,17,tn) = sums_l(k,17,tn) + 0.5_wp *                &
+                           ( pt(k,j,i)   - hom(k,1,4,sr) +                     &
+                             pt(k+1,j,i) - hom(k+1,1,4,sr) )                   &
+                           * heatflux_output_conversion(k)                     &
+                           * w(k,j,i) * rmask(j,i,sr) * flag
+                   IF ( humidity )  THEN
+                      pts = 0.5_wp * ( q(k,j,i)   - hom(k,1,41,sr) +           &
+                                      q(k+1,j,i) - hom(k+1,1,41,sr) )
+                      sums_l(k,49,tn) = sums_l(k,49,tn) + pts * w(k,j,i) *     &
+                                       waterflux_output_conversion(k) *        &
+                                       rmask(j,i,sr) * flag
+                   ENDIF
+                   IF ( passive_scalar )  THEN
+                      pts = 0.5_wp * ( s(k,j,i)   - hom(k,1,115,sr) +           &
+                                      s(k+1,j,i) - hom(k+1,1,115,sr) )
+                      sums_l(k,114,tn) = sums_l(k,114,tn) + pts * w(k,j,i) *    &
+                                        rmask(j,i,sr) * flag
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!--    Density at top follows Neumann condition
+       IF ( ocean_mode )  THEN
+          sums_l(nzt+1,64,tn) = sums_l(nzt,64,tn)
+          sums_l(nzt+1,71,tn) = sums_l(nzt,71,tn)
+       ENDIF
+
+!
+!--    Divergence of vertical flux of resolved scale energy and pressure
+!--    fluctuations as well as flux of pressure fluctuation itself (68).
+!--    First calculate the products, then the divergence.
+!--    Calculation is time consuming. Do it only, if profiles shall be plotted.
+       IF ( hom(nzb+1,2,55,0) /= 0.0_wp  .OR.  hom(nzb+1,2,68,0) /= 0.0_wp )   &
+       THEN
+          sums_ll = 0.0_wp  ! local array
+
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                   sums_ll(k,1) = sums_ll(k,1) + 0.5_wp * w(k,j,i) * (         &
+                  ( 0.25_wp * ( u(k,j,i)+u(k+1,j,i)+u(k,j,i+1)+u(k+1,j,i+1) )  &
+                            - 0.5_wp * ( hom(k,1,1,sr) + hom(k+1,1,1,sr) ) )**2&
+                + ( 0.25_wp * ( v(k,j,i)+v(k+1,j,i)+v(k,j+1,i)+v(k+1,j+1,i) )  &
+                            - 0.5_wp * ( hom(k,1,2,sr) + hom(k+1,1,2,sr) ) )**2&
+                + w(k,j,i)**2                                        ) * flag
+
+                   sums_ll(k,2) = sums_ll(k,2) + 0.5_wp * w(k,j,i)             &
+                                       * ( ( p(k,j,i) + p(k+1,j,i) )           &
+                                         / momentumflux_output_conversion(k) ) &
+                                       * flag
+
+                ENDDO
+             ENDDO
+          ENDDO
+          sums_ll(0,1)     = 0.0_wp    ! because w is zero at the bottom
+          sums_ll(nzt+1,1) = 0.0_wp
+          sums_ll(0,2)     = 0.0_wp
+          sums_ll(nzt+1,2) = 0.0_wp
+
+          DO  k = nzb+1, nzt
+             sums_l(k,55,tn) = ( sums_ll(k,1) - sums_ll(k-1,1) ) * ddzw(k)
+             sums_l(k,56,tn) = ( sums_ll(k,2) - sums_ll(k-1,2) ) * ddzw(k)
+             sums_l(k,68,tn) = sums_ll(k,2)
+          ENDDO
+          sums_l(nzb,55,tn) = sums_l(nzb+1,55,tn)
+          sums_l(nzb,56,tn) = sums_l(nzb+1,56,tn)
+          sums_l(nzb,68,tn) = 0.0_wp    ! because w* = 0 at nzb
+
+       ENDIF
+
+!
+!--    Divergence of vertical flux of SGS TKE and the flux itself (69)
+       IF ( hom(nzb+1,2,57,0) /= 0.0_wp  .OR.  hom(nzb+1,2,69,0) /= 0.0_wp )   &
+       THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                   sums_l(k,57,tn) = sums_l(k,57,tn) - 0.5_wp * (              &
+                   (km(k,j,i)+km(k+1,j,i)) * (e(k+1,j,i)-e(k,j,i)) * ddzu(k+1) &
+                 - (km(k-1,j,i)+km(k,j,i)) * (e(k,j,i)-e(k-1,j,i)) * ddzu(k)   &
+                                                                ) * ddzw(k)    &
+                                                                  * flag
+
+                   sums_l(k,69,tn) = sums_l(k,69,tn) - 0.5_wp * (              &
+                   (km(k,j,i)+km(k+1,j,i)) * (e(k+1,j,i)-e(k,j,i)) * ddzu(k+1) &
+                                                                )  * flag
+
+                ENDDO
+             ENDDO
+          ENDDO
+          sums_l(nzb,57,tn) = sums_l(nzb+1,57,tn)
+          sums_l(nzb,69,tn) = sums_l(nzb+1,69,tn)
+
+       ENDIF
+
+!
+!--    Horizontal heat fluxes (subgrid, resolved, total). 
+!--    Do it only, if profiles shall be plotted. 
+       IF ( hom(nzb+1,2,58,0) /= 0.0_wp ) THEN
+
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--                Subgrid horizontal heat fluxes u"pt", v"pt"
+                   sums_l(k,58,tn) = sums_l(k,58,tn) - 0.5_wp *                &
+                                                   ( kh(k,j,i) + kh(k,j,i-1) ) &
+                                                 * ( pt(k,j,i-1) - pt(k,j,i) ) &
+                                               * rho_air_zw(k)                 &
+                                               * heatflux_output_conversion(k) &
+                                                 * ddx * rmask(j,i,sr) * flag
+                   sums_l(k,61,tn) = sums_l(k,61,tn) - 0.5_wp *                &
+                                                   ( kh(k,j,i) + kh(k,j-1,i) ) &
+                                                 * ( pt(k,j-1,i) - pt(k,j,i) ) &
+                                               * rho_air_zw(k)                 &
+                                               * heatflux_output_conversion(k) &
+                                                 * ddy * rmask(j,i,sr) * flag
+!
+!--                Resolved horizontal heat fluxes u*pt*, v*pt*
+                   sums_l(k,59,tn) = sums_l(k,59,tn) +                         &
+                                                  ( u(k,j,i) - hom(k,1,1,sr) ) &
+                                    * 0.5_wp * ( pt(k,j,i-1) - hom(k,1,4,sr) + &
+                                                 pt(k,j,i)   - hom(k,1,4,sr) ) &
+                                               * heatflux_output_conversion(k) &
+                                               * flag
+                   pts = 0.5_wp * ( pt(k,j-1,i) - hom(k,1,4,sr) +              &
+                                    pt(k,j,i)   - hom(k,1,4,sr) )
+                   sums_l(k,62,tn) = sums_l(k,62,tn) +                         &
+                                                  ( v(k,j,i) - hom(k,1,2,sr) ) &
+                                    * 0.5_wp * ( pt(k,j-1,i) - hom(k,1,4,sr) + &
+                                                 pt(k,j,i)   - hom(k,1,4,sr) ) &
+                                               * heatflux_output_conversion(k) &
+                                               * flag
+                ENDDO
+             ENDDO
+          ENDDO
+!
+!--       Fluxes at the surface must be zero (e.g. due to the Prandtl-layer)
+          sums_l(nzb,58,tn) = 0.0_wp
+          sums_l(nzb,59,tn) = 0.0_wp
+          sums_l(nzb,60,tn) = 0.0_wp
+          sums_l(nzb,61,tn) = 0.0_wp
+          sums_l(nzb,62,tn) = 0.0_wp
+          sums_l(nzb,63,tn) = 0.0_wp
+
+       ENDIF
+       !$OMP END PARALLEL
+
+!
+!--    Collect current large scale advection and subsidence tendencies for
+!--    data output
+       IF ( large_scale_forcing  .AND.  ( simulated_time > 0.0_wp ) )  THEN
+!
+!--       Interpolation in time of LSF_DATA 
+          nt = 1
+          DO WHILE ( simulated_time - dt_3d > time_vert(nt) )
+             nt = nt + 1
+          ENDDO
+          IF ( simulated_time - dt_3d /= time_vert(nt) )  THEN
+            nt = nt - 1
+          ENDIF
+
+          fac = ( simulated_time - dt_3d - time_vert(nt) )                     &
+                / ( time_vert(nt+1)-time_vert(nt) )
+
+
+          DO  k = nzb, nzt
+             sums_ls_l(k,0) = td_lsa_lpt(k,nt)                                 &
+                              + fac * ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) )
+             sums_ls_l(k,1) = td_lsa_q(k,nt)                                   &
+                              + fac * ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) )
+          ENDDO
+
+          sums_ls_l(nzt+1,0) = sums_ls_l(nzt,0)
+          sums_ls_l(nzt+1,1) = sums_ls_l(nzt,1)
+
+          IF ( large_scale_subsidence .AND. use_subsidence_tendencies )  THEN
+
+             DO  k = nzb, nzt
+                sums_ls_l(k,2) = td_sub_lpt(k,nt) + fac *                      &
+                                 ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) )
+                sums_ls_l(k,3) = td_sub_q(k,nt) + fac *                        &
+                                 ( td_sub_q(k,nt+1) - td_sub_q(k,nt) )
+             ENDDO
+
+             sums_ls_l(nzt+1,2) = sums_ls_l(nzt,2)
+             sums_ls_l(nzt+1,3) = sums_ls_l(nzt,3)
+
+          ENDIF
+
+       ENDIF
+
+       tn = 0
+       !$OMP PARALLEL PRIVATE( i, j, k, tn )
+       !$ tn = omp_get_thread_num()       
+       IF ( radiation .AND. radiation_scheme == 'rrtmg' )  THEN
+          !$OMP DO
+          DO  i = nxl, nxr
+             DO  j =  nys, nyn
+                DO  k = nzb+1, nzt+1
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                   sums_l(k,100,tn)  = sums_l(k,100,tn)  + rad_lw_in(k,j,i)    &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,101,tn)  = sums_l(k,101,tn)  + rad_lw_out(k,j,i)   &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,102,tn)  = sums_l(k,102,tn)  + rad_sw_in(k,j,i)    &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,103,tn)  = sums_l(k,103,tn)  + rad_sw_out(k,j,i)   &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,104,tn)  = sums_l(k,104,tn)  + rad_lw_cs_hr(k,j,i) &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,105,tn)  = sums_l(k,105,tn)  + rad_lw_hr(k,j,i)    &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,106,tn)  = sums_l(k,106,tn)  + rad_sw_cs_hr(k,j,i) &
+                                       * rmask(j,i,sr) * flag
+                   sums_l(k,107,tn)  = sums_l(k,107,tn)  + rad_sw_hr(k,j,i)    &
+                                       * rmask(j,i,sr) * flag
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Calculate the gust module profiles
+       IF ( gust_module_enabled )  THEN
+          CALL gust_statistics( 'profiles', sr, tn, dots_max )
+       ENDIF
+!
+!--    Calculate the chemistry module profiles
+       IF ( air_chemistry ) THEN
+          CALL chem_statistics( 'profiles', sr, tn )
+       ENDIF
+!
+!--    Calculate the user-defined profiles
+       CALL user_statistics( 'profiles', sr, tn )
+       !$OMP END PARALLEL
+
+!
+!--    Summation of thread sums
+       IF ( threads_per_task > 1 )  THEN
+          DO  i = 1, threads_per_task-1
+             sums_l(:,3,0)          = sums_l(:,3,0) + sums_l(:,3,i)
+             sums_l(:,4:40,0)       = sums_l(:,4:40,0) + sums_l(:,4:40,i)
+             sums_l(:,45:pr_palm,0) = sums_l(:,45:pr_palm,0) + &
+                                      sums_l(:,45:pr_palm,i)
+             IF ( max_pr_user > 0 )  THEN
+                sums_l(:,pr_palm+1:pr_palm+max_pr_user,0) = &
+                                   sums_l(:,pr_palm+1:pr_palm+max_pr_user,0) + &
+                                   sums_l(:,pr_palm+1:pr_palm+max_pr_user,i)
+             ENDIF
+
+             IF ( air_chemistry )  THEN
+                IF ( max_pr_cs > 0 )  THEN                                 
+                     sums_l(:,pr_palm+max_pr_user+1:pr_palm + max_pr_user+ max_pr_cs,0) =          &
+                               sums_l(:,pr_palm+max_pr_user+1:pr_palm + max_pr_user+max_pr_cs,0) + &
+                               sums_l(:,pr_palm+max_pr_user+1:pr_palm + max_pr_user+max_pr_cs,i)
+
+                ENDIF
+             ENDIF
+          ENDDO
+       ENDIF
+
+#if defined( __parallel )
+
+!
+!--    Compute total sum from local sums
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,1,0), sums(nzb,1), ngp_sums, MPI_REAL,   &
+                           MPI_SUM, comm2d, ierr )
+       IF ( large_scale_forcing )  THEN
+          CALL MPI_ALLREDUCE( sums_ls_l(nzb,2), sums(nzb,83), ngp_sums_ls,     &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+       ENDIF
+
+       IF ( air_chemistry  .AND.  max_pr_cs > 0 )  THEN
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+             DO  i = 1, max_pr_cs
+                CALL MPI_ALLREDUCE( sums_l(nzb,pr_palm+max_pr_user+i,0),       &
+                                    sums(nzb,pr_palm+max_pr_user+i),           &
+                                    nzt+2-nzb, MPI_REAL, MPI_SUM, comm2d, ierr )
+             ENDDO
+       ENDIF
+
+#else
+       sums = sums_l(:,:,0)
+       IF ( large_scale_forcing )  THEN
+          sums(:,81:88) = sums_ls_l
+       ENDIF
+#endif
+
+!
+!--    Final values are obtained by division by the total number of grid points 
+!--    used for summation. After that store profiles.
+!--    Check, if statistical regions do contain at least one grid point at the
+!--    respective k-level, otherwise division by zero will lead to undefined
+!--    values, which may cause e.g. problems with NetCDF output
+!--    Profiles:
+       DO  k = nzb, nzt+1
+          sums(k,3)             = sums(k,3)             / ngp_2dh(sr)
+          sums(k,12:22)         = sums(k,12:22)         / ngp_2dh(sr)
+          sums(k,30:32)         = sums(k,30:32)         / ngp_2dh(sr)
+          sums(k,35:39)         = sums(k,35:39)         / ngp_2dh(sr)
+          sums(k,45:53)         = sums(k,45:53)         / ngp_2dh(sr)
+          sums(k,55:63)         = sums(k,55:63)         / ngp_2dh(sr)
+          sums(k,81:88)         = sums(k,81:88)         / ngp_2dh(sr)
+          sums(k,89:112)        = sums(k,89:112)        / ngp_2dh(sr)
+          sums(k,114)           = sums(k,114)           / ngp_2dh(sr)
+          sums(k,117)           = sums(k,117)           / ngp_2dh(sr)
+          IF ( ngp_2dh_s_inner(k,sr) /= 0 )  THEN
+             sums(k,8:11)          = sums(k,8:11)          / ngp_2dh_s_inner(k,sr)
+             sums(k,23:29)         = sums(k,23:29)         / ngp_2dh_s_inner(k,sr)
+             sums(k,33:34)         = sums(k,33:34)         / ngp_2dh_s_inner(k,sr)
+             sums(k,40)            = sums(k,40)            / ngp_2dh_s_inner(k,sr)
+             sums(k,54)            = sums(k,54)            / ngp_2dh_s_inner(k,sr)
+             sums(k,64)            = sums(k,64)            / ngp_2dh_s_inner(k,sr)
+             sums(k,70:80)         = sums(k,70:80)         / ngp_2dh_s_inner(k,sr)
+             sums(k,116)           = sums(k,116)           / ngp_2dh_s_inner(k,sr)
+             sums(k,118:pr_palm-2) = sums(k,118:pr_palm-2) / ngp_2dh_s_inner(k,sr)
+             sums(k,123)           = sums(k,123) * ngp_2dh_s_inner(k,sr)  / ngp_2dh(sr)
+          ENDIF
+       ENDDO
+
+!--    u* and so on
+!--    As sums(nzb:nzb+3,pr_palm) are full 2D arrays (us, usws, vsws, ts) whose
+!--    size is always ( nx + 1 ) * ( ny + 1 ), defined at the first grid layer
+!--    above the topography, they are being divided by ngp_2dh(sr)
+       sums(nzb:nzb+3,pr_palm)    = sums(nzb:nzb+3,pr_palm)    / &
+                                    ngp_2dh(sr)
+       sums(nzb+12,pr_palm)       = sums(nzb+12,pr_palm)       / &    ! qs
+                                    ngp_2dh(sr)
+       sums(nzb+13,pr_palm)       = sums(nzb+13,pr_palm)       / &    ! ss
+                                    ngp_2dh(sr)
+       sums(nzb+14,pr_palm)       = sums(nzb+14,pr_palm)       / &    ! surface temperature
+                                    ngp_2dh(sr)
+!--    eges, e*
+       sums(nzb+4:nzb+5,pr_palm)  = sums(nzb+4:nzb+5,pr_palm)  / &
+                                    ngp_3d(sr)
+!--    Old and new divergence
+       sums(nzb+9:nzb+10,pr_palm) = sums(nzb+9:nzb+10,pr_palm) / &
+                                    ngp_3d_inner(sr)
+
+!--    User-defined profiles
+       IF ( max_pr_user > 0 )  THEN
+          DO  k = nzb, nzt+1
+             sums(k,pr_palm+1:pr_palm+max_pr_user) = &
+                                    sums(k,pr_palm+1:pr_palm+max_pr_user) / &
+                                    ngp_2dh_s_inner(k,sr)
+          ENDDO
+       ENDIF
+
+       IF ( air_chemistry ) THEN
+          IF ( max_pr_cs > 0 )  THEN                  
+             DO k = nzb, nzt+1
+                sums(k, pr_palm+1:pr_palm+max_pr_user+max_pr_cs) = &
+                                 sums(k, pr_palm+1:pr_palm+max_pr_user+max_pr_cs) / &
+                                 ngp_2dh_s_inner(k,sr)
+             ENDDO
+          ENDIF  
+       ENDIF
+
+!
+!--    Collect horizontal average in hom.
+!--    Compute deduced averages (e.g. total heat flux)
+       hom(:,1,3,sr)  = sums(:,3)      ! w
+       hom(:,1,8,sr)  = sums(:,8)      ! e     profiles 5-7 are initial profiles
+       hom(:,1,9,sr)  = sums(:,9)      ! km
+       hom(:,1,10,sr) = sums(:,10)     ! kh
+       hom(:,1,11,sr) = sums(:,11)     ! l
+       hom(:,1,12,sr) = sums(:,12)     ! w"u"
+       hom(:,1,13,sr) = sums(:,13)     ! w*u*
+       hom(:,1,14,sr) = sums(:,14)     ! w"v"
+       hom(:,1,15,sr) = sums(:,15)     ! w*v*
+       hom(:,1,16,sr) = sums(:,16)     ! w"pt"
+       hom(:,1,17,sr) = sums(:,17)     ! w*pt*
+       hom(:,1,18,sr) = sums(:,16) + sums(:,17)    ! wpt
+       hom(:,1,19,sr) = sums(:,12) + sums(:,13)    ! wu
+       hom(:,1,20,sr) = sums(:,14) + sums(:,15)    ! wv
+       hom(:,1,21,sr) = sums(:,21)     ! w*pt*BC
+       hom(:,1,22,sr) = sums(:,16) + sums(:,21)    ! wptBC
+                                       ! profile 24 is initial profile (sa)
+                                       ! profiles 25-29 left empty for initial 
+                                       ! profiles
+       hom(:,1,30,sr) = sums(:,30)     ! u*2
+       hom(:,1,31,sr) = sums(:,31)     ! v*2
+       hom(:,1,32,sr) = sums(:,32)     ! w*2
+       hom(:,1,33,sr) = sums(:,33)     ! pt*2
+       hom(:,1,34,sr) = sums(:,34)     ! e*
+       hom(:,1,35,sr) = sums(:,35)     ! w*2pt*
+       hom(:,1,36,sr) = sums(:,36)     ! w*pt*2
+       hom(:,1,37,sr) = sums(:,37)     ! w*e*
+       hom(:,1,38,sr) = sums(:,38)     ! w*3
+       hom(:,1,39,sr) = sums(:,38) / ( abs( sums(:,32) ) + 1E-20_wp )**1.5_wp   ! Sw
+       hom(:,1,40,sr) = sums(:,40)     ! p
+       hom(:,1,45,sr) = sums(:,45)     ! w"vpt"
+       hom(:,1,46,sr) = sums(:,46)     ! w*vpt*       
+       hom(:,1,47,sr) = sums(:,45) + sums(:,46)    ! wvpt
+       hom(:,1,48,sr) = sums(:,48)     ! w"q" (w"qv")
+       hom(:,1,49,sr) = sums(:,49)     ! w*q* (w*qv*)
+       hom(:,1,50,sr) = sums(:,48) + sums(:,49)    ! wq (wqv)
+       hom(:,1,51,sr) = sums(:,51)     ! w"qv"
+       hom(:,1,52,sr) = sums(:,52)     ! w*qv*       
+       hom(:,1,53,sr) = sums(:,52) + sums(:,51)    ! wq (wqv)
+       hom(:,1,54,sr) = sums(:,54)     ! ql
+       hom(:,1,55,sr) = sums(:,55)     ! w*u*u*/dz
+       hom(:,1,56,sr) = sums(:,56)     ! w*p*/dz
+       hom(:,1,57,sr) = sums(:,57)     ! ( w"e + w"p"/rho_ocean )/dz
+       hom(:,1,58,sr) = sums(:,58)     ! u"pt"
+       hom(:,1,59,sr) = sums(:,59)     ! u*pt*
+       hom(:,1,60,sr) = sums(:,58) + sums(:,59)    ! upt_t
+       hom(:,1,61,sr) = sums(:,61)     ! v"pt"
+       hom(:,1,62,sr) = sums(:,62)     ! v*pt*
+       hom(:,1,63,sr) = sums(:,61) + sums(:,62)    ! vpt_t
+       hom(:,1,64,sr) = sums(:,64)     ! rho_ocean
+       hom(:,1,65,sr) = sums(:,65)     ! w"sa"
+       hom(:,1,66,sr) = sums(:,66)     ! w*sa*
+       hom(:,1,67,sr) = sums(:,65) + sums(:,66)    ! wsa
+       hom(:,1,68,sr) = sums(:,68)     ! w*p*
+       hom(:,1,69,sr) = sums(:,69)     ! w"e + w"p"/rho_ocean
+       hom(:,1,70,sr) = sums(:,70)     ! q*2
+       hom(:,1,71,sr) = sums(:,71)     ! prho
+       hom(:,1,72,sr) = hyp * 1E-2_wp  ! hyp in hPa
+       hom(:,1,123,sr) = sums(:,123)   ! nc
+       hom(:,1,73,sr) = sums(:,73)     ! nr
+       hom(:,1,74,sr) = sums(:,74)     ! qr
+       hom(:,1,75,sr) = sums(:,75)     ! qc
+       hom(:,1,76,sr) = sums(:,76)     ! prr (precipitation rate)
+                                       ! 77 is initial density profile
+       hom(:,1,78,sr) = ug             ! ug
+       hom(:,1,79,sr) = vg             ! vg
+       hom(:,1,80,sr) = w_subs         ! w_subs
+
+       IF ( large_scale_forcing )  THEN
+          hom(:,1,81,sr) = sums_ls_l(:,0)          ! td_lsa_lpt
+          hom(:,1,82,sr) = sums_ls_l(:,1)          ! td_lsa_q
+          IF ( use_subsidence_tendencies )  THEN
+             hom(:,1,83,sr) = sums_ls_l(:,2)       ! td_sub_lpt
+             hom(:,1,84,sr) = sums_ls_l(:,3)       ! td_sub_q
+          ELSE
+             hom(:,1,83,sr) = sums(:,83)           ! td_sub_lpt
+             hom(:,1,84,sr) = sums(:,84)           ! td_sub_q
+          ENDIF
+          hom(:,1,85,sr) = sums(:,85)              ! td_nud_lpt
+          hom(:,1,86,sr) = sums(:,86)              ! td_nud_q
+          hom(:,1,87,sr) = sums(:,87)              ! td_nud_u
+          hom(:,1,88,sr) = sums(:,88)              ! td_nud_v
+       ENDIF
+
+       IF ( land_surface )  THEN
+          hom(:,1,89,sr) = sums(:,89)              ! t_soil
+                                                   ! 90 is initial t_soil profile
+          hom(:,1,91,sr) = sums(:,91)              ! m_soil
+                                                   ! 92 is initial m_soil profile
+          hom(:,1,93,sr)  = sums(:,93)             ! ghf
+          hom(:,1,94,sr)  = sums(:,94)             ! qsws_liq
+          hom(:,1,95,sr)  = sums(:,95)             ! qsws_soil
+          hom(:,1,96,sr)  = sums(:,96)             ! qsws_veg
+          hom(:,1,97,sr)  = sums(:,97)             ! r_a
+          hom(:,1,98,sr) = sums(:,98)              ! r_s
+
+       ENDIF
+
+       IF ( radiation )  THEN
+          hom(:,1,99,sr) = sums(:,99)            ! rad_net
+          hom(:,1,100,sr) = sums(:,100)            ! rad_lw_in
+          hom(:,1,101,sr) = sums(:,101)            ! rad_lw_out
+          hom(:,1,102,sr) = sums(:,102)            ! rad_sw_in
+          hom(:,1,103,sr) = sums(:,103)            ! rad_sw_out
+
+          IF ( radiation_scheme == 'rrtmg' )  THEN
+             hom(:,1,104,sr) = sums(:,104)            ! rad_lw_cs_hr
+             hom(:,1,105,sr) = sums(:,105)            ! rad_lw_hr
+             hom(:,1,106,sr) = sums(:,106)            ! rad_sw_cs_hr
+             hom(:,1,107,sr) = sums(:,107)            ! rad_sw_hr
+
+             hom(:,1,108,sr) = sums(:,108)            ! rrtm_aldif
+             hom(:,1,109,sr) = sums(:,109)            ! rrtm_aldir
+             hom(:,1,110,sr) = sums(:,110)            ! rrtm_asdif
+             hom(:,1,111,sr) = sums(:,111)            ! rrtm_asdir
+          ENDIF
+       ENDIF
+
+       hom(:,1,112,sr) = sums(:,112)            !: L
+
+       IF ( passive_scalar )  THEN
+          hom(:,1,117,sr) = sums(:,117)     ! w"s"
+          hom(:,1,114,sr) = sums(:,114)     ! w*s*
+          hom(:,1,118,sr) = sums(:,117) + sums(:,114)    ! ws 
+          hom(:,1,116,sr) = sums(:,116)     ! s*2
+       ENDIF
+
+       hom(:,1,119,sr) = rho_air       ! rho_air in Kg/m^3
+       hom(:,1,120,sr) = rho_air_zw    ! rho_air_zw in Kg/m^3
+
+       hom(:,1,pr_palm,sr) =   sums(:,pr_palm)
+                                       ! u*, w'u', w'v', t* (in last profile)
+
+       IF ( max_pr_user > 0 )  THEN    ! user-defined profiles
+          hom(:,1,pr_palm+1:pr_palm+max_pr_user,sr) = &
+                               sums(:,pr_palm+1:pr_palm+max_pr_user)
+       ENDIF
+
+       IF ( air_chemistry )  THEN
+          IF ( max_pr_cs > 0 )  THEN    ! chem_spcs profiles      
+             hom(:, 1, pr_palm+max_pr_user+1:pr_palm + max_pr_user+max_pr_cs, sr) = &
+                               sums(:, pr_palm+max_pr_user+1:pr_palm+max_pr_user+max_pr_cs)
+          ENDIF
+       ENDIF
+!
+!--    Determine the boundary layer height using two different schemes.
+!--    First scheme: Starting from the Earth's (Ocean's) surface, look for the
+!--    first relative minimum (maximum) of the total heat flux.
+!--    The corresponding height is assumed as the boundary layer height, if it
+!--    is less than 1.5 times the height where the heat flux becomes negative
+!--    (positive) for the first time. Attention: the resolved vertical sensible 
+!--    heat flux (hom(:,1,17,sr) = w*pt*) is not known at the beginning because
+!--    the calculation happens in advec_s_ws which is called after 
+!--    flow_statistics. Therefore z_i is directly taken from restart data at 
+!--    the beginning of restart runs.  
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' .OR.           &
+            simulated_time_at_begin /= simulated_time ) THEN
+
+          z_i(1) = 0.0_wp
+          first = .TRUE.
+
+          IF ( ocean_mode )  THEN
+             DO  k = nzt, nzb+1, -1
+                IF ( first  .AND.  hom(k,1,18,sr) < -1.0E-8_wp )  THEN
+                   first = .FALSE.
+                   height = zw(k)
+                ENDIF
+                IF ( hom(k,1,18,sr) < -1.0E-8_wp  .AND.                        &
+                     hom(k-1,1,18,sr) > hom(k,1,18,sr) )  THEN
+                   IF ( zw(k) < 1.5_wp * height )  THEN
+                      z_i(1) = zw(k)
+                   ELSE
+                      z_i(1) = height
+                   ENDIF
+                   EXIT
+                ENDIF
+             ENDDO
+          ELSE
+             DO  k = nzb, nzt-1
+                IF ( first  .AND.  hom(k,1,18,sr) < -1.0E-8_wp )  THEN
+                   first = .FALSE.
+                   height = zw(k)
+                ENDIF
+                IF ( hom(k,1,18,sr) < -1.0E-8_wp  .AND.                        &
+                     hom(k+1,1,18,sr) > hom(k,1,18,sr) )  THEN
+                   IF ( zw(k) < 1.5_wp * height )  THEN
+                      z_i(1) = zw(k)
+                   ELSE
+                      z_i(1) = height
+                   ENDIF
+                   EXIT
+                ENDIF
+             ENDDO
+          ENDIF
+
+!
+!--       Second scheme: Gradient scheme from Sullivan et al. (1998), modified 
+!--       by Uhlenbrock(2006). The boundary layer height is the height with the 
+!--       maximal local temperature gradient: starting from the second (the
+!--       last but one) vertical gridpoint, the local gradient must be at least 
+!--       0.2K/100m and greater than the next four gradients.
+!--       WARNING: The threshold value of 0.2K/100m must be adjusted for the
+!--       ocean case! 
+          z_i(2) = 0.0_wp
+          DO  k = nzb+1, nzt+1
+             dptdz(k) = ( hom(k,1,4,sr) - hom(k-1,1,4,sr) ) * ddzu(k)
+          ENDDO
+          dptdz_threshold = 0.2_wp / 100.0_wp
+
+          IF ( ocean_mode )  THEN
+             DO  k = nzt+1, nzb+5, -1
+                IF ( dptdz(k) > dptdz_threshold  .AND.                         &
+                     dptdz(k) > dptdz(k-1)  .AND.  dptdz(k) > dptdz(k-2)  .AND.&
+                     dptdz(k) > dptdz(k-3)  .AND.  dptdz(k) > dptdz(k-4) )  THEN
+                   z_i(2) = zw(k-1)
+                   EXIT
+                ENDIF
+             ENDDO
+          ELSE
+             DO  k = nzb+1, nzt-3
+                IF ( dptdz(k) > dptdz_threshold  .AND.                         &
+                     dptdz(k) > dptdz(k+1)  .AND.  dptdz(k) > dptdz(k+2)  .AND.&
+                     dptdz(k) > dptdz(k+3)  .AND.  dptdz(k) > dptdz(k+4) )  THEN
+                   z_i(2) = zw(k-1)
+                   EXIT
+                ENDIF
+             ENDDO
+          ENDIF
+
+       ENDIF
+
+       hom(nzb+6,1,pr_palm,sr) = z_i(1)
+       hom(nzb+7,1,pr_palm,sr) = z_i(2)
+
+!
+!--    Determine vertical index which is nearest to the mean surface level
+!--    height of the respective statistic region
+       DO  k = nzb, nzt
+          IF ( zw(k) >= mean_surface_level_height(sr) )  THEN
+             k_surface_level = k
+             EXIT
+          ENDIF
+       ENDDO
+
+!
+!--    Computation of both the characteristic vertical velocity and
+!--    the characteristic convective boundary layer temperature.
+!--    The inversion height entering into the equation is defined with respect
+!--    to the mean surface level height of the respective statistic region.
+!--    The horizontal average at surface level index + 1 is input for the
+!--    average temperature.
+       IF ( hom(k_surface_level,1,18,sr) > 1.0E-8_wp  .AND.  z_i(1) /= 0.0_wp )&
+       THEN
+          hom(nzb+8,1,pr_palm,sr) =                                            &
+             ( g / hom(k_surface_level+1,1,4,sr) *                             &
+             ( hom(k_surface_level,1,18,sr) /                                  &
+             ( heatflux_output_conversion(nzb) * rho_air(nzb) ) )              &
+             * ABS( z_i(1) - mean_surface_level_height(sr) ) )**0.333333333_wp
+       ELSE
+          hom(nzb+8,1,pr_palm,sr)  = 0.0_wp
+       ENDIF
+
+!
+!--    Collect the time series quantities. Please note, timeseries quantities 
+!--    which are collected from horizontally averaged profiles, e.g. wpt 
+!--    or pt(zp), are treated specially. In case of elevated model surfaces, 
+!--    index nzb+1 might be within topography and data will be zero. Therefore,
+!--    take value for the first atmosphere index, which is topo_min_level+1. 
+       ts_value(1,sr) = hom(nzb+4,1,pr_palm,sr)        ! E
+       ts_value(2,sr) = hom(nzb+5,1,pr_palm,sr)        ! E*
+       ts_value(3,sr) = dt_3d
+       ts_value(4,sr) = hom(nzb,1,pr_palm,sr)          ! u*
+       ts_value(5,sr) = hom(nzb+3,1,pr_palm,sr)        ! th*
+       ts_value(6,sr) = u_max
+       ts_value(7,sr) = v_max
+       ts_value(8,sr) = w_max
+       ts_value(9,sr) = hom(nzb+10,1,pr_palm,sr)       ! new divergence
+       ts_value(10,sr) = hom(nzb+9,1,pr_palm,sr)       ! old Divergence
+       ts_value(11,sr) = hom(nzb+6,1,pr_palm,sr)       ! z_i(1)
+       ts_value(12,sr) = hom(nzb+7,1,pr_palm,sr)       ! z_i(2)
+       ts_value(13,sr) = hom(nzb+8,1,pr_palm,sr)       ! w*
+       ts_value(14,sr) = hom(nzb,1,16,sr)              ! w'pt'   at k=0
+       ts_value(15,sr) = hom(topo_min_level+1,1,16,sr) ! w'pt'   at k=1
+       ts_value(16,sr) = hom(topo_min_level+1,1,18,sr) ! wpt     at k=1
+       ts_value(17,sr) = hom(nzb+14,1,pr_palm,sr)      ! pt(0)
+       ts_value(18,sr) = hom(topo_min_level+1,1,4,sr)  ! pt(zp)
+       ts_value(19,sr) = hom(nzb+1,1,pr_palm,sr)       ! u'w'    at k=0
+       ts_value(20,sr) = hom(nzb+2,1,pr_palm,sr)       ! v'w'    at k=0
+       ts_value(21,sr) = hom(nzb,1,48,sr)              ! w"q"    at k=0
+
+       IF ( .NOT. neutral )  THEN
+          ts_value(22,sr) = hom(nzb,1,112,sr)          ! L
+       ELSE
+          ts_value(22,sr) = 1.0E10_wp
+       ENDIF
+
+       ts_value(23,sr) = hom(nzb+12,1,pr_palm,sr)   ! q*
+
+       IF ( passive_scalar )  THEN
+          ts_value(24,sr) = hom(nzb+13,1,117,sr)       ! w"s" ( to do ! )
+          ts_value(25,sr) = hom(nzb+13,1,pr_palm,sr)   ! s*
+       ENDIF
+
+!
+!--    Collect land surface model timeseries
+       IF ( land_surface )  THEN
+          ts_value(dots_soil  ,sr) = hom(nzb,1,93,sr)           ! ghf
+          ts_value(dots_soil+1,sr) = hom(nzb,1,94,sr)           ! qsws_liq
+          ts_value(dots_soil+2,sr) = hom(nzb,1,95,sr)           ! qsws_soil
+          ts_value(dots_soil+3,sr) = hom(nzb,1,96,sr)           ! qsws_veg
+          ts_value(dots_soil+4,sr) = hom(nzb,1,97,sr)           ! r_a
+          ts_value(dots_soil+5,sr) = hom(nzb,1,98,sr)           ! r_s
+       ENDIF
+!
+!--    Collect radiation model timeseries
+       IF ( radiation )  THEN
+          ts_value(dots_rad,sr)   = hom(nzb,1,99,sr)           ! rad_net
+          ts_value(dots_rad+1,sr) = hom(nzb,1,100,sr)          ! rad_lw_in
+          ts_value(dots_rad+2,sr) = hom(nzb,1,101,sr)          ! rad_lw_out
+          ts_value(dots_rad+3,sr) = hom(nzb,1,102,sr)          ! rad_sw_in
+          ts_value(dots_rad+4,sr) = hom(nzb,1,103,sr)          ! rad_sw_out
+
+          IF ( radiation_scheme == 'rrtmg' )  THEN
+             ts_value(dots_rad+5,sr) = hom(nzb,1,108,sr)          ! rrtm_aldif
+             ts_value(dots_rad+6,sr) = hom(nzb,1,109,sr)          ! rrtm_aldir
+             ts_value(dots_rad+7,sr) = hom(nzb,1,110,sr)          ! rrtm_asdif
+             ts_value(dots_rad+8,sr) = hom(nzb,1,111,sr)          ! rrtm_asdir
+          ENDIF
+
+       ENDIF
+
+!
+!--    Calculate additional statistics provided by the gust module
+       IF ( gust_module_enabled )  THEN
+          CALL gust_statistics( 'time_series', sr, 0, dots_max )
+       ENDIF
+
+!
+!--    Calculate additional statistics provided by the user interface
+       CALL user_statistics( 'time_series', sr, 0 )
+
+    ENDDO    ! loop of the subregions
+
+!
+!-- If required, sum up horizontal averages for subsequent time averaging.
+!-- Do not sum, if flow statistics is called before the first initial time step.
+    IF ( do_sum  .AND.  simulated_time /= 0.0_wp )  THEN
+       IF ( average_count_pr == 0 )  hom_sum = 0.0_wp
+       hom_sum = hom_sum + hom(:,1,:,:)
+       average_count_pr = average_count_pr + 1
+       do_sum = .FALSE.
+    ENDIF
+
+!
+!-- Set flag for other UPs (e.g. output routines, but also buoyancy).
+!-- This flag is reset after each time step in time_integration.
+    flow_statistics_called = .TRUE.
+
+    CALL cpu_log( log_point(10), 'flow_statistics', 'stop' )
+
+
+ END SUBROUTINE flow_statistics
Index: /palm/tags/release-6.0/SOURCE/global_min_max.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/global_min_max.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/global_min_max.f90	(revision 3477)
@@ -0,0 +1,368 @@
+!> @file global_min_max.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1188 2013-06-20 12:00:08Z heinze
+! Bugfix in modes 'min' and 'max': x and z component were interchanged
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 866 2012-03-28 06:44:41Z raasch
+! new mode "absoff" accounts for an offset in the respective array
+!
+! Revision 1.1  1997/07/24 11:14:03  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Determine the array minimum/maximum and the corresponding indices.
+!------------------------------------------------------------------------------!
+ SUBROUTINE global_min_max( i1, i2, j1, j2, k1, k2, ar, mode, offset, value, &
+                            value_ijk, value1, value1_ijk )
+ 
+
+    USE indices,                                                               &
+        ONLY:  nbgp, ny, nx
+        
+    USE kinds
+    
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode  !<
+
+    INTEGER(iwp) ::  i              !<
+    INTEGER(iwp) ::  i1             !<
+    INTEGER(iwp) ::  i2             !<
+    INTEGER(iwp) ::  id_fmax        !<
+    INTEGER(iwp) ::  id_fmin        !<
+    INTEGER(iwp) ::  j              !<
+    INTEGER(iwp) ::  j1             !<
+    INTEGER(iwp) ::  j2             !<
+    INTEGER(iwp) ::  k              !<
+    INTEGER(iwp) ::  k1             !<
+    INTEGER(iwp) ::  k2             !<
+    INTEGER(iwp) ::  fmax_ijk(3)    !<
+    INTEGER(iwp) ::  fmax_ijk_l(3)  !<
+    INTEGER(iwp) ::  fmin_ijk(3)    !<
+    INTEGER(iwp) ::  fmin_ijk_l(3)  !<
+    INTEGER(iwp) ::  value_ijk(3)   !<
+    
+    INTEGER(iwp), OPTIONAL ::  value1_ijk(3)  !<
+    
+    REAL(wp) ::  offset                 !<
+    REAL(wp) ::  value                  !<
+    REAL(wp) ::  ar(i1:i2,j1:j2,k1:k2)  !<
+    
+#if defined( __ibm )
+    REAL(sp) ::  fmax(2)    !<
+    REAL(sp) ::  fmax_l(2)  !<
+    REAL(sp) ::  fmin(2)    !<
+    REAL(sp) ::  fmin_l(2)  !<
+             ! on 32bit-machines MPI_2REAL must not be replaced 
+             ! by MPI_2DOUBLE_PRECISION
+#else
+    REAL(wp) ::  fmax(2)    !<
+    REAL(wp) ::  fmax_l(2)  !<
+    REAL(wp) ::  fmin(2)    !<
+    REAL(wp) ::  fmin_l(2)  !<
+#endif
+    REAL(wp), OPTIONAL ::  value1  !<
+
+
+!
+!-- Determine array minimum
+    IF ( mode == 'min'  .OR.  mode == 'minmax' )  THEN
+
+!
+!--    Determine the local minimum
+       fmin_ijk_l = MINLOC( ar )
+       fmin_ijk_l(1) = i1 + fmin_ijk_l(1) - 1 ! MINLOC assumes lowerbound = 1
+       fmin_ijk_l(2) = j1 + fmin_ijk_l(2) - nbgp
+       fmin_ijk_l(3) = k1 + fmin_ijk_l(3) - nbgp
+       fmin_l(1)  = ar(fmin_ijk_l(1),fmin_ijk_l(2),fmin_ijk_l(3))
+
+#if defined( __parallel )
+       fmin_l(2)  = myid
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmin_l, fmin, 1, MPI_2REAL, MPI_MINLOC, comm2d, &
+                           ierr )
+
+!
+!--    Determine the global minimum. Result stored on PE0.
+       id_fmin = fmin(2)
+       IF ( id_fmin /= 0 )  THEN
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( fmin_ijk, 3, MPI_INTEGER, id_fmin, 0, comm2d, &
+                            status, ierr )
+          ELSEIF ( myid == id_fmin )  THEN
+             CALL MPI_SEND( fmin_ijk_l, 3, MPI_INTEGER, 0, 0, comm2d, ierr )
+          ENDIF
+       ELSE
+          fmin_ijk = fmin_ijk_l
+       ENDIF
+!
+!--    Send the indices of the just determined array minimum to other PEs
+       CALL MPI_BCAST( fmin_ijk, 3, MPI_INTEGER, 0, comm2d, ierr )
+#else
+       fmin(1)  = fmin_l(1)
+       fmin_ijk = fmin_ijk_l
+#endif
+
+    ENDIF
+
+!
+!-- Determine array maximum
+    IF ( mode == 'max'  .OR.  mode == 'minmax' )  THEN
+
+!
+!--    Determine the local maximum
+       fmax_ijk_l = MAXLOC( ar )
+       fmax_ijk_l(1) = i1 + fmax_ijk_l(1) - 1 ! MAXLOC assumes lowerbound = 1
+       fmax_ijk_l(2) = j1 + fmax_ijk_l(2) - nbgp
+       fmax_ijk_l(3) = k1 + fmax_ijk_l(3) - nbgp
+       fmax_l(1) = ar(fmax_ijk_l(1),fmax_ijk_l(2),fmax_ijk_l(3))
+
+#if defined( __parallel )
+       fmax_l(2)  = myid
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmax_l, fmax, 1, MPI_2REAL, MPI_MAXLOC, comm2d, &
+                           ierr )
+
+!
+!--    Determine the global maximum. Result stored on PE0.
+       id_fmax = fmax(2)
+       IF ( id_fmax /= 0 )  THEN
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( fmax_ijk, 3, MPI_INTEGER, id_fmax, 0, comm2d, &
+                            status, ierr )
+          ELSEIF ( myid == id_fmax )  THEN
+             CALL MPI_SEND( fmax_ijk_l, 3, MPI_INTEGER, 0, 0, comm2d, ierr )
+          ENDIF
+       ELSE
+          fmax_ijk = fmax_ijk_l
+       ENDIF
+!
+!--    send the indices of the just determined array maximum to other PEs
+       CALL MPI_BCAST( fmax_ijk, 3, MPI_INTEGER, 0, comm2d, ierr )
+#else
+       fmax(1)  = fmax_l(1)
+       fmax_ijk = fmax_ijk_l
+#endif
+
+    ENDIF
+
+!
+!-- Determine absolute array maximum
+    IF ( mode == 'abs' )  THEN
+
+!
+!--    Determine the local absolut maximum
+       fmax_l(1)     = 0.0_wp
+       fmax_ijk_l(1) =  i1
+       fmax_ijk_l(2) =  j1
+       fmax_ijk_l(3) =  k1
+       DO  k = k1, k2
+          DO  j = j1, j2
+             DO  i = i1, i2
+                IF ( ABS( ar(i,j,k) ) > fmax_l(1) )  THEN
+                   fmax_l(1) = ABS( ar(i,j,k) )
+                   fmax_ijk_l(1) = i
+                   fmax_ijk_l(2) = j
+                   fmax_ijk_l(3) = k
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Set a flag in case that the determined value is negative.
+!--    A constant offset has to be subtracted in order to handle the special
+!--    case i=0 correctly
+       IF ( ar(fmax_ijk_l(1),fmax_ijk_l(2),fmax_ijk_l(3)) < 0.0_wp )  THEN
+          fmax_ijk_l(1) = -fmax_ijk_l(1) - 10
+       ENDIF
+
+#if defined( __parallel )
+       fmax_l(2)  = myid
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmax_l, fmax, 1, MPI_2REAL, MPI_MAXLOC, comm2d, &
+                           ierr )
+
+!
+!--    Determine the global absolut maximum. Result stored on PE0.
+       id_fmax = fmax(2)
+       IF ( id_fmax /= 0 )  THEN
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( fmax_ijk, 3, MPI_INTEGER, id_fmax, 0, comm2d, &
+                            status, ierr )
+          ELSEIF ( myid == id_fmax )  THEN
+             CALL MPI_SEND( fmax_ijk_l, 3, MPI_INTEGER, 0, 0, comm2d, ierr )
+          ENDIF
+       ELSE
+          fmax_ijk = fmax_ijk_l
+       ENDIF
+!
+!--    Send the indices of the just determined absolut maximum to other PEs
+       CALL MPI_BCAST( fmax_ijk, 3, MPI_INTEGER, 0, comm2d, ierr )
+#else
+       fmax(1)  = fmax_l(1)
+       fmax_ijk = fmax_ijk_l
+#endif
+
+    ENDIF
+
+!
+!-- Determine absolute maximum of ( array - offset )
+    IF ( mode == 'absoff' )  THEN
+
+!
+!--    Determine the local absolut maximum
+       fmax_l(1)     = 0.0_wp
+       fmax_ijk_l(1) =  i1
+       fmax_ijk_l(2) =  j1
+       fmax_ijk_l(3) =  k1
+       DO  k = k1, k2
+          DO  j = j1, j2
+!
+!--          Attention: the lowest gridpoint is excluded here, because there
+!--          ---------  is no advection at nzb=0 and mode 'absoff' is only
+!--                     used for calculating u,v extrema for CFL-criteria
+             DO  i = i1+1, i2
+                IF ( ABS( ar(i,j,k) - offset ) > fmax_l(1) )  THEN
+                   fmax_l(1) = ABS( ar(i,j,k) - offset )
+                   fmax_ijk_l(1) = i
+                   fmax_ijk_l(2) = j
+                   fmax_ijk_l(3) = k
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Set a flag in case that the determined value is negative.
+!--    A constant offset has to be subtracted in order to handle the special
+!--    case i=0 correctly
+       IF ( ar(fmax_ijk_l(1),fmax_ijk_l(2),fmax_ijk_l(3)) < 0.0_wp )  THEN
+          fmax_ijk_l(1) = -fmax_ijk_l(1) - 10
+       ENDIF
+
+#if defined( __parallel )
+       fmax_l(2)  = myid
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( fmax_l, fmax, 1, MPI_2REAL, MPI_MAXLOC, comm2d, &
+                           ierr )
+
+!
+!--    Determine the global absolut maximum. Result stored on PE0.
+       id_fmax = fmax(2)
+       IF ( id_fmax /= 0 )  THEN
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( fmax_ijk, 3, MPI_INTEGER, id_fmax, 0, comm2d, &
+                            status, ierr )
+          ELSEIF ( myid == id_fmax )  THEN
+             CALL MPI_SEND( fmax_ijk_l, 3, MPI_INTEGER, 0, 0, comm2d, ierr )
+          ENDIF
+       ELSE
+          fmax_ijk = fmax_ijk_l
+       ENDIF
+!
+!--    Send the indices of the just determined absolut maximum to other PEs
+       CALL MPI_BCAST( fmax_ijk, 3, MPI_INTEGER, 0, comm2d, ierr )
+#else
+       fmax(1)  = fmax_l(1)
+       fmax_ijk = fmax_ijk_l
+#endif
+
+    ENDIF
+
+!
+!-- Determine output parameters
+    SELECT CASE( mode )
+
+       CASE( 'min' )
+
+          value     = fmin(1)
+          value_ijk = fmin_ijk
+
+       CASE( 'max' )
+
+          value     = fmax(1)
+          value_ijk = fmax_ijk
+
+       CASE( 'minmax' )
+
+          value      = fmin(1)
+          value_ijk  = fmin_ijk
+          value1     = fmax(1)
+          value1_ijk = fmax_ijk
+
+       CASE( 'abs', 'absoff' )
+
+          value     = fmax(1)
+          value_ijk = fmax_ijk
+          IF ( fmax_ijk(1) < 0 )  THEN
+             value        = -value
+             value_ijk(1) = -value_ijk(1) - 10         !???
+          ENDIF
+
+    END SELECT
+
+!
+!-- Limit index values to the range 0..nx, 0..ny
+    IF ( value_ijk(3) < 0  ) value_ijk(3) = nx +1 + value_ijk(3)
+    IF ( value_ijk(3) > nx ) value_ijk(3) = value_ijk(3) - (nx+1)
+    IF ( value_ijk(2) < 0  ) value_ijk(2) = ny +1 + value_ijk(2)
+    IF ( value_ijk(2) > ny ) value_ijk(2) = value_ijk(2) - (ny+1)
+
+
+ END SUBROUTINE global_min_max
Index: /palm/tags/release-6.0/SOURCE/gust_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/gust_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/gust_mod.f90	(revision 3477)
@@ -0,0 +1,615 @@
+!> @file gust_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of PALM.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix: domain bounds of local_pf corrected
+! 
+! 
+! Interfaces concerning data output updated
+! 
+! 
+! renamed gust_par to gust_parameters
+! 
+! 
+! Initial interface definition
+!
+! 
+! Description:
+! ------------
+!> Gust model.
+!>
+!> @todo This is just a dummy module. The actual module ist not released yet.
+!------------------------------------------------------------------------------!
+ MODULE gust_mod
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    LOGICAL  ::  gust_module_enabled = .FALSE.       !< switch, if the entire module is used at all
+
+    SAVE
+
+    PRIVATE
+
+!
+!-- Public functions
+    PUBLIC &
+       gust_parin, &
+       gust_check_parameters, &
+       gust_check_data_output_pr, &
+       gust_check_data_output, &
+       gust_init_arrays, &
+       gust_init, &
+       gust_define_netcdf_grid, &
+       gust_header, &
+       gust_actions, &
+       gust_swap_timelevel, &
+       gust_3d_data_averaging, &
+       gust_data_output_2d, &
+       gust_data_output_3d, &
+       gust_statistics, &
+       gust_rrd_global, &
+       gust_wrd_global, &
+       gust_rrd_local, &
+       gust_wrd_local
+!
+!-- Public parameters, constants and initial values
+    PUBLIC &
+       gust_module_enabled
+
+
+    INTERFACE gust_parin
+       MODULE PROCEDURE gust_parin
+    END INTERFACE gust_parin
+
+    INTERFACE gust_check_parameters
+       MODULE PROCEDURE gust_check_parameters
+    END INTERFACE gust_check_parameters
+
+    INTERFACE gust_check_data_output_pr
+       MODULE PROCEDURE gust_check_data_output_pr
+    END INTERFACE gust_check_data_output_pr
+
+    INTERFACE gust_check_data_output
+       MODULE PROCEDURE gust_check_data_output
+    END INTERFACE gust_check_data_output
+
+    INTERFACE gust_init_arrays
+       MODULE PROCEDURE gust_init_arrays
+    END INTERFACE gust_init_arrays
+
+    INTERFACE gust_init
+       MODULE PROCEDURE gust_init
+    END INTERFACE gust_init
+
+    INTERFACE gust_define_netcdf_grid
+       MODULE PROCEDURE gust_define_netcdf_grid
+    END INTERFACE gust_define_netcdf_grid
+
+    INTERFACE gust_header
+       MODULE PROCEDURE gust_header
+    END INTERFACE gust_header
+
+    INTERFACE gust_actions
+       MODULE PROCEDURE gust_actions
+       MODULE PROCEDURE gust_actions_ij
+    END INTERFACE gust_actions
+
+    INTERFACE gust_swap_timelevel
+       MODULE PROCEDURE gust_swap_timelevel
+    END INTERFACE gust_swap_timelevel
+
+    INTERFACE gust_3d_data_averaging
+       MODULE PROCEDURE gust_3d_data_averaging
+    END INTERFACE gust_3d_data_averaging
+
+    INTERFACE gust_data_output_2d
+       MODULE PROCEDURE gust_data_output_2d
+    END INTERFACE gust_data_output_2d
+
+    INTERFACE gust_data_output_3d
+       MODULE PROCEDURE gust_data_output_3d
+    END INTERFACE gust_data_output_3d
+
+    INTERFACE gust_statistics
+       MODULE PROCEDURE gust_statistics
+    END INTERFACE gust_statistics
+
+    INTERFACE gust_rrd_global
+       MODULE PROCEDURE gust_rrd_global
+    END INTERFACE gust_rrd_global
+
+    INTERFACE gust_wrd_global
+       MODULE PROCEDURE gust_wrd_global
+    END INTERFACE gust_wrd_global
+
+    INTERFACE gust_rrd_local
+       MODULE PROCEDURE gust_rrd_local
+    END INTERFACE gust_rrd_local
+
+    INTERFACE gust_wrd_local
+       MODULE PROCEDURE gust_wrd_local
+    END INTERFACE gust_wrd_local
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &gust_parameters for gust module
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_parin
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80)  ::  line  !< dummy string that contains the current line of the parameter file
+
+       NAMELIST /gust_parameters/  &
+          gust_module_enabled
+
+       line = ' '
+!
+!--    Try to find gust module package
+       REWIND ( 11 )
+       line = ' '
+       DO   WHILE ( INDEX( line, '&gust_parameters' ) == 0 )
+          READ ( 11, '(A)', END=10 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+!
+!--    Read user-defined namelist
+       READ ( 11, gust_parameters )
+!
+!--    Set flag that indicates that the gust module is switched on
+       gust_module_enabled = .TRUE.
+
+10     CONTINUE
+
+
+    END SUBROUTINE gust_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for gust module
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_check_parameters
+
+
+       IMPLICIT NONE
+
+
+    END SUBROUTINE gust_check_parameters
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output of profiles for gust module
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_check_data_output_pr( variable, var_count, unit, dopr_unit )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit      !<
+       CHARACTER (LEN=*) ::  variable  !<
+       CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
+
+       INTEGER(iwp) ::  var_count      !<
+
+
+    END SUBROUTINE gust_check_data_output_pr
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for gust module
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_check_data_output( var, unit )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit  !<
+       CHARACTER (LEN=*) ::  var   !<
+
+
+    END SUBROUTINE gust_check_data_output
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate gust module arrays and define pointers
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_init_arrays
+
+
+       IMPLICIT NONE
+
+
+    END SUBROUTINE gust_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the gust module
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_init( dots_label, dots_unit, dots_num, dots_max )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  dots_num
+       INTEGER(iwp) ::  dots_max
+       CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_unit
+       CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label
+
+
+    END SUBROUTINE gust_init
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*), INTENT(IN)  ::  var         !<
+       LOGICAL, INTENT(IN)           ::  found       !<
+       CHARACTER (LEN=*), INTENT(IN) ::  grid_x      !<
+       CHARACTER (LEN=*), INTENT(IN) ::  grid_y      !<
+       CHARACTER (LEN=*), INTENT(IN) ::  grid_z      !<
+
+
+    END SUBROUTINE gust_define_netcdf_grid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for gust module
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_header ( io )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  io  !< Unit of the output file
+
+
+    END SUBROUTINE gust_header
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_actions( location )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  location !<
+
+
+    END SUBROUTINE gust_actions
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_actions_ij( i, j, location )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  location
+
+       INTEGER(iwp) ::  i
+       INTEGER(iwp) ::  j
+
+
+    END SUBROUTINE gust_actions_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_swap_timelevel ( mod_count )
+
+
+       IMPLICIT NONE
+
+       INTEGER, INTENT(IN) :: mod_count
+
+
+    END SUBROUTINE gust_swap_timelevel
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_3d_data_averaging( mode, variable )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  mode    !<
+       CHARACTER (LEN=*) :: variable !<
+
+
+    END SUBROUTINE gust_3d_data_averaging
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 2D output variables
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_data_output_2d( av, variable, found, grid, local_pf,       &
+                                    two_d, nzb_do, nzt_do )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  grid     !<
+       CHARACTER (LEN=*) ::  variable !<
+
+       INTEGER(iwp) ::  av     !< flag to control data output of instantaneous or time-averaged data
+       INTEGER(iwp) ::  nzb_do !< lower limit of the data output (usually 0)
+       INTEGER(iwp) ::  nzt_do !< vertical upper limit of the data output (usually nz_do3d)
+
+       LOGICAL      ::  found !<
+       LOGICAL      ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
+
+       REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+       REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !<
+
+
+    END SUBROUTINE gust_data_output_2d
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  variable !<
+
+       INTEGER(iwp) ::  av    !<
+       INTEGER(iwp) ::  nzb_do !< lower limit of the data output (usually 0)
+       INTEGER(iwp) ::  nzt_do !< vertical upper limit of the data output (usually nz_do3d)
+
+       LOGICAL      ::  found !<
+
+       REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+       REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !<
+
+
+    END SUBROUTINE gust_data_output_3d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine computes profile and timeseries data for the gust module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_statistics( mode, sr, tn, dots_max )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  mode   !<
+
+       INTEGER(iwp) ::  sr   !<
+       INTEGER(iwp) ::  tn   !<
+       INTEGER(iwp) ::  dots_max   !<
+
+
+    END SUBROUTINE gust_statistics
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data for the gust module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_rrd_global( found )
+
+
+       USE control_parameters,                                                 &
+           ONLY: length, restart_string
+
+
+       IMPLICIT NONE
+
+       LOGICAL, INTENT(OUT)  ::  found
+
+
+       found = .TRUE.
+
+
+       SELECT CASE ( restart_string(1:length) )
+
+          CASE ( 'global_paramter' )
+!             READ ( 13 )  global_parameter
+
+          CASE DEFAULT
+
+             found = .FALSE.
+
+       END SELECT
+
+
+    END SUBROUTINE gust_rrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data for the gust module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,      &
+                               nxr_on_file, nynf, nync, nyn_on_file, nysf,     &
+                               nysc, nys_on_file, tmp_2d, tmp_3d, found )
+
+
+       USE control_parameters
+
+       USE indices
+
+       USE kinds
+
+       USE pegrid
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i               !<
+       INTEGER(iwp) ::  k               !<
+       INTEGER(iwp) ::  nxlc            !<
+       INTEGER(iwp) ::  nxlf            !<
+       INTEGER(iwp) ::  nxl_on_file     !<
+       INTEGER(iwp) ::  nxrc            !<
+       INTEGER(iwp) ::  nxrf            !<
+       INTEGER(iwp) ::  nxr_on_file     !<
+       INTEGER(iwp) ::  nync            !<
+       INTEGER(iwp) ::  nynf            !<
+       INTEGER(iwp) ::  nyn_on_file     !<
+       INTEGER(iwp) ::  nysc            !<
+       INTEGER(iwp) ::  nysf            !<
+       INTEGER(iwp) ::  nys_on_file     !<
+
+       LOGICAL, INTENT(OUT)  ::  found
+
+       REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_2d   !<
+       REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !<
+
+!
+!-- Here the reading of user-defined restart data follows:
+!-- Sample for user-defined output
+
+
+       found = .TRUE.
+
+
+       SELECT CASE ( restart_string(1:length) )
+
+          CASE ( 'u2_av' )
+!             IF ( .NOT. ALLOCATED( u2_av ) ) THEN
+!                  ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!             ENDIF
+!             IF ( k == 1 )  READ ( 13 )  tmp_3d
+!                u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+!                   tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+!
+          CASE DEFAULT
+
+             found = .FALSE.
+
+          END SELECT
+
+
+    END SUBROUTINE gust_rrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data for the gust module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_wrd_global
+
+
+       IMPLICIT NONE
+
+! needs preceeding allocation if array
+!       CALL wrd_write_string( 'global_parameter' )
+!       WRITE ( 14 )  global_parameter
+
+!       IF ( ALLOCATED( inflow_damping_factor ) )  THEN
+!          CALL wrd_write_string( 'inflow_damping_factor' )
+!          WRITE ( 14 )  inflow_damping_factor
+!       ENDIF
+
+
+    END SUBROUTINE gust_wrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data for the gust module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE gust_wrd_local
+
+
+       IMPLICIT NONE
+
+
+! needs preceeding allocation because sould be array
+!          IF ( ALLOCATED( u2_av ) )  THEN
+!             CALL wrd_write_string( 'u2_av' )
+!             WRITE ( 14 )  u2_av
+!          ENDIF
+
+
+    END SUBROUTINE gust_wrd_local
+
+
+
+ END MODULE gust_mod
Index: /palm/tags/release-6.0/SOURCE/header.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/header.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/header.f90	(revision 3477)
@@ -0,0 +1,2501 @@
+!> @file header.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Add biometeorology
+! 
+! 3355 2018-10-16 14:03:34Z knoop
+! Header output concerning offline nesting
+! 
+! 3343 2018-10-15 10:38:52Z suehring
+! call of ocean_header
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Minor formatting (kanani)
+! Add chemistry header (basit)
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3232 2018-09-07 12:21:44Z raasch
+! Increase printed length of run identifier
+! 
+! 3225 2018-08-30 16:33:14Z kanani
+! Increase printed length of run identifier
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! Print RANS-mode constants
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! Header output concerning stretching revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! bugfix: missing parallel cpp-directives added
+! 
+! 2883 2018-03-14 08:29:10Z Giersch
+! Format of the output of dt_dopr_listing (325) has been changed
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2776 2018-01-31 10:44:42Z Giersch
+! Variable synthetic_turbulence_generator has been abbreviated
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Print information about turbulence closure (TG)
+! Print information about inifor initialization (MS)
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Added output for complex terrain simulations
+! 
+! 2544 2017-10-13 18:09:32Z maronga
+! Moved initial day of year and time to inipar. 
+! 
+! 2339 2017-08-07 13:55:26Z gronemeier
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! Modularize 1D model
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Modularize large-scale forcing and nudging
+! 
+! 2300 2017-06-29 13:31:14Z raasch
+! host-specific code removed
+! 
+! 2299 2017-06-29 10:14:38Z maronga
+! Modified output for spinups
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! MPI2 related parts removed
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! Renamed Prandtl layer to constant flux layer
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2258 2017-06-08 07:55:13Z suehring
+! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! Generic tunnel setup added
+! 
+! 2200 2017-04-11 11:37:51Z suehring
+! monotonic_adjustment removed
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC relatec code removed
+! 
+! 2073 2016-11-30 14:34:05Z raasch
+! small bugfix concerning output of scalar profiles
+! 
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Implement turbulent outflow condition
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! Adapted for top_scalarflux
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Treat humidity and passive scalar separately.
+! Modify misleading information concerning humidity.
+! Bugfix, change unit for humidity flux.
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! flight module added
+!
+! 1931 2016-06-10 12:06:59Z suehring
+! Rename multigrid into multigrid_noopt
+!
+! 1902 2016-05-09 11:18:56Z suehring
+! Write information about masking_method only for multigrid solver
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! Adapted for modularization of microphysics
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! spectrum renamed spectra_mod, output of spectra related quantities moved to
+! spectra_mod
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! turbulence renamed collision_turbulence,
+! drizzle renamed cloud_water_sedimentation
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Moved radiation model header output to the respective module.
+! Moved canopy model header output to the respective module.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. icloud_scheme replaced by microphysics_*
+!
+! 1817 2016-04-06 15:44:20Z maronga
+! Moved land_surface_model header output to the respective module.
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_flush replaced by FORTRAN statement
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! output of nesting datatransfer mode
+!
+! 1791 2016-03-11 10:41:25Z raasch
+! output of nesting informations of all domains
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Parameter dewfall removed
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! cpp-direktives for spectra removed
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module and variable names changed, output of netcdf_deflate
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! output of nesting informations
+!
+! 1697 2015-10-28 17:14:10Z raasch
+! small E- and F-FORMAT changes to avoid informative compiler messages about
+! insufficient field width
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Renamed prandtl_layer to constant_flux_layer, renames rif_min/rif_max to
+! zeta_min/zeta_max.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1675 2015-10-02 08:28:59Z gronemeier
+! Bugfix: Definition of topography grid levels
+! 
+! 1660 2015-09-21 08:15:16Z gronemeier
+! Bugfix: Definition of building/street canyon height if vertical grid stretching
+!         starts below the maximum topography height.
+! 
+! 1590 2015-05-08 13:56:27Z maronga
+! Bugfix: Added TRIM statements for character strings for LSM and radiation code
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Further output for radiation model(s).
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! adjustments for psolver-queries, output of seed_follows_topography
+!
+! 1560 2015-03-06 10:48:54Z keck
+! output for recycling y shift
+! 
+! 1557 2015-03-05 16:43:04Z suehring
+! output for monotonic limiter
+!
+! 1551 2015-03-03 14:18:16Z maronga
+! Added informal output for land surface model and radiation model. Removed typo.
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Renamed: "radiation -> "cloud_top_radiation"
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   module plant_canopy_model_mod and output for new canopy model parameters 
+!   (alpha_lad, beta_lad, lai_beta,...) added,
+!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
+!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff,
+!   learde renamed leaf_area_density.
+! Bugfix: DO-WHILE-loop for lad header information additionally restricted 
+! by maximum number of gradient levels (currently 10)
+!
+! 1482 2014-10-18 12:34:45Z raasch
+! information about calculated or predefined virtual processor topology adjusted
+!
+! 1468 2014-09-24 14:06:57Z maronga
+! Adapted for use on up to 6-digit processor cores
+! 
+! 1429 2014-07-15 12:53:45Z knoop
+! header exended to provide ensemble_member_nr if specified
+! 
+! 1376 2014-04-26 11:21:22Z boeske
+! Correction of typos
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! New section 'Large scale forcing and nudging':
+! output of large scale forcing and nudging information,
+! new section for initial profiles created
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! dt_sort_particles removed
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! parts concerning iso2d and avs output removed,
+! -netcdf output queries
+!
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: module spectrum added
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute,
+! some REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1308 2014-03-13 14:58:42Z fricke
+! output of the fixed number of output time levels
+! output_format adjusted for masked data if netcdf_data_format > 5
+!
+! 1299 2014-03-06 13:15:21Z heinze
+! output for using large_scale subsidence in combination 
+! with large_scale_forcing
+! reformatting, more detailed explanations
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! output for nudging + large scale forcing from external file
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! output for transpose_compute_overlap
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! output for poisfft_hybrid removed
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! output of reference_state, use_reference renamed use_single_reference_value
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! +use_cmax
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! descriptions for Seifert-Beheng-cloud-physics-scheme added
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! output of accelerator board information
+! ibc_p_b = 2 removed
+!
+! 1108 2013-03-05 07:03:32Z raasch
+! bugfix for r1106
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! some format changes for coupled runs
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! output of netCDF data format modified
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! output of Adjustment of mixing length to the Prandtl mixing length at first
+! grid point above ground removed
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! output of information about equal/unequal subdomain size removed
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog- and upstream-spline-scheme removed
+!
+! 978 2012-08-09 08:28:32Z fricke
+! -km_damp_max, outflow_damping_width
+! +pt_damping_factor, pt_damping_width
+! +z0h
+!
+! 964 2012-07-26 09:14:24Z raasch
+! output of profil-related quantities removed
+!
+! 940 2012-07-09 14:31:00Z raasch
+! Output in case of simulations for pure neutral stratification (no pt-equation
+! solved)
+!
+! 927 2012-06-06 19:15:04Z raasch
+! output of masking_method for mg-solver
+!
+! 868 2012-03-28 12:21:07Z raasch
+! translation velocity in Galilean transformation changed to 0.6 * ug
+!
+! 833 2012-02-22 08:55:55Z maronga
+! Adjusted format for leaf area density
+!
+! 828 2012-02-21 12:00:36Z raasch
+! output of dissipation_classes + radius_classes
+!
+! 825 2012-02-19 03:03:44Z raasch
+! Output of cloud physics parameters/quantities complemented and restructured
+!
+! Revision 1.1  1997/08/11 06:17:20  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Writing a header with all important information about the current run.
+!> This subroutine is called three times, two times at the beginning 
+!> (writing information on files RUN_CONTROL and HEADER) and one time at the
+!> end of the run, then writing additional information about CPU-usage on file
+!> header.
+!-----------------------------------------------------------------------------!
+ SUBROUTINE header
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt_init, q_init, s_init, sa_init, ug, vg, w_subs, zu, zw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, kappa, l_v, r_d
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_header
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_header
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_header
+
+    USE control_parameters
+
+    USE cpulog,                                                                &
+        ONLY:  log_point_s
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  day_of_year_init, time_utc_init
+
+    USE dvrp_variables,                                                        &
+        ONLY:  use_seperate_pe_for_dvrp_output
+        
+    USE flight_mod,                                                            &
+        ONLY:  flight_header
+        
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE gust_mod,                                                              &
+        ONLY: gust_header, gust_module_enabled
+
+    USE indices,                                                               &
+        ONLY:  mg_loc_ind, nnx, nny, nnz, nx, ny, nxl_mg, nxr_mg, nyn_mg,      &
+               nys_mg, nzt, nzt_mg
+        
+    USE kinds
+ 
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_header
+
+    USE lsf_nudging_mod,                                                       &
+        ONLY:  lsf_nudging_header
+
+    USE model_1d_mod,                                                          &
+        ONLY:  damp_level_ind_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
+
+    USE netcdf_interface,                                                      &
+        ONLY:  netcdf_data_format, netcdf_data_format_string, netcdf_deflate
+
+    USE nesting_offl_mod,                                                      &
+        ONLY:  nesting_offl_header
+
+    USE ocean_mod,                                                             &
+        ONLY:  ibc_sa_t, ocean_header, prho_reference, sa_surface,             &
+               sa_vertical_gradient, sa_vertical_gradient_level,               &
+               sa_vertical_gradient_level_ind
+
+    USE particle_attributes,                                                   &
+        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,     &
+               curvature_solution_effects,                                     &
+               density_ratio, dissipation_classes, dt_min_part, dt_prel,       &
+               dt_write_particle_data, end_time_prel,                          &
+               number_of_particle_groups, particle_advection,                  &
+               particle_advection_start,                                       &
+               particles_per_point, pdx, pdy, pdz,  psb, psl, psn, psr, pss,   &
+               pst, radius, radius_classes, random_start_position,             &
+               seed_follows_topography,                                        &
+               total_number_of_particles, use_sgs_for_particles,               &
+               vertical_particle_advection, write_particle_statistics
+        
+    USE pegrid
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pcm_header
+
+#if defined( __parallel )
+    USE pmc_handle_communicator,                                               &
+        ONLY:  pmc_get_model_info
+#endif
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run, nesting_datatransfer_mode, nesting_mode
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_header
+               
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_header        
+    
+    USE spectra_mod,                                                           &
+        ONLY:  calculate_spectra, spectra_header
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, get_topography_top_index_ji
+
+    USE synthetic_turbulence_generator_mod,                                    &
+        ONLY:  stg_header
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  rans_const_c, rans_const_sigma
+
+    IMPLICIT NONE
+
+    
+    CHARACTER (LEN=2)  ::  do2d_mode           !<
+    
+    CHARACTER (LEN=5)  ::  section_chr         !<
+    
+    CHARACTER (LEN=10) ::  coor_chr            !<
+    CHARACTER (LEN=10) ::  host_chr            !<
+    
+    CHARACTER (LEN=16) ::  begin_chr           !<
+    
+    CHARACTER (LEN=26) ::  ver_rev             !<
+
+    CHARACTER (LEN=32) ::  cpl_name            !<
+    
+    CHARACTER (LEN=40) ::  output_format       !<
+    
+    CHARACTER (LEN=70) ::  char1               !<
+    CHARACTER (LEN=70) ::  char2               !<
+    CHARACTER (LEN=70) ::  dopr_chr            !<
+    CHARACTER (LEN=70) ::  do2d_xy             !<
+    CHARACTER (LEN=70) ::  do2d_xz             !<
+    CHARACTER (LEN=70) ::  do2d_yz             !<
+    CHARACTER (LEN=70) ::  do3d_chr            !<
+    CHARACTER (LEN=70) ::  domask_chr          !<
+    CHARACTER (LEN=70) ::  run_classification  !<
+    
+    CHARACTER (LEN=85) ::  r_upper             !<
+    CHARACTER (LEN=85) ::  r_lower             !<
+    
+    CHARACTER (LEN=86) ::  coordinates         !<
+    CHARACTER (LEN=86) ::  gradients           !<
+    CHARACTER (LEN=86) ::  slices              !<
+    CHARACTER (LEN=86) ::  temperatures        !<
+    CHARACTER (LEN=86) ::  ugcomponent         !<
+    CHARACTER (LEN=86) ::  vgcomponent         !<
+
+    CHARACTER (LEN=1), DIMENSION(1:3) ::  dir = (/ 'x', 'y', 'z' /)  !<
+
+    INTEGER(iwp) ::  av             !<
+    INTEGER(iwp) ::  bh             !<
+    INTEGER(iwp) ::  blx            !<
+    INTEGER(iwp) ::  bly            !<
+    INTEGER(iwp) ::  bxl            !<
+    INTEGER(iwp) ::  bxr            !<
+    INTEGER(iwp) ::  byn            !<
+    INTEGER(iwp) ::  bys            !<
+    INTEGER(iwp) ::  ch             !<
+    INTEGER(iwp) ::  count          !<
+    INTEGER(iwp) ::  cpl_parent_id  !<
+    INTEGER(iwp) ::  cwx            !<
+    INTEGER(iwp) ::  cwy            !<
+    INTEGER(iwp) ::  cxl            !<
+    INTEGER(iwp) ::  cxr            !<
+    INTEGER(iwp) ::  cyn            !<
+    INTEGER(iwp) ::  cys            !<
+    INTEGER(iwp) ::  dim            !<
+    INTEGER(iwp) ::  i              !<
+    INTEGER(iwp) ::  io             !<
+    INTEGER(iwp) ::  l              !<
+    INTEGER(iwp) ::  ll             !<
+    INTEGER(iwp) ::  my_cpl_id      !<
+    INTEGER(iwp) ::  n              !<
+    INTEGER(iwp) ::  ncpl           !<
+    INTEGER(iwp) ::  npe_total      !<
+    
+
+    REAL(wp) ::  cpuseconds_per_simulated_second  !<
+    REAL(wp) ::  lower_left_coord_x               !< x-coordinate of nest domain
+    REAL(wp) ::  lower_left_coord_y               !< y-coordinate of nest domain
+
+!
+!-- Open the output file. At the end of the simulation, output is directed
+!-- to unit 19.
+    IF ( ( runnr == 0 .OR. force_print_header )  .AND. &
+         .NOT. simulated_time_at_begin /= simulated_time )  THEN
+       io = 15   !  header output on file RUN_CONTROL
+    ELSE
+       io = 19   !  header output on file HEADER
+    ENDIF
+    CALL check_open( io )
+
+!
+!-- At the end of the run, output file (HEADER) will be rewritten with
+!-- new information
+    IF ( io == 19 .AND. simulated_time_at_begin /= simulated_time ) REWIND( 19 )
+
+!
+!-- Determine kind of model run
+    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
+       run_classification = 'restart run'
+    ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+       run_classification = 'run with cyclic fill of 3D - prerun data'
+    ELSEIF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
+       run_classification = 'run without 1D - prerun'
+    ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+       run_classification = 'run with 1D - prerun'
+    ELSEIF ( INDEX( initializing_actions, 'inifor' ) /= 0 )  THEN
+       run_classification = 'run initialized with COSMO data'
+    ELSEIF ( INDEX( initializing_actions, 'by_user' ) /=0 )  THEN
+       run_classification = 'run initialized by user'
+    ELSEIF ( INDEX( initializing_actions, 'initialize_vortex' ) /=0 )  THEN
+       run_classification = 'run additionally initialized by a Rankine-vortex'
+    ELSEIF ( INDEX( initializing_actions, 'initialize_ptanom' ) /=0 )  THEN
+       run_classification = 'run additionally initialized by temperature anomaly'
+    ELSE
+       message_string = ' unknown action(s): ' // TRIM( initializing_actions )
+       CALL message( 'header', 'PA0191', 0, 0, 0, 6, 0 )
+    ENDIF
+    IF ( nested_run )  run_classification = 'nested ' // run_classification(1:63)
+    IF ( ocean_mode )  THEN
+       run_classification = 'ocean - ' // run_classification(1:61)
+    ELSE
+       run_classification = 'atmosphere - ' // run_classification(1:57)
+    ENDIF
+
+!
+!-- Run-identification, date, time, host
+    host_chr = host(1:10)
+    ver_rev = TRIM( version ) // '  ' // TRIM( revision )
+    WRITE ( io, 100 )  ver_rev, TRIM( run_classification )
+    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
+       WRITE ( io, 101 )  coupling_mode
+    ENDIF
+#if defined( __parallel )
+    IF ( coupling_start_time /= 0.0_wp  .AND. .NOT. spinup )  THEN
+       IF ( coupling_start_time > simulated_time_at_begin )  THEN
+          WRITE ( io, 109 )
+       ELSE
+          WRITE ( io, 114 )
+       ENDIF
+    ENDIF
+#endif
+    IF ( ensemble_member_nr /= 0 )  THEN
+       WRITE ( io, 512 )  run_date, run_identifier, run_time, runnr,           &
+                       ADJUSTR( host_chr ), ensemble_member_nr
+    ELSE
+       WRITE ( io, 102 )  run_date, run_identifier, run_time, runnr,           &
+                       ADJUSTR( host_chr )
+    ENDIF
+#if defined( __parallel )
+    IF ( npex == -1  .AND.  npey == -1 )  THEN
+       char1 = 'calculated'
+    ELSE
+       char1 = 'predefined'
+    ENDIF
+    IF ( threads_per_task == 1 )  THEN
+       WRITE ( io, 103 )  numprocs, pdims(1), pdims(2), TRIM( char1 )
+    ELSE
+       WRITE ( io, 104 )  numprocs*threads_per_task, numprocs, &
+                          threads_per_task, pdims(1), pdims(2), TRIM( char1 )
+    ENDIF
+
+    IF ( pdims(2) == 1 )  THEN
+       WRITE ( io, 107 )  'x'
+    ELSEIF ( pdims(1) == 1 )  THEN
+       WRITE ( io, 107 )  'y'
+    ENDIF
+    IF ( use_seperate_pe_for_dvrp_output )  WRITE ( io, 105 )
+    IF ( numprocs /= maximum_parallel_io_streams )  THEN
+       WRITE ( io, 108 )  maximum_parallel_io_streams
+    ENDIF
+#endif
+
+!
+!-- Nesting informations
+    IF ( nested_run )  THEN
+
+#if defined( __parallel )
+       WRITE ( io, 600 )  TRIM( nesting_mode ),                                &
+                          TRIM( nesting_datatransfer_mode )
+       CALL pmc_get_model_info( ncpl = ncpl, cpl_id = my_cpl_id )
+
+       DO  n = 1, ncpl
+          CALL pmc_get_model_info( request_for_cpl_id = n, cpl_name = cpl_name,&
+                                   cpl_parent_id = cpl_parent_id,              &
+                                   lower_left_x = lower_left_coord_x,          &
+                                   lower_left_y = lower_left_coord_y,          &
+                                   npe_total = npe_total )
+          IF ( n == my_cpl_id )  THEN
+             char1 = '*'
+          ELSE
+             char1 = ' '
+          ENDIF
+          WRITE ( io, 601 )  TRIM( char1 ), n, cpl_parent_id, npe_total,       &
+                             lower_left_coord_x, lower_left_coord_y,           &
+                             TRIM( cpl_name )
+       ENDDO
+#endif
+
+    ENDIF
+    WRITE ( io, 99 )
+
+!
+!-- Numerical schemes
+    WRITE ( io, 110 )
+    IF ( rans_mode )  THEN
+       WRITE ( io, 124 )  TRIM( turbulence_closure ), 'RANS'
+    ELSE
+       WRITE ( io, 124 )  TRIM( turbulence_closure ), 'LES'
+    ENDIF
+    WRITE ( io, 121 )  TRIM( approximation )
+    IF ( psolver(1:7) == 'poisfft' )  THEN
+       WRITE ( io, 111 )  TRIM( fft_method )
+       IF ( transpose_compute_overlap )  WRITE( io, 115 )
+    ELSEIF ( psolver == 'sor' )  THEN
+       WRITE ( io, 112 )  nsor_ini, nsor, omega_sor
+    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
+       WRITE ( io, 135 )  TRIM(psolver), cycle_mg, maximum_grid_level, ngsrb
+       IF ( mg_cycles == -1 )  THEN
+          WRITE ( io, 140 )  residual_limit
+       ELSE
+          WRITE ( io, 141 )  mg_cycles
+       ENDIF
+       IF ( mg_switch_to_pe0_level == 0 )  THEN
+          WRITE ( io, 136 )  nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
+                             nzt_mg(1)
+       ELSEIF (  mg_switch_to_pe0_level /= -1 )  THEN
+          WRITE ( io, 137 )  mg_switch_to_pe0_level,            &
+                             mg_loc_ind(2,0)-mg_loc_ind(1,0)+1, &
+                             mg_loc_ind(4,0)-mg_loc_ind(3,0)+1, &
+                             nzt_mg(mg_switch_to_pe0_level),    &
+                             nxr_mg(1)-nxl_mg(1)+1, nyn_mg(1)-nys_mg(1)+1, &
+                             nzt_mg(1)
+       ENDIF
+       IF ( psolver == 'multigrid_noopt' .AND. masking_method )  WRITE ( io, 144 )
+    ENDIF
+    IF ( call_psolver_at_all_substeps  .AND. timestep_scheme(1:5) == 'runge' ) &
+    THEN
+       WRITE ( io, 142 )
+    ENDIF
+
+    IF ( momentum_advec == 'pw-scheme' )  THEN
+       WRITE ( io, 113 )
+    ELSEIF (momentum_advec == 'ws-scheme' )  THEN
+       WRITE ( io, 503 )
+    ENDIF
+    IF ( scalar_advec == 'pw-scheme' )  THEN
+       WRITE ( io, 116 )
+    ELSEIF ( scalar_advec == 'ws-scheme' )  THEN
+       WRITE ( io, 504 )
+    ELSE
+       WRITE ( io, 118 )
+    ENDIF
+
+    WRITE ( io, 139 )  TRIM( loop_optimization )
+
+    IF ( galilei_transformation )  THEN
+       IF ( use_ug_for_galilei_tr )  THEN
+          char1 = '0.6 * geostrophic wind'
+       ELSE
+          char1 = 'mean wind in model domain'
+       ENDIF
+       IF ( simulated_time_at_begin == simulated_time )  THEN
+          char2 = 'at the start of the run'
+       ELSE
+          char2 = 'at the end of the run'
+       ENDIF
+       WRITE ( io, 119 )  TRIM( char1 ), TRIM( char2 ),                        &
+                          advected_distance_x/1000.0_wp,                       &
+                          advected_distance_y/1000.0_wp
+    ENDIF
+    WRITE ( io, 122 )  timestep_scheme
+    IF ( use_upstream_for_tke )  WRITE ( io, 143 )
+    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
+       IF ( .NOT. ocean_mode )  THEN
+          WRITE ( io, 123 )  'above', rayleigh_damping_height, &
+               rayleigh_damping_factor
+       ELSE
+          WRITE ( io, 123 )  'below', rayleigh_damping_height, &
+               rayleigh_damping_factor
+       ENDIF
+    ENDIF
+    IF ( neutral )  WRITE ( io, 131 )  pt_surface
+    IF ( humidity )  THEN
+       IF ( .NOT. bulk_cloud_model )  THEN
+          WRITE ( io, 129 )
+       ELSE
+          WRITE ( io, 130 )
+       ENDIF
+    ENDIF
+    IF ( passive_scalar )  WRITE ( io, 134 )
+    IF ( conserve_volume_flow )  THEN
+       WRITE ( io, 150 )  conserve_volume_flow_mode
+       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
+          WRITE ( io, 151 )  u_bulk, v_bulk
+       ENDIF
+    ELSEIF ( dp_external )  THEN
+       IF ( dp_smooth )  THEN
+          WRITE ( io, 152 )  dpdxy, dp_level_b, ', vertically smoothed.'
+       ELSE
+          WRITE ( io, 152 )  dpdxy, dp_level_b, '.'
+       ENDIF
+    ENDIF
+    WRITE ( io, 99 )
+
+!
+!-- Runtime and timestep information
+    WRITE ( io, 200 )
+    IF ( .NOT. dt_fixed )  THEN
+       WRITE ( io, 201 )  dt_max, cfl_factor
+    ELSE
+       WRITE ( io, 202 )  dt
+    ENDIF
+    WRITE ( io, 203 )  simulated_time_at_begin, end_time
+
+    IF ( time_restart /= 9999999.9_wp  .AND. &
+         simulated_time_at_begin == simulated_time )  THEN
+       IF ( dt_restart == 9999999.9_wp )  THEN
+          WRITE ( io, 204 )  ' Restart at:       ',time_restart
+       ELSE
+          WRITE ( io, 205 )  ' Restart at:       ',time_restart, dt_restart
+       ENDIF
+    ENDIF
+
+    IF ( simulated_time_at_begin /= simulated_time )  THEN
+       i = MAX ( log_point_s(10)%counts, 1 )
+       IF ( ( simulated_time - simulated_time_at_begin ) == 0.0_wp )  THEN
+          cpuseconds_per_simulated_second = 0.0_wp
+       ELSE
+          cpuseconds_per_simulated_second = log_point_s(10)%sum / &
+                                            ( simulated_time -    &
+                                              simulated_time_at_begin )
+       ENDIF
+       WRITE ( io, 206 )  simulated_time, log_point_s(10)%sum,      &
+                          log_point_s(10)%sum / REAL( i, KIND=wp ), &
+                          cpuseconds_per_simulated_second
+       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time )  THEN
+          IF ( dt_restart == 9999999.9_wp )  THEN
+             WRITE ( io, 204 )  ' Next restart at:     ',time_restart
+          ELSE
+             WRITE ( io, 205 )  ' Next restart at:     ',time_restart, dt_restart
+          ENDIF
+       ENDIF
+    ENDIF
+
+
+!
+!-- Start time for coupled runs, if independent precursor runs for atmosphere
+!-- and ocean are used or have been used. In this case, coupling_start_time
+!-- defines the time when the coupling is switched on.
+    IF ( coupling_start_time /= 0.0_wp )  THEN
+       WRITE ( io, 207 )  coupling_start_time
+    ENDIF
+
+!
+!-- Computational grid
+    IF ( .NOT. ocean_mode )  THEN
+       WRITE ( io, 250 )  dx, dy
+       
+       DO i = 1, number_stretch_level_start+1
+          WRITE ( io, 253 )  i, dz(i)
+       ENDDO
+       
+       WRITE( io, 251 ) (nx+1)*dx, (ny+1)*dy, zu(nzt+1)
+       
+       IF ( ANY( dz_stretch_level_start_index < nzt+1 ) )  THEN
+          WRITE( io, '(A)', advance='no') ' Vertical stretching starts at height:'
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_start(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching starts at index: '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_start_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at height:  '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_end(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at index:   '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_end_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Factor used for stretching:          '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F12.3,A1)', advance='no' )  dz_stretch_factor_array(i), ','
+          ENDDO
+       ENDIF
+       
+    ELSE
+       WRITE ( io, 250 )  dx, dy
+       DO i = 1, number_stretch_level_start+1
+          WRITE ( io, 253 )  i, dz(i)
+       ENDDO
+       
+       WRITE ( io, 251 ) (nx+1)*dx, (ny+1)*dy, zu(0)
+       
+       IF ( ANY( dz_stretch_level_start_index > 0 ) )  THEN
+          WRITE( io, '(A)', advance='no') ' Vertical stretching starts at height:'
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_start(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching starts at index: '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_start_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at height:  '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F10.1,A3)', advance='no' )  dz_stretch_level_end(i), ' m,'
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Vertical stretching ends at index:   '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(I12,A1)', advance='no' )  dz_stretch_level_end_index(i), ','
+          ENDDO
+          WRITE( io, '(/,A)', advance='no') ' Factor used for stretching:          '
+          DO i = 1, number_stretch_level_start
+             WRITE ( io, '(F12.3,A1)', advance='no' )  dz_stretch_factor_array(i), ','
+          ENDDO
+       ENDIF
+    ENDIF
+    WRITE ( io, 254 )  nx, ny, nzt+1, MIN( nnx, nx+1 ), MIN( nny, ny+1 ),      &
+                       MIN( nnz+2, nzt+2 )
+    IF ( sloping_surface )  WRITE ( io, 260 )  alpha_surface
+
+!
+!-- Large scale forcing and nudging
+    IF ( large_scale_forcing )  CALL lsf_nudging_header( io )
+
+!
+!-- Offline nesting 
+    IF ( nesting_offline )  CALL nesting_offl_header( io )
+
+!
+!-- Profile for the large scale vertial velocity
+!-- Building output strings, starting with surface value
+    IF ( large_scale_subsidence )  THEN
+       temperatures = '   0.0'
+       gradients = '------'
+       slices = '     0'
+       coordinates = '   0.0'
+       i = 1
+       DO  WHILE ( subs_vertical_gradient_level_i(i) /= -9999 )
+
+          WRITE (coor_chr,'(E10.2,7X)')  &
+                                w_subs(subs_vertical_gradient_level_i(i))
+          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(E10.2,7X)')  subs_vertical_gradient(i)
+          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(I10,7X)')  subs_vertical_gradient_level_i(i)
+          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(F10.2,7X)')  subs_vertical_gradient_level(i)
+          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
+
+          IF ( i == 10 )  THEN
+             EXIT
+          ELSE
+             i = i + 1
+          ENDIF
+
+       ENDDO
+
+ 
+       IF ( .NOT. large_scale_forcing )  THEN
+          WRITE ( io, 426 )  TRIM( coordinates ), TRIM( temperatures ), &
+                             TRIM( gradients ), TRIM( slices )
+       ENDIF
+
+
+    ENDIF
+
+!-- Profile of the geostrophic wind (component ug)
+!-- Building output strings
+    WRITE ( ugcomponent, '(F6.2)' )  ug_surface
+    gradients = '------'
+    slices = '     0'
+    coordinates = '   0.0'
+    i = 1
+    DO  WHILE ( ug_vertical_gradient_level_ind(i) /= -9999 )
+      
+       WRITE (coor_chr,'(F6.2,1X)')  ug(ug_vertical_gradient_level_ind(i))
+       ugcomponent = TRIM( ugcomponent ) // '  ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(F6.2,1X)')  ug_vertical_gradient(i)
+       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(I6,1X)')  ug_vertical_gradient_level_ind(i)
+       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(F6.1,1X)')  ug_vertical_gradient_level(i)
+       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
+
+       IF ( i == 10 )  THEN
+          EXIT
+       ELSE
+          i = i + 1
+       ENDIF
+
+    ENDDO
+
+    IF ( .NOT. large_scale_forcing )  THEN
+       WRITE ( io, 423 )  TRIM( coordinates ), TRIM( ugcomponent ), &
+                          TRIM( gradients ), TRIM( slices )
+    ENDIF
+
+!-- Profile of the geostrophic wind (component vg)
+!-- Building output strings
+    WRITE ( vgcomponent, '(F6.2)' )  vg_surface
+    gradients = '------'
+    slices = '     0'
+    coordinates = '   0.0'
+    i = 1
+    DO  WHILE ( vg_vertical_gradient_level_ind(i) /= -9999 )
+
+       WRITE (coor_chr,'(F6.2,1X)')  vg(vg_vertical_gradient_level_ind(i))
+       vgcomponent = TRIM( vgcomponent ) // '  ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(F6.2,1X)')  vg_vertical_gradient(i)
+       gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(I6,1X)')  vg_vertical_gradient_level_ind(i)
+       slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(F6.1,1X)')  vg_vertical_gradient_level(i)
+       coordinates = TRIM( coordinates ) // '  ' // TRIM( coor_chr )
+
+       IF ( i == 10 )  THEN
+          EXIT
+       ELSE
+          i = i + 1
+       ENDIF
+ 
+    ENDDO
+
+    IF ( .NOT. large_scale_forcing )  THEN
+       WRITE ( io, 424 )  TRIM( coordinates ), TRIM( vgcomponent ), &
+                          TRIM( gradients ), TRIM( slices )
+    ENDIF
+
+!
+!-- Topography
+    WRITE ( io, 270 )  topography
+    SELECT CASE ( TRIM( topography ) )
+
+       CASE ( 'flat' )
+          ! no actions necessary
+
+       CASE ( 'single_building' )
+          blx = INT( building_length_x / dx )
+          bly = INT( building_length_y / dy )
+          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
+          IF ( ABS( zw(bh  ) - building_height ) == &
+               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
+
+          IF ( building_wall_left == 9999999.9_wp )  THEN
+             building_wall_left = ( nx + 1 - blx ) / 2 * dx
+          ENDIF
+          bxl = INT ( building_wall_left / dx + 0.5_wp )
+          bxr = bxl + blx
+
+          IF ( building_wall_south == 9999999.9_wp )  THEN
+             building_wall_south = ( ny + 1 - bly ) / 2 * dy
+          ENDIF
+          bys = INT ( building_wall_south / dy + 0.5_wp )
+          byn = bys + bly
+
+          WRITE ( io, 271 )  building_length_x, building_length_y, &
+                             building_height, bxl, bxr, bys, byn
+
+       CASE ( 'single_street_canyon' )
+          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
+          IF ( ABS( zw(ch  ) - canyon_height ) == &
+               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
+          IF ( canyon_width_x /= 9999999.9_wp )  THEN
+!
+!--          Street canyon in y direction
+             cwx = NINT( canyon_width_x / dx )
+             IF ( canyon_wall_left == 9999999.9_wp )  THEN
+                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
+             ENDIF
+             cxl = NINT( canyon_wall_left / dx )
+             cxr = cxl + cwx
+             WRITE ( io, 272 )  'y', canyon_height, ch, 'u', cxl, cxr
+
+          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
+!
+!--          Street canyon in x direction
+             cwy = NINT( canyon_width_y / dy )
+             IF ( canyon_wall_south == 9999999.9_wp )  THEN
+                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
+             ENDIF
+             cys = NINT( canyon_wall_south / dy )
+             cyn = cys + cwy
+             WRITE ( io, 272 )  'x', canyon_height, ch, 'v', cys, cyn
+          ENDIF
+
+       CASE ( 'tunnel' )
+          IF ( tunnel_width_x /= 9999999.9_wp )  THEN
+!
+!--          Tunnel axis in y direction
+             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
+                  tunnel_length >= ( nx + 1 ) * dx )  THEN
+                WRITE ( io, 273 )  'y', tunnel_height, tunnel_wall_depth,      &
+                                        tunnel_width_x
+             ELSE
+                WRITE ( io, 274 )  'y', tunnel_height, tunnel_wall_depth,      &
+                                        tunnel_width_x, tunnel_length
+             ENDIF
+
+          ELSEIF ( tunnel_width_y /= 9999999.9_wp )  THEN
+!
+!--          Tunnel axis in x direction
+             IF ( tunnel_length == 9999999.9_wp  .OR.                          &
+                  tunnel_length >= ( ny + 1 ) * dy )  THEN
+                WRITE ( io, 273 )  'x', tunnel_height, tunnel_wall_depth,      &
+                                        tunnel_width_y
+             ELSE
+                WRITE ( io, 274 )  'x', tunnel_height, tunnel_wall_depth,      &
+                                        tunnel_width_y, tunnel_length
+             ENDIF
+          ENDIF
+
+    END SELECT
+
+    IF ( TRIM( topography ) /= 'flat' )  THEN
+       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
+          IF ( TRIM( topography ) == 'single_building' .OR.  &
+               TRIM( topography ) == 'single_street_canyon' )  THEN
+             WRITE ( io, 278 )
+          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
+             WRITE ( io, 279 )
+          ENDIF
+       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
+          WRITE ( io, 278 )
+       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
+          WRITE ( io, 279 )
+       ENDIF
+    ENDIF
+
+!-- Complex terrain
+    IF ( complex_terrain )  THEN
+       WRITE( io, 280 ) 
+       IF ( turbulent_inflow )  THEN
+          WRITE( io, 281 )  zu( get_topography_top_index_ji( 0, 0, 's' ) )
+       ENDIF
+       IF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+          WRITE( io, 282 )
+       ENDIF
+    ENDIF
+
+!
+!-- Header information from other modules
+    IF ( biometeorology      )  CALL biom_header ( io )
+    IF ( gust_module_enabled )  CALL gust_header( io )
+    IF ( land_surface        )  CALL lsm_header( io )
+    IF ( ocean_mode          )  CALL ocean_header( io )
+    IF ( plant_canopy        )  CALL pcm_header( io )
+    IF ( radiation           )  CALL radiation_header( io )
+    IF ( syn_turb_gen        )  CALL stg_header( io )
+
+    IF ( air_chemistry )  CALL chem_header ( io )
+!
+!-- Boundary conditions
+    IF ( ibc_p_b == 0 )  THEN
+       r_lower = 'p(0)     = 0      |'
+    ELSEIF ( ibc_p_b == 1 )  THEN
+       r_lower = 'p(0)     = p(1)   |'
+    ENDIF
+    IF ( ibc_p_t == 0 )  THEN
+       r_upper  = 'p(nzt+1) = 0      |'
+    ELSE
+       r_upper  = 'p(nzt+1) = p(nzt) |'
+    ENDIF
+
+    IF ( ibc_uv_b == 0 )  THEN
+       r_lower = TRIM( r_lower ) // ' uv(0)     = -uv(1)                |'
+    ELSE
+       r_lower = TRIM( r_lower ) // ' uv(0)     = uv(1)                 |'
+    ENDIF
+    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
+       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = 0                     |'
+    ELSEIF ( ibc_uv_t == 0 )  THEN
+       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
+    ELSE
+       r_upper  = TRIM( r_upper  ) // ' uv(nzt+1) = uv(nzt)               |'
+    ENDIF
+
+    IF ( ibc_pt_b == 0 )  THEN
+       IF ( land_surface )  THEN
+          r_lower = TRIM( r_lower ) // ' pt(0)     = from soil model'
+       ELSE
+          r_lower = TRIM( r_lower ) // ' pt(0)     = pt_surface'
+       ENDIF
+    ELSEIF ( ibc_pt_b == 1 )  THEN
+       r_lower = TRIM( r_lower ) // ' pt(0)     = pt(1)'
+    ELSEIF ( ibc_pt_b == 2 )  THEN
+       r_lower = TRIM( r_lower ) // ' pt(0)     = from coupled model'
+    ENDIF
+    IF ( ibc_pt_t == 0 )  THEN
+       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt_top'
+    ELSEIF( ibc_pt_t == 1 )  THEN
+       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt)'
+    ELSEIF( ibc_pt_t == 2 )  THEN
+       r_upper  = TRIM( r_upper  ) // ' pt(nzt+1) = pt(nzt) + dpt/dz_ini'
+
+    ENDIF
+
+    WRITE ( io, 300 )  r_lower, r_upper
+
+    IF ( .NOT. constant_diffusion )  THEN
+       IF ( ibc_e_b == 1 )  THEN
+          r_lower = 'e(0)     = e(1)'
+       ELSE
+          r_lower = 'e(0)     = e(1) = (u*/0.1)**2'
+       ENDIF
+       r_upper = 'e(nzt+1) = e(nzt) = e(nzt-1)'
+
+       WRITE ( io, 301 )  'e', r_lower, r_upper       
+
+    ENDIF
+
+    IF ( ocean_mode )  THEN
+       r_lower = 'sa(0)    = sa(1)'
+       IF ( ibc_sa_t == 0 )  THEN
+          r_upper =  'sa(nzt+1) = sa_surface'
+       ELSE
+          r_upper =  'sa(nzt+1) = sa(nzt)'
+       ENDIF
+       WRITE ( io, 301 ) 'sa', r_lower, r_upper
+    ENDIF
+
+    IF ( humidity )  THEN
+       IF ( ibc_q_b == 0 )  THEN
+          IF ( land_surface )  THEN
+             r_lower = 'q(0)     = from soil model'
+          ELSE
+             r_lower = 'q(0)     = q_surface'
+          ENDIF
+
+       ELSE
+          r_lower = 'q(0)      = q(1)'
+       ENDIF
+       IF ( ibc_q_t == 0 )  THEN
+          r_upper =  'q(nzt+1) = q_top'
+       ELSE
+          r_upper =  'q(nzt+1) = q(nzt) + dq/dz'
+       ENDIF
+       WRITE ( io, 301 ) 'q', r_lower, r_upper
+    ENDIF
+
+    IF ( passive_scalar )  THEN
+       IF ( ibc_s_b == 0 )  THEN
+          r_lower = 's(0)      = s_surface'
+       ELSE
+          r_lower = 's(0)      = s(1)'
+       ENDIF
+       IF ( ibc_s_t == 0 )  THEN
+          r_upper =  's(nzt+1) = s_top'
+       ELSEIF ( ibc_s_t == 1 )  THEN
+          r_upper =  's(nzt+1) = s(nzt)'
+       ELSEIF ( ibc_s_t == 2 )  THEN
+          r_upper =  's(nzt+1) = s(nzt) + ds/dz'
+       ENDIF
+       WRITE ( io, 301 ) 's', r_lower, r_upper
+    ENDIF
+
+    IF ( use_surface_fluxes )  THEN
+       WRITE ( io, 303 )
+       IF ( constant_heatflux )  THEN
+          IF ( large_scale_forcing .AND. lsf_surf )  THEN
+             IF ( surf_def_h(0)%ns >= 1 )  WRITE ( io, 306 )  surf_def_h(0)%shf(1)
+          ELSE
+             WRITE ( io, 306 )  surface_heatflux
+          ENDIF
+          IF ( random_heatflux )  WRITE ( io, 307 )
+       ENDIF
+       IF ( humidity  .AND.  constant_waterflux )  THEN
+          IF ( large_scale_forcing .AND. lsf_surf )  THEN
+             WRITE ( io, 311 ) surf_def_h(0)%qsws(1)
+          ELSE
+             WRITE ( io, 311 ) surface_waterflux
+          ENDIF
+       ENDIF
+       IF ( passive_scalar  .AND.  constant_scalarflux )  THEN
+          WRITE ( io, 313 ) surface_scalarflux
+       ENDIF
+    ENDIF
+
+    IF ( use_top_fluxes )  THEN
+       WRITE ( io, 304 )
+       IF ( coupling_mode == 'uncoupled' )  THEN
+          WRITE ( io, 320 )  top_momentumflux_u, top_momentumflux_v
+          IF ( constant_top_heatflux )  THEN
+             WRITE ( io, 306 )  top_heatflux
+          ENDIF
+       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
+          WRITE ( io, 316 )
+       ENDIF
+       IF ( ocean_mode  .AND.  constant_top_salinityflux )                          &
+          WRITE ( io, 309 )  top_salinityflux
+       IF ( humidity       )  WRITE ( io, 315 )
+       IF ( passive_scalar .AND.  constant_top_scalarflux )                    &
+          WRITE ( io, 302 ) top_scalarflux
+    ENDIF
+
+    IF ( constant_flux_layer )  THEN
+       WRITE ( io, 305 )  (zu(1)-zu(0)), roughness_length,                     &
+                          z0h_factor*roughness_length, kappa,                  &
+                          zeta_min, zeta_max
+       IF ( .NOT. constant_heatflux )  WRITE ( io, 308 )
+       IF ( humidity  .AND.  .NOT. constant_waterflux )  THEN
+          WRITE ( io, 312 )
+       ENDIF
+       IF ( passive_scalar  .AND.  .NOT. constant_scalarflux )  THEN
+          WRITE ( io, 314 )
+       ENDIF
+    ELSE
+       IF ( INDEX(initializing_actions, 'set_1d-model_profiles') /= 0 )  THEN
+          WRITE ( io, 310 )  zeta_min, zeta_max
+       ENDIF
+    ENDIF
+
+    WRITE ( io, 317 )  bc_lr, bc_ns
+    IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
+       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
+       IF ( turbulent_inflow )  THEN
+          IF ( .NOT. recycling_yshift ) THEN
+             WRITE ( io, 319 )  recycling_width, recycling_plane, &
+                                inflow_damping_height, inflow_damping_width
+          ELSE
+             WRITE ( io, 322 )  recycling_width, recycling_plane, &
+                                inflow_damping_height, inflow_damping_width
+          END IF
+       ENDIF
+       IF ( turbulent_outflow )  THEN
+          WRITE ( io, 323 )  outflow_source_plane, INT(outflow_source_plane/dx)
+       ENDIF
+    ENDIF
+
+!
+!-- Initial Profiles
+    WRITE ( io, 321 )
+!
+!-- Initial wind profiles
+    IF ( u_profile(1) /= 9999999.9_wp )  WRITE ( io, 427 )
+
+!
+!-- Initial temperature profile
+!-- Building output strings, starting with surface temperature
+    WRITE ( temperatures, '(F6.2)' )  pt_surface
+    gradients = '------'
+    slices = '     0'
+    coordinates = '   0.0'
+    i = 1
+    DO  WHILE ( pt_vertical_gradient_level_ind(i) /= -9999 )
+
+       WRITE (coor_chr,'(F7.2)')  pt_init(pt_vertical_gradient_level_ind(i))
+       temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(F7.2)')  pt_vertical_gradient(i)
+       gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(I7)')  pt_vertical_gradient_level_ind(i)
+       slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
+
+       WRITE (coor_chr,'(F7.1)')  pt_vertical_gradient_level(i)
+       coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
+
+       IF ( i == 10 )  THEN
+          EXIT
+       ELSE
+          i = i + 1
+       ENDIF
+
+    ENDDO
+
+    IF ( .NOT. nudging )  THEN
+       WRITE ( io, 420 )  TRIM( coordinates ), TRIM( temperatures ), &
+                          TRIM( gradients ), TRIM( slices )
+    ELSE
+       WRITE ( io, 428 ) 
+    ENDIF
+
+!
+!-- Initial humidity profile
+!-- Building output strings, starting with surface humidity
+    IF ( humidity )  THEN
+       WRITE ( temperatures, '(E8.1)' )  q_surface
+       gradients = '--------'
+       slices = '       0'
+       coordinates = '     0.0'
+       i = 1
+       DO  WHILE ( q_vertical_gradient_level_ind(i) /= -9999 )
+          
+          WRITE (coor_chr,'(E8.1,4X)')  q_init(q_vertical_gradient_level_ind(i))
+          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(E8.1,4X)')  q_vertical_gradient(i)
+          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
+          
+          WRITE (coor_chr,'(I8,4X)')  q_vertical_gradient_level_ind(i)
+          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
+          
+          WRITE (coor_chr,'(F8.1,4X)')  q_vertical_gradient_level(i)
+          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
+
+          IF ( i == 10 )  THEN
+             EXIT
+          ELSE
+             i = i + 1
+          ENDIF
+
+       ENDDO
+
+       IF ( .NOT. nudging )  THEN
+          WRITE ( io, 421 )  TRIM( coordinates ), TRIM( temperatures ),        &
+                             TRIM( gradients ), TRIM( slices )
+       ENDIF
+    ENDIF
+!
+!-- Initial scalar profile
+!-- Building output strings, starting with surface humidity
+    IF ( passive_scalar )  THEN
+       WRITE ( temperatures, '(E8.1)' )  s_surface
+       gradients = '--------'
+       slices = '       0'
+       coordinates = '     0.0'
+       i = 1
+       DO  WHILE ( s_vertical_gradient_level_ind(i) /= -9999 )
+          
+          WRITE (coor_chr,'(E8.1,4X)')  s_init(s_vertical_gradient_level_ind(i))
+          temperatures = TRIM( temperatures ) // '  ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(E8.1,4X)')  s_vertical_gradient(i)
+          gradients = TRIM( gradients ) // '  ' // TRIM( coor_chr )
+          
+          WRITE (coor_chr,'(I8,4X)')  s_vertical_gradient_level_ind(i)
+          slices = TRIM( slices ) // '  ' // TRIM( coor_chr )
+          
+          WRITE (coor_chr,'(F8.1,4X)')  s_vertical_gradient_level(i)
+          coordinates = TRIM( coordinates ) // '  '  // TRIM( coor_chr )
+
+          IF ( i == 10 )  THEN
+             EXIT
+          ELSE
+             i = i + 1
+          ENDIF
+
+       ENDDO
+
+       WRITE ( io, 422 )  TRIM( coordinates ), TRIM( temperatures ),           &
+                          TRIM( gradients ), TRIM( slices )
+    ENDIF    
+
+!
+!-- Initial salinity profile
+!-- Building output strings, starting with surface salinity
+    IF ( ocean_mode )  THEN
+       WRITE ( temperatures, '(F6.2)' )  sa_surface
+       gradients = '------'
+       slices = '     0'
+       coordinates = '   0.0'
+       i = 1
+       DO  WHILE ( sa_vertical_gradient_level_ind(i) /= -9999 )
+
+          WRITE (coor_chr,'(F7.2)')  sa_init(sa_vertical_gradient_level_ind(i))
+          temperatures = TRIM( temperatures ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(F7.2)')  sa_vertical_gradient(i)
+          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(I7)')  sa_vertical_gradient_level_ind(i)
+          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(F7.1)')  sa_vertical_gradient_level(i)
+          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
+
+          IF ( i == 10 )  THEN
+             EXIT
+          ELSE
+             i = i + 1
+          ENDIF
+
+       ENDDO
+
+       WRITE ( io, 425 )  TRIM( coordinates ), TRIM( temperatures ), &
+                          TRIM( gradients ), TRIM( slices )
+    ENDIF
+
+
+!
+!-- Listing of 1D-profiles
+    WRITE ( io, 325 )  dt_dopr_listing
+    IF ( averaging_interval_pr /= 0.0_wp )  THEN
+       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
+    ENDIF
+
+!
+!-- DATA output
+    WRITE ( io, 330 )
+    IF ( averaging_interval_pr /= 0.0_wp )  THEN
+       WRITE ( io, 326 )  averaging_interval_pr, dt_averaging_input_pr
+    ENDIF
+
+!
+!-- 1D-profiles
+    dopr_chr = 'Profile:'
+    IF ( dopr_n /= 0 )  THEN
+       WRITE ( io, 331 )
+
+       output_format = ''
+       output_format = netcdf_data_format_string
+       IF ( netcdf_deflate == 0 )  THEN
+          WRITE ( io, 344 )  output_format
+       ELSE
+          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
+       ENDIF
+
+       DO  i = 1, dopr_n
+          dopr_chr = TRIM( dopr_chr ) // ' ' // TRIM( data_output_pr(i) ) // ','
+          IF ( LEN_TRIM( dopr_chr ) >= 60 )  THEN
+             WRITE ( io, 332 )  dopr_chr
+             dopr_chr = '       :'
+          ENDIF
+       ENDDO
+
+       IF ( dopr_chr /= '' )  THEN
+          WRITE ( io, 332 )  dopr_chr
+       ENDIF
+       WRITE ( io, 333 )  dt_dopr, averaging_interval_pr, dt_averaging_input_pr
+       IF ( skip_time_dopr /= 0.0_wp )  WRITE ( io, 339 )  skip_time_dopr
+    ENDIF
+
+!
+!-- 2D-arrays
+    DO  av = 0, 1
+
+       i = 1
+       do2d_xy = ''
+       do2d_xz = ''
+       do2d_yz = ''
+       DO  WHILE ( do2d(av,i) /= ' ' )
+
+          l = MAX( 2, LEN_TRIM( do2d(av,i) ) )
+          do2d_mode = do2d(av,i)(l-1:l)
+
+          SELECT CASE ( do2d_mode )
+             CASE ( 'xy' )
+                ll = LEN_TRIM( do2d_xy )
+                do2d_xy = do2d_xy(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
+             CASE ( 'xz' )
+                ll = LEN_TRIM( do2d_xz )
+                do2d_xz = do2d_xz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
+             CASE ( 'yz' )
+                ll = LEN_TRIM( do2d_yz )
+                do2d_yz = do2d_yz(1:ll) // ' ' // do2d(av,i)(1:l-3) // ','
+          END SELECT
+
+          i = i + 1
+
+       ENDDO
+
+       IF ( ( ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  .OR.    &
+              ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  .OR.    &
+              ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 ) ) )  THEN
+
+          IF (  av == 0 )  THEN
+             WRITE ( io, 334 )  ''
+          ELSE
+             WRITE ( io, 334 )  '(time-averaged)'
+          ENDIF
+
+          IF ( do2d_at_begin )  THEN
+             begin_chr = 'and at the start'
+          ELSE
+             begin_chr = ''
+          ENDIF
+
+          output_format = ''
+          output_format = netcdf_data_format_string
+          IF ( netcdf_deflate == 0 )  THEN
+             WRITE ( io, 344 )  output_format
+          ELSE
+             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
+          ENDIF
+
+          IF ( do2d_xy /= ''  .AND.  section(1,1) /= -9999 )  THEN
+             i = 1
+             slices = '/'
+             coordinates = '/'
+!
+!--          Building strings with index and coordinate information of the
+!--          slices
+             DO  WHILE ( section(i,1) /= -9999 )
+
+                WRITE (section_chr,'(I5)')  section(i,1)
+                section_chr = ADJUSTL( section_chr )
+                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
+
+                IF ( section(i,1) == -1 )  THEN
+                   WRITE (coor_chr,'(F10.1)')  -1.0_wp
+                ELSE
+                   WRITE (coor_chr,'(F10.1)')  zu(section(i,1))
+                ENDIF
+                coor_chr = ADJUSTL( coor_chr )
+                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
+
+                i = i + 1
+             ENDDO
+             IF ( av == 0 )  THEN
+                WRITE ( io, 335 )  'XY', do2d_xy, dt_do2d_xy, &
+                                   TRIM( begin_chr ), 'k', TRIM( slices ), &
+                                   TRIM( coordinates )
+                IF ( skip_time_do2d_xy /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_do2d_xy
+                ENDIF
+             ELSE
+                WRITE ( io, 342 )  'XY', do2d_xy, dt_data_output_av, &
+                                   TRIM( begin_chr ), averaging_interval, &
+                                   dt_averaging_input, 'k', TRIM( slices ), &
+                                   TRIM( coordinates )
+                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_data_output_av
+                ENDIF
+             ENDIF
+             IF ( netcdf_data_format > 4 )  THEN
+                WRITE ( io, 352 )  ntdim_2d_xy(av)
+             ELSE
+                WRITE ( io, 353 )
+             ENDIF
+          ENDIF
+
+          IF ( do2d_xz /= ''  .AND.  section(1,2) /= -9999 )  THEN
+             i = 1
+             slices = '/'
+             coordinates = '/'
+!
+!--          Building strings with index and coordinate information of the
+!--          slices
+             DO  WHILE ( section(i,2) /= -9999 )
+
+                WRITE (section_chr,'(I5)')  section(i,2)
+                section_chr = ADJUSTL( section_chr )
+                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
+
+                WRITE (coor_chr,'(F10.1)')  section(i,2) * dy
+                coor_chr = ADJUSTL( coor_chr )
+                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
+
+                i = i + 1
+             ENDDO
+             IF ( av == 0 )  THEN
+                WRITE ( io, 335 )  'XZ', do2d_xz, dt_do2d_xz, &
+                                   TRIM( begin_chr ), 'j', TRIM( slices ), &
+                                   TRIM( coordinates )
+                IF ( skip_time_do2d_xz /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_do2d_xz
+                ENDIF
+             ELSE
+                WRITE ( io, 342 )  'XZ', do2d_xz, dt_data_output_av, &
+                                   TRIM( begin_chr ), averaging_interval, &
+                                   dt_averaging_input, 'j', TRIM( slices ), &
+                                   TRIM( coordinates )
+                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_data_output_av
+                ENDIF
+             ENDIF
+             IF ( netcdf_data_format > 4 )  THEN
+                WRITE ( io, 352 )  ntdim_2d_xz(av)
+             ELSE
+                WRITE ( io, 353 )
+             ENDIF
+          ENDIF
+
+          IF ( do2d_yz /= ''  .AND.  section(1,3) /= -9999 )  THEN
+             i = 1
+             slices = '/'
+             coordinates = '/'
+!
+!--          Building strings with index and coordinate information of the
+!--          slices
+             DO  WHILE ( section(i,3) /= -9999 )
+
+                WRITE (section_chr,'(I5)')  section(i,3)
+                section_chr = ADJUSTL( section_chr )
+                slices = TRIM( slices ) // TRIM( section_chr ) // '/'
+
+                WRITE (coor_chr,'(F10.1)')  section(i,3) * dx
+                coor_chr = ADJUSTL( coor_chr )
+                coordinates = TRIM( coordinates ) // TRIM( coor_chr ) // '/'
+
+                i = i + 1
+             ENDDO
+             IF ( av == 0 )  THEN
+                WRITE ( io, 335 )  'YZ', do2d_yz, dt_do2d_yz, &
+                                   TRIM( begin_chr ), 'i', TRIM( slices ), &
+                                   TRIM( coordinates )
+                IF ( skip_time_do2d_yz /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_do2d_yz
+                ENDIF
+             ELSE
+                WRITE ( io, 342 )  'YZ', do2d_yz, dt_data_output_av, &
+                                   TRIM( begin_chr ), averaging_interval, &
+                                   dt_averaging_input, 'i', TRIM( slices ), &
+                                   TRIM( coordinates )
+                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_data_output_av
+                ENDIF
+             ENDIF
+             IF ( netcdf_data_format > 4 )  THEN
+                WRITE ( io, 352 )  ntdim_2d_yz(av)
+             ELSE
+                WRITE ( io, 353 )
+             ENDIF
+          ENDIF
+
+       ENDIF
+
+    ENDDO
+
+!
+!-- 3d-arrays
+    DO  av = 0, 1
+
+       i = 1
+       do3d_chr = ''
+       DO  WHILE ( do3d(av,i) /= ' ' )
+
+          do3d_chr = TRIM( do3d_chr ) // ' ' // TRIM( do3d(av,i) ) // ','
+          i = i + 1
+
+       ENDDO
+
+       IF ( do3d_chr /= '' )  THEN
+          IF ( av == 0 )  THEN
+             WRITE ( io, 336 )  ''
+          ELSE
+             WRITE ( io, 336 )  '(time-averaged)'
+          ENDIF
+
+          output_format = netcdf_data_format_string
+          IF ( netcdf_deflate == 0 )  THEN
+             WRITE ( io, 344 )  output_format
+          ELSE
+             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
+          ENDIF
+
+          IF ( do3d_at_begin )  THEN
+             begin_chr = 'and at the start'
+          ELSE
+             begin_chr = ''
+          ENDIF
+          IF ( av == 0 )  THEN
+             WRITE ( io, 337 )  do3d_chr, dt_do3d, TRIM( begin_chr ), &
+                                zu(nz_do3d), nz_do3d
+          ELSE
+             WRITE ( io, 343 )  do3d_chr, dt_data_output_av,           &
+                                TRIM( begin_chr ), averaging_interval, &
+                                dt_averaging_input, zu(nz_do3d), nz_do3d
+          ENDIF
+
+          IF ( netcdf_data_format > 4 )  THEN
+             WRITE ( io, 352 )  ntdim_3d(av)
+          ELSE
+             WRITE ( io, 353 )
+          ENDIF
+
+          IF ( av == 0 )  THEN
+             IF ( skip_time_do3d /= 0.0_wp )  THEN
+                WRITE ( io, 339 )  skip_time_do3d
+             ENDIF
+          ELSE
+             IF ( skip_time_data_output_av /= 0.0_wp )  THEN
+                WRITE ( io, 339 )  skip_time_data_output_av
+             ENDIF
+          ENDIF
+
+       ENDIF
+
+    ENDDO
+
+!
+!-- masked arrays
+    IF ( masks > 0 )  WRITE ( io, 345 )  &
+         mask_scale_x, mask_scale_y, mask_scale_z
+    DO  mid = 1, masks
+       DO  av = 0, 1
+
+          i = 1
+          domask_chr = ''
+          DO  WHILE ( domask(mid,av,i) /= ' ' )
+             domask_chr = TRIM( domask_chr ) // ' ' //  &
+                          TRIM( domask(mid,av,i) ) // ','
+             i = i + 1
+          ENDDO
+
+          IF ( domask_chr /= '' )  THEN
+             IF ( av == 0 )  THEN
+                WRITE ( io, 346 )  '', mid
+             ELSE
+                WRITE ( io, 346 )  ' (time-averaged)', mid
+             ENDIF
+
+             output_format = netcdf_data_format_string
+!--          Parallel output not implemented for mask data, hence
+!--          output_format must be adjusted.
+             IF ( netcdf_data_format == 5 ) output_format = 'netCDF4/HDF5'
+             IF ( netcdf_data_format == 6 ) output_format = 'netCDF4/HDF5 classic'
+             IF ( netcdf_deflate == 0 )  THEN
+                WRITE ( io, 344 )  output_format
+             ELSE
+                WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
+             ENDIF
+
+             IF ( av == 0 )  THEN
+                WRITE ( io, 347 )  domask_chr, dt_domask(mid)
+             ELSE
+                WRITE ( io, 348 )  domask_chr, dt_data_output_av, &
+                                   averaging_interval, dt_averaging_input
+             ENDIF
+
+             IF ( av == 0 )  THEN
+                IF ( skip_time_domask(mid) /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_domask(mid)
+                ENDIF
+             ELSE
+                IF ( skip_time_data_output_av /= 0.0_wp )  THEN
+                   WRITE ( io, 339 )  skip_time_data_output_av
+                ENDIF
+             ENDIF
+!
+!--          output locations
+             DO  dim = 1, 3
+                IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
+                   count = 0
+                   DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
+                      count = count + 1
+                   ENDDO
+                   WRITE ( io, 349 )  dir(dim), dir(dim), mid, dir(dim), &
+                                      mask(mid,dim,:count)
+                ELSEIF ( mask_loop(mid,dim,1) < 0.0_wp .AND.  &
+                         mask_loop(mid,dim,2) < 0.0_wp .AND.  &
+                         mask_loop(mid,dim,3) == 0.0_wp )  THEN
+                   WRITE ( io, 350 )  dir(dim), dir(dim)
+                ELSEIF ( mask_loop(mid,dim,3) == 0.0_wp )  THEN
+                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
+                                      mask_loop(mid,dim,1:2)
+                ELSE
+                   WRITE ( io, 351 )  dir(dim), dir(dim), mid, dir(dim), &
+                                      mask_loop(mid,dim,1:3)
+                ENDIF
+             ENDDO
+          ENDIF
+
+       ENDDO
+    ENDDO
+
+!
+!-- Timeseries
+    IF ( dt_dots /= 9999999.9_wp )  THEN
+       WRITE ( io, 340 )
+
+       output_format = netcdf_data_format_string
+       IF ( netcdf_deflate == 0 )  THEN
+          WRITE ( io, 344 )  output_format
+       ELSE
+          WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
+       ENDIF
+       WRITE ( io, 341 )  dt_dots
+    ENDIF
+
+#if defined( __dvrp_graphics )
+!
+!-- Dvrp-output
+    IF ( dt_dvrp /= 9999999.9_wp )  THEN
+       WRITE ( io, 360 )  dt_dvrp, TRIM( dvrp_output ), TRIM( dvrp_host ), &
+                          TRIM( dvrp_username ), TRIM( dvrp_directory )
+       i = 1
+       l = 0
+       m = 0
+       DO WHILE ( mode_dvrp(i) /= ' ' )
+          IF ( mode_dvrp(i)(1:10) == 'isosurface' )  THEN
+             READ ( mode_dvrp(i), '(10X,I2)' )  j
+             l = l + 1
+             IF ( do3d(0,j) /= ' ' )  THEN
+                WRITE ( io, 361 )  TRIM( do3d(0,j) ), threshold(l), &
+                                   isosurface_color(:,l)
+             ENDIF
+          ELSEIF ( mode_dvrp(i)(1:6) == 'slicer' )  THEN
+             READ ( mode_dvrp(i), '(6X,I2)' )  j
+             m = m + 1
+             IF ( do2d(0,j) /= ' ' )  THEN
+                WRITE ( io, 362 )  TRIM( do2d(0,j) ), &
+                                   slicer_range_limits_dvrp(:,m)
+             ENDIF
+          ENDIF
+          i = i + 1
+       ENDDO
+
+       WRITE ( io, 365 )  groundplate_color, superelevation_x, &
+                          superelevation_y, superelevation, clip_dvrp_l, &
+                          clip_dvrp_r, clip_dvrp_s, clip_dvrp_n
+
+       IF ( TRIM( topography ) /= 'flat' )  THEN
+          WRITE ( io, 366 )  topography_color
+          IF ( cluster_size > 1 )  THEN
+             WRITE ( io, 367 )  cluster_size
+          ENDIF
+       ENDIF
+
+    ENDIF
+#endif
+!
+!-- Output of virtual flight information
+    IF ( virtual_flight )  CALL flight_header( io )
+
+!
+!-- Output of spectra related quantities
+    IF ( calculate_spectra )  CALL spectra_header( io )
+
+    WRITE ( io, 99 )
+
+!
+!-- Physical quantities
+    WRITE ( io, 400 )
+
+!
+!-- Geostrophic parameters
+    WRITE ( io, 410 )  latitude, longitude, omega, f, fs
+
+!
+!-- Day of year, UTC
+    WRITE ( io, 456 )  day_of_year_init, time_utc_init
+    
+!
+!-- Other quantities
+    WRITE ( io, 411 )  g
+
+    WRITE ( io, 412 )  TRIM( reference_state )
+    IF ( use_single_reference_value )  THEN
+       IF ( ocean_mode )  THEN
+          WRITE ( io, 413 )  prho_reference
+       ELSE
+          WRITE ( io, 414 )  pt_reference
+       ENDIF
+    ENDIF
+
+!
+!-- Output of microphysics information
+    IF ( bulk_cloud_model )  CALL bcm_header( io )
+
+!
+!-- Cloud physcis parameters / quantities / numerical methods
+    WRITE ( io, 430 )
+    IF ( humidity .AND. .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets)  THEN
+       WRITE ( io, 431 )
+    ENDIF
+    IF ( humidity  .AND.  cloud_droplets )  THEN
+       WRITE ( io, 433 )
+       IF ( curvature_solution_effects )  WRITE ( io, 434 )
+       IF ( collision_kernel /= 'none' )  THEN
+          WRITE ( io, 435 )  TRIM( collision_kernel )
+          IF ( collision_kernel(6:9) == 'fast' )  THEN
+             WRITE ( io, 436 )  radius_classes, dissipation_classes
+          ENDIF
+       ELSE
+          WRITE ( io, 437 )
+       ENDIF
+    ENDIF
+
+!
+!-- LES / turbulence parameters
+    WRITE ( io, 450 )
+
+!--
+! ... LES-constants used must still be added here
+!--
+    IF ( constant_diffusion )  THEN
+       WRITE ( io, 451 )  km_constant, km_constant/prandtl_number, &
+                          prandtl_number
+    ENDIF
+    IF ( .NOT. constant_diffusion)  THEN
+       IF ( e_init > 0.0_wp )  WRITE ( io, 455 )  e_init
+       IF ( e_min > 0.0_wp )  WRITE ( io, 454 )  e_min
+       IF ( wall_adjustment )  WRITE ( io, 453 )  wall_adjustment_factor
+    ENDIF
+    IF ( rans_mode )  THEN
+       WRITE ( io, 457 )  rans_const_c, rans_const_sigma
+    ENDIF
+!
+!-- Special actions during the run
+    WRITE ( io, 470 )
+    IF ( create_disturbances )  THEN
+       WRITE ( io, 471 )  dt_disturb, disturbance_amplitude,                   &
+                          zu(disturbance_level_ind_b), disturbance_level_ind_b,&
+                          zu(disturbance_level_ind_t), disturbance_level_ind_t
+       IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
+          WRITE ( io, 472 )  inflow_disturbance_begin, inflow_disturbance_end
+       ELSE
+          WRITE ( io, 473 )  disturbance_energy_limit
+       ENDIF
+       WRITE ( io, 474 )  TRIM( random_generator )
+    ENDIF
+    IF ( pt_surface_initial_change /= 0.0_wp )  THEN
+       WRITE ( io, 475 )  pt_surface_initial_change
+    ENDIF
+    IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
+       WRITE ( io, 476 )  q_surface_initial_change       
+    ENDIF
+    IF ( passive_scalar  .AND.  q_surface_initial_change /= 0.0_wp )  THEN
+       WRITE ( io, 477 )  q_surface_initial_change       
+    ENDIF
+
+    IF ( particle_advection )  THEN
+!
+!--    Particle attributes
+       WRITE ( io, 480 )  particle_advection_start, dt_prel, bc_par_lr, &
+                          bc_par_ns, bc_par_b, bc_par_t, particle_maximum_age, &
+                          end_time_prel
+       IF ( use_sgs_for_particles )  WRITE ( io, 488 )  dt_min_part
+       IF ( random_start_position )  WRITE ( io, 481 )
+       IF ( seed_follows_topography )  WRITE ( io, 496 )
+       IF ( particles_per_point > 1 )  WRITE ( io, 489 )  particles_per_point
+       WRITE ( io, 495 )  total_number_of_particles
+       IF ( dt_write_particle_data /= 9999999.9_wp )  THEN
+          WRITE ( io, 485 )  dt_write_particle_data
+          IF ( netcdf_data_format > 1 )  THEN
+             output_format = 'netcdf (64 bit offset) and binary'
+          ELSE
+             output_format = 'netcdf and binary'
+          ENDIF
+          IF ( netcdf_deflate == 0 )  THEN
+             WRITE ( io, 344 )  output_format
+          ELSE
+             WRITE ( io, 354 )  TRIM( output_format ), netcdf_deflate
+          ENDIF
+       ENDIF
+       IF ( dt_dopts /= 9999999.9_wp )  WRITE ( io, 494 )  dt_dopts
+       IF ( write_particle_statistics )  WRITE ( io, 486 )
+
+       WRITE ( io, 487 )  number_of_particle_groups
+
+       DO  i = 1, number_of_particle_groups
+          IF ( i == 1  .AND.  density_ratio(i) == 9999999.9_wp )  THEN
+             WRITE ( io, 490 )  i, 0.0_wp
+             WRITE ( io, 492 )
+          ELSE
+             WRITE ( io, 490 )  i, radius(i)
+             IF ( density_ratio(i) /= 0.0_wp )  THEN
+                WRITE ( io, 491 )  density_ratio(i)
+             ELSE
+                WRITE ( io, 492 )
+             ENDIF
+          ENDIF
+          WRITE ( io, 493 )  psl(i), psr(i), pss(i), psn(i), psb(i), pst(i), &
+                             pdx(i), pdy(i), pdz(i)
+          IF ( .NOT. vertical_particle_advection(i) )  WRITE ( io, 482 )
+       ENDDO
+
+    ENDIF
+
+
+!
+!-- Parameters of 1D-model
+    IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+       WRITE ( io, 500 )  end_time_1d, dt_run_control_1d, dt_pr_1d, &
+                          mixing_length_1d, dissipation_1d
+       IF ( damp_level_ind_1d /= nzt+1 )  THEN
+          WRITE ( io, 502 )  zu(damp_level_ind_1d), damp_level_ind_1d
+       ENDIF
+    ENDIF
+    
+!
+!-- SALSA information
+    IF ( salsa )  CALL salsa_header( io ) 
+
+!
+!-- User-defined information
+    CALL user_header( io )
+
+    WRITE ( io, 99 )
+
+!
+!-- Write buffer contents to disc immediately
+    FLUSH( io )
+
+!
+!-- Here the FORMATs start
+
+ 99 FORMAT (1X,78('-'))
+100 FORMAT (/1X,'******************************',4X,44('-')/        &
+            1X,'* ',A,' *',4X,A/                               &
+            1X,'******************************',4X,44('-'))
+101 FORMAT (35X,'coupled run: ',A/ &
+            35X,42('-'))
+102 FORMAT (/' Date:                 ',A8,4X,'Run:       ',A34/      &
+            ' Time:                 ',A8,4X,'Run-No.:   ',I2.2/     &
+            ' Run on host:        ',A10)
+#if defined( __parallel )
+103 FORMAT (' Number of PEs:',10X,I6,4X,'Processor grid (x,y): (',I4,',',I4, &
+              ')',1X,A)
+104 FORMAT (' Number of PEs:',10X,I6,4X,'Tasks:',I4,'   threads per task:',I4/ &
+              35X,'Processor grid (x,y): (',I4,',',I4,')',1X,A)
+105 FORMAT (35X,'One additional PE is used to handle'/37X,'the dvrp output!')
+107 FORMAT (35X,'A 1d-decomposition along ',A,' is used')
+108 FORMAT (35X,'Max. # of parallel I/O streams is ',I5)
+109 FORMAT (35X,'Precursor run for coupled atmos-ocean run'/ &
+            35X,42('-'))
+114 FORMAT (35X,'Coupled atmosphere-ocean run following'/ &
+            35X,'independent precursor runs'/             &
+            35X,42('-'))
+#endif
+110 FORMAT (/' Numerical Schemes:'/ &
+             ' -----------------'/)
+124 FORMAT (' --> Use the ',A,' turbulence closure (',A,' mode).')
+121 FORMAT (' --> Use the ',A,' approximation for the model equations.')
+111 FORMAT (' --> Solve perturbation pressure via FFT using ',A,' routines')
+112 FORMAT (' --> Solve perturbation pressure via SOR-Red/Black-Schema'/ &
+            '     Iterations (initial/other): ',I3,'/',I3,'  omega =',F6.3)
+113 FORMAT (' --> Momentum advection via Piascek-Williams-Scheme (Form C3)', &
+                  ' or Upstream')
+115 FORMAT ('     FFT and transpositions are overlapping')
+116 FORMAT (' --> Scalar advection via Piascek-Williams-Scheme (Form C3)', &
+                  ' or Upstream')
+118 FORMAT (' --> Scalar advection via Bott-Chlond-Scheme')
+119 FORMAT (' --> Galilei-Transform applied to horizontal advection:'/ &
+            '     translation velocity = ',A/ &
+            '     distance advected ',A,':  ',F8.3,' km(x)  ',F8.3,' km(y)')
+122 FORMAT (' --> Time differencing scheme: ',A)
+123 FORMAT (' --> Rayleigh-Damping active, starts ',A,' z = ',F8.2,' m'/ &
+            '     maximum damping coefficient:',F6.3, ' 1/s')
+129 FORMAT (' --> Additional prognostic equation for the specific humidity')
+130 FORMAT (' --> Additional prognostic equation for the total water content')
+131 FORMAT (' --> No pt-equation solved. Neutral stratification with pt = ', &
+                  F6.2, ' K assumed')
+134 FORMAT (' --> Additional prognostic equation for a passive scalar')
+135 FORMAT (' --> Solve perturbation pressure via ',A,' method (', &
+                  A,'-cycle)'/ &
+            '     number of grid levels:                   ',I2/ &
+            '     Gauss-Seidel red/black iterations:       ',I2)
+136 FORMAT ('     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
+                  I3,')')
+137 FORMAT ('     level data gathered on PE0 at level:     ',I2/ &
+            '     gridpoints of coarsest subdomain (x,y,z): (',I3,',',I3,',', &
+                  I3,')'/ &
+            '     gridpoints of coarsest domain (x,y,z):    (',I3,',',I3,',', &
+                  I3,')')
+139 FORMAT (' --> Loop optimization method: ',A)
+140 FORMAT ('     maximum residual allowed:                ',E10.3)
+141 FORMAT ('     fixed number of multigrid cycles:        ',I4)
+142 FORMAT ('     perturbation pressure is calculated at every Runge-Kutta ', &
+                  'step')
+143 FORMAT ('     Euler/upstream scheme is used for the SGS turbulent ', &
+                  'kinetic energy')
+144 FORMAT ('     masking method is used')
+150 FORMAT (' --> Volume flow at the right and north boundary will be ', &
+                  'conserved'/ &
+            '     using the ',A,' mode')
+151 FORMAT ('     with u_bulk = ',F7.3,' m/s and v_bulk = ',F7.3,' m/s')
+152 FORMAT (' --> External pressure gradient directly prescribed by the user:',&
+           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
+           /'     starting from dp_level_b =', F8.3, 'm', A /)
+200 FORMAT (//' Run time and time step information:'/ &
+             ' ----------------------------------'/)
+201 FORMAT ( ' Timestep:             variable     maximum value: ',F6.3,' s', &
+             '    CFL-factor:',F5.2)
+202 FORMAT ( ' Timestep:          dt = ',F6.3,' s'/)
+203 FORMAT ( ' Start time:          ',F9.3,' s'/ &
+             ' End time:            ',F9.3,' s')
+204 FORMAT ( A,F9.3,' s')
+205 FORMAT ( A,F9.3,' s',5X,'restart every',17X,F9.3,' s')
+206 FORMAT (/' Time reached:        ',F9.3,' s'/ &
+             ' CPU-time used:       ',F9.3,' s     per timestep:               ', &
+               '  ',F9.3,' s'/                                                    &
+             '                                      per second of simulated tim', &
+               'e: ',F9.3,' s')
+207 FORMAT ( ' Coupling start time: ',F9.3,' s')
+250 FORMAT (//' Computational grid and domain size:'/ &
+              ' ----------------------------------'// &
+              ' Grid length:      dx =    ',F8.3,' m    dy =    ',F8.3, ' m')
+251 FORMAT (  /' Domain size:       x = ',F10.3,' m     y = ',F10.3, &
+              ' m  z(u) = ',F10.3,' m'/)
+253 FORMAT ( '                dz(',I1,') =    ', F8.3, ' m')
+254 FORMAT (//' Number of gridpoints (x,y,z):  (0:',I4,', 0:',I4,', 0:',I4,')'/ &
+            ' Subdomain size (x,y,z):        (  ',I4,',   ',I4,',   ',I4,')'/)
+260 FORMAT (/' The model has a slope in x-direction. Inclination angle: ',F6.2,&
+             ' degrees')
+270 FORMAT (//' Topography information:'/ &
+              ' ----------------------'// &
+              1X,'Topography: ',A)
+271 FORMAT (  ' Building size (x/y/z) in m: ',F5.1,' / ',F5.1,' / ',F5.1/ &
+              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
+                ' / ',I4)
+272 FORMAT (  ' Single quasi-2D street canyon of infinite length in ',A, &
+              ' direction' / &
+              ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
+              ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
+273 FORMAT (  ' Tunnel of infinite length in ',A, &
+              ' direction' / &
+              ' Tunnel height: ', F6.2, / &
+              ' Tunnel-wall depth: ', F6.2      / &
+              ' Tunnel width: ', F6.2 )
+274 FORMAT (  ' Tunnel in ', A, ' direction.' / &
+              ' Tunnel height: ', F6.2, / &    
+              ' Tunnel-wall depth: ', F6.2      / &
+              ' Tunnel width: ', F6.2, / &
+              ' Tunnel length: ', F6.2 )
+278 FORMAT (' Topography grid definition convention:'/ &
+            ' cell edge (staggered grid points'/  &
+            ' (u in x-direction, v in y-direction))' /)
+279 FORMAT (' Topography grid definition convention:'/ &
+            ' cell center (scalar grid points)' /)
+280 FORMAT (' Complex terrain simulation is activated.')
+281 FORMAT ('    --> Mean inflow profiles are adjusted.' / &
+            '    --> Elevation of inflow boundary: ', F7.1, ' m' )
+282 FORMAT ('    --> Initial data from 3D-precursor run is shifted' / &
+            '        vertically depending on local surface height.')
+300 FORMAT (//' Boundary conditions:'/ &
+             ' -------------------'// &
+             '                     p                    uv             ', &
+             '                     pt'// &
+             ' B. bound.: ',A/ &
+             ' T. bound.: ',A)
+301 FORMAT (/'                     ',A// &
+             ' B. bound.: ',A/ &
+             ' T. bound.: ',A)
+303 FORMAT (/' Bottom surface fluxes are used in diffusion terms at k=1')
+304 FORMAT (/' Top surface fluxes are used in diffusion terms at k=nzt')
+305 FORMAT (//'    Constant flux layer between bottom surface and first ',     &
+              'computational u,v-level:'// &
+             '       z_mo = ',F6.2,' m   z0 =',F7.4,' m   z0h =',F8.5,&
+             ' m   kappa =',F5.2/ &
+             '       Rif value range:   ',F8.2,' <= rif <=',F6.2)
+306 FORMAT ('       Predefined constant heatflux:   ',F9.6,' K m/s')
+307 FORMAT ('       Heatflux has a random normal distribution')
+308 FORMAT ('       Predefined surface temperature')
+309 FORMAT ('       Predefined constant salinityflux:   ',F9.6,' psu m/s')
+310 FORMAT (//'    1D-Model:'// &
+             '       Rif value range:   ',F6.2,' <= rif <=',F6.2)
+311 FORMAT ('       Predefined constant humidity flux: ',E10.3,' kg/kg m/s')
+312 FORMAT ('       Predefined surface humidity')
+313 FORMAT ('       Predefined constant scalar flux: ',E10.3,' kg/(m**2 s)')
+314 FORMAT ('       Predefined scalar value at the surface')
+302 FORMAT ('       Predefined constant scalarflux:   ',F9.6,' kg/(m**2 s)')
+315 FORMAT ('       Humidity flux at top surface is 0.0')
+316 FORMAT ('       Sensible heatflux and momentum flux from coupled ', &
+                    'atmosphere model')
+317 FORMAT (//' Lateral boundaries:'/ &
+            '       left/right:  ',A/    &
+            '       north/south: ',A)
+318 FORMAT (/'       use_cmax: ',L1 / &
+            '       pt damping layer width = ',F8.2,' m, pt ', &
+                    'damping factor =',F7.4)
+319 FORMAT ('       turbulence recycling at inflow switched on'/ &
+            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
+            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m')
+320 FORMAT ('       Predefined constant momentumflux:  u: ',F9.6,' m**2/s**2'/ &
+            '                                          v: ',F9.6,' m**2/s**2')
+321 FORMAT (//' Initial profiles:'/ &
+              ' ----------------')
+322 FORMAT ('       turbulence recycling at inflow switched on'/ &
+            '       y shift of the recycled inflow turbulence switched on'/ &
+            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
+            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
+323 FORMAT ('       turbulent outflow conditon switched on'/ &
+            '       position of outflow source plane: ',F7.1,' m   ', &
+                    'grid index: ', I4)
+325 FORMAT (//' List output:'/ &
+             ' -----------'//  &
+            '    1D-Profiles:'/    &
+            '       Output every             ',F10.2,' s')
+326 FORMAT ('       Time averaged over       ',F8.2,' s'/ &
+            '       Averaging input every    ',F8.2,' s')
+330 FORMAT (//' Data output:'/ &
+             ' -----------'/)
+331 FORMAT (/'    1D-Profiles:')
+332 FORMAT (/'       ',A)
+333 FORMAT ('       Output every             ',F8.2,' s',/ &
+            '       Time averaged over       ',F8.2,' s'/ &
+            '       Averaging input every    ',F8.2,' s')
+334 FORMAT (/'    2D-Arrays',A,':')
+335 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
+            '       Output every             ',F8.2,' s  ',A/ &
+            '       Cross sections at ',A1,' = ',A/ &
+            '       scalar-coordinates:   ',A,' m'/)
+336 FORMAT (/'    3D-Arrays',A,':')
+337 FORMAT (/'       Arrays: ',A/ &
+            '       Output every             ',F8.2,' s  ',A/ &
+            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
+339 FORMAT ('       No output during initial ',F8.2,' s')
+340 FORMAT (/'    Time series:')
+341 FORMAT ('       Output every             ',F8.2,' s'/)
+342 FORMAT (/'       ',A2,'-cross-section  Arrays: ',A/ &
+            '       Output every             ',F8.2,' s  ',A/ &
+            '       Time averaged over       ',F8.2,' s'/ &
+            '       Averaging input every    ',F8.2,' s'/ &
+            '       Cross sections at ',A1,' = ',A/ &
+            '       scalar-coordinates:   ',A,' m'/)
+343 FORMAT (/'       Arrays: ',A/ &
+            '       Output every             ',F8.2,' s  ',A/ &
+            '       Time averaged over       ',F8.2,' s'/ &
+            '       Averaging input every    ',F8.2,' s'/ &
+            '       Upper output limit at    ',F8.2,' m  (GP ',I4,')'/)
+344 FORMAT ('       Output format: ',A/)
+345 FORMAT (/'    Scaling lengths for output locations of all subsequent mask IDs:',/ &
+            '       mask_scale_x (in x-direction): ',F9.3, ' m',/ &
+            '       mask_scale_y (in y-direction): ',F9.3, ' m',/ &
+            '       mask_scale_z (in z-direction): ',F9.3, ' m' )
+346 FORMAT (/'    Masked data output',A,' for mask ID ',I2, ':')
+347 FORMAT ('       Variables: ',A/ &
+            '       Output every             ',F8.2,' s')
+348 FORMAT ('       Variables: ',A/ &
+            '       Output every             ',F8.2,' s'/ &
+            '       Time averaged over       ',F8.2,' s'/ &
+            '       Averaging input every    ',F8.2,' s')
+349 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
+            'mask_scale_',A,' predefined by array mask_',I2.2,'_',A,':'/ &
+            13('       ',8(F8.2,',')/) )
+350 FORMAT (/'       Output locations in ',A,'-direction: ', &
+            'all gridpoints along ',A,'-direction (default).' )
+351 FORMAT (/'       Output locations in ',A,'-direction in multiples of ', &
+            'mask_scale_',A,' constructed from array mask_',I2.2,'_',A,'_loop:'/ &
+            '          loop begin:',F8.2,', end:',F8.2,', stride:',F8.2 )
+352 FORMAT  (/'       Number of output time levels allowed: ',I3 /)
+353 FORMAT  (/'       Number of output time levels allowed: unlimited' /)
+354 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
+#if defined( __dvrp_graphics )
+360 FORMAT ('    Plot-Sequence with dvrp-software:'/ &
+            '       Output every      ',F7.1,' s'/ &
+            '       Output mode:      ',A/ &
+            '       Host / User:      ',A,' / ',A/ &
+            '       Directory:        ',A// &
+            '       The sequence contains:')
+361 FORMAT (/'       Isosurface of "',A,'"    Threshold value: ', E12.3/ &
+            '          Isosurface color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
+362 FORMAT (/'       Slicer plane ',A/ &
+            '       Slicer limits: [',F6.2,',',F6.2,']')
+365 FORMAT (/'       Groundplate color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)'/ &
+            '       Superelevation along (x,y,z): (',F4.1,',',F4.1,',',F4.1, &
+                     ')'/ &
+            '       Clipping limits: from x = ',F9.1,' m to x = ',F9.1,' m'/ &
+            '                        from y = ',F9.1,' m to y = ',F9.1,' m')
+366 FORMAT (/'       Topography color: (',F4.2,',',F4.2,',',F4.2,') (R,G,B)')
+367 FORMAT ('       Polygon reduction for topography: cluster_size = ', I1)
+#endif
+400 FORMAT (//' Physical quantities:'/ &
+              ' -------------------'/)
+410 FORMAT ('    Geograph. latitude  :   latitude  = ',F4.1,' degr'/   &
+            '    Geograph. longitude :   longitude = ',F4.1,' degr'/   &
+            '    Angular velocity    :   omega  =',E10.3,' rad/s'/  &
+            '    Coriolis parameter  :   f      = ',F9.6,' 1/s'/    &
+            '                            f*     = ',F9.6,' 1/s')
+411 FORMAT (/'    Gravity             :   g      = ',F4.1,' m/s**2')
+412 FORMAT (/'    Reference state used in buoyancy terms: ',A)
+413 FORMAT ('       Reference density in buoyancy terms: ',F8.3,' kg/m**3')
+414 FORMAT ('       Reference temperature in buoyancy terms: ',F8.4,' K')
+420 FORMAT (/'    Characteristic levels of the initial temperature profile:'// &
+            '       Height:        ',A,'  m'/ &
+            '       Temperature:   ',A,'  K'/ &
+            '       Gradient:      ',A,'  K/100m'/ &
+            '       Gridpoint:     ',A)
+421 FORMAT (/'    Characteristic levels of the initial humidity profile:'// &
+            '       Height:      ',A,'  m'/ &
+            '       Humidity:    ',A,'  kg/kg'/ &
+            '       Gradient:    ',A,'  (kg/kg)/100m'/ &
+            '       Gridpoint:   ',A)
+422 FORMAT (/'    Characteristic levels of the initial scalar profile:'// &
+            '       Height:                  ',A,'  m'/ &
+            '       Scalar concentration:    ',A,'  kg/m**3'/ &
+            '       Gradient:                ',A,'  (kg/m**3)/100m'/ &
+            '       Gridpoint:               ',A)
+423 FORMAT (/'    Characteristic levels of the geo. wind component ug:'// &
+            '       Height:      ',A,'  m'/ &
+            '       ug:          ',A,'  m/s'/ &
+            '       Gradient:    ',A,'  1/100s'/ &
+            '       Gridpoint:   ',A)
+424 FORMAT (/'    Characteristic levels of the geo. wind component vg:'// &
+            '       Height:      ',A,'  m'/ &
+            '       vg:          ',A,'  m/s'/ &
+            '       Gradient:    ',A,'  1/100s'/ &
+            '       Gridpoint:   ',A)
+425 FORMAT (/'    Characteristic levels of the initial salinity profile:'// &
+            '       Height:     ',A,'  m'/ &
+            '       Salinity:   ',A,'  psu'/ &
+            '       Gradient:   ',A,'  psu/100m'/ &
+            '       Gridpoint:  ',A)
+426 FORMAT (/'    Characteristic levels of the subsidence/ascent profile:'// &
+            '       Height:      ',A,'  m'/ &
+            '       w_subs:      ',A,'  m/s'/ &
+            '       Gradient:    ',A,'  (m/s)/100m'/ &
+            '       Gridpoint:   ',A)
+427 FORMAT (/'    Initial wind profiles (u,v) are interpolated from given'// &
+                  ' profiles')
+428 FORMAT (/'    Initial profiles (u, v, pt, q) are taken from file '/ &
+             '    NUDGING_DATA')
+430 FORMAT (//' Cloud physics quantities / methods:'/ &
+              ' ----------------------------------'/)
+431 FORMAT ('    Humidity is considered, bu no condensation')
+433 FORMAT ('    Cloud droplets treated explicitly using the Lagrangian part', &
+                 'icle model')
+434 FORMAT ('    Curvature and solution effecs are considered for growth of', &
+                 ' droplets < 1.0E-6 m')
+435 FORMAT ('    Droplet collision is handled by ',A,'-kernel')
+436 FORMAT ('       Fast kernel with fixed radius- and dissipation classes ', &
+                    'are used'/ &
+            '          number of radius classes:       ',I3,'    interval ', &
+                       '[1.0E-6,2.0E-4] m'/ &
+            '          number of dissipation classes:   ',I2,'    interval ', &
+                       '[0,1000] cm**2/s**3')
+437 FORMAT ('    Droplet collision is switched off')
+450 FORMAT (//' LES / Turbulence quantities:'/ &
+              ' ---------------------------'/)
+451 FORMAT ('    Diffusion coefficients are constant:'/ &
+            '    Km = ',F6.2,' m**2/s   Kh = ',F6.2,' m**2/s   Pr = ',F5.2)
+453 FORMAT ('    Mixing length is limited to',F5.2,' * z')
+454 FORMAT ('    TKE is not allowed to fall below ',E9.2,' (m/s)**2')
+455 FORMAT ('    initial TKE is prescribed as ',E9.2,' (m/s)**2')
+456 FORMAT (/'    Day of the year at model start :   day_init      =     ',I3 &
+            /'    UTC time at model start        :   time_utc_init = ',F7.1,' s')
+457 FORMAT ('    RANS-mode constants: c_0 = ',F9.5/         &
+            '                         c_1 = ',F9.5/         &
+            '                         c_2 = ',F9.5/         &
+            '                         c_3 = ',F9.5/         &
+            '                         c_4 = ',F9.5/         &
+            '                         sigma_e    = ',F9.5/  &
+            '                         sigma_diss = ',F9.5)
+470 FORMAT (//' Actions during the simulation:'/ &
+              ' -----------------------------'/)
+471 FORMAT ('    Disturbance impulse (u,v) every :   ',F6.2,' s'/            &
+            '    Disturbance amplitude           :    ',F5.2, ' m/s'/       &
+            '    Lower disturbance level         : ',F8.2,' m (GP ',I4,')'/  &
+            '    Upper disturbance level         : ',F8.2,' m (GP ',I4,')')
+472 FORMAT ('    Disturbances continued during the run from i/j =',I4, &
+                 ' to i/j =',I4)
+473 FORMAT ('    Disturbances cease as soon as the disturbance energy exceeds',&
+                 F6.3, ' m**2/s**2')
+474 FORMAT ('    Random number generator used    : ',A/)
+475 FORMAT ('    The surface temperature is increased (or decreased, ', &
+                 'respectively, if'/ &
+            '    the value is negative) by ',F5.2,' K at the beginning of the',&
+                 ' 3D-simulation'/)
+476 FORMAT ('    The surface humidity is increased (or decreased, ',&
+                 'respectively, if the'/ &
+            '    value is negative) by ',E8.1,' kg/kg at the beginning of', &
+                 ' the 3D-simulation'/)
+477 FORMAT ('    The scalar value is increased at the surface (or decreased, ',&
+                 'respectively, if the'/ &
+            '    value is negative) by ',E8.1,' kg/m**3 at the beginning of', &
+                 ' the 3D-simulation'/)
+480 FORMAT ('    Particles:'/ &
+            '    ---------'// &
+            '       Particle advection is active (switched on at t = ', F7.1, &
+                    ' s)'/ &
+            '       Start of new particle generations every  ',F6.1,' s'/ &
+            '       Boundary conditions: left/right: ', A, ' north/south: ', A/&
+            '                            bottom:     ', A, ' top:         ', A/&
+            '       Maximum particle age:                 ',F9.1,' s'/ &
+            '       Advection stopped at t = ',F9.1,' s'/)
+481 FORMAT ('       Particles have random start positions'/)
+482 FORMAT ('          Particles are advected only horizontally'/)
+485 FORMAT ('       Particle data are written on file every ', F9.1, ' s')
+486 FORMAT ('       Particle statistics are written on file'/)
+487 FORMAT ('       Number of particle groups: ',I2/)
+488 FORMAT ('       SGS velocity components are used for particle advection'/ &
+            '          minimum timestep for advection:', F8.5/)
+489 FORMAT ('       Number of particles simultaneously released at each ', &
+                    'point: ', I5/)
+490 FORMAT ('       Particle group ',I2,':'/ &
+            '          Particle radius: ',E10.3, 'm')
+491 FORMAT ('          Particle inertia is activated'/ &
+            '             density_ratio (rho_fluid/rho_particle) =',F6.3/)
+492 FORMAT ('          Particles are advected only passively (no inertia)'/)
+493 FORMAT ('          Boundaries of particle source: x:',F8.1,' - ',F8.1,' m'/&
+            '                                         y:',F8.1,' - ',F8.1,' m'/&
+            '                                         z:',F8.1,' - ',F8.1,' m'/&
+            '          Particle distances:  dx = ',F8.1,' m  dy = ',F8.1, &
+                       ' m  dz = ',F8.1,' m'/)
+494 FORMAT ('       Output of particle time series in NetCDF format every ', &
+                    F8.2,' s'/)
+495 FORMAT ('       Number of particles in total domain: ',I10/)
+496 FORMAT ('       Initial vertical particle positions are interpreted ', &
+                    'as relative to the given topography')
+500 FORMAT (//' 1D-Model parameters:'/                           &
+              ' -------------------'//                           &
+            '    Simulation time:                   ',F8.1,' s'/ &
+            '    Run-controll output every:         ',F8.1,' s'/ &
+            '    Vertical profile output every:     ',F8.1,' s'/ &
+            '    Mixing length calculation:         ',A/         &
+            '    Dissipation calculation:           ',A/)
+502 FORMAT ('    Damping layer starts from ',F7.1,' m (GP ',I4,')'/)
+503 FORMAT (' --> Momentum advection via Wicker-Skamarock-Scheme 5th order')
+504 FORMAT (' --> Scalar advection via Wicker-Skamarock-Scheme 5th order')
+512 FORMAT (/' Date:                 ',A8,6X,'Run:       ',A34/      &
+            ' Time:                 ',A8,6X,'Run-No.:   ',I2.2/     &
+            ' Run on host:        ',A10,6X,'En-No.:    ',I2.2)
+600 FORMAT (/' Nesting informations:'/ &
+            ' --------------------'/ &
+            ' Nesting mode:                     ',A/ &
+            ' Nesting-datatransfer mode:        ',A// &
+            ' Nest id  parent  number   lower left coordinates   name'/ &
+            ' (*=me)     id    of PEs      x (m)     y (m)' )
+601 FORMAT (2X,A1,1X,I2.2,6X,I2.2,5X,I5,5X,F8.2,2X,F8.2,5X,A)
+
+ END SUBROUTINE header
Index: /palm/tags/release-6.0/SOURCE/indoor_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/indoor_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/indoor_model_mod.f90	(revision 3477)
@@ -0,0 +1,1424 @@
+!> @file indoor_model_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2018-2018 Leibniz Universitaet Hannover
+! Copyright 2018-2018 Hochschule Offenburg
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision (tlang, suehring, kanani, srissman)
+! 
+! 
+!
+! Authors:
+! --------
+! @author Tobias Lang
+! @author Jens Pfafferott
+! @author Farah Kanani-Suehring
+! @author Matthias Suehring
+! @author Sascha RiÃmann
+!
+!
+! Description:
+! ------------
+!> <Description of the new module>
+!> Module for Indoor Climate Model (ICM)
+!> The module is based on the DIN EN ISO 13790 with simplified hour-based procedure.
+!> This model is a equivalent circuit diagram of a three-point RC-model (5R1C).
+!> This module differ between indoor-air temperature an average temperature of indoor surfaces which make it prossible to determine thermal comfort
+!> the heat transfer between indoor and outdoor is simplified 
+
+!> @todo Replace window_area_per_facade by %frac(1,m) for window
+!> @todo emissivity change for window blinds if solar_protection_on=1 
+!> @todo write datas in netcdf file as output data
+!> @todo reduce the building volume with netto ground surface to take respect costruction areas like walls and ceilings. Have effect on factor_a, factor_c, airchange and lambda_at
+!>
+!> @note Do we allow use of integer flags, or only logical flags? (concerns e.g. cooling_on, heating_on)
+!> @note How to write indoor temperature output to pt array?
+!>
+!> @bug  <Enter known bugs here>
+!------------------------------------------------------------------------------!
+ MODULE indoor_model_mod 
+
+    USE control_parameters,                                                    &
+        ONLY:  initializing_actions
+
+    USE kinds
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_usm_h, surf_usm_v
+
+
+    IMPLICIT NONE
+
+!
+!-- Define data structure for buidlings.
+    TYPE build
+
+       INTEGER(iwp) ::  id                             !< building ID
+       INTEGER(iwp) ::  kb_min                         !< lowest vertical index of a building
+       INTEGER(iwp) ::  kb_max                         !< highest vertical index of a building
+       INTEGER(iwp) ::  num_facades_per_building_h     !< total number of horizontal facades elements
+       INTEGER(iwp) ::  num_facades_per_building_h_l   !< number of horizontal facade elements on local subdomain
+       INTEGER(iwp) ::  num_facades_per_building_v     !< total number of vertical facades elements
+       INTEGER(iwp) ::  num_facades_per_building_v_l   !< number of vertical facade elements on local subdomain
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  l_v            !< index array linking surface-element orientation index
+                                                                  !< for vertical surfaces with building 
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  m_h            !< index array linking surface-element index for
+                                                                  !< horizontal surfaces with building
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  m_v            !< index array linking surface-element index for 
+                                                                  !< vertical surfaces with building
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  num_facade_h   !< number of horizontal facade elements per buidling 
+                                                                  !< and height level
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  num_facade_v   !< number of vertical facades elements per buidling
+                                                                  !< and height level
+
+       LOGICAL ::  on_pe = .FALSE.   !< flag indicating whether a building with certain ID is on local subdomain
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_in       !< mean building indoor temperature, height dependent
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_in_l     !< mean building indoor temperature on local subdomain, height dependent
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  volume     !< total building volume, height dependent
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  vol_frac   !< fraction of local on total building volume, height dependent
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  vpf        !< building volume volume per facade element, height dependent
+
+    END TYPE build
+
+    TYPE(build), DIMENSION(:), ALLOCATABLE ::  buildings   !< building array
+
+    INTEGER(iwp) ::  num_build   !< total number of buildings in domain
+
+    REAL(wp) ::  volume_fraction
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_in     !< dummy array for indoor temperature for the 
+                                                     !< total building volume at each discrete height level
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_in_l   !< dummy array for indoor temperature for the 
+                                                     !< local building volume fraction at each discrete height level
+
+!
+!-- Declare all global variables within the module
+
+    INTEGER(iwp) ::  building_type = 1       !< namelist parameter with 
+                                             !< X1=construction year (cy) 1950, X2=cy 2000, X3=cy 2050
+                                             !< R=Residental building, O=Office, RW=Enlarged Windows, P=Panel type (Plattenbau) WBS 70, H=Hospital (in progress), I=Industrial halls (in progress), S=Special Building (in progress)
+                                             !< (0=R1, 1=R2, 2=R3, 3=O1, 4=O2, 5=O3,...)
+    INTEGER(iwp) ::  cooling_on              !< Indoor cooling flag (0=off, 1=on)
+    INTEGER(iwp) ::  heating_on              !< Indoor heating flag (0=off, 1=on)
+    INTEGER(iwp) ::  solar_protection_off    !< Solar protection off
+    INTEGER(iwp) ::  solar_protection_on     !< Solar protection on
+
+    REAL(wp) ::  air_change_high             !< [1/h] air changes per time_utc_hour
+    REAL(wp) ::  air_change_low              !< [1/h] air changes per time_utc_hour
+    REAL(wp) ::  eff_mass_area               !< [mÂ²] the effective mass-related area
+    REAL(wp) ::  floor_area_per_facade       !< [mÂ²] net floor area (Sum of all floors)
+    REAL(wp) ::  total_area                  !<! [mÂ²] area of all surfaces pointing to zone
+    REAL(wp) ::  window_area_per_facade      !< [m2] window area per facade element
+    REAL(wp) ::  air_change                  !< [1/h] Airflow
+    REAL(wp) ::  bldg_part_surf_i    = 4     !< [mÂ²_surf,i] part building surface, from Palm, das mÃŒsste mittlerweile "facade_element_area" sein!
+    REAL(wp) ::  facade_element_area         !< [mÂ²_facade] building surface facade
+    REAL(wp) ::  indoor_volume_per_facade    !< [mÂ³] indoor air volume per facade element
+    REAL(wp) ::  c_m                         !< [J/K] internal heat storage capacity
+    REAL(wp) ::  dt_indoor = 3600.0_wp       !< [s] namelist parameter: time interval for indoor-model application
+    REAL(wp) ::  eta_ve                      !< [-] heat recovery efficiency
+    REAL(wp) ::  f_c_win                     !< [-] shading factor
+    REAL(wp) ::  factor_a                    !< [-] Dynamic parameters specific effective surface according to Table 12; 2.5 (very light, light and medium), 3.0 (heavy), 3.5 (very heavy)
+    REAL(wp) ::  factor_c                    !< [J/(m2 K)] Dynamic parameters inner heatstorage according to Table 12; 80000 (very light), 110000 (light), 165000 (medium), 260000 (heavy), 370000 (very heavy)
+    REAL(wp) ::  g_value_win                 !< [-] SHGC factor
+    REAL(wp) ::  h_tr_1                      !<! [W/K] Heat transfer coefficient auxiliary variable 1
+    REAL(wp) ::  h_tr_2                      !<! [W/K] Heat transfer coefficient auxiliary variable 2
+    REAL(wp) ::  h_tr_3                      !<! [W/K] Heat transfer coefficient auxiliary variable 3 
+    REAL(wp) ::  h_tr_em                     !<! [W/K] Heat transfer coefficient of the emmision (got with h_tr_ms the thermal mass)
+    REAL(wp) ::  h_tr_is                     !<! [W/K] thermal coupling conductance (Thermischer Kopplungsleitwert)
+    REAL(wp) ::  h_tr_ms                     !<! [W/K] Heat transfer conductance term (got with h_tr_em the thermal mass)
+    REAL(wp) ::  h_tr_op                     !<! [W/K] heat transfer coefficient of opaque components (assumption: got all thermal mass) contains of h_tr_em and h_tr_ms
+    REAL(wp) ::  h_tr_w                      !<! [W/K] heat transfer coefficient of doors, windows, curtain walls and glazed walls (assumption: thermal mass=0)
+    REAL(wp) ::  h_ve                        !<! [W/K] heat transfer of ventilation
+    REAL(wp) ::  height_storey               !< [m] storey heigth
+    REAL(wp) ::  height_cei_con              !< [m] ceiling construction heigth    
+    REAL(wp) ::  initial_indoor_temperature  !< namelist parameter
+    REAL(wp) ::  lambda_at                   !< [-] ratio internal surface/floor area chap. 7.2.2.2.
+    REAL(wp) ::  lambda_layer3               !< [W/(m*K)] Thermal conductivity of the inner layer  
+    REAL(wp) ::  net_sw_in                   !< net short-wave radiation (in - out; was i_global --> CORRECT?)
+    REAL(wp) ::  qint_high                   !< [W/m2] internal heat gains, option Database qint_0-23
+    REAL(wp) ::  qint_low                    !< [W/m2] internal heat gains, option Database qint_0-23
+    REAL(wp) ::  phi_c_max                   !< [W] Max. Cooling capacity (negative)
+    REAL(wp) ::  phi_h_max                   !< [W] Max. Heating capacity (negative)
+    REAL(wp) ::  phi_hc_nd                   !<! [W] heating demand and/or cooling demand
+    REAL(wp) ::  phi_hc_nd_10                !<! [W] heating demand and/or cooling demand for heating or cooling 
+    REAL(wp) ::  phi_hc_nd_ac                !<! [W] actual heating demand and/or cooling demand
+    REAL(wp) ::  phi_hc_nd_un                !<! [W] unlimited heating demand and/or cooling demand which is necessary to reach the demanded required temperature (heating is positive, cooling is negative) 
+    REAL(wp) ::  phi_ia                      !< [W] internal air load = internal loads * 0.5, Eq. (C.1)
+    REAL(wp) ::  phi_m                       !<! [W] mass specific thermal load (internal and external)
+    REAL(wp) ::  phi_mtot                    !<! [W] total mass specific thermal load (internal and external)
+    REAL(wp) ::  phi_sol                     !< [W] solar loads
+    REAL(wp) ::  phi_st                      !<! [W] mass specific thermal load implied non thermal mass 
+    REAL(wp) ::  q_emission                  !< emissions, in first version = 0, option for second part of the project
+    REAL(wp) ::  q_wall_win               !< heat flux from indoor into wall/window
+    REAL(wp) ::  q_waste_heat                !< waste heat, sum of waste heat over the roof to Palm
+    REAL(wp) ::  q_waste_heat_bldg           !< [W/building] waste heat of the complete building, in Palm sum of all indoor_model-calculations
+    REAL(wp) ::  s_layer3                    !< [m] half thickness of the inner layer (layer_3)
+    REAL(wp) ::  schedule_d                  !< activation for internal loads (low or high + low)
+    REAL(wp) ::  skip_time_do_indoor = 0.0_wp  !< [s] Indoor model is not called before this time
+    REAL(wp) ::  theta_air                   !<! [Â°C] air temperature of the RC-node
+    REAL(wp) ::  theta_air_0                 !<! [oC] air temperature of the RC-node in equilibrium
+    REAL(wp) ::  theta_air_10                !<! [oC] air temperature of the RC-node from a heating capacity of 10 W/mÂ²
+    REAL(wp) ::  theta_air_ac                !< [oC] actual room temperature after heating/cooling
+    REAL(wp) ::  theta_air_set               !< [oC] Setpoint_temperature for the room
+    REAL(wp) ::  theta_int_c_set             !< [oC] Max. Setpoint temperature (summer)
+    REAL(wp) ::  theta_int_h_set             !< [oC] Max. Setpoint temperature (winter)
+    REAL(wp) ::  theta_m                     !<! [oC} inner temperature of the RC-node
+    REAL(wp) ::  theta_m_t                   !<! [oC] (Fictive) component temperature timestep
+    REAL(wp) ::  theta_m_t_prev              !< [oC] (Fictive) component temperature previous timestep (do not change)
+    REAL(wp) ::  theta_op                    !< [oC] operative temperature
+    REAL(wp) ::  theta_s                     !<! [oC] surface temperature of the RC-node
+    REAL(wp) ::  time_indoor = 0.0_wp        !< [s] time since last call of indoor model
+    REAL(wp) ::  time_utc_hour               !< Time in hours per day (UTC)
+    REAL(wp) ::  u_value_win                 !< [W/(m2*K)] transmittance
+    REAL(wp) ::  ventilation_int_loads       !< Zuteilung der GebÃ€ude fÃŒr Verlauf/AktivitÃ€t der LÃŒftung und internen Lasten
+
+!
+!-- Declare all global parameters within the module    
+    REAL(wp), PARAMETER ::  params_f_f               = 0.3_wp      !< [-] frame ratio chap. 8.3.2.1.1 for buildings with mostly cooling 2.0_wp
+    REAL(wp), PARAMETER ::  params_f_w               = 0.9_wp      !< [-] correction factor (fuer nicht senkrechten Stahlungseinfall DIN 4108-2 chap.8, (hier konstant, keine WinkelabhÃ€ngigkeit) 
+    REAL(wp), PARAMETER ::  params_f_win             = 0.5_wp      !< [-] proportion of window area, Database A_win aus Datenbank 27 window_area_per_facade_percent
+    REAL(wp), PARAMETER ::  params_solar_protection  = 300.0_wp    !< [W/m2] chap. G.5.3.1 sun protection closed, if the radiation on facade exceeds this value
+    REAL(wp), PARAMETER ::  params_waste_heat_c      = 4.0_wp      !< [-] anthropogenic heat outputs for cooling e.g. 4 for KKM with COP = 3
+    REAL(wp), PARAMETER ::  params_waste_heat_h      = 1.111_wp    !< [-] anthropogenic heat outputs for heating e.g. 1 / 0.9 = 1.111111 for combustion with eta = 0.9 or -3 for WP with COP = 4
+    REAL(wp), PARAMETER ::  h_is                     = 3.45_wp     !< [W/(m^2 K)]  h_is = 3.45 between surface and air (chap. 7.2.2.2)
+    REAL(wp), PARAMETER ::  h_ms                     = 9.1_wp      !< [W/K] h_ms = 9.10 W / (m2 K) between component and surface (chap. 12.2.2)
+  
+    SAVE
+
+
+    PRIVATE
+    
+!
+!-- Add INTERFACES that must be available to other modules
+    PUBLIC im_init, im_main_heatcool, im_parin 
+
+!
+!-- Add VARIABLES that must be available to other modules
+    PUBLIC dt_indoor, skip_time_do_indoor, time_indoor
+
+!
+!-- Calculations for indoor temperatures  
+    INTERFACE im_calc_temperatures
+       MODULE PROCEDURE im_calc_temperatures
+    END INTERFACE im_calc_temperatures
+!
+!-- Initialization actions  
+    INTERFACE im_init
+       MODULE PROCEDURE im_init
+    END INTERFACE im_init
+ 
+!
+!-- Main part of indoor model  
+    INTERFACE im_main_heatcool
+       MODULE PROCEDURE im_main_heatcool
+    END INTERFACE im_main_heatcool
+!
+!-- Reading of NAMELIST parameters
+    INTERFACE im_parin
+       MODULE PROCEDURE im_parin
+    END INTERFACE im_parin
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!< Calculation of the air temperatures and mean radiation temperature
+!< This is basis for the operative temperature
+!< Based on a Crank-Nicholson scheme with a timestep of a hour
+!------------------------------------------------------------------------------!
+ SUBROUTINE im_calc_temperatures ( i, j, k, indoor_wall_window_temperature,    &
+                                   near_facade_temperature, phi_hc_nd_dummy )
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  pt
+
+
+    IMPLICIT NONE
+    
+    
+    INTEGER(iwp) ::  i
+    INTEGER(iwp) ::  j
+    INTEGER(iwp) ::  k
+    
+    REAL(wp) ::  indoor_wall_window_temperature  !< weighted temperature of innermost wall/window layer
+    REAL(wp) ::  near_facade_temperature
+    REAL(wp) ::  phi_hc_nd_dummy
+
+    !< Calculation of total mass specific thermal load (internal and external)
+    phi_mtot = ( phi_m + h_tr_em * indoor_wall_window_temperature              &
+                       + h_tr_3  * ( phi_st + h_tr_w * pt(k,j,i)               &
+                                            + h_tr_1 *                         &
+                                               ( ( ( phi_ia + phi_hc_nd_dummy ) / h_ve )  &
+                                                 + near_facade_temperature )   &
+                                   ) / h_tr_2                                  &
+               )                                                                !< [oC] Eq. (C.5)
+    
+    !< Calculation of component temperature at factual timestep
+    theta_m_t = ( ( theta_m_t_prev                                               &
+                    * ( ( c_m / 3600 ) - 0.5 * ( h_tr_3 + h_tr_em ) ) + phi_mtot &
+                  )                                                              &
+                  /   ( ( c_m / 3600 ) + 0.5 * ( h_tr_3 + h_tr_em ) )            &
+                )                                                               !< [oC] Eq. (C.4)
+
+    !< Calculation of mean inner temperature for the RC-node in actual timestep
+    theta_m = ( theta_m_t + theta_m_t_prev ) * 0.5                              !< [oC] Eq. (C.9)
+    
+    !< Calculation of mean surface temperature of the RC-node in actual timestep
+    theta_s = ( (   h_tr_ms * theta_m + phi_st + h_tr_w * pt(k,j,i)                         &
+                  + h_tr_1  * ( near_facade_temperature + ( phi_ia + phi_hc_nd_dummy ) / h_ve ) &
+                )                                                                           &
+                / ( h_tr_ms + h_tr_w + h_tr_1 )                                             &
+              )                                                                 !< [oC] Eq. (C.10)
+    
+    !< Calculation of the air temperature of the RC-node
+    theta_air = ( h_tr_is * theta_s + h_ve * near_facade_temperature         &
+                                    + phi_ia + phi_hc_nd_dummy ) / ( h_tr_is + h_ve ) !< [oC] Eq. (C.11)
+
+ END SUBROUTINE im_calc_temperatures
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the indoor model.
+!> Static information are calculated here, e.g. building parameters and
+!> geometrical information, everything that doesn't change in time.
+!
+!-- Input values
+!-- Input datas from Palm, M4
+!     i_global             -->  net_sw_in                         !global radiation [W/m2]
+!     theta_e              -->  pt(k,j,i)                         !undisturbed outside temperature, 1. PALM volume, for windows
+!     theta_sup = theta_f  -->  surf_usm_h%t_surf_10cm(m)
+!                               surf_usm_v(l)%t_surf_10cm(m)   !Air temperature, facade near (10cm) air temperature from 1. Palm volume
+!     theta_node           -->  t_wall_h(nzt_wall,m)
+!                               t_wall_v(l)%t(nzt_wall,m)         !Temperature of innermost wall layer, for opaque wall
+!------------------------------------------------------------------------------!
+ SUBROUTINE im_init
+  
+    USE arrays_3d,                                                             &
+        ONLY:  dzw
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  building_id_f
+
+    USE pegrid
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_usm_h, surf_usm_v
+        
+    USE urban_surface_mod,                                                     &
+        ONLY:  building_pars, building_type
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  fa   !< running index for facade elements of each building
+    INTEGER(iwp) ::  i    !< running index along x-direction
+    INTEGER(iwp) ::  j    !< running index along y-direction
+    INTEGER(iwp) ::  k    !< running index along z-direction
+    INTEGER(iwp) ::  l    !< running index for surface-element orientation
+    INTEGER(iwp) ::  m    !< running index surface elements
+    INTEGER(iwp) ::  n    !< building index
+    INTEGER(iwp) ::  nb   !< building index
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids           !< building IDs on entire model domain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_final     !< building IDs on entire model domain, 
+                                                                    !< multiple occurences are sorted out 
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_final_tmp !< temporary array used for resizing
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_l         !< building IDs on local subdomain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_l_tmp     !< temporary array used to resize array of building IDs
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  displace_dum        !< displacements of start addresses, used for MPI_ALLGATHERV
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k_max_l             !< highest vertical index of a building on subdomain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k_min_l             !< lowest vertical index of a building on subdomain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  n_fa                !< counting array
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  num_facades_h       !< dummy array used for summing-up total number of 
+                                                                    !< horizontal facade elements
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  num_facades_v       !< dummy array used for summing-up total number of 
+                                                                    !< vertical facade elements
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  receive_dum_h       !< dummy array used for MPI_ALLREDUCE  
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  receive_dum_v       !< dummy array used for MPI_ALLREDUCE  
+
+    INTEGER(iwp), DIMENSION(0:numprocs-1) ::  num_buildings         !< number of buildings with different ID on entire model domain
+    INTEGER(iwp), DIMENSION(0:numprocs-1) ::  num_buildings_l       !< number of buildings with different ID on local subdomain
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  local_weight   !< dummy representing fraction of local on total building volume, 
+                                                           !< height dependent
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  volume         !< total building volume at each discrete height level
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  volume_l       !< total building volume at each discrete height level,
+                                                           !< on local subdomain
+
+!
+!-- Initializing of indoor model is only possible if buildings can be 
+!-- distinguished by their IDs.
+    IF ( .NOT. building_id_f%from_file )  THEN
+       message_string = 'Indoor model requires information about building_id'
+       CALL message( 'im_init', 'PA0999', 1, 2, 0, 6, 0  )
+    ENDIF
+!
+!-- Determine number of different building IDs on local subdomain.
+    num_buildings_l = 0
+    num_buildings   = 0
+    ALLOCATE( build_ids_l(1) )
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          IF ( building_id_f%var(j,i) /= building_id_f%fill )  THEN
+             IF ( num_buildings_l(myid) > 0 )  THEN
+                IF ( ANY( building_id_f%var(j,i) .EQ.  build_ids_l ) )  THEN 
+                   CYCLE
+                ELSE
+                   num_buildings_l(myid) = num_buildings_l(myid) + 1
+!
+!--                Resize array with different local building ids
+                   ALLOCATE( build_ids_l_tmp(1:SIZE(build_ids_l)) )
+                   build_ids_l_tmp = build_ids_l
+                   DEALLOCATE( build_ids_l )
+                   ALLOCATE( build_ids_l(1:num_buildings_l(myid)) )
+                   build_ids_l(1:num_buildings_l(myid)-1) =                 &
+                               build_ids_l_tmp(1:num_buildings_l(myid)-1)
+                   build_ids_l(num_buildings_l(myid)) = building_id_f%var(j,i)
+                   DEALLOCATE( build_ids_l_tmp )
+                ENDIF
+!
+!--          First occuring building id on PE 
+             ELSE 
+                num_buildings_l(myid) = num_buildings_l(myid) + 1
+                build_ids_l(1) = building_id_f%var(j,i)
+             ENDIF
+          ENDIF
+       ENDDO
+    ENDDO
+!
+!-- Determine number of building IDs for the entire domain. (Note, building IDs
+!-- can appear multiple times as buildings might be distributed over several
+!-- PEs.) 
+#if defined( __parallel ) 
+    CALL MPI_ALLREDUCE( num_buildings_l, num_buildings, numprocs,              &
+                        MPI_INTEGER, MPI_SUM, comm2d, ierr ) 
+#else
+    num_buildings = num_buildings_l
+#endif
+    ALLOCATE( build_ids(1:SUM(num_buildings)) )
+!
+!-- Gather building IDs. Therefore, first, determine displacements used 
+!-- required for MPI_GATHERV call.
+    ALLOCATE( displace_dum(0:numprocs-1) )
+    displace_dum(0) = 0
+    DO i = 1, numprocs-1
+       displace_dum(i) = displace_dum(i-1) + num_buildings(i-1)
+    ENDDO
+
+#if defined( __parallel ) 
+    CALL MPI_ALLGATHERV( build_ids_l(1:num_buildings_l(myid)),                 &
+                         num_buildings(myid),                                  &
+                         MPI_INTEGER,                                          &
+                         build_ids,                                            &
+                         num_buildings,                                        &
+                         displace_dum,                                         & 
+                         MPI_INTEGER,                                          &
+                         comm2d, ierr )   
+
+    DEALLOCATE( displace_dum )
+
+#else
+    build_ids = build_ids_l
+#endif
+!
+!-- Note: in parallel mode, building IDs can occur mutliple times, as 
+!-- each PE has send its own ids. Therefore, sort out building IDs which 
+!-- appear multiple times. 
+    num_build = 0
+    DO  n = 1, SIZE(build_ids)
+
+       IF ( ALLOCATED(build_ids_final) )  THEN
+          IF ( ANY( build_ids(n) .EQ. build_ids_final ) )  THEN    !FK: Warum ANY?, Warum .EQ.? --> s.o
+             CYCLE
+          ELSE
+             num_build = num_build + 1
+!
+!--          Resize
+             ALLOCATE( build_ids_final_tmp(1:num_build) )
+             build_ids_final_tmp(1:num_build-1) = build_ids_final(1:num_build-1)
+             DEALLOCATE( build_ids_final )
+             ALLOCATE( build_ids_final(1:num_build) )
+             build_ids_final(1:num_build-1) = build_ids_final_tmp(1:num_build-1)
+             build_ids_final(num_build) = build_ids(n)
+             DEALLOCATE( build_ids_final_tmp )
+          ENDIF             
+       ELSE
+          num_build = num_build + 1
+          ALLOCATE( build_ids_final(1:num_build) )
+          build_ids_final(num_build) = build_ids(n)
+       ENDIF
+    ENDDO
+
+!
+!-- Allocate building-data structure array. Note, this is a global array
+!-- and all building IDs on domain are known by each PE. Further attributes, 
+!-- e.g. height-dependent arrays, however, are only allocated on PEs where 
+!-- the respective building is present (in order to reduce memory demands).
+    ALLOCATE( buildings(1:num_build) )
+!
+!-- Store building IDs and check if building with certain ID is present on
+!-- subdomain. 
+    DO  nb = 1, num_build
+       buildings(nb)%id = build_ids_final(nb)
+
+       IF ( ANY( building_id_f%var == buildings(nb)%id ) )                      &
+          buildings(nb)%on_pe = .TRUE.
+    ENDDO 
+!
+!-- Determine the maximum vertical dimension occupied by each building. 
+    ALLOCATE( k_min_l(1:num_build) )
+    ALLOCATE( k_max_l(1:num_build) )
+    k_min_l = nzt + 1
+    k_max_l = 0    
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          IF ( building_id_f%var(j,i) /= building_id_f%fill )  THEN
+             nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ),   &
+                         DIM = 1 )
+             DO  k = nzb+1, nzt+1
+!
+!--             Check if grid point belongs to a building. 
+                IF ( BTEST( wall_flags_0(k,j,i), 6 ) )  THEN
+                   k_min_l(nb) = MIN( k_min_l(nb), k )
+                   k_max_l(nb) = MAX( k_max_l(nb), k )
+                ENDIF
+
+             ENDDO
+          ENDIF
+       ENDDO
+    ENDDO
+
+    DO nb = 1, num_build
+#if defined( __parallel ) 
+       CALL MPI_ALLREDUCE( k_min_l(nb), buildings(nb)%kb_min, 1, MPI_INTEGER,  &
+                           MPI_MIN, comm2d, ierr )
+       CALL MPI_ALLREDUCE( k_max_l(nb), buildings(nb)%kb_max, 1, MPI_INTEGER,  &
+                           MPI_MAX, comm2d, ierr )
+#else
+       buildings(nb)%kb_min = k_min_l(nb)
+       buildings(nb)%kb_max = k_max_l(nb)
+#endif
+
+    ENDDO 
+
+    DEALLOCATE( k_min_l )
+    DEALLOCATE( k_max_l )
+!
+!-- Calculate building volume
+    DO  nb = 1, num_build
+!
+!--    Allocate temporary array for summing-up building volume
+       ALLOCATE( volume(buildings(nb)%kb_min:buildings(nb)%kb_max)   )
+       ALLOCATE( volume_l(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       volume   = 0.0_wp
+       volume_l = 0.0_wp
+!
+!--    Calculate building volume per height level on each PE where 
+!--    these building is present. 
+       IF ( buildings(nb)%on_pe )  THEN
+          ALLOCATE( buildings(nb)%volume(buildings(nb)%kb_min:buildings(nb)%kb_max)   )
+          ALLOCATE( buildings(nb)%vol_frac(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+          buildings(nb)%volume   = 0.0_wp
+          buildings(nb)%vol_frac = 0.0_wp
+          
+          IF ( ANY( building_id_f%var == buildings(nb)%id ) )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = buildings(nb)%kb_min, buildings(nb)%kb_max
+                      IF ( building_id_f%var(j,i) /= building_id_f%fill )      &
+                         volume_l(k) = dx * dy * dzw(k)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+!
+!--    Sum-up building volume from all subdomains
+#if defined( __parallel ) 
+       CALL MPI_ALLREDUCE( volume_l, volume, SIZE(volume), MPI_REAL, MPI_SUM,  &
+                           comm2d, ierr )
+#else
+       volume = volume_l
+#endif
+!
+!--    Save total building volume as well as local fraction on volume on 
+!--    building data structure.
+       IF ( ALLOCATED( buildings(nb)%volume ) )  buildings(nb)%volume = volume
+!
+!--    Determine fraction of local on total building volume
+       IF ( buildings(nb)%on_pe )  buildings(nb)%vol_frac = volume_l / volume
+
+       DEALLOCATE( volume   )
+       DEALLOCATE( volume_l )
+
+    ENDDO
+
+!
+!-- Allocate arrays for indoor temperature.  
+    DO  nb = 1, num_build
+       IF ( buildings(nb)%on_pe )  THEN
+          ALLOCATE( buildings(nb)%t_in(buildings(nb)%kb_min:buildings(nb)%kb_max)   )
+          ALLOCATE( buildings(nb)%t_in_l(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+          buildings(nb)%t_in   = 0.0_wp
+          buildings(nb)%t_in_l = 0.0_wp
+       ENDIF
+    ENDDO
+!
+!-- Allocate arrays for number of facades per height level. Distinguish between
+!-- horizontal and vertical facades. 
+    DO  nb = 1, num_build
+       IF ( buildings(nb)%on_pe )  THEN
+          ALLOCATE( buildings(nb)%num_facade_h(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+          ALLOCATE( buildings(nb)%num_facade_v(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+
+          buildings(nb)%num_facade_h = 0
+          buildings(nb)%num_facade_v = 0
+       ENDIF
+    ENDDO
+!
+!-- Determine number of facade elements per building on local subdomain.
+!-- Distinguish between horizontal and vertical facade elements.
+!
+!-- Horizontal facades
+    buildings(:)%num_facades_per_building_h_l = 0
+    DO  m = 1, surf_usm_h%ns
+!
+!--    For the current facade element determine corresponding building index.
+!--    First, obtain j,j,k indices of the building. Please note the
+!--    offset between facade/surface element and building location (for 
+!--    horizontal surface elements the horizontal offsets are zero).
+       i = surf_usm_h%i(m) + surf_usm_h%ioff
+       j = surf_usm_h%j(m) + surf_usm_h%joff
+       k = surf_usm_h%k(m) + surf_usm_h%koff
+!
+!--    Determine building index and check whether building is on PE
+       nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), DIM = 1 )
+       IF ( buildings(nb)%on_pe )  THEN
+!
+!--       Count number of facade elements at each height level.
+          buildings(nb)%num_facade_h(k) = buildings(nb)%num_facade_h(k) + 1 
+!
+!--       Moreover, sum up number of local facade elements per building.
+          buildings(nb)%num_facades_per_building_h_l =                         &
+                                buildings(nb)%num_facades_per_building_h_l + 1
+       ENDIF
+    ENDDO
+!
+!-- Vertical facades
+    buildings(:)%num_facades_per_building_v_l = 0
+    DO  l = 0, 3
+       DO  m = 1, surf_usm_v(l)%ns
+!
+!--       For the current facade element determine corresponding building index.
+!--       First, obtain j,j,k indices of the building. Please note the
+!--       offset between facade/surface element and building location (for 
+!--       vertical surface elements the vertical offsets are zero).
+          i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff
+          j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff
+          k = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff
+
+          nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ),        &
+                       DIM = 1 )
+          IF ( buildings(nb)%on_pe )  THEN
+             buildings(nb)%num_facade_v(k) = buildings(nb)%num_facade_v(k) + 1 
+             buildings(nb)%num_facades_per_building_v_l =                      &
+                                buildings(nb)%num_facades_per_building_v_l + 1
+          ENDIF
+       ENDDO
+    ENDDO
+
+!
+!-- Determine total number of facade elements per building and assign number to 
+!-- building data type.
+    DO  nb = 1, num_build
+!
+!--    Allocate dummy array used for summing-up facade elements. 
+!--    Please note, dummy arguments are necessary as building-date type
+!--    arrays are not necessarily allocated on all PEs.
+       ALLOCATE( num_facades_h(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       ALLOCATE( num_facades_v(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       ALLOCATE( receive_dum_h(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       ALLOCATE( receive_dum_v(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       num_facades_h = 0
+       num_facades_v = 0
+       receive_dum_h = 0
+       receive_dum_v = 0
+
+       IF ( buildings(nb)%on_pe )  THEN
+          num_facades_h = buildings(nb)%num_facade_h
+          num_facades_v = buildings(nb)%num_facade_v
+       ENDIF
+
+#if defined( __parallel ) 
+       CALL MPI_ALLREDUCE( num_facades_h,                                      &
+                           receive_dum_h,                                      &
+                           buildings(nb)%kb_max - buildings(nb)%kb_min + 1,    &
+                           MPI_INTEGER,                                        &
+                           MPI_SUM,                                            &
+                           comm2d,                                             &
+                           ierr )
+
+       CALL MPI_ALLREDUCE( num_facades_v,                                      &
+                           receive_dum_v,                                      &
+                           buildings(nb)%kb_max - buildings(nb)%kb_min + 1,    &
+                           MPI_INTEGER,                                        &
+                           MPI_SUM,                                            &
+                           comm2d,                                             &
+                           ierr )
+       IF ( ALLOCATED( buildings(nb)%num_facade_h ) )                          &  !FK: Was wenn not allocated? --> s.o.
+           buildings(nb)%num_facade_h = receive_dum_h
+       IF ( ALLOCATED( buildings(nb)%num_facade_v ) )                          &
+           buildings(nb)%num_facade_v = receive_dum_v
+#else
+       buildings(nb)%num_facade_h = num_facades_h
+       buildings(nb)%num_facade_v = num_facades_v
+#endif
+!
+!--    Deallocate dummy arrays
+       DEALLOCATE( num_facades_h )
+       DEALLOCATE( num_facades_v )
+       DEALLOCATE( receive_dum_h )
+       DEALLOCATE( receive_dum_v )
+!
+!--    Allocate index arrays which link facade elements with surface-data type.
+!--    Please note, no height levels are considered here (information is stored
+!--    in surface-data type itself).
+       IF ( buildings(nb)%on_pe )  THEN
+!
+!--       Determine number of facade elements per building.
+          buildings(nb)%num_facades_per_building_h = SUM( buildings(nb)%num_facade_h )
+          buildings(nb)%num_facades_per_building_v = SUM( buildings(nb)%num_facade_v )
+!
+!--       Allocate arrays which link the building with the horizontal and vertical
+!--       urban-type surfaces. Please note, linking arrays are allocated over all
+!--       facade elements, which is required in case a building is located at the
+!--       subdomain boundaries, where the building and the corresponding surface
+!--       elements are located on different subdomains. 
+          ALLOCATE( buildings(nb)%m_h(1:buildings(nb)%num_facades_per_building_h_l) )
+
+          ALLOCATE( buildings(nb)%l_v(1:buildings(nb)%num_facades_per_building_v_l) )
+          ALLOCATE( buildings(nb)%m_v(1:buildings(nb)%num_facades_per_building_v_l) )
+       ENDIF
+!
+!--    Determine volume per facade element (vpf)
+       IF ( buildings(nb)%on_pe )  THEN
+          ALLOCATE( buildings(nb)%vpf(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+          
+          DO  k = buildings(nb)%kb_min, buildings(nb)%kb_max
+             buildings(nb)%vpf(k) = buildings(nb)%volume(k) /                  &
+                                    ( buildings(nb)%num_facade_h(k) +          &
+                                      buildings(nb)%num_facade_v(k) )
+          ENDDO
+       ENDIF
+    ENDDO
+!
+!-- Link facade elements with surface data type. 
+!-- Allocate array for counting.
+    ALLOCATE( n_fa(1:num_build) )
+    n_fa = 1
+
+    DO  m = 1, surf_usm_h%ns
+       i = surf_usm_h%i(m) + surf_usm_h%ioff
+       j = surf_usm_h%j(m) + surf_usm_h%joff
+
+       nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), DIM = 1 )
+
+       buildings(nb)%m_h(n_fa(nb)) = m
+       n_fa(nb) = n_fa(nb) + 1      
+    ENDDO
+
+    n_fa = 1
+    DO  l = 0, 3
+       DO  m = 1, surf_usm_v(l)%ns
+          i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff
+          j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff
+
+          nb = MINLOC( ABS( buildings(:)%id - building_id_f%var(j,i) ), DIM = 1 )
+
+          buildings(nb)%l_v(n_fa(nb)) = l
+          buildings(nb)%m_v(n_fa(nb)) = m
+          n_fa(nb) = n_fa(nb) + 1      
+       ENDDO
+    ENDDO
+    DEALLOCATE( n_fa )
+
+!
+!-- Building parameters by type of building. Assigned in urban_surface_mod.f90
+
+    lambda_layer3            = building_pars(63, building_type)
+    s_layer3                 = building_pars(57, building_type)
+    f_c_win                  = building_pars(119, building_type)
+    g_value_win              = building_pars(120, building_type)    
+    u_value_win              = building_pars(121, building_type)    
+    air_change_low           = building_pars(122, building_type)    
+    air_change_high          = building_pars(123, building_type)    
+    eta_ve                   = building_pars(124, building_type)    
+    factor_a                 = building_pars(125, building_type)    
+    factor_c                 = building_pars(126, building_type)
+    lambda_at                = building_pars(127, building_type)    
+    theta_int_h_set          = building_pars(118, building_type)    
+    theta_int_c_set          = building_pars(117, building_type)
+    phi_h_max                = building_pars(128, building_type)    
+    phi_c_max                = building_pars(129, building_type)          
+    qint_high                = building_pars(130, building_type)
+    qint_low                 = building_pars(131, building_type)
+    height_storey            = building_pars(132, building_type)
+    height_cei_con           = building_pars(133, building_type)
+
+!
+!-- Setting of initial room temperature [K]
+!-- (after first loop, use theta_m_t as theta_m_t_prev)
+    theta_m_t_prev = initial_indoor_temperature
+
+
+ END SUBROUTINE im_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Main part of the indoor model.
+!> Calculation of .... (kanani: Please describe)
+!------------------------------------------------------------------------------!
+ SUBROUTINE im_main_heatcool
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzw, dzw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p
+
+    USE control_parameters,                                                    &
+        ONLY:  rho_surface
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  time_utc
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE pegrid
+    
+    USE surface_mod,                                                           &
+        ONLY:  ind_veg_wall, ind_wat_win, surf_usm_h, surf_usm_v
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  nzt_wall, t_surf_10cm_h, t_surf_10cm_v, t_wall_h, t_wall_v,     &
+               t_window_h, t_window_v, building_type
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i    !< index of facade-adjacent atmosphere grid point in x-direction
+    INTEGER(iwp) ::  j    !< index of facade-adjacent atmosphere grid point in y-direction
+    INTEGER(iwp) ::  k    !< index of facade-adjacent atmosphere grid point in z-direction
+    INTEGER(iwp) ::  kk   !< vertical index of indoor grid point adjacent to facade
+    INTEGER(iwp) ::  l    !< running index for surface-element orientation
+    INTEGER(iwp) ::  m    !< running index surface elements
+    INTEGER(iwp) ::  nb   !< running index for buildings
+    INTEGER(iwp) ::  fa   !< running index for facade elements of each building
+
+    REAL(wp) ::  indoor_wall_window_temperature   !< weighted temperature of innermost wall/window layer
+    REAL(wp) ::  near_facade_temperature          !< outside air temperature 10cm away from facade
+    REAL(wp) ::  time_utc_hour                    !< time of day (hour UTC)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_in_l_send   !< dummy send buffer used for summing-up indoor temperature per kk-level
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_in_recv     !< dummy recv buffer used for summing-up indoor temperature per kk-level
+
+!
+!-- Daily schedule, here for 08:00-18:00 = 1, other hours = 0.
+!-- time_utc_hour is calculated here based on time_utc [s] from 
+!-- date_and_time_mod.
+!-- (kanani: Does this schedule not depend on if it's an office or resident 
+!-- building?)
+    time_utc_hour = time_utc / 3600.0_wp
+
+!
+!-- Allocation of the load profiles to the building types
+!-- Residental Building, panel WBS 70
+    if      (building_type ==  1 .OR. &
+             building_type ==  2 .OR. &
+             building_type ==  3 .OR. &
+             building_type == 10 .OR. &
+             building_type == 11 .OR. &
+             building_type == 12) then
+                                        ventilation_int_loads = 1
+!-- Office, building with large windows
+    else if (building_type ==  4 .OR. &
+             building_type ==  5 .OR. &
+             building_type ==  6 .OR. &
+             building_type ==  7 .OR. &
+             building_type ==  8 .OR. &
+             building_type ==  9) then
+                                        ventilation_int_loads = 2
+!-- Industry, hospitals
+    else if (building_type == 13 .OR. &
+             building_type == 14 .OR. &
+             building_type == 15 .OR. &
+             building_type == 16 .OR. &
+             building_type == 17 .OR. &
+             building_type == 18) then
+                                        ventilation_int_loads = 3
+
+    end if
+
+!-- Residental Building, panel WBS 70
+    
+    if (ventilation_int_loads == 1) THEN
+       if ( time_utc_hour >= 6.0_wp .AND. time_utc_hour <= 8.0_wp )  THEN
+          schedule_d = 1
+       else if ( time_utc_hour >= 18.0_wp .AND. time_utc_hour <= 23.0_wp )  THEN
+          schedule_d = 1
+       else
+          schedule_d = 0
+       end if
+    end if
+
+!-- Office, building with large windows
+
+    if (ventilation_int_loads == 2) THEN
+       if ( time_utc_hour >= 8.0_wp  .AND.  time_utc_hour <= 18.0_wp )  THEN
+          schedule_d = 1
+       else
+          schedule_d = 0
+       end if
+    end if
+       
+!-- Industry, hospitals
+    if (ventilation_int_loads == 3) THEN
+       if ( time_utc_hour >= 6.0_wp  .AND.  time_utc_hour <= 22.0_wp )  THEN
+          schedule_d = 1
+       else
+          schedule_d = 0
+       end if
+    end if
+
+
+!
+!-- Following calculations must be done for each facade element.
+    DO  nb = 1, num_build
+!
+!--    First, check whether building is present on local subdomain. 
+       IF ( buildings(nb)%on_pe )  THEN
+!
+!--       Initialize/reset indoor temperature
+          buildings(nb)%t_in   = 0.0_wp
+          buildings(nb)%t_in_l = 0.0_wp 
+!
+!--       Horizontal surfaces
+          DO  fa = 1, buildings(nb)%num_facades_per_building_h_l
+!
+!--          Determine index where corresponding surface-type information 
+!--          is stored. 
+             m = buildings(nb)%m_h(fa)
+!
+!--          Determine building height level index. 
+             kk = surf_usm_h%k(m) + surf_usm_h%koff
+!            
+!--          Building geometries --> not time-dependent
+             facade_element_area      = dx * dy                             !< [m2] surface area per facade element    
+             floor_area_per_facade    = buildings(nb)%vpf(kk) * ddzw(kk)    !< [m2] net floor area per facade element       
+             indoor_volume_per_facade = buildings(nb)%vpf(kk)               !< [m3] indoor air volume per facade element           
+             window_area_per_facade   = surf_usm_h%frac(ind_wat_win,m)  * facade_element_area  !< [m2] window area per facade element
+             eff_mass_area            = factor_a * floor_area_per_facade    !< [m2] standard values according to Table 12 section 12.3.1.2  (calculate over Eq. (65) according to section 12.3.1.2)
+             c_m                      = factor_c * floor_area_per_facade    !< [J/K] standard values according to table 12 section 12.3.1.2 (calculate over Eq. (66) according to section 12.3.1.2)
+             total_area               = lambda_at * floor_area_per_facade   !< [m2] area of all surfaces pointing to zone  Eq. (9) according to section 7.2.2.2
+
+!--          Calculation of heat transfer coefficient for transmission --> not time-dependent
+             h_tr_w   = window_area_per_facade * u_value_win   !< [W/K] only for windows
+             h_tr_is  = total_area * h_is                      !< [W/K] with h_is = 3.45 W / (m2 K) between surface and air, Eq. (9)
+             h_tr_ms  = eff_mass_area * h_ms                    !< [W/K] with h_ms = 9.10 W / (m2 K) between component and surface, Eq. (64)
+             h_tr_op  = 1 / ( 1 / ( ( facade_element_area - window_area_per_facade ) &
+                                    * lambda_layer3 / s_layer3 * 0.5 ) + 1 / h_tr_ms )
+             h_tr_em  = 1 / ( 1 / h_tr_op - 1 / h_tr_ms )      !< [W/K] Eq. (63), Section 12.2.2
+!
+!--          internal air loads dependent on the occupacy of the room
+!--          basical internal heat gains (qint_low) with additional internal heat gains by occupancy (qint_high) (0,5*phi_int)
+             phi_ia = 0.5 * ( ( qint_high * schedule_d + qint_low )            &
+                              * floor_area_per_facade )         !< [W] Eq. (C.1)
+!
+!--          Airflow dependent on the occupacy of the room
+!--          basical airflow (air_change_low) with additional airflow gains by occupancy (air_change_high)
+             air_change = ( air_change_high * schedule_d + air_change_low )  !< [1/h]? 
+!
+!--          Heat transfer of ventilation 
+!--          not less than 0.01 W/K to provide division by 0 in further calculations
+!--          with heat capacity of air 0.33 Wh/m2K
+             h_ve   = MAX( 0.01 , ( air_change * indoor_volume_per_facade *      &
+                                    0.33 * (1 - eta_ve ) ) )    !< [W/K] from ISO 13789 Eq.(10) 
+
+!--          Heat transfer coefficient auxiliary variables
+             h_tr_1 = 1 / ( ( 1 / h_ve )   + ( 1 / h_tr_is ) )  !< [W/K] Eq. (C.6)
+             h_tr_2 = h_tr_1 + h_tr_w                           !< [W/K] Eq. (C.7)
+             h_tr_3 = 1 / ( ( 1 / h_tr_2 ) + ( 1 / h_tr_ms ) )  !< [W/K] Eq. (C.8)
+!
+!--          Net short-wave radiation through window area (was i_global)
+             net_sw_in = surf_usm_h%rad_sw_in(m) - surf_usm_h%rad_sw_out(m)
+!
+!--          Quantities needed for im_calc_temperatures
+             i = surf_usm_h%i(m)
+             j = surf_usm_h%j(m)
+             k = surf_usm_h%k(m)
+             near_facade_temperature = t_surf_10cm_h(m)
+             indoor_wall_window_temperature =                                  &
+                  surf_usm_h%frac(ind_veg_wall,m) * t_wall_h(nzt_wall,m)       &
+                + surf_usm_h%frac(ind_wat_win,m)  * t_window_h(nzt_wall,m)
+!
+!--          Solar thermal gains. If net_sw_in larger than sun-protection 
+!--          threshold parameter (params_solar_protection), sun protection will 
+!--          be activated
+             IF ( net_sw_in <= params_solar_protection )  THEN 
+                solar_protection_off = 1
+                solar_protection_on  = 0 
+             ELSE 
+                solar_protection_off = 0
+                solar_protection_on  = 1 
+             ENDIF
+!
+!--          Calculation of total heat gains from net_sw_in through windows [W] in respect on automatic sun protection 
+!--          DIN 4108 - 2 chap.8
+             phi_sol = (   window_area_per_facade * net_sw_in * solar_protection_off               &
+                         + window_area_per_facade * net_sw_in * f_c_win * solar_protection_on )    &
+                       * g_value_win * ( 1 - params_f_f ) * params_f_w              !< [W]
+!
+!--          Calculation of the mass specific thermal load for internal and external heatsources of the inner node
+             phi_m   = (eff_mass_area / total_area) * ( phi_ia + phi_sol )          !< [W] Eq. (C.2) with phi_ia=0,5*phi_int
+!
+!--          Calculation mass specific thermal load implied non thermal mass 
+             phi_st  =   ( 1 - ( eff_mass_area / total_area ) - ( h_tr_w / ( 9.1 * total_area ) ) ) &
+                       * ( phi_ia + phi_sol )                                       !< [W] Eq. (C.3) with phi_ia=0,5*phi_int
+!
+!--          Calculations for deriving indoor temperature and heat flux into the wall
+!--          Step 1: Indoor temperature without heating and cooling
+!--          section C.4.1 Picture C.2 zone 3)
+             phi_hc_nd = 0
+             
+             CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &
+                                         near_facade_temperature, phi_hc_nd )
+!
+!--          If air temperature between border temperatures of heating and cooling, assign output variable, then ready   
+             IF ( theta_int_h_set <= theta_air  .AND.  theta_air <= theta_int_c_set )  THEN
+                phi_hc_nd_ac = 0
+                phi_hc_nd    = phi_hc_nd_ac
+                theta_air_ac = theta_air
+!
+!--          Step 2: Else, apply 10 W/mÂ² heating/cooling power and calculate indoor temperature
+!--          again.
+             ELSE
+!
+!--             Temperature not correct, calculation method according to section C4.2
+                theta_air_0 = theta_air !< Note temperature without heating/cooling
+
+!--             Heating or cooling?
+                IF ( theta_air > theta_int_c_set )  THEN
+                   theta_air_set = theta_int_c_set
+                ELSE 
+                   theta_air_set = theta_int_h_set 
+                ENDIF
+
+!--             Calculate the temperature with phi_hc_nd_10 
+                phi_hc_nd_10 = 10.0_wp * floor_area_per_facade
+                phi_hc_nd    = phi_hc_nd_10
+       
+                CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &
+                                            near_facade_temperature, phi_hc_nd )
+
+                theta_air_10 = theta_air !< Note the temperature with 10 W/m2 of heating
+!
+   
+                phi_hc_nd_un = phi_hc_nd_10 * (theta_air_set - theta_air_0)                        &
+                                            / (theta_air_10  - theta_air_0)            !< Eq. (C.13)
+                                            
+                                            
+                                        
+!--             Step 3: With temperature ratio to determine the heating or cooling capacity    
+!--             If necessary, limit the power to maximum power
+!--             section C.4.1 Picture C.2 zone 2) and 4)
+                IF ( phi_c_max < phi_hc_nd_un  .AND.  phi_hc_nd_un < phi_h_max )  THEN
+                   phi_hc_nd_ac = phi_hc_nd_un
+                   phi_hc_nd = phi_hc_nd_un    
+                ELSE
+!--             Step 4: Inner temperature with maximum heating (phi_hc_nd_un positive) or cooling (phi_hc_nd_un negative)
+!--             section C.4.1 Picture C.2 zone 1) and 5)
+                   IF ( phi_hc_nd_un > 0 )  THEN
+                      phi_hc_nd_ac = phi_h_max                                         !< Limit heating
+                   ELSE 
+                      phi_hc_nd_ac = phi_c_max                                         !< Limit cooling
+                   ENDIF
+                ENDIF
+       
+                phi_hc_nd = phi_hc_nd_ac   
+!
+!--             Calculate the temperature with phi_hc_nd_ac (new)
+                CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &
+                                            near_facade_temperature, phi_hc_nd )
+
+                theta_air_ac = theta_air
+       
+             ENDIF
+!
+!--          Update theta_m_t_prev
+             theta_m_t_prev = theta_m_t
+!
+!--          Calculate the operating temperature with weighted mean temperature of air and mean solar temperature
+!--          Will be used for thermal comfort calculations 
+             theta_op     = 0.3 * theta_air_ac + 0.7 * theta_s          !< [Â°C] operative Temperature Eq. (C.12)
+!
+!--          Heat flux into the wall. Value needed in urban_surface_mod to 
+!--          calculate heat transfer through wall layers towards the facade
+!--          (use c_p * rho_surface to convert [W/m2] into [K m/s])
+             q_wall_win = h_tr_ms * ( theta_s - theta_m )                    &
+                                    / (   facade_element_area                  &
+                                        - window_area_per_facade )
+!
+!--          Transfer q_wall_win back to USM (innermost wall/window layer)
+             surf_usm_h%iwghf_eb(m)        = q_wall_win
+             surf_usm_h%iwghf_eb_window(m) = q_wall_win
+!
+!--          Sum up operational indoor temperature per kk-level. Further below,
+!--          this temperature is reduced by MPI to one temperature per kk-level
+!--          and building (processor overlapping)
+             buildings(nb)%t_in_l(kk) = buildings(nb)%t_in_l(kk) + theta_op
+!
+!--          Calculation of waste heat
+!--          Anthropogenic heat output
+              IF ( phi_hc_nd_ac > 0 )  THEN 
+                   heating_on = 1
+                   cooling_on = 0
+              ELSE 
+                   heating_on = 0
+                   cooling_on = 1
+              ENDIF
+
+             q_waste_heat = (phi_hc_nd * (params_waste_heat_h * heating_on + params_waste_heat_c * cooling_on))  !< [W/m2]  anthropogenic heat output
+!              surf_usm_h%shf(m)=q_waste_heat
+             
+          ENDDO !< Horizontal surfaces loop
+!
+!--       Vertical surfaces
+          DO  fa = 1, buildings(nb)%num_facades_per_building_v_l
+!
+!--          Determine indices where corresponding surface-type information 
+!--          is stored. 
+             l = buildings(nb)%l_v(fa)
+             m = buildings(nb)%m_v(fa)
+!
+!--          Determine building height level index. 
+             kk = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff
+!
+!--          Building geometries  --> not time-dependent
+             IF ( l == 0  .OR. l == 1 ) facade_element_area = dx * dzw(kk)  !< [m2] surface area per facade element
+             IF ( l == 2  .OR. l == 3 ) facade_element_area = dy * dzw(kk)  !< [m2] surface area per facade element
+             floor_area_per_facade    = buildings(nb)%vpf(kk) * ddzw(kk)    !< [m2] net floor area per facade element       
+             indoor_volume_per_facade = buildings(nb)%vpf(kk)               !< [m3] indoor air volume per facade element           
+             window_area_per_facade   = surf_usm_v(l)%frac(ind_wat_win,m)  * facade_element_area  !< [m2] window area per facade element
+             eff_mass_area            = factor_a * floor_area_per_facade    !< [m2] standard values according to Table 12 section 12.3.1.2  (calculate over Eq. (65) according to section 12.3.1.2)
+             c_m                      = factor_c * floor_area_per_facade    !< [J/K] standard values according to table 12 section 12.3.1.2 (calculate over Eq. (66) according to section 12.3.1.2)
+             total_area               = lambda_at * floor_area_per_facade   !< [m2] area of all surfaces pointing to zone Eq. (9) according to section 7.2.2.2
+!
+!--          Calculation of heat transfer coefficient for transmission --> not time-dependent
+             h_tr_w   = window_area_per_facade * u_value_win   !< [W/K] only for windows
+             h_tr_is  = total_area * h_is                      !< [W/K] with h_is = 3.45 W / (m2 K) between surface and air, Eq. (9)
+             h_tr_ms  = eff_mass_area * h_ms                   !< [W/K] with h_ms = 9.10 W / (m2 K) between component and surface, Eq. (64)
+             h_tr_op  = 1 / ( 1 / ( ( facade_element_area - window_area_per_facade ) &
+                                    * lambda_layer3 / s_layer3 * 0.5 ) + 1 / h_tr_ms )
+             h_tr_em  = 1 / ( 1 / h_tr_op - 1 / h_tr_ms )      !< [W/K] Eq. (63), Section 12.2.2
+!
+!--          internal air loads dependent on the occupacy of the room
+!--          basical internal heat gains (qint_low) with additional internal heat gains by occupancy (qint_high) (0,5*phi_int)
+             phi_ia = 0.5 * ( ( qint_high * schedule_d + qint_low )            &
+                              * floor_area_per_facade )                      !< [W] Eq. (C.1)
+!
+!--          Airflow dependent on the occupacy of the room
+!--          basical airflow (air_change_low) with additional airflow gains by occupancy (air_change_high)
+             air_change = ( air_change_high * schedule_d + air_change_low )  
+!
+!--          Heat transfer of ventilation 
+!--          not less than 0.01 W/K to provide division by 0 in further calculations
+!--          with heat capacity of air 0.33 Wh/m2K
+             h_ve   = MAX( 0.01 , ( air_change * indoor_volume_per_facade *      &
+                                    0.33 * (1 - eta_ve ) ) )                    !< [W/K] from ISO 13789 Eq.(10) 
+                                    
+!--          Heat transfer coefficient auxiliary variables
+             h_tr_1 = 1 / ( ( 1 / h_ve )   + ( 1 / h_tr_is ) )                  !< [W/K] Eq. (C.6)
+             h_tr_2 = h_tr_1 + h_tr_w                                           !< [W/K] Eq. (C.7)
+             h_tr_3 = 1 / ( ( 1 / h_tr_2 ) + ( 1 / h_tr_ms ) )                  !< [W/K] Eq. (C.8)
+!
+!--          Net short-wave radiation through window area (was i_global)
+             net_sw_in = surf_usm_v(l)%rad_sw_in(m) - surf_usm_v(l)%rad_sw_out(m)
+!
+!--          Quantities needed for im_calc_temperatures
+             i = surf_usm_v(l)%i(m)
+             j = surf_usm_v(l)%j(m)
+             k = surf_usm_v(l)%k(m)
+             near_facade_temperature = t_surf_10cm_v(l)%t(m)
+             indoor_wall_window_temperature =                                    &
+                  surf_usm_v(l)%frac(ind_veg_wall,m) * t_wall_v(l)%t(nzt_wall,m) &
+                + surf_usm_v(l)%frac(ind_wat_win,m)  * t_window_v(l)%t(nzt_wall,m)
+!
+!--          Solar thermal gains. If net_sw_in larger than sun-protection 
+!--          threshold parameter (params_solar_protection), sun protection will 
+!--          be activated
+             IF ( net_sw_in <= params_solar_protection )  THEN 
+                solar_protection_off = 1
+                solar_protection_on  = 0 
+             ELSE 
+                solar_protection_off = 0
+                solar_protection_on  = 1 
+             ENDIF
+!
+!--          Calculation of total heat gains from net_sw_in through windows [W] in respect on automatic sun protection
+!--          DIN 4108 - 2 chap.8
+             phi_sol = (   window_area_per_facade * net_sw_in * solar_protection_off               &
+                         + window_area_per_facade * net_sw_in * f_c_win * solar_protection_on )    &
+                       * g_value_win * ( 1 - params_f_f ) * params_f_w
+!
+!--          Calculation of the mass specific thermal load for internal and external heatsources
+             phi_m   = (eff_mass_area / total_area) * ( phi_ia + phi_sol )          !< [W] Eq. (C.2) with phi_ia=0,5*phi_int
+!
+!--          Calculation mass specific thermal load implied non thermal mass 
+             phi_st  =   ( 1 - ( eff_mass_area / total_area ) - ( h_tr_w / ( 9.1 * total_area ) ) ) &
+                       * ( phi_ia + phi_sol )                                       !< [W] Eq. (C.3) with phi_ia=0,5*phi_int
+!
+!--          Calculations for deriving indoor temperature and heat flux into the wall
+!--          Step 1: Indoor temperature without heating and cooling
+!--          section C.4.1 Picture C.2 zone 3)
+             phi_hc_nd = 0
+             
+             CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &
+                                         near_facade_temperature, phi_hc_nd )
+!
+!--          If air temperature between border temperatures of heating and cooling, assign output variable, then ready  
+             IF ( theta_int_h_set <= theta_air  .AND.  theta_air <= theta_int_c_set )  THEN
+                phi_hc_nd_ac = 0
+                phi_hc_nd    = phi_hc_nd_ac
+                theta_air_ac = theta_air
+!
+!--          Step 2: Else, apply 10 W/mÂ² heating/cooling power and calculate indoor temperature
+!--          again.
+             ELSE
+!
+!--             Temperature not correct, calculation method according to section C4.2
+                theta_air_0 = theta_air !< Note temperature without heating/cooling
+
+!--             Heating or cooling?
+                IF ( theta_air > theta_int_c_set )  THEN
+                   theta_air_set = theta_int_c_set
+                ELSE 
+                   theta_air_set = theta_int_h_set 
+                ENDIF
+
+!--             Calculate the temperature with phi_hc_nd_10
+                phi_hc_nd_10 = 10.0_wp * floor_area_per_facade
+                phi_hc_nd    = phi_hc_nd_10
+       
+                CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &
+                                            near_facade_temperature, phi_hc_nd )
+
+                theta_air_10 = theta_air !< Note the temperature with 10 W/m2 of heating
+
+                
+                phi_hc_nd_un = phi_hc_nd_10 * (theta_air_set - theta_air_0)                        &
+                                            / (theta_air_10  - theta_air_0)            !< Eq. (C.13)
+!      
+!--             Step 3: With temperature ratio to determine the heating or cooling capacity    
+!--             If necessary, limit the power to maximum power
+!--             section C.4.1 Picture C.2 zone 2) and 4)
+                IF ( phi_c_max < phi_hc_nd_un  .AND.  phi_hc_nd_un < phi_h_max )  THEN
+                   phi_hc_nd_ac = phi_hc_nd_un
+                   phi_hc_nd = phi_hc_nd_un
+                ELSE
+!--             Step 4: Inner temperature with maximum heating (phi_hc_nd_un positive) or cooling (phi_hc_nd_un negative)
+!--             section C.4.1 Picture C.2 zone 1) and 5)
+                   IF ( phi_hc_nd_un > 0 )  THEN
+                      phi_hc_nd_ac = phi_h_max                                         !< Limit heating
+                   ELSE 
+                      phi_hc_nd_ac = phi_c_max                                         !< Limit cooling
+                   ENDIF
+                ENDIF
+       
+                phi_hc_nd = phi_hc_nd_ac   
+!
+!--             Calculate the temperature with phi_hc_nd_ac (new)
+                CALL im_calc_temperatures ( i, j, k, indoor_wall_window_temperature, &
+                                            near_facade_temperature, phi_hc_nd )
+
+                theta_air_ac = theta_air
+       
+             ENDIF
+!
+!--          Update theta_m_t_prev
+             theta_m_t_prev = theta_m_t
+!
+!--          Calculate the operating temperature with weighted mean of temperature of air and mean
+!--          Will be used for thermal comfort calculations 
+             theta_op     = 0.3 * theta_air_ac + 0.7 * theta_s
+!
+!--          Heat flux into the wall. Value needed in urban_surface_mod to 
+!--          calculate heat transfer through wall layers towards the facade
+             q_wall_win = h_tr_ms * ( theta_s - theta_m )                    &
+                                    / (   facade_element_area                  &
+                                        - window_area_per_facade )
+!
+!--          Transfer q_wall_win back to USM (innermost wall/window layer)
+             surf_usm_v(l)%iwghf_eb(m)        = q_wall_win
+             surf_usm_v(l)%iwghf_eb_window(m) = q_wall_win
+!
+!--          Sum up operational indoor temperature per kk-level. Further below,
+!--          this temperature is reduced by MPI to one temperature per kk-level
+!--          and building (processor overlapping)
+             buildings(nb)%t_in_l(kk) = buildings(nb)%t_in_l(kk) + theta_op
+
+!
+!--          Calculation of waste heat
+!--          Anthropogenic heat output
+              IF ( phi_hc_nd_ac > 0 )  THEN 
+                   heating_on = 1
+                   cooling_on = 0
+              ELSE 
+                   heating_on = 0
+                   cooling_on = 1
+              ENDIF
+
+             q_waste_heat = (phi_hc_nd * (params_waste_heat_h * heating_on + params_waste_heat_c * cooling_on))   !< [W/m2] , anthropogenic heat output
+!              surf_usm_v(l)%waste_heat(m)=q_waste_heat
+             
+          ENDDO !< Vertical surfaces loop
+
+       ENDIF !< buildings(nb)%on_pe
+    ENDDO !< buildings loop
+
+!
+!-- Determine total number of facade elements per building and assign number to 
+!-- building data type.
+    DO  nb = 1, num_build
+!
+!--    Allocate dummy array used for summing-up facade elements. 
+!--    Please note, dummy arguments are necessary as building-date type
+!--    arrays are not necessarily allocated on all PEs.
+       ALLOCATE( t_in_l_send(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       ALLOCATE( t_in_recv(buildings(nb)%kb_min:buildings(nb)%kb_max) )
+       t_in_l_send = 0.0_wp
+       t_in_recv   = 0.0_wp
+
+       IF ( buildings(nb)%on_pe )  THEN
+          t_in_l_send = buildings(nb)%t_in_l
+       ENDIF
+
+#if defined( __parallel ) 
+       CALL MPI_ALLREDUCE( t_in_l_send,                                        &
+                           t_in_recv,                                          &
+                           buildings(nb)%kb_max - buildings(nb)%kb_min + 1,    &
+                           MPI_REAL,                                           &
+                           MPI_SUM,                                            &
+                           comm2d,                                             &
+                           ierr )
+
+       IF ( ALLOCATED( buildings(nb)%t_in ) )                                  &
+           buildings(nb)%t_in = t_in_recv
+#else
+       buildings(nb)%t_in = buildings(nb)%t_in_l
+#endif
+
+       buildings(nb)%t_in =   buildings(nb)%t_in /                             &
+                            ( buildings(nb)%num_facade_h +                     &
+                              buildings(nb)%num_facade_v )
+!
+!--    Deallocate dummy arrays
+       DEALLOCATE( t_in_l_send )
+       DEALLOCATE( t_in_recv )
+
+    ENDDO
+
+
+ END SUBROUTINE im_main_heatcool
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &indoor_parameters for indoor model
+!------------------------------------------------------------------------------!
+ SUBROUTINE im_parin
+    
+    USE control_parameters,                                                    &
+        ONLY:  indoor_model
+    
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line  !< string containing current line of file PARIN
+
+    
+    
+    NAMELIST /indoor_parameters/  building_type, dt_indoor,                           &
+                                  initial_indoor_temperature
+
+!    line = ' '
+
+!
+!-- Try to find indoor model package
+    REWIND ( 11 )
+    line = ' '
+    DO   WHILE ( INDEX( line, '&indoor_parameters' ) == 0 )
+       READ ( 11, '(A)', END=10 )  line
+!    PRINT*, 'line: ', line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, indoor_parameters )
+!
+!-- Set flag that indicates that the indoor model is switched on
+    indoor_model = .TRUE.
+
+!
+!--    Activate spinup (maybe later
+!        IF ( spinup_time > 0.0_wp )  THEN
+!           coupling_start_time = spinup_time
+!           end_time = end_time + spinup_time
+!           IF ( spinup_pt_mean == 9999999.9_wp )  THEN
+!              spinup_pt_mean = pt_surface
+!           ENDIF
+!           spinup = .TRUE.
+!        ENDIF
+
+ 10 CONTINUE
+    
+ END SUBROUTINE im_parin
+
+
+END MODULE indoor_model_mod
Index: /palm/tags/release-6.0/SOURCE/inflow_turbulence.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/inflow_turbulence.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/inflow_turbulence.f90	(revision 3477)
@@ -0,0 +1,315 @@
+!> @file inflow_turbulence.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! 
+! 1806 2016-04-05 18:55:35Z gronemeier
+! Added comments to variables and code segments. Removed code redundancies.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+! 
+! 1615 2015-07-08 18:49:19Z suehring
+! Enable turbulent inflow for passive_scalar and humidity
+!
+! 1560 2015-03-06 10:48:54Z keck
+! Option recycling_yshift added. If this option is switched on, the turbulence
+! data, which is mapped from the recycling plane to the inflow, is shifted in
+! y direction (by ny * dy / 2 )
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of 
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Initial version (2008/03/07)
+!
+! Description:
+! ------------
+!> Imposing turbulence at the respective inflow using the turbulence
+!> recycling method of Kataoka and Mizuno (2002).
+!------------------------------------------------------------------------------!
+ SUBROUTINE inflow_turbulence
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  e, inflow_damping_factor, mean_inflow_profiles, pt, q, s, u, v, w
+        
+    USE control_parameters,                                                    &
+        ONLY:  humidity, passive_scalar, recycling_plane, recycling_yshift
+        
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+        
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, ny, nyn, nys, nyng, nysg, nzb, nzt
+        
+    USE kinds
+    
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i        !< loop index
+    INTEGER(iwp) ::  j        !< loop index
+    INTEGER(iwp) ::  k        !< loop index
+    INTEGER(iwp) ::  l        !< loop index
+    INTEGER(iwp) ::  next     !< ID of receiving PE for y-shift
+    INTEGER(iwp) ::  ngp_ifd  !< number of grid points stored in avpr
+    INTEGER(iwp) ::  ngp_pr   !< number of grid points stored in inflow_dist
+    INTEGER(iwp) ::  prev     !< ID of sending PE for y-shift
+
+    REAL(wp), DIMENSION(nzb:nzt+1,7,nbgp)           ::                         &
+       avpr               !< stores averaged profiles at recycling plane
+    REAL(wp), DIMENSION(nzb:nzt+1,7,nbgp)           ::                         &
+       avpr_l             !< auxiliary variable to calculate avpr
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) ::                         &
+       inflow_dist        !< turbulence signal of vars, added at inflow boundary
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) ::                         &
+       local_inflow_dist  !< auxiliary variable for inflow_dist, used for yshift
+
+    CALL cpu_log( log_point(40), 'inflow_turbulence', 'start' )
+
+!
+!-- Carry out spanwise averaging in the recycling plane
+    avpr_l = 0.0_wp
+    ngp_pr = ( nzt - nzb + 2 ) * 7 * nbgp
+    ngp_ifd = ngp_pr * ( nyn - nys + 1 + 2 * nbgp )
+
+!
+!-- First, local averaging within the recycling domain
+    i = recycling_plane
+
+#if defined( __parallel )
+    IF ( myidx == id_recycling )  THEN
+       
+       DO  l = 1, nbgp
+          DO  j = nys, nyn
+             DO  k = nzb, nzt + 1
+
+                avpr_l(k,1,l) = avpr_l(k,1,l) + u(k,j,i)
+                avpr_l(k,2,l) = avpr_l(k,2,l) + v(k,j,i)
+                avpr_l(k,3,l) = avpr_l(k,3,l) + w(k,j,i)
+                avpr_l(k,4,l) = avpr_l(k,4,l) + pt(k,j,i)
+                avpr_l(k,5,l) = avpr_l(k,5,l) + e(k,j,i)
+                IF ( humidity )                                                &
+                   avpr_l(k,6,l) = avpr_l(k,6,l) + q(k,j,i)
+                IF ( passive_scalar )                                          &
+                   avpr_l(k,7,l) = avpr_l(k,7,l) + s(k,j,i)
+
+             ENDDO
+          ENDDO
+          i = i + 1
+       ENDDO
+
+    ENDIF
+!
+!-- Now, averaging over all PEs
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( avpr_l(nzb,1,1), avpr(nzb,1,1), ngp_pr, MPI_REAL,      &
+                        MPI_SUM, comm2d, ierr )
+
+#else
+    DO  l = 1, nbgp
+       DO  j = nys, nyn
+          DO  k = nzb, nzt + 1
+
+             avpr_l(k,1,l) = avpr_l(k,1,l) + u(k,j,i)
+             avpr_l(k,2,l) = avpr_l(k,2,l) + v(k,j,i)
+             avpr_l(k,3,l) = avpr_l(k,3,l) + w(k,j,i)
+             avpr_l(k,4,l) = avpr_l(k,4,l) + pt(k,j,i)
+             avpr_l(k,5,l) = avpr_l(k,5,l) + e(k,j,i)
+             IF ( humidity )                                                   &
+                avpr_l(k,6,l) = avpr_l(k,6,l) + q(k,j,i)
+             IF ( passive_scalar )                                             &
+                avpr_l(k,7,l) = avpr_l(k,7,l) + s(k,j,i)
+
+          ENDDO
+       ENDDO
+       i = i + 1 
+    ENDDO
+    
+    avpr = avpr_l
+#endif
+
+    avpr = avpr / ( ny + 1 )
+!
+!-- Calculate the disturbances at the recycling plane
+    i = recycling_plane
+
+#if defined( __parallel )
+    IF ( myidx == id_recycling )  THEN
+       DO  l = 1, nbgp
+          DO  j = nysg, nyng
+             DO  k = nzb, nzt + 1
+
+                inflow_dist(k,j,1,l) = u(k,j,i+1) - avpr(k,1,l)
+                inflow_dist(k,j,2,l) = v(k,j,i)   - avpr(k,2,l)
+                inflow_dist(k,j,3,l) = w(k,j,i)   - avpr(k,3,l)
+                inflow_dist(k,j,4,l) = pt(k,j,i)  - avpr(k,4,l)
+                inflow_dist(k,j,5,l) = e(k,j,i)   - avpr(k,5,l)
+                IF ( humidity )                                                &
+                   inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l)
+                IF ( passive_scalar )                                          &
+                   inflow_dist(k,j,7,l) = s(k,j,i) - avpr(k,7,l)
+            ENDDO
+          ENDDO
+          i = i + 1
+       ENDDO
+
+    ENDIF
+#else
+    DO  l = 1, nbgp
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt+1
+
+             inflow_dist(k,j,1,l) = u(k,j,i+1) - avpr(k,1,l)
+             inflow_dist(k,j,2,l) = v(k,j,i)   - avpr(k,2,l)
+             inflow_dist(k,j,3,l) = w(k,j,i)   - avpr(k,3,l)
+             inflow_dist(k,j,4,l) = pt(k,j,i)  - avpr(k,4,l)
+             inflow_dist(k,j,5,l) = e(k,j,i)   - avpr(k,5,l)
+             IF ( humidity )                                                   &
+                inflow_dist(k,j,6,l) = q(k,j,i) - avpr(k,6,l)
+             IF ( passive_scalar )                                             &
+                inflow_dist(k,j,7,l) = s(k,j,i) - avpr(k,7,l)
+              
+          ENDDO
+       ENDDO
+       i = i + 1
+    ENDDO
+#endif
+
+!
+!-- For parallel runs, send the disturbances to the respective inflow PE
+#if defined( __parallel )
+    IF ( myidx == id_recycling  .AND.  myidx /= id_inflow )  THEN
+
+       CALL MPI_SEND( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL,            &
+                      id_inflow, 1, comm1dx, ierr )
+
+    ELSEIF ( myidx /= id_recycling  .AND.  myidx == id_inflow )  THEN
+
+       inflow_dist = 0.0_wp
+       CALL MPI_RECV( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL,            &
+                      id_recycling, 1, comm1dx, status, ierr )
+
+    ENDIF
+
+!
+!-- y-shift for inflow_dist
+!-- Shift inflow_dist in positive y direction by a distance of INT( npey / 2 )
+    IF ( recycling_yshift .AND. myidx == id_inflow ) THEN
+!
+!--    Calculate the ID of the PE which sends data to this PE (prev) and of the
+!--    PE which receives data from this PE (next).
+       IF ( myidy >= INT( pdims(2) / 2 ) ) THEN
+          prev = myidy - INT( pdims(2) / 2 )
+       ELSE
+          prev = pdims(2) - ( INT( pdims(2) / 2 ) - myidy )
+       ENDIF
+     
+       IF ( myidy < pdims(2) - INT( pdims(2) / 2 ) ) THEN
+          next = myidy + INT( pdims(2) / 2 )
+       ELSE
+          next = INT( pdims(2) / 2 ) - ( pdims(2) - myidy )
+       ENDIF
+
+       local_inflow_dist = 0.0_wp
+
+       CALL MPI_SENDRECV( inflow_dist(nzb,nysg,1,1), ngp_ifd, MPI_REAL,        &
+                          next, 1, local_inflow_dist(nzb,nysg,1,1), ngp_ifd,   &
+                          MPI_REAL, prev, 1, comm1dy, status, ierr )
+
+       inflow_dist = local_inflow_dist
+
+    ENDIF
+
+#endif
+
+!
+!-- Add the disturbance at the inflow
+    IF ( nxl == 0 )  THEN
+
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt + 1
+
+             u(k,j,-nbgp+1:0) = mean_inflow_profiles(k,1) +                 &
+                        inflow_dist(k,j,1,1:nbgp) * inflow_damping_factor(k)
+             v(k,j,-nbgp:-1)  = mean_inflow_profiles(k,2) +                 &
+                        inflow_dist(k,j,2,1:nbgp) * inflow_damping_factor(k)
+             w(k,j,-nbgp:-1)  =                                             &
+                        inflow_dist(k,j,3,1:nbgp) * inflow_damping_factor(k)
+             pt(k,j,-nbgp:-1) = mean_inflow_profiles(k,4) +                 &
+                        inflow_dist(k,j,4,1:nbgp) * inflow_damping_factor(k)
+             e(k,j,-nbgp:-1)  = mean_inflow_profiles(k,5) +                 &
+                        inflow_dist(k,j,5,1:nbgp) * inflow_damping_factor(k)
+             e(k,j,-nbgp:-1)  = MAX( e(k,j,-nbgp:-1), 0.0_wp )
+
+             IF ( humidity )                                                &
+                q(k,j,-nbgp:-1)  = mean_inflow_profiles(k,6) +              &
+                        inflow_dist(k,j,6,1:nbgp) * inflow_damping_factor(k)
+             IF ( passive_scalar )                                          &
+                s(k,j,-nbgp:-1)  = mean_inflow_profiles(k,7) +              &
+                        inflow_dist(k,j,7,1:nbgp) * inflow_damping_factor(k)
+
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+
+    CALL cpu_log( log_point(40), 'inflow_turbulence', 'stop' )
+
+
+ END SUBROUTINE inflow_turbulence
Index: /palm/tags/release-6.0/SOURCE/init_3d_model.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_3d_model.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_3d_model.f90	(revision 3477)
@@ -0,0 +1,2624 @@
+!> @file init_3d_model.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add virtual measurement module
+! 
+! 3472 2018-10-30 20:43:50Z suehring
+! Add indoor model (kanani, srissman, tlang)
+! 
+! 3467 2018-10-30 19:05:21Z suehring
+! Implementation of a new aerosol module salsa.
+! 
+! 3458 2018-10-30 14:51:23Z kanani
+! from chemistry branch r3443, basit:
+! bug fixed in sums and sums_l for chemistry profile output
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Add biometeorology
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Initialize surface data output
+! 
+! 3415 2018-10-24 11:57:50Z suehring
+! Set bottom boundary condition for geostrophic wind components in inifor
+! initialization
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! - Separate offline nesting from large_scale_nudging_mod
+! - Improve the synthetic turbulence generator
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Minor formatting (kanani)
+! Added CALL to the chem_emissions module (Russo)
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! allocate and set stokes drift velocity profiles
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Minor formatting (kanani)
+! Added CALL to the chem_emissions module (Russo)
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3289 2018-09-28 10:23:58Z suehring
+! Introduce module parameter for number of inflow profiles
+! 
+! 3288 2018-09-28 10:23:08Z suehring
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3234 2018-09-07 13:46:58Z schwenkel
+! The increase of dots_num in case of radiation or land surface model must 
+! be done before user_init is called
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Revise Inifor initialization
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Added multi agent system
+! 
+! 3129 2018-07-16 07:45:13Z gronemeier
+! Move initialization call for nudging and 1D/3D offline nesting. 
+! Revise initialization with inifor data.
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3042 2018-05-25 10:44:37Z schwenkel
+! Changed the name specific humidity to mixing ratio
+! 
+! 3040 2018-05-25 10:22:08Z schwenkel
+! Add option to initialize warm air bubble close to surface
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Bugfix: initialization of ts_value missing
+! 
+! 3011 2018-05-07 14:38:42Z schwenkel
+! removed redundant if statement
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! precipitation_rate removed
+! 
+! 2995 2018-04-19 12:13:16Z Giersch
+! CALL radiation_control is not necessary during initialization because 
+! calculation of radiative fluxes at model start is done in radiation_init 
+! in any case 
+! 
+! 2977 2018-04-17 10:27:57Z kanani
+! Implement changes from branch radiation (r2948-2971) with minor modifications
+! (moh.hefny):
+! - set radiation_interactions according to the existence of urban/land vertical
+!   surfaces and trees to activiate RTM
+! - set average_radiation to TRUE if RTM is activiated
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! - Revise Inifor initialization for geostrophic wind components
+! - Initialize synthetic turbulence generator in case of Inifor initialization  
+!
+! 2936 2018-03-27 14:49:27Z suehring
+! Synchronize parent and child models after initialization.
+! Remove obsolete masking of topography grid points for Runge-Kutta weighted
+! tendency arrays.
+! 
+! 2920 2018-03-22 11:22:01Z kanani
+! Add call for precalculating apparent solar positions (moh.hefny)
+! 
+! 2906 2018-03-19 08:56:40Z Giersch
+! The variables read/write_svf_on_init have been removed. Instead ENVIRONMENT
+! variables read/write_svf have been introduced. Location_message has been 
+! added.
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Renamed routines with respect to reading restart data, file 13 is closed in
+! rrd_read_parts_of_global now
+! 
+! 2867 2018-03-09 09:40:23Z suehring
+! Further bugfix concerning call of user_init. 
+! 
+! 2864 2018-03-08 11:57:45Z suehring
+! Bugfix, move call of user_init in front of initialization of grid-point 
+! arrays
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2776 2018-01-31 10:44:42Z Giersch
+! Variable use_synthetic_turbulence_generator has been abbreviated
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2758 2018-01-17 12:55:21Z suehring
+! In case of spinup of land- and urban-surface model, do not mask wind velocity
+! at first computational grid level
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2705 2017-12-18 11:26:23Z maronga
+! Bugfix for reading initial profiles from ls/nuding file
+!
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2700 2017-12-15 14:12:35Z suehring
+! Bugfix, missing initialization of surface attributes in case of 
+! inifor-initialization branch
+!
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of uv exposure model (FK)
+! Moved initialisation of diss, e, kh, km to turbulence_closure_mod (TG)
+! Added chemical emissions (FK)
+! Initialize masking arrays and number-of-grid-points arrays before initialize
+! LSM, USM and radiation module 
+! Initialization with inifor (MS)
+! 
+! 2618 2017-11-16 15:37:30Z suehring
+! Reorder calls of init_surfaces.
+! 
+! 2564 2017-10-19 15:56:56Z Giersch
+! Variable wind_turbine was added to control_parameters.
+! 
+! 2550 2017-10-16 17:12:01Z boeske
+! Modifications to cyclic fill method and turbulence recycling method in case of
+! complex terrain simulations
+! 
+! 2513 2017-10-04 09:24:39Z kanani
+! Bugfix in storing initial scalar profile (wrong index)
+! 
+! 2350 2017-08-15 11:48:26Z kanani
+! Bugfix in nopointer version
+! 
+! 2339 2017-08-07 13:55:26Z gronemeier
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! Modularize 1D model
+! 
+! 2329 2017-08-03 14:24:56Z knoop
+! Removed temporary bugfix (r2327) as bug is properly resolved by this revision
+! 
+! 2327 2017-08-02 07:40:57Z maronga
+! Temporary bugfix
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Modularize large-scale forcing and nudging
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2277 2017-06-12 10:47:51Z kanani
+! Removed unused variable sums_up_fraction_l
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! dots_num must be increased when LSM and/or radiation is used
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2252 2017-06-07 09:35:37Z knoop
+! rho_air now depending on surface_pressure even in Boussinesq mode
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept: 
+!   - Modify passed parameters for disturb_field
+!   - Topography representation via flags
+!   - Remove unused arrays. 
+!   - Move initialization of surface-related quantities to surface_mod
+! 
+! 2172 2017-03-08 15:55:25Z knoop
+! Bugfix: moved parallel random generator initialization into its module
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added support for urban surface model,
+! adjusted location_message in case of plant_canopy
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! Initializaton of scalarflux at model top
+! Bugfixes in initialization of surface and top salinity flux, top scalar and 
+! humidity fluxes
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! Increase dimension for mean_inflow_profiles
+! Remove inadvertent write-statement
+! Bugfix, large-scale forcing is still not implemented for passive scalars
+!
+! 1957 2016-07-07 10:43:48Z suehring
+! flight module added
+!
+! 1920 2016-05-30 10:50:15Z suehring 
+! Initialize us with very small number to avoid segmentation fault during 
+! calculation of Obukhov length
+!
+! 1918 2016-05-27 14:35:57Z raasch
+! intermediate_timestep_count is set 0 instead 1 for first call of pres,
+! bugfix: initialization of local sum arrays are moved to the beginning of the
+!         routine because otherwise results from pres are overwritten
+!
+! 1914 2016-05-26 14:44:07Z witha
+! Added initialization of the wind turbine model
+!
+! 1878 2016-04-19 12:30:36Z hellstea
+! The zeroth element of weight_pres removed as unnecessary
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! Adapted for modularization of microphysics.
+! precipitation_amount, precipitation_rate, prr moved to arrays_3d.
+! Initialization of nc_1d, nr_1d, pt_1d, qc_1d, qr_1d, q_1d moved to
+! bcm_init.
+!
+! 1845 2016-04-08 08:29:13Z raasch
+! nzb_2d replaced by nzb_u|v_inner
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! initialization of spectra quantities moved to spectra_mod
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! turbulence renamed collision_turbulence
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Renamed radiation calls.
+! Renamed canopy model calls.
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme replaced by microphysics_*
+! 
+! 1817 2016-04-06 15:44:20Z maronga
+! Renamed lsm calls.
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! zero-settings for velocities inside topography re-activated (was deactivated
+! in r1762)
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Added z0q. 
+! Syntax layout improved.
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module name changed + related changes
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! bugfix: increase size of volume_flow_area_l and volume_flow_initial_l by 1
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1738 2015-12-18 13:56:05Z raasch
+! calculate mean surface level height for each statistic region
+!
+! 1734 2015-12-02 12:17:12Z raasch
+! no initial disturbances in case that the disturbance energy limit has been
+! set zero
+!
+! 1707 2015-11-02 15:24:52Z maronga
+! Bugfix: transfer of Richardson number from 1D model to Obukhov length caused
+! devision by zero in neutral stratification
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Call to init_surface_layer added. rif is replaced by ol and zeta.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+! 
+! 1615 2015-07-08 18:49:19Z suehring
+! Enable turbulent inflow for passive_scalar and humidity
+!
+! 1585 2015-04-30 07:05:52Z maronga
+! Initialization of radiation code is now done after LSM initializtion
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! adjustments for psolver-queries
+!
+! 1551 2015-03-03 14:18:16Z maronga
+! Allocation of land surface arrays is now done in the subroutine lsm_init_arrays,
+! which is part of land_surface_model.
+! 
+! 1507 2014-12-10 12:14:18Z suehring
+! Bugfix: set horizontal velocity components to zero inside topography
+!
+! 1496 2014-12-02 17:25:50Z maronga
+! Added initialization of the land surface and radiation schemes
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+! canopy-related initialization (e.g. lad and canopy_heat_flux) moved to new 
+! subroutine init_plant_canopy within the module plant_canopy_model_mod,
+! call of subroutine init_plant_canopy added.
+! 
+! 1431 2014-07-15 14:47:17Z suehring
+! var_d added, in order to normalize spectra.
+! 
+! 1429 2014-07-15 12:53:45Z knoop
+! Ensemble run capability added to parallel random number generator
+! 
+! 1411 2014-05-16 18:01:51Z suehring
+! Initial horizontal velocity profiles were not set to zero at the first vertical 
+! grid level in case of non-cyclic lateral boundary conditions. 
+! 
+! 1406 2014-05-16 13:47:01Z raasch
+! bugfix: setting of initial velocities at k=1 to zero not in case of a
+! no-slip boundary condition for uv
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages modified
+! 
+! 1400 2014-05-09 14:03:54Z knoop
+! Parallel random number generator added
+! 
+! 1384 2014-05-02 14:31:06Z raasch
+! location messages added
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! tend_* removed
+! Bugfix: w_subs is not allocated anymore if it is already allocated
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! module lpm_init_mod added to use statements, because lpm_init has become a 
+! module
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+! module interfaces removed
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1316 2014-03-17 07:44:59Z heinze
+! Bugfix: allocation of w_subs
+!
+! 1299 2014-03-06 13:15:21Z heinze
+! Allocate w_subs due to extension of large scale subsidence in combination
+! with large scale forcing data (LSF_DATA)
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! Overwrite initial profiles in case of nudging
+! Inititialize shf and qsws in case of large_scale_forcing
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! +rflags_s_inner in copyin statement, use copyin for most arrays instead of
+! copy
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! array tri is allocated and included in data copy statement
+!
+! 1195 2013-07-01 12:27:57Z heinze
+! Bugfix: move allocation of ref_state to parin.f90 and read_var_list.f90
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! allocate and set ref_state to be used in buoyancy terms
+!
+! 1171 2013-05-30 11:27:45Z raasch
+! diss array is allocated with full size if accelerator boards are used
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! -bc_lr_dirneu, bc_lr_neudir, bc_ns_dirneu, bc_ns_neudir
+!
+! 1153 2013-05-10 14:33:08Z raasch
+! diss array is allocated with dummy elements even if it is not needed
+! (required by PGI 13.4 / CUDA 5.0)
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! unused variables removed
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! openACC directive modified
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! openACC directives added for pres
+! array diss allocated only if required
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! allocation of diss (dissipation rate) in case of turbulence = .TRUE. added
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! allocation and initialisation of necessary data arrays for the two-moment 
+! cloud physics scheme the two new prognostic equations (nr, qr):
+! +dr, lambda_r, mu_r, sed_*, xr, *s, *sws, *swst, *, *_p, t*_m, *_1, *_2, *_3, 
+! +tend_*, prr
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1032 2012-10-21 13:03:21Z letzel
+! save memory by not allocating pt_2 in case of neutral = .T.
+!
+! 1025 2012-10-07 16:04:41Z letzel
+! bugfix: swap indices of mask for ghost boundaries
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! mask is set to zero for ghost boundaries
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! nxra,nyna, nzta replaced ny nxr, nyn, nzt
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog scheme removed
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+!
+! 978 2012-08-09 08:28:32Z fricke
+! outflow damping layer removed
+! roughness length for scalar quantites z0h added
+! damping zone for the potential temperatur in case of non-cyclic lateral
+! boundaries added
+! initialization of ptdf_x, ptdf_y
+! initialization of c_u_m, c_u_m_l, c_v_m, c_v_m_l, c_w_m, c_w_m_l
+!
+! 849 2012-03-15 10:35:09Z raasch
+! init_particles renamed lpm_init
+!
+! 825 2012-02-19 03:03:44Z raasch
+! wang_collision_kernel renamed wang_kernel
+!
+! Revision 1.1  1998/03/09 16:22:22  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Allocation of arrays and initialization of the 3D model via
+!> a) pre-run the 1D model
+!> or
+!> b) pre-set constant linear profiles
+!> or
+!> c) read values of a previous run
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_3d_model
+
+
+    USE advec_ws
+
+    USE arrays_3d
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, g, l_v, pi, r_d, exner_function, exner_function_invers,    &
+               ideal_gas_law_rho, ideal_gas_law_rho_pt, barometric_formula
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_init, biom_init_arrays
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_init, bcm_init_arrays
+
+    USE chem_emissions_mod,                                                    &
+        ONLY:  chem_emissions_init
+
+    USE chem_modules,                                                          &
+        ONLY:  do_emis, max_pr_cs, nspec_out
+
+    USE control_parameters
+
+    USE flight_mod,                                                            &
+        ONLY:  flight_init
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy, ddx2_mg, ddy2_mg
+
+    USE gust_mod,                                                              &
+        ONLY:  gust_init, gust_init_arrays, gust_module_enabled
+
+    USE indices
+
+    USE indoor_model_mod,                                                      &
+        ONLY:  im_init
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_init, lsm_init_arrays
+
+    USE lpm_init_mod,                                                          &
+        ONLY:  lpm_init
+  
+    USE lsf_nudging_mod,                                                       &
+        ONLY:  lsf_init, ls_forcing_surf, nudge_init
+
+    USE model_1d_mod,                                                          &
+        ONLY:  init_1d_model, l1d, u1d, v1d
+
+    USE multi_agent_system_mod,                                                &
+        ONLY:  agents_active, mas_init
+
+    USE netcdf_interface,                                                      &
+        ONLY:  dots_max, dots_num, dots_unit, dots_label
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  chem_emis, chem_emis_att, init_3d,                              &
+               netcdf_data_input_init_3d, netcdf_data_input_interpolate
+
+    USE nesting_offl_mod,                                                      &
+        ONLY:  nesting_offl_init
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_init, ocean_init_arrays
+
+    USE particle_attributes,                                                   &
+        ONLY:  particle_advection
+
+    USE pegrid
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pcm_init
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  average_radiation,                                              &
+               radiation_init, radiation, radiation_scheme,                    &
+               radiation_calc_svf, radiation_write_svf,                        &
+               radiation_interaction, radiation_interactions,                  &
+               radiation_interaction_init, radiation_read_svf,                 &
+               radiation_presimulate_solar_pos, radiation_interactions_on
+    
+    USE random_function_mod 
+    
+    USE random_generator_parallel,                                             &
+        ONLY:  init_parallel_random_generator
+        
+    USE read_restart_data_mod,                                                 &
+        ONLY:  rrd_read_parts_of_global, rrd_local    
+             
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_init, salsa_init_arrays      
+    
+    USE statistics,                                                            &
+        ONLY:  hom, hom_sum, mean_surface_level_height, pr_palm, rmask,        &
+               statistic_regions, sums, sums_divnew_l, sums_divold_l, sums_l,  &
+               sums_l_l, sums_wsts_bc_l, ts_value,                             &
+               weight_pres, weight_substep
+
+    USE synthetic_turbulence_generator_mod,                                    &
+        ONLY:  parametrize_inflow_turbulence, stg_adjust, stg_init,            &
+               use_syn_turb_gen
+               
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  init_surface_layer_fluxes
+
+    USE surface_mod,                                                           &
+        ONLY :  init_surface_arrays, init_surfaces, surf_def_h, surf_lsm_h,    &
+                surf_usm_h, get_topography_top_index_ji, vertical_surfaces_exist
+   
+    USE surface_output_mod,                                                    &
+        ONLY:  surface_output_init
+   
+    USE transpose_indices
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_init_arrays, tcm_init
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_init_urban_surface, usm_allocate_surface
+
+    USE uv_exposure_model_mod,                                                 &
+        ONLY:  uvem_init, uvem_init_arrays
+        
+    USE virtual_measurement_mod,                                               &
+        ONLY:  vm_init
+
+    USE wind_turbine_model_mod,                                                &
+        ONLY:  wtm_init, wtm_init_arrays
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i             !<
+    INTEGER(iwp) ::  ind_array(1)  !<
+    INTEGER(iwp) ::  j             !<
+    INTEGER(iwp) ::  k             !<
+    INTEGER(iwp) ::  k_surf        !< surface level index
+    INTEGER(iwp) ::  m             !< index of surface element in surface data type
+    INTEGER(iwp) ::  sr            !< index of statistic region
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE   ::  ngp_2dh_l  !<
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer_l    !<
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_s_inner_l  !<
+
+    REAL(wp)     ::  t_surface !< air temperature at the surface
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  init_l        !< dummy array used for averaging 3D data to obtain inital profiles 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  p_hydrostatic !< hydrostatic pressure
+
+    INTEGER(iwp) ::  l       !< loop variable
+    INTEGER(iwp) ::  nzt_l   !< index of top PE boundary for multigrid level
+    REAL(wp) ::  dx_l !< grid spacing along x on different multigrid level
+    REAL(wp) ::  dy_l !< grid spacing along y on different multigrid level
+
+    REAL(wp), DIMENSION(1:3) ::  volume_flow_area_l     !<
+    REAL(wp), DIMENSION(1:3) ::  volume_flow_initial_l  !<
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  mean_surface_level_height_l    !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ngp_3d_inner_l    !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ngp_3d_inner_tmp  !<
+
+    INTEGER(iwp) ::  nz_u_shift   !< 
+    INTEGER(iwp) ::  nz_v_shift   !<
+    INTEGER(iwp) ::  nz_w_shift   !<
+    INTEGER(iwp) ::  nz_s_shift   !<
+    INTEGER(iwp) ::  nz_u_shift_l !<
+    INTEGER(iwp) ::  nz_v_shift_l !<
+    INTEGER(iwp) ::  nz_w_shift_l !<
+    INTEGER(iwp) ::  nz_s_shift_l !< 
+
+    CALL location_message( 'allocating arrays', .FALSE. )
+!
+!-- Allocate arrays
+    ALLOCATE( mean_surface_level_height(0:statistic_regions),                  &
+              mean_surface_level_height_l(0:statistic_regions),                &
+              ngp_2dh(0:statistic_regions), ngp_2dh_l(0:statistic_regions),    &
+              ngp_3d(0:statistic_regions),                                     &
+              ngp_3d_inner(0:statistic_regions),                               &
+              ngp_3d_inner_l(0:statistic_regions),                             &
+              ngp_3d_inner_tmp(0:statistic_regions),                           &
+              sums_divnew_l(0:statistic_regions),                              &
+              sums_divold_l(0:statistic_regions) )
+    ALLOCATE( dp_smooth_factor(nzb:nzt), rdf(nzb+1:nzt), rdf_sc(nzb+1:nzt) )
+    ALLOCATE( ngp_2dh_outer(nzb:nzt+1,0:statistic_regions),                    &
+              ngp_2dh_outer_l(nzb:nzt+1,0:statistic_regions),                  &
+              ngp_2dh_s_inner(nzb:nzt+1,0:statistic_regions),                  &
+              ngp_2dh_s_inner_l(nzb:nzt+1,0:statistic_regions),                &
+              rmask(nysg:nyng,nxlg:nxrg,0:statistic_regions),                  &
+              sums(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs),                   &
+              sums_l(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs,0:threads_per_task-1),      &
+              sums_l_l(nzb:nzt+1,0:statistic_regions,0:threads_per_task-1),    &
+              sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions),                   &
+              ts_value(dots_max,0:statistic_regions) )
+    ALLOCATE( ptdf_x(nxlg:nxrg), ptdf_y(nysg:nyng) )
+
+    ALLOCATE( d(nzb+1:nzt,nys:nyn,nxl:nxr),                                    &
+              p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                                &
+              tend(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+#if defined( __nopointer )
+    ALLOCATE( pt(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                               &
+              pt_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              u(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                                &
+              u_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              v(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                                &
+              v_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              w(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                                &
+              w_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              tpt_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                            &
+              tu_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              tv_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              tw_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+    ALLOCATE( pt_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              pt_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              u_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              u_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              u_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              v_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              v_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              v_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              w_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              w_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                              &
+              w_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    IF (  .NOT.  neutral )  THEN
+       ALLOCATE( pt_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ENDIF
+#endif
+
+!
+!-- Following array is required for perturbation pressure within the iterative
+!-- pressure solvers. For the multistep schemes (Runge-Kutta), array p holds
+!-- the weighted average of the substeps and cannot be used in the Poisson
+!-- solver.
+    IF ( psolver == 'sor' )  THEN
+       ALLOCATE( p_loc(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
+!
+!--    For performance reasons, multigrid is using one ghost layer only
+       ALLOCATE( p_loc(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
+    ENDIF
+
+!
+!-- Array for storing constant coeffficients of the tridiagonal solver
+    IF ( psolver == 'poisfft' )  THEN
+       ALLOCATE( tri(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1,2) )
+       ALLOCATE( tric(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1) )
+    ENDIF
+
+    IF ( humidity )  THEN
+!
+!--    3D-humidity
+#if defined( __nopointer )
+       ALLOCATE( q(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+                 q_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 tq_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                          &
+                 vpt(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+       ALLOCATE( q_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 q_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 q_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 vpt_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 
+#endif
+
+       IF ( cloud_droplets )  THEN
+!
+!--       Liquid water content, change in liquid water content
+#if defined( __nopointer )
+          ALLOCATE ( ql(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                        &
+                     ql_c(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+          ALLOCATE ( ql_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                     ql_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+!
+!--       Real volume of particles (with weighting), volume of particles
+          ALLOCATE ( ql_v(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                     ql_vp(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ENDIF
+
+    ENDIF   
+    
+    IF ( passive_scalar )  THEN
+
+!
+!--    3D scalar arrays
+#if defined( __nopointer )
+       ALLOCATE( s(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+                 s_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 ts_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+       ALLOCATE( s_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 s_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+                 s_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+    ENDIF
+
+!
+!-- Allocate and set 1d-profiles for Stokes drift velocity. It may be set to
+!-- non-zero values later in ocean_init
+    ALLOCATE( u_stokes_zu(nzb:nzt+1), u_stokes_zw(nzb:nzt+1),                  &
+              v_stokes_zu(nzb:nzt+1), v_stokes_zw(nzb:nzt+1) )
+    u_stokes_zu(:) = 0.0_wp
+    u_stokes_zw(:) = 0.0_wp
+    v_stokes_zu(:) = 0.0_wp
+    v_stokes_zw(:) = 0.0_wp
+
+!
+!-- Allocation of anelastic and Boussinesq approximation specific arrays
+    ALLOCATE( p_hydrostatic(nzb:nzt+1) )
+    ALLOCATE( rho_air(nzb:nzt+1) )
+    ALLOCATE( rho_air_zw(nzb:nzt+1) )
+    ALLOCATE( drho_air(nzb:nzt+1) )
+    ALLOCATE( drho_air_zw(nzb:nzt+1) )
+!
+!-- Density profile calculation for anelastic approximation
+    t_surface = pt_surface * ( surface_pressure / 1000.0_wp )**( r_d / c_p )
+    IF ( TRIM( approximation ) == 'anelastic' ) THEN
+       DO  k = nzb, nzt+1
+          p_hydrostatic(k)    = surface_pressure * 100.0_wp *                  &
+                                ( 1 - ( g * zu(k) ) / ( c_p * t_surface )      &
+                                )**( c_p / r_d )
+          rho_air(k)          = ( p_hydrostatic(k) *                           &
+                                  ( 100000.0_wp / p_hydrostatic(k)             &
+                                  )**( r_d / c_p )                             &
+                                ) / ( r_d * pt_init(k) )
+       ENDDO
+       DO  k = nzb, nzt
+          rho_air_zw(k) = 0.5_wp * ( rho_air(k) + rho_air(k+1) )
+       ENDDO
+       rho_air_zw(nzt+1)  = rho_air_zw(nzt)                                    &
+                            + 2.0_wp * ( rho_air(nzt+1) - rho_air_zw(nzt)  )
+    ELSE
+       DO  k = nzb, nzt+1
+          p_hydrostatic(k)    = surface_pressure * 100.0_wp *                  &
+                                ( 1 - ( g * zu(nzb) ) / ( c_p * t_surface )    &
+                                )**( c_p / r_d )
+          rho_air(k)          = ( p_hydrostatic(k) *                           &
+                                  ( 100000.0_wp / p_hydrostatic(k)             &
+                                  )**( r_d / c_p )                             &
+                                ) / ( r_d * pt_init(nzb) )
+       ENDDO
+       DO  k = nzb, nzt
+          rho_air_zw(k) = 0.5_wp * ( rho_air(k) + rho_air(k+1) )
+       ENDDO
+       rho_air_zw(nzt+1)  = rho_air_zw(nzt)                                    &
+                            + 2.0_wp * ( rho_air(nzt+1) - rho_air_zw(nzt)  )
+    ENDIF
+!
+!-- compute the inverse density array in order to avoid expencive divisions
+    drho_air    = 1.0_wp / rho_air
+    drho_air_zw = 1.0_wp / rho_air_zw
+
+!
+!-- Allocation of flux conversion arrays
+    ALLOCATE( heatflux_input_conversion(nzb:nzt+1) )
+    ALLOCATE( waterflux_input_conversion(nzb:nzt+1) )
+    ALLOCATE( momentumflux_input_conversion(nzb:nzt+1) )
+    ALLOCATE( heatflux_output_conversion(nzb:nzt+1) )
+    ALLOCATE( waterflux_output_conversion(nzb:nzt+1) )
+    ALLOCATE( momentumflux_output_conversion(nzb:nzt+1) )
+
+!
+!-- calculate flux conversion factors according to approximation and in-/output mode
+    DO  k = nzb, nzt+1
+
+        IF ( TRIM( flux_input_mode ) == 'kinematic' )  THEN
+            heatflux_input_conversion(k)      = rho_air_zw(k)
+            waterflux_input_conversion(k)     = rho_air_zw(k)
+            momentumflux_input_conversion(k)  = rho_air_zw(k)
+        ELSEIF ( TRIM( flux_input_mode ) == 'dynamic' ) THEN
+            heatflux_input_conversion(k)      = 1.0_wp / c_p
+            waterflux_input_conversion(k)     = 1.0_wp / l_v
+            momentumflux_input_conversion(k)  = 1.0_wp
+        ENDIF
+
+        IF ( TRIM( flux_output_mode ) == 'kinematic' )  THEN
+            heatflux_output_conversion(k)     = drho_air_zw(k)
+            waterflux_output_conversion(k)    = drho_air_zw(k)
+            momentumflux_output_conversion(k) = drho_air_zw(k)
+        ELSEIF ( TRIM( flux_output_mode ) == 'dynamic' ) THEN
+            heatflux_output_conversion(k)     = c_p
+            waterflux_output_conversion(k)    = l_v
+            momentumflux_output_conversion(k) = 1.0_wp
+        ENDIF
+
+        IF ( .NOT. humidity ) THEN
+            waterflux_input_conversion(k)  = 1.0_wp
+            waterflux_output_conversion(k) = 1.0_wp
+        ENDIF
+
+    ENDDO
+
+!
+!-- In case of multigrid method, compute grid lengths and grid factors for the
+!-- grid levels with respective density on each grid
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+
+       ALLOCATE( ddx2_mg(maximum_grid_level) )
+       ALLOCATE( ddy2_mg(maximum_grid_level) )
+       ALLOCATE( dzu_mg(nzb+1:nzt+1,maximum_grid_level) )
+       ALLOCATE( dzw_mg(nzb+1:nzt+1,maximum_grid_level) )
+       ALLOCATE( f1_mg(nzb+1:nzt,maximum_grid_level) )
+       ALLOCATE( f2_mg(nzb+1:nzt,maximum_grid_level) )
+       ALLOCATE( f3_mg(nzb+1:nzt,maximum_grid_level) )
+       ALLOCATE( rho_air_mg(nzb:nzt+1,maximum_grid_level) )
+       ALLOCATE( rho_air_zw_mg(nzb:nzt+1,maximum_grid_level) )
+
+       dzu_mg(:,maximum_grid_level) = dzu
+       rho_air_mg(:,maximum_grid_level) = rho_air
+!       
+!--    Next line to ensure an equally spaced grid. 
+       dzu_mg(1,maximum_grid_level) = dzu(2)
+       rho_air_mg(nzb,maximum_grid_level) = rho_air(nzb) +                     &
+                                             (rho_air(nzb) - rho_air(nzb+1))
+
+       dzw_mg(:,maximum_grid_level) = dzw
+       rho_air_zw_mg(:,maximum_grid_level) = rho_air_zw
+       nzt_l = nzt
+       DO  l = maximum_grid_level-1, 1, -1
+           dzu_mg(nzb+1,l) = 2.0_wp * dzu_mg(nzb+1,l+1)
+           dzw_mg(nzb+1,l) = 2.0_wp * dzw_mg(nzb+1,l+1)
+           rho_air_mg(nzb,l)    = rho_air_mg(nzb,l+1) + (rho_air_mg(nzb,l+1) - rho_air_mg(nzb+1,l+1))
+           rho_air_zw_mg(nzb,l) = rho_air_zw_mg(nzb,l+1) + (rho_air_zw_mg(nzb,l+1) - rho_air_zw_mg(nzb+1,l+1))
+           rho_air_mg(nzb+1,l)    = rho_air_mg(nzb+1,l+1)
+           rho_air_zw_mg(nzb+1,l) = rho_air_zw_mg(nzb+1,l+1)
+           nzt_l = nzt_l / 2
+           DO  k = 2, nzt_l+1
+              dzu_mg(k,l) = dzu_mg(2*k-2,l+1) + dzu_mg(2*k-1,l+1)
+              dzw_mg(k,l) = dzw_mg(2*k-2,l+1) + dzw_mg(2*k-1,l+1)
+              rho_air_mg(k,l)    = rho_air_mg(2*k-1,l+1)
+              rho_air_zw_mg(k,l) = rho_air_zw_mg(2*k-1,l+1)
+           ENDDO
+       ENDDO
+
+       nzt_l = nzt
+       dx_l  = dx
+       dy_l  = dy
+       DO  l = maximum_grid_level, 1, -1
+          ddx2_mg(l) = 1.0_wp / dx_l**2
+          ddy2_mg(l) = 1.0_wp / dy_l**2
+          DO  k = nzb+1, nzt_l
+             f2_mg(k,l) = rho_air_zw_mg(k,l) / ( dzu_mg(k+1,l) * dzw_mg(k,l) )
+             f3_mg(k,l) = rho_air_zw_mg(k-1,l) / ( dzu_mg(k,l)   * dzw_mg(k,l) )
+             f1_mg(k,l) = 2.0_wp * ( ddx2_mg(l) + ddy2_mg(l) ) &
+                          * rho_air_mg(k,l) + f2_mg(k,l) + f3_mg(k,l)
+          ENDDO
+          nzt_l = nzt_l / 2
+          dx_l  = dx_l * 2.0_wp
+          dy_l  = dy_l * 2.0_wp
+       ENDDO
+
+    ENDIF
+
+!
+!-- 1D-array for large scale subsidence velocity
+    IF ( .NOT. ALLOCATED( w_subs ) )  THEN
+       ALLOCATE ( w_subs(nzb:nzt+1) )
+       w_subs = 0.0_wp
+    ENDIF
+
+!
+!-- Arrays to store velocity data from t-dt and the phase speeds which
+!-- are needed for radiation boundary conditions
+    IF ( bc_radiation_l )  THEN
+       ALLOCATE( u_m_l(nzb:nzt+1,nysg:nyng,1:2),                               &
+                 v_m_l(nzb:nzt+1,nysg:nyng,0:1),                               &
+                 w_m_l(nzb:nzt+1,nysg:nyng,0:1) )
+    ENDIF
+    IF ( bc_radiation_r )  THEN
+       ALLOCATE( u_m_r(nzb:nzt+1,nysg:nyng,nx-1:nx),                           &
+                 v_m_r(nzb:nzt+1,nysg:nyng,nx-1:nx),                           &
+                 w_m_r(nzb:nzt+1,nysg:nyng,nx-1:nx) )
+    ENDIF
+    IF ( bc_radiation_l  .OR.  bc_radiation_r )  THEN
+       ALLOCATE( c_u(nzb:nzt+1,nysg:nyng), c_v(nzb:nzt+1,nysg:nyng),           &
+                 c_w(nzb:nzt+1,nysg:nyng) )
+    ENDIF
+    IF ( bc_radiation_s )  THEN
+       ALLOCATE( u_m_s(nzb:nzt+1,0:1,nxlg:nxrg),                               &
+                 v_m_s(nzb:nzt+1,1:2,nxlg:nxrg),                               &
+                 w_m_s(nzb:nzt+1,0:1,nxlg:nxrg) )
+    ENDIF
+    IF ( bc_radiation_n )  THEN
+       ALLOCATE( u_m_n(nzb:nzt+1,ny-1:ny,nxlg:nxrg),                           &
+                 v_m_n(nzb:nzt+1,ny-1:ny,nxlg:nxrg),                           &
+                 w_m_n(nzb:nzt+1,ny-1:ny,nxlg:nxrg) )
+    ENDIF
+    IF ( bc_radiation_s  .OR.  bc_radiation_n )  THEN
+       ALLOCATE( c_u(nzb:nzt+1,nxlg:nxrg), c_v(nzb:nzt+1,nxlg:nxrg),           &
+                 c_w(nzb:nzt+1,nxlg:nxrg) )
+    ENDIF
+    IF ( bc_radiation_l  .OR.  bc_radiation_r  .OR.  bc_radiation_s  .OR.      &
+         bc_radiation_n )  THEN
+       ALLOCATE( c_u_m_l(nzb:nzt+1), c_v_m_l(nzb:nzt+1), c_w_m_l(nzb:nzt+1) )                   
+       ALLOCATE( c_u_m(nzb:nzt+1), c_v_m(nzb:nzt+1), c_w_m(nzb:nzt+1) )
+    ENDIF
+
+
+#if ! defined( __nopointer )
+!
+!-- Initial assignment of the pointers
+    IF ( .NOT. neutral )  THEN
+       pt => pt_1;  pt_p => pt_2;  tpt_m => pt_3
+    ELSE
+       pt => pt_1;  pt_p => pt_1;  tpt_m => pt_3
+    ENDIF
+    u  => u_1;   u_p  => u_2;   tu_m  => u_3
+    v  => v_1;   v_p  => v_2;   tv_m  => v_3
+    w  => w_1;   w_p  => w_2;   tw_m  => w_3
+
+    IF ( humidity )  THEN
+       q => q_1;  q_p => q_2;  tq_m => q_3
+       vpt  => vpt_1
+       IF ( cloud_droplets )  THEN
+          ql   => ql_1
+          ql_c => ql_2
+       ENDIF
+    ENDIF
+    
+    IF ( passive_scalar )  THEN
+       s => s_1;  s_p => s_2;  ts_m => s_3
+    ENDIF    
+#endif
+
+!
+!-- Initialize arrays for turbulence closure
+    CALL tcm_init_arrays
+!
+!-- Initialize surface arrays
+    CALL init_surface_arrays
+!
+!-- Allocate arrays for other modules
+    IF ( biometeorology      )  CALL biom_init_arrays
+    IF ( bulk_cloud_model    )  CALL bcm_init_arrays
+    IF ( gust_module_enabled )  CALL gust_init_arrays
+    IF ( land_surface        )  CALL lsm_init_arrays
+    IF ( ocean_mode          )  CALL ocean_init_arrays
+    IF ( salsa               )  CALL salsa_init_arrays
+    IF ( wind_turbine        )  CALL wtm_init_arrays
+    IF ( uv_exposure         )  CALL uvem_init_arrays
+
+!
+!-- Initialize virtual flight measurements
+    IF ( virtual_flight )  THEN
+       CALL flight_init
+    ENDIF
+
+!
+!-- Read uv exposure input data
+    IF ( uv_exposure )  THEN
+       CALL uvem_init
+    ENDIF
+
+!
+!-- Allocate arrays containing the RK coefficient for calculation of 
+!-- perturbation pressure and turbulent fluxes. At this point values are
+!-- set for pressure calculation during initialization (where no timestep
+!-- is done). Further below the values needed within the timestep scheme
+!-- will be set.
+    ALLOCATE( weight_substep(1:intermediate_timestep_count_max),               &
+              weight_pres(1:intermediate_timestep_count_max) )
+    weight_substep = 1.0_wp
+    weight_pres    = 1.0_wp
+    intermediate_timestep_count = 0  ! needed when simulated_time = 0.0
+       
+    CALL location_message( 'finished', .TRUE. )
+
+!
+!-- Initialize time series
+    ts_value = 0.0_wp
+
+!
+!-- Initialize local summation arrays for routine flow_statistics.
+!-- This is necessary because they may not yet have been initialized when they
+!-- are called from flow_statistics (or - depending on the chosen model run -
+!-- are never initialized)
+    sums_divnew_l      = 0.0_wp
+    sums_divold_l      = 0.0_wp
+    sums_l_l           = 0.0_wp
+    sums_wsts_bc_l     = 0.0_wp
+    
+!
+!-- Initialize model variables
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+!
+!--    Initialization with provided input data derived from larger-scale model
+       IF ( INDEX( initializing_actions, 'inifor' ) /= 0 )  THEN
+          CALL location_message( 'initializing with INIFOR', .FALSE. )
+!
+!--       Read initial 1D profiles or 3D data from NetCDF file, depending 
+!--       on the provided level-of-detail. 
+!--       At the moment, only u, v, w, pt and q are provided. 
+          CALL netcdf_data_input_init_3d
+!
+!--       Please note, Inifor provides data from nzb+1 to nzt. 
+!--       Bottom and top boundary conditions for Inifor profiles are already 
+!--       set (just after reading), so that this is not necessary here.
+!--       Depending on the provided level-of-detail, initial Inifor data is
+!--       either stored on data type (lod=1), or directly on 3D arrays (lod=2). 
+!--       In order to obtain also initial profiles in case of lod=2 (which 
+!--       is required for e.g. damping), average over 3D data.
+          IF( init_3d%lod_u == 1 )  THEN
+             u_init = init_3d%u_init
+          ELSEIF( init_3d%lod_u == 2 )  THEN 
+             ALLOCATE( init_l(nzb:nzt+1) ) 
+             DO  k = nzb, nzt+1
+                init_l(k) = SUM( u(k,nys:nyn,nxl:nxr) )
+             ENDDO
+             init_l = init_l / REAL( ( nx + 1 ) * ( ny + 1 ), KIND = wp )
+
+#if defined( __parallel )
+             CALL MPI_ALLREDUCE( init_l, u_init, nzt+1-nzb+1,                  &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+             u_init = init_l
+#endif
+             DEALLOCATE( init_l )
+
+          ENDIF
+           
+          IF( init_3d%lod_v == 1 )  THEN  
+             v_init = init_3d%v_init
+          ELSEIF( init_3d%lod_v == 2 )  THEN 
+             ALLOCATE( init_l(nzb:nzt+1) ) 
+             DO  k = nzb, nzt+1
+                init_l(k) = SUM( v(k,nys:nyn,nxl:nxr) )
+             ENDDO
+             init_l = init_l / REAL( ( nx + 1 ) * ( ny + 1 ), KIND = wp )
+
+#if defined( __parallel )
+             CALL MPI_ALLREDUCE( init_l, v_init, nzt+1-nzb+1,                  &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+             v_init = init_l
+#endif
+             DEALLOCATE( init_l )
+          ENDIF
+          IF( .NOT. neutral )  THEN
+             IF( init_3d%lod_pt == 1 )  THEN
+                pt_init = init_3d%pt_init
+             ELSEIF( init_3d%lod_pt == 2 )  THEN 
+                ALLOCATE( init_l(nzb:nzt+1) ) 
+                DO  k = nzb, nzt+1
+                   init_l(k) = SUM( pt(k,nys:nyn,nxl:nxr) )
+                ENDDO
+                init_l = init_l / REAL( ( nx + 1 ) * ( ny + 1 ), KIND = wp )
+
+#if defined( __parallel )
+                CALL MPI_ALLREDUCE( init_l, pt_init, nzt+1-nzb+1,               &
+                                    MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+                pt_init = init_l
+#endif
+                DEALLOCATE( init_l )
+             ENDIF
+          ENDIF
+
+
+          IF( humidity )  THEN
+             IF( init_3d%lod_q == 1 )  THEN
+                q_init = init_3d%q_init
+             ELSEIF( init_3d%lod_q == 2 )  THEN 
+                ALLOCATE( init_l(nzb:nzt+1) ) 
+                DO  k = nzb, nzt+1
+                   init_l(k) = SUM( q(k,nys:nyn,nxl:nxr) )
+                ENDDO
+                init_l = init_l / REAL( ( nx + 1 ) * ( ny + 1 ), KIND = wp )
+
+#if defined( __parallel )
+                CALL MPI_ALLREDUCE( init_l, q_init, nzt+1-nzb+1,               &
+                                    MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+                q_init = init_l
+#endif
+                DEALLOCATE( init_l )
+             ENDIF
+          ENDIF
+
+!
+!--       Write initial profiles onto 3D arrays. Note, only in case of lod = 1, 
+!--       for lod = 2 data is already on 3D arrays.   
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                IF( init_3d%lod_u == 1 )  u(:,j,i) = u_init(:)
+                IF( init_3d%lod_v == 1 )  v(:,j,i) = v_init(:)
+                IF( .NOT. neutral  .AND.  init_3d%lod_pt == 1 )                &
+                   pt(:,j,i) = pt_init(:)
+                IF( humidity  .AND.  init_3d%lod_q == 1 )  q(:,j,i) = q_init(:)
+             ENDDO
+          ENDDO
+!
+!--       Exchange ghost points in case of level-of-detail = 2
+          IF( init_3d%lod_u == 2 )   CALL exchange_horiz( u, nbgp )
+          IF( init_3d%lod_v == 2 )   CALL exchange_horiz( v, nbgp )
+          IF( init_3d%lod_w == 2 )   CALL exchange_horiz( w, nbgp )
+          IF( .NOT. neutral  .AND.  init_3d%lod_pt == 2 )                      &
+             CALL exchange_horiz( pt, nbgp )
+          IF( humidity  .AND.  init_3d%lod_q == 2 )                            &
+             CALL exchange_horiz( q, nbgp )
+!
+!--       Set geostrophic wind components.  
+          IF ( init_3d%from_file_ug )  THEN
+             ug(:) = init_3d%ug_init(:)
+          ENDIF
+          IF ( init_3d%from_file_vg )  THEN
+             vg(:) = init_3d%vg_init(:)
+          ENDIF
+!
+!--       Set bottom and top boundary condition for geostrophic wind
+          ug(nzt+1) = ug(nzt)
+          vg(nzt+1) = vg(nzt)
+          ug(nzb)   = ug(nzb+1)
+          vg(nzb)   = vg(nzb+1)
+!
+!--       Set inital w to 0
+          w = 0.0_wp
+
+          IF ( passive_scalar )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   s(:,j,i) = s_init
+                ENDDO
+             ENDDO
+          ENDIF
+
+!
+!--       Set velocity components at non-atmospheric / oceanic grid points to 
+!--       zero. 
+          u = MERGE( u, 0.0_wp, BTEST( wall_flags_0, 1 ) )
+          v = MERGE( v, 0.0_wp, BTEST( wall_flags_0, 2 ) )
+          w = MERGE( w, 0.0_wp, BTEST( wall_flags_0, 3 ) )
+!
+!--       Initialize surface variables, e.g. friction velocity, momentum 
+!--       fluxes, etc. 
+          CALL init_surfaces
+!
+!--       Initialize turbulence generator
+          IF( use_syn_turb_gen )  CALL stg_init
+
+          CALL location_message( 'finished', .TRUE. )
+!
+!--    Initialization via computed 1D-model profiles
+       ELSEIF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+
+          CALL location_message( 'initializing with 1D model profiles', .FALSE. )
+!
+!--       Use solutions of the 1D model as initial profiles,
+!--       start 1D model
+          CALL init_1d_model
+!
+!--       Transfer initial profiles to the arrays of the 3D model
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                pt(:,j,i) = pt_init
+                u(:,j,i)  = u1d
+                v(:,j,i)  = v1d
+             ENDDO
+          ENDDO
+
+          IF ( humidity )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   q(:,j,i) = q_init
+                ENDDO
+             ENDDO
+          ENDIF
+
+          IF ( passive_scalar )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   s(:,j,i) = s_init
+                ENDDO
+             ENDDO   
+          ENDIF
+!
+!--          Store initial profiles for output purposes etc.
+          IF ( .NOT. constant_diffusion )  THEN
+             hom(:,1,25,:) = SPREAD( l1d, 2, statistic_regions+1 )
+          ENDIF
+!
+!--       Set velocities back to zero
+          u = MERGE( u, 0.0_wp, BTEST( wall_flags_0, 1 ) )
+          v = MERGE( v, 0.0_wp, BTEST( wall_flags_0, 2 ) )         
+!
+!--       WARNING: The extra boundary conditions set after running the
+!--       -------  1D model impose an error on the divergence one layer
+!--                below the topography; need to correct later 
+!--       ATTENTION: Provisional correction for Piacsek & Williams
+!--       ---------  advection scheme: keep u and v zero one layer below
+!--                  the topography.
+          IF ( ibc_uv_b == 1 )  THEN
+!
+!--          Neumann condition
+             DO  i = nxl-1, nxr+1
+                DO  j = nys-1, nyn+1
+                   u(nzb,j,i) = u(nzb+1,j,i)
+                   v(nzb,j,i) = v(nzb+1,j,i)
+                ENDDO
+             ENDDO
+
+          ENDIF
+!
+!--       Initialize surface variables, e.g. friction velocity, momentum 
+!--       fluxes, etc. 
+          CALL init_surfaces
+
+          CALL location_message( 'finished', .TRUE. )
+
+       ELSEIF ( INDEX(initializing_actions, 'set_constant_profiles') /= 0 )    &
+       THEN
+
+          CALL location_message( 'initializing with constant profiles', .FALSE. )
+!
+!--       Overwrite initial profiles in case of synthetic turbulence generator
+          IF( use_syn_turb_gen )  CALL stg_init
+
+!
+!--       Use constructed initial profiles (velocity constant with height,
+!--       temperature profile with constant gradient)
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                pt(:,j,i) = pt_init
+                u(:,j,i)  = u_init
+                v(:,j,i)  = v_init
+             ENDDO
+          ENDDO
+!
+!--       Mask topography
+          u = MERGE( u, 0.0_wp, BTEST( wall_flags_0, 1 ) )
+          v = MERGE( v, 0.0_wp, BTEST( wall_flags_0, 2 ) )
+!
+!--       Set initial horizontal velocities at the lowest computational grid 
+!--       levels to zero in order to avoid too small time steps caused by the 
+!--       diffusion limit in the initial phase of a run (at k=1, dz/2 occurs
+!--       in the limiting formula!). 
+!--       Please note, in case land- or urban-surface model is used and a 
+!--       spinup is applied, masking the lowest computational level is not 
+!--       possible as MOST as well as energy-balance parametrizations will not 
+!--       work with zero wind velocity. 
+          IF ( ibc_uv_b /= 1  .AND.  .NOT.  spinup )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt
+                      u(k,j,i) = MERGE( u(k,j,i), 0.0_wp,                      &
+                                        BTEST( wall_flags_0(k,j,i), 20 ) )
+                      v(k,j,i) = MERGE( v(k,j,i), 0.0_wp,                      &
+                                        BTEST( wall_flags_0(k,j,i), 21 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+          IF ( humidity )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   q(:,j,i) = q_init
+                ENDDO
+             ENDDO
+          ENDIF
+          
+          IF ( passive_scalar )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   s(:,j,i) = s_init
+                ENDDO
+             ENDDO
+          ENDIF
+
+!
+!--       Compute initial temperature field and other constants used in case
+!--       of a sloping surface
+          IF ( sloping_surface )  CALL init_slope
+!
+!--       Initialize surface variables, e.g. friction velocity, momentum 
+!--       fluxes, etc. 
+          CALL init_surfaces
+
+          CALL location_message( 'finished', .TRUE. )
+
+       ELSEIF ( INDEX(initializing_actions, 'by_user') /= 0 )                  &
+       THEN
+
+          CALL location_message( 'initializing by user', .FALSE. )
+!
+!--       Pre-initialize surface variables, i.e. setting start- and end-indices
+!--       at each (j,i)-location. Please note, this does not supersede 
+!--       user-defined initialization of surface quantities. 
+          CALL init_surfaces
+!
+!--       Initialization will completely be done by the user
+          CALL user_init_3d_model
+
+          CALL location_message( 'finished', .TRUE. )
+
+       ENDIF
+
+       CALL location_message( 'initializing statistics, boundary conditions, etc.', &
+                              .FALSE. )
+
+!
+!--    Bottom boundary
+       IF ( ibc_uv_b == 0 .OR. ibc_uv_b == 2  )  THEN
+          u(nzb,:,:) = 0.0_wp
+          v(nzb,:,:) = 0.0_wp
+       ENDIF
+
+!
+!--    Apply channel flow boundary condition
+       IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
+          u(nzt+1,:,:) = 0.0_wp
+          v(nzt+1,:,:) = 0.0_wp
+       ENDIF
+
+!
+!--    Calculate virtual potential temperature
+       IF ( humidity )  vpt = pt * ( 1.0_wp + 0.61_wp * q )
+
+!
+!--    Store initial profiles for output purposes etc.. Please note, in case of 
+!--    initialization of u, v, w, pt, and q via output data derived from larger 
+!--    scale models, data will not be horizontally homogeneous. Actually, a mean 
+!--    profile should be calculated before.   
+       hom(:,1,5,:) = SPREAD( u(:,nys,nxl), 2, statistic_regions+1 )
+       hom(:,1,6,:) = SPREAD( v(:,nys,nxl), 2, statistic_regions+1 )
+       IF ( ibc_uv_b == 0 .OR. ibc_uv_b == 2)  THEN
+          hom(nzb,1,5,:) = 0.0_wp
+          hom(nzb,1,6,:) = 0.0_wp
+       ENDIF
+       hom(:,1,7,:)  = SPREAD( pt(:,nys,nxl), 2, statistic_regions+1 )
+
+       IF ( humidity )  THEN
+!
+!--       Store initial profile of total water content, virtual potential
+!--       temperature 
+          hom(:,1,26,:) = SPREAD(   q(:,nys,nxl), 2, statistic_regions+1 )
+          hom(:,1,29,:) = SPREAD( vpt(:,nys,nxl), 2, statistic_regions+1 )
+!
+!--       Store initial profile of mixing ratio and potential
+!--       temperature
+          IF ( bulk_cloud_model  .OR.  cloud_droplets ) THEN
+             hom(:,1,27,:) = SPREAD(  q(:,nys,nxl), 2, statistic_regions+1 )
+             hom(:,1,28,:) = SPREAD( pt(:,nys,nxl), 2, statistic_regions+1 )
+          ENDIF
+       ENDIF
+
+!
+!--    Store initial scalar profile
+       IF ( passive_scalar )  THEN
+          hom(:,1,121,:) = SPREAD(  s(:,nys,nxl), 2, statistic_regions+1 )
+       ENDIF
+
+!
+!--    Initialize the random number generators (from numerical recipes)
+       CALL random_function_ini
+       
+       IF ( random_generator == 'random-parallel' )  THEN
+          CALL init_parallel_random_generator( nx, nys, nyn, nxl, nxr )
+       ENDIF
+!
+!--    Set the reference state to be used in the buoyancy terms (for ocean runs
+!--    the reference state will be set (overwritten) in init_ocean)
+       IF ( use_single_reference_value )  THEN
+          IF (  .NOT.  humidity )  THEN
+             ref_state(:) = pt_reference
+          ELSE
+             ref_state(:) = vpt_reference
+          ENDIF
+       ELSE
+          IF (  .NOT.  humidity )  THEN
+             ref_state(:) = pt_init(:)
+          ELSE
+             ref_state(:) = vpt(:,nys,nxl)
+          ENDIF
+       ENDIF
+
+!
+!--    For the moment, vertical velocity is zero
+       w = 0.0_wp
+
+!
+!--    Initialize array sums (must be defined in first call of pres)
+       sums = 0.0_wp
+
+!
+!--    In case of iterative solvers, p must get an initial value
+       IF ( psolver(1:9) == 'multigrid'  .OR.  psolver == 'sor' )  p = 0.0_wp
+!
+!--    Impose vortex with vertical axis on the initial velocity profile
+       IF ( INDEX( initializing_actions, 'initialize_vortex' ) /= 0 )  THEN
+          CALL init_rankine
+       ENDIF
+
+!
+!--    Impose temperature anomaly (advection test only) or warm air bubble 
+!--    close to surface
+       IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0  .OR.  &
+            INDEX( initializing_actions, 'initialize_bubble' ) /= 0  )  THEN
+          CALL init_pt_anomaly
+       ENDIF
+       
+!
+!--    If required, change the surface temperature at the start of the 3D run
+       IF ( pt_surface_initial_change /= 0.0_wp )  THEN
+          pt(nzb,:,:) = pt(nzb,:,:) + pt_surface_initial_change
+       ENDIF
+
+!
+!--    If required, change the surface humidity/scalar at the start of the 3D
+!--    run
+       IF ( humidity  .AND.  q_surface_initial_change /= 0.0_wp )              &
+          q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change
+          
+       IF ( passive_scalar .AND.  s_surface_initial_change /= 0.0_wp )         &
+          s(nzb,:,:) = s(nzb,:,:) + s_surface_initial_change
+        
+
+!
+!--    Initialize old and new time levels.
+       tpt_m = 0.0_wp; tu_m = 0.0_wp; tv_m = 0.0_wp; tw_m = 0.0_wp
+       pt_p = pt; u_p = u; v_p = v; w_p = w
+
+       IF ( humidity  )  THEN
+          tq_m = 0.0_wp
+          q_p = q
+       ENDIF
+       
+       IF ( passive_scalar )  THEN
+          ts_m = 0.0_wp
+          s_p  = s
+       ENDIF       
+
+       CALL location_message( 'finished', .TRUE. )
+
+    ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data'  .OR.         &
+             TRIM( initializing_actions ) == 'cyclic_fill' )                   &
+    THEN
+
+       CALL location_message( 'initializing in case of restart / cyclic_fill', &
+                              .FALSE. )
+!
+!--    Initialize surface elements and its attributes, e.g. heat- and 
+!--    momentumfluxes, roughness, scaling parameters. As number of surface 
+!--    elements might be different between runs, e.g. in case of cyclic fill, 
+!--    and not all surface elements are read, surface elements need to be 
+!--    initialized before.     
+       CALL init_surfaces
+!
+!--    When reading data for cyclic fill of 3D prerun data files, read
+!--    some of the global variables from the restart file which are required
+!--    for initializing the inflow
+       IF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+
+          DO  i = 0, io_blocks-1
+             IF ( i == io_group )  THEN
+                CALL rrd_read_parts_of_global
+             ENDIF
+#if defined( __parallel )
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+          ENDDO
+
+       ENDIF
+
+!
+!--    Read processor specific binary data from restart file
+       DO  i = 0, io_blocks-1
+          IF ( i == io_group )  THEN
+             CALL rrd_local
+          ENDIF
+#if defined( __parallel )
+          CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       ENDDO
+
+!
+!--    In case of complex terrain and cyclic fill method as initialization,
+!--    shift initial data in the vertical direction for each point in the 
+!--    x-y-plane depending on local surface height
+       IF ( complex_terrain  .AND.                                             &
+            TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                nz_u_shift = get_topography_top_index_ji( j, i, 'u' )
+                nz_v_shift = get_topography_top_index_ji( j, i, 'v' )
+                nz_w_shift = get_topography_top_index_ji( j, i, 'w' )
+                nz_s_shift = get_topography_top_index_ji( j, i, 's' )
+
+                u(nz_u_shift:nzt+1,j,i)  = u(0:nzt+1-nz_u_shift,j,i)                
+
+                v(nz_v_shift:nzt+1,j,i)  = v(0:nzt+1-nz_v_shift,j,i)
+
+                w(nz_w_shift:nzt+1,j,i)  = w(0:nzt+1-nz_w_shift,j,i)
+
+                p(nz_s_shift:nzt+1,j,i)  =  p(0:nzt+1-nz_s_shift,j,i)
+                pt(nz_s_shift:nzt+1,j,i) = pt(0:nzt+1-nz_s_shift,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    Initialization of the turbulence recycling method
+       IF ( TRIM( initializing_actions ) == 'cyclic_fill'  .AND.               &
+            turbulent_inflow )  THEN
+!
+!--       First store the profiles to be used at the inflow.
+!--       These profiles are the (temporally) and horizontally averaged vertical
+!--       profiles from the prerun. Alternatively, prescribed profiles
+!--       for u,v-components can be used.
+          ALLOCATE( mean_inflow_profiles(nzb:nzt+1,1:num_mean_inflow_profiles) )
+
+          IF ( use_prescribed_profile_data )  THEN
+             mean_inflow_profiles(:,1) = u_init            ! u
+             mean_inflow_profiles(:,2) = v_init            ! v
+          ELSE
+             mean_inflow_profiles(:,1) = hom_sum(:,1,0)    ! u
+             mean_inflow_profiles(:,2) = hom_sum(:,2,0)    ! v
+          ENDIF
+          mean_inflow_profiles(:,4) = hom_sum(:,4,0)       ! pt
+          IF ( humidity )                                                      &
+             mean_inflow_profiles(:,6) = hom_sum(:,41,0)   ! q
+          IF ( passive_scalar )                                                &
+             mean_inflow_profiles(:,7) = hom_sum(:,115,0)   ! s
+!
+!--       In case of complex terrain, determine vertical displacement at inflow 
+!--       boundary and adjust mean inflow profiles
+          IF ( complex_terrain )  THEN
+             IF ( nxlg <= 0 .AND. nxrg >= 0 .AND. nysg <= 0 .AND. nyng >= 0 )  THEN
+                nz_u_shift_l = get_topography_top_index_ji( 0, 0, 'u' )
+                nz_v_shift_l = get_topography_top_index_ji( 0, 0, 'v' )
+                nz_w_shift_l = get_topography_top_index_ji( 0, 0, 'w' )
+                nz_s_shift_l = get_topography_top_index_ji( 0, 0, 's' )
+             ELSE
+                nz_u_shift_l = 0
+                nz_v_shift_l = 0
+                nz_w_shift_l = 0
+                nz_s_shift_l = 0
+             ENDIF
+
+#if defined( __parallel )
+             CALL MPI_ALLREDUCE(nz_u_shift_l, nz_u_shift, 1, MPI_INTEGER,      &
+                                MPI_MAX, comm2d, ierr)
+             CALL MPI_ALLREDUCE(nz_v_shift_l, nz_v_shift, 1, MPI_INTEGER,      &
+                                MPI_MAX, comm2d, ierr)
+             CALL MPI_ALLREDUCE(nz_w_shift_l, nz_w_shift, 1, MPI_INTEGER,      & 
+                                MPI_MAX, comm2d, ierr)
+             CALL MPI_ALLREDUCE(nz_s_shift_l, nz_s_shift, 1, MPI_INTEGER,      &
+                                MPI_MAX, comm2d, ierr)
+#else
+             nz_u_shift = nz_u_shift_l
+             nz_v_shift = nz_v_shift_l
+             nz_w_shift = nz_w_shift_l
+             nz_s_shift = nz_s_shift_l
+#endif
+
+             mean_inflow_profiles(:,1) = 0.0_wp
+             mean_inflow_profiles(nz_u_shift:nzt+1,1) = hom_sum(0:nzt+1-nz_u_shift,1,0)  ! u
+
+             mean_inflow_profiles(:,2) = 0.0_wp
+             mean_inflow_profiles(nz_v_shift:nzt+1,2) = hom_sum(0:nzt+1-nz_v_shift,2,0)  ! v
+
+             mean_inflow_profiles(nz_s_shift:nzt+1,4) = hom_sum(0:nzt+1-nz_s_shift,4,0)  ! pt
+
+          ENDIF
+
+!
+!--       If necessary, adjust the horizontal flow field to the prescribed
+!--       profiles
+          IF ( use_prescribed_profile_data )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      u(k,j,i) = u(k,j,i) - hom_sum(k,1,0) + u_init(k)
+                      v(k,j,i) = v(k,j,i) - hom_sum(k,2,0) + v_init(k)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+!
+!--       Use these mean profiles at the inflow (provided that Dirichlet
+!--       conditions are used)
+          IF ( bc_dirichlet_l )  THEN
+             DO  j = nysg, nyng
+                DO  k = nzb, nzt+1
+                   u(k,j,nxlg:-1)  = mean_inflow_profiles(k,1)
+                   v(k,j,nxlg:-1)  = mean_inflow_profiles(k,2)
+                   w(k,j,nxlg:-1)  = 0.0_wp
+                   pt(k,j,nxlg:-1) = mean_inflow_profiles(k,4)
+                   IF ( humidity )                                             &
+                      q(k,j,nxlg:-1)  = mean_inflow_profiles(k,6)
+                   IF ( passive_scalar )                                       &
+                      s(k,j,nxlg:-1)  = mean_inflow_profiles(k,7)                      
+                ENDDO
+             ENDDO
+          ENDIF
+
+!
+!--       Calculate the damping factors to be used at the inflow. For a
+!--       turbulent inflow the turbulent fluctuations have to be limited
+!--       vertically because otherwise the turbulent inflow layer will grow
+!--       in time.
+          IF ( inflow_damping_height == 9999999.9_wp )  THEN
+!
+!--          Default: use the inversion height calculated by the prerun; if
+!--          this is zero, inflow_damping_height must be explicitly
+!--          specified.
+             IF ( hom_sum(nzb+6,pr_palm,0) /= 0.0_wp )  THEN
+                inflow_damping_height = hom_sum(nzb+6,pr_palm,0)
+             ELSE
+                WRITE( message_string, * ) 'inflow_damping_height must be ',   &
+                     'explicitly specified because&the inversion height ',     &
+                     'calculated by the prerun is zero.'
+                CALL message( 'init_3d_model', 'PA0318', 1, 2, 0, 6, 0 )
+             ENDIF
+
+          ENDIF
+
+          IF ( inflow_damping_width == 9999999.9_wp )  THEN
+!
+!--          Default for the transition range: one tenth of the undamped
+!--          layer
+             inflow_damping_width = 0.1_wp * inflow_damping_height
+
+          ENDIF
+
+          ALLOCATE( inflow_damping_factor(nzb:nzt+1) )
+
+          DO  k = nzb, nzt+1
+
+             IF ( zu(k) <= inflow_damping_height )  THEN
+                inflow_damping_factor(k) = 1.0_wp
+             ELSEIF ( zu(k) <= ( inflow_damping_height + inflow_damping_width ) )  THEN
+                inflow_damping_factor(k) = 1.0_wp -                            &
+                                           ( zu(k) - inflow_damping_height ) / &
+                                           inflow_damping_width
+             ELSE
+                inflow_damping_factor(k) = 0.0_wp
+             ENDIF
+
+          ENDDO
+
+       ENDIF
+
+!
+!--    Inside buildings set velocities back to zero
+       IF ( TRIM( initializing_actions ) == 'cyclic_fill' .AND.                &
+            topography /= 'flat' )  THEN
+!
+!--       Inside buildings set velocities back to zero.
+!--       Other scalars (pt, q, s, p, sa, ...) are ignored at present,
+!--       maybe revise later.
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                DO  k = nzb, nzt
+                   u(k,j,i)     = MERGE( u(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 1 ) )
+                   v(k,j,i)     = MERGE( v(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 2 ) )
+                   w(k,j,i)     = MERGE( w(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 3 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!--    Calculate initial temperature field and other constants used in case
+!--    of a sloping surface
+       IF ( sloping_surface )  CALL init_slope
+
+!
+!--    Initialize new time levels (only done in order to set boundary values
+!--    including ghost points)
+       pt_p = pt; u_p = u; v_p = v; w_p = w
+       IF ( humidity )  THEN
+          q_p = q
+       ENDIF
+       IF ( passive_scalar )  s_p  = s
+!
+!--    Allthough tendency arrays are set in prognostic_equations, they have
+!--    have to be predefined here because they are used (but multiplied with 0)
+!--    there before they are set. 
+       tpt_m = 0.0_wp; tu_m = 0.0_wp; tv_m = 0.0_wp; tw_m = 0.0_wp
+       IF ( humidity )  THEN
+          tq_m = 0.0_wp
+       ENDIF
+       IF ( passive_scalar )  ts_m  = 0.0_wp
+!
+!--    Initialize synthetic turbulence generator in case of restart.
+       IF ( TRIM( initializing_actions ) == 'read_restart_data'  .AND.         &
+            use_syn_turb_gen )  CALL stg_init
+
+       CALL location_message( 'finished', .TRUE. )
+
+    ELSE
+!
+!--    Actually this part of the programm should not be reached
+       message_string = 'unknown initializing problem'
+       CALL message( 'init_3d_model', 'PA0193', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Initialize TKE, Kh and Km
+    CALL tcm_init
+
+
+    IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+!
+!--    Initialize old timelevels needed for radiation boundary conditions
+       IF ( bc_radiation_l )  THEN
+          u_m_l(:,:,:) = u(:,:,1:2)
+          v_m_l(:,:,:) = v(:,:,0:1)
+          w_m_l(:,:,:) = w(:,:,0:1)
+       ENDIF
+       IF ( bc_radiation_r )  THEN
+          u_m_r(:,:,:) = u(:,:,nx-1:nx)
+          v_m_r(:,:,:) = v(:,:,nx-1:nx)
+          w_m_r(:,:,:) = w(:,:,nx-1:nx)
+       ENDIF
+       IF ( bc_radiation_s )  THEN
+          u_m_s(:,:,:) = u(:,0:1,:)
+          v_m_s(:,:,:) = v(:,1:2,:)
+          w_m_s(:,:,:) = w(:,0:1,:)
+       ENDIF
+       IF ( bc_radiation_n )  THEN
+          u_m_n(:,:,:) = u(:,ny-1:ny,:)
+          v_m_n(:,:,:) = v(:,ny-1:ny,:)
+          w_m_n(:,:,:) = w(:,ny-1:ny,:)
+       ENDIF
+       
+    ENDIF
+
+!
+!-- Calculate the initial volume flow at the right and north boundary
+    IF ( conserve_volume_flow )  THEN
+
+       IF ( use_prescribed_profile_data )  THEN
+
+          volume_flow_initial_l = 0.0_wp
+          volume_flow_area_l    = 0.0_wp
+
+          IF ( nxr == nx )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   volume_flow_initial_l(1) = volume_flow_initial_l(1) +       &
+                                              u_init(k) * dzw(k)               &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nxr), 1 )&
+                                            )
+
+                   volume_flow_area_l(1)    = volume_flow_area_l(1) + dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nxr), 1 )&
+                                            )
+                ENDDO
+             ENDDO
+          ENDIF
+          
+          IF ( nyn == ny )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   volume_flow_initial_l(2) = volume_flow_initial_l(2) +       &
+                                              v_init(k) * dzw(k)               &        
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,nyn,i), 2 )&
+                                            )
+                   volume_flow_area_l(2)    = volume_flow_area_l(2) + dzw(k)   &        
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,nyn,i), 2 )&
+                                            )
+                ENDDO
+             ENDDO
+          ENDIF
+
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( volume_flow_initial_l(1), volume_flow_initial(1),&
+                              2, MPI_REAL, MPI_SUM, comm2d, ierr )
+          CALL MPI_ALLREDUCE( volume_flow_area_l(1), volume_flow_area(1),      &
+                              2, MPI_REAL, MPI_SUM, comm2d, ierr )
+
+#else
+          volume_flow_initial = volume_flow_initial_l
+          volume_flow_area    = volume_flow_area_l
+#endif  
+
+       ELSEIF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+
+          volume_flow_initial_l = 0.0_wp
+          volume_flow_area_l    = 0.0_wp
+
+          IF ( nxr == nx )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   volume_flow_initial_l(1) = volume_flow_initial_l(1) +       &
+                                              hom_sum(k,1,0) * dzw(k)          &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nx), 1 ) &
+                                            )
+                   volume_flow_area_l(1)    = volume_flow_area_l(1) + dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nx), 1 ) &
+                                            )
+                ENDDO
+             ENDDO
+          ENDIF
+          
+          IF ( nyn == ny )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   volume_flow_initial_l(2) = volume_flow_initial_l(2) +       &
+                                              hom_sum(k,2,0) * dzw(k)          &        
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,ny,i), 2 ) &
+                                            )
+                   volume_flow_area_l(2)    = volume_flow_area_l(2) + dzw(k)   &        
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,ny,i), 2 ) &
+                                            )
+                ENDDO
+             ENDDO
+          ENDIF
+
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( volume_flow_initial_l(1), volume_flow_initial(1),&
+                              2, MPI_REAL, MPI_SUM, comm2d, ierr )
+          CALL MPI_ALLREDUCE( volume_flow_area_l(1), volume_flow_area(1),      &
+                              2, MPI_REAL, MPI_SUM, comm2d, ierr )
+
+#else
+          volume_flow_initial = volume_flow_initial_l
+          volume_flow_area    = volume_flow_area_l
+#endif  
+
+       ELSEIF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+
+          volume_flow_initial_l = 0.0_wp
+          volume_flow_area_l    = 0.0_wp
+
+          IF ( nxr == nx )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   volume_flow_initial_l(1) = volume_flow_initial_l(1) +       &
+                                              u(k,j,nx) * dzw(k)               &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nx), 1 ) &
+                                            )
+                   volume_flow_area_l(1)    = volume_flow_area_l(1) + dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nx), 1 ) &
+                                            )
+                ENDDO
+             ENDDO
+          ENDIF
+          
+          IF ( nyn == ny )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   volume_flow_initial_l(2) = volume_flow_initial_l(2) +       &
+                                              v(k,ny,i) * dzw(k)               &        
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,ny,i), 2 ) &
+                                            )
+                   volume_flow_area_l(2)    = volume_flow_area_l(2) + dzw(k)   &        
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,ny,i), 2 ) &
+                                            )
+                ENDDO
+             ENDDO
+          ENDIF
+
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( volume_flow_initial_l(1), volume_flow_initial(1),&
+                              2, MPI_REAL, MPI_SUM, comm2d, ierr )
+          CALL MPI_ALLREDUCE( volume_flow_area_l(1), volume_flow_area(1),      &
+                              2, MPI_REAL, MPI_SUM, comm2d, ierr )
+
+#else
+          volume_flow_initial = volume_flow_initial_l
+          volume_flow_area    = volume_flow_area_l
+#endif  
+
+       ENDIF
+
+!
+!--    In case of 'bulk_velocity' mode, volume_flow_initial is calculated
+!--    from u|v_bulk instead
+       IF ( TRIM( conserve_volume_flow_mode ) == 'bulk_velocity' )  THEN
+          volume_flow_initial(1) = u_bulk * volume_flow_area(1)
+          volume_flow_initial(2) = v_bulk * volume_flow_area(2)
+       ENDIF
+
+    ENDIF
+!
+!-- Finally, if random_heatflux is set, disturb shf at horizontal
+!-- surfaces. Actually, this should be done in surface_mod, where all other 
+!-- initializations of surface quantities are done. However, this
+!-- would create a ring dependency, hence, it is done here. Maybe delete
+!-- disturb_heatflux and tranfer the respective code directly into the 
+!-- initialization in surface_mod.         
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+ 
+       IF ( use_surface_fluxes  .AND.  constant_heatflux  .AND.                &
+            random_heatflux )  THEN
+          IF ( surf_def_h(0)%ns >= 1 )  CALL disturb_heatflux( surf_def_h(0) )
+          IF ( surf_lsm_h%ns    >= 1 )  CALL disturb_heatflux( surf_lsm_h    )
+          IF ( surf_usm_h%ns    >= 1 )  CALL disturb_heatflux( surf_usm_h    )
+       ENDIF
+    ENDIF
+
+!
+!-- Before initializing further modules, compute total sum of active mask 
+!-- grid points and the mean surface level height for each statistic region.
+!-- ngp_2dh: number of grid points of a horizontal cross section through the
+!--          total domain
+!-- ngp_3d:  number of grid points of the total domain
+    ngp_2dh_outer_l   = 0
+    ngp_2dh_outer     = 0
+    ngp_2dh_s_inner_l = 0
+    ngp_2dh_s_inner   = 0
+    ngp_2dh_l         = 0
+    ngp_2dh           = 0
+    ngp_3d_inner_l    = 0.0_wp
+    ngp_3d_inner      = 0
+    ngp_3d            = 0
+    ngp_sums          = ( nz + 2 ) * ( pr_palm + max_pr_user )
+
+    mean_surface_level_height   = 0.0_wp
+    mean_surface_level_height_l = 0.0_wp
+!
+!-- Pre-set masks for regional statistics. Default is the total model domain.
+!-- Ghost points are excluded because counting values at the ghost boundaries
+!-- would bias the statistics
+    rmask = 1.0_wp
+    rmask(:,nxlg:nxl-1,:) = 0.0_wp;  rmask(:,nxr+1:nxrg,:) = 0.0_wp
+    rmask(nysg:nys-1,:,:) = 0.0_wp;  rmask(nyn+1:nyng,:,:) = 0.0_wp
+
+!
+!-- Temporary solution to add LSM and radiation time series to the default
+!-- output
+    IF ( land_surface  .OR.  radiation )  THEN
+       IF ( TRIM( radiation_scheme ) == 'rrtmg' )  THEN
+          dots_num = dots_num + 15
+       ELSE
+          dots_num = dots_num + 11
+       ENDIF
+    ENDIF
+!
+!-- User-defined initializing actions
+    CALL user_init
+!
+!-- To do: New concept for these non-topography grid points!
+    DO  sr = 0, statistic_regions
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             IF ( rmask(j,i,sr) == 1.0_wp )  THEN
+!
+!--             All xy-grid points
+                ngp_2dh_l(sr) = ngp_2dh_l(sr) + 1
+!
+!--             Determine mean surface-level height. In case of downward-
+!--             facing walls are present, more than one surface level exist.
+!--             In this case, use the lowest surface-level height. 
+                IF ( surf_def_h(0)%start_index(j,i) <=                         &
+                     surf_def_h(0)%end_index(j,i) )  THEN
+                   m = surf_def_h(0)%start_index(j,i)
+                   k = surf_def_h(0)%k(m)
+                   mean_surface_level_height_l(sr) =                           &
+                                       mean_surface_level_height_l(sr) + zw(k-1)
+                ENDIF
+                IF ( surf_lsm_h%start_index(j,i) <=                            &
+                     surf_lsm_h%end_index(j,i) )  THEN
+                   m = surf_lsm_h%start_index(j,i)
+                   k = surf_lsm_h%k(m)
+                   mean_surface_level_height_l(sr) =                           &
+                                       mean_surface_level_height_l(sr) + zw(k-1)
+                ENDIF
+                IF ( surf_usm_h%start_index(j,i) <=                            &
+                     surf_usm_h%end_index(j,i) )  THEN
+                   m = surf_usm_h%start_index(j,i)
+                   k = surf_usm_h%k(m)
+                   mean_surface_level_height_l(sr) =                           &
+                                       mean_surface_level_height_l(sr) + zw(k-1)
+                ENDIF
+
+                k_surf = k - 1
+
+                DO  k = nzb, nzt+1
+!
+!--                xy-grid points above topography
+                   ngp_2dh_outer_l(k,sr) = ngp_2dh_outer_l(k,sr)     +         &
+                                  MERGE( 1, 0, BTEST( wall_flags_0(k,j,i), 24 ) )
+
+                   ngp_2dh_s_inner_l(k,sr) = ngp_2dh_s_inner_l(k,sr) +         &
+                                  MERGE( 1, 0, BTEST( wall_flags_0(k,j,i), 22 ) )
+
+                ENDDO
+!
+!--             All grid points of the total domain above topography
+                ngp_3d_inner_l(sr) = ngp_3d_inner_l(sr) + ( nz - k_surf + 2 )
+
+
+
+             ENDIF
+          ENDDO
+       ENDDO
+    ENDDO
+!
+!-- Initialize arrays encompassing number of grid-points in inner and outer
+!-- domains, statistic regions, etc. Mainly used for horizontal averaging
+!-- of turbulence statistics. Please note, user_init must be called before
+!-- doing this.   
+    sr = statistic_regions + 1
+#if defined( __parallel )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( ngp_2dh_l(0), ngp_2dh(0), sr, MPI_INTEGER, MPI_SUM,    &
+                        comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( ngp_2dh_outer_l(0,0), ngp_2dh_outer(0,0), (nz+2)*sr,   &
+                        MPI_INTEGER, MPI_SUM, comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( ngp_2dh_s_inner_l(0,0), ngp_2dh_s_inner(0,0),          &
+                        (nz+2)*sr, MPI_INTEGER, MPI_SUM, comm2d, ierr )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( ngp_3d_inner_l(0), ngp_3d_inner_tmp(0), sr, MPI_REAL,  &
+                        MPI_SUM, comm2d, ierr )
+    ngp_3d_inner = INT( ngp_3d_inner_tmp, KIND = SELECTED_INT_KIND( 18 ) )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( mean_surface_level_height_l(0),                        &
+                        mean_surface_level_height(0), sr, MPI_REAL,            &
+                        MPI_SUM, comm2d, ierr )
+    mean_surface_level_height = mean_surface_level_height / REAL( ngp_2dh )
+#else
+    ngp_2dh         = ngp_2dh_l
+    ngp_2dh_outer   = ngp_2dh_outer_l
+    ngp_2dh_s_inner = ngp_2dh_s_inner_l
+    ngp_3d_inner    = INT( ngp_3d_inner_l, KIND = SELECTED_INT_KIND( 18 ) )
+    mean_surface_level_height = mean_surface_level_height_l / REAL( ngp_2dh_l )
+#endif
+
+    ngp_3d = INT ( ngp_2dh, KIND = SELECTED_INT_KIND( 18 ) ) * &
+             INT ( (nz + 2 ), KIND = SELECTED_INT_KIND( 18 ) )
+
+!
+!-- Set a lower limit of 1 in order to avoid zero divisions in flow_statistics,
+!-- buoyancy, etc. A zero value will occur for cases where all grid points of
+!-- the respective subdomain lie below the surface topography
+    ngp_2dh_outer   = MAX( 1, ngp_2dh_outer(:,:)   ) 
+    ngp_3d_inner    = MAX( INT(1, KIND = SELECTED_INT_KIND( 18 )),             &
+                           ngp_3d_inner(:) )
+    ngp_2dh_s_inner = MAX( 1, ngp_2dh_s_inner(:,:) ) 
+
+    DEALLOCATE( mean_surface_level_height_l, ngp_2dh_l, ngp_2dh_outer_l,       &
+                ngp_3d_inner_l, ngp_3d_inner_tmp )
+
+!
+!-- Initialize nudging if required
+    IF ( nudging )  CALL nudge_init
+!
+!-- Initialize 1D large-scale forcing and nudging and read data from external
+!-- ASCII file
+    IF ( large_scale_forcing )  CALL lsf_init
+!
+!-- Initialize surface forcing corresponding to large-scale forcing. Therein, 
+!-- initialize heat-fluxes, etc. via datatype. Revise it later!
+    IF ( large_scale_forcing .AND. lsf_surf )  THEN
+       IF ( use_surface_fluxes  .AND.  constant_heatflux )  THEN
+          CALL ls_forcing_surf ( simulated_time )
+       ENDIF
+    ENDIF
+!
+!-- Initializae 3D offline nesting in COSMO model and read data from 
+!-- external NetCDF file.
+    IF ( nesting_offline )  CALL nesting_offl_init
+!
+!-- Initialize quantities for special advections schemes
+    CALL init_advec
+
+!
+!-- Impose random perturbation on the horizontal velocity field and then
+!-- remove the divergences from the velocity field at the initial stage
+    IF ( create_disturbances  .AND.  disturbance_energy_limit /= 0.0_wp  .AND. &
+         TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+
+       CALL location_message( 'creating initial disturbances', .FALSE. )
+       CALL disturb_field( 'u', tend, u )
+       CALL disturb_field( 'v', tend, v )
+       CALL location_message( 'finished', .TRUE. )
+
+       CALL location_message( 'calling pressure solver', .FALSE. )
+       n_sor = nsor_ini
+       CALL pres
+       n_sor = nsor
+       CALL location_message( 'finished', .TRUE. )
+
+    ENDIF
+
+!
+!-- If required, initialize quantities needed for the plant canopy model
+    IF ( plant_canopy )  THEN
+       CALL location_message( 'initializing plant canopy model', .FALSE. )    
+       CALL pcm_init
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- If required, initialize dvrp-software
+    IF ( dt_dvrp /= 9999999.9_wp )  CALL init_dvrp
+
+!
+!-- Initialize quantities needed for the ocean model
+    IF ( ocean_mode )  CALL ocean_init
+
+!
+!-- Initialize quantities for handling cloud physics.
+!-- This routine must be called before lpm_init, becaus otherwise,
+!-- array d_exner, needed in data_output_dvrp (called by lpm_init) is not defined.
+    IF ( .NOT. ocean_mode )  THEN
+
+       ALLOCATE( hyp(nzb:nzt+1) )
+       ALLOCATE( d_exner(nzb:nzt+1) )
+       ALLOCATE( exner(nzb:nzt+1) )
+       ALLOCATE( hyrho(nzb:nzt+1) )
+!
+!--    Check temperature in case of too large domain height
+       DO  k = nzb, nzt+1
+          IF ( ( pt_surface * exner_function(surface_pressure * 100.0_wp) - g/c_p * zu(k) ) < 0.0_wp )  THEN
+             WRITE( message_string, * )  'absolute temperature < 0.0 at zu(', k, &
+                                         ') = ', zu(k)
+             CALL message( 'init_bulk_cloud_model', 'PA0142', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDDO
+
+!
+!--    Calculate vertical profile of the hydrostatic pressure (hyp)
+       hyp    = barometric_formula(zu, pt_surface * exner_function(surface_pressure * 100.0_wp), surface_pressure * 100.0_wp)
+       d_exner = exner_function_invers(hyp)
+       exner = 1.0_wp / exner_function_invers(hyp)
+       hyrho  = ideal_gas_law_rho_pt(hyp, pt_init)
+!
+!--    Compute reference density
+       rho_surface = ideal_gas_law_rho(surface_pressure * 100.0_wp, pt_surface * exner_function(surface_pressure * 100.0_wp))
+
+    ENDIF
+!
+!-- If required, initialize quantities needed for the microphysics module
+    IF ( bulk_cloud_model )  THEN
+       CALL bcm_init
+    ENDIF
+
+!
+!-- If required, initialize particles
+    IF ( particle_advection )  CALL lpm_init
+
+!
+!-- If required, initialize particles
+    IF ( agents_active )  CALL mas_init
+
+!
+!-- If required, initialize quantities needed for the LSM
+    IF ( land_surface )  THEN
+       CALL location_message( 'initializing land surface model', .FALSE. )
+       CALL lsm_init
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- If required, allocate USM and LSM surfaces
+    IF ( urban_surface )  THEN
+       CALL location_message( 'initializing and allocating urban surfaces', .FALSE. )
+       CALL usm_allocate_surface
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+!
+!-- If required, initialize urban surface model
+    IF ( urban_surface )  THEN
+       CALL location_message( 'initializing urban surface model', .FALSE. )
+       CALL usm_init_urban_surface
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- Initialize surface layer (done after LSM as roughness length are required
+!-- for initialization
+    IF ( constant_flux_layer )  THEN
+       CALL location_message( 'initializing surface layer', .FALSE. )
+       CALL init_surface_layer_fluxes
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+!
+!-- In case the synthetic turbulence generator does not have any information
+!-- about the inflow turbulence, these information will be parametrized 
+!-- depending on the initial atmospheric conditions and surface properties.
+!-- Please note, within pre-determined time intervals these turbulence 
+!-- information can be updated if desired. 
+    IF ( use_syn_turb_gen  .AND.  parametrize_inflow_turbulence )              &
+       CALL stg_adjust
+!
+!-- If required, set chemical emissions
+!-- Initialize values of cssws according to chemistry emission values
+    IF ( air_chemistry  .AND.  do_emis )  THEN
+       CALL chem_emissions_init( chem_emis_att, chem_emis, nspec_out )
+    ENDIF
+!
+!-- Initialize radiation processes
+    IF ( radiation )  THEN
+!
+!--    Activate radiation_interactions according to the existence of vertical surfaces and/or trees.
+!--    The namelist parameter radiation_interactions_on can override this behavior.
+!--    (This check cannot be performed in check_parameters, because vertical_surfaces_exist is first set in 
+!--    init_surface_arrays.)
+       IF ( radiation_interactions_on )  THEN
+          IF ( vertical_surfaces_exist  .OR.  plant_canopy )  THEN
+             radiation_interactions    = .TRUE.
+             average_radiation         = .TRUE.
+          ELSE
+             radiation_interactions_on = .FALSE.   !< reset namelist parameter: no interactions 
+                                                   !< calculations necessary in case of flat surface
+          ENDIF
+       ELSEIF ( vertical_surfaces_exist  .OR.  plant_canopy )  THEN
+          message_string = 'radiation_interactions_on is set to .FALSE. although '     // &
+                           'vertical surfaces and/or trees exist. The model will run ' // &
+                           'without RTM (no shadows, no radiation reflections)'
+          CALL message( 'init_3d_model', 'PA0348', 0, 1, 0, 6, 0 )
+       ENDIF
+!
+!--    If required, initialize radiation interactions between surfaces 
+!--    via sky-view factors. This must be done before radiation is initialized.
+       IF ( radiation_interactions )  CALL radiation_interaction_init
+
+!
+!--    Initialize radiation model
+       CALL location_message( 'initializing radiation model', .FALSE. )
+       CALL radiation_init
+       CALL location_message( 'finished', .TRUE. )
+
+!
+!--    Find all discretized apparent solar positions for radiation interaction.
+!--    This must be done after radiation_init.
+       IF ( radiation_interactions )  CALL radiation_presimulate_solar_pos
+
+!
+!--    If required, read or calculate and write out the SVF 
+       IF ( radiation_interactions .AND. read_svf)  THEN
+!
+!--       Read sky-view factors and further required data from file
+          CALL location_message( '    Start reading SVF from file', .FALSE. )
+          CALL radiation_read_svf()
+          CALL location_message( '    Reading SVF from file has finished', .TRUE. )
+
+       ELSEIF ( radiation_interactions .AND. .NOT. read_svf)  THEN
+!
+!--       calculate SFV and CSF
+          CALL location_message( '    Start calculation of SVF', .FALSE. )
+          CALL radiation_calc_svf()
+          CALL location_message( '    Calculation of SVF has finished', .TRUE. )
+       ENDIF
+
+       IF ( radiation_interactions .AND. write_svf)  THEN
+!
+!--       Write svf, csf svfsurf and csfsurf data to file
+          CALL location_message( '    Start writing SVF in file', .FALSE. )
+          CALL radiation_write_svf()
+          CALL location_message( '    Writing SVF in file has finished', .TRUE. )
+       ENDIF
+
+!
+!--    Adjust radiative fluxes. In case of urban and land surfaces, also 
+!--    call an initial interaction.
+       IF ( radiation_interactions )  THEN
+          CALL radiation_interaction
+       ENDIF
+    ENDIF
+  
+!
+!-- If required, initialize quantities needed for the wind turbine model
+    IF ( wind_turbine )  THEN
+       CALL location_message( 'initializing wind turbine model', .FALSE. )
+       CALL wtm_init
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- If required, initialize quantities needed in SALSA 
+    IF ( salsa )  THEN
+       CALL location_message( 'initializing SALSA model', .TRUE. )
+       CALL salsa_init 
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- If required, initialize quantities needed for the gust module
+    IF ( gust_module_enabled )  THEN
+       CALL gust_init( dots_label, dots_unit, dots_num, dots_max )
+    ENDIF
+!
+!-- Initialize surface data output
+    IF ( surface_data_output )  THEN
+       CALL surface_output_init
+    ENDIF
+!
+!-- If virtual measurements should be taken, initialize all relevant 
+!-- arrays and quantities.
+    IF ( virtual_measurement )  CALL vm_init
+
+!
+!-- If required initialize biometeorology module
+    IF ( biometeorology )  THEN
+        CALL location_message( 'initializing biometeorology module', .FALSE. )
+        CALL biom_init
+        CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- If required, initialize indoor model
+    IF ( indoor_model )  THEN
+       CALL location_message( 'initializing indoor model', .FALSE. )
+       CALL im_init
+       CALL location_message( 'finished', .TRUE. )
+    ENDIF
+
+!
+!-- Initialize the ws-scheme.    
+    IF ( ws_scheme_sca .OR. ws_scheme_mom )  CALL ws_init
+
+!
+!-- Setting weighting factors for calculation of perturbation pressure 
+!-- and turbulent quantities from the RK substeps
+    IF ( TRIM(timestep_scheme) == 'runge-kutta-3' )  THEN      ! for RK3-method
+
+       weight_substep(1) = 1._wp/6._wp
+       weight_substep(2) = 3._wp/10._wp
+       weight_substep(3) = 8._wp/15._wp
+
+       weight_pres(1)    = 1._wp/3._wp
+       weight_pres(2)    = 5._wp/12._wp
+       weight_pres(3)    = 1._wp/4._wp
+
+    ELSEIF ( TRIM(timestep_scheme) == 'runge-kutta-2' )  THEN  ! for RK2-method
+
+       weight_substep(1) = 1._wp/2._wp
+       weight_substep(2) = 1._wp/2._wp
+          
+       weight_pres(1)    = 1._wp/2._wp
+       weight_pres(2)    = 1._wp/2._wp        
+
+    ELSE                                     ! for Euler-method
+
+       weight_substep(1) = 1.0_wp      
+       weight_pres(1)    = 1.0_wp                   
+
+    ENDIF
+
+!
+!-- Initialize Rayleigh damping factors
+    rdf    = 0.0_wp
+    rdf_sc = 0.0_wp
+    IF ( rayleigh_damping_factor /= 0.0_wp )  THEN
+
+       IF (  .NOT.  ocean_mode )  THEN
+          DO  k = nzb+1, nzt
+             IF ( zu(k) >= rayleigh_damping_height )  THEN
+                rdf(k) = rayleigh_damping_factor *                             &
+                      ( SIN( pi * 0.5_wp * ( zu(k) - rayleigh_damping_height ) &
+                             / ( zu(nzt) - rayleigh_damping_height ) )         &
+                      )**2
+             ENDIF
+          ENDDO
+       ELSE
+!
+!--       In ocean mode, rayleigh damping is applied in the lower part of the
+!--       model domain
+          DO  k = nzt, nzb+1, -1
+             IF ( zu(k) <= rayleigh_damping_height )  THEN
+                rdf(k) = rayleigh_damping_factor *                             &
+                      ( SIN( pi * 0.5_wp * ( rayleigh_damping_height - zu(k) ) &
+                             / ( rayleigh_damping_height - zu(nzb+1) ) )       &
+                      )**2
+             ENDIF
+          ENDDO
+       ENDIF
+
+    ENDIF
+    IF ( scalar_rayleigh_damping )  rdf_sc = rdf
+
+!
+!-- Initialize the starting level and the vertical smoothing factor used for 
+!-- the external pressure gradient
+    dp_smooth_factor = 1.0_wp
+    IF ( dp_external )  THEN
+!
+!--    Set the starting level dp_level_ind_b only if it has not been set before
+!--    (e.g. in init_grid).
+       IF ( dp_level_ind_b == 0 )  THEN
+          ind_array = MINLOC( ABS( dp_level_b - zu ) )
+          dp_level_ind_b = ind_array(1) - 1 + nzb 
+                                        ! MINLOC uses lower array bound 1
+       ENDIF
+       IF ( dp_smooth )  THEN
+          dp_smooth_factor(:dp_level_ind_b) = 0.0_wp
+          DO  k = dp_level_ind_b+1, nzt
+             dp_smooth_factor(k) = 0.5_wp * ( 1.0_wp + SIN( pi *               &
+                        ( REAL( k - dp_level_ind_b, KIND=wp ) /                &
+                          REAL( nzt - dp_level_ind_b, KIND=wp ) - 0.5_wp ) ) )
+          ENDDO
+       ENDIF
+    ENDIF
+
+!
+!-- Initialize damping zone for the potential temperature in case of
+!-- non-cyclic lateral boundaries. The damping zone has the maximum value 
+!-- at the inflow boundary and decreases to zero at pt_damping_width.
+    ptdf_x = 0.0_wp
+    ptdf_y = 0.0_wp
+    IF ( bc_lr_dirrad )  THEN
+       DO  i = nxl, nxr
+          IF ( ( i * dx ) < pt_damping_width )  THEN
+             ptdf_x(i) = pt_damping_factor * ( SIN( pi * 0.5_wp *              &
+                            REAL( pt_damping_width - i * dx, KIND=wp ) / (     &
+                            REAL( pt_damping_width, KIND=wp ) ) ) )**2 
+          ENDIF
+       ENDDO
+    ELSEIF ( bc_lr_raddir )  THEN
+       DO  i = nxl, nxr
+          IF ( ( i * dx ) > ( nx * dx - pt_damping_width ) )  THEN
+             ptdf_x(i) = pt_damping_factor *                                   &
+                         SIN( pi * 0.5_wp *                                    &
+                                 ( ( i - nx ) * dx + pt_damping_width ) /      &
+                                 REAL( pt_damping_width, KIND=wp ) )**2
+          ENDIF
+       ENDDO 
+    ELSEIF ( bc_ns_dirrad )  THEN
+       DO  j = nys, nyn
+          IF ( ( j * dy ) > ( ny * dy - pt_damping_width ) )  THEN
+             ptdf_y(j) = pt_damping_factor *                                   &
+                         SIN( pi * 0.5_wp *                                    &
+                                 ( ( j - ny ) * dy + pt_damping_width ) /      &
+                                 REAL( pt_damping_width, KIND=wp ) )**2
+          ENDIF
+       ENDDO 
+    ELSEIF ( bc_ns_raddir )  THEN
+       DO  j = nys, nyn
+          IF ( ( j * dy ) < pt_damping_width )  THEN
+             ptdf_y(j) = pt_damping_factor *                                   &
+                         SIN( pi * 0.5_wp *                                    &
+                                ( pt_damping_width - j * dy ) /                &
+                                REAL( pt_damping_width, KIND=wp ) )**2
+          ENDIF
+       ENDDO
+    ENDIF
+!
+!-- Check if maximum number of allowed timeseries is exceeded
+    IF ( dots_num > dots_max )  THEN
+       WRITE( message_string, * ) 'number of time series quantities exceeds',  &
+                                  ' its maximum of dots_max = ', dots_max,     &
+                                  '&Please increase dots_max in modules.f90.'
+       CALL message( 'init_3d_model', 'PA0194', 1, 2, 0, 6, 0 )    
+    ENDIF
+
+!
+!-- Input binary data file is not needed anymore. This line must be placed
+!-- after call of user_init!
+    CALL close_file( 13 )
+!
+!-- In case of nesting, put an barrier to assure that all parent and child 
+!-- domains finished initialization. 
+#if defined( __parallel )
+    IF ( nested_run )  CALL MPI_BARRIER( MPI_COMM_WORLD, ierr )
+#endif
+
+
+    CALL location_message( 'leaving init_3d_model', .TRUE. )
+
+ END SUBROUTINE init_3d_model
Index: /palm/tags/release-6.0/SOURCE/init_advec.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_advec.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_advec.f90	(revision 3477)
@@ -0,0 +1,148 @@
+!> @file init_advec.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of 
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! obsolete variables removed
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning upstream-spline-method removed
+!
+! Revision 1.1  1999/02/05 09:07:38  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initialize constant coefficients and parameters for certain advection schemes.
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_advec
+ 
+
+    USE advection,                                                             &
+        ONLY:  aex, bex, dex, eex
+        
+    USE kinds
+    
+    USE control_parameters,                                                    &
+        ONLY:  scalar_advec
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i          !<
+    INTEGER(iwp) ::  intervals  !< 
+    INTEGER(iwp) ::  j          !<
+    
+    REAL(wp) :: delt   !<
+    REAL(wp) :: dn     !<
+    REAL(wp) :: dnneu  !<
+    REAL(wp) :: ex1    !<
+    REAL(wp) :: ex2    !<
+    REAL(wp) :: ex3    !<
+    REAL(wp) :: ex4    !<
+    REAL(wp) :: ex5    !<
+    REAL(wp) :: ex6    !<
+    REAL(wp) :: sterm  !<
+
+
+    IF ( scalar_advec == 'bc-scheme' )  THEN
+
+!
+!--    Compute exponential coefficients for the Bott-Chlond scheme
+       intervals = 1000
+       ALLOCATE( aex(intervals), bex(intervals), dex(intervals), eex(intervals) )
+
+       delt  = 1.0_wp / REAL( intervals, KIND=wp )
+       sterm = delt * 0.5_wp
+
+       DO  i = 1, intervals
+
+          IF ( sterm > 0.5_wp )  THEN
+             dn = -5.0_wp
+          ELSE
+             dn = 5.0_wp
+          ENDIF
+
+          DO  j = 1, 15
+             ex1 = dn * EXP( -dn ) - EXP( 0.5_wp * dn ) + EXP( -0.5_wp * dn )
+             ex2 = EXP( dn ) - EXP( -dn )
+             ex3 = EXP( -dn ) * ( 1.0_wp - dn ) - 0.5_wp * EXP(  0.5_wp * dn ) &
+                                                - 0.5_wp * EXP( -0.5_wp * dn )
+             ex4 = EXP( dn ) + EXP( -dn )
+             ex5 = dn * sterm + ex1 / ex2
+             ex6 = sterm + ( ex3 * ex2 - ex4 * ex1 ) / ( ex2 * ex2 )
+             dnneu = dn - ex5 / ex6
+             dn  = dnneu
+          ENDDO
+
+          IF ( sterm < 0.5_wp )  dn = MAX(  2.95E-2_wp, dn )
+          IF ( sterm > 0.5_wp )  dn = MIN( -2.95E-2_wp, dn )
+          ex1 = EXP( -dn )
+          ex2 = EXP( dn ) - ex1
+          aex(i) = -ex1 / ex2
+          bex(i) = 1.0_wp / ex2
+          dex(i) = dn
+          eex(i) = EXP( dex(i) * 0.5_wp )
+          sterm = sterm + delt
+
+       ENDDO
+
+    ENDIF
+
+ END SUBROUTINE init_advec
Index: /palm/tags/release-6.0/SOURCE/init_coupling.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_coupling.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_coupling.f90	(revision 3477)
@@ -0,0 +1,211 @@
+!> @file init_coupling.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! ------------------
+! $Id$
+! references to mrun replaced by palmrun, and updated
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2669 2017-12-06 16:03:27Z raasch
+! file extension for vertical nesting changed to "_NV"
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical nesting implemented (SadiqHuq)
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! MPI2 coupling removed
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_getenv replaced by standard FORTRAN routine
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 222 2009-01-12 16:04:16Z letzel
+! Initial revision
+!
+! Description:
+! ------------
+!> Initializing coupling via MPI-1 or MPI-2 if the coupled version of PALM is
+!> called.
+!------------------------------------------------------------------------------!
+  SUBROUTINE init_coupling
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_char, coupling_mode
+        
+    USE kinds
+    
+    USE pegrid
+
+    USE vertical_nesting_mod
+
+    IMPLICIT NONE
+
+!
+!-- Local variables
+    INTEGER(iwp) ::  i            !<
+    INTEGER(iwp) ::  inter_color  !<
+    
+    INTEGER(iwp), DIMENSION(:) ::  bc_data(0:3) = 0  !<
+
+!
+!-- Get information about the coupling mode from the environment variable
+!-- which has been set by the mpiexec command.
+!-- This method is currently not used because the mpiexec command is not
+!-- available on some machines
+!    CALL GET_ENVIRONMENT_VARIABLE( 'coupling_mode', coupling_mode, i )
+!    IF ( i == 0 )  coupling_mode = 'uncoupled'
+!    IF ( coupling_mode == 'ocean_to_atmosphere' )  coupling_char = '_O'
+
+!
+!-- Get information about the coupling mode from standard input (PE0 only) and
+!-- distribute it to the other PEs. Distribute PEs to 2 new communicators.
+!-- ATTENTION: numprocs will be reset according to the new communicators
+#if defined ( __parallel )
+
+    IF ( myid == 0 )  THEN
+       READ (*,*,ERR=10,END=10)  coupling_mode, bc_data(1), bc_data(2)
+10     CONTINUE
+       IF ( TRIM( coupling_mode ) == 'coupled_run' )  THEN
+          i = 1
+       ELSEIF ( TRIM( coupling_mode ) == 'vnested_twi' )  THEN
+          i = 9
+       ELSE
+          i = 0
+       ENDIF
+       bc_data(0) = i
+
+!
+!--    Check if '_O' has to be used as file extension in an uncoupled ocean
+!--    run. This is required, if this run shall be continued as a coupled run.
+       IF ( TRIM( coupling_mode ) == 'precursor_ocean' )  bc_data(3) = 1
+
+    ENDIF
+
+    CALL MPI_BCAST( bc_data(0), 4, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr )
+    i = bc_data(0)
+
+    IF ( i == 0 )  THEN
+       coupling_mode = 'uncoupled'
+!
+!--    In case of a precursor ocean run, an additional flag file is created.
+!--    This is necessary for data_output_2d_on_each_pe = .T.
+       IF ( bc_data(3) == 1 )  THEN
+          OPEN( 90, FILE='PRECURSOR_OCEAN', FORM='FORMATTED' )
+          WRITE ( 90, '(''TRUE'')' )
+          CLOSE ( 90 )
+       ENDIF
+    ELSEIF ( i == 9 )  THEN
+
+!
+!--    Set a flag to identify runs with vertical nesting
+       vnested = .TRUE.
+       
+       comm_inter = MPI_COMM_WORLD
+       
+!
+!--    Split the total available PE's into two groups
+!--    numprocs for coarse and fine grid are read from stdin (see above, and
+!--    execution command in the palmrun script, numprocs are provided via
+!--    palmrun option -Y)
+       IF ( myid < bc_data(1) )  THEN
+          inter_color     = 0
+          numprocs        = bc_data(1)
+          coupling_mode   = 'vnested_crse'
+       ELSE
+          inter_color     = 1
+          numprocs        = bc_data(2)
+          coupling_mode   = 'vnested_fine'
+       ENDIF
+       
+       CALL MPI_COMM_SPLIT( MPI_COMM_WORLD, inter_color, 0, comm_palm, ierr )
+       comm2d = comm_palm
+       
+       OPEN( 90, FILE='VNESTING_PORT_OPENED', FORM='FORMATTED' )
+       WRITE ( 90, '(''TRUE'')' )
+       CLOSE ( 90 )
+      
+    ELSE
+       comm_inter = MPI_COMM_WORLD
+
+       IF ( myid < bc_data(1) ) THEN
+          inter_color     = 0
+          numprocs        = bc_data(1)
+          coupling_mode   = 'atmosphere_to_ocean'
+       ELSE
+          inter_color     = 1
+          numprocs        = bc_data(2)
+          coupling_mode   = 'ocean_to_atmosphere'
+       ENDIF
+
+       CALL MPI_COMM_SPLIT( MPI_COMM_WORLD, inter_color, 0, comm_palm, ierr )
+       comm2d = comm_palm
+
+!
+!--    Write a flag file for the ocean model and the other atmosphere
+!--    processes.
+       OPEN( 90, FILE='COUPLING_PORT_OPENED', FORM='FORMATTED' )
+       WRITE ( 90, '(''TRUE'')' )
+       CLOSE ( 90 )
+    ENDIF
+#endif
+
+!
+!-- In case of a precursor ocean run (followed by a coupled run), or a
+!-- coupled atmosphere-ocean run, set the file extension for the ocean files
+    IF ( TRIM( coupling_mode ) == 'ocean_to_atmosphere' .OR. bc_data(3) == 1 ) &
+    THEN
+       coupling_char = '_O'
+    ENDIF
+
+    IF (  TRIM( coupling_mode ) == 'vnested_fine' )  THEN
+!
+!-- Set file extension for vertical nesting
+       coupling_char = '_NV'
+    ENDIF
+
+ END SUBROUTINE init_coupling
Index: /palm/tags/release-6.0/SOURCE/init_dvrp.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_dvrp.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_dvrp.f90	(revision 3477)
@@ -0,0 +1,870 @@
+!> @file init_dvrp.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! NEC related cpp directives removed
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! MPI2 related part removed
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_getenv replaced by standard FORTRAN routine
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  2000/04/27 06:24:39  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initializing actions needed when using dvrp-software
+!------------------------------------------------------------------------------!
+  SUBROUTINE init_dvrp
+ 
+#if defined( __dvrp_graphics )
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu
+        
+    USE DVRP
+    
+    USE dvrp_variables
+    
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+        
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxr, ny, nyn, nys, nzb, nzb_s_inner
+        
+    USE kinds
+    
+    USE pegrid
+    
+    USE control_parameters,                                                               &
+        ONLY:  message_string, nz_do3d, run_identifier, topography
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=2)  ::  section_chr      !<
+    CHARACTER (LEN=3)  ::  prefix_chr       !<
+    CHARACTER (LEN=80) ::  dvrp_file_local  !<
+    
+    INTEGER(iwp) ::  cluster_mode      !<
+    INTEGER(iwp) ::  cluster_size_x    !<
+    INTEGER(iwp) ::  cluster_size_y    !<
+    INTEGER(iwp) ::  cluster_size_z    !<
+    INTEGER(iwp) ::  gradient_normals  !<
+    INTEGER(iwp) ::  i                 !<
+    INTEGER(iwp) ::  j                 !<
+    INTEGER(iwp) ::  k                 !<
+    INTEGER(iwp) ::  l                 !<
+    INTEGER(iwp) ::  m                 !<
+    INTEGER(iwp) ::  nx_dvrp_l         !<
+    INTEGER(iwp) ::  nx_dvrp_r         !<
+    INTEGER(iwp) ::  ny_dvrp_n         !<
+    INTEGER(iwp) ::  ny_dvrp_s         !<
+    INTEGER(iwp) ::  pn                !<
+    INTEGER(iwp) ::  tv                !<
+    INTEGER(iwp) ::  vn                !<
+                     
+    LOGICAL  ::  allocated  !<
+    
+    REAL(sp) ::  center(3)      !<
+    REAL(sp) ::  cluster_alpha  !<
+    REAL(sp) ::  distance       !<
+    REAL(sp) ::  tmp_b          !<
+    REAL(sp) ::  tmp_g          !<
+    REAL(sp) ::  tmp_r          !<
+    REAL(sp) ::  tmp_t          !<
+    REAL(sp) ::  tmp_th         !<
+    REAL(sp) ::  tmp_thr        !<
+    REAL(sp) ::  tmp_x1         !<
+    REAL(sp) ::  tmp_x2         !<
+    REAL(sp) ::  tmp_y1         !<
+    REAL(sp) ::  tmp_y2         !<
+    REAL(sp) ::  tmp_z1         !<
+    REAL(sp) ::  tmp_z2         !<
+    REAL(sp) ::  tmp_1          !<
+    REAL(sp) ::  tmp_2          !<
+    REAL(sp) ::  tmp_3          !<
+    REAL(sp) ::  tmp_4          !<
+    REAL(sp) ::  tmp_5          !<
+    REAL(sp) ::  tmp_6          !<
+    REAL(sp) ::  tmp_7          !<
+
+    REAL(sp), DIMENSION(:,:,:), ALLOCATABLE ::  local_pf  !<
+
+    TYPE(CSTRING), SAVE ::  dvrp_directory_c   !<
+    TYPE(CSTRING), SAVE ::  dvrp_file_c        !<
+    TYPE(CSTRING), SAVE ::  dvrp_file_local_c  !<
+    TYPE(CSTRING), SAVE ::  dvrp_host_c        !<
+    TYPE(CSTRING), SAVE ::  dvrp_password_c    !<
+    TYPE(CSTRING), SAVE ::  dvrp_username_c    !<
+    TYPE(CSTRING), SAVE ::  name_c             !<
+
+!
+!-- Set clipping to default (total domain), if not set by user
+    IF ( clip_dvrp_l == 9999999.9_wp )  clip_dvrp_l = 0.0_wp
+    IF ( clip_dvrp_r == 9999999.9_wp )  clip_dvrp_r = ( nx + 1 ) * dx
+    IF ( clip_dvrp_s == 9999999.9_wp )  clip_dvrp_s = 0.0_wp
+    IF ( clip_dvrp_n == 9999999.9_wp )  clip_dvrp_n = ( ny + 1 ) * dy
+
+!
+!-- Calculate the clipping index limits
+    nx_dvrp_l = clip_dvrp_l / dx
+    nx_dvrp_r = clip_dvrp_r / dx
+    ny_dvrp_s = clip_dvrp_s / dy
+    ny_dvrp_n = clip_dvrp_n / dy
+
+    IF ( nx_dvrp_l < nxr  .AND.  nx_dvrp_r > nxl  .AND. &
+         ny_dvrp_s < nyn  .AND.  ny_dvrp_n > nys )  THEN
+
+       dvrp_overlap = .TRUE.
+       nxl_dvrp = MAX( nxl, nx_dvrp_l )
+       nxr_dvrp = MIN( nxr, nx_dvrp_r )
+       nys_dvrp = MAX( nys, ny_dvrp_s )
+       nyn_dvrp = MIN( nyn, ny_dvrp_n )
+
+       IF ( nxl_dvrp == nxl  .AND.  nxr_dvrp == nxr  .AND.  &
+            nys_dvrp == nys  .AND.  nyn_dvrp == nyn )  THEN
+          dvrp_total_overlap = .TRUE.
+       ELSE
+          dvrp_total_overlap = .FALSE.
+       ENDIF
+
+    ELSE
+!
+!--    This subdomain does not overlap with the clipping area. Define an
+!--    arbitrary (small) domain within in the clipping area.
+       dvrp_overlap       = .FALSE.
+       dvrp_total_overlap = .FALSE.
+!       nxl_dvrp = nx_dvrp_l
+!       nxr_dvrp = nxl_dvrp + 4
+!       nys_dvrp = ny_dvrp_s
+!       nyn_dvrp = nys_dvrp + 4
+       nxl_dvrp = nxl
+       nxr_dvrp = MIN( nxl+4, nxr )
+       nys_dvrp = nys
+       nyn_dvrp = MIN( nys+4, nyn )
+
+    ENDIF
+
+!
+!-- Set the maximum time the program can be suspended on user request (by
+!-- dvrp steering). This variable is defined in module DVRP.
+    DVRP_MAX_SUSPEND_TIME = 7200
+
+!
+!-- Allocate array holding the names and limits of the steering variables
+!-- (must have the same number of elements as array mode_dvrp!)
+    ALLOCATE( steering_dvrp(10) )
+
+!
+!-- Check, if output parameters are given and/or allowed
+!-- and set default-values, where necessary
+    IF ( dvrp_username == ' ' )  THEN
+        message_string = 'dvrp_username is undefined'
+        CALL message( 'init_dvrp', 'PA0195', 1, 2, 0, 6, 0 )         
+    ENDIF
+
+    IF ( dvrp_output /= 'ftp'  .AND.  dvrp_output /= 'rtsp'  .AND. &
+         dvrp_output /= 'local' )  THEN
+       message_string = 'dvrp_output="' // TRIM( dvrp_output ) // &
+                        '" not allowed'
+       CALL message( 'init_dvrp', 'PA0196', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( dvrp_directory == 'default' )  THEN
+       dvrp_directory = TRIM( dvrp_username ) // '/' // TRIM( run_identifier )
+    ENDIF
+
+!
+!-- A local dvrserver running always outputs on temporary directory DATA_DVR
+    IF ( local_dvrserver_running )  THEN
+       dvrp_directory = 'DATA_DVR'
+    ENDIF
+
+    IF ( dvrp_output /= 'local' )  THEN
+       IF ( dvrp_file /= 'default'  .AND.  dvrp_file /= '/dev/null' )  THEN
+          message_string = 'dvrp_file="' // TRIM( dvrp_file ) // '" not allowed'
+          CALL message( 'init_dvrp', 'PA0197', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+!
+!-- Strings are assigned to strings of special type which have a CHAR( 0 )
+!-- (C end-of-character symbol) at their end. This is needed when strings are
+!-- passed to C routines.
+    dvrp_directory_c = dvrp_directory
+    dvrp_file_c      = dvrp_file
+    dvrp_host_c      = dvrp_host
+    dvrp_password_c  = dvrp_password
+    dvrp_username_c  = dvrp_username
+
+!
+!-- Loop over all output modes choosed
+    m = 1
+    allocated = .FALSE.
+    DO WHILE ( mode_dvrp(m) /= ' ' )
+    
+!
+!--    Check, if mode is allowed
+       IF ( mode_dvrp(m)(1:10) /= 'isosurface'  .AND. &
+            mode_dvrp(m)(1:6)  /= 'slicer'      .AND. &
+            mode_dvrp(m)(1:9)  /= 'particles'   .AND. &
+            mode_dvrp(m)(1:9)  /= 'pathlines' )  THEN
+
+          message_string = 'mode_dvrp="' // TRIM( mode_dvrp(m) ) // &
+                           '" not allowed'
+          CALL message( 'init_dvrp', 'PA0198', 1, 2, 0, 6, 0 )
+          CALL local_stop
+
+       ENDIF
+!
+!--    Determine prefix for dvrp_file
+       WRITE ( prefix_chr, '(I2.2,''_'')' )  m
+!
+!--    Camera position must be computed and written on file when no dvrp-output
+!--    has been generated so far (in former runs)
+!       IF ( dvrp_filecount == 0 )  THEN
+!
+!--       Compute center of domain and distance of camera from center
+          center(1) = ( clip_dvrp_l + clip_dvrp_r ) * 0.5_wp * superelevation_x
+          center(2) = ( clip_dvrp_s + clip_dvrp_n ) * 0.5_wp * superelevation_y
+          center(3) = ( zu(nz_do3d) - zu(nzb) ) * 0.5_wp * superelevation
+          distance  = 1.5_wp * MAX(                                            &
+                           (clip_dvrp_r-clip_dvrp_l) * superelevation_x,       &
+                           (clip_dvrp_n-clip_dvrp_s) * superelevation_y,       &
+                           ( zu(nz_do3d) - zu(nzb) ) * superelevation          &
+                                  )
+
+!
+!--       Write camera position on file
+          CALL DVRP_INIT( m-1, 0 )
+
+!
+!--       Create filename for camera
+          IF ( dvrp_output == 'rtsp' )  THEN
+
+             dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // '/camera.dvr'
+             dvrp_file_c = dvrp_file
+             CALL DVRP_OUTPUT_RTSP( m-1, dvrp_host_c, dvrp_username_c, &
+                                    dvrp_password_c, dvrp_directory_c, &
+                                    dvrp_file_c )
+
+          ELSEIF ( dvrp_output == 'ftp' )  THEN
+
+             dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // '.camera.dvr'
+             dvrp_file_c = dvrp_file
+!             CALL DVRP_OUTPUT_FTP( m-1, 0, dvrp_host_c, dvrp_username_c, &
+!                                   dvrp_password_c, dvrp_directory_c,    &
+!                                   dvrp_file_c )
+
+          ELSE
+
+             IF ( dvrp_file(1:9) /= '/dev/null' )  THEN
+                dvrp_file_local   = prefix_chr // TRIM( mode_dvrp(m) )  &
+                     // '.camera.dvr'
+                dvrp_file_local_c = dvrp_file_local
+             ELSE
+                dvrp_file_local_c = dvrp_file_c
+             ENDIF
+             CALL DVRP_OUTPUT_LOCAL( m-1, 0, dvrp_file_local_c )
+
+          ENDIF
+
+          CALL DVRP_CAMERA( m-1, center, distance )
+
+!
+!--       Define bounding box material and create a bounding box
+          tmp_r = 0.5_wp;  tmp_g = 0.5_wp;  tmp_b = 0.5_wp;  tmp_t = 0.0_wp
+          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
+
+          tmp_1 = 0.01_wp;
+          tmp_2 = clip_dvrp_l * superelevation_x
+          tmp_3 = clip_dvrp_s * superelevation_y
+          tmp_4 = 0.0_wp
+          tmp_5 = (clip_dvrp_r+dx) * superelevation_x
+          tmp_6 = (clip_dvrp_n+dy) * superelevation_y
+          tmp_7 = zu(nz_do3d) * superelevation
+          CALL DVRP_BOUNDINGBOX( m-1, 1, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, &
+                                 tmp_6, tmp_7 )
+
+          CALL DVRP_VISUALIZE( m-1, 0, 0 )
+          CALL DVRP_EXIT( m-1 )
+
+!
+!--       Write topography isosurface on file
+          IF ( TRIM( topography ) /= 'flat' )  THEN
+
+             CALL DVRP_INIT( m-1, 0 )
+
+!
+!--          Create filename for topography
+             IF ( dvrp_output == 'rtsp' )  THEN
+
+                dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) )  &
+                              // '/topography.dvr'
+                dvrp_file_c = dvrp_file
+                CALL DVRP_OUTPUT_RTSP( m-1, dvrp_host_c, dvrp_username_c, &
+                                       dvrp_password_c, dvrp_directory_c, &
+                                       dvrp_file_c )
+
+             ELSEIF ( dvrp_output == 'ftp' )  THEN
+
+                dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) )  &
+                              // '.topography.dvr'
+                dvrp_file_c = dvrp_file
+!                CALL DVRP_OUTPUT_FTP( m-1, 0, dvrp_host_c, dvrp_username_c, &
+!                                      dvrp_password_c, dvrp_directory_c,    &
+!                                      dvrp_file_c )
+
+             ELSE
+
+                IF ( dvrp_file(1:9) /= '/dev/null' )  THEN
+                   dvrp_file_local   = prefix_chr // TRIM( mode_dvrp(m) )  &
+                                       // '.topography.dvr'
+                   dvrp_file_local_c = dvrp_file_local
+                ELSE
+                   dvrp_file_local_c = dvrp_file_c
+                ENDIF
+                CALL DVRP_OUTPUT_LOCAL( m-1, 0, dvrp_file_local_c )
+
+             ENDIF
+
+!
+!--          Determine local gridpoint coordinates
+             IF ( .NOT. allocated )  THEN
+                ALLOCATE( xcoor_dvrp(nxl_dvrp:nxr_dvrp+1), &
+                          ycoor_dvrp(nys_dvrp:nyn_dvrp+1), &
+                          zcoor_dvrp(nzb:nz_do3d) )
+                allocated = .TRUE.
+
+                DO  i = nxl_dvrp, nxr_dvrp+1
+                   xcoor_dvrp(i) = i * dx * superelevation_x
+                ENDDO
+                DO  j = nys_dvrp, nyn_dvrp+1
+                   ycoor_dvrp(j) = j * dy * superelevation_y
+                ENDDO
+                zcoor_dvrp = zu(nzb:nz_do3d) * superelevation
+                nx_dvrp    = nxr_dvrp+1 - nxl_dvrp + 1
+                ny_dvrp    = nyn_dvrp+1 - nys_dvrp + 1
+                nz_dvrp    = nz_do3d - nzb + 1
+             ENDIF
+
+!
+!--          Define the grid used by dvrp
+             CALL DVRP_NO_GLOBAL_GRID( m-1, 1 )
+             CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, &
+                             ycoor_dvrp, zcoor_dvrp )
+
+             tmp_r = topography_color(1)
+             tmp_g = topography_color(2)
+             tmp_b = topography_color(3)
+             tmp_t = 0.0_wp
+             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
+
+!
+!--          Compute and plot isosurface in dvr-format
+             ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1, &
+                                nzb:nz_do3d) )
+             local_pf = 0.0_wp
+             IF ( dvrp_overlap )  THEN
+                DO  i = nxl_dvrp, nxr_dvrp+1
+                   DO  j = nys_dvrp, nyn_dvrp+1
+                      IF ( nzb_s_inner(j,i) > 0 )  THEN
+                         local_pf(i,j,nzb:nzb_s_inner(j,i)) = 1.0_wp
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
+                             cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
+
+             tmp_th = 1.0_wp
+             CALL DVRP_THRESHOLD( m-1, tmp_th )
+
+!
+!--          Reduce the number of polygones, if required
+             IF ( cluster_size > 1 )  THEN
+
+                cluster_size_x = cluster_size
+                cluster_size_y = cluster_size
+                cluster_size_z = cluster_size
+                cluster_mode     = 4    ! vertex clustering mode
+                gradient_normals = 0    ! use flat-shading
+
+                CALL DVRP_CLUSTER_SIZE( m-1, cluster_size_x, cluster_size_y, &
+                                        cluster_size_z )
+                CALL DVRP_CLUSTERING_MODE( m-1, cluster_mode )
+                CALL DVRP_GRADIENTNORMALS( m-1, gradient_normals )
+!
+!--             Set parameter for vertex clustering mode 4.
+!--             ATTENTION: A seperate procedure for setting cluster_alpha will
+!--                        be in the next version of libDVRP (Feb 09)
+                cluster_alpha = 38.0_wp
+                CALL DVRP_THRESHOLD( -(m-1)-1, cluster_alpha )
+
+                CALL DVRP_VISUALIZE( m-1, 21, 0 )
+
+             ELSE
+!
+!--             No polygon reduction
+                CALL DVRP_VISUALIZE( m-1, 1, 0 )
+
+             ENDIF
+
+             DEALLOCATE( local_pf )
+
+             CALL DVRP_EXIT( m-1 )
+
+          ENDIF
+
+!
+!--       Write the ground plate (z=0) isosurface on file
+          CALL DVRP_INIT( m-1, 0 )
+
+!
+!--       Create filename for surface
+          IF ( dvrp_output == 'rtsp' )  THEN
+
+             dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // &
+                           '/groundplate.dvr'
+             dvrp_file_c = dvrp_file
+             CALL DVRP_OUTPUT_RTSP( m-1, dvrp_host_c, dvrp_username_c, &
+                                    dvrp_password_c, dvrp_directory_c, &
+                                    dvrp_file_c )
+
+          ELSEIF ( dvrp_output == 'ftp' )  THEN
+
+             dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // &
+                           '.groundplate.dvr'
+             dvrp_file_c = dvrp_file
+!             CALL DVRP_OUTPUT_FTP( m-1, 0, dvrp_host_c, dvrp_username_c, &
+!                                   dvrp_password_c, dvrp_directory_c,    &
+!                                   dvrp_file_c )
+
+          ELSE
+
+             IF ( dvrp_file(1:9) /= '/dev/null' )  THEN
+                dvrp_file_local   = prefix_chr // TRIM( mode_dvrp(m) )  &
+                     // '.groundplate.dvr'
+                dvrp_file_local_c = dvrp_file_local
+             ELSE
+                dvrp_file_local_c = dvrp_file_c
+             ENDIF
+             CALL DVRP_OUTPUT_LOCAL( m-1, 0, dvrp_file_local_c )
+
+          ENDIF
+
+!
+!--       Determine local gridpoint coordinates
+          IF ( .NOT. allocated )  THEN
+             ALLOCATE( xcoor_dvrp(nxl_dvrp:nxr_dvrp+1), &
+                       ycoor_dvrp(nys_dvrp:nyn_dvrp+1), &
+                       zcoor_dvrp(nzb:nz_do3d) )
+             allocated = .TRUE.
+
+             DO  i = nxl_dvrp, nxr_dvrp+1
+                xcoor_dvrp(i) = i * dx * superelevation_x
+             ENDDO
+             DO  j = nys_dvrp, nyn_dvrp+1
+                ycoor_dvrp(j) = j * dy * superelevation_y
+             ENDDO
+             zcoor_dvrp = zu(nzb:nz_do3d) * superelevation
+             nx_dvrp    = nxr_dvrp+1 - nxl_dvrp + 1
+             ny_dvrp    = nyn_dvrp+1 - nys_dvrp + 1
+             nz_dvrp    = nz_do3d - nzb + 1
+          ENDIF
+
+!
+!--       Define the grid used by dvrp
+          CALL DVRP_NO_GLOBAL_GRID( m-1, 1 )
+          CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, &
+                          ycoor_dvrp, zcoor_dvrp )
+
+          tmp_r = groundplate_color(1)
+          tmp_g = groundplate_color(2)
+          tmp_b = groundplate_color(3)
+          tmp_t = 0.0_wp
+          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
+
+!
+!--       Compute and plot isosurface in dvr-format
+          ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1, &
+                             nzb:nz_do3d) )
+          local_pf = 0.0_wp
+          IF (dvrp_overlap )  local_pf(:,:,0) = 1.0_wp
+
+          CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
+                          cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
+          tmp_th = 1.0_wp
+          CALL DVRP_THRESHOLD( m-1, tmp_th )
+
+!
+!--       Always reduce the number of polygones as much as possible
+          cluster_size_x = 5
+          cluster_size_y = 5
+          cluster_size_z = 5
+          cluster_mode     = 4    ! vertex clustering mode
+          gradient_normals = 0    ! use flat-shading
+
+          CALL DVRP_CLUSTER_SIZE( m-1, cluster_size_x, cluster_size_y, &
+                                  cluster_size_z )
+          CALL DVRP_CLUSTERING_MODE( m-1, cluster_mode )
+          CALL DVRP_GRADIENTNORMALS( m-1, gradient_normals )
+!
+!--       Set parameter for vertex clustering mode 4.
+!--       ATTENTION: A seperate procedure for setting cluster_alpha will be in
+!--                  the next version of libDVRP (Feb 09)
+          cluster_alpha = 38.0_wp
+          CALL DVRP_THRESHOLD( -(m-1)-1, cluster_alpha )
+
+          CALL DVRP_VISUALIZE( m-1, 21, 0 )
+
+          DEALLOCATE( local_pf )
+
+          CALL DVRP_EXIT( m-1 )
+    
+!       ENDIF
+
+
+!
+!--    Initialize dvrp for all dvrp-calls during the run
+       CALL DVRP_INIT( m-1, 0 )
+
+!
+!--    Preliminary definition of filename for dvrp-output
+       IF ( dvrp_output == 'rtsp' )  THEN
+
+!
+!--       First initialize parameters for possible interactive steering.
+!--       Every parameter has to be passed to the respective stream.
+          pn = 1
+!
+!--       Initialize threshold counter needed for initialization of the
+!--       isosurface steering variables
+          tv = 0
+
+          DO WHILE ( mode_dvrp(pn) /= ' ' )
+
+             IF ( mode_dvrp(pn)(1:10) == 'isosurface' )  THEN
+
+                READ ( mode_dvrp(pn), '(10X,I2)' )  vn
+                steering_dvrp(pn)%name = do3d(0,vn)
+                tv = tv + 1
+
+                IF ( do3d(0,vn)(1:1) == 'w' )  THEN
+                   steering_dvrp(pn)%min  = -4.0_wp
+                   steering_dvrp(pn)%max  =  5.0_wp
+                ELSE
+                   steering_dvrp(pn)%min  = 288.0_wp
+                   steering_dvrp(pn)%max  = 292.0_wp
+                ENDIF
+
+                name_c  = TRIM( do3d(0,vn) )
+                tmp_thr = threshold(tv)
+                CALL DVRP_STEERING_INIT( m-1, name_c, steering_dvrp(pn)%min, &
+                                         steering_dvrp(pn)%max, tmp_thr )
+
+             ELSEIF ( mode_dvrp(pn)(1:6) == 'slicer' )  THEN
+
+                READ ( mode_dvrp(pn), '(6X,I2)' )  vn
+                steering_dvrp(pn)%name = do2d(0,vn)
+                name_c = TRIM( do2d(0,vn) )
+
+                l = MAX( 2, LEN_TRIM( do2d(0,vn) ) )
+                section_chr = do2d(0,vn)(l-1:l)
+                SELECT CASE ( section_chr )
+                   CASE ( 'xy' )
+                      steering_dvrp(pn)%imin   = 0
+                      steering_dvrp(pn)%imax   = nz_do3d
+                      slicer_position_dvrp(pn) = section(1,1)
+                      CALL DVRP_STEERING_INIT( m-1, name_c,            &
+                                               steering_dvrp(pn)%imin, &
+                                               steering_dvrp(pn)%imax, &
+                                               slicer_position_dvrp(pn) )
+                   CASE ( 'xz' )
+                      steering_dvrp(pn)%imin   = 0
+                      steering_dvrp(pn)%imax   = ny
+                      slicer_position_dvrp(pn) = section(1,2)
+                      CALL DVRP_STEERING_INIT( m-1, name_c,            &
+                                               steering_dvrp(pn)%imin, &
+                                               steering_dvrp(pn)%imax, &
+                                               slicer_position_dvrp(pn) )
+                   CASE ( 'yz' )
+                      steering_dvrp(pn)%imin = 0
+                      steering_dvrp(pn)%imax = nx
+                      slicer_position_dvrp(pn) = section(1,3)
+                      CALL DVRP_STEERING_INIT( m-1, name_c,            &
+                                               steering_dvrp(pn)%imin, &
+                                               steering_dvrp(pn)%imax, &
+                                               slicer_position_dvrp(pn) )
+                END SELECT
+
+             ENDIF
+
+             pn = pn + 1
+
+          ENDDO
+
+          dvrp_file = prefix_chr // TRIM( mode_dvrp(m) ) // '/*****.dvr'
+          dvrp_file_c = dvrp_file
+          CALL DVRP_OUTPUT_RTSP( m-1, dvrp_host_c, dvrp_username_c, &
+                                 dvrp_password_c, dvrp_directory_c, &
+                                 dvrp_file_c )
+
+       ELSEIF ( dvrp_output == 'ftp' )  THEN
+
+          dvrp_file   = prefix_chr // TRIM( mode_dvrp(m) ) // '.%05d.dvr'
+          dvrp_file_c = dvrp_file
+!          CALL DVRP_OUTPUT_FTP( m-1, 0, dvrp_host_c, dvrp_username_c, &
+!                                dvrp_password_c, dvrp_directory_c, dvrp_file_c )
+
+       ELSE
+
+          IF ( dvrp_file(1:9) /= '/dev/null' )  THEN
+             dvrp_file_local   = prefix_chr // TRIM( mode_dvrp(m) )  &
+                  // '_%05d.dvr'
+             dvrp_file_local_c = dvrp_file_local
+          ELSE
+             dvrp_file_local_c = dvrp_file_c
+          ENDIF
+          CALL DVRP_OUTPUT_LOCAL( m-1, 0, dvrp_file_local_c )
+
+       ENDIF
+
+!
+!--    Determine local gridpoint coordinates
+       IF ( .NOT. allocated )  THEN
+          ALLOCATE( xcoor_dvrp(nxl_dvrp:nxr_dvrp+1), &
+                    ycoor_dvrp(nys_dvrp:nyn_dvrp+1), &
+                    zcoor_dvrp(nzb:nz_do3d) )
+          allocated = .TRUE.
+
+          DO  i = nxl_dvrp, nxr_dvrp+1
+             xcoor_dvrp(i) = i * dx * superelevation_x
+          ENDDO
+          DO  j = nys_dvrp, nyn_dvrp+1
+             ycoor_dvrp(j) = j * dy * superelevation_y
+          ENDDO
+          zcoor_dvrp = zu(nzb:nz_do3d) * superelevation
+          nx_dvrp    = nxr_dvrp+1 - nxl_dvrp + 1
+          ny_dvrp    = nyn_dvrp+1 - nys_dvrp + 1
+          nz_dvrp    = nz_do3d - nzb + 1
+       ENDIF
+
+!
+!--    Define the grid used by dvrp
+       IF ( mode_dvrp(m) /= 'pathlines' )  THEN
+          CALL DVRP_NO_GLOBAL_GRID( m-1, 1 )
+       ENDIF
+       CALL DVRP_GRID( m-1, nx_dvrp, ny_dvrp, nz_dvrp, xcoor_dvrp, ycoor_dvrp, &
+                       zcoor_dvrp )
+
+       IF ( mode_dvrp(m) == 'pathlines' )  THEN
+
+          tmp_x1 = 0.0_wp;  tmp_y1 = 0.0_wp;  tmp_z1 = 0.0_wp
+          tmp_x2 = 1.0_wp;  tmp_y2 = 1.0_wp;  tmp_z2 = 0.3_wp
+          CALL DVRP_CUBIC_SEEDING( m-1, tmp_x1, tmp_y1, tmp_z1, tmp_x2, tmp_y2,&
+                                   tmp_z2, pathlines_linecount, 2, 0 )
+!
+!--       Set wavecount and wavetime
+          CALL DVRP_PATHLINES_BEHAVIOUR_WAVE( m-1, pathlines_wavecount, &
+                                              pathlines_wavetime,       &
+                                              pathlines_fadeintime,     &
+                                              pathlines_fadeouttime )
+!
+!--       Set pathline length
+          CALL DVRP_PATHLINES_SETMAXHISTORY( m-1, pathlines_maxhistory )
+          CALL DVRP_PATHLINES_SETFADING( m-1, 1, 0.0_wp )
+
+          CALL DVRP_INIT_PATHLINES( m-1, 0 )
+
+       ENDIF
+
+       IF ( mode_dvrp(m)(1:9) == 'particles' )  THEN
+!
+!--       Define a default colourtable for particles
+          DO  i = 1, 11
+             interval_values_dvrp_prt(1,i) = i - 1.0_wp
+             interval_values_dvrp_prt(2,i) = REAL( i, KIND=wp )
+             interval_h_dvrp_prt(:,i) = 270.0_wp - ( i - 1.0_wp ) * 9.0_wp
+          ENDDO
+
+          DO  i = 12, 22
+             interval_values_dvrp_prt(1,i) = i - 1.0_wp
+             interval_values_dvrp_prt(2,i) = REAL( i, KIND=wp )
+             interval_h_dvrp_prt(:,i) = 70.0_wp - ( i - 12.0_wp ) * 9.5_wp
+          ENDDO
+
+          dvrp_colortable_entries_prt = 22
+
+       ENDIF
+
+       m = m + 1
+
+    ENDDO
+
+#endif
+ END SUBROUTINE init_dvrp
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializes logging events for time measurement with dvrp software
+!> and splits one PE from the global communicator in case that dvrp output
+!> shall be done by one single PE.
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE init_dvrp_logging
+
+#if defined( __dvrp_graphics )
+
+    USE dvrp_variables,                                                        &
+        ONLY:  use_seperate_pe_for_dvrp_output
+    
+    USE kinds
+    
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=4) ::  chr  !<
+    
+    INTEGER(iwp) ::  idummy    !<
+
+!
+!-- Initialize logging of calls by DVRP graphic software
+    CALL DVRP_LOG_INIT( 'DVRP_LOG' // CHAR( 0 ), 0 )
+
+!
+!-- User-defined logging events: #1 (total time needed by PALM)
+    CALL DVRP_LOG_SYMBOL( 1, 'PALM_total' // CHAR( 0 ) )
+    CALL DVRP_LOG_SYMBOL( 2, 'PALM_timestep' // CHAR( 0 ) )
+    CALL DVRP_LOG_EVENT( 1, 1 )
+
+#if defined( __parallel )
+!
+!-- Find out, if dvrp output shall be done by a dedicated PE
+    CALL GET_ENVIRONMENT_VARIABLE( 'use_seperate_pe_for_dvrp_output', chr,     &
+                                   idummy )
+    IF ( chr == 'true' )  THEN
+
+       use_seperate_pe_for_dvrp_output = .TRUE.
+
+!
+!--    Adjustment for new MPI-1 coupling. This might be unnecessary.
+       IF ( coupling_mode /= 'uncoupled' ) THEN
+          message_string = 'split of communicator not realized with' // &
+                          ' MPI1 coupling atmosphere-ocean'
+          CALL message( 'init_dvrp_logging', 'PA0199', 1, 2, 0, 6, 0 )
+ 
+          CALL DVRP_SPLIT( comm_inter, comm_palm )
+       ELSE
+          CALL DVRP_SPLIT( MPI_COMM_WORLD, comm_palm )
+       ENDIF
+
+       CALL MPI_COMM_SIZE( comm_palm, numprocs, ierr )
+
+    ENDIF
+#endif
+
+#endif
+ END SUBROUTINE init_dvrp_logging
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Exit of dvrp software and finish dvrp logging
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE close_dvrp
+
+#if defined( __dvrp_graphics )
+                                               
+    USE DVRP
+    
+    USE dvrp_variables,                                                        &
+        ONLY: use_seperate_pe_for_dvrp_output
+    
+    USE kinds
+
+    INTEGER(iwp) ::  m  !<
+
+!
+!-- If required, close dvrp-software and logging of dvrp-calls
+    IF ( dt_dvrp /= 9999999.9_wp )  THEN
+       m = 1
+       DO WHILE ( mode_dvrp(m) /= ' ' )
+          CALL DVRP_EXIT( m-1 )
+          m = m + 1
+       ENDDO
+       CALL DVRP_LOG_EVENT( -1, 1 )   ! Logging of total cpu-time used by PALM
+       IF ( use_seperate_pe_for_dvrp_output )  THEN
+          CALL DVRP_SPLIT_EXIT( 1 )      ! Argument 0: reduced output
+       ELSE
+          CALL DVRP_LOG_EXIT( 1 )        ! Argument 0: reduced output
+       ENDIF
+    ENDIF
+
+#endif
+ END SUBROUTINE close_dvrp
Index: /palm/tags/release-6.0/SOURCE/init_grid.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_grid.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_grid.f90	(revision 3477)
@@ -0,0 +1,2759 @@
+!> @file init_grid.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! ocean renamed ocean_mode
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3200 2018-08-17 14:46:36Z suehring
+! Bugfix, missing pre-processor directive
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables in mesoscale-offline nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Bugfix in referencing buildings on orography top
+! 
+! 3139 2018-07-17 11:30:10Z Giersch
+! Bugfix in case of restarts and grid stretching
+! 
+! 3115 2018-07-10 12:49:26Z suehring
+! Referencing of buildings onto top of terrain - special treatment for bridges. 
+! 
+! 3103 2018-07-04 17:30:52Z suehring
+! Reference lowest terrain height to zero level
+! 
+! 3068 2018-06-12 14:49:41Z Giersch
+! New warning message concerning grid stretching has been introduced
+! 
+! 3066 2018-06-12 08:55:55Z Giersch
+! Bugfix in IF statement before error message
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! New vertical stretching mechanism introduced
+! 
+! 3051 2018-05-30 17:43:55Z suehring
+! Minor bugfix concerning mapping 3D buildings on top of terrain
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 2968 2018-04-13 11:52:24Z suehring
+! Bugfix in initialization in case of elevated model surface. Introduce
+! index for minimum topography-top. 
+! 
+! 2955 2018-04-09 15:14:01Z suehring
+! Improve topography filter routine and add ghost-point exchange for building 
+! ID and building type. 
+! 
+! 2927 2018-03-23 15:13:00Z suehring
+! Bugfix, setting boundary conditions for topography index array.
+! 
+! 2918 2018-03-21 15:52:14Z gronemeier
+! Moved init_mixing_length to turbulence_closure_mod.f90
+! 
+! 2897 2018-03-15 11:47:16Z suehring
+! Relax restrictions for topography input, terrain and building heights can be
+! input separately and are not mandatory any more. 
+! 
+! 2893 2018-03-14 16:20:52Z suehring
+! Revise informative message concerning filtered topography (1 grid-point 
+! holes). 
+! 
+! 2892 2018-03-14 15:06:29Z suehring
+! Bugfix, uninitialized array in case of single_building.
+! 
+! 2867 2018-03-09 09:40:23Z suehring
+! Revise mapping of 3D buildings onto onto orography.
+! 
+! 2823 2018-02-20 15:31:45Z Giersch
+! Set boundary conditions for 3D topography in case of non-cyclic boundary 
+! conditions
+! 
+! 2796 2018-02-08 12:25:39Z suehring
+! Bugfix in 3D building initialization
+! 
+! 2747 2018-01-15 12:44:17Z suehring
+! Bugfix, topography height is rounded to the nearest discrete grid level
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Revised topography input
+! Set nzb_max not for the entire nest domain, only for boundary PEs
+! Re-organize routine, split-up into several subroutines
+! Modularize poismg_noopt
+! Remove setting bit 26, 27, 28 in wall_flags_0, indicating former '_outer'
+! arrays (not required any more).  
+! Bugfix in generic tunnel setup (MS)
+! 
+! 2550 2017-10-16 17:12:01Z boeske
+! Set lateral boundary conditions for topography on all three ghost layers
+! 
+! 2478 2017-09-18 13:37:24Z suehring
+! Bugfix, correct flag for use_top
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical nesting implemented (SadiqHuq)
+! 
+! 2319 2017-07-20 17:33:17Z suehring
+! Remove print statements
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+! Bugfixes in reading 3D topography from file
+! 
+! 2274 2017-06-09 13:27:48Z Giersch
+! Changed error messages
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! - Adjustments according to new topography representation
+! - Bugfix: Move determination of nzb_max behind topography modification in 
+!   cell-edge case 
+! - Get rid off global arrays required for topography output
+! - Enable topography input via netcdf 
+! - Generic tunnel set-up added
+! 
+! 2200 2017-04-11 11:37:51Z suehring
+! monotonic_adjustment removed
+! 
+! 2169 2017-03-06 18:16:35Z suehring
+! Bugfix, move setting for topography grid convention to init_grid, else, if no
+! value is set, the simulation may abort in case of restarts
+! 
+! 2128 2017-01-23 15:00:03Z suehring
+! Bugfix in setting topography from file in case of ocean simulations
+! 
+! 2088 2016-12-19 16:30:25Z suehring
+! Bugfix in generic topography in case of ocean simulations
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2021 2016-10-07 14:08:57Z suehring
+! Bugfix: setting Neumann boundary conditions for topography required for 
+! topography flags in multigrid_noopt solver
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1994 2016-08-15 09:52:21Z suehring
+! Bugfix in definition of generic topography
+! 
+! 1982 2016-08-01 11:04:48Z suehring
+! Bugfix concering consistency check for topography
+! 
+! 1968 2016-07-18 12:01:49Z suehring
+! Changed: PE-wise reading of topography file in order to avoid global definition
+! of arrays nzb_local and nzb_tmp. Thereby, topography definition for single
+! buildings and street canyons has changed, as well as flag setting for 
+! multigrid scheme.
+!
+! Bugfix in checking l_grid anisotropy. 
+! Simplify initial computation of lwall and vertical_influence, i.e. remove 
+! nzb_s_inner as it is still zero at this point.
+! 
+! 1942 2016-06-14 12:18:18Z suehring
+! Topography filter implemented to fill holes resolved by only one grid point.
+! Initialization of flags for ws-scheme moved to advec_ws.  
+! 
+! 1931 2016-06-10 12:06:59Z suehring
+! Rename multigrid into multigrid_noopt and multigrid_fast into multigrid
+!
+! 1910 2016-05-26 06:49:46Z raasch
+! Bugfix: if topography is read from file, Neumann conditions are used for the
+! nzb_local array (instead of cyclic conditions) in case that non-cyclic
+! boundary conditions are switched on for the run
+!
+! 1902 2016-05-09 11:18:56Z suehring
+! Set topography flags for multigrid solver only (not for multigrid_fast)
+!
+! 1886 2016-04-21 11:20:47Z suehring
+! Bugfix: setting advection flags near walls
+! reformulated index values for nzb_v_inner
+! variable discriptions added in declaration block
+!
+! 1845 2016-04-08 08:29:13Z raasch
+! nzb_2d removed
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! coupling_char is trimmed at every place it occurs, because it can have
+! different length now
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1743 2016-01-13 10:23:51Z raasch
+! Bugfix for calculation of nzb_s_outer and nzb_u_outer at north boundary of
+! total domain
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Renamed prandtl_layer to constant_flux_layer.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1677 2015-10-02 13:25:23Z boeske
+! Bugfix: Ghost points are included in wall_flags_0 and wall_flags_00
+! 
+! 1675 2015-10-02 08:28:59Z gronemeier
+! Bugfix: Definition of topography grid levels
+! 
+! 1660 2015-09-21 08:15:16Z gronemeier
+! Bugfix: Definition of topography grid levels if vertical grid stretching
+!         starts below the maximum topography height.
+!
+! 1580 2015-04-10 13:43:49Z suehring
+! Bugfix: setting flags for 5th order scheme near buildings
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! adjustments for psolver-queries
+!
+! 1557 2015-03-05 16:43:04Z suehring
+! Adjustment for monotoinic limiter
+!
+! 1418 2014-06-06 13:05:08Z fricke
+! Bugfix: Change if-condition for stretched grid in the ocean, with the old
+!          condition and a negative value for dz_stretch_level the condition
+!          was always true for the whole model domain
+!
+! 1409 2014-05-23 12:11:32Z suehring
+! Bugfix: set wall_flags_0 at inflow and outflow boundary also for i <= nxlu 
+! j <= nysv
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1221 2013-09-10 08:59:13Z raasch
+! wall_flags_00 introduced to hold bits 32-63,
+! additional 3D-flag arrays for replacing the 2D-index array nzb_s_inner in
+! loops optimized for openACC (pres + flow_statistics)
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1069 2012-11-28 16:18:43Z maronga
+! bugfix: added coupling_char to TOPOGRAPHY_DATA to allow topography in the
+!         ocean model in case of coupled runs
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! lower index for calculating wall_flags_0 set to nzb_w_inner instead of
+! nzb_w_inner+1
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+!
+! 978 2012-08-09 08:28:32Z fricke
+! Bugfix: nzb_max is set to nzt at non-cyclic lateral boundaries
+! Bugfix: Set wall_flags_0 for inflow boundary
+!
+! 927 2012-06-06 19:15:04Z raasch
+! Wall flags are not set for multigrid method in case of masking method
+!
+! 864 2012-03-27 15:10:33Z gryschka 
+! In case of ocean and Dirichlet bottom bc for u and v dzu_mg and ddzu_pres
+! were not correctly defined for k=1.
+!
+! 861 2012-03-26 14:18:34Z suehring
+! Set wall_flags_0. The array is needed for degradation in ws-scheme near walls,
+! inflow and outflow boundaries as well as near the bottom and the top of the
+! model domain.!
+! Initialization of nzb_s_inner and nzb_w_inner.
+! gls has to be at least nbgp to do not exceed the array bounds of nzb_local
+! while setting wall_flags_0
+!
+! 843 2012-02-29 15:16:21Z gryschka
+! In case of ocean and dirichlet bc for u and v at the bottom
+! the first u-level ist defined at same height as the first w-level
+!
+! 818 2012-02-08 16:11:23Z maronga
+! Bugfix: topo_height is only required if topography is used. It is thus now
+! allocated in the topography branch
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! Revision 1.1  1997/08/11 06:17:45  raasch
+! Initial revision (Testversion)
+!
+!
+! Description:
+! -----------------------------------------------------------------------------!
+!> Creating grid depending constants
+!> @todo: Rearrange topo flag list
+!> @todo: reference 3D buildings on top of orography is not tested and may need
+!>        further improvement for steep slopes
+!> @todo: Use more advanced setting of building type at filled holes 
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_grid
+ 
+    USE advec_ws,                                                              &
+        ONLY:  ws_init_flags
+
+    USE arrays_3d,                                                             &
+        ONLY:  dd2zu, ddzu, ddzu_pres, ddzw, dzu, dzw, zu, zw
+        
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
+               bc_dirichlet_s, bc_lr_cyc, bc_ns_cyc, bc_radiation_l,           &
+               bc_radiation_n, bc_radiation_r, bc_radiation_s,                 &
+               constant_flux_layer, dz, dz_max, dz_stretch_factor,             &
+               dz_stretch_factor_array, dz_stretch_level, dz_stretch_level_end,&
+               dz_stretch_level_end_index, dz_stretch_level_start_index,       &
+               dz_stretch_level_start, ibc_uv_b, message_string,               &
+               momentum_advec, number_stretch_level_end,                       &
+               number_stretch_level_start, ocean_mode, psolver, scalar_advec,  &
+               topography, use_surface_fluxes
+         
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddx2, ddy, ddy2, dx, dx2, dy, dy2, zu_s_inner, zw_w_inner
+        
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz,   &
+               nzb, nzb_diff, nzb_diff_s_inner, nzb_diff_s_outer,              &
+               nzb_max, nzb_s_inner, nzb_s_outer, nzb_u_inner,                 &
+               nzb_u_outer, nzb_v_inner, nzb_v_outer, nzb_w_inner,             &
+               nzb_w_outer, nzt, topo_min_level
+    
+    USE kinds
+
+    USE pegrid
+
+    USE poismg_noopt_mod
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index, get_topography_top_index_ji, init_bc
+
+    USE vertical_nesting_mod,                                                  &
+        ONLY:  vnested, vnest_init_grid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i             !< index variable along x 
+    INTEGER(iwp) ::  j             !< index variable along y
+    INTEGER(iwp) ::  k             !< index variable along z
+    INTEGER(iwp) ::  k_top         !< topography top index on local PE
+    INTEGER(iwp) ::  n             !< loop variable for stretching
+    INTEGER(iwp) ::  number_dz     !< number of user-specified dz values       
+    INTEGER(iwp) ::  nzb_local_max !< vertical grid index of maximum topography height
+    INTEGER(iwp) ::  nzb_local_min !< vertical grid index of minimum topography height
+                                      
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_local  !< index for topography top at cell-center
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_tmp    !< dummy to calculate topography indices on u- and v-grid
+
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  topo !< input array for 3D topography and dummy array for setting "outer"-flags
+
+    REAL(wp) ::  dz_level_end  !< distance between calculated height level for u/v-grid and user-specified end level for stretching
+    REAL(wp) ::  dz_stretched  !< stretched vertical grid spacing
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  min_dz_stretch_level_end !< Array that contains all minimum heights where the stretching can end
+
+
+!
+!-- Calculation of horizontal array bounds including ghost layers
+    nxlg = nxl - nbgp
+    nxrg = nxr + nbgp
+    nysg = nys - nbgp
+    nyng = nyn + nbgp
+
+!
+!-- Allocate grid arrays
+    ALLOCATE( ddzu(1:nzt+1), ddzw(1:nzt+1), dd2zu(1:nzt), dzu(1:nzt+1),        &
+              dzw(1:nzt+1), zu(nzb:nzt+1), zw(nzb:nzt+1) )
+
+!
+!-- Compute height of u-levels from constant grid length and dz stretch factors
+    IF ( dz(1) == -1.0_wp )  THEN
+       message_string = 'missing dz'
+       CALL message( 'init_grid', 'PA0200', 1, 2, 0, 6, 0 ) 
+    ELSEIF ( dz(1) <= 0.0_wp )  THEN
+       WRITE( message_string, * ) 'dz=',dz(1),' <= 0.0'
+       CALL message( 'init_grid', 'PA0201', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Initialize dz_stretch_level_start with the value of dz_stretch_level
+!-- if it was set by the user
+    IF ( dz_stretch_level /= -9999999.9_wp ) THEN
+       dz_stretch_level_start(1) = dz_stretch_level
+    ENDIF
+       
+!
+!-- Determine number of dz values and stretching levels specified by the
+!-- user to allow right controlling of the stretching mechanism and to
+!-- perform error checks. The additional requirement that dz /= dz_max
+!-- for counting number of user-specified dz values is necessary. Otherwise 
+!-- restarts would abort if the old stretching mechanism with dz_stretch_level
+!-- is used (Attention: The user is not allowed to specify a dz value equal
+!-- to the default of dz_max = 999.0). 
+    number_dz = COUNT( dz /= -1.0_wp .AND. dz /= dz_max)
+    number_stretch_level_start = COUNT( dz_stretch_level_start /=              &
+                                       -9999999.9_wp )
+    number_stretch_level_end = COUNT( dz_stretch_level_end /=                  &
+                                      9999999.9_wp )
+
+!
+!-- The number of specified end levels +1 has to be the same than the number 
+!-- of specified dz values
+    IF ( number_dz /= number_stretch_level_end + 1 ) THEN
+       WRITE( message_string, * ) 'The number of values for dz = ',         &
+                                   number_dz, 'has to be the same than& ',  &
+                                   'the number of values for ',             &
+                                   'dz_stretch_level_end + 1 = ',           &
+                                   number_stretch_level_end+1
+          CALL message( 'init_grid', 'PA0156', 1, 2, 0, 6, 0 )
+    ENDIF
+    
+!
+!--    The number of specified start levels has to be the same or one less than 
+!--    the number of specified dz values
+    IF ( number_dz /= number_stretch_level_start + 1 .AND.                  &
+         number_dz /= number_stretch_level_start ) THEN
+       WRITE( message_string, * ) 'The number of values for dz = ',         &
+                                   number_dz, 'has to be the same or one ', &
+                                   'more than& the number of values for ',  &
+                                   'dz_stretch_level_start = ',             &
+                                   number_stretch_level_start
+          CALL message( 'init_grid', 'PA0211', 1, 2, 0, 6, 0 )
+    ENDIF
+    
+!--    The number of specified start levels has to be the same or one more than 
+!--    the number of specified end levels
+    IF ( number_stretch_level_start /= number_stretch_level_end + 1 .AND.   &
+         number_stretch_level_start /= number_stretch_level_end ) THEN
+       WRITE( message_string, * ) 'The number of values for ',              &
+                                  'dz_stretch_level_start = ',              &
+                                   dz_stretch_level_start, 'has to be the ',&
+                                   'same or one more than& the number of ', &
+                                   'values for dz_stretch_level_end = ',    &
+                                   number_stretch_level_end
+          CALL message( 'init_grid', 'PA0216', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Initialize dz for the free atmosphere with the value of dz_max
+    IF ( dz(number_stretch_level_start+1) == -1.0_wp .AND.                     &
+         number_stretch_level_start /= 0 ) THEN 
+       dz(number_stretch_level_start+1) = dz_max
+    ENDIF
+       
+!
+!-- Initialize the stretching factor if (infinitely) stretching in the free 
+!-- atmosphere is desired (dz_stretch_level_end was not specified for the 
+!-- free atmosphere)
+    IF ( number_stretch_level_start == number_stretch_level_end + 1 ) THEN 
+       dz_stretch_factor_array(number_stretch_level_start) =                   &
+       dz_stretch_factor
+    ENDIF
+    
+!
+!-- Allocation of arrays for stretching
+    ALLOCATE( min_dz_stretch_level_end(number_stretch_level_start) )
+
+!
+!-- Define the vertical grid levels
+    IF ( .NOT. ocean_mode )  THEN
+    
+!
+!--    The stretching region has to be large enough to allow for a smooth
+!--    transition between two different grid spacings
+       DO n = 1, number_stretch_level_start
+          min_dz_stretch_level_end(n) = dz_stretch_level_start(n) +            &
+                                        4 * MAX( dz(n),dz(n+1) )
+       ENDDO
+
+       IF ( ANY( min_dz_stretch_level_end(1:number_stretch_level_start) >      &
+                 dz_stretch_level_end(1:number_stretch_level_start) ) ) THEN
+             message_string= 'Eeach dz_stretch_level_end has to be larger ' // &
+                             'than its corresponding value for &' //           &
+                             'dz_stretch_level_start + 4*MAX(dz(n),dz(n+1)) '//&
+                             'to allow for smooth grid stretching'
+             CALL message( 'init_grid', 'PA0224', 1, 2, 0, 6, 0 )
+       ENDIF
+       
+!
+!--    Stretching must not be applied within the prandtl_layer 
+!--    (first two grid points). For the default case dz_stretch_level_start 
+!--    is negative. Therefore the absolut value is checked here.
+       IF ( ANY( ABS( dz_stretch_level_start ) < dz(1) * 1.5_wp ) ) THEN
+          WRITE( message_string, * ) 'Eeach dz_stretch_level_start has to be ',&
+                                     'larger than ', dz(1) * 1.5
+             CALL message( 'init_grid', 'PA0226', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    The stretching has to start and end on a grid level. Therefore 
+!--    user-specified values have to ''interpolate'' to the next lowest level
+       IF ( number_stretch_level_start /= 0 ) THEN
+          dz_stretch_level_start(1) = INT( (dz_stretch_level_start(1) -        &
+                                            dz(1)/2.0) / dz(1) )               &
+                                      * dz(1) + dz(1)/2.0
+       ENDIF
+       
+       IF ( number_stretch_level_start > 1 ) THEN
+          DO n = 2, number_stretch_level_start
+             dz_stretch_level_start(n) = INT( dz_stretch_level_start(n) /      &
+                                              dz(n) ) * dz(n)
+          ENDDO
+       ENDIF
+       
+       IF ( number_stretch_level_end /= 0 ) THEN
+          DO n = 1, number_stretch_level_end
+             dz_stretch_level_end(n) = INT( dz_stretch_level_end(n) /          &
+                                            dz(n+1) ) * dz(n+1)
+          ENDDO
+       ENDIF
+ 
+!
+!--    Determine stretching factor if necessary
+       IF ( number_stretch_level_end >= 1 ) THEN 
+          CALL calculate_stretching_factor( number_stretch_level_end )
+       ENDIF
+
+!
+!--    Grid for atmosphere with surface at z=0 (k=0, w-grid).
+!--    First compute the u- and v-levels. In case of dirichlet bc for u and v
+!--    the first u/v- and w-level (k=0) are defined at same height (z=0). 
+!--    The second u-level (k=1) corresponds to the top of the 
+!--    Prandtl-layer.
+       IF ( ibc_uv_b == 0 .OR. ibc_uv_b == 2 ) THEN
+          zu(0) = 0.0_wp
+       ELSE
+          zu(0) = - dz(1) * 0.5_wp
+       ENDIF
+          
+       zu(1) =   dz(1) * 0.5_wp
+       
+!
+!--    Determine u and v height levels considering the possibility of grid
+!--    stretching in several heights.
+       n = 1
+       dz_stretch_level_start_index = nzt+1
+       dz_stretch_level_end_index = nzt+1
+       dz_stretched = dz(1)
+
+!--    The default value of dz_stretch_level_start is negative, thus the first
+!--    condition is always true. Hence, the second condition is necessary.
+       DO  k = 2, nzt+1
+          IF ( dz_stretch_level_start(n) <= zu(k-1) .AND.                      &
+               dz_stretch_level_start(n) /= -9999999.9_wp ) THEN
+             dz_stretched = dz_stretched * dz_stretch_factor_array(n)
+             
+             IF ( dz(n) > dz(n+1) ) THEN
+                dz_stretched = MAX( dz_stretched, dz(n+1) ) !Restrict dz_stretched to the user-specified (higher) dz
+             ELSE
+                dz_stretched = MIN( dz_stretched, dz(n+1) ) !Restrict dz_stretched to the user-specified (lower) dz
+             ENDIF
+             
+             IF ( dz_stretch_level_start_index(n) == nzt+1 )                         &
+             dz_stretch_level_start_index(n) = k-1
+             
+          ENDIF
+          
+          zu(k) = zu(k-1) + dz_stretched
+          
+!
+!--       Make sure that the stretching ends exactly at dz_stretch_level_end 
+          dz_level_end = ABS( zu(k) - dz_stretch_level_end(n) ) 
+          
+          IF ( dz_level_end  < dz(n+1)/3.0 ) THEN
+             zu(k) = dz_stretch_level_end(n)
+             dz_stretched = dz(n+1)
+             dz_stretch_level_end_index(n) = k
+             n = n + 1             
+          ENDIF
+       ENDDO
+
+!
+!--    Compute the w-levels. They are always staggered half-way between the 
+!--    corresponding u-levels. In case of dirichlet bc for u and v at the 
+!--    ground the first u- and w-level (k=0) are defined at same height (z=0). 
+!--    The top w-level is extrapolated linearly.
+       zw(0) = 0.0_wp
+       DO  k = 1, nzt
+          zw(k) = ( zu(k) + zu(k+1) ) * 0.5_wp
+       ENDDO
+       zw(nzt+1) = zw(nzt) + 2.0_wp * ( zu(nzt+1) - zw(nzt) )
+
+    ELSE
+
+!
+!--    The stretching region has to be large enough to allow for a smooth
+!--    transition between two different grid spacings
+       DO n = 1, number_stretch_level_start
+          min_dz_stretch_level_end(n) = dz_stretch_level_start(n) -            &
+                                        4 * MAX( dz(n),dz(n+1) )
+       ENDDO
+       
+       IF ( ANY( min_dz_stretch_level_end (1:number_stretch_level_start) <     &
+                 dz_stretch_level_end(1:number_stretch_level_start) ) ) THEN
+             message_string= 'Eeach dz_stretch_level_end has to be less ' //   &
+                             'than its corresponding value for &' //           &
+                             'dz_stretch_level_start - 4*MAX(dz(n),dz(n+1)) '//&
+                             'to allow for smooth grid stretching'
+             CALL message( 'init_grid', 'PA0224', 1, 2, 0, 6, 0 )
+       ENDIF
+       
+!
+!--    Stretching must not be applied close to the surface (last two grid 
+!--    points). For the default case dz_stretch_level_start is negative. 
+       IF ( ANY( dz_stretch_level_start > - dz(1) * 1.5_wp ) ) THEN
+          WRITE( message_string, * ) 'Eeach dz_stretch_level_start has to be ',&
+                                     'less than ', dz(1) * 1.5
+             CALL message( 'init_grid', 'PA0226', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    The stretching has to start and end on a grid level. Therefore 
+!--    user-specified values have to ''interpolate'' to the next highest level
+       IF ( number_stretch_level_start /= 0 ) THEN
+          dz_stretch_level_start(1) = INT( (dz_stretch_level_start(1) +        &
+                                            dz(1)/2.0) / dz(1) )               &
+                                      * dz(1) - dz(1)/2.0
+       ENDIF
+       
+       IF ( number_stretch_level_start > 1 ) THEN
+          DO n = 2, number_stretch_level_start
+             dz_stretch_level_start(n) = INT( dz_stretch_level_start(n) /      &
+                                              dz(n) ) * dz(n)
+          ENDDO
+       ENDIF
+       
+       IF ( number_stretch_level_end /= 0 ) THEN
+          DO n = 1, number_stretch_level_end
+             dz_stretch_level_end(n) = INT( dz_stretch_level_end(n) /          &
+                                            dz(n+1) ) * dz(n+1)
+          ENDDO
+       ENDIF
+       
+!
+!--    Determine stretching factor if necessary
+       IF ( number_stretch_level_end >= 1 ) THEN 
+          CALL calculate_stretching_factor( number_stretch_level_end )
+       ENDIF
+
+!
+!--    Grid for ocean with free water surface is at k=nzt (w-grid).
+!--    In case of neumann bc at the ground the first first u-level (k=0) lies
+!--    below the first w-level (k=0). In case of dirichlet bc the first u- and
+!--    w-level are defined at same height, but staggered from the second level.
+!--    The second u-level (k=1) corresponds to the top of the Prandtl-layer.
+!--    z values are negative starting from z=0 (surface)
+       zu(nzt+1) =   dz(1) * 0.5_wp
+       zu(nzt)   = - dz(1) * 0.5_wp
+
+!
+!--    Determine u and v height levels considering the possibility of grid
+!--    stretching in several heights.
+       n = 1
+       dz_stretch_level_start_index = 0
+       dz_stretch_level_end_index = 0
+       dz_stretched = dz(1)
+
+       DO  k = nzt-1, 0, -1
+          
+          IF ( dz_stretch_level_start(n) >= zu(k+1) ) THEN
+             dz_stretched = dz_stretched * dz_stretch_factor_array(n)
+
+             IF ( dz(n) > dz(n+1) ) THEN
+                dz_stretched = MAX( dz_stretched, dz(n+1) ) !Restrict dz_stretched to the user-specified (higher) dz
+             ELSE
+                dz_stretched = MIN( dz_stretched, dz(n+1) ) !Restrict dz_stretched to the user-specified (lower) dz
+             ENDIF
+             
+             IF ( dz_stretch_level_start_index(n) == 0 )                             &
+             dz_stretch_level_start_index(n) = k+1
+             
+          ENDIF
+          
+          zu(k) = zu(k+1) - dz_stretched
+          
+!
+!--       Make sure that the stretching ends exactly at dz_stretch_level_end 
+          dz_level_end = ABS( zu(k) - dz_stretch_level_end(n) ) 
+          
+          IF ( dz_level_end  < dz(n+1)/3.0 ) THEN
+             zu(k) = dz_stretch_level_end(n)
+             dz_stretched = dz(n+1)
+             dz_stretch_level_end_index(n) = k
+             n = n + 1             
+          ENDIF
+       ENDDO
+       
+!
+!--    Compute the w-levels. They are always staggered half-way between the 
+!--    corresponding u-levels, except in case of dirichlet bc for u and v
+!--    at the ground. In this case the first u- and w-level are defined at 
+!--    same height. The top w-level (nzt+1) is not used but set for 
+!--    consistency, since w and all scalar variables are defined up tp nzt+1.
+       zw(nzt+1) = dz(1)
+       zw(nzt)   = 0.0_wp
+       DO  k = 0, nzt
+          zw(k) = ( zu(k) + zu(k+1) ) * 0.5_wp
+       ENDDO
+
+!
+!--    In case of dirichlet bc for u and v the first u- and w-level are defined
+!--    at same height.
+       IF ( ibc_uv_b == 0 ) THEN
+          zu(0) = zw(0)
+       ENDIF
+
+    ENDIF
+
+!
+!-- Compute grid lengths.
+    DO  k = 1, nzt+1
+       dzu(k)  = zu(k) - zu(k-1)
+       ddzu(k) = 1.0_wp / dzu(k)
+       dzw(k)  = zw(k) - zw(k-1)
+       ddzw(k) = 1.0_wp / dzw(k)
+    ENDDO
+
+    DO  k = 1, nzt
+       dd2zu(k) = 1.0_wp / ( dzu(k) + dzu(k+1) )
+    ENDDO
+    
+!    
+!-- The FFT- SOR-pressure solvers assume grid spacings of a staggered grid
+!-- everywhere. For the actual grid, the grid spacing at the lowest level
+!-- is only dz/2, but should be dz. Therefore, an additional array
+!-- containing with appropriate grid information is created for these
+!-- solvers.
+    IF ( psolver(1:9) /= 'multigrid' )  THEN
+       ALLOCATE( ddzu_pres(1:nzt+1) )
+       ddzu_pres = ddzu
+       ddzu_pres(1) = ddzu_pres(2)  ! change for lowest level
+    ENDIF
+
+!
+!-- Compute the reciprocal values of the horizontal grid lengths.
+    ddx = 1.0_wp / dx
+    ddy = 1.0_wp / dy
+    dx2 = dx * dx
+    dy2 = dy * dy
+    ddx2 = 1.0_wp / dx2
+    ddy2 = 1.0_wp / dy2
+
+!
+!-- Allocate 3D array to set topography
+    ALLOCATE( topo(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    topo = 0
+!
+!-- Initialize topography by generic topography or read from topography from file.  
+    CALL init_topo( topo )
+!
+!-- Set flags to mask topography on the grid. 
+    CALL set_topo_flags( topo )    
+!
+!-- Calculate wall flag arrays for the multigrid method.
+!-- Please note, wall flags are only applied in the non-optimized version.
+    IF ( psolver == 'multigrid_noopt' )  CALL poismg_noopt_init 
+
+!
+!-- Init flags for ws-scheme to degrade order of the numerics near walls, i.e. 
+!-- to decrease the numerical stencil appropriately.
+    IF ( momentum_advec == 'ws-scheme'  .OR.  scalar_advec == 'ws-scheme' )    &
+       CALL ws_init_flags
+
+!
+!-- Determine the maximum level of topography. It is used for
+!-- steering the degradation of order of the applied advection scheme, 
+!-- as well in the lpm. 
+!-- In case of non-cyclic lateral boundaries, the order of the advection
+!-- scheme has to be reduced up to nzt (required at the lateral boundaries).
+    k_top = 0
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb, nzt + 1
+             k_top = MAX( k_top, MERGE( k, 0,                                  &
+                                        .NOT. BTEST( topo(k,j,i), 0 ) ) )
+          ENDDO
+       ENDDO
+    ENDDO
+#if defined( __parallel )
+    CALL MPI_ALLREDUCE( k_top + 1, nzb_max, 1, MPI_INTEGER,                    & !is +1 really necessary here?
+                        MPI_MAX, comm2d, ierr )
+#else
+    nzb_max = k_top + 1
+#endif
+    IF ( bc_dirichlet_l  .OR.  bc_radiation_l     .OR.                         &
+         bc_dirichlet_r  .OR.  bc_radiation_r     .OR.                         &
+         bc_dirichlet_n  .OR.  bc_radiation_n     .OR.                         &
+         bc_dirichlet_s  .OR.  bc_radiation_s )                                &
+         nzb_max = nzt
+!   
+!-- Finally, if topography extents up to the model top, limit nzb_max to nzt.
+    nzb_max = MIN( nzb_max, nzt ) 
+!
+!-- Determine minimum index of topography. Usually, this will be nzb. In case
+!-- there is elevated topography, however, the lowest topography will be higher. 
+!-- This index is e.g. used to calculate mean first-grid point atmosphere 
+!-- temperature, surface pressure and density, etc. .
+    topo_min_level   = 0
+#if defined( __parallel )
+    CALL MPI_ALLREDUCE( MINVAL( get_topography_top_index( 's' ) ),             &
+                        topo_min_level, 1, MPI_INTEGER, MPI_MIN, comm2d, ierr )
+#else
+    topo_min_level = MINVAL( get_topography_top_index( 's' ) )
+#endif
+!
+!-- Initialize boundary conditions via surface type
+    CALL init_bc
+
+!
+!-- Allocate and set topography height arrays required for data output
+    IF ( TRIM( topography ) /= 'flat' )  THEN
+!
+!--    Allocate and set the arrays containing the topography height
+       IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+          ALLOCATE( zu_s_inner(nxl:nxr+1,nys:nyn),                             &
+                    zw_w_inner(nxl:nxr+1,nys:nyn) )
+       ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+          ALLOCATE( zu_s_inner(nxl:nxr,nys:nyn+1),                             &
+                    zw_w_inner(nxl:nxr,nys:nyn+1) )
+       ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+          ALLOCATE( zu_s_inner(nxl:nxr+1,nys:nyn+1),                           &
+                    zw_w_inner(nxl:nxr+1,nys:nyn+1) )
+       ELSE
+          ALLOCATE( zu_s_inner(nxl:nxr,nys:nyn),                               &
+                    zw_w_inner(nxl:nxr,nys:nyn) )
+       ENDIF
+
+       zu_s_inner   = 0.0_wp
+       zw_w_inner   = 0.0_wp
+!
+!--    Determine local topography height on scalar and w-grid. Note, setting
+!--    lateral boundary values is not necessary, realized via wall_flags_0 
+!--    array. Further, please note that loop bounds are different from 
+!--    nxl to nxr and nys to nyn on south and right model boundary, hence, 
+!--    use intrinsic lbound and ubound functions to infer array bounds.
+       DO  i = LBOUND(zu_s_inner, 1), UBOUND(zu_s_inner, 1)
+          DO  j = LBOUND(zu_s_inner, 2), UBOUND(zu_s_inner, 2)
+!
+!--          Topography height on scalar grid. Therefore, determine index of 
+!--          upward-facing surface element on scalar grid. 
+             zu_s_inner(i,j) = zu( get_topography_top_index_ji( j, i, 's' ) )
+!
+!--          Topography height on w grid. Therefore, determine index of 
+!--          upward-facing surface element on w grid.
+             zw_w_inner(i,j) = zw( get_topography_top_index_ji( j, i, 's' ) )
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- In the following, calculate 2D index arrays. Note, these will be removed
+!-- soon. 
+!-- Allocate outer and inner index arrays for topography and set
+!-- defaults.                    
+    ALLOCATE( nzb_s_inner(nysg:nyng,nxlg:nxrg),                                &
+              nzb_s_outer(nysg:nyng,nxlg:nxrg),                                &
+              nzb_u_inner(nysg:nyng,nxlg:nxrg),                                &
+              nzb_u_outer(nysg:nyng,nxlg:nxrg),                                &
+              nzb_v_inner(nysg:nyng,nxlg:nxrg),                                &
+              nzb_v_outer(nysg:nyng,nxlg:nxrg),                                &
+              nzb_w_inner(nysg:nyng,nxlg:nxrg),                                &
+              nzb_w_outer(nysg:nyng,nxlg:nxrg),                                &
+              nzb_diff_s_inner(nysg:nyng,nxlg:nxrg),                           &
+              nzb_diff_s_outer(nysg:nyng,nxlg:nxrg),                           &
+              nzb_local(nysg:nyng,nxlg:nxrg),                                  &
+              nzb_tmp(nysg:nyng,nxlg:nxrg) )
+!
+!-- Initialize 2D-index arrays. Note, these will be removed soon! 
+    nzb_local(nys:nyn,nxl:nxr) = get_topography_top_index( 's' )
+    CALL exchange_horiz_2d_int( nzb_local, nys, nyn, nxl, nxr, nbgp )
+!
+!-- Check topography for consistency with model domain. Therefore, use
+!-- maximum and minium topography-top indices. Note, minimum topography top
+!-- index is already calculated.  
+    IF ( TRIM( topography ) /= 'flat' )  THEN
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( MAXVAL( get_topography_top_index( 's' ) ),          &
+                           nzb_local_max, 1, MPI_INTEGER, MPI_MAX, comm2d, ierr )               
+#else
+       nzb_local_max = MAXVAL( get_topography_top_index( 's' ) )
+#endif
+       nzb_local_min = topo_min_level
+!
+!--    Consistency checks
+       IF ( nzb_local_min < 0  .OR.  nzb_local_max  > nz + 1 )  THEN
+          WRITE( message_string, * ) 'nzb_local values are outside the',       &
+                                ' model domain',                               &
+                                '&MINVAL( nzb_local ) = ', nzb_local_min,      &
+                                '&MAXVAL( nzb_local ) = ', nzb_local_max
+          CALL message( 'init_grid', 'PA0210', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    nzb_s_inner = nzb;  nzb_s_outer = nzb
+    nzb_u_inner = nzb;  nzb_u_outer = nzb
+    nzb_v_inner = nzb;  nzb_v_outer = nzb
+    nzb_w_inner = nzb;  nzb_w_outer = nzb
+
+!
+!-- Define vertical gridpoint from (or to) which on the usual finite difference
+!-- form (which does not use surface fluxes) is applied 
+    IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
+       nzb_diff = nzb + 2
+    ELSE
+       nzb_diff = nzb + 1
+    ENDIF
+
+    nzb_diff_s_inner = nzb_diff;  nzb_diff_s_outer = nzb_diff
+!
+!-- Set Neumann conditions for topography. Will be removed soon.
+    IF ( .NOT. bc_ns_cyc )  THEN
+       IF ( nys == 0  )  THEN
+          DO  i = 1, nbgp  
+             nzb_local(nys-i,:)   = nzb_local(nys,:)
+          ENDDO
+       ELSEIF ( nyn == ny )  THEN
+          DO  i = 1, nbgp  
+             nzb_local(ny+i,:) = nzb_local(ny,:)
+          ENDDO
+       ENDIF
+    ENDIF
+
+    IF ( .NOT. bc_lr_cyc )  THEN
+       IF ( nxl == 0  )  THEN
+          DO  i = 1, nbgp  
+             nzb_local(:,nxl-i)   = nzb_local(:,nxl)
+          ENDDO
+       ELSEIF ( nxr == nx )  THEN
+          DO  i = 1, nbgp  
+             nzb_local(:,nx+i) = nzb_local(:,nx)
+          ENDDO 
+       ENDIF          
+    ENDIF
+!
+!-- Initialization of 2D index arrays, will be removed soon!
+!-- Initialize nzb_s_inner and nzb_w_inner
+    nzb_s_inner = nzb_local
+    nzb_w_inner = nzb_local
+
+!
+!-- Initialize remaining index arrays:
+!-- first pre-initialize them with nzb_s_inner...
+    nzb_u_inner = nzb_s_inner
+    nzb_u_outer = nzb_s_inner
+    nzb_v_inner = nzb_s_inner
+    nzb_v_outer = nzb_s_inner
+    nzb_w_outer = nzb_s_inner
+    nzb_s_outer = nzb_s_inner
+
+!
+!-- nzb_s_outer: 
+!-- extend nzb_local east-/westwards first, then north-/southwards
+    nzb_tmp = nzb_local
+    DO  j = nys, nyn
+       DO  i = nxl, nxr
+          nzb_tmp(j,i) = MAX( nzb_local(j,i-1), nzb_local(j,i),             &
+                              nzb_local(j,i+1) )
+       ENDDO
+    ENDDO
+       
+    CALL exchange_horiz_2d_int( nzb_tmp, nys, nyn, nxl, nxr, nbgp )
+     
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          nzb_s_outer(j,i) = MAX( nzb_tmp(j-1,i), nzb_tmp(j,i),             &
+                                  nzb_tmp(j+1,i) )
+       ENDDO
+!
+!--    non-cyclic boundary conditions (overwritten by call of
+!--    exchange_horiz_2d_int below in case of cyclic boundary conditions)
+       IF ( nys == 0 )  THEN
+          j = -1
+          nzb_s_outer(j,i) = MAX( nzb_tmp(j+1,i), nzb_tmp(j,i) )
+       ENDIF
+       IF ( nyn == ny )  THEN
+          j = ny + 1
+          nzb_s_outer(j,i) = MAX( nzb_tmp(j-1,i), nzb_tmp(j,i) )
+       ENDIF
+    ENDDO
+!
+!-- nzb_w_outer: 
+!-- identical to nzb_s_outer
+    nzb_w_outer = nzb_s_outer
+!
+!-- nzb_u_inner: 
+!-- extend nzb_local rightwards only
+    nzb_tmp = nzb_local
+    DO  j = nys, nyn
+       DO  i = nxl, nxr
+          nzb_tmp(j,i) = MAX( nzb_local(j,i-1), nzb_local(j,i) )
+       ENDDO
+    ENDDO
+       
+    CALL exchange_horiz_2d_int( nzb_tmp, nys, nyn, nxl, nxr, nbgp )
+       
+    nzb_u_inner = nzb_tmp
+!
+!-- nzb_u_outer: 
+!-- extend current nzb_tmp (nzb_u_inner) north-/southwards
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          nzb_u_outer(j,i) = MAX( nzb_tmp(j-1,i), nzb_tmp(j,i),             &
+                                  nzb_tmp(j+1,i) )
+       ENDDO
+!
+!--    non-cyclic boundary conditions (overwritten by call of
+!--    exchange_horiz_2d_int below in case of cyclic boundary conditions)
+       IF ( nys == 0 )  THEN
+          j = -1
+          nzb_u_outer(j,i) = MAX( nzb_tmp(j+1,i), nzb_tmp(j,i) )
+       ENDIF
+       IF ( nyn == ny )  THEN
+          j = ny + 1
+          nzb_u_outer(j,i) = MAX( nzb_tmp(j-1,i), nzb_tmp(j,i) )
+       ENDIF
+    ENDDO
+
+!
+!-- nzb_v_inner:
+!-- extend nzb_local northwards only
+    nzb_tmp = nzb_local
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          nzb_tmp(j,i) = MAX( nzb_local(j-1,i), nzb_local(j,i) )
+       ENDDO
+    ENDDO
+       
+    CALL exchange_horiz_2d_int( nzb_tmp, nys, nyn, nxl, nxr, nbgp )      
+    nzb_v_inner = nzb_tmp
+
+!
+!-- nzb_v_outer: 
+!-- extend current nzb_tmp (nzb_v_inner) right-/leftwards
+    DO  j = nys, nyn
+       DO  i = nxl, nxr
+          nzb_v_outer(j,i) = MAX( nzb_tmp(j,i-1), nzb_tmp(j,i),                &
+                                  nzb_tmp(j,i+1) )
+       ENDDO
+!
+!--    non-cyclic boundary conditions (overwritten by call of
+!--    exchange_horiz_2d_int below in case of cyclic boundary conditions)
+       IF ( nxl == 0 )  THEN
+          i = -1
+          nzb_v_outer(j,i) = MAX( nzb_tmp(j,i+1), nzb_tmp(j,i) )
+       ENDIF
+       IF ( nxr == nx )  THEN
+          i = nx + 1
+          nzb_v_outer(j,i) = MAX( nzb_tmp(j,i-1), nzb_tmp(j,i) )
+       ENDIF
+    ENDDO
+
+!
+!-- Exchange of lateral boundary values (parallel computers) and cyclic
+!-- boundary conditions, if applicable.
+!-- Since nzb_s_inner and nzb_w_inner are derived directly from nzb_local
+!-- they do not require exchange and are not included here.
+    CALL exchange_horiz_2d_int( nzb_u_inner, nys, nyn, nxl, nxr, nbgp )
+    CALL exchange_horiz_2d_int( nzb_u_outer, nys, nyn, nxl, nxr, nbgp )
+    CALL exchange_horiz_2d_int( nzb_v_inner, nys, nyn, nxl, nxr, nbgp )
+    CALL exchange_horiz_2d_int( nzb_v_outer, nys, nyn, nxl, nxr, nbgp )
+    CALL exchange_horiz_2d_int( nzb_w_outer, nys, nyn, nxl, nxr, nbgp )
+    CALL exchange_horiz_2d_int( nzb_s_outer, nys, nyn, nxl, nxr, nbgp )
+
+!
+!-- Set the individual index arrays which define the k index from which on
+!-- the usual finite difference form (which does not use surface fluxes) is
+!-- applied 
+    IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
+       nzb_diff_s_inner   = nzb_s_inner + 2
+       nzb_diff_s_outer   = nzb_s_outer + 2
+    ELSE
+       nzb_diff_s_inner   = nzb_s_inner + 1
+       nzb_diff_s_outer   = nzb_s_outer + 1
+    ENDIF
+!
+!-- Vertical nesting: communicate vertical grid level arrays between fine and
+!-- coarse grid
+    IF ( vnested )  CALL vnest_init_grid
+
+ END SUBROUTINE init_grid
+
+
+! Description:
+! -----------------------------------------------------------------------------!
+!> Calculation of the stretching factor through an iterative method. Ideas were 
+!> taken from the paper "Regional stretched grid generation and its application
+!> to the NCAR RegCM (1999)". Normally, no analytic solution exists because the
+!> system of equations has two variables (r,l) but four requirements 
+!> (l=integer, r=[0,88;1,2], Eq(6), Eq(5) starting from index j=1) which
+!> results into an overdetermined system. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE calculate_stretching_factor( number_end )
+ 
+    USE control_parameters,                                                    &
+        ONLY:  dz, dz_stretch_factor_array,                 &
+               dz_stretch_level_end, dz_stretch_level_start, message_string
+  
+    USE kinds
+    
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  iterations  !< number of iterations until stretch_factor_lower/upper_limit is reached  
+    INTEGER(iwp) ::  l_rounded   !< after l_rounded grid levels dz(n) is strechted to dz(n+1) with stretch_factor_2 
+    INTEGER(iwp) ::  n           !< loop variable for stretching
+    
+    INTEGER(iwp), INTENT(IN) ::  number_end !< number of user-specified end levels for stretching
+        
+    REAL(wp) ::  delta_l               !< absolute difference between l and l_rounded
+    REAL(wp) ::  delta_stretch_factor  !< absolute difference between stretch_factor_1 and stretch_factor_2
+    REAL(wp) ::  delta_total_new       !< sum of delta_l and delta_stretch_factor for the next iteration (should be as small as possible) 
+    REAL(wp) ::  delta_total_old       !< sum of delta_l and delta_stretch_factor for the last iteration 
+    REAL(wp) ::  distance              !< distance between dz_stretch_level_start and dz_stretch_level_end (stretching region)
+    REAL(wp) ::  l                     !< value that fulfil Eq. (5) in the paper mentioned above together with stretch_factor_1 exactly
+    REAL(wp) ::  numerator             !< numerator of the quotient
+    REAL(wp) ::  stretch_factor_1      !< stretching factor that fulfil Eq. (5) togehter with l exactly
+    REAL(wp) ::  stretch_factor_2      !< stretching factor that fulfil Eq. (6) togehter with l_rounded exactly
+    
+    REAL(wp) ::  dz_stretch_factor_array_2(9) = 1.08_wp  !< Array that contains all stretch_factor_2 that belongs to stretch_factor_1 
+    
+    REAL(wp), PARAMETER ::  stretch_factor_interval = 1.0E-06  !< interval for sampling possible stretching factors
+    REAL(wp), PARAMETER ::  stretch_factor_lower_limit = 0.88  !< lowest possible stretching factor
+    REAL(wp), PARAMETER ::  stretch_factor_upper_limit = 1.12  !< highest possible stretching factor
+ 
+ 
+    l = 0
+    DO  n = 1, number_end
+    
+       iterations = 1
+       stretch_factor_1 = 1.0 
+       stretch_factor_2 = 1.0
+       delta_total_old = 1.0
+       
+       IF ( dz(n) > dz(n+1) ) THEN
+          DO WHILE ( stretch_factor_1 >= stretch_factor_lower_limit ) 
+             
+             stretch_factor_1 = 1.0 - iterations * stretch_factor_interval
+             distance = ABS( dz_stretch_level_end(n) -                   &
+                        dz_stretch_level_start(n) ) 
+             numerator = distance*stretch_factor_1/dz(n) +               &
+                         stretch_factor_1 - distance/dz(n)
+             
+             IF ( numerator > 0.0 ) THEN
+                l = LOG( numerator ) / LOG( stretch_factor_1 ) - 1.0
+                l_rounded = NINT( l )
+                delta_l = ABS( l_rounded - l ) / l
+             ENDIF
+             
+             stretch_factor_2 = EXP( LOG( dz(n+1)/dz(n) ) / (l_rounded) )
+             
+             delta_stretch_factor = ABS( stretch_factor_1 -              &
+                                         stretch_factor_2 ) /            &
+                                    stretch_factor_2
+             
+             delta_total_new = delta_l + delta_stretch_factor
+
+!
+!--                stretch_factor_1 is taken to guarantee that the stretching
+!--                procedure ends as close as possible to dz_stretch_level_end.
+!--                stretch_factor_2 would guarantee that the stretched dz(n) is
+!--                equal to dz(n+1) after l_rounded grid levels.
+             IF (delta_total_new < delta_total_old) THEN
+                dz_stretch_factor_array(n) = stretch_factor_1
+                dz_stretch_factor_array_2(n) = stretch_factor_2
+                delta_total_old = delta_total_new
+             ENDIF
+             
+             iterations = iterations + 1
+            
+          ENDDO
+             
+       ELSEIF ( dz(n) < dz(n+1) ) THEN 
+          DO WHILE ( stretch_factor_1 <= stretch_factor_upper_limit )
+                     
+             stretch_factor_1 = 1.0 + iterations * stretch_factor_interval
+             distance = ABS( dz_stretch_level_end(n) -                      &
+                        dz_stretch_level_start(n) ) 
+             numerator = distance*stretch_factor_1/dz(n) +                  &
+                         stretch_factor_1 - distance/dz(n)
+             
+             l = LOG( numerator ) / LOG( stretch_factor_1 ) - 1.0
+             l_rounded = NINT( l )
+             delta_l = ABS( l_rounded - l ) / l
+             
+             stretch_factor_2 = EXP( LOG( dz(n+1)/dz(n) ) / (l_rounded) )
+
+             delta_stretch_factor = ABS( stretch_factor_1 -                 &
+                                        stretch_factor_2 ) /                &
+                                        stretch_factor_2
+             
+             delta_total_new = delta_l + delta_stretch_factor
+             
+!
+!--                stretch_factor_1 is taken to guarantee that the stretching
+!--                procedure ends as close as possible to dz_stretch_level_end.
+!--                stretch_factor_2 would guarantee that the stretched dz(n) is
+!--                equal to dz(n+1) after l_rounded grid levels.
+             IF (delta_total_new < delta_total_old) THEN
+                dz_stretch_factor_array(n) = stretch_factor_1
+                dz_stretch_factor_array_2(n) = stretch_factor_2
+                delta_total_old = delta_total_new
+             ENDIF
+             
+             iterations = iterations + 1
+          ENDDO
+          
+       ELSE
+          message_string= 'Two adjacent values of dz must be different'
+          CALL message( 'init_grid', 'PA0228', 1, 2, 0, 6, 0 )
+          
+       ENDIF
+
+!
+!--    Check if also the second stretching factor fits into the allowed
+!--    interval. If not, print a warning for the user.
+       IF ( dz_stretch_factor_array_2(n) < stretch_factor_lower_limit .OR.     & 
+            dz_stretch_factor_array_2(n) > stretch_factor_upper_limit ) THEN
+          WRITE( message_string, * ) 'stretch_factor_2 = ',                    &
+                                     dz_stretch_factor_array_2(n), ' which is',&
+                                     ' responsible for exactly reaching& dz =',&
+                                      dz(n+1), 'after a specific amount of',   & 
+                                     ' grid levels& exceeds the upper',        &
+                                     ' limit =', stretch_factor_upper_limit,   &
+                                     ' &or lower limit = ',                    &
+                                     stretch_factor_lower_limit
+          CALL message( 'init_grid', 'PA0499', 0, 1, 0, 6, 0 )
+            
+       ENDIF
+    ENDDO
+        
+ END SUBROUTINE calculate_stretching_factor
+ 
+ 
+! Description:
+! -----------------------------------------------------------------------------!
+!> Set temporary topography flags and reference buildings on top of underlying
+!> orography. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE process_topography( topo_3d )
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, message_string, ocean_mode
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb,  &
+               nzt
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  buildings_f, building_id_f, building_type_f, input_pids_static, &
+               terrain_height_f
+
+    USE kinds
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                !< running index along x-direction
+    INTEGER(iwp) ::  j                !< running index along y-direction
+    INTEGER(iwp) ::  k                !< running index along z-direction with respect to numeric grid
+    INTEGER(iwp) ::  k2               !< running index along z-direction with respect to netcdf grid
+    INTEGER(iwp) ::  nr               !< index variable indication maximum terrain height for respective building ID
+    INTEGER(iwp) ::  num_build        !< counter for number of buildings
+    INTEGER(iwp) ::  topo_top_index   !< orography top index, used to map 3D buildings onto terrain
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  displace_dum        !< displacements of start addresses, used for MPI_ALLGATHERV
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids           !< building IDs on entire model domain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_final     !< building IDs on entire model domain, multiple occurences are sorted out 
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_final_tmp !< temporary array used for resizing
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_l         !< building IDs on local subdomain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  build_ids_l_tmp     !< temporary array used to resize array of building IDs
+
+    INTEGER(iwp), DIMENSION(0:numprocs-1) ::  num_buildings     !< number of buildings with different ID on entire model domain
+    INTEGER(iwp), DIMENSION(0:numprocs-1) ::  num_buildings_l   !< number of buildings with different ID on local subdomain
+
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo_3d !< input array for 3D topography and dummy array for setting "outer"-flags
+
+    REAL(wp)                            ::  ocean_offset        !< offset to consider inverse vertical coordinate at topography definition
+    REAL(wp)                            ::  oro_min = 0.0_wp    !< minimum terrain height in entire model domain, used to reference terrain to zero
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  oro_max             !< maximum terrain height occupied by an building with certain id
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  oro_max_l           !< maximum terrain height occupied by an building with certain id, on local subdomain
+
+
+!
+!-- Reference lowest terrain height to zero. In case the minimum terrain height
+!-- is non-zero, all grid points of the lower vertical grid levels might be 
+!-- entirely below the surface, meaning a waste of computational resources.
+!-- In order to avoid this, remove the lowest terrain height. Please note,
+!-- in case of a nested run, the global minimum from all parent and childs 
+!-- need to be remove to avoid steep edges at the child-domain boundaries.
+    IF ( input_pids_static )  THEN
+#if defined( __parallel ) 
+       CALL MPI_ALLREDUCE( MINVAL( terrain_height_f%var ), oro_min, 1,         &
+                           MPI_REAL, MPI_MIN, MPI_COMM_WORLD, ierr )
+#else
+       oro_min = MINVAL( terrain_height_f%var )
+#endif
+
+       terrain_height_f%var = terrain_height_f%var - oro_min
+!                           
+!--    Give an informative message that terrain height is referenced to zero    
+       IF ( oro_min > 0.0_wp )  THEN
+          WRITE( message_string, * ) 'Terrain height was internally shifted '//&
+                          'downwards by ', oro_min, 'meter(s) to save ' //     &
+                          'computational resources.'
+          CALL message( 'init_grid', 'PA0505', 0, 0, 0, 6, 0 )
+       ENDIF
+    ENDIF    
+    
+!
+!-- In the following, buildings and orography are further preprocessed 
+!-- before they are mapped on the LES grid.
+!-- Buildings are mapped on top of the orography by maintaining the roof 
+!-- shape of the building. This can be achieved by referencing building on 
+!-- top of the maximum terrain height within the area occupied by the 
+!-- respective building. As buildings and terrain height are defined PE-wise,
+!-- parallelization of this referencing is required (a building can be 
+!-- distributed between different PEs).  
+!-- In a first step, determine the number of buildings with different 
+!-- building id on each PE. In a next step, all building ids are gathered
+!-- into one array which is present to all PEs. For each building ID, 
+!-- the maximum terrain height occupied by the respective building is 
+!-- computed and distributed to each PE.  
+!-- Finally, for each building id and its respective reference orography, 
+!-- builidings are mapped on top.   
+!-- 
+!-- First, pre-set topography flags, bit 1 indicates orography, bit 2 
+!-- buildings 
+!-- classify the respective surfaces.
+    topo_3d          = IBSET( topo_3d, 0 )
+    topo_3d(nzb,:,:) = IBCLR( topo_3d(nzb,:,:), 0 )
+!
+!-- In order to map topography on PALM grid also in case of ocean simulations,
+!-- pre-calculate an offset value.
+    ocean_offset = MERGE( zw(0), 0.0_wp, ocean_mode )
+!
+!-- Reference buildings on top of orography. This is not necessary
+!-- if topography is read from ASCII file as no distinction between buildings
+!-- and terrain height can be made. Moreover, this is also not necessary if
+!-- urban-surface and land-surface model are used at the same time. 
+    IF ( input_pids_static )  THEN
+
+       IF ( buildings_f%from_file )  THEN 
+          num_buildings_l = 0
+          num_buildings   = 0
+!
+!--       Allocate at least one element for building ids, 
+          ALLOCATE( build_ids_l(1) )
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                IF ( building_id_f%var(j,i) /= building_id_f%fill )  THEN
+                   IF ( num_buildings_l(myid) > 0 )  THEN
+                      IF ( ANY( building_id_f%var(j,i) .EQ.  build_ids_l ) )   &
+                      THEN
+                         CYCLE
+                      ELSE
+                         num_buildings_l(myid) = num_buildings_l(myid) + 1
+!
+!--                   Resize array with different local building ids
+                      ALLOCATE( build_ids_l_tmp(1:SIZE(build_ids_l)) )
+                      build_ids_l_tmp = build_ids_l
+                      DEALLOCATE( build_ids_l )
+                      ALLOCATE( build_ids_l(1:num_buildings_l(myid)) )
+                      build_ids_l(1:num_buildings_l(myid)-1) =                 &
+                                  build_ids_l_tmp(1:num_buildings_l(myid)-1)
+                      build_ids_l(num_buildings_l(myid)) = building_id_f%var(j,i)
+                      DEALLOCATE( build_ids_l_tmp )
+                   ENDIF
+!
+!--                First occuring building id on PE 
+                   ELSE 
+                      num_buildings_l(myid) = num_buildings_l(myid) + 1
+                      build_ids_l(1) = building_id_f%var(j,i)
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+!
+!--       Determine number of different building ids for the entire domain 
+#if defined( __parallel ) 
+          CALL MPI_ALLREDUCE( num_buildings_l, num_buildings, numprocs,              &
+                              MPI_INTEGER, MPI_SUM, comm2d, ierr ) 
+#else
+          num_buildings = num_buildings_l
+#endif
+!
+!--       Gather all buildings ids on each PEs. 
+!--       First, allocate array encompassing all building ids in model domain.  
+          ALLOCATE( build_ids(1:SUM(num_buildings)) )
+#if defined( __parallel ) 
+!
+!--       Allocate array for displacements. 
+!--       As each PE may has a different number of buildings, so that
+!--       the block sizes send by each PE may not be equal. Hence, 
+!--       information about the respective displacement is required, indicating 
+!--       the respective adress where each MPI-task writes into the receive 
+!--       buffer array  
+          ALLOCATE( displace_dum(0:numprocs-1) )
+          displace_dum(0) = 0
+          DO i = 1, numprocs-1
+             displace_dum(i) = displace_dum(i-1) + num_buildings(i-1)
+          ENDDO
+
+          CALL MPI_ALLGATHERV( build_ids_l(1:num_buildings_l(myid)),                 &
+                               num_buildings(myid),                                  &
+                               MPI_INTEGER,                                          &
+                               build_ids,                                            &
+                               num_buildings,                                        &
+                               displace_dum,                                         & 
+                               MPI_INTEGER,                                          &
+                               comm2d, ierr )   
+
+          DEALLOCATE( displace_dum )
+
+#else
+          build_ids = build_ids_l
+#endif
+
+!
+!--       Note, in parallel mode building ids can occure mutliple times, as 
+!--       each PE has send its own ids. Therefore, sort out building ids which 
+!--       appear more than one time. 
+          num_build = 0
+          DO  nr = 1, SIZE(build_ids)
+
+             IF ( ALLOCATED(build_ids_final) )  THEN
+                IF ( ANY( build_ids(nr) .EQ. build_ids_final ) )  THEN
+                   CYCLE
+                ELSE
+                   num_build = num_build + 1
+!
+!--                Resize
+                   ALLOCATE( build_ids_final_tmp(1:num_build) )
+                   build_ids_final_tmp(1:num_build-1) = build_ids_final(1:num_build-1)
+                   DEALLOCATE( build_ids_final )
+                   ALLOCATE( build_ids_final(1:num_build) )
+                   build_ids_final(1:num_build-1) = build_ids_final_tmp(1:num_build-1)
+                   build_ids_final(num_build) = build_ids(nr)
+                   DEALLOCATE( build_ids_final_tmp )
+                ENDIF             
+             ELSE
+                num_build = num_build + 1
+                ALLOCATE( build_ids_final(1:num_build) )
+                build_ids_final(num_build) = build_ids(nr)
+             ENDIF
+          ENDDO
+
+!
+!--       Determine maximumum terrain height occupied by the respective 
+!--       building and temporalily store on oro_max 
+          ALLOCATE( oro_max_l(1:SIZE(build_ids_final)) )
+          ALLOCATE( oro_max(1:SIZE(build_ids_final))   )
+          oro_max_l = 0.0_wp
+
+          DO  nr = 1, SIZE(build_ids_final)
+             oro_max_l(nr) = MAXVAL(                                              &
+                              MERGE( terrain_height_f%var, 0.0_wp,                &
+                                     building_id_f%var(nys:nyn,nxl:nxr) .EQ.      &
+                                     build_ids_final(nr) ) )
+          ENDDO
+   
+#if defined( __parallel )    
+          IF ( SIZE(build_ids_final) >= 1 ) THEN
+             CALL MPI_ALLREDUCE( oro_max_l, oro_max, SIZE( oro_max ), MPI_REAL,   &
+                                 MPI_MAX, comm2d, ierr ) 
+          ENDIF
+#else
+          oro_max = oro_max_l
+#endif
+!
+!--       Finally, determine discrete grid height of maximum orography occupied
+!--       by a building. Use all-or-nothing approach, i.e. a grid box is either
+          oro_max_l = 0.0
+          DO  nr = 1, SIZE(build_ids_final)
+             DO  k = nzb, nzt
+                IF ( zu(k) - ocean_offset <= oro_max(nr) )                     &
+                   oro_max_l(nr) = zw(k) - ocean_offset
+             ENDDO
+             oro_max(nr) = oro_max_l(nr)
+          ENDDO
+       ENDIF
+!
+!--    Map orography as well as buildings onto grid. 
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             topo_top_index = 0
+!
+!--          Obtain index in global building_id array
+             IF ( buildings_f%from_file )  THEN
+                IF ( building_id_f%var(j,i) /= building_id_f%fill )  THEN
+!
+!--                Determine index where maximum terrain height occupied by 
+!--                the respective building height is stored.
+                   nr = MINLOC( ABS( build_ids_final -                         &
+                                     building_id_f%var(j,i) ), DIM = 1 )
+                ENDIF
+             ENDIF
+             DO  k = nzb, nzt
+!
+!--             In a first step, if grid point is below or equal the given 
+!--             terrain height, grid point is flagged to be of type natural. 
+!--             Please note, in case there is also a building which is lower
+!--             than the vertical grid spacing, initialization of surface
+!--             attributes will not be correct as given surface information
+!--             will not be in accordance to the classified grid points. 
+!--             Hence, in this case, de-flag the grid point and give it 
+!--             urban type instead. 
+                IF ( zu(k) - ocean_offset <= terrain_height_f%var(j,i) )  THEN
+                    topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 )
+                    topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 1 )
+                    topo_top_index = k ! topo_top_index + 1
+                ENDIF
+!
+!--             Set building grid points. Here, only consider 2D buildings. 
+!--             3D buildings require separate treatment. 
+                IF ( buildings_f%from_file  .AND.  buildings_f%lod == 1 )  THEN
+                   IF ( building_id_f%var(j,i) /= building_id_f%fill )  THEN       
+                      IF ( zu(k) - ocean_offset <=                             &
+                           oro_max(nr) + buildings_f%var_2d(j,i) )  THEN
+                         topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 )
+                         topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 )
+!
+!--                      De-flag grid point of type natural. See comment above.
+                         topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 1 ) 
+                      ENDIF
+                   ENDIF
+                ENDIF
+             ENDDO
+!
+!--          Map 3D buildings onto terrain height.  
+!--          In case of any slopes, map building on top of maximum terrain 
+!--          height covered by the building. In other words, extend 
+!--          building down to the respective local terrain-surface height. 
+             IF ( buildings_f%from_file  .AND.  buildings_f%lod == 2 )  THEN
+                IF ( building_id_f%var(j,i) /= building_id_f%fill )  THEN
+!
+!--                Extend building down to the terrain surface, i.e. fill-up
+!--                surface irregularities below a building. Note, oro_max
+!--                is already a discrete height according to the all-or-nothing
+!--                approach, i.e. grid box is either topography or atmosphere, 
+!--                terrain top is defined at upper bound of the grid box.
+!--                Hence, check for zw in this case. 
+!--                Note, do this only for buildings which are surface mounted, 
+!--                i.e. building types 1-6. Below bridges, which are represented
+!--                exclusively by building type 7, terrain shape should be
+!--                maintained. 
+                   IF ( building_type_f%var(j,i) /= 7 )  THEN
+                      DO k = topo_top_index + 1, nzt + 1      
+                         IF ( zw(k) - ocean_offset <= oro_max(nr) )  THEN
+                            topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 )
+                            topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 )
+                         ENDIF
+                      ENDDO        
+!
+!--                   After surface irregularities are smoothen, determine lower
+!--                   start index where building starts. 
+                      DO  k = nzb, nzt
+                         IF ( zw(k) - ocean_offset <= oro_max(nr) )            &
+                            topo_top_index = k
+                      ENDDO
+                   ENDIF
+!
+!--                Finally, map building on top.
+                   k2 = 0
+                   DO k = topo_top_index, nzt + 1
+                      IF ( k2 <= buildings_f%nz-1 )  THEN
+                         IF ( buildings_f%var_3d(k2,j,i) == 1 )  THEN
+                            topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 )
+                            topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 1 )
+                            topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 )
+                         ENDIF
+                      ENDIF
+                      k2 = k2 + 1
+                   ENDDO
+                ENDIF
+             ENDIF
+          ENDDO
+       ENDDO
+!
+!--    Deallocate temporary arrays required for processing and reading data
+       IF ( ALLOCATED( oro_max         ) )  DEALLOCATE( oro_max         )
+       IF ( ALLOCATED( oro_max_l       ) )  DEALLOCATE( oro_max_l       )
+       IF ( ALLOCATED( build_ids_final ) )  DEALLOCATE( build_ids_final )
+!
+!-- Topography input via ASCII format. 
+    ELSE
+       ocean_offset     = MERGE( zw(0), 0.0_wp, ocean_mode )
+       topo_3d          = IBSET( topo_3d, 0 )
+       topo_3d(nzb,:,:) = IBCLR( topo_3d(nzb,:,:), 0 )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb, nzt
+                IF ( zu(k) - ocean_offset <= buildings_f%var_2d(j,i) )  THEN
+                    topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 )
+                    topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 ) !indicates terrain
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+    CALL exchange_horiz_int( topo_3d, nys, nyn, nxl, nxr, nzt, nbgp )
+
+    IF ( .NOT. bc_ns_cyc )  THEN
+       IF ( nys == 0  )  topo_3d(:,-1,:)   = topo_3d(:,0,:)
+       IF ( nyn == ny )  topo_3d(:,ny+1,:) = topo_3d(:,ny,:)
+    ENDIF
+
+    IF ( .NOT. bc_lr_cyc )  THEN
+       IF ( nxl == 0  )  topo_3d(:,:,-1)   = topo_3d(:,:,0)
+       IF ( nxr == nx )  topo_3d(:,:,nx+1) = topo_3d(:,:,nx)          
+    ENDIF
+
+ END SUBROUTINE process_topography
+
+
+! Description:
+! -----------------------------------------------------------------------------!
+!> Filter topography, i.e. fill holes resolved by only one grid point.  
+!> Such holes are suspected to lead to velocity blow-ups as continuity 
+!> equation on discrete grid cannot be fulfilled in such case.
+!------------------------------------------------------------------------------!
+ SUBROUTINE filter_topography( topo_3d )
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, message_string
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb, nzt
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  building_id_f, building_type_f 
+
+    USE  pegrid
+
+    IMPLICIT NONE
+
+    LOGICAL      ::  filled = .FALSE. !< flag indicating if holes were filled
+
+    INTEGER(iwp) ::  i          !< running index along x-direction
+    INTEGER(iwp) ::  j          !< running index along y-direction
+    INTEGER(iwp) ::  k          !< running index along z-direction
+    INTEGER(iwp) ::  num_hole   !< number of holes (in topography) resolved by only one grid point 
+    INTEGER(iwp) ::  num_hole_l !< number of holes (in topography) resolved by only one grid point on local PE     
+    INTEGER(iwp) ::  num_wall   !< number of surrounding vertical walls for a single grid point
+
+    INTEGER(iwp), DIMENSION(nysg:nyng,nxlg:nxrg)           ::  var_exchange_int  !< dummy array for exchanging ghost-points 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE            ::  topo_tmp          !< temporary 3D-topography used to fill holes
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo_3d           !< 3D-topography array merging buildings and orography
+!
+!-- Before checking for holes, set lateral boundary conditions for 
+!-- topography. After hole-filling, boundary conditions must be set again.
+!-- Several iterations are performed, in order to fill holes which might 
+!-- emerge by the filling-algorithm itself.
+    ALLOCATE( topo_tmp(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    topo_tmp = 0
+
+    num_hole = 99999
+    DO WHILE ( num_hole > 0 )       
+
+       num_hole = 0    
+       CALL exchange_horiz_int( topo_3d, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!--    Exchange also building ID and type. Note, building_type is an one-byte 
+!--    variable.
+       IF ( building_id_f%from_file )                                          &
+          CALL exchange_horiz_2d_int( building_id_f%var, nys, nyn, nxl, nxr, nbgp )
+       IF ( building_type_f%from_file )  THEN
+          var_exchange_int = INT( building_type_f%var, KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          building_type_f%var = INT( var_exchange_int, KIND = 1 )
+       ENDIF
+
+       topo_tmp = topo_3d
+!
+!--    In case of non-cyclic lateral boundaries, assume lateral boundary to be 
+!--    a solid wall. Thus, intermediate spaces of one grid point between 
+!--    boundary and some topographic structure will be filled.           
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( nys == 0  )  topo_tmp(:,-1,:)   = IBCLR( topo_tmp(:,0,:),  0 )
+          IF ( nyn == ny )  topo_tmp(:,ny+1,:) = IBCLR( topo_tmp(:,ny,:), 0 )
+       ENDIF
+
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( nxl == 0  )  topo_tmp(:,:,-1)   = IBCLR( topo_tmp(:,:,0),  0 )
+          IF ( nxr == nx )  topo_tmp(:,:,nx+1) = IBCLR( topo_tmp(:,:,nx), 0 )          
+       ENDIF
+
+       num_hole_l = 0
+       DO i = nxl, nxr
+          DO j = nys, nyn
+             DO  k = nzb+1, nzt
+                IF ( BTEST( topo_tmp(k,j,i), 0 ) )  THEN
+                   num_wall = 0
+                   IF ( .NOT. BTEST( topo_tmp(k,j-1,i), 0 ) )                  &
+                      num_wall = num_wall + 1
+                   IF ( .NOT. BTEST( topo_tmp(k,j+1,i), 0 ) )                  &
+                      num_wall = num_wall + 1
+                   IF ( .NOT. BTEST( topo_tmp(k,j,i-1), 0 ) )                  &
+                      num_wall = num_wall + 1
+                   IF ( .NOT. BTEST( topo_tmp(k,j,i+1), 0 ) )                  &
+                      num_wall = num_wall + 1
+                   IF ( .NOT. BTEST( topo_tmp(k-1,j,i), 0 ) )                  &
+                      num_wall = num_wall + 1   
+                   IF ( .NOT. BTEST( topo_tmp(k+1,j,i), 0 ) )                  &
+                      num_wall = num_wall + 1
+
+                   IF ( num_wall >= 4 )  THEN
+                      num_hole_l     = num_hole_l + 1
+!
+!--                   Clear flag 0 and set special flag ( bit 3) to indicate 
+!--                   that new topography point is a result of filtering process.
+                      topo_3d(k,j,i) = IBCLR( topo_3d(k,j,i), 0 )
+                      topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 3 )
+!
+!--                   If filled grid point is occupied by a building, classify
+!--                   it as building grid point.
+                      IF ( building_type_f%from_file )  THEN
+                         IF ( building_type_f%var(j,i)   /=                    &  
+                              building_type_f%fill            .OR.             &       
+                              building_type_f%var(j+1,i) /=                    &  
+                              building_type_f%fill            .OR.             &                
+                              building_type_f%var(j-1,i) /=                    &                
+                              building_type_f%fill            .OR.             &                
+                              building_type_f%var(j,i+1) /=                    &                
+                              building_type_f%fill            .OR.             &                
+                              building_type_f%var(j,i-1) /=                    &                
+                              building_type_f%fill )  THEN
+!
+!--                         Set flag indicating building surfaces
+                            topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 2 )
+!
+!--                         Set building_type and ID at this position if not 
+!--                         already set. This is required for proper 
+!--                         initialization of urban-surface energy balance 
+!--                         solver.
+                            IF ( building_type_f%var(j,i) ==                   &
+                                 building_type_f%fill )  THEN
+
+                               IF ( building_type_f%var(j+1,i) /=              &
+                                    building_type_f%fill )  THEN
+                                  building_type_f%var(j,i) =                   &
+                                                    building_type_f%var(j+1,i)
+                                  building_id_f%var(j,i) =                     &
+                                                    building_id_f%var(j+1,i)
+                               ELSEIF ( building_type_f%var(j-1,i) /=          &
+                                        building_type_f%fill )  THEN
+                                  building_type_f%var(j,i) =                   &
+                                                    building_type_f%var(j-1,i)
+                                  building_id_f%var(j,i) =                     &
+                                                    building_id_f%var(j-1,i)
+                               ELSEIF ( building_type_f%var(j,i+1) /=          &
+                                        building_type_f%fill )  THEN
+                                  building_type_f%var(j,i) =                   &
+                                                    building_type_f%var(j,i+1)
+                                  building_id_f%var(j,i) =                     &
+                                                    building_id_f%var(j,i+1)
+                               ELSEIF ( building_type_f%var(j,i-1) /=          &
+                                        building_type_f%fill )  THEN
+                                  building_type_f%var(j,i) =                   &
+                                                    building_type_f%var(j,i-1)
+                                  building_id_f%var(j,i) =                     &
+                                                    building_id_f%var(j,i-1)
+                               ENDIF
+                            ENDIF
+                         ENDIF
+                      ENDIF
+!
+!--                   If filled grid point is already classified as building
+!--                   everything is fine, else classify this grid point as
+!--                   natural type grid point. This case, values for the 
+!--                   surface type are already set.
+                      IF ( .NOT. BTEST( topo_3d(k,j,i), 2 ) )  THEN
+                         topo_3d(k,j,i) = IBSET( topo_3d(k,j,i), 1 )
+                      ENDIF
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Count the total number of holes, required for informative message.
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( num_hole_l, num_hole, 1, MPI_INTEGER, MPI_SUM,      &
+                           comm2d, ierr )
+#else
+       num_hole = num_hole_l
+#endif    
+       IF ( num_hole > 0  .AND.  .NOT. filled )  filled = .TRUE.
+
+    ENDDO
+!
+!-- Create an informative message if any holes were filled.
+    IF ( filled )  THEN
+       WRITE( message_string, * ) 'Topography was filtered, i.e. holes ' //    &
+                                  'resolved by only one grid point '     //    &
+                                  'were filled during initialization.'
+       CALL message( 'init_grid', 'PA0430', 0, 0, 0, 6, 0 )
+    ENDIF
+
+    DEALLOCATE( topo_tmp )
+!
+!-- Finally, exchange topo_3d array again and if necessary set Neumann boundary
+!-- condition in case of non-cyclic lateral boundaries. 
+    CALL exchange_horiz_int( topo_3d, nys, nyn, nxl, nxr, nzt, nbgp )
+
+    IF ( .NOT. bc_ns_cyc )  THEN
+       IF ( nys == 0  )  topo_3d(:,-1,:)   = topo_3d(:,0,:)
+       IF ( nyn == ny )  topo_3d(:,ny+1,:) = topo_3d(:,ny,:)
+    ENDIF
+
+    IF ( .NOT. bc_lr_cyc )  THEN
+       IF ( nxl == 0  )  topo_3d(:,:,-1)   = topo_3d(:,:,0)
+       IF ( nxr == nx )  topo_3d(:,:,nx+1) = topo_3d(:,:,nx)          
+    ENDIF
+!
+!-- Exchange building ID and type. Note, building_type is an one-byte variable.
+    IF ( building_id_f%from_file )                                             &
+       CALL exchange_horiz_2d_int( building_id_f%var, nys, nyn, nxl, nxr, nbgp )
+    IF ( building_type_f%from_file )  THEN
+       var_exchange_int = INT( building_type_f%var, KIND = 4 )
+       CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+       building_type_f%var = INT( var_exchange_int, KIND = 1 )
+    ENDIF
+
+ END SUBROUTINE filter_topography
+
+
+! Description:
+! -----------------------------------------------------------------------------!
+!> Reads topography information from file or sets generic topography. Moreover, 
+!> all topography-relevant topography arrays are initialized, and grid flags
+!> are set.  
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_topo( topo )
+
+    USE arrays_3d,                                                             &
+        ONLY:  zw
+        
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, building_height, building_length_x,       &
+               building_length_y, building_wall_left, building_wall_south,     &
+               canyon_height, canyon_wall_left, canyon_wall_south,             &
+               canyon_width_x, canyon_width_y, dp_level_ind_b, dz,             &
+               message_string, topography, topography_grid_convention,         &
+               tunnel_height, tunnel_length, tunnel_width_x, tunnel_width_y,   &
+               tunnel_wall_depth
+         
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+        
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz,   &
+               nzb, nzt
+    
+    USE kinds
+
+    USE pegrid
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index, get_topography_top_index_ji
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  bh            !< temporary vertical index of building height
+    INTEGER(iwp) ::  blx           !< grid point number of building size along x
+    INTEGER(iwp) ::  bly           !< grid point number of building size along y
+    INTEGER(iwp) ::  bxl           !< index for left building wall
+    INTEGER(iwp) ::  bxr           !< index for right building wall
+    INTEGER(iwp) ::  byn           !< index for north building wall
+    INTEGER(iwp) ::  bys           !< index for south building wall
+    INTEGER(iwp) ::  ch            !< temporary vertical index for canyon height
+    INTEGER(iwp) ::  cwx           !< grid point number of canyon size along x
+    INTEGER(iwp) ::  cwy           !< grid point number of canyon size along y
+    INTEGER(iwp) ::  cxl           !< index for left canyon wall
+    INTEGER(iwp) ::  cxr           !< index for right canyon wall
+    INTEGER(iwp) ::  cyn           !< index for north canyon wall
+    INTEGER(iwp) ::  cys           !< index for south canyon wall
+    INTEGER(iwp) ::  i             !< index variable along x
+    INTEGER(iwp) ::  j             !< index variable along y
+    INTEGER(iwp) ::  k             !< index variable along z
+    INTEGER(iwp) ::  hv_in         !< heavyside function to model inner tunnel surface 
+    INTEGER(iwp) ::  hv_out        !< heavyside function to model outer tunnel surface 
+    INTEGER(iwp) ::  txe_out       !< end position of outer tunnel wall in x
+    INTEGER(iwp) ::  txs_out       !< start position of outer tunnel wall in x
+    INTEGER(iwp) ::  tye_out       !< end position of outer tunnel wall in y
+    INTEGER(iwp) ::  tys_out       !< start position of outer tunnel wall in y
+    INTEGER(iwp) ::  txe_in        !< end position of inner tunnel wall in x
+    INTEGER(iwp) ::  txs_in        !< start position of inner tunnel wall in x
+    INTEGER(iwp) ::  tye_in        !< end position of inner tunnel wall in y
+    INTEGER(iwp) ::  tys_in        !< start position of inner tunnel wall in y
+    INTEGER(iwp) ::  td            !< tunnel wall depth
+    INTEGER(iwp) ::  th            !< height of outer tunnel wall
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_local         !< index for topography top at cell-center
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo !< input array for 3D topography and dummy array for setting "outer"-flags
+
+
+!
+!-- Set outer and inner index arrays for non-flat topography.
+!-- Here consistency checks concerning domain size and periodicity are
+!-- necessary.
+!-- Within this SELECT CASE structure only nzb_local is initialized
+!-- individually depending on the chosen topography type, all other index 
+!-- arrays are initialized further below.
+    SELECT CASE ( TRIM( topography ) )
+
+       CASE ( 'flat' )
+!   
+!--       Initialilize 3D topography array, used later for initializing flags
+          topo(nzb+1:nzt+1,:,:) = IBSET( topo(nzb+1:nzt+1,:,:), 0 ) 
+
+       CASE ( 'single_building' )
+!
+!--       Single rectangular building, by default centered in the middle of the
+!--       total domain
+          blx = NINT( building_length_x / dx )
+          bly = NINT( building_length_y / dy )
+          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
+          IF ( ABS( zw(bh)   - building_height ) == &
+               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
+          IF ( building_wall_left == 9999999.9_wp )  THEN
+             building_wall_left = ( nx + 1 - blx ) / 2 * dx
+          ENDIF
+          bxl = NINT( building_wall_left / dx )
+          bxr = bxl + blx
+
+          IF ( building_wall_south == 9999999.9_wp )  THEN
+              building_wall_south = ( ny + 1 - bly ) / 2 * dy
+          ENDIF
+          bys = NINT( building_wall_south / dy )
+          byn = bys + bly
+
+!
+!--       Building size has to meet some requirements
+          IF ( ( bxl < 1 ) .OR. ( bxr > nx-1 ) .OR. ( bxr < bxl+3 ) .OR.       &
+               ( bys < 1 ) .OR. ( byn > ny-1 ) .OR. ( byn < bys+3 ) )  THEN
+             WRITE( message_string, * ) 'inconsistent building parameters:',   &
+                                      '&bxl=', bxl, 'bxr=', bxr, 'bys=', bys,  &
+                                      'byn=', byn, 'nx=', nx, 'ny=', ny
+             CALL message( 'init_grid', 'PA0203', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          ALLOCATE( nzb_local(nysg:nyng,nxlg:nxrg) )
+          nzb_local = 0
+!
+!--       Define the building. 
+          IF ( bxl <= nxr  .AND.  bxr >= nxl  .AND.                            &
+               bys <= nyn  .AND.  byn >= nys )                                 & 
+             nzb_local(MAX(nys,bys):MIN(nyn,byn),MAX(nxl,bxl):MIN(nxr,bxr)) = bh
+!
+!--       Set bit array on basis of nzb_local
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                topo(nzb_local(j,i)+1:nzt+1,j,i) =                             &
+                                 IBSET( topo(nzb_local(j,i)+1:nzt+1,j,i), 0 ) 
+             ENDDO
+          ENDDO
+        
+          DEALLOCATE( nzb_local )
+
+          CALL exchange_horiz_int( topo, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!--       Set boundary conditions also for flags. Can be interpreted as Neumann
+!--       boundary conditions for topography. 
+          IF ( .NOT. bc_ns_cyc )  THEN
+             IF ( nys == 0  )  THEN
+                DO  i = 1, nbgp     
+                   topo(:,nys-i,:)   = topo(:,nys,:)
+                ENDDO
+             ENDIF
+             IF ( nyn == ny )  THEN
+                DO  i = 1, nbgp  
+                   topo(:,nyn+i,:) = topo(:,nyn,:)
+                ENDDO
+             ENDIF
+          ENDIF
+          IF ( .NOT. bc_lr_cyc )  THEN
+             IF ( nxl == 0  )  THEN
+                DO  i = 1, nbgp   
+                   topo(:,:,nxl-i)   = topo(:,:,nxl)
+                ENDDO
+             ENDIF
+             IF ( nxr == nx )  THEN 
+                DO  i = 1, nbgp   
+                   topo(:,:,nxr+i) = topo(:,:,nxr)     
+                ENDDO
+             ENDIF      
+          ENDIF
+
+       CASE ( 'single_street_canyon' )
+!
+!--       Single quasi-2D street canyon of infinite length in x or y direction.
+!--       The canyon is centered in the other direction by default.
+          IF ( canyon_width_x /= 9999999.9_wp )  THEN
+!
+!--          Street canyon in y direction
+             cwx = NINT( canyon_width_x / dx )
+             IF ( canyon_wall_left == 9999999.9_wp )  THEN
+                canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx
+             ENDIF
+             cxl = NINT( canyon_wall_left / dx )
+             cxr = cxl + cwx
+          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
+!
+!--          Street canyon in x direction
+             cwy = NINT( canyon_width_y / dy )
+             IF ( canyon_wall_south == 9999999.9_wp )  THEN
+                canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy
+             ENDIF
+             cys = NINT( canyon_wall_south / dy )
+             cyn = cys + cwy
+      
+          ELSE
+             
+             message_string = 'no street canyon width given'
+             CALL message( 'init_grid', 'PA0204', 1, 2, 0, 6, 0 )
+  
+          ENDIF
+
+          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
+          IF ( ABS( zw(ch)   - canyon_height ) == &
+               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
+          dp_level_ind_b = ch
+!
+!--       Street canyon size has to meet some requirements
+          IF ( canyon_width_x /= 9999999.9_wp )  THEN
+             IF ( ( cxl < 1 ) .OR. ( cxr > nx-1 ) .OR. ( cwx < 3 ) .OR.        &
+                  ( ch < 3 ) )  THEN
+                WRITE( message_string, * ) 'inconsistent canyon parameters:',  &
+                                           '&cxl=', cxl, ' cxr=', cxr,         &
+                                           ' cwx=', cwx,                       &
+                                           ' ch=', ch, ' nx=', nx, ' ny=', ny
+                CALL message( 'init_grid', 'PA0205', 1, 2, 0, 6, 0 ) 
+             ENDIF
+          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
+             IF ( ( cys < 1 ) .OR. ( cyn > ny-1 ) .OR. ( cwy < 3 ) .OR.        &
+                  ( ch < 3 ) )  THEN
+                WRITE( message_string, * ) 'inconsistent canyon parameters:',  &
+                                           '&cys=', cys, ' cyn=', cyn,         &
+                                           ' cwy=', cwy,                       &
+                                           ' ch=', ch, ' nx=', nx, ' ny=', ny
+                CALL message( 'init_grid', 'PA0206', 1, 2, 0, 6, 0 ) 
+             ENDIF
+          ENDIF
+          IF ( canyon_width_x /= 9999999.9_wp .AND.                            &                 
+               canyon_width_y /= 9999999.9_wp )  THEN
+             message_string = 'inconsistent canyon parameters:' //             &   
+                              '&street canyon can only be oriented' //         &
+                              ' either in x- or in y-direction'
+             CALL message( 'init_grid', 'PA0207', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          ALLOCATE( nzb_local(nysg:nyng,nxlg:nxrg) )
+          nzb_local = ch
+          IF ( canyon_width_x /= 9999999.9_wp )  THEN
+             IF ( cxl <= nxr  .AND.  cxr >= nxl )                              &
+                nzb_local(:,MAX(nxl,cxl+1):MIN(nxr,cxr-1)) = 0
+          ELSEIF ( canyon_width_y /= 9999999.9_wp )  THEN
+             IF ( cys <= nyn  .AND.  cyn >= nys )                              &          
+                nzb_local(MAX(nys,cys+1):MIN(nyn,cyn-1),:) = 0
+          ENDIF
+!
+!--       Set bit array on basis of nzb_local
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                topo(nzb_local(j,i)+1:nzt+1,j,i) =                             &
+                                 IBSET( topo(nzb_local(j,i)+1:nzt+1,j,i), 0 ) 
+             ENDDO
+          ENDDO
+          DEALLOCATE( nzb_local )
+
+          CALL exchange_horiz_int( topo, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!--       Set boundary conditions also for flags. Can be interpreted as Neumann
+!--       boundary conditions for topography. 
+          IF ( .NOT. bc_ns_cyc )  THEN
+             IF ( nys == 0  )  THEN
+                DO  i = 1, nbgp     
+                   topo(:,nys-i,:)   = topo(:,nys,:)
+                ENDDO
+             ENDIF
+             IF ( nyn == ny )  THEN
+                DO  i = 1, nbgp  
+                   topo(:,nyn+i,:) = topo(:,nyn,:)
+                ENDDO
+             ENDIF
+          ENDIF
+          IF ( .NOT. bc_lr_cyc )  THEN
+             IF ( nxl == 0  )  THEN
+                DO  i = 1, nbgp   
+                   topo(:,:,nxl-i)   = topo(:,:,nxl)
+                ENDDO
+             ENDIF
+             IF ( nxr == nx )  THEN 
+                DO  i = 1, nbgp   
+                   topo(:,:,nxr+i) = topo(:,:,nxr)     
+                ENDDO
+             ENDIF      
+          ENDIF
+
+       CASE ( 'tunnel' )
+
+!
+!--       Tunnel height
+          IF ( tunnel_height == 9999999.9_wp )  THEN
+             th = zw( INT( 0.2 * nz) )
+          ELSE
+             th = tunnel_height
+          ENDIF
+!
+!--       Tunnel-wall depth
+          IF ( tunnel_wall_depth == 9999999.9_wp )  THEN  
+             td = MAX ( dx, dy, dz(1) )
+          ELSE
+             td = tunnel_wall_depth
+          ENDIF
+!
+!--       Check for tunnel width
+          IF ( tunnel_width_x == 9999999.9_wp  .AND.                           &
+               tunnel_width_y == 9999999.9_wp  )  THEN
+             message_string = 'No tunnel width is given. '
+             CALL message( 'init_grid', 'PA0280', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( tunnel_width_x /= 9999999.9_wp  .AND.                           &
+               tunnel_width_y /= 9999999.9_wp  )  THEN
+             message_string = 'Inconsistent tunnel parameters:' //             &   
+                              'tunnel can only be oriented' //                 &
+                              'either in x- or in y-direction.'
+             CALL message( 'init_grid', 'PA0281', 1, 2, 0, 6, 0 )
+          ENDIF
+!
+!--       Tunnel axis along y
+          IF ( tunnel_width_x /= 9999999.9_wp )  THEN
+             IF ( tunnel_width_x > ( nx + 1 ) * dx )  THEN
+                message_string = 'Tunnel width too large'
+                CALL message( 'init_grid', 'PA0282', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             txs_out = INT( ( nx + 1 ) * 0.5_wp * dx - tunnel_width_x * 0.5_wp )
+             txe_out = INT( ( nx + 1 ) * 0.5_wp * dx + tunnel_width_x * 0.5_wp )
+             txs_in  = INT( ( nx + 1 ) * 0.5_wp * dx -                         &
+                                      ( tunnel_width_x * 0.5_wp - td ) )
+             txe_in  = INT( ( nx + 1 ) * 0.5_wp * dx +                         &
+                                   ( tunnel_width_x * 0.5_wp - td ) )
+
+             tys_out = INT( ( ny + 1 ) * 0.5_wp * dy - tunnel_length * 0.5_wp )
+             tye_out = INT( ( ny + 1 ) * 0.5_wp * dy + tunnel_length * 0.5_wp )
+             tys_in  = tys_out
+             tye_in  = tye_out
+          ENDIF
+          IF ( tunnel_width_x /= 9999999.9_wp  .AND.                           &   
+               tunnel_width_x - 2.0_wp * td <= 2.0_wp * dx )                   &
+          THEN
+             message_string = 'Tunnel width too small'
+             CALL message( 'init_grid', 'PA0175', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( tunnel_width_y /= 9999999.9_wp  .AND.                           &
+               tunnel_width_y - 2.0_wp * td <= 2.0_wp * dy )                   &
+          THEN
+             message_string = 'Tunnel width too small'
+             CALL message( 'init_grid', 'PA0455', 1, 2, 0, 6, 0 )
+          ENDIF
+!
+!--       Tunnel axis along x
+          IF ( tunnel_width_y /= 9999999.9_wp )  THEN
+             IF ( tunnel_width_y > ( ny + 1 ) * dy )  THEN
+                message_string = 'Tunnel width too large'
+                CALL message( 'init_grid', 'PA0456', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             txs_out = INT( ( nx + 1 ) * 0.5_wp * dx - tunnel_length * 0.5_wp )
+             txe_out = INT( ( nx + 1 ) * 0.5_wp * dx + tunnel_length * 0.5_wp )
+             txs_in  = txs_out
+             txe_in  = txe_out
+
+             tys_out = INT( ( ny + 1 ) * 0.5_wp * dy - tunnel_width_y * 0.5_wp )
+             tye_out = INT( ( ny + 1 ) * 0.5_wp * dy + tunnel_width_y * 0.5_wp )
+             tys_in  = INT( ( ny + 1 ) * 0.5_wp * dy -                         &
+                                        ( tunnel_width_y * 0.5_wp - td ) )
+             tye_in  = INT( ( ny + 1 ) * 0.5_wp * dy +                         &
+                                     ( tunnel_width_y * 0.5_wp - td ) )
+          ENDIF
+
+          topo = 0
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+!
+!--             Use heaviside function to model outer tunnel surface
+                hv_out = th * 0.5_wp *                                         &
+                              ( ( SIGN( 1.0_wp, i * dx - txs_out ) + 1.0_wp )  &
+                              - ( SIGN( 1.0_wp, i * dx - txe_out ) + 1.0_wp ) )
+
+                hv_out = hv_out * 0.5_wp *                                     &
+                            ( ( SIGN( 1.0_wp, j * dy - tys_out ) + 1.0_wp )    &
+                            - ( SIGN( 1.0_wp, j * dy - tye_out ) + 1.0_wp ) )
+!    
+!--             Use heaviside function to model inner tunnel surface
+                hv_in  = ( th - td ) * 0.5_wp *                                &
+                                ( ( SIGN( 1.0_wp, i * dx - txs_in ) + 1.0_wp ) &
+                                - ( SIGN( 1.0_wp, i * dx - txe_in ) + 1.0_wp ) )
+
+                hv_in = hv_in * 0.5_wp *                                       &
+                                ( ( SIGN( 1.0_wp, j * dy - tys_in ) + 1.0_wp ) &
+                                - ( SIGN( 1.0_wp, j * dy - tye_in ) + 1.0_wp ) )
+!
+!--             Set flags at x-y-positions without any tunnel surface
+                IF ( hv_out - hv_in == 0.0_wp )  THEN
+                   topo(nzb+1:nzt+1,j,i) = IBSET( topo(nzb+1:nzt+1,j,i), 0 )
+!
+!--             Set flags at x-y-positions with tunnel surfaces
+                ELSE
+                   DO  k = nzb + 1, nzt + 1
+!
+!--                   Inner tunnel
+                      IF ( hv_out - hv_in == th )  THEN
+                         IF ( zw(k) <= hv_out )  THEN
+                            topo(k,j,i) = IBCLR( topo(k,j,i), 0 )
+                         ELSE
+                            topo(k,j,i) = IBSET( topo(k,j,i), 0 )
+                         ENDIF
+                      ENDIF
+!
+!--                   Lateral tunnel walls
+                      IF ( hv_out - hv_in == td )  THEN
+                         IF ( zw(k) <= hv_in )  THEN 
+                            topo(k,j,i) = IBSET( topo(k,j,i), 0 )
+                         ELSEIF ( zw(k) > hv_in  .AND.  zw(k) <= hv_out )  THEN 
+                            topo(k,j,i) = IBCLR( topo(k,j,i), 0 )
+                         ELSEIF ( zw(k) > hv_out )  THEN 
+                            topo(k,j,i) = IBSET( topo(k,j,i), 0 )
+                         ENDIF
+                      ENDIF
+                   ENDDO
+                ENDIF
+             ENDDO
+          ENDDO
+
+          CALL exchange_horiz_int( topo, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!--       Set boundary conditions also for flags. Can be interpreted as Neumann
+!--       boundary conditions for topography. 
+          IF ( .NOT. bc_ns_cyc )  THEN
+             IF ( nys == 0  )  THEN
+                DO  i = 1, nbgp     
+                   topo(:,nys-i,:)   = topo(:,nys,:)
+                ENDDO
+             ENDIF
+             IF ( nyn == ny )  THEN
+                DO  i = 1, nbgp  
+                   topo(:,nyn+i,:) = topo(:,nyn,:)
+                ENDDO
+             ENDIF
+          ENDIF
+          IF ( .NOT. bc_lr_cyc )  THEN
+             IF ( nxl == 0  )  THEN
+                DO  i = 1, nbgp   
+                   topo(:,:,nxl-i)   = topo(:,:,nxl)
+                ENDDO
+             ENDIF
+             IF ( nxr == nx )  THEN 
+                DO  i = 1, nbgp   
+                   topo(:,:,nxr+i) = topo(:,:,nxr)     
+                ENDDO
+             ENDIF      
+          ENDIF
+
+       CASE ( 'read_from_file' )
+!
+!--       Note, topography information have been already read.  
+!--       If required, further process topography, i.e. reference buildings on
+!--       top of orography and set temporary 3D topography array, which is 
+!--       used later to set grid flags. Calling of this rouinte is also 
+!--       required in case of ASCII input, even though no distinction between 
+!--       terrain- and building height is made in this case.  
+          CALL process_topography( topo )
+!
+!--       Filter holes resolved by only one grid-point
+          CALL filter_topography( topo )
+!
+!--       Exchange ghost-points, as well as add cyclic or Neumann boundary 
+!--       conditions.
+          CALL exchange_horiz_int( topo, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!--       Set lateral boundary conditions for topography on all ghost layers          
+          IF ( .NOT. bc_ns_cyc )  THEN
+             IF ( nys == 0  )  THEN
+                DO  i = 1, nbgp         
+                   topo(:,nys-i,:) = topo(:,nys,:)
+                ENDDO
+             ENDIF
+             IF ( nyn == ny )  THEN
+                DO  i = 1, nbgp         
+                   topo(:,nyn+i,:) = topo(:,nyn,:)
+                ENDDO
+             ENDIF
+          ENDIF
+
+          IF ( .NOT. bc_lr_cyc )  THEN
+             IF ( nxl == 0  )  THEN
+                DO  i = 1, nbgp 
+                   topo(:,:,nxl-i) = topo(:,:,nxl)
+                ENDDO
+             ENDIF
+             IF ( nxr == nx )  THEN
+                DO  i = 1, nbgp 
+                   topo(:,:,nxr+i) = topo(:,:,nxr)
+                ENDDO
+             ENDIF
+          ENDIF
+
+
+       CASE DEFAULT
+!   
+!--       The DEFAULT case is reached either if the parameter topography
+!--       contains a wrong character string or if the user has defined a special
+!--       case in the user interface. There, the subroutine user_init_grid 
+!--       checks which of these two conditions applies.
+          CALL user_init_grid( topo )
+          CALL filter_topography( topo )
+
+    END SELECT
+!
+!-- Consistency checks and index array initialization are only required for
+!-- non-flat topography.
+    IF ( TRIM( topography ) /= 'flat' )  THEN
+!
+!--    In case of non-flat topography, check whether the convention how to 
+!--    define the topography grid has been set correctly, or whether the default
+!--    is applicable. If this is not possible, abort.
+       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
+          IF ( TRIM( topography ) /= 'single_building' .AND.                   &
+               TRIM( topography ) /= 'single_street_canyon' .AND.              &
+               TRIM( topography ) /= 'tunnel'  .AND.                           &
+               TRIM( topography ) /= 'read_from_file')  THEN
+!--          The default value is not applicable here, because it is only valid
+!--          for the four standard cases 'single_building', 
+!--          'single_street_canyon', 'tunnel' and 'read_from_file'
+!--          defined in init_grid.
+             WRITE( message_string, * )                                        &
+               'The value for "topography_grid_convention" ',                  &
+               'is not set. Its default value is & only valid for ',           &
+               '"topography" = ''single_building'', ''tunnel'' ',              &
+               '''single_street_canyon'' & or ''read_from_file''.',            &
+               '& Choose ''cell_edge'' or ''cell_center''.'
+             CALL message( 'init_grid', 'PA0239', 1, 2, 0, 6, 0 )
+          ELSE
+!--          The default value is applicable here.
+!--          Set convention according to topography.
+             IF ( TRIM( topography ) == 'single_building' .OR.                 &
+                  TRIM( topography ) == 'single_street_canyon' )  THEN
+                topography_grid_convention = 'cell_edge'
+             ELSEIF ( TRIM( topography ) == 'read_from_file'  .OR.             &
+                      TRIM( topography ) == 'tunnel')  THEN
+                topography_grid_convention = 'cell_center'
+             ENDIF
+          ENDIF
+       ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.        &
+                TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
+          WRITE( message_string, * )                                           &
+            'The value for "topography_grid_convention" is ',                  &
+            'not recognized.& Choose ''cell_edge'' or ''cell_center''.'
+          CALL message( 'init_grid', 'PA0240', 1, 2, 0, 6, 0 )
+       ENDIF
+
+
+       IF ( topography_grid_convention == 'cell_edge' )  THEN
+! 
+!--       The array nzb_local as defined using the 'cell_edge' convention 
+!--       describes the actual total size of topography which is defined at the 
+!--       cell edges where u=0 on the topography walls in x-direction and v=0 
+!--       on the topography walls in y-direction. However, PALM uses individual
+!--       arrays nzb_u|v|w|s_inner|outer that are based on nzb_s_inner.
+!--       Therefore, the extent of topography in nzb_local is now reduced by 
+!--       1dx at the E topography walls and by 1dy at the N topography walls 
+!--       to form the basis for nzb_s_inner. 
+!--       Note, the reverse memory access (i-j instead of j-i) is absolutely
+!--       required at this point.
+          DO  j = nys+1, nyn+1
+             DO  i = nxl-1, nxr
+                DO  k = nzb, nzt+1
+                   IF ( BTEST( topo(k,j,i), 0 )  .OR.                          &
+                        BTEST( topo(k,j,i+1), 0 ) )                            &
+                       topo(k,j,i) = IBSET( topo(k,j,i), 0 )
+                ENDDO
+             ENDDO
+          ENDDO      
+          CALL exchange_horiz_int( topo, nys, nyn, nxl, nxr, nzt, nbgp )
+
+          DO  i = nxl, nxr+1
+             DO  j = nys-1, nyn
+                DO  k = nzb, nzt+1
+                   IF ( BTEST( topo(k,j,i), 0 )  .OR.                          &
+                        BTEST( topo(k,j+1,i), 0 ) )                            &
+                      topo(k,j,i) = IBSET( topo(k,j,i), 0 )
+                ENDDO
+             ENDDO
+          ENDDO  
+          CALL exchange_horiz_int( topo, nys, nyn, nxl, nxr, nzt, nbgp )
+   
+       ENDIF
+    ENDIF
+
+
+ END SUBROUTINE init_topo
+
+ SUBROUTINE set_topo_flags(topo)
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, constant_flux_layer, land_surface,        &
+               use_surface_fluxes, use_top_fluxes, urban_surface
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb,  &
+               nzt, wall_flags_0
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i             !< index variable along x
+    INTEGER(iwp) ::  j             !< index variable along y
+    INTEGER(iwp) ::  k             !< index variable along z
+
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo !< input array for 3D topography and dummy array for setting "outer"-flags
+
+    ALLOCATE( wall_flags_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    wall_flags_0 = 0
+!
+!-- Set-up topography flags. First, set flags only for s, u, v and w-grid.
+!-- Further special flags will be set in following loops. 
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb, nzt+1
+!
+!--          scalar grid
+             IF ( BTEST( topo(k,j,i), 0 ) )                                 &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 0 )
+!
+!--          u grid
+             IF ( BTEST( topo(k,j,i),   0 )  .AND.                          &
+                  BTEST( topo(k,j,i-1), 0 ) )                               &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 1 )
+!
+!--          v grid
+             IF ( BTEST( topo(k,j,i),   0 )  .AND.                          &
+                  BTEST( topo(k,j-1,i), 0 ) )                               &
+                 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 2 )
+
+          ENDDO
+
+          DO k = nzb, nzt
+!
+!--          w grid
+             IF ( BTEST( topo(k,j,i),   0 )  .AND.                          &
+                  BTEST( topo(k+1,j,i), 0 ) )                               &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 3 )
+          ENDDO
+          wall_flags_0(nzt+1,j,i) = IBSET( wall_flags_0(nzt+1,j,i), 3 )
+
+       ENDDO
+    ENDDO
+
+    CALL exchange_horiz_int( wall_flags_0, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!-- Set outer array for scalars to mask near-surface grid points in 
+!-- production_e
+    DO i = nxl, nxr
+       DO j = nys, nyn
+          DO k = nzb, nzt+1
+             IF ( BTEST( wall_flags_0(k,j-1,i), 0 )  .AND.                       &
+                  BTEST( wall_flags_0(k,j+1,i), 0 )  .AND.                       &
+                  BTEST( wall_flags_0(k,j,i-1), 0 )  .AND.                       &
+                  BTEST( wall_flags_0(k,j-1,i-1), 0 )  .AND.                       &
+                  BTEST( wall_flags_0(k,j+1,i-1), 0 )  .AND.                       &
+                  BTEST( wall_flags_0(k,j-1,i+1), 0 )  .AND.                       &
+                  BTEST( wall_flags_0(k,j+1,i+1), 0 ) )                            &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 24 )
+          ENDDO
+       ENDDO
+    ENDDO
+!
+!-- Set further special flags
+    DO i = nxl, nxr
+       DO j = nys, nyn
+          DO k = nzb, nzt+1
+!
+!--          scalar grid, former nzb_diff_s_inner.
+!--          Note, use this flag also to mask topography in diffusion_u and 
+!--          diffusion_v along the vertical direction. In case of 
+!--          use_surface_fluxes, fluxes are calculated via MOST, else, simple
+!--          gradient approach is applied. Please note, in case of u- and v-
+!--          diffuison, a small error is made at edges (on the east side for u,
+!--          at the north side for v), since topography on scalar grid point
+!--          is used instead of topography on u/v-grid. As number of topography grid
+!--          points on uv-grid is different than s-grid, different number of 
+!--          surface elements would be required. In order to avoid this, 
+!--          treat edges (u(k,j,i+1)) simply by a gradient approach, i.e. these
+!--          points are not masked within diffusion_u. Tests had shown that the
+!--          effect on the flow is negligible. 
+             IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )                         &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 8 )
+             ELSE
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 8 )
+             ENDIF
+
+          ENDDO
+!
+!--       Special flag to control vertical diffusion at model top - former 
+!--       nzt_diff
+          wall_flags_0(:,j,i) = IBSET( wall_flags_0(:,j,i), 9 )
+          IF ( use_top_fluxes )                                                &
+             wall_flags_0(nzt+1,j,i) = IBCLR( wall_flags_0(nzt+1,j,i), 9 )
+
+
+          DO k = nzb+1, nzt
+!
+!--          Special flag on u grid, former nzb_u_inner + 1, required   
+!--          for disturb_field and initialization. Do not disturb directly at
+!--          topography, as well as initialize u with zero one grid point outside
+!--          of topography.
+             IF ( BTEST( wall_flags_0(k-1,j,i), 1 )  .AND.                     &
+                  BTEST( wall_flags_0(k,j,i),   1 )  .AND.                     &
+                  BTEST( wall_flags_0(k+1,j,i), 1 ) )                          &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 20 )
+!
+!--          Special flag on v grid, former nzb_v_inner + 1, required   
+!--          for disturb_field and initialization. Do not disturb directly at
+!--          topography, as well as initialize v with zero one grid point outside
+!--          of topography.
+             IF ( BTEST( wall_flags_0(k-1,j,i), 2 )  .AND.                     &
+                  BTEST( wall_flags_0(k,j,i),   2 )  .AND.                     &
+                  BTEST( wall_flags_0(k+1,j,i), 2 ) )                          &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 )
+!
+!--          Special flag on scalar grid, former nzb_s_inner+1. Used for 
+!--          lpm_sgs_tke
+             IF ( BTEST( wall_flags_0(k,j,i),   0 )  .AND.                     &
+                  BTEST( wall_flags_0(k-1,j,i), 0 )  .AND.                     &
+                  BTEST( wall_flags_0(k+1,j,i), 0 ) )                          &
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 25 )
+!
+!--          Special flag on scalar grid, nzb_diff_s_outer - 1, required in 
+!--          in production_e
+             IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
+                IF ( BTEST( wall_flags_0(k,j,i),   24 )  .AND.                 &
+                     BTEST( wall_flags_0(k-1,j,i), 24 )  .AND.                 &
+                     BTEST( wall_flags_0(k+1,j,i), 0 ) )                       &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 29 )
+             ELSE
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )                         &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 29 )
+             ENDIF
+!
+!--          Special flag on scalar grid, nzb_diff_s_outer - 1, required in 
+!--          in production_e
+             IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
+                IF ( BTEST( wall_flags_0(k,j,i),   0 )  .AND.                  &
+                     BTEST( wall_flags_0(k-1,j,i), 0 )  .AND.                  &
+                     BTEST( wall_flags_0(k+1,j,i), 0 ) )                       &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 )
+             ELSE
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )                         &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 )
+             ENDIF
+          ENDDO
+!
+!--       Flags indicating downward facing walls
+          DO k = nzb+1, nzt
+!
+!--          Scalar grid
+             IF ( BTEST( wall_flags_0(k-1,j,i), 0 )  .AND.                     &
+            .NOT. BTEST( wall_flags_0(k,j,i), 0   ) )                          & 
+                 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 13 ) 
+!
+!--          Downward facing wall on u grid
+             IF ( BTEST( wall_flags_0(k-1,j,i), 1 )  .AND.                     &
+            .NOT. BTEST( wall_flags_0(k,j,i), 1   ) )                          & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 15 )
+!
+!--          Downward facing wall on v grid
+             IF ( BTEST( wall_flags_0(k-1,j,i), 2 )  .AND.                     &
+            .NOT. BTEST( wall_flags_0(k,j,i), 2   ) )                          & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 17 )
+!
+!--          Downward facing wall on w grid
+             IF ( BTEST( wall_flags_0(k-1,j,i), 3 )  .AND.                     &
+            .NOT. BTEST( wall_flags_0(k,j,i), 3 ) )                            & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 19 )
+          ENDDO
+!
+!--       Flags indicating upward facing walls
+          DO k = nzb, nzt
+!
+!--          Upward facing wall on scalar grid
+             IF ( .NOT. BTEST( wall_flags_0(k,j,i),   0 )  .AND.               &
+                        BTEST( wall_flags_0(k+1,j,i), 0 ) )                    & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 )
+!
+!--          Upward facing wall on u grid
+             IF ( .NOT. BTEST( wall_flags_0(k,j,i),   1 )  .AND.               &
+                        BTEST( wall_flags_0(k+1,j,i), 1 ) )                    & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 14 )
+
+!   
+!--          Upward facing wall on v grid
+             IF ( .NOT. BTEST( wall_flags_0(k,j,i),   2 )  .AND.               &
+                        BTEST( wall_flags_0(k+1,j,i), 2 ) )                    & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 16 )
+   
+!
+!--          Upward facing wall on w grid
+             IF ( .NOT. BTEST( wall_flags_0(k,j,i),   3 )  .AND.               &
+                        BTEST( wall_flags_0(k+1,j,i), 3 ) )                    & 
+                wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 )
+!
+!--          Special flag on scalar grid, former nzb_s_inner
+             IF ( BTEST( wall_flags_0(k,j,i), 0 )  .OR.                        &
+                  BTEST( wall_flags_0(k,j,i), 12 ) .OR.                        &
+                  BTEST( wall_flags_0(k,j,i), 13 ) )                           &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 22 )
+!
+!--          Special flag on scalar grid, nzb_diff_s_inner - 1, required for 
+!--          flow_statistics
+             IF ( constant_flux_layer  .OR.  use_surface_fluxes )  THEN
+                IF ( BTEST( wall_flags_0(k,j,i),   0 )  .AND.                  &
+                     BTEST( wall_flags_0(k+1,j,i), 0 ) )                       &
+                  wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 23 )
+             ELSE
+                IF ( BTEST( wall_flags_0(k,j,i), 22 ) )                        &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 23 )
+             ENDIF
+   
+
+          ENDDO
+          wall_flags_0(nzt+1,j,i) = IBSET( wall_flags_0(nzt+1,j,i), 22 )
+          wall_flags_0(nzt+1,j,i) = IBSET( wall_flags_0(nzt+1,j,i), 23 )
+       ENDDO
+    ENDDO
+!
+!-- Finally, set identification flags indicating natural terrain or buildings.
+!-- Natural terrain grid points.
+    IF ( land_surface )  THEN
+       DO i = nxl, nxr
+          DO j = nys, nyn
+             DO k = nzb, nzt+1
+!
+!--             Natural terrain grid point
+                IF ( BTEST( topo(k,j,i), 1 ) )                                 &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 5 )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+!
+!-- Building grid points.
+    IF ( urban_surface )  THEN
+       DO i = nxl, nxr
+          DO j = nys, nyn
+             DO k = nzb, nzt+1
+                IF ( BTEST( topo(k,j,i), 2 ) )                                 &
+                   wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 6 )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+!
+!-- Exchange ghost points for wall flags
+    CALL exchange_horiz_int( wall_flags_0, nys, nyn, nxl, nxr, nzt, nbgp )
+!
+!-- Set boundary conditions also for flags. Can be interpreted as Neumann
+!-- boundary conditions for topography. 
+    IF ( .NOT. bc_ns_cyc )  THEN
+       IF ( nys == 0  )  THEN
+          DO  i = 1, nbgp     
+             wall_flags_0(:,nys-i,:)   = wall_flags_0(:,nys,:)
+          ENDDO
+       ENDIF
+       IF ( nyn == ny )  THEN
+          DO  i = 1, nbgp  
+             wall_flags_0(:,nyn+i,:) = wall_flags_0(:,nyn,:)
+          ENDDO
+       ENDIF
+    ENDIF
+    IF ( .NOT. bc_lr_cyc )  THEN
+       IF ( nxl == 0  )  THEN
+          DO  i = 1, nbgp   
+             wall_flags_0(:,:,nxl-i)   = wall_flags_0(:,:,nxl)
+          ENDDO
+       ENDIF
+       IF ( nxr == nx )  THEN 
+          DO  i = 1, nbgp   
+             wall_flags_0(:,:,nxr+i) = wall_flags_0(:,:,nxr)     
+          ENDDO
+       ENDIF      
+    ENDIF
+
+
+ END SUBROUTINE set_topo_flags
+
+
+
Index: /palm/tags/release-6.0/SOURCE/init_masks.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_masks.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_masks.f90	(revision 3477)
@@ -0,0 +1,858 @@
+!> @file init_masks.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! Add checks for chemistry and radiation model
+! Set indices for terrain-following masked output
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! 
+! 3419 2018-10-24 17:27:31Z gronemeier
+! ocean renamed ocean_mode
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz_stretch_level was replaced by dz_stretch_level_start
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2344 2017-08-09 11:00:34Z raasch
+! explicit setting of initial values for array domask required due to a bug
+! in the Cray compiler (appears only if option -eD is used)
+! 
+! 2301 2017-06-29 16:41:21Z gronemeier
+! Bugfix: set variable name length to global value
+! 
+! 
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2271 2017-06-09 12:34:55Z sward
+! Changed error message
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme replaced by microphysics_*
+!
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module name changed + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1438 2014-07-22 14:14:06Z heinze
+! +nr, qc, qr
+! 
+! 1414 2014-05-31 11:19:48Z gronemeier
+! Bugfix: first and last grid points as they appear in 3D volume data can now
+! be included to masked data output
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: ONLY statement for module netcdf_control removed 
+!
+! 1320 2014-03-20 08:40:49Z raasch 
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1186 2013-06-18 06:22:52Z raasch
+! bugfix: 0.0 replaced by zu(nzb) as the lowest default height level for masks,
+! because a zero value does not work in case of ocean runs
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1032 2012-10-21 13:03:21Z letzel
+! mask locations determined based on scalar positions
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+!
+! 978 2012-08-09 08:28:32Z fricke
+! +z0h*
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives 
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! 410 2009-12-04 17:05:40Z letzel
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initialize masked data output
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_masks
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu, zw
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_check_data_output
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry,                                                  &
+               constant_diffusion, cloud_droplets,                             &
+               data_output_masks, data_output_masks_user,                      &
+               doav, doav_n, domask, domask_no, dz, dz_stretch_level_start,    &
+               humidity, mask, masks, mask_scale, mask_i,                      &
+               mask_i_global, mask_j, mask_j_global, mask_k, mask_k_global,    &
+               mask_k_over_surface,                                            &
+               mask_loop, mask_size, mask_size_l, mask_start_l,                &
+               mask_surface, mask_x,                                           &
+               mask_x_loop, mask_xyz_dimension, mask_y, mask_y_loop, mask_z,   &
+               mask_z_loop, max_masks,  message_string, mid,                   &
+               passive_scalar, ocean_mode, varnamelength
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxr, ny, nyn, nys, nz, nzb, nzt
+
+    USE kinds
+
+    USE netcdf_interface,                                                      &
+        ONLY:  domask_unit, netcdf_data_format
+
+    USE particle_attributes,                                                   &
+        ONLY:  particle_advection
+
+    USE pegrid  
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_check_data_output
+        
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_check_data_output 
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=varnamelength) ::  var  !<
+    CHARACTER (LEN=7) ::  unit !<
+    
+    CHARACTER (LEN=varnamelength), DIMENSION(max_masks,100) ::  do_mask      !<
+    CHARACTER (LEN=varnamelength), DIMENSION(max_masks,100) ::  do_mask_user !<
+
+    INTEGER(iwp) ::  count        !< counting masking indices along a dimension
+    INTEGER(iwp) ::  i            !< 
+    INTEGER(iwp) ::  ilen         !<
+    INTEGER(iwp) ::  ind(6)       !<
+    INTEGER(iwp) ::  ind_array(1) !<
+    INTEGER(iwp) ::  j            !<
+    INTEGER(iwp) ::  k            !<
+    INTEGER(iwp) ::  m            !< mask index
+    INTEGER(iwp) ::  n            !<
+    INTEGER(iwp) ::  sender       !<
+    
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  tmp_array !<
+
+    LOGICAL ::  found !<
+
+!
+!-- Initial values are explicitly set here due to a bug in the Cray compiler
+!-- in case of assignments of initial values in declaration statements for
+!-- arrays with more than 9999 elements (appears with -eD only)
+    domask = ' '
+
+!
+!-- Allocation and initialization
+    ALLOCATE( tmp_array( MAX(nx,ny,nz)+2 ) )
+
+    ALLOCATE( mask_i(max_masks,nxr-nxl+2), &
+              mask_j(max_masks,nyn-nys+2), &
+              mask_k(max_masks,nzt-nzb+2) )
+!
+!-- internal mask arrays ("mask,dimension,selection")
+    ALLOCATE( mask(max_masks,3,mask_xyz_dimension), &
+              mask_loop(max_masks,3,3) )
+    
+!
+!-- Parallel mask output not yet supported. In check_parameters data format 
+!-- is restricted and is switched back to non-parallel output. Therefore the
+!-- following error can not occur at the moment.
+    IF ( netcdf_data_format > 4 )  THEN
+       message_string = 'netCDF file formats '//                               &
+                        '5 and 6 (with parallel I/O support)'//                &
+                        ' are currently not supported.'
+       CALL message( 'init_masks', 'PA0328', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Store data output parameters for masked data output in few shared arrays
+    DO  mid = 1, masks
+    
+       do_mask     (mid,:) = data_output_masks(mid,:)
+       do_mask_user(mid,:) = data_output_masks_user(mid,:)
+       mask      (mid,1,:) = mask_x(mid,:) 
+       mask      (mid,2,:) = mask_y(mid,:)
+       mask      (mid,3,:) = mask_z(mid,:) 
+!
+!--    Flag a mask as terrain following
+       IF ( mask_k_over_surface(mid,1) /= -1_iwp )  THEN
+          mask_surface(mid) = .TRUE.
+       ENDIF
+
+       IF ( mask_x_loop(mid,1) == -1.0_wp  .AND.  mask_x_loop(mid,2) == -1.0_wp&
+            .AND.  mask_x_loop(mid,3) == -1.0_wp )  THEN
+          mask_loop(mid,1,1:2) = -1.0_wp
+          mask_loop(mid,1,3)   =  0.0_wp
+       ELSE
+          mask_loop(mid,1,:) = mask_x_loop(mid,:)
+       ENDIF
+       IF ( mask_y_loop(mid,1) == -1.0_wp  .AND.  mask_y_loop(mid,2) == -1.0_wp&
+            .AND.  mask_y_loop(mid,3) == -1.0_wp )  THEN
+          mask_loop(mid,2,1:2) = -1.0_wp
+          mask_loop(mid,2,3)   =  0.0_wp
+       ELSE
+          mask_loop(mid,2,:) = mask_y_loop(mid,:)
+       ENDIF
+       IF ( mask_z_loop(mid,1) == -1.0_wp  .AND.  mask_z_loop(mid,2) == -1.0_wp&
+            .AND.  mask_z_loop(mid,3) == -1.0_wp )  THEN
+          mask_loop(mid,3,1:2) = -1.0_wp
+          mask_loop(mid,3,3)   =  0.0_wp
+       ELSE
+          mask_loop(mid,3,:) = mask_z_loop(mid,:)
+       ENDIF
+       
+    ENDDO
+    
+    mask_i = -1; mask_j = -1; mask_k = -1
+    
+!
+!-- Global arrays are required by define_netcdf_header.
+    IF ( myid == 0  .OR.  netcdf_data_format > 4 )  THEN
+       ALLOCATE( mask_i_global(max_masks,nx+2), &
+                 mask_j_global(max_masks,ny+2), &
+                 mask_k_global(max_masks,nz+2) )
+       mask_i_global = -1; mask_j_global = -1; mask_k_global = -1
+    ENDIF
+
+!
+!-- Determine variable names for each mask
+    DO  mid = 1, masks
+!
+!--    Append user-defined data output variables to the standard data output
+       IF ( do_mask_user(mid,1) /= ' ' )  THEN
+          i = 1
+          DO  WHILE ( do_mask(mid,i) /= ' '  .AND.  i <= 100 )
+             i = i + 1
+          ENDDO
+          j = 1
+          DO  WHILE ( do_mask_user(mid,j) /= ' '  .AND.  j <= 100 )
+             IF ( i > 100 )  THEN
+                WRITE ( message_string, * ) 'number of output quantitities ',  &
+                     'given by data_output_mask and data_output_mask_user ',   &
+                     'exceeds the limit of 100'
+                CALL message( 'init_masks', 'PA0329', 1, 2, 0, 6, 0 )
+             ENDIF
+             do_mask(mid,i) = do_mask_user(mid,j)
+             i = i + 1
+             j = j + 1
+          ENDDO
+       ENDIF
+
+!
+!--    Check and set steering parameters for mask data output and averaging
+       i   = 1
+       DO WHILE ( do_mask(mid,i) /= ' '  .AND.  i <= 100 )
+!
+!--       Check for data averaging
+          ilen = LEN_TRIM( do_mask(mid,i) )
+          j = 0                                              ! no data averaging
+          IF ( ilen > 3 )  THEN
+             IF ( do_mask(mid,i)(ilen-2:ilen) == '_av' )  THEN
+                j = 1                                           ! data averaging
+                do_mask(mid,i) = do_mask(mid,i)(1:ilen-3)
+             ENDIF
+          ENDIF
+          var = TRIM( do_mask(mid,i) )
+!
+!--       Check for allowed value and set units
+          SELECT CASE ( TRIM( var ) )
+
+             CASE ( 'e' )
+                IF ( constant_diffusion )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires constant_diffusion = .FALSE.'
+                   CALL message( 'init_masks', 'PA0103', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'm2/s2'
+
+             CASE ( 'thetal' )
+                IF ( .NOT. bulk_cloud_model )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires bulk_cloud_model = .TRUE.'
+                   CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'K'
+
+             CASE ( 'nc' )
+                IF ( .NOT. bulk_cloud_model )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires bulk_cloud_model = .TRUE.'
+                   CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 )
+                 ELSEIF ( .NOT. microphysics_morrison ) THEN
+                   message_string = 'output of "' // TRIM( var ) // '" ' //    &
+                         'requires  = morrison'
+                   CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = '1/m3'
+
+             CASE ( 'nr' )
+                IF ( .NOT. bulk_cloud_model )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires bulk_cloud_model = .TRUE.'
+                   CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 )
+                 ELSEIF ( .NOT. microphysics_seifert ) THEN
+                   message_string = 'output of "' // TRIM( var ) // '"' //     &
+                         'requires cloud_scheme = seifert_beheng'
+                   CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = '1/m3'
+
+             CASE ( 'pc', 'pr' )
+                IF ( .NOT. particle_advection )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires a "particles_par"-NAMELIST in the ',       &
+                        'parameter file (PARIN)'
+                   CALL message( 'init_masks', 'PA0104', 1, 2, 0, 6, 0 )
+                ENDIF
+                IF ( TRIM( var ) == 'pc' )  unit = 'number'
+                IF ( TRIM( var ) == 'pr' )  unit = 'm'
+
+             CASE ( 'q', 'thetav' )
+                IF ( .NOT. humidity )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires humidity = .TRUE.'
+                   CALL message( 'init_masks', 'PA0105', 1, 2, 0, 6, 0 )
+                ENDIF
+                IF ( TRIM( var ) == 'q'   )  unit = 'kg/kg'
+                IF ( TRIM( var ) == 'thetav' )  unit = 'K'
+
+             CASE ( 'qc' )
+                IF ( .NOT. bulk_cloud_model )  THEN
+                   message_string = 'output of "' // TRIM( var ) // '"' //     &
+                            'requires bulk_cloud_model = .TRUE.'
+                   CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'kg/kg'
+
+             CASE ( 'ql' )
+                IF ( .NOT. ( bulk_cloud_model  .OR.  cloud_droplets ) )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires bulk_cloud_model = .TRUE. or ',            &
+                        'cloud_droplets = .TRUE.'
+                   CALL message( 'init_masks', 'PA0106', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'kg/kg'
+
+             CASE ( 'ql_c', 'ql_v', 'ql_vp' )
+                IF ( .NOT. cloud_droplets )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires cloud_droplets = .TRUE.'
+                   CALL message( 'init_masks', 'PA0107', 1, 2, 0, 6, 0 )
+                ENDIF
+                IF ( TRIM( var ) == 'ql_c'  )  unit = 'kg/kg'
+                IF ( TRIM( var ) == 'ql_v'  )  unit = 'm3'
+                IF ( TRIM( var ) == 'ql_vp' )  unit = 'none'
+
+             CASE ( 'qv' )
+                IF ( .NOT. bulk_cloud_model )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires bulk_cloud_model = .TRUE.'
+                   CALL message( 'init_masks', 'PA0108', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'kg/kg'
+
+             CASE ( 'qr' )
+                IF ( .NOT. bulk_cloud_model )  THEN
+                   message_string = 'output of "' // TRIM( var ) // '" ' //    &
+                            'requires bulk_cloud_model = .TRUE.'
+                   CALL message( 'check_parameters', 'PA0108', 1, 2, 0, 6, 0 )
+                ELSEIF ( .NOT. microphysics_seifert ) THEN
+                   message_string = 'output of "' // TRIM( var ) // '" ' //    &
+                            'requires cloud_scheme = seifert_beheng'
+                   CALL message( 'check_parameters', 'PA0359', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'kg/kg'
+
+             CASE ( 'rho_sea_water' )
+                IF ( .NOT. ocean_mode )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires ocean mode'
+                   CALL message( 'init_masks', 'PA0109', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'kg/m3'
+
+             CASE ( 's' )
+                IF ( .NOT. passive_scalar )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires passive_scalar = .TRUE.'
+                   CALL message( 'init_masks', 'PA0110', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'conc'
+
+             CASE ( 'sa' )
+                IF ( .NOT. ocean_mode )  THEN
+                   WRITE ( message_string, * ) 'output of "', TRIM( var ),     &
+                        '" requires ocean mode'
+                   CALL message( 'init_masks', 'PA0109', 1, 2, 0, 6, 0 )
+                ENDIF
+                unit = 'psu'
+
+             CASE ( 'us*', 't*', 'lwp*', 'pra*', 'prr*', 'z0*', 'z0h*' )
+                WRITE ( message_string, * ) 'illegal value for data_',         &
+                     'output: "', TRIM( var ), '" is only allowed',            &
+                     'for horizontal cross section'
+                CALL message( 'init_masks', 'PA0111', 1, 2, 0, 6, 0 )
+
+             CASE ( 'p', 'theta', 'u', 'v', 'w' )
+                IF ( TRIM( var ) == 'p'  )  unit = 'Pa'
+                IF ( TRIM( var ) == 'theta' )  unit = 'K'
+                IF ( TRIM( var ) == 'u'  )  unit = 'm/s'
+                IF ( TRIM( var ) == 'v'  )  unit = 'm/s'
+                IF ( TRIM( var ) == 'w'  )  unit = 'm/s'
+                CONTINUE
+
+             CASE DEFAULT
+             
+                CALL user_check_data_output( var, unit )
+                           
+                IF ( salsa )  THEN
+                   CALL salsa_check_data_output( var, unit )
+                ENDIF               
+
+                IF ( unit == 'illegal'  .AND.  air_chemistry                   &
+                     .AND.  (var(1:3) == 'kc_' .OR. var(1:3) == 'em_') )  THEN
+                   CALL chem_check_data_output( var, unit, 0, 0, 0 )
+                ENDIF
+
+                IF ( unit == 'illegal' )  THEN
+                   CALL radiation_check_data_output( var, unit, 0, 0, 0 )
+                ENDIF
+
+                IF ( unit == 'illegal' )  THEN
+                   IF ( do_mask_user(mid,1) /= ' ' )  THEN
+                      WRITE ( message_string, * ) 'illegal value for data_',   &
+                           'output_masks or data_output_masks_user: "',        &
+                           TRIM( do_mask(mid,i) ), '"'
+                      CALL message( 'init_masks', 'PA0018', 1, 2, 0, 6, 0 )
+                   ELSE
+                      WRITE ( message_string, * ) 'illegal value for data_',   &
+                           ' output_masks : "', TRIM( do_mask(mid,i) ), '"'
+                      CALL message( 'init_masks', 'PA0330', 1, 2, 0, 6, 0 )
+                   ENDIF
+                ENDIF
+
+          END SELECT
+!
+!--       Set the internal steering parameters appropriately
+          domask_no(mid,j)                    = domask_no(mid,j) + 1
+          domask(mid,j,domask_no(mid,j))      = do_mask(mid,i)
+          domask_unit(mid,j,domask_no(mid,j)) = unit
+
+          IF ( j == 1 )  THEN
+!
+!--          Check, if variable is already subject to averaging
+             found = .FALSE.
+             DO  k = 1, doav_n
+                IF ( TRIM( doav(k) ) == TRIM( var ) )  found = .TRUE.
+             ENDDO
+
+             IF ( .NOT. found )  THEN
+                doav_n = doav_n + 1
+                doav(doav_n) = var
+             ENDIF
+          ENDIF
+
+          i = i + 1
+
+       ENDDO   ! do_mask(mid,i)
+    ENDDO   ! mid
+
+
+!
+!-- Determine mask locations for each mask
+    DO  mid = 1, masks
+!
+!--    Set local masks for each subdomain along all three dimensions
+       CALL set_mask_locations( 1, dx, 'dx', nx, 'nx', nxl, nxr )
+       CALL set_mask_locations( 2, dy, 'dy', ny, 'ny', nys, nyn )
+       IF ( .NOT. mask_surface(mid) )  THEN
+          CALL set_mask_locations( 3, dz(1), 'dz', nz, 'nz', nzb, nzt )
+       ELSE
+!
+!--       Set vertical mask locations and size in case of terrain-following
+!--       output
+          count = 0
+          DO  WHILE ( mask_k_over_surface(mid, count+1) >= 0 )
+             m = mask_k_over_surface(mid, count+1)
+             IF ( m > nz+1 )  THEN
+                WRITE ( message_string, '(I3,A,I3,A,I1,3A,I3)' )               &
+                     m,' in mask ',mid,' along dimension ', 3,                 &
+                     ' exceeds (nz+1) = ',nz+1
+                CALL message( 'init_masks', 'PA0331', 1, 2, 0, 6, 0 )
+             ENDIF
+             count = count + 1
+             mask_k(mid,count) = mask_k_over_surface(mid, count)
+             IF ( count == mask_xyz_dimension )  EXIT
+          ENDDO
+          mask_start_l(mid,3) = 1
+          mask_size(mid,3)    = count
+          mask_size_l(mid,3)  = count
+       ENDIF
+!
+!--    Set global masks along all three dimensions (required by
+!--    define_netcdf_header).
+#if defined( __parallel )
+!
+!--    PE0 receives partial arrays from all processors of the respective mask
+!--    and outputs them. Here a barrier has to be set, because otherwise 
+!--    "-MPI- FATAL: Remote protocol queue full" may occur.
+
+       CALL MPI_BARRIER( comm2d, ierr )
+
+       IF ( myid == 0 )  THEN
+!
+!--       Local arrays can be relocated directly.
+          mask_i_global(mid,mask_start_l(mid,1): &
+                       mask_start_l(mid,1)+mask_size_l(mid,1)-1) = &
+                       mask_i(mid,:mask_size_l(mid,1))
+          mask_j_global(mid,mask_start_l(mid,2): &
+                       mask_start_l(mid,2)+mask_size_l(mid,2)-1) = &
+                       mask_j(mid,:mask_size_l(mid,2))
+          mask_k_global(mid,mask_start_l(mid,3): &
+                       mask_start_l(mid,3)+mask_size_l(mid,3)-1) = &
+                       mask_k(mid,:mask_size_l(mid,3))
+!
+!--       Receive data from all other PEs.
+          DO  n = 1, numprocs-1
+!
+!--          Receive index limits first, then arrays.
+!--          Index limits are received in arbitrary order from the PEs.
+             CALL MPI_RECV( ind(1), 6, MPI_INTEGER, MPI_ANY_SOURCE, 0,  &
+                  comm2d, status, ierr )
+!
+!--          Not all PEs have data for the mask.
+             IF ( ind(1) /= -9999 )  THEN
+                sender = status(MPI_SOURCE)
+                CALL MPI_RECV( tmp_array(ind(1)), ind(2)-ind(1)+1,  &
+                               MPI_INTEGER, sender, 1, comm2d, status, ierr )
+                mask_i_global(mid,ind(1):ind(2)) = tmp_array(ind(1):ind(2))
+                CALL MPI_RECV( tmp_array(ind(3)), ind(4)-ind(3)+1,  &
+                               MPI_INTEGER, sender, 2, comm2d, status, ierr )
+                mask_j_global(mid,ind(3):ind(4)) = tmp_array(ind(3):ind(4))
+                CALL MPI_RECV( tmp_array(ind(5)), ind(6)-ind(5)+1,  &
+                               MPI_INTEGER, sender, 3, comm2d, status, ierr )
+                mask_k_global(mid,ind(5):ind(6)) = tmp_array(ind(5):ind(6))
+             ENDIF
+          ENDDO
+
+       ELSE
+!
+!--       If at least part of the mask resides on the PE, send the index limits
+!--       for the target array, otherwise send -9999 to PE0.
+          IF ( mask_size_l(mid,1) > 0  .AND.  mask_size_l(mid,2) > 0  .AND.  &
+               mask_size_l(mid,3) > 0  )  THEN
+             ind(1) = mask_start_l(mid,1)
+             ind(2) = mask_start_l(mid,1) + mask_size_l(mid,1) - 1
+             ind(3) = mask_start_l(mid,2)
+             ind(4) = mask_start_l(mid,2) + mask_size_l(mid,2) - 1
+             ind(5) = mask_start_l(mid,3)
+             ind(6) = mask_start_l(mid,3) + mask_size_l(mid,3) - 1
+          ELSE
+             ind(1) = -9999; ind(2) = -9999
+             ind(3) = -9999; ind(4) = -9999
+             ind(5) = -9999; ind(6) = -9999
+          ENDIF
+          CALL MPI_SEND( ind(1), 6, MPI_INTEGER, 0, 0, comm2d, ierr )
+!
+!--       If applicable, send data to PE0.
+          IF ( ind(1) /= -9999 )  THEN
+             tmp_array(:mask_size_l(mid,1)) = mask_i(mid,:mask_size_l(mid,1))
+             CALL MPI_SEND( tmp_array(1), mask_size_l(mid,1),  &
+                            MPI_INTEGER, 0, 1, comm2d, ierr )
+             tmp_array(:mask_size_l(mid,2)) = mask_j(mid,:mask_size_l(mid,2))
+             CALL MPI_SEND( tmp_array(1), mask_size_l(mid,2),  &
+                            MPI_INTEGER, 0, 2, comm2d, ierr )
+             tmp_array(:mask_size_l(mid,3)) = mask_k(mid,:mask_size_l(mid,3))
+             CALL MPI_SEND( tmp_array(1), mask_size_l(mid,3),  &
+                            MPI_INTEGER, 0, 3, comm2d, ierr )
+          ENDIF
+       ENDIF
+!
+!--    A barrier has to be set, because otherwise some PEs may proceed too fast
+!--    so that PE0 may receive wrong data on tag 0.
+       CALL MPI_BARRIER( comm2d, ierr )
+       
+       IF ( netcdf_data_format > 4 )  THEN
+         
+          CALL MPI_BCAST( mask_i_global(mid,:), nx+2, MPI_INTEGER, 0, comm2d, &
+                          ierr )
+          CALL MPI_BCAST( mask_j_global(mid,:), ny+2, MPI_INTEGER, 0, comm2d, &
+                          ierr )
+          CALL MPI_BCAST( mask_k_global(mid,:), nz+2, MPI_INTEGER, 0, comm2d, &
+                          ierr ) 
+     
+       ENDIF
+
+#else
+!
+!--    Local arrays can be relocated directly.
+       mask_i_global(mid,:) = mask_i(mid,:)
+       mask_j_global(mid,:) = mask_j(mid,:)
+       mask_k_global(mid,:) = mask_k(mid,:)
+#endif
+    ENDDO   ! mid
+
+    DEALLOCATE( tmp_array )
+!
+!-- Internal mask arrays cannot be deallocated on PE 0 because they are
+!-- required for header output on PE 0.
+    IF ( myid /= 0 )  DEALLOCATE( mask, mask_loop )
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Set local mask for each subdomain along 'dim' direction.
+!------------------------------------------------------------------------------!
+    SUBROUTINE set_mask_locations( dim, dxyz, dxyz_string, nxyz, nxyz_string, &
+                                   lb, ub )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=2) ::  dxyz_string !<
+       CHARACTER (LEN=2) ::  nxyz_string !<
+       
+       INTEGER(iwp)  ::  count       !<
+       INTEGER(iwp)  ::  count_l     !<
+       INTEGER(iwp)  ::  dim         !<
+       INTEGER(iwp)  ::  m           !<
+       INTEGER(iwp)  ::  loop_begin  !<
+       INTEGER(iwp)  ::  loop_end    !<
+       INTEGER(iwp)  ::  loop_stride !<
+       INTEGER(iwp)  ::  lb          !<
+       INTEGER(iwp)  ::  nxyz        !<
+       INTEGER(iwp)  ::  ub          !<
+       
+       REAL(wp)      ::  dxyz  !<
+       REAL(wp)      ::  ddxyz !<
+       REAL(wp)      ::  tmp1  !<
+       REAL(wp)      ::  tmp2  !<
+
+       count = 0;  count_l = 0  
+       ddxyz = 1.0_wp / dxyz  
+       tmp1  = 0.0_wp
+       tmp2  = 0.0_wp
+
+       IF ( mask(mid,dim,1) >= 0.0_wp )  THEN
+!
+!--       use predefined mask_* array
+          DO  WHILE ( mask(mid,dim,count+1) >= 0.0_wp )
+             count = count + 1
+             IF ( dim == 1 .OR. dim == 2 )  THEN
+                m = NINT( mask(mid,dim,count) * mask_scale(dim) * ddxyz - 0.5_wp )
+                IF ( m < 0 )  m = 0  ! avoid negative values
+             ELSEIF ( dim == 3 )  THEN
+                ind_array =  &
+                     MINLOC( ABS( mask(mid,dim,count) * mask_scale(dim) - zu ) )
+                m = ind_array(1) - 1 + nzb  ! MINLOC uses lower array bound 1
+             ENDIF
+             IF ( m > (nxyz+1) )  THEN
+                WRITE ( message_string, '(I3,A,I3,A,I1,3A,I3)' )               &
+                     m,' in mask ',mid,' along dimension ',dim,                &
+                     ' exceeds (',nxyz_string,'+1) = ',nxyz+1
+                CALL message( 'init_masks', 'PA0331', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( ( m >= lb .AND. m <= ub ) .OR.     &
+                  ( m == (nxyz+1) .AND. ub == nxyz )  )  THEN
+                IF ( count_l == 0 )  mask_start_l(mid,dim) = count
+                count_l = count_l + 1
+                IF ( dim == 1 )  THEN
+                   mask_i(mid,count_l) = m
+                ELSEIF ( dim == 2 )  THEN
+                   mask_j(mid,count_l) = m
+                ELSEIF ( dim == 3 )  THEN
+                   mask_k(mid,count_l) = m
+                ENDIF
+             ENDIF
+             IF ( count == mask_xyz_dimension )  EXIT
+          ENDDO
+          mask_size(mid,dim)   = count
+          mask_size_l(mid,dim) = count_l
+
+       ELSE
+!
+!--       use predefined mask_loop_* array, or use the default (all grid points
+!--       along this direction)
+          IF ( mask_loop(mid,dim,1) < 0.0_wp )  THEN
+             tmp1 = mask_loop(mid,dim,1)
+             mask_loop(mid,dim,1) = zw(nzb)  !   lowest level  (default)
+          ENDIF
+          IF ( dim == 1 .OR. dim == 2 )  THEN
+             IF ( mask_loop(mid,dim,2) < 0.0_wp )  THEN
+                tmp2 = mask_loop(mid,dim,2)
+                mask_loop(mid,dim,2) = (nxyz+1)*dxyz / mask_scale(dim)   ! (default)
+             ENDIF
+             IF ( MAXVAL( mask_loop(mid,dim,1:2) )  &
+                  > (nxyz+1) * dxyz / mask_scale(dim) )  THEN
+                WRITE ( message_string, '(2(A,I3,A,I1,A,F9.3),5A,I1,A,F9.3)' ) &
+                     'mask_loop(',mid,',',dim,',1)=',mask_loop(mid,dim,1),     &
+                     ' and/or mask_loop(',mid,',',dim,',2)=', &
+                     mask_loop(mid,dim,2),' exceed (', &
+                     nxyz_string,'+1)*',dxyz_string,'/mask_scale(',dim,')=',   &
+                     (nxyz+1)*dxyz/mask_scale(dim)
+                CALL message( 'init_masks', 'PA0332', 1, 2, 0, 6, 0 )
+             ENDIF
+             loop_begin  = NINT( mask_loop(mid,dim,1) * mask_scale(dim)        &
+                  * ddxyz - 0.5_wp )
+             loop_end    = NINT( mask_loop(mid,dim,2) * mask_scale(dim)        &
+                  * ddxyz - 0.5_wp )
+             loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim)        &
+                  * ddxyz )
+             IF ( loop_begin == -1 )  loop_begin = 0  ! avoid negative values
+          ELSEIF ( dim == 3 )  THEN
+             IF ( mask_loop(mid,dim,2) < 0.0_wp )  THEN
+                tmp2 = mask_loop(mid,dim,2)
+                mask_loop(mid,dim,2) = zu(nz+1) / mask_scale(dim)   ! (default)
+             ENDIF
+             IF ( MAXVAL( mask_loop(mid,dim,1:2) )  &
+                  > zu(nz+1) / mask_scale(dim) )  THEN
+                WRITE ( message_string, '(2(A,I3,A,I1,A,F9.3),A,I1,A,F9.3)' )  &
+                     'mask_loop(',mid,',',dim,',1)=',mask_loop(mid,dim,1),     &
+                     ' and/or mask_loop(',mid,',',dim,',2)=', &
+                     mask_loop(mid,dim,2),' exceed zu(nz+1)/mask_scale(',dim,  &
+                     ')=',zu(nz+1)/mask_scale(dim)
+                CALL message( 'init_masks', 'PA0333', 1, 2, 0, 6, 0 )
+             ENDIF
+             ind_array =  &
+                  MINLOC( ABS( mask_loop(mid,dim,1) * mask_scale(dim) - zu ) )
+             loop_begin =  &
+                  ind_array(1) - 1 + nzb ! MINLOC uses lower array bound 1
+             ind_array =  &
+                  MINLOC( ABS( mask_loop(mid,dim,2) * mask_scale(dim) - zu ) )
+             loop_end = ind_array(1) - 1 + nzb ! MINLOC uses lower array bound 1
+!
+!--          The following line assumes a constant vertical grid spacing within
+!--          the vertical mask range; it fails for vertical grid stretching.
+!--          Maybe revise later. Issue warning but continue execution. ABS(...)
+!--          within the IF statement is necessary because the default value of
+!--          dz_stretch_level_start is -9999999.9_wp.
+             loop_stride = NINT( mask_loop(mid,dim,3) * mask_scale(dim) * ddxyz )
+
+             IF ( mask_loop(mid,dim,2) * mask_scale(dim) >                     &
+                  ABS( dz_stretch_level_start(1) ) )  THEN
+                WRITE ( message_string, '(A,I3,A,I1,A,F9.3,A,F8.2,3A)' )       &
+                     'mask_loop(',mid,',',dim,',2)=', mask_loop(mid,dim,2),    &
+                     ' exceeds dz_stretch_level=',dz_stretch_level_start(1),   &
+                     '.&Vertical mask locations will not ',                    &
+                     'match the desired heights within the stretching ',       &
+                     'region.'
+                CALL message( 'init_masks', 'PA0334', 0, 1, 0, 6, 0 )
+             ENDIF
+
+          ENDIF
+!
+!--       If necessary, reset mask_loop(mid,dim,1) and mask_loop(mid,dim,2).
+          IF ( tmp1 < 0.0_wp )  mask_loop(mid,dim,1) = tmp1
+          IF ( tmp2 < 0.0_wp )  mask_loop(mid,dim,2) = tmp2
+!
+!--       The default stride +/-1 (every grid point) applies if 
+!--       mask_loop(mid,dim,3) is not specified (its default is zero).
+          IF ( loop_stride == 0 )  THEN
+             IF ( loop_end >= loop_begin )  THEN
+                loop_stride =  1
+             ELSE
+                loop_stride = -1
+             ENDIF
+          ENDIF
+          DO  m = loop_begin, loop_end, loop_stride
+             count = count + 1
+             IF ( ( m >= lb  .AND.  m <= ub ) .OR.   &
+                  ( m == (nxyz+1) .AND. ub == nxyz )  )  THEN
+                IF ( count_l == 0 )  mask_start_l(mid,dim) = count
+                count_l = count_l + 1
+                IF ( dim == 1 )  THEN
+                   mask_i(mid,count_l) = m
+                ELSEIF ( dim == 2 )  THEN
+                   mask_j(mid,count_l) = m
+                ELSEIF ( dim == 3 )  THEN
+                   mask_k(mid,count_l) = m
+                ENDIF
+             ENDIF
+          ENDDO
+          mask_size(mid,dim)   = count
+          mask_size_l(mid,dim) = count_l
+
+       ENDIF
+
+    END SUBROUTINE set_mask_locations
+
+ END SUBROUTINE init_masks
Index: /palm/tags/release-6.0/SOURCE/init_pegrid.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_pegrid.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_pegrid.f90	(revision 3477)
@@ -0,0 +1,1468 @@
+!> @file init_pegrid.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix in setting number of ghost layers in neutral case 
+! 
+! 3341 2018-10-15 10:31:27Z suehring
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables and boundary conditions in mesoscale-offline nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! bugfix: wrong error number in r3057 revised
+! 
+! 3057 2018-06-05 09:03:41Z raasch
+! bugfix: check that nz is even in case that optimized multigrid is used
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! - No checks for domain decomposition in case of turbulence generator 
+!  (is done in stg module)
+! - Introduce ids to indicate lateral processors for turbulence generator
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! Variable use_synthetic_turbulence_generator has been abbreviated
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! 3D-Integer exchange on multigrid level (MS)
+! Forcing implemented (MS)
+! 
+! 2600 2017-11-01 14:11:20Z raasch
+! calculation of block-I/O quantitites removed (is now done in parin)
+! 
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! Redundant preprocessor directives removed 
+! 
+! 2372 2017-08-25 12:37:32Z sward
+! Shifted cyclic boundary conditions implemented
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical nesting implemented (SadiqHuq)
+! 
+! 2300 2017-06-29 13:31:14Z raasch
+! host-specific settings removed
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! MPI2 related parts removed
+! 
+! 2271 2017-06-09 12:34:55Z sward
+! Error message changed
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2238 2017-05-31 16:49:16Z suehring
+! Remove unnecessary module load of pmc_interface
+! 
+! 2231 2017-05-30 16:44:33Z suehring
+!
+! 2200 2017-04-11 11:37:51Z suehring
+! monotonic_adjustment removed
+!
+! 2197 2017-03-24 02:25:00Z raasch
+! bugfix: do not allow odd values for nz at the coarsest grid level in case of
+! optimized multigrid solver
+!
+! 2180 2017-03-17 13:33:05Z hellstea
+! Checks to ensure (2178) that pdims match the grid dimensions in the
+! automatic determination of pdims are canceled as unnecessary
+! 
+! 2178 2017-03-17 11:07:39Z hellstea
+! Checks to ensure that pdims match the grid dimensions are added in the
+! automatic determination of pdims
+!
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Implement turbulent outflow condition
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1968 2016-07-18 12:01:49Z suehring
+! Extent MPI-datatypes for exchange of 2D-INTEGER arrays on coarser multigrid
+! level  
+! 
+! 1964 2016-07-14 15:35:18Z hellstea
+! Bugfix: erroneous setting of nest_bound_l/r/s/n = .TRUE. for vertical nesting mode removed.
+!
+! 1923 2016-05-31 16:37:07Z boeske
+! Initial version of purely vertical nesting introduced. 
+! 
+! 1922 2016-05-31 16:36:08Z boeske
+! Bugfix: array transposition checks restricted to cases if a fourier 
+! transform is used , removed unused variable nnx_z
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! spectra related variables moved to spectra_mod
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! cpp-directives for intel openmp bug removed
+!
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! changes regarding nested domain removed: virtual PE grid will be automatically
+! calculated for nested runs too
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statements for nesting removed
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1677 2015-10-02 13:25:23Z boeske
+! New MPI-data types for exchange of 3D integer arrays.
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! adjustments for psolver-queries, calculation of ngp_xz added
+!
+! 1565 2015-03-09 20:59:31Z suehring
+! Refine if-clause for setting nbgp. 
+!
+! 1557 2015-03-05 16:43:04Z suehring
+! Adjustment for monotonic limiter
+!
+! 1468 2014-09-24 14:06:57Z maronga
+! Adapted for use on up to 6-digit processor cores
+! 
+! 1435 2014-07-21 10:37:02Z keck
+! bugfix: added missing parameter coupling_mode_remote to ONLY-attribute
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages modified
+! 
+! 1384 2014-05-02 14:31:06Z raasch
+! location messages added
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1304 2014-03-12 10:29:42Z raasch
+! bugfix: single core MPI runs missed some settings of transpose indices
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! error message for poisfft_hybrid removed
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! dirichlet/neumann and neumann/dirichlet removed
+!
+! 1139 2013-04-18 07:25:03Z raasch
+! bugfix for calculating the id of the PE carrying the recycling plane
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! initialization of poisfft moved to module poisfft
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1056 2012-11-16 15:28:04Z raasch
+! Indices for arrays n.._mg start from zero due to definition of arrays f2 and
+! p2 as automatic arrays in recursive subroutine next_mg_level
+!
+! 1041 2012-11-06 02:36:29Z raasch
+! a 2d virtual processor topology is used by default for all machines
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! subdomains must have identical size (grid matching = "match" removed)
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning upstream-spline-method removed
+!
+! 978 2012-08-09 08:28:32Z fricke
+! dirichlet/neumann and neumann/dirichlet added
+! nxlu and nysv are also calculated for inflow boundary
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! Revision 1.1  1997/07/24 11:15:09  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Determination of the virtual processor topology (if not prescribed by the
+!> user)and computation of the grid point number and array bounds of the local
+!> domains.
+!> @todo: remove MPI-data types for 2D exchange on coarse multigrid level (not
+!>        used any more) 
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_pegrid
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
+               bc_lr, bc_ns, bc_radiation_l, bc_radiation_n, bc_radiation_r,   &
+               bc_radiation_s, coupling_mode, coupling_topology, gathered_size,&
+               grid_level, grid_level_count, maximum_grid_level,               &
+               message_string, mg_switch_to_pe0_level, momentum_advec, neutral,&
+               psolver, outflow_source_plane, recycling_width, scalar_advec,   &
+               subdomain_size, turbulent_outflow, y_shift
+
+    USE grid_variables,                                                        &
+        ONLY:  dx
+        
+    USE indices,                                                               &
+        ONLY:  mg_loc_ind, nbgp, nnx, nny, nnz, nx, nx_a, nx_o, nxl, nxl_mg,   &
+               nxlu, nxr, nxr_mg, ny, ny_a, ny_o, nyn, nyn_mg, nys, nys_mg,    &
+               nysv, nz, nzb, nzt, nzt_mg, wall_flags_1, wall_flags_2,         &
+               wall_flags_3, wall_flags_4, wall_flags_5, wall_flags_6,         &
+               wall_flags_7, wall_flags_8, wall_flags_9, wall_flags_10
+
+    USE kinds
+      
+    USE pegrid
+      
+    USE spectra_mod,                                                           &
+        ONLY:  calculate_spectra, dt_dosp
+
+    USE synthetic_turbulence_generator_mod,                                    &
+        ONLY:  id_stg_left, id_stg_north, id_stg_right, id_stg_south,          &
+               use_syn_turb_gen
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxl_yd, nxl_z, nxr_y, nxr_yd, nxr_z, nyn_x, nyn_z, nys_x,&
+               nys_z, nzb_x, nzb_y, nzb_yd, nzt_x, nzt_yd, nzt_y
+
+    USE vertical_nesting_mod,                                                  &
+        ONLY:  vnested, vnest_init_pegrid_domain, vnest_init_pegrid_rank
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                        !<
+    INTEGER(iwp) ::  id_inflow_l              !<
+    INTEGER(iwp) ::  id_outflow_l             !< local value of id_outflow
+    INTEGER(iwp) ::  id_outflow_source_l      !< local value of id_outflow_source
+    INTEGER(iwp) ::  id_recycling_l           !<
+    INTEGER(iwp) ::  id_stg_left_l            !< left lateral boundary local core id in case of turbulence generator  
+    INTEGER(iwp) ::  id_stg_north_l           !< north lateral boundary local core id in case of turbulence generator  
+    INTEGER(iwp) ::  id_stg_right_l           !< right lateral boundary local core id in case of turbulence generator  
+    INTEGER(iwp) ::  id_stg_south_l           !< south lateral boundary local core id in case of turbulence generator  
+    INTEGER(iwp) ::  ind(5)                   !<
+    INTEGER(iwp) ::  j                        !<
+    INTEGER(iwp) ::  k                        !<
+    INTEGER(iwp) ::  maximum_grid_level_l     !<
+    INTEGER(iwp) ::  mg_levels_x              !<
+    INTEGER(iwp) ::  mg_levels_y              !<
+    INTEGER(iwp) ::  mg_levels_z              !<
+    INTEGER(iwp) ::  mg_switch_to_pe0_level_l !<
+    INTEGER(iwp) ::  nnx_y                    !<
+    INTEGER(iwp) ::  nny_x                    !<
+    INTEGER(iwp) ::  nny_z                    !<
+    INTEGER(iwp) ::  nnz_x                    !<
+    INTEGER(iwp) ::  nnz_y                    !<
+    INTEGER(iwp) ::  numproc_sqr              !<
+    INTEGER(iwp) ::  nxl_l                    !<
+    INTEGER(iwp) ::  nxr_l                    !<
+    INTEGER(iwp) ::  nyn_l                    !<
+    INTEGER(iwp) ::  nys_l                    !<
+    INTEGER(iwp) ::  nzb_l                    !<
+    INTEGER(iwp) ::  nzt_l                    !<
+!$  INTEGER(iwp) ::  omp_get_num_threads      !<
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ind_all !<
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nxlf    !<
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nxrf    !<
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nynf    !<
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nysf    !<
+
+    INTEGER(iwp), DIMENSION(2) ::  pdims_remote         !<
+    INTEGER(iwp)               ::  lcoord(2)            !< PE coordinates of left neighbor along x and y
+    INTEGER(iwp)               ::  rcoord(2)            !< PE coordinates of right neighbor along x and y
+
+!
+!-- Get the number of OpenMP threads
+    !$OMP PARALLEL
+!$  threads_per_task = omp_get_num_threads()
+    !$OMP END PARALLEL
+
+
+#if defined( __parallel )
+
+    CALL location_message( 'creating virtual PE grids + MPI derived data types', &
+                           .FALSE. )
+
+!
+!-- Determine the processor topology or check it, if prescribed by the user
+    IF ( npex == -1  .AND.  npey == -1 )  THEN
+
+!
+!--    Automatic determination of the topology
+       numproc_sqr = SQRT( REAL( numprocs, KIND=wp ) )
+       pdims(1)    = MAX( numproc_sqr , 1 )
+       DO  WHILE ( MOD( numprocs , pdims(1) ) /= 0 )
+          pdims(1) = pdims(1) - 1
+       ENDDO
+       pdims(2) = numprocs / pdims(1)
+
+    ELSEIF ( npex /= -1  .AND.  npey /= -1 )  THEN
+
+!
+!--    Prescribed by user. Number of processors on the prescribed topology
+!--    must be equal to the number of PEs available to the job
+       IF ( ( npex * npey ) /= numprocs )  THEN
+          WRITE( message_string, * ) 'number of PEs of the prescribed ',       &
+              'topology (', npex*npey,') does not match & the number of ',     &
+              'PEs available to the job (', numprocs, ')'
+          CALL message( 'init_pegrid', 'PA0221', 1, 2, 0, 6, 0 )
+       ENDIF
+       pdims(1) = npex
+       pdims(2) = npey
+
+    ELSE
+!
+!--    If the processor topology is prescribed by the user, the number of
+!--    PEs must be given in both directions
+       message_string = 'if the processor topology is prescribed by th' //     &
+                'e user & both values of "npex" and "npey" must be given' //   &
+                ' in the &NAMELIST-parameter file'
+       CALL message( 'init_pegrid', 'PA0222', 1, 2, 0, 6, 0 )
+
+    ENDIF
+
+!
+!-- If necessary, set horizontal boundary conditions to non-cyclic
+    IF ( bc_lr /= 'cyclic' )  cyclic(1) = .FALSE.
+    IF ( bc_ns /= 'cyclic' )  cyclic(2) = .FALSE.
+
+
+!
+!-- Create the virtual processor grid
+    CALL MPI_CART_CREATE( comm_palm, ndim, pdims, cyclic, reorder, &
+                          comm2d, ierr )
+    CALL MPI_COMM_RANK( comm2d, myid, ierr )
+    WRITE (myid_char,'(''_'',I6.6)')  myid
+
+    CALL MPI_CART_COORDS( comm2d, myid, ndim, pcoord, ierr )
+    CALL MPI_CART_SHIFT( comm2d, 0, 1, pleft, pright, ierr )
+    CALL MPI_CART_SHIFT( comm2d, 1, 1, psouth, pnorth, ierr )
+!
+!-- In case of cyclic boundary conditions, a y-shift at the boundaries in
+!-- x-direction can be introduced via parameter y_shift. The shift is done
+!-- by modifying the processor grid in such a way that processors located
+!-- at the x-boundary communicate across it to processors with y-coordinate
+!-- shifted by y_shift relative to their own. This feature can not be used
+!-- in combination with an fft pressure solver. It has been implemented to
+!-- counter the effect of streak structures in case of cyclic boundary
+!-- conditions. For a description of these see Munters
+!-- (2016; dx.doi.org/10.1063/1.4941912)
+!--
+!-- Get coordinates of left and right neighbor on PE grid
+    IF ( y_shift /= 0 ) THEN
+
+       IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
+          message_string = 'y_shift /= 0 is only allowed for cyclic ' //       &
+                           'boundary conditions in both directions '
+          CALL message( 'check_parameters', 'PA0467', 1, 2, 0, 6, 0 )
+       ENDIF
+       IF ( TRIM( psolver ) /= 'multigrid' .AND.                               &
+            TRIM( psolver ) /= 'multigrid_noopt')                              &
+       THEN
+          message_string = 'y_shift /= 0 requires a multigrid pressure solver '
+          CALL message( 'check_parameters', 'PA0468', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       CALL MPI_CART_COORDS( comm2d, pright, ndim, rcoord, ierr )
+       CALL MPI_CART_COORDS( comm2d, pleft, ndim, lcoord, ierr )
+
+!
+!--    If the x(y)-coordinate of the right (left) neighbor is smaller (greater)
+!--    than that of the calling process, then the calling process is located on
+!--    the right (left) boundary of the processor grid. In that case,
+!--    the y-coordinate of that neighbor is increased (decreased) by y_shift.
+!--    The rank of the process with that coordinate is then inquired and the
+!--    neighbor rank for MPI_SENDRECV, pright (pleft) is set to it.
+!--    In this way, the calling process receives a new right (left) neighbor
+!--    for all future MPI_SENDRECV calls. That neighbor has a y-coordinate
+!--    of y+(-)y_shift, where y is the original right (left) neighbor's
+!--    y-coordinate. The modulo-operation ensures that if the neighbor's
+!--    y-coordinate exceeds the grid-boundary, it will be relocated to
+!--    the opposite part of the grid cyclicly.
+       IF ( rcoord(1) < pcoord(1) ) THEN
+          rcoord(2) = MODULO( rcoord(2) + y_shift, pdims(2) )
+          CALL MPI_CART_RANK( comm2d, rcoord, pright, ierr )
+       ENDIF
+
+       IF ( lcoord(1) > pcoord(1) ) THEN
+          lcoord(2) = MODULO( lcoord(2) - y_shift, pdims(2) )
+          CALL MPI_CART_RANK( comm2d, lcoord, pleft, ierr )
+       ENDIF
+    ENDIF
+!
+!-- Vertical nesting: store four lists that identify partner ranks to exchange 
+!-- data
+    IF ( vnested )  CALL vnest_init_pegrid_rank
+
+!
+!-- Determine sub-topologies for transpositions
+!-- Transposition from z to x:
+    remain_dims(1) = .TRUE.
+    remain_dims(2) = .FALSE.
+    CALL MPI_CART_SUB( comm2d, remain_dims, comm1dx, ierr )
+    CALL MPI_COMM_RANK( comm1dx, myidx, ierr )
+!
+!-- Transposition from x to y
+    remain_dims(1) = .FALSE.
+    remain_dims(2) = .TRUE.
+    CALL MPI_CART_SUB( comm2d, remain_dims, comm1dy, ierr )
+    CALL MPI_COMM_RANK( comm1dy, myidy, ierr )
+
+
+!
+!-- Calculate array bounds along x-direction for every PE.
+    ALLOCATE( nxlf(0:pdims(1)-1), nxrf(0:pdims(1)-1), nynf(0:pdims(2)-1),      &
+              nysf(0:pdims(2)-1) )
+
+    IF ( MOD( nx+1 , pdims(1) ) /= 0 )  THEN
+       WRITE( message_string, * ) 'x-direction: gridpoint number (',nx+1,') ', &
+                               'is not an& integral divisor of the number ',    &
+                               'of processors (', pdims(1),')'
+       CALL message( 'init_pegrid', 'PA0225', 1, 2, 0, 6, 0 )
+    ELSE
+       nnx  = ( nx + 1 ) / pdims(1)
+    ENDIF    
+
+!
+!-- Left and right array bounds, number of gridpoints
+    DO  i = 0, pdims(1)-1
+       nxlf(i)   = i * nnx
+       nxrf(i)   = ( i + 1 ) * nnx - 1
+    ENDDO
+
+!
+!-- Calculate array bounds in y-direction for every PE.
+    IF ( MOD( ny+1 , pdims(2) ) /= 0 )  THEN
+       WRITE( message_string, * ) 'y-direction: gridpoint number (',ny+1,') ', &
+                           'is not an& integral divisor of the number of',      &
+                           'processors (', pdims(2),')'
+       CALL message( 'init_pegrid', 'PA0227', 1, 2, 0, 6, 0 )
+    ELSE
+       nny  = ( ny + 1 ) / pdims(2)
+    ENDIF    
+
+!
+!-- South and north array bounds
+    DO  j = 0, pdims(2)-1
+       nysf(j)   = j * nny
+       nynf(j)   = ( j + 1 ) * nny - 1
+    ENDDO
+
+!
+!-- Local array bounds of the respective PEs
+    nxl = nxlf(pcoord(1))
+    nxr = nxrf(pcoord(1))
+    nys = nysf(pcoord(2))
+    nyn = nynf(pcoord(2))
+    nzb = 0
+    nzt = nz
+    nnz = nz
+
+!
+!-- Set switches to define if the PE is situated at the border of the virtual
+!-- processor grid
+    IF ( nxl == 0 )   left_border_pe  = .TRUE.
+    IF ( nxr == nx )  right_border_pe = .TRUE.
+    IF ( nys == 0 )   south_border_pe = .TRUE.
+    IF ( nyn == ny )  north_border_pe = .TRUE.
+
+!
+!-- Calculate array bounds and gridpoint numbers for the transposed arrays
+!-- (needed in the pressure solver)
+!-- For the transposed arrays, cyclic boundaries as well as top and bottom
+!-- boundaries are omitted, because they are obstructive to the transposition
+
+!
+!-- 1. transposition  z --> x
+!-- This transposition is not neccessary in case of a 1d-decomposition along x
+    IF ( psolver == 'poisfft'  .OR.  calculate_spectra )  THEN
+
+       IF ( pdims(2) /= 1 )  THEN
+          IF ( MOD( nz , pdims(1) ) /= 0 )  THEN
+             WRITE( message_string, * ) 'transposition z --> x:',              &
+                       '& nz=',nz,' is not an integral divisior of pdims(1)=', &
+                                                                   pdims(1)
+             CALL message( 'init_pegrid', 'PA0230', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       nys_x = nys
+       nyn_x = nyn
+       nny_x = nny
+       nnz_x = nz / pdims(1)
+       nzb_x = 1 + myidx * nnz_x
+       nzt_x = ( myidx + 1 ) * nnz_x
+       sendrecvcount_zx = nnx * nny * nnz_x
+
+    ENDIF
+
+
+    IF ( psolver == 'poisfft' )  THEN 
+!
+!--    2. transposition  x --> y
+       IF ( MOD( nx+1 , pdims(2) ) /= 0 )  THEN
+          WRITE( message_string, * ) 'transposition x --> y:',                 &
+                            '& nx+1=',nx+1,' is not an integral divisor of ',  &
+                            'pdims(2)=',pdims(2)
+          CALL message( 'init_pegrid', 'PA0231', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       nnz_y = nnz_x
+       nzb_y = nzb_x
+       nzt_y = nzt_x
+       nnx_y = (nx+1) / pdims(2)
+       nxl_y = myidy * nnx_y
+       nxr_y = ( myidy + 1 ) * nnx_y - 1
+       sendrecvcount_xy = nnx_y * nny_x * nnz_y
+!
+!--    3. transposition  y --> z  
+!--    (ELSE:  x --> y  in case of 1D-decomposition along x)
+       nxl_z = nxl_y
+       nxr_z = nxr_y
+       nny_z = (ny+1) / pdims(1)
+       nys_z = myidx * nny_z
+       nyn_z = ( myidx + 1 ) * nny_z - 1
+       sendrecvcount_yz = nnx_y * nny_z * nnz_y
+
+       IF ( pdims(2) /= 1 )  THEN
+!
+!--       y --> z
+!--       This transposition is not neccessary in case of a 1d-decomposition
+!--       along x, except that the uptream-spline method is switched on
+          IF ( MOD( ny+1 , pdims(1) ) /= 0 )  THEN
+             WRITE( message_string, * ) 'transposition y --> z:',              &
+                               '& ny+1=',ny+1,' is not an integral divisor of',&
+                               ' pdims(1)=',pdims(1)
+             CALL message( 'init_pegrid', 'PA0232', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ELSE
+!
+!--       x --> y
+!--       This condition must be fulfilled for a 1D-decomposition along x
+          IF ( MOD( ny+1 , pdims(1) ) /= 0 )  THEN
+             WRITE( message_string, * ) 'transposition x --> y:',              &
+                               '& ny+1=',ny+1,' is not an integral divisor of',&
+                               ' pdims(1)=',pdims(1)
+             CALL message( 'init_pegrid', 'PA0233', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDIF
+
+    ENDIF
+
+!
+!-- Indices for direct transpositions z --> y (used for calculating spectra)
+    IF ( calculate_spectra )  THEN
+       IF ( MOD( nz, pdims(2) ) /= 0 )  THEN
+          WRITE( message_string, * ) 'direct transposition z --> y (needed ',  &
+                    'for spectra): nz=',nz,' is not an integral divisor of ',  &
+                    'pdims(2)=',pdims(2)
+          CALL message( 'init_pegrid', 'PA0234', 1, 2, 0, 6, 0 )
+       ELSE
+          nxl_yd = nxl
+          nxr_yd = nxr
+          nzb_yd = 1 + myidy * ( nz / pdims(2) )
+          nzt_yd = ( myidy + 1 ) * ( nz / pdims(2) )
+          sendrecvcount_zyd = nnx * nny * ( nz / pdims(2) )
+       ENDIF
+    ENDIF
+
+    IF ( psolver == 'poisfft'  .OR.  calculate_spectra )  THEN
+!
+!--    Indices for direct transpositions y --> x 
+!--    (they are only possible in case of a 1d-decomposition along x)
+       IF ( pdims(2) == 1 )  THEN
+          nny_x = nny / pdims(1)
+          nys_x = myid * nny_x
+          nyn_x = ( myid + 1 ) * nny_x - 1
+          nzb_x = 1
+          nzt_x = nz
+          sendrecvcount_xy = nnx * nny_x * nz
+       ENDIF
+
+    ENDIF
+
+    IF ( psolver == 'poisfft' )  THEN
+!
+!--    Indices for direct transpositions x --> y 
+!--    (they are only possible in case of a 1d-decomposition along y)
+       IF ( pdims(1) == 1 )  THEN
+          nnx_y = nnx / pdims(2)
+          nxl_y = myid * nnx_y
+          nxr_y = ( myid + 1 ) * nnx_y - 1
+          nzb_y = 1
+          nzt_y = nz
+          sendrecvcount_xy = nnx_y * nny * nz
+       ENDIF
+
+    ENDIF
+
+!
+!-- Arrays for storing the array bounds are needed any more
+    DEALLOCATE( nxlf , nxrf , nynf , nysf )
+
+
+!
+!-- Collect index bounds from other PEs (to be written to restart file later)
+    ALLOCATE( hor_index_bounds(4,0:numprocs-1) )
+
+    IF ( myid == 0 )  THEN
+
+       hor_index_bounds(1,0) = nxl
+       hor_index_bounds(2,0) = nxr
+       hor_index_bounds(3,0) = nys
+       hor_index_bounds(4,0) = nyn
+
+!
+!--    Receive data from all other PEs
+       DO  i = 1, numprocs-1
+          CALL MPI_RECV( ibuf, 4, MPI_INTEGER, i, MPI_ANY_TAG, comm2d, status, &
+                         ierr )
+          hor_index_bounds(:,i) = ibuf(1:4)
+       ENDDO
+
+    ELSE
+!
+!--    Send index bounds to PE0
+       ibuf(1) = nxl
+       ibuf(2) = nxr
+       ibuf(3) = nys
+       ibuf(4) = nyn
+       CALL MPI_SEND( ibuf, 4, MPI_INTEGER, 0, myid, comm2d, ierr )
+
+    ENDIF
+
+
+#if defined( __print )
+!
+!-- Control output
+    IF ( myid == 0 )  THEN
+       PRINT*, '*** processor topology ***'
+       PRINT*, ' '
+       PRINT*, 'myid   pcoord    left right  south north  idx idy   nxl: nxr',&
+               &'   nys: nyn'
+       PRINT*, '------------------------------------------------------------',&
+               &'-----------'
+       WRITE (*,1000)  0, pcoord(1), pcoord(2), pleft, pright, psouth, pnorth, &
+                       myidx, myidy, nxl, nxr, nys, nyn
+1000   FORMAT (I4,2X,'(',I3,',',I3,')',3X,I4,2X,I4,3X,I4,2X,I4,2X,I3,1X,I3, &
+               2(2X,I4,':',I4))
+
+!
+!--    Receive data from the other PEs
+       DO  i = 1,numprocs-1
+          CALL MPI_RECV( ibuf, 12, MPI_INTEGER, i, MPI_ANY_TAG, comm2d, status, &
+                         ierr )
+          WRITE (*,1000)  i, ( ibuf(j) , j = 1,12 )
+       ENDDO
+    ELSE
+
+!
+!--    Send data to PE0
+       ibuf(1) = pcoord(1); ibuf(2) = pcoord(2); ibuf(3) = pleft
+       ibuf(4) = pright; ibuf(5) = psouth; ibuf(6) = pnorth; ibuf(7) = myidx
+       ibuf(8) = myidy; ibuf(9) = nxl; ibuf(10) = nxr; ibuf(11) = nys
+       ibuf(12) = nyn
+       CALL MPI_SEND( ibuf, 12, MPI_INTEGER, 0, myid, comm2d, ierr )       
+    ENDIF
+#endif
+
+! 
+!-- Determine the number of ghost point layers
+    IF ( scalar_advec   == 'ws-scheme'  .OR.                                   &
+         momentum_advec == 'ws-scheme' )  THEN
+       nbgp = 3
+    ELSE
+       nbgp = 1
+    ENDIF 
+
+!
+!-- Create a new MPI derived datatype for the exchange of surface (xy) data,
+!-- which is needed for coupled atmosphere-ocean runs.
+!-- First, calculate number of grid points of an xy-plane.
+    ngp_xy  = ( nxr - nxl + 1 + 2 * nbgp ) * ( nyn - nys + 1 + 2 * nbgp )
+    CALL MPI_TYPE_VECTOR( ngp_xy, 1, nzt-nzb+2, MPI_REAL, type_xy, ierr )
+    CALL MPI_TYPE_COMMIT( type_xy, ierr )
+
+    IF ( TRIM( coupling_mode ) /= 'uncoupled' .AND. .NOT. vnested )  THEN
+   
+!
+!--    Pass the number of grid points of the atmosphere model to
+!--    the ocean model and vice versa
+       IF ( coupling_mode == 'atmosphere_to_ocean' )  THEN
+
+          nx_a = nx
+          ny_a = ny
+
+          IF ( myid == 0 )  THEN
+
+             CALL MPI_SEND( nx_a, 1, MPI_INTEGER, numprocs, 1, comm_inter,  &
+                            ierr )
+             CALL MPI_SEND( ny_a, 1, MPI_INTEGER, numprocs, 2, comm_inter,  &
+                            ierr )
+             CALL MPI_SEND( pdims, 2, MPI_INTEGER, numprocs, 3, comm_inter, &
+                            ierr )
+             CALL MPI_RECV( nx_o, 1, MPI_INTEGER, numprocs, 4, comm_inter,  &
+                            status, ierr )
+             CALL MPI_RECV( ny_o, 1, MPI_INTEGER, numprocs, 5, comm_inter,  &
+                            status, ierr )
+             CALL MPI_RECV( pdims_remote, 2, MPI_INTEGER, numprocs, 6,      &
+                            comm_inter, status, ierr )
+          ENDIF
+
+          CALL MPI_BCAST( nx_o, 1, MPI_INTEGER, 0, comm2d, ierr )
+          CALL MPI_BCAST( ny_o, 1, MPI_INTEGER, 0, comm2d, ierr ) 
+          CALL MPI_BCAST( pdims_remote, 2, MPI_INTEGER, 0, comm2d, ierr )
+       
+       ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
+
+          nx_o = nx
+          ny_o = ny 
+
+          IF ( myid == 0 ) THEN
+
+             CALL MPI_RECV( nx_a, 1, MPI_INTEGER, 0, 1, comm_inter, status, &
+                            ierr )
+             CALL MPI_RECV( ny_a, 1, MPI_INTEGER, 0, 2, comm_inter, status, &
+                            ierr )
+             CALL MPI_RECV( pdims_remote, 2, MPI_INTEGER, 0, 3, comm_inter, &
+                            status, ierr )
+             CALL MPI_SEND( nx_o, 1, MPI_INTEGER, 0, 4, comm_inter, ierr )
+             CALL MPI_SEND( ny_o, 1, MPI_INTEGER, 0, 5, comm_inter, ierr )
+             CALL MPI_SEND( pdims, 2, MPI_INTEGER, 0, 6, comm_inter, ierr )
+          ENDIF
+
+          CALL MPI_BCAST( nx_a, 1, MPI_INTEGER, 0, comm2d, ierr)
+          CALL MPI_BCAST( ny_a, 1, MPI_INTEGER, 0, comm2d, ierr) 
+          CALL MPI_BCAST( pdims_remote, 2, MPI_INTEGER, 0, comm2d, ierr) 
+
+       ENDIF
+  
+       ngp_a = ( nx_a+1 + 2 * nbgp ) * ( ny_a+1 + 2 * nbgp )
+       ngp_o = ( nx_o+1 + 2 * nbgp ) * ( ny_o+1 + 2 * nbgp )
+
+!
+!--    Determine if the horizontal grid and the number of PEs in ocean and
+!--    atmosphere is same or not
+       IF ( nx_o == nx_a  .AND.  ny_o == ny_a  .AND.  &
+            pdims(1) == pdims_remote(1) .AND. pdims(2) == pdims_remote(2) ) &
+       THEN
+          coupling_topology = 0
+       ELSE
+          coupling_topology = 1
+       ENDIF 
+
+!
+!--    Determine the target PEs for the exchange between ocean and
+!--    atmosphere (comm2d)
+       IF ( coupling_topology == 0 )  THEN
+!
+!--       In case of identical topologies, every atmosphere PE has exactly one
+!--       ocean PE counterpart and vice versa
+          IF ( TRIM( coupling_mode ) == 'atmosphere_to_ocean' ) THEN
+             target_id = myid + numprocs
+          ELSE
+             target_id = myid 
+          ENDIF
+
+       ELSE
+!
+!--       In case of nonequivalent topology in ocean and atmosphere only for
+!--       PE0 in ocean and PE0 in atmosphere a target_id is needed, since
+!--       data echxchange between ocean and atmosphere will be done only
+!--       between these PEs.    
+          IF ( myid == 0 )  THEN
+
+             IF ( TRIM( coupling_mode ) == 'atmosphere_to_ocean' )  THEN
+                target_id = numprocs 
+             ELSE
+                target_id = 0
+             ENDIF
+
+          ENDIF
+
+       ENDIF
+
+    ENDIF
+
+!
+!-- Store partner grid point co-ordinates as lists.
+!-- Create custom MPI vector datatypes for contiguous data transfer
+    IF ( vnested )  CALL vnest_init_pegrid_domain
+
+#else
+
+!
+!-- Array bounds when running on a single PE (respectively a non-parallel
+!-- machine)
+    nxl = 0
+    nxr = nx
+    nnx = nxr - nxl + 1
+    nys = 0
+    nyn = ny
+    nny = nyn - nys + 1
+    nzb = 0
+    nzt = nz
+    nnz = nz
+
+    ALLOCATE( hor_index_bounds(4,0:0) )
+    hor_index_bounds(1,0) = nxl
+    hor_index_bounds(2,0) = nxr
+    hor_index_bounds(3,0) = nys
+    hor_index_bounds(4,0) = nyn
+
+!
+!-- Array bounds for the pressure solver (in the parallel code, these bounds
+!-- are the ones for the transposed arrays)
+    nys_x = nys
+    nyn_x = nyn
+    nzb_x = nzb + 1
+    nzt_x = nzt
+
+    nxl_y = nxl
+    nxr_y = nxr
+    nzb_y = nzb + 1
+    nzt_y = nzt
+
+    nxl_z = nxl
+    nxr_z = nxr
+    nys_z = nys
+    nyn_z = nyn
+
+#endif
+
+!
+!-- Calculate number of grid levels necessary for the multigrid poisson solver
+!-- as well as the gridpoint indices on each level
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+
+!
+!--    First calculate number of possible grid levels for the subdomains
+       mg_levels_x = 1
+       mg_levels_y = 1
+       mg_levels_z = 1
+
+       i = nnx
+       DO WHILE ( MOD( i, 2 ) == 0  .AND.  i /= 2 )
+          i = i / 2
+          mg_levels_x = mg_levels_x + 1
+       ENDDO
+
+       j = nny
+       DO WHILE ( MOD( j, 2 ) == 0  .AND.  j /= 2 )
+          j = j / 2
+          mg_levels_y = mg_levels_y + 1
+       ENDDO
+
+       k = nz    ! do not use nnz because it might be > nz due to transposition
+                 ! requirements
+       DO WHILE ( MOD( k, 2 ) == 0  .AND.  k /= 2 )
+          k = k / 2
+          mg_levels_z = mg_levels_z + 1
+       ENDDO
+!
+!--    The optimized MG-solver does not allow odd values for nz at the coarsest
+!--    grid level
+       IF ( TRIM( psolver ) /= 'multigrid_noopt' )  THEN
+          IF ( MOD( k, 2 ) /= 0 )  mg_levels_z = mg_levels_z - 1
+!
+!--       An odd value of nz does not work. The finest level must have an even
+!--       value.
+          IF (  mg_levels_z == 0 )  THEN
+             message_string = 'optimized multigrid method requires nz to be even'
+             CALL message( 'init_pegrid', 'PA0495', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       maximum_grid_level = MIN( mg_levels_x, mg_levels_y, mg_levels_z )
+
+!
+!--    Find out, if the total domain allows more levels. These additional
+!--    levels are identically processed on all PEs.
+       IF ( numprocs > 1  .AND.  mg_switch_to_pe0_level /= -1 )  THEN
+
+          IF ( mg_levels_z > MIN( mg_levels_x, mg_levels_y ) )  THEN
+
+             mg_switch_to_pe0_level_l = maximum_grid_level
+
+             mg_levels_x = 1
+             mg_levels_y = 1
+
+             i = nx+1
+             DO WHILE ( MOD( i, 2 ) == 0  .AND.  i /= 2 )
+                i = i / 2
+                mg_levels_x = mg_levels_x + 1
+             ENDDO
+
+             j = ny+1
+             DO WHILE ( MOD( j, 2 ) == 0  .AND.  j /= 2 )
+                j = j / 2
+                mg_levels_y = mg_levels_y + 1
+             ENDDO
+
+             maximum_grid_level_l = MIN( mg_levels_x, mg_levels_y, mg_levels_z )
+
+             IF ( maximum_grid_level_l > mg_switch_to_pe0_level_l )  THEN
+                mg_switch_to_pe0_level_l = maximum_grid_level_l - &
+                                           mg_switch_to_pe0_level_l + 1
+             ELSE
+                mg_switch_to_pe0_level_l = 0
+             ENDIF
+
+          ELSE
+
+             mg_switch_to_pe0_level_l = 0
+             maximum_grid_level_l = maximum_grid_level
+
+          ENDIF
+
+!
+!--       Use switch level calculated above only if it is not pre-defined
+!--       by user
+          IF ( mg_switch_to_pe0_level == 0 )  THEN
+             IF ( mg_switch_to_pe0_level_l /= 0 )  THEN
+                mg_switch_to_pe0_level = mg_switch_to_pe0_level_l
+                maximum_grid_level     = maximum_grid_level_l
+             ENDIF
+
+          ELSE
+!
+!--          Check pre-defined value and reset to default, if neccessary
+             IF ( mg_switch_to_pe0_level < mg_switch_to_pe0_level_l  .OR.      &
+                  mg_switch_to_pe0_level >= maximum_grid_level_l )  THEN
+                message_string = 'mg_switch_to_pe0_level ' //                  &
+                                 'out of range and reset to 0'
+                CALL message( 'init_pegrid', 'PA0235', 0, 1, 0, 6, 0 )
+                mg_switch_to_pe0_level = 0
+             ELSE
+!
+!--             Use the largest number of possible levels anyway and recalculate
+!--             the switch level to this largest number of possible values
+                maximum_grid_level = maximum_grid_level_l
+
+             ENDIF
+
+          ENDIF
+
+       ENDIF
+
+       ALLOCATE( grid_level_count(maximum_grid_level),                       &
+                 nxl_mg(0:maximum_grid_level), nxr_mg(0:maximum_grid_level), &
+                 nyn_mg(0:maximum_grid_level), nys_mg(0:maximum_grid_level), &
+                 nzt_mg(0:maximum_grid_level) )
+
+       grid_level_count = 0
+!
+!--    Index zero required as dummy due to definition of arrays f2 and p2 in
+!--    recursive subroutine next_mg_level
+       nxl_mg(0) = 0; nxr_mg(0) = 0; nyn_mg(0) = 0; nys_mg(0) = 0; nzt_mg(0) = 0
+
+       nxl_l = nxl; nxr_l = nxr; nys_l = nys; nyn_l = nyn; nzt_l = nzt
+
+       DO  i = maximum_grid_level, 1 , -1
+
+          IF ( i == mg_switch_to_pe0_level )  THEN
+#if defined( __parallel )
+!
+!--          Save the grid size of the subdomain at the switch level, because
+!--          it is needed in poismg.
+             ind(1) = nxl_l; ind(2) = nxr_l
+             ind(3) = nys_l; ind(4) = nyn_l
+             ind(5) = nzt_l
+             ALLOCATE( ind_all(5*numprocs), mg_loc_ind(5,0:numprocs-1) )
+             CALL MPI_ALLGATHER( ind, 5, MPI_INTEGER, ind_all, 5, &
+                                 MPI_INTEGER, comm2d, ierr )
+             DO  j = 0, numprocs-1
+                DO  k = 1, 5
+                   mg_loc_ind(k,j) = ind_all(k+j*5)
+                ENDDO
+             ENDDO
+             DEALLOCATE( ind_all )
+!
+!--          Calculate the grid size of the total domain
+             nxr_l = ( nxr_l-nxl_l+1 ) * pdims(1) - 1
+             nxl_l = 0
+             nyn_l = ( nyn_l-nys_l+1 ) * pdims(2) - 1
+             nys_l = 0
+!
+!--          The size of this gathered array must not be larger than the
+!--          array tend, which is used in the multigrid scheme as a temporary
+!--          array. Therefore the subdomain size of an PE is calculated and 
+!--          the size of the gathered grid. These values are used in  
+!--          routines pres and poismg
+             subdomain_size = ( nxr - nxl + 2 * nbgp + 1 ) * &
+                              ( nyn - nys + 2 * nbgp + 1 ) * ( nzt - nzb + 2 )
+             gathered_size  = ( nxr_l - nxl_l + 3 ) * ( nyn_l - nys_l + 3 ) *  &
+                              ( nzt_l - nzb + 2 )
+
+#else
+             message_string = 'multigrid gather/scatter impossible ' //        &
+                          'in non parallel mode'
+             CALL message( 'init_pegrid', 'PA0237', 1, 2, 0, 6, 0 )
+#endif
+          ENDIF
+
+          nxl_mg(i) = nxl_l
+          nxr_mg(i) = nxr_l
+          nys_mg(i) = nys_l
+          nyn_mg(i) = nyn_l
+          nzt_mg(i) = nzt_l
+
+          nxl_l = nxl_l / 2 
+          nxr_l = nxr_l / 2
+          nys_l = nys_l / 2 
+          nyn_l = nyn_l / 2 
+          nzt_l = nzt_l / 2 
+
+       ENDDO
+
+!
+!--    Temporary problem: Currently calculation of maxerror in routine poismg crashes
+!--    if grid data are collected on PE0 already on the finest grid level.
+!--    To be solved later.
+       IF ( maximum_grid_level == mg_switch_to_pe0_level )  THEN
+          message_string = 'grid coarsening on subdomain level cannot be performed'
+          CALL message( 'poismg', 'PA0236', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ELSE
+
+       maximum_grid_level = 0
+
+    ENDIF
+
+!
+!-- Default level 0 tells exchange_horiz that all ghost planes have to be
+!-- exchanged. grid_level is adjusted in poismg, where only one ghost plane
+!-- is required.
+    grid_level = 0
+
+#if defined( __parallel )
+!
+!-- Gridpoint number for the exchange of ghost points (y-line for 2D-arrays)
+    ngp_y  = nyn - nys + 1 + 2 * nbgp
+
+!
+!-- Define new MPI derived datatypes for the exchange of ghost points in
+!-- x- and y-direction for 2D-arrays (line)
+    CALL MPI_TYPE_VECTOR( nxr-nxl+1+2*nbgp, nbgp, ngp_y, MPI_REAL, type_x,     &
+                          ierr )
+    CALL MPI_TYPE_COMMIT( type_x, ierr )
+
+    CALL MPI_TYPE_VECTOR( nbgp, ngp_y, ngp_y, MPI_REAL, type_y, ierr )
+    CALL MPI_TYPE_COMMIT( type_y, ierr )
+!
+!-- Define new MPI derived datatypes for the exchange of ghost points in
+!-- x- and y-direction for 2D-INTEGER arrays (line) - on normal grid
+    ALLOCATE( type_x_int(0:maximum_grid_level),                                &
+              type_y_int(0:maximum_grid_level) )
+
+    CALL MPI_TYPE_VECTOR( nxr-nxl+1+2*nbgp, nbgp, ngp_y, MPI_INTEGER,          &
+                          type_x_int(0), ierr )
+    CALL MPI_TYPE_COMMIT( type_x_int(0), ierr )
+
+    CALL MPI_TYPE_VECTOR( nbgp, ngp_y, ngp_y, MPI_INTEGER, type_y_int(0), ierr )
+    CALL MPI_TYPE_COMMIT( type_y_int(0), ierr )
+!
+!-- Calculate gridpoint numbers for the exchange of ghost points along x
+!-- (yz-plane for 3D-arrays) and define MPI derived data type(s) for the
+!-- exchange of ghost points in y-direction (xz-plane).
+!-- Do these calculations for the model grid and (if necessary) also
+!-- for the coarser grid levels used in the multigrid method
+    ALLOCATE ( ngp_xz(0:maximum_grid_level),                                   &
+               ngp_xz_int(0:maximum_grid_level),                               &
+               ngp_yz(0:maximum_grid_level),                                   &
+               ngp_yz_int(0:maximum_grid_level),                               &
+               type_xz(0:maximum_grid_level),                                  &
+               type_xz_int(0:maximum_grid_level),                              &
+               type_yz(0:maximum_grid_level),                                  &
+               type_yz_int(0:maximum_grid_level) )
+
+    nxl_l = nxl; nxr_l = nxr; nys_l = nys; nyn_l = nyn; nzb_l = nzb; nzt_l = nzt
+
+!
+!-- Discern between the model grid, which needs nbgp ghost points and
+!-- grid levels for the multigrid scheme. In the latter case only one
+!-- ghost point is necessary.
+!-- First definition of MPI-datatypes for exchange of ghost layers on normal 
+!-- grid. The following loop is needed for data exchange in poismg.f90.
+!
+!-- Determine number of grid points of yz-layer for exchange
+    ngp_yz(0) = (nzt - nzb + 2) * (nyn - nys + 1 + 2 * nbgp)
+
+!
+!-- Define an MPI-datatype for the exchange of left/right boundaries.
+!-- Although data are contiguous in physical memory (which does not
+!-- necessarily require an MPI-derived datatype), the data exchange between
+!-- left and right PE's using the MPI-derived type is 10% faster than without.
+    CALL MPI_TYPE_VECTOR( nxr-nxl+1+2*nbgp, nbgp*(nzt-nzb+2), ngp_yz(0), &
+                          MPI_REAL, type_xz(0), ierr )
+    CALL MPI_TYPE_COMMIT( type_xz(0), ierr )
+
+    CALL MPI_TYPE_VECTOR( nbgp, ngp_yz(0), ngp_yz(0), MPI_REAL, type_yz(0), &
+                          ierr ) 
+    CALL MPI_TYPE_COMMIT( type_yz(0), ierr )
+
+!
+!-- Define data types for exchange of 3D Integer arrays.
+    ngp_yz_int(0) = (nzt - nzb + 2) * (nyn - nys + 1 + 2 * nbgp)
+
+    CALL MPI_TYPE_VECTOR( nxr-nxl+1+2*nbgp, nbgp*(nzt-nzb+2), ngp_yz_int(0),   &
+                          MPI_INTEGER, type_xz_int(0), ierr )
+    CALL MPI_TYPE_COMMIT( type_xz_int(0), ierr )
+
+    CALL MPI_TYPE_VECTOR( nbgp, ngp_yz_int(0), ngp_yz_int(0), MPI_INTEGER,     &
+                          type_yz_int(0), ierr )
+    CALL MPI_TYPE_COMMIT( type_yz_int(0), ierr )
+
+!
+!-- Definition of MPI-datatypes for multigrid method (coarser level grids)
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+!    
+!--    Definition of MPI-datatyoe as above, but only 1 ghost level is used
+       DO  i = maximum_grid_level, 1 , -1
+!
+!--       For 3D-exchange on different multigrid level, one ghost point for 
+!--       REAL arrays, two ghost points for INTEGER arrays
+          ngp_xz(i) = (nzt_l - nzb_l + 2) * (nxr_l - nxl_l + 3)
+          ngp_yz(i) = (nzt_l - nzb_l + 2) * (nyn_l - nys_l + 3)
+
+          ngp_xz_int(i) = (nzt_l - nzb_l + 2) * (nxr_l - nxl_l + 3)
+          ngp_yz_int(i) = (nzt_l - nzb_l + 2) * (nyn_l - nys_l + 3)
+!
+!--       MPI data type for REAL arrays, for xz-layers
+          CALL MPI_TYPE_VECTOR( nxr_l-nxl_l+3, nzt_l-nzb_l+2, ngp_yz(i),       &
+                                MPI_REAL, type_xz(i), ierr )
+          CALL MPI_TYPE_COMMIT( type_xz(i), ierr )
+
+!
+!--       MPI data type for INTEGER arrays, for xz-layers
+          CALL MPI_TYPE_VECTOR( nxr_l-nxl_l+3, nzt_l-nzb_l+2, ngp_yz_int(i),   &
+                                MPI_INTEGER, type_xz_int(i), ierr )
+          CALL MPI_TYPE_COMMIT( type_xz_int(i), ierr )
+
+!
+!--       MPI data type for REAL arrays, for yz-layers
+          CALL MPI_TYPE_VECTOR( 1, ngp_yz(i), ngp_yz(i), MPI_REAL, type_yz(i), &
+                                ierr )
+          CALL MPI_TYPE_COMMIT( type_yz(i), ierr )
+!
+!--       MPI data type for INTEGER arrays, for yz-layers
+          CALL MPI_TYPE_VECTOR( 1, ngp_yz_int(i), ngp_yz_int(i), MPI_INTEGER,  &
+                                type_yz_int(i), ierr )
+          CALL MPI_TYPE_COMMIT( type_yz_int(i), ierr )
+
+
+!--       For 2D-exchange of INTEGER arrays on coarser grid level, where 2 ghost
+!--       points need to be exchanged.
+          CALL MPI_TYPE_VECTOR( nxr_l-nxl_l+5, 2, nyn_l-nys_l+5, MPI_INTEGER,          &
+                                type_x_int(i), ierr )
+          CALL MPI_TYPE_COMMIT( type_x_int(i), ierr )
+
+
+          CALL MPI_TYPE_VECTOR( 2, nyn_l-nys_l+5, nyn_l-nys_l+5, MPI_INTEGER,          &
+                                type_y_int(i), ierr )
+          CALL MPI_TYPE_COMMIT( type_y_int(i), ierr )
+
+          nxl_l = nxl_l / 2
+          nxr_l = nxr_l / 2
+          nys_l = nys_l / 2
+          nyn_l = nyn_l / 2
+          nzt_l = nzt_l / 2
+
+       ENDDO
+
+    ENDIF
+
+#endif
+
+#if defined( __parallel )
+!
+!-- Setting of flags for inflow/outflow/nesting conditions.
+    IF ( pleft == MPI_PROC_NULL )  THEN
+       IF ( bc_lr == 'dirichlet/radiation'  .OR.  bc_lr == 'nested'  .OR.      &
+            bc_lr == 'nesting_offline' )  THEN
+          bc_dirichlet_l  = .TRUE.
+       ELSEIF ( bc_lr == 'radiation/dirichlet' )  THEN
+          bc_radiation_l = .TRUE.
+       ENDIF
+    ENDIF
+ 
+    IF ( pright == MPI_PROC_NULL )  THEN
+       IF ( bc_lr == 'dirichlet/radiation' )  THEN
+          bc_radiation_r = .TRUE.
+       ELSEIF ( bc_lr == 'radiation/dirichlet'  .OR.  bc_lr == 'nested'  .OR.  &
+                bc_lr == 'nesting_offline' )  THEN
+          bc_dirichlet_r  = .TRUE.
+       ENDIF
+    ENDIF
+
+    IF ( psouth == MPI_PROC_NULL )  THEN
+       IF ( bc_ns == 'dirichlet/radiation' )  THEN
+          bc_radiation_s = .TRUE.
+       ELSEIF ( bc_ns == 'radiation/dirichlet'  .OR.  bc_ns == 'nested'  .OR.  &
+                bc_ns == 'nesting_offline' )  THEN
+          bc_dirichlet_s  = .TRUE.
+       ENDIF
+    ENDIF
+
+    IF ( pnorth == MPI_PROC_NULL )  THEN
+       IF ( bc_ns == 'dirichlet/radiation'  .OR.  bc_ns == 'nested'  .OR.      &
+            bc_ns == 'nesting_offline' )  THEN
+          bc_dirichlet_n  = .TRUE.
+       ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
+          bc_radiation_n = .TRUE.
+       ENDIF
+    ENDIF
+!
+!-- In case of synthetic turbulence geneartor determine ids. 
+!-- Please note, if no forcing or nesting is applied, the generator is applied
+!-- only at the left lateral boundary.
+    IF ( use_syn_turb_gen )  THEN
+       IF ( bc_dirichlet_l )  THEN
+          id_stg_left_l = myidx
+       ELSE
+          id_stg_left_l = 0
+       ENDIF
+       IF ( bc_dirichlet_r )  THEN
+          id_stg_right_l = myidx
+       ELSE
+          id_stg_right_l = 0
+       ENDIF
+       IF ( bc_dirichlet_s )  THEN
+          id_stg_south_l = myidy
+       ELSE
+          id_stg_south_l = 0
+       ENDIF
+       IF ( bc_dirichlet_n )  THEN
+          id_stg_north_l = myidy
+       ELSE
+          id_stg_north_l = 0
+       ENDIF
+
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( id_stg_left_l, id_stg_left,   1, MPI_INTEGER,       &
+                           MPI_SUM, comm1dx, ierr )
+
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( id_stg_right_l, id_stg_right, 1, MPI_INTEGER,       &
+                           MPI_SUM, comm1dx, ierr )
+
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( id_stg_south_l, id_stg_south, 1, MPI_INTEGER,       &
+                           MPI_SUM, comm1dy, ierr )
+
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( id_stg_north_l, id_stg_north, 1, MPI_INTEGER,       &
+                           MPI_SUM, comm1dy, ierr )
+
+    ENDIF 
+ 
+!
+!-- Broadcast the id of the inflow PE
+    IF ( bc_dirichlet_l )  THEN
+       id_inflow_l = myidx
+    ELSE
+       id_inflow_l = 0
+    ENDIF
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( id_inflow_l, id_inflow, 1, MPI_INTEGER, MPI_SUM, &
+                        comm1dx, ierr )
+
+!
+!-- Broadcast the id of the recycling plane
+!-- WARNING: needs to be adjusted in case of inflows other than from left side!
+    IF ( NINT( recycling_width / dx ) >= nxl  .AND. &
+         NINT( recycling_width / dx ) <= nxr )  THEN
+       id_recycling_l = myidx
+    ELSE
+       id_recycling_l = 0
+    ENDIF
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( id_recycling_l, id_recycling, 1, MPI_INTEGER, MPI_SUM, &
+                        comm1dx, ierr )
+
+!
+!-- Broadcast the id of the outflow PE and outflow-source plane
+    IF ( turbulent_outflow )  THEN
+
+       IF ( bc_radiation_r )  THEN
+          id_outflow_l = myidx
+       ELSE
+          id_outflow_l = 0
+       ENDIF
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( id_outflow_l, id_outflow, 1, MPI_INTEGER, MPI_SUM, &
+                           comm1dx, ierr )
+
+       IF ( NINT( outflow_source_plane / dx ) >= nxl  .AND. &
+            NINT( outflow_source_plane / dx ) <= nxr )  THEN
+          id_outflow_source_l = myidx
+       ELSE
+          id_outflow_source_l = 0
+       ENDIF
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( id_outflow_source_l, id_outflow_source, 1, &
+                           MPI_INTEGER, MPI_SUM, comm1dx, ierr )
+
+    ENDIF
+
+    CALL location_message( 'finished', .TRUE. )
+
+#else
+    IF ( bc_lr == 'dirichlet/radiation' )  THEN
+       bc_dirichlet_l = .TRUE.
+       bc_radiation_r = .TRUE.
+    ELSEIF ( bc_lr == 'radiation/dirichlet' )  THEN
+       bc_radiation_l = .TRUE.
+       bc_dirichlet_r = .TRUE.
+    ENDIF
+
+    IF ( bc_ns == 'dirichlet/radiation' )  THEN
+       bc_dirichlet_n = .TRUE.
+       bc_radiation_s = .TRUE.
+    ELSEIF ( bc_ns == 'radiation/dirichlet' )  THEN
+       bc_radiation_n = .TRUE.
+       bc_dirichlet_s = .TRUE.
+    ENDIF
+#endif
+
+!
+!-- At the inflow or outflow, u or v, respectively, have to be calculated for
+!-- one more grid point.
+    IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+       nxlu = nxl + 1
+    ELSE
+       nxlu = nxl
+    ENDIF
+    IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+       nysv = nys + 1
+    ELSE
+       nysv = nys
+    ENDIF
+
+!
+!-- Allocate wall flag arrays used in the multigrid solver
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+
+       DO  i = maximum_grid_level, 1, -1
+
+           SELECT CASE ( i )
+
+              CASE ( 1 )
+                 ALLOCATE( wall_flags_1(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 2 )
+                 ALLOCATE( wall_flags_2(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 3 )
+                 ALLOCATE( wall_flags_3(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 4 )
+                 ALLOCATE( wall_flags_4(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 5 )
+                 ALLOCATE( wall_flags_5(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 6 )
+                 ALLOCATE( wall_flags_6(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 7 )
+                 ALLOCATE( wall_flags_7(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 8 )
+                 ALLOCATE( wall_flags_8(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 9 )
+                 ALLOCATE( wall_flags_9(nzb:nzt_mg(i)+1,         &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE ( 10 )
+                 ALLOCATE( wall_flags_10(nzb:nzt_mg(i)+1,        &
+                                        nys_mg(i)-1:nyn_mg(i)+1, &
+                                        nxl_mg(i)-1:nxr_mg(i)+1) )
+
+              CASE DEFAULT
+                 message_string = 'more than 10 multigrid levels'
+                 CALL message( 'init_pegrid', 'PA0238', 1, 2, 0, 6, 0 )
+
+          END SELECT
+
+       ENDDO
+
+    ENDIF
+
+ END SUBROUTINE init_pegrid
Index: /palm/tags/release-6.0/SOURCE/init_pt_anomaly.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_pt_anomaly.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_pt_anomaly.f90	(revision 3477)
@@ -0,0 +1,180 @@
+!> @file init_pt_anomaly.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Added topography flags
+! 
+! 3035 2018-05-24 09:35:20Z schwenkel
+! Add option to initialize warm air bubble close to surface
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 861 2012-03-26 14:18:34Z suehring
+! Modification of the amplitude to obtain a visible temperature perturbation.
+!
+! Revision 1.1  1997/08/29 08:58:56  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Impose a temperature perturbation for an advection test.
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_pt_anomaly
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt, zu
+
+    USE control_parameters
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxr, ny, nyn, nys, nzb, nzt, wall_flags_0
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< grid index along x
+    INTEGER(iwp) ::  ic !< center index along x 
+    INTEGER(iwp) ::  j  !< grid index along y
+    INTEGER(iwp) ::  jc !< center index along y
+    INTEGER(iwp) ::  k  !< grid index along z
+    INTEGER(iwp) ::  kc !< center index along z
+
+    REAL(wp)     ::  amount                               !< amount of temperature perturbation
+    REAL(wp)     ::  bubble_center_y                      !< center of bubble in y
+    REAL(wp)     ::  bubble_center_z = 170.0              !< center of bubble in z
+    REAL(wp)     ::  bubble_sigma_y = 300.0               !< width of bubble in y
+    REAL(wp)     ::  bubble_sigma_z = 150.0               !< width of bubble in z
+    REAL(wp)     ::  flag                                 !< flag to mask topography grid points
+    REAL(wp)     ::  initial_temperature_difference = 0.4 !< temperature perturbation for bubble in K
+    REAL(wp)     ::  radius                               !< radius of pt anomaly
+    REAL(wp)     ::  rc                                   !< radius of pt anomaly
+    REAL(wp)     ::  x                                    !< x dimension of pt anomaly
+    REAL(wp)     ::  y                                    !< y dimension of pt anomaly
+    REAL(wp)     ::  z                                    !< z dimension of pt anomaly
+
+
+!
+!-- Defaults: radius rc, strength z,
+!--           position of center: ic, jc, kc
+    rc =  10.0_wp * dx
+    ic =  ( nx+1 ) / 2
+    jc =  ic
+    kc =  nzt / 2
+
+    IF ( INDEX( initializing_actions, 'initialize_ptanom' ) /= 0 )  THEN
+!
+!--    Compute the perturbation.
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                x = ( i - ic ) * dx
+                y = ( j - jc ) * dy
+                z = ABS( zu(k) - zu(kc) )
+                radius = SQRT( x**2 + y**2 + z**2 )
+                IF ( radius <= rc )  THEN
+                   amount = 5.0_wp * EXP( -( radius * 0.001_wp / 2.0_wp )**2 )
+                ELSE
+                   amount = 0.0_wp
+                ENDIF
+
+                pt(k,j,i) = pt(k,j,i) + amount * flag
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!-- Initialize warm air bubble close to surface and homogenous elegonated 
+!-- along x-Axis
+    ELSEIF ( INDEX( initializing_actions, 'initialize_bubble' ) /= 0 )  THEN
+!
+!--    Calculate y-center of model domain
+       bubble_center_y = ( ny + 1.0 ) * dy / 2.0
+
+!
+!--    Compute perturbation for potential temperaure
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                pt(k,j,i) = pt(k,j,i) +                                        &
+                               EXP( -0.5 * ( (j* dy  - bubble_center_y) /      &
+                                                       bubble_sigma_y )**2) *  &
+                               EXP( -0.5 * ( (zu(k)  - bubble_center_z) /      &
+                                                       bubble_sigma_z)**2) *   &
+                               initial_temperature_difference * flag
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Exchange of boundary values for temperature
+    CALL exchange_horiz( pt, nbgp )
+
+
+ END SUBROUTINE init_pt_anomaly
Index: /palm/tags/release-6.0/SOURCE/init_rankine.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_rankine.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_rankine.f90	(revision 3477)
@@ -0,0 +1,221 @@
+!> @file init_rankine.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/11 06:18:43  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initialize a (nondivergent) Rankine eddy with a vertical axis in order to test 
+!> the advection terms and the pressure solver.
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_rankine
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt, pt_init, u, u_init, v, v_init
+
+    USE control_parameters,                                                    &
+        ONLY:  initializing_actions, n_sor, nsor, nsor_ini   
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy 
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt     
+                
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  ic  !<
+    INTEGER(iwp) ::  j   !<
+    INTEGER(iwp) ::  jc  !<
+    INTEGER(iwp) ::  k   !<
+    INTEGER(iwp) ::  kc1 !<
+    INTEGER(iwp) ::  kc2 !<
+    
+    REAL(wp)     ::  alpha  !<
+    REAL(wp)     ::  betrag !<
+    REAL(wp)     ::  radius !<
+    REAL(wp)     ::  rc     !<
+    REAL(wp)     ::  uw     !<
+    REAL(wp)     ::  vw     !<
+    REAL(wp)     ::  x      !<
+    REAL(wp)     ::  y      !<
+
+!
+!-- Default: eddy radius rc, eddy strength z,
+!--          position of eddy centre: ic, jc, kc1, kc2
+    rc  =  4.0_wp * dx
+    ic  =  ( nx+1 ) / 2
+    jc  =  ic
+    kc1 = nzb
+    kc2 = nzt+1
+
+!
+!-- Reset initial profiles to constant profiles
+    IF ( INDEX(initializing_actions, 'set_constant_profiles') /= 0 )  THEN
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             pt(:,j,i) = pt_init
+             u(:,j,i)  = u_init
+             v(:,j,i)  = v_init
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Compute the u-component.
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          x = ( i - ic - 0.5_wp ) * dx
+          y = ( j - jc          ) * dy
+          radius = SQRT( x**2 + y**2 )
+          IF ( radius <= 2.0_wp * rc )  THEN
+             betrag = radius / ( 2.0_wp * rc ) * 0.08_wp
+          ELSEIF ( radius > 2.0_wp * rc  .AND.  radius < 8.0_wp * rc )  THEN
+             betrag = 0.08_wp * EXP( -( radius - 2.0_wp * rc ) / 2.0_wp )
+          ELSE
+             betrag = 0.0_wp
+          ENDIF
+
+          IF ( x == 0.0_wp )  THEN
+             IF ( y > 0.0_wp )  THEN
+                alpha = pi / 2.0_wp
+             ELSEIF ( y < 0.0_wp )  THEN
+                alpha = 3.0_wp * pi / 2.0_wp
+             ENDIF
+          ELSE
+             IF ( x < 0.0_wp )  THEN
+                alpha = ATAN( y / x ) + pi
+             ELSE
+                IF ( y < 0.0_wp )  THEN
+                   alpha = ATAN( y / x ) + 2.0_wp * pi
+                ELSE
+                   alpha = ATAN( y / x )
+                ENDIF
+             ENDIF
+          ENDIF
+
+          uw = -SIN( alpha ) * betrag
+
+          DO  k = kc1, kc2
+             u(k,j,i) = u(k,j,i) + uw
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Compute the v-component.
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          x = ( i - ic          ) * dx
+          y = ( j - jc - 0.5_wp ) * dy
+          radius = SQRT( x**2 + y**2 )
+          IF ( radius <= 2.0_wp * rc )  THEN
+             betrag = radius / ( 2.0_wp * rc ) * 0.08_wp
+          ELSEIF ( radius > 2.0_wp * rc  .AND.  radius < 8.0_wp * rc )  THEN
+             betrag = 0.08_wp * EXP( -( radius - 2.0_wp * rc ) / 2.0_wp )
+          ELSE
+             betrag = 0.0_wp
+          ENDIF
+
+          IF ( x == 0.0_wp )  THEN
+             IF ( y > 0.0_wp )  THEN
+                alpha = pi / 2.0_wp
+             ELSEIF ( y < 0.0_wp )  THEN
+                alpha = 3.0_wp * pi / 2.0_wp
+             ENDIF
+          ELSE
+             IF ( x < 0.0_wp )  THEN
+                alpha = ATAN( y / x ) + pi
+             ELSE
+                IF ( y < 0.0_wp )  THEN
+                   alpha = ATAN( y / x ) + 2.0_wp * pi
+                ELSE
+                   alpha = ATAN( y / x )
+                ENDIF
+             ENDIF
+          ENDIF
+
+          vw = COS( alpha ) * betrag
+
+          DO  k = kc1, kc2
+             v(k,j,i) = v(k,j,i) + vw
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Exchange of boundary values for the velocities.
+    CALL exchange_horiz( u, nbgp)
+    CALL exchange_horiz( v, nbgp )
+!
+!-- Make velocity field nondivergent.
+    n_sor = nsor_ini
+    CALL pres
+    n_sor = nsor
+
+ END SUBROUTINE init_rankine
Index: /palm/tags/release-6.0/SOURCE/init_slope.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_slope.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_slope.f90	(revision 3477)
@@ -0,0 +1,184 @@
+!> @file init_slope.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  2000/04/27 07:06:24  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initialization of the temperature field and other variables used in case
+!> of a sloping surface.
+!> @note when a sloping surface is used, only one constant temperature
+!>       gradient is allowed!
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_slope
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt, pt_init, pt_slope_ref, zu
+        
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+                    
+    USE control_parameters,                                                    &
+        ONLY:  alpha_surface, initializing_actions, pt_slope_offset,           &
+               pt_surface, pt_vertical_gradient, sin_alpha_surface
+        
+    USE grid_variables,                                                        &
+        ONLY:  dx
+        
+    USE indices,                                                               &
+        ONLY:  ngp_2dh, nx, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+        
+    USE kinds
+
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i        !<
+    INTEGER(iwp) ::  j        !<
+    INTEGER(iwp) ::  k        !<
+    
+    REAL(wp)     ::  alpha    !<
+    REAL(wp)     ::  height   !<
+    REAL(wp)     ::  pt_value !<
+    REAL(wp)     ::  radius   !<
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_init_local !<
+
+!
+!-- Calculate reference temperature field needed for computing buoyancy
+    ALLOCATE( pt_slope_ref(nzb:nzt+1,nxlg:nxrg) )
+
+    DO  i = nxlg, nxrg
+       DO  k = nzb, nzt+1
+
+!
+!--       Compute height of grid-point relative to lower left corner of
+!--       the total domain.
+!--       First compute the distance between the actual grid point and the
+!--       lower left corner as well as the angle between the line connecting
+!--       these points and the bottom of the model.
+          IF ( k /= nzb )  THEN
+             radius = SQRT( ( i * dx )**2 + zu(k)**2 )
+             height = zu(k)
+          ELSE
+             radius = SQRT( ( i * dx )**2 )
+             height = 0.0_wp
+          ENDIF
+          IF ( radius /= 0.0_wp )  THEN
+             alpha = ASIN( height / radius )
+          ELSE
+             alpha = 0.0_wp
+          ENDIF
+!
+!--       Compute temperatures in the rotated coordinate system
+          alpha    = alpha + alpha_surface / 180.0_wp * pi
+          pt_value = pt_surface + radius * SIN( alpha ) * &
+                                  pt_vertical_gradient(1) / 100.0_wp
+          pt_slope_ref(k,i) = pt_value
+       ENDDO                
+    ENDDO
+
+!
+!-- Temperature difference between left and right boundary of the total domain,
+!-- used for the cyclic boundary in x-direction
+    pt_slope_offset = (nx+1) * dx * sin_alpha_surface * &
+                      pt_vertical_gradient(1) / 100.0_wp
+
+
+!
+!-- Following action must only be executed for initial runs
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+!
+!--    Set initial temperature equal to the reference temperature field
+       DO  j = nysg, nyng
+          pt(:,j,:) = pt_slope_ref
+       ENDDO
+
+!
+!--    Recompute the mean initial temperature profile (mean along x-direction of
+!--    the rotated coordinate system)
+       ALLOCATE( pt_init_local(nzb:nzt+1) )
+       pt_init_local = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j =  nys, nyn
+             DO  k = nzb, nzt+1
+                pt_init_local(k) = pt_init_local(k) + pt(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( pt_init_local, pt_init, nzt+2-nzb, MPI_REAL, &
+                            MPI_SUM, comm2d, ierr )
+#else
+       pt_init = pt_init_local
+#endif
+
+       pt_init = pt_init / ngp_2dh(0)
+       DEALLOCATE( pt_init_local )
+
+    ENDIF
+
+ END SUBROUTINE init_slope
Index: /palm/tags/release-6.0/SOURCE/init_vertical_profiles.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/init_vertical_profiles.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/init_vertical_profiles.f90	(revision 3477)
@@ -0,0 +1,148 @@
+!> @file ocean_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! split from check_parameters as separate file to avoid circular dependency
+! with ocean_mod
+!
+! 
+!
+!
+! Authors:
+! --------
+! @author Siegfried Raasch
+!
+! Description:
+! ------------
+!> Inititalizes the vertical profiles of scalar quantities.
+!------------------------------------------------------------------------------!
+ SUBROUTINE init_vertical_profiles( vertical_gradient_level_ind,               &
+                                    vertical_gradient_level,                   &
+                                    vertical_gradient, initial_profile,        &
+                                    surface_value, bc_top_gradient )
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzu, zu
+
+    USE control_parameters,                                                    &
+        ONLY:  ocean_mode
+
+    USE indices,                                                               &
+        ONLY:  nz, nzt
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< loop counter
+    INTEGER(iwp) ::  k  !< loop counter
+    INTEGER(iwp), DIMENSION(1:10) ::  vertical_gradient_level_ind  !< vertical grid indices for gradient levels
+
+    REAL(wp)     ::  bc_top_gradient  !< model top gradient
+    REAL(wp)     ::  gradient         !< vertica gradient of the respective quantity
+    REAL(wp)     ::  surface_value    !< surface value of the respecitve quantity
+
+    REAL(wp), DIMENSION(0:nz+1) ::  initial_profile          !< initialisation profile
+    REAL(wp), DIMENSION(1:10)   ::  vertical_gradient        !< given vertical gradient
+    REAL(wp), DIMENSION(1:10)   ::  vertical_gradient_level  !< given vertical gradient level
+
+    i = 1
+    gradient = 0.0_wp
+
+    IF ( .NOT. ocean_mode )  THEN
+
+       vertical_gradient_level_ind(1) = 0
+       DO  k = 1, nzt+1
+          IF ( i < 11 )  THEN
+             IF ( vertical_gradient_level(i) < zu(k)  .AND.            &
+                  vertical_gradient_level(i) >= 0.0_wp )  THEN
+                gradient = vertical_gradient(i) / 100.0_wp
+                vertical_gradient_level_ind(i) = k - 1
+                i = i + 1
+             ENDIF
+          ENDIF
+          IF ( gradient /= 0.0_wp )  THEN
+             IF ( k /= 1 )  THEN
+                initial_profile(k) = initial_profile(k-1) + dzu(k) * gradient
+             ELSE
+                initial_profile(k) = initial_profile(k-1) + dzu(k) * gradient
+             ENDIF
+          ELSE
+             initial_profile(k) = initial_profile(k-1)
+          ENDIF
+!
+!--       Avoid negative values of scalars
+          IF ( initial_profile(k) < 0.0_wp )  THEN
+             initial_profile(k) = 0.0_wp
+          ENDIF
+       ENDDO
+
+    ELSE
+
+!
+!--    In ocean mode, profiles are constructed starting from the ocean surface,
+!--    which is at the top of the model domain
+       vertical_gradient_level_ind(1) = nzt+1
+       DO  k = nzt, 0, -1
+          IF ( i < 11 )  THEN
+             IF ( vertical_gradient_level(i) > zu(k)  .AND.            &
+                  vertical_gradient_level(i) <= 0.0_wp )  THEN
+                gradient = vertical_gradient(i) / 100.0_wp
+                vertical_gradient_level_ind(i) = k + 1
+                i = i + 1
+             ENDIF
+          ENDIF
+          IF ( gradient /= 0.0_wp )  THEN
+             IF ( k /= nzt )  THEN
+                initial_profile(k) = initial_profile(k+1) - dzu(k+1) * gradient
+             ELSE
+                initial_profile(k)   = surface_value - 0.5_wp * dzu(k+1) *     &
+                                                       gradient
+                initial_profile(k+1) = surface_value + 0.5_wp * dzu(k+1) *     &
+                                                       gradient
+             ENDIF
+          ELSE
+             initial_profile(k) = initial_profile(k+1)
+          ENDIF
+!
+!--       Avoid negative values of scalars
+          IF ( initial_profile(k) < 0.0_wp )  THEN
+             initial_profile(k) = 0.0_wp
+          ENDIF
+       ENDDO
+
+    ENDIF
+
+!
+!-- In case of no given gradients, choose zero gradient conditions
+    IF ( vertical_gradient_level(1) == -999999.9_wp )  THEN
+       vertical_gradient_level(1) = 0.0_wp
+    ENDIF
+!
+!-- Store gradient at the top boundary for possible Neumann boundary condition
+    bc_top_gradient  = ( initial_profile(nzt+1) - initial_profile(nzt) ) /     &
+                       dzu(nzt+1)
+
+ END SUBROUTINE init_vertical_profiles
Index: /palm/tags/release-6.0/SOURCE/interaction_droplets_ptq.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/interaction_droplets_ptq.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/interaction_droplets_ptq.f90	(revision 3477)
@@ -0,0 +1,181 @@
+!> @file interaction_droplets_ptq.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3040 2018-05-25 10:22:08Z schwenkel
+! Changed the name specific humidity to mixing ratio
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1845 2016-04-08 08:29:13Z raasch
+! nzb_2d replaced by nzb_s_inner
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! bugfix: module procedure names shortened to avoid Intel compiler warnings
+! about too long names
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 799 2011-12-21 17:48:03Z franke
+! Bugfix: d_exner(k) was missing in calculation of pt_p
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.1  2005/06/26 19:57:47  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Release of latent heat and change of mixing ratio due to condensation /
+!> evaporation of droplets.
+!------------------------------------------------------------------------------!
+ MODULE interaction_droplets_ptq_mod
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt_p, ql_c, q_p, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  lv_d_cp
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+    USE kinds
+
+    USE pegrid
+
+    PRIVATE
+    PUBLIC interaction_droplets_ptq
+
+    INTERFACE interaction_droplets_ptq
+!
+!--    Internal names shortened in order ro avoid Intel compiler messages
+!--    about too long names
+       MODULE PROCEDURE i_droplets_ptq
+       MODULE PROCEDURE i_droplets_ptq_ij
+    END INTERFACE interaction_droplets_ptq
+ 
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE i_droplets_ptq
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i    !< running index x direction
+       INTEGER(iwp) ::  j    !< running index y direction 
+       INTEGER(iwp) ::  k    !< running index z direction
+
+       REAL(wp) ::  flag     !< flag to mask topography grid points
+ 
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             Predetermine flag to mask topography
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                q_p(k,j,i)  = q_p(k,j,i)  - ql_c(k,j,i) * flag
+                pt_p(k,j,i) = pt_p(k,j,i) + lv_d_cp * ql_c(k,j,i) * d_exner(k) &
+                                                        * flag
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE i_droplets_ptq
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE i_droplets_ptq_ij( i, j )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i    !< running index x direction
+       INTEGER(iwp) ::  j    !< running index y direction 
+       INTEGER(iwp) ::  k    !< running index z direction
+
+       REAL(wp) ::  flag     !< flag to mask topography grid points
+
+
+       DO  k = nzb+1, nzt
+!
+!--       Predetermine flag to mask topography
+          flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+          q_p(k,j,i)  = q_p(k,j,i)  - ql_c(k,j,i) * flag
+          pt_p(k,j,i) = pt_p(k,j,i) + lv_d_cp * ql_c(k,j,i) * d_exner(k) * flag
+       ENDDO
+
+    END SUBROUTINE i_droplets_ptq_ij
+
+ END MODULE interaction_droplets_ptq_mod
Index: /palm/tags/release-6.0/SOURCE/land_surface_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/land_surface_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/land_surface_model_mod.f90	(revision 3477)
@@ -0,0 +1,7182 @@
+!> @file land_surface_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix in initialization of soil properties from dynamic input file
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! Assign real value instead of integer
+! 
+! 3341 2018-10-15 10:31:27Z suehring
+! Modularization of all bulk cloud physics code components
+! 
+! 3271 2018-09-24 08:20:34Z suehring
+! Several bugfixes:
+! - Initialization of pt_surface array with soil temperature in the uppermost
+!   soil layer, else heat fluxes at the very first time step become quite large
+! - Default initialization of vertical surface elements in special case terrain
+!   height changes are larger than adjacent building heights. 
+! 
+! 3256 2018-09-17 12:20:07Z suehring
+! Enable initialization of z0q for vegetation, pavement and water surfaces via
+! namelist input. 
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3233 2018-09-07 13:21:24Z schwenkel
+! Adapted for the use of cloud_droplets 
+! 
+! 3222 2018-08-30 13:35:35Z suehring
+! - Introduction of surface array for type and its names
+! - Bugfix in intialization of pavement surfaces
+! 
+! 3215 2018-08-29 09:58:59Z suehring
+! Enable optional initialization of soil properties directly from dynamic 
+! input file.
+! 
+! 3209 2018-08-27 16:58:37Z suehring
+! Added maximum aerodynamic resistance of 300.
+! 
+! 3161 2018-07-23 09:30:10Z maronga
+! Increased roughness of asphalt surfaces to account for turbulence production
+! by traffic and other obstacles
+! 
+! 3152 2018-07-19 13:26:52Z suehring
+! Further adjustments for q_surface
+! 
+! 3147 2018-07-18 22:38:11Z maronga
+! Adjustments for new surface structure
+! 
+! 3146 2018-07-18 22:36:19Z maronga
+! Modified calculation of the surface resistance r_s
+! 
+! 3142 2018-07-17 15:27:45Z suehring
+! Minor bugfix for last commit.
+! 
+! 3138 2018-07-17 08:21:20Z maronga
+! Bugfix: limit roughness lengths in case of sea surface with constant_roughness
+! = .F.
+! 
+! 3136 2018-07-16 14:48:21Z suehring
+! Limit also roughness length for heat and moisture where necessary;
+! Limit surface resistance to positive values
+! 
+! 3133 2018-07-16 11:46:50Z maronga
+! Bugfix for last commit.
+! 
+! Some adjustments for pavement parameters
+! Limit magnus formula to avoid negative q_s (leads to model crash)
+! 
+! 3091 2018-06-28 16:20:35Z suehring
+! Add check for local roughness length not exceeding surface-layer height and
+! limit roughness length where necessary.
+! 
+! 3051 2018-05-30 17:43:55Z suehring
+! Bugfix in surface-element loops for pavement surfaces 
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised and added
+! 
+! 3026 2018-05-22 10:30:53Z schwenkel
+! Changed the name specific humidity to mixing ratio, since we are computing
+! mixing ratios.
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Bugfix: set some initial values
+! Bugfix: domain bounds of local_pf corrected
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Further allocation checks implemented (averaged data will be assigned to fill
+! values if no allocation happened so far) 
+! 
+! 2968 2018-04-13 11:52:24Z suehring
+! Bugfix in initialization in case of elevated model surface
+! 
+! 2963 2018-04-12 14:47:44Z suehring
+! - In initialization of surface types, consider the case that surface_fractions
+!   is not given in static input file.
+! - Introduce index for vegetation/wall, pavement/green-wall and water/window 
+!   surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! Initialization of soil moisture and temperature via Inifor-provided data also
+! in nested child domains, even if no dynamic input file is available for 
+! child domain. 1D soil profiles are received from parent model.  
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! renamed lsm_par to land_surface_parameters. Bugfix in message calls
+! 
+! 2921 2018-03-22 15:05:23Z Giersch
+! The activation of spinup has been moved to parin
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Calculations of the index range of the subdomain on file which overlaps with
+! the current subdomain are already done in read_restart_data_mod,
+! lsm_read/write_restart_data was renamed to lsm_r/wrd_local, USE kinds has 
+! been removed in several routines, variable named found has been
+! introduced for checking if restart data was found, reading of restart strings
+! has been moved completely to read_restart_data_mod, lsm_rrd_local is already
+! inside the overlap loop programmed in read_restart_data_mod, the marker ***
+! end lsm *** is not necessary anymore, strings and their respective lengths 
+! are written out and read now in case of restart runs to get rid of prescribed
+! character lengths, SAVE attribute added where necessary, deallocation and 
+! allocation of some arrays have been changed to take care of different restart
+! files that can be opened (index i)
+! 
+! 2881 2018-03-13 16:24:40Z suehring
+! Bugfix: wrong loop structure for soil moisture calculation
+! 
+! 2805 2018-02-14 17:00:09Z suehring
+! Bugfix in initialization of roughness over water surfaces
+! 
+! 2798 2018-02-09 17:16:39Z suehring
+! Minor bugfix for initialization of pt_surface
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! Move output of ghf to general 2D output to output ghf also at urban-type 
+! surfaces. 
+! Move restart data of ghf_av to read/write_3d_binary, as this is not a 
+! exclusively LSM variable anymore.   
+! 
+! 2765 2018-01-22 11:34:58Z maronga
+! Major bugfix in calculation of f_shf for vertical surfaces
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! output of r_a moved from land-surface to consider also urban-type surfaces
+! 
+! 2729 2018-01-09 11:22:28Z maronga
+! Separated deep soil temperature from soil_temperature array
+! 
+! 2724 2018-01-05 12:12:38Z maronga
+! Added security check for insufficient soil_temperature values
+! 
+! 2723 2018-01-05 09:27:03Z maronga
+! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs)
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2707 2017-12-18 18:34:46Z suehring
+! Changes from last commit documented
+! 
+! 2706 2017-12-18 18:33:49Z suehring
+! Bugfix, read surface temperature in case of restart runs.
+!
+! 2705 2017-12-18 11:26:23Z maronga
+! Bugfix in binary output (wrong sequence)
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Bugfix: missing USE statement for calc_mean_profile
+! do not write surface temperatures onto pt array as this might cause 
+! problems with nesting (MS)
+! Revised calculation of pt1 and qv1 (now done in surface_layer_fluxes). Bugfix
+! in calculation of surface density (cannot be done via an surface non-air 
+! temperature) (BM)
+! Bugfix: g_d was NaN for non-vegetaed surface types (BM)
+! Bugfix initialization of c_veg and lai
+! Revise data output to enable _FillValues
+! Bugfix in calcultion of r_a and rad_net_l (MS)
+! Bugfix: rad_net is not updated in case of radiation_interaction and must thu
+! be calculated again from the radiative fluxes
+! Temporary fix for cases where no soil model is used on some PEs (BM)
+! Revised input and initialization of soil and surface paramters
+! pavement_depth is variable for each surface element
+! radiation quantities belong to surface type now
+! surface fractions initialized
+! Rename lsm_last_actions into lsm_wrd_subdomain (MS)
+! 
+! 2608 2017-11-13 14:04:26Z schwenkel
+! Calculation of magnus equation in external module (diagnostic_quantities_mod).
+! Adjust calculation of vapor pressure and saturation mixing ratio that it is
+! consistent with formulations in other parts of PALM.
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Pavement parameterization revised
+! 
+! 2573 2017-10-20 15:57:49Z scharf
+! bugfixes in last_actions
+! 
+! 2548 2017-10-16 13:18:20Z suehring
+! extended by cloud_droplets option
+! 
+! 2532 2017-10-11 16:00:46Z scharf
+! bugfixes in data_output_3d
+! 
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! upper bounds of cross section and 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! 
+! 2504 2017-09-27 10:36:13Z maronga
+! Support roots and water under pavement. Added several pavement types.
+! 
+! 2476 2017-09-18 07:54:32Z maronga
+! Bugfix for last commit
+! 
+! 2475 2017-09-18 07:42:36Z maronga
+! Bugfix: setting of vegetation_pars for bare soil corrected.
+! 
+! 2354 2017-08-17 10:49:36Z schwenkel
+! minor bugfixes
+! 
+! 2340 2017-08-07 17:11:13Z maronga
+! Revised root_distribution tabel and implemented a pseudo-generic root fraction
+! calculation
+! 
+! 2333 2017-08-04 09:08:26Z maronga
+! minor bugfixes
+! 
+! 2332 2017-08-03 21:15:22Z maronga
+! bugfix in pavement_pars
+! 
+! 2328 2017-08-03 12:34:22Z maronga
+! Revised skin layer concept.
+! Bugfix for runs with pavement surface and humidity
+! Revised some standard values in vegetation_pars
+! Added emissivity and default albedo_type as variable to tables
+! Changed default surface type to vegetation
+! Revised input of soil layer configuration
+! 
+! 2307 2017-07-07 11:32:10Z suehring
+! Bugfix, variable names corrected
+! 
+! 2299 2017-06-29 10:14:38Z maronga
+! Removed pt_p from USE statement. Adjusted call to lsm_soil_model to allow
+! spinups without soil moisture prediction
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! type of write_binary changed from CHARACTER to LOGICAL
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Bugfix in calculation of bare soil heat capacity.
+! Bugfix in calculation of shf
+! Added support for spinups
+! 
+! 2282 2017-06-13 11:38:46Z schwenkel
+! Bugfix for check of saturation moisture
+! 
+! 2273 2017-06-09 12:46:06Z sward
+! Error number changed
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! Revised parameterization of heat conductivity between skin layer and soil.
+! Temperature and moisture are now defined at the center of the layers.
+! Renamed veg_type to vegetation_type and pave_type to pavement_type_name
+! Renamed and reduced the number of look-up tables (vegetation_pars, soil_pars)
+! Revised land surface model initialization
+! Removed output of shf_eb and qsws_eb and removed _eb throughout code
+! Removed Clapp & Hornberger parameterization
+! 
+! 2249 2017-06-06 13:58:01Z sward
+! 
+! 2248 2017-06-06 13:52:54Z sward $
+! Error no changed
+!
+! 2246 2017-06-06 13:09:34Z sward
+! Error no changed
+!
+! Changed soil configuration to 8 layers. The number of soil layers is now
+! freely adjustable via the NAMELIST.
+! 
+! 2237 2017-05-31 10:34:53Z suehring
+! Bugfix in write restart data
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+!   - now, also vertical walls are possible
+!   - for vertical walls, parametrization of r_a (aerodynamic resisistance) is 
+!     implemented. 
+!
+! Add check for soil moisture, it must not exceed its saturation value.
+! 
+! 2149 2017-02-09 16:57:03Z scharf
+! Land surface parameters II corrected for vegetation_type 18 and 19
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1978 2016-07-29 12:08:31Z maronga
+! Bugfix: initial values of pave_surface and water_surface were not set.
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Parts of the code have been reformatted. Use of radiation model output is
+! generalized and simplified. Added more output quantities due to modularization
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Further modularization: output of cross sections and 3D data is now done in this
+! module. Moreover, restart data is written and read directly within this module.
+!
+! 
+! 1966 2016-07-18 11:54:18Z maronga
+! Bugfix: calculation of m_total in soil model was not set to zero at model start
+! 
+! 1949 2016-06-17 07:19:16Z maronga
+! Bugfix: calculation of qsws_soil_eb with precipitation = .TRUE. gave
+! qsws_soil_eb = 0 due to a typo
+! 
+! 1856 2016-04-13 12:56:17Z maronga
+! Bugfix: for water surfaces, the initial water surface temperature is set equal
+! to the intital skin temperature. Moreover, the minimum value of r_a is now
+! 1.0 to avoid too large fluxes at the first model time step
+! 
+! 1849 2016-04-08 11:33:18Z hoffmann
+! prr moved to arrays_3d
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Cleanup after modularization
+! 
+! 1817 2016-04-06 15:44:20Z maronga
+! Added interface for lsm_init_arrays. Added subroutines for check_parameters,
+! header, and parin. Renamed some subroutines.
+! 
+! 1788 2016-03-10 11:01:04Z maronga
+! Bugfix: calculate lambda_surface based on temperature gradient between skin
+! layer and soil layer instead of Obukhov length
+! Changed: moved calculation of surface specific humidity to energy balance solver
+! New: water surfaces are available by using a fixed sea surface temperature.
+! The roughness lengths are calculated dynamically using the Charnock 
+! parameterization. This involves the new roughness length for moisture z0q.
+! New: modified solution of the energy balance solver and soil model for
+! paved surfaces (i.e. asphalt concrete).
+! Syntax layout improved.
+! Changed: parameter dewfall removed.
+! 
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf variables moved to netcdf module
+!
+! 1757 2016-02-22 15:49:32Z maronga
+! Bugfix: set tm_soil_m to zero after allocation. Added parameter 
+! unscheduled_radiation_calls to control calls of the radiation model based on
+! the skin temperature change during one time step (preliminary version). Set 
+! qsws_soil_eb to zero at model start (previously set to qsws_eb). Removed MAX
+! function as it cannot be vectorized.
+! 
+! 1709 2015-11-04 14:47:01Z maronga
+! Renamed pt_1 and qv_1 to pt1 and qv1.
+! Bugfix: set initial values for t_surface_p in case of restart runs
+! Bugfix: zero resistance caused crash when using radiation_scheme = 'clear-sky'
+! Bugfix: calculation of rad_net when using radiation_scheme = 'clear-sky'
+! Added todo action
+!
+! 1697 2015-10-28 17:14:10Z raasch
+! bugfix: misplaced cpp-directive
+!
+! 1695 2015-10-27 10:03:11Z maronga
+! Bugfix: REAL constants provided with KIND-attribute in call of 
+! Replaced rif with ol
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added skip_time_do_lsm to allow for spin-ups without LSM. Various bugfixes:
+! Soil temperatures are now defined at the edges of the layers, calculation of
+! shb_eb corrected, prognostic equation for skin temperature corrected. Surface
+! fluxes are now directly transfered to atmosphere
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1590 2015-05-08 13:56:27Z maronga
+! Bugfix: definition of character strings requires same length for all elements
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Modifications for RRTMG. Changed tables to PARAMETER type. 
+! 
+! 1571 2015-03-12 16:12:49Z maronga
+! Removed upper-case variable names. Corrected distribution of precipitation to 
+! the liquid water reservoir and the bare soil fractions.
+! 
+! 1555 2015-03-04 17:44:27Z maronga
+! Added output of r_a and r_s
+! 
+! 1553 2015-03-03 17:33:54Z maronga
+! Improved better treatment of roughness lengths. Added default soil temperature
+! profile
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Flux calculation is now done in prandtl_fluxes. Added support for data output.
+! Vertical indices have been replaced. Restart runs are now possible. Some
+! variables have beem renamed. Bugfix in the prognostic equation for the surface
+! temperature. Introduced z0_eb and z0h_eb, which overwrite the setting of
+! roughness_length and z0_factor. Added Clapp & Hornberger parametrization for
+! the hydraulic conductivity. Bugfix for root fraction and extraction
+! calculation
+! 
+! intrinsic function MAX and MIN
+!
+! 1500 2014-12-03 17:42:41Z maronga
+! Corrected calculation of aerodynamic resistance (r_a).
+! Precipitation is now added to liquid water reservoir using LE_liq.
+! Added support for dry runs.
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> Land surface model, consisting of a solver for the energy balance at the
+!> surface and a multi layer soil scheme. The scheme is similar to the TESSEL
+!> scheme implemented in the ECMWF IFS model, with modifications according to
+!> H-TESSEL. The implementation is based on the formulation implemented in the 
+!> DALES and UCLA-LES models.
+!>
+!> @todo Extensive verification energy-balance solver for vertical surfaces, 
+!>       e.g. parametrization of r_a
+!> @todo Revise single land-surface processes for vertical surfaces, e.g. 
+!>       treatment of humidity, etc. 
+!> @todo Consider partial absorption of the net shortwave radiation by the 
+!>       skin layer.
+!> @todo Improve surface water parameterization
+!> @todo Invert indices (running from -3 to 0. Currently: nzb_soil=0, 
+!>       nzt_soil=3)).
+!> @todo Implement surface runoff model (required when performing long-term LES 
+!>       with considerable precipitation.
+!> @todo Revise calculation of f2 when wilting point is non-constant in the
+!>       soil
+!> @todo Allow for zero soil moisture (currently, it is set to wilting point)
+!> @note No time step criterion is required as long as the soil layers do not
+!>       become too thin.
+!> @todo Attention, pavement_subpars_1/2 are hardcoded to 8 levels, in case 
+!>       more levels are used this may cause an potential bug
+!> @todo Routine calc_q_surface required?
+!------------------------------------------------------------------------------!
+ MODULE land_surface_model_mod
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  hyp, pt, prr, q, q_p, ql, vpt, u, v, w, hyrho, exner, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, g, lv_d_cp, l_v, magnus, rho_l, r_d, r_v, rd_d_rv
+
+    USE calc_mean_profile_mod,                                                 &
+        ONLY:  calc_mean_profile
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, coupling_start_time, dt_3d,      &
+               end_time, humidity, intermediate_timestep_count,                &
+               initializing_actions, intermediate_timestep_count_max,          &
+               land_surface, max_masks, pt_surface,             &
+               rho_surface, spinup, spinup_pt_mean, spinup_time,               &
+               surface_pressure, timestep_scheme, tsc,                         &
+               time_since_reference_point
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, precipitation
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY :  building_type_f, init_3d, input_pids_static,                   &
+                netcdf_data_input_interpolate, netcdf_data_input_init_lsm,     &
+                pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f,  &
+                root_area_density_lsm_f, soil_pars_f, soil_type_f,             &
+                surface_fraction_f, vegetation_pars_f, vegetation_type_f,      &
+                water_pars_f, water_type_f
+
+    USE kinds
+
+    USE pegrid
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  albedo, albedo_type, emissivity, force_radiation_call,          &
+               radiation, radiation_scheme, unscheduled_radiation_calls
+        
+    USE statistics,                                                            &
+        ONLY:  hom, statistic_regions
+
+    USE surface_mod,                                                           &
+        ONLY :  ind_pav_green, ind_veg_wall, ind_wat_win, surf_lsm_h,          &
+                surf_lsm_v, surf_type, surface_restore_elements
+
+    IMPLICIT NONE
+
+    TYPE surf_type_lsm
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  var_1d !< 1D prognostic variable
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var_2d !< 2D prognostic variable
+    END TYPE surf_type_lsm
+
+!
+!-- LSM model constants
+
+    REAL(wp), PARAMETER  ::                    &
+              b_ch               = 6.04_wp,    & ! Clapp & Hornberger exponent
+              lambda_h_dry       = 0.19_wp,    & ! heat conductivity for dry soil (W/m/K)  
+              lambda_h_sm        = 3.44_wp,    & ! heat conductivity of the soil matrix (W/m/K)
+              lambda_h_water     = 0.57_wp,    & ! heat conductivity of water (W/m/K)
+              psi_sat            = -0.388_wp,  & ! soil matrix potential at saturation
+              rho_c_soil         = 2.19E6_wp,  & ! volumetric heat capacity of soil (J/m3/K)
+              rho_c_water        = 4.20E6_wp,  & ! volumetric heat capacity of water (J/m3/K)
+              m_max_depth        = 0.0002_wp     ! Maximum capacity of the water reservoir (m)
+
+
+    REAL(wp), DIMENSION(0:7), PARAMETER  :: dz_soil_default =                  & ! default soil layer configuration
+                                            (/ 0.01_wp, 0.02_wp, 0.04_wp,      &
+                                               0.06_wp, 0.14_wp, 0.26_wp,      &
+                                               0.54_wp, 1.86_wp/)
+
+    REAL(wp), DIMENSION(0:3), PARAMETER  :: dz_soil_ref =                      & ! reference four layer soil configuration used for estimating the root fractions
+                                            (/ 0.07_wp, 0.21_wp, 0.72_wp,      &
+                                               1.89_wp /)
+
+    REAL(wp), DIMENSION(0:3), PARAMETER  :: zs_ref =                           & ! reference four layer soil configuration used for estimating the root fractions
+                                            (/ 0.07_wp, 0.28_wp, 1.0_wp,       &
+                                               2.89_wp /)
+
+
+!
+!-- LSM variables
+    CHARACTER(10) :: surface_type = 'netcdf'      !< general classification. Allowed are:
+                                                  !< 'vegetation', 'pavement', ('building'), 
+                                                  !< 'water', and 'netcdf'
+
+
+
+    INTEGER(iwp) :: nzb_soil = 0,             & !< bottom of the soil model (Earth's surface)
+                    nzt_soil = 7,             & !< top of the soil model
+                    nzt_pavement = 0,         & !< top of the pavement within the soil
+                    nzs = 8,                  & !< number of soil layers
+                    pavement_depth_level = 0, & !< default NAMELIST nzt_pavement
+                    pavement_type = 1,        & !< default NAMELIST pavement_type                 
+                    soil_type = 3,            & !< default NAMELIST soil_type
+                    vegetation_type = 2,      & !< default NAMELIST vegetation_type
+                    water_type = 1              !< default NAMELISt water_type
+                    
+   
+        
+    LOGICAL :: conserve_water_content = .TRUE.,  & !< open or closed bottom surface for the soil model
+               constant_roughness = .FALSE.,     & !< use fixed/dynamic roughness lengths for water surfaces
+               force_radiation_call_l = .FALSE., & !< flag to force calling of radiation routine
+               aero_resist_kray = .TRUE.           !< flag to control parametrization of aerodynamic resistance at vertical surface elements
+
+!   value 9999999.9_wp -> generic available or user-defined value must be set
+!   otherwise -> no generic variable and user setting is optional
+    REAL(wp) :: alpha_vangenuchten = 9999999.9_wp,      & !< NAMELIST alpha_vg
+                canopy_resistance_coefficient = 9999999.9_wp, & !< NAMELIST g_d
+                c_surface = 9999999.9_wp,               & !< Surface (skin) heat capacity (J/m2/K)
+                deep_soil_temperature =  9999999.9_wp,  & !< Deep soil temperature (bottom boundary condition)
+                drho_l_lv,                              & !< (rho_l * l_v)**-1
+                field_capacity = 9999999.9_wp,          & !< NAMELIST m_fc
+                f_shortwave_incoming = 9999999.9_wp,    & !< NAMELIST f_sw_in
+                hydraulic_conductivity = 9999999.9_wp,  & !< NAMELIST gamma_w_sat
+                ke = 0.0_wp,                            & !< Kersten number
+                lambda_h_sat = 0.0_wp,                  & !< heat conductivity for saturated soil (W/m/K)
+                lambda_surface_stable = 9999999.9_wp,   & !< NAMELIST lambda_surface_s (W/m2/K)
+                lambda_surface_unstable = 9999999.9_wp, & !< NAMELIST lambda_surface_u (W/m2/K)
+                leaf_area_index = 9999999.9_wp,         & !< NAMELIST lai
+                l_vangenuchten = 9999999.9_wp,          & !< NAMELIST l_vg
+                min_canopy_resistance = 9999999.9_wp,   & !< NAMELIST r_canopy_min
+                min_soil_resistance = 50.0_wp,          & !< NAMELIST r_soil_min
+                m_total = 0.0_wp,                       & !< weighted total water content of the soil (m3/m3)
+                n_vangenuchten = 9999999.9_wp,          & !< NAMELIST n_vg
+                pavement_heat_capacity = 9999999.9_wp,  & !< volumetric heat capacity of pavement (e.g. roads) (J/m3/K)
+                pavement_heat_conduct  = 9999999.9_wp,  & !< heat conductivity for pavements (e.g. roads) (W/m/K)
+                q_s = 0.0_wp,                           & !< saturation water vapor mixing ratio
+                residual_moisture = 9999999.9_wp,       & !< NAMELIST m_res
+                rho_cp,                                 & !< rho_surface * cp
+                rho_lv,                                 & !< rho_ocean * l_v
+                saturation_moisture = 9999999.9_wp,     & !< NAMELIST m_sat
+                skip_time_do_lsm = 0.0_wp,              & !< LSM is not called before this time
+                vegetation_coverage = 9999999.9_wp,     & !< NAMELIST c_veg
+                water_temperature = 9999999.9_wp,       & !< water temperature
+                wilting_point = 9999999.9_wp,           & !< NAMELIST m_wilt
+                z0_vegetation  = 9999999.9_wp,          & !< NAMELIST z0 (lsm_par)
+                z0h_vegetation = 9999999.9_wp,          & !< NAMELIST z0h (lsm_par)
+                z0q_vegetation = 9999999.9_wp,          & !< NAMELIST z0q (lsm_par)
+                z0_pavement    = 9999999.9_wp,          & !< NAMELIST z0 (lsm_par)
+                z0h_pavement   = 9999999.9_wp,          & !< NAMELIST z0h (lsm_par)
+                z0q_pavement   = 9999999.9_wp,          & !< NAMELIST z0q (lsm_par)
+                z0_water       = 9999999.9_wp,          & !< NAMELIST z0 (lsm_par)
+                z0h_water      = 9999999.9_wp,          & !< NAMELIST z0h (lsm_par)
+                z0q_water      = 9999999.9_wp             !< NAMELIST z0q (lsm_par)  
+                
+                
+    REAL(wp), DIMENSION(:), ALLOCATABLE  :: ddz_soil_center, & !< 1/dz_soil_center
+                                            ddz_soil,        & !< 1/dz_soil
+                                            dz_soil_center,  & !< soil grid spacing (center-center)
+                                            zs,              & !< depth of the temperature/moisute levels
+                                            root_extr          !< root extraction
+
+
+                                            
+    REAL(wp), DIMENSION(0:20)  ::  root_fraction = 9999999.9_wp,     & !< (NAMELIST) distribution of root surface area to the individual soil layers
+                                   soil_moisture = 0.0_wp,           & !< NAMELIST soil moisture content (m3/m3)
+                                   soil_temperature = 9999999.9_wp,  & !< NAMELIST soil temperature (K) +1
+                                   dz_soil  = 9999999.9_wp,          & !< (NAMELIST) soil layer depths (spacing)
+                                   zs_layer = 9999999.9_wp         !< soil layer depths (edge)
+                                 
+#if defined( __nopointer )
+    TYPE(surf_type_lsm), TARGET  ::  t_soil_h,    & !< Soil temperature (K), horizontal surface elements
+                                     t_soil_h_p,  & !< Prog. soil temperature (K), horizontal surface elements
+                                     m_soil_h,    & !< Soil moisture (m3/m3), horizontal surface elements
+                                     m_soil_h_p     !< Prog. soil moisture (m3/m3), horizontal surface elements
+
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET  ::  &
+                                     t_soil_v,       & !< Soil temperature (K), vertical surface elements
+                                     t_soil_v_p,     & !< Prog. soil temperature (K), vertical surface elements
+                                     m_soil_v,       & !< Soil moisture (m3/m3), vertical surface elements
+                                     m_soil_v_p        !< Prog. soil moisture (m3/m3), vertical surface elements
+
+#else
+    TYPE(surf_type_lsm), POINTER ::  t_soil_h,    & !< Soil temperature (K), horizontal surface elements
+                                     t_soil_h_p,  & !< Prog. soil temperature (K), horizontal surface elements
+                                     m_soil_h,    & !< Soil moisture (m3/m3), horizontal surface elements
+                                     m_soil_h_p     !< Prog. soil moisture (m3/m3), horizontal surface elements 
+
+    TYPE(surf_type_lsm), TARGET  ::  t_soil_h_1,  & !<
+                                     t_soil_h_2,  & !<
+                                     m_soil_h_1,  & !<
+                                     m_soil_h_2     !<
+
+    TYPE(surf_type_lsm), DIMENSION(:), POINTER :: &
+                                     t_soil_v,    & !< Soil temperature (K), vertical surface elements
+                                     t_soil_v_p,  & !< Prog. soil temperature (K), vertical surface elements
+                                     m_soil_v,    & !< Soil moisture (m3/m3), vertical surface elements
+                                     m_soil_v_p     !< Prog. soil moisture (m3/m3), vertical surface elements   
+
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET ::&
+                                     t_soil_v_1,  & !<
+                                     t_soil_v_2,  & !<
+                                     m_soil_v_1,  & !<
+                                     m_soil_v_2     !<
+#endif    
+
+#if defined( __nopointer )
+    TYPE(surf_type_lsm), TARGET   ::  t_surface_h,    & !< surface temperature (K), horizontal surface elements 
+                                      t_surface_h_p,  & !< progn. surface temperature (K), horizontal surface elements 
+                                      m_liq_h,        & !< liquid water reservoir (m), horizontal surface elements 
+                                      m_liq_h_p         !< progn. liquid water reservoir (m), horizontal surface elements 
+
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET   ::  &
+                                      t_surface_v,    & !< surface temperature (K), vertical surface elements 
+                                      t_surface_v_p,  & !< progn. surface temperature (K), vertical surface elements 
+                                      m_liq_v,        & !< liquid water reservoir (m), vertical surface elements 
+                                      m_liq_v_p         !< progn. liquid water reservoir (m), vertical surface elements 
+#else
+    TYPE(surf_type_lsm), POINTER  ::  t_surface_h,    & !< surface temperature (K), horizontal surface elements 
+                                      t_surface_h_p,  & !< progn. surface temperature (K), horizontal surface elements 
+                                      m_liq_h,        & !< liquid water reservoir (m), horizontal surface elements 
+                                      m_liq_h_p         !< progn. liquid water reservoir (m), horizontal surface elements 
+
+    TYPE(surf_type_lsm), TARGET   ::  t_surface_h_1,  & !<
+                                      t_surface_h_2,  & !<
+                                      m_liq_h_1,      & !<
+                                      m_liq_h_2         !<
+
+    TYPE(surf_type_lsm), DIMENSION(:), POINTER  ::    &
+                                      t_surface_v,    & !< surface temperature (K), vertical surface elements 
+                                      t_surface_v_p,  & !< progn. surface temperature (K), vertical surface elements 
+                                      m_liq_v,        & !< liquid water reservoir (m), vertical surface elements 
+                                      m_liq_v_p         !< progn. liquid water reservoir (m), vertical surface elements 
+
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET   ::  &
+                                      t_surface_v_1,  & !<
+                                      t_surface_v_2,  & !<
+                                      m_liq_v_1,      & !<
+                                      m_liq_v_2         !<
+#endif
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: m_liq_av
+#else
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET :: m_liq_av
+#endif
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  t_soil_av, & !< Average of t_soil
+                                                        m_soil_av    !< Average of m_soil
+#else
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  t_soil_av, & !< Average of t_soil
+                                                        m_soil_av    !< Average of m_soil
+#endif
+
+    TYPE(surf_type_lsm), TARGET ::  tm_liq_h_m      !< liquid water reservoir tendency (m), horizontal surface elements 
+    TYPE(surf_type_lsm), TARGET ::  tt_surface_h_m  !< surface temperature tendency (K), horizontal surface elements 
+    TYPE(surf_type_lsm), TARGET ::  tt_soil_h_m     !< t_soil storage array, horizontal surface elements 
+    TYPE(surf_type_lsm), TARGET ::  tm_soil_h_m     !< m_soil storage array, horizontal surface elements 
+
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET ::  tm_liq_v_m      !< liquid water reservoir tendency (m), vertical surface elements 
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET ::  tt_surface_v_m  !< surface temperature tendency (K), vertical surface elements 
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET ::  tt_soil_v_m     !< t_soil storage array, vertical surface elements 
+    TYPE(surf_type_lsm), DIMENSION(0:3), TARGET ::  tm_soil_v_m     !< m_soil storage array, vertical surface elements 
+
+!
+!-- Energy balance variables                
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: &
+              c_liq_av,         & !< average of c_liq
+              c_soil_av,        & !< average of c_soil
+              c_veg_av,         & !< average of c_veg
+              lai_av,           & !< average of lai
+              qsws_liq_av,      & !< average of qsws_liq
+              qsws_soil_av,     & !< average of qsws_soil
+              qsws_veg_av,      & !< average of qsws_veg
+              r_s_av              !< average of r_s
+                   
+
+!
+!-- Predefined Land surface classes (vegetation_type)
+    CHARACTER(26), DIMENSION(0:18), PARAMETER :: vegetation_type_name = (/ &
+                                   'user defined              ',           & !  0 
+                                   'bare soil                 ',           & !  1                           
+                                   'crops, mixed farming      ',           & !  2
+                                   'short grass               ',           & !  3
+                                   'evergreen needleleaf trees',           & !  4
+                                   'deciduous needleleaf trees',           & !  5
+                                   'evergreen broadleaf trees ',           & !  6
+                                   'deciduous broadleaf trees ',           & !  7
+                                   'tall grass                ',           & !  8
+                                   'desert                    ',           & !  9
+                                   'tundra                    ',           & ! 10
+                                   'irrigated crops           ',           & ! 11
+                                   'semidesert                ',           & ! 12
+                                   'ice caps and glaciers     ',           & ! 13
+                                   'bogs and marshes          ',           & ! 14
+                                   'evergreen shrubs          ',           & ! 15
+                                   'deciduous shrubs          ',           & ! 16
+                                   'mixed forest/woodland     ',           & ! 17
+                                   'interrupted forest        '            & ! 18
+                                                                 /)
+
+!
+!-- Soil model classes (soil_type)
+    CHARACTER(12), DIMENSION(0:6), PARAMETER :: soil_type_name = (/ &
+                                   'user defined',                  & ! 0 
+                                   'coarse      ',                  & ! 1
+                                   'medium      ',                  & ! 2
+                                   'medium-fine ',                  & ! 3
+                                   'fine        ',                  & ! 4
+                                   'very fine   ',                  & ! 5
+                                   'organic     '                   & ! 6
+                                                                 /)
+
+!
+!-- Pavement classes
+    CHARACTER(29), DIMENSION(0:15), PARAMETER :: pavement_type_name = (/ &
+                                   'user defined                 ', & ! 0 
+                                   'asphalt/concrete mix         ', & ! 1
+                                   'asphalt (asphalt concrete)   ', & ! 2
+                                   'concrete (Portland concrete) ', & ! 3
+                                   'sett                         ', & ! 4
+                                   'paving stones                ', & ! 5
+                                   'cobblestone                  ', & ! 6
+                                   'metal                        ', & ! 7
+                                   'wood                         ', & ! 8
+                                   'gravel                       ', & ! 9
+                                   'fine gravel                  ', & ! 10
+                                   'pebblestone                  ', & ! 11
+                                   'woodchips                    ', & ! 12
+                                   'tartan (sports)              ', & ! 13
+                                   'artifical turf (sports)      ', & ! 14
+                                   'clay (sports)                '  & ! 15
+                                                                 /)                                                              
+                                                                 
+!
+!-- Water classes
+    CHARACTER(12), DIMENSION(0:5), PARAMETER :: water_type_name = (/ &
+                                   'user defined',                   & ! 0 
+                                   'lake        ',                   & ! 1
+                                   'river       ',                   & ! 2
+                                   'ocean       ',                   & ! 3
+                                   'pond        ',                   & ! 4
+                                   'fountain    '                    & ! 5
+                                                                  /)                                                                                  
+                    
+!
+!-- Land surface parameters according to the respective classes (vegetation_type)
+    INTEGER(iwp) ::  ind_v_rc_min = 0    !< index for r_canopy_min in vegetation_pars
+    INTEGER(iwp) ::  ind_v_rc_lai = 1    !< index for LAI in vegetation_pars
+    INTEGER(iwp) ::  ind_v_c_veg   = 2   !< index for c_veg in vegetation_pars
+    INTEGER(iwp) ::  ind_v_gd  = 3       !< index for g_d in vegetation_pars
+    INTEGER(iwp) ::  ind_v_z0 = 4        !< index for z0 in vegetation_pars
+    INTEGER(iwp) ::  ind_v_z0qh = 5      !< index for z0h / z0q in vegetation_pars
+    INTEGER(iwp) ::  ind_v_lambda_s = 6  !< index for lambda_s_s in vegetation_pars
+    INTEGER(iwp) ::  ind_v_lambda_u = 7  !< index for lambda_s_u in vegetation_pars
+    INTEGER(iwp) ::  ind_v_f_sw_in = 8   !< index for f_sw_in in vegetation_pars
+    INTEGER(iwp) ::  ind_v_c_surf = 9    !< index for c_surface in vegetation_pars
+    INTEGER(iwp) ::  ind_v_at = 10       !< index for albedo_type in vegetation_pars
+    INTEGER(iwp) ::  ind_v_emis = 11     !< index for emissivity in vegetation_pars
+
+    INTEGER(iwp) ::  ind_w_temp     = 0    !< index for temperature in water_pars
+    INTEGER(iwp) ::  ind_w_z0       = 1    !< index for z0 in water_pars
+    INTEGER(iwp) ::  ind_w_z0h      = 2    !< index for z0h in water_pars
+    INTEGER(iwp) ::  ind_w_lambda_s = 3    !< index for lambda_s_s in water_pars
+    INTEGER(iwp) ::  ind_w_lambda_u = 4    !< index for lambda_s_u in water_pars
+    INTEGER(iwp) ::  ind_w_at       = 5    !< index for albedo type in water_pars
+    INTEGER(iwp) ::  ind_w_emis     = 6    !< index for emissivity in water_pars
+
+    INTEGER(iwp) ::  ind_p_z0       = 0    !< index for z0 in pavement_pars
+    INTEGER(iwp) ::  ind_p_z0h      = 1    !< index for z0h in pavement_pars
+    INTEGER(iwp) ::  ind_p_at       = 2    !< index for albedo type in pavement_pars
+    INTEGER(iwp) ::  ind_p_emis     = 3    !< index for emissivity in pavement_pars
+    INTEGER(iwp) ::  ind_p_lambda_h = 0    !< index for lambda_h in pavement_subsurface_pars
+    INTEGER(iwp) ::  ind_p_rho_c    = 1    !< index for rho_c in pavement_pars
+!
+!-- Land surface parameters
+!-- r_canopy_min,     lai,   c_veg,     g_d         z0,         z0h, lambda_s_s, lambda_s_u, f_sw_in,  c_surface, albedo_type, emissivity
+    REAL(wp), DIMENSION(0:11,1:18), PARAMETER :: vegetation_pars = RESHAPE( (/ &
+          0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp,  0.005_wp,   0.5E-4_wp,     0.0_wp,    0.0_wp, 0.00_wp, 0.00_wp, 17.0_wp, 0.94_wp, & !  1
+        180.0_wp, 3.00_wp, 1.00_wp, 0.00_wp,   0.10_wp,    0.001_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  2.0_wp, 0.95_wp, & !  2
+        110.0_wp, 2.00_wp, 1.00_wp, 0.00_wp,   0.03_wp,   0.3E-4_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  2.0_wp, 0.95_wp, & !  3
+        500.0_wp, 5.00_wp, 1.00_wp, 0.03_wp,   2.00_wp,     2.00_wp,    20.0_wp,   15.0_wp, 0.03_wp, 0.00_wp,  5.0_wp, 0.97_wp, & !  4
+        500.0_wp, 5.00_wp, 1.00_wp, 0.03_wp,   2.00_wp,     2.00_wp,    20.0_wp,   15.0_wp, 0.03_wp, 0.00_wp,  6.0_wp, 0.97_wp, & !  5
+        175.0_wp, 5.00_wp, 1.00_wp, 0.03_wp,   2.00_wp,     2.00_wp,    20.0_wp,   15.0_wp, 0.03_wp, 0.00_wp,  8.0_wp, 0.97_wp, & !  6
+        240.0_wp, 6.00_wp, 0.99_wp, 0.13_wp,   2.00_wp,     2.00_wp,    20.0_wp,   15.0_wp, 0.03_wp, 0.00_wp,  9.0_wp, 0.97_wp, & !  7
+        100.0_wp, 2.00_wp, 0.70_wp, 0.00_wp,   0.47_wp,  0.47E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  8.0_wp, 0.97_wp, & !  8
+        250.0_wp, 0.05_wp, 0.00_wp, 0.00_wp,  0.013_wp, 0.013E-2_wp,    15.0_wp,   15.0_wp, 0.00_wp, 0.00_wp,  3.0_wp, 0.94_wp, & !  9
+         80.0_wp, 1.00_wp, 0.50_wp, 0.00_wp,  0.034_wp, 0.034E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp, 11.0_wp, 0.97_wp, & ! 10
+        180.0_wp, 3.00_wp, 1.00_wp, 0.00_wp,    0.5_wp,  0.50E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp, 13.0_wp, 0.97_wp, & ! 11
+        150.0_wp, 0.50_wp, 0.10_wp, 0.00_wp,   0.17_wp,  0.17E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  2.0_wp, 0.97_wp, & ! 12
+          0.0_wp, 0.00_wp, 0.00_wp, 0.00_wp, 1.3E-3_wp,   1.3E-4_wp,    58.0_wp,   58.0_wp, 0.00_wp, 0.00_wp, 11.0_wp, 0.97_wp, & ! 13
+        240.0_wp, 4.00_wp, 0.60_wp, 0.00_wp,   0.83_wp,  0.83E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  4.0_wp, 0.97_wp, & ! 14
+        225.0_wp, 3.00_wp, 0.50_wp, 0.00_wp,   0.10_wp,  0.10E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  4.0_wp, 0.97_wp, & ! 15
+        225.0_wp, 1.50_wp, 0.50_wp, 0.00_wp,   0.25_wp,  0.25E-2_wp,    10.0_wp,   10.0_wp, 0.05_wp, 0.00_wp,  4.0_wp, 0.97_wp, & ! 16
+        250.0_wp, 5.00_wp, 1.00_wp, 0.03_wp,   2.00_wp,     2.00_wp,    20.0_wp,   15.0_wp, 0.03_wp, 0.00_wp,  7.0_wp, 0.97_wp, & ! 17
+        175.0_wp, 2.50_wp, 1.00_wp, 0.03_wp,   1.10_wp,     1.10_wp,    20.0_wp,   15.0_wp, 0.03_wp, 0.00_wp,  8.0_wp, 0.97_wp  & ! 18
+                                                               /), (/ 12, 18 /) )
+
+                                    
+!
+!-- Root distribution for default soil layer configuration (sum = 1)
+!--                                level 1 - level 4 according to zs_ref
+    REAL(wp), DIMENSION(0:3,1:18), PARAMETER :: root_distribution = RESHAPE( (/ &
+                                 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp,            & !  1
+                                 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp,            & !  2
+                                 0.35_wp, 0.38_wp, 0.23_wp, 0.04_wp,            & !  3
+                                 0.26_wp, 0.39_wp, 0.29_wp, 0.06_wp,            & !  4
+                                 0.26_wp, 0.38_wp, 0.29_wp, 0.07_wp,            & !  5
+                                 0.24_wp, 0.38_wp, 0.31_wp, 0.07_wp,            & !  6
+                                 0.25_wp, 0.34_wp, 0.27_wp, 0.14_wp,            & !  7
+                                 0.27_wp, 0.27_wp, 0.27_wp, 0.09_wp,            & !  8
+                                 1.00_wp, 0.00_wp, 0.00_wp, 0.00_wp,            & !  9
+                                 0.47_wp, 0.45_wp, 0.08_wp, 0.00_wp,            & ! 10
+                                 0.24_wp, 0.41_wp, 0.31_wp, 0.04_wp,            & ! 11
+                                 0.17_wp, 0.31_wp, 0.33_wp, 0.19_wp,            & ! 12
+                                 0.00_wp, 0.00_wp, 0.00_wp, 0.00_wp,            & ! 13
+                                 0.25_wp, 0.34_wp, 0.27_wp, 0.11_wp,            & ! 14
+                                 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp,            & ! 15 
+                                 0.23_wp, 0.36_wp, 0.30_wp, 0.11_wp,            & ! 16 
+                                 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp,            & ! 17
+                                 0.19_wp, 0.35_wp, 0.36_wp, 0.10_wp             & ! 18
+                                 /), (/ 4, 18 /) )
+
+!
+!-- Soil parameters according to the following porosity classes (soil_type)
+
+!
+!-- Soil parameters  alpha_vg,      l_vg,    n_vg, gamma_w_sat,    m_sat,     m_fc,   m_wilt,    m_res 
+    REAL(wp), DIMENSION(0:7,1:6), PARAMETER :: soil_pars = RESHAPE( (/     &
+                      3.83_wp,  1.250_wp, 1.38_wp,  6.94E-6_wp, 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp,& ! 1
+                      3.14_wp, -2.342_wp, 1.28_wp,  1.16E-6_wp, 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp,& ! 2
+                      0.83_wp, -0.588_wp, 1.25_wp,  0.26E-6_wp, 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp,& ! 3
+                      3.67_wp, -1.977_wp, 1.10_wp,  2.87E-6_wp, 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp,& ! 4
+                      2.65_wp,  2.500_wp, 1.10_wp,  1.74E-6_wp, 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp,& ! 5
+                      1.30_wp,  0.400_wp, 1.20_wp,  0.93E-6_wp, 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp & ! 6
+                                                                     /), (/ 8, 6 /) )
+
+
+!
+!-- TO BE FILLED
+!-- Pavement parameters      z0,       z0h, albedo_type, emissivity  
+    REAL(wp), DIMENSION(0:3,1:15), PARAMETER :: pavement_pars = RESHAPE( (/ &
+                      5.0E-2_wp, 5.0E-4_wp,     18.0_wp,    0.97_wp,  & !  1
+                      5.0E-2_wp, 5.0E-4_wp,     19.0_wp,    0.94_wp,  & !  2
+                      1.0E-2_wp, 1.0E-4_wp,     20.0_wp,    0.98_wp,  & !  3                                  
+                      1.0E-2_wp, 1.0E-4_wp,     21.0_wp,    0.93_wp,  & !  4
+                      1.0E-2_wp, 1.0E-4_wp,     22.0_wp,    0.97_wp,  & !  5
+                      1.0E-2_wp, 1.0E-4_wp,     23.0_wp,    0.97_wp,  & !  6
+                      1.0E-2_wp, 1.0E-4_wp,     24.0_wp,    0.97_wp,  & !  7
+                      1.0E-2_wp, 1.0E-4_wp,     25.0_wp,    0.94_wp,  & !  8
+                      1.0E-2_wp, 1.0E-4_wp,     26.0_wp,    0.98_wp,  & !  9                                  
+                      1.0E-2_wp, 1.0E-4_wp,     27.0_wp,    0.93_wp,  & ! 10
+                      1.0E-2_wp, 1.0E-4_wp,     28.0_wp,    0.97_wp,  & ! 11
+                      1.0E-2_wp, 1.0E-4_wp,     29.0_wp,    0.97_wp,  & ! 12
+                      1.0E-2_wp, 1.0E-4_wp,     30.0_wp,    0.97_wp,  & ! 13
+                      1.0E-2_wp, 1.0E-4_wp,     31.0_wp,    0.94_wp,  & ! 14
+                      1.0E-2_wp, 1.0E-4_wp,     32.0_wp,    0.98_wp   & ! 15
+                      /), (/ 4, 15 /) )                             
+!
+!-- Pavement subsurface parameters part 1: thermal conductivity (W/m/K)
+!--   0.0-0.01, 0.01-0.03, 0.03-0.07, 0.07-0.15, 0.15-0.30, 0.30-0.50,    0.50-1.25,    1.25-3.00
+    REAL(wp), DIMENSION(0:7,1:15), PARAMETER :: pavement_subsurface_pars_1 = RESHAPE( (/ &
+       0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp, 9999999.9_wp, 9999999.9_wp, & !  1
+       0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp,   0.75_wp, 9999999.9_wp, 9999999.9_wp, & !  2
+       0.89_wp,   0.89_wp,   0.89_wp,   0.89_wp,   0.89_wp,   0.89_wp, 9999999.9_wp, 9999999.9_wp, & !  3
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  4
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  5
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  6
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  7
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & !  8
+       0.70_wp,   0.70_wp,   0.70_wp,   0.70_wp,   0.70_wp,   0.70_wp, 9999999.9_wp, 9999999.9_wp, & !  9
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 10
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 11
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 12
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 13
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp, & ! 14
+       1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp,   1.00_wp, 9999999.9_wp, 9999999.9_wp  & ! 15
+       /), (/ 8, 15 /) )
+
+!
+!-- Pavement subsurface parameters part 2: volumetric heat capacity (J/m3/K)
+!--     0.0-0.01, 0.01-0.03, 0.03-0.07, 0.07-0.15, 0.15-0.30, 0.30-0.50,    0.50-1.25,    1.25-3.00
+    REAL(wp), DIMENSION(0:7,1:15), PARAMETER :: pavement_subsurface_pars_2 = RESHAPE( (/ &
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  1
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  2
+       1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 1.76E6_wp, 9999999.9_wp, 9999999.9_wp, & !  3
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  4
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  5
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  6
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  7
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  8
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & !  9
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & ! 10
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & ! 11
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & ! 12
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & ! 13
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp, & ! 14
+       1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 1.94E6_wp, 9999999.9_wp, 9999999.9_wp  & ! 15
+                           /), (/ 8, 15 /) )
+ 
+!
+!-- TO BE FILLED
+!-- Water parameters                    temperature,     z0,      z0h, albedo_type, emissivity,
+    REAL(wp), DIMENSION(0:6,1:5), PARAMETER :: water_pars = RESHAPE( (/ &
+       283.0_wp, 0.01_wp, 0.001_wp, 1.0E10_wp, 1.0E10_wp, 1.0_wp, 0.99_wp, & ! 1
+       283.0_wp, 0.01_wp, 0.001_wp, 1.0E10_wp, 1.0E10_wp, 1.0_wp, 0.99_wp, & ! 2
+       283.0_wp, 0.01_wp, 0.001_wp, 1.0E10_wp, 1.0E10_wp, 1.0_wp, 0.99_wp, & ! 3
+       283.0_wp, 0.01_wp, 0.001_wp, 1.0E10_wp, 1.0E10_wp, 1.0_wp, 0.99_wp, & ! 4
+       283.0_wp, 0.01_wp, 0.001_wp, 1.0E10_wp, 1.0E10_wp, 1.0_wp, 0.99_wp  & ! 5
+                                                                     /), (/ 7, 5 /) )                                                                   
+                                                                                                                                      
+    SAVE
+
+
+    PRIVATE
+
+    
+!
+!-- Public functions
+    PUBLIC lsm_boundary_condition, lsm_check_data_output,                      &
+           lsm_check_data_output_pr,                                           &
+           lsm_check_parameters, lsm_define_netcdf_grid, lsm_3d_data_averaging,& 
+           lsm_data_output_2d, lsm_data_output_3d, lsm_energy_balance,         &
+           lsm_header, lsm_init, lsm_init_arrays, lsm_parin, lsm_soil_model,   &
+           lsm_swap_timelevel, lsm_rrd_local, lsm_wrd_local
+! !vegetat
+!-- Public parameters, constants and initial values
+    PUBLIC aero_resist_kray, skip_time_do_lsm
+
+!
+!-- Public grid variables
+    PUBLIC nzb_soil, nzs, nzt_soil, zs
+
+!
+!-- Public prognostic variables
+    PUBLIC m_soil_h, t_soil_h
+
+    INTERFACE lsm_boundary_condition
+       MODULE PROCEDURE lsm_boundary_condition
+    END INTERFACE lsm_boundary_condition
+
+    INTERFACE lsm_check_data_output
+       MODULE PROCEDURE lsm_check_data_output
+    END INTERFACE lsm_check_data_output
+    
+    INTERFACE lsm_check_data_output_pr
+       MODULE PROCEDURE lsm_check_data_output_pr
+    END INTERFACE lsm_check_data_output_pr
+    
+    INTERFACE lsm_check_parameters
+       MODULE PROCEDURE lsm_check_parameters
+    END INTERFACE lsm_check_parameters
+    
+    INTERFACE lsm_3d_data_averaging
+       MODULE PROCEDURE lsm_3d_data_averaging
+    END INTERFACE lsm_3d_data_averaging
+
+    INTERFACE lsm_data_output_2d
+       MODULE PROCEDURE lsm_data_output_2d
+    END INTERFACE lsm_data_output_2d
+
+    INTERFACE lsm_data_output_3d
+       MODULE PROCEDURE lsm_data_output_3d
+    END INTERFACE lsm_data_output_3d
+
+    INTERFACE lsm_define_netcdf_grid
+       MODULE PROCEDURE lsm_define_netcdf_grid
+    END INTERFACE lsm_define_netcdf_grid
+
+    INTERFACE lsm_energy_balance
+       MODULE PROCEDURE lsm_energy_balance
+    END INTERFACE lsm_energy_balance
+
+    INTERFACE lsm_header
+       MODULE PROCEDURE lsm_header
+    END INTERFACE lsm_header
+    
+    INTERFACE lsm_init
+       MODULE PROCEDURE lsm_init
+    END INTERFACE lsm_init
+
+    INTERFACE lsm_init_arrays
+       MODULE PROCEDURE lsm_init_arrays
+    END INTERFACE lsm_init_arrays
+    
+    INTERFACE lsm_parin
+       MODULE PROCEDURE lsm_parin
+    END INTERFACE lsm_parin
+    
+    INTERFACE lsm_soil_model
+       MODULE PROCEDURE lsm_soil_model
+    END INTERFACE lsm_soil_model
+
+    INTERFACE lsm_swap_timelevel
+       MODULE PROCEDURE lsm_swap_timelevel
+    END INTERFACE lsm_swap_timelevel
+
+    INTERFACE lsm_rrd_local
+       MODULE PROCEDURE lsm_rrd_local
+    END INTERFACE lsm_rrd_local
+
+    INTERFACE lsm_wrd_local
+       MODULE PROCEDURE lsm_wrd_local
+    END INTERFACE lsm_wrd_local
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Set internal Neumann boundary condition at outer soil grid points 
+!> for temperature and humidity. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_boundary_condition
+ 
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i      !< grid index x-direction
+    INTEGER(iwp) :: ioff   !< offset index x-direction indicating location of soil grid point
+    INTEGER(iwp) :: j      !< grid index y-direction
+    INTEGER(iwp) :: joff   !< offset index x-direction indicating location of soil grid point
+    INTEGER(iwp) :: k      !< grid index z-direction
+    INTEGER(iwp) :: koff   !< offset index x-direction indicating location of soil grid point
+    INTEGER(iwp) :: l      !< running index surface-orientation
+    INTEGER(iwp) :: m      !< running index surface elements
+
+    koff = surf_lsm_h%koff
+    DO  m = 1, surf_lsm_h%ns
+       i = surf_lsm_h%i(m)
+       j = surf_lsm_h%j(m)
+       k = surf_lsm_h%k(m)
+       pt(k+koff,j,i) = pt(k,j,i)
+    ENDDO
+
+    DO  l = 0, 3
+       ioff = surf_lsm_v(l)%ioff
+       joff = surf_lsm_v(l)%joff
+       DO  m = 1, surf_lsm_v(l)%ns
+          i = surf_lsm_v(l)%i(m)
+          j = surf_lsm_v(l)%j(m)
+          k = surf_lsm_v(l)%k(m)
+          pt(k,j+joff,i+ioff) = pt(k,j,i)
+       ENDDO
+    ENDDO
+!
+!-- In case of humidity, set boundary conditions also for q and vpt.
+    IF ( humidity )  THEN
+       koff = surf_lsm_h%koff
+       DO  m = 1, surf_lsm_h%ns
+          i = surf_lsm_h%i(m)
+          j = surf_lsm_h%j(m)
+          k = surf_lsm_h%k(m)
+          q(k+koff,j,i)   = q(k,j,i)
+          vpt(k+koff,j,i) = vpt(k,j,i)
+       ENDDO
+
+       DO  l = 0, 3
+          ioff = surf_lsm_v(l)%ioff
+          joff = surf_lsm_v(l)%joff
+          DO  m = 1, surf_lsm_v(l)%ns
+             i = surf_lsm_v(l)%i(m)
+             j = surf_lsm_v(l)%j(m)
+             k = surf_lsm_v(l)%k(m)
+             q(k,j+joff,i+ioff)   = q(k,j,i)
+             vpt(k,j+joff,i+ioff) = vpt(k,j,i)
+          ENDDO
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE lsm_boundary_condition
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for land surface model
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_check_data_output( var, unit, i, ilen, k )
+ 
+ 
+    USE control_parameters,                                                    &
+        ONLY:  data_output, message_string
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit  !< 
+    CHARACTER (LEN=*) ::  var   !<
+
+    INTEGER(iwp) :: i
+    INTEGER(iwp) :: ilen   
+    INTEGER(iwp) :: k
+
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'm_soil' )
+          IF (  .NOT.  land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                      'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'm3/m3'
+           
+       CASE ( 't_soil' )
+          IF (  .NOT.  land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                      'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'K'   
+             
+       CASE ( 'lai*', 'c_liq*', 'c_soil*', 'c_veg*', 'm_liq*',                 &
+              'qsws_liq*', 'qsws_soil*', 'qsws_veg*', 'r_s*' )
+          IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
+             message_string = 'illegal value for data_output: "' //            &
+                              TRIM( var ) // '" & only 2d-horizontal ' //      &
+                              'cross sections are allowed for this value'
+             CALL message( 'lsm_check_data_output', 'PA0111', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'lai*'  .AND.  .NOT.  land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'c_liq*'  .AND.  .NOT.  land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'c_soil*'  .AND.  .NOT.  land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'c_veg*'  .AND.  .NOT. land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'm_liq*'  .AND.  .NOT.  land_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'qsws_liq*'  .AND.  .NOT. land_surface )         &
+          THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'qsws_soil*'  .AND.  .NOT.  land_surface )       &
+          THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'qsws_veg*'  .AND.  .NOT. land_surface )         &
+          THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( TRIM( var ) == 'r_s*'  .AND.  .NOT.  land_surface )             &
+          THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //     &
+                              'res land_surface = .TRUE.'
+             CALL message( 'lsm_check_data_output', 'PA0404', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( TRIM( var ) == 'lai*'   )      unit = 'none' 
+          IF ( TRIM( var ) == 'c_liq*' )      unit = 'none'
+          IF ( TRIM( var ) == 'c_soil*')      unit = 'none'
+          IF ( TRIM( var ) == 'c_veg*' )      unit = 'none'
+          IF ( TRIM( var ) == 'm_liq*'     )  unit = 'm'
+          IF ( TRIM( var ) == 'qsws_liq*'  )  unit = 'W/m2'
+          IF ( TRIM( var ) == 'qsws_soil*' )  unit = 'W/m2'
+          IF ( TRIM( var ) == 'qsws_veg*'  )  unit = 'W/m2'
+          IF ( TRIM( var ) == 'r_s*')         unit = 's/m' 
+             
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+
+ END SUBROUTINE lsm_check_data_output
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output of profiles for land surface model
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_check_data_output_pr( variable, var_count, unit, dopr_unit )
+ 
+    USE control_parameters,                                                    &
+        ONLY:  data_output_pr, message_string
+
+    USE indices
+
+    USE profil_parameter
+
+    USE statistics
+
+    IMPLICIT NONE
+   
+    CHARACTER (LEN=*) ::  unit      !< 
+    CHARACTER (LEN=*) ::  variable  !< 
+    CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
+ 
+    INTEGER(iwp) ::  var_count     !< 
+
+    SELECT CASE ( TRIM( variable ) )
+       
+       CASE ( 't_soil', '#t_soil' )
+          IF (  .NOT.  land_surface )  THEN
+             message_string = 'data_output_pr = ' //                           &
+                              TRIM( data_output_pr(var_count) ) // ' is' //    &
+                              'not implemented for land_surface = .FALSE.'
+             CALL message( 'lsm_check_data_output_pr', 'PA0402', 1, 2, 0, 6, 0 )
+          ELSE
+             dopr_index(var_count) = 89
+             dopr_unit     = 'K'
+             hom(0:nzs-1,2,89,:)  = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 )
+             IF ( data_output_pr(var_count)(1:1) == '#' )  THEN
+                dopr_initial_index(var_count) = 90
+                hom(0:nzs-1,2,90,:)   = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 )
+                data_output_pr(var_count)     = data_output_pr(var_count)(2:)
+             ENDIF
+             unit = dopr_unit
+          ENDIF
+
+       CASE ( 'm_soil', '#m_soil' )
+          IF (  .NOT.  land_surface )  THEN
+             message_string = 'data_output_pr = ' //                           &
+                              TRIM( data_output_pr(var_count) ) // ' is' //    &
+                              ' not implemented for land_surface = .FALSE.'
+             CALL message( 'lsm_check_data_output_pr', 'PA0402', 1, 2, 0, 6, 0 )
+          ELSE
+             dopr_index(var_count) = 91
+             dopr_unit     = 'm3/m3'
+             hom(0:nzs-1,2,91,:)  = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 )
+             IF ( data_output_pr(var_count)(1:1) == '#' )  THEN
+                dopr_initial_index(var_count) = 92
+                hom(0:nzs-1,2,92,:)   = SPREAD( - zs(nzb_soil:nzt_soil), 2, statistic_regions+1 )
+                data_output_pr(var_count)     = data_output_pr(var_count)(2:)
+             ENDIF
+             unit = dopr_unit
+          ENDIF
+
+
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+
+ END SUBROUTINE lsm_check_data_output_pr
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for land surface model
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_check_parameters
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_pt_b, bc_q_b, constant_flux_layer, message_string,           &
+               most_method
+                     
+    
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  k        !< running index, z-dimension
+
+!
+!-- Check for a valid setting of surface_type. The default value is 'netcdf'.
+!-- In that case, the surface types are read from NetCDF file
+    IF ( TRIM( surface_type ) /= 'vegetation'  .AND.                           &
+         TRIM( surface_type ) /= 'pavement'    .AND.                           &
+         TRIM( surface_type ) /= 'water'       .AND.                           &
+         TRIM( surface_type ) /= 'netcdf' )  THEN  
+       message_string = 'unknown surface type: surface_type = "' //            &
+                        TRIM( surface_type ) // '"'
+       CALL message( 'lsm_check_parameters', 'PA0019', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Dirichlet boundary conditions are required as the surface fluxes are
+!-- calculated from the temperature/humidity gradients in the land surface
+!-- model
+    IF ( bc_pt_b == 'neumann'  .OR.  bc_q_b == 'neumann' )  THEN
+       message_string = 'lsm requires setting of'//                            &
+                        'bc_pt_b = "dirichlet" and '//                         &
+                        'bc_q_b  = "dirichlet"'
+       CALL message( 'lsm_check_parameters', 'PA0399', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF (  .NOT.  constant_flux_layer )  THEN
+       message_string = 'lsm requires '//                                      &
+                        'constant_flux_layer = .T.'
+       CALL message( 'lsm_check_parameters', 'PA0400', 1, 2, 0, 6, 0 )
+    ENDIF
+    
+    IF (  .NOT.  radiation )  THEN
+       message_string = 'lsm requires '//                                      &
+                        'the radiation model to be switched on'
+       CALL message( 'lsm_check_parameters', 'PA0400', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( TRIM( surface_type ) == 'vegetation' )  THEN
+    
+       IF ( vegetation_type == 0 )  THEN
+          IF ( min_canopy_resistance == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user defined)'//           &
+                              'requires setting of min_canopy_resistance'//    &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( leaf_area_index == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of leaf_area_index'//          &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( vegetation_coverage == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of vegetation_coverage'//      &
+                              '/= 9999999.9'
+                CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( canopy_resistance_coefficient == 9999999.9_wp)  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of'//                          &
+                              'canopy_resistance_coefficient /= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( lambda_surface_stable == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of lambda_surface_stable'//    &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( lambda_surface_unstable == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of lambda_surface_unstable'//  &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( f_shortwave_incoming == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of f_shortwave_incoming'//     &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( z0_vegetation == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of z0_vegetation'//            &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( z0h_vegetation == 9999999.9_wp )  THEN
+             message_string = 'vegetation_type = 0 (user_defined)'//           &
+                              'requires setting of z0h_vegetation'//           &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       IF ( vegetation_type == 1 )  THEN
+          IF ( vegetation_coverage /= 9999999.9_wp  .AND.  vegetation_coverage &
+               /= 0.0_wp )  THEN
+             message_string = 'vegetation_type = 1 (bare soil)'//              &
+                              ' requires vegetation_coverage = 0'
+             CALL message( 'lsm_check_parameters', 'PA0294', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+  
+    ENDIF
+    
+    IF ( TRIM( surface_type ) == 'water' )  THEN
+
+       IF ( TRIM( most_method ) == 'lookup' )  THEN    
+          WRITE( message_string, * ) 'surface_type = ', surface_type,          &
+                                     ' is not allowed in combination with ',   &
+                                     'most_method = ', most_method
+          CALL message( 'lsm_check_parameters', 'PA0414', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( water_type == 0 )  THEN  
+       
+          IF ( z0_water == 9999999.9_wp )  THEN
+             message_string = 'water_type = 0 (user_defined)'//                &
+                              'requires setting of z0_water'//                 &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0415', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( z0h_water == 9999999.9_wp )  THEN
+             message_string = 'water_type = 0 (user_defined)'//                &
+                              'requires setting of z0h_water'//                &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0392', 1, 2, 0, 6, 0 )
+          ENDIF
+          
+          IF ( water_temperature == 9999999.9_wp )  THEN
+             message_string = 'water_type = 0 (user_defined)'//                &
+                              'requires setting of water_temperature'//        &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0379', 1, 2, 0, 6, 0 )
+          ENDIF       
+          
+       ENDIF
+       
+    ENDIF
+    
+    IF ( TRIM( surface_type ) == 'pavement' )  THEN
+
+       IF ( ANY( dz_soil /= 9999999.9_wp )  .AND.  pavement_type /= 0 )  THEN
+          message_string = 'non-default setting of dz_soil '//                  &
+                           'does not allow to use pavement_type /= 0)'
+             CALL message( 'lsm_check_parameters', 'PA0341', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       IF ( pavement_type == 0 )  THEN  
+       
+          IF ( z0_pavement == 9999999.9_wp )  THEN
+             message_string = 'pavement_type = 0 (user_defined)'//             &
+                              'requires setting of z0_pavement'//              &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0352', 1, 2, 0, 6, 0 )
+          ENDIF
+          
+          IF ( z0h_pavement == 9999999.9_wp )  THEN
+             message_string = 'pavement_type = 0 (user_defined)'//             &
+                              'requires setting of z0h_pavement'//             &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0353', 1, 2, 0, 6, 0 )
+          ENDIF
+          
+          IF ( pavement_heat_conduct == 9999999.9_wp )  THEN
+             message_string = 'pavement_type = 0 (user_defined)'//             &
+                              'requires setting of pavement_heat_conduct'//    &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0342', 1, 2, 0, 6, 0 )
+          ENDIF 
+          
+           IF ( pavement_heat_capacity == 9999999.9_wp )  THEN
+             message_string = 'pavement_type = 0 (user_defined)'//             &
+                              'requires setting of pavement_heat_capacity'//   &
+                              '/= 9999999.9'
+             CALL message( 'lsm_check_parameters', 'PA0139', 1, 2, 0, 6, 0 )
+          ENDIF 
+
+          IF ( pavement_depth_level == 0 )  THEN
+             message_string = 'pavement_type = 0 (user_defined)'//             &
+                              'requires setting of pavement_depth_level'//     &
+                              '/= 0'
+             CALL message( 'lsm_check_parameters', 'PA0474', 1, 2, 0, 6, 0 )
+          ENDIF 
+
+       ENDIF 
+    
+    ENDIF
+
+    IF ( TRIM( surface_type ) == 'netcdf' )  THEN
+       IF ( ANY( water_type_f%var /= water_type_f%fill )  .AND.                &
+            TRIM( most_method ) == 'lookup' )  THEN    
+          WRITE( message_string, * ) 'water-surfaces are not allowed in ' //   &
+                                     'combination with most_method = ',        &
+                                     TRIM( most_method )
+          CALL message( 'lsm_check_parameters', 'PA0999', 2, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    MS: Some problme here, after calling message everythings stucks at
+!--        MPI_FINALIZE call. 
+       IF ( ANY( pavement_type_f%var /= pavement_type_f%fill )  .AND.           &
+            ANY( dz_soil /= 9999999.9_wp ) )  THEN
+          message_string = 'pavement-surfaces are not allowed in ' //           &
+                           'combination with a non-default setting of dz_soil'
+          CALL message( 'lsm_check_parameters', 'PA0999', 2, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+    
+!
+!-- Temporary message as long as NetCDF input is not available
+    IF ( TRIM( surface_type ) == 'netcdf'  .AND.  .NOT.  input_pids_static )   &
+    THEN
+       message_string = 'surface_type = netcdf requires static input file.'
+       CALL message( 'lsm_check_parameters', 'PA0465', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( soil_type == 0 )  THEN
+
+       IF ( alpha_vangenuchten == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of alpha_vangenuchten'//          &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( l_vangenuchten == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of l_vangenuchten'//              &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( n_vangenuchten == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of n_vangenuchten'//              &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( hydraulic_conductivity == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of hydraulic_conductivity'//      &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( saturation_moisture == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of saturation_moisture'//         &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( field_capacity == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of field_capacity'//              &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( wilting_point == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of wilting_point'//               &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( residual_moisture == 9999999.9_wp )  THEN
+          message_string = 'soil_type = 0 (user_defined)'//                    &
+                           'requires setting of residual_moisture'//           &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0403', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ENDIF
+
+
+!!! these checks are not needed for water surfaces??
+
+!
+!-- Determine number of soil layers to be used and check whether an appropriate
+!-- root fraction is prescribed
+    nzb_soil = 0
+    nzt_soil = -1
+    IF ( ALL( dz_soil == 9999999.9_wp ) )  THEN
+       nzt_soil = 7
+       dz_soil(nzb_soil:nzt_soil) = dz_soil_default
+    ELSE
+       DO k = 0, 19
+          IF ( dz_soil(k) /= 9999999.9_wp )  THEN
+             nzt_soil = nzt_soil + 1
+          ENDIF
+       ENDDO    
+    ENDIF
+    nzs = nzt_soil + 1
+
+!
+!-- Check whether valid soil temperatures are prescribed
+    IF ( COUNT( soil_temperature /= 9999999.9_wp ) /= nzs )  THEN
+       WRITE( message_string, * ) 'number of soil layers (', nzs, ') does not',&
+                                  ' match to the number of layers specified',  &
+                                  ' in soil_temperature (', COUNT(             &
+                                   soil_temperature /= 9999999.9_wp ), ')'
+          CALL message( 'lsm_check_parameters', 'PA0471', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( deep_soil_temperature == 9999999.9_wp ) THEN
+          message_string = 'deep_soil_temperature is not set but must be'//    &
+                           '/= 9999999.9'
+          CALL message( 'lsm_check_parameters', 'PA0472', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check whether the sum of all root fractions equals one
+    IF ( vegetation_type == 0 )  THEN
+       IF ( SUM( root_fraction(nzb_soil:nzt_soil) ) /= 1.0_wp )  THEN
+          message_string = 'vegetation_type = 0 (user_defined)'//              &
+                           'requires setting of root_fraction'//               &
+                           '/= 9999999.9 and SUM(root_fraction) = 1'
+          CALL message( 'lsm_check_parameters', 'PA0401', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF    
+    
+    
+!
+!-- Check for proper setting of soil moisture, must not be larger than its 
+!-- saturation value. 
+    DO  k = nzb_soil, nzt_soil
+       IF ( soil_moisture(k) > saturation_moisture )  THEN 
+          message_string = 'soil_moisture must not exceed its saturation' //    &
+                            ' value'
+          CALL message( 'lsm_check_parameters', 'PA0458', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDDO
+ 
+!
+!-- Calculate grid spacings. Temperature and moisture are defined at
+!-- the center of the soil layers, whereas gradients/fluxes are 
+!-- defined at the edges (_layer)
+!
+!-- Allocate global 1D arrays
+    ALLOCATE ( ddz_soil_center(nzb_soil:nzt_soil) )
+    ALLOCATE ( ddz_soil(nzb_soil:nzt_soil+1) )
+    ALLOCATE ( dz_soil_center(nzb_soil:nzt_soil) )
+    ALLOCATE ( zs(nzb_soil:nzt_soil+1) )
+
+
+    zs(nzb_soil) = 0.5_wp * dz_soil(nzb_soil)
+    zs_layer(nzb_soil) = dz_soil(nzb_soil)
+
+    DO  k = nzb_soil+1, nzt_soil
+       zs_layer(k) = zs_layer(k-1) + dz_soil(k)
+       zs(k) = (zs_layer(k) +  zs_layer(k-1)) * 0.5_wp
+    ENDDO
+
+    dz_soil(nzt_soil+1) = zs_layer(nzt_soil) + dz_soil(nzt_soil)
+    zs(nzt_soil+1) = zs_layer(nzt_soil) + 0.5_wp * dz_soil(nzt_soil)
+ 
+    DO  k = nzb_soil, nzt_soil-1
+       dz_soil_center(k) = zs(k+1) - zs(k)
+       IF ( dz_soil_center(k) <= 0.0_wp )  THEN
+          message_string = 'invalid soil layer configuration found ' //        &
+                           '(dz_soil_center(k) <= 0.0)'
+          CALL message( 'lsm_rrd_local', 'PA0140', 1, 2, 0, 6, 0 )
+       ENDIF  
+    ENDDO
+  
+    dz_soil_center(nzt_soil) = zs_layer(k-1) + dz_soil(k) - zs(nzt_soil)
+       
+    ddz_soil_center = 1.0_wp / dz_soil_center
+    ddz_soil(nzb_soil:nzt_soil) = 1.0_wp / dz_soil(nzb_soil:nzt_soil)
+
+
+
+ END SUBROUTINE lsm_check_parameters
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Solver for the energy balance at the surface.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_energy_balance( horizontal, l )
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i         !< running index
+    INTEGER(iwp) ::  i_off     !< offset to determine index of surface element, seen from atmospheric grid point, for x
+    INTEGER(iwp) ::  j         !< running index
+    INTEGER(iwp) ::  j_off     !< offset to determine index of surface element, seen from atmospheric grid point, for y
+    INTEGER(iwp) ::  k         !< running index
+    INTEGER(iwp) ::  k_off     !< offset to determine index of surface element, seen from atmospheric grid point, for z
+    INTEGER(iwp) ::  ks        !< running index
+    INTEGER(iwp) ::  l         !< surface-facing index
+    INTEGER(iwp) ::  m         !< running index concerning wall elements
+
+    LOGICAL      ::  horizontal !< Flag indicating horizontal or vertical surfaces
+
+    REAL(wp) :: c_surface_tmp,& !< temporary variable for storing the volumetric heat capacity of the surface
+                f1,          & !< resistance correction term 1
+                f2,          & !< resistance correction term 2
+                f3,          & !< resistance correction term 3
+                m_min,       & !< minimum soil moisture
+                e,           & !< water vapour pressure
+                e_s,         & !< water vapour saturation pressure
+                e_s_dt,      & !< derivate of e_s with respect to T
+                tend,        & !< tendency
+                dq_s_dt,     & !< derivate of q_s with respect to T
+                coef_1,      & !< coef. for prognostic equation
+                coef_2,      & !< coef. for prognostic equation
+                f_qsws,      & !< factor for qsws
+                f_qsws_veg,  & !< factor for qsws_veg
+                f_qsws_soil, & !< factor for qsws_soil
+                f_qsws_liq,  & !< factor for qsws_liq
+                f_shf,       & !< factor for shf
+                lambda_soil, & !< Thermal conductivity of the uppermost soil layer (W/m2/K)
+                lambda_surface, & !< Current value of lambda_surface (W/m2/K)
+                m_liq_max      !< maxmimum value of the liq. water reservoir
+
+    TYPE(surf_type_lsm), POINTER ::  surf_t_surface
+    TYPE(surf_type_lsm), POINTER ::  surf_t_surface_p
+    TYPE(surf_type_lsm), POINTER ::  surf_tt_surface_m
+    TYPE(surf_type_lsm), POINTER ::  surf_m_liq
+    TYPE(surf_type_lsm), POINTER ::  surf_m_liq_p
+    TYPE(surf_type_lsm), POINTER ::  surf_tm_liq_m
+
+    TYPE(surf_type_lsm), POINTER ::  surf_m_soil
+    TYPE(surf_type_lsm), POINTER ::  surf_t_soil
+
+    TYPE(surf_type), POINTER  ::  surf  !< surface-date type variable
+
+    IF ( horizontal )  THEN
+       surf              => surf_lsm_h
+
+       surf_t_surface    => t_surface_h
+       surf_t_surface_p  => t_surface_h_p
+       surf_tt_surface_m => tt_surface_h_m
+       surf_m_liq        => m_liq_h
+       surf_m_liq_p      => m_liq_h_p
+       surf_tm_liq_m     => tm_liq_h_m
+       surf_m_soil       => m_soil_h
+       surf_t_soil       => t_soil_h
+    ELSE
+       surf              => surf_lsm_v(l)
+
+       surf_t_surface    => t_surface_v(l)
+       surf_t_surface_p  => t_surface_v_p(l)
+       surf_tt_surface_m => tt_surface_v_m(l)
+       surf_m_liq        => m_liq_v(l)
+       surf_m_liq_p      => m_liq_v_p(l)
+       surf_tm_liq_m     => tm_liq_v_m(l)
+       surf_m_soil       => m_soil_v(l)
+       surf_t_soil       => t_soil_v(l)
+    ENDIF
+
+!
+!-- Index offset of surface element point with respect to adjoining 
+!-- atmospheric grid point 
+    k_off = surf%koff
+    j_off = surf%joff
+    i_off = surf%ioff
+
+    DO  m = 1, surf%ns
+
+       i   = surf%i(m)            
+       j   = surf%j(m)
+       k   = surf%k(m)
+
+!
+!--    Define heat conductivity between surface and soil depending on surface
+!--    type. For vegetation, a skin layer parameterization is used. The new
+!--    parameterization uses a combination of two conductivities: a constant
+!--    conductivity for the skin layer, and a conductivity according to the
+!--    uppermost soil layer. For bare soil and pavements, no skin layer is 
+!--    applied. In these cases, the temperature is assumed to be constant 
+!--    between the surface and the first soil layer. The heat conductivity is 
+!--    then derived from the soil/pavement properties. 
+!--    For water surfaces, the conductivity is already set to 1E10.
+!--    Moreover, the heat capacity is set. For bare soil the heat capacity is
+!--    the capacity of the uppermost soil layer, for pavement it is that of
+!--    the material involved.
+
+!
+!--    for vegetation type surfaces, the thermal conductivity of the soil is
+!--    needed
+
+       IF ( surf%vegetation_surface(m) )  THEN
+
+          lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat(nzb_soil,m)) *      &
+                         lambda_h_water ** surf_m_soil%var_2d(nzb_soil,m)
+                         
+          ke = 1.0_wp + LOG10( MAX( 0.1_wp, surf_m_soil%var_2d(nzb_soil,m) /   &
+                                                     surf%m_sat(nzb_soil,m) ) )                   
+                         
+          lambda_soil = (ke * (lambda_h_sat - lambda_h_dry) + lambda_h_dry )   &
+                           * ddz_soil(nzb_soil) * 2.0_wp
+
+!
+!--       When bare soil is set without a thermal conductivity (no skin layer),
+!--       a heat capacity is that of the soil layer, otherwise it is a
+!--       combination of the conductivities from the skin and the soil layer
+          IF ( surf%lambda_surface_s(m) == 0.0_wp )  THEN 
+            surf%c_surface(m) = (rho_c_soil * (1.0_wp - surf%m_sat(nzb_soil,m))&
+                              + rho_c_water * surf_m_soil%var_2d(nzb_soil,m) ) &
+                              * dz_soil(nzb_soil) * 0.5_wp    
+            lambda_surface = lambda_soil
+
+          ELSE IF ( surf_t_surface%var_1d(m) >= surf_t_soil%var_2d(nzb_soil,m))&
+          THEN
+             lambda_surface = surf%lambda_surface_s(m) * lambda_soil           &
+                              / ( surf%lambda_surface_s(m) + lambda_soil )
+          ELSE
+
+             lambda_surface = surf%lambda_surface_u(m) * lambda_soil           &
+                              / ( surf%lambda_surface_u(m) + lambda_soil )
+          ENDIF
+       ELSE
+          lambda_surface = surf%lambda_surface_s(m)
+       ENDIF
+
+!
+!--    Set heat capacity of the skin/surface. It is ususally zero when a skin
+!--    layer is used, and non-zero otherwise.
+       c_surface_tmp = surf%c_surface(m) 
+
+!
+!--    First step: calculate aerodyamic resistance. As pt, us, ts
+!--    are not available for the prognostic time step, data from the last
+!--    time step is used here. Note that this formulation is the
+!--    equivalent to the ECMWF formulation using drag coefficients
+!        IF ( bulk_cloud_model )  THEN
+!           pt1 = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
+!           qv1 = q(k,j,i) - ql(k,j,i)
+!        ELSEIF ( cloud_droplets ) THEN
+!           pt1 = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
+!           qv1 = q(k,j,i) 
+!        ELSE
+!           pt1 = pt(k,j,i)
+!           IF ( humidity )  THEN
+!              qv1 = q(k,j,i)
+!           ELSE
+!              qv1 = 0.0_wp
+!           ENDIF
+!        ENDIF
+!
+!--     Calculation of r_a for vertical surfaces
+!--
+!--     heat transfer coefficient for forced convection along vertical walls
+!--     follows formulation in TUF3d model (Krayenhoff & Voogt, 2006)
+!--            
+!--       H = httc (Tsfc - Tair)
+!--       httc = rw * (11.8 + 4.2 * Ueff) - 4.0
+!--            
+!--             rw: wall patch roughness relative to 1.0 for concrete
+!--             Ueff: effective wind speed
+!--             - 4.0 is a reduction of Rowley et al (1930) formulation based on
+!--             Cole and Sturrock (1977)
+!--           
+!--             Ucan: Canyon wind speed
+!--             wstar: convective velocity
+!--             Qs: surface heat flux
+!--             zH: height of the convective layer
+!--             wstar = (g/Tcan*Qs*zH)**(1./3.)
+                
+!--    Effective velocity components must always 
+!--    be defined at scalar grid point. The wall normal component is 
+!--    obtained by simple linear interpolation. ( An alternative would
+!--    be an logarithmic interpolation. )
+!--    A roughness lenght of 0.001 is assumed for concrete (the inverse,
+!--    1000 is used in the nominator for scaling)
+!--    To do: detailed investigation which approach gives more reliable results!
+!--    Please note, in case of very small friction velocity, e.g. in little 
+!--    holes, the resistance can become negative. For this reason, limit r_a 
+!--    to positive values. 
+       IF ( horizontal  .OR.  .NOT. aero_resist_kray )  THEN
+          surf%r_a(m) = ABS( ( surf%pt1(m) - surf%pt_surface(m) ) /            &
+                             ( surf%ts(m) * surf%us(m) + 1.0E-20_wp ) )
+       ELSE
+          surf%r_a(m) = rho_cp / ( surf%z0(m) * 1000.0_wp                      &
+                        * ( 11.8_wp + 4.2_wp *                                 &
+                        SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + &
+                                   ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + &
+                                   ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2,  &
+                              0.01_wp ) )                                      &
+                           )  - 4.0_wp  ) 
+       ENDIF
+!
+!--    Make sure that the resistance does not drop to zero for neutral 
+!--    stratification. Also, set a maximum resistance to avoid the breakdown of
+!--    MOST for locations with zero wind speed
+       IF ( surf%r_a(m) <   1.0_wp )  surf%r_a(m) =   1.0_wp
+       IF ( surf%r_a(m) > 300.0_wp )  surf%r_a(m) = 300.0_wp       
+!
+!--    Second step: calculate canopy resistance r_canopy
+!--    f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation
+ 
+!--    f1: correction for incoming shortwave radiation (stomata close at 
+!--    night)
+       f1 = MIN( 1.0_wp, ( 0.004_wp * surf%rad_sw_in(m) + 0.05_wp ) /          &
+                        (0.81_wp * (0.004_wp * surf%rad_sw_in(m)               &
+                         + 1.0_wp)) )
+
+!
+!--    f2: correction for soil moisture availability to plants (the 
+!--    integrated soil moisture must thus be considered here)
+!--    f2 = 0 for very dry soils
+       m_total = 0.0_wp
+       DO  ks = nzb_soil, nzt_soil
+           m_total = m_total + surf%root_fr(ks,m)                              &
+                     * MAX( surf_m_soil%var_2d(ks,m), surf%m_wilt(ks,m) )
+       ENDDO 
+
+!
+!--    The calculation of f2 is based on only one wilting point value for all
+!--    soil layers. The value at k=nzb_soil is used here as a proxy but might
+!--    need refinement in the future.
+       IF ( m_total > surf%m_wilt(nzb_soil,m)  .AND.                           &
+            m_total < surf%m_fc(nzb_soil,m) )  THEN
+          f2 = ( m_total - surf%m_wilt(nzb_soil,m) ) /                         &
+               ( surf%m_fc(nzb_soil,m) - surf%m_wilt(nzb_soil,m) )
+       ELSEIF ( m_total >= surf%m_fc(nzb_soil,m) )  THEN
+          f2 = 1.0_wp
+       ELSE
+          f2 = 1.0E-20_wp
+       ENDIF
+
+!
+!--    Calculate water vapour pressure at saturation and convert to hPa
+!--    The magnus formula is limited to temperatures up to 333.15 K to
+!--    avoid negative values of q_s
+       e_s = 0.01_wp * magnus( MIN(surf_t_surface%var_1d(m), 333.15_wp) )
+
+!
+!--    f3: correction for vapour pressure deficit
+       IF ( surf%g_d(m) /= 0.0_wp )  THEN
+!
+!--       Calculate vapour pressure
+          e  = surf%qv1(m) * surface_pressure / ( surf%qv1(m) + rd_d_rv )
+          f3 = EXP ( - surf%g_d(m) * (e_s - e) )
+       ELSE
+          f3 = 1.0_wp
+       ENDIF
+!
+!--    Calculate canopy resistance. In case that c_veg is 0 (bare soils),
+!--    this calculation is obsolete, as r_canopy is not used below.
+!--    To do: check for very dry soil -> r_canopy goes to infinity
+       surf%r_canopy(m) = surf%r_canopy_min(m) /                               &
+                              ( surf%lai(m) * f1 * f2 * f3 + 1.0E-20_wp )
+!
+!--    Third step: calculate bare soil resistance r_soil.
+       m_min = surf%c_veg(m) * surf%m_wilt(nzb_soil,m) +                       &
+                         ( 1.0_wp - surf%c_veg(m) ) * surf%m_res(nzb_soil,m)
+
+
+       f2 = ( surf_m_soil%var_2d(nzb_soil,m) - m_min ) /                       &
+            ( surf%m_fc(nzb_soil,m) - m_min )
+       f2 = MAX( f2, 1.0E-20_wp )
+       f2 = MIN( f2, 1.0_wp     )
+
+       surf%r_soil(m) = surf%r_soil_min(m) / f2
+       
+!
+!--    Calculate the maximum possible liquid water amount on plants and
+!--    bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is
+!--    assumed, while paved surfaces might hold up 1 mm of water. The 
+!--    liquid water fraction for paved surfaces is calculated after 
+!--    Noilhan & Planton (1989), while the ECMWF formulation is used for
+!--    vegetated surfaces and bare soils.
+       IF ( surf%pavement_surface(m) )  THEN
+          m_liq_max = m_max_depth * 5.0_wp
+          surf%c_liq(m) = MIN( 1.0_wp, ( surf_m_liq%var_1d(m) / m_liq_max)**0.67 )
+       ELSE
+          m_liq_max = m_max_depth * ( surf%c_veg(m) * surf%lai(m)              &
+                      + ( 1.0_wp - surf%c_veg(m) ) )
+          surf%c_liq(m) = MIN( 1.0_wp, surf_m_liq%var_1d(m) / m_liq_max )
+       ENDIF
+!
+!--    Calculate saturation water vapor mixing ratio
+       q_s = rd_d_rv * e_s / ( surface_pressure - e_s )
+!
+!--    In case of dewfall, set evapotranspiration to zero
+!--    All super-saturated water is then removed from the air
+       IF ( humidity  .AND.  q_s <= surf%qv1(m) )  THEN
+          surf%r_canopy(m) = 0.0_wp
+          surf%r_soil(m)   = 0.0_wp
+       ENDIF
+
+!
+!--    Calculate coefficients for the total evapotranspiration 
+!--    In case of water surface, set vegetation and soil fluxes to zero.
+!--    For pavements, only evaporation of liquid water is possible.
+       IF ( surf%water_surface(m) )  THEN
+          f_qsws_veg  = 0.0_wp
+          f_qsws_soil = 0.0_wp
+          f_qsws_liq  = rho_lv / surf%r_a(m)
+       ELSEIF ( surf%pavement_surface (m) )  THEN
+          f_qsws_veg  = 0.0_wp
+          f_qsws_soil = 0.0_wp
+          f_qsws_liq  = rho_lv * surf%c_liq(m) / surf%r_a(m)
+       ELSE
+          f_qsws_veg  = rho_lv * surf%c_veg(m) *                               &
+                            ( 1.0_wp        - surf%c_liq(m)    ) /             &
+                            ( surf%r_a(m) + surf%r_canopy(m) )
+          f_qsws_soil = rho_lv * (1.0_wp    - surf%c_veg(m)    ) /             &
+                            ( surf%r_a(m) + surf%r_soil(m)   )
+          f_qsws_liq  = rho_lv * surf%c_veg(m) * surf%c_liq(m)   /             &
+                              surf%r_a(m)
+       ENDIF
+
+       f_shf  = rho_cp / surf%r_a(m)
+       f_qsws = f_qsws_veg + f_qsws_soil + f_qsws_liq
+!
+!--    Calculate derivative of q_s for Taylor series expansion
+       e_s_dt = e_s * ( 17.62_wp / ( surf_t_surface%var_1d(m) - 29.65_wp) -   &
+                        17.62_wp*( surf_t_surface%var_1d(m) - 273.15_wp)      &
+                       / ( surf_t_surface%var_1d(m) - 29.65_wp)**2 )
+
+       dq_s_dt = rd_d_rv * e_s_dt / ( surface_pressure - e_s_dt )
+!
+!--    Calculate net radiation radiation without longwave outgoing flux because
+!--    it has a dependency on surface temperature and thus enters the prognostic 
+!--    equations directly
+       surf%rad_net_l(m) = surf%rad_sw_in(m) - surf%rad_sw_out(m)              &
+                           + surf%rad_lw_in(m)
+!
+!--    Calculate new skin temperature
+       IF ( humidity )  THEN
+!
+!--       Numerator of the prognostic equation
+          coef_1 = surf%rad_net_l(m) + surf%rad_lw_out_change_0(m)             &
+                   * surf_t_surface%var_1d(m) - surf%rad_lw_out(m)             &
+                   + f_shf * surf%pt1(m) + f_qsws * ( surf%qv1(m) - q_s        &
+                   + dq_s_dt * surf_t_surface%var_1d(m) ) + lambda_surface     &
+                   * surf_t_soil%var_2d(nzb_soil,m)
+
+!
+!--       Denominator of the prognostic equation
+          coef_2 = surf%rad_lw_out_change_0(m) + f_qsws * dq_s_dt              &
+                   + lambda_surface + f_shf / exner(nzb)
+       ELSE
+!
+!--       Numerator of the prognostic equation
+          coef_1 = surf%rad_net_l(m) + surf%rad_lw_out_change_0(m)             &
+                   * surf_t_surface%var_1d(m) - surf%rad_lw_out(m)             &
+                   + f_shf * surf%pt1(m)  + lambda_surface                     &
+                   * surf_t_soil%var_2d(nzb_soil,m)
+!
+!--       Denominator of the prognostic equation
+          coef_2 = surf%rad_lw_out_change_0(m) + lambda_surface + f_shf / exner(nzb)
+
+       ENDIF
+
+       tend = 0.0_wp
+
+!
+!--    Implicit solution when the surface layer has no heat capacity,
+!--    otherwise use RK3 scheme.
+       surf_t_surface_p%var_1d(m) = ( coef_1 * dt_3d * tsc(2) + c_surface_tmp *&
+                          surf_t_surface%var_1d(m) ) / ( c_surface_tmp + coef_2&
+                                             * dt_3d * tsc(2) ) 
+
+!
+!--    Add RK3 term
+       IF ( c_surface_tmp /= 0.0_wp )  THEN
+
+          surf_t_surface_p%var_1d(m) = surf_t_surface_p%var_1d(m) + dt_3d *    &
+                                       tsc(3) * surf_tt_surface_m%var_1d(m)
+
+!
+!--       Calculate true tendency
+          tend = ( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) -     &
+                   dt_3d * tsc(3) * surf_tt_surface_m%var_1d(m)) / (dt_3d  * tsc(2))
+!
+!--       Calculate t_surface tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                surf_tt_surface_m%var_1d(m) = tend
+             ELSEIF ( intermediate_timestep_count <                            &
+                      intermediate_timestep_count_max )  THEN
+                surf_tt_surface_m%var_1d(m) = -9.5625_wp * tend +              &
+                                               5.3125_wp * surf_tt_surface_m%var_1d(m)
+             ENDIF
+          ENDIF
+       ENDIF
+
+!
+!--    In case of fast changes in the skin temperature, it is possible to
+!--    update the radiative fluxes independently from the prescribed
+!--    radiation call frequency. This effectively prevents oscillations,
+!--    especially when setting skip_time_do_radiation /= 0. The threshold
+!--    value of 0.2 used here is just a first guess. This method should be
+!--    revised in the future as tests have shown that the threshold is 
+!--    often reached, when no oscillations would occur (causes immense
+!--    computing time for the radiation code).
+       IF ( ABS( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) )       &
+            > 0.2_wp  .AND. &
+            unscheduled_radiation_calls )  THEN
+          force_radiation_call_l = .TRUE.
+       ENDIF
+
+
+!        pt(k+k_off,j+j_off,i+i_off) = surf_t_surface_p%var_1d(m) / exner(nzb)  !is actually no air temperature
+       surf%pt_surface(m)          = surf_t_surface_p%var_1d(m) / exner(nzb)
+
+!
+!--    Calculate fluxes
+       surf%rad_net_l(m) = surf%rad_net_l(m) +                                 &
+                            surf%rad_lw_out_change_0(m)                        &
+                          * surf_t_surface%var_1d(m) - surf%rad_lw_out(m)      &
+                          - surf%rad_lw_out_change_0(m) * surf_t_surface_p%var_1d(m)
+
+       surf%rad_net(m) = surf%rad_net_l(m)
+       surf%rad_lw_out(m) = surf%rad_lw_out(m) + surf%rad_lw_out_change_0(m) * &
+                     ( surf_t_surface_p%var_1d(m) - surf_t_surface%var_1d(m) )
+
+       surf%ghf(m) = lambda_surface * ( surf_t_surface_p%var_1d(m)             &
+                                             - surf_t_soil%var_2d(nzb_soil,m) )
+
+       surf%shf(m) = - f_shf * ( surf%pt1(m) - surf%pt_surface(m) ) / c_p
+
+       IF ( humidity )  THEN
+          surf%qsws(m)  = - f_qsws * ( surf%qv1(m) - q_s + dq_s_dt             &
+                          * surf_t_surface%var_1d(m) - dq_s_dt *               &
+                            surf_t_surface_p%var_1d(m) )
+
+          surf%qsws_veg(m)  = - f_qsws_veg  * ( surf%qv1(m) - q_s              &
+                              + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt   &
+                              * surf_t_surface_p%var_1d(m) )
+
+          surf%qsws_soil(m) = - f_qsws_soil * ( surf%qv1(m) - q_s              &
+                              + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt   &
+                              * surf_t_surface_p%var_1d(m) )
+
+          surf%qsws_liq(m)  = - f_qsws_liq  * ( surf%qv1(m) - q_s              &
+                              + dq_s_dt * surf_t_surface%var_1d(m) - dq_s_dt   &
+                              * surf_t_surface_p%var_1d(m) )
+       ENDIF
+
+!
+!--    Calculate the true surface resistance. ABS is used here to avoid negative
+!--    values that can occur for very small fluxes due to the artifical addition
+!--    of 1.0E-20.
+       IF ( .NOT.  humidity )  THEN
+          surf%r_s(m) = 1.0E10_wp
+       ELSE
+          surf%r_s(m) = ABS(rho_lv / (f_qsws + 1.0E-20_wp) - surf%r_a(m))
+       ENDIF
+!
+!--    Calculate change in liquid water reservoir due to dew fall or 
+!--    evaporation of liquid water
+       IF ( humidity )  THEN
+!
+!--       If precipitation is activated, add rain water to qsws_liq
+!--       and qsws_soil according the the vegetation coverage.
+!--       precipitation_rate is given in mm.
+          IF ( precipitation )  THEN
+
+!
+!--          Add precipitation to liquid water reservoir, if possible.
+!--          Otherwise, add the water to soil. In case of
+!--          pavements, the exceeding water amount is implicitely removed 
+!--          as runoff as qsws_soil is then not used in the soil model
+             IF ( surf_m_liq%var_1d(m) /= m_liq_max )  THEN
+                surf%qsws_liq(m) = surf%qsws_liq(m)                            &
+                                 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)&
+                                 * hyrho(k+k_off)                              &
+                                 * 0.001_wp * rho_l * l_v
+             ELSE
+                surf%qsws_soil(m) = surf%qsws_soil(m)                          &
+                                 + surf%c_veg(m) * prr(k+k_off,j+j_off,i+i_off)&
+                                 * hyrho(k+k_off)                              &
+                                 * 0.001_wp * rho_l * l_v
+             ENDIF
+
+!--          Add precipitation to bare soil according to the bare soil
+!--          coverage.
+             surf%qsws_soil(m) = surf%qsws_soil(m) + ( 1.0_wp                  &
+                               - surf%c_veg(m) ) * prr(k+k_off,j+j_off,i+i_off)&
+                               * hyrho(k+k_off)                                &
+                               * 0.001_wp * rho_l * l_v
+          ENDIF
+
+!
+!--       If the air is saturated, check the reservoir water level
+          IF ( surf%qsws(m) < 0.0_wp )  THEN
+!
+!--          Check if reservoir is full (avoid values > m_liq_max)
+!--          In that case, qsws_liq goes to qsws_soil. In this 
+!--          case qsws_veg is zero anyway (because c_liq = 1),       
+!--          so that tend is zero and no further check is needed
+             IF ( surf_m_liq%var_1d(m) == m_liq_max )  THEN
+                surf%qsws_soil(m) = surf%qsws_soil(m) + surf%qsws_liq(m)
+
+                surf%qsws_liq(m)  = 0.0_wp
+             ENDIF
+
+!
+!--          In case qsws_veg becomes negative (unphysical behavior), 
+!--          let the water enter the liquid water reservoir as dew on the
+!--          plant
+             IF ( surf%qsws_veg(m) < 0.0_wp )  THEN
+                surf%qsws_liq(m) = surf%qsws_liq(m) + surf%qsws_veg(m)
+                surf%qsws_veg(m) = 0.0_wp
+             ENDIF
+          ENDIF                    
+ 
+          surf%qsws(m) = surf%qsws(m) / l_v
+ 
+          tend = - surf%qsws_liq(m) * drho_l_lv
+          surf_m_liq_p%var_1d(m) = surf_m_liq%var_1d(m) + dt_3d *              &
+                                        ( tsc(2) * tend +                      &
+                                          tsc(3) * surf_tm_liq_m%var_1d(m) )
+!
+!--       Check if reservoir is overfull -> reduce to maximum
+!--       (conservation of water is violated here)
+          surf_m_liq_p%var_1d(m) = MIN( surf_m_liq_p%var_1d(m),m_liq_max )
+
+!
+!--       Check if reservoir is empty (avoid values < 0.0)
+!--       (conservation of water is violated here)
+          surf_m_liq_p%var_1d(m) = MAX( surf_m_liq_p%var_1d(m), 0.0_wp )
+!
+!--       Calculate m_liq tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                surf_tm_liq_m%var_1d(m) = tend
+             ELSEIF ( intermediate_timestep_count <                            &
+                      intermediate_timestep_count_max )  THEN
+                surf_tm_liq_m%var_1d(m) = -9.5625_wp * tend +                  &
+                                           5.3125_wp * surf_tm_liq_m%var_1d(m)
+             ENDIF
+          ENDIF
+
+       ENDIF
+
+    ENDDO
+
+!
+!-- Make a logical OR for all processes. Force radiation call if at
+!-- least one processor reached the threshold change in skin temperature
+    IF ( unscheduled_radiation_calls  .AND.  intermediate_timestep_count       &
+         == intermediate_timestep_count_max-1 )  THEN
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,       &
+                           1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
+#else
+       force_radiation_call = force_radiation_call_l
+#endif
+       force_radiation_call_l = .FALSE.
+    ENDIF
+
+!
+!-- Calculate surface water vapor mixing ratio
+    IF ( humidity )  THEN
+       CALL calc_q_surface
+    ENDIF
+
+!
+!-- Calculate new roughness lengths (for water surfaces only)
+    IF ( horizontal  .AND.  .NOT. constant_roughness )  CALL calc_z0_water_surface
+    
+    CONTAINS
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of mixing ratio of the skin layer (surface). It is assumend
+!> that the skin is always saturated.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_q_surface
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  e_s           !< saturation water vapor pressure
+       REAL(wp) ::  q_s           !< saturation mixing ratio
+       REAL(wp) ::  resistance    !< aerodynamic and soil resistance term
+
+       DO  m = 1, surf%ns
+
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+!
+!--       Calculate water vapour pressure at saturation and convert to hPa
+          e_s = 0.01_wp * magnus( MIN(surf_t_surface_p%var_1d(m), 333.15_wp) )                   
+
+!
+!--       Calculate mixing ratio at saturation
+          q_s = rd_d_rv * e_s / ( surface_pressure - e_s )
+
+          resistance = surf%r_a(m) / ( surf%r_a(m) + surf%r_s(m) + 1E-5_wp )
+
+!
+!--       Calculate mixing ratio at surface
+          IF ( bulk_cloud_model )  THEN
+             q(k+k_off,j+j_off,i+i_off) = resistance * q_s +                   &
+                                        ( 1.0_wp - resistance ) *              &
+                                        ( q(k,j,i) - ql(k,j,i) )
+          ELSE
+             q(k+k_off,j+j_off,i+i_off) = resistance * q_s +                   &
+                                        ( 1.0_wp - resistance ) *              &
+                                          q(k,j,i)
+          ENDIF
+          
+          surf%q_surface(m) = q(k+k_off,j+j_off,i+i_off)
+!
+!--       Update virtual potential temperature
+          surf%vpt_surface(m) = surf%pt_surface(m) *                           &
+                                  ( 1.0_wp + 0.61_wp * surf%q_surface(m) )
+
+        
+                     
+       ENDDO
+
+    END SUBROUTINE calc_q_surface
+
+
+
+ END SUBROUTINE lsm_energy_balance
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for land surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsm_header ( io )
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=86) ::  t_soil_chr          !< String for soil temperature profile
+       CHARACTER (LEN=86) ::  roots_chr           !< String for root profile
+       CHARACTER (LEN=86) ::  vertical_index_chr  !< String for the vertical index
+       CHARACTER (LEN=86) ::  m_soil_chr          !< String for soil moisture
+       CHARACTER (LEN=86) ::  soil_depth_chr      !< String for soil depth
+       CHARACTER (LEN=10) ::  coor_chr            !< Temporary string
+    
+       INTEGER(iwp) ::  i                         !< Loop index over soil layers
+ 
+       INTEGER(iwp), INTENT(IN) ::  io            !< Unit of the output file
+ 
+       t_soil_chr = ''
+       m_soil_chr    = ''
+       soil_depth_chr  = '' 
+       roots_chr        = '' 
+       vertical_index_chr   = ''
+
+       i = 1
+       DO i = nzb_soil, nzt_soil
+          WRITE (coor_chr,'(F10.2,7X)') soil_temperature(i)
+          t_soil_chr = TRIM( t_soil_chr ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(F10.2,7X)') soil_moisture(i)
+          m_soil_chr = TRIM( m_soil_chr ) // ' ' // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(F10.2,7X)')  - zs(i)
+          soil_depth_chr = TRIM( soil_depth_chr ) // ' '  // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(F10.2,7X)')  root_fraction(i)
+          roots_chr = TRIM( roots_chr ) // ' '  // TRIM( coor_chr )
+
+          WRITE (coor_chr,'(I10,7X)')  i
+          vertical_index_chr = TRIM( vertical_index_chr ) // ' '  //           &
+                               TRIM( coor_chr )
+       ENDDO
+
+!
+!--    Write land surface model header
+       WRITE( io,  1 )
+       IF ( conserve_water_content )  THEN
+          WRITE( io, 2 )
+       ELSE
+          WRITE( io, 3 )
+       ENDIF
+
+       IF ( vegetation_type_f%from_file )  THEN
+          WRITE( io, 5 )
+       ELSE
+          WRITE( io, 4 ) TRIM( vegetation_type_name(vegetation_type) ),        &
+                         TRIM (soil_type_name(soil_type) )
+       ENDIF
+       WRITE( io, 6 ) TRIM( soil_depth_chr ), TRIM( t_soil_chr ),              &
+                        TRIM( m_soil_chr ), TRIM( roots_chr ),                 &
+                        TRIM( vertical_index_chr )
+
+1   FORMAT (//' Land surface model information:'/                              &
+              ' ------------------------------'/)
+2   FORMAT ('    --> Soil bottom is closed (water content is conserved',       &
+            ', default)')
+3   FORMAT ('    --> Soil bottom is open (water content is not conserved)')         
+4   FORMAT ('    --> Land surface type  : ',A,/                                &
+            '    --> Soil porosity type : ',A)
+5   FORMAT ('    --> Land surface type  : read from file' /                    &
+            '    --> Soil porosity type : read from file' )
+6   FORMAT (/'    Initial soil temperature and moisture profile:'//            &
+            '       Height:        ',A,'  m'/                                  &
+            '       Temperature:   ',A,'  K'/                                  &
+            '       Moisture:      ',A,'  m**3/m**3'/                          &
+            '       Root fraction: ',A,'  '/                                   &
+            '       Grid point:    ',A)
+
+
+    END SUBROUTINE lsm_header
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the land surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsm_init
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       USE indices,                                                            &
+           ONLY:  nx, ny, topo_min_level
+
+       USE pmc_interface,                                                      &
+           ONLY:  nested_run
+    
+       IMPLICIT NONE
+
+       LOGICAL      ::  init_soil_from_parent   !< flag controlling initialization of soil in child domains
+
+       INTEGER(iwp) ::  i                       !< running index
+       INTEGER(iwp) ::  i_off                   !< index offset of surface element, seen from atmospheric grid point 
+       INTEGER(iwp) ::  j                       !< running index
+       INTEGER(iwp) ::  j_off                   !< index offset of surface element, seen from atmospheric grid point 
+       INTEGER(iwp) ::  k                       !< running index
+       INTEGER(iwp) ::  kn                      !< running index
+       INTEGER(iwp) ::  ko                      !< running index
+       INTEGER(iwp) ::  kroot                   !< running index
+       INTEGER(iwp) ::  kzs                     !< running index
+       INTEGER(iwp) ::  l                       !< running index surface facing
+       INTEGER(iwp) ::  m                       !< running index
+       INTEGER(iwp) ::  st                      !< soil-type index
+       INTEGER(iwp) ::  n_soil_layers_total     !< temperature variable, stores the total number of soil layers + 4 
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  bound, bound_root_fr  !< temporary arrays for storing index bounds
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  pr_soil_init !< temporary array used for averaging soil profiles
+!
+!--    If no cloud physics is used, rho_surface has not been calculated before
+       IF (  .NOT.  bulk_cloud_model  .AND.  .NOT.  cloud_droplets )  THEN
+          CALL calc_mean_profile( pt, 4 )
+          rho_surface = hyp(nzb) / ( r_d * hom(topo_min_level+1,1,4,0) * exner(nzb) )
+       ENDIF
+
+!
+!--    Calculate frequently used parameters
+       rho_cp    = c_p * rho_surface
+       rho_lv    = rho_surface * l_v
+       drho_l_lv = 1.0_wp / (rho_l * l_v)
+
+!
+!--    Set initial values for prognostic quantities
+!--    Horizontal surfaces
+       tt_surface_h_m%var_1d = 0.0_wp
+       tt_soil_h_m%var_2d    = 0.0_wp
+       tm_soil_h_m%var_2d    = 0.0_wp
+       tm_liq_h_m%var_1d     = 0.0_wp
+       surf_lsm_h%c_liq      = 0.0_wp
+
+       surf_lsm_h%ghf = 0.0_wp
+
+       surf_lsm_h%qsws_liq  = 0.0_wp
+       surf_lsm_h%qsws_soil = 0.0_wp
+       surf_lsm_h%qsws_veg  = 0.0_wp
+
+       surf_lsm_h%r_a        = 50.0_wp
+       surf_lsm_h%r_s        = 50.0_wp
+       surf_lsm_h%r_canopy   = 0.0_wp
+       surf_lsm_h%r_soil     = 0.0_wp
+!
+!--    Do the same for vertical surfaces
+       DO  l = 0, 3
+          tt_surface_v_m(l)%var_1d = 0.0_wp
+          tt_soil_v_m(l)%var_2d    = 0.0_wp
+          tm_soil_v_m(l)%var_2d    = 0.0_wp
+          tm_liq_v_m(l)%var_1d     = 0.0_wp
+          surf_lsm_v(l)%c_liq      = 0.0_wp
+
+          surf_lsm_v(l)%ghf = 0.0_wp
+
+          surf_lsm_v(l)%qsws_liq  = 0.0_wp
+          surf_lsm_v(l)%qsws_soil = 0.0_wp
+          surf_lsm_v(l)%qsws_veg  = 0.0_wp
+
+          surf_lsm_v(l)%r_a        = 50.0_wp
+          surf_lsm_v(l)%r_s        = 50.0_wp
+          surf_lsm_v(l)%r_canopy   = 0.0_wp
+          surf_lsm_v(l)%r_soil     = 0.0_wp
+       ENDDO
+
+!
+!--    Set initial values for prognostic soil quantities
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+          t_soil_h%var_2d = 0.0_wp
+          m_soil_h%var_2d = 0.0_wp
+          m_liq_h%var_1d  = 0.0_wp
+
+          DO  l = 0, 3
+             t_soil_v(l)%var_2d = 0.0_wp
+             m_soil_v(l)%var_2d = 0.0_wp
+             m_liq_v(l)%var_1d  = 0.0_wp
+          ENDDO
+       ENDIF
+!
+!--    Allocate 3D soil model arrays
+!--    First, for horizontal surfaces
+       ALLOCATE ( surf_lsm_h%alpha_vg(nzb_soil:nzt_soil,1:surf_lsm_h%ns)    )
+       ALLOCATE ( surf_lsm_h%gamma_w_sat(nzb_soil:nzt_soil,1:surf_lsm_h%ns) )
+       ALLOCATE ( surf_lsm_h%lambda_h(nzb_soil:nzt_soil,1:surf_lsm_h%ns)    )
+       ALLOCATE ( surf_lsm_h%lambda_h_def(nzb_soil:nzt_soil,1:surf_lsm_h%ns))
+       ALLOCATE ( surf_lsm_h%l_vg(nzb_soil:nzt_soil,1:surf_lsm_h%ns)        )
+       ALLOCATE ( surf_lsm_h%m_fc(nzb_soil:nzt_soil,1:surf_lsm_h%ns)        )
+       ALLOCATE ( surf_lsm_h%m_res(nzb_soil:nzt_soil,1:surf_lsm_h%ns)       )
+       ALLOCATE ( surf_lsm_h%m_sat(nzb_soil:nzt_soil,1:surf_lsm_h%ns)       )
+       ALLOCATE ( surf_lsm_h%m_wilt(nzb_soil:nzt_soil,1:surf_lsm_h%ns)      )
+       ALLOCATE ( surf_lsm_h%n_vg(nzb_soil:nzt_soil,1:surf_lsm_h%ns)        )
+       ALLOCATE ( surf_lsm_h%rho_c_total(nzb_soil:nzt_soil,1:surf_lsm_h%ns) )
+       ALLOCATE ( surf_lsm_h%rho_c_total_def(nzb_soil:nzt_soil,1:surf_lsm_h%ns) )
+       ALLOCATE ( surf_lsm_h%root_fr(nzb_soil:nzt_soil,1:surf_lsm_h%ns)     )
+    
+       surf_lsm_h%lambda_h     = 0.0_wp
+!
+!--    If required, allocate humidity-related variables for the soil model
+       IF ( humidity )  THEN
+          ALLOCATE ( surf_lsm_h%lambda_w(nzb_soil:nzt_soil,1:surf_lsm_h%ns) )
+          ALLOCATE ( surf_lsm_h%gamma_w(nzb_soil:nzt_soil,1:surf_lsm_h%ns)  )  
+
+          surf_lsm_h%lambda_w = 0.0_wp 
+       ENDIF
+!
+!--    For vertical surfaces
+       DO  l = 0, 3
+          ALLOCATE ( surf_lsm_v(l)%alpha_vg(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)    )
+          ALLOCATE ( surf_lsm_v(l)%gamma_w_sat(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) )
+          ALLOCATE ( surf_lsm_v(l)%lambda_h(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)    )
+          ALLOCATE ( surf_lsm_v(l)%lambda_h_def(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns))
+          ALLOCATE ( surf_lsm_v(l)%l_vg(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)        )
+          ALLOCATE ( surf_lsm_v(l)%m_fc(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)        )
+          ALLOCATE ( surf_lsm_v(l)%m_res(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)       )
+          ALLOCATE ( surf_lsm_v(l)%m_sat(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)       )
+          ALLOCATE ( surf_lsm_v(l)%m_wilt(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)      )
+          ALLOCATE ( surf_lsm_v(l)%n_vg(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)        )
+          ALLOCATE ( surf_lsm_v(l)%rho_c_total(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) )  
+          ALLOCATE ( surf_lsm_v(l)%rho_c_total_def(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) )  
+          ALLOCATE ( surf_lsm_v(l)%root_fr(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)     )
+
+          surf_lsm_v(l)%lambda_h     = 0.0_wp 
+          
+!
+!--       If required, allocate humidity-related variables for the soil model
+          IF ( humidity )  THEN
+             ALLOCATE ( surf_lsm_v(l)%lambda_w(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) )
+             ALLOCATE ( surf_lsm_v(l)%gamma_w(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)  )  
+
+             surf_lsm_v(l)%lambda_w = 0.0_wp 
+          ENDIF     
+       ENDDO
+!
+!--    Allocate albedo type and emissivity for vegetation, water and pavement 
+!--    fraction.
+!--    Set default values at each surface element. 
+       ALLOCATE ( surf_lsm_h%albedo_type(0:2,1:surf_lsm_h%ns) )
+       ALLOCATE ( surf_lsm_h%emissivity(0:2,1:surf_lsm_h%ns) )
+       surf_lsm_h%albedo_type = 0      
+       surf_lsm_h%emissivity  = emissivity
+       DO  l = 0, 3
+          ALLOCATE ( surf_lsm_v(l)%albedo_type(0:2,1:surf_lsm_v(l)%ns) )
+          ALLOCATE ( surf_lsm_v(l)%emissivity(0:2,1:surf_lsm_v(l)%ns)  )
+          surf_lsm_v(l)%albedo_type = 0
+          surf_lsm_v(l)%emissivity  = emissivity
+       ENDDO
+!
+!--    Allocate arrays for relative surface fraction. 
+!--    0 - vegetation fraction, 2 - water fraction, 1 - pavement fraction
+       ALLOCATE( surf_lsm_h%frac(0:2,1:surf_lsm_h%ns) )
+       surf_lsm_h%frac = 0.0_wp
+       DO  l = 0, 3
+          ALLOCATE( surf_lsm_v(l)%frac(0:2,1:surf_lsm_v(l)%ns) )
+          surf_lsm_v(l)%frac = 0.0_wp
+       ENDDO
+!
+!--    For vertical walls only - allocate special flag indicating if any building is on
+!--    top of any natural surfaces. Used for initialization only. 
+       DO  l = 0, 3
+          ALLOCATE( surf_lsm_v(l)%building_covered(1:surf_lsm_v(l)%ns) )
+       ENDDO
+!
+!--    Allocate arrays for the respective types and their names on the surface
+!--    elements. This will be required to treat deposition of chemical species.
+       ALLOCATE( surf_lsm_h%pavement_type(1:surf_lsm_h%ns)   )
+       ALLOCATE( surf_lsm_h%vegetation_type(1:surf_lsm_h%ns) )
+       ALLOCATE( surf_lsm_h%water_type(1:surf_lsm_h%ns)      )
+       
+       surf_lsm_h%pavement_type   = 0
+       surf_lsm_h%vegetation_type = 0
+       surf_lsm_h%water_type      = 0
+       
+       ALLOCATE( surf_lsm_h%pavement_type_name(1:surf_lsm_h%ns)   )
+       ALLOCATE( surf_lsm_h%vegetation_type_name(1:surf_lsm_h%ns) )
+       ALLOCATE( surf_lsm_h%water_type_name(1:surf_lsm_h%ns)      )
+       
+       surf_lsm_h%pavement_type_name   = 'none'
+       surf_lsm_h%vegetation_type_name = 'none'
+       surf_lsm_h%water_type_name      = 'none'
+       
+       DO  l = 0, 3
+          ALLOCATE( surf_lsm_v(l)%pavement_type(1:surf_lsm_v(l)%ns)   )
+          ALLOCATE( surf_lsm_v(l)%vegetation_type(1:surf_lsm_v(l)%ns) )
+          ALLOCATE( surf_lsm_v(l)%water_type(1:surf_lsm_v(l)%ns)      )
+          
+          surf_lsm_v(l)%pavement_type   = 0
+          surf_lsm_v(l)%vegetation_type = 0
+          surf_lsm_v(l)%water_type      = 0
+       
+          ALLOCATE( surf_lsm_v(l)%pavement_type_name(1:surf_lsm_v(l)%ns)   )
+          ALLOCATE( surf_lsm_v(l)%vegetation_type_name(1:surf_lsm_v(l)%ns) )
+          ALLOCATE( surf_lsm_v(l)%water_type_name(1:surf_lsm_v(l)%ns)      )
+       
+          surf_lsm_v(l)%pavement_type_name   = 'none'
+          surf_lsm_v(l)%vegetation_type_name = 'none'
+          surf_lsm_v(l)%water_type_name      = 'none'       
+       ENDDO
+       
+!
+!--    Set flag parameter for the prescribed surface type depending on user 
+!--    input. Set surface fraction to 1 for the respective type.
+       SELECT CASE ( TRIM( surface_type ) )
+          
+          CASE ( 'vegetation' )
+         
+             surf_lsm_h%vegetation_surface = .TRUE.
+             surf_lsm_h%frac(ind_veg_wall,:) = 1.0_wp
+             DO  l = 0, 3
+                surf_lsm_v(l)%vegetation_surface = .TRUE.
+                surf_lsm_v(l)%frac(ind_veg_wall,:) = 1.0_wp
+             ENDDO
+   
+          CASE ( 'water' )
+             
+             surf_lsm_h%water_surface = .TRUE.
+             surf_lsm_h%frac(ind_wat_win,:) = 1.0_wp
+!
+!--          Note, vertical water surface does not really make sense.
+             DO  l = 0, 3  
+                surf_lsm_v(l)%water_surface   = .TRUE.
+                surf_lsm_v(l)%frac(ind_wat_win,:) = 1.0_wp
+             ENDDO
+
+          CASE ( 'pavement' )
+             
+             surf_lsm_h%pavement_surface = .TRUE.
+                surf_lsm_h%frac(ind_pav_green,:) = 1.0_wp
+             DO  l = 0, 3
+                surf_lsm_v(l)%pavement_surface   = .TRUE.
+                surf_lsm_v(l)%frac(ind_pav_green,:) = 1.0_wp
+             ENDDO
+
+          CASE ( 'netcdf' )
+
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+                IF ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill )    &
+                   surf_lsm_h%vegetation_surface(m) = .TRUE.
+                IF ( pavement_type_f%var(j,i)   /= pavement_type_f%fill )      &
+                   surf_lsm_h%pavement_surface(m) = .TRUE.
+                IF ( water_type_f%var(j,i)      /= water_type_f%fill )         &
+                   surf_lsm_h%water_surface(m) = .TRUE.
+             ENDDO
+!
+!--          For vertical surfaces some special checks and treatment are
+!--          required for correct initialization. 
+             DO  l = 0, 3
+                DO  m = 1, surf_lsm_v(l)%ns
+!
+!--                Only for vertical surfaces. Check if at the grid point where 
+!--                the wall is defined (i+ioff, j+joff) is any building. 
+!--                This case, no natural surfaces properties will be defined at
+!--                at this grid point, leading to problems in the initialization.
+!--                To overcome this, define a special flag which
+!--                indicates that a building is defined at the wall grid point  
+!--                and take the surface properties from the adjoining grid 
+!--                point, i.e. without offset values.
+!--                Further, there can occur a special case where elevation
+!--                changes are larger than building heights. This case, (j,i)
+!--                and (j+joff,i+ioff) grid points may be both covered by 
+!--                buildings, but vertical, but vertically natural walls may 
+!--                be located between the buildings. This case, it is not 
+!--                guaranteed that information about natural surface types is 
+!--                given, neither at (j,i) nor at (j+joff,i+ioff), again leading 
+!--                to non-initialized surface properties. 
+                   surf_lsm_v(l)%building_covered(m) = .FALSE.
+!
+!--                Wall grid point is building-covered. This case, set 
+!--                flag indicating that surface properties are initialized 
+!--                from neighboring reference grid point, which is not 
+!--                building_covered. 
+                   IF ( building_type_f%from_file )  THEN
+                      i = surf_lsm_v(l)%i(m)
+                      j = surf_lsm_v(l)%j(m)
+                      IF ( building_type_f%var(j+surf_lsm_v(l)%joff,           &
+                                               i+surf_lsm_v(l)%ioff) /=        &
+                           building_type_f%fill )                              &
+                         surf_lsm_v(l)%building_covered(m) = .TRUE.
+!
+!--                   Wall grid point as well as neighboring reference grid
+!--                   point are both building-covered. This case, surface
+!--                   properties are not necessarily defined (not covered by
+!--                   checks for static input file) at this surface. Hence, 
+!--                   initialize surface properties by simply setting 
+!--                   vegetation_type_f to bare-soil bulk parametrization. 
+!--                   soil_type_f as well as surface_fractions_f will be set 
+!--                   also.                      
+                      IF ( building_type_f%var(j+surf_lsm_v(l)%joff,           &
+                                               i+surf_lsm_v(l)%ioff) /=        &
+                           building_type_f%fill  .AND.                         &
+                           building_type_f%var(j,i) /= building_type_f%fill )  &
+                      THEN
+                         vegetation_type_f%var(j,i)                 = 1 ! bare soil
+                         soil_type_f%var_2d(j,i)                    = 1 
+                         surface_fraction_f%frac(ind_veg_wall,j,i)  = 1.0_wp
+                         surface_fraction_f%frac(ind_pav_green,j,i) = 0.0_wp
+                         surface_fraction_f%frac(ind_wat_win,j,i)   = 0.0_wp
+                      ENDIF
+                      
+                   ENDIF
+!
+!--                Normally proceed with setting surface types.
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                            surf_lsm_v(l)%building_covered(m) )
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                            surf_lsm_v(l)%building_covered(m) )
+                   IF ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill ) &
+                      surf_lsm_v(l)%vegetation_surface(m) = .TRUE.
+                   IF ( pavement_type_f%var(j,i)   /= pavement_type_f%fill )   &
+                      surf_lsm_v(l)%pavement_surface(m) = .TRUE.
+                   IF ( water_type_f%var(j,i)      /= water_type_f%fill )      &
+                      surf_lsm_v(l)%water_surface(m) = .TRUE.
+!
+!--                Check if surface element has the flag %building_covered_all,
+!--                this case, set vegetation_type appropriate
+                ENDDO
+             ENDDO
+
+       END SELECT
+!
+!--    In case of netcdf input file, further initialize surface fractions. 
+!--    At the moment only 1 surface is given at a location, so that the fraction
+!--    is either 0 or 1. This will be revised later. If surface fraction 
+!--    is not given in static input file, relative fractions will be derived
+!--    from given surface type. In this case, only 1 type is given at a certain
+!--    location (already checked).  
+       IF ( input_pids_static  .AND.  surface_fraction_f%from_file )  THEN
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+!
+!--          0 - vegetation fraction, 1 - pavement fraction, 2 - water fraction             
+             surf_lsm_h%frac(ind_veg_wall,m)  =                                &
+                                    surface_fraction_f%frac(ind_veg_wall,j,i)         
+             surf_lsm_h%frac(ind_pav_green,m) =                                &
+                                    surface_fraction_f%frac(ind_pav_green,j,i)        
+             surf_lsm_h%frac(ind_wat_win,m)   =                                &
+                                    surface_fraction_f%frac(ind_wat_win,j,i)
+
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+!
+!--             0 - vegetation fraction, 1 - pavement fraction, 2 - water fraction        
+                surf_lsm_v(l)%frac(ind_veg_wall,m)  =                          &
+                                    surface_fraction_f%frac(ind_veg_wall,j,i)         
+                surf_lsm_v(l)%frac(ind_pav_green,m) =                          &
+                                    surface_fraction_f%frac(ind_pav_green,j,i)        
+                surf_lsm_v(l)%frac(ind_wat_win,m)   =                          &
+                                    surface_fraction_f%frac(ind_wat_win,j,i)
+
+             ENDDO
+          ENDDO
+       ELSEIF ( input_pids_static  .AND.  .NOT. surface_fraction_f%from_file ) &
+       THEN
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+
+             IF ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill )       &        
+                surf_lsm_h%frac(ind_veg_wall,m)  = 1.0_wp
+             IF ( pavement_type_f%var(j,i)   /= pavement_type_f%fill   )       &        
+                surf_lsm_h%frac(ind_pav_green,m) = 1.0_wp 
+             IF ( water_type_f%var(j,i)      /= water_type_f%fill      )       &        
+                surf_lsm_h%frac(ind_wat_win,m)   = 1.0_wp       
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+     
+                IF ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill )    &        
+                   surf_lsm_v(l)%frac(ind_veg_wall,m)  = 1.0_wp
+                IF ( pavement_type_f%var(j,i)   /= pavement_type_f%fill   )    &        
+                   surf_lsm_v(l)%frac(ind_pav_green,m) = 1.0_wp 
+                IF ( water_type_f%var(j,i)      /= water_type_f%fill      )    &        
+                   surf_lsm_v(l)%frac(ind_wat_win,m)   = 1.0_wp     
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Level 1, initialization of soil parameters.
+!--    It is possible to overwrite each parameter by setting the respecticy 
+!--    NAMELIST variable to a value /= 9999999.9. 
+       IF ( soil_type /= 0 )  THEN  
+ 
+          IF ( alpha_vangenuchten == 9999999.9_wp )  THEN
+             alpha_vangenuchten = soil_pars(0,soil_type)
+          ENDIF
+
+          IF ( l_vangenuchten == 9999999.9_wp )  THEN
+             l_vangenuchten = soil_pars(1,soil_type)
+          ENDIF
+
+          IF ( n_vangenuchten == 9999999.9_wp )  THEN
+             n_vangenuchten = soil_pars(2,soil_type)            
+          ENDIF
+
+          IF ( hydraulic_conductivity == 9999999.9_wp )  THEN
+             hydraulic_conductivity = soil_pars(3,soil_type)            
+          ENDIF
+
+          IF ( saturation_moisture == 9999999.9_wp )  THEN
+             saturation_moisture = soil_pars(4,soil_type)           
+          ENDIF
+
+          IF ( field_capacity == 9999999.9_wp )  THEN
+             field_capacity = soil_pars(5,soil_type)           
+          ENDIF
+
+          IF ( wilting_point == 9999999.9_wp )  THEN
+             wilting_point = soil_pars(6,soil_type)            
+          ENDIF
+
+          IF ( residual_moisture == 9999999.9_wp )  THEN
+             residual_moisture = soil_pars(7,soil_type)       
+          ENDIF
+
+       ENDIF
+!
+!--    Map values to the respective 2D/3D arrays
+!--    Horizontal surfaces
+       surf_lsm_h%alpha_vg      = alpha_vangenuchten
+       surf_lsm_h%l_vg          = l_vangenuchten
+       surf_lsm_h%n_vg          = n_vangenuchten 
+       surf_lsm_h%gamma_w_sat   = hydraulic_conductivity
+       surf_lsm_h%m_sat         = saturation_moisture
+       surf_lsm_h%m_fc          = field_capacity
+       surf_lsm_h%m_wilt        = wilting_point
+       surf_lsm_h%m_res         = residual_moisture
+       surf_lsm_h%r_soil_min    = min_soil_resistance
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          surf_lsm_v(l)%alpha_vg      = alpha_vangenuchten
+          surf_lsm_v(l)%l_vg          = l_vangenuchten
+          surf_lsm_v(l)%n_vg          = n_vangenuchten 
+          surf_lsm_v(l)%gamma_w_sat   = hydraulic_conductivity
+          surf_lsm_v(l)%m_sat         = saturation_moisture
+          surf_lsm_v(l)%m_fc          = field_capacity
+          surf_lsm_v(l)%m_wilt        = wilting_point
+          surf_lsm_v(l)%m_res         = residual_moisture
+          surf_lsm_v(l)%r_soil_min    = min_soil_resistance
+       ENDDO
+!
+!--    Level 2, initialization of soil parameters via soil_type read from file.
+!--    Soil parameters are initialized for each (y,x)-grid point 
+!--    individually using default paramter settings according to the given
+!--    soil type.
+       IF ( soil_type_f%from_file )  THEN
+!
+!--       Level of detail = 1, i.e. a homogeneous soil distribution along the 
+!--       vertical dimension is assumed.
+          IF ( soil_type_f%lod == 1 )  THEN
+!
+!--          Horizontal surfaces
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+             
+                st = soil_type_f%var_2d(j,i)
+                IF ( st /= soil_type_f%fill )  THEN
+                   surf_lsm_h%alpha_vg(:,m)    = soil_pars(0,st)
+                   surf_lsm_h%l_vg(:,m)        = soil_pars(1,st)
+                   surf_lsm_h%n_vg(:,m)        = soil_pars(2,st)
+                   surf_lsm_h%gamma_w_sat(:,m) = soil_pars(3,st)
+                   surf_lsm_h%m_sat(:,m)       = soil_pars(4,st)
+                   surf_lsm_h%m_fc(:,m)        = soil_pars(5,st)
+                   surf_lsm_h%m_wilt(:,m)      = soil_pars(6,st)
+                   surf_lsm_h%m_res(:,m)       = soil_pars(7,st)
+                ENDIF
+             ENDDO
+!
+!--          Vertical surfaces ( assumes the soil type given at respective (x,y) 
+             DO  l = 0, 3
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+
+                   st = soil_type_f%var_2d(j,i)
+                   IF ( st /= soil_type_f%fill )  THEN
+                      surf_lsm_v(l)%alpha_vg(:,m)    = soil_pars(0,st)
+                      surf_lsm_v(l)%l_vg(:,m)        = soil_pars(1,st)
+                      surf_lsm_v(l)%n_vg(:,m)        = soil_pars(2,st)
+                      surf_lsm_v(l)%gamma_w_sat(:,m) = soil_pars(3,st)
+                      surf_lsm_v(l)%m_sat(:,m)       = soil_pars(4,st)
+                      surf_lsm_v(l)%m_fc(:,m)        = soil_pars(5,st)
+                      surf_lsm_v(l)%m_wilt(:,m)      = soil_pars(6,st)
+                      surf_lsm_v(l)%m_res(:,m)       = soil_pars(7,st)
+                   ENDIF
+                ENDDO
+             ENDDO
+!
+!--       Level of detail = 2, i.e. soil type and thus the soil parameters
+!--       can be heterogeneous along the vertical dimension. 
+          ELSE
+!
+!--          Horizontal surfaces
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+             
+                DO  k = nzb_soil, nzt_soil
+                   st = soil_type_f%var_3d(k,j,i)
+                   IF ( st /= soil_type_f%fill )  THEN
+                      surf_lsm_h%alpha_vg(k,m)    = soil_pars(0,st)
+                      surf_lsm_h%l_vg(k,m)        = soil_pars(1,st)
+                      surf_lsm_h%n_vg(k,m)        = soil_pars(2,st)
+                      surf_lsm_h%gamma_w_sat(k,m) = soil_pars(3,st)
+                      surf_lsm_h%m_sat(k,m)       = soil_pars(4,st)
+                      surf_lsm_h%m_fc(k,m)        = soil_pars(5,st)
+                      surf_lsm_h%m_wilt(k,m)      = soil_pars(6,st)
+                      surf_lsm_h%m_res(k,m)       = soil_pars(7,st)
+                   ENDIF
+                ENDDO
+             ENDDO
+!
+!--          Vertical surfaces ( assumes the soil type given at respective (x,y) 
+             DO  l = 0, 3
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+
+                   DO  k = nzb_soil, nzt_soil
+                      st = soil_type_f%var_3d(k,j,i)
+                      IF ( st /= soil_type_f%fill )  THEN
+                         surf_lsm_v(l)%alpha_vg(k,m)    = soil_pars(0,st)
+                         surf_lsm_v(l)%l_vg(k,m)        = soil_pars(1,st)
+                         surf_lsm_v(l)%n_vg(k,m)        = soil_pars(2,st)
+                         surf_lsm_v(l)%gamma_w_sat(k,m) = soil_pars(3,st)
+                         surf_lsm_v(l)%m_sat(k,m)       = soil_pars(4,st)
+                         surf_lsm_v(l)%m_fc(k,m)        = soil_pars(5,st)
+                         surf_lsm_v(l)%m_wilt(k,m)      = soil_pars(6,st)
+                         surf_lsm_v(l)%m_res(k,m)       = soil_pars(7,st)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+!
+!--    Level 3, initialization of single soil parameters at single z,x,y 
+!--    position via soil_pars read from file.
+       IF ( soil_pars_f%from_file )  THEN
+!
+!--       Level of detail = 1, i.e. a homogeneous vertical distribution of soil 
+!--       parameters is assumed.
+!--       Horizontal surfaces
+          IF ( soil_pars_f%lod == 1 )  THEN
+!
+!--          Horizontal surfaces 
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+
+                IF ( soil_pars_f%pars_xy(0,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%alpha_vg(:,m)    = soil_pars_f%pars_xy(0,j,i)
+                IF ( soil_pars_f%pars_xy(1,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%l_vg(:,m)        = soil_pars_f%pars_xy(1,j,i)
+                IF ( soil_pars_f%pars_xy(2,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%n_vg(:,m)        = soil_pars_f%pars_xy(2,j,i)
+                IF ( soil_pars_f%pars_xy(3,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%gamma_w_sat(:,m) = soil_pars_f%pars_xy(3,j,i)
+                IF ( soil_pars_f%pars_xy(4,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%m_sat(:,m)       = soil_pars_f%pars_xy(4,j,i)
+                IF ( soil_pars_f%pars_xy(5,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%m_fc(:,m)        = soil_pars_f%pars_xy(5,j,i)
+                IF ( soil_pars_f%pars_xy(6,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%m_wilt(:,m)      = soil_pars_f%pars_xy(6,j,i)
+                IF ( soil_pars_f%pars_xy(7,j,i) /= soil_pars_f%fill )              &
+                   surf_lsm_h%m_res(:,m)       = soil_pars_f%pars_xy(7,j,i)
+
+             ENDDO
+!
+!--          Vertical surfaces 
+             DO  l = 0, 3
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+
+                   IF ( soil_pars_f%pars_xy(0,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%alpha_vg(:,m)    = soil_pars_f%pars_xy(0,j,i)
+                   IF ( soil_pars_f%pars_xy(1,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%l_vg(:,m)        = soil_pars_f%pars_xy(1,j,i)
+                   IF ( soil_pars_f%pars_xy(2,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%n_vg(:,m)        = soil_pars_f%pars_xy(2,j,i)
+                   IF ( soil_pars_f%pars_xy(3,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%gamma_w_sat(:,m) = soil_pars_f%pars_xy(3,j,i)
+                   IF ( soil_pars_f%pars_xy(4,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%m_sat(:,m)       = soil_pars_f%pars_xy(4,j,i)
+                   IF ( soil_pars_f%pars_xy(5,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%m_fc(:,m)        = soil_pars_f%pars_xy(5,j,i)
+                   IF ( soil_pars_f%pars_xy(6,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%m_wilt(:,m)      = soil_pars_f%pars_xy(6,j,i)
+                   IF ( soil_pars_f%pars_xy(7,j,i) /= soil_pars_f%fill )           &
+                      surf_lsm_v(l)%m_res(:,m)       = soil_pars_f%pars_xy(7,j,i)
+
+                ENDDO
+             ENDDO
+!
+!--       Level of detail = 2, i.e. soil parameters can be set at each soil 
+!--       layer individually. 
+          ELSE
+!
+!--          Horizontal surfaces
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+
+                DO  k = nzb_soil, nzt_soil
+                   IF ( soil_pars_f%pars_xyz(0,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%alpha_vg(k,m)    = soil_pars_f%pars_xyz(0,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(1,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%l_vg(k,m)        = soil_pars_f%pars_xyz(1,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(2,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%n_vg(k,m)        = soil_pars_f%pars_xyz(2,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(3,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%gamma_w_sat(k,m) = soil_pars_f%pars_xyz(3,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(4,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%m_sat(k,m)       = soil_pars_f%pars_xyz(4,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(5,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%m_fc(k,m)        = soil_pars_f%pars_xyz(5,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(6,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%m_wilt(k,m)      = soil_pars_f%pars_xyz(6,k,j,i)
+                   IF ( soil_pars_f%pars_xyz(7,k,j,i) /= soil_pars_f%fill )        &
+                      surf_lsm_h%m_res(k,m)       = soil_pars_f%pars_xyz(7,k,j,i)
+                ENDDO
+
+             ENDDO
+!
+!--          Vertical surfaces 
+             DO  l = 0, 3
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+
+                   DO  k = nzb_soil, nzt_soil
+                      IF ( soil_pars_f%pars_xyz(0,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%alpha_vg(k,m)    = soil_pars_f%pars_xyz(0,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(1,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%l_vg(k,m)        = soil_pars_f%pars_xyz(1,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(2,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%n_vg(k,m)        = soil_pars_f%pars_xyz(2,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(3,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%gamma_w_sat(k,m) = soil_pars_f%pars_xyz(3,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(4,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%m_sat(k,m)       = soil_pars_f%pars_xyz(4,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(5,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%m_fc(k,m)        = soil_pars_f%pars_xyz(5,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(6,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%m_wilt(k,m)      = soil_pars_f%pars_xyz(6,k,j,i)
+                      IF ( soil_pars_f%pars_xyz(7,k,j,i) /= soil_pars_f%fill )        &
+                         surf_lsm_v(l)%m_res(k,m)       = soil_pars_f%pars_xyz(7,k,j,i)
+                   ENDDO
+
+                ENDDO
+             ENDDO
+
+          ENDIF
+       ENDIF
+
+!
+!--    Level 1, initialization of vegetation parameters. A horizontally 
+!--    homogeneous distribution is assumed here. 
+       IF ( vegetation_type /= 0 )  THEN
+
+          IF ( min_canopy_resistance == 9999999.9_wp )  THEN
+             min_canopy_resistance = vegetation_pars(ind_v_rc_min,vegetation_type)
+          ENDIF
+
+          IF ( leaf_area_index == 9999999.9_wp )  THEN
+             leaf_area_index = vegetation_pars(ind_v_rc_lai,vegetation_type)         
+          ENDIF
+
+          IF ( vegetation_coverage == 9999999.9_wp )  THEN
+             vegetation_coverage = vegetation_pars(ind_v_c_veg,vegetation_type)     
+          ENDIF
+
+          IF ( canopy_resistance_coefficient == 9999999.9_wp )  THEN
+              canopy_resistance_coefficient= vegetation_pars(ind_v_gd,vegetation_type)     
+          ENDIF
+
+          IF ( z0_vegetation == 9999999.9_wp )  THEN
+             z0_vegetation  = vegetation_pars(ind_v_z0,vegetation_type) 
+          ENDIF
+
+          IF ( z0h_vegetation == 9999999.9_wp )  THEN
+             z0h_vegetation = vegetation_pars(ind_v_z0qh,vegetation_type)
+          ENDIF 
+          
+          IF ( z0q_vegetation == 9999999.9_wp )  THEN
+             z0q_vegetation = vegetation_pars(ind_v_z0qh,vegetation_type)
+          ENDIF
+          
+          IF ( lambda_surface_stable == 9999999.9_wp )  THEN
+             lambda_surface_stable = vegetation_pars(ind_v_lambda_s,vegetation_type) 
+          ENDIF
+
+          IF ( lambda_surface_unstable == 9999999.9_wp )  THEN
+             lambda_surface_unstable = vegetation_pars(ind_v_lambda_u,vegetation_type)           
+          ENDIF
+
+          IF ( f_shortwave_incoming == 9999999.9_wp )  THEN
+             f_shortwave_incoming = vegetation_pars(ind_v_f_sw_in,vegetation_type)        
+          ENDIF
+
+          IF ( c_surface == 9999999.9_wp )  THEN
+             c_surface = vegetation_pars(ind_v_c_surf,vegetation_type)        
+          ENDIF
+
+          IF ( albedo_type == 9999999  .AND.  albedo == 9999999.9_wp )  THEN
+             albedo_type = INT(vegetation_pars(ind_v_at,vegetation_type))       
+          ENDIF
+   
+          IF ( emissivity == 9999999.9_wp )  THEN
+             emissivity = vegetation_pars(ind_v_emis,vegetation_type)     
+          ENDIF
+
+       ENDIF
+!
+!--    Map values onto horizontal elemements
+       DO  m = 1, surf_lsm_h%ns
+          IF ( surf_lsm_h%vegetation_surface(m) )  THEN
+             surf_lsm_h%r_canopy_min(m)     = min_canopy_resistance
+             surf_lsm_h%lai(m)              = leaf_area_index
+             surf_lsm_h%c_veg(m)            = vegetation_coverage
+             surf_lsm_h%g_d(m)              = canopy_resistance_coefficient
+             surf_lsm_h%z0(m)               = z0_vegetation
+             surf_lsm_h%z0h(m)              = z0h_vegetation
+             surf_lsm_h%z0q(m)              = z0q_vegetation
+             surf_lsm_h%lambda_surface_s(m) = lambda_surface_stable
+             surf_lsm_h%lambda_surface_u(m) = lambda_surface_unstable
+             surf_lsm_h%f_sw_in(m)          = f_shortwave_incoming
+             surf_lsm_h%c_surface(m)        = c_surface
+             surf_lsm_h%albedo_type(ind_veg_wall,m) = albedo_type
+             surf_lsm_h%emissivity(ind_veg_wall,m)  = emissivity
+             
+             surf_lsm_h%vegetation_type(m)      = vegetation_type
+             surf_lsm_h%vegetation_type_name(m) = vegetation_type_name(vegetation_type)
+          ELSE
+             surf_lsm_h%lai(m)   = 0.0_wp
+             surf_lsm_h%c_veg(m) = 0.0_wp
+             surf_lsm_h%g_d(m)   = 0.0_wp
+          ENDIF
+  
+       ENDDO
+!
+!--    Map values onto vertical elements, even though this does not make
+!--    much sense.
+       DO  l = 0, 3
+          DO  m = 1, surf_lsm_v(l)%ns
+             IF ( surf_lsm_v(l)%vegetation_surface(m) )  THEN
+                surf_lsm_v(l)%r_canopy_min(m)     = min_canopy_resistance
+                surf_lsm_v(l)%lai(m)              = leaf_area_index
+                surf_lsm_v(l)%c_veg(m)            = vegetation_coverage
+                surf_lsm_v(l)%g_d(m)              = canopy_resistance_coefficient
+                surf_lsm_v(l)%z0(m)               = z0_vegetation
+                surf_lsm_v(l)%z0h(m)              = z0h_vegetation
+                surf_lsm_v(l)%z0q(m)              = z0q_vegetation
+                surf_lsm_v(l)%lambda_surface_s(m) = lambda_surface_stable
+                surf_lsm_v(l)%lambda_surface_u(m) = lambda_surface_unstable
+                surf_lsm_v(l)%f_sw_in(m)          = f_shortwave_incoming
+                surf_lsm_v(l)%c_surface(m)        = c_surface
+                surf_lsm_v(l)%albedo_type(ind_veg_wall,m) = albedo_type
+                surf_lsm_v(l)%emissivity(ind_veg_wall,m)  = emissivity
+                
+                surf_lsm_v(l)%vegetation_type(m)      = vegetation_type
+                surf_lsm_v(l)%vegetation_type_name(m) = vegetation_type_name(vegetation_type)
+             ELSE
+                surf_lsm_v(l)%lai(m)   = 0.0_wp
+                surf_lsm_v(l)%c_veg(m) = 0.0_wp
+                surf_lsm_v(l)%g_d(m)   = 0.0_wp
+             ENDIF
+          ENDDO
+       ENDDO
+
+!
+!--    Level 2, initialization of vegation parameters via vegetation_type read
+!--    from file. Vegetation parameters are initialized for each (y,x)-grid point 
+!--    individually using default paramter settings according to the given
+!--    vegetation type.
+       IF ( vegetation_type_f%from_file )  THEN
+!
+!--       Horizontal surfaces
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+             
+             st = vegetation_type_f%var(j,i)
+             IF ( st /= vegetation_type_f%fill  .AND.  st /= 0 )  THEN
+                surf_lsm_h%r_canopy_min(m)     = vegetation_pars(ind_v_rc_min,st)
+                surf_lsm_h%lai(m)              = vegetation_pars(ind_v_rc_lai,st)
+                surf_lsm_h%c_veg(m)            = vegetation_pars(ind_v_c_veg,st)
+                surf_lsm_h%g_d(m)              = vegetation_pars(ind_v_gd,st)
+                surf_lsm_h%z0(m)               = vegetation_pars(ind_v_z0,st)
+                surf_lsm_h%z0h(m)              = vegetation_pars(ind_v_z0qh,st)
+                surf_lsm_h%z0q(m)              = vegetation_pars(ind_v_z0qh,st)
+                surf_lsm_h%lambda_surface_s(m) = vegetation_pars(ind_v_lambda_s,st)
+                surf_lsm_h%lambda_surface_u(m) = vegetation_pars(ind_v_lambda_u,st)
+                surf_lsm_h%f_sw_in(m)          = vegetation_pars(ind_v_f_sw_in,st)
+                surf_lsm_h%c_surface(m)        = vegetation_pars(ind_v_c_surf,st)
+                surf_lsm_h%albedo_type(ind_veg_wall,m) = INT( vegetation_pars(ind_v_at,st) )
+                surf_lsm_h%emissivity(ind_veg_wall,m)  = vegetation_pars(ind_v_emis,st)
+                
+                surf_lsm_h%vegetation_type(m)      = st
+                surf_lsm_h%vegetation_type_name(m) = vegetation_type_name(st)
+             ENDIF
+          ENDDO
+!
+!--       Vertical surfaces
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+             
+                st = vegetation_type_f%var(j,i)
+                IF ( st /= vegetation_type_f%fill  .AND.  st /= 0 )  THEN
+                   surf_lsm_v(l)%r_canopy_min(m)     = vegetation_pars(ind_v_rc_min,st)
+                   surf_lsm_v(l)%lai(m)              = vegetation_pars(ind_v_rc_lai,st)
+                   surf_lsm_v(l)%c_veg(m)            = vegetation_pars(ind_v_c_veg,st)
+                   surf_lsm_v(l)%g_d(m)              = vegetation_pars(ind_v_gd,st)
+                   surf_lsm_v(l)%z0(m)               = vegetation_pars(ind_v_z0,st)
+                   surf_lsm_v(l)%z0h(m)              = vegetation_pars(ind_v_z0qh,st)
+                   surf_lsm_v(l)%z0q(m)              = vegetation_pars(ind_v_z0qh,st)
+                   surf_lsm_v(l)%lambda_surface_s(m) = vegetation_pars(ind_v_lambda_s,st)
+                   surf_lsm_v(l)%lambda_surface_u(m) = vegetation_pars(ind_v_lambda_u,st)
+                   surf_lsm_v(l)%f_sw_in(m)          = vegetation_pars(ind_v_f_sw_in,st)
+                   surf_lsm_v(l)%c_surface(m)        = vegetation_pars(ind_v_c_surf,st)
+                   surf_lsm_v(l)%albedo_type(ind_veg_wall,m) = INT( vegetation_pars(ind_v_at,st) )
+                   surf_lsm_v(l)%emissivity(ind_veg_wall,m)  = vegetation_pars(ind_v_emis,st)
+                   
+                   surf_lsm_v(l)%vegetation_type(m)      = st
+                   surf_lsm_v(l)%vegetation_type_name(m) = vegetation_type_name(st)
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Level 3, initialization of vegation parameters at single (x,y) 
+!--    position via vegetation_pars read from file.
+       IF ( vegetation_pars_f%from_file )  THEN
+!
+!--       Horizontal surfaces 
+          DO  m = 1, surf_lsm_h%ns
+
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+!
+!--          If surface element is not a vegetation surface and any value in 
+!--          vegetation_pars is given, neglect this information and give an
+!--          informative message that this value will not be used.   
+             IF ( .NOT. surf_lsm_h%vegetation_surface(m)  .AND.                &
+                   ANY( vegetation_pars_f%pars_xy(:,j,i) /=                    &
+                   vegetation_pars_f%fill ) )  THEN
+                WRITE( message_string, * )                                     &
+                                 'surface element at grid point (j,i) = (',    &
+                                 j, i, ') is not a vegation surface, ',        &
+                                 'so that information given in ',              &
+                                 'vegetation_pars at this point is neglected.' 
+                CALL message( 'land_surface_model_mod', 'PA0999', 0, 0, 0, 6, 0 )
+             ELSE
+
+                IF ( vegetation_pars_f%pars_xy(ind_v_rc_min,j,i) /=            &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%r_canopy_min(m)  =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_rc_min,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_rc_lai,j,i) /=            &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%lai(m)           =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_rc_lai,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_c_veg,j,i) /=             &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%c_veg(m)         =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_c_veg,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_gd,j,i) /=                &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%g_d(m)           =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_gd,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_z0,j,i) /=                &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%z0(m)            =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_z0,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_z0qh,j,i) /=              &
+                     vegetation_pars_f%fill )  THEN
+                   surf_lsm_h%z0h(m)           =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_z0qh,j,i)
+                   surf_lsm_h%z0q(m)           =                               &
+                                   vegetation_pars_f%pars_xy(ind_v_z0qh,j,i)
+                ENDIF
+                IF ( vegetation_pars_f%pars_xy(ind_v_lambda_s,j,i) /=          &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%lambda_surface_s(m) =                            &
+                                   vegetation_pars_f%pars_xy(ind_v_lambda_s,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_lambda_u,j,i) /=          &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%lambda_surface_u(m) =                            &
+                                   vegetation_pars_f%pars_xy(ind_v_lambda_u,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_f_sw_in,j,i) /=           &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%f_sw_in(m)          =                            &
+                                   vegetation_pars_f%pars_xy(ind_v_f_sw_in,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_c_surf,j,i) /=            &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%c_surface(m)        =                            &
+                                   vegetation_pars_f%pars_xy(ind_v_c_surf,j,i)
+                IF ( vegetation_pars_f%pars_xy(ind_v_at,j,i) /=                &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%albedo_type(ind_veg_wall,m) =                    &
+                                   INT( vegetation_pars_f%pars_xy(ind_v_at,j,i) )
+                IF ( vegetation_pars_f%pars_xy(ind_v_emis,j,i) /=              &
+                     vegetation_pars_f%fill )                                  &
+                   surf_lsm_h%emissivity(ind_veg_wall,m)  =                    &
+                                   vegetation_pars_f%pars_xy(ind_v_emis,j,i)
+             ENDIF
+          ENDDO
+!
+!--       Vertical surfaces 
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+!
+!--             If surface element is not a vegetation surface and any value in 
+!--             vegetation_pars is given, neglect this information and give an
+!--             informative message that this value will not be used.   
+                IF ( .NOT. surf_lsm_v(l)%vegetation_surface(m)  .AND.          &
+                      ANY( vegetation_pars_f%pars_xy(:,j,i) /=                 &
+                      vegetation_pars_f%fill ) )  THEN
+                   WRITE( message_string, * )                                  &
+                                 'surface element at grid point (j,i) = (',    &
+                                 j, i, ') is not a vegation surface, ',        &
+                                 'so that information given in ',              &
+                                 'vegetation_pars at this point is neglected.' 
+                   CALL message( 'land_surface_model_mod', 'PA0999', 0, 0, 0, 6, 0 )
+                ELSE
+
+                   IF ( vegetation_pars_f%pars_xy(ind_v_rc_min,j,i) /=         &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%r_canopy_min(m)  =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_rc_min,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_rc_lai,j,i) /=         &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%lai(m)           =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_rc_lai,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_c_veg,j,i) /=          &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%c_veg(m)         =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_c_veg,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_gd,j,i) /=             &
+                        vegetation_pars_f%fill )                               &
+                     surf_lsm_v(l)%g_d(m)            =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_gd,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_z0,j,i) /=             &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%z0(m)            =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_z0,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_z0qh,j,i) /=           &
+                        vegetation_pars_f%fill )  THEN
+                      surf_lsm_v(l)%z0h(m)           =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_z0qh,j,i)
+                      surf_lsm_v(l)%z0q(m)           =                         &
+                                   vegetation_pars_f%pars_xy(ind_v_z0qh,j,i)
+                   ENDIF
+                   IF ( vegetation_pars_f%pars_xy(ind_v_lambda_s,j,i) /=       &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%lambda_surface_s(m)  =                     &
+                                   vegetation_pars_f%pars_xy(ind_v_lambda_s,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_lambda_u,j,i) /=       &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%lambda_surface_u(m)  =                     &
+                                   vegetation_pars_f%pars_xy(ind_v_lambda_u,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_f_sw_in,j,i) /=        &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%f_sw_in(m)           =                     &
+                                   vegetation_pars_f%pars_xy(ind_v_f_sw_in,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_c_surf,j,i) /=         &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%c_surface(m)         =                     &
+                                   vegetation_pars_f%pars_xy(ind_v_c_surf,j,i)
+                   IF ( vegetation_pars_f%pars_xy(ind_v_at,j,i) /=             &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%albedo_type(ind_veg_wall,m) =              &
+                                   INT( vegetation_pars_f%pars_xy(ind_v_at,j,i) )
+                   IF ( vegetation_pars_f%pars_xy(ind_v_emis,j,i) /=           &
+                        vegetation_pars_f%fill )                               &
+                      surf_lsm_v(l)%emissivity(ind_veg_wall,m)  =              &
+                                   vegetation_pars_f%pars_xy(ind_v_emis,j,i)
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDIF 
+
+!
+!--    Level 1, initialization of water parameters. A horizontally 
+!--    homogeneous distribution is assumed here. 
+       IF ( water_type /= 0 )  THEN
+
+          IF ( water_temperature == 9999999.9_wp )  THEN
+             water_temperature = water_pars(ind_w_temp,water_type)       
+          ENDIF
+
+          IF ( z0_water == 9999999.9_wp )  THEN
+             z0_water = water_pars(ind_w_z0,water_type)       
+          ENDIF       
+
+          IF ( z0h_water == 9999999.9_wp )  THEN
+             z0h_water = water_pars(ind_w_z0h,water_type)       
+          ENDIF  
+          
+          IF ( z0q_water == 9999999.9_wp )  THEN
+             z0q_water = water_pars(ind_w_z0h,water_type)       
+          ENDIF 
+
+          IF ( albedo_type == 9999999  .AND.  albedo == 9999999.9_wp )  THEN
+             albedo_type = INT(water_pars(ind_w_at,water_type))        
+          ENDIF
+   
+          IF ( emissivity == 9999999.9_wp )  THEN
+             emissivity = water_pars(ind_w_emis,water_type)        
+          ENDIF
+
+       ENDIF 
+!
+!--    Map values onto horizontal elemements
+       DO  m = 1, surf_lsm_h%ns
+          IF ( surf_lsm_h%water_surface(m) )  THEN
+             IF ( TRIM( initializing_actions ) /= 'read_restart_data' )        &
+                t_soil_h%var_2d(:,m)        = water_temperature
+             surf_lsm_h%z0(m)               = z0_water
+             surf_lsm_h%z0h(m)              = z0h_water
+             surf_lsm_h%z0q(m)              = z0q_water
+             surf_lsm_h%lambda_surface_s(m) = 1.0E10_wp
+             surf_lsm_h%lambda_surface_u(m) = 1.0E10_wp               
+             surf_lsm_h%c_surface(m)        = 0.0_wp
+             surf_lsm_h%albedo_type(ind_wat_win,m) = albedo_type
+             surf_lsm_h%emissivity(ind_wat_win,m)  = emissivity
+             
+             surf_lsm_h%water_type(m)      = water_type
+             surf_lsm_h%water_type_name(m) = water_type_name(water_type)
+          ENDIF
+       ENDDO
+!
+!--    Map values onto vertical elements, even though this does not make
+!--    much sense.
+       DO  l = 0, 3
+          DO  m = 1, surf_lsm_v(l)%ns
+             IF ( surf_lsm_v(l)%water_surface(m) )  THEN
+                IF ( TRIM( initializing_actions ) /= 'read_restart_data' )     &
+                   t_soil_v(l)%var_2d(:,m)           = water_temperature
+                surf_lsm_v(l)%z0(m)               = z0_water
+                surf_lsm_v(l)%z0h(m)              = z0h_water
+                surf_lsm_v(l)%z0q(m)              = z0q_water
+                surf_lsm_v(l)%lambda_surface_s(m) = 1.0E10_wp
+                surf_lsm_v(l)%lambda_surface_u(m) = 1.0E10_wp               
+                surf_lsm_v(l)%c_surface(m)        = 0.0_wp
+                surf_lsm_v(l)%albedo_type(ind_wat_win,m) = albedo_type
+                surf_lsm_v(l)%emissivity(ind_wat_win,m)  = emissivity
+                
+                surf_lsm_v(l)%water_type(m)      = water_type
+                surf_lsm_v(l)%water_type_name(m) = water_type_name(water_type)
+             ENDIF 
+          ENDDO
+       ENDDO
+!
+!
+!--    Level 2, initialization of water parameters via water_type read
+!--    from file. Water surfaces are initialized for each (y,x)-grid point 
+!--    individually using default paramter settings according to the given
+!--    water type.
+!--    Note, parameter 3/4 of water_pars are albedo and emissivity,
+!--    whereas paramter 3/4 of water_pars_f are heat conductivities!
+       IF ( water_type_f%from_file )  THEN
+!
+!--       Horizontal surfaces
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+             
+             st = water_type_f%var(j,i)
+             IF ( st /= water_type_f%fill  .AND.  st /= 0 )  THEN
+                IF ( TRIM( initializing_actions ) /= 'read_restart_data' )     &
+                   t_soil_h%var_2d(:,m) = water_pars(ind_w_temp,st)
+                surf_lsm_h%z0(m)     = water_pars(ind_w_z0,st)
+                surf_lsm_h%z0h(m)    = water_pars(ind_w_z0h,st)
+                surf_lsm_h%z0q(m)    = water_pars(ind_w_z0h,st)
+                surf_lsm_h%lambda_surface_s(m) = water_pars(ind_w_lambda_s,st)
+                surf_lsm_h%lambda_surface_u(m) = water_pars(ind_w_lambda_u,st)              
+                surf_lsm_h%c_surface(m)        = 0.0_wp
+                surf_lsm_h%albedo_type(ind_wat_win,m) = INT( water_pars(ind_w_at,st) )
+                surf_lsm_h%emissivity(ind_wat_win,m)  = water_pars(ind_w_emis,st)
+                
+                surf_lsm_h%water_type(m)      = st
+                surf_lsm_h%water_type_name(m) = water_type_name(st)
+             ENDIF
+          ENDDO
+!
+!--       Vertical surfaces
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+             
+                st = water_type_f%var(j,i)
+                IF ( st /= water_type_f%fill  .AND.  st /= 0 )  THEN
+                   IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  &
+                      t_soil_v(l)%var_2d(:,m) = water_pars(ind_w_temp,st)
+                   surf_lsm_v(l)%z0(m)     = water_pars(ind_w_z0,st)
+                   surf_lsm_v(l)%z0h(m)    = water_pars(ind_w_z0h,st)
+                   surf_lsm_v(l)%z0q(m)    = water_pars(ind_w_z0h,st)
+                   surf_lsm_v(l)%lambda_surface_s(m) =                         &
+                                                   water_pars(ind_w_lambda_s,st)
+                   surf_lsm_v(l)%lambda_surface_u(m) =                         &
+                                                   water_pars(ind_w_lambda_u,st)           
+                   surf_lsm_v(l)%c_surface(m)     = 0.0_wp
+                   surf_lsm_v(l)%albedo_type(ind_wat_win,m) =                  &
+                                                  INT( water_pars(ind_w_at,st) )
+                   surf_lsm_v(l)%emissivity(ind_wat_win,m)  =                  &
+                                                  water_pars(ind_w_emis,st)
+                                                  
+                   surf_lsm_v(l)%water_type(m)      = st
+                   surf_lsm_v(l)%water_type_name(m) = water_type_name(st)
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF      
+
+!
+!--    Level 3, initialization of water parameters at single (x,y) 
+!--    position via water_pars read from file.
+       IF ( water_pars_f%from_file )  THEN
+!
+!--       Horizontal surfaces 
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+!
+!--          If surface element is not a water surface and any value in 
+!--          water_pars is given, neglect this information and give an
+!--          informative message that this value will not be used.   
+             IF ( .NOT. surf_lsm_h%water_surface(m)  .AND.                     &
+                   ANY( water_pars_f%pars_xy(:,j,i) /= water_pars_f%fill ) )  THEN
+                WRITE( message_string, * )                                     &
+                              'surface element at grid point (j,i) = (',       &
+                              j, i, ') is not a water surface, ',              &
+                              'so that information given in ',                 &
+                              'water_pars at this point is neglected.' 
+                CALL message( 'land_surface_model_mod', 'PA0999', 0, 0, 0, 6, 0 )
+             ELSE
+                IF ( water_pars_f%pars_xy(ind_w_temp,j,i) /=                   &
+                     water_pars_f%fill  .AND.                                  &
+                     TRIM( initializing_actions ) /= 'read_restart_data' )     &
+                      t_soil_h%var_2d(:,m) = water_pars_f%pars_xy(ind_w_temp,j,i)
+
+                IF ( water_pars_f%pars_xy(ind_w_z0,j,i) /= water_pars_f%fill ) &
+                   surf_lsm_h%z0(m)     = water_pars_f%pars_xy(ind_w_z0,j,i)
+
+                IF ( water_pars_f%pars_xy(ind_w_z0h,j,i) /= water_pars_f%fill )&
+                THEN
+                   surf_lsm_h%z0h(m)    = water_pars_f%pars_xy(ind_w_z0h,j,i)
+                   surf_lsm_h%z0q(m)    = water_pars_f%pars_xy(ind_w_z0h,j,i)
+                ENDIF
+                IF ( water_pars_f%pars_xy(ind_w_lambda_s,j,i) /=               &
+                     water_pars_f%fill )                                       &
+                   surf_lsm_h%lambda_surface_s(m) =                            &
+                                        water_pars_f%pars_xy(ind_w_lambda_s,j,i)
+
+                IF ( water_pars_f%pars_xy(ind_w_lambda_u,j,i) /=               &
+                      water_pars_f%fill )                                      &
+                   surf_lsm_h%lambda_surface_u(m) =                            &
+                                        water_pars_f%pars_xy(ind_w_lambda_u,j,i)     
+       
+                IF ( water_pars_f%pars_xy(ind_w_at,j,i) /=                     &
+                     water_pars_f%fill )                                       &
+                   surf_lsm_h%albedo_type(ind_wat_win,m) =                     &
+                                       INT( water_pars_f%pars_xy(ind_w_at,j,i) )
+
+                IF ( water_pars_f%pars_xy(ind_w_emis,j,i) /=                   &
+                     water_pars_f%fill )                                       &
+                   surf_lsm_h%emissivity(ind_wat_win,m) =                      &
+                                          water_pars_f%pars_xy(ind_w_emis,j,i)  
+             ENDIF
+          ENDDO
+!
+!--       Vertical surfaces 
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+!
+!--             If surface element is not a water surface and any value in 
+!--             water_pars is given, neglect this information and give an
+!--             informative message that this value will not be used.   
+                IF ( .NOT. surf_lsm_v(l)%water_surface(m)  .AND.               &
+                      ANY( water_pars_f%pars_xy(:,j,i) /=                      &
+                      water_pars_f%fill ) )  THEN
+                   WRITE( message_string, * )                                  &
+                              'surface element at grid point (j,i) = (',       &
+                              j, i, ') is not a water surface, ',              &
+                              'so that information given in ',                 &
+                              'water_pars at this point is neglected.' 
+                   CALL message( 'land_surface_model_mod', 'PA0999',           &
+                                  0, 0, 0, 6, 0 )
+                ELSE
+
+                   IF ( water_pars_f%pars_xy(ind_w_temp,j,i) /=                &
+                     water_pars_f%fill  .AND.                                  &
+                     TRIM( initializing_actions ) /= 'read_restart_data' )     &
+                      t_soil_v(l)%var_2d(:,m) = water_pars_f%pars_xy(ind_w_temp,j,i)
+
+                   IF ( water_pars_f%pars_xy(ind_w_z0,j,i) /=                  &
+                        water_pars_f%fill )                                    &
+                      surf_lsm_v(l)%z0(m)   = water_pars_f%pars_xy(ind_w_z0,j,i)
+
+                   IF ( water_pars_f%pars_xy(ind_w_z0h,j,i) /=                 &
+                       water_pars_f%fill )  THEN
+                      surf_lsm_v(l)%z0h(m)  = water_pars_f%pars_xy(ind_w_z0h,j,i)
+                      surf_lsm_v(l)%z0q(m)  = water_pars_f%pars_xy(ind_w_z0h,j,i)
+                   ENDIF
+
+                   IF ( water_pars_f%pars_xy(ind_w_lambda_s,j,i) /=            &
+                        water_pars_f%fill )                                    &
+                      surf_lsm_v(l)%lambda_surface_s(m) =                      &
+                                      water_pars_f%pars_xy(ind_w_lambda_s,j,i)
+
+                   IF ( water_pars_f%pars_xy(ind_w_lambda_u,j,i) /=            &
+                        water_pars_f%fill )                                    &
+                      surf_lsm_v(l)%lambda_surface_u(m) =                      &
+                                      water_pars_f%pars_xy(ind_w_lambda_u,j,i)    
+ 
+                   IF ( water_pars_f%pars_xy(ind_w_at,j,i) /=                  &
+                        water_pars_f%fill )                                    &
+                      surf_lsm_v(l)%albedo_type(ind_wat_win,m) =               &
+                                      INT( water_pars_f%pars_xy(ind_w_at,j,i) )
+
+                   IF ( water_pars_f%pars_xy(ind_w_emis,j,i) /=                &
+                        water_pars_f%fill )                                    &
+                      surf_lsm_v(l)%emissivity(ind_wat_win,m)  =               &
+                                      water_pars_f%pars_xy(ind_w_emis,j,i)  
+                ENDIF
+             ENDDO
+          ENDDO
+
+       ENDIF
+!
+!--    Initialize pavement-type surfaces, level 1
+       IF ( pavement_type /= 0 )  THEN  
+
+!
+!--       When a pavement_type is used, overwrite a possible setting of 
+!--       the pavement depth as it is already defined by the pavement type
+          pavement_depth_level = 0
+
+          IF ( z0_pavement == 9999999.9_wp )  THEN
+             z0_pavement  = pavement_pars(ind_p_z0,pavement_type) 
+          ENDIF
+
+          IF ( z0h_pavement == 9999999.9_wp )  THEN
+             z0h_pavement = pavement_pars(ind_p_z0h,pavement_type)
+          ENDIF
+          
+          IF ( z0q_pavement == 9999999.9_wp )  THEN
+             z0q_pavement = pavement_pars(ind_p_z0h,pavement_type)
+          ENDIF
+
+          IF ( pavement_heat_conduct == 9999999.9_wp )  THEN
+             pavement_heat_conduct = pavement_subsurface_pars_1(0,pavement_type)
+          ENDIF
+
+          IF ( pavement_heat_capacity == 9999999.9_wp )  THEN
+             pavement_heat_capacity = pavement_subsurface_pars_2(0,pavement_type)
+          ENDIF   
+    
+          IF ( albedo_type == 9999999  .AND.  albedo == 9999999.9_wp )  THEN
+             albedo_type = INT(pavement_pars(ind_p_at,pavement_type))        
+          ENDIF
+   
+          IF ( emissivity == 9999999.9_wp )  THEN
+             emissivity = pavement_pars(ind_p_emis,pavement_type)        
+          ENDIF
+
+!
+!--       If the depth level of the pavement is not set, determine it from
+!--       lookup table.
+          IF ( pavement_depth_level == 0 )  THEN
+             DO  k = nzb_soil, nzt_soil  
+                IF ( pavement_subsurface_pars_1(k,pavement_type) == 9999999.9_wp &
+                .OR. pavement_subsurface_pars_2(k,pavement_type) == 9999999.9_wp)&
+                THEN
+                   nzt_pavement = k-1
+                   EXIT
+                ENDIF
+             ENDDO
+          ELSE
+             nzt_pavement = pavement_depth_level
+          ENDIF
+
+       ENDIF
+!
+!--    Level 1 initialization of pavement type surfaces. Horizontally 
+!--    homogeneous characteristics are assumed
+       surf_lsm_h%nzt_pavement = pavement_depth_level
+       DO  m = 1, surf_lsm_h%ns
+          IF ( surf_lsm_h%pavement_surface(m) )  THEN
+             surf_lsm_h%nzt_pavement(m)        = nzt_pavement
+             surf_lsm_h%z0(m)                  = z0_pavement
+             surf_lsm_h%z0h(m)                 = z0h_pavement
+             surf_lsm_h%z0q(m)                 = z0q_pavement
+             surf_lsm_h%lambda_surface_s(m)    = pavement_heat_conduct         &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp    
+             surf_lsm_h%lambda_surface_u(m)    = pavement_heat_conduct         &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp           
+             surf_lsm_h%c_surface(m)           = pavement_heat_capacity        &
+                                                        * dz_soil(nzb_soil)    &
+                                                        * 0.25_wp                                   
+
+             surf_lsm_h%albedo_type(ind_pav_green,m) = albedo_type
+             surf_lsm_h%emissivity(ind_pav_green,m)  = emissivity      
+             
+             surf_lsm_h%pavement_type(m)      = pavement_type
+             surf_lsm_h%pavement_type_name(m) = pavement_type_name(pavement_type)
+      
+             IF ( pavement_type /= 0 )  THEN
+                DO  k = nzb_soil, surf_lsm_h%nzt_pavement(m)
+                   surf_lsm_h%lambda_h_def(k,m)    =                           &
+                                     pavement_subsurface_pars_1(k,pavement_type)                       
+                   surf_lsm_h%rho_c_total_def(k,m) =                           &
+                                     pavement_subsurface_pars_2(k,pavement_type) 
+                ENDDO
+             ELSE
+                surf_lsm_h%lambda_h_def(:,m)     = pavement_heat_conduct
+                surf_lsm_h%rho_c_total_def(:,m)  = pavement_heat_capacity
+             ENDIF        
+          ENDIF
+       ENDDO                               
+
+       DO  l = 0, 3
+          surf_lsm_v(l)%nzt_pavement = pavement_depth_level
+          DO  m = 1, surf_lsm_v(l)%ns
+             IF ( surf_lsm_v(l)%pavement_surface(m) )  THEN
+                surf_lsm_v(l)%nzt_pavement(m)        = nzt_pavement
+                surf_lsm_v(l)%z0(m)                  = z0_pavement
+                surf_lsm_v(l)%z0h(m)                 = z0h_pavement
+                surf_lsm_v(l)%z0q(m)                 = z0q_pavement
+                surf_lsm_v(l)%lambda_surface_s(m)    = pavement_heat_conduct   &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp    
+                surf_lsm_v(l)%lambda_surface_u(m)    = pavement_heat_conduct   &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp           
+                surf_lsm_v(l)%c_surface(m)           = pavement_heat_capacity  &
+                                                        * dz_soil(nzb_soil)    &
+                                                        * 0.25_wp                                      
+
+                surf_lsm_v(l)%albedo_type(ind_pav_green,m) = albedo_type
+                surf_lsm_v(l)%emissivity(ind_pav_green,m)  = emissivity
+                
+                surf_lsm_v(l)%pavement_type(m)      = pavement_type
+                surf_lsm_v(l)%pavement_type_name(m) = pavement_type_name(pavement_type)
+
+                IF ( pavement_type /= 0 )  THEN
+                   DO  k = nzb_soil, surf_lsm_v(l)%nzt_pavement(m)
+                      surf_lsm_v(l)%lambda_h_def(k,m)    =                     &
+                                     pavement_subsurface_pars_1(k,pavement_type)                       
+                      surf_lsm_v(l)%rho_c_total_def(k,m) =                     &
+                                     pavement_subsurface_pars_2(k,pavement_type) 
+                   ENDDO
+                ELSE
+                   surf_lsm_v(l)%lambda_h_def(:,m)     = pavement_heat_conduct
+                   surf_lsm_v(l)%rho_c_total_def(:,m)  = pavement_heat_capacity
+                ENDIF     
+             ENDIF
+          ENDDO
+       ENDDO
+!
+!--    Level 2 initialization of pavement type surfaces via pavement_type read
+!--    from file. Pavement surfaces are initialized for each (y,x)-grid point 
+!--    individually.
+       IF ( pavement_type_f%from_file )  THEN
+!
+!--       Horizontal surfaces
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+             
+             st = pavement_type_f%var(j,i)
+             IF ( st /= pavement_type_f%fill  .AND.  st /= 0 )  THEN
+!
+!--             Determine deepmost index of pavement layer
+                DO  k = nzb_soil, nzt_soil  
+                   IF ( pavement_subsurface_pars_1(k,st) == 9999999.9_wp       &
+                   .OR. pavement_subsurface_pars_2(k,st) == 9999999.9_wp)      &
+                   THEN
+                      surf_lsm_h%nzt_pavement(m) = k-1
+                      EXIT
+                   ENDIF
+                ENDDO
+
+                surf_lsm_h%z0(m)                = pavement_pars(ind_p_z0,st)
+                surf_lsm_h%z0h(m)               = pavement_pars(ind_p_z0h,st)
+                surf_lsm_h%z0q(m)               = pavement_pars(ind_p_z0h,st)
+
+                surf_lsm_h%lambda_surface_s(m)  =                              &
+                                              pavement_subsurface_pars_1(0,st) &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp    
+                surf_lsm_h%lambda_surface_u(m)  =                              &
+                                              pavement_subsurface_pars_1(0,st) &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp        
+                surf_lsm_h%c_surface(m)         =                              &
+                                               pavement_subsurface_pars_2(0,st)&
+                                                        * dz_soil(nzb_soil)    &
+                                                        * 0.25_wp                               
+                surf_lsm_h%albedo_type(ind_pav_green,m) = INT( pavement_pars(ind_p_at,st) )
+                surf_lsm_h%emissivity(ind_pav_green,m)  = pavement_pars(ind_p_emis,st)  
+                
+                surf_lsm_h%pavement_type(m)      = st
+                surf_lsm_h%pavement_type_name(m) = pavement_type_name(st)
+
+                DO  k = nzb_soil, surf_lsm_h%nzt_pavement(m)
+                   surf_lsm_h%lambda_h_def(k,m)    =                           &
+                                     pavement_subsurface_pars_1(k,pavement_type)                       
+                   surf_lsm_h%rho_c_total_def(k,m) =                           &
+                                     pavement_subsurface_pars_2(k,pavement_type) 
+                ENDDO   
+             ENDIF
+          ENDDO
+!
+!--       Vertical surfaces
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+             
+                st = pavement_type_f%var(j,i)
+                IF ( st /= pavement_type_f%fill  .AND.  st /= 0 )  THEN
+!
+!--                Determine deepmost index of pavement layer
+                   DO  k = nzb_soil, nzt_soil  
+                      IF ( pavement_subsurface_pars_1(k,st) == 9999999.9_wp    &
+                      .OR. pavement_subsurface_pars_2(k,st) == 9999999.9_wp)   &
+                      THEN
+                         surf_lsm_v(l)%nzt_pavement(m) = k-1
+                         EXIT
+                      ENDIF
+                   ENDDO
+
+                   surf_lsm_v(l)%z0(m)  = pavement_pars(ind_p_z0,st)
+                   surf_lsm_v(l)%z0h(m) = pavement_pars(ind_p_z0h,st)
+                   surf_lsm_v(l)%z0q(m) = pavement_pars(ind_p_z0h,st)
+
+                   surf_lsm_v(l)%lambda_surface_s(m)  =                        &
+                                              pavement_subsurface_pars_1(0,st) &
+                                                  * ddz_soil(nzb_soil)         & 
+                                                  * 2.0_wp    
+                   surf_lsm_v(l)%lambda_surface_u(m)  =                        &
+                                              pavement_subsurface_pars_1(0,st) &
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp     
+
+                   surf_lsm_v(l)%c_surface(m)    =                             &
+                                           pavement_subsurface_pars_2(0,st)    &
+                                                        * dz_soil(nzb_soil)    &
+                                                        * 0.25_wp                                    
+                   surf_lsm_v(l)%albedo_type(ind_pav_green,m) =                &
+                                              INT( pavement_pars(ind_p_at,st) )
+                   surf_lsm_v(l)%emissivity(ind_pav_green,m)  =                &
+                                              pavement_pars(ind_p_emis,st)  
+                                              
+                   surf_lsm_v(l)%pavement_type(m)      = st
+                   surf_lsm_v(l)%pavement_type_name(m) = pavement_type_name(st)
+                                              
+                   DO  k = nzb_soil, surf_lsm_v(l)%nzt_pavement(m)
+                      surf_lsm_v(l)%lambda_h_def(k,m)    =                     &
+                                    pavement_subsurface_pars_1(k,pavement_type)                       
+                      surf_lsm_v(l)%rho_c_total_def(k,m) =                     &
+                                    pavement_subsurface_pars_2(k,pavement_type) 
+                   ENDDO   
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF 
+!
+!--    Level 3, initialization of pavement parameters at single (x,y) 
+!--    position via pavement_pars read from file.
+       IF ( pavement_pars_f%from_file )  THEN
+!
+!--       Horizontal surfaces 
+          DO  m = 1, surf_lsm_h%ns
+             i = surf_lsm_h%i(m)
+             j = surf_lsm_h%j(m)
+!
+!--          If surface element is not a pavement surface and any value in 
+!--          pavement_pars is given, neglect this information and give an
+!--          informative message that this value will not be used.   
+             IF ( .NOT. surf_lsm_h%pavement_surface(m)  .AND.                  &
+                   ANY( pavement_pars_f%pars_xy(:,j,i) /=                      &
+                   pavement_pars_f%fill ) )  THEN
+                WRITE( message_string, * )                                     &
+                              'surface element at grid point (j,i) = (',       &
+                              j, i, ') is not a pavement surface, ',           &
+                              'so that information given in ',                 &
+                              'pavement_pars at this point is neglected.' 
+                CALL message( 'land_surface_model_mod', 'PA0999', 0, 0, 0, 6, 0 )
+             ELSE
+                IF ( pavement_pars_f%pars_xy(ind_p_z0,j,i) /=                  &
+                     pavement_pars_f%fill )                                    &
+                   surf_lsm_h%z0(m)  = pavement_pars_f%pars_xy(ind_p_z0,j,i)
+                IF ( pavement_pars_f%pars_xy(ind_p_z0h,j,i) /=                 &
+                     pavement_pars_f%fill )  THEN
+                   surf_lsm_h%z0h(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+                   surf_lsm_h%z0q(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+                ENDIF
+                IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i) &
+                     /= pavement_subsurface_pars_f%fill )  THEN
+                   surf_lsm_h%lambda_surface_s(m)  =                           &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp
+                   surf_lsm_h%lambda_surface_u(m)  =                           &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp    
+                ENDIF
+                IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i) /= &
+                     pavement_subsurface_pars_f%fill )  THEN
+                   surf_lsm_h%c_surface(m)     =                               &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i)   &
+                                                  * dz_soil(nzb_soil)          &
+                                                  * 0.25_wp                                    
+                ENDIF
+                IF ( pavement_pars_f%pars_xy(ind_p_at,j,i) /=                  &
+                     pavement_pars_f%fill )                                    &
+                   surf_lsm_h%albedo_type(ind_pav_green,m) =                   &
+                                              INT( pavement_pars(ind_p_at,st) )
+                IF ( pavement_pars_f%pars_xy(ind_p_emis,j,i) /=                &
+                     pavement_pars_f%fill )                                    &
+                   surf_lsm_h%emissivity(ind_pav_green,m)  =                   &
+                                              pavement_pars(ind_p_emis,st) 
+             ENDIF 
+
+          ENDDO
+!
+!--       Vertical surfaces 
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,         &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+!
+!--             If surface element is not a pavement surface and any value in 
+!--             pavement_pars is given, neglect this information and give an
+!--             informative message that this value will not be used.   
+                IF ( .NOT. surf_lsm_v(l)%pavement_surface(m)  .AND.            &
+                      ANY( pavement_pars_f%pars_xy(:,j,i) /=                   &
+                      pavement_pars_f%fill ) )  THEN
+                   WRITE( message_string, * )                                  &
+                                 'surface element at grid point (j,i) = (',    &
+                                 j, i, ') is not a pavement surface, ',        &
+                                 'so that information given in ',              &
+                                 'pavement_pars at this point is neglected.' 
+                   CALL message( 'land_surface_model_mod', 'PA0999', 0, 0, 0, 6, 0 )
+                ELSE
+
+                   IF ( pavement_pars_f%pars_xy(ind_p_z0,j,i) /=               &
+                        pavement_pars_f%fill )                                 &
+                      surf_lsm_v(l)%z0(m) = pavement_pars_f%pars_xy(ind_p_z0,j,i)
+                   IF ( pavement_pars_f%pars_xy(ind_p_z0h,j,i) /=              &
+                        pavement_pars_f%fill )  THEN
+                      surf_lsm_v(l)%z0h(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+                      surf_lsm_v(l)%z0q(m) = pavement_pars_f%pars_xy(ind_p_z0h,j,i)
+                   ENDIF
+                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
+                        /= pavement_subsurface_pars_f%fill )  THEN
+                      surf_lsm_v(l)%lambda_surface_s(m) =                      &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp
+                      surf_lsm_v(l)%lambda_surface_u(m) =                      &
+                      pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,0,j,i)&
+                                                  * ddz_soil(nzb_soil)         &
+                                                  * 2.0_wp    
+                   ENDIF
+                   IF ( pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i) &
+                        /= pavement_subsurface_pars_f%fill )  THEN
+                      surf_lsm_v(l)%c_surface(m)    =                          &
+                         pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,0,j,i)&
+                                                  * dz_soil(nzb_soil)          &
+                                                  * 0.25_wp                                  
+                   ENDIF
+                   IF ( pavement_pars_f%pars_xy(ind_p_at,j,i) /=               &
+                        pavement_pars_f%fill )                                 &
+                      surf_lsm_v(l)%albedo_type(ind_pav_green,m) =             &
+                                            INT( pavement_pars(ind_p_at,st) )
+
+                   IF ( pavement_pars_f%pars_xy(ind_p_emis,j,i) /=             &
+                        pavement_pars_f%fill )                                 &
+                      surf_lsm_v(l)%emissivity(ind_pav_green,m)  =             &
+                                            pavement_pars(ind_p_emis,st)  
+                ENDIF 
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Moreover, for grid points which are flagged with pavement-type 0 or whre 
+!--    pavement_subsurface_pars_f is provided, soil heat conductivity and 
+!--    capacity are initialized with parameters given in        
+!--    pavement_subsurface_pars read from file. 
+       IF ( pavement_subsurface_pars_f%from_file )  THEN
+!
+!--       Set pavement depth to nzt_soil. Please note, this is just a 
+!--       workaround at the moment. 
+          DO  m = 1, surf_lsm_h%ns
+             IF ( surf_lsm_h%pavement_surface(m) )  THEN
+
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+
+                surf_lsm_h%nzt_pavement(m) = nzt_soil
+
+                DO  k = nzb_soil, nzt_soil  
+                   surf_lsm_h%lambda_h_def(k,m) =                              &
+                       pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i)
+                   surf_lsm_h%rho_c_total_def(k,m) =                           &
+                       pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i)
+                ENDDO
+
+             ENDIF
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                IF ( surf_lsm_v(l)%pavement_surface(m) )  THEN
+
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                surf_lsm_v(l)%building_covered(m) ) 
+
+                   surf_lsm_v(l)%nzt_pavement(m) = nzt_soil
+
+                   DO  k = nzb_soil, nzt_soil  
+                      surf_lsm_v(l)%lambda_h_def(k,m) =                        &
+                       pavement_subsurface_pars_f%pars_xyz(ind_p_lambda_h,k,j,i)
+                      surf_lsm_v(l)%rho_c_total_def(k,m) =                     &
+                       pavement_subsurface_pars_f%pars_xyz(ind_p_rho_c,k,j,i)
+                   ENDDO
+
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    Initial run actions
+       IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+!
+!--       Read soil properties from dynamic input file
+          CALL netcdf_data_input_init_lsm
+!
+!--       In case no dynamic input is available for a child domain but root 
+!--       domain is initialized with dynamic input file, the different soil 
+!--       properties can lead to significant discrepancies in the atmospheric 
+!--       surface forcing. For this reason, the child domain
+!--       is initialized with mean soil profiles from the root domain.          
+          init_soil_from_parent = .FALSE. 
+          IF ( nested_run )  THEN
+#if defined( __parallel )
+             CALL MPI_ALLREDUCE( init_3d%from_file_tsoil  .OR.                 &
+                                 init_3d%from_file_msoil,                      &
+                                 init_soil_from_parent,                        &
+                                 1, MPI_LOGICAL, MPI_LOR, MPI_COMM_WORLD, ierr )
+#endif
+          ENDIF
+!
+!--       First, initialize soil temperature and moisture. 
+!--       According to the initialization for surface and soil parameters, 
+!--       initialize soil moisture and temperature via a level approach. This 
+!--       is to assure that all surface elements are initialized, even if 
+!--       data provided from input file contains fill values at some locations.
+!--       Level 1, initialization via profiles given in parameter file
+          DO  m = 1, surf_lsm_h%ns
+             IF ( surf_lsm_h%vegetation_surface(m)  .OR.                       &
+                  surf_lsm_h%pavement_surface(m) )  THEN
+                DO  k = nzb_soil, nzt_soil  
+                   t_soil_h%var_2d(k,m) = soil_temperature(k)
+                   m_soil_h%var_2d(k,m) = soil_moisture(k)
+                ENDDO
+                t_soil_h%var_2d(nzt_soil+1,m) = deep_soil_temperature
+             ENDIF
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                IF ( surf_lsm_v(l)%vegetation_surface(m)  .OR.                 &
+                     surf_lsm_v(l)%pavement_surface(m) )  THEN
+                   DO  k = nzb_soil, nzt_soil  
+                      t_soil_v(l)%var_2d(k,m) = soil_temperature(k)
+                      m_soil_v(l)%var_2d(k,m) = soil_moisture(k)
+                   ENDDO
+                   t_soil_v(l)%var_2d(nzt_soil+1,m) = deep_soil_temperature
+                ENDIF
+             ENDDO
+          ENDDO
+!
+!--       Initialization of soil moisture and temperature from file. 
+!--       In case of no dynamic input file is available for the child domain, 
+!--       transfer soil mean profiles from the root-parent domain onto all 
+!--       child domains.
+          IF ( init_soil_from_parent )  THEN
+!
+!--          Child domains will be only initialized with horizontally 
+!--          averaged soil profiles in parent domain (for sake of simplicity). 
+!--          If required, average soil data on root parent domain before 
+!--          distribute onto child domains.
+             IF ( init_3d%from_file_msoil  .AND.  init_3d%lod_msoil == 2 )     &
+             THEN
+                ALLOCATE( pr_soil_init(0:init_3d%nzs-1) )
+
+                DO  k = 0, init_3d%nzs-1
+                   pr_soil_init(k) = SUM( init_3d%msoil_3d(k,nys:nyn,nxl:nxr)  )
+                ENDDO
+!
+!--             Allocate 1D array for soil-moisture profile (will not be 
+!--             allocated in lod==2 case). 
+                ALLOCATE( init_3d%msoil_1d(0:init_3d%nzs-1) )
+                init_3d%msoil_1d = 0.0_wp
+#if defined( __parallel )
+                CALL MPI_ALLREDUCE( pr_soil_init(0), init_3d%msoil_1d(0),      &
+                                    SIZE(pr_soil_init),                        &
+                                    MPI_REAL, MPI_SUM, comm2d, ierr )
+#endif
+                init_3d%msoil_1d = init_3d%msoil_1d /                          &
+                                        REAL( ( nx + 1 ) * ( ny + 1), KIND=wp )
+                DEALLOCATE( pr_soil_init )
+             ENDIF
+             IF ( init_3d%from_file_tsoil  .AND.  init_3d%lod_tsoil == 2 )  THEN
+                ALLOCATE( pr_soil_init(0:init_3d%nzs-1) )
+
+                DO  k = 0, init_3d%nzs-1
+                   pr_soil_init(k) = SUM( init_3d%tsoil_3d(k,nys:nyn,nxl:nxr)  )
+                ENDDO
+!
+!--             Allocate 1D array for soil-temperature profile (will not be 
+!--             allocated in lod==2 case). 
+                ALLOCATE( init_3d%tsoil_1d(0:init_3d%nzs-1) )
+                init_3d%tsoil_1d = 0.0_wp
+#if defined( __parallel )
+                CALL MPI_ALLREDUCE( pr_soil_init(0), init_3d%tsoil_1d(0),      &
+                                    SIZE(pr_soil_init),                        &
+                                    MPI_REAL, MPI_SUM, comm2d, ierr )
+#endif
+                init_3d%tsoil_1d = init_3d%tsoil_1d /                          &
+                                        REAL( ( nx + 1 ) * ( ny + 1), KIND=wp )
+                DEALLOCATE( pr_soil_init )
+
+             ENDIF
+
+#if defined( __parallel )
+!
+!--          Distribute soil grid information on file from root to all childs.
+!--          Only process with rank 0 sends the information. 
+             CALL MPI_BCAST( init_3d%nzs,    1,                                &
+                             MPI_INTEGER, 0, MPI_COMM_WORLD, ierr )
+
+             IF ( .NOT.  ALLOCATED( init_3d%z_soil ) )                         &
+                ALLOCATE( init_3d%z_soil(1:init_3d%nzs) )
+
+             CALL MPI_BCAST( init_3d%z_soil, SIZE(init_3d%z_soil),             &
+                             MPI_REAL, 0, MPI_COMM_WORLD, ierr )
+#endif
+!
+!--          ALLOCATE arrays on child domains and set control attributes.
+!--          Note, 1d soil profiles are allocated even though soil information
+!--          is already read from dynamic file in one child domain. 
+!--          This case, however, data is not used for further initialization 
+!--          since the LoD=2. 
+             IF ( .NOT. ALLOCATED( init_3d%msoil_1d ) )  THEN
+                ALLOCATE( init_3d%msoil_1d(0:init_3d%nzs-1) )
+                IF( .NOT. init_3d%from_file_msoil )  init_3d%lod_msoil = 1
+                init_3d%from_file_msoil = .TRUE.
+             ENDIF
+             IF ( .NOT. ALLOCATED( init_3d%tsoil_1d ) )  THEN
+                ALLOCATE( init_3d%tsoil_1d(0:init_3d%nzs-1) )
+                IF( .NOT. init_3d%from_file_tsoil )  init_3d%lod_tsoil = 1
+                init_3d%from_file_tsoil = .TRUE.
+             ENDIF
+
+
+#if defined( __parallel )
+!
+!--          Distribute soil profiles from root to all childs
+             CALL MPI_BCAST( init_3d%msoil_1d, SIZE(init_3d%msoil_1d),         &
+                             MPI_REAL, 0, MPI_COMM_WORLD, ierr )
+             CALL MPI_BCAST( init_3d%tsoil_1d, SIZE(init_3d%tsoil_1d),         &
+                             MPI_REAL, 0, MPI_COMM_WORLD, ierr )
+#endif
+
+          ENDIF
+!
+!--       Proceed with Level 2 initialization. 
+          IF ( init_3d%from_file_msoil )  THEN
+
+             IF ( init_3d%lod_msoil == 1 )  THEN
+                DO  m = 1, surf_lsm_h%ns
+
+                   CALL netcdf_data_input_interpolate(                         &
+                                       m_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
+                                       init_3d%msoil_1d(:),                    &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                ENDDO
+                DO  l = 0, 3
+                   DO  m = 1, surf_lsm_v(l)%ns
+
+                      CALL netcdf_data_input_interpolate(                      &
+                                       m_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
+                                       init_3d%msoil_1d(:),                    &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                   ENDDO
+                ENDDO
+             ELSE
+
+                DO  m = 1, surf_lsm_h%ns
+                   i = surf_lsm_h%i(m)
+                   j = surf_lsm_h%j(m)
+
+                   IF ( init_3d%msoil_3d(0,j,i) /= init_3d%fill_msoil )        &
+                      CALL netcdf_data_input_interpolate(                      &
+                                       m_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
+                                       init_3d%msoil_3d(:,j,i),                &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                ENDDO
+                DO  l = 0, 3
+                   DO  m = 1, surf_lsm_v(l)%ns
+!
+!--                   Note, in contrast to the static input data the dynamic
+!--                   input do not need to be checked whether a grid point
+!--                   is building covered. This is because soil data in the
+!--                   dynamic input is provided for the whole domain.  
+                      i = surf_lsm_v(l)%i(m)
+                      j = surf_lsm_v(l)%j(m)
+
+                      IF ( init_3d%msoil_3d(0,j,i) /= init_3d%fill_msoil )     &
+                         CALL netcdf_data_input_interpolate(                   &
+                                       m_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
+                                       init_3d%msoil_3d(:,j,i),                &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+!
+!--       Soil temperature
+          IF ( init_3d%from_file_tsoil )  THEN
+
+             IF ( init_3d%lod_tsoil == 1 )  THEN ! change to 1 if provided correctly by INIFOR
+                DO  m = 1, surf_lsm_h%ns
+
+                   CALL netcdf_data_input_interpolate(                         &
+                                       t_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
+                                       init_3d%tsoil_1d(:),                    &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                   t_soil_h%var_2d(nzt_soil+1,m) = t_soil_h%var_2d(nzt_soil,m)
+                ENDDO
+                DO  l = 0, 3
+                   DO  m = 1, surf_lsm_v(l)%ns
+
+                      CALL netcdf_data_input_interpolate(                      &
+                                       t_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
+                                       init_3d%tsoil_1d(:),                    &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                      t_soil_v(l)%var_2d(nzt_soil+1,m) =                       &
+                                                 t_soil_v(l)%var_2d(nzt_soil,m)
+                   ENDDO
+                ENDDO
+             ELSE
+
+                DO  m = 1, surf_lsm_h%ns
+                   i = surf_lsm_h%i(m)
+                   j = surf_lsm_h%j(m)
+
+                   IF ( init_3d%tsoil_3d(0,j,i) /= init_3d%fill_tsoil )        &
+                      CALL netcdf_data_input_interpolate(                      &
+                                       t_soil_h%var_2d(nzb_soil:nzt_soil,m),   &
+                                       init_3d%tsoil_3d(:,j,i),                &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                   t_soil_h%var_2d(nzt_soil+1,m) = t_soil_h%var_2d(nzt_soil,m)
+                ENDDO
+                DO  l = 0, 3
+                   DO  m = 1, surf_lsm_v(l)%ns
+!
+!--                   Note, in contrast to the static input data the dynamic
+!--                   input do not need to be checked whether a grid point
+!--                   is building covered. This is because soil data in the
+!--                   dynamic input is provided for the whole domain.  
+                      i = surf_lsm_v(l)%i(m)
+                      j = surf_lsm_v(l)%j(m)
+
+                      IF ( init_3d%tsoil_3d(0,j,i) /= init_3d%fill_tsoil )     &
+                         CALL netcdf_data_input_interpolate(                   &
+                                       t_soil_v(l)%var_2d(nzb_soil:nzt_soil,m),&
+                                       init_3d%tsoil_3d(:,j,i),                &
+                                       zs(nzb_soil:nzt_soil), init_3d%z_soil,  &
+                                       nzb_soil, nzt_soil,                     &
+                                       nzb_soil, init_3d%nzs-1 )
+                      t_soil_v(l)%var_2d(nzt_soil+1,m) =                       &
+                                                 t_soil_v(l)%var_2d(nzt_soil,m)
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+!
+!--       Further initialization
+          DO  m = 1, surf_lsm_h%ns
+
+             i   = surf_lsm_h%i(m)            
+             j   = surf_lsm_h%j(m)
+             k   = surf_lsm_h%k(m)
+!
+!--          Initialize surface temperature with soil temperature in the uppermost
+!--          uppermost layer
+             t_surface_h%var_1d(m)    = t_soil_h%var_2d(nzb_soil,m)
+             surf_lsm_h%pt_surface(m) = t_soil_h%var_2d(nzb_soil,m) / exner(nzb)
+             
+             IF ( bulk_cloud_model  .OR. cloud_droplets ) THEN
+                surf_lsm_h%pt1(m) = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
+             ELSE
+                surf_lsm_h%pt1(m) = pt(k,j,i)
+             ENDIF 
+!
+!--          Assure that r_a cannot be zero at model start
+             IF ( surf_lsm_h%pt1(m) == surf_lsm_h%pt_surface(m) )              &
+                surf_lsm_h%pt1(m) = surf_lsm_h%pt1(m) + 1.0E-20_wp
+
+             surf_lsm_h%us(m)   = 0.1_wp
+             surf_lsm_h%ts(m)   = ( surf_lsm_h%pt1(m) - surf_lsm_h%pt_surface(m) )&
+                                  / surf_lsm_h%r_a(m)
+             surf_lsm_h%shf(m)  = - surf_lsm_h%us(m) * surf_lsm_h%ts(m)        &
+                                  * rho_surface
+          ENDDO
+!
+!--       Vertical surfaces
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                i   = surf_lsm_v(l)%i(m)            
+                j   = surf_lsm_v(l)%j(m)
+                k   = surf_lsm_v(l)%k(m)         
+!
+!--             Initialize surface temperature with soil temperature in the uppermost
+!--             uppermost layer
+                t_surface_v(l)%var_1d(m)      = t_soil_v(l)%var_2d(nzb_soil,m)
+                surf_lsm_v(l)%pt_surface(m)   = t_soil_v(l)%var_2d(nzb_soil,m) / exner(nzb)
+
+                IF ( bulk_cloud_model  .OR. cloud_droplets ) THEN
+                   surf_lsm_v(l)%pt1(m) = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
+                ELSE
+                   surf_lsm_v(l)%pt1(m) = pt(k,j,i)
+                ENDIF 
+
+!
+!--             Assure that r_a cannot be zero at model start
+                IF ( surf_lsm_v(l)%pt1(m) == surf_lsm_v(l)%pt_surface(m) )     &
+                     surf_lsm_v(l)%pt1(m) = surf_lsm_v(l)%pt1(m) + 1.0E-20_wp
+!
+!--             Set artifical values for ts and us so that r_a has its initial value 
+!--             for the first time step. Only for interior core domain, not for ghost points
+                surf_lsm_v(l)%us(m)   = 0.1_wp
+                surf_lsm_v(l)%ts(m)   = ( surf_lsm_v(l)%pt1(m) - surf_lsm_v(l)%pt_surface(m) ) /&
+                                          surf_lsm_v(l)%r_a(m)
+                surf_lsm_v(l)%shf(m)  = - surf_lsm_v(l)%us(m) *                &
+                                          surf_lsm_v(l)%ts(m) * rho_surface
+
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Level 1 initialization of root distribution - provided by the user via
+!--    via namelist.
+       DO  m = 1, surf_lsm_h%ns
+          DO  k = nzb_soil, nzt_soil
+             surf_lsm_h%root_fr(k,m) = root_fraction(k)
+          ENDDO
+       ENDDO
+
+       DO  l = 0, 3
+          DO  m = 1, surf_lsm_v(l)%ns
+             DO  k = nzb_soil, nzt_soil
+                surf_lsm_v(l)%root_fr(k,m) = root_fraction(k)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Level 2 initialization of root distribution.
+!--    When no root distribution is given by the user, use look-up table to prescribe
+!--    the root fraction in the individual soil layers.
+       IF ( ALL( root_fraction == 9999999.9_wp ) )  THEN
+!
+!--       First, calculate the index bounds for integration
+          n_soil_layers_total = nzt_soil - nzb_soil + 6
+          ALLOCATE ( bound(0:n_soil_layers_total) )
+          ALLOCATE ( bound_root_fr(0:n_soil_layers_total) )
+
+          kn = 0
+          ko = 0
+          bound(0) = 0.0_wp
+          DO k = 1, n_soil_layers_total-1
+             IF ( zs_layer(kn) <= zs_ref(ko) )  THEN
+                bound(k) = zs_layer(kn)
+                bound_root_fr(k) = ko
+                kn = kn + 1
+                IF ( kn > nzt_soil+1 )  THEN
+                   kn = nzt_soil
+                ENDIF
+             ELSE
+                bound(k) = zs_ref(ko)
+                bound_root_fr(k) = ko
+                ko = ko + 1
+                IF ( ko > 3 )  THEN
+                   ko = 3
+                ENDIF
+             ENDIF
+
+          ENDDO
+
+!
+!--       Integrate over all soil layers based on the four-layer root fraction
+          kzs = 1
+          root_fraction = 0.0_wp
+          DO k = 0, n_soil_layers_total-2
+             kroot = bound_root_fr(k+1)
+             root_fraction(kzs-1) = root_fraction(kzs-1)                       &
+                                + root_distribution(kroot,vegetation_type)     &
+                                / dz_soil_ref(kroot) * ( bound(k+1) - bound(k) )
+
+             IF ( bound(k+1) == zs_layer(kzs-1) )  THEN
+                kzs = kzs+1
+             ENDIF
+          ENDDO
+
+
+!
+!--       Normalize so that the sum of all fractions equals one
+          root_fraction = root_fraction / SUM(root_fraction)
+
+          DEALLOCATE ( bound )
+          DEALLOCATE ( bound_root_fr )
+
+!
+!--       Map calculated root fractions
+          DO  m = 1, surf_lsm_h%ns
+             DO  k = nzb_soil, nzt_soil 
+                IF ( surf_lsm_h%pavement_surface(m)  .AND.                     &
+                     k <= surf_lsm_h%nzt_pavement(m) )  THEN
+                   surf_lsm_h%root_fr(k,m) = 0.0_wp
+                ELSE
+                   surf_lsm_h%root_fr(k,m) = root_fraction(k)
+                ENDIF
+
+             ENDDO
+!
+!--          Normalize so that the sum = 1. Only relevant when the root         
+!--          distribution was set to zero due to pavement at some layers.
+             IF ( SUM( surf_lsm_h%root_fr(:,m) ) > 0.0_wp )  THEN
+                DO k = nzb_soil, nzt_soil
+                   surf_lsm_h%root_fr(k,m) = surf_lsm_h%root_fr(k,m)           &
+                   / SUM( surf_lsm_h%root_fr(:,m) )
+                ENDDO
+             ENDIF
+          ENDDO
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                DO  k = nzb_soil, nzt_soil
+                   IF ( surf_lsm_v(l)%pavement_surface(m)  .AND.               &
+                        k <= surf_lsm_v(l)%nzt_pavement(m) )  THEN
+                      surf_lsm_v(l)%root_fr(k,m) = 0.0_wp
+                   ELSE
+                      surf_lsm_v(l)%root_fr(k,m) = root_fraction(k)
+                   ENDIF
+                ENDDO
+!
+!--             Normalize so that the sum = 1. Only relevant when the root      
+!--             distribution was set to zero due to pavement at some layers.
+                IF ( SUM( surf_lsm_v(l)%root_fr(:,m) ) > 0.0_wp )  THEN
+                   DO  k = nzb_soil, nzt_soil  
+                      surf_lsm_v(l)%root_fr(k,m) = surf_lsm_v(l)%root_fr(k,m)  &
+                      / SUM( surf_lsm_v(l)%root_fr(:,m) )
+                   ENDDO
+                ENDIF
+             ENDDO
+           ENDDO
+       ENDIF
+!
+!--    Level 3 initialization of root distribution.
+!--    Take value from file
+       IF ( root_area_density_lsm_f%from_file )  THEN
+          DO  m = 1, surf_lsm_h%ns
+             IF ( surf_lsm_h%vegetation_surface(m) )  THEN
+                i = surf_lsm_h%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,            &
+                                             surf_lsm_v(l)%building_covered(m) ) 
+                j = surf_lsm_h%j(m) + MERGE( 0, surf_lsm_v(l)%joff,            &
+                                             surf_lsm_v(l)%building_covered(m) ) 
+                DO  k = nzb_soil, nzt_soil 
+                   surf_lsm_h%root_fr(k,m) = root_area_density_lsm_f%var(k,j,i) 
+                ENDDO
+
+             ENDIF
+          ENDDO
+
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                IF ( surf_lsm_v(l)%vegetation_surface(m) )  THEN
+                   i = surf_lsm_v(l)%i(m) + MERGE( 0, surf_lsm_v(l)%ioff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+                   j = surf_lsm_v(l)%j(m) + MERGE( 0, surf_lsm_v(l)%joff,      &
+                                                   surf_lsm_v(l)%building_covered(m) ) 
+
+                   DO  k = nzb_soil, nzt_soil 
+                      surf_lsm_v(l)%root_fr(k,m) = root_area_density_lsm_f%var(k,j,i) 
+                   ENDDO
+
+                ENDIF
+             ENDDO
+          ENDDO
+
+       ENDIF
+ 
+!
+!--    Possibly do user-defined actions (e.g. define heterogeneous land surface)
+       CALL user_init_land_surface
+
+
+!
+!--    Calculate new roughness lengths (for water surfaces only, i.e. only 
+!-     horizontal surfaces)
+       IF ( .NOT. constant_roughness )  CALL calc_z0_water_surface
+
+       t_soil_h_p    = t_soil_h
+       m_soil_h_p    = m_soil_h
+       m_liq_h_p     = m_liq_h
+       t_surface_h_p = t_surface_h
+
+       t_soil_v_p    = t_soil_v
+       m_soil_v_p    = m_soil_v
+       m_liq_v_p     = m_liq_v
+       t_surface_v_p = t_surface_v
+
+
+
+!--    Store initial profiles of t_soil and m_soil (assuming they are 
+!--    horizontally homogeneous on this PE)
+!--    DEACTIVATED FOR NOW - leads to error when number of locations with
+!--    soil model is zero on a PE.
+!        hom(nzb_soil:nzt_soil,1,90,:)  = SPREAD( t_soil_h%var_2d(nzb_soil:nzt_soil,1),  &
+!                                                 2, statistic_regions+1 )
+!        hom(nzb_soil:nzt_soil,1,92,:)  = SPREAD( m_soil_h%var_2d(nzb_soil:nzt_soil,1),  & 
+!                                                 2, statistic_regions+1 )
+
+!
+!--    Finally, make some consistency checks. 
+!--    Ceck for illegal combination of LAI and vegetation coverage.
+       IF ( ANY( .NOT. surf_lsm_h%pavement_surface  .AND.                      &
+                 surf_lsm_h%lai == 0.0_wp  .AND.  surf_lsm_h%c_veg == 1.0_wp ) &
+          )  THEN
+          message_string = 'For non-pavement surfaces the combination ' //     &
+                           ' lai = 0.0 and c_veg = 1.0 is not allowed.'
+          CALL message( 'lsm_rrd_local', 'PA0999', 2, 2, 0, 6, 0 )
+       ENDIF
+
+       DO  l = 0, 3
+          IF ( ANY( .NOT. surf_lsm_v(l)%pavement_surface  .AND.                &
+                    surf_lsm_v(l)%lai == 0.0_wp  .AND.                         &
+                    surf_lsm_v(l)%c_veg == 1.0_wp ) )  THEN
+             message_string = 'For non-pavement surfaces the combination ' //  &
+                              ' lai = 0.0 and c_veg = 1.0 is not allowed.'
+             CALL message( 'lsm_rrd_local', 'PA0999', 2, 2, 0, 6, 0 )
+          ENDIF
+       ENDDO
+!
+!--    Check if roughness length for momentum, heat, or moisture exceed 
+!--    surface-layer height and decrease local roughness length where 
+!--    necessary. 
+       DO  m = 1, surf_lsm_h%ns
+          IF ( surf_lsm_h%z0(m) >= surf_lsm_h%z_mo(m) )  THEN
+          
+             surf_lsm_h%z0(m) = 0.9_wp * surf_lsm_h%z_mo(m)
+             
+             WRITE( message_string, * ) 'z0 exceeds surface-layer height ' //  &
+                            'at horizontal natural surface and is ' //         &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_h%i(m), surf_lsm_h%j(m)
+             CALL message( 'land_surface_model_mod', 'PA0503',                 &
+                            0, 0, 0, 6, 0 )
+          ENDIF
+          IF ( surf_lsm_h%z0h(m) >= surf_lsm_h%z_mo(m) )  THEN
+          
+             surf_lsm_h%z0h(m) = 0.9_wp * surf_lsm_h%z_mo(m)
+             surf_lsm_h%z0q(m) = 0.9_wp * surf_lsm_h%z_mo(m)
+             
+             WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // &
+                            'at horizontal natural surface and is ' //         &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_h%i(m), surf_lsm_h%j(m)
+             CALL message( 'land_surface_model_mod', 'PA0507',                 &
+                            0, 0, 0, 6, 0 )
+          ENDIF
+       ENDDO
+       
+       DO  l = 0, 3
+          DO  m = 1, surf_lsm_v(l)%ns
+             IF ( surf_lsm_v(l)%z0(m) >= surf_lsm_v(l)%z_mo(m) )  THEN
+          
+                surf_lsm_v(l)%z0(m) = 0.9_wp * surf_lsm_v(l)%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0 exceeds surface-layer height '//&
+                            'at vertical natural surface and is ' //           &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_v(l)%i(m)+surf_lsm_v(l)%ioff,             &
+                            surf_lsm_v(l)%j(m)+surf_lsm_v(l)%joff
+                CALL message( 'land_surface_model_mod', 'PA0503',              &
+                            0, 0, 0, 6, 0 )
+             ENDIF
+             IF ( surf_lsm_v(l)%z0h(m) >= surf_lsm_v(l)%z_mo(m) )  THEN
+          
+                surf_lsm_v(l)%z0h(m) = 0.9_wp * surf_lsm_v(l)%z_mo(m)
+                surf_lsm_v(l)%z0q(m) = 0.9_wp * surf_lsm_v(l)%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0h exceeds surface-layer height '//&
+                            'at vertical natural surface and is ' //           &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_v(l)%i(m)+surf_lsm_v(l)%ioff,             &
+                            surf_lsm_v(l)%j(m)+surf_lsm_v(l)%joff
+                CALL message( 'land_surface_model_mod', 'PA0507',              &
+                            0, 0, 0, 6, 0 )
+             ENDIF
+          ENDDO
+       ENDDO      
+
+    END SUBROUTINE lsm_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate land surface model arrays and define pointers
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsm_init_arrays
+    
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  l !< index indicating facing of surface array 
+   
+       ALLOCATE ( root_extr(nzb_soil:nzt_soil) )
+       root_extr = 0.0_wp 
+       
+!
+!--    Allocate surface and soil temperature / humidity. Please note, 
+!--    these arrays are allocated according to surface-data structure,
+!--    even if they do not belong to the data type due to the 
+!--    pointer arithmetric (TARGET attribute is not allowed in a data-type). 
+#if defined( __nopointer )
+!
+!--    Horizontal surfaces
+       ALLOCATE ( m_liq_h_p%var_1d(1:surf_lsm_h%ns)                      )
+       ALLOCATE ( t_surface_h%var_1d(1:surf_lsm_h%ns)                    )
+       ALLOCATE ( t_surface_h_p%var_1d(1:surf_lsm_h%ns)                  )
+       ALLOCATE ( m_soil_h_p%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns)   )
+       ALLOCATE ( t_soil_h_p%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) )
+
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          ALLOCATE ( m_liq_v(l)%var_1d(1:surf_lsm_v(l)%ns)                        )
+          ALLOCATE ( m_liq_v_p(l)%var_1d(1:surf_lsm_v(l)%ns)                      )
+          ALLOCATE ( t_surface_v(l)%var_1d(1:surf_lsm_v(l)%ns)                    )
+          ALLOCATE ( t_surface_v_p(l)%var_1d(1:surf_lsm_v(l)%ns)                  )
+          ALLOCATE ( m_soil_v(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)     )
+          ALLOCATE ( m_soil_v_p(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)   )
+          ALLOCATE ( t_soil_v(l)%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_v(l)%ns)   )
+          ALLOCATE ( t_soil_v_p(l)%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_v(l)%ns) )
+       ENDDO
+!
+!--    Allocate soil temperature and moisture. As these variables might be 
+!--    already allocated in case of restarts, check this. 
+       IF ( .NOT. ALLOCATED( m_liq_h%var_1d ) )                                &
+          ALLOCATE ( m_liq_h%var_1d(1:surf_lsm_h%ns) )
+       IF ( .NOT. ALLOCATED( m_soil_h%var_2d ) )                               &
+          ALLOCATE ( m_soil_h%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns) )
+       IF ( .NOT. ALLOCATED( t_soil_h%var_2d ) )                               &
+          ALLOCATE ( t_soil_h%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns) )
+
+       DO  l = 0, 3
+          IF ( .NOT. ALLOCATED( m_liq_v(l)%var_1d ) )                          &
+             ALLOCATE ( m_liq_v(l)%var_1d(1:surf_lsm_v(l)%ns) )
+          IF ( .NOT. ALLOCATED( m_soil_v(l)%var_2d ) )                         &
+             ALLOCATE ( m_soil_v(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) )
+          IF ( .NOT. ALLOCATED( t_soil_v(l)%var_2d ) )                         &
+             ALLOCATE ( t_soil_v(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns) )
+       ENDDO
+#else
+!
+!--    Horizontal surfaces
+       ALLOCATE ( m_liq_h_1%var_1d(1:surf_lsm_h%ns)                      )
+       ALLOCATE ( m_liq_h_2%var_1d(1:surf_lsm_h%ns)                      )
+       ALLOCATE ( t_surface_h_1%var_1d(1:surf_lsm_h%ns)                  )
+       ALLOCATE ( t_surface_h_2%var_1d(1:surf_lsm_h%ns)                  )
+       ALLOCATE ( m_soil_h_1%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns)   )
+       ALLOCATE ( m_soil_h_2%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns)   )
+       ALLOCATE ( t_soil_h_1%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) )
+       ALLOCATE ( t_soil_h_2%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_h%ns) )
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          ALLOCATE ( m_liq_v_1(l)%var_1d(1:surf_lsm_v(l)%ns)                      )
+          ALLOCATE ( m_liq_v_2(l)%var_1d(1:surf_lsm_v(l)%ns)                      )
+          ALLOCATE ( t_surface_v_1(l)%var_1d(1:surf_lsm_v(l)%ns)                  )
+          ALLOCATE ( t_surface_v_2(l)%var_1d(1:surf_lsm_v(l)%ns)                  )
+          ALLOCATE ( m_soil_v_1(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)   )
+          ALLOCATE ( m_soil_v_2(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)   )
+          ALLOCATE ( t_soil_v_1(l)%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_v(l)%ns) )
+          ALLOCATE ( t_soil_v_2(l)%var_2d(nzb_soil:nzt_soil+1,1:surf_lsm_v(l)%ns) )
+       ENDDO
+#endif
+!
+!--    Allocate array for heat flux in W/m2, required for radiation?
+!--    Consider to remove this array
+       ALLOCATE( surf_lsm_h%surfhf(1:surf_lsm_h%ns) )
+       DO  l = 0, 3
+          ALLOCATE( surf_lsm_v(l)%surfhf(1:surf_lsm_v(l)%ns) )
+       ENDDO
+
+
+!
+!--    Allocate intermediate timestep arrays
+!--    Horizontal surfaces
+       ALLOCATE ( tm_liq_h_m%var_1d(1:surf_lsm_h%ns)                     )
+       ALLOCATE ( tt_surface_h_m%var_1d(1:surf_lsm_h%ns)                 )
+       ALLOCATE ( tm_soil_h_m%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns)  )
+       ALLOCATE ( tt_soil_h_m%var_2d(nzb_soil:nzt_soil,1:surf_lsm_h%ns)  ) 
+!
+!--    Horizontal surfaces
+       DO  l = 0, 3
+          ALLOCATE ( tm_liq_v_m(l)%var_1d(1:surf_lsm_v(l)%ns)                     )
+          ALLOCATE ( tt_surface_v_m(l)%var_1d(1:surf_lsm_v(l)%ns)                 )
+          ALLOCATE ( tm_soil_v_m(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)  )
+          ALLOCATE ( tt_soil_v_m(l)%var_2d(nzb_soil:nzt_soil,1:surf_lsm_v(l)%ns)  )
+       ENDDO 
+
+!
+!--    Allocate 2D vegetation model arrays
+!--    Horizontal surfaces
+       ALLOCATE ( surf_lsm_h%building_surface(1:surf_lsm_h%ns)    )
+       ALLOCATE ( surf_lsm_h%c_liq(1:surf_lsm_h%ns)               )
+       ALLOCATE ( surf_lsm_h%c_surface(1:surf_lsm_h%ns)           )
+       ALLOCATE ( surf_lsm_h%c_veg(1:surf_lsm_h%ns)               )
+       ALLOCATE ( surf_lsm_h%f_sw_in(1:surf_lsm_h%ns)             )
+       ALLOCATE ( surf_lsm_h%ghf(1:surf_lsm_h%ns)                 )
+       ALLOCATE ( surf_lsm_h%g_d(1:surf_lsm_h%ns)                 )
+       ALLOCATE ( surf_lsm_h%lai(1:surf_lsm_h%ns)                 )
+       ALLOCATE ( surf_lsm_h%lambda_surface_u(1:surf_lsm_h%ns)    )
+       ALLOCATE ( surf_lsm_h%lambda_surface_s(1:surf_lsm_h%ns)    )
+       ALLOCATE ( surf_lsm_h%nzt_pavement(1:surf_lsm_h%ns)        )
+       ALLOCATE ( surf_lsm_h%pavement_surface(1:surf_lsm_h%ns)    )
+       ALLOCATE ( surf_lsm_h%qsws_soil(1:surf_lsm_h%ns)           )
+       ALLOCATE ( surf_lsm_h%qsws_liq(1:surf_lsm_h%ns)            )
+       ALLOCATE ( surf_lsm_h%qsws_veg(1:surf_lsm_h%ns)            )
+       ALLOCATE ( surf_lsm_h%rad_net_l(1:surf_lsm_h%ns)           ) 
+       ALLOCATE ( surf_lsm_h%r_a(1:surf_lsm_h%ns)                 )
+       ALLOCATE ( surf_lsm_h%r_canopy(1:surf_lsm_h%ns)            )
+       ALLOCATE ( surf_lsm_h%r_soil(1:surf_lsm_h%ns)              )
+       ALLOCATE ( surf_lsm_h%r_soil_min(1:surf_lsm_h%ns)          )
+       ALLOCATE ( surf_lsm_h%r_s(1:surf_lsm_h%ns)                 )
+       ALLOCATE ( surf_lsm_h%r_canopy_min(1:surf_lsm_h%ns)        )
+       ALLOCATE ( surf_lsm_h%vegetation_surface(1:surf_lsm_h%ns)  )
+       ALLOCATE ( surf_lsm_h%water_surface(1:surf_lsm_h%ns)       )
+
+       surf_lsm_h%water_surface        = .FALSE.
+       surf_lsm_h%pavement_surface     = .FALSE.
+       surf_lsm_h%vegetation_surface   = .FALSE. 
+
+!
+!--    Set default values
+       surf_lsm_h%r_canopy_min = 0.0_wp
+
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          ALLOCATE ( surf_lsm_v(l)%building_surface(1:surf_lsm_v(l)%ns)    )
+          ALLOCATE ( surf_lsm_v(l)%c_liq(1:surf_lsm_v(l)%ns)               )
+          ALLOCATE ( surf_lsm_v(l)%c_surface(1:surf_lsm_v(l)%ns)           )
+          ALLOCATE ( surf_lsm_v(l)%c_veg(1:surf_lsm_v(l)%ns)               )
+          ALLOCATE ( surf_lsm_v(l)%f_sw_in(1:surf_lsm_v(l)%ns)             )
+          ALLOCATE ( surf_lsm_v(l)%ghf(1:surf_lsm_v(l)%ns)                 )
+          ALLOCATE ( surf_lsm_v(l)%g_d(1:surf_lsm_v(l)%ns)                 )
+          ALLOCATE ( surf_lsm_v(l)%lai(1:surf_lsm_v(l)%ns)                 )
+          ALLOCATE ( surf_lsm_v(l)%lambda_surface_u(1:surf_lsm_v(l)%ns)    )
+          ALLOCATE ( surf_lsm_v(l)%lambda_surface_s(1:surf_lsm_v(l)%ns)    )
+          ALLOCATE ( surf_lsm_v(l)%nzt_pavement(1:surf_lsm_v(l)%ns)        )
+          ALLOCATE ( surf_lsm_v(l)%pavement_surface(1:surf_lsm_v(l)%ns)    )
+          ALLOCATE ( surf_lsm_v(l)%qsws_soil(1:surf_lsm_v(l)%ns)           )
+          ALLOCATE ( surf_lsm_v(l)%qsws_liq(1:surf_lsm_v(l)%ns)            )
+          ALLOCATE ( surf_lsm_v(l)%qsws_veg(1:surf_lsm_v(l)%ns)            )
+          ALLOCATE ( surf_lsm_v(l)%rad_net_l(1:surf_lsm_v(l)%ns)           )
+          ALLOCATE ( surf_lsm_v(l)%r_a(1:surf_lsm_v(l)%ns)                 )
+          ALLOCATE ( surf_lsm_v(l)%r_canopy(1:surf_lsm_v(l)%ns)            )
+          ALLOCATE ( surf_lsm_v(l)%r_soil(1:surf_lsm_v(l)%ns)              )
+          ALLOCATE ( surf_lsm_v(l)%r_soil_min(1:surf_lsm_v(l)%ns)          )
+          ALLOCATE ( surf_lsm_v(l)%r_s(1:surf_lsm_v(l)%ns)                 )
+          ALLOCATE ( surf_lsm_v(l)%r_canopy_min(1:surf_lsm_v(l)%ns)        )
+          ALLOCATE ( surf_lsm_v(l)%vegetation_surface(1:surf_lsm_v(l)%ns)  )
+          ALLOCATE ( surf_lsm_v(l)%water_surface(1:surf_lsm_v(l)%ns)       )
+
+          surf_lsm_v(l)%water_surface       = .FALSE.
+          surf_lsm_v(l)%pavement_surface    = .FALSE.
+          surf_lsm_v(l)%vegetation_surface  = .FALSE. 
+          
+
+!
+!--       Set default values
+          surf_lsm_v(l)%r_canopy_min = 0.0_wp
+        
+       ENDDO
+
+   
+#if ! defined( __nopointer )
+!
+!--    Initial assignment of the pointers
+!--    Horizontal surfaces
+       t_soil_h    => t_soil_h_1;    t_soil_h_p    => t_soil_h_2
+       t_surface_h => t_surface_h_1; t_surface_h_p => t_surface_h_2
+       m_soil_h    => m_soil_h_1;    m_soil_h_p    => m_soil_h_2
+       m_liq_h     => m_liq_h_1;     m_liq_h_p     => m_liq_h_2
+!
+!--    Vertical surfaces
+       t_soil_v    => t_soil_v_1;    t_soil_v_p    => t_soil_v_2
+       t_surface_v => t_surface_v_1; t_surface_v_p => t_surface_v_2
+       m_soil_v    => m_soil_v_1;    m_soil_v_p    => m_soil_v_2
+       m_liq_v     => m_liq_v_1;     m_liq_v_p     => m_liq_v_2
+
+#endif
+
+
+    END SUBROUTINE lsm_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &lsmpar for land surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsm_parin
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
+       
+       NAMELIST /lsm_par/         alpha_vangenuchten, c_surface,               &
+                                  canopy_resistance_coefficient,               &
+                                  constant_roughness,                          &
+                                  conserve_water_content,                      &
+                                  deep_soil_temperature,                       &
+                                  dz_soil,                                     &
+                                  f_shortwave_incoming, field_capacity,        & 
+                                  aero_resist_kray, hydraulic_conductivity,    &
+                                  lambda_surface_stable,                       &
+                                  lambda_surface_unstable, leaf_area_index,    &
+                                  l_vangenuchten, min_canopy_resistance,       &
+                                  min_soil_resistance, n_vangenuchten,         &
+                                  pavement_depth_level,                        &
+                                  pavement_heat_capacity,                      &
+                                  pavement_heat_conduct, pavement_type,        &
+                                  residual_moisture, root_fraction,            &
+                                  saturation_moisture, skip_time_do_lsm,       &
+                                  soil_moisture, soil_temperature,             &
+                                  soil_type,                                   &
+                                  surface_type,                                &
+                                  vegetation_coverage, vegetation_type,        &
+                                  water_temperature, water_type,               &
+                                  wilting_point, z0_vegetation,                &
+                                  z0h_vegetation, z0q_vegetation, z0_water,    &
+                                  z0h_water, z0q_water, z0_pavement,           &
+                                  z0h_pavement, z0q_pavement
+
+       NAMELIST /land_surface_parameters/                                      &
+                                  alpha_vangenuchten, c_surface,               &
+                                  canopy_resistance_coefficient,               &
+                                  constant_roughness,                          &
+                                  conserve_water_content,                      &
+                                  deep_soil_temperature,                       &
+                                  dz_soil,                                     &
+                                  f_shortwave_incoming, field_capacity,        & 
+                                  aero_resist_kray, hydraulic_conductivity,    &
+                                  lambda_surface_stable,                       &
+                                  lambda_surface_unstable, leaf_area_index,    &
+                                  l_vangenuchten, min_canopy_resistance,       &
+                                  min_soil_resistance, n_vangenuchten,         &
+                                  pavement_depth_level,                        &
+                                  pavement_heat_capacity,                      &
+                                  pavement_heat_conduct, pavement_type,        &
+                                  residual_moisture, root_fraction,            &
+                                  saturation_moisture, skip_time_do_lsm,       &
+                                  soil_moisture, soil_temperature,             &
+                                  soil_type,                                   &
+                                  surface_type,                                &
+                                  vegetation_coverage, vegetation_type,        &
+                                  water_temperature, water_type,               &
+                                  wilting_point, z0_vegetation,                &
+                                  z0h_vegetation, z0q_vegetation, z0_water,    &
+                                  z0h_water, z0q_water, z0_pavement,           &
+                                  z0h_pavement, z0q_pavement
+                                  
+       line = ' '
+  
+!
+!--    Try to find land surface model package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&land_surface_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, land_surface_parameters, ERR = 10 )
+
+!
+!--    Set flag that indicates that the land surface model is switched on
+       land_surface = .TRUE.
+       
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'land_surface_parameters', line )
+!
+!--    Try to find old namelist
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&lsm_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, lsm_par, ERR = 13, END = 14 )
+
+       message_string = 'namelist lsm_par is deprecated and will be ' // &
+                     'removed in near future. Please use namelist ' //   &
+                     'land_surface_parameters instead'
+       CALL message( 'lsm_parin', 'PA0487', 0, 1, 0, 6, 0 )
+       
+!
+!--    Set flag that indicates that the land surface model is switched on
+       land_surface = .TRUE.
+       
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'lsm_par', line )
+
+
+ 14    CONTINUE
+       
+
+    END SUBROUTINE lsm_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Soil model as part of the land surface model. The model predicts soil
+!> temperature and water content.
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsm_soil_model( horizontal, l, calc_soil_moisture )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k       !< running index
+       INTEGER(iwp) ::  l       !< surface-data type index indication facing
+       INTEGER(iwp) ::  m       !< running index
+
+       LOGICAL, INTENT(IN) ::  calc_soil_moisture !< flag indicating whether soil moisture shall be calculated or not.
+
+       LOGICAL      ::  horizontal !< flag indication horizontal wall, required to set pointer accordingly
+
+       REAL(wp)     ::  h_vg !< Van Genuchten coef. h
+
+       REAL(wp), DIMENSION(nzb_soil:nzt_soil) :: gamma_temp,  & !< temp. gamma
+                                                 lambda_temp, & !< temp. lambda
+                                                 tend           !< tendency
+
+       TYPE(surf_type_lsm), POINTER ::  surf_m_soil
+       TYPE(surf_type_lsm), POINTER ::  surf_m_soil_p
+       TYPE(surf_type_lsm), POINTER ::  surf_t_soil
+       TYPE(surf_type_lsm), POINTER ::  surf_t_soil_p
+       TYPE(surf_type_lsm), POINTER ::  surf_tm_soil_m
+       TYPE(surf_type_lsm), POINTER ::  surf_tt_soil_m
+
+       TYPE(surf_type), POINTER  ::  surf  !< surface-date type variable
+
+       IF ( horizontal )  THEN
+          surf           => surf_lsm_h
+
+          surf_m_soil    => m_soil_h
+          surf_m_soil_p  => m_soil_h_p
+          surf_t_soil    => t_soil_h
+          surf_t_soil_p  => t_soil_h_p
+          surf_tm_soil_m => tm_soil_h_m
+          surf_tt_soil_m => tt_soil_h_m
+       ELSE
+          surf           => surf_lsm_v(l)
+
+          surf_m_soil    => m_soil_v(l)
+          surf_m_soil_p  => m_soil_v_p(l)
+          surf_t_soil    => t_soil_v(l)
+          surf_t_soil_p  => t_soil_v_p(l)
+          surf_tm_soil_m => tm_soil_v_m(l)
+          surf_tt_soil_m => tt_soil_v_m(l)
+       ENDIF
+
+       DO  m = 1, surf%ns
+
+          IF (  .NOT.  surf%water_surface(m) )  THEN
+             DO  k = nzb_soil, nzt_soil
+
+                IF ( surf%pavement_surface(m)  .AND.                           &
+                     k <= surf%nzt_pavement(m) )  THEN
+                   
+                   surf%rho_c_total(k,m) = surf%rho_c_total_def(k,m)
+                   lambda_temp(k)        = surf%lambda_h_def(k,m) 
+
+                ELSE            
+!
+!--                Calculate volumetric heat capacity of the soil, taking 
+!--                into account water content 
+                   surf%rho_c_total(k,m) = (rho_c_soil *                       &
+                                               ( 1.0_wp - surf%m_sat(k,m) )    &
+                                               + rho_c_water * surf_m_soil%var_2d(k,m) )
+
+!
+!--                Calculate soil heat conductivity at the center of the soil
+!--                layers
+                   lambda_h_sat = lambda_h_sm**(1.0_wp - surf%m_sat(k,m)) *    &
+                                  lambda_h_water ** surf_m_soil%var_2d(k,m)
+
+                   ke = 1.0_wp + LOG10( MAX( 0.1_wp, surf_m_soil%var_2d(k,m) / &
+                                                     surf%m_sat(k,m) ) )
+
+                   lambda_temp(k) = ke * (lambda_h_sat - lambda_h_dry) +       &
+                                    lambda_h_dry
+                ENDIF
+             ENDDO
+
+!
+!--          Calculate soil heat conductivity (lambda_h) at the _layer level 
+!--          using linear interpolation. For pavement surface, the
+!--          true pavement depth is considered
+             DO  k = nzb_soil, nzt_soil-1
+                   surf%lambda_h(k,m) = ( lambda_temp(k+1) + lambda_temp(k) )  &
+                                        * 0.5_wp
+             ENDDO
+             surf%lambda_h(nzt_soil,m) = lambda_temp(nzt_soil)
+
+!
+!--          Prognostic equation for soil temperature t_soil
+             tend(:) = 0.0_wp
+
+             tend(nzb_soil) = ( 1.0_wp / surf%rho_c_total(nzb_soil,m) ) *            &
+                    ( surf%lambda_h(nzb_soil,m) * ( surf_t_soil%var_2d(nzb_soil+1,m) &
+                      - surf_t_soil%var_2d(nzb_soil,m) ) * ddz_soil_center(nzb_soil) &
+                      + surf%ghf(m) ) * ddz_soil(nzb_soil)
+
+             DO  k = nzb_soil+1, nzt_soil
+                tend(k) = ( 1.0_wp / surf%rho_c_total(k,m) )                   &
+                          * (   surf%lambda_h(k,m)                             &
+                     * ( surf_t_soil%var_2d(k+1,m) - surf_t_soil%var_2d(k,m) ) &
+                     * ddz_soil_center(k)                                      &
+                     - surf%lambda_h(k-1,m)                                    &
+                     * ( surf_t_soil%var_2d(k,m) - surf_t_soil%var_2d(k-1,m) ) &
+                     * ddz_soil_center(k-1)                                    &
+                            ) * ddz_soil(k)
+
+             ENDDO
+
+             surf_t_soil_p%var_2d(nzb_soil:nzt_soil,m) =                       &
+                                       surf_t_soil%var_2d(nzb_soil:nzt_soil,m) &
+                                               + dt_3d * ( tsc(2)              &
+                                               * tend(nzb_soil:nzt_soil)       & 
+                                               + tsc(3)                        &
+                                               * surf_tt_soil_m%var_2d(nzb_soil:nzt_soil,m) )
+
+!
+!--          Calculate t_soil tendencies for the next Runge-Kutta step
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( intermediate_timestep_count == 1 )  THEN
+                   DO  k = nzb_soil, nzt_soil
+                      surf_tt_soil_m%var_2d(k,m) = tend(k)
+                   ENDDO
+                ELSEIF ( intermediate_timestep_count <                         &
+                         intermediate_timestep_count_max )  THEN
+                   DO  k = nzb_soil, nzt_soil
+                      surf_tt_soil_m%var_2d(k,m) = -9.5625_wp * tend(k) +      &
+                                                    5.3125_wp *                &
+                                                      surf_tt_soil_m%var_2d(k,m)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+
+             DO  k = nzb_soil, nzt_soil
+
+!
+!--             In order to prevent water tranport through paved surfaces, 
+!--             conductivity and diffusivity are set to zero
+                IF ( surf%pavement_surface(m)  .AND.                           &
+                     k <= surf%nzt_pavement(m) )  THEN
+                   lambda_temp(k) = 0.0_wp
+                   gamma_temp(k)  = 0.0_wp
+   
+                ELSE 
+    
+!
+!--                Calculate soil diffusivity at the center of the soil layers
+                   lambda_temp(k) = (- b_ch * surf%gamma_w_sat(k,m) * psi_sat  &
+                                    / surf%m_sat(k,m) ) * (                    &
+                                    MAX( surf_m_soil%var_2d(k,m),              &
+                                    surf%m_wilt(k,m) ) / surf%m_sat(k,m) )**(  &
+                                    b_ch + 2.0_wp )
+
+!
+!--                Parametrization of Van Genuchten
+!--                Calculate the hydraulic conductivity after Van Genuchten (1980)
+                   h_vg = ( ( ( surf%m_res(k,m) - surf%m_sat(k,m) ) /          &
+                              ( surf%m_res(k,m) -                              &
+                                MAX( surf_m_soil%var_2d(k,m), surf%m_wilt(k,m) )&
+                              )                                                &
+                            )**(                                               &
+                          surf%n_vg(k,m) / ( surf%n_vg(k,m) - 1.0_wp )         &
+                               ) - 1.0_wp                                      &
+                          )**( 1.0_wp / surf%n_vg(k,m) ) / surf%alpha_vg(k,m)
+
+                   gamma_temp(k) = surf%gamma_w_sat(k,m) * ( ( ( 1.0_wp +      &
+                          ( surf%alpha_vg(k,m) * h_vg )**surf%n_vg(k,m)        &
+                                                                  )**(         &
+                              1.0_wp - 1.0_wp / surf%n_vg(k,m)) - (            &
+                          surf%alpha_vg(k,m) * h_vg )**( surf%n_vg(k,m)        &
+                              - 1.0_wp) )**2 )                                 &
+                              / ( ( 1.0_wp + ( surf%alpha_vg(k,m) * h_vg       &
+                              )**surf%n_vg(k,m) )**( ( 1.0_wp  - 1.0_wp        &
+                              / surf%n_vg(k,m) ) *                             &
+                              ( surf%l_vg(k,m) + 2.0_wp) ) )
+
+                ENDIF
+
+             ENDDO
+
+
+             IF (  calc_soil_moisture )  THEN
+
+!
+!--             Prognostic equation for soil moisture content. Only performed,
+!--             when humidity is enabled in the atmosphere.
+                IF ( humidity )  THEN
+!
+!--                Calculate soil diffusivity (lambda_w) at the _layer level 
+!--                using linear interpolation. To do: replace this with
+!--                ECMWF-IFS Eq. 8.81
+                   DO  k = nzb_soil, nzt_soil-1
+                
+                      surf%lambda_w(k,m) = ( lambda_temp(k+1) + lambda_temp(k) )  &
+                                           * 0.5_wp
+                      surf%gamma_w(k,m)  = ( gamma_temp(k+1)  +  gamma_temp(k) )  &
+                                           * 0.5_wp
+                                            
+                   ENDDO
+!
+!
+!--                In case of a closed bottom (= water content is conserved), 
+!--                set hydraulic conductivity to zero to that no water will be 
+!--                lost in the bottom layer. As gamma_w is always a positive value,
+!--                it cannot be set to zero in case of purely dry soil since this
+!--                would cause accumulation of (non-existing) water in the lowest
+!--                soil layer
+                   IF ( conserve_water_content .AND.                           &
+                        surf_m_soil%var_2d(nzt_soil,m) /= 0.0_wp )  THEN
+
+                      surf%gamma_w(nzt_soil,m) = 0.0_wp
+                   ELSE
+                      surf%gamma_w(nzt_soil,m) = gamma_temp(nzt_soil)
+                   ENDIF     
+
+!--                The root extraction (= root_extr * qsws_veg / (rho_l     
+!--                * l_v)) ensures the mass conservation for water. The         
+!--                transpiration of plants equals the cumulative withdrawals by 
+!--                the roots in the soil. The scheme takes into account the 
+!--                availability of water in the soil layers as well as the root 
+!--                fraction in the respective layer. Layer with moisture below 
+!--                wilting point will not contribute, which reflects the 
+!--                preference of plants to take water from moister layers.
+!
+!--                Calculate the root extraction (ECMWF 7.69, the sum of 
+!--                root_extr = 1). The energy balance solver guarantees a 
+!--                positive transpiration, so that there is no need for an 
+!--                additional check.
+                   m_total = 0.0_wp
+                   DO  k = nzb_soil, nzt_soil
+                      IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt(k,m) )  THEN
+                         m_total = m_total + surf%root_fr(k,m)                 &
+                                * surf_m_soil%var_2d(k,m)
+                      ENDIF
+                   ENDDO  
+                   IF ( m_total > 0.0_wp )  THEN
+                      DO  k = nzb_soil, nzt_soil
+                         IF ( surf_m_soil%var_2d(k,m) > surf%m_wilt(k,m) )  THEN
+                            root_extr(k) = surf%root_fr(k,m)                   &
+                                           * surf_m_soil%var_2d(k,m) / m_total
+                         ELSE
+                            root_extr(k) = 0.0_wp
+                         ENDIF
+                      ENDDO
+                   ENDIF
+!
+!--                Prognostic equation for soil water content m_soil_h.
+                   tend(:) = 0.0_wp
+
+                   tend(nzb_soil) = ( surf%lambda_w(nzb_soil,m) *   (          &
+                         surf_m_soil%var_2d(nzb_soil+1,m)                      &
+                         - surf_m_soil%var_2d(nzb_soil,m) )                    &
+                         * ddz_soil_center(nzb_soil) - surf%gamma_w(nzb_soil,m)&
+                         - ( root_extr(nzb_soil) * surf%qsws_veg(m)            &
+                            + surf%qsws_soil(m) ) * drho_l_lv )                &
+                            * ddz_soil(nzb_soil)
+
+                   DO  k = nzb_soil+1, nzt_soil-1
+                      tend(k) = ( surf%lambda_w(k,m) * ( surf_m_soil%var_2d(k+1,m)  &
+                             - surf_m_soil%var_2d(k,m) ) * ddz_soil_center(k)    &
+                             - surf%gamma_w(k,m)                                 &
+                             - surf%lambda_w(k-1,m) * ( surf_m_soil%var_2d(k,m)  &
+                             - surf_m_soil%var_2d(k-1,m)) * ddz_soil_center(k-1) &
+                             + surf%gamma_w(k-1,m) - (root_extr(k)               &
+                             * surf%qsws_veg(m) * drho_l_lv)                     &
+                             ) * ddz_soil(k)
+                   ENDDO
+                   tend(nzt_soil) = ( - surf%gamma_w(nzt_soil,m)               &
+                                   - surf%lambda_w(nzt_soil-1,m)               &
+                                   * ( surf_m_soil%var_2d(nzt_soil,m)          &
+                                   - surf_m_soil%var_2d(nzt_soil-1,m))         &
+                                   * ddz_soil_center(nzt_soil-1)               &
+                                   + surf%gamma_w(nzt_soil-1,m) - (            &
+                                   root_extr(nzt_soil)                         &
+                                   * surf%qsws_veg(m) * drho_l_lv )            &
+                                  ) * ddz_soil(nzt_soil)             
+
+                   surf_m_soil_p%var_2d(nzb_soil:nzt_soil,m) =                 &
+                                       surf_m_soil%var_2d(nzb_soil:nzt_soil,m) &
+                                         + dt_3d * ( tsc(2) * tend(:)          &
+                                         + tsc(3) * surf_tm_soil_m%var_2d(:,m) )   
+   
+!
+!--                Account for dry soils (find a better solution here!)
+                   DO  k = nzb_soil, nzt_soil
+                      IF ( surf_m_soil_p%var_2d(k,m) < 0.0_wp )  surf_m_soil_p%var_2d(k,m) = 0.0_wp
+                   ENDDO
+  
+!
+!--                Calculate m_soil tendencies for the next Runge-Kutta step
+                   IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                      IF ( intermediate_timestep_count == 1 )  THEN
+                         DO  k = nzb_soil, nzt_soil
+                            surf_tm_soil_m%var_2d(k,m) = tend(k)
+                         ENDDO
+                      ELSEIF ( intermediate_timestep_count <                   &
+                               intermediate_timestep_count_max )  THEN
+                         DO  k = nzb_soil, nzt_soil
+                            surf_tm_soil_m%var_2d(k,m) = -9.5625_wp * tend(k)  &
+                                                    + 5.3125_wp                &
+                                                    * surf_tm_soil_m%var_2d(k,m)
+                         ENDDO
+
+                      ENDIF
+                      
+                   ENDIF
+                   
+                ENDIF
+
+             ENDIF
+
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE lsm_soil_model
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsm_swap_timelevel ( mod_count )
+
+       IMPLICIT NONE
+
+       INTEGER, INTENT(IN) :: mod_count
+
+#if defined( __nopointer )
+!
+!--    Horizontal surfaces
+       t_surface_h  = t_surface_h_p
+       t_soil_h     = t_soil_h_p
+       IF ( humidity )  THEN
+          m_soil_h    = m_soil_h_p
+          m_liq_h  = m_liq_h_p
+       ENDIF
+!
+!--    Vertical surfaces
+       t_surface_v  = t_surface_v_p
+       t_soil_v     = t_soil_v_p
+       IF ( humidity )  THEN
+          m_soil_v    = m_soil_v_p
+          m_liq_v  = m_liq_v_p
+       ENDIF
+
+#else
+    
+       SELECT CASE ( mod_count )
+
+          CASE ( 0 )
+!
+!--          Horizontal surfaces
+             t_surface_h  => t_surface_h_1; t_surface_h_p  => t_surface_h_2
+             t_soil_h     => t_soil_h_1;    t_soil_h_p     => t_soil_h_2
+             IF ( humidity )  THEN
+                m_soil_h  => m_soil_h_1;    m_soil_h_p     => m_soil_h_2
+                m_liq_h   => m_liq_h_1;     m_liq_h_p      => m_liq_h_2
+             ENDIF
+
+!
+!--          Vertical surfaces
+             t_surface_v  => t_surface_v_1; t_surface_v_p  => t_surface_v_2
+             t_soil_v     => t_soil_v_1;    t_soil_v_p     => t_soil_v_2
+             IF ( humidity )  THEN
+                m_soil_v  => m_soil_v_1;    m_soil_v_p     => m_soil_v_2
+                m_liq_v   => m_liq_v_1;     m_liq_v_p      => m_liq_v_2
+
+             ENDIF
+
+
+
+          CASE ( 1 )
+!
+!--          Horizontal surfaces
+             t_surface_h  => t_surface_h_2; t_surface_h_p  => t_surface_h_1
+             t_soil_h     => t_soil_h_2;    t_soil_h_p     => t_soil_h_1
+             IF ( humidity )  THEN
+                m_soil_h  => m_soil_h_2;    m_soil_h_p     => m_soil_h_1
+                m_liq_h   => m_liq_h_2;     m_liq_h_p      => m_liq_h_1
+
+             ENDIF
+!
+!--          Vertical surfaces
+             t_surface_v  => t_surface_v_2; t_surface_v_p  => t_surface_v_1
+             t_soil_v     => t_soil_v_2;    t_soil_v_p     => t_soil_v_1
+             IF ( humidity )  THEN
+                m_soil_v  => m_soil_v_2;    m_soil_v_p     => m_soil_v_1
+                m_liq_v   => m_liq_v_2;     m_liq_v_p      => m_liq_v_1
+             ENDIF
+
+       END SELECT
+#endif
+
+    END SUBROUTINE lsm_swap_timelevel
+
+
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data
+!------------------------------------------------------------------------------!
+SUBROUTINE lsm_3d_data_averaging( mode, variable )
+ 
+
+    USE control_parameters
+
+    USE indices
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode    !< 
+    CHARACTER (LEN=*) :: variable !< 
+
+    INTEGER(iwp) ::  i       !< 
+    INTEGER(iwp) ::  j       !< 
+    INTEGER(iwp) ::  k       !< 
+    INTEGER(iwp) ::  m       !< running index
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+             CASE ( 'c_liq*' )
+                IF ( .NOT. ALLOCATED( c_liq_av ) )  THEN
+                   ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                c_liq_av = 0.0_wp
+
+             CASE ( 'c_soil*' )
+                IF ( .NOT. ALLOCATED( c_soil_av ) )  THEN
+                   ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                c_soil_av = 0.0_wp
+
+             CASE ( 'c_veg*' )
+                IF ( .NOT. ALLOCATED( c_veg_av ) )  THEN
+                   ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                c_veg_av = 0.0_wp
+
+             CASE ( 'lai*' )
+                IF ( .NOT. ALLOCATED( lai_av ) )  THEN
+                   ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                lai_av = 0.0_wp
+
+             CASE ( 'm_liq*' )
+                IF ( .NOT. ALLOCATED( m_liq_av ) )  THEN
+                   ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                m_liq_av = 0.0_wp
+
+             CASE ( 'm_soil' )
+                IF ( .NOT. ALLOCATED( m_soil_av ) )  THEN
+                   ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                m_soil_av = 0.0_wp
+
+             CASE ( 'qsws_liq*' )
+                IF ( .NOT. ALLOCATED( qsws_liq_av ) )  THEN
+                   ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qsws_liq_av = 0.0_wp
+
+             CASE ( 'qsws_soil*' )
+                IF ( .NOT. ALLOCATED( qsws_soil_av ) )  THEN
+                   ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qsws_soil_av = 0.0_wp
+
+             CASE ( 'qsws_veg*' )
+                IF ( .NOT. ALLOCATED( qsws_veg_av ) )  THEN
+                   ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qsws_veg_av = 0.0_wp
+
+             CASE ( 'r_s*' )
+                IF ( .NOT. ALLOCATED( r_s_av ) )  THEN
+                   ALLOCATE( r_s_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                r_s_av = 0.0_wp
+
+             CASE ( 't_soil' )
+                IF ( .NOT. ALLOCATED( t_soil_av ) )  THEN
+                   ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                t_soil_av = 0.0_wp
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'c_liq*' )
+             IF ( ALLOCATED( c_liq_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   c_liq_av(j,i) = c_liq_av(j,i) + surf_lsm_h%c_liq(m)
+                ENDDO
+             ENDIF   
+
+          CASE ( 'c_soil*' )
+             IF ( ALLOCATED( c_soil_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   c_soil_av(j,i) = c_soil_av(j,i) + (1.0 - surf_lsm_h%c_veg(m))
+                ENDDO
+             ENDIF
+
+          CASE ( 'c_veg*' )
+             IF ( ALLOCATED( c_veg_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   c_veg_av(j,i) = c_veg_av(j,i) + surf_lsm_h%c_veg(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 'lai*' )
+             IF ( ALLOCATED( lai_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   lai_av(j,i) = lai_av(j,i) + surf_lsm_h%lai(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 'm_liq*' )
+             IF ( ALLOCATED( m_liq_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   m_liq_av(j,i) = m_liq_av(j,i) + m_liq_h%var_1d(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 'm_soil' )
+             IF ( ALLOCATED( m_soil_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   DO  k = nzb_soil, nzt_soil
+                      m_soil_av(k,j,i) = m_soil_av(k,j,i) + m_soil_h%var_2d(k,m)
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws_liq*' )
+             IF ( ALLOCATED( qsws_liq_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   qsws_liq_av(j,i) = qsws_liq_av(j,i) +                       &
+                                         surf_lsm_h%qsws_liq(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws_soil*' )
+             IF ( ALLOCATED( qsws_soil_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   qsws_soil_av(j,i) = qsws_soil_av(j,i) +                     &
+                                          surf_lsm_h%qsws_soil(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws_veg*' )
+             IF ( ALLOCATED(qsws_veg_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   qsws_veg_av(j,i) = qsws_veg_av(j,i) +                       &
+                                         surf_lsm_h%qsws_veg(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 'r_s*' )
+             IF ( ALLOCATED( r_s_av) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   r_s_av(j,i) = r_s_av(j,i) + surf_lsm_h%r_s(m)
+                ENDDO
+             ENDIF
+
+          CASE ( 't_soil' )
+             IF ( ALLOCATED( t_soil_av ) ) THEN 
+                DO  m = 1, surf_lsm_h%ns
+                   i   = surf_lsm_h%i(m)            
+                   j   = surf_lsm_h%j(m)
+                   DO  k = nzb_soil, nzt_soil
+                      t_soil_av(k,j,i) = t_soil_av(k,j,i) + t_soil_h%var_2d(k,m)
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'c_liq*' )
+             IF ( ALLOCATED( c_liq_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      c_liq_av(j,i) = c_liq_av(j,i)                            &
+                                      / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'c_soil*' )
+             IF ( ALLOCATED( c_soil_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      c_soil_av(j,i) = c_soil_av(j,i)                          &
+                                       / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'c_veg*' )
+             IF ( ALLOCATED( c_veg_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      c_veg_av(j,i) = c_veg_av(j,i)                            &
+                                      / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+         CASE ( 'lai*' )
+             IF ( ALLOCATED( lai_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      lai_av(j,i) = lai_av(j,i)                                &
+                                    / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'm_liq*' )
+             IF ( ALLOCATED( m_liq_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      m_liq_av(j,i) = m_liq_av(j,i)                            &
+                                      / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'm_soil' )
+             IF ( ALLOCATED( m_soil_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_soil, nzt_soil
+                         m_soil_av(k,j,i) = m_soil_av(k,j,i)                   &
+                                            / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws_liq*' )
+             IF ( ALLOCATED( qsws_liq_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      qsws_liq_av(j,i) = qsws_liq_av(j,i)                      &
+                                         / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws_soil*' )
+             IF ( ALLOCATED( qsws_soil_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      qsws_soil_av(j,i) = qsws_soil_av(j,i)                    &
+                                          / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws_veg*' )
+             IF ( ALLOCATED( qsws_veg_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      qsws_veg_av(j,i) = qsws_veg_av(j,i)                      &
+                                         / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'r_s*' )
+             IF ( ALLOCATED( r_s_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      r_s_av(j,i) = r_s_av(j,i)                                & 
+                                    / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 't_soil' )
+             IF ( ALLOCATED( t_soil_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb_soil, nzt_soil
+                         t_soil_av(k,j,i) = t_soil_av(k,j,i)                   &
+                                            / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+!
+!-- 
+
+       END SELECT
+
+    ENDIF
+
+END SUBROUTINE lsm_3d_data_averaging
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+     IMPLICIT NONE
+
+     CHARACTER (LEN=*), INTENT(IN)  ::  var         !< 
+     LOGICAL, INTENT(OUT)           ::  found       !< 
+     CHARACTER (LEN=*), INTENT(OUT) ::  grid_x      !< 
+     CHARACTER (LEN=*), INTENT(OUT) ::  grid_y      !< 
+     CHARACTER (LEN=*), INTENT(OUT) ::  grid_z      !< 
+
+     found  = .TRUE.
+
+!
+!--  Check for the grid
+     SELECT CASE ( TRIM( var ) )
+
+        CASE ( 'm_soil', 't_soil', 'm_soil_xy', 't_soil_xy', 'm_soil_xz',      &
+               't_soil_xz', 'm_soil_yz', 't_soil_yz' )
+           grid_x = 'x'
+           grid_y = 'y'
+           grid_z = 'zs'
+
+        CASE DEFAULT
+           found  = .FALSE.
+           grid_x = 'none'
+           grid_y = 'none'
+           grid_z = 'none'
+     END SELECT
+
+ END SUBROUTINE lsm_define_netcdf_grid
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_data_output_2d( av, variable, found, grid, mode, local_pf,     &
+                                two_d, nzb_do, nzt_do )
+ 
+    USE indices
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid     !< 
+    CHARACTER (LEN=*) ::  mode     !< 
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av      !< 
+    INTEGER(iwp) ::  i       !< running index 
+    INTEGER(iwp) ::  j       !< running index
+    INTEGER(iwp) ::  k       !< running index
+    INTEGER(iwp) ::  m       !< running index
+    INTEGER(iwp) ::  nzb_do  !< 
+    INTEGER(iwp) ::  nzt_do  !< 
+
+    LOGICAL      ::  found !< 
+    LOGICAL      ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+
+    found = .TRUE.
+
+    SELECT CASE ( TRIM( variable ) )
+!
+!--    Before data is transfered to local_pf, transfer is it 2D dummy variable and exchange ghost points therein. 
+!--    However, at this point this is only required for instantaneous arrays, time-averaged quantities are already exchanged. 
+       CASE ( 'c_liq*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = surf_lsm_h%c_liq(m) * surf_lsm_h%c_veg(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN
+               ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) )
+               c_liq_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = c_liq_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'c_soil*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = 1.0_wp - surf_lsm_h%c_veg(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN
+               ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) )
+               c_soil_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = c_soil_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'c_veg*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = surf_lsm_h%c_veg(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN
+               ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) )
+               c_veg_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = c_veg_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'lai*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = surf_lsm_h%lai(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( lai_av ) ) THEN
+               ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) )
+               lai_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = lai_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'm_liq*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = m_liq_h%var_1d(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( m_liq_av ) ) THEN
+               ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) )
+               m_liq_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = m_liq_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'm_soil_xy', 'm_soil_xz', 'm_soil_yz' )
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i   = surf_lsm_h%i(m)            
+                j   = surf_lsm_h%j(m)
+                DO k = nzb_soil, nzt_soil
+                   local_pf(i,j,k) = m_soil_h%var_2d(k,m)
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN
+               ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+               m_soil_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO k = nzb_soil, nzt_soil
+                      local_pf(i,j,k) = m_soil_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+          nzb_do = nzb_soil
+          nzt_do = nzt_soil
+
+          IF ( mode == 'xy' ) grid = 'zs'
+
+       CASE ( 'qsws_liq*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = surf_lsm_h%qsws_liq(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( qsws_liq_av ) ) THEN
+               ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) )
+               qsws_liq_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) =  qsws_liq_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'qsws_soil*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) =  surf_lsm_h%qsws_soil(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( qsws_soil_av ) ) THEN
+               ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) )
+               qsws_soil_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) =  qsws_soil_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'qsws_veg*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) =  surf_lsm_h%qsws_veg(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( qsws_veg_av ) ) THEN
+               ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) )
+               qsws_veg_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) =  qsws_veg_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+
+       CASE ( 'r_s*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i                   = surf_lsm_h%i(m)            
+                j                   = surf_lsm_h%j(m)
+                local_pf(i,j,nzb+1) = surf_lsm_h%r_s(m)
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( r_s_av ) ) THEN
+               ALLOCATE( r_s_av(nysg:nyng,nxlg:nxrg) )
+               r_s_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = r_s_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 't_soil_xy', 't_soil_xz', 't_soil_yz' )
+          IF ( av == 0 )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i   = surf_lsm_h%i(m)            
+                j   = surf_lsm_h%j(m)
+                DO k = nzb_soil, nzt_soil
+                   local_pf(i,j,k) = t_soil_h%var_2d(k,m)
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN
+               ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+               t_soil_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO k = nzb_soil, nzt_soil
+                      local_pf(i,j,k) = t_soil_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+          nzb_do = nzb_soil
+          nzt_do = nzt_soil
+
+          IF ( mode == 'xy' )  grid = 'zs'
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+ 
+ END SUBROUTINE lsm_data_output_2d
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_data_output_3d( av, variable, found, local_pf )
+ 
+
+    USE indices
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av    !< 
+    INTEGER(iwp) ::  i     !< 
+    INTEGER(iwp) ::  j     !< 
+    INTEGER(iwp) ::  k     !< 
+    INTEGER(iwp) ::  m     !< running index
+
+    LOGICAL      ::  found !< 
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_soil:nzt_soil) ::  local_pf !< 
+
+
+    found = .TRUE.
+
+
+    SELECT CASE ( TRIM( variable ) )
+!
+!--   Requires 3D exchange
+
+      CASE ( 'm_soil' )
+
+         IF ( av == 0 )  THEN
+            DO  m = 1, surf_lsm_h%ns
+                i   = surf_lsm_h%i(m)            
+                j   = surf_lsm_h%j(m)
+                DO  k = nzb_soil, nzt_soil
+                   local_pf(i,j,k) = m_soil_h%var_2d(k,m)
+                ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN
+               ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+               m_soil_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_soil, nzt_soil
+                     local_pf(i,j,k) = m_soil_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 't_soil' )
+
+         IF ( av == 0 )  THEN
+            DO  m = 1, surf_lsm_h%ns
+               i   = surf_lsm_h%i(m)            
+               j   = surf_lsm_h%j(m)
+               DO  k = nzb_soil, nzt_soil
+                  local_pf(i,j,k) = t_soil_h%var_2d(k,m)
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN
+               ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+               t_soil_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_soil, nzt_soil
+                     local_pf(i,j,k) = t_soil_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE lsm_data_output_3d
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Write restart data for land surface model. It is necessary to write 
+!> start_index and end_index several times.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lsm_wrd_local
+        
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=1) ::  dum    !< dummy to create correct string for creating variable string
+    INTEGER(iwp)      ::  l      !< index variable for surface orientation
+
+    CALL wrd_write_string( 'ns_h_on_file_lsm' )
+    WRITE ( 14 )  surf_lsm_h%ns
+
+    CALL wrd_write_string( 'ns_v_on_file_lsm' )
+    WRITE ( 14 )  surf_lsm_v(0:3)%ns
+
+
+    IF ( ALLOCATED( c_liq_av ) )  THEN
+       CALL wrd_write_string( 'c_liq_av' )
+       WRITE ( 14 )  c_liq_av
+    ENDIF
+
+    IF ( ALLOCATED( c_soil_av ) )  THEN
+       CALL wrd_write_string( 'c_soil_av' )
+       WRITE ( 14 )  c_soil_av
+    ENDIF
+
+    IF ( ALLOCATED( c_veg_av ) )  THEN
+       CALL wrd_write_string( 'c_veg_av' )
+       WRITE ( 14 )  c_veg_av
+    ENDIF
+
+    IF ( ALLOCATED( lai_av ) )  THEN
+       CALL wrd_write_string( 'lai_av' )
+       WRITE ( 14 )  lai_av
+    ENDIF
+
+    IF ( ALLOCATED( m_liq_av ) )  THEN
+       CALL wrd_write_string( 'm_liq_av' )
+       WRITE ( 14 )  m_liq_av
+    ENDIF
+
+    IF ( ALLOCATED( m_soil_av ) )  THEN
+       CALL wrd_write_string( 'm_soil_av' )
+       WRITE ( 14 )  m_soil_av
+    ENDIF
+
+    IF ( ALLOCATED( qsws_liq_av ) )  THEN
+       CALL wrd_write_string( 'qsws_liq_av' )
+       WRITE ( 14 )  qsws_liq_av
+    ENDIF
+
+    IF ( ALLOCATED( qsws_soil_av ) )  THEN
+       CALL wrd_write_string( 'qsws_soil_av' )
+       WRITE ( 14 )  qsws_soil_av
+    ENDIF
+
+    IF ( ALLOCATED( qsws_veg_av ) )  THEN
+       CALL wrd_write_string( 'qsws_veg_av' )
+       WRITE ( 14 )  qsws_veg_av
+    ENDIF
+
+    IF ( ALLOCATED( t_soil_av ) )  THEN
+       CALL wrd_write_string( 't_soil_av' )
+       WRITE ( 14 )  t_soil_av
+    ENDIF
+
+    CALL wrd_write_string( 'lsm_start_index_h' )
+    WRITE ( 14 )  surf_lsm_h%start_index
+
+    CALL wrd_write_string( 'lsm_end_index_h' )
+    WRITE ( 14 )  surf_lsm_h%end_index
+
+    CALL wrd_write_string( 't_soil_h' )
+    WRITE ( 14 )  t_soil_h%var_2d
+       
+
+       
+    DO  l = 0, 3
+
+       CALL wrd_write_string( 'lsm_start_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%start_index
+
+       CALL wrd_write_string( 'lsm_end_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%end_index
+
+       WRITE( dum, '(I1)')  l   
+
+       CALL wrd_write_string( 't_soil_v(' // dum // ')' )
+       WRITE ( 14 )  t_soil_v(l)%var_2d
+             
+    ENDDO
+
+    CALL wrd_write_string( 'lsm_start_index_h' )
+    WRITE ( 14 )  surf_lsm_h%start_index
+
+    CALL wrd_write_string( 'lsm_end_index_h' )
+    WRITE ( 14 )  surf_lsm_h%end_index
+
+    CALL wrd_write_string( 'm_soil_h' )
+    WRITE ( 14 )  m_soil_h%var_2d
+
+    DO  l = 0, 3
+
+       CALL wrd_write_string( 'lsm_start_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%start_index
+
+       CALL wrd_write_string( 'lsm_end_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%end_index
+
+       WRITE( dum, '(I1)')  l   
+
+       CALL wrd_write_string( 'm_soil_v(' // dum // ')' )
+       WRITE ( 14 )  m_soil_v(l)%var_2d 
+      
+    ENDDO
+
+    CALL wrd_write_string( 'lsm_start_index_h' )
+    WRITE ( 14 )  surf_lsm_h%start_index
+
+    CALL wrd_write_string( 'lsm_end_index_h' )
+    WRITE ( 14 )  surf_lsm_h%end_index
+
+    CALL wrd_write_string( 'm_liq_h' )
+    WRITE ( 14 )  m_liq_h%var_1d
+       
+    DO  l = 0, 3
+
+       CALL wrd_write_string( 'lsm_start_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%start_index
+
+       CALL wrd_write_string( 'lsm_end_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%end_index
+
+       WRITE( dum, '(I1)')  l   
+
+       CALL wrd_write_string( 'm_liq_v(' // dum // ')' )
+       WRITE ( 14 )  m_liq_v(l)%var_1d     
+                
+    ENDDO
+
+    CALL wrd_write_string( 'lsm_start_index_h' )
+    WRITE ( 14 )  surf_lsm_h%start_index
+
+    CALL wrd_write_string( 'lsm_end_index_h' )
+    WRITE ( 14 )  surf_lsm_h%end_index
+
+    CALL wrd_write_string( 't_surface_h' )
+    WRITE ( 14 )  t_surface_h%var_1d
+
+    DO  l = 0, 3
+
+       CALL wrd_write_string( 'lsm_start_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%start_index
+
+       CALL wrd_write_string( 'lsm_end_index_v' )
+       WRITE ( 14 )  surf_lsm_v(l)%end_index
+
+       WRITE( dum, '(I1)')  l   
+
+       CALL wrd_write_string( 't_surface_v(' // dum // ')' )
+       WRITE ( 14 )  t_surface_v(l)%var_1d     
+       
+    ENDDO
+
+
+ END SUBROUTINE lsm_wrd_local
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Soubroutine reads lsm data from restart file(s)
+!------------------------------------------------------------------------------!
+SUBROUTINE lsm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,           &
+                          nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,    &
+                          nys_on_file, tmp_2d, found )
+ 
+
+    USE control_parameters
+        
+    USE indices
+    
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                 !< 
+    INTEGER(iwp) ::  k                 !< 
+    INTEGER(iwp) ::  l                 !< running index surface orientation
+    INTEGER(iwp) ::  ns_h_on_file_lsm  !< number of horizontal surface elements (natural type) on file
+    INTEGER(iwp) ::  nxlc              !< 
+    INTEGER(iwp) ::  nxlf              !< 
+    INTEGER(iwp) ::  nxl_on_file       !< index of left boundary on former local domain
+    INTEGER(iwp) ::  nxrc              !< 
+    INTEGER(iwp) ::  nxrf              !< 
+    INTEGER(iwp) ::  nxr_on_file       !< index of right boundary on former local domain
+    INTEGER(iwp) ::  nync              !< 
+    INTEGER(iwp) ::  nynf              !< 
+    INTEGER(iwp) ::  nyn_on_file       !< index of north boundary on former local domain
+    INTEGER(iwp) ::  nysc              !< 
+    INTEGER(iwp) ::  nysf              !< 
+    INTEGER(iwp) ::  nys_on_file       !< index of south boundary on former local domain
+
+    INTEGER(iwp) ::  ns_v_on_file_lsm(0:3) !< number of vertical surface elements (natural type) on file
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  start_index_on_file 
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  end_index_on_file
+
+    LOGICAL, INTENT(OUT)  :: found
+
+    REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_2d   !< 
+
+    REAL(wp), DIMENSION(nzb_soil:nzt_soil,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !<
+
+    TYPE(surf_type_lsm), SAVE :: tmp_walltype_h_1d   !< temporary 1D array containing the respective surface variable stored on file, horizontal surfaces
+    TYPE(surf_type_lsm), SAVE :: tmp_walltype_h_2d   !< temporary 2D array containing the respective surface variable stored on file, horizontal surfaces
+    TYPE(surf_type_lsm), SAVE :: tmp_walltype_h_2d2  !< temporary 2D array containing the respective surface variable stored on file, horizontal surfaces 
+
+    TYPE(surf_type_lsm), DIMENSION(0:3), SAVE :: tmp_walltype_v_1d   !< temporary 1D array containing the respective surface variable stored on file, vertical surfaces 
+    TYPE(surf_type_lsm), DIMENSION(0:3), SAVE :: tmp_walltype_v_2d   !< temporary 2D array containing the respective surface variable stored on file, vertical surfaces 
+    TYPE(surf_type_lsm), DIMENSION(0:3), SAVE :: tmp_walltype_v_2d2  !< temporary 2D array containing the respective surface variable stored on file, vertical surfaces
+
+
+    found = .TRUE.
+
+
+       SELECT CASE ( restart_string(1:length) )
+
+           CASE ( 'ns_h_on_file_lsm' )
+              IF ( k == 1 )  THEN  
+                 READ ( 13 ) ns_h_on_file_lsm
+
+                 IF ( ALLOCATED( tmp_walltype_h_1d%var_1d ) )                  &
+                    DEALLOCATE( tmp_walltype_h_1d%var_1d )
+                 IF ( ALLOCATED( tmp_walltype_h_2d%var_2d ) )                  &   
+                    DEALLOCATE( tmp_walltype_h_2d%var_2d )
+                 IF ( ALLOCATED( tmp_walltype_h_2d2%var_2d ) )                 &
+                    DEALLOCATE( tmp_walltype_h_2d2%var_2d ) 
+
+!
+!--              Allocate temporary arrays to store surface data
+                 ALLOCATE( tmp_walltype_h_1d%var_1d(1:ns_h_on_file_lsm) )
+                 ALLOCATE( tmp_walltype_h_2d%var_2d(nzb_soil:nzt_soil+1,       &
+                                                    1:ns_h_on_file_lsm) )
+                 ALLOCATE( tmp_walltype_h_2d2%var_2d(nzb_soil:nzt_soil,        &
+                           1:ns_h_on_file_lsm)  )
+
+              ENDIF
+
+           CASE ( 'ns_v_on_file_lsm' )
+              IF ( k == 1 )  THEN
+                 READ ( 13 ) ns_v_on_file_lsm
+
+                 DO  l = 0, 3
+                    IF ( ALLOCATED( tmp_walltype_v_1d(l)%var_1d ) )            &
+                       DEALLOCATE( tmp_walltype_v_1d(l)%var_1d )
+                    IF ( ALLOCATED( tmp_walltype_v_2d(l)%var_2d ) )            &
+                       DEALLOCATE( tmp_walltype_v_2d(l)%var_2d )
+                    IF ( ALLOCATED( tmp_walltype_v_2d2(l)%var_2d ) )           &
+                       DEALLOCATE( tmp_walltype_v_2d2(l)%var_2d )
+                 ENDDO
+
+!
+!--              Allocate temporary arrays to store surface data
+                 DO  l = 0, 3
+                    ALLOCATE( tmp_walltype_v_1d(l)                             &
+                                 %var_1d(1:ns_v_on_file_lsm(l)) )
+                    ALLOCATE( tmp_walltype_v_2d(l)                             &
+                                 %var_2d(nzb_soil:nzt_soil+1,                  &
+                                         1:ns_v_on_file_lsm(l)) )
+                    ALLOCATE( tmp_walltype_v_2d2(l)                            &
+                                 %var_2d(nzb_soil:nzt_soil,                    &
+                                         1:ns_v_on_file_lsm(l))  )
+                 ENDDO
+
+              ENDIF
+
+
+           CASE ( 'c_liq_av' )
+              IF ( .NOT. ALLOCATED( c_liq_av ) )  THEN
+                 ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              c_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'c_soil_av' )
+              IF ( .NOT. ALLOCATED( c_soil_av ) )  THEN
+                 ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              c_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'c_veg_av' )
+              IF ( .NOT. ALLOCATED( c_veg_av ) )  THEN
+                 ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              c_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'lai_av' )
+              IF ( .NOT. ALLOCATED( lai_av ) )  THEN
+                 ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              lai_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =                &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'm_liq_av' )
+              IF ( .NOT. ALLOCATED( m_liq_av ) )  THEN
+                 ALLOCATE( m_liq_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              m_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'm_soil_av' )
+              IF ( .NOT. ALLOCATED( m_soil_av ) )  THEN
+                 ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_3d(:,:,:)
+              m_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                 tmp_3d(nzb_soil:nzt_soil,nysf                                 &
+                        -nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'qsws_liq_av' )
+              IF ( .NOT. ALLOCATED( qsws_liq_av ) )  THEN
+                 ALLOCATE( qsws_liq_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF  
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              qsws_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =          &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+           CASE ( 'qsws_soil_av' )
+              IF ( .NOT. ALLOCATED( qsws_soil_av ) )  THEN
+                 ALLOCATE( qsws_soil_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF  
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              qsws_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =         &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'qsws_veg_av' )
+              IF ( .NOT. ALLOCATED( qsws_veg_av ) )  THEN
+                 ALLOCATE( qsws_veg_av(nysg:nyng,nxlg:nxrg) )
+              ENDIF  
+              IF ( k == 1 )  READ ( 13 )  tmp_2d
+              qsws_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =          &
+                 tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 't_soil_av' )
+              IF ( .NOT. ALLOCATED( t_soil_av ) )  THEN
+                 ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) )
+              ENDIF
+              IF ( k == 1 )  READ ( 13 )  tmp_3d(:,:,:)
+              t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+           CASE ( 'lsm_start_index_h', 'lsm_start_index_v'  )   
+                IF ( k == 1 )  THEN
+
+                   IF ( ALLOCATED( start_index_on_file ) )                     &
+                      DEALLOCATE( start_index_on_file )
+
+                   ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file,     &
+                   nxl_on_file:nxr_on_file) )
+
+                   READ ( 13 )  start_index_on_file
+
+                ENDIF
+                 
+           CASE ( 'lsm_end_index_h', 'lsm_end_index_v' )   
+                IF ( k == 1 )  THEN
+
+                   IF ( ALLOCATED( end_index_on_file ) )                       &
+                      DEALLOCATE( end_index_on_file )
+
+                   ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file,       &
+                      nxl_on_file:nxr_on_file) )
+
+                   READ ( 13 )  end_index_on_file
+
+                ENDIF
+           
+           CASE ( 't_soil_h' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_soil_h%var_2d ) )                    &
+                    ALLOCATE( t_soil_h%var_2d(nzb_soil:nzt_soil+1,             &
+                                              1:surf_lsm_h%ns) )
+                 READ ( 13 )  tmp_walltype_h_2d%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                         t_soil_h%var_2d,                      &
+                                         tmp_walltype_h_2d%var_2d,             &
+                                         surf_lsm_h%start_index,               & 
+                                         start_index_on_file,                  &
+                                         end_index_on_file,                    &
+                                         nxlc, nysc,                           &
+                                         nxlf, nxrf, nysf, nynf,               &
+                                         nys_on_file, nyn_on_file,             &
+                                         nxl_on_file,nxr_on_file )
+
+           CASE ( 't_soil_v(0)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_soil_v(0)%var_2d ) )                 &
+                    ALLOCATE( t_soil_v(0)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(0)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d(0)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_soil_v(0)%var_2d,                      &
+                                      tmp_walltype_v_2d(0)%var_2d,             &
+                                      surf_lsm_v(0)%start_index,               &  
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 't_soil_v(1)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_soil_v(1)%var_2d ) )                 &
+                    ALLOCATE( t_soil_v(1)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(1)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d(1)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_soil_v(1)%var_2d,                      &
+                                      tmp_walltype_v_2d(1)%var_2d,             &
+                                      surf_lsm_v(1)%start_index,               &   
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 't_soil_v(2)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_soil_v(2)%var_2d ) )                 &
+                    ALLOCATE( t_soil_v(2)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(2)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d(2)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_soil_v(2)%var_2d,                      &
+                                      tmp_walltype_v_2d(2)%var_2d,             &
+                                      surf_lsm_v(2)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 't_soil_v(3)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_soil_v(3)%var_2d ) )                 &
+                    ALLOCATE( t_soil_v(1)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(3)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d(3)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_soil_v(3)%var_2d,                      &
+                                      tmp_walltype_v_2d(3)%var_2d,             &
+                                      surf_lsm_v(3)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 'm_soil_h' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_soil_h%var_2d ) )                    &
+                    ALLOCATE( m_soil_h%var_2d(nzb_soil:nzt_soil+1,             &
+                                              1:surf_lsm_h%ns) )
+                 READ ( 13 )  tmp_walltype_h_2d2%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                        m_soil_h%var_2d,                       &
+                                        tmp_walltype_h_2d2%var_2d,             &
+                                        surf_lsm_h%start_index,                &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+
+           CASE ( 'm_soil_v(0)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_soil_v(0)%var_2d ) )                 &
+                    ALLOCATE( m_soil_v(0)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(0)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d2(0)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                     m_soil_v(0)%var_2d,                       & 
+                                     tmp_walltype_v_2d2(0)%var_2d,             &
+                                     surf_lsm_v(0)%start_index,                & 
+                                     start_index_on_file,                      &
+                                     end_index_on_file,                        &
+                                     nxlc, nysc,                               &
+                                     nxlf, nxrf, nysf, nynf,                   &
+                                     nys_on_file, nyn_on_file,                 &
+                                     nxl_on_file,nxr_on_file )
+
+           CASE ( 'm_soil_v(1)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_soil_v(1)%var_2d ) )                 &
+                    ALLOCATE( m_soil_v(1)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(1)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d2(1)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                     m_soil_v(1)%var_2d,                       &    
+                                     tmp_walltype_v_2d2(1)%var_2d,             &
+                                     surf_lsm_v(1)%start_index,                &  
+                                     start_index_on_file,                      &
+                                     end_index_on_file,                        &
+                                     nxlc, nysc,                               &
+                                     nxlf, nxrf, nysf, nynf,                   &
+                                     nys_on_file, nyn_on_file,                 &
+                                     nxl_on_file,nxr_on_file )
+
+
+           CASE ( 'm_soil_v(2)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_soil_v(2)%var_2d ) )                 &
+                    ALLOCATE( m_soil_v(2)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(2)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d2(2)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                     m_soil_v(2)%var_2d,                       & 
+                                     tmp_walltype_v_2d2(2)%var_2d,             &
+                                     surf_lsm_v(2)%start_index,                &   
+                                     start_index_on_file,                      &
+                                     end_index_on_file,                        &
+                                     nxlc, nysc,                               &
+                                     nxlf, nxrf, nysf, nynf,                   &
+                                     nys_on_file, nyn_on_file,                 &
+                                     nxl_on_file,nxr_on_file )
+
+
+           CASE ( 'm_soil_v(3)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_soil_v(3)%var_2d ) )                 &
+                    ALLOCATE( m_soil_v(1)%var_2d(nzb_soil:nzt_soil+1,          &
+                                                 1:surf_lsm_v(3)%ns) )
+                 READ ( 13 )  tmp_walltype_v_2d2(3)%var_2d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                     m_soil_v(3)%var_2d,                       & 
+                                     tmp_walltype_v_2d2(3)%var_2d,             &
+                                     surf_lsm_v(3)%start_index,                &  
+                                     start_index_on_file,                      &
+                                     end_index_on_file,                        &
+                                     nxlc, nysc,                               &
+                                     nxlf, nxrf, nysf, nynf,                   &
+                                     nys_on_file, nyn_on_file,                 &
+                                     nxl_on_file,nxr_on_file )
+
+
+           CASE ( 'm_liq_h' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_liq_h%var_1d ) )                     &
+                    ALLOCATE( m_liq_h%var_1d(1:surf_lsm_h%ns) )
+                 READ ( 13 )  tmp_walltype_h_1d%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                         m_liq_h%var_1d,                       &
+                                         tmp_walltype_h_1d%var_1d,             &
+                                         surf_lsm_h%start_index,               &  
+                                         start_index_on_file,                  &
+                                         end_index_on_file,                    &
+                                         nxlc, nysc,                           &
+                                         nxlf, nxrf, nysf, nynf,               &
+                                         nys_on_file, nyn_on_file,             &
+                                         nxl_on_file,nxr_on_file )
+
+
+           CASE ( 'm_liq_v(0)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_liq_v(0)%var_1d ) )                  &
+                    ALLOCATE( m_liq_v(0)%var_1d(1:surf_lsm_v(0)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(0)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      m_liq_v(0)%var_1d,                       &
+                                      tmp_walltype_v_1d(0)%var_1d,             &
+                                      surf_lsm_v(0)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+
+           CASE ( 'm_liq_v(1)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_liq_v(1)%var_1d ) )                  &
+                    ALLOCATE( m_liq_v(1)%var_1d(1:surf_lsm_v(1)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(1)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      m_liq_v(1)%var_1d,                       &
+                                      tmp_walltype_v_1d(1)%var_1d,             &
+                                      surf_lsm_v(1)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+
+           CASE ( 'm_liq_v(2)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_liq_v(2)%var_1d ) )                  &
+                    ALLOCATE( m_liq_v(2)%var_1d(1:surf_lsm_v(2)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(2)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      m_liq_v(2)%var_1d,                       &
+                                      tmp_walltype_v_1d(2)%var_1d,             &
+                                      surf_lsm_v(2)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 'm_liq_v(3)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( m_liq_v(3)%var_1d ) )                  &
+                    ALLOCATE( m_liq_v(3)%var_1d(1:surf_lsm_v(3)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(3)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      m_liq_v(3)%var_1d,                       &
+                                      tmp_walltype_v_1d(3)%var_1d,             &
+                                      surf_lsm_v(3)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+
+           CASE ( 't_surface_h' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_surface_h%var_1d ) )                 &
+                    ALLOCATE( t_surface_h%var_1d(1:surf_lsm_h%ns) )
+                 READ ( 13 )  tmp_walltype_h_1d%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                         t_surface_h%var_1d,                   &
+                                         tmp_walltype_h_1d%var_1d,             &
+                                         surf_lsm_h%start_index,               & 
+                                         start_index_on_file,                  &
+                                         end_index_on_file,                    &
+                                         nxlc, nysc,                           &
+                                         nxlf, nxrf, nysf, nynf,               &
+                                         nys_on_file, nyn_on_file,             &
+                                         nxl_on_file,nxr_on_file )
+
+           CASE ( 't_surface_v(0)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_surface_v(0)%var_1d ) )              &
+                    ALLOCATE( t_surface_v(0)%var_1d(1:surf_lsm_v(0)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(0)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_surface_v(0)%var_1d,                   &
+                                      tmp_walltype_v_1d(0)%var_1d,             &
+                                      surf_lsm_v(0)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 't_surface_v(1)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_surface_v(1)%var_1d ) )              &
+                    ALLOCATE( t_surface_v(1)%var_1d(1:surf_lsm_v(1)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(1)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_surface_v(1)%var_1d,                   &
+                                      tmp_walltype_v_1d(1)%var_1d,             &
+                                      surf_lsm_v(1)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                & 
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 't_surface_v(2)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_surface_v(2)%var_1d ) )              &
+                    ALLOCATE( t_surface_v(2)%var_1d(1:surf_lsm_v(2)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(2)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_surface_v(2)%var_1d,                   &
+                                      tmp_walltype_v_1d(2)%var_1d,             &
+                                      surf_lsm_v(2)%start_index,               & 
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+           CASE ( 't_surface_v(3)' )
+            
+              IF ( k == 1 )  THEN
+                 IF ( .NOT.  ALLOCATED( t_surface_v(3)%var_1d ) )              &
+                    ALLOCATE( t_surface_v(3)%var_1d(1:surf_lsm_v(3)%ns) )
+                 READ ( 13 )  tmp_walltype_v_1d(3)%var_1d
+              ENDIF
+              CALL surface_restore_elements(                                   &
+                                      t_surface_v(3)%var_1d,                   &
+                                      tmp_walltype_v_1d(3)%var_1d,             &
+                                      surf_lsm_v(3)%start_index,               &   
+                                      start_index_on_file,                     &
+                                      end_index_on_file,                       &
+                                      nxlc, nysc,                              &
+                                      nxlf, nxrf, nysf, nynf,                  &
+                                      nys_on_file, nyn_on_file,                &
+                                      nxl_on_file,nxr_on_file )
+
+          CASE DEFAULT
+
+                found = .FALSE.
+
+       END SELECT
+
+
+ END SUBROUTINE lsm_rrd_local
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of roughness length for open water (lakes, ocean). The
+!> parameterization follows Charnock (1955). Two different implementations
+!> are available: as in ECMWF-IFS (Beljaars 1994) or as in FLake (Subin et al.
+!> 2012)
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_z0_water_surface
+
+       USE control_parameters,                                                 &
+           ONLY: message_string, molecular_viscosity
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i       !< running index
+       INTEGER(iwp) ::  j       !< running index
+       INTEGER(iwp) ::  m       !< running index
+
+       REAL(wp), PARAMETER :: alpha_ch  = 0.018_wp !< Charnock constant (0.01-0.11). Use 0.01 for FLake and 0.018 for ECMWF
+!       REAL(wp), PARAMETER :: pr_number = 0.71_wp !< molecular Prandtl number in the Charnock parameterization (differs from prandtl_number)
+!       REAL(wp), PARAMETER :: sc_number = 0.66_wp !< molecular Schmidt number in the Charnock parameterization
+!       REAL(wp) :: re_0 !< near-surface roughness Reynolds number
+
+       DO  m = 1, surf_lsm_h%ns
+
+          i   = surf_lsm_h%i(m)            
+          j   = surf_lsm_h%j(m)
+          
+          IF ( surf_lsm_h%water_surface(m) )  THEN
+
+!
+!--          Disabled: FLake parameterization. Ideally, the Charnock 
+!--          coefficient should depend on the water depth and the fetch
+!--          length
+!             re_0 = z0(j,i) * us(j,i) / molecular_viscosity
+!        
+!             z0(j,i) = MAX( 0.1_wp * molecular_viscosity / us(j,i),            &
+!                           alpha_ch * us(j,i) / g )
+!
+!             z0h(j,i) = z0(j,i) * EXP( - kappa / pr_number * ( 4.0_wp * SQRT( re_0 ) - 3.2_wp ) )
+!             z0q(j,i) = z0(j,i) * EXP( - kappa / pr_number * ( 4.0_wp * SQRT( re_0 ) - 4.2_wp ) )
+
+!
+!--           Set minimum roughness length for u* > 0.2
+!             IF ( us(j,i) > 0.2_wp )  THEN
+!                z0h(j,i) = MAX( 1.0E-5_wp, z0h(j,i) )
+!                z0q(j,i) = MAX( 1.0E-5_wp, z0q(j,i) )
+!             ENDIF
+
+!
+!--          ECMWF IFS model parameterization after Beljaars (1994). At low
+!--          wind speed, the sea surface becomes aerodynamically smooth and
+!--          the roughness scales with the viscosity. At high wind speed, the
+!--          Charnock relation is used.
+             surf_lsm_h%z0(m)  = ( 0.11_wp * molecular_viscosity /             &
+                                 surf_lsm_h%us(m) )                            &
+                               + ( alpha_ch * surf_lsm_h%us(m)**2 / g )
+
+             surf_lsm_h%z0h(m) = 0.40_wp * molecular_viscosity /               &
+                                 surf_lsm_h%us(m)
+             surf_lsm_h%z0q(m) = 0.62_wp * molecular_viscosity /               &
+                                 surf_lsm_h%us(m)
+
+  
+             IF ( surf_lsm_h%z0(m) >= surf_lsm_h%z_mo(m) )  THEN
+  
+                surf_lsm_h%z0(m) = 0.9_wp * surf_lsm_h%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0 exceeds surface-layer height' //&
+                            ' at horizontal sea surface and is ' //            &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_h%i(m), surf_lsm_h%j(m)
+                CALL message( 'land_surface_model_mod', 'PA0508',              &
+                              0, 0, 0, 6, 0 )
+             ENDIF
+  
+             IF ( surf_lsm_h%z0h(m) >= surf_lsm_h%z_mo(m) )  THEN
+  
+                surf_lsm_h%z0h(m) = 0.9_wp * surf_lsm_h%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0h exceeds surface-layer height'//&
+                            ' at horizontal sea surface and is ' //            &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_h%i(m), surf_lsm_h%j(m)
+                CALL message( 'land_surface_model_mod', 'PA0508',              &
+                              0, 0, 0, 6, 0 )
+             ENDIF
+             
+             IF ( surf_lsm_h%z0q(m) >= surf_lsm_h%z_mo(m) )  THEN
+  
+                surf_lsm_h%z0q(m) = 0.9_wp * surf_lsm_h%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0q exceeds surface-layer height'//&
+                            ' at horizontal sea surface and is ' //            &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_lsm_h%i(m), surf_lsm_h%j(m)
+                CALL message( 'land_surface_model_mod', 'PA0508',              &
+                              0, 0, 0, 6, 0 )
+             ENDIF
+  
+                                 
+          ENDIF
+       ENDDO
+
+    END SUBROUTINE calc_z0_water_surface
+
+
+
+ END MODULE land_surface_model_mod
Index: /palm/tags/release-6.0/SOURCE/large_scale_forcing_nudging_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/large_scale_forcing_nudging_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/large_scale_forcing_nudging_mod.f90	(revision 3477)
@@ -0,0 +1,1464 @@
+!> @file large_scale_forcing_nudging_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Rename td_XXX_lpt to td_XXX_thetal
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! Offline nesting parts are moved to an independent module nesting_offl_mod
+! 
+! 3341 2018-10-15 10:31:27Z suehring
+! ocean renamed ocean_mode
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! * Adjustment to new Inifor version: 
+!   - No vertical interpolation/extrapolation of lateral boundary data required
+!     any more (Inifor can treat grid stretching now
+!   - Revise initialization in case of COSMO forcing 
+! * Rename variables and subroutines for offline nesting
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised 
+! 
+! 3026 2018-05-22 10:30:53Z schwenkel
+! Changed the name specific humidity to mixing ratio, since we are computing
+! mixing ratios.
+! 
+! 2970 2018-04-13 15:09:23Z suehring
+! Bugfix in old large-scale forcing mode
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! Further improvements for nesting in larger-scale model
+! 
+! 2863 2018-03-08 11:36:25Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Forcing with larger-scale models implemented (MS)
+! 
+! 2342 2017-08-08 11:00:43Z boeske
+! fixed check if surface forcing data is available until end of simulation
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! initial revision
+!
+! Description:
+! ------------
+!> Calculates large scale forcings (geostrophic wind and subsidence velocity) as 
+!> well as surfaces fluxes dependent on time given in an external file (LSF_DATA).
+!> Moreover, module contains nudging routines, where u, v, pt and q are nudged 
+!> to given profiles on a relaxation timescale tnudge. 
+!> Profiles are read in from NUDGING_DATA. 
+!> Code is based on Neggers et al. (2012) and also in parts on DALES and UCLA-LES.
+!> @todo: Revise reading of ASCII-files
+!> @todo: Remove unused variables and control flags
+!> @todo: Revise large-scale facing of surface variables
+!> @todo: Revise control flags lsf_exception, lsf_surf, lsf_vert, etc. 
+!--------------------------------------------------------------------------------!
+ MODULE lsf_nudging_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, e, diss, heatflux_input_conversion, pt, pt_init, q,        &
+               q_init, s, tend, u, u_init, ug, v, v_init, vg, w, w_subs,       &
+               waterflux_input_conversion, zu, zw                  
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr, bc_ns, bc_pt_b, bc_q_b, constant_diffusion,              &
+               constant_heatflux, constant_waterflux,                          &
+               data_output_pr, dt_3d, end_time,                                &
+               humidity, initializing_actions, intermediate_timestep_count,    &
+               ibc_pt_b, ibc_q_b,                                              &
+               large_scale_forcing, large_scale_subsidence, lsf_surf, lsf_vert,&
+               lsf_exception, message_string, neutral,                         &
+               nudging, passive_scalar, pt_surface, ocean_mode, q_surface,     &
+               surface_heatflux, surface_pressure, surface_waterflux,          &
+               topography, use_subsidence_tendencies
+               
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE grid_variables
+
+    USE indices,                                                               &
+        ONLY:  nbgp, ngp_sums_ls, nx, nxl, nxlg, nxlu, nxr, nxrg, ny, nys,     &
+               nysv, nysg, nyn, nyng, nzb, nz, nzt, wall_flags_0
+
+    USE kinds
+
+    USE pegrid
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, surf_lsm_h, surf_usm_h
+
+    USE statistics,                                                            &
+        ONLY:  hom, statistic_regions, sums_ls_l, weight_substep
+
+    INTEGER(iwp) ::  nlsf = 1000                       !< maximum number of profiles in LSF_DATA (large scale forcing)
+    INTEGER(iwp) ::  ntnudge = 1000                    !< maximum number of profiles in NUDGING_DATA (nudging)
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ptnudge     !< vertical profile of pot. temperature interpolated to vertical grid (nudging)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  qnudge      !< vertical profile of water vapor mixing ratio interpolated to vertical grid (nudging) 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tnudge      !< vertical profile of nudging time scale interpolated to vertical grid (nudging)  
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_lsa_lpt  !< temperature tendency due to large scale advection (large scale forcing)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_lsa_q    !< water vapor mixing ratio tendency due to large scale advection (large scale forcing)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_lpt  !< temperature tendency due to subsidence/ascent (large scale forcing)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_q    !< water vapor mixing ratio tendency due to subsidence/ascent (large scale forcing)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ug_vert     !< vertical profile of geostrophic wind component in x-direction interpolated to vertical grid (large scale forcing)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  unudge      !< vertical profile of wind component in x-direction interpolated to vertical grid (nudging) 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vnudge      !< vertical profile of wind component in y-direction interpolated to vertical grid (nudging) 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vg_vert     !< vertical profile of geostrophic wind component in y-direction interpolated to vertical grid (large scale forcing)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  wnudge      !< vertical profile of subsidence/ascent velocity interpolated to vertical grid (nudging) ???
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  wsubs_vert  !< vertical profile of wind component in z-direction interpolated to vertical grid (nudging) ???
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  shf_surf      !< time-dependent surface sensible heat flux (large scale forcing)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  timenudge     !< times at which vertical profiles are defined in NUDGING_DATA (nudging)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  time_surf     !< times at which surface values/fluxes are defined in LSF_DATA (large scale forcing)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  time_vert     !< times at which vertical profiles are defined in LSF_DATA (large scale forcing)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  tmp_tnudge    !< current nudging time scale
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  p_surf        !< time-dependent surface pressure (large scale forcing)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_surf       !< time-dependent surface temperature (large scale forcing)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_surf     !< time-dependent surface latent heat flux (large scale forcing)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_surf        !< time-dependent surface water vapor mixing ratio (large scale forcing)
+
+    SAVE
+    PRIVATE
+!
+!-- Public subroutines
+    PUBLIC calc_tnudge, ls_forcing_surf, ls_forcing_vert, ls_advec, lsf_init,  &
+           lsf_nudging_check_parameters, nudge_init,                           &
+           lsf_nudging_check_data_output_pr, lsf_nudging_header,               &
+           nudge, nudge_ref
+           
+!
+!-- Public variables
+    PUBLIC qsws_surf, shf_surf, td_lsa_lpt, td_lsa_q, td_sub_lpt,              &
+           td_sub_q, time_vert
+
+
+    INTERFACE ls_advec
+       MODULE PROCEDURE ls_advec
+       MODULE PROCEDURE ls_advec_ij
+    END INTERFACE ls_advec
+
+    INTERFACE nudge
+       MODULE PROCEDURE nudge
+       MODULE PROCEDURE nudge_ij
+    END INTERFACE nudge
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsf_nudging_check_parameters
+
+       IMPLICIT NONE
+!
+!--    Check nudging and large scale forcing from external file
+       IF ( nudging  .AND.  (  .NOT.  large_scale_forcing ) )  THEN
+          message_string = 'Nudging requires large_scale_forcing = .T.. &'//   &
+                        'Surface fluxes and geostrophic wind should be &'//    &
+                        'prescribed in file LSF_DATA'
+          CALL message( 'check_parameters', 'PA0374', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( large_scale_forcing  .AND.  ( bc_lr /= 'cyclic'  .OR.              &
+                                          bc_ns /= 'cyclic' ) )  THEN
+          message_string = 'Non-cyclic lateral boundaries do not allow for &'//&
+                        'the usage of large scale forcing from external file.'
+          CALL message( 'check_parameters', 'PA0375', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( large_scale_forcing  .AND.  (  .NOT.  humidity ) )  THEN
+          message_string = 'The usage of large scale forcing from external &'//&
+                        'file LSF_DATA requires humidity = .T..'
+          CALL message( 'check_parameters', 'PA0376', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( large_scale_forcing  .AND.  passive_scalar )  THEN
+          message_string = 'The usage of large scale forcing from external &'// &
+                        'file LSF_DATA is not implemented for passive scalars'
+          CALL message( 'check_parameters', 'PA0440', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( large_scale_forcing  .AND.  topography /= 'flat'                   &
+                              .AND.  .NOT.  lsf_exception )  THEN
+          message_string = 'The usage of large scale forcing from external &'//&
+                        'file LSF_DATA is not implemented for non-flat topography'
+          CALL message( 'check_parameters', 'PA0377', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( large_scale_forcing  .AND.  ocean_mode )  THEN
+          message_string = 'The usage of large scale forcing from external &'//&
+                        'file LSF_DATA is not implemented for ocean mode'
+          CALL message( 'check_parameters', 'PA0378', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    END SUBROUTINE lsf_nudging_check_parameters
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output of profiles for land surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsf_nudging_check_data_output_pr( variable, var_count, unit,    &
+                                                 dopr_unit )
+ 
+       USE profil_parameter
+
+       IMPLICIT NONE
+   
+       CHARACTER (LEN=*) ::  unit      !< 
+       CHARACTER (LEN=*) ::  variable  !< 
+       CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
+ 
+       INTEGER(iwp) ::  var_count     !< 
+
+       SELECT CASE ( TRIM( variable ) )
+       
+
+          CASE ( 'td_lsa_thetal' )
+             IF (  .NOT.  large_scale_forcing )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'large_scale_forcing = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0393',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 81
+                dopr_unit             = 'K/s'
+                unit                  = 'K/s'
+                hom(:,2,81,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'td_lsa_q' )
+             IF (  .NOT.  large_scale_forcing )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'large_scale_forcing = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0393',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 82
+                dopr_unit             = 'kg/kgs'
+                unit                  = 'kg/kgs'
+                hom(:,2,82,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+          CASE ( 'td_sub_thetal' )
+             IF (  .NOT.  large_scale_forcing )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'large_scale_forcing = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0393',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 83
+                dopr_unit             = 'K/s'
+                unit                  = 'K/s'
+                hom(:,2,83,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'td_sub_q' )
+             IF (  .NOT.  large_scale_forcing )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'large_scale_forcing = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0393',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 84
+                dopr_unit             = 'kg/kgs'
+                unit                  = 'kg/kgs'
+                hom(:,2,84,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'td_nud_thetal' )
+             IF (  .NOT.  nudging )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'nudging = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0394',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 85
+                dopr_unit             = 'K/s'
+                unit                  = 'K/s'
+                hom(:,2,85,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'td_nud_q' )
+             IF (  .NOT.  nudging )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'nudging = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0394',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 86
+                dopr_unit             = 'kg/kgs'
+                unit                  = 'kg/kgs'
+                hom(:,2,86,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'td_nud_u' )
+             IF (  .NOT.  nudging )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'nudging = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0394',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 87
+                dopr_unit             = 'm/s2'
+                unit                  = 'm/s2'
+                hom(:,2,87,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+          CASE ( 'td_nud_v' )
+             IF (  .NOT.  nudging )  THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) //          &
+                                 ' is not implemented for ' //                 &
+                                 'nudging = .FALSE.'
+                CALL message( 'lsf_nudging_check_data_output_pr', 'PA0394',    &
+                               1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 88
+                dopr_unit             = 'm/s2'
+                unit                  = 'm/s2'
+                hom(:,2,88,:) = SPREAD( zu, 2, statistic_regions+1 )
+             ENDIF
+
+
+          CASE DEFAULT
+             unit = 'illegal'
+   
+       END SELECT
+
+    END SUBROUTINE lsf_nudging_check_data_output_pr
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsf_nudging_header ( io )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  io !< Unit of the output file
+
+       WRITE ( io, 1 )
+       IF ( large_scale_forcing )  THEN
+          WRITE ( io, 3 )
+          WRITE ( io, 4 )
+
+          IF ( large_scale_subsidence )  THEN
+             IF ( .NOT. use_subsidence_tendencies )  THEN
+                WRITE ( io, 5 )
+             ELSE
+                WRITE ( io, 6 )
+             ENDIF 
+          ENDIF
+
+          IF ( bc_pt_b == 'dirichlet' )  THEN
+             WRITE ( io, 12 )
+          ELSEIF ( bc_pt_b == 'neumann' )  THEN
+             WRITE ( io, 13 )
+          ENDIF
+
+          IF ( bc_q_b == 'dirichlet' )  THEN
+             WRITE ( io, 14 )
+          ELSEIF ( bc_q_b == 'neumann' )  THEN
+             WRITE ( io, 15 )
+          ENDIF
+
+          WRITE ( io, 7 )
+          IF ( nudging )  THEN
+             WRITE ( io, 10 )
+          ENDIF
+       ELSE
+          WRITE ( io, 2 )
+          WRITE ( io, 11 )
+       ENDIF
+       IF ( large_scale_subsidence )  THEN
+          WRITE ( io, 8 )
+          WRITE ( io, 9 )
+       ENDIF
+
+
+1 FORMAT (//' Large scale forcing and nudging:'/ &
+              ' -------------------------------'/)
+2 FORMAT (' --> No large scale forcing from external is used (default) ')
+3 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
+4 FORMAT ('     - large scale advection tendencies ')
+5 FORMAT ('     - large scale subsidence velocity w_subs ')
+6 FORMAT ('     - large scale subsidence tendencies ')
+7 FORMAT ('     - and geostrophic wind components ug and vg')
+8 FORMAT (' --> Large-scale vertical motion is used in the ', &
+                  'prognostic equation(s) for')
+9 FORMAT ('     the scalar(s) only')
+10 FORMAT (' --> Nudging is used')
+11 FORMAT (' --> No nudging is used (default) ')
+12 FORMAT ('     - prescribed surface values for temperature')
+13 FORMAT ('     - prescribed surface fluxes for temperature')
+14 FORMAT ('     - prescribed surface values for humidity')
+15 FORMAT ('     - prescribed surface fluxes for humidity')
+
+    END SUBROUTINE lsf_nudging_header 
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE lsf_init
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc
+
+       IMPLICIT NONE
+
+       CHARACTER(100) ::  chmess      !<
+       CHARACTER(1)   ::  hash        !<
+
+       INTEGER(iwp) ::  ierrn         !<
+       INTEGER(iwp) ::  finput = 90   !<
+       INTEGER(iwp) ::  k             !<
+       INTEGER(iwp) ::  nt            !<
+
+       REAL(wp) ::  fac               !<
+       REAL(wp) ::  highheight        !<
+       REAL(wp) ::  highug_vert       !<
+       REAL(wp) ::  highvg_vert       !<
+       REAL(wp) ::  highwsubs_vert    !<
+       REAL(wp) ::  lowheight         !<
+       REAL(wp) ::  lowug_vert        !<
+       REAL(wp) ::  lowvg_vert        !<
+       REAL(wp) ::  lowwsubs_vert     !<
+       REAL(wp) ::  high_td_lsa_lpt   !<
+       REAL(wp) ::  low_td_lsa_lpt    !<
+       REAL(wp) ::  high_td_lsa_q     !<
+       REAL(wp) ::  low_td_lsa_q      !<
+       REAL(wp) ::  high_td_sub_lpt   !<
+       REAL(wp) ::  low_td_sub_lpt    !<
+       REAL(wp) ::  high_td_sub_q     !<
+       REAL(wp) ::  low_td_sub_q      !<
+       REAL(wp) ::  r_dummy           !<
+
+       ALLOCATE( p_surf(0:nlsf), pt_surf(0:nlsf), q_surf(0:nlsf),              &
+                 qsws_surf(0:nlsf), shf_surf(0:nlsf),                          &
+                 td_lsa_lpt(nzb:nzt+1,0:nlsf), td_lsa_q(nzb:nzt+1,0:nlsf),     &
+                 td_sub_lpt(nzb:nzt+1,0:nlsf), td_sub_q(nzb:nzt+1,0:nlsf),     &
+                 time_vert(0:nlsf), time_surf(0:nlsf),                         &
+                 ug_vert(nzb:nzt+1,0:nlsf), vg_vert(nzb:nzt+1,0:nlsf),         &
+                 wsubs_vert(nzb:nzt+1,0:nlsf) )
+
+       p_surf = 0.0_wp; pt_surf = 0.0_wp; q_surf = 0.0_wp; qsws_surf = 0.0_wp
+       shf_surf = 0.0_wp; time_vert = 0.0_wp; td_lsa_lpt = 0.0_wp
+       td_lsa_q = 0.0_wp; td_sub_lpt = 0.0_wp; td_sub_q = 0.0_wp
+       time_surf = 0.0_wp; ug_vert = 0.0_wp; vg_vert = 0.0_wp
+       wsubs_vert = 0.0_wp
+
+!
+!--    Array for storing large scale forcing and nudging tendencies at each 
+!--    timestep for data output
+       ALLOCATE( sums_ls_l(nzb:nzt+1,0:7) )
+       sums_ls_l = 0.0_wp
+
+       ngp_sums_ls = (nz+2)*6
+
+       OPEN ( finput, FILE='LSF_DATA', STATUS='OLD', &
+              FORM='FORMATTED', IOSTAT=ierrn )
+
+       IF ( ierrn /= 0 )  THEN
+          message_string = 'file LSF_DATA does not exist'
+          CALL message( 'ls_forcing', 'PA0368', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       ierrn = 0
+!
+!--    First three lines of LSF_DATA contain header
+       READ ( finput, FMT='(a100)', IOSTAT=ierrn ) chmess
+       READ ( finput, FMT='(a100)', IOSTAT=ierrn ) chmess
+       READ ( finput, FMT='(a100)', IOSTAT=ierrn ) chmess
+
+       IF ( ierrn /= 0 )  THEN
+          message_string = 'errors in file LSF_DATA'
+          CALL message( 'ls_forcing', 'PA0369', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    Surface values are read in
+       nt     = 0
+       ierrn = 0
+
+       DO WHILE ( time_surf(nt) < end_time )
+          nt = nt + 1
+          READ ( finput, *, IOSTAT = ierrn ) time_surf(nt), shf_surf(nt),      &
+                                             qsws_surf(nt), pt_surf(nt),       &
+                                             q_surf(nt), p_surf(nt)
+
+          IF ( ierrn /= 0 )  THEN
+            WRITE ( message_string, * ) 'No time dependent surface ' //        &
+                              'variables in & LSF_DATA for end of run found'
+
+             CALL message( 'ls_forcing', 'PA0363', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDDO
+
+       IF ( time_surf(1) > end_time )  THEN
+          WRITE ( message_string, * ) 'Time dependent surface variables in ' //&
+                                      '&LSF_DATA set in after end of ' ,       &
+                                      'simulation - lsf_surf is set to FALSE'
+          CALL message( 'ls_forcing', 'PA0371', 0, 0, 0, 6, 0 )
+          lsf_surf = .FALSE.
+       ENDIF
+
+!
+!--    Go to the end of the list with surface variables
+       DO WHILE ( ierrn == 0 )
+          READ ( finput, *, IOSTAT = ierrn ) r_dummy
+       ENDDO
+
+!
+!--    Profiles of ug, vg and w_subs are read in (large scale forcing)
+
+       nt = 0
+       DO WHILE ( time_vert(nt) < end_time )
+          nt = nt + 1
+          hash = "#"
+          ierrn = 1 ! not zero
+!
+!--       Search for the next line consisting of "# time", 
+!--       from there onwards the profiles will be read
+          DO WHILE ( .NOT. ( hash == "#" .AND. ierrn == 0 ) ) 
+             READ ( finput, *, IOSTAT=ierrn ) hash, time_vert(nt)
+             IF ( ierrn < 0 )  THEN 
+                WRITE( message_string, * ) 'No time dependent vertical profiles',&
+                                 ' in & LSF_DATA for end of run found'
+                CALL message( 'ls_forcing', 'PA0372', 1, 2, 0, 6, 0 )
+             ENDIF
+          ENDDO
+
+          IF ( nt == 1 .AND. time_vert(nt) > end_time ) EXIT
+
+          READ ( finput, *, IOSTAT=ierrn ) lowheight, lowug_vert, lowvg_vert,  &
+                                           lowwsubs_vert, low_td_lsa_lpt,      &
+                                           low_td_lsa_q, low_td_sub_lpt,       &
+                                           low_td_sub_q
+          IF ( ierrn /= 0 )  THEN
+             message_string = 'errors in file LSF_DATA'
+             CALL message( 'ls_forcing', 'PA0369', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          READ ( finput, *, IOSTAT=ierrn ) highheight, highug_vert,            &
+                                           highvg_vert, highwsubs_vert,        &
+                                           high_td_lsa_lpt, high_td_lsa_q,     &
+                                           high_td_sub_lpt, high_td_sub_q
+       
+          IF ( ierrn /= 0 )  THEN
+             message_string = 'errors in file LSF_DATA'
+             CALL message( 'ls_forcing', 'PA0369', 1, 2, 0, 6, 0 )
+          ENDIF
+
+
+          DO  k = nzb, nzt+1
+             IF ( highheight < zu(k) )  THEN
+                lowheight      = highheight
+                lowug_vert     = highug_vert
+                lowvg_vert     = highvg_vert
+                lowwsubs_vert  = highwsubs_vert
+                low_td_lsa_lpt = high_td_lsa_lpt
+                low_td_lsa_q   = high_td_lsa_q
+                low_td_sub_lpt = high_td_sub_lpt
+                low_td_sub_q   = high_td_sub_q
+
+                ierrn = 0
+                READ ( finput, *, IOSTAT=ierrn ) highheight, highug_vert,      &
+                                                 highvg_vert, highwsubs_vert,  &
+                                                 high_td_lsa_lpt,              &
+                                                 high_td_lsa_q,                &
+                                                 high_td_sub_lpt, high_td_sub_q
+
+                IF ( ierrn /= 0 )  THEN
+                   WRITE( message_string, * ) 'zu(',k,') = ', zu(k), 'm ',     &
+                        'is higher than the maximum height in LSF_DATA ',      &
+                        'which is ', lowheight, 'm. Interpolation on PALM ',   &
+                        'grid is not possible.'
+                   CALL message( 'ls_forcing', 'PA0395', 1, 2, 0, 6, 0 )
+                ENDIF
+
+             ENDIF
+
+!
+!--          Interpolation of prescribed profiles in space 
+             fac = (highheight-zu(k))/(highheight - lowheight)
+
+             ug_vert(k,nt)    = fac * lowug_vert                               &
+                                + ( 1.0_wp - fac ) * highug_vert
+             vg_vert(k,nt)    = fac * lowvg_vert                               &
+                                + ( 1.0_wp - fac ) * highvg_vert
+             wsubs_vert(k,nt) = fac * lowwsubs_vert                            &
+                                + ( 1.0_wp - fac ) * highwsubs_vert
+
+             td_lsa_lpt(k,nt) = fac * low_td_lsa_lpt                           &
+                                + ( 1.0_wp - fac ) * high_td_lsa_lpt
+             td_lsa_q(k,nt)   = fac * low_td_lsa_q                             &
+                                + ( 1.0_wp - fac ) * high_td_lsa_q
+             td_sub_lpt(k,nt) = fac * low_td_sub_lpt                           &
+                                + ( 1.0_wp - fac ) * high_td_sub_lpt
+             td_sub_q(k,nt)   = fac * low_td_sub_q                             &
+                                + ( 1.0_wp - fac ) * high_td_sub_q
+
+          ENDDO
+
+       ENDDO 
+
+!
+!--    Large scale vertical velocity has to be zero at the surface
+       wsubs_vert(nzb,:) = 0.0_wp
+    
+       IF ( time_vert(1) > end_time )  THEN
+          WRITE ( message_string, * ) 'Time dependent large scale profile ',   &
+                             'forcing from&LSF_DATA sets in after end of ' ,   &
+                             'simulation - lsf_vert is set to FALSE'
+          CALL message( 'ls_forcing', 'PA0373', 0, 0, 0, 6, 0 )
+          lsf_vert = .FALSE.
+       ENDIF
+
+       CLOSE( finput )
+
+    END SUBROUTINE lsf_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE ls_forcing_surf ( time )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nt                     !<
+
+       REAL(wp)             :: dum_surf_flux  !<
+       REAL(wp)             :: fac            !<
+       REAL(wp), INTENT(in) :: time           !<
+
+!
+!--    Interpolation in time of LSF_DATA at the surface
+       nt = 1
+       DO WHILE ( time > time_surf(nt) )
+          nt = nt + 1
+       ENDDO
+       IF ( time /= time_surf(nt) )  THEN
+         nt = nt - 1
+       ENDIF
+
+       fac = ( time -time_surf(nt) ) / ( time_surf(nt+1) - time_surf(nt) )
+
+       IF ( ibc_pt_b == 0 )  THEN
+!
+!--       In case of Dirichlet boundary condition shf must not 
+!--       be set - it is calculated via MOST in prandtl_fluxes
+          pt_surface = pt_surf(nt) + fac * ( pt_surf(nt+1) - pt_surf(nt) )
+
+       ELSEIF ( ibc_pt_b == 1 )  THEN
+!
+!--       In case of Neumann boundary condition pt_surface is needed for 
+!--       calculation of reference density
+          dum_surf_flux = ( shf_surf(nt) + fac *                               &
+                            ( shf_surf(nt+1) - shf_surf(nt) )                  &
+                          ) * heatflux_input_conversion(nzb)
+!
+!--       Save surface sensible heat flux on default, natural and urban surface
+!--       type, if required 
+          IF ( surf_def_h(0)%ns >= 1 )  surf_def_h(0)%shf(:) = dum_surf_flux
+          IF ( surf_lsm_h%ns    >= 1 )  surf_lsm_h%shf(:)    = dum_surf_flux
+          IF ( surf_usm_h%ns    >= 1 )  surf_usm_h%shf(:)    = dum_surf_flux
+
+          pt_surface    = pt_surf(nt) + fac * ( pt_surf(nt+1) - pt_surf(nt) )
+
+       ENDIF
+
+       IF ( ibc_q_b == 0 )  THEN
+!
+!--       In case of Dirichlet boundary condition qsws must not 
+!--       be set - it is calculated via MOST in prandtl_fluxes
+          q_surface = q_surf(nt) + fac * ( q_surf(nt+1) - q_surf(nt) )
+
+       ELSEIF ( ibc_q_b == 1 )  THEN
+          dum_surf_flux = ( qsws_surf(nt) + fac *                              &
+                             ( qsws_surf(nt+1) - qsws_surf(nt) )               &
+                             ) * waterflux_input_conversion(nzb)
+!
+!--       Save surface sensible heat flux on default, natural and urban surface
+!--       type, if required 
+          IF ( surf_def_h(0)%ns >= 1 )  surf_def_h(0)%qsws(:) = dum_surf_flux
+          IF ( surf_lsm_h%ns    >= 1 )  surf_lsm_h%qsws(:)    = dum_surf_flux
+          IF ( surf_usm_h%ns    >= 1 )  surf_usm_h%qsws(:)    = dum_surf_flux
+
+       ENDIF
+!
+!--    Surface heat- and waterflux will be written later onto surface elements 
+       IF ( .NOT.  neutral  .AND.  constant_heatflux  .AND.                    &
+            TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+             surface_heatflux = shf_surf(1)
+       ENDIF
+       IF ( humidity  .AND.  constant_waterflux  .AND.                         &
+            TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+             surface_waterflux = qsws_surf(1)
+       ENDIF
+
+       surface_pressure = p_surf(nt) + fac * ( p_surf(nt+1) - p_surf(nt) )
+
+    END SUBROUTINE ls_forcing_surf 
+
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE ls_forcing_vert ( time )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nt                     !<
+
+       REAL(wp)             ::  fac           !<
+       REAL(wp), INTENT(in) ::  time          !<
+
+!
+!--    Interpolation in time of LSF_DATA for ug, vg and w_subs
+       nt = 1
+       DO WHILE ( time > time_vert(nt) )
+          nt = nt + 1
+       ENDDO
+       IF ( time /= time_vert(nt) )  THEN
+         nt = nt - 1
+       ENDIF
+
+       fac = ( time-time_vert(nt) ) / ( time_vert(nt+1)-time_vert(nt) )
+
+       ug     = ug_vert(:,nt) + fac * ( ug_vert(:,nt+1) - ug_vert(:,nt) )
+       vg     = vg_vert(:,nt) + fac * ( vg_vert(:,nt+1) - vg_vert(:,nt) )
+
+       IF ( large_scale_subsidence )  THEN
+          w_subs = wsubs_vert(:,nt)                                            &
+                   + fac * ( wsubs_vert(:,nt+1) - wsubs_vert(:,nt) )
+       ENDIF
+
+    END SUBROUTINE ls_forcing_vert
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE ls_advec ( time, prog_var )
+      
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  prog_var   !< 
+
+       REAL(wp), INTENT(in)  :: time    !< 
+       REAL(wp) :: fac                  !<  
+
+       INTEGER(iwp) ::  i               !< 
+       INTEGER(iwp) ::  j               !< 
+       INTEGER(iwp) ::  k               !< 
+       INTEGER(iwp) ::  nt               !< 
+
+!
+!--    Interpolation in time of LSF_DATA 
+       nt = 1
+       DO WHILE ( time > time_vert(nt) )
+          nt = nt + 1
+       ENDDO
+       IF ( time /= time_vert(nt) )  THEN
+         nt = nt - 1
+       ENDIF
+
+       fac = ( time-time_vert(nt) ) / ( time_vert(nt+1)-time_vert(nt) )
+
+!
+!--    Add horizontal large scale advection tendencies of pt and q 
+       SELECT CASE ( prog_var )
+
+          CASE ( 'pt' )
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tend(k,j,i) = tend(k,j,i) + td_lsa_lpt(k,nt) + fac *     &
+                                    ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) ) *&
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'q' )
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tend(k,j,i) = tend(k,j,i) + td_lsa_q(k,nt) + fac *       &
+                                    ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) ) *    &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+
+       END SELECT
+
+!
+!--    Subsidence of pt and q with prescribed subsidence tendencies
+       IF ( large_scale_subsidence .AND. use_subsidence_tendencies )  THEN
+
+          SELECT CASE ( prog_var )
+
+             CASE ( 'pt' )
+
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tend(k,j,i) = tend(k,j,i) + td_sub_lpt(k,nt) + fac *  &
+                                     ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) )*&
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+  
+             CASE ( 'q' )
+
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tend(k,j,i) = tend(k,j,i) + td_sub_q(k,nt) + fac *    &
+                                       ( td_sub_q(k,nt+1) - td_sub_q(k,nt) ) * &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+          END SELECT
+
+       ENDIF
+
+    END SUBROUTINE ls_advec
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE ls_advec_ij ( i, j, time, prog_var )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  prog_var   !< 
+
+       REAL(wp), INTENT(in)  :: time    !< 
+       REAL(wp) :: fac                  !< 
+
+       INTEGER(iwp) ::  i               !< 
+       INTEGER(iwp) ::  j               !< 
+       INTEGER(iwp) ::  k               !< 
+       INTEGER(iwp) ::  nt               !< 
+
+!
+!--    Interpolation in time of LSF_DATA 
+       nt = 1
+       DO WHILE ( time > time_vert(nt) )
+          nt = nt + 1
+       ENDDO
+       IF ( time /= time_vert(nt) )  THEN
+         nt = nt - 1
+       ENDIF
+
+       fac = ( time-time_vert(nt) ) / ( time_vert(nt+1)-time_vert(nt) )
+
+!
+!--    Add horizontal large scale advection tendencies of pt and q 
+       SELECT CASE ( prog_var )
+
+          CASE ( 'pt' )
+
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = tend(k,j,i) + td_lsa_lpt(k,nt)                   &
+                             + fac * ( td_lsa_lpt(k,nt+1) - td_lsa_lpt(k,nt) )*&
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+
+          CASE ( 'q' )
+
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = tend(k,j,i) + td_lsa_q(k,nt)                     &
+                              + fac * ( td_lsa_q(k,nt+1) - td_lsa_q(k,nt) ) *  &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+
+       END SELECT
+
+!
+!--    Subsidence of pt and q with prescribed profiles
+       IF ( large_scale_subsidence .AND. use_subsidence_tendencies )  THEN
+
+          SELECT CASE ( prog_var )
+
+             CASE ( 'pt' )
+
+                DO  k = nzb+1, nzt
+                   tend(k,j,i) = tend(k,j,i) + td_sub_lpt(k,nt) + fac *        &
+                                 ( td_sub_lpt(k,nt+1) - td_sub_lpt(k,nt) ) *   &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+  
+             CASE ( 'q' )
+
+                DO  k = nzb+1, nzt
+                   tend(k,j,i) = tend(k,j,i) + td_sub_q(k,nt) + fac *          &
+                                 ( td_sub_q(k,nt+1) - td_sub_q(k,nt) ) *       &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+
+          END SELECT
+
+       ENDIF
+
+    END SUBROUTINE ls_advec_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE nudge_init
+
+       IMPLICIT NONE
+
+
+       INTEGER(iwp) ::  finput = 90  !<
+       INTEGER(iwp) ::  ierrn        !<
+       INTEGER(iwp) ::  k            !<
+       INTEGER(iwp) ::  nt            !<
+
+       CHARACTER(1) ::  hash     !<
+
+       REAL(wp) ::  highheight   !<
+       REAL(wp) ::  highqnudge   !<
+       REAL(wp) ::  highptnudge  !<
+       REAL(wp) ::  highunudge   !<
+       REAL(wp) ::  highvnudge   !<
+       REAL(wp) ::  highwnudge   !<
+       REAL(wp) ::  hightnudge   !<
+
+       REAL(wp) ::  lowheight    !<
+       REAL(wp) ::  lowqnudge    !<
+       REAL(wp) ::  lowptnudge   !<
+       REAL(wp) ::  lowunudge    !<
+       REAL(wp) ::  lowvnudge    !<
+       REAL(wp) ::  lowwnudge    !<
+       REAL(wp) ::  lowtnudge    !<
+
+       REAL(wp) ::  fac          !<
+
+       ALLOCATE( ptnudge(nzb:nzt+1,1:ntnudge), qnudge(nzb:nzt+1,1:ntnudge), &
+                 tnudge(nzb:nzt+1,1:ntnudge), unudge(nzb:nzt+1,1:ntnudge),  &
+                 vnudge(nzb:nzt+1,1:ntnudge), wnudge(nzb:nzt+1,1:ntnudge)  )
+
+       ALLOCATE( tmp_tnudge(nzb:nzt) )
+
+       ALLOCATE( timenudge(0:ntnudge) )
+
+       ptnudge = 0.0_wp; qnudge = 0.0_wp; tnudge = 0.0_wp; unudge = 0.0_wp
+       vnudge = 0.0_wp; wnudge = 0.0_wp; timenudge = 0.0_wp
+!
+!--    Initialize array tmp_nudge with a current nudging time scale of 6 hours
+       tmp_tnudge = 21600.0_wp
+
+       nt = 0
+       OPEN ( finput, FILE='NUDGING_DATA', STATUS='OLD', &
+              FORM='FORMATTED', IOSTAT=ierrn )
+
+       IF ( ierrn /= 0 )  THEN
+          message_string = 'file NUDGING_DATA does not exist'
+          CALL message( 'nudging', 'PA0365', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       ierrn = 0
+
+ rloop:DO
+          nt = nt + 1
+          hash = "#"
+          ierrn = 1 ! not zero
+!
+!--       Search for the next line consisting of "# time", 
+!--       from there onwards the profiles will be read
+          DO WHILE ( .NOT. ( hash == "#" .AND. ierrn == 0 ) ) 
+          
+            READ ( finput, *, IOSTAT=ierrn ) hash, timenudge(nt)
+            IF ( ierrn < 0 )  EXIT rloop
+
+          ENDDO
+
+          ierrn = 0
+          READ ( finput, *, IOSTAT=ierrn ) lowheight, lowtnudge, lowunudge,   &
+                                           lowvnudge, lowwnudge , lowptnudge, &
+                                           lowqnudge
+
+          IF ( ierrn /= 0 )  THEN
+             message_string = 'errors in file NUDGING_DATA'
+             CALL message( 'nudging', 'PA0366', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          ierrn = 0
+          READ ( finput, *, IOSTAT=ierrn ) highheight, hightnudge, highunudge,   &
+                                           highvnudge, highwnudge , highptnudge, &
+                                           highqnudge
+
+          IF ( ierrn /= 0 )  THEN
+             message_string = 'errors in file NUDGING_DATA'
+             CALL message( 'nudging', 'PA0366', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          DO  k = nzb, nzt+1
+             DO WHILE ( highheight < zu(k) )
+                lowheight  = highheight
+                lowtnudge  = hightnudge
+                lowunudge  = highunudge
+                lowvnudge  = highvnudge
+                lowwnudge  = highwnudge
+                lowptnudge = highptnudge
+                lowqnudge  = highqnudge
+ 
+                ierrn = 0
+                READ ( finput, *, IOSTAT=ierrn )  highheight , hightnudge ,    &
+                                                  highunudge , highvnudge ,    &
+                                                  highwnudge , highptnudge,    &
+                                                  highqnudge
+                IF (ierrn /= 0 )  THEN
+                   WRITE( message_string, * ) 'zu(',k,') = ', zu(k), 'm is ',  &
+                        'higher than the maximum height in NUDING_DATA which ',&
+                        'is ', lowheight, 'm. Interpolation on PALM ',         &
+                        'grid is not possible.'
+                   CALL message( 'nudging', 'PA0364', 1, 2, 0, 6, 0 )
+                ENDIF
+             ENDDO
+
+!
+!--          Interpolation of prescribed profiles in space 
+
+             fac = ( highheight - zu(k) ) / ( highheight - lowheight )
+
+             tnudge(k,nt)  = fac * lowtnudge  + ( 1.0_wp - fac ) * hightnudge
+             unudge(k,nt)  = fac * lowunudge  + ( 1.0_wp - fac ) * highunudge
+             vnudge(k,nt)  = fac * lowvnudge  + ( 1.0_wp - fac ) * highvnudge
+             wnudge(k,nt)  = fac * lowwnudge  + ( 1.0_wp - fac ) * highwnudge
+             ptnudge(k,nt) = fac * lowptnudge + ( 1.0_wp - fac ) * highptnudge
+             qnudge(k,nt)  = fac * lowqnudge  + ( 1.0_wp - fac ) * highqnudge
+          ENDDO
+
+       ENDDO rloop
+
+       CLOSE ( finput )
+
+!
+!--    Overwrite initial profiles in case of nudging
+       IF ( nudging )  THEN
+          pt_init = ptnudge(:,1)
+          u_init  = unudge(:,1)
+          v_init  = vnudge(:,1)
+          IF ( humidity  )  THEN ! is passive_scalar correct???
+             q_init = qnudge(:,1)
+          ENDIF
+
+          WRITE( message_string, * ) 'Initial profiles of u, v, pt and q ',    &
+                                     'from NUDGING_DATA are used.'
+          CALL message( 'large_scale_forcing_nudging', 'PA0370', 0, 0, 0, 6, 0 )
+       ENDIF
+
+
+    END SUBROUTINE nudge_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_tnudge ( time )
+
+       IMPLICIT NONE
+
+
+       REAL(wp) ::  dtm         !<
+       REAL(wp) ::  dtp         !<
+       REAL(wp) ::  time        !<
+
+       INTEGER(iwp) ::  k   !<
+       INTEGER(iwp) ::  nt  !<
+
+       nt = 1
+       DO WHILE ( time > timenudge(nt) )
+         nt = nt+1
+       ENDDO
+       IF ( time /= timenudge(1) ) THEN
+         nt = nt-1
+       ENDIF
+
+       dtm = ( time - timenudge(nt) ) / ( timenudge(nt+1) - timenudge(nt) )
+       dtp = ( timenudge(nt+1) - time ) / ( timenudge(nt+1) - timenudge(nt) )
+
+       DO  k = nzb, nzt
+          tmp_tnudge(k) = MAX( dt_3d, tnudge(k,nt) * dtp + tnudge(k,nt+1) * dtm )
+       ENDDO
+
+    END SUBROUTINE calc_tnudge
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE nudge ( time, prog_var )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  prog_var  !<
+
+       REAL(wp) ::  tmp_tend    !<
+       REAL(wp) ::  dtm         !<
+       REAL(wp) ::  dtp         !<
+       REAL(wp) ::  time        !<
+
+       INTEGER(iwp) ::  i  !<
+       INTEGER(iwp) ::  j  !<
+       INTEGER(iwp) ::  k  !<
+       INTEGER(iwp) ::  nt  !<
+
+
+       nt = 1
+       DO WHILE ( time > timenudge(nt) )
+         nt = nt+1
+       ENDDO
+       IF ( time /= timenudge(1) ) THEN
+         nt = nt-1
+       ENDIF
+
+       dtm = ( time - timenudge(nt) ) / ( timenudge(nt+1) - timenudge(nt) )
+       dtp = ( timenudge(nt+1) - time ) / ( timenudge(nt+1) - timenudge(nt) )
+
+       SELECT CASE ( prog_var )
+
+          CASE ( 'u' )
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+
+                   DO  k = nzb+1, nzt
+
+                      tmp_tend = - ( hom(k,1,1,0) - ( unudge(k,nt) * dtp +     &
+                                     unudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                      tend(k,j,i) = tend(k,j,i) + tmp_tend *                   &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+
+                      sums_ls_l(k,6) = sums_ls_l(k,6) + tmp_tend *             &
+                                     weight_substep(intermediate_timestep_count)
+                   ENDDO
+                  
+                   sums_ls_l(nzt+1,6) = sums_ls_l(nzt,6)
+ 
+                ENDDO
+            ENDDO
+
+          CASE ( 'v' )
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+
+                   DO  k = nzb+1, nzt
+
+                      tmp_tend = - ( hom(k,1,2,0) - ( vnudge(k,nt) * dtp +     &
+                                     vnudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                      tend(k,j,i) = tend(k,j,i) + tmp_tend *                   &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+
+                      sums_ls_l(k,7) = sums_ls_l(k,7) + tmp_tend *             &
+                                     weight_substep(intermediate_timestep_count)
+                   ENDDO
+                  
+                   sums_ls_l(nzt+1,7) = sums_ls_l(nzt,7)
+
+                ENDDO
+            ENDDO
+
+          CASE ( 'pt' )
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+
+                   DO  k = nzb+1, nzt
+
+                      tmp_tend = - ( hom(k,1,4,0) - ( ptnudge(k,nt) * dtp +    &
+                                     ptnudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                      tend(k,j,i) = tend(k,j,i) + tmp_tend *                   &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                      sums_ls_l(k,4) = sums_ls_l(k,4) + tmp_tend *             &
+                                     weight_substep(intermediate_timestep_count)
+                   ENDDO
+
+                   sums_ls_l(nzt+1,4) = sums_ls_l(nzt,4)
+
+                ENDDO
+            ENDDO
+
+          CASE ( 'q' )
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+
+                   DO  k = nzb+1, nzt
+
+                      tmp_tend = - ( hom(k,1,41,0) - ( qnudge(k,nt) * dtp +    &
+                                     qnudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                      tend(k,j,i) = tend(k,j,i) + tmp_tend *                   &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                      sums_ls_l(k,5) = sums_ls_l(k,5) + tmp_tend *             &
+                                     weight_substep(intermediate_timestep_count)
+                   ENDDO
+                  
+                   sums_ls_l(nzt+1,5) = sums_ls_l(nzt,5)
+
+                ENDDO
+            ENDDO
+
+          CASE DEFAULT
+             message_string = 'unknown prognostic variable "' // prog_var // '"'
+             CALL message( 'nudge', 'PA0367', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+    END SUBROUTINE nudge
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE nudge_ij( i, j, time, prog_var )
+
+       IMPLICIT NONE
+
+
+       CHARACTER (LEN=*) ::  prog_var  !<
+
+       REAL(wp) ::  tmp_tend    !<
+       REAL(wp) ::  dtm         !<
+       REAL(wp) ::  dtp         !<
+       REAL(wp) ::  time        !<
+
+       INTEGER(iwp) ::  i  !<
+       INTEGER(iwp) ::  j  !<
+       INTEGER(iwp) ::  k  !<
+       INTEGER(iwp) ::  nt  !<
+
+
+       nt = 1
+       DO WHILE ( time > timenudge(nt) )
+         nt = nt+1
+       ENDDO
+       IF ( time /= timenudge(1) )  THEN
+         nt = nt-1
+       ENDIF
+
+       dtm = ( time - timenudge(nt) ) / ( timenudge(nt+1) - timenudge(nt) )
+       dtp = ( timenudge(nt+1) - time ) / ( timenudge(nt+1) - timenudge(nt) )
+
+       SELECT CASE ( prog_var )
+
+          CASE ( 'u' )
+
+             DO  k = nzb+1, nzt
+
+                tmp_tend = - ( hom(k,1,1,0) - ( unudge(k,nt) * dtp +           &
+                               unudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                tend(k,j,i) = tend(k,j,i) + tmp_tend *                         &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+
+                sums_ls_l(k,6) = sums_ls_l(k,6) + tmp_tend                     &
+                                 * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+             sums_ls_l(nzt+1,6) = sums_ls_l(nzt,6)
+
+          CASE ( 'v' )
+
+             DO  k = nzb+1, nzt
+
+                tmp_tend = - ( hom(k,1,2,0) - ( vnudge(k,nt) * dtp +           &
+                               vnudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                tend(k,j,i) = tend(k,j,i) + tmp_tend *                         &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+
+                sums_ls_l(k,7) = sums_ls_l(k,7) + tmp_tend                     &
+                                 * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+             sums_ls_l(nzt+1,7) = sums_ls_l(nzt,7)
+
+          CASE ( 'pt' )
+
+             DO  k = nzb+1, nzt
+
+                tmp_tend = - ( hom(k,1,4,0) - ( ptnudge(k,nt) * dtp +          &
+                               ptnudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                tend(k,j,i) = tend(k,j,i) + tmp_tend *                         &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                sums_ls_l(k,4) = sums_ls_l(k,4) + tmp_tend                     &
+                                 * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+             sums_ls_l(nzt+1,4) = sums_ls_l(nzt,4)
+
+
+          CASE ( 'q' )
+
+             DO  k = nzb+1, nzt
+
+                tmp_tend = - ( hom(k,1,41,0) - ( qnudge(k,nt) * dtp +          &
+                               qnudge(k,nt+1) * dtm ) ) / tmp_tnudge(k)
+
+                tend(k,j,i) = tend(k,j,i) + tmp_tend *                         &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+
+                sums_ls_l(k,5) = sums_ls_l(k,5) + tmp_tend                     &
+                                 * weight_substep(intermediate_timestep_count)
+             ENDDO
+
+             sums_ls_l(nzt+1,5) = sums_ls_l(nzt,5)
+
+          CASE DEFAULT
+             message_string = 'unknown prognostic variable "' // prog_var // '"'
+             CALL message( 'nudge', 'PA0367', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+
+    END SUBROUTINE nudge_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE nudge_ref ( time )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nt                    !<
+
+       REAL(wp)             ::  fac           !<
+       REAL(wp), INTENT(in) ::  time          !<
+
+!
+!--    Interpolation in time of NUDGING_DATA for pt_init and q_init. This is 
+!--    needed for correct upper boundary conditions for pt and q and in case that 
+!      large scale subsidence as well as scalar Rayleigh-damping are used
+       nt = 1
+       DO WHILE ( time > time_vert(nt) )
+          nt = nt + 1
+       ENDDO
+       IF ( time /= time_vert(nt) )  THEN
+        nt = nt - 1
+       ENDIF
+
+       fac = ( time-time_vert(nt) ) / ( time_vert(nt+1)-time_vert(nt) )
+
+       pt_init = ptnudge(:,nt) + fac * ( ptnudge(:,nt+1) - ptnudge(:,nt) )
+       q_init  = qnudge(:,nt) + fac * ( qnudge(:,nt+1) - qnudge(:,nt) )
+       u_init  = unudge(:,nt) + fac * ( unudge(:,nt+1) - unudge(:,nt) )
+       v_init  = vnudge(:,nt) + fac * ( vnudge(:,nt+1) - vnudge(:,nt) )
+
+    END SUBROUTINE nudge_ref
+
+
+ END MODULE lsf_nudging_mod
Index: /palm/tags/release-6.0/SOURCE/local_stop.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/local_stop.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/local_stop.f90	(revision 3477)
@@ -0,0 +1,201 @@
+!> @file local_stop.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Added an empty output string to stop keywords to clean up job protocol
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2371 2017-08-24 13:01:17Z kanani
+! Removed unnecessary USE of vertical_nesting_mod
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical nesting implemented (SadiqHuq)
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! abort with MPI_COMM_WORLD added, nested runs always abort with MPI_ABORT
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! revision history before 2012 removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! Revision 1.1  2002/12/19 15:46:23  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Stop program execution
+!------------------------------------------------------------------------------!
+ SUBROUTINE local_stop
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  abort_mode, coupling_mode, coupling_mode_remote, dt_restart,    &
+               stop_dt, terminate_coupled, terminate_coupled_remote,           &
+               terminate_run, time_restart
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+
+#if defined( __parallel )
+    IF ( coupling_mode == 'uncoupled' )  THEN
+       IF ( nested_run )  THEN
+!
+!--       Workaround: If any of the nested model crashes, it aborts the whole
+!--       run with MPI_ABORT, regardless of the reason given by abort_mode
+          CALL MPI_ABORT( MPI_COMM_WORLD, 9999, ierr )
+       ELSE
+          IF ( abort_mode == 1 )  THEN
+             CALL MPI_FINALIZE( ierr )
+             STOP 1
+          ELSEIF ( abort_mode == 2 )  THEN
+             CALL MPI_ABORT( comm2d, 9999, ierr )
+          ELSEIF ( abort_mode == 3 )  THEN
+             CALL MPI_ABORT( MPI_COMM_WORLD, 9999, ierr )
+          ENDIF
+       ENDIF
+    ELSEIF ( coupling_mode(1:8) == 'vnested_' )  THEN
+
+       PRINT*, '+++ local_stop:'
+       PRINT*, '     model "', TRIM( coupling_mode ), '" terminated'
+!
+!--    Abort both coarse and fine grid
+       CALL MPI_ABORT( MPI_COMM_WORLD, 9999, ierr )
+    ELSE
+
+       SELECT CASE ( terminate_coupled_remote )
+
+          CASE ( 0 )
+             IF ( myid == 0 )  THEN
+                PRINT*, '+++ local_stop:'
+                PRINT*, '    local model "', TRIM( coupling_mode ), &
+                     '" stops now'
+             ENDIF
+!
+!--          Inform the remote model of the termination and its reason, provided
+!--          the remote model has not already been informed of another 
+!--          termination reason (terminate_coupled > 0) before.
+             IF ( terminate_coupled == 0 )  THEN
+                terminate_coupled = 1
+                IF ( myid == 0 ) THEN
+                   CALL MPI_SENDRECV( &
+                        terminate_coupled,        1, MPI_INTEGER, target_id,  0, &
+                        terminate_coupled_remote, 1, MPI_INTEGER, target_id,  0, &
+                        comm_inter, status, ierr )
+                ENDIF
+                CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_REAL, 0, comm2d, ierr)
+             ENDIF
+             CALL MPI_FINALIZE( ierr )
+             STOP 1
+
+          CASE ( 1 )
+             IF ( myid == 0 )  THEN
+                PRINT*, '+++ local_stop:'
+                PRINT*, '    remote model "', TRIM( coupling_mode_remote ), &
+                     '" stopped'
+             ENDIF
+             CALL MPI_FINALIZE( ierr )
+             STOP 1
+
+          CASE ( 2 )
+             IF ( myid == 0 )  THEN
+                PRINT*, '+++ local_stop:'
+                PRINT*, '    remote model "', TRIM( coupling_mode_remote ), &
+                     '" terminated'
+                PRINT*, '    with stop_dt = .T.'
+             ENDIF
+             stop_dt = .TRUE.
+
+          CASE ( 3 )
+             IF ( myid == 0 )  THEN
+                PRINT*, '+++ local_stop:'
+                PRINT*, '    remote model "', TRIM( coupling_mode_remote ), &
+                     '" terminated'
+                PRINT*, '    with terminate_run = .T. (CPU-time limit)'
+             ENDIF
+             terminate_run = .TRUE.
+
+          CASE ( 4 )
+             IF ( myid == 0 )  THEN
+                PRINT*, '+++ local_stop:'
+                PRINT*, '    remote model "', TRIM( coupling_mode_remote ), &
+                     '" terminated'
+                PRINT*, '    with terminate_run = .T. (restart)'
+             ENDIF
+             terminate_run = .TRUE.
+             time_restart = time_restart + dt_restart
+
+          CASE ( 5 )
+             IF ( myid == 0 )  THEN
+                PRINT*, '+++ local_stop:'
+                PRINT*, '    remote model "', TRIM( coupling_mode_remote ), &
+                     '" terminated'
+                PRINT*, '    with terminate_run = .T. (single restart)'
+             ENDIF
+             terminate_run = .TRUE.
+             time_restart = 9999999.9_wp
+
+       END SELECT
+
+    ENDIF
+
+#else
+
+    STOP 1
+
+#endif
+
+ END SUBROUTINE local_stop    
Index: /palm/tags/release-6.0/SOURCE/local_system.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/local_system.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/local_system.f90	(revision 3477)
@@ -0,0 +1,63 @@
+!> @file local_system.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/09/03 06:27:27  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> System calls for different operating systems
+!------------------------------------------------------------------------------!
+ SUBROUTINE local_system( command )
+ 
+
+    CHARACTER (LEN=*) ::  command !<
+
+    CALL SYSTEM( command )
+
+ END SUBROUTINE local_system    
Index: /palm/tags/release-6.0/SOURCE/local_tremain.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/local_tremain.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/local_tremain.f90	(revision 3477)
@@ -0,0 +1,94 @@
+!> @file local_tremain.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! cpu measurements are done with standard FORTRAN routine on every machine
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1998/03/18 20:14:47  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> For different operating systems get the remaining cpu-time of the job
+!------------------------------------------------------------------------------!
+ SUBROUTINE local_tremain( remaining_time )
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  maximum_cpu_time_allowed
+
+    USE cpulog,                                                                &
+        ONLY:  initial_wallclock_time
+
+    USE kinds
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(idp) ::  count                 !<
+    INTEGER(idp) ::  count_rate            !<
+
+    REAL(wp)     ::  actual_wallclock_time !<
+    REAL(wp)     ::  remaining_time        !<
+
+    CALL SYSTEM_CLOCK( count, count_rate )
+    actual_wallclock_time = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
+    remaining_time = maximum_cpu_time_allowed - &
+                     ( actual_wallclock_time - initial_wallclock_time )
+
+ END SUBROUTINE local_tremain
Index: /palm/tags/release-6.0/SOURCE/local_tremain_ini.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/local_tremain_ini.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/local_tremain_ini.f90	(revision 3477)
@@ -0,0 +1,86 @@
+!> @file local_tremain_ini.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! cpu measurements are done with standard FORTRAN routine on every machine
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1998/03/18 20:15:05  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Initialization of CPU-time measurements for different operating systems
+!------------------------------------------------------------------------------!
+ SUBROUTINE local_tremain_ini
+ 
+      
+    USE cpulog,                                                                &
+        ONLY:  initial_wallclock_time
+        
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(idp)     ::  count      !<
+    INTEGER(idp)     ::  count_rate !<
+
+!
+!-- Get initial wall clock time
+    CALL SYSTEM_CLOCK( count, count_rate )
+    initial_wallclock_time = REAL( count, KIND=wp ) / REAL( count_rate, KIND=wp )
+
+ END SUBROUTINE local_tremain_ini
Index: /palm/tags/release-6.0/SOURCE/lpm.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm.f90	(revision 3477)
@@ -0,0 +1,529 @@
+MODULE lpm_mod
+
+!> @file lpm.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Changed lpm from subroutine to module.
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Grid indices passed to lpm_boundary_conds. (responsible Philipp Thiele)
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done
+! 
+! 2418 2017-09-06 15:24:24Z suehring
+! Major bugfixes in modeling SGS particle speeds (since revision 1359).
+! Particle sorting added to distinguish between already completed and 
+! non-completed particles.
+! 
+! 2263 2017-06-08 14:59:01Z schwenkel
+! Implemented splitting and merging algorithm
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1936 2016-06-13 13:37:44Z suehring
+! Call routine for deallocation of unused memory.
+! Formatting adjustments
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! Call wall boundary conditions only if particles are in the vertical range of 
+! topography.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed.
+!
+! Initialization of sgs model not necessary for the use of cloud_droplets and
+! use_sgs_for_particles.
+!
+! lpm_release_set integrated.
+!
+! Unused variabled removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1416 2014-06-04 16:04:03Z suehring
+! user_lpm_advec is called for each gridpoint.
+! Bugfix: in order to prevent an infinite loop, time_loop_done is set .TRUE. 
+! at the head of the do-loop.  
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 851 2012-03-15 14:32:58Z raasch
+! Bugfix: resetting of particle_mask and tail mask moved from routine
+! lpm_exchange_horiz to here (end of sub-timestep loop)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! original routine advec_particles split into several subroutines and renamed
+! lpm
+!
+! 831 2012-02-22 00:29:39Z raasch
+! thermal_conductivity_l and diff_coeff_l now depend on temperature and
+! pressure
+!
+! 828 2012-02-21 12:00:36Z raasch
+! fast hall/wang kernels with fixed radius/dissipation classes added,
+! particle feature color renamed class, routine colker renamed
+! recalculate_kernel,
+! lower limit for droplet radius changed from 1E-7 to 1E-8
+!
+! Bugfix: transformation factor for dissipation changed from 1E5 to 1E4
+!
+! 825 2012-02-19 03:03:44Z raasch
+! droplet growth by condensation may include curvature and solution effects,
+! initialisation of temporary particle array for resorting removed,
+! particle attributes speed_x|y|z_sgs renamed rvar1|2|3,
+! module wang_kernel_mod renamed lpm_collision_kernels_mod,
+! wang_collision_kernel renamed wang_kernel
+!
+!
+! Revision 1.1  1999/11/25 16:16:06  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Particle advection
+!------------------------------------------------------------------------------!
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  ql_c, ql_v, ql_vp
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, dt_3d, dt_3d_reached, dt_3d_reached_l,          &
+               molecular_viscosity, simulated_time, topography
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE indices,                                                               &
+        ONLY: nxl, nxr, nys, nyn, nzb, nzb_max, nzt
+
+    USE kinds
+
+    USE lpm_exchange_horiz_mod,                                                &
+        ONLY:  dealloc_particles_array, lpm_exchange_horiz, lpm_move_particle
+
+    USE lpm_init_mod,                                                          &
+        ONLY: lpm_create_particle, PHASE_RELEASE
+
+    USE lpm_pack_and_sort_mod
+
+    USE particle_attributes,                                                   &
+        ONLY:  collision_kernel, deleted_particles, deallocate_memory,         &
+               dt_write_particle_data, dt_prel, end_time_prel,                 &
+               grid_particles, merging,  number_of_particles,                  &
+               number_of_particle_groups, particles, particle_groups,          &
+               prt_count, splitting, step_dealloc, time_prel,                  &
+               time_write_particle_data, trlp_count_sum, trlp_count_recv_sum,  &
+               trnp_count_sum, trnp_count_recv_sum, trrp_count_sum,            & 
+               trrp_count_recv_sum, trsp_count_sum, trsp_count_recv_sum,       &
+               use_sgs_for_particles, write_particle_statistics
+                              
+    USE pegrid
+
+ USE pmc_particle_interface,                                                &
+     ONLY: pmcp_c_get_particle_from_parent, pmcp_p_fill_particle_win,       &
+           pmcp_c_send_particle_to_parent, pmcp_p_empty_particle_win,       &
+           pmcp_p_delete_particles_in_fine_grid_area
+
+    USE pmc_interface,                                                      &
+       ONLY: nested_run
+
+ IMPLICIT NONE
+ PRIVATE
+ SAVE
+
+ INTERFACE lpm
+    MODULE PROCEDURE lpm
+ END INTERFACE lpm
+
+ PUBLIC lpm
+
+CONTAINS
+ SUBROUTINE lpm
+    IMPLICIT NONE
+
+    INTEGER(iwp)       ::  i                  !<
+    INTEGER(iwp)       ::  ie                 !<
+    INTEGER(iwp)       ::  is                 !<
+    INTEGER(iwp)       ::  j                  !<
+    INTEGER(iwp)       ::  je                 !<
+    INTEGER(iwp)       ::  js                 !<
+    INTEGER(iwp), SAVE ::  lpm_count = 0      !<
+    INTEGER(iwp)       ::  k                  !<
+    INTEGER(iwp)       ::  ke                 !<
+    INTEGER(iwp)       ::  ks                 !<
+    INTEGER(iwp)       ::  m                  !<
+    INTEGER(iwp), SAVE ::  steps = 0          !<
+
+    LOGICAL            ::  first_loop_stride  !<
+
+    CALL cpu_log( log_point(25), 'lpm', 'start' )
+
+!
+!-- Write particle data at current time on file.
+!-- This has to be done here, before particles are further processed,
+!-- because they may be deleted within this timestep (in case that
+!-- dt_write_particle_data = dt_prel = particle_maximum_age).
+    time_write_particle_data = time_write_particle_data + dt_3d
+    IF ( time_write_particle_data >= dt_write_particle_data )  THEN
+
+       CALL lpm_data_output_particles
+!
+!--    The MOD function allows for changes in the output interval with restart
+!--    runs.
+       time_write_particle_data = MOD( time_write_particle_data, &
+                                  MAX( dt_write_particle_data, dt_3d ) )
+    ENDIF
+
+!
+!-- Initialize arrays for marking those particles to be deleted after the
+!-- (sub-) timestep
+    deleted_particles = 0
+
+!
+!-- Initialize variables used for accumulating the number of particles
+!-- exchanged between the subdomains during all sub-timesteps (if sgs
+!-- velocities are included). These data are output further below on the
+!-- particle statistics file.
+    trlp_count_sum      = 0
+    trlp_count_recv_sum = 0
+    trrp_count_sum      = 0
+    trrp_count_recv_sum = 0
+    trsp_count_sum      = 0
+    trsp_count_recv_sum = 0
+    trnp_count_sum      = 0
+    trnp_count_recv_sum = 0
+
+
+!
+!-- Calculate exponential term used in case of particle inertia for each
+!-- of the particle groups
+    DO  m = 1, number_of_particle_groups
+       IF ( particle_groups(m)%density_ratio /= 0.0_wp )  THEN
+          particle_groups(m)%exp_arg  =                                        &
+                    4.5_wp * particle_groups(m)%density_ratio *                &
+                    molecular_viscosity / ( particle_groups(m)%radius )**2
+
+          particle_groups(m)%exp_term = EXP( -particle_groups(m)%exp_arg *     &
+                    dt_3d )
+       ENDIF
+    ENDDO
+
+!
+!-- If necessary, release new set of particles
+    IF ( time_prel >= dt_prel  .AND.  end_time_prel > simulated_time )  THEN
+
+       CALL lpm_create_particle(PHASE_RELEASE)
+!
+!--    The MOD function allows for changes in the output interval with
+!--    restart runs.
+       time_prel = MOD( time_prel, MAX( dt_prel, dt_3d ) )
+
+    ENDIF
+!
+!-- Reset summation arrays
+    IF ( cloud_droplets)  THEN
+       ql_c  = 0.0_wp
+       ql_v  = 0.0_wp
+       ql_vp = 0.0_wp
+    ENDIF
+
+    first_loop_stride = .TRUE.
+    grid_particles(:,:,:)%time_loop_done = .TRUE.
+!
+!-- Timestep loop for particle advection.
+!-- This loop has to be repeated until the advection time of every particle
+!-- (within the total domain!) has reached the LES timestep (dt_3d).
+!-- In case of including the SGS velocities, the particle timestep may be
+!-- smaller than the LES timestep (because of the Lagrangian timescale 
+!-- restriction) and particles may require to undergo several particle 
+!-- timesteps, before the LES timestep is reached. Because the number of these 
+!-- particle timesteps to be carried out is unknown at first, these steps are 
+!-- carried out in the following infinite loop with exit condition.
+    DO
+       CALL cpu_log( log_point_s(44), 'lpm_advec', 'start' )
+       CALL cpu_log( log_point_s(44), 'lpm_advec', 'pause' )
+       
+!
+!--    If particle advection includes SGS velocity components, calculate the
+!--    required SGS quantities (i.e. gradients of the TKE, as well as 
+!--    horizontally averaged profiles of the SGS TKE and the resolved-scale 
+!--    velocity variances)
+       IF ( use_sgs_for_particles  .AND.  .NOT. cloud_droplets )  THEN
+          CALL lpm_init_sgs_tke
+       ENDIF
+
+!
+!--    In case SGS-particle speed is considered, particles may carry out 
+!--    several particle timesteps. In order to prevent unnecessary 
+!--    treatment of particles that already reached the final time level, 
+!--    particles are sorted into contiguous blocks of finished and 
+!--    not-finished particles, in addition to their already sorting
+!--    according to their sub-boxes. 
+       IF ( .NOT. first_loop_stride  .AND.  use_sgs_for_particles )            &
+          CALL lpm_sort_timeloop_done
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+
+                number_of_particles = prt_count(k,j,i)
+!
+!--             If grid cell gets empty, flag must be true
+                IF ( number_of_particles <= 0 )  THEN
+                   grid_particles(k,j,i)%time_loop_done = .TRUE.
+                   CYCLE
+                ENDIF
+
+                IF ( .NOT. first_loop_stride  .AND.  &
+                     grid_particles(k,j,i)%time_loop_done ) CYCLE
+
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                particles(1:number_of_particles)%particle_mask = .TRUE.
+!
+!--             Initialize the variable storing the total time that a particle 
+!--             has advanced within the timestep procedure
+                IF ( first_loop_stride )  THEN
+                   particles(1:number_of_particles)%dt_sum = 0.0_wp
+                ENDIF
+!
+!--             Particle (droplet) growth by condensation/evaporation and 
+!--             collision
+                IF ( cloud_droplets  .AND.  first_loop_stride)  THEN
+!
+!--                Droplet growth by condensation / evaporation
+                   CALL lpm_droplet_condensation(i,j,k)
+!
+!--                Particle growth by collision
+                   IF ( collision_kernel /= 'none' )  THEN
+                      CALL lpm_droplet_collision(i,j,k)
+                   ENDIF
+
+                ENDIF
+!
+!--             Initialize the switch used for the loop exit condition checked
+!--             at the end of this loop. If at least one particle has failed to
+!--             reach the LES timestep, this switch will be set false in 
+!--             lpm_advec.
+                dt_3d_reached_l = .TRUE.
+
+!
+!--             Particle advection
+                CALL lpm_advec(i,j,k)
+!
+!--             Particle reflection from walls. Only applied if the particles 
+!--             are in the vertical range of the topography. (Here, some
+!--             optimization is still possible.)
+                IF ( topography /= 'flat' .AND. k < nzb_max + 2 )  THEN
+                   CALL  lpm_boundary_conds( 'walls', i, j, k )
+                ENDIF
+!
+!--             User-defined actions after the calculation of the new particle 
+!--             position
+                CALL user_lpm_advec(i,j,k)
+!
+!--             Apply boundary conditions to those particles that have crossed 
+!--             the top or bottom boundary and delete those particles, which are
+!--             older than allowed
+                CALL lpm_boundary_conds( 'bottom/top', i, j, k )
+!
+!---            If not all particles of the actual grid cell have reached the 
+!--             LES timestep, this cell has to do another loop iteration. Due to
+!--             the fact that particles can move into neighboring grid cells, 
+!--             these neighbor cells also have to perform another loop iteration.
+!--             Please note, this realization does not work properly if 
+!--             particles move into another subdomain. 
+                IF ( .NOT. dt_3d_reached_l )  THEN
+                   ks = MAX(nzb+1,k-1)
+                   ke = MIN(nzt,k+1)
+                   js = MAX(nys,j-1)
+                   je = MIN(nyn,j+1)
+                   is = MAX(nxl,i-1)
+                   ie = MIN(nxr,i+1)
+                   grid_particles(ks:ke,js:je,is:ie)%time_loop_done = .FALSE.
+                ELSE
+                   grid_particles(k,j,i)%time_loop_done = .TRUE.
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       steps = steps + 1
+       dt_3d_reached_l = ALL(grid_particles(:,:,:)%time_loop_done)
+!
+!--    Find out, if all particles on every PE have completed the LES timestep
+!--    and set the switch corespondingly
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( dt_3d_reached_l, dt_3d_reached, 1, MPI_LOGICAL, &
+                           MPI_LAND, comm2d, ierr )
+#else
+       dt_3d_reached = dt_3d_reached_l
+#endif
+
+       CALL cpu_log( log_point_s(44), 'lpm_advec', 'stop' )
+
+!
+!--    Increment time since last release
+       IF ( dt_3d_reached )  time_prel = time_prel + dt_3d
+!
+!--    Apply splitting and merging algorithm
+       IF ( cloud_droplets )  THEN
+          IF ( splitting ) THEN
+             CALL lpm_splitting
+          ENDIF
+          IF ( merging ) THEN
+             CALL lpm_merging
+          ENDIF
+       ENDIF
+!
+!--    Move Particles local to PE to a different grid cell
+       CALL lpm_move_particle
+
+!
+!--    Horizontal boundary conditions including exchange between subdmains
+       CALL lpm_exchange_horiz
+
+       IF ( .NOT. dt_3d_reached .OR. .NOT. nested_run )   THEN    ! IF .FALSE., lpm_sort_in_subboxes is done inside pcmp
+!
+!--       Pack particles (eliminate those marked for deletion),
+!--       determine new number of particles
+          CALL lpm_sort_in_subboxes
+!
+!--       Initialize variables for the next (sub-) timestep, i.e., for marking
+!--       those particles to be deleted after the timestep
+          deleted_particles = 0
+       ENDIF
+
+       IF ( dt_3d_reached )  EXIT
+
+       first_loop_stride = .FALSE.
+    ENDDO   ! timestep loop
+!    
+!-- in case of nested runs do the transfer of particles after every full model time step
+    IF ( nested_run )   THEN
+       CALL particles_from_parent_to_child
+       CALL particles_from_child_to_parent
+       CALL pmcp_p_delete_particles_in_fine_grid_area
+
+       CALL lpm_sort_in_subboxes
+
+       deleted_particles = 0
+    ENDIF
+
+!
+!-- Calculate the new liquid water content for each grid box
+    IF ( cloud_droplets )  CALL lpm_calc_liquid_water_content
+!
+!-- Deallocate unused memory
+    IF ( deallocate_memory  .AND.  lpm_count == step_dealloc )  THEN
+       CALL dealloc_particles_array
+       lpm_count = 0
+    ELSEIF ( deallocate_memory )  THEN
+       lpm_count = lpm_count + 1
+    ENDIF
+
+!
+!-- Set particle attributes.
+!-- Feature is not available if collision is activated, because the respective
+!-- particle attribute (class) is then used for storing the particle radius
+!-- class.
+    IF ( collision_kernel == 'none' )  CALL lpm_set_attributes
+
+!
+!-- Set particle attributes defined by the user
+    CALL user_lpm_set_attributes
+
+!
+!-- Write particle statistics (in particular the number of particles
+!-- exchanged between the subdomains) on file
+    IF ( write_particle_statistics )  CALL lpm_write_exchange_statistics
+
+    CALL cpu_log( log_point(25), 'lpm', 'stop' )
+
+ END SUBROUTINE lpm
+
+ SUBROUTINE particles_from_parent_to_child
+    IMPLICIT NONE
+
+    CALL pmcp_c_get_particle_from_parent                         ! Child actions
+    CALL pmcp_p_fill_particle_win                                ! Parent actions
+
+    RETURN
+ END SUBROUTINE particles_from_parent_to_child
+
+ SUBROUTINE particles_from_child_to_parent
+    IMPLICIT NONE
+
+    CALL pmcp_c_send_particle_to_parent                         ! Child actions
+    CALL pmcp_p_empty_particle_win                              ! Parent actions
+
+    RETURN
+ END SUBROUTINE particles_from_child_to_parent
+
+
+END MODULE lpm_mod
Index: /palm/tags/release-6.0/SOURCE/lpm_advec.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_advec.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_advec.f90	(revision 3477)
@@ -0,0 +1,1189 @@
+!> @file lpm_advec.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3207 2018-08-27 12:55:33Z schwenkel
+! Minor bugfix for sgs-velocities in case of cloud droplets
+! 
+! 3189 2018-08-06 13:18:55Z raasch
+! Bugfix: Index of the array dzw has to be k+1 during the interpolation. 
+! Otherwise k=0 causes an abortion because dzw is allocated from 1 to nzt+1
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz values were replaced by dzw or dz(1) to allow for right vertical stretching
+! 
+! 2969 2018-04-13 11:55:09Z thiele
+! Bugfix in Interpolation indices.
+! 
+! 2886 2018-03-14 11:51:53Z thiele
+! Bugfix in passive particle SGS Model:
+! Sometimes the added SGS velocities would lead to a violation of the CFL 
+! criterion for single particles. For this a check was added after the 
+! calculation of SGS velocities.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Particle interpolations at walls in case of SGS velocities revised and not
+! required parts are removed. (responsible Philipp Thiele)
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2630 2017-11-20 12:58:20Z schwenkel
+! Removed indices ilog and jlog which are no longer needed since particle box
+! locations are identical to scalar boxes and topography.
+! 
+! 2628 2017-11-20 12:40:38Z raasch
+! bugfix in logarithmic interpolation of v-component (usws was used by mistake)
+! 
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done 
+! 
+! 2417 2017-09-06 15:22:27Z suehring
+! Particle loops adapted for sub-box structure, i.e. for each sub-box the 
+! particle loop runs from start_index up to end_index instead from 1 to 
+! number_of_particles. This way, it is possible to skip unnecessary 
+! computations for particles that already completed the LES timestep. 
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2100 2017-01-05 16:40:16Z suehring
+! Prevent extremely large SGS-velocities in regions where TKE is zero, e.g. 
+! at the begin of simulations and/or in non-turbulent regions. 
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1936 2016-06-13 13:37:44Z suehring
+! Formatting adjustments
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! Put stochastic equation in an extra subroutine.
+! Set flag for stochastic equation to communicate whether a particle is near 
+! topography. This case, memory and drift term are disabled in the Weil equation. 
+!
+! Enable vertical logarithmic interpolation also above topography. This case, 
+! set a lower limit for the friction velocity, as it can become very small 
+! in narrow street canyons, leading to too large particle speeds.
+!
+! 1888 2016-04-21 12:20:49Z suehring
+! Bugfix concerning logarithmic interpolation of particle speed
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Random velocity fluctuations for particles added. Terminal fall velocity
+! for droplets is calculated from a parameterization (which is better than
+! the previous, physically correct calculation, which demands a very short
+! time step that is not used in the model).
+!
+! Unused variables deleted.
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Renamed prandtl_layer to constant_flux_layer.
+!
+! 1685 2015-10-08 07:32:13Z raasch
+! TKE check for negative values (so far, only zero value was checked)
+! offset_ocean_nzt_m1 removed
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1583 2015-04-15 12:16:27Z suehring
+! Bugfix: particle advection within Prandtl-layer in case of Galilei 
+! transformation.
+!
+! 1369 2014-04-24 05:57:38Z raasch
+! usage of module interfaces removed
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1314 2014-03-14 18:25:17Z suehring
+! Vertical logarithmic interpolation of horizontal particle speed for particles 
+! between roughness height and first vertical grid level.
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Calculation of new particle positions due to advection using a simple Euler
+!> scheme. Particles may feel inertia effects. SGS transport can be included
+!> using the stochastic model of Weil et al. (2004, JAS, 61, 2877-2887).
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_advec (ip,jp,kp)
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  de_dx, de_dy, de_dz, diss, dzw, e, km, u, v, w, zu, zw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, kappa
+
+    USE cpulog
+
+    USE pegrid
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, constant_flux_layer, dt_3d, dt_3d_reached_l,    &
+               dz, topography, u_gtrans, v_gtrans
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+        
+    USE indices,                                                               &
+        ONLY:  nzb, nzt, wall_flags_0
+        
+    USE kinds
+    
+    USE particle_attributes,                                                   &
+        ONLY:  block_offset, c_0, dt_min_part, grid_particles, iran_part,      &
+               log_z_z0, number_of_particles, number_of_sublayers,             &
+               particles, particle_groups, sgs_wf_part,                        &
+               use_sgs_for_particles, vertical_particle_advection, z0_av_global
+        
+    USE statistics,                                                            &
+        ONLY:  hom
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji, surf_def_h, surf_lsm_h, surf_usm_h
+
+    IMPLICIT NONE
+
+    LOGICAL ::  subbox_at_wall !< flag to see if the current subgridbox is adjacent to a wall
+
+    INTEGER(iwp) ::  i                           !< index variable along x
+    INTEGER(iwp) ::  ip                          !< index variable along x 
+    INTEGER(iwp) ::  j                           !< index variable along y 
+    INTEGER(iwp) ::  jp                          !< index variable along y 
+    INTEGER(iwp) ::  k                           !< index variable along z 
+    INTEGER(iwp) ::  k_wall                      !< vertical index of topography top 
+    INTEGER(iwp) ::  kp                          !< index variable along z 
+    INTEGER(iwp) ::  kw                          !< index variable along z
+    INTEGER(iwp) ::  n                           !< loop variable over all particles in a grid box
+    INTEGER(iwp) ::  nb                          !< block number particles are sorted in
+    INTEGER(iwp) ::  surf_start                  !< Index on surface data-type for current grid box 
+
+    INTEGER(iwp), DIMENSION(0:7) ::  start_index !< start particle index for current block
+    INTEGER(iwp), DIMENSION(0:7) ::  end_index   !< start particle index for current block
+
+    REAL(wp) ::  aa                 !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  bb                 !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  cc                 !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  d_z_p_z0           !< inverse of interpolation length for logarithmic interpolation 
+    REAL(wp) ::  dd                 !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  de_dx_int_l        !< x/y-interpolated TKE gradient (x) at particle position at lower vertical level
+    REAL(wp) ::  de_dx_int_u        !< x/y-interpolated TKE gradient (x) at particle position at upper vertical level
+    REAL(wp) ::  de_dy_int_l        !< x/y-interpolated TKE gradient (y) at particle position at lower vertical level
+    REAL(wp) ::  de_dy_int_u        !< x/y-interpolated TKE gradient (y) at particle position at upper vertical level
+    REAL(wp) ::  de_dt              !< temporal derivative of TKE experienced by the particle
+    REAL(wp) ::  de_dt_min          !< lower level for temporal TKE derivative
+    REAL(wp) ::  de_dz_int_l        !< x/y-interpolated TKE gradient (z) at particle position at lower vertical level
+    REAL(wp) ::  de_dz_int_u        !< x/y-interpolated TKE gradient (z) at particle position at upper vertical level
+    REAL(wp) ::  diameter           !< diamter of droplet
+    REAL(wp) ::  diss_int_l         !< x/y-interpolated dissipation at particle position at lower vertical level
+    REAL(wp) ::  diss_int_u         !< x/y-interpolated dissipation at particle position at upper vertical level
+    REAL(wp) ::  dt_particle_m      !< previous particle time step
+    REAL(wp) ::  dz_temp            !< 
+    REAL(wp) ::  e_int_l            !< x/y-interpolated TKE at particle position at lower vertical level
+    REAL(wp) ::  e_int_u            !< x/y-interpolated TKE at particle position at upper vertical level
+    REAL(wp) ::  e_mean_int         !< horizontal mean TKE at particle height
+    REAL(wp) ::  exp_arg            !<
+    REAL(wp) ::  exp_term           !<
+    REAL(wp) ::  gg                 !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  height_p           !< dummy argument for logarithmic interpolation
+    REAL(wp) ::  log_z_z0_int       !< logarithmus used for surface_layer interpolation
+    REAL(wp) ::  random_gauss       !<
+    REAL(wp) ::  RL                 !< Lagrangian autocorrelation coefficient
+    REAL(wp) ::  rg1                !< Gaussian distributed random number
+    REAL(wp) ::  rg2                !< Gaussian distributed random number
+    REAL(wp) ::  rg3                !< Gaussian distributed random number
+    REAL(wp) ::  sigma              !< velocity standard deviation
+    REAL(wp) ::  u_int_l            !< x/y-interpolated u-component at particle position at lower vertical level
+    REAL(wp) ::  u_int_u            !< x/y-interpolated u-component at particle position at upper vertical level
+    REAL(wp) ::  us_int             !< friction velocity at particle grid box
+    REAL(wp) ::  usws_int           !< surface momentum flux (u component) at particle grid box
+    REAL(wp) ::  v_int_l            !< x/y-interpolated v-component at particle position at lower vertical level
+    REAL(wp) ::  v_int_u            !< x/y-interpolated v-component at particle position at upper vertical level
+    REAL(wp) ::  vsws_int           !< surface momentum flux (u component) at particle grid box
+    REAL(wp) ::  vv_int             !<
+    REAL(wp) ::  w_int_l            !< x/y-interpolated w-component at particle position at lower vertical level
+    REAL(wp) ::  w_int_u            !< x/y-interpolated w-component at particle position at upper vertical level
+    REAL(wp) ::  w_s                !< terminal velocity of droplets
+    REAL(wp) ::  x                  !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  y                  !< dummy argument for horizontal particle interpolation 
+    REAL(wp) ::  z_p                !< surface layer height (0.5 dz)
+
+    REAL(wp), PARAMETER ::  a_rog = 9.65_wp      !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  b_rog = 10.43_wp     !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  c_rog = 0.6_wp       !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  k_cap_rog = 4.0_wp   !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  k_low_rog = 12.0_wp  !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  d0_rog = 0.745_wp    !< separation diameter
+
+    REAL(wp), DIMENSION(number_of_particles) ::  term_1_2       !< flag to communicate whether a particle is near topography or not
+    REAL(wp), DIMENSION(number_of_particles) ::  dens_ratio     !<
+    REAL(wp), DIMENSION(number_of_particles) ::  de_dx_int      !< horizontal TKE gradient along x at particle position
+    REAL(wp), DIMENSION(number_of_particles) ::  de_dy_int      !< horizontal TKE gradient along y at particle position
+    REAL(wp), DIMENSION(number_of_particles) ::  de_dz_int      !< horizontal TKE gradient along z at particle position
+    REAL(wp), DIMENSION(number_of_particles) ::  diss_int       !< dissipation at particle position
+    REAL(wp), DIMENSION(number_of_particles) ::  dt_gap         !< remaining time until particle time integration reaches LES time
+    REAL(wp), DIMENSION(number_of_particles) ::  dt_particle    !< particle time step
+    REAL(wp), DIMENSION(number_of_particles) ::  e_int          !< TKE at particle position
+    REAL(wp), DIMENSION(number_of_particles) ::  fs_int         !< weighting factor for subgrid-scale particle speed
+    REAL(wp), DIMENSION(number_of_particles) ::  lagr_timescale !< Lagrangian timescale
+    REAL(wp), DIMENSION(number_of_particles) ::  rvar1_temp     !< 
+    REAL(wp), DIMENSION(number_of_particles) ::  rvar2_temp     !< 
+    REAL(wp), DIMENSION(number_of_particles) ::  rvar3_temp     !< 
+    REAL(wp), DIMENSION(number_of_particles) ::  u_int          !< u-component of particle speed
+    REAL(wp), DIMENSION(number_of_particles) ::  v_int          !< v-component of particle speed 
+    REAL(wp), DIMENSION(number_of_particles) ::  w_int          !< w-component of particle speed
+    REAL(wp), DIMENSION(number_of_particles) ::  xv             !< x-position
+    REAL(wp), DIMENSION(number_of_particles) ::  yv             !< y-position
+    REAL(wp), DIMENSION(number_of_particles) ::  zv             !< z-position
+
+    REAL(wp), DIMENSION(number_of_particles, 3) ::  rg !< vector of Gaussian distributed random numbers 
+
+    CALL cpu_log( log_point_s(44), 'lpm_advec', 'continue' )
+
+!
+!-- Determine height of Prandtl layer and distance between Prandtl-layer
+!-- height and horizontal mean roughness height, which are required for 
+!-- vertical logarithmic interpolation of horizontal particle speeds 
+!-- (for particles below first vertical grid level).
+    z_p      = zu(nzb+1) - zw(nzb)
+    d_z_p_z0 = 1.0_wp / ( z_p - z0_av_global )
+
+    start_index = grid_particles(kp,jp,ip)%start_index
+    end_index   = grid_particles(kp,jp,ip)%end_index
+
+    xv = particles(1:number_of_particles)%x
+    yv = particles(1:number_of_particles)%y
+    zv = particles(1:number_of_particles)%z
+
+    DO  nb = 0, 7
+!
+!--    Interpolate u velocity-component       
+       i = ip
+       j = jp + block_offset(nb)%j_off
+       k = kp + block_offset(nb)%k_off
+
+       DO  n = start_index(nb), end_index(nb)
+!
+!--       Interpolation of the u velocity component onto particle position.  
+!--       Particles are interpolation bi-linearly in the horizontal and a 
+!--       linearly in the vertical. An exception is made for particles below
+!--       the first vertical grid level in case of a prandtl layer. In this 
+!--       case the horizontal particle velocity components are determined using
+!--       Monin-Obukhov relations (if branch). 
+!--       First, check if particle is located below first vertical grid level 
+!--       above topography (Prandtl-layer height)
+!--       Determine vertical index of topography top
+          k_wall = get_topography_top_index_ji( jp, ip, 's' )
+
+          IF ( constant_flux_layer  .AND.  zv(n) - zw(k_wall) < z_p )  THEN
+!
+!--          Resolved-scale horizontal particle velocity is zero below z0. 
+             IF ( zv(n) - zw(k_wall) < z0_av_global )  THEN
+                u_int(n) = 0.0_wp
+             ELSE
+!
+!--             Determine the sublayer. Further used as index.
+                height_p = ( zv(n) - zw(k_wall) - z0_av_global ) &
+                                     * REAL( number_of_sublayers, KIND=wp )    &
+                                     * d_z_p_z0 
+!
+!--             Calculate LOG(z/z0) for exact particle height. Therefore,   
+!--             interpolate linearly between precalculated logarithm. 
+                log_z_z0_int = log_z_z0(INT(height_p))                         &
+                                 + ( height_p - INT(height_p) )                &
+                                 * ( log_z_z0(INT(height_p)+1)                 &
+                                      - log_z_z0(INT(height_p))                &
+                                   ) 
+!
+!--             Get friction velocity and momentum flux from new surface data 
+!--             types.
+                IF ( surf_def_h(0)%start_index(jp,ip) <=                   &
+                     surf_def_h(0)%end_index(jp,ip) )  THEN
+                   surf_start = surf_def_h(0)%start_index(jp,ip)
+!--                Limit friction velocity. In narrow canyons or holes the 
+!--                friction velocity can become very small, resulting in a too
+!--                large particle speed.
+                   us_int    = MAX( surf_def_h(0)%us(surf_start), 0.01_wp )  
+                   usws_int  = surf_def_h(0)%usws(surf_start)
+                ELSEIF ( surf_lsm_h%start_index(jp,ip) <=                  &
+                         surf_lsm_h%end_index(jp,ip) )  THEN
+                   surf_start = surf_lsm_h%start_index(jp,ip)
+                   us_int    = MAX( surf_lsm_h%us(surf_start), 0.01_wp )  
+                   usws_int  = surf_lsm_h%usws(surf_start)
+                ELSEIF ( surf_usm_h%start_index(jp,ip) <=                  &
+                         surf_usm_h%end_index(jp,ip) )  THEN
+                   surf_start = surf_usm_h%start_index(jp,ip)
+                   us_int    = MAX( surf_usm_h%us(surf_start), 0.01_wp )  
+                   usws_int  = surf_usm_h%usws(surf_start)
+                ENDIF
+
+!
+!--             Neutral solution is applied for all situations, e.g. also for 
+!--             unstable and stable situations. Even though this is not exact 
+!--             this saves a lot of CPU time since several calls of intrinsic 
+!--             FORTRAN procedures (LOG, ATAN) are avoided, This is justified 
+!--             as sensitivity studies revealed no significant effect of 
+!--             using the neutral solution also for un/stable situations.
+                u_int(n) = -usws_int / ( us_int * kappa + 1E-10_wp )           & 
+                            * log_z_z0_int - u_gtrans
+                
+             ENDIF
+!
+!--       Particle above the first grid level. Bi-linear interpolation in the 
+!--       horizontal and linear interpolation in the vertical direction.
+          ELSE
+
+             x  = xv(n) - i * dx
+             y  = yv(n) + ( 0.5_wp - j ) * dy
+             aa = x**2          + y**2
+             bb = ( dx - x )**2 + y**2
+             cc = x**2          + ( dy - y )**2
+             dd = ( dx - x )**2 + ( dy - y )**2
+             gg = aa + bb + cc + dd
+
+             u_int_l = ( ( gg - aa ) * u(k,j,i)   + ( gg - bb ) * u(k,j,i+1)   &
+                         + ( gg - cc ) * u(k,j+1,i) + ( gg - dd ) *            &
+                         u(k,j+1,i+1) ) / ( 3.0_wp * gg ) - u_gtrans
+
+             IF ( k == nzt )  THEN
+                u_int(n) = u_int_l
+             ELSE
+                u_int_u = ( ( gg-aa ) * u(k+1,j,i) + ( gg-bb ) * u(k+1,j,i+1)  &
+                            + ( gg-cc ) * u(k+1,j+1,i) + ( gg-dd ) *           &
+                            u(k+1,j+1,i+1) ) / ( 3.0_wp * gg ) - u_gtrans
+                u_int(n) = u_int_l + ( zv(n) - zu(k) ) / dzw(k+1) *               &
+                           ( u_int_u - u_int_l )
+             ENDIF
+
+          ENDIF
+
+       ENDDO
+!
+!--    Same procedure for interpolation of the v velocity-component 
+       i = ip + block_offset(nb)%i_off
+       j = jp
+       k = kp + block_offset(nb)%k_off
+
+       DO  n = start_index(nb), end_index(nb)
+
+!
+!--       Determine vertical index of topography top
+          k_wall = get_topography_top_index_ji( jp,ip, 's' )
+
+          IF ( constant_flux_layer  .AND.  zv(n) - zw(k_wall) < z_p )  THEN
+             IF ( zv(n) - zw(k_wall) < z0_av_global )  THEN
+!
+!--             Resolved-scale horizontal particle velocity is zero below z0. 
+                v_int(n) = 0.0_wp
+             ELSE       
+!
+!--             Determine the sublayer. Further used as index. Please note, 
+!--             logarithmus can not be reused from above, as in in case of
+!--             topography particle on u-grid can be above surface-layer height,
+!--             whereas it can be below on v-grid. 
+                height_p = ( zv(n) - zw(k_wall) - z0_av_global ) &
+                                  * REAL( number_of_sublayers, KIND=wp )       &
+                                  * d_z_p_z0 
+!
+!--             Calculate LOG(z/z0) for exact particle height. Therefore,   
+!--             interpolate linearly between precalculated logarithm. 
+                log_z_z0_int = log_z_z0(INT(height_p))                         &
+                                 + ( height_p - INT(height_p) )                &
+                                 * ( log_z_z0(INT(height_p)+1)                 &
+                                      - log_z_z0(INT(height_p))                &
+                                   ) 
+!
+!--             Get friction velocity and momentum flux from new surface data 
+!--             types.
+                IF ( surf_def_h(0)%start_index(jp,ip) <=                   &
+                     surf_def_h(0)%end_index(jp,ip) )  THEN
+                   surf_start = surf_def_h(0)%start_index(jp,ip)
+!--                Limit friction velocity. In narrow canyons or holes the 
+!--                friction velocity can become very small, resulting in a too
+!--                large particle speed.
+                   us_int    = MAX( surf_def_h(0)%us(surf_start), 0.01_wp )  
+                   vsws_int  = surf_def_h(0)%vsws(surf_start)
+                ELSEIF ( surf_lsm_h%start_index(jp,ip) <=                  &
+                         surf_lsm_h%end_index(jp,ip) )  THEN
+                   surf_start = surf_lsm_h%start_index(jp,ip)
+                   us_int    = MAX( surf_lsm_h%us(surf_start), 0.01_wp )  
+                   vsws_int  = surf_lsm_h%vsws(surf_start)
+                ELSEIF ( surf_usm_h%start_index(jp,ip) <=                  &
+                         surf_usm_h%end_index(jp,ip) )  THEN
+                   surf_start = surf_usm_h%start_index(jp,ip)
+                   us_int    = MAX( surf_usm_h%us(surf_start), 0.01_wp )  
+                   vsws_int  = surf_usm_h%vsws(surf_start)
+                ENDIF 
+!
+!--             Neutral solution is applied for all situations, e.g. also for 
+!--             unstable and stable situations. Even though this is not exact 
+!--             this saves a lot of CPU time since several calls of intrinsic 
+!--             FORTRAN procedures (LOG, ATAN) are avoided, This is justified 
+!--             as sensitivity studies revealed no significant effect of 
+!--             using the neutral solution also for un/stable situations.
+                v_int(n) = -vsws_int / ( us_int * kappa + 1E-10_wp )           &
+                         * log_z_z0_int - v_gtrans
+
+             ENDIF
+
+          ELSE
+             x  = xv(n) + ( 0.5_wp - i ) * dx
+             y  = yv(n) - j * dy
+             aa = x**2          + y**2
+             bb = ( dx - x )**2 + y**2
+             cc = x**2          + ( dy - y )**2
+             dd = ( dx - x )**2 + ( dy - y )**2
+             gg = aa + bb + cc + dd
+
+             v_int_l = ( ( gg - aa ) * v(k,j,i)   + ( gg - bb ) * v(k,j,i+1)   &
+                       + ( gg - cc ) * v(k,j+1,i) + ( gg - dd ) * v(k,j+1,i+1) &
+                       ) / ( 3.0_wp * gg ) - v_gtrans
+
+             IF ( k == nzt )  THEN
+                v_int(n) = v_int_l
+             ELSE
+                v_int_u = ( ( gg-aa ) * v(k+1,j,i)   + ( gg-bb ) * v(k+1,j,i+1)   &
+                          + ( gg-cc ) * v(k+1,j+1,i) + ( gg-dd ) * v(k+1,j+1,i+1) &
+                          ) / ( 3.0_wp * gg ) - v_gtrans
+                v_int(n) = v_int_l + ( zv(n) - zu(k) ) / dzw(k+1) *               &
+                                  ( v_int_u - v_int_l )
+             ENDIF
+
+          ENDIF
+
+       ENDDO
+!
+!--    Same procedure for interpolation of the w velocity-component
+       i = ip + block_offset(nb)%i_off
+       j = jp + block_offset(nb)%j_off
+       k = kp - 1
+
+       DO  n = start_index(nb), end_index(nb)
+
+          IF ( vertical_particle_advection(particles(n)%group) )  THEN
+
+             x  = xv(n) + ( 0.5_wp - i ) * dx
+             y  = yv(n) + ( 0.5_wp - j ) * dy
+             aa = x**2          + y**2
+             bb = ( dx - x )**2 + y**2
+             cc = x**2          + ( dy - y )**2
+             dd = ( dx - x )**2 + ( dy - y )**2
+             gg = aa + bb + cc + dd
+
+             w_int_l = ( ( gg - aa ) * w(k,j,i)   + ( gg - bb ) * w(k,j,i+1)   &
+                       + ( gg - cc ) * w(k,j+1,i) + ( gg - dd ) * w(k,j+1,i+1) &
+                       ) / ( 3.0_wp * gg )
+
+             IF ( k == nzt )  THEN
+                w_int(n) = w_int_l
+             ELSE
+                w_int_u = ( ( gg-aa ) * w(k+1,j,i)   + &
+                            ( gg-bb ) * w(k+1,j,i+1) + &
+                            ( gg-cc ) * w(k+1,j+1,i) + &
+                            ( gg-dd ) * w(k+1,j+1,i+1) &
+                          ) / ( 3.0_wp * gg )
+                w_int(n) = w_int_l + ( zv(n) - zw(k) ) / dzw(k+1) *               &
+                           ( w_int_u - w_int_l )
+             ENDIF
+
+          ELSE
+
+             w_int(n) = 0.0_wp
+
+          ENDIF
+
+       ENDDO
+
+    ENDDO
+
+!-- Interpolate and calculate quantities needed for calculating the SGS
+!-- velocities
+    IF ( use_sgs_for_particles  .AND.  .NOT. cloud_droplets )  THEN
+    
+       DO  nb = 0,7
+         
+          subbox_at_wall = .FALSE.         
+!
+!--       In case of topography check if subbox is adjacent to a wall
+          IF ( .NOT. topography == 'flat' ) THEN
+             i = ip + MERGE( -1_iwp , 1_iwp, BTEST( nb, 2 ) )
+             j = jp + MERGE( -1_iwp , 1_iwp, BTEST( nb, 1 ) )
+             k = kp + MERGE( -1_iwp , 1_iwp, BTEST( nb, 0 ) )
+             IF ( .NOT. BTEST(wall_flags_0(k,  jp, ip), 0) .OR.                &
+                  .NOT. BTEST(wall_flags_0(kp, j,  ip), 0) .OR.                &
+                  .NOT. BTEST(wall_flags_0(kp, jp, i ), 0) )                   &
+             THEN
+                subbox_at_wall = .TRUE.
+             ENDIF
+          ENDIF
+          IF ( subbox_at_wall ) THEN
+             e_int(start_index(nb):end_index(nb))     = e(kp,jp,ip) 
+             diss_int(start_index(nb):end_index(nb))  = diss(kp,jp,ip)
+             de_dx_int(start_index(nb):end_index(nb)) = de_dx(kp,jp,ip)
+             de_dy_int(start_index(nb):end_index(nb)) = de_dy(kp,jp,ip)
+             de_dz_int(start_index(nb):end_index(nb)) = de_dz(kp,jp,ip)
+!
+!--          Set flag for stochastic equation.
+             term_1_2(start_index(nb):end_index(nb)) = 0.0_wp             
+          ELSE
+             i = ip + block_offset(nb)%i_off
+             j = jp + block_offset(nb)%j_off
+             k = kp + block_offset(nb)%k_off
+
+             DO  n = start_index(nb), end_index(nb)
+!
+!--             Interpolate TKE
+                x  = xv(n) + ( 0.5_wp - i ) * dx
+                y  = yv(n) + ( 0.5_wp - j ) * dy
+                aa = x**2          + y**2
+                bb = ( dx - x )**2 + y**2
+                cc = x**2          + ( dy - y )**2
+                dd = ( dx - x )**2 + ( dy - y )**2
+                gg = aa + bb + cc + dd
+
+                e_int_l = ( ( gg-aa ) * e(k,j,i)   + ( gg-bb ) * e(k,j,i+1)   &
+                          + ( gg-cc ) * e(k,j+1,i) + ( gg-dd ) * e(k,j+1,i+1) &
+                          ) / ( 3.0_wp * gg )
+
+                IF ( k+1 == nzt+1 )  THEN
+                   e_int(n) = e_int_l
+                ELSE
+                   e_int_u = ( ( gg - aa ) * e(k+1,j,i)   + &
+                               ( gg - bb ) * e(k+1,j,i+1) + &
+                               ( gg - cc ) * e(k+1,j+1,i) + &
+                               ( gg - dd ) * e(k+1,j+1,i+1) &
+                            ) / ( 3.0_wp * gg )
+                   e_int(n) = e_int_l + ( zv(n) - zu(k) ) / dzw(k+1) *            &
+                                     ( e_int_u - e_int_l )
+                ENDIF
+!
+!--             Needed to avoid NaN particle velocities (this might not be
+!--             required any more)
+                IF ( e_int(n) <= 0.0_wp )  THEN
+                   e_int(n) = 1.0E-20_wp
+                ENDIF
+!
+!--             Interpolate the TKE gradient along x (adopt incides i,j,k and
+!--             all position variables from above (TKE))
+                de_dx_int_l = ( ( gg - aa ) * de_dx(k,j,i)   + &
+                                ( gg - bb ) * de_dx(k,j,i+1) + &
+                                ( gg - cc ) * de_dx(k,j+1,i) + &
+                                ( gg - dd ) * de_dx(k,j+1,i+1) &
+                               ) / ( 3.0_wp * gg )
+
+                IF ( ( k+1 == nzt+1 )  .OR.  ( k == nzb ) )  THEN
+                   de_dx_int(n) = de_dx_int_l
+                ELSE
+                   de_dx_int_u = ( ( gg - aa ) * de_dx(k+1,j,i)   + &
+                                   ( gg - bb ) * de_dx(k+1,j,i+1) + &
+                                   ( gg - cc ) * de_dx(k+1,j+1,i) + &
+                                   ( gg - dd ) * de_dx(k+1,j+1,i+1) &
+                                  ) / ( 3.0_wp * gg )
+                   de_dx_int(n) = de_dx_int_l + ( zv(n) - zu(k) ) / dzw(k+1) *    &
+                                              ( de_dx_int_u - de_dx_int_l )
+                ENDIF
+!
+!--             Interpolate the TKE gradient along y
+                de_dy_int_l = ( ( gg - aa ) * de_dy(k,j,i)   + &
+                                ( gg - bb ) * de_dy(k,j,i+1) + &
+                                ( gg - cc ) * de_dy(k,j+1,i) + &
+                                ( gg - dd ) * de_dy(k,j+1,i+1) &
+                               ) / ( 3.0_wp * gg )
+                IF ( ( k+1 == nzt+1 )  .OR.  ( k == nzb ) )  THEN
+                   de_dy_int(n) = de_dy_int_l
+                ELSE
+                   de_dy_int_u = ( ( gg - aa ) * de_dy(k+1,j,i)   + &
+                                   ( gg - bb ) * de_dy(k+1,j,i+1) + &
+                                   ( gg - cc ) * de_dy(k+1,j+1,i) + &
+                                   ( gg - dd ) * de_dy(k+1,j+1,i+1) &
+                                  ) / ( 3.0_wp * gg )
+                      de_dy_int(n) = de_dy_int_l + ( zv(n) - zu(k) ) / dzw(k+1) * &
+                                                 ( de_dy_int_u - de_dy_int_l )
+                ENDIF
+
+!
+!--             Interpolate the TKE gradient along z
+                IF ( zv(n) < 0.5_wp * dz(1) )  THEN
+                   de_dz_int(n) = 0.0_wp
+                ELSE
+                   de_dz_int_l = ( ( gg - aa ) * de_dz(k,j,i)   + &
+                                   ( gg - bb ) * de_dz(k,j,i+1) + &
+                                   ( gg - cc ) * de_dz(k,j+1,i) + &
+                                   ( gg - dd ) * de_dz(k,j+1,i+1) &
+                                  ) / ( 3.0_wp * gg )
+
+                   IF ( ( k+1 == nzt+1 )  .OR.  ( k == nzb ) )  THEN
+                      de_dz_int(n) = de_dz_int_l
+                   ELSE
+                      de_dz_int_u = ( ( gg - aa ) * de_dz(k+1,j,i)   + &
+                                      ( gg - bb ) * de_dz(k+1,j,i+1) + &
+                                      ( gg - cc ) * de_dz(k+1,j+1,i) + &
+                                      ( gg - dd ) * de_dz(k+1,j+1,i+1) &
+                                     ) / ( 3.0_wp * gg )
+                      de_dz_int(n) = de_dz_int_l + ( zv(n) - zu(k) ) / dzw(k+1) * &
+                                                 ( de_dz_int_u - de_dz_int_l )
+                   ENDIF
+                ENDIF
+
+!
+!--             Interpolate the dissipation of TKE
+                diss_int_l = ( ( gg - aa ) * diss(k,j,i)   + &
+                               ( gg - bb ) * diss(k,j,i+1) + &
+                               ( gg - cc ) * diss(k,j+1,i) + &
+                               ( gg - dd ) * diss(k,j+1,i+1) &
+                               ) / ( 3.0_wp * gg )
+
+                IF ( k == nzt )  THEN
+                   diss_int(n) = diss_int_l
+                ELSE
+                   diss_int_u = ( ( gg - aa ) * diss(k+1,j,i)   + &
+                                  ( gg - bb ) * diss(k+1,j,i+1) + &
+                                  ( gg - cc ) * diss(k+1,j+1,i) + &
+                                  ( gg - dd ) * diss(k+1,j+1,i+1) &
+                                 ) / ( 3.0_wp * gg )
+                   diss_int(n) = diss_int_l + ( zv(n) - zu(k) ) / dzw(k+1) *      &
+                                            ( diss_int_u - diss_int_l )
+                ENDIF
+
+!
+!--             Set flag for stochastic equation.
+                term_1_2(n) = 1.0_wp
+             ENDDO
+          ENDIF
+       ENDDO
+
+       DO nb = 0,7
+          i = ip + block_offset(nb)%i_off
+          j = jp + block_offset(nb)%j_off
+          k = kp + block_offset(nb)%k_off
+
+          DO  n = start_index(nb), end_index(nb)
+!
+!--          Vertical interpolation of the horizontally averaged SGS TKE and
+!--          resolved-scale velocity variances and use the interpolated values
+!--          to calculate the coefficient fs, which is a measure of the ratio
+!--          of the subgrid-scale turbulent kinetic energy to the total amount
+!--          of turbulent kinetic energy.
+             IF ( k == 0 )  THEN
+                e_mean_int = hom(0,1,8,0)
+             ELSE
+                e_mean_int = hom(k,1,8,0) +                                    &
+                                           ( hom(k+1,1,8,0) - hom(k,1,8,0) ) / &
+                                           ( zu(k+1) - zu(k) ) *               &
+                                           ( zv(n) - zu(k) )
+             ENDIF
+
+             kw = kp - 1
+
+             IF ( k == 0 )  THEN
+                aa  = hom(k+1,1,30,0)  * ( zv(n) / &
+                                         ( 0.5_wp * ( zu(k+1) - zu(k) ) ) )
+                bb  = hom(k+1,1,31,0)  * ( zv(n) / &
+                                         ( 0.5_wp * ( zu(k+1) - zu(k) ) ) )
+                cc  = hom(kw+1,1,32,0) * ( zv(n) / &
+                                         ( 1.0_wp * ( zw(kw+1) - zw(kw) ) ) )
+             ELSE
+                aa  = hom(k,1,30,0) + ( hom(k+1,1,30,0) - hom(k,1,30,0) ) *    &
+                           ( ( zv(n) - zu(k) ) / ( zu(k+1) - zu(k) ) )
+                bb  = hom(k,1,31,0) + ( hom(k+1,1,31,0) - hom(k,1,31,0) ) *    &
+                           ( ( zv(n) - zu(k) ) / ( zu(k+1) - zu(k) ) )
+                cc  = hom(kw,1,32,0) + ( hom(kw+1,1,32,0)-hom(kw,1,32,0) ) *   &
+                           ( ( zv(n) - zw(kw) ) / ( zw(kw+1)-zw(kw) ) )
+             ENDIF
+
+             vv_int = ( 1.0_wp / 3.0_wp ) * ( aa + bb + cc )
+!
+!--          Needed to avoid NaN particle velocities. The value of 1.0 is just
+!--          an educated guess for the given case.
+             IF ( vv_int + ( 2.0_wp / 3.0_wp ) * e_mean_int == 0.0_wp )  THEN
+                fs_int(n) = 1.0_wp
+             ELSE
+                fs_int(n) = ( 2.0_wp / 3.0_wp ) * e_mean_int /                 &
+                            ( vv_int + ( 2.0_wp / 3.0_wp ) * e_mean_int )
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+       DO  nb = 0, 7
+          DO  n = start_index(nb), end_index(nb)
+             rg(n,1) = random_gauss( iran_part, 5.0_wp )
+             rg(n,2) = random_gauss( iran_part, 5.0_wp )
+             rg(n,3) = random_gauss( iran_part, 5.0_wp )
+          ENDDO
+       ENDDO
+
+       DO  nb = 0, 7
+          DO  n = start_index(nb), end_index(nb)
+
+!
+!--          Calculate the Lagrangian timescale according to Weil et al. (2004).
+             lagr_timescale(n) = ( 4.0_wp * e_int(n) + 1E-20_wp ) / &
+                              ( 3.0_wp * fs_int(n) * c_0 * diss_int(n) + 1E-20_wp )
+
+!
+!--          Calculate the next particle timestep. dt_gap is the time needed to
+!--          complete the current LES timestep.
+             dt_gap(n) = dt_3d - particles(n)%dt_sum
+             dt_particle(n) = MIN( dt_3d, 0.025_wp * lagr_timescale(n), dt_gap(n) )
+             particles(n)%aux1 = lagr_timescale(n)
+             particles(n)%aux2 = dt_gap(n)
+!
+!--          The particle timestep should not be too small in order to prevent
+!--          the number of particle timesteps of getting too large
+             IF ( dt_particle(n) < dt_min_part  .AND.  dt_min_part < dt_gap(n) )  THEN
+                dt_particle(n) = dt_min_part
+             ENDIF
+             rvar1_temp(n) = particles(n)%rvar1
+             rvar2_temp(n) = particles(n)%rvar2
+             rvar3_temp(n) = particles(n)%rvar3
+!
+!--          Calculate the SGS velocity components
+             IF ( particles(n)%age == 0.0_wp )  THEN
+!
+!--             For new particles the SGS components are derived from the SGS
+!--             TKE. Limit the Gaussian random number to the interval
+!--             [-5.0*sigma, 5.0*sigma] in order to prevent the SGS velocities
+!--             from becoming unrealistically large.
+                rvar1_temp(n) = SQRT( 2.0_wp * sgs_wf_part * e_int(n)          &
+                                          + 1E-20_wp ) * ( rg(n,1) - 1.0_wp )
+                rvar2_temp(n) = SQRT( 2.0_wp * sgs_wf_part * e_int(n)          &
+                                          + 1E-20_wp ) * ( rg(n,2) - 1.0_wp )
+                rvar3_temp(n) = SQRT( 2.0_wp * sgs_wf_part * e_int(n)          &
+                                          + 1E-20_wp ) * ( rg(n,3) - 1.0_wp )
+
+             ELSE
+!
+!--             Restriction of the size of the new timestep: compared to the 
+!--             previous timestep the increase must not exceed 200%. First,
+!--             check if age > age_m, in order to prevent that particles get zero
+!--             timestep.
+                dt_particle_m = MERGE( dt_particle(n),                         &
+                                       particles(n)%age - particles(n)%age_m,  &
+                                       particles(n)%age - particles(n)%age_m < &
+                                       1E-8_wp )
+                IF ( dt_particle(n) > 2.0_wp * dt_particle_m )  THEN
+                   dt_particle(n) = 2.0_wp * dt_particle_m
+                ENDIF
+
+!--             For old particles the SGS components are correlated with the
+!--             values from the previous timestep. Random numbers have also to
+!--             be limited (see above).
+!--             As negative values for the subgrid TKE are not allowed, the
+!--             change of the subgrid TKE with time cannot be smaller than
+!--             -e_int(n)/dt_particle. This value is used as a lower boundary
+!--             value for the change of TKE 
+                de_dt_min = - e_int(n) / dt_particle(n)
+
+                de_dt = ( e_int(n) - particles(n)%e_m ) / dt_particle_m
+
+                IF ( de_dt < de_dt_min )  THEN
+                   de_dt = de_dt_min
+                ENDIF
+
+                CALL weil_stochastic_eq(rvar1_temp(n), fs_int(n), e_int(n),& 
+                                        de_dx_int(n), de_dt, diss_int(n),       &
+                                        dt_particle(n), rg(n,1), term_1_2(n) )
+
+                CALL weil_stochastic_eq(rvar2_temp(n), fs_int(n), e_int(n),& 
+                                        de_dy_int(n), de_dt, diss_int(n),       &
+                                        dt_particle(n), rg(n,2), term_1_2(n) )
+
+                CALL weil_stochastic_eq(rvar3_temp(n), fs_int(n), e_int(n),& 
+                                        de_dz_int(n), de_dt, diss_int(n),       &
+                                        dt_particle(n), rg(n,3), term_1_2(n) )
+
+             ENDIF
+
+          ENDDO
+       ENDDO
+!
+!--    Check if the added SGS velocities result in a violation of the CFL-
+!--    criterion. If yes choose a smaller timestep based on the new velocities
+!--    and calculate SGS velocities again
+       dz_temp = zw(kp)-zw(kp-1)
+       
+       DO  nb = 0, 7
+          DO  n = start_index(nb), end_index(nb)
+             IF ( .NOT. particles(n)%age == 0.0_wp .AND.                       &
+                (ABS( u_int(n) + rvar1_temp(n) ) > (dx/dt_particle(n))  .OR.   &
+                 ABS( v_int(n) + rvar2_temp(n) ) > (dy/dt_particle(n))  .OR.   &
+                 ABS( w_int(n) + rvar3_temp(n) ) > (dz_temp/dt_particle(n)))) THEN
+                
+                dt_particle(n) = 0.9_wp * MIN(                                 &
+                                 ( dx / ABS( u_int(n) + rvar1_temp(n) ) ),     &
+                                 ( dy / ABS( v_int(n) + rvar2_temp(n) ) ),     &
+                                 ( dz_temp / ABS( w_int(n) + rvar3_temp(n) ) ) )
+
+!
+!--             Reset temporary SGS velocites to "current" ones
+                rvar1_temp(n) = particles(n)%rvar1
+                rvar2_temp(n) = particles(n)%rvar2
+                rvar3_temp(n) = particles(n)%rvar3
+                
+                de_dt_min = - e_int(n) / dt_particle(n)
+
+                de_dt = ( e_int(n) - particles(n)%e_m ) / dt_particle_m
+
+                IF ( de_dt < de_dt_min )  THEN
+                   de_dt = de_dt_min
+                ENDIF
+
+                CALL weil_stochastic_eq(rvar1_temp(n), fs_int(n), e_int(n),& 
+                                        de_dx_int(n), de_dt, diss_int(n),       &
+                                        dt_particle(n), rg(n,1), term_1_2(n) )
+
+                CALL weil_stochastic_eq(rvar2_temp(n), fs_int(n), e_int(n),& 
+                                        de_dy_int(n), de_dt, diss_int(n),       &
+                                        dt_particle(n), rg(n,2), term_1_2(n) )
+
+                CALL weil_stochastic_eq(rvar3_temp(n), fs_int(n), e_int(n),& 
+                                        de_dz_int(n), de_dt, diss_int(n),       &
+                                        dt_particle(n), rg(n,3), term_1_2(n) )
+             ENDIF                           
+             
+!
+!--          Update particle velocites 
+             particles(n)%rvar1 = rvar1_temp(n)
+             particles(n)%rvar2 = rvar2_temp(n)
+             particles(n)%rvar3 = rvar3_temp(n)
+             u_int(n) = u_int(n) + particles(n)%rvar1
+             v_int(n) = v_int(n) + particles(n)%rvar2
+             w_int(n) = w_int(n) + particles(n)%rvar3
+!
+!--          Store the SGS TKE of the current timelevel which is needed for
+!--          for calculating the SGS particle velocities at the next timestep
+             particles(n)%e_m = e_int(n)
+          ENDDO
+       ENDDO
+       
+    ELSE
+!
+!--    If no SGS velocities are used, only the particle timestep has to
+!--    be set
+       dt_particle = dt_3d
+
+    ENDIF
+
+    dens_ratio = particle_groups(particles(1:number_of_particles)%group)%density_ratio
+
+    IF ( ANY( dens_ratio == 0.0_wp ) )  THEN
+       DO  nb = 0, 7
+          DO  n = start_index(nb), end_index(nb)
+
+!
+!--          Particle advection
+             IF ( dens_ratio(n) == 0.0_wp )  THEN
+!
+!--             Pure passive transport (without particle inertia)
+                particles(n)%x = xv(n) + u_int(n) * dt_particle(n)
+                particles(n)%y = yv(n) + v_int(n) * dt_particle(n)
+                particles(n)%z = zv(n) + w_int(n) * dt_particle(n)
+
+                particles(n)%speed_x = u_int(n)
+                particles(n)%speed_y = v_int(n)
+                particles(n)%speed_z = w_int(n)
+
+             ELSE
+!
+!--             Transport of particles with inertia
+                particles(n)%x = particles(n)%x + particles(n)%speed_x * &
+                                                  dt_particle(n)
+                particles(n)%y = particles(n)%y + particles(n)%speed_y * &
+                                                  dt_particle(n)
+                particles(n)%z = particles(n)%z + particles(n)%speed_z * &
+                                                  dt_particle(n)
+
+!
+!--             Update of the particle velocity
+                IF ( cloud_droplets )  THEN
+!
+!--                Terminal velocity is computed for vertical direction (Rogers et 
+!--                al., 1993, J. Appl. Meteorol.)
+                   diameter = particles(n)%radius * 2000.0_wp !diameter in mm
+                   IF ( diameter <= d0_rog )  THEN
+                      w_s = k_cap_rog * diameter * ( 1.0_wp - EXP( -k_low_rog * diameter ) )
+                   ELSE
+                      w_s = a_rog - b_rog * EXP( -c_rog * diameter )
+                   ENDIF
+
+!
+!--                If selected, add random velocities following Soelch and Kaercher
+!--                (2010, Q. J. R. Meteorol. Soc.)
+                   IF ( use_sgs_for_particles )  THEN
+                      lagr_timescale(n) = km(kp,jp,ip) / MAX( e(kp,jp,ip), 1.0E-20_wp )
+                      RL             = EXP( -1.0_wp * dt_3d / MAX( lagr_timescale(n), &
+                                             1.0E-20_wp ) )
+                      sigma          = SQRT( e(kp,jp,ip) )
+
+                      rg1 = random_gauss( iran_part, 5.0_wp ) - 1.0_wp
+                      rg2 = random_gauss( iran_part, 5.0_wp ) - 1.0_wp
+                      rg3 = random_gauss( iran_part, 5.0_wp ) - 1.0_wp
+
+                      particles(n)%rvar1 = RL * particles(n)%rvar1 +              &
+                                           SQRT( 1.0_wp - RL**2 ) * sigma * rg1
+                      particles(n)%rvar2 = RL * particles(n)%rvar2 +              &
+                                           SQRT( 1.0_wp - RL**2 ) * sigma * rg2
+                      particles(n)%rvar3 = RL * particles(n)%rvar3 +              &
+                                           SQRT( 1.0_wp - RL**2 ) * sigma * rg3
+
+                      particles(n)%speed_x = u_int(n) + particles(n)%rvar1
+                      particles(n)%speed_y = v_int(n) + particles(n)%rvar2
+                      particles(n)%speed_z = w_int(n) + particles(n)%rvar3 - w_s
+                   ELSE
+                      particles(n)%speed_x = u_int(n)
+                      particles(n)%speed_y = v_int(n)
+                      particles(n)%speed_z = w_int(n) - w_s
+                   ENDIF
+
+                ELSE
+
+                   IF ( use_sgs_for_particles )  THEN
+                      exp_arg  = particle_groups(particles(n)%group)%exp_arg
+                      exp_term = EXP( -exp_arg * dt_particle(n) )
+                   ELSE
+                      exp_arg  = particle_groups(particles(n)%group)%exp_arg
+                      exp_term = particle_groups(particles(n)%group)%exp_term
+                   ENDIF
+                   particles(n)%speed_x = particles(n)%speed_x * exp_term +         &
+                                          u_int(n) * ( 1.0_wp - exp_term )
+                   particles(n)%speed_y = particles(n)%speed_y * exp_term +         &
+                                          v_int(n) * ( 1.0_wp - exp_term )
+                   particles(n)%speed_z = particles(n)%speed_z * exp_term +         &
+                                          ( w_int(n) - ( 1.0_wp - dens_ratio(n) ) * &
+                                          g / exp_arg ) * ( 1.0_wp - exp_term )
+                ENDIF
+
+             ENDIF
+          ENDDO
+       ENDDO
+    
+    ELSE
+
+       DO  nb = 0, 7
+          DO  n = start_index(nb), end_index(nb)
+!
+!--          Transport of particles with inertia
+             particles(n)%x = xv(n) + particles(n)%speed_x * dt_particle(n)
+             particles(n)%y = yv(n) + particles(n)%speed_y * dt_particle(n)
+             particles(n)%z = zv(n) + particles(n)%speed_z * dt_particle(n)
+!
+!--          Update of the particle velocity
+             IF ( cloud_droplets )  THEN
+!
+!--             Terminal velocity is computed for vertical direction (Rogers et al., 
+!--             1993, J. Appl. Meteorol.)
+                diameter = particles(n)%radius * 2000.0_wp !diameter in mm
+                IF ( diameter <= d0_rog )  THEN
+                   w_s = k_cap_rog * diameter * ( 1.0_wp - EXP( -k_low_rog * diameter ) )
+                ELSE
+                   w_s = a_rog - b_rog * EXP( -c_rog * diameter )
+                ENDIF
+
+!
+!--             If selected, add random velocities following Soelch and Kaercher
+!--             (2010, Q. J. R. Meteorol. Soc.)
+                IF ( use_sgs_for_particles )  THEN
+                    lagr_timescale(n) = km(kp,jp,ip) / MAX( e(kp,jp,ip), 1.0E-20_wp )
+                     RL             = EXP( -1.0_wp * dt_3d / MAX( lagr_timescale(n), &
+                                             1.0E-20_wp ) )
+                    sigma          = SQRT( e(kp,jp,ip) )
+
+                    rg1 = random_gauss( iran_part, 5.0_wp ) - 1.0_wp
+                    rg2 = random_gauss( iran_part, 5.0_wp ) - 1.0_wp
+                    rg3 = random_gauss( iran_part, 5.0_wp ) - 1.0_wp
+
+                    particles(n)%rvar1 = RL * particles(n)%rvar1 +                &
+                                         SQRT( 1.0_wp - RL**2 ) * sigma * rg1
+                    particles(n)%rvar2 = RL * particles(n)%rvar2 +                &
+                                         SQRT( 1.0_wp - RL**2 ) * sigma * rg2
+                    particles(n)%rvar3 = RL * particles(n)%rvar3 +                &
+                                         SQRT( 1.0_wp - RL**2 ) * sigma * rg3
+
+                    particles(n)%speed_x = u_int(n) + particles(n)%rvar1
+                    particles(n)%speed_y = v_int(n) + particles(n)%rvar2
+                    particles(n)%speed_z = w_int(n) + particles(n)%rvar3 - w_s
+                ELSE
+                    particles(n)%speed_x = u_int(n)
+                    particles(n)%speed_y = v_int(n)
+                    particles(n)%speed_z = w_int(n) - w_s
+                ENDIF
+
+             ELSE
+
+                IF ( use_sgs_for_particles )  THEN
+                   exp_arg  = particle_groups(particles(n)%group)%exp_arg
+                   exp_term = EXP( -exp_arg * dt_particle(n) )
+                ELSE
+                   exp_arg  = particle_groups(particles(n)%group)%exp_arg
+                   exp_term = particle_groups(particles(n)%group)%exp_term
+                ENDIF
+                particles(n)%speed_x = particles(n)%speed_x * exp_term +             &
+                                       u_int(n) * ( 1.0_wp - exp_term )
+                particles(n)%speed_y = particles(n)%speed_y * exp_term +             &
+                                       v_int(n) * ( 1.0_wp - exp_term )
+                particles(n)%speed_z = particles(n)%speed_z * exp_term +             &
+                                       ( w_int(n) - ( 1.0_wp - dens_ratio(n) ) * g / &
+                                       exp_arg ) * ( 1.0_wp - exp_term )
+             ENDIF
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+!
+!-- Store the old age of the particle ( needed to prevent that a
+!-- particle crosses several PEs during one timestep, and for the
+!-- evaluation of the subgrid particle velocity fluctuations )
+    particles(1:number_of_particles)%age_m = particles(1:number_of_particles)%age
+
+    DO  nb = 0, 7
+       DO  n = start_index(nb), end_index(nb)
+!
+!--       Increment the particle age and the total time that the particle
+!--       has advanced within the particle timestep procedure
+          particles(n)%age    = particles(n)%age    + dt_particle(n)
+          particles(n)%dt_sum = particles(n)%dt_sum + dt_particle(n)
+
+!
+!--       Check whether there is still a particle that has not yet completed 
+!--       the total LES timestep
+          IF ( ( dt_3d - particles(n)%dt_sum ) > 1E-8_wp )  THEN
+             dt_3d_reached_l = .FALSE.
+          ENDIF
+
+       ENDDO
+    ENDDO
+
+    CALL cpu_log( log_point_s(44), 'lpm_advec', 'pause' )
+
+
+ END SUBROUTINE lpm_advec
+
+! Description:
+! ------------
+!> Calculation of subgrid-scale particle speed using the stochastic model 
+!> of Weil et al. (2004, JAS, 61, 2877-2887).
+!------------------------------------------------------------------------------! 
+ SUBROUTINE weil_stochastic_eq( v_sgs, fs_n, e_n, dedxi_n, dedt_n, diss_n,     &
+                                dt_n, rg_n, fac )
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  c_0, sgs_wf_part
+
+    IMPLICIT NONE
+
+    REAL(wp) ::  a1      !< dummy argument
+    REAL(wp) ::  dedt_n  !< time derivative of TKE at particle position 
+    REAL(wp) ::  dedxi_n !< horizontal derivative of TKE at particle position
+    REAL(wp) ::  diss_n  !< dissipation at particle position 
+    REAL(wp) ::  dt_n    !< particle timestep
+    REAL(wp) ::  e_n     !< TKE at particle position
+    REAL(wp) ::  fac     !< flag to identify adjacent topography
+    REAL(wp) ::  fs_n    !< weighting factor to prevent that subgrid-scale particle speed becomes too large
+    REAL(wp) ::  rg_n    !< random number
+    REAL(wp) ::  term1   !< memory term
+    REAL(wp) ::  term2   !< drift correction term
+    REAL(wp) ::  term3   !< random term
+    REAL(wp) ::  v_sgs   !< subgrid-scale velocity component 
+
+!-- At first, limit TKE to a small non-zero number, in order to prevent 
+!-- the occurrence of extremely large SGS-velocities in case TKE is zero, 
+!-- (could occur at the simulation begin).
+    e_n = MAX( e_n, 1E-20_wp )
+!
+!-- Please note, terms 1 and 2 (drift and memory term, respectively) are 
+!-- multiplied by a flag to switch of both terms near topography. 
+!-- This is necessary, as both terms may cause a subgrid-scale velocity build up 
+!-- if particles are trapped in regions with very small TKE, e.g. in narrow street 
+!-- canyons resolved by only a few grid points. Hence, term 1 and term 2 are 
+!-- disabled if one of the adjacent grid points belongs to topography. 
+!-- Moreover, in this case, the  previous subgrid-scale component is also set
+!-- to zero.
+
+    a1 = fs_n * c_0 * diss_n
+!
+!-- Memory term
+    term1 = - a1 * v_sgs * dt_n / ( 4.0_wp * sgs_wf_part * e_n + 1E-20_wp )    &
+                 * fac
+!
+!-- Drift correction term
+    term2 = ( ( dedt_n * v_sgs / e_n ) + dedxi_n ) * 0.5_wp * dt_n              &
+                 * fac
+!
+!-- Random term
+    term3 = SQRT( MAX( a1, 1E-20_wp ) ) * ( rg_n - 1.0_wp ) * SQRT( dt_n )
+!
+!-- In cese one of the adjacent grid-boxes belongs to topograhy, the previous
+!-- subgrid-scale velocity component is set to zero, in order to prevent a 
+!-- velocity build-up. 
+!-- This case, set also previous subgrid-scale component to zero. 
+    v_sgs = v_sgs * fac + term1 + term2 + term3
+
+ END SUBROUTINE weil_stochastic_eq
Index: /palm/tags/release-6.0/SOURCE/lpm_boundary_conds.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_boundary_conds.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_boundary_conds.f90	(revision 3477)
@@ -0,0 +1,640 @@
+!> @file lpm_boundary_conds.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3189 2018-08-06 13:18:55Z Giersch
+! Bugfix in calculation of the x/y indices for current particle postion
+! 
+! 3067 2018-06-12 14:04:34Z suehring
+! Remove write statements
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Particle reflections at downward-facing walls implemented. Moreover, 
+! reflections are adjusted to revised particle grid box location. 
+! (responsible Philipp Thiele)
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! Rename character range into location, as range is an intrinsic. 
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! Rewritten wall reflection 
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine renamed lpm_boundary_conds, bottom and top boundary conditions
+! included (former part of advec_particles)
+!
+! 824 2012-02-17 09:09:57Z raasch
+! particle attributes speed_x|y|z_sgs renamed rvar1|2|3
+!
+! Initial version (2007/03/09)
+!
+! Description:
+! ------------
+!> Boundary conditions for the Lagrangian particles.
+!> The routine consists of two different parts. One handles the bottom (flat)
+!> and top boundary. In this part, also particles which exceeded their lifetime
+!> are deleted.
+!> The other part handles the reflection of particles from vertical walls.
+!> This part was developed by Jin Zhang during 2006-2007.
+!>
+!> To do: Code structure for finding the t_index values and for checking the
+!> -----  reflection conditions is basically the same for all four cases, so it
+!>        should be possible to further simplify/shorten it.
+!>
+!> THE WALLS PART OF THIS ROUTINE HAS NOT BEEN TESTED FOR OCEAN RUNS SO FAR!!!!
+!> (see offset_ocean_*)
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_boundary_conds( location , i, j, k )
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  zw
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string, particle_maximum_age
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, dx, ddy, dy
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nz, wall_flags_0
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  deleted_particles, ibc_par_b, ibc_par_t, number_of_particles,   &
+               particles, particle_type, use_sgs_for_particles
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  location     !<
+    
+    INTEGER(iwp), INTENT(IN) ::  i !< 
+    INTEGER(iwp), INTENT(IN) ::  j !<
+    INTEGER(iwp), INTENT(IN) ::  k !<
+    
+    INTEGER(iwp) ::  inc            !< dummy for sorting algorithmus
+    INTEGER(iwp) ::  ir             !< dummy for sorting algorithmus
+    INTEGER(iwp) ::  i1             !< grid index (x) of old particle position
+    INTEGER(iwp) ::  i2             !< grid index (x) of current particle position
+    INTEGER(iwp) ::  i3             !< grid index (x) of intermediate particle position
+    INTEGER(iwp) ::  jr             !< dummy for sorting algorithmus
+    INTEGER(iwp) ::  j1             !< grid index (y) of old particle position
+    INTEGER(iwp) ::  j2             !< grid index (y) of current particle position
+    INTEGER(iwp) ::  j3             !< grid index (y) of intermediate particle position
+    INTEGER(iwp) ::  k1             !< grid index (z) of old particle position
+    INTEGER(iwp) ::  k2             !< grid index (z) of current particle position
+    INTEGER(iwp) ::  k3             !< grid index (z) of intermediate particle position
+    INTEGER(iwp) ::  n              !< particle number
+    INTEGER(iwp) ::  t_index        !< running index for intermediate particle timesteps in reflection algorithmus
+    INTEGER(iwp) ::  t_index_number !< number of intermediate particle timesteps in reflection algorithmus
+    INTEGER(iwp) ::  tmp_x          !< dummy for sorting algorithm
+    INTEGER(iwp) ::  tmp_y          !< dummy for sorting algorithm
+    INTEGER(iwp) ::  tmp_z          !< dummy for sorting algorithm
+
+    INTEGER(iwp), DIMENSION(0:10) :: x_ind(0:10) = 0 !< index array (x) of intermediate particle positions 
+    INTEGER(iwp), DIMENSION(0:10) :: y_ind(0:10) = 0 !< index array (y) of intermediate particle positions
+    INTEGER(iwp), DIMENSION(0:10) :: z_ind(0:10) = 0 !< index array (z) of intermediate particle positions
+    
+    LOGICAL  ::  cross_wall_x    !< flag to check if particle reflection along x is necessary
+    LOGICAL  ::  cross_wall_y    !< flag to check if particle reflection along y is necessary
+    LOGICAL  ::  cross_wall_z    !< flag to check if particle reflection along z is necessary
+    LOGICAL  ::  reflect_x       !< flag to check if particle is already reflected along x
+    LOGICAL  ::  reflect_y       !< flag to check if particle is already reflected along y
+    LOGICAL  ::  reflect_z       !< flag to check if particle is already reflected along z
+    LOGICAL  ::  tmp_reach_x     !< dummy for sorting algorithmus
+    LOGICAL  ::  tmp_reach_y     !< dummy for sorting algorithmus
+    LOGICAL  ::  tmp_reach_z     !< dummy for sorting algorithmus
+    LOGICAL  ::  x_wall_reached  !< flag to check if particle has already reached wall
+    LOGICAL  ::  y_wall_reached  !< flag to check if particle has already reached wall
+    LOGICAL  ::  z_wall_reached  !< flag to check if particle has already reached wall
+
+    LOGICAL, DIMENSION(0:10) ::  reach_x  !< flag to check if particle is at a yz-wall
+    LOGICAL, DIMENSION(0:10) ::  reach_y  !< flag to check if particle is at a xz-wall
+    LOGICAL, DIMENSION(0:10) ::  reach_z  !< flag to check if particle is at a xy-wall
+
+    REAL(wp) ::  dt_particle    !< particle timestep
+    REAL(wp) ::  eps = 1E-10_wp !< security number to check if particle has reached a wall
+    REAL(wp) ::  pos_x          !< intermediate particle position (x)
+    REAL(wp) ::  pos_x_old      !< particle position (x) at previous particle timestep
+    REAL(wp) ::  pos_y          !< intermediate particle position (y)
+    REAL(wp) ::  pos_y_old      !< particle position (y) at previous particle timestep
+    REAL(wp) ::  pos_z          !< intermediate particle position (z)
+    REAL(wp) ::  pos_z_old      !< particle position (z) at previous particle timestep
+    REAL(wp) ::  prt_x          !< current particle position (x)
+    REAL(wp) ::  prt_y          !< current particle position (y)
+    REAL(wp) ::  prt_z          !< current particle position (z)
+    REAL(wp) ::  t_old          !< previous reflection time
+    REAL(wp) ::  tmp_t          !< dummy for sorting algorithmus
+    REAL(wp) ::  xwall          !< location of wall in x
+    REAL(wp) ::  ywall          !< location of wall in y
+    REAL(wp) ::  zwall          !< location of wall in z
+
+    REAL(wp), DIMENSION(0:10) ::  t  !< reflection time
+
+
+    IF ( location == 'bottom/top' )  THEN
+
+!
+!--    Apply boundary conditions to those particles that have crossed the top or
+!--    bottom boundary and delete those particles, which are older than allowed
+       DO  n = 1, number_of_particles
+
+!
+!--       Stop if particles have moved further than the length of one 
+!--       PE subdomain (newly released particles have age = age_m!)
+          IF ( particles(n)%age /= particles(n)%age_m )  THEN
+             IF ( ABS(particles(n)%speed_x) >                                  &
+                  ((nxr-nxl+2)*dx)/(particles(n)%age-particles(n)%age_m)  .OR. &
+                  ABS(particles(n)%speed_y) >                                  &
+                  ((nyn-nys+2)*dy)/(particles(n)%age-particles(n)%age_m) )  THEN
+
+                  WRITE( message_string, * )  'particle too fast.  n = ',  n 
+                  CALL message( 'lpm_boundary_conds', 'PA0148', 2, 2, -1, 6, 1 )
+             ENDIF
+          ENDIF
+
+          IF ( particles(n)%age > particle_maximum_age  .AND.  &
+               particles(n)%particle_mask )                              &
+          THEN
+             particles(n)%particle_mask  = .FALSE.
+             deleted_particles = deleted_particles + 1
+          ENDIF
+
+          IF ( particles(n)%z >= zw(nz)  .AND.  particles(n)%particle_mask )  THEN
+             IF ( ibc_par_t == 1 )  THEN
+!
+!--             Particle absorption
+                particles(n)%particle_mask  = .FALSE.
+                deleted_particles = deleted_particles + 1
+             ELSEIF ( ibc_par_t == 2 )  THEN
+!
+!--             Particle reflection
+                particles(n)%z       = 2.0_wp * zw(nz) - particles(n)%z
+                particles(n)%speed_z = -particles(n)%speed_z
+                IF ( use_sgs_for_particles  .AND. &
+                     particles(n)%rvar3 > 0.0_wp )  THEN
+                   particles(n)%rvar3 = -particles(n)%rvar3
+                ENDIF
+             ENDIF
+          ENDIF
+          
+          IF ( particles(n)%z < zw(0)  .AND.  particles(n)%particle_mask )  THEN
+             IF ( ibc_par_b == 1 )  THEN
+!
+!--             Particle absorption
+                particles(n)%particle_mask  = .FALSE.
+                deleted_particles = deleted_particles + 1
+             ELSEIF ( ibc_par_b == 2 )  THEN
+!
+!--             Particle reflection
+                particles(n)%z       = 2.0_wp * zw(0) - particles(n)%z
+                particles(n)%speed_z = -particles(n)%speed_z
+                IF ( use_sgs_for_particles  .AND. &
+                     particles(n)%rvar3 < 0.0_wp )  THEN
+                   particles(n)%rvar3 = -particles(n)%rvar3
+                ENDIF
+             ENDIF
+          ENDIF
+       ENDDO
+
+    ELSEIF ( location == 'walls' )  THEN
+
+
+       CALL cpu_log( log_point_s(48), 'lpm_wall_reflect', 'start' )
+
+       DO  n = 1, number_of_particles
+!
+!--       Recalculate particle timestep
+          dt_particle = particles(n)%age - particles(n)%age_m
+!
+!--       Obtain x/y indices for current particle position
+          i2 = particles(n)%x * ddx
+          j2 = particles(n)%y * ddy
+          IF (zw(k)   < particles(n)%z ) k2 = k + 1
+          IF (zw(k)   > particles(n)%z .AND. zw(k-1) < particles(n)%z ) k2 = k
+          IF (zw(k-1) > particles(n)%z ) k2 = k - 1 
+!
+!--       Save current particle positions
+          prt_x = particles(n)%x
+          prt_y = particles(n)%y
+          prt_z = particles(n)%z
+!
+!--       Recalculate old particle positions
+          pos_x_old = particles(n)%x - particles(n)%speed_x * dt_particle
+          pos_y_old = particles(n)%y - particles(n)%speed_y * dt_particle
+          pos_z_old = particles(n)%z - particles(n)%speed_z * dt_particle
+!
+!--       Obtain x/y indices for old particle positions
+          i1 = i
+          j1 = j
+          k1 = k
+!
+!--       Determine horizontal as well as vertical walls at which particle can 
+!--       be potentially reflected. 
+!--       Start with walls aligned in yz layer.
+!--       Wall to the right 
+          IF ( prt_x > pos_x_old )  THEN
+             xwall = ( i1 + 1 ) * dx
+!
+!--       Wall to the left
+          ELSE
+             xwall = i1 * dx
+          ENDIF
+!
+!--       Walls aligned in xz layer
+!--       Wall to the north
+          IF ( prt_y > pos_y_old )  THEN
+             ywall = ( j1 +1 ) * dy
+!--       Wall to the south
+          ELSE
+             ywall = j1 * dy
+          ENDIF
+
+          IF ( prt_z > pos_z_old ) THEN
+             zwall = zw(k)
+          ELSE
+             zwall = zw(k-1)
+          ENDIF     
+!
+!--       Initialize flags to check if particle reflection is necessary
+          cross_wall_x = .FALSE.
+          cross_wall_y = .FALSE.
+          cross_wall_z = .FALSE.
+!
+!--       Initialize flags to check if a wall is reached
+          reach_x      = .FALSE.
+          reach_y      = .FALSE.
+          reach_z      = .FALSE.
+!
+!--       Initialize flags to check if a particle was already reflected
+          reflect_x    = .FALSE.
+          reflect_y    = .FALSE.
+          reflect_z    = .FALSE.
+!
+!--       Initialize flags to check if a wall is already crossed.
+!--       ( Required to obtain correct indices. )
+          x_wall_reached = .FALSE.
+          y_wall_reached = .FALSE.
+          z_wall_reached = .FALSE.
+!
+!--       Initialize time array 
+          t     = 0.0_wp
+!
+!--       Check if particle can reach any wall. This case, calculate the 
+!--       fractional time needed to reach this wall. Store this fractional
+!--       timestep in array t. Moreover, store indices for these grid
+!--       boxes where the respective wall belongs to.  
+!--       Start with x-direction.
+          t_index    = 1
+          t(t_index) = ( xwall - pos_x_old )                                   &
+                     / MERGE( MAX( prt_x - pos_x_old,  1E-30_wp ),             &
+                              MIN( prt_x - pos_x_old, -1E-30_wp ),             &
+                              prt_x > pos_x_old )
+          x_ind(t_index)   = i2
+          y_ind(t_index)   = j1
+          z_ind(t_index)   = k1
+          reach_x(t_index) = .TRUE.
+          reach_y(t_index) = .FALSE.
+          reach_z(t_index) = .FALSE.
+!
+!--       Store these values only if particle really reaches any wall. t must 
+!--       be in a interval between [0:1].
+          IF ( t(t_index) <= 1.0_wp .AND. t(t_index) >= 0.0_wp )  THEN
+             t_index      = t_index + 1
+             cross_wall_x = .TRUE.
+          ENDIF
+!
+!--       y-direction
+          t(t_index) = ( ywall - pos_y_old )                                   &
+                     / MERGE( MAX( prt_y - pos_y_old,  1E-30_wp ),             &
+                              MIN( prt_y - pos_y_old, -1E-30_wp ),             &
+                              prt_y > pos_y_old )
+          x_ind(t_index)   = i1
+          y_ind(t_index)   = j2
+          z_ind(t_index)   = k1
+          reach_x(t_index) = .FALSE.
+          reach_y(t_index) = .TRUE.
+          reach_z(t_index) = .FALSE.
+          IF ( t(t_index) <= 1.0_wp .AND. t(t_index) >= 0.0_wp )  THEN
+             t_index      = t_index + 1
+             cross_wall_y = .TRUE.
+          ENDIF
+!
+!--       z-direction
+          t(t_index) = (zwall - pos_z_old )                                    &
+                     / MERGE( MAX( prt_z - pos_z_old,  1E-30_wp ),             &
+                              MIN( prt_z - pos_z_old, -1E-30_wp ),             &
+                              prt_z > pos_z_old )
+                     
+          x_ind(t_index)   = i1
+          y_ind(t_index)   = j1
+          z_ind(t_index)   = k2
+          reach_x(t_index) = .FALSE.
+          reach_y(t_index) = .FALSE.
+          reach_z(t_index) = .TRUE.
+          IF( t(t_index) <= 1.0_wp .AND. t(t_index) >= 0.0_wp) THEN
+             t_index      = t_index + 1
+             cross_wall_z = .TRUE.
+          ENDIF
+          
+          t_index_number = t_index - 1
+!
+!--       Carry out reflection only if particle reaches any wall
+          IF ( cross_wall_x .OR. cross_wall_y .OR. cross_wall_z )  THEN
+!
+!--          Sort fractional timesteps in ascending order. Also sort the 
+!--          corresponding indices and flag according to the time interval a  
+!--          particle reaches the respective wall.
+             inc = 1
+             jr  = 1
+             DO WHILE ( inc <= t_index_number )
+                inc = 3 * inc + 1
+             ENDDO
+
+             DO WHILE ( inc > 1 )
+                inc = inc / 3
+                DO  ir = inc+1, t_index_number
+                   tmp_t       = t(ir)
+                   tmp_x       = x_ind(ir)
+                   tmp_y       = y_ind(ir)
+                   tmp_z       = z_ind(ir)
+                   tmp_reach_x = reach_x(ir)
+                   tmp_reach_y = reach_y(ir)
+                   tmp_reach_z = reach_z(ir)
+                   jr    = ir
+                   DO WHILE ( t(jr-inc) > tmp_t )
+                      t(jr)       = t(jr-inc)
+                      x_ind(jr)   = x_ind(jr-inc)
+                      y_ind(jr)   = y_ind(jr-inc)
+                      z_ind(jr)   = z_ind(jr-inc)
+                      reach_x(jr) = reach_x(jr-inc)
+                      reach_y(jr) = reach_y(jr-inc)
+                      reach_z(jr) = reach_z(jr-inc)
+                      jr    = jr - inc
+                      IF ( jr <= inc )  EXIT
+                   ENDDO
+                   t(jr)       = tmp_t
+                   x_ind(jr)   = tmp_x
+                   y_ind(jr)   = tmp_y
+                   z_ind(jr)   = tmp_z
+                   reach_x(jr) = tmp_reach_x
+                   reach_y(jr) = tmp_reach_y
+                   reach_z(jr) = tmp_reach_z
+                ENDDO
+             ENDDO
+!
+!--          Initialize temporary particle positions
+             pos_x = pos_x_old
+             pos_y = pos_y_old
+             pos_z = pos_z_old
+!
+!--          Loop over all times a particle possibly moves into a new grid box
+             t_old = 0.0_wp
+             DO t_index = 1, t_index_number 
+!           
+!--             Calculate intermediate particle position according to the 
+!--             timesteps a particle reaches any wall.
+                pos_x = pos_x + ( t(t_index) - t_old ) * dt_particle           &
+                                                       * particles(n)%speed_x
+                pos_y = pos_y + ( t(t_index) - t_old ) * dt_particle           &
+                                                       * particles(n)%speed_y
+                pos_z = pos_z + ( t(t_index) - t_old ) * dt_particle           &
+                                                       * particles(n)%speed_z
+!
+!--             Obtain x/y grid indices for intermediate particle position from
+!--             sorted index array
+                i3 = x_ind(t_index)
+                j3 = y_ind(t_index)
+                k3 = z_ind(t_index)
+!
+!--             Check which wall is already reached
+                IF ( .NOT. x_wall_reached )  x_wall_reached = reach_x(t_index) 
+                IF ( .NOT. y_wall_reached )  y_wall_reached = reach_y(t_index)
+                IF ( .NOT. z_wall_reached )  z_wall_reached = reach_z(t_index)
+!
+!--             Check if a particle needs to be reflected at any yz-wall. If 
+!--             necessary, carry out reflection. Please note, a security 
+!--             constant is required, as the particle position does not 
+!--             necessarily exactly match the wall location due to rounding 
+!--             errors.
+                IF ( reach_x(t_index)                      .AND.               & 
+                     ABS( pos_x - xwall ) < eps            .AND.               &
+                     .NOT. BTEST(wall_flags_0(k3,j3,i3),0) .AND.               &
+                     .NOT. reflect_x )  THEN
+! 
+! 
+!--                Reflection in x-direction. 
+!--                Ensure correct reflection by MIN/MAX functions, depending on
+!--                direction of particle transport. 
+!--                Due to rounding errors pos_x does not exactly match the wall
+!--                location, leading to erroneous reflection.             
+                   pos_x = MERGE( MIN( 2.0_wp * xwall - pos_x, xwall ),        &
+                                  MAX( 2.0_wp * xwall - pos_x, xwall ),        &
+                                  particles(n)%x > xwall )
+!
+!--                Change sign of particle speed                     
+                   particles(n)%speed_x = - particles(n)%speed_x
+!
+!--                Also change sign of subgrid-scale particle speed
+                   particles(n)%rvar1 = - particles(n)%rvar1
+!
+!--                Set flag that reflection along x is already done
+                   reflect_x          = .TRUE.
+!
+!--                As the particle does not cross any further yz-wall during 
+!--                this timestep, set further x-indices to the current one.
+                   x_ind(t_index:t_index_number) = i1
+!
+!--             If particle already reached the wall but was not reflected, 
+!--             set further x-indices to the new one.
+                ELSEIF ( x_wall_reached .AND. .NOT. reflect_x )  THEN
+                    x_ind(t_index:t_index_number) = i2
+                ENDIF !particle reflection in x direction done
+
+!
+!--             Check if a particle needs to be reflected at any xz-wall. If 
+!--             necessary, carry out reflection. Please note, a security 
+!--             constant is required, as the particle position does not 
+!--             necessarily exactly match the wall location due to rounding 
+!--             errors. 
+                IF ( reach_y(t_index)                      .AND.               & 
+                     ABS( pos_y - ywall ) < eps            .AND.               &
+                     .NOT. BTEST(wall_flags_0(k3,j3,i3),0) .AND.               &
+                     .NOT. reflect_y )  THEN
+! 
+! 
+!--                Reflection in y-direction. 
+!--                Ensure correct reflection by MIN/MAX functions, depending on
+!--                direction of particle transport. 
+!--                Due to rounding errors pos_y does not exactly match the wall
+!--                location, leading to erroneous reflection.             
+                   pos_y = MERGE( MIN( 2.0_wp * ywall - pos_y, ywall ),        &
+                                  MAX( 2.0_wp * ywall - pos_y, ywall ),        &
+                                  particles(n)%y > ywall )
+!
+!--                Change sign of particle speed                     
+                   particles(n)%speed_y = - particles(n)%speed_y
+!
+!--                Also change sign of subgrid-scale particle speed
+                   particles(n)%rvar2 = - particles(n)%rvar2
+!
+!--                Set flag that reflection along y is already done
+                   reflect_y          = .TRUE.
+!
+!--                As the particle does not cross any further xz-wall during 
+!--                this timestep, set further y-indices to the current one.
+                   y_ind(t_index:t_index_number) = j1
+!
+!--             If particle already reached the wall but was not reflected, 
+!--             set further y-indices to the new one.
+                ELSEIF ( y_wall_reached .AND. .NOT. reflect_y )  THEN
+                    y_ind(t_index:t_index_number) = j2
+                ENDIF !particle reflection in y direction done
+                
+!
+!--             Check if a particle needs to be reflected at any xy-wall. If 
+!--             necessary, carry out reflection. Please note, a security 
+!--             constant is required, as the particle position does not 
+!--             necessarily exactly match the wall location due to rounding 
+!--             errors. 
+                IF ( reach_z(t_index)                      .AND.               & 
+                     ABS( pos_z - zwall ) < eps            .AND.               &
+                     .NOT. BTEST(wall_flags_0(k3,j3,i3),0) .AND.               &
+                     .NOT. reflect_z )  THEN
+! 
+! 
+!--                Reflection in z-direction. 
+!--                Ensure correct reflection by MIN/MAX functions, depending on
+!--                direction of particle transport. 
+!--                Due to rounding errors pos_z does not exactly match the wall
+!--                location, leading to erroneous reflection.             
+                   pos_z = MERGE( MIN( 2.0_wp * zwall - pos_z, zwall ),        &
+                                  MAX( 2.0_wp * zwall - pos_z, zwall ),        &
+                                  particles(n)%z > zwall )
+!
+!--                Change sign of particle speed                     
+                   particles(n)%speed_z = - particles(n)%speed_z
+!
+!--                Also change sign of subgrid-scale particle speed
+                   particles(n)%rvar3 = - particles(n)%rvar3
+!
+!--                Set flag that reflection along z is already done
+                   reflect_z          = .TRUE.
+!
+!--                As the particle does not cross any further xy-wall during 
+!--                this timestep, set further z-indices to the current one.
+                   z_ind(t_index:t_index_number) = k1
+!
+!--             If particle already reached the wall but was not reflected, 
+!--             set further z-indices to the new one.
+                ELSEIF ( z_wall_reached .AND. .NOT. reflect_z )  THEN
+                    z_ind(t_index:t_index_number) = k2
+                ENDIF !particle reflection in z direction done                
+                
+!
+!--             Swap time
+                t_old = t(t_index)
+
+             ENDDO
+!
+!--          If a particle was reflected, calculate final position from last
+!--          intermediate position.
+             IF ( reflect_x .OR. reflect_y .OR. reflect_z )  THEN
+
+                particles(n)%x = pos_x + ( 1.0_wp - t_old ) * dt_particle      &
+                                                         * particles(n)%speed_x
+                particles(n)%y = pos_y + ( 1.0_wp - t_old ) * dt_particle      &
+                                                         * particles(n)%speed_y
+                particles(n)%z = pos_z + ( 1.0_wp - t_old ) * dt_particle      &
+                                                         * particles(n)%speed_z
+
+             ENDIF
+
+          ENDIF
+
+       ENDDO
+
+       CALL cpu_log( log_point_s(48), 'lpm_wall_reflect', 'stop' )
+
+    ENDIF
+
+ END SUBROUTINE lpm_boundary_conds
Index: /palm/tags/release-6.0/SOURCE/lpm_calc_liquid_water_content.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_calc_liquid_water_content.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_calc_liquid_water_content.f90	(revision 3477)
@@ -0,0 +1,158 @@
+!> @file lpm_calc_liquid_water_content.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3039 2018-05-24 13:13:11Z schwenkel
+! bugfix for lcm with grid stretching
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Calculate the liquid water content for each grid box.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_calc_liquid_water_content
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, ql, ql_v, ql_vp
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi, rho_l
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string, rho_surface
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, particles, prt_count
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  j   !<
+    INTEGER(iwp) ::  k   !<
+    INTEGER(iwp) ::  n   !<
+
+    CALL cpu_log( log_point_s(45), 'lpm_calc_ql', 'start' )
+
+!
+!-- Set water content initially to zero
+    ql = 0.0_wp;  ql_v = 0.0_wp;  ql_vp = 0.0_wp
+
+!
+!-- Calculate for each grid box
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+
+             number_of_particles = prt_count(k,j,i)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+!
+!--          Calculate the total volume in the boxes (ql_v, weighting factor
+!--          has to beincluded)
+             DO  n = 1, prt_count(k,j,i)
+                ql_v(k,j,i)  = ql_v(k,j,i)  + particles(n)%weight_factor *  &
+                                              particles(n)%radius**3
+             ENDDO
+
+!
+!--          Calculate the liquid water content
+             IF ( ql_v(k,j,i) /= 0.0_wp )  THEN
+                ql(k,j,i) = ql(k,j,i) + rho_l * 1.33333333_wp * pi *           &
+                                        ql_v(k,j,i) /                          &
+                                        ( rho_surface * dx * dy * dzw(k) )
+
+                IF ( ql(k,j,i) < 0.0_wp )  THEN
+                   WRITE( message_string, * )  'LWC out of range: ' , &
+                                               ql(k,j,i),i,j,k
+                   CALL message( 'lpm_calc_liquid_water_content', '', 2, 2, &
+                                 -1, 6, 1 )
+                ENDIF
+
+             ELSE
+
+                ql(k,j,i) = 0.0_wp
+
+             ENDIF
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CALL cpu_log( log_point_s(45), 'lpm_calc_ql', 'stop' )
+
+
+ END SUBROUTINE lpm_calc_liquid_water_content
Index: /palm/tags/release-6.0/SOURCE/lpm_collision_kernels.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_collision_kernels.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_collision_kernels.f90	(revision 3477)
@@ -0,0 +1,1019 @@
+!> @file lpm_collision_kernels.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1880 2016-04-20 09:36:50Z hoffmann
+! Bugfix: The index of the larger particle has to be chosen for interpolation.
+!
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 1858 2016-04-13 13:12:11Z hoffmann
+! Interpolation of collision kernels adjusted to more reasonable values.
+! Reformatting of the code. 
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! PALM kernel has been deleted.
+! Bugfix in the calculation of the turbulent enhancement factor of the
+! collection efficiency.
+!
+! Unused variables removed.
+!
+! 1776 2016-03-02 17:54:58Z hoffmann
+! Bugfix: Collection efficiencies must be calculated for the larger droplet.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+! 
+! 1519 2015-01-08 10:20:42Z hoffmann
+! Bugfix: Using the new particle structure, particles are not sorted by size.
+! Hence, computation of collision efficiencies must ensure that the ratio of 
+! two colliding droplets is < 1.
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+! Kind definition added to all floating point numbers.
+! 
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of 
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z 
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1071 2012-11-29 16:54:55Z franke
+! Bugfix: collision efficiencies for Hall kernel should not be < 1.0E-20
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1007 2012-09-19 14:30:36Z franke
+! converted all units to SI units and replaced some parameters by corresponding
+! PALM parameters
+! Bugfix: factor in calculation of enhancement factor for collision efficencies
+! changed from 10. to 1.0
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine collision_efficiency_rogers added (moved from former advec_particles
+! to here)
+!
+! 835 2012-02-22 11:21:19Z raasch $
+! Bugfix: array diss can be used only in case of Wang kernel
+!
+! 828 2012-02-21 12:00:36Z raasch
+! code has been completely reformatted, routine colker renamed
+! recalculate_kernel,
+! routine init_kernels added, radius is now communicated to the collision
+! routines by array radclass
+!
+! Bugfix: transformation factor for dissipation changed from 1E5 to 1E4
+!
+! 825 2012-02-19 03:03:44Z raasch
+! routine renamed from wang_kernel to lpm_collision_kernels,
+! turbulence_effects on collision replaced by wang_kernel
+!
+! 790 2011-11-29 03:11:20Z raasch
+! initial revision
+!
+! Description:
+! ------------
+!> This module calculates collision efficiencies either due to pure gravitational
+!> effects (Hall kernel, see Hall, 1980: J. Atmos. Sci., 2486-2507) or
+!> including the effects of turbulence (Wang kernel, see Wang and
+!> Grabowski, 2009: Atmos. Sci. Lett., 10, 1-8, and Ayala et al., 2008: 
+!> New J. Phys., 10, 075016). The original code has been
+!> provided by L.-P. Wang but is substantially reformatted and speed optimized
+!> here.
+!------------------------------------------------------------------------------!
+ MODULE lpm_collision_kernels_mod
+ 
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, pi
+        
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  collision_kernel, dissipation_classes, particles,               &
+               radius_classes
+
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+    PUBLIC  ckernel, init_kernels, rclass_lbound, rclass_ubound,               &
+            recalculate_kernel
+
+    REAL(wp) ::  epsilon       !<
+    REAL(wp) ::  rclass_lbound !<
+    REAL(wp) ::  rclass_ubound !<
+    REAL(wp) ::  urms          !<
+
+    REAL(wp), DIMENSION(:),   ALLOCATABLE ::  epsclass  !< dissipation rate class
+    REAL(wp), DIMENSION(:),   ALLOCATABLE ::  radclass  !< radius class
+    REAL(wp), DIMENSION(:),   ALLOCATABLE ::  winf      !<
+    
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ec        !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ecf       !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  gck       !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  hkernel   !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  hwratio   !<
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  ckernel !<
+
+    SAVE
+
+!
+!-- Public interfaces
+    INTERFACE init_kernels
+       MODULE PROCEDURE init_kernels
+    END INTERFACE init_kernels
+
+    INTERFACE recalculate_kernel
+       MODULE PROCEDURE recalculate_kernel
+    END INTERFACE recalculate_kernel
+
+
+    CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the collision efficiency matrix with fixed radius and
+!> dissipation classes, calculated at simulation start only.
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE init_kernels
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !<
+       INTEGER(iwp) ::  j !<
+       INTEGER(iwp) ::  k !<
+
+
+!
+!--    Calculate collision efficiencies for fixed radius- and dissipation
+!--    classes
+       IF ( collision_kernel(6:9) == 'fast' )  THEN
+
+          ALLOCATE( ckernel(1:radius_classes,1:radius_classes,                 &
+                    0:dissipation_classes), epsclass(1:dissipation_classes),   &
+                    radclass(1:radius_classes) )
+
+!
+!--       Calculate the radius class bounds with logarithmic distances
+!--       in the interval [1.0E-6, 1000.0E-6] m
+          rclass_lbound = LOG( 1.0E-6_wp )
+          rclass_ubound = LOG( 1000.0E-6_wp )
+          radclass(1)   = EXP( rclass_lbound )
+          DO  i = 2, radius_classes
+             radclass(i) = EXP( rclass_lbound +                                &
+                                ( rclass_ubound - rclass_lbound ) *            &
+                                ( i - 1.0_wp ) / ( radius_classes - 1.0_wp ) )
+          ENDDO
+
+!
+!--       Set the class bounds for dissipation in interval [0.0, 600.0] cm**2/s**3
+          DO  i = 1, dissipation_classes
+             epsclass(i) = 0.06_wp * REAL( i, KIND=wp ) / dissipation_classes
+          ENDDO
+!
+!--       Calculate collision efficiencies of the Wang/ayala kernel
+          ALLOCATE( ec(1:radius_classes,1:radius_classes),  &
+                    ecf(1:radius_classes,1:radius_classes), &
+                    gck(1:radius_classes,1:radius_classes), &
+                    winf(1:radius_classes) )
+
+          DO  k = 1, dissipation_classes
+
+             epsilon = epsclass(k)
+             urms    = 2.02_wp * ( epsilon / 0.04_wp )**( 1.0_wp / 3.0_wp )
+
+             CALL turbsd
+             CALL turb_enhance_eff
+             CALL effic
+
+             DO  j = 1, radius_classes
+                DO  i = 1, radius_classes
+                   ckernel(i,j,k) = ec(i,j) * gck(i,j) * ecf(i,j)
+                ENDDO
+             ENDDO
+
+          ENDDO
+
+!
+!--       Calculate collision efficiencies of the Hall kernel
+          ALLOCATE( hkernel(1:radius_classes,1:radius_classes), &
+                    hwratio(1:radius_classes,1:radius_classes) )
+
+          CALL fallg
+          CALL effic
+
+          DO  j = 1, radius_classes
+             DO  i =  1, radius_classes
+                hkernel(i,j) = pi * ( radclass(j) + radclass(i) )**2 &
+                                  * ec(i,j) * ABS( winf(j) - winf(i) )
+                ckernel(i,j,0) = hkernel(i,j)  ! hall kernel stored on index 0
+              ENDDO
+          ENDDO
+
+!
+!--       Test output of efficiencies
+          IF ( j == -1 )  THEN
+
+             PRINT*, '*** Hall kernel'
+             WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i)*1.0E6_wp, &
+                                              i = 1,radius_classes )
+             DO  j = 1, radius_classes
+                WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j),  &
+                                          ( hkernel(i,j), i = 1,radius_classes )
+             ENDDO
+
+             DO  k = 1, dissipation_classes
+                DO  i = 1, radius_classes
+                   DO  j = 1, radius_classes
+                      IF ( hkernel(i,j) == 0.0_wp )  THEN
+                         hwratio(i,j) = 9999999.9_wp
+                      ELSE
+                         hwratio(i,j) = ckernel(i,j,k) / hkernel(i,j)
+                      ENDIF
+                   ENDDO
+                ENDDO
+
+                PRINT*, '*** epsilon = ', epsclass(k)
+                WRITE ( *,'(5X,20(F4.0,1X))' ) ( radclass(i) * 1.0E6_wp, &
+                                                 i = 1,radius_classes )
+                DO  j = 1, radius_classes
+                   WRITE ( *,'(F4.0,1X,20(F8.4,1X))' ) radclass(j) * 1.0E6_wp, &
+                                          ( hwratio(i,j), i = 1,radius_classes )
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+          DEALLOCATE( ec, ecf, epsclass, gck, hkernel, winf )
+
+       ENDIF
+
+    END SUBROUTINE init_kernels
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of collision kernels during each timestep and for each grid box
+!------------------------------------------------------------------------------!
+    SUBROUTINE recalculate_kernel( i1, j1, k1 )
+
+       USE arrays_3d,                                                          &
+           ONLY:  diss
+
+       USE particle_attributes,                                                &
+           ONLY:  number_of_particles, prt_count, radius_classes, wang_kernel
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !<
+       INTEGER(iwp) ::  i1     !<
+       INTEGER(iwp) ::  j      !<
+       INTEGER(iwp) ::  j1     !<
+       INTEGER(iwp) ::  k1     !<
+
+
+       number_of_particles = prt_count(k1,j1,i1)
+       radius_classes      = number_of_particles   ! necessary to use the same
+                                                   ! subroutines as for 
+                                                   ! precalculated kernels
+
+       ALLOCATE( ec(1:number_of_particles,1:number_of_particles), &
+                 radclass(1:number_of_particles), winf(1:number_of_particles) )
+
+!
+!--    Store particle radii on the radclass array
+       radclass(1:number_of_particles) = particles(1:number_of_particles)%radius
+
+       IF ( wang_kernel )  THEN
+          epsilon = diss(k1,j1,i1)   ! dissipation rate in m**2/s**3
+       ELSE
+          epsilon = 0.0_wp
+       ENDIF
+       urms    = 2.02_wp * ( epsilon / 0.04_wp )**( 0.33333333333_wp )
+
+       IF ( wang_kernel  .AND.  epsilon > 1.0E-7_wp )  THEN
+!
+!--       Call routines to calculate efficiencies for the Wang kernel
+          ALLOCATE( gck(1:number_of_particles,1:number_of_particles), &
+                    ecf(1:number_of_particles,1:number_of_particles) )
+
+          CALL turbsd
+          CALL turb_enhance_eff
+          CALL effic
+
+          DO  j = 1, number_of_particles
+             DO  i =  1, number_of_particles
+                ckernel(1+i-1,1+j-1,1) = ec(i,j) * gck(i,j) * ecf(i,j)
+             ENDDO
+          ENDDO
+
+          DEALLOCATE( gck, ecf )
+
+       ELSE
+!
+!--       Call routines to calculate efficiencies for the Hall kernel
+          CALL fallg
+          CALL effic
+
+          DO  j = 1, number_of_particles
+             DO  i =  1, number_of_particles
+                ckernel(i,j,1) = pi * ( radclass(j) + radclass(i) )**2         &
+                                    * ec(i,j) * ABS( winf(j) - winf(i) )
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+       DEALLOCATE( ec, radclass, winf )
+
+    END SUBROUTINE recalculate_kernel
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of effects of turbulence on the geometric collision kernel 
+!> (by including the droplets' average radial relative velocities and their 
+!> radial distribution function) following the analytic model by Aayala et al. 
+!> (2008, New J. Phys.). For details check the second part 2 of the publication,
+!> page 37ff.
+!>
+!> Input parameters, which need to be replaced by PALM parameters:
+!>    water density, air density
+!------------------------------------------------------------------------------!
+    SUBROUTINE turbsd
+
+       USE control_parameters,                                                 &
+           ONLY:  molecular_viscosity
+    
+       USE particle_attributes,                                                &
+           ONLY:  radius_classes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i     !<
+       INTEGER(iwp) ::  j     !<
+
+       REAL(wp) ::  ao        !<
+       REAL(wp) ::  ao_gr     !<
+       REAL(wp) ::  bbb       !<
+       REAL(wp) ::  be        !<
+       REAL(wp) ::  b1        !<
+       REAL(wp) ::  b2        !<
+       REAL(wp) ::  ccc       !<
+       REAL(wp) ::  c1        !<
+       REAL(wp) ::  c1_gr     !<
+       REAL(wp) ::  c2        !<
+       REAL(wp) ::  d1        !<
+       REAL(wp) ::  d2        !<
+       REAL(wp) ::  eta       !<
+       REAL(wp) ::  e1        !<
+       REAL(wp) ::  e2        !<
+       REAL(wp) ::  fao_gr    !<
+       REAL(wp) ::  fr        !<
+       REAL(wp) ::  grfin     !<
+       REAL(wp) ::  lambda    !<
+       REAL(wp) ::  lambda_re !<
+       REAL(wp) ::  lf        !<
+       REAL(wp) ::  rc        !<
+       REAL(wp) ::  rrp       !<
+       REAL(wp) ::  sst       !<
+       REAL(wp) ::  tauk      !<
+       REAL(wp) ::  tl        !<
+       REAL(wp) ::  t2        !<
+       REAL(wp) ::  tt        !<
+       REAL(wp) ::  t1        !<
+       REAL(wp) ::  vk        !<
+       REAL(wp) ::  vrms1xy   !<
+       REAL(wp) ::  vrms2xy   !<
+       REAL(wp) ::  v1        !<
+       REAL(wp) ::  v1v2xy    !<
+       REAL(wp) ::  v1xysq    !<
+       REAL(wp) ::  v2        !<
+       REAL(wp) ::  v2xysq    !<
+       REAL(wp) ::  wrfin     !<
+       REAL(wp) ::  wrgrav2   !<
+       REAL(wp) ::  wrtur2xy  !<
+       REAL(wp) ::  xx        !<
+       REAL(wp) ::  yy        !<
+       REAL(wp) ::  z         !<
+
+       REAL(wp), DIMENSION(1:radius_classes) ::  st  !< Stokes number
+       REAL(wp), DIMENSION(1:radius_classes) ::  tau !< inertial time scale
+
+       lambda    = urms * SQRT( 15.0_wp * molecular_viscosity / epsilon )
+       lambda_re = urms**2 * SQRT( 15.0_wp / epsilon / molecular_viscosity )
+       tl        = urms**2 / epsilon
+       lf        = 0.5_wp * urms**3 / epsilon
+       tauk      = SQRT( molecular_viscosity / epsilon )
+       eta       = ( molecular_viscosity**3 / epsilon )**0.25_wp
+       vk        = eta / tauk
+
+       ao = ( 11.0_wp + 7.0_wp * lambda_re ) / ( 205.0_wp + lambda_re )
+       tt = SQRT( 2.0_wp * lambda_re / ( SQRT( 15.0_wp ) * ao ) ) * tauk
+
+!
+!--    Get terminal velocity of droplets
+       CALL fallg
+
+       DO  i = 1, radius_classes
+          tau(i) = winf(i) / g    ! inertial time scale
+          st(i)  = tau(i) / tauk  ! Stokes number
+       ENDDO
+
+!
+!--    Calculate average radial relative velocity at contact (wrfin)
+       z   = tt / tl
+       be  = SQRT( 2.0_wp ) * lambda / lf
+       bbb = SQRT( 1.0_wp - 2.0_wp * be**2 )
+       d1  = ( 1.0_wp + bbb ) / ( 2.0_wp * bbb )
+       e1  = lf * ( 1.0_wp + bbb ) * 0.5_wp
+       d2  = ( 1.0_wp - bbb ) * 0.5_wp / bbb
+       e2  = lf * ( 1.0_wp - bbb ) * 0.5_wp
+       ccc = SQRT( 1.0_wp - 2.0_wp * z**2 )
+       b1  = ( 1.0_wp + ccc ) * 0.5_wp / ccc
+       c1  = tl * ( 1.0_wp + ccc ) * 0.5_wp
+       b2  = ( 1.0_wp - ccc ) * 0.5_wp / ccc
+       c2  = tl * ( 1.0_wp - ccc ) * 0.5_wp
+
+       DO  i = 1, radius_classes
+
+          v1 = winf(i)
+          t1 = tau(i)
+
+          DO  j = 1, i
+             rrp = radclass(i) + radclass(j)
+             v2  = winf(j)
+             t2  = tau(j)
+
+             v1xysq  = b1 * d1 * phi_w(c1,e1,v1,t1) - b1 * d2 * phi_w(c1,e2,v1,t1) &
+                     - b2 * d1 * phi_w(c2,e1,v1,t1) + b2 * d2 * phi_w(c2,e2,v1,t1)
+             v1xysq  = v1xysq * urms**2 / t1
+             vrms1xy = SQRT( v1xysq )
+
+             v2xysq  = b1 * d1 * phi_w(c1,e1,v2,t2) - b1 * d2 * phi_w(c1,e2,v2,t2) &
+                     - b2 * d1 * phi_w(c2,e1,v2,t2) + b2 * d2 * phi_w(c2,e2,v2,t2)
+             v2xysq  = v2xysq * urms**2 / t2
+             vrms2xy = SQRT( v2xysq )
+
+             IF ( winf(i) >= winf(j) )  THEN
+                v1 = winf(i)
+                t1 = tau(i)
+                v2 = winf(j)
+                t2 = tau(j)
+             ELSE
+                v1 = winf(j)
+                t1 = tau(j)
+                v2 = winf(i)
+                t2 = tau(i)
+             ENDIF
+
+             v1v2xy   =  b1 * d1 * zhi(c1,e1,v1,t1,v2,t2) - &
+                         b1 * d2 * zhi(c1,e2,v1,t1,v2,t2) - &
+                         b2 * d1 * zhi(c2,e1,v1,t1,v2,t2) + &
+                         b2 * d2* zhi(c2,e2,v1,t1,v2,t2)
+             fr       = d1 * EXP( -rrp / e1 ) - d2 * EXP( -rrp / e2 )
+             v1v2xy   = v1v2xy * fr * urms**2 / tau(i) / tau(j)
+             wrtur2xy = vrms1xy**2 + vrms2xy**2 - 2.0_wp * v1v2xy
+             IF ( wrtur2xy < 0.0_wp )  wrtur2xy = 0.0_wp
+             wrgrav2  = pi / 8.0_wp * ( winf(j) - winf(i) )**2
+             wrfin    = SQRT( ( 2.0_wp / pi ) * ( wrtur2xy + wrgrav2) )
+
+!
+!--          Calculate radial distribution function (grfin)
+             IF ( st(j) > st(i) )  THEN
+                sst = st(j)
+             ELSE
+                sst = st(i)
+             ENDIF
+
+             xx = -0.1988_wp * sst**4 + 1.5275_wp * sst**3 - 4.2942_wp *       &
+                   sst**2 + 5.3406_wp * sst
+             IF ( xx < 0.0_wp )  xx = 0.0_wp
+             yy = 0.1886_wp * EXP( 20.306_wp / lambda_re )
+
+             c1_gr  =  xx / ( g / vk * tauk )**yy
+
+             ao_gr  = ao + ( pi / 8.0_wp) * ( g / vk * tauk )**2
+             fao_gr = 20.115_wp * SQRT( ao_gr / lambda_re )
+             rc     = SQRT( fao_gr * ABS( st(j) - st(i) ) ) * eta
+
+             grfin  = ( ( eta**2 + rc**2 ) / ( rrp**2 + rc**2) )**( c1_gr*0.5_wp )
+             IF ( grfin < 1.0_wp )  grfin = 1.0_wp
+
+!
+!--          Calculate general collection kernel (without the consideration of
+!--          collection efficiencies)
+             gck(i,j) = 2.0_wp * pi * rrp**2 * wrfin * grfin
+             gck(j,i) = gck(i,j)
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE turbsd
+
+    REAL(wp) FUNCTION phi_w( a, b, vsett, tau0 )
+!
+!--    Function used in the Ayala et al. (2008) analytical model for turbulent
+!--    effects on the collision kernel
+       IMPLICIT NONE
+
+       REAL(wp) ::  a     !<
+       REAL(wp) ::  aa1   !<
+       REAL(wp) ::  b     !<
+       REAL(wp) ::  tau0  !<
+       REAL(wp) ::  vsett !<
+
+       aa1 = 1.0_wp / tau0 + 1.0_wp / a + vsett / b
+       phi_w = 1.0_wp / aa1  - 0.5_wp * vsett / b / aa1**2
+
+    END FUNCTION phi_w
+
+    REAL(wp) FUNCTION zhi( a, b, vsett1, tau1, vsett2, tau2 )
+!
+!--    Function used in the Ayala et al. (2008) analytical model for turbulent
+!--    effects on the collision kernel
+       IMPLICIT NONE
+
+       REAL(wp) ::  a      !<
+       REAL(wp) ::  aa1    !<
+       REAL(wp) ::  aa2    !<
+       REAL(wp) ::  aa3    !<
+       REAL(wp) ::  aa4    !<
+       REAL(wp) ::  aa5    !<
+       REAL(wp) ::  aa6    !<
+       REAL(wp) ::  b      !<
+       REAL(wp) ::  tau1   !<
+       REAL(wp) ::  tau2   !<
+       REAL(wp) ::  vsett1 !<
+       REAL(wp) ::  vsett2 !<
+
+       aa1 = vsett2 / b - 1.0_wp / tau2 - 1.0_wp / a
+       aa2 = vsett1 / b + 1.0_wp / tau1 + 1.0_wp / a
+       aa3 = ( vsett1 - vsett2 ) / b + 1.0_wp / tau1 + 1.0_wp / tau2
+       aa4 = ( vsett2 / b )**2 - ( 1.0_wp / tau2 + 1.0_wp / a )**2
+       aa5 = vsett2 / b + 1.0_wp / tau2 + 1.0_wp / a
+       aa6 = 1.0_wp / tau1 - 1.0_wp / a + ( 1.0_wp / tau2 + 1.0_wp / a) *      &
+             vsett1 / vsett2
+       zhi = (1.0_wp / aa1 - 1.0_wp / aa2 ) * ( vsett1 - vsett2 ) * 0.5_wp /   &
+             b / aa3**2 + ( 4.0_wp / aa4 - 1.0_wp / aa5**2 - 1.0_wp / aa1**2 ) &
+             * vsett2 * 0.5_wp / b /aa6 + ( 2.0_wp * ( b / aa2 - b / aa1 ) -   &
+             vsett1 / aa2**2 + vsett2 / aa1**2 ) * 0.5_wp / b / aa3
+
+    END FUNCTION zhi
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parameterization of terminal velocity following Rogers et al. (1993, J. Appl.
+!> Meteorol.)
+!------------------------------------------------------------------------------!
+    SUBROUTINE fallg
+
+       USE particle_attributes,                                                &
+           ONLY:  radius_classes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  j                            !<
+
+       REAL(wp), PARAMETER ::  k_cap_rog = 4.0_wp    !< parameter
+       REAL(wp), PARAMETER ::  k_low_rog = 12.0_wp   !< parameter
+       REAL(wp), PARAMETER ::  a_rog     = 9.65_wp   !< parameter
+       REAL(wp), PARAMETER ::  b_rog     = 10.43_wp  !< parameter
+       REAL(wp), PARAMETER ::  c_rog     = 0.6_wp    !< parameter
+       REAL(wp), PARAMETER ::  d0_rog    = 0.745_wp  !< seperation diameter
+
+       REAL(wp)            ::  diameter              !< droplet diameter in mm
+
+
+       DO  j = 1, radius_classes
+
+          diameter = radclass(j) * 2000.0_wp
+
+          IF ( diameter <= d0_rog )  THEN
+             winf(j) = k_cap_rog * diameter * ( 1.0_wp -                       &
+                                                EXP( -k_low_rog * diameter ) )
+          ELSE
+             winf(j) = a_rog - b_rog * EXP( -c_rog * diameter )
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE fallg
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interpolation of collision efficiencies (Hall, 1980, J. Atmos. Sci.)
+!------------------------------------------------------------------------------!
+    SUBROUTINE effic
+ 
+       USE particle_attributes,                                                &
+           ONLY:  radius_classes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i  !<
+       INTEGER(iwp) ::  iq !<
+       INTEGER(iwp) ::  ir !<
+       INTEGER(iwp) ::  j  !<
+       INTEGER(iwp) ::  k  !<
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ira !<
+
+       LOGICAL, SAVE ::  first = .TRUE. !<
+
+       REAL(wp) ::  ek              !<
+       REAL(wp) ::  particle_radius !<
+       REAL(wp) ::  pp              !<
+       REAL(wp) ::  qq              !<
+       REAL(wp) ::  rq              !<
+
+       REAL(wp), DIMENSION(1:21), SAVE ::  rat        !<
+       
+       REAL(wp), DIMENSION(1:15), SAVE ::  r0         !<
+       
+       REAL(wp), DIMENSION(1:15,1:21), SAVE ::  ecoll !<
+
+!
+!--    Initial assignment of constants
+       IF ( first )  THEN
+
+         first = .FALSE.
+         r0  = (/   6.0_wp,   8.0_wp,  10.0_wp, 15.0_wp,  20.0_wp,  25.0_wp,   &
+                   30.0_wp,  40.0_wp,  50.0_wp, 60.0_wp,  70.0_wp, 100.0_wp,   &
+                  150.0_wp, 200.0_wp, 300.0_wp /)
+
+         rat = (/ 0.00_wp, 0.05_wp, 0.10_wp, 0.15_wp, 0.20_wp, 0.25_wp,        &
+                  0.30_wp, 0.35_wp, 0.40_wp, 0.45_wp, 0.50_wp, 0.55_wp,        &
+                  0.60_wp, 0.65_wp, 0.70_wp, 0.75_wp, 0.80_wp, 0.85_wp,        &
+                  0.90_wp, 0.95_wp, 1.00_wp /)
+
+         ecoll(:,1)  = (/ 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp,    &
+                          0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp,    &
+                          0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp, 0.001_wp /)
+         ecoll(:,2)  = (/ 0.003_wp, 0.003_wp, 0.003_wp, 0.004_wp, 0.005_wp,    &
+                          0.005_wp, 0.005_wp, 0.010_wp, 0.100_wp, 0.050_wp,    &
+                          0.200_wp, 0.500_wp, 0.770_wp, 0.870_wp, 0.970_wp /)
+         ecoll(:,3)  = (/ 0.007_wp, 0.007_wp, 0.007_wp, 0.008_wp, 0.009_wp,    &
+                          0.010_wp, 0.010_wp, 0.070_wp, 0.400_wp, 0.430_wp,    &
+                          0.580_wp, 0.790_wp, 0.930_wp, 0.960_wp, 1.000_wp /)
+         ecoll(:,4)  = (/ 0.009_wp, 0.009_wp, 0.009_wp, 0.012_wp, 0.015_wp,    &
+                          0.010_wp, 0.020_wp, 0.280_wp, 0.600_wp, 0.640_wp,    &
+                          0.750_wp, 0.910_wp, 0.970_wp, 0.980_wp, 1.000_wp /)
+         ecoll(:,5)  = (/ 0.014_wp, 0.014_wp, 0.014_wp, 0.015_wp, 0.016_wp,    &
+                          0.030_wp, 0.060_wp, 0.500_wp, 0.700_wp, 0.770_wp,    &
+                          0.840_wp, 0.950_wp, 0.970_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,6)  = (/ 0.017_wp, 0.017_wp, 0.017_wp, 0.020_wp, 0.022_wp,    &
+                          0.060_wp, 0.100_wp, 0.620_wp, 0.780_wp, 0.840_wp,    &
+                          0.880_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,7)  = (/ 0.030_wp, 0.030_wp, 0.024_wp, 0.022_wp, 0.032_wp,    &
+                          0.062_wp, 0.200_wp, 0.680_wp, 0.830_wp, 0.870_wp,    &
+                          0.900_wp, 0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,8)  = (/ 0.025_wp, 0.025_wp, 0.025_wp, 0.036_wp, 0.043_wp,    &
+                          0.130_wp, 0.270_wp, 0.740_wp, 0.860_wp, 0.890_wp,    &
+                          0.920_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,9)  = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.040_wp, 0.052_wp,    &
+                          0.200_wp, 0.400_wp, 0.780_wp, 0.880_wp, 0.900_wp,    &
+                          0.940_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,10) = (/ 0.030_wp, 0.030_wp, 0.030_wp, 0.047_wp, 0.064_wp,    &
+                          0.250_wp, 0.500_wp, 0.800_wp, 0.900_wp, 0.910_wp,    &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,11) = (/ 0.040_wp, 0.040_wp, 0.033_wp, 0.037_wp, 0.068_wp,    &
+                          0.240_wp, 0.550_wp, 0.800_wp, 0.900_wp, 0.910_wp,    &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,12) = (/ 0.035_wp, 0.035_wp, 0.035_wp, 0.055_wp, 0.079_wp,    &
+                          0.290_wp, 0.580_wp, 0.800_wp, 0.900_wp, 0.910_wp,    &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,13) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.062_wp, 0.082_wp,    &
+                          0.290_wp, 0.590_wp, 0.780_wp, 0.900_wp, 0.910_wp,    &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,14) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.060_wp, 0.080_wp,    &
+                          0.290_wp, 0.580_wp, 0.770_wp, 0.890_wp, 0.910_wp,    &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,15) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.041_wp, 0.075_wp,    &
+                          0.250_wp, 0.540_wp, 0.760_wp, 0.880_wp, 0.920_wp,    &
+                          0.950_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,16) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.052_wp, 0.067_wp,    &
+                          0.250_wp, 0.510_wp, 0.770_wp, 0.880_wp, 0.930_wp,    &
+                          0.970_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,17) = (/ 0.037_wp, 0.037_wp, 0.037_wp, 0.047_wp, 0.057_wp,    &
+                          0.250_wp, 0.490_wp, 0.770_wp, 0.890_wp, 0.950_wp,    &
+                          1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp, 1.000_wp /)
+         ecoll(:,18) = (/ 0.036_wp, 0.036_wp, 0.036_wp, 0.042_wp, 0.048_wp,    &
+                          0.230_wp, 0.470_wp, 0.780_wp, 0.920_wp, 1.000_wp,    &
+                          1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp, 1.020_wp /)
+         ecoll(:,19) = (/ 0.040_wp, 0.040_wp, 0.035_wp, 0.033_wp, 0.040_wp,    &
+                          0.112_wp, 0.450_wp, 0.790_wp, 1.010_wp, 1.030_wp,    &
+                          1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp, 1.040_wp /)
+         ecoll(:,20) = (/ 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp, 0.033_wp,    &
+                          0.119_wp, 0.470_wp, 0.950_wp, 1.300_wp, 1.700_wp,    &
+                          2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp, 2.300_wp /)
+         ecoll(:,21) = (/ 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp, 0.027_wp,    &
+                          0.125_wp, 0.520_wp, 1.400_wp, 2.300_wp, 3.000_wp,    &
+                          4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp, 4.000_wp /)
+       ENDIF
+
+!
+!--    Calculate the radius class index of particles with respect to array r
+!--    Radius has to be in microns
+       ALLOCATE( ira(1:radius_classes) )
+       DO  j = 1, radius_classes
+          particle_radius = radclass(j) * 1.0E6_wp
+          DO  k = 1, 15
+             IF ( particle_radius < r0(k) )  THEN
+                ira(j) = k
+                EXIT
+             ENDIF
+          ENDDO
+          IF ( particle_radius >= r0(15) )  ira(j) = 16
+       ENDDO
+
+!
+!--    Two-dimensional linear interpolation of the collision efficiency.
+!--    Radius has to be in microns
+       DO  j = 1, radius_classes
+          DO  i = 1, j
+
+             ir = MAX( ira(i), ira(j) )
+             rq = MIN( radclass(i) / radclass(j), radclass(j) / radclass(i) )
+             iq = INT( rq * 20 ) + 1
+             iq = MAX( iq , 2)
+
+             IF ( ir < 16 )  THEN
+                IF ( ir >= 2 )  THEN
+                   pp = ( ( MAX( radclass(j), radclass(i) ) * 1.0E6_wp ) -     &
+                          r0(ir-1) ) / ( r0(ir) - r0(ir-1) )
+                   qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                   ec(j,i) = ( 1.0_wp - pp ) * ( 1.0_wp - qq )                 &
+                             * ecoll(ir-1,iq-1)                                &
+                             + pp * ( 1.0_wp - qq ) * ecoll(ir,iq-1)           &
+                             + qq * ( 1.0_wp - pp ) * ecoll(ir-1,iq)           &
+                             + pp * qq * ecoll(ir,iq)
+                ELSE
+                   qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                   ec(j,i) = ( 1.0_wp - qq ) * ecoll(1,iq-1) + qq * ecoll(1,iq)
+                ENDIF
+             ELSE
+                qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                ek = ( 1.0_wp - qq ) * ecoll(15,iq-1) + qq * ecoll(15,iq)
+                ec(j,i) = MIN( ek, 1.0_wp )
+             ENDIF
+
+             IF ( ec(j,i) < 1.0E-20_wp )  ec(j,i) = 0.0_wp
+
+             ec(i,j) = ec(j,i)
+
+          ENDDO
+       ENDDO
+
+       DEALLOCATE( ira )
+
+    END SUBROUTINE effic
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interpolation of turbulent enhancement factor for collision efficencies
+!> following Wang and Grabowski (2009, Atmos. Sci. Let.)
+!------------------------------------------------------------------------------!
+    SUBROUTINE turb_enhance_eff
+
+       USE particle_attributes,                                                &
+           ONLY:  radius_classes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: i  !<
+       INTEGER(iwp) :: iq !<
+       INTEGER(iwp) :: ir !<
+       INTEGER(iwp) :: j  !<
+       INTEGER(iwp) :: k  !<
+       INTEGER(iwp) :: kk !<
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ira !<
+       
+       LOGICAL, SAVE ::  first = .TRUE. !<
+
+       REAL(wp) ::  particle_radius !<
+       REAL(wp) ::  pp              !<
+       REAL(wp) ::  qq              !<
+       REAL(wp) ::  rq              !<
+       REAL(wp) ::  y1              !<
+       REAL(wp) ::  y2              !<
+       REAL(wp) ::  y3              !<
+
+       REAL(wp), DIMENSION(1:11), SAVE ::  rat           !<
+       REAL(wp), DIMENSION(1:7), SAVE  ::  r0            !<
+       
+       REAL(wp), DIMENSION(1:7,1:11), SAVE ::  ecoll_100 !<
+       REAL(wp), DIMENSION(1:7,1:11), SAVE ::  ecoll_400 !<
+
+!
+!--    Initial assignment of constants
+       IF ( first )  THEN
+
+          first = .FALSE.
+
+          r0  = (/  10.0_wp, 20.0_wp, 30.0_wp, 40.0_wp, 50.0_wp, 60.0_wp,  &
+                   100.0_wp /)
+
+          rat = (/ 0.0_wp, 0.1_wp, 0.2_wp, 0.3_wp, 0.4_wp, 0.5_wp, 0.6_wp, &
+                   0.7_wp, 0.8_wp, 0.9_wp, 1.0_wp /)
+!
+!--       Tabulated turbulent enhancement factor at 100 cm**2/s**3
+          ecoll_100(:,1)  = (/  1.74_wp,   1.74_wp,   1.773_wp, 1.49_wp,  &
+                                1.207_wp,  1.207_wp,  1.0_wp /)
+          ecoll_100(:,2)  = (/  1.46_wp,   1.46_wp,   1.421_wp, 1.245_wp, &
+                                1.069_wp,  1.069_wp,  1.0_wp /)
+          ecoll_100(:,3)  = (/  1.32_wp,   1.32_wp,   1.245_wp, 1.123_wp, &
+                                1.000_wp,  1.000_wp,  1.0_wp /)
+          ecoll_100(:,4)  = (/  1.250_wp,  1.250_wp,  1.148_wp, 1.087_wp, &
+                                1.025_wp,  1.025_wp,  1.0_wp /)
+          ecoll_100(:,5)  = (/  1.186_wp,  1.186_wp,  1.066_wp, 1.060_wp, &
+                                1.056_wp,  1.056_wp,  1.0_wp /)
+          ecoll_100(:,6)  = (/  1.045_wp,  1.045_wp,  1.000_wp, 1.014_wp, &
+                                1.028_wp,  1.028_wp,  1.0_wp /)
+          ecoll_100(:,7)  = (/  1.070_wp,  1.070_wp,  1.030_wp, 1.038_wp, &
+                                1.046_wp,  1.046_wp,  1.0_wp /)
+          ecoll_100(:,8)  = (/  1.000_wp,  1.000_wp,  1.054_wp, 1.042_wp, &
+                                1.029_wp,  1.029_wp,  1.0_wp /)
+          ecoll_100(:,9)  = (/  1.223_wp,  1.223_wp,  1.117_wp, 1.069_wp, &
+                                1.021_wp,  1.021_wp,  1.0_wp /)
+          ecoll_100(:,10) = (/  1.570_wp,  1.570_wp,  1.244_wp, 1.166_wp, &
+                                1.088_wp,  1.088_wp,  1.0_wp /)
+          ecoll_100(:,11) = (/ 20.3_wp,   20.3_wp,   14.6_wp,   8.61_wp,  &
+                                2.60_wp,   2.60_wp,   1.0_wp /)
+!
+!--       Tabulated turbulent enhancement factor at 400 cm**2/s**3
+          ecoll_400(:,1)  = (/  4.976_wp,  4.976_wp,  3.593_wp,  2.519_wp, &
+                                1.445_wp,  1.445_wp,  1.0_wp /)
+          ecoll_400(:,2)  = (/  2.984_wp,  2.984_wp,  2.181_wp,  1.691_wp, &
+                                1.201_wp,  1.201_wp,  1.0_wp /)
+          ecoll_400(:,3)  = (/  1.988_wp,  1.988_wp,  1.475_wp,  1.313_wp, &
+                                1.150_wp,  1.150_wp,  1.0_wp /)
+          ecoll_400(:,4)  = (/  1.490_wp,  1.490_wp,  1.187_wp,  1.156_wp, &
+                                1.126_wp,  1.126_wp,  1.0_wp /)
+          ecoll_400(:,5)  = (/  1.249_wp,  1.249_wp,  1.088_wp,  1.090_wp, &
+                                1.092_wp,  1.092_wp,  1.0_wp /)
+          ecoll_400(:,6)  = (/  1.139_wp,  1.139_wp,  1.130_wp,  1.091_wp, &
+                                1.051_wp,  1.051_wp,  1.0_wp /)
+          ecoll_400(:,7)  = (/  1.220_wp,  1.220_wp,  1.190_wp,  1.138_wp, &
+                                1.086_wp,  1.086_wp,  1.0_wp /)
+          ecoll_400(:,8)  = (/  1.325_wp,  1.325_wp,  1.267_wp,  1.165_wp, &
+                                1.063_wp,  1.063_wp,  1.0_wp /)
+          ecoll_400(:,9)  = (/  1.716_wp,  1.716_wp,  1.345_wp,  1.223_wp, &
+                                1.100_wp,  1.100_wp,  1.0_wp /)
+          ecoll_400(:,10) = (/  3.788_wp,  3.788_wp,  1.501_wp,  1.311_wp, &
+                                1.120_wp,  1.120_wp,  1.0_wp /)
+          ecoll_400(:,11) = (/ 36.52_wp,  36.52_wp,  19.16_wp,  22.80_wp,  &
+                               26.0_wp,   26.0_wp,    1.0_wp /)
+
+       ENDIF
+
+!
+!--    Calculate the radius class index of particles with respect to array r0
+!--    The droplet radius has to be given in microns.
+       ALLOCATE( ira(1:radius_classes) )
+
+       DO  j = 1, radius_classes
+          particle_radius = radclass(j) * 1.0E6_wp
+          DO  k = 1, 7
+             IF ( particle_radius < r0(k) )  THEN
+                ira(j) = k
+                EXIT
+             ENDIF
+          ENDDO
+          IF ( particle_radius >= r0(7) )  ira(j) = 8
+       ENDDO
+
+!
+!--    Two-dimensional linear interpolation of the turbulent enhancement factor.
+!--    The droplet radius has to be given in microns.
+       DO  j =  1, radius_classes
+          DO  i = 1, j
+
+             ir = MAX( ira(i), ira(j) )
+             rq = MIN( radclass(i) / radclass(j), radclass(j) / radclass(i) )
+
+             DO  kk = 2, 11
+                IF ( rq <= rat(kk) )  THEN
+                   iq = kk
+                   EXIT
+                ENDIF
+             ENDDO
+
+             y1 = 1.0_wp  ! turbulent enhancement factor at 0 m**2/s**3
+
+             IF ( ir < 8 )  THEN
+                IF ( ir >= 2 )  THEN
+                   pp = ( MAX( radclass(j), radclass(i) ) * 1.0E6_wp -  &
+                          r0(ir-1) ) / ( r0(ir) - r0(ir-1) )
+                   qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                   y2 = ( 1.0_wp - pp ) * ( 1.0_wp - qq ) * ecoll_100(ir-1,iq-1) + &
+                                pp * ( 1.0_wp - qq ) * ecoll_100(ir,iq-1)        + &
+                                qq * ( 1.0_wp - pp ) * ecoll_100(ir-1,iq)        + &
+                                pp * qq              * ecoll_100(ir,iq)
+                   y3 = ( 1.0-pp ) * ( 1.0_wp - qq ) * ecoll_400(ir-1,iq-1)      + &
+                                pp * ( 1.0_wp - qq ) * ecoll_400(ir,iq-1)        + &
+                                qq * ( 1.0_wp - pp ) * ecoll_400(ir-1,iq)        + &
+                                pp * qq              * ecoll_400(ir,iq)
+                ELSE
+                   qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                   y2 = ( 1.0_wp - qq ) * ecoll_100(1,iq-1) + qq * ecoll_100(1,iq)
+                   y3 = ( 1.0_wp - qq ) * ecoll_400(1,iq-1) + qq * ecoll_400(1,iq)
+                ENDIF
+             ELSE
+                qq = ( rq - rat(iq-1) ) / ( rat(iq) - rat(iq-1) )
+                y2 = ( 1.0_wp - qq ) * ecoll_100(7,iq-1) + qq * ecoll_100(7,iq)
+                y3 = ( 1.0_wp - qq ) * ecoll_400(7,iq-1) + qq * ecoll_400(7,iq)
+             ENDIF
+!
+!--          Linear interpolation of turbulent enhancement factor
+             IF ( epsilon <= 0.01_wp )  THEN
+                ecf(j,i) = ( epsilon - 0.01_wp ) / ( 0.0_wp  - 0.01_wp ) * y1 &
+                         + ( epsilon - 0.0_wp  ) / ( 0.01_wp - 0.0_wp  ) * y2
+             ELSEIF ( epsilon <= 0.06_wp )  THEN
+                ecf(j,i) = ( epsilon - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 &
+                         + ( epsilon - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3
+             ELSE
+                ecf(j,i) = ( 0.06_wp - 0.04_wp ) / ( 0.01_wp - 0.04_wp ) * y2 &
+                         + ( 0.06_wp - 0.01_wp ) / ( 0.04_wp - 0.01_wp ) * y3
+             ENDIF
+
+             IF ( ecf(j,i) < 1.0_wp )  ecf(j,i) = 1.0_wp
+
+             ecf(i,j) = ecf(j,i)
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE turb_enhance_eff
+
+ END MODULE lpm_collision_kernels_mod
Index: /palm/tags/release-6.0/SOURCE/lpm_data_output_particles.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_data_output_particles.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_data_output_particles.f90	(revision 3477)
@@ -0,0 +1,233 @@
+!> @file lpm_data_output_particles.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2123 2017-01-18 12:34:59Z hoffmann
+!
+! 2122 2017-01-18 12:22:54Z hoffmann
+! Calculation of particle ID
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. Unused variables removed.
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! name change of netcdf routines and module + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! netCDF output currently not available
+! output of particle data in binary format adopted to new particle structure
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf output queries
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! revision history before 2012 removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+! 22/02/12 - Initial version
+!
+! Description:
+! ------------
+!> Write particle data in FORTRAN binary and/or netCDF format 
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_data_output_particles
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  simulated_time
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles,  particles, prt_count
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  ip !<
+    INTEGER(iwp) ::  jp !<
+    INTEGER(iwp) ::  kp !<
+
+    CALL cpu_log( log_point_s(40), 'lpm_data_output', 'start' )
+
+!
+!-- Attention: change version number for unit 85 (in routine check_open)
+!--            whenever the output format for this unit is changed!
+    CALL check_open( 85 )
+
+    WRITE ( 85 )  simulated_time
+    WRITE ( 85 )  prt_count
+          
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+             IF ( number_of_particles <= 0 )  CYCLE
+             WRITE ( 85 )  particles
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CALL close_file( 85 )
+
+
+#if defined( __netcdf )
+! !
+! !-- Output in netCDF format
+!     CALL check_open( 108 )
+! 
+! !
+! !-- Update the NetCDF time axis
+!     prt_time_count = prt_time_count + 1
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_time_prt, &
+!                             (/ simulated_time /),        &
+!                             start = (/ prt_time_count /), count = (/ 1 /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 1 )
+! 
+! !
+! !-- Output the real number of particles used
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_rnop_prt, &
+!                             (/ number_of_particles /),   &
+!                             start = (/ prt_time_count /), count = (/ 1 /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 2 )
+! 
+! !
+! !-- Output all particle attributes
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(1), particles%age,      &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 3 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(2), particles%user,     &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 4 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(3), particles%origin_x, &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 5 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(4), particles%origin_y, &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 6 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(5), particles%origin_z, &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 7 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(6), particles%radius,   &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 8 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(7), particles%speed_x,  &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 9 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(8), particles%speed_y,  &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 10 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(9), particles%speed_z,  &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 11 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt,id_var_prt(10),                     &
+!                             particles%weight_factor,                       &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 12 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(11), particles%x,       &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 13 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(12), particles%y,       &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 14 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(13), particles%z,       &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 15 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(14), particles%class,   &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 16 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(15), particles%group,   &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 17 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(16),                    &
+!                             particles%id2,                                 &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 18 )
+! 
+!     nc_stat = NF90_PUT_VAR( id_set_prt, id_var_prt(17), particles%id1,     &
+!                             start = (/ 1, prt_time_count /),               &
+!                             count = (/ maximum_number_of_particles /) )
+!     CALL netcdf_handle_error( 'lpm_data_output_particles', 19 )
+! 
+#endif
+
+    CALL cpu_log( log_point_s(40), 'lpm_data_output', 'stop' )
+
+ END SUBROUTINE lpm_data_output_particles
Index: /palm/tags/release-6.0/SOURCE/lpm_droplet_collision.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_droplet_collision.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_droplet_collision.f90	(revision 3477)
@@ -0,0 +1,372 @@
+!> @file lpm_droplet_collision.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3039 2018-05-24 13:13:11Z schwenkel
+! bugfix for lcm with grid stretching
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Changed ONLY-dependencies
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! Consideration of aerosol mass during collision. Average impact algorithm has
+! been removed.
+!
+! 2274 2017-06-09 13:27:48Z Giersch
+! Changed error messages
+!
+! 2123 2017-01-18 12:34:59Z hoffmann
+!
+! 2122 2017-01-18 12:22:54Z hoffmann
+! Some reformatting of the code.
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1884 2016-04-21 11:11:40Z hoffmann
+! Conservation of mass should only be checked if collisions took place.
+!
+! 1860 2016-04-13 13:21:28Z hoffmann
+! Interpolation of dissipation rate adjusted to more reasonable values.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Integration of a new collision algortithm based on Shima et al. (2009) and
+! Soelch and Kaercher (2010) called all_or_nothing. The previous implemented
+! collision algorithm is called average_impact. Moreover, both algorithms are
+! now positive definit due to their construction, i.e., no negative weighting
+! factors should occur.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+! Kind definition added to all floating point numbers.
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp_kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1071 2012-11-29 16:54:55Z franke
+! Calculation of Hall and Wang kernel now uses collision-coalescence formulation
+! proposed by Wang instead of the continuous collection equation (for more
+! information about new method see PALM documentation)
+! Bugfix: message identifiers added
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Calculates change in droplet radius by collision. Droplet collision is
+!> calculated for each grid box seperately. Collision is parameterized by
+!> using collision kernels. Two different kernels are available:
+!> Hall kernel: Kernel from Hall (1980, J. Atmos. Sci., 2486-2507), which
+!>              considers collision due to pure gravitational effects.
+!> Wang kernel: Beside gravitational effects (treated with the Hall-kernel) also
+!>              the effects of turbulence on the collision are considered using
+!>              parameterizations of Ayala et al. (2008, New J. Phys., 10,
+!>              075015) and Wang and Grabowski (2009, Atmos. Sci. Lett., 10,
+!>              1-8). This kernel includes three possible effects of turbulence:
+!>              the modification of the relative velocity between the droplets,
+!>              the effect of preferential concentration, and the enhancement of
+!>              collision efficiencies.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_droplet_collision (i,j,k)
+
+    USE arrays_3d,                                                             &
+        ONLY:  diss, dzw, ql_v, ql_vp
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi, rho_l, rho_s
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, message_string
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE kinds
+
+    USE lpm_collision_kernels_mod,                                             &
+        ONLY:  ckernel, recalculate_kernel
+
+    USE particle_attributes,                                                   &
+        ONLY:  curvature_solution_effects, dissipation_classes, hall_kernel,   &
+               iran_part, number_of_particles, particles, particle_type,       &
+               prt_count, use_kernel_tables, wang_kernel
+
+    USE random_function_mod,                                                   &
+        ONLY:  random_function
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  eclass   !<
+    INTEGER(iwp) ::  i        !<
+    INTEGER(iwp) ::  j        !<
+    INTEGER(iwp) ::  k        !<
+    INTEGER(iwp) ::  n        !<
+    INTEGER(iwp) ::  m        !<
+    INTEGER(iwp) ::  rclass_l !<
+    INTEGER(iwp) ::  rclass_s !<
+
+    REAL(wp) ::  collection_probability  !< probability for collection
+    REAL(wp) ::  ddV                     !< inverse grid box volume
+    REAL(wp) ::  epsilon                 !< dissipation rate
+    REAL(wp) ::  factor_volume_to_mass   !< 4.0 / 3.0 * pi * rho_l
+    REAL(wp) ::  xm                      !< droplet mass of super-droplet m
+    REAL(wp) ::  xn                      !< droplet mass of super-droplet n
+    REAL(wp) ::  xsm                     !< aerosol mass of super-droplet m
+    REAL(wp) ::  xsn                     !< aerosol mass of super-droplet n
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  weight    !< weighting factor
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  mass      !< total mass of super droplet
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  aero_mass !< total aerosol mass of super droplet
+
+    CALL cpu_log( log_point_s(43), 'lpm_droplet_coll', 'start' )
+
+    number_of_particles   = prt_count(k,j,i)
+    factor_volume_to_mass = 4.0_wp / 3.0_wp * pi * rho_l
+    ddV                   = 1.0_wp / ( dx * dy * dzw(k) )
+!
+!-- Collision requires at least one super droplet inside the box
+    IF ( number_of_particles > 0 )  THEN
+
+       IF ( use_kernel_tables )  THEN
+!
+!--       Fast method with pre-calculated collection kernels for
+!--       discrete radius- and dissipation-classes.
+          IF ( wang_kernel )  THEN
+             eclass = INT( diss(k,j,i) * 1.0E4_wp / 600.0_wp * &
+                           dissipation_classes ) + 1
+             epsilon = diss(k,j,i)
+          ELSE
+             epsilon = 0.0_wp
+          ENDIF
+
+          IF ( hall_kernel  .OR.  epsilon * 1.0E4_wp < 0.001_wp )  THEN
+             eclass = 0   ! Hall kernel is used
+          ELSE
+             eclass = MIN( dissipation_classes, eclass )
+          ENDIF
+
+       ELSE
+!
+!--       Collection kernels are re-calculated for every new
+!--       grid box. First, allocate memory for kernel table.
+!--       Third dimension is 1, because table is re-calculated for
+!--       every new dissipation value.
+          ALLOCATE( ckernel(1:number_of_particles,1:number_of_particles,1:1) )
+!
+!--       Now calculate collection kernel for this box. Note that
+!--       the kernel is based on the previous time step
+          CALL recalculate_kernel( i, j, k )
+
+       ENDIF
+!
+!--    Temporary fields for total mass of super-droplet, aerosol mass, and
+!--    weighting factor are allocated.
+       ALLOCATE(mass(1:number_of_particles), weight(1:number_of_particles))
+       IF ( curvature_solution_effects )  ALLOCATE(aero_mass(1:number_of_particles))
+
+       mass(1:number_of_particles)   = particles(1:number_of_particles)%weight_factor * &
+                                       particles(1:number_of_particles)%radius**3     * &
+                                       factor_volume_to_mass
+
+       weight(1:number_of_particles) = particles(1:number_of_particles)%weight_factor
+
+       IF ( curvature_solution_effects )  THEN
+          aero_mass(1:number_of_particles) = particles(1:number_of_particles)%weight_factor * &
+                                             particles(1:number_of_particles)%aux1**3       * &
+                                             4.0 / 3.0 * pi * rho_s
+       ENDIF
+!
+!--    Calculate collision/coalescence
+       DO  n = 1, number_of_particles
+
+          DO  m = n, number_of_particles
+!
+!--          For collisions, the weighting factor of at least one super-droplet
+!--          needs to be larger or equal to one.
+             IF ( MIN( weight(n), weight(m) ) .LT. 1.0 )  CYCLE
+!
+!--          Get mass of individual droplets (aerosols)
+             xn = mass(n) / weight(n)
+             xm = mass(m) / weight(m)
+             IF ( curvature_solution_effects )  THEN
+                xsn = aero_mass(n) / weight(n)
+                xsm = aero_mass(m) / weight(m)
+             ENDIF
+!
+!--          Probability that the necessary collisions take place
+             IF ( use_kernel_tables )  THEN
+                rclass_l = particles(n)%class
+                rclass_s = particles(m)%class
+
+                collection_probability  = MAX( weight(n), weight(m) ) *     &
+                                          ckernel(rclass_l,rclass_s,eclass) * ddV * dt_3d
+             ELSE
+                collection_probability  = MAX( weight(n), weight(m) ) *     &
+                                          ckernel(n,m,1) * ddV * dt_3d
+             ENDIF
+!
+!--          Calculate the number of collections and consider multiple collections.
+!--          (Accordingly, p_crit will be 0.0, 1.0, 2.0, ...)
+             IF ( collection_probability - FLOOR(collection_probability)    &
+                  .GT. random_function( iran_part ) )  THEN
+                collection_probability = FLOOR(collection_probability) + 1.0_wp
+             ELSE
+                collection_probability = FLOOR(collection_probability)
+             ENDIF
+
+             IF ( collection_probability .GT. 0.0 )  THEN
+!
+!--             Super-droplet n collects droplets of super-droplet m
+                IF ( weight(n) .LT. weight(m) )  THEN
+
+                   mass(n)   = mass(n)   + weight(n) * xm * collection_probability
+                   weight(m) = weight(m) - weight(n)      * collection_probability
+                   mass(m)   = mass(m)   - weight(n) * xm * collection_probability
+                   IF ( curvature_solution_effects )  THEN
+                      aero_mass(n) = aero_mass(n) + weight(n) * xsm * collection_probability
+                      aero_mass(m) = aero_mass(m) - weight(n) * xsm * collection_probability
+                   ENDIF
+
+                ELSEIF ( weight(m) .LT. weight(n) )  THEN
+
+                   mass(m)   = mass(m)   + weight(m) * xn * collection_probability
+                   weight(n) = weight(n) - weight(m)      * collection_probability
+                   mass(n)   = mass(n)   - weight(m) * xn * collection_probability
+                   IF ( curvature_solution_effects )  THEN
+                      aero_mass(m) = aero_mass(m) + weight(m) * xsn * collection_probability
+                      aero_mass(n) = aero_mass(n) - weight(m) * xsn * collection_probability
+                   ENDIF
+
+                ELSE
+!
+!--                Collisions of particles of the same weighting factor.
+!--                Particle n collects 1/2 weight(n) droplets of particle m,
+!--                particle m collects 1/2 weight(m) droplets of particle n.
+!--                The total mass mass changes accordingly.
+!--                If n = m, the first half of the droplets coalesces with the
+!--                second half of the droplets; mass is unchanged because
+!--                xm = xn for n = m.
+!--
+!--                Note: For m = n this equation is an approximation only
+!--                valid for weight >> 1 (which is usually the case). The
+!--                approximation is weight(n)-1 = weight(n).
+                   mass(n)   = mass(n)   + 0.5_wp * weight(n) * ( xm - xn )
+                   mass(m)   = mass(m)   + 0.5_wp * weight(m) * ( xn - xm )
+                   IF ( curvature_solution_effects )  THEN
+                      aero_mass(n) = aero_mass(n) + 0.5_wp * weight(n) * ( xsm - xsn )
+                      aero_mass(m) = aero_mass(m) + 0.5_wp * weight(m) * ( xsn - xsm )
+                   ENDIF
+                   weight(n) = weight(n) - 0.5_wp * weight(m)
+                   weight(m) = weight(n)
+
+                ENDIF
+
+             ENDIF
+
+          ENDDO
+
+          ql_vp(k,j,i) = ql_vp(k,j,i) + mass(n) / factor_volume_to_mass
+
+       ENDDO
+
+       IF ( ANY(weight < 0.0_wp) )  THEN
+             WRITE( message_string, * ) 'negative weighting factor'
+             CALL message( 'lpm_droplet_collision', 'PA0028',      &
+                            2, 2, -1, 6, 1 )
+       ENDIF
+
+       particles(1:number_of_particles)%radius = ( mass(1:number_of_particles) /   &
+                                                   ( weight(1:number_of_particles) &
+                                                     * factor_volume_to_mass       &
+                                                   )                               &
+                                                 )**0.33333333333333_wp
+
+       IF ( curvature_solution_effects )  THEN
+          particles(1:number_of_particles)%aux1 = ( aero_mass(1:number_of_particles) / &
+                                                    ( weight(1:number_of_particles)    &
+                                                      * 4.0_wp / 3.0_wp * pi * rho_s   &
+                                                    )                                  &
+                                                  )**0.33333333333333_wp
+       ENDIF
+
+       particles(1:number_of_particles)%weight_factor = weight(1:number_of_particles)
+
+       DEALLOCATE( weight, mass )
+       IF ( curvature_solution_effects )  DEALLOCATE( aero_mass )
+       IF ( .NOT. use_kernel_tables )  DEALLOCATE( ckernel )
+
+!
+!--    Check if LWC is conserved during collision process
+       IF ( ql_v(k,j,i) /= 0.0_wp )  THEN
+          IF ( ql_vp(k,j,i) / ql_v(k,j,i) >= 1.0001_wp  .OR.                      &
+               ql_vp(k,j,i) / ql_v(k,j,i) <= 0.9999_wp )  THEN
+             WRITE( message_string, * ) ' LWC is not conserved during',           &
+                                        ' collision! ',                           &
+                                        ' LWC after condensation: ', ql_v(k,j,i), &
+                                        ' LWC after collision: ', ql_vp(k,j,i)
+             CALL message( 'lpm_droplet_collision', 'PA0040', 2, 2, -1, 6, 1 )
+          ENDIF
+       ENDIF
+
+    ENDIF
+
+    CALL cpu_log( log_point_s(43), 'lpm_droplet_coll', 'stop' )
+
+ END SUBROUTINE lpm_droplet_collision
Index: /palm/tags/release-6.0/SOURCE/lpm_droplet_condensation.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_droplet_condensation.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_droplet_condensation.f90	(revision 3477)
@@ -0,0 +1,426 @@
+!> @file lpm_droplet_condensation.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3039 2018-05-24 13:13:11Z schwenkel
+! bugfix for lcm with grid stretching
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2608 2017-11-13 14:04:26Z schwenkel
+! Calculation of magnus equation in external module (diagnostic_quantities_mod).
+! 
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Changed ONLY-dependencies
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! Rosenbrock scheme improved. Gas-kinetic effect added.
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1890 2016-04-22 08:52:11Z hoffmann
+! Some improvements of the Rosenbrock method. If the Rosenbrock method needs more
+! than 40 iterations to find a sufficient time setp, the model is not aborted.
+! This might lead to small erros. But they can be assumend as negligible, since
+! the maximum timesetp of the Rosenbrock method after 40 iterations will be
+! smaller than 10^-16 s.
+!
+! 1871 2016-04-15 11:46:09Z hoffmann
+! Initialization of aerosols added.
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! Interpolation of supersaturation has been removed because it is not in
+! accordance with the release/depletion of latent heat/water vapor in
+! interaction_droplets_ptq.
+! Calculation of particle Reynolds number has been corrected.
+! eps_ros added from modules.
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! curvature_solution_effects moved to particle_attributes
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+! Kind definition added to all floating point numbers.
+!
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1071 2012-11-29 16:54:55Z franke
+! Ventilation effect for evaporation of large droplets included
+! Check for unreasonable results included in calculation of Rosenbrock method
+! since physically unlikely results were observed and for the same
+! reason the first internal time step in Rosenbrock method should be < 1.0E02 in
+! case of evaporation
+! Unnecessary calculation of ql_int removed
+! Unnecessary calculations in Rosenbrock method (d2rdt2, drdt_m, dt_ros_last)
+! removed
+! Bugfix: factor in calculation of surface tension changed from 0.00155 to
+! 0.000155
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Calculates change in droplet radius by condensation/evaporation, using
+!> either an analytic formula or by numerically integrating the radius growth
+!> equation including curvature and solution effects using Rosenbrocks method
+!> (see Numerical recipes in FORTRAN, 2nd edition, p. 731).
+!> The analytical formula and growth equation follow those given in
+!> Rogers and Yau (A short course in cloud physics, 3rd edition, p. 102/103).
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_droplet_condensation (ip,jp,kp)
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, hyp, pt, q, ql_c, ql_v, exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  l_v, molecular_weight_of_solute, molecular_weight_of_water,     &
+               magnus, pi, rho_l, rho_s, rd_d_rv, r_v, vanthoff
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, message_string, molecular_viscosity, rho_surface
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE lpm_collision_kernels_mod,                                             &
+        ONLY:  rclass_lbound, rclass_ubound
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  curvature_solution_effects, number_of_particles,   &
+               particles, radius_classes, use_kernel_tables
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: ip                         !<
+    INTEGER(iwp) :: jp                         !<
+    INTEGER(iwp) :: kp                         !<
+    INTEGER(iwp) :: n                          !<
+
+    REAL(wp) ::  afactor                       !< curvature effects
+    REAL(wp) ::  arg                           !<
+    REAL(wp) ::  bfactor                       !< solute effects
+    REAL(wp) ::  ddenom                        !<
+    REAL(wp) ::  delta_r                       !<
+    REAL(wp) ::  diameter                      !< diameter of cloud droplets
+    REAL(wp) ::  diff_coeff                    !< diffusivity for water vapor
+    REAL(wp) ::  drdt                          !<
+    REAL(wp) ::  dt_ros                        !<
+    REAL(wp) ::  dt_ros_sum                    !<
+    REAL(wp) ::  d2rdtdr                       !<
+    REAL(wp) ::  e_a                           !< current vapor pressure
+    REAL(wp) ::  e_s                           !< current saturation vapor pressure
+    REAL(wp) ::  error                         !< local truncation error in Rosenbrock
+    REAL(wp) ::  k1                            !<
+    REAL(wp) ::  k2                            !<
+    REAL(wp) ::  r_err                         !< First order estimate of Rosenbrock radius
+    REAL(wp) ::  r_ros                         !< Rosenbrock radius
+    REAL(wp) ::  r_ros_ini                     !< initial Rosenbrock radius
+    REAL(wp) ::  r0                            !< gas-kinetic lengthscale
+    REAL(wp) ::  sigma                         !< surface tension of water
+    REAL(wp) ::  thermal_conductivity          !< thermal conductivity for water
+    REAL(wp) ::  t_int                         !< temperature
+    REAL(wp) ::  w_s                           !< terminal velocity of droplets
+    REAL(wp) ::  re_p                          !< particle Reynolds number
+!
+!-- Parameters for Rosenbrock method (see Verwer et al., 1999)
+    REAL(wp), PARAMETER :: prec = 1.0E-3_wp     !< precision of Rosenbrock solution
+    REAL(wp), PARAMETER :: q_increase = 1.5_wp  !< increase factor in timestep
+    REAL(wp), PARAMETER :: q_decrease = 0.9_wp  !< decrease factor in timestep
+    REAL(wp), PARAMETER :: gamma = 0.292893218814_wp !< = 1.0 - 1.0 / SQRT(2.0)
+!
+!-- Parameters for terminal velocity
+    REAL(wp), PARAMETER ::  a_rog = 9.65_wp      !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  b_rog = 10.43_wp     !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  c_rog = 0.6_wp       !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  k_cap_rog = 4.0_wp   !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  k_low_rog = 12.0_wp  !< parameter for fall velocity
+    REAL(wp), PARAMETER ::  d0_rog = 0.745_wp    !< separation diameter
+
+    REAL(wp), DIMENSION(number_of_particles) ::  ventilation_effect     !<
+    REAL(wp), DIMENSION(number_of_particles) ::  new_r                  !<
+
+    CALL cpu_log( log_point_s(42), 'lpm_droplet_condens', 'start' )
+
+!
+!-- Absolute temperature
+    t_int = pt(kp,jp,ip) * exner(kp)
+!
+!-- Saturation vapor pressure (Eq. 10 in Bolton, 1980)
+    e_s = magnus( t_int )
+!
+!-- Current vapor pressure
+    e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + rd_d_rv )
+!
+!-- Thermal conductivity for water (from Rogers and Yau, Table 7.1)
+    thermal_conductivity = 7.94048E-05_wp * t_int + 0.00227011_wp
+!
+!-- Moldecular diffusivity of water vapor in air (Hall und Pruppacher, 1976)
+    diff_coeff           = 0.211E-4_wp * ( t_int / 273.15_wp )**1.94_wp * &
+                           ( 101325.0_wp / hyp(kp) )
+!
+!-- Lengthscale for gas-kinetic effects (from Mordy, 1959, p. 23):
+    r0 = diff_coeff / 0.036_wp * SQRT( 2.0_wp * pi / ( r_v * t_int ) )
+!
+!-- Calculate effects of heat conductivity and diffusion of water vapor on the
+!-- diffusional growth process (usually known as 1.0 / (F_k + F_d) )
+    ddenom  = 1.0_wp / ( rho_l * r_v * t_int / ( e_s * diff_coeff ) +          &
+                         ( l_v / ( r_v * t_int ) - 1.0_wp ) * rho_l *          &
+                         l_v / ( thermal_conductivity * t_int )                &
+                       )
+    new_r = 0.0_wp
+!
+!-- Determine ventilation effect on evaporation of large drops
+    DO  n = 1, number_of_particles
+
+       IF ( particles(n)%radius >= 4.0E-5_wp  .AND.  e_a / e_s < 1.0_wp )  THEN
+!
+!--       Terminal velocity is computed for vertical direction (Rogers et al.,
+!--       1993, J. Appl. Meteorol.)
+          diameter = particles(n)%radius * 2000.0_wp !diameter in mm
+          IF ( diameter <= d0_rog )  THEN
+             w_s = k_cap_rog * diameter * ( 1.0_wp - EXP( -k_low_rog * diameter ) )
+          ELSE
+             w_s = a_rog - b_rog * EXP( -c_rog * diameter )
+          ENDIF
+!
+!--       Calculate droplet's Reynolds number
+          re_p = 2.0_wp * particles(n)%radius * w_s / molecular_viscosity
+!
+!--       Ventilation coefficient (Rogers and Yau, 1989):
+          IF ( re_p > 2.5_wp )  THEN
+             ventilation_effect(n) = 0.78_wp + 0.28_wp * SQRT( re_p )
+          ELSE
+             ventilation_effect(n) = 1.0_wp + 0.09_wp * re_p
+          ENDIF
+       ELSE
+!
+!--       For small droplets or in supersaturated environments, the ventilation
+!--       effect does not play a role
+          ventilation_effect(n) = 1.0_wp
+       ENDIF
+    ENDDO
+
+    IF( .NOT. curvature_solution_effects ) then
+!
+!--    Use analytic model for diffusional growth including gas-kinetic
+!--    effects (Mordy, 1959) but without the impact of aerosols.
+       DO  n = 1, number_of_particles
+          arg      = ( particles(n)%radius + r0 )**2 + 2.0_wp * dt_3d * ddenom * &
+                                                       ventilation_effect(n) *   &
+                                                       ( e_a / e_s - 1.0_wp )
+          arg      = MAX( arg, ( 0.01E-6 + r0 )**2 )
+          new_r(n) = SQRT( arg ) - r0
+       ENDDO
+
+    ELSE
+!
+!--    Integrate the diffusional growth including gas-kinetic (Mordy, 1959),
+!--    as well as curvature and solute effects (e.g., KÃ¶hler, 1936).
+!
+!--    Curvature effect (afactor) with surface tension (sigma) by Straka (2009)
+       sigma = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp )
+!
+!--    Solute effect (afactor)
+       afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int )
+
+       DO  n = 1, number_of_particles
+!
+!--       Solute effect (bfactor)
+          bfactor = vanthoff * rho_s * particles(n)%aux1**3 *                    &
+                    molecular_weight_of_water / ( rho_l * molecular_weight_of_solute )
+
+          dt_ros     = particles(n)%aux2  ! use previously stored Rosenbrock timestep
+          dt_ros_sum = 0.0_wp
+
+          r_ros     = particles(n)%radius  ! initialize Rosenbrock particle radius
+          r_ros_ini = r_ros
+!
+!--       Integrate growth equation using a 2nd-order Rosenbrock method
+!--       (see Verwer et al., 1999, Eq. (3.2)). The Rosenbrock method adjusts
+!--       its with internal timestep to minimize the local truncation error.
+          DO WHILE ( dt_ros_sum < dt_3d )
+
+             dt_ros = MIN( dt_ros, dt_3d - dt_ros_sum )
+
+             DO
+
+                drdt = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0 -    &
+                                                          afactor / r_ros +    &
+                                                          bfactor / r_ros**3   &
+                                                        ) / ( r_ros + r0 )
+
+                d2rdtdr = -ddenom * ventilation_effect(n) * (                  &
+                                                (e_a / e_s - 1.0) * r_ros**4 - &
+                                                afactor * r0 * r_ros**2 -      &
+                                                2.0 * afactor * r_ros**3 +     &
+                                                3.0 * bfactor * r0 +           &
+                                                4.0 * bfactor * r_ros          &
+                                                            )                  &
+                          / ( r_ros**4 * ( r_ros + r0 )**2 )
+
+                k1    = drdt / ( 1.0 - gamma * dt_ros * d2rdtdr )
+
+                r_ros = MAX(r_ros_ini + k1 * dt_ros, particles(n)%aux1)
+                r_err = r_ros
+
+                drdt  = ddenom * ventilation_effect(n) * ( e_a / e_s - 1.0 -   &
+                                                           afactor / r_ros +   &
+                                                           bfactor / r_ros**3  &
+                                                         ) / ( r_ros + r0 )
+
+                k2 = ( drdt - dt_ros * 2.0 * gamma * d2rdtdr * k1 ) / &
+                     ( 1.0 - dt_ros * gamma * d2rdtdr )
+
+                r_ros = MAX(r_ros_ini + dt_ros * ( 1.5 * k1 + 0.5 * k2), particles(n)%aux1)
+   !
+   !--          Check error of the solution, and reduce dt_ros if necessary.
+                error = ABS(r_err - r_ros) / r_ros
+                IF ( error .GT. prec )  THEN
+                   dt_ros = SQRT( q_decrease * prec / error ) * dt_ros
+                   r_ros  = r_ros_ini
+                ELSE
+                   dt_ros_sum = dt_ros_sum + dt_ros
+                   dt_ros     = q_increase * dt_ros
+                   r_ros_ini  = r_ros
+                   EXIT
+                ENDIF
+
+             END DO
+
+          END DO !Rosenbrock loop
+!
+!--       Store new particle radius
+          new_r(n) = r_ros
+!
+!--       Store internal time step value for next PALM step
+          particles(n)%aux2 = dt_ros
+
+       ENDDO !Particle loop
+
+    ENDIF
+
+    DO  n = 1, number_of_particles
+!
+!--    Sum up the change in liquid water for the respective grid
+!--    box for the computation of the release/depletion of water vapor
+!--    and heat.
+       ql_c(kp,jp,ip) = ql_c(kp,jp,ip) + particles(n)%weight_factor *          &
+                                   rho_l * 1.33333333_wp * pi *                &
+                                   ( new_r(n)**3 - particles(n)%radius**3 ) /  &
+                                   ( rho_surface * dx * dy * dzw(kp) )
+!
+!--    Check if the increase in liqid water is not too big. If this is the case,
+!--    the model timestep might be too long.
+       IF ( ql_c(kp,jp,ip) > 100.0_wp )  THEN
+          WRITE( message_string, * ) 'k=',kp,' j=',jp,' i=',ip,                &
+                       ' ql_c=',ql_c(kp,jp,ip), '&part(',n,')%wf=',            &
+                       particles(n)%weight_factor,' delta_r=',delta_r
+          CALL message( 'lpm_droplet_condensation', 'PA0143', 2, 2, -1, 6, 1 )
+       ENDIF
+!
+!--    Check if the change in the droplet radius is not too big. If this is the
+!--    case, the model timestep might be too long.
+       delta_r = new_r(n) - particles(n)%radius
+       IF ( delta_r < 0.0_wp  .AND. new_r(n) < 0.0_wp )  THEN
+          WRITE( message_string, * ) '#1 k=',kp,' j=',jp,' i=',ip,             &
+                       ' e_s=',e_s, ' e_a=',e_a,' t_int=',t_int,               &
+                       '&delta_r=',delta_r,                                    &
+                       ' particle_radius=',particles(n)%radius
+          CALL message( 'lpm_droplet_condensation', 'PA0144', 2, 2, -1, 6, 1 )
+       ENDIF
+!
+!--    Sum up the total volume of liquid water (needed below for
+!--    re-calculating the weighting factors)
+       ql_v(kp,jp,ip) = ql_v(kp,jp,ip) + particles(n)%weight_factor * new_r(n)**3
+!
+!--    Determine radius class of the particle needed for collision
+       IF ( use_kernel_tables )  THEN
+          particles(n)%class = ( LOG( new_r(n) ) - rclass_lbound ) /           &
+                               ( rclass_ubound - rclass_lbound ) *             &
+                               radius_classes
+          particles(n)%class = MIN( particles(n)%class, radius_classes )
+          particles(n)%class = MAX( particles(n)%class, 1 )
+       ENDIF
+ !
+ !--   Store new radius to particle features
+       particles(n)%radius = new_r(n)
+
+    ENDDO
+
+    CALL cpu_log( log_point_s(42), 'lpm_droplet_condens', 'stop' )
+
+
+ END SUBROUTINE lpm_droplet_condensation
Index: /palm/tags/release-6.0/SOURCE/lpm_exchange_horiz.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_exchange_horiz.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_exchange_horiz.f90	(revision 3477)
@@ -0,0 +1,1323 @@
+!> @file lpm_exchange_horiz.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! dz was replaced by dz(1) to allow for right vertical stretching
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3046 2018-05-29 08:02:15Z Giersch
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE.
+! Preprocessor directive(__gfortran) for c_sizeof removed.
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2710 2017-12-19 12:50:11Z suehring
+! Changes from last commit documented
+! 
+! 2709 2017-12-19 12:49:40Z suehring
+! Bugfix in CFL check.
+! Further bugfix, non-allocated array used in case of 1D decomposition.
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2632 2017-11-20 15:35:52Z schwenkel
+! Bugfix in write statement
+!
+! 2630 2017-11-20 12:58:20Z schwenkel
+! Enabled particle advection with grid stretching. Furthermore, the CFL-
+! criterion is checked for every particle at every time step.
+! 
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! lpm_move_particle now moves inner particles that would leave the core 
+! to the respective boundary gridbox. Afterwards they get transferred by 
+! lpm_exchange_horiz. This allows particles to move more than one gridbox 
+! independent of domain composition.  
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done
+! 
+! 2330 2017-08-03 14:26:02Z schwenkel
+! Bugfix: Also for gfortran compilable, function c_sizeof is not used. 
+! 
+! 2305 2017-07-06 11:18:47Z hoffmann
+! Improved calculation of particle IDs.
+! 
+! 2245 2017-06-02 14:37:10Z schwenkel
+! Bugfix in Add_particles_to_gridcell:
+! Apply boundary conditions also in y-direction
+! 
+! 2151 2017-02-15 10:42:16Z schwenkel
+! Bugfix in lpm_move_particle that prevents
+! false production of additional particles
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1936 2016-06-13 13:37:44Z suehring
+! Deallocation of unused memory
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! Bugfixes: 
+! - reallocation of new particles 
+!   ( did not work for small number of min_nr_particle )
+! - dynamical reallocation of north-south exchange arrays ( particles got lost )
+! - north-south exchange ( nr_move_north, nr_move_south were overwritten by zero )
+! - horizontal particle boundary conditions in serial mode
+!
+! Remove unused variables
+! Descriptions in variable declaration blocks added
+!
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. Unused variables removed.
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! new netcdf-module included
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Formatting corrections.
+!
+! 1685 2015-10-08 07:32:13Z raasch
+! bugfix concerning vertical index offset in case of ocean
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf output queries
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 851 2012-03-15 14:32:58Z raasch
+! Bugfix: resetting of particle_mask and tail mask moved from end of this
+! routine to lpm
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+! Exchange of particles between the subdomains.
+!------------------------------------------------------------------------------!
+ MODULE lpm_exchange_horiz_mod
+ 
+    USE, INTRINSIC ::  ISO_C_BINDING
+    
+    USE arrays_3d,                                                             &
+       ONLY:  zw
+    
+    USE control_parameters,                                                    &
+        ONLY:  dz, message_string, simulated_time
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy, dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxr, ny, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE lpm_pack_and_sort_mod,                                                   &
+        ONLY:  lpm_pack
+
+    USE netcdf_interface,                                                      &
+        ONLY:  netcdf_data_format
+
+    USE particle_attributes,                                                   &
+        ONLY:  alloc_factor, deleted_particles, grid_particles,                &
+               ibc_par_lr, ibc_par_ns, min_nr_particle,                        &
+               number_of_particles,                                            &
+               offset_ocean_nzt, offset_ocean_nzt_m1, particles,               &
+               particle_type, prt_count, trlp_count_sum,                       &
+               trlp_count_recv_sum, trnp_count_sum, trnp_count_recv_sum,       &
+               trrp_count_sum, trrp_count_recv_sum, trsp_count_sum,            &
+               trsp_count_recv_sum, zero_particle
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), PARAMETER ::  NR_2_direction_move = 10000 !<
+    INTEGER(iwp)            ::  nr_move_north               !<
+    INTEGER(iwp)            ::  nr_move_south               !<
+
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  move_also_north
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  move_also_south
+
+    SAVE
+
+    PRIVATE
+    PUBLIC lpm_exchange_horiz, lpm_move_particle, realloc_particles_array,     &
+           dealloc_particles_array
+
+    INTERFACE lpm_exchange_horiz
+       MODULE PROCEDURE lpm_exchange_horiz
+    END INTERFACE lpm_exchange_horiz
+
+    INTERFACE lpm_move_particle
+       MODULE PROCEDURE lpm_move_particle
+    END INTERFACE lpm_move_particle
+
+    INTERFACE realloc_particles_array
+       MODULE PROCEDURE realloc_particles_array
+    END INTERFACE realloc_particles_array
+
+    INTERFACE dealloc_particles_array
+       MODULE PROCEDURE dealloc_particles_array
+    END INTERFACE dealloc_particles_array
+CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Exchange between subdomains.
+!> As soon as one particle has moved beyond the boundary of the domain, it
+!> is included in the relevant transfer arrays and marked for subsequent
+!> deletion on this PE.
+!> First sweep for crossings in x direction. Find out first the number of
+!> particles to be transferred and allocate temporary arrays needed to store
+!> them.
+!> For a one-dimensional decomposition along y, no transfer is necessary,
+!> because the particle remains on the PE, but the particle coordinate has to
+!> be adjusted.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_exchange_horiz
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                 !< grid index (x) of particle positition
+    INTEGER(iwp) ::  ip                !< index variable along x
+    INTEGER(iwp) ::  j                 !< grid index (y) of particle positition
+    INTEGER(iwp) ::  jp                !< index variable along y
+    INTEGER(iwp) ::  kp                !< index variable along z
+    INTEGER(iwp) ::  n                 !< particle index variable 
+    INTEGER(iwp) ::  par_size          !< Particle size in bytes
+    INTEGER(iwp) ::  trlp_count        !< number of particles send to left PE
+    INTEGER(iwp) ::  trlp_count_recv   !< number of particles receive from right PE
+    INTEGER(iwp) ::  trnp_count        !< number of particles send to north PE
+    INTEGER(iwp) ::  trnp_count_recv   !< number of particles receive from south PE
+    INTEGER(iwp) ::  trrp_count        !< number of particles send to right PE
+    INTEGER(iwp) ::  trrp_count_recv   !< number of particles receive from left PE
+    INTEGER(iwp) ::  trsp_count        !< number of particles send to south PE
+    INTEGER(iwp) ::  trsp_count_recv   !< number of particles receive from north PE
+
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  rvlp  !< particles received from right PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  rvnp  !< particles received from south PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  rvrp  !< particles received from left PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  rvsp  !< particles received from north PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  trlp  !< particles send to left PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  trnp  !< particles send to north PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  trrp  !< particles send to right PE
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  trsp  !< particles send to south PE
+
+    CALL cpu_log( log_point_s(23), 'lpm_exchange_horiz', 'start' )
+
+#if defined( __parallel )
+
+!
+!-- Exchange between subdomains.
+!-- As soon as one particle has moved beyond the boundary of the domain, it
+!-- is included in the relevant transfer arrays and marked for subsequent
+!-- deletion on this PE.
+!-- First sweep for crossings in x direction. Find out first the number of
+!-- particles to be transferred and allocate temporary arrays needed to store
+!-- them.
+!-- For a one-dimensional decomposition along y, no transfer is necessary,
+!-- because the particle remains on the PE, but the particle coordinate has to
+!-- be adjusted.
+    trlp_count  = 0
+    trrp_count  = 0
+
+    trlp_count_recv   = 0
+    trrp_count_recv   = 0
+
+    IF ( pdims(1) /= 1 )  THEN
+!
+!--    First calculate the storage necessary for sending and receiving the data.
+!--    Compute only first (nxl) and last (nxr) loop iterration.
+       DO  ip = nxl, nxr, nxr - nxl
+          DO  jp = nys, nyn
+             DO  kp = nzb+1, nzt
+
+                number_of_particles = prt_count(kp,jp,ip)
+                IF ( number_of_particles <= 0 )  CYCLE
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                DO  n = 1, number_of_particles
+                   IF ( particles(n)%particle_mask )  THEN
+                      i = particles(n)%x * ddx
+!
+!--                   Above calculation does not work for indices less than zero
+                      IF ( particles(n)%x < 0.0_wp)  i = -1
+
+                      IF ( i < nxl )  THEN
+                         trlp_count = trlp_count + 1
+                      ELSEIF ( i > nxr )  THEN
+                         trrp_count = trrp_count + 1
+                      ENDIF
+                   ENDIF
+                ENDDO
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+       IF ( trlp_count  == 0 )  trlp_count  = 1
+       IF ( trrp_count  == 0 )  trrp_count  = 1
+
+       ALLOCATE( trlp(trlp_count), trrp(trrp_count) )
+
+       trlp = zero_particle
+       trrp = zero_particle
+
+       trlp_count  = 0
+       trrp_count  = 0
+
+    ENDIF
+!
+!-- Compute only first (nxl) and last (nxr) loop iterration
+    DO  ip = nxl, nxr, nxr-nxl
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles <= 0 ) CYCLE
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+!
+!--             Only those particles that have not been marked as 'deleted' may
+!--             be moved.
+                IF ( particles(n)%particle_mask )  THEN
+
+                   i = particles(n)%x * ddx
+!
+!--                Above calculation does not work for indices less than zero
+                   IF ( particles(n)%x < 0.0_wp )  i = -1
+
+                   IF ( i <  nxl )  THEN
+                      IF ( i < 0 )  THEN
+!
+!--                   Apply boundary condition along x
+                         IF ( ibc_par_lr == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(1) == 1 )  THEN
+                               particles(n)%x        = ( nx + 1 ) * dx + particles(n)%x
+                               particles(n)%origin_x = ( nx + 1 ) * dx + &
+                               particles(n)%origin_x
+                            ELSE
+                               trlp_count = trlp_count + 1
+                               trlp(trlp_count)   = particles(n)
+                               trlp(trlp_count)%x = ( nx + 1 ) * dx + trlp(trlp_count)%x
+                               trlp(trlp_count)%origin_x = trlp(trlp_count)%origin_x + &
+                               ( nx + 1 ) * dx
+                               particles(n)%particle_mask  = .FALSE.
+                               deleted_particles = deleted_particles + 1
+
+                               IF ( trlp(trlp_count)%x >= (nx + 1)* dx - 1.0E-12_wp )  THEN
+                                  trlp(trlp_count)%x = trlp(trlp_count)%x - 1.0E-10_wp
+                                  !++ why is 1 subtracted in next statement???
+                                  trlp(trlp_count)%origin_x = trlp(trlp_count)%origin_x - 1
+                               ENDIF
+
+                            ENDIF
+
+                         ELSEIF ( ibc_par_lr == 1 )  THEN
+!
+!--                         Particle absorption
+                            particles(n)%particle_mask = .FALSE.
+                            deleted_particles = deleted_particles + 1
+
+                         ELSEIF ( ibc_par_lr == 2 )  THEN
+!
+!--                         Particle reflection
+                            particles(n)%x       = -particles(n)%x
+                            particles(n)%speed_x = -particles(n)%speed_x
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store particle data in the transfer array, which will be 
+!--                      send to the neighbouring PE
+                         trlp_count = trlp_count + 1
+                         trlp(trlp_count) = particles(n)
+                         particles(n)%particle_mask = .FALSE.
+                         deleted_particles = deleted_particles + 1
+
+                      ENDIF
+
+                   ELSEIF ( i > nxr )  THEN
+                      IF ( i > nx )  THEN
+!
+!--                      Apply boundary condition along x
+                         IF ( ibc_par_lr == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(1) == 1 )  THEN
+                               particles(n)%x = particles(n)%x - ( nx + 1 ) * dx
+                               particles(n)%origin_x = particles(n)%origin_x - &
+                               ( nx + 1 ) * dx
+                            ELSE
+                               trrp_count = trrp_count + 1
+                               trrp(trrp_count) = particles(n)
+                               trrp(trrp_count)%x = trrp(trrp_count)%x - ( nx + 1 ) * dx
+                               trrp(trrp_count)%origin_x = trrp(trrp_count)%origin_x - &
+                               ( nx + 1 ) * dx
+                               particles(n)%particle_mask = .FALSE.
+                               deleted_particles = deleted_particles + 1
+
+                            ENDIF
+
+                         ELSEIF ( ibc_par_lr == 1 )  THEN
+!
+!--                         Particle absorption
+                            particles(n)%particle_mask = .FALSE.
+                            deleted_particles = deleted_particles + 1
+
+                         ELSEIF ( ibc_par_lr == 2 )  THEN
+!
+!--                         Particle reflection
+                            particles(n)%x       = 2 * ( nx * dx ) - particles(n)%x
+                            particles(n)%speed_x = -particles(n)%speed_x
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store particle data in the transfer array, which will be send
+!--                      to the neighbouring PE
+                         trrp_count = trrp_count + 1
+                         trrp(trrp_count) = particles(n)
+                         particles(n)%particle_mask = .FALSE.
+                         deleted_particles = deleted_particles + 1
+
+                      ENDIF
+
+                   ENDIF
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- STORAGE_SIZE returns the storage size of argument A in bits. However , it 
+!-- is needed in bytes. The function C_SIZEOF which produces this value directly
+!-- causes problems with gfortran. For this reason the use of C_SIZEOF is avoided
+    par_size = STORAGE_SIZE(trlp(1))/8
+
+
+!
+!-- Allocate arrays required for north-south exchange, as these
+!-- are used directly after particles are exchange along x-direction.
+    ALLOCATE( move_also_north(1:NR_2_direction_move) )
+    ALLOCATE( move_also_south(1:NR_2_direction_move) )
+
+    nr_move_north = 0
+    nr_move_south = 0
+!
+!-- Send left boundary, receive right boundary (but first exchange how many
+!-- and check, if particle storage must be extended)
+    IF ( pdims(1) /= 1 )  THEN
+
+       CALL MPI_SENDRECV( trlp_count,      1, MPI_INTEGER, pleft,  0, &
+                          trrp_count_recv, 1, MPI_INTEGER, pright, 0, &
+                          comm2d, status, ierr )
+
+       ALLOCATE(rvrp(MAX(1,trrp_count_recv)))
+
+       CALL MPI_SENDRECV( trlp, max(1,trlp_count)*par_size, MPI_BYTE,&
+                          pleft, 1, rvrp,                            &
+                          max(1,trrp_count_recv)*par_size, MPI_BYTE, pright, 1,&
+                          comm2d, status, ierr )
+
+       IF ( trrp_count_recv > 0 )  CALL Add_particles_to_gridcell(rvrp(1:trrp_count_recv))
+
+       DEALLOCATE(rvrp)
+
+!
+!--    Send right boundary, receive left boundary
+       CALL MPI_SENDRECV( trrp_count,      1, MPI_INTEGER, pright, 0, &
+                          trlp_count_recv, 1, MPI_INTEGER, pleft,  0, &
+                          comm2d, status, ierr )
+
+       ALLOCATE(rvlp(MAX(1,trlp_count_recv)))
+!      
+!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--    variables in structure particle_type (due to the calculation of par_size)
+       CALL MPI_SENDRECV( trrp, max(1,trrp_count)*par_size, MPI_BYTE,&
+                          pright, 1, rvlp,                           &
+                          max(1,trlp_count_recv)*par_size, MPI_BYTE, pleft, 1, &
+                          comm2d, status, ierr )
+
+       IF ( trlp_count_recv > 0 )  CALL Add_particles_to_gridcell(rvlp(1:trlp_count_recv))
+
+       DEALLOCATE( rvlp )
+       DEALLOCATE( trlp, trrp )
+
+    ENDIF
+
+!
+!-- Check whether particles have crossed the boundaries in y direction. Note 
+!-- that this case can also apply to particles that have just been received
+!-- from the adjacent right or left PE.
+!-- Find out first the number of particles to be transferred and allocate
+!-- temporary arrays needed to store them.
+!-- For a one-dimensional decomposition along y, no transfer is necessary,
+!-- because the particle remains on the PE.
+    trsp_count  = nr_move_south
+    trnp_count  = nr_move_north
+
+    trsp_count_recv   = 0
+    trnp_count_recv   = 0
+
+    IF ( pdims(2) /= 1 )  THEN
+!
+!--    First calculate the storage necessary for sending and receiving the
+!--    data
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn, nyn-nys    !compute only first (nys) and last (nyn) loop iterration
+             DO  kp = nzb+1, nzt
+                number_of_particles = prt_count(kp,jp,ip)
+                IF ( number_of_particles <= 0 )  CYCLE
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                DO  n = 1, number_of_particles
+                   IF ( particles(n)%particle_mask )  THEN
+                      j = particles(n)%y * ddy
+!
+!--                   Above calculation does not work for indices less than zero
+                      IF ( particles(n)%y < 0.0_wp)  j = -1
+
+                      IF ( j < nys )  THEN
+                         trsp_count = trsp_count + 1
+                      ELSEIF ( j > nyn )  THEN
+                         trnp_count = trnp_count + 1
+                      ENDIF
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+
+       IF ( trsp_count  == 0 )  trsp_count  = 1
+       IF ( trnp_count  == 0 )  trnp_count  = 1
+
+       ALLOCATE( trsp(trsp_count), trnp(trnp_count) )
+
+       trsp = zero_particle
+       trnp = zero_particle
+
+       trsp_count  = nr_move_south
+       trnp_count  = nr_move_north
+       
+       trsp(1:nr_move_south) = move_also_south(1:nr_move_south)
+       trnp(1:nr_move_north) = move_also_north(1:nr_move_north)
+
+    ENDIF
+
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn, nyn-nys ! compute only first (nys) and last (nyn) loop iterration
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+!
+!--             Only those particles that have not been marked as 'deleted' may
+!--             be moved.
+                IF ( particles(n)%particle_mask )  THEN
+
+                   j = particles(n)%y * ddy
+!
+!--                Above calculation does not work for indices less than zero
+                   IF ( particles(n)%y < 0.0_wp )  j = -1
+
+                   IF ( j < nys )  THEN
+                      IF ( j < 0 )  THEN
+!
+!--                      Apply boundary condition along y
+                         IF ( ibc_par_ns == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(2) == 1 )  THEN
+                               particles(n)%y = ( ny + 1 ) * dy + particles(n)%y
+                               particles(n)%origin_y = ( ny + 1 ) * dy + &
+                                                     particles(n)%origin_y
+                            ELSE
+                               trsp_count         = trsp_count + 1
+                               trsp(trsp_count)   = particles(n)
+                               trsp(trsp_count)%y = ( ny + 1 ) * dy + &
+                                                 trsp(trsp_count)%y
+                               trsp(trsp_count)%origin_y = trsp(trsp_count)%origin_y &
+                                                + ( ny + 1 ) * dy
+                               particles(n)%particle_mask = .FALSE.
+                               deleted_particles = deleted_particles + 1
+
+                               IF ( trsp(trsp_count)%y >= (ny+1)* dy - 1.0E-12_wp )  THEN
+                                  trsp(trsp_count)%y = trsp(trsp_count)%y - 1.0E-10_wp
+                                  !++ why is 1 subtracted in next statement???
+                                  trsp(trsp_count)%origin_y =                        &
+                                                  trsp(trsp_count)%origin_y - 1
+                               ENDIF
+
+                            ENDIF
+
+                         ELSEIF ( ibc_par_ns == 1 )  THEN
+!
+!--                         Particle absorption
+                            particles(n)%particle_mask = .FALSE.
+                            deleted_particles          = deleted_particles + 1
+
+                         ELSEIF ( ibc_par_ns == 2 )  THEN
+!
+!--                         Particle reflection
+                            particles(n)%y       = -particles(n)%y
+                            particles(n)%speed_y = -particles(n)%speed_y
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store particle data in the transfer array, which will 
+!--                      be send to the neighbouring PE
+                         trsp_count = trsp_count + 1
+                         trsp(trsp_count) = particles(n)
+                         particles(n)%particle_mask = .FALSE.
+                         deleted_particles = deleted_particles + 1
+
+                      ENDIF
+
+                   ELSEIF ( j > nyn )  THEN
+                      IF ( j > ny )  THEN
+!
+!--                       Apply boundary condition along y
+                         IF ( ibc_par_ns == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(2) == 1 )  THEN
+                               particles(n)%y        = particles(n)%y - ( ny + 1 ) * dy
+                               particles(n)%origin_y =                         &
+                                          particles(n)%origin_y - ( ny + 1 ) * dy
+                            ELSE
+                               trnp_count         = trnp_count + 1
+                               trnp(trnp_count)   = particles(n)
+                               trnp(trnp_count)%y =                            &
+                                          trnp(trnp_count)%y - ( ny + 1 ) * dy
+                               trnp(trnp_count)%origin_y =                     &
+                                         trnp(trnp_count)%origin_y - ( ny + 1 ) * dy
+                               particles(n)%particle_mask = .FALSE.
+                               deleted_particles          = deleted_particles + 1
+                            ENDIF
+
+                         ELSEIF ( ibc_par_ns == 1 )  THEN
+!
+!--                         Particle absorption
+                            particles(n)%particle_mask = .FALSE.
+                            deleted_particles = deleted_particles + 1
+
+                         ELSEIF ( ibc_par_ns == 2 )  THEN
+!
+!--                         Particle reflection
+                            particles(n)%y       = 2 * ( ny * dy ) - particles(n)%y
+                            particles(n)%speed_y = -particles(n)%speed_y
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store particle data in the transfer array, which will 
+!--                      be send to the neighbouring PE
+                         trnp_count = trnp_count + 1
+                         trnp(trnp_count) = particles(n)
+                         particles(n)%particle_mask = .FALSE.
+                         deleted_particles = deleted_particles + 1
+
+                      ENDIF
+
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Send front boundary, receive back boundary (but first exchange how many
+!-- and check, if particle storage must be extended)
+    IF ( pdims(2) /= 1 )  THEN
+
+       CALL MPI_SENDRECV( trsp_count,      1, MPI_INTEGER, psouth, 0, &
+                          trnp_count_recv, 1, MPI_INTEGER, pnorth, 0, &
+                          comm2d, status, ierr )
+
+       ALLOCATE(rvnp(MAX(1,trnp_count_recv)))
+!      
+!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--    variables in structure particle_type (due to the calculation of par_size)
+       CALL MPI_SENDRECV( trsp, trsp_count*par_size, MPI_BYTE,      &
+                          psouth, 1, rvnp,                             &
+                          trnp_count_recv*par_size, MPI_BYTE, pnorth, 1,   &
+                          comm2d, status, ierr )
+
+       IF ( trnp_count_recv  > 0 )  CALL Add_particles_to_gridcell(rvnp(1:trnp_count_recv))
+
+       DEALLOCATE(rvnp)
+
+!
+!--    Send back boundary, receive front boundary
+       CALL MPI_SENDRECV( trnp_count,      1, MPI_INTEGER, pnorth, 0, &
+                          trsp_count_recv, 1, MPI_INTEGER, psouth, 0, &
+                          comm2d, status, ierr )
+
+       ALLOCATE(rvsp(MAX(1,trsp_count_recv)))
+!      
+!--    This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--    variables in structure particle_type (due to the calculation of par_size)
+       CALL MPI_SENDRECV( trnp, trnp_count*par_size, MPI_BYTE,      &
+                          pnorth, 1, rvsp,                          &
+                          trsp_count_recv*par_size, MPI_BYTE, psouth, 1,   &
+                          comm2d, status, ierr )
+
+       IF ( trsp_count_recv > 0 )  CALL Add_particles_to_gridcell(rvsp(1:trsp_count_recv))
+
+       DEALLOCATE(rvsp)
+
+       number_of_particles = number_of_particles + trsp_count_recv
+
+       DEALLOCATE( trsp, trnp )
+
+    ENDIF
+
+    DEALLOCATE( move_also_north )
+    DEALLOCATE( move_also_south )
+
+#else
+
+    DO  ip = nxl, nxr, nxr-nxl
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+!
+!--             Apply boundary conditions
+
+                IF ( particles(n)%x < 0.0_wp )  THEN
+
+                   IF ( ibc_par_lr == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      particles(n)%x = ( nx + 1 ) * dx + particles(n)%x
+                      particles(n)%origin_x = ( nx + 1 ) * dx + &
+                               particles(n)%origin_x
+                   ELSEIF ( ibc_par_lr == 1 )  THEN
+!
+!--                   Particle absorption
+                      particles(n)%particle_mask = .FALSE.
+                      deleted_particles = deleted_particles + 1
+
+                   ELSEIF ( ibc_par_lr == 2 )  THEN
+!
+!--                   Particle reflection
+                      particles(n)%x       = -dx - particles(n)%x
+                      particles(n)%speed_x = -particles(n)%speed_x
+                   ENDIF
+
+                ELSEIF ( particles(n)%x >= ( nx + 1) * dx )  THEN
+
+                   IF ( ibc_par_lr == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      particles(n)%x = particles(n)%x - ( nx + 1 ) * dx
+                      particles(n)%origin_x = particles(n)%origin_x - &
+                               ( nx + 1 ) * dx
+
+                   ELSEIF ( ibc_par_lr == 1 )  THEN
+!
+!--                   Particle absorption
+                      particles(n)%particle_mask = .FALSE.
+                      deleted_particles = deleted_particles + 1
+
+                   ELSEIF ( ibc_par_lr == 2 )  THEN
+!
+!--                   Particle reflection
+                      particles(n)%x       = ( nx + 1 ) * dx - particles(n)%x
+                      particles(n)%speed_x = -particles(n)%speed_x
+                   ENDIF
+
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn, nyn-nys
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+
+                IF ( particles(n)%y < 0.0_wp)  THEN
+
+                   IF ( ibc_par_ns == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      particles(n)%y = ( ny + 1 ) * dy + particles(n)%y
+                      particles(n)%origin_y = ( ny + 1 ) * dy + &
+                           particles(n)%origin_y
+
+                   ELSEIF ( ibc_par_ns == 1 )  THEN
+!
+!--                   Particle absorption
+                      particles(n)%particle_mask = .FALSE.
+                      deleted_particles = deleted_particles + 1
+
+                   ELSEIF ( ibc_par_ns == 2 )  THEN
+!
+!--                   Particle reflection
+                      particles(n)%y       = -dy - particles(n)%y
+                      particles(n)%speed_y = -particles(n)%speed_y
+                   ENDIF
+
+                ELSEIF ( particles(n)%y >= ( ny + 1) * dy )  THEN
+
+                   IF ( ibc_par_ns == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      particles(n)%y = particles(n)%y - ( ny + 1 ) * dy
+                      particles(n)%origin_y = particles(n)%origin_y - &
+                                ( ny + 1 ) * dy
+
+                   ELSEIF ( ibc_par_ns == 1 )  THEN
+!
+!--                   Particle absorption
+                      particles(n)%particle_mask = .FALSE.
+                      deleted_particles = deleted_particles + 1
+
+                   ELSEIF ( ibc_par_ns == 2 )  THEN
+!
+!--                   Particle reflection
+                      particles(n)%y       = ( ny + 1 ) * dy - particles(n)%y
+                      particles(n)%speed_y = -particles(n)%speed_y
+                   ENDIF
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+#endif
+
+!
+!-- Accumulate the number of particles transferred between the subdomains
+#if defined( __parallel )
+    trlp_count_sum      = trlp_count_sum      + trlp_count
+    trlp_count_recv_sum = trlp_count_recv_sum + trlp_count_recv
+    trrp_count_sum      = trrp_count_sum      + trrp_count
+    trrp_count_recv_sum = trrp_count_recv_sum + trrp_count_recv
+    trsp_count_sum      = trsp_count_sum      + trsp_count
+    trsp_count_recv_sum = trsp_count_recv_sum + trsp_count_recv
+    trnp_count_sum      = trnp_count_sum      + trnp_count
+    trnp_count_recv_sum = trnp_count_recv_sum + trnp_count_recv
+#endif
+
+    CALL cpu_log( log_point_s(23), 'lpm_exchange_horiz', 'stop' )
+
+ END SUBROUTINE lpm_exchange_horiz
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> If a particle moves from one processor to another, this subroutine moves 
+!> the corresponding elements from the particle arrays of the old grid cells 
+!> to the particle arrays of the new grid cells.
+!------------------------------------------------------------------------------!
+ SUBROUTINE Add_particles_to_gridcell (particle_array)
+
+    IMPLICIT NONE
+
+    INTEGER(iwp)        ::  ip        !< grid index (x) of particle
+    INTEGER(iwp)        ::  jp        !< grid index (x) of particle
+    INTEGER(iwp)        ::  kp        !< grid index (x) of particle
+    INTEGER(iwp)        ::  n         !< index variable of particle
+    INTEGER(iwp)        ::  pindex    !< dummy argument for new number of particles per grid box
+
+    LOGICAL             ::  pack_done !<
+
+    TYPE(particle_type), DIMENSION(:), INTENT(IN)  ::  particle_array !< new particles in a grid box
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  temp_ns        !< temporary particle array for reallocation
+
+    pack_done     = .FALSE.
+
+    DO n = 1, SIZE(particle_array)
+
+       IF ( .NOT. particle_array(n)%particle_mask )  CYCLE
+
+       ip = particle_array(n)%x * ddx
+       jp = particle_array(n)%y * ddy
+       kp = particle_array(n)%z / dz(1) + 1 + offset_ocean_nzt
+!
+!--    In case of grid stretching a particle might be above or below the  
+!--    previously calculated particle grid box (indices).     
+       DO WHILE( zw(kp) < particle_array(n)%z )
+          kp = kp + 1
+       ENDDO
+
+       DO WHILE( zw(kp-1) > particle_array(n)%z )
+          kp = kp - 1
+       ENDDO
+
+       IF ( ip >= nxl  .AND.  ip <= nxr  .AND.  jp >= nys  .AND.  jp <= nyn    &
+            .AND.  kp >= nzb+1  .AND.  kp <= nzt)  THEN ! particle stays on processor
+          number_of_particles = prt_count(kp,jp,ip)
+          particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+
+          pindex = prt_count(kp,jp,ip)+1
+          IF( pindex > SIZE(grid_particles(kp,jp,ip)%particles) )  THEN
+             IF ( pack_done )  THEN
+                CALL realloc_particles_array (ip,jp,kp)
+             ELSE
+                CALL lpm_pack
+                prt_count(kp,jp,ip) = number_of_particles
+                pindex = prt_count(kp,jp,ip)+1
+                IF ( pindex > SIZE(grid_particles(kp,jp,ip)%particles) )  THEN
+                   CALL realloc_particles_array (ip,jp,kp)
+                ENDIF
+                pack_done = .TRUE.
+             ENDIF
+          ENDIF
+          grid_particles(kp,jp,ip)%particles(pindex) = particle_array(n)
+          prt_count(kp,jp,ip) = pindex
+       ELSE
+          IF ( jp <= nys - 1 )  THEN
+             nr_move_south = nr_move_south+1
+!
+!--          Before particle information is swapped to exchange-array, check 
+!--          if enough memory is allocated. If required, reallocate exchange
+!--          array.
+             IF ( nr_move_south > SIZE(move_also_south) )  THEN
+!
+!--             At first, allocate further temporary array to swap particle 
+!--             information.
+                ALLOCATE( temp_ns(SIZE(move_also_south)+NR_2_direction_move) )
+                temp_ns(1:nr_move_south-1) = move_also_south(1:nr_move_south-1)
+                DEALLOCATE( move_also_south )
+                ALLOCATE( move_also_south(SIZE(temp_ns)) )
+                move_also_south(1:nr_move_south-1) = temp_ns(1:nr_move_south-1)
+                DEALLOCATE( temp_ns )
+
+             ENDIF
+
+             move_also_south(nr_move_south) = particle_array(n)
+
+             IF ( jp == -1 )  THEN
+!
+!--             Apply boundary condition along y
+                IF ( ibc_par_ns == 0 )  THEN
+                   move_also_south(nr_move_south)%y =                          &
+                      move_also_south(nr_move_south)%y + ( ny + 1 ) * dy
+                   move_also_south(nr_move_south)%origin_y =                   &
+                      move_also_south(nr_move_south)%origin_y + ( ny + 1 ) * dy
+                ELSEIF ( ibc_par_ns == 1 )  THEN
+!
+!--                Particle absorption
+                   move_also_south(nr_move_south)%particle_mask = .FALSE.
+                   deleted_particles = deleted_particles + 1
+
+                ELSEIF ( ibc_par_ns == 2 )  THEN
+!
+!--                Particle reflection
+                   move_also_south(nr_move_south)%y       =                    &
+                      -move_also_south(nr_move_south)%y
+                   move_also_south(nr_move_south)%speed_y =                    &
+                      -move_also_south(nr_move_south)%speed_y
+
+                ENDIF
+             ENDIF
+          ELSEIF ( jp >= nyn+1 )  THEN
+             nr_move_north = nr_move_north+1
+!
+!--          Before particle information is swapped to exchange-array, check 
+!--          if enough memory is allocated. If required, reallocate exchange
+!--          array.
+             IF ( nr_move_north > SIZE(move_also_north) )  THEN
+!
+!--             At first, allocate further temporary array to swap particle 
+!--             information.
+                ALLOCATE( temp_ns(SIZE(move_also_north)+NR_2_direction_move) )
+                temp_ns(1:nr_move_north-1) = move_also_south(1:nr_move_north-1)
+                DEALLOCATE( move_also_north )
+                ALLOCATE( move_also_north(SIZE(temp_ns)) )
+                move_also_north(1:nr_move_north-1) = temp_ns(1:nr_move_north-1)
+                DEALLOCATE( temp_ns )
+
+             ENDIF
+
+             move_also_north(nr_move_north) = particle_array(n)
+             IF ( jp == ny+1 )  THEN
+!
+!--             Apply boundary condition along y
+                IF ( ibc_par_ns == 0 )  THEN
+
+                   move_also_north(nr_move_north)%y =                          &
+                      move_also_north(nr_move_north)%y - ( ny + 1 ) * dy
+                   move_also_north(nr_move_north)%origin_y =                   &
+                      move_also_north(nr_move_north)%origin_y - ( ny + 1 ) * dy
+                ELSEIF ( ibc_par_ns == 1 )  THEN
+!
+!--                Particle absorption
+                   move_also_north(nr_move_north)%particle_mask = .FALSE.
+                   deleted_particles = deleted_particles + 1
+
+                ELSEIF ( ibc_par_ns == 2 )  THEN
+!
+!--                Particle reflection
+                   move_also_north(nr_move_north)%y       =                    &
+                      -move_also_north(nr_move_north)%y
+                   move_also_north(nr_move_north)%speed_y =                    &
+                      -move_also_north(nr_move_north)%speed_y
+
+                ENDIF
+             ENDIF
+          ELSE
+             WRITE(0,'(a,8i7)') 'particle out of range ',myid,ip,jp,kp,nxl,nxr,nys,nyn
+          ENDIF
+       ENDIF
+    ENDDO
+
+    RETURN
+
+ END SUBROUTINE Add_particles_to_gridcell
+
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> If a particle moves from one grid cell to another (on the current 
+!> processor!), this subroutine moves the corresponding element from the
+!> particle array of the old grid cell to the particle array of the new grid 
+!> cell.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_move_particle
+ 
+    IMPLICIT NONE
+
+    INTEGER(iwp)        ::  i           !< grid index (x) of particle position
+    INTEGER(iwp)        ::  ip          !< index variable along x
+    INTEGER(iwp)        ::  j           !< grid index (y) of particle position
+    INTEGER(iwp)        ::  jp          !< index variable along y
+    INTEGER(iwp)        ::  k           !< grid index (z) of particle position
+    INTEGER(iwp)        ::  kp          !< index variable along z
+    INTEGER(iwp)        ::  n           !< index variable for particle array
+    INTEGER(iwp)        ::  np_before_move !< number of particles per grid box before moving
+    INTEGER(iwp)        ::  pindex      !< dummy argument for number of new particle per grid box
+
+    TYPE(particle_type), DIMENSION(:), POINTER  ::  particles_before_move !< particles before moving
+
+    CALL cpu_log( log_point_s(41), 'lpm_move_particle', 'start' )
+    CALL lpm_check_cfl
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+
+             np_before_move = prt_count(kp,jp,ip)
+             IF ( np_before_move <= 0 )  CYCLE
+             particles_before_move => grid_particles(kp,jp,ip)%particles(1:np_before_move)
+             
+             DO  n = 1, np_before_move
+                i = particles_before_move(n)%x * ddx
+                j = particles_before_move(n)%y * ddy
+                k = kp
+!
+!--             Find correct vertical particle grid box (necessary in case of grid stretching)
+!--             Due to the CFL limitations only the neighbouring grid boxes are considered. 
+                IF( zw(k)   < particles_before_move(n)%z ) k = k + 1
+                IF( zw(k-1) > particles_before_move(n)%z ) k = k - 1 
+                
+!--             For lpm_exchange_horiz to work properly particles need to be moved to the outermost gridboxes
+!--             of the respective processor. If the particle index is inside the processor the following lines
+!--             will not change the index
+                i = MIN ( i , nxr )
+                i = MAX ( i , nxl )
+                j = MIN ( j , nyn )
+                j = MAX ( j , nys )
+                
+                k = MIN ( k , nzt )
+                k = MAX ( k , nzb+1 )
+                
+!
+!--             Check, if particle has moved to another grid cell.
+                IF ( i /= ip  .OR.  j /= jp  .OR.  k /= kp )  THEN
+!!
+!--                If the particle stays on the same processor, the particle
+!--                will be added to the particle array of the new processor.
+                   number_of_particles = prt_count(k,j,i)
+                   particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                   pindex = prt_count(k,j,i)+1
+                   IF (  pindex > SIZE(grid_particles(k,j,i)%particles)  )     &
+                   THEN
+                      CALL realloc_particles_array(i,j,k)
+                   ENDIF
+
+                   grid_particles(k,j,i)%particles(pindex) = particles_before_move(n)
+                   prt_count(k,j,i) = pindex
+
+                   particles_before_move(n)%particle_mask = .FALSE.
+                ENDIF
+             ENDDO
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CALL cpu_log( log_point_s(41), 'lpm_move_particle', 'stop' )
+
+    RETURN
+
+ END SUBROUTINE lpm_move_particle
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check CFL-criterion for each particle. If one particle violated the 
+!> criterion the particle will be deleted and a warning message is given.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_check_cfl  
+       
+    IMPLICIT NONE
+    
+    INTEGER(iwp)  ::  i !< running index, x-direction
+    INTEGER(iwp)  ::  j !< running index, y-direction
+    INTEGER(iwp)  ::  k !< running index, z-direction
+    INTEGER(iwp)  ::  n !< running index, number of particles
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+             number_of_particles = prt_count(k,j,i)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(k,j,i)%particles(1:number_of_particles)         
+             DO n = 1, number_of_particles
+!
+!--             Note, check for CFL does not work at first particle timestep 
+!--             when both, age and age_m are zero. 
+                IF ( particles(n)%age - particles(n)%age_m > 0.0_wp )  THEN  
+                   IF(ABS(particles(n)%speed_x) >                              &
+                      (dx/(particles(n)%age-particles(n)%age_m))  .OR.         &
+                      ABS(particles(n)%speed_y) >                              & 
+                      (dy/(particles(n)%age-particles(n)%age_m))  .OR.         &
+                      ABS(particles(n)%speed_z) >                              &
+                      ((zw(k)-zw(k-1))/(particles(n)%age-particles(n)%age_m))) &
+                   THEN
+                      WRITE( message_string, * )                               &
+                      'Particle violated CFL-criterion: &particle with id ',   &
+                      particles(n)%id, ' will be deleted!'   
+                      CALL message( 'lpm_check_cfl', 'PA0475', 0, 1, -1, 6, 0 )
+                      particles(n)%particle_mask= .FALSE.
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO   
+
+ END SUBROUTINE lpm_check_cfl
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> If the allocated memory for the particle array do not suffice to add arriving
+!> particles from neighbour grid cells, this subrouting reallocates the 
+!> particle array to assure enough memory is available. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE realloc_particles_array (i,j,k,size_in)
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(in)                       ::  i              !<
+    INTEGER(iwp), INTENT(in)                       ::  j              !<
+    INTEGER(iwp), INTENT(in)                       ::  k              !<
+    INTEGER(iwp), INTENT(in), OPTIONAL             ::  size_in        !<
+
+    INTEGER(iwp)                                   :: old_size        !<
+    INTEGER(iwp)                                   :: new_size        !<
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: tmp_particles_d !<
+    TYPE(particle_type), DIMENSION(500)            :: tmp_particles_s !<
+
+    old_size = SIZE(grid_particles(k,j,i)%particles)
+
+    IF ( PRESENT(size_in) )   THEN
+       new_size = size_in
+    ELSE
+       new_size = old_size * ( 1.0_wp + alloc_factor / 100.0_wp )
+    ENDIF
+
+    new_size = MAX( new_size, min_nr_particle, old_size + 1 )
+
+    IF ( old_size <= 500 )  THEN
+
+       tmp_particles_s(1:old_size) = grid_particles(k,j,i)%particles(1:old_size)
+
+       DEALLOCATE(grid_particles(k,j,i)%particles)
+       ALLOCATE(grid_particles(k,j,i)%particles(new_size))
+
+       grid_particles(k,j,i)%particles(1:old_size)          = tmp_particles_s(1:old_size)
+       grid_particles(k,j,i)%particles(old_size+1:new_size) = zero_particle
+
+    ELSE
+
+       ALLOCATE(tmp_particles_d(new_size))
+       tmp_particles_d(1:old_size) = grid_particles(k,j,i)%particles
+
+       DEALLOCATE(grid_particles(k,j,i)%particles)
+       ALLOCATE(grid_particles(k,j,i)%particles(new_size))
+
+       grid_particles(k,j,i)%particles(1:old_size)          = tmp_particles_d(1:old_size)
+       grid_particles(k,j,i)%particles(old_size+1:new_size) = zero_particle
+
+       DEALLOCATE(tmp_particles_d)
+
+    ENDIF
+    particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+    RETURN
+ END SUBROUTINE realloc_particles_array
+
+
+
+
+
+ SUBROUTINE dealloc_particles_array
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i
+    INTEGER(iwp) ::  j
+    INTEGER(iwp) ::  k
+    INTEGER(iwp) :: old_size        !<
+    INTEGER(iwp) :: new_size        !<
+
+    LOGICAL                                        :: dealloc  
+
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: tmp_particles_d !<
+    TYPE(particle_type), DIMENSION(500)            :: tmp_particles_s !<
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+!
+!--          Determine number of active particles
+             number_of_particles = prt_count(k,j,i)
+!
+!--          Determine allocated memory size
+             old_size = SIZE( grid_particles(k,j,i)%particles )
+!
+!--          Check for large unused memory
+             dealloc = ( ( number_of_particles < min_nr_particle .AND.         &
+                           old_size            > min_nr_particle )  .OR.       &
+                         ( number_of_particles > min_nr_particle .AND.         &
+                           old_size - number_of_particles *                    &
+                              ( 1.0_wp + 0.01_wp * alloc_factor ) > 0.0_wp ) )
+                         
+
+             IF ( dealloc )  THEN
+                IF ( number_of_particles < min_nr_particle )  THEN
+                   new_size = min_nr_particle
+                ELSE 
+                   new_size = INT( number_of_particles * ( 1.0_wp + 0.01_wp * alloc_factor ) )
+                ENDIF
+
+                IF ( number_of_particles <= 500 )  THEN
+
+                   tmp_particles_s(1:number_of_particles) = grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                   DEALLOCATE(grid_particles(k,j,i)%particles)
+                   ALLOCATE(grid_particles(k,j,i)%particles(new_size))
+
+                   grid_particles(k,j,i)%particles(1:number_of_particles)          = tmp_particles_s(1:number_of_particles)
+                   grid_particles(k,j,i)%particles(number_of_particles+1:new_size) = zero_particle
+
+                ELSE
+
+                   ALLOCATE(tmp_particles_d(number_of_particles))
+                   tmp_particles_d(1:number_of_particles) = grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                   DEALLOCATE(grid_particles(k,j,i)%particles)
+                   ALLOCATE(grid_particles(k,j,i)%particles(new_size))
+
+                   grid_particles(k,j,i)%particles(1:number_of_particles)          = tmp_particles_d(1:number_of_particles)
+                   grid_particles(k,j,i)%particles(number_of_particles+1:new_size) = zero_particle
+
+                   DEALLOCATE(tmp_particles_d)
+
+                ENDIF
+
+             ENDIF
+          ENDDO
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE dealloc_particles_array
+
+
+END MODULE lpm_exchange_horiz_mod
Index: /palm/tags/release-6.0/SOURCE/lpm_init.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_init.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_init.f90	(revision 3477)
@@ -0,0 +1,1234 @@
+!> @file lpm_init.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! ocean renamed ocean_mode
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by dzw or dz(1) to allow for right vertical stretching
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 3039 2018-05-24 13:13:11Z schwenkel
+! bugfix for lcm with grid stretching
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! nesting routine is only called if nesting is switched on
+! 
+! 2954 2018-04-09 14:35:46Z schwenkel
+! Bugfix for particle initialization in case of ocean
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Grid indices passed to lpm_boundary_conds. (responsible Philipp Thiele)
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2628 2017-11-20 12:40:38Z schwenkel
+! Enabled particle advection with grid stretching.
+! 
+! 2608 2017-11-13 14:04:26Z schwenkel
+! Calculation of magnus equation in external module (diagnostic_quantities_mod).
+! 
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done
+! 
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Initialization of chemical aerosol composition
+! 
+! 2346 2017-08-09 16:39:17Z suehring
+! Bugfix, correct determination of topography top index
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+!
+! 2317 2017-07-20 17:27:19Z suehring
+! Extended particle data type. Aerosol initialization improved.
+!
+! 2305 2017-07-06 11:18:47Z hoffmann
+! Improved calculation of particle IDs.
+!
+! 2274 2017-06-09 13:27:48Z Giersch
+!  Changed error messages
+!
+! 2265 2017-06-08 16:58:28Z schwenkel
+! Unused variables removed.
+!
+! 2263 2017-06-08 14:59:01Z schwenkel
+! Implemented splitting and merging algorithm
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments according to new topography realization
+!
+!
+! 2223 2017-05-15 16:38:09Z suehring
+! Add check for particle release at model top
+!
+! 2182 2017-03-17 14:27:40Z schwenkel
+! Added parameters for simplified particle initialization.
+!
+! 2122 2017-01-18 12:22:54Z hoffmann
+! Improved initialization of equilibrium aerosol radii
+! Calculation of particle ID
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 2016-06-09 16:25:25Z suehring
+! Bugfix in determining initial particle height and grid index in case of
+! seed_follows_topography.
+! Bugfix concerning random positions, ensure that particles do not move more
+! than one grid length.
+! Bugfix logarithmic interpolation.
+! Initial setting of sgs_wf_part.
+!
+! 1890 2016-04-22 08:52:11Z hoffmann
+! Initialization of aerosol equilibrium radius not possible in supersaturated
+! environments. Therefore, a maximum supersaturation of -1 % is assumed during
+! initialization.
+!
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod
+!
+! 1871 2016-04-15 11:46:09Z hoffmann
+! Initialization of aerosols added.
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! curvature_solution_effects moved to particle_attributes
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module added
+!
+! 1725 2015-11-17 13:01:51Z hoffmann
+! Bugfix: Processor-dependent seed for random function is generated before it is
+! used.
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Renamed prandtl_layer to constant_flux_layer.
+!
+! 1685 2015-10-08 07:32:13Z raasch
+! bugfix concerning vertical index offset in case of ocean
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! initial vertical particle position is allowed to follow the topography
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+! Kind definition added to all floating point numbers.
+! lpm_init changed form a subroutine to a module.
+!
+! 1327 2014-03-21 11:00:16Z raasch
+! -netcdf_output
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+! bugfix: #if defined( __parallel ) added
+!
+! 1314 2014-03-14 18:25:17Z suehring
+! Vertical logarithmic interpolation of horizontal particle speed for particles
+! between roughness height and first vertical grid level.
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine renamed: init_particles -> lpm_init
+! de_dx, de_dy, de_dz are allocated here (instead of automatic arrays in
+! advec_particles),
+! sort_particles renamed lpm_sort_arrays, user_init_particles renamed lpm_init
+!
+! 828 2012-02-21 12:00:36Z raasch
+! call of init_kernels, particle feature color renamed class
+!
+! 824 2012-02-17 09:09:57Z raasch
+! particle attributes speed_x|y|z_sgs renamed rvar1|2|3,
+! array particles implemented as pointer
+!
+! 667 2010-12-23 12:06:00Z suehring/gryschka
+! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng for allocation
+! of arrays.
+!
+! Revision 1.1  1999/11/25 16:22:38  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> This routine initializes a set of particles and their attributes (position,
+!> radius, ..) which are used by the Lagrangian particle model (see lpm).
+!------------------------------------------------------------------------------!
+ MODULE lpm_init_mod
+
+    USE, INTRINSIC ::  ISO_C_BINDING
+
+    USE arrays_3d,                                                             &
+        ONLY:  de_dx, de_dy, de_dz, dzw, zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, constant_flux_layer, current_timestep_number,   &
+               dt_3d, dz, initializing_actions, message_string, ocean_mode,    &
+               simulated_time
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, dx, ddy, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxlg, nxrg, nxr, ny, nyn, nys, nyng, nysg, nz, nzb,    &
+               nzt, wall_flags_0
+
+    USE kinds
+
+    USE lpm_collision_kernels_mod,                                             &
+        ONLY:  init_kernels
+
+    USE netcdf_interface,                                                      &
+        ONLY:  netcdf_data_format
+
+    USE particle_attributes,                                                   &
+        ONLY:   alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,        &
+                block_offset, block_offset_def, collision_kernel,              &
+                curvature_solution_effects, density_ratio, grid_particles,     &
+                isf,i_splitting_mode, initial_weighting_factor, ibc_par_b,     &
+                ibc_par_lr, ibc_par_ns, ibc_par_t, iran_part, log_z_z0,        &
+                max_number_of_particle_groups, min_nr_particle,                &
+                number_concentration,                                          &
+                number_particles_per_gridbox,  number_of_particles,            &
+                number_of_particle_groups, number_of_sublayers,                &
+                offset_ocean_nzt, offset_ocean_nzt_m1,                         &
+                particles, particle_advection_start, particle_groups,          &
+                particle_groups_type, particles_per_point,                     &
+                particle_type, pdx, pdy, pdz,  prt_count, psb, psl, psn, psr,  &
+                pss, pst, radius, random_start_position,                       &
+                read_particles_from_restartfile, seed_follows_topography,      &
+                sgs_wf_part, sort_count, splitting_function, splitting_mode,   &
+                total_number_of_particles, use_sgs_for_particles,              &
+                write_particle_statistics, zero_particle, z0_av_global
+
+    USE pegrid
+
+    USE random_function_mod,                                                   &
+        ONLY:  random_function
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji, surf_def_h, surf_lsm_h, surf_usm_h
+
+    USE pmc_particle_interface,                                                &
+        ONLY:  pmcp_g_init
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+    INTEGER(iwp), PARAMETER         :: PHASE_INIT    = 1  !<
+    INTEGER(iwp), PARAMETER, PUBLIC :: PHASE_RELEASE = 2  !<
+
+    INTERFACE lpm_init
+       MODULE PROCEDURE lpm_init
+    END INTERFACE lpm_init
+
+    INTERFACE lpm_create_particle
+       MODULE PROCEDURE lpm_create_particle
+    END INTERFACE lpm_create_particle
+
+    PUBLIC lpm_init, lpm_create_particle
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_init
+
+    USE lpm_collision_kernels_mod,                                             &
+        ONLY:  init_kernels
+
+    USE pmc_interface,                                                         &
+        ONLY: nested_run
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                           !<
+    INTEGER(iwp) ::  j                           !<
+    INTEGER(iwp) ::  k                           !<
+
+    REAL(wp) ::  div                             !<
+    REAL(wp) ::  height_int                      !<
+    REAL(wp) ::  height_p                        !<
+    REAL(wp) ::  z_p                             !<
+    REAL(wp) ::  z0_av_local                     !<
+
+
+!
+!-- In case of oceans runs, the vertical index calculations need an offset,
+!-- because otherwise the k indices will become negative
+    IF ( ocean_mode )  THEN
+       offset_ocean_nzt    = nzt
+       offset_ocean_nzt_m1 = nzt - 1
+    ENDIF
+
+!
+!-- Define block offsets for dividing a gridcell in 8 sub cells
+!-- See documentation for List of subgrid boxes
+!-- See pack_and_sort in lpm_pack_arrays.f90 for assignment of the subgrid boxes
+    block_offset(0) = block_offset_def ( 0, 0, 0)
+    block_offset(1) = block_offset_def ( 0, 0,-1)
+    block_offset(2) = block_offset_def ( 0,-1, 0)
+    block_offset(3) = block_offset_def ( 0,-1,-1)
+    block_offset(4) = block_offset_def (-1, 0, 0)
+    block_offset(5) = block_offset_def (-1, 0,-1)
+    block_offset(6) = block_offset_def (-1,-1, 0)
+    block_offset(7) = block_offset_def (-1,-1,-1)
+!
+!-- Check the number of particle groups.
+    IF ( number_of_particle_groups > max_number_of_particle_groups )  THEN
+       WRITE( message_string, * ) 'max_number_of_particle_groups =',           &
+                                  max_number_of_particle_groups ,              &
+                                  '&number_of_particle_groups reset to ',      &
+                                  max_number_of_particle_groups
+       CALL message( 'lpm_init', 'PA0213', 0, 1, 0, 6, 0 )
+       number_of_particle_groups = max_number_of_particle_groups
+    ENDIF
+!
+!-- Check if downward-facing walls exist. This case, reflection boundary
+!-- conditions (as well as subgrid-scale velocities) may do not work
+!-- propably (not realized so far).
+    IF ( surf_def_h(1)%ns >= 1 )  THEN
+       WRITE( message_string, * ) 'Overhanging topography do not work '//      &
+                                  'with particles'
+       CALL message( 'lpm_init', 'PA0212', 0, 1, 0, 6, 0 )
+
+    ENDIF
+
+!
+!-- Set default start positions, if necessary
+    IF ( psl(1) == 9999999.9_wp )  psl(1) = 0.0_wp
+    IF ( psr(1) == 9999999.9_wp )  psr(1) = ( nx +1 ) * dx
+    IF ( pss(1) == 9999999.9_wp )  pss(1) = 0.0_wp
+    IF ( psn(1) == 9999999.9_wp )  psn(1) = ( ny +1 ) * dy
+    IF ( psb(1) == 9999999.9_wp )  psb(1) = zu(nz/2)
+    IF ( pst(1) == 9999999.9_wp )  pst(1) = psb(1)
+
+    IF ( pdx(1) == 9999999.9_wp  .OR.  pdx(1) == 0.0_wp )  pdx(1) = dx
+    IF ( pdy(1) == 9999999.9_wp  .OR.  pdy(1) == 0.0_wp )  pdy(1) = dy
+    IF ( pdz(1) == 9999999.9_wp  .OR.  pdz(1) == 0.0_wp )  pdz(1) = zu(2) - zu(1)
+
+!
+!-- If number_particles_per_gridbox is set, the parametres pdx, pdy and pdz are
+!-- calculated diagnostically. Therfore an isotropic distribution is prescribed.
+    IF ( number_particles_per_gridbox /= -1 .AND.   &
+         number_particles_per_gridbox >= 1 )    THEN
+       pdx(1) = (( dx * dy * ( zu(2) - zu(1) ) ) /  &
+             REAL(number_particles_per_gridbox))**0.3333333_wp
+!
+!--    Ensure a smooth value (two significant digits) of distance between
+!--    particles (pdx, pdy, pdz).
+       div = 1000.0_wp
+       DO  WHILE ( pdx(1) < div )
+          div = div / 10.0_wp
+       ENDDO
+       pdx(1) = NINT( pdx(1) * 100.0_wp / div ) * div / 100.0_wp
+       pdy(1) = pdx(1)
+       pdz(1) = pdx(1)
+
+    ENDIF
+
+    DO  j = 2, number_of_particle_groups
+       IF ( psl(j) == 9999999.9_wp )  psl(j) = psl(j-1)
+       IF ( psr(j) == 9999999.9_wp )  psr(j) = psr(j-1)
+       IF ( pss(j) == 9999999.9_wp )  pss(j) = pss(j-1)
+       IF ( psn(j) == 9999999.9_wp )  psn(j) = psn(j-1)
+       IF ( psb(j) == 9999999.9_wp )  psb(j) = psb(j-1)
+       IF ( pst(j) == 9999999.9_wp )  pst(j) = pst(j-1)
+       IF ( pdx(j) == 9999999.9_wp  .OR.  pdx(j) == 0.0_wp )  pdx(j) = pdx(j-1)
+       IF ( pdy(j) == 9999999.9_wp  .OR.  pdy(j) == 0.0_wp )  pdy(j) = pdy(j-1)
+       IF ( pdz(j) == 9999999.9_wp  .OR.  pdz(j) == 0.0_wp )  pdz(j) = pdz(j-1)
+    ENDDO
+
+!
+!-- Allocate arrays required for calculating particle SGS velocities.
+!-- Initialize prefactor required for stoachastic Weil equation.
+    IF ( use_sgs_for_particles  .AND.  .NOT. cloud_droplets )  THEN
+       ALLOCATE( de_dx(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &
+                 de_dy(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &
+                 de_dz(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+       sgs_wf_part = 1.0_wp / 3.0_wp
+    ENDIF
+
+!
+!-- Allocate array required for logarithmic vertical interpolation of
+!-- horizontal particle velocities between the surface and the first vertical
+!-- grid level. In order to avoid repeated CPU cost-intensive CALLS of
+!-- intrinsic FORTRAN procedure LOG(z/z0), LOG(z/z0) is precalculated for
+!-- several heights. Splitting into 20 sublayers turned out to be sufficient.
+!-- To obtain exact height levels of particles, linear interpolation is applied
+!-- (see lpm_advec.f90).
+    IF ( constant_flux_layer )  THEN
+
+       ALLOCATE ( log_z_z0(0:number_of_sublayers) )
+       z_p = zu(nzb+1) - zw(nzb)
+
+!
+!--    Calculate horizontal mean value of z0 used for logartihmic
+!--    interpolation. Note: this is not exact for heterogeneous z0.
+!--    However, sensitivity studies showed that the effect is
+!--    negligible.
+       z0_av_local  = SUM( surf_def_h(0)%z0 ) + SUM( surf_lsm_h%z0 ) +         &
+                      SUM( surf_usm_h%z0 )
+       z0_av_global = 0.0_wp
+
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE(z0_av_local, z0_av_global, 1, MPI_REAL, MPI_SUM, &
+                          comm2d, ierr )
+#else
+       z0_av_global = z0_av_local
+#endif
+
+       z0_av_global = z0_av_global  / ( ( ny + 1 ) * ( nx + 1 ) )
+!
+!--    Horizontal wind speed is zero below and at z0
+       log_z_z0(0) = 0.0_wp
+!
+!--    Calculate vertical depth of the sublayers
+       height_int  = ( z_p - z0_av_global ) / REAL( number_of_sublayers, KIND=wp )
+!
+!--    Precalculate LOG(z/z0)
+       height_p    = z0_av_global
+       DO  k = 1, number_of_sublayers
+
+          height_p    = height_p + height_int
+          log_z_z0(k) = LOG( height_p / z0_av_global )
+
+       ENDDO
+
+    ENDIF
+
+!
+!-- Check boundary condition and set internal variables
+    SELECT CASE ( bc_par_b )
+
+       CASE ( 'absorb' )
+          ibc_par_b = 1
+
+       CASE ( 'reflect' )
+          ibc_par_b = 2
+
+       CASE DEFAULT
+          WRITE( message_string, * )  'unknown boundary condition ',           &
+                                       'bc_par_b = "', TRIM( bc_par_b ), '"'
+          CALL message( 'lpm_init', 'PA0217', 1, 2, 0, 6, 0 )
+
+    END SELECT
+    SELECT CASE ( bc_par_t )
+
+       CASE ( 'absorb' )
+          ibc_par_t = 1
+
+       CASE ( 'reflect' )
+          ibc_par_t = 2
+          
+       CASE ( 'nested' )
+          ibc_par_t = 3
+
+       CASE DEFAULT
+          WRITE( message_string, * ) 'unknown boundary condition ',            &
+                                     'bc_par_t = "', TRIM( bc_par_t ), '"'
+          CALL message( 'lpm_init', 'PA0218', 1, 2, 0, 6, 0 )
+
+    END SELECT
+    SELECT CASE ( bc_par_lr )
+
+       CASE ( 'cyclic' )
+          ibc_par_lr = 0
+
+       CASE ( 'absorb' )
+          ibc_par_lr = 1
+
+       CASE ( 'reflect' )
+          ibc_par_lr = 2
+          
+       CASE ( 'nested' )
+          ibc_par_lr = 3
+
+       CASE DEFAULT
+          WRITE( message_string, * ) 'unknown boundary condition ',   &
+                                     'bc_par_lr = "', TRIM( bc_par_lr ), '"'
+          CALL message( 'lpm_init', 'PA0219', 1, 2, 0, 6, 0 )
+
+    END SELECT
+    SELECT CASE ( bc_par_ns )
+
+       CASE ( 'cyclic' )
+          ibc_par_ns = 0
+
+       CASE ( 'absorb' )
+          ibc_par_ns = 1
+
+       CASE ( 'reflect' )
+          ibc_par_ns = 2
+          
+       CASE ( 'nested' )
+          ibc_par_ns = 3
+
+       CASE DEFAULT
+          WRITE( message_string, * ) 'unknown boundary condition ',   &
+                                     'bc_par_ns = "', TRIM( bc_par_ns ), '"'
+          CALL message( 'lpm_init', 'PA0220', 1, 2, 0, 6, 0 )
+
+    END SELECT
+    SELECT CASE ( splitting_mode )
+
+       CASE ( 'const' )
+          i_splitting_mode = 1
+
+       CASE ( 'cl_av' )
+          i_splitting_mode = 2
+
+       CASE ( 'gb_av' )
+          i_splitting_mode = 3
+
+       CASE DEFAULT
+          WRITE( message_string, * )  'unknown splitting_mode = "',            &
+                                      TRIM( splitting_mode ), '"'
+          CALL message( 'lpm_init', 'PA0146', 1, 2, 0, 6, 0 )
+
+    END SELECT
+    SELECT CASE ( splitting_function )
+
+       CASE ( 'gamma' )
+          isf = 1
+
+       CASE ( 'log' )
+          isf = 2
+
+       CASE ( 'exp' )
+          isf = 3
+
+       CASE DEFAULT
+          WRITE( message_string, * )  'unknown splitting function = "',        &
+                                       TRIM( splitting_function ), '"'
+          CALL message( 'lpm_init', 'PA0147', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+
+!
+!-- Initialize collision kernels
+    IF ( collision_kernel /= 'none' )  CALL init_kernels
+
+!
+!-- For the first model run of a possible job chain initialize the
+!-- particles, otherwise read the particle data from restart file.
+    IF ( TRIM( initializing_actions ) == 'read_restart_data'  &
+         .AND.  read_particles_from_restartfile )  THEN
+
+       CALL lpm_read_restart_file
+
+    ELSE
+
+!
+!--    Allocate particle arrays and set attributes of the initial set of
+!--    particles, which can be also periodically released at later times.
+       ALLOCATE( prt_count(nzb:nzt+1,nysg:nyng,nxlg:nxrg), &
+                 grid_particles(nzb+1:nzt,nys:nyn,nxl:nxr) )
+
+       number_of_particles         = 0
+
+       sort_count = 0
+       prt_count  = 0
+
+!
+!--    initialize counter for particle IDs
+       grid_particles%id_counter = 1
+
+!
+!--    Initialize all particles with dummy values (otherwise errors may
+!--    occur within restart runs). The reason for this is still not clear
+!--    and may be presumably caused by errors in the respective user-interface.
+       zero_particle = particle_type( 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,  &
+                                      0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,  &
+                                      0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,  &
+                                      0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,  &
+                                      0, 0, 0_idp, .FALSE., -1 )
+
+       particle_groups = particle_groups_type( 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp )
+
+!
+!--    Set values for the density ratio and radius for all particle
+!--    groups, if necessary
+       IF ( density_ratio(1) == 9999999.9_wp )  density_ratio(1) = 0.0_wp
+       IF ( radius(1)        == 9999999.9_wp )  radius(1) = 0.0_wp
+       DO  i = 2, number_of_particle_groups
+          IF ( density_ratio(i) == 9999999.9_wp )  THEN
+             density_ratio(i) = density_ratio(i-1)
+          ENDIF
+          IF ( radius(i) == 9999999.9_wp )  radius(i) = radius(i-1)
+       ENDDO
+
+       DO  i = 1, number_of_particle_groups
+          IF ( density_ratio(i) /= 0.0_wp  .AND.  radius(i) == 0 )  THEN
+             WRITE( message_string, * ) 'particle group #', i, ' has a',       &
+                                        'density ratio /= 0 but radius = 0'
+             CALL message( 'lpm_init', 'PA0215', 1, 2, 0, 6, 0 )
+          ENDIF
+          particle_groups(i)%density_ratio = density_ratio(i)
+          particle_groups(i)%radius        = radius(i)
+       ENDDO
+
+!
+!--    Set a seed value for the random number generator to be exclusively
+!--    used for the particle code. The generated random numbers should be
+!--    different on the different PEs.
+       iran_part = iran_part + myid
+
+       CALL lpm_create_particle (PHASE_INIT)
+!
+!--    User modification of initial particles
+       CALL user_lpm_init
+
+!
+!--    Open file for statistical informations about particle conditions
+       IF ( write_particle_statistics )  THEN
+          CALL check_open( 80 )
+          WRITE ( 80, 8000 )  current_timestep_number, simulated_time,         &
+                              number_of_particles
+          CALL close_file( 80 )
+       ENDIF
+
+    ENDIF
+
+    IF ( nested_run )  CALL pmcp_g_init
+
+!
+!-- To avoid programm abort, assign particles array to the local version of
+!-- first grid cell
+    number_of_particles = prt_count(nzb+1,nys,nxl)
+    particles => grid_particles(nzb+1,nys,nxl)%particles(1:number_of_particles)
+!
+!-- Formats
+8000 FORMAT (I6,1X,F7.2,4X,I10,71X,I10)
+
+ END SUBROUTINE lpm_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_create_particle (phase)
+    
+    USE arrays_3d,                                                             &
+       ONLY:  zw
+    USE lpm_exchange_horiz_mod,                                                &
+        ONLY: lpm_exchange_horiz, lpm_move_particle, realloc_particles_array
+
+    USE lpm_pack_and_sort_mod,                                                 &
+        ONLY: lpm_sort_in_subboxes
+
+    USE particle_attributes,                                                   &
+        ONLY: deleted_particles
+
+    IMPLICIT  NONE
+
+    INTEGER(iwp)               ::  alloc_size  !< relative increase of allocated memory for particles
+    INTEGER(iwp)               ::  i           !< loop variable ( particle groups )
+    INTEGER(iwp)               ::  ip          !< index variable along x
+    INTEGER(iwp)               ::  j           !< loop variable ( particles per point )
+    INTEGER(iwp)               ::  jp          !< index variable along y
+    INTEGER(iwp)               ::  k           !< index variable along z
+    INTEGER(iwp)               ::  k_surf      !< index of surface grid point
+    INTEGER(iwp)               ::  kp          !< index variable along z
+    INTEGER(iwp)               ::  loop_stride !< loop variable for initialization
+    INTEGER(iwp)               ::  n           !< loop variable ( number of particles )
+    INTEGER(iwp)               ::  new_size    !< new size of allocated memory for particles
+
+    INTEGER(iwp), INTENT(IN)   ::  phase       !< mode of inititialization
+
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  local_count !< start address of new particle
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  local_start !< start address of new particle
+
+    LOGICAL                    ::  first_stride !< flag for initialization
+
+    REAL(wp)                   ::  pos_x      !< increment for particle position in x
+    REAL(wp)                   ::  pos_y      !< increment for particle position in y
+    REAL(wp)                   ::  pos_z      !< increment for particle position in z
+    REAL(wp)                   ::  rand_contr !< dummy argument for random position
+
+    TYPE(particle_type),TARGET ::  tmp_particle !< temporary particle used for initialization
+
+!
+!-- Calculate particle positions and store particle attributes, if
+!-- particle is situated on this PE
+    DO  loop_stride = 1, 2
+       first_stride = (loop_stride == 1)
+       IF ( first_stride )   THEN
+          local_count = 0           ! count number of particles
+       ELSE
+          local_count = prt_count   ! Start address of new particles
+       ENDIF
+
+!
+!--    Calculate initial_weighting_factor diagnostically
+       IF ( number_concentration /= -1.0_wp .AND. number_concentration > 0.0_wp ) THEN
+          initial_weighting_factor =  number_concentration * 1.0E6_wp *             &
+                                      pdx(1) * pdy(1) * pdz(1)
+       END IF
+
+       n = 0
+       DO  i = 1, number_of_particle_groups
+
+          pos_z = psb(i)
+
+          DO WHILE ( pos_z <= pst(i) )
+
+             IF ( pos_z >= zw(0) .AND.  pos_z < zw(nzt) )  THEN
+
+
+                pos_y = pss(i)
+
+                DO WHILE ( pos_y <= psn(i) )
+
+                   IF ( pos_y >= nys * dy  .AND.                  &
+                        pos_y <  ( nyn + 1 ) * dy  ) THEN
+
+                      pos_x = psl(i)
+
+               xloop: DO WHILE ( pos_x <= psr(i) )
+
+                         IF ( pos_x >= nxl * dx  .AND.            &
+                              pos_x <  ( nxr + 1) * dx ) THEN
+
+                            DO  j = 1, particles_per_point
+
+
+                               n = n + 1
+                               tmp_particle%x             = pos_x
+                               tmp_particle%y             = pos_y
+                               tmp_particle%z             = pos_z
+                               tmp_particle%age           = 0.0_wp
+                               tmp_particle%age_m         = 0.0_wp
+                               tmp_particle%dt_sum        = 0.0_wp
+                               tmp_particle%e_m           = 0.0_wp
+                               tmp_particle%rvar1         = 0.0_wp
+                               tmp_particle%rvar2         = 0.0_wp
+                               tmp_particle%rvar3         = 0.0_wp
+                               tmp_particle%speed_x       = 0.0_wp
+                               tmp_particle%speed_y       = 0.0_wp
+                               tmp_particle%speed_z       = 0.0_wp
+                               tmp_particle%origin_x      = pos_x
+                               tmp_particle%origin_y      = pos_y
+                               tmp_particle%origin_z      = pos_z
+                               IF ( curvature_solution_effects )  THEN
+                                  tmp_particle%aux1      = 0.0_wp    ! dry aerosol radius
+                                  tmp_particle%aux2      = dt_3d     ! last Rosenbrock timestep
+                               ELSE
+                                  tmp_particle%aux1      = 0.0_wp    ! free to use
+                                  tmp_particle%aux2      = 0.0_wp    ! free to use
+                               ENDIF
+                               tmp_particle%radius        = particle_groups(i)%radius
+                               tmp_particle%weight_factor = initial_weighting_factor
+                               tmp_particle%class         = 1
+                               tmp_particle%group         = i
+                               tmp_particle%id            = 0_idp
+                               tmp_particle%particle_mask = .TRUE.
+                               tmp_particle%block_nr      = -1
+!
+!--                            Determine the grid indices of the particle position
+                               ip = tmp_particle%x * ddx
+                               jp = tmp_particle%y * ddy
+                               kp = tmp_particle%z / dz(1) + 1 + offset_ocean_nzt                               
+                               DO WHILE( zw(kp) < tmp_particle%z ) 
+                                  kp = kp + 1
+                               ENDDO
+                               DO WHILE( zw(kp-1) > tmp_particle%z )
+                                  kp = kp - 1
+                               ENDDO 
+!
+!--                            Determine surface level. Therefore, check for
+!--                            upward-facing wall on w-grid. 
+                               k_surf = get_topography_top_index_ji( jp, ip, 'w' )
+
+                               IF ( seed_follows_topography )  THEN
+!
+!--                               Particle height is given relative to topography
+                                  kp = kp + k_surf
+                                  tmp_particle%z = tmp_particle%z + zw(k_surf)
+!--                               Skip particle release if particle position is
+!--                               above model top, or within topography in case
+!--                               of overhanging structures.
+                                  IF ( kp > nzt  .OR.                          &
+                                 .NOT. BTEST( wall_flags_0(kp,jp,ip), 0 ) )  THEN
+                                     pos_x = pos_x + pdx(i)
+                                     CYCLE xloop
+                                  ENDIF
+!
+!--                            Skip particle release if particle position is
+!--                            below surface, or within topography in case
+!--                            of overhanging structures.
+                               ELSEIF ( .NOT. seed_follows_topography .AND.    &
+                                         tmp_particle%z <= zw(k_surf)  .OR.    &
+                                        .NOT. BTEST( wall_flags_0(kp,jp,ip), 0 ) )&
+                               THEN
+                                  pos_x = pos_x + pdx(i)
+                                  CYCLE xloop
+                               ENDIF
+
+                               local_count(kp,jp,ip) = local_count(kp,jp,ip) + 1
+
+                               IF ( .NOT. first_stride )  THEN
+                                  IF ( ip < nxl  .OR.  jp < nys  .OR.  kp < nzb+1 )  THEN
+                                     write(6,*) 'xl ',ip,jp,kp,nxl,nys,nzb+1
+                                  ENDIF
+                                  IF ( ip > nxr  .OR.  jp > nyn  .OR.  kp > nzt )  THEN
+                                     write(6,*) 'xu ',ip,jp,kp,nxr,nyn,nzt
+                                  ENDIF
+                                  grid_particles(kp,jp,ip)%particles(local_count(kp,jp,ip)) = tmp_particle
+
+                               ENDIF
+                            ENDDO
+
+                         ENDIF
+
+                         pos_x = pos_x + pdx(i)
+
+                      ENDDO xloop
+
+                   ENDIF
+
+                   pos_y = pos_y + pdy(i)
+
+                ENDDO
+
+             ENDIF
+
+             pos_z = pos_z + pdz(i)
+
+          ENDDO
+
+       ENDDO
+
+       IF ( first_stride )  THEN
+          DO  ip = nxl, nxr
+             DO  jp = nys, nyn
+                DO  kp = nzb+1, nzt
+                   IF ( phase == PHASE_INIT )  THEN
+                      IF ( local_count(kp,jp,ip) > 0 )  THEN
+                         alloc_size = MAX( INT( local_count(kp,jp,ip) *        &
+                            ( 1.0_wp + alloc_factor / 100.0_wp ) ),            &
+                            min_nr_particle )
+                      ELSE
+                         alloc_size = min_nr_particle
+                      ENDIF
+                      ALLOCATE(grid_particles(kp,jp,ip)%particles(1:alloc_size))
+                      DO  n = 1, alloc_size
+                         grid_particles(kp,jp,ip)%particles(n) = zero_particle
+                      ENDDO
+                   ELSEIF ( phase == PHASE_RELEASE )  THEN
+                      IF ( local_count(kp,jp,ip) > 0 )  THEN
+                         new_size   = local_count(kp,jp,ip) + prt_count(kp,jp,ip)
+                         alloc_size = MAX( INT( new_size * ( 1.0_wp +          &
+                            alloc_factor / 100.0_wp ) ), min_nr_particle )
+                         IF( alloc_size > SIZE( grid_particles(kp,jp,ip)%particles) )  THEN
+                            CALL realloc_particles_array(ip,jp,kp,alloc_size)
+                         ENDIF
+                      ENDIF
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+    ENDDO
+
+
+
+    local_start = prt_count+1
+    prt_count   = local_count
+
+!
+!-- Calculate particle IDs
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+
+             DO  n = local_start(kp,jp,ip), number_of_particles  !only new particles
+
+                particles(n)%id = 10000_idp**3 * grid_particles(kp,jp,ip)%id_counter + &
+                                  10000_idp**2 * kp + 10000_idp * jp + ip
+!
+!--             Count the number of particles that have been released before
+                grid_particles(kp,jp,ip)%id_counter =                          &
+                                         grid_particles(kp,jp,ip)%id_counter + 1
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Initialize aerosol background spectrum
+    IF ( curvature_solution_effects )  THEN
+       CALL lpm_init_aerosols(local_start)
+    ENDIF
+
+!
+!-- Add random fluctuation to particle positions.
+    IF ( random_start_position )  THEN
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             DO  kp = nzb+1, nzt
+                number_of_particles = prt_count(kp,jp,ip)
+                IF ( number_of_particles <= 0 )  CYCLE
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+!
+!--             Move only new particles. Moreover, limit random fluctuation
+!--             in order to prevent that particles move more than one grid box,
+!--             which would lead to problems concerning particle exchange
+!--             between processors in case pdx/pdy are larger than dx/dy,
+!--             respectively.
+                DO  n = local_start(kp,jp,ip), number_of_particles
+                   IF ( psl(particles(n)%group) /= psr(particles(n)%group) )  THEN
+                      rand_contr = ( random_function( iran_part ) - 0.5_wp ) * &
+                                     pdx(particles(n)%group)
+                      particles(n)%x = particles(n)%x +                        &
+                              MERGE( rand_contr, SIGN( dx, rand_contr ),       &
+                                     ABS( rand_contr ) < dx                    &
+                                   )
+                   ENDIF
+                   IF ( pss(particles(n)%group) /= psn(particles(n)%group) )  THEN
+                      rand_contr = ( random_function( iran_part ) - 0.5_wp ) * &
+                                     pdy(particles(n)%group)
+                      particles(n)%y = particles(n)%y +                        &
+                              MERGE( rand_contr, SIGN( dy, rand_contr ),       &
+                                     ABS( rand_contr ) < dy                    &
+                                   )
+                   ENDIF
+                   IF ( psb(particles(n)%group) /= pst(particles(n)%group) )  THEN
+                      rand_contr = ( random_function( iran_part ) - 0.5_wp ) * &
+                                     pdz(particles(n)%group)
+                      particles(n)%z = particles(n)%z +                        &
+                              MERGE( rand_contr, SIGN( dzw(kp), rand_contr ),  &
+                                     ABS( rand_contr ) < dzw(kp)               &
+                                   )
+                   ENDIF
+                ENDDO
+!
+!--             Identify particles located outside the model domain and reflect
+!--             or absorb them if necessary.
+                CALL lpm_boundary_conds( 'bottom/top', i, j, k )
+!
+!--             Furthermore, remove particles located in topography. Note, as
+!--             the particle speed is still zero at this point, wall
+!--             reflection boundary conditions will not work in this case.
+                particles =>                                                   &
+                       grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                DO  n = local_start(kp,jp,ip), number_of_particles
+                   i = particles(n)%x * ddx
+                   j = particles(n)%y * ddy
+                   k = particles(n)%z / dz(1) + 1 + offset_ocean_nzt
+                   DO WHILE( zw(k) < particles(n)%z )
+                      k = k + 1
+                   ENDDO
+                   DO WHILE( zw(k-1) > particles(n)%z )
+                      k = k - 1
+                   ENDDO
+!
+!--                Check if particle is within topography
+                   IF ( .NOT. BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+                      particles(n)%particle_mask = .FALSE.
+                      deleted_particles = deleted_particles + 1
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Exchange particles between grid cells and processors
+       CALL lpm_move_particle
+       CALL lpm_exchange_horiz
+
+    ENDIF
+!
+!-- In case of random_start_position, delete particles identified by
+!-- lpm_exchange_horiz and lpm_boundary_conds. Then sort particles into blocks,
+!-- which is needed for a fast interpolation of the LES fields on the particle
+!-- position.
+    CALL lpm_sort_in_subboxes
+
+!
+!-- Determine the current number of particles
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles         = number_of_particles                 &
+                                           + prt_count(kp,jp,ip)
+          ENDDO
+       ENDDO
+    ENDDO
+!
+!-- Calculate the number of particles of the total domain
+#if defined( __parallel )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( number_of_particles, total_number_of_particles, 1, &
+    MPI_INTEGER, MPI_SUM, comm2d, ierr )
+#else
+    total_number_of_particles = number_of_particles
+#endif
+
+    RETURN
+
+ END SUBROUTINE lpm_create_particle
+
+ SUBROUTINE lpm_init_aerosols(local_start)
+
+    USE arrays_3d,                                                             &
+        ONLY: hyp, pt, q, exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY: molecular_weight_of_solute, molecular_weight_of_water, magnus,   &
+              pi, rd_d_rv, rho_l, r_v, rho_s, vanthoff
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY: aero_species, aero_type, aero_weight, log_sigma, na, rm
+
+    IMPLICIT NONE
+
+    REAL(wp)  :: afactor            !< curvature effects
+    REAL(wp)  :: bfactor            !< solute effects
+    REAL(wp)  :: dlogr              !< logarithmic width of radius bin
+    REAL(wp)  :: e_a                !< vapor pressure
+    REAL(wp)  :: e_s                !< saturation vapor pressure
+    REAL(wp)  :: rmin = 0.005e-6_wp !< minimum aerosol radius
+    REAL(wp)  :: rmax = 10.0e-6_wp  !< maximum aerosol radius
+    REAL(wp)  :: r_mid              !< mean radius of bin
+    REAL(wp)  :: r_l                !< left radius of bin
+    REAL(wp)  :: r_r                !< right radius of bin
+    REAL(wp)  :: sigma              !< surface tension
+    REAL(wp)  :: t_int              !< temperature
+
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(IN) ::  local_start !<
+
+    INTEGER(iwp)  :: n              !<
+    INTEGER(iwp)  :: ip             !<
+    INTEGER(iwp)  :: jp             !<
+    INTEGER(iwp)  :: kp             !<
+
+!
+!-- Set constants for different aerosol species
+    IF ( TRIM(aero_species) .EQ. 'nacl' ) THEN
+       molecular_weight_of_solute = 0.05844_wp 
+       rho_s                      = 2165.0_wp
+       vanthoff                   = 2.0_wp
+    ELSEIF ( TRIM(aero_species) .EQ. 'c3h4o4' ) THEN
+       molecular_weight_of_solute = 0.10406_wp 
+       rho_s                      = 1600.0_wp
+       vanthoff                   = 1.37_wp
+    ELSEIF ( TRIM(aero_species) .EQ. 'nh4o3' ) THEN
+       molecular_weight_of_solute = 0.08004_wp 
+       rho_s                      = 1720.0_wp
+       vanthoff                   = 2.31_wp
+    ELSE
+       WRITE( message_string, * ) 'unknown aerosol species ',   &
+                                'aero_species = "', TRIM( aero_species ), '"'
+       CALL message( 'lpm_init', 'PA0470', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- The following typical aerosol spectra are taken from Jaenicke (1993):
+!-- Tropospheric aerosols. Published in Aerosol-Cloud-Climate Interactions.
+    IF ( TRIM(aero_type) .EQ. 'polar' )  THEN
+       na        = (/ 2.17e1, 1.86e-1, 3.04e-4 /) * 1.0E6
+       rm        = (/ 0.0689, 0.375, 4.29 /) * 1.0E-6
+       log_sigma = (/ 0.245, 0.300, 0.291 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'background' )  THEN
+       na        = (/ 1.29e2, 5.97e1, 6.35e1 /) * 1.0E6
+       rm        = (/ 0.0036, 0.127, 0.259 /) * 1.0E-6
+       log_sigma = (/ 0.645, 0.253, 0.425 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'maritime' )  THEN
+       na        = (/ 1.33e2, 6.66e1, 3.06e0 /) * 1.0E6
+       rm        = (/ 0.0039, 0.133, 0.29 /) * 1.0E-6
+       log_sigma = (/ 0.657, 0.210, 0.396 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'continental' )  THEN
+       na        = (/ 3.20e3, 2.90e3, 3.00e-1 /) * 1.0E6
+       rm        = (/ 0.01, 0.058, 0.9 /) * 1.0E-6
+       log_sigma = (/ 0.161, 0.217, 0.380 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'desert' )  THEN
+       na        = (/ 7.26e2, 1.14e3, 1.78e-1 /) * 1.0E6
+       rm        = (/ 0.001, 0.0188, 10.8 /) * 1.0E-6
+       log_sigma = (/ 0.247, 0.770, 0.438 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'rural' )  THEN
+       na        = (/ 6.65e3, 1.47e2, 1.99e3 /) * 1.0E6
+       rm        = (/ 0.00739, 0.0269, 0.0419 /) * 1.0E-6
+       log_sigma = (/ 0.225, 0.557, 0.266 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'urban' )  THEN
+       na        = (/ 9.93e4, 1.11e3, 3.64e4 /) * 1.0E6
+       rm        = (/ 0.00651, 0.00714, 0.0248 /) * 1.0E-6
+       log_sigma = (/ 0.245, 0.666, 0.337 /)
+    ELSEIF ( TRIM(aero_type) .EQ. 'user' )  THEN
+       CONTINUE
+    ELSE
+       WRITE( message_string, * ) 'unknown aerosol type ',   &
+                                'aero_type = "', TRIM( aero_type ), '"'
+       CALL message( 'lpm_init', 'PA0459', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+
+             dlogr   = ( LOG10(rmax) - LOG10(rmin) ) / ( number_of_particles - local_start(kp,jp,ip) + 1 )
+!
+!--          Initialize the aerosols with a predefined spectral distribution
+!--          of the dry radius (logarithmically increasing bins) and a varying
+!--          weighting factor
+             DO  n = local_start(kp,jp,ip), number_of_particles  !only new particles
+
+                r_l   = 10.0**( LOG10( rmin ) + (n-1) * dlogr )
+                r_r   = 10.0**( LOG10( rmin ) + n * dlogr )
+                r_mid = SQRT( r_l * r_r )
+
+                particles(n)%aux1          = r_mid
+                particles(n)%weight_factor =                                           &
+                   ( na(1) / ( SQRT( 2.0 * pi ) * log_sigma(1) ) *                     &
+                     EXP( - LOG10( r_mid / rm(1) )**2 / ( 2.0 * log_sigma(1)**2 ) ) +  &
+                     na(2) / ( SQRT( 2.0 * pi ) * log_sigma(2) ) *                     &
+                     EXP( - LOG10( r_mid / rm(2) )**2 / ( 2.0 * log_sigma(2)**2 ) ) +  &
+                     na(3) / ( SQRT( 2.0 * pi ) * log_sigma(3) ) *                     &
+                     EXP( - LOG10( r_mid / rm(3) )**2 / ( 2.0 * log_sigma(3)**2 ) )    &
+                   ) * ( LOG10(r_r) - LOG10(r_l) ) * ( dx * dy * dzw(kp) )
+
+!
+!--             Multiply weight_factor with the namelist parameter aero_weight
+!--             to increase or decrease the number of simulated aerosols
+                particles(n)%weight_factor = particles(n)%weight_factor * aero_weight
+
+                IF ( particles(n)%weight_factor - FLOOR(particles(n)%weight_factor,KIND=wp) &
+                     .GT. random_function( iran_part ) )  THEN
+                   particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp) + 1.0
+                ELSE
+                   particles(n)%weight_factor = FLOOR(particles(n)%weight_factor,KIND=wp)
+                ENDIF
+!
+!--             Unnecessary particles will be deleted
+                IF ( particles(n)%weight_factor .LE. 0.0 )  particles(n)%particle_mask = .FALSE.
+
+             ENDDO
+!
+!--          Set particle radius to equilibrium radius based on the environmental
+!--          supersaturation (Khvorostyanov and Curry, 2007, JGR). This avoids
+!--          the sometimes lengthy growth toward their equilibrium radius within
+!--          the simulation.
+             t_int  = pt(kp,jp,ip) * exner(kp)
+
+             e_s = magnus( t_int )
+             e_a = q(kp,jp,ip) * hyp(kp) / ( q(kp,jp,ip) + rd_d_rv )
+
+             sigma   = 0.0761_wp - 0.000155_wp * ( t_int - 273.15_wp )
+             afactor = 2.0_wp * sigma / ( rho_l * r_v * t_int )
+
+             bfactor = vanthoff * molecular_weight_of_water *    &
+                       rho_s / ( molecular_weight_of_solute * rho_l )
+!
+!--          The formula is only valid for subsaturated environments. For
+!--          supersaturations higher than -5 %, the supersaturation is set to -5%.
+             IF ( e_a / e_s >= 0.95_wp )  e_a = 0.95_wp * e_s
+
+             DO  n = local_start(kp,jp,ip), number_of_particles  !only new particles
+!
+!--             For details on this equation, see Eq. (14) of Khvorostyanov and
+!--             Curry (2007, JGR)
+                particles(n)%radius = bfactor**0.3333333_wp *                  &
+                   particles(n)%aux1 / ( 1.0_wp - e_a / e_s )**0.3333333_wp / &
+                   ( 1.0_wp + ( afactor / ( 3.0_wp * bfactor**0.3333333_wp *   &
+                     particles(n)%aux1 ) ) /                                  &
+                     ( 1.0_wp - e_a / e_s )**0.6666666_wp                      &
+                   )
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE lpm_init_aerosols
+
+END MODULE lpm_init_mod
Index: /palm/tags/release-6.0/SOURCE/lpm_init_sgs_tke.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_init_sgs_tke.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_init_sgs_tke.f90	(revision 3477)
@@ -0,0 +1,310 @@
+!> @file lpm_init_sgs_tke.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments according to new topography realization
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! sgs_wfu_par, sgs_wfv_par and sgs_wfw_par are replaced by sgs_wf_par
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+! Kind definition added to all floating point numbers.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Calculates quantities required for considering the SGS velocity fluctuations
+!> in the particle transport by a stochastic approach. The respective
+!> quantities are: SGS-TKE gradients and horizontally averaged profiles of the
+!> SGS TKE and the resolved-scale velocity variances. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_init_sgs_tke
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  de_dx, de_dy, de_dz, diss, e, u, v, w, zu
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, ngp_2dh_outer, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  sgs_wf_part
+
+    USE pegrid
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, hom, sums, sums_l
+
+    USE surface_mod,                                                           &
+        ONLY:  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i      !< index variable along x
+    INTEGER(iwp) ::  j      !< index variable along y
+    INTEGER(iwp) ::  k      !< index variable along z
+    INTEGER(iwp) ::  m      !< running index for the surface elements 
+
+    REAL(wp) ::  flag1      !< flag to mask topography
+
+!
+!-- TKE gradient along x and y
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb, nzt+1
+
+             IF ( .NOT. BTEST( wall_flags_0(k,j,i-1), 0 )  .AND.               &
+                        BTEST( wall_flags_0(k,j,i), 0   )  .AND.               &
+                        BTEST( wall_flags_0(k,j,i+1), 0 ) )                    &
+             THEN
+                de_dx(k,j,i) = 2.0_wp * sgs_wf_part *                          &
+                               ( e(k,j,i+1) - e(k,j,i) ) * ddx
+             ELSEIF ( BTEST( wall_flags_0(k,j,i-1), 0 )  .AND.                 &
+                      BTEST( wall_flags_0(k,j,i), 0   )  .AND.                 &
+                .NOT. BTEST( wall_flags_0(k,j,i+1), 0 ) )                      &
+             THEN
+                de_dx(k,j,i) = 2.0_wp * sgs_wf_part *                          &
+                               ( e(k,j,i) - e(k,j,i-1) ) * ddx
+             ELSEIF ( .NOT. BTEST( wall_flags_0(k,j,i), 22   )  .AND.          &
+                      .NOT. BTEST( wall_flags_0(k,j,i+1), 22 ) )               &   
+             THEN
+                de_dx(k,j,i) = 0.0_wp
+             ELSEIF ( .NOT. BTEST( wall_flags_0(k,j,i-1), 22 )  .AND.          &
+                      .NOT. BTEST( wall_flags_0(k,j,i), 22   ) )               &
+             THEN
+                de_dx(k,j,i) = 0.0_wp
+             ELSE
+                de_dx(k,j,i) = sgs_wf_part * ( e(k,j,i+1) - e(k,j,i-1) ) * ddx
+             ENDIF
+
+             IF ( .NOT. BTEST( wall_flags_0(k,j-1,i), 0 )  .AND.               &
+                        BTEST( wall_flags_0(k,j,i), 0   )  .AND.               &
+                        BTEST( wall_flags_0(k,j+1,i), 0 ) )                    &
+             THEN
+                de_dy(k,j,i) = 2.0_wp * sgs_wf_part *                          &
+                               ( e(k,j+1,i) - e(k,j,i) ) * ddy
+             ELSEIF ( BTEST( wall_flags_0(k,j-1,i), 0 )  .AND.                 &
+                      BTEST( wall_flags_0(k,j,i), 0   )  .AND.                 &
+                .NOT. BTEST( wall_flags_0(k,j+1,i), 0 ) )                      &
+             THEN
+                de_dy(k,j,i) = 2.0_wp * sgs_wf_part *                          &
+                               ( e(k,j,i) - e(k,j-1,i) ) * ddy
+             ELSEIF ( .NOT. BTEST( wall_flags_0(k,j,i), 22   )  .AND.          &
+                      .NOT. BTEST( wall_flags_0(k,j+1,i), 22 ) )               &   
+             THEN
+                de_dy(k,j,i) = 0.0_wp
+             ELSEIF ( .NOT. BTEST( wall_flags_0(k,j-1,i), 22 )  .AND.          &
+                      .NOT. BTEST( wall_flags_0(k,j,i), 22   ) )               &
+             THEN
+                de_dy(k,j,i) = 0.0_wp
+             ELSE
+                de_dy(k,j,i) = sgs_wf_part * ( e(k,j+1,i) - e(k,j-1,i) ) * ddy
+             ENDIF
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- TKE gradient along z at topograhy and  including bottom and top boundary conditions
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt-1
+!
+!--          Flag to mask topography
+             flag1 = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0  ) )
+
+             de_dz(k,j,i) = 2.0_wp * sgs_wf_part *                             &
+                           ( e(k+1,j,i) - e(k-1,j,i) ) / ( zu(k+1) - zu(k-1) ) &
+                                                 * flag1 
+          ENDDO
+!
+!--       upward-facing surfaces
+          DO  m = bc_h(0)%start_index(j,i), bc_h(0)%end_index(j,i)
+             k            = bc_h(0)%k(m)
+             de_dz(k,j,i) = 2.0_wp * sgs_wf_part *                             &
+                           ( e(k+1,j,i) - e(k,j,i)   ) / ( zu(k+1) - zu(k) )
+          ENDDO
+!
+!--       downward-facing surfaces
+          DO  m = bc_h(1)%start_index(j,i), bc_h(1)%end_index(j,i)
+             k            = bc_h(1)%k(m)
+             de_dz(k,j,i) = 2.0_wp * sgs_wf_part *                             &
+                           ( e(k,j,i) - e(k-1,j,i)   ) / ( zu(k) - zu(k-1) )
+          ENDDO
+
+          de_dz(nzb,j,i)   = 0.0_wp
+          de_dz(nzt,j,i)   = 0.0_wp
+          de_dz(nzt+1,j,i) = 0.0_wp
+       ENDDO
+    ENDDO
+!
+!-- Ghost point exchange
+    CALL exchange_horiz( de_dx, nbgp )
+    CALL exchange_horiz( de_dy, nbgp )
+    CALL exchange_horiz( de_dz, nbgp )
+    CALL exchange_horiz( diss, nbgp  )
+
+
+!
+!-- Calculate the horizontally averaged profiles of SGS TKE and resolved
+!-- velocity variances (they may have been already calculated in routine
+!-- flow_statistics).
+    IF ( .NOT. flow_statistics_called )  THEN
+
+!
+!--    First calculate horizontally averaged profiles of the horizontal
+!--    velocities.
+       sums_l(:,1,0) = 0.0_wp
+       sums_l(:,2,0) = 0.0_wp
+
+       DO  i = nxl, nxr
+          DO  j =  nys, nyn
+             DO  k = nzb, nzt+1
+!
+!--             Flag indicating vicinity of wall
+                flag1 = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 24 ) )
+
+                sums_l(k,1,0)  = sums_l(k,1,0)  + u(k,j,i) * flag1
+                sums_l(k,2,0)  = sums_l(k,2,0)  + v(k,j,i) * flag1
+             ENDDO
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+!
+!--    Compute total sum from local sums
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,1,0), sums(nzb,1), nzt+2-nzb, &
+                           MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,2,0), sums(nzb,2), nzt+2-nzb, &
+                              MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+       sums(:,1) = sums_l(:,1,0)
+       sums(:,2) = sums_l(:,2,0)
+#endif
+
+!
+!--    Final values are obtained by division by the total number of grid
+!--    points used for the summation.
+       hom(:,1,1,0) = sums(:,1) / ngp_2dh_outer(:,0)   ! u
+       hom(:,1,2,0) = sums(:,2) / ngp_2dh_outer(:,0)   ! v
+
+!
+!--    Now calculate the profiles of SGS TKE and the resolved-scale
+!--    velocity variances
+       sums_l(:,8,0)  = 0.0_wp
+       sums_l(:,30,0) = 0.0_wp
+       sums_l(:,31,0) = 0.0_wp
+       sums_l(:,32,0) = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb, nzt+1
+!
+!--             Flag indicating vicinity of wall
+                flag1 = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 24 ) )
+
+                sums_l(k,8,0)  = sums_l(k,8,0)  + e(k,j,i)                       * flag1
+                sums_l(k,30,0) = sums_l(k,30,0) + ( u(k,j,i) - hom(k,1,1,0) )**2 * flag1
+                sums_l(k,31,0) = sums_l(k,31,0) + ( v(k,j,i) - hom(k,1,2,0) )**2 * flag1
+                sums_l(k,32,0) = sums_l(k,32,0) + w(k,j,i)**2                    * flag1
+             ENDDO
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+!
+!--    Compute total sum from local sums
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,8,0), sums(nzb,8), nzt+2-nzb, &
+                           MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,30,0), sums(nzb,30), nzt+2-nzb, &
+                           MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,31,0), sums(nzb,31), nzt+2-nzb, &
+                           MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,32,0), sums(nzb,32), nzt+2-nzb, &
+                           MPI_REAL, MPI_SUM, comm2d, ierr )
+
+#else
+       sums(:,8)  = sums_l(:,8,0)
+       sums(:,30) = sums_l(:,30,0)
+       sums(:,31) = sums_l(:,31,0)
+       sums(:,32) = sums_l(:,32,0)
+#endif
+
+!
+!--    Final values are obtained by division by the total number of grid
+!--    points used for the summation.
+       hom(:,1,8,0)  = sums(:,8)  / ngp_2dh_outer(:,0)   ! e
+       hom(:,1,30,0) = sums(:,30) / ngp_2dh_outer(:,0)   ! u*2
+       hom(:,1,31,0) = sums(:,31) / ngp_2dh_outer(:,0)   ! v*2 
+       hom(:,1,32,0) = sums(:,32) / ngp_2dh_outer(:,0)   ! w*2
+
+    ENDIF
+
+ END SUBROUTINE lpm_init_sgs_tke
Index: /palm/tags/release-6.0/SOURCE/lpm_merging.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_merging.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_merging.f90	(revision 3477)
@@ -0,0 +1,130 @@
+!> @file lpm_merging.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! Change in file header (GPL part)
+! Added comments
+! 
+! 2263 2017-06-08 14:59:01Z schwenkel
+! Initial revision
+! 
+!
+! Description:
+! ------------
+! This routine is a part of the Lagrangian particle model. Two Super droplets 
+! which fulfill certain criterion's (e.g. a big weighting factor and a small
+! radius) can be merged into one super droplet with a increased number of 
+! represented particles of the super droplet. This mechanism ensures an
+! improved a feasible amount of computational costs. The limits of particle 
+! creation should be chosen carefully! The idea of this algorithm is based on 
+! Unterstrasser and Soelch, 2014. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_merging
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  ql
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  deleted_particles, grid_particles, initial_weighting_factor,    &     
+               merge_drp, number_of_particles, particles, prt_count,           &
+               radius_merge, sum_merge_drp, weight_factor_merge
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i         !<      
+    INTEGER(iwp) ::  j         !<       
+    INTEGER(iwp) ::  k         !<       
+    INTEGER(iwp) ::  n         !<   
+    
+    REAL(wp) ::  ql_crit = 1.0E-5_wp  !< threshold lwc for cloudy grid cells 
+                                      !< (e.g. Siebesma et al 2003, JAS, 60)
+    
+    CALL cpu_log( log_point_s(81), 'lpm_merging', 'start' )
+
+    merge_drp  = 0
+    
+    IF ( weight_factor_merge == -1.0_wp )  THEN
+       weight_factor_merge = 0.5_wp * initial_weighting_factor 
+    ENDIF
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+   
+             number_of_particles = prt_count(k,j,i)
+             IF ( number_of_particles <= 0  .OR.                               &
+                   ql(k,j,i) >= ql_crit )  CYCLE
+             particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+!
+!--          Start merging operations: This routine delete super droplets with
+!--          a small radius (radius <= radius_merge) and a low weighting 
+!--          factor (weight_factor  <= weight_factor_merge). The number of 
+!--          represented particles will be added to the next particle of the 
+!--          particle array. Tests showed that this simplified method can be 
+!--          used because it will only take place outside of cloudy grid 
+!--          boxes where ql <= 1.0E-5 kg/kg. Therefore, especially former cloned   
+!--          and subsequent evaporated super droplets will be merged.
+             DO  n = 1, number_of_particles-1
+                IF ( particles(n)%particle_mask                    .AND.       &
+                     particles(n+1)%particle_mask                  .AND.       &
+                     particles(n)%radius        <= radius_merge    .AND.       &
+                     particles(n)%weight_factor <= weight_factor_merge )       &   
+                THEN
+                   particles(n+1)%weight_factor  =                             &
+                                       particles(n+1)%weight_factor +          &
+                                       ( particles(n)%radius**3     /          &
+                                         particles(n+1)%radius**3   *          &
+                                         particles(n)%weight_factor            &
+                                       )
+                   particles(n)%particle_mask = .FALSE.
+                   deleted_particles          = deleted_particles + 1 
+                   merge_drp                  = merge_drp + 1
+                
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+       
+    sum_merge_drp = sum_merge_drp + merge_drp
+
+    CALL cpu_log( log_point_s(81), 'lpm_merging', 'stop' )
+
+ END SUBROUTINE lpm_merging
Index: /palm/tags/release-6.0/SOURCE/lpm_pack_arrays.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_pack_arrays.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_pack_arrays.f90	(revision 3477)
@@ -0,0 +1,356 @@
+!> @file lpm_pack_arrays.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2628 2017-11-20 12:40:38Z schwenkel
+! Enabled particle advection with grid stretching.
+! 
+! 2609 2017-11-14 14:14:44Z schwenkel
+! Integrated subroutine pack_and_sort into lpm_sort_in_subboxes
+! 
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done
+! 
+! 2417 2017-09-06 15:22:27Z suehring
+! New routine which sorts particles into particles that completed and not 
+! completed the LES timestep. 
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. Unused variables removed.
+!
+! 1685 2015-10-08 07:32:13Z raasch
+! bugfix concerning vertical index calculation in case of ocean
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Pack particle arrays, which means eliminate those elements marked for
+!> deletion and move data with higher index values to these free indices.
+!> Determine the new number of particles.
+!> Moreover, particles are also sorted into groups finished and not finished
+!> its timestep. 
+!------------------------------------------------------------------------------!
+ MODULE lpm_pack_and_sort_mod
+ 
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, offset_ocean_nzt,          &
+               particles, particle_type, prt_count
+
+    PRIVATE
+    PUBLIC lpm_sort_in_subboxes, lpm_pack, lpm_sort_timeloop_done
+
+    INTERFACE lpm_sort_in_subboxes
+       MODULE PROCEDURE lpm_sort_in_subboxes
+    END INTERFACE lpm_sort_in_subboxes
+
+    INTERFACE lpm_pack
+       MODULE PROCEDURE lpm_pack
+    END INTERFACE lpm_pack
+
+    INTERFACE lpm_sort_timeloop_done
+       MODULE PROCEDURE lpm_sort_timeloop_done
+    END INTERFACE lpm_sort_timeloop_done
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! -----------
+!> Routine for the whole processor
+!> Sort all particles into the 8 respective subgrid boxes
+!------------------------------------------------------------------------------!
+    SUBROUTINE lpm_sort_in_subboxes
+
+       USE cpulog,                                                             &
+          ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+          ONLY:  nxl, nxr, nys, nyn, nzb, nzt
+
+       USE kinds
+
+       USE grid_variables,                                                     &
+          ONLY: dx,dy,ddx, ddy
+           
+       USE arrays_3d,                                                          &
+          ONLY:  zu
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i  !<
+       INTEGER(iwp) ::  ip !<
+       INTEGER(iwp) ::  is !<
+       INTEGER(iwp) ::  j  !<
+       INTEGER(iwp) ::  jp !<
+       INTEGER(iwp) ::  kp !<
+       INTEGER(iwp) ::  m  !<
+       INTEGER(iwp) ::  n  !<
+       INTEGER(iwp) ::  nn !<
+       INTEGER(iwp) ::  sort_index  !<
+
+       INTEGER(iwp), DIMENSION(0:7) ::  sort_count  !<
+
+       TYPE(particle_type), DIMENSION(:,:), ALLOCATABLE ::  sort_particles  !<
+
+       CALL cpu_log( log_point_s(51), 'lpm_sort_in_subboxes', 'start' )
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             DO  kp = nzb+1, nzt
+                number_of_particles = prt_count(kp,jp,ip)
+                IF ( number_of_particles <= 0 )  CYCLE
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                      
+                nn = 0
+                sort_count = 0
+                ALLOCATE( sort_particles(number_of_particles, 0:7) )
+                
+                DO  n = 1, number_of_particles
+                   sort_index = 0
+
+                   IF ( particles(n)%particle_mask )  THEN
+                      nn = nn + 1
+!
+!--                   Sorting particles with a binary scheme
+!--                   sort_index=111_2=7_10 -> particle at the left,south,bottom subgridbox
+!--                   sort_index=000_2=0_10 -> particle at the right,north,top subgridbox
+!--                   For this the center of the gridbox is calculated 
+                      i = (particles(n)%x + 0.5_wp * dx) * ddx
+                      j = (particles(n)%y + 0.5_wp * dy) * ddy
+                      
+                      IF ( i == ip )  sort_index = sort_index + 4 
+                      IF ( j == jp )  sort_index = sort_index + 2                      
+                      IF ( zu(kp) > particles(n)%z ) sort_index = sort_index + 1
+                      
+                      sort_count(sort_index) = sort_count(sort_index) + 1
+                      m = sort_count(sort_index)
+                      sort_particles(m,sort_index) = particles(n)
+                      sort_particles(m,sort_index)%block_nr = sort_index
+                   ENDIF
+                ENDDO
+
+                nn = 0
+                DO is = 0,7
+                   grid_particles(kp,jp,ip)%start_index(is) = nn + 1
+                   DO n = 1,sort_count(is)
+                      nn = nn + 1
+                      particles(nn) = sort_particles(n,is)
+                   ENDDO
+                   grid_particles(kp,jp,ip)%end_index(is) = nn
+                ENDDO
+
+                number_of_particles = nn    
+                prt_count(kp,jp,ip) = number_of_particles
+                DEALLOCATE(sort_particles)
+             ENDDO
+          ENDDO
+       ENDDO
+       CALL cpu_log( log_point_s(51), 'lpm_sort_in_subboxes', 'stop' )
+
+    END SUBROUTINE lpm_sort_in_subboxes
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Move all particles not marked for deletion to lowest indices (packing)
+!------------------------------------------------------------------------------!
+    SUBROUTINE lpm_pack
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  n       !<
+       INTEGER(iwp) ::  nn      !<
+!
+!--    Find out elements marked for deletion and move data from highest index
+!--    values to these free indices
+       nn = number_of_particles
+
+       DO WHILE ( .NOT. particles(nn)%particle_mask )
+          nn = nn-1
+          IF ( nn == 0 )  EXIT
+       ENDDO
+
+       IF ( nn > 0 )  THEN
+          DO  n = 1, number_of_particles
+             IF ( .NOT. particles(n)%particle_mask )  THEN
+                particles(n) = particles(nn)
+                nn = nn - 1
+                DO WHILE ( .NOT. particles(nn)%particle_mask )
+                   nn = nn-1
+                   IF ( n == nn )  EXIT
+                ENDDO
+             ENDIF
+             IF ( n == nn )  EXIT
+          ENDDO
+       ENDIF
+
+!
+!--    The number of deleted particles has been determined in routines
+!--    lpm_boundary_conds, lpm_droplet_collision, and lpm_exchange_horiz
+       number_of_particles = nn
+
+    END SUBROUTINE lpm_pack 
+                
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sort particles in each sub-grid box into two groups: particles that already
+!> completed the LES timestep, and particles that need further timestepping to
+!> complete the LES timestep. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE lpm_sort_timeloop_done
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d
+
+       USE indices,                                                            &
+           ONLY: nxl, nxr, nys, nyn, nzb, nzt
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: end_index     !< particle end index for each sub-box
+       INTEGER(iwp) :: i             !< index of particle grid box in x-direction
+       INTEGER(iwp) :: j             !< index of particle grid box in y-direction
+       INTEGER(iwp) :: k             !< index of particle grid box in z-direction
+       INTEGER(iwp) :: n             !< running index for number of particles
+       INTEGER(iwp) :: nb            !< index of subgrid boux
+       INTEGER(iwp) :: nf            !< indices for particles in each sub-box that already finalized their substeps
+       INTEGER(iwp) :: nnf           !< indices for particles in each sub-box that need further treatment
+       INTEGER(iwp) :: num_finalized !< number of particles in each sub-box that already finalized their substeps
+       INTEGER(iwp) :: start_index   !< particle start index for each sub-box
+
+       TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: sort_particles  !< temporary particle array 
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+
+                number_of_particles = prt_count(k,j,i)
+                IF ( number_of_particles <= 0 )  CYCLE
+
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                DO  nb = 0, 7
+!
+!--                Obtain start and end index for each subgrid box
+                   start_index = grid_particles(k,j,i)%start_index(nb)
+                   end_index   = grid_particles(k,j,i)%end_index(nb)
+!
+!--                Allocate temporary array used for sorting. 
+                   ALLOCATE( sort_particles(start_index:end_index) )
+!
+!--                Determine number of particles already completed the LES 
+!--                timestep, and write them into a temporary array. 
+                   nf = start_index
+                   num_finalized = 0
+                   DO  n = start_index, end_index
+                      IF ( dt_3d - particles(n)%dt_sum < 1E-8_wp )  THEN
+                         sort_particles(nf) = particles(n)
+                         nf                 = nf + 1
+                         num_finalized      = num_finalized + 1
+                      ENDIF
+                   ENDDO
+!
+!--                Determine number of particles that not completed the LES 
+!--                timestep, and write them into a temporary array. 
+                   nnf = nf
+                   DO  n = start_index, end_index
+                      IF ( dt_3d - particles(n)%dt_sum > 1E-8_wp )  THEN
+                         sort_particles(nnf) = particles(n)
+                         nnf                 = nnf + 1
+                      ENDIF
+                   ENDDO
+!
+!--                Write back sorted particles
+                   particles(start_index:end_index) =                          &
+                                           sort_particles(start_index:end_index)
+!
+!--                Determine updated start_index, used to masked already 
+!--                completed particles. 
+                   grid_particles(k,j,i)%start_index(nb) =                     &
+                                      grid_particles(k,j,i)%start_index(nb)    &
+                                    + num_finalized
+!
+!--                Deallocate dummy array
+                   DEALLOCATE ( sort_particles )
+!
+!--                Finally, if number of non-completed particles is non zero 
+!--                in any of the sub-boxes, set control flag appropriately. 
+                   IF ( nnf > nf )                                             &
+                      grid_particles(k,j,i)%time_loop_done = .FALSE.
+
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE lpm_sort_timeloop_done
+
+ END MODULE lpm_pack_and_sort_mod
Index: /palm/tags/release-6.0/SOURCE/lpm_read_restart_file.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_read_restart_file.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_read_restart_file.f90	(revision 3477)
@@ -0,0 +1,202 @@
+!> @file lpm_read_restart_file.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised, code adjusted according to PALMs coding standard
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2606 2017-11-10 10:36:31Z schwenkel
+! Changed particle box locations: center of particle box now coincides 
+! with scalar grid point of same index.
+! Renamed module and subroutines: lpm_pack_arrays_mod -> lpm_pack_and_sort_mod
+! lpm_pack_all_arrays -> lpm_sort_in_subboxes, lpm_pack_arrays -> lpm_pack
+! lpm_sort -> lpm_sort_timeloop_done
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! Extended particle data type.
+!
+! 2305 2017-07-06 11:18:47Z hoffmann
+! Improved calculation of particle IDs.
+!
+! 2265 2017-06-08 16:58:28Z schwenkel
+! Unused variables removed.
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of init_particles)
+!
+!
+! Description:
+! ------------
+!> Read particle data from the restart file.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_read_restart_file
+
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+
+    USE kinds
+
+    USE lpm_pack_and_sort_mod,                                                   &
+        ONLY:  lpm_sort_in_subboxes
+
+    USE particle_attributes,                                                   &
+        ONLY:  alloc_factor, bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,         &
+               grid_particles, min_nr_particle, number_of_particles,           &
+               number_of_particle_groups, particle_groups, particle_type,      &
+               prt_count, time_prel, time_write_particle_data, zero_particle
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=10) ::  particle_binary_version    !<
+    CHARACTER (LEN=10) ::  version_on_file            !<
+
+    INTEGER(iwp) :: alloc_size !<
+    INTEGER(iwp) :: ip         !<
+    INTEGER(iwp) :: jp         !<
+    INTEGER(iwp) :: kp         !<
+
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE :: tmp_particles !<
+
+!
+!-- Read particle data from previous model run.
+!-- First open the input unit.
+    IF ( myid_char == '' )  THEN
+       OPEN ( 90, FILE='PARTICLE_RESTART_DATA_IN'//myid_char,                  &
+                  FORM='UNFORMATTED' )
+    ELSE
+       OPEN ( 90, FILE='PARTICLE_RESTART_DATA_IN/'//myid_char,                 &
+                  FORM='UNFORMATTED' )
+    ENDIF
+
+!
+!-- First compare the version numbers
+    READ ( 90 )  version_on_file
+    particle_binary_version = '4.0'
+    IF ( TRIM( version_on_file ) /= TRIM( particle_binary_version ) )  THEN
+       message_string = 'version mismatch concerning data from prior ' //      &
+                        'run &version on file = "' //                          &
+                                      TRIM( version_on_file ) //               &
+                        '&version in program = "' //                           &
+                                      TRIM( particle_binary_version ) // '"'
+       CALL message( 'lpm_read_restart_file', 'PA0214', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- If less particles are stored on the restart file than prescribed by
+!-- min_nr_particle, the remainder is initialized by zero_particle to avoid
+!-- errors.
+    zero_particle = particle_type( 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,     &
+                                   0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,     &
+                                   0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,     &
+                                   0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp,     &
+                                   0, 0, 0_idp, .FALSE., -1 )
+!
+!-- Read some particle parameters and the size of the particle arrays,
+!-- allocate them and read their contents.
+    READ ( 90 )  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,                     &
+                 number_of_particle_groups, particle_groups, time_prel,        &
+                 time_write_particle_data
+
+    ALLOCATE( prt_count(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                        &
+              grid_particles(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+    READ ( 90 )  prt_count
+
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+
+             number_of_particles = prt_count(kp,jp,ip)
+             IF ( number_of_particles > 0 )  THEN
+                alloc_size = MAX( INT( number_of_particles *                   &
+                             ( 1.0_wp + alloc_factor / 100.0_wp ) ),           &
+                             min_nr_particle )
+             ELSE
+                alloc_size = min_nr_particle
+             ENDIF
+
+             ALLOCATE( grid_particles(kp,jp,ip)%particles(1:alloc_size) )
+
+             IF ( number_of_particles > 0 )  THEN
+                ALLOCATE( tmp_particles(1:number_of_particles) )
+                READ ( 90 )  tmp_particles
+                grid_particles(kp,jp,ip)%particles(1:number_of_particles) = tmp_particles
+                DEALLOCATE( tmp_particles )
+                IF ( number_of_particles < alloc_size )  THEN
+                   grid_particles(kp,jp,ip)%particles(number_of_particles+1:alloc_size) &
+                      = zero_particle
+                ENDIF
+             ELSE
+                grid_particles(kp,jp,ip)%particles(1:alloc_size) = zero_particle
+             ENDIF
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CLOSE ( 90 )
+!
+!-- Must be called to sort particles into blocks, which is needed for a fast
+!-- interpolation of the LES fields on the particle position.
+    CALL lpm_sort_in_subboxes
+
+
+ END SUBROUTINE lpm_read_restart_file
Index: /palm/tags/release-6.0/SOURCE/lpm_set_attributes.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_set_attributes.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_set_attributes.f90	(revision 3477)
@@ -0,0 +1,413 @@
+!> @file lpm_set_attributes.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by dzw to allow for right vertical stretching
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2123 2017-01-18 12:34:59Z hoffmann
+!
+! 2122 2017-01-18 12:22:54Z hoffmann
+! DVRP routine removed
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+! Kind definition added to all floating point numbers.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine renamed: set_particle_attributes -> lpm_set_attributes
+!
+! 828 2012-02-21 12:00:36Z raasch
+! particle feature color renamed class
+!
+! 271 2009-03-26 00:47:14Z raasch
+! Initial version
+!
+! Description:
+! ------------
+!> This routine sets certain particle attributes depending on the values that
+!> other PALM variables have at the current particle position.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_set_attributes
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, pt, u, v, zu
+
+    USE control_parameters,                                                    &
+        ONLY:  u_gtrans, v_gtrans
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE dvrp_variables,                                                        &
+        ONLY:  color_interval, dvrp_colortable_entries_prt, particle_color
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  ngp_2dh, nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  block_offset, grid_particles, number_of_particles, particles,   &
+               prt_count
+
+    USE pegrid
+
+    USE statistics,                                                            &
+        ONLY:  sums, sums_l
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i        !<
+    INTEGER(iwp) ::  ip       !<
+    INTEGER(iwp) ::  j        !<
+    INTEGER(iwp) ::  jp       !<
+    INTEGER(iwp) ::  k        !<
+    INTEGER(iwp) ::  kp       !<
+    INTEGER(iwp) ::  n        !<
+    INTEGER(iwp) ::  nb       !<
+
+    INTEGER(iwp), DIMENSION(0:7) ::  start_index !<
+    INTEGER(iwp), DIMENSION(0:7) ::  end_index   !<
+
+    REAL(wp)    ::  aa        !<
+    REAL(wp)    ::  absuv     !<
+    REAL(wp)    ::  bb        !<
+    REAL(wp)    ::  cc        !<
+    REAL(wp)    ::  dd        !<
+    REAL(wp)    ::  gg        !<
+    REAL(wp)    ::  height    !<
+    REAL(wp)    ::  pt_int    !<
+    REAL(wp)    ::  pt_int_l  !<
+    REAL(wp)    ::  pt_int_u  !<
+    REAL(wp)    ::  u_int_l   !<
+    REAL(wp)    ::  u_int_u   !<
+    REAL(wp)    ::  v_int_l   !<
+    REAL(wp)    ::  v_int_u   !<
+    REAL(wp)    ::  x         !<
+    REAL(wp)    ::  y         !<
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_int                  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_int                  !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  xv                     !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  yv                     !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  zv                     !<
+
+    CALL cpu_log( log_point_s(49), 'lpm_set_attributes', 'start' )
+
+!
+!-- Set particle color
+    IF ( particle_color == 'absuv' )  THEN
+
+!
+!--    Set particle color depending on the absolute value of the horizontal
+!--    velocity
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             DO  kp = nzb+1, nzt
+
+                number_of_particles = prt_count(kp,jp,ip)
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                IF ( number_of_particles <= 0 )  CYCLE
+                start_index = grid_particles(kp,jp,ip)%start_index
+                end_index   = grid_particles(kp,jp,ip)%end_index
+
+                ALLOCATE( u_int(1:number_of_particles), &
+                          v_int(1:number_of_particles), &
+                          xv(1:number_of_particles),    &
+                          yv(1:number_of_particles),    &
+                          zv(1:number_of_particles) )
+
+                xv = particles(1:number_of_particles)%x
+                yv = particles(1:number_of_particles)%y
+                zv = particles(1:number_of_particles)%z
+
+                DO  nb = 0,7
+
+                   i = ip
+                   j = jp + block_offset(nb)%j_off
+                   k = kp + block_offset(nb)%k_off
+
+                   DO  n = start_index(nb), end_index(nb)
+!
+!--                   Interpolation of the velocity components in the xy-plane
+                      x  = xv(n) + ( 0.5_wp - i ) * dx
+                      y  = yv(n) - j * dy
+                      aa = x**2          + y**2
+                      bb = ( dx - x )**2 + y**2
+                      cc = x**2          + ( dy - y )**2
+                      dd = ( dx - x )**2 + ( dy - y )**2
+                      gg = aa + bb + cc + dd
+
+                      u_int_l = ( ( gg - aa ) * u(k,j,i)   + ( gg - bb ) *     &
+                                  u(k,j,i+1) + ( gg - cc ) * u(k,j+1,i) +      &
+                                  ( gg - dd ) * u(k,j+1,i+1)                   &
+                                ) / ( 3.0_wp * gg ) - u_gtrans
+
+                      IF ( k+1 == nzt+1 )  THEN
+                         u_int(n) = u_int_l
+                      ELSE
+                         u_int_u = ( ( gg - aa ) * u(k+1,j,i)   + ( gg - bb ) *  &
+                                     u(k+1,j,i+1) + ( gg - cc ) * u(k+1,j+1,i) + &
+                                     ( gg - dd ) * u(k+1,j+1,i+1)                &
+                                   ) / ( 3.0_wp * gg ) - u_gtrans
+                         u_int(n) = u_int_l + ( zv(n) - zu(k) ) / dzw(k) *      &
+                                           ( u_int_u - u_int_l )
+                      ENDIF
+
+                   ENDDO
+
+                   i = ip + block_offset(nb)%i_off
+                   j = jp
+                   k = kp + block_offset(nb)%k_off
+
+                   DO  n = start_index(nb), end_index(nb)
+!
+!--                   Same procedure for interpolation of the v velocity-component
+                      x  = xv(n) - i * dx
+                      y  = yv(n) + ( 0.5_wp - j ) * dy
+                      aa = x**2          + y**2
+                      bb = ( dx - x )**2 + y**2
+                      cc = x**2          + ( dy - y )**2
+                      dd = ( dx - x )**2 + ( dy - y )**2
+                      gg = aa + bb + cc + dd
+
+                      v_int_l = ( ( gg - aa ) * v(k,j,i)   + ( gg - bb ) *     &
+                                  v(k,j,i+1) + ( gg - cc ) * v(k,j+1,i) +      &
+                                  ( gg - dd ) * v(k,j+1,i+1)                   &
+                                ) / ( 3.0_wp * gg ) - v_gtrans
+
+                      IF ( k+1 == nzt+1 )  THEN
+                         v_int(n) = v_int_l
+                      ELSE
+                         v_int_u  = ( ( gg - aa ) * v(k+1,j,i) + ( gg - bb ) *    &
+                                      v(k+1,j,i+1) + ( gg - cc ) * v(k+1,j+1,i) + &
+                                      ( gg - dd ) * v(k+1,j+1,i+1)                &
+                                    ) / ( 3.0_wp * gg ) - v_gtrans
+                         v_int(n) = v_int_l + ( zv(n) - zu(k) ) / dzw(k) *      &
+                                           ( v_int_u - v_int_l )
+                      ENDIF
+
+                   ENDDO
+
+                ENDDO
+
+                DO  n = 1, number_of_particles
+
+                   absuv = SQRT( u_int(n)**2 + v_int(n)**2 )
+
+!
+!--                Limit values by the given interval and normalize to
+!--                interval [0,1]
+                   absuv = MIN( absuv, color_interval(2) )
+                   absuv = MAX( absuv, color_interval(1) )
+
+                   absuv = ( absuv - color_interval(1) ) / &
+                           ( color_interval(2) - color_interval(1) )
+
+!
+!--                Number of available colors is defined in init_dvrp
+                   particles(n)%class = 1 + absuv *                            &
+                                            ( dvrp_colortable_entries_prt - 1 )
+
+                ENDDO
+
+                DEALLOCATE( u_int, v_int, xv, yv, zv )
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSEIF ( particle_color == 'pt*' )  THEN
+!
+!--    Set particle color depending on the resolved scale temperature
+!--    fluctuation.
+!--    First, calculate the horizontal average of the potential temperature
+!--    (This is also done in flow_statistics, but flow_statistics is called
+!--    after this routine.)
+       sums_l(:,4,0) = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j =  nys, nyn
+             DO  k = nzb, nzt+1
+                sums_l(k,4,0) = sums_l(k,4,0) + pt(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( sums_l(nzb,4,0), sums(nzb,4), nzt+2-nzb, &
+                           MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+       sums(:,4) = sums_l(:,4,0)
+#endif
+       sums(:,4) = sums(:,4) / ngp_2dh(0)
+
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             DO  kp = nzb+1, nzt
+
+                number_of_particles = prt_count(kp,jp,ip)
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                IF ( number_of_particles <= 0 )  CYCLE
+                start_index = grid_particles(kp,jp,ip)%start_index
+                end_index   = grid_particles(kp,jp,ip)%end_index
+
+                ALLOCATE( xv(1:number_of_particles), &
+                          yv(1:number_of_particles), &
+                          zv(1:number_of_particles) )
+
+                xv = particles(1:number_of_particles)%x
+                yv = particles(1:number_of_particles)%y
+                zv = particles(1:number_of_particles)%z
+
+                DO  nb = 0,7
+
+                   i = ip + block_offset(nb)%i_off
+                   j = jp + block_offset(nb)%j_off
+                   k = kp + block_offset(nb)%k_off
+
+                   DO  n = start_index(nb), end_index(nb)
+!
+!--                   Interpolate temperature to the current particle position
+                      x  = xv(n) - i * dx
+                      y  = yv(n) - j * dy
+                      aa = x**2          + y**2
+                      bb = ( dx - x )**2 + y**2
+                      cc = x**2          + ( dy - y )**2
+                      dd = ( dx - x )**2 + ( dy - y )**2
+                      gg = aa + bb + cc + dd
+
+                      pt_int_l = ( ( gg - aa ) * pt(k,j,i)   + ( gg - bb ) *   &
+                                   pt(k,j,i+1) + ( gg - cc ) * pt(k,j+1,i) +   &
+                                   ( gg - dd ) * pt(k,j+1,i+1)                 &
+                                 ) / ( 3.0_wp * gg ) - sums(k,4)
+
+                      pt_int_u = ( ( gg - aa ) * pt(k+1,j,i) + ( gg - bb ) *     &
+                                   pt(k+1,j,i+1) + ( gg - cc ) * pt(k+1,j+1,i) + &
+                                   ( gg - dd ) * pt(k+1,j+1,i+1)                 &
+                                 ) / ( 3.0_wp * gg ) - sums(k,4)
+
+                      pt_int = pt_int_l + ( zv(n) - zu(k) ) / dzw(k) *          &
+                                          ( pt_int_u - pt_int_l )
+
+!
+!--                   Limit values by the given interval and normalize to
+!--                   interval [0,1]
+                      pt_int = MIN( pt_int, color_interval(2) )
+                      pt_int = MAX( pt_int, color_interval(1) )
+
+                      pt_int = ( pt_int - color_interval(1) ) /                &
+                               ( color_interval(2) - color_interval(1) )
+
+!
+!--                   Number of available colors is defined in init_dvrp
+                      particles(n)%class = 1 + pt_int *                        &
+                                           ( dvrp_colortable_entries_prt - 1 )
+
+                   ENDDO
+                ENDDO
+
+                DEALLOCATE( xv, yv, zv )
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSEIF ( particle_color == 'z' )  THEN
+!
+!--    Set particle color depending on the height above the bottom
+!--    boundary (z=0)
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             DO  kp = nzb+1, nzt
+
+                number_of_particles = prt_count(kp,jp,ip)
+                particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+                IF ( number_of_particles <= 0 )  CYCLE
+                DO  n = 1, number_of_particles
+
+                   height = particles(n)%z
+!
+!--                Limit values by the given interval and normalize to
+!--                interval [0,1]
+                   height = MIN( height, color_interval(2) )
+                   height = MAX( height, color_interval(1) )
+
+                   height = ( height - color_interval(1) ) / &
+                            ( color_interval(2) - color_interval(1) )
+
+!
+!--                Number of available colors is defined in init_dvrp
+                   particles(n)%class = 1 + height *                           &
+                                            ( dvrp_colortable_entries_prt - 1 )
+
+                ENDDO
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+    CALL cpu_log( log_point_s(49), 'lpm_set_attributes', 'stop' )
+
+
+ END SUBROUTINE lpm_set_attributes
Index: /palm/tags/release-6.0/SOURCE/lpm_splitting.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_splitting.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_splitting.f90	(revision 3477)
@@ -0,0 +1,608 @@
+!> @file lpm_splitting.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed particles_par to particle_parameters
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 
+! Change in file header (GPL part)
+!
+! Added comments
+! 
+! 
+! 2263 2017-06-08 14:59:01Z schwenkel
+! Initial revision
+! 
+! 
+!
+! Description:
+! ------------
+! This routine is a part of the Lagrangian particle model. Super droplets which 
+! fulfill certain criterion's (e.g. a big weighting factor and a large radius) 
+! can be split into several super droplets with a reduced number of 
+! represented particles of every super droplet. This mechanism ensures an
+! improved representation of the right tail of the drop size distribution with 
+! a feasible amount of computational costs. The limits of particle creation 
+! should be chosen carefully! The idea of this algorithm is based on 
+! Unterstrasser and Soelch, 2014. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_splitting
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  ql
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi, rho_l
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE lpm_exchange_horiz_mod,                                                &
+        ONLY:  realloc_particles_array
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, initial_weighting_factor, isf, i_splitting_mode,&
+               max_number_particles_per_gridbox, new_particles, n_max,         &
+               number_of_particles, particles, particle_type, prt_count,       &
+               radius_split, splitting_factor, splitting_factor_max,           &
+               sum_new_particles, weight_factor_split                        
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                !< 
+    INTEGER(iwp) ::  j                !<
+    INTEGER(iwp) ::  jpp              !<
+    INTEGER(iwp) ::  k                !<
+    INTEGER(iwp) ::  n                !<
+    INTEGER(iwp) ::  new_particles_gb !< counter of created particles within one grid box
+    INTEGER(iwp) ::  new_size         !< new particle array size
+    INTEGER(iwp) ::  np               !< 
+    INTEGER(iwp) ::  old_size         !< old particle array size
+    
+    LOGICAL ::  first_loop_stride = .TRUE. !< flag to calculate constants only once
+
+    REAL(wp) ::  diameter                 !< diameter of droplet
+    REAL(wp) ::  dlog                     !< factor for DSD calculation
+    REAL(wp) ::  factor_volume_to_mass    !< pre calculate factor volume to mass
+    REAL(wp) ::  lambda                   !< slope parameter of gamma-distribution
+    REAL(wp) ::  lwc                      !< liquid water content of grid box
+    REAL(wp) ::  lwc_total                !< average liquid water content of cloud
+    REAL(wp) ::  m1                       !< first moment of DSD
+    REAL(wp) ::  m1_total                 !< average over all PEs of first moment of DSD
+    REAL(wp) ::  m2                       !< second moment of DSD
+    REAL(wp) ::  m2_total                 !< average average over all PEs second moment of DSD
+    REAL(wp) ::  m3                       !< third moment of DSD
+    REAL(wp) ::  m3_total                 !< average average over all PEs third moment of DSD
+    REAL(wp) ::  mu                       !< spectral shape parameter of gamma distribution
+    REAL(wp) ::  nrclgb                   !< number of cloudy grid boxes (ql >= 1.0E-5 kg/kg) 
+    REAL(wp) ::  nrclgb_total             !< average over all PEs of number of cloudy grid boxes
+    REAL(wp) ::  nr                       !< number concentration of cloud droplets
+    REAL(wp) ::  nr_total                 !< average over all PEs of number of cloudy grid boxes
+    REAL(wp) ::  nr0                      !< intercept parameter of gamma distribution
+    REAL(wp) ::  pirho_l                  !< pi * rho_l / 6.0
+    REAL(wp) ::  ql_crit = 1.0E-5_wp      !< threshold lwc for cloudy grid cells 
+                                          !< (Siebesma et al 2003, JAS, 60)
+    REAL(wp) ::  rm                       !< volume averaged mean radius
+    REAL(wp) ::  rm_total                 !< average over all PEs of volume averaged mean radius
+    REAL(wp) ::  r_min = 1.0E-6_wp        !< minimum radius of approximated spectra 
+    REAL(wp) ::  r_max = 1.0E-3_wp        !< maximum radius of approximated spectra
+    REAL(wp) ::  sigma_log = 1.5_wp       !< standard deviation of the LOG-distribution
+    REAL(wp) ::  zeta                     !< Parameter for DSD calculation of Seifert
+
+    REAL(wp), DIMENSION(0:n_max-1) ::  an_spl     !< size dependent critical weight factor
+    REAL(wp), DIMENSION(0:n_max-1) ::  r_bin_mid  !< mass weighted mean radius of a bin
+    REAL(wp), DIMENSION(0:n_max)   ::  r_bin      !< boundaries of a radius bin
+    
+    TYPE(particle_type) ::  tmp_particle   !< temporary particle TYPE
+
+    CALL cpu_log( log_point_s(80), 'lpm_splitting', 'start' )
+
+    IF ( first_loop_stride )  THEN
+       IF ( i_splitting_mode == 2  .OR.  i_splitting_mode == 3 )  THEN
+          dlog   = ( LOG10(r_max) - LOG10(r_min) ) / ( n_max - 1 )
+          DO  i = 0, n_max-1
+             r_bin(i) = 10.0_wp**( LOG10(r_min) + i * dlog - 0.5_wp * dlog )
+             r_bin_mid(i) = 10.0_wp**( LOG10(r_min) + i * dlog )
+          ENDDO
+          r_bin(n_max) = 10.0_wp**( LOG10(r_min) + n_max * dlog - 0.5_wp * dlog )
+       ENDIF   
+       factor_volume_to_mass =  4.0_wp / 3.0_wp * pi * rho_l
+       pirho_l  = pi * rho_l / 6.0_wp
+       IF ( weight_factor_split == -1.0_wp )  THEN
+          weight_factor_split = 0.1_wp * initial_weighting_factor 
+       ENDIF
+    ENDIF
+
+    new_particles  = 0
+
+    IF ( i_splitting_mode == 1 )  THEN
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+
+                new_particles_gb = 0
+                number_of_particles = prt_count(k,j,i)
+                IF ( number_of_particles <= 0  .OR.                            &  
+                     ql(k,j,i) < ql_crit )  CYCLE
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+!                
+!--             Start splitting operations. Each particle is checked if it
+!--             fulfilled the splitting criterion's. In splitting mode 'const'   
+!--             a critical radius  (radius_split) a critical weighting factor
+!--             (weight_factor_split) and a splitting factor (splitting_factor)
+!--             must  be prescribed (see particle_parameters). Super droplets 
+!--             which have a larger radius and larger weighting factor are split 
+!--             into 'splitting_factor' super droplets. Therefore, the weighting 
+!--             factor of  the super droplet and all created clones is reduced 
+!--             by the factor of 'splitting_factor'.
+                DO  n = 1, number_of_particles
+                   IF ( particles(n)%particle_mask  .AND.                      &
+                        particles(n)%radius >= radius_split  .AND.             & 
+                        particles(n)%weight_factor >= weight_factor_split )    &
+                   THEN          
+!
+!--                   Calculate the new number of particles.
+                      new_size = prt_count(k,j,i) + splitting_factor - 1                                    
+!
+!--                   Cycle if maximum number of particles per grid box
+!--                   is greater than the allowed maximum number.
+                      IF ( new_size >= max_number_particles_per_gridbox )  CYCLE                      
+!
+!--                   Reallocate particle array if necessary. 
+                      IF ( new_size > SIZE(particles) )  THEN 
+                         CALL realloc_particles_array(i,j,k,new_size)
+                      ENDIF
+                      old_size = prt_count(k,j,i)
+!
+!--                   Calculate new weighting factor.
+                      particles(n)%weight_factor =  & 
+                         particles(n)%weight_factor / splitting_factor
+                      tmp_particle = particles(n)
+!
+!--                   Create splitting_factor-1 new particles.
+                      DO  jpp = 1, splitting_factor-1
+                         grid_particles(k,j,i)%particles(jpp+old_size) =       & 
+                            tmp_particle         
+                      ENDDO  
+                      new_particles_gb = new_particles_gb + splitting_factor - 1
+!   
+!--                   Save the new number of super droplets for every grid box.
+                      prt_count(k,j,i) = prt_count(k,j,i) +                    &
+                                         splitting_factor - 1         
+                   ENDIF
+                ENDDO
+                
+                new_particles       = new_particles     + new_particles_gb
+                sum_new_particles   = sum_new_particles + new_particles_gb 
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSEIF ( i_splitting_mode == 2 )  THEN 
+!
+!--    Initialize summing variables.
+       lwc          = 0.0_wp
+       lwc_total    = 0.0_wp 
+       m1           = 0.0_wp
+       m1_total     = 0.0_wp
+       m2           = 0.0_wp
+       m2_total     = 0.0_wp
+       m3           = 0.0_wp
+       m3_total     = 0.0_wp
+       nr           = 0.0_wp   
+       nrclgb       = 0.0_wp
+       nrclgb_total = 0.0_wp 
+       nr_total     = 0.0_wp
+       rm           = 0.0_wp
+       rm_total     = 0.0_wp
+       
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                number_of_particles = prt_count(k,j,i)
+                IF ( number_of_particles <= 0  .OR.                            & 
+                     ql(k,j,i) < ql_crit )  CYCLE
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                nrclgb = nrclgb + 1.0_wp
+!                
+!--             Calculate moments of DSD.                
+                DO  n = 1, number_of_particles
+                   IF ( particles(n)%particle_mask  .AND.                      &
+                        particles(n)%radius >= r_min )                         &
+                   THEN
+                      nr  = nr  + particles(n)%weight_factor
+                      rm  = rm  + factor_volume_to_mass  *                     &
+                                 particles(n)%radius**3  *                     &
+                                 particles(n)%weight_factor
+                      IF ( isf == 1 )  THEN           
+                         diameter   = particles(n)%radius * 2.0_wp            
+                         lwc = lwc + factor_volume_to_mass *                   &
+                                     particles(n)%radius**3 *                  & 
+                                     particles(n)%weight_factor 
+                         m1  = m1  + particles(n)%weight_factor * diameter                                                
+                         m2  = m2  + particles(n)%weight_factor * diameter**2           
+                         m3  = m3  + particles(n)%weight_factor * diameter**3
+                      ENDIF   
+                   ENDIF                        
+                ENDDO 
+             ENDDO
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( nr, nr_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+       CALL MPI_ALLREDUCE( rm, rm_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( nrclgb, nrclgb_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( lwc, lwc_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( m1, m1_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( m2, m2_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( m3, m3_total, 1 , &
+       MPI_REAL, MPI_SUM, comm2d, ierr )
+#endif 
+
+!
+!--    Calculate number concentration and mean volume averaged radius.
+       nr_total = MERGE( nr_total / nrclgb_total,                              &
+                         0.0_wp, nrclgb_total > 0.0_wp                         &
+                       )
+       rm_total = MERGE( ( rm_total /                                          &
+                            ( nr_total * factor_volume_to_mass )               &
+                          )**0.3333333_wp, 0.0_wp, nrclgb_total > 0.0_wp       &
+                       )                         
+!
+!--    Check which function should be used to approximate the DSD.
+       IF ( isf == 1 )  THEN
+          lwc_total = MERGE( lwc_total / nrclgb_total,                         &
+                             0.0_wp, nrclgb_total > 0.0_wp                     &
+                           )
+          m1_total  = MERGE( m1_total / nrclgb_total,                          &
+                             0.0_wp, nrclgb_total > 0.0_wp                     &
+                           )
+          m2_total  = MERGE( m2_total / nrclgb_total,                          &
+                             0.0_wp, nrclgb_total > 0.0_wp                     &
+                           )
+          m3_total  = MERGE( m3_total / nrclgb_total,                          &
+                             0.0_wp, nrclgb_total > 0.0_wp                     &
+                           )
+          zeta = m1_total * m3_total / m2_total**2                             
+          mu   = MAX( ( ( 1.0_wp - zeta ) * 2.0_wp + 1.0_wp ) /                &
+                        ( zeta - 1.0_wp ), 0.0_wp                              &
+                    )
+
+          lambda = ( pirho_l * nr_total / lwc_total *                          &
+                     ( mu + 3.0_wp ) * ( mu + 2.0_wp ) * ( mu + 1.0_wp )       &                                          
+                   )**0.3333333_wp
+          nr0 = nr_total / gamma( mu + 1.0_wp ) * lambda**( mu + 1.0_wp ) 
+          
+          DO  n = 0, n_max-1
+             diameter  = r_bin_mid(n) * 2.0_wp           
+             an_spl(n) = nr0 * diameter**mu * EXP( -lambda * diameter ) *      & 
+                         ( r_bin(n+1) - r_bin(n) ) * 2.0_wp 
+          ENDDO
+       ELSEIF ( isf == 2 )  THEN
+          DO  n = 0, n_max-1
+             an_spl(n) = nr_total / ( SQRT( 2.0_wp * pi ) *                    &
+                                     LOG(sigma_log) * r_bin_mid(n)             &
+                                     ) *                                       &
+                         EXP( -( LOG( r_bin_mid(n) / rm_total )**2 ) /         &
+                               ( 2.0_wp * LOG(sigma_log)**2 )                  & 
+                             ) *                                               & 
+                         ( r_bin(n+1) - r_bin(n) )
+          ENDDO
+       ELSEIF( isf == 3 )  THEN
+          DO  n = 0, n_max-1 
+             an_spl(n) = 3.0_wp * nr_total * r_bin_mid(n)**2 / rm_total**3  *  &
+                         EXP( - ( r_bin_mid(n)**3 / rm_total**3 ) )         *  &
+                         ( r_bin(n+1) - r_bin(n) )
+          ENDDO
+       ENDIF
+!
+!--    Criterion to avoid super droplets with a weighting factor < 1.0.
+       an_spl = MAX(an_spl, 1.0_wp)
+  
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                number_of_particles = prt_count(k,j,i)
+                IF ( number_of_particles <= 0  .OR.                            &  
+                     ql(k,j,i) < ql_crit )  CYCLE
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                new_particles_gb = 0         
+!                
+!--             Start splitting operations. Each particle is checked if it
+!--             fulfilled the splitting criterion's. In splitting mode 'cl_av'   
+!--             a critical radius (radius_split) and a splitting function must 
+!--             be prescribed (see particles_par). The critical weighting factor
+!--             is calculated while approximating a 'gamma', 'log' or 'exp'-
+!--             drop size distribution. In this mode the DSD is calculated as 
+!--             an average over all cloudy grid boxes. Super droplets which 
+!--             have a larger radius and larger weighting factor are split into
+!--             'splitting_factor' super droplets. In this case the splitting  
+!--             factor is calculated of weighting factor of the super droplet  
+!--             and the approximated number concentration for droplet of such 
+!--             a size. Due to the splitting, the weighting factor of the  
+!--             super droplet and all created clones is reduced by the factor  
+!--             of 'splitting_facor'.
+                DO  n = 1, number_of_particles
+                   DO  np = 0, n_max-1
+                      IF ( r_bin(np) >= radius_split  .AND.                    &
+                           particles(n)%particle_mask  .AND.                   &
+                           particles(n)%radius >= r_bin(np)  .AND.             &
+                           particles(n)%radius < r_bin(np+1)  .AND.            &
+                           particles(n)%weight_factor >= an_spl(np)  )         &
+                      THEN
+!
+!--                      Calculate splitting factor
+                         splitting_factor =                                    & 
+                             MIN( INT( particles(n)%weight_factor /            &
+                                        an_spl(np)                             &
+                                     ), splitting_factor_max                   &
+                                )
+                         IF ( splitting_factor < 2 )  CYCLE
+!
+!--                      Calculate the new number of particles.                                                           
+                         new_size = prt_count(k,j,i) + splitting_factor - 1
+!
+!--                      Cycle if maximum number of particles per grid box
+!--                      is greater than the allowed maximum number.                         
+                         IF ( new_size >= max_number_particles_per_gridbox )   & 
+                         CYCLE
+!
+!--                      Reallocate particle array if necessary. 
+                         IF ( new_size > SIZE(particles) )  THEN 
+                            CALL realloc_particles_array(i,j,k,new_size)
+                         ENDIF
+                         old_size  = prt_count(k,j,i)                             
+                         new_particles_gb = new_particles_gb +                 &
+                                            splitting_factor - 1
+!
+!--                      Calculate new weighting factor.
+                         particles(n)%weight_factor =                          & 
+                            particles(n)%weight_factor / splitting_factor
+                         tmp_particle = particles(n)
+!
+!--                      Create splitting_factor-1 new particles.                                                  
+                         DO  jpp = 1, splitting_factor-1
+                            grid_particles(k,j,i)%particles(jpp+old_size) =    &
+                                                                    tmp_particle         
+                         ENDDO
+!   
+!--                      Save the new number of super droplets. 
+                         prt_count(k,j,i) = prt_count(k,j,i) +                 &
+                                            splitting_factor - 1
+                      ENDIF
+                   ENDDO
+                ENDDO 
+                
+                new_particles       = new_particles     + new_particles_gb
+                sum_new_particles   = sum_new_particles + new_particles_gb                    
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSEIF ( i_splitting_mode == 3 )  THEN 
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+             
+!
+!--             Initialize summing variables.             
+                lwc = 0.0_wp
+                m1  = 0.0_wp
+                m2  = 0.0_wp
+                m3  = 0.0_wp
+                nr  = 0.0_wp
+                rm  = 0.0_wp  
+                
+                new_particles_gb = 0
+                number_of_particles = prt_count(k,j,i)
+                IF ( number_of_particles <= 0  .OR.                            & 
+                     ql(k,j,i) < ql_crit )  CYCLE
+                particles => grid_particles(k,j,i)%particles
+!                
+!--             Calculate moments of DSD.                
+                DO  n = 1, number_of_particles
+                   IF ( particles(n)%particle_mask  .AND.                      &
+                        particles(n)%radius >= r_min )                         &
+                   THEN
+                      nr  = nr + particles(n)%weight_factor
+                      rm  = rm + factor_volume_to_mass  *                      &
+                                 particles(n)%radius**3  *                     &
+                                 particles(n)%weight_factor
+                      IF ( isf == 1 )  THEN            
+                         diameter   = particles(n)%radius * 2.0_wp           
+                         lwc = lwc + factor_volume_to_mass *                   &
+                                     particles(n)%radius**3 *                  &  
+                                     particles(n)%weight_factor 
+                         m1  = m1 + particles(n)%weight_factor * diameter
+                         m2  = m2 + particles(n)%weight_factor * diameter**2
+                         m3  = m3 + particles(n)%weight_factor * diameter**3
+                      ENDIF      
+                   ENDIF                                            
+                ENDDO  
+
+                IF ( nr <= 0.0  .OR.  rm <= 0.0_wp )  CYCLE 
+!
+!--             Calculate mean volume averaged radius.                
+                rm = ( rm / ( nr * factor_volume_to_mass ) )**0.3333333_wp
+!
+!--             Check which function should be used to approximate the DSD.              
+                IF ( isf == 1 )  THEN
+!
+!--                Gamma size distribution to calculate  
+!--                critical weight_factor (e.g. Marshall + Palmer, 1948).
+                   zeta = m1 * m3 / m2**2
+                   mu   = MAX( ( ( 1.0_wp - zeta ) * 2.0_wp + 1.0_wp ) /       &
+                                ( zeta - 1.0_wp ), 0.0_wp                      &
+                             )   
+                   lambda = ( pirho_l * nr / lwc *                             &
+                              ( mu + 3.0_wp ) * ( mu + 2.0_wp ) *              &
+                              ( mu + 1.0_wp )                                  &                                  
+                            )**0.3333333_wp
+                   nr0 =  ( nr / (gamma( mu + 1.0_wp ) ) ) *                   &
+                          lambda**( mu + 1.0_wp ) 
+
+                   DO  n = 0, n_max-1
+                      diameter         = r_bin_mid(n) * 2.0_wp           
+                      an_spl(n) = nr0 * diameter**mu *                         &
+                                  EXP( -lambda * diameter ) *                  & 
+                                  ( r_bin(n+1) - r_bin(n) ) * 2.0_wp 
+                   ENDDO
+                ELSEIF ( isf == 2 )  THEN
+!
+!--                Lognormal size distribution to calculate critical 
+!--                weight_factor (e.g. Levin, 1971, Bradley + Stow, 1974).   
+                   DO  n = 0, n_max-1
+                      an_spl(n) = nr / ( SQRT( 2.0_wp * pi ) *                 &
+                                              LOG(sigma_log) * r_bin_mid(n)    &
+                                        ) *                                    &
+                                  EXP( -( LOG( r_bin_mid(n) / rm )**2 ) /      &
+                                        ( 2.0_wp * LOG(sigma_log)**2 )         & 
+                                      ) *                                      & 
+                                  ( r_bin(n+1) - r_bin(n) )
+                   ENDDO
+                ELSEIF ( isf == 3 )  THEN
+!
+!--                Exponential size distribution to calculate critical 
+!--                weight_factor (e.g. Berry + Reinhardt, 1974).  
+                   DO  n = 0, n_max-1
+                      an_spl(n) = 3.0_wp * nr * r_bin_mid(n)**2 / rm**3 *     &
+                                  EXP( - ( r_bin_mid(n)**3 / rm**3 ) ) *      &
+                                  ( r_bin(n+1) - r_bin(n) )
+                   ENDDO
+                ENDIF
+                
+!
+!--             Criterion to avoid super droplets with a weighting factor < 1.0.                                   
+                an_spl = MAX(an_spl, 1.0_wp)
+!                
+!--             Start splitting operations. Each particle is checked if it
+!--             fulfilled the splitting criterion's. In splitting mode 'gb_av'   
+!--             a critical radius (radius_split) and a splitting function must 
+!--             be prescribed (see particles_par). The critical weighting factor
+!--             is calculated while appoximating a 'gamma', 'log' or 'exp'-
+!--             drop size distribution. In this mode a DSD is calculated for 
+!--             every cloudy grid box. Super droplets which have a larger 
+!--             radius and larger weighting factor are split into
+!--             'splitting_factor' super droplets. In this case the splitting  
+!--             factor is calculated of weighting factor of the super droplet  
+!--             and theapproximated number concentration for droplet of such 
+!--             a size. Due to the splitting, the weighting factor of the  
+!--             super droplet and all created clones is reduced by the factor  
+!--             of 'splitting_facor'.
+                DO  n = 1, number_of_particles
+                   DO  np = 0, n_max-1
+                      IF ( r_bin(np) >= radius_split  .AND.                    &
+                           particles(n)%particle_mask  .AND.                   &
+                           particles(n)%radius >= r_bin(np)    .AND.           &
+                           particles(n)%radius < r_bin(np+1)   .AND.           &
+                           particles(n)%weight_factor >= an_spl(np) )          &
+                      THEN
+!
+!--                      Calculate splitting factor.
+                         splitting_factor =                                    & 
+                             MIN( INT( particles(n)%weight_factor /            &
+                                        an_spl(np)                             &
+                                     ), splitting_factor_max                   &
+                                )
+                         IF ( splitting_factor < 2 )  CYCLE
+
+!
+!--                      Calculate the new number of particles.                                                                                         
+                         new_size = prt_count(k,j,i) + splitting_factor - 1
+!
+!--                      Cycle if maximum number of particles per grid box
+!--                      is greater than the allowed maximum number.                                                  
+                         IF ( new_size >= max_number_particles_per_gridbox )   &
+                         CYCLE
+!
+!--                      Reallocate particle array if necessary.                          
+                         IF ( new_size > SIZE(particles) )  THEN 
+                            CALL realloc_particles_array(i,j,k,new_size)
+                         ENDIF
+!
+!--                      Calculate new weighting factor.
+                         particles(n)%weight_factor = & 
+                            particles(n)%weight_factor / splitting_factor
+                         tmp_particle               = particles(n)
+                         old_size                   = prt_count(k,j,i)
+!
+!--                      Create splitting_factor-1 new particles.
+                         DO jpp = 1, splitting_factor-1
+                            grid_particles(k,j,i)%particles(jpp+old_size) =    &
+                               tmp_particle                  
+                         ENDDO
+!
+!--                      Save the new number of droplets for every grid box.
+                         prt_count(k,j,i)    = prt_count(k,j,i) +              &
+                                               splitting_factor - 1
+                         new_particles_gb    = new_particles_gb +              &
+                                               splitting_factor - 1                                       
+                      ENDIF
+                   ENDDO  
+                ENDDO
+
+                new_particles       = new_particles + new_particles_gb
+                sum_new_particles   = sum_new_particles + new_particles_gb                                                 
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+        
+    CALL cpu_log( log_point_s(80), 'lpm_splitting', 'stop' )
+
+ END SUBROUTINE lpm_splitting
+ 
Index: /palm/tags/release-6.0/SOURCE/lpm_write_exchange_statistics.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_write_exchange_statistics.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_write_exchange_statistics.f90	(revision 3477)
@@ -0,0 +1,173 @@
+!> @file lpm_write_exchange_statistics.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! nesting routine is only called if nesting is switched on
+! bugfix: missing parallel cpp-directives added
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected,
+! kinds module added and pegrid module scope restricted
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2265 2017-06-08 16:58:28Z schwenkel
+! Unused variables removed.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Write particle statistics (total particle numbers and number of particles
+!> exchanged between subdomains) on ASCII file.
+!>
+!> @attention Output format of this file could be further improved! At current
+!>            stage it is only a test output.
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_write_exchange_statistics
+
+#if defined( __parallel )  &&  !defined( __mpifh )
+    USE MPI
+#endif
+
+    USE control_parameters,                                                    &
+        ONLY:  current_timestep_number, dt_3d, simulated_time
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  number_of_particles, prt_count, trlp_count_sum,                 &
+               trlp_count_recv_sum, trnp_count_sum, trnp_count_recv_sum,       &
+               trrp_count_sum, trrp_count_recv_sum, trsp_count_sum,            &
+               trsp_count_recv_sum
+
+    USE pmc_particle_interface,                                                &
+        ONLY:  pmcp_g_print_number_of_particles
+
+    USE pegrid,                                                                &
+        ONLY:  comm2d, ierr, pleft, pright, psouth, pnorth
+
+    USE pmc_interface,                                                         &
+        ONLY: nested_run
+
+    IMPLICIT NONE
+
+#if defined( __parallel )  &&  defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+
+    INTEGER(iwp) :: ip         !<
+    INTEGER(iwp) :: jp         !<
+    INTEGER(iwp) :: kp         !<
+    INTEGER(iwp) :: tot_number_of_particles
+
+
+
+!
+!-- Determine the current number of particles
+    number_of_particles         = 0
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles = number_of_particles                         &
+                                     + prt_count(kp,jp,ip)
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CALL check_open( 80 )
+#if defined( __parallel )
+    WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
+                        number_of_particles, pleft, trlp_count_sum,      &
+                        trlp_count_recv_sum, pright, trrp_count_sum,     &
+                        trrp_count_recv_sum, psouth, trsp_count_sum,     &
+                        trsp_count_recv_sum, pnorth, trnp_count_sum,     &
+                        trnp_count_recv_sum
+#else
+    WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
+                        number_of_particles
+#endif
+    CALL close_file( 80 )
+
+    IF ( number_of_particles > 0 ) THEN
+        WRITE(9,*) 'number_of_particles ', number_of_particles,                &
+                    current_timestep_number + 1, simulated_time + dt_3d
+    ENDIF
+
+#if defined( __parallel )
+    CALL MPI_ALLREDUCE( number_of_particles, tot_number_of_particles, 1,       &
+                        MPI_INTEGER, MPI_SUM, comm2d, ierr )
+#else
+    tot_number_of_particles = number_of_particles
+#endif
+
+    IF ( nested_run )  THEN
+       CALL pmcp_g_print_number_of_particles( simulated_time+dt_3d,            &
+                                              tot_number_of_particles)
+    ENDIF
+
+!
+!-- Formats
+8000 FORMAT (I6,1X,F7.2,4X,I10,5X,4(I3,1X,I4,'/',I4,2X),6X,I10)
+
+
+ END SUBROUTINE lpm_write_exchange_statistics
Index: /palm/tags/release-6.0/SOURCE/lpm_write_restart_file.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/lpm_write_restart_file.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/lpm_write_restart_file.f90	(revision 3477)
@@ -0,0 +1,145 @@
+!> @file lpm_write_restart_file.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2265 2017-06-08 16:58:28Z schwenkel
+! Unused variables removed.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Tails removed. Unused variables removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! initial revision (former part of advec_particles)
+!
+!
+! Description:
+! ------------
+!> Write particle data in FORTRAN binary format on restart file
+!------------------------------------------------------------------------------!
+ SUBROUTINE lpm_write_restart_file
+
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t, grid_particles,       &
+               number_of_particles, number_of_particle_groups,                 &
+               particles, particle_groups, prt_count, time_prel,               &
+               time_write_particle_data
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=10) ::  particle_binary_version   !<
+
+    INTEGER(iwp) ::  ip                              !<
+    INTEGER(iwp) ::  jp                              !<
+    INTEGER(iwp) ::  kp                              !<
+
+!
+!-- First open the output unit.
+    IF ( myid_char == '' )  THEN
+       OPEN ( 90, FILE='PARTICLE_RESTART_DATA_OUT'//myid_char, &
+                  FORM='UNFORMATTED')
+    ELSE
+       IF ( myid == 0 )  CALL local_system( 'mkdir PARTICLE_RESTART_DATA_OUT' )
+#if defined( __parallel )
+!
+!--    Set a barrier in order to allow that thereafter all other processors
+!--    in the directory created by PE0 can open their file
+       CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       OPEN ( 90, FILE='PARTICLE_RESTART_DATA_OUT/'//myid_char, &
+                  FORM='UNFORMATTED' )
+    ENDIF
+
+!
+!-- Write the version number of the binary format.
+!-- Attention: After changes to the following output commands the version
+!-- ---------  number of the variable particle_binary_version must be
+!--            changed! Also, the version number and the list of arrays
+!--            to be read in lpm_read_restart_file must be adjusted
+!--            accordingly.
+    particle_binary_version = '4.0'
+    WRITE ( 90 )  particle_binary_version
+
+!
+!-- Write some particle parameters, the size of the particle arrays as
+!-- well as other dvrp-plot variables.
+    WRITE ( 90 )  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,              &
+                  number_of_particle_groups, particle_groups, time_prel, &
+                  time_write_particle_data
+
+    WRITE ( 90 )  prt_count
+          
+    DO  ip = nxl, nxr
+       DO  jp = nys, nyn
+          DO  kp = nzb+1, nzt
+             number_of_particles = prt_count(kp,jp,ip)
+             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+             IF ( number_of_particles <= 0 )  CYCLE
+             WRITE ( 90 )  particles
+          ENDDO
+       ENDDO
+    ENDDO
+
+    CLOSE ( 90 )
+
+#if defined( __parallel )
+       CALL MPI_BARRIER( comm2d, ierr )
+#endif
+
+
+ END SUBROUTINE lpm_write_restart_file
Index: /palm/tags/release-6.0/SOURCE/message.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/message.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/message.f90	(revision 3477)
@@ -0,0 +1,339 @@
+!> @file message.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Minor formating changes
+! 
+! 3247 2018-09-14 07:06:30Z sward
+! Subroutine description updated and parin_fail_message now also outputs
+! the line number in which namelist reading failed
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added SUBROUTINE parin_fail_message for error handling of input namelists
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3019 2018-05-13 07:05:43Z maronga
+! Temporaraly deactivate MPI_BARRIER as long as nested systems freeze due to
+! asynchronous calls of location_message.
+! 
+! 2961 2018-04-12 10:13:48Z suehring
+! Synchronize location message between parent and child. Message will be not 
+! flushed before all models finished their respective task.  
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_flush replaced by FORTRAN statement
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! nest id added to header string, add linefeed to stdout to get messages better
+! seperated from the location messages,
+! in case of nested runs, location messages are given only by the root domain
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1664 2015-09-23 06:18:12Z knoop
+! updated information_string_2 to meet the new server structure
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! formatting of messages modified
+! 
+! 1384 2014-05-02 14:31:06Z raasch
+! routine location_message added
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 213 2008-11-13 10:26:18Z raasch
+! Initial revision
+!
+! Description:
+! ------------
+!> Handling of the different kinds of messages.
+!> Meaning of formal parameters:
+!> requested_action: 0 - continue, 1 - abort by stop, 2 - abort by mpi_abort
+!>                   3 - abort by mpi_abort using MPI_COMM_WORLD
+!> message_level: 0 - informative, 1 - warning, 2 - error
+!> output_on_pe: -1 - all, else - output on specified PE
+!> file_id: 6 - stdout (*)
+!> flush_file: 0 - no action, 1 - flush the respective output buffer
+!------------------------------------------------------------------------------!
+ SUBROUTINE message( routine_name, message_identifier, requested_action, &
+                     message_level, output_on_pe, file_id, flush_file )
+ 
+    USE control_parameters,                                                    &
+        ONLY:  abort_mode, message_string
+
+    USE kinds
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  cpl_id, nested_run
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=6)   ::  message_identifier            !<
+    CHARACTER(LEN=20)  ::  nest_string                   !< nest id information
+    CHARACTER(LEN=*)   ::  routine_name                  !<
+    CHARACTER(LEN=200) ::  header_string                 !<
+    CHARACTER(LEN=200) ::  information_string_1          !<
+    CHARACTER(LEN=200) ::  information_string_2          !<
+
+    INTEGER(iwp) ::  file_id                             !<
+    INTEGER(iwp) ::  flush_file                          !<
+    INTEGER(iwp) ::  i                                   !<
+    INTEGER(iwp) ::  message_level                       !<
+    INTEGER(iwp) ::  output_on_pe                        !<
+    INTEGER(iwp) ::  requested_action                    !<
+
+    LOGICAL ::  do_output                                !<
+    LOGICAL ::  pe_out_of_range                          !<
+
+
+    do_output       = .FALSE.
+    pe_out_of_range = .FALSE.
+
+!
+!-- In case of nested runs create the nest id informations
+    IF ( nested_run )  THEN
+       WRITE( nest_string, '(1X,A,I2.2)' )  'from nest-id ', cpl_id
+    ELSE
+       nest_string = ''
+    ENDIF
+!
+!-- Create the complete output string, starting with the message level
+    IF ( message_level == 0 )  THEN
+       header_string = '--- informative message' // TRIM(nest_string) //       &
+                       ' ---  ID:'
+    ELSEIF ( message_level == 1 )  THEN
+       header_string = '+++ warning message' // TRIM(nest_string) // ' ---  ID:'
+    ELSEIF ( message_level == 2 )  THEN
+       header_string = '+++ error message' // TRIM(nest_string) // ' ---  ID:'
+    ELSE
+       WRITE( header_string,'(A,I2)' )  '+++ unknown message level' //         &
+                                        TRIM(nest_string) // ': ',             &
+                                        message_level
+    ENDIF
+
+!
+!-- Add the message identifier and the generating routine
+    header_string = TRIM( header_string ) // ' ' // message_identifier // &
+                    '   generated by routine: ' // TRIM( routine_name )
+  
+    information_string_1 = 'Further information can be found at'
+    IF(message_identifier(1:2) == 'NC') THEN
+       information_string_2 = 'http://palm.muk.uni-hannover.de/trac/wiki/doc' // &
+                              '/app/errmsg#NC'
+    ELSE
+       information_string_2 = 'http://palm.muk.uni-hannover.de/trac/wiki/doc' // &
+                              '/app/errmsg#' // message_identifier
+    ENDIF
+    
+
+!
+!-- Output the output string and the corresponding message string which had
+!-- been already assigned in the calling subroutine.
+!
+!-- First find out if output shall be done on this PE.
+    IF ( output_on_pe == -1 )  THEN
+       do_output = .TRUE.
+    ELSEIF ( myid == output_on_pe )  THEN
+       do_output = .TRUE.
+    ENDIF
+#if defined( __parallel )
+!
+!-- In case of illegal pe number output on pe0
+    IF ( output_on_pe > numprocs-1 )  THEN
+       pe_out_of_range = .TRUE.
+       IF ( myid == 0 )  do_output = .TRUE.
+    ENDIF
+#endif
+
+!
+!-- Now do the output
+    IF ( do_output )  THEN
+
+       IF ( file_id == 6 )  THEN
+!
+!--       Output on stdout
+          WRITE( *, '(//A/)' )  TRIM( header_string )
+!
+!--       Cut message string into pieces and output one piece per line.
+!--       Remove leading blanks.
+          message_string = ADJUSTL( message_string )
+          i = INDEX( message_string, '&' )
+          DO WHILE ( i /= 0 )
+             WRITE( *, '(4X,A)' )  ADJUSTL( message_string(1:i-1) )
+             message_string = ADJUSTL( message_string(i+1:) )
+             i = INDEX( message_string, '&' )
+          ENDDO
+          WRITE( *, '(4X,A)' )  TRIM( message_string )
+          WRITE( *, '(4X,A)' )  ''
+          WRITE( *, '(4X,A)' )  TRIM( information_string_1 ) 
+          WRITE( *, '(4X,A)' )  TRIM( information_string_2 ) 
+          WRITE( *, '(4X,A)' )  ''
+
+       ELSE
+!
+!--       Output on requested file id (file must have been opened elsewhere!)
+          WRITE( file_id, '(A/)' )  TRIM( header_string )
+!
+!--       Cut message string into pieces and output one piece per line.
+!--       Remove leading blanks.
+          message_string = ADJUSTL( message_string )
+          i = INDEX( message_string, '&' )
+          DO WHILE ( i /= 0 )
+             WRITE( file_id, '(4X,A)' )  ADJUSTL( message_string(1:i-1) )
+             message_string = ADJUSTL( message_string(i+1:) )
+             i = INDEX( message_string, '&' )
+          ENDDO
+          WRITE( file_id, '(4X,A)' )  TRIM( message_string )
+          WRITE( file_id, '(4X,A)' )  ''
+          WRITE( file_id, '(4X,A)' )  TRIM( information_string_1 ) 
+          WRITE( file_id, '(4X,A)' )  TRIM( information_string_2 ) 
+          WRITE( file_id, '(4X,A)' )  ''
+!
+!--       Flush buffer, if requested
+          IF ( flush_file == 1 )  FLUSH( file_id )
+       ENDIF
+
+       IF ( pe_out_of_range )  THEN
+          WRITE ( *, '(A)' )  '+++ WARNING from routine message:'
+          WRITE ( *, '(A,I6,A)' )  '    PE ', output_on_pe, &
+                                   ' choosed for output is larger '
+          WRITE ( *, '(A,I6)' )  '    than the maximum number of used PEs', &
+                                 numprocs-1
+          WRITE ( *, '(A)' )  '    Output is done on PE0 instead'
+       ENDIF
+
+    ENDIF
+
+!
+!-- Abort execution, if requested
+    IF ( requested_action > 0 )  THEN
+       abort_mode = requested_action
+       CALL local_stop
+    ENDIF
+
+ END SUBROUTINE message
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prints out the given location on stdout
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE location_message( location, advance )
+
+
+    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                        &
+        ONLY:  OUTPUT_UNIT
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  cpl_id
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*) ::  location !< text to be output on stdout
+    LOGICAL          ::  advance  !< switch for advancing/noadvancing I/O
+
+!
+!-- Output for nested runs only on the root domain
+    IF ( cpl_id /= 1 )  RETURN
+
+    IF ( myid == 0 )  THEN
+       IF ( advance )  THEN
+          WRITE ( OUTPUT_UNIT, '(6X,''--- '',A)' )  TRIM( location )
+       ELSE
+          WRITE ( OUTPUT_UNIT, '(6X,''... '',A)', ADVANCE='NO' )               &
+                TRIM( location )
+       ENDIF
+       FLUSH( OUTPUT_UNIT )
+    ENDIF
+
+ END SUBROUTINE location_message
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Abort routine for failures durin reading of namelists
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE parin_fail_message( location, line )
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*) ::  location !< text to be output on stdout
+    CHARACTER(LEN=*) ::  line
+
+    CHARACTER(LEN=80) ::  line_dum
+
+    INTEGER(iwp) ::  line_counter
+
+    line_dum = ' '
+    line_counter = 0
+
+    REWIND( 11 )
+    DO WHILE ( INDEX( line_dum, TRIM(line) ) == 0 )
+       READ ( 11, '(A)', END=20 )  line_dum
+       line_counter = line_counter + 1
+    ENDDO
+
+ 20 WRITE( message_string, '(A,I3,A)' )                                        &
+                   'Error(s) in NAMELIST '// TRIM(location) //                 &
+                   '&Reading fails on line ', line_counter,                    &
+                   ' at&' // line
+    CALL message( 'parin', 'PA0271', 1, 2, 0, 6, 0 )
+
+ END SUBROUTINE parin_fail_message
Index: /palm/tags/release-6.0/SOURCE/mod_kinds.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/mod_kinds.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/mod_kinds.f90	(revision 3477)
@@ -0,0 +1,74 @@
+!> @file mod_kinds.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1306 2014-03-13 14:30:59Z raasch
+! Initial revision
+!
+! Description:
+! ------------
+!> Standard kind definitions
+!> wp (working precision) and iwp (integer working precision) are the kinds
+!> used by default in all variable declarations.
+!> By default, PALM is using wp = dp (64bit), and iwp = isp (32bit).
+!> If you like to switch to other precision, then please set wp/iwp
+!> appropriately by assigning other kinds below.
+!------------------------------------------------------------------------------!
+ MODULE kinds
+ 
+
+    IMPLICIT NONE
+
+!
+!-- Floating point kinds
+    INTEGER, PARAMETER ::  sp = 4           !< single precision (32 bit)
+    INTEGER, PARAMETER ::  dp = 8           !< double precision (64 bit)
+
+!
+!-- Integer kinds
+    INTEGER, PARAMETER ::  isp = SELECTED_INT_KIND(  9 )   !< single precision (32 bit)
+    INTEGER, PARAMETER ::  idp = SELECTED_INT_KIND( 14 )   !< double precision (64 bit)
+
+!
+!-- Set kinds to be used as defaults
+    INTEGER, PARAMETER ::   wp =  dp          !< default real kind
+    INTEGER, PARAMETER ::  iwp = isp          !< default integer kind
+
+    SAVE
+
+ END MODULE kinds
Index: /palm/tags/release-6.0/SOURCE/mod_particle_attributes.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/mod_particle_attributes.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/mod_particle_attributes.f90	(revision 3477)
@@ -0,0 +1,280 @@
+!> @file mod_particle_attributes.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! bugfix: BIND attribute added to derived type particle_type
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2375 2017-08-29 14:10:28Z schwenkel
+! molecular_weight_of_solute, molecular_weight_of_water, vanthoff removed and 
+! added in modules. Parameters are also used in bulk-microphysics.
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! Aerosol initialization improved.
+!
+! 2305 2017-07-06 11:18:47Z hoffmann
+! Improved calculation of particle IDs.
+!
+! 2278 2017-06-12 13:08:18Z schwenkel
+! Added comments
+!
+! 2265 2017-06-08 16:58:28Z schwenkel
+! Unused variables removed.
+!
+! 2263 2017-06-08 14:59:01Z schwenkel
+! Implemented splitting and merging algorithm
+!
+! 2183 2017-03-17 14:29:15Z schwenkel
+!
+! 2182 2017-03-17 14:27:40Z schwenkel
+! Added parameters for simplified particle initialization.
+!
+! 2122 2017-01-18 12:22:54Z hoffmann
+! Calculation of particle ID
+! Particle attribute dvrp_psize renamed to user: this attribute can be used by
+! by the user to store any variable
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1936 2016-06-13 13:37:44Z suehring
+! +deallocate_memory, step_dealloc
+!
+! 1929 2016-06-09 16:25:25Z suehring
+! -sgs_wfu_par, sgs_wfv_par, sgs_wfw_par
+! + sgs_wf_par
+!
+! 1871 2016-04-15 11:46:09Z hoffmann
+! Initialization of aerosols added.
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
+! vanthoff added from modules
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! palm_kernel removed, curvature_solution_effects added
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! +collision_algorithm, all_or_nothing, average_impact
+! Tails removed.
+!
+! 1727 2015-11-20 07:22:02Z knoop
+! Bugfix: Cause of syntax warning gfortran preprocessor removed
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! +seed_follows_topography
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! new module containing all particle related variables
+! -dt_sort_particles
+!
+! Description:
+! ------------
+!> Definition of variables used to compute particle transport
+!------------------------------------------------------------------------------!
+MODULE particle_attributes
+
+    USE, INTRINSIC ::  ISO_C_BINDING
+
+    USE kinds
+
+    CHARACTER(LEN=15) ::  aero_species = 'nacl'                    !< aerosol species
+    CHARACTER(LEN=15) ::  aero_type    = 'maritime'                !< aerosol type
+    CHARACTER(LEN=15) ::  bc_par_lr    = 'cyclic'                  !< left/right boundary condition
+    CHARACTER(LEN=15) ::  bc_par_ns    = 'cyclic'                  !< north/south boundary condition
+    CHARACTER(LEN=15) ::  bc_par_b     = 'reflect'                 !< bottom boundary condition
+    CHARACTER(LEN=15) ::  bc_par_t     = 'absorb'                  !< top boundary condition
+    CHARACTER(LEN=15) ::  collision_kernel   = 'none'              !< collision kernel
+    CHARACTER(LEN=5)  ::  splitting_function = 'gamma'             !< function for calculation critical weighting factor
+    CHARACTER(LEN=5)  ::  splitting_mode     = 'const'             !< splitting mode
+
+    INTEGER(iwp) ::  deleted_particles = 0                        !< number of deleted particles per time step
+    INTEGER(iwp) ::  dissipation_classes = 10                     !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  ibc_par_b                                    !< particle bottom boundary condition dummy
+    INTEGER(iwp) ::  ibc_par_lr                                   !< particle left/right boundary condition dummy
+    INTEGER(iwp) ::  ibc_par_ns                                   !< particle north/south boundary condition dummy
+    INTEGER(iwp) ::  ibc_par_t                                    !< particle top boundary condition dummy
+    INTEGER(iwp) ::  iran_part = -1234567                         !< number for random generator
+    INTEGER(iwp) ::  isf                                          !< dummy for splitting function
+    INTEGER(iwp) ::  i_splitting_mode                             !< dummy for splitting mode
+    INTEGER(iwp) ::  max_number_particles_per_gridbox = 100       !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  merge_drp = 0                                !< number of merged droplets
+    INTEGER(iwp) ::  min_nr_particle = 50                         !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  new_particles = 0                            !< number of new particles
+    INTEGER(iwp) ::  n_max = 100                                  !< number of radii bin for splitting functions
+    INTEGER(iwp) ::  number_of_particles = 0                      !< number of particles for each grid box (3d array is saved on prt_count)
+    INTEGER(iwp) ::  number_of_particle_groups = 1                !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  number_of_sublayers = 20                     !< number of sublayers for particle velocities betwenn surface and first grid level
+    INTEGER(iwp) ::  number_particles_per_gridbox = -1            !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  offset_ocean_nzt = 0                         !< in case of oceans runs, the vertical index calculations need an offset
+    INTEGER(iwp) ::  offset_ocean_nzt_m1 = 0                      !< in case of oceans runs, the vertical index calculations need an offset
+    INTEGER(iwp) ::  particles_per_point = 1                      !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  radius_classes = 20                          !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  sort_count = 0                               !< counter for sorting particles
+    INTEGER(iwp) ::  splitting_factor = 2                         !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  splitting_factor_max = 5                     !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  step_dealloc = 100                           !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  sum_merge_drp = 0                            !< sum of merged super droplets
+    INTEGER(iwp) ::  sum_new_particles = 0                        !< sum of created particles (in splitting algorithm)
+    INTEGER(iwp) ::  total_number_of_particles                    !< total number of particles in the whole model domain
+    INTEGER(iwp) ::  trlp_count_sum                               !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trlp_count_recv_sum                          !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trrp_count_sum                               !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trrp_count_recv_sum                          !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trsp_count_sum                               !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trsp_count_recv_sum                          !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trnp_count_sum                               !< parameter for particle exchange of PEs
+    INTEGER(iwp) ::  trnp_count_recv_sum                          !< parameter for particle exchange of PEs
+
+    INTEGER(iwp), PARAMETER ::  max_number_of_particle_groups = 10 !< maximum allowed number of particle groups
+
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  prt_count  !< 3d array of number of particles of every grid box
+
+    LOGICAL ::  curvature_solution_effects = .FALSE.      !< namelist parameter (see documentation)
+    LOGICAL ::  deallocate_memory = .TRUE.                !< namelist parameter (see documentation)
+    LOGICAL ::  hall_kernel = .FALSE.                     !< flag for collision kernel
+    LOGICAL ::  merging = .FALSE.                         !< namelist parameter (see documentation)
+    LOGICAL ::  particle_advection = .FALSE.              !< parameter to steer the advection of particles
+    LOGICAL ::  random_start_position = .FALSE.           !< namelist parameter (see documentation)
+    LOGICAL ::  read_particles_from_restartfile = .TRUE.  !< namelist parameter (see documentation)
+    LOGICAL ::  seed_follows_topography = .FALSE.         !< namelist parameter (see documentation)
+    LOGICAL ::  splitting = .FALSE.                       !< namelist parameter (see documentation)
+    LOGICAL ::  use_kernel_tables = .FALSE.               !< parameter, which turns on the use of precalculated collision kernels
+    LOGICAL ::  use_sgs_for_particles = .FALSE.           !< namelist parameter (see documentation)
+    LOGICAL ::  wang_kernel = .FALSE.                     !< flag for collision kernel
+    LOGICAL ::  write_particle_statistics = .FALSE.       !< namelist parameter (see documentation)
+
+    LOGICAL, DIMENSION(max_number_of_particle_groups) ::                       &
+                vertical_particle_advection = .TRUE.              !< Switch on/off vertical particle transport
+
+    REAL(wp) ::  aero_weight = 1.0_wp                      !< namelist parameter (see documentation)
+    REAL(wp) ::  alloc_factor = 20.0_wp                    !< namelist parameter (see documentation)
+    REAL(wp) ::  c_0 = 3.0_wp                              !< parameter for lagrangian timescale
+    REAL(wp) ::  dt_min_part = 0.0002_wp                   !< minimum particle time step when SGS velocities are used (s)
+    REAL(wp) ::  dt_prel = 9999999.9_wp                    !< namelist parameter (see documentation)
+    REAL(wp) ::  dt_write_particle_data = 9999999.9_wp     !< namelist parameter (see documentation)
+    REAL(wp) ::  end_time_prel = 9999999.9_wp              !< namelist parameter (see documentation)
+    REAL(wp) ::  initial_weighting_factor = 1.0_wp         !< namelist parameter (see documentation)
+    REAL(wp) ::  log_sigma(3) = 1.0_wp                     !< namelist parameter (see documentation)
+    REAL(wp) ::  na(3) = 0.0_wp                            !< namelist parameter (see documentation)
+    REAL(wp) ::  number_concentration = -1.0_wp            !< namelist parameter (see documentation)
+    REAL(wp) ::  particle_advection_start = 0.0_wp         !< namelist parameter (see documentation)
+    REAL(wp) ::  radius_merge = 1.0E-7_wp                  !< namelist parameter (see documentation)
+    REAL(wp) ::  radius_split = 40.0E-6_wp                 !< namelist parameter (see documentation)
+    REAL(wp) ::  rm(3) = 1.0E-6_wp                         !< namelist parameter (see documentation)
+    REAL(wp) ::  sgs_wf_part                               !< parameter for sgs
+    REAL(wp) ::  time_prel = 0.0_wp                        !< time for particle release
+    REAL(wp) ::  time_write_particle_data = 0.0_wp         !< write particle data at current time on file
+    REAL(wp) ::  weight_factor_merge = -1.0_wp             !< namelist parameter (see documentation)
+    REAL(wp) ::  weight_factor_split = -1.0_wp             !< namelist parameter (see documentation)
+    REAL(wp) ::  z0_av_global                              !< horizontal mean value of z0
+
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  density_ratio = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdx = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdy = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pdz = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psb = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psl = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psn = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  psr = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pss = 9999999.9_wp            !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  pst = 9999999.9_wp            !< namelist parameter (see documentation).
+    REAL(wp), DIMENSION(max_number_of_particle_groups) ::  radius = 9999999.9_wp         !< namelist parameter (see documentation)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE     ::  log_z_z0   !< Precalculate LOG(z/z0)
+
+
+    TYPE, BIND(C) ::  particle_type
+        REAL(wp)     ::  aux1          !< auxiliary multi-purpose feature
+        REAL(wp)     ::  aux2          !< auxiliary multi-purpose feature
+        REAL(wp)     ::  radius        !< radius of particle
+        REAL(wp)     ::  age           !< age of particle
+        REAL(wp)     ::  age_m         !<
+        REAL(wp)     ::  dt_sum        !<
+        REAL(wp)     ::  e_m           !< interpolated sgs tke
+        REAL(wp)     ::  origin_x      !< origin x-position of particle (changed cyclic bc)
+        REAL(wp)     ::  origin_y      !< origin y-position of particle (changed cyclic bc)
+        REAL(wp)     ::  origin_z      !< origin z-position of particle (changed cyclic bc)
+        REAL(wp)     ::  rvar1         !<
+        REAL(wp)     ::  rvar2         !<
+        REAL(wp)     ::  rvar3         !<
+        REAL(wp)     ::  speed_x       !< speed of particle in x
+        REAL(wp)     ::  speed_y       !< speed of particle in y
+        REAL(wp)     ::  speed_z       !< speed of particle in z
+        REAL(wp)     ::  weight_factor !< weighting factor
+        REAL(wp)     ::  x             !< x-position
+        REAL(wp)     ::  y             !< y-position
+        REAL(wp)     ::  z             !< z-position
+        INTEGER(iwp) ::  class         !< radius class needed for collision
+        INTEGER(iwp) ::  group         !< number of particle group
+        INTEGER(idp) ::  id            !< particle ID (64 bit integer)
+        LOGICAL      ::  particle_mask !< if this parameter is set to false the particle will be deleted
+        INTEGER(iwp) ::  block_nr      !< number for sorting (removable?)
+    END TYPE particle_type
+
+    TYPE(particle_type), DIMENSION(:), POINTER ::  particles       !< Particle array for this grid cell
+    TYPE(particle_type)                        ::  zero_particle   !< zero particle to avoid weird thinge
+
+    TYPE particle_groups_type
+        SEQUENCE
+        REAL(wp) ::  density_ratio  !< density ratio of the fluid and the particles
+        REAL(wp) ::  radius         !< radius of particle
+        REAL(wp) ::  exp_arg        !< exponential term of particle inertia
+        REAL(wp) ::  exp_term       !< exponential term of particle inertia
+    END TYPE particle_groups_type
+
+    TYPE(particle_groups_type), DIMENSION(max_number_of_particle_groups) ::    &
+       particle_groups
+
+    TYPE  grid_particle_def
+        INTEGER(iwp), DIMENSION(0:7)               ::  start_index        !< start particle index for current block
+        INTEGER(iwp), DIMENSION(0:7)               ::  end_index          !< end particle index for current block
+        INTEGER(iwp)                               ::  id_counter         !< particle id counter
+        LOGICAL                                    ::  time_loop_done     !< timestep loop for particle advection
+        TYPE(particle_type), POINTER, DIMENSION(:) ::  particles          !< Particle array for this grid cell
+    END TYPE grid_particle_def
+
+    TYPE(grid_particle_def), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  grid_particles
+
+    TYPE block_offset_def          !<
+        INTEGER(iwp) ::  i_off     !<
+        INTEGER(iwp) ::  j_off     !<
+        INTEGER(iwp) ::  k_off     !<
+    END TYPE block_offset_def
+
+    TYPE(block_offset_def), DIMENSION(0:7)         ::  block_offset
+
+    SAVE
+
+
+END MODULE particle_attributes
Index: /palm/tags/release-6.0/SOURCE/model_1d_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/model_1d_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/model_1d_mod.f90	(revision 3477)
@@ -0,0 +1,1171 @@
+!> @file model_1d_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3135 2018-07-16 14:43:04Z gronemeier
+! Bugfix: add +1 to c_3 according to Sogachev et al. (2012)
+! 
+! 3126 2018-07-13 15:13:54Z gronemeier
+! Bugfix: define c_0 = 0.03^0.25 = 0.416179145
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! Bugfixes:
+!   - preset te_diss and te_e to avoid runtime errors
+!   - implementation of buoyancy term to dissipation
+!     according to Sogachev et al. (2012)
+!   - where diss_p < 0 set diss_p = 0.1 diss
+!   - calculate progn eq(diss) starting from nzb+1
+! Changes:
+!   - add sig_e to TKE equation
+!   - adjust prognostic equation of diss
+!   - set model constants according to Koblitz (2013)
+!   - renamed c_m to c_0
+!   - rename l_black into l1d_init
+!   - calculate l_grid within init_1d_model and save it as l1d_init
+!   - calculate l1d according to DE85 if dissipation is a prognostic value
+!   - made annotations doxygen-readable
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2965 2018-04-13 07:37:25Z scharf
+! adjusted format string for 1D run control output
+! 
+! 2918 2018-03-21 15:52:14Z gronemeier
+! - rename l_black into l1d_init
+! - calculate l_grid within init_1d_model and save it as l1d_init
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! implement TKE-e closure
+! modification of dissipation production according to Detering and Etling
+! reduced factor for timestep criterion to 0.125 and first dt to 1s (TG)
+! 
+! 2339 2017-08-07 13:55:26Z gronemeier
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! renamed init_1d_model to model_1d_mod and and formatted it as a module;
+! reformatted output of profiles
+! 
+! 2337 2017-08-07 08:59:53Z gronemeier
+! revised calculation of mixing length
+! removed rounding of time step
+! corrected calculation of virtual potential temperature
+! 
+! 2334 2017-08-04 11:57:04Z gronemeier
+! set c_m = 0.4 according to Detering and Etling (1985)
+! 
+! 2299 2017-06-29 10:14:38Z maronga
+! Removed german text
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2059 2016-11-10 14:20:40Z maronga
+! Corrected min/max values of Rif.
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Remove passive_scalar from IF-statements, as 1D-scalar profile is effectively
+! not used.
+! Formatting adjustment
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_flush replaced by FORTRAN statement
+!
+! 1709 2015-11-04 14:47:01Z maronga
+! Set initial time step to 10 s to avoid instability of the 1d model for small
+! grid spacings
+!
+! 1697 2015-10-28 17:14:10Z raasch
+! small E- and F-FORMAT changes to avoid informative compiler messages about
+! insufficient field width
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Renamed prandtl_layer to constant_flux_layer. rif is replaced by ol and zeta.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1346 2014-03-27 13:18:20Z heinze
+! Bugfix: REAL constants provided with KIND-attribute especially in call of 
+! intrinsic function like MAX, MIN, SIGN
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! adjustment of mixing length to the Prandtl mixing length at first grid point
+! above ground removed
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog scheme removed
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+!
+! 978 2012-08-09 08:28:32Z fricke
+! roughness length for scalar quantities z0h1d added
+!
+! Revision 1.1  1998/03/09 16:22:10  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> 1D-model to initialize the 3D-arrays.
+!> The temperature profile is set as steady and a corresponding steady solution 
+!> of the wind profile is being computed.
+!> All subroutines required can be found within this file.
+!>
+!> @todo harmonize code with new surface_layer_fluxes module
+!> @bug 1D model crashes when using small grid spacings in the order of 1 m
+!> @fixme option "as_in_3d_model" seems to be an inappropriate option because
+!>        the 1D model uses different turbulence closure approaches at least if
+!>        the 3D model is set to LES-mode.
+!------------------------------------------------------------------------------!
+ MODULE model_1d_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  dd2zu, ddzu, ddzw, dzu, dzw, pt_init, q_init, ug, u_init,       &
+               vg, v_init, zu
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, kappa, pi
+    
+    USE control_parameters,                                                    &
+        ONLY:  constant_diffusion, constant_flux_layer, dissipation_1d, f,     &
+               humidity, ibc_e_b, intermediate_timestep_count,                 &
+               intermediate_timestep_count_max, km_constant,                   &
+               message_string, mixing_length_1d, prandtl_number,               &
+               roughness_length, run_description_header, simulated_time_chr,   &
+               timestep_scheme, tsc, z0h_factor
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzb_diff, nzt
+    
+    USE kinds
+
+    USE pegrid,                                                                &
+        ONLY:  myid
+        
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  current_timestep_number_1d = 0  !< current timestep number (1d-model)
+    INTEGER(iwp) ::  damp_level_ind_1d               !< lower grid index of damping layer (1d-model)
+
+    LOGICAL ::  run_control_header_1d = .FALSE.  !< flag for output of run control header (1d-model)
+    LOGICAL ::  stop_dt_1d = .FALSE.             !< termination flag, used in case of too small timestep (1d-model)
+
+    REAL(wp) ::  alpha_buoyancy                !< model constant according to Koblitz (2013)
+    REAL(wp) ::  c_0 = 0.416179145_wp          !< = 0.03^0.25; model constant according to Koblitz (2013)
+    REAL(wp) ::  c_1 = 1.52_wp                 !< model constant according to Koblitz (2013)
+    REAL(wp) ::  c_2 = 1.83_wp                 !< model constant according to Koblitz (2013)
+    REAL(wp) ::  c_3                           !< model constant
+    REAL(wp) ::  c_mu                          !< model constant
+    REAL(wp) ::  damp_level_1d = -1.0_wp       !< namelist parameter
+    REAL(wp) ::  dt_1d = 60.0_wp               !< dynamic timestep (1d-model)
+    REAL(wp) ::  dt_max_1d = 300.0_wp          !< timestep limit (1d-model)
+    REAL(wp) ::  dt_pr_1d = 9999999.9_wp       !< namelist parameter
+    REAL(wp) ::  dt_run_control_1d = 60.0_wp   !< namelist parameter
+    REAL(wp) ::  end_time_1d = 864000.0_wp     !< namelist parameter
+    REAL(wp) ::  lambda                        !< maximum mixing length
+    REAL(wp) ::  qs1d                          !< characteristic humidity scale (1d-model)
+    REAL(wp) ::  simulated_time_1d = 0.0_wp    !< updated simulated time (1d-model)
+    REAL(wp) ::  sig_diss = 2.95_wp            !< model constant according to Koblitz (2013)
+    REAL(wp) ::  sig_e = 2.95_wp               !< model constant according to Koblitz (2013)
+    REAL(wp) ::  time_pr_1d = 0.0_wp           !< updated simulated time for profile output (1d-model)
+    REAL(wp) ::  time_run_control_1d = 0.0_wp  !< updated simulated time for run-control output (1d-model)
+    REAL(wp) ::  ts1d                          !< characteristic temperature scale (1d-model)
+    REAL(wp) ::  us1d                          !< friction velocity (1d-model)
+    REAL(wp) ::  usws1d                        !< u-component of the momentum flux (1d-model)
+    REAL(wp) ::  vsws1d                        !< v-component of the momentum flux (1d-model)
+    REAL(wp) ::  z01d                          !< roughness length for momentum (1d-model)
+    REAL(wp) ::  z0h1d                         !< roughness length for scalars (1d-model)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  diss1d   !< tke dissipation rate (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  diss1d_p !< prognostic value of tke dissipation rate (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  e1d      !< tke (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  e1d_p    !< prognostic value of tke (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  kh1d     !< turbulent diffusion coefficient for heat (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  km1d     !< turbulent diffusion coefficient for momentum (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l1d      !< mixing length for turbulent diffusion coefficients (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l1d_init !< initial mixing length (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l1d_diss !< mixing length for dissipation (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rif1d    !< Richardson flux number (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_diss  !< tendency of diss (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_dissm !< weighted tendency of diss for previous sub-timestep (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_e     !< tendency of e (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_em    !< weighted tendency of e for previous sub-timestep (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_u     !< tendency of u (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_um    !< weighted tendency of u for previous sub-timestep (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_v     !< tendency of v (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  te_vm    !< weighted tendency of v for previous sub-timestep (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u1d      !< u-velocity component (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u1d_p    !< prognostic value of u-velocity component (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v1d      !< v-velocity component (1d-model)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v1d_p    !< prognostic value of v-velocity component (1d-model)
+
+!
+!-- Initialize 1D model
+    INTERFACE init_1d_model
+       MODULE PROCEDURE init_1d_model
+    END INTERFACE init_1d_model
+
+!
+!-- Print profiles
+    INTERFACE print_1d_model
+       MODULE PROCEDURE print_1d_model
+    END INTERFACE print_1d_model
+
+!
+!-- Print run control information
+    INTERFACE run_control_1d
+       MODULE PROCEDURE run_control_1d
+    END INTERFACE run_control_1d
+
+!
+!-- Main procedure
+    INTERFACE time_integration_1d
+       MODULE PROCEDURE time_integration_1d
+    END INTERFACE time_integration_1d
+
+!
+!-- Calculate time step
+    INTERFACE timestep_1d
+       MODULE PROCEDURE timestep_1d
+    END INTERFACE timestep_1d
+
+    SAVE
+
+    PRIVATE
+!
+!-- Public interfaces
+    PUBLIC  init_1d_model
+
+!
+!-- Public variables
+    PUBLIC  damp_level_1d, damp_level_ind_1d, diss1d, dt_pr_1d,                &
+            dt_run_control_1d, e1d, end_time_1d, kh1d, km1d, l1d, rif1d, u1d,  &
+            us1d, usws1d, v1d, vsws1d
+
+
+    CONTAINS
+
+ SUBROUTINE init_1d_model
+ 
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=9) ::  time_to_string  !< function to transform time from real to character string
+
+    INTEGER(iwp) ::  k  !< loop index
+
+!
+!-- Allocate required 1D-arrays
+    ALLOCATE( diss1d(nzb:nzt+1), diss1d_p(nzb:nzt+1),                          &
+              e1d(nzb:nzt+1), e1d_p(nzb:nzt+1), kh1d(nzb:nzt+1),               &
+              km1d(nzb:nzt+1), l1d(nzb:nzt+1), l1d_init(nzb:nzt+1),            &
+              l1d_diss(nzb:nzt+1), rif1d(nzb:nzt+1), te_diss(nzb:nzt+1),       &
+              te_dissm(nzb:nzt+1), te_e(nzb:nzt+1),                            &
+              te_em(nzb:nzt+1), te_u(nzb:nzt+1), te_um(nzb:nzt+1),             &
+              te_v(nzb:nzt+1), te_vm(nzb:nzt+1), u1d(nzb:nzt+1),               &
+              u1d_p(nzb:nzt+1),  v1d(nzb:nzt+1), v1d_p(nzb:nzt+1) )
+
+!
+!-- Initialize arrays
+    IF ( constant_diffusion )  THEN
+       km1d = km_constant
+       kh1d = km_constant / prandtl_number
+    ELSE
+       diss1d = 0.0_wp; diss1d_p = 0.0_wp
+       e1d = 0.0_wp; e1d_p = 0.0_wp
+       kh1d = 0.0_wp; km1d = 0.0_wp
+       rif1d = 0.0_wp
+!
+!--    Compute the mixing length
+       l1d_init(nzb) = 0.0_wp
+
+       IF ( TRIM( mixing_length_1d ) == 'blackadar' )  THEN
+!
+!--       Blackadar mixing length
+          IF ( f /= 0.0_wp )  THEN
+             lambda = 2.7E-4_wp * SQRT( ug(nzt+1)**2 + vg(nzt+1)**2 ) /        &
+                               ABS( f ) + 1E-10_wp
+          ELSE
+             lambda = 30.0_wp
+          ENDIF
+
+          DO  k = nzb+1, nzt+1
+             l1d_init(k) = kappa * zu(k) / ( 1.0_wp + kappa * zu(k) / lambda )
+          ENDDO
+
+       ELSEIF ( TRIM( mixing_length_1d ) == 'as_in_3d_model' )  THEN
+!
+!--       Use the same mixing length as in 3D model (LES-mode)
+          !> @todo rename (delete?) this option
+          !>  As the mixing length is different between RANS and LES mode, it
+          !>  must be distinguished here between these modes. For RANS mode,
+          !>  the mixing length is calculated accoding to Blackadar, which is
+          !>  the other option at this point.
+          !>  Maybe delete this option entirely (not appropriate in LES case)
+          !>  2018-03-20, gronemeier
+          DO  k = nzb+1, nzt
+             l1d_init(k)  = ( dx * dy * dzw(k) )**0.33333333333333_wp
+          ENDDO
+          l1d_init(nzt+1) = l1d_init(nzt)
+
+       ENDIF
+    ENDIF
+    l1d      = l1d_init
+    l1d_diss = l1d_init
+    u1d      = u_init
+    u1d_p    = u_init
+    v1d      = v_init
+    v1d_p    = v_init
+
+!
+!-- Set initial horizontal velocities at the lowest grid levels to a very small
+!-- value in order to avoid too small time steps caused by the diffusion limit
+!-- in the initial phase of a run (at k=1, dz/2 occurs in the limiting formula!)
+    u1d(0:1)   = 0.1_wp
+    u1d_p(0:1) = 0.1_wp
+    v1d(0:1)   = 0.1_wp
+    v1d_p(0:1) = 0.1_wp
+
+!
+!-- For u*, theta* and the momentum fluxes plausible values are set
+    IF ( constant_flux_layer )  THEN
+       us1d = 0.1_wp   ! without initial friction the flow would not change
+    ELSE
+       diss1d(nzb+1) = 0.001_wp
+       e1d(nzb+1)  = 1.0_wp
+       km1d(nzb+1) = 1.0_wp
+       us1d = 0.0_wp
+    ENDIF
+    ts1d = 0.0_wp
+    usws1d = 0.0_wp
+    vsws1d = 0.0_wp
+    z01d  = roughness_length
+    z0h1d = z0h_factor * z01d 
+    IF ( humidity )  qs1d = 0.0_wp
+
+!
+!-- Tendencies must be preset in order to avoid runtime errors
+    te_diss  = 0.0_wp
+    te_dissm = 0.0_wp
+    te_e  = 0.0_wp
+    te_em = 0.0_wp
+    te_um = 0.0_wp
+    te_vm = 0.0_wp
+
+!
+!-- Set model constant
+    IF ( dissipation_1d == 'as_in_3d_model' )  c_0 = 0.1_wp
+    c_mu = c_0**4
+
+!
+!-- Set start time in hh:mm:ss - format
+    simulated_time_chr = time_to_string( simulated_time_1d )
+
+!
+!-- Integrate the 1D-model equations using the Runge-Kutta scheme
+    CALL time_integration_1d
+
+
+ END SUBROUTINE init_1d_model
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Runge-Kutta time differencing scheme for the 1D-model.
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE time_integration_1d
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=9) ::  time_to_string  !< function to transform time from real to character string
+
+    INTEGER(iwp) ::  k  !< loop index
+
+    REAL(wp) ::  a            !< auxiliary variable
+    REAL(wp) ::  b            !< auxiliary variable
+    REAL(wp) ::  dpt_dz       !< vertical temperature gradient
+    REAL(wp) ::  flux         !< vertical temperature gradient
+    REAL(wp) ::  kmzm         !< Km(z-dz/2)
+    REAL(wp) ::  kmzp         !< Km(z+dz/2)
+    REAL(wp) ::  l_stable     !< mixing length for stable case
+    REAL(wp) ::  pt_0         !< reference temperature
+    REAL(wp) ::  uv_total     !< horizontal wind speed
+
+!
+!-- Determine the time step at the start of a 1D-simulation and
+!-- determine and printout quantities used for run control
+    dt_1d = 0.01_wp
+    CALL run_control_1d
+
+!
+!-- Start of time loop
+    DO  WHILE ( simulated_time_1d < end_time_1d  .AND.  .NOT. stop_dt_1d )
+
+!
+!--    Depending on the timestep scheme, carry out one or more intermediate
+!--    timesteps
+
+       intermediate_timestep_count = 0
+       DO  WHILE ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )
+
+          intermediate_timestep_count = intermediate_timestep_count + 1
+
+          CALL timestep_scheme_steering
+
+!
+!--       Compute all tendency terms. If a constant-flux layer is simulated, 
+!--       k starts at nzb+2.
+          DO  k = nzb_diff, nzt
+
+             kmzm = 0.5_wp * ( km1d(k-1) + km1d(k) )
+             kmzp = 0.5_wp * ( km1d(k) + km1d(k+1) )
+!
+!--          u-component
+             te_u(k) =  f * ( v1d(k) - vg(k) ) + ( &
+                              kmzp * ( u1d(k+1) - u1d(k) ) * ddzu(k+1) &
+                            - kmzm * ( u1d(k) - u1d(k-1) ) * ddzu(k)   &
+                                                 ) * ddzw(k)
+!
+!--          v-component
+             te_v(k) = -f * ( u1d(k) - ug(k) ) + (                     &
+                              kmzp * ( v1d(k+1) - v1d(k) ) * ddzu(k+1) &
+                            - kmzm * ( v1d(k) - v1d(k-1) ) * ddzu(k)   &
+                                                 ) * ddzw(k)
+          ENDDO
+          IF ( .NOT. constant_diffusion )  THEN
+             DO  k = nzb_diff, nzt
+!
+!--             TKE and dissipation rate
+                kmzm = 0.5_wp * ( km1d(k-1) + km1d(k) )
+                kmzp = 0.5_wp * ( km1d(k) + km1d(k+1) )
+                IF ( .NOT. humidity )  THEN
+                   pt_0 = pt_init(k)
+                   flux =  ( pt_init(k+1)-pt_init(k-1) ) * dd2zu(k)
+                ELSE
+                   pt_0 = pt_init(k) * ( 1.0_wp + 0.61_wp * q_init(k) )
+                   flux = ( ( pt_init(k+1) - pt_init(k-1) ) +                  &
+                            0.61_wp * ( pt_init(k+1) * q_init(k+1) -           &
+                                        pt_init(k-1) * q_init(k-1)   )         &
+                          ) * dd2zu(k)
+                ENDIF
+
+!
+!--             Calculate dissipation rate if no prognostic equation is used for
+!--             dissipation rate
+                IF ( dissipation_1d == 'detering' )  THEN
+                   diss1d(k) = c_0**3 * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
+                ELSEIF ( dissipation_1d == 'as_in_3d_model' )  THEN
+                   diss1d(k) = ( 0.19_wp + 0.74_wp * l1d_diss(k) / l1d_init(k) &
+                               ) * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
+                ENDIF
+!
+!--             TKE
+                te_e(k) = km1d(k) * ( ( ( u1d(k+1) - u1d(k-1) ) * dd2zu(k) )**2&
+                                    + ( ( v1d(k+1) - v1d(k-1) ) * dd2zu(k) )**2&
+                                    )                                          &
+                                    - g / pt_0 * kh1d(k) * flux                &
+                                    +            (                             &
+                                     kmzp * ( e1d(k+1) - e1d(k) ) * ddzu(k+1)  &
+                                   - kmzm * ( e1d(k) - e1d(k-1) ) * ddzu(k)    &
+                                                 ) * ddzw(k) / sig_e           &
+                                   - diss1d(k)
+
+                IF ( dissipation_1d == 'prognostic' )  THEN
+!
+!--                dissipation rate
+                   IF ( rif1d(k) >= 0.0_wp )  THEN
+                      alpha_buoyancy = 1.0_wp - l1d(k) / lambda
+                   ELSE
+                      alpha_buoyancy = 1.0_wp - ( 1.0_wp + ( c_2 - 1.0_wp )    &
+                                                         / ( c_2 - c_1    ) )  &
+                                              * l1d(k) / lambda
+                   ENDIF
+                   c_3 = ( c_1 - c_2 ) * alpha_buoyancy + 1.0_wp
+                   te_diss(k) = ( km1d(k) *                                    &
+                                  ( ( ( u1d(k+1) - u1d(k-1) ) * dd2zu(k) )**2  &
+                                  + ( ( v1d(k+1) - v1d(k-1) ) * dd2zu(k) )**2  &
+                                  ) * ( c_1 + (c_2 - c_1) * l1d(k) / lambda )  &
+                                  - g / pt_0 * kh1d(k) * flux * c_3            &
+                                  - c_2 * diss1d(k)                            &
+                                ) * diss1d(k) / ( e1d(k) + 1.0E-20_wp )        &
+                                + (   kmzp * ( diss1d(k+1) - diss1d(k) )       &
+                                           * ddzu(k+1)                         &
+                                    - kmzm * ( diss1d(k) - diss1d(k-1) )       &
+                                           * ddzu(k)                           &
+                                  ) * ddzw(k) / sig_diss
+
+                ENDIF
+
+             ENDDO
+          ENDIF
+
+!
+!--       Tendency terms at the top of the constant-flux layer.
+!--       Finite differences of the momentum fluxes are computed using half the 
+!--       normal grid length (2.0*ddzw(k)) for the sake of enhanced accuracy 
+          IF ( constant_flux_layer )  THEN
+
+             k = nzb+1
+             kmzm = 0.5_wp * ( km1d(k-1) + km1d(k) )
+             kmzp = 0.5_wp * ( km1d(k) + km1d(k+1) )
+             IF ( .NOT. humidity )  THEN
+                pt_0 = pt_init(k)
+                flux =  ( pt_init(k+1)-pt_init(k-1) ) * dd2zu(k)
+             ELSE
+                pt_0 = pt_init(k) * ( 1.0_wp + 0.61_wp * q_init(k) )
+                flux = ( ( pt_init(k+1) - pt_init(k-1) ) +                     &
+                         0.61_wp * ( pt_init(k+1) * q_init(k+1) -              &
+                                     pt_init(k-1) * q_init(k-1)   )            &
+                       ) * dd2zu(k)
+             ENDIF
+
+!
+!--          Calculate dissipation rate if no prognostic equation is used for
+!--          dissipation rate
+             IF ( dissipation_1d == 'detering' )  THEN
+                diss1d(k) = c_0**3 * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
+             ELSEIF ( dissipation_1d == 'as_in_3d_model' )  THEN
+                diss1d(k) = ( 0.19_wp + 0.74_wp * l1d_diss(k) / l1d_init(k) )  &
+                            * e1d(k) * SQRT( e1d(k) ) / l1d_diss(k)
+             ENDIF
+
+!
+!--          u-component
+             te_u(k) = f * ( v1d(k) - vg(k) ) + (                              &
+                       kmzp * ( u1d(k+1) - u1d(k) ) * ddzu(k+1) + usws1d       &
+                                                ) * 2.0_wp * ddzw(k)
+!
+!--          v-component
+             te_v(k) = -f * ( u1d(k) - ug(k) ) + (                             &
+                       kmzp * ( v1d(k+1) - v1d(k) ) * ddzu(k+1) + vsws1d       &
+                                                 ) * 2.0_wp * ddzw(k)
+!
+!--          TKE
+             IF ( .NOT. dissipation_1d == 'prognostic' )  THEN
+                !> @query why integrate over 2dz
+                !>   Why is it allowed to integrate over two delta-z for e
+                !>   while for u and v it is not?
+                !>   2018-04-23, gronemeier
+                te_e(k) = km1d(k) * ( ( ( u1d(k+1) - u1d(k-1) ) * dd2zu(k) )**2&
+                                    + ( ( v1d(k+1) - v1d(k-1) ) * dd2zu(k) )**2&
+                                    )                                          &
+                                    - g / pt_0 * kh1d(k) * flux                &
+                                    +           (                              &
+                                     kmzp * ( e1d(k+1) - e1d(k) ) * ddzu(k+1)  &
+                                   - kmzm * ( e1d(k) - e1d(k-1) ) * ddzu(k)    &
+                                                 ) * ddzw(k) / sig_e           &
+                                   - diss1d(k)
+             ENDIF
+
+          ENDIF
+
+!
+!--       Prognostic equations for all 1D variables
+          DO  k = nzb+1, nzt
+
+             u1d_p(k) = u1d(k) + dt_1d * ( tsc(2) * te_u(k) + &
+                                           tsc(3) * te_um(k) )
+             v1d_p(k) = v1d(k) + dt_1d * ( tsc(2) * te_v(k) + &
+                                           tsc(3) * te_vm(k) )
+
+          ENDDO
+          IF ( .NOT. constant_diffusion )  THEN
+
+             DO  k = nzb+1, nzt
+                e1d_p(k) = e1d(k) + dt_1d * ( tsc(2) * te_e(k) + &
+                                              tsc(3) * te_em(k) )
+             ENDDO
+
+!
+!--          Eliminate negative TKE values, which can result from the
+!--          integration due to numerical inaccuracies. In such cases the TKE
+!--          value is reduced to 10 percent of its old value.
+             WHERE ( e1d_p < 0.0_wp )  e1d_p = 0.1_wp * e1d
+
+             IF ( dissipation_1d == 'prognostic' )  THEN
+                DO  k = nzb+1, nzt
+                   diss1d_p(k) = diss1d(k) + dt_1d * ( tsc(2) * te_diss(k) + &
+                                                       tsc(3) * te_dissm(k) )
+                ENDDO
+                WHERE ( diss1d_p < 0.0_wp )  diss1d_p = 0.1_wp * diss1d
+             ENDIF
+          ENDIF
+
+!
+!--       Calculate tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' ) THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+
+                DO  k = nzb+1, nzt
+                   te_um(k) = te_u(k)
+                   te_vm(k) = te_v(k)
+                ENDDO
+
+                IF ( .NOT. constant_diffusion )  THEN
+                   DO k = nzb+1, nzt
+                      te_em(k) = te_e(k)
+                   ENDDO
+                   IF ( dissipation_1d == 'prognostic' )  THEN
+                      DO k = nzb+1, nzt
+                         te_dissm(k) = te_diss(k)
+                      ENDDO
+                   ENDIF
+                ENDIF
+
+             ELSEIF ( intermediate_timestep_count < &
+                         intermediate_timestep_count_max )  THEN
+
+                DO  k = nzb+1, nzt
+                   te_um(k) = -9.5625_wp * te_u(k) + 5.3125_wp * te_um(k)
+                   te_vm(k) = -9.5625_wp * te_v(k) + 5.3125_wp * te_vm(k)
+                ENDDO
+
+                IF ( .NOT. constant_diffusion )  THEN
+                   DO k = nzb+1, nzt
+                      te_em(k) = -9.5625_wp * te_e(k) + 5.3125_wp * te_em(k)
+                   ENDDO
+                   IF ( dissipation_1d == 'prognostic' )  THEN
+                      DO k = nzb+1, nzt
+                         te_dissm(k) = -9.5625_wp * te_diss(k)  &
+                                     +  5.3125_wp * te_dissm(k)
+                      ENDDO
+                   ENDIF
+                ENDIF
+
+             ENDIF
+          ENDIF
+
+!
+!--       Boundary conditions for the prognostic variables.
+!--       At the top boundary (nzt+1) u, v, e, and diss keep their initial 
+!--       values (ug(nzt+1), vg(nzt+1), 0, 0).
+!--       At the bottom boundary, Dirichlet condition is used for u and v (0)
+!--       and Neumann condition for e and diss (e(nzb)=e(nzb+1)).
+          u1d_p(nzb) = 0.0_wp
+          v1d_p(nzb) = 0.0_wp
+
+!
+!--       Swap the time levels in preparation for the next time step.
+          u1d  = u1d_p
+          v1d  = v1d_p
+          IF ( .NOT. constant_diffusion )  THEN
+             e1d  = e1d_p
+             IF ( dissipation_1d == 'prognostic' )  THEN
+                diss1d = diss1d_p
+             ENDIF
+          ENDIF
+
+!
+!--       Compute diffusion quantities
+          IF ( .NOT. constant_diffusion )  THEN
+
+!
+!--          First compute the vertical fluxes in the constant-flux layer
+             IF ( constant_flux_layer )  THEN
+!
+!--             Compute theta* using Rif numbers of the previous time step
+                IF ( rif1d(nzb+1) >= 0.0_wp )  THEN
+!
+!--                Stable stratification
+                   ts1d = kappa * ( pt_init(nzb+1) - pt_init(nzb) ) /          &
+                          ( LOG( zu(nzb+1) / z0h1d ) + 5.0_wp * rif1d(nzb+1) * &
+                                          ( zu(nzb+1) - z0h1d ) / zu(nzb+1)    &
+                          )
+                ELSE
+!
+!--                Unstable stratification
+                   a = SQRT( 1.0_wp - 16.0_wp * rif1d(nzb+1) )
+                   b = SQRT( 1.0_wp - 16.0_wp * rif1d(nzb+1) /                 &
+                       zu(nzb+1) * z0h1d )
+
+                   ts1d = kappa * ( pt_init(nzb+1) - pt_init(nzb) ) /          &
+                          LOG( (a-1.0_wp) / (a+1.0_wp) *                       &
+                               (b+1.0_wp) / (b-1.0_wp) )
+                ENDIF
+
+             ENDIF    ! constant_flux_layer
+             !> @todo combine if clauses
+             !>   The previous and following if clauses can be combined into a
+             !>   single clause
+             !>   2018-04-23, gronemeier
+!
+!--          Compute the Richardson-flux numbers,
+!--          first at the top of the constant-flux layer using u* of the 
+!--          previous time step (+1E-30, if u* = 0), then in the remaining area.
+!--          There the rif-numbers of the previous time step are used.
+
+             IF ( constant_flux_layer )  THEN
+                IF ( .NOT. humidity )  THEN
+                   pt_0 = pt_init(nzb+1)
+                   flux = ts1d
+                ELSE
+                   pt_0 = pt_init(nzb+1) * ( 1.0_wp + 0.61_wp * q_init(nzb+1) )
+                   flux = ts1d + 0.61_wp * pt_init(k) * qs1d
+                ENDIF
+                rif1d(nzb+1) = zu(nzb+1) * kappa * g * flux / &
+                               ( pt_0 * ( us1d**2 + 1E-30_wp ) )
+             ENDIF
+
+             DO  k = nzb_diff, nzt
+                IF ( .NOT. humidity )  THEN
+                   pt_0 = pt_init(k)
+                   flux = ( pt_init(k+1) - pt_init(k-1) ) * dd2zu(k)
+                ELSE
+                   pt_0 = pt_init(k) * ( 1.0_wp + 0.61_wp * q_init(k) )
+                   flux = ( ( pt_init(k+1) - pt_init(k-1) )                    &
+                            + 0.61_wp                                          &
+                            * (   pt_init(k+1) * q_init(k+1)                   &
+                                - pt_init(k-1) * q_init(k-1) )                 &
+                          ) * dd2zu(k)
+                ENDIF
+                IF ( rif1d(k) >= 0.0_wp )  THEN
+                   rif1d(k) = g / pt_0 * flux /                                &
+                              (  ( ( u1d(k+1) - u1d(k-1) ) * dd2zu(k) )**2     &
+                               + ( ( v1d(k+1) - v1d(k-1) ) * dd2zu(k) )**2     &
+                               + 1E-30_wp                                      &
+                              )
+                ELSE
+                   rif1d(k) = g / pt_0 * flux /                                &
+                              (  ( ( u1d(k+1) - u1d(k-1) ) * dd2zu(k) )**2     &
+                               + ( ( v1d(k+1) - v1d(k-1) ) * dd2zu(k) )**2     &
+                               + 1E-30_wp                                      &
+                              ) * ( 1.0_wp - 16.0_wp * rif1d(k) )**0.25_wp
+                ENDIF
+             ENDDO
+!
+!--          Richardson-numbers must remain restricted to a realistic value
+!--          range. It is exceeded excessively for very small velocities
+!--          (u,v --> 0).
+             WHERE ( rif1d < -5.0_wp )  rif1d = -5.0_wp
+             WHERE ( rif1d > 1.0_wp )  rif1d = 1.0_wp
+
+!
+!--          Compute u* from the absolute velocity value
+             IF ( constant_flux_layer )  THEN
+                uv_total = SQRT( u1d(nzb+1)**2 + v1d(nzb+1)**2 )
+
+                IF ( rif1d(nzb+1) >= 0.0_wp )  THEN
+!
+!--                Stable stratification
+                   us1d = kappa * uv_total / (                                 &
+                             LOG( zu(nzb+1) / z01d ) + 5.0_wp * rif1d(nzb+1) * &
+                                              ( zu(nzb+1) - z01d ) / zu(nzb+1) &
+                                             )
+                ELSE
+!
+!--                Unstable stratification
+                   a = 1.0_wp / SQRT( SQRT( 1.0_wp - 16.0_wp * rif1d(nzb+1) ) )
+                   b = 1.0_wp / SQRT( SQRT( 1.0_wp - 16.0_wp * rif1d(nzb+1) /  &
+                                                     zu(nzb+1) * z01d ) )
+                   us1d = kappa * uv_total / (                                 &
+                              LOG( (1.0_wp+b) / (1.0_wp-b) * (1.0_wp-a) /      &
+                                   (1.0_wp+a) ) +                              &
+                              2.0_wp * ( ATAN( b ) - ATAN( a ) )               &
+                                             )
+                ENDIF
+
+!
+!--             Compute the momentum fluxes for the diffusion terms
+                usws1d  = - u1d(nzb+1) / uv_total * us1d**2
+                vsws1d  = - v1d(nzb+1) / uv_total * us1d**2
+
+!
+!--             Boundary condition for the turbulent kinetic energy and 
+!--             dissipation rate at the top of the constant-flux layer.
+!--             Additional Neumann condition de/dz = 0 at nzb is set to ensure
+!--             compatibility with the 3D model.
+                IF ( ibc_e_b == 2 )  THEN
+                   e1d(nzb+1) = ( us1d / c_0 )**2
+                ENDIF
+                IF ( dissipation_1d == 'prognostic' )  THEN
+                   e1d(nzb+1) = ( us1d / c_0 )**2
+                   diss1d(nzb+1) = us1d**3 / ( kappa * zu(nzb+1) )
+                   diss1d(nzb) = diss1d(nzb+1)
+                ENDIF
+                e1d(nzb) = e1d(nzb+1)
+
+                IF ( humidity ) THEN
+!
+!--                Compute q* 
+                   IF ( rif1d(nzb+1) >= 0.0_wp )  THEN
+!
+!--                   Stable stratification
+                      qs1d = kappa * ( q_init(nzb+1) - q_init(nzb) ) /         &
+                          ( LOG( zu(nzb+1) / z0h1d ) + 5.0_wp * rif1d(nzb+1) * &
+                                          ( zu(nzb+1) - z0h1d ) / zu(nzb+1)    &
+                          )
+                   ELSE
+!
+!--                   Unstable stratification
+                      a = SQRT( 1.0_wp - 16.0_wp * rif1d(nzb+1) )
+                      b = SQRT( 1.0_wp - 16.0_wp * rif1d(nzb+1) /              &
+                                         zu(nzb+1) * z0h1d )
+                      qs1d = kappa * ( q_init(nzb+1) - q_init(nzb) ) /         &
+                             LOG( (a-1.0_wp) / (a+1.0_wp) *                    &
+                                  (b+1.0_wp) / (b-1.0_wp) )
+                   ENDIF
+                ELSE
+                   qs1d = 0.0_wp
+                ENDIF
+
+             ENDIF   !  constant_flux_layer
+
+!
+!--          Compute the diabatic mixing length. The unstable stratification
+!--          must not be considered for l1d (km1d) as it is already considered
+!--          in the dissipation of TKE via l1d_diss. Otherwise, km1d would be
+!--          too large.
+             IF ( dissipation_1d /= 'prognostic' )  THEN
+                IF ( mixing_length_1d == 'blackadar' )  THEN
+                   DO  k = nzb+1, nzt
+                      IF ( rif1d(k) >= 0.0_wp )  THEN
+                         l1d(k) = l1d_init(k) / ( 1.0_wp + 5.0_wp * rif1d(k) )
+                         l1d_diss(k) = l1d(k)
+                      ELSE
+                         l1d(k) = l1d_init(k)
+                         l1d_diss(k) = l1d_init(k) *                           &
+                                       SQRT( 1.0_wp - 16.0_wp * rif1d(k) )
+                      ENDIF
+                   ENDDO
+                ELSEIF ( mixing_length_1d == 'as_in_3d_model' )  THEN
+                   DO  k = nzb+1, nzt
+                      dpt_dz = ( pt_init(k+1) - pt_init(k-1) ) * dd2zu(k)
+                      IF ( dpt_dz > 0.0_wp )  THEN
+                         l_stable = 0.76_wp * SQRT( e1d(k) )                   &
+                                  / SQRT( g / pt_init(k) * dpt_dz ) + 1E-5_wp
+                      ELSE
+                         l_stable = l1d_init(k)
+                      ENDIF
+                      l1d(k) = MIN( l1d_init(k), l_stable )
+                      l1d_diss(k) = l1d(k)
+                   ENDDO
+                ENDIF
+             ELSE
+                DO  k = nzb+1, nzt
+                   l1d(k) = c_0**3 * e1d(k) * SQRT( e1d(k) )                   &
+                          / ( diss1d(k) + 1.0E-30_wp )
+                ENDDO
+             ENDIF
+
+!
+!--          Compute the diffusion coefficients for momentum via the
+!--          corresponding Prandtl-layer relationship and according to
+!--          Prandtl-Kolmogorov, respectively
+             IF ( constant_flux_layer )  THEN
+                IF ( rif1d(nzb+1) >= 0.0_wp )  THEN
+                   km1d(nzb+1) = us1d * kappa * zu(nzb+1) /                    &
+                                 ( 1.0_wp + 5.0_wp * rif1d(nzb+1) )
+                ELSE
+                   km1d(nzb+1) = us1d * kappa * zu(nzb+1) *                    &
+                                 ( 1.0_wp - 16.0_wp * rif1d(nzb+1) )**0.25_wp
+                ENDIF
+             ENDIF
+
+             IF ( dissipation_1d == 'prognostic' )  THEN
+                DO  k = nzb_diff, nzt
+                   km1d(k) = c_mu * e1d(k)**2 / ( diss1d(k) + 1.0E-30_wp )
+                ENDDO
+             ELSE
+                DO  k = nzb_diff, nzt
+                   km1d(k) = c_0 * SQRT( e1d(k) ) * l1d(k)
+                ENDDO
+             ENDIF
+
+!
+!--          Add damping layer
+             DO  k = damp_level_ind_1d+1, nzt+1
+                km1d(k) = 1.1_wp * km1d(k-1)
+                km1d(k) = MIN( km1d(k), 10.0_wp )
+             ENDDO
+
+!
+!--          Compute the diffusion coefficient for heat via the relationship
+!--          kh = phim / phih * km
+             DO  k = nzb+1, nzt
+                IF ( rif1d(k) >= 0.0_wp )  THEN
+                   kh1d(k) = km1d(k)
+                ELSE
+                   kh1d(k) = km1d(k) * ( 1.0_wp - 16.0_wp * rif1d(k) )**0.25_wp
+                ENDIF
+             ENDDO
+
+          ENDIF   ! .NOT. constant_diffusion
+
+       ENDDO   ! intermediate step loop
+
+!
+!--    Increment simulated time and output times
+       current_timestep_number_1d = current_timestep_number_1d + 1
+       simulated_time_1d          = simulated_time_1d + dt_1d
+       simulated_time_chr         = time_to_string( simulated_time_1d )
+       time_pr_1d                 = time_pr_1d          + dt_1d
+       time_run_control_1d        = time_run_control_1d + dt_1d
+
+!
+!--    Determine and print out quantities for run control
+       IF ( time_run_control_1d >= dt_run_control_1d )  THEN
+          CALL run_control_1d
+          time_run_control_1d = time_run_control_1d - dt_run_control_1d
+       ENDIF
+
+!
+!--    Profile output on file
+       IF ( time_pr_1d >= dt_pr_1d )  THEN
+          CALL print_1d_model
+          time_pr_1d = time_pr_1d - dt_pr_1d
+       ENDIF
+
+!
+!--    Determine size of next time step
+       CALL timestep_1d
+
+    ENDDO   ! time loop
+
+
+ END SUBROUTINE time_integration_1d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute and print out quantities for run control of the 1D model.
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE run_control_1d
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  k     !< loop index
+    
+    REAL(wp) ::  alpha     !< angle of wind vector at top of constant-flux layer
+    REAL(wp) ::  energy    !< kinetic energy
+    REAL(wp) ::  umax      !< maximum of u
+    REAL(wp) ::  uv_total  !< horizontal wind speed
+    REAL(wp) ::  vmax      !< maximum of v
+
+!
+!-- Output
+    IF ( myid == 0 )  THEN
+!
+!--    If necessary, write header
+       IF ( .NOT. run_control_header_1d )  THEN
+          CALL check_open( 15 )
+          WRITE ( 15, 100 )
+          run_control_header_1d = .TRUE.
+       ENDIF
+
+!
+!--    Compute control quantities
+!--    grid level nzp is excluded due to mirror boundary condition
+       umax = 0.0_wp; vmax = 0.0_wp; energy = 0.0_wp
+       DO  k = nzb+1, nzt+1
+          umax = MAX( ABS( umax ), ABS( u1d(k) ) )
+          vmax = MAX( ABS( vmax ), ABS( v1d(k) ) )
+          energy = energy + 0.5_wp * ( u1d(k)**2 + v1d(k)**2 )
+       ENDDO
+       energy = energy / REAL( nzt - nzb + 1, KIND=wp )
+
+       uv_total = SQRT( u1d(nzb+1)**2 + v1d(nzb+1)**2 )
+       IF ( ABS( v1d(nzb+1) ) < 1.0E-5_wp )  THEN
+          alpha = ACOS( SIGN( 1.0_wp , u1d(nzb+1) ) )
+       ELSE
+          alpha = ACOS( u1d(nzb+1) / uv_total )
+          IF ( v1d(nzb+1) <= 0.0_wp )  alpha = 2.0_wp * pi - alpha
+       ENDIF
+       alpha = alpha / ( 2.0_wp * pi ) * 360.0_wp
+
+       WRITE ( 15, 101 )  current_timestep_number_1d, simulated_time_chr, &
+                          dt_1d, umax, vmax, us1d, alpha, energy
+!
+!--    Write buffer contents to disc immediately
+       FLUSH( 15 )
+
+    ENDIF
+
+!
+!-- formats
+100 FORMAT (///'1D run control output:'/ &
+              &'------------------------------'// &
+           &'ITER.   HH:MM:SS    DT      UMAX   VMAX    U*   ALPHA   ENERG.'/ &
+           &'-------------------------------------------------------------')
+101 FORMAT (I7,1X,A9,1X,F6.2,2X,F6.2,1X,F6.2,1X,F6.3,2X,F5.1,2X,F7.2)
+
+
+ END SUBROUTINE run_control_1d
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the time step w.r.t. the diffusion criterion
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE timestep_1d
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  k    !< loop index
+
+    REAL(wp) ::  dt_diff  !< time step accorind to diffusion criterion
+    REAL(wp) ::  dt_old   !< previous time step
+    REAL(wp) ::  fac      !< factor of criterion
+    REAL(wp) ::  value    !< auxiliary variable
+
+!
+!-- Save previous time step
+    dt_old = dt_1d
+
+!
+!-- Compute the currently feasible time step according to the diffusion
+!-- criterion. At nzb+1 the half grid length is used.
+    fac = 0.125
+    dt_diff = dt_max_1d
+    DO  k = nzb+2, nzt
+       value   = fac * dzu(k) * dzu(k) / ( km1d(k) + 1E-20_wp )
+       dt_diff = MIN( value, dt_diff )
+    ENDDO
+    value   = fac * zu(nzb+1) * zu(nzb+1) / ( km1d(nzb+1) + 1E-20_wp )
+    dt_1d = MIN( value, dt_diff )
+
+!
+!-- Limit the new time step to a maximum of 10 times the previous time step
+    dt_1d = MIN( dt_old * 10.0_wp, dt_1d )
+
+!
+!-- Set flag when the time step becomes too small
+    IF ( dt_1d < ( 1.0E-15_wp * dt_max_1d ) )  THEN
+       stop_dt_1d = .TRUE.
+
+       WRITE( message_string, * ) 'timestep has exceeded the lower limit&',    &
+                                  'dt_1d = ',dt_1d,' s   simulation stopped!'
+       CALL message( 'timestep_1d', 'PA0192', 1, 2, 0, 6, 0 )
+       
+    ENDIF
+
+ END SUBROUTINE timestep_1d
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> List output of profiles from the 1D-model
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE print_1d_model
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  k  !< loop parameter
+
+    LOGICAL, SAVE :: write_first = .TRUE. !< flag for writing header
+
+
+    IF ( myid == 0 )  THEN
+!
+!--    Open list output file for profiles from the 1D-model
+       CALL check_open( 17 )
+
+!
+!--    Write Header
+       IF ( write_first )  THEN
+          WRITE ( 17, 100 )  TRIM( run_description_header )
+          write_first = .FALSE.
+       ENDIF
+
+!
+!--    Write the values
+       WRITE ( 17, 104 )  TRIM( simulated_time_chr )
+       WRITE ( 17, 101 )
+       WRITE ( 17, 102 )
+       WRITE ( 17, 101 )
+       DO  k = nzt+1, nzb, -1
+          WRITE ( 17, 103)  k, zu(k), u1d(k), v1d(k), pt_init(k), e1d(k), &
+                            rif1d(k), km1d(k), kh1d(k), l1d(k), diss1d(k)
+       ENDDO
+       WRITE ( 17, 101 )
+       WRITE ( 17, 102 )
+       WRITE ( 17, 101 )
+
+!
+!--    Write buffer contents to disc immediately
+       FLUSH( 17 )
+
+    ENDIF
+
+!
+!-- Formats
+100 FORMAT ('# ',A/'#',10('-')/'# 1d-model profiles')
+104 FORMAT (//'# Time: ',A)
+101 FORMAT ('#',111('-'))
+102 FORMAT ('#  k     zu      u          v          pt         e          ',   &
+            'rif        Km         Kh         l          diss   ')
+103 FORMAT (1X,I4,1X,F7.1,9(1X,E10.3))
+
+
+ END SUBROUTINE print_1d_model
+
+
+ END MODULE
Index: /palm/tags/release-6.0/SOURCE/modules.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/modules.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/modules.f90	(revision 3477)
@@ -0,0 +1,2186 @@
+!> @file modules.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! +virtual_measurement
+! 
+! 3472 2018-10-30 20:43:50Z suehring
+! Add indoor model (kanani, srissman, tlang)
+! 
+! 3467 2018-10-30 19:05:21Z suehring
+! Add biometeorology
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! +mask_k_over_surface, mask_surface
+! 
+! 3422 2018-10-24 19:01:57Z gronemeier
+! bugfix: increase number of blanks in output string
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! +surface_data_output
+! 
+! 3355 2018-10-16 14:03:34Z knoop
+! (from branch resler)
+! Increase dimension of uv_heights etc.
+! 
+! 3302 2018-10-03 02:39:40Z raasch
+! +u/v_stokes_zu, u/v_stokes_zw
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Minor formatting/clean-up (kanani)
+! Added some variables for time treatment (Russo)
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! ocean renamed ocean_mode
+! 
+! 3289 2018-09-28 10:23:58Z suehring
+! +num_mean_inflow_profiles
+! 
+! 3288 2018-09-28 10:23:08Z suehring
+! Modularization of all bulk cloud physics code components
+! 
+! 3240 2018-09-12 12:04:40Z Giersch
+! max_pr_user_tmp has been defined as a control variable because it is not 
+! local anymore
+! 
+! 3235 2018-09-07 14:06:15Z sward
+! Added global variable dim_size_agtnum to own module. Necessary to avoid
+! circular dependency in agent output.
+! 
+! 3232 2018-09-07 12:21:44Z raasch
+! references to mrun replaced by palmrun, and updated
+! 
+! 3198 2018-08-15 09:23:10Z sward
+! Added multi_agent_system_end and multi_agent_system_start
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename offline nesting variables:
+! -inflow_l, inflow_n, inflow_r, inflow_s, 
+!  nest_bound_l, nest_bound_n, nest_bound_r, nest_bound_s, nest_domain, forcing, 
+!  force_bound_l, force_bound_n, force_bound_r, force_bound_s, outflow_l, 
+!  outflow_n, outflow_r, outflow_s
+! +bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_n, bc_dirichlet_r, 
+!  bc_radiation_l, bc_radiation_n, bc_radiation_n, bc_radiation_r, child_domain 
+!  nesting_offline
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Default value of dz_max has changed to a more uncommon value of 999 (value 
+! of dz_max can not be part of dz values when using new stretching procedure)
+! 
+! 3159 2018-07-20 11:20:01Z sward
+! Added multi agent system
+! 
+! 3157 2018-07-19 21:08:49Z maronga
+! added use_free_convection_scaling
+! 
+! 3129 2018-07-16 07:45:13Z gronemeier
+! add target attribute to km and kh, necessary for output in tcm_data_output_3d
+! 
+! 3120 2018-07-11 18:30:57Z gronemeier
+! +les_dynamic
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! set dt_3d = 0.01
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! Variables concerning stretching introduced or revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! z_max_do2d removed
+! 
+! 3026 2018-05-22 10:30:53Z schwenkel
+! Changed the name specific humidity to mixing ratio, since we are computing
+! mixing ratios.
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Added default values of u_max, v_max, and w_max to avoid floating invalid
+! during spinup
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! precipitation_rate removed
+! 
+! 3003 2018-04-23 10:22:58Z Giersch
+! The inversion height is defined as a global variable now which belongs to the 
+! module statistics 
+! 
+! 2968 2018-04-13 11:52:24Z suehring
+! +topo_min_level
+! 
+! 2964 2018-04-12 16:04:03Z raasch
+! *_time_count variables are all initialized with zero now
+! 
+! 2918 2018-03-21 15:52:14Z gronemeier
+! -l_grid, -l_wall
+! 
+! 2906 2018-03-19 08:56:40Z Giersch
+! Module control_parameters has been extended with ENVIRONMENT variables 
+! read/write_svf 
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! _prerun flags were removed, Control paramters restart_string and length have
+! been added
+! 
+! 2881 2018-03-13 16:24:40Z suehring
+! Added flag for switching on/off calculation of soil moisture
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! +ghf_av
+! 
+! 2776 2018-01-31 10:44:42Z Giersch
+! Variable synthetic_turbulence_generator has been abbreviated and _prerun flags
+! for skipping module related restart data has beed introduced
+! 
+! 2765 2018-01-22 11:34:58Z maronga
+! Set initial value for time_since_reference_point
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! +plant_canopy
+! 
+! 2742 2018-01-12 14:59:47Z suehring
+! +tsurf_av
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! +r_a_av
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of uv exposure model (FK)
+! + turbulence closure variables (control_parameters)
+! + arrays for prognostic equation of disspiation (arrays_3d)
+! + km_av, kh_av (TG)
+! Implementation of chemistry module (FK)
+! -lod
+! +topo_distinct (MS)
+! 
+! 2669 2017-12-06 16:03:27Z raasch
+! CONTIGUOUS-attribut added to 3d pointer arrays,
+! coupling_char extended to LEN=8
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Renamed phi -> latitude, moved longitude from radiation model to modules
+! 
+! 2563 2017-10-19 15:36:10Z Giersch
+! Variable wind_turbine was added to control_parameters
+! 
+! 2550 2017-10-16 17:12:01Z boeske
+! complex_terrain namelist parameter added
+! 
+! 2508 2017-10-02 08:57:09Z suehring
+! Change default value for pt/q/s/sa_vertical_gradient_level
+! 
+! 2499 2017-09-22 16:47:58Z kanani
+! Default changed to fft_method = 'temperton-algorithm'
+! 
+! 2408 2017-09-05 15:47:53Z gronemeier
+! Changed default value of mg_cycles from -1 to 4.
+! 
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Moved mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
+! vanthoff back from particle attributes because they can now also be used in
+! bulk microphysics. 
+! Added aerosol_bulk, aerosol_nacl, aerosol_c3h4o4, aerosol_nh4no3
+! 
+! 2372 2017-08-25 12:37:32Z sward
+! y_shift namelist parameter added
+! 
+! 2339 2017-08-07 13:55:26Z gronemeier
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! moved 1d-model varaibles to own module model_1d_mod
+! 
+! 2337 2017-08-07 08:59:53Z gronemeier
+! -old_dt_1d
+! +l1d_diss
+! 
+! 2326 2017-08-01 07:23:24Z gronemeier
+! Updated variable descriptions
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! -ptnudge, qnudge, tnudge, td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, ug_vert,
+!  vg_vert, unudge, vnudge, wsubs_vert, shf_surf, p_surf, pt_surf, q_surt,
+!  qsws_surf, tmp_tnudge, timenudge, time_surf, time_vert
+! 
+! 2300 2017-06-29 13:31:14Z raasch
+! default value for host changed to '????', default value for loop_optimization
+! changed to 'cache', default value for termination_time_needed set to 35.0
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! missing variable descriptions have been added,
+! type of write_binary changed from CHARACTER to LOGICAL
+! -plot_precision, plot_3d_precision, return_addres, return_username,
+! avs_data_file, exchange_mg, sendrecvcound_yxd, sendrecv_in_background,
+! port_name, profile_number, cross_ts_numbers, cross_ts_number_count,
+! dots_crossindex, dots_index, cross_ts_uymax, cross_ts_uymax_computed,
+! cross_ts_uymin, cross_ts_uymin_computed
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Added parameters for model spinup
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2277 2017-06-12 10:47:51Z kanani
+! Added doxygen comments for variables/parameters,
+! removed unused variables dissipation_control, do2d_xy_n, do2d_xz_n, do2d_yz_n, 
+! do3d_avs_n, lptnudge, lqnudge, lunudge, lvnudge, lwnudge, skip_do_avs, 
+! sums_up_fraction_l.
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2256 2017-06-07 13:58:08Z suehring
+! Change default value of zeta_min to -20
+! Increase dimension for wall_heatflux, etc. 
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Renamed wall_flags_0 and wall_flags_00 into advc_flags_1 and advc_flags_2, 
+! respectively. Moreover, introduced further flag array wall_flags_0. 
+!
+! Adjustments for new topography concept:
+!   -fwxm, fwxp, fwym, fwyp, fxm, fxp, fym, fyp, rif_wall, wall_e_x, wall_e_y, 
+!   -wall_v, wall_u, wall_w_x, wall_w_y, wall_qflux, wall_sflux, wall_nrflux, 
+!   -wall_qrflux
+!
+! Adjustments for new surface concept:
+!   +land_surface
+!   -z0, z0h, z0q, us, ts, qs, qsws, nrs, nrsws, qrs, qrsws, ssws, ss, saswsb 
+!   -nzb_diff_u, nzb_diff_v, nzt_diff
+!   -uswst, vswst, tswst, sswst, saswst, qswst, qrswst, nrswst, qswst_remote
+!
+! Generic tunnel setup:
+!   +tunnel_height, tunnel_length, tunnel_width_x, tunnel_width_y, 
+!   +tunnel_wall_depth
+!
+! Topography input via netcdf
+!   +lod
+! 
+! 2200 2017-04-11 11:37:51Z suehring
+! -monotonic_adjustment
+! 
+! 2174 2017-03-13 08:18:57Z maronga
+! Changed default values for most_method to 'newton'
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! -acc_rank, background_communication, i_left, i_right, j_south, j_north,
+!  num_acc_per_node, on_device
+! 
+! 2107 2017-01-09 12:21:49Z kanani
+! Preparation for doxygen comments (Giersch)
+! 
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Implement turbulent outflow condition
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean and rho_av to rho_ocean_av
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! +urban_surface, +lsf_exception, +varnamelength
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Increased DIMENSION of data_output, data_output_user, do2d, do3d
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! +constant_top_scalarflux, top_scalarflux
+! default of bc_s_t adjusted
+! 
+! 1968 2016-07-18 12:01:49Z suehring
+! Changed dimension for MPI-datatypes type_x_int and type_y_int
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! +bc_s_t_val, diss_s_s, diss_l_s, flux_s_s, flux_l_s, s, sp, s1, s2, s3, ssws_av, 
+!  s_init, s_surf, sums_wsss_ws_l, ss, ssws, sswst, ts_m, wall_sflux
+! +constant_scalarflux, ibc_s_b, ibc_s_t, s_vertical_gradient_level_ind
+!
+! Unused variables removed
+! -gamma_x, gamma_y, gamma_z, var_x, var_y, var_z
+!
+! Change initial values (in order to unify gradient calculation): 
+! pt_vertical_gradient_level, sa_vertical_gradient_level
+!
+! 1957 2016-07-07 10:43:48Z suehring
+! +fl_max, num_leg, num_var_fl, num_var_fl_user, var_fl_max, virtual_flight
+! 
+! 1918 2016-05-27 14:35:57Z raasch
+! default timestep switched from -1.0 to +1.0 in order to avoid wrong sign of
+! initially calculated divergence
+!
+! 1906 2016-05-24 14:38:08Z suehring
+! default value of mg_switch_to_pe0_level changed to -1
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! bfactor, mass_of_solute, molecular_weight_of_solute, molecular_weight_of_water,
+! vanthoff moved to mod_particle_attributes.
+! dt_micro and several cloud_parameters moved to microphysics_mod.
+! 1d-microphysics profiles moved to microphysics_mod.
+!
+! 1845 2016-04-08 08:29:13Z raasch
+! -nzb_2d
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! spectra parameter moved to spectra module
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! curvature_solution_effects removed
+! turbulence renamed collision_turbulence, drizzle renamed 
+! cloud_water_sedimentation
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme removed. microphysics_sat_adjust, microphysics_kessler,
+! microphysics_seifert added.
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! cpp-directive for decalpha removed
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+! 
+! 1788 2016-03-10 11:01:04Z maronga
+! Added roughness length for moisture (z0q)
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! module spectrum moved to new separate module
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf variables moved to the netcdf-interface module
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! coupling_char extended to LEN=3
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! some reformatting
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! +nest_* variables, size of volume_flow arrays increased by one element
+!
+! 1738 2015-12-18 13:56:05Z raasch
+! +mean_surface_level_height
+!
+! 1695 2015-10-27 10:03:11Z maronga
+! Removed rif (forgotten in last revision)
+! 
+! 1693 2015-10-27 08:35:45Z maronga
+! Renamed zp -> z_mo
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Renamed Obukhov length. Added ol, removed rif. Increased number of profiles 
+! (pr_palm). Changed default values for dissipation_1d to 'detering' and 
+! (mixing_length_1d to 'blackadar'. Added most_method. rif_min and rif_max
+! renamed to zeta_min and zeta_max and new values assigned.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1677 2015-10-02 13:25:23Z boeske
+! +ngp_yz_int, type_xz_int, type_yz_int
+! 
+! 1666 2015-09-23 07:31:10Z raasch
+! +user_interface_current_revision, user_interface_required_revision in
+! control_parameters
+!
+! 1639 2015-08-31 14:46:48Z knoop
+! Bugfix: string 'unknown' extended to match LEN=13 
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! +ngp_xz
+!
+! 1560 2015-03-06 10:48:54Z keck
+! +recycling_yshift
+! 
+! 1557 2015-03-05 16:43:04Z suehring
+! +monotonic_adjustment
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Increased pr_palm to 120. Increased length of dots_unit and dots_label to 13
+! digits. Increased length of domask, do2d, and do3d to 20 digits.
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Renamed "radiation" -> "cloud_top_radiation"
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   canopy-model related parameters/variables moved to module 
+!   plant_canopy_model_mod
+! 
+! 1468 2014-09-24 14:06:57Z maronga
+! Adapted for use on up to 6-digit processor cores.
+! Increased identifier string length for user-defined quantities to 20.
+! 
+! 1450 2014-08-21 07:31:51Z heinze
+! ntnudge from 100 to 1000 increased to allow longer simulations
+! 
+! 1431 2014-07-15 14:47:17Z suehring
+! +var_d
+! 
+! 1429 2014-07-15 12:53:45Z knoop
+! +ensemble_member_nr to prepare the random_generator for ensemble runs
+!
+! 1382 2014-04-30 12:15:41Z boeske
+! Renamed variables which store large scale forcing tendencies
+! pt_lsa -> td_lsa_lpt, pt_subs -> td_sub_lpt, 
+! q_lsa  -> td_lsa_q,   q_subs  -> td_sub_q
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Usage of large scale forcing enabled:
+! increase pr_palm from 90 to 100 to allow for more standard profiles
+! + ngp_sums_ls, pt_lsa, pt_subs, q_lsa, q_subs, tmp_tnudge, sums_ls_l, 
+! use_subsidence_tendencies
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! tend_* removed
+! call_microphysics_at_all_substeps added
+! default of drizzle set to true
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! particle_attributes moved to mod_particle_attributes.f90
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! REAL constants defined as wp-kind
+! -avs_output, data_output_format, do3d_compress, iso2d_output, netcdf_output
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module cpulog moved to new separate module-file
+! interface for cpu_log removed
+!
+! 1314 2014-03-14 18:25:17Z suehring
+! + log_z_z0, number_of_sublayers, z0_av_global 
+! 1308 2014-03-13 14:58:42Z fricke
+! +ntdim_2d_xy, ntdim_2d_xz, ntdim_2d_yz, ntdim_3d
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! set default values for grid indices of maximum velocity components
+! u|v|w_max_ijk
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! Usage of nudging enabled 
+! +nudging, ntnudge, ptnudge, qnudge, tnudge, unudge, vnudge, wnudge
+! increase pr_palm from 80 to 90 to allow for more standard profiles
+!
+! Enable prescribed time depenend surface fluxes and geostrophic wind read in
+! from external file LSF_DATA
+! +large_scale_forcing, lsf_surf, lsf_vert, nlsf, time_surf, shf_surf, qsws_surf,
+!  pt_surf, q_surf, p_surf, time_vert, ug_vert, vg_vert, wsubs_vert
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! wall_flags_0 changed to 32bit int, +wall_flags_00,
+! +rflags_s_inner, rflags_invers
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! +transpose_compute_overlap,
+! several variables are now defined in the serial (non-parallel) case also
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! +tri
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! +reference_state, ref_state, use_initial_profile_as_reference, vpt_reference,
+! use_reference renamed use_single_reference_value
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! -bc_lr_dirneu, bc_lr_neudir, bc_ns_dirneu, bc_ns_neudir
+! +use_cmax
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! +background_communication, i_left, i_right, j_north, j_south, req, req_count,
+! send_receive, sendrecv_in_background, wait_stat
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! unused variables removed
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! +on_device
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! +tric, nr_timesteps_this_run
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! array_kind renamed precision_kind, pdims defined in serial code
+! bugfix: default value assigned to coupling_start_time
+!
+! 1095 2013-02-03 02:21:01Z raasch
+! FORTRAN error in r1092 removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! character length in some derived type changed for better alignment
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! + c_sedimentation, limiter_sedimentation, turbulence, a_1, a_2, a_3, b_1, b_2, 
+! + b_3, c_1, c_2, c_3, beta_cc
+!
+! bottom boundary condition of qr, nr changed from Dirichlet to Neumann
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! necessary expansions according to the two new prognostic equations (nr, qr) 
+! of the two-moment cloud physics scheme:
+! +*_init, flux_l_*, diss_l_*, flux_s_*, diss_s_*, *sws, *swst, tend_*, *, *_p
+! +t*_m, *_1, *_2, *_3, *_av, bc_*_b, bc_*_t, ibc_*_b, ibc_*_t, bc_*_t_val, 
+! +*_vertical_gradient, *_surface_initial_change, *_vertical_gradient_level, 
+! +*_vertical_gradient_level_ind, *_surface, constant_waterflux_*,  
+! +cloud_scheme, icloud_scheme, surface_waterflux_*, sums_ws*s_ws_l, wall_*flux
+!
+! constants for the two-moment scheme:
+! +a_vent, a_term, b_vent, b_term, c_evap, c_term, cof, eps_sb, k_cc, k_cr, k_rr, 
+! +k_br, kappa_rr, kin_vis_air, mu_constant_value, nc, pirho_l, dpirho_l, rho_1,
+! +schmidt, schmidt_p_1d3, stp, x0, xmin, xmax, dt_precipitation, w_precipitation
+!
+! steering parameters for the two_moment scheme:
+! +mu_constant, ventilation_effect
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! +output_format_netcdf
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! +acc_rank, num_acc_per_node,
+! -adjust_mixing_length
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! pointer free version can be generated with cpp switch __nopointer
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! -grid_matching, nxa, nya, etc., nnx_pe, nny_pe, spl_*
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! -asselin_filter_factor, cut_spline_overshoot, dt_changed, last_dt_change,
+! last_dt_change_1d, long_filter_factor, overshoot_limit_*, ups_limit_*
+! several pointer/target arrays converted to normal ones
+!
+! 996 2012-09-07 10:41:47Z raasch
+! -use_prior_plot1d_parameters
+!
+! 978 2012-08-09 08:28:32Z fricke
+! +c_u_m, c_u_m_l, c_v_m, c_v_m_l, c_w_m, c_w_m_l,
+! +bc_lr_dirneu, bc_lr_neudir, bc_ns_dirneu, bc_ns_neudir
+! -km_damp_x, km_damp_y, km_damp_max, outflow_damping_width
+! +z0h, z0h_av, z0h_factor, z0h1d
+! +ptdf_x, ptdf_y, pt_damping_width, pt_damping_factor 
+!
+! 964 2012-07-26 09:14:24Z raasch
+! -cross_linecolors, cross_linestyles, cross_normalized_x, cross_normx_factor,
+! cross_normalized_y, cross_normy_factor, cross_pnc_local,
+! cross_profile_numbers, cross_profile_number_counter, cross_uxmax,
+! cross_uxmax_computed, cross_uxmax_normalized,
+! cross_uxmax_normalized_computed, cross_uxmin, cross_uxmin_computed,
+! cross_uxmin_normalized, cross_uxmin_normalized_computed, cross_uymax,
+! cross_uymin, cross_xtext, dopr_crossindex, dopr_label, linecolors, linestyles,
+! nz_do1d, profil_output, z_max_do1d, z_max_do1d_normalized
+!
+! 951 2012-07-19 14:22:52Z hoffmann
+! changing profile_columns and profile_rows
+!
+! 940 2012-07-09 14:31:00Z raasch
+! +neutral
+!
+! 927 2012-06-06 19:15:04Z raasch
+! +masking_method
+!
+! 880 2012-04-13 06:28:59Z raasch
+! gathered_size, subdomain_size moved to control_parameters
+!
+! 866 2012-03-28 06:44:41Z raasch
+! interface for global_min_max changed
+!
+! 861 2012-03-26 14:18:34Z suehring
+! +wall_flags_0
+! -boundary_flags
+! +nzb_max
+! +adv_sca_1, +adv_mom_1
+!
+! 849 2012-03-15 10:35:09Z raasch
+! +deleted_particles, deleted_tails, tr.._count_sum, tr.._count_recv_sum in
+! particle_attributes,
+! +de_dx, de_dy, de_dz in arrays_3d,
+! first_call_advec_particles renamed first_call_lpm
+!
+! 828 2012-02-21 12:00:36Z raasch
+! +dissipation_classes, radius_classes, use_kernel_tables,
+! particle feature color renamed class
+!
+! 825 2012-02-19 03:03:44Z raasch
+! +bfactor, curvature_solution_effects, eps_ros, molecular_weight_of_water,
+! vanthoff, -b_cond in cloud_parameters,
+! dopts_num increased to 29, particle attributes speed_x|y|z_sgs renamed
+! rvar1|2|3
+! wang_collision_kernel and turbulence_effects_on_collision replaced by
+! collision_kernel, hall_kernel, palm_kernel, wang_kernel
+!
+! 809 2012-01-30 13:32:58Z marongas
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files.
+! New parameter check_restart has been defined which is needed by 
+! check_namelist_files only.
+!
+! 805 2012-01-17 15:53:28Z franke
+! Bugfix collective_wait must be out of parallel branch for runs in serial mode
+!
+! 801 2012-01-10 17:30:36Z suehring
+! Dimesion of sums_wsus_ws_l, ! sums_wsvs_ws_l, sums_us2_ws_l, sums_vs2_ws_l,
+! sums_ws2_ws_l, sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l increased.
+! for thread-safe summation in advec_ws.
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.95  2007/02/11 13:18:30  raasch
+! version 3.1b (last under RCS control)
+!
+! Revision 1.1  1997/07/24 11:21:26  raasch
+! Initial revision
+!
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of global variables
+!------------------------------------------------------------------------------!
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of variables for special advection schemes.
+!------------------------------------------------------------------------------!
+ MODULE advection
+ 
+    USE kinds
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  aex  !< exponential coefficient for the Bott-Chlond advection scheme
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  bex  !< exponential coefficient for the Bott-Chlond advection scheme
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dex  !< exponential coefficient for the Bott-Chlond advection scheme
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  eex  !< exponential coefficient for the Bott-Chlond advection scheme
+    
+    SAVE
+
+ END MODULE advection
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The variable in this module is used by multi_agent_system_mod AND
+!> netcdf_interface_mod. It must be here to avoid circular dependency.
+!> This is a workaround.
+!------------------------------------------------------------------------------!
+ MODULE mas_global_attributes
+ 
+    USE kinds
+
+    INTEGER(iwp) ::  dim_size_agtnum  !< size of agent number dimension for netCDF output
+
+    SAVE
+
+ END MODULE mas_global_attributes
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of all arrays defined on the computational grid.
+!------------------------------------------------------------------------------!
+ MODULE arrays_3d
+
+    USE kinds
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m                  !< mean phase velocity at outflow for u-component used in radiation boundary condition
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m_l                !< mean phase velocity at outflow for u-component used in radiation boundary condition (local subdomain value)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m                  !< mean phase velocity at outflow for v-component used in radiation boundary condition
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m_l                !< mean phase velocity at outflow for v-component used in radiation boundary condition (local subdomain value)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m                  !< mean phase velocity at outflow for w-component used in radiation boundary condition
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m_l                !< mean phase velocity at outflow for w-component used in radiation boundary condition (local subdomain value)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu                   !< 1/dzu 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu_pres              !< modified ddzu for pressure solver 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dd2zu                  !< 1/(dzu(k)+dzu(k+1)) 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzu                    !< vertical grid size (u-grid) 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzw                   !< 1/dzw 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzw                    !< vertical grid size (w-grid) 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  hyp                    !< hydrostatic pressure 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  inflow_damping_factor  !< used for turbulent inflow (non-cyclic boundary conditions) 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ptdf_x                 !< damping factor for potential temperature in x-direction 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ptdf_y                 !< damping factor for potential temperature in y-direction 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_init                !< initial profile of potential temperature 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_init                 !< initial profile of total water mixing ratio 
+                                                                   !< (or total water content with active cloud physics) 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rdf                    !< rayleigh damping factor for velocity components 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rdf_sc                 !< rayleigh damping factor for scalar quantities 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ref_state              !< reference state of potential temperature 
+                                                                   !< (and density in case of ocean simulation)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  s_init                 !< initial profile of passive scalar concentration
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  sa_init                !< initial profile of salinity (ocean)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ug                     !< geostrophic wind component in x-direction
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_init                 !< initial profile of horizontal velocity component u
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_stokes_zu            !< u-component of Stokes drift velocity at zu levels
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_stokes_zw            !< u-component of Stokes drift velocity at zw levels
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  vg                     !< geostrophic wind component in y-direction
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_init                 !< initial profile of horizontal velocity component v
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_stokes_zu            !< v-component of Stokes drift velocity at zu levels
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_stokes_zw            !< v-component of Stokes drift velocity at zw levels
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  w_subs                 !< subsidence/ascent velocity
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  zu                     !< vertical grid coordinate of u-grid (in m)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  zw                     !< vertical grid coordinate of w-grid (in m)
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  c_u                   !< phase speed of u-velocity component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  c_v                   !< phase speed of v-velocity component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  c_w                   !< phase speed of w-velocity component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_diss           !< artificial numerical dissipation flux at south face of grid box - TKE dissipation
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_e              !< artificial numerical dissipation flux at south face of grid box - subgrid-scale TKE
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_nc             !< artificial numerical dissipation flux at south face of grid box - clouddrop-number concentration    
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_nr             !< artificial numerical dissipation flux at south face of grid box - raindrop-number concentration    
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_pt             !< artificial numerical dissipation flux at south face of grid box - potential temperature 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_q              !< artificial numerical dissipation flux at south face of grid box - mixing ratio 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_qc             !< artificial numerical dissipation flux at south face of grid box - cloudwater 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_qr             !< artificial numerical dissipation flux at south face of grid box - rainwater 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_s              !< artificial numerical dissipation flux at south face of grid box - passive scalar
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_sa             !< artificial numerical dissipation flux at south face of grid box - salinity
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_u              !< artificial numerical dissipation flux at south face of grid box - u-component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_v              !< artificial numerical dissipation flux at south face of grid box - v-component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  diss_s_w              !< artificial numerical dissipation flux at south face of grid box - w-component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dzu_mg                !< vertical grid size (u-grid) for multigrid pressure solver
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dzw_mg                !< vertical grid size (w-grid) for multigrid pressure solver
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_diss           !< 6th-order advective flux at south face of grid box - TKE dissipation
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_e              !< 6th-order advective flux at south face of grid box - subgrid-scale TKE
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_nc             !< 6th-order advective flux at south face of grid box - clouddrop-number concentration 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_nr             !< 6th-order advective flux at south face of grid box - raindrop-number concentration 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_pt             !< 6th-order advective flux at south face of grid box - potential temperature 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_q              !< 6th-order advective flux at south face of grid box - mixing ratio 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_qc             !< 6th-order advective flux at south face of grid box - cloudwater
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_qr             !< 6th-order advective flux at south face of grid box - rainwater
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_s              !< 6th-order advective flux at south face of grid box - passive scalar
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_sa             !< 6th-order advective flux at south face of grid box - salinity
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_u              !< 6th-order advective flux at south face of grid box - u-component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_v              !< 6th-order advective flux at south face of grid box - v-component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_w              !< 6th-order advective flux at south face of grid box - w-component
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f1_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f2_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f3_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  mean_inflow_profiles  !< used for turbulent inflow (non-cyclic boundary conditions)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  precipitation_amount  !< precipitation amount due to gravitational settling (bulk microphysics)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pt_slope_ref          !< potential temperature in rotated coordinate system 
+                                                                    !< (in case of sloped surface) 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_a            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (atmosphere data)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_o            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (ocean data)
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  d           !< divergence
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  de_dx       !< gradient of sgs tke in x-direction (lpm)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  de_dy       !< gradient of sgs tke in y-direction (lpm)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  de_dz       !< gradient of sgs tke in z-direction (lpm)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_diss !< artificial numerical dissipation flux at left face of grid box - TKE dissipation
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_e    !< artificial numerical dissipation flux at left face of grid box - subgrid-scale TKE
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_nc   !< artificial numerical dissipation flux at left face of grid box - clouddrop-number concentration
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_nr   !< artificial numerical dissipation flux at left face of grid box - raindrop-number concentration
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_pt   !< artificial numerical dissipation flux at left face of grid box - potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_q    !< artificial numerical dissipation flux at left face of grid box - mixing ratio
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_qc   !< artificial numerical dissipation flux at left face of grid box - cloudwater
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_qr   !< artificial numerical dissipation flux at left face of grid box - rainwater
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_s    !< artificial numerical dissipation flux at left face of grid box - passive scalar
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_sa   !< artificial numerical dissipation flux at left face of grid box - salinity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_u    !< artificial numerical dissipation flux at left face of grid box - u-component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_v    !< artificial numerical dissipation flux at left face of grid box - v-component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  diss_l_w    !< artificial numerical dissipation flux at left face of grid box - w-component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_diss !< 6th-order advective flux at south face of grid box - TKE dissipation
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_e    !< 6th-order advective flux at south face of grid box - subgrid-scale TKE
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_nc   !< 6th-order advective flux at south face of grid box - clouddrop-number concentration
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_nr   !< 6th-order advective flux at south face of grid box - raindrop-number concentration
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_pt   !< 6th-order advective flux at south face of grid box - potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_q    !< 6th-order advective flux at south face of grid box - mixing ratio
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_qc   !< 6th-order advective flux at south face of grid box - cloudwater
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_qr   !< 6th-order advective flux at south face of grid box - rainwater
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_s    !< 6th-order advective flux at south face of grid box - passive scalar
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_sa   !< 6th-order advective flux at south face of grid box - salinity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_u    !< 6th-order advective flux at south face of grid box - u-component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_v    !< 6th-order advective flux at south face of grid box - v-component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  flux_l_w    !< 6th-order advective flux at south face of grid box - w-component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  kh  !< eddy diffusivity for heat 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  km  !< eddy diffusivity for momentum
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  prr         !< rain rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p_loc       !< local array in multigrid/sor solver containing the pressure which is iteratively advanced in each iteration step
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tend        !< tendency field (time integration)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tric        !< coefficients of the tridiagonal matrix for solution of the Poisson equation in Fourier space
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_l       !< velocity data (u at left boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_n       !< velocity data (u at north boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_r       !< velocity data (u at right boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_s       !< velocity data (u at south boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_l       !< velocity data (v at left boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_n       !< velocity data (v at north boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_r       !< velocity data (v at right boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_s       !< velocity data (v at south boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_l       !< velocity data (w at left boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_n       !< velocity data (w at north boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_r       !< velocity data (w at right boundary) from time level t-dt required for radiation boundary condition
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_s       !< velocity data (w at south boundary) from time level t-dt required for radiation boundary condition
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss       !< TKE dissipation
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss_p     !< prognostic value TKE dissipation
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  e          !< subgrid-scale turbulence kinetic energy (sgs tke)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  e_p        !< prognostic value of sgs tke
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nc         !< cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nc_p       !< prognostic value of cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nr         !< rain drop number density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nr_p       !< prognostic value of rain drop number density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  p          !< perturbation pressure
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  prho       !< potential density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pt         !< potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pt_p       !< prognostic value of potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q          !< mixing ratio  
+                                                                   !< (or total water content with active cloud physics)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_p        !< prognostic value of mixing ratio 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qc         !< cloud water content
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qc_p       !< cloud water content
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql         !< liquid water content
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_c       !< change in liquid water content due to 
+                                                                   !< condensation/evaporation during last time step
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_v       !< volume of liquid water
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_vp      !< liquid water weighting factor
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qr         !< rain water content
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qr_p       !< prognostic value of rain water content 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  rho_ocean  !< density of ocean
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s          !< passive scalar
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_p        !< prognostic value of passive scalar
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sa         !< ocean salinity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sa_p       !< prognostic value of ocean salinity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tdiss_m    !< weighted tendency of diss for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  te_m       !< weighted tendency of e for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tnc_m      !< weighted tendency of nc for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tnr_m      !< weighted tendency of nr for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tpt_m      !< weighted tendency of pt for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tq_m       !< weighted tendency of q for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tqc_m      !< weighted tendency of qc for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tqr_m      !< weighted tendency of qr for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ts_m       !< weighted tendency of s for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tsa_m      !< weighted tendency of sa for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tu_m       !< weighted tendency of u for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tv_m       !< weighted tendency of v for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  tw_m       !< weighted tendency of w for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  u          !< horizontal velocity component u (x-direction)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  u_p        !< prognostic value of u
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  v          !< horizontal velocity component v (y-direction)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  v_p        !< prognostic value of v
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  vpt        !< virtual potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w          !< vertical velocity component w (z-direction)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w_p        !< prognostic value of w
+#else
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss_1  !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss_2  !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss_3  !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  e_1     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  e_2     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  e_3     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  p       !< pointer: perturbation pressure
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  prho_1  !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nc_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nc_2    !< pointer for swapping of timelevels for respective quantity 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nc_3    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nr_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nr_2    !< pointer for swapping of timelevels for respective quantity 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nr_3    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pt_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pt_2    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pt_3    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_1     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_2     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_3     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qc_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qc_2    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qc_3    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_v    !< pointer: volume of liquid water
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_vp   !< pointer: liquid water weighting factor
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_2    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qr_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qr_2    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qr_3    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  rho_1   !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_1     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_2     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_3     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sa_1    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sa_2    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sa_3    !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  u_1     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  u_2     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  u_3     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  v_1     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  v_2     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  v_3     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  vpt_1   !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w_1     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w_2     !< pointer for swapping of timelevels for respective quantity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w_3     !< pointer for swapping of timelevels for respective quantity
+
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  diss       !< pointer: TKE dissipation
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  diss_p     !< pointer: prognostic value of TKE dissipation
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  e          !< pointer: subgrid-scale turbulence kinetic energy (sgs tke)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  e_p        !< pointer: prognostic value of sgs tke
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nc         !< pointer: cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nc_p       !< pointer: prognostic value of cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nr         !< pointer: rain drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  nr_p       !< pointer: prognostic value of rain drop number density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  prho       !< pointer: potential density
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  pt         !< pointer: potential temperature
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  pt_p       !< pointer: prognostic value of potential temperature
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  q          !< pointer: mixing ratio
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  q_p        !< pointer: prognostic value of mixing ratio
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qc         !< pointer: cloud water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qc_p       !< pointer: cloud water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  ql         !< pointer: liquid water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  ql_c       !< pointer: change in liquid water content due to
+                                                                   !< condensation/evaporation during last time step
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qr         !< pointer: rain water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  qr_p       !< pointer: prognostic value of rain water content
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  rho_ocean  !< pointer: density of ocean
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  s          !< pointer: passive scalar
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  s_p        !< pointer: prognostic value of passive scalar
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  sa         !< pointer: ocean salinity
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  sa_p       !< pointer: prognostic value of ocean salinity
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tdiss_m    !< pointer: weighted tendency of diss for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  te_m       !< pointer: weighted tendency of e for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tnc_m      !< pointer: weighted tendency of nc for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tnr_m      !< pointer: weighted tendency of nr for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tpt_m      !< pointer: weighted tendency of pt for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tq_m       !< pointer: weighted tendency of q for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tqc_m      !< pointer: weighted tendency of qc for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tqr_m      !< pointer: weighted tendency of qr for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  ts_m       !< pointer: weighted tendency of s for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tsa_m      !< pointer: weighted tendency of sa for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tu_m       !< pointer: weighted tendency of u for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tv_m       !< pointer: weighted tendency of v for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  tw_m       !< pointer: weighted tendency of w for previous sub-timestep (Runge-Kutta)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  u          !< pointer: horizontal velocity component u (x-direction)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  u_p        !< pointer: prognostic value of u
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  v          !< pointer: horizontal velocity component v (y-direction)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  v_p        !< pointer: prognostic value of v
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  vpt        !< pointer: virtual potential temperature
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  w          !< pointer: vertical velocity component w (z-direction)
+    REAL(wp), DIMENSION(:,:,:), POINTER, CONTIGUOUS ::  w_p        !< pointer: prognostic value of w
+#endif
+
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  tri    !<  array to hold the tridiagonal matrix for solution of the Poisson equation in Fourier space (4th dimension for threads)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rho_air      !< air density profile on the uv grid
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rho_air_zw   !< air density profile on the w grid
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  drho_air     !< inverse air density profile on the uv grid
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  drho_air_zw  !< inverse air density profile on the w grid
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_air_mg     !< air density profiles on the uv grid for multigrid
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_air_zw_mg  !< air density profiles on the w grid for multigrid
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  heatflux_input_conversion       !< conversion factor array for heatflux input
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  waterflux_input_conversion      !< conversion factor array for waterflux input
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  momentumflux_input_conversion   !< conversion factor array for momentumflux input
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  heatflux_output_conversion      !< conversion factor array for heatflux output
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  waterflux_output_conversion     !< conversion factor array for waterflux output
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  momentumflux_output_conversion  !< conversion factor array for momentumflux output
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  hyrho   !< density of air calculated with hydrostatic pressure
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  exner   !< ratio of actual and potential temperature
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  d_exner !< ratio of potential and actual temperature
+
+    SAVE
+
+ END MODULE arrays_3d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of variables needed for time-averaging of 2d/3d data.
+!------------------------------------------------------------------------------!
+ MODULE averaging
+ 
+    USE kinds
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ghf_av                 !< avg. ground heat flux
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lwp_av                 !< avg. liquid water path
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ol_av                  !< avg. Obukhov length
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  qsws_av                !< avg. surface moisture flux
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  r_a_av                 !< avg. resistance
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ssws_av                !< avg. surface scalar flux
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  shf_av                 !< avg. surface heat flux
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tsurf_av               !< avg. surface temperature
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ts_av                  !< avg. characteristic temperature scale
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  us_av                  !< avg. friction velocity
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  z0_av                  !< avg. roughness length for momentum
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  z0h_av                 !< avg. roughness length for heat
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  z0q_av                 !< avg. roughness length for moisture
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  diss_av       !< avg. tke dissipation rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  e_av          !< avg. subgrid-scale tke
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  kh_av         !< avg. eddy diffusivity for heat
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  km_av         !< avg. eddy diffusivity for momentum
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  lpt_av        !< avg. liquid water potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nc_av         !< avg. cloud drop number density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nr_av         !< avg. rain drop number density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  p_av          !< avg. perturbation pressure
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pc_av         !< avg. particle/droplet concentration
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pr_av         !< avg. particle/droplet radius
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  prr_av        !< avg. precipitation rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  pt_av         !< avg. potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_av          !< avg. mixing ratio
+                                                                      !< (or total water content with active cloud physics)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qc_av         !< avg. cloud water content
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_av         !< avg. liquid water content 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_c_av       !< avg. change in liquid water content due to 
+                                                                      !< condensation/evaporation during last time step
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_v_av       !< avg. volume of liquid water
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ql_vp_av      !< avg. liquid water weighting factor
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qr_av         !< avg. rain water content
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qv_av         !< avg. water vapor content (mixing ratio)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  rho_ocean_av  !< avg. ocean density
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  s_av          !< avg. passive scalar
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sa_av         !< avg. salinity
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  u_av          !< avg. horizontal velocity component u 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  v_av          !< avg. horizontal velocity component v
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  vpt_av        !< avg. virtual potential temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  w_av          !< avg. vertical velocity component
+  
+ END MODULE averaging
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of parameters for program control
+!------------------------------------------------------------------------------!
+ MODULE control_parameters
+
+    USE kinds
+
+    TYPE file_status
+       LOGICAL ::  opened         !< file is currently open
+       LOGICAL ::  opened_before  !< file is currently closed, but has been openend before
+    END TYPE file_status
+    
+    INTEGER, PARAMETER      ::  mask_xyz_dimension = 100  !< limit of mask dimensions (100 points in each direction)
+    INTEGER, PARAMETER      ::  max_masks = 50            !< maximum number of masks
+    INTEGER(iwp), PARAMETER ::  varnamelength = 30        !< length of output variable names
+
+    TYPE(file_status), DIMENSION(200+2*max_masks) ::                &  !< indicates if file is open or if it has been opened before
+                             openfile = file_status(.FALSE.,.FALSE.)
+
+    CHARACTER (LEN=1)    ::  cycle_mg = 'w'                               !< namelist parameter (see documentation)
+    CHARACTER (LEN=1)    ::  timestep_reason = ' '                        !< 'A'dvection or 'D'iffusion criterion, written to RUN_CONTROL file
+    CHARACTER (LEN=8)    ::  coupling_char = ''                           !< appended to filenames in coupled or nested runs ('_O': ocean PE,
+                                                                          !< '_NV': vertically nested atmosphere PE, '_N##': PE of nested domain ##
+    CHARACTER (LEN=8)    ::  most_method = 'newton'                       !< namelist parameter
+    CHARACTER (LEN=8)    ::  run_date                                     !< date of simulation run, printed to HEADER file
+    CHARACTER (LEN=8)    ::  run_time                                     !< time of simulation run, printed to HEADER file
+    CHARACTER (LEN=9)    ::  simulated_time_chr                           !< simulated time, printed to RUN_CONTROL file
+    CHARACTER (LEN=11)   ::  topography_grid_convention = ' '             !< namelist parameter
+    CHARACTER (LEN=12)   ::  version = ' '                                !< PALM version number
+    CHARACTER (LEN=12)   ::  revision = ' '                               !< PALM revision number
+    CHARACTER (LEN=12)   ::  user_interface_current_revision = ' '        !< revision number of the currently used user-interface (must match user_interface_required_revision)
+    CHARACTER (LEN=12)   ::  user_interface_required_revision = ' '       !< required user-interface revision number
+    CHARACTER (LEN=16)   ::  conserve_volume_flow_mode = 'default'        !< namelist parameter
+    CHARACTER (LEN=16)   ::  loop_optimization = 'cache'                  !< namelist parameter
+    CHARACTER (LEN=16)   ::  momentum_advec = 'ws-scheme'                 !< namelist parameter
+    CHARACTER (LEN=16)   ::  psolver = 'poisfft'                          !< namelist parameter
+    CHARACTER (LEN=16)   ::  scalar_advec = 'ws-scheme'                   !< namelist parameter
+    CHARACTER (LEN=20)   ::  approximation = 'boussinesq'                 !< namelist parameter
+    CHARACTER (LEN=40)   ::  flux_input_mode = 'approximation-specific'   !< type of flux input: dynamic or kinematic
+    CHARACTER (LEN=40)   ::  flux_output_mode = 'approximation-specific'  !< type of flux output: dynamic or kinematic
+    CHARACTER (LEN=20)   ::  bc_e_b = 'neumann'                           !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_lr = 'cyclic'                             !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_ns = 'cyclic'                             !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_p_b = 'neumann'                           !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_p_t = 'dirichlet'                         !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_pt_b = 'dirichlet'                        !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_pt_t = 'initial_gradient'                 !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_q_b = 'dirichlet'                         !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_q_t = 'neumann'                           !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_s_b = 'dirichlet'                         !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_s_t = 'initial_gradient'                  !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_uv_b = 'dirichlet'                        !< namelist parameter
+    CHARACTER (LEN=20)   ::  bc_uv_t = 'dirichlet'                        !< namelist parameter
+    CHARACTER (LEN=20)   ::  coupling_mode = 'uncoupled'                  !< coupling mode for atmosphere-ocean coupling  
+    CHARACTER (LEN=20)   ::  coupling_mode_remote = 'uncoupled'           !< coupling mode of the remote process in case of coupled atmosphere-ocean runs
+    CHARACTER (LEN=20)   ::  dissipation_1d = 'detering'                  !< namelist parameter
+    CHARACTER (LEN=20)   ::  fft_method = 'temperton-algorithm'           !< namelist parameter
+    CHARACTER (LEN=20)   ::  mixing_length_1d = 'blackadar'               !< namelist parameter
+    CHARACTER (LEN=20)   ::  random_generator = 'random-parallel'         !< namelist parameter
+    CHARACTER (LEN=20)   ::  reference_state = 'initial_profile'          !< namelist parameter  
+    CHARACTER (LEN=20)   ::  timestep_scheme = 'runge-kutta-3'            !< namelist parameter       
+    CHARACTER (LEN=20)   ::  turbulence_closure = 'Moeng_Wyngaard'        !< namelist parameter
+    CHARACTER (LEN=40)   ::  topography = 'flat'                          !< namelist parameter 
+    CHARACTER (LEN=64)   ::  host = '????'                                !< configuration identifier as given by palmrun option -c, ENVPAR namelist parameter provided by palmrun
+    CHARACTER (LEN=80)   ::  log_message                                  !< user-defined message for debugging (sse data_log.f90)
+    CHARACTER (LEN=80)   ::  run_identifier                               !< run identifier as given by palmrun option -r, ENVPAR namelist parameter provided by palmrun
+    CHARACTER (LEN=100)  ::  initializing_actions = ' '                   !< namelist parameter
+    CHARACTER (LEN=100)  ::  restart_string = ' '                         !< for storing strings in case of writing/reading restart data
+    CHARACTER (LEN=210)  ::  run_description_header                       !< string containing diverse run informations as run identifier, coupling mode, host, ensemble number, run date and time
+    CHARACTER (LEN=1000) ::  message_string = ' '                         !< dynamic string for error message output
+
+    CHARACTER (LEN=varnamelength), DIMENSION(500) ::  data_output = ' '       !< namelist parameter
+    CHARACTER (LEN=varnamelength), DIMENSION(500) ::  data_output_user = ' '  !< namelist parameter
+    CHARACTER (LEN=varnamelength), DIMENSION(500) ::  doav = ' '              !< label array for multi-dimensional, 
+                                                                              !< averaged output quantities
+                                            
+    CHARACTER (LEN=varnamelength), DIMENSION(max_masks,100) ::  data_output_masks = ' '       !< namelist parameter
+    CHARACTER (LEN=varnamelength), DIMENSION(max_masks,100) ::  data_output_masks_user = ' '  !< namelist parameter
+
+    CHARACTER (LEN=varnamelength), DIMENSION(300) ::  data_output_pr = ' '  !< namelist parameter
+    
+    CHARACTER (LEN=varnamelength), DIMENSION(200) ::  data_output_pr_user = ' '  !< namelist parameter
+    
+    CHARACTER (LEN=varnamelength), DIMENSION(max_masks,0:1,100) ::  domask = ' ' !< label array for multi-dimensional, 
+                                                                                 !< masked output quantities
+    
+    CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) ::  do2d = ' '  !< label array for 2d output quantities
+    CHARACTER (LEN=varnamelength), DIMENSION(0:1,500) ::  do3d = ' '  !< label array for 3d output quantities
+
+    INTEGER(iwp), PARAMETER ::  fl_max = 100     !< maximum number of virtual-flight measurements
+    INTEGER(iwp), PARAMETER ::  var_fl_max = 20  !< maximum number of different sampling variables in virtual flight measurements
+    
+    INTEGER(iwp) ::  abort_mode = 1                    !< abort condition (nested runs)
+    INTEGER(iwp) ::  agt_time_count = 0                !< number of output intervals for agent data output
+    INTEGER(iwp) ::  average_count_pr = 0              !< number of samples in vertical-profile output
+    INTEGER(iwp) ::  average_count_3d = 0              !< number of samples in 3d output
+    INTEGER(iwp) ::  current_timestep_number = 0       !< current timestep number, printed to RUN_CONTROL file
+    INTEGER(iwp) ::  coupling_topology = 0             !< switch for atmosphere-ocean-coupling: 0: same number of grid points and PEs along x and y in atmosphere and ocean, otherwise 1
+    INTEGER(iwp) ::  dist_range = 0                    !< switch for steering the horizontal disturbance range, 1: inflow disturbances in case of non-cyclic horizontal BC, 0: otherwise
+    INTEGER(iwp) ::  disturbance_level_ind_b           !< lowest grid index where flow disturbance is applied
+    INTEGER(iwp) ::  disturbance_level_ind_t           !< highest grid index where flow disturbance is applied
+    INTEGER(iwp) ::  doav_n = 0                        !< number of 2d/3d output quantities subject to time averaging
+    INTEGER(iwp) ::  dopr_n = 0                        !< number of profile output quantities subject to time averaging
+    INTEGER(iwp) ::  dopr_time_count = 0               !< number of output intervals for profile output
+    INTEGER(iwp) ::  dopts_time_count = 0              !< number of output intervals for particle data timeseries
+    INTEGER(iwp) ::  dots_time_count = 0               !< number of output intervals for timeseries output
+    INTEGER(iwp) ::  dp_level_ind_b = 0                !< lowest grid index for external pressure gradient forcing
+    INTEGER(iwp) ::  dvrp_filecount = 0                !< parameter for dvr visualization software
+    INTEGER(iwp) ::  ensemble_member_nr = 0            !< namelist parameter
+    INTEGER(iwp) ::  gamma_mg                          !< switch for steering the multigrid cycle: 1: v-cycle, 2: w-cycle
+    INTEGER(iwp) ::  gathered_size                     !< number of total domain grid points of the grid level which is gathered on PE0 (multigrid solver)
+    INTEGER(iwp) ::  grid_level                        !< current grid level handled in the multigrid solver
+    INTEGER(iwp) ::  ibc_e_b                           !< integer flag for bc_e_b
+    INTEGER(iwp) ::  ibc_p_b                           !< integer flag for bc_p_b
+    INTEGER(iwp) ::  ibc_p_t                           !< integer flag for bc_p_t
+    INTEGER(iwp) ::  ibc_pt_b                          !< integer flag for bc_pt_b
+    INTEGER(iwp) ::  ibc_pt_t                          !< integer flag for bc_pt_t
+    INTEGER(iwp) ::  ibc_q_b                           !< integer flag for bc_q_b
+    INTEGER(iwp) ::  ibc_q_t                           !< integer flag for bc_q_t
+    INTEGER(iwp) ::  ibc_s_b                           !< integer flag for bc_s_b
+    INTEGER(iwp) ::  ibc_s_t                           !< integer flag for bc_s_t
+    INTEGER(iwp) ::  ibc_uv_b                          !< integer flag for bc_uv_b
+    INTEGER(iwp) ::  ibc_uv_t                          !< integer flag for bc_uv_t
+    INTEGER(iwp) ::  inflow_disturbance_begin = -1     !< namelist parameter
+    INTEGER(iwp) ::  inflow_disturbance_end = -1       !< namelist parameter
+    INTEGER(iwp) ::  intermediate_timestep_count       !< number of current Runge-Kutta substep
+    INTEGER(iwp) ::  intermediate_timestep_count_max   !< maximum number of Runge-Kutta substeps
+    INTEGER(iwp) ::  io_group = 0                      !< I/O group to which the PE belongs (= #PE / io_blocks)
+    INTEGER(iwp) ::  io_blocks = 1                     !< number of blocks for which I/O is done in sequence (total number of PEs / maximum_parallel_io_streams)
+    INTEGER(iwp) ::  iran = -1234567                   !< integer random number used for flow disturbances
+    INTEGER(iwp) ::  length = 0                        !< integer that specifies the length of a string in case of writing/reading restart data
+    INTEGER(iwp) ::  masks = 0                         !< counter for number of masked output quantities
+    INTEGER(iwp) ::  maximum_grid_level                !< number of grid levels that the multigrid solver is using
+    INTEGER(iwp) ::  maximum_parallel_io_streams = -1  !< maximum number of parallel io streams that the underlying parallel file system allows, set with palmrun option -w, ENVPAR namelist parameter, provided by palmrun
+    INTEGER(iwp) ::  max_pr_user = 0                   !< number of user-defined profiles (must not change within a job chain)
+    INTEGER(iwp) ::  max_pr_user_tmp = 0               !< number of user-defined profiles that is temporary stored to check it against max_pr_user in case of restarts
+    INTEGER(iwp) ::  mgcycles = 0                      !< number of multigrid cycles that the multigrid solver has actually carried out
+    INTEGER(iwp) ::  mg_cycles = 4                     !< namelist parameter
+    INTEGER(iwp) ::  mg_switch_to_pe0_level = -1       !< namelist parameter
+    INTEGER(iwp) ::  mid                               !< masked output running index
+    INTEGER(iwp) ::  ngsrb = 2                         !< namelist parameter
+    INTEGER(iwp) ::  nr_timesteps_this_run = 0         !< number of timesteps (cpu time measurements)
+    INTEGER(iwp) ::  nsor = 20                         !< namelist parameter
+    INTEGER(iwp) ::  nsor_ini = 100                    !< namelist parameter
+    INTEGER(iwp) ::  n_sor                             !< number of iterations to be used in SOR-scheme
+    INTEGER(iwp) ::  normalizing_region = 0            !< namelist parameter
+    INTEGER(iwp) ::  num_mean_inflow_profiles = 7      !< number of mean inflow profiles in case of turbulent inflow
+    INTEGER(iwp) ::  num_leg=0                         !< number of different legs in virtual flight measurements
+    INTEGER(iwp) ::  num_var_fl                        !< number of sampling/output variables in virtual flight measurements
+    INTEGER(iwp) ::  num_var_fl_user=0                 !< number of user-defined sampling/output variables in virtual flight measurements
+    INTEGER(iwp) ::  number_stretch_level_start        !< number of user-specified start levels for stretching
+    INTEGER(iwp) ::  number_stretch_level_end          !< number of user-specified end levels for stretching
+    INTEGER(iwp) ::  nz_do3d = -9999                   !< namelist parameter
+    INTEGER(iwp) ::  prt_time_count = 0                !< number of output intervals for particle data output
+    INTEGER(iwp) ::  recycling_plane                   !< position of recycling plane along x (in grid points) in case of turbulence recycling
+    INTEGER(iwp) ::  runnr = 0                         !< number of run in job chain
+    INTEGER(iwp) ::  subdomain_size                    !< number of grid points in (3d) subdomain including ghost points
+    INTEGER(iwp) ::  terminate_coupled = 0             !< switch for steering termination in case of coupled runs
+    INTEGER(iwp) ::  terminate_coupled_remote = 0      !< switch for steering termination in case of coupled runs (condition of the remote model)
+    INTEGER(iwp) ::  timestep_count = 0                !< number of timesteps carried out since the beginning of the initial run
+    INTEGER(iwp) ::  y_shift = 0                       !< namelist parameter
+    
+    INTEGER(iwp) ::  dist_nxl(0:1)                               !< left boundary of disturbance region
+    INTEGER(iwp) ::  dist_nxr(0:1)                               !< right boundary of disturbance region
+    INTEGER(iwp) ::  dist_nyn(0:1)                               !< north boundary of disturbance region
+    INTEGER(iwp) ::  dist_nys(0:1)                               !< south boundary of disturbance region
+    INTEGER(iwp) ::  do2d_no(0:1) = 0                            !< number of 2d output quantities
+    INTEGER(iwp) ::  do2d_xy_time_count(0:1) = 0                 !< number of output intervals for 2d data (xy)
+    INTEGER(iwp) ::  do2d_xz_time_count(0:1) = 0                 !< number of output intervals for 2d data (xz)
+    INTEGER(iwp) ::  do2d_yz_time_count(0:1) = 0                 !< number of output intervals for 2d data (yz)
+    INTEGER(iwp) ::  do3d_no(0:1) = 0                            !< number of 3d output quantities
+    INTEGER(iwp) ::  do3d_time_count(0:1) = 0                    !< number of output intervals for 3d data
+    INTEGER(iwp) ::  domask_no(max_masks,0:1) = 0                !< number of masked output quantities
+    INTEGER(iwp) ::  domask_time_count(max_masks,0:1)            !< number of output intervals for masked data
+    INTEGER(iwp) ::  dz_stretch_level_end_index(9)               !< vertical grid level index until which the vertical grid spacing is stretched
+    INTEGER(iwp) ::  dz_stretch_level_start_index(9)             !< vertical grid level index above which the vertical grid spacing is stretched
+    INTEGER(iwp) ::  mask_size(max_masks,3) = -1                 !< size of mask array per mask and dimension (for netcdf output)
+    INTEGER(iwp) ::  mask_size_l(max_masks,3) = -1               !< subdomain size of mask array per mask and dimension (for netcdf output)
+    INTEGER(iwp) ::  mask_start_l(max_masks,3) = -1              !< subdomain start index of mask array (for netcdf output)
+    INTEGER(iwp) ::  pt_vertical_gradient_level_ind(10) = -9999  !< grid index values of pt_vertical_gradient_level(s)
+    INTEGER(iwp) ::  q_vertical_gradient_level_ind(10) = -9999   !< grid index values of q_vertical_gradient_level(s)
+    INTEGER(iwp) ::  s_vertical_gradient_level_ind(10) = -9999   !< grid index values of s_vertical_gradient_level(s)   
+    INTEGER(iwp) ::  section(100,3)                              !< collective array for section_xy/xz/yz
+    INTEGER(iwp) ::  section_xy(100) = -9999                     !< namelist parameter
+    INTEGER(iwp) ::  section_xz(100) = -9999                     !< namelist parameter
+    INTEGER(iwp) ::  section_yz(100) = -9999                     !< namelist parameter
+    INTEGER(iwp) ::  ug_vertical_gradient_level_ind(10) = -9999  !< grid index values of ug_vertical_gradient_level(s)
+    INTEGER(iwp) ::  vg_vertical_gradient_level_ind(10) = -9999  !< grid index values of vg_vertical_gradient_level(s)
+    INTEGER(iwp) ::  subs_vertical_gradient_level_i(10) = -9999  !< grid index values of subs_vertical_gradient_level(s)
+
+    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xy  !< number of output intervals for 2d data (xy)
+    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xz  !< number of output intervals for 2d data (xz)
+    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_yz  !< number of output intervals for 2d data (yz)
+    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_3d     !< number of output intervals for 3d data
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  grid_level_count  !< internal switch for steering the multigrid v- and w-cycles
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_i         !< subdomain grid index of masked output point on x-dimension
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_j         !< subdomain grid index of masked output point on y-dimension
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_k         !< subdomain grid index of masked output point on z-dimension
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_i_global  !< global grid index of masked output point on x-dimension
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_j_global  !< global grid index of masked output point on y-dimension
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_k_global  !< global grid index of masked output point on z-dimension
+
+    INTEGER(iwp), DIMENSION(max_masks,mask_xyz_dimension) ::  mask_k_over_surface = -1  !< namelist parameter, k index of height over surface
+
+    LOGICAL ::  agent_time_unlimited = .FALSE.                   !< namelist parameter
+    LOGICAL ::  air_chemistry = .FALSE.                          !< chemistry model switch
+    LOGICAL ::  bc_dirichlet_l                                   !< flag indicating dirichlet boundary condition on left model boundary
+    LOGICAL ::  bc_dirichlet_n                                   !< flag indicating dirichlet boundary condition on north model boundary
+    LOGICAL ::  bc_dirichlet_r                                   !< flag indicating dirichlet boundary condition on right model boundary
+    LOGICAL ::  bc_dirichlet_s                                   !< flag indicating dirichlet boundary condition on south model boundary
+    LOGICAL ::  bc_lr_cyc =.TRUE.                                !< left-right boundary condition cyclic?
+    LOGICAL ::  bc_lr_dirrad = .FALSE.                           !< left-right boundary condition dirichlet/radiation?
+    LOGICAL ::  bc_lr_raddir = .FALSE.                           !< left-right boundary condition radiation/dirichlet?
+    LOGICAL ::  bc_ns_cyc = .TRUE.                               !< north-south boundary condition cyclic?
+    LOGICAL ::  bc_ns_dirrad = .FALSE.                           !< north-south boundary condition dirichlet/radiation?
+    LOGICAL ::  bc_ns_raddir = .FALSE.                           !< north-south boundary condition radiation/dirichlet?
+    LOGICAL ::  bc_radiation_l = .FALSE.                         !< radiation boundary condition for outflow at left domain boundary
+    LOGICAL ::  bc_radiation_n = .FALSE.                         !< radiation boundary condition for outflow at north domain boundary
+    LOGICAL ::  bc_radiation_r = .FALSE.                         !< radiation boundary condition for outflow at right domain boundary
+    LOGICAL ::  bc_radiation_s = .FALSE.                         !< radiation boundary condition for outflow at south domain boundary
+    LOGICAL ::  biometeorology = .FALSE.                         !< biometeorology module switch
+    LOGICAL ::  calc_soil_moisture_during_spinup = .FALSE.       !< namelist parameter
+    LOGICAL ::  call_psolver_at_all_substeps = .TRUE.            !< namelist parameter
+    LOGICAL ::  child_domain  = .FALSE.                          !< flag indicating that model is nested in a parent domain
+    LOGICAL ::  cloud_droplets = .FALSE.                         !< namelist parameter
+    LOGICAL ::  complex_terrain = .FALSE.                        !< namelist parameter
+    LOGICAL ::  conserve_volume_flow = .FALSE.                   !< namelist parameter
+    LOGICAL ::  constant_diffusion = .FALSE.                     !< diffusion coefficient constant?
+    LOGICAL ::  constant_flux_layer = .TRUE.                     !< namelist parameter
+    LOGICAL ::  constant_heatflux = .TRUE.                       !< heat flux at all surfaces constant?
+    LOGICAL ::  constant_top_heatflux = .TRUE.                   !< heat flux at domain top constant?
+    LOGICAL ::  constant_top_momentumflux = .FALSE.              !< momentum flux at domain topconstant?
+    LOGICAL ::  constant_top_salinityflux = .TRUE.               !< constant salinity flux at ocean surface
+    LOGICAL ::  constant_top_scalarflux = .TRUE.                 !< passive-scalar flux at domain top constant?
+    LOGICAL ::  constant_scalarflux = .TRUE.                     !< passive-scalar flux at surfaces constant?
+    LOGICAL ::  constant_waterflux = .TRUE.                      !< water flux at all surfaces constant?
+    LOGICAL ::  create_disturbances = .TRUE.                     !< namelist parameter
+    LOGICAL ::  data_output_during_spinup = .FALSE.              !< namelist parameter
+    LOGICAL ::  data_output_2d_on_each_pe = .TRUE.               !< namelist parameter
+    LOGICAL ::  disturbance_created = .FALSE.                    !< flow disturbance imposed?
+    LOGICAL ::  do2d_at_begin = .FALSE.                          !< namelist parameter
+    LOGICAL ::  do3d_at_begin = .FALSE.                          !< namelist parameter
+    LOGICAL ::  do_sum = .FALSE.                                 !< contribute to time average of profile data?
+    LOGICAL ::  dp_external = .FALSE.                            !< namelist parameter
+    LOGICAL ::  dp_smooth = .FALSE.                              !< namelist parameter
+    LOGICAL ::  dt_fixed = .FALSE.                               !< fixed timestep (namelist parameter dt set)?
+    LOGICAL ::  dt_3d_reached                                    !< internal timestep for particle advection
+    LOGICAL ::  dt_3d_reached_l                                  !< internal timestep for particle advection
+    LOGICAL ::  first_call_lpm = .TRUE.                          !< call lpm only once per timestep?
+    LOGICAL ::  first_call_mas = .TRUE.                          !< call mas only once per timestep
+    LOGICAL ::  force_print_header = .FALSE.                     !< namelist parameter
+    LOGICAL ::  galilei_transformation = .FALSE.                 !< namelist parameter
+    LOGICAL ::  humidity = .FALSE.                               !< namelist parameter
+    LOGICAL ::  humidity_remote = .FALSE.                        !< switch for receiving near-surface humidity flux (atmosphere-ocean coupling)
+    LOGICAL ::  indoor_model = .FALSE.                           !< switch for indoor-climate and energy-demand model
+    LOGICAL ::  large_scale_forcing = .FALSE.                    !< namelist parameter
+    LOGICAL ::  large_scale_subsidence = .FALSE.                 !< namelist parameter
+    LOGICAL ::  land_surface = .FALSE.                           !< use land surface model?
+    LOGICAL ::  les_dynamic = .FALSE.                            !< use dynamic subgrid model as turbulence closure for LES mode
+    LOGICAL ::  les_mw = .FALSE.                                 !< use Moeng-Wyngaard turbulence closure for LES mode
+    LOGICAL ::  lsf_exception = .FALSE.                          !< use of lsf with buildings (temporary)?
+    LOGICAL ::  lsf_surf = .TRUE.                                !< use surface forcing (large scale forcing)?
+    LOGICAL ::  lsf_vert = .TRUE.                                !< use atmospheric forcing (large scale forcing)?
+    LOGICAL ::  masking_method = .FALSE.                         !< namelist parameter
+    LOGICAL ::  mg_switch_to_pe0 = .FALSE.                       !< internal multigrid switch for steering the ghost point exchange in case that data has been collected on PE0
+    LOGICAL ::  nesting_offline = .FALSE.                        !< flag controlling offline nesting in COSMO model  
+    LOGICAL ::  neutral = .FALSE.                                !< namelist parameter
+    LOGICAL ::  nudging = .FALSE.                                !< namelist parameter
+    LOGICAL ::  ocean_mode = .FALSE.                             !< namelist parameter
+    LOGICAL ::  passive_scalar = .FALSE.                         !< namelist parameter
+    LOGICAL ::  plant_canopy = .FALSE.                           !< switch for use of plant canopy model
+    LOGICAL ::  random_heatflux = .FALSE.                        !< namelist parameter
+    LOGICAL ::  rans_mode = .FALSE.                              !< switch between RANS and LES mode
+    LOGICAL ::  rans_tke_e = .FALSE.                             !< use TKE-e turbulence closure for RANS mode
+    LOGICAL ::  rans_tke_l = .FALSE.                             !< use TKE-l turbulence closure for RANS mode
+    LOGICAL ::  read_svf = .FALSE.                               !< ENVPAR namelist parameter to steer input of svf (ENVPAR is provided by palmrun)
+    LOGICAL ::  recycling_yshift = .FALSE.                       !< namelist parameter
+    LOGICAL ::  run_control_header = .FALSE.                     !< onetime output of RUN_CONTROL header
+    LOGICAL ::  run_coupled = .TRUE.                             !< internal switch telling PALM to run in coupled mode (i.e. to exchange surface data) in case of atmosphere-ocean coupling
+    LOGICAL ::  scalar_rayleigh_damping = .TRUE.                 !< namelist parameter
+    LOGICAL ::  sloping_surface = .FALSE.                        !< use sloped surface? (namelist parameter alpha_surface)
+    LOGICAL ::  spinup = .FALSE.                                 !< perform model spinup without atmosphere code?
+    LOGICAL ::  surface_data_output = .FALSE.                    !< output of surface data
+    LOGICAL ::  stop_dt = .FALSE.                                !< internal switch to stop the time stepping
+    LOGICAL ::  synchronous_exchange = .FALSE.                   !< namelist parameter
+    LOGICAL ::  syn_turb_gen = .FALSE.                           !< flag for synthetic turbulence generator module
+    LOGICAL ::  terminate_run = .FALSE.                          !< terminate run (cpu-time limit, restarts)?
+    LOGICAL ::  topo_no_distinct = .FALSE.                       !< flag controlling classification of topography surfaces
+    LOGICAL ::  transpose_compute_overlap = .FALSE.              !< namelist parameter
+    LOGICAL ::  turbulent_inflow = .FALSE.                       !< namelist parameter
+    LOGICAL ::  turbulent_outflow = .FALSE.                      !< namelist parameter
+    LOGICAL ::  urban_surface = .FALSE.                          !< use urban surface model?
+    LOGICAL ::  use_cmax = .TRUE.                                !< namelist parameter
+    LOGICAL ::  use_free_convection_scaling = .FALSE.            !< namelist parameter to switch on free convection velocity scale in calculation of horizontal wind speed (surface_layer_fluxes)
+    LOGICAL ::  use_initial_profile_as_reference = .FALSE.       !< use of initial profiles as reference state?
+    LOGICAL ::  use_prescribed_profile_data = .FALSE.            !< use of prescribed wind profiles?
+                                                                 !< (namelist parameters u_profile, v_profile)
+    LOGICAL ::  use_single_reference_value = .FALSE.             !< use of single value as reference state?
+    LOGICAL ::  use_subsidence_tendencies = .FALSE.              !< namelist parameter
+    LOGICAL ::  use_surface_fluxes = .FALSE.                     !< namelist parameter
+    LOGICAL ::  use_top_fluxes = .FALSE.                         !< namelist parameter
+    LOGICAL ::  use_ug_for_galilei_tr = .TRUE.                   !< namelist parameter
+    LOGICAL ::  use_upstream_for_tke = .FALSE.                   !< namelist parameter
+    LOGICAL ::  uv_exposure = .FALSE.                            !< switch for uv exposure model
+    LOGICAL ::  virtual_flight = .FALSE.                         !< use virtual flight model
+    LOGICAL ::  virtual_measurement = .FALSE.                    !< control parameter to switch-on virtual measurements
+    LOGICAL ::  wall_adjustment = .TRUE.                         !< namelist parameter
+    LOGICAL ::  wind_turbine = .FALSE.                           !< flag for use of wind turbine model
+    LOGICAL ::  write_binary = .FALSE.                           !< ENVPAR namelist parameter to steer restart I/O (ENVPAR is provided by palmrun)
+    LOGICAL ::  write_svf = .FALSE.                              !< ENVPAR namelist parameter to steer output of svf (ENVPAR is provided by palmrun)
+    LOGICAL ::  ws_scheme_sca = .FALSE.                          !< use Wicker-Skamarock scheme (scalar advection)?
+    LOGICAL ::  ws_scheme_mom = .FALSE.                          !< use Wicker-Skamarock scheme (momentum advection)?
+
+    LOGICAL ::  data_output_xy(0:1) = .FALSE.                !< output of xy cross-section data?
+    LOGICAL ::  data_output_xz(0:1) = .FALSE.                !< output of xz cross-section data?
+    LOGICAL ::  data_output_yz(0:1) = .FALSE.                !< output of yz cross-section data?
+
+    LOGICAL, DIMENSION(max_masks) ::  mask_surface = .FALSE.      !< flag for surface-following masked output
+
+    REAL(wp) ::  advected_distance_x = 0.0_wp                  !< advected distance of model domain along x 
+                                                               !< (galilei transformation) 
+    REAL(wp) ::  advected_distance_y = 0.0_wp                  !< advected distance of model domain along y 
+                                                               !< (galilei transformation)
+    REAL(wp) ::  alpha_surface = 0.0_wp                        !< namelist parameter
+    REAL(wp) ::  atmos_ocean_sign = 1.0_wp                     !< vertical-grid conversion factor
+                                                               !< (=1.0 in atmosphere, =-1.0 in ocean)
+    REAL(wp) ::  averaging_interval = 0.0_wp                   !< namelist parameter
+    REAL(wp) ::  averaging_interval_pr = 9999999.9_wp          !< namelist parameter
+    REAL(wp) ::  bc_pt_t_val                                   !< vertical gradient of pt near domain top
+    REAL(wp) ::  bc_q_t_val                                    !< vertical gradient of humidity near domain top
+    REAL(wp) ::  bc_s_t_val                                    !< vertical gradient of passive scalar near domain top
+    REAL(wp) ::  bottom_salinityflux = 0.0_wp                  !< namelist parameter
+    REAL(wp) ::  building_height = 50.0_wp                     !< namelist parameter
+    REAL(wp) ::  building_length_x = 50.0_wp                   !< namelist parameter
+    REAL(wp) ::  building_length_y = 50.0_wp                   !< namelist parameter
+    REAL(wp) ::  building_wall_left = 9999999.9_wp             !< namelist parameter
+    REAL(wp) ::  building_wall_south = 9999999.9_wp            !< namelist parameter
+    REAL(wp) ::  canyon_height = 50.0_wp                       !< namelist parameter
+    REAL(wp) ::  canyon_width_x = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  canyon_width_y = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  canyon_wall_left = 9999999.9_wp               !< namelist parameter
+    REAL(wp) ::  canyon_wall_south = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  cfl_factor = -1.0_wp                          !< namelist parameter
+    REAL(wp) ::  cos_alpha_surface                             !< cosine of alpha_surface
+    REAL(wp) ::  coupling_start_time = 0.0_wp                  !< namelist parameter
+    REAL(wp) ::  days_since_reference_point = 0.0_wp           !< days after atmosphere-ocean coupling has been activated, 
+                                                               !< or after spinup phase of LSM has been finished 
+    REAL(wp) ::  disturbance_amplitude = 0.25_wp               !< namelist parameter
+    REAL(wp) ::  disturbance_energy_limit = 0.01_wp            !< namelist parameter
+    REAL(wp) ::  disturbance_level_b = -9999999.9_wp           !< namelist parameter
+    REAL(wp) ::  disturbance_level_t = -9999999.9_wp           !< namelist parameter
+    REAL(wp) ::  dp_level_b = 0.0_wp                           !< namelist parameter
+    REAL(wp) ::  dt = -1.0_wp                                  !< namelist parameter
+    REAL(wp) ::  dt_averaging_input = 0.0_wp                   !< namelist parameter
+    REAL(wp) ::  dt_averaging_input_pr = 9999999.9_wp          !< namelist parameter
+    REAL(wp) ::  dt_coupling = 9999999.9_wp                    !< namelist parameter
+    REAL(wp) ::  dt_data_output = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  dt_data_output_av = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  dt_disturb = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  dt_dopr = 9999999.9_wp                        !< namelist parameter
+    REAL(wp) ::  dt_dopr_listing = 9999999.9_wp                !< namelist parameter
+    REAL(wp) ::  dt_dopts = 9999999.9_wp                       !< namelist parameter
+    REAL(wp) ::  dt_dots = 9999999.9_wp                        !< namelist parameter
+    REAL(wp) ::  dt_do2d_xy = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  dt_do2d_xz = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  dt_do2d_yz = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  dt_do3d = 9999999.9_wp                        !< namelist parameter
+    REAL(wp) ::  dt_dvrp = 9999999.9_wp                        !< namelist parameter
+    REAL(wp) ::  dt_max = 20.0_wp                              !< namelist parameter
+    REAL(wp) ::  dt_restart = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  dt_run_control = 60.0_wp                      !< namelist parameter
+    REAL(wp) ::  dt_spinup = 60.0_wp                           !< namelist parameter
+    REAL(wp) ::  dt_write_agent_data = 9999999.9_wp            !< namelist parameter
+    REAL(wp) ::  dt_3d = 0.01_wp                               !< time step
+    REAL(wp) ::  dz_max = 999.0_wp                             !< namelist parameter
+    REAL(wp) ::  dz_stretch_factor = 1.08_wp                   !< namelist parameter
+    REAL(wp) ::  dz_stretch_level = -9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  e_init = 0.0_wp                               !< namelist parameter
+    REAL(wp) ::  e_min = 0.0_wp                                !< namelist parameter
+    REAL(wp) ::  end_time = 0.0_wp                             !< namelist parameter
+    REAL(wp) ::  f = 0.0_wp                                    !< Coriolis parameter
+    REAL(wp) ::  fs = 0.0_wp                                   !< Coriolis parameter
+    REAL(wp) ::  inflow_damping_height = 9999999.9_wp          !< namelist parameter
+    REAL(wp) ::  inflow_damping_width = 9999999.9_wp           !< namelist parameter
+    REAL(wp) ::  km_constant = -1.0_wp                         !< namelist parameter
+    REAL(wp) ::  latitude = 55.0_wp                            !< namelist parameter
+    REAL(wp) ::  longitude = 0.0_wp                            !< namelist parameter
+    REAL(wp) ::  mask_scale_x = 1.0_wp                         !< namelist parameter
+    REAL(wp) ::  mask_scale_y = 1.0_wp                         !< namelist parameter
+    REAL(wp) ::  mask_scale_z = 1.0_wp                         !< namelist parameter
+    REAL(wp) ::  maximum_cpu_time_allowed = 0.0_wp             !< given wall time for run
+    REAL(wp) ::  molecular_viscosity = 1.461E-5_wp             !< molecular viscosity (used in lsm and lpm)
+    REAL(wp) ::  multi_agent_system_end   = 9999999.9_wp       !< namelist parameter (see documentation)
+    REAL(wp) ::  multi_agent_system_start = 0.0_wp             !< namelist parameter (see documentation)
+    REAL(wp) ::  old_dt = 1.0E-10_wp                           !< length of previous timestep
+    REAL(wp) ::  omega = 7.29212E-5_wp                         !< namelist parameter
+    REAL(wp) ::  omega_sor = 1.8_wp                            !< namelist parameter
+    REAL(wp) ::  outflow_source_plane = -9999999.9_wp          !< namelist parameter
+    REAL(wp) ::  particle_maximum_age = 9999999.9_wp           !< namelist parameter
+    REAL(wp) ::  prandtl_number = 1.0_wp                       !< namelist parameter
+    REAL(wp) ::  pt_damping_factor = 0.0_wp                    !< namelist parameter
+    REAL(wp) ::  pt_damping_width = 0.0_wp                     !< namelist parameter
+    REAL(wp) ::  pt_reference = 9999999.9_wp                   !< namelist parameter
+    REAL(wp) ::  pt_slope_offset = 0.0_wp                      !< temperature difference between left and right 
+                                                               !< boundary of total domain
+    REAL(wp) ::  pt_surface = 300.0_wp                         !< namelist parameter
+    REAL(wp) ::  pt_surface_initial_change = 0.0_wp            !< namelist parameter
+    REAL(wp) ::  q_surface = 0.0_wp                            !< namelist parameter
+    REAL(wp) ::  q_surface_initial_change = 0.0_wp             !< namelist parameter
+    REAL(wp) ::  rayleigh_damping_factor = -1.0_wp             !< namelist parameter
+    REAL(wp) ::  rayleigh_damping_height = -1.0_wp             !< namelist parameter
+    REAL(wp) ::  recycling_width = 9999999.9_wp                !< namelist parameter
+    REAL(wp) ::  residual_limit = 1.0E-4_wp                    !< namelist parameter
+    REAL(wp) ::  restart_time = 9999999.9_wp                   !< namelist parameter
+    REAL(wp) ::  rho_reference                                 !< reference state of density
+    REAL(wp) ::  rho_surface                                   !< surface value of density
+    REAL(wp) ::  roughness_length = 0.1_wp                     !< namelist parameter
+    REAL(wp) ::  simulated_time = 0.0_wp                       !< elapsed simulated time
+    REAL(wp) ::  simulated_time_at_begin                       !< elapsed simulated time of previous run (job chain)
+    REAL(wp) ::  sin_alpha_surface                             !< sine of alpha_surface (sloped surface)
+    REAL(wp) ::  skip_time_data_output = 0.0_wp                !< namelist parameter
+    REAL(wp) ::  skip_time_data_output_av = 9999999.9_wp       !< namelist parameter
+    REAL(wp) ::  skip_time_dopr = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  skip_time_do2d_xy = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  skip_time_do2d_xz = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  skip_time_do2d_yz = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  skip_time_do3d = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  spinup_pt_amplitude = 9999999.9_wp            !< namelist parameter
+    REAL(wp) ::  spinup_pt_mean = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  spinup_time = 0.0_wp                          !< namelist parameter
+    REAL(wp) ::  surface_heatflux = 9999999.9_wp               !< namelist parameter
+    REAL(wp) ::  surface_pressure = 1013.25_wp                 !< namelist parameter
+    REAL(wp) ::  surface_scalarflux = 9999999.9_wp             !< namelist parameter
+    REAL(wp) ::  surface_waterflux = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  s_surface = 0.0_wp                            !< namelist parameter
+    REAL(wp) ::  s_surface_initial_change = 0.0_wp             !< namelist parameter
+    REAL(wp) ::  termination_time_needed = 35.0_wp             !< namelist parameter
+    REAL(wp) ::  time_coupling = 0.0_wp                        !< time since last coupling (surface_coupler)
+    REAL(wp) ::  time_disturb = 0.0_wp                         !< time since last flow disturbance
+    REAL(wp) ::  time_dopr = 0.0_wp                            !< time since last profile output
+    REAL(wp) ::  time_dopr_av = 0.0_wp                         !< time since last averaged profile output
+    REAL(wp) ::  time_dopr_listing = 0.0_wp                    !< time since last profile output (ASCII) on file
+    REAL(wp) ::  time_dopts = 0.0_wp                           !< time since last particle timeseries output
+    REAL(wp) ::  time_dosp = 0.0_wp                            !< time since last spectra output
+    REAL(wp) ::  time_dosp_av = 0.0_wp                         !< time since last averaged spectra output
+    REAL(wp) ::  time_dots = 0.0_wp                            !< time since last timeseries output
+    REAL(wp) ::  time_do2d_xy = 0.0_wp                         !< time since last xy cross-section output
+    REAL(wp) ::  time_do2d_xz = 0.0_wp                         !< time since last xz cross-section output
+    REAL(wp) ::  time_do2d_yz = 0.0_wp                         !< time since last yz cross-section output
+    REAL(wp) ::  time_do3d = 0.0_wp                            !< time since last 3d output
+    REAL(wp) ::  time_do_av = 0.0_wp                           !< time since last averaged-data output
+    REAL(wp) ::  time_do_sla = 0.0_wp                          !< time since last 
+    REAL(wp) ::  time_dvrp = 0.0_wp                            !< time since last dvrp output
+    REAL(wp) ::  time_restart = 9999999.9_wp                   !< time at which run shall be terminated and restarted
+    REAL(wp) ::  time_run_control = 0.0_wp                     !< time since last RUN_CONTROL output
+    REAL(wp) ::  time_since_reference_point = 0.0_wp           !< time after atmosphere-ocean coupling has been activated, or time after spinup phase of LSM has been finished
+    REAL(wp) ::  top_heatflux = 9999999.9_wp                   !< namelist parameter
+    REAL(wp) ::  top_momentumflux_u = 9999999.9_wp             !< namelist parameter
+    REAL(wp) ::  top_momentumflux_v = 9999999.9_wp             !< namelist parameter
+    REAL(wp) ::  top_salinityflux = 9999999.9_wp               !< namelist parameter
+    REAL(wp) ::  top_scalarflux = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  tunnel_height = 9999999.9_wp                  !< namelist parameter
+    REAL(wp) ::  tunnel_length = 9999999.9_wp                  !< namelist parameter
+    REAL(wp) ::  tunnel_width_x = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  tunnel_width_y = 9999999.9_wp                 !< namelist parameter
+    REAL(wp) ::  tunnel_wall_depth = 9999999.9_wp              !< namelist parameter
+    REAL(wp) ::  ug_surface = 0.0_wp                           !< namelist parameter 
+    REAL(wp) ::  u_bulk = 0.0_wp                               !< namelist parameter 
+    REAL(wp) ::  u_gtrans = 0.0_wp                             !< transformed wind component (galilei transformation)
+    REAL(wp) ::  vg_surface = 0.0_wp                           !< namelist parameter
+    REAL(wp) ::  vpt_reference = 9999999.9_wp                  !< reference state of virtual potential temperature
+    REAL(wp) ::  v_bulk = 0.0_wp                               !< namelist parameter
+    REAL(wp) ::  v_gtrans = 0.0_wp                             !< transformed wind component (galilei transformation)
+    REAL(wp) ::  wall_adjustment_factor = 1.8_wp               !< adjustment factor for mixing length l
+    REAL(wp) ::  zeta_max = 20.0_wp                            !< namelist parameter
+    REAL(wp) ::  zeta_min = -20.0_wp                           !< namelist parameter
+    REAL(wp) ::  z0h_factor = 1.0_wp                           !< namelist parameter
+
+    REAL(wp) ::  do2d_xy_last_time(0:1) = -1.0_wp                  !< time of previous xy output
+    REAL(wp) ::  do2d_xz_last_time(0:1) = -1.0_wp                  !< time of previous xz output
+    REAL(wp) ::  do2d_yz_last_time(0:1) = -1.0_wp                  !< time of previous yz output
+    REAL(wp) ::  dpdxy(1:2) = 0.0_wp                               !< namelist parameter
+    REAL(wp) ::  dt_domask(max_masks) = 9999999.9_wp               !< namelist parameter
+    REAL(wp) ::  dz(10) = -1.0_wp                                  !< namelist parameter
+    REAL(wp) ::  dz_stretch_level_start(9) = -9999999.9_wp         !< namelist parameter
+    REAL(wp) ::  dz_stretch_level_end(9) = 9999999.9_wp            !< namelist parameter
+    REAL(wp) ::  dz_stretch_factor_array(9) = 1.08_wp              !< namelist parameter
+    REAL(wp) ::  mask_scale(3)                                     !< collective array for mask_scale_x/y/z
+    REAL(wp) ::  pt_vertical_gradient(10) = 0.0_wp                 !< namelist parameter
+    REAL(wp) ::  pt_vertical_gradient_level(10) = -999999.9_wp   !< namelist parameter
+    REAL(wp) ::  q_vertical_gradient(10) = 0.0_wp                  !< namelist parameter
+    REAL(wp) ::  q_vertical_gradient_level(10) = -999999.9_wp    !< namelist parameter
+    REAL(wp) ::  s_vertical_gradient(10) = 0.0_wp                  !< namelist parameter
+    REAL(wp) ::  s_vertical_gradient_level(10) = -999999.9_wp    !< namelist parameter
+    REAL(wp) ::  skip_time_domask(max_masks) = 9999999.9_wp        !< namelist parameter
+    REAL(wp) ::  threshold(20) = 0.0_wp                            !< namelist parameter
+    REAL(wp) ::  time_domask(max_masks) = 0.0_wp                   !< namelist parameter
+    REAL(wp) ::  tsc(10) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, &    !< array used for controlling time-integration at different substeps
+                 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp /)
+    REAL(wp) ::  u_profile(200) = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  uv_heights(200) = 9999999.9_wp                    !< namelist parameter
+    REAL(wp) ::  v_profile(200) = 9999999.9_wp                     !< namelist parameter
+    REAL(wp) ::  ug_vertical_gradient(10) = 0.0_wp                 !< namelist parameter
+    REAL(wp) ::  ug_vertical_gradient_level(10) = -9999999.9_wp    !< namelist parameter
+    REAL(wp) ::  vg_vertical_gradient(10) = 0.0_wp                 !< namelist parameter
+    REAL(wp) ::  vg_vertical_gradient_level(10) = -9999999.9_wp    !< namelist parameter
+    REAL(wp) ::  volume_flow(1:3) = 0.0_wp                         !< volume flow through 1:yz-plane, 2: xz-plane, 3: xy-plane (nest childs only)
+    REAL(wp) ::  volume_flow_area(1:3) = 0.0_wp                    !< area of the respective volume flow planes
+    REAL(wp) ::  volume_flow_initial(1:3) = 0.0_wp                 !< initial volume flow (t=0) through the respective volume flow planes
+    REAL(wp) ::  wall_heatflux(0:5) = 0.0_wp                       !< namelist parameter
+    REAL(wp) ::  wall_humidityflux(0:5) = 0.0_wp                   !< namelist parameter
+    REAL(wp) ::  wall_salinityflux(0:5) = 0.0_wp                   !< namelist parameter
+    REAL(wp) ::  wall_scalarflux(0:5) = 0.0_wp                     !< namelist parameter 
+    REAL(wp) ::  subs_vertical_gradient(10) = 0.0_wp               !< namelist parameter 
+    REAL(wp) ::  subs_vertical_gradient_level(10) = -9999999.9_wp  !< namelist parameter
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dp_smooth_factor  !< smoothing factor for external pressure gradient forcing
+
+    REAL(wp), DIMENSION(max_masks,mask_xyz_dimension) ::  mask_x = -1.0_wp  !< namelist parameter
+    REAL(wp), DIMENSION(max_masks,mask_xyz_dimension) ::  mask_y = -1.0_wp  !< namelist parameter
+    REAL(wp), DIMENSION(max_masks,mask_xyz_dimension) ::  mask_z = -1.0_wp  !< namelist parameter
+    
+    REAL(wp), DIMENSION(max_masks,3) ::  mask_x_loop = -1.0_wp  !< namelist parameter
+    REAL(wp), DIMENSION(max_masks,3) ::  mask_y_loop = -1.0_wp  !< namelist parameter
+    REAL(wp), DIMENSION(max_masks,3) ::  mask_z_loop = -1.0_wp  !< namelist parameter
+    
+!
+!--    internal mask arrays ("mask,dimension,selection")
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  mask       !< collective array for mask_x/y/z
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  mask_loop  !< collective array for mask_x/y/z_loop
+
+    SAVE
+
+ END MODULE control_parameters
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of variables used with dvrp-software.
+!------------------------------------------------------------------------------!
+ MODULE dvrp_variables
+
+    USE kinds
+
+    CHARACTER (LEN=10) ::  dvrp_output = 'rtsp'        !< dvr namelist parameter
+    CHARACTER (LEN=10) ::  particle_color = 'none'     !< dvr namelist parameter
+    CHARACTER (LEN=10) ::  particle_dvrpsize = 'none'  !< dvr namelist parameter
+
+    CHARACTER (LEN=20), DIMENSION(10) ::  mode_dvrp = &  !< dvr namelist parameter
+                                     (/ ( '                    ', i9 = 1,10 ) /)
+
+    CHARACTER (LEN=80) ::  dvrp_directory = 'default'                     !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_file      = 'default'                     !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_host      = 'origin.rvs.uni-hannover.de'  !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_password  = '********'                    !< dvr namelist parameter
+    CHARACTER (LEN=80) ::  dvrp_username  = ' '                           !< dvr namelist parameter
+
+    INTEGER(iwp) ::  cluster_size = 1                   !< dvr namelist parameter
+    INTEGER(iwp) ::  dvrp_colortable_entries = 4        !< internal dvr software variable
+    INTEGER(iwp) ::  dvrp_colortable_entries_prt = 22   !< internal dvr software variable
+    INTEGER(iwp) ::  islice_dvrp                        !< internal dvr software variable
+    INTEGER(iwp) ::  nx_dvrp                            !< internal dvr software variable
+    INTEGER(iwp) ::  nxl_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  nxr_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  ny_dvrp                            !< internal dvr software variable
+    INTEGER(iwp) ::  nyn_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  nys_dvrp                           !< internal dvr software variable
+    INTEGER(iwp) ::  nz_dvrp                            !< internal dvr software variable
+    INTEGER(iwp) ::  pathlines_fadeintime = 5           !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_fadeouttime = 5          !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_linecount = 1000         !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_maxhistory = 40          !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_wavecount = 10           !< dvr namelist parameter
+    INTEGER(iwp) ::  pathlines_wavetime = 50            !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_gradient_normals = 0            !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_mode = 0                        !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_size_x = 2                      !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_size_y = 2                      !< dvr namelist parameter
+    INTEGER(iwp) ::  vc_size_z = 2                      !< dvr namelist parameter
+
+    INTEGER(iwp), DIMENSION(10) ::  slicer_position_dvrp  !< internal dvr software variable
+
+    LOGICAL ::  cyclic_dvrp = .FALSE.                      !< internal dvr software variable
+    LOGICAL ::  dvrp_overlap                               !< internal dvr software variable
+    LOGICAL ::  dvrp_total_overlap                         !< internal dvr software variable
+    LOGICAL ::  local_dvrserver_running                    !< namelist parameter (ENVPAR namelist provided by palmrun)
+    LOGICAL ::  lock_steering_update = .FALSE.             !< internal dvr software variable
+    LOGICAL ::  use_seperate_pe_for_dvrp_output = .FALSE.  !< internal dvr software variable
+
+    REAL(wp) ::  clip_dvrp_l = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  clip_dvrp_n = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  clip_dvrp_r = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  clip_dvrp_s = 9999999.9_wp  !< dvr namelist parameter
+    REAL(wp) ::  superelevation = 1.0_wp     !< dvr namelist parameter
+    REAL(wp) ::  superelevation_x = 1.0_wp   !< dvr namelist parameter
+    REAL(wp) ::  superelevation_y = 1.0_wp   !< dvr namelist parameter
+    REAL(wp) ::  vc_alpha = 38.0_wp          !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(2) ::  color_interval = (/ 0.0_wp, 1.0_wp /)     !< dvr namelist parameter
+    REAL(wp), DIMENSION(2) ::  dvrpsize_interval = (/ 0.0_wp, 1.0_wp /)  !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(3) ::  groundplate_color = (/ 0.0_wp, 0.6_wp, 0.0_wp /)  !< dvr namelist parameter
+    REAL(wp), DIMENSION(3) ::  topography_color = (/ 0.8_wp, 0.7_wp, 0.6_wp /)   !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(2,10) ::  slicer_range_limits_dvrp  !< dvr namelist parameter
+
+    REAL(wp), DIMENSION(3,10) ::  isosurface_color  !< dvr namelist parameter
+
+    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp          !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp_prt      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp               !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp_prt           !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp = 0.5_sp      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp_prt = 0.5_sp  !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp = 1.0_sp      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp_prt = 1.0_sp  !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp = 0.0_sp      !< internal dvr software variable
+    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp_prt = 0.0_sp  !< internal dvr software variable
+
+    DATA  slicer_range_limits_dvrp / -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &  !< internal dvr software variable
+                                     -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &
+                                     -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &
+                                     -1.0_wp, 1.0_wp /
+
+    DATA  isosurface_color / 0.9_wp, 0.9_wp, 0.9_wp,  0.8_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.8_wp, &  !< internal dvr software variable
+                             0.1_wp, 0.8_wp, 0.1_wp,  0.6_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.6_wp, &
+                             0.1_wp, 0.6_wp, 0.1_wp,  0.4_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.4_wp, &
+                             0.1_wp, 0.4_wp, 0.1_wp /
+
+    DATA  interval_h_dvrp / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< internal dvr software variable
+                            25.0_wp, -25.0_wp, 192 * 0.0_wp /
+
+    DATA  interval_h_dvrp_prt / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< internal dvr software variable
+                                25.0_wp, -25.0_wp, 192 * 0.0_wp /
+
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp  !< internal dvr software variable
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  ycoor_dvrp  !< internal dvr software variable
+    REAL(sp), DIMENSION(:), ALLOCATABLE ::  zcoor_dvrp  !< internal dvr software variable
+
+    TYPE steering
+       CHARACTER (LEN=24) ::  name  !< internal dvr software variable
+       REAL(sp)           ::  min   !< internal dvr software variable
+       REAL(sp)           ::  max   !< internal dvr software variable
+       INTEGER(iwp)       ::  imin  !< internal dvr software variable
+       INTEGER(iwp)       ::  imax  !< internal dvr software variable
+    END TYPE steering
+
+    TYPE(steering), DIMENSION(:), ALLOCATABLE ::  steering_dvrp  !< internal dvr software variable
+
+    SAVE
+
+ END MODULE dvrp_variables
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of grid spacings.
+!------------------------------------------------------------------------------!
+ MODULE grid_variables
+
+    USE kinds
+
+    REAL(wp) ::  ddx          !< 1/dx
+    REAL(wp) ::  ddx2         !< 1/dx2
+    REAL(wp) ::  dx = 1.0_wp  !< horizontal grid size (along x-direction) 
+    REAL(wp) ::  dx2          !< dx*dx
+    REAL(wp) ::  ddy          !< 1/dy
+    REAL(wp) ::  ddy2         !< 1/dy2
+    REAL(wp) ::  dy = 1.0_wp  !< horizontal grid size (along y-direction)
+    REAL(wp) ::  dy2          !< dy*dy
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddx2_mg  !< 1/dx_l**2 (dx_l: grid spacing along x on different multigrid level)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddy2_mg  !< 1/dy_l**2 (dy_l: grid spacing along y on different multigrid level)
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  zu_s_inner  !< height of topography top on scalar grid 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  zw_w_inner  !< height of topography top on w grid 
+                                              
+    SAVE
+
+ END MODULE grid_variables
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of array bounds, number of gridpoints, and wall flag arrays.
+!------------------------------------------------------------------------------!
+ MODULE indices
+
+    USE kinds
+
+    INTEGER(iwp) ::  nbgp = 3       !< number of boundary ghost points
+    INTEGER(iwp) ::  ngp_sums       !< number of vertical profile grid points time number of output profiles - used for allreduce statements in MPI calls
+    INTEGER(iwp) ::  ngp_sums_ls    !< number of vertical profile grid points time number of large-scale forcing profiles - used for allreduce statements in MPI calls
+    INTEGER(iwp) ::  nnx            !< number of subdomain grid points in x-direction
+    INTEGER(iwp) ::  nx = 0         !< nx+1 = total number of grid points in x-direction
+    INTEGER(iwp) ::  nx_a           !< in coupled atmosphere-ocean runs: total number of grid points along x (atmosphere)
+    INTEGER(iwp) ::  nx_o           !< in coupled atmosphere-ocean runs: total number of grid points along x (ocean)
+    INTEGER(iwp) ::  nxl            !< left-most grid index of subdomain (excluding ghost points)
+    INTEGER(iwp) ::  nxlg           !< left-most grid index of subdomain (including ghost points)
+    INTEGER(iwp) ::  nxlu           !< =nxl+1 (at left domain boundary with inflow from left), else =nxl (used for u-velocity component)
+    INTEGER(iwp) ::  nxr            !< right-most grid index of subdomain (excluding ghost points)
+    INTEGER(iwp) ::  nxrg           !< right-most grid index of subdomain (including ghost points)
+    INTEGER(iwp) ::  nx_on_file     !< nx of previous run in job chain
+    INTEGER(iwp) ::  nny            !< number of subdomain grid points in y-direction
+    INTEGER(iwp) ::  ny = 0         !< ny+1 = total number of grid points in y-direction
+    INTEGER(iwp) ::  ny_a           !< in coupled atmosphere-ocean runs: total number of grid points along y (atmosphere)
+    INTEGER(iwp) ::  ny_o           !< in coupled atmosphere-ocean runs: total number of grid points along y (ocean)
+    INTEGER(iwp) ::  nyn            !< north-most grid index of subdomain (excluding ghost points)
+    INTEGER(iwp) ::  nyng           !< north-most grid index of subdomain (including ghost points)
+    INTEGER(iwp) ::  nys            !< south-most grid index of subdomain (excluding ghost points)
+    INTEGER(iwp) ::  nysg           !< south-most grid index of subdomain (including ghost points)
+    INTEGER(iwp) ::  nysv           !< =nys+1 (at south domain boundary with inflow from south), else =nys (used for v-velocity component)
+    INTEGER(iwp) ::  ny_on_file     !< ny of previous run in job chain
+    INTEGER(iwp) ::  nnz            !< number of subdomain grid points in z-direction
+    INTEGER(iwp) ::  nz = 0         !< total number of grid points in z-direction
+    INTEGER(iwp) ::  nzb            !< bottom grid index of computational domain
+    INTEGER(iwp) ::  nzb_diff       !< will be removed
+    INTEGER(iwp) ::  nzb_max        !< vertical index of topography top
+    INTEGER(iwp) ::  nzt            !< nzt+1 = top grid index of computational domain
+    INTEGER(iwp) ::  topo_min_level !< minimum topography-top index (usually equal to nzb)
+
+    INTEGER(idp), DIMENSION(:), ALLOCATABLE ::  ngp_3d        !< number of grid points of the total domain
+    INTEGER(idp), DIMENSION(:), ALLOCATABLE ::  ngp_3d_inner  !< ! need to have 64 bit for grids > 2E9
+                    
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ngp_2dh  !< number of grid points of a horizontal cross section through the total domain
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nxl_mg   !< left-most grid index of subdomain on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nxr_mg   !< right-most grid index of subdomain on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nyn_mg   !< north-most grid index of subdomain on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nys_mg   !< south-most grid index of subdomain on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nzt_mg   !< top-most grid index of subdomain on different multigrid level
+
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer     !< number of horizontal grid points which are non-topography and non-surface-bounded
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_s_inner   !< number of horizontal grid points which are non-topography
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mg_loc_ind        !< internal array to store index bounds of all PEs of that multigrid level where data is collected to PE0
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_diff_s_inner  !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_diff_s_outer  !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_inner         !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_outer         !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_s_inner       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_s_outer       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_u_inner       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_u_outer       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_v_inner       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_v_outer       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_w_inner       !< will be removed
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_w_outer       !< will be removed
+
+    INTEGER(iwp), DIMENSION(:,:,:), POINTER ::  flags  !< pointer to wall_flags_1-10
+
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_1   !< topograpyh masking flag on multigrid level 1 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_2   !< topograpyh masking flag on multigrid level 2 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_3   !< topograpyh masking flag on multigrid level 3 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_4   !< topograpyh masking flag on multigrid level 4 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_5   !< topograpyh masking flag on multigrid level 5 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_6   !< topograpyh masking flag on multigrid level 6 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_7   !< topograpyh masking flag on multigrid level 7 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_8   !< topograpyh masking flag on multigrid level 8 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_9   !< topograpyh masking flag on multigrid level 9 
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE,  TARGET ::  wall_flags_10  !< topograpyh masking flag on multigrid level 10 
+
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  advc_flags_1            !< flags used to degrade order of advection scheme
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  advc_flags_2            !< flags used to degrade order of advection scheme
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  wall_flags_0            !< flags to mask topography and surface-bounded grid points
+
+    SAVE
+
+ END MODULE indices
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interfaces for special subroutines which use optional parameters.
+!------------------------------------------------------------------------------!
+ MODULE interfaces
+
+    INTERFACE
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+       SUBROUTINE global_min_max ( i1, i2, j1, j2, k1, k2, array, mode, offset, &
+                                   result, result_ijk, result1, result1_ijk )
+
+          USE kinds
+
+          CHARACTER (LEN=*), INTENT(IN) ::  mode                      !< mode of global min/max function: can be 'min', 'max', 'minmax', 'abs', or 'absoff'
+          INTEGER(iwp), INTENT(IN)      ::  i1                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  i2                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  j1                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  j2                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  k1                        !< internal index of min/max function
+          INTEGER(iwp), INTENT(IN)      ::  k2                        !< internal index of min/max function
+          INTEGER(iwp)                  ::  result_ijk(3)             !< grid index result of min/max function
+          INTEGER(iwp), OPTIONAL        ::  result1_ijk(3)            !< optional grid index result of min/max function
+          REAL(wp)                      ::  offset                    !< min/max function calculates absolute value with respect to an offset
+          REAL(wp)                      ::  result                    !< result of min/max function
+          REAL(wp), OPTIONAL            ::  result1                   !< optional result of min/max function
+          REAL(wp), INTENT(IN)          ::  array(i1:i2,j1:j2,k1:k2)  !< input array of min/max function
+
+       END SUBROUTINE global_min_max
+
+    END INTERFACE
+
+    SAVE
+
+ END MODULE interfaces
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interfaces for subroutines with pointer arguments called in
+!> prognostic_equations.
+!------------------------------------------------------------------------------!
+ MODULE pointer_interfaces
+
+    INTERFACE
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+       SUBROUTINE advec_s_bc( sk, sk_char )
+
+          USE kinds
+
+          CHARACTER (LEN=*), INTENT(IN) ::  sk_char  !< string for treated scalar in Bott-Chlond scheme
+#if defined( __nopointer )
+          REAL(wp), DIMENSION(:,:,:) ::  sk  !< treated scalar array in Bott-Chlond scheme
+#else
+          REAL(wp), DIMENSION(:,:,:), POINTER ::  sk  !< treated scalar array in Bott-Chlond scheme
+#endif
+       END SUBROUTINE advec_s_bc
+
+    END INTERFACE
+
+    SAVE
+
+ END MODULE pointer_interfaces
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of variables which define processor topology and the exchange of
+!> ghost point layers. This module must be placed in all routines containing
+!> MPI-calls.
+!------------------------------------------------------------------------------!
+ MODULE pegrid
+
+    USE kinds
+
+#if defined( __parallel )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#else
+    USE MPI
+#endif
+#endif
+    CHARACTER(LEN=2) ::  send_receive = 'al'     !<
+    CHARACTER(LEN=7) ::  myid_char = ''          !< character string containing processor id number
+    
+    INTEGER(iwp) ::  comm1dx                     !< communicator for domain decomposition along x
+    INTEGER(iwp) ::  comm1dy                     !< communicator for domain decomposition along y
+    INTEGER(iwp) ::  comm2d                      !< standard 2d (xy) communicator used in PALM for the process group the PE belongs to
+    INTEGER(iwp) ::  comm_inter                  !< intercommunicator that connects atmosphere/ocean process groups
+    INTEGER(iwp) ::  comm_palm                   !< internal communicator used during the MPI setup at the beginning of a run
+    INTEGER(iwp) ::  id_inflow = 0               !< myidx of procs at inflow (turbulent inflow method)
+    INTEGER(iwp) ::  id_outflow = 0              !< myidx of procs at outflow (turbulent outflow method)
+    INTEGER(iwp) ::  id_outflow_source = 0       !< myidx of procs including ouflow source plane (turbulent outflow method)
+    INTEGER(iwp) ::  id_recycling = 0            !< myidx of procs containing the recycling plane (turbulence recycling method)
+    INTEGER(iwp) ::  ierr                        !< standard error parameter in MPI calls
+    INTEGER(iwp) ::  myid = 0                    !< id number of processor element
+    INTEGER(iwp) ::  myidx = 0                   !< id number of processor elements with same position along x-direction
+    INTEGER(iwp) ::  myidy = 0                   !< id number of processor elements with same position along y-direction
+    INTEGER(iwp) ::  ndim = 2                    !< dimension of the virtual PE grid
+    INTEGER(iwp) ::  ngp_a                       !< used in atmosphere/ocean coupling: total number of horizontal grid points (atmosphere)
+    INTEGER(iwp) ::  ngp_o                       !< used in atmosphere/ocean coupling: total number of horizontal grid points (ocean)
+    INTEGER(iwp) ::  ngp_xy                      !< used in atmosphere/ocean coupling: number of grid points of the subdomain
+    INTEGER(iwp) ::  ngp_y                       !< number of subdomain grid points along y including ghost points
+    INTEGER(iwp) ::  npex = -1                   !< number of processor elements in x-direction
+    INTEGER(iwp) ::  npey = -1                   !< number of processor elements in y-direction
+    INTEGER(iwp) ::  numprocs = 1                !< total number of appointed processor elements
+    INTEGER(iwp) ::  numprocs_previous_run = -1  !< total number of appointed processor elements in previous run (job chain)
+    INTEGER(iwp) ::  pleft                       !< MPI-address of the processor left of the current one
+    INTEGER(iwp) ::  pnorth                      !< MPI-address of the processor north of the current one
+    INTEGER(iwp) ::  pright                      !< MPI-address of the processor right of the current one
+    INTEGER(iwp) ::  psouth                      !< MPI-address of the processor south of the current one
+    INTEGER(iwp) ::  req_count = 0               !< MPI return variable - checks if Send-Receive operation is already finished
+    INTEGER(iwp) ::  sendrecvcount_xy            !< number of subdomain gridpoints to be exchanged in direct transpositions (y --> x, or x --> y) or second (2d) transposition x --> y
+    INTEGER(iwp) ::  sendrecvcount_yz            !< number of subdomain gridpoints to be exchanged in third (2d) transposition y --> z
+    INTEGER(iwp) ::  sendrecvcount_zx            !< number of subdomain gridpoints to be exchanged in first (2d) transposition z --> x
+    INTEGER(iwp) ::  sendrecvcount_zyd           !< number of subdomain gridpoints to be exchanged in direct transpositions z --> y (used for calculating spectra)
+    INTEGER(iwp) ::  target_id                   !< in atmosphere/ocean coupling: id of the ocean/atmosphere counterpart PE with whom the atmosphere/ocean PE exchanges data
+    INTEGER(iwp) ::  tasks_per_node = -9999      !< MPI tasks per compute node
+    INTEGER(iwp) ::  threads_per_task = 1        !< number of OPENMP threads per MPI task
+    INTEGER(iwp) ::  type_x                      !< derived MPI datatype for 2-D ghost-point exchange - north / south 
+    INTEGER(iwp) ::  type_xy                     !< derived MPI datatype for 2-D ghost-point exchange - north / south 
+    INTEGER(iwp) ::  type_y                      !< derived MPI datatype for 2-D exchange in atmosphere-ocean coupler 
+
+    INTEGER(iwp) ::  pdims(2) = 1  !< number of processors along x-y dimension
+    INTEGER(iwp) ::  req(100)      !< MPI return variable indicating if send-receive operation is finished
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  hor_index_bounds               !< horizontal index bounds 
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  hor_index_bounds_previous_run  !< horizontal index bounds of previous run
+
+    LOGICAL ::  collective_wait = .FALSE.          !< switch to set an explicit MPI barrier in front of all collective MPI calls
+
+#if defined( __parallel )
+    INTEGER(iwp) ::  ibuf(12)                 !< internal buffer for calculating MPI settings
+    INTEGER(iwp) ::  pcoord(2)                !< PE coordinates along x and y
+    INTEGER(iwp) ::  status(MPI_STATUS_SIZE)  !< MPI status variable used in various MPI calls
+    
+    INTEGER(iwp), DIMENSION(MPI_STATUS_SIZE,100) ::  wait_stat  !< MPI status variable used in various MPI calls
+    
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ngp_xz      !< number of ghost points in xz-plane on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ngp_xz_int  !< number of ghost points in xz-plane on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ngp_yz      !< number of ghost points in yz-plane on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ngp_yz_int  !< number of ghost points in yz-plane on different multigrid level
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  type_x_int  !< derived MPI datatype for 2-D integer ghost-point exchange - north / south
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  type_xz     !< derived MPI datatype for 3-D integer ghost-point exchange - north / south
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  type_xz_int !< derived MPI datatype for 3-D integer ghost-point exchange - north / south
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  type_y_int  !< derived MPI datatype for 2-D integer ghost-point exchange - left / right
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  type_yz     !< derived MPI datatype for 3-D integer ghost-point exchange - left / right 
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  type_yz_int !< derived MPI datatype for 3-D integer ghost-point exchange - left / right
+
+    LOGICAL ::  left_border_pe  = .FALSE.  !< = .TRUE. if PE is on left border of computational domain
+    LOGICAL ::  north_border_pe = .FALSE.  !< = .TRUE. if PE is on north border of computational domain
+    LOGICAL ::  reorder = .TRUE.           !< switch to allow MPI the reorder of ranking (e.g. row-major or column-major)
+    LOGICAL ::  right_border_pe = .FALSE.  !< = .TRUE. if PE is on right border of computational domain
+    LOGICAL ::  south_border_pe = .FALSE.  !< = .TRUE. if PE is on south border of computational domain
+
+    LOGICAL, DIMENSION(2) ::  cyclic = (/ .TRUE. , .TRUE. /)  !< boundary conditions of the virtual PE grid
+    LOGICAL, DIMENSION(2) ::  remain_dims                     !< internal array used to determine sub-topologies for transpositions
+#endif
+
+    SAVE
+
+ END MODULE pegrid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of variables which control PROFIL-output.
+!------------------------------------------------------------------------------!
+ MODULE profil_parameter
+
+    USE kinds
+
+    INTEGER(iwp), PARAMETER ::  crmax = 100  !< maximum number of coordinate systems for profile output
+
+    CHARACTER (LEN=27), DIMENSION(20) ::  cross_ts_profiles = &  !< time series to be plotted into one coordinate system, respectively
+                           (/ ' E E*                      ', &
+                              ' dt                        ', &
+                              ' u* w*                     ', &
+                              ' th*                       ', &
+                              ' umax vmax wmax            ', &
+                              ' div_old div_new           ', &
+                              ' zi_wtheta zi_theta        ', &
+                              ' w"theta"0 w"theta" wtheta ', &
+                              ' theta(0) theta(zp)        ', &
+                              ' splux spluy spluz         ', &
+                              ' L                         ', &
+                            ( '                           ', i9 = 1, 9 ) /)
+
+    CHARACTER (LEN=100), DIMENSION(crmax) ::  cross_profiles = &  !< quantities to be plotted into one coordinate system, respectively
+                          (/ ' u v                                          ', &
+                             ' pt                                           ', &
+                             ' w"theta" w*theta* w*theta*BC wtheta wthetaBC ', &
+                             ' w"u" w*u* wu w"v" w*v* wv                    ', &
+                             ' km kh                                        ', &
+                             ' l                                            ', &
+             ( '                                              ', i9 = 1, 94 ) /)
+
+    INTEGER(iwp) ::  profile_columns = 2  !< number of coordinate systems on a profile plot per column
+    INTEGER(iwp) ::  profile_rows = 3     !< number of coordinate systems on a profile plot per row
+
+    INTEGER(iwp) ::  dopr_index(300) = 0                !< index number of respective profile quantity
+    INTEGER(iwp) ::  dopr_initial_index(300) = 0        !< index number of initial profiles to be output
+                
+    SAVE
+
+ END MODULE profil_parameter
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of statistical quantities, e.g. global sums.
+!------------------------------------------------------------------------------!
+ MODULE statistics
+
+    USE kinds
+
+    CHARACTER (LEN=40) ::  region(0:9)  !< label for statistic region
+ 
+    INTEGER(iwp) ::  pr_palm = 200          !< maximum number of output profiles
+    INTEGER(iwp) ::  statistic_regions = 0  !< identifier for statistic regions
+
+    INTEGER(iwp) ::  u_max_ijk(3) = -1  !< index values (i,j,k) of location where u_max occurs
+    INTEGER(iwp) ::  v_max_ijk(3) = -1  !< index values (i,j,k) of location where v_max occurs
+    INTEGER(iwp) ::  w_max_ijk(3) = -1  !< index values (i,j,k) of location where w_max occurs
+    
+    LOGICAL ::  flow_statistics_called = .FALSE.  !< flag that tells other routines if flow statistics was executed
+                                                  !< (after each timestep)
+    
+    REAL(wp) ::  u_max = 0.0_wp  !< maximum of absolute u-veloctiy in entire domain
+    REAL(wp) ::  v_max = 0.0_wp  !< maximum of absolute v-veloctiy in entire domain
+    REAL(wp) ::  w_max = 0.0_wp  !< maximum of absolute w-veloctiy in entire domain
+
+    REAL(wp), DIMENSION(2) ::  z_i  !< inversion height
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  mean_surface_level_height  !< mean surface level height for the different statistic regions
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  sums_divnew_l              !< subdomain sum (_l) of divergence after pressure 
+                                                                       !< solver call (new)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  sums_divold_l              !< subdomain sum (_l) of divergence before pressure
+                                                                       !< solver call (old)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  weight_substep             !< weighting factor for substeps in timestepping
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  weight_pres                !< substep weighting factor for pressure solver
+    
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums             !< global sum array for the various output quantities
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsts_bc_l   !< subdomain sum of sensible heat flux in Bott-Chlond scheme
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ts_value         !< timeseries output array for the various output quantities
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsus_ws_l   !< subdomain sum of vertical momentum flux w'u' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsvs_ws_l   !< subdomain sum of vertical momentum flux w'v' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_us2_ws_l    !< subdomain sum of horizontal momentum flux u'u' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_vs2_ws_l    !< subdomain sum of horizontal momentum flux v'v' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_ws2_ws_l    !< subdomain sum of vertical momentum flux w'w' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsncs_ws_l  !< subdomain sum of vertical clouddrop-number concentration flux w'nc' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsnrs_ws_l  !< subdomain sum of vertical raindrop-number concentration flux w'nr' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wspts_ws_l  !< subdomain sum of vertical sensible heat flux w'pt' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsqs_ws_l   !< subdomain sum of vertical latent heat flux w'q' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsqcs_ws_l  !< subdomain sum of vertical cloudwater flux w'qc' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsqrs_ws_l  !< subdomain sum of vertical rainwater flux w'qr' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wssas_ws_l  !< subdomain sum of vertical salinity flux w'sa' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_wsss_ws_l   !< subdomain sum of vertical passive scalar flux w's' (5th-order advection scheme only)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_ls_l        !< subdomain sum of large scale forcing and nudging tendencies
+                                              
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  hom_sum             !< sum array for horizontal mean
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  rmask               !< REAL flag array (0.0 or 1.0) for statistic regions
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  sums_l              !< subdomain sum (_l) gathered for various quantities
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  sums_l_l            !< subdomain sum (_l) of mixing length from diffusivities
+    
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  hom  !< horizontal mean of various quantities (profiles/timeseries)
+
+    SAVE
+
+ END MODULE statistics
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Definition of indices for transposed arrays.
+!------------------------------------------------------------------------------!
+ MODULE transpose_indices
+
+    USE kinds
+
+    INTEGER(iwp) ::  nxl_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxl_yd  !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxl_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxr_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxr_yd  !< internal index bound for transpositions
+    INTEGER(iwp) ::  nxr_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nyn_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nyn_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nys_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nys_z   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzb_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzb_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzb_yd  !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzt_x   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzt_y   !< internal index bound for transpositions
+    INTEGER(iwp) ::  nzt_yd  !< internal index bound for transpositions
+                
+    SAVE
+
+ END MODULE transpose_indices
Index: /palm/tags/release-6.0/SOURCE/multi_agent_system_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/multi_agent_system_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/multi_agent_system_mod.f90	(revision 3477)
@@ -0,0 +1,4781 @@
+!> @file multi_agent_system_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the 
+! terms of the GNU General Public License as published by the Free Software 
+! Foundation, either version 3 of the License, or (at your option) any later 
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2016 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Adjustment of biometeorology calls,
+! implement some agent biometeorology
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3268 2018-09-21 13:45:37Z sward
+! Cleaned up agent pointer assignment in output routine
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3235 2018-09-07 14:06:15Z sward
+! Bugfix in output, added agent-number dimension and related messages and
+! input parameters, updated cpu logging, added mas_last_actions
+! 
+! 3201 2018-08-20 11:45:01Z sward
+! Bugfix, missing pre-processor directive. Set default 
+! read_agents_from_restartfile = .FALSE. restarts not yet implemented.
+! 
+! 3198 2018-08-15 09:23:10Z sward
+! Now using time_since_reference_point; moved multi_agent_system_start and
+! multi_agent_system_end to control_parameters; renamed NAMELIST agents_par to
+! agent_parameters
+! 
+! 3187 2018-07-31 10:32:34Z sward
+! Reworked agent pathfinding to avoid collisions with walls
+! 
+! 3165 2018-07-24 13:12:42Z sward
+! Added agent ID output
+! 
+! 3160 2018-07-20 11:52:56Z sward
+! Changed C_SIZEOF to STORAGE_SIZE
+! 
+! 3159 2018-07-20 11:20:01Z sward
+! Initial revision
+!
+! 
+!
+! Authors:
+! --------
+! @author sward
+!
+!
+! Description:
+! ------------
+!> Multi Agent System for the simulation of pedestrian movement in urban
+!> environments
+!------------------------------------------------------------------------------!
+ MODULE multi_agent_system_mod
+
+    USE, INTRINSIC ::  ISO_C_BINDING
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE control_parameters,                                                    &
+        ONLY:  biometeorology, dt_3d, dt_write_agent_data, message_string,     &
+               time_since_reference_point
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy, dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb,        &
+               wall_flags_0
+
+    USE random_function_mod,                                                   &
+        ONLY:  random_function
+
+    USE kinds
+
+    USE pegrid
+
+    CHARACTER(LEN=15) ::  bc_mas_lr = 'absorb'  !< left/right boundary condition
+    CHARACTER(LEN=15) ::  bc_mas_ns = 'absorb'  !< north/south boundary condition
+
+    INTEGER(iwp) ::  deleted_agents = 0                !< number of deleted agents per time step
+    INTEGER(iwp) ::  dim_size_agtnum_manual = 9999999  !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  heap_count                        !< number of items in binary heap (for pathfinding)
+    INTEGER(iwp) ::  ibc_mas_lr                        !< agent left/right boundary condition dummy
+    INTEGER(iwp) ::  ibc_mas_ns                        !< agent north/south boundary condition dummy
+!    INTEGER(iwp) ::  ind_pm10 = -9                     !< chemical species index of PM10
+!    INTEGER(iwp) ::  ind_pm25 = -9                     !< chemical species index of PM2.5
+    INTEGER(iwp) ::  iran_agent = -1234567             !< number for random generator
+    INTEGER(iwp) ::  min_nr_agent = 2                  !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  ghla_count_recv                   !< number of agents in left ghost layer
+    INTEGER(iwp) ::  ghna_count_recv                   !< number of agents in north ghost layer
+    INTEGER(iwp) ::  ghra_count_recv                   !< number of agents in right ghost layer
+    INTEGER(iwp) ::  ghsa_count_recv                   !< number of agents in south ghost layer
+    INTEGER(iwp) ::  maximum_number_of_agents = 0      !< maximum number of agents during run
+    INTEGER(iwp) ::  nr_move_north                     !< number of agts to move north during exchange_horiz
+    INTEGER(iwp) ::  nr_move_south                     !< number of agts to move south during exchange_horiz
+    INTEGER(iwp) ::  number_of_agents = 0              !< number of agents for each grid box (3d array is saved on agt_count)
+    INTEGER(iwp) ::  number_of_agent_groups = 1        !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  sort_count_mas = 0                !< counter for sorting agents
+    INTEGER(iwp) ::  agt_path_size = 15                !< size of agent path array
+    INTEGER(iwp) ::  step_dealloc_mas = 100            !< namelist parameter (see documentation)
+    INTEGER(iwp) ::  total_number_of_agents            !< total number of agents in the whole model domain
+
+    INTEGER(iwp), PARAMETER ::  NR_2_direction_move = 10000 !< parameter for agent exchange
+    INTEGER(iwp), PARAMETER ::  PHASE_INIT    = 1           !< phase parameter
+    INTEGER(iwp), PARAMETER ::  PHASE_RELEASE = 2           !< phase parameter
+
+    INTEGER(iwp), PARAMETER ::  max_number_of_agent_groups = 100 !< maximum allowed number of agent groups
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  agt_count         !< 3d array of number of agents of every grid box
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  s_measure_height  !< k-index(s-grid) for measurement
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  top_top_s         !< k-index of first s-gridpoint above topography
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  top_top_w         !< k-index of first v-gridpoint above topography
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  obstacle_flags    !< flags to identify corners and edges of topography that cannot be crossed by agents
+
+    LOGICAL ::  deallocate_memory_mas = .TRUE.          !< namelist parameter (see documentation)
+    LOGICAL ::  dt_3d_reached_mas                       !< flag: agent timestep has reached model timestep
+    LOGICAL ::  dt_3d_reached_l_mas                     !< flag: agent timestep has reached model timestep
+    LOGICAL ::  agents_active = .FALSE.                 !< flag for agent system
+    LOGICAL ::  random_start_position_agents = .TRUE.   !< namelist parameter (see documentation)
+    LOGICAL ::  read_agents_from_restartfile = .FALSE.  !< namelist parameter (see documentation)
+    LOGICAL ::  agent_own_timestep = .FALSE.            !< namelist parameter (see documentation)
+
+    LOGICAL, DIMENSION(max_number_of_agent_groups) ::  a_rand_target = .FALSE. !< namelist parameter (see documentation)
+
+    REAL(wp) ::  agent_maximum_age = 9999999.9_wp          !< namelist parameter (see documentation)
+    REAL(wp) ::  alloc_factor_mas = 20.0_wp                !< namelist parameter (see documentation)
+    REAL(wp) ::  coll_t_0 = 3.                             !< namelist parameter (see documentation)
+    REAL(wp) ::  corner_gate_start = 0.5_wp                !< namelist parameter (see documentation)
+    REAL(wp) ::  corner_gate_width = 1.0_wp                !< namelist parameter (see documentation)
+    REAL(wp) ::  dim_size_factor_agtnum = 1.0_wp           !< namelist parameter (see documentation)
+    REAL(wp) ::  d_sigma_rep_agent                         !< inverse of sigma_rep_agent
+    REAL(wp) ::  d_sigma_rep_wall                          !< inverse of sigma_rep_wall
+    REAL(wp) ::  d_tau_accel_agent                         !< inverse of tau_accel_agent
+    REAL(wp) ::  desired_speed = 1.2_wp                    !< namelist parameter (see documentation)
+    REAL(wp) ::  des_sp_sig = .2_wp                        !< namelist parameter (see documentation)
+    REAL(wp) ::  dist_target_reached = 2.0_wp              !< distance at which target counts as reached
+    REAL(wp) ::  dist_to_int_target = .25_wp               !< namelist parameter (see documentation)
+    REAL(wp) ::  dt_agent = 0.02_wp                        !< namelist parameter (see documentation)
+    REAL(wp) ::  dt_arel = 9999999.9_wp                    !< namelist parameter (see documentation)
+    REAL(wp) ::  end_time_arel = 9999999.9_wp              !< namelist parameter (see documentation)
+    REAL(wp) ::  force_x                                   !< dummy value for force on current agent in x-direction
+    REAL(wp) ::  force_y                                   !< dummy value for force on current agent in y-direction
+    REAL(wp) ::  max_dist_from_path = 0.25_wp              !< distance from current path at which a new path is calculated
+    REAL(wp) ::  radius_agent = .25_wp                     !< namelist parameter (see documentation)
+    REAL(wp) ::  repuls_agent = 1.5_wp                     !< namelist parameter (see documentation)
+    REAL(wp) ::  repuls_wall = 7.0_wp                      !< namelist parameter (see documentation)
+    REAL(wp) ::  scan_radius_agent = 3.0_wp                !< namelist parameter (see documentation)
+    REAL(wp) ::  scan_radius_wall = 2.0_wp                 !< namelist parameter (see documentation)
+    REAL(wp) ::  sigma_rep_agent = 0.3_wp                  !< namelist parameter (see documentation)
+    REAL(wp) ::  sigma_rep_wall = 0.1_wp                   !< namelist parameter (see documentation)
+    REAL(wp) ::  tau_accel_agent = 0.5_wp                  !< namelist parameter (see documentation)
+    REAL(wp) ::  time_arel = 0.0_wp                        !< time for agent release
+    REAL(wp) ::  time_write_agent_data = 0.0_wp            !< write agent data at current time on file
+    REAL(wp) ::  v_max_agent = 1.3_wp                      !< namelist parameter (see documentation)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dummy_path_x  !<  dummy path (x-coordinate)
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dummy_path_y  !<  dummy path (y-coordinate)
+
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  adx = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  ady = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  asl = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  asn = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  asr = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  ass = 9999999.9_wp  !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  at_x = 9999999.9_wp !< namelist parameter (see documentation)
+    REAL(wp), DIMENSION(max_number_of_agent_groups) ::  at_y = 9999999.9_wp !< namelist parameter (see documentation)
+!
+!-- Type for the definition of an agent
+    TYPE agent_type
+        INTEGER(iwp) ::  block_nr             !< number for sorting
+        INTEGER(iwp) ::  group                !< number of agent group
+        INTEGER(idp) ::  id                   !< particle ID (64 bit integer)
+        INTEGER(iwp) ::  path_counter         !< current target along path (path_x/y)
+        LOGICAL      ::  agent_mask           !< if this parameter is set to false the agent will be deleted
+        REAL(wp)     ::  age                  !< age of agent
+        REAL(wp)     ::  age_m                !< age of agent
+        REAL(wp)     ::  dt_sum               !< sum of agents subtimesteps
+        REAL(wp)     ::  clo                  !< clothing index
+        REAL(wp)     ::  energy_storage       !< energy stored by agent
+        REAL(wp)     ::  clothing_temp        !< energy stored by agent
+        REAL(wp)     ::  actlev               !< metabolic + work energy of the person
+        REAL(wp)     ::  age_years            !< physical age of the person
+        REAL(wp)     ::  weight               !< total weight of the person (kg)
+        REAL(wp)     ::  height               !< height of the person (m)
+        REAL(wp)     ::  work                 !< workload of the agent (W)
+        INTEGER(iwp) ::  sex                  !< agents gender: 1 = male, 2 = female
+        REAL(wp)     ::  force_x              !< force term x-direction
+        REAL(wp)     ::  force_y              !< force term y-direction
+        REAL(wp)     ::  origin_x             !< origin x-position of agent
+        REAL(wp)     ::  origin_y             !< origin y-position of agent
+        REAL(wp)     ::  pm10                 !< PM10 concentration at agent position
+        REAL(wp)     ::  pm25                 !< PM25 concentration at agent position
+        REAL(wp)     ::  speed_abs            !< absolute value of agent speed
+        REAL(wp)     ::  speed_e_x            !< normalized speed of agent in x
+        REAL(wp)     ::  speed_e_y            !< normalized speed of agent in y
+        REAL(wp)     ::  speed_des            !< agent's desired speed
+        REAL(wp)     ::  speed_x              !< speed of agent in x
+        REAL(wp)     ::  speed_y              !< speed of agent in y
+        REAL(wp)     ::  ipt                  !< instationary thermal index iPT (Â°C)
+        REAL(wp)     ::  windspeed            !< absolute value of windspeed at agent position
+        REAL(wp)     ::  x                    !< x-position
+        REAL(wp)     ::  y                    !< y-position
+        REAL(wp)     ::  t                    !< temperature
+        REAL(wp)     ::  t_x                  !< x-position
+        REAL(wp)     ::  t_y                  !< y-position
+        REAL(wp), DIMENSION(0:15) ::  path_x  !< agent path to target (x)
+        REAL(wp), DIMENSION(0:15) ::  path_y  !< agent path to target (y)
+    END TYPE agent_type
+
+    TYPE(agent_type), DIMENSION(:), POINTER ::  agents               !< Agent array for this grid cell
+    TYPE(agent_type)                        ::  zero_agent           !< zero agent to avoid weird thing
+    TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  move_also_north  !< for agent exchange between PEs
+    TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  move_also_south  !< for agent exchange between PEs
+    TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  agt_gh_l         !< ghost layer left of pe domain
+    TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  agt_gh_n         !< ghost layer north of pe domain
+    TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  agt_gh_r         !< ghost layer right of pe domain
+    TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  agt_gh_s         !< ghost layer south of pe domain
+!
+!-- Type for 2D grid on which agents are stored
+    TYPE  grid_agent_def
+        INTEGER(iwp), DIMENSION(0:3)            ::  start_index        !< start agent index for current block
+        INTEGER(iwp), DIMENSION(0:3)            ::  end_index          !< end agent index for current block
+        INTEGER(iwp)                            ::  id_counter         !< agent id counter (removeable?)
+        LOGICAL                                 ::  time_loop_done     !< timestep loop for agent advection
+        TYPE(agent_type), POINTER, DIMENSION(:) ::  agents             !< Particle array for this grid cell
+    END TYPE grid_agent_def
+
+    TYPE(grid_agent_def), DIMENSION(:,:), ALLOCATABLE, TARGET ::  grid_agents !< 2D grid on which agents are stored
+!
+!-- Item in a priority queue (binary heap)
+    TYPE heap_item
+       INTEGER(iwp) ::  mesh_id       !< id of the submitted mesh point
+       REAL(wp)     ::  priority      !< priority of the mesh point (= distance so far + heuristic to goal)
+    END TYPE heap_item
+
+    TYPE(heap_item), DIMENSION(:), ALLOCATABLE ::  queue  !< priority queue realized as binary heap
+!
+!-- Type for mesh point in visibility graph
+    TYPE  mesh_point
+        INTEGER(iwp)                            ::  polygon_id          !< Polygon the point belongs to
+        INTEGER(iwp)                            ::  vertex_id           !< Vertex in the polygon
+        INTEGER(iwp)                            ::  noc                 !< number of connections
+        INTEGER(iwp)                            ::  origin_id           !< ID of previous mesh point on path (A*)
+        INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  connected_vertices  !< Index of connected vertices
+        REAL(wp)                                ::  cost_so_far         !< Cost to reach this mesh point (A*)
+        REAL(wp)                                ::  x                   !< x-coordinate
+        REAL(wp)                                ::  y                   !< y-coordinate
+        REAL(wp)                                ::  x_s                 !< corner shifted outward from building by 1m (x)
+        REAL(wp)                                ::  y_s                 !< corner shifted outward from building by 1m (y)
+        REAL(wp), DIMENSION(:), ALLOCATABLE     ::  distance_to_vertex  !< Distance to each vertex
+    END TYPE mesh_point
+
+    TYPE(mesh_point), DIMENSION(:), ALLOCATABLE ::  mesh     !< navigation mesh
+    TYPE(mesh_point), DIMENSION(:), ALLOCATABLE ::  tmp_mesh !< temporary navigation mesh
+!
+!-- Vertex of a polygon
+    TYPE  vertex_type
+        LOGICAL               ::  delete  !< Flag to mark vertex for deletion
+        REAL(wp)              ::  x       !< x-coordinate
+        REAL(wp)              ::  y       !< y-coordinate
+    END TYPE vertex_type
+!
+!-- Polygon containing a number of vertices
+    TYPE  polygon_type
+        INTEGER(iwp)                                 ::  nov       !< Number of vertices in this polygon
+        TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  vertices  !< Array of vertices
+    END TYPE polygon_type
+
+    TYPE(polygon_type), DIMENSION(:), ALLOCATABLE ::  polygons  !< Building data in polygon form
+
+    SAVE
+
+    PRIVATE
+!
+!-- Public functions
+    PUBLIC mas_init, mas_last_actions, mas_parin, multi_agent_system
+
+!
+!-- Public parameters, constants and initial values
+    PUBLIC agents_active
+
+    INTERFACE mas_parin
+       MODULE PROCEDURE mas_parin
+    END INTERFACE mas_parin
+
+    INTERFACE mas_init
+       MODULE PROCEDURE mas_init
+    END INTERFACE mas_init
+
+    INTERFACE mas_last_actions
+       MODULE PROCEDURE mas_last_actions
+    END INTERFACE mas_last_actions
+
+    INTERFACE multi_agent_system
+       MODULE PROCEDURE multi_agent_system
+    END INTERFACE multi_agent_system
+
+    CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Multi Agent System:
+!> executes a number of agents sub-timesteps until the model timestep is reached.
+!> The agent timestep is usually smaller than the model timestep
+!------------------------------------------------------------------------------!
+ SUBROUTINE multi_agent_system
+
+    USE biometeorology_mod,                                                   &
+        ONLY:  biom_calc_ipt, biom_determine_input_at
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp)       ::  i                  !< counter
+    INTEGER(iwp)       ::  ie                 !< counter
+    INTEGER(iwp)       ::  is                 !< counter
+    INTEGER(iwp)       ::  j                  !< counter
+    INTEGER(iwp)       ::  je                 !< counter
+    INTEGER(iwp)       ::  js                 !< counter
+    INTEGER(iwp), SAVE ::  mas_count = 0      !< counts the mas-calls
+    INTEGER(iwp)                :: a     !< agent iterator
+    !-- local meteorological conditions
+    REAL(wp)                    :: tmrt  !< mean radiant temperature        (Â°C)
+    REAL(wp)                    :: ta    !< air temperature                 (Â°C)
+    REAL(wp)                    :: vp    !< vapour pressure                 (hPa)
+    REAL(wp)                    :: v     !< wind speed    (local level)     (m/s)
+    REAL(wp)                    :: pair  !< air pressure                    (hPa)
+
+
+    LOGICAL       ::  first_loop_stride   !< flag for first loop stride of agent sub-timesteps
+    LOGICAL, SAVE ::  first_call = .TRUE. !< first call of mas flag for output
+
+    CALL cpu_log( log_point(9), 'mas', 'start' )
+!
+!-- Initialize variables for the next (sub-) timestep, i.e., for marking
+!-- those agents to be deleted after the timestep
+    deleted_agents = 0
+!
+!-- If necessary, release new set of agents
+    IF ( time_arel >= dt_arel  .AND.  end_time_arel > time_since_reference_point )  THEN
+
+       CALL mas_create_agent(PHASE_RELEASE)
+!
+!--    The MOD function allows for changes in the output interval with
+!--    restart runs.
+       time_arel = MOD( time_arel, MAX( dt_arel, dt_3d ) )
+
+    ENDIF
+
+    first_loop_stride = .TRUE.
+    grid_agents(:,:)%time_loop_done = .TRUE.
+!
+!-- Set timestep variable
+    IF ( .NOT. agent_own_timestep ) dt_agent = dt_3d
+!
+!-- Timestep loop for agent transport.
+!-- This loop has to be repeated until the transport time of every agent
+!-- (within the total domain!) has reached the LES timestep (dt_3d).
+!-- Timestep scheme is Euler-forward
+    DO
+!
+!--    Write agent data at current time on file.
+       time_write_agent_data = time_write_agent_data + dt_agent
+       IF ( time_write_agent_data >= dt_write_agent_data )  THEN
+#if defined( __netcdf )
+          IF ( first_loop_stride ) CALL mas_get_prognostic_quantities
+          CALL mas_data_output_agents ( first_call )
+#else
+          WRITE( message_string, * ) 'NetCDF is needed for agent output. ',    &
+                                     'Set __netcdf in compiler options'
+          CALL message( 'multi_agent_system', 'PA0071', 1, 2, 0, 6, 0 )
+#endif
+          IF(first_call) first_call = .FALSE.
+          time_write_agent_data = time_write_agent_data - dt_write_agent_data
+       ENDIF
+!
+!--    Flag is true by default, will be set to false if an agent has not yet
+!--    reached the model timestep
+       grid_agents(:,:)%time_loop_done = .TRUE.
+
+!
+!--    First part of agent transport:
+!--    Evaluate social forces for all agents at current positions
+       CALL cpu_log( log_point_s(9), 'mas_social_forces', 'start' )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             number_of_agents = agt_count(j,i)
+!
+!--          If grid cell is empty, cycle
+             IF ( number_of_agents <= 0 ) CYCLE
+
+             agents => grid_agents(j,i)%agents(1:number_of_agents)
+!
+!--          Evaluation of social forces
+             CALL mas_timestep_forces_call(i,j)
+
+          ENDDO
+       ENDDO
+       CALL cpu_log( log_point_s(9), 'mas_social_forces', 'stop' )
+!
+!--    Second part of agent transport:
+!--    timestep
+       CALL cpu_log( log_point_s(16), 'mas_timestep', 'start' )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             number_of_agents = agt_count(j,i)
+!
+!--          If grid cell is empty, flag must be true
+             IF ( number_of_agents <= 0 )  THEN
+                grid_agents(j,i)%time_loop_done = .TRUE.
+                CYCLE
+             ENDIF
+
+             agents => grid_agents(j,i)%agents(1:number_of_agents)
+
+             agents(1:number_of_agents)%agent_mask = .TRUE.
+!
+!--          Initialize the variable storing the total time that an agent
+!--          has advanced within the timestep procedure
+             IF ( first_loop_stride )  THEN
+                agents(1:number_of_agents)%dt_sum = 0.0_wp
+             ENDIF
+!
+!--          Initialize the switch used for the loop exit condition checked
+!--          at the end of this loop. If at least one agent has failed to
+!--          reach the LES timestep, this switch will be set false in 
+!--          mas_transport.
+             dt_3d_reached_l_mas = .TRUE.
+!
+!--          Timestep
+             CALL mas_timestep
+!
+!--          Delete agents that have been simulated longer than allowed
+             CALL mas_boundary_conds( 'max_sim_time' )
+!
+!--          Delete agents that have reached target area
+             CALL mas_boundary_conds( 'target_area' )
+!
+!---         If not all agents of the actual grid cell have reached the 
+!--          LES timestep, this cell has to to another loop iteration. Due to
+!--          the fact that agents can move into neighboring grid cell, 
+!--          these neighbor cells also have to perform another loop iteration
+             IF ( .NOT. dt_3d_reached_l_mas )  THEN
+                js = MAX(nys,j-1)
+                je = MIN(nyn,j+1)
+                is = MAX(nxl,i-1)
+                ie = MIN(nxr,i+1)
+                grid_agents(js:je,is:ie)%time_loop_done = .FALSE.
+             ENDIF
+
+          ENDDO
+       ENDDO
+       CALL cpu_log( log_point_s(16), 'mas_timestep', 'stop' )
+
+!
+!--    Find out, if all agents on every PE have completed the LES timestep
+!--    and set the switch corespondingly
+       dt_3d_reached_l_mas = ALL(grid_agents(:,:)%time_loop_done)
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( dt_3d_reached_l_mas, dt_3d_reached_mas, 1, MPI_LOGICAL, &
+                           MPI_LAND, comm2d, ierr )
+#else
+       dt_3d_reached_mas = dt_3d_reached_l_mas
+#endif
+
+!
+!--    Increment time since last release
+       IF ( dt_3d_reached_mas )  time_arel = time_arel + dt_3d
+
+!
+!--    Move Agents local to PE to a different grid cell
+       CALL cpu_log( log_point_s(18), 'mas_move_exch_sort', 'start' )
+       CALL mas_eh_move_agent
+!
+!--    Horizontal boundary conditions including exchange between subdmains
+       CALL mas_eh_exchange_horiz
+!
+!--    Pack agents (eliminate those marked for deletion),
+!--    determine new number of agents
+       CALL mas_ps_sort_in_subboxes
+       CALL cpu_log( log_point_s(18), 'mas_move_exch_sort', 'stop' )
+!
+!--    Initialize variables for the next (sub-) timestep, i.e., for marking
+!--    those agents to be deleted after the timestep
+       deleted_agents = 0
+!
+       IF ( biometeorology )  THEN
+!
+!--       Call of human thermal comfort mod (and UV exposure)
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                number_of_agents = agt_count(j,i)
+!
+!--             If grid cell gets empty, cycle
+                IF ( number_of_agents <= 0 )  CYCLE
+
+                agents => grid_agents(j,i)%agents(1:number_of_agents)
+!
+!--             Evaluation of social forces
+!                CALL biom_dynamic(i,j)
+!
+!--             Determine local meteorological conditions
+                CALL biom_determine_input_at ( .FALSE., i, j, ta, vp, v,      &
+                                               pair, tmrt )
+
+                DO  a = 1, number_of_agents
+!
+!--                Calculate instationary thermal indices based on local tmrt
+
+                   CALL biom_calc_ipt ( ta, vp, v, pair, tmrt,                &
+                                        agents(a)%dt_sum,                     &
+                                        agents(a)%energy_storage,             &
+                                        agents(a)%clothing_temp,              &
+                                        agents(a)%clo,                        &
+                                        agents(a)%actlev,                     &
+                                        agents(a)%age_years,                  &
+                                        agents(a)%weight,                     &
+                                        agents(a)%height,                     &
+                                        agents(a)%work,                       &
+                                        agents(a)%sex,                        &
+                                        agents(a)%ipt )
+                END DO
+
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( dt_3d_reached_mas )  EXIT
+
+       first_loop_stride = .FALSE.
+    ENDDO   ! timestep loop
+
+!
+!-- Deallocate unused memory
+    IF ( deallocate_memory_mas  .AND.  mas_count == step_dealloc_mas )  THEN
+       CALL mas_eh_dealloc_agents_array
+       mas_count = 0
+    ELSEIF ( deallocate_memory_mas )  THEN
+       mas_count = mas_count + 1
+    ENDIF
+
+    CALL cpu_log( log_point(9), 'mas', 'stop' )
+
+ END SUBROUTINE multi_agent_system
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of the direction vector from each agent to its current
+!> intermittent target
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_agent_direction
+
+       IMPLICIT NONE
+
+       LOGICAL ::  path_flag !< true if new path must be calculated
+
+       INTEGER(iwp) ::  n  !< loop variable over all agents in a grid box
+       INTEGER(iwp) ::  pc !< agent path counter
+
+       REAL(wp) ::  abs_dir         !< length of direction vector (for normalization)
+!       REAL(wp) ::  d_curr_target   !< rounding influence expressed as x speed component
+!       REAL(wp) ::  d_prev_target   !< rounding influence expressed as x speed component
+       REAL(wp) ::  dir_x           !< direction of agent (x)
+       REAL(wp) ::  dir_y           !< direction of agent (y)
+!       REAL(wp) ::  dist_round = 3. !< distance at which agents start rounding a corner
+       REAL(wp) ::  dtit            !< distance to intermittent target
+!       REAL(wp) ::  round_fac  = 0.2 !< factor for rounding influence
+!       REAL(wp) ::  speed_round_x   !< rounding influence expressed as x speed component
+!       REAL(wp) ::  speed_round_y   !< rounding influence expressed as x speed component
+
+!
+!--    loop over all agents in the current grid box
+       DO n = 1, number_of_agents
+          path_flag = .FALSE.
+          pc = agents(n)%path_counter
+!
+!--       If no path was calculated for agent yet, do it
+          IF ( pc >= 999 ) THEN
+             CALL mas_nav_find_path(n)
+             pc = agents(n)%path_counter
+!
+!--       Check if new path must be calculated and if so, do it
+          ELSE
+!
+!--          Case one: Agent has come close enough to intermittent target.
+!--                    -> chose new int target and calculate rest of path if no
+!--                       new intermittent targets are left
+             dtit = SQRT((agents(n)%x - agents(n)%path_x(pc))**2               &
+                       + (agents(n)%y - agents(n)%path_y(pc))**2)
+             IF ( dtit < dist_to_int_target ) THEN
+                agents(n)%path_counter = agents(n)%path_counter + 1
+                pc = agents(n)%path_counter
+!
+!--             Path counter out of scope (each agent can store a maximum of 15
+!--             intermittent targets on the way to her final target); new path
+!--             must be calculated
+                IF ( pc >= SIZE(agents(n)%path_x) ) THEN
+                   path_flag = .TRUE.
+                ENDIF
+!
+!--          Case two: Agent too far from path 
+!--                    -> set flag for new path to be calculated
+             ELSEIF ( dist_point_to_edge(agents(n)%path_x(pc-1),               &
+                                         agents(n)%path_y(pc-1),               &
+                                         agents(n)%path_x(pc),                 &
+                                         agents(n)%path_y(pc),                 &
+                                         agents(n)%x, agents(n)%y)             &
+                      > max_dist_from_path )                                   &
+             THEN
+                path_flag = .TRUE.
+             ENDIF
+!
+!--          If either of the above two cases was true, calculate new path and 
+!--          reset 0th path point. This point (the last target the agent had)
+!--          is needed for the agents rounding of corners and the calculation
+!--          of her deviation from her current path
+             IF ( path_flag ) THEN
+                CALL mas_nav_find_path(n)
+                pc = agents(n)%path_counter
+             ENDIF
+          ENDIF
+!
+!--       Normalize direction vector
+          abs_dir             = 1.0d-12
+          dir_x               = agents(n)%path_x(pc) - agents(n)%x
+          dir_y               = agents(n)%path_y(pc) - agents(n)%y
+          abs_dir             = SQRT(dir_x**2 + dir_y**2)+1.0d-12
+!--         needed later for corner rounding
+!           dir_x               = dir_x/abs_dir
+!           dir_y               = dir_y/abs_dir
+!           dir_x               = dir_x + speed_round_x
+!           dir_y               = dir_y + speed_round_y
+!           abs_dir             = SQRT(dir_x**2 + dir_y**2)+1.0d-12
+          agents(n)%speed_e_x = dir_x/abs_dir
+          agents(n)%speed_e_y = dir_y/abs_dir
+       ENDDO
+
+!
+!-- corner rounding; to be added
+!
+!--       Calculate direction change due to rounding of corners
+
+!           speed_round_x = 0.
+!           speed_round_y = 0.
+!           
+!           d_curr_target = SQRT( (agents(n)%path_x(pc) - agents(n)%x)**2 +      &
+!                                 (agents(n)%path_y(pc) - agents(n)%y)**2 )
+!           d_prev_target = SQRT( (agents(n)%path_x(pc-1) - agents(n)%x)**2 +    &
+!                                 (agents(n)%path_y(pc-1) - agents(n)%y)**2 )
+! !
+! !--       Agent is close to next target and that target is not the final one
+!           IF ( d_curr_target < dist_round .AND. dist_round <                   &
+!                           SQRT( (agents(n)%path_x(pc) - agents(n)%t_x)**2 +    &
+!                                 (agents(n)%path_y(pc) - agents(n)%t_y)**2 ) )  &
+!           THEN
+!              speed_round_x = (agents(n)%path_x(pc+1) - agents(n)%path_x(pc)) / &
+!                              ABS( agents(n)%path_x(pc)                         &
+!                                 - agents(n)%path_x(pc+1)) * round_fac *        &
+!                              SIN( pi/dist_round*d_curr_target )
+!              speed_round_y = (agents(n)%path_y(pc+1) - agents(n)%path_y(pc)) / &
+!                              ABS( agents(n)%path_y(pc)                         &
+!                                 - agents(n)%path_y(pc+1)) * round_fac *        &
+!                              SIN( pi/dist_round*d_curr_target )
+!           ENDIF
+! 
+!           IF ( d_prev_target < dist_round ) THEN
+!              IF ( agents(n)%path_x(pc) /= agents(n)%path_x(pc+1) ) THEN
+!                 speed_round_x = speed_round_x +                                   &
+!                                 (agents(n)%path_x(pc) - agents(n)%path_x(pc+1)) / &
+!                                 ABS( agents(n)%path_x(pc)                         &
+!                                    - agents(n)%path_x(pc+1)) * round_fac *        &
+!                                 SIN( pi/dist_round*d_prev_target )
+!              ENDIF
+!              
+!              IF ( agents(n)%path_y(pc) /= agents(n)%path_y(pc+1) ) THEN
+!                 speed_round_y = speed_round_y +                                   &
+!                              (agents(n)%path_y(pc) - agents(n)%path_y(pc+1)) / &
+!                              ABS( agents(n)%path_y(pc)                         &
+!                                 - agents(n)%path_y(pc+1)) * round_fac *        &
+!                              SIN( pi/dist_round*d_prev_target )
+!              ENDIF
+             
+!           ENDIF
+
+
+    END SUBROUTINE mas_agent_direction
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Boundary conditions for maximum time, target reached and out of domain
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_boundary_conds( location )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  location !< Identifier
+
+       INTEGER(iwp) ::  n   !< agent number
+       INTEGER(iwp) ::  grp !< agent group
+
+       REAL(wp) ::  dist_to_target !< distance to target
+
+       IF ( location == 'max_sim_time' )  THEN
+
+!
+!--       Delete agents that have been simulated longer than allowed
+          DO  n = 1, number_of_agents
+
+             IF ( agents(n)%age > agent_maximum_age  .AND.                     &
+                  agents(n)%agent_mask )                                       &
+             THEN
+                agents(n)%agent_mask  = .FALSE.
+                deleted_agents = deleted_agents + 1
+             ENDIF
+
+          ENDDO
+       ENDIF
+
+       IF ( location == 'target_area' )  THEN
+
+!
+!--       Delete agents that entered target region
+          DO  n = 1, number_of_agents
+             grp = agents(n)%group
+             dist_to_target = SQRT((agents(n)%x-at_x(grp))**2                  &
+                                 + (agents(n)%y-at_y(grp))**2)
+             IF ( dist_to_target < dist_target_reached ) THEN
+                agents(n)%agent_mask  = .FALSE.
+                deleted_agents = deleted_agents + 1
+             ENDIF
+
+          ENDDO
+       ENDIF
+
+    END SUBROUTINE mas_boundary_conds
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Release new agents at their respective sources
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_create_agent (phase)
+
+       IMPLICIT  NONE
+
+       INTEGER(iwp) ::  alloc_size  !< relative increase of allocated memory for agents
+       INTEGER(iwp) ::  i           !< loop variable ( agent groups )
+       INTEGER(iwp) ::  ip          !< index variable along x
+       INTEGER(iwp) ::  jp          !< index variable along y
+       INTEGER(iwp) ::  loop_stride !< loop variable for initialization
+       INTEGER(iwp) ::  n           !< loop variable ( number of agents )
+       INTEGER(iwp) ::  new_size    !< new size of allocated memory for agents
+       INTEGER(iwp) ::  rn_side     !< index of agent path
+
+       INTEGER(iwp), INTENT(IN) ::  phase       !< mode of inititialization
+
+       INTEGER(iwp), DIMENSION(nysg:nyng,nxlg:nxrg) ::  local_count !< start address of new agent
+       INTEGER(iwp), DIMENSION(nysg:nyng,nxlg:nxrg) ::  local_start !< start address of new agent
+
+       LOGICAL ::  first_stride !< flag for initialization
+
+       REAL(wp) ::  pos_x       !< increment for agent position in x
+       REAL(wp) ::  pos_y       !< increment for agent position in y
+       REAL(wp) ::  rand_contr  !< dummy argument for random position
+       REAL(wp) ::  rn_side_dum !< index of agent path
+
+       TYPE(agent_type),TARGET ::  tmp_agent !< temporary agent used for initialization
+
+!
+!--    Calculate agent positions and store agent attributes, if
+!--    agent is situated on this PE
+       DO  loop_stride = 1, 2
+          first_stride = (loop_stride == 1)
+          IF ( first_stride )   THEN
+             local_count = 0           ! count number of agents
+          ELSE
+             local_count = agt_count   ! Start address of new agents
+          ENDIF
+
+          DO  i = 1, number_of_agent_groups
+
+             pos_y = ass(i)
+
+             DO WHILE ( pos_y <= asn(i) )
+
+                IF ( pos_y >= nys * dy  .AND.                                  &
+                           pos_y <  ( nyn + 1 ) * dy  )                        &
+                THEN
+
+                   pos_x = asl(i)
+
+            xloop: DO WHILE ( pos_x <= asr(i) )
+
+                      IF ( pos_x >= nxl * dx  .AND.                            &
+                                 pos_x <  ( nxr + 1) * dx )                    &
+                      THEN
+
+                         tmp_agent%agent_mask = .TRUE.
+                         tmp_agent%group         = i
+                         tmp_agent%id            = 0_idp
+                         tmp_agent%block_nr      = -1
+                         tmp_agent%path_counter  = 999 !SIZE(tmp_agent%path_x)
+                         tmp_agent%age           = 0.0_wp
+                         tmp_agent%age_m         = 0.0_wp
+                         tmp_agent%dt_sum        = 0.0_wp
+                         tmp_agent%clo           = -999.0_wp
+                         tmp_agent%energy_storage= 0.0_wp
+                         tmp_agent%ipt           = 99999.0_wp
+                         tmp_agent%clothing_temp = -999._wp      !< energy stored by agent (W)
+                         tmp_agent%actlev        = 134.6862_wp   !< metabolic + work energy of the person
+                         tmp_agent%age_years     = 35._wp        !< physical age of the person
+                         tmp_agent%weight        = 75._wp        !< total weight of the person (kg)
+                         tmp_agent%height        = 1.75_wp       !< height of the person (m)
+                         tmp_agent%work          = 134.6862_wp   !< workload of the agent (W)
+                         tmp_agent%sex           = 1             !< agents gender: 1 = male, 2 = female
+                         tmp_agent%force_x       = 0.0_wp
+                         tmp_agent%force_y       = 0.0_wp
+                         tmp_agent%origin_x      = pos_x
+                         tmp_agent%origin_y      = pos_y
+                         tmp_agent%speed_abs     = 0.0_wp
+                         tmp_agent%speed_e_x     = 0.0_wp
+                         tmp_agent%speed_e_y     = 0.0_wp
+                         tmp_agent%speed_des     = random_normal(desired_speed,&
+                                                                 des_sp_sig)
+                         tmp_agent%speed_x       = 0.0_wp
+                         tmp_agent%speed_y       = 0.0_wp
+                         tmp_agent%x             = pos_x
+                         tmp_agent%y             = pos_y
+                         tmp_agent%path_x        = -1.0_wp
+                         tmp_agent%path_y        = -1.0_wp
+                         tmp_agent%t_x           = - pi
+                         tmp_agent%t_y           = - pi
+!
+!--                      Determine the grid indices of the agent position
+                         ip = tmp_agent%x * ddx
+                         jp = tmp_agent%y * ddy
+!
+!--                      Give each agent its target
+                         IF ( a_rand_target(i) ) THEN
+!
+!--                         Agent shall receive random target just outside 
+!--                         simulated area
+                            rn_side_dum = random_function(iran_agent)
+                            rn_side     = FLOOR(4.*rn_side_dum)
+                            IF ( rn_side < 2 ) THEN
+                               IF ( rn_side == 0 ) THEN
+                                  tmp_agent%t_y = -2*dy
+                               ELSE
+                                  tmp_agent%t_y = (ny+3)*dy
+                               ENDIF
+                               tmp_agent%t_x = random_function(iran_agent) *   &
+                                               (nx+1)*dx
+                            ELSE
+                               IF ( rn_side == 2 ) THEN
+                                  tmp_agent%t_x = -2*dx
+                               ELSE
+                                  tmp_agent%t_x = (nx+3)*dx
+                               ENDIF
+                               tmp_agent%t_y = random_function(iran_agent) *   &
+                                               (ny+1)*dy
+                            ENDIF
+!
+!--                      Agent gets target of her group
+                         ELSE
+                            tmp_agent%t_x = at_x(i)
+                            tmp_agent%t_y = at_y(i)
+                         ENDIF
+
+                         local_count(jp,ip) = local_count(jp,ip) + 1
+
+                         IF ( .NOT. first_stride )  THEN
+                            grid_agents(jp,ip)%agents(local_count(jp,ip))      &
+                                              = tmp_agent
+                         ENDIF
+
+                      ENDIF
+
+                      pos_x = pos_x + adx(i)
+
+                   ENDDO xloop
+
+                ENDIF
+
+                pos_y = pos_y + ady(i)
+
+             ENDDO
+
+          ENDDO
+
+!
+!--       Allocate or reallocate agents array to new size
+          IF ( first_stride )  THEN
+             DO  ip = nxlg, nxrg
+                DO  jp = nysg, nyng
+                   IF ( phase == PHASE_INIT )  THEN
+                      IF ( local_count(jp,ip) > 0 )  THEN
+                         alloc_size = MAX( INT( local_count(jp,ip) *           &
+                            ( 1.0_wp + alloc_factor_mas / 100.0_wp ) ),        &
+                            min_nr_agent )
+                      ELSE
+                         alloc_size = min_nr_agent
+                      ENDIF
+                      ALLOCATE(grid_agents(jp,ip)%agents(1:alloc_size))
+                      DO  n = 1, alloc_size
+                         grid_agents(jp,ip)%agents(n) = zero_agent
+                      ENDDO
+                   ELSEIF ( phase == PHASE_RELEASE )  THEN
+                      IF ( local_count(jp,ip) > 0 )  THEN
+                         new_size   = local_count(jp,ip) + agt_count(jp,ip)
+                         alloc_size = MAX( INT( new_size * ( 1.0_wp +          &
+                            alloc_factor_mas / 100.0_wp ) ), min_nr_agent )
+                         IF( alloc_size > SIZE( grid_agents(jp,ip)%agents) )   &
+                         THEN
+                            CALL mas_eh_realloc_agents_array(ip,jp,alloc_size)
+                         ENDIF
+                      ENDIF
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDIF
+
+       ENDDO
+
+       local_start = agt_count+1
+       agt_count   = local_count
+
+!
+!--    Calculate agent IDs
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             number_of_agents = agt_count(jp,ip)
+             IF ( number_of_agents <= 0 )  CYCLE
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+
+             DO  n = local_start(jp,ip), number_of_agents  !only new agents 
+
+                agents(n)%id = 10000_idp**2 * grid_agents(jp,ip)%id_counter +  &
+                               10000_idp * jp + ip
+!
+!--             Count the number of agents that have been released before
+                grid_agents(jp,ip)%id_counter = grid_agents(jp,ip)%id_counter  &
+                                                + 1
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+
+!
+!--    Add random fluctuation to agent positions.
+       IF ( random_start_position_agents )  THEN
+          DO  ip = nxl, nxr
+             DO  jp = nys, nyn
+                number_of_agents = agt_count(jp,ip)
+                IF ( number_of_agents <= 0 )  CYCLE
+                agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+!
+!--             Move only new agents. Moreover, limit random fluctuation 
+!--             in order to prevent that agents move more than one grid box, 
+!--             which would lead to problems concerning agent exchange 
+!--             between processors in case adx/ady are larger than dx/dy, 
+!--             respectively.  
+                DO  n = local_start(jp,ip), number_of_agents
+                   IF ( asl(agents(n)%group) /= asr(agents(n)%group) )  THEN
+                      rand_contr = ( random_function( iran_agent ) - 0.5_wp ) *&
+                                     adx(agents(n)%group)
+                      agents(n)%x = agents(n)%x +                        &
+                              MERGE( rand_contr, SIGN( dx, rand_contr ),       &
+                                     ABS( rand_contr ) < dx                    &
+                                   ) 
+                   ENDIF
+                   IF ( ass(agents(n)%group) /= asn(agents(n)%group) )  THEN
+                      rand_contr = ( random_function( iran_agent ) - 0.5_wp ) *&
+                                     ady(agents(n)%group)
+                      agents(n)%y = agents(n)%y +                        &
+                              MERGE( rand_contr, SIGN( dy, rand_contr ),       &
+                                     ABS( rand_contr ) < dy )
+                   ENDIF
+                ENDDO
+!
+!--             Delete agents that have been simulated longer than allowed
+                CALL mas_boundary_conds( 'max_sim_time' )
+!
+!--             Delete agents that have reached target area
+                CALL mas_boundary_conds( 'target_area' )
+
+             ENDDO
+          ENDDO
+!
+!--       Exchange agents between grid cells and processors
+          CALL mas_eh_move_agent
+          CALL mas_eh_exchange_horiz
+
+       ENDIF
+!
+!--    In case of random_start_position_agents, delete agents identified by 
+!--    mas_eh_exchange_horiz and mas_boundary_conds. Then sort agents into 
+!--    blocks, which is needed for a fast interpolation of the LES fields 
+!--    on the agent position.
+       CALL mas_ps_sort_in_subboxes
+
+!
+!--    Determine the current number of agents
+       number_of_agents = 0
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             number_of_agents = number_of_agents + agt_count(jp,ip)
+          ENDDO
+       ENDDO
+!
+!--    Calculate the number of agents of the total domain
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( number_of_agents, total_number_of_agents, 1, &
+       MPI_INTEGER, MPI_SUM, comm2d, ierr )
+#else
+       total_number_of_agents = number_of_agents
+#endif
+
+       RETURN
+
+    END SUBROUTINE mas_create_agent
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Creates flags that indicate if a gridbox contains edges or corners. These
+!> flags are used for agents to check if obstacles are close to them.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_create_obstacle_flags
+
+       USE arrays_3d,                                                          &
+           ONLY:  zw
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  il
+       INTEGER(iwp) ::  jl
+
+       ALLOCATE(obstacle_flags(nysg:nyng,nxlg:nxrg))
+
+       obstacle_flags = 0
+
+       DO il = nxlg, nxrg
+          DO jl = nysg, nyng
+!
+!--          Exclude cyclic topography boundary
+             IF ( il < 0 .OR. il > nx .OR. jl < 0 .OR. jl > ny ) CYCLE
+!
+!--          North edge
+             IF ( jl < nyng ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl+1,il) ) > 1 .AND.       &
+                     ( zw( top_top_w(jl,il) ) -                                &
+                       zw( top_top_w(jl+1,il) ) ) > .51_wp )                   &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 0 )
+                ENDIF
+             ENDIF
+!
+!--          North right corner
+             IF ( jl < nyng .AND. il < nxrg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl+1,il) )   > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl+1,il+1) ) > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl,il+1) )   > 1 .AND.     &
+                     ( zw( top_top_w(jl,il) ) -                                &
+                       zw( top_top_w(jl+1,il+1) ) ) > .51_wp )                 &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 1 )
+                ENDIF
+             ENDIF
+!
+!--          Right edge
+             IF ( il < nxrg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl,il+1) ) > 1 .AND.       &
+                     ( zw( top_top_w(jl,il) ) -                                &
+                       zw( top_top_w(jl,il+1) ) ) > .51_wp )                   &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 2 )
+                ENDIF
+             ENDIF
+!
+!--          South right corner
+             IF ( jl > nysg .AND. il < nxrg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl,il+1) )   > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl-1,il+1) ) > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl-1,il) )   > 1 .AND.     &
+                     ( zw(top_top_w(jl,il)) -                                  &
+                       zw( top_top_w(jl-1,il+1) ) ) > .51_wp )                 &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 3 )
+                ENDIF
+             ENDIF
+!
+!--          South edge
+             IF ( jl > nysg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl-1,il) ) > 1 .AND.       &
+                     ( zw( top_top_w(jl,il) ) -                                &
+                       zw( top_top_w(jl-1,il) ) ) > .51_wp )                   &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 4 )
+                ENDIF
+             ENDIF
+!
+!--          South left corner
+             IF ( jl > nysg .AND. il > nxlg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl-1,il) )   > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl-1,il-1) ) > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl,il-1) )   > 1 .AND.     &
+                     ( zw( top_top_w(jl,il) ) -                                &
+                       zw(top_top_w(jl-1,il-1) ) ) > .51_wp )                  &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 5 )
+                ENDIF
+             ENDIF
+!
+!--          Left edge
+             IF ( il > nxlg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl,il-1) ) > 1 .AND.       &
+                     ( zw(top_top_w(jl,il) ) -                                 &
+                       zw(top_top_w(jl,il-1) ) ) > .51_wp )                 &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 6 )
+                ENDIF
+             ENDIF
+!
+!--          North left corner
+             IF ( jl < nyng .AND. il > nxlg ) THEN
+                IF ( ( top_top_s(jl,il) - top_top_s(jl,il-1) )   > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl+1,il-1) ) > 1 .AND.     &
+                     ( top_top_s(jl,il) - top_top_s(jl+1,il) )   > 1 .AND.     &
+                     ( zw( top_top_w(jl,il) ) -                                &
+                       zw( top_top_w(jl+1,il-1) ) ) > .51_wp )                 &
+                THEN
+                   obstacle_flags(jl,il) = IBSET( obstacle_flags(jl,il), 7 )
+                ENDIF
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE mas_create_obstacle_flags
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Write agent data in netCDF format 
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_data_output_agents( ftest )
+
+       USE control_parameters,                                                 &
+           ONLY:  agt_time_count, end_time, message_string,                    &
+                  multi_agent_system_end, multi_agent_system_start
+
+       USE netcdf_interface,                                                   &
+           ONLY:  nc_stat, id_set_agt, id_var_time_agt,        &
+                  id_var_agt, netcdf_handle_error
+
+       USE pegrid
+
+#if defined( __netcdf )
+       USE NETCDF
+#endif
+       USE mas_global_attributes,                                              &
+           ONLY:  dim_size_agtnum
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  agt_size !< Agent size in bytes
+       INTEGER(iwp) ::  dummy    !< dummy
+       INTEGER(iwp) ::  ii       !< counter (x)
+       INTEGER(iwp) ::  ip       !< counter (x)
+       INTEGER(iwp) ::  jp       !< counter (y)
+       INTEGER(iwp) ::  n        !< counter (number of PEs)
+       INTEGER(iwp) ::  noa      !< number of agents
+       INTEGER(iwp) ::  noa_rcv  !< received number of agents
+       INTEGER(iwp) ::  out_noa  !< number of agents for output
+
+       INTEGER(iwp), DIMENSION(0:numprocs-1) ::  noa_arr !< number of agents on each PE
+
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE, TARGET ::  trf_agents !< all agents on current PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE, TARGET ::  out_agents !< all agents in entire domain
+
+       LOGICAL, INTENT (INOUT) :: ftest
+
+       LOGICAL, SAVE :: agt_dimension_exceeded = .FALSE.
+
+       CALL cpu_log( log_point_s(17), 'mas_data_output', 'start' )
+!
+!--    Get total number of agents and put all agents on one PE in one array
+       noa = 0
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             noa  = noa  + agt_count(jp,ip)
+          ENDDO
+       ENDDO
+       IF(noa > 0) THEN
+          ALLOCATE(trf_agents(1:noa))
+          dummy = 1
+          DO  ip = nxl, nxr
+             DO  jp = nys, nyn
+                IF ( agt_count(jp,ip) == 0 ) CYCLE
+                agents => grid_agents(jp,ip)%agents(1:agt_count(jp,ip))
+                trf_agents(dummy:(dummy-1+agt_count(jp,ip))) = agents
+                dummy = dummy + agt_count(jp,ip)
+             ENDDO
+          ENDDO
+       ENDIF
+#if defined( __parallel )
+!
+!--    Gather all agents on PE0 for output
+       IF ( myid == 0 )  THEN
+          noa_arr(0) = noa
+!
+!--       Receive data from all other PEs.
+          DO  n = 1, numprocs-1
+              CALL MPI_RECV( noa_arr(n), 1, MPI_INTEGER,                       &
+                              n, 0, comm2d, status, ierr )
+          ENDDO
+       ELSE
+          CALL MPI_SEND( noa, 1, MPI_INTEGER, 0, 0, comm2d, ierr )
+       ENDIF
+       CALL MPI_BARRIER( comm2d, ierr )
+       agt_size = STORAGE_SIZE(zero_agent)/8
+       IF ( myid == 0 )  THEN
+!
+!--       Receive data from all other PEs.
+          out_noa = SUM(noa_arr)
+          IF ( out_noa > 0 ) THEN
+             ALLOCATE( out_agents(1:out_noa) )
+             IF ( noa > 0 ) THEN
+                out_agents(1:noa) = trf_agents
+             ENDIF
+             noa_rcv = noa
+             DO n = 1, numprocs-1
+                IF ( noa_arr(n) > 0 ) THEN
+                   CALL MPI_RECV( out_agents(noa_rcv+1), noa_arr(n)*agt_size,  &
+                                  MPI_BYTE, n, 0, comm2d, status, ierr )
+                   noa_rcv = noa_rcv + noa_arr(n)
+                ENDIF
+             ENDDO
+          ELSE
+             ALLOCATE( out_agents(1:2) )
+             out_agents = zero_agent
+             out_noa    = 2
+          ENDIF
+       ELSE
+          IF ( noa > 0 ) THEN
+             CALL MPI_SEND( trf_agents(1), noa*agt_size, MPI_BYTE, 0, 0,       &
+                                        comm2d, ierr )
+          ENDIF
+       ENDIF
+!
+!--    A barrier has to be set, because otherwise some PEs may
+!--    proceed too fast so that PE0 may receive wrong data on
+!--    tag 0
+       CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       IF ( myid == 0 ) THEN
+#if defined( __parallel )
+          agents => out_agents
+#else
+          agents => trf_agents
+#endif
+
+#if defined( __netcdf )
+!
+!--       Update maximum number of agents
+          maximum_number_of_agents = MAX(maximum_number_of_agents, out_noa)
+!
+!--       Output in netCDF format
+          IF ( ftest ) THEN
+!
+!--          First, define size of agent number dimension from amount of agents
+!--          released, release interval, time of agent simulation and max
+!--          age of agents
+             dim_size_agtnum = MIN( MIN( multi_agent_system_end, end_time )    &
+                                       - multi_agent_system_start,             &
+                                    agent_maximum_age)
+
+             DO ii = 1, number_of_agent_groups
+                dim_size_agtnum = dim_size_agtnum                              &
+                                + (FLOOR( ( asr(ii)-asl(ii) ) / adx(ii) ) + 1) &
+                                * (FLOOR( ( asn(ii)-ass(ii) ) / ady(ii) ) + 1) &
+                                * (FLOOR( dim_size_agtnum / dt_arel )     + 1) &
+                                * dim_size_factor_agtnum
+                dim_size_agtnum = MIN( dim_size_agtnum, dim_size_agtnum_manual )
+             ENDDO
+             CALL check_open( 118 )
+          ENDIF
+
+!
+!--       Update the NetCDF time axis
+          agt_time_count = agt_time_count + 1
+
+          IF ( .NOT. agt_dimension_exceeded ) THEN
+!
+!--          if number of agents to be output exceeds dimension, set flag and
+!--          print warning
+             IF ( out_noa > dim_size_agtnum ) THEN
+
+                agt_dimension_exceeded = .TRUE.
+                WRITE(message_string,'(A,F11.1,2(A,I8))')                      &
+                                'Number of agents exceeds agent dimension.' // &
+                                '&Starting at time_since_reference_point = ',  &
+                                time_since_reference_point,                    &
+                                ' s, &data may be missing.'//                  &
+                                '&Number of agents:     ', out_noa,            &
+                                '&Agent dimension size: ', dim_size_agtnum
+
+                CALL message( 'mas_data_output_agents',                        &
+                              'PA0420', 0, 1, 0, 6, 0 )
+
+             ENDIF
+          ENDIF
+
+!
+!--       reduce number of output agents to dimension size, if necessary
+          IF ( agt_dimension_exceeded ) THEN
+
+             out_noa = MIN( out_noa, dim_size_agtnum )
+
+          ENDIF
+
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_time_agt,                 &
+                                  (/ time_since_reference_point /),            &
+                                  start = (/ agt_time_count /),                &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 1 )
+
+!
+!--       Output agent attributes
+
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(1), agents%id,        &
+                                  start = (/ 1, agt_time_count /),             &
+                                  count = (/ out_noa /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 2 )
+ 
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(2), agents%x,         &
+                                  start = (/ 1, agt_time_count /),             &
+                                  count = (/ out_noa /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 3 )
+
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(3), agents%y,         &
+                                  start = (/ 1, agt_time_count /),             &
+                                  count = (/ out_noa /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 4 )
+
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(4), agents%windspeed, &
+                                  start = (/ 1, agt_time_count /),             &
+                                  count = (/ out_noa /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 5 )
+
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(5), agents%t,         &
+                                  start = (/ 1, agt_time_count /),             &
+                                  count = (/ out_noa /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 6 )
+
+          nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(6), agents%group,     &
+                                  start = (/ 1, agt_time_count /),             &
+                                  count = (/ out_noa /) )
+          CALL netcdf_handle_error( 'mas_data_output_agents', 7 )
+          CALL cpu_log( log_point_s(17), 'mas_data_output', 'stop' )
+
+
+!           nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(6), agents%pm10,      &
+!                                   start = (/ 1, agt_time_count /),             &
+!                                   count = (/ out_noa /) )
+!           CALL netcdf_handle_error( 'mas_data_output_agents', 8 )
+! 
+!           nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(7), agents%pm25,      &
+!                                   start = (/ 1, agt_time_count /),             &
+!                                   count = (/ out_noa /) )
+!           CALL netcdf_handle_error( 'mas_data_output_agents', 9 )
+! 
+!           nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(8), agents%therm_comf,&
+!                                   start = (/ 1, agt_time_count /),             &
+!                                   count = (/ out_noa /) )
+! 
+!           nc_stat = NF90_PUT_VAR( id_set_agt, id_var_agt(9), agents%uv,        &
+!                                   start = (/ 1, agt_time_count /),             &
+!                                   count = (/ out_noa /) )
+!           CALL netcdf_handle_error( 'mas_data_output_agents', 10 )
+
+#endif
+          agents => NULL()
+#if defined( __parallel )
+          IF ( ALLOCATED( out_agents ) ) DEALLOCATE( out_agents )
+#endif
+       ELSE
+          CALL cpu_log( log_point_s(17), 'mas_data_output', 'stop' )
+       ENDIF
+
+       IF ( ALLOCATED( trf_agents ) ) DEALLOCATE( trf_agents )
+
+    END SUBROUTINE mas_data_output_agents
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> If an agent moves from one processor to another, this subroutine moves 
+!> the corresponding elements from the agent arrays of the old grid cells 
+!> to the agent arrays of the new grid cells.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_add_agents_to_gridcell (agent_array)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  aindex !< dummy argument for new number of agents per grid box
+       INTEGER(iwp) ::  ip     !< grid index (x) of agent
+       INTEGER(iwp) ::  jp     !< grid index (x) of agent
+       INTEGER(iwp) ::  n      !< index variable of agent
+
+       LOGICAL ::  pack_done !< flag to indicate that packing is done
+
+       TYPE(agent_type), DIMENSION(:), INTENT(IN)  ::  agent_array !< new agents in a grid box
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  temp_ns     !< temporary agent array for reallocation
+
+       pack_done     = .FALSE.
+
+       DO n = 1, SIZE(agent_array)
+
+          IF ( .NOT. agent_array(n)%agent_mask )  CYCLE
+
+          ip = agent_array(n)%x * ddx
+          jp = agent_array(n)%y * ddy
+
+          IF ( ip >= nxl  .AND.  ip <= nxr  .AND.                              &
+               jp >= nys  .AND.  jp <= nyn )  &
+          THEN ! agent stays on processor
+             number_of_agents = agt_count(jp,ip)
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+
+             aindex = agt_count(jp,ip)+1
+             IF( aindex > SIZE(grid_agents(jp,ip)%agents) )  THEN
+                IF ( pack_done )  THEN
+                   CALL mas_eh_realloc_agents_array (ip,jp)
+                ELSE
+                   CALL mas_ps_pack
+                   agt_count(jp,ip) = number_of_agents
+                   aindex = agt_count(jp,ip)+1
+                   IF ( aindex > SIZE(grid_agents(jp,ip)%agents) )  THEN
+                      CALL mas_eh_realloc_agents_array (ip,jp)
+                   ENDIF
+                   pack_done = .TRUE.
+                ENDIF
+             ENDIF
+             grid_agents(jp,ip)%agents(aindex) = agent_array(n)
+             agt_count(jp,ip) = aindex
+          ELSE
+             IF ( jp <= nys - 1 )  THEN
+                nr_move_south = nr_move_south+1
+!
+!--             Before agent information is swapped to exchange-array, check 
+!--             if enough memory is allocated. If required, reallocate exchange
+!--             array.
+                IF ( nr_move_south > SIZE(move_also_south) )  THEN
+!
+!--                At first, allocate further temporary array to swap agent 
+!--                information.
+                   ALLOCATE( temp_ns(SIZE(move_also_south)+NR_2_direction_move))
+                   temp_ns(1:nr_move_south-1) = move_also_south                &
+                                                (1:nr_move_south-1)
+                   DEALLOCATE( move_also_south )
+                   ALLOCATE( move_also_south(SIZE(temp_ns)) )
+                   move_also_south(1:nr_move_south-1) = temp_ns                &
+                                                        (1:nr_move_south-1)
+                   DEALLOCATE( temp_ns )
+
+                ENDIF
+
+                move_also_south(nr_move_south) = agent_array(n)
+
+                IF ( jp == -1 )  THEN
+!
+!--                Apply boundary condition along y
+                   IF ( ibc_mas_ns == 0 )  THEN
+                      move_also_south(nr_move_south)%y =                       &
+                                         move_also_south(nr_move_south)%y      &
+                                       + ( ny + 1 ) * dy
+                      move_also_south(nr_move_south)%origin_y =                &
+                                       move_also_south(nr_move_south)%origin_y &
+                                       + ( ny + 1 ) * dy
+                   ELSEIF ( ibc_mas_ns == 1 )  THEN
+!
+!--                   Agent absorption
+                      move_also_south(nr_move_south)%agent_mask = .FALSE.
+                      deleted_agents = deleted_agents + 1
+
+                   ENDIF
+                ENDIF
+             ELSEIF ( jp >= nyn+1 )  THEN
+                nr_move_north = nr_move_north+1
+!
+!--             Before agent information is swapped to exchange-array, check 
+!--             if enough memory is allocated. If required, reallocate exchange
+!--             array.
+                IF ( nr_move_north > SIZE(move_also_north) )  THEN
+!
+!--                At first, allocate further temporary array to swap agent 
+!--                information.
+                   ALLOCATE( temp_ns(SIZE(move_also_north)+NR_2_direction_move))
+                   temp_ns(1:nr_move_north-1) =                                &
+                                move_also_south(1:nr_move_north-1)
+                   DEALLOCATE( move_also_north )
+                   ALLOCATE( move_also_north(SIZE(temp_ns)) )
+                   move_also_north(1:nr_move_north-1) =                        &
+                               temp_ns(1:nr_move_north-1)
+                   DEALLOCATE( temp_ns )
+
+                ENDIF
+
+                move_also_north(nr_move_north) = agent_array(n)
+                IF ( jp == ny+1 )  THEN
+!
+!--                Apply boundary condition along y
+                   IF ( ibc_mas_ns == 0 )  THEN
+
+                      move_also_north(nr_move_north)%y =                       &
+                         move_also_north(nr_move_north)%y                      &
+                       - ( ny + 1 ) * dy
+                      move_also_north(nr_move_north)%origin_y =                &
+                         move_also_north(nr_move_north)%origin_y               &
+                       - ( ny + 1 ) * dy
+                   ELSEIF ( ibc_mas_ns == 1 )  THEN
+!
+!--                   Agent absorption
+                      move_also_north(nr_move_north)%agent_mask = .FALSE.
+                      deleted_agents = deleted_agents + 1
+
+                   ENDIF
+                ENDIF
+             ENDIF
+          ENDIF
+       ENDDO
+
+       RETURN
+
+    END SUBROUTINE mas_eh_add_agents_to_gridcell
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> After ghost layer agents have been received from neighboring PEs, this
+!> subroutine sorts them into the corresponding grid cells
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_add_ghost_agents_to_gridcell (agent_array)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  ip     !< grid index (x) of agent
+       INTEGER(iwp) ::  jp     !< grid index (x) of agent
+       INTEGER(iwp) ::  n      !< index variable of agent
+       INTEGER(iwp) ::  aindex !< dummy argument for new number of agents per grid box
+
+       LOGICAL ::  pack_done !< flag to indicate that packing is done
+
+       TYPE(agent_type), DIMENSION(:), INTENT(IN)  ::  agent_array !< new agents in a grid box
+
+       pack_done     = .FALSE.
+
+       DO n = 1, SIZE(agent_array)
+
+          IF ( .NOT. agent_array(n)%agent_mask )  CYCLE
+
+          ip = agent_array(n)%x * ddx
+          jp = agent_array(n)%y * ddy
+
+          IF ( ip < nxl  .OR.  ip > nxr  .OR.  jp < nys  .OR.  jp > nyn ) THEN
+             number_of_agents = agt_count(jp,ip)
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+
+             aindex = agt_count(jp,ip)+1
+             IF( aindex > SIZE(grid_agents(jp,ip)%agents) )  THEN
+                IF ( pack_done )  THEN
+                   CALL mas_eh_realloc_agents_array (ip,jp)
+                ELSE
+                   CALL mas_ps_pack
+                   agt_count(jp,ip) = number_of_agents
+                   aindex = agt_count(jp,ip)+1
+                   IF ( aindex > SIZE(grid_agents(jp,ip)%agents) )  THEN
+                      CALL mas_eh_realloc_agents_array (ip,jp)
+                   ENDIF
+                   pack_done = .TRUE.
+                ENDIF
+             ENDIF
+             grid_agents(jp,ip)%agents(aindex) = agent_array(n)
+             agt_count(jp,ip) = aindex
+          ENDIF
+       ENDDO
+    END SUBROUTINE mas_eh_add_ghost_agents_to_gridcell
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resizing of agent arrays
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_dealloc_agents_array
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i         !< grid index (x) of agent
+       INTEGER(iwp) ::  j         !< grid index (y) of agent
+       INTEGER(iwp) ::  old_size  !< old array size
+       INTEGER(iwp) ::  new_size  !< new array size
+       INTEGER(iwp) ::  noa       !< number of agents
+
+       LOGICAL ::  dealloc  !< flag that indicates if reallocation is necessary
+
+       TYPE(agent_type), DIMENSION(10) ::  tmp_agents_s !< temporary static agent array
+
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  tmp_agents_d !< temporary dynamic agent array
+
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+!
+!--          Determine number of active agents
+             noa = agt_count(j,i)
+!
+!--          Determine allocated memory size
+             old_size = SIZE( grid_agents(j,i)%agents )
+!
+!--          Check for large unused memory
+             dealloc = ( ( noa < min_nr_agent .AND. old_size  > min_nr_agent ) &
+                    .OR. ( noa > min_nr_agent .AND. old_size - noa *           &
+                         ( 1.0_wp + 0.01_wp * alloc_factor_mas ) > 0.0_wp ) )
+!
+!--          If large unused memory was found, resize the corresponding array
+             IF ( dealloc )  THEN
+                IF ( noa < min_nr_agent )  THEN
+                   new_size = min_nr_agent
+                ELSE 
+                   new_size = INT( noa * ( 1.0_wp +                            &
+                                            0.01_wp * alloc_factor_mas ) )
+                ENDIF
+
+                IF ( noa <= 10 )  THEN
+
+                   tmp_agents_s(1:noa) = grid_agents(j,i)%agents(1:noa)
+
+                   DEALLOCATE(grid_agents(j,i)%agents)
+                   ALLOCATE(grid_agents(j,i)%agents(1:new_size))
+
+                   grid_agents(j,i)%agents(1:noa)          = tmp_agents_s(1:noa)
+                   grid_agents(j,i)%agents(noa+1:new_size) = zero_agent
+
+                ELSE
+
+                   ALLOCATE(tmp_agents_d(noa))
+                   tmp_agents_d(1:noa) = grid_agents(j,i)%agents(1:noa)
+
+                   DEALLOCATE(grid_agents(j,i)%agents)
+                   ALLOCATE(grid_agents(j,i)%agents(new_size))
+
+                   grid_agents(j,i)%agents(1:noa)          = tmp_agents_d(1:noa)
+                   grid_agents(j,i)%agents(noa+1:new_size) = zero_agent
+
+                   DEALLOCATE(tmp_agents_d)
+
+                ENDIF
+
+             ENDIF
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE mas_eh_dealloc_agents_array
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Exchange between subdomains.
+!> As soon as one agent has moved beyond the boundary of the domain, it
+!> is included in the relevant transfer arrays and marked for subsequent
+!> deletion on this PE.
+!> First sweep for crossings in x direction. Find out first the number of
+!> agents to be transferred and allocate temporary arrays needed to store
+!> them.
+!> For a one-dimensional decomposition along y, no transfer is necessary,
+!> because the agent remains on the PE, but the agent coordinate has to
+!> be adjusted.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_exchange_horiz
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                !< grid index (x) of agent positition
+       INTEGER(iwp) ::  ip               !< index variable along x
+       INTEGER(iwp) ::  j                !< grid index (y) of agent positition
+       INTEGER(iwp) ::  jp               !< index variable along y
+       INTEGER(iwp) ::  n                !< agent index variable 
+       INTEGER(iwp) ::  par_size         !< Agent size in bytes
+       INTEGER(iwp) ::  trla_count       !< number of agents send to left PE
+       INTEGER(iwp) ::  trla_count_recv  !< number of agents receive from right PE
+       INTEGER(iwp) ::  trna_count       !< number of agents send to north PE
+       INTEGER(iwp) ::  trna_count_recv  !< number of agents receive from south PE
+       INTEGER(iwp) ::  trra_count       !< number of agents send to right PE
+       INTEGER(iwp) ::  trra_count_recv  !< number of agents receive from left PE
+       INTEGER(iwp) ::  trsa_count       !< number of agents send to south PE
+       INTEGER(iwp) ::  trsa_count_recv  !< number of agents receive from north PE
+
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  rvla  !< agents received from right PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  rvna  !< agents received from south PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  rvra  !< agents received from left PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  rvsa  !< agents received from north PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  trla  !< agents send to left PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  trna  !< agents send to north PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  trra  !< agents send to right PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  trsa  !< agents send to south PE
+
+#if defined( __parallel )
+
+!
+!--    Exchange between subdomains.
+!--    As soon as one agent has moved beyond the boundary of the domain, it
+!--    is included in the relevant transfer arrays and marked for subsequent
+!--    deletion on this PE.
+!--    First sweep for crossings in x direction. Find out first the number of
+!--    agents to be transferred and allocate temporary arrays needed to store
+!--    them.
+!--    For a one-dimensional decomposition along y, no transfer is necessary,
+!--    because the agent remains on the PE, but the agent coordinate has to
+!--    be adjusted.
+       trla_count  = 0
+       trra_count  = 0
+
+       trla_count_recv   = 0
+       trra_count_recv   = 0
+
+       IF ( pdims(1) /= 1 )  THEN
+!
+!--       First calculate the storage necessary for sending and receiving the data.
+!--       Compute only first (nxl) and last (nxr) loop iterration.
+          DO  ip = nxl, nxr, nxr - nxl
+             DO  jp = nys, nyn
+
+                number_of_agents = agt_count(jp,ip)
+                IF ( number_of_agents <= 0 )  CYCLE
+                agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+                DO  n = 1, number_of_agents
+                   IF ( agents(n)%agent_mask )  THEN
+                      i = agents(n)%x * ddx
+!
+!--                   Above calculation does not work for indices less than zero
+                      IF ( agents(n)%x < 0.0_wp )  i = -1
+
+                      IF ( i < nxl )  THEN
+                         trla_count = trla_count + 1
+                      ELSEIF ( i > nxr )  THEN
+                         trra_count = trra_count + 1
+                      ENDIF
+                   ENDIF
+                ENDDO
+
+             ENDDO
+          ENDDO
+
+          IF ( trla_count  == 0 )  trla_count  = 1
+          IF ( trra_count  == 0 )  trra_count  = 1
+
+          ALLOCATE( trla(trla_count), trra(trra_count) )
+
+          trla = zero_agent
+          trra = zero_agent
+
+          trla_count  = 0
+          trra_count  = 0
+
+       ENDIF
+!
+!--    Compute only first (nxl) and last (nxr) loop iterration
+       DO  ip = nxl, nxr, nxr-nxl
+          DO  jp = nys, nyn
+             number_of_agents = agt_count(jp,ip)
+             IF ( number_of_agents <= 0 ) CYCLE
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+             DO  n = 1, number_of_agents
+!
+!--             Only those agents that have not been marked as 'deleted' may
+!--             be moved.
+                IF ( agents(n)%agent_mask )  THEN
+
+                   i = agents(n)%x * ddx
+!
+!--                Above calculation does not work for indices less than zero
+                   IF ( agents(n)%x < 0.0_wp )  i = -1
+
+                   IF ( i <  nxl )  THEN
+                      IF ( i < 0 )  THEN
+!
+!--                      Apply boundary condition along x
+                         IF ( ibc_mas_lr == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(1) == 1 )  THEN
+                               agents(n)%x        = ( nx + 1 ) * dx +          &
+                                                    agents(n)%x
+                               agents(n)%origin_x = ( nx + 1 ) * dx +          &
+                                                    agents(n)%origin_x
+                            ELSE
+                               trla_count         = trla_count + 1
+                               trla(trla_count)   = agents(n)
+                               trla(trla_count)%x = ( nx + 1 ) * dx +          &
+                                                    trla(trla_count)%x
+                               trla(trla_count)%origin_x =                     &
+                                                trla(trla_count)%origin_x +    &
+                                                ( nx + 1 ) * dx
+                               agents(n)%agent_mask  = .FALSE.
+                               deleted_agents = deleted_agents + 1
+
+                               IF ( trla(trla_count)%x >=                      &
+                                        (nx + 1)* dx - 1.0E-12_wp )            &
+                               THEN
+                                  trla(trla_count)%x = trla(trla_count)%x -    &
+                                                   1.0E-10_wp
+                                  trla(trla_count)%origin_x =                  &
+                                                   trla(trla_count)%origin_x - 1
+                               ENDIF
+
+                            ENDIF
+
+                         ELSEIF ( ibc_mas_lr == 1 )  THEN
+!
+!--                         Agent absorption
+                            agents(n)%agent_mask = .FALSE.
+                            deleted_agents = deleted_agents + 1
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store agent data in the transfer array, which will be 
+!--                      send to the neighbouring PE
+                         trla_count = trla_count + 1
+                         trla(trla_count) = agents(n)
+                         agents(n)%agent_mask = .FALSE.
+                         deleted_agents = deleted_agents + 1
+
+                      ENDIF
+
+                   ELSEIF ( i > nxr )  THEN
+                      IF ( i > nx )  THEN
+!
+!--                      Apply boundary condition along x
+                         IF ( ibc_mas_lr == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(1) == 1 )  THEN
+                               agents(n)%x = agents(n)%x - ( nx + 1 ) * dx
+                               agents(n)%origin_x = agents(n)%origin_x - &
+                               ( nx + 1 ) * dx
+                            ELSE
+                               trra_count = trra_count + 1
+                               trra(trra_count) = agents(n)
+                               trra(trra_count)%x = trra(trra_count)%x -       &
+                                                    ( nx + 1 ) * dx
+                               trra(trra_count)%origin_x =                     &
+                                                   trra(trra_count)%origin_x - &
+                                                   ( nx + 1 ) * dx
+                               agents(n)%agent_mask = .FALSE.
+                               deleted_agents = deleted_agents + 1
+
+                            ENDIF
+
+                         ELSEIF ( ibc_mas_lr == 1 )  THEN
+!
+!--                         Agent absorption
+                            agents(n)%agent_mask = .FALSE.
+                            deleted_agents = deleted_agents + 1
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store agent data in the transfer array, which will be send
+!--                      to the neighbouring PE
+                         trra_count = trra_count + 1
+                         trra(trra_count) = agents(n)
+                         agents(n)%agent_mask = .FALSE.
+                         deleted_agents = deleted_agents + 1
+
+                      ENDIF
+
+                   ENDIF
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Allocate arrays required for north-south exchange, as these
+!--    are used directly after agents are exchange along x-direction.
+       ALLOCATE( move_also_north(1:NR_2_direction_move) )
+       ALLOCATE( move_also_south(1:NR_2_direction_move) )
+
+       nr_move_north = 0
+       nr_move_south = 0
+!
+!--    Send left boundary, receive right boundary (but first exchange how many
+!--    and chec if agent storage must be extended)
+       IF ( pdims(1) /= 1 )  THEN
+
+          CALL MPI_SENDRECV( trla_count,      1, MPI_INTEGER, pleft,  0, &
+                             trra_count_recv, 1, MPI_INTEGER, pright, 0, &
+                             comm2d, status, ierr )
+
+          ALLOCATE(rvra(MAX(1,trra_count_recv)))
+!
+!--       This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--       variables in structure agent_type (due to the calculation of par_size)
+          par_size = STORAGE_SIZE(trla(1))/8
+          CALL MPI_SENDRECV( trla, max(1,trla_count)*par_size, MPI_BYTE, pleft,&
+                    1, rvra, max(1,trra_count_recv)*par_size, MPI_BYTE, pright,&
+                             1, comm2d, status, ierr )
+
+          IF ( trra_count_recv > 0 ) THEN
+             CALL mas_eh_add_agents_to_gridcell(rvra(1:trra_count_recv))
+          ENDIF
+
+          DEALLOCATE(rvra)
+
+!
+!--       Send right boundary, receive left boundary
+          CALL MPI_SENDRECV( trra_count,      1, MPI_INTEGER, pright, 0,       &
+                             trla_count_recv, 1, MPI_INTEGER, pleft,  0,       &
+                             comm2d, status, ierr )
+
+          ALLOCATE(rvla(MAX(1,trla_count_recv)))
+!
+!--       This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--       variables in structure agent_type (due to the calculation of par_size)
+          par_size = STORAGE_SIZE(trra(1))/8
+          CALL MPI_SENDRECV( trra, max(1,trra_count)*par_size, MPI_BYTE,       &
+                             pright, 1, rvla,                                  &
+                             max(1,trla_count_recv)*par_size, MPI_BYTE,        &
+                             pleft, 1, comm2d, status, ierr )
+
+          IF ( trla_count_recv > 0 ) THEN
+             CALL mas_eh_add_agents_to_gridcell(rvla(1:trla_count_recv))
+          ENDIF
+
+          DEALLOCATE( rvla )
+          DEALLOCATE( trla, trra )
+
+       ENDIF
+
+!
+!--    Check whether agents have crossed the boundaries in y direction. Note 
+!--    that this case can also apply to agents that have just been received
+!--    from the adjacent right or left PE.
+!--    Find out first the number of agents to be transferred and allocate
+!--    temporary arrays needed to store them.
+!--    For a one-dimensional decomposition along y, no transfer is necessary,
+!--    because the agent remains on the PE.
+       trsa_count  = nr_move_south
+       trna_count  = nr_move_north
+
+       trsa_count_recv   = 0
+       trna_count_recv   = 0
+
+       IF ( pdims(2) /= 1 )  THEN
+!
+!--       First calculate the storage necessary for sending and receiving the
+!--       data
+          DO  ip = nxl, nxr
+             DO  jp = nys, nyn, nyn-nys    !compute only first (nys) and last (nyn) loop iterration
+                number_of_agents = agt_count(jp,ip)
+                IF ( number_of_agents <= 0 )  CYCLE
+                agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+                DO  n = 1, number_of_agents
+                   IF ( agents(n)%agent_mask )  THEN
+                      j = agents(n)%y * ddy
+!
+!--                   Above calculation does not work for indices less than zero
+                      IF ( agents(n)%y < 0.0_wp )  j = -1
+
+                      IF ( j < nys )  THEN
+                         trsa_count = trsa_count + 1
+                      ELSEIF ( j > nyn )  THEN
+                         trna_count = trna_count + 1
+                      ENDIF
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+          IF ( trsa_count  == 0 )  trsa_count  = 1
+          IF ( trna_count  == 0 )  trna_count  = 1
+
+          ALLOCATE( trsa(trsa_count), trna(trna_count) )
+
+          trsa = zero_agent
+          trna = zero_agent
+
+          trsa_count  = nr_move_south
+          trna_count  = nr_move_north
+
+          trsa(1:nr_move_south) = move_also_south(1:nr_move_south)
+          trna(1:nr_move_north) = move_also_north(1:nr_move_north)
+
+       ENDIF
+
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn, nyn-nys ! compute only first (nys) and last (nyn) loop iterration
+             number_of_agents = agt_count(jp,ip)
+             IF ( number_of_agents <= 0 )  CYCLE
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+             DO  n = 1, number_of_agents
+!
+!--             Only those agents that have not been marked as 'deleted' may
+!--             be moved.
+                IF ( agents(n)%agent_mask )  THEN
+
+                   j = agents(n)%y * ddy
+!
+!--                Above calculation does not work for indices less than zero
+                   IF ( agents(n)%y < 0.0_wp * dy )  j = -1
+
+                   IF ( j < nys )  THEN
+                      IF ( j < 0 )  THEN
+!
+!--                      Apply boundary condition along y
+                         IF ( ibc_mas_ns == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(2) == 1 )  THEN
+                               agents(n)%y = ( ny + 1 ) * dy + agents(n)%y
+                               agents(n)%origin_y = ( ny + 1 ) * dy +          &
+                                                     agents(n)%origin_y
+                            ELSE
+                               trsa_count         = trsa_count + 1
+                               trsa(trsa_count)   = agents(n)
+                               trsa(trsa_count)%y = ( ny + 1 ) * dy +          &
+                                                 trsa(trsa_count)%y
+                               trsa(trsa_count)%origin_y =                     &
+                                                  trsa(trsa_count)%origin_y    &
+                                                + ( ny + 1 ) * dy
+                               agents(n)%agent_mask = .FALSE.
+                               deleted_agents = deleted_agents + 1
+
+                               IF ( trsa(trsa_count)%y >=                      &
+                                                    (ny+1)* dy - 1.0E-12_wp )  &
+                               THEN
+                                  trsa(trsa_count)%y = trsa(trsa_count)%y -    &
+                                                       1.0E-10_wp
+                                  trsa(trsa_count)%origin_y =                  &
+                                                  trsa(trsa_count)%origin_y - 1
+                               ENDIF
+
+                            ENDIF
+
+                         ELSEIF ( ibc_mas_ns == 1 )  THEN
+!
+!--                         Agent absorption
+                            agents(n)%agent_mask = .FALSE.
+                            deleted_agents          = deleted_agents + 1
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store agent data in the transfer array, which will 
+!--                      be send to the neighbouring PE
+                         trsa_count = trsa_count + 1
+                         trsa(trsa_count) = agents(n)
+                         agents(n)%agent_mask = .FALSE.
+                         deleted_agents = deleted_agents + 1
+
+                      ENDIF
+
+                   ELSEIF ( j > nyn )  THEN
+                      IF ( j > ny )  THEN
+!
+!--                      Apply boundary condition along y
+                         IF ( ibc_mas_ns == 0 )  THEN
+!
+!--                         Cyclic condition
+                            IF ( pdims(2) == 1 )  THEN
+                               agents(n)%y        = agents(n)%y -              &
+                                                    ( ny + 1 ) * dy
+                               agents(n)%origin_y = agents(n)%origin_y -       &
+                                                    ( ny + 1 ) * dy
+                            ELSE
+                               trna_count         = trna_count + 1
+                               trna(trna_count)   = agents(n)
+                               trna(trna_count)%y =                            &
+                                          trna(trna_count)%y - ( ny + 1 ) * dy
+                               trna(trna_count)%origin_y =                     &
+                                         trna(trna_count)%origin_y -           &
+                                         ( ny + 1 ) * dy
+                               agents(n)%agent_mask = .FALSE.
+                               deleted_agents          = deleted_agents + 1
+                            ENDIF
+
+                         ELSEIF ( ibc_mas_ns == 1 )  THEN
+!
+!--                         Agent absorption
+                            agents(n)%agent_mask = .FALSE.
+                            deleted_agents = deleted_agents + 1
+
+                         ENDIF
+                      ELSE
+!
+!--                      Store agent data in the transfer array, which will 
+!--                      be send to the neighbouring PE
+                         trna_count = trna_count + 1
+                         trna(trna_count) = agents(n)
+                         agents(n)%agent_mask = .FALSE.
+                         deleted_agents = deleted_agents + 1
+
+                      ENDIF
+
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Send front boundary, receive back boundary (but first exchange how many
+!--    and chec if agent storage must be extended)
+       IF ( pdims(2) /= 1 )  THEN
+
+          CALL MPI_SENDRECV( trsa_count,      1, MPI_INTEGER, psouth, 0,       &
+                             trna_count_recv, 1, MPI_INTEGER, pnorth, 0,       &
+                             comm2d, status, ierr )
+
+          ALLOCATE(rvna(MAX(1,trna_count_recv)))
+!
+!--       This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--       variables in structure agent_type (due to the calculation of par_size)
+          par_size = STORAGE_SIZE(trsa(1))/8
+          CALL MPI_SENDRECV( trsa, trsa_count*par_size, MPI_BYTE,              &
+                             psouth, 1, rvna,                                  &
+                             trna_count_recv*par_size, MPI_BYTE, pnorth, 1,    &
+                             comm2d, status, ierr )
+
+          IF ( trna_count_recv  > 0 ) THEN
+             CALL mas_eh_add_agents_to_gridcell(rvna(1:trna_count_recv))
+          ENDIF
+
+          DEALLOCATE(rvna)
+
+!
+!--       Send back boundary, receive front boundary
+          CALL MPI_SENDRECV( trna_count,      1, MPI_INTEGER, pnorth, 0,       &
+                             trsa_count_recv, 1, MPI_INTEGER, psouth, 0,       &
+                             comm2d, status, ierr )
+
+          ALLOCATE(rvsa(MAX(1,trsa_count_recv)))
+!
+!--       This MPI_SENDRECV should work even with odd mixture on 32 and 64 Bit 
+!--       variables in structure agent_type (due to the calculation of par_size)
+          par_size = STORAGE_SIZE(trna(1))/8
+          CALL MPI_SENDRECV( trna, trna_count*par_size, MPI_BYTE,              &
+                             pnorth, 1, rvsa,                                  &
+                             trsa_count_recv*par_size, MPI_BYTE, psouth, 1,    &
+                             comm2d, status, ierr )
+
+          IF ( trsa_count_recv > 0 ) THEN
+             CALL mas_eh_add_agents_to_gridcell(rvsa(1:trsa_count_recv))
+          ENDIF
+
+          DEALLOCATE(rvsa)
+
+          number_of_agents = number_of_agents + trsa_count_recv
+
+          DEALLOCATE( trsa, trna )
+
+       ENDIF
+
+       DEALLOCATE( move_also_north )
+       DEALLOCATE( move_also_south )
+
+#else
+
+       DO  ip = nxl, nxr, nxr-nxl
+          DO  jp = nys, nyn
+             number_of_agents = agt_count(jp,ip)
+             IF ( number_of_agents <= 0 )  CYCLE
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+             DO  n = 1, number_of_agents
+!
+!--             Apply boundary conditions
+                IF ( agents(n)%x < 0.0_wp )  THEN
+
+                   IF ( ibc_mas_lr == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      agents(n)%x = ( nx + 1 ) * dx + agents(n)%x
+                      agents(n)%origin_x = ( nx + 1 ) * dx + &
+                                  agents(n)%origin_x
+                   ELSEIF ( ibc_mas_lr == 1 )  THEN
+!
+!--                   Agent absorption
+                      agents(n)%agent_mask = .FALSE.
+                      deleted_agents = deleted_agents + 1
+                   ENDIF
+
+                ELSEIF ( agents(n)%x >= ( nx + 1 ) * dx )  THEN
+
+                   IF ( ibc_mas_lr == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      agents(n)%x = agents(n)%x - ( nx + 1 ) * dx
+
+                   ELSEIF ( ibc_mas_lr == 1 )  THEN
+!
+!--                   Agent absorption
+                      agents(n)%agent_mask = .FALSE.
+                      deleted_agents = deleted_agents + 1
+                   ENDIF
+
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn, nyn-nys
+             number_of_agents = agt_count(jp,ip)
+             IF ( number_of_agents <= 0 )  CYCLE
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+             DO  n = 1, number_of_agents
+
+                IF ( agents(n)%y < 0.0_wp )  THEN
+
+                   IF ( ibc_mas_ns == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      agents(n)%y = ( ny + 1 ) * dy + agents(n)%y
+                      agents(n)%origin_y = ( ny + 1 ) * dy + &
+                           agents(n)%origin_y
+
+                   ELSEIF ( ibc_mas_ns == 1 )  THEN
+!
+!--                   Agent absorption
+                      agents(n)%agent_mask = .FALSE.
+                      deleted_agents = deleted_agents + 1
+                   ENDIF
+
+                ELSEIF ( agents(n)%y >= ( ny + 0.5_wp ) * dy )  THEN
+
+                   IF ( ibc_mas_ns == 0 )  THEN
+!
+!--                   Cyclic boundary. Relevant coordinate has to be changed.
+                      agents(n)%y = agents(n)%y - ( ny + 1 ) * dy
+
+                   ELSEIF ( ibc_mas_ns == 1 )  THEN
+!
+!--                   Agent absorption
+                      agents(n)%agent_mask = .FALSE.
+                      deleted_agents = deleted_agents + 1
+                   ENDIF
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDDO
+#endif
+
+!
+!--    Accumulate the number of agents transferred between the subdomains)
+       CALL mas_eh_ghost_exchange
+
+    END SUBROUTINE mas_eh_exchange_horiz
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sends the agents from the three gridcells closest to the 
+!> north/south/left/right border of a PE to the corresponding neighbors ghost
+!> layer (which is three grid boxes deep)
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_ghost_exchange
+
+       IMPLICIT NONE
+
+#if defined( __parallel )
+
+       INTEGER(iwp) ::  ip          !< index variable along x
+       INTEGER(iwp) ::  jp          !< index variable along y
+       INTEGER(iwp) ::  agt_size    !< Bit size of agent datatype
+       INTEGER(iwp) ::  ghla_count  !< ghost points left agent
+       INTEGER(iwp) ::  ghna_count  !< ghost points north agent
+       INTEGER(iwp) ::  ghra_count  !< ghost points right agent
+       INTEGER(iwp) ::  ghsa_count  !< ghost points south agent
+
+       LOGICAL ::  ghla_empty      !< ghost points left agent
+       LOGICAL ::  ghla_empty_rcv  !< ghost points left agent
+       LOGICAL ::  ghna_empty      !< ghost points north agent
+       LOGICAL ::  ghna_empty_rcv  !< ghost points north agent
+       LOGICAL ::  ghra_empty      !< ghost points right agent
+       LOGICAL ::  ghra_empty_rcv  !< ghost points right agent
+       LOGICAL ::  ghsa_empty      !< ghost points south agent
+       LOGICAL ::  ghsa_empty_rcv  !< ghost points south agent
+
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  ghla  !< agents received from right PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  ghna  !< agents received from south PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  ghra  !< agents received from left PE
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE ::  ghsa  !< agents received from north PE
+
+       ghla_empty = .TRUE.
+       ghna_empty = .TRUE.
+       ghra_empty = .TRUE.
+       ghsa_empty = .TRUE.
+!
+!--    reset ghost layer
+       DO ip = nxlg, nxl-1
+          DO jp = nysg, nyng
+             agt_count(jp,ip) = 0
+          ENDDO
+       ENDDO
+       DO ip = nxr+1, nxrg
+          DO jp = nysg, nyng
+             agt_count(jp,ip) = 0
+          ENDDO
+       ENDDO
+       DO ip = nxl, nxr
+          DO jp = nysg, nys-1
+             agt_count(jp,ip) = 0
+          ENDDO
+       ENDDO
+       DO ip = nxl, nxr
+          DO jp = nyn+1, nyng
+             agt_count(jp,ip) = 0
+          ENDDO
+       ENDDO
+!
+!--    Transfer of agents from left to right and vice versa
+       IF ( pdims(1) /= 1 )  THEN
+!
+!--       Reset left and right ghost layers
+          ghla_count  = 0
+          ghra_count  = 0
+!
+!--       First calculate the storage necessary for sending 
+!--       and receiving the data.
+          ghla_count = SUM(agt_count(nys:nyn,nxl:nxl+2))
+          ghra_count = SUM(agt_count(nys:nyn,nxr-2:nxr))
+!
+!--       No cyclic boundaries for agents
+          IF ( nxl == 0 .OR. ghla_count == 0 ) THEN
+             ghla_count = 1
+          ELSE
+             ghla_empty = .FALSE.
+          ENDIF
+          IF ( nxr == nx .OR. ghra_count == 0 ) THEN
+             ghra_count = 1
+          ELSE
+             ghra_empty = .FALSE.
+          ENDIF
+          ALLOCATE( ghla(1:ghla_count), ghra(1:ghra_count) )
+          ghla = zero_agent
+          ghra = zero_agent
+!
+!--       Get all agents that will be sent left into one array
+          ghla_count = 0
+          IF ( nxl /= 0 ) THEN
+             DO ip = nxl, nxl+2
+                DO jp = nys, nyn
+
+                   number_of_agents = agt_count(jp,ip)
+                   IF ( number_of_agents <= 0 )  CYCLE
+                   ghla(ghla_count+1:ghla_count+number_of_agents)              &
+                       = grid_agents(jp,ip)%agents(1:number_of_agents)
+                   ghla_count = ghla_count + number_of_agents
+
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( ghla_count == 0 )  ghla_count = 1
+!
+!--       Get all agents that will be sent right into one array
+          ghra_count = 0
+          IF ( nxr /= nx ) THEN
+             DO ip = nxr-2, nxr
+                DO jp = nys, nyn
+
+                   number_of_agents = agt_count(jp,ip)
+                   IF ( number_of_agents <= 0 )  CYCLE
+                   ghra(ghra_count+1:ghra_count+number_of_agents)              &
+                       = grid_agents(jp,ip)%agents(1:number_of_agents)
+                   ghra_count = ghra_count + number_of_agents
+
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( ghra_count == 0 ) ghra_count = 1
+!
+!--       Send/receive number of agents that 
+!--       will be transferred to/from left/right neighbor
+          CALL MPI_SENDRECV( ghla_count,      1, MPI_INTEGER, pleft,  0,       &
+                             ghra_count_recv, 1, MPI_INTEGER, pright, 0,       &
+                             comm2d, status, ierr )
+          ALLOCATE ( agt_gh_r(1:ghra_count_recv) )
+!
+!--       Send/receive number of agents that 
+!--       will be transferred to/from right/left neighbor
+          CALL MPI_SENDRECV( ghra_count,      1, MPI_INTEGER, pright,  0,      &
+                             ghla_count_recv, 1, MPI_INTEGER, pleft,   0,      &
+                             comm2d, status, ierr )
+!
+!--       Send/receive flag that indicates if there are actually any agents 
+!--       in ghost  layer
+          CALL MPI_SENDRECV( ghla_empty,     1, MPI_LOGICAL, pleft, 1,         &
+                             ghra_empty_rcv, 1, MPI_LOGICAL, pright,1,         &
+                             comm2d, status, ierr )
+          CALL MPI_SENDRECV( ghra_empty,     1, MPI_LOGICAL, pright,1,         &
+                             ghla_empty_rcv, 1, MPI_LOGICAL, pleft, 1,         &
+                             comm2d, status, ierr )
+
+
+          ALLOCATE ( agt_gh_l(1:ghla_count_recv) )
+!
+!--       Get bit size of one agent
+          agt_size = STORAGE_SIZE(zero_agent)/8
+!
+!--       Send/receive agents to/from left/right neighbor
+          CALL MPI_SENDRECV( ghla,     ghla_count      * agt_size, MPI_BYTE,   &
+                                pleft, 1,                                      &
+                             agt_gh_r, ghra_count_recv * agt_size, MPI_BYTE,   &
+                                pright,1,                                      &
+                             comm2d, status, ierr )
+!
+!--       Send/receive agents to/from left/right neighbor
+          CALL MPI_SENDRECV( ghra,     ghra_count      * agt_size, MPI_BYTE,   &
+                                pright,1,                                      &
+                             agt_gh_l, ghla_count_recv * agt_size, MPI_BYTE,   &
+                                pleft, 1,                                      &
+                             comm2d, status, ierr )
+!
+!--       If agents were received, add them to the respective ghost layer cells
+          IF ( .NOT. ghra_empty_rcv ) THEN
+             CALL mas_eh_add_ghost_agents_to_gridcell(agt_gh_r)
+          ENDIF
+
+          IF ( .NOT. ghla_empty_rcv ) THEN
+             CALL mas_eh_add_ghost_agents_to_gridcell(agt_gh_l)
+          ENDIF
+
+          DEALLOCATE( ghla, ghra, agt_gh_l, agt_gh_r )
+
+       ENDIF
+
+!
+!--    Transfer of agents from south to north and vice versa
+       IF ( pdims(2) /= 1 )  THEN
+!
+!--       Reset south and north ghost layers
+          ghsa_count  = 0
+          ghna_count  = 0
+!
+!--       First calculate the storage necessary for sending 
+!--       and receiving the data.
+          ghsa_count = SUM(agt_count(nys:nys+2,nxlg:nxrg))
+          ghna_count = SUM(agt_count(nyn-2:nyn,nxlg:nxrg))
+!
+!--       No cyclic boundaries for agents
+          IF ( nys == 0 .OR. ghsa_count == 0 ) THEN
+             ghsa_count = 1
+          ELSE
+             ghsa_empty = .FALSE.
+          ENDIF
+          IF ( nyn == ny .OR. ghna_count == 0 ) THEN
+             ghna_count = 1
+          ELSE
+             ghna_empty = .FALSE.
+          ENDIF
+          ALLOCATE( ghsa(1:ghsa_count), ghna(1:ghna_count) )
+          ghsa = zero_agent
+          ghna = zero_agent
+!
+!--       Get all agents that will be sent south into one array
+          ghsa_count = 0
+          IF ( nys /= 0 ) THEN
+             DO ip = nxlg, nxrg
+                DO jp = nys, nys+2
+
+                   number_of_agents = agt_count(jp,ip)
+                   IF ( number_of_agents <= 0 )  CYCLE
+                   ghsa(ghsa_count+1:ghsa_count+number_of_agents)              &
+                       = grid_agents(jp,ip)%agents(1:number_of_agents)
+                   ghsa_count = ghsa_count + number_of_agents
+
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( ghsa_count == 0 )  ghsa_count = 1
+!
+!--       Get all agents that will be sent north into one array
+          ghna_count = 0
+          IF ( nyn /= ny ) THEN
+             DO ip = nxlg, nxrg
+                DO jp = nyn-2, nyn
+
+                   number_of_agents = agt_count(jp,ip)
+                   IF ( number_of_agents <= 0 )  CYCLE
+                   ghna(ghna_count+1:ghna_count+number_of_agents)              &
+                       = grid_agents(jp,ip)%agents(1:number_of_agents)
+                   ghna_count = ghna_count + number_of_agents
+
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( ghna_count == 0 ) ghna_count = 1
+!
+!--       Send/receive number of agents that 
+!--       will be transferred to/from south/north neighbor
+          CALL MPI_SENDRECV( ghsa_count, 1, MPI_INTEGER, psouth, 0,            &
+                             ghna_count_recv,   1, MPI_INTEGER, pnorth, 0,     &
+                             comm2d, status, ierr )
+          ALLOCATE ( agt_gh_n(1:ghna_count_recv) )
+!
+!--       Send/receive number of agents that 
+!--       will be transferred to/from north/south neighbor
+          CALL MPI_SENDRECV( ghna_count, 1, MPI_INTEGER, pnorth, 0,            &
+                             ghsa_count_recv,   1, MPI_INTEGER, psouth, 0,     &
+                             comm2d, status, ierr )
+!
+!--       Send/receive flag that indicates if there are actually any agents 
+!--       in ghost  layer
+          CALL MPI_SENDRECV( ghsa_empty,     1, MPI_LOGICAL, psouth, 1,        &
+                             ghna_empty_rcv, 1, MPI_LOGICAL, pnorth, 1,        &
+                             comm2d, status, ierr )
+          CALL MPI_SENDRECV( ghna_empty,     1, MPI_LOGICAL, pnorth, 1,        &
+                             ghsa_empty_rcv, 1, MPI_LOGICAL, psouth, 1,        &
+                             comm2d, status, ierr )
+
+
+          ALLOCATE ( agt_gh_s(1:ghsa_count_recv) )
+!
+!--       Get bit size of one agent
+          agt_size = STORAGE_SIZE(zero_agent)/8
+!
+!--       Send/receive agents to/from south/north neighbor
+          CALL MPI_SENDRECV( ghsa,     ghsa_count      * agt_size, MPI_BYTE,   &
+                                psouth,1,                                      &
+                             agt_gh_n, ghna_count_recv * agt_size, MPI_BYTE,   &
+                                pnorth,1,                                      &
+                             comm2d, status, ierr )
+!
+!--       Send/receive agents to/from south/north neighbor
+          CALL MPI_SENDRECV( ghna,     ghna_count      * agt_size, MPI_BYTE,   &
+                                pnorth,1,                                      &
+                             agt_gh_s, ghsa_count_recv * agt_size, MPI_BYTE,   &
+                                psouth,1,                                      &
+                             comm2d, status, ierr )
+!
+!--       If agents were received, add them to the respective ghost layer cells
+          IF ( .NOT. ghna_empty_rcv ) THEN
+             CALL mas_eh_add_ghost_agents_to_gridcell(agt_gh_n)
+          ENDIF
+
+          IF ( .NOT. ghsa_empty_rcv ) THEN
+             CALL mas_eh_add_ghost_agents_to_gridcell(agt_gh_s)
+          ENDIF
+
+          DEALLOCATE( ghna, ghsa, agt_gh_n, agt_gh_s )
+
+       ENDIF
+
+#endif
+
+    END SUBROUTINE mas_eh_ghost_exchange
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> If an agent moves from one grid cell to another (on the current 
+!> processor!), this subroutine moves the corresponding element from the
+!> agent array of the old grid cell to the agent array of the new grid 
+!> cell.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_move_agent
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i              !< grid index (x) of agent position
+       INTEGER(iwp) ::  ip             !< index variable along x
+       INTEGER(iwp) ::  j              !< grid index (y) of agent position
+       INTEGER(iwp) ::  jp             !< index variable along y
+       INTEGER(iwp) ::  n              !< index variable for agent array
+       INTEGER(iwp) ::  na_before_move !< number of agents per grid box before moving
+       INTEGER(iwp) ::  aindex         !< dummy argument for number of new agent per grid box
+
+       TYPE(agent_type), DIMENSION(:), POINTER ::  agents_before_move !< agents before moving
+
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+
+                na_before_move = agt_count(jp,ip)
+                IF ( na_before_move <= 0 )  CYCLE
+                agents_before_move => grid_agents(jp,ip)%agents(1:na_before_move)
+
+                DO  n = 1, na_before_move
+                   i = agents_before_move(n)%x * ddx
+                   j = agents_before_move(n)%y * ddy
+
+!--                For mas_eh_exchange_horiz to work properly agents need to be
+!--                moved to the outermost gridboxes of the respective processor.
+!--                If the agent index is inside the processor the following
+!--                lines will not change the index
+                   i = MIN ( i , nxr )
+                   i = MAX ( i , nxl )
+                   j = MIN ( j , nyn )
+                   j = MAX ( j , nys )
+
+!
+!--                Check if agent has moved to another grid cell.
+                   IF ( i /= ip  .OR.  j /= jp )  THEN
+!
+!--                   If the agent stays on the same processor, the agent
+!--                   will be added to the agent array of the new processor.
+                      number_of_agents = agt_count(j,i)
+                      agents => grid_agents(j,i)%agents(1:number_of_agents)
+
+                      aindex = number_of_agents+1
+                      IF (  aindex > SIZE(grid_agents(j,i)%agents)  )     &
+                      THEN
+                         CALL mas_eh_realloc_agents_array(i,j)
+                      ENDIF
+
+                      grid_agents(j,i)%agents(aindex) = agents_before_move(n)
+                      agt_count(j,i) = aindex
+
+                      agents_before_move(n)%agent_mask = .FALSE.
+                   ENDIF
+                ENDDO
+
+          ENDDO
+       ENDDO
+
+       RETURN
+
+    END SUBROUTINE mas_eh_move_agent
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> If the allocated memory for the agent array do not suffice to add arriving
+!> agents from neighbour grid cells, this subrouting reallocates the 
+!> agent array to assure enough memory is available. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_eh_realloc_agents_array (i,j,size_in)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: old_size  !< old array size
+       INTEGER(iwp) :: new_size  !< new array size
+
+       INTEGER(iwp), INTENT(in) ::  i  !< grid index (y)
+       INTEGER(iwp), INTENT(in) ::  j  !< grid index (y)
+
+       INTEGER(iwp), INTENT(in), OPTIONAL ::  size_in  !< size of input array
+
+       TYPE(agent_type), DIMENSION(10) :: tmp_agents_s !< temporary static agent array
+
+       TYPE(agent_type), DIMENSION(:), ALLOCATABLE :: tmp_agents_d !< temporary dynamic agent array
+
+       old_size = SIZE(grid_agents(j,i)%agents)
+
+       IF ( PRESENT(size_in) )   THEN
+          new_size = size_in
+       ELSE
+          new_size = old_size * ( 1.0_wp + alloc_factor_mas / 100.0_wp )
+       ENDIF
+
+       new_size = MAX( new_size, min_nr_agent, old_size + 1 )
+
+       IF ( old_size <= 10 )  THEN
+
+          tmp_agents_s(1:old_size) = grid_agents(j,i)%agents(1:old_size)
+
+          DEALLOCATE(grid_agents(j,i)%agents)
+          ALLOCATE(grid_agents(j,i)%agents(new_size))
+
+          grid_agents(j,i)%agents(1:old_size)         = tmp_agents_s(1:old_size)
+          grid_agents(j,i)%agents(old_size+1:new_size) = zero_agent
+
+       ELSE
+
+          ALLOCATE(tmp_agents_d(new_size))
+          tmp_agents_d(1:old_size) = grid_agents(j,i)%agents
+
+          DEALLOCATE(grid_agents(j,i)%agents)
+          ALLOCATE(grid_agents(j,i)%agents(new_size))
+
+          grid_agents(j,i)%agents(1:old_size)         = tmp_agents_d(1:old_size)
+          grid_agents(j,i)%agents(old_size+1:new_size) = zero_agent
+
+          DEALLOCATE(tmp_agents_d)
+
+       ENDIF
+       agents => grid_agents(j,i)%agents(1:number_of_agents)
+
+       RETURN
+    END SUBROUTINE mas_eh_realloc_agents_array
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Inquires prognostic model quantities at the position of each agent and
+!> stores them in that agent for later output
+!------------------------------------------------------------------------------! 
+    SUBROUTINE mas_get_prognostic_quantities
+
+       USE arrays_3d,                                                          &
+           ONLY:  u, v, pt, hyp, exner
+
+!       USE chemistry_model_mod,                                                &
+!           ONLY:  chem_species
+
+!       USE control_parameters,                                                 &
+!              ONLY:  air_chemistry
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i_offset  !<  index offset for windspeed measurement
+       INTEGER(iwp) ::  il        !<  x-index
+       INTEGER(iwp) ::  is        !<  subgrid box counter
+       INTEGER(iwp) ::  j_offset  !<  index offset for windspeed measurement
+       INTEGER(iwp) ::  jl        !<  y-index
+       INTEGER(iwp) ::  kl        !<  z-index
+       INTEGER(iwp) ::  nl        !<  agent counter
+       INTEGER(iwp) ::  se        !<  subgrid box end index
+       INTEGER(iwp) ::  si        !<  subgrid box start index
+
+       REAL(wp) ::  u_a  !< windspeed at agent position (x)
+       REAL(wp) ::  v_a  !< windspeed at agent position (y)
+
+       DO  il = nxl, nxr
+          DO  jl = nys, nyn
+
+             number_of_agents = agt_count(jl,il)
+!
+!--          If grid cell is empty, cycle
+             IF ( number_of_agents <= 0 ) CYCLE
+             kl = s_measure_height(jl,il)
+
+             agents => grid_agents(jl,il)%agents(1:number_of_agents)
+!
+!--          loop over the four subgrid boxes
+             DO is = 0,3
+!
+!--             Set indices
+                si = grid_agents(jl,il)%start_index(is)
+                se = grid_agents(jl,il)%end_index(is)
+                DO nl = si, se
+!
+!--                Calculate index offset in x-direction:
+!--                Left value if wall right of grid box
+!--                Right value if wall left of grid box
+!--                Else the one that is closer to the agent
+                   IF ( BTEST( obstacle_flags( jl, il+1 ), 6 ) ) THEN
+                      i_offset = 0
+                   ELSEIF ( BTEST( obstacle_flags( jl, il-1 ), 2 ) ) THEN
+                      i_offset = 1
+                   ELSE
+                      i_offset = MERGE( 0, 1, BTEST(is,1) )
+                   ENDIF
+                   u_a = u( kl, jl, il + i_offset )
+!
+!--                Calculate index offset in y-direction:
+!--                South value if wall north of grid box
+!--                North value if wall south of grid box
+!--                Else the one that is closer to the agent
+                   IF ( BTEST( obstacle_flags( jl+1, il ), 4 ) ) THEN
+                      j_offset = 0
+                   ELSEIF ( BTEST( obstacle_flags( jl-1, il ), 0 ) ) THEN
+                      j_offset = 1
+                   ELSE
+                      j_offset = MERGE( 0, 1, BTEST(is,0) )
+                   ENDIF
+                   v_a = v( kl, jl + j_offset, il )
+!
+!--                Calculate windspeed at agent postion
+                   agents(nl)%windspeed = SQRT(u_a**2 + v_a**2)
+!
+!--                Calculate temperature at agent position
+                   agents(nl)%t = pt(kl,jl,il) * exner(kl)
+! !
+! !--                Get PM10 concentration at agent position, if possible
+!                    IF ( ind_pm10 == -9 ) THEN
+!                       agents(nl)%pm10 = 0.0_wp
+!                    ELSE
+!                       agents(nl)%pm10 = chem_species(ind_pm10)%conc(kl,jl,il)
+!                    ENDIF
+! !
+! !--                Get PM10 concentration at agent position, if possible
+!                    IF ( ind_pm25 == -9 ) THEN
+!                       agents(nl)%pm25 = 0.0_wp
+!                    ELSE
+!                       agents(nl)%pm25 = chem_species(ind_pm25)%conc(kl,jl,il)
+!                    ENDIF
+                ENDDO
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE mas_get_prognostic_quantities
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Adds an item to the priority queue (binary heap) at the correct position
+!------------------------------------------------------------------------------! 
+    SUBROUTINE mas_heap_insert_item( id, priority )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  cur_pos !< current position
+       INTEGER(iwp) ::  id      !< mesh ID of item
+
+       REAL(wp) ::  priority !< item priority
+
+       TYPE(heap_item) ::  item !< heap item
+
+       item%mesh_id  = id
+       item%priority = priority
+!
+!--    Extend heap, if necessary
+       IF ( heap_count + 1 > SIZE(queue) ) THEN
+          CALL mas_heap_extend
+       ENDIF
+!
+!--    Insert item at first unoccupied postion (highest index) of heap
+       cur_pos = heap_count
+       queue(cur_pos) = item
+!
+!--    Sort while inserted item is not at top of heap
+       DO WHILE ( cur_pos /= 0 )
+!
+!--       If priority < its parent's priority, swap them. 
+!--       Else, sorting is done.
+          IF ( queue(cur_pos)%priority                                         &
+              < queue(FLOOR((cur_pos)/2.))%priority )                          &
+          THEN
+             item = queue(cur_pos)
+             queue(cur_pos) = queue(FLOOR((cur_pos)/2.))
+             queue(FLOOR((cur_pos)/2.)) = item
+             cur_pos = FLOOR((cur_pos)/2.)
+          ELSE
+             EXIT
+          ENDIF
+       ENDDO
+!
+!--    Item was added to heap, so the heap count increases
+       heap_count = heap_count + 1
+
+    END SUBROUTINE mas_heap_insert_item
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Extends the size of the priority queue (binary heap)
+!------------------------------------------------------------------------------! 
+    SUBROUTINE mas_heap_extend
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  soh !< size of heap
+
+       TYPE(heap_item), DIMENSION(:), ALLOCATABLE ::  dummy_heap !< dummy heap
+
+       soh = SIZE(queue)-1
+       ALLOCATE(dummy_heap(0:soh))
+       dummy_heap = queue
+       DEALLOCATE(queue)
+       ALLOCATE(queue(0:2*soh+1))
+       queue(0:soh) = dummy_heap(0:soh)
+
+    END SUBROUTINE mas_heap_extend
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Removes first (smallest) element from the priority queue, reorders the rest
+!> and returns the ID of the removed mesh point
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_heap_extract_item ( id )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  id      !< ID of item extracted item
+       INTEGER(iwp) ::  child   !< child of item in heap
+       INTEGER(iwp) ::  cur_pos !< current position of item in heap
+
+       TYPE(heap_item) ::  dummy
+!
+!--    Get ID of mesh point with lowest priority (extracted item: top of heap)
+       id = queue(0)%mesh_id
+!
+!--    Put last item in heap at first position
+       queue(0) = queue(heap_count-1)
+       cur_pos = 0
+       DO
+!
+!--       If current item has no children, sorting is done
+          IF( 2*cur_pos+1 > heap_count - 1 ) THEN
+             EXIT
+!
+!--       If current item has only one child, check if item and its child are
+!--       ordered correctly. Else, swap them.
+          ELSEIF ( 2*cur_pos+2 > heap_count - 1 ) THEN
+             IF ( queue(cur_pos)%priority > queue(2*cur_pos+1)%priority ) THEN
+                dummy = queue(cur_pos)
+                queue(cur_pos) = queue(2*cur_pos+1)
+                queue(2*cur_pos+1) = dummy
+                cur_pos = 2*cur_pos+1
+             ELSE
+                EXIT
+             ENDIF
+          ELSE
+!
+!--          determine the smaller child
+             IF ( queue(2*cur_pos+1)%priority                                  &
+                 >= queue(2*cur_pos+2)%priority )                              &
+             THEN
+                child = 2
+             ELSE
+                child = 1
+             ENDIF
+!
+!--          Check if item and its smaller child are ordered falsely. If so, 
+!--          swap them. Else, sorting is done.
+             IF ( queue(cur_pos)%priority > queue(2*cur_pos+child )%priority ) &
+             THEN
+                dummy = queue(cur_pos)
+                queue(cur_pos) = queue(2*cur_pos+child)
+                queue(2*cur_pos+child) = dummy
+                cur_pos = 2*cur_pos+child
+             ELSE
+                EXIT
+             ENDIF
+          ENDIF
+       ENDDO
+!
+!--    Top item was removed from heap, thus, heap_cout decreases by one
+       heap_count = heap_count-1
+
+    END SUBROUTINE mas_heap_extract_item
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of Multi Agent System
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_init
+
+!       USE chem_gasphase_mod,                                                  &
+!           ONLY:  nspec
+
+!       USE chemistry_model_mod,                                                &
+!           ONLY:  chem_species
+
+       USE control_parameters,                                                 &
+           ONLY:  coupling_char, initializing_actions, io_blocks, io_group
+
+       USE surface_mod,                                                        &
+           ONLY:  get_topography_top_index, get_topography_top_index_ji
+
+       USE arrays_3d,                                                          &
+           ONLY:  zu, zw
+
+       USE indices,                                                            &
+           ONLY:  nzt 
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< grid cell (x)
+       INTEGER(iwp) ::  ii            !< io-block counter
+       INTEGER(iwp) ::  il            !< io-block counter
+       INTEGER(iwp) ::  jl            !< io-block counter
+       INTEGER(iwp) ::  kl            !< io-block counter
+       INTEGER(iwp) ::  kdum            !< io-block counter
+       INTEGER(iwp) ::  locdum            !< io-block counter
+       INTEGER(iwp) ::  j             !< grid cell (y)
+       INTEGER(iwp) ::  size_of_mesh  !< temporary value for read
+       INTEGER(iwp) ::  size_of_pols  !< temporary value for read
+       INTEGER(iwp) ::  ioerr         !< IOSTAT flag for IO-commands ( 0 = no error )
+
+       REAL(wp) ::  zdum  !< dummy for measurement height
+       REAL(wp) ::  avg_agt_height = 1.8_wp
+
+
+!
+!--    Check the number of agent groups.
+       IF ( number_of_agent_groups > max_number_of_agent_groups )  THEN
+          WRITE( message_string, * ) 'max_number_of_agent_groups =',      &
+                                     max_number_of_agent_groups ,         &
+                                     '&number_of_agent_groups reset to ', &
+                                     max_number_of_agent_groups
+          CALL message( 'mas_init', 'PA0072', 0, 1, 0, 6, 0 )
+          number_of_agent_groups = max_number_of_agent_groups
+       ENDIF
+
+!
+!--    Set some parameters
+       d_sigma_rep_agent = 1.0_wp/sigma_rep_agent
+       d_sigma_rep_wall  = 1.0_wp/sigma_rep_wall
+       d_tau_accel_agent = 1.0_wp/tau_accel_agent
+       IF ( dt_agent /= 999.0_wp ) THEN
+          agent_own_timestep = .TRUE.
+       ENDIF
+
+!
+!--    Get index of first grid box above topography
+       ALLOCATE( top_top_s(nysg:nyng,nxlg:nxrg),                               &
+                 top_top_w(nysg:nyng,nxlg:nxrg),                               &
+                 s_measure_height(nys:nyn,nxl:nxr) )
+!
+!--    Get first index above topography for scalar grid and last index in
+!--    topography for z-component of wind
+       DO il = nxlg, nxrg
+          DO jl = nysg, nyng
+             top_top_s(jl,il) = get_topography_top_index_ji(jl,il,'s') + 1
+             top_top_w(jl,il) = get_topography_top_index_ji(jl,il,'w')
+          ENDDO
+       ENDDO
+!
+!--    Create 2D array containing the index at which measurements are done by
+!--    agents. The height of this measurement is given by avg_agt_height.
+       DO il = nxl, nxr
+          DO jl = nys, nyn
+
+             kdum = top_top_w(jl,il)
+             zdum = zw(kdum)
+             zdum = zdum + avg_agt_height
+             locdum = 0
+!
+!--          Locate minimum distance from u-grid to measurement height (zdum)
+             DO kl = 1, nzt
+                IF ( ABS(zu(kl)-zdum) < ABS(zu(locdum)-zdum) ) locdum = kl
+             ENDDO
+             s_measure_height(jl,il) = locdum
+
+          ENDDO
+       ENDDO
+! !
+! !--    Get indices of PM10 and PM2.5 species, if active
+!        IF ( air_chemistry ) THEN
+!           DO il = 1, nspec
+! print*,chem_species(il)%name
+! !              IF ( spec_name(1:4) == 'PM10' ) THEN  
+! !                 ind_pm10 = il
+! !              ELSEIF ( spec_name(1:4) == 'PM25' ) THEN
+! !                 ind_pm25 = il
+! !              ENDIF
+! 
+!           ENDDO
+!        ENDIF
+! stop
+       CALL mas_create_obstacle_flags
+
+!
+!--    Set default start positions, if necessary
+       IF ( asl(1) == 9999999.9_wp )  asl(1) = 0.0_wp
+       IF ( asr(1) == 9999999.9_wp )  asr(1) = ( nx + 1 ) * dx
+       IF ( ass(1) == 9999999.9_wp )  ass(1) = 0.0_wp
+       IF ( asn(1) == 9999999.9_wp )  asn(1) = ( ny + 1 ) * dy
+       IF ( adx(1) == 9999999.9_wp .OR. adx(1) == 0.0_wp ) adx(1) = dx
+       IF ( ady(1) == 9999999.9_wp .OR. ady(1) == 0.0_wp ) ady(1) = dy
+
+       DO  j = 2, number_of_agent_groups
+          IF ( asl(j) == 9999999.9_wp )  asl(j) = asl(j-1)
+          IF ( asr(j) == 9999999.9_wp )  asr(j) = asr(j-1)
+          IF ( ass(j) == 9999999.9_wp )  ass(j) = ass(j-1)
+          IF ( asn(j) == 9999999.9_wp )  asn(j) = asn(j-1)
+          IF ( adx(j) == 9999999.9_wp .OR. adx(j) == 0.0_wp ) adx(j) = adx(j-1)
+          IF ( ady(j) == 9999999.9_wp .OR. ady(j) == 0.0_wp ) ady(j) = ady(j-1)
+       ENDDO
+
+!
+!--    Check boundary condition and set internal variables
+       SELECT CASE ( bc_mas_lr )
+
+          CASE ( 'cyclic' )
+             ibc_mas_lr = 0
+
+          CASE ( 'absorb' )
+             ibc_mas_lr = 1
+
+          CASE DEFAULT
+             WRITE( message_string, * ) 'unknown boundary condition ',         &
+                                        'bc_mas_lr = "', TRIM( bc_mas_lr ), '"'
+             CALL message( 'mas_init', 'PA0073', 1, 2, 0, 6, 0 )
+
+       END SELECT
+       SELECT CASE ( bc_mas_ns )
+
+          CASE ( 'cyclic' )
+             ibc_mas_ns = 0
+
+          CASE ( 'absorb' )
+             ibc_mas_ns = 1
+
+          CASE DEFAULT
+             WRITE( message_string, * ) 'unknown boundary condition ',         &
+                                        'bc_mas_ns = "', TRIM( bc_mas_ns ), '"'
+             CALL message( 'mas_init', 'PA0074', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+!
+!--    For the first model run of a possible job chain initialize the
+!--    agents, otherwise read the agent data from restart file.
+       IF ( TRIM( initializing_actions ) == 'read_restart_data'                &
+            .AND.  read_agents_from_restartfile )  THEN
+
+!           CALL mas_read_restart_file
+
+       ELSE
+!
+!--       Read preprocessed data of navigation mesh and building polygons
+!--       for agent pathfinding
+          DO ii = 0, io_blocks-1
+             IF ( ii == io_group )  THEN
+                OPEN ( 119, FILE='NAVIGATION_DATA'//TRIM( coupling_char ),     &
+                            FORM='UNFORMATTED', IOSTAT=ioerr )
+!
+!--             Read mesh data
+                READ(119) size_of_mesh
+                ALLOCATE( mesh(1:size_of_mesh))
+                DO i = 1, size_of_mesh
+                   READ(119) mesh(i)%polygon_id, mesh(i)%vertex_id,            &
+                             mesh(i)%noc, mesh(i)%origin_id,                   &
+                             mesh(i)%cost_so_far, mesh(i)%x,                   &
+                             mesh(i)%y, mesh(i)%x_s, mesh(i)%y_s
+                   ALLOCATE( mesh(i)%connected_vertices(1:mesh(i)%noc),        &
+                             mesh(i)%distance_to_vertex(1:mesh(i)%noc) )
+                   DO j = 1, mesh(i)%noc
+                      READ(119) mesh(i)%connected_vertices(j),                 &
+                                mesh(i)%distance_to_vertex(j)
+                   ENDDO
+                ENDDO
+!
+!--             Read polygon data
+                READ(119) size_of_pols
+                ALLOCATE( polygons(1:size_of_pols) )
+                DO i = 1, size_of_pols
+                   READ(119) polygons(i)%nov
+                   ALLOCATE( polygons(i)%vertices(0:polygons(i)%nov+1) )
+                   DO j = 0, polygons(i)%nov+1
+                      READ(119) polygons(i)%vertices(j)%delete,                &
+                                polygons(i)%vertices(j)%x,                     &
+                                polygons(i)%vertices(j)%y
+                   ENDDO
+                ENDDO
+                CLOSE(119)
+
+             ENDIF
+#if defined( __parallel ) && ! defined ( __check )
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+          ENDDO
+
+!
+!--       Allocate agent arrays and set attributes of the initial set of
+!--       agents, which can be also periodically released at later times.
+          ALLOCATE( agt_count  (nysg:nyng,nxlg:nxrg),                          &
+                    grid_agents(nysg:nyng,nxlg:nxrg) )
+!
+!--       Allocate dummy arrays for pathfinding
+          ALLOCATE( dummy_path_x(0:agt_path_size),                 &
+                    dummy_path_y(0:agt_path_size) )
+
+          number_of_agents = 0
+          sort_count_mas   = 0
+          agt_count        = 0
+
+!
+!--       initialize counter for agent IDs 
+          grid_agents%id_counter = 1
+
+!
+!--       Initialize all agents with dummy values (otherwise errors may
+!--       occur within restart runs). The reason for this is still not clear
+!--       and may be presumably caused by errors in the respective user-interface.
+          zero_agent%agent_mask = .FALSE.
+          zero_agent%block_nr      = -1
+          zero_agent%group         = 0
+          zero_agent%id            = 0_idp
+          zero_agent%path_counter  = agt_path_size
+          zero_agent%age           = 0.0_wp
+          zero_agent%age_m         = 0.0_wp
+          zero_agent%dt_sum        = 0.0_wp
+          zero_agent%clo           = 0.0_wp
+          zero_agent%energy_storage= 0.0_wp
+          zero_agent%force_x       = 0.0_wp
+          zero_agent%force_y       = 0.0_wp
+          zero_agent%origin_x      = 0.0_wp
+          zero_agent%origin_y      = 0.0_wp
+          zero_agent%speed_abs     = 0.0_wp
+          zero_agent%speed_e_x     = 0.0_wp
+          zero_agent%speed_e_y     = 0.0_wp
+          zero_agent%speed_des     = random_normal(desired_speed, des_sp_sig)
+          zero_agent%speed_x       = 0.0_wp
+          zero_agent%speed_y       = 0.0_wp
+          zero_agent%ipt           = 0.0_wp
+          zero_agent%x             = 0.0_wp
+          zero_agent%y             = 0.0_wp
+          zero_agent%path_x        = 0.0_wp
+          zero_agent%path_y        = 0.0_wp
+          zero_agent%t_x           = 0.0_wp
+          zero_agent%t_y           = 0.0_wp
+
+!
+!--    Set a seed value for the random number generator to be exclusively
+!--    used for the agent code. The generated random numbers should be
+!--    different on the different PEs.
+          iran_agent = iran_agent + myid
+
+          CALL mas_create_agent (PHASE_INIT)
+
+       ENDIF
+
+!
+!--    To avoid programm abort, assign agents array to the local version of 
+!--    first grid cell
+       number_of_agents = agt_count(nys,nxl)
+       agents => grid_agents(nys,nxl)%agents(1:number_of_agents)
+
+    END SUBROUTINE mas_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Output of informative message about maximum agent number
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_last_actions
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       IMPLICIT NONE
+
+       WRITE(message_string,'(A,I8,A)')                                        &
+                         'The maximumn number of agents durin this run was',   &
+                         maximum_number_of_agents,                             &
+                         '&Consider adjusting the INPUT parameter'//           &
+                         '&dim_size_agtnum_manual accordingly for the next run.'
+
+       CALL message( 'mas_data_output_agents', 'PA0457', 0, 0, 0, 6, 0 )
+
+    END SUBROUTINE mas_last_actions
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Finds the shortest path from a start position to a target position using the
+!> A*-algorithm
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_nav_a_star( start_x, start_y, target_x, target_y, nsteps )
+
+       IMPLICIT NONE
+
+       LOGICAL ::  target_reached !< flag
+
+       INTEGER(iwp) ::  cur_node     !< current node of binary heap
+       INTEGER(iwp) ::  il           !< counter (x)
+       INTEGER(iwp) ::  neigh_node   !< neighbor node
+       INTEGER(iwp) ::  node_counter !< binary heap node counter
+       INTEGER(iwp) ::  path_ag      !< index of agent path
+       INTEGER(iwp) ::  som          !< size of mesh
+       INTEGER(iwp) ::  steps        !< steps along the path
+       INTEGER(iwp) ::  nsteps        !< number of steps
+
+       REAL(wp) ::  start_x      !< x-coordinate agent
+       REAL(wp) ::  start_y      !< y-coordinate agent
+       REAL(wp) ::  new_cost     !< updated cost to reach node
+       REAL(wp) ::  new_priority !< priority of node to be added to queue
+       REAL(wp) ::  rn_gate      !< random number for corner gate
+       REAL(wp) ::  target_x     !< x-coordinate target
+       REAL(wp) ::  target_y     !< y-coordinate target
+!
+!--    Coordinate Type
+       TYPE coord
+          REAL(wp) ::  x   !< x-coordinate
+          REAL(wp) ::  x_s !< x-coordinate (shifted)
+          REAL(wp) ::  y   !< y-coordinate
+          REAL(wp) ::  y_s !< y-coordinate (shifted)
+       END TYPE coord
+
+       TYPE(coord), DIMENSION(:), ALLOCATABLE, TARGET ::  path     !< path array
+       TYPE(coord), DIMENSION(:), ALLOCATABLE, TARGET ::  tmp_path !< temporary path for resizing
+
+       node_counter = 0
+!
+!--    Create temporary navigation mesh including agent and target positions
+       CALL mas_nav_create_tmp_mesh( start_x, start_y, target_x, target_y, som )
+       tmp_mesh(som)%cost_so_far = 0.0_wp
+!
+!--    Initialize priority queue
+       heap_count = 0_iwp
+       ALLOCATE(queue(0:100))
+       target_reached = .FALSE.
+!
+!--    Add starting point (agent position) to frontier (the frontier consists
+!--    of all the nodes that are to be visited. The node with the smallest
+!--    priority will be visited first. The priority consists of the distance
+!--    from the start node to this node plus a minimal guess (direct distance)
+!--    from this node to the goal). For the starting node, the priority is set
+!--    to 0, as it's the only node thus far
+       CALL mas_heap_insert_item(som,0.0_wp)
+       cur_node = som
+       DO WHILE ( heap_count > 0 )
+!
+!--       Step one: Pick lowest priority item from queue
+          node_counter = node_counter + 1
+          CALL mas_heap_extract_item(cur_node)
+!
+!--       Node 0 is the goal node
+          IF ( cur_node == 0 ) THEN
+             EXIT
+          ENDIF
+!
+!--       Loop over all of cur_node's neighbors
+          DO il = 1, tmp_mesh(cur_node)%noc
+             neigh_node = tmp_mesh(cur_node)%connected_vertices(il)
+!
+!--          Check, if the way from the start node to this neigh_node via
+!--          cur_node is shorter than the previously found shortest path to it.
+!--          If so, replace said cost and add neigh_node to the frontier.
+!--          cost_so_far is initialized as 1.d12 so that all found distances
+!--          should be smaller.
+             new_cost   = tmp_mesh(cur_node)%cost_so_far                       &
+                         + tmp_mesh(cur_node)%distance_to_vertex(il)
+             IF ( new_cost < tmp_mesh(neigh_node)%cost_so_far ) THEN
+                tmp_mesh(neigh_node)%cost_so_far = new_cost
+                tmp_mesh(neigh_node)%origin_id   = cur_node
+!
+!--             Priority in the queue is cost_so_far + heuristic to goal
+                new_priority = new_cost                                        &
+                              + heuristic(tmp_mesh(neigh_node)%x,              &
+                                tmp_mesh(neigh_node)%y, tmp_mesh(0)%x,         &
+                                tmp_mesh(0)%y)
+                CALL mas_heap_insert_item(neigh_node,new_priority)
+             ENDIF
+          ENDDO
+       ENDDO
+!
+!--    Add nodes to a path array. To do this, we must backtrack from the target
+!--    node to its origin to its origin and so on until an node is reached that
+!--    has no origin (%origin_id == -1). This is the starting node.
+       DEALLOCATE(queue)
+       cur_node = 0
+       steps = 0
+       ALLOCATE(path(1:100))
+       DO WHILE ( cur_node /= -1 )
+          steps = steps + 1
+!
+!--       Resize path array if necessary
+          IF ( steps > SIZE(path) ) THEN
+             ALLOCATE(tmp_path(1:steps-1))
+             tmp_path(1:steps-1) = path(1:steps-1)
+             DEALLOCATE(path)
+             ALLOCATE(path(1:2*(steps-1)))
+             path(1:steps-1) = tmp_path(1:steps-1)
+             DEALLOCATE(tmp_path)
+          ENDIF
+          path(steps)%x = tmp_mesh(cur_node)%x
+          path(steps)%y = tmp_mesh(cur_node)%y
+          path(steps)%x_s = tmp_mesh(cur_node)%x_s
+          path(steps)%y_s = tmp_mesh(cur_node)%y_s
+          cur_node = tmp_mesh(cur_node)%origin_id
+       ENDDO
+!
+!--    Add calculated intermittent targets to the path until either the
+!--    target or the maximum number of intermittent targets is reached.
+!--    Ignore starting point (reduce index by one), it is agent position.
+       dummy_path_x = -1
+       dummy_path_y = -1
+       path_ag = 1
+       steps = steps - 1
+       nsteps = 0
+       DO WHILE( steps > 0 .AND. path_ag <= agt_path_size )
+!
+!--       Each target point is randomly chosen along a line target along the
+!--       bisector of the building corner that starts at corner_gate_start
+!--       and has a width of corner_gate_width. This is to avoid clustering
+!--       when opposing agent groups try to reach the same corner target.
+          rn_gate = random_function(iran_agent) * corner_gate_width            &
+                                                + corner_gate_start
+          dummy_path_x(path_ag) = path(steps)%x + rn_gate                      &
+                         * (path(steps)%x_s - path(steps)%x)
+          dummy_path_y(path_ag) = path(steps)%y + rn_gate                      &
+                         * (path(steps)%y_s - path(steps)%y)
+          steps = steps - 1
+          path_ag = path_ag + 1
+          nsteps = nsteps + 1
+       ENDDO
+!
+!--    Set current intermittent target of this agent
+       DEALLOCATE(tmp_mesh, path)
+
+    END SUBROUTINE mas_nav_a_star
+
+!------------------------------------------------------------------------------! 
+! Description:
+! ------------
+!> Adds a connection between two points of the navigation mesh 
+!> (one-way: in_mp1 to in_mp2)
+!------------------------------------------------------------------------------! 
+    SUBROUTINE mas_nav_add_connection ( in_mp1, id2, in_mp2 )
+
+       IMPLICIT NONE
+
+       LOGICAL ::  connection_established  !< Flag to indicate if connection has already been established
+
+       INTEGER(iwp) ::  id2  !< ID of in_mp2
+       INTEGER(iwp) ::  il   !< local counter
+       INTEGER(iwp) ::  noc1 !< number of connections in in_mp1
+
+       INTEGER, DIMENSION(:), ALLOCATABLE ::  dum_cv !< dummy array for connected_vertices
+
+       REAL(wp) ::  dist  !< Distance between the two points
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dum_dtv
+
+       TYPE(mesh_point) ::  in_mp1  !< mesh point that gets a new connection
+       TYPE(mesh_point) ::  in_mp2  !< mesh point in_mp1 will be connected to
+
+       connection_established = .FALSE.
+!
+!--    Check if connection has already been established
+       noc1 = SIZE(in_mp1%connected_vertices)
+       DO il = 1, in_mp1%noc
+          IF ( in_mp1%connected_vertices(il) == id2 ) THEN
+             connection_established = .TRUE.
+             EXIT
+          ENDIF
+       ENDDO
+
+       IF ( .NOT. connection_established ) THEN
+!
+!--       Resize arrays, if necessary
+          IF ( in_mp1%noc >= noc1 ) THEN
+             ALLOCATE( dum_cv(1:noc1),dum_dtv(1:noc1) )
+             dum_cv  = in_mp1%connected_vertices
+             dum_dtv = in_mp1%distance_to_vertex
+             DEALLOCATE( in_mp1%connected_vertices, in_mp1%distance_to_vertex )
+             ALLOCATE( in_mp1%connected_vertices(1:2*noc1),                    &
+                       in_mp1%distance_to_vertex(1:2*noc1) )
+             in_mp1%connected_vertices         = -999
+             in_mp1%distance_to_vertex         = -999.
+             in_mp1%connected_vertices(1:noc1) = dum_cv
+             in_mp1%distance_to_vertex(1:noc1) = dum_dtv
+          ENDIF
+
+!
+!--       Add connection
+          in_mp1%noc = in_mp1%noc+1
+          dist = SQRT( (in_mp1%x - in_mp2%x)**2 + (in_mp1%y - in_mp2%y)**2 )
+          in_mp1%connected_vertices(in_mp1%noc) = id2
+          in_mp1%distance_to_vertex(in_mp1%noc) = dist
+       ENDIF
+
+    END SUBROUTINE mas_nav_add_connection
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Adds a vertex (curren position of agent or target) to the existing tmp_mesh
+!------------------------------------------------------------------------------! 
+    SUBROUTINE mas_nav_add_vertex_to_mesh ( in_mp, in_id )
+
+       IMPLICIT NONE
+
+       LOGICAL ::  intersection_found !< flag
+
+       INTEGER(iwp) ::  jl    !< mesh point counter
+       INTEGER(iwp) ::  pl    !< polygon counter
+       INTEGER(iwp) ::  vl    !< vertex counter
+       INTEGER(iwp) ::  pid_t !< polygon id of tested mesh point
+       INTEGER(iwp) ::  vid_t !< vertex id of tested mesh point
+       INTEGER(iwp) ::  in_id !< vertex id of tested mesh point
+
+       REAL(wp) ::  v1x !< x-coordinate of test vertex 1 for intersection test
+       REAL(wp) ::  v1y !< y-coordinate of test vertex 1 for intersection test
+       REAL(wp) ::  v2x !< x-coordinate of test vertex 2 for intersection test
+       REAL(wp) ::  v2y !< y-coordinate of test vertex 2 for intersection test
+       REAL(wp) ::  x   !< x-coordinate of current mesh point
+       REAL(wp) ::  x_t !< x-coordinate of tested mesh point
+       REAL(wp) ::  y   !< y-coordinate of current mesh point
+       REAL(wp) ::  y_t !< y-coordinate of tested mesh point
+
+       TYPE(mesh_point) ::  in_mp !< Input mesh point
+!
+!--
+       x = in_mp%x
+       y = in_mp%y
+       DO jl = 0, SIZE(tmp_mesh)-2
+          IF ( in_id == jl ) CYCLE
+!
+!--       Ignore mesh points with 0 connections
+          IF ( tmp_mesh(jl)%polygon_id /= -1 ) THEN
+             IF ( tmp_mesh(jl)%noc == 0 ) CYCLE
+          ENDIF
+          x_t = tmp_mesh(jl)%x
+          y_t = tmp_mesh(jl)%y
+          pid_t = tmp_mesh(jl)%polygon_id
+          vid_t = tmp_mesh(jl)%vertex_id
+!
+!--       If the connecting line between the target and a mesh point points 
+!--       into the mesh point's polygon, no connection will be 
+!--       established between the two points. This is the case if the 
+!--       previous (next) vertex of the polygon is right of the connecting
+!--       line and the next (previous) vertex of the polygon is left of the
+!--       connecting line.
+          IF ( pid_t > 0 .AND. pid_t <= SIZE(polygons) ) THEN
+             IF ( (((is_left(x,y,x_t,y_t,polygons(pid_t)%vertices(vid_t-1)%x,  &
+                                       polygons(pid_t)%vertices(vid_t-1)%y)    &
+                  .AND. is_right(x,y,x_t,y_t,                                  &
+                                       polygons(pid_t)%vertices(vid_t+1)%x,    &
+                                       polygons(pid_t)%vertices(vid_t+1)%y) )  &
+                  .OR. (is_right(x,y,x_t,y_t,                                  &
+                                       polygons(pid_t)%vertices(vid_t-1)%x,    &
+                                       polygons(pid_t)%vertices(vid_t-1)%y)    &
+                  .AND. is_left(x,y,x_t,y_t,                                   &
+                                       polygons(pid_t)%vertices(vid_t+1)%x,    &
+                                       polygons(pid_t)%vertices(vid_t+1)%y)))))&
+             THEN
+                CYCLE
+             ENDIF
+          ENDIF
+!
+!--       For each edge of each polygon, check if it intersects with the 
+!--       potential connection. If at least one intersection is found,
+!--       no connection can be made
+          intersection_found = .FALSE.
+          DO pl = 1, SIZE(polygons)
+             DO vl = 1, polygons(pl)%nov
+                v1x = polygons(pl)%vertices(vl)%x
+                v1y = polygons(pl)%vertices(vl)%y
+                v2x = polygons(pl)%vertices(vl+1)%x
+                v2y = polygons(pl)%vertices(vl+1)%y
+                intersection_found = intersect(x,y,x_t,y_t,v1x,v1y,v2x,v2y)
+                IF ( intersection_found ) THEN
+                   EXIT
+                ENDIF
+             ENDDO
+             IF ( intersection_found ) EXIT
+          ENDDO
+          IF ( intersection_found ) CYCLE
+!
+!--       If neither of the above two test was true, a connection will be
+!--       established between the two mesh points.
+          CALL mas_nav_add_connection(in_mp,jl, tmp_mesh(jl))
+          CALL mas_nav_add_connection(tmp_mesh(jl),in_id, in_mp)
+       ENDDO
+       CALL mas_nav_reduce_connections(in_mp)
+
+    END SUBROUTINE mas_nav_add_vertex_to_mesh
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Creates a temporary copy of the navigation mesh to be used for pathfinding
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_nav_create_tmp_mesh( a_x, a_y, t_x, t_y, som )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  som !< size of mesh
+       INTEGER(iwp) ::  noc !< number of connetions
+       INTEGER(iwp) ::  im  !< local mesh point counter
+
+       REAL(wp) ::  a_x !< x-coordinate agent
+       REAL(wp) ::  a_y !< y-coordinate agent
+       REAL(wp) ::  t_x !< x-coordinate target
+       REAL(wp) ::  t_y !< y-coordinate target
+!
+!--    give tmp_mesh the size of mesh
+       som = SIZE(mesh)+1
+       ALLOCATE(tmp_mesh(0:som))
+!
+!--    give the allocatable variables in tmp_mesh their respctive sizes
+       DO im = 1, som-1
+          noc = mesh(im)%noc
+          ALLOCATE(tmp_mesh(im)%connected_vertices(1:noc))
+          ALLOCATE(tmp_mesh(im)%distance_to_vertex(1:noc))
+       ENDDO
+!
+!--    copy mesh to tmp_mesh
+       tmp_mesh(1:som-1) = mesh(1:som-1)
+!
+!--    Add target point ...
+       CALL mas_nav_init_mesh_point(tmp_mesh(0),-1_iwp,-1_iwp,t_x, t_y)
+       CALL mas_nav_add_vertex_to_mesh(tmp_mesh(0),0_iwp)
+!
+!--    ... and start point to temp mesh
+       CALL mas_nav_init_mesh_point(tmp_mesh(som),-1_iwp,-1_iwp,a_x, a_y)
+       CALL mas_nav_add_vertex_to_mesh(tmp_mesh(som),som)
+
+    END SUBROUTINE mas_nav_create_tmp_mesh
+    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Finds the shortest path from an agents' position to her target. As the
+!> actual pathfinding algorithm uses the obstacle corners and then shifts them
+!> outward after pathfinding, cases can uccur in which the connection between
+!> these intermittent targets then intersect with obstacles. To remedy this
+!> the pathfinding algorithm is then run on every two subsequent intermittent
+!> targets iteratively and new intermittent targets may be added to the path
+!> this way.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_nav_find_path( nl )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nl            !< local agent counter
+       INTEGER(iwp) ::  il            !< local counter
+       INTEGER(iwp) ::  jl            !< local counter
+       INTEGER(iwp) ::  kl            !< local counter
+       INTEGER(iwp) ::  nsteps_total  !< number of steps on path
+       INTEGER(iwp) ::  nsteps_dummy  !< number of steps on path
+       
+       REAL(wp), DIMENSION(0:30) ::  ld_path_x !< local dummy agent path to target (x)
+       REAL(wp), DIMENSION(0:30) ::  ld_path_y !< local dummy agent path to target (y)
+!
+!--    Initialize agent path arrays
+       agents(nl)%path_x    = -1
+       agents(nl)%path_y    = -1
+       agents(nl)%path_x(0) = agents(nl)%x
+       agents(nl)%path_y(0) = agents(nl)%y
+!
+!--    Calculate initial path
+       CALL mas_nav_a_star( agents(nl)%x,   agents(nl)%y,                      &
+                            agents(nl)%t_x, agents(nl)%t_y, nsteps_total )
+!
+!--    Set the rest of the agent path that was just calculated
+       agents(nl)%path_x(1:nsteps_total) = dummy_path_x(1:nsteps_total)
+       agents(nl)%path_y(1:nsteps_total) = dummy_path_y(1:nsteps_total)
+!
+!--    Iterate through found path and check more intermittent targets need
+!--    to be added. For this, run pathfinding between every two consecutive
+!--    intermittent targets.
+       DO il = 0, MIN(agt_path_size-1, nsteps_total-1)
+!
+!--       pathfinding between two consecutive intermittent targets
+          CALL mas_nav_a_star( agents(nl)%path_x(il),   agents(nl)%path_y(il), &
+                              agents(nl)%path_x(il+1), agents(nl)%path_y(il+1),&
+                              nsteps_dummy )
+          nsteps_dummy = nsteps_dummy - 1
+!
+!--       If additional intermittent targets are found, add them to the path
+          IF ( nsteps_dummy > 0 ) THEN
+             ld_path_x = -1
+             ld_path_y = -1
+             ld_path_x(il+1:il+nsteps_dummy) = dummy_path_x(1:nsteps_dummy)
+             ld_path_y(il+1:il+nsteps_dummy) = dummy_path_y(1:nsteps_dummy)
+             kl = 1
+             DO jl = il+1,nsteps_total
+               ld_path_x( il+nsteps_dummy+kl ) = agents(nl)%path_x(jl)
+               ld_path_y( il+nsteps_dummy+kl ) = agents(nl)%path_y(jl)
+               kl = kl + 1
+               IF ( kl > agt_path_size ) EXIT
+             ENDDO
+             nsteps_total = MIN(nsteps_total + nsteps_dummy, agt_path_size)
+             agents(nl)%path_x(il+1:nsteps_total) = ld_path_x(il+1:nsteps_total)
+             agents(nl)%path_y(il+1:nsteps_total) = ld_path_y(il+1:nsteps_total)
+          ENDIF
+
+       ENDDO
+!
+!--    reset path counter to first intermittent target
+       agents(nl)%path_counter = 1
+
+    END SUBROUTINE mas_nav_find_path
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reduces the size of connection array to the amount of actual connections
+!> after all connetions were added to a mesh point
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_nav_reduce_connections ( in_mp )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  noc  !< number of connections
+
+       INTEGER, DIMENSION(:), ALLOCATABLE ::  dum_cv   !< dummy connected_vertices
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dum_dtv !< dummy distance_to_vertex
+
+       TYPE(mesh_point) ::  in_mp
+
+       noc = in_mp%noc
+       ALLOCATE( dum_cv(1:noc),dum_dtv(1:noc) )
+       dum_cv  = in_mp%connected_vertices(1:noc)
+       dum_dtv = in_mp%distance_to_vertex(1:noc)
+       DEALLOCATE( in_mp%connected_vertices, in_mp%distance_to_vertex )
+       ALLOCATE( in_mp%connected_vertices(1:noc),                    &
+                 in_mp%distance_to_vertex(1:noc) )
+       in_mp%connected_vertices(1:noc) = dum_cv(1:noc)
+       in_mp%distance_to_vertex(1:noc) = dum_dtv(1:noc)
+
+    END SUBROUTINE mas_nav_reduce_connections
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializes a point of the navigation mesh
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_nav_init_mesh_point ( in_mp, pid, vid, x, y )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  pid !< polygon ID
+       INTEGER(iwp) ::  vid !< vertex ID
+
+       REAL(wp) ::  x !< x-coordinate
+       REAL(wp) ::  y !< y-coordinate
+
+       TYPE(mesh_point) ::  in_mp !< mesh point to be initialized
+
+       in_mp%origin_id          = -1
+       in_mp%polygon_id         = pid
+       in_mp%vertex_id          = vid
+       in_mp%cost_so_far        = 1.d12
+       in_mp%x                  = x
+       in_mp%y                  = y
+       in_mp%x_s                = x
+       in_mp%y_s                = y
+       ALLOCATE(in_mp%connected_vertices(1:100),                               &
+                in_mp%distance_to_vertex(1:100))
+       in_mp%connected_vertices = -999
+       in_mp%distance_to_vertex = -999.
+       in_mp%noc                = 0
+
+    END SUBROUTINE mas_nav_init_mesh_point
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reading of namlist from parin file
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_parin
+
+       USE control_parameters,                                                 &
+           ONLY: agent_time_unlimited, multi_agent_system_end,                 &
+                 multi_agent_system_start
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !<
+
+       NAMELIST /agent_parameters/  a_rand_target,                             &
+                                    adx,                                       &
+                                    ady,                                       &
+                                    agent_maximum_age,                         &
+                                    agent_time_unlimited,                      &
+                                    alloc_factor_mas,                          &
+                                    asl,                                       &
+                                    asn,                                       &
+                                    asr,                                       &
+                                    ass,                                       &
+                                    at_x,                                      &
+                                    at_y,                                      &
+                                    bc_mas_lr,                                 &
+                                    bc_mas_ns,                                 &
+                                    coll_t_0,                                  &
+                                    corner_gate_start,                         &
+                                    corner_gate_width,                         &
+                                    dim_size_agtnum_manual,                    &
+                                    dim_size_factor_agtnum,                    &
+                                    deallocate_memory_mas,                     &
+                                    dist_to_int_target,                        &
+                                    dt_agent,                                  &
+                                    dt_arel,                                   &
+                                    dt_write_agent_data,                       &
+                                    end_time_arel,                             &
+                                    max_dist_from_path,                        &
+                                    min_nr_agent,                              &
+                                    multi_agent_system_end,                    &
+                                    multi_agent_system_start,                  &
+                                    number_of_agent_groups,                    &
+                                    radius_agent,                              &
+                                    random_start_position_agents,              &
+                                    read_agents_from_restartfile,              &
+                                    repuls_agent,                              &
+                                    repuls_wall,                               &
+                                    scan_radius_agent,                         &
+                                    sigma_rep_agent,                           &
+                                    sigma_rep_wall,                            &
+                                    step_dealloc_mas,                          &
+                                    tau_accel_agent
+
+!
+!--    Try to find agent package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&agent_parameters' ) == 0 )
+          READ ( 11, '(A)', END=20 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, agent_parameters, ERR = 10, END = 20 )
+
+!
+!--    Set flag that indicates that agents are switched on
+       agents_active = .TRUE.
+       GOTO 20
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'agent_parameters', line )
+
+ 20    CONTINUE
+
+    END SUBROUTINE mas_parin
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine for the whole processor
+!> Sort all agents into the 4 respective subgrid boxes
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_ps_sort_in_subboxes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i           !< grid box (x)
+       INTEGER(iwp) ::  ip          !< counter (x)
+       INTEGER(iwp) ::  is          !< box counter
+       INTEGER(iwp) ::  j           !< grid box (y)
+       INTEGER(iwp) ::  jp          !< counter (y)
+       INTEGER(iwp) ::  m           !< sorting index
+       INTEGER(iwp) ::  n           !< agent index
+       INTEGER(iwp) ::  nn          !< agent counter
+       INTEGER(iwp) ::  sort_index  !< sorting index
+
+       INTEGER(iwp), DIMENSION(0:3) ::  sort_count  !< number of agents in one subbox
+
+       TYPE(agent_type), DIMENSION(:,:), ALLOCATABLE ::  sort_agents  !< sorted agent array
+
+       DO  ip = nxl, nxr
+          DO  jp = nys, nyn
+             number_of_agents = agt_count(jp,ip)
+             IF ( number_of_agents <= 0 )  CYCLE
+             agents => grid_agents(jp,ip)%agents(1:number_of_agents)
+
+             nn = 0
+             sort_count = 0
+             ALLOCATE( sort_agents(number_of_agents, 0:3) )
+
+             DO  n = 1, number_of_agents
+                sort_index = 0
+
+                IF ( agents(n)%agent_mask )  THEN
+                   nn = nn + 1
+!
+!--                Sorting agents with a binary scheme
+!--                sort_index=11_2=3_10 -> agent at the left,south subgridbox
+!--                sort_index=10_2=2_10 -> agent at the left,north subgridbox
+!--                sort_index=01_2=1_10 -> agent at the right,south subgridbox
+!--                sort_index=00_2=0_10 -> agent at the right,north subgridbox
+!--                For this the center of the gridbox is calculated 
+                   i = (agents(n)%x + 0.5_wp * dx) * ddx
+                   j = (agents(n)%y + 0.5_wp * dy) * ddy
+
+                   IF ( i == ip )  sort_index = sort_index + 2
+                   IF ( j == jp )  sort_index = sort_index + 1
+
+                   sort_count(sort_index) = sort_count(sort_index) + 1
+                   m = sort_count(sort_index)
+                   sort_agents(m,sort_index) = agents(n)
+                   sort_agents(m,sort_index)%block_nr = sort_index
+                ENDIF
+             ENDDO
+
+             nn = 0
+             DO is = 0,3
+                grid_agents(jp,ip)%start_index(is) = nn + 1
+                DO n = 1,sort_count(is)
+                   nn = nn + 1
+                   agents(nn) = sort_agents(n,is)
+                ENDDO
+                grid_agents(jp,ip)%end_index(is) = nn
+             ENDDO
+
+             number_of_agents = nn
+             agt_count(jp,ip) = number_of_agents
+             DEALLOCATE(sort_agents)
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE mas_ps_sort_in_subboxes
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Move all agents not marked for deletion to lowest indices (packing)
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_ps_pack
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  n  !< agent counter
+       INTEGER(iwp) ::  nn !< number of agents
+!
+!--    Find out elements marked for deletion and move data from highest index
+!--    values to these free indices
+       nn = number_of_agents
+
+       DO WHILE ( .NOT. agents(nn)%agent_mask )
+          nn = nn-1
+          IF ( nn == 0 )  EXIT
+       ENDDO
+
+       IF ( nn > 0 )  THEN
+          DO  n = 1, number_of_agents
+             IF ( .NOT. agents(n)%agent_mask )  THEN
+                agents(n) = agents(nn)
+                nn = nn - 1
+                DO WHILE ( .NOT. agents(nn)%agent_mask )
+                   nn = nn-1
+                   IF ( n == nn )  EXIT
+                ENDDO
+             ENDIF
+             IF ( n == nn )  EXIT
+          ENDDO
+       ENDIF
+
+!
+!--    The number of deleted agents has been determined in routines
+!--    mas_boundary_conds, mas_droplet_collision, and mas_eh_exchange_horiz
+       number_of_agents = nn
+
+    END SUBROUTINE mas_ps_pack 
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sort agents in each sub-grid box into two groups: agents that already
+!> completed the LES timestep, and agents that need further timestepping to
+!> complete the LES timestep.
+!------------------------------------------------------------------------------!
+!    SUBROUTINE mas_ps_sort_timeloop_done
+!
+!       IMPLICIT NONE
+!
+!       INTEGER(iwp) :: end_index     !< agent end index for each sub-box
+!       INTEGER(iwp) :: i             !< index of agent grid box in x-direction
+!       INTEGER(iwp) :: j             !< index of agent grid box in y-direction
+!       INTEGER(iwp) :: n             !< running index for number of agents
+!       INTEGER(iwp) :: nb            !< index of subgrid boux
+!       INTEGER(iwp) :: nf            !< indices for agents in each sub-box that already finalized their substeps
+!       INTEGER(iwp) :: nnf           !< indices for agents in each sub-box that need further treatment
+!       INTEGER(iwp) :: num_finalized !< number of agents in each sub-box that already finalized their substeps
+!       INTEGER(iwp) :: start_index   !< agent start index for each sub-box
+!
+!       TYPE(agent_type), DIMENSION(:), ALLOCATABLE :: sort_agents  !< temporary agent array
+!
+!       DO  i = nxl, nxr
+!          DO  j = nys, nyn
+!
+!             number_of_agents = agt_count(j,i)
+!             IF ( number_of_agents <= 0 )  CYCLE
+!
+!             agents => grid_agents(j,i)%agents(1:number_of_agents)
+!
+!             DO  nb = 0, 3
+!
+!--             Obtain start and end index for each subgrid box
+!                start_index = grid_agents(j,i)%start_index(nb)
+!                end_index   = grid_agents(j,i)%end_index(nb)
+!
+!--             Allocate temporary array used for sorting
+!                ALLOCATE( sort_agents(start_index:end_index) )
+!
+!--             Determine number of agents already completed the LES 
+!--             timestep, and write them into a temporary array
+!                nf = start_index
+!                num_finalized = 0
+!                DO  n = start_index, end_index
+!                   IF ( dt_3d - agents(n)%dt_sum < 1E-8_wp )  THEN
+!                      sort_agents(nf) = agents(n)
+!                      nf              = nf + 1
+!                      num_finalized   = num_finalized + 1
+!                   ENDIF
+!                ENDDO
+!
+!--             Determine number of agents that not completed the LES 
+!--             timestep, and write them into a temporary array
+!                nnf = nf
+!                DO  n = start_index, end_index
+!                   IF ( dt_3d - agents(n)%dt_sum > 1E-8_wp )  THEN
+!                      sort_agents(nnf) = agents(n)
+!                      nnf              = nnf + 1
+!                   ENDIF
+!                ENDDO
+!
+!--             Write back sorted agents
+!                agents(start_index:end_index) =                          &
+!                                        sort_agents(start_index:end_index)
+!
+!--             Determine updated start_index, used to masked already 
+!--             completed agents. 
+!                grid_agents(j,i)%start_index(nb) =                     &
+!                                   grid_agents(j,i)%start_index(nb)    &
+!                                 + num_finalized
+!
+!--             Deallocate dummy array
+!                DEALLOCATE ( sort_agents )
+!
+!--             Finally, if number of non-completed agents is non zero 
+!--             in any of the sub-boxes, set control flag appropriately. 
+!                IF ( nnf > nf )                                             &
+!                   grid_agents(j,i)%time_loop_done = .FALSE.
+!
+!             ENDDO
+!          ENDDO
+!       ENDDO
+!
+!    END SUBROUTINE mas_ps_sort_timeloop_done
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calls social forces calculations
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_timestep_forces_call ( ip, jp )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  ip  !< counter, x-direction
+       INTEGER(iwp) ::  jp  !< counter, y-direction
+       INTEGER(iwp) ::  n   !< loop variable over all agents in a grid box
+
+!
+!--    Get direction for all agents in current grid cell
+       CALL mas_agent_direction
+
+       DO n = 1, number_of_agents
+
+          force_x = 0.0_wp
+          force_y = 0.0_wp
+
+          CALL mas_timestep_social_forces ( 'acceleration', n, ip, jp )
+
+          CALL mas_timestep_social_forces ( 'other_agents', n, ip, jp )
+
+          CALL mas_timestep_social_forces ( 'walls',        n, ip, jp )
+!
+!--       Update forces
+          agents(n)%force_x = force_x
+          agents(n)%force_y = force_y
+       ENDDO
+
+    END SUBROUTINE mas_timestep_forces_call
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Euler timestep of agent transport
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_timestep
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  n !< loop variable over all agents in a grid box
+
+       REAL(wp) ::  abs_v !< absolute value of velocity
+       REAL(wp) ::  abs_f !< absolute value of force
+
+       DO n = 1, number_of_agents
+!
+!--       Limit absolute force to a maximum to prevent unrealistic acceleration
+          abs_f = SQRT((agents(n)%force_x)**2 + (agents(n)%force_y)**2)
+          IF ( abs_f > 20. ) THEN
+             agents(n)%force_x = agents(n)%force_x * 20. / abs_f
+             agents(n)%force_y = agents(n)%force_y * 20. / abs_f
+          ENDIF
+!
+!--       Update agent speed
+          agents(n)%speed_x = agents(n)%speed_x + agents(n)%force_x * dt_agent
+          agents(n)%speed_y = agents(n)%speed_y + agents(n)%force_y * dt_agent
+!
+!--       Reduction of agent speed to maximum agent speed
+          abs_v = SQRT((agents(n)%speed_x)**2 + (agents(n)%speed_y)**2)
+          IF ( abs_v > v_max_agent ) THEN
+             agents(n)%speed_x = agents(n)%speed_x * v_max_agent / abs_v
+             agents(n)%speed_y = agents(n)%speed_y * v_max_agent / abs_v
+          ENDIF
+!
+!--       Update agent position
+          agents(n)%x = agents(n)%x + agents(n)%speed_x * dt_agent
+          agents(n)%y = agents(n)%y + agents(n)%speed_y * dt_agent
+!
+!--       Update absolute value of agent speed
+          agents(n)%speed_abs = abs_v
+!
+!--       Increment the agent age and the total time that the agent
+!--       has advanced within the agent timestep procedure
+          agents(n)%age_m  = agents(n)%age
+          agents(n)%age    = agents(n)%age    + dt_agent
+          agents(n)%dt_sum = agents(n)%dt_sum + dt_agent
+!
+!--       Check whether there is still an agent that has not yet completed 
+!--       the total LES timestep
+          IF ( ( dt_3d - agents(n)%dt_sum ) > 1E-8_wp )  THEN
+             dt_3d_reached_l_mas = .FALSE.
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE mas_timestep
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the Social Forces (Helbing and Molnar, 1995) that the agent
+!> experiences due to acceleration towards target and repulsion by obstacles
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_timestep_social_forces ( mode, nl, ip, jp )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  mode  !< identifier for the mode of calculation
+
+       INTEGER(iwp) ::  ij_dum      !< index of nearest wall
+       INTEGER(iwp) ::  il          !< index variable along x 
+       INTEGER(iwp) ::  ip          !< index variable along x 
+       INTEGER(iwp) ::  jl          !< index variable along y
+       INTEGER(iwp) ::  jp          !< index variable along y
+       INTEGER(iwp) ::  nl          !< loop variable over all agents in a grid box
+       INTEGER(iwp) ::  no          !< loop variable over all agents in a grid box
+       INTEGER(iwp) ::  noa         !< amount of agents in a grid box 
+       INTEGER(iwp) ::  sc_x_end    !< index for scan for topography/other agents
+       INTEGER(iwp) ::  sc_x_start  !< index for scan for topography/other agents
+       INTEGER(iwp) ::  sc_y_end    !< index for scan for topography/other agents
+       INTEGER(iwp) ::  sc_y_start  !< index for scan for topography/other agents
+
+       LOGICAL ::  corner_found  !< flag that indicates a corner has been found near agent
+
+       REAL(wp) ::  a_pl             !< factor for collision avoidance
+       REAL(wp) ::  ax_semimaj       !< semiminor axis of repulsive ellipse
+       REAL(wp) ::  b_pl             !< factor for collision avoidance
+       REAL(wp) ::  c_pl             !< factor for collision avoidance
+       REAL(wp) ::  coll_t           !< time at which the next collision would happen
+       REAL(wp) ::  d_coll_t_0       !< inverse of collision cutoff time
+       REAL(wp) ::  d_pl             !< factor for collision avoidance
+       REAL(wp) ::  ddum_f           !< dummy devisor collision avoidance
+       REAL(wp) ::  dist             !< distance to obstacle
+       REAL(wp) ::  dist_sq          !< distance to obstacle squared
+       REAL(wp) ::  pos_rel_x        !< relative position of two agents (x)
+       REAL(wp) ::  pos_rel_y        !< relative position of two agents (y)
+       REAL(wp) ::  r_sq             !< y-position
+       REAL(wp) ::  sra              !< scan radius (agents)
+       REAL(wp) ::  srw              !< local variable for scan radius (walls)
+       REAL(wp) ::  v_rel_x          !< relative velocity (x); collision avoidance
+       REAL(wp) ::  v_rel_y          !< relative velocity (y); collision avoidance
+       REAL(wp) ::  x_a              !< x-position
+       REAL(wp) ::  x_wall           !< x-position of wall
+       REAL(wp) ::  y_a              !< y-position
+       REAL(wp) ::  y_wall           !< y-position of wall
+
+       REAL(wp), PARAMETER ::  k_pl = 1.5  !< factor for collision avoidance
+
+       TYPE(agent_type), DIMENSION(:), POINTER ::  l_agts !< agents that repulse current agent
+
+!
+!--    Initialization
+       x_a = agents(nl)%x
+       y_a = agents(nl)%y
+
+       SELECT CASE ( TRIM( mode ) )
+!
+!--       Calculation of force due to agent trying to approach desired velocity
+          CASE ( 'acceleration' )
+
+             force_x = force_x + d_tau_accel_agent                             &
+                          * ( agents(nl)%speed_des*agents(nl)%speed_e_x        &
+                             -agents(nl)%speed_x )
+
+             force_y = force_y + d_tau_accel_agent                             &
+                          * ( agents(nl)%speed_des*agents(nl)%speed_e_y        &
+                             -agents(nl)%speed_y )
+
+!
+!--       Calculation of repulsive forces by other agents in a radius around the
+!--       current one
+          CASE ( 'other_agents' )
+
+             sra = scan_radius_agent
+             d_coll_t_0 = 1./coll_t_0
+!
+!--          Find relevant gridboxes (those that could contain agents within
+!--          scan radius)
+             sc_x_start = FLOOR( (x_a - sra) * ddx )
+             sc_x_end   = FLOOR( (x_a + sra) * ddx )
+             sc_y_start = FLOOR( (y_a - sra) * ddx )
+             sc_y_end   = FLOOR( (y_a + sra) * ddx )
+             IF ( sc_x_start < nxlg ) sc_x_start = nxlg
+             IF ( sc_x_end   > nxrg ) sc_x_end   = nxrg
+             IF ( sc_y_start < nysg ) sc_y_start = nysg
+             IF ( sc_y_end   > nyng ) sc_y_end   = nyng
+
+             sra = sra**2
+!
+!--          Loop over all previously found relevant gridboxes
+             DO il = sc_x_start, sc_x_end
+                DO jl = sc_y_start, sc_y_end
+                   noa = agt_count(jl,il)
+                   IF ( noa <= 0 )  CYCLE
+                   l_agts => grid_agents(jl,il)%agents(1:noa)
+                   DO no = 1, noa
+!
+!--                   Skip self
+                      IF ( jl == jp .AND. il == ip .AND. no == nl ) CYCLE
+                      pos_rel_x = l_agts(no)%x - x_a
+                      pos_rel_y = l_agts(no)%y - y_a
+                      dist_sq = pos_rel_x**2 + pos_rel_y**2
+                      IF ( dist_sq > sra ) CYCLE
+                      r_sq    = (2*radius_agent)**2
+                      v_rel_x   = agents(nl)%speed_x - l_agts(no)%speed_x
+                      v_rel_y   = agents(nl)%speed_y - l_agts(no)%speed_y
+!
+!--                   Collision is already occuring, default to standard
+!--                   social forces
+                      IF ( dist_sq <= r_sq ) THEN
+                         dist = SQRT(dist_sq) + 1.0d-12
+                         ax_semimaj = .5_wp*SQRT( dist )
+
+                         force_x = force_x - 0.125_wp * repuls_agent           &
+                                        * d_sigma_rep_agent / ax_semimaj       &
+                                        * EXP( -ax_semimaj*d_sigma_rep_agent ) &
+                                        * (pos_rel_x/dist)
+
+                         force_y = force_y - 0.125_wp * repuls_agent           &
+                                        * d_sigma_rep_agent / ax_semimaj       &
+                                        * EXP( -ax_semimaj*d_sigma_rep_agent ) &
+                                        * (pos_rel_y/dist)
+!
+!--                   Currently no collision, calculate collision avoidance
+!--                   force according to Karamouzas et al (2014, PRL 113,238701)
+                      ELSE
+!
+!--                     factors
+                         a_pl = v_rel_x**2 +  v_rel_y**2
+                         b_pl = pos_rel_x*v_rel_x + pos_rel_y*v_rel_y
+                         c_pl = dist_sq - r_sq
+                         d_pl = b_pl**2 - a_pl*c_pl
+!
+!--                      If the two agents are moving non-parallel, calculate
+!--                      collision avoidance social force
+                         IF ( d_pl > 0.0_wp .AND.                              &
+                            ( a_pl < -0.00001 .OR. a_pl > 0.00001 ) )          &
+                         THEN
+
+                            d_pl   = SQRT(d_pl)
+                            coll_t = (b_pl - d_pl)/a_pl
+                            IF ( coll_t > 0.0_wp ) THEN
+!
+!--                            Dummy factor
+                               ddum_f = 1. / ( a_pl * coll_t**2 )              &
+                                           * ( 2. / coll_t + 1.0 * d_coll_t_0 )
+!
+!--                            x-component of social force
+                               force_x = force_x - k_pl *                      &
+                                         EXP( -coll_t * d_coll_t_0 ) *         &
+                                         ( v_rel_x -                           &
+                                           ( b_pl * v_rel_x -                  &
+                                             a_pl * pos_rel_x ) / d_pl ) *     &
+                                         ddum_f
+!
+!--                            y-component of social force
+                               force_y = force_y - k_pl *                      &
+                                         EXP( -coll_t * d_coll_t_0 ) *         &
+                                         ( v_rel_y -                           &
+                                           ( b_pl * v_rel_y -                  &
+                                             a_pl * pos_rel_y ) / d_pl ) *     &
+                                         ddum_f
+
+                            ENDIF
+                         ENDIF
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          CASE ( 'walls' )
+
+             srw = scan_radius_wall
+             corner_found = .FALSE.
+!
+!--          find relevant grid boxes (those that could contain topography
+!--          within radius)
+             sc_x_start = (x_a - srw) * ddx
+             sc_x_end   = (x_a + srw) * ddx
+             sc_y_start = (y_a - srw) * ddx
+             sc_y_end   = (y_a + srw) * ddx
+             IF ( sc_x_start < nxlg ) sc_x_start = nxlg
+             IF ( sc_x_end   > nxrg ) sc_x_end   = nxrg
+             IF ( sc_y_start < nysg ) sc_y_start = nysg
+             IF ( sc_y_end   > nyng ) sc_y_end   = nyng
+!
+!--          Find "walls" ( i.e. topography steps (up or down) higher than one
+!--          grid box ) that are perpendicular to the agent within the defined
+!--          search radius. Such obstacles cannot be passed and a social force
+!--          to that effect is applied.
+!--          Walls only apply a force perpendicular to the wall to the agent.
+!--          There is therefore a search for walls directly right, left, south 
+!--          and north of the agent. All other walls are ignored.
+!--
+!--          Check for wall left of current agent
+             ij_dum = 0
+             IF ( sc_x_start < ip ) THEN
+                DO il = ip - 1, sc_x_start, -1
+!
+!--                Going left from the agent, check for a right wall
+                   IF ( BTEST( obstacle_flags(jp,il), 2 ) ) THEN
+!
+!--                   obstacle found in grid box il, wall at right side
+                      x_wall = (il+1)*dx
+!
+!--                   Calculate force of found wall on agent
+                      CALL mas_timestep_wall_corner_force( x_a, x_wall, y_a,   &
+                                                           y_a )
+!
+!--                   calculate new x starting index for later scan for corners
+                      ij_dum = il + 1
+                      EXIT
+                   ENDIF
+                ENDDO
+             ENDIF
+             IF ( ij_dum /= 0 ) sc_x_start = ij_dum 
+
+!
+!--          Check for wall right of current agent
+             ij_dum = 0
+             IF ( sc_x_end > ip ) THEN
+                DO il = ip + 1, sc_x_end
+!
+!--                Going right from the agent, check for a left wall
+                   IF ( BTEST( obstacle_flags(jp,il), 6 ) ) THEN
+!
+!--                   obstacle found in grid box il, wall at left side
+                      x_wall = il*dx
+!
+!--                   Calculate force of found wall on agent
+                      CALL mas_timestep_wall_corner_force( x_a, x_wall, y_a,   &
+                                                           y_a )
+!
+!--                   calculate new x end index for later scan for corners
+                      ij_dum = il - 1
+                      EXIT
+                   ENDIF
+                ENDDO
+             ENDIF
+             IF ( ij_dum /= 0 ) sc_x_end = ij_dum 
+
+!
+!--          Check for wall south of current agent
+             ij_dum = 0
+             IF ( sc_y_start < jp ) THEN
+                DO jl = jp - 1, sc_y_start, -1
+!
+!--                Going south from the agent, check for a north wall
+                   IF ( BTEST( obstacle_flags(jl,ip), 0 ) ) THEN
+!
+!--                   obstacle found in grid box jl, wall at left side
+                      y_wall = (jl+1)*dy
+
+                      CALL mas_timestep_wall_corner_force( x_a, x_a, y_a,      &
+                                                           y_wall )
+!
+!--                   calculate new y starting index for later scan for corners
+                      ij_dum = jl + 1
+                      EXIT
+                   ENDIF
+                ENDDO
+             ENDIF
+             IF ( ij_dum /= 0 ) sc_y_start = ij_dum 
+
+!
+!--          Check for wall north of current agent
+             ij_dum = 0
+             IF ( sc_y_end > jp ) THEN
+                DO jl = jp + 1, sc_y_end 
+!
+!--                Going north from the agent, check for a south wall
+                   IF ( BTEST( obstacle_flags(jl,ip), 4 ) ) THEN
+!
+!--                   obstacle found in grid box jl, wall at left side
+                      y_wall = jl*dy
+
+                      CALL mas_timestep_wall_corner_force( x_a, x_a, y_a,      &
+                                                           y_wall )
+!
+!--                   calculate new y end index for later scan for corners
+                      ij_dum = jl - 1
+                   ENDIF
+                ENDDO
+             ENDIF
+             IF ( ij_dum /= 0 ) sc_y_end = ij_dum 
+
+!
+!--          Scan for corners surrounding current agent.
+!--          Only gridcells that are closer than the closest wall in each
+!--          direction (n,s,r,l) are considered in the search since those
+!--          further away would have a significantly smaller resulting force
+!--          than the closer wall. 
+             DO il = sc_x_start, sc_x_end
+                DO jl = sc_y_start, sc_y_end
+                   IF ( il == ip .OR. jl == jp ) CYCLE
+!
+!--                corners left of agent
+                   IF ( il < ip ) THEN
+!
+!--                   south left quadrant: look for north right corner
+                      IF ( jl < jp ) THEN
+                         IF ( BTEST( obstacle_flags(jl,il), 1 ) ) THEN
+!
+!--                         calculate coordinates of the found corner
+                            x_wall = (il+1)*dx
+                            y_wall = (jl+1)*dy
+
+                            CALL mas_timestep_wall_corner_force( x_a, x_wall,  &
+                                                                 y_a, y_wall )
+
+                         ENDIF
+!
+!--                   north left quadrant: look for south right corner
+                      ELSEIF ( jl > jp ) THEN
+                         IF ( BTEST( obstacle_flags(jl,il), 3 ) ) THEN
+!
+!--                         calculate coordinates of the corner of said gridcell
+!--                         that is closest to the current agent
+                            x_wall = (il+1)*dx
+                            y_wall = jl*dy
+
+                            CALL mas_timestep_wall_corner_force( x_a, x_wall,  &
+                                                                 y_a, y_wall )
+
+                         ENDIF
+                      ENDIF
+                   ELSEIF ( il > ip ) THEN
+!
+!--                   south right quadrant: look for north left corner
+                      IF ( jl < jp ) THEN
+                         IF ( BTEST( obstacle_flags(jl,il), 7 ) ) THEN
+!
+!--                         calculate coordinates of the corner of said gridcell
+!--                         that is closest to the current agent
+                            x_wall = il*dx
+                            y_wall = (jl+1)*dy
+
+                            CALL mas_timestep_wall_corner_force( x_a, x_wall,  &
+                                                                 y_a, y_wall )
+
+                         ENDIF
+!
+!--                   north right quadrant: look for south left corner
+                      ELSEIF ( jl > jp ) THEN
+                         IF ( BTEST( obstacle_flags(jl,il), 5 ) ) THEN
+!
+!--                         calculate coordinates of the corner of said gridcell
+!--                         that is closest to the current agent
+                            x_wall = il*dx
+                            y_wall = jl*dy
+
+                            CALL mas_timestep_wall_corner_force( x_a, x_wall,  &
+                                                                 y_a, y_wall )
+
+                         ENDIF
+                      ENDIF
+                   ENDIF
+                ENDDO
+             ENDDO
+
+          CASE DEFAULT
+
+       END SELECT
+
+    END SUBROUTINE mas_timestep_social_forces
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Given a distance to the current agent, calculates the force a found corner
+!> or wall exerts on that agent
+!------------------------------------------------------------------------------!
+    SUBROUTINE mas_timestep_wall_corner_force( xa, xw, ya, yw )
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  dist_l     !< distance to obstacle
+       REAL(wp) ::  force_d_x  !< increment of social force, x-direction
+       REAL(wp) ::  force_d_y  !< increment of social force, x-direction
+       REAL(wp) ::  xa         !< x-position of agent
+       REAL(wp) ::  xw         !< x-position of wall
+       REAL(wp) ::  ya         !< x-position of agent
+       REAL(wp) ::  yw         !< y-position of wall
+
+       force_d_x = 0.0_wp
+       force_d_y = 0.0_wp
+!
+!--    calculate coordinates of corner relative to agent 
+!--    postion and distance between corner and agent
+       xw = xa - xw
+       yw = ya - yw
+       dist_l = SQRT( (xw)**2 + (yw)**2 )
+!
+!--    calculate x and y component of repulsive force 
+!--    induced by previously found corner
+       IF ( dist_l > 0 ) THEN
+          force_d_x = repuls_wall * d_sigma_rep_wall         &
+                      * EXP( -dist_l * d_sigma_rep_wall )      &
+                      * xw / (dist_l)
+          force_d_y = repuls_wall * d_sigma_rep_wall         &
+                      * EXP( -dist_l * d_sigma_rep_wall )      &
+                      * yw / (dist_l)
+       ENDIF
+
+! !--    forces that are located outside of a sight radius of 
+! !--    200Â° (-> COS(100./180.*pi) = COS(.555*pi)) of
+! !--    current agent are considered to have an effect of 50%
+!        IF ( force_d_x * agents(nl)%speed_e_x +               &
+!             force_d_y * agents(nl)%speed_e_y <               &
+!             SQRT(force_d_x**2 + force_d_y**2) *              &
+!             COS( .55555555 * 3.1415 ) )                      &
+!        THEN
+!           force_d_x = force_d_x * .5_wp
+!           force_d_y = force_d_y * .5_wp
+!        ENDIF
+
+!
+!--    add force increment to total force of current agent
+       force_x = force_x + force_d_x
+       force_y = force_y + force_d_y
+
+    END SUBROUTINE mas_timestep_wall_corner_force
+
+!
+!-- Calculates distance of point P to edge (A,B). If A = B, calculates
+!-- point-to-point distance from A/B to P
+    FUNCTION dist_point_to_edge ( a_x, a_y, b_x, b_y, p_x, p_y )
+
+       IMPLICIT NONE
+
+       REAL(wp)  :: ab_x                !< x-coordinate of vector from A to B
+       REAL(wp)  :: ab_y                !< y-coordinate of vector from A to B
+       REAL(wp)  :: ab_d                !< inverse length of vector from A to B
+       REAL(wp)  :: ab_u_x              !< x-coordinate of vector with direction of ab and length 1
+       REAL(wp)  :: ab_u_y              !< y-coordinate of vector with direction of ab and length 1
+       REAL(wp)  :: ba_x                !< x-coordinate of vector from B to A
+       REAL(wp)  :: ba_y                !< y-coordinate of vector from B to A
+       REAL(wp)  :: ap_x                !< x-coordinate of vector from A to P
+       REAL(wp)  :: ap_y                !< y-coordinate of vector from A to P
+       REAL(wp)  :: bp_x                !< x-coordinate of vector from B to P
+       REAL(wp)  :: bp_y                !< y-coordinate of vector from B to P
+       REAL(wp)  :: a_x                 !< x-coordinate of point A of edge
+       REAL(wp)  :: a_y                 !< y-coordinate of point A of edge
+       REAL(wp)  :: b_x                 !< x-coordinate of point B of edge
+       REAL(wp)  :: b_y                 !< y-coordinate of point B of edge
+       REAL(wp)  :: p_x                 !< x-coordinate of point P
+       REAL(wp)  :: p_y                 !< y-coordinate of point P
+       REAL(wp)  :: dist_x              !< x-coordinate of point P
+       REAL(wp)  :: dist_y              !< y-coordinate of point P
+       REAL(wp)  :: dist_point_to_edge  !< y-coordinate of point P
+
+       ab_x = - a_x + b_x
+       ab_y = - a_y + b_y
+       ba_x = - b_x + a_x 
+       ba_y = - b_y + a_y 
+       ap_x = - a_x + p_x
+       ap_y = - a_y + p_y
+       bp_x = - b_x + p_x
+       bp_y = - b_y + p_y
+
+       IF ( ab_x * ap_x + ab_y * ap_y <= 0. ) THEN
+          dist_point_to_edge = SQRT((a_x - p_x)**2 + (a_y - p_y)**2)
+       ELSEIF ( ba_x * bp_x + ba_y * bp_y <= 0. ) THEN
+          dist_point_to_edge = SQRT((b_x - p_x)**2 + (b_y - p_y)**2)
+       ELSE
+          ab_d = 1./SQRT((ab_x)**2+(ab_y)**2)
+          ab_u_x = ab_x*ab_d
+          ab_u_y = ab_y*ab_d
+          dist_x = ap_x - (ap_x*ab_u_x+ap_y*ab_u_y)*ab_u_x
+          dist_y = ap_y - (ap_x*ab_u_x+ap_y*ab_u_y)*ab_u_y
+          dist_point_to_edge = SQRT( dist_x**2 + dist_y**2 )
+       ENDIF
+
+    END FUNCTION dist_point_to_edge
+
+!
+!-- Returns the heuristic between points A and B (currently the straight 
+!-- distance)
+    FUNCTION heuristic ( ax, ay, bx, by )
+
+       IMPLICIT NONE
+
+       REAL(wp)  :: ax           !< x-coordinate of point A
+       REAL(wp)  :: ay           !< y-coordinate of point A
+       REAL(wp)  :: bx           !< x-coordinate of point B
+       REAL(wp)  :: by           !< y-coordinate of point B
+       REAL(wp)  :: heuristic    !< return value
+
+       heuristic = SQRT(( ax - bx )**2 + ( ay - by )**2)
+
+    END FUNCTION heuristic 
+
+!
+!-- Calculates if point P is left of the infinite
+!-- line that contains A and B (direction: A to B) 
+!-- Concept: 2D rotation of two vectors
+    FUNCTION is_left ( ax, ay, bx, by, px, py )
+
+       IMPLICIT NONE
+
+       LOGICAL  :: is_left !< return value; TRUE if P is left of AB
+
+       REAL(wp)  :: ax     !< x-coordinate of point A
+       REAL(wp)  :: ay     !< y-coordinate of point A
+       REAL(wp)  :: bx     !< x-coordinate of point B
+       REAL(wp)  :: by     !< y-coordinate of point B
+       REAL(wp)  :: px     !< x-coordinate of point P
+       REAL(wp)  :: py     !< y-coordinate of point P
+
+       is_left = (bx-ax)*(py-ay)-(px-ax)*(by-ay) > 0
+       IF ( (ABS(ax-px) < .001 .AND. ABS(ay-py) < .001) .OR.                  &
+            (ABS(bx-px) < .001 .AND. ABS(by-py) < .001) )                     &
+       THEN
+          is_left = .FALSE.
+       ENDIF
+
+       RETURN
+
+    END FUNCTION is_left 
+
+!
+!-- Calculates if point P is right of the infinite
+!-- line that contains A and B (direction: A to B) 
+!-- Concept: 2D rotation of two vectors
+    FUNCTION is_right ( ax, ay, bx, by, px, py )
+
+       IMPLICIT NONE
+
+       LOGICAL  :: is_right !< return value; TRUE if P is right of AB
+
+       REAL(wp), INTENT(IN)  :: ax     !< x-coordinate of point A
+       REAL(wp), INTENT(IN)  :: ay     !< y-coordinate of point A
+       REAL(wp), INTENT(IN)  :: bx     !< x-coordinate of point B
+       REAL(wp), INTENT(IN)  :: by     !< y-coordinate of point B
+       REAL(wp), INTENT(IN)  :: px     !< x-coordinate of point P
+       REAL(wp), INTENT(IN)  :: py     !< y-coordinate of point P
+
+       is_right = (bx-ax)*(py-ay)-(px-ax)*(by-ay) < 0
+       IF ( (ABS(ax-px) < .001 .AND. ABS(ay-py) < .001) .OR.                  &
+            (ABS(bx-px) < .001 .AND. ABS(by-py) < .001) )                     &
+       THEN
+          is_right = .FALSE.
+       ENDIF
+
+       RETURN
+
+    END FUNCTION is_right 
+
+!
+!-- Returns true if the line segments AB and PQ share an intersection
+    FUNCTION intersect ( ax, ay, bx, by, px, py, qx, qy )
+
+       IMPLICIT NONE
+
+       LOGICAL  :: intersect !< return value; TRUE if intersection was found
+       LOGICAL  :: la        !< T if a is left of PQ
+       LOGICAL  :: lb        !< T if b is left of PQ
+       LOGICAL  :: lp        !< T if p is left of AB
+       LOGICAL  :: lq        !< T if q is left of AB
+       LOGICAL  :: poss      !< flag that indicates if an intersection is still possible
+       LOGICAL  :: ra        !< T if a is right of PQ
+       LOGICAL  :: rb        !< T if b is right of PQ
+       LOGICAL  :: rp        !< T if p is right of AB
+       LOGICAL  :: rq        !< T if q is right of AB
+
+       REAL(wp)  :: ax     !< x-coordinate of point A
+       REAL(wp)  :: ay     !< y-coordinate of point A
+       REAL(wp)  :: bx     !< x-coordinate of point B
+       REAL(wp)  :: by     !< y-coordinate of point B
+       REAL(wp)  :: px     !< x-coordinate of point P
+       REAL(wp)  :: py     !< y-coordinate of point P
+       REAL(wp)  :: qx     !< x-coordinate of point Q
+       REAL(wp)  :: qy     !< y-coordinate of point Q
+
+       intersect = .FALSE.
+       poss      = .FALSE.
+!
+!--    Intersection is possible only if P and Q are on opposing sides of AB
+       lp = is_left(ax,ay,bx,by,px,py)
+       rq = is_right(ax,ay,bx,by,qx,qy)
+       IF ( lp .AND. rq ) poss = .TRUE.
+       IF ( .NOT. poss ) THEN
+          lq = is_left(ax,ay,bx,by,qx,qy)
+          rp = is_right(ax,ay,bx,by,px,py)
+          IF ( lq .AND. rp ) poss = .TRUE.
+       ENDIF
+!
+!--    Intersection occurs only if above test (poss) was true AND
+!--    A and B are on opposing sides of PQ
+       IF ( poss ) THEN
+          la = is_left(px,py,qx,qy,ax,ay)
+          rb = is_right(px,py,qx,qy,bx,by)
+          IF ( la .AND. rb ) intersect = .TRUE.
+          IF ( .NOT. intersect ) THEN
+             lb = is_left(px,py,qx,qy,bx,by)
+             ra = is_right(px,py,qx,qy,ax,ay)
+             IF ( lb .AND. ra ) intersect = .TRUE.
+          ENDIF
+       ENDIF
+
+       RETURN
+
+    END FUNCTION intersect 
+
+!
+!-- Gives a nuber randomly distributed around an average
+    FUNCTION random_normal ( avg, variation )
+
+       IMPLICIT NONE
+
+       REAL(wp)  :: avg            !< x-coordinate of vector from A to B
+       REAL(wp)  :: variation      !< y-coordinate of vector from A to B
+       REAL(wp)  :: random_normal  !< y-coordinate of vector from A to B
+
+       REAL(wp), DIMENSION(12)  :: random_arr  !< inverse length of vector from A to B
+
+       CALL RANDOM_NUMBER(random_arr)
+       random_normal = avg + variation*(SUM(random_arr)-6.)
+
+    END FUNCTION random_normal
+
+
+ END MODULE multi_agent_system_mod
Index: /palm/tags/release-6.0/SOURCE/nesting_offl_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/nesting_offl_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/nesting_offl_mod.f90	(revision 3477)
@@ -0,0 +1,1107 @@
+!> @file nesting_offl_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Keyword ID set
+! 
+! 3404 2018-10-23 13:29:11Z suehring
+! Consider time-dependent geostrophic wind components in offline nesting
+! 
+! 
+! Initial Revision: 
+! - separate offline nesting from large_scale_nudging_mod
+! - revise offline nesting, adjust for usage of synthetic turbulence generator
+! - adjust Rayleigh damping depending on the time-depending atmospheric
+!   conditions
+! 
+! 
+! Description:
+! ------------
+!> Offline nesting in larger-scale models. Boundary conditions for the simulation
+!> are read from NetCDF file and are prescribed onto the respective arrays.
+!> Further, a mass-flux correction is performed to maintain the mass balance. 
+!--------------------------------------------------------------------------------!
+ MODULE nesting_offl_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, e, diss, pt, pt_init, q, q_init, s, u, u_init, ug, v,      &
+               v_init, vg, w, zu, zw          
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
+               dt_3d, dz, constant_diffusion, humidity, message_string,        &
+               nesting_offline, neutral, passive_scalar, rans_mode, rans_tke_e,&
+               time_since_reference_point, volume_flow
+               
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE grid_variables
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxlu, nxr, nxrg, ny, nys,                  &
+               nysv, nysg, nyn, nyng, nzb, nz, nzt, wall_flags_0
+
+    USE kinds
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  nest_offl
+        
+    USE pegrid
+
+    REAL(wp) ::  zi_ribulk = 0.0_wp  !< boundary-layer depth according to bulk Richardson criterion, i.e. the height where Ri_bulk exceeds the critical
+                                     !< bulk Richardson number of 0.25
+    
+    SAVE
+    PRIVATE
+!
+!-- Public subroutines
+    PUBLIC nesting_offl_bc, nesting_offl_header, nesting_offl_init,            &
+           nesting_offl_mass_conservation, nesting_offl_parin 
+!
+!-- Public variables
+    PUBLIC zi_ribulk   
+
+    INTERFACE nesting_offl_bc
+       MODULE PROCEDURE nesting_offl_bc
+    END INTERFACE nesting_offl_bc
+    
+    INTERFACE nesting_offl_header
+       MODULE PROCEDURE nesting_offl_header
+    END INTERFACE nesting_offl_header
+    
+    INTERFACE nesting_offl_init
+       MODULE PROCEDURE nesting_offl_init
+    END INTERFACE nesting_offl_init
+           
+    INTERFACE nesting_offl_mass_conservation
+       MODULE PROCEDURE nesting_offl_mass_conservation
+    END INTERFACE nesting_offl_mass_conservation
+    
+    INTERFACE nesting_offl_parin
+       MODULE PROCEDURE nesting_offl_parin
+    END INTERFACE nesting_offl_parin
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> In this subroutine a constant mass within the model domain is guaranteed. 
+!> Larger-scale models may be based on a compressible equation system, which is
+!> not consistent with PALMs incompressible equation system. In order to avoid
+!> a decrease or increase of mass during the simulation, non-divergent flow
+!> through the lateral and top boundaries is compensated by the vertical wind 
+!> component at the top boundary. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE nesting_offl_mass_conservation
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !< grid index in x-direction
+       INTEGER(iwp) ::  j !< grid index in y-direction
+       INTEGER(iwp) ::  k !< grid index in z-direction
+
+       REAL(wp) ::  d_area_t                        !< inverse of the total area of the horizontal model domain
+       REAL(wp) ::  w_correct                       !< vertical velocity increment required to compensate non-divergent flow through the boundaries
+       REAL(wp), DIMENSION(1:3) ::  volume_flow_l   !< local volume flow
+
+       
+       CALL  cpu_log( log_point(58), 'offline nesting', 'start' )
+       
+       volume_flow   = 0.0_wp
+       volume_flow_l = 0.0_wp
+
+       d_area_t = 1.0_wp / ( ( nx + 1 ) * dx * ( ny + 1 ) * dy )
+
+       IF ( bc_dirichlet_l )  THEN
+          i = nxl
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                volume_flow_l(1) = volume_flow_l(1) + u(k,j,i) * dzw(k) * dy   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+       IF ( bc_dirichlet_r )  THEN
+          i = nxr+1
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                volume_flow_l(1) = volume_flow_l(1) - u(k,j,i) * dzw(k) * dy   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+       IF ( bc_dirichlet_s )  THEN
+          j = nys
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                volume_flow_l(2) = volume_flow_l(2) + v(k,j,i) * dzw(k) * dx   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+       IF ( bc_dirichlet_n )  THEN
+          j = nyn+1
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                volume_flow_l(2) = volume_flow_l(2) - v(k,j,i) * dzw(k) * dx   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Top boundary
+       k = nzt
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             volume_flow_l(3) = volume_flow_l(3) - w(k,j,i) * dx * dy
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( volume_flow_l, volume_flow, 3, MPI_REAL, MPI_SUM,      &
+                           comm2d, ierr )
+#else
+       volume_flow = volume_flow_l
+#endif
+
+       w_correct = SUM( volume_flow ) * d_area_t
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzt, nzt + 1
+                w(k,j,i) = w(k,j,i) + w_correct
+             ENDDO
+          ENDDO
+       ENDDO
+       
+       CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
+
+    END SUBROUTINE nesting_offl_mass_conservation
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Set the lateral and top boundary conditions in case the PALM domain is 
+!> nested offline in a mesoscale model. Further, average boundary data and
+!> determine mean profiles, further used for correct damping in the sponge
+!> layer. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE nesting_offl_bc                     
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !< running index x-direction
+       INTEGER(iwp) ::  j !< running index y-direction
+       INTEGER(iwp) ::  k !< running index z-direction
+
+       REAL(wp) ::  fac_dt   !< interpolation factor
+       
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  pt_ref   !< reference profile for potential temperature
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  pt_ref_l !< reference profile for potential temperature on subdomain
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  q_ref    !< reference profile for mixing ratio on subdomain
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  q_ref_l  !< reference profile for mixing ratio on subdomain
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  u_ref    !< reference profile for u-component on subdomain
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  u_ref_l  !< reference profile for u-component on subdomain
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  v_ref    !< reference profile for v-component on subdomain
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  v_ref_l  !< reference profile for v-component on subdomain
+       
+       CALL  cpu_log( log_point(58), 'offline nesting', 'start' )      
+!
+!--    Set mean profiles, derived from boundary data, to zero
+       pt_ref   = 0.0_wp
+       q_ref    = 0.0_wp
+       u_ref    = 0.0_wp
+       v_ref    = 0.0_wp
+       
+       pt_ref_l = 0.0_wp
+       q_ref_l  = 0.0_wp
+       u_ref_l  = 0.0_wp
+       v_ref_l  = 0.0_wp
+!
+!--    Determine interpolation factor and limit it to 1. This is because
+!--    t+dt can slightly exceed time(tind_p) before boundary data is updated 
+!--    again. 
+       fac_dt = ( time_since_reference_point - nest_offl%time(nest_offl%tind)  &
+                + dt_3d ) /                                                    &
+           ( nest_offl%time(nest_offl%tind_p) - nest_offl%time(nest_offl%tind) )
+       fac_dt = MIN( 1.0_wp, fac_dt )
+!
+!--    Set boundary conditions of u-, v-, w-component, as well as q, and pt.
+!--    Note, boundary values at the left boundary: i=-1 (v,w,pt,q) and 
+!--    i=0 (u), at the right boundary: i=nxr+1 (all), at the south boundary:
+!--    j=-1 (u,w,pt,q) and j=0 (v), at the north boundary: j=nyn+1 (all).
+!--    Please note, at the left (for u) and south (for v) boundary, values 
+!--    for u and v are set also at i/j=-1, since these values are used in 
+!--    boundary_conditions() to restore prognostic values.
+!--    Further, sum up data to calculate mean profiles from boundary data, 
+!--    used for Rayleigh damping. 
+       IF ( bc_dirichlet_l )  THEN
+
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                u(k,j,0) = interpolate_in_time( nest_offl%u_left(0,k,j),       &
+                                                nest_offl%u_left(1,k,j),       &
+                                                fac_dt ) *                     &
+                             MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,0), 1 ) )
+                u(k,j,-1) = u(k,j,0)
+             ENDDO
+             u_ref_l(nzb+1:nzt) = u_ref_l(nzb+1:nzt) + u(nzb+1:nzt,j,0)
+          ENDDO
+
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt-1
+                w(k,j,-1) = interpolate_in_time( nest_offl%w_left(0,k,j),      &
+                                                 nest_offl%w_left(1,k,j),      &
+                                                 fac_dt ) *                    &
+                            MERGE( 1.0_wp, 0.0_wp,                             &
+                                   BTEST( wall_flags_0(k,j,-1), 3 ) )
+             ENDDO
+          ENDDO
+
+          DO  j = nysv, nyn
+             DO  k = nzb+1, nzt
+                v(k,j,-1) = interpolate_in_time( nest_offl%v_left(0,k,j),      &
+                                                 nest_offl%v_left(1,k,j),      &
+                                                 fac_dt ) *                    &
+                               MERGE( 1.0_wp, 0.0_wp,                          &
+                                      BTEST( wall_flags_0(k,j,-1), 2 ) )
+             ENDDO
+             v_ref_l(nzb+1:nzt) = v_ref_l(nzb+1:nzt) + v(nzb+1:nzt,j,-1)
+          ENDDO
+
+          IF ( .NOT. neutral )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   pt(k,j,-1) = interpolate_in_time( nest_offl%pt_left(0,k,j), &
+                                                     nest_offl%pt_left(1,k,j), &
+                                                     fac_dt )
+ 
+                ENDDO
+                pt_ref_l(nzb+1:nzt) = pt_ref_l(nzb+1:nzt) + pt(nzb+1:nzt,j,-1)
+             ENDDO
+          ENDIF
+
+          IF ( humidity )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   q(k,j,-1) = interpolate_in_time( nest_offl%q_left(0,k,j),   &
+                                                    nest_offl%q_left(1,k,j),   &
+                                                    fac_dt )
+ 
+                ENDDO
+                q_ref_l(nzb+1:nzt) = q_ref_l(nzb+1:nzt) + q(nzb+1:nzt,j,-1)
+             ENDDO
+          ENDIF
+
+       ENDIF
+
+       IF ( bc_dirichlet_r )  THEN
+
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                u(k,j,nxr+1) = interpolate_in_time( nest_offl%u_right(0,k,j),  &
+                                                    nest_offl%u_right(1,k,j),  &
+                                                    fac_dt ) *                 &
+                             MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,nxr+1), 1 ) )
+             ENDDO
+             u_ref_l(nzb+1:nzt) = u_ref_l(nzb+1:nzt) + u(nzb+1:nzt,j,nxr+1)
+          ENDDO
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt-1
+                w(k,j,nxr+1) = interpolate_in_time( nest_offl%w_right(0,k,j),  &
+                                                    nest_offl%w_right(1,k,j),  &
+                                                    fac_dt ) *                 &
+                             MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,nxr+1), 3 ) )
+             ENDDO
+          ENDDO
+
+          DO  j = nysv, nyn
+             DO  k = nzb+1, nzt
+                v(k,j,nxr+1) = interpolate_in_time( nest_offl%v_right(0,k,j),  &
+                                                    nest_offl%v_right(1,k,j),  &
+                                                    fac_dt ) *                 &
+                             MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,nxr+1), 2 ) )
+             ENDDO
+             v_ref_l(nzb+1:nzt) = v_ref_l(nzb+1:nzt) + v(nzb+1:nzt,j,nxr+1)
+          ENDDO
+
+          IF ( .NOT. neutral )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   pt(k,j,nxr+1) = interpolate_in_time(                        &
+                                                  nest_offl%pt_right(0,k,j),   &
+                                                  nest_offl%pt_right(1,k,j),   &
+                                                  fac_dt )
+                ENDDO
+                pt_ref_l(nzb+1:nzt) = pt_ref_l(nzb+1:nzt) + pt(nzb+1:nzt,j,nxr+1)
+             ENDDO
+          ENDIF
+
+          IF ( humidity )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   q(k,j,nxr+1) = interpolate_in_time(                         &
+                                                  nest_offl%q_right(0,k,j),    &
+                                                  nest_offl%q_right(1,k,j),    &
+                                                  fac_dt ) 
+ 
+                ENDDO
+                q_ref_l(nzb+1:nzt) = q_ref_l(nzb+1:nzt) + q(nzb+1:nzt,j,nxr+1)
+             ENDDO
+          ENDIF
+
+       ENDIF
+
+       IF ( bc_dirichlet_s )  THEN
+
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                v(k,0,i) = interpolate_in_time( nest_offl%v_south(0,k,i),      &
+                                                nest_offl%v_south(1,k,i),      &
+                                                fac_dt ) *                     &
+                           MERGE( 1.0_wp, 0.0_wp,                              &
+                                  BTEST( wall_flags_0(k,0,i), 2 ) )
+                v(k,-1,i) = v(k,0,i) 
+             ENDDO
+             v_ref_l(nzb+1:nzt) = v_ref_l(nzb+1:nzt) + v(nzb+1:nzt,0,i)
+          ENDDO
+
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt-1
+                w(k,-1,i) = interpolate_in_time( nest_offl%w_south(0,k,i),     &
+                                                 nest_offl%w_south(1,k,i),     &
+                                                 fac_dt ) *                    &
+                           MERGE( 1.0_wp, 0.0_wp,                              &
+                                  BTEST( wall_flags_0(k,-1,i), 3 ) )
+             ENDDO
+          ENDDO
+
+          DO  i = nxlu, nxr
+             DO  k = nzb+1, nzt
+                u(k,-1,i) = interpolate_in_time( nest_offl%u_south(0,k,i),     &
+                                                 nest_offl%u_south(1,k,i),     &
+                                                 fac_dt ) *                    &
+                           MERGE( 1.0_wp, 0.0_wp,                              &
+                                  BTEST( wall_flags_0(k,-1,i), 1 ) )
+             ENDDO
+             u_ref_l(nzb+1:nzt) = u_ref_l(nzb+1:nzt) + u(nzb+1:nzt,-1,i)
+          ENDDO
+
+          IF ( .NOT. neutral )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   pt(k,-1,i) = interpolate_in_time(                           &
+                                                 nest_offl%pt_south(0,k,i),    &
+                                                 nest_offl%pt_south(1,k,i),    &
+                                                 fac_dt )
+ 
+                ENDDO
+                pt_ref_l(nzb+1:nzt) = pt_ref_l(nzb+1:nzt) + pt(nzb+1:nzt,-1,i)
+             ENDDO
+          ENDIF
+
+          IF ( humidity )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   q(k,-1,i) = interpolate_in_time(                            &
+                                                 nest_offl%q_south(0,k,i),     &
+                                                 nest_offl%q_south(1,k,i),     &
+                                                 fac_dt )
+ 
+                ENDDO
+                q_ref_l(nzb+1:nzt) = q_ref_l(nzb+1:nzt) + q(nzb+1:nzt,-1,i)
+             ENDDO
+          ENDIF
+
+       ENDIF
+
+       IF ( bc_dirichlet_n )  THEN
+
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                v(k,nyn+1,i) = interpolate_in_time( nest_offl%v_north(0,k,i),  &
+                                                    nest_offl%v_north(1,k,i),  &
+                                                    fac_dt ) *                 &
+                               MERGE( 1.0_wp, 0.0_wp,                          &
+                                      BTEST( wall_flags_0(k,nyn+1,i), 2 ) )
+             ENDDO
+             v_ref_l(nzb+1:nzt) = v_ref_l(nzb+1:nzt) + v(nzb+1:nzt,nyn+1,i)
+          ENDDO
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt-1
+                w(k,nyn+1,i) = interpolate_in_time( nest_offl%w_north(0,k,i),  &
+                                                    nest_offl%w_north(1,k,i),  &
+                                                    fac_dt ) *                 &
+                               MERGE( 1.0_wp, 0.0_wp,                          &
+                                      BTEST( wall_flags_0(k,nyn+1,i), 3 ) )
+             ENDDO
+          ENDDO
+
+          DO  i = nxlu, nxr
+             DO  k = nzb+1, nzt
+                u(k,nyn+1,i) = interpolate_in_time( nest_offl%u_north(0,k,i),  &
+                                                    nest_offl%u_north(1,k,i),  &
+                                                    fac_dt ) *                 &
+                               MERGE( 1.0_wp, 0.0_wp,                          &
+                                      BTEST( wall_flags_0(k,nyn+1,i), 1 ) )
+
+             ENDDO
+             u_ref_l(nzb+1:nzt) = u_ref_l(nzb+1:nzt) + u(nzb+1:nzt,nyn+1,i)
+          ENDDO
+
+          IF ( .NOT. neutral )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   pt(k,nyn+1,i) = interpolate_in_time(                        &
+                                                    nest_offl%pt_north(0,k,i), &
+                                                    nest_offl%pt_north(1,k,i), &
+                                                    fac_dt )
+ 
+                ENDDO
+                pt_ref_l(nzb+1:nzt) = pt_ref_l(nzb+1:nzt) + pt(nzb+1:nzt,nyn+1,i)
+             ENDDO
+          ENDIF
+
+          IF ( humidity )  THEN
+             DO  i = nxl, nxr
+                DO  k = nzb+1, nzt
+                   q(k,nyn+1,i) = interpolate_in_time(                         &
+                                                    nest_offl%q_north(0,k,i),  &
+                                                    nest_offl%q_north(1,k,i),  &
+                                                    fac_dt )
+ 
+                ENDDO
+                q_ref_l(nzb+1:nzt) = q_ref_l(nzb+1:nzt) + q(nzb+1:nzt,nyn+1,i)
+             ENDDO
+          ENDIF
+
+       ENDIF
+!
+!--    Top boundary
+       DO  i = nxlu, nxr
+          DO  j = nys, nyn
+             u(nzt+1,j,i) = interpolate_in_time( nest_offl%u_top(0,j,i),       &
+                                                 nest_offl%u_top(1,j,i),       &
+                                                 fac_dt ) *                    &
+                           MERGE( 1.0_wp, 0.0_wp,                              &
+                                  BTEST( wall_flags_0(nzt+1,j,i), 1 ) )
+             u_ref_l(nzt+1) = u_ref_l(nzt+1) + u(nzt+1,j,i)
+          ENDDO
+       ENDDO
+
+       DO  i = nxl, nxr
+          DO  j = nysv, nyn
+             v(nzt+1,j,i) = interpolate_in_time( nest_offl%v_top(0,j,i),       &
+                                                 nest_offl%v_top(1,j,i),       &
+                                                 fac_dt ) *                    &
+                           MERGE( 1.0_wp, 0.0_wp,                              &
+                                  BTEST( wall_flags_0(nzt+1,j,i), 2 ) )
+             v_ref_l(nzt+1) = v_ref_l(nzt+1) + v(nzt+1,j,i)
+          ENDDO
+       ENDDO
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             w(nzt,j,i) = interpolate_in_time( nest_offl%w_top(0,j,i),         &
+                                               nest_offl%w_top(1,j,i),         &
+                                               fac_dt ) *                      &
+                           MERGE( 1.0_wp, 0.0_wp,                              &
+                                  BTEST( wall_flags_0(nzt,j,i), 3 ) )
+             w(nzt+1,j,i) = w(nzt,j,i)
+          ENDDO
+       ENDDO
+
+
+       IF ( .NOT. neutral )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                pt(nzt+1,j,i) = interpolate_in_time( nest_offl%pt_top(0,j,i),  &
+                                                     nest_offl%pt_top(1,j,i),  &
+                                                     fac_dt )
+                pt_ref_l(nzt+1) = pt_ref_l(nzt+1) + pt(nzt+1,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( humidity )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                q(nzt+1,j,i) = interpolate_in_time( nest_offl%q_top(0,j,i),    &
+                                                    nest_offl%q_top(1,j,i),    &
+                                                    fac_dt )
+                q_ref_l(nzt+1) = q_ref_l(nzt+1) + q(nzt+1,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Moreover, set Neumann boundary condition for subgrid-scale TKE, 
+!--    passive scalar, dissipation, and chemical species if required
+       IF ( rans_mode  .AND.  rans_tke_e )  THEN
+          IF (  bc_dirichlet_l )  diss(:,:,nxl-1) = diss(:,:,nxl)
+          IF (  bc_dirichlet_r )  diss(:,:,nxr+1) = diss(:,:,nxr)
+          IF (  bc_dirichlet_s )  diss(:,nys-1,:) = diss(:,nys,:)
+          IF (  bc_dirichlet_n )  diss(:,nyn+1,:) = diss(:,nyn,:)
+       ENDIF
+       IF ( .NOT. constant_diffusion )  THEN
+          IF (  bc_dirichlet_l )  e(:,:,nxl-1) = e(:,:,nxl)
+          IF (  bc_dirichlet_r )  e(:,:,nxr+1) = e(:,:,nxr)
+          IF (  bc_dirichlet_s )  e(:,nys-1,:) = e(:,nys,:)
+          IF (  bc_dirichlet_n )  e(:,nyn+1,:) = e(:,nyn,:)
+          e(nzt+1,:,:) = e(nzt,:,:)
+       ENDIF
+       IF ( passive_scalar )  THEN
+          IF (  bc_dirichlet_l )  s(:,:,nxl-1) = s(:,:,nxl)
+          IF (  bc_dirichlet_r )  s(:,:,nxr+1) = s(:,:,nxr)
+          IF (  bc_dirichlet_s )  s(:,nys-1,:) = s(:,nys,:)
+          IF (  bc_dirichlet_n )  s(:,nyn+1,:) = s(:,nyn,:)
+       ENDIF
+
+       CALL exchange_horiz( u, nbgp )
+       CALL exchange_horiz( v, nbgp )
+       CALL exchange_horiz( w, nbgp )
+       IF ( .NOT. neutral )  CALL exchange_horiz( pt, nbgp )
+       IF ( humidity      )  CALL exchange_horiz( q,  nbgp )
+!
+!--    In case of Rayleigh damping, where the profiles u_init, v_init
+!--    q_init and pt_init are still used, update these profiles from the
+!--    averaged boundary data. 
+!--    But first, average these data.
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( u_ref_l, u_ref, nzt+1-nzb+1, MPI_REAL, MPI_SUM,     &
+                           comm2d, ierr )
+       CALL MPI_ALLREDUCE( v_ref_l, v_ref, nzt+1-nzb+1, MPI_REAL, MPI_SUM,     &
+                           comm2d, ierr )
+       IF ( humidity )  THEN
+          CALL MPI_ALLREDUCE( q_ref_l, q_ref, nzt+1-nzb+1, MPI_REAL, MPI_SUM,  &
+                              comm2d, ierr )
+       ENDIF
+       IF ( .NOT. neutral )  THEN
+          CALL MPI_ALLREDUCE( pt_ref_l, pt_ref, nzt+1-nzb+1, MPI_REAL, MPI_SUM,&
+                              comm2d, ierr )
+       ENDIF
+#else
+    u_ref  = u_ref_l
+    v_ref  = v_ref_l
+    IF ( humidity )       q_ref  = q_ref_l
+    IF ( .NOT. neutral )  pt_ref = pt_ref_l
+#endif
+!
+!-- Average data. Note, reference profiles up to nzt are derived from lateral
+!-- boundaries, at the model top it is derived from the top boundary. Thus,
+!-- number of input data is different from nzb:nzt compared to nzt+1. 
+!-- Derived from lateral boundaries. 
+    u_ref(nzb:nzt) = u_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx     ),      &
+                                            KIND = wp )  
+    v_ref(nzb:nzt) = v_ref(nzb:nzt) / REAL( 2.0_wp * ( ny   + nx + 1   ),      &
+                                            KIND = wp )
+    IF ( humidity )                                                            &
+       q_ref(nzb:nzt) = q_ref(nzb:nzt)   / REAL( 2.0_wp * ( ny + 1 + nx + 1 ), &
+                                                 KIND = wp )
+    IF ( .NOT. neutral )                                                       &
+       pt_ref(nzb:nzt) = pt_ref(nzb:nzt) / REAL( 2.0_wp * ( ny + 1 + nx + 1 ), &
+                                           KIND = wp )
+!
+!-- Derived from top boundary.    
+    u_ref(nzt+1) = u_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx     ), KIND = wp ) 
+    v_ref(nzt+1) = v_ref(nzt+1) / REAL( ( ny     ) * ( nx + 1 ), KIND = wp )
+    IF ( humidity )                                                            &
+       q_ref(nzt+1) = q_ref(nzt+1)   / REAL( ( ny + 1 ) * ( nx + 1 ), KIND = wp )
+    IF ( .NOT. neutral )                                                       &
+       pt_ref(nzt+1) = pt_ref(nzt+1) / REAL( ( ny + 1 ) * ( nx + 1 ), KIND = wp )
+!
+!-- Write onto init profiles, which are used for damping
+    u_init = u_ref
+    v_init = v_ref
+    IF ( humidity      )  q_init  = q_ref
+    IF ( .NOT. neutral )  pt_init = pt_ref
+!
+!-- Set bottom boundary condition
+    IF ( humidity      )  q_init(nzb)  = q_init(nzb+1)
+    IF ( .NOT. neutral )  pt_init(nzb) = pt_init(nzb+1)
+!
+!-- Further, adjust Rayleigh damping height in case of time-changing conditions.
+!-- Therefore, calculate boundary-layer depth first. 
+    CALL calc_zi
+    CALL adjust_sponge_layer 
+    
+!
+!-- Update geostrophic wind components from dynamic input file. 
+    DO  k = nzb+1, nzt
+       ug(k) = interpolate_in_time( nest_offl%ug(0,k), nest_offl%ug(1,k),      &
+                                    fac_dt )
+       vg(k) = interpolate_in_time( nest_offl%vg(0,k), nest_offl%vg(1,k),      &
+                                    fac_dt )
+    ENDDO
+    ug(nzt+1) = ug(nzt)
+    vg(nzt+1) = vg(nzt)
+    
+    CALL  cpu_log( log_point(58), 'offline nesting', 'stop' )
+
+    END SUBROUTINE nesting_offl_bc
+
+!------------------------------------------------------------------------------!
+! Description:
+!------------------------------------------------------------------------------!
+!> Calculates the boundary-layer depth from the boundary data, according to 
+!> bulk-Richardson criterion. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_zi
+       
+       USE basic_constants_and_equations_mod,                                  &
+           ONLY:  g
+       
+       USE kinds
+       
+       USE surface_mod,                                                        &
+           ONLY:  get_topography_top_index, get_topography_top_index_ji
+
+       IMPLICIT NONE 
+
+       INTEGER(iwp) :: i            !< loop index in x-direction
+       INTEGER(iwp) :: j            !< loop index in y-direction
+       INTEGER(iwp) :: k            !< loop index in z-direction
+       INTEGER(iwp) :: k_surface    !< topography top index in z-direction
+    
+       REAL(wp) ::  ri_bulk                 !< bulk Richardson number
+       REAL(wp) ::  ri_bulk_crit = 0.25_wp  !< critical bulk Richardson number
+       REAL(wp) ::  topo_max                !< maximum topography level in model domain
+       REAL(wp) ::  topo_max_l              !< maximum topography level in subdomain
+       REAL(wp) ::  u_comp                  !< u-component
+       REAL(wp) ::  v_comp                  !< v-component
+       REAL(wp) ::  vpt_surface             !< near-surface virtual potential temperature
+       REAL(wp) ::  zi_l                    !< mean boundary-layer depth on subdomain   
+       REAL(wp) ::  zi_local                !< local boundary-layer depth  
+    
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  vpt_col !< vertical profile of virtual potential temperature at (j,i)-grid point
+
+       
+!
+!--    Calculate mean boundary-layer height from boundary data.
+!--    Start with the left and right boundaries. 
+       zi_l      = 0.0_wp
+       IF ( bc_dirichlet_l  .OR.  bc_dirichlet_r )  THEN
+!
+!--       Determine index along x. Please note, index indicates boundary
+!--       grid point for scalars. 
+          i = MERGE( -1, nxr + 1, bc_dirichlet_l )
+    
+          DO  j = nys, nyn
+!
+!--          Determine topography top index at current (j,i) index
+             k_surface = get_topography_top_index_ji( j, i, 's' )
+!
+!--          Pre-compute surface virtual temperature. Therefore, use 2nd 
+!--          prognostic level according to Heinze et al. (2017).
+             IF ( humidity )  THEN
+                vpt_surface = pt(k_surface+2,j,i) *                            &
+                            ( 1.0_wp + 0.61_wp * q(k_surface+2,j,i) )
+                vpt_col     = pt(:,j,i) * ( 1.0_wp + 0.61_wp * q(:,j,i) )
+             ELSE
+                vpt_surface = pt(k_surface+2,j,i)
+                vpt_col     = pt(:,j,i)
+             ENDIF
+!
+!--          Calculate local boundary layer height from bulk Richardson number,
+!--          i.e. the height where the bulk Richardson number exceeds its
+!--          critical value of 0.25 (according to Heinze et al., 2017).
+!--          Note, no interpolation of u- and v-component is made, as both 
+!--          are mainly mean inflow profiles with very small spatial variation. 
+             zi_local = 0.0_wp
+             DO  k = k_surface+1, nzt
+                u_comp = MERGE( u(k,j,i+1), u(k,j,i), bc_dirichlet_l )
+                v_comp = v(k,j,i)
+                ri_bulk = zu(k) * g / vpt_surface *                            &
+                          ( vpt_col(k) - vpt_surface ) /                       &
+                          ( u_comp * u_comp + v_comp * v_comp ) 
+                       
+                IF ( zi_local == 0.0_wp  .AND.  ri_bulk > ri_bulk_crit )       &
+                   zi_local = zu(k)           
+             ENDDO
+!
+!--          Assure that the minimum local boundary-layer depth is at least at 
+!--          the second vertical grid level.
+             zi_l = zi_l + MAX( zi_local, zu(k_surface+2) )   
+             
+          ENDDO
+       
+       ENDIF
+!
+!--    Do the same at the north and south boundaries.
+       IF ( bc_dirichlet_s  .OR.  bc_dirichlet_n )  THEN
+       
+          j = MERGE( -1, nyn + 1, bc_dirichlet_s )
+       
+          DO  i = nxl, nxr
+             k_surface = get_topography_top_index_ji( j, i, 's' )
+ 
+             IF ( humidity )  THEN
+                vpt_surface = pt(k_surface+2,j,i) *                            &
+                            ( 1.0_wp + 0.61_wp * q(k_surface+2,j,i) )
+                vpt_col     = pt(:,j,i) * ( 1.0_wp + 0.61_wp * q(:,j,i) )
+             ELSE
+                vpt_surface = pt(k_surface+2,j,i)
+                vpt_col  = pt(:,j,i)
+             ENDIF
+          
+             zi_local = 0.0_wp
+             DO  k = k_surface+1, nzt                
+                u_comp = u(k,j,i)
+                v_comp = MERGE( v(k,j+1,i), v(k,j,i), bc_dirichlet_s )
+                ri_bulk = zu(k) * g / vpt_surface *                            &
+                       ( vpt_col(k) - vpt_surface ) /                          &
+                       ( u_comp * u_comp + v_comp * v_comp ) 
+                       
+                IF ( zi_local == 0.0_wp  .AND.  ri_bulk > 0.25_wp )            &
+                   zi_local = zu(k)    
+             ENDDO
+             zi_l = zi_l + MAX( zi_local, zu(k_surface+2) )   
+          
+          ENDDO
+          
+       ENDIF
+    
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( zi_l, zi_ribulk, 1, MPI_REAL, MPI_SUM,              &
+                           comm2d, ierr )
+#else
+       zi_ribulk = zi_l
+#endif
+       zi_ribulk = zi_ribulk / REAL( 2 * nx + 2 * ny, KIND = wp )
+!
+!--    Finally, check if boundary layer depth is not below the any topography. 
+!--    zi_ribulk will be used to adjust rayleigh damping height, i.e. the 
+!--    lower level of the sponge layer, as well as to adjust the synthetic
+!--    turbulence generator accordingly. If Rayleigh damping would be applied
+!--    near buildings, etc., this would spoil the simulation results. 
+       topo_max_l = zw(MAXVAL( get_topography_top_index( 's' )))
+       
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( topo_max_l, topo_max, 1, MPI_REAL, MPI_MAX,            &
+                           comm2d, ierr )
+#else
+       topo_max     = topo_max_l
+#endif
+
+       zi_ribulk = MAX( zi_ribulk, topo_max )
+
+    END SUBROUTINE calc_zi
+    
+    
+!------------------------------------------------------------------------------!
+! Description:
+!------------------------------------------------------------------------------!
+!> Adjust the height where the rayleigh damping starts, i.e. the lower level
+!> of the sponge layer. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE adjust_sponge_layer
+       
+       USE arrays_3d,                                                          &
+           ONLY:  rdf, rdf_sc, zu
+       
+       USE basic_constants_and_equations_mod,                                  &
+           ONLY:  pi
+           
+       USE control_parameters,                                                 &
+           ONLY:  rayleigh_damping_height, rayleigh_damping_factor
+       
+       USE kinds
+
+       IMPLICIT NONE 
+
+       INTEGER(iwp) :: k   !< loop index in z-direction
+    
+       REAL(wp) ::  rdh    !< updated Rayleigh damping height
+ 
+    
+       IF ( rayleigh_damping_height > 0.0_wp  .AND.                            &
+            rayleigh_damping_factor > 0.0_wp )  THEN
+!
+!--       Update Rayleigh-damping height and re-calculate height-depending 
+!--       damping coefficients. 
+!--       Assure that rayleigh damping starts well above the boundary layer.   
+          rdh = MIN( MAX( zi_ribulk * 1.3_wp, 10.0_wp * dz(1) ),               & 
+                     0.8_wp * zu(nzt), rayleigh_damping_height )
+!
+!--       Update Rayleigh damping factor
+          DO  k = nzb+1, nzt
+             IF ( zu(k) >= rdh )  THEN
+                rdf(k) = rayleigh_damping_factor *                             &
+                                          ( SIN( pi * 0.5_wp * ( zu(k) - rdh ) &
+                                        / ( zu(nzt) - rdh ) )                  &
+                                          )**2
+             ENDIF
+          ENDDO
+          rdf_sc = rdf
+       
+       ENDIF
+
+    END SUBROUTINE adjust_sponge_layer
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Performs consistency checks
+!------------------------------------------------------------------------------!
+    SUBROUTINE nesting_offl_check_parameters 
+
+       IMPLICIT NONE
+!
+!--    Perform checks
+
+
+    END SUBROUTINE nesting_offl_check_parameters
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads the parameter list nesting_offl_parameters
+!------------------------------------------------------------------------------!
+    SUBROUTINE nesting_offl_parin 
+
+       IMPLICIT NONE
+       
+       CHARACTER (LEN=80) ::  line   !< dummy string that contains the current line of the parameter file
+
+
+       NAMELIST /nesting_offl_parameters/   nesting_offline
+
+       line = ' '
+
+!
+!--    Try to find stg package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&nesting_offl_parameters' ) == 0 )
+          READ ( 11, '(A)', END=20 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read namelist
+       READ ( 11, nesting_offl_parameters, ERR = 10, END = 20 )
+
+       GOTO 20
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'nesting_offl_parameters', line )
+
+ 20    CONTINUE
+
+
+    END SUBROUTINE nesting_offl_parin
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Writes information about offline nesting into HEADER file
+!------------------------------------------------------------------------------!
+    SUBROUTINE nesting_offl_header ( io )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  io !< Unit of the output file
+
+       WRITE ( io, 1 )
+       IF ( nesting_offline )  THEN
+          WRITE ( io, 3 )
+       ELSE
+          WRITE ( io, 2 )
+       ENDIF
+
+1 FORMAT (//' Offline nesting in COSMO model:'/                                &
+              ' -------------------------------'/)
+2 FORMAT (' --> No offlince nesting is used (default) ')
+3 FORMAT (' --> Offlince nesting is used. Boundary data is read from dynamic input file ')
+
+    END SUBROUTINE nesting_offl_header 
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate arrays used to read boundary data from NetCDF file and initialize
+!> boundary data. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE nesting_offl_init
+    
+       USE netcdf_data_input_mod,                                              &
+           ONLY:  netcdf_data_input_offline_nesting  
+
+       IMPLICIT NONE
+
+
+!--    Allocate arrays for geostrophic wind components. Arrays will 
+!--    incorporate 2 time levels in order to interpolate in between. 
+       ALLOCATE( nest_offl%ug(0:1,1:nzt) )
+       ALLOCATE( nest_offl%vg(0:1,1:nzt) )
+!
+!--    Allocate arrays for reading boundary values. Arrays will incorporate 2 
+!--    time levels in order to interpolate in between. 
+       IF ( bc_dirichlet_l )  THEN
+          ALLOCATE( nest_offl%u_left(0:1,nzb+1:nzt,nys:nyn)  )
+          ALLOCATE( nest_offl%v_left(0:1,nzb+1:nzt,nysv:nyn) )
+          ALLOCATE( nest_offl%w_left(0:1,nzb+1:nzt-1,nys:nyn) )
+          IF ( humidity )       ALLOCATE( nest_offl%q_left(0:1,nzb+1:nzt,nys:nyn)  )
+          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_left(0:1,nzb+1:nzt,nys:nyn) )
+       ENDIF
+       IF ( bc_dirichlet_r )  THEN
+          ALLOCATE( nest_offl%u_right(0:1,nzb+1:nzt,nys:nyn)  )
+          ALLOCATE( nest_offl%v_right(0:1,nzb+1:nzt,nysv:nyn) )
+          ALLOCATE( nest_offl%w_right(0:1,nzb+1:nzt-1,nys:nyn) )
+          IF ( humidity )       ALLOCATE( nest_offl%q_right(0:1,nzb+1:nzt,nys:nyn)  )
+          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_right(0:1,nzb+1:nzt,nys:nyn) )
+       ENDIF
+       IF ( bc_dirichlet_n )  THEN
+          ALLOCATE( nest_offl%u_north(0:1,nzb+1:nzt,nxlu:nxr) )
+          ALLOCATE( nest_offl%v_north(0:1,nzb+1:nzt,nxl:nxr)  )
+          ALLOCATE( nest_offl%w_north(0:1,nzb+1:nzt-1,nxl:nxr) )
+          IF ( humidity )       ALLOCATE( nest_offl%q_north(0:1,nzb+1:nzt,nxl:nxr)  )
+          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_north(0:1,nzb+1:nzt,nxl:nxr) )
+       ENDIF
+       IF ( bc_dirichlet_s )  THEN
+          ALLOCATE( nest_offl%u_south(0:1,nzb+1:nzt,nxlu:nxr) )
+          ALLOCATE( nest_offl%v_south(0:1,nzb+1:nzt,nxl:nxr)  )
+          ALLOCATE( nest_offl%w_south(0:1,nzb+1:nzt-1,nxl:nxr)    )
+          IF ( humidity )       ALLOCATE( nest_offl%q_south(0:1,nzb+1:nzt,nxl:nxr)  )
+          IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_south(0:1,nzb+1:nzt,nxl:nxr) )
+       ENDIF
+       
+       ALLOCATE( nest_offl%u_top(0:1,nys:nyn,nxlu:nxr) )
+       ALLOCATE( nest_offl%v_top(0:1,nysv:nyn,nxl:nxr) )
+       ALLOCATE( nest_offl%w_top(0:1,nys:nyn,nxl:nxr)  )
+       IF ( humidity )       ALLOCATE( nest_offl%q_top(0:1,nys:nyn,nxl:nxr)  )
+       IF ( .NOT. neutral )  ALLOCATE( nest_offl%pt_top(0:1,nys:nyn,nxl:nxr) )
+
+!
+!--    Read COSMO data at lateral and top boundaries
+       CALL netcdf_data_input_offline_nesting
+!
+!--    Initialize boundary data.
+       IF ( bc_dirichlet_l )  THEN
+          u(nzb+1:nzt,nys:nyn,0)    = nest_offl%u_left(0,nzb+1:nzt,nys:nyn)
+          v(nzb+1:nzt,nysv:nyn,-1)  = nest_offl%v_left(0,nzb+1:nzt,nysv:nyn) 
+          w(nzb+1:nzt-1,nys:nyn,-1) = nest_offl%w_left(0,nzb+1:nzt-1,nys:nyn)
+          IF ( .NOT. neutral )  pt(nzb+1:nzt,nys:nyn,-1) =                     &
+                                   nest_offl%pt_left(0,nzb+1:nzt,nys:nyn)
+          IF ( humidity      )  q(nzb+1:nzt,nys:nyn,-1)  =                     &
+                                   nest_offl%q_left(0,nzb+1:nzt,nys:nyn) 
+       ENDIF
+       IF ( bc_dirichlet_r )  THEN
+          u(nzb+1:nzt,nys:nyn,nxr+1)   = nest_offl%u_right(0,nzb+1:nzt,nys:nyn) 
+          v(nzb+1:nzt,nysv:nyn,nxr+1)  = nest_offl%v_right(0,nzb+1:nzt,nysv:nyn)
+          w(nzb+1:nzt-1,nys:nyn,nxr+1) = nest_offl%w_right(0,nzb+1:nzt-1,nys:nyn)
+          IF ( .NOT. neutral )  pt(nzb+1:nzt,nys:nyn,nxr+1) =                  &
+                                   nest_offl%pt_right(0,nzb+1:nzt,nys:nyn)
+          IF ( humidity      )  q(nzb+1:nzt,nys:nyn,nxr+1)  =                  &
+                                   nest_offl%q_right(0,nzb+1:nzt,nys:nyn)
+       ENDIF
+       IF ( bc_dirichlet_s )  THEN
+          u(nzb+1:nzt,-1,nxlu:nxr)  = nest_offl%u_south(0,nzb+1:nzt,nxlu:nxr)
+          v(nzb+1:nzt,0,nxl:nxr)    = nest_offl%v_south(0,nzb+1:nzt,nxl:nxr) 
+          w(nzb+1:nzt-1,-1,nxl:nxr) = nest_offl%w_south(0,nzb+1:nzt-1,nxl:nxr) 
+          IF ( .NOT. neutral )  pt(nzb+1:nzt,-1,nxl:nxr) =                     &
+                                   nest_offl%pt_south(0,nzb+1:nzt,nxl:nxr)
+          IF ( humidity      )  q(nzb+1:nzt,-1,nxl:nxr)  =                     &
+                                   nest_offl%q_south(0,nzb+1:nzt,nxl:nxr) 
+       ENDIF
+       IF ( bc_dirichlet_n )  THEN
+          u(nzb+1:nzt,nyn+1,nxlu:nxr)  = nest_offl%u_north(0,nzb+1:nzt,nxlu:nxr)
+          v(nzb+1:nzt,nyn+1,nxl:nxr)   = nest_offl%v_north(0,nzb+1:nzt,nxl:nxr) 
+          w(nzb+1:nzt-1,nyn+1,nxl:nxr) = nest_offl%w_north(0,nzb+1:nzt-1,nxl:nxr)
+          IF ( .NOT. neutral )  pt(nzb+1:nzt,nyn+1,nxl:nxr) =                  &
+                                   nest_offl%pt_north(0,nzb+1:nzt,nxl:nxr) 
+          IF ( humidity      )  q(nzb+1:nzt,nyn+1,nxl:nxr)  =                  &
+                                   nest_offl%q_north(0,nzb+1:nzt,nxl:nxr)
+       ENDIF
+!
+!--    Initialize geostrophic wind components. Actually this is already done in
+!--    init_3d_model when initializing_action = 'inifor', however, in speical 
+!--    case of user-defined initialization this will be done here again, in 
+!--    order to have a consistent initialization. 
+       ug(nzb+1:nzt) = nest_offl%ug(0,nzb+1:nzt)
+       vg(nzb+1:nzt) = nest_offl%vg(0,nzb+1:nzt)
+!
+!--    Set bottom and top boundary condition for geostrophic wind components
+       ug(nzt+1) = ug(nzt)
+       vg(nzt+1) = vg(nzt)
+       ug(nzb)   = ug(nzb+1)
+       vg(nzb)   = vg(nzb+1)
+!
+!--    Initial calculation of the boundary layer depth from the prescribed 
+!--    boundary data. This is requiered for initialize the synthetic turbulence
+!--    generator correctly. 
+       CALL calc_zi
+       
+!
+!--    After boundary data is initialized, mask topography at the 
+!--    boundaries for the velocity components.
+       u = MERGE( u, 0.0_wp, BTEST( wall_flags_0, 1 ) )
+       v = MERGE( v, 0.0_wp, BTEST( wall_flags_0, 2 ) )
+       w = MERGE( w, 0.0_wp, BTEST( wall_flags_0, 3 ) )
+       
+       CALL calc_zi
+       
+!
+!--    After boundary data is initialized, ensure mass conservation
+       CALL nesting_offl_mass_conservation
+
+    END SUBROUTINE nesting_offl_init
+    
+!------------------------------------------------------------------------------!
+! Description:
+!------------------------------------------------------------------------------!
+!> Interpolation function, used to interpolate boundary data in time. 
+!------------------------------------------------------------------------------!
+    FUNCTION interpolate_in_time( var_t1, var_t2, fac  ) 
+       
+       USE kinds
+
+       IMPLICIT NONE 
+
+       REAL(wp)            :: interpolate_in_time !< time-interpolated boundary value
+       REAL(wp)            :: var_t1              !< boundary value at t1
+       REAL(wp)            :: var_t2              !< boundary value at t2
+       REAL(wp)            :: fac                 !< interpolation factor
+
+       interpolate_in_time = ( 1.0_wp - fac ) * var_t1 + fac * var_t2      
+
+    END FUNCTION interpolate_in_time
+
+
+
+ END MODULE nesting_offl_mod
Index: /palm/tags/release-6.0/SOURCE/netcdf_data_input_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/netcdf_data_input_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/netcdf_data_input_mod.f90	(revision 3477)
@@ -0,0 +1,6014 @@
+!> @file netcdf_data_input_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add UV exposure model input (Schrempf)
+! 
+! 3472 2018-10-30 20:43:50Z suehring
+! Salsa implemented
+! 
+! 3464 2018-10-30 18:08:55Z kanani
+! Define coordinate reference system (crs) and read from input dataset
+! Revise default values for reference coordinates
+! 
+! 3459 2018-10-30 15:04:11Z gronemeier
+! from chemistry branch r3443, banzhafs, Russo:
+! Uncommented lines on dimension of surface_fractions
+! Removed par_emis_time_factor variable, moved to chem_emissions_mod
+! Initialized nspec and other emission variables at time of declaration
+! Modified EXPERT mode to PRE-PROCESSED mode
+! Introduced Chemistry static netcdf file
+! Added the routine for reading-in netcdf data for chemistry
+! Added routines to get_variable interface specific for chemistry files
+! 
+! 3429 2018-10-25 13:04:23Z knoop
+! add default values of origin_x/y/z
+! 
+! 3404 2018-10-23 13:29:11Z suehring
+! Consider time-dependent geostrophic wind components in offline nesting
+! 
+! 3376 2018-10-19 10:15:32Z suehring
+! Additional check for consistent building initialization implemented
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! Subroutine renamed
+! 
+! 3257 2018-09-17 17:11:46Z suehring
+! (from branch resler)
+! Formatting
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Modified EXPERT mode to PRE-PROCESSED mode (Russo)
+! Introduced Chemistry static netcdf file (Russo)
+! Added the routine for reading-in netcdf data for chemistry (Russo)
+! Added routines to get_variable interface specific for chemistry files (Russo)
+!
+! 3257 2018-09-17 17:11:46Z suehring
+! Adjust checks for building_type and building_id, which is necessary after 
+! topography filtering (building_type and id can be modified by the filtering).
+! 
+! 3254 2018-09-17 10:53:57Z suehring
+! Additional check for surface_fractions and and checks for building_id and 
+! building_type extended.
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3215 2018-08-29 09:58:59Z suehring
+! - Separate input of soil properties from input of atmospheric data. This 
+!   enables input of soil properties also in child domains without any 
+!   dependence on atmospheric input
+! - Check for missing initial 1D/3D data in dynamic input file
+! - Revise checks for matching grid spacing in model and input file 
+! - Bugfix, add netcdf4_parallel directive for collective read operation
+! - Revise error message numbers
+! 
+! 3209 2018-08-27 16:58:37Z suehring
+! Read zsoil dimension length only if soil variables are provided
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Adjust input of dynamic driver according to revised Inifor version. 
+! Replace simulated_time by time_since_reference_point.
+! Rename variables in mesoscale-offline nesting mode.
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Slightly revise check for surface_fraction in order to check only the relevant
+! fractions
+! 
+! 3103 2018-07-04 17:30:52Z suehring
+! New check for negative terrain heights
+! 
+! 3089 2018-06-27 13:20:38Z suehring
+! Revise call for message routine in case of local data inconsistencies.
+! 
+! 3054 2018-06-01 16:08:59Z gronemeier
+! Bugfix: force an MPI abort if errors occur while reading building heights
+! from ASCII file
+! 
+! 3053 2018-06-01 12:59:07Z suehring
+! Revise checks for variable surface_fraction
+! 
+! 3051 2018-05-30 17:43:55Z suehring
+! - Speed-up NetCDF input
+! - Revise input routines and remove NetCDF input via IO-blocks since this is 
+!   not working in parallel mode in case blocking collective read operations 
+!   are done 
+! - Temporarily revoke renaming of input variables in dynamic driver (tend_ug, 
+!   tend_vg, zsoil) in order to keep dynamic input file working with current 
+!   model version
+! - More detailed error messages created
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3041 2018-05-25 10:39:54Z gronemeier
+! Add data type for global file attributes
+! Add read of global attributes of static driver
+!
+! 3037 2018-05-24 10:39:29Z gronemeier
+! renamed 'depth' to 'zsoil'
+!
+! 3036 2018-05-24 10:18:26Z gronemeier
+! Revision of input vars according to UC2 data standard
+!  - renamed 'orography_2D' to 'zt'
+!  - renamed 'buildings_2D' to 'buildings_2d'
+!  - renamed 'buildings_3D' to 'buildings_3d'
+!  - renamed 'leaf_are_density' to 'lad'
+!  - renamed 'basal_are_density' to 'bad'
+!  - renamed 'root_are_density_lad' to 'root_area_dens_r'
+!  - renamed 'root_are_density_lsm' to 'root_area_dens_s'
+!  - renamed 'ls_forcing_ug' to 'tend_ug'
+!  - renamed 'ls_forcing_vg' to 'tend_vg'
+!
+! 3019 2018-05-13 07:05:43Z maronga
+! Improved reading speed of large NetCDF files
+!
+! 2963 2018-04-12 14:47:44Z suehring
+! - Revise checks for static input variables.
+! - Introduce index for vegetation/wall, pavement/green-wall and water/window
+!   surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+!
+! 2958 2018-04-11 15:38:13Z suehring
+! Synchronize longitude and latitude between nested model domains, values are
+! taken from the root model.
+!
+! 2955 2018-04-09 15:14:01Z suehring
+! Extend checks for consistent setting of buildings, its ID and type.
+! Add log-points to measure CPU time of NetCDF data input.
+!
+! 2953 2018-04-09 11:26:02Z suehring
+! Bugfix in checks for initialization data
+!
+! 2947 2018-04-04 18:01:41Z suehring
+! Checks for dynamic input revised
+!
+! 2946 2018-04-04 17:01:23Z suehring
+! Bugfix for revision 2945, perform checks only if dynamic input file is
+! available.
+!
+! 2945 2018-04-04 16:27:14Z suehring
+! - Mimic for topography input slightly revised, in order to enable consistency
+!   checks
+! - Add checks for dimensions in dynamic input file and move already existing
+!   checks
+!
+! 2938 2018-03-27 15:52:42Z suehring
+! Initial read of geostrophic wind components from dynamic driver.
+!
+! 2773 2018-01-30 14:12:54Z suehring
+! Revise checks for surface_fraction.
+!
+! 2925 2018-03-23 14:54:11Z suehring
+! Check for further inconsistent settings of surface_fractions.
+! Some messages slightly rephrased and error numbers renamed.
+!
+! 2898 2018-03-15 13:03:01Z suehring
+! Check if each building has a type. Further, check if dimensions in static
+! input file match the model dimensions.
+!
+! 2897 2018-03-15 11:47:16Z suehring
+! Relax restrictions for topography input, terrain and building heights can be
+! input separately and are not mandatory any more.
+!
+! 2874 2018-03-13 10:55:42Z knoop
+! Bugfix: wrong placement of netcdf cpp-macros fixed
+!
+! 2794 2018-02-07 14:09:43Z knoop
+! Check if 3D building input is consistent to numeric grid.
+!
+! 2773 2018-01-30 14:12:54Z suehring
+! - Enable initialization with 3D topography.
+! - Move check for correct initialization in nesting mode to check_parameters.
+!
+! 2772 2018-01-29 13:10:35Z suehring
+! Initialization of simulation independent on land-surface model.
+!
+! 2746 2018-01-15 12:06:04Z suehring
+! Read plant-canopy variables independently on land-surface model usage
+!
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+!
+! 2711 2017-12-20 17:04:49Z suehring
+! Rename subroutine close_file to avoid double-naming.
+!
+! 2700 2017-12-15 14:12:35Z suehring
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Initial revision (suehring)
+!
+!
+!
+!
+! Authors:
+! --------
+! @author Matthias Suehring
+!
+! Description:
+! ------------
+!> Modulue contains routines to input data according to Palm input data
+!> standart using dynamic and static input files.
+!> @todo - Chemistry: revise reading of netcdf file and ajdust formatting according to standard!!!
+!> @todo - Order input alphabetically
+!> @todo - Revise error messages and error numbers
+!> @todo - Input of missing quantities (chemical species, emission rates)
+!> @todo - Defninition and input of still missing variable attributes
+!> @todo - Input of initial geostrophic wind profiles with cyclic conditions.
+!------------------------------------------------------------------------------!
+ MODULE netcdf_data_input_mod
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_char, io_blocks, io_group
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE kinds
+
+#if defined ( __netcdf )
+    USE NETCDF
+#endif
+
+    USE pegrid
+
+    USE surface_mod,                                                           &
+        ONLY:  ind_pav_green, ind_veg_wall, ind_wat_win
+!
+!-- Define type for dimensions.
+    TYPE dims_xy
+       INTEGER(iwp) :: nx                             !< dimension length in x
+       INTEGER(iwp) :: ny                             !< dimension length in y
+       INTEGER(iwp) :: nz                             !< dimension length in z
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: x       !< dimension array in x
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: y       !< dimension array in y
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: z       !< dimension array in z
+    END TYPE dims_xy
+!
+!-- Define data type for nesting in larger-scale models like COSMO.
+!-- Data type comprises u, v, w, pt, and q at lateral and top boundaries.
+    TYPE nest_offl_type
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names
+
+       INTEGER(iwp) ::  nt     !< number of time levels in dynamic input file
+       INTEGER(iwp) ::  nzu    !< number of vertical levels on scalar grid in dynamic input file
+       INTEGER(iwp) ::  nzw    !< number of vertical levels on w grid in dynamic input file
+       INTEGER(iwp) ::  tind   !< time index for reference time in mesoscale-offline nesting
+       INTEGER(iwp) ::  tind_p !< time index for following time in mesoscale-offline nesting
+
+       LOGICAL      ::  init         = .FALSE.
+       LOGICAL      ::  from_file    = .FALSE.
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surface_pressure !< time dependent surface pressure
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  time             !< time levels in dynamic input file
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zu_atmos         !< vertical levels at scalar grid in dynamic input file
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zw_atmos         !< vertical levels at w grid in dynamic input file
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ug         !< domain-averaged geostrophic component
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vg         !< domain-averaged geostrophic component
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_left   !< u-component at left boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_left   !< v-component at left boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_left   !< w-component at left boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  q_left   !< mixing ratio at left boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_left  !< potentital temperautre at left boundary
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_north  !< u-component at north boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_north  !< v-component at north boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_north  !< w-component at north boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  q_north  !< mixing ratio at north boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_north !< potentital temperautre at north boundary
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_right  !< u-component at right boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_right  !< v-component at right boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_right  !< w-component at right boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  q_right  !< mixing ratio at right boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_right !< potentital temperautre at right boundary
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_south  !< u-component at south boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_south  !< v-component at south boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_south  !< w-component at south boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  q_south  !< mixing ratio at south boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_south !< potentital temperautre at south boundary
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_top    !< u-component at top boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_top    !< v-component at top boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_top    !< w-component at top boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  q_top    !< mixing ratio at top boundary
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_top   !< potentital temperautre at top boundary
+
+    END TYPE nest_offl_type
+
+    TYPE init_type
+
+       CHARACTER(LEN=23) ::  origin_time !< reference time of input data
+
+       INTEGER(iwp) ::  lod_msoil !< level of detail - soil moisture
+       INTEGER(iwp) ::  lod_pt    !< level of detail - pt
+       INTEGER(iwp) ::  lod_q     !< level of detail - q
+       INTEGER(iwp) ::  lod_tsoil !< level of detail - soil temperature
+       INTEGER(iwp) ::  lod_u     !< level of detail - u-component
+       INTEGER(iwp) ::  lod_v     !< level of detail - v-component
+       INTEGER(iwp) ::  lod_w     !< level of detail - w-component
+       INTEGER(iwp) ::  nx        !< number of scalar grid points along x in dynamic input file
+       INTEGER(iwp) ::  nxu       !< number of u grid points along x in dynamic input file
+       INTEGER(iwp) ::  ny        !< number of scalar grid points along y in dynamic input file
+       INTEGER(iwp) ::  nyv       !< number of v grid points along y in dynamic input file
+       INTEGER(iwp) ::  nzs       !< number of vertical soil levels in dynamic input file
+       INTEGER(iwp) ::  nzu       !< number of vertical levels on scalar grid in dynamic input file
+       INTEGER(iwp) ::  nzw       !< number of vertical levels on w grid in dynamic input file
+
+       LOGICAL ::  from_file_msoil  = .FALSE. !< flag indicating whether soil moisture is already initialized from file
+       LOGICAL ::  from_file_pt     = .FALSE. !< flag indicating whether pt is already initialized from file
+       LOGICAL ::  from_file_q      = .FALSE. !< flag indicating whether q is already initialized from file
+       LOGICAL ::  from_file_tsoil  = .FALSE. !< flag indicating whether soil temperature is already initialized from file
+       LOGICAL ::  from_file_u      = .FALSE. !< flag indicating whether u is already initialized from file
+       LOGICAL ::  from_file_ug     = .FALSE. !< flag indicating whether ug is already initialized from file
+       LOGICAL ::  from_file_v      = .FALSE. !< flag indicating whether v is already initialized from file
+       LOGICAL ::  from_file_vg     = .FALSE. !< flag indicating whether ug is already initialized from file
+       LOGICAL ::  from_file_w      = .FALSE. !< flag indicating whether w is already initialized from file
+
+       REAL(wp) ::  fill_msoil              !< fill value for soil moisture
+       REAL(wp) ::  fill_pt                 !< fill value for pt
+       REAL(wp) ::  fill_q                  !< fill value for q
+       REAL(wp) ::  fill_tsoil              !< fill value for soil temperature
+       REAL(wp) ::  fill_u                  !< fill value for u
+       REAL(wp) ::  fill_v                  !< fill value for v
+       REAL(wp) ::  fill_w                  !< fill value for w
+       REAL(wp) ::  latitude = 0.0_wp       !< latitude of the lower left corner
+       REAL(wp) ::  longitude = -3.0_wp     !< longitude of the lower left corner
+       REAL(wp) ::  origin_x = 500000.0_wp  !< UTM easting of the lower left corner
+       REAL(wp) ::  origin_y = 0.0_wp       !< UTM northing of the lower left corner
+       REAL(wp) ::  origin_z = 0.0_wp       !< reference height of input data
+       REAL(wp) ::  rotation_angle = 0.0_wp !< rotation angle of input data
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  msoil_1d     !< initial vertical profile of soil moisture
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_init      !< initial vertical profile of pt
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_init       !< initial vertical profile of q
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  tsoil_1d     !< initial vertical profile of soil temperature
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_init       !< initial vertical profile of u
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ug_init      !< initial vertical profile of ug
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_init       !< initial vertical profile of v
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  vg_init      !< initial vertical profile of ug
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  w_init       !< initial vertical profile of w
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  z_soil       !< vertical levels in soil in dynamic input file, used for interpolation
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zu_atmos     !< vertical levels at scalar grid in dynamic input file, used for interpolation
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zw_atmos     !< vertical levels at w grid in dynamic input file, used for interpolation
+
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  msoil_3d !< initial 3d soil moisture provide by Inifor and interpolated onto soil grid
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tsoil_3d !< initial 3d soil temperature provide by Inifor and interpolated onto soil grid
+
+    END TYPE init_type
+
+!-- Data type for the general information of chemistry emissions, do not dependent on the particular chemical species
+    TYPE chem_emis_att_type 
+
+       !-DIMENSIONS
+       INTEGER(iwp)                                 :: nspec=0                   !< number of chem species for which emission values are provided
+       INTEGER(iwp)                                 :: ncat=0                    !< number of emission categories
+       INTEGER(iwp)                                 :: nvoc=0                    !< number of VOCs components
+       INTEGER(iwp)                                 :: npm=0                     !< number of PMs components
+       INTEGER(iwp)                                 :: nnox=2                    !< number of NOx components: NO and NO2
+       INTEGER(iwp)                                 :: nsox=2                    !< number of SOx components: SO and SO4
+       INTEGER(iwp)                                 :: nhoursyear                !< number of hours of a specific year in the HOURLY mode
+                                                                                 !  of the default mode
+       INTEGER(iwp)                                 :: nmonthdayhour             !< number of month days and hours in the MDH mode 
+                                                                                 !  of the default mode
+       INTEGER(iwp)                                 :: dt_emission               !< Number of emissions timesteps for one year 
+                                                                                 !  in the pre-processed emissions case
+       !-- 1d emission input variables
+       CHARACTER (LEN=25),ALLOCATABLE, DIMENSION(:) :: pm_name                   !< Names of PMs components
+       CHARACTER (LEN=25),ALLOCATABLE, DIMENSION(:) :: cat_name                  !< Emission categories names
+       CHARACTER (LEN=25),ALLOCATABLE, DIMENSION(:) :: species_name              !< Names of emission chemical species
+       CHARACTER (LEN=25),ALLOCATABLE, DIMENSION(:) :: voc_name                  !< Names of VOCs components
+       CHARACTER (LEN=25)                           :: units                     !< Units
+
+       INTEGER(iwp)                                 :: i_hour                    !< indices for assigning the emission values at different timesteps
+       INTEGER(iwp),ALLOCATABLE, DIMENSION(:)       :: cat_index                 !< Index of emission categories
+       INTEGER(iwp),ALLOCATABLE, DIMENSION(:)       :: species_index             !< Index of emission chem species
+
+       REAL(wp),ALLOCATABLE, DIMENSION(:)           :: xm                        !< Molecular masses of emission chem species
+
+       !-- 2d emission input variables 
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:)         :: hourly_emis_time_factor   !< Time factors for HOURLY emissions (DEFAULT mode)
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:)         :: mdh_emis_time_factor      !< Time factors for MDH emissions (DEFAULT mode)
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:)         :: nox_comp                  !< Composition of NO and NO2 
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:)         :: sox_comp                  !< Composition of SO2 and SO4
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:)         :: voc_comp                  !< Composition of different VOC components (number not fixed)
+
+       !-- 3d emission input variables
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:,:)       :: pm_comp                   !< Composition of different PMs components (number not fixed) 
+  
+    END TYPE chem_emis_att_type
+
+
+!-- Data type for the values of chemistry emissions ERUSSO
+    TYPE chem_emis_val_type 
+
+       !REAL(wp),ALLOCATABLE, DIMENSION(:,:)         :: stack_height              !< stack height
+
+       !-- 3d emission input variables
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:,:)     :: default_emission_data     !< Input Values emissions DEFAULT mode
+
+       !-- 4d emission input variables 
+       REAL(wp),ALLOCATABLE, DIMENSION(:,:,:,:)   :: preproc_emission_data      !< Input Values emissions PRE-PROCESSED mode
+
+    END TYPE chem_emis_val_type
+
+!
+!-- Define data structures for different input data types.
+!-- 8-bit Integer 2D
+    TYPE int_2d_8bit
+       INTEGER(KIND=1) ::  fill = -127                      !< fill value
+       INTEGER(KIND=1), DIMENSION(:,:), ALLOCATABLE ::  var !< respective variable
+
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+    END TYPE int_2d_8bit
+!
+!-- 8-bit Integer 3D
+    TYPE int_3d_8bit
+       INTEGER(KIND=1) ::  fill = -127                           !< fill value
+       INTEGER(KIND=1), DIMENSION(:,:,:), ALLOCATABLE ::  var_3d !< respective variable
+
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+    END TYPE int_3d_8bit
+!
+!-- 32-bit Integer 2D
+    TYPE int_2d_32bit
+       INTEGER(iwp) ::  fill = -9999                      !< fill value
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  var  !< respective variable
+
+       LOGICAL ::  from_file = .FALSE. !< flag indicating whether an input variable is available and read from file or default values are used
+    END TYPE int_2d_32bit
+
+!
+!-- Define data type to read 2D real variables
+    TYPE real_2d
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+
+       REAL(wp) ::  fill = -9999.9_wp                !< fill value
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var !< respective variable
+    END TYPE real_2d
+
+!
+!-- Define data type to read 3D real variables
+    TYPE real_3d
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+
+       INTEGER(iwp) ::  nz   !< number of grid points along vertical dimension
+
+       REAL(wp) ::  fill = -9999.9_wp                  !< fill value
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  var !< respective variable
+    END TYPE real_3d
+!
+!-- Define data structure where the dimension and type of the input depends
+!-- on the given level of detail.
+!-- For buildings, the input is either 2D float, or 3d byte.
+    TYPE build_in
+       INTEGER(iwp)    ::  lod = 1                               !< level of detail
+       INTEGER(KIND=1) ::  fill2 = -127                          !< fill value for lod = 2
+       INTEGER(iwp)    ::  nz                                    !< number of vertical layers in file
+       INTEGER(KIND=1), DIMENSION(:,:,:), ALLOCATABLE ::  var_3d !< 3d variable (lod = 2)
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  z                 !< vertical coordinate for 3D building, used for consistency check
+
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+
+       REAL(wp)                              ::  fill1 = -9999.9_wp !< fill values for lod = 1
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var_2d             !< 2d variable (lod = 1)
+    END TYPE build_in
+
+!
+!-- For soil_type, the input is either 2D or 3D one-byte integer.
+    TYPE soil_in
+       INTEGER(iwp)                                   ::  lod = 1      !< level of detail
+       INTEGER(KIND=1)                                ::  fill = -127  !< fill value for lod = 2
+       INTEGER(KIND=1), DIMENSION(:,:), ALLOCATABLE   ::  var_2d       !< 2d variable (lod = 1)
+       INTEGER(KIND=1), DIMENSION(:,:,:), ALLOCATABLE ::  var_3d       !< 3d variable (lod = 2)
+
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+    END TYPE soil_in
+
+!
+!-- Define data type for fractions between surface types
+    TYPE fracs
+       INTEGER(iwp)                            ::  nf             !< total number of fractions
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nfracs         !< dimension array for fraction
+
+       LOGICAL ::  from_file = .FALSE. !< flag indicating whether an input variable is available and read from file or default values are used
+
+       REAL(wp)                                ::  fill = -9999.9_wp !< fill value
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  frac              !< respective fraction between different surface types
+    END TYPE fracs
+!
+!-- Data type for parameter lists, Depending on the given level of detail,
+!-- the input is 3D or 4D
+    TYPE pars
+       INTEGER(iwp)                            ::  lod = 1         !< level of detail
+       INTEGER(iwp)                            ::  np              !< total number of parameters
+       INTEGER(iwp)                            ::  nz              !< vertical dimension - number of soil layers
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  layers          !< dimension array for soil layers
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  pars            !< dimension array for parameters
+
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used
+
+       REAL(wp)                                  ::  fill = -9999.9_wp !< fill value
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  pars_xy           !< respective parameters, level of detail = 1
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  pars_xyz          !< respective parameters, level of detail = 2
+    END TYPE pars
+!
+!-- Define type for global file attributes
+!-- Please refer to the PALM data standard for a detailed description of each
+!-- attribute.
+    TYPE global_atts_type
+       CHARACTER(LEN=12 ) ::  acronym                            !< acronym of institution
+       CHARACTER(LEN=7)   ::  acronym_char = 'acronym'           !< name of attribute
+       CHARACTER(LEN=200) ::  author                             !< first name, last name, email adress
+       CHARACTER(LEN=6)   ::  author_char = 'author'             !< name of attribute
+       CHARACTER(LEN=12 ) ::  campaign                           !< name of campaign
+       CHARACTER(LEN=8)   ::  campaign_char = 'campaign'         !< name of attribute
+       CHARACTER(LEN=200) ::  comment                            !< comment to data
+       CHARACTER(LEN=7)   ::  comment_char = 'comment'           !< name of attribute
+       CHARACTER(LEN=200) ::  contact_person                     !< first name, last name, email adress
+       CHARACTER(LEN=14)  ::  contact_person_char = 'contact_person'  !< name of attribute
+       CHARACTER(LEN=200) ::  conventions = 'CF-1.7'             !< netCDF convention
+       CHARACTER(LEN=11)  ::  conventions_char = 'Conventions'   !< name of attribute
+       CHARACTER(LEN=23 ) ::  creation_time                      !< creation time of data set
+       CHARACTER(LEN=13)  ::  creation_time_char = 'creation_time'  !< name of attribute
+       CHARACTER(LEN=16 ) ::  data_content                       !< content of data set
+       CHARACTER(LEN=12)  ::  data_content_char = 'data_content' !< name of attribute
+       CHARACTER(LEN=200) ::  dependencies                       !< dependencies of data set
+       CHARACTER(LEN=12)  ::  dependencies_char = 'dependencies' !< name of attribute
+       CHARACTER(LEN=200) ::  history                            !< information about data processing
+       CHARACTER(LEN=7)   ::  history_char = 'history'           !< name of attribute
+       CHARACTER(LEN=200) ::  institution                        !< name of responsible institution
+       CHARACTER(LEN=11)  ::  institution_char = 'institution'   !< name of attribute
+       CHARACTER(LEN=200) ::  keywords                           !< keywords of data set
+       CHARACTER(LEN=8)   ::  keywords_char = 'keywords'         !< name of attribute
+       CHARACTER(LEN=200) ::  license                            !< license of data set
+       CHARACTER(LEN=7)   ::  license_char = 'license'           !< name of attribute
+       CHARACTER(LEN=200) ::  location                           !< place which refers to data set
+       CHARACTER(LEN=8)   ::  location_char = 'location'         !< name of attribute
+       CHARACTER(LEN=10)  ::  origin_lat_char = 'origin_lat'     !< name of attribute
+       CHARACTER(LEN=10)  ::  origin_lon_char = 'origin_lon'     !< name of attribute
+       CHARACTER(LEN=23 ) ::  origin_time                        !< reference time
+       CHARACTER(LEN=11)  ::  origin_time_char = 'origin_time'   !< name of attribute
+       CHARACTER(LEN=8)   ::  origin_x_char = 'origin_x'         !< name of attribute
+       CHARACTER(LEN=8)   ::  origin_y_char = 'origin_y'         !< name of attribute
+       CHARACTER(LEN=8)   ::  origin_z_char = 'origin_z'         !< name of attribute
+       CHARACTER(LEN=12)  ::  palm_version_char = 'palm_version' !< name of attribute
+       CHARACTER(LEN=200) ::  references                         !< literature referring to data set
+       CHARACTER(LEN=10)  ::  references_char = 'references'     !< name of attribute
+       CHARACTER(LEN=14)  ::  rotation_angle_char = 'rotation_angle'  !< name of attribute
+       CHARACTER(LEN=12 ) ::  site                               !< name of model domain
+       CHARACTER(LEN=4)   ::  site_char = 'site'                 !< name of attribute
+       CHARACTER(LEN=200) ::  source                             !< source of data set
+       CHARACTER(LEN=6)   ::  source_char = 'source'             !< name of attribute
+       CHARACTER(LEN=200) ::  title                              !< title of data set
+       CHARACTER(LEN=5)   ::  title_char = 'title'               !< name of attribute
+       CHARACTER(LEN=7)   ::  version_char = 'version'           !< name of attribute
+
+       INTEGER(iwp) ::  version              !< version of data set
+
+       REAL(wp) ::  origin_lat               !< latitude of lower left corner
+       REAL(wp) ::  origin_lon               !< longitude of lower left corner
+       REAL(wp) ::  origin_x                 !< easting (UTM coordinate) of lower left corner
+       REAL(wp) ::  origin_y                 !< northing (UTM coordinate) of lower left corner
+       REAL(wp) ::  origin_z                 !< reference height
+       REAL(wp) ::  palm_version             !< PALM version of data set
+       REAL(wp) ::  rotation_angle           !< rotation angle of coordinate system of data set
+    END TYPE global_atts_type
+!
+!-- Define type for coordinate reference system (crs)
+    TYPE crs_type
+       CHARACTER(LEN=200) ::  epsg_code = 'EPSG:25831'                   !< EPSG code
+       CHARACTER(LEN=200) ::  grid_mapping_name = 'transverse_mercator'  !< name of grid mapping
+       CHARACTER(LEN=200) ::  long_name = 'coordinate reference system'  !< name of variable crs
+       CHARACTER(LEN=200) ::  units = 'm'                                !< unit of crs
+
+       REAL(wp) ::  false_easting = 500000.0_wp                  !< false easting
+       REAL(wp) ::  false_northing = 0.0_wp                      !< false northing
+       REAL(wp) ::  inverse_flattening = 298.257223563_wp        !< 1/f (default for WGS84)
+       REAL(wp) ::  latitude_of_projection_origin = 0.0_wp       !< latitude of projection origin
+       REAL(wp) ::  longitude_of_central_meridian = 3.0_wp       !< longitude of central meridian of UTM zone (default: zone 31)
+       REAL(wp) ::  longitude_of_prime_meridian = 0.0_wp         !< longitude of prime meridian
+       REAL(wp) ::  scale_factor_at_central_meridian = 0.9996_wp !< scale factor of UTM coordinates
+       REAL(wp) ::  semi_major_axis = 6378137.0_wp               !< length of semi major axis (default for WGS84)
+    END TYPE crs_type
+
+!
+!-- Define variables
+    TYPE(crs_type)   ::  coord_ref_sys  !< coordinate reference system
+
+    TYPE(dims_xy)    ::  dim_static     !< data structure for x, y-dimension in static input file
+
+    TYPE(nest_offl_type) ::  nest_offl  !< data structure for data input at lateral and top boundaries (provided by Inifor)  
+
+    TYPE(init_type) ::  init_3d    !< data structure for the initialization of the 3D flow and soil fields
+    TYPE(init_type) ::  init_model !< data structure for the initialization of the model
+
+!
+!-- Define 2D variables of type NC_BYTE
+    TYPE(int_2d_8bit)  ::  albedo_type_f     !< input variable for albedo type
+    TYPE(int_2d_8bit)  ::  building_type_f   !< input variable for building type
+    TYPE(int_2d_8bit)  ::  pavement_type_f   !< input variable for pavenment type
+    TYPE(int_2d_8bit)  ::  street_crossing_f !< input variable for water type
+    TYPE(int_2d_8bit)  ::  street_type_f     !< input variable for water type
+    TYPE(int_2d_8bit)  ::  vegetation_type_f !< input variable for vegetation type
+    TYPE(int_2d_8bit)  ::  water_type_f      !< input variable for water type
+!
+!-- Define 3D variables of type NC_BYTE
+    TYPE(int_3d_8bit)  ::  building_obstruction_f    !< input variable for building obstruction
+    TYPE(int_3d_8bit)  ::  building_obstruction_full !< input variable for building obstruction
+!
+!-- Define 2D variables of type NC_INT
+    TYPE(int_2d_32bit) ::  building_id_f     !< input variable for building ID
+!
+!-- Define 2D variables of type NC_FLOAT
+    TYPE(real_2d) ::  terrain_height_f       !< input variable for terrain height
+    TYPE(real_2d) ::  uvem_irradiance_f      !< input variable for uvem irradiance lookup table
+    TYPE(real_2d) ::  uvem_integration_f     !< input variable for uvem integration
+!
+!-- Define 3D variables of type NC_FLOAT
+    TYPE(real_3d) ::  basal_area_density_f    !< input variable for basal area density - resolved vegetation
+    TYPE(real_3d) ::  leaf_area_density_f     !< input variable for leaf area density - resolved vegetation
+    TYPE(real_3d) ::  root_area_density_lad_f !< input variable for root area density - resolved vegetation
+    TYPE(real_3d) ::  root_area_density_lsm_f !< input variable for root area density - parametrized vegetation
+    TYPE(real_3d) ::  uvem_radiance_f         !< input variable for uvem radiance lookup table
+    TYPE(real_3d) ::  uvem_projarea_f         !< input variable for uvem projection area lookup table
+!
+!-- Define input variable for buildings
+    TYPE(build_in) ::  buildings_f           !< input variable for buildings
+!
+!-- Define input variables for soil_type
+    TYPE(soil_in)  ::  soil_type_f           !< input variable for soil type
+
+    TYPE(fracs) ::  surface_fraction_f       !< input variable for surface fraction
+
+    TYPE(pars)  ::  albedo_pars_f              !< input variable for albedo parameters
+    TYPE(pars)  ::  building_pars_f            !< input variable for building parameters
+    TYPE(pars)  ::  pavement_pars_f            !< input variable for pavement parameters
+    TYPE(pars)  ::  pavement_subsurface_pars_f !< input variable for pavement parameters
+    TYPE(pars)  ::  soil_pars_f                !< input variable for soil parameters
+    TYPE(pars)  ::  vegetation_pars_f          !< input variable for vegetation parameters
+    TYPE(pars)  ::  water_pars_f               !< input variable for water parameters
+
+    TYPE(chem_emis_att_type)                             ::  chem_emis_att    !< Input Information of Chemistry Emission Data from netcdf  
+    TYPE(chem_emis_val_type), ALLOCATABLE, DIMENSION(:)  ::  chem_emis        !< Input Chemistry Emission Data from netcdf  
+
+    CHARACTER(LEN=3)  ::  char_lod  = 'lod'         !< name of level-of-detail attribute in NetCDF file
+
+    CHARACTER(LEN=10) ::  char_fill = '_FillValue'        !< name of fill value attribute in NetCDF file
+
+    CHARACTER(LEN=100) ::  input_file_static  = 'PIDS_STATIC'  !< Name of file which comprises static input data
+    CHARACTER(LEN=100) ::  input_file_dynamic = 'PIDS_DYNAMIC' !< Name of file which comprises dynamic input data
+    CHARACTER(LEN=100) ::  input_file_chem    = 'PIDS_CHEM'    !< Name of file which comprises chemistry input data
+    CHARACTER(LEN=100) ::  input_file_uvem    = 'PIDS_UVEM'    !< Name of file which comprises static uv_exposure model input data
+    CHARACTER(LEN=100) ::  input_file_vm      = 'PIDS_VM'      !< Name of file which comprises virtual measurement data
+
+    CHARACTER (LEN=25), ALLOCATABLE, DIMENSION(:)    ::  string_values  !< output of string variables read from netcdf input files
+
+    INTEGER(iwp)                                     ::  id_emis        !< NetCDF id of input file for chemistry emissions: TBD: It has to be removed
+
+    INTEGER(iwp) ::  nc_stat         !< return value of nf90 function call
+
+    LOGICAL ::  input_pids_static  = .FALSE.   !< Flag indicating whether Palm-input-data-standard file containing static information exists
+    LOGICAL ::  input_pids_dynamic = .FALSE.   !< Flag indicating whether Palm-input-data-standard file containing dynamic information exists
+    LOGICAL ::  input_pids_chem    = .FALSE.   !< Flag indicating whether Palm-input-data-standard file containing chemistry information exists
+    LOGICAL ::  input_pids_uvem    = .FALSE.   !< Flag indicating whether uv-expoure-model input file containing static information exists
+    LOGICAL ::  input_pids_vm      = .FALSE.   !< Flag indicating whether input file for virtual measurements exist
+
+    LOGICAL ::  collective_read = .FALSE.      !< Enable NetCDF collective read
+
+    TYPE(global_atts_type) ::  input_file_atts !< global attributes of input file
+
+    SAVE
+
+    PRIVATE
+
+    INTERFACE netcdf_data_input_interpolate
+       MODULE PROCEDURE netcdf_data_input_interpolate_1d
+       MODULE PROCEDURE netcdf_data_input_interpolate_1d_soil
+       MODULE PROCEDURE netcdf_data_input_interpolate_2d
+       MODULE PROCEDURE netcdf_data_input_interpolate_3d
+    END INTERFACE netcdf_data_input_interpolate
+
+    INTERFACE netcdf_data_input_check_dynamic
+       MODULE PROCEDURE netcdf_data_input_check_dynamic
+    END INTERFACE netcdf_data_input_check_dynamic
+
+    INTERFACE netcdf_data_input_check_static
+       MODULE PROCEDURE netcdf_data_input_check_static
+    END INTERFACE netcdf_data_input_check_static
+
+    INTERFACE netcdf_data_input_chemistry_data                        
+       MODULE PROCEDURE netcdf_data_input_chemistry_data
+    END INTERFACE netcdf_data_input_chemistry_data
+    
+    INTERFACE netcdf_data_input_get_dimension_length                        
+       MODULE PROCEDURE netcdf_data_input_get_dimension_length
+    END INTERFACE netcdf_data_input_get_dimension_length
+
+    INTERFACE netcdf_data_input_inquire_file
+       MODULE PROCEDURE netcdf_data_input_inquire_file
+    END INTERFACE netcdf_data_input_inquire_file
+
+    INTERFACE netcdf_data_input_init
+       MODULE PROCEDURE netcdf_data_input_init
+    END INTERFACE netcdf_data_input_init
+    
+    INTERFACE netcdf_data_input_att
+       MODULE PROCEDURE netcdf_data_input_att_int
+       MODULE PROCEDURE netcdf_data_input_att_real
+       MODULE PROCEDURE netcdf_data_input_att_string
+    END INTERFACE netcdf_data_input_att
+
+    INTERFACE netcdf_data_input_init_3d
+       MODULE PROCEDURE netcdf_data_input_init_3d
+    END INTERFACE netcdf_data_input_init_3d
+    
+    INTERFACE netcdf_data_input_init_lsm
+       MODULE PROCEDURE netcdf_data_input_init_lsm
+    END INTERFACE netcdf_data_input_init_lsm
+
+    INTERFACE netcdf_data_input_offline_nesting
+       MODULE PROCEDURE netcdf_data_input_offline_nesting
+    END INTERFACE netcdf_data_input_offline_nesting
+
+    INTERFACE netcdf_data_input_surface_data
+       MODULE PROCEDURE netcdf_data_input_surface_data
+    END INTERFACE netcdf_data_input_surface_data
+
+    INTERFACE netcdf_data_input_var
+       MODULE PROCEDURE netcdf_data_input_var_char
+       MODULE PROCEDURE netcdf_data_input_var_real_1d
+       MODULE PROCEDURE netcdf_data_input_var_real_2d
+    END INTERFACE netcdf_data_input_var
+
+    INTERFACE netcdf_data_input_uvem
+       MODULE PROCEDURE netcdf_data_input_uvem
+    END INTERFACE netcdf_data_input_uvem
+
+    INTERFACE get_variable
+       MODULE PROCEDURE get_variable_1d_char
+       MODULE PROCEDURE get_variable_1d_int
+       MODULE PROCEDURE get_variable_1d_real
+       MODULE PROCEDURE get_variable_2d_int8
+       MODULE PROCEDURE get_variable_2d_int32
+       MODULE PROCEDURE get_variable_2d_real
+       MODULE PROCEDURE get_variable_3d_int8
+       MODULE PROCEDURE get_variable_3d_real
+       MODULE PROCEDURE get_variable_3d_real_dynamic
+       MODULE PROCEDURE get_variable_4d_to_3d_real
+       MODULE PROCEDURE get_variable_4d_real
+       MODULE PROCEDURE get_variable_5d_to_4d_real
+       MODULE PROCEDURE get_variable_string       
+    END INTERFACE get_variable
+
+    INTERFACE get_variable_pr
+       MODULE PROCEDURE get_variable_pr
+    END INTERFACE get_variable_pr
+
+    INTERFACE get_attribute
+       MODULE PROCEDURE get_attribute_real
+       MODULE PROCEDURE get_attribute_int8
+       MODULE PROCEDURE get_attribute_int32
+       MODULE PROCEDURE get_attribute_string
+    END INTERFACE get_attribute
+
+!
+!-- Public variables
+    PUBLIC albedo_pars_f, albedo_type_f, basal_area_density_f, buildings_f,    &
+           building_id_f, building_pars_f, building_type_f,                    &
+           chem_emis, chem_emis_att, chem_emis_att_type, chem_emis_val_type,   &
+           coord_ref_sys,                                                      &
+           init_3d, init_model, input_file_static, input_pids_static,          &
+           input_pids_dynamic, input_pids_vm, input_file_vm,                   &
+           leaf_area_density_f, nest_offl,                                     &
+           pavement_pars_f, pavement_subsurface_pars_f, pavement_type_f,       &
+           root_area_density_lad_f, root_area_density_lsm_f, soil_pars_f,      &
+           soil_type_f, street_crossing_f, street_type_f, surface_fraction_f,  &
+           terrain_height_f, vegetation_pars_f, vegetation_type_f,             &
+           water_pars_f, water_type_f
+!
+!-- Public uv exposure variables
+    PUBLIC building_obstruction_f, input_file_uvem, input_pids_uvem,           &
+           netcdf_data_input_uvem,                                             &
+           uvem_integration_f, uvem_irradiance_f,                              &
+           uvem_projarea_f, uvem_radiance_f
+
+!
+!-- Public subroutines
+    PUBLIC netcdf_data_input_check_dynamic, netcdf_data_input_check_static,    &
+           netcdf_data_input_chemistry_data,                                   &
+           netcdf_data_input_get_dimension_length,                             &
+           netcdf_data_input_inquire_file,                                     &
+           netcdf_data_input_init, netcdf_data_input_init_lsm,                 &
+           netcdf_data_input_init_3d, netcdf_data_input_att,                   &
+           netcdf_data_input_interpolate, netcdf_data_input_offline_nesting,   &
+           netcdf_data_input_surface_data, netcdf_data_input_topo,             &
+           netcdf_data_input_var, get_attribute, get_variable, open_read_file
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Inquires whether NetCDF input files according to Palm-input-data standard
+!> exist. Moreover, basic checks are performed.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_inquire_file
+
+       USE control_parameters,                                                 &
+           ONLY:  topo_no_distinct
+
+       IMPLICIT NONE
+
+#if defined ( __netcdf )
+       INQUIRE( FILE = TRIM( input_file_static )   // TRIM( coupling_char ),   &
+                EXIST = input_pids_static  )
+       INQUIRE( FILE = TRIM( input_file_dynamic ) // TRIM( coupling_char ),    &
+                EXIST = input_pids_dynamic )
+       INQUIRE( FILE = TRIM( input_file_chem )    // TRIM( coupling_char ),    &
+                EXIST = input_pids_chem )
+       INQUIRE( FILE = TRIM( input_file_uvem ) // TRIM( coupling_char ),       &
+                EXIST = input_pids_uvem  )
+       INQUIRE( FILE = TRIM( input_file_vm )      // TRIM( coupling_char ),    &
+                EXIST = input_pids_vm )
+#endif
+
+!
+!--    As long as topography can be input via ASCII format, no distinction
+!--    between building and terrain can be made. This case, classify all
+!--    surfaces as default type. Same in case land-surface and urban-surface
+!--    model are not applied.
+       IF ( .NOT. input_pids_static )  THEN
+          topo_no_distinct = .TRUE.
+       ENDIF
+
+    END SUBROUTINE netcdf_data_input_inquire_file
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global attributes and coordinate reference system required for 
+!> initialization of the model.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_init
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  id_mod     !< NetCDF id of input file
+       INTEGER(iwp) ::  var_id_crs !< NetCDF id of variable crs
+
+       IF ( .NOT. input_pids_static )  RETURN
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       CALL open_read_file( TRIM( input_file_static ) //                       &
+                            TRIM( coupling_char ), id_mod )
+!
+!--    Read global attributes
+       CALL get_attribute( id_mod, input_file_atts%origin_lat_char,            &
+                           input_file_atts%origin_lat, .TRUE. )
+
+       CALL get_attribute( id_mod, input_file_atts%origin_lon_char,            &
+                           input_file_atts%origin_lon, .TRUE. )
+
+       CALL get_attribute( id_mod, input_file_atts%origin_time_char,           &
+                           input_file_atts%origin_time, .TRUE. )
+
+       CALL get_attribute( id_mod, input_file_atts%origin_x_char,              &
+                           input_file_atts%origin_x, .TRUE. )
+
+       CALL get_attribute( id_mod, input_file_atts%origin_y_char,              &
+                           input_file_atts%origin_y, .TRUE. )
+
+       CALL get_attribute( id_mod, input_file_atts%origin_z_char,              &
+                           input_file_atts%origin_z, .TRUE. )
+
+       CALL get_attribute( id_mod, input_file_atts%rotation_angle_char,        &
+                           input_file_atts%rotation_angle, .TRUE. )
+!
+!--    Read coordinate reference system if available
+       nc_stat = NF90_INQ_VARID( id_mod, 'crs', var_id_crs )
+       IF ( nc_stat == NF90_NOERR )  THEN
+          CALL get_attribute( id_mod, 'epsg_code',                             &
+                              coord_ref_sys%epsg_code,                         &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'false_easting',                         &
+                              coord_ref_sys%false_easting,                     &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'false_northing',                        &
+                              coord_ref_sys%false_northing,                    &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'grid_mapping_name',                     &
+                              coord_ref_sys%grid_mapping_name,                 &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'inverse_flattening',                    &
+                              coord_ref_sys%inverse_flattening,                &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'latitude_of_projection_origin',         &
+                              coord_ref_sys%latitude_of_projection_origin,     &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'long_name',                             &
+                              coord_ref_sys%long_name,                         &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'longitude_of_central_meridian',         &
+                              coord_ref_sys%longitude_of_central_meridian,     &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'longitude_of_prime_meridian',           &
+                              coord_ref_sys%longitude_of_prime_meridian,       &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'scale_factor_at_central_meridian',      &
+                              coord_ref_sys%scale_factor_at_central_meridian,  &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'semi_major_axis',                       &
+                              coord_ref_sys%semi_major_axis,                   &
+                              .FALSE., 'crs' )
+          CALL get_attribute( id_mod, 'units',                                 &
+                              coord_ref_sys%units,                             &
+                              .FALSE., 'crs' )
+       ENDIF
+!
+!--    Finally, close input file
+       CALL close_input_file( id_mod )
+#endif
+!
+!--    Copy latitude, longitude, origin_z, rotation angle on init type
+       init_model%latitude        = input_file_atts%origin_lat
+       init_model%longitude       = input_file_atts%origin_lon
+       init_model%origin_time     = input_file_atts%origin_time  
+       init_model%origin_x        = input_file_atts%origin_x
+       init_model%origin_y        = input_file_atts%origin_y
+       init_model%origin_z        = input_file_atts%origin_z  
+       init_model%rotation_angle  = input_file_atts%rotation_angle  
+            
+!
+!--    In case of nested runs, each model domain might have different longitude
+!--    and latitude, which would result in different Coriolis parameters and
+!--    sun-zenith angles. To avoid this, longitude and latitude in each model
+!--    domain will be set to the values of the root model. Please note, this
+!--    synchronization is required already here. 
+#if defined( __parallel )
+       CALL MPI_BCAST( init_model%latitude,  1, MPI_REAL, 0,                   &
+                       MPI_COMM_WORLD, ierr )
+       CALL MPI_BCAST( init_model%longitude, 1, MPI_REAL, 0,                   &
+                       MPI_COMM_WORLD, ierr )
+#endif
+
+    END SUBROUTINE netcdf_data_input_init
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read an array of characters.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_var_char( val, search_string, id_mod )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  search_string     !< name of the variable
+       CHARACTER(LEN=*), DIMENSION(:) ::  val !< variable which should be read
+       
+       INTEGER(iwp) ::  id_mod   !< NetCDF id of input file
+
+#if defined ( __netcdf )
+!
+!--    Read variable
+       CALL get_variable( id_mod, search_string, val )
+#endif            
+
+    END SUBROUTINE netcdf_data_input_var_char
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read an 1D array of REAL values.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_var_real_1d( val, search_string, id_mod )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  search_string     !< name of the variable      
+       
+       INTEGER(iwp) ::  id_mod        !< NetCDF id of input file
+       
+       REAL(wp), DIMENSION(:) ::  val !< variable which should be read
+
+#if defined ( __netcdf )
+!
+!--    Read variable
+       CALL get_variable( id_mod, search_string, val )
+#endif            
+
+    END SUBROUTINE netcdf_data_input_var_real_1d
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read an 1D array of REAL values.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_var_real_2d( val, search_string,              &
+                                              id_mod, d1s, d1e, d2s, d2e )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  search_string     !< name of the variable     
+       
+       INTEGER(iwp) ::  id_mod  !< NetCDF id of input file
+       INTEGER(iwp) ::  d1e     !< end index of first dimension to be read
+       INTEGER(iwp) ::  d2e     !< end index of second dimension to be read
+       INTEGER(iwp) ::  d1s     !< start index of first dimension to be read
+       INTEGER(iwp) ::  d2s     !< start index of second dimension to be read
+       
+       REAL(wp), DIMENSION(:,:) ::  val !< variable which should be read
+
+#if defined ( __netcdf )
+!
+!--    Read character variable
+       CALL get_variable( id_mod, search_string, val, d1s, d1e, d2s, d2e )
+#endif            
+
+    END SUBROUTINE netcdf_data_input_var_real_2d
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read a global string attribute 
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_att_string( val, search_string, id_mod,       &
+                                             input_file, global, openclose,    &
+                                             variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  search_string !< name of the attribue
+       CHARACTER(LEN=*) ::  val           !< attribute
+       
+       CHARACTER(LEN=*) ::  input_file    !< name of input file
+       CHARACTER(LEN=*) ::  openclose     !< string indicating whether NetCDF needs to be opend or closed
+       CHARACTER(LEN=*) ::  variable_name !< string indicating whether NetCDF needs to be opend or closed  
+       
+       INTEGER(iwp) ::  id_mod   !< NetCDF id of input file
+       
+       LOGICAL ::  global                 !< flag indicating a global or a variable's attribute
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode if necessary
+       IF ( openclose == 'open' )  THEN
+          CALL open_read_file( TRIM( input_file ) // TRIM( coupling_char ), &
+                                  id_mod )
+       ENDIF
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          CALL get_attribute( id_mod, search_string, val, global )
+!
+!--    Read variable attribute
+       ELSE
+          CALL get_attribute( id_mod, search_string, val, global, variable_name )
+       ENDIF
+!
+!--    Close input file 
+       IF ( openclose == 'close' )  CALL close_input_file( id_mod )
+#endif            
+
+    END SUBROUTINE netcdf_data_input_att_string
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read a global integer attribute 
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_att_int( val, search_string, id_mod,          &
+                                          input_file, global, openclose,       &
+                                          variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  search_string !< name of the attribue
+       
+       CHARACTER(LEN=*) ::  input_file    !< name of input file
+       CHARACTER(LEN=*) ::  openclose     !< string indicating whether NetCDF needs to be opend or closed
+       CHARACTER(LEN=*) ::  variable_name !< string indicating whether NetCDF needs to be opend or closed 
+       
+       INTEGER(iwp) ::  id_mod   !< NetCDF id of input file
+       INTEGER(iwp) ::  val      !< value of the attribute
+       
+       LOGICAL ::  global                 !< flag indicating a global or a variable's attribute
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       IF ( openclose == 'open' )  THEN
+          CALL open_read_file( TRIM( input_file ) // TRIM( coupling_char ), &
+                                  id_mod )
+       ENDIF
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          CALL get_attribute( id_mod, search_string, val, global )
+!
+!--    Read variable attribute
+       ELSE
+          CALL get_attribute( id_mod, search_string, val, global, variable_name )
+       ENDIF
+!
+!--    Finally, close input file
+       IF ( openclose == 'close' )  CALL close_input_file( id_mod )
+#endif            
+
+    END SUBROUTINE netcdf_data_input_att_int
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read a global real attribute 
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_att_real( val, search_string, id_mod,         &
+                                           input_file, global, openclose,      &
+                                           variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  search_string !< name of the attribue
+       
+       CHARACTER(LEN=*) ::  input_file    !< name of input file
+       CHARACTER(LEN=*) ::  openclose     !< string indicating whether NetCDF needs to be opend or closed
+       CHARACTER(LEN=*) ::  variable_name !< string indicating whether NetCDF needs to be opend or closed 
+       
+       INTEGER(iwp) ::  id_mod            !< NetCDF id of input file
+       
+       LOGICAL ::  global                 !< flag indicating a global or a variable's attribute
+       
+       REAL(wp) ::  val                   !< value of the attribute
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       IF ( openclose == 'open' )  THEN
+          CALL open_read_file( TRIM( input_file ) // TRIM( coupling_char ), &
+                                  id_mod )
+       ENDIF
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          CALL get_attribute( id_mod, search_string, val, global )
+!
+!--    Read variable attribute
+       ELSE
+          CALL get_attribute( id_mod, search_string, val, global, variable_name )
+       ENDIF
+!
+!--    Finally, close input file
+       IF ( openclose == 'close' )  CALL close_input_file( id_mod )
+#endif            
+
+    END SUBROUTINE netcdf_data_input_att_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads Chemistry NETCDF Input data, such as emission values, emission species, etc. .
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_chemistry_data(emt_att,emt)
+
+       USE chem_modules,                                       &
+           ONLY:  do_emis, mode_emis, time_fac_type,           & 
+                  surface_csflux_name 
+
+       USE control_parameters,                                 &
+           ONLY:  message_string
+
+       USE indices,                                            &
+           ONLY:  nz, nx, ny, nxl, nxr, nys, nyn, nzb, nzt
+
+       IMPLICIT NONE
+
+       TYPE(chem_emis_att_type), INTENT(INOUT)                                        :: emt_att
+       TYPE(chem_emis_val_type), ALLOCATABLE, DIMENSION(:), INTENT(INOUT)             :: emt
+    
+       CHARACTER (LEN=80)                               :: units=''              !< units of chemistry inputs
+ 
+       INTEGER(iwp)                                     :: ispec                 !< index for number of emission species in input
+
+       INTEGER(iwp), ALLOCATABLE, DIMENSION(:)          :: dum_var               !< value of variable read from netcdf input
+       INTEGER(iwp)                                     :: errno                 !< error number NF90_???? function
+       INTEGER(iwp)                                     :: id_var                !< variable id
+!       INTEGER(iwp)                                     :: id_emis               !< NetCDF id of input file
+       INTEGER(iwp)                                     :: num_vars              !< number of variables in netcdf input file
+       INTEGER(iwp)                                     :: len_dims,len_dims_2   !< Length of dimensions
+
+       INTEGER(iwp)                                     :: max_string_length=25  !< Variable for the maximum length of a string
+ 
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE    :: var_names             !< Name of Variables
+
+       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)          :: dum_var_3d            !< variable for storing temporary data of 3-dimensional 
+                                                                                 !  variables read from netcdf for chemistry emissions
+
+       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:)        :: dum_var_4d            !< variable for storing temporary data of 5-dimensional
+                                                                                 !< variables read from netcdf for chemistry emissions
+!--
+       !> Start the processing of the data
+       CALL location_message( 'starting allocation of chemistry emissions arrays', .FALSE. )
+
+       !> Parameterized mode of the emissions
+       IF (TRIM(mode_emis)=="PARAMETERIZED" .OR. TRIM(mode_emis)=="parameterized") THEN 
+
+           ispec=1
+           emt_att%nspec=0
+
+          !number of species
+           DO  WHILE (TRIM( surface_csflux_name( ispec ) ) /= 'novalue' )
+
+             emt_att%nspec=emt_att%nspec+1
+             ispec=ispec+1
+
+           ENDDO
+
+          !-- allocate emission values data type arrays
+          ALLOCATE(emt(emt_att%nspec))
+
+          !-- Read EMISSION SPECIES NAMES
+
+          !Assign values
+          ALLOCATE(emt_att%species_name(emt_att%nspec))
+ 
+         DO ispec=1,emt_att%nspec
+            emt_att%species_name(ispec) = TRIM(surface_csflux_name(ispec))
+         ENDDO
+
+
+       !> DEFAULT AND PRE-PROCESSED MODE
+       ELSE
+
+#if defined ( __netcdf )        
+          IF ( .NOT. input_pids_chem )  RETURN
+
+          !-- Open file in read-only mode
+          CALL open_read_file( TRIM( input_file_chem ) //                       &
+                               TRIM( coupling_char ), id_emis )
+          !-- inquire number of variables
+          CALL inquire_num_variables( id_emis, num_vars )
+
+          !-- Get General Dimension Lengths: only number of species and number of categories.
+          !                                  the other dimensions depend on the mode of the emissions or on the presence of specific components
+          !nspecies
+          CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nspec, 'nspecies' )
+
+ 
+          !-- Allocate emission values data type arrays
+          ALLOCATE(emt(1:emt_att%nspec))
+
+
+          !-- Read EMISSION SPECIES NAMES
+          !Allocate Arrays 
+          ALLOCATE(emt_att%species_name(emt_att%nspec)) 
+
+          !Call get Variable
+          CALL get_variable( id_emis, 'emission_name', string_values, emt_att%nspec )
+          emt_att%species_name=string_values
+          ! If allocated, Deallocate var_string, an array only used for reading-in strings
+          IF (ALLOCATED(string_values)) DEALLOCATE(string_values) 
+
+          !-- Read EMISSION SPECIES INDEX
+          !Allocate Arrays 
+          ALLOCATE(emt_att%species_index(emt_att%nspec))
+          !Call get Variable
+          CALL get_variable( id_emis, 'emission_index', emt_att%species_index )
+
+
+          !-- Now the routine has to distinguish between DEFAULT and PRE-PROCESSED chemistry emission modes
+
+          IF (TRIM(mode_emis)=="DEFAULT" .OR. TRIM(mode_emis)=="default") THEN
+ 
+             !number of categories
+             CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%ncat, 'ncat' )
+
+             !-- Read EMISSION CATEGORIES INDEX
+             !Allocate Arrays 
+             ALLOCATE(emt_att%cat_index(emt_att%ncat))
+             !Call get Variable
+             CALL get_variable( id_emis, 'emission_cat_index', emt_att%cat_index )
+
+ 
+             DO ispec=1,emt_att%nspec
+                !-- EMISSION_VOC_NAME (1-DIMENSIONAL)
+                IF (TRIM(emt_att%species_name(ispec))=="VOC" .OR. TRIM(emt_att%species_name(ispec))=="voc") THEN
+                   !Allocate Array
+                   CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nvoc, 'nvoc' )
+                   ALLOCATE(emt_att%voc_name(1:emt_att%nvoc))
+                   !Read-in Variable
+                   CALL get_variable( id_emis,"emission_voc_name",string_values, emt_att%nvoc)
+                   emt_att%voc_name=string_values
+                   IF (ALLOCATED(string_values)) DEALLOCATE(string_values)
+ 
+                !-- COMPOSITION VOC (2-DIMENSIONAL)
+                   !Allocate Array 
+                   ALLOCATE(emt_att%voc_comp(1:emt_att%ncat,1:emt_att%nvoc))
+                   !Read-in Variable
+!               CALL get_variable(id_emis,"composition_voc",emt%voc_comp,1,1,emt%ncat,emt%nvoc)
+                   CALL get_variable(id_emis,"composition_voc",emt_att%voc_comp,1,emt_att%ncat,1,emt_att%nvoc)
+                ENDIF
+
+                !-- EMISSION_PM_NAME (1-DIMENSIONAL)
+                IF (TRIM(emt_att%species_name(ispec))=="PM" .OR. TRIM(emt_att%species_name(ispec))=="pm") THEN
+                   CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%npm, 'npm' )
+                   ALLOCATE(emt_att%pm_name(1:emt_att%npm))
+                   !Read-in Variable
+                   CALL get_variable( id_emis,"pm_name",string_values, emt_att%npm)
+                   emt_att%pm_name=string_values
+                   IF (ALLOCATED(string_values)) DEALLOCATE(string_values)      
+
+                !-- COMPOSITION PM (3-DIMENSIONAL)
+                   !Allocate
+                   len_dims=3  !> number of PMs: PM1, PM2.5 and PM10
+                   ALLOCATE(emt_att%pm_comp(1:emt_att%ncat,1:emt_att%npm,1:len_dims))
+                   !Read-in Variable
+                   CALL get_variable(id_emis,"composition_pm",emt_att%pm_comp,1,emt_att%ncat,1,emt_att%npm,1,len_dims)                    
+                ENDIF
+
+                !-- COMPOSITION_NOX (2-DIMENSIONAL)
+                IF (TRIM(emt_att%species_name(ispec))=="NOx" .OR. TRIM(emt_att%species_name(ispec))=="nox") THEN
+                   !Allocate array
+                   ALLOCATE(emt_att%nox_comp(1:emt_att%ncat,1:emt_att%nnox))
+                   !Read-in Variable
+                   CALL get_variable(id_emis,"composition_nox",emt_att%nox_comp,1,emt_att%ncat,1,emt_att%nnox)
+                ENDIF
+
+                !-- COMPOSITION-SOX (2-DIMENSIONAL)
+                IF (TRIM(emt_att%species_name(ispec))=="SOx" .OR. TRIM(emt_att%species_name(ispec))=="sox") THEN
+                   ALLOCATE(emt_att%sox_comp(1:emt_att%ncat,1:emt_att%nsox))
+                   !Read-in Variable
+                   CALL get_variable(id_emis,"composition_sox",emt_att%sox_comp,1,emt_att%ncat,1,emt_att%nsox)
+                ENDIF
+             ENDDO !>ispec
+
+!-- For reading the emission time factors, the distinction between HOUR and MDH data is necessary
+      
+             !-- EMISSION_TIME_SCALING_FACTORS
+                !-- HOUR   
+             IF (TRIM(time_fac_type)=="HOUR" .OR. TRIM(time_fac_type)=="hour") THEN
+                !-- Allocate Array
+                CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nhoursyear, 'nhoursyear' )
+                ALLOCATE(emt_att%hourly_emis_time_factor(1:emt_att%ncat,1:emt_att%nhoursyear))
+                !Read-in Variable
+                CALL get_variable(id_emis,"emission_time_factors",emt_att%hourly_emis_time_factor,1,   &
+                                  emt_att%ncat,1,emt_att%nhoursyear)
+
+                !-- MDH
+             ELSE IF (TRIM(time_fac_type) == "MDH" .OR. TRIM(time_fac_type) == "mdh") THEN
+                !-- Allocate Array
+                CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nmonthdayhour, 'nmonthdayhour' )
+                ALLOCATE(emt_att%mdh_emis_time_factor(1:emt_att%ncat,1:emt_att%nmonthdayhour))
+                !-- Read-in Variable
+                CALL get_variable(id_emis,"emission_time_factors",emt_att%mdh_emis_time_factor,1,       &
+                                  emt_att%ncat,1,emt_att%nmonthdayhour)
+
+             ELSE
+
+             message_string = 'We are in the DEFAULT chemistry emissions mode: '            //          &
+                              '     !no time-factor type specified!'                        //          &
+                              'Please, specify the value of time_fac_type:'                 //          &
+                              '         either "MDH" or "HOUR"'                  
+             CALL message( 'netcdf_data_input_chemistry_data', 'CM0200', 2, 2, 0, 6, 0 ) 
+ 
+
+             ENDIF
+
+             !-- Finally read-in the emission values and their units (DEFAULT mode)
+
+             DO ispec=1,emt_att%nspec
+
+                IF ( .NOT. ALLOCATED( emt(ispec)%default_emission_data ) )                              &
+                    ALLOCATE(emt(ispec)%default_emission_data(1:emt_att%ncat,1:ny+1,1:nx+1))
+
+                ALLOCATE(dum_var_3d(1:emt_att%ncat,nys+1:nyn+1,nxl+1:nxr+1))
+
+                CALL get_variable(id_emis,"emission_values",dum_var_3d,ispec,1,emt_att%ncat,nys,nyn,nxl,nxr)          
+
+                emt(ispec)%default_emission_data(:,nys+1:nyn+1,nxl+1:nxr+1) =                           &
+                    dum_var_3d(1:emt_att%ncat,nys+1:nyn+1,nxl+1:nxr+1)
+
+                DEALLOCATE (dum_var_3d)
+
+             ENDDO
+
+             !-- UNITS
+             CALL get_attribute(id_emis,"units",emt_att%units,.FALSE.,"emission_values")
+
+
+          !-- PRE-PROCESSED MODE --
+
+          ELSE IF (TRIM(mode_emis)=="PRE-PROCESSED" .OR. TRIM(mode_emis)=="pre-processed") THEN
+          !-- In the PRE-PROCESSED mode, only the VOC names, the VOC_composition, the emission values and their units remain to be read at this point
+
+             DO ispec=1,emt_att%nspec
+
+             !-- EMISSION_VOC_NAME (1-DIMENSIONAL)
+                IF (TRIM(emt_att%species_name(ispec))=="VOC" .OR. TRIM(emt_att%species_name(ispec))=="voc") THEN
+                   !Allocate Array
+                   CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%nvoc, 'nvoc' )
+                   ALLOCATE(emt_att%voc_name(1:emt_att%nvoc))
+                   !Read-in Variable
+                   CALL get_variable( id_emis,"emission_voc_name",string_values, emt_att%nvoc)
+                   emt_att%voc_name=string_values
+                   IF (ALLOCATED(string_values)) DEALLOCATE(string_values)
+ 
+             !-- COMPOSITION VOC (2-DIMENSIONAL)
+                   !Allocate Array 
+                   ALLOCATE(emt_att%voc_comp(1:emt_att%ncat,1:emt_att%nvoc))
+                   !Read-in Variable
+                   CALL get_variable(id_emis,"composition_voc",emt_att%voc_comp,1,emt_att%ncat,1,emt_att%nvoc)
+                ENDIF
+  
+             ENDDO !> ispec
+
+             !-- EMISSION_VALUES (4-DIMENSIONAL)
+             !Calculate temporal dimension length
+             CALL netcdf_data_input_get_dimension_length( id_emis, emt_att%dt_emission, 'time' )   
+         
+
+             DO ispec=1,emt_att%nspec
+
+                !Allocation for the entire domain has to be done only for the first processor between all the subdomains     
+                IF ( .NOT. ALLOCATED( emt(ispec)%preproc_emission_data ) )                              &
+                    ALLOCATE(emt(ispec)%preproc_emission_data(emt_att%dt_emission,1,1:ny+1,1:nx+1))
+
+                !> allocate variable where to pass emission values read from netcdf
+                ALLOCATE(dum_var_4d(1:emt_att%dt_emission,1,nys+1:nyn+1,nxl+1:nxr+1))
+
+                !Read-in Variable 
+                CALL get_variable(id_emis,"emission_values",dum_var_4d,ispec,1,emt_att%dt_emission,1,1,nys,nyn,nxl,nxr)          
+
+      
+                emt(ispec)%preproc_emission_data(:,1,nys+1:nyn+1,nxl+1:nxr+1) =                         &
+                      dum_var_4d(1:emt_att%dt_emission,1,nys+1:nyn+1,nxl+1:nxr+1)
+
+                DEALLOCATE ( dum_var_4d )
+
+             ENDDO
+
+             !-- UNITS
+             CALL get_attribute(id_emis,"units",emt_att%units,.FALSE.,"emission_values")
+       
+          ENDIF
+
+       CALL close_input_file( id_emis )
+
+#endif
+       ENDIF
+
+    END SUBROUTINE netcdf_data_input_chemistry_data
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads surface classification data, such as vegetation and soil type, etc. .
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_surface_data
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, land_surface, plant_canopy,            &
+                  urban_surface
+
+       USE indices,                                                            &
+           ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg
+
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names  !< variable names in static input file
+
+       INTEGER(iwp) ::  id_surf   !< NetCDF id of input file
+       INTEGER(iwp) ::  k         !< running index along z-direction
+       INTEGER(iwp) ::  k2        !< running index
+       INTEGER(iwp) ::  num_vars  !< number of variables in input file
+       INTEGER(iwp) ::  nz_soil   !< number of soil layers in file
+
+       INTEGER(iwp), DIMENSION(nysg:nyng,nxlg:nxrg) ::  var_exchange_int !< dummy variables used to exchange 32-bit Integer arrays
+       INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE  ::  var_dum_int_3d !< dummy variables used to exchange real arrays
+
+       REAL(wp), DIMENSION(nysg:nyng,nxlg:nxrg) ::  var_exchange_real !< dummy variables used to exchange real arrays
+
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  var_dum_real_3d !< dummy variables used to exchange real arrays
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  var_dum_real_4d !< dummy variables used to exchange real arrays
+
+!
+!--    If not static input file is available, skip this routine
+       IF ( .NOT. input_pids_static )  RETURN
+!
+!--    Measure CPU time
+       CALL cpu_log( log_point_s(82), 'NetCDF input', 'start' )
+!
+!--    Read plant canopy variables.
+       IF ( plant_canopy )  THEN
+#if defined ( __netcdf )
+!
+!--       Open file in read-only mode
+          CALL open_read_file( TRIM( input_file_static ) //                    &
+                               TRIM( coupling_char ) , id_surf )
+!
+!--       At first, inquire all variable names.
+!--       This will be used to check whether an optional input variable
+!--       exist or not.
+          CALL inquire_num_variables( id_surf, num_vars )
+
+          ALLOCATE( var_names(1:num_vars) )
+          CALL inquire_variable_names( id_surf, var_names )
+
+!
+!--       Read leaf area density - resolved vegetation
+          IF ( check_existence( var_names, 'lad' ) )  THEN
+             leaf_area_density_f%from_file = .TRUE.
+             CALL get_attribute( id_surf, char_fill,                           &
+                                 leaf_area_density_f%fill,                     &
+                                 .FALSE., 'lad' )
+!
+!--          Inquire number of vertical vegetation layer
+             CALL netcdf_data_input_get_dimension_length( id_surf,             &
+                                                 leaf_area_density_f%nz,       &
+                                                 'zlad' )
+!
+!--          Allocate variable for leaf-area density
+             ALLOCATE( leaf_area_density_f%var( 0:leaf_area_density_f%nz-1,    &
+                                                nys:nyn,nxl:nxr) )
+
+             CALL get_variable( id_surf, 'lad', leaf_area_density_f%var,       &
+                                nxl, nxr, nys, nyn,                            &
+                                0, leaf_area_density_f%nz-1 )
+
+          ELSE
+             leaf_area_density_f%from_file = .FALSE.
+          ENDIF
+
+!
+!--       Read basal area density - resolved vegetation
+          IF ( check_existence( var_names, 'bad' ) )  THEN
+             basal_area_density_f%from_file = .TRUE.
+             CALL get_attribute( id_surf, char_fill,                           &
+                                 basal_area_density_f%fill,                    &
+                                 .FALSE., 'bad' )
+!
+!--          Inquire number of vertical vegetation layer
+             CALL netcdf_data_input_get_dimension_length( id_surf,             &
+                                                 basal_area_density_f%nz,      &
+                                                 'zlad' )
+!
+!--          Allocate variable
+             ALLOCATE( basal_area_density_f%var(0:basal_area_density_f%nz-1,   &
+                                                nys:nyn,nxl:nxr) )
+
+             CALL get_variable( id_surf, 'bad', basal_area_density_f%var,      &
+                                nxl, nxr, nys, nyn,                            &
+                                0,  basal_area_density_f%nz-1 )
+          ELSE
+             basal_area_density_f%from_file = .FALSE.
+          ENDIF
+
+!
+!--       Read root area density - resolved vegetation
+          IF ( check_existence( var_names, 'root_area_dens_r' ) )  THEN
+             root_area_density_lad_f%from_file = .TRUE.
+             CALL get_attribute( id_surf, char_fill,                           &
+                                 root_area_density_lad_f%fill,                 &
+                                 .FALSE., 'root_area_dens_r' )
+!
+!--          Inquire number of vertical soil layers
+             CALL netcdf_data_input_get_dimension_length( id_surf,             &
+                                                   root_area_density_lad_f%nz, &
+                                                  'zsoil' )
+!
+!--          Allocate variable
+             ALLOCATE( root_area_density_lad_f%var                             &
+                                         (0:root_area_density_lad_f%nz-1,      &
+                                          nys:nyn,nxl:nxr) )
+
+             CALL get_variable( id_surf, 'root_area_dens_r',                   &
+                                root_area_density_lad_f%var,                   &
+                                nxl, nxr, nys, nyn,                            &
+                                0,  root_area_density_lad_f%nz-1 )
+          ELSE
+             root_area_density_lad_f%from_file = .FALSE.
+          ENDIF
+!
+!--       Finally, close input file
+          CALL close_input_file( id_surf )
+#endif
+       ENDIF
+!
+!--    Deallocate variable list. Will be re-allocated in case further
+!--    variables are read from file.
+       IF ( ALLOCATED( var_names ) )  DEALLOCATE( var_names )
+!
+!--    Skip the following if no land-surface or urban-surface module are
+!--    applied. This case, no one of the following variables is used anyway.
+       IF (  .NOT. land_surface  .AND.  .NOT. urban_surface )  RETURN
+!
+!--    Initialize dummy arrays used for ghost-point exchange
+       var_exchange_int  = 0
+       var_exchange_real = 0.0_wp
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       CALL open_read_file( TRIM( input_file_static ) //                       &
+                            TRIM( coupling_char ) , id_surf )
+!
+!--    Inquire all variable names.
+!--    This will be used to check whether an optional input variable exist
+!--    or not.
+       CALL inquire_num_variables( id_surf, num_vars )
+
+       ALLOCATE( var_names(1:num_vars) )
+       CALL inquire_variable_names( id_surf, var_names )
+!
+!--    Read vegetation type and required attributes
+       IF ( check_existence( var_names, 'vegetation_type' ) )  THEN
+          vegetation_type_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              vegetation_type_f%fill,                          &
+                              .FALSE., 'vegetation_type' )
+
+          ALLOCATE ( vegetation_type_f%var(nys:nyn,nxl:nxr)  )
+
+          CALL get_variable( id_surf, 'vegetation_type',                       &
+                             vegetation_type_f%var, nxl, nxr, nys, nyn )
+       ELSE
+          vegetation_type_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read soil type and required attributes
+       IF ( check_existence( var_names, 'soil_type' ) )  THEN
+             soil_type_f%from_file = .TRUE.
+!
+!--       Note, lod is currently not on file; skip for the moment
+!           CALL get_attribute( id_surf, char_lod,                       &
+!                                      soil_type_f%lod,                  &
+!                                      .FALSE., 'soil_type' )
+          CALL get_attribute( id_surf, char_fill,                              &
+                              soil_type_f%fill,                                &
+                              .FALSE., 'soil_type' )
+
+          IF ( soil_type_f%lod == 1 )  THEN
+
+             ALLOCATE ( soil_type_f%var_2d(nys:nyn,nxl:nxr)  )
+
+             CALL get_variable( id_surf, 'soil_type', soil_type_f%var_2d,      &
+                                nxl, nxr, nys, nyn )
+
+          ELSEIF ( soil_type_f%lod == 2 )  THEN
+!
+!--          Obtain number of soil layers from file.
+             CALL netcdf_data_input_get_dimension_length( id_surf, nz_soil,    &
+                                                          'zsoil' )
+
+             ALLOCATE ( soil_type_f%var_3d(0:nz_soil,nys:nyn,nxl:nxr) )
+
+             CALL get_variable( id_surf, 'soil_type', soil_type_f%var_3d,      &
+                                nxl, nxr, nys, nyn, 0, nz_soil )
+ 
+          ENDIF
+       ELSE
+          soil_type_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read pavement type and required attributes
+       IF ( check_existence( var_names, 'pavement_type' ) )  THEN
+          pavement_type_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              pavement_type_f%fill, .FALSE.,                   &
+                              'pavement_type' )
+
+          ALLOCATE ( pavement_type_f%var(nys:nyn,nxl:nxr)  )
+
+          CALL get_variable( id_surf, 'pavement_type', pavement_type_f%var,    &
+                             nxl, nxr, nys, nyn )
+       ELSE
+          pavement_type_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read water type and required attributes
+       IF ( check_existence( var_names, 'water_type' ) )  THEN
+          water_type_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill, water_type_f%fill,           &
+                              .FALSE., 'water_type' )
+
+          ALLOCATE ( water_type_f%var(nys:nyn,nxl:nxr)  )
+
+          CALL get_variable( id_surf, 'water_type', water_type_f%var,          &
+                             nxl, nxr, nys, nyn )
+
+       ELSE
+          water_type_f%from_file = .FALSE.
+       ENDIF
+!
+!--    Read relative surface fractions of vegetation, pavement and water.
+       IF ( check_existence( var_names, 'surface_fraction' ) )  THEN
+          surface_fraction_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              surface_fraction_f%fill,                         &
+                              .FALSE., 'surface_fraction' )
+!
+!--       Inquire number of surface fractions
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       surface_fraction_f%nf,  &
+                                                       'nsurface_fraction' )
+!
+!--       Allocate dimension array and input array for surface fractions
+          ALLOCATE( surface_fraction_f%nfracs(0:surface_fraction_f%nf-1) )
+          ALLOCATE( surface_fraction_f%frac(0:surface_fraction_f%nf-1,         &
+                                            nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of surface fractions
+          CALL get_variable( id_surf, 'nsurface_fraction',                     &
+                             surface_fraction_f%nfracs )
+!
+!--       Read surface fractions
+          CALL get_variable( id_surf, 'surface_fraction',                      &
+                             surface_fraction_f%frac, nxl, nxr, nys, nyn,      &
+                             0, surface_fraction_f%nf-1 )
+       ELSE
+          surface_fraction_f%from_file = .FALSE.
+       ENDIF
+!
+!--    Read building parameters and related information
+       IF ( check_existence( var_names, 'building_pars' ) )  THEN
+          building_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              building_pars_f%fill,                            &
+                              .FALSE., 'building_pars' )
+!
+!--       Inquire number of building parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       building_pars_f%np,     &
+                                                       'nbuilding_pars' )
+!
+!--       Allocate dimension array and input array for building parameters
+          ALLOCATE( building_pars_f%pars(0:building_pars_f%np-1) )
+          ALLOCATE( building_pars_f%pars_xy(0:building_pars_f%np-1,            &
+                                            nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of building parameters
+          CALL get_variable( id_surf, 'nbuilding_pars',                        &
+                             building_pars_f%pars )
+!
+!--       Read building_pars
+          CALL get_variable( id_surf, 'building_pars',                         &
+                             building_pars_f%pars_xy, nxl, nxr, nys, nyn,      &
+                             0, building_pars_f%np-1 )
+       ELSE
+          building_pars_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read albedo type and required attributes
+       IF ( check_existence( var_names, 'albedo_type' ) )  THEN
+          albedo_type_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill, albedo_type_f%fill,          &
+                              .FALSE.,  'albedo_type' )
+
+          ALLOCATE ( albedo_type_f%var(nys:nyn,nxl:nxr)  )
+          
+          CALL get_variable( id_surf, 'albedo_type', albedo_type_f%var,        &
+                             nxl, nxr, nys, nyn )
+       ELSE
+          albedo_type_f%from_file = .FALSE.
+       ENDIF
+!
+!--    Read albedo parameters and related information
+       IF ( check_existence( var_names, 'albedo_pars' ) )  THEN
+          albedo_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill, albedo_pars_f%fill,          &
+                              .FALSE., 'albedo_pars' )
+!
+!--       Inquire number of albedo parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       albedo_pars_f%np,       &
+                                                       'nalbedo_pars' )
+!
+!--       Allocate dimension array and input array for albedo parameters
+          ALLOCATE( albedo_pars_f%pars(0:albedo_pars_f%np-1) )
+          ALLOCATE( albedo_pars_f%pars_xy(0:albedo_pars_f%np-1,                &
+                                          nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of albedo parameters
+          CALL get_variable( id_surf, 'nalbedo_pars', albedo_pars_f%pars )
+
+          CALL get_variable( id_surf, 'albedo_pars', albedo_pars_f%pars_xy,    &
+                             nxl, nxr, nys, nyn,                               &
+                             0, albedo_pars_f%np-1 )
+       ELSE
+          albedo_pars_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read pavement parameters and related information
+       IF ( check_existence( var_names, 'pavement_pars' ) )  THEN
+          pavement_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              pavement_pars_f%fill,                            &
+                              .FALSE., 'pavement_pars' )
+!
+!--       Inquire number of pavement parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       pavement_pars_f%np,     &
+                                                       'npavement_pars' )
+!
+!--       Allocate dimension array and input array for pavement parameters
+          ALLOCATE( pavement_pars_f%pars(0:pavement_pars_f%np-1) )
+          ALLOCATE( pavement_pars_f%pars_xy(0:pavement_pars_f%np-1,            &
+                                            nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of pavement parameters
+          CALL get_variable( id_surf, 'npavement_pars', pavement_pars_f%pars )
+
+          CALL get_variable( id_surf, 'pavement_pars', pavement_pars_f%pars_xy,&
+                             nxl, nxr, nys, nyn,                               &
+                             0, pavement_pars_f%np-1 )
+       ELSE
+          pavement_pars_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read pavement subsurface parameters and related information
+       IF ( check_existence( var_names, 'pavement_subsurface_pars' ) )         &
+       THEN
+          pavement_subsurface_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              pavement_subsurface_pars_f%fill,                 &
+                              .FALSE., 'pavement_subsurface_pars' )
+!
+!--       Inquire number of parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                pavement_subsurface_pars_f%np, &
+                                               'npavement_subsurface_pars' )
+!
+!--       Inquire number of soil layers
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                pavement_subsurface_pars_f%nz, &
+                                                'zsoil' )
+!
+!--       Allocate dimension array and input array for pavement parameters
+          ALLOCATE( pavement_subsurface_pars_f%pars                            &
+                            (0:pavement_subsurface_pars_f%np-1) )
+          ALLOCATE( pavement_subsurface_pars_f%pars_xyz                        &
+                            (0:pavement_subsurface_pars_f%np-1,                &
+                             0:pavement_subsurface_pars_f%nz-1,                &
+                             nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of pavement parameters
+          CALL get_variable( id_surf, 'npavement_subsurface_pars',             &
+                             pavement_subsurface_pars_f%pars )
+
+          CALL get_variable( id_surf, 'pavement_subsurface_pars',              &
+                             pavement_subsurface_pars_f%pars_xyz,              &
+                             nxl, nxr, nys, nyn,                               &
+                             0, pavement_subsurface_pars_f%nz-1,               &
+                             0, pavement_subsurface_pars_f%np-1 )
+       ELSE
+          pavement_subsurface_pars_f%from_file = .FALSE.
+       ENDIF
+
+
+!
+!--    Read vegetation parameters and related information
+       IF ( check_existence( var_names, 'vegetation_pars' ) )  THEN
+          vegetation_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              vegetation_pars_f%fill,                          &
+                              .FALSE.,  'vegetation_pars' )
+!
+!--       Inquire number of vegetation parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       vegetation_pars_f%np,   &
+                                                       'nvegetation_pars' )
+!
+!--       Allocate dimension array and input array for surface fractions
+          ALLOCATE( vegetation_pars_f%pars(0:vegetation_pars_f%np-1) )
+          ALLOCATE( vegetation_pars_f%pars_xy(0:vegetation_pars_f%np-1,        &
+                                              nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of the parameters
+          CALL get_variable( id_surf, 'nvegetation_pars',                      &
+                             vegetation_pars_f%pars )
+
+          CALL get_variable( id_surf, 'vegetation_pars',                       &
+                             vegetation_pars_f%pars_xy, nxl, nxr, nys, nyn,    &
+                             0, vegetation_pars_f%np-1 )
+       ELSE
+          vegetation_pars_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read root parameters/distribution and related information
+       IF ( check_existence( var_names, 'soil_pars' ) )  THEN
+          soil_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              soil_pars_f%fill,                                &
+                              .FALSE., 'soil_pars' )
+
+          CALL get_attribute( id_surf, char_lod,                               &
+                              soil_pars_f%lod,                                 &
+                              .FALSE., 'soil_pars' )
+
+!
+!--       Inquire number of soil parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       soil_pars_f%np,         &
+                                                       'nsoil_pars' )
+!
+!--       Read parameters array
+          ALLOCATE( soil_pars_f%pars(0:soil_pars_f%np-1) )
+          CALL get_variable( id_surf, 'nsoil_pars', soil_pars_f%pars )
+
+!
+!--       In case of level of detail 2, also inquire number of vertical
+!--       soil layers, allocate memory and read the respective dimension
+          IF ( soil_pars_f%lod == 2 )  THEN
+             CALL netcdf_data_input_get_dimension_length( id_surf,             &
+                                                          soil_pars_f%nz,      &
+                                                          'zsoil' )
+
+             ALLOCATE( soil_pars_f%layers(0:soil_pars_f%nz-1) )
+             CALL get_variable( id_surf, 'zsoil', soil_pars_f%layers )
+
+          ENDIF
+
+!
+!--       Read soil parameters, depending on level of detail
+          IF ( soil_pars_f%lod == 1 )  THEN
+             ALLOCATE( soil_pars_f%pars_xy(0:soil_pars_f%np-1,                 &
+                                           nys:nyn,nxl:nxr) )
+                  
+             CALL get_variable( id_surf, 'soil_pars', soil_pars_f%pars_xy,     &
+                                nxl, nxr, nys, nyn, 0, soil_pars_f%np-1 )
+
+          ELSEIF ( soil_pars_f%lod == 2 )  THEN
+             ALLOCATE( soil_pars_f%pars_xyz(0:soil_pars_f%np-1,                &
+                                            0:soil_pars_f%nz-1,                &
+                                            nys:nyn,nxl:nxr) )
+             CALL get_variable( id_surf, 'soil_pars',                          &
+                                soil_pars_f%pars_xyz,                          &
+                                nxl, nxr, nys, nyn, 0, soil_pars_f%nz-1,       &
+                                0, soil_pars_f%np-1 )
+
+          ENDIF
+       ELSE
+          soil_pars_f%from_file = .FALSE.
+       ENDIF
+
+!
+!--    Read water parameters and related information
+       IF ( check_existence( var_names, 'water_pars' ) )  THEN
+          water_pars_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              water_pars_f%fill,                               &
+                              .FALSE., 'water_pars' )
+!
+!--       Inquire number of water parameters
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                       water_pars_f%np,        &
+                                                       'nwater_pars' )
+!
+!--       Allocate dimension array and input array for water parameters
+          ALLOCATE( water_pars_f%pars(0:water_pars_f%np-1) )
+          ALLOCATE( water_pars_f%pars_xy(0:water_pars_f%np-1,                  &
+                                         nys:nyn,nxl:nxr) )
+!
+!--       Get dimension of water parameters
+          CALL get_variable( id_surf, 'nwater_pars', water_pars_f%pars )
+
+          CALL get_variable( id_surf, 'water_pars', water_pars_f%pars_xy,      &
+                             nxl, nxr, nys, nyn, 0, water_pars_f%np-1 )
+       ELSE
+          water_pars_f%from_file = .FALSE.
+       ENDIF
+!
+!--    Read root area density - parametrized vegetation
+       IF ( check_existence( var_names, 'root_area_dens_s' ) )  THEN
+          root_area_density_lsm_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              root_area_density_lsm_f%fill,                    &
+                              .FALSE., 'root_area_dens_s' )
+!
+!--       Obtain number of soil layers from file and allocate variable
+          CALL netcdf_data_input_get_dimension_length( id_surf,                &
+                                                   root_area_density_lsm_f%nz, &
+                                                   'zsoil' )
+          ALLOCATE( root_area_density_lsm_f%var                                &
+                                        (0:root_area_density_lsm_f%nz-1,       &
+                                         nys:nyn,nxl:nxr) )
+
+!
+!--       Read root-area density
+          CALL get_variable( id_surf, 'root_area_dens_s',                      &
+                             root_area_density_lsm_f%var,                      &
+                             nxl, nxr, nys, nyn,                               &
+                             0, root_area_density_lsm_f%nz-1 )
+
+       ELSE
+          root_area_density_lsm_f%from_file = .FALSE.
+       ENDIF
+!
+!--    Read street type and street crossing
+       IF ( check_existence( var_names, 'street_type' ) )  THEN
+          street_type_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              street_type_f%fill, .FALSE.,                     &
+                              'street_type' )
+
+          ALLOCATE ( street_type_f%var(nys:nyn,nxl:nxr)  )
+          
+          CALL get_variable( id_surf, 'street_type', street_type_f%var,        &
+                             nxl, nxr, nys, nyn )
+       ELSE
+          street_type_f%from_file = .FALSE.
+       ENDIF
+
+       IF ( check_existence( var_names, 'street_crossing' ) )  THEN
+          street_crossing_f%from_file = .TRUE.
+          CALL get_attribute( id_surf, char_fill,                              &
+                              street_crossing_f%fill, .FALSE.,                 &
+                              'street_crossing' )
+
+          ALLOCATE ( street_crossing_f%var(nys:nyn,nxl:nxr)  )
+
+          CALL get_variable( id_surf, 'street_crossing',                       &
+                             street_crossing_f%var, nxl, nxr, nys, nyn )
+
+       ELSE
+          street_crossing_f%from_file = .FALSE.
+       ENDIF
+!
+!--    Still missing: root_resolved and building_surface_pars.
+!--    Will be implemented as soon as they are available.
+
+!
+!--    Finally, close input file
+       CALL close_input_file( id_surf )
+#endif
+!
+!--    End of CPU measurement
+       CALL cpu_log( log_point_s(82), 'NetCDF input', 'stop' )
+!
+!--    Exchange 1 ghost points for surface variables. Please note, ghost point
+!--    exchange for 3D parameter lists should be revised by using additional
+!--    MPI datatypes or rewriting exchange_horiz.
+!--    Moreover, varialbes will be resized in the following, including ghost
+!--    points.
+!--    Start with 2D Integer variables. Please note, for 8-bit integer
+!--    variables must be swapt to 32-bit integer before calling exchange_horiz.
+       IF ( albedo_type_f%from_file )  THEN
+          var_exchange_int                  = INT( albedo_type_f%fill, KIND = 1 )
+          var_exchange_int(nys:nyn,nxl:nxr) =                                  &
+                            INT( albedo_type_f%var(nys:nyn,nxl:nxr), KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( albedo_type_f%var )
+          ALLOCATE( albedo_type_f%var(nysg:nyng,nxlg:nxrg) )
+          albedo_type_f%var = INT( var_exchange_int, KIND = 1 )
+       ENDIF
+       IF ( pavement_type_f%from_file )  THEN
+          var_exchange_int                  = INT( pavement_type_f%fill, KIND = 1 )
+          var_exchange_int(nys:nyn,nxl:nxr) =                                  &
+                          INT( pavement_type_f%var(nys:nyn,nxl:nxr), KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( pavement_type_f%var )
+          ALLOCATE( pavement_type_f%var(nysg:nyng,nxlg:nxrg) )
+          pavement_type_f%var = INT( var_exchange_int, KIND = 1 )
+       ENDIF
+       IF ( soil_type_f%from_file  .AND.  ALLOCATED( soil_type_f%var_2d ) )  THEN
+          var_exchange_int                  = INT( soil_type_f%fill, KIND = 1 )
+          var_exchange_int(nys:nyn,nxl:nxr) =                                  &
+                            INT( soil_type_f%var_2d(nys:nyn,nxl:nxr), KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( soil_type_f%var_2d )
+          ALLOCATE( soil_type_f%var_2d(nysg:nyng,nxlg:nxrg) )
+          soil_type_f%var_2d = INT( var_exchange_int, KIND = 1 )
+       ENDIF
+       IF ( vegetation_type_f%from_file )  THEN
+          var_exchange_int                  = INT( vegetation_type_f%fill, KIND = 1 )
+          var_exchange_int(nys:nyn,nxl:nxr) =                                  &
+                        INT( vegetation_type_f%var(nys:nyn,nxl:nxr), KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( vegetation_type_f%var )
+          ALLOCATE( vegetation_type_f%var(nysg:nyng,nxlg:nxrg) )
+          vegetation_type_f%var = INT( var_exchange_int, KIND = 1 )
+       ENDIF
+       IF ( water_type_f%from_file )  THEN
+          var_exchange_int                  = INT( water_type_f%fill, KIND = 1 )
+          var_exchange_int(nys:nyn,nxl:nxr) =                                  &
+                         INT( water_type_f%var(nys:nyn,nxl:nxr), KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( water_type_f%var )
+          ALLOCATE( water_type_f%var(nysg:nyng,nxlg:nxrg) )
+          water_type_f%var = INT( var_exchange_int, KIND = 1 )
+       ENDIF
+!
+!--    Exchange 1 ghost point for 3/4-D variables. For the sake of simplicity,
+!--    loop further dimensions to use 2D exchange routines.
+!--    This should be revised later by introducing new MPI datatypes.
+       IF ( soil_type_f%from_file  .AND.  ALLOCATED( soil_type_f%var_3d ) )    &
+       THEN
+          ALLOCATE( var_dum_int_3d(0:nz_soil,nys:nyn,nxl:nxr) )
+          var_dum_int_3d = soil_type_f%var_3d
+          DEALLOCATE( soil_type_f%var_3d )
+          ALLOCATE( soil_type_f%var_3d(0:nz_soil,nysg:nyng,nxlg:nxrg) )
+          soil_type_f%var_3d = soil_type_f%fill
+
+          DO  k = 0, nz_soil
+             var_exchange_int(nys:nyn,nxl:nxr) = var_dum_int_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+             soil_type_f%var_3d(k,:,:) = INT( var_exchange_int(:,:), KIND = 1 )
+          ENDDO
+          DEALLOCATE( var_dum_int_3d )
+       ENDIF
+
+       IF ( surface_fraction_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:surface_fraction_f%nf-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = surface_fraction_f%frac
+          DEALLOCATE( surface_fraction_f%frac )
+          ALLOCATE( surface_fraction_f%frac(0:surface_fraction_f%nf-1,         &
+                                            nysg:nyng,nxlg:nxrg) )
+          surface_fraction_f%frac = surface_fraction_f%fill
+
+          DO  k = 0, surface_fraction_f%nf-1
+             var_exchange_real(nys:nyn,nxl:nxr) = var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             surface_fraction_f%frac(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( building_pars_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:building_pars_f%np-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = building_pars_f%pars_xy
+          DEALLOCATE( building_pars_f%pars_xy )
+          ALLOCATE( building_pars_f%pars_xy(0:building_pars_f%np-1,            &
+                                            nysg:nyng,nxlg:nxrg) )
+          building_pars_f%pars_xy = building_pars_f%fill
+          DO  k = 0, building_pars_f%np-1
+             var_exchange_real(nys:nyn,nxl:nxr) =                              &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             building_pars_f%pars_xy(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( albedo_pars_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:albedo_pars_f%np-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = albedo_pars_f%pars_xy
+          DEALLOCATE( albedo_pars_f%pars_xy )
+          ALLOCATE( albedo_pars_f%pars_xy(0:albedo_pars_f%np-1,                &
+                                          nysg:nyng,nxlg:nxrg) )
+          albedo_pars_f%pars_xy = albedo_pars_f%fill
+          DO  k = 0, albedo_pars_f%np-1
+             var_exchange_real(nys:nyn,nxl:nxr) =                              &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             albedo_pars_f%pars_xy(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( pavement_pars_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:pavement_pars_f%np-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = pavement_pars_f%pars_xy
+          DEALLOCATE( pavement_pars_f%pars_xy )
+          ALLOCATE( pavement_pars_f%pars_xy(0:pavement_pars_f%np-1,            &
+                                            nysg:nyng,nxlg:nxrg) )
+          pavement_pars_f%pars_xy = pavement_pars_f%fill
+          DO  k = 0, pavement_pars_f%np-1
+             var_exchange_real(nys:nyn,nxl:nxr) =                              &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             pavement_pars_f%pars_xy(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( vegetation_pars_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:vegetation_pars_f%np-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = vegetation_pars_f%pars_xy
+          DEALLOCATE( vegetation_pars_f%pars_xy )
+          ALLOCATE( vegetation_pars_f%pars_xy(0:vegetation_pars_f%np-1,        &
+                                            nysg:nyng,nxlg:nxrg) )
+          vegetation_pars_f%pars_xy = vegetation_pars_f%fill
+          DO  k = 0, vegetation_pars_f%np-1
+             var_exchange_real(nys:nyn,nxl:nxr) =                              &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             vegetation_pars_f%pars_xy(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( water_pars_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:water_pars_f%np-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = water_pars_f%pars_xy
+          DEALLOCATE( water_pars_f%pars_xy )
+          ALLOCATE( water_pars_f%pars_xy(0:water_pars_f%np-1,                  &
+                                         nysg:nyng,nxlg:nxrg) )
+          water_pars_f%pars_xy = water_pars_f%fill
+          DO  k = 0, water_pars_f%np-1
+             var_exchange_real(nys:nyn,nxl:nxr) =                              &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             water_pars_f%pars_xy(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( root_area_density_lsm_f%from_file )  THEN
+          ALLOCATE( var_dum_real_3d(0:root_area_density_lsm_f%nz-1,nys:nyn,nxl:nxr) )
+          var_dum_real_3d = root_area_density_lsm_f%var
+          DEALLOCATE( root_area_density_lsm_f%var )
+          ALLOCATE( root_area_density_lsm_f%var(0:root_area_density_lsm_f%nz-1,&
+                                                nysg:nyng,nxlg:nxrg) )
+          root_area_density_lsm_f%var = root_area_density_lsm_f%fill
+
+          DO  k = 0, root_area_density_lsm_f%nz-1
+             var_exchange_real(nys:nyn,nxl:nxr) =                              &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+             CALL exchange_horiz_2d( var_exchange_real, nbgp )
+             root_area_density_lsm_f%var(k,:,:) = var_exchange_real(:,:)
+          ENDDO
+          DEALLOCATE( var_dum_real_3d )
+       ENDIF
+
+       IF ( soil_pars_f%from_file )  THEN
+          IF ( soil_pars_f%lod == 1 )  THEN
+
+             ALLOCATE( var_dum_real_3d(0:soil_pars_f%np-1,nys:nyn,nxl:nxr) )
+             var_dum_real_3d = soil_pars_f%pars_xy
+             DEALLOCATE( soil_pars_f%pars_xy )
+             ALLOCATE( soil_pars_f%pars_xy(0:soil_pars_f%np-1,                 &
+                                            nysg:nyng,nxlg:nxrg) )
+             soil_pars_f%pars_xy = soil_pars_f%fill
+
+             DO  k = 0, soil_pars_f%np-1
+                var_exchange_real(nys:nyn,nxl:nxr) =                           &
+                                              var_dum_real_3d(k,nys:nyn,nxl:nxr)
+                CALL exchange_horiz_2d( var_exchange_real, nbgp )
+                soil_pars_f%pars_xy(k,:,:) = var_exchange_real(:,:)
+             ENDDO
+             DEALLOCATE( var_dum_real_3d )
+          ELSEIF ( soil_pars_f%lod == 2 )  THEN
+             ALLOCATE( var_dum_real_4d(0:soil_pars_f%np-1,                     &
+                                       0:soil_pars_f%nz-1,                     &
+                                       nys:nyn,nxl:nxr) )
+             var_dum_real_4d = soil_pars_f%pars_xyz
+             DEALLOCATE( soil_pars_f%pars_xyz )
+             ALLOCATE( soil_pars_f%pars_xyz(0:soil_pars_f%np-1,                &
+                                            0:soil_pars_f%nz-1,                &
+                                            nysg:nyng,nxlg:nxrg) )
+             soil_pars_f%pars_xyz = soil_pars_f%fill
+
+             DO  k2 = 0, soil_pars_f%nz-1
+                DO  k = 0, soil_pars_f%np-1
+                   var_exchange_real(nys:nyn,nxl:nxr) =                        &
+                                           var_dum_real_4d(k,k2,nys:nyn,nxl:nxr)
+                   CALL exchange_horiz_2d( var_exchange_real, nbgp )
+
+                   soil_pars_f%pars_xyz(k,k2,:,:) = var_exchange_real(:,:)
+                ENDDO
+             ENDDO
+             DEALLOCATE( var_dum_real_4d )
+          ENDIF
+       ENDIF
+
+       IF ( pavement_subsurface_pars_f%from_file )  THEN
+          ALLOCATE( var_dum_real_4d(0:pavement_subsurface_pars_f%np-1,         &
+                                    0:pavement_subsurface_pars_f%nz-1,         &
+                                    nys:nyn,nxl:nxr) )
+          var_dum_real_4d = pavement_subsurface_pars_f%pars_xyz
+          DEALLOCATE( pavement_subsurface_pars_f%pars_xyz )
+          ALLOCATE( pavement_subsurface_pars_f%pars_xyz                        &
+                                          (0:pavement_subsurface_pars_f%np-1,  &
+                                           0:pavement_subsurface_pars_f%nz-1,  &
+                                           nysg:nyng,nxlg:nxrg) )
+          pavement_subsurface_pars_f%pars_xyz = pavement_subsurface_pars_f%fill
+
+          DO  k2 = 0, pavement_subsurface_pars_f%nz-1
+             DO  k = 0, pavement_subsurface_pars_f%np-1
+                var_exchange_real(nys:nyn,nxl:nxr) =                           &
+                                          var_dum_real_4d(k,k2,nys:nyn,nxl:nxr)
+                CALL exchange_horiz_2d( var_exchange_real, nbgp )
+                pavement_subsurface_pars_f%pars_xyz(k,k2,:,:) =                &
+                                                        var_exchange_real(:,:)
+             ENDDO
+          ENDDO
+          DEALLOCATE( var_dum_real_4d )
+       ENDIF
+
+!
+!--    In case of non-cyclic boundary conditions, set Neumann conditions at the
+!--    lateral boundaries.
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( nys == 0  )  THEN
+             IF ( albedo_type_f%from_file )                                    &
+                albedo_type_f%var(-1,:) = albedo_type_f%var(0,:)
+             IF ( pavement_type_f%from_file )                                  &
+                pavement_type_f%var(-1,:) = pavement_type_f%var(0,:)
+             IF ( soil_type_f%from_file )  THEN
+                IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+                   soil_type_f%var_2d(-1,:) = soil_type_f%var_2d(0,:)
+                ELSE
+                   soil_type_f%var_3d(:,-1,:) = soil_type_f%var_3d(:,0,:)
+                ENDIF
+             ENDIF
+             IF ( vegetation_type_f%from_file )                                &
+                vegetation_type_f%var(-1,:) = vegetation_type_f%var(0,:)
+             IF ( water_type_f%from_file )                                     &
+                water_type_f%var(-1,:) = water_type_f%var(0,:)
+             IF ( surface_fraction_f%from_file )                               &
+                surface_fraction_f%frac(:,-1,:) = surface_fraction_f%frac(:,0,:)
+             IF ( building_pars_f%from_file )                                  &
+                building_pars_f%pars_xy(:,-1,:) = building_pars_f%pars_xy(:,0,:)
+             IF ( albedo_pars_f%from_file )                                    &
+                albedo_pars_f%pars_xy(:,-1,:) = albedo_pars_f%pars_xy(:,0,:)
+             IF ( pavement_pars_f%from_file )                                  &
+                pavement_pars_f%pars_xy(:,-1,:) = pavement_pars_f%pars_xy(:,0,:)
+             IF ( vegetation_pars_f%from_file )                                &
+                vegetation_pars_f%pars_xy(:,-1,:) =                            &
+                                               vegetation_pars_f%pars_xy(:,0,:)
+             IF ( water_pars_f%from_file )                                     &
+                water_pars_f%pars_xy(:,-1,:) = water_pars_f%pars_xy(:,0,:)
+             IF ( root_area_density_lsm_f%from_file )                          &
+                root_area_density_lsm_f%var(:,-1,:) =                          &
+                                            root_area_density_lsm_f%var(:,0,:)
+             IF ( soil_pars_f%from_file )  THEN
+                IF ( soil_pars_f%lod == 1 )  THEN
+                   soil_pars_f%pars_xy(:,-1,:) = soil_pars_f%pars_xy(:,0,:)
+                ELSE
+                   soil_pars_f%pars_xyz(:,:,-1,:) = soil_pars_f%pars_xyz(:,:,0,:)
+                ENDIF
+             ENDIF
+             IF ( pavement_subsurface_pars_f%from_file )                       &
+                pavement_subsurface_pars_f%pars_xyz(:,:,-1,:) =                &
+                                   pavement_subsurface_pars_f%pars_xyz(:,:,0,:)
+          ENDIF
+
+          IF ( nyn == ny )  THEN
+             IF ( albedo_type_f%from_file )                                    &
+                albedo_type_f%var(ny+1,:) = albedo_type_f%var(ny,:)
+             IF ( pavement_type_f%from_file )                                  &
+                pavement_type_f%var(ny+1,:) = pavement_type_f%var(ny,:)
+             IF ( soil_type_f%from_file )  THEN
+                IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+                   soil_type_f%var_2d(ny+1,:) = soil_type_f%var_2d(ny,:)
+                ELSE
+                   soil_type_f%var_3d(:,ny+1,:) = soil_type_f%var_3d(:,ny,:)
+                ENDIF
+             ENDIF
+             IF ( vegetation_type_f%from_file )                                &
+                vegetation_type_f%var(ny+1,:) = vegetation_type_f%var(ny,:)
+             IF ( water_type_f%from_file )                                     &
+                water_type_f%var(ny+1,:) = water_type_f%var(ny,:)
+             IF ( surface_fraction_f%from_file )                               &
+                surface_fraction_f%frac(:,ny+1,:) =                            &
+                                             surface_fraction_f%frac(:,ny,:)
+             IF ( building_pars_f%from_file )                                  &
+                building_pars_f%pars_xy(:,ny+1,:) =                            &
+                                             building_pars_f%pars_xy(:,ny,:)
+             IF ( albedo_pars_f%from_file )                                    &
+                albedo_pars_f%pars_xy(:,ny+1,:) = albedo_pars_f%pars_xy(:,ny,:)
+             IF ( pavement_pars_f%from_file )                                  &
+                pavement_pars_f%pars_xy(:,ny+1,:) =                            &
+                                             pavement_pars_f%pars_xy(:,ny,:)
+             IF ( vegetation_pars_f%from_file )                                &
+                vegetation_pars_f%pars_xy(:,ny+1,:) =                          &
+                                               vegetation_pars_f%pars_xy(:,ny,:)
+             IF ( water_pars_f%from_file )                                     &
+                water_pars_f%pars_xy(:,ny+1,:) = water_pars_f%pars_xy(:,ny,:)
+             IF ( root_area_density_lsm_f%from_file )                          &
+                root_area_density_lsm_f%var(:,ny+1,:) =                        &
+                                            root_area_density_lsm_f%var(:,ny,:)
+             IF ( soil_pars_f%from_file )  THEN
+                IF ( soil_pars_f%lod == 1 )  THEN
+                   soil_pars_f%pars_xy(:,ny+1,:) = soil_pars_f%pars_xy(:,ny,:)
+                ELSE
+                   soil_pars_f%pars_xyz(:,:,ny+1,:) =                          &
+                                              soil_pars_f%pars_xyz(:,:,ny,:)
+                ENDIF
+             ENDIF
+             IF ( pavement_subsurface_pars_f%from_file )                       &
+                pavement_subsurface_pars_f%pars_xyz(:,:,ny+1,:) =              &
+                                   pavement_subsurface_pars_f%pars_xyz(:,:,ny,:)
+          ENDIF
+       ENDIF
+
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( nxl == 0 )  THEN
+            IF ( albedo_type_f%from_file )                                     &
+                albedo_type_f%var(:,-1) = albedo_type_f%var(:,0)
+             IF ( pavement_type_f%from_file )                                  &
+                pavement_type_f%var(:,-1) = pavement_type_f%var(:,0)
+             IF ( soil_type_f%from_file )  THEN
+                IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+                   soil_type_f%var_2d(:,-1) = soil_type_f%var_2d(:,0)
+                ELSE
+                   soil_type_f%var_3d(:,:,-1) = soil_type_f%var_3d(:,:,0)
+                ENDIF
+             ENDIF
+             IF ( vegetation_type_f%from_file )                                &
+                vegetation_type_f%var(:,-1) = vegetation_type_f%var(:,0)
+             IF ( water_type_f%from_file )                                     &
+                water_type_f%var(:,-1) = water_type_f%var(:,0)
+             IF ( surface_fraction_f%from_file )                               &
+                surface_fraction_f%frac(:,:,-1) = surface_fraction_f%frac(:,:,0)
+             IF ( building_pars_f%from_file )                                  &
+                building_pars_f%pars_xy(:,:,-1) = building_pars_f%pars_xy(:,:,0)
+             IF ( albedo_pars_f%from_file )                                    &
+                albedo_pars_f%pars_xy(:,:,-1) = albedo_pars_f%pars_xy(:,:,0)
+             IF ( pavement_pars_f%from_file )                                  &
+                pavement_pars_f%pars_xy(:,:,-1) = pavement_pars_f%pars_xy(:,:,0)
+             IF ( vegetation_pars_f%from_file )                                &
+                vegetation_pars_f%pars_xy(:,:,-1) =                            &
+                                               vegetation_pars_f%pars_xy(:,:,0)
+             IF ( water_pars_f%from_file )                                     &
+                water_pars_f%pars_xy(:,:,-1) = water_pars_f%pars_xy(:,:,0)
+             IF ( root_area_density_lsm_f%from_file )                          &
+                root_area_density_lsm_f%var(:,:,-1) =                          &
+                                            root_area_density_lsm_f%var(:,:,0)
+             IF ( soil_pars_f%from_file )  THEN
+                IF ( soil_pars_f%lod == 1 )  THEN
+                   soil_pars_f%pars_xy(:,:,-1) = soil_pars_f%pars_xy(:,:,0)
+                ELSE
+                   soil_pars_f%pars_xyz(:,:,:,-1) = soil_pars_f%pars_xyz(:,:,:,0)
+                ENDIF
+             ENDIF
+             IF ( pavement_subsurface_pars_f%from_file )                       &
+                pavement_subsurface_pars_f%pars_xyz(:,:,:,-1) =                &
+                                    pavement_subsurface_pars_f%pars_xyz(:,:,:,0)
+          ENDIF
+
+          IF ( nxr == nx )  THEN
+             IF ( albedo_type_f%from_file )                                    &
+                albedo_type_f%var(:,nx+1) = albedo_type_f%var(:,nx)
+             IF ( pavement_type_f%from_file )                                  &
+                pavement_type_f%var(:,nx+1) = pavement_type_f%var(:,nx)
+             IF ( soil_type_f%from_file )  THEN
+                IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+                   soil_type_f%var_2d(:,nx+1) = soil_type_f%var_2d(:,nx)
+                ELSE
+                   soil_type_f%var_3d(:,:,nx+1) = soil_type_f%var_3d(:,:,nx)
+                ENDIF
+             ENDIF
+             IF ( vegetation_type_f%from_file )                                &
+                vegetation_type_f%var(:,nx+1) = vegetation_type_f%var(:,nx)
+             IF ( water_type_f%from_file )                                     &
+                water_type_f%var(:,nx+1) = water_type_f%var(:,nx)
+             IF ( surface_fraction_f%from_file )                               &
+                surface_fraction_f%frac(:,:,nx+1) =                            &
+                                             surface_fraction_f%frac(:,:,nx)
+             IF ( building_pars_f%from_file )                                  &
+                building_pars_f%pars_xy(:,:,nx+1) =                            &
+                                             building_pars_f%pars_xy(:,:,nx)
+             IF ( albedo_pars_f%from_file )                                    &
+                albedo_pars_f%pars_xy(:,:,nx+1) = albedo_pars_f%pars_xy(:,:,nx)
+             IF ( pavement_pars_f%from_file )                                  &
+                pavement_pars_f%pars_xy(:,:,nx+1) =                            &
+                                             pavement_pars_f%pars_xy(:,:,nx)
+             IF ( vegetation_pars_f%from_file )                                &
+                vegetation_pars_f%pars_xy(:,:,nx+1) =                          &
+                                               vegetation_pars_f%pars_xy(:,:,nx)
+             IF ( water_pars_f%from_file )                                     &
+                water_pars_f%pars_xy(:,:,nx+1) = water_pars_f%pars_xy(:,:,nx)
+             IF ( root_area_density_lsm_f%from_file )                          &
+                root_area_density_lsm_f%var(:,:,nx+1) =                        &
+                                            root_area_density_lsm_f%var(:,:,nx)
+             IF ( soil_pars_f%from_file )  THEN
+                IF ( soil_pars_f%lod == 1 )  THEN
+                   soil_pars_f%pars_xy(:,:,nx+1) = soil_pars_f%pars_xy(:,:,nx)
+                ELSE
+                   soil_pars_f%pars_xyz(:,:,:,nx+1) =                          &
+                                              soil_pars_f%pars_xyz(:,:,:,nx)
+                ENDIF
+             ENDIF
+             IF ( pavement_subsurface_pars_f%from_file )                       &
+                pavement_subsurface_pars_f%pars_xyz(:,:,:,nx+1) =              &
+                                   pavement_subsurface_pars_f%pars_xyz(:,:,:,nx)
+          ENDIF
+       ENDIF
+
+    END SUBROUTINE netcdf_data_input_surface_data
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads uvem lookup table information.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_uvem
+       
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nys
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names  !< variable names in static input file
+
+
+       INTEGER(iwp) ::  id_uvem       !< NetCDF id of uvem lookup table input file
+       INTEGER(iwp) ::  nli = 35      !< dimension length of lookup table in x
+       INTEGER(iwp) ::  nlj =  9      !< dimension length of lookup table in y
+       INTEGER(iwp) ::  nlk = 90      !< dimension length of lookup table in z
+       INTEGER(iwp) ::  num_vars      !< number of variables in netcdf input file
+!
+!--    Input via uv exposure model lookup table input
+       IF ( input_pids_uvem )  THEN
+
+#if defined ( __netcdf )
+!
+!--       Open file in read-only mode
+          CALL open_read_file( TRIM( input_file_uvem ) //                    &
+                               TRIM( coupling_char ), id_uvem )
+!
+!--       At first, inquire all variable names.
+!--       This will be used to check whether an input variable exist or not.
+          CALL inquire_num_variables( id_uvem, num_vars )
+!
+!--       Allocate memory to store variable names and inquire them.
+          ALLOCATE( var_names(1:num_vars) )
+          CALL inquire_variable_names( id_uvem, var_names )
+!
+!
+!--       uvem integration
+          IF ( check_existence( var_names, 'int_factors' ) )  THEN
+             uvem_integration_f%from_file = .TRUE.
+!
+!--          Input 2D uvem integration.
+             ALLOCATE ( uvem_integration_f%var(0:nlj,0:nli)  )
+             
+             CALL get_variable( id_uvem, 'int_factors', uvem_integration_f%var, 0, nli, 0, nlj )
+          ELSE
+             uvem_integration_f%from_file = .FALSE.
+          ENDIF
+!
+!
+!
+!--       uvem irradiance
+          IF ( check_existence( var_names, 'irradiance' ) )  THEN
+             uvem_irradiance_f%from_file = .TRUE.
+!
+!--          Input 2D uvem irradiance.
+             ALLOCATE ( uvem_irradiance_f%var(0:nlk, 0:2)  )
+             
+             CALL get_variable( id_uvem, 'irradiance', uvem_irradiance_f%var, 0, 2, 0, nlk )
+          ELSE
+             uvem_irradiance_f%from_file = .FALSE.
+          ENDIF
+!
+!
+!
+!--       uvem porjection areas
+          IF ( check_existence( var_names, 'projarea' ) )  THEN
+             uvem_projarea_f%from_file = .TRUE.
+!
+!--          Input 3D uvem projection area (human geometgry)
+             ALLOCATE ( uvem_projarea_f%var(0:2,0:nlj,0:nli)  )
+           
+             CALL get_variable( id_uvem, 'projarea', uvem_projarea_f%var, 0, nli, 0, nlj, 0, 2 )
+          ELSE
+             uvem_projarea_f%from_file = .FALSE.
+          ENDIF
+!
+!
+!
+!--       uvem radiance
+          IF ( check_existence( var_names, 'radiance' ) )  THEN
+             uvem_radiance_f%from_file = .TRUE.
+!
+!--          Input 3D uvem radiance
+             ALLOCATE ( uvem_radiance_f%var(0:nlk,0:nlj,0:nli)  )
+             
+             CALL get_variable( id_uvem, 'radiance', uvem_radiance_f%var, 0, nli, 0, nlj, 0, nlk )
+          ELSE
+             uvem_radiance_f%from_file = .FALSE.
+          ENDIF
+!
+!
+!
+!--       Read building obstruction
+          IF ( check_existence( var_names, 'obstruction' ) )  THEN
+             building_obstruction_full%from_file = .TRUE.
+!--          Input 3D uvem building obstruction
+              ALLOCATE ( building_obstruction_full%var_3d(0:44,0:2,0:2) )
+              CALL get_variable( id_uvem, 'obstruction', building_obstruction_full%var_3d,0, 2, 0, 2, 0, 44 )        
+          ELSE
+             building_obstruction_full%from_file = .FALSE.
+          ENDIF
+!
+          IF ( check_existence( var_names, 'obstruction' ) )  THEN
+             building_obstruction_f%from_file = .TRUE.
+!
+!--          Input 3D uvem building obstruction
+             ALLOCATE ( building_obstruction_f%var_3d(0:44,nys:nyn,nxl:nxr) )
+!
+             CALL get_variable( id_uvem, 'obstruction', building_obstruction_f%var_3d,      &
+                                nxl, nxr, nys, nyn, 0, 44 )        
+          ELSE
+             building_obstruction_f%from_file = .FALSE.
+          ENDIF
+!
+!
+!
+!
+!--       Close uvem lookup table input file
+          CALL close_input_file( id_uvem )
+#else
+          CONTINUE
+#endif
+       ENDIF
+    END SUBROUTINE netcdf_data_input_uvem
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads orography and building information.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_topo
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, message_string, topography
+
+       USE indices,                                                            &
+           ONLY:  nbgp, nx, nxl, nxr, ny, nyn, nys, nzb
+
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names  !< variable names in static input file
+
+
+       INTEGER(iwp) ::  i             !< running index along x-direction
+       INTEGER(iwp) ::  ii            !< running index for IO blocks
+       INTEGER(iwp) ::  id_topo       !< NetCDF id of topograhy input file
+       INTEGER(iwp) ::  j             !< running index along y-direction
+       INTEGER(iwp) ::  num_vars      !< number of variables in netcdf input file
+       INTEGER(iwp) ::  skip_n_rows   !< counting variable to skip rows while reading topography file
+
+       INTEGER(iwp), DIMENSION(nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp) ::  var_exchange_int !< dummy variables used to exchange 32-bit Integer arrays
+
+       REAL(wp) ::  dum           !< dummy variable to skip columns while reading topography file
+!
+!--    CPU measurement
+       CALL cpu_log( log_point_s(83), 'NetCDF/ASCII input topo', 'start' )
+
+!
+!--    Input via palm-input data standard
+       IF ( input_pids_static )  THEN
+#if defined ( __netcdf )
+!
+!--       Open file in read-only mode
+          CALL open_read_file( TRIM( input_file_static ) //                    &
+                               TRIM( coupling_char ), id_topo )
+!
+!--       At first, inquire all variable names.
+!--       This will be used to check whether an  input variable exist
+!--       or not.
+          CALL inquire_num_variables( id_topo, num_vars )
+!
+!--       Allocate memory to store variable names and inquire them.
+          ALLOCATE( var_names(1:num_vars) )
+          CALL inquire_variable_names( id_topo, var_names )
+!
+!--       Read x, y - dimensions. Only required for consistency checks.
+          CALL netcdf_data_input_get_dimension_length( id_topo, dim_static%nx, 'x' )
+          CALL netcdf_data_input_get_dimension_length( id_topo, dim_static%ny, 'y' )
+          ALLOCATE( dim_static%x(0:dim_static%nx-1) )
+          ALLOCATE( dim_static%y(0:dim_static%ny-1) )
+          CALL get_variable( id_topo, 'x', dim_static%x )
+          CALL get_variable( id_topo, 'y', dim_static%y )
+!
+!--       Terrain height. First, get variable-related _FillValue attribute
+          IF ( check_existence( var_names, 'zt' ) )  THEN
+             terrain_height_f%from_file = .TRUE.
+             CALL get_attribute( id_topo, char_fill, terrain_height_f%fill,    &
+                                 .FALSE., 'zt' )
+!
+!--          Input 2D terrain height.
+             ALLOCATE ( terrain_height_f%var(nys:nyn,nxl:nxr)  )
+             
+             CALL get_variable( id_topo, 'zt', terrain_height_f%var,           &
+                                nxl, nxr, nys, nyn )
+
+          ELSE
+             terrain_height_f%from_file = .FALSE.
+          ENDIF
+
+!
+!--       Read building height. First, read its _FillValue attribute,
+!--       as well as lod attribute
+          buildings_f%from_file = .FALSE.
+          IF ( check_existence( var_names, 'buildings_2d' ) )  THEN
+             buildings_f%from_file = .TRUE.
+             CALL get_attribute( id_topo, char_lod, buildings_f%lod,           &
+                                 .FALSE., 'buildings_2d' )
+
+             CALL get_attribute( id_topo, char_fill, buildings_f%fill1,        &
+                                 .FALSE., 'buildings_2d' )
+
+!
+!--          Read 2D buildings
+             IF ( buildings_f%lod == 1 )  THEN
+                ALLOCATE ( buildings_f%var_2d(nys:nyn,nxl:nxr) )
+
+                CALL get_variable( id_topo, 'buildings_2d',                    &
+                                   buildings_f%var_2d,                         &
+                                   nxl, nxr, nys, nyn )
+             ELSE
+                message_string = 'NetCDF attribute lod ' //                    &
+                                 '(level of detail) is not set ' //            &
+                                 'properly for buildings_2d.'
+                CALL message( 'netcdf_data_input_mod', 'PA0540',               &
+                               1, 2, 0, 6, 0 )
+             ENDIF
+          ENDIF
+!
+!--       If available, also read 3D building information. If both are
+!--       available, use 3D information.
+          IF ( check_existence( var_names, 'buildings_3d' ) )  THEN
+             buildings_f%from_file = .TRUE.
+             CALL get_attribute( id_topo, char_lod, buildings_f%lod,           &
+                                 .FALSE., 'buildings_3d' )      
+
+             CALL get_attribute( id_topo, char_fill, buildings_f%fill2,        &
+                                 .FALSE., 'buildings_3d' )
+
+             CALL netcdf_data_input_get_dimension_length( id_topo,             &
+                                                          buildings_f%nz, 'z' )
+!
+!--          Read 3D buildings
+             IF ( buildings_f%lod == 2 )  THEN
+                ALLOCATE( buildings_f%z(nzb:buildings_f%nz-1) )
+                CALL get_variable( id_topo, 'z', buildings_f%z )
+
+                ALLOCATE( buildings_f%var_3d(nzb:buildings_f%nz-1,             &
+                                             nys:nyn,nxl:nxr) )
+                buildings_f%var_3d = 0
+                
+                CALL get_variable( id_topo, 'buildings_3d',                    &
+                                   buildings_f%var_3d,                         &
+                                   nxl, nxr, nys, nyn, 0, buildings_f%nz-1 )
+             ELSE
+                message_string = 'NetCDF attribute lod ' //                    &
+                                 '(level of detail) is not set ' //            &
+                                 'properly for buildings_3d.'
+                CALL message( 'netcdf_data_input_mod', 'PA0541',               &
+                               1, 2, 0, 6, 0 )
+             ENDIF
+          ENDIF
+!
+!--       Read building IDs and its FillValue attribute. Further required
+!--       for mapping buildings on top of orography.
+          IF ( check_existence( var_names, 'building_id' ) )  THEN
+             building_id_f%from_file = .TRUE.
+             CALL get_attribute( id_topo, char_fill,                           &
+                                 building_id_f%fill, .FALSE.,                  &
+                                 'building_id' )
+
+             ALLOCATE ( building_id_f%var(nys:nyn,nxl:nxr) )
+             
+             CALL get_variable( id_topo, 'building_id', building_id_f%var,     &
+                                nxl, nxr, nys, nyn )
+          ELSE
+             building_id_f%from_file = .FALSE.
+          ENDIF
+!
+!--       Read building_type and required attributes.
+          IF ( check_existence( var_names, 'building_type' ) )  THEN
+             building_type_f%from_file = .TRUE.
+             CALL get_attribute( id_topo, char_fill,                           &
+                                 building_type_f%fill, .FALSE.,                &
+                                 'building_type' )
+
+             ALLOCATE ( building_type_f%var(nys:nyn,nxl:nxr) )
+
+             CALL get_variable( id_topo, 'building_type', building_type_f%var, &
+                                nxl, nxr, nys, nyn )
+
+          ELSE
+             building_type_f%from_file = .FALSE.
+          ENDIF
+!
+!--       Close topography input file
+          CALL close_input_file( id_topo )
+#else
+          CONTINUE
+#endif
+!
+!--    ASCII input
+       ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
+             
+          DO  ii = 0, io_blocks-1
+             IF ( ii == io_group )  THEN
+
+                OPEN( 90, FILE='TOPOGRAPHY_DATA'//TRIM( coupling_char ),       &
+                      STATUS='OLD', FORM='FORMATTED', ERR=10 )
+!
+!--             Read topography PE-wise. Rows are read from nyn to nys, columns
+!--             are read from nxl to nxr. At first, ny-nyn rows need to be skipped.
+                skip_n_rows = 0
+                DO WHILE ( skip_n_rows < ny - nyn )
+                   READ( 90, * )
+                   skip_n_rows = skip_n_rows + 1
+                ENDDO
+!
+!--             Read data from nyn to nys and nxl to nxr. Therefore, skip
+!--             column until nxl-1 is reached
+                ALLOCATE ( buildings_f%var_2d(nys:nyn,nxl:nxr) )
+                DO  j = nyn, nys, -1
+                   READ( 90, *, ERR=11, END=11 )                               &
+                                   ( dum, i = 0, nxl-1 ),                      &
+                                   ( buildings_f%var_2d(j,i), i = nxl, nxr )
+                ENDDO
+
+                GOTO 12
+
+ 10             message_string = 'file TOPOGRAPHY_DATA'//                      &
+                                 TRIM( coupling_char )// ' does not exist'
+                CALL message( 'netcdf_data_input_mod', 'PA0208', 1, 2, 0, 6, 0 )
+
+ 11             message_string = 'errors in file TOPOGRAPHY_DATA'//            &
+                                 TRIM( coupling_char )
+                CALL message( 'netcdf_data_input_mod', 'PA0209', 2, 2, 0, 6, 0 )
+
+ 12             CLOSE( 90 )
+                buildings_f%from_file = .TRUE.
+
+             ENDIF
+#if defined( __parallel )
+             CALL MPI_BARRIER( comm2d, ierr )
+#endif
+          ENDDO
+
+       ENDIF
+!
+!--    End of CPU measurement
+       CALL cpu_log( log_point_s(83), 'NetCDF/ASCII input topo', 'stop' )
+!
+!--    Check for minimum requirement to setup building topography. If buildings
+!--    are provided, also an ID and a type are required.
+!--    Note, doing this check in check_parameters
+!--    will be too late (data will be used for grid inititialization before).
+       IF ( input_pids_static )  THEN
+          IF ( buildings_f%from_file  .AND.                                    &
+               .NOT. building_id_f%from_file )  THEN
+             message_string = 'If building heigths are prescribed in ' //      &
+                              'static input file, also an ID is required.'
+             CALL message( 'netcdf_data_input_mod', 'PA0542', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    In case no terrain height is provided by static input file, allocate
+!--    array nevertheless and set terrain height to 0, which simplifies
+!--    topography initialization.
+       IF ( .NOT. terrain_height_f%from_file )  THEN
+          ALLOCATE ( terrain_height_f%var(nys:nyn,nxl:nxr) )
+          terrain_height_f%var = 0.0_wp
+       ENDIF
+!
+!--    Finally, exchange 1 ghost point for building ID and type.
+!--    In case of non-cyclic boundary conditions set Neumann conditions at the
+!--    lateral boundaries.
+       IF ( building_id_f%from_file )  THEN
+          var_exchange_int                  = building_id_f%fill
+          var_exchange_int(nys:nyn,nxl:nxr) = building_id_f%var(nys:nyn,nxl:nxr)
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( building_id_f%var )
+          ALLOCATE( building_id_f%var(nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp) )
+          building_id_f%var = var_exchange_int
+
+          IF ( .NOT. bc_ns_cyc )  THEN
+             IF ( nys == 0  )  building_id_f%var(-1,:)   = building_id_f%var(0,:)
+             IF ( nyn == ny )  building_id_f%var(ny+1,:) = building_id_f%var(ny,:)
+          ENDIF
+          IF ( .NOT. bc_lr_cyc )  THEN
+             IF ( nxl == 0  )  building_id_f%var(:,-1)   = building_id_f%var(:,0)
+             IF ( nxr == nx )  building_id_f%var(:,nx+1) = building_id_f%var(:,nx)
+          ENDIF
+       ENDIF
+
+       IF ( building_type_f%from_file )  THEN
+          var_exchange_int                  = INT( building_type_f%fill, KIND = 4 )
+          var_exchange_int(nys:nyn,nxl:nxr) =                                  &
+                          INT( building_type_f%var(nys:nyn,nxl:nxr), KIND = 4 )
+          CALL exchange_horiz_2d_int( var_exchange_int, nys, nyn, nxl, nxr, nbgp )
+          DEALLOCATE( building_type_f%var )
+          ALLOCATE( building_type_f%var(nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp) )
+          building_type_f%var = INT( var_exchange_int, KIND = 1 )
+
+          IF ( .NOT. bc_ns_cyc )  THEN
+             IF ( nys == 0  )  building_type_f%var(-1,:)   = building_type_f%var(0,:)
+             IF ( nyn == ny )  building_type_f%var(ny+1,:) = building_type_f%var(ny,:)
+          ENDIF
+          IF ( .NOT. bc_lr_cyc )  THEN
+             IF ( nxl == 0  )  building_type_f%var(:,-1)   = building_type_f%var(:,0)
+             IF ( nxr == nx )  building_type_f%var(:,nx+1) = building_type_f%var(:,nx)
+          ENDIF
+       ENDIF
+
+    END SUBROUTINE netcdf_data_input_topo
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads initialization data of u, v, w, pt, q, geostrophic wind components,
+!> as well as soil moisture and soil temperature, derived from larger-scale
+!> model (COSMO) by Inifor.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_init_3d
+
+       USE arrays_3d,                                                          &
+           ONLY:  q, pt, u, v, w, zu, zw
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, humidity, message_string, neutral
+
+       USE indices,                                                            &
+           ONLY:  nx, nxl, nxlu, nxr, ny, nyn, nys, nysv, nzb, nz, nzt
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names
+
+       LOGICAL      ::  dynamic_3d = .TRUE. !< flag indicating that 3D data is read from dynamic file
+       
+       INTEGER(iwp) ::  id_dynamic !< NetCDF id of dynamic input file
+       INTEGER(iwp) ::  num_vars   !< number of variables in netcdf input file
+
+       LOGICAL      ::  check_passed !< flag indicating if a check passed
+
+!
+!--    Skip routine if no input file with dynamic input data is available.
+       IF ( .NOT. input_pids_dynamic )  RETURN
+!
+!--    Please note, Inifor is designed to provide initial data for u and v for
+!--    the prognostic grid points in case of lateral Dirichlet conditions.
+!--    This means that Inifor provides data from nxlu:nxr (for u) and
+!--    from nysv:nyn (for v) at the left and south domain boundary, respectively.
+!--    However, as work-around for the moment, PALM will run with cyclic
+!--    conditions and will be initialized with data provided by Inifor
+!--    boundaries in case of Dirichlet.
+!--    Hence, simply set set nxlu/nysv to 1 (will be reset to its original value
+!--    at the end of this routine.
+       IF ( bc_lr_cyc  .AND.  nxl == 0 )  nxlu = 1
+       IF ( bc_ns_cyc  .AND.  nys == 0 )  nysv = 1
+
+!
+!--    CPU measurement
+       CALL cpu_log( log_point_s(85), 'NetCDF input init', 'start' )
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       CALL open_read_file( TRIM( input_file_dynamic ) //                      &
+                            TRIM( coupling_char ), id_dynamic )
+
+!
+!--    At first, inquire all variable names.
+       CALL inquire_num_variables( id_dynamic, num_vars )
+!
+!--    Allocate memory to store variable names.
+       ALLOCATE( var_names(1:num_vars) )
+       CALL inquire_variable_names( id_dynamic, var_names )
+!
+!--    Read vertical dimension of scalar und w grid. 
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nzu, 'z'     )
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nzw, 'zw'    )
+!
+!--    Read also the horizontal dimensions. These are used just used fo
+!--    checking the compatibility with the PALM grid before reading.
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nx,  'x'  )
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nxu, 'xu' )
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%ny,  'y'  )
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nyv, 'yv' )
+
+!
+!--    Check for correct horizontal and vertical dimension. Please note,
+!--    checks are performed directly here and not called from
+!--    check_parameters as some varialbes are still not allocated there.
+!--    Moreover, please note, u- and v-grid has 1 grid point less on
+!--    Inifor grid.
+       IF ( init_3d%nx-1 /= nx  .OR.  init_3d%nxu-1 /= nx - 1  .OR.            &
+            init_3d%ny-1 /= ny  .OR.  init_3d%nyv-1 /= ny - 1 )  THEN
+          message_string = 'Number of inifor horizontal grid points  '//       &
+                           'does not match the number of numeric grid '//      &
+                           'points.'
+          CALL message( 'netcdf_data_input_mod', 'PA0543', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( init_3d%nzu /= nz )  THEN
+          message_string = 'Number of inifor vertical grid points ' //         &
+                           'does not match the number of numeric grid '//      &
+                           'points.'
+          CALL message( 'netcdf_data_input_mod', 'PA0543', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read vertical dimensions. Later, these are required for eventual
+!--    inter- and extrapolations of the initialization data.
+       IF ( check_existence( var_names, 'z' ) )  THEN
+          ALLOCATE( init_3d%zu_atmos(1:init_3d%nzu) )
+          CALL get_variable( id_dynamic, 'z', init_3d%zu_atmos )
+       ENDIF
+       IF ( check_existence( var_names, 'zw' ) )  THEN
+          ALLOCATE( init_3d%zw_atmos(1:init_3d%nzw) )
+          CALL get_variable( id_dynamic, 'zw', init_3d%zw_atmos )
+       ENDIF
+!
+!--    Check for consistency between vertical coordinates in dynamic 
+!--    driver and numeric grid. 
+!--    Please note, depending on compiler options both may be 
+!--    equal up to a certain threshold, and differences between
+!--    the numeric grid and vertical coordinate in the driver can built-
+!--    up to 10E-1-10E-0 m. For this reason, the check is performed not
+!--    for exactly matching values. 
+       IF ( ANY( ABS( zu(1:nzt)   - init_3d%zu_atmos(1:init_3d%nzu) )    &
+                      > 10E-1 )  .OR.                                    &
+            ANY( ABS( zw(1:nzt-1) - init_3d%zw_atmos(1:init_3d%nzw) )    &
+                      > 10E-1 ) )  THEN
+          message_string = 'Vertical grid in dynamic driver does not '// &
+                           'match the numeric grid.'
+          CALL message( 'netcdf_data_input_mod', 'PA0543', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read initial geostrophic wind components at 
+!--    t = 0 (index 1 in file). 
+       IF ( check_existence( var_names, 'ls_forcing_ug' ) )  THEN
+          ALLOCATE( init_3d%ug_init(nzb:nzt+1) )
+          init_3d%ug_init = 0.0_wp
+
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', 1,          &
+                                init_3d%ug_init(1:nzt) )
+!
+!--       Set top-boundary condition (Neumann)
+          init_3d%ug_init(nzt+1) = init_3d%ug_init(nzt)
+
+          init_3d%from_file_ug = .TRUE.
+       ELSE
+          init_3d%from_file_ug = .FALSE.
+       ENDIF
+       IF ( check_existence( var_names, 'ls_forcing_vg' ) )  THEN
+          ALLOCATE( init_3d%vg_init(nzb:nzt+1) )
+          init_3d%vg_init = 0.0_wp
+
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', 1,          &
+                                init_3d%vg_init(1:nzt) )
+!
+!--       Set top-boundary condition (Neumann)
+          init_3d%vg_init(nzt+1) = init_3d%vg_init(nzt)
+
+          init_3d%from_file_vg = .TRUE.
+       ELSE
+          init_3d%from_file_vg = .FALSE.
+       ENDIF
+!
+!--    Read inital 3D data of u, v, w, pt and q,
+!--    derived from COSMO model. Read PE-wise yz-slices.
+!--    Please note, the u-, v- and w-component are defined on different
+!--    grids with one element less in the x-, y-,
+!--    and z-direction, respectively. Hence, reading is subdivided
+!--    into separate loops.  
+!--    Read u-component
+       IF ( check_existence( var_names, 'init_atmosphere_u' ) )  THEN
+!
+!--       Read attributes for the fill value and level-of-detail
+          CALL get_attribute( id_dynamic, char_fill, init_3d%fill_u,           &
+                              .FALSE., 'init_atmosphere_u' )
+          CALL get_attribute( id_dynamic, char_lod, init_3d%lod_u,             &
+                              .FALSE., 'init_atmosphere_u' )
+!
+!--       level-of-detail 1 - read initialization profile
+          IF ( init_3d%lod_u == 1 )  THEN
+             ALLOCATE( init_3d%u_init(nzb:nzt+1) )
+             init_3d%u_init = 0.0_wp
+
+             CALL get_variable( id_dynamic, 'init_atmosphere_u',               &
+                                init_3d%u_init(nzb+1:nzt) )
+!
+!--          Set top-boundary condition (Neumann)
+             init_3d%u_init(nzt+1) = init_3d%u_init(nzt)
+!
+!--       level-of-detail 2 - read 3D initialization data
+          ELSEIF ( init_3d%lod_u == 2 )  THEN
+             CALL get_variable( id_dynamic, 'init_atmosphere_u',               &
+                                u(nzb+1:nzt,nys:nyn,nxlu:nxr),                 &
+                                nxlu, nys+1, nzb+1,                            &
+                                nxr-nxlu+1, nyn-nys+1, init_3d%nzu,            &
+                                dynamic_3d )
+!
+!--          Set value at leftmost model grid point nxl = 0. This is because
+!--          Inifor provides data only from 1:nx-1 since it assumes non-cyclic
+!--          conditions.
+             IF ( nxl == 0 )                                                   &
+                u(nzb+1:nzt,nys:nyn,nxl) = u(nzb+1:nzt,nys:nyn,nxlu)
+!
+!--          Set bottom and top-boundary
+             u(nzb,:,:)   = u(nzb+1,:,:)
+             u(nzt+1,:,:) = u(nzt,:,:)
+             
+          ENDIF
+          init_3d%from_file_u = .TRUE.
+       ELSE
+          message_string = 'Missing initial data for u-component'
+          CALL message( 'netcdf_data_input_mod', 'PA0544', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read v-component
+       IF ( check_existence( var_names, 'init_atmosphere_v' ) )  THEN
+!
+!--       Read attributes for the fill value and level-of-detail
+          CALL get_attribute( id_dynamic, char_fill, init_3d%fill_v,           &
+                              .FALSE., 'init_atmosphere_v' )
+          CALL get_attribute( id_dynamic, char_lod, init_3d%lod_v,             &
+                              .FALSE., 'init_atmosphere_v' )
+!
+!--       level-of-detail 1 - read initialization profile
+          IF ( init_3d%lod_v == 1 )  THEN
+             ALLOCATE( init_3d%v_init(nzb:nzt+1) )
+             init_3d%v_init = 0.0_wp
+
+             CALL get_variable( id_dynamic, 'init_atmosphere_v',               &
+                                init_3d%v_init(nzb+1:nzt) )
+!
+!--          Set top-boundary condition (Neumann)
+             init_3d%v_init(nzt+1) = init_3d%v_init(nzt)
+!
+!--       level-of-detail 2 - read 3D initialization data
+          ELSEIF ( init_3d%lod_v == 2 )  THEN
+          
+             CALL get_variable( id_dynamic, 'init_atmosphere_v',               &
+                                v(nzb+1:nzt,nysv:nyn,nxl:nxr),                 &
+                                nxl+1, nysv, nzb+1,                            &
+                                nxr-nxl+1, nyn-nysv+1, init_3d%nzu,            &
+                                dynamic_3d )
+!
+!--          Set value at southmost model grid point nys = 0. This is because
+!--          Inifor provides data only from 1:ny-1 since it assumes non-cyclic
+!--          conditions.
+             IF ( nys == 0 )                                                   &
+                v(nzb+1:nzt,nys,nxl:nxr) = v(nzb+1:nzt,nysv,nxl:nxr)                                
+!
+!--          Set bottom and top-boundary
+             v(nzb,:,:)   = v(nzb+1,:,:)
+             v(nzt+1,:,:) = v(nzt,:,:)
+             
+          ENDIF
+          init_3d%from_file_v = .TRUE.
+       ELSE
+          message_string = 'Missing initial data for v-component'
+          CALL message( 'netcdf_data_input_mod', 'PA0544', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read w-component
+       IF ( check_existence( var_names, 'init_atmosphere_w' ) )  THEN
+!
+!--       Read attributes for the fill value and level-of-detail
+          CALL get_attribute( id_dynamic, char_fill, init_3d%fill_w,           &
+                              .FALSE., 'init_atmosphere_w' )
+          CALL get_attribute( id_dynamic, char_lod, init_3d%lod_w,             &
+                              .FALSE., 'init_atmosphere_w' )
+!
+!--       level-of-detail 1 - read initialization profile
+          IF ( init_3d%lod_w == 1 )  THEN
+             ALLOCATE( init_3d%w_init(nzb:nzt+1) )
+             init_3d%w_init = 0.0_wp
+
+             CALL get_variable( id_dynamic, 'init_atmosphere_w',               &
+                                init_3d%w_init(nzb+1:nzt-1) )
+!
+!--          Set top-boundary condition (Neumann)
+             init_3d%w_init(nzt:nzt+1) = init_3d%w_init(nzt-1)
+!
+!--       level-of-detail 2 - read 3D initialization data
+          ELSEIF ( init_3d%lod_w == 2 )  THEN
+
+             CALL get_variable( id_dynamic, 'init_atmosphere_w',                &
+                                w(nzb+1:nzt-1,nys:nyn,nxl:nxr),                 &
+                                nxl+1, nys+1, nzb+1,                            &
+                                nxr-nxl+1, nyn-nys+1, init_3d%nzw,              &
+                                dynamic_3d )
+!
+!--          Set bottom and top-boundary                                
+             w(nzb,:,:)   = 0.0_wp  
+             w(nzt,:,:)   = w(nzt-1,:,:)
+             w(nzt+1,:,:) = w(nzt-1,:,:)
+
+          ENDIF
+          init_3d%from_file_w = .TRUE.
+       ELSE
+          message_string = 'Missing initial data for w-component'
+          CALL message( 'netcdf_data_input_mod', 'PA0544', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read potential temperature
+       IF ( .NOT. neutral )  THEN
+          IF ( check_existence( var_names, 'init_atmosphere_pt' ) )  THEN
+!
+!--          Read attributes for the fill value and level-of-detail
+             CALL get_attribute( id_dynamic, char_fill, init_3d%fill_pt,       &
+                                 .FALSE., 'init_atmosphere_pt' )
+             CALL get_attribute( id_dynamic, char_lod, init_3d%lod_pt,         &
+                                 .FALSE., 'init_atmosphere_pt' )
+!
+!--          level-of-detail 1 - read initialization profile
+             IF ( init_3d%lod_pt == 1 )  THEN
+                ALLOCATE( init_3d%pt_init(nzb:nzt+1) )
+
+                CALL get_variable( id_dynamic, 'init_atmosphere_pt',           &
+                                   init_3d%pt_init(nzb+1:nzt) )
+!
+!--             Set Neumann top and surface boundary condition for initial 
+!--             profil
+                init_3d%pt_init(nzb)   = init_3d%pt_init(nzb+1)
+                init_3d%pt_init(nzt+1) = init_3d%pt_init(nzt)
+!
+!--          level-of-detail 2 - read 3D initialization data
+             ELSEIF ( init_3d%lod_pt == 2 )  THEN
+
+                CALL get_variable( id_dynamic, 'init_atmosphere_pt',           &
+                                   pt(nzb+1:nzt,nys:nyn,nxl:nxr),              &
+                                   nxl+1, nys+1, nzb+1,                        &
+                                   nxr-nxl+1, nyn-nys+1, init_3d%nzu,          &
+                                   dynamic_3d )
+                                   
+!
+!--             Set bottom and top-boundary
+                pt(nzb,:,:)   = pt(nzb+1,:,:)
+                pt(nzt+1,:,:) = pt(nzt,:,:)             
+
+             ENDIF
+             init_3d%from_file_pt = .TRUE.
+          ELSE
+             message_string = 'Missing initial data for ' //                   &
+                              'potential temperature'
+             CALL message( 'netcdf_data_input_mod', 'PA0544', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    Read mixing ratio
+       IF ( humidity )  THEN
+          IF ( check_existence( var_names, 'init_atmosphere_qv' ) )  THEN
+!
+!--          Read attributes for the fill value and level-of-detail
+             CALL get_attribute( id_dynamic, char_fill, init_3d%fill_q,        &
+                                 .FALSE., 'init_atmosphere_qv' )
+             CALL get_attribute( id_dynamic, char_lod, init_3d%lod_q,          &
+                                 .FALSE., 'init_atmosphere_qv' )
+!
+!--          level-of-detail 1 - read initialization profile
+             IF ( init_3d%lod_q == 1 )  THEN
+                ALLOCATE( init_3d%q_init(nzb:nzt+1) )
+
+                CALL get_variable( id_dynamic, 'init_atmosphere_qv',           &
+                                    init_3d%q_init(nzb+1:nzt) )
+!
+!--             Set bottom and top boundary condition (Neumann)
+                init_3d%q_init(nzb)   = init_3d%q_init(nzb+1)
+                init_3d%q_init(nzt+1) = init_3d%q_init(nzt)
+!
+!--          level-of-detail 2 - read 3D initialization data
+             ELSEIF ( init_3d%lod_q == 2 )  THEN
+             
+                CALL get_variable( id_dynamic, 'init_atmosphere_qv',           &
+                                   q(nzb+1:nzt,nys:nyn,nxl:nxr),               &
+                                   nxl+1, nys+1, nzb+1,                        &
+                                   nxr-nxl+1, nyn-nys+1, init_3d%nzu,          &
+                                   dynamic_3d )
+                                   
+!
+!--             Set bottom and top-boundary
+                q(nzb,:,:)   = q(nzb+1,:,:)
+                q(nzt+1,:,:) = q(nzt,:,:)
+                
+             ENDIF
+             init_3d%from_file_q = .TRUE.
+          ELSE
+             message_string = 'Missing initial data for ' //                   &
+                              'mixing ratio'
+             CALL message( 'netcdf_data_input_mod', 'PA0544', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    Close input file
+       CALL close_input_file( id_dynamic )
+#endif
+!
+!--    End of CPU measurement
+       CALL cpu_log( log_point_s(85), 'NetCDF input init', 'stop' )
+!
+!--    Finally, check if the input data has any fill values. Please note,
+!--    checks depend on the LOD of the input data.
+       IF ( init_3d%from_file_u )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_u == 1 )  THEN
+             IF ( ANY( init_3d%u_init(nzb+1:nzt+1) == init_3d%fill_u ) )       &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_u == 2 )  THEN
+             IF ( ANY( u(nzb+1:nzt+1,nys:nyn,nxlu:nxr) == init_3d%fill_u ) )   &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
+             message_string = 'NetCDF input for init_atmosphere_u must ' //    &
+                              'not contain any _FillValues'
+             CALL message( 'netcdf_data_input_mod', 'PA0545', 2, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       IF ( init_3d%from_file_v )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_v == 1 )  THEN
+             IF ( ANY( init_3d%v_init(nzb+1:nzt+1) == init_3d%fill_v ) )       &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_v == 2 )  THEN
+             IF ( ANY( v(nzb+1:nzt+1,nysv:nyn,nxl:nxr) == init_3d%fill_v ) )   &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
+             message_string = 'NetCDF input for init_atmosphere_v must ' //    &
+                              'not contain any _FillValues'
+             CALL message( 'netcdf_data_input_mod', 'PA0545', 2, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       IF ( init_3d%from_file_w )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_w == 1 )  THEN
+             IF ( ANY( init_3d%w_init(nzb+1:nzt) == init_3d%fill_w ) )         &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_w == 2 )  THEN
+             IF ( ANY( w(nzb+1:nzt,nys:nyn,nxl:nxr) == init_3d%fill_w ) )      &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
+             message_string = 'NetCDF input for init_atmosphere_w must ' //    &
+                              'not contain any _FillValues'
+             CALL message( 'netcdf_data_input_mod', 'PA0545', 2, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       IF ( init_3d%from_file_pt )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_pt == 1 )  THEN
+             IF ( ANY( init_3d%pt_init(nzb+1:nzt+1) == init_3d%fill_pt ) )     &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_pt == 2 )  THEN
+             IF ( ANY( pt(nzb+1:nzt+1,nys:nyn,nxl:nxr) == init_3d%fill_pt ) )  &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
+             message_string = 'NetCDF input for init_atmosphere_pt must ' //   &
+                              'not contain any _FillValues'
+             CALL message( 'netcdf_data_input_mod', 'PA0545', 2, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+
+       IF ( init_3d%from_file_q )  THEN
+          check_passed = .TRUE.
+          IF ( init_3d%lod_q == 1 )  THEN
+             IF ( ANY( init_3d%q_init(nzb+1:nzt+1) == init_3d%fill_q ) )       &
+                check_passed = .FALSE.
+          ELSEIF ( init_3d%lod_q == 2 )  THEN
+             IF ( ANY( q(nzb+1:nzt+1,nys:nyn,nxl:nxr) == init_3d%fill_q ) )    &
+                check_passed = .FALSE.
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
+             message_string = 'NetCDF input for init_atmosphere_q must ' //    &
+                              'not contain any _FillValues'
+             CALL message( 'netcdf_data_input_mod', 'PA0545', 2, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    Workaround for cyclic conditions. Please see above for further explanation.
+       IF ( bc_lr_cyc  .AND.  nxl == 0 )  nxlu = nxl
+       IF ( bc_ns_cyc  .AND.  nys == 0 )  nysv = nys
+
+    END SUBROUTINE netcdf_data_input_init_3d
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads initialization data of u, v, w, pt, q, geostrophic wind components,
+!> as well as soil moisture and soil temperature, derived from larger-scale
+!> model (COSMO) by Inifor.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_init_lsm
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       USE indices,                                                            &
+           ONLY:  nx, nxl, nxr, ny, nyn, nys
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names
+      
+       INTEGER(iwp) ::  id_dynamic !< NetCDF id of dynamic input file
+       INTEGER(iwp) ::  num_vars   !< number of variables in netcdf input file
+
+!
+!--    Skip routine if no input file with dynamic input data is available.
+       IF ( .NOT. input_pids_dynamic )  RETURN
+!
+!--    CPU measurement
+       CALL cpu_log( log_point_s(85), 'NetCDF input init', 'start' )
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       CALL open_read_file( TRIM( input_file_dynamic ) //                      &
+                            TRIM( coupling_char ), id_dynamic )
+
+!
+!--    At first, inquire all variable names.
+       CALL inquire_num_variables( id_dynamic, num_vars )
+!
+!--    Allocate memory to store variable names.
+       ALLOCATE( var_names(1:num_vars) )
+       CALL inquire_variable_names( id_dynamic, var_names )
+!
+!--    Read vertical dimension for soil depth. 
+       IF ( check_existence( var_names, 'zsoil' ) )                            &
+          CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nzs,&
+                                                       'zsoil' )
+!
+!--    Read also the horizontal dimensions required for soil initialization.
+!--    Please note, in case of non-nested runs or in case of root domain, 
+!--    these data is already available, but will be read again for the sake
+!--    of clearness. 
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%nx,    &
+                                                    'x'  )
+       CALL netcdf_data_input_get_dimension_length( id_dynamic, init_3d%ny,    &
+                                                    'y'  )
+!
+!--    Check for correct horizontal and vertical dimension. Please note,
+!--    in case of non-nested runs or in case of root domain, these checks 
+!--    are already performed
+       IF ( init_3d%nx-1 /= nx  .OR.  init_3d%ny-1 /= ny )  THEN
+          message_string = 'Number of inifor horizontal grid points  '//       &
+                           'does not match the number of numeric grid points.'
+          CALL message( 'netcdf_data_input_mod', 'PA0543', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read vertical dimensions. Later, these are required for eventual
+!--    inter- and extrapolations of the initialization data.
+       IF ( check_existence( var_names, 'zsoil' ) )  THEN
+          ALLOCATE( init_3d%z_soil(1:init_3d%nzs) )
+          CALL get_variable( id_dynamic, 'zsoil', init_3d%z_soil )
+       ENDIF
+!
+!--    Read initial data for soil moisture
+       IF ( check_existence( var_names, 'init_soil_m' ) )  THEN
+!
+!--       Read attributes for the fill value and level-of-detail
+          CALL get_attribute( id_dynamic, char_fill,                           &
+                              init_3d%fill_msoil,                              &
+                              .FALSE., 'init_soil_m' )
+          CALL get_attribute( id_dynamic, char_lod,                            &
+                              init_3d%lod_msoil,                               &
+                              .FALSE., 'init_soil_m' )
+!
+!--       level-of-detail 1 - read initialization profile
+          IF ( init_3d%lod_msoil == 1 )  THEN
+             ALLOCATE( init_3d%msoil_1d(0:init_3d%nzs-1) )
+
+             CALL get_variable( id_dynamic, 'init_soil_m',                     &
+                                init_3d%msoil_1d(0:init_3d%nzs-1) )
+!
+!--       level-of-detail 2 - read 3D initialization data
+          ELSEIF ( init_3d%lod_msoil == 2 )  THEN
+             ALLOCATE ( init_3d%msoil_3d(0:init_3d%nzs-1,nys:nyn,nxl:nxr) )
+
+            CALL get_variable( id_dynamic, 'init_soil_m',                      &   
+                             init_3d%msoil_3d(0:init_3d%nzs-1,nys:nyn,nxl:nxr),&
+                             nxl, nxr, nys, nyn, 0, init_3d%nzs-1 )
+
+          ENDIF
+          init_3d%from_file_msoil = .TRUE.
+       ENDIF
+!
+!--    Read soil temperature
+       IF ( check_existence( var_names, 'init_soil_t' ) )  THEN
+!
+!--       Read attributes for the fill value and level-of-detail
+          CALL get_attribute( id_dynamic, char_fill,                           &
+                              init_3d%fill_tsoil,                              &
+                              .FALSE., 'init_soil_t' )
+          CALL get_attribute( id_dynamic, char_lod,                            &
+                              init_3d%lod_tsoil,                               &
+                              .FALSE., 'init_soil_t' )
+!
+!--       level-of-detail 1 - read initialization profile
+          IF ( init_3d%lod_tsoil == 1 )  THEN
+             ALLOCATE( init_3d%tsoil_1d(0:init_3d%nzs-1) )
+
+             CALL get_variable( id_dynamic, 'init_soil_t',                     &
+                                init_3d%tsoil_1d(0:init_3d%nzs-1) )
+
+!
+!--       level-of-detail 2 - read 3D initialization data
+          ELSEIF ( init_3d%lod_tsoil == 2 )  THEN
+             ALLOCATE ( init_3d%tsoil_3d(0:init_3d%nzs-1,nys:nyn,nxl:nxr) )
+             
+             CALL get_variable( id_dynamic, 'init_soil_t',                     &   
+                             init_3d%tsoil_3d(0:init_3d%nzs-1,nys:nyn,nxl:nxr),&
+                             nxl, nxr, nys, nyn, 0, init_3d%nzs-1 )
+          ENDIF
+          init_3d%from_file_tsoil = .TRUE.
+       ENDIF
+!
+!--    Close input file
+       CALL close_input_file( id_dynamic )
+#endif
+!
+!--    End of CPU measurement
+       CALL cpu_log( log_point_s(85), 'NetCDF input init', 'stop' )
+
+    END SUBROUTINE netcdf_data_input_init_lsm    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads data at lateral and top boundaries derived from larger-scale model
+!> (COSMO) by Inifor.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_offline_nesting
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
+                  bc_dirichlet_s, humidity, neutral, nesting_offline,          &
+                  time_since_reference_point
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlu, nxr, nyn, nys, nysv, nzb, nzt
+
+       IMPLICIT NONE
+       
+       INTEGER(iwp) ::  id_dynamic !< NetCDF id of dynamic input file
+       INTEGER(iwp) ::  num_vars   !< number of variables in netcdf input file
+       INTEGER(iwp) ::  t          !< running index time dimension
+
+       nest_offl%from_file = MERGE( .TRUE., .FALSE., input_pids_dynamic ) 
+!
+!--    Skip input if no forcing from larger-scale models is applied.
+       IF ( .NOT. nesting_offline )  RETURN
+
+!
+!--    CPU measurement
+       CALL cpu_log( log_point_s(86), 'NetCDF input forcing', 'start' )
+
+#if defined ( __netcdf )
+!
+!--    Open file in read-only mode
+       CALL open_read_file( TRIM( input_file_dynamic ) //                      &
+                            TRIM( coupling_char ), id_dynamic )
+!
+!--    Initialize INIFOR forcing. 
+       IF ( .NOT. nest_offl%init )  THEN
+!
+!--       At first, inquire all variable names.
+          CALL inquire_num_variables( id_dynamic, num_vars )
+!
+!--       Allocate memory to store variable names.
+          ALLOCATE( nest_offl%var_names(1:num_vars) )
+          CALL inquire_variable_names( id_dynamic, nest_offl%var_names )
+!
+!--       Read time dimension, allocate memory and finally read time array
+          CALL netcdf_data_input_get_dimension_length( id_dynamic,             &
+                                                       nest_offl%nt, 'time' )
+
+          IF ( check_existence( nest_offl%var_names, 'time' ) )  THEN
+             ALLOCATE( nest_offl%time(0:nest_offl%nt-1) )
+             CALL get_variable( id_dynamic, 'time', nest_offl%time )
+          ENDIF
+!
+!--       Read vertical dimension of scalar und w grid
+          CALL netcdf_data_input_get_dimension_length( id_dynamic,             &
+                                                       nest_offl%nzu, 'z' )
+          CALL netcdf_data_input_get_dimension_length( id_dynamic,             &
+                                                       nest_offl%nzw, 'zw' )
+
+          IF ( check_existence( nest_offl%var_names, 'z' ) )  THEN
+             ALLOCATE( nest_offl%zu_atmos(1:nest_offl%nzu) )
+             CALL get_variable( id_dynamic, 'z', nest_offl%zu_atmos )
+          ENDIF
+          IF ( check_existence( nest_offl%var_names, 'zw' ) )  THEN
+             ALLOCATE( nest_offl%zw_atmos(1:nest_offl%nzw) )
+             CALL get_variable( id_dynamic, 'zw', nest_offl%zw_atmos )
+          ENDIF
+
+!
+!--       Read surface pressure
+          IF ( check_existence( nest_offl%var_names,                           &
+                                'surface_forcing_surface_pressure' ) )  THEN
+             ALLOCATE( nest_offl%surface_pressure(0:nest_offl%nt-1) )
+             CALL get_variable( id_dynamic,                                    &
+                                'surface_forcing_surface_pressure',            &
+                                nest_offl%surface_pressure )
+          ENDIF
+!
+!--       Set control flag to indicate that initialization is already done
+          nest_offl%init = .TRUE.
+
+       ENDIF
+
+!
+!--    Obtain time index for current input starting at 0.
+!--    @todo: At the moment INIFOR and simulated time correspond
+!--           to each other. If required, adjust to daytime.
+       nest_offl%tind = MINLOC( ABS( nest_offl%time -                          &
+                                     time_since_reference_point ), DIM = 1 )   &
+                        - 1
+       nest_offl%tind_p = nest_offl%tind + 1       
+!
+!--    Read geostrophic wind components
+       DO  t = nest_offl%tind, nest_offl%tind_p
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_ug', t+1,              &
+                                nest_offl%ug(t-nest_offl%tind,nzb+1:nzt) )
+          CALL get_variable_pr( id_dynamic, 'ls_forcing_vg', t+1,              &
+                                nest_offl%vg(t-nest_offl%tind,nzb+1:nzt) )
+       ENDDO
+!
+!--    Read data at lateral and top boundaries. Please note, at left and
+!--    right domain boundary, yz-layers are read for u, v, w, pt and q.
+!--    For the v-component, the data starts at nysv, while for the other
+!--    quantities the data starts at nys. This is equivalent at the north
+!--    and south domain boundary for the u-component. 
+!--    Further, lateral data is not accessed by parallel IO, indicated by the 
+!--    last passed flag in the subroutine get_variable(). This is because
+!--    not every PE participates in this collective blocking read operation. 
+       IF ( bc_dirichlet_l )  THEN
+          CALL get_variable( id_dynamic, 'ls_forcing_left_u',                  &
+                           nest_offl%u_left(0:1,nzb+1:nzt,nys:nyn),            &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+      
+          CALL get_variable( id_dynamic, 'ls_forcing_left_v',                  &
+                           nest_offl%v_left(0:1,nzb+1:nzt,nysv:nyn),           &
+                           nysv, nzb+1, nest_offl%tind+1,                      &
+                           nyn-nysv+1, nest_offl%nzu, 2, .FALSE. )
+
+          CALL get_variable( id_dynamic, 'ls_forcing_left_w',                  &
+                           nest_offl%w_left(0:1,nzb+1:nzt-1,nys:nyn),          &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzw, 2, .FALSE. )
+
+          IF ( .NOT. neutral )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_left_pt',              &
+                           nest_offl%pt_left(0:1,nzb+1:nzt,nys:nyn),           &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+
+          IF ( humidity )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_left_qv',              &
+                           nest_offl%q_left(0:1,nzb+1:nzt,nys:nyn),            &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+
+       ENDIF
+
+       IF ( bc_dirichlet_r )  THEN
+          CALL get_variable( id_dynamic, 'ls_forcing_right_u',                 &
+                           nest_offl%u_right(0:1,nzb+1:nzt,nys:nyn),           &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+                           
+          CALL get_variable( id_dynamic, 'ls_forcing_right_v',                 &
+                           nest_offl%v_right(0:1,nzb+1:nzt,nysv:nyn),          &
+                           nysv, nzb+1, nest_offl%tind+1,                      &
+                           nyn-nysv+1, nest_offl%nzu, 2, .FALSE. )
+                           
+          CALL get_variable( id_dynamic, 'ls_forcing_right_w',                 &
+                           nest_offl%w_right(0:1,nzb+1:nzt-1,nys:nyn),         &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzw, 2, .FALSE. )
+                           
+          IF ( .NOT. neutral )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_right_pt',             &
+                           nest_offl%pt_right(0:1,nzb+1:nzt,nys:nyn),          &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+          IF ( humidity )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_right_qv',             &
+                           nest_offl%q_right(0:1,nzb+1:nzt,nys:nyn),           &
+                           nys+1, nzb+1, nest_offl%tind+1,                     &
+                           nyn-nys+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+       ENDIF
+
+       IF ( bc_dirichlet_n )  THEN
+       
+          CALL get_variable( id_dynamic, 'ls_forcing_north_u',                 &
+                           nest_offl%u_north(0:1,nzb+1:nzt,nxlu:nxr),          &
+                           nxlu, nzb+1, nest_offl%tind+1,                      &
+                           nxr-nxlu+1, nest_offl%nzu, 2, .FALSE. )
+                           
+          CALL get_variable( id_dynamic, 'ls_forcing_north_v',                 &
+                           nest_offl%v_north(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+                           
+          CALL get_variable( id_dynamic, 'ls_forcing_north_w',                 &
+                           nest_offl%w_north(0:1,nzb+1:nzt-1,nxl:nxr),         &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzw, 2, .FALSE. )
+                           
+          IF ( .NOT. neutral )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_north_pt',             &
+                           nest_offl%pt_north(0:1,nzb+1:nzt,nxl:nxr),          &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+          IF ( humidity )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_north_qv',             &
+                           nest_offl%q_north(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+       ENDIF
+
+       IF ( bc_dirichlet_s )  THEN
+          CALL get_variable( id_dynamic, 'ls_forcing_south_u',                 &
+                           nest_offl%u_south(0:1,nzb+1:nzt,nxlu:nxr),          &
+                           nxlu, nzb+1, nest_offl%tind+1,                      &
+                           nxr-nxlu+1, nest_offl%nzu, 2, .FALSE. )
+
+          CALL get_variable( id_dynamic, 'ls_forcing_south_v',                 &
+                           nest_offl%v_south(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+                           
+          CALL get_variable( id_dynamic, 'ls_forcing_south_w',                 &
+                           nest_offl%w_south(0:1,nzb+1:nzt-1,nxl:nxr),         &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzw, 2, .FALSE. )
+                           
+          IF ( .NOT. neutral )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_south_pt',             &
+                           nest_offl%pt_south(0:1,nzb+1:nzt,nxl:nxr),          &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+          IF ( humidity )  THEN
+             CALL get_variable( id_dynamic, 'ls_forcing_south_qv',             &
+                           nest_offl%q_south(0:1,nzb+1:nzt,nxl:nxr),           &
+                           nxl+1, nzb+1, nest_offl%tind+1,                     &
+                           nxr-nxl+1, nest_offl%nzu, 2, .FALSE. )
+          ENDIF
+       ENDIF
+
+!
+!--    Top boundary
+       CALL get_variable( id_dynamic, 'ls_forcing_top_u',                      &
+                             nest_offl%u_top(0:1,nys:nyn,nxlu:nxr),            &
+                             nxlu, nys+1, nest_offl%tind+1,                    &
+                             nxr-nxlu+1, nyn-nys+1, 2, .TRUE. )
+
+       CALL get_variable( id_dynamic, 'ls_forcing_top_v',                      &
+                             nest_offl%v_top(0:1,nysv:nyn,nxl:nxr),            &
+                             nxl+1, nysv, nest_offl%tind+1,                    &
+                             nxr-nxl+1, nyn-nysv+1, 2, .TRUE. )
+                             
+       CALL get_variable( id_dynamic, 'ls_forcing_top_w',                      &
+                             nest_offl%w_top(0:1,nys:nyn,nxl:nxr),             &
+                             nxl+1, nys+1, nest_offl%tind+1,                   &
+                             nxr-nxl+1, nyn-nys+1, 2, .TRUE. )
+                             
+       IF ( .NOT. neutral )  THEN
+          CALL get_variable( id_dynamic, 'ls_forcing_top_pt',                  &
+                                nest_offl%pt_top(0:1,nys:nyn,nxl:nxr),         &
+                                nxl+1, nys+1, nest_offl%tind+1,                &
+                                nxr-nxl+1, nyn-nys+1, 2, .TRUE. )
+       ENDIF
+       IF ( humidity )  THEN
+          CALL get_variable( id_dynamic, 'ls_forcing_top_qv',                  &
+                                nest_offl%q_top(0:1,nys:nyn,nxl:nxr),          &
+                                nxl+1, nys+1, nest_offl%tind+1,                &
+                                nxr-nxl+1, nyn-nys+1, 2, .TRUE. )
+       ENDIF
+
+!
+!--    Close input file
+       CALL close_input_file( id_dynamic )
+#endif
+!
+!--    End of CPU measurement
+       CALL cpu_log( log_point_s(86), 'NetCDF input forcing', 'stop' )
+
+    END SUBROUTINE netcdf_data_input_offline_nesting
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Checks input file for consistency and minimum requirements.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_check_dynamic
+
+       USE control_parameters,                                                 &
+           ONLY:  initializing_actions, message_string, nesting_offline 
+
+       IMPLICIT NONE
+
+!
+!--    In case of forcing, check whether dynamic input file is present
+       IF ( .NOT. input_pids_dynamic  .AND.  nesting_offline  )  THEN
+          message_string = 'nesting_offline = .TRUE. requires dynamic '  //    &
+                            'input file ' //                                   &
+                            TRIM( input_file_dynamic ) // TRIM( coupling_char )
+          CALL message( 'netcdf_data_input_mod', 'PA0546', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Dynamic input file must also be present if initialization via inifor is
+!--    prescribed.
+       IF ( .NOT. input_pids_dynamic  .AND.                                    &
+            TRIM( initializing_actions ) == 'inifor' )  THEN
+          message_string = 'initializing_actions = inifor requires dynamic ' //&
+                           'input file ' // TRIM( input_file_dynamic ) //      &
+                           TRIM( coupling_char )
+          CALL message( 'netcdf_data_input_mod', 'PA0547', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    END SUBROUTINE netcdf_data_input_check_dynamic
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Checks input file for consistency and minimum requirements.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_check_static
+
+       USE arrays_3d,                                                          &
+           ONLY:  zu
+
+       USE control_parameters,                                                 &
+           ONLY:  land_surface, message_string, urban_surface
+
+       USE grid_variables,                                                     &
+           ONLY:  dx, dy
+
+       USE indices,                                                            &
+           ONLY:  nx, nxl, nxr, ny, nyn, nys
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i      !< loop index along x-direction
+       INTEGER(iwp) ::  j      !< loop index along y-direction
+       INTEGER(iwp) ::  n_surf !< number of different surface types at given location
+
+       LOGICAL      ::  check_passed !< flag indicating if a check passed
+
+!
+!--    Return if no static input file is available
+       IF ( .NOT. input_pids_static )  RETURN
+!
+!--    Check whether dimension size in input file matches the model dimensions
+       IF ( dim_static%nx-1 /= nx  .OR.  dim_static%ny-1 /= ny )  THEN
+          message_string = 'Static input file: horizontal dimension in ' //    &
+                           'x- and/or y-direction ' //                         &
+                           'do not match the respective model dimension'
+          CALL message( 'netcdf_data_input_mod', 'PA0548', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Check if grid spacing of provided input data matches the respective
+!--    grid spacing in the model. 
+       IF ( ABS( dim_static%x(1) - dim_static%x(0) - dx ) > 10E-6_wp  .OR.     &
+            ABS( dim_static%y(1) - dim_static%y(0) - dy ) > 10E-6_wp )  THEN
+          message_string = 'Static input file: horizontal grid spacing ' //    &
+                           'in x- and/or y-direction ' //                      &
+                           'do not match the respective model grid spacing.'
+          CALL message( 'netcdf_data_input_mod', 'PA0549', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Check for correct dimension of surface_fractions, should run from 0-2.
+       IF ( surface_fraction_f%from_file )  THEN
+          IF ( surface_fraction_f%nf-1 > 2 )  THEN
+             message_string = 'nsurface_fraction must not be larger than 3.' 
+             CALL message( 'netcdf_data_input_mod', 'PA0580', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    Check orography for fill-values. For the moment, give an error message.
+!--    More advanced methods, e.g. a nearest neighbor algorithm as used in GIS
+!--    systems might be implemented later.
+!--    Please note, if no terrain height is provided, it is set to 0.
+       IF ( ANY( terrain_height_f%var == terrain_height_f%fill ) )  THEN
+          message_string = 'NetCDF variable zt is not ' //                     &
+                           'allowed to have missing data'
+          CALL message( 'netcdf_data_input_mod', 'PA0550', 2, 2, myid, 6, 0 )
+       ENDIF
+!
+!--    Check for negative terrain heights
+       IF ( ANY( terrain_height_f%var < 0.0_wp ) )  THEN
+          message_string = 'NetCDF variable zt is not ' //                     &
+                           'allowed to have negative values'
+          CALL message( 'netcdf_data_input_mod', 'PA0551', 2, 2, myid, 6, 0 )
+       ENDIF
+!
+!--    If 3D buildings are read, check if building information is consistent
+!--    to numeric grid.
+       IF ( buildings_f%from_file )  THEN
+          IF ( buildings_f%lod == 2 )  THEN
+             IF ( buildings_f%nz > SIZE( zu ) )  THEN
+                message_string = 'Reading 3D building data - too much ' //     &
+                                 'data points along the vertical coordinate.'
+                CALL message( 'netcdf_data_input_mod', 'PA0552', 2, 2, 0, 6, 0 )
+             ENDIF
+
+             IF ( ANY( buildings_f%z(0:buildings_f%nz-1) /=                    &
+                       zu(0:buildings_f%nz-1) ) )  THEN
+                message_string = 'Reading 3D building data - vertical ' //     &
+                                 'coordinate do not match numeric grid.'
+                CALL message( 'netcdf_data_input_mod', 'PA0553', 2, 2, 0, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+
+!
+!--    Skip further checks concerning buildings and natural surface properties
+!--    if no urban surface and land surface model are applied.
+       IF (  .NOT. land_surface  .AND.  .NOT. urban_surface )  RETURN
+!
+!--    Check for minimum requirement of surface-classification data in case
+!--    static input file is used.
+       IF ( ( .NOT. vegetation_type_f%from_file  .OR.                          &
+              .NOT. pavement_type_f%from_file    .OR.                          &
+              .NOT. water_type_f%from_file       .OR.                          &
+              .NOT. soil_type_f%from_file             ) .OR.                   &
+             ( urban_surface  .AND.  .NOT. building_type_f%from_file ) )  THEN
+          message_string = 'Minimum requirement for surface classification ' //&
+                           'is not fulfilled. At least ' //                    &
+                           'vegetation_type, pavement_type, ' //               &
+                           'soil_type and water_type are '//                   &
+                           'required. If urban-surface model is applied, ' //  &
+                           'also building_type ist required'
+          CALL message( 'netcdf_data_input_mod', 'PA0554', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Check for general availability of input variables.
+!--    If vegetation_type is 0 at any location, vegetation_pars as well as
+!--    root_area_dens_s are required.
+       IF ( vegetation_type_f%from_file )  THEN
+          IF ( ANY( vegetation_type_f%var == 0 ) )  THEN
+             IF ( .NOT. vegetation_pars_f%from_file )  THEN
+                message_string = 'If vegetation_type = 0 at any location, ' // &
+                                 'vegetation_pars is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0555', 2, 2, -1, 6, 0 )
+             ENDIF
+             IF ( .NOT. root_area_density_lsm_f%from_file )  THEN
+                message_string = 'If vegetation_type = 0 at any location, ' // &
+                                 'root_area_dens_s is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0556', 2, 2, myid, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+!
+!--    If soil_type is zero at any location, soil_pars is required.
+       IF ( soil_type_f%from_file )  THEN
+          check_passed = .TRUE.
+          IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+             IF ( ANY( soil_type_f%var_2d == 0 ) )  THEN
+                IF ( .NOT. soil_pars_f%from_file )  check_passed = .FALSE.
+             ENDIF
+          ELSE
+             IF ( ANY( soil_type_f%var_3d == 0 ) )  THEN
+                IF ( .NOT. soil_pars_f%from_file )  check_passed = .FALSE.
+             ENDIF
+          ENDIF
+          IF ( .NOT. check_passed )  THEN
+             message_string = 'If soil_type = 0 at any location, ' //          &
+                              'soil_pars is required'
+             CALL message( 'netcdf_data_input_mod', 'PA0557', 2, 2, myid, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    If building_type is zero at any location, building_pars is required.
+       IF ( building_type_f%from_file )  THEN
+          IF ( ANY( building_type_f%var == 0 ) )  THEN
+             IF ( .NOT. building_pars_f%from_file )  THEN
+                message_string = 'If building_type = 0 at any location, ' //   &
+                                 'building_pars is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0558', 2, 2, myid, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+!
+!--    If building_type is provided, also building_id is needed
+       IF ( building_type_f%from_file  .AND.  .NOT. building_id_f%from_file )  &
+       THEN
+          message_string = 'If building_type is provided, also building_id '// &
+                           'is required'
+          CALL message( 'netcdf_data_input_mod', 'PA0519', 2, 2, myid, 6, 0 )
+       ENDIF       
+!
+!--    If albedo_type is zero at any location, albedo_pars is required.
+       IF ( albedo_type_f%from_file )  THEN
+          IF ( ANY( albedo_type_f%var == 0 ) )  THEN
+             IF ( .NOT. albedo_pars_f%from_file )  THEN
+                message_string = 'If albedo_type = 0 at any location, ' //     &
+                                 'albedo_pars is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0559', 2, 2, myid, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+!
+!--    If pavement_type is zero at any location, pavement_pars is required.
+       IF ( pavement_type_f%from_file )  THEN
+          IF ( ANY( pavement_type_f%var == 0 ) )  THEN
+             IF ( .NOT. pavement_pars_f%from_file )  THEN
+                message_string = 'If pavement_type = 0 at any location, ' //   &
+                                 'pavement_pars is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0560', 2, 2, myid, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+!
+!--    If pavement_type is zero at any location, also pavement_subsurface_pars
+!--    is required.
+       IF ( pavement_type_f%from_file )  THEN
+          IF ( ANY( pavement_type_f%var == 0 ) )  THEN
+             IF ( .NOT. pavement_subsurface_pars_f%from_file )  THEN
+                message_string = 'If pavement_type = 0 at any location, ' //   &
+                                 'pavement_subsurface_pars is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0561', 2, 2, myid, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+!
+!--    If water_type is zero at any location, water_pars is required.
+       IF ( water_type_f%from_file )  THEN
+          IF ( ANY( water_type_f%var == 0 ) )  THEN
+             IF ( .NOT. water_pars_f%from_file )  THEN
+                message_string = 'If water_type = 0 at any location, ' //      &
+                                 'water_pars is required'
+                CALL message( 'netcdf_data_input_mod', 'PA0562', 2, 2,myid, 6, 0 )
+             ENDIF
+          ENDIF
+       ENDIF
+!
+!--    Check for local consistency of the input data.
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+!
+!--          For each (y,x)-location at least one of the parameters
+!--          vegetation_type, pavement_type, building_type, or water_type
+!--          must be set to a nonÂ­missing value.
+             IF ( vegetation_type_f%var(j,i) == vegetation_type_f%fill  .AND.  &
+                  pavement_type_f%var(j,i)   == pavement_type_f%fill    .AND.  &
+                  building_type_f%var(j,i)   == building_type_f%fill    .AND.  &
+                  water_type_f%var(j,i)      == water_type_f%fill )  THEN
+                WRITE( message_string, * ) 'At least one of the parameters '// &
+                                 'vegetation_type, pavement_type, '     //     &
+                                 'building_type, or water_type must be set '// &
+                                 'to a non-missing value. Grid point: ', j, i
+                CALL message( 'netcdf_data_input_mod', 'PA0563', 2, 2, myid, 6, 0 )
+             ENDIF
+!
+!--          Note that a soil_type is required for each location (y,x) where
+!--          either vegetation_type or pavement_type is a nonÂ­missing value.
+             IF ( ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill  .OR. &
+                    pavement_type_f%var(j,i)   /= pavement_type_f%fill ) )  THEN
+                check_passed = .TRUE.
+                IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+                   IF ( soil_type_f%var_2d(j,i) == soil_type_f%fill )          &
+                      check_passed = .FALSE.
+                ELSE
+                   IF ( ANY( soil_type_f%var_3d(:,j,i) == soil_type_f%fill) )  &
+                      check_passed = .FALSE.
+                ENDIF
+
+                IF ( .NOT. check_passed )  THEN
+                   message_string = 'soil_type is required for each '//        &
+                                 'location (y,x) where vegetation_type or ' // &
+                                 'pavement_type is a non-missing value.'
+                   CALL message( 'netcdf_data_input_mod', 'PA0564',            &
+                                  2, 2, myid, 6, 0 )
+                ENDIF
+             ENDIF
+!
+!--          Check for consistency of surface fraction. If more than one type
+!--          is set, surface fraction need to be given and the sum must not
+!--          be larger than 1.
+             n_surf = 0
+             IF ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill )       &
+                n_surf = n_surf + 1
+             IF ( water_type_f%var(j,i)      /= water_type_f%fill )            &
+                n_surf = n_surf + 1
+             IF ( pavement_type_f%var(j,i)   /= pavement_type_f%fill )         &
+                n_surf = n_surf + 1
+
+             IF ( n_surf > 1 )  THEN
+                IF ( .NOT. surface_fraction_f%from_file )  THEN
+                   message_string = 'If more than one surface type is ' //     &
+                                 'given at a location, surface_fraction ' //   &
+                                 'must be provided.'
+                   CALL message( 'netcdf_data_input_mod', 'PA0565',            &
+                                  2, 2, myid, 6, 0 )
+                ELSEIF ( ANY ( surface_fraction_f%frac(:,j,i) ==               &
+                               surface_fraction_f%fill ) )  THEN
+                   message_string = 'If more than one surface type is ' //     &
+                                 'given at a location, surface_fraction ' //   &
+                                 'must be provided.'
+                   CALL message( 'netcdf_data_input_mod', 'PA0565',            &
+                                  2, 2, myid, 6, 0 )
+                ENDIF
+             ENDIF
+!
+!--          Check for further mismatches. e.g. relative fractions exceed 1 or
+!--          vegetation_type is set but surface vegetation fraction is zero, 
+!--          etc..
+             IF ( surface_fraction_f%from_file )  THEN
+!
+!--             Sum of relative fractions must not exceed 1.
+                IF ( SUM ( surface_fraction_f%frac(0:2,j,i) ) > 1.0_wp )  THEN
+                   message_string = 'surface_fraction must not exceed 1'
+                   CALL message( 'netcdf_data_input_mod', 'PA0566',            &
+                                  2, 2, myid, 6, 0 )
+                ENDIF
+!
+!--             Relative fraction for a type must not be zero at locations where 
+!--             this type is set. 
+                IF (                                                           &
+                  ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill  .AND.&
+                 ( surface_fraction_f%frac(ind_veg_wall,j,i) == 0.0_wp .OR.    &
+                   surface_fraction_f%frac(ind_veg_wall,j,i) ==                &
+                                                     surface_fraction_f%fill ) &
+                  )  .OR.                                                      &
+                  ( pavement_type_f%var(j,i) /= pavement_type_f%fill     .AND. &
+                 ( surface_fraction_f%frac(ind_pav_green,j,i) == 0.0_wp .OR.   &
+                   surface_fraction_f%frac(ind_pav_green,j,i) ==               &
+                                                     surface_fraction_f%fill ) &
+                  )  .OR.                                                      &
+                  ( water_type_f%var(j,i) /= water_type_f%fill           .AND. &
+                 ( surface_fraction_f%frac(ind_wat_win,j,i) == 0.0_wp .OR.     &
+                   surface_fraction_f%frac(ind_wat_win,j,i) ==                 &
+                                                     surface_fraction_f%fill ) &
+                  ) )  THEN
+                   WRITE( message_string, * ) 'Mismatch in setting of '     // &
+                             'surface_fraction. Vegetation-, pavement-, or '// &
+                             'water surface is given at (i,j) = ( ', i, j,     &
+                             ' ), but surface fraction is 0 for the given type.'
+                   CALL message( 'netcdf_data_input_mod', 'PA0567',            &
+                                  2, 2, myid, 6, 0 )
+                ENDIF
+!
+!--             Relative fraction for a type must not contain non-zero values
+!--             if this type is not set. 
+                IF (                                                           &
+                  ( vegetation_type_f%var(j,i) == vegetation_type_f%fill  .AND.&
+                 ( surface_fraction_f%frac(ind_veg_wall,j,i) /= 0.0_wp .AND.   &
+                   surface_fraction_f%frac(ind_veg_wall,j,i) /=                &
+                                                     surface_fraction_f%fill ) &
+                  )  .OR.                                                      &
+                  ( pavement_type_f%var(j,i) == pavement_type_f%fill     .AND. &
+                 ( surface_fraction_f%frac(ind_pav_green,j,i) /= 0.0_wp .AND.  &
+                   surface_fraction_f%frac(ind_pav_green,j,i) /=               &
+                                                     surface_fraction_f%fill ) &
+                  )  .OR.                                                      &
+                  ( water_type_f%var(j,i) == water_type_f%fill           .AND. &
+                 ( surface_fraction_f%frac(ind_wat_win,j,i) /= 0.0_wp .AND.    &
+                   surface_fraction_f%frac(ind_wat_win,j,i) /=                 &
+                                                     surface_fraction_f%fill ) &
+                  ) )  THEN
+                   WRITE( message_string, * ) 'Mismatch in setting of '     // &
+                             'surface_fraction. Vegetation-, pavement-, or '// &
+                             'water surface is not given at (i,j) = ( ', i, j, &
+                             ' ), but surface fraction is not 0 for the ' //   &
+                             'given type.'
+                   CALL message( 'netcdf_data_input_mod', 'PA0568',            &
+                                  2, 2, myid, 6, 0 )
+                ENDIF
+             ENDIF
+!
+!--          Check vegetation_pars. If vegetation_type is 0, all parameters
+!--          need to be set, otherwise, single parameters set by
+!--          vegetation_type can be overwritten.
+             IF ( vegetation_type_f%from_file )  THEN
+                IF ( vegetation_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( vegetation_pars_f%pars_xy(:,j,i) ==               &
+                             vegetation_pars_f%fill ) )  THEN
+                      message_string = 'If vegetation_type(y,x) = 0, all '  // &
+                                       'parameters of vegetation_pars at '//   &
+                                       'this location must be set.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0569',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check root distribution. If vegetation_type is 0, all levels must
+!--          be set.
+             IF ( vegetation_type_f%from_file )  THEN
+                IF ( vegetation_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( root_area_density_lsm_f%var(:,j,i) ==             &
+                             root_area_density_lsm_f%fill ) )  THEN
+                      message_string = 'If vegetation_type(y,x) = 0, all ' //  &
+                                       'levels of root_area_dens_s ' //        &
+                                       'must be set at this location.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0570',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check soil parameters. If soil_type is 0, all parameters
+!--          must be set.
+             IF ( soil_type_f%from_file )  THEN
+                check_passed = .TRUE.
+                IF ( ALLOCATED( soil_type_f%var_2d ) )  THEN
+                   IF ( soil_type_f%var_2d(j,i) == 0 )  THEN
+                      IF ( ANY( soil_pars_f%pars_xy(:,j,i) ==                  &
+                                soil_pars_f%fill ) )  check_passed = .FALSE.
+                   ENDIF
+                ELSE
+                   IF ( ANY( soil_type_f%var_3d(:,j,i) == 0 ) )  THEN
+                      IF ( ANY( soil_pars_f%pars_xy(:,j,i) ==                  &
+                                soil_pars_f%fill ) )  check_passed = .FALSE.
+                   ENDIF
+                ENDIF
+                IF ( .NOT. check_passed )  THEN
+                   message_string = 'If soil_type(y,x) = 0, all levels of '  //&
+                                    'soil_pars at this location must be set.'
+                   CALL message( 'netcdf_data_input_mod', 'PA0571',            &
+                                  2, 2, myid, 6, 0 )
+                ENDIF
+             ENDIF
+
+!
+!--          Check building parameters. If building_type is 0, all parameters
+!--          must be set.
+             IF ( building_type_f%from_file )  THEN
+                IF ( building_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( building_pars_f%pars_xy(:,j,i) ==                 &
+                             building_pars_f%fill ) )  THEN
+                      message_string = 'If building_type(y,x) = 0, all ' //    &
+                                       'parameters of building_pars at this '//&
+                                       'location must be set.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0572',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check if building_type is set at each building and vice versa.
+             IF ( building_type_f%from_file  .AND.  buildings_f%from_file )  THEN
+                IF ( buildings_f%lod == 1 )  THEN
+                   IF ( buildings_f%var_2d(j,i)  /= buildings_f%fill1  .AND.   &
+                        building_type_f%var(j,i) == building_type_f%fill )  THEN
+                      WRITE( message_string, * ) 'Each location where a ' //   &
+                                         'building is set requires a type ' // &
+                                         '( and vice versa ) in case the ' //  &
+                                         'urban-surface model is applied. ' // &
+                                         'i, j = ', i, j
+                      CALL message( 'netcdf_data_input_mod', 'PA0573',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+                IF ( buildings_f%lod == 2 )  THEN
+                   IF ( ANY( buildings_f%var_3d(:,j,i) == 1 )  .AND.           &
+                        building_type_f%var(j,i) == building_type_f%fill )  THEN
+                      WRITE( message_string, * ) 'Each location where a ' //   &
+                                         'building is set requires a type ' // &
+                                         '( and vice versa ) in case the ' //  &
+                                         'urban-surface model is applied. ' // &
+                                         'i, j = ', i, j
+                      CALL message( 'netcdf_data_input_mod', 'PA0573',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check if at each location where a building is present also an ID
+!--          is set and vice versa.
+             IF ( buildings_f%from_file )  THEN
+                IF ( buildings_f%lod == 1 )  THEN
+                   IF ( buildings_f%var_2d(j,i) /= buildings_f%fill1  .AND.    &
+                        building_id_f%var(j,i)  == building_id_f%fill )  THEN
+                      WRITE( message_string, * ) 'Each location where a ' //   &
+                                         'building is set requires an ID ' //  &
+                                         '( and vice versa ). i, j = ', i, j
+                      CALL message( 'netcdf_data_input_mod', 'PA0574',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ELSEIF ( buildings_f%lod == 2 )  THEN
+                   IF ( ANY( buildings_f%var_3d(:,j,i) == 1 )  .AND.           &
+                        building_id_f%var(j,i) == building_id_f%fill )  THEN
+                      WRITE( message_string, * ) 'Each location where a ' //   &
+                                         'building is set requires an ID ' //  &
+                                         '( and vice versa ). i, j = ', i, j
+                      CALL message( 'netcdf_data_input_mod', 'PA0574',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check if building ID is set where a bulding is defined.
+             IF ( buildings_f%from_file )  THEN
+                IF ( buildings_f%lod == 1 )  THEN
+                   IF ( buildings_f%var_2d(j,i) /= buildings_f%fill1  .AND.   &
+                        building_id_f%var(j,i)  == building_id_f%fill )  THEN
+                      WRITE( message_string, * ) 'Each building grid point '// &
+                                                 'requires an ID.', i, j
+                      CALL message( 'netcdf_data_input_mod', 'PA0575',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ELSEIF ( buildings_f%lod == 2 )  THEN
+                   IF ( ANY( buildings_f%var_3d(:,j,i) == 1 )  .AND.           &
+                        building_id_f%var(j,i) == building_id_f%fill )  THEN
+                      WRITE( message_string, * ) 'Each building grid point '// &
+                                                 'requires an ID.', i, j
+                      CALL message( 'netcdf_data_input_mod', 'PA0575',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check albedo parameters. If albedo_type is 0, all parameters
+!--          must be set.
+             IF ( albedo_type_f%from_file )  THEN
+                IF ( albedo_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( albedo_pars_f%pars_xy(:,j,i) ==                   &
+                             albedo_pars_f%fill ) )  THEN
+                      message_string = 'If albedo_type(y,x) = 0, all ' //      &
+                                       'parameters of albedo_pars at this ' // &
+                                       'location must be set.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0576',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+
+!
+!--          Check pavement parameters. If pavement_type is 0, all parameters
+!--          of pavement_pars must be set at this location.
+             IF ( pavement_type_f%from_file )  THEN
+                IF ( pavement_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( pavement_pars_f%pars_xy(:,j,i) ==                 &
+                             pavement_pars_f%fill ) )  THEN
+                      message_string = 'If pavement_type(y,x) = 0, all ' //    &
+                                       'parameters of pavement_pars at this '//&
+                                       'location must be set.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0577',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Check pavement-subsurface parameters. If pavement_type is 0,
+!--          all parameters of pavement_subsurface_pars must be set  at this
+!--          location.
+             IF ( pavement_type_f%from_file )  THEN
+                IF ( pavement_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( pavement_subsurface_pars_f%pars_xyz(:,:,j,i) ==   &
+                             pavement_subsurface_pars_f%fill ) )  THEN
+                      message_string = 'If pavement_type(y,x) = 0, all ' //    &
+                                       'parameters of '                  //    &
+                                       'pavement_subsurface_pars at this '//   &
+                                       'location must be set.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0578',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+
+!
+!--          Check water parameters. If water_type is 0, all parameters
+!--          must be set  at this location.
+             IF ( water_type_f%from_file )  THEN
+                IF ( water_type_f%var(j,i) == 0 )  THEN
+                   IF ( ANY( water_pars_f%pars_xy(:,j,i) ==                    &
+                             water_pars_f%fill ) )  THEN
+                      message_string = 'If water_type(y,x) = 0, all ' //       &
+                                       'parameters of water_pars at this ' //  &
+                                       'location must be set.'
+                      CALL message( 'netcdf_data_input_mod', 'PA0579',         &
+                                     2, 2, myid, 6, 0 )
+                   ENDIF
+                ENDIF
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE netcdf_data_input_check_static
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Vertical interpolation and extrapolation of 1D variables.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_interpolate_1d( var, z_grid, z_file)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k       !< running index z-direction file
+       INTEGER(iwp) ::  kk      !< running index z-direction stretched model grid
+       INTEGER(iwp) ::  kl      !< lower index bound along z-direction
+       INTEGER(iwp) ::  ku      !< upper index bound along z-direction
+
+       REAL(wp), DIMENSION(:) ::  z_grid                  !< grid levels on numeric grid
+       REAL(wp), DIMENSION(:) ::  z_file                  !< grid levels on file grid
+       REAL(wp), DIMENSION(:), INTENT(INOUT) ::  var      !< treated variable
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  var_tmp  !< temporary variable
+
+
+       kl = LBOUND(var,1)
+       ku = UBOUND(var,1)
+       ALLOCATE( var_tmp(kl:ku) )
+
+       DO  k = kl, ku
+
+          kk = MINLOC( ABS( z_file - z_grid(k) ), DIM = 1 )
+
+          IF ( kk < ku )  THEN
+             IF ( z_file(kk) - z_grid(k) <= 0.0_wp )  THEN
+                var_tmp(k) = var(kk) +                                         &
+                                       ( var(kk+1)        - var(kk)    ) /     &
+                                       ( z_file(kk+1)     - z_file(kk) ) *     &
+                                       ( z_grid(k)        - z_file(kk) )
+
+             ELSEIF ( z_file(kk) - z_grid(k) > 0.0_wp )  THEN
+                var_tmp(k) = var(kk-1) +                                       &
+                                         ( var(kk)     - var(kk-1)    ) /      &
+                                         ( z_file(kk)  - z_file(kk-1) ) *      &
+                                         ( z_grid(k)   - z_file(kk-1) )
+             ENDIF
+!
+!--       Extrapolate
+          ELSE
+
+             var_tmp(k) = var(ku) +   ( var(ku)    - var(ku-1)      ) /        &
+                                      ( z_file(ku) - z_file(ku-1)   ) *        &
+                                      ( z_grid(k)  - z_file(ku)     )
+
+          ENDIF
+
+       ENDDO
+       var(:) = var_tmp(:)
+
+       DEALLOCATE( var_tmp )
+
+
+    END SUBROUTINE netcdf_data_input_interpolate_1d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Vertical interpolation and extrapolation of 1D variables from Inifor grid
+!> onto Palm grid, where both have same dimension. Please note, the passed
+!> paramter list in 1D version is different compared to 2D version.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_interpolate_1d_soil( var, var_file,           &
+                                                      z_grid, z_file,          &
+                                                      nzb_var, nzt_var,        &
+                                                      nzb_file, nzt_file )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k        !< running index z-direction file
+       INTEGER(iwp) ::  kk       !< running index z-direction stretched model grid
+       INTEGER(iwp) ::  ku       !< upper index bound along z-direction for varialbe from file
+       INTEGER(iwp) ::  nzb_var  !< lower bound of final array
+       INTEGER(iwp) ::  nzt_var  !< upper bound of final array
+       INTEGER(iwp) ::  nzb_file !< lower bound of file array
+       INTEGER(iwp) ::  nzt_file !< upper bound of file array
+
+!        LOGICAL, OPTIONAL ::  zsoil !< flag indicating reverse z-axis, i.e. zsoil instead of height, e.g. in case of ocean or soil
+
+       REAL(wp), DIMENSION(nzb_var:nzt_var)   ::  z_grid   !< grid levels on numeric grid
+       REAL(wp), DIMENSION(nzb_file:nzt_file) ::  z_file   !< grid levels on file grid
+       REAL(wp), DIMENSION(nzb_var:nzt_var)   ::  var      !< treated variable
+       REAL(wp), DIMENSION(nzb_file:nzt_file) ::  var_file !< temporary variable
+
+       ku = nzt_file
+
+       DO  k = nzb_var, nzt_var
+!
+!--       Determine index on Inifor grid which is closest to the actual height
+          kk = MINLOC( ABS( z_file - z_grid(k) ), DIM = 1 )
+!
+!--       If closest index on Inifor grid is smaller than top index,
+!--       interpolate the data
+          IF ( kk < nzt_file )  THEN
+             IF ( z_file(kk) - z_grid(k) <= 0.0_wp )  THEN
+                var(k) = var_file(kk) + ( var_file(kk+1) - var_file(kk) ) /    &
+                                        ( z_file(kk+1)   - z_file(kk)   ) *    &
+                                        ( z_grid(k)      - z_file(kk)   )
+
+             ELSEIF ( z_file(kk) - z_grid(k) > 0.0_wp )  THEN
+                var(k) = var_file(kk-1) + ( var_file(kk) - var_file(kk-1) ) /  &
+                                          ( z_file(kk)   - z_file(kk-1)   ) *  &
+                                          ( z_grid(k)    - z_file(kk-1)   )
+             ENDIF
+!
+!--       Extrapolate if actual height is above the highest Inifor level
+          ELSE
+             var(k) = var_file(ku) + ( var_file(ku) - var_file(ku-1) ) /       &
+                                     ( z_file(ku)   - z_file(ku-1)   ) *       &
+                                     ( z_grid(k)    - z_file(ku)     )
+
+          ENDIF
+
+       ENDDO
+
+    END SUBROUTINE netcdf_data_input_interpolate_1d_soil
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Vertical interpolation and extrapolation of 2D variables at lateral boundaries.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_interpolate_2d( var, z_grid, z_file)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i       !< running index x- or y -direction
+       INTEGER(iwp) ::  il      !< lower index bound along x- or y-direction
+       INTEGER(iwp) ::  iu      !< upper index bound along x- or y-direction
+       INTEGER(iwp) ::  k       !< running index z-direction file
+       INTEGER(iwp) ::  kk      !< running index z-direction stretched model grid
+       INTEGER(iwp) ::  kl      !< lower index bound along z-direction
+       INTEGER(iwp) ::  ku      !< upper index bound along z-direction
+
+       REAL(wp), DIMENSION(:) ::  z_grid                  !< grid levels on numeric grid
+       REAL(wp), DIMENSION(:) ::  z_file                  !< grid levels on file grid
+       REAL(wp), DIMENSION(:,:), INTENT(INOUT) ::  var    !< treated variable
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  var_tmp  !< temporary variable
+
+
+       il = LBOUND(var,2)
+       iu = UBOUND(var,2)
+       kl = LBOUND(var,1)
+       ku = UBOUND(var,1)
+       ALLOCATE( var_tmp(kl:ku) )
+
+       DO  i = il, iu
+          DO  k = kl, ku
+
+             kk = MINLOC( ABS( z_file - z_grid(k) ), DIM = 1 )
+
+             IF ( kk < ku )  THEN
+                IF ( z_file(kk) - z_grid(k) <= 0.0_wp )  THEN
+                   var_tmp(k) = var(kk,i) +                                    &
+                                          ( var(kk+1,i)      - var(kk,i)  ) /  &
+                                          ( z_file(kk+1)     - z_file(kk) ) *  &
+                                          ( z_grid(k)        - z_file(kk) )
+
+                ELSEIF ( z_file(kk) - z_grid(k) > 0.0_wp )  THEN
+                   var_tmp(k) = var(kk-1,i) +                                  &
+                                            ( var(kk,i)   - var(kk-1,i)  ) /   &
+                                            ( z_file(kk)  - z_file(kk-1) ) *   &
+                                            ( z_grid(k)   - z_file(kk-1) )
+                ENDIF
+!
+!--          Extrapolate
+             ELSE
+
+                var_tmp(k) = var(ku,i) + ( var(ku,i)  - var(ku-1,i)    ) /     &
+                                         ( z_file(ku) - z_file(ku-1)   ) *     &
+                                         ( z_grid(k)  - z_file(ku)     )
+
+             ENDIF
+
+          ENDDO
+          var(:,i) = var_tmp(:)
+
+       ENDDO
+
+       DEALLOCATE( var_tmp )
+
+
+    END SUBROUTINE netcdf_data_input_interpolate_2d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Vertical interpolation and extrapolation of 3D variables.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_interpolate_3d( var, z_grid, z_file )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i       !< running index x-direction
+       INTEGER(iwp) ::  il      !< lower index bound along x-direction
+       INTEGER(iwp) ::  iu      !< upper index bound along x-direction
+       INTEGER(iwp) ::  j       !< running index y-direction
+       INTEGER(iwp) ::  jl      !< lower index bound along x-direction
+       INTEGER(iwp) ::  ju      !< upper index bound along x-direction
+       INTEGER(iwp) ::  k       !< running index z-direction file
+       INTEGER(iwp) ::  kk      !< running index z-direction stretched model grid
+       INTEGER(iwp) ::  kl      !< lower index bound along z-direction
+       INTEGER(iwp) ::  ku      !< upper index bound along z-direction
+
+       REAL(wp), DIMENSION(:) ::  z_grid                      !< grid levels on numeric grid
+       REAL(wp), DIMENSION(:) ::  z_file                      !< grid levels on file grid
+       REAL(wp), DIMENSION(:,:,:), INTENT(INOUT) ::  var      !< treated variable
+       REAL(wp), DIMENSION(:), ALLOCATABLE       ::  var_tmp  !< temporary variable
+
+       il = LBOUND(var,3)
+       iu = UBOUND(var,3)
+       jl = LBOUND(var,2)
+       ju = UBOUND(var,2)
+       kl = LBOUND(var,1)
+       ku = UBOUND(var,1)
+
+       ALLOCATE( var_tmp(kl:ku) )
+
+       DO  i = il, iu
+          DO  j = jl, ju
+             DO  k = kl, ku
+
+                kk = MINLOC( ABS( z_file - z_grid(k) ), DIM = 1 )
+
+                IF ( kk < ku )  THEN
+                   IF ( z_file(kk) - z_grid(k) <= 0.0_wp )  THEN
+                      var_tmp(k) = var(kk,j,i) +                               &
+                                             ( var(kk+1,j,i) - var(kk,j,i) ) / &
+                                             ( z_file(kk+1)  - z_file(kk)  ) * &
+                                             ( z_grid(k)     - z_file(kk)  )
+
+                   ELSEIF ( z_file(kk) - z_grid(k) > 0.0_wp )  THEN
+                      var_tmp(k) = var(kk-1,j,i) +                             &
+                                             ( var(kk,j,i) - var(kk-1,j,i) ) / &
+                                             ( z_file(kk)  - z_file(kk-1)  ) * &
+                                             ( z_grid(k)   - z_file(kk-1)  )
+                   ENDIF
+!
+!--             Extrapolate
+                ELSE
+                   var_tmp(k) = var(ku,j,i) +                                  &
+                                       ( var(ku,j,i)  - var(ku-1,j,i)   ) /    &
+                                       ( z_file(ku)   - z_file(ku-1)    ) *    &
+                                       ( z_grid(k)    - z_file(ku)      )
+
+                ENDIF
+             ENDDO
+             var(:,j,i) = var_tmp(:)
+          ENDDO
+       ENDDO
+
+       DEALLOCATE( var_tmp )
+
+
+    END SUBROUTINE netcdf_data_input_interpolate_3d
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Checks if a given variables is on file
+!------------------------------------------------------------------------------!
+    FUNCTION check_existence( vars_in_file, var_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  var_name                   !< variable to be checked
+       CHARACTER(LEN=*), DIMENSION(:) ::  vars_in_file !< list of variables in file
+
+       INTEGER(iwp) ::  i                              !< loop variable
+
+       LOGICAL ::  check_existence                     !< flag indicating whether a variable exist or not - actual return value
+
+       i = 1
+       check_existence = .FALSE.
+       DO  WHILE ( i <= SIZE( vars_in_file ) )
+          check_existence = TRIM( vars_in_file(i) ) == TRIM( var_name )  .OR.  &
+                            check_existence
+          i = i + 1
+       ENDDO
+
+       RETURN
+
+    END FUNCTION check_existence
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Closes an existing netCDF file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE close_input_file( id )
+#if defined( __netcdf )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(INOUT)        ::  id        !< file id
+
+       nc_stat = NF90_CLOSE( id )
+       CALL handle_error( 'close', 540 )
+#endif
+    END SUBROUTINE close_input_file
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Opens an existing netCDF file for reading only and returns its id.
+!------------------------------------------------------------------------------!
+    SUBROUTINE open_read_file( filename, id )
+#if defined( __netcdf )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*), INTENT(IN) ::  filename  !< filename
+       INTEGER(iwp), INTENT(INOUT)   ::  id        !< file id
+
+#if defined( __netcdf4_parallel )
+!      if __netcdf4_parallel is defined, parrallel NetCDF will be used unconditionally
+       nc_stat = NF90_OPEN( filename, IOR( NF90_WRITE, NF90_MPIIO ), id,  &
+                            COMM = comm2d, INFO = MPI_INFO_NULL )
+       IF(nc_stat /= NF90_NOERR )  THEN                                       !possible NetCDF 3 file
+           nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id )
+           collective_read = .FALSE.
+       ELSE
+           collective_read = .TRUE.
+       END IF
+#else
+!      All MPI processes open und read
+       nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id )
+#endif
+
+       CALL handle_error( 'open_read_file', 539 )
+
+#endif
+    END SUBROUTINE open_read_file
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type INTEGER (32-bit)
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_int32( id, attribute_name, value, global,        &
+                                     variable_name )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL  ::  variable_name    !< variable name
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+       INTEGER(iwp), INTENT(INOUT) ::  value            !< read value
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+#if defined( __netcdf )
+
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int32 global', 522, attribute_name )
+!
+!--    Read attributes referring to a single variable. Therefore, first inquire
+!--    variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_int32', 522, attribute_name )
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int32', 522, attribute_name )
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_int32
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type INTEGER (8-bit)
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_int8( id, attribute_name, value, global,         &
+                                    variable_name )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL  ::  variable_name    !< variable name
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+       INTEGER(KIND=1), INTENT(INOUT) ::  value         !< read value
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+#if defined( __netcdf )
+
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int8 global', 523, attribute_name )
+!
+!--    Read attributes referring to a single variable. Therefore, first inquire
+!--    variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_int8', 523, attribute_name )
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int8', 523, attribute_name )
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_int8
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type REAL
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_real( id, attribute_name, value, global,         &
+                                    variable_name )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL  ::  variable_name    !< variable name
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+
+       REAL(wp), INTENT(INOUT)     ::  value            !< read value
+#if defined( __netcdf )
+
+
+!
+!-- Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_real global', 524, attribute_name )
+!
+!-- Read attributes referring to a single variable. Therefore, first inquire
+!-- variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_real', 524, attribute_name )
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_real', 524, attribute_name )
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type CHARACTER
+!> Remark: reading attributes of type NF_STRING return an error code 56 -
+!> Attempt to convert between text & numbers.
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_string( id, attribute_name, value, global,       &
+                                      variable_name )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)                ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL      ::  variable_name    !< variable name
+       CHARACTER(LEN=*), INTENT(INOUT) ::  value            !< read value
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+#if defined( __netcdf )
+
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_string global', 525, attribute_name )
+!
+!--    Read attributes referring to a single variable. Therefore, first inquire
+!--    variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_string', 525, attribute_name )
+
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_string',525, attribute_name )
+
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_string
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Get dimension array for a given dimension
+!------------------------------------------------------------------------------!
+     SUBROUTINE netcdf_data_input_get_dimension_length( id, dim_len,           &
+                                                        variable_name )
+#if defined( __netcdf )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name    !< dimension name
+       CHARACTER(LEN=100)          ::  dum              !< dummy variable to receive return character
+
+       INTEGER(iwp)                ::  dim_len          !< dimension size
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_dim           !< dimension id
+
+!
+!--    First, inquire dimension ID
+       nc_stat = NF90_INQ_DIMID( id, TRIM( variable_name ), id_dim )
+       CALL handle_error( 'netcdf_data_input_get_dimension_length', 526,       &
+                          variable_name )
+!
+!--    Inquire dimension length
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim, dum, LEN = dim_len )
+       CALL handle_error( 'netcdf_data_input_get_dimension_length', 526,       &
+                          variable_name )
+
+#endif
+    END SUBROUTINE netcdf_data_input_get_dimension_length
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine for reading-in a character string from the chem emissions netcdf 
+!> input file.  
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_string( id, variable_name, var_string, names_number)
+#if defined( __netcdf )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=25), ALLOCATABLE, DIMENSION(:), INTENT(INOUT)  :: var_string
+
+       CHARACTER(LEN=*)                                              :: variable_name          !> variable name 
+
+       CHARACTER (LEN=1), ALLOCATABLE, DIMENSION(:,:)                :: tmp_var_string         !> variable to be read
+
+
+       INTEGER(iwp), INTENT(IN)                                      :: id                     !> file id
+
+       INTEGER(iwp), INTENT(IN)                                      :: names_number           !> number of names
+
+       INTEGER(iwp)                                                  :: id_var                 !> variable id
+
+       INTEGER(iwp)                                                  :: i,j                    !> index to go through the length of the dimensions
+
+       INTEGER(iwp)                                                  :: max_string_length=25   !> this is both the maximum length of a name, but also  
+                                                                                            ! the number of the components of the first dimensions
+                                                                                            ! (rows)
+
+
+       ALLOCATE(tmp_var_string(max_string_length,names_number))
+
+       ALLOCATE(var_string(names_number))
+
+    !-- Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+
+
+    !-- Get variable
+    !-- Start cycle over the emission species
+       DO i = 1, names_number 
+       !-- read the first letter of each component
+          nc_stat = NF90_GET_VAR( id, id_var, var_string(i), start = (/ 1,i /), &
+                                 count = (/ 1,1 /) )
+          CALL handle_error( 'get_variable_string', 701 )
+
+       !-- Start cycle over charachters
+          DO j = 1, max_string_length
+                       
+          !-- read the rest of the components of the name
+             nc_stat = NF90_GET_VAR( id, id_var, tmp_var_string(j,i), start = (/ j,i /),&
+                                     count = (/ 1,1 /) )
+             CALL handle_error( 'get_variable_string', 702 )
+
+             IF ( iachar(tmp_var_string(j,i) ) == 0 ) THEN
+                  tmp_var_string(j,i)=''
+             ENDIF
+
+             IF ( j>1 ) THEN
+             !-- Concatenate first letter of the name and the others
+                var_string(i)=TRIM(var_string(i)) // TRIM(tmp_var_string(j,i))
+
+             ENDIF 
+          ENDDO 
+       ENDDO
+
+#endif
+    END SUBROUTINE get_variable_string
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a character variable in a 1D array
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_variable_1d_char( id, variable_name, var )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name          !< variable name
+       CHARACTER(LEN=*), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
+
+       INTEGER(iwp)                ::  i                !< running index over variable dimension
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< dimension id
+       
+       INTEGER(iwp), DIMENSION(2)  ::  dimid            !< dimension IDs
+       INTEGER(iwp), DIMENSION(2)  ::  dimsize          !< dimension size
+
+#if defined( __netcdf )
+
+!
+!--    First, inquire variable ID
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+       CALL handle_error( 'get_variable_1d_int', 527, variable_name )
+!
+!--    Inquire dimension IDs
+       nc_stat = NF90_INQUIRE_VARIABLE( id, id_var, dimids = dimid(1:2) )
+       CALL handle_error( 'get_variable_1d_char', 527, variable_name )
+!
+!--    Read dimesnion length
+       nc_stat = NF90_INQUIRE_DIMENSION( id, dimid(1), LEN = dimsize(1) )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, dimid(2), LEN = dimsize(2) )
+       
+!
+!--    Read character array. Note, each element is read individually, in order
+!--    to better separate single strings. 
+       DO  i = 1, dimsize(2)
+          nc_stat = NF90_GET_VAR( id, id_var, var(i),                          &
+                                  start = (/ 1, i /),                          &
+                                  count = (/ dimsize(1), 1 /) )
+          CALL handle_error( 'get_variable_1d_char', 527, variable_name )
+       ENDDO     
+                          
+#endif
+    END SUBROUTINE get_variable_1d_char
+
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 1D integer variable from file.
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_variable_1d_int( id, variable_name, var )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name    !< variable name
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< dimension id
+
+       INTEGER(iwp), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    First, inquire variable ID
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+       CALL handle_error( 'get_variable_1d_int', 527, variable_name )
+!
+!--    Inquire dimension length
+       nc_stat = NF90_GET_VAR( id, id_var, var )
+       CALL handle_error( 'get_variable_1d_int', 527, variable_name )
+
+#endif
+    END SUBROUTINE get_variable_1d_int
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 1D float variable from file.
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_variable_1d_real( id, variable_name, var )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name    !< variable name
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< dimension id
+
+       REAL(wp), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    First, inquire variable ID
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+       CALL handle_error( 'get_variable_1d_real', 528, variable_name )
+!
+!--    Inquire dimension length
+       nc_stat = NF90_GET_VAR( id, id_var, var )
+       CALL handle_error( 'get_variable_1d_real', 528, variable_name )
+
+#endif
+    END SUBROUTINE get_variable_1d_real
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a time-dependent 1D float variable from file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_pr( id, variable_name, t, var )
+#if defined( __netcdf )
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)                      ::  variable_name    !< variable name
+
+       INTEGER(iwp), INTENT(IN)              ::  id               !< file id
+       INTEGER(iwp), DIMENSION(1:2)          ::  id_dim           !< dimension ids
+       INTEGER(iwp)                          ::  id_var           !< dimension id
+       INTEGER(iwp)                          ::  n_file           !< number of data-points in file along z dimension
+       INTEGER(iwp), INTENT(IN)              ::  t                !< timestep number
+
+       REAL(wp), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
+
+!
+!--    First, inquire variable ID
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Inquire dimension size of vertical dimension
+       nc_stat = NF90_INQUIRE_VARIABLE( id, id_var, DIMIDS = id_dim )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim(1), LEN = n_file )
+!
+!--    Read variable.
+       nc_stat = NF90_GET_VAR( id, id_var, var,                                &
+                               start = (/ 1,      t     /),                    &
+                               count = (/ n_file, 1     /) )
+       CALL handle_error( 'get_variable_pr', 529, variable_name )
+
+#endif
+    END SUBROUTINE get_variable_pr
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 2D REAL variable from a file. Reading is done processor-wise,
+!> i.e. each core reads its own domain in slices along x.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_2d_real( id, variable_name, var, is, ie, js, je )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  i               !< running index along x direction
+       INTEGER(iwp)                  ::  ie              !< start index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< end index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< running index along y direction
+       INTEGER(iwp)                  ::  je              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< end index for subdomain input along y direction
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  tmp   !< temporary variable to read data from file according
+                                                         !< to its reverse memory access
+       REAL(wp), DIMENSION(:,:), INTENT(INOUT) ::  var   !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+#if defined( __netcdf4_parallel )
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif
+       ENDIF
+
+
+       !Temporary solution for reading emission chemistry files: TBD: we should discuss whether remove it or not
+       IF ( id==id_emis ) THEN
+
+          !--    Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(is:ie,js:je) )
+
+          !--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                                  start = (/ is,      js /),                  &
+                                  count = (/ ie-is+1 , je-js+1 /) ) 
+
+          var=tmp
+
+          CALL handle_error( 'get_variable_2d_real', 530, variable_name ) !TBD: the error number shuld be changed, but since the solution is 
+                                                                          ! provisory, we give the same as below
+ 
+          DEALLOCATE( tmp )
+       
+       !>  Original Subroutine part
+       ELSE
+!
+!--       Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(is:ie,js:je) )
+!
+!--       Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp,                             &
+                                  start = (/ is+1,      js+1 /),               &
+                                  count = (/ ie-is + 1, je-js+1 /) )   
+          CALL handle_error( 'get_variable_2d_real', 530, variable_name )
+!
+!--       Resort data. Please note, dimension subscripts of var all start at 1. 
+          DO  i = is, ie 
+             DO  j = js, je 
+                var(j-js+1,i-is+1) = tmp(i,j)
+             ENDDO
+          ENDDO
+       
+          DEALLOCATE( tmp )
+
+       ENDIF
+#endif
+    END SUBROUTINE get_variable_2d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 2D 32-bit INTEGER variable from file. Reading is done processor-wise,
+!> i.e. each core reads its own domain in slices along x.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_2d_int32( id, variable_name, var, is, ie, js, je )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  i               !< running index along x direction
+       INTEGER(iwp)                  ::  ie              !< start index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< end index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< running index along y direction
+       INTEGER(iwp)                  ::  je              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< end index for subdomain input along y direction
+       
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE   ::  tmp  !< temporary variable to read data from file according
+                                                            !< to its reverse memory access
+       INTEGER(iwp), DIMENSION(:,:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+#if defined( __netcdf4_parallel )       
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif
+       ENDIF
+!
+!--    Allocate temporary variable according to memory access on file. 
+       ALLOCATE( tmp(is:ie,js:je) )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                               start = (/ is+1,      js+1 /),                  &
+                               count = (/ ie-is + 1, je-js+1 /) )    
+                               
+       CALL handle_error( 'get_variable_2d_int32', 531, variable_name )                             
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+       DO  i = is, ie 
+          DO  j = js, je 
+             var(j-js+1,i-is+1) = tmp(i,j)
+          ENDDO
+       ENDDO
+       
+       DEALLOCATE( tmp )
+
+#endif
+    END SUBROUTINE get_variable_2d_int32
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 2D 8-bit INTEGER variable from file. Reading is done processor-wise,
+!> i.e. each core reads its own domain in slices along x.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_2d_int8( id, variable_name, var, is, ie, js, je )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  i               !< running index along x direction
+       INTEGER(iwp)                  ::  ie              !< start index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< end index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< running index along y direction
+       INTEGER(iwp)                  ::  je              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< end index for subdomain input along y direction
+       
+       INTEGER(KIND=1), DIMENSION(:,:), ALLOCATABLE   ::  tmp  !< temporary variable to read data from file according
+                                                               !< to its reverse memory access
+       INTEGER(KIND=1), DIMENSION(:,:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+#if defined( __netcdf4_parallel )        
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif          
+       ENDIF
+!
+!--    Allocate temporary variable according to memory access on file. 
+       ALLOCATE( tmp(is:ie,js:je) )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                               start = (/ is+1,      js+1 /),                  &
+                               count = (/ ie-is + 1, je-js+1 /) )   
+                               
+       CALL handle_error( 'get_variable_2d_int8', 532, variable_name )
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+       DO  i = is, ie 
+          DO  j = js, je 
+             var(j-js+1,i-is+1) = tmp(i,j)
+          ENDDO
+       ENDDO
+       
+       DEALLOCATE( tmp )
+
+#endif
+    END SUBROUTINE get_variable_2d_int8
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 3D 8-bit INTEGER variable from file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_3d_int8( id, variable_name, var, is, ie, js, je,   &
+                                     ks, ke )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  i               !< index along x direction
+       INTEGER(iwp)                  ::  ie              !< start index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< end index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  je              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< end index for subdomain input along y direction
+       INTEGER(iwp)                  ::  k               !< index along any 3rd dimension
+       INTEGER(iwp)                  ::  ke              !< start index of 3rd dimension
+       INTEGER(iwp)                  ::  ks              !< end index of 3rd dimension
+       
+       INTEGER(KIND=1), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp  !< temporary variable to read data from file according 
+                                                                 !< to its reverse memory access
+
+       INTEGER(KIND=1), DIMENSION(:,:,:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )   
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+#if defined( __netcdf4_parallel )
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif          
+       ENDIF
+!
+!--    Allocate temporary variable according to memory access on file. 
+       ALLOCATE( tmp(is:ie,js:je,ks:ke) )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                               start = (/ is+1,    js+1,    ks+1 /),           &
+                               count = (/ ie-is+1, je-js+1, ke-ks+1 /) )                              
+
+       CALL handle_error( 'get_variable_3d_int8', 533, variable_name )                               
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+       DO  i = is, ie 
+          DO  j = js, je
+             DO  k = ks, ke
+                var(k-ks+1,j-js+1,i-is+1) = tmp(i,j,k)
+             ENDDO
+          ENDDO
+       ENDDO
+       
+       DEALLOCATE( tmp )
+
+#endif
+    END SUBROUTINE get_variable_3d_int8
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 3D float variable from file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_3d_real( id, variable_name, var, is, ie, js, je,   &
+                                     ks, ke )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  i               !< index along x direction
+       INTEGER(iwp)                  ::  ie              !< start index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< end index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  je              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< end index for subdomain input along y direction
+       INTEGER(iwp)                  ::  k               !< index along any 3rd dimension
+       INTEGER(iwp)                  ::  ke              !< start index of 3rd dimension
+       INTEGER(iwp)                  ::  ks              !< end index of 3rd dimension
+       
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp !< temporary variable to read data from file according 
+                                                         !< to its reverse memory access
+
+       REAL(wp), DIMENSION(:,:,:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )  
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+#if defined( __netcdf4_parallel )       
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif
+       ENDIF
+!
+!--    Allocate temporary variable according to memory access on file. 
+       ALLOCATE( tmp(is:ie,js:je,ks:ke) )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                               start = (/ is+1,    js+1,    ks+1 /),           &
+                               count = (/ ie-is+1, je-js+1, ke-ks+1 /) )   
+                               
+       CALL handle_error( 'get_variable_3d_real', 534, variable_name )
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+       DO  i = is, ie 
+          DO  j = js, je
+             DO  k = ks, ke
+                var(k-ks+1,j-js+1,i-is+1) = tmp(i,j,k)
+             ENDDO
+          ENDDO
+       ENDDO
+       
+       DEALLOCATE( tmp )
+
+#endif
+    END SUBROUTINE get_variable_3d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 4D float variable from file. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_4d_real( id, variable_name, var, is, ie, js, je,   &
+                                     k1s, k1e, k2s, k2e )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  i               !< index along x direction
+       INTEGER(iwp)                  ::  ie              !< start index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< end index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  je              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< end index for subdomain input along y direction
+       INTEGER(iwp)                  ::  k1              !< index along 3rd direction
+       INTEGER(iwp)                  ::  k1e             !< start index for 3rd dimension
+       INTEGER(iwp)                  ::  k1s             !< end index for 3rd dimension
+       INTEGER(iwp)                  ::  k2              !< index along 4th direction
+       INTEGER(iwp)                  ::  k2e             !< start index for 4th dimension
+       INTEGER(iwp)                  ::  k2s             !< end index for 4th dimension
+
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE   ::  tmp  !< temporary variable to read data from file according
+                                                            !< to its reverse memory access
+       REAL(wp), DIMENSION(:,:,:,:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+#if defined( __netcdf4_parallel )       
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif
+       ENDIF
+
+      !Temporary solution for reading emission chemistry files: 
+       IF ( id==id_emis ) THEN
+
+          !--    Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(is:ie,js:je,k1s:k1e,k2s:k2e) )
+
+          !--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                                  start = (/ is,   js,   k1s+1,   k2s+1 /),                  &
+                                  count = (/ ie-is+1 , je-js+1, k1e-k1s+1, k2e-k2s+1 /) ) 
+
+          var=tmp
+
+          CALL handle_error( 'get_variable_4d_real', 535, variable_name )
+ 
+          DEALLOCATE( tmp )
+
+       !> Original subroutine part
+       ELSE
+!
+!--    Allocate temporary variable according to memory access on file. 
+       ALLOCATE( tmp(is:ie,js:je,k1s:k1e,k2s:k2e) )
+!
+!--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                               start = (/ is+1,    js+1,   k1s+1, k2s+1 /),    &
+                               count = (/ ie-is+1, je-js+1,                    &
+                                          k1e-k1s+1, k2e-k2s+1 /) )
+
+          CALL handle_error( 'get_variable_4d_real', 535, variable_name )
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+          DO  i = is, ie 
+             DO  j = js, je
+                DO  k1 = k1s, k1e
+                   DO  k2 = k2s, k2e
+                      var(k2-k2s+1,k1-k1s+1,j-js+1,i-is+1) = tmp(i,j,k1,k2)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDDO
+       
+          DEALLOCATE( tmp )
+       ENDIF
+#endif
+    END SUBROUTINE get_variable_4d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 4D float variable from file and store it to a 3-d variable.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_4d_to_3d_real( id, variable_name, var, ns, is, ie, js, je,   &
+                                           ks, ke )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  ns              !< start index for subdomain input along n dimension: ns coincides here with ne, since, we select only one value along the 1st dimension n
+
+       INTEGER(iwp)                  ::  i               !< index along x direction
+       INTEGER(iwp)                  ::  ie              !< end index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< start index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  je              !< end index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  k               !< index along any 4th dimension
+       INTEGER(iwp)                  ::  ke              !< end index of 4th dimension
+       INTEGER(iwp)                  ::  ks              !< start index of 4th dimension
+       
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp !< temporary variable to read data from file according 
+                                                         !< to its reverse memory access
+
+       REAL(wp), DIMENSION(:,:,:), INTENT(INOUT) ::  var  !< variable where the read data have to be stored: one dimension is reduced in the process
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )  
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+       ENDIF
+
+      !Temporary solution for reading emission chemistry files: 
+       IF ( id==id_emis ) THEN
+
+          !--    Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(is:ie,js:je,ks:ke) )
+
+          !--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp(is:ie,js:je,ks:ke),                                &
+                                  start = (/ ns, is,   js+1,   ks+1 /),                  &
+                                  count = (/ 1, ie-is+1 , je-js+1, ke-ks+1 /) ) 
+
+          var=tmp(:,:,:)
+
+          CALL handle_error( 'get_variable_4d_to_3d_real', 536, variable_name )
+ 
+          DEALLOCATE( tmp )
+
+       ELSE
+!
+!--    Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(is:ie,js:je,ks:ke) )
+!
+!--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                                  start = (/ ns+1, is+1,    js+1,    ks+1 /),           &
+                                  count = (/ 1, ie-is+1, je-js+1, ke-ks+1 /) )   
+                               
+          CALL handle_error( 'get_variable_4d_to_3d_real', 536, variable_name )
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+          DO  i = is, ie 
+             DO  j = js, je
+                DO  k = ks, ke
+                   var(k-ks+1,j-js+1,i-is+1) = tmp(i,j,k)
+                ENDDO
+             ENDDO
+          ENDDO
+       
+         DEALLOCATE( tmp )
+
+       ENDIF
+#endif
+    END SUBROUTINE get_variable_4d_to_3d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 3D float variables from dynamic driver, such as time-dependent xy-, 
+!> xz- or yz-boundary data as well as 3D initialization data. Please note, 
+!> the passed arguments are start indices and number of elements in each 
+!> dimension, which is in contrast to the other 3d versions where start- and 
+!> end indices are passed. The different handling of 3D dynamic variables is 
+!> due to its asymmetry for the u- and v component.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_3d_real_dynamic( id, variable_name, var,           &
+                                             i1s, i2s, i3s,                    &
+                                             count_1, count_2, count_3,        &
+                                             par_access )
+                                
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       LOGICAL                       ::  par_access      !< additional flag indicating whether parallel read operations should be performed or not 
+       
+       INTEGER(iwp)                  ::  count_1         !< number of elements to be read along 1st dimension (with respect to file)
+       INTEGER(iwp)                  ::  count_2         !< number of elements to be read along 2nd dimension (with respect to file)
+       INTEGER(iwp)                  ::  count_3         !< number of elements to be read along 3rd dimension (with respect to file)
+       INTEGER(iwp)                  ::  i1              !< running index along 1st dimension on file
+       INTEGER(iwp)                  ::  i1s             !< start index for subdomain input along 1st dimension (with respect to file)
+       INTEGER(iwp)                  ::  i2              !< running index along 2nd dimension on file       
+       INTEGER(iwp)                  ::  i2s             !< start index for subdomain input along 2nd dimension (with respect to file)
+       INTEGER(iwp)                  ::  i3              !< running index along 3rd dimension on file 
+       INTEGER(iwp)                  ::  i3s             !< start index of 3rd dimension, in dynamic file this is either time (2D boundary) or z (3D)
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  lb1             !< lower bound of 1st dimension (with respect to file)
+       INTEGER(iwp)                  ::  lb2             !< lower bound of 2nd dimension (with respect to file)
+       INTEGER(iwp)                  ::  lb3             !< lower bound of 3rd dimension (with respect to file)
+       INTEGER(iwp)                  ::  ub1             !< upper bound of 1st dimension (with respect to file)
+       INTEGER(iwp)                  ::  ub2             !< upper bound of 2nd dimension (with respect to file)
+       INTEGER(iwp)                  ::  ub3             !< upper bound of 3rd dimension (with respect to file)
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp !< temporary variable to read data from file according
+                                                         !< to its reverse memory access
+       
+       REAL(wp), DIMENSION(:,:,:), INTENT(INOUT) ::  var !< input variable
+       
+#if defined( __netcdf )
+!
+!--    Inquire variable id.
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+!--    Please note, in contrast to the other input routines where each PEs 
+!--    reads its subdomain data, dynamic input data not by all PEs, only
+!--    by those which encompass lateral model boundaries. Hence, collective
+!--    read operations are only enabled for top-boundary data.
+       IF ( collective_read  .AND.  par_access )  THEN
+#if defined( __netcdf4_parallel )       
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+#endif
+       ENDIF    
+!
+!--    Allocate temporary variable according to memory access on file. 
+!--    Therefore, determine dimension bounds of input array. 
+       lb1 = LBOUND(var,3)
+       ub1 = UBOUND(var,3)
+       lb2 = LBOUND(var,2)
+       ub2 = UBOUND(var,2)
+       lb3 = LBOUND(var,1)
+       ub3 = UBOUND(var,1)
+       ALLOCATE( tmp(lb1:ub1,lb2:ub2,lb3:ub3) )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                               start = (/ i1s,     i2s,     i3s /),            &
+                               count = (/ count_1, count_2, count_3 /) )
+
+       CALL handle_error( 'get_variable_3d_real_dynamic', 537, variable_name )
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+       DO  i3 = lb3, ub3
+          DO i2 = lb2, ub2
+             DO  i1 = lb1, ub1
+                var(i3,i2,i1) = tmp(i1,i2,i3)
+             ENDDO
+          ENDDO
+       ENDDO
+       
+       DEALLOCATE( tmp )       
+#endif
+    END SUBROUTINE get_variable_3d_real_dynamic
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 5D float variable from file and store it to a 4-d variable.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_5d_to_4d_real( id, variable_name, var,              &
+                                           ns, ts, te, is, ie, js, je, ks, ke )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp)                  ::  ns              !< start index for subdomain input along n dimension: ns coincides here with ne, since, we select only one value along the 1st dimension n
+
+       INTEGER(iwp)                  ::  t               !< index along t direction
+       INTEGER(iwp)                  ::  te              !< end index for subdomain input along t direction
+       INTEGER(iwp)                  ::  ts              !< start index for subdomain input along t direction
+
+       INTEGER(iwp)                  ::  i               !< index along x direction
+       INTEGER(iwp)                  ::  ie              !< end index for subdomain input along x direction
+       INTEGER(iwp)                  ::  is              !< start index for subdomain input along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp)                  ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  je              !< end index for subdomain input along y direction
+       INTEGER(iwp)                  ::  js              !< start index for subdomain input along y direction
+       INTEGER(iwp)                  ::  k               !< index along any 5th dimension
+       INTEGER(iwp)                  ::  ke              !< end index of 5th dimension
+       INTEGER(iwp)                  ::  ks              !< start index of 5th dimension
+       
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE   ::  tmp !< temporary variable to read data from file according 
+                                                           ! to its reverse memory access
+       REAL(wp), DIMENSION(:,:,:,:), INTENT(INOUT) ::  var !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )  
+!
+!--    Check for collective read-operation and set respective NetCDF flags if
+!--    required. 
+       IF ( collective_read )  THEN
+          nc_stat = NF90_VAR_PAR_ACCESS (id, id_var, NF90_COLLECTIVE)
+       ENDIF
+
+      !Temporary solution for reading emission chemistry files: 
+       IF ( id==id_emis ) THEN
+
+          !--    Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(ts:te,1,js+1:je+1,ks+1:ke+1) )
+
+          !--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp(ts:te,1,js+1:je+1,ks+1:ke+1),               &
+                                  start = (/ ns, ts,  1,   js+1,   ks+1 /),                  &
+                                  count = (/ 1, te-ts+1, 1, je-js+1, ke-ks+1 /) ) 
+
+          var=tmp
+
+          CALL handle_error( 'get_variable_5d_to_4d_real', 538, variable_name )
+ 
+          DEALLOCATE( tmp )
+
+       !>  Original Subroutine part
+       ELSE
+!
+!--    Allocate temporary variable according to memory access on file. 
+          ALLOCATE( tmp(ks:ke,js:je,is:is,ts:te) )
+!
+!--    Get variable
+          nc_stat = NF90_GET_VAR( id, id_var, tmp,                                &
+                                  start = (/ ks+1, js+1, is+1, ts+1, ns /),           &
+                                  count = (/ ke-ks+1, je-js+1, ie-is+1, te-ts+1, 1 /) )   
+                               
+          CALL handle_error( 'get_variable_5d_to_4d_real', 538, variable_name )
+!
+!--    Resort data. Please note, dimension subscripts of var all start at 1. 
+
+          DO  t = ts, te 
+             DO  i = is, ie 
+                DO  j = js, je
+                   DO  k = ks, ke
+                      var(t-ts+1,i-is+1,j-js+1,k-ks+1) = tmp(k,j,i,t)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDDO 
+
+         DEALLOCATE( tmp )
+
+       ENDIF
+#endif
+    END SUBROUTINE get_variable_5d_to_4d_real
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Inquires the number of variables in a file
+!------------------------------------------------------------------------------!
+    SUBROUTINE inquire_num_variables( id, num_vars )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp), INTENT(INOUT)   ::  num_vars        !< number of variables in a file
+#if defined( __netcdf )
+
+       nc_stat = NF90_INQUIRE( id, NVARIABLES = num_vars )
+       CALL handle_error( 'inquire_num_variables', 539 )
+
+#endif
+    END SUBROUTINE inquire_num_variables
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Inquires the variable names belonging to a file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE inquire_variable_names( id, var_names )
+
+       USE indices
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*), DIMENSION(:), INTENT(INOUT) ::  var_names   !< return variable - variable names
+       INTEGER(iwp)                                  ::  i           !< loop variable
+       INTEGER(iwp), INTENT(IN)                      ::  id          !< file id
+       INTEGER(iwp)                                  ::  num_vars    !< number of variables (unused return parameter)
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE       ::  varids      !< dummy array to strore variable ids temporarily
+#if defined( __netcdf )
+
+       ALLOCATE( varids(1:SIZE(var_names)) )
+       nc_stat = NF90_INQ_VARIDS( id, NVARS = num_vars, VARIDS = varids )
+       CALL handle_error( 'inquire_variable_names', 540 )
+
+       DO  i = 1, SIZE(var_names)
+          nc_stat = NF90_INQUIRE_VARIABLE( id, varids(i), NAME = var_names(i) )
+          CALL handle_error( 'inquire_variable_names', 540 )
+       ENDDO
+
+       DEALLOCATE( varids )
+#endif
+    END SUBROUTINE inquire_variable_names
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prints out a text message corresponding to the current status.
+!------------------------------------------------------------------------------!
+    SUBROUTINE handle_error( routine_name, errno, name )
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=6) ::  message_identifier
+       CHARACTER(LEN=*) ::  routine_name
+       CHARACTER(LEN=*), OPTIONAL ::  name
+
+       INTEGER(iwp) ::  errno
+#if defined( __netcdf )
+       
+       IF ( nc_stat /= NF90_NOERR )  THEN
+
+          WRITE( message_identifier, '(''NC'',I4.4)' )  errno
+          
+          IF ( PRESENT( name ) )  THEN
+             message_string = "Problem reading attribute/variable - " //       &
+                              TRIM(name) // ": " //                            &
+                              TRIM( NF90_STRERROR( nc_stat ) )
+          ELSE
+             message_string = TRIM( NF90_STRERROR( nc_stat ) )
+          ENDIF
+
+          CALL message( routine_name, message_identifier, 2, 2, 0, 6, 1 )
+
+       ENDIF
+
+#endif
+    END SUBROUTINE handle_error
+
+
+ END MODULE netcdf_data_input_mod
Index: /palm/tags/release-6.0/SOURCE/netcdf_interface_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/netcdf_interface_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/netcdf_interface_mod.f90	(revision 3477)
@@ -0,0 +1,7604 @@
+!> @file netcdf_interface_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! - Salsa implemented
+! - Bugfix convert_utm_to...
+! 
+! 3464 2018-10-30 18:08:55Z kanani
+! - Add variable crs to output files
+! - Add long_name to UTM coordinates
+! - Add latitude/longitude coordinates. For 3d and xy output, lon and lat are
+!   only written if parallel output is used.
+! 
+! 3459 2018-10-30 15:04:11Z gronemeier
+! Adjustment of biometeorology calls
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! Bugfix: corrected order of calls to define_netcdf_grid for masked output
+! Add vertical dimensions to masked output in case of terrain-following output
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Bugfix: move ocean output variables to ocean_mod
+! Renamed output variables
+! Add UTM coordinates to mask, 3d, xy, xz, yz output
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! (from branch resler)
+! Add biometeorology
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3235 2018-09-07 14:06:15Z sward
+! Changed MAS output dimension id_dim_agtnum to be of defined size and no longer
+! unlimited. Also changed some MAS output variables to be of type float
+! 
+! 3198 2018-08-15 09:23:10Z sward
+! Redefined MAS limited time dimension to fit usage of multi_agent_system_end
+! 
+! 3187 2018-07-31 10:32:34Z sward
+! Changed agent output to precision NF90_DOUBLE
+! 
+! 3165 2018-07-24 13:12:42Z sward
+! Added agent ID output
+! 
+! 3159 2018-07-20 11:20:01Z sward
+! Added multi agent system
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised, code adjusted to PALMs coding standards, CASE pt_ext
+! pt_new disabled, comment revised
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! .NOT. found in if-query added to account for variables found in tcm
+! 
+! 2964 2018-04-12 16:04:03Z Giersch
+! Calculation of fixed number of output time levels for parallel netcdf output
+! has been moved completely to check_parameters
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! Renamed inipar to initialization_parameters.
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2769 2018-01-25 09:22:24Z raasch
+! bugfix for calculating number of required output time levels in case of output
+! at the beginning of a restart run
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of uv exposure model (FK)
+! Implemented checks for turbulence_closure_mod (TG)
+! Implementation of chemistry module (FK)
+! Bugfix in setting netcdf grids for LSM variables
+! Enable setting of _FillValue attribute in output files (MS)
+!
+! 2512 2017-10-04 08:26:59Z raasch
+! upper bounds of cross section and 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data any more
+! 
+! 2302 2017-07-03 14:07:20Z suehring
+! Reading of 3D topography using NetCDF data type NC_BYTE
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! Removed 2 timeseries (shf_eb + qsws_eb). Removed _eb suffixes
+! 
+! 2265 2017-06-08 16:58:28Z schwenkel
+! Unused variables removed.
+! 
+! 2239 2017-06-01 12:04:51Z suehring
+! Bugfix xy-output of land-surface variables
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! Topograpyh height arrays (zu_s_inner, zw_w_inner) are defined locally, output
+! only if parallel netcdf. 
+!
+! Build interface for topography input: 
+! - open file in read-only mode
+! - read global attributes
+! - read variables
+!
+! Bugfix in xy output (land-surface case)
+!
+! 2209 2017-04-19 09:34:46Z kanani
+! Added support for plant canopy model output
+! 
+! 2189 2017-03-21 09:29:52Z raasch
+! bugfix: rho renamed rho_ocean for the cross section output
+!
+! 2109 2017-01-10 12:18:08Z raasch
+! bugfix: length of character string netcdf_var_name extended to avoid problems
+!         which appeared in restart runs due to truncation
+!
+! 2040 2016-10-26 16:58:09Z gronemeier
+! Increased number of possible statistic_regions to 99
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters,
+! changed prefix for urban surface model output to "usm_",
+! introduced control parameter varnamelength for LEN of trimvar.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added support for new urban surface model (temporary modifications of 
+! SELECT CASE ( ) necessary, see variable trimvar),
+! increased DIMENSION of do2d_unit, do3d_unit, id_var_do2d, id_var_do3d,
+! increased LEN of char_cross_profiles, var_list, var_list_old
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1990 2016-08-12 09:54:36Z gronemeier
+! Bugfix: variable list was not written for time series output
+! 
+! 1980 2016-07-29 15:51:57Z suehring
+! Bugfix, in order to steer user-defined output, setting flag found explicitly
+! to .F.
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Removed remaining 2D land surface quantities. Definition of radiation 
+! quantities is now done directly in the respective module
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Bugfix: wrong units for lsm quantities.
+! Definition of grids for land surface quantities is now done directly in the
+! respective module.
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Additional labels and units for timeseries output of passive scalar-related 
+! quantities
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! flight module added
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! spectrum renamed spectra_mod
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! Bugfix: id_var_time_sp made public
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf interface has been modularized, former file netcdf renamed to
+! netcdf_interface, creation of netcdf-dimensions and -variables moved to
+! specific new subroutines create_netcdf_dim and create_netcdf_var,
+! compression (deflation) of variables implemented,
+! ibmy special cpp directive removed
+!
+! 1745 2016-02-05 13:06:51Z gronemeier
+! Bugfix: recalculating ntdim_3d, ntdim_2d_xy/xz/yz when checking the
+!         extensibility of an existing file (only when using parallel NetCDF). 
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of radiative heating rates for RRTMG. Corrected output of 
+! radiative fluxes
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1596 2015-05-21 09:34:28Z gronemeier
+! Bugfix in masked data output. Read 'zu_3d' when trying to extend masked data
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added support for land surface model and radiation model output. In the course
+! of this action a new vertical grid zs (soil) was introduced.
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! Forgotten ONLY-attribute added to USE-statements
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1308 2014-03-13 14:58:42Z fricke
+! +ntime_count, oldmode
+! Adjust NF90_CREATE and NF90_OPEN statement for parallel output
+! To increase the performance for parallel output, the following is done:
+! - Limit time dimension
+! - Values of axis data are only written by PE0
+! - No fill is set for all variables
+! Check the number of output time levels for restart jobs
+!
+! 1206 2013-07-18 12:49:16Z witha
+! Bugfix: typo in preprocessor directive in subroutine open_write_netcdf_file
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! +qr, nr, prr
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1031 2012-10-19 14:35:30Z raasch
+! netCDF4 without parallel file support implemented, new routines
+! create_netcdf_file and open_write_netcdf_file at end
+!
+! 992 2012-09-05 15:08:26Z hoffmann
+! Removal of the informative messages PA0352 and PA0353.
+!  
+! 983 2012-08-21 14:17:57Z hoffmann
+! Bugfix in cross_profiles.
+!
+! 964 2012-07-26 09:14:24Z raasch
+! rev 951 and 959 reformatted
+!
+! 959 2012-07-24 13:13:41Z hoffmann
+! Bugfix in cross_profiles. It is not allowed to arrange more than 100
+! profiles with cross_profiles. 
+!
+! 951 2012-07-19 14:22:52Z hoffmann
+! cross_profiles, profile_rows, profile_columns are written to netCDF header
+!
+! Revision 1.1  2005/05/18 15:37:16  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> In case of extend = .FALSE.:
+!> Define all necessary dimensions, axes and variables for the different
+!> netCDF datasets. This subroutine is called from check_open after a new
+!> dataset is created. It leaves the open netCDF files ready to write.
+!>
+!> In case of extend = .TRUE.:
+!> Find out if dimensions and variables of an existing file match the values
+!> of the actual run. If so, get all necessary information (ids, etc.) from
+!> this file.
+!>
+!> Parameter av can assume values 0 (non-averaged data) and 1 (time averaged
+!> data)
+!>
+!> @todo calculation of output time levels for parallel NetCDF still does not
+!>       cover every exception (change of dt_do, end_time in restart)
+!> @todo timeseries and profile output still needs to be rewritten to allow
+!>       modularization
+!> @todo output 2d UTM coordinates without global arrays
+!> @todo output longitude/latitude also with non-parallel output (3d and xy)
+!------------------------------------------------------------------------------!
+ MODULE netcdf_interface
+
+    USE control_parameters,                                                    &
+        ONLY:  biometeorology, fl_max,                                         &
+               max_masks, multi_agent_system_end,                              &
+               multi_agent_system_start, var_fl_max, varnamelength
+    USE kinds
+#if defined( __netcdf )
+    USE NETCDF
+#endif
+    USE mas_global_attributes,                                                 &
+        ONLY:  dim_size_agtnum
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY: coord_ref_sys
+
+    PRIVATE
+
+    CHARACTER (LEN=16), DIMENSION(13) ::  agt_var_names =                      &
+          (/ 'ag_id           ', 'ag_x            ', 'ag_y            ',       &
+             'ag_wind         ', 'ag_temp         ', 'ag_group        ',       &
+             'PM10            ', 'PM25            ', 'ag_iPT          ',       &
+             'ag_uv           ', 'not_used        ', 'not_used        ',       &
+             'not_used        ' /)
+
+    CHARACTER (LEN=16), DIMENSION(13) ::  agt_var_units = &
+          (/ 'dim_less        ', 'meters          ', 'meters          ',       &
+             'm/s             ', 'K               ', 'dim_less        ',       &
+             'tbd             ', 'tbd             ', 'tbd             ',       &
+             'tbd             ', 'not_used        ', 'not_used        ',       &
+             'not_used        ' /)
+
+    INTEGER(iwp), PARAMETER ::  dopr_norm_num = 7, dopts_num = 29, dots_max = 100
+
+    CHARACTER (LEN=7), DIMENSION(dopr_norm_num) ::  dopr_norm_names =          &
+         (/ 'wtheta0', 'ws2    ', 'tsw2   ', 'ws3    ', 'ws2tsw ', 'wstsw2 ',  &
+            'z_i    ' /)
+
+    CHARACTER (LEN=7), DIMENSION(dopr_norm_num) ::  dopr_norm_longnames =      &
+         (/ 'wtheta0', 'w*2    ', 't*w2   ', 'w*3    ', 'w*2t*w ', 'w*t*w2 ',  &
+            'z_i    ' /)
+
+    CHARACTER (LEN=7), DIMENSION(dopts_num) :: dopts_label =                   &
+          (/ 'tnpt   ', 'x_     ', 'y_     ', 'z_     ', 'z_abs  ', 'u      ', &
+             'v      ', 'w      ', 'u"     ', 'v"     ', 'w"     ', 'npt_up ', &
+             'w_up   ', 'w_down ', 'radius ', 'r_min  ', 'r_max  ', 'npt_max', &
+             'npt_min', 'x*2    ', 'y*2    ', 'z*2    ', 'u*2    ', 'v*2    ', &
+             'w*2    ', 'u"2    ', 'v"2    ', 'w"2    ', 'npt*2  ' /)
+
+    CHARACTER (LEN=7), DIMENSION(dopts_num) :: dopts_unit =                    &
+          (/ 'number ', 'm      ', 'm      ', 'm      ', 'm      ', 'm/s    ', &
+             'm/s    ', 'm/s    ', 'm/s    ', 'm/s    ', 'm/s    ', 'number ', &
+             'm/s    ', 'm/s    ', 'm      ', 'm      ', 'm      ', 'number ', &
+             'number ', 'm2     ', 'm2     ', 'm2     ', 'm2/s2  ', 'm2/s2  ', &
+             'm2/s2  ', 'm2/s2  ', 'm2/s2  ', 'm2/s2  ', 'number2' /)
+
+    INTEGER(iwp) ::  dots_num  = 25  !< number of timeseries defined by default
+    INTEGER(iwp) ::  dots_soil = 26  !< starting index for soil-timeseries
+    INTEGER(iwp) ::  dots_rad  = 32  !< starting index for radiation-timeseries
+
+    CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label =                    &
+          (/ 'E            ', 'E*           ', 'dt           ',                &
+             'us*          ', 'th*          ', 'umax         ',                &
+             'vmax         ', 'wmax         ', 'div_new      ',                &
+             'div_old      ', 'zi_wtheta    ', 'zi_theta     ',                &
+             'w*           ', 'w"theta"0    ', 'w"theta"     ',                &
+             'wtheta       ', 'theta(0)     ', 'theta(z_mo)  ',                &
+             'w"u"0        ', 'w"v"0        ', 'w"q"0        ',                &
+             'ol           ', 'q*           ', 'w"s"         ',                &
+             's*           ', 'ghf          ', 'qsws_liq     ',                &
+             'qsws_soil    ', 'qsws_veg     ', 'r_a          ',                &
+             'r_s          ',                                                  &
+             'rad_net      ', 'rad_lw_in    ', 'rad_lw_out   ',                &
+             'rad_sw_in    ', 'rad_sw_out   ', 'rrtm_aldif   ',                &
+             'rrtm_aldir   ', 'rrtm_asdif   ', 'rrtm_asdir   ',                &                                               
+             ( 'unknown      ', i9 = 1, dots_max-40 ) /)
+
+    CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_unit =                     &
+          (/ 'm2/s2        ', 'm2/s2        ', 's            ',                &
+             'm/s          ', 'K            ', 'm/s          ',                &
+             'm/s          ', 'm/s          ', 's-1          ',                &
+             's-1          ', 'm            ', 'm            ',                &
+             'm/s          ', 'K m/s        ', 'K m/s        ',                &
+             'K m/s        ', 'K            ', 'K            ',                &
+             'm2/s2        ', 'm2/s2        ', 'kg m/s       ',                &
+             'm            ', 'kg/kg        ', 'kg m/(kg s)  ',                &
+             'kg/kg        ', 'W/m2         ', 'W/m2         ',                &
+             'W/m2         ', 'W/m2         ', 's/m          ',                &
+             's/m          ',                                                  &
+             'W/m2         ', 'W/m2         ', 'W/m2         ',                &
+             'W/m2         ', 'W/m2         ', '             ',                &
+             '             ', '             ', '             ',                &
+             ( 'unknown      ', i9 = 1, dots_max-40 ) /)
+
+    CHARACTER (LEN=16) :: heatflux_output_unit     !< unit for heatflux output
+    CHARACTER (LEN=16) :: waterflux_output_unit    !< unit for waterflux output
+    CHARACTER (LEN=16) :: momentumflux_output_unit !< unit for momentumflux output
+
+    CHARACTER (LEN=9), DIMENSION(300) ::  dopr_unit = 'unknown'
+
+    CHARACTER (LEN=7), DIMENSION(0:1,500) ::  do2d_unit, do3d_unit
+
+!    CHARACTER (LEN=16), DIMENSION(25) ::  prt_var_names = &
+!          (/ 'pt_age          ', 'pt_dvrp_size    ', 'pt_origin_x     ', &
+!             'pt_origin_y     ', 'pt_origin_z     ', 'pt_radius       ', &
+!             'pt_speed_x      ', 'pt_speed_y      ', 'pt_speed_z      ', &
+!             'pt_weight_factor', 'pt_x            ', 'pt_y            ', &
+!             'pt_z            ', 'pt_color        ', 'pt_group        ', &
+!             'pt_tailpoints   ', 'pt_tail_id      ', 'pt_density_ratio', &
+!             'pt_exp_arg      ', 'pt_exp_term     ', 'not_used        ', &
+!             'not_used        ', 'not_used        ', 'not_used        ', &
+!             'not_used        ' /)
+
+!    CHARACTER (LEN=16), DIMENSION(25) ::  prt_var_units = &
+!          (/ 'seconds         ', 'meters          ', 'meters          ', &
+!             'meters          ', 'meters          ', 'meters          ', &
+!             'm/s             ', 'm/s             ', 'm/s             ', &
+!             'factor          ', 'meters          ', 'meters          ', &
+!             'meters          ', 'none            ', 'none            ', &
+!             'none            ', 'none            ', 'ratio           ', &
+!             'none            ', 'none            ', 'not_used        ', &
+!             'not_used        ', 'not_used        ', 'not_used        ', &
+!             'not_used        ' /)
+
+    CHARACTER(LEN=20), DIMENSION(11) ::  netcdf_precision = ' '
+    CHARACTER(LEN=40) ::  netcdf_data_format_string
+
+    INTEGER(iwp) ::  id_dim_agtnum, id_dim_time_agt,                           &
+                     id_dim_time_fl, id_dim_time_pr,                           &
+                     id_dim_time_pts, id_dim_time_sp, id_dim_time_ts,          &
+                     id_dim_x_sp, id_dim_y_sp, id_dim_zu_sp, id_dim_zw_sp,     &
+                     id_set_agt, id_set_fl, id_set_pr, id_set_prt, id_set_pts, &
+                     id_set_sp, id_set_ts, id_var_agtnum, id_var_time_agt,     &
+                     id_var_time_fl, id_var_rnoa_agt, id_var_time_pr,          &
+                     id_var_time_pts, id_var_time_sp, id_var_time_ts,          &
+                     id_var_x_sp, id_var_y_sp, id_var_zu_sp, id_var_zw_sp,     &
+                     nc_stat
+
+
+    INTEGER(iwp), DIMENSION(0:1) ::  id_dim_time_xy, id_dim_time_xz, &
+                    id_dim_time_yz, id_dim_time_3d, id_dim_x_xy, id_dim_xu_xy, &
+                    id_dim_x_xz, id_dim_xu_xz, id_dim_x_yz, id_dim_xu_yz, &
+                    id_dim_x_3d, id_dim_xu_3d, id_dim_y_xy, id_dim_yv_xy, &
+                    id_dim_y_xz, id_dim_yv_xz, id_dim_y_yz, id_dim_yv_yz, &
+                    id_dim_y_3d, id_dim_yv_3d, id_dim_zs_xy, id_dim_zs_xz, &
+                    id_dim_zs_yz, id_dim_zs_3d, id_dim_zu_xy, id_dim_zu1_xy, &
+                    id_dim_zu_xz, id_dim_zu_yz, id_dim_zu_3d, id_dim_zw_xy, &
+                    id_dim_zw_xz, id_dim_zw_yz, id_dim_zw_3d, id_set_xy, &
+                    id_set_xz, id_set_yz, id_set_3d, id_var_ind_x_yz, &
+                    id_var_ind_y_xz, id_var_ind_z_xy, id_var_time_xy, &
+                    id_var_time_xz, id_var_time_yz, id_var_time_3d, id_var_x_xy, &
+                    id_var_xu_xy, id_var_x_xz, id_var_xu_xz, id_var_x_yz, &
+                    id_var_xu_yz, id_var_x_3d, id_var_xu_3d, id_var_y_xy, &
+                    id_var_yv_xy, id_var_y_xz, id_var_yv_xz, id_var_y_yz, &
+                    id_var_yv_yz, id_var_y_3d, id_var_yv_3d, id_var_zs_xy, &
+                    id_var_zs_xz, id_var_zs_yz, id_var_zs_3d, id_var_zusi_xy, &
+                    id_var_zusi_3d, id_var_zu_xy, id_var_zu1_xy, id_var_zu_xz, &
+                    id_var_zu_yz, id_var_zu_3d, id_var_zwwi_xy, id_var_zwwi_3d, &
+                    id_var_zw_xy, id_var_zw_xz, id_var_zw_yz, id_var_zw_3d
+
+    INTEGER(iwp), DIMENSION(0:1,0:2) ::  id_var_eutm_3d, id_var_nutm_3d, &
+                                         id_var_eutm_xy, id_var_nutm_xy, &
+                                         id_var_eutm_xz, id_var_nutm_xz, &
+                                         id_var_eutm_yz, id_var_nutm_yz
+
+    INTEGER(iwp), DIMENSION(0:1,0:2) ::  id_var_lat_3d, id_var_lon_3d, &
+                                         id_var_lat_xy, id_var_lon_xy, &
+                                         id_var_lat_xz, id_var_lon_xz, &
+                                         id_var_lat_yz, id_var_lon_yz
+
+    INTEGER ::  netcdf_data_format = 2  !< NetCDF3 64bit offset format
+    INTEGER ::  netcdf_deflate = 0      !< NetCDF compression, default: no
+                                        !< compression
+
+    INTEGER(iwp)                 ::  dofl_time_count
+    INTEGER(iwp), DIMENSION(10)  ::  id_var_dospx, id_var_dospy
+    INTEGER(iwp), DIMENSION(20)  ::  id_var_agt
+!    INTEGER(iwp), DIMENSION(20)  ::  id_var_prt
+    INTEGER(iwp), DIMENSION(11)  ::  nc_precision
+    INTEGER(iwp), DIMENSION(dopr_norm_num) ::  id_var_norm_dopr
+    
+    INTEGER(iwp), DIMENSION(fl_max) ::  id_dim_x_fl, id_dim_y_fl, id_dim_z_fl
+    INTEGER(iwp), DIMENSION(fl_max) ::  id_var_x_fl, id_var_y_fl, id_var_z_fl
+    
+    CHARACTER (LEN=20), DIMENSION(fl_max*var_fl_max) :: dofl_label
+    CHARACTER (LEN=20), DIMENSION(fl_max*var_fl_max) :: dofl_unit 
+    CHARACTER (LEN=20), DIMENSION(fl_max) :: dofl_dim_label_x
+    CHARACTER (LEN=20), DIMENSION(fl_max) :: dofl_dim_label_y
+    CHARACTER (LEN=20), DIMENSION(fl_max) :: dofl_dim_label_z
+
+    INTEGER(iwp), DIMENSION(fl_max*var_fl_max) :: id_var_dofl    
+
+    INTEGER(iwp), DIMENSION(dopts_num,0:10) ::  id_var_dopts
+    INTEGER(iwp), DIMENSION(0:1,500)        ::  id_var_do2d, id_var_do3d
+    INTEGER(iwp), DIMENSION(100,0:99)       ::  id_dim_z_pr, id_var_dopr, &
+                                                id_var_z_pr
+    INTEGER(iwp), DIMENSION(dots_max,0:99)  ::  id_var_dots
+
+!
+!-- Masked output
+    CHARACTER (LEN=7), DIMENSION(max_masks,0:1,100) ::  domask_unit
+
+    LOGICAL ::  output_for_t0 = .FALSE.
+
+    INTEGER(iwp), DIMENSION(1:max_masks,0:1) ::  id_dim_time_mask, id_dim_x_mask, &
+                   id_dim_xu_mask, id_dim_y_mask, id_dim_yv_mask, id_dim_zs_mask, &
+                   id_dim_zu_mask, id_dim_zw_mask, &
+                   id_set_mask, &
+                   id_var_time_mask, id_var_x_mask, id_var_xu_mask, &
+                   id_var_y_mask, id_var_yv_mask, id_var_zs_mask, &
+                   id_var_zu_mask, id_var_zw_mask, &
+                   id_var_zusi_mask, id_var_zwwi_mask
+
+    INTEGER(iwp), DIMENSION(1:max_masks,0:1,0:2) ::  id_var_eutm_mask, &
+                                                     id_var_nutm_mask
+
+    INTEGER(iwp), DIMENSION(1:max_masks,0:1,0:2) ::  id_var_lat_mask, &
+                                                     id_var_lon_mask
+
+    INTEGER(iwp), DIMENSION(1:max_masks,0:1,100) ::  id_var_domask
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+
+    PUBLIC  dofl_dim_label_x, dofl_dim_label_y, dofl_dim_label_z, dofl_label,  &
+            dofl_time_count, dofl_unit, domask_unit, dopr_unit, dopts_num,     &
+            dots_label, dots_max, dots_num, dots_rad, dots_soil, dots_unit,    &
+            do2d_unit, do3d_unit, fill_value, id_set_agt, id_set_fl,           &
+            id_set_mask, id_set_pr, id_set_prt, id_set_pts, id_set_sp,         &
+            id_set_ts, id_set_xy, id_set_xz, id_set_yz, id_set_3d, id_var_agt, &
+            id_var_domask, id_var_dofl, id_var_dopr, id_var_dopts,             &
+            id_var_dospx, id_var_dospy, id_var_dots, id_var_do2d, id_var_do3d, &
+            id_var_norm_dopr, id_var_time_agt, id_var_time_fl,                 &
+            id_var_time_mask, id_var_time_pr, id_var_rnoa_agt, id_var_time_pts,&
+            id_var_time_sp, id_var_time_ts,                                    &
+            id_var_time_xy, id_var_time_xz, id_var_time_yz, id_var_time_3d,    &
+            id_var_x_fl, id_var_y_fl, id_var_z_fl,  nc_stat,                   &
+            netcdf_data_format, netcdf_data_format_string, netcdf_deflate,     &
+            netcdf_precision, output_for_t0, heatflux_output_unit,             &
+            waterflux_output_unit, momentumflux_output_unit
+
+    SAVE
+
+    INTERFACE netcdf_create_dim
+       MODULE PROCEDURE netcdf_create_dim
+    END INTERFACE netcdf_create_dim
+
+    INTERFACE netcdf_create_file
+       MODULE PROCEDURE netcdf_create_file
+    END INTERFACE netcdf_create_file
+
+    INTERFACE netcdf_create_var
+       MODULE PROCEDURE netcdf_create_var
+    END INTERFACE netcdf_create_var
+
+    INTERFACE netcdf_define_header
+       MODULE PROCEDURE netcdf_define_header
+    END INTERFACE netcdf_define_header
+
+    INTERFACE netcdf_handle_error
+       MODULE PROCEDURE netcdf_handle_error
+    END INTERFACE netcdf_handle_error
+
+    INTERFACE netcdf_open_write_file
+       MODULE PROCEDURE netcdf_open_write_file
+    END INTERFACE netcdf_open_write_file
+
+    PUBLIC netcdf_create_file, netcdf_define_header,                           &
+           netcdf_handle_error, netcdf_open_write_file
+
+ CONTAINS
+
+ SUBROUTINE netcdf_define_header( callmode, extend, av )
+ 
+#if defined( __netcdf )
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu, zw
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_define_netcdf_grid
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_define_netcdf_grid 
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE control_parameters,                                                    &
+        ONLY:  agent_time_unlimited, air_chemistry, averaging_interval,        &
+               averaging_interval_pr, data_output_pr, domask, dopr_n,          &
+               dopr_time_count, dopts_time_count, dots_time_count,             &
+               do2d, do2d_at_begin, do2d_xz_time_count, do3d, do3d_at_begin,   &
+               do2d_yz_time_count, dt_data_output_av, dt_do2d_xy, dt_do2d_xz,  &
+               dt_do2d_yz, dt_do3d, dt_write_agent_data, mask_size,            &
+               do2d_xy_time_count,                                             &
+               do3d_time_count, domask_time_count, end_time, land_surface,     &
+               mask_size_l, mask_i, mask_i_global, mask_j, mask_j_global,      &
+               mask_k_global, mask_surface,                                    &
+               message_string, mid, ntdim_2d_xy, ntdim_2d_xz,                  &
+               ntdim_2d_yz, ntdim_3d, nz_do3d, ocean_mode, plant_canopy,       &
+               run_description_header, section, simulated_time,                &
+               simulated_time_at_begin, skip_time_data_output_av,              &
+               skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz,        &
+               skip_time_do3d, topography, num_leg, num_var_fl,                &
+               urban_surface, uv_exposure
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy, zu_s_inner, zw_w_inner
+
+    USE gust_mod,                                                              &
+        ONLY: gust_define_netcdf_grid, gust_module_enabled
+
+    USE indices,                                                               &
+        ONLY:  nx, nxl, nxr, ny, nys, nyn, nz ,nzb, nzt
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_define_netcdf_grid, nzb_soil, nzt_soil, nzs, zs
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  init_model
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_define_netcdf_grid
+
+    USE pegrid
+
+    USE particle_attributes,                                                   &
+        ONLY:  number_of_particle_groups
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pcm_define_netcdf_grid
+
+    USE profil_parameter,                                                      &
+        ONLY:  crmax, cross_profiles, dopr_index, profile_columns, profile_rows
+
+    USE radiation_model_mod,                                                   &
+        ONLY: radiation, radiation_define_netcdf_grid      
+     
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_define_netcdf_grid             
+
+    USE spectra_mod,                                                           &
+        ONLY:  averaging_interval_sp, comp_spectra_level, data_output_sp, dosp_time_count, spectra_direction
+
+    USE statistics,                                                            &
+        ONLY:  hom, statistic_regions
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_define_netcdf_grid
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_define_netcdf_grid
+
+    USE uv_exposure_model_mod,                                                 &
+        ONLY:  uvem_define_netcdf_grid
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=3)              ::  suffix                !<
+    CHARACTER (LEN=2), INTENT (IN) ::  callmode              !<
+    CHARACTER (LEN=4)              ::  grid_x                !<
+    CHARACTER (LEN=4)              ::  grid_y                !<
+    CHARACTER (LEN=4)              ::  grid_z                !<
+    CHARACTER (LEN=6)              ::  mode                  !<
+    CHARACTER (LEN=10)             ::  precision             !<
+    CHARACTER (LEN=10)             ::  var                   !<
+    CHARACTER (LEN=20)             ::  netcdf_var_name       !<
+    CHARACTER (LEN=varnamelength)  ::  trimvar               !< TRIM of output-variable string
+    CHARACTER (LEN=80)             ::  time_average_text     !<
+    CHARACTER (LEN=4000)           ::  char_cross_profiles   !<
+    CHARACTER (LEN=4000)           ::  var_list              !<
+    CHARACTER (LEN=4000)           ::  var_list_old          !<
+
+    CHARACTER (LEN=100), DIMENSION(1:crmax) ::  cross_profiles_adj   !<
+    CHARACTER (LEN=100), DIMENSION(1:crmax) ::  cross_profiles_char  !<
+
+    INTEGER(iwp) ::  av                                      !<
+    INTEGER(iwp) ::  cross_profiles_count                    !<
+    INTEGER(iwp) ::  cross_profiles_maxi                     !<
+    INTEGER(iwp) ::  delim                                   !<
+    INTEGER(iwp) ::  delim_old                               !<
+    INTEGER(iwp) ::  file_id                                 !<
+    INTEGER(iwp) ::  i                                       !<
+    INTEGER(iwp) ::  id_last                                 !<
+    INTEGER(iwp) ::  id_x                                    !<
+    INTEGER(iwp) ::  id_y                                    !<
+    INTEGER(iwp) ::  id_z                                    !<
+    INTEGER(iwp) ::  j                                       !<
+    INTEGER(iwp) ::  k                                       !<
+    INTEGER(iwp) ::  kk                                      !<
+    INTEGER(iwp) ::  ns                                      !<
+    INTEGER(iwp) ::  ns_do                                   !< actual value of ns for soil model data
+    INTEGER(iwp) ::  ns_old                                  !<
+    INTEGER(iwp) ::  ntime_count                             !< number of time levels found in file
+    INTEGER(iwp) ::  nz_old                                  !<
+    INTEGER(iwp) ::  l                                       !<
+
+    INTEGER(iwp), SAVE ::  oldmode                           !<
+
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_time_old           !<
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_x_yz_old           !<
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_y_xz_old           !<
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_zu_sp_old          !<
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_zu_xy_old          !<
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_zu_3d_old          !<
+    INTEGER(iwp), DIMENSION(1) ::  id_dim_zu_mask_old        !<
+
+
+    INTEGER(iwp), DIMENSION(1:crmax) ::  cross_profiles_numb !<
+
+    LOGICAL ::  found                                        !<
+
+    LOGICAL, INTENT (INOUT) ::  extend                       !<
+
+    LOGICAL, SAVE ::  init_netcdf = .FALSE.                  !<
+
+    REAL(wp) ::  cos_ra                                      !< cosine of rotation_angle
+    REAL(wp) ::  eutm                                        !< easting (UTM)
+    REAL(wp) ::  nutm                                        !< northing (UTM)
+    REAL(wp) ::  shift_x                                     !< shift of x coordinate
+    REAL(wp) ::  shift_y                                     !< shift of y coordinate
+    REAL(wp) ::  sin_ra                                      !< sine of rotation_angle
+
+    REAL(wp), DIMENSION(1) ::  last_time_coordinate          !< last time value in file
+    REAL(wp), DIMENSION(8) ::  crs_list                      !< list of coord_ref_sys values
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE   ::  netcdf_data    !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  netcdf_data_2d !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lat            !< latitude
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lon            !< longitude
+
+
+!
+!-- Initializing actions
+    IF ( .NOT. init_netcdf )  THEN
+!
+!--    Check and set accuracy for netCDF output. First set default value
+       nc_precision = NF90_REAL4
+
+       i = 1
+       DO  WHILE ( netcdf_precision(i) /= ' ' )
+          j = INDEX( netcdf_precision(i), '_' )
+          IF ( j == 0 )  THEN
+             WRITE ( message_string, * ) 'netcdf_precision must contain a ', &
+                                         '"_"netcdf_precision(', i, ')="',   &
+                                         TRIM( netcdf_precision(i) ),'"'
+             CALL message( 'netcdf_define_header', 'PA0241', 2, 2, 0, 6, 0 )
+          ENDIF
+
+          var       = netcdf_precision(i)(1:j-1)
+          precision = netcdf_precision(i)(j+1:)
+
+          IF ( precision == 'NF90_REAL4' )  THEN
+             j = NF90_REAL4
+          ELSEIF ( precision == 'NF90_REAL8' )  THEN
+             j = NF90_REAL8
+          ELSE
+             WRITE ( message_string, * ) 'illegal netcdf precision: ',  &
+                                         'netcdf_precision(', i, ')="', &
+                                         TRIM( netcdf_precision(i) ),'"'
+             CALL message( 'netcdf_define_header', 'PA0242', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          SELECT CASE ( var )
+             CASE ( 'xy' )
+                nc_precision(1) = j
+             CASE ( 'xz' )
+                nc_precision(2) = j
+             CASE ( 'yz' )
+                nc_precision(3) = j
+             CASE ( '2d' )
+                nc_precision(1:3) = j
+             CASE ( '3d' )
+                nc_precision(4) = j
+             CASE ( 'pr' )
+                nc_precision(5) = j
+             CASE ( 'ts' )
+                nc_precision(6) = j
+             CASE ( 'sp' )
+                nc_precision(7) = j
+             CASE ( 'prt' )
+                nc_precision(8) = j
+             CASE ( 'masks' )
+                nc_precision(11) = j
+             CASE ( 'fl' )
+                nc_precision(9) = j
+             CASE ( 'all' )
+                nc_precision    = j
+
+             CASE DEFAULT
+                WRITE ( message_string, * ) 'unknown variable in ' //          &
+                                  'initialization_parameters ',                & 
+                                  'assignment: netcdf_precision(', i, ')="',   &
+                                            TRIM( netcdf_precision(i) ),'"'
+                CALL message( 'netcdf_define_header', 'PA0243', 1, 2, 0, 6, 0 )
+
+          END SELECT
+
+          i = i + 1
+          IF ( i > 50 )  EXIT
+       ENDDO
+
+!
+!--    Check for allowed parameter range
+       IF ( netcdf_deflate < 0  .OR.  netcdf_deflate > 9 )  THEN
+          WRITE ( message_string, '(A,I3,A)' ) 'netcdf_deflate out of ' //     &
+                                      'range & given value: ', netcdf_deflate, &
+                                      ', allowed range: 0-9'
+          CALL message( 'netcdf_define_header', 'PA0355', 2, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Data compression does not work with parallel NetCDF/HDF5
+       IF ( netcdf_deflate > 0  .AND.  netcdf_data_format /= 3 )  THEN
+          message_string = 'netcdf_deflate reset to 0'
+          CALL message( 'netcdf_define_header', 'PA0356', 0, 1, 0, 6, 0 )
+
+          netcdf_deflate = 0
+       ENDIF
+
+       init_netcdf = .TRUE.
+
+    ENDIF
+
+!
+!-- Convert coord_ref_sys into vector (used for lat/lon calculation)
+    crs_list = (/ coord_ref_sys%semi_major_axis,                  &
+                  coord_ref_sys%inverse_flattening,               &
+                  coord_ref_sys%longitude_of_prime_meridian,      &
+                  coord_ref_sys%longitude_of_central_meridian,    &
+                  coord_ref_sys%scale_factor_at_central_meridian, &
+                  coord_ref_sys%latitude_of_projection_origin,    &
+                  coord_ref_sys%false_easting,                    &
+                  coord_ref_sys%false_northing /)
+
+!
+!-- Determine the mode to be processed
+    IF ( extend )  THEN
+       mode = callmode // '_ext'
+    ELSE
+       mode = callmode // '_new'
+    ENDIF
+
+!
+!-- Select the mode to be processed. Possibilities are 3d, ma (mask), xy, xz, 
+!-- yz, pr (profiles), ps (particle timeseries), fl (flight data), ts 
+!-- (timeseries) or sp (spectra)
+    SELECT CASE ( mode )
+
+       CASE ( 'ma_new' )
+
+!
+!--       decompose actual parameter file_id (=formal parameter av) into 
+!--       mid and av
+          file_id = av
+          IF ( file_id <= 200+max_masks )  THEN
+             mid = file_id - 200
+             av = 0
+          ELSE
+             mid = file_id - (200+max_masks)
+             av = 1
+          ENDIF
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, &
+                                  'Conventions', 'COARDS' )
+          CALL netcdf_handle_error( 'netcdf_define_header', 464 )
+
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'title', &
+                                  TRIM( run_description_header ) //    &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 465 )
+          IF ( av == 1 )  THEN
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
+             nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, &
+                                     'time_avg', TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 466 )
+          ENDIF
+
+!
+!--       Define time coordinate for volume data (unlimited dimension)
+          CALL netcdf_create_dim( id_set_mask(mid,av), 'time', NF90_UNLIMITED, &
+                                  id_dim_time_mask(mid,av), 467 )
+          CALL netcdf_create_var( id_set_mask(mid,av),                         &
+                                  (/ id_dim_time_mask(mid,av) /), 'time',      &
+                                  NF90_DOUBLE, id_var_time_mask(mid,av),       &
+                                 'seconds', '', 468, 469, 000 )
+!
+!--       Define spatial dimensions and coordinates:
+          IF ( mask_surface(mid) )  THEN
+!
+!--          In case of terrain-following output, the vertical dimensions are
+!--          indices, not meters
+             CALL netcdf_create_dim( id_set_mask(mid,av), 'ku_above_surf',     &
+                                     mask_size(mid,3), id_dim_zu_mask(mid,av), &
+                                     470 )
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_zu_mask(mid,av) /),             &
+                                     'ku_above_surf',                          &
+                                     NF90_DOUBLE, id_var_zu_mask(mid,av),      &
+                                     '1', 'grid point above terrain',          &
+                                     471, 472, 000 )
+             CALL netcdf_create_dim( id_set_mask(mid,av), 'kw_above_surf',     &
+                                     mask_size(mid,3), id_dim_zw_mask(mid,av), &
+                                     473 )
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_zw_mask(mid,av) /),             &
+                                     'kw_above_surf',                          &
+                                     NF90_DOUBLE, id_var_zw_mask(mid,av),      &
+                                    '1', 'grid point above terrain',           &
+                                    474, 475, 000 )
+          ELSE
+!
+!--          Define vertical coordinate grid (zu grid)
+             CALL netcdf_create_dim( id_set_mask(mid,av), 'zu_3d',             &
+                                     mask_size(mid,3), id_dim_zu_mask(mid,av), &
+                                     470 )
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_zu_mask(mid,av) /), 'zu_3d',    &
+                                     NF90_DOUBLE, id_var_zu_mask(mid,av),      &
+                                     'meters', '', 471, 472, 000 )
+!
+!--          Define vertical coordinate grid (zw grid)
+             CALL netcdf_create_dim( id_set_mask(mid,av), 'zw_3d',             &
+                                     mask_size(mid,3), id_dim_zw_mask(mid,av), &
+                                     473 )
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_zw_mask(mid,av) /), 'zw_3d',    &
+                                     NF90_DOUBLE, id_var_zw_mask(mid,av),      &
+                                    'meters', '', 474, 475, 000 )
+          ENDIF
+!
+!--       Define x-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_mask(mid,av), 'x', mask_size(mid,1),  &
+                                  id_dim_x_mask(mid,av), 476 )
+          CALL netcdf_create_var( id_set_mask(mid,av),                         &
+                                  (/ id_dim_x_mask(mid,av) /), 'x',            &
+                                  NF90_DOUBLE, id_var_x_mask(mid,av),          &
+                                  'meters', '', 477, 478, 000 )
+!
+!--       Define x-axis (for u position)
+          CALL netcdf_create_dim( id_set_mask(mid,av), 'xu', mask_size(mid,1), &
+                                  id_dim_xu_mask(mid,av), 479 )
+          CALL netcdf_create_var( id_set_mask(mid,av),                         &
+                                  (/ id_dim_xu_mask(mid,av) /), 'xu',          &
+                                  NF90_DOUBLE, id_var_xu_mask(mid,av),         &
+                                  'meters', '', 480, 481, 000 )
+!
+!--       Define y-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_mask(mid,av), 'y', mask_size(mid,2),  &
+                                  id_dim_y_mask(mid,av), 482 )
+          CALL netcdf_create_var( id_set_mask(mid,av),                         &
+                                  (/ id_dim_y_mask(mid,av) /), 'y',            &
+                                  NF90_DOUBLE, id_var_y_mask(mid,av),          &
+                                  'meters', '', 483, 484, 000 )
+!
+!--       Define y-axis (for v position)
+          CALL netcdf_create_dim( id_set_mask(mid,av), 'yv', mask_size(mid,2), &
+                                  id_dim_yv_mask(mid,av), 485 )
+          CALL netcdf_create_var( id_set_mask(mid,av),                         &
+                                  (/ id_dim_yv_mask(mid,av) /),                &
+                                  'yv', NF90_DOUBLE, id_var_yv_mask(mid,av),   &
+                                  'meters', '', 486, 487, 000 )
+!
+!--       Define UTM coordinates
+          IF ( init_model%rotation_angle == 0.0_wp )  THEN
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_x_mask(mid,av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_y_mask(mid,av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_xu_mask(mid,av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_y_mask(mid,av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_x_mask(mid,av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_yv_mask(mid,av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ELSE
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_x_mask(mid,av), id_dim_y_mask(mid,av) /), &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,0),   &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_x_mask(mid,av), id_dim_y_mask(mid,av) /), &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,0),   &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_xu_mask(mid,av), id_dim_y_mask(mid,av) /),&
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,1),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_xu_mask(mid,av), id_dim_y_mask(mid,av) /),&
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,1),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_x_mask(mid,av), id_dim_yv_mask(mid,av) /),&
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,2),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_mask(mid,av), &
+                                 (/ id_dim_x_mask(mid,av), id_dim_yv_mask(mid,av) /),&
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,2),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ENDIF
+!
+!--       Define geographic coordinates
+          CALL netcdf_create_var( id_set_mask(mid,av), &
+                              (/ id_dim_x_mask(mid,av), id_dim_y_mask(mid,av) /), &
+                              'lon', NF90_DOUBLE, id_var_lon_mask(mid,av,0),      &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_mask(mid,av), &
+                              (/ id_dim_x_mask(mid,av), id_dim_y_mask(mid,av) /), &
+                              'lat', NF90_DOUBLE, id_var_lat_mask(mid,av,0),      &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_mask(mid,av), &
+                              (/ id_dim_xu_mask(mid,av), id_dim_y_mask(mid,av) /),&
+                              'lonu', NF90_DOUBLE, id_var_lon_mask(mid,av,1),     &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_mask(mid,av), &
+                              (/ id_dim_xu_mask(mid,av), id_dim_y_mask(mid,av) /),&
+                              'latu', NF90_DOUBLE, id_var_lat_mask(mid,av,1),     &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_mask(mid,av), &
+                              (/ id_dim_x_mask(mid,av), id_dim_yv_mask(mid,av) /),&
+                              'lonv', NF90_DOUBLE, id_var_lon_mask(mid,av,2),     &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_mask(mid,av), &
+                              (/ id_dim_x_mask(mid,av), id_dim_yv_mask(mid,av) /),&
+                              'latv', NF90_DOUBLE, id_var_lat_mask(mid,av,2),     &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+!
+!--       Define coordinate-reference system
+          CALL netcdf_create_crs( id_set_mask(mid,av), 000 )
+!
+!--       In case of non-flat topography define 2d-arrays containing the height
+!--       information. Only for parallel netcdf output.
+          IF ( TRIM( topography ) /= 'flat'  .AND.                             &
+               netcdf_data_format > 4 )  THEN
+!
+!--          Define zusi = zu(nzb_s_inner)
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_x_mask(mid,av),                 &
+                                        id_dim_y_mask(mid,av) /), 'zusi',      &
+                                     NF90_DOUBLE, id_var_zusi_mask(mid,av),    &
+                                     'meters', 'zu(nzb_s_inner)', 488, 489,    &
+                                     490 )
+!             
+!--          Define zwwi = zw(nzb_w_inner)
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_x_mask(mid,av),                 &
+                                        id_dim_y_mask(mid,av) /), 'zwwi',      &
+                                     NF90_DOUBLE, id_var_zwwi_mask(mid,av),    &
+                                     'meters', 'zw(nzb_w_inner)', 491, 492,    &
+                                     493 )
+          ENDIF             
+ 
+          IF ( land_surface )  THEN
+!
+!--          Define vertical coordinate grid (zw grid)
+             CALL netcdf_create_dim( id_set_mask(mid,av), 'zs_3d',             &
+                                     mask_size(mid,3), id_dim_zs_mask(mid,av), &
+                                     536 )
+             CALL netcdf_create_var( id_set_mask(mid,av),                      &
+                                     (/ id_dim_zs_mask(mid,av) /), 'zs_3d',    &
+                                     NF90_DOUBLE, id_var_zs_mask(mid,av),      &
+                                     'meters', '', 537, 555, 000 )
+          ENDIF
+
+!
+!--       Define the variables
+          var_list = ';'
+          i = 1
+
+          DO WHILE ( domask(mid,av,i)(1:1) /= ' ' )
+!
+!--          Temporary solution to account for data output within the new urban 
+!--          surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar )
+             trimvar = TRIM( domask(mid,av,i) )
+             IF ( urban_surface  .AND.  trimvar(1:4) == 'usm_' )  THEN
+                trimvar = 'usm_output'
+             ENDIF
+!
+!--          Check for the grid
+             found = .FALSE.
+             SELECT CASE ( trimvar )
+!
+!--             Most variables are defined on the scalar grid
+                CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr',                &
+                       'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',   &
+                       's', 'theta', 'thetal', 'thetav' )
+
+                   grid_x = 'x'
+                   grid_y = 'y'
+                   grid_z = 'zu'
+!
+!--             u grid
+                CASE ( 'u' )
+
+                   grid_x = 'xu'
+                   grid_y = 'y'
+                   grid_z = 'zu'
+!
+!--             v grid
+                CASE ( 'v' )
+
+                   grid_x = 'x'
+                   grid_y = 'yv'
+                   grid_z = 'zu'
+!
+!--             w grid
+                CASE ( 'w' )
+
+                   grid_x = 'x'
+                   grid_y = 'y'
+                   grid_z = 'zw'
+
+!             
+!--             Block of urban surface model outputs
+                CASE ( 'usm_output' )
+
+                   CALL usm_define_netcdf_grid( domask( mid,av,i), found,      &
+                                                        grid_x, grid_y, grid_z )
+
+                CASE DEFAULT
+!
+!--                Check for quantities defined in other modules                                                        
+                   CALL tcm_define_netcdf_grid( domask( mid,av,i), found,      &
+                                                        grid_x, grid_y, grid_z )
+
+                   IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                      CALL chem_define_netcdf_grid( domask(mid,av,i), found,   &
+                                                    grid_x, grid_y, grid_z )
+                   ENDIF
+
+                   IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                      CALL gust_define_netcdf_grid( domask(mid,av,i), found,   &
+                                                    grid_x, grid_y, grid_z )
+                   ENDIF
+
+                   IF ( land_surface )  THEN
+                      CALL lsm_define_netcdf_grid( domask(mid,av,i), found,    &
+                                                   grid_x, grid_y, grid_z )
+                   ENDIF
+
+                   IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                      CALL ocean_define_netcdf_grid( domask(mid,av,i), found,  &
+                                                     grid_x, grid_y, grid_z )
+                   ENDIF
+
+                   IF ( .NOT. found  .AND.  plant_canopy )  THEN
+                      CALL pcm_define_netcdf_grid( domask(mid,av,i), found,    &
+                                                   grid_x, grid_y, grid_z )
+                   ENDIF
+
+                   IF ( .NOT. found  .AND.  radiation )  THEN
+                      CALL radiation_define_netcdf_grid( domask(mid,av,i),     &
+                                                         found, grid_x, grid_y,&
+                                                         grid_z )
+                   ENDIF
+!
+!--                Check for SALSA quantities
+                   IF ( .NOT. found  .AND.  salsa )  THEN
+                      CALL salsa_define_netcdf_grid( domask(mid,av,i), found,  &
+                                                     grid_x, grid_y, grid_z )
+                   ENDIF                  
+!
+!--                Now check for user-defined quantities
+                   IF ( .NOT. found )  THEN
+                      CALL user_define_netcdf_grid( domask(mid,av,i), found,   &
+                                                    grid_x, grid_y, grid_z )
+                   ENDIF
+                                                 
+                   IF ( .NOT. found )  THEN
+                      WRITE ( message_string, * ) 'no grid defined for',       &
+                           ' variable ', TRIM( domask(mid,av,i) )
+                      CALL message( 'define_netcdf_header', 'PA0244', 0, 1, 0, &
+                                    6, 0 )
+                   ENDIF
+
+             END SELECT
+
+!
+!--          Select the respective dimension ids
+             IF ( grid_x == 'x' )  THEN
+                id_x = id_dim_x_mask(mid,av)
+             ELSEIF ( grid_x == 'xu' )  THEN
+                id_x = id_dim_xu_mask(mid,av)
+             ENDIF
+
+             IF ( grid_y == 'y' )  THEN
+                id_y = id_dim_y_mask(mid,av)
+             ELSEIF ( grid_y == 'yv' )  THEN
+                id_y = id_dim_yv_mask(mid,av)
+             ENDIF
+
+             IF ( grid_z == 'zu' )  THEN
+                id_z = id_dim_zu_mask(mid,av)
+             ELSEIF ( grid_z == 'zw' )  THEN
+                id_z = id_dim_zw_mask(mid,av)
+             ELSEIF ( grid_z == "zs" )  THEN
+                id_z = id_dim_zs_mask(mid,av)
+             ENDIF
+
+!
+!--          Define the grid
+             CALL netcdf_create_var( id_set_mask(mid,av), (/ id_x, id_y, id_z, &
+                                     id_dim_time_mask(mid,av) /),              &
+                                     domask(mid,av,i), nc_precision(11),       &
+                                     id_var_domask(mid,av,i),                  &
+                                     TRIM( domask_unit(mid,av,i) ),            &
+                                     domask(mid,av,i), 494, 495, 496, .TRUE. )
+
+             var_list = TRIM( var_list ) // TRIM( domask(mid,av,i) ) // ';'
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       No arrays to output
+          IF ( i == 1 )  RETURN
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs and by combine_plot_fields)
+          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, &
+                                  'VAR_LIST', var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 497 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_mask(mid,av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 498 )
+
+!
+!--       Write data for x (shifted by +dx/2) and xu axis
+          ALLOCATE( netcdf_data(mask_size(mid,1)) )
+
+          netcdf_data = ( mask_i_global(mid,:mask_size(mid,1)) + 0.5_wp ) * dx
+
+          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_x_mask(mid,av), &
+                                  netcdf_data, start = (/ 1 /),               &
+                                  count = (/ mask_size(mid,1) /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 499 )
+
+          netcdf_data = mask_i_global(mid,:mask_size(mid,1)) * dx
+
+          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_xu_mask(mid,av),&
+                                  netcdf_data, start = (/ 1 /),               &
+                                  count = (/ mask_size(mid,1) /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 500 )
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Write data for y (shifted by +dy/2) and yv axis
+          ALLOCATE( netcdf_data(mask_size(mid,2)) )
+
+          netcdf_data = ( mask_j_global(mid,:mask_size(mid,2)) + 0.5_wp ) * dy
+
+          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_y_mask(mid,av), &
+                                  netcdf_data, start = (/ 1 /),               &
+                                  count = (/ mask_size(mid,2) /))
+          CALL netcdf_handle_error( 'netcdf_define_header', 501 )
+
+          netcdf_data = mask_j_global(mid,:mask_size(mid,2)) * dy
+
+          nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_yv_mask(mid,av), &
+                                  netcdf_data, start = (/ 1 /),    &
+                                  count = (/ mask_size(mid,2) /))
+          CALL netcdf_handle_error( 'netcdf_define_header', 502 )
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Write UTM coordinates
+          IF ( init_model%rotation_angle == 0.0_wp )  THEN
+!
+!--          1D in case of no rotation
+             cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+!
+!--          x coordinates
+             ALLOCATE( netcdf_data(mask_size(mid,1)) )
+             DO  k = 0, 2
+!            
+!--             Scalar grid points
+                IF ( k == 0 )  THEN
+                   shift_x = 0.5
+!            
+!--             u grid points
+                ELSEIF ( k == 1 )  THEN
+                   shift_x = 0.0
+!            
+!--             v grid points
+                ELSEIF ( k == 2 )  THEN
+                   shift_x = 0.5
+                ENDIF
+
+                netcdf_data = init_model%origin_x + cos_ra                     &
+                       * ( mask_i_global(mid,:mask_size(mid,1)) + shift_x ) * dx
+
+                nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), &
+                                        id_var_eutm_mask(mid,av,k), &
+                                        netcdf_data, start = (/ 1 /), &
+                                        count = (/ mask_size(mid,1) /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+
+             ENDDO
+             DEALLOCATE( netcdf_data )
+!
+!--          y coordinates
+             ALLOCATE( netcdf_data(mask_size(mid,2)) )
+             DO  k = 0, 2
+!
+!--             Scalar grid points
+                IF ( k == 0 )  THEN
+                   shift_y = 0.5
+!
+!--             u grid points
+                ELSEIF ( k == 1 )  THEN
+                   shift_y = 0.5
+!
+!--             v grid points
+                ELSEIF ( k == 2 )  THEN
+                   shift_y = 0.0
+                ENDIF
+
+                netcdf_data = init_model%origin_y + cos_ra                     &
+                       * ( mask_j_global(mid,:mask_size(mid,2)) + shift_y ) * dy
+
+                nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), &
+                                        id_var_nutm_mask(mid,av,k), &
+                                        netcdf_data, start = (/ 1 /), &
+                                        count = (/ mask_size(mid,2) /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+             ENDDO
+             DEALLOCATE( netcdf_data )
+
+          ELSE
+!
+!--          2D in case of rotation
+             ALLOCATE( netcdf_data_2d(mask_size(mid,1),mask_size(mid,2)) )
+             cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+             sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+             DO  k = 0, 2
+!            
+!--            Scalar grid points
+               IF ( k == 0 )  THEN
+                  shift_x = 0.5 ; shift_y = 0.5
+!            
+!--            u grid points
+               ELSEIF ( k == 1 )  THEN
+                  shift_x = 0.0 ; shift_y = 0.5
+!            
+!--            v grid points
+               ELSEIF ( k == 2 )  THEN
+                  shift_x = 0.5 ; shift_y = 0.0
+               ENDIF
+
+               DO  j = 1, mask_size(mid,2)
+                  DO  i = 1, mask_size(mid,1)
+                     netcdf_data_2d(i,j) = init_model%origin_x                 &
+                           + cos_ra * ( mask_i_global(mid,i) + shift_x ) * dx  &
+                           + sin_ra * ( mask_j_global(mid,j) + shift_y ) * dy
+                  ENDDO
+               ENDDO
+
+               nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), &
+                                       id_var_eutm_mask(mid,av,k), &
+                                       netcdf_data_2d, start = (/ 1, 1 /), &
+                                       count = (/ mask_size(mid,1), &
+                                                  mask_size(mid,2) /) )
+               CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+
+               DO  j = 1, mask_size(mid,2)
+                  DO  i = 1, mask_size(mid,1)
+                     netcdf_data_2d(i,j) = init_model%origin_y                 &
+                           - sin_ra * ( mask_i_global(mid,i) + shift_x ) * dx  &
+                           + cos_ra * ( mask_j_global(mid,j) + shift_y ) * dy
+                  ENDDO
+               ENDDO
+             
+               nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), &
+                                       id_var_nutm_mask(mid,av,k), &
+                                       netcdf_data_2d, start = (/ 1, 1 /), &
+                                       count = (/ mask_size(mid,1), &
+                                                  mask_size(mid,2) /) )
+               CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+             
+             ENDDO
+             DEALLOCATE( netcdf_data_2d )
+          ENDIF
+!
+!--       Write lon and lat data.
+          ALLOCATE( lat(mask_size(mid,1),mask_size(mid,2)) )
+          ALLOCATE( lon(mask_size(mid,1),mask_size(mid,2)) )
+          cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+          sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+          DO  k = 0, 2
+!               
+!--          Scalar grid points
+             IF ( k == 0 )  THEN
+                shift_x = 0.5 ; shift_y = 0.5
+!               
+!--          u grid points
+             ELSEIF ( k == 1 )  THEN
+                shift_x = 0.0 ; shift_y = 0.5
+!               
+!--          v grid points
+             ELSEIF ( k == 2 )  THEN
+                shift_x = 0.5 ; shift_y = 0.0
+             ENDIF
+
+             DO  j = 1, mask_size(mid,2)
+                DO  i = 1, mask_size(mid,1)
+                   eutm = init_model%origin_x                               &
+                        + cos_ra * ( mask_i_global(mid,i) + shift_x ) * dx  &
+                        + sin_ra * ( mask_j_global(mid,j) + shift_y ) * dy
+                   nutm = init_model%origin_y                               &
+                        - sin_ra * ( mask_i_global(mid,i) + shift_x ) * dx  &
+                        + cos_ra * ( mask_j_global(mid,j) + shift_y ) * dy
+
+                   CALL  convert_utm_to_geographic( crs_list,          &
+                                                    eutm, nutm,        &
+                                                    lon(i,j), lat(i,j) )
+                ENDDO
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),           &
+                                     id_var_lon_mask(mid,av,k),     &
+                                     lon, start = (/ 1, 1 /),       &
+                                     count = (/ mask_size(mid,1),   &
+                                                mask_size(mid,2) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),           &
+                                     id_var_lat_mask(mid,av,k),     &
+                                     lat, start = (/ 1, 1 /),       &
+                                     count = (/ mask_size(mid,1),   &
+                                                mask_size(mid,2) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+          ENDDO
+
+          DEALLOCATE( lat )
+          DEALLOCATE( lon )
+!
+!--       Write zu and zw data (vertical axes)
+          ALLOCATE( netcdf_data(mask_size(mid,3)) )
+
+          IF ( mask_surface(mid) )  THEN
+
+             netcdf_data = mask_k_global(mid,:mask_size(mid,3))
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zu_mask(mid,av), &
+                                     netcdf_data, start = (/ 1 /), &
+                                     count = (/ mask_size(mid,3) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 503 )
+
+             netcdf_data = mask_k_global(mid,:mask_size(mid,3))
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zw_mask(mid,av), &
+                                     netcdf_data, start = (/ 1 /), &
+                                     count = (/ mask_size(mid,3) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 504 )
+
+          ELSE
+
+             netcdf_data = zu( mask_k_global(mid,:mask_size(mid,3)) )
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zu_mask(mid,av), &
+                                     netcdf_data, start = (/ 1 /), &
+                                     count = (/ mask_size(mid,3) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 503 )
+
+             netcdf_data = zw( mask_k_global(mid,:mask_size(mid,3)) )
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zw_mask(mid,av), &
+                                     netcdf_data, start = (/ 1 /), &
+                                     count = (/ mask_size(mid,3) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 504 )
+
+          ENDIF
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       In case of non-flat topography write height information
+          IF ( TRIM( topography ) /= 'flat'  .AND.                             &
+               netcdf_data_format > 4 )  THEN
+
+             ALLOCATE( netcdf_data_2d(mask_size_l(mid,1),mask_size_l(mid,2)) )
+             netcdf_data_2d = zu_s_inner( mask_i(mid,:mask_size_l(mid,1)),     &
+                                          mask_j(mid,:mask_size_l(mid,2)) )
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),                      &
+                                     id_var_zusi_mask(mid,av),                 &
+                                     netcdf_data_2d,                           &
+                                     start = (/ 1, 1 /),                       &
+                                     count = (/ mask_size_l(mid,1),            &
+                                                mask_size_l(mid,2) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 505 )
+
+             netcdf_data_2d = zw_w_inner( mask_i(mid,:mask_size_l(mid,1)),     &
+                                          mask_j(mid,:mask_size_l(mid,2)) )
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av),                      &
+                                     id_var_zwwi_mask(mid,av),                 &
+                                     netcdf_data_2d,                           &
+                                     start = (/ 1, 1 /),                       &
+                                     count = (/ mask_size_l(mid,1),            &
+                                                mask_size_l(mid,2) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 506 )
+
+             DEALLOCATE( netcdf_data_2d )
+
+          ENDIF
+
+          IF ( land_surface )  THEN
+!
+!--          Write zs data (vertical axes for soil model), use negative values
+!--          to indicate soil depth
+             ALLOCATE( netcdf_data(mask_size(mid,3)) )
+
+             netcdf_data = zs( mask_k_global(mid,:mask_size(mid,3)) )
+
+             nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), id_var_zs_mask(mid,av), &
+                                     netcdf_data, start = (/ 1 /), &
+                                     count = (/ mask_size(mid,3) /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 538 )
+
+             DEALLOCATE( netcdf_data )
+
+          ENDIF
+
+!
+!--       restore original parameter file_id (=formal parameter av) into av
+          av = file_id
+
+
+       CASE ( 'ma_ext' )
+
+!
+!--       decompose actual parameter file_id (=formal parameter av) into 
+!--       mid and av
+          file_id = av
+          IF ( file_id <= 200+max_masks )  THEN
+             mid = file_id - 200
+             av = 0
+          ELSE
+             mid = file_id - (200+max_masks)
+             av = 1
+          ENDIF
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'VAR_LIST',&
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 507 )
+
+          var_list = ';'
+          i = 1
+          DO WHILE ( domask(mid,av,i)(1:1) /= ' ' )
+             var_list = TRIM(var_list) // TRIM( domask(mid,av,i) ) // ';'
+             i = i + 1
+          ENDDO
+
+          IF ( av == 0 )  THEN
+             var = '(mask)'
+          ELSE
+             var = '(mask_av)'
+          ENDIF
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),       &
+                  ' data for mask', mid, ' from previous run found,',           &
+                  '&but this file cannot be extended due to variable ',         &
+                  'mismatch.&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0335', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get and compare the number of vertical gridpoints
+          nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), 'zu_3d', &
+                                    id_var_zu_mask(mid,av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 508 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_mask(mid,av),     &
+                                           id_var_zu_mask(mid,av),  &
+                                           dimids = id_dim_zu_mask_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 509 )
+          id_dim_zu_mask(mid,av) = id_dim_zu_mask_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av),               &
+                                            id_dim_zu_mask(mid,av),            &
+                                            len = nz_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 510 )
+
+          IF ( mask_size(mid,3) /= nz_old )  THEN
+             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),      &
+                  '&data for mask', mid, ' from previous run found,',          &
+                  ' but this file cannot be extended due to mismatch in ',     &
+                  ' number of vertical grid points.',                          &
+                  '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0336', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is plmask..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), 'time',               &
+                                    id_var_time_mask(mid,av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 511 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_mask(mid,av),                &
+                                           id_var_time_mask(mid,av),           &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 512 )
+          id_dim_time_mask(mid,av) = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_mask(mid,av),               &
+                                            id_dim_time_mask(mid,av),          &
+                                            len = domask_time_count(mid,av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 513 )
+
+          nc_stat = NF90_GET_VAR( id_set_mask(mid,av),                         &
+                                  id_var_time_mask(mid,av),                    &
+                                  last_time_coordinate,                        &
+                                  start = (/ domask_time_count(mid,av) /),     &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 514 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),      &
+                  ' data for mask', mid, ' from previous run found,',          &
+                  '&but this file cannot be extended because the current ',    &
+                  'output time is less or equal than the last output time ',   &
+                  'on this file.&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0337', 0, 1, 0, 6, 0 )
+             domask_time_count(mid,av) = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO WHILE ( domask(mid,av,i)(1:1) /= ' ' )
+             nc_stat = NF90_INQ_VARID( id_set_mask(mid,av), &
+                                       TRIM( domask(mid,av,i) ), &
+                                       id_var_domask(mid,av,i) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 515 )
+             i = i + 1
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')')         &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_REDEF( id_set_mask(mid,av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 516 )
+          nc_stat = NF90_PUT_ATT( id_set_mask(mid,av), NF90_GLOBAL, 'title',   &
+                                  TRIM( run_description_header ) //            &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 517 )
+          nc_stat = NF90_ENDDEF( id_set_mask(mid,av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 518 )
+          WRITE ( message_string, * ) 'netCDF file for ', TRIM( var ),         &
+               ' data for mask', mid, ' from previous run found.',             &
+               ' &This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0338', 0, 0, 0, 6, 0 )
+!
+!--       restore original parameter file_id (=formal parameter av) into av
+          av = file_id
+
+
+       CASE ( '3d_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'Conventions',   &
+                                  'COARDS' )
+          CALL netcdf_handle_error( 'netcdf_define_header', 62 )
+
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'title', &
+                                  TRIM( run_description_header ) //    &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 63 )
+          IF ( av == 1 )  THEN
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
+             nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'time_avg', &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 63 )
+          ENDIF
+
+!
+!--       Define time coordinate for volume data.
+!--       For parallel output the time dimensions has to be limited, otherwise
+!--       the performance drops significantly.
+          IF ( netcdf_data_format < 5 )  THEN
+             CALL netcdf_create_dim( id_set_3d(av), 'time', NF90_UNLIMITED,    &
+                                     id_dim_time_3d(av), 64 )
+          ELSE
+             CALL netcdf_create_dim( id_set_3d(av), 'time', ntdim_3d(av),      &
+                                     id_dim_time_3d(av), 523 )
+          ENDIF
+
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_time_3d(av) /),     &
+                                  'time', NF90_DOUBLE, id_var_time_3d(av),     &
+                                  'seconds', '', 65, 66, 00 )
+!
+!--       Define spatial dimensions and coordinates:
+!--       Define vertical coordinate grid (zu grid)
+          CALL netcdf_create_dim( id_set_3d(av), 'zu_3d', nz_do3d-nzb+1,       &
+                                  id_dim_zu_3d(av), 67 )
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_zu_3d(av) /),       &
+                                  'zu_3d', NF90_DOUBLE, id_var_zu_3d(av),      &
+                                  'meters', '', 68, 69, 00 )
+!
+!--       Define vertical coordinate grid (zw grid)
+          CALL netcdf_create_dim( id_set_3d(av), 'zw_3d', nz_do3d-nzb+1,       &
+                                  id_dim_zw_3d(av), 70 )
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_zw_3d(av) /),       &
+                                  'zw_3d', NF90_DOUBLE, id_var_zw_3d(av),      &
+                                  'meters', '', 71, 72, 00 )
+!
+!--       Define x-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_3d(av), 'x', nx+1, id_dim_x_3d(av),   &
+                                  73 )
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_x_3d(av) /), 'x',   &
+                                  NF90_DOUBLE, id_var_x_3d(av), 'meters', '',  &
+                                  74, 75, 00 )
+!
+!--       Define x-axis (for u position)
+          CALL netcdf_create_dim( id_set_3d(av), 'xu', nx+1, id_dim_xu_3d(av), &
+                                  358 )
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_xu_3d(av) /), 'xu', &
+                                  NF90_DOUBLE, id_var_xu_3d(av), 'meters', '', &
+                                  359, 360, 000 )
+!
+!--       Define y-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_3d(av), 'y', ny+1, id_dim_y_3d(av),   &
+                                  76 )
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_y_3d(av) /), 'y',   &
+                                  NF90_DOUBLE, id_var_y_3d(av), 'meters', '',  &
+                                  77, 78, 00 )
+!
+!--       Define y-axis (for v position)
+          CALL netcdf_create_dim( id_set_3d(av), 'yv', ny+1, id_dim_yv_3d(av), &
+                                  361 )
+          CALL netcdf_create_var( id_set_3d(av), (/ id_dim_yv_3d(av) /), 'yv', &
+                                  NF90_DOUBLE, id_var_yv_3d(av), 'meters', '', &
+                                  362, 363, 000 )
+!
+!--       Define UTM coordinates
+          IF ( init_model%rotation_angle == 0.0_wp )  THEN
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_x_3d(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_3d(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_y_3d(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_3d(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_xu_3d(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_3d(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_y_3d(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_3d(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_x_3d(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_3d(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_yv_3d(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_3d(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ELSE
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_x_3d(av), id_dim_y_3d(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_3d(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_x_3d(av), id_dim_y_3d(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_3d(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_xu_3d(av), id_dim_y_3d(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_3d(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_xu_3d(av), id_dim_y_3d(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_3d(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_x_3d(av), id_dim_yv_3d(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_3d(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_3d(av), &
+                                 (/ id_dim_x_3d(av), id_dim_yv_3d(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_3d(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ENDIF
+!
+!--       Define geographic coordinates
+          CALL netcdf_create_var( id_set_3d(av), &
+                              (/ id_dim_x_3d(av), id_dim_y_3d(av) /),      &
+                              'lon', NF90_DOUBLE, id_var_lon_3d(av,0),  &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_3d(av), &
+                              (/ id_dim_x_3d(av), id_dim_y_3d(av) /),      &
+                              'lat', NF90_DOUBLE, id_var_lat_3d(av,0),  &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_3d(av), &
+                              (/ id_dim_xu_3d(av), id_dim_y_3d(av) /),     &
+                              'lonu', NF90_DOUBLE, id_var_lon_3d(av,1), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_3d(av), &
+                              (/ id_dim_xu_3d(av), id_dim_y_3d(av) /),     &
+                              'latu', NF90_DOUBLE, id_var_lat_3d(av,1), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_3d(av), &
+                              (/ id_dim_x_3d(av), id_dim_yv_3d(av) /),     &
+                              'lonv', NF90_DOUBLE, id_var_lon_3d(av,2), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_3d(av), &
+                              (/ id_dim_x_3d(av), id_dim_yv_3d(av) /),     &
+                              'latv', NF90_DOUBLE, id_var_lat_3d(av,2), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+!
+!--       Define coordinate-reference system
+          CALL netcdf_create_crs( id_set_3d(av), 000 )
+!
+!--       In case of non-flat topography define 2d-arrays containing the height
+!--       information. Only output 2d topography information in case of parallel
+!--       output.
+          IF ( TRIM( topography ) /= 'flat'  .AND.                             &
+               netcdf_data_format > 4 )  THEN
+!
+!--          Define zusi = zu(nzb_s_inner)
+             CALL netcdf_create_var( id_set_3d(av), (/ id_dim_x_3d(av),        &
+                                     id_dim_y_3d(av) /), 'zusi', NF90_DOUBLE,  &
+                                     id_var_zusi_3d(av), 'meters',             &
+                                     'zu(nzb_s_inner)', 413, 414, 415 )
+!             
+!--          Define zwwi = zw(nzb_w_inner)
+             CALL netcdf_create_var( id_set_3d(av), (/ id_dim_x_3d(av),        &
+                                     id_dim_y_3d(av) /), 'zwwi', NF90_DOUBLE,  &
+                                     id_var_zwwi_3d(av), 'meters',             &
+                                     'zw(nzb_w_inner)', 416, 417, 418 )
+
+          ENDIF             
+
+          IF ( land_surface )  THEN
+!
+!--          Define vertical coordinate grid (zs grid)
+             CALL netcdf_create_dim( id_set_3d(av), 'zs_3d',                   &
+                                     nzt_soil-nzb_soil+1, id_dim_zs_3d(av), 70 )
+             CALL netcdf_create_var( id_set_3d(av), (/ id_dim_zs_3d(av) /),    &
+                                     'zs_3d', NF90_DOUBLE, id_var_zs_3d(av),   &
+                                     'meters', '', 71, 72, 00 )
+
+          ENDIF
+
+!
+!--       Define the variables
+          var_list = ';'
+          i = 1
+
+          DO WHILE ( do3d(av,i)(1:1) /= ' ' )
+!
+!--          Temporary solution to account for data output within the new urban 
+!--          surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar )
+             trimvar = TRIM( do3d(av,i) )
+             IF ( urban_surface  .AND.  trimvar(1:4) == 'usm_' )  THEN
+                trimvar = 'usm_output'
+             ENDIF
+!
+!--          Check for the grid
+             found = .FALSE.
+             SELECT CASE ( trimvar )
+!
+!--             Most variables are defined on the scalar grid
+                CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr',   &
+                       'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',   &
+                       's', 'theta', 'thetal', 'thetav' )
+
+                   grid_x = 'x'
+                   grid_y = 'y'
+                   grid_z = 'zu'
+!
+!--             u grid
+                CASE ( 'u' )
+
+                   grid_x = 'xu'
+                   grid_y = 'y'
+                   grid_z = 'zu'
+!
+!--             v grid
+                CASE ( 'v' )
+
+                   grid_x = 'x'
+                   grid_y = 'yv'
+                   grid_z = 'zu'
+!
+!--             w grid
+                CASE ( 'w' )
+
+                   grid_x = 'x'
+                   grid_y = 'y'
+                   grid_z = 'zw'
+
+!             
+!--             Block of urban surface model outputs   
+                CASE ( 'usm_output' )
+                   CALL usm_define_netcdf_grid( do3d(av,i), found, &
+                                                   grid_x, grid_y, grid_z )
+
+                CASE DEFAULT
+
+                   CALL tcm_define_netcdf_grid( do3d(av,i), found, &
+                                                   grid_x, grid_y, grid_z )
+
+!
+!--                Check for land surface quantities
+                   IF ( .NOT. found .AND. land_surface )  THEN
+                      CALL lsm_define_netcdf_grid( do3d(av,i), found, grid_x,  &
+                                                   grid_y, grid_z )
+                   ENDIF
+!
+!--                Check for ocean quantities
+                   IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                      CALL ocean_define_netcdf_grid( do3d(av,i), found,  &
+                                                     grid_x, grid_y, grid_z )
+                   ENDIF
+
+!
+!--                Check for plant canopy quantities
+                   IF ( .NOT. found  .AND.  plant_canopy )  THEN
+                      CALL pcm_define_netcdf_grid( do3d(av,i), found, grid_x,  &
+                                                   grid_y, grid_z )
+                   ENDIF
+
+!
+!--                Check for radiation quantities
+                   IF ( .NOT. found  .AND.  radiation )  THEN
+                      CALL radiation_define_netcdf_grid( do3d(av,i), found,    &
+                                                         grid_x, grid_y,       &
+                                                         grid_z )
+                   ENDIF
+
+!--                Check for gust module quantities
+                   IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                      CALL gust_define_netcdf_grid( do3d(av,i), found, grid_x, &
+                                                    grid_y, grid_z )
+                   ENDIF
+
+!
+!--                Check for biometeorology quantities
+                   IF ( .NOT. found  .AND.  biometeorology )  THEN
+                      CALL biom_define_netcdf_grid( do3d(av,i), found,         &
+                                                    grid_x, grid_y, grid_z )
+                   ENDIF
+
+!
+!--                Check for chemistry quantities                   
+                   IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                      CALL chem_define_netcdf_grid( do3d(av,i), found,         &
+                                                    grid_x, grid_y, grid_z )
+                   ENDIF
+
+!
+!--                Check for SALSA quantities
+                   IF ( .NOT. found  .AND.  salsa )  THEN
+                      CALL salsa_define_netcdf_grid( do3d(av,i), found, grid_x,&
+                                                     grid_y, grid_z )
+                   ENDIF                 
+                   
+!--                Check for user-defined quantities
+                   IF ( .NOT. found )  THEN
+                      CALL user_define_netcdf_grid( do3d(av,i), found, grid_x, &
+                                                    grid_y, grid_z )
+                   ENDIF
+                                                 
+                   IF ( .NOT. found )  THEN
+                      WRITE ( message_string, * ) 'no grid defined for varia', &
+                                                  'ble ', TRIM( do3d(av,i) )
+                      CALL message( 'define_netcdf_header', 'PA0244', 0, 1, 0, &
+                                    6, 0 )
+                   ENDIF
+
+             END SELECT
+
+!
+!--          Select the respective dimension ids
+             IF ( grid_x == 'x' )  THEN
+                id_x = id_dim_x_3d(av)
+             ELSEIF ( grid_x == 'xu' )  THEN
+                id_x = id_dim_xu_3d(av)
+             ENDIF
+
+             IF ( grid_y == 'y' )  THEN
+                id_y = id_dim_y_3d(av)
+             ELSEIF ( grid_y == 'yv' )  THEN
+                id_y = id_dim_yv_3d(av)
+             ENDIF
+
+             IF ( grid_z == 'zu' )  THEN
+                id_z = id_dim_zu_3d(av)
+             ELSEIF ( grid_z == 'zw' )  THEN
+                id_z = id_dim_zw_3d(av)
+             ELSEIF ( grid_z == 'zs' )  THEN
+                id_z = id_dim_zs_3d(av)
+             ENDIF
+
+!
+!--          Define the grid
+             CALL netcdf_create_var( id_set_3d(av),(/ id_x, id_y, id_z,        &
+                                     id_dim_time_3d(av) /), do3d(av,i),        &
+                                     nc_precision(4), id_var_do3d(av,i),       &
+                                     TRIM( do3d_unit(av,i) ), do3d(av,i), 79,  &
+                                     80, 357, .TRUE. )
+#if defined( __netcdf4_parallel )
+             IF ( netcdf_data_format > 4 )  THEN
+!
+!--             Set no fill for every variable to increase performance.
+                nc_stat = NF90_DEF_VAR_FILL( id_set_3d(av),     &
+                                             id_var_do3d(av,i), &
+                                             1, 0 )
+                CALL netcdf_handle_error( 'netcdf_define_header', 532 )
+!
+!--             Set collective io operations for parallel io
+                nc_stat = NF90_VAR_PAR_ACCESS( id_set_3d(av),     &
+                                               id_var_do3d(av,i), &
+                                               NF90_COLLECTIVE )
+                CALL netcdf_handle_error( 'netcdf_define_header', 445 )
+             ENDIF
+#endif
+             var_list = TRIM( var_list ) // TRIM( do3d(av,i) ) // ';'
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       No arrays to output
+          IF ( i == 1 )  RETURN
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs and by combine_plot_fields)
+          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 81 )
+
+!
+!--       Set general no fill, otherwise the performance drops significantly for
+!--       parallel output.
+          nc_stat = NF90_SET_FILL( id_set_3d(av), NF90_NOFILL, oldmode )
+          CALL netcdf_handle_error( 'netcdf_define_header', 528 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_3d(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 82 )
+
+!
+!--       These data are only written by PE0 for parallel output to increase
+!--       the performance.
+          IF ( myid == 0  .OR.  netcdf_data_format < 5 )  THEN
+!
+!--          Write data for x (shifted by +dx/2) and xu axis
+             ALLOCATE( netcdf_data(0:nx) )
+
+             DO  i = 0, nx
+                netcdf_data(i) = ( i + 0.5 ) * dx
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_x_3d(av),  &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nx+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 83 )
+
+             DO  i = 0, nx
+                netcdf_data(i) = i * dx
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_xu_3d(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nx+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 385 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write data for y (shifted by +dy/2) and yv axis
+             ALLOCATE( netcdf_data(0:ny) )
+
+             DO  i = 0, ny
+                netcdf_data(i) = ( i + 0.5_wp ) * dy
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_y_3d(av),  &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ny+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 84 )
+
+             DO  i = 0, ny
+                netcdf_data(i) = i * dy
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_yv_3d(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ny+1 /))
+             CALL netcdf_handle_error( 'netcdf_define_header', 387 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write UTM coordinates
+             IF ( init_model%rotation_angle == 0.0_wp )  THEN
+!
+!--             1D in case of no rotation
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+!
+!--             x coordinates
+                ALLOCATE( netcdf_data(0:nx) )
+                DO  k = 0, 2
+!               
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_x = 0.5
+!               
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_x = 0.0
+!               
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_x = 0.5
+                   ENDIF
+                
+                   DO  i = 0, nx
+                     netcdf_data(i) = init_model%origin_x            &
+                                    + cos_ra * ( i + shift_x ) * dx
+                   ENDDO
+                
+                   nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_eutm_3d(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ nx+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+!
+!--             y coordinates
+                ALLOCATE( netcdf_data(0:ny) )
+                DO  k = 0, 2
+!
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_y = 0.5
+!
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_y = 0.5
+!
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_y = 0.0
+                   ENDIF
+
+                   DO  j = 0, ny
+                      netcdf_data(j) = init_model%origin_y            &
+                                     + cos_ra * ( j + shift_y ) * dy
+                   ENDDO
+
+                   nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_nutm_3d(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ ny+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+
+             ELSE
+!
+!--             2D in case of rotation
+                ALLOCATE( netcdf_data_2d(0:nx,0:ny) )
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+                sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+                
+                DO  k = 0, 2
+!               
+!--               Scalar grid points
+                  IF ( k == 0 )  THEN
+                     shift_x = 0.5 ; shift_y = 0.5
+!               
+!--               u grid points
+                  ELSEIF ( k == 1 )  THEN
+                     shift_x = 0.0 ; shift_y = 0.5
+!               
+!--               v grid points
+                  ELSEIF ( k == 2 )  THEN
+                     shift_x = 0.5 ; shift_y = 0.0
+                  ENDIF
+                
+                  DO  j = 0, ny
+                     DO  i = 0, nx
+                        netcdf_data_2d(i,j) = init_model%origin_x            &
+                                            + cos_ra * ( i + shift_x ) * dx  &
+                                            + sin_ra * ( j + shift_y ) * dy
+                     ENDDO
+                  ENDDO
+                
+                  nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_eutm_3d(av,k),  &
+                                          netcdf_data_2d, start = (/ 1, 1 /),   &
+                                          count = (/ nx+1, ny+1 /) )
+                  CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+                
+                  DO  j = 0, ny
+                     DO  i = 0, nx
+                        netcdf_data_2d(i,j) = init_model%origin_y            &
+                                            - sin_ra * ( i + shift_x ) * dx  &
+                                            + cos_ra * ( j + shift_y ) * dy
+                     ENDDO
+                  ENDDO
+                
+                  nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_nutm_3d(av,k),  &
+                                          netcdf_data_2d, start = (/ 1, 1 /),   &
+                                          count = (/ nx+1, ny+1 /) )
+                  CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+                
+                ENDDO
+                DEALLOCATE( netcdf_data_2d )
+             ENDIF
+!
+!--          Write zu and zw data (vertical axes)
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zu_3d(av),  &
+                                     zu(nzb:nz_do3d), start = (/ 1 /), &
+                                     count = (/ nz_do3d-nzb+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 85 )
+
+
+             nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zw_3d(av),  &
+                                     zw(nzb:nz_do3d), start = (/ 1 /), &
+                                     count = (/ nz_do3d-nzb+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 86 )
+
+             IF ( land_surface )  THEN
+!
+!--             Write zs grid
+                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zs_3d(av),  &
+                                        - zs(nzb_soil:nzt_soil), start = (/ 1 /), &
+                                        count = (/ nzt_soil-nzb_soil+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 86 )
+             ENDIF
+
+          ENDIF
+!
+!--       Write lon and lat data. Only for parallel output.
+          IF ( netcdf_data_format > 4 )  THEN
+
+             ALLOCATE( lat(nxl:nxr,nys:nyn) )
+             ALLOCATE( lon(nxl:nxr,nys:nyn) )
+             cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+             sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+             DO  k = 0, 2
+!               
+!--             Scalar grid points
+                IF ( k == 0 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.5
+!               
+!--             u grid points
+                ELSEIF ( k == 1 )  THEN
+                   shift_x = 0.0 ; shift_y = 0.5
+!               
+!--             v grid points
+                ELSEIF ( k == 2 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.0
+                ENDIF
+
+                DO  j = nys, nyn
+                   DO  i = nxl, nxr
+                      eutm = init_model%origin_x            &
+                           + cos_ra * ( i + shift_x ) * dx  &
+                           + sin_ra * ( j + shift_y ) * dy
+                      nutm = init_model%origin_y            &
+                           - sin_ra * ( i + shift_x ) * dx  &
+                           + cos_ra * ( j + shift_y ) * dy
+
+                      CALL  convert_utm_to_geographic( crs_list,          &
+                                                       eutm, nutm,        &
+                                                       lon(i,j), lat(i,j) )
+                   ENDDO
+                ENDDO
+
+                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_lon_3d(av,k), &
+                                     lon, start = (/ nxl+1, nys+1 /),       &
+                                     count = (/ nxr-nxl+1, nyn-nys+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_lat_3d(av,k), &
+                                     lat, start = (/ nxl+1, nys+1 /),       &
+                                     count = (/ nxr-nxl+1, nyn-nys+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+             ENDDO
+
+             DEALLOCATE( lat )
+             DEALLOCATE( lon )
+
+          ENDIF
+!
+!--       In case of non-flat topography write height information. Only for
+!--       parallel netcdf output.
+          IF ( TRIM( topography ) /= 'flat'  .AND.                             &
+               netcdf_data_format > 4 )  THEN
+
+!             IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zusi_3d(av),     &
+!                                        zu_s_inner(nxl:nxr+1,nys:nyn),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+1 /) )
+!             ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zusi_3d(av),     &
+!                                        zu_s_inner(nxl:nxr,nys:nyn+1),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+1, nyn-nys+2 /) )
+!             ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zusi_3d(av),     &
+!                                        zu_s_inner(nxl:nxr+1,nys:nyn+1),       &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+2 /) )
+!             ELSE
+                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zusi_3d(av),     &
+                                        zu_s_inner(nxl:nxr,nys:nyn),           &
+                                        start = (/ nxl+1, nys+1 /),            &
+                                        count = (/ nxr-nxl+1, nyn-nys+1 /) )
+!             ENDIF
+             CALL netcdf_handle_error( 'netcdf_define_header', 419 )
+
+!             IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zwwi_3d(av),     &
+!                                        zw_w_inner(nxl:nxr+1,nys:nyn),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+1 /) )
+!             ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zwwi_3d(av),     &
+!                                        zw_w_inner(nxl:nxr,nys:nyn+1),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+1, nyn-nys+2 /) )
+!             ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zwwi_3d(av),     &
+!                                        zw_w_inner(nxl:nxr+1,nys:nyn+1),       &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+2 /) )
+!             ELSE
+                nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_zwwi_3d(av),     &
+                                        zw_w_inner(nxl:nxr,nys:nyn),           &
+                                        start = (/ nxl+1, nys+1 /),            &
+                                        count = (/ nxr-nxl+1, nyn-nys+1 /) )
+!             ENDIF
+             CALL netcdf_handle_error( 'netcdf_define_header', 420 )
+
+          ENDIF
+
+       CASE ( '3d_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_3d(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 87 )
+
+          var_list = ';'
+          i = 1
+          DO WHILE ( do3d(av,i)(1:1) /= ' ' )
+             var_list = TRIM(var_list) // TRIM( do3d(av,i) ) // ';'
+             i = i + 1
+          ENDDO
+
+          IF ( av == 0 )  THEN
+             var = '(3d)'
+          ELSE
+             var = '(3d_av)'
+          ENDIF
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for volume data ' //             &
+                              TRIM( var ) // ' from previous run found,' // &
+                              '&but this file cannot be extended due to' // &
+                              ' variable mismatch.' //                      &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0245', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get and compare the number of vertical gridpoints
+          nc_stat = NF90_INQ_VARID( id_set_3d(av), 'zu_3d', id_var_zu_3d(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 88 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_3d(av), id_var_zu_3d(av), &
+                                           dimids = id_dim_zu_3d_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 89 )
+          id_dim_zu_3d(av) = id_dim_zu_3d_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_3d(av), id_dim_zu_3d(av), &
+                                            len = nz_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 90 )
+
+          IF ( nz_do3d-nzb+1 /= nz_old )  THEN
+              message_string = 'netCDF file for volume data ' //             &
+                               TRIM( var ) // ' from previous run found,' // &
+                               '&but this file cannot be extended due to' // &
+                               ' mismatch in number of' //                   &
+                               ' vertical grid points (nz_do3d).' //         &
+                               '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0246', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is pl3d..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_3d(av), 'time', id_var_time_3d(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 91 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_3d(av), id_var_time_3d(av), &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 92 )
+
+          id_dim_time_3d(av) = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_3d(av), id_dim_time_3d(av), &
+                                            len = ntime_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 93 )
+
+!
+!--       For non-parallel output use the last output time level of the netcdf
+!--       file because the time dimension is unlimited. In case of parallel
+!--       output the variable ntime_count could get the value of 9*10E36 because
+!--       the time dimension is limited.
+          IF ( netcdf_data_format < 5 ) do3d_time_count(av) = ntime_count
+
+          nc_stat = NF90_GET_VAR( id_set_3d(av), id_var_time_3d(av), &
+                                  last_time_coordinate,              &
+                                  start = (/ do3d_time_count(av) /), &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 94 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for volume data ' //             &
+                              TRIM( var ) // ' from previous run found,' // &
+                              '&but this file cannot be extended becaus' // &
+                              'e the current output time' //                &
+                              '&is less or equal than the last output t' // &
+                              'ime on this file.' //                        &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0247', 0, 1, 0, 6, 0 )
+             do3d_time_count(av) = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+          IF ( netcdf_data_format > 4 )  THEN
+!
+!--          Check if the needed number of output time levels is increased
+!--          compared to the number of time levels in the existing file.
+             IF ( ntdim_3d(av) > ntime_count )  THEN
+                message_string = 'netCDF file for volume data ' // &
+                                 TRIM( var ) // ' from previous run found,' // &
+                                 '&but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
+                                 'een increased compared to the previous s' // &
+                                 'imulation.' //                               &
+                                 '&New file is created instead.'
+                CALL message( 'define_netcdf_header', 'PA0388', 0, 1, 0, 6, 0 )
+                do3d_time_count(av) = 0
+                extend = .FALSE.
+!
+!--             Recalculate the needed time levels for the new file.
+                IF ( av == 0 )  THEN
+                   ntdim_3d(0) = CEILING(                               &
+                           ( end_time - MAX( skip_time_do3d,            &
+                                             simulated_time_at_begin )  &
+                           ) / dt_do3d )
+                   IF ( do3d_at_begin )  ntdim_3d(0) = ntdim_3d(0) + 1
+                ELSE
+                   ntdim_3d(1) = CEILING(                               &
+                           ( end_time - MAX( skip_time_data_output_av,  &
+                                             simulated_time_at_begin )  &
+                           ) / dt_data_output_av )
+                ENDIF
+                RETURN
+             ENDIF
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO WHILE ( do3d(av,i)(1:1) /= ' ' )
+             nc_stat = NF90_INQ_VARID( id_set_3d(av), TRIM( do3d(av,i) ), &
+                                       id_var_do3d(av,i) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 95 )
+#if defined( __netcdf4_parallel )
+!
+!--          Set collective io operations for parallel io
+             IF ( netcdf_data_format > 4 )  THEN
+                nc_stat = NF90_VAR_PAR_ACCESS( id_set_3d(av),     &
+                                               id_var_do3d(av,i), &
+                                               NF90_COLLECTIVE )
+                CALL netcdf_handle_error( 'netcdf_define_header', 453 )
+             ENDIF
+#endif
+             i = i + 1
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size. Maybe revise later.
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_REDEF( id_set_3d(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 429 )
+          nc_stat = NF90_PUT_ATT( id_set_3d(av), NF90_GLOBAL, 'title', &
+                                  TRIM( run_description_header ) //    &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 96 )
+          nc_stat = NF90_ENDDEF( id_set_3d(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 430 )
+          message_string = 'netCDF file for volume data ' //             &
+                           TRIM( var ) // ' from previous run found.' // &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0248', 0, 0, 0, 6, 0 )
+
+
+       CASE ( 'ag_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_agt, NF90_GLOBAL, 'title', &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 330 )
+!
+!--       Switch for unlimited time dimension
+          IF ( agent_time_unlimited ) THEN
+             CALL netcdf_create_dim( id_set_agt, 'time', NF90_UNLIMITED,       &
+                                     id_dim_time_agt, 331 )
+          ELSE
+             CALL netcdf_create_dim( id_set_agt, 'time',                       &
+                                     INT( ( MIN( multi_agent_system_end,       &
+                                                 end_time ) -                  &
+                                            multi_agent_system_start ) /       &
+                                            dt_write_agent_data * 1.1 ),       &
+                                     id_dim_time_agt, 331 )
+          ENDIF
+
+          CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /), 'time',   &
+                                  NF90_REAL4, id_var_time_agt, 'seconds', '',  &
+                                  332, 333, 000 )
+
+          CALL netcdf_create_dim( id_set_agt, 'agent_number',                  &
+                                  dim_size_agtnum, id_dim_agtnum, 334 )
+
+          CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum /),             &
+                                  'agent_number', NF90_REAL4,                  &
+                                  id_var_agtnum, 'agent number', '', 335,      &
+                                  336, 000 )
+!
+!--       Define variable which contains the real number of agents in use
+          CALL netcdf_create_var( id_set_agt, (/ id_dim_time_agt /),           &
+                                  'real_num_of_agt', NF90_REAL4,               &
+                                  id_var_rnoa_agt, 'agent number', '', 337,    &
+                                  338, 000 )
+          i = 1
+          CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,                &
+                                  id_dim_time_agt /), agt_var_names(i),        &
+                                  NF90_DOUBLE, id_var_agt(i),                  &
+                                  TRIM( agt_var_units(i) ),                    &
+                                  TRIM( agt_var_names(i) ), 339, 340, 341 )
+!
+!--       Define the variables
+          DO  i = 2, 6
+             CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,             &
+                                     id_dim_time_agt /), agt_var_names(i),     &
+                                     NF90_REAL4, id_var_agt(i),                &
+                                     TRIM( agt_var_units(i) ),                 &
+                                     TRIM( agt_var_names(i) ), 339, 340, 341 )
+
+          ENDDO
+!
+!--       Define vars for biometeorology
+          CALL netcdf_create_var( id_set_agt, (/ id_dim_agtnum,                &
+                                  id_dim_time_agt /), agt_var_names(9),        &
+                                  nc_precision(8), id_var_agt(9),              &
+                                  TRIM( agt_var_units(9) ),                    &
+                                  TRIM( agt_var_names(9) ), 339, 340, 341 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_agt )
+          CALL netcdf_handle_error( 'netcdf_define_header', 342 )
+
+
+!        CASE ( 'ag_ext' )
+! !+?agent extend output for restart runs has to be adapted
+! 
+! !
+! !--       Get the id of the time coordinate (unlimited coordinate) and its
+! !--       last index on the file. The next time level is prt..count+1.
+! !--       The current time must be larger than the last output time
+! !--       on the file.
+!           nc_stat = NF90_INQ_VARID( id_set_agt, 'time', id_var_time_agt )
+!           CALL netcdf_handle_error( 'netcdf_define_header', 343 )
+! 
+!           nc_stat = NF90_INQUIRE_VARIABLE( id_set_agt, id_var_time_agt, &
+!                                            dimids = id_dim_time_old )
+!           CALL netcdf_handle_error( 'netcdf_define_header', 344 )
+!           id_dim_time_agt = id_dim_time_old(1)
+! 
+!           nc_stat = NF90_INQUIRE_DIMENSION( id_set_agt, id_dim_time_agt, &
+!                                             len = agt_time_count )
+!           CALL netcdf_handle_error( 'netcdf_define_header', 345 )
+! 
+!           nc_stat = NF90_GET_VAR( id_set_agt, id_var_time_agt,  &
+!                                   last_time_coordinate,         &
+!                                   start = (/ agt_time_count /), &
+!                                   count = (/ 1 /) )
+!           CALL netcdf_handle_error( 'netcdf_define_header', 346 )
+! 
+!           IF ( last_time_coordinate(1) >= simulated_time )  THEN
+!              message_string = 'netCDF file for agents ' //                  &
+!                               'from previous run found,' //                 &
+!                               '&but this file cannot be extended becaus' // &
+!                               'e the current output time' //                &
+!                               '&is less or equal than the last output t' // &
+!                               'ime on this file.' //                        &
+!                               '&New file is created instead.'
+!              CALL message( 'define_netcdf_header', 'PA0265', 0, 1, 0, 6, 0 )
+!              agt_time_count = 0
+!              extend = .FALSE.
+!              RETURN
+!           ENDIF
+! 
+! !
+! !--       Dataset seems to be extendable.
+! !--       Now get the variable ids.
+!           nc_stat = NF90_INQ_VARID( id_set_agt, 'real_num_of_agt', &
+!                                     id_var_rnoa_agt )
+!           CALL netcdf_handle_error( 'netcdf_define_header', 347 )
+! 
+!           DO  i = 1, 17
+! 
+!              nc_stat = NF90_INQ_VARID( id_set_agt, agt_var_names(i), &
+!                                        id_var_prt(i) )
+!              CALL netcdf_handle_error( 'netcdf_define_header', 348 )
+! 
+!           ENDDO
+! 
+!           message_string = 'netCDF file for particles ' // &
+!                            'from previous run found.' //   &
+!                            '&This file will be extended.'
+!           CALL message( 'define_netcdf_header', 'PA0266', 0, 0, 0, 6, 0 )
+          
+
+       CASE ( 'xy_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'Conventions', &
+                                  'COARDS' )
+          CALL netcdf_handle_error( 'netcdf_define_header', 97 )
+
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'title', &
+                                  TRIM( run_description_header ) //    &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 98 )
+          IF ( av == 1 )  THEN
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
+             nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'time_avg', &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 98 )
+          ENDIF
+
+!
+!--       Define time coordinate for xy sections.
+!--       For parallel output the time dimensions has to be limited, otherwise
+!--       the performance drops significantly.
+          IF ( netcdf_data_format < 5 )  THEN
+             CALL netcdf_create_dim( id_set_xy(av), 'time', NF90_UNLIMITED,    &
+                                     id_dim_time_xy(av), 99 )
+          ELSE
+             CALL netcdf_create_dim( id_set_xy(av), 'time', ntdim_2d_xy(av),   &
+                                     id_dim_time_xy(av), 524 )
+          ENDIF
+
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_time_xy(av) /),     &
+                                  'time', NF90_DOUBLE, id_var_time_xy(av),     &
+                                  'seconds', '', 100, 101, 000 )
+!
+!--       Define the spatial dimensions and coordinates for xy-sections.
+!--       First, determine the number of horizontal sections to be written.
+          IF ( section(1,1) == -9999 )  THEN
+             RETURN
+          ELSE
+             ns = 1
+             DO WHILE ( section(ns,1) /= -9999  .AND.  ns <= 100 )
+                ns = ns + 1
+             ENDDO
+             ns = ns - 1
+          ENDIF
+
+!
+!--       Define vertical coordinate grid (zu grid)
+          CALL netcdf_create_dim( id_set_xy(av), 'zu_xy', ns,                  &
+                                  id_dim_zu_xy(av), 102 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_zu_xy(av) /),       &
+                                  'zu_xy', NF90_DOUBLE, id_var_zu_xy(av),      &
+                                  'meters', '', 103, 104, 000 )
+!
+!--       Define vertical coordinate grid (zw grid)
+          CALL netcdf_create_dim( id_set_xy(av), 'zw_xy', ns,                  &
+                                  id_dim_zw_xy(av), 105 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_zw_xy(av) /),       &
+                                  'zw_xy', NF90_DOUBLE, id_var_zw_xy(av),      &
+                                  'meters', '', 106, 107, 000 )
+
+          IF ( land_surface )  THEN
+
+             ns_do = 1
+             DO WHILE ( section(ns_do,1) /= -9999  .AND.  ns_do < nzs )
+                ns_do = ns_do + 1
+             ENDDO
+!
+!--          Define vertical coordinate grid (zs grid)
+             CALL netcdf_create_dim( id_set_xy(av), 'zs_xy', ns_do,            &
+                                     id_dim_zs_xy(av), 539 )
+             CALL netcdf_create_var( id_set_xy(av), (/ id_dim_zs_xy(av) /),    &
+                                     'zs_xy', NF90_DOUBLE, id_var_zs_xy(av),   &
+                                     'meters', '', 540, 541, 000 )
+
+          ENDIF
+
+!
+!--       Define a pseudo vertical coordinate grid for the surface variables
+!--       u* and t* to store their height level
+          CALL netcdf_create_dim( id_set_xy(av), 'zu1_xy', 1,                  &
+                                  id_dim_zu1_xy(av), 108 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_zu1_xy(av) /),      &
+                                  'zu1_xy', NF90_DOUBLE, id_var_zu1_xy(av),    &
+                                  'meters', '', 109, 110, 000 )
+!
+!--       Define a variable to store the layer indices of the horizontal cross
+!--       sections, too
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_zu_xy(av) /),       &
+                                  'ind_z_xy', NF90_DOUBLE,                     &
+                                  id_var_ind_z_xy(av), 'gridpoints', '', 111,  &
+                                  112, 000 )
+!
+!--       Define x-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_xy(av), 'x', nx+1, id_dim_x_xy(av),   &
+                                  113 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_x_xy(av) /), 'x',   &
+                                  NF90_DOUBLE, id_var_x_xy(av), 'meters', '',  &
+                                  114, 115, 000 )
+!
+!--       Define x-axis (for u position)
+          CALL netcdf_create_dim( id_set_xy(av), 'xu', nx+1,                   &
+                                  id_dim_xu_xy(av), 388 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_xu_xy(av) /), 'xu', &
+                                  NF90_DOUBLE, id_var_xu_xy(av), 'meters', '', &
+                                  389, 390, 000 )
+!
+!--       Define y-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_xy(av), 'y', ny+1, id_dim_y_xy(av),   &
+                                  116 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_y_xy(av) /), 'y',   &
+                                  NF90_DOUBLE, id_var_y_xy(av), 'meters', '',  &
+                                  117, 118, 000 )
+!
+!--       Define y-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_xy(av), 'yv', ny+1,                   &
+                                  id_dim_yv_xy(av), 364 )
+          CALL netcdf_create_var( id_set_xy(av), (/ id_dim_yv_xy(av) /), 'yv', &
+                                  NF90_DOUBLE, id_var_yv_xy(av), 'meters', '', &
+                                  365, 366, 000 )
+!
+!--       Define UTM coordinates
+          IF ( init_model%rotation_angle == 0.0_wp )  THEN
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_x_xy(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_xy(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_y_xy(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_xy(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_xu_xy(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xy(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_y_xy(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xy(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_x_xy(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xy(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_yv_xy(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xy(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ELSE
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_x_xy(av), id_dim_y_xy(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_xy(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_x_xy(av), id_dim_y_xy(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_xy(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_xu_xy(av), id_dim_y_xy(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xy(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_xu_xy(av), id_dim_y_xy(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xy(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_x_xy(av), id_dim_yv_xy(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xy(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xy(av), &
+                                 (/ id_dim_x_xy(av), id_dim_yv_xy(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xy(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ENDIF
+!
+!--       Define geographic coordinates
+          CALL netcdf_create_var( id_set_xy(av), &
+                              (/ id_dim_x_xy(av), id_dim_y_xy(av) /),      &
+                              'lon', NF90_DOUBLE, id_var_lon_xy(av,0),  &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xy(av), &
+                              (/ id_dim_x_xy(av), id_dim_y_xy(av) /),      &
+                              'lat', NF90_DOUBLE, id_var_lat_xy(av,0),  &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xy(av), &
+                              (/ id_dim_xu_xy(av), id_dim_y_xy(av) /),     &
+                              'lonu', NF90_DOUBLE, id_var_lon_xy(av,1), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xy(av), &
+                              (/ id_dim_xu_xy(av), id_dim_y_xy(av) /),     &
+                              'latu', NF90_DOUBLE, id_var_lat_xy(av,1), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xy(av), &
+                              (/ id_dim_x_xy(av), id_dim_yv_xy(av) /),     &
+                              'lonv', NF90_DOUBLE, id_var_lon_xy(av,2), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xy(av), &
+                              (/ id_dim_x_xy(av), id_dim_yv_xy(av) /),     &
+                              'latv', NF90_DOUBLE, id_var_lat_xy(av,2), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+!
+!--       Define coordinate-reference system
+          CALL netcdf_create_crs( id_set_xy(av), 000 )
+!
+!--       In case of non-flat topography define 2d-arrays containing the height
+!--       information. Only for parallel netcdf output.
+          IF ( TRIM( topography ) /= 'flat'  .AND.                             &
+               netcdf_data_format > 4  )  THEN
+!
+!--          Define zusi = zu(nzb_s_inner)
+             CALL netcdf_create_var( id_set_xy(av), (/ id_dim_x_xy(av),        &
+                                     id_dim_y_xy(av) /), 'zusi', NF90_DOUBLE,  &
+                                     id_var_zusi_xy(av), 'meters',             &
+                                     'zu(nzb_s_inner)', 421, 422, 423 )
+!             
+!--          Define zwwi = zw(nzb_w_inner)
+             CALL netcdf_create_var( id_set_xy(av), (/ id_dim_x_xy(av),        &
+                                     id_dim_y_xy(av) /), 'zwwi', NF90_DOUBLE,  &
+                                     id_var_zwwi_xy(av), 'meters',             &
+                                     'zw(nzb_w_inner)', 424, 425, 426 )
+
+          ENDIF
+
+!
+!--       Define the variables
+          var_list = ';'
+          i = 1
+
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+
+             IF ( INDEX( do2d(av,i), 'xy' ) /= 0 )  THEN
+!
+!--             If there is a star in the variable name (u* or t*), it is a
+!--             surface variable. Define it with id_dim_zu1_xy.
+                IF ( INDEX( do2d(av,i), '*' ) /= 0 )  THEN
+
+                   CALL netcdf_create_var( id_set_xy(av), (/ id_dim_x_xy(av),  &
+                                           id_dim_y_xy(av), id_dim_zu1_xy(av), &
+                                           id_dim_time_xy(av) /), do2d(av,i),  &
+                                           nc_precision(1), id_var_do2d(av,i), &
+                                           TRIM( do2d_unit(av,i) ),            &
+                                           do2d(av,i), 119, 120, 354, .TRUE. )
+
+                ELSE
+
+!
+!--                Check for the grid
+                   found = .FALSE.
+                   SELECT CASE ( do2d(av,i) )
+!
+!--                   Most variables are defined on the zu grid
+                      CASE ( 'e_xy', 'nc_xy', 'nr_xy', 'p_xy',                 &
+                             'pc_xy', 'pr_xy', 'prr_xy', 'q_xy',               &
+                             'qc_xy', 'ql_xy', 'ql_c_xy', 'ql_v_xy',           &
+                             'ql_vp_xy', 'qr_xy', 'qv_xy',                     &
+                             's_xy',                                           &
+                             'theta_xy', 'thetal_xy', 'thetav_xy' )
+
+                         grid_x = 'x'
+                         grid_y = 'y'
+                         grid_z = 'zu'
+!
+!--                   u grid
+                      CASE ( 'u_xy' )
+
+                         grid_x = 'xu'
+                         grid_y = 'y'
+                         grid_z = 'zu'
+!
+!--                   v grid
+                      CASE ( 'v_xy' )
+
+                         grid_x = 'x'
+                         grid_y = 'yv'
+                         grid_z = 'zu'
+!
+!--                   w grid
+                      CASE ( 'w_xy' )
+
+                         grid_x = 'x'
+                         grid_y = 'y'
+                         grid_z = 'zw'
+
+
+                      CASE DEFAULT
+!
+!--                      Check for land surface quantities
+                         IF ( land_surface )  THEN
+                            CALL lsm_define_netcdf_grid( do2d(av,i), found,    &
+                                                   grid_x, grid_y, grid_z )
+                         ENDIF
+
+                         IF ( .NOT. found )  THEN
+                            CALL tcm_define_netcdf_grid( do2d(av,i), found,    &
+                                                         grid_x, grid_y,       &
+                                                         grid_z )
+                         ENDIF
+
+!
+!--                      Check for ocean quantities
+                         IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                            CALL ocean_define_netcdf_grid( do2d(av,i), found,  &
+                                                           grid_x, grid_y,     &
+                                                           grid_z )
+                         ENDIF
+!
+!--                      Check for radiation quantities
+                         IF ( .NOT. found  .AND.  radiation )  THEN
+                            CALL radiation_define_netcdf_grid( do2d(av,i),     &
+                                                         found, grid_x, grid_y,&
+                                                         grid_z )
+                         ENDIF
+                         
+!
+!--                      Check for SALSA quantities
+                         IF ( .NOT. found  .AND.  salsa )  THEN
+                            CALL salsa_define_netcdf_grid( do2d(av,i), found,  &
+                                                           grid_x, grid_y,     &
+                                                           grid_z )
+                         ENDIF                       
+
+!
+!--                      Check for gust module quantities
+                         IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                            CALL gust_define_netcdf_grid( do2d(av,i), found,   &
+                                                          grid_x, grid_y,      &
+                                                          grid_z )
+                         ENDIF
+!
+!--                      Check for human thermal comfort quantities
+                         IF ( .NOT. found  .AND.  biometeorology )  THEN
+                            CALL biom_define_netcdf_grid( do2d( av, i), found, &
+                                                          grid_x, grid_y,      &
+                                                          grid_z )
+                         ENDIF
+!
+!--                      Check for chemistry quantities
+                         IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                            CALL chem_define_netcdf_grid( do2d(av,i), found,   &
+                                                          grid_x, grid_y,      &
+                                                          grid_z )
+                         ENDIF
+
+!
+!--                      Check for UV exposure quantities
+                         IF ( .NOT. found  .AND.  uv_exposure )  THEN
+                            CALL uvem_define_netcdf_grid( do2d(av,i), found,    &
+                                                          grid_x, grid_y, grid_z )
+                         ENDIF
+
+!
+!--                      Check for user-defined quantities
+                         IF ( .NOT. found )  THEN
+                            CALL user_define_netcdf_grid( do2d(av,i), found,   &
+                                                          grid_x, grid_y,      &
+                                                          grid_z )
+                         ENDIF
+
+                         IF ( .NOT. found )  THEN
+                            WRITE ( message_string, * ) 'no grid defined for', &
+                                                ' variable ', TRIM( do2d(av,i) )
+                            CALL message( 'define_netcdf_header', 'PA0244',    &
+                                          0, 1, 0, 6, 0 )
+                         ENDIF
+
+                   END SELECT
+
+!
+!--                Select the respective dimension ids
+                   IF ( grid_x == 'x' )  THEN
+                      id_x = id_dim_x_xy(av)
+                   ELSEIF ( grid_x == 'xu' )  THEN
+                      id_x = id_dim_xu_xy(av)
+                   ENDIF
+
+                   IF ( grid_y == 'y' )  THEN
+                      id_y = id_dim_y_xy(av)
+                   ELSEIF ( grid_y == 'yv' )  THEN
+                      id_y = id_dim_yv_xy(av)
+                   ENDIF
+
+                   IF ( grid_z == 'zu' )  THEN
+                      id_z = id_dim_zu_xy(av)
+                   ELSEIF ( grid_z == 'zw' )  THEN
+                      id_z = id_dim_zw_xy(av)
+                   ELSEIF ( grid_z == 'zs' )  THEN
+                      id_z = id_dim_zs_xy(av)
+                   ELSEIF ( grid_z == 'zu1' )  THEN
+                      id_z = id_dim_zu1_xy(av)
+                   ENDIF
+
+!
+!--                Define the grid
+                   CALL netcdf_create_var( id_set_xy(av), (/ id_x, id_y, id_z, &
+                                           id_dim_time_xy(av) /), do2d(av,i),  &
+                                           nc_precision(1), id_var_do2d(av,i), &
+                                           TRIM( do2d_unit(av,i) ),            &
+                                           do2d(av,i), 119, 120, 354, .TRUE. )
+
+                ENDIF
+
+#if defined( __netcdf4_parallel )
+                IF ( netcdf_data_format > 4 )  THEN
+!
+!--                Set no fill for every variable to increase performance.
+                   nc_stat = NF90_DEF_VAR_FILL( id_set_xy(av),     &
+                                                id_var_do2d(av,i), &
+                                                1, 0 )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 533 )
+!
+!--                Set collective io operations for parallel io
+                   nc_stat = NF90_VAR_PAR_ACCESS( id_set_xy(av),     &
+                                                  id_var_do2d(av,i), &
+                                                  NF90_COLLECTIVE )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 448 )
+                ENDIF
+#endif
+                var_list = TRIM( var_list) // TRIM( do2d(av,i) ) // ';'
+
+             ENDIF
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       No arrays to output. Close the netcdf file and return.
+          IF ( i == 1 )  RETURN
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs and by combine_plot_fields)
+          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 121 )
+
+!
+!--       Set general no fill, otherwise the performance drops significantly for
+!--       parallel output.
+          nc_stat = NF90_SET_FILL( id_set_xy(av), NF90_NOFILL, oldmode )
+          CALL netcdf_handle_error( 'netcdf_define_header', 529 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_xy(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 122 )
+
+!
+!--       These data are only written by PE0 for parallel output to increase
+!--       the performance.
+          IF ( myid == 0  .OR.  netcdf_data_format < 5 )  THEN
+
+!
+!--          Write axis data: z_xy, x, y
+             ALLOCATE( netcdf_data(1:ns) )
+
+!
+!--          Write zu data
+             DO  i = 1, ns
+                IF( section(i,1) == -1 )  THEN
+                   netcdf_data(i) = -1.0_wp  ! section averaged along z
+                ELSE
+                   netcdf_data(i) = zu( section(i,1) )
+                ENDIF
+             ENDDO
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zu_xy(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 123 )
+
+!
+!--          Write zw data
+             DO  i = 1, ns
+                IF( section(i,1) == -1 )  THEN
+                   netcdf_data(i) = -1.0_wp  ! section averaged along z
+                ELSE
+                   netcdf_data(i) = zw( section(i,1) )
+                ENDIF
+             ENDDO
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zw_xy(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 124 )
+
+!
+!--          Write zs data
+             IF ( land_surface )  THEN
+                ns_do = 0
+                DO  i = 1, ns
+                   IF( section(i,1) == -1 )  THEN
+                      netcdf_data(i) = 1.0_wp  ! section averaged along z
+                      ns_do = ns_do + 1
+                   ELSEIF ( section(i,1) < nzs )  THEN
+                      netcdf_data(i) = - zs( section(i,1) )
+                      ns_do = ns_do + 1
+                   ENDIF
+                ENDDO
+
+                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zs_xy(av), &
+                                        netcdf_data(1:ns_do), start = (/ 1 /),    &
+                                        count = (/ ns_do /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 124 )
+
+             ENDIF
+
+!
+!--          Write gridpoint number data
+             netcdf_data(1:ns) = section(1:ns,1)
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_ind_z_xy(av), &
+                                     netcdf_data, start = (/ 1 /),       &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 125 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write the cross section height u*, t*
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zu1_xy(av), &
+                                     (/ zu(nzb+1) /), start = (/ 1 /), &
+                                     count = (/ 1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 126 )
+
+!
+!--          Write data for x (shifted by +dx/2) and xu axis
+             ALLOCATE( netcdf_data(0:nx) )
+
+             DO  i = 0, nx
+                netcdf_data(i) = ( i + 0.5_wp ) * dx
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_x_xy(av), &
+                                     netcdf_data, start = (/ 1 /),   &
+                                     count = (/ nx+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 127 )
+
+             DO  i = 0, nx
+                netcdf_data(i) = i * dx
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_xu_xy(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nx+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 367 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write data for y (shifted by +dy/2) and yv axis
+             ALLOCATE( netcdf_data(0:ny+1) )
+
+             DO  i = 0, ny
+                netcdf_data(i) = ( i + 0.5_wp ) * dy
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_y_xy(av), &
+                                     netcdf_data, start = (/ 1 /),   &
+                                     count = (/ ny+1 /))
+             CALL netcdf_handle_error( 'netcdf_define_header', 128 )
+
+             DO  i = 0, ny
+                netcdf_data(i) = i * dy
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_yv_xy(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ny+1 /))
+             CALL netcdf_handle_error( 'netcdf_define_header', 368 )
+
+             DEALLOCATE( netcdf_data )
+!
+!--          Write UTM coordinates
+             IF ( init_model%rotation_angle == 0.0_wp )  THEN
+!
+!--             1D in case of no rotation
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+!
+!--             x coordinates
+                ALLOCATE( netcdf_data(0:nx) )
+                DO  k = 0, 2
+!               
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_x = 0.5
+!               
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_x = 0.0
+!               
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_x = 0.5
+                   ENDIF
+                
+                   DO  i = 0, nx
+                     netcdf_data(i) = init_model%origin_x            &
+                                    + cos_ra * ( i + shift_x ) * dx
+                   ENDDO
+                
+                   nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_eutm_xy(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ nx+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+!
+!--             y coordinates
+                ALLOCATE( netcdf_data(0:ny) )
+                DO  k = 0, 2
+!
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_y = 0.5
+!
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_y = 0.5
+!
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_y = 0.0
+                   ENDIF
+
+                   DO  j = 0, ny
+                      netcdf_data(j) = init_model%origin_y            &
+                                     + cos_ra * ( j + shift_y ) * dy
+                   ENDDO
+
+                   nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_nutm_xy(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ ny+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+
+             ELSE
+!
+!--             2D in case of rotation
+                ALLOCATE( netcdf_data_2d(0:nx,0:ny) )
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+                sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+                
+                DO  k = 0, 2
+!               
+!--               Scalar grid points
+                  IF ( k == 0 )  THEN
+                     shift_x = 0.5 ; shift_y = 0.5
+!               
+!--               u grid points
+                  ELSEIF ( k == 1 )  THEN
+                     shift_x = 0.0 ; shift_y = 0.5
+!               
+!--               v grid points
+                  ELSEIF ( k == 2 )  THEN
+                     shift_x = 0.5 ; shift_y = 0.0
+                  ENDIF
+                
+                  DO  j = 0, ny
+                     DO  i = 0, nx
+                        netcdf_data_2d(i,j) = init_model%origin_x            &
+                                            + cos_ra * ( i + shift_x ) * dx  &
+                                            + sin_ra * ( j + shift_y ) * dy
+                     ENDDO
+                  ENDDO
+                
+                  nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_eutm_xy(av,k),  &
+                                          netcdf_data_2d, start = (/ 1, 1 /),   &
+                                          count = (/ nx+1, ny+1 /) )
+                  CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+                
+                  DO  j = 0, ny
+                     DO  i = 0, nx
+                        netcdf_data_2d(i,j) = init_model%origin_y            &
+                                            - sin_ra * ( i + shift_x ) * dx  &
+                                            + cos_ra * ( j + shift_y ) * dy
+                     ENDDO
+                  ENDDO
+                
+                  nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_nutm_xy(av,k),  &
+                                          netcdf_data_2d, start = (/ 1, 1 /),   &
+                                          count = (/ nx+1, ny+1 /) )
+                  CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data_2d )
+             ENDIF
+
+          ENDIF
+!
+!--       Write lon and lat data. Only for parallel output.
+          IF ( netcdf_data_format > 4 )  THEN
+
+             ALLOCATE( lat(nxl:nxr,nys:nyn) )
+             ALLOCATE( lon(nxl:nxr,nys:nyn) )
+             cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+             sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+             DO  k = 0, 2
+!               
+!--             Scalar grid points
+                IF ( k == 0 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.5
+!               
+!--             u grid points
+                ELSEIF ( k == 1 )  THEN
+                   shift_x = 0.0 ; shift_y = 0.5
+!               
+!--             v grid points
+                ELSEIF ( k == 2 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.0
+                ENDIF
+
+                DO  j = nys, nyn
+                   DO  i = nxl, nxr
+                      eutm = init_model%origin_x            &
+                           + cos_ra * ( i + shift_x ) * dx  &
+                           + sin_ra * ( j + shift_y ) * dy
+                      nutm = init_model%origin_y            &
+                           - sin_ra * ( i + shift_x ) * dx  &
+                           + cos_ra * ( j + shift_y ) * dy
+
+                      CALL  convert_utm_to_geographic( crs_list,          &
+                                                       eutm, nutm,        &
+                                                       lon(i,j), lat(i,j) )
+                   ENDDO
+                ENDDO
+
+                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_lon_xy(av,k), &
+                                     lon, start = (/ nxl+1, nys+1 /),       &
+                                     count = (/ nxr-nxl+1, nyn-nys+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_lat_xy(av,k), &
+                                     lat, start = (/ nxl+1, nys+1 /),       &
+                                     count = (/ nxr-nxl+1, nyn-nys+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+             ENDDO
+
+             DEALLOCATE( lat )
+             DEALLOCATE( lon )
+
+          ENDIF
+!
+!--       In case of non-flat topography write height information. Only for 
+!--       parallel netcdf output.
+          IF ( TRIM( topography ) /= 'flat'  .AND.                             &
+               netcdf_data_format > 4  )  THEN
+
+!             IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zusi_xy(av),     &
+!                                        zu_s_inner(nxl:nxr+1,nys:nyn),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+1 /) )
+!             ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zusi_xy(av),     &
+!                                        zu_s_inner(nxl:nxr,nys:nyn+1),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+1, nyn-nys+2 /) )
+!             ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zusi_xy(av),     &
+!                                        zu_s_inner(nxl:nxr+1,nys:nyn+1),       &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+2 /) )
+!             ELSE
+                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zusi_xy(av),     &
+                                        zu_s_inner(nxl:nxr,nys:nyn),           &
+                                        start = (/ nxl+1, nys+1 /),            &
+                                        count = (/ nxr-nxl+1, nyn-nys+1 /) )
+!             ENDIF
+             CALL netcdf_handle_error( 'netcdf_define_header', 427 )
+
+!             IF ( nxr == nx  .AND.  nyn /= ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zwwi_xy(av),     &
+!                                        zw_w_inner(nxl:nxr+1,nys:nyn),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+1 /) )
+!             ELSEIF ( nxr /= nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zwwi_xy(av),     &
+!                                        zw_w_inner(nxl:nxr,nys:nyn+1),         &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+1, nyn-nys+2 /) )
+!             ELSEIF ( nxr == nx  .AND.  nyn == ny )  THEN
+!                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zwwi_xy(av),     &
+!                                        zw_w_inner(nxl:nxr+1,nys:nyn+1),       &
+!                                        start = (/ nxl+1, nys+1 /),            &
+!                                        count = (/ nxr-nxl+2, nyn-nys+2 /) )
+!             ELSE
+                nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_zwwi_xy(av),     &
+                                        zw_w_inner(nxl:nxr,nys:nyn),           &
+                                        start = (/ nxl+1, nys+1 /),            &
+                                        count = (/ nxr-nxl+1, nyn-nys+1 /) )
+!             ENDIF
+             CALL netcdf_handle_error( 'netcdf_define_header', 428 )
+
+          ENDIF
+
+       CASE ( 'xy_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_xy(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 129 )
+
+          var_list = ';'
+          i = 1
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+             IF ( INDEX( do2d(av,i), 'xy' ) /= 0 )  THEN
+                var_list = TRIM( var_list ) // TRIM( do2d(av,i) ) // ';'
+             ENDIF
+             i = i + 1
+          ENDDO
+
+          IF ( av == 0 )  THEN
+             var = '(xy)'
+          ELSE
+             var = '(xy_av)'
+          ENDIF
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for cross-sections ' //           &
+                              TRIM( var ) // ' from previous run found,' //  &
+                              '&but this file cannot be extended due to' //  &
+                              ' variable mismatch.' //                       &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Calculate the number of current sections
+          ns = 1
+          DO WHILE ( section(ns,1) /= -9999  .AND.  ns <= 100 )
+             ns = ns + 1
+          ENDDO
+          ns = ns - 1
+
+!
+!--       Get and compare the number of horizontal cross sections
+          nc_stat = NF90_INQ_VARID( id_set_xy(av), 'zu_xy', id_var_zu_xy(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 130 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_xy(av), id_var_zu_xy(av), &
+                                           dimids = id_dim_zu_xy_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 131 )
+          id_dim_zu_xy(av) = id_dim_zu_xy_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_xy(av), id_dim_zu_xy(av), &
+                                            len = ns_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 132 )
+
+          IF ( ns /= ns_old )  THEN
+             message_string = 'netCDF file for cross-sections ' //          &
+                              TRIM( var ) // ' from previous run found,' // &
+                              '&but this file cannot be extended due to' // &
+                              ' mismatch in number of' //                   &
+                              ' cross sections.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get and compare the heights of the cross sections
+          ALLOCATE( netcdf_data(1:ns_old) )
+
+          nc_stat = NF90_GET_VAR( id_set_xy(av), id_var_zu_xy(av), netcdf_data )
+          CALL netcdf_handle_error( 'netcdf_define_header', 133 )
+
+          DO  i = 1, ns
+             IF ( section(i,1) /= -1 )  THEN
+                IF ( zu(section(i,1)) /= netcdf_data(i) )  THEN
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
+                                                                 0, 1, 0, 6, 0 )
+                   extend = .FALSE.
+                   RETURN
+                ENDIF
+             ELSE
+                IF ( -1.0_wp /= netcdf_data(i) )  THEN
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
+                                                                 0, 1, 0, 6, 0 )
+                   extend = .FALSE.
+                   RETURN
+                ENDIF
+             ENDIF
+          ENDDO
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is do2d..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_xy(av), 'time', id_var_time_xy(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 134 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_xy(av), id_var_time_xy(av), &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 135 )
+          id_dim_time_xy(av) = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_xy(av), id_dim_time_xy(av), &
+                                            len = ntime_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 136 )
+
+!
+!--       For non-parallel output use the last output time level of the netcdf
+!--       file because the time dimension is unlimited. In case of parallel
+!--       output the variable ntime_count could get the value of 9*10E36 because
+!--       the time dimension is limited.
+          IF ( netcdf_data_format < 5 ) do2d_xy_time_count(av) = ntime_count
+
+          nc_stat = NF90_GET_VAR( id_set_xy(av), id_var_time_xy(av),           &
+                                  last_time_coordinate,                        &
+                                  start = (/ do2d_xy_time_count(av) /),        &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 137 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for cross sections ' //             &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 )
+             do2d_xy_time_count(av) = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+          IF ( netcdf_data_format > 4 )  THEN
+!
+!--          Check if the needed number of output time levels is increased
+!--          compared to the number of time levels in the existing file.
+             IF ( ntdim_2d_xy(av) > ntime_count )  THEN
+                message_string = 'netCDF file for cross sections ' //          &
+                                 TRIM( var ) // ' from previous run found,' // &
+                                 '&but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
+                                 'een increased compared to the previous s' // &
+                                 'imulation.' //                               &
+                                 '&New file is created instead.'
+                CALL message( 'define_netcdf_header', 'PA0389', 0, 1, 0, 6, 0 )
+                do2d_xy_time_count(av) = 0
+                extend = .FALSE.
+!
+!--             Recalculate the needed time levels for the new file.
+                IF ( av == 0 )  THEN
+                   ntdim_2d_xy(0) = CEILING(                            &
+                           ( end_time - MAX( skip_time_do2d_xy,         &
+                                             simulated_time_at_begin )  &
+                           ) / dt_do2d_xy )
+                   IF ( do2d_at_begin )  ntdim_2d_xy(0) = ntdim_2d_xy(0) + 1
+                ELSE
+                   ntdim_2d_xy(1) = CEILING(                            &
+                           ( end_time - MAX( skip_time_data_output_av,  &
+                                             simulated_time_at_begin )  &
+                           ) / dt_data_output_av )
+                ENDIF
+                RETURN
+             ENDIF
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+             IF ( INDEX( do2d(av,i), 'xy' ) /= 0 )  THEN
+                nc_stat = NF90_INQ_VARID( id_set_xy(av), do2d(av,i), &
+                                          id_var_do2d(av,i) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 138 )
+#if defined( __netcdf4_parallel )
+!
+!--             Set collective io operations for parallel io
+                IF ( netcdf_data_format > 4 )  THEN
+                   nc_stat = NF90_VAR_PAR_ACCESS( id_set_xy(av),     &
+                                                  id_var_do2d(av,i), &
+                                                  NF90_COLLECTIVE )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 454 )
+                ENDIF
+#endif
+             ENDIF
+             i = i + 1
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_REDEF( id_set_xy(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 431 )
+          nc_stat = NF90_PUT_ATT( id_set_xy(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 139 )
+          nc_stat = NF90_ENDDEF( id_set_xy(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 432 )
+          message_string = 'netCDF file for cross-sections ' //                &
+                            TRIM( var ) // ' from previous run found.' //      &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 )
+          
+
+       CASE ( 'xz_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'Conventions',   &
+                                  'COARDS' )
+          CALL netcdf_handle_error( 'netcdf_define_header', 140 )
+
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')')         &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header )  //           &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 141 )
+          IF ( av == 1 )  THEN
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
+             nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'time_avg', &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 141 )
+          ENDIF
+
+!
+!--       Define time coordinate for xz sections.
+!--       For parallel output the time dimensions has to be limited, otherwise
+!--       the performance drops significantly.
+          IF ( netcdf_data_format < 5 )  THEN
+             CALL netcdf_create_dim( id_set_xz(av), 'time', NF90_UNLIMITED,    &
+                                     id_dim_time_xz(av), 142 )
+          ELSE
+             CALL netcdf_create_dim( id_set_xz(av), 'time', ntdim_2d_xz(av),   &
+                                     id_dim_time_xz(av), 525 )
+          ENDIF
+
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_time_xz(av) /),     &
+                                  'time', NF90_DOUBLE, id_var_time_xz(av),     &
+                                  'seconds', '', 143, 144, 000 )
+!
+!--       Define the spatial dimensions and coordinates for xz-sections.
+!--       First, determine the number of vertical sections to be written.
+          IF ( section(1,2) == -9999 )  THEN
+             RETURN
+          ELSE
+             ns = 1
+             DO WHILE ( section(ns,2) /= -9999  .AND.  ns <= 100 )
+                ns = ns + 1
+             ENDDO
+             ns = ns - 1
+          ENDIF
+
+!
+!--       Define y-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_xz(av), 'y_xz', ns, id_dim_y_xz(av),  &
+                                  145 )
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_y_xz(av) /),        &
+                                  'y_xz', NF90_DOUBLE, id_var_y_xz(av),        &
+                                  'meters', '', 146, 147, 000 )
+!
+!--       Define y-axis (for v position)
+          CALL netcdf_create_dim( id_set_xz(av), 'yv_xz', ns,                  &
+                                  id_dim_yv_xz(av), 369 )
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_yv_xz(av) /),       &
+                                  'yv_xz', NF90_DOUBLE, id_var_yv_xz(av),      &
+                                  'meters', '', 370, 371, 000 )
+!
+!--       Define a variable to store the layer indices of the vertical cross
+!--       sections
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_y_xz(av) /),        &
+                                  'ind_y_xz', NF90_DOUBLE,                     &
+                                  id_var_ind_y_xz(av), 'gridpoints', '', 148,  &
+                                  149, 000 )
+!
+!--       Define x-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_xz(av), 'x', nx+1, id_dim_x_xz(av),   &
+                                  150 )
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_x_xz(av) /), 'x',   &
+                                  NF90_DOUBLE, id_var_x_xz(av), 'meters', '',  &
+                                  151, 152, 000 )
+!
+!--       Define x-axis (for u position)
+          CALL netcdf_create_dim( id_set_xz(av), 'xu', nx+1, id_dim_xu_xz(av), &
+                                  372 )
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_xu_xz(av) /), 'xu', &
+                                  NF90_DOUBLE, id_var_xu_xz(av), 'meters', '', &
+                                  373, 374, 000 )
+!
+!--       Define the three z-axes (zu, zw, and zs)
+          CALL netcdf_create_dim( id_set_xz(av), 'zu', nz+2, id_dim_zu_xz(av), &
+                                  153 )
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_zu_xz(av) /), 'zu', &
+                                  NF90_DOUBLE, id_var_zu_xz(av), 'meters', '', &
+                                  154, 155, 000 )
+          CALL netcdf_create_dim( id_set_xz(av), 'zw', nz+2, id_dim_zw_xz(av), &
+                                  156 )
+          CALL netcdf_create_var( id_set_xz(av), (/ id_dim_zw_xz(av) /), 'zw', &
+                                  NF90_DOUBLE, id_var_zw_xz(av), 'meters', '', &
+                                  157, 158, 000 )
+!
+!--       Define UTM coordinates
+          IF ( init_model%rotation_angle == 0.0_wp )  THEN
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_x_xz(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_xz(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_y_xz(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_xz(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_xu_xz(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xz(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_y_xz(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xz(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_x_xz(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xz(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_yv_xz(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xz(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ELSE
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_x_xz(av), id_dim_y_xz(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_xz(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_x_xz(av), id_dim_y_xz(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_xz(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_xu_xz(av), id_dim_y_xz(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xz(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_xu_xz(av), id_dim_y_xz(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xz(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_x_xz(av), id_dim_yv_xz(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xz(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_xz(av), &
+                                 (/ id_dim_x_xz(av), id_dim_yv_xz(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xz(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ENDIF
+!
+!--       Define geographic coordinates
+          CALL netcdf_create_var( id_set_xz(av), &
+                              (/ id_dim_x_xz(av), id_dim_y_xz(av) /),      &
+                              'lon', NF90_DOUBLE, id_var_lon_xz(av,0),  &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xz(av), &
+                              (/ id_dim_x_xz(av), id_dim_y_xz(av) /),      &
+                              'lat', NF90_DOUBLE, id_var_lat_xz(av,0),  &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xz(av), &
+                              (/ id_dim_xu_xz(av), id_dim_y_xz(av) /),     &
+                              'lonu', NF90_DOUBLE, id_var_lon_xz(av,1), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xz(av), &
+                              (/ id_dim_xu_xz(av), id_dim_y_xz(av) /),     &
+                              'latu', NF90_DOUBLE, id_var_lat_xz(av,1), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xz(av), &
+                              (/ id_dim_x_xz(av), id_dim_yv_xz(av) /),     &
+                              'lonv', NF90_DOUBLE, id_var_lon_xz(av,2), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_xz(av), &
+                              (/ id_dim_x_xz(av), id_dim_yv_xz(av) /),     &
+                              'latv', NF90_DOUBLE, id_var_lat_xz(av,2), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+!
+!--       Define coordinate-reference system
+          CALL netcdf_create_crs( id_set_xz(av), 000 )
+
+          IF ( land_surface )  THEN
+
+             CALL netcdf_create_dim( id_set_xz(av), 'zs', nzs,                 &
+                                     id_dim_zs_xz(av), 542 )
+             CALL netcdf_create_var( id_set_xz(av), (/ id_dim_zs_xz(av) /),    &
+                                     'zs', NF90_DOUBLE, id_var_zs_xz(av),      &
+                                     'meters', '', 543, 544, 000 )
+
+          ENDIF
+
+!
+!--       Define the variables
+          var_list = ';'
+          i = 1
+
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+
+             IF ( INDEX( do2d(av,i), 'xz' ) /= 0 )  THEN
+
+!
+!--             Check for the grid
+                found = .FALSE.
+                SELECT CASE ( do2d(av,i) )
+!
+!--                Most variables are defined on the zu grid
+                   CASE ( 'e_xz', 'nc_xz', 'nr_xz', 'p_xz', 'pc_xz',           &
+                          'pr_xz', 'prr_xz', 'q_xz', 'qc_xz',                  &
+                          'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qr_xz',  &
+                          'qv_xz', 's_xz',                                     &
+                          'theta_xz', 'thetal_xz', 'thetav_xz'                 )
+
+                      grid_x = 'x'
+                      grid_y = 'y'
+                      grid_z = 'zu'
+!
+!--                u grid
+                   CASE ( 'u_xz' )
+
+                      grid_x = 'xu'
+                      grid_y = 'y'
+                      grid_z = 'zu'
+!
+!--                v grid
+                   CASE ( 'v_xz' )
+
+                      grid_x = 'x'
+                      grid_y = 'yv'
+                      grid_z = 'zu'
+!
+!--                w grid
+                   CASE ( 'w_xz' )
+
+                      grid_x = 'x'
+                      grid_y = 'y'
+                      grid_z = 'zw'
+
+                   CASE DEFAULT
+
+!
+!--                   Check for land surface quantities
+                      IF ( land_surface )  THEN
+                         CALL lsm_define_netcdf_grid( do2d(av,i), found,       &
+                                                      grid_x, grid_y, grid_z )
+                      ENDIF
+
+                      IF ( .NOT. found )  THEN
+                         CALL tcm_define_netcdf_grid( do2d(av,i), found,       &
+                                                      grid_x, grid_y, grid_z )
+                      ENDIF
+
+!
+!--                   Check for ocean quantities
+                      IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                         CALL ocean_define_netcdf_grid( do2d(av,i), found,  &
+                                                        grid_x, grid_y, grid_z )
+                      ENDIF
+!
+!--                   Check for radiation quantities
+                      IF ( .NOT. found  .AND.  radiation )  THEN
+                         CALL radiation_define_netcdf_grid( do2d(av,i), found, &
+                                                            grid_x, grid_y,    &
+                                                            grid_z )
+                      ENDIF
+                      
+!
+!--                   Check for SALSA quantities
+                      IF ( .NOT. found  .AND.  salsa )  THEN
+                         CALL salsa_define_netcdf_grid( do2d(av,i), found,     &
+                                                        grid_x, grid_y, grid_z )
+                      ENDIF                         
+
+!
+!--                   Check for gust module quantities
+                      IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                         CALL gust_define_netcdf_grid( do2d(av,i), found,      &
+                                                       grid_x, grid_y, grid_z )
+                      ENDIF
+
+!
+!--                   Check for chemistry quantities
+                      IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                         CALL chem_define_netcdf_grid( do2d(av,i), found,      &
+                                                       grid_x, grid_y,         &
+                                                       grid_z )
+                      ENDIF
+
+!
+!--                   Check for user-defined quantities
+                      IF ( .NOT. found )  THEN
+                         CALL user_define_netcdf_grid( do2d(av,i), found,      &
+                                                       grid_x, grid_y, grid_z )
+                      ENDIF
+
+                      IF ( .NOT. found )  THEN
+                         WRITE ( message_string, * ) 'no grid defined for',    &
+                                                ' variable ', TRIM( do2d(av,i) )
+                         CALL message( 'define_netcdf_header', 'PA0244',       &
+                                       0, 1, 0, 6, 0 )
+                      ENDIF
+
+                END SELECT
+
+!
+!--             Select the respective dimension ids
+                IF ( grid_x == 'x' )  THEN
+                   id_x = id_dim_x_xz(av)
+                ELSEIF ( grid_x == 'xu' )  THEN
+                   id_x = id_dim_xu_xz(av)
+                ENDIF
+
+                IF ( grid_y == 'y' )  THEN
+                   id_y = id_dim_y_xz(av)
+                ELSEIF ( grid_y == 'yv' )  THEN
+                   id_y = id_dim_yv_xz(av)
+                ENDIF
+
+                IF ( grid_z == 'zu' )  THEN
+                   id_z = id_dim_zu_xz(av)
+                ELSEIF ( grid_z == 'zw' )  THEN
+                   id_z = id_dim_zw_xz(av)
+                ELSEIF ( grid_z == 'zs' )  THEN
+                   id_z = id_dim_zs_xz(av)
+                ENDIF
+
+!
+!--             Define the grid
+                CALL netcdf_create_var( id_set_xz(av), (/ id_x, id_y, id_z,    &
+                                        id_dim_time_xz(av) /), do2d(av,i),     &
+                                        nc_precision(2), id_var_do2d(av,i),    &
+                                        TRIM( do2d_unit(av,i) ), do2d(av,i),   &
+                                        159, 160, 355, .TRUE. )
+
+#if defined( __netcdf4_parallel )
+
+                IF ( netcdf_data_format > 4 )  THEN
+!
+!--                Set no fill for every variable to increase performance.
+                   nc_stat = NF90_DEF_VAR_FILL( id_set_xz(av),     &
+                                                id_var_do2d(av,i), &
+                                                1, 0 )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 534 )
+!
+!--                Set independent io operations for parallel io. Collective io
+!--                is only allowed in case of a 1d-decomposition along x,
+!--                because otherwise, not all PEs have output data.
+                   IF ( npey == 1 )  THEN
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_xz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+                   ELSE
+!
+!--                   Test simulations showed that the output of cross sections
+!--                   by all PEs in data_output_2d using NF90_COLLECTIVE is 
+!--                   faster than the output by the first row of PEs in
+!--                   x-direction using NF90_INDEPENDENT.
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_xz(av),    & 
+                                                    id_var_do2d(av,i), &
+                                                    NF90_COLLECTIVE )
+!                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_xz(av),     &
+!                                                     id_var_do2d(av,i), &
+!                                                     NF90_INDEPENDENT )
+                   ENDIF
+                   CALL netcdf_handle_error( 'netcdf_define_header', 449 )
+                ENDIF
+#endif
+                var_list = TRIM( var_list ) // TRIM( do2d(av,i) ) // ';'
+
+             ENDIF
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       No arrays to output. Close the netcdf file and return.
+          IF ( i == 1 )  RETURN
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs and by combine_plot_fields)
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 161 )
+
+!
+!--       Set general no fill, otherwise the performance drops significantly for
+!--       parallel output.
+          nc_stat = NF90_SET_FILL( id_set_xz(av), NF90_NOFILL, oldmode )
+          CALL netcdf_handle_error( 'netcdf_define_header', 530 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_xz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 162 )
+
+!
+!--       These data are only written by PE0 for parallel output to increase
+!--       the performance.
+          IF ( myid == 0  .OR.  netcdf_data_format < 5 )  THEN
+
+!
+!--          Write axis data: y_xz, x, zu, zw
+             ALLOCATE( netcdf_data(1:ns) )
+
+!
+!--          Write y_xz data (shifted by +dy/2)
+             DO  i = 1, ns
+                IF( section(i,2) == -1 )  THEN
+                   netcdf_data(i) = -1.0_wp  ! section averaged along y
+                ELSE
+                   netcdf_data(i) = ( section(i,2) + 0.5_wp ) * dy
+                ENDIF
+             ENDDO
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_y_xz(av), &
+                                     netcdf_data, start = (/ 1 /),   &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 163 )
+
+!
+!--          Write yv_xz data
+             DO  i = 1, ns
+                IF( section(i,2) == -1 )  THEN
+                   netcdf_data(i) = -1.0_wp  ! section averaged along y
+                ELSE
+                   netcdf_data(i) = section(i,2) * dy
+                ENDIF
+             ENDDO
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_yv_xz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 375 )
+
+!
+!--          Write gridpoint number data
+             netcdf_data(1:ns) = section(1:ns,2)
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_ind_y_xz(av), &
+                                     netcdf_data, start = (/ 1 /),       &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 164 )
+
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write data for x (shifted by +dx/2) and xu axis
+             ALLOCATE( netcdf_data(0:nx) )
+
+             DO  i = 0, nx
+                netcdf_data(i) = ( i + 0.5_wp ) * dx
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_x_xz(av), &
+                                     netcdf_data, start = (/ 1 /),   &
+                                     count = (/ nx+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 165 )
+
+             DO  i = 0, nx
+                netcdf_data(i) = i * dx
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_xu_xz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nx+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 377 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write zu and zw data (vertical axes)
+             ALLOCATE( netcdf_data(0:nz+1) )
+
+             netcdf_data(0:nz+1) = zu(nzb:nzt+1)
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_zu_xz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nz+2 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 166 )
+
+             netcdf_data(0:nz+1) = zw(nzb:nzt+1)
+             nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_zw_xz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nz+2 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 167 )
+
+!
+!--          Write zs data
+             IF ( land_surface )  THEN
+                netcdf_data(0:nzs-1) = - zs(nzb_soil:nzt_soil)
+                nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_zs_xz(av), &
+                                        netcdf_data(0:nzs), start = (/ 1 /),    &
+                                        count = (/ nzt_soil-nzb_soil+1 /) )
+               CALL netcdf_handle_error( 'netcdf_define_header', 548 )
+             ENDIF
+
+             DEALLOCATE( netcdf_data )
+!
+!--          Write UTM coordinates
+             IF ( init_model%rotation_angle == 0.0_wp )  THEN
+!
+!--             1D in case of no rotation
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+!
+!--             x coordinates
+                ALLOCATE( netcdf_data(0:nx) )
+                DO  k = 0, 2
+!               
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_x = 0.5
+!               
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_x = 0.0
+!               
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_x = 0.5
+                   ENDIF
+                
+                   DO  i = 0, nx
+                     netcdf_data(i) = init_model%origin_x            &
+                                    + cos_ra * ( i + shift_x ) * dx
+                   ENDDO
+                
+                   nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_eutm_xz(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ nx+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+!
+!--             y coordinates
+                ALLOCATE( netcdf_data(1:ns) )
+                DO  k = 0, 2
+!
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_y = 0.5
+!
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_y = 0.5
+!
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_y = 0.0
+                   ENDIF
+
+                   DO  i = 1, ns
+                      IF( section(i,2) == -1 )  THEN
+                         netcdf_data(i) = -1.0_wp  ! section averaged along y
+                      ELSE
+                         netcdf_data(i) = init_model%origin_y &
+                                     + cos_ra * ( section(i,2) + shift_y ) * dy
+                      ENDIF
+                   ENDDO
+
+                   nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_nutm_xz(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ ns /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+
+             ELSE
+!
+!--             2D in case of rotation
+                ALLOCATE( netcdf_data_2d(0:nx,1:ns) )
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+                sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+                
+                DO  k = 0, 2
+!               
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_x = 0.5 ; shift_y = 0.5
+!                  
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_x = 0.0 ; shift_y = 0.5
+!                  
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_x = 0.5 ; shift_y = 0.0
+                   ENDIF
+
+                   DO  j = 1, ns
+                      IF( section(j,2) == -1 )  THEN
+                         netcdf_data_2d(:,j) = -1.0_wp  ! section averaged along y
+                      ELSE
+                         DO  i = 0, nx
+                            netcdf_data_2d(i,j) = init_model%origin_x          &
+                                    + cos_ra * ( i + shift_x ) * dx            &
+                                    + sin_ra * ( section(j,2) + shift_y ) * dy
+                         ENDDO
+                      ENDIF
+                   ENDDO
+                   
+                   nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_eutm_xz(av,k),  &
+                                           netcdf_data_2d, start = (/ 1, 1 /),   &
+                                           count = (/ nx+1, ns /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+                   
+                   DO  j = 1, ns
+                      IF( section(j,2) == -1 )  THEN
+                         netcdf_data_2d(:,j) = -1.0_wp  ! section averaged along y
+                      ELSE
+                         DO  i = 0, nx
+                            netcdf_data_2d(i,j) = init_model%origin_y          &
+                                    - sin_ra * ( i + shift_x ) * dx            &
+                                    + cos_ra * ( section(j,2) + shift_y ) * dy
+                         ENDDO
+                      ENDIF
+                   ENDDO
+                   
+                   nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_nutm_xz(av,k),  &
+                                           netcdf_data_2d, start = (/ 1, 1 /),   &
+                                           count = (/ nx+1, ns /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+                
+                ENDDO
+                DEALLOCATE( netcdf_data_2d )
+             ENDIF
+!
+!--          Write lon and lat data
+             ALLOCATE( lat(0:nx,1:ns) )
+             ALLOCATE( lon(0:nx,1:ns) )
+             cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+             sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+             DO  k = 0, 2
+!               
+!--             Scalar grid points
+                IF ( k == 0 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.5
+!               
+!--             u grid points
+                ELSEIF ( k == 1 )  THEN
+                   shift_x = 0.0 ; shift_y = 0.5
+!               
+!--             v grid points
+                ELSEIF ( k == 2 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.0
+                ENDIF
+
+                DO  j = 1, ns
+                   IF( section(j,2) == -1 )  THEN
+                      lat(:,j) = -90.0_wp  ! section averaged along y
+                      lon(:,j) = -180.0_wp  ! section averaged along y
+                   ELSE
+                      DO  i = 0, nx
+                         eutm = init_model%origin_x            &
+                              + cos_ra * ( i + shift_x ) * dx  &
+                              + sin_ra * ( section(j,2) + shift_y ) * dy
+                         nutm = init_model%origin_y            &
+                              - sin_ra * ( i + shift_x ) * dx  &
+                              + cos_ra * ( section(j,2) + shift_y ) * dy
+
+                         CALL  convert_utm_to_geographic( crs_list,          &
+                                                          eutm, nutm,        &
+                                                          lon(i,j), lat(i,j) )
+                      ENDDO
+                   ENDIF
+                ENDDO
+
+                nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_lon_xz(av,k), &
+                                     lon, start = (/ 1, 1 /),       &
+                                     count = (/ nx+1, ns /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_lat_xz(av,k), &
+                                     lat, start = (/ 1, 1 /),       &
+                                     count = (/ nx+1, ns /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+             ENDDO
+
+             DEALLOCATE( lat )
+             DEALLOCATE( lon )
+
+          ENDIF
+
+
+       CASE ( 'xz_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_xz(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 168 )
+
+          var_list = ';'
+          i = 1
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+             IF ( INDEX( do2d(av,i), 'xz' ) /= 0 )  THEN
+                var_list = TRIM( var_list ) // TRIM( do2d(av,i) ) // ';'
+             ENDIF
+             i = i + 1
+          ENDDO
+
+          IF ( av == 0 )  THEN
+             var = '(xz)'
+          ELSE
+             var = '(xz_av)'
+          ENDIF
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for cross-sections ' //           &
+                              TRIM( var ) // ' from previous run found,' //  &
+                              '&but this file cannot be extended due to' //  &
+                              ' variable mismatch.' //                       &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Calculate the number of current sections
+          ns = 1
+          DO WHILE ( section(ns,2) /= -9999  .AND.  ns <= 100 )
+             ns = ns + 1
+          ENDDO
+          ns = ns - 1
+
+!
+!--       Get and compare the number of vertical cross sections
+          nc_stat = NF90_INQ_VARID( id_set_xz(av), 'y_xz', id_var_y_xz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 169 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_xz(av), id_var_y_xz(av), &
+                                           dimids = id_dim_y_xz_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 170 )
+          id_dim_y_xz(av) = id_dim_y_xz_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_xz(av), id_dim_y_xz(av), &
+                                            len = ns_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 171 )
+
+          IF ( ns /= ns_old )  THEN
+             message_string = 'netCDF file for cross-sections ' //          &
+                              TRIM( var ) // ' from previous run found,' // &
+                              '&but this file cannot be extended due to' // &
+                              ' mismatch in number of' //                   & 
+                              ' cross sections.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get and compare the heights of the cross sections
+          ALLOCATE( netcdf_data(1:ns_old) )
+
+          nc_stat = NF90_GET_VAR( id_set_xz(av), id_var_y_xz(av), netcdf_data )
+          CALL netcdf_handle_error( 'netcdf_define_header', 172 )
+
+          DO  i = 1, ns
+             IF ( section(i,2) /= -1 )  THEN
+                IF ( ( ( section(i,2) + 0.5 ) * dy ) /= netcdf_data(i) )  THEN
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
+                                                                 0, 1, 0, 6, 0 )
+                   extend = .FALSE.
+                   RETURN
+                ENDIF
+             ELSE
+                IF ( -1.0_wp /= netcdf_data(i) )  THEN
+                   message_string = 'netCDF file for cross-sections ' //       &
+                               TRIM( var ) // ' from previous run found,' //   &
+                               ' but this file cannot be extended' //          &
+                               ' due to mismatch in cross' //                  &
+                               ' section levels.' //                           &
+                               ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
+                                                                 0, 1, 0, 6, 0 )
+                   extend = .FALSE.
+                   RETURN
+                ENDIF
+             ENDIF
+          ENDDO
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is do2d..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_xz(av), 'time', id_var_time_xz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 173 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_xz(av), id_var_time_xz(av), &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 174 )
+          id_dim_time_xz(av) = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_xz(av), id_dim_time_xz(av), &
+                                            len = ntime_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 175 )
+
+!
+!--       For non-parallel output use the last output time level of the netcdf
+!--       file because the time dimension is unlimited. In case of parallel
+!--       output the variable ntime_count could get the value of 9*10E36 because
+!--       the time dimension is limited.
+          IF ( netcdf_data_format < 5 ) do2d_xz_time_count(av) = ntime_count
+
+          nc_stat = NF90_GET_VAR( id_set_xz(av), id_var_time_xz(av),           &
+                                  last_time_coordinate,                        &
+                                  start = (/ do2d_xz_time_count(av) /),        &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 176 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for cross sections ' //             &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 )
+             do2d_xz_time_count(av) = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+          IF ( netcdf_data_format > 4 )  THEN
+!
+!--          Check if the needed number of output time levels is increased
+!--          compared to the number of time levels in the existing file.
+             IF ( ntdim_2d_xz(av) > ntime_count )  THEN
+                message_string = 'netCDF file for cross sections ' // &
+                                 TRIM( var ) // ' from previous run found,' // &
+                                 '&but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
+                                 'een increased compared to the previous s' // &
+                                 'imulation.' //                               &
+                                 '&New file is created instead.'
+                CALL message( 'define_netcdf_header', 'PA0390', 0, 1, 0, 6, 0 )
+                do2d_xz_time_count(av) = 0
+                extend = .FALSE.
+!
+!--             Recalculate the needed time levels for the new file.
+                IF ( av == 0 )  THEN
+                   ntdim_2d_xz(0) = CEILING(                            &
+                           ( end_time - MAX( skip_time_do2d_xz,         &
+                                             simulated_time_at_begin )  &
+                           ) / dt_do2d_xz )
+                   IF ( do2d_at_begin )  ntdim_2d_xz(0) = ntdim_2d_xz(0) + 1
+                ELSE
+                   ntdim_2d_xz(1) = CEILING(                            &
+                           ( end_time - MAX( skip_time_data_output_av,  &
+                                             simulated_time_at_begin )  &
+                           ) / dt_data_output_av )
+                ENDIF
+                RETURN
+             ENDIF
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+             IF ( INDEX( do2d(av,i), 'xz' ) /= 0 )  THEN
+                nc_stat = NF90_INQ_VARID( id_set_xz(av), do2d(av,i), &
+                                          id_var_do2d(av,i) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 177 )
+#if defined( __netcdf4_parallel )
+!
+!--             Set independent io operations for parallel io. Collective io
+!--             is only allowed in case of a 1d-decomposition along x, because
+!--             otherwise, not all PEs have output data.
+                IF ( netcdf_data_format > 4 )  THEN
+                   IF ( npey == 1 )  THEN
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_xz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+                   ELSE
+!
+!--                   Test simulations showed that the output of cross sections
+!--                   by all PEs in data_output_2d using NF90_COLLECTIVE is 
+!--                   faster than the output by the first row of PEs in
+!--                   x-direction using NF90_INDEPENDENT.
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_xz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+!                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_xz(av),     &
+!                                                     id_var_do2d(av,i), &
+!                                                     NF90_INDEPENDENT )
+                   ENDIF
+                   CALL netcdf_handle_error( 'netcdf_define_header', 455 )
+                ENDIF
+#endif
+             ENDIF
+             i = i + 1
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_REDEF( id_set_xz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 433 )
+          nc_stat = NF90_PUT_ATT( id_set_xz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 178 )
+          nc_stat = NF90_ENDDEF( id_set_xz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 434 )
+          message_string = 'netCDF file for cross-sections ' //                &
+                            TRIM( var ) // ' from previous run found.' //      &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 )
+
+
+       CASE ( 'yz_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'Conventions',   &
+                                  'COARDS' )
+          CALL netcdf_handle_error( 'netcdf_define_header', 179 )
+
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')')         &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 180 )
+          IF ( av == 1 )  THEN
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval
+             nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'time_avg',   &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 180 )
+          ENDIF
+
+!
+!--       Define time coordinate for yz sections.
+!--       For parallel output the time dimensions has to be limited, otherwise
+!--       the performance drops significantly.
+          IF ( netcdf_data_format < 5 )  THEN
+             CALL netcdf_create_dim( id_set_yz(av), 'time', NF90_UNLIMITED,    &
+                                     id_dim_time_yz(av), 181 )
+          ELSE
+             CALL netcdf_create_dim( id_set_yz(av), 'time', ntdim_2d_yz(av),   &
+                                     id_dim_time_yz(av), 526 )
+          ENDIF
+
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_time_yz(av) /),     &
+                                  'time', NF90_DOUBLE, id_var_time_yz(av),     &
+                                  'seconds', '', 182, 183, 000 )
+!
+!--       Define the spatial dimensions and coordinates for yz-sections.
+!--       First, determine the number of vertical sections to be written.
+          IF ( section(1,3) == -9999 )  THEN
+             RETURN
+          ELSE
+             ns = 1
+             DO WHILE ( section(ns,3) /= -9999  .AND.  ns <= 100 )
+                ns = ns + 1
+             ENDDO
+             ns = ns - 1
+          ENDIF
+
+!
+!--       Define x axis (for scalar position)
+          CALL netcdf_create_dim( id_set_yz(av), 'x_yz', ns, id_dim_x_yz(av),  &
+                                  184 )
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_x_yz(av) /),        &
+                                  'x_yz', NF90_DOUBLE, id_var_x_yz(av),        &
+                                  'meters', '', 185, 186, 000 )
+!
+!--       Define x axis (for u position)
+          CALL netcdf_create_dim( id_set_yz(av), 'xu_yz', ns,                  &
+                                  id_dim_xu_yz(av), 377 )
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_xu_yz(av) /),       &
+                                  'xu_yz', NF90_DOUBLE, id_var_xu_yz(av),      &
+                                  'meters', '', 378, 379, 000 )
+!
+!--       Define a variable to store the layer indices of the vertical cross
+!--       sections
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_x_yz(av) /),        &
+                                  'ind_x_yz', NF90_DOUBLE,                     &
+                                  id_var_ind_x_yz(av), 'gridpoints', '', 187,  &
+                                  188, 000 )
+!
+!--       Define y-axis (for scalar position)
+          CALL netcdf_create_dim( id_set_yz(av), 'y', ny+1, id_dim_y_yz(av),   &
+                                  189 )
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_y_yz(av) /), 'y',   &
+                                  NF90_DOUBLE, id_var_y_yz(av), 'meters', '',  &
+                                  190, 191, 000 )
+!
+!--       Define y-axis (for v position)
+          CALL netcdf_create_dim( id_set_yz(av), 'yv', ny+1, id_dim_yv_yz(av), &
+                                  380 )
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_yv_yz(av) /), 'yv', &
+                                  NF90_DOUBLE, id_var_yv_yz(av), 'meters', '', &
+                                  381, 382, 000 )
+!
+!--       Define the two z-axes (zu and zw)
+          CALL netcdf_create_dim( id_set_yz(av), 'zu', nz+2, id_dim_zu_yz(av), &
+                                  192 )
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_zu_yz(av) /), 'zu', &
+                                  NF90_DOUBLE, id_var_zu_yz(av), 'meters', '', &
+                                  193, 194, 000 )
+
+          CALL netcdf_create_dim( id_set_yz(av), 'zw', nz+2, id_dim_zw_yz(av), &
+                                  195 )
+          CALL netcdf_create_var( id_set_yz(av), (/ id_dim_zw_yz(av) /), 'zw', &
+                                  NF90_DOUBLE, id_var_zw_yz(av), 'meters', '', &
+                                  196, 197, 000 )
+!
+!--       Define UTM coordinates
+          IF ( init_model%rotation_angle == 0.0_wp )  THEN
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_x_yz(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_yz(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_y_yz(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_yz(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_xu_yz(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_yz(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_y_yz(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_yz(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_x_yz(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_yz(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_yv_yz(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_yz(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ELSE
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_x_yz(av), id_dim_y_yz(av) /),      &
+                                 'E_UTM', NF90_DOUBLE, id_var_eutm_yz(av,0),  &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_x_yz(av), id_dim_y_yz(av) /),      &
+                                 'N_UTM', NF90_DOUBLE, id_var_nutm_yz(av,0),  &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_xu_yz(av), id_dim_y_yz(av) /),     &
+                                 'Eu_UTM', NF90_DOUBLE, id_var_eutm_yz(av,1), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_xu_yz(av), id_dim_y_yz(av) /),     &
+                                 'Nu_UTM', NF90_DOUBLE, id_var_nutm_yz(av,1), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_x_yz(av), id_dim_yv_yz(av) /),     &
+                                 'Ev_UTM', NF90_DOUBLE, id_var_eutm_yz(av,2), &
+                                 'm', 'projection_x_coordinate', 000, 000, 000 )
+             CALL netcdf_create_var( id_set_yz(av), &
+                                 (/ id_dim_x_yz(av), id_dim_yv_yz(av) /),     &
+                                 'Nv_UTM', NF90_DOUBLE, id_var_nutm_yz(av,2), &
+                                 'm', 'projection_y_coordinate', 000, 000, 000 )
+          ENDIF
+!
+!--       Define geographic coordinates
+          CALL netcdf_create_var( id_set_yz(av), &
+                              (/ id_dim_x_yz(av), id_dim_y_yz(av) /),      &
+                              'lon', NF90_DOUBLE, id_var_lon_yz(av,0),  &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_yz(av), &
+                              (/ id_dim_x_yz(av), id_dim_y_yz(av) /),      &
+                              'lat', NF90_DOUBLE, id_var_lat_yz(av,0),  &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_yz(av), &
+                              (/ id_dim_xu_yz(av), id_dim_y_yz(av) /),     &
+                              'lonu', NF90_DOUBLE, id_var_lon_yz(av,1), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_yz(av), &
+                              (/ id_dim_xu_yz(av), id_dim_y_yz(av) /),     &
+                              'latu', NF90_DOUBLE, id_var_lat_yz(av,1), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_yz(av), &
+                              (/ id_dim_x_yz(av), id_dim_yv_yz(av) /),     &
+                              'lonv', NF90_DOUBLE, id_var_lon_yz(av,2), &
+                              'degrees_east', 'longitude', 000, 000, 000 )
+          CALL netcdf_create_var( id_set_yz(av), &
+                              (/ id_dim_x_yz(av), id_dim_yv_yz(av) /),     &
+                              'latv', NF90_DOUBLE, id_var_lat_yz(av,2), &
+                              'degrees_north', 'latitude', 000, 000, 000 )
+!
+!--       Define coordinate-reference system
+          CALL netcdf_create_crs( id_set_yz(av), 000 )
+
+          IF ( land_surface )  THEN
+
+             CALL netcdf_create_dim( id_set_yz(av), 'zs', nzs,                 &
+                                     id_dim_zs_yz(av), 545 )
+             CALL netcdf_create_var( id_set_yz(av), (/ id_dim_zs_yz(av) /),    &
+                                     'zs', NF90_DOUBLE, id_var_zs_yz(av),      &
+                                     'meters', '', 546, 547, 000 )
+
+          ENDIF
+
+!
+!--       Define the variables
+          var_list = ';'
+          i = 1
+
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+
+             IF ( INDEX( do2d(av,i), 'yz' ) /= 0 )  THEN
+
+!
+!--             Check for the grid
+                found = .FALSE.
+                SELECT CASE ( do2d(av,i) )
+!
+!--                Most variables are defined on the zu grid
+                   CASE ( 'e_yz', 'nc_yz', 'nr_yz', 'p_yz', 'pc_yz',           &
+                          'pr_yz','prr_yz', 'q_yz', 'qc_yz', 'ql_yz',          &
+                          'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qr_yz', 'qv_yz',  &
+                          's_yz',                                              &
+                          'theta_yz', 'thetal_yz', 'thetav_yz' )
+
+                      grid_x = 'x'
+                      grid_y = 'y'
+                      grid_z = 'zu'
+!
+!--                u grid
+                   CASE ( 'u_yz' )
+
+                      grid_x = 'xu'
+                      grid_y = 'y'
+                      grid_z = 'zu'
+!
+!--                v grid
+                   CASE ( 'v_yz' )
+
+                      grid_x = 'x'
+                      grid_y = 'yv'
+                      grid_z = 'zu'
+!
+!--                w grid
+                   CASE ( 'w_yz' )
+
+                      grid_x = 'x'
+                      grid_y = 'y'
+                      grid_z = 'zw'
+
+
+                   CASE DEFAULT
+!
+!--                   Check for land surface quantities
+                      IF ( land_surface )  THEN
+                         CALL lsm_define_netcdf_grid( do2d(av,i), found,       &
+                                                      grid_x, grid_y, grid_z )
+                      ENDIF
+
+                      IF ( .NOT. found )  THEN
+                         CALL tcm_define_netcdf_grid( do2d(av,i), found,       &
+                                                      grid_x, grid_y, grid_z )
+                      ENDIF
+
+!
+!--                   Check for ocean quantities
+                      IF ( .NOT. found  .AND.  ocean_mode )  THEN
+                         CALL ocean_define_netcdf_grid( do2d(av,i), found,     &
+                                                       grid_x, grid_y, grid_z )
+                      ENDIF
+!
+!--                   Check for radiation quantities
+                      IF ( .NOT. found  .AND.  radiation )  THEN
+                         CALL radiation_define_netcdf_grid( do2d(av,i), found, &
+                                                            grid_x, grid_y,    &
+                                                            grid_z )
+                      ENDIF
+                      
+!
+!--                   Check for SALSA quantities
+                      IF ( .NOT. found  .AND.  salsa )  THEN
+                         CALL salsa_define_netcdf_grid( do2d(av,i), found,     &
+                                                        grid_x, grid_y, grid_z )
+                      ENDIF                           
+!
+!--                   Check for gust module quantities
+                      IF ( .NOT. found  .AND.  gust_module_enabled )  THEN
+                         CALL gust_define_netcdf_grid( do2d(av,i), found,      &
+                                                       grid_x, grid_y, grid_z )
+                      ENDIF
+
+!
+!--                   Check for chemistry quantities
+                      IF ( .NOT. found  .AND.  air_chemistry )  THEN
+                         CALL chem_define_netcdf_grid( do2d(av,i), found,      &
+                                                       grid_x, grid_y,         &
+                                                       grid_z )
+                      ENDIF
+!
+!--                   Check for user-defined quantities
+                      IF ( .NOT. found )  THEN
+                         CALL user_define_netcdf_grid( do2d(av,i), found,      &
+                                                       grid_x, grid_y, grid_z )
+                      ENDIF
+
+                      IF ( .NOT. found )  THEN
+                         WRITE ( message_string, * ) 'no grid defined for',    &
+                                                ' variable ', TRIM( do2d(av,i) )
+                         CALL message( 'define_netcdf_header', 'PA0244',       &
+                                       0, 1, 0, 6, 0 )
+                      ENDIF
+
+                END SELECT
+
+!
+!--             Select the respective dimension ids
+                IF ( grid_x == 'x' )  THEN
+                   id_x = id_dim_x_yz(av)
+                ELSEIF ( grid_x == 'xu' )  THEN
+                   id_x = id_dim_xu_yz(av)
+                ENDIF
+
+                IF ( grid_y == 'y' )  THEN
+                   id_y = id_dim_y_yz(av)
+                ELSEIF ( grid_y == 'yv' )  THEN
+                   id_y = id_dim_yv_yz(av)
+                ENDIF
+
+                IF ( grid_z == 'zu' )  THEN
+                   id_z = id_dim_zu_yz(av)
+                ELSEIF ( grid_z == 'zw' )  THEN
+                   id_z = id_dim_zw_yz(av)
+                ELSEIF ( grid_z == 'zs' )  THEN
+                   id_z = id_dim_zs_yz(av)
+                ENDIF
+
+!
+!--             Define the grid
+                CALL netcdf_create_var( id_set_yz(av),  (/ id_x, id_y, id_z,   &
+                                        id_dim_time_yz(av) /), do2d(av,i),     &
+                                        nc_precision(3), id_var_do2d(av,i),    &
+                                        TRIM( do2d_unit(av,i) ), do2d(av,i),   &
+                                        198, 199, 356, .TRUE. )
+
+#if defined( __netcdf4_parallel )
+                IF ( netcdf_data_format > 4 )  THEN
+!
+!--                Set no fill for every variable to increase performance.
+                   nc_stat = NF90_DEF_VAR_FILL( id_set_yz(av),     &
+                                                id_var_do2d(av,i), &
+                                                1, 0 )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 535 )
+!
+!--                Set independent io operations for parallel io. Collective io
+!--                is only allowed in case of a 1d-decomposition along y,
+!--                because otherwise, not all PEs have output data.
+                   IF ( npex == 1 )  THEN
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_yz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+                   ELSE
+!
+!--                   Test simulations showed that the output of cross sections
+!--                   by all PEs in data_output_2d using NF90_COLLECTIVE is 
+!--                   faster than the output by the first row of PEs in
+!--                   y-direction using NF90_INDEPENDENT.
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_yz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+!                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_yz(av),     &
+!                                                     id_var_do2d(av,i), &
+!                                                     NF90_INDEPENDENT )
+                   ENDIF
+                   CALL netcdf_handle_error( 'netcdf_define_header', 450 )
+                ENDIF
+#endif
+                var_list = TRIM( var_list ) // TRIM( do2d(av,i) ) // ';'
+
+             ENDIF
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       No arrays to output. Close the netcdf file and return.
+          IF ( i == 1 )  RETURN
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs and by combine_plot_fields)
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 200 )
+
+!
+!--       Set general no fill, otherwise the performance drops significantly for
+!--       parallel output.
+          nc_stat = NF90_SET_FILL( id_set_yz(av), NF90_NOFILL, oldmode )
+          CALL netcdf_handle_error( 'netcdf_define_header', 531 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_yz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 201 )
+
+!
+!--       These data are only written by PE0 for parallel output to increase
+!--       the performance.
+          IF ( myid == 0  .OR.  netcdf_data_format < 5 )  THEN
+
+!
+!--          Write axis data: x_yz, y, zu, zw
+             ALLOCATE( netcdf_data(1:ns) )
+
+!
+!--          Write x_yz data (shifted by +dx/2)
+             DO  i = 1, ns
+                IF( section(i,3) == -1 )  THEN
+                   netcdf_data(i) = -1.0_wp  ! section averaged along x
+                ELSE
+                   netcdf_data(i) = ( section(i,3) + 0.5_wp ) * dx
+                ENDIF
+             ENDDO
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_x_yz(av), &
+                                     netcdf_data, start = (/ 1 /),   &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 202 )
+
+!
+!--          Write x_yz data (xu grid)
+             DO  i = 1, ns
+                IF( section(i,3) == -1 )  THEN
+                   netcdf_data(i) = -1.0_wp  ! section averaged along x
+                ELSE
+                   netcdf_data(i) = section(i,3) * dx
+                ENDIF
+             ENDDO
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_xu_yz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 383 )
+
+!
+!--          Write gridpoint number data
+             netcdf_data(1:ns) = section(1:ns,3)
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_ind_x_yz(av), &
+                                     netcdf_data, start = (/ 1 /),       &
+                                     count = (/ ns /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 203 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write data for y (shifted by +dy/2) and yv axis
+             ALLOCATE( netcdf_data(0:ny) )
+
+             DO  j = 0, ny
+                netcdf_data(j) = ( j + 0.5_wp ) * dy
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_y_yz(av), &
+                                     netcdf_data, start = (/ 1 /),   &
+                                     count = (/ ny+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 204 )
+
+             DO  j = 0, ny
+                netcdf_data(j) = j * dy
+             ENDDO
+
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_yv_yz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ ny+1 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 384 )
+
+             DEALLOCATE( netcdf_data )
+
+!
+!--          Write zu and zw data (vertical axes)
+             ALLOCATE( netcdf_data(0:nz+1) )
+
+             netcdf_data(0:nz+1) = zu(nzb:nzt+1)
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_zu_yz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nz+2 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 205 )
+
+             netcdf_data(0:nz+1) = zw(nzb:nzt+1)
+             nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_zw_yz(av), &
+                                     netcdf_data, start = (/ 1 /),    &
+                                     count = (/ nz+2 /) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 206 )
+
+             DEALLOCATE( netcdf_data )
+!
+!--          Write UTM coordinates
+             IF ( init_model%rotation_angle == 0.0_wp )  THEN
+!
+!--             1D in case of no rotation
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+!
+!--             x coordinates
+                ALLOCATE( netcdf_data(1:ns) )
+                DO  k = 0, 2
+!               
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_x = 0.5
+!               
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_x = 0.0
+!               
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_x = 0.5
+                   ENDIF
+                
+                   DO  i = 1, ns
+                      IF( section(i,3) == -1 )  THEN
+                         netcdf_data(i) = -1.0_wp  ! section averaged along x
+                      ELSE
+                         netcdf_data(i) = init_model%origin_x &
+                                     + cos_ra * ( section(i,3) + shift_x ) * dx
+                      ENDIF
+                   ENDDO
+                
+                   nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_eutm_yz(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ ns /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+!
+!--             y coordinates
+                ALLOCATE( netcdf_data(0:ny) )
+                DO  k = 0, 2
+!
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_y = 0.5
+!
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_y = 0.5
+!
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_y = 0.0
+                   ENDIF
+
+                   DO  i = 0, ny
+                     netcdf_data(i) = init_model%origin_y            &
+                                    + cos_ra * ( i + shift_y ) * dy
+                   ENDDO
+
+                   nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_nutm_yz(av,k),&
+                                           netcdf_data, start = (/ 1 /),   &
+                                           count = (/ ny+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                ENDDO
+                DEALLOCATE( netcdf_data )
+
+             ELSE
+!
+!--             2D in case of rotation
+                ALLOCATE( netcdf_data_2d(1:ns,0:ny) )
+                cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+                sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+                DO  k = 0, 2
+!               
+!--                Scalar grid points
+                   IF ( k == 0 )  THEN
+                      shift_x = 0.5 ; shift_y = 0.5
+!                  
+!--                u grid points
+                   ELSEIF ( k == 1 )  THEN
+                      shift_x = 0.0 ; shift_y = 0.5
+!                  
+!--                v grid points
+                   ELSEIF ( k == 2 )  THEN
+                      shift_x = 0.5 ; shift_y = 0.0
+                   ENDIF
+
+                   DO  j = 0, ny
+                      DO  i = 1, ns
+                         IF( section(i,3) == -1 )  THEN
+                            netcdf_data_2d(i,:) = -1.0_wp !section averaged along x
+                         ELSE
+                            netcdf_data_2d(i,j) = init_model%origin_x          &
+                                    + cos_ra * ( section(i,3) + shift_x ) * dx &
+                                    + sin_ra * ( j + shift_y ) * dy
+                         ENDIF
+                      ENDDO
+                   ENDDO
+                   
+                   nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_eutm_yz(av,k),  &
+                                           netcdf_data_2d, start = (/ 1, 1 /),   &
+                                           count = (/ ns, ny+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 555 )
+                   
+                   DO  j = 0, ny
+                      DO  i = 1, ns
+                         IF( section(i,3) == -1 )  THEN
+                            netcdf_data_2d(i,:) = -1.0_wp !section averaged along x
+                         ELSE
+                            netcdf_data_2d(i,j) = init_model%origin_y          &
+                                    - sin_ra * ( section(i,3) + shift_x ) * dx &
+                                    + cos_ra * ( j + shift_y ) * dy
+                         ENDIF
+                      ENDDO
+                   ENDDO
+
+                   nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_nutm_yz(av,k),  &
+                                           netcdf_data_2d, start = (/ 1, 1 /),   &
+                                           count = (/ ns, ny+1 /) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+                
+                ENDDO
+                DEALLOCATE( netcdf_data_2d )
+             ENDIF
+!
+!--          Write lon and lat data
+             ALLOCATE( lat(1:ns,0:ny) )
+             ALLOCATE( lon(1:ns,0:ny) )
+             cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp )
+             sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp )
+
+             DO  k = 0, 2
+!               
+!--             Scalar grid points
+                IF ( k == 0 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.5
+!               
+!--             u grid points
+                ELSEIF ( k == 1 )  THEN
+                   shift_x = 0.0 ; shift_y = 0.5
+!               
+!--             v grid points
+                ELSEIF ( k == 2 )  THEN
+                   shift_x = 0.5 ; shift_y = 0.0
+                ENDIF
+
+                DO  j = 0, ny
+                   DO  i = 1, ns
+                      IF( section(i,3) == -1 )  THEN
+                         lat(i,:) = -90.0_wp   ! section averaged along x
+                         lon(i,:) = -180.0_wp  ! section averaged along x
+                      ELSE
+                         eutm = init_model%origin_x            &
+                              + cos_ra * ( section(i,3) + shift_x ) * dx  &
+                              + sin_ra * ( j + shift_y ) * dy
+                         nutm = init_model%origin_y            &
+                              - sin_ra * ( section(i,3) + shift_x ) * dx  &
+                              + cos_ra * ( j + shift_y ) * dy
+
+                         CALL  convert_utm_to_geographic( crs_list,          &
+                                                          eutm, nutm,        &
+                                                          lon(i,j), lat(i,j) )
+                      ENDIF
+                   ENDDO
+                ENDDO
+
+                nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_lon_yz(av,k), &
+                                     lon, start = (/ 1, 1 /),       &
+                                     count = (/ ns, ny+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+
+                nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_lat_yz(av,k), &
+                                     lat, start = (/ 1, 1 /),       &
+                                     count = (/ ns, ny+1 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 556 )
+             ENDDO
+
+             DEALLOCATE( lat )
+             DEALLOCATE( lon )
+
+          ENDIF
+
+
+       CASE ( 'yz_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_yz(av), NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 207 )
+
+          var_list = ';'
+          i = 1
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+             IF ( INDEX( do2d(av,i), 'yz' ) /= 0 )  THEN
+                var_list = TRIM( var_list ) // TRIM( do2d(av,i) ) // ';'
+             ENDIF
+             i = i + 1
+          ENDDO
+
+          IF ( av == 0 )  THEN
+             var = '(yz)'
+          ELSE
+             var = '(yz_av)'
+          ENDIF
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for cross-sections ' //           &
+                              TRIM( var ) // ' from previous run found,' //  &
+                              '&but this file cannot be extended due to' //  &
+                              ' variable mismatch.' //                       & 
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0249', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Calculate the number of current sections
+          ns = 1
+          DO WHILE ( section(ns,3) /= -9999  .AND.  ns <= 100 )
+             ns = ns + 1
+          ENDDO
+          ns = ns - 1
+
+!
+!--       Get and compare the number of vertical cross sections
+          nc_stat = NF90_INQ_VARID( id_set_yz(av), 'x_yz', id_var_x_yz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 208 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_yz(av), id_var_x_yz(av), &
+                                           dimids = id_dim_x_yz_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 209 )
+          id_dim_x_yz(av) = id_dim_x_yz_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_yz(av), id_dim_x_yz(av), &
+                                            len = ns_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 210 )
+
+          IF ( ns /= ns_old )  THEN
+             message_string = 'netCDF file for cross-sections ' //          &
+                              TRIM( var ) // ' from previous run found,' // &
+                              '&but this file cannot be extended due to' // &
+                              ' mismatch in number of' //                   &
+                              ' cross sections.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0250', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get and compare the heights of the cross sections
+          ALLOCATE( netcdf_data(1:ns_old) )
+
+          nc_stat = NF90_GET_VAR( id_set_yz(av), id_var_x_yz(av), netcdf_data )
+          CALL netcdf_handle_error( 'netcdf_define_header', 211 )
+
+          DO  i = 1, ns
+             IF ( section(i,3) /= -1 )  THEN
+                IF ( ( ( section(i,3) + 0.5 ) * dx ) /= netcdf_data(i) )  THEN
+                   message_string = 'netCDF file for cross-sections ' //       &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended' //           &
+                              ' due to mismatch in cross' //                   &
+                              ' section levels.' //                            &
+                              ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
+                                                                 0, 1, 0, 6, 0 )
+                   extend = .FALSE.
+                   RETURN
+                ENDIF
+             ELSE
+                IF ( -1.0_wp /= netcdf_data(i) )  THEN
+                   message_string = 'netCDF file for cross-sections ' //       &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              ' but this file cannot be extended' //           &
+                              ' due to mismatch in cross' //                   &
+                              ' section levels.' //                            &
+                              ' New file is created instead.'
+                   CALL message( 'define_netcdf_header', 'PA0251',             &
+                                                                 0, 1, 0, 6, 0 )
+                   extend = .FALSE.
+                   RETURN
+                ENDIF
+             ENDIF
+          ENDDO
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is pl2d..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_yz(av), 'time', id_var_time_yz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 212 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_yz(av), id_var_time_yz(av), &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 213 )
+          id_dim_time_yz(av) = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_yz(av), id_dim_time_yz(av), &
+                                            len = ntime_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 214 )
+
+!
+!--       For non-parallel output use the last output time level of the netcdf
+!--       file because the time dimension is unlimited. In case of parallel
+!--       output the variable ntime_count could get the value of 9*10E36 because
+!--       the time dimension is limited.
+          IF ( netcdf_data_format < 5 ) do2d_yz_time_count(av) = ntime_count
+
+          nc_stat = NF90_GET_VAR( id_set_yz(av), id_var_time_yz(av),           &
+                                  last_time_coordinate,                        &
+                                  start = (/ do2d_yz_time_count(av) /),        &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 215 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for cross sections ' //             &
+                              TRIM( var ) // ' from previous run found,' //    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0252', 0, 1, 0, 6, 0 )
+             do2d_yz_time_count(av) = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+          IF ( netcdf_data_format > 4 )  THEN
+!
+!--          Check if the needed number of output time levels is increased
+!--          compared to the number of time levels in the existing file.
+             IF ( ntdim_2d_yz(av) > ntime_count )  THEN
+                message_string = 'netCDF file for cross sections ' //          &
+                                 TRIM( var ) // ' from previous run found,' // &
+                                 '&but this file cannot be extended becaus' // &
+                                 'e the number of output time levels has b' // &
+                                 'een increased compared to the previous s' // &
+                                 'imulation.' //                               &
+                                 '&New file is created instead.'
+                CALL message( 'define_netcdf_header', 'PA0391', 0, 1, 0, 6, 0 )
+                do2d_yz_time_count(av) = 0
+                extend = .FALSE.
+!
+!--             Recalculate the needed time levels for the new file.
+                IF ( av == 0 )  THEN
+                   ntdim_2d_yz(0) = CEILING(                            &
+                           ( end_time - MAX( skip_time_do2d_yz,         &
+                                             simulated_time_at_begin )  &
+                           ) / dt_do2d_yz )
+                   IF ( do2d_at_begin )  ntdim_2d_yz(0) = ntdim_2d_yz(0) + 1
+                ELSE
+                   ntdim_2d_yz(1) = CEILING(                            &
+                           ( end_time - MAX( skip_time_data_output_av,  &
+                                             simulated_time_at_begin )  &
+                           ) / dt_data_output_av )
+                ENDIF
+                RETURN
+             ENDIF
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO WHILE ( do2d(av,i)(1:1) /= ' ' )
+             IF ( INDEX( do2d(av,i), 'yz' ) /= 0 )  THEN
+                nc_stat = NF90_INQ_VARID( id_set_yz(av), do2d(av,i), &
+                                          id_var_do2d(av,i) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 216 )
+#if defined( __netcdf4_parallel )
+!
+!--             Set independent io operations for parallel io. Collective io
+!--             is only allowed in case of a 1d-decomposition along y, because
+!--             otherwise, not all PEs have output data.
+                IF ( netcdf_data_format > 4 )  THEN
+                   IF ( npex == 1 )  THEN
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_yz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+                   ELSE
+!
+!--                   Test simulations showed that the output of cross sections
+!--                   by all PEs in data_output_2d using NF90_COLLECTIVE is 
+!--                   faster than the output by the first row of PEs in
+!--                   y-direction using NF90_INDEPENDENT.
+                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_yz(av),     &
+                                                     id_var_do2d(av,i), &
+                                                     NF90_COLLECTIVE )
+!                      nc_stat = NF90_VAR_PAR_ACCESS( id_set_yz(av),     &
+!                                                     id_var_do2d(av,i), &
+!                                                     NF90_INDEPENDENT )
+                   ENDIF
+                   CALL netcdf_handle_error( 'netcdf_define_header', 450 )
+                ENDIF
+#endif
+             ENDIF
+             i = i + 1
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          IF ( av == 0 )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval
+          ENDIF
+          nc_stat = NF90_REDEF( id_set_yz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 435 )
+          nc_stat = NF90_PUT_ATT( id_set_yz(av), NF90_GLOBAL, 'title',         &
+                                  TRIM( run_description_header ) //            &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 217 )
+          nc_stat = NF90_ENDDEF( id_set_yz(av) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 436 )
+          message_string = 'netCDF file for cross-sections ' //                &
+                            TRIM( var ) // ' from previous run found.' //      &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0253', 0, 0, 0, 6, 0 )
+
+
+       CASE ( 'pr_new' )
+
+!
+!--       Define some global attributes of the dataset
+          IF ( averaging_interval_pr /= 0.0_wp )  THEN
+             WRITE (time_average_text,'('', '',F7.1,'' s average'')')          &
+                                                            averaging_interval_pr
+             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',          &
+                                     TRIM( run_description_header ) //         &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 218 )
+
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' ) averaging_interval_pr
+             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'time_avg',       &
+                                     TRIM( time_average_text ) )
+          ELSE
+             nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',          &
+                                     TRIM( run_description_header ) )
+          ENDIF
+          CALL netcdf_handle_error( 'netcdf_define_header', 219 )
+
+!
+!--       Write number of columns and rows of coordinate systems to be plotted
+!--       on one page to the netcdf header.
+!--       This information can be used by palmplot.
+          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL,                     &
+                                  'no_rows',                                  & 
+                                  profile_rows ) 
+          CALL netcdf_handle_error( 'netcdf_define_header', 519 )
+
+          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL,                     &
+                                  'no_columns',                               & 
+                                  profile_columns ) 
+          CALL netcdf_handle_error( 'netcdf_define_header', 520 )
+
+
+          cross_profiles_adj  = ADJUSTL( cross_profiles )
+          cross_profiles_numb = 999999
+          cross_profiles_char = ''
+
+!
+!--       Each profile defined in cross_profiles is written to an array
+!--       (cross_profiles_char). The number of the respective coordinate
+!--       system is assigned in a second array (cross_profiles_numb).
+          k = 1
+
+          DO  i = 1, crmax
+
+             IF ( TRIM( cross_profiles_adj(i) ) == ' ' )  EXIT
+             delim_old = 0
+
+             DO   j = 1, crmax
+                delim = INDEX( cross_profiles_adj(i)(delim_old+1:), ' ' )
+                IF ( delim == 1 )  EXIT
+                kk = MIN( crmax, k )
+                cross_profiles_char(kk) = cross_profiles_adj(i)(delim_old+1: &
+                                                              delim_old+delim-1)
+                cross_profiles_numb(kk) = i
+                k = k + 1
+                cross_profiles_maxi  = i
+                delim_old = delim_old + delim
+             ENDDO
+
+          ENDDO
+
+          cross_profiles_count = MIN( crmax, k-1 )
+!
+!--       Check if all profiles defined in cross_profiles are defined in 
+!--       data_output_pr. If not, they will be skipped.
+          DO  i = 1, cross_profiles_count
+             DO  j = 1, dopr_n
+
+                IF ( TRIM(cross_profiles_char(i)) == TRIM(data_output_pr(j)) ) &
+                THEN
+                   EXIT
+                ENDIF
+
+                IF ( j == dopr_n )  THEN
+                   cross_profiles_numb(i) = 999999
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO i = 1, crmax
+             IF ( cross_profiles_numb(i) == 999999 ) THEN
+                DO j = i + 1, crmax
+                   IF ( cross_profiles_numb(j) /= 999999 ) THEN
+                      cross_profiles_char(i) = cross_profiles_char(j)
+                      cross_profiles_numb(i) = cross_profiles_numb(j)
+                      cross_profiles_numb(j) = 999999
+                      EXIT
+                   ENDIF
+                ENDDO
+             ENDIF
+          ENDDO
+
+          DO i = 1, crmax-1
+             IF ( cross_profiles_numb(i + 1) == 999999 ) THEN
+                cross_profiles_count = i
+                EXIT
+             ENDIF
+          ENDDO
+!
+!--       Check if all profiles defined in data_output_pr are defined in 
+!--       cross_profiles. If not, they will be added to cross_profiles.
+          DO  i = 1, dopr_n
+             DO  j = 1, cross_profiles_count
+
+                IF ( TRIM(cross_profiles_char(j)) == TRIM(data_output_pr(i)))  &
+                THEN
+                   EXIT
+                ENDIF
+
+                IF (( j == cross_profiles_count ) .AND.                        &
+                    ( cross_profiles_count <= crmax - 1))  THEN
+                   cross_profiles_count = cross_profiles_count + 1
+                   cross_profiles_maxi  = cross_profiles_maxi  + 1
+                   cross_profiles_char(MIN( crmax, cross_profiles_count )) =   &
+                                                      TRIM( data_output_pr(i) )
+                   cross_profiles_numb(MIN( crmax, cross_profiles_count )) =   &
+                                                      cross_profiles_maxi
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          IF ( cross_profiles_count >= crmax )  THEN
+             message_string = 'It is not allowed to arrange more than '        &
+                              // '100 profiles with & cross_profiles. Apart'   &
+                              // ' from that, all profiles are saved & to '    &
+                              // 'the netCDF file.'
+             CALL message( 'define_netcdf_header', 'PA0354', 0, 0, 0, 6, 0 )
+          ENDIF
+
+!
+!--       Writing cross_profiles to netcdf header. This information can be 
+!--       used by palmplot. Each profile is separated by ",", each cross is 
+!--       separated by ";".
+          char_cross_profiles = ';'
+          id_last = 1
+          cross_profiles_count = MIN( cross_profiles_count, crmax )
+
+          DO  i = 1, cross_profiles_count
+
+             IF ( cross_profiles_numb(i) /= 999999 )  THEN
+                IF ( TRIM( char_cross_profiles ) == ';' )  THEN
+                   char_cross_profiles = TRIM( char_cross_profiles ) // &
+                                         TRIM( cross_profiles_char(i) )
+                ELSEIF ( id_last == cross_profiles_numb(i) )  THEN
+                   char_cross_profiles = TRIM( char_cross_profiles ) // &
+                                         ',' // TRIM( cross_profiles_char(i) )
+                ELSE
+                   char_cross_profiles = TRIM( char_cross_profiles ) // &
+                                         ';' // TRIM( cross_profiles_char(i) )
+                ENDIF
+                id_last = cross_profiles_numb(i)
+             ENDIF
+
+          ENDDO
+
+          char_cross_profiles = TRIM( char_cross_profiles ) // ';'
+
+          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'cross_profiles',   &
+                                  TRIM( char_cross_profiles ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 521 )
+
+!
+!--       Define time coordinate for profiles (unlimited dimension)
+          CALL netcdf_create_dim( id_set_pr, 'time', NF90_UNLIMITED,           &
+                                  id_dim_time_pr, 220 )
+          CALL netcdf_create_var( id_set_pr, (/ id_dim_time_pr /), 'time',     &
+                                  NF90_DOUBLE, id_var_time_pr, 'seconds', '',  &
+                                  221, 222, 000 )
+!
+!--       Define the variables
+          var_list = ';'
+          DO  i = 1, dopr_n
+
+             IF ( statistic_regions == 0 )  THEN
+
+!
+!--             Define the z-axes (each variable gets its own z-axis)
+                CALL netcdf_create_dim( id_set_pr,                             &
+                                        'z' // TRIM( data_output_pr(i) ),      &
+                                        nzt+2-nzb, id_dim_z_pr(i,0), 223 )
+                CALL netcdf_create_var( id_set_pr, (/ id_dim_z_pr(i,0) /),     &
+                                        'z' // TRIM( data_output_pr(i) ),      &
+                                       NF90_DOUBLE, id_var_z_pr(i,0),          &
+                                       'meters', '', 224, 225, 000 )
+!
+!--             Define the variable
+                CALL netcdf_create_var( id_set_pr, (/ id_dim_z_pr(i,0),        &
+                                        id_dim_time_pr /), data_output_pr(i),  &
+                                        nc_precision(5), id_var_dopr(i,0),     &
+                                        TRIM( dopr_unit(i) ),                  &
+                                        TRIM( data_output_pr(i) ), 226, 227,   &
+                                        228 )
+
+                var_list = TRIM( var_list ) // TRIM( data_output_pr(i) ) //  ';'
+
+             ELSE
+!
+!--             If statistic regions are defined, add suffix _SR+#SR to the
+!--             names
+                DO  j = 0, statistic_regions
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+
+!
+!--                Define the z-axes (each variable gets it own z-axis)
+                   CALL netcdf_create_dim( id_set_pr, 'z' //                   &
+                                           TRIM(data_output_pr(i)) // suffix,  &
+                                           nzt+2-nzb, id_dim_z_pr(i,j), 229 )
+                   CALL netcdf_create_var( id_set_pr, (/ id_dim_z_pr(i,j) /),  &
+                                           'z' // TRIM(data_output_pr(i)) //   &
+                                           suffix, NF90_DOUBLE,                &
+                                           id_var_z_pr(i,j), 'meters', '',     &
+                                           230, 231, 000 )
+!
+!--                Define the variable
+                   CALL netcdf_create_var( id_set_pr, (/ id_dim_z_pr(i,j),     &
+                                           id_dim_time_pr /),                  &
+                                           TRIM(data_output_pr(i)) // suffix,  &
+                                           nc_precision(5), id_var_dopr(i,j),  &
+                                           TRIM( dopr_unit(i) ),               &
+                                           TRIM( data_output_pr(i) ) //        &
+                                           ' SR ', 232, 233, 234 )
+
+                   var_list = TRIM( var_list ) // TRIM( data_output_pr(i) ) // &
+                              suffix // ';'
+
+                ENDDO
+
+             ENDIF
+
+          ENDDO
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs)
+          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'VAR_LIST', var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 235 )
+
+!
+!--       Define normalization variables (as time series)
+          DO  i = 1, dopr_norm_num
+
+             CALL netcdf_create_var( id_set_pr, (/ id_dim_time_pr /),          &
+                                     'NORM_' // TRIM( dopr_norm_names(i) ),    &
+                                     nc_precision(5), id_var_norm_dopr(i),     &
+                                     '', TRIM( dopr_norm_longnames(i) ), 236,  &
+                                     000, 237 )
+
+          ENDDO
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_pr )
+          CALL netcdf_handle_error( 'netcdf_define_header', 238 )
+
+!
+!--       Write z-axes data
+          DO  i = 1, dopr_n
+             DO  j = 0, statistic_regions
+
+                nc_stat = NF90_PUT_VAR( id_set_pr, id_var_z_pr(i,j),      &
+                                        hom(nzb:nzt+1,2,dopr_index(i),0), &
+                                        start = (/ 1 /),                  &
+                                        count = (/ nzt-nzb+2 /) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 239 )
+
+             ENDDO
+          ENDDO
+
+
+       CASE ( 'pr_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_pr, NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 240 )
+
+          var_list = ';'
+          DO  i = 1, dopr_n
+
+             IF ( statistic_regions == 0 )  THEN
+                var_list = TRIM( var_list ) // TRIM( data_output_pr(i) ) // ';'
+             ELSE
+                DO  j = 0, statistic_regions
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                   var_list = TRIM( var_list ) // TRIM( data_output_pr(i) ) // &
+                              suffix // ';'
+                ENDDO
+             ENDIF
+
+          ENDDO
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for vertical profiles ' //          &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0254', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is dopr..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_pr, 'time', id_var_time_pr )
+          CALL netcdf_handle_error( 'netcdf_define_header', 241 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_pr, id_var_time_pr, &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 242 )
+          id_dim_time_pr = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_pr, id_dim_time_pr, &
+                                            len = dopr_time_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 243 )
+
+          nc_stat = NF90_GET_VAR( id_set_pr, id_var_time_pr,        &
+                                  last_time_coordinate,             &
+                                  start = (/ dopr_time_count /), &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 244 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for vertical profiles ' //          &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0255', 0, 1, 0, 6, 0 )
+             dopr_time_count = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO  i = 1, dopr_n
+ 
+             IF ( statistic_regions == 0 )  THEN
+                nc_stat = NF90_INQ_VARID( id_set_pr, data_output_pr(i),        &
+                                          id_var_dopr(i,0) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 245 )
+             ELSE
+                DO  j = 0, statistic_regions
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                   netcdf_var_name = TRIM( data_output_pr(i) ) // suffix
+                   nc_stat = NF90_INQ_VARID( id_set_pr, netcdf_var_name,       &
+                                             id_var_dopr(i,j) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 246 )
+                ENDDO
+             ENDIF
+
+          ENDDO
+
+!
+!--       Get ids of the normalization variables
+          DO  i = 1, dopr_norm_num
+             nc_stat = NF90_INQ_VARID( id_set_pr,                             &
+                                       'NORM_' // TRIM( dopr_norm_names(i) ), &
+                                       id_var_norm_dopr(i) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 247 )
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          IF ( averaging_interval_pr == 0.0_wp )  THEN
+             time_average_text = ' '
+          ELSE
+             WRITE (time_average_text, '('', '',F7.1,'' s average'')') &
+                                                            averaging_interval_pr
+          ENDIF
+          nc_stat = NF90_REDEF( id_set_pr )
+          CALL netcdf_handle_error( 'netcdf_define_header', 437 )
+          nc_stat = NF90_PUT_ATT( id_set_pr, NF90_GLOBAL, 'title',             &
+                                  TRIM( run_description_header ) //            &
+                                  TRIM( time_average_text ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 248 )
+
+          nc_stat = NF90_ENDDEF( id_set_pr )
+          CALL netcdf_handle_error( 'netcdf_define_header', 438 )
+          message_string = 'netCDF file for vertical profiles ' //             &
+                           'from previous run found.' //                       &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0256', 0, 0, 0, 6, 0 )
+
+
+       CASE ( 'ts_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title',             &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 249 )
+
+!
+!--       Define time coordinate for time series (unlimited dimension)
+          CALL netcdf_create_dim( id_set_ts, 'time', NF90_UNLIMITED,           &
+                                  id_dim_time_ts, 250 )
+          CALL netcdf_create_var( id_set_ts, (/ id_dim_time_ts /), 'time',     &
+                                  NF90_DOUBLE, id_var_time_ts, 'seconds', '',  &
+                                  251, 252, 000 )
+!
+!--       Define the variables
+          var_list = ';'
+          DO  i = 1, dots_num
+
+             IF ( statistic_regions == 0 )  THEN
+
+                CALL netcdf_create_var( id_set_ts, (/ id_dim_time_ts /),       &
+                                        dots_label(i), nc_precision(6),        &
+                                        id_var_dots(i,0),                      &
+                                        TRIM( dots_unit(i) ),                  &
+                                        TRIM( dots_label(i) ), 253, 254, 255 )
+
+                var_list = TRIM( var_list ) // TRIM( dots_label(i) ) // ';'
+
+             ELSE
+!
+!--             If statistic regions are defined, add suffix _SR+#SR to the
+!--             names
+                DO  j = 0, statistic_regions
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+
+                   CALL netcdf_create_var( id_set_ts, (/ id_dim_time_ts /),    &
+                                           TRIM( dots_label(i) ) // suffix,    &
+                                           nc_precision(6), id_var_dots(i,j),  &
+                                           TRIM( dots_unit(i) ),               &
+                                           TRIM( dots_label(i) ) // ' SR ' //  &
+                                           suffix(2:2), 256, 257, 347)
+
+                   var_list = TRIM( var_list ) // TRIM( dots_label(i) ) // &
+                              suffix // ';'
+
+                ENDDO
+
+             ENDIF
+
+          ENDDO
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs)
+          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'VAR_LIST', var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 258 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_ts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 259 )
+
+
+       CASE ( 'ts_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_ts, NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 260 )
+
+          var_list = ';'
+          i = 1
+          DO  i = 1, dots_num
+
+             IF ( statistic_regions == 0 )  THEN
+                var_list = TRIM( var_list ) // TRIM( dots_label(i) ) // ';'
+             ELSE
+                DO  j = 0, statistic_regions
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                   var_list = TRIM( var_list ) // TRIM( dots_label(i) ) //     &
+                              suffix // ';'
+                ENDDO
+             ENDIF
+
+          ENDDO
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for time series ' //                &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0257', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is dots..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_ts, 'time', id_var_time_ts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 261 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_ts, id_var_time_ts,          &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 262 )
+          id_dim_time_ts = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_ts, id_dim_time_ts,         &
+                                            len = dots_time_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 263 )
+
+          nc_stat = NF90_GET_VAR( id_set_ts, id_var_time_ts,                   &
+                                  last_time_coordinate,                        &
+                                  start = (/ dots_time_count /),               &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 264 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for time series ' //                &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0258', 0, 1, 0, 6, 0 )
+             dots_time_count = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids
+          i = 1
+          DO  i = 1, dots_num
+ 
+             IF ( statistic_regions == 0 )  THEN
+                nc_stat = NF90_INQ_VARID( id_set_ts, dots_label(i), &
+                                          id_var_dots(i,0) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 265 )
+             ELSE
+                DO  j = 0, statistic_regions
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                   netcdf_var_name = TRIM( dots_label(i) ) // suffix
+                   nc_stat = NF90_INQ_VARID( id_set_ts, netcdf_var_name, &
+                                             id_var_dots(i,j) )
+                   CALL netcdf_handle_error( 'netcdf_define_header', 266 )
+                ENDDO
+             ENDIF
+
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          nc_stat = NF90_REDEF( id_set_ts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 439 )
+          nc_stat = NF90_PUT_ATT( id_set_ts, NF90_GLOBAL, 'title',             &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 267 )
+          nc_stat = NF90_ENDDEF( id_set_ts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 440 )
+          message_string = 'netCDF file for time series ' //                   &
+                           'from previous run found.' //                       &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0259', 0, 0, 0, 6, 0 )
+
+
+       CASE ( 'sp_new' )
+
+!
+!--       Define some global attributes of the dataset
+          IF ( averaging_interval_sp /= 0.0_wp )  THEN
+             WRITE (time_average_text,'('', '',F7.1,'' s average'')')          &
+                                                            averaging_interval_sp
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title',          &
+                                     TRIM( run_description_header ) //         &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 268 )
+
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval_sp
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'time_avg', &
+                                     TRIM( time_average_text ) )
+          ELSE
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title', &
+                                     TRIM( run_description_header ) )
+          ENDIF
+          CALL netcdf_handle_error( 'netcdf_define_header', 269 )
+
+!
+!--       Define time coordinate for spectra (unlimited dimension)
+          CALL netcdf_create_dim( id_set_sp, 'time', NF90_UNLIMITED,           &
+                                  id_dim_time_sp, 270 )
+          CALL netcdf_create_var( id_set_sp, (/ id_dim_time_sp /), 'time',     &
+                                  NF90_DOUBLE, id_var_time_sp, 'seconds', '',  &
+                                  271, 272, 000 )
+!
+!--       Define the spatial dimensions and coordinates for spectra.
+!--       First, determine the number of vertical levels for which spectra
+!--       are to be output.
+          ns = 1
+          DO WHILE ( comp_spectra_level(ns) /= 999999  .AND.  ns <= 100 )
+             ns = ns + 1
+          ENDDO
+          ns = ns - 1
+
+!
+!--       Define vertical coordinate grid (zu grid)
+          CALL netcdf_create_dim( id_set_sp, 'zu_sp', ns, id_dim_zu_sp, 273 )
+          CALL netcdf_create_var( id_set_sp, (/ id_dim_zu_sp /), 'zu_sp',      &
+                                  NF90_DOUBLE, id_var_zu_sp, 'meters', '',     &
+                                  274, 275, 000 )
+!
+!--       Define vertical coordinate grid (zw grid)
+          CALL netcdf_create_dim( id_set_sp, 'zw_sp', ns, id_dim_zw_sp, 276 )
+          CALL netcdf_create_var( id_set_sp, (/ id_dim_zw_sp /), 'zw_sp',      &
+                                  NF90_DOUBLE, id_var_zw_sp, 'meters', '',     &
+                                  277, 278, 000 )
+!
+!--       Define x-axis
+          CALL netcdf_create_dim( id_set_sp, 'k_x', nx/2, id_dim_x_sp, 279 )
+          CALL netcdf_create_var( id_set_sp, (/ id_dim_x_sp /), 'k_x',         &
+                                  NF90_DOUBLE, id_var_x_sp, 'm-1', '', 280,    &
+                                  281, 000 )
+!
+!--       Define y-axis
+          CALL netcdf_create_dim( id_set_sp, 'k_y', ny/2, id_dim_y_sp, 282 )
+          CALL netcdf_create_var( id_set_sp, (/ id_dim_y_sp /), 'k_y',         &
+                                  NF90_DOUBLE, id_var_y_sp, 'm-1', '', 283,    &
+                                  284, 000 )
+!
+!--       Define the variables
+          var_list = ';'
+          i = 1
+          DO WHILE ( data_output_sp(i) /= ' '  .AND.  i <= 10 )
+!
+!--          First check for the vertical grid
+             found = .FALSE.
+             SELECT CASE ( data_output_sp(i) )
+!
+!--             Most variables are defined on the zu levels
+                CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr',   &
+                       'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv',   &
+                       'rho_sea_water', 's', 'sa', &
+                       'theta', 'thetal', 'thetav', 'u', 'v' )
+
+                   grid_z = 'zu'
+!
+!--             zw levels
+                CASE ( 'w' )
+
+                   grid_z = 'zw'
+
+                CASE DEFAULT
+!
+!--                Check for user-defined quantities (found, grid_x and grid_y
+!--                are dummies)
+                   CALL user_define_netcdf_grid( data_output_sp(i), found,     &
+                                                 grid_x, grid_y, grid_z )
+
+             END SELECT
+
+             IF ( INDEX( spectra_direction(i), 'x' ) /= 0 )  THEN
+
+!
+!--             Define the variable
+                netcdf_var_name = TRIM( data_output_sp(i) ) // '_x'
+                IF ( TRIM( grid_z ) == 'zw' )  THEN
+                   CALL netcdf_create_var( id_set_sp, (/ id_dim_x_sp,          &
+                                           id_dim_zw_sp, id_dim_time_sp /),    &
+                                           netcdf_var_name, nc_precision(7),   &
+                                           id_var_dospx(i), 'unknown',         &
+                                           netcdf_var_name, 285, 286, 287 )
+                ELSE
+                   CALL netcdf_create_var( id_set_sp, (/ id_dim_x_sp,          &
+                                           id_dim_zu_sp, id_dim_time_sp /),    &
+                                           netcdf_var_name, nc_precision(7),   &
+                                           id_var_dospx(i), 'unknown',         &
+                                           netcdf_var_name, 285, 286, 287 )
+                ENDIF
+
+                var_list = TRIM( var_list ) // TRIM( netcdf_var_name ) // ';'
+
+             ENDIF
+
+             IF ( INDEX( spectra_direction(i), 'y' ) /= 0 )  THEN
+
+!
+!--             Define the variable
+                netcdf_var_name = TRIM( data_output_sp(i) ) // '_y'
+                IF ( TRIM( grid_z ) == 'zw' )  THEN
+                   CALL netcdf_create_var( id_set_sp, (/ id_dim_y_sp,          &
+                                           id_dim_zw_sp, id_dim_time_sp /),    &
+                                           netcdf_var_name, nc_precision(7),   &
+                                           id_var_dospy(i), 'unknown',         &
+                                           netcdf_var_name, 288, 289, 290 )
+                ELSE
+                   CALL netcdf_create_var( id_set_sp, (/ id_dim_y_sp,          &
+                                           id_dim_zu_sp, id_dim_time_sp /),    &
+                                           netcdf_var_name, nc_precision(7),   &
+                                           id_var_dospy(i), 'unknown',         &
+                                           netcdf_var_name, 288, 289, 290 )
+                ENDIF
+
+                var_list = TRIM( var_list ) // TRIM( netcdf_var_name ) // ';'
+
+             ENDIF
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs)
+          nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'VAR_LIST', var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 291 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_sp )
+          CALL netcdf_handle_error( 'netcdf_define_header', 292 )
+
+!
+!--       Write axis data: zu_sp, zw_sp, k_x, k_y
+          ALLOCATE( netcdf_data(1:ns) )
+
+!
+!--       Write zu data
+          netcdf_data(1:ns) = zu( comp_spectra_level(1:ns) )
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_zu_sp, netcdf_data, &
+                                  start = (/ 1 /), count = (/ ns /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 293 )
+
+!
+!--       Write zw data
+          netcdf_data(1:ns) = zw( comp_spectra_level(1:ns) )
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_zw_sp, netcdf_data, &
+                                  start = (/ 1 /), count = (/ ns /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 294 )
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Write data for x and y axis (wavenumbers)
+          ALLOCATE( netcdf_data(nx/2) )
+          DO  i = 1, nx/2
+             netcdf_data(i) = 2.0_wp * pi * i / ( dx * ( nx + 1 ) )
+          ENDDO
+
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_x_sp, netcdf_data, &
+                                  start = (/ 1 /), count = (/ nx/2 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 295 )
+
+          DEALLOCATE( netcdf_data )
+
+          ALLOCATE( netcdf_data(ny/2) )
+          DO  i = 1, ny/2
+             netcdf_data(i) = 2.0_wp * pi * i / ( dy * ( ny + 1 ) )
+          ENDDO
+
+          nc_stat = NF90_PUT_VAR( id_set_sp, id_var_y_sp, netcdf_data, &
+                                  start = (/ 1 /), count = (/ ny/2 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 296 )
+
+          DEALLOCATE( netcdf_data )
+
+
+       CASE ( 'sp_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_sp, NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 297 )
+          var_list = ';'
+          i = 1
+          DO WHILE ( data_output_sp(i) /= ' '  .AND.  i <= 10 )
+
+             IF ( INDEX( spectra_direction(i), 'x' ) /= 0 )  THEN
+                netcdf_var_name = TRIM( data_output_sp(i) ) // '_x'
+                var_list = TRIM( var_list ) // TRIM( netcdf_var_name ) // ';'
+             ENDIF
+
+             IF ( INDEX( spectra_direction(i), 'y' ) /= 0 )  THEN
+                netcdf_var_name = TRIM( data_output_sp(i) ) // '_y'
+                var_list = TRIM( var_list ) // TRIM( netcdf_var_name ) // ';'
+             ENDIF
+
+             i = i + 1
+
+          ENDDO
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for spectra  ' //                   &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0260', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Determine the number of current vertical levels for which spectra
+!--       shall be output
+          ns = 1
+          DO WHILE ( comp_spectra_level(ns) /= 999999  .AND.  ns <= 100 )
+             ns = ns + 1
+          ENDDO
+          ns = ns - 1
+
+!
+!--       Get and compare the number of vertical levels
+          nc_stat = NF90_INQ_VARID( id_set_sp, 'zu_sp', id_var_zu_sp )
+          CALL netcdf_handle_error( 'netcdf_define_header', 298 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_sp, id_var_zu_sp, &
+                                           dimids = id_dim_zu_sp_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 299 )
+          id_dim_zu_sp = id_dim_zu_sp_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_sp, id_dim_zu_sp, &
+                                            len = ns_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 300 )
+
+          IF ( ns /= ns_old )  THEN
+             message_string = 'netCDF file for spectra ' //                    &
+                              ' from previous run found,' //                   &
+                              '&but this file cannot be extended due to' //    &
+                              ' mismatch in number of' //                      &
+                              ' vertical levels.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0261', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get and compare the heights of the cross sections
+          ALLOCATE( netcdf_data(1:ns_old) )
+
+          nc_stat = NF90_GET_VAR( id_set_sp, id_var_zu_sp, netcdf_data )
+          CALL netcdf_handle_error( 'netcdf_define_header', 301 )
+
+          DO  i = 1, ns
+             IF ( zu(comp_spectra_level(i)) /= netcdf_data(i) )  THEN
+                message_string = 'netCDF file for spectra ' //                 &
+                                 ' from previous run found,' //                &
+                                 '&but this file cannot be extended due to' // &
+                                 ' mismatch in heights of' //                  &
+                                 ' vertical levels.' //                        &
+                                 '&New file is created instead.'
+                CALL message( 'define_netcdf_header', 'PA0262', 0, 1, 0, 6, 0 )
+                extend = .FALSE.
+                RETURN
+             ENDIF
+          ENDDO
+
+          DEALLOCATE( netcdf_data )
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is plsp..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_sp, 'time', id_var_time_sp )
+          CALL netcdf_handle_error( 'netcdf_define_header', 302 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_sp, id_var_time_sp, &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 303 )
+          id_dim_time_sp = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_sp, id_dim_time_sp, &
+                                            len = dosp_time_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 304 )
+
+          nc_stat = NF90_GET_VAR( id_set_sp, id_var_time_sp,        &
+                                  last_time_coordinate,             &
+                                  start = (/ dosp_time_count /), &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 305 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for spectra ' //                    &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &  
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0263', 0, 1, 0, 6, 0 )
+             dosp_time_count = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+          i = 1
+          DO WHILE ( data_output_sp(i) /= ' '  .AND.  i <= 10 )
+
+             IF ( INDEX( spectra_direction(i), 'x' ) /= 0 )  THEN
+                netcdf_var_name = TRIM( data_output_sp(i) ) // '_x'
+                nc_stat = NF90_INQ_VARID( id_set_sp, netcdf_var_name, &
+                                          id_var_dospx(i) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 306 )
+             ENDIF
+
+             IF ( INDEX( spectra_direction(i), 'y' ) /= 0 )  THEN
+                netcdf_var_name = TRIM( data_output_sp(i) ) // '_y'
+                nc_stat = NF90_INQ_VARID( id_set_sp, netcdf_var_name, &
+                                          id_var_dospy(i) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 307 )
+             ENDIF
+
+             i = i + 1
+
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          nc_stat = NF90_REDEF( id_set_sp )
+          CALL netcdf_handle_error( 'netcdf_define_header', 441 )
+          IF ( averaging_interval_sp /= 0.0_wp )  THEN
+             WRITE (time_average_text,'('', '',F7.1,'' s average'')') &
+                                                           averaging_interval_sp
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title',  &
+                                     TRIM( run_description_header ) // &
+                                     TRIM( time_average_text ) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 308 )
+
+             WRITE ( time_average_text,'(F7.1,'' s avg'')' )  averaging_interval_sp
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'time_avg',       &
+                                     TRIM( time_average_text ) )
+          ELSE
+             nc_stat = NF90_PUT_ATT( id_set_sp, NF90_GLOBAL, 'title',          &
+                                     TRIM( run_description_header ) )
+          ENDIF
+          CALL netcdf_handle_error( 'netcdf_define_header', 309 )
+          nc_stat = NF90_ENDDEF( id_set_sp )
+          CALL netcdf_handle_error( 'netcdf_define_header', 442 )
+          message_string = 'netCDF file for spectra ' //                       &
+                           'from previous run found.' //                       &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0264', 0, 0, 0, 6, 0 )
+
+!
+!--     Currently disabled (DATA_PRT_NETCDF)
+!       CASE ( 'pt_new' )
+
+!
+!--       Define some global attributes of the dataset
+!          nc_stat = NF90_PUT_ATT( id_set_prt, NF90_GLOBAL, 'title',            &
+!                                  TRIM( run_description_header ) )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 310 )
+
+!
+!--       Define time coordinate for particles (unlimited dimension)
+!          CALL netcdf_create_dim( id_set_prt, 'time', NF90_UNLIMITED,          &
+!                                  id_dim_time_prt, 311 )
+!          CALL netcdf_create_var( id_set_prt, (/ id_dim_time_prt /), 'time',   &
+!                                  NF90_DOUBLE, id_var_time_prt, 'seconds', '', &
+!                                  312, 313, 000 )
+!
+!--       netCDF4 allows more than one unlimited dimension
+!          CALL netcdf_create_dim( id_set_prt, 'particle_number',            &
+!                                  NF90_UNLIMITED, id_dim_prtnum, 314 )
+
+!          CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum /),             &
+!                                  'particle_number', NF90_DOUBLE,              &
+!                                  id_var_prtnum, 'particle number', '', 315,   &
+!                                  316, 000 )
+!
+!--       Define variable which contains the real number of particles in use
+!          CALL netcdf_create_var( id_set_prt, (/ id_dim_time_prt /),           &
+!                                  'real_num_of_prt', NF90_DOUBLE,              &
+!                                  id_var_rnop_prt, 'particle number', '', 317, &
+!                                  318, 000 )
+!
+!--       Define the variables
+!          DO  i = 1, 17
+
+!             CALL netcdf_create_var( id_set_prt, (/ id_dim_prtnum,             &
+!                                     id_dim_time_prt /), prt_var_names(i),     &
+!                                     nc_precision(8), id_var_prt(i),           &
+!                                     TRIM( prt_var_units(i) ),                 &
+!                                     TRIM( prt_var_names(i) ), 319, 320, 321 )
+
+!          ENDDO
+
+!
+!--       Leave netCDF define mode
+!          nc_stat = NF90_ENDDEF( id_set_prt )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 322 )
+
+!
+!--     Currently disabled (DATA_PRT_NETCDF)
+!       CASE ( 'pt_ext' )
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is prt..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+!          nc_stat = NF90_INQ_VARID( id_set_prt, 'time', id_var_time_prt )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 323 )
+
+!          nc_stat = NF90_INQUIRE_VARIABLE( id_set_prt, id_var_time_prt, &
+!                                           dimids = id_dim_time_old )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 324 )
+!          id_dim_time_prt = id_dim_time_old(1)
+
+!          nc_stat = NF90_INQUIRE_DIMENSION( id_set_prt, id_dim_time_prt, &
+!                                            len = prt_time_count )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 325 )
+
+!          nc_stat = NF90_GET_VAR( id_set_prt, id_var_time_prt,  &
+!                                  last_time_coordinate,         &
+!                                  start = (/ prt_time_count /), &
+!                                  count = (/ 1 /) )
+!          CALL netcdf_handle_error( 'netcdf_define_header', 326 )
+
+!          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+!             message_string = 'netCDF file for particles ' //                  &
+!                              'from previous run found,' //                    &
+!                              '&but this file cannot be extended becaus' //    &
+!                              'e the current output time' //                   &
+!                              '&is less or equal than the last output t' //    &
+!                              'ime on this file.' //                           &
+!                              '&New file is created instead.'
+!             CALL message( 'define_netcdf_header', 'PA0265', 0, 1, 0, 6, 0 )
+!             prt_time_count = 0
+!             extend = .FALSE.
+!             RETURN
+!          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids.
+!         nc_stat = NF90_INQ_VARID( id_set_prt, 'real_num_of_prt',             &
+!                                   id_var_rnop_prt )
+!         CALL netcdf_handle_error( 'netcdf_define_header', 327 )
+
+!          DO  i = 1, 17
+
+!             nc_stat = NF90_INQ_VARID( id_set_prt, prt_var_names(i),           &
+!                                       id_var_prt(i) )
+!             CALL netcdf_handle_error( 'netcdf_define_header', 328 )
+
+!          ENDDO
+
+!          message_string = 'netCDF file for particles ' //                     &
+!                           'from previous run found.' //                       &
+!                           '&This file will be extended.'
+!          CALL message( 'define_netcdf_header', 'PA0266', 0, 0, 0, 6, 0 )
+        
+
+
+       CASE ( 'ps_new' )
+
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title',            &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 396 )
+
+!
+!--       Define time coordinate for particle time series (unlimited dimension)
+          CALL netcdf_create_dim( id_set_pts, 'time', NF90_UNLIMITED,          &
+                                  id_dim_time_pts, 397 )
+          CALL netcdf_create_var( id_set_pts, (/ id_dim_time_pts /), 'time',   &
+                                  NF90_DOUBLE, id_var_time_pts, 'seconds', '', &
+                                  398, 399, 000 )
+!
+!--       Define the variables. If more than one particle group is defined,
+!--       define seperate variables for each group
+          var_list = ';'
+          DO  i = 1, dopts_num
+
+             DO  j = 0, number_of_particle_groups
+
+                IF ( j == 0 )  THEN
+                   suffix = ''
+                ELSE
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                ENDIF
+
+                IF ( j == 0 )  THEN
+                   CALL netcdf_create_var( id_set_pts, (/ id_dim_time_pts /),  &
+                                           TRIM( dopts_label(i) ) // suffix,  &
+                                           nc_precision(6), id_var_dopts(i,j), &
+                                           TRIM( dopts_unit(i) ),              &
+                                           TRIM( dopts_label(i) ), 400, 401,   &
+                                           402 )
+                ELSE
+                   CALL netcdf_create_var( id_set_pts, (/ id_dim_time_pts /),  &
+                                           TRIM( dopts_label(i) ) // suffix,  &
+                                           nc_precision(6), id_var_dopts(i,j), &
+                                           TRIM( dopts_unit(i) ),              &
+                                           TRIM( dopts_label(i) ) // ' PG ' // &
+                                           suffix(2:3), 400, 401, 402 )
+                ENDIF
+
+                var_list = TRIM( var_list ) // TRIM( dopts_label(i) ) // &
+                           suffix // ';'
+
+                IF ( number_of_particle_groups == 1 )  EXIT
+
+             ENDDO
+
+          ENDDO
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs)
+          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 403 )
+
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_pts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 404 )
+
+
+       CASE ( 'ps_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_pts, NF90_GLOBAL, 'VAR_LIST', &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 405 )
+
+          var_list = ';'
+          i = 1
+          DO  i = 1, dopts_num
+
+             DO  j = 0, number_of_particle_groups
+
+                IF ( j == 0 )  THEN
+                   suffix = ''
+                ELSE
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                ENDIF
+
+                var_list = TRIM( var_list ) // TRIM( dopts_label(i) ) // &
+                           suffix // ';'
+
+                IF ( number_of_particle_groups == 1 )  EXIT
+
+             ENDDO
+
+          ENDDO
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for particle time series ' //       &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0267', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is dots..count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_pts, 'time', id_var_time_pts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 406 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_pts, id_var_time_pts, &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 407 )
+          id_dim_time_pts = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_pts, id_dim_time_pts, &
+                                            len = dopts_time_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 408 )
+
+          nc_stat = NF90_GET_VAR( id_set_pts, id_var_time_pts,    &
+                                  last_time_coordinate,           &
+                                  start = (/ dopts_time_count /), &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 409 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for particle time series ' //       &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0268', 0, 1, 0, 6, 0 )
+             dopts_time_count = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the variable ids
+          i = 1
+          DO  i = 1, dopts_num
+ 
+             DO  j = 0, number_of_particle_groups
+
+                IF ( j == 0 )  THEN
+                   suffix = ''
+                ELSE
+                   WRITE ( suffix, '(''_'',I2.2)' )  j
+                ENDIF
+
+                netcdf_var_name = TRIM( dopts_label(i) ) // suffix
+
+                nc_stat = NF90_INQ_VARID( id_set_pts, netcdf_var_name, &
+                                          id_var_dopts(i,j) )
+                CALL netcdf_handle_error( 'netcdf_define_header', 410 )
+
+                IF ( number_of_particle_groups == 1 )  EXIT
+
+             ENDDO
+
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          nc_stat = NF90_REDEF( id_set_pts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 443 )
+          nc_stat = NF90_PUT_ATT( id_set_pts, NF90_GLOBAL, 'title',            &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 411 )
+          nc_stat = NF90_ENDDEF( id_set_pts )
+          CALL netcdf_handle_error( 'netcdf_define_header', 444 )
+          message_string = 'netCDF file for particle time series ' //          &
+                           'from previous run found.' //                       &
+                           '&This file will be extended.'
+          CALL message( 'netcdf_define_header', 'PA0269', 0, 0, 0, 6, 0 )
+
+!
+!--    Flight data
+       CASE ( 'fl_new' )
+!
+!--       Define some global attributes of the dataset
+          nc_stat = NF90_PUT_ATT( id_set_fl, NF90_GLOBAL, 'title',             &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 249 )
+
+!
+!--       Define time and location coordinates for flight space-time series
+!--       (unlimited dimension)
+!--       Error number must still be set appropriately.
+          CALL netcdf_create_dim( id_set_fl, 'time', NF90_UNLIMITED,           &
+                                  id_dim_time_fl, 250 )
+          CALL netcdf_create_var( id_set_fl, (/ id_dim_time_fl /), 'time',     &
+                                  NF90_DOUBLE, id_var_time_fl, 'seconds', '',  &
+                                  251, 252, 000 )
+
+          DO l = 1, num_leg
+             CALL netcdf_create_dim( id_set_fl, dofl_dim_label_x(l),           &
+                                     NF90_UNLIMITED, id_dim_x_fl(l), 250 )
+             CALL netcdf_create_dim( id_set_fl, dofl_dim_label_y(l),           &
+                                     NF90_UNLIMITED, id_dim_y_fl(l), 250 )
+             CALL netcdf_create_dim( id_set_fl, dofl_dim_label_z(l),           &
+                                     NF90_UNLIMITED, id_dim_z_fl(l), 250 )
+
+             CALL netcdf_create_var( id_set_fl, (/ id_dim_x_fl(l) /),          &
+                                     dofl_dim_label_x(l), NF90_DOUBLE,         &
+                                     id_var_x_fl(l), 'm', '', 251, 252, 000 )
+             CALL netcdf_create_var( id_set_fl, (/ id_dim_y_fl(l) /),          &
+                                     dofl_dim_label_y(l), NF90_DOUBLE,         &
+                                     id_var_y_fl(l), 'm', '', 251, 252, 000 )
+             CALL netcdf_create_var( id_set_fl, (/ id_dim_z_fl(l) /),          &
+                                     dofl_dim_label_z(l), NF90_DOUBLE,         &
+                                     id_var_z_fl(l), 'm', '', 251, 252, 000 )
+          ENDDO
+!
+!--       Define the variables
+          var_list = ';'
+          k = 1
+          DO  l = 1, num_leg
+             DO i = 1, num_var_fl
+
+                CALL netcdf_create_var( id_set_fl, (/ id_dim_time_fl /),       &
+                                        dofl_label(k), nc_precision(9),        &
+                                        id_var_dofl(k),                        &
+                                        TRIM( dofl_unit(k) ),                  &
+                                        TRIM( dofl_label(k) ), 253, 254, 255 )
+
+                k = k + 1
+                
+             ENDDO
+
+          ENDDO
+
+!
+!--       Write the list of variables as global attribute (this is used by
+!--       restart runs)
+          nc_stat = NF90_PUT_ATT( id_set_fl, NF90_GLOBAL, 'VAR_LIST', var_list )
+          CALL netcdf_handle_error( 'netcdf_define_header', 258 )
+
+!
+!--       Leave netCDF define mode
+          nc_stat = NF90_ENDDEF( id_set_fl )
+          CALL netcdf_handle_error( 'netcdf_define_header', 259 )
+
+
+       CASE ( 'fl_ext' )
+
+!
+!--       Get the list of variables and compare with the actual run.
+!--       First var_list_old has to be reset, since GET_ATT does not assign
+!--       trailing blanks.
+          var_list_old = ' '
+          nc_stat = NF90_GET_ATT( id_set_fl, NF90_GLOBAL, 'VAR_LIST',          &
+                                  var_list_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 260 )
+
+          var_list = ';'
+          i = 1
+          DO  i = 1, num_leg * num_var_fl
+
+             var_list = TRIM( var_list ) // TRIM( dofl_label(i) ) // ';'
+
+          ENDDO
+
+          IF ( TRIM( var_list ) /= TRIM( var_list_old ) )  THEN
+             message_string = 'netCDF file for flight time series ' //         &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended due to' //    &
+                              ' variable mismatch.' //                         &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0257', 0, 1, 0, 6, 0 )
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Get the id of the time coordinate (unlimited coordinate) and its
+!--       last index on the file. The next time level is dofl_time_count+1.
+!--       The current time must be larger than the last output time
+!--       on the file.
+          nc_stat = NF90_INQ_VARID( id_set_fl, 'time', id_var_time_fl )
+          CALL netcdf_handle_error( 'netcdf_define_header', 261 )
+
+          nc_stat = NF90_INQUIRE_VARIABLE( id_set_fl, id_var_time_fl,          &
+                                           dimids = id_dim_time_old )
+          CALL netcdf_handle_error( 'netcdf_define_header', 262 )
+          id_dim_time_fl = id_dim_time_old(1)
+
+          nc_stat = NF90_INQUIRE_DIMENSION( id_set_fl, id_dim_time_fl,         &
+                                            len = dofl_time_count )
+          CALL netcdf_handle_error( 'netcdf_define_header', 263 )
+
+          nc_stat = NF90_GET_VAR( id_set_fl, id_var_time_fl,        &
+                                  last_time_coordinate,             &
+                                  start = (/ dofl_time_count /), &
+                                  count = (/ 1 /) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 264 )
+
+          IF ( last_time_coordinate(1) >= simulated_time )  THEN
+             message_string = 'netCDF file for flight-time series ' //         &
+                              'from previous run found,' //                    &
+                              '&but this file cannot be extended becaus' //    &
+                              'e the current output time' //                   &
+                              '&is less or equal than the last output t' //    &
+                              'ime on this file.' //                           &
+                              '&New file is created instead.'
+             CALL message( 'define_netcdf_header', 'PA0258', 0, 1, 0, 6, 0 )
+             dofl_time_count = 0
+             extend = .FALSE.
+             RETURN
+          ENDIF
+
+!
+!--       Dataset seems to be extendable.
+!--       Now get the remaining dimension and variable ids
+          DO l = 1, num_leg
+             nc_stat = NF90_INQ_VARID( id_set_fl, dofl_dim_label_x(l),         &
+                                       id_var_x_fl(l) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 265 )
+             nc_stat = NF90_INQ_VARID( id_set_fl, dofl_dim_label_y(l),         &
+                                       id_var_y_fl(l) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 265 )
+             nc_stat = NF90_INQ_VARID( id_set_fl, dofl_dim_label_z(l),         &
+                                       id_var_z_fl(l) )
+             CALL netcdf_handle_error( 'netcdf_define_header', 265 )
+
+          ENDDO
+
+
+          DO  i = 1, num_leg * num_var_fl
+ 
+            nc_stat = NF90_INQ_VARID( id_set_fl, dofl_label(i), &
+                                       id_var_dofl(i) )
+            CALL netcdf_handle_error( 'netcdf_define_header', 265 )
+
+          ENDDO
+
+!
+!--       Update the title attribute on file
+!--       In order to avoid 'data mode' errors if updated attributes are larger 
+!--       than their original size, NF90_PUT_ATT is called in 'define mode' 
+!--       enclosed by NF90_REDEF and NF90_ENDDEF calls. This implies a possible 
+!--       performance loss due to data copying; an alternative strategy would be 
+!--       to ensure equal attribute size in a job chain. Maybe revise later.
+          nc_stat = NF90_REDEF( id_set_fl )
+          CALL netcdf_handle_error( 'netcdf_define_header', 439 )
+          nc_stat = NF90_PUT_ATT( id_set_fl, NF90_GLOBAL, 'title',             &
+                                  TRIM( run_description_header ) )
+          CALL netcdf_handle_error( 'netcdf_define_header', 267 )
+          nc_stat = NF90_ENDDEF( id_set_fl )
+          CALL netcdf_handle_error( 'netcdf_define_header', 440 )
+          message_string = 'netCDF file for flight-time series ' //            &
+                           'from previous run found.' //                       &
+                           '&This file will be extended.'
+          CALL message( 'define_netcdf_header', 'PA0259', 0, 0, 0, 6, 0 )
+
+          
+       CASE DEFAULT
+
+          message_string = 'mode "' // TRIM( mode) // '" not supported'
+          CALL message( 'netcdf_define_header', 'PA0270', 0, 0, 0, 6, 0 )
+
+    END SELECT
+
+#endif
+ END SUBROUTINE netcdf_define_header
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Creates a netCDF file and give back the id. The parallel flag has to be TRUE
+!> for parallel netCDF output support.
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE netcdf_create_file( filename , id, parallel, errno )
+#if defined( __netcdf )
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(IN) :: filename
+    INTEGER, INTENT(IN)           :: errno
+    INTEGER, INTENT(OUT)          :: id
+    LOGICAL, INTENT(IN)           :: parallel
+
+
+!
+!-- Create a new netCDF output file with requested netCDF format
+    IF ( netcdf_data_format == 1 )  THEN
+!
+!--    Classic netCDF format
+       nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id )
+
+    ELSEIF ( netcdf_data_format == 2 )  THEN
+!
+!--    64bit-offset format
+       nc_stat = NF90_CREATE( filename,                                        &
+                              IOR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ), id )
+
+#if defined( __netcdf4 )
+    ELSEIF ( netcdf_data_format == 3  .OR.                                     &
+             ( .NOT. parallel  .AND.  netcdf_data_format == 5 ) )  THEN
+!
+!--    netCDF4/HDF5 format
+       nc_stat = NF90_CREATE( filename, IOR( NF90_NOCLOBBER, NF90_NETCDF4 ), id )
+
+    ELSEIF ( netcdf_data_format == 4  .OR.                                     &
+             ( .NOT. parallel  .AND.  netcdf_data_format == 6 ) )  THEN
+!
+!--    netCDF4/HDF5 format with classic model flag
+       nc_stat = NF90_CREATE( filename,                                        &
+                              IOR( NF90_NOCLOBBER,                             &
+                              IOR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ), id )
+
+#if defined( __netcdf4_parallel )
+    ELSEIF ( netcdf_data_format == 5  .AND.  parallel )  THEN
+!
+!--    netCDF4/HDF5 format, parallel
+       nc_stat = NF90_CREATE( filename,                                        &
+                              IOR( NF90_NOCLOBBER,                             &
+                              IOR( NF90_NETCDF4, NF90_MPIIO ) ),               &
+                              id, COMM = comm2d, INFO = MPI_INFO_NULL )
+
+    ELSEIF ( netcdf_data_format == 6  .AND.  parallel )  THEN
+!
+!--    netCDF4/HDF5 format with classic model flag, parallel
+       nc_stat = NF90_CREATE( filename,                                        &
+                              IOR( NF90_NOCLOBBER,                             &
+                              IOR( NF90_MPIIO,                                 &
+                              IOR( NF90_CLASSIC_MODEL, NF90_HDF5 ) ) ),        &
+                              id, COMM = comm2d, INFO = MPI_INFO_NULL )
+
+#endif
+#endif
+    ENDIF
+
+    CALL netcdf_handle_error( 'netcdf_create_file', errno )
+#endif
+ END SUBROUTINE netcdf_create_file
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Opens an existing netCDF file for writing and gives back the id.
+!> The parallel flag has to be TRUE for parallel netCDF output support.
+!------------------------------------------------------------------------------!
+ SUBROUTINE netcdf_open_write_file( filename, id, parallel, errno )
+#if defined( __netcdf )
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(IN) :: filename
+    INTEGER, INTENT(IN)           :: errno
+    INTEGER, INTENT(OUT)          :: id
+    LOGICAL, INTENT(IN)           :: parallel
+
+
+    IF ( netcdf_data_format < 5  .OR.  .NOT. parallel )  THEN
+       nc_stat = NF90_OPEN( filename, NF90_WRITE, id )
+#if defined( __netcdf4 )
+#if defined( __netcdf4_parallel )
+    ELSEIF ( netcdf_data_format > 4  .AND.  parallel )  THEN
+       nc_stat = NF90_OPEN( filename, IOR( NF90_WRITE, NF90_MPIIO ), id,  &
+                            COMM = comm2d, INFO = MPI_INFO_NULL )
+#endif
+#endif
+    ENDIF
+
+    CALL netcdf_handle_error( 'netcdf_open_write_file', errno )
+#endif
+ END SUBROUTINE netcdf_open_write_file
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prints out a text message corresponding to the current status.
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE netcdf_handle_error( routine_name, errno )
+#if defined( __netcdf )
+
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=6) ::  message_identifier
+    CHARACTER(LEN=*) ::  routine_name
+
+    INTEGER(iwp) ::  errno
+
+    IF ( nc_stat /= NF90_NOERR )  THEN
+
+       WRITE( message_identifier, '(''NC'',I4.4)' )  errno
+
+       message_string = TRIM( NF90_STRERROR( nc_stat ) )
+
+       CALL message( routine_name, message_identifier, 2, 2, 0, 6, 1 )
+
+    ENDIF
+
+#endif
+ END SUBROUTINE netcdf_handle_error
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Create a dimension in NetCDF file
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE netcdf_create_dim(ncid, dim_name, ncdim_type, ncdim_id, error_no)
+
+#if defined( __netcdf )
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(IN) ::  dim_name
+
+    INTEGER, INTENT(IN)  ::  error_no
+    INTEGER, INTENT(IN)  ::  ncid
+    INTEGER, INTENT(OUT) ::  ncdim_id
+    INTEGER, INTENT(IN)  ::  ncdim_type
+
+!
+!-- Define time coordinate for volume data (unlimited dimension)
+    nc_stat = NF90_DEF_DIM( ncid, dim_name, ncdim_type, ncdim_id )
+    CALL netcdf_handle_error( 'netcdf_create_dim', error_no )
+
+#endif
+
+ END SUBROUTINE netcdf_create_dim
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Create a one dimensional variable in specific units in NetCDF file
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE netcdf_create_var( ncid, dim_id, var_name, var_type, var_id,       &
+                               unit_name, long_name, error_no1, error_no2,     &
+                               error_no3, fill )
+
+#if defined( __netcdf )
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(IN) ::  long_name
+    CHARACTER(LEN=*), INTENT(IN) ::  unit_name
+    CHARACTER(LEN=*), INTENT(IN) ::  var_name
+
+    LOGICAL, OPTIONAL ::  fill  !< indicates setting of _FillValue attribute 
+
+    INTEGER, INTENT(IN)  ::  error_no1
+    INTEGER, INTENT(IN)  ::  error_no2
+    INTEGER, INTENT(IN)  ::  error_no3
+    INTEGER, INTENT(IN)  ::  ncid
+    INTEGER, INTENT(OUT) ::  var_id
+    INTEGER, INTENT(IN)  ::  var_type
+
+    INTEGER, DIMENSION(:), INTENT(IN) ::  dim_id
+
+!
+!-- Define variable
+    nc_stat = NF90_DEF_VAR( ncid, var_name, var_type, dim_id, var_id )
+    CALL netcdf_handle_error( 'netcdf_create_var', error_no1 )
+
+#if defined( __netcdf4 )
+!
+!-- Check if variable should be deflate (including shuffling)
+!-- and if it is possible (only NetCDF4 with HDF5 supports compression)
+    IF ( netcdf_data_format > 2  .AND.  netcdf_deflate > 0 )  THEN
+       nc_stat = NF90_DEF_VAR_DEFLATE( ncid, var_id, 1, 1, netcdf_deflate )
+       CALL netcdf_handle_error( 'netcdf_create_var_deflate', error_no1 )
+    ENDIF
+#endif
+!
+!-- Set unit name if set
+    IF ( unit_name /= '' )  THEN
+       nc_stat = NF90_PUT_ATT( ncid, var_id, 'units', unit_name )
+       CALL netcdf_handle_error( 'netcdf_create_var', error_no2 )
+    ENDIF
+
+!
+!-- Set long name if set
+    IF ( long_name /= '' )  THEN
+       nc_stat = NF90_PUT_ATT( ncid, var_id, 'long_name', long_name )
+       CALL netcdf_handle_error( 'netcdf_create_var', error_no3 )
+    ENDIF
+
+!
+!-- Set _FillValue for all variables, except for dimension variables.
+!-- Set the fill values accordingly to the corresponding output precision. 
+    IF ( PRESENT( fill ) )  THEN
+       IF ( var_type == NF90_REAL4 )  THEN
+          nc_stat = NF90_PUT_ATT( ncid, var_id, '_FillValue',                  &
+                                  REAL( fill_value, KIND = 4 ) )
+          CALL netcdf_handle_error( 'netcdf_create_var', 0 )
+       ELSE
+          nc_stat = NF90_PUT_ATT( ncid, var_id, '_FillValue',                  &
+                                  REAL( fill_value, KIND = 8 ) )
+          CALL netcdf_handle_error( 'netcdf_create_var', 0 )
+       ENDIF
+    ENDIF
+
+#endif
+ END SUBROUTINE netcdf_create_var
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Create a variable holding the coordinate-reference-system information.
+!------------------------------------------------------------------------------!
+ SUBROUTINE netcdf_create_crs( ncid, error_no )
+
+#if defined( __netcdf )
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)  ::  error_no  !< error number
+    INTEGER, INTENT(IN)  ::  ncid      !< file id
+    INTEGER              ::  var_id    !< variable id
+
+!
+!-- Define variable
+    nc_stat = NF90_DEF_VAR( ncid, 'crs', NF90_INT, VARID = var_id )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+!
+!-- Set attributes
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'epsg_code', &
+                            coord_ref_sys%epsg_code )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'false_easting', &
+                            coord_ref_sys%false_easting )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'false_northing', &
+                            coord_ref_sys%false_northing )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'grid_mapping_name', &
+                            coord_ref_sys%grid_mapping_name )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'inverse_flattening', &
+                            coord_ref_sys%inverse_flattening )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'latitude_of_projection_origin', &
+                            coord_ref_sys%latitude_of_projection_origin )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'long_name', &
+                            coord_ref_sys%long_name )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'longitude_of_central_meridian', &
+                            coord_ref_sys%longitude_of_central_meridian )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'longitude_of_prime_meridian', &
+                            coord_ref_sys%longitude_of_prime_meridian )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'scale_factor_at_central_meridian', &
+                            coord_ref_sys%scale_factor_at_central_meridian )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'semi_major_axis', &
+                            coord_ref_sys%semi_major_axis )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+    nc_stat = NF90_PUT_ATT( ncid, var_id, 'units', &
+                            coord_ref_sys%units )
+    CALL netcdf_handle_error( 'netcdf_create_crs', error_no )
+
+#endif
+END SUBROUTINE netcdf_create_crs
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Convert UTM coordinates into geographic latitude and longitude. Conversion
+!> is based on the work of KrÃŒger (1912) DOI: 10.2312/GFZ.b103-krueger28
+!> and Karney (2013) DOI: 10.1007/s00190-012-0578-z
+!> Based on a JavaScript of the geodesy function library written by chrisveness
+!> https://github.com/chrisveness/geodesy
+!------------------------------------------------------------------------------!
+ SUBROUTINE convert_utm_to_geographic( crs, eutm, nutm, lon, lat )
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  j   !< loop index
+    
+    REAL(wp), INTENT(in)  ::  eutm !< easting (UTM)
+    REAL(wp), INTENT(out) ::  lat  !< geographic latitude in degree
+    REAL(wp), INTENT(out) ::  lon  !< geographic longitude in degree
+    REAL(wp), INTENT(in)  ::  nutm !< northing (UTM)
+
+    REAL(wp) ::  a           !< 2*pi*a is the circumference of a meridian
+    REAL(wp) ::  cos_eta_s   !< cos(eta_s)
+    REAL(wp) ::  delta_i     !<
+    REAL(wp) ::  delta_tau_i !<
+    REAL(wp) ::  e           !< eccentricity
+    REAL(wp) ::  eta         !<
+    REAL(wp) ::  eta_s       !<
+    REAL(wp) ::  n           !< 3rd flattening
+    REAL(wp) ::  n2          !< n^2
+    REAL(wp) ::  n3          !< n^3
+    REAL(wp) ::  n4          !< n^4
+    REAL(wp) ::  n5          !< n^5
+    REAL(wp) ::  n6          !< n^6
+    REAL(wp) ::  nu          !<
+    REAL(wp) ::  nu_s        !<
+    REAL(wp) ::  sin_eta_s   !< sin(eta_s)
+    REAL(wp) ::  sinh_nu_s   !< sinush(nu_s)
+    REAL(wp) ::  tau_i       !<
+    REAL(wp) ::  tau_i_s     !<
+    REAL(wp) ::  tau_s       !<
+    REAL(wp) ::  x           !< adjusted easting
+    REAL(wp) ::  y           !< adjusted northing
+
+    REAL(wp), DIMENSION(6) ::  beta !< 6th order KrÃŒger expressions
+
+    REAL(wp), DIMENSION(8), INTENT(in) ::  crs !< coordinate reference system, consists of
+                                               !< (/semi_major_axis,
+                                               !<   inverse_flattening,
+                                               !<   longitude_of_prime_meridian,
+                                               !<   longitude_of_central_meridian,
+                                               !<   scale_factor_at_central_meridian,
+                                               !<   latitude_of_projection_origin,
+                                               !<   false_easting,
+                                               !<   false_northing /)
+
+    x = eutm - crs(7)  ! remove false easting
+    y = nutm - crs(8)  ! remove false northing
+
+!-- from Karney 2011 Eq 15-22, 36:
+    e = SQRT( 1.0_wp / crs(2) * ( 2.0_wp - 1.0_wp / crs(2) ) )
+    n = 1.0_wp / crs(2) / ( 2.0_wp - 1.0_wp / crs(2) )
+    n2 = n * n
+    n3 = n * n2
+    n4 = n * n3
+    n5 = n * n4
+    n6 = n * n5
+
+    a = crs(1) / ( 1.0_wp + n ) * ( 1.0_wp + 0.25_wp * n2       &
+                                           + 0.015625_wp * n4   &
+                                           + 3.90625E-3_wp * n6 )
+
+    nu  = x / ( crs(5) * a )
+    eta = y / ( crs(5) * a )
+
+!-- According to KrÃŒger (1912), eq. 26*
+    beta(1) =        0.5_wp                  * n  &
+            -        2.0_wp /         3.0_wp * n2 &
+            +       37.0_wp /        96.0_wp * n3 &
+            -        1.0_wp /       360.0_wp * n4 &
+            -       81.0_wp /       512.0_wp * n5 &
+            +    96199.0_wp /    604800.0_wp * n6
+
+    beta(2) =        1.0_wp /        48.0_wp * n2 &
+            +        1.0_wp /        15.0_wp * n3 &
+            -      437.0_wp /      1440.0_wp * n4 &
+            +       46.0_wp /       105.0_wp * n5 &
+            -  1118711.0_wp /   3870720.0_wp * n6
+
+    beta(3) =       17.0_wp /       480.0_wp * n3 &
+            -       37.0_wp /       840.0_wp * n4 &
+            -      209.0_wp /      4480.0_wp * n5 &
+            +     5569.0_wp /     90720.0_wp * n6
+
+    beta(4) =     4397.0_wp /    161280.0_wp * n4 &
+            -       11.0_wp /       504.0_wp * n5 &
+            -   830251.0_wp /   7257600.0_wp * n6
+
+    beta(5) =     4583.0_wp /    161280.0_wp * n5 &
+            -   108847.0_wp /   3991680.0_wp * n6
+
+    beta(6) = 20648693.0_wp / 638668800.0_wp * n6
+
+    eta_s = eta
+    nu_s  = nu
+    DO  j = 1, 6
+      eta_s = eta_s - beta(j) * SIN(2.0_wp * j * eta) * COSH(2.0_wp * j * nu)
+      nu_s  = nu_s  - beta(j) * COS(2.0_wp * j * eta) * SINH(2.0_wp * j * nu)
+    ENDDO
+
+    sinh_nu_s = SINH( nu_s )
+    sin_eta_s = SIN( eta_s )
+    cos_eta_s = COS( eta_s )
+
+    tau_s = sin_eta_s / SQRT( sinh_nu_s**2 + cos_eta_s**2 )
+
+    tau_i = tau_s
+    delta_tau_i = 1.0_wp
+
+    DO WHILE ( ABS( delta_tau_i ) > 1.0E-12_wp )
+
+      delta_i = SINH( e * ATANH( e * tau_i / SQRT( 1.0_wp + tau_i**2 ) ) )
+
+      tau_i_s = tau_i   * SQRT( 1.0_wp + delta_i**2 )  &
+               - delta_i * SQRT( 1.0_wp + tau_i**2 )
+
+      delta_tau_i = ( tau_s - tau_i_s ) / SQRT( 1.0_wp + tau_i_s**2 )  &
+                   * ( 1.0_wp + ( 1.0_wp - e**2 ) * tau_i**2 )          &
+                   / ( ( 1.0_wp - e**2 ) * SQRT( 1.0_wp + tau_i**2 ) )
+
+      tau_i = tau_i + delta_tau_i
+
+    ENDDO
+
+    lat = ATAN( tau_i ) / pi * 180.0_wp
+    lon = ATAN2( sinh_nu_s, cos_eta_s ) / pi * 180.0_wp + crs(4)
+
+ END SUBROUTINE convert_utm_to_geographic
+
+ END MODULE netcdf_interface
Index: /palm/tags/release-6.0/SOURCE/ocean_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/ocean_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/ocean_mod.f90	(revision 3477)
@@ -0,0 +1,2344 @@
+!> @file ocean_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3381 2018-10-19 13:09:06Z raasch
+! spin-up cooling for ocean surface implemented, see new parameter
+! surface_cooling_spinup_time
+! 
+! 3311 2018-10-05 12:34:56Z raasch
+! check if ocean mode is used for invalid combinations
+! 
+! 3303 2018-10-03 12:04:15Z raasch
+! salinity allowed to be switched off
+! 
+! 3302 2018-10-03 02:39:40Z raasch
+! Craik Leibovich force (Stokes drift) + wave breaking effect added
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! initial revision
+!
+!
+! Authors:
+! --------
+! @author Siegfried Raasch
+!
+! Description:
+! ------------
+!> This module contains relevant code for PALM's ocean mode, e.g. the
+!> prognostic equation for salinity, the equation of state for seawater,
+!> the Craik Leibovich force (Stokes force), and wave breaking effects
+!------------------------------------------------------------------------------!
+ MODULE ocean_mod
+ 
+
+#if defined( __nopointer )
+    USE arrays_3d,                                                             &
+        ONLY:  prho, rho_ocean, sa, sa_init, sa_p, tsa_m
+#else
+    USE arrays_3d,                                                             &
+        ONLY:  prho, prho_1, rho_ocean, rho_1, sa, sa_init, sa_1, sa_2, sa_3,  &
+               sa_p, tsa_m
+#endif
+
+    USE control_parameters,                                                    &
+        ONLY:  atmos_ocean_sign, bottom_salinityflux,                          &
+               constant_top_salinityflux, ocean_mode, top_salinityflux,        &
+               wall_salinityflux
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=20) ::  bc_sa_t = 'neumann'  !< namelist parameter
+
+    INTEGER(iwp) ::  ibc_sa_t   !< integer flag for bc_sa_t
+    INTEGER(iwp) ::  iran_ocean = -1234567  !< random number used for wave breaking effects
+
+    INTEGER(iwp) ::  sa_vertical_gradient_level_ind(10) = -9999  !< grid index values of sa_vertical_gradient_level(s)
+
+    LOGICAL ::  salinity = .TRUE.             !< switch for using salinity
+    LOGICAL ::  stokes_force = .FALSE.        !< switch to switch on the Stokes force
+    LOGICAL ::  wave_breaking = .FALSE.       !< switch to switch on wave breaking effects
+    LOGICAL ::  surface_cooling_switched_off = .FALSE.  !< variable to check if surface heat flux has been switched off
+
+    REAL(wp) ::  alpha_wave_breaking = 3.0_wp !< coefficient for wave breaking generated turbulence from Noh et al. (2004), JPO
+    REAL(wp) ::  prho_reference               !< reference state of potential density at ocean surface
+    REAL(wp) ::  sa_surface = 35.0_wp         !< surface salinity, namelist parameter
+    REAL(wp) ::  sa_vertical_gradient(10) = 0.0_wp               !< namelist parameter
+    REAL(wp) ::  sa_vertical_gradient_level(10) = -999999.9_wp   !< namelist parameter
+    REAL(wp) ::  stokes_waveheight = 0.0_wp  !< wave height assumed for Stokes drift velocity
+    REAL(wp) ::  stokes_wavelength = 0.0_wp  !< wavelength assumed for Stokes drift velocity
+    REAL(wp) ::  surface_cooling_spinup_time = 999999.9_wp  !< time after which surface heat flux is switched off
+    REAL(wp) ::  timescale_wave_breaking     !< time scale of random forcing
+    REAL(wp) ::  u_star_wave_breaking        !< to store the absolute value of friction velocity at the ocean surface
+
+    REAL(wp), DIMENSION(12), PARAMETER ::  nom =                               &
+                          (/ 9.9984085444849347D2,   7.3471625860981584D0,     &
+                            -5.3211231792841769D-2,  3.6492439109814549D-4,    &
+                             2.5880571023991390D0,  -6.7168282786692354D-3,    &
+                             1.9203202055760151D-3,  1.1798263740430364D-2,    &
+                             9.8920219266399117D-8,  4.6996642771754730D-6,    &
+                            -2.5862187075154352D-8, -3.2921414007960662D-12 /)
+                          !< constants used in equation of state for seawater
+
+    REAL(wp), DIMENSION(13), PARAMETER ::  den =                               &
+                          (/ 1.0D0,                  7.2815210113327091D-3,    &
+                            -4.4787265461983921D-5,  3.3851002965802430D-7,    &
+                             1.3651202389758572D-10, 1.7632126669040377D-3,    &
+                            -8.8066583251206474D-6, -1.8832689434804897D-10,   &
+                             5.7463776745432097D-6,  1.4716275472242334D-9,    &
+                             6.7103246285651894D-6, -2.4461698007024582D-17,   &
+                            -9.1534417604289062D-18 /)
+                          !< constants used in equation of state for seawater
+
+    SAVE
+
+    PUBLIC ::  bc_sa_t, ibc_sa_t, prho_reference, sa_surface,                  &
+               sa_vertical_gradient, sa_vertical_gradient_level,               &
+               sa_vertical_gradient_level_ind, stokes_force, wave_breaking
+
+
+    INTERFACE eqn_state_seawater
+       MODULE PROCEDURE eqn_state_seawater
+       MODULE PROCEDURE eqn_state_seawater_ij
+    END INTERFACE eqn_state_seawater
+
+    INTERFACE eqn_state_seawater_func
+       MODULE PROCEDURE eqn_state_seawater_func
+    END INTERFACE eqn_state_seawater_func
+
+    INTERFACE ocean_check_parameters
+       MODULE PROCEDURE ocean_check_parameters
+    END INTERFACE ocean_check_parameters
+
+    INTERFACE ocean_check_data_output
+       MODULE PROCEDURE ocean_check_data_output
+    END INTERFACE ocean_check_data_output
+
+    INTERFACE ocean_check_data_output_pr
+       MODULE PROCEDURE ocean_check_data_output_pr
+    END INTERFACE ocean_check_data_output_pr
+
+    INTERFACE ocean_define_netcdf_grid
+       MODULE PROCEDURE ocean_define_netcdf_grid
+    END INTERFACE ocean_define_netcdf_grid
+
+    INTERFACE ocean_data_output_2d
+       MODULE PROCEDURE ocean_data_output_2d
+    END INTERFACE ocean_data_output_2d
+
+    INTERFACE ocean_data_output_3d
+       MODULE PROCEDURE ocean_data_output_3d
+    END INTERFACE ocean_data_output_3d
+
+    INTERFACE ocean_header
+       MODULE PROCEDURE ocean_header
+    END INTERFACE ocean_header
+
+    INTERFACE ocean_init
+       MODULE PROCEDURE ocean_init
+    END INTERFACE ocean_init
+
+    INTERFACE ocean_init_arrays
+       MODULE PROCEDURE ocean_init_arrays
+    END INTERFACE ocean_init_arrays
+
+    INTERFACE ocean_parin
+       MODULE PROCEDURE ocean_parin
+    END INTERFACE ocean_parin
+
+    INTERFACE ocean_prognostic_equations
+       MODULE PROCEDURE ocean_prognostic_equations
+       MODULE PROCEDURE ocean_prognostic_equations_ij
+    END INTERFACE ocean_prognostic_equations
+
+    INTERFACE ocean_swap_timelevel
+       MODULE PROCEDURE ocean_swap_timelevel
+    END INTERFACE ocean_swap_timelevel
+
+    INTERFACE ocean_rrd_global
+       MODULE PROCEDURE ocean_rrd_global
+    END INTERFACE ocean_rrd_global
+
+    INTERFACE ocean_rrd_local
+       MODULE PROCEDURE ocean_rrd_local
+    END INTERFACE ocean_rrd_local
+
+    INTERFACE ocean_wrd_global
+       MODULE PROCEDURE ocean_wrd_global
+    END INTERFACE ocean_wrd_global
+
+    INTERFACE ocean_wrd_local
+       MODULE PROCEDURE ocean_wrd_local
+    END INTERFACE ocean_wrd_local
+
+    INTERFACE ocean_3d_data_averaging
+       MODULE PROCEDURE ocean_3d_data_averaging
+    END INTERFACE ocean_3d_data_averaging
+
+    INTERFACE stokes_drift_terms
+       MODULE PROCEDURE stokes_drift_terms
+       MODULE PROCEDURE stokes_drift_terms_ij
+    END INTERFACE stokes_drift_terms
+
+    INTERFACE wave_breaking_term
+       MODULE PROCEDURE wave_breaking_term
+       MODULE PROCEDURE wave_breaking_term_ij
+    END INTERFACE wave_breaking_term
+
+    PRIVATE
+!
+!-- Add INTERFACES that must be available to other modules (alphabetical order)
+    PUBLIC eqn_state_seawater, ocean_check_data_output,                        &
+           ocean_check_data_output_pr, ocean_check_parameters,                 &
+           ocean_data_output_2d, ocean_data_output_3d,                         &
+           ocean_define_netcdf_grid, ocean_header, ocean_init,                 &
+           ocean_init_arrays, ocean_parin, ocean_prognostic_equations,         &
+           ocean_swap_timelevel, ocean_rrd_global, ocean_rrd_local,            &
+           ocean_wrd_global, ocean_wrd_local, ocean_3d_data_averaging,         &
+           stokes_drift_terms, wave_breaking_term
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Equation of state for seawater as a function of potential temperature,
+!> salinity, and pressure.
+!> For coefficients see Jackett et al., 2006: J. Atm. Ocean Tech.
+!> eqn_state_seawater calculates the potential density referred at hyp(0).
+!> eqn_state_seawater_func calculates density.
+!> TODO: so far, routine is not adjusted to use topography
+!------------------------------------------------------------------------------!
+ SUBROUTINE eqn_state_seawater
+
+    USE arrays_3d,                                                             &
+        ONLY:  hyp, prho, pt_p, rho_ocean, sa_p
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+    USE surface_mod,                                                           &
+        ONLY :  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i       !< running index x direction
+    INTEGER(iwp) ::  j       !< running index y direction
+    INTEGER(iwp) ::  k       !< running index z direction
+    INTEGER(iwp) ::  m       !< running index surface elements
+
+    REAL(wp) ::  pden   !< temporary scalar user for calculating density
+    REAL(wp) ::  pnom   !< temporary scalar user for calculating density
+    REAL(wp) ::  p1     !< temporary scalar user for calculating density
+    REAL(wp) ::  p2     !< temporary scalar user for calculating density
+    REAL(wp) ::  p3     !< temporary scalar user for calculating density
+    REAL(wp) ::  pt1    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt2    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt3    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt4    !< temporary scalar user for calculating density
+    REAL(wp) ::  sa1    !< temporary scalar user for calculating density
+    REAL(wp) ::  sa15   !< temporary scalar user for calculating density
+    REAL(wp) ::  sa2    !< temporary scalar user for calculating density
+
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+!
+!--          Pressure is needed in dbar
+             p1 = hyp(k) * 1E-4_wp
+             p2 = p1 * p1
+             p3 = p2 * p1
+
+!
+!--          Temperature needed in degree Celsius
+             pt1 = pt_p(k,j,i) - 273.15_wp
+             pt2 = pt1 * pt1
+             pt3 = pt1 * pt2
+             pt4 = pt2 * pt2
+
+             sa1  = sa_p(k,j,i)
+             sa15 = sa1 * SQRT( sa1 )
+             sa2  = sa1 * sa1
+
+             pnom = nom(1)           + nom(2)*pt1     + nom(3)*pt2     +       &
+                    nom(4)*pt3       + nom(5)*sa1     + nom(6)*sa1*pt1 +       &
+                    nom(7)*sa2
+
+             pden = den(1)           + den(2)*pt1     + den(3)*pt2     +       &
+                    den(4)*pt3       + den(5)*pt4     + den(6)*sa1     +       &
+                    den(7)*sa1*pt1   + den(8)*sa1*pt3 + den(9)*sa15    +       &
+                    den(10)*sa15*pt2
+!
+!--          Potential density (without pressure terms)
+             prho(k,j,i) = pnom / pden
+
+             pnom = pnom +             nom(8)*p1      + nom(9)*p1*pt2  +       &
+                    nom(10)*p1*sa1   + nom(11)*p2     + nom(12)*p2*pt2
+
+             pden = pden +             den(11)*p1     + den(12)*p2*pt3 +       &
+                    den(13)*p3*pt1
+
+!
+!--          In-situ density
+             rho_ocean(k,j,i) = pnom / pden
+
+          ENDDO
+
+!
+!--       Neumann conditions are assumed at top boundary and currently also at
+!--       bottom boundary (see comment lines below)
+          prho(nzt+1,j,i)      = prho(nzt,j,i)
+          rho_ocean(nzt+1,j,i) = rho_ocean(nzt,j,i)
+
+       ENDDO
+    ENDDO
+!
+!-- Neumann conditions at up/downward-facing surfaces
+    !$OMP PARALLEL DO PRIVATE( i, j, k )
+    DO  m = 1, bc_h(0)%ns
+       i = bc_h(0)%i(m)
+       j = bc_h(0)%j(m)
+       k = bc_h(0)%k(m)
+       prho(k-1,j,i)      = prho(k,j,i)
+       rho_ocean(k-1,j,i) = rho_ocean(k,j,i)
+    ENDDO
+!
+!-- Downward facing surfaces
+    !$OMP PARALLEL DO PRIVATE( i, j, k )
+    DO  m = 1, bc_h(1)%ns
+       i = bc_h(1)%i(m)
+       j = bc_h(1)%j(m)
+       k = bc_h(1)%k(m)
+       prho(k+1,j,i)      = prho(k,j,i)
+       rho_ocean(k+1,j,i) = rho_ocean(k,j,i)
+    ENDDO
+
+ END SUBROUTINE eqn_state_seawater
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Same as above, but for grid point i,j
+!------------------------------------------------------------------------------!
+ SUBROUTINE eqn_state_seawater_ij( i, j )
+
+    USE arrays_3d,                                                             &
+        ONLY:  hyp, prho, pt_p, rho_ocean, sa_p
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzt
+
+    USE surface_mod,                                                           &
+       ONLY :  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i       !< running index x direction
+    INTEGER(iwp) ::  j       !< running index y direction
+    INTEGER(iwp) ::  k       !< running index z direction
+    INTEGER(iwp) ::  m       !< running index surface elements
+    INTEGER(iwp) ::  surf_e  !< end index of surface elements at (j,i)-gridpoint
+    INTEGER(iwp) ::  surf_s  !< start index of surface elements at (j,i)-gridpoint
+
+    REAL(wp) ::  pden   !< temporary scalar user for calculating density
+    REAL(wp) ::  pnom   !< temporary scalar user for calculating density
+    REAL(wp) ::  p1     !< temporary scalar user for calculating density
+    REAL(wp) ::  p2     !< temporary scalar user for calculating density
+    REAL(wp) ::  p3     !< temporary scalar user for calculating density
+    REAL(wp) ::  pt1    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt2    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt3    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt4    !< temporary scalar user for calculating density
+    REAL(wp) ::  sa1    !< temporary scalar user for calculating density
+    REAL(wp) ::  sa15   !< temporary scalar user for calculating density
+    REAL(wp) ::  sa2    !< temporary scalar user for calculating density
+
+    DO  k = nzb+1, nzt
+!
+!--    Pressure is needed in dbar
+       p1 = hyp(k) * 1E-4_wp
+       p2 = p1 * p1
+       p3 = p2 * p1
+!
+!--    Temperature needed in degree Celsius
+       pt1 = pt_p(k,j,i) - 273.15_wp
+       pt2 = pt1 * pt1
+       pt3 = pt1 * pt2
+       pt4 = pt2 * pt2
+
+       sa1  = sa_p(k,j,i)
+       sa15 = sa1 * SQRT( sa1 )
+       sa2  = sa1 * sa1
+
+       pnom = nom(1)           + nom(2)*pt1     + nom(3)*pt2     +             &
+              nom(4)*pt3       + nom(5)*sa1     + nom(6)*sa1*pt1 + nom(7)*sa2
+
+       pden = den(1)           + den(2)*pt1     + den(3)*pt2     +             &
+              den(4)*pt3       + den(5)*pt4     + den(6)*sa1     +             &
+              den(7)*sa1*pt1   + den(8)*sa1*pt3 + den(9)*sa15    +             &
+              den(10)*sa15*pt2
+!
+!--    Potential density (without pressure terms)
+       prho(k,j,i) = pnom / pden
+
+       pnom = pnom +             nom(8)*p1      + nom(9)*p1*pt2  +             &
+              nom(10)*p1*sa1   + nom(11)*p2     + nom(12)*p2*pt2
+       pden = pden +             den(11)*p1     + den(12)*p2*pt3 +             &
+              den(13)*p3*pt1
+
+!
+!--    In-situ density
+       rho_ocean(k,j,i) = pnom / pden
+
+    ENDDO
+!
+!-- Neumann conditions at up/downward-facing walls
+    surf_s = bc_h(0)%start_index(j,i)
+    surf_e = bc_h(0)%end_index(j,i)
+    DO  m = surf_s, surf_e
+       k = bc_h(0)%k(m)
+       prho(k-1,j,i)      = prho(k,j,i)
+       rho_ocean(k-1,j,i) = rho_ocean(k,j,i)
+    ENDDO
+!
+!-- Downward facing surfaces
+    surf_s = bc_h(1)%start_index(j,i)
+    surf_e = bc_h(1)%end_index(j,i)
+    DO  m = surf_s, surf_e
+       k = bc_h(1)%k(m)
+       prho(k+1,j,i)      = prho(k,j,i)
+       rho_ocean(k+1,j,i) = rho_ocean(k,j,i)
+    ENDDO
+!
+!-- Neumann condition are assumed at top boundary
+    prho(nzt+1,j,i)      = prho(nzt,j,i)
+    rho_ocean(nzt+1,j,i) = rho_ocean(nzt,j,i)
+
+ END SUBROUTINE eqn_state_seawater_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Equation of state for seawater as a function
+!------------------------------------------------------------------------------!
+ REAL(wp) FUNCTION eqn_state_seawater_func( p, pt, sa )
+
+    IMPLICIT NONE
+
+    REAL(wp) ::  p      !< temporary scalar user for calculating density
+    REAL(wp) ::  p1     !< temporary scalar user for calculating density
+    REAL(wp) ::  p2     !< temporary scalar user for calculating density
+    REAL(wp) ::  p3     !< temporary scalar user for calculating density
+    REAL(wp) ::  pt     !< temporary scalar user for calculating density
+    REAL(wp) ::  pt1    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt2    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt3    !< temporary scalar user for calculating density
+    REAL(wp) ::  pt4    !< temporary scalar user for calculating density
+    REAL(wp) ::  sa     !< temporary scalar user for calculating density
+    REAL(wp) ::  sa15   !< temporary scalar user for calculating density
+    REAL(wp) ::  sa2    !< temporary scalar user for calculating density
+
+!
+!-- Pressure is needed in dbar
+    p1 = p  * 1.0E-4_wp
+    p2 = p1 * p1
+    p3 = p2 * p1
+
+!
+!-- Temperature needed in degree Celsius
+    pt1 = pt - 273.15_wp
+    pt2 = pt1 * pt1
+    pt3 = pt1 * pt2
+    pt4 = pt2 * pt2
+
+    sa15 = sa * SQRT( sa )
+    sa2  = sa * sa
+
+
+    eqn_state_seawater_func =                                                  &
+         ( nom(1)        + nom(2)*pt1       + nom(3)*pt2    + nom(4)*pt3     + &
+           nom(5)*sa     + nom(6)*sa*pt1    + nom(7)*sa2    + nom(8)*p1      + &
+           nom(9)*p1*pt2 + nom(10)*p1*sa    + nom(11)*p2    + nom(12)*p2*pt2   &
+         ) /                                                                   &
+         ( den(1)        + den(2)*pt1       + den(3)*pt2    + den(4)*pt3     + &
+           den(5)*pt4    + den(6)*sa        + den(7)*sa*pt1 + den(8)*sa*pt3  + &
+           den(9)*sa15   + den(10)*sa15*pt2 + den(11)*p1    + den(12)*p2*pt3 + &
+           den(13)*p3*pt1                                                      &
+         )
+
+
+ END FUNCTION eqn_state_seawater_func
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads the ocean parameters namelist
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_parin
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file
+
+
+    NAMELIST /ocean_parameters/  bc_sa_t, bottom_salinityflux, salinity,       &
+             sa_surface, sa_vertical_gradient, sa_vertical_gradient_level,     &
+             stokes_waveheight, stokes_wavelength, surface_cooling_spinup_time,&
+             top_salinityflux, wall_salinityflux, wave_breaking
+
+!
+!-- Try to find the namelist
+    REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&ocean_parameters' ) == 0 )
+       READ ( 11, '(A)', END=12 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read namelist
+    READ ( 11, ocean_parameters, ERR = 10 )
+!
+!-- Set switch that enables PALM's ocean mode
+    ocean_mode = .TRUE.
+
+    GOTO 12
+
+ 10 BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'ocean_parameters', line )
+
+ 12 CONTINUE
+
+ END SUBROUTINE ocean_parin
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for the ocean mode
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_check_parameters
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_char, coupling_mode, initializing_actions,             &
+               message_string, use_top_fluxes
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+    IMPLICIT NONE
+
+
+!
+!-- Check for invalid combinations
+    IF ( nested_run )  THEN
+       message_string = 'ocean mode not allowed for nesting'
+       CALL message( 'ocean_check_parameters', 'PA0510', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+       message_string = 'ocean mode does not allow cyclic-fill initialization'
+       CALL message( 'ocean_check_parameters', 'PA0511', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check ocean setting
+    IF ( TRIM( coupling_mode ) == 'uncoupled'  .AND.                           &
+         TRIM( coupling_char ) == '_O' .AND.                                   &
+         .NOT. ocean_mode )  THEN
+
+!
+!--    Check whether an (uncoupled) atmospheric run has been declared as an
+!--    ocean run (this setting is done via palmrun-option -y)
+       message_string = 'ocean mode does not allow coupling_char = "' //       &
+                        TRIM( coupling_char ) // '" set by palmrun-option "-y"'
+       CALL message( 'ocean_check_parameters', 'PA0317', 1, 2, 0, 6, 0 )
+
+    ENDIF
+
+!
+!-- Ocean version must use flux boundary conditions at the top
+    IF ( .NOT. use_top_fluxes )  THEN
+       message_string = 'use_top_fluxes must be .TRUE. in ocean mode'
+       CALL message( 'ocean_check_parameters', 'PA0042', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Boundary conditions for salinity
+    IF ( bc_sa_t == 'dirichlet' )  THEN
+       ibc_sa_t = 0
+    ELSEIF ( bc_sa_t == 'neumann' )  THEN
+       ibc_sa_t = 1
+    ELSE
+       message_string = 'unknown boundary condition: bc_sa_t = "' //           &
+                        TRIM( bc_sa_t ) // '"'
+       CALL message( 'ocean_check_parameters', 'PA0068', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( top_salinityflux == 9999999.9_wp )  constant_top_salinityflux = .FALSE.
+
+    IF ( .NOT. salinity )  THEN
+       IF ( ( bottom_salinityflux /= 0.0_wp  .AND.                             &
+              bottom_salinityflux /= 9999999.9_wp )  .OR.                      &
+            ( top_salinityflux /= 0.0_wp     .AND.                             &
+              top_salinityflux /= 9999999.9_wp ) )                             &
+       THEN
+          message_string = 'salinityflux must not be set for ocean run ' //    &
+                           'without salinity'
+          CALL message( 'ocean_check_parameters', 'PA0509', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( ibc_sa_t == 1  .AND.  top_salinityflux == 9999999.9_wp )  THEN
+       message_string = 'boundary condition: bc_sa_t = "' //                   &
+                        TRIM( bc_sa_t ) // '" requires to set top_salinityflux'
+       CALL message( 'ocean_check_parameters', 'PA0069', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- A fixed salinity at the top implies Dirichlet boundary condition for
+!-- salinity. In this case specification of a constant salinity flux is
+!-- forbidden.
+    IF ( ibc_sa_t == 0  .AND.  constant_top_salinityflux  .AND.                &
+         top_salinityflux /= 0.0_wp )  THEN
+       message_string = 'boundary condition: bc_sa_t = "' //                   &
+                        TRIM( bc_sa_t ) // '" is not allowed with ' //         &
+                        'top_salinityflux /= 0.0'
+       CALL message( 'ocean_check_parameters', 'PA0070', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Check if Stokes force is to be used
+    IF ( stokes_waveheight /= 0.0_wp  .AND.  stokes_wavelength /= 0.0_wp )  THEN
+       stokes_force = .TRUE.
+    ELSE
+       IF ( ( stokes_waveheight <= 0.0_wp .AND. stokes_wavelength > 0.0_wp ) &
+            .OR.                                                               &
+            ( stokes_waveheight > 0.0_wp .AND. stokes_wavelength <= 0.0_wp ) &
+            .OR.                                                               &
+            ( stokes_waveheight < 0.0_wp .AND. stokes_wavelength < 0.0_wp  ) ) &
+       THEN
+          message_string = 'wrong settings for stokes_wavelength and/or ' //   &
+                           'stokes_waveheight'
+          CALL message( 'ocean_check_parameters', 'PA0460', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE ocean_check_parameters
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_check_data_output( var, unit )
+ 
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit     !< unit of output variable
+    CHARACTER (LEN=*) ::  var      !< name of output variable
+
+
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'rho_sea_water' )
+          unit = 'kg/m3'
+
+       CASE ( 'sa' )
+          unit = 'psu'
+
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+ END SUBROUTINE ocean_check_data_output
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output of profiles
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_check_data_output_pr( variable, var_count, unit, dopr_unit )
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  data_output_pr, message_string
+
+    USE indices
+
+    USE profil_parameter
+
+    USE statistics
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit      !<
+    CHARACTER (LEN=*) ::  variable  !<
+    CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
+
+    INTEGER(iwp) ::  var_count     !<
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'prho' )
+          dopr_index(var_count) = 71
+          dopr_unit             = 'kg/m3'
+          hom(:,2,71,:) = SPREAD( zu, 2, statistic_regions+1 )
+          unit = dopr_unit
+
+       CASE ( 'rho_sea_water' )
+          dopr_index(var_count) = 64
+          dopr_unit             = 'kg/m3'
+          hom(:,2,64,:) = SPREAD( zu, 2, statistic_regions+1 )
+          IF ( data_output_pr(var_count)(1:1) == '#' )  THEN
+             dopr_initial_index(var_count) = 77
+             hom(:,2,77,:)             = SPREAD( zu, 2, statistic_regions+1 )
+             hom(nzb,2,77,:)           = 0.0_wp    ! because zu(nzb) is negative
+             data_output_pr(var_count) = data_output_pr(var_count)(2:)
+          ENDIF
+          unit = dopr_unit
+
+       CASE ( 'sa', '#sa' )
+          dopr_index(var_count) = 23
+          dopr_unit             = 'psu'
+          hom(:,2,23,:) = SPREAD( zu, 2, statistic_regions+1 )
+          IF ( data_output_pr(var_count)(1:1) == '#' )  THEN
+             dopr_initial_index(var_count) = 26
+             hom(:,2,26,:)             = SPREAD( zu, 2, statistic_regions+1 )
+             hom(nzb,2,26,:)           = 0.0_wp    ! because zu(nzb) is negative
+             data_output_pr(var_count) = data_output_pr(var_count)(2:)
+          ENDIF
+          unit = dopr_unit
+
+       CASE ( 'w"sa"' )
+          dopr_index(var_count) = 65
+          dopr_unit             = 'psu m/s'
+          hom(:,2,65,:) = SPREAD( zw, 2, statistic_regions+1 )
+          unit = dopr_unit
+
+       CASE ( 'w*sa*' )
+          dopr_index(var_count) = 66
+          dopr_unit             = 'psu m/s'
+          hom(:,2,66,:) = SPREAD( zw, 2, statistic_regions+1 )
+          unit = dopr_unit
+
+       CASE ( 'wsa' )
+          dopr_index(var_count) = 67
+          dopr_unit             = 'psu m/s'
+          hom(:,2,67,:) = SPREAD( zw, 2, statistic_regions+1 )
+          unit = dopr_unit
+
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+
+ END SUBROUTINE ocean_check_data_output_pr
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_x   !< x grid of output variable
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_y   !< y grid of output variable
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_z   !< z grid of output variable
+    CHARACTER (LEN=*), INTENT(IN)  ::  var      !< name of output variable
+
+    LOGICAL, INTENT(OUT) ::  found   !< flag if output variable is found
+
+    found  = .TRUE.
+
+!
+!-- Check for the grid
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'rho_sea_water', 'rho_sea_water_xy', 'rho_sea_water_xz', &
+              'rho_sea_water_yz', 'sa', 'sa_xy', 'sa_xz', 'sa_yz' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'
+
+       CASE DEFAULT
+          found  = .FALSE.
+          grid_x = 'none'
+          grid_y = 'none'
+          grid_z = 'none'
+
+    END SELECT
+
+ END SUBROUTINE ocean_define_netcdf_grid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Average 3D data.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_3d_data_averaging( mode, variable )
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  rho_ocean, sa
+
+    USE averaging,                                                             &
+        ONLY:  rho_ocean_av, sa_av
+
+    USE control_parameters,                                                    &
+        ONLY:  average_count_3d
+
+    USE indices,                                                               &
+        ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode       !< flag defining mode 'allocate', 'sum' or 'average'
+    CHARACTER (LEN=*) ::  variable   !< name of variable
+
+    INTEGER(iwp) ::  i   !< loop index
+    INTEGER(iwp) ::  j   !< loop index
+    INTEGER(iwp) ::  k   !< loop index
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'rho_sea_water' )
+             IF ( .NOT. ALLOCATED( rho_ocean_av ) )  THEN
+                ALLOCATE( rho_ocean_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             rho_ocean_av = 0.0_wp
+
+          CASE ( 'sa' )
+             IF ( .NOT. ALLOCATED( sa_av ) )  THEN
+                ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             sa_av = 0.0_wp
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'rho_sea_water' )
+             IF ( ALLOCATED( rho_ocean_av ) )  THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rho_ocean_av(k,j,i) = rho_ocean_av(k,j,i) +           &
+                                               rho_ocean(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'sa' )
+             IF ( ALLOCATED( sa_av ) )  THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         sa_av(k,j,i) = sa_av(k,j,i) + sa(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'rho_sea_water' )
+             IF ( ALLOCATED( rho_ocean_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rho_ocean_av(k,j,i) = rho_ocean_av(k,j,i) /           &
+                                               REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'sa' )
+             IF ( ALLOCATED( sa_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         sa_av(k,j,i) = sa_av(k,j,i) /                         &
+                                        REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+       END SELECT
+
+    ENDIF
+
+ END SUBROUTINE ocean_3d_data_averaging
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define 2D output variables.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_data_output_2d( av, variable, found, grid, mode, local_pf,   &
+                                  nzb_do, nzt_do )
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  rho_ocean, sa
+
+    USE averaging,                                                             &
+        ONLY:  rho_ocean_av, sa_av
+
+    USE indices,                                                               &
+        ONLY: nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,            &
+              wall_flags_0
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid       !< name of vertical grid
+    CHARACTER (LEN=*) ::  mode       !< either 'xy', 'xz' or 'yz'
+    CHARACTER (LEN=*) ::  variable   !< name of variable
+
+    INTEGER(iwp) ::  av        !< flag for (non-)average output
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+    INTEGER(iwp) ::  i         !< loop index
+    INTEGER(iwp) ::  j         !< loop index
+    INTEGER(iwp) ::  k         !< loop index
+    INTEGER(iwp) ::  nzb_do    !< vertical output index (bottom)
+    INTEGER(iwp) ::  nzt_do    !< vertical output index (top)
+
+    LOGICAL ::  found   !< flag if output variable is found
+    LOGICAL ::  resorted  !< flag if output is already resorted
+
+    REAL(wp) ::  fill_value = -999.0_wp  !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< local
+       !< array to which output data is resorted to
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to selected output variable
+    
+    found = .TRUE.
+    resorted = .FALSE.
+!
+!-- Set masking flag for topography for not resorted arrays
+    flag_nr = 0
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'rho_sea_water_xy', 'rho_sea_water_xz', 'rho_sea_water_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rho_ocean
+          ELSE
+             IF ( .NOT. ALLOCATED( rho_ocean_av ) ) THEN
+                ALLOCATE( rho_ocean_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                rho_ocean_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => rho_ocean_av
+          ENDIF
+
+       CASE ( 'sa_xy', 'sa_xz', 'sa_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => sa
+          ELSE
+             IF ( .NOT. ALLOCATED( sa_av ) ) THEN
+                ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                sa_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => sa_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+
+    IF ( found .AND. .NOT. resorted )  THEN
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb_do, nzt_do
+                local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),                &
+                                         REAL( fill_value, KIND = wp ),        &
+                                         BTEST( wall_flags_0(k,j,i), flag_nr ) )
+             ENDDO
+          ENDDO
+       ENDDO
+       resorted = .TRUE.
+    ENDIF
+ 
+ END SUBROUTINE ocean_data_output_2d
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define 3D output variables.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  rho_ocean, sa
+
+    USE averaging,                                                             &
+        ONLY:  rho_ocean_av, sa_av
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,           &
+               wall_flags_0
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable   !< name of variable
+
+    INTEGER(iwp) ::  av        !< flag for (non-)average output
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+    INTEGER(iwp) ::  i         !< loop index
+    INTEGER(iwp) ::  j         !< loop index
+    INTEGER(iwp) ::  k         !< loop index
+    INTEGER(iwp) ::  nzb_do    !< lower limit of the data output (usually 0)
+    INTEGER(iwp) ::  nzt_do    !< vertical upper limit of the data output (usually nz_do3d)
+
+    LOGICAL ::  found     !< flag if output variable is found
+    LOGICAL ::  resorted  !< flag if output is already resorted
+
+    REAL(wp) ::  fill_value = -999.0_wp  !< value for the _FillValue attribute
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf   !< local
+                                  !< array to which output data is resorted to
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to selected output variable
+
+    found = .TRUE.
+    resorted = .FALSE.
+!
+!-- Set masking flag for topography for not resorted arrays
+    flag_nr = 0
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'rho_sea_water' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rho_ocean
+          ELSE
+             IF ( .NOT. ALLOCATED( rho_ocean_av ) ) THEN
+                ALLOCATE( rho_ocean_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                rho_ocean_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => rho_ocean_av
+          ENDIF
+
+       CASE ( 'sa' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => sa
+          ELSE
+             IF ( .NOT. ALLOCATED( sa_av ) ) THEN
+                ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                sa_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => sa_av
+          ENDIF
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+    IF ( found  .AND.  .NOT. resorted )  THEN
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb_do, nzt_do
+                local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),                &
+                                         REAL( fill_value, KIND = wp ),        &
+                                         BTEST( wall_flags_0(k,j,i), flag_nr ) )
+             ENDDO
+          ENDDO
+       ENDDO
+       resorted = .TRUE.
+    ENDIF
+
+ END SUBROUTINE ocean_data_output_3d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for ocean parameters
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_header( io )
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  io   !< Unit of the output file
+
+!
+!-- Write ocean header
+    WRITE( io, 1 )
+    IF ( stokes_force  )  WRITE( io, 2 )  stokes_waveheight, stokes_wavelength
+    IF ( wave_breaking )  THEN
+       WRITE( io, 3 )  alpha_wave_breaking, timescale_wave_breaking
+    ENDIF
+    IF ( .NOT. salinity )  WRITE( io, 4 )
+    IF ( surface_cooling_spinup_time /= 999999.9_wp )  THEN
+       WRITE( io, 5 )  surface_cooling_spinup_time
+    ENDIF
+
+1   FORMAT (//' Ocean settings:'/                                              &
+              ' ------------------------------------------'/)
+2   FORMAT ('    --> Craik-Leibovich vortex force and Stokes drift switched',  &
+                     ' on'/                                                    &
+            '        waveheight: ',F4.1,' m   wavelength: ',F6.1,' m')
+3   FORMAT ('    --> wave breaking generated turbulence switched on'/          &
+            '        alpha:    ',F4.1/                                         &
+            '        timescale:',F5.1,' s')
+4   FORMAT ('    --> prognostic salinity equation is switched off' )
+5   FORMAT ('    --> surface heat flux is switched off after ',F8.1,' s')
+
+ END SUBROUTINE ocean_header
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate arrays and assign pointers.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_init_arrays
+
+    USE indices,                                                               &
+        ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+    IMPLICIT NONE
+
+#if defined( __nopointer )
+    ALLOCATE( prho(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              rho_ocean(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                        &
+              sa(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                               &
+              sa_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              tsa_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#else
+    ALLOCATE( prho_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                           &
+              rho_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                            &
+              sa_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                             &
+              sa_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+    IF (  salinity )  THEN
+       ALLOCATE( sa_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ENDIF
+
+    prho => prho_1
+    rho_ocean  => rho_1  ! routines calc_mean_profile and diffusion_e require
+                         ! density to be a pointer
+#endif
+
+#if ! defined( __nopointer )
+!
+!-- Initial assignment of pointers
+    IF ( salinity )  THEN
+       sa => sa_1;  sa_p => sa_2;  tsa_m => sa_3
+    ELSE
+       sa => sa_1;  sa_p => sa_1;  tsa_m => sa_3
+    ENDIF
+#endif
+
+ END SUBROUTINE ocean_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of quantities needed for the ocean mode
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_init
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzu, dzw, hyp, pt_init, ref_state, u_stokes_zu, u_stokes_zw,    &
+               v_stokes_zu, v_stokes_zw, zu, zw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE control_parameters,                                                    &
+        ONLY:  initializing_actions, molecular_viscosity, rho_surface,         &
+               rho_reference, surface_pressure, top_momentumflux_u,            &
+               top_momentumflux_v, use_single_reference_value
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxrg, nyng, nys, nysg, nzb, nzt
+
+    USE kinds
+
+    USE pegrid,                                                                &
+        ONLY:  myid
+
+    USE statistics,                                                            &
+        ONLY:  hom, statistic_regions
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< loop index
+    INTEGER(iwp) ::  j  !< loop index
+    INTEGER(iwp) ::  k  !< loop index
+    INTEGER(iwp) ::  n  !< loop index
+
+    REAL(wp) ::  alpha !< angle of surface stress
+    REAL(wp) ::  dum   !< dummy argument
+    REAL(wp) ::  pt_l  !< local scalar for pt used in equation of state function
+    REAL(wp) ::  sa_l  !< local scalar for sa used in equation of state function
+    REAL(wp) ::  velocity_amplitude  !< local scalar for amplitude of Stokes drift velocity
+    REAL(wp) ::  x     !< temporary variable to store surface stress along x
+    REAL(wp) ::  y     !< temporary variable to store surface stress along y
+
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  rho_ocean_init  !< local array for initial density
+
+    ALLOCATE( hyp(nzb:nzt+1) )
+
+
+!
+!-- In case of no restart run, calculate the inital salinity profilevcusing the
+!-- given salinity gradients
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+
+       sa_init = sa_surface
+!
+!--    Last arguments gives back the gradient at top level to be used as
+!--    possible Neumann boundary condition. This is not realized for the ocean
+!--    mode, therefore a dummy argument is used.
+       IF ( salinity )  THEN
+          CALL init_vertical_profiles( sa_vertical_gradient_level_ind,          &
+                                       sa_vertical_gradient_level,              &
+                                       sa_vertical_gradient, sa_init,           &
+                                       sa_surface, dum )
+       ENDIF
+    ENDIF
+
+!
+!-- Initialize required 3d-arrays
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+!
+!--    Initialization via computed 1D-model profiles
+       IF ( INDEX( initializing_actions, 'set_constant_profiles' ) /= 0 )  THEN
+
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                sa(:,j,i) = sa_init
+             ENDDO
+          ENDDO
+
+       ENDIF
+!
+!--    Store initial profiles for output purposes etc.
+!--    Store initial salinity profile
+       hom(:,1,26,:)  = SPREAD( sa(:,nys,nxl), 2, statistic_regions+1 )
+!
+!--    Initialize old and new time levels.
+       tsa_m = 0.0_wp
+       sa_p  = sa
+
+    ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
+
+!
+!--    Initialize new time levels (only done in order to set boundary values
+!--    including ghost points)
+       sa_p = sa
+!
+!--    Allthough tendency arrays are set in prognostic_equations, they have
+!--    have to be predefined here because they are used (but multiplied with 0)
+!--    there before they are set.
+       tsa_m = 0.0_wp
+
+    ENDIF
+
+!
+!-- Set water density near the ocean surface
+    rho_surface = 1027.62_wp
+
+!
+!-- Set kinematic viscosity to sea water at 20C.
+!-- This changes the default value that is given for air!
+    molecular_viscosity = 1.05E-6_wp
+
+!
+!-- Change sign of buoyancy/stability terms because density gradient is used
+!-- instead of the potential temperature gradient to calculate the buoyancy
+    atmos_ocean_sign = -1.0_wp
+
+!
+!-- Calculate initial vertical profile of hydrostatic pressure (in Pa)
+!-- and the reference density (used later in buoyancy term)
+!-- First step: Calculate pressure using reference density
+    hyp(nzt+1) = surface_pressure * 100.0_wp
+    hyp(nzt)   = hyp(nzt+1) + rho_surface * g * 0.5_wp * dzu(nzt+1)
+    rho_ocean_init(nzt)   = rho_surface
+    rho_ocean_init(nzt+1) = rho_surface  ! only required for output
+
+    DO  k = nzt-1, 1, -1
+       hyp(k) = hyp(k+1) + rho_surface * g * dzu(k)
+    ENDDO
+    hyp(0) = hyp(1) + rho_surface * g * dzu(1)
+
+!
+!-- Second step: Iteratively calculate in situ density (based on presssure)
+!-- and pressure (based on in situ density)
+    DO  n = 1, 5
+
+       rho_reference = rho_surface * 0.5_wp * dzu(nzt+1)
+
+       DO  k = nzt, 0, -1
+
+          sa_l = 0.5_wp * ( sa_init(k) + sa_init(k+1) )
+          pt_l = 0.5_wp * ( pt_init(k) + pt_init(k+1) )
+
+          rho_ocean_init(k) = eqn_state_seawater_func( hyp(k), pt_l, sa_l )
+
+          rho_reference = rho_reference + rho_ocean_init(k) * dzu(k+1)
+
+       ENDDO
+
+       rho_reference = rho_reference / ( zw(nzt) - zu(nzb) )
+
+       hyp(nzt) = hyp(nzt+1) + rho_surface * g * 0.5_wp * dzu(nzt+1)
+       DO  k = nzt-1, 0, -1
+          hyp(k) = hyp(k+1) + g * 0.5_wp * ( rho_ocean_init(k)                 &
+                                           + rho_ocean_init(k+1) ) * dzu(k+1)
+       ENDDO
+
+    ENDDO
+
+!
+!-- Calculate the reference potential density
+    prho_reference = 0.0_wp
+    DO  k = 0, nzt
+
+       sa_l = 0.5_wp * ( sa_init(k) + sa_init(k+1) )
+       pt_l = 0.5_wp * ( pt_init(k) + pt_init(k+1) )
+
+       prho_reference = prho_reference + dzu(k+1) * &
+                        eqn_state_seawater_func( 0.0_wp, pt_l, sa_l )
+
+    ENDDO
+
+    prho_reference = prho_reference / ( zu(nzt) - zu(nzb) )
+
+!
+!-- Calculate the 3d array of initial in situ and potential density,
+!-- based on the initial temperature and salinity profile
+    CALL eqn_state_seawater
+
+!
+!-- Store initial density profile
+    hom(:,1,77,:)  = SPREAD( rho_ocean_init(:), 2, statistic_regions+1 )
+
+!
+!-- Set the reference state to be used in the buoyancy terms
+    IF ( use_single_reference_value )  THEN
+       ref_state(:) = rho_reference
+    ELSE
+       ref_state(:) = rho_ocean_init(:)
+    ENDIF
+
+!
+!-- Calculate the Stokes drift velocity profile
+    IF ( stokes_force )  THEN
+
+!
+!--    First, calculate angle of surface stress
+       x = -top_momentumflux_u
+       y = -top_momentumflux_v
+       IF ( x == 0.0_wp )  THEN
+          IF ( y > 0.0_wp )  THEN
+             alpha = pi / 2.0_wp
+          ELSEIF ( y < 0.0_wp )  THEN
+             alpha = 3.0_wp * pi / 2.0_wp
+          ENDIF
+       ELSE
+          IF ( x < 0.0_wp )  THEN
+             alpha = ATAN( y / x ) + pi
+          ELSE
+             IF ( y < 0.0_wp )  THEN
+                alpha = ATAN( y / x ) + 2.0_wp * pi
+             ELSE
+                alpha = ATAN( y / x )
+             ENDIF
+          ENDIF
+       ENDIF
+
+       velocity_amplitude = ( pi * stokes_waveheight / stokes_wavelength )**2 *&
+                            SQRT( g * stokes_wavelength / ( 2.0_wp * pi ) )
+
+       DO  k = nzb, nzt
+          u_stokes_zu(k) = velocity_amplitude * COS( alpha ) *                 &
+                           EXP( 4.0_wp * pi * zu(k) / stokes_wavelength )
+          u_stokes_zw(k) = velocity_amplitude * COS( alpha ) *                 &
+                           EXP( 4.0_wp * pi * zw(k) / stokes_wavelength )
+          v_stokes_zu(k) = velocity_amplitude * SIN( alpha ) *                 &
+                           EXP( 4.0_wp * pi * zu(k) / stokes_wavelength )
+          v_stokes_zw(k) = velocity_amplitude * SIN( alpha ) *                 &
+                           EXP( 4.0_wp * pi * zw(k) / stokes_wavelength )
+       ENDDO
+       u_stokes_zu(nzt+1) = u_stokes_zw(nzt) ! because zu(nzt+1) changes the sign
+       u_stokes_zw(nzt+1) = u_stokes_zw(nzt) ! because zw(nzt+1) changes the sign
+       v_stokes_zu(nzt+1) = v_stokes_zw(nzt) ! because zu(nzt+1) changes the sign
+       v_stokes_zw(nzt+1) = v_stokes_zw(nzt) ! because zw(nzt+1) changes the sign
+
+    ENDIF
+
+!
+!-- Wave breaking effects
+    IF ( wave_breaking )  THEN
+!
+!--    Calculate friction velocity at ocean surface
+       u_star_wave_breaking = SQRT( SQRT( top_momentumflux_u**2 +              &
+                                          top_momentumflux_v**2 ) )
+!
+!--    Set the time scale of random forcing. The vertical grid spacing at the
+!--    ocean surface is assumed as the length scale of turbulence.
+!--    Formula follows Noh et al. (2004), JPO
+       timescale_wave_breaking = 0.1_wp * dzw(nzt) / alpha_wave_breaking /     &
+                                 u_star_wave_breaking
+!
+!--    Set random number seeds differently on the processor cores in order to
+!--    create different random number sequences
+       iran_ocean = iran_ocean + myid
+    ENDIF
+
+ END SUBROUTINE ocean_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prognostic equation for salinity.
+!> Vector-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_prognostic_equations
+
+    USE advec_s_bc_mod,                                                        &
+        ONLY:  advec_s_bc
+
+    USE advec_s_pw_mod,                                                        &
+        ONLY:  advec_s_pw
+
+    USE advec_s_up_mod,                                                        &
+        ONLY:  advec_s_up
+
+    USE advec_ws,                                                              &
+        ONLY:  advec_s_ws
+
+    USE arrays_3d,                                                             &
+        ONLY:  rdf_sc, tend, tsa_m
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, intermediate_timestep_count,                             &
+               intermediate_timestep_count_max, scalar_advec, simulated_time,  &
+               timestep_scheme, tsc, ws_scheme_sca
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE diffusion_s_mod,                                                       &
+        ONLY:  diffusion_s
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys, nzb, nzt, wall_flags_0
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_v, surf_def_h, surf_lsm_h, surf_lsm_v, surf_usm_h,     &
+               surf_usm_v
+
+    USE user_actions_mod,                                                      &
+        ONLY:  user_actions
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i       !< loop index
+    INTEGER(iwp) ::  j       !< loop index
+    INTEGER(iwp) ::  k       !< loop index
+
+    REAL(wp)     ::  sbt     !< weighting factor for sub-time step
+
+!
+!-- Switch of the surface heat flux, if requested
+    IF ( surface_cooling_spinup_time /= 999999.9_wp )  THEN
+       IF ( .NOT. surface_cooling_switched_off  .AND.                          &
+            simulated_time >= surface_cooling_spinup_time )  THEN
+
+          surf_def_h(2)%shf = 0.0_wp
+          surface_cooling_switched_off = .TRUE.
+
+       ENDIF
+    ENDIF
+
+!
+!-- Compute prognostic equations for the ocean mode
+!-- First, start with salinity
+    IF ( .NOT. salinity )  RETURN
+
+    CALL cpu_log( log_point(37), 'sa-equation', 'start' )
+
+!
+!-- sa-tendency terms with communication
+    sbt = tsc(2)
+    IF ( scalar_advec == 'bc-scheme' )  THEN
+
+       IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--       Bott-Chlond scheme always uses Euler time step. Thus:
+          sbt = 1.0_wp
+       ENDIF
+       tend = 0.0_wp
+       CALL advec_s_bc( sa, 'sa' )
+
+    ENDIF
+
+!
+!-- sa-tendency terms with no communication
+    IF ( scalar_advec /= 'bc-scheme' )  THEN
+       tend = 0.0_wp
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( ws_scheme_sca )  THEN
+             CALL advec_s_ws( sa, 'sa' )
+          ELSE
+             CALL advec_s_pw( sa )
+          ENDIF
+       ELSE
+          CALL advec_s_up( sa )
+       ENDIF
+    ENDIF
+
+    CALL diffusion_s( sa,                                                      &
+                      surf_def_h(0)%sasws, surf_def_h(1)%sasws,                &
+                      surf_def_h(2)%sasws,                                     &
+                      surf_lsm_h%sasws,    surf_usm_h%sasws,                   &
+                      surf_def_v(0)%sasws, surf_def_v(1)%sasws,                &
+                      surf_def_v(2)%sasws, surf_def_v(3)%sasws,                &
+                      surf_lsm_v(0)%sasws, surf_lsm_v(1)%sasws,                &
+                      surf_lsm_v(2)%sasws, surf_lsm_v(3)%sasws,                &
+                      surf_usm_v(0)%sasws, surf_usm_v(1)%sasws,                &
+                      surf_usm_v(2)%sasws, surf_usm_v(3)%sasws )
+
+    CALL user_actions( 'sa-tendency' )
+
+!
+!-- Prognostic equation for salinity
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+             sa_p(k,j,i) = sa(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +         &
+                                                   tsc(3) * tsa_m(k,j,i) )     &
+                                               - tsc(5) * rdf_sc(k) *          &
+                                                 ( sa(k,j,i) - sa_init(k) )    &
+                                       )                                       &
+                                         * MERGE( 1.0_wp, 0.0_wp,              &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) &
+                                                )
+             IF ( sa_p(k,j,i) < 0.0_wp )  sa_p(k,j,i) = 0.1_wp * sa(k,j,i)
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   tsa_m(k,j,i) = tend(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < intermediate_timestep_count_max )&
+       THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   tsa_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +              &
+                                     5.3125_wp * tsa_m(k,j,i)
+                ENDDO
+             ENDDO
+         ENDDO
+       ENDIF
+    ENDIF
+
+    CALL cpu_log( log_point(37), 'sa-equation', 'stop' )
+
+!
+!-- Calculate density by the equation of state for seawater
+    CALL cpu_log( log_point(38), 'eqns-seawater', 'start' )
+    CALL eqn_state_seawater
+    CALL cpu_log( log_point(38), 'eqns-seawater', 'stop' )
+
+ END SUBROUTINE ocean_prognostic_equations
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prognostic equations for ocean mode (so far, salinity only)
+!> Cache-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_prognostic_equations_ij( i, j, i_omp_start, tn )
+
+    USE advec_s_pw_mod,                                                        &
+        ONLY:  advec_s_pw
+
+    USE advec_s_up_mod,                                                        &
+        ONLY:  advec_s_up
+
+    USE advec_ws,                                                              &
+        ONLY:  advec_s_ws
+
+    USE arrays_3d,                                                             &
+        ONLY:  diss_l_sa, diss_s_sa, flux_l_sa, flux_s_sa, rdf_sc, tend, tsa_m
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, intermediate_timestep_count,                             &
+               intermediate_timestep_count_max, simulated_time,                &
+               timestep_scheme, tsc, ws_scheme_sca
+
+    USE diffusion_s_mod,                                                       &
+        ONLY:  diffusion_s
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzt, wall_flags_0
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_v, surf_def_h, surf_lsm_h, surf_lsm_v, surf_usm_h,     &
+               surf_usm_v
+
+    USE user_actions_mod,                                                      &
+        ONLY:  user_actions
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i             !< loop index x direction
+    INTEGER(iwp) ::  i_omp_start   !< first loop index of i-loop in calling    &
+                                   !< routine prognostic_equations
+    INTEGER(iwp) ::  j             !< loop index y direction
+    INTEGER(iwp) ::  k             !< loop index z direction
+    INTEGER(iwp) ::  tn            !< task number of openmp task
+
+
+!
+!-- Switch of the surface heat flux, if requested
+    IF ( surface_cooling_spinup_time /= 999999.9_wp )  THEN
+       IF ( .NOT. surface_cooling_switched_off  .AND.                          &
+            simulated_time >= surface_cooling_spinup_time )  THEN
+
+          surf_def_h(2)%shf = 0.0_wp
+          surface_cooling_switched_off = .TRUE.
+
+       ENDIF
+    ENDIF
+
+!
+!-- Compute prognostic equations for the ocean mode
+!-- First, start with tendency-terms for salinity
+    IF ( .NOT. salinity )  RETURN
+
+    tend(:,j,i) = 0.0_wp
+    IF ( timestep_scheme(1:5) == 'runge' ) &
+    THEN
+       IF ( ws_scheme_sca )  THEN
+          CALL advec_s_ws( i, j, sa, 'sa', flux_s_sa,  diss_s_sa, flux_l_sa,   &
+                           diss_l_sa, i_omp_start, tn  )
+       ELSE
+          CALL advec_s_pw( i, j, sa )
+       ENDIF
+    ELSE
+       CALL advec_s_up( i, j, sa )
+    ENDIF
+    CALL diffusion_s( i, j, sa,                                       &
+                      surf_def_h(0)%sasws, surf_def_h(1)%sasws,       &
+                      surf_def_h(2)%sasws,                            &
+                      surf_lsm_h%sasws,    surf_usm_h%sasws,          &
+                      surf_def_v(0)%sasws, surf_def_v(1)%sasws,       &
+                      surf_def_v(2)%sasws, surf_def_v(3)%sasws,       &
+                      surf_lsm_v(0)%sasws, surf_lsm_v(1)%sasws,       &
+                      surf_lsm_v(2)%sasws, surf_lsm_v(3)%sasws,       &
+                      surf_usm_v(0)%sasws, surf_usm_v(1)%sasws,       &
+                      surf_usm_v(2)%sasws, surf_usm_v(3)%sasws )
+
+    CALL user_actions( i, j, 'sa-tendency' )
+
+!
+!-- Prognostic equation for salinity
+    DO  k = nzb+1, nzt
+
+       sa_p(k,j,i) = sa(k,j,i) + ( dt_3d *                                     &
+                                           ( tsc(2) * tend(k,j,i) +            &
+                                             tsc(3) * tsa_m(k,j,i) )           &
+                                 - tsc(5) * rdf_sc(k)                          &
+                                          * ( sa(k,j,i) - sa_init(k) )         &
+                                 ) * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) )
+
+       IF ( sa_p(k,j,i) < 0.0_wp )  sa_p(k,j,i) = 0.1_wp * sa(k,j,i)
+
+    ENDDO
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  k = nzb+1, nzt
+             tsa_m(k,j,i) = tend(k,j,i)
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < intermediate_timestep_count_max )&
+       THEN
+          DO  k = nzb+1, nzt
+             tsa_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +              &
+                               5.3125_wp * tsa_m(k,j,i)
+          ENDDO
+       ENDIF
+    ENDIF
+
+!
+!-- Calculate density by the equation of state for seawater
+    CALL eqn_state_seawater( i, j )
+
+ END SUBROUTINE ocean_prognostic_equations_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_swap_timelevel( mod_count )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN) ::  mod_count  !< flag defining where pointers point to
+
+#if defined( __nopointer )
+
+    sa = sa_p
+
+#else
+    
+    SELECT CASE ( mod_count )
+
+       CASE ( 0 )
+          IF ( salinity )  THEN
+             sa => sa_1;    sa_p => sa_2
+          ENDIF
+
+       CASE ( 1 )
+          IF ( salinity )  THEN
+             sa => sa_2;    sa_p => sa_1
+          ENDIF
+
+    END SELECT
+
+#endif
+
+ END SUBROUTINE ocean_swap_timelevel
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data for the ocean module.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_rrd_global( found )
+
+
+    USE control_parameters,                                                    &
+        ONLY: length, restart_string
+
+
+    IMPLICIT NONE
+
+    LOGICAL, INTENT(OUT)  ::  found
+
+
+    found = .TRUE.
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'bc_sa_t' )
+          READ ( 13 )  bc_sa_t
+
+       CASE ( 'bottom_salinityflux' )
+          READ ( 13 )  bottom_salinityflux
+
+       CASE ( 'salinity' )
+          READ ( 13 )  salinity
+
+       CASE ( 'sa_init' )
+          READ ( 13 )  sa_init
+
+       CASE ( 'sa_surface' )
+          READ ( 13 )  sa_surface
+
+       CASE ( 'sa_vertical_gradient' )
+          READ ( 13 )  sa_vertical_gradient
+
+       CASE ( 'sa_vertical_gradient_level' )
+          READ ( 13 )  sa_vertical_gradient_level
+
+       CASE ( 'stokes_waveheight' )
+          READ ( 13 )  stokes_waveheight
+
+       CASE ( 'stokes_wavelength' )
+          READ ( 13 )  stokes_wavelength
+
+       CASE ( 'surface_cooling_spinup_time' )
+          READ ( 13 )  surface_cooling_spinup_time
+
+       CASE ( 'top_salinityflux' )
+          READ ( 13 )  top_salinityflux
+
+       CASE ( 'wall_salinityflux' )
+          READ ( 13 )  wall_salinityflux
+
+       CASE ( 'wave_breaking' )
+          READ ( 13 )  wave_breaking
+
+       CASE DEFAULT
+
+          found = .FALSE.
+
+    END SELECT
+
+ END SUBROUTINE ocean_rrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data for the ocean module.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,        &
+                             nxr_on_file, nynf, nync, nyn_on_file, nysf,       &
+                             nysc, nys_on_file, tmp_2d, tmp_3d, found )
+
+    USE averaging,                                                             &
+        ONLY:  rho_ocean_av, sa_av
+
+    USE control_parameters,                                                    &
+        ONLY:  length, restart_string
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxlg, nxrg, nyng, nysg, nzb, nzt
+
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i               !<
+    INTEGER(iwp) ::  k               !<
+    INTEGER(iwp) ::  nxlc            !<
+    INTEGER(iwp) ::  nxlf            !<
+    INTEGER(iwp) ::  nxl_on_file     !<
+    INTEGER(iwp) ::  nxrc            !<
+    INTEGER(iwp) ::  nxrf            !<
+    INTEGER(iwp) ::  nxr_on_file     !<
+    INTEGER(iwp) ::  nync            !<
+    INTEGER(iwp) ::  nynf            !<
+    INTEGER(iwp) ::  nyn_on_file     !<
+    INTEGER(iwp) ::  nysc            !<
+    INTEGER(iwp) ::  nysf            !<
+    INTEGER(iwp) ::  nys_on_file     !<
+
+    LOGICAL, INTENT(OUT)  ::  found
+
+    REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_2d   !<
+    REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !<
+
+
+    found = .TRUE.
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'rho_ocean_av' )
+          IF ( .NOT. ALLOCATED( rho_ocean_av ) )  THEN
+             ALLOCATE( rho_ocean_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rho_ocean_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =            &
+                              tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'sa' )
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          sa(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =                      &
+                              tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'sa_av' )
+          IF ( .NOT. ALLOCATED( sa_av ) )  THEN
+              ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          sa_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =                   &
+                              tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+ END SUBROUTINE ocean_rrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data for the ocean module.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_wrd_global
+
+
+    IMPLICIT NONE
+
+    CALL wrd_write_string( 'bc_sa_t' )
+    WRITE ( 14 )  bc_sa_t
+
+    CALL wrd_write_string( 'bottom_salinityflux' )
+    WRITE ( 14 )  bottom_salinityflux
+
+    CALL wrd_write_string( 'salinity' )
+    WRITE ( 14 )  salinity
+
+    CALL wrd_write_string( 'sa_init' )
+    WRITE ( 14 )  sa_init
+
+    CALL wrd_write_string( 'sa_surface' )
+    WRITE ( 14 )  sa_surface
+
+    CALL wrd_write_string( 'sa_vertical_gradient' )
+    WRITE ( 14 )  sa_vertical_gradient
+
+    CALL wrd_write_string( 'sa_vertical_gradient_level' )
+    WRITE ( 14 )  sa_vertical_gradient_level
+
+    CALL wrd_write_string( 'stokes_waveheight' )
+    WRITE ( 14 )  stokes_waveheight
+
+    CALL wrd_write_string( 'stokes_wavelength' )
+    WRITE ( 14 )  stokes_wavelength
+
+    CALL wrd_write_string( 'surface_cooling_spinup_time' )
+    WRITE ( 14 )  surface_cooling_spinup_time
+
+    CALL wrd_write_string( 'top_salinityflux' )
+    WRITE ( 14 )  top_salinityflux
+
+    CALL wrd_write_string( 'wall_salinityflux' )
+    WRITE ( 14 )  wall_salinityflux
+
+    CALL wrd_write_string( 'wave_breaking' )
+    WRITE ( 14 )  wave_breaking
+
+ END SUBROUTINE ocean_wrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data for the ocean module.
+!------------------------------------------------------------------------------!
+ SUBROUTINE ocean_wrd_local
+
+    USE averaging,                                                             &
+        ONLY:  rho_ocean_av, sa_av
+
+    IMPLICIT NONE
+
+    IF ( ALLOCATED( rho_ocean_av ) )  THEN
+       CALL wrd_write_string( 'rho_ocean_av' )
+       WRITE ( 14 )  rho_ocean_av
+    ENDIF
+
+    CALL wrd_write_string( 'sa' )
+    WRITE ( 14 )  sa
+
+    IF ( ALLOCATED( sa_av ) )  THEN
+       CALL wrd_write_string( 'sa_av' )
+       WRITE ( 14 )  sa_av
+    ENDIF
+
+ END SUBROUTINE ocean_wrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine calculates the Craik Leibovich vortex force and the additional
+!> effect of the Stokes drift on the Coriolis force
+!> Call for all gridpoints.
+!------------------------------------------------------------------------------!
+ SUBROUTINE stokes_drift_terms( component )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, u, u_stokes_zu, u_stokes_zw, v, v_stokes_zu,              &
+               v_stokes_zw, w, tend
+
+    USE control_parameters,                                                    &
+        ONLY:  f, fs, message_string
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nys, nysv, nyn, nzb, nzt
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  component  !< component of momentum equation
+    INTEGER(iwp) ::  i          !< loop index along x
+    INTEGER(iwp) ::  j          !< loop index along y
+    INTEGER(iwp) ::  k          !< loop index along z
+
+
+!
+!-- Compute Stokes terms for the respective velocity components
+    SELECT CASE ( component )
+
+!
+!--    u-component
+       CASE ( 1 )
+          DO  i = nxl, nxr
+             DO  j = nysv, nyn
+                DO  k = nzb+1, nzt
+                   tend(k,j,i) = tend(k,j,i) + v_stokes_zu(k) * (              &
+                                   0.5 * ( v(k,j+1,i) - v(k,j+1,i-1)           &
+                                         + v(k,j,i)   - v(k,j,i-1)   ) * ddx   &
+                                 - 0.5 * ( u(k,j+1,i) - u(k,j-1,i) )   * ddy   &
+                                                                )              &
+                                 + f * v_stokes_zu(k)
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--    v-component
+       CASE ( 2 )
+          DO  i = nxl, nxr
+             DO  j = nysv, nyn
+                DO  k = nzb+1, nzt
+                   tend(k,j,i) = tend(k,j,i) - u_stokes_zu(k) * (              &
+                                   0.5 * ( v(k,j,i+1) - v(k,j,i-1) )   * ddx   &
+                                 - 0.5 * ( u(k,j,i) - u(k,j-1,i)               &
+                                         + u(k,j,i+1) - u(k,j-1,i+1) ) * ddy   &
+                                                                )              &
+                                 - f * u_stokes_zu(k)
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--    w-component
+       CASE ( 3 )
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   tend(k,j,i) = tend(k,j,i) + u_stokes_zw(k) * (              &
+                                             0.5 * ( u(k+1,j,i) - u(k,j,i)     &
+                                                   + u(k+1,j,i+1) - u(k,j,i+1) &
+                                                   ) * ddzu(k+1)               &
+                                           - 0.5 * ( w(k,j,i+1) - w(k,j,i-1)   &
+                                                   ) * ddx      )              &
+                                             - v_stokes_zw(k) * (              &
+                                             0.5 * ( w(k,j+1,i) - w(k,j-1,i)   &
+                                                   ) * ddy                     &
+                                           - 0.5 * ( v(k+1,j,i) - v(k,j,i)     &
+                                                   + v(k+1,j+1,i) - v(k,j+1,i) &
+                                                   ) * ddzu(k)  )              &
+                                           + fs * u_stokes_zw(k)
+                ENDDO
+             ENDDO
+          ENDDO
+
+       CASE DEFAULT
+          WRITE( message_string, * ) 'wrong component of Stokes force: ',      &
+                                     component
+          CALL message( 'stokes_drift_terms', 'PA0091', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+ END SUBROUTINE stokes_drift_terms
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine calculates the Craik Leibovich vortex force and the additional
+!> effect of the Stokes drift on the Coriolis force
+!> Call for gridpoints i,j.
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE stokes_drift_terms_ij( i, j, component )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, u, u_stokes_zu, u_stokes_zw, v, v_stokes_zu,              &
+               v_stokes_zw, w, tend
+
+    USE control_parameters,                                                    &
+        ONLY:  f, fs, message_string
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nys, nysv, nyn, nzb, nzt
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  component  !< component of momentum equation
+    INTEGER(iwp) ::  i          !< loop index along x
+    INTEGER(iwp) ::  j          !< loop index along y
+    INTEGER(iwp) ::  k          !< loop incex along z
+
+
+!
+!-- Compute Stokes terms for the respective velocity components
+    SELECT CASE ( component )
+
+!
+!--    u-component
+       CASE ( 1 )
+          DO  k = nzb+1, nzt
+             tend(k,j,i) = tend(k,j,i) + v_stokes_zu(k) * (                    &
+                                     0.5 * ( v(k,j+1,i) - v(k,j+1,i-1)         &
+                                           + v(k,j,i)   - v(k,j,i-1)   ) * ddx &
+                                   - 0.5 * ( u(k,j+1,i) - u(k,j-1,i) )   * ddy &
+                                                          )                    &
+                                       + f * v_stokes_zu(k)
+          ENDDO
+!
+!--    v-component
+       CASE ( 2 )
+          DO  k = nzb+1, nzt
+             tend(k,j,i) = tend(k,j,i) - u_stokes_zu(k) * (                    &
+                                     0.5 * ( v(k,j,i+1) - v(k,j,i-1) )   * ddx &
+                                   - 0.5 * ( u(k,j,i) - u(k,j-1,i)             &
+                                           + u(k,j,i+1) - u(k,j-1,i+1) ) * ddy &
+                                                          )                    &
+                                       - f * u_stokes_zu(k)
+          ENDDO
+
+!
+!--    w-component
+       CASE ( 3 )
+          DO  k = nzb+1, nzt
+             tend(k,j,i) = tend(k,j,i) + u_stokes_zw(k) * (              &
+                                     0.5 * ( u(k+1,j,i) - u(k,j,i)     &
+                                                   + u(k+1,j,i+1) - u(k,j,i+1) &
+                                                   ) * ddzu(k+1)               &
+                                           - 0.5 * ( w(k,j,i+1) - w(k,j,i-1)   &
+                                                   ) * ddx )                   &
+                                       - v_stokes_zw(k) * (                    &
+                                             0.5 * ( w(k,j+1,i) - w(k,j-1,i)   &
+                                                   ) * ddy                     &
+                                           - 0.5 * ( v(k+1,j,i) - v(k,j,i)     &
+                                                   + v(k+1,j+1,i) - v(k,j+1,i) &
+                                                   ) * ddzu(k)  )              &
+                                       + fs * u_stokes_zw(k)
+          ENDDO
+
+       CASE DEFAULT
+          WRITE( message_string, * ) ' wrong component: ', component
+          CALL message( 'stokes_drift_terms', 'PA0091', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+ END SUBROUTINE stokes_drift_terms_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine calculates turbulence generated by wave breaking near the ocean
+!> surface, following a parameterization given in Noh et al. (2004), JPO
+!> Call for all gridpoints.
+!> TODO: so far, this routine only works if the model time step has about the
+!>       same value as the time scale of wave breaking!
+!------------------------------------------------------------------------------!
+ SUBROUTINE wave_breaking_term( component )
+
+    USE arrays_3d,                                                             &
+        ONLY:  u_p, v_p
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, message_string
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlu, nxr, nys, nysv, nyn, nzt
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  component  !< component of momentum equation
+    INTEGER(iwp) ::  i          !< loop index along x
+    INTEGER(iwp) ::  j          !< loop index along y
+
+    REAL(wp) ::  random_gauss  !< function that creates a random number with a
+                               !< Gaussian distribution
+
+
+!
+!-- Compute wave breaking terms for the respective velocity components.
+!-- Velocities are directly manipulated, since this is not a real force
+    SELECT CASE ( component )
+
+!
+!--    u-component
+       CASE ( 1 )
+          DO  i = nxlu, nxr
+             DO  j = nys, nyn
+                u_p(nzt,j,i) = u_p(nzt,j,i) +                                  &
+                               ( random_gauss( iran_ocean, 1.0_wp ) - 1.0_wp ) &
+                               * alpha_wave_breaking * u_star_wave_breaking    &
+                               / timescale_wave_breaking * dt_3d
+             ENDDO
+          ENDDO
+!
+!--    v-component
+       CASE ( 2 )
+          DO  i = nxl, nxr
+             DO  j = nysv, nyn
+                v_p(nzt,j,i) = v_p(nzt,j,i) +                                  &
+                               ( random_gauss( iran_ocean, 1.0_wp ) - 1.0_wp ) &
+                               * alpha_wave_breaking * u_star_wave_breaking    &
+                               / timescale_wave_breaking * dt_3d
+             ENDDO
+          ENDDO
+
+       CASE DEFAULT
+          WRITE( message_string, * ) 'wrong component of wave breaking: ',     &
+                                     component
+          CALL message( 'stokes_drift_terms', 'PA0466', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+ END SUBROUTINE wave_breaking_term
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine calculates turbulence generated by wave breaking near the ocean
+!> surface, following a parameterization given in Noh et al. (2004), JPO
+!> Call for gridpoint i,j.
+!> TODO: so far, this routine only works if the model time step has about the
+!>       same value as the time scale of wave breaking!
+!------------------------------------------------------------------------------!
+ SUBROUTINE wave_breaking_term_ij( i, j, component )
+
+    USE arrays_3d,                                                             &
+        ONLY:  u_p, v_p
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_3d, message_string
+
+    USE indices,                                                               &
+        ONLY:  nzt
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  component  !< component of momentum equation
+    INTEGER(iwp) ::  i          !< loop index along x
+    INTEGER(iwp) ::  j          !< loop index along y
+
+    REAL(wp) ::  random_gauss  !< function that creates a random number with a
+                               !< Gaussian distribution
+
+!
+!-- Compute wave breaking terms for the respective velocity components
+    SELECT CASE ( component )
+
+!
+!--    u-/v-component
+       CASE ( 1 )
+          u_p(nzt,j,i) = u_p(nzt,j,i) +                                        &
+                         ( random_gauss( iran_ocean, 1.0_wp ) - 1.0_wp )       &
+                         * alpha_wave_breaking * u_star_wave_breaking          &
+                         / timescale_wave_breaking * dt_3d
+
+       CASE ( 2 )
+          v_p(nzt,j,i) = v_p(nzt,j,i) +                                        &
+                         ( random_gauss( iran_ocean, 1.0_wp ) - 1.0_wp )       &
+                         * alpha_wave_breaking * u_star_wave_breaking          &
+                         / timescale_wave_breaking * dt_3d
+
+       CASE DEFAULT
+          WRITE( message_string, * ) 'wrong component of wave breaking: ',     &
+                                     component
+          CALL message( 'stokes_drift_terms', 'PA0466', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+ END SUBROUTINE wave_breaking_term_ij
+
+
+ END MODULE ocean_mod
Index: /palm/tags/release-6.0/SOURCE/outflow_turbulence.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/outflow_turbulence.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/outflow_turbulence.f90	(revision 3477)
@@ -0,0 +1,177 @@
+!> @file outflow_turbulence.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id: outflow_turbulence.f90 3241 2018-09-12 15:02:00Z raasch $
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Initial version
+! 
+!
+! Description:
+! ------------
+!> Routine based on inflow_turbulence.f90. Copies values of 3d data from a 2d
+!> vertical source plane (defined by outflow_source_plane) to the outflow
+!> boundary.
+!------------------------------------------------------------------------------!
+ SUBROUTINE outflow_turbulence
+
+    USE arrays_3d,                                                             &
+        ONLY:  e, pt, q, s, u, v, w
+
+    USE control_parameters,                                                    &
+        ONLY:  humidity, passive_scalar, outflow_source_plane
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxr, nyn, nys, nyng, nysg, nzb, nzt
+
+    USE kinds
+
+    USE pegrid!,                                                                &
+        !ONLY:  comm1dx, id_outflow, id_outflow_source, ierr, myidx, status
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i        !< loop index
+    INTEGER(iwp) ::  j        !< loop index
+    INTEGER(iwp) ::  k        !< loop index
+    INTEGER(iwp) ::  l        !< loop index
+    INTEGER(iwp) ::  ngp_ofv  !< number of grid points stored in outflow_val
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) ::                         &
+       outflow_val            !< values to be copied to the outflow boundary
+
+
+    CALL cpu_log( log_point(56), 'outflow_turbulence', 'start' )
+!
+!-- Get number of grid points stored in outflow_val
+    ngp_ofv = ( nzt - nzb + 2 ) * ( nyn - nys + 1 + 2 * nbgp ) * 7 * nbgp
+!
+!-- Get position of the source plane inside the palm grid
+    i = outflow_source_plane * ddx
+!
+!-- Use instantaneous values instead of averaged profiles
+#if defined( __parallel )
+    IF ( myidx == id_outflow_source )  THEN
+       DO  l = 1, nbgp
+          DO  j = nysg, nyng
+             DO  k = nzb, nzt + 1
+
+                outflow_val(k,j,1,l) = u(k,j,i)
+                outflow_val(k,j,2,l) = v(k,j,i)
+                outflow_val(k,j,3,l) = w(k,j,i)
+                outflow_val(k,j,4,l) = pt(k,j,i)
+                outflow_val(k,j,5,l) = e(k,j,i)
+                IF ( humidity  )                                               &
+                   outflow_val(k,j,6,l) = q(k,j,i)
+                IF ( passive_scalar )                                          &
+                   outflow_val(k,j,7,l) = s(k,j,i)
+
+            ENDDO
+          ENDDO
+          i = i + 1
+       ENDDO
+
+    ENDIF
+#else
+    DO  l = 1, nbgp
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt+1
+
+             outflow_val(k,j,1,l) = u(k,j,i)
+             outflow_val(k,j,2,l) = v(k,j,i)
+             outflow_val(k,j,3,l) = w(k,j,i)
+             outflow_val(k,j,4,l) = pt(k,j,i)
+             outflow_val(k,j,5,l) = e(k,j,i)
+             IF ( humidity  )                                                  &
+                outflow_val(k,j,6,l) = q(k,j,i)
+             IF ( passive_scalar )                                             &
+                outflow_val(k,j,7,l) = s(k,j,i)
+
+          ENDDO
+       ENDDO
+       i = i + 1
+    ENDDO
+#endif
+
+!
+!-- For parallel runs, send the values to the respective outflow PE
+#if defined( __parallel )
+    IF ( myidx == id_outflow_source  .AND.  myidx /= id_outflow )  THEN
+
+       CALL MPI_SEND( outflow_val(nzb,nysg,1,1), ngp_ofv, MPI_REAL,            &
+                      id_outflow, 1, comm1dx, ierr )
+
+    ELSEIF ( myidx /= id_outflow_source  .AND.  myidx == id_outflow )  THEN
+
+       outflow_val = 0.0_wp
+       CALL MPI_RECV( outflow_val(nzb,nysg,1,1), ngp_ofv, MPI_REAL,            &
+                      id_outflow_source, 1, comm1dx, status, ierr )
+
+    ENDIF
+#endif
+
+!
+!-- Copy values to the outflow
+    IF ( nxr == nx )  THEN
+
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt + 1
+
+             u(k,j,nx+1:nx+nbgp)  = outflow_val(k,j,1,1:nbgp)
+             v(k,j,nx+1:nx+nbgp)  = outflow_val(k,j,2,1:nbgp)
+             w(k,j,nx+1:nx+nbgp)  = outflow_val(k,j,3,1:nbgp)
+             pt(k,j,nx+1:nx+nbgp) = outflow_val(k,j,4,1:nbgp)
+             e(k,j,nx+1:nx+nbgp)  = outflow_val(k,j,5,1:nbgp)
+             e(k,j,nx+1:nx+nbgp)  = MAX( e(k,j,nx+1:nx+nbgp), 0.0_wp )
+
+             IF ( humidity )                                                   &
+                q(k,j,nx+1:nx+nbgp)  = outflow_val(k,j,6,1:nbgp)
+             IF ( passive_scalar )                                             &
+                s(k,j,nx+1:nx+nbgp)  = outflow_val(k,j,7,1:nbgp)
+
+          ENDDO
+       ENDDO
+
+
+    ENDIF
+
+    CALL cpu_log( log_point(56), 'outflow_turbulence', 'stop' )
+
+ END SUBROUTINE outflow_turbulence
Index: /palm/tags/release-6.0/SOURCE/package_parin.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/package_parin.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/package_parin.f90	(revision 3477)
@@ -0,0 +1,379 @@
+!> @file package_parin.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 2932 2018-03-26 09:39:22Z Giersch
+! renamed particles_par to particle_parameters
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Added aerosol_species
+!
+! 2312 2017-07-14 20:26:51Z hoffmann
+! Aerosol initialization improved.
+!
+! 2263 2017-06-08 14:59:01Z schwenkel
+! Implemented splitting and merging algorithm
+!
+! 2183 2017-03-17 14:29:15Z schwenkel
+!
+! 2182 2017-03-17 14:27:40Z schwenkel
+! Added parameters for simplified particle initialization.
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1936 2016-06-13 13:37:44Z suehring
+! +deallocate_memory, step_dealloc
+!
+! 1871 2016-04-15 11:46:09Z hoffmann
+! Initialization of aerosols added.
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! reading of spectra_par moved to spectra_mod
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! curvature_solution_effects added
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Reading of &radiation_par moved to radiation_model_mod.
+! Reading of &canopy_par moved to plant_canopy_model_mod.
+!
+! 822 2016-04-07 07:49:42Z hoffmann
+! +collision_algorithm
+! Tails removed.
+!
+! 1817 2016-04-06 15:44:20Z maronga
+! Reading of &lsm_par moved to land_surface_model_mod.
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Parameter dewfall removed.
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! cpp-direktives for spectra removed
+!
+! 1757 2016-02-22 15:49:32Z maronga
+! Added parameter unscheduled_radiation_calls
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added skip_time_do_lsm, skip_time_do_radiation, and emissivity
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1585 2015-04-30 07:05:52Z maronga
+! Added several radiation_par parameters
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! +seed_follows_topography in particles_par
+!
+! 1553 2015-03-03 17:33:54Z maronga
+! Resorting of lsm_par
+!
+! 1551 2015-03-03 14:18:16Z maronga
+! Several changes in the liste for land surface model and radiation model
+!
+! 1496 2014-12-02 17:25:50Z maronga
+! Added support for the land surface model and radiation scheme
+!
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   module plant_canopy_model_mod added,
+!   new package/namelist canopy_par added, i.e. the canopy model is no longer
+!   steered over the inipar-namelist,
+!   drag_coefficient, leaf_surface_concentration and scalar_exchange_coefficient
+!   renamed to canopy_drag_coeff, leaf_surface_conc and leaf_scalar_exch_coeff.
+! Changed statement tags in CONTINUE-statement
+!
+! 1367 2014-04-23 15:18:30Z witha
+! Bugfix: module kinds must be used
+!
+! 1359 2014-04-11 17:15:14Z hoffmann
+! +alloc_factor, + min_nr_particle
+! -dt_sort_particles, -maximum_number_of_particles
+!
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kinds
+!
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: Missing variable dt_data_output output added to ONLY statement
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 828 2012-02-21 12:00:36Z raasch
+! +dissipation_classes, radius_classes in parpar
+!
+! 825 2012-02-19 03:03:44Z raasch
+! wang_collision_kernel and turbulence_effects_on_collision in particles_par
+! replaced by collision_kernel
+!
+! Revision 1.1  2000/12/28 13:21:57  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> This subroutine reads from the NAMELIST file variables controling model
+!> software packages which are used optionally in the run.
+!>
+!> @todo Perform all actions in the respective submodules and remove
+!>       package_parin
+!------------------------------------------------------------------------------!
+ SUBROUTINE package_parin
+
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_dopts, dt_dvrp, message_string, particle_maximum_age,        &
+               threshold
+
+    USE dvrp_variables,                                                        &
+        ONLY:  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r, clip_dvrp_s,             &
+               cluster_size, color_interval, dvrpsize_interval,                &
+               dvrp_directory, dvrp_file, dvrp_host, dvrp_output,              &
+               dvrp_password, dvrp_username, groundplate_color,                &
+               isosurface_color, mode_dvrp, particle_color,                    &
+               particle_dvrpsize, pathlines_fadeintime,                        &
+               pathlines_fadeouttime, pathlines_linecount,                     &
+               pathlines_maxhistory, pathlines_wavecount,                      &
+               pathlines_wavetime, slicer_range_limits_dvrp, superelevation,   &
+               superelevation_x, superelevation_y, topography_color,           &
+               vc_alpha, vc_gradient_normals, vc_mode, vc_size_x, vc_size_y,   &
+               vc_size_z
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  aero_species, aero_type, aero_weight, alloc_factor, bc_par_b,   &
+               bc_par_lr, bc_par_ns, bc_par_t, collision_kernel,               &
+               curvature_solution_effects, deallocate_memory, density_ratio,   &
+               dissipation_classes, dt_min_part, dt_prel,                      &
+               dt_write_particle_data, end_time_prel, initial_weighting_factor,&
+               log_sigma, max_number_particles_per_gridbox,                    &
+               merging, min_nr_particle, na,                                   &
+               number_concentration, number_of_particle_groups,                &
+               number_particles_per_gridbox, particles_per_point,              &
+               particle_advection, particle_advection_start, pdx, pdy, pdz,    &
+               psb, psl, psn, psr, pss, pst, radius, radius_classes,           &
+               radius_merge, radius_split, random_start_position,              &
+               read_particles_from_restartfile, rm,                            &
+               seed_follows_topography, splitting, splitting_factor,           &
+               splitting_factor_max, splitting_function, splitting_mode,       &
+               step_dealloc, use_sgs_for_particles,                            &
+               vertical_particle_advection, weight_factor_merge,               &
+               weight_factor_split, write_particle_statistics
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line  !<
+
+
+
+    NAMELIST /dvrp_graphics_par/  clip_dvrp_l, clip_dvrp_n, clip_dvrp_r,       &
+                                  clip_dvrp_s, cluster_size, color_interval,   &
+                                  dt_dvrp, dvrpsize_interval, dvrp_directory,  &
+                                  dvrp_file, dvrp_host, dvrp_output,           &
+                                  dvrp_password, dvrp_username,                &
+                                  groundplate_color, isosurface_color,         &
+                                  mode_dvrp, particle_color, particle_dvrpsize,&
+                                  pathlines_fadeintime, pathlines_fadeouttime, &
+                                  pathlines_linecount, pathlines_maxhistory,   &
+                                  pathlines_wavecount, pathlines_wavetime,     &
+                                  slicer_range_limits_dvrp, superelevation,    &
+                                  superelevation_x, superelevation_y,          &
+                                  threshold, topography_color, vc_alpha,       &
+                                  vc_gradient_normals, vc_mode, vc_size_x,     &
+                                  vc_size_y, vc_size_z
+
+    NAMELIST /particles_par/      aero_species, aero_type, aero_weight,        &
+                                  alloc_factor, bc_par_b, bc_par_lr,           &
+                                  bc_par_ns, bc_par_t,                         &
+                                  collision_kernel, curvature_solution_effects,&
+                                  deallocate_memory, density_ratio,            &
+                                  dissipation_classes, dt_dopts,               &
+                                  dt_min_part, dt_prel,                        &
+                                  dt_write_particle_data,                      &
+                                  end_time_prel, initial_weighting_factor,     &
+                                  log_sigma,                                   &
+                                  max_number_particles_per_gridbox, merging,   &
+                                  min_nr_particle,                             &
+                                  na, number_concentration,                    &
+                                  number_of_particle_groups,                   &
+                                  number_particles_per_gridbox,                &
+                                  particles_per_point,                         &
+                                  particle_advection_start,                    &
+                                  particle_maximum_age, pdx, pdy, pdz, psb,    &
+                                  psl, psn, psr, pss, pst, radius,             &
+                                  radius_classes, radius_merge, radius_split,  &
+                                  random_start_position,                       &
+                                  read_particles_from_restartfile, rm,         &
+                                  seed_follows_topography,                     &
+                                  splitting, splitting_factor,                 &
+                                  splitting_factor_max, splitting_function,    &
+                                  splitting_mode, step_dealloc,                &
+                                  use_sgs_for_particles,                       &
+                                  vertical_particle_advection,                 &
+                                  weight_factor_merge, weight_factor_split,    &
+                                  write_particle_statistics
+
+                                  
+    NAMELIST /particle_parameters/                                             &
+                                  aero_species, aero_type, aero_weight,        &
+                                  alloc_factor, bc_par_b, bc_par_lr,           &
+                                  bc_par_ns, bc_par_t,                         &
+                                  collision_kernel, curvature_solution_effects,&
+                                  deallocate_memory, density_ratio,            &
+                                  dissipation_classes, dt_dopts,               &
+                                  dt_min_part, dt_prel,                        &
+                                  dt_write_particle_data,                      &
+                                  end_time_prel, initial_weighting_factor,     &
+                                  log_sigma,                                   &
+                                  max_number_particles_per_gridbox, merging,   &
+                                  min_nr_particle,                             &
+                                  na, number_concentration,                    &
+                                  number_of_particle_groups,                   &
+                                  number_particles_per_gridbox,                &
+                                  particles_per_point,                         &
+                                  particle_advection_start,                    &
+                                  particle_maximum_age, pdx, pdy, pdz, psb,    &
+                                  psl, psn, psr, pss, pst, radius,             &
+                                  radius_classes, radius_merge, radius_split,  &
+                                  random_start_position,                       &
+                                  read_particles_from_restartfile, rm,         &
+                                  seed_follows_topography,                     &
+                                  splitting, splitting_factor,                 &
+                                  splitting_factor_max, splitting_function,    &
+                                  splitting_mode, step_dealloc,                &
+                                  use_sgs_for_particles,                       &
+                                  vertical_particle_advection,                 &
+                                  weight_factor_merge, weight_factor_split,    &
+                                  write_particle_statistics
+!
+!-- Position the namelist-file at the beginning (it was already opened in
+!-- parin), search for the namelist-group of the package and position the
+!-- file at this line. Do the same for each optionally used package.
+    line = ' '
+
+
+#if defined( __dvrp_graphics )
+    REWIND ( 11 )
+    line = ' '
+    DO   WHILE ( INDEX( line, '&dvrp_graphics_par' ) == 0 )
+       READ ( 11, '(A)', END=21 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, dvrp_graphics_par, ERR = 20 )
+
+    GOTO 21
+ 20 BACKSPACE( 11 )
+    READ( 11 ,fmt='(A)') line
+    CALL parin_fail_message( 'dvrp_graphics_par', line )
+
+ 21 CONTINUE
+#endif
+
+!
+!-- Try to find particles package
+    REWIND ( 11 )
+    line = ' '
+    DO   WHILE ( INDEX( line, '&particle_parameters' ) == 0 )
+       READ ( 11, '(A)', END=12 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, particle_parameters, ERR = 10 )
+
+!
+!-- Set flag that indicates that particles are switched on
+    particle_advection = .TRUE.
+    
+    GOTO 14
+
+10  BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'particle_parameters', line )
+
+!
+!-- Try to find particles package (old namelist)
+12  REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&particles_par' ) == 0 )
+       READ ( 11, '(A)', END=14 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, particles_par, ERR = 13, END = 14 )
+    
+    
+    message_string = 'namelist particles_par is deprecated and will be ' //    &
+                     'removed in near future. Please use namelist ' //         &
+                     'particle_parameters instead'
+    CALL message( 'package_parin', 'PA0487', 0, 1, 0, 6, 0 )
+
+!
+!-- Set flag that indicates that particles are switched on
+    particle_advection = .TRUE.
+
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'particles_par', line )
+
+ 14 CONTINUE
+
+ END SUBROUTINE package_parin
Index: /palm/tags/release-6.0/SOURCE/palm.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/palm.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/palm.f90	(revision 3477)
@@ -0,0 +1,609 @@
+!> @file palm.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! from chemistry branch r3443, forkel:
+! removed double do_emis check around CALL chem_init
+! replaced call to calc_date_and_time to init_date_and_time
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! (from branch resler)
+! Fix chemistry call
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! - Minor formatting (kanani)
+! - Added Call of date_and_time_init (Russo)
+! - Added Call of calc_date_and_time before call of init_3d where emissions 
+!   are initialized:
+!   we have to know the time indices to initialize emission values (Russo)
+! - Added Call of netcdf_data_input_chemistry_data (Russo)
+!
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3258 2018-09-18 07:23:31Z Giersch
+! current revision for user interface has been changed to 3240
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3235 2018-09-07 14:06:15Z sward
+! Added mas_last_actions call and multi_agent_system_mod dependency
+! 
+! 3232 2018-09-07 12:21:44Z raasch
+! references to mrun replaced by palmrun, and updated
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Deduct spinup_time from RUN_CONTROL output of main 3d run 
+! (use time_since_reference_point instead of simulated_time)
+! 
+! 2951 2018-04-06 09:05:08Z kanani
+! Add log_point_s for pmci_init
+! 
+! 2903 2018-03-16 08:17:06Z hellstea
+! Nesting-related calls to pmci_ensure_nest_mass_conservation and pres after
+! the nest initialization are removed as they may create unwanted initial
+! perturbation in some cases.
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Modified todo list, _write_restart_data/_last_actions has been renamed to 
+! _wrd_local, unit 14 will be opened now for each io_group
+! write_3d_binary is called wrd_local now, wrd_global moved from wrd_local to 
+! palm.f90, unit 14 is closed directly after the wrd_local call, Module related
+! routines for writing restart data have been moved to wrd_local
+! 
+! 2801 2018-02-14 16:01:55Z suehring
+! Changed lpm from subroutine to module.
+! Introduce particle transfer in nested models.
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2720 2018-01-02 16:27:15Z kanani
+! Version update to 5.0
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of chemistry module (FK)
+! Introduce input-data standard
+! Rename lsm_last_actions into lsm_write_restart_data
+! Move usm_write_restart_data into io_blocks loop (MS)
+! 
+! 2512 2017-10-04 08:26:59Z raasch
+! user interface required revision updated
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Modularize large-scale forcing and nudging
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! type of write_binary changed from CHARACTER to LOGICAL,
+! user interface required revision updated, MPI2 related part removed
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Added call to new spinup routine
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2261 2017-06-08 14:25:57Z raasch
+! output of run number for mrun to create unified cycle numbers
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Renamed wall_flags_0 and wall_flags_00 into advc_flags_1 and advc_flags_2, 
+! respectively, within copyin statement. Moreover, introduced further flag 
+! array wall_flags_0. 
+! Remove unused variables from ONLY list.
+! 
+! 2178 2017-03-17 11:07:39Z hellstea
+! Calls for pmci_ensure_nest_mass_conservation and pres are added after
+! the nest initialization
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related code removed
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Temporarily added CALL for writing of restart data for urban surface model
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Added call to radiation_last_actions for binary output of land surface model 
+! data
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Added call to lsm_last_actions for binary output of land surface model data
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! 
+! 1834 2016-04-07 14:34:20Z raasch
+! Initial version of purely vertical nesting introduced. 
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! required user interface version changed
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_flush replaced by FORTRAN statement
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! required user interface version changed
+!
+! 1781 2016-03-03 15:12:23Z raasch
+! pmc initialization moved from time_integration to here
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! setting of nest_domain and coupling_char moved to the pmci
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statements for nesting removed, communicator settings cleaned up
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1747 2016-02-08 12:25:53Z raasch
+! OpenACC-adjustment for new surface layer parameterization
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1668 2015-09-23 13:45:36Z raasch
+! warning replaced by abort in case of failed user interface check
+!
+! 1666 2015-09-23 07:31:10Z raasch
+! check for user's interface version added
+!
+! 1482 2014-10-18 12:34:45Z raasch
+! adjustments for using CUDA-aware OpenMPI
+!
+! 1468 2014-09-24 14:06:57Z maronga
+! Adapted for use on up to 6-digit processor cores
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages added
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! bugfix: various modules added
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! initialization of nuding and large scale forcing from external file
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! +wall_flags_00, rflags_invers, rflags_s_inner in copyin statement
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! +tri in copyin statement
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! ref_state added to copyin-list
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! openACC statements modified
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! openACC statements updated
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! Version number changed from 3.8 to 3.8a.
+! OpenACC statements added + code changes required for GPU optimization
+!
+! 849 2012-03-15 10:35:09Z raasch
+! write_particles renamed lpm_write_restart_file
+!
+! Revision 1.1  1997/07/24 11:23:35  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Large-Eddy Simulation (LES) model for atmospheric and oceanic boundary-layer
+!> flows
+!> see the PALM homepage https://palm-model.org for further information
+!>
+!> @todo move chem_init call to init_3d_model or to check_parameters
+!------------------------------------------------------------------------------!
+ PROGRAM palm
+ 
+
+    USE arrays_3d
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+    USE chem_modules,                                                          &
+        ONLY:  do_emis
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_check_data_output_pr, chem_init
+
+!    USE chem_photolysis_mod,                                                   &
+!        ONLY:  photolysis_init
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, constant_diffusion, child_domain,                &
+               coupling_char, coupling_mode, do2d_at_begin, do3d_at_begin,     &
+               humidity, initializing_actions, io_blocks, io_group,            &
+               message_string,                                                 &
+               neutral, passive_scalar, runnr, simulated_time_chr, spinup,     &
+               time_since_reference_point, user_interface_current_revision,    &
+               user_interface_required_revision, version, write_binary
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s, cpu_statistics
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  calc_date_and_time, init_date_and_time
+
+    USE indices,                                                               &
+        ONLY:  nbgp
+
+    USE kinds
+
+    USE multi_agent_system_mod,                                                &
+        ONLY:  agents_active, mas_last_actions
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  chem_emis, chem_emis_att, netcdf_data_input_chemistry_data,     &
+               netcdf_data_input_inquire_file, netcdf_data_input_init,         &
+               netcdf_data_input_surface_data, netcdf_data_input_topo
+
+    USE particle_attributes,                                                   &
+        ONLY:  particle_advection
+
+    USE pegrid
+
+    USE pmc_particle_interface,                                                &
+        ONLY: pmcp_g_alloc_win
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run, pmci_child_initialize, pmci_init,                   &
+               pmci_modelconfiguration, pmci_parent_initialize,                &
+               pmci_ensure_nest_mass_conservation
+
+    USE write_restart_data_mod,                                                &
+        ONLY:  wrd_global, wrd_local
+
+
+    IMPLICIT NONE
+
+!
+!-- Local variables
+    CHARACTER(LEN=9) ::  time_to_string  !<
+    INTEGER(iwp)     ::  i               !< loop counter for blocked I/O
+
+    version = 'PALM 5.0'
+    user_interface_required_revision = 'r3240'
+
+#if defined( __parallel )
+!
+!-- MPI initialisation. comm2d is preliminary set, because
+!-- it will be defined in init_pegrid but is used before in cpu_log.
+    CALL MPI_INIT( ierr )
+
+!
+!-- Initialize the coupling for nested-domain runs
+!-- comm_palm is the communicator which includes all PEs (MPI processes)
+!-- available for this (nested) model. If it is not a nested run, comm_palm
+!-- is returned as MPI_COMM_WORLD
+    CALL cpu_log( log_point_s(70), 'pmci_init', 'start' )
+    CALL pmci_init( comm_palm )
+    CALL cpu_log( log_point_s(70), 'pmci_init', 'stop' )
+    comm2d = comm_palm
+!
+!-- Get the (preliminary) number of MPI processes and the local PE-id (in case
+!-- of a further communicator splitting in init_coupling, these numbers will
+!-- be changed in init_pegrid).
+    IF ( nested_run )  THEN
+
+       CALL MPI_COMM_SIZE( comm_palm, numprocs, ierr )
+       CALL MPI_COMM_RANK( comm_palm, myid, ierr )
+
+    ELSE
+
+       CALL MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr )
+       CALL MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
+!
+!--    Initialize PE topology in case of coupled atmosphere-ocean runs (comm_palm
+!--    will be splitted in init_coupling)
+       CALL init_coupling
+    ENDIF
+#endif
+
+!
+!-- Initialize measuring of the CPU-time remaining to the run
+    CALL local_tremain_ini
+
+!
+!-- Start of total CPU time measuring.
+    CALL cpu_log( log_point(1), 'total', 'start' )
+    CALL cpu_log( log_point(2), 'initialisation', 'start' )
+
+!
+!-- Open a file for debug output
+    WRITE (myid_char,'(''_'',I6.6)')  myid
+    OPEN( 9, FILE='DEBUG'//TRIM( coupling_char )//myid_char, FORM='FORMATTED' )
+
+!
+!-- Initialize dvrp logging. Also, one PE maybe split from the global
+!-- communicator for doing the dvrp output. In that case, the number of
+!-- PEs available for PALM is reduced by one and communicator comm_palm
+!-- is changed respectively.
+#if defined( __parallel )
+    CALL MPI_COMM_RANK( comm_palm, myid, ierr )
+!
+!-- TEST OUTPUT (TO BE REMOVED)
+    WRITE(9,*) '*** coupling_mode = "', TRIM( coupling_mode ), '"'
+    FLUSH( 9 )
+    IF ( TRIM( coupling_mode ) /= 'uncoupled' )  THEN
+       PRINT*, '*** PE', myid, ' Global target PE:', target_id, &
+               TRIM( coupling_mode )
+    ENDIF
+#endif
+
+    CALL init_dvrp_logging
+
+!
+!-- Read control parameters from NAMELIST files and read environment-variables
+    CALL parin
+
+!
+!-- Check for the user's interface version
+    IF ( user_interface_current_revision /= user_interface_required_revision )  &
+    THEN
+       message_string = 'current user-interface revision "' //                  &
+                        TRIM( user_interface_current_revision ) // '" does ' // &
+                        'not match the required revision ' //                   &
+                        TRIM( user_interface_required_revision )
+        CALL message( 'palm', 'PA0169', 1, 2, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Determine processor topology and local array indices
+    CALL init_pegrid
+!
+!-- Check if input file according to input-data standard exists
+    CALL netcdf_data_input_inquire_file
+!
+!-- Read topography input data if required. This is required before the 
+!-- numerical grid is finally created in init_grid
+    CALL netcdf_data_input_topo  
+!
+!-- Generate grid parameters, initialize generic topography and further process
+!-- topography information if required
+    CALL init_grid
+!
+!-- Read global attributes if available.  
+    CALL netcdf_data_input_init 
+!
+!-- Read surface classification data, e.g. vegetation and soil types, water 
+!-- surfaces, etc., if available. Some of these data is required before 
+!-- check parameters is invoked.     
+    CALL netcdf_data_input_surface_data
+!
+!-- Initialize chemistry (called before check_parameters due to dependencies)
+!-- --> Needs to be moved!! What is the dependency about?
+! IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+    IF ( air_chemistry )  THEN
+
+       IF ( do_emis ) THEN
+          CALL netcdf_data_input_chemistry_data(chem_emis_att,chem_emis)
+       ENDIF
+
+       CALL chem_init
+
+!       CALL photolysis_init   ! probably also required for restart
+
+    ENDIF
+! END IF
+!
+!-- Check control parameters and deduce further quantities
+    CALL check_parameters
+
+!
+!-- Initialize all necessary variables
+!
+!-- Initial time for chem_emissions_mod
+    CALL init_date_and_time
+
+    CALL init_3d_model
+
+!
+!-- Coupling protocol setup for nested-domain runs
+    IF ( nested_run )  THEN
+       CALL pmci_modelconfiguration
+!
+!--    Receive and interpolate initial data on children.
+!--    Child initialization must be made first if the model is both child and
+!--    parent if necessary
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+          CALL pmci_child_initialize
+!
+!--       Send initial condition data from parent to children
+          CALL pmci_parent_initialize
+!
+!--       Exchange_horiz is needed after the nest initialization
+          IF ( child_domain )  THEN
+             CALL exchange_horiz( u, nbgp )
+             CALL exchange_horiz( v, nbgp )
+             CALL exchange_horiz( w, nbgp )
+             IF ( .NOT. neutral )  THEN
+                CALL exchange_horiz( pt, nbgp )
+             ENDIF
+             IF ( .NOT. constant_diffusion )  CALL exchange_horiz( e, nbgp )
+             IF ( humidity )  THEN
+                CALL exchange_horiz( q, nbgp )
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+                  CALL exchange_horiz( qc, nbgp )
+                  CALL exchange_horiz( nc, nbgp )
+                ENDIF
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+                   CALL exchange_horiz( qr, nbgp ) 
+                   CALL exchange_horiz( nr, nbgp )
+                ENDIF
+             ENDIF
+             IF ( passive_scalar )  CALL exchange_horiz( s, nbgp )
+          ENDIF
+       ENDIF
+
+       CALL pmcp_g_alloc_win                    ! Must be called after pmci_child_initialize and pmci_parent_initialize
+    ENDIF
+
+!
+!-- Output of program header
+    IF ( myid == 0 )  CALL header
+
+    CALL cpu_log( log_point(2), 'initialisation', 'stop' )
+
+!
+!-- Integration of the non-atmospheric equations (land surface model, urban
+!-- surface model)
+    IF ( spinup )  THEN
+       CALL time_integration_spinup
+    ENDIF
+
+!
+!-- Set start time in format hh:mm:ss
+    simulated_time_chr = time_to_string( time_since_reference_point )
+
+!
+!-- If required, output of initial arrays
+    IF ( do2d_at_begin )  THEN
+       CALL data_output_2d( 'xy', 0 )
+       CALL data_output_2d( 'xz', 0 )
+       CALL data_output_2d( 'yz', 0 )
+    ENDIF
+
+    IF ( do3d_at_begin )  THEN
+       CALL data_output_3d( 0 )
+    ENDIF
+
+!
+!-- Integration of the model equations using timestep-scheme
+    CALL time_integration
+
+!
+!-- If required, write binary data for restart runs
+    IF ( write_binary )  THEN
+
+       CALL cpu_log( log_point(22), 'wrd_local', 'start' )
+
+       CALL location_message( 'writing restart data', .FALSE. )
+
+       DO  i = 0, io_blocks-1
+          IF ( i == io_group )  THEN
+
+!
+!--          Open binary file 
+             CALL check_open( 14 )
+!
+!--          Write control parameters and other global variables for restart.
+             IF ( myid == 0 )  CALL wrd_global
+!
+!--          Write processor specific flow field data for restart runs
+             CALL wrd_local
+!
+!--          Close binary file 
+             CALL close_file( 14 )
+
+          ENDIF
+#if defined( __parallel )
+          CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       ENDDO
+
+       CALL location_message( 'finished', .TRUE. )
+
+       CALL cpu_log( log_point(22), 'wrd_local', 'stop' )
+
+!
+!--    If required, write particle data in own restart files
+       IF ( particle_advection )  CALL lpm_write_restart_file
+       
+    ENDIF
+
+!
+!-- If required, repeat output of header including the required CPU-time
+    IF ( myid == 0 )  CALL header
+!
+!-- If required, final  user-defined actions, and
+!-- last actions on the open files and close files. Unit 14 was opened
+!-- in wrd_local but it is closed here, to allow writing on this
+!-- unit in routine user_last_actions.
+    CALL cpu_log( log_point(4), 'last actions', 'start' )
+
+    IF ( myid == 0 .AND. agents_active ) CALL mas_last_actions
+    CALL user_last_actions
+    CALL close_file( 0 )
+    CALL close_dvrp
+
+    CALL cpu_log( log_point(4), 'last actions', 'stop' )
+
+!
+!-- Write run number to file (used by palmrun to create unified cycle numbers
+!-- for output files
+    IF ( myid == 0  .AND.  runnr > 0 )  THEN
+       OPEN( 90, FILE='RUN_NUMBER', FORM='FORMATTED' )
+       WRITE( 90, '(I4)' )  runnr
+       CLOSE( 90 )
+    ENDIF
+
+!
+!-- Take final CPU-time for CPU-time analysis
+    CALL cpu_log( log_point(1), 'total', 'stop' )
+    CALL cpu_statistics
+
+#if defined( __parallel )
+    CALL MPI_FINALIZE( ierr )
+#endif
+
+ END PROGRAM palm
Index: /palm/tags/release-6.0/SOURCE/parin.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/parin.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/parin.f90	(revision 3477)
@@ -0,0 +1,1149 @@
+!> @file parin.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add virtual measurement module
+! 
+! 3472 2018-10-30 20:43:50Z suehring
+! Add indoor model (kanani, srissman, tlang),
+! minor formatting
+! 
+! 3467 2018-10-30 19:05:21Z suehring
+! Implementation of a new aerosol module salsa.
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Add biometeorology
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! Add mask_k_over_surface
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Added module for data output at surfaces
+! 
+! 3355 2018-10-16 14:03:34Z knoop
+! - offline nesting separated from large-scale forcing module
+! - top boundary condition for pressure in offline nesting changed
+! 
+! 3343 2018-10-15 10:38:52Z suehring
+! Introduced reading of date_init to inipar.(Russo)
+! Add extra profiles for chemistry (basit)
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3240 2018-09-12 12:04:40Z Giersch
+! A check that controls the number of user-defined profiles on the restart file
+! with the one given for the current run has been added.
+! 
+! 3204 2018-08-23 10:49:05Z raasch
+! additional check for nz
+! 
+! 3184 2018-07-27 17:13:09Z suehring
+! Bugfix, comment setting of chemistry and passive scalar top boundary condition
+! in case of offline nesting
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables and boundary conditions in mesoscale-offline nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Added multi agent system
+! 
+! 3157 2018-07-19 21:08:49Z maronga
+! added use_free_convection_scaling
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! Added rans_const_c and rans_const_sigma as input parameters (TG)
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! New initialization parameters added
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! z_max_do2d removed, error messages revised
+! 
+! 2995 2018-04-19 12:13:16Z Giersch
+! time_since_reference_point must be calculated/initialized before the first  
+! call of functions related to the radiation model which occur in 
+! time_integration_spinup or time_integration
+! 
+! 2980 2018-04-17 15:19:27Z suehring
+! Revise message call
+! 
+! 2975 2018-04-16 15:22:20Z suehring
+! - Informative message when initializing_actions has been changed 
+!   to set_constant_profile in child domain 
+! - Change location in message call
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! bugfix: missing parallel cpp-directives added
+! 
+! 2941 2018-04-03 11:54:58Z kanani
+! Fix for spinup in case of restart run
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! Change initialization in case child domain should be initialized with Inifor.
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! inipar renamed to initialization_parameters.
+! d3par renamed to runtime_parameters.
+! 
+! 2921 2018-03-22 15:05:23Z Giersch
+! Activation of spinup has been moved from lsm/usm_parin to parin itself
+! 
+! 2906 2018-03-19 08:56:40Z Giersch
+! ENVIRONMENT variables read/write_svf has been added 
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! read_var_list has been renamed to rrd_global, all module related _parin 
+! routines are called before reading the global restart data to overwrite them
+! in case of restart runs
+! 
+! 2881 2018-03-13 16:24:40Z suehring
+! Added flag for switching on/off calculation of soil moisture
+! 
+! 2849 2018-03-05 10:49:33Z Giersch
+! Position of d3par namelist in parameter file is unimportant now 
+! 
+! 2826 2018-02-21 12:39:28Z Giersch
+! Bugfix in setting the default boundary conditions for nest domains
+!
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+!
+! 2773 2018-01-30 14:12:54Z suehring
+! Nesting for chemical species implemented
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Implementation of uv exposure model (FK)
+! Added rans_mode and turbulence_closure to inipar (TG)
+! Implementation of chemistry module
+! Sorting of USE list (FK)
+! Forcing implemented, and initialization with inifor (MS)
+! 
+! 2600 2017-11-01 14:11:20Z raasch
+! some comments added and variables renamed concerning r2599
+! 
+! 2599 2017-11-01 13:18:45Z hellstea
+! The i/o grouping is updated to work correctly also in nested runs.
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Renamed phi -> latitude, added longitude
+! 
+! 2563 2017-10-19 15:36:10Z Giersch
+! Changed position where restart files are closed.
+! 
+! 2550 2017-10-16 17:12:01Z boeske
+! Added complex_terrain
+! 
+! 2544 2017-10-13 18:09:32Z maronga
+! Moved day_of_year_init and time_utc_init to inipar.
+! 
+! 2397 2017-09-04 16:22:48Z suehring
+! Enable initialization of 3d model by user in the child domain. 
+! 
+! 2375 2017-08-29 14:10:28Z schwenkel
+! Added aerosol initialization for bulk microphysics
+! 
+! 2372 2017-08-25 12:37:32Z sward
+! y_shift added to namelist
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical grid nesting: add vnest_start_time to d3par (SadiqHuq)
+! 
+! 2339 2017-08-07 13:55:26Z gronemeier
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! Modularize 1D model
+! 
+! 2310 2017-07-11 09:37:02Z gronemeier
+! Bugfix: re-arranged call for error messages for ENVPAR file
+! 
+! 2304 2017-07-04 14:35:55Z suehring
+! Bugfix, enable restarts for child domain.
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! -return_addres, return_username in ENVPAR, -cross_ts_uymax, cross_ts_uymin in
+! d3par
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Added parameters for model spinup
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2267 2017-06-09 09:33:25Z gronemeier
+! Bugfix: removed skipping of reading namelists in case of omitted d3par
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2233 2017-05-30 18:08:54Z suehring
+! 
+! 2232 2017-05-30 17:47:52Z suehring
+! typo corrected
+! +wall_salinityflux
+! +tunnel_height, tunnel_lenght, tunnel_width_x, tunnel_width_y, 
+!  tunnel_wall_depth
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! -background_communication from inipar
+! 
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Implement turbulent outflow condition
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2035 2016-10-24 15:06:17Z suehring
+! Remove check for npex and npey in nesting case
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Added flag lsf_exception to allow explicit enabling of large scale forcing 
+! together with buildings on flat terrain.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added call to urban surface model for reading of &urban_surface_par
+! 
+! 2004 2016-08-24 10:25:59Z suehring
+! Humidity and passive scalar treated separately in nesting mode
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! +top_scalarflux
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Allocation of s_init
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! flight module added
+! 
+! 1955 2016-07-01 12:38:59Z hellstea
+! The parameter intializating_actions is set to 'set_constant_profiles for 
+! all nest domains in order to make sure that diagnostic variables are properly 
+! initialized for nest domains. Prognostic variables are later initialized by 
+! interpolation from the parent domain. 
+!
+! 1917 2016-05-27 14:28:12Z witha
+! Initial version of purely vertical nesting introduced.
+! 
+! 1914 2016-05-26 14:44:07Z witha
+! Added call to wind turbine model for reading of &wind_turbine_par
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! Adapted for modularization of microphysics
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! call of spectra_parin
+! 
+! 1831 2016-04-07 13:15:51Z hoffmann
+! turbulence renamed collision_turbulence, drizzle renamed
+! cloud_water_sedimentation
+! curvature_solution_effects removed
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Added call to radiation model for reading of &radiation_par.
+! Added call to plant canopy model for reading of &canopy_par.
+! 
+! 1817 2016-04-06 15:44:20Z maronga
+! Added call to land surface model for reading of &lsm_par
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! +netcdf_deflate in d3par, netcdf module and variable names changed
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statements for nesting removed, explicit settings of boundary conditions
+! in nest domains,
+! bugfix: npex/npey message moved from inipar to d3par
+! bugfix: check of lateral boundary conditions from check_parameters to here,
+! because they will be already used in init_pegrid and init_grid
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added parameter most_method. Renamed prandtl_layer to constant_flux_layer.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1560 2015-03-06 10:48:54Z keck
+! +recycling_yshift
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Renamed: "radiation -> "cloud_top_radiation"
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   canopy-model related parameters moved to new package canopy_par in 
+!   subroutine package_parin
+! 
+! 1429 2014-07-15 12:53:45Z knoop
+! +ensemble_member_nr to prepare the random_generator for ensemble runs
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages modified, progress_bar_disabled included in envpar-NAMELIST
+! 
+! 1384 2014-05-02 14:31:06Z raasch
+! location messages added
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Usage of large scale forcing enabled:
+! +use_subsidence_tendencies
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! +call_microphysics_at_all_substeps
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! REAL constants provided with KIND-attribute 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+! 
+! 1327 2014-03-21 11:00:16Z raasch
+! -data_output_format, do3d_compress, do3d_comp_prec
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! +cpu_log_barrierwait in d3par
+!
+! 1301 2014-03-06 13:29:46Z heinze
+! +large_scale_subsidence
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! +nudging
+! +large_scale_forcing
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! +transpose_compute_overlap in inipar
+!
+! 1195 2013-07-01 12:27:57Z heinze
+! Bugfix: allocate ref_state
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! +reference_state in inipar
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! +use_cmax
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! +background_communication in inipar
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! unused variables removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! +nc, c_sedimentation, limiter_sedimentation, turbulence
+! -mu_constant, mu_constant_value
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! necessary expansions according to the two new prognostic equations (nr, qr) 
+! of the two-moment cloud physics scheme and steering parameters:
+! +*_init, *_surface, *_surface_initial_change, *_vertical_gradient, 
+! +*_vertical_gradient_level, surface_waterflux_*, 
+! +cloud_scheme, drizzle, mu_constant, mu_constant_value, ventilation_effect
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! -adjust_mixing_length
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! -grid_matching
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! -cut_spline_overshoot, long_filter_factor, overshoot_limit_*, ups_limit_*
+!
+! 996 2012-09-07 10:41:47Z raasch
+! -use_prior_plot1d_parameters
+!
+! 978 2012-08-09 08:28:32Z fricke
+! -km_damp_max, outflow_damping_width
+! +pt_damping_factor, pt_damping_width
+! +z0h_factor
+!
+! 964 2012-07-26 09:14:24Z raasch
+! -cross_normalized_x, cross_normalized_y, cross_xtext, z_max_do1d,
+! z_max_do1d_normalized
+!
+! 940 2012-07-09 14:31:00Z raasch
+! +neutral in inipar
+!
+! 927 2012-06-06 19:15:04Z raasch
+! +masking_method in inipar
+!
+! 824 2012-02-17 09:09:57Z raasch
+! +curvature_solution_effects in inipar
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+!
+! Revision 1.1  1997/07/24 11:22:50  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> This subroutine reads variables controling the run from the NAMELIST files
+!>
+!> @todo: Revise max_pr_cs (profiles for chemistry)
+!------------------------------------------------------------------------------!
+ SUBROUTINE parin
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt_init, q_init, ref_state, s_init, sa_init,                    &
+               ug, u_init, v_init, vg
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_parin
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bcm_parin
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_parin
+
+    USE chem_modules
+
+    USE control_parameters
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log_barrierwait
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  date_init, day_of_year_init, time_utc_init
+
+    USE dvrp_variables,                                                        &
+        ONLY:  local_dvrserver_running
+
+    USE flight_mod,                                                            &
+        ONLY:  flight_parin
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE gust_mod,                                                              &
+        ONLY: gust_parin
+
+    USE indices,                                                               &
+        ONLY:  nx, ny, nz
+
+    USE indoor_model_mod,                                                      &
+        ONLY:  im_parin
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_parin
+
+    USE model_1d_mod,                                                          &
+        ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
+
+    USE multi_agent_system_mod,                                                &
+        ONLY:  mas_parin
+
+    USE nesting_offl_mod,                                                      &
+        ONLY:  nesting_offl_parin
+        
+    USE netcdf_interface,                                                      &
+        ONLY:  netcdf_data_format, netcdf_deflate, netcdf_precision
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_parin
+
+    USE pegrid
+
+    USE plant_canopy_model_mod,                                                &
+         ONLY: pcm_parin
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run, nesting_mode
+
+    USE profil_parameter,                                                      &
+        ONLY:  cross_profiles, profile_columns, profile_rows
+
+    USE progress_bar,                                                          &
+        ONLY :  progress_bar_disabled
+
+    USE radiation_model_mod,                                                   &
+        ONLY: radiation_parin
+
+    USE read_restart_data_mod,                                                 &
+        ONLY:  rrd_global  
+             
+    USE salsa_mod,                                                             &
+        ONLY: salsa_parin          
+
+    USE spectra_mod,                                                           &
+        ONLY :  spectra_parin
+
+    USE statistics,                                                            &
+        ONLY:  hom, hom_sum, pr_palm, region, statistic_regions
+
+    USE surface_output_mod,                                                    &
+        ONLY:  surface_output_parin
+
+    USE synthetic_turbulence_generator_mod,                                    &
+        ONLY:  stg_parin
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  rans_const_c, rans_const_sigma
+
+    USE urban_surface_mod,                                                     &
+        ONLY: usm_parin
+
+    USE uv_exposure_model_mod,                                                 &
+        ONLY:  uvem_parin
+
+    USE vertical_nesting_mod,                                                  &
+        ONLY:  vnest_start_time
+        
+    USE virtual_measurement_mod,                                               &
+        ONLY:  vm_parin
+
+    USE wind_turbine_model_mod,                                                &
+        ONLY:  wtm_parin
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
+
+    INTEGER(iwp) ::  global_id      !< process id with respect to MPI_COMM_WORLD
+    INTEGER(iwp) ::  global_procs   !< # of procs with respect to MPI_COMM_WORLD
+    INTEGER(iwp) ::  i              !<
+    INTEGER(iwp) ::  ioerr          !< error flag for open/read/write
+
+    NAMELIST /inipar/  alpha_surface, approximation, bc_e_b,     &
+                       bc_lr, bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b, &
+             bc_q_t,bc_s_b, bc_s_t, bc_uv_b, bc_uv_t,                 &
+             building_height, building_length_x,          &
+             building_length_y, building_wall_left, building_wall_south,       &
+             calc_soil_moisture_during_spinup,                                 &
+             call_psolver_at_all_substeps,  &
+             canyon_height,                                                    &
+             canyon_width_x, canyon_width_y, canyon_wall_left,                 &
+             canyon_wall_south, cfl_factor, cloud_droplets,   &
+             collective_wait, complex_terrain,           &
+             conserve_volume_flow,                                             &
+             conserve_volume_flow_mode, constant_flux_layer,                   &
+             coupling_start_time,             &
+             cycle_mg, damp_level_1d,                                          &
+             data_output_during_spinup,                                        &
+             date_init,                                                        &
+             day_of_year_init,                                                 &
+             dissipation_1d,                                                   &
+             dp_external, dp_level_b, dp_smooth, dpdxy,    &
+             dt, dt_pr_1d, dt_run_control_1d, dt_spinup, dx, dy, dz, dz_max,   &
+             dz_stretch_factor, dz_stretch_level, dz_stretch_level_start,      &
+             dz_stretch_level_end, end_time_1d, ensemble_member_nr, e_init,    &
+             e_min, fft_method, flux_input_mode, flux_output_mode,             &
+             galilei_transformation, humidity,                                 &
+             inflow_damping_height, inflow_damping_width,                      &
+             inflow_disturbance_begin, inflow_disturbance_end,                 &
+             initializing_actions, km_constant,                                &
+             large_scale_forcing, large_scale_subsidence, latitude,            &
+             longitude,                                 &
+             loop_optimization, lsf_exception, masking_method, mg_cycles,      &
+             mg_switch_to_pe0_level, mixing_length_1d, momentum_advec,         &
+             most_method,                                                      &
+             netcdf_precision, neutral, ngsrb,                                 &
+             nsor, nsor_ini, nudging, nx, ny, nz, ocean_mode, omega,           &
+             omega_sor, outflow_source_plane, passive_scalar,                  &
+             prandtl_number, psolver, pt_damping_factor,        &
+             pt_damping_width, pt_reference, pt_surface,                       &
+             pt_surface_initial_change, pt_vertical_gradient,                  &
+             pt_vertical_gradient_level, q_surface, q_surface_initial_change,  &
+             q_vertical_gradient, q_vertical_gradient_level,                   &
+             random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
+             rans_mode,                                                        &
+             rayleigh_damping_factor, rayleigh_damping_height,                 &
+             recycling_width, recycling_yshift,                                &
+             reference_state, residual_limit,                                  &
+             roughness_length,                                                 &
+             scalar_advec,   &
+             scalar_rayleigh_damping,                              &
+             spinup_time, spinup_pt_amplitude, spinup_pt_mean,                 &
+             statistic_regions, subs_vertical_gradient,                        &
+             subs_vertical_gradient_level, surface_heatflux, surface_pressure, &
+             surface_scalarflux, surface_waterflux,                            &
+             s_surface, s_surface_initial_change, s_vertical_gradient,         &
+             s_vertical_gradient_level, time_utc_init, timestep_scheme,        &
+             topography, topography_grid_convention, top_heatflux,             &
+             top_momentumflux_u, top_momentumflux_v,                           &
+             top_scalarflux, transpose_compute_overlap,                        &
+             tunnel_height, tunnel_length, tunnel_width_x, tunnel_width_y,     &
+             tunnel_wall_depth, turbulence_closure,                            &
+             turbulent_inflow, turbulent_outflow,                              &
+             use_subsidence_tendencies, ug_surface, ug_vertical_gradient,      &
+             use_free_convection_scaling,                                      &
+             ug_vertical_gradient_level, use_surface_fluxes, use_cmax,         &
+             use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke,      &
+             uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient,  &
+             vg_vertical_gradient_level, v_bulk, v_profile,&
+             wall_adjustment, wall_heatflux, wall_humidityflux,                &
+             wall_scalarflux, y_shift, zeta_max, zeta_min,  &
+             z0h_factor
+
+    NAMELIST /initialization_parameters/  alpha_surface,                       &
+             approximation, bc_e_b,                                            &
+             bc_lr, bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b,           &
+             bc_q_t,bc_s_b, bc_s_t, bc_uv_b, bc_uv_t,                          &
+             building_height, building_length_x,                               &
+             building_length_y, building_wall_left, building_wall_south,       &
+             calc_soil_moisture_during_spinup,                                 &
+             call_psolver_at_all_substeps,                                     &
+             canyon_height,                                                    &
+             canyon_width_x, canyon_width_y, canyon_wall_left,                 &
+             canyon_wall_south, cfl_factor, cloud_droplets,                    &
+             collective_wait, complex_terrain,                                 &
+             conserve_volume_flow,                                             &
+             conserve_volume_flow_mode, constant_flux_layer,                   &
+             coupling_start_time,                                              &
+             cycle_mg, damp_level_1d,                                          &
+             data_output_during_spinup,                                        &
+             date_init,                                                        &
+             day_of_year_init,                                                 &
+             dissipation_1d,                                                   &
+             dp_external, dp_level_b, dp_smooth, dpdxy,                        &
+             dt, dt_pr_1d, dt_run_control_1d, dt_spinup, dx, dy, dz, dz_max,   &
+             dz_stretch_factor, dz_stretch_level, dz_stretch_level_start,      &
+             dz_stretch_level_end, end_time_1d, ensemble_member_nr, e_init,    &
+             e_min, fft_method, flux_input_mode, flux_output_mode,             &
+             galilei_transformation, humidity,                                 &
+             inflow_damping_height, inflow_damping_width,                      &
+             inflow_disturbance_begin, inflow_disturbance_end,                 &
+             initializing_actions, km_constant,                                &
+             large_scale_forcing, large_scale_subsidence, latitude,            &
+             longitude,                                                        &
+             loop_optimization, lsf_exception, masking_method, mg_cycles,      &
+             mg_switch_to_pe0_level, mixing_length_1d, momentum_advec,         &
+             most_method,                                                      &
+             netcdf_precision, neutral, ngsrb,                                 &
+             nsor, nsor_ini, nudging, nx, ny, nz, ocean_mode, omega,           &
+             omega_sor, outflow_source_plane, passive_scalar,                  &
+             prandtl_number, psolver, pt_damping_factor,                       &
+             pt_damping_width, pt_reference, pt_surface,                       &
+             pt_surface_initial_change, pt_vertical_gradient,                  &
+             pt_vertical_gradient_level, q_surface, q_surface_initial_change,  &
+             q_vertical_gradient, q_vertical_gradient_level,                   &
+             random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
+             rans_mode,                                                        &
+             rayleigh_damping_factor, rayleigh_damping_height,                 &
+             recycling_width, recycling_yshift,                                &
+             reference_state, residual_limit,                                  &
+             roughness_length, scalar_advec,                                   &
+             scalar_rayleigh_damping,                                          &
+             spinup_time, spinup_pt_amplitude, spinup_pt_mean,                 &
+             statistic_regions, subs_vertical_gradient,                        &
+             subs_vertical_gradient_level, surface_heatflux, surface_pressure, &
+             surface_scalarflux, surface_waterflux,                            &
+             s_surface, s_surface_initial_change, s_vertical_gradient,         &
+             s_vertical_gradient_level, time_utc_init, timestep_scheme,        &
+             topography, topography_grid_convention, top_heatflux,             &
+             top_momentumflux_u, top_momentumflux_v,                           &
+             top_scalarflux, transpose_compute_overlap,                        &
+             tunnel_height, tunnel_length, tunnel_width_x, tunnel_width_y,     &
+             tunnel_wall_depth, turbulence_closure,                            &
+             turbulent_inflow, turbulent_outflow,                              &
+             use_subsidence_tendencies, ug_surface, ug_vertical_gradient,      &
+             ug_vertical_gradient_level, use_surface_fluxes, use_cmax,         &
+             use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke,      &
+             use_free_convection_scaling,                                      &
+             uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient,  &
+             vg_vertical_gradient_level, v_bulk, v_profile,                    &
+             wall_adjustment, wall_heatflux, wall_humidityflux,                &
+             wall_scalarflux, y_shift, zeta_max, zeta_min, z0h_factor
+             
+    NAMELIST /d3par/  averaging_interval, averaging_interval_pr,               &
+             cpu_log_barrierwait, create_disturbances,                         &
+             cross_profiles, data_output, data_output_masks,                   &
+             data_output_pr, data_output_2d_on_each_pe, disturbance_amplitude, &
+             disturbance_energy_limit, disturbance_level_b,                    &
+             disturbance_level_t, do2d_at_begin, do3d_at_begin,                &
+             dt, dt_averaging_input, dt_averaging_input_pr,                    &
+             dt_coupling, dt_data_output, dt_data_output_av, dt_disturb,       &
+             dt_domask, dt_dopr, dt_dopr_listing, dt_dots, dt_do2d_xy,         &
+             dt_do2d_xz, dt_do2d_yz, dt_do3d, dt_max, dt_restart,              &
+             dt_run_control,end_time, force_print_header, mask_k_over_surface, &
+             mask_scale_x,                                                     &
+             mask_scale_y, mask_scale_z, mask_x, mask_y, mask_z, mask_x_loop,  &
+             mask_y_loop, mask_z_loop, netcdf_data_format, netcdf_deflate,     &
+             normalizing_region, npex, npey, nz_do3d,                          &
+             profile_columns, profile_rows,     &
+             restart_time, section_xy, section_xz, section_yz,                 &
+             skip_time_data_output, skip_time_data_output_av, skip_time_dopr,  &
+             skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz,          &
+             skip_time_do3d, skip_time_domask, synchronous_exchange,           &
+             termination_time_needed, vnest_start_time
+
+    NAMELIST /runtime_parameters/  averaging_interval, averaging_interval_pr,  &
+             cpu_log_barrierwait, create_disturbances,                         &
+             cross_profiles, data_output, data_output_masks,                   &
+             data_output_pr, data_output_2d_on_each_pe, disturbance_amplitude, &
+             disturbance_energy_limit, disturbance_level_b,                    &
+             disturbance_level_t, do2d_at_begin, do3d_at_begin,                &
+             dt, dt_averaging_input, dt_averaging_input_pr,                    &
+             dt_coupling, dt_data_output, dt_data_output_av, dt_disturb,       &
+             dt_domask, dt_dopr, dt_dopr_listing, dt_dots, dt_do2d_xy,         &
+             dt_do2d_xz, dt_do2d_yz, dt_do3d, dt_max, dt_restart,              &
+             dt_run_control,end_time, force_print_header, mask_k_over_surface, &
+             mask_scale_x,                                                     &
+             mask_scale_y, mask_scale_z, mask_x, mask_y, mask_z, mask_x_loop,  &
+             mask_y_loop, mask_z_loop, netcdf_data_format, netcdf_deflate,     &
+             normalizing_region, npex, npey, nz_do3d,                          &
+             profile_columns, profile_rows,     &
+             restart_time, section_xy, section_xz, section_yz,                 &
+             skip_time_data_output, skip_time_data_output_av, skip_time_dopr,  &
+             skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz,          &
+             skip_time_do3d, skip_time_domask, synchronous_exchange,           &
+             termination_time_needed, vnest_start_time
+
+    NAMELIST /envpar/  progress_bar_disabled, host, local_dvrserver_running,   &
+                       maximum_cpu_time_allowed, maximum_parallel_io_streams,  &
+                       read_svf, revision, run_identifier, tasks_per_node,     &
+                       write_binary, write_svf
+
+!
+!-- First read values of environment variables (this NAMELIST file is
+!-- generated by palmrun)
+    CALL location_message( 'reading environment parameters from ENVPAR', .FALSE. )
+
+    OPEN ( 90, FILE='ENVPAR', STATUS='OLD', FORM='FORMATTED', IOSTAT=ioerr )
+
+    IF ( ioerr /= 0 )  THEN
+       message_string = 'local file ENVPAR not found' //                       &
+                        '&some variables for steering may not be properly set'
+       CALL message( 'parin', 'PA0276', 0, 1, 0, 6, 0 )
+    ELSE
+       READ ( 90, envpar, IOSTAT=ioerr )
+       IF ( ioerr < 0 )  THEN
+          message_string = 'no envpar-NAMELIST found in local file '  //       &
+                           'ENVPAR& or some variables for steering may '  //   &
+                           'not be properly set'
+          CALL message( 'parin', 'PA0278', 0, 1, 0, 6, 0 )
+       ELSEIF ( ioerr > 0 )  THEN
+          message_string = 'errors in local file ENVPAR' //                    &
+                           '&some variables for steering may not be properly set'
+          CALL message( 'parin', 'PA0277', 0, 1, 0, 6, 0 )
+       ENDIF
+       CLOSE ( 90 )
+    ENDIF
+
+    CALL location_message( 'finished', .TRUE. )
+!
+!-- Calculate the number of groups into which parallel I/O is split.
+!-- The default for files which are opened by all PEs (or where each
+!-- PE opens his own independent file) is, that all PEs are doing input/output
+!-- in parallel at the same time. This might cause performance or even more
+!-- severe problems depending on the configuration of the underlying file
+!-- system.
+!-- Calculation of the number of blocks and the I/O group must be based on all
+!-- PEs involved in this run. Since myid and numprocs are related to the
+!-- comm2d communicator, which gives only a subset of all PEs in case of
+!-- nested runs, that information must be inquired again from the global
+!-- communicator.
+!-- First, set the default:
+#if defined( __parallel )
+    CALL MPI_COMM_RANK( MPI_COMM_WORLD, global_id, ierr )
+    CALL MPI_COMM_SIZE( MPI_COMM_WORLD, global_procs, ierr )
+#else
+    global_id    = 0
+    global_procs = 1
+#endif
+    IF ( maximum_parallel_io_streams == -1  .OR.                               &
+         maximum_parallel_io_streams > global_procs )  THEN
+       maximum_parallel_io_streams = global_procs
+    ENDIF
+!
+!-- Now calculate the number of io_blocks and the io_group to which the
+!-- respective PE belongs. I/O of the groups is done in serial, but in parallel
+!-- for all PEs belonging to the same group.
+    io_blocks = global_procs / maximum_parallel_io_streams
+    io_group  = MOD( global_id+1, io_blocks )
+    
+    CALL location_message( 'reading NAMELIST parameters from PARIN', .FALSE. )
+!
+!-- Data is read in parallel by groups of PEs
+    DO  i = 0, io_blocks-1
+       IF ( i == io_group )  THEN
+
+!
+!--       Open the NAMELIST-file which is send with this job
+          CALL check_open( 11 )
+
+!
+!--       Read the control parameters for initialization.
+!--       The namelist "inipar" must be provided in the NAMELIST-file.
+          READ ( 11, initialization_parameters, ERR=10, END=11 )
+          GOTO 14
+          
+ 10       BACKSPACE( 11 )
+          READ( 11 , '(A)') line
+          CALL parin_fail_message( 'initialization_parameters', line )
+
+ 11       REWIND ( 11 )
+          READ ( 11, inipar, ERR=12, END=13 )
+ 
+          message_string = 'namelist inipar is deprecated and will be ' //    &
+                          'removed in near future. & Please use namelist ' // &
+                          'initialization_parameters instead'
+          CALL message( 'parin', 'PA0017', 0, 1, 0, 6, 0 )
+ 
+          GOTO 14
+ 
+ 12       BACKSPACE( 11 )
+          READ( 11 , '(A)') line
+          CALL parin_fail_message( 'inipar', line )
+
+ 13       message_string = 'no initialization_parameters-namelist found'
+          CALL message( 'parin', 'PA0272', 1, 2, 0, 6, 0 )
+
+!
+!--       Try to read runtime parameters given by the user for this run
+!--       (namelist "runtime_parameters"). The namelist "runtime_parmeters"    
+!--       can be omitted. In that case default values are used for the         
+!--       parameters.
+ 14       line = ' '
+
+          REWIND ( 11 )
+          line = ' '
+          DO WHILE ( INDEX( line, '&runtime_parameters' ) == 0 )
+             READ ( 11, '(A)', END=16 )  line
+          ENDDO
+          BACKSPACE ( 11 )
+
+!
+!--       Read namelist
+          READ ( 11, runtime_parameters, ERR = 15 )
+          GOTO 18
+
+ 15       BACKSPACE( 11 )
+          READ( 11 , '(A)') line
+          CALL parin_fail_message( 'runtime_parameters', line )
+
+ 16       REWIND ( 11 )
+          line = ' '
+          DO WHILE ( INDEX( line, '&d3par' ) == 0 )
+             READ ( 11, '(A)', END=18 )  line
+          ENDDO
+          BACKSPACE ( 11 )
+
+!
+!--       Read namelist
+          READ ( 11, d3par, ERR = 17, END = 18 )
+
+          message_string = 'namelist d3par is deprecated and will be ' //      &
+                          'removed in near future. &Please use namelist ' //   &
+                          'runtime_parameters instead'
+          CALL message( 'parin', 'PA0487', 0, 1, 0, 6, 0 )
+
+          GOTO 18
+
+ 17       BACKSPACE( 11 )
+          READ( 11 , '(A)') line
+          CALL parin_fail_message( 'd3par', line )
+
+ 18       CONTINUE
+
+!
+!--       Check for module namelists and read them
+          CALL biom_parin
+          CALL lsm_parin
+          CALL bcm_parin
+          CALL surface_output_parin
+          CALL usm_parin
+          CALL spectra_parin
+          CALL radiation_parin
+          CALL gust_parin
+          CALL mas_parin
+          CALL nesting_offl_parin
+          CALL ocean_parin
+          CALL pcm_parin
+          CALL package_parin
+          CALL wtm_parin
+          CALL flight_parin
+          CALL stg_parin
+          CALL chem_parin
+          CALL uvem_parin
+          CALL im_parin
+          CALL salsa_parin
+          CALL vm_parin
+!
+!--       Read user-defined variables
+          CALL user_parin
+
+!
+!--       If required, read control parameters from restart file (produced by
+!--       a prior run). All PEs are reading from file created by PE0 (see
+!--       check_open)
+          IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
+
+             CALL rrd_global
+!
+!--          Increment the run count
+             runnr = runnr + 1
+!
+!--          In case of a restart run, the number of user-defined profiles on
+!--          the restart file (already stored in max_pr_user) has to match the
+!--          one given for the current run. max_pr_user_tmp is calculated in 
+!--          user_parin and max_pr_user is read in via rrd_global.
+             IF ( max_pr_user /= max_pr_user_tmp )  THEN
+                WRITE( message_string, * ) 'the number of user-defined ',      &
+                      'profiles given in data_output_pr (', max_pr_user_tmp,   &
+                      ') does not match the one ',                             &
+                      'found in the restart file (', max_pr_user, ')'
+                CALL message( 'user_parin', 'UI0009', 1, 2, 0, 6, 0 )
+             ENDIF
+          ELSE
+             max_pr_user = max_pr_user_tmp
+          ENDIF
+
+!
+!--       Activate spinup
+          IF ( land_surface .OR. urban_surface )  THEN
+             IF ( spinup_time > 0.0_wp )  THEN
+                coupling_start_time = spinup_time
+                time_since_reference_point = simulated_time - coupling_start_time
+                IF ( spinup_pt_mean == 9999999.9_wp )  THEN
+                   spinup_pt_mean = pt_surface
+                ENDIF
+                end_time = end_time + spinup_time
+                IF ( TRIM( initializing_actions ) /= 'read_restart_data' )     &
+                   spinup = .TRUE.
+             ENDIF
+          ENDIF
+
+!
+!--       In case of nested runs, explicitly set nesting boundary conditions. 
+!--       This will overwrite the user settings and basic defaults.
+!--       bc_lr and bc_ns always need to be cyclic for vertical nesting.
+          IF ( nested_run )  THEN
+             IF ( nesting_mode == 'vertical' )  THEN
+                IF (bc_lr /= 'cyclic' .OR. bc_ns /= 'cyclic' )  THEN
+                   WRITE ( message_string, *) 'bc_lr and bc_ns were set to ,', &
+                        'cyclic for vertical nesting'
+                   CALL message( 'parin', 'PA0428', 0, 0, 0, 6, 0 )
+                   bc_lr   = 'cyclic'
+                   bc_ns   = 'cyclic'
+                ENDIF
+                IF ( child_domain )  THEN
+                   bc_uv_t  = 'nested'
+                   bc_pt_t  = 'nested'
+                   bc_q_t   = 'nested'
+                   bc_s_t   = 'nested'
+                   bc_cs_t  = 'nested'
+                   bc_p_t   = 'neumann'  
+                ENDIF
+!
+!--          For other nesting modes only set boundary conditions for 
+!--          nested domains.
+             ELSE 
+                IF ( child_domain )  THEN
+                   bc_lr    = 'nested'
+                   bc_ns    = 'nested'
+                   bc_uv_t  = 'nested'
+                   bc_pt_t  = 'nested'
+                   bc_q_t   = 'nested'
+                   bc_s_t   = 'nested'
+                   bc_cs_t  = 'nested'
+                   bc_p_t   = 'neumann'
+                ENDIF
+             ENDIF
+          ENDIF
+!
+!--       Set boundary conditions also in case the model is offline-nested in
+!--       larger-scale models.
+          IF ( nesting_offline )  THEN
+             bc_lr    = 'nesting_offline'
+             bc_ns    = 'nesting_offline'
+             bc_uv_t  = 'nesting_offline'
+             bc_pt_t  = 'nesting_offline'
+             bc_q_t   = 'nesting_offline'
+           !  bc_s_t   = 'nesting_offline'  ! scalar boundary condition is not clear
+           !  bc_cs_t  = 'nesting_offline'  ! same for chemical species
+!
+!--          For the pressure set Dirichlet conditions, in contrast to the 
+!--          self nesting. This gives less oscilations within the 
+!--          free atmosphere since the pressure solver has more degrees of 
+!--          freedom. In constrast to the self nesting, this might be 
+!--          justified since the top boundary is far away from the domain
+!--          of interest. 
+             bc_p_t   = 'dirichlet' !'neumann'
+          ENDIF
+
+!         
+!--       In case of nested runs, make sure that initializing_actions =
+!--       'set_constant_profiles' even though the constant-profiles 
+!--       initializations for the prognostic variables will be overwritten 
+!--       by pmci_child_initialize and pmci_parent_initialize. This is, 
+!--       however, important e.g. to make sure that diagnostic variables 
+!--       are set properly. An exception is made in case of restart runs and
+!--       if user decides to do everything by its own.
+          IF ( child_domain  .AND.  .NOT. (                                    &
+               TRIM( initializing_actions ) == 'read_restart_data'      .OR.   &
+               TRIM( initializing_actions ) == 'set_constant_profiles'  .OR.   &
+               TRIM( initializing_actions ) == 'by_user' ) )  THEN
+             message_string = 'initializing_actions = ' //                     &
+                              TRIM( initializing_actions ) // ' has been ' //  &
+                              'changed to set_constant_profiles in child ' //  &
+                              'domain.' 
+             CALL message( 'parin', 'PA0492', 0, 0, 0, 6, 0 )
+
+             initializing_actions = 'set_constant_profiles'
+          ENDIF            
+!
+!--       Check validity of lateral boundary conditions. This has to be done
+!--       here because they are already used in init_pegrid and init_grid and
+!--       therefore cannot be check in check_parameters
+          IF ( bc_lr /= 'cyclic'  .AND.  bc_lr /= 'dirichlet/radiation'  .AND. &
+               bc_lr /= 'radiation/dirichlet'  .AND.  bc_lr /= 'nested'  .AND. &
+               bc_lr /= 'nesting_offline' )  THEN
+             message_string = 'unknown boundary condition: bc_lr = "' // &
+                              TRIM( bc_lr ) // '"'
+             CALL message( 'parin', 'PA0049', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( bc_ns /= 'cyclic'  .AND.  bc_ns /= 'dirichlet/radiation'  .AND. &
+               bc_ns /= 'radiation/dirichlet'  .AND.  bc_ns /= 'nested'  .AND. &
+               bc_ns /= 'nesting_offline' )  THEN
+             message_string = 'unknown boundary condition: bc_ns = "' // &
+                              TRIM( bc_ns ) // '"'
+             CALL message( 'parin', 'PA0050', 1, 2, 0, 6, 0 )
+          ENDIF
+!
+!--       Set internal variables used for speed optimization in if clauses
+          IF ( bc_lr /= 'cyclic' )               bc_lr_cyc    = .FALSE.
+          IF ( bc_lr == 'dirichlet/radiation' )  bc_lr_dirrad = .TRUE.
+          IF ( bc_lr == 'radiation/dirichlet' )  bc_lr_raddir = .TRUE.
+          IF ( bc_ns /= 'cyclic' )               bc_ns_cyc    = .FALSE.
+          IF ( bc_ns == 'dirichlet/radiation' )  bc_ns_dirrad = .TRUE.
+          IF ( bc_ns == 'radiation/dirichlet' )  bc_ns_raddir = .TRUE.
+
+!
+!--       Definition of names of areas used for computing statistics. They must
+!--       be defined at this place, because they are allowed to be redefined by
+!--       the user in user_parin.
+          region = 'total domain'
+
+!
+!--       Check in case of initial run, if the grid point numbers are well
+!--       defined and allocate some arrays which are already needed in
+!--       init_pegrid or check_parameters. During restart jobs, these arrays
+!--       will be allocated in rrd_global. All other arrays are allocated
+!--       in init_3d_model.
+          IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+
+             IF ( nx <= 0 )  THEN
+                WRITE( message_string, * ) 'no value or wrong value given',    &
+                                           ' for nx: nx=', nx
+                CALL message( 'parin', 'PA0273', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( ny <= 0 )  THEN
+                WRITE( message_string, * ) 'no value or wrong value given',    &
+                                           ' for ny: ny=', ny
+                CALL message( 'parin', 'PA0274', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( nz <= 0 )  THEN
+                WRITE( message_string, * ) 'no value or wrong value given',    &
+                                           ' for nz: nz=', nz
+                CALL message( 'parin', 'PA0275', 1, 2, 0, 6, 0 )
+             ENDIF
+
+!
+!--          As a side condition, routine flow_statistics require at least 14
+!--          vertical grid levels (they are used to store time-series data)
+!>           @todo   Remove this restriction
+             IF ( nz < 14 )  THEN
+                WRITE( message_string, * ) 'nz >= 14 is required'
+                CALL message( 'parin', 'PA0362', 1, 2, 0, 6, 0 )
+             ENDIF
+
+!
+!--          ATTENTION: in case of changes to the following statement please
+!--                  also check the allocate statement in routine rrd_global
+             ALLOCATE( pt_init(0:nz+1), q_init(0:nz+1), s_init(0:nz+1),        &
+                       ref_state(0:nz+1), sa_init(0:nz+1), ug(0:nz+1),         &
+                       u_init(0:nz+1), v_init(0:nz+1), vg(0:nz+1),             &
+                       hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions),  &
+                       hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions) )
+
+             hom = 0.0_wp
+
+          ENDIF
+
+!
+!--       NAMELIST-file is not needed anymore
+          CALL close_file( 11 )
+
+       ENDIF
+#if defined( __parallel )
+       CALL MPI_BARRIER( MPI_COMM_WORLD, ierr )
+#endif
+    ENDDO
+
+    CALL location_message( 'finished', .TRUE. )
+
+ END SUBROUTINE parin
Index: /palm/tags/release-6.0/SOURCE/plant_canopy_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/plant_canopy_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/plant_canopy_model_mod.f90	(revision 3477)
@@ -0,0 +1,2101 @@
+!> @file plant_canopy_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+! Copyright 2018 Institute of Computer Science of the
+!                Czech Academy of Sciences, Prague
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add calculation of transpiration for resolved plant canopy (trees, shrubs)
+! (V. Fuka, MFF UK Prague, J.Resler, ICS AS, Prague)
+!
+! Fix reading plant canopy over buildings
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! Fix reading plant canopy over buildings
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! ocean renamed ocean_mode
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by the help of zw to allow for vertical stretching
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 3022 2018-05-18 11:12:35Z suehring
+! Bugfix in allocation of transpiration rate
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Bugfix: nzb_do and nzt_do were not used for 3d data output
+! Added pc_transpiration_rate
+! 
+! 2977 2018-04-17 10:27:57Z kanani
+! Implement changes from branch radiation (r2948-2971) with minor modifications,
+! plus some formatting.
+! (moh.hefny):
+! Add plant canopy type to account for changes in LAD (based on the changes
+! done by Resler & Pavel) and correct the error message to PALM Standard.
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed canopy_par to plant_canopy_parameters
+! 
+! 2920 2018-03-22 11:22:01Z kanani
+! Move usm_lad_rma and prototype_lad to radiation_model (moh.hefny)
+! 
+! 2892 2018-03-14 15:06:29Z suehring
+! Bugfix, read separate ASCII LAD files for parent and child model. 
+! 
+! 2770 2018-01-25 15:10:09Z kanani
+! Correction of parameter check
+! 
+! 2768 2018-01-24 15:38:29Z kanani
+! Added check for output quantity pcm_heatrate, some formatting
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Increased LEN of canopy mode to 30
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Bugfix for vertical loop index pch_index in case of Netcdf input
+! Introduce 2D index array incorporate canopy top index
+! Check if canopy on top of topography do not exceed vertical dimension 
+! Add check for canopy_mode in case of Netcdf input.
+! Enable _FillValue output for 3d quantities
+! Bugfix in reading of PIDS leaf area density (MS)
+! 
+! 2669 2017-12-06 16:03:27Z raasch
+! coupling_char removed
+! 
+! 2512 2017-10-04 08:26:59Z raasch
+! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+! Changed error messages
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2213 2017-04-24 15:10:35Z kanani
+! Bugfix: exchange of ghost points in array pc_heating_rate needed for output 
+! of pcm_heatrate, onetime ghost point exchange of lad_s after initialization.
+! Formatting and clean-up of subroutine pcm_read_plant_canopy_3d,
+! minor re-organization of canopy-heating initialization.
+! 
+! 2209 2017-04-19 09:34:46Z kanani
+! Added 3d output of leaf area density (pcm_lad) and canopy 
+! heat rate (pcm_heatrate)
+! 
+! 2024 2016-10-12 16:42:37Z kanani
+! Added missing lad_s initialization
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Renamed canopy_heat_flux to pc_heating_rate, since the original meaning/
+! calculation of the quantity has changed, related to the urban surface model
+! and similar future applications. 
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added SUBROUTINE pcm_read_plant_canopy_3d for reading 3d plant canopy data
+! from file (new case canopy_mode=read_from_file_3d) in the course of
+! introduction of urban surface model,
+! introduced variable ext_coef,
+! resorted SUBROUTINEs to alphabetical order
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! 
+! 1953 2016-06-21 09:28:42Z suehring
+! Bugfix, lad_s and lad must be public
+! 
+! 1826 2016-04-07 12:01:39Z maronga
+! Further modularization
+!
+! 1721 2015-11-16 12:56:48Z raasch
+! bugfixes: shf is reduced in areas covered with canopy only,
+!           canopy is set on top of topography
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   module plant_canopy_model_mod now contains a subroutine for the 
+!   initialization of the canopy model (pcm_init),
+!   limitation of the canopy drag (previously accounted for by calculation of 
+!   a limiting canopy timestep for the determination of the maximum LES timestep
+!   in subroutine timestep) is now realized by the calculation of pre-tendencies
+!   and preliminary velocities in subroutine pcm_tendency,
+!   some redundant MPI communication removed in subroutine pcm_init
+!   (was previously in init_3d_model),
+!   unnecessary 3d-arrays lad_u, lad_v, lad_w removed - lad information on the
+!   respective grid is now provided only by lad_s (e.g. in the calculation of 
+!   the tendency terms or of cum_lai_hf),
+!   drag_coefficient, lai, leaf_surface_concentration, 
+!   scalar_exchange_coefficient, sec and sls renamed to canopy_drag_coeff, 
+!   cum_lai_hf, leaf_surface_conc, leaf_scalar_exch_coeff, lsec and lsc,
+!   respectively,
+!   unnecessary 3d-arrays cdc, lsc and lsec now defined as single-value constants,
+!   USE-statements and ONLY-lists modified accordingly
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 138 2007-11-28 10:03:58Z letzel
+! Initial revision
+!
+! Description:
+! ------------
+!> 1) Initialization of the canopy model, e.g. construction of leaf area density 
+!> profile (subroutine pcm_init).
+!> 2) Calculation of sinks and sources of momentum, heat and scalar concentration 
+!> due to canopy elements (subroutine pcm_tendency).
+!------------------------------------------------------------------------------!
+ MODULE plant_canopy_model_mod
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  dzu, dzw, e, exner, hyp, pt, q, s, tend, u, v, w, zu, zw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, degc_to_k, l_v, lv_d_cp, r_d, rd_d_rv
+
+    USE control_parameters,                                                   &
+        ONLY: humidity
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxlu, nxr, nxrg, nyn, nyng, nys, nysg, nysv,   &
+               nz, nzb, nzt
+
+    USE kinds
+
+    USE pegrid
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji
+
+
+    IMPLICIT NONE
+
+
+    CHARACTER (LEN=30)   ::  canopy_mode = 'block'                 !< canopy coverage
+    LOGICAL              ::  plant_canopy_transpiration = .FALSE.  !< flag to switch calculation of transpiration and corresponding latent heat
+                                                                   !< for resolved plant canopy inside radiation model
+                                                                   !< (calls subroutine pcm_calc_transpiration_rate from module plant_canopy_mod)
+
+    INTEGER(iwp) ::  pch_index = 0                                 !< plant canopy height/top index
+    INTEGER(iwp) ::  lad_vertical_gradient_level_ind(10) = -9999   !< lad-profile levels (index)
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  pch_index_ji     !< local plant canopy top
+
+    LOGICAL ::  calc_beta_lad_profile = .FALSE.   !< switch for calc. of lad from beta func.
+
+    REAL(wp) ::  alpha_lad = 9999999.9_wp         !< coefficient for lad calculation
+    REAL(wp) ::  beta_lad = 9999999.9_wp          !< coefficient for lad calculation
+    REAL(wp) ::  canopy_drag_coeff = 0.0_wp       !< canopy drag coefficient (parameter)
+    REAL(wp) ::  cdc = 0.0_wp                     !< canopy drag coeff. (abbreviation used in equations)
+    REAL(wp) ::  cthf = 0.0_wp                    !< canopy top heat flux
+    REAL(wp) ::  dt_plant_canopy = 0.0_wp         !< timestep account. for canopy drag
+    REAL(wp) ::  ext_coef = 0.6_wp                !< extinction coefficient
+    REAL(wp) ::  lad_surface = 0.0_wp             !< lad surface value
+    REAL(wp) ::  lai_beta = 0.0_wp                !< leaf area index (lai) for lad calc.
+    REAL(wp) ::  leaf_scalar_exch_coeff = 0.0_wp  !< canopy scalar exchange coeff.
+    REAL(wp) ::  leaf_surface_conc = 0.0_wp       !< leaf surface concentration
+    REAL(wp) ::  lsc = 0.0_wp                     !< leaf surface concentration
+    REAL(wp) ::  lsec = 0.0_wp                    !< leaf scalar exchange coeff.
+
+    REAL(wp) ::  lad_vertical_gradient(10) = 0.0_wp              !< lad gradient
+    REAL(wp) ::  lad_vertical_gradient_level(10) = -9999999.9_wp !< lad-prof. levels (in m)
+
+    REAL(wp) ::  lad_type_coef(0:10) = 1.0_wp   !< multiplicative coeficients for particular types
+                                                !< of plant canopy (e.g. deciduous tree during winter)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  lad            !< leaf area density
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pre_lad        !< preliminary lad
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  cum_lai_hf             !< cumulative lai for heatflux calc.
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  lad_s                  !< lad on scalar-grid
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pc_heating_rate        !< plant canopy heating rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pc_transpiration_rate  !< plant canopy transpiration rate
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pc_latent_rate         !< plant canopy latent heating rate
+
+    SAVE
+
+
+    PRIVATE
+  
+!
+!-- Public functions
+    PUBLIC pcm_calc_transpiration_rate, pcm_check_data_output,                &
+           pcm_check_parameters, pcm_data_output_3d, pcm_define_netcdf_grid,  &
+           pcm_header, pcm_init, pcm_parin, pcm_tendency
+
+!
+!-- Public variables and constants
+    PUBLIC cdc, pc_heating_rate, pc_transpiration_rate, pc_latent_rate,       &
+           canopy_mode, cthf, dt_plant_canopy, lad, lad_s, pch_index,         &
+           plant_canopy_transpiration
+
+    INTERFACE pcm_calc_transpiration_rate
+       MODULE PROCEDURE pcm_calc_transpiration_rate
+    END INTERFACE pcm_calc_transpiration_rate
+
+    INTERFACE pcm_check_data_output
+       MODULE PROCEDURE pcm_check_data_output
+    END INTERFACE pcm_check_data_output
+    
+    INTERFACE pcm_check_parameters
+       MODULE PROCEDURE pcm_check_parameters
+    END INTERFACE pcm_check_parameters
+
+    INTERFACE pcm_data_output_3d
+       MODULE PROCEDURE pcm_data_output_3d
+    END INTERFACE pcm_data_output_3d
+
+    INTERFACE pcm_define_netcdf_grid
+       MODULE PROCEDURE pcm_define_netcdf_grid
+    END INTERFACE pcm_define_netcdf_grid
+    
+     INTERFACE pcm_header
+       MODULE PROCEDURE pcm_header
+    END INTERFACE pcm_header        
+    
+    INTERFACE pcm_init
+       MODULE PROCEDURE pcm_init
+    END INTERFACE pcm_init
+
+    INTERFACE pcm_parin
+       MODULE PROCEDURE pcm_parin
+    END INTERFACE pcm_parin
+
+    INTERFACE pcm_read_plant_canopy_3d
+       MODULE PROCEDURE pcm_read_plant_canopy_3d
+    END INTERFACE pcm_read_plant_canopy_3d
+    
+    INTERFACE pcm_tendency
+       MODULE PROCEDURE pcm_tendency
+       MODULE PROCEDURE pcm_tendency_ij
+    END INTERFACE pcm_tendency
+
+
+ CONTAINS
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of the plant canopy transpiration rate based on the Jarvis-Stewart
+!> with parametrizations described in Daudet et al. (1999; Agricult. and Forest
+!> Meteorol. 97) and Ngao, Adam and Saudreau (2017;  Agricult. and Forest Meteorol
+!> 237-238). Model functions f1-f4 were adapted from Stewart (1998; Agric.
+!> and Forest. Meteorol. 43) instead, because they are valid for broader intervals
+!> of values. Funcion f4 used in form present in van Wijk et al. (1998;
+!> Tree Physiology 20).
+!>
+!> This subroutine is called from subroutine radiation_interaction
+!> after the calculation of radiation in plant canopy boxes.
+!> (arrays pcbinsw and pcbinlw).
+!>
+!------------------------------------------------------------------------------!
+ SUBROUTINE pcm_calc_transpiration_rate(i, j, k, kk, pcbsw, pcblw, pcbtr, pcblh)
+
+     USE control_parameters,                                                   &
+        ONLY: dz
+
+     USE grid_variables,                                                       &
+        ONLY:  dx, dy
+
+     IMPLICIT NONE
+!--  input parameters
+     INTEGER(iwp), INTENT(IN)          :: i, j, k, kk        !< indices of the pc gridbox
+     REAL(wp), INTENT(IN)              :: pcbsw              !< sw radiation in gridbox (W)
+     REAL(wp), INTENT(IN)              :: pcblw              !< lw radiation in gridbox (W)
+     REAL(wp), INTENT(OUT)             :: pcbtr              !< transpiration rate dq/dt (kg/kg/s)
+     REAL(wp), INTENT(OUT)             :: pcblh              !< latent heat from transpiration dT/dt (K/s)
+
+!--  variables and parameters for calculation of transpiration rate
+     REAL(wp)                          :: sat_press, sat_press_d, temp, v_lad
+     REAL(wp)                          :: d_fact, g_b, g_s, wind_speed, evapor_rate
+     REAL(wp)                          :: f1, f2, f3, f4, vpd, rswc, e_eq, e_imp, rad
+     REAL(wp), PARAMETER               :: gama_psychr = 66   !< psychrometric constant (Pa/K)
+     REAL(wp), PARAMETER               :: g_s_max = 0.01     !< maximum stomatal conductivity (m/s)
+     REAL(wp), PARAMETER               :: m_soil = 0.4_wp    !< soil water content (needs to adjust or take from LSM)
+     REAL(wp), PARAMETER               :: m_wilt = 0.01_wp   !< wilting point soil water content (needs to adjust or take from LSM)
+     REAL(wp), PARAMETER               :: m_sat = 0.51_wp    !< saturation soil water content (needs to adjust or take from LSM)
+     REAL(wp), PARAMETER               :: t2_min = 0.0_wp    !< minimal temperature for calculation of f2
+     REAL(wp), PARAMETER               :: t2_max = 40.0_wp   !< maximal temperature for calculation of f2
+
+
+!--  Temperature (deg C)
+     temp = pt(k,j,i) * exner(k) - degc_to_k
+!--  Coefficient for conversion of radiation to grid to radiation to unit leaves surface
+     v_lad = 1.0_wp / ( MAX(lad_s(kk,j,i), 1.0e-10) * dx * dy * dz(1) )
+!--  Magnus formula for the saturation pressure (see Ngao, Adam and Saudreau (2017) eq. 1)
+!--  There are updated formulas available, kept consistent with the rest of the parametrization
+     sat_press = 610.8_wp * exp(17.27_wp * temp/(temp + 237.3_wp))
+!--  Saturation pressure derivative (derivative of the above)
+     sat_press_d = sat_press * 17.27_wp * 237.3_wp / (temp + 237.3_wp)**2
+!--  Wind speed
+     wind_speed = SQRT( ((u(k,j,i) + u(k,j,i+1))/2.0_wp )**2 +           &
+                        ((v(k,j,i) + v(k,j,i+1))/2.0_wp )**2 +           &
+                        ((w(k,j,i) + w(k,j,i+1))/2.0_wp )**2 )
+!--  Aerodynamic conductivity (Daudet et al. (1999) eq. 14
+     g_b = 0.01_wp * wind_speed + 0.0071_wp
+!--  Radiation flux per leaf surface unit
+     rad = pcbsw * v_lad
+!--  First function for calculation of stomatal conductivity (radiation dependency)
+!--  Stewart (1988; Agric. and Forest. Meteorol. 43) eq. 17
+     f1 = rad * (1000._wp+42.1_wp) / 1000._wp / (rad+42.1_wp)
+!--  Second function for calculation of stomatal conductivity (temperature dependency)
+!--  Stewart (1988; Agric. and Forest. Meteorol. 43) eq. 21
+     f2 = MAX(t2_min, (temp-t2_min) * (t2_max-temp)**((t2_max-16.9_wp)/(16.9_wp-t2_min)) / &
+              ((16.9_wp-t2_min) * (t2_max-16.9_wp)**((t2_max-16.9_wp)/(16.9_wp-t2_min))) )
+!--  Water pressure deficit
+!--  Ngao, Adam and Saudreau (2017) eq. 6 but with water vapour partial pressure
+     vpd = max( sat_press - q(k,j,i) * hyp(k) / rd_d_rv, 0._wp )
+!--  Third function for calculation of stomatal conductivity (water pressure deficit dependency)
+!--  Ngao, Adam and Saudreau (2017) Table 1, limited from below according to Stewart (1988)
+!--  The coefficients of the linear dependence should better correspond to broad-leaved trees
+!--  than the coefficients from Stewart (1988) which correspond to conifer trees.
+     vpd = MIN(MAX(vpd,770.0_wp),3820.0_wp)
+     f3 = -2e-4_wp * vpd + 1.154_wp
+!--  Fourth function for calculation of stomatal conductivity (soil moisture dependency)
+!--  Residual soil water content
+!--  van Wijk et al. (1998; Tree Physiology 20) eq. 7
+!--  TODO - over LSM surface might be calculated from LSM parameters
+     rswc = ( m_sat - m_soil ) / ( m_sat - m_wilt )
+!--  van Wijk et al. (1998; Tree Physiology 20) eq. 5-6 (it is a reformulation of eq. 22-23 of Stewart(1988))
+     f4 = MAX(0._wp, MIN(1.0_wp - 0.041_wp * EXP(3.2_wp * rswc), 1.0_wp - 0.041_wp))
+!--  Stomatal conductivity
+!--  Stewart (1988; Agric. and Forest. Meteorol. 43) eq. 12
+!--  (notation according to Ngao, Adam and Saudreau (2017) and others)
+     g_s = g_s_max * f1 * f2 * f3 * f4 + 1.0e-10_wp
+!--  Decoupling factor
+!--  Daudet et al. (1999) eq. 6
+     d_fact = (sat_press_d / gama_psychr + 2._wp ) /                        &
+              (sat_press_d / gama_psychr + 2._wp + 2 * g_b / g_s )
+!--  Equilibrium evaporation rate
+!--  Daudet et al. (1999) eq. 4
+     e_eq = (pcbsw + pcblw) * v_lad * sat_press_d /                         &
+                 gama_psychr /( sat_press_d / gama_psychr + 2.0_wp ) / l_v
+!--  Imposed evaporation rate
+!--  Daudet et al. (1999) eq. 5
+     e_imp = r_d * pt(k,j,i) * exner(k) / hyp(k) * c_p * g_s * vpd / gama_psychr / l_v
+!--  Evaporation rate
+!--  Daudet et al. (1999) eq. 3
+!--  (evaporation rate is limited to non-negative values)
+     evapor_rate = MAX(d_fact * e_eq + ( 1.0_wp - d_fact ) * e_imp, 0.0_wp)
+!--  Conversion of evaporation rate to q tendency in gridbox
+!--  dq/dt = E * LAD * V_g / (rho_air * V_g)
+     pcbtr = evapor_rate * r_d * pt(k,j,i) * exner(k) * lad_s(kk,j,i) / hyp(k)  !-- = dq/dt
+!--  latent heat from evaporation
+     pcblh = pcbtr * lv_d_cp  !-- = - dT/dt
+
+ END SUBROUTINE pcm_calc_transpiration_rate
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for plant canopy model
+!------------------------------------------------------------------------------!
+ SUBROUTINE pcm_check_data_output( var, unit )
+ 
+ 
+    USE control_parameters,                                                 &
+        ONLY:  message_string, urban_surface
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit  !< 
+    CHARACTER (LEN=*) ::  var   !<
+
+
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'pcm_heatrate' )
+          IF ( cthf == 0.0_wp  .AND. .NOT.  urban_surface )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                              'res setting of parameter cthf /= 0.0'
+             CALL message( 'pcm_check_data_output', 'PA1000', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'K s-1'
+    
+       CASE ( 'pcm_transpirationrate' )
+          unit = 'kg kg-1 s-1'
+
+       CASE ( 'pcm_latentrate' )
+          unit = 'K s-1'
+
+       CASE ( 'pcm_bowenratio' )
+          unit = 'K s-1'
+
+       CASE ( 'pcm_lad' )
+          unit = 'm2 m-3'
+
+
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+
+ END SUBROUTINE pcm_check_data_output
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for plant canopy model
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_check_parameters
+
+       USE control_parameters,                                                 &
+           ONLY: coupling_char, message_string
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY: bulk_cloud_model, microphysics_seifert
+
+       USE netcdf_data_input_mod,                                              &
+           ONLY:  input_file_static, input_pids_static
+                 
+    
+       IMPLICIT NONE
+
+    
+       IF ( canopy_drag_coeff == 0.0_wp )  THEN
+          message_string = 'plant_canopy = .TRUE. requires a non-zero drag '// &
+                           'coefficient & given value is canopy_drag_coeff = 0.0'
+          CALL message( 'pcm_check_parameters', 'PA0041', 1, 2, 0, 6, 0 )
+       ENDIF
+    
+       IF ( ( alpha_lad /= 9999999.9_wp  .AND.  beta_lad == 9999999.9_wp ) .OR.&
+              beta_lad /= 9999999.9_wp   .AND.  alpha_lad == 9999999.9_wp )  THEN
+          message_string = 'using the beta function for the construction ' //  &
+                           'of the leaf area density profile requires '    //  &
+                           'both alpha_lad and beta_lad to be /= 9999999.9'
+          CALL message( 'pcm_check_parameters', 'PA0118', 1, 2, 0, 6, 0 )
+       ENDIF
+    
+       IF ( calc_beta_lad_profile  .AND.  lai_beta == 0.0_wp )  THEN
+          message_string = 'using the beta function for the construction ' //  &
+                           'of the leaf area density profile requires '    //  &
+                           'a non-zero lai_beta, but given value is '      //  &
+                           'lai_beta = 0.0'
+          CALL message( 'pcm_check_parameters', 'PA0119', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( calc_beta_lad_profile  .AND.  lad_surface /= 0.0_wp )  THEN
+          message_string = 'simultaneous setting of alpha_lad /= 9999999.9 '// &
+                           'combined with beta_lad /= 9999999.9 '           // &
+                           'and lad_surface /= 0.0 is not possible, '       // &
+                           'use either vertical gradients or the beta '     // &
+                           'function for the construction of the leaf area '// &
+                           'density profile'
+          CALL message( 'pcm_check_parameters', 'PA0120', 1, 2, 0, 6, 0 )
+       ENDIF 
+
+       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+          message_string = 'plant_canopy = .TRUE. requires cloud_scheme /=' // &
+                          ' seifert_beheng'
+          CALL message( 'pcm_check_parameters', 'PA0360', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    If dynamic input file is used, canopy need to be read from file
+       IF ( input_pids_static  .AND.                                           &
+            TRIM( canopy_mode ) /= 'read_from_file_3d' )  THEN
+          message_string = 'Usage of dynamic input file ' //                   &
+                           TRIM( input_file_static ) //                        &
+                           TRIM( coupling_char ) // ' requires ' //            &
+                           'canopy_mode = read_from_file_3d'
+          CALL message( 'pcm_check_parameters', 'PA0999', 1, 2, 0, 6, 0 )
+       ENDIF
+
+ 
+    END SUBROUTINE pcm_check_parameters 
+ 
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE pcm_data_output_3d( av, variable, found, local_pf, fill_value,     &
+                                nzb_do, nzt_do )
+  
+    USE indices
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av     !< 
+    INTEGER(iwp) ::  i      !< 
+    INTEGER(iwp) ::  j      !< 
+    INTEGER(iwp) ::  k      !< 
+    INTEGER(iwp) ::  k_topo !< topography top index
+    INTEGER(iwp) ::  nzb_do !< lower limit of the data output (usually 0)
+    INTEGER(iwp) ::  nzt_do !< vertical upper limit of the data output (usually nz_do3d)
+
+    LOGICAL      ::  found !< 
+
+    REAL(wp)     ::  fill_value
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+
+    found = .TRUE.
+
+    local_pf = REAL( fill_value, KIND = 4 )
+
+    SELECT CASE ( TRIM( variable ) )
+
+      CASE ( 'pcm_heatrate' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  IF ( pch_index_ji(j,i) /= 0 )  THEN
+                     k_topo = get_topography_top_index_ji( j, i, 's' )
+                     DO  k = k_topo, k_topo + pch_index_ji(j,i)
+                        local_pf(i,j,k) = pc_heating_rate(k-k_topo,j,i)
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+   
+       CASE ( 'pcm_transpirationrate' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  IF ( pch_index_ji(j,i) /= 0 )  THEN
+                     k_topo = get_topography_top_index_ji( j, i, 's' )
+                     DO  k = k_topo, k_topo + pch_index_ji(j,i)
+                        local_pf(i,j,k) = pc_transpiration_rate(k-k_topo,j,i)
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+
+       CASE ( 'pcm_latentrate' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  IF ( pch_index_ji(j,i) /= 0 )  THEN
+                     k_topo = get_topography_top_index_ji( j, i, 's' )
+                     DO  k = k_topo, k_topo + pch_index_ji(j,i)
+                        local_pf(i,j,k) = pc_latent_rate(k-k_topo,j,i)
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+
+       CASE ( 'pcm_bowenratio' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  IF ( pch_index_ji(j,i) /= 0 )  THEN
+                     k_topo = get_topography_top_index_ji( j, i, 's' )
+                     DO  k = k_topo, k_topo + pch_index_ji(j,i)
+                        IF ( pc_latent_rate(k-k_topo,j,i) /= 0._wp ) THEN
+                           local_pf(i,j,k) = pc_heating_rate(k-k_topo,j,i) / &
+                                             pc_latent_rate(k-k_topo,j,i)
+                        ENDIF
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'pcm_lad' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  IF ( pch_index_ji(j,i) /= 0 )  THEN
+                     k_topo = get_topography_top_index_ji( j, i, 's' )
+                     DO  k = k_topo, k_topo + pch_index_ji(j,i)
+                        local_pf(i,j,k) = lad_s(k-k_topo,j,i)
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+                  
+         
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE pcm_data_output_3d 
+         
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called from subroutine netcdf.
+!------------------------------------------------------------------------------!
+ SUBROUTINE pcm_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+     IMPLICIT NONE
+
+     CHARACTER (LEN=*), INTENT(IN)  ::  var         !< 
+     LOGICAL, INTENT(OUT)           ::  found       !< 
+     CHARACTER (LEN=*), INTENT(OUT) ::  grid_x      !< 
+     CHARACTER (LEN=*), INTENT(OUT) ::  grid_y      !< 
+     CHARACTER (LEN=*), INTENT(OUT) ::  grid_z      !< 
+
+     found  = .TRUE.
+
+!
+!--  Check for the grid
+     SELECT CASE ( TRIM( var ) )
+
+        CASE ( 'pcm_heatrate', 'pcm_lad', 'pcm_transpirationrate', 'pcm_latentrate', 'pcm_bowenratio')
+           grid_x = 'x'
+           grid_y = 'y'
+           grid_z = 'zu'
+
+        CASE DEFAULT
+           found  = .FALSE.
+           grid_x = 'none'
+           grid_y = 'none'
+           grid_z = 'none'
+     END SELECT
+
+ END SUBROUTINE pcm_define_netcdf_grid
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for plant canopy model
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_header ( io )
+
+       USE control_parameters,                                                 &
+           ONLY: passive_scalar
+
+
+       IMPLICIT NONE
+ 
+       CHARACTER (LEN=10) ::  coor_chr            !<
+
+       CHARACTER (LEN=86) ::  coordinates         !<
+       CHARACTER (LEN=86) ::  gradients           !<
+       CHARACTER (LEN=86) ::  leaf_area_density   !<
+       CHARACTER (LEN=86) ::  slices              !<
+ 
+       INTEGER(iwp) :: i                !< 
+       INTEGER(iwp),  INTENT(IN) ::  io !< Unit of the output file
+       INTEGER(iwp) :: k                !<       
+   
+       REAL(wp) ::  canopy_height       !< canopy height (in m)
+       
+       canopy_height = zw(pch_index)
+
+       WRITE ( io, 1 )  canopy_mode, canopy_height, pch_index,                 &
+                          canopy_drag_coeff
+       IF ( passive_scalar )  THEN
+          WRITE ( io, 2 )  leaf_scalar_exch_coeff,                             &
+                             leaf_surface_conc
+       ENDIF
+
+!
+!--    Heat flux at the top of vegetation
+       WRITE ( io, 3 )  cthf
+
+!
+!--    Leaf area density profile, calculated either from given vertical 
+!--    gradients or from beta probability density function.
+       IF (  .NOT.  calc_beta_lad_profile )  THEN
+
+!--       Building output strings, starting with surface value
+          WRITE ( leaf_area_density, '(F7.4)' )  lad_surface
+          gradients = '------'
+          slices = '     0'
+          coordinates = '   0.0'
+          i = 1
+          DO  WHILE ( i < 11  .AND.  lad_vertical_gradient_level_ind(i)        &
+                      /= -9999 )
+
+             WRITE (coor_chr,'(F7.2)')  lad(lad_vertical_gradient_level_ind(i))
+             leaf_area_density = TRIM( leaf_area_density ) // ' ' //           &
+                                 TRIM( coor_chr )
+ 
+             WRITE (coor_chr,'(F7.2)')  lad_vertical_gradient(i)
+             gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
+
+             WRITE (coor_chr,'(I7)')  lad_vertical_gradient_level_ind(i)
+             slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
+
+             WRITE (coor_chr,'(F7.1)')  lad_vertical_gradient_level(i)
+             coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
+
+             i = i + 1
+          ENDDO
+
+          WRITE ( io, 4 )  TRIM( coordinates ), TRIM( leaf_area_density ),     &
+                             TRIM( gradients ), TRIM( slices )
+
+       ELSE
+       
+          WRITE ( leaf_area_density, '(F7.4)' )  lad_surface
+          coordinates = '   0.0'
+          
+          DO  k = 1, pch_index
+
+             WRITE (coor_chr,'(F7.2)')  lad(k)
+             leaf_area_density = TRIM( leaf_area_density ) // ' ' //           &
+                                 TRIM( coor_chr )
+ 
+             WRITE (coor_chr,'(F7.1)')  zu(k)
+             coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
+
+          ENDDO       
+
+          WRITE ( io, 5 ) TRIM( coordinates ), TRIM( leaf_area_density ),      &
+                          alpha_lad, beta_lad, lai_beta
+
+       ENDIF  
+
+1 FORMAT (//' Vegetation canopy (drag) model:'/                                &
+              ' ------------------------------'//                              &
+              ' Canopy mode: ', A /                                            &
+              ' Canopy height: ',F6.2,'m (',I4,' grid points)' /               &
+              ' Leaf drag coefficient: ',F6.2 /)
+2 FORMAT (/ ' Scalar exchange coefficient: ',F6.2 /                            &
+              ' Scalar concentration at leaf surfaces in kg/m**3: ',F6.2 /)
+3 FORMAT (' Predefined constant heatflux at the top of the vegetation: ',F6.2, &
+          ' K m/s')
+4 FORMAT (/ ' Characteristic levels of the leaf area density:'//               &
+              ' Height:              ',A,'  m'/                                &
+              ' Leaf area density:   ',A,'  m**2/m**3'/                        &
+              ' Gradient:            ',A,'  m**2/m**4'/                        &
+              ' Gridpoint:           ',A)
+5 FORMAT (//' Characteristic levels of the leaf area density and coefficients:'&
+          //  ' Height:              ',A,'  m'/                                &
+              ' Leaf area density:   ',A,'  m**2/m**3'/                        &
+              ' Coefficient alpha: ',F6.2 /                                    &
+              ' Coefficient beta: ',F6.2 /                                     &
+              ' Leaf area index: ',F6.2,'  m**2/m**2' /)   
+       
+    END SUBROUTINE pcm_header
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the plant canopy model
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_init
+    
+
+       USE control_parameters,                                                 &
+           ONLY: message_string, ocean_mode, urban_surface
+
+       USE netcdf_data_input_mod,                                              &
+           ONLY:  leaf_area_density_f
+
+       USE surface_mod,                                                        &
+           ONLY: surf_def_h, surf_lsm_h, surf_usm_h
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i   !< running index
+       INTEGER(iwp) ::  j   !< running index
+       INTEGER(iwp) ::  k   !< running index
+       INTEGER(iwp) ::  m   !< running index
+       INTEGER(iwp) ::  pch_index_l
+
+       REAL(wp) ::  int_bpdf        !< vertical integral for lad-profile construction
+       REAL(wp) ::  gradient        !< gradient for lad-profile construction
+       REAL(wp) ::  canopy_height   !< canopy height for lad-profile construction
+
+!
+!--    Allocate one-dimensional arrays for the computation of the 
+!--    leaf area density (lad) profile
+       ALLOCATE( lad(0:nz+1), pre_lad(0:nz+1) )
+       lad = 0.0_wp
+       pre_lad = 0.0_wp
+
+!
+!--    Set flag that indicates that the lad-profile shall be calculated by using
+!--    a beta probability density function
+       IF ( alpha_lad /= 9999999.9_wp  .AND.  beta_lad /= 9999999.9_wp )  THEN
+          calc_beta_lad_profile = .TRUE.
+       ENDIF
+       
+       
+!
+!--    Compute the profile of leaf area density used in the plant
+!--    canopy model. The profile can either be constructed from
+!--    prescribed vertical gradients of the leaf area density or by
+!--    using a beta probability density function (see e.g. Markkanen et al., 
+!--    2003: Boundary-Layer Meteorology, 106, 437-459) 
+       IF (  .NOT.  calc_beta_lad_profile )  THEN   
+
+!
+!--       Use vertical gradients for lad-profile construction    
+          i = 1
+          gradient = 0.0_wp
+
+          IF (  .NOT.  ocean_mode )  THEN
+
+             lad(0) = lad_surface
+             lad_vertical_gradient_level_ind(1) = 0
+ 
+             DO k = 1, pch_index
+                IF ( i < 11 )  THEN
+                   IF ( lad_vertical_gradient_level(i) < zu(k)  .AND.          &
+                        lad_vertical_gradient_level(i) >= 0.0_wp )  THEN
+                      gradient = lad_vertical_gradient(i)
+                      lad_vertical_gradient_level_ind(i) = k - 1
+                      i = i + 1
+                   ENDIF
+                ENDIF
+                IF ( gradient /= 0.0_wp )  THEN
+                   IF ( k /= 1 )  THEN
+                      lad(k) = lad(k-1) + dzu(k) * gradient
+                   ELSE
+                      lad(k) = lad_surface + dzu(k) * gradient
+                   ENDIF
+                ELSE
+                   lad(k) = lad(k-1)
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+!
+!--       In case of no given leaf area density gradients, choose a vanishing
+!--       gradient. This information is used for the HEADER and the RUN_CONTROL
+!--       file.
+          IF ( lad_vertical_gradient_level(1) == -9999999.9_wp )  THEN
+             lad_vertical_gradient_level(1) = 0.0_wp
+          ENDIF
+
+       ELSE
+
+! 
+!--       Use beta function for lad-profile construction
+          int_bpdf = 0.0_wp
+          canopy_height = zw(pch_index)
+
+          DO k = 0, pch_index
+             int_bpdf = int_bpdf +                                             &
+                      ( ( ( zw(k) / canopy_height )**( alpha_lad-1.0_wp ) ) *  &
+                      ( ( 1.0_wp - ( zw(k) / canopy_height ) )**(              &
+                          beta_lad-1.0_wp ) )                                  &
+                      * ( ( zw(k+1)-zw(k) ) / canopy_height ) )
+          ENDDO
+
+!
+!--       Preliminary lad profile (defined on w-grid)
+          DO k = 0, pch_index
+             pre_lad(k) =  lai_beta *                                          &
+                        ( ( ( zw(k) / canopy_height )**( alpha_lad-1.0_wp ) )  &
+                        * ( ( 1.0_wp - ( zw(k) / canopy_height ) )**(          &
+                              beta_lad-1.0_wp ) ) / int_bpdf                   &
+                        ) / canopy_height
+          ENDDO
+
+!
+!--       Final lad profile (defined on scalar-grid level, since most prognostic
+!--       quantities are defined there, hence, less interpolation is required 
+!--       when calculating the canopy tendencies)
+          lad(0) = pre_lad(0)
+          DO k = 1, pch_index
+             lad(k) = 0.5 * ( pre_lad(k-1) + pre_lad(k) )
+          ENDDO          
+
+       ENDIF
+
+!
+!--    Allocate 3D-array for the leaf area density (lad_s).
+       ALLOCATE( lad_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+!
+!--    Initialize canopy parameters cdc (canopy drag coefficient), 
+!--    lsec (leaf scalar exchange coefficient), lsc (leaf surface concentration)
+!--    with the prescribed values
+       cdc = canopy_drag_coeff
+       lsec = leaf_scalar_exch_coeff
+       lsc = leaf_surface_conc
+
+!
+!--    Initialization of the canopy coverage in the model domain:
+!--    Setting the parameter canopy_mode = 'block' initializes a canopy, which
+!--    fully covers the domain surface
+       SELECT CASE ( TRIM( canopy_mode ) )
+
+          CASE( 'block' )
+
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   lad_s(:,j,i) = lad(:)
+                ENDDO
+             ENDDO
+
+          CASE ( 'read_from_file_3d' )
+!
+!--          Initialize LAD with data from file. If LAD is given in NetCDF file,
+!--          use these values, else take LAD profiles from ASCII file. 
+!--          Please note, in NetCDF file LAD is only given up to the maximum 
+!--          canopy top, indicated by leaf_area_density_f%nz.  
+             lad_s = 0.0_wp
+             IF ( leaf_area_density_f%from_file )  THEN
+!
+!--             Set also pch_index, used to be the upper bound of the vertical 
+!--             loops. Therefore, use the global top of the canopy layer. 
+                pch_index = leaf_area_density_f%nz - 1
+
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = 0, leaf_area_density_f%nz - 1
+                      IF ( leaf_area_density_f%var(k,j,i) /=                   &
+                           leaf_area_density_f%fill )                          &
+                         lad_s(k,j,i) = leaf_area_density_f%var(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+                CALL exchange_horiz( lad_s, nbgp )
+!
+!            ASCII file
+!--          Initialize canopy parameters cdc (canopy drag coefficient),
+!--          lsec (leaf scalar exchange coefficient), lsc (leaf surface concentration)
+!--          from file which contains complete 3D data (separate vertical profiles for
+!--          each location).
+             ELSE
+                CALL pcm_read_plant_canopy_3d
+             ENDIF
+
+          CASE DEFAULT
+!
+!--          The DEFAULT case is reached either if the parameter 
+!--          canopy mode contains a wrong character string or if the 
+!--          user has coded a special case in the user interface. 
+!--          There, the subroutine user_init_plant_canopy checks 
+!--          which of these two conditions applies.
+             CALL user_init_plant_canopy
+ 
+       END SELECT
+!
+!--    Initialize 2D index array indicating canopy top index. 
+       ALLOCATE( pch_index_ji(nysg:nyng,nxlg:nxrg) )
+       pch_index_ji = 0
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = 0, pch_index
+                IF ( lad_s(k,j,i) /= 0 )  pch_index_ji(j,i) = k
+             ENDDO
+!
+!--          Check whether topography and local vegetation on top exceed 
+!--          height of the model domain.
+             k = get_topography_top_index_ji( j, i, 's' )
+             IF ( k + pch_index_ji(j,i) >= nzt + 1 )  THEN
+                message_string =  'Local vegetation height on top of ' //      &
+                                  'topography exceeds height of model domain.'
+                CALL message( 'pcm_init', 'PA0999', 2, 2, 0, 6, 0 )
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+       CALL exchange_horiz_2d_int( pch_index_ji, nys, nyn, nxl, nxr, nbgp )
+
+!--    Calculate global pch_index value (index of top of plant canopy from ground)
+       pch_index = MAXVAL(pch_index_ji)
+!--    Exchange pch_index from all processors
+#if defined( __parallel )
+       CALL MPI_Allreduce(MPI_IN_PLACE, pch_index, 1, MPI_INTEGER, MPI_MAX, comm2d, ierr)
+       IF ( ierr /= 0 )  THEN
+          WRITE (9,*) 'Error MPI_Allreduce pch_index:', ierr
+          FLUSH(9)
+       ENDIF
+#endif
+
+!--    Allocation of arrays pc_heating_rate, pc_transpiration_rate and pc_latent_rate
+       ALLOCATE( pc_heating_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
+       IF ( humidity )  THEN
+          ALLOCATE( pc_transpiration_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
+          pc_transpiration_rate = 0.0_wp
+          ALLOCATE( pc_latent_rate(0:pch_index,nysg:nyng,nxlg:nxrg) )
+          pc_latent_rate = 0.0_wp
+       ENDIF
+
+!
+!--    Initialization of the canopy heat source distribution due to heating
+!--    of the canopy layers by incoming solar radiation, in case that a non-zero
+!--    value is set for the canopy top heat flux (cthf), which equals the
+!--    available net radiation at canopy top.
+!--    The heat source distribution is calculated by a decaying exponential 
+!--    function of the downward cumulative leaf area index (cum_lai_hf), 
+!--    assuming that the foliage inside the plant canopy is heated by solar
+!--    radiation penetrating the canopy layers according to the distribution
+!--    of net radiation as suggested by Brown & Covey (1966; Agric. Meteorol. 3, 
+!--    73â96). This approach has been applied e.g. by Shaw & Schumann (1992;
+!--    Bound.-Layer Meteorol. 61, 47â64).
+!--    When using the radiation_interactions, canopy heating (pc_heating_rate)
+!--    and plant canopy transpiration (pc_transpiration_rate, pc_latent_rate)
+!--    are calculated in the RTM after the calculation of radiation.
+!--    We cannot use variable radiation_interactions here to determine the situation
+!--    as it is assigned in init_3d_model after the call of pcm_init.
+       IF ( cthf /= 0.0_wp )  THEN
+
+          ALLOCATE( cum_lai_hf(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!
+!--       Piecewise calculation of the cumulative leaf area index by vertical
+!--       integration of the leaf area density
+          cum_lai_hf(:,:,:) = 0.0_wp
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                DO  k = pch_index_ji(j,i)-1, 0, -1
+                   IF ( k == pch_index_ji(j,i)-1 )  THEN
+                      cum_lai_hf(k,j,i) = cum_lai_hf(k+1,j,i) +                &
+                         ( 0.5_wp * lad_s(k+1,j,i) *                           &
+                           ( zw(k+1) - zu(k+1) ) )  +                          &
+                         ( 0.5_wp * ( 0.5_wp * ( lad_s(k+1,j,i) +              &
+                                                 lad_s(k,j,i) ) +              &
+                                      lad_s(k+1,j,i) ) *                       &
+                           ( zu(k+1) - zw(k) ) ) 
+                   ELSE
+                      cum_lai_hf(k,j,i) = cum_lai_hf(k+1,j,i) +                &
+                         ( 0.5_wp * ( 0.5_wp * ( lad_s(k+2,j,i) +              &
+                                                 lad_s(k+1,j,i) ) +            &
+                                      lad_s(k+1,j,i) ) *                       &
+                           ( zw(k+1) - zu(k+1) ) )  +                          &
+                         ( 0.5_wp * ( 0.5_wp * ( lad_s(k+1,j,i) +              &
+                                                 lad_s(k,j,i) ) +              &
+                                      lad_s(k+1,j,i) ) *                       &
+                           ( zu(k+1) - zw(k) ) )
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+!            
+!--       In areas with canopy the surface value of the canopy heat 
+!--       flux distribution overrides the surface heat flux (shf) 
+!--       Start with default surface type
+          DO  m = 1, surf_def_h(0)%ns
+             k = surf_def_h(0)%k(m)
+             IF ( cum_lai_hf(0,j,i) /= 0.0_wp )                                &
+                surf_def_h(0)%shf(m) = cthf * exp( -ext_coef * cum_lai_hf(0,j,i) )
+          ENDDO
+!
+!--       Natural surfaces
+          DO  m = 1, surf_lsm_h%ns
+             k = surf_lsm_h%k(m)
+             IF ( cum_lai_hf(0,j,i) /= 0.0_wp )                                &
+                surf_lsm_h%shf(m) = cthf * exp( -ext_coef * cum_lai_hf(0,j,i) )
+          ENDDO
+!
+!--       Urban surfaces
+          DO  m = 1, surf_usm_h%ns
+             k = surf_usm_h%k(m)
+             IF ( cum_lai_hf(0,j,i) /= 0.0_wp )                                &
+                surf_usm_h%shf(m) = cthf * exp( -ext_coef * cum_lai_hf(0,j,i) )
+          ENDDO
+!
+!
+!--       Calculation of the heating rate (K/s) within the different layers of 
+!--       the plant canopy. Calculation is only necessary in areas covered with
+!--       canopy. 
+!--       Within the different canopy layers the plant-canopy heating
+!--       rate (pc_heating_rate) is calculated as the vertical 
+!--       divergence of the canopy heat fluxes at the top and bottom
+!--       of the respective layer
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                DO  k = 1, pch_index_ji(j,i)
+                   IF ( cum_lai_hf(0,j,i) /= 0.0_wp )  THEN
+                      pc_heating_rate(k,j,i) = cthf *                          &
+                                ( exp(-ext_coef*cum_lai_hf(k,j,i)) -           &
+                                  exp(-ext_coef*cum_lai_hf(k-1,j,i) ) ) / dzw(k)
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+
+    END SUBROUTINE pcm_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &plant_canopy_parameters for plant canopy model
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_parin
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string, plant_canopy
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
+       
+       NAMELIST /plant_canopy_parameters/                                      &
+                                  alpha_lad, beta_lad, canopy_drag_coeff,      &
+                                  canopy_mode, cthf,                           &
+                                  lad_surface, lad_type_coef,                  & 
+                                  lad_vertical_gradient,                       &
+                                  lad_vertical_gradient_level,                 &
+                                  lai_beta,                                    &
+                                  leaf_scalar_exch_coeff,                      &
+                                  leaf_surface_conc, pch_index,                &
+                                  plant_canopy_transpiration
+
+       NAMELIST /canopy_par/      alpha_lad, beta_lad, canopy_drag_coeff,      &
+                                  canopy_mode, cthf,                           &
+                                  lad_surface, lad_type_coef,                  & 
+                                  lad_vertical_gradient,                       &
+                                  lad_vertical_gradient_level,                 &
+                                  lai_beta,                                    &
+                                  leaf_scalar_exch_coeff,                      &
+                                  leaf_surface_conc, pch_index,                &
+                                  plant_canopy_transpiration
+
+       line = ' '
+
+!
+!--    Try to find radiation model package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&plant_canopy_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, plant_canopy_parameters, ERR = 10 )
+
+!
+!--    Set flag that indicates that the radiation model is switched on
+       plant_canopy = .TRUE.
+
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'plant_canopy_parameters', line )
+!
+!--    Try to find old namelist
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&canopy_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, canopy_par, ERR = 13, END = 14 )
+
+       message_string = 'namelist canopy_par is deprecated and will be ' // &
+                     'removed in near future. Please use namelist ' //      &
+                     'plant_canopy_parameters instead'
+       CALL message( 'pcm_parin', 'PA0487', 0, 1, 0, 6, 0 )
+
+!
+!--    Set flag that indicates that the radiation model is switched on
+       plant_canopy = .TRUE.
+
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'canopy_par', line )
+
+ 14    CONTINUE
+
+
+    END SUBROUTINE pcm_parin
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> Loads 3D plant canopy data from file. File format is as follows:
+!>
+!> num_levels
+!> dtype,x,y,pctype,value(nzb),value(nzb+1), ... ,value(nzb+num_levels-1)
+!> dtype,x,y,pctype,value(nzb),value(nzb+1), ... ,value(nzb+num_levels-1)
+!> dtype,x,y,pctype,value(nzb),value(nzb+1), ... ,value(nzb+num_levels-1)
+!> ...
+!>
+!> i.e. first line determines number of levels and further lines represent plant
+!> canopy data, one line per column and variable. In each data line,
+!> dtype represents variable to be set:
+!>
+!> dtype=1: leaf area density (lad_s)
+!> dtype=2....n: some additional plant canopy input data quantity
+!>
+!> Zeros are added automatically above num_levels until top of domain.  Any
+!> non-specified (x,y) columns have zero values as default.
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_read_plant_canopy_3d
+    
+       USE control_parameters,                                                 &
+           ONLY:  coupling_char, message_string
+
+       USE indices,                                                            &
+           ONLY:  nbgp
+           
+       IMPLICIT NONE
+
+       INTEGER(iwp)                        ::  dtype     !< type of input data (1=lad)
+       INTEGER(iwp)                        ::  pctype    !< type of plant canopy (deciduous,non-deciduous,...)
+       INTEGER(iwp)                        ::  i, j      !< running index
+       INTEGER(iwp)                        ::  nzp       !< number of vertical layers of plant canopy
+       INTEGER(iwp)                        ::  nzpltop   !<
+       INTEGER(iwp)                        ::  nzpl      !<
+       INTEGER(iwp)                        ::  kk        !<
+       
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  col   !< vertical column of input data
+
+!
+!--    Initialize lad_s array
+       lad_s = 0.0_wp
+       
+!
+!--    Open and read plant canopy input data
+       OPEN(152, FILE='PLANT_CANOPY_DATA_3D' // TRIM( coupling_char ),         &
+                 ACCESS='SEQUENTIAL', ACTION='READ', STATUS='OLD',             &
+                 FORM='FORMATTED', ERR=515)
+       READ(152, *, ERR=516, END=517)  nzp   !< read first line = number of vertical layers
+       nzpltop = MIN(nzt+1, nzb+nzp-1)
+       nzpl = nzpltop - nzb + 1    !< no. of layers to assign
+       ALLOCATE( col(0:nzp-1) )
+
+       DO
+          READ(152, *, ERR=516, END=517) dtype, i, j, pctype, col(:)
+          IF ( i < nxlg  .OR.  i > nxrg  .OR.  j < nysg  .OR.  j > nyng )  CYCLE
+          
+          SELECT CASE (dtype)
+             CASE( 1 )   !< leaf area density
+!
+!--             This is just the pure canopy layer assumed to be grounded to
+!--             a flat domain surface. At locations where plant canopy sits 
+!--             on top of any kind of topography, the vertical plant column 
+!--             must be "lifted", which is done in SUBROUTINE pcm_tendency.           
+                IF ( pctype < 0  .OR.  pctype > 10 )  THEN   !< incorrect plant canopy type
+                   WRITE( message_string, * ) 'Incorrect type of plant canopy. '   //  &
+                                              'Allowed values 0 <= pctype <= 10, ' //  &
+                                              'but pctype is ', pctype
+                   CALL message( 'pcm_read_plant_canopy_3d', 'PA0349', 1, 2, 0, 6, 0 )
+                ENDIF
+                kk = get_topography_top_index_ji( j, i, 's' )
+                lad_s(nzb:nzpltop-kk, j, i) = col(kk:nzpl-1)*lad_type_coef(pctype)
+             CASE DEFAULT
+                WRITE(message_string, '(a,i2,a)')   &
+                     'Unknown record type in file PLANT_CANOPY_DATA_3D: "', dtype, '"'
+                CALL message( 'pcm_read_plant_canopy_3d', 'PA0530', 1, 2, 0, 6, 0 )
+          END SELECT
+       ENDDO
+
+515    message_string = 'error opening file PLANT_CANOPY_DATA_3D'
+       CALL message( 'pcm_read_plant_canopy_3d', 'PA0531', 1, 2, 0, 6, 0 )
+
+516    message_string = 'error reading file PLANT_CANOPY_DATA_3D'
+       CALL message( 'pcm_read_plant_canopy_3d', 'PA0532', 1, 2, 0, 6, 0 )
+
+517    CLOSE(152)
+       DEALLOCATE( col )
+       
+       CALL exchange_horiz( lad_s, nbgp )
+        
+    END SUBROUTINE pcm_read_plant_canopy_3d
+    
+    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of the tendency terms, accounting for the effect of the plant
+!> canopy on momentum and scalar quantities.
+!>
+!> The canopy is located where the leaf area density lad_s(k,j,i) > 0.0 
+!> (defined on scalar grid), as initialized in subroutine pcm_init. 
+!> The lad on the w-grid is vertically interpolated from the surrounding
+!> lad_s. The upper boundary of the canopy is defined on the w-grid at 
+!> k = pch_index. Here, the lad is zero.
+!>
+!> The canopy drag must be limited (previously accounted for by calculation of 
+!> a limiting canopy timestep for the determination of the maximum LES timestep
+!> in subroutine timestep), since it is physically impossible that the canopy
+!> drag alone can locally change the sign of a velocity component. This 
+!> limitation is realized by calculating preliminary tendencies and velocities.
+!> It is subsequently checked if the preliminary new velocity has a different
+!> sign than the current velocity. If so, the tendency is limited in a way that
+!> the velocity can at maximum be reduced to zero by the canopy drag. 
+!>
+!>
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_tendency( component )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, message_string
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  component !< prognostic variable (u,v,w,pt,q,e)
+       INTEGER(iwp) ::  i         !< running index
+       INTEGER(iwp) ::  j         !< running index
+       INTEGER(iwp) ::  k         !< running index
+       INTEGER(iwp) ::  k_wall    !< vertical index of topography top
+       INTEGER(iwp) ::  kk        !< running index for flat lad arrays
+
+       REAL(wp) ::  ddt_3d    !< inverse of the LES timestep (dt_3d)
+       REAL(wp) ::  lad_local !< local lad value
+       REAL(wp) ::  pre_tend  !< preliminary tendency
+       REAL(wp) ::  pre_u     !< preliminary u-value 
+       REAL(wp) ::  pre_v     !< preliminary v-value 
+       REAL(wp) ::  pre_w     !< preliminary w-value 
+
+
+       ddt_3d = 1.0_wp / dt_3d
+ 
+!
+!--    Compute drag for the three velocity components and the SGS-TKE:
+       SELECT CASE ( component )
+
+!
+!--       u-component
+          CASE ( 1 )
+             DO  i = nxlu, nxr
+                DO  j = nys, nyn
+!
+!--                Determine topography-top index on u-grid
+                   k_wall = get_topography_top_index_ji( j, i, 'u' )
+                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+
+                      kk = k - k_wall   !- lad arrays are defined flat
+!
+!--                   In order to create sharp boundaries of the plant canopy, 
+!--                   the lad on the u-grid at index (k,j,i) is equal to 
+!--                   lad_s(k,j,i), rather than being interpolated from the 
+!--                   surrounding lad_s, because this would yield smaller lad 
+!--                   at the canopy boundaries than inside of the canopy.
+!--                   For the same reason, the lad at the rightmost(i+1)canopy 
+!--                   boundary on the u-grid equals lad_s(k,j,i).
+                      lad_local = lad_s(kk,j,i)
+                      IF ( lad_local == 0.0_wp .AND. lad_s(kk,j,i-1) > 0.0_wp )&
+                      THEN
+                         lad_local = lad_s(kk,j,i-1)
+                      ENDIF
+
+                      pre_tend = 0.0_wp
+                      pre_u = 0.0_wp
+!
+!--                   Calculate preliminary value (pre_tend) of the tendency
+                      pre_tend = - cdc *                                       &
+                                   lad_local *                                 &
+                                   SQRT( u(k,j,i)**2 +                         &
+                                         ( 0.25_wp * ( v(k,j,i-1) +            &
+                                                       v(k,j,i)   +            &
+                                                       v(k,j+1,i) +            &
+                                                       v(k,j+1,i-1) )          &
+                                         )**2 +                                &
+                                         ( 0.25_wp * ( w(k-1,j,i-1) +          &
+                                                       w(k-1,j,i)   +          &
+                                                       w(k,j,i-1)   +          &
+                                                       w(k,j,i) )              &
+                                         )**2                                  &
+                                       ) *                                     &
+                                   u(k,j,i)
+
+!
+!--                   Calculate preliminary new velocity, based on pre_tend
+                      pre_u = u(k,j,i) + dt_3d * pre_tend
+!
+!--                   Compare sign of old velocity and new preliminary velocity,
+!--                   and in case the signs are different, limit the tendency
+                      IF ( SIGN(pre_u,u(k,j,i)) /= pre_u )  THEN
+                         pre_tend = - u(k,j,i) * ddt_3d
+                      ELSE
+                         pre_tend = pre_tend
+                      ENDIF
+!
+!--                   Calculate final tendency
+                      tend(k,j,i) = tend(k,j,i) + pre_tend
+
+                   ENDDO
+                ENDDO
+             ENDDO
+
+!
+!--       v-component
+          CASE ( 2 )
+             DO  i = nxl, nxr
+                DO  j = nysv, nyn
+!
+!--                Determine topography-top index on v-grid
+                   k_wall = get_topography_top_index_ji( j, i, 'v' )
+
+                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+
+                      kk = k - k_wall   !- lad arrays are defined flat
+!
+!--                   In order to create sharp boundaries of the plant canopy, 
+!--                   the lad on the v-grid at index (k,j,i) is equal to 
+!--                   lad_s(k,j,i), rather than being interpolated from the 
+!--                   surrounding lad_s, because this would yield smaller lad 
+!--                   at the canopy boundaries than inside of the canopy.
+!--                   For the same reason, the lad at the northmost(j+1) canopy 
+!--                   boundary on the v-grid equals lad_s(k,j,i).
+                      lad_local = lad_s(kk,j,i)
+                      IF ( lad_local == 0.0_wp .AND. lad_s(kk,j-1,i) > 0.0_wp )&
+                      THEN
+                         lad_local = lad_s(kk,j-1,i)
+                      ENDIF
+
+                      pre_tend = 0.0_wp
+                      pre_v = 0.0_wp
+!
+!--                   Calculate preliminary value (pre_tend) of the tendency
+                      pre_tend = - cdc *                                       &
+                                   lad_local *                                 &
+                                   SQRT( ( 0.25_wp * ( u(k,j-1,i)   +          &
+                                                       u(k,j-1,i+1) +          &
+                                                       u(k,j,i)     +          &
+                                                       u(k,j,i+1) )            &
+                                         )**2 +                                &
+                                         v(k,j,i)**2 +                         &
+                                         ( 0.25_wp * ( w(k-1,j-1,i) +          &
+                                                       w(k-1,j,i)   +          &
+                                                       w(k,j-1,i)   +          &
+                                                       w(k,j,i) )              &
+                                         )**2                                  &
+                                       ) *                                     &
+                                   v(k,j,i)
+
+!
+!--                   Calculate preliminary new velocity, based on pre_tend
+                      pre_v = v(k,j,i) + dt_3d * pre_tend
+!
+!--                   Compare sign of old velocity and new preliminary velocity,
+!--                   and in case the signs are different, limit the tendency
+                      IF ( SIGN(pre_v,v(k,j,i)) /= pre_v )  THEN
+                         pre_tend = - v(k,j,i) * ddt_3d
+                      ELSE
+                         pre_tend = pre_tend
+                      ENDIF
+!
+!--                   Calculate final tendency
+                      tend(k,j,i) = tend(k,j,i) + pre_tend
+
+                   ENDDO
+                ENDDO
+             ENDDO
+
+!
+!--       w-component
+          CASE ( 3 )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Determine topography-top index on w-grid
+                   k_wall = get_topography_top_index_ji( j, i, 'w' )
+
+                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i) - 1
+
+                      kk = k - k_wall   !- lad arrays are defined flat
+
+                      pre_tend = 0.0_wp
+                      pre_w = 0.0_wp
+!
+!--                   Calculate preliminary value (pre_tend) of the tendency
+                      pre_tend = - cdc *                                       &
+                                   (0.5_wp *                                   &
+                                      ( lad_s(kk+1,j,i) + lad_s(kk,j,i) )) *   &
+                                   SQRT( ( 0.25_wp * ( u(k,j,i)   +            &
+                                                       u(k,j,i+1) +            &
+                                                       u(k+1,j,i) +            &
+                                                       u(k+1,j,i+1) )          &
+                                         )**2 +                                &
+                                         ( 0.25_wp * ( v(k,j,i)   +            &
+                                                       v(k,j+1,i) +            &
+                                                       v(k+1,j,i) +            &
+                                                       v(k+1,j+1,i) )          &
+                                         )**2 +                                &
+                                         w(k,j,i)**2                           &
+                                       ) *                                     &
+                                   w(k,j,i)
+!
+!--                   Calculate preliminary new velocity, based on pre_tend
+                      pre_w = w(k,j,i) + dt_3d * pre_tend
+!
+!--                   Compare sign of old velocity and new preliminary velocity,
+!--                   and in case the signs are different, limit the tendency
+                      IF ( SIGN(pre_w,w(k,j,i)) /= pre_w )  THEN
+                         pre_tend = - w(k,j,i) * ddt_3d
+                      ELSE
+                         pre_tend = pre_tend
+                      ENDIF
+!
+!--                   Calculate final tendency
+                      tend(k,j,i) = tend(k,j,i) + pre_tend
+
+                   ENDDO
+                ENDDO
+             ENDDO
+
+!
+!--       potential temperature
+          CASE ( 4 )
+             IF ( humidity ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+!--                   Determine topography-top index on scalar-grid
+                      k_wall = get_topography_top_index_ji( j, i, 's' )
+                      DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+                         kk = k - k_wall   !- lad arrays are defined flat
+                         tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i) - pc_latent_rate(kk,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+!--                   Determine topography-top index on scalar-grid
+                      k_wall = get_topography_top_index_ji( j, i, 's' )
+                      DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+                         kk = k - k_wall   !- lad arrays are defined flat
+                         tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+!
+!--       humidity
+          CASE ( 5 )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Determine topography-top index on scalar-grid
+                   k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+
+                      kk = k - k_wall   !- lad arrays are defined flat
+
+                      IF ( .NOT. plant_canopy_transpiration ) THEN
+                         ! pc_transpiration_rate is calculated in radiation model
+                         ! in case of plant_canopy_transpiration = .T.
+                         ! to include also the dependecy to the radiation
+                         ! in the plant canopy box
+                         pc_transpiration_rate(kk,j,i) =  - lsec                  &
+                                          * lad_s(kk,j,i) *                       &
+                                          SQRT( ( 0.5_wp * ( u(k,j,i) +           &
+                                                             u(k,j,i+1) )         &
+                                                )**2 +                            &
+                                                ( 0.5_wp * ( v(k,j,i) +           &
+                                                             v(k,j+1,i) )         &
+                                                )**2 +                            &
+                                                ( 0.5_wp * ( w(k-1,j,i) +         &
+                                                             w(k,j,i) )           &
+                                                )**2                              &
+                                              ) *                                 &
+                                          ( q(k,j,i) - lsc )
+                      ENDIF
+
+                      tend(k,j,i) = tend(k,j,i) + pc_transpiration_rate(kk,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+
+!
+!--       sgs-tke
+          CASE ( 6 )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Determine topography-top index on scalar-grid
+                   k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+
+                      kk = k - k_wall   !- lad arrays are defined flat
+                      tend(k,j,i) = tend(k,j,i) -                              &
+                                       2.0_wp * cdc *                          &
+                                       lad_s(kk,j,i) *                         &
+                                       SQRT( ( 0.5_wp * ( u(k,j,i) +           &
+                                                          u(k,j,i+1) )         &
+                                             )**2 +                            &
+                                             ( 0.5_wp * ( v(k,j,i) +           &
+                                                          v(k,j+1,i) )         &
+                                             )**2 +                            &
+                                             ( 0.5_wp * ( w(k,j,i) +           &
+                                                          w(k+1,j,i) )         &
+                                             )**2                              &
+                                           ) *                                 &
+                                       e(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO 
+!
+!--       scalar concentration
+          CASE ( 7 )
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Determine topography-top index on scalar-grid
+                   k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                   DO  k = k_wall+1, k_wall + pch_index_ji(j,i)
+
+                      kk = k - k_wall   !- lad arrays are defined flat
+                      tend(k,j,i) = tend(k,j,i) -                              &
+                                       lsec *                                  &
+                                       lad_s(kk,j,i) *                         &
+                                       SQRT( ( 0.5_wp * ( u(k,j,i) +           &
+                                                          u(k,j,i+1) )         &
+                                             )**2 +                            &
+                                             ( 0.5_wp * ( v(k,j,i) +           &
+                                                          v(k,j+1,i) )         &
+                                             )**2 +                            &
+                                             ( 0.5_wp * ( w(k-1,j,i) +         & 
+                                                          w(k,j,i) )           &
+                                             )**2                              &
+                                           ) *                                 &
+                                       ( s(k,j,i) - lsc )
+                   ENDDO
+                ENDDO
+             ENDDO    
+
+
+
+          CASE DEFAULT
+
+             WRITE( message_string, * ) 'wrong component: ', component
+             CALL message( 'pcm_tendency', 'PA0279', 1, 2, 0, 6, 0 ) 
+
+       END SELECT
+
+    END SUBROUTINE pcm_tendency
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of the tendency terms, accounting for the effect of the plant
+!> canopy on momentum and scalar quantities.
+!>
+!> The canopy is located where the leaf area density lad_s(k,j,i) > 0.0 
+!> (defined on scalar grid), as initialized in subroutine pcm_init. 
+!> The lad on the w-grid is vertically interpolated from the surrounding
+!> lad_s. The upper boundary of the canopy is defined on the w-grid at 
+!> k = pch_index. Here, the lad is zero.
+!>
+!> The canopy drag must be limited (previously accounted for by calculation of 
+!> a limiting canopy timestep for the determination of the maximum LES timestep
+!> in subroutine timestep), since it is physically impossible that the canopy
+!> drag alone can locally change the sign of a velocity component. This 
+!> limitation is realized by calculating preliminary tendencies and velocities.
+!> It is subsequently checked if the preliminary new velocity has a different
+!> sign than the current velocity. If so, the tendency is limited in a way that
+!> the velocity can at maximum be reduced to zero by the canopy drag. 
+!>
+!>
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE pcm_tendency_ij( i, j, component )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, message_string
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  component !< prognostic variable (u,v,w,pt,q,e)
+       INTEGER(iwp) ::  i         !< running index
+       INTEGER(iwp) ::  j         !< running index
+       INTEGER(iwp) ::  k         !< running index
+       INTEGER(iwp) ::  k_wall    !< vertical index of topography top
+       INTEGER(iwp) ::  kk        !< running index for flat lad arrays
+
+       REAL(wp) ::  ddt_3d    !< inverse of the LES timestep (dt_3d)
+       REAL(wp) ::  lad_local !< local lad value
+       REAL(wp) ::  pre_tend  !< preliminary tendency
+       REAL(wp) ::  pre_u     !< preliminary u-value 
+       REAL(wp) ::  pre_v     !< preliminary v-value 
+       REAL(wp) ::  pre_w     !< preliminary w-value 
+
+
+       ddt_3d = 1.0_wp / dt_3d
+!
+!--    Compute drag for the three velocity components and the SGS-TKE
+       SELECT CASE ( component )
+
+!
+!--       u-component
+          CASE ( 1 )
+!
+!--          Determine topography-top index on u-grid
+             k_wall = get_topography_top_index_ji( j, i, 'u' )
+             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+
+                kk = k - k_wall  !- lad arrays are defined flat
+
+!
+!--             In order to create sharp boundaries of the plant canopy, 
+!--             the lad on the u-grid at index (k,j,i) is equal to lad_s(k,j,i),
+!--             rather than being interpolated from the surrounding lad_s, 
+!--             because this would yield smaller lad at the canopy boundaries 
+!--             than inside of the canopy.
+!--             For the same reason, the lad at the rightmost(i+1)canopy 
+!--             boundary on the u-grid equals lad_s(k,j,i).
+                lad_local = lad_s(kk,j,i)
+                IF ( lad_local == 0.0_wp .AND. lad_s(kk,j,i-1) > 0.0_wp )  THEN
+                   lad_local = lad_s(kk,j,i-1)
+                ENDIF
+
+                pre_tend = 0.0_wp
+                pre_u = 0.0_wp
+!
+!--             Calculate preliminary value (pre_tend) of the tendency
+                pre_tend = - cdc *                                             &
+                             lad_local *                                       &   
+                             SQRT( u(k,j,i)**2 +                               &
+                                   ( 0.25_wp * ( v(k,j,i-1)  +                 &
+                                                 v(k,j,i)    +                 &
+                                                 v(k,j+1,i)  +                 &
+                                                 v(k,j+1,i-1) )                &
+                                   )**2 +                                      &
+                                   ( 0.25_wp * ( w(k-1,j,i-1) +                &
+                                                 w(k-1,j,i)   +                &
+                                                 w(k,j,i-1)   +                &
+                                                 w(k,j,i) )                    &
+                                   )**2                                        &
+                                 ) *                                           &
+                             u(k,j,i)
+
+!
+!--             Calculate preliminary new velocity, based on pre_tend
+                pre_u = u(k,j,i) + dt_3d * pre_tend
+!
+!--             Compare sign of old velocity and new preliminary velocity,
+!--             and in case the signs are different, limit the tendency
+                IF ( SIGN(pre_u,u(k,j,i)) /= pre_u )  THEN
+                   pre_tend = - u(k,j,i) * ddt_3d
+                ELSE
+                   pre_tend = pre_tend
+                ENDIF
+!
+!--             Calculate final tendency
+                tend(k,j,i) = tend(k,j,i) + pre_tend
+             ENDDO
+
+
+!
+!--       v-component
+          CASE ( 2 )
+!
+!--          Determine topography-top index on v-grid
+             k_wall = get_topography_top_index_ji( j, i, 'v' )
+
+             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+
+                kk = k - k_wall  !- lad arrays are defined flat
+!
+!--             In order to create sharp boundaries of the plant canopy, 
+!--             the lad on the v-grid at index (k,j,i) is equal to lad_s(k,j,i),
+!--             rather than being interpolated from the surrounding lad_s, 
+!--             because this would yield smaller lad at the canopy boundaries 
+!--             than inside of the canopy.
+!--             For the same reason, the lad at the northmost(j+1)canopy 
+!--             boundary on the v-grid equals lad_s(k,j,i).
+                lad_local = lad_s(kk,j,i)
+                IF ( lad_local == 0.0_wp .AND. lad_s(kk,j-1,i) > 0.0_wp )  THEN
+                   lad_local = lad_s(kk,j-1,i)
+                ENDIF
+
+                pre_tend = 0.0_wp
+                pre_v = 0.0_wp
+!
+!--             Calculate preliminary value (pre_tend) of the tendency
+                pre_tend = - cdc *                                             &
+                             lad_local *                                       &
+                             SQRT( ( 0.25_wp * ( u(k,j-1,i)   +                &
+                                                 u(k,j-1,i+1) +                &
+                                                 u(k,j,i)     +                &
+                                                 u(k,j,i+1) )                  &
+                                   )**2 +                                      &
+                                   v(k,j,i)**2 +                               &
+                                   ( 0.25_wp * ( w(k-1,j-1,i) +                &
+                                                 w(k-1,j,i)   +                &
+                                                 w(k,j-1,i)   +                &
+                                                 w(k,j,i) )                    &
+                                   )**2                                        &
+                                 ) *                                           &
+                             v(k,j,i)
+
+!
+!--             Calculate preliminary new velocity, based on pre_tend
+                pre_v = v(k,j,i) + dt_3d * pre_tend
+!
+!--             Compare sign of old velocity and new preliminary velocity,
+!--             and in case the signs are different, limit the tendency
+                IF ( SIGN(pre_v,v(k,j,i)) /= pre_v )  THEN
+                   pre_tend = - v(k,j,i) * ddt_3d
+                ELSE
+                   pre_tend = pre_tend
+                ENDIF
+!
+!--             Calculate final tendency
+                tend(k,j,i) = tend(k,j,i) + pre_tend
+             ENDDO
+
+
+!
+!--       w-component
+          CASE ( 3 )
+!
+!--          Determine topography-top index on w-grid
+             k_wall = get_topography_top_index_ji( j, i, 'w' )
+
+             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i) - 1
+
+                kk = k - k_wall  !- lad arrays are defined flat
+
+                pre_tend = 0.0_wp
+                pre_w = 0.0_wp
+!
+!--             Calculate preliminary value (pre_tend) of the tendency
+                pre_tend = - cdc *                                             &
+                             (0.5_wp *                                         &
+                                ( lad_s(kk+1,j,i) + lad_s(kk,j,i) )) *         &
+                             SQRT( ( 0.25_wp * ( u(k,j,i)    +                 &  
+                                                 u(k,j,i+1)  +                 &
+                                                 u(k+1,j,i)  +                 &
+                                                 u(k+1,j,i+1) )                &
+                                   )**2 +                                      &
+                                   ( 0.25_wp * ( v(k,j,i)    +                 &
+                                                 v(k,j+1,i)  +                 &
+                                                 v(k+1,j,i)  +                 &
+                                                 v(k+1,j+1,i) )                &
+                                   )**2 +                                      &
+                                   w(k,j,i)**2                                 &
+                                 ) *                                           &
+                             w(k,j,i)
+!
+!--             Calculate preliminary new velocity, based on pre_tend
+                pre_w = w(k,j,i) + dt_3d * pre_tend
+!
+!--             Compare sign of old velocity and new preliminary velocity,
+!--             and in case the signs are different, limit the tendency
+                IF ( SIGN(pre_w,w(k,j,i)) /= pre_w )  THEN
+                   pre_tend = - w(k,j,i) * ddt_3d
+                ELSE
+                   pre_tend = pre_tend
+                ENDIF
+!
+!--             Calculate final tendency
+                tend(k,j,i) = tend(k,j,i) + pre_tend
+             ENDDO
+
+!
+!--       potential temperature
+          CASE ( 4 )
+!
+!--          Determine topography-top index on scalar grid
+             k_wall = get_topography_top_index_ji( j, i, 's' )
+
+             IF ( humidity ) THEN
+                DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+                   kk = k - k_wall  !- lad arrays are defined flat
+                   tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i) - pc_latent_rate(kk,j,i)
+                ENDDO
+             ELSE
+                DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+                   kk = k - k_wall  !- lad arrays are defined flat
+                   tend(k,j,i) = tend(k,j,i) + pc_heating_rate(kk,j,i)
+                ENDDO
+             ENDIF
+
+!
+!--       humidity
+          CASE ( 5 )
+!
+!--          Determine topography-top index on scalar grid
+             k_wall = get_topography_top_index_ji( j, i, 's' )
+
+             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+                kk = k - k_wall  !- lad arrays are defined flat
+                IF ( .NOT. plant_canopy_transpiration ) THEN
+                   ! pc_transpiration_rate is calculated in radiation model
+                   ! in case of plant_canopy_transpiration = .T.
+                   ! to include also the dependecy to the radiation
+                   ! in the plant canopy box
+                   pc_transpiration_rate(kk,j,i) = - lsec                         &
+                                    * lad_s(kk,j,i) *                             &
+                                    SQRT( ( 0.5_wp * ( u(k,j,i) +                 &
+                                                       u(k,j,i+1) )               &
+                                          )**2  +                                 &
+                                          ( 0.5_wp * ( v(k,j,i) +                 &
+                                                       v(k,j+1,i) )               &
+                                          )**2 +                                  &
+                                          ( 0.5_wp * ( w(k-1,j,i) +               &
+                                                       w(k,j,i) )                 &
+                                          )**2                                    &
+                                        ) *                                       &
+                                    ( q(k,j,i) - lsc )
+                ENDIF
+
+                tend(k,j,i) = tend(k,j,i) + pc_transpiration_rate(kk,j,i)
+
+             ENDDO   
+
+!
+!--       sgs-tke
+          CASE ( 6 )
+!
+!--          Determine topography-top index on scalar grid
+             k_wall = get_topography_top_index_ji( j, i, 's' )
+
+             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+
+                kk = k - k_wall
+                tend(k,j,i) = tend(k,j,i) -                                    &
+                                 2.0_wp * cdc *                                &
+                                 lad_s(kk,j,i) *                               &
+                                 SQRT( ( 0.5_wp * ( u(k,j,i) +                 &
+                                                    u(k,j,i+1) )               &
+                                       )**2 +                                  &  
+                                       ( 0.5_wp * ( v(k,j,i) +                 &
+                                                    v(k,j+1,i) )               &
+                                       )**2 +                                  &
+                                       ( 0.5_wp * ( w(k,j,i) +                 &
+                                                    w(k+1,j,i) )               &
+                                       )**2                                    &
+                                     ) *                                       &
+                                 e(k,j,i)
+             ENDDO
+             
+!
+!--       scalar concentration 
+          CASE ( 7 )
+!
+!--          Determine topography-top index on scalar grid
+             k_wall = get_topography_top_index_ji( j, i, 's' )
+
+             DO  k = k_wall + 1, k_wall + pch_index_ji(j,i)
+
+                kk = k - k_wall
+                tend(k,j,i) = tend(k,j,i) -                                    &
+                                 lsec *                                        &
+                                 lad_s(kk,j,i) *                               &
+                                 SQRT( ( 0.5_wp * ( u(k,j,i) +                 &
+                                                    u(k,j,i+1) )               &
+                                       )**2  +                                 &
+                                       ( 0.5_wp * ( v(k,j,i) +                 &
+                                                    v(k,j+1,i) )               &
+                                       )**2 +                                  &
+                                       ( 0.5_wp * ( w(k-1,j,i) +               &
+                                                    w(k,j,i) )                 &
+                                       )**2                                    &
+                                     ) *                                       &
+                                 ( s(k,j,i) - lsc )
+             ENDDO                
+
+       CASE DEFAULT
+
+          WRITE( message_string, * ) 'wrong component: ', component
+          CALL message( 'pcm_tendency', 'PA0279', 1, 2, 0, 6, 0 ) 
+
+       END SELECT
+
+    END SUBROUTINE pcm_tendency_ij
+
+
+
+ END MODULE plant_canopy_model_mod
Index: /palm/tags/release-6.0/SOURCE/pmc_child_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_child_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_child_mod.f90	(revision 3477)
@@ -0,0 +1,961 @@
+MODULE pmc_child
+
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! explicit kind settings
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2809 2018-02-15 09:55:58Z schwenkel
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2599 2017-11-01 13:18:45Z hellstea
+! Some cleanup and commenting improvements only.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1897 2016-05-03 08:10:23Z raasch
+! Module renamed. Code clean up. The words server/client changed to parent/child.
+!
+! 1896 2016-05-03 08:06:41Z raasch
+! re-formatted to match PALM style
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! gfortran requires pointer attributes for some array declarations,
+! long line wrapped
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! introduction of different datatransfer modes
+!
+! 1791 2016-03-11 10:41:25Z raasch
+! Debug write-statement commented out
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! change in child-parent data transfer: parent now gets data from child
+! instead of that child puts it to the parent
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! Bugfix: wrong data-type in MPI_WIN_CREATE replaced
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! kind=dp replaced by wp, dim_order removed
+! array management changed from linked list to sequential loop
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statement added (nesting can only be used in parallel mode),
+! all kinds given in PALM style
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Initial revision by K. Ketelsen
+!
+! Description:
+! ------------
+!
+! Child part of Palm Model Coupler
+!------------------------------------------------------------------------------!
+
+#if defined( __parallel )
+
+    USE, INTRINSIC ::  iso_c_binding
+
+#if !defined( __mpifh )
+    USE MPI
+#endif
+
+    USE kinds
+
+    USE pmc_general,                                                           &
+        ONLY:  arraydef, childdef, da_desclen, da_namedef, da_namelen, pedef,  &
+               pmc_da_name_err,  pmc_g_setname, pmc_max_array, pmc_status_ok
+
+    USE pmc_handle_communicator,                                               &
+        ONLY:  m_model_comm, m_model_npes, m_model_rank, m_to_parent_comm
+
+    USE pmc_mpi_wrapper,                                                       &
+        ONLY:  pmc_alloc_mem, pmc_bcast, pmc_inter_bcast, pmc_time
+
+    IMPLICIT NONE
+
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+
+    PRIVATE
+    SAVE
+
+    TYPE(childdef), PUBLIC ::  me   !<
+
+    INTEGER(iwp) ::  myindex = 0         !< counter and unique number for data arrays
+    INTEGER(iwp) ::  next_array_in_list = 0   !<
+
+
+    INTERFACE pmc_childinit
+        MODULE PROCEDURE pmc_childinit
+    END INTERFACE pmc_childinit
+
+    INTERFACE pmc_c_clear_next_array_list
+        MODULE PROCEDURE pmc_c_clear_next_array_list
+    END INTERFACE pmc_c_clear_next_array_list
+
+    INTERFACE pmc_c_getbuffer
+        MODULE PROCEDURE pmc_c_getbuffer
+    END INTERFACE pmc_c_getbuffer
+
+    INTERFACE pmc_c_getnextarray
+        MODULE PROCEDURE pmc_c_getnextarray
+    END INTERFACE pmc_c_getnextarray
+
+    INTERFACE pmc_c_get_2d_index_list
+        MODULE PROCEDURE pmc_c_get_2d_index_list
+    END INTERFACE pmc_c_get_2d_index_list
+
+    INTERFACE pmc_c_putbuffer
+        MODULE PROCEDURE pmc_c_putbuffer
+    END INTERFACE pmc_c_putbuffer
+
+    INTERFACE pmc_c_setind_and_allocmem
+        MODULE PROCEDURE pmc_c_setind_and_allocmem
+    END INTERFACE pmc_c_setind_and_allocmem
+
+    INTERFACE pmc_c_set_dataarray
+        MODULE PROCEDURE pmc_c_set_dataarray_2d
+        MODULE PROCEDURE pmc_c_set_dataarray_3d
+        MODULE PROCEDURE pmc_c_set_dataarray_ip2d
+    END INTERFACE pmc_c_set_dataarray
+
+    INTERFACE pmc_set_dataarray_name
+        MODULE PROCEDURE pmc_set_dataarray_name
+        MODULE PROCEDURE pmc_set_dataarray_name_lastentry
+    END INTERFACE pmc_set_dataarray_name
+
+
+    PUBLIC pmc_childinit, pmc_c_clear_next_array_list, pmc_c_getbuffer,        &
+           pmc_c_getnextarray, pmc_c_putbuffer, pmc_c_setind_and_allocmem,     &
+           pmc_c_set_dataarray, pmc_set_dataarray_name, pmc_c_get_2d_index_list
+
+ CONTAINS
+
+
+
+ SUBROUTINE pmc_childinit
+
+     IMPLICIT NONE
+
+     INTEGER(iwp) ::  i        !<
+     INTEGER(iwp) ::  istat    !<
+
+!
+!--  Get / define the MPI environment
+     me%model_comm = m_model_comm
+     me%inter_comm = m_to_parent_comm
+
+     CALL MPI_COMM_RANK( me%model_comm, me%model_rank, istat )
+     CALL MPI_COMM_SIZE( me%model_comm, me%model_npes, istat )
+     CALL MPI_COMM_REMOTE_SIZE( me%inter_comm, me%inter_npes, istat )
+!
+!--  Intra-communicator is used for MPI_GET
+     CALL MPI_INTERCOMM_MERGE( me%inter_comm, .TRUE., me%intra_comm, istat )
+     CALL MPI_COMM_RANK( me%intra_comm, me%intra_rank, istat )
+
+     ALLOCATE( me%pes(me%inter_npes) )
+!
+!--  Allocate an array of type arraydef for all parent processes to store 
+!--  information of then transfer array
+     DO  i = 1, me%inter_npes
+        ALLOCATE( me%pes(i)%array_list(pmc_max_array) )
+     ENDDO
+
+ END SUBROUTINE pmc_childinit
+
+
+
+ SUBROUTINE pmc_set_dataarray_name( parentarraydesc, parentarrayname,          &
+                                    childarraydesc, childarrayname, istat )
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(IN) ::  parentarrayname  !<
+    CHARACTER(LEN=*), INTENT(IN) ::  parentarraydesc  !<
+    CHARACTER(LEN=*), INTENT(IN) ::  childarrayname   !<
+    CHARACTER(LEN=*), INTENT(IN) ::  childarraydesc   !<
+
+    INTEGER(iwp), INTENT(OUT) ::  istat  !<
+!
+!-- Local variables
+    TYPE(da_namedef) ::  myname  !<
+
+    INTEGER(iwp) ::  mype  !<
+
+
+    istat = pmc_status_ok
+!
+!-- Check length of array names
+    IF ( LEN( TRIM( parentarrayname) ) > da_namelen  .OR.                      &
+         LEN( TRIM( childarrayname) ) > da_namelen )  THEN
+       istat = pmc_da_name_err
+    ENDIF
+
+    IF ( m_model_rank == 0 )  THEN
+       myindex = myindex + 1
+       myname%couple_index = myIndex
+       myname%parentdesc   = TRIM( parentarraydesc )
+       myname%nameonparent = TRIM( parentarrayname )
+       myname%childdesc    = TRIM( childarraydesc )
+       myname%nameonchild  = TRIM( childarrayname )
+    ENDIF
+
+!
+!-- Broadcast to all child processes
+!
+!-- The complete description of an transfer names array is broadcasted
+
+    CALL pmc_bcast( myname%couple_index, 0, comm=m_model_comm )
+    CALL pmc_bcast( myname%parentdesc,   0, comm=m_model_comm )
+    CALL pmc_bcast( myname%nameonparent, 0, comm=m_model_comm )
+    CALL pmc_bcast( myname%childdesc,    0, comm=m_model_comm )
+    CALL pmc_bcast( myname%nameonchild,  0, comm=m_model_comm )
+!
+!-- Broadcast to all parent processes
+!-- The complete description of an transfer array names is broadcasted als to all parent processe
+!   Only the root PE of the broadcasts to parent using intra communicator
+
+    IF ( m_model_rank == 0 )  THEN
+        mype = MPI_ROOT
+    ELSE
+        mype = MPI_PROC_NULL
+    ENDIF
+
+    CALL pmc_bcast( myname%couple_index, mype, comm=m_to_parent_comm )
+    CALL pmc_bcast( myname%parentdesc,   mype, comm=m_to_parent_comm )
+    CALL pmc_bcast( myname%nameonparent, mype, comm=m_to_parent_comm )
+    CALL pmc_bcast( myname%childdesc,    mype, comm=m_to_parent_comm )
+    CALL pmc_bcast( myname%nameonchild,  mype, comm=m_to_parent_comm )
+
+    CALL pmc_g_setname( me, myname%couple_index, myname%nameonchild )
+
+ END SUBROUTINE pmc_set_dataarray_name
+
+
+
+ SUBROUTINE pmc_set_dataarray_name_lastentry( lastentry )
+
+    IMPLICIT NONE
+
+    LOGICAL, INTENT(IN), OPTIONAL ::  lastentry  !<
+!
+!-- Local variables
+    INTEGER ::  mype  !<
+    TYPE(dA_namedef) ::  myname  !<
+
+    myname%couple_index = -1
+
+    IF ( m_model_rank == 0 )  THEN
+       mype = MPI_ROOT
+    ELSE
+       mype = MPI_PROC_NULL
+    ENDIF
+
+    CALL pmc_bcast( myname%couple_index, mype, comm=m_to_parent_comm )
+
+ END SUBROUTINE pmc_set_dataarray_name_lastentry
+
+
+
+ SUBROUTINE pmc_c_get_2d_index_list
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: dummy               !<
+    INTEGER(iwp) :: i, ierr, i2, j, nr  !<
+    INTEGER(iwp) :: indwin              !< MPI window object
+    INTEGER(iwp) :: indwin2             !< MPI window object
+
+    INTEGER(KIND=MPI_ADDRESS_KIND) :: win_size !< Size of MPI window 1 (in bytes)
+    INTEGER(KIND=MPI_ADDRESS_KIND) :: disp     !< Displacement unit (Integer = 4, floating poit = 8
+    INTEGER(KIND=MPI_ADDRESS_KIND) :: winsize  !< Size of MPI window 2 (in bytes)
+
+    INTEGER, DIMENSION(me%inter_npes*2) :: nrele  !< Number of Elements of a
+                                                  !< horizontal slice
+    INTEGER, DIMENSION(:), POINTER ::  myind  !<
+
+    TYPE(pedef), POINTER ::  ape  !> Pointer to pedef structure
+
+
+    win_size = STORAGE_SIZE( dummy )/8
+    CALL MPI_WIN_CREATE( dummy, win_size, iwp, MPI_INFO_NULL, me%intra_comm,   &
+                         indwin, ierr )
+!
+!-- Close window on child side and open on parent side
+    CALL MPI_WIN_FENCE( 0, indwin, ierr )
+
+!   Between the two MPI_WIN_FENCE calls, the parent can fill the RMA window
+
+!-- Close window on parent side and open on child side
+
+    CALL MPI_WIN_FENCE( 0, indwin, ierr )
+
+    DO  i = 1, me%inter_npes
+       disp = me%model_rank * 2
+       CALL MPI_GET( nrele((i-1)*2+1), 2, MPI_INTEGER, i-1, disp, 2,           &
+                     MPI_INTEGER, indwin, ierr )
+    ENDDO
+!
+!-- MPI_GET is non-blocking -> data in nrele is not available until MPI_FENCE is
+!-- called
+    CALL MPI_WIN_FENCE( 0, indwin, ierr )
+!
+!-- Allocate memory for index array
+    winsize = 0
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       i2 = ( i-1 ) * 2 + 1
+       nr = nrele(i2+1)
+       IF ( nr > 0 )  THEN
+          ALLOCATE( ape%locind(nr) )
+       ELSE
+          NULLIFY( ape%locind )
+       ENDIF
+       winsize = MAX( INT( nr, MPI_ADDRESS_KIND ), winsize )
+    ENDDO
+
+    ALLOCATE( myind(2*winsize) )
+    winsize = 1
+!
+!-- Local buffer used in MPI_GET can but must not be inside the MPI Window.
+!-- Here, we use a dummy for the MPI window because the parent processes do 
+!-- not access the RMA window via MPI_GET or MPI_PUT
+    CALL MPI_WIN_CREATE( dummy, winsize, iwp, MPI_INFO_NULL, me%intra_comm,    &
+                         indwin2, ierr )
+!
+!-- MPI_GET is non-blocking -> data in nrele is not available until MPI_FENCE is
+!-- called
+
+    CALL MPI_WIN_FENCE( 0, indwin2, ierr )
+
+!   Between the two MPI_WIN_FENCE calls, the parent can fill the RMA window
+
+    CALL MPI_WIN_FENCE( 0, indwin2, ierr )
+
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       nr = nrele(i*2)
+       IF ( nr > 0 )  THEN
+          disp = nrele(2*(i-1)+1)
+          CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , i-1, 0, indwin2, ierr )
+          CALL MPI_GET( myind, 2*nr, MPI_INTEGER, i-1, disp, 2*nr,             &
+                        MPI_INTEGER, indwin2, ierr )
+          CALL MPI_WIN_UNLOCK( i-1, indwin2, ierr )
+          DO  j = 1, nr
+             ape%locind(j)%i = myind(2*j-1)
+             ape%locind(j)%j = myind(2*j)
+          ENDDO
+          ape%nrele = nr
+       ELSE
+          ape%nrele = -1
+       ENDIF
+    ENDDO
+!
+!-- Don't know why, but this barrier is necessary before we can free the windows
+    CALL MPI_BARRIER( me%intra_comm, ierr )
+
+    CALL MPI_WIN_FREE( indWin,  ierr )
+    CALL MPI_WIN_FREE( indwin2, ierr )
+    DEALLOCATE( myind )
+
+ END SUBROUTINE pmc_c_get_2d_index_list
+
+
+
+ SUBROUTINE pmc_c_clear_next_array_list
+
+    IMPLICIT NONE
+
+    next_array_in_list = 0
+
+ END SUBROUTINE pmc_c_clear_next_array_list
+
+
+
+ LOGICAL FUNCTION pmc_c_getnextarray( myname )
+
+!
+!--  List handling is still required to get minimal interaction with
+!--  pmc_interface
+     CHARACTER(LEN=*), INTENT(OUT) ::  myname  !<
+!
+!-- Local variables
+    TYPE(pedef), POINTER    :: ape
+    TYPE(arraydef), POINTER :: ar
+
+
+    next_array_in_list = next_array_in_list + 1
+!
+!-- Array names are the same on all child PEs, so take first process to
+!-- get the name    
+    ape => me%pes(1)
+!
+!-- Check if all arrays have been processed
+    IF ( next_array_in_list > ape%nr_arrays )  THEN
+       pmc_c_getnextarray = .FALSE.
+       RETURN
+    ENDIF
+
+    ar => ape%array_list( next_array_in_list )
+
+    myname = ar%name
+!
+!-- Return true if annother array
+!-- If all array have been processed, the RETURN statement a couple of lines above is active
+
+    pmc_c_getnextarray = .TRUE.
+
+ END FUNCTION pmc_c_getnextarray
+
+
+
+ SUBROUTINE pmc_c_set_dataarray_2d( array )
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT(IN) , DIMENSION(:,:), POINTER ::  array  !<
+
+    INTEGER(iwp)               ::  i       !<
+    INTEGER(iwp)               ::  nrdims  !<
+    INTEGER(iwp), DIMENSION(4) ::  dims    !<
+
+    TYPE(C_PTR)             ::  array_adr
+    TYPE(arraydef), POINTER ::  ar
+    TYPE(pedef), POINTER    ::  ape
+
+
+    dims    = 1
+    nrdims  = 2
+    dims(1) = SIZE( array, 1 )
+    dims(2) = SIZE( array, 2 )
+
+    array_adr = C_LOC( array )
+
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       ar  => ape%array_list(next_array_in_list)
+       ar%nrdims = nrdims
+       ar%dimkey = nrdims
+       ar%a_dim  = dims
+       ar%data   = array_adr
+    ENDDO
+
+ END SUBROUTINE pmc_c_set_dataarray_2d
+
+ SUBROUTINE pmc_c_set_dataarray_ip2d( array )
+
+    IMPLICIT NONE
+
+    INTEGER(idp), INTENT(IN) , DIMENSION(:,:), POINTER ::  array  !<
+
+    INTEGER(iwp)               ::  i       !<
+    INTEGER(iwp)               ::  nrdims  !<
+    INTEGER(iwp), DIMENSION(4) ::  dims    !<
+
+    TYPE(C_PTR)             ::  array_adr
+    TYPE(arraydef), POINTER ::  ar
+    TYPE(pedef), POINTER    ::  ape
+
+    dims    = 1
+    nrdims  = 2
+    dims(1) = SIZE( array, 1 )
+    dims(2) = SIZE( array, 2 )
+
+    array_adr = C_LOC( array )
+
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       ar  => ape%array_list(next_array_in_list)
+       ar%nrdims = nrdims
+       ar%dimkey = 22
+       ar%a_dim  = dims
+       ar%data   = array_adr
+    ENDDO
+
+ END SUBROUTINE pmc_c_set_dataarray_ip2d
+
+ SUBROUTINE pmc_c_set_dataarray_3d (array)
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT(IN), DIMENSION(:,:,:), POINTER ::  array  !<
+
+    INTEGER(iwp)                ::  i
+    INTEGER(iwp)                ::  nrdims
+    INTEGER(iwp), DIMENSION (4) ::  dims
+    
+    TYPE(C_PTR)             ::  array_adr
+    TYPE(pedef), POINTER    ::  ape
+    TYPE(arraydef), POINTER ::  ar
+
+
+    dims    = 1
+    nrdims  = 3
+    dims(1) = SIZE( array, 1 )
+    dims(2) = SIZE( array, 2 )
+    dims(3) = SIZE( array, 3 )
+
+    array_adr = C_LOC( array )
+
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       ar  => ape%array_list(next_array_in_list)
+       ar%nrdims = nrdims
+       ar%dimkey = nrdims
+       ar%a_dim  = dims
+       ar%data   = array_adr
+    ENDDO
+
+ END SUBROUTINE pmc_c_set_dataarray_3d
+
+
+
+ SUBROUTINE pmc_c_setind_and_allocmem
+
+    IMPLICIT NONE
+
+!
+!-- Naming convention for appendices:  _pc  -> parent to child transfer
+!--                                    _cp  -> child to parent transfer
+!--                                    recv -> parent to child transfer
+!--                                    send -> child to parent transfer
+    INTEGER(iwp) ::  arlen    !<
+    INTEGER(iwp) ::  myindex  !<
+    INTEGER(iwp) ::  i        !<
+    INTEGER(iwp) ::  ierr     !<
+    INTEGER(iwp) ::  istat    !<
+    INTEGER(iwp) ::  j        !<
+    INTEGER(iwp) ::  rcount   !<
+    INTEGER(iwp) ::  tag      !<
+
+    INTEGER(iwp), PARAMETER ::  noindex = -1  !<
+
+    INTEGER(idp)                   ::  bufsize  !< size of MPI data window
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  winsize  !<
+
+    INTEGER(iwp),DIMENSION(1024) ::  req  !<
+
+    REAL(wp), DIMENSION(:), POINTER, SAVE ::  base_array_pc  !< base array
+    REAL(wp), DIMENSION(:), POINTER, SAVE ::  base_array_cp  !< base array
+
+    TYPE(pedef), POINTER    ::  ape       !<
+    TYPE(arraydef), POINTER ::  ar        !<
+    Type(C_PTR)             ::  base_ptr  !<
+
+
+    myindex = 0
+    bufsize = 8
+!
+!-- Parent to child direction.
+!-- First stride: compute size and set index
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       tag = 200
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+!
+!--       Receive index from child
+          tag = tag + 1
+          CALL MPI_RECV( myindex, 1, MPI_INTEGER, i-1, tag, me%inter_comm,     &
+                         MPI_STATUS_IGNORE, ierr )
+          ar%recvindex = myindex
+!
+!--       Determine max, because child buffer is allocated only once
+!--       All 2D and 3d arrays use the same buffer
+
+          IF ( ar%nrdims == 3 )  THEN
+             bufsize = MAX( bufsize,                                           &
+                            INT( ar%a_dim(1)*ar%a_dim(2)*ar%a_dim(3),          &
+                                 MPI_ADDRESS_KIND ) )
+          ELSE
+             bufsize = MAX( bufsize,                                           &
+                            INT( ar%a_dim(1)*ar%a_dim(2), MPI_ADDRESS_KIND ) )
+          ENDIF
+       ENDDO
+    ENDDO
+!
+!-- Create RMA (one sided communication) data buffer.
+!-- The buffer for MPI_GET can be PE local, i.e. it can but must not be part of
+!-- the MPI RMA window
+    CALL pmc_alloc_mem( base_array_pc, bufsize, base_ptr )
+    me%totalbuffersize = bufsize*wp  ! total buffer size in byte
+!
+!-- Second stride: set buffer pointer
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+          ar%recvbuf = base_ptr
+       ENDDO
+    ENDDO
+!
+!-- Child to parent direction
+    myindex = 1
+    rcount  = 0
+    bufsize = 8
+
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       tag = 300
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+          IF ( ar%nrdims == 2 )  THEN
+             arlen = ape%nrele
+          ELSEIF( ar%nrdims == 3 )  THEN
+             arlen = ape%nrele*ar%a_dim(1)
+          ENDIF
+          tag    = tag + 1
+          rcount = rcount + 1
+          IF ( ape%nrele > 0 )  THEN
+             CALL MPI_ISEND( myindex, 1, MPI_INTEGER, i-1, tag, me%inter_comm, &
+                             req(rcount), ierr )
+             ar%sendindex = myindex
+          ELSE
+             CALL MPI_ISEND( noindex, 1, MPI_INTEGER, i-1, tag, me%inter_comm, &
+                             req(rcount), ierr )
+             ar%sendindex = noindex
+          ENDIF
+!
+!--       Maximum of 1024 pending requests
+!         1024 is an arbitrary value just to make sure the number of pending 
+!         requests is getting too large. It is possible that this value has to 
+!         be adjusted in case of running the model on large number of cores. 
+
+          IF ( rcount == 1024 )  THEN
+             CALL MPI_WAITALL( rcount, req, MPI_STATUSES_IGNORE, ierr )
+             rcount = 0
+          ENDIF
+
+          IF ( ape%nrele > 0 )  THEN
+             ar%sendsize = arlen
+             myindex     = myindex + arlen
+             bufsize     = bufsize + arlen
+          ENDIF
+
+       ENDDO
+
+       IF ( rcount > 0 )  THEN
+          CALL MPI_WAITALL( rcount, req, MPI_STATUSES_IGNORE, ierr )
+       ENDIF
+
+    ENDDO
+!
+!-- Create RMA (one sided communication) window for data buffer child to parent
+!-- transfer.
+!-- The buffer of MPI_GET (counter part of transfer) can be PE-local, i.e. it
+!-- can but must not be part of the MPI RMA window. Only one RMA window is
+!-- required to prepare the data
+!--        for parent -> child transfer on the parent side
+!-- and
+!--        for child -> parent transfer on the child side
+    CALL pmc_alloc_mem( base_array_cp, bufsize )
+    me%totalbuffersize = bufsize * wp  ! total buffer size in byte
+
+    winSize = me%totalbuffersize
+
+    CALL MPI_WIN_CREATE( base_array_cp, winsize, wp, MPI_INFO_NULL,            &
+                         me%intra_comm, me%win_parent_child, ierr )
+    CALL MPI_WIN_FENCE( 0, me%win_parent_child, ierr )
+    CALL MPI_BARRIER( me%intra_comm, ierr )
+!
+!-- Second stride: set buffer pointer
+    DO  i = 1, me%inter_npes
+       ape => me%pes(i)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)          
+          IF ( ape%nrele > 0 )  THEN
+             ar%sendbuf = C_LOC( base_array_cp(ar%sendindex) )
+!
+!--          TODO: if this is an error to be really expected, replace the
+!--                following message by a meaningful standard PALM message using
+!--                the message-routine
+             IF ( ar%sendindex+ar%sendsize > bufsize )  THEN
+                WRITE( 0,'(a,i4,4i7,1x,a)') 'Child buffer too small ', i,      &
+                          ar%sendindex, ar%sendsize, ar%sendindex+ar%sendsize, &
+                          bufsize, TRIM( ar%name )
+                CALL MPI_ABORT( MPI_COMM_WORLD, istat, ierr )
+             ENDIF
+          ENDIF
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE pmc_c_setind_and_allocmem
+
+
+
+ SUBROUTINE pmc_c_getbuffer( waittime, particle_transfer )
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT(OUT), OPTIONAL ::  waittime  !<
+    LOGICAL, INTENT(IN), OPTIONAL   ::  particle_transfer  !<
+
+    LOGICAL                        ::  lo_ptrans!<
+    
+    INTEGER(iwp)                        ::  ierr    !<
+    INTEGER(iwp)                        ::  ij      !<
+    INTEGER(iwp)                        ::  ip      !<
+    INTEGER(iwp)                        ::  j       !<
+    INTEGER(iwp)                        ::  myindex !<
+    INTEGER(iwp)                        ::  nr      !< number of elements to get
+                                                    !< from parent
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp
+    INTEGER,DIMENSION(1)           ::  buf_shape
+
+    REAL(wp)                            ::  t1
+    REAL(wp)                            ::  t2
+
+    REAL(wp), POINTER, DIMENSION(:)     ::  buf
+    REAL(wp), POINTER, DIMENSION(:,:)   ::  data_2d
+    REAL(wp), POINTER, DIMENSION(:,:,:) ::  data_3d
+    TYPE(pedef), POINTER                ::  ape
+    TYPE(arraydef), POINTER             ::  ar
+    INTEGER(idp), POINTER, DIMENSION(:)     ::  ibuf      !<
+    INTEGER(idp), POINTER, DIMENSION(:,:)   ::  idata_2d  !<
+
+!
+!-- Synchronization of the model is done in pmci_synchronize. 
+!-- Therefore the RMA window can be filled without
+!-- sychronization at this point and a barrier is not necessary.
+
+!-- In case waittime is present, the following barrier is necessary to
+!-- insure the same number of barrier calls on parent and child
+!-- This means, that here on child side two barriers are call successively
+!-- The parent is filling its buffer between the two barrier calls
+
+!-- Please note that waittime has to be set in pmc_s_fillbuffer AND
+!-- pmc_c_getbuffer
+    IF ( PRESENT( waittime ) )  THEN
+       t1 = pmc_time()
+       CALL MPI_BARRIER( me%intra_comm, ierr )
+       t2 = pmc_time()
+       waittime = t2 - t1
+    ENDIF
+
+    lo_ptrans = .FALSE.
+    IF ( PRESENT( particle_transfer))    lo_ptrans = particle_transfer
+
+!
+!-- Wait for buffer is filled.
+!
+!-- The parent side (in pmc_s_fillbuffer) is filling the buffer in the MPI RMA window
+!-- When the filling is complet, a MPI_BARRIER is called.
+!-- The child is not allowd to access the parent-buffer before it is completely filled
+!-- therefore the following barrier is required.
+
+    CALL MPI_BARRIER( me%intra_comm, ierr )
+
+    DO  ip = 1, me%inter_npes
+       ape => me%pes(ip)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+
+          IF ( ar%dimkey == 2 .AND. .NOT.lo_ptrans)  THEN
+             nr = ape%nrele
+          ELSEIF ( ar%dimkey == 3 .AND. .NOT.lo_ptrans)  THEN
+             nr = ape%nrele * ar%a_dim(1)
+          ELSE IF ( ar%dimkey == 22 .AND. lo_ptrans)  THEN
+             nr = ape%nrele
+          ELSE
+             CYCLE                    ! Particle array ar not transferd here
+          ENDIF
+          buf_shape(1) = nr
+          IF ( lo_ptrans )   THEN
+             CALL C_F_POINTER( ar%recvbuf, ibuf, buf_shape )
+          ELSE
+             CALL C_F_POINTER( ar%recvbuf, buf, buf_shape )
+          ENDIF
+!
+!--       MPI passive target RMA
+!--       One data array is fetcht from MPI RMA window on parent
+
+          IF ( nr > 0 )  THEN
+             target_disp = ar%recvindex - 1
+             CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip-1, 0,                     &
+                                me%win_parent_child, ierr )
+             IF ( lo_ptrans )   THEN
+                CALL MPI_GET( ibuf, nr*8, MPI_BYTE, ip-1, target_disp, nr*8, MPI_BYTE,  &               !There is no MPI_INTEGER8 datatype
+                                   me%win_parent_child, ierr )
+             ELSE
+                CALL MPI_GET( buf, nr, MPI_REAL, ip-1, target_disp, nr,        &
+                              MPI_REAL, me%win_parent_child, ierr )
+             ENDIF
+             CALL MPI_WIN_UNLOCK( ip-1, me%win_parent_child, ierr )
+          ENDIF
+          myindex = 1
+          IF ( ar%dimkey == 2 .AND. .NOT.lo_ptrans)  THEN
+
+             CALL C_F_POINTER( ar%data, data_2d, ar%a_dim(1:2) )
+             DO  ij = 1, ape%nrele
+                data_2d(ape%locind(ij)%j,ape%locind(ij)%i) = buf(myindex)
+                myindex = myindex + 1
+             ENDDO
+
+          ELSEIF ( ar%dimkey == 3 .AND. .NOT.lo_ptrans)  THEN
+
+             CALL C_F_POINTER( ar%data, data_3d, ar%a_dim(1:3) )
+             DO  ij = 1, ape%nrele
+                data_3d(:,ape%locind(ij)%j,ape%locind(ij)%i) =                 &
+                                              buf(myindex:myindex+ar%a_dim(1)-1)
+                myindex = myindex+ar%a_dim(1)
+             ENDDO
+
+          ELSEIF ( ar%dimkey == 22 .AND. lo_ptrans)  THEN
+             CALL C_F_POINTER( ar%data, idata_2d, ar%a_dim(1:2) )
+
+             DO  ij = 1, ape%nrele
+                idata_2d(ape%locind(ij)%j,ape%locind(ij)%i) = ibuf(myindex)
+                myindex = myindex + 1
+             ENDDO
+
+          ENDIF
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE pmc_c_getbuffer
+
+
+
+ SUBROUTINE pmc_c_putbuffer( waittime , particle_transfer )
+
+    IMPLICIT NONE
+
+    REAL(wp), INTENT(OUT), OPTIONAL ::  waittime  !<
+    LOGICAL, INTENT(IN), OPTIONAL   ::  particle_transfer  !<
+
+    LOGICAL ::  lo_ptrans!<
+    
+    INTEGER(iwp) ::  ierr         !<
+    INTEGER(iwp) ::  ij           !<
+    INTEGER(iwp) ::  ip           !<
+    INTEGER(iwp) ::  j            !<
+    INTEGER(iwp) ::  myindex      !<
+
+    INTEGER(iwp), DIMENSION(1) ::  buf_shape    !<
+
+    REAL(wp) ::  t1  !<
+    REAL(wp) ::  t2  !<
+
+    REAL(wp), POINTER, DIMENSION(:)         ::  buf      !<
+    REAL(wp), POINTER, DIMENSION(:,:)       ::  data_2d  !<
+    REAL(wp), POINTER, DIMENSION(:,:,:)     ::  data_3d  !<
+    
+    INTEGER(idp), POINTER, DIMENSION(:)     ::  ibuf      !<
+    INTEGER(idp), POINTER, DIMENSION(:,:)   ::  idata_2d  !<
+
+    TYPE(pedef), POINTER                    ::  ape  !<
+    TYPE(arraydef), POINTER                 ::  ar   !<
+
+!
+!-- Wait for empty buffer
+!-- Switch RMA epoche
+
+    t1 = pmc_time()
+    CALL MPI_BARRIER( me%intra_comm, ierr )
+    t2 = pmc_time()
+    IF ( PRESENT( waittime ) )  waittime = t2 - t1
+
+    lo_ptrans = .FALSE.
+    IF ( PRESENT( particle_transfer))    lo_ptrans = particle_transfer
+
+    DO  ip = 1, me%inter_npes
+       ape => me%pes(ip)
+       DO  j = 1, ape%nr_arrays
+          ar => aPE%array_list(j)
+          myindex = 1
+
+          IF ( ar%dimkey == 2 .AND. .NOT.lo_ptrans )  THEN
+
+             buf_shape(1) = ape%nrele
+             CALL C_F_POINTER( ar%sendbuf, buf,     buf_shape     )
+             CALL C_F_POINTER( ar%data,    data_2d, ar%a_dim(1:2) )
+             DO  ij = 1, ape%nrele
+                buf(myindex) = data_2d(ape%locind(ij)%j,ape%locind(ij)%i)
+                myindex = myindex + 1
+             ENDDO
+
+          ELSEIF ( ar%dimkey == 3 .AND. .NOT.lo_ptrans )  THEN
+
+             buf_shape(1) = ape%nrele*ar%a_dim(1)
+             CALL C_F_POINTER( ar%sendbuf, buf,     buf_shape     )
+             CALL C_F_POINTER( ar%data,    data_3d, ar%a_dim(1:3) )
+             DO  ij = 1, ape%nrele
+                buf(myindex:myindex+ar%a_dim(1)-1) =                            &
+                                    data_3d(:,ape%locind(ij)%j,ape%locind(ij)%i)
+                myindex = myindex + ar%a_dim(1)
+             ENDDO
+
+          ELSE IF ( ar%dimkey == 22 .AND. lo_ptrans)  THEN
+
+             buf_shape(1) = ape%nrele
+             CALL C_F_POINTER( ar%sendbuf, ibuf,     buf_shape     )
+             CALL C_F_POINTER( ar%data,    idata_2d, ar%a_dim(1:2) )
+
+             DO  ij = 1, ape%nrele
+                ibuf(myindex) = idata_2d(ape%locind(ij)%j,ape%locind(ij)%i)
+                myindex = myindex + 1
+             ENDDO
+
+          ENDIF
+       ENDDO
+    ENDDO
+!
+!-- Buffer is filled
+!-- Switch RMA epoche
+
+    CALL MPI_Barrier(me%intra_comm, ierr)
+
+ END SUBROUTINE pmc_c_putbuffer
+
+#endif
+ END MODULE pmc_child
Index: /palm/tags/release-6.0/SOURCE/pmc_general_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_general_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_general_mod.f90	(revision 3477)
@@ -0,0 +1,231 @@
+ MODULE pmc_general
+
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variable removed
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2599 2017-11-01 13:18:45Z hellstea
+! Some cleanup and commenting improvements only.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1901 2016-05-04 15:39:38Z raasch
+! Code clean up. The words server/client changed to parent/child.
+!
+! 1900 2016-05-04 15:27:53Z raasch
+! re-formatted to match PALM style, file renamed again
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! change in child-parent data transfer: parent now gets data from child
+! instead of that child puts it to the parent
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! PMC_MPI_REAL removed, dim_order removed from type arraydef,
+! array management changed from linked list to sequential loop
+!
+! 1766 2016-02-29 08:37:15Z raasch
+! +po_data in type arraydef
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statement added (nesting can only be used in parallel mode),
+! all kinds given in PALM style
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Initial revision by K. Ketelsen
+!
+! Description:
+! ------------
+!
+! Structure definition and utilities of Palm Model Coupler
+!------------------------------------------------------------------------------!
+
+#if defined( __parallel )
+    USE, INTRINSIC ::  ISO_C_BINDING
+
+    USE kinds
+
+#if !defined( __mpifh )
+    USE MPI
+#endif
+
+    IMPLICIT NONE
+
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+
+    PRIVATE
+    SAVE
+
+    INTEGER(iwp), PARAMETER, PUBLIC :: da_desclen       =  8  !<
+    INTEGER(iwp), PARAMETER, PUBLIC :: da_namelen       = 16  !<
+    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_da_name_err  = 10  !<
+    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_max_array    = 32  !< max # of arrays which can be coupled
+    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_max_models   = 64  !<
+    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_status_ok    =  0  !<
+    INTEGER(iwp), PARAMETER, PUBLIC :: pmc_status_error = -1  !<
+
+
+    TYPE, PUBLIC :: xy_ind  !< pair of indices in horizontal plane
+       INTEGER(iwp) ::  i
+       INTEGER(iwp) ::  j
+    END TYPE
+
+    TYPE, PUBLIC ::  arraydef
+       INTEGER(iwp)                   :: coupleindex  !<
+       INTEGER(iwp)                   :: nrdims       !< number of dimensions
+       INTEGER(iwp)                   :: dimkey       !< key for NR dimensions and array type
+       INTEGER(iwp), DIMENSION(4)     :: a_dim        !< size of dimensions
+       TYPE(C_PTR)               :: data         !< pointer of data in parent space
+       TYPE(C_PTR), DIMENSION(2) :: po_data      !< base pointers,
+                                                 !< pmc_s_set_active_data_array
+                                                 !< sets active pointer
+       INTEGER(idp)              :: SendIndex    !< index in send buffer
+       INTEGER(idp)              :: RecvIndex    !< index in receive buffer
+       INTEGER(iwp)              :: SendSize     !< size in send buffer
+       INTEGER(iwp)              :: RecvSize     !< size in receive buffer
+       TYPE(C_PTR)               :: SendBuf      !< data pointer in send buffer
+       TYPE(C_PTR)               :: RecvBuf      !< data pointer in receive buffer
+       CHARACTER(LEN=8)          :: Name         !< name of array
+       TYPE(arraydef), POINTER   :: next
+    END TYPE arraydef
+
+    TYPE(arraydef), PUBLIC, POINTER  :: next
+
+    TYPE, PUBLIC ::  pedef
+       INTEGER(iwp) :: nr_arrays = 0  !< number of arrays which will be transfered
+       INTEGER(iwp) :: nrele          !< number of elements, same for all arrays
+       TYPE(xy_ind), POINTER, DIMENSION(:)   ::  locInd      !< xy index local array for remote PE
+       TYPE(arraydef), POINTER, DIMENSION(:) ::  array_list  !< list of data arrays to be transfered
+    END TYPE pedef
+
+    TYPE, PUBLIC ::  childdef
+       INTEGER(idp) ::  totalbuffersize    !<
+       INTEGER(iwp) ::  model_comm         !< communicator of this model
+       INTEGER(iwp) ::  inter_comm         !< inter communicator model and child
+       INTEGER(iwp) ::  intra_comm         !< intra communicator model and child
+       INTEGER(iwp) ::  model_rank         !< rank of this model
+       INTEGER(iwp) ::  model_npes         !< number of PEs this model
+       INTEGER(iwp) ::  inter_npes         !< number of PEs child model
+       INTEGER(iwp) ::  intra_rank         !< rank within intra_comm
+       INTEGER(iwp) ::  win_parent_child   !< MPI RMA for preparing data on parent AND child side
+       TYPE(pedef), DIMENSION(:), POINTER ::  pes  !< list of all child PEs
+    END TYPE childdef
+
+    TYPE, PUBLIC ::  da_namedef  !< data array name definition
+       INTEGER(iwp)              ::  couple_index  !< unique number of array
+       CHARACTER(LEN=da_desclen) ::  parentdesc    !< parent array description
+       CHARACTER(LEN=da_namelen) ::  nameonparent  !< name of array within parent
+       CHARACTER(LEN=da_desclen) ::  childdesc     !< child array description
+       CHARACTER(LEN=da_namelen) ::  nameonchild   !< name of array within child
+    END TYPE da_namedef
+
+    INTERFACE pmc_g_setname
+       MODULE PROCEDURE pmc_g_setname
+    END INTERFACE pmc_g_setname
+
+    INTERFACE pmc_sort
+       MODULE PROCEDURE sort_2d_i
+    END INTERFACE pmc_sort
+
+    PUBLIC pmc_g_setname, pmc_sort
+
+ CONTAINS
+
+
+   
+ SUBROUTINE pmc_g_setname( mychild, couple_index, aname )
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*)              ::  aname         !<
+    INTEGER(iwp), INTENT(IN)      ::  couple_index  !<
+    TYPE(childdef), INTENT(INOUT) ::  mychild       !<
+
+    INTEGER(iwp) ::  i  !<
+
+    TYPE(pedef), POINTER    ::  ape  !<
+
+!
+!-- Assign array to next free index in array list.
+!-- Set name of array in arraydef structure
+    DO  i = 1, mychild%inter_npes
+       ape => mychild%pes(i)
+       ape%nr_arrays = ape%nr_arrays + 1
+       ape%array_list(ape%nr_arrays)%name        = aname
+       ape%array_list(ape%nr_arrays)%coupleindex = couple_index
+    ENDDO
+
+ END SUBROUTINE pmc_g_setname
+
+
+
+ SUBROUTINE sort_2d_i( array, sort_ind )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN)                    ::  sort_ind
+    INTEGER(iwp), DIMENSION(:,:), INTENT(INOUT) ::  array
+
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  j  !<
+    INTEGER(iwp) ::  n  !<
+
+    INTEGER(iwp), DIMENSION(SIZE(array,1)) ::  tmp  !<
+
+    n = SIZE(array,2)
+    DO  j = 1, n-1
+       DO  i = j+1, n
+          IF ( array(sort_ind,i) < array(sort_ind,j) )  THEN
+             tmp = array(:,i)
+             array(:,i) = array(:,j)
+             array(:,j) = tmp
+          ENDIF
+       ENDDO
+    ENDDO
+
+ END  SUBROUTINE sort_2d_i
+
+#endif
+ END MODULE pmc_general
Index: /palm/tags/release-6.0/SOURCE/pmc_handle_communicator_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_handle_communicator_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_handle_communicator_mod.f90	(revision 3477)
@@ -0,0 +1,562 @@
+!> @file pmc_handle_communicator_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! nestpar renamed to nesting_parameters
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Bugfix, give Intent(inout) attributes in routine reading nestpar-namelist (MS)
+! 
+! 2599 2017-11-01 13:18:45Z hellstea
+! Separate peer communicator peer_comm introduced for MPI_INTERCOMM_CREATE.
+! Some cleanup and commenting improvements. 
+! 
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! Bugfix, set filepointer to the beginning of the file after namelist read, 
+! in order to assure that further namelists are also found.
+! 
+! 2279 2017-06-12 15:23:44Z suehring
+! Error message text changed
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2013 2016-09-21 13:07:56Z suehring
+! Bugfix in format descriptor
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1938 2016-06-13 15:26:05Z hellstea
+! Minor clean-up.
+! 
+! 1901 2016-05-04 15:39:38Z raasch
+! Initial version of purely vertical nesting introduced.
+! Code clean up. The words server/client changed to parent/child.
+!
+! 1900 2016-05-04 15:27:53Z raasch
+! re-formatting to match PALM style
+!
+! 1882 2016-04-20 15:24:46Z hellstea
+! MPI_BCAST-calls to broadcast nesting_mode and nesting_datatransfer_mode 
+! are moved out from the DO i = 1, m_ncpl loop.
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! introduction of different datatransfer modes,
+! export of comm_world_nesting
+!
+! 1791 2016-03-11 10:41:25Z raasch
+! m_nrofcpl renamed m_ncpl,
+! pmc_get_local_model_info renamed pmc_get_model_info, some keywords also
+! renamed and some added,
+! debug write-statements commented out
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! Bugfix: nesting_mode is broadcast now
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! only the total number of PEs is given in the nestpar-NAMELIST,
+! additional comments included
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! pmc_layout type: comm_cpl and comm_parent removed, character "name" moved at
+! the beginning of the variable list,
+! domain layout is read with new NAMELIST nestpar from standard file PARIN,
+! MPI-datatype REAL8 replaced by REAL, kind=8 replaced by wp,
+! variable domain_layouts instead of m_couplers introduced for this NAMELIST,
+! general format changed to PALM style
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Initial revision by K. Ketelsen
+!
+! Description:
+! ------------
+! Handle MPI communicator in PALM model coupler
+!-------------------------------------------------------------------------------!
+ MODULE PMC_handle_communicator
+#if defined( __parallel )
+    USE kinds
+
+#if !defined( __mpifh )
+    USE MPI
+#endif
+
+    USE pmc_general,                                                            &
+        ONLY: pmc_status_ok, pmc_status_error, pmc_max_models
+    USE control_parameters,                                                     &
+        ONLY: message_string
+
+    IMPLICIT NONE
+
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+
+    TYPE pmc_layout
+
+       CHARACTER(LEN=32) ::  name
+
+       INTEGER  ::  id            !<
+       INTEGER  ::  parent_id     !<
+       INTEGER  ::  npe_total     !<
+
+       REAL(wp) ::  lower_left_x  !<
+       REAL(wp) ::  lower_left_y  !<
+
+    END TYPE pmc_layout
+
+    PUBLIC  pmc_status_ok, pmc_status_error
+
+    INTEGER, PARAMETER, PUBLIC ::  pmc_error_npes        = 1  !< illegal number of processes
+    INTEGER, PARAMETER, PUBLIC ::  pmc_namelist_error    = 2  !< error(s) in nesting_parameters namelist
+    INTEGER, PARAMETER, PUBLIC ::  pmc_no_namelist_found = 3  !< no couple layout namelist found
+
+    INTEGER ::  m_world_comm  !< global nesting communicator
+    INTEGER ::  m_my_cpl_id   !< coupler id of this model
+    INTEGER ::  m_parent_id   !< coupler id of parent of this model
+    INTEGER ::  m_ncpl        !< number of couplers given in nesting_parameters namelist
+
+    TYPE(pmc_layout), PUBLIC, DIMENSION(pmc_max_models) ::  m_couplers  !< information of all couplers
+
+    INTEGER, PUBLIC ::  m_model_comm          !< communicator of this model
+    INTEGER, PUBLIC ::  m_to_parent_comm      !< communicator to the parent
+    INTEGER, PUBLIC ::  m_world_rank          !<
+    INTEGER         ::  m_world_npes          !<
+    INTEGER, PUBLIC ::  m_model_rank          !<
+    INTEGER, PUBLIC ::  m_model_npes          !<
+    INTEGER         ::  m_parent_remote_size  !< number of processes in the parent model 
+    INTEGER         ::  peer_comm             !< peer_communicator for inter communicators
+
+    INTEGER, DIMENSION(pmc_max_models), PUBLIC ::  m_to_child_comm    !< communicator to the child(ren)
+    INTEGER, DIMENSION(:), POINTER, PUBLIC ::  pmc_parent_for_child   !<
+
+
+    INTERFACE pmc_is_rootmodel
+       MODULE PROCEDURE pmc_is_rootmodel
+    END INTERFACE pmc_is_rootmodel
+
+    INTERFACE pmc_get_model_info
+       MODULE PROCEDURE pmc_get_model_info
+    END INTERFACE pmc_get_model_info
+
+    PUBLIC pmc_get_model_info, pmc_init_model, pmc_is_rootmodel
+
+ CONTAINS
+
+ SUBROUTINE pmc_init_model( comm, nesting_datatransfer_mode, nesting_mode,      &
+                            pmc_status )
+
+    USE control_parameters,                                                     &
+        ONLY:  message_string
+
+    USE pegrid,                                                                 &
+        ONLY:  myid
+
+      IMPLICIT NONE
+
+    CHARACTER(LEN=8), INTENT(INOUT) ::  nesting_mode               !<
+    CHARACTER(LEN=7), INTENT(INOUT) ::  nesting_datatransfer_mode  !<
+
+    INTEGER, INTENT(INOUT) ::  comm        !<
+    INTEGER, INTENT(INOUT) ::  pmc_status  !<
+
+    INTEGER ::  childcount     !<
+    INTEGER ::  i              !<
+    INTEGER ::  ierr           !<
+    INTEGER ::  istat          !<
+    INTEGER ::  m_my_cpl_rank  !<
+    INTEGER ::  tag            !<
+
+    INTEGER, DIMENSION(pmc_max_models)   ::  activeparent  ! I am active parent for this child ID
+    INTEGER, DIMENSION(pmc_max_models+1) ::  start_pe
+
+    pmc_status   = pmc_status_ok
+    comm         = -1
+    m_world_comm = MPI_COMM_WORLD
+    m_my_cpl_id  = -1
+    childcount   =  0
+    activeparent = -1
+    start_pe(:)  =  0
+
+    CALL MPI_COMM_RANK( MPI_COMM_WORLD, m_world_rank, istat )
+    CALL MPI_COMM_SIZE( MPI_COMM_WORLD, m_world_npes, istat )
+!
+!-- Only process 0 of root model reads
+    IF ( m_world_rank == 0 )  THEN
+
+       CALL read_coupling_layout( nesting_datatransfer_mode, nesting_mode,      &
+                                  pmc_status )
+
+       IF ( pmc_status /= pmc_no_namelist_found  .AND.                          &
+            pmc_status /= pmc_namelist_error )                                  &
+       THEN
+!
+!--       Calculate start PE of every model
+          start_pe(1) = 0
+          DO  i = 2, m_ncpl+1
+             start_pe(i) = start_pe(i-1) + m_couplers(i-1)%npe_total
+          ENDDO
+
+!
+!--       The sum of numbers of processes requested by all the domains
+!--       must be equal to the total number of processes of the run
+          IF ( start_pe(m_ncpl+1) /= m_world_npes )  THEN
+             WRITE ( message_string, '(2A,I6,2A,I6,A)' )                        &
+                             'nesting-setup requires different number of ',     &
+                             'MPI procs (', start_pe(m_ncpl+1), ') than ',      &
+                             'provided (', m_world_npes,')'
+             CALL message( 'pmc_init_model', 'PA0229', 3, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDIF
+
+    ENDIF
+!
+!-- Broadcast the read status. This synchronises all other processes with 
+!-- process 0 of the root model. Without synchronisation, they would not 
+!-- behave in the correct way (e.g. they would not return in case of a
+!-- missing NAMELIST).
+    CALL MPI_BCAST( pmc_status, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, istat )
+
+    IF ( pmc_status == pmc_no_namelist_found )  THEN
+!
+!--    Not a nested run; return the MPI_WORLD communicator
+       comm = MPI_COMM_WORLD
+       RETURN
+
+    ELSEIF ( pmc_status == pmc_namelist_error )  THEN
+!
+!--    Only the root model gives the error message. Others are aborted by the
+!--    message-routine with MPI_ABORT. Must be done this way since myid and
+!--    comm2d have not yet been assigned at this point.
+       IF ( m_world_rank == 0 )  THEN
+          message_string = 'errors in \$nesting_parameters'
+          CALL message( 'pmc_init_model', 'PA0223', 3, 2, 0, 6, 0 )
+       ENDIF
+
+    ENDIF
+
+    CALL MPI_BCAST( m_ncpl,          1, MPI_INTEGER, 0, MPI_COMM_WORLD, istat )
+    CALL MPI_BCAST( start_pe, m_ncpl+1, MPI_INTEGER, 0, MPI_COMM_WORLD, istat )
+!
+!-- Broadcast coupling layout
+    DO  i = 1, m_ncpl
+       CALL MPI_BCAST( m_couplers(i)%name, LEN( m_couplers(i)%name ),           &
+                       MPI_CHARACTER, 0, MPI_COMM_WORLD, istat )
+       CALL MPI_BCAST( m_couplers(i)%id,           1, MPI_INTEGER, 0,           &
+                       MPI_COMM_WORLD, istat )
+       CALL MPI_BCAST( m_couplers(i)%Parent_id,    1, MPI_INTEGER, 0,           &
+                       MPI_COMM_WORLD, istat )
+       CALL MPI_BCAST( m_couplers(i)%npe_total,    1, MPI_INTEGER, 0,           &
+                       MPI_COMM_WORLD, istat )
+       CALL MPI_BCAST( m_couplers(i)%lower_left_x, 1, MPI_REAL,    0,           &
+                       MPI_COMM_WORLD, istat )
+       CALL MPI_BCAST( m_couplers(i)%lower_left_y, 1, MPI_REAL,    0,           &
+                       MPI_COMM_WORLD, istat )
+    ENDDO
+    CALL MPI_BCAST( nesting_mode, LEN( nesting_mode ), MPI_CHARACTER, 0,        &
+                    MPI_COMM_WORLD, istat )
+    CALL MPI_BCAST( nesting_datatransfer_mode, LEN(nesting_datatransfer_mode),  &
+                    MPI_CHARACTER, 0, MPI_COMM_WORLD, istat )
+!
+!-- Assign global MPI processes to individual models by setting the couple id
+    DO  i = 1, m_ncpl
+       IF ( m_world_rank >= start_pe(i)  .AND.  m_world_rank < start_pe(i+1) )  &
+       THEN
+          m_my_cpl_id = i
+          EXIT
+       ENDIF
+    ENDDO
+    m_my_cpl_rank = m_world_rank - start_pe(i)
+!
+!-- MPI_COMM_WORLD is the communicator for ALL models (MPI-1 approach).
+!-- The communictors for the individual models as created by MPI_COMM_SPLIT.
+!-- The color of the model is represented by the coupler id
+    CALL MPI_COMM_SPLIT( MPI_COMM_WORLD, m_my_cpl_id, m_my_cpl_rank, comm,      &
+                         istat )
+!
+!-- Get size and rank of the model running on this process
+    CALL  MPI_COMM_RANK( comm, m_model_rank, istat )
+    CALL  MPI_COMM_SIZE( comm, m_model_npes, istat )
+!
+!-- Broadcast (from process 0) the parent id and id of every model
+    DO  i = 1, m_ncpl
+       CALL MPI_BCAST( m_couplers(i)%parent_id, 1, MPI_INTEGER, 0,              &
+                       MPI_COMM_WORLD, istat )
+       CALL MPI_BCAST( m_couplers(i)%id,        1, MPI_INTEGER, 0,              &
+                       MPI_COMM_WORLD, istat )
+    ENDDO
+!
+!-- Save the current model communicator for pmc internal use
+    m_model_comm = comm
+
+!
+!-- Create intercommunicator between the parent and children.
+!-- MPI_INTERCOMM_CREATE creates an intercommunicator between 2 groups of
+!-- different colors.
+!-- The grouping was done above with MPI_COMM_SPLIT.
+!-- A duplicate of MPI_COMM_WORLD is created and used as peer communicator 
+!-- (peer_comm) for MPI_INTERCOMM_CREATE.
+    CALL MPI_COMM_DUP( MPI_COMM_WORLD, peer_comm, ierr ) 
+    DO  i = 2, m_ncpl
+       IF ( m_couplers(i)%parent_id == m_my_cpl_id )  THEN
+!
+!--       Identify all children models of the current model and create 
+!--       inter-communicators to connect between the current model and its 
+!--       children models.
+          tag = 500 + i
+          CALL MPI_INTERCOMM_CREATE( comm, 0, peer_comm, start_pe(i),           &
+                                     tag, m_to_child_comm(i), istat)
+          childcount = childcount + 1
+          activeparent(i) = 1
+       ELSEIF ( i == m_my_cpl_id)  THEN
+!
+!--       Create an inter-communicator to connect between the current 
+!--       model and its parent model.    
+          tag = 500 + i
+          CALL MPI_INTERCOMM_CREATE( comm, 0, peer_comm,                        &
+                                     start_pe(m_couplers(i)%parent_id),         &
+                                     tag, m_to_parent_comm, istat )
+       ENDIF
+    ENDDO
+!
+!-- If I am a parent, count the number of children I have.
+!-- Although this loop is symmetric on all processes, the "activeparent" flag
+!-- is true (==1) on the respective individual process only.
+    ALLOCATE( pmc_parent_for_child(childcount+1) )
+
+    childcount = 0
+    DO  i = 2, m_ncpl
+       IF ( activeparent(i) == 1 )  THEN
+          childcount = childcount + 1
+          pmc_parent_for_child(childcount) = i
+       ENDIF
+    ENDDO
+!
+!-- Get the size of the parent model
+    IF ( m_my_cpl_id > 1 )  THEN
+       CALL MPI_COMM_REMOTE_SIZE( m_to_parent_comm, m_parent_remote_size,       &
+                                  istat )
+    ELSE
+!
+!--    The root model does not have a parent
+       m_parent_remote_size = -1
+    ENDIF
+!
+!-- Set myid to non-zero value except for the root domain. This is a setting
+!-- for the message routine which is called at the end of pmci_init. That
+!-- routine outputs messages for myid = 0, only. However, myid has not been
+!-- assigened so far, so that all processes of the root model would output a
+!-- message. To avoid this, set myid to some other value except for process 0 
+!-- of the root domain.
+    IF ( m_world_rank /= 0 )  myid = 1
+
+ END SUBROUTINE PMC_init_model
+
+
+
+ SUBROUTINE pmc_get_model_info( comm_world_nesting, cpl_id, cpl_name,           &
+                                cpl_parent_id, lower_left_x, lower_left_y,      &
+                                ncpl, npe_total, request_for_cpl_id )
+!
+!-- Provide module private variables of the pmc for PALM
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(OUT), OPTIONAL ::  cpl_name   !<
+
+    INTEGER, INTENT(IN), OPTIONAL ::  request_for_cpl_id   !<
+
+    INTEGER, INTENT(OUT), OPTIONAL ::  comm_world_nesting  !<
+    INTEGER, INTENT(OUT), OPTIONAL ::  cpl_id              !<
+    INTEGER, INTENT(OUT), OPTIONAL ::  cpl_parent_id       !<
+    INTEGER, INTENT(OUT), OPTIONAL ::  ncpl                !<
+    INTEGER, INTENT(OUT), OPTIONAL ::  npe_total           !<
+
+    INTEGER ::  requested_cpl_id                           !<
+
+    REAL(wp), INTENT(OUT), OPTIONAL ::  lower_left_x       !<
+    REAL(wp), INTENT(OUT), OPTIONAL ::  lower_left_y       !<
+
+!
+!-- Set the requested coupler id
+    IF ( PRESENT( request_for_cpl_id ) )  THEN
+       requested_cpl_id = request_for_cpl_id
+!
+!--    Check for allowed range of values
+       IF ( requested_cpl_id < 1  .OR.  requested_cpl_id > m_ncpl )  RETURN
+    ELSE
+       requested_cpl_id = m_my_cpl_id
+    ENDIF
+!
+!-- Return the requested information
+    IF ( PRESENT( comm_world_nesting )  )  THEN
+       comm_world_nesting = m_world_comm
+    ENDIF
+    IF ( PRESENT( cpl_id )        )  THEN
+       cpl_id = requested_cpl_id
+    ENDIF
+    IF ( PRESENT( cpl_parent_id ) )  THEN
+       cpl_parent_id = m_couplers(requested_cpl_id)%parent_id
+    ENDIF
+    IF ( PRESENT( cpl_name )      )  THEN
+       cpl_name = m_couplers(requested_cpl_id)%name
+    ENDIF
+    IF ( PRESENT( ncpl )          )  THEN
+       ncpl = m_ncpl
+    ENDIF
+    IF ( PRESENT( npe_total )     )  THEN
+       npe_total = m_couplers(requested_cpl_id)%npe_total
+    ENDIF
+    IF ( PRESENT( lower_left_x )  )  THEN
+       lower_left_x = m_couplers(requested_cpl_id)%lower_left_x
+    ENDIF
+    IF ( PRESENT( lower_left_y )  )  THEN
+       lower_left_y = m_couplers(requested_cpl_id)%lower_left_y
+    ENDIF
+
+ END SUBROUTINE pmc_get_model_info
+
+
+
+ LOGICAL function pmc_is_rootmodel( )
+
+    IMPLICIT NONE
+
+    pmc_is_rootmodel = ( m_my_cpl_id == 1 )
+
+ END FUNCTION pmc_is_rootmodel
+
+
+
+ SUBROUTINE read_coupling_layout( nesting_datatransfer_mode, nesting_mode,      &
+      pmc_status )
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=8), INTENT(INOUT) ::  nesting_mode
+    CHARACTER(LEN=7), INTENT(INOUT) ::  nesting_datatransfer_mode
+
+    INTEGER(iwp), INTENT(INOUT) ::  pmc_status
+    INTEGER(iwp)                ::  bad_llcorner
+    INTEGER(iwp)                ::  i
+    INTEGER(iwp)                ::  istat
+
+    TYPE(pmc_layout), DIMENSION(pmc_max_models) ::  domain_layouts
+
+    NAMELIST /nesting_parameters/  domain_layouts, nesting_datatransfer_mode,  &
+                                   nesting_mode
+    
+!
+!-- Initialize some coupling variables
+    domain_layouts(1:pmc_max_models)%id = -1
+    m_ncpl =   0
+
+    pmc_status = pmc_status_ok
+!
+!-- Open the NAMELIST-file and read the nesting layout
+    CALL check_open( 11 )
+    READ ( 11, nesting_parameters, IOSTAT=istat )
+!
+!-- Set filepointer to the beginning of the file. Otherwise process 0 will later
+!-- be unable to read the inipar-NAMELIST
+    REWIND ( 11 )
+
+    IF ( istat < 0 )  THEN
+!
+!--    No nesting_parameters-NAMELIST found
+       pmc_status = pmc_no_namelist_found
+       RETURN
+    ELSEIF ( istat > 0 )  THEN
+!
+!--    Errors in reading nesting_parameters-NAMELIST
+       pmc_status = pmc_namelist_error
+       RETURN
+    ENDIF
+!
+!-- Output location message
+    CALL location_message( 'initialize communicators for nesting', .FALSE. )
+!
+!-- Assign the layout to the corresponding internally used variable m_couplers
+    m_couplers = domain_layouts
+!
+!-- Get the number of nested models given in the nesting_parameters-NAMELIST
+    DO  i = 1, pmc_max_models
+!
+!--    When id=-1 is found for the first time, the list of domains is finished
+       IF ( m_couplers(i)%id == -1  .OR.  i == pmc_max_models )  THEN
+          IF ( m_couplers(i)%id == -1 )  THEN
+             m_ncpl = i - 1
+             EXIT
+          ELSE
+             m_ncpl = pmc_max_models
+          ENDIF
+       ENDIF
+    ENDDO
+!
+!-- Make sure that all domains have equal lower left corner in case of vertical
+!-- nesting
+    IF ( nesting_mode == 'vertical' )  THEN
+       bad_llcorner = 0
+       DO  i = 1, m_ncpl
+          IF ( domain_layouts(i)%lower_left_x /= 0.0_wp .OR.                    &
+               domain_layouts(i)%lower_left_y /= 0.0_wp )  THEN
+             bad_llcorner = bad_llcorner + 1
+             domain_layouts(i)%lower_left_x = 0.0_wp
+             domain_layouts(i)%lower_left_y = 0.0_wp
+          ENDIF
+       ENDDO
+       IF ( bad_llcorner /= 0)  THEN
+          WRITE ( message_string, *)  'at least one dimension of lower ',       &
+                                      'left corner of one domain is not 0. ',   &
+                                      'All lower left corners were set to (0, 0)'
+          CALL message( 'read_coupling_layout', 'PA0427', 0, 0, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE read_coupling_layout
+
+#endif
+ END MODULE pmc_handle_communicator
Index: /palm/tags/release-6.0/SOURCE/pmc_interface_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_interface_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_interface_mod.f90	(revision 3477)
@@ -0,0 +1,5987 @@
+!> @file pmc_interface_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3217 2018-08-29 12:53:59Z suehring
+! Revise calculation of index bounds for array index_list, prevent compiler 
+! (cray) to delete the loop at high optimization level.  
+! 
+! 3215 2018-08-29 09:58:59Z suehring
+! Apply an additional switch controlling the nesting of chemical species
+! 
+! 3209 2018-08-27 16:58:37Z suehring
+! Variable names for nest_bound_x replaced by bc_dirichlet_x.
+! Remove commented prints into debug files.
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! dz was replaced by dz(1)
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3022 2018-05-18 11:12:35Z suehring
+! Minor fix - working precision added to real number
+! 
+! 3021 2018-05-16 08:14:20Z maronga
+! Bugfix: variable lcr was defined as INTENT(OUT) instead of INTENT(INOUT)
+! 
+! 3020 2018-05-14 10:45:48Z hellstea
+! Bugfix in pmci_define_loglaw_correction_parameters
+! 
+! 3001 2018-04-20 12:27:13Z suehring
+! Bugfix, replace MERGE function by an if-condition in the anterpolation (in 
+! order to avoid floating-point exceptions).
+! 
+! 2997 2018-04-19 13:35:17Z suehring
+! Mask topography grid points in anterpolation
+! 
+! 2984 2018-04-18 11:51:30Z hellstea
+! Bugfix in the log-law correction initialization. Pivot node cannot any more be 
+! selected from outside the subdomain in order to prevent array under/overflows.
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! bugfix: missing parallel cpp-directives added
+! 
+! 2951 2018-04-06 09:05:08Z kanani
+! Add log_point_s for pmci_model_configuration
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! - Nesting for RANS mode implemented
+!    - Interpolation of TKE onto child domain only if both parent and child are 
+!      either in LES mode or in RANS mode
+!    - Interpolation of dissipation if both parent and child are in RANS mode
+!      and TKE-epsilon closure is applied
+!    - Enable anterpolation of TKE and dissipation rate in case parent and 
+!      child operate in RANS mode
+!
+! - Some unused variables removed from ONLY list
+! - Some formatting adjustments for particle nesting
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! Control logics improved to allow nesting also in cases with
+! constant_flux_layer = .F. or constant_diffusion = .T.
+! 
+! 2895 2018-03-15 10:26:12Z hellstea
+! Change in the nest initialization (pmci_interp_tril_all). Bottom wall BC is no
+! longer overwritten.
+! 
+! 2868 2018-03-09 13:25:09Z hellstea
+! Local conditional Neumann conditions for one-way coupling removed.  
+! 
+! 2853 2018-03-05 14:44:20Z suehring
+! Bugfix in init log-law correction.
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2812 2018-02-16 13:40:25Z hellstea
+! Bugfixes in computation of the interpolation loglaw-correction parameters
+! 
+! 2809 2018-02-15 09:55:58Z schwenkel
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE
+! 
+! 2806 2018-02-14 17:10:37Z thiele
+! Bugfixing Write statements
+! 
+! 2804 2018-02-14 16:57:03Z thiele
+! preprocessor directive for c_sizeof in case of __gfortran added
+! 
+! 2803 2018-02-14 16:56:32Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2795 2018-02-07 14:48:48Z hellstea
+! Bugfix in computation of the anterpolation under-relaxation functions. 
+! 
+! 2773 2018-01-30 14:12:54Z suehring
+! - Nesting for chemical species
+! - Bugfix in setting boundary condition at downward-facing walls for passive
+!   scalar
+! - Some formatting adjustments
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! - Bugfix in init_tke_factor (MS)
+! 
+! 2669 2017-12-06 16:03:27Z raasch
+! file extension for nested domains changed to "_N##",
+! created flag file in order to enable combine_plot_fields to process nest data
+! 
+! 2663 2017-12-04 17:40:50Z suehring
+! Bugfix, wrong coarse-grid index in init_tkefactor used.
+! 
+! 2602 2017-11-03 11:06:41Z hellstea
+! Index-limit related bug (occurred with nesting_mode='vertical') fixed in
+! pmci_interp_tril_t. Check for too high nest domain added in pmci_setup_parent.   
+! Some cleaning up made. 
+! 
+! 2582 2017-10-26 13:19:46Z hellstea
+! Resetting of e within buildings / topography in pmci_parent_datatrans removed
+! as unnecessary since e is not anterpolated, and as incorrect since it overran
+! the default Neumann condition (bc_e_b). 
+! 
+! 2359 2017-08-21 07:50:30Z hellstea
+! A minor indexing error in pmci_init_loglaw_correction is corrected. 
+! 
+! 2351 2017-08-15 12:03:06Z kanani
+! Removed check (PA0420) for nopointer version
+! 
+! 2350 2017-08-15 11:48:26Z kanani
+! Bugfix and error message for nopointer version.
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+! Set bottom boundary condition after anterpolation.
+! Some variable description added.
+! 
+! 2293 2017-06-22 12:59:12Z suehring
+! In anterpolation, exclude grid points which are used for interpolation. 
+! This avoids the accumulation of numerical errors leading to increased 
+! variances for shallow child domains.  
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2285 2017-06-15 13:15:41Z suehring
+! Consider multiple pure-vertical nest domains in overlap check
+! 
+! 2283 2017-06-14 10:17:34Z suehring
+! Bugfixes in inititalization of log-law correction concerning 
+! new topography concept
+! 
+! 2281 2017-06-13 11:34:50Z suehring
+! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
+! 
+! 2241 2017-06-01 13:46:13Z hellstea
+! A minor indexing error in pmci_init_loglaw_correction is corrected.
+! 
+! 2240 2017-06-01 13:45:34Z hellstea
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2229 2017-05-30 14:52:52Z hellstea
+! A minor indexing error in pmci_init_anterp_tophat is corrected.
+! 
+! 2174 2017-03-13 08:18:57Z maronga
+! Added support for cloud physics quantities, syntax layout improvements. Data
+! transfer of qc and nc is prepared but currently deactivated until both
+! quantities become prognostic variables.
+! Some bugfixes.
+! 
+! 2019 2016-09-30 13:40:09Z hellstea
+! Bugfixes mainly in determining the anterpolation index bounds. These errors 
+! were detected when first time tested using 3:1 grid-spacing.
+! 
+! 2003 2016-08-24 10:22:32Z suehring
+! Humidity and passive scalar also separated in nesting mode 
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1938 2016-06-13 15:26:05Z hellstea
+! Minor clean-up.
+! 
+! 1901 2016-05-04 15:39:38Z raasch
+! Initial version of purely vertical nesting introduced.
+! Code clean up. The words server/client changed to parent/child.
+!
+! 1900 2016-05-04 15:27:53Z raasch
+! unused variables removed
+!
+! 1894 2016-04-27 09:01:48Z raasch
+! bugfix: pt interpolations are omitted in case that the temperature equation is
+! switched off
+!
+! 1892 2016-04-26 13:49:47Z raasch
+! bugfix: pt is not set as a data array in case that the temperature equation is
+! switched off with neutral = .TRUE.
+!
+! 1882 2016-04-20 15:24:46Z hellstea
+! The factor ijfc for nfc used in anterpolation is redefined as 2-D array 
+! and precomputed in pmci_init_anterp_tophat. 
+! 
+! 1878 2016-04-19 12:30:36Z hellstea
+! Synchronization rewritten, logc-array index order changed for cache
+! optimization
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1801 2016-04-05 13:12:47Z raasch
+! bugfix for r1797: zero setting of temperature within topography does not work
+! and has been disabled
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! introduction of different datatransfer modes,
+! further formatting cleanup, parameter checks added (including mismatches
+! between root and nest model settings),
+! +routine pmci_check_setting_mismatches
+! comm_world_nesting introduced
+!
+! 1791 2016-03-11 10:41:25Z raasch
+! routine pmci_update_new removed,
+! pmc_get_local_model_info renamed pmc_get_model_info, some keywords also
+! renamed,
+! filling up redundant ghost points introduced,
+! some index bound variables renamed,
+! further formatting cleanup
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! calculation of nest top area simplified,
+! interpolation and anterpolation moved to seperate wrapper subroutines
+!
+! 1781 2016-03-03 15:12:23Z raasch
+! _p arrays are set zero within buildings too, t.._m arrays and respective
+! settings within buildings completely removed
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! only the total number of PEs is given for the domains, npe_x and npe_y
+! replaced by npe_total, two unused elements removed from array
+! parent_grid_info_real,
+! array management changed from linked list to sequential loop
+!
+! 1766 2016-02-29 08:37:15Z raasch
+! modifications to allow for using PALM's pointer version,
+! +new routine pmci_set_swaplevel
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! +cpl_parent_id,
+! cpp-statements for nesting replaced by __parallel statements,
+! errors output with message-subroutine,
+! index bugfixes in pmci_interp_tril_all,
+! some adjustments to PALM style
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Initial revision by A. Hellsten
+!
+! Description:
+! ------------
+! Domain nesting interface routines. The low-level inter-domain communication   
+! is conducted by the PMC-library routines.
+!
+! @todo Remove array_3d variables from USE statements thate not used in the 
+!       routine
+! @todo Data transfer of qc and nc is prepared but not activated
+!------------------------------------------------------------------------------!
+ MODULE pmc_interface
+
+    USE ISO_C_BINDING
+
+
+#if defined( __nopointer )
+    USE arrays_3d,                                                             &
+        ONLY:  diss, dzu, dzw, e, e_p, nc, nr, pt, q, qc, qr, s, u, u_p,       &
+               v, v_p, w, w_p, zu, zw
+#else
+   USE arrays_3d,                                                              &
+        ONLY:  diss, diss_2, dzu, dzw, e, e_p, e_2, nc, nc_2, nc_p, nr, nr_2,  &
+               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
+#endif
+
+    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, dt_3d, dz, humidity, message_string,             &
+               neutral, passive_scalar, rans_mode, rans_tke_e,                 &
+               roughness_length, simulated_time, topography, volume_flow
+
+    USE chem_modules,                                                          &
+        ONLY:  nspec
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_species, nest_chemistry, spec_conc_2
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxlu, nxr, nxrg, ny, nyn, nyng, nys, nysg, &
+               nysv, nz, nzb, nzt, wall_flags_0
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+    USE particle_attributes,                                                   &
+        ONLY:  particle_advection
+
+    USE kinds
+
+#if defined( __parallel )
+#if !defined( __mpifh )
+    USE MPI
+#endif
+
+    USE pegrid,                                                                &
+        ONLY:  collective_wait, comm1dx, comm1dy, comm2d, myid, myidx, myidy,  &
+               numprocs
+
+    USE pmc_child,                                                             &
+        ONLY:  pmc_childinit, pmc_c_clear_next_array_list,                     &
+               pmc_c_getnextarray, pmc_c_get_2d_index_list, pmc_c_getbuffer,   &
+               pmc_c_putbuffer, pmc_c_setind_and_allocmem,                     &
+               pmc_c_set_dataarray, pmc_set_dataarray_name
+
+    USE pmc_general,                                                           &
+        ONLY:  da_namelen
+
+    USE pmc_handle_communicator,                                               &
+        ONLY:  pmc_get_model_info, pmc_init_model, pmc_is_rootmodel,           &
+               pmc_no_namelist_found, pmc_parent_for_child, m_couplers
+
+    USE pmc_mpi_wrapper,                                                       &
+        ONLY:  pmc_bcast, pmc_recv_from_child, pmc_recv_from_parent,           &
+               pmc_send_to_child, pmc_send_to_parent
+
+    USE pmc_parent,                                                            &
+        ONLY:  pmc_parentinit, pmc_s_clear_next_array_list, pmc_s_fillbuffer,  &
+               pmc_s_getdata_from_buffer, pmc_s_getnextarray,                  &
+               pmc_s_setind_and_allocmem, pmc_s_set_active_data_array,         &
+               pmc_s_set_dataarray, pmc_s_set_2d_index_list
+
+#endif
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji, surf_def_h, surf_lsm_h, surf_usm_h
+
+    IMPLICIT NONE
+
+#if defined( __parallel )
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+#endif
+
+    PRIVATE
+!
+!-- Constants
+    INTEGER(iwp), PARAMETER ::  child_to_parent = 2   !<
+    INTEGER(iwp), PARAMETER ::  parent_to_child = 1   !<
+!
+!-- Coupler setup
+    INTEGER(iwp), SAVE      ::  comm_world_nesting    !<
+    INTEGER(iwp), SAVE      ::  cpl_id  = 1           !<
+    CHARACTER(LEN=32), SAVE ::  cpl_name              !<
+    INTEGER(iwp), SAVE      ::  cpl_npe_total         !<
+    INTEGER(iwp), SAVE      ::  cpl_parent_id         !<
+!
+!-- Control parameters, will be made input parameters later
+    CHARACTER(LEN=7), SAVE ::  nesting_datatransfer_mode = 'mixed'  !< steering
+                                                         !< parameter for data-
+                                                         !< transfer mode
+    CHARACTER(LEN=8), SAVE ::  nesting_mode = 'two-way'  !< steering parameter
+                                                         !< for 1- or 2-way nesting
+
+    LOGICAL, SAVE ::  nested_run = .FALSE.  !< general switch
+    LOGICAL       ::  rans_mode_parent = .FALSE. !< mode of parent model (.F. - LES mode, .T. - RANS mode)
+
+    REAL(wp), SAVE ::  anterp_relax_length_l = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_r = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_s = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_n = -1.0_wp   !<
+    REAL(wp), SAVE ::  anterp_relax_length_t = -1.0_wp   !<
+!
+!-- Geometry
+    REAL(wp), SAVE                                    ::  area_t             !<
+    REAL(wp), SAVE, DIMENSION(:), ALLOCATABLE, PUBLIC ::  coord_x            !<
+    REAL(wp), SAVE, DIMENSION(:), ALLOCATABLE, PUBLIC ::  coord_y            !<
+    REAL(wp), SAVE, PUBLIC                            ::  lower_left_coord_x !<
+    REAL(wp), SAVE, PUBLIC                            ::  lower_left_coord_y !<
+
+!
+!-- Child coarse data arrays
+    INTEGER(iwp), DIMENSION(5),PUBLIC           ::  coarse_bound   !<
+
+    REAL(wp), SAVE                              ::  xexl           !<
+    REAL(wp), SAVE                              ::  xexr           !<
+    REAL(wp), SAVE                              ::  yexs           !<
+    REAL(wp), SAVE                              ::  yexn           !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_l    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_n    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_r    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_s    !<
+    REAL(wp), SAVE, DIMENSION(:,:), ALLOCATABLE ::  tkefactor_t    !<
+
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  dissc !< coarse grid array on child domain - dissipation rate
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ec   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ptc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  uc   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  vc   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  wc   !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  q_c  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qcc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  qrc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  nrc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  ncc  !<
+    REAL(wp), SAVE, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::  sc   !<
+    INTEGER(idp), SAVE, DIMENSION(:,:), ALLOCATABLE, TARGET, PUBLIC ::  nr_partc    !<
+    INTEGER(idp), SAVE, DIMENSION(:,:), ALLOCATABLE, TARGET, PUBLIC ::  part_adrc   !<
+
+    REAL(wp), SAVE, DIMENSION(:,:,:,:), ALLOCATABLE, TARGET ::  chem_spec_c !< coarse grid array on child domain - chemical species
+
+!
+!-- Child interpolation coefficients and child-array indices to be 
+!-- precomputed and stored.
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ico    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  icu    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jco    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jcv    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kco    !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kcw    !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1xo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2xo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1xu   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2xu   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1yo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2yo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1yv   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2yv   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1zo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2zo   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r1zw   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:)     ::  r2zw   !<
+!
+!-- Child index arrays and log-ratio arrays for the log-law near-wall
+!-- corrections. These are not truly 3-D arrays but multiple 2-D arrays.
+    INTEGER(iwp), SAVE :: ncorr  !< 4th dimension of the log_ratio-arrays
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_l   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_n   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_r   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_u_s   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_l   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_n   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_r   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_v_s   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_l   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_n   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_r   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  logc_w_s   !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_u_l !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_u_n !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_u_r !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_u_s !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_v_l !<    
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_v_n !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_v_r !<    
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_v_s !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_w_l !<    
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_w_n !<
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_w_r !<    
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::  logc_kbounds_w_s !<        
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_l   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_n   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_r   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_u_s   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_l   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_n   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_r   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_v_s   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_l   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_n   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_r   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:,:,:)   ::  logc_ratio_w_s   !<
+!
+!-- Upper bounds for k in anterpolation.
+    INTEGER(iwp), SAVE ::  kctu   !<
+    INTEGER(iwp), SAVE ::  kctw   !<
+!
+!-- Upper bound for k in log-law correction in interpolation.
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_l   !<
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_n   !<
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_r   !<
+    INTEGER(iwp), SAVE ::  nzt_topo_nestbc_s   !<
+!
+!-- Number of ghost nodes in coarse-grid arrays for i and j in anterpolation.
+    INTEGER(iwp), SAVE ::  nhll   !<
+    INTEGER(iwp), SAVE ::  nhlr   !<
+    INTEGER(iwp), SAVE ::  nhls   !<
+    INTEGER(iwp), SAVE ::  nhln   !<
+!
+!-- Spatial under-relaxation coefficients for anterpolation.
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  frax   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  fray   !<
+    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:) ::  fraz   !<
+!
+!-- Child-array indices to be precomputed and stored for anterpolation.
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  iflu   !< child index indicating left bound of parent grid box on u-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ifuu   !< child index indicating right bound of parent grid box on u-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  iflo   !< child index indicating left bound of parent grid box on scalar-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  ifuo   !< child index indicating right bound of parent grid box on scalar-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jflv   !< child index indicating south bound of parent grid box on v-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jfuv   !< child index indicating north bound of parent grid box on v-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jflo   !< child index indicating south bound of parent grid box on scalar-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  jfuo   !< child index indicating north bound of parent grid box on scalar-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kflw   !< child index indicating lower bound of parent grid box on w-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kfuw   !< child index indicating upper bound of parent grid box on w-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kflo   !< child index indicating lower bound of parent grid box on scalar-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:) ::  kfuo   !< child index indicating upper bound of parent grid box on scalar-grid
+!
+!-- Number of fine-grid nodes inside coarse-grid ij-faces
+!-- to be precomputed for anterpolation.
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  ijkfc_u  !< number of child grid boxes contribution to a parent grid box, u-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  ijkfc_v  !< number of child grid boxes contribution to a parent grid box, v-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  ijkfc_w  !< number of child grid boxes contribution to a parent grid box, w-grid
+    INTEGER(iwp), SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::  ijkfc_s  !< number of child grid boxes contribution to a parent grid box, scalar-grid
+    
+    INTEGER(iwp), DIMENSION(3)          ::  parent_grid_info_int    !<
+    REAL(wp), DIMENSION(7)              ::  parent_grid_info_real   !<
+    REAL(wp), DIMENSION(2)              ::  zmax_coarse             !<
+
+    TYPE coarsegrid_def
+       INTEGER(iwp)                        ::  nx                 !<
+       INTEGER(iwp)                        ::  ny                 !<
+       INTEGER(iwp)                        ::  nz                 !<
+       REAL(wp)                            ::  dx                 !<
+       REAL(wp)                            ::  dy                 !<
+       REAL(wp)                            ::  dz                 !<
+       REAL(wp)                            ::  lower_left_coord_x !<
+       REAL(wp)                            ::  lower_left_coord_y !<
+       REAL(wp)                            ::  xend               !<
+       REAL(wp)                            ::  yend               !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  coord_x            !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  coord_y            !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzu                !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dzw                !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zu                 !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  zw                 !<
+    END TYPE coarsegrid_def
+
+    TYPE(coarsegrid_def), SAVE, PUBLIC     ::  cg   !<
+
+!-  Variables for particle coupling
+
+    TYPE, PUBLIC :: childgrid_def
+       INTEGER(iwp)                        ::  nx                   !<
+       INTEGER(iwp)                        ::  ny                   !<
+       INTEGER(iwp)                        ::  nz                   !<
+       REAL(wp)                            ::  dx                   !<
+       REAL(wp)                            ::  dy                   !<
+       REAL(wp)                            ::  dz                   !<
+       REAL(wp)                            ::  lx_coord, lx_coord_b !<
+       REAL(wp)                            ::  rx_coord, rx_coord_b !<
+       REAL(wp)                            ::  sy_coord, sy_coord_b !<
+       REAL(wp)                            ::  ny_coord, ny_coord_b !<
+       REAL(wp)                            ::  uz_coord, uz_coord_b !<
+    END TYPE childgrid_def
+
+    TYPE(childgrid_def), SAVE, ALLOCATABLE, DIMENSION(:), PUBLIC :: childgrid !<
+
+    INTEGER(idp),ALLOCATABLE,DIMENSION(:,:),PUBLIC,TARGET    :: nr_part  !<
+    INTEGER(idp),ALLOCATABLE,DIMENSION(:,:),PUBLIC,TARGET    :: part_adr !<
+    
+    INTERFACE pmci_boundary_conds
+       MODULE PROCEDURE pmci_boundary_conds
+    END INTERFACE pmci_boundary_conds
+    
+    INTERFACE pmci_check_setting_mismatches
+       MODULE PROCEDURE pmci_check_setting_mismatches
+    END INTERFACE
+
+    INTERFACE pmci_child_initialize
+       MODULE PROCEDURE pmci_child_initialize
+    END INTERFACE
+
+    INTERFACE pmci_synchronize
+       MODULE PROCEDURE pmci_synchronize
+    END INTERFACE
+
+    INTERFACE pmci_datatrans
+       MODULE PROCEDURE pmci_datatrans
+    END INTERFACE pmci_datatrans
+
+    INTERFACE pmci_ensure_nest_mass_conservation
+       MODULE PROCEDURE pmci_ensure_nest_mass_conservation
+    END INTERFACE
+
+    INTERFACE pmci_init
+       MODULE PROCEDURE pmci_init
+    END INTERFACE
+
+    INTERFACE pmci_modelconfiguration
+       MODULE PROCEDURE pmci_modelconfiguration
+    END INTERFACE
+
+    INTERFACE pmci_parent_initialize
+       MODULE PROCEDURE pmci_parent_initialize
+    END INTERFACE
+
+    INTERFACE get_number_of_childs
+       MODULE PROCEDURE get_number_of_childs
+    END  INTERFACE get_number_of_childs
+
+    INTERFACE get_childid
+       MODULE PROCEDURE get_childid
+    END  INTERFACE get_childid
+
+    INTERFACE get_child_edges
+       MODULE PROCEDURE get_child_edges
+    END  INTERFACE get_child_edges
+
+    INTERFACE get_child_gridspacing
+       MODULE PROCEDURE get_child_gridspacing
+    END  INTERFACE get_child_gridspacing
+
+
+    INTERFACE pmci_set_swaplevel
+       MODULE PROCEDURE pmci_set_swaplevel
+    END INTERFACE pmci_set_swaplevel
+
+    PUBLIC anterp_relax_length_l, anterp_relax_length_r,                       &
+           anterp_relax_length_s, anterp_relax_length_n,                       &
+           anterp_relax_length_t, child_to_parent, comm_world_nesting,         &
+           cpl_id, nested_run, nesting_datatransfer_mode, nesting_mode,        &
+           parent_to_child, rans_mode_parent
+
+    PUBLIC pmci_boundary_conds
+    PUBLIC pmci_child_initialize
+    PUBLIC pmci_datatrans
+    PUBLIC pmci_ensure_nest_mass_conservation
+    PUBLIC pmci_init
+    PUBLIC pmci_modelconfiguration
+    PUBLIC pmci_parent_initialize
+    PUBLIC pmci_synchronize
+    PUBLIC pmci_set_swaplevel
+    PUBLIC get_number_of_childs, get_childid, get_child_edges, get_child_gridspacing
+
+
+
+ CONTAINS
+
+
+ SUBROUTINE pmci_init( world_comm )
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(OUT) ::  world_comm   !<
+
+#if defined( __parallel )
+
+    INTEGER(iwp) ::  pmc_status   !<
+
+
+    CALL pmc_init_model( world_comm, nesting_datatransfer_mode, nesting_mode,  &
+                         pmc_status )
+
+    IF ( pmc_status == pmc_no_namelist_found )  THEN
+!
+!--    This is not a nested run
+       world_comm = MPI_COMM_WORLD
+       cpl_id     = 1
+       cpl_name   = ""
+
+       RETURN
+
+    ENDIF
+!
+!-- Check steering parameter values
+    IF ( TRIM( nesting_mode ) /= 'one-way'  .AND.                              &
+         TRIM( nesting_mode ) /= 'two-way'  .AND.                              &
+         TRIM( nesting_mode ) /= 'vertical' )                                  &
+    THEN
+       message_string = 'illegal nesting mode: ' // TRIM( nesting_mode )
+       CALL message( 'pmci_init', 'PA0417', 3, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( TRIM( nesting_datatransfer_mode ) /= 'cascade'  .AND.                 &
+         TRIM( nesting_datatransfer_mode ) /= 'mixed'    .AND.                 &
+         TRIM( nesting_datatransfer_mode ) /= 'overlap' )                      &
+    THEN
+       message_string = 'illegal nesting datatransfer mode: '                  &
+                        // TRIM( nesting_datatransfer_mode )
+       CALL message( 'pmci_init', 'PA0418', 3, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- Set the general steering switch which tells PALM that its a nested run
+    nested_run = .TRUE.
+!
+!-- Get some variables required by the pmc-interface (and in some cases in the
+!-- PALM code out of the pmci) out of the pmc-core
+    CALL pmc_get_model_info( comm_world_nesting = comm_world_nesting,          &
+                             cpl_id = cpl_id, cpl_parent_id = cpl_parent_id,   &
+                             cpl_name = cpl_name, npe_total = cpl_npe_total,   &
+                             lower_left_x = lower_left_coord_x,                &
+                             lower_left_y = lower_left_coord_y )
+!
+!-- Set the steering switch which tells the models that they are nested (of
+!-- course the root domain (cpl_id = 1) is not nested)
+    IF ( cpl_id >= 2 )  THEN
+       child_domain = .TRUE.
+       WRITE( coupling_char, '(A2,I2.2)') '_N', cpl_id
+    ENDIF
+
+!
+!-- Message that communicators for nesting are initialized.
+!-- Attention: myid has been set at the end of pmc_init_model in order to
+!-- guarantee that only PE0 of the root domain does the output.
+    CALL location_message( 'finished', .TRUE. )
+!
+!-- Reset myid to its default value
+    myid = 0
+#else
+!
+!-- Nesting cannot be used in serial mode. cpl_id is set to root domain (1)
+!-- because no location messages would be generated otherwise.
+!-- world_comm is given a dummy value to avoid compiler warnings (INTENT(OUT)
+!-- should get an explicit value)
+    cpl_id     = 1
+    nested_run = .FALSE.
+    world_comm = 1
+#endif
+
+ END SUBROUTINE pmci_init
+
+
+
+ SUBROUTINE pmci_modelconfiguration
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  ncpl   !<  number of nest domains
+
+#if defined( __parallel )
+    CALL location_message( 'setup the nested model configuration', .FALSE. )
+    CALL cpu_log( log_point_s(79), 'pmci_model_config', 'start' )
+!
+!-- Compute absolute coordinates for all models
+    CALL pmci_setup_coordinates
+!
+!-- Initialize the child (must be called before pmc_setup_parent)
+    CALL pmci_setup_child
+!
+!-- Initialize PMC parent
+    CALL pmci_setup_parent
+!
+!-- Check for mismatches between settings of master and child variables
+!-- (e.g., all children have to follow the end_time settings of the root master)
+    CALL pmci_check_setting_mismatches
+!
+!-- Set flag file for combine_plot_fields for precessing the nest output data
+    OPEN( 90, FILE='3DNESTING', FORM='FORMATTED' )
+    CALL pmc_get_model_info( ncpl = ncpl )
+    WRITE( 90, '(I2)' )  ncpl
+    CLOSE( 90 )
+
+    CALL cpu_log( log_point_s(79), 'pmci_model_config', 'stop' )
+    CALL location_message( 'finished', .TRUE. )
+#endif
+
+ END SUBROUTINE pmci_modelconfiguration
+
+
+
+ SUBROUTINE pmci_setup_parent
+
+#if defined( __parallel )
+    IMPLICIT NONE
+
+    CHARACTER(LEN=32) ::  myname
+    
+    INTEGER(iwp) ::  child_id         !<
+    INTEGER(iwp) ::  ierr             !<
+    INTEGER(iwp) ::  k                !<
+    INTEGER(iwp) ::  m                !<
+    INTEGER(iwp) ::  mid              !<
+    INTEGER(iwp) ::  mm               !<
+    INTEGER(iwp) ::  n = 1            !< running index for chemical species
+    INTEGER(iwp) ::  nest_overlap     !<
+    INTEGER(iwp) ::  nomatch          !<
+    INTEGER(iwp) ::  nx_cl            !<
+    INTEGER(iwp) ::  ny_cl            !<
+    INTEGER(iwp) ::  nz_cl            !<
+
+    INTEGER(iwp), DIMENSION(5) ::  val    !<
+
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_xl   !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_xr   !<    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_ys   !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ch_yn   !<
+    REAL(wp) ::  cl_height        !< 
+    REAL(wp) ::  dx_cl            !<
+    REAL(wp) ::  dy_cl            !<
+    REAL(wp) ::  dz_cl            !<
+    REAL(wp) ::  left_limit       !<
+    REAL(wp) ::  north_limit      !<
+    REAL(wp) ::  right_limit      !<
+    REAL(wp) ::  south_limit      !<
+    REAL(wp) ::  xez              !<
+    REAL(wp) ::  yez              !<
+
+    REAL(wp), DIMENSION(5) ::  fval             !<
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  cl_coord_x   !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  cl_coord_y   !<
+
+!
+!   Initialize the pmc parent
+    CALL pmc_parentinit
+
+!
+!-- Corners of all children of the present parent
+    IF ( ( SIZE( pmc_parent_for_child ) - 1 > 0 ) .AND. myid == 0 )  THEN 
+       ALLOCATE( ch_xl(1:SIZE( pmc_parent_for_child ) - 1) )
+       ALLOCATE( ch_xr(1:SIZE( pmc_parent_for_child ) - 1) )
+       ALLOCATE( ch_ys(1:SIZE( pmc_parent_for_child ) - 1) )
+       ALLOCATE( ch_yn(1:SIZE( pmc_parent_for_child ) - 1) )
+    ENDIF
+    IF ( ( SIZE( pmc_parent_for_child ) - 1 > 0 ) )  THEN
+       ALLOCATE( childgrid(1:SIZE( pmc_parent_for_child ) - 1) )
+    ENDIF
+
+!
+!-- Get coordinates from all children
+    DO  m = 1, SIZE( pmc_parent_for_child ) - 1
+
+       child_id = pmc_parent_for_child(m)
+
+       IF ( myid == 0 )  THEN
+
+          CALL pmc_recv_from_child( child_id, val,  size(val),  0, 123, ierr )
+          CALL pmc_recv_from_child( child_id, fval, size(fval), 0, 124, ierr )
+         
+          nx_cl     = val(1)
+          ny_cl     = val(2)
+          dx_cl     = fval(3)
+          dy_cl     = fval(4)
+          dz_cl     = fval(5)
+          cl_height = fval(1)
+
+          nz_cl = nz
+!
+!--       Find the highest nest level in the coarse grid for the reduced z
+!--       transfer
+          DO  k = 1, nz                 
+             IF ( zw(k) > fval(1) )  THEN
+                nz_cl = k
+                EXIT
+             ENDIF
+          ENDDO
+
+          zmax_coarse = fval(1:2)
+          cl_height   = fval(1)
+
+!    
+!--       Get absolute coordinates from the child
+          ALLOCATE( cl_coord_x(-nbgp:nx_cl+nbgp) )
+          ALLOCATE( cl_coord_y(-nbgp:ny_cl+nbgp) )
+         
+          CALL pmc_recv_from_child( child_id, cl_coord_x, SIZE( cl_coord_x ),  &
+               0, 11, ierr )
+          CALL pmc_recv_from_child( child_id, cl_coord_y, SIZE( cl_coord_y ),  &
+               0, 12, ierr )
+         
+          parent_grid_info_real(1) = lower_left_coord_x
+          parent_grid_info_real(2) = lower_left_coord_y
+          parent_grid_info_real(3) = dx
+          parent_grid_info_real(4) = dy
+          parent_grid_info_real(5) = lower_left_coord_x + ( nx + 1 ) * dx
+          parent_grid_info_real(6) = lower_left_coord_y + ( ny + 1 ) * dy
+          parent_grid_info_real(7) = dz(1)
+
+          parent_grid_info_int(1)  = nx
+          parent_grid_info_int(2)  = ny
+          parent_grid_info_int(3)  = nz_cl
+!
+!--       Check that the child domain matches parent domain. 
+          nomatch = 0
+          IF ( nesting_mode == 'vertical' )  THEN
+             right_limit = parent_grid_info_real(5)
+             north_limit = parent_grid_info_real(6)
+             IF ( ( cl_coord_x(nx_cl+1) /= right_limit ) .OR.                  &
+                  ( cl_coord_y(ny_cl+1) /= north_limit ) )  THEN
+                nomatch = 1
+             ENDIF
+          ELSE       
+!
+!--       Check that the child domain is completely inside the parent domain. 
+             xez = ( nbgp + 1 ) * dx 
+             yez = ( nbgp + 1 ) * dy 
+             left_limit  = lower_left_coord_x + xez
+             right_limit = parent_grid_info_real(5) - xez
+             south_limit = lower_left_coord_y + yez
+             north_limit = parent_grid_info_real(6) - yez
+             IF ( ( cl_coord_x(0) < left_limit )        .OR.                   &
+                  ( cl_coord_x(nx_cl+1) > right_limit ) .OR.                   &
+                  ( cl_coord_y(0) < south_limit )       .OR.                   &
+                  ( cl_coord_y(ny_cl+1) > north_limit ) )  THEN
+                nomatch = 1
+             ENDIF
+          ENDIF
+!             
+!--       Child domain must be lower than the parent domain such
+!--       that the top ghost layer of the child grid does not exceed 
+!--       the parent domain top boundary.
+
+          IF ( cl_height > zw(nz) ) THEN
+             nomatch = 1
+          ENDIF
+!
+!--       Check that parallel nest domains, if any, do not overlap.
+          nest_overlap = 0
+          IF ( SIZE( pmc_parent_for_child ) - 1 > 0 )  THEN
+             ch_xl(m) = cl_coord_x(-nbgp)
+             ch_xr(m) = cl_coord_x(nx_cl+nbgp)
+             ch_ys(m) = cl_coord_y(-nbgp)
+             ch_yn(m) = cl_coord_y(ny_cl+nbgp)
+
+             IF ( m > 1 )  THEN
+                DO mm = 1, m - 1
+                   mid = pmc_parent_for_child(mm)
+!
+!--                Check Only different nest level
+                   IF (m_couplers(child_id)%parent_id /= m_couplers(mid)%parent_id)  THEN
+                      IF ( ( ch_xl(m) < ch_xr(mm) .OR.                         &
+                             ch_xr(m) > ch_xl(mm) )  .AND.                     &
+                           ( ch_ys(m) < ch_yn(mm) .OR.                         &
+                             ch_yn(m) > ch_ys(mm) ) )  THEN
+                         nest_overlap = 1
+                      ENDIF
+                   ENDIF
+                ENDDO
+             ENDIF
+          ENDIF
+
+          CALL set_child_edge_coords
+
+          DEALLOCATE( cl_coord_x )
+          DEALLOCATE( cl_coord_y )
+
+!
+!--       Send information about operating mode (LES or RANS) to child. This will be 
+!--       used to control TKE nesting and setting boundary conditions properly.
+          CALL pmc_send_to_child( child_id, rans_mode, 1, 0, 19, ierr )  
+!
+!--       Send coarse grid information to child
+          CALL pmc_send_to_child( child_id, parent_grid_info_real,             &
+                                   SIZE( parent_grid_info_real ), 0, 21,       &
+                                   ierr )
+          CALL pmc_send_to_child( child_id, parent_grid_info_int,  3, 0,       &
+                                   22, ierr )
+!
+!--       Send local grid to child
+          CALL pmc_send_to_child( child_id, coord_x, nx+1+2*nbgp, 0, 24,       &
+                                   ierr )
+          CALL pmc_send_to_child( child_id, coord_y, ny+1+2*nbgp, 0, 25,       &
+                                   ierr )
+!
+!--       Also send the dzu-, dzw-, zu- and zw-arrays here
+          CALL pmc_send_to_child( child_id, dzu, nz_cl+1, 0, 26, ierr )
+          CALL pmc_send_to_child( child_id, dzw, nz_cl+1, 0, 27, ierr )
+          CALL pmc_send_to_child( child_id, zu,  nz_cl+2, 0, 28, ierr )
+          CALL pmc_send_to_child( child_id, zw,  nz_cl+2, 0, 29, ierr )
+
+       ENDIF
+
+       CALL MPI_BCAST( nomatch, 1, MPI_INTEGER, 0, comm2d, ierr )
+       IF ( nomatch /= 0 )  THEN
+          WRITE ( message_string, * )  'nested child domain does ',            &
+                                       'not fit into its parent domain'
+          CALL message( 'pmci_setup_parent', 'PA0425', 3, 2, 0, 6, 0 )
+       ENDIF
+  
+       CALL MPI_BCAST( nest_overlap, 1, MPI_INTEGER, 0, comm2d, ierr )
+       IF ( nest_overlap /= 0  .AND.  nesting_mode /= 'vertical' )  THEN
+          WRITE ( message_string, * )  'nested parallel child domains overlap'
+          CALL message( 'pmci_setup_parent', 'PA0426', 3, 2, 0, 6, 0 )
+       ENDIF
+      
+       CALL MPI_BCAST( nz_cl, 1, MPI_INTEGER, 0, comm2d, ierr )
+
+       CALL MPI_BCAST( childgrid(m), STORAGE_SIZE(childgrid(1))/8, MPI_BYTE, 0, comm2d, ierr )
+!
+!--    TO_DO: Klaus: please give a comment what is done here
+       CALL pmci_create_index_list
+!
+!--    Include couple arrays into parent content
+!--    The adresses of the PALM 2D or 3D array (here server coarse grid) which are candidates
+!--    for coupling are stored once into the pmc context. While data transfer, the array do not
+!--    have to be specified again
+
+       CALL pmc_s_clear_next_array_list
+       DO  WHILE ( pmc_s_getnextarray( child_id, myname ) )
+          IF ( INDEX( TRIM( myname ), 'chem_' ) /= 0 )  THEN             
+             CALL pmci_set_array_pointer( myname, child_id = child_id,         &
+                                          nz_cl = nz_cl, n = n )
+             n = n + 1
+          ELSE
+             CALL pmci_set_array_pointer( myname, child_id = child_id,         &
+                                          nz_cl = nz_cl )
+          ENDIF
+       ENDDO
+
+       CALL pmc_s_setind_and_allocmem( child_id )
+    ENDDO
+
+    IF ( ( SIZE( pmc_parent_for_child ) - 1 > 0 ) .AND. myid == 0 )  THEN 
+       DEALLOCATE( ch_xl )
+       DEALLOCATE( ch_xr )
+       DEALLOCATE( ch_ys )
+       DEALLOCATE( ch_yn )
+    ENDIF
+
+ CONTAINS
+
+
+   SUBROUTINE pmci_create_index_list
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                  !<
+       INTEGER(iwp) ::  ic                 !<
+       INTEGER(iwp) ::  ierr               !<
+       INTEGER(iwp) ::  j                  !<
+       INTEGER(iwp) ::  k                  !<
+       INTEGER(iwp) ::  npx                !<
+       INTEGER(iwp) ::  npy                !<
+       INTEGER(iwp) ::  nrx                !<
+       INTEGER(iwp) ::  nry                !<
+       INTEGER(iwp) ::  px                 !<
+       INTEGER(iwp) ::  py                 !<
+       INTEGER(iwp) ::  parent_pe          !<
+
+       INTEGER(iwp), DIMENSION(2) ::  scoord             !<
+       INTEGER(iwp), DIMENSION(2) ::  size_of_array      !<
+
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE  ::  coarse_bound_all   !<
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE  ::  index_list         !<
+
+       IF ( myid == 0 )  THEN
+!          
+!--       TO_DO: Klaus: give more specific comment what size_of_array stands for
+          CALL pmc_recv_from_child( child_id, size_of_array, 2, 0, 40, ierr )
+          ALLOCATE( coarse_bound_all(size_of_array(1),size_of_array(2)) )
+          CALL pmc_recv_from_child( child_id, coarse_bound_all,                &
+                                    SIZE( coarse_bound_all ), 0, 41, ierr )
+!
+!--       Compute size of index_list.
+          ic = 0         
+          DO  k = 1, size_of_array(2)
+             ic = ic + ( coarse_bound_all(4,k) - coarse_bound_all(3,k) + 1 ) * &
+                       ( coarse_bound_all(2,k) - coarse_bound_all(1,k) + 1 )
+          ENDDO
+
+          ALLOCATE( index_list(6,ic) )
+
+          CALL MPI_COMM_SIZE( comm1dx, npx, ierr )
+          CALL MPI_COMM_SIZE( comm1dy, npy, ierr )
+!
+!--       The +1 in index is because PALM starts with nx=0
+          nrx = nxr - nxl + 1
+          nry = nyn - nys + 1
+          ic  = 0
+!
+!--       Loop over all children PEs
+          DO  k = 1, size_of_array(2)
+!
+!--          Area along y required by actual child PE
+             DO  j = coarse_bound_all(3,k), coarse_bound_all(4,k)
+!
+!--             Area along x required by actual child PE
+                DO  i = coarse_bound_all(1,k), coarse_bound_all(2,k)
+
+                   px = i / nrx
+                   py = j / nry
+                   scoord(1) = px
+                   scoord(2) = py
+                   CALL MPI_CART_RANK( comm2d, scoord, parent_pe, ierr )
+                  
+                   ic = ic + 1
+!
+!--                First index in parent array
+                   index_list(1,ic) = i - ( px * nrx ) + 1 + nbgp
+!
+!--                Second index in parent array
+                   index_list(2,ic) = j - ( py * nry ) + 1 + nbgp
+!
+!--                x index of child coarse grid
+                   index_list(3,ic) = i - coarse_bound_all(1,k) + 1
+!
+!--                y index of child coarse grid
+                   index_list(4,ic) = j - coarse_bound_all(3,k) + 1
+!
+!--                PE number of child
+                   index_list(5,ic) = k - 1
+!
+!--                PE number of parent
+                   index_list(6,ic) = parent_pe
+
+                ENDDO
+             ENDDO
+          ENDDO
+!
+!--       TO_DO: Klaus: comment what is done here
+          CALL pmc_s_set_2d_index_list( child_id, index_list(:,1:ic) )
+
+       ELSE
+!
+!--       TO_DO: Klaus: comment why this dummy allocation is required
+          ALLOCATE( index_list(6,1) )
+          CALL pmc_s_set_2d_index_list( child_id, index_list )
+       ENDIF
+
+       DEALLOCATE(index_list)
+
+     END SUBROUTINE pmci_create_index_list
+
+     SUBROUTINE set_child_edge_coords
+        IMPLICIT  NONE
+
+        INTEGER(iwp) :: nbgp_lpm = 1
+
+        nbgp_lpm = min(nbgp_lpm, nbgp)
+
+        childgrid(m)%nx = nx_cl
+        childgrid(m)%ny = ny_cl
+        childgrid(m)%nz = nz_cl
+        childgrid(m)%dx = dx_cl
+        childgrid(m)%dy = dy_cl
+        childgrid(m)%dz = dz_cl
+
+        childgrid(m)%lx_coord   = cl_coord_x(0)
+        childgrid(m)%lx_coord_b = cl_coord_x(-nbgp_lpm)
+        childgrid(m)%rx_coord   = cl_coord_x(nx_cl)+dx_cl
+        childgrid(m)%rx_coord_b = cl_coord_x(nx_cl+nbgp_lpm)+dx_cl
+        childgrid(m)%sy_coord   = cl_coord_y(0)
+        childgrid(m)%sy_coord_b = cl_coord_y(-nbgp_lpm)
+        childgrid(m)%ny_coord   = cl_coord_y(ny_cl)+dy_cl
+        childgrid(m)%ny_coord_b = cl_coord_y(ny_cl+nbgp_lpm)+dy_cl
+        childgrid(m)%uz_coord   = zmax_coarse(2)
+        childgrid(m)%uz_coord_b = zmax_coarse(1)
+
+     END SUBROUTINE set_child_edge_coords
+
+#endif
+ END SUBROUTINE pmci_setup_parent
+
+
+
+ SUBROUTINE pmci_setup_child
+
+
+#if defined( __parallel )
+    IMPLICIT NONE
+
+    CHARACTER(LEN=da_namelen) ::  myname     !<
+
+    INTEGER(iwp) ::  i          !<
+    INTEGER(iwp) ::  ierr       !<
+    INTEGER(iwp) ::  icl        !<
+    INTEGER(iwp) ::  icr        !<
+    INTEGER(iwp) ::  j          !<
+    INTEGER(iwp) ::  jcn        !<
+    INTEGER(iwp) ::  jcs        !<
+    INTEGER(iwp) ::  n          !< running index for number of chemical species
+
+    INTEGER(iwp), DIMENSION(5) ::  val        !<
+    
+    REAL(wp) ::  xcs        !<
+    REAL(wp) ::  xce        !<
+    REAL(wp) ::  ycs        !<
+    REAL(wp) ::  yce        !<
+
+    REAL(wp), DIMENSION(5) ::  fval       !<
+                                             
+!
+!-- Child setup
+!-- Root model does not have a parent and is not a child, therefore no child setup on root model
+
+    IF ( .NOT. pmc_is_rootmodel() )  THEN
+
+       CALL pmc_childinit
+!
+!--    Here AND ONLY HERE the arrays are defined, which actualy will be
+!--    exchanged between child and parent.
+!--    If a variable is removed, it only has to be removed from here.
+!--    Please check, if the arrays are in the list of POSSIBLE exchange arrays
+!--    in subroutines:
+!--    pmci_set_array_pointer (for parent arrays)
+!--    pmci_create_child_arrays (for child arrays)
+       CALL pmc_set_dataarray_name( 'coarse', 'u'  ,'fine', 'u',  ierr )
+       CALL pmc_set_dataarray_name( 'coarse', 'v'  ,'fine', 'v',  ierr )
+       CALL pmc_set_dataarray_name( 'coarse', 'w'  ,'fine', 'w',  ierr )
+!
+!--    Set data array name for TKE. Please note, nesting of TKE is actually
+!--    only done if both parent and child are in LES or in RANS mode. Due to 
+!--    design of model coupler, however, data array names must be already 
+!--    available at this point.
+       CALL pmc_set_dataarray_name( 'coarse', 'e'  ,'fine', 'e',  ierr )
+!
+!--    Nesting of dissipation rate only if both parent and child are in RANS
+!--    mode and TKE-epsilo closure is applied. Please so also comment for TKE
+!--    above.
+       CALL pmc_set_dataarray_name( 'coarse', 'diss'  ,'fine', 'diss',  ierr )
+
+       IF ( .NOT. neutral )  THEN
+          CALL pmc_set_dataarray_name( 'coarse', 'pt' ,'fine', 'pt', ierr )
+       ENDIF
+
+       IF ( humidity )  THEN
+
+          CALL pmc_set_dataarray_name( 'coarse', 'q'  ,'fine', 'q',  ierr )
+
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+            CALL pmc_set_dataarray_name( 'coarse', 'qc'  ,'fine', 'qc',  ierr )  
+            CALL pmc_set_dataarray_name( 'coarse', 'nc'  ,'fine', 'nc',  ierr ) 
+          ENDIF
+
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             CALL pmc_set_dataarray_name( 'coarse', 'qr'  ,'fine', 'qr',  ierr )
+             CALL pmc_set_dataarray_name( 'coarse', 'nr'  ,'fine', 'nr',  ierr ) 
+          ENDIF
+     
+       ENDIF
+
+       IF ( passive_scalar )  THEN
+          CALL pmc_set_dataarray_name( 'coarse', 's'  ,'fine', 's',  ierr )
+       ENDIF
+
+       IF( particle_advection )  THEN
+          CALL pmc_set_dataarray_name( 'coarse', 'nr_part'  ,'fine',           &
+               'nr_part',  ierr )
+          CALL pmc_set_dataarray_name( 'coarse', 'part_adr'  ,'fine',          &
+               'part_adr',  ierr )
+       ENDIF
+       
+       IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+          DO  n = 1, nspec
+             CALL pmc_set_dataarray_name( 'coarse',                            &
+                                          'chem_' //                           &
+                                          TRIM( chem_species(n)%name ),        &
+                                         'fine',                               &
+                                          'chem_' //                           &
+                                          TRIM( chem_species(n)%name ),        &
+                                          ierr )
+          ENDDO 
+       ENDIF
+
+       CALL pmc_set_dataarray_name( lastentry = .TRUE. )
+!
+!--    Send grid to parent
+       val(1)  = nx
+       val(2)  = ny
+       val(3)  = nz
+       val(4)  = dx
+       val(5)  = dy
+       fval(1) = zw(nzt+1)
+       fval(2) = zw(nzt)
+       fval(3) = dx
+       fval(4) = dy
+       fval(5) = dz(1)
+
+       IF ( myid == 0 )  THEN
+
+          CALL pmc_send_to_parent( val, SIZE( val ), 0, 123, ierr )
+          CALL pmc_send_to_parent( fval, SIZE( fval ), 0, 124, ierr )
+          CALL pmc_send_to_parent( coord_x, nx + 1 + 2 * nbgp, 0, 11, ierr )
+          CALL pmc_send_to_parent( coord_y, ny + 1 + 2 * nbgp, 0, 12, ierr )
+
+          CALL pmc_recv_from_parent( rans_mode_parent, 1, 0, 19, ierr )
+!
+!
+!--       Receive Coarse grid information.
+          CALL pmc_recv_from_parent( parent_grid_info_real,                    &
+                                     SIZE(parent_grid_info_real), 0, 21, ierr )
+          CALL pmc_recv_from_parent( parent_grid_info_int,  3, 0, 22, ierr )
+!
+!--        Debug-printouts - keep them
+!           WRITE(0,*) 'Coarse grid from parent '
+!           WRITE(0,*) 'startx_tot    = ',parent_grid_info_real(1)
+!           WRITE(0,*) 'starty_tot    = ',parent_grid_info_real(2)
+!           WRITE(0,*) 'endx_tot      = ',parent_grid_info_real(5)
+!           WRITE(0,*) 'endy_tot      = ',parent_grid_info_real(6)
+!           WRITE(0,*) 'dx            = ',parent_grid_info_real(3)
+!           WRITE(0,*) 'dy            = ',parent_grid_info_real(4)
+!           WRITE(0,*) 'dz            = ',parent_grid_info_real(7)
+!           WRITE(0,*) 'nx_coarse     = ',parent_grid_info_int(1)
+!           WRITE(0,*) 'ny_coarse     = ',parent_grid_info_int(2)
+!           WRITE(0,*) 'nz_coarse     = ',parent_grid_info_int(3)
+       ENDIF
+
+       CALL MPI_BCAST( parent_grid_info_real, SIZE(parent_grid_info_real),     &
+                       MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( parent_grid_info_int, 3, MPI_INTEGER, 0, comm2d, ierr )
+
+       cg%dx = parent_grid_info_real(3)
+       cg%dy = parent_grid_info_real(4)
+       cg%dz = parent_grid_info_real(7)
+       cg%nx = parent_grid_info_int(1)
+       cg%ny = parent_grid_info_int(2)
+       cg%nz = parent_grid_info_int(3)
+!
+!--    Get parent coordinates on coarse grid
+       ALLOCATE( cg%coord_x(-nbgp:cg%nx+nbgp) )
+       ALLOCATE( cg%coord_y(-nbgp:cg%ny+nbgp) )
+      
+       ALLOCATE( cg%dzu(1:cg%nz+1) )
+       ALLOCATE( cg%dzw(1:cg%nz+1) )
+       ALLOCATE( cg%zu(0:cg%nz+1) )
+       ALLOCATE( cg%zw(0:cg%nz+1) )
+!
+!--    Get coarse grid coordinates and values of the z-direction from the parent
+       IF ( myid == 0)  THEN
+
+          CALL pmc_recv_from_parent( cg%coord_x, cg%nx+1+2*nbgp, 0, 24, ierr )
+          CALL pmc_recv_from_parent( cg%coord_y, cg%ny+1+2*nbgp, 0, 25, ierr )
+          CALL pmc_recv_from_parent( cg%dzu, cg%nz + 1, 0, 26, ierr )
+          CALL pmc_recv_from_parent( cg%dzw, cg%nz + 1, 0, 27, ierr )
+          CALL pmc_recv_from_parent( cg%zu, cg%nz + 2, 0, 28, ierr )
+          CALL pmc_recv_from_parent( cg%zw, cg%nz + 2, 0, 29, ierr )
+
+       ENDIF
+!
+!--    Broadcast this information
+       CALL MPI_BCAST( cg%coord_x, cg%nx+1+2*nbgp, MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( cg%coord_y, cg%ny+1+2*nbgp, MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( cg%dzu, cg%nz+1, MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( cg%dzw, cg%nz+1, MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( cg%zu, cg%nz+2,  MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( cg%zw, cg%nz+2,  MPI_REAL, 0, comm2d, ierr )
+       CALL MPI_BCAST( rans_mode_parent, 1, MPI_LOGICAL, 0, comm2d, ierr )
+  
+!
+!--    Find the index bounds for the nest domain in the coarse-grid index space
+       CALL pmci_map_fine_to_coarse_grid
+!
+!--    TO_DO: Klaus give a comment what is happening here
+       CALL pmc_c_get_2d_index_list
+!
+!--    Include couple arrays into child content
+!--    TO_DO: Klaus: better explain the above comment (what is child content?)
+       CALL  pmc_c_clear_next_array_list
+
+       n = 1
+       DO  WHILE ( pmc_c_getnextarray( myname ) )
+!--       Note that cg%nz is not the original nz of parent, but the highest
+!--       parent-grid level needed for nesting.
+!--       Please note, in case of chemical species an additional parameter
+!--       need to be passed, which is required to set the pointer correctly
+!--       to the chemical-species data structure. Hence, first check if current
+!--       variable is a chemical species. If so, pass index id of respective
+!--       species and increment this subsequently.
+          IF ( INDEX( TRIM( myname ), 'chem_' ) /= 0 )  THEN             
+             CALL pmci_create_child_arrays ( myname, icl, icr, jcs, jcn, cg%nz, n )
+             n = n + 1
+          ELSE
+             CALL pmci_create_child_arrays ( myname, icl, icr, jcs, jcn, cg%nz )
+          ENDIF
+       ENDDO
+       CALL pmc_c_setind_and_allocmem
+!
+!--    Precompute interpolation coefficients and child-array indices
+       CALL pmci_init_interp_tril
+!
+!--    Precompute the log-law correction index- and ratio-arrays 
+       IF ( constant_flux_layer )  THEN
+          CALL pmci_init_loglaw_correction
+       ENDIF
+!
+!--    Define the SGS-TKE scaling factor based on the grid-spacing ratio. Only
+!--    if both parent and child are in LES mode or in RANS mode. 
+!--    Please note, in case parent and child are in RANS mode, TKE weighting 
+!--    factor is simply one. 
+       IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.         &
+            (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.          &
+               .NOT. constant_diffusion ) )  CALL pmci_init_tkefactor
+!
+!--    Two-way coupling for general and vertical nesting.
+!--    Precompute the index arrays and relaxation functions for the
+!--    anterpolation
+       IF ( TRIM( nesting_mode ) == 'two-way' .OR.                             &
+                  nesting_mode == 'vertical' )  THEN
+          CALL pmci_init_anterp_tophat
+       ENDIF
+!
+!--    Finally, compute the total area of the top-boundary face of the domain.
+!--    This is needed in the pmc_ensure_nest_mass_conservation      
+       area_t = ( nx + 1 ) * (ny + 1 ) * dx * dy
+
+    ENDIF
+
+ CONTAINS
+
+
+    SUBROUTINE pmci_map_fine_to_coarse_grid
+!
+!--    Determine index bounds of interpolation/anterpolation area in the coarse
+!--    grid index space
+       IMPLICIT NONE
+
+       INTEGER(iwp), DIMENSION(5,numprocs) ::  coarse_bound_all   !<
+       INTEGER(iwp), DIMENSION(2)          ::  size_of_array      !<
+                                              
+       REAL(wp) ::  loffset     !<
+       REAL(wp) ::  noffset     !<
+       REAL(wp) ::  roffset     !<
+       REAL(wp) ::  soffset     !<
+
+!
+!--    If the fine- and coarse grid nodes do not match:
+       loffset = MOD( coord_x(nxl), cg%dx )
+       xexl    = cg%dx + loffset
+!
+!--    This is needed in the anterpolation phase
+       nhll = CEILING( xexl / cg%dx )
+       xcs  = coord_x(nxl) - xexl
+       DO  i = 0, cg%nx
+          IF ( cg%coord_x(i) > xcs )  THEN
+             icl = MAX( -1, i-1 )
+             EXIT
+          ENDIF
+       ENDDO
+!
+!--    If the fine- and coarse grid nodes do not match
+       roffset = MOD( coord_x(nxr+1), cg%dx )
+       xexr    = cg%dx + roffset
+!
+!--    This is needed in the anterpolation phase
+       nhlr = CEILING( xexr / cg%dx )
+       xce  = coord_x(nxr+1) + xexr
+!--    One "extra" layer is taken behind the right boundary 
+!--    because it may be needed in cases of non-integer grid-spacing ratio
+       DO  i = cg%nx, 0 , -1
+          IF ( cg%coord_x(i) < xce )  THEN
+             icr = MIN( cg%nx+1, i+1 )
+             EXIT
+          ENDIF
+       ENDDO
+!
+!--    If the fine- and coarse grid nodes do not match
+       soffset = MOD( coord_y(nys), cg%dy )
+       yexs    = cg%dy + soffset
+!
+!--    This is needed in the anterpolation phase
+       nhls = CEILING( yexs / cg%dy )
+       ycs  = coord_y(nys) - yexs
+       DO  j = 0, cg%ny
+          IF ( cg%coord_y(j) > ycs )  THEN
+             jcs = MAX( -nbgp, j-1 )
+             EXIT
+          ENDIF
+       ENDDO
+!
+!--    If the fine- and coarse grid nodes do not match
+       noffset = MOD( coord_y(nyn+1), cg%dy )
+       yexn    = cg%dy + noffset
+!
+!--    This is needed in the anterpolation phase
+       nhln = CEILING( yexn / cg%dy )
+       yce  = coord_y(nyn+1) + yexn
+!--    One "extra" layer is taken behind the north boundary 
+!--    because it may be needed in cases of non-integer grid-spacing ratio
+       DO  j = cg%ny, 0, -1
+          IF ( cg%coord_y(j) < yce )  THEN
+             jcn = MIN( cg%ny + nbgp, j+1 )
+             EXIT
+          ENDIF
+       ENDDO
+
+       coarse_bound(1) = icl
+       coarse_bound(2) = icr
+       coarse_bound(3) = jcs
+       coarse_bound(4) = jcn
+       coarse_bound(5) = myid
+!
+!--    Note that MPI_Gather receives data from all processes in the rank order
+!--    TO_DO: refer to the line where this fact becomes important
+       CALL MPI_GATHER( coarse_bound, 5, MPI_INTEGER, coarse_bound_all, 5,     &
+                        MPI_INTEGER, 0, comm2d, ierr )
+
+       IF ( myid == 0 )  THEN
+          size_of_array(1) = SIZE( coarse_bound_all, 1 )
+          size_of_array(2) = SIZE( coarse_bound_all, 2 )
+          CALL pmc_send_to_parent( size_of_array, 2, 0, 40, ierr )
+          CALL pmc_send_to_parent( coarse_bound_all, SIZE( coarse_bound_all ), &
+                                   0, 41, ierr )
+       ENDIF
+
+    END SUBROUTINE pmci_map_fine_to_coarse_grid
+
+
+
+    SUBROUTINE pmci_init_interp_tril
+!
+!--    Precomputation of the interpolation coefficients and child-array indices
+!--    to be used by the interpolation routines interp_tril_lr, interp_tril_ns
+!--    and interp_tril_t.
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i       !<
+       INTEGER(iwp) ::  j       !<
+       INTEGER(iwp) ::  k       !<
+       INTEGER(iwp) ::  kc      !<
+       INTEGER(iwp) ::  kdzo    !<
+       INTEGER(iwp) ::  kdzw    !<       
+
+       REAL(wp) ::  xb          !<
+       REAL(wp) ::  xcsu        !<
+       REAL(wp) ::  xfso        !<
+       REAL(wp) ::  xcso        !<
+       REAL(wp) ::  xfsu        !<
+       REAL(wp) ::  yb          !<
+       REAL(wp) ::  ycso        !<
+       REAL(wp) ::  ycsv        !<
+       REAL(wp) ::  yfso        !<
+       REAL(wp) ::  yfsv        !<
+       REAL(wp) ::  zcso        !<
+       REAL(wp) ::  zcsw        !<
+       REAL(wp) ::  zfso        !<
+       REAL(wp) ::  zfsw        !<
+      
+
+       xb = nxl * dx
+       yb = nys * dy
+      
+       ALLOCATE( icu(nxlg:nxrg) )
+       ALLOCATE( ico(nxlg:nxrg) )
+       ALLOCATE( jcv(nysg:nyng) )
+       ALLOCATE( jco(nysg:nyng) )
+       ALLOCATE( kcw(nzb:nzt+1) )
+       ALLOCATE( kco(nzb:nzt+1) )
+       ALLOCATE( r1xu(nxlg:nxrg) )
+       ALLOCATE( r2xu(nxlg:nxrg) )
+       ALLOCATE( r1xo(nxlg:nxrg) )
+       ALLOCATE( r2xo(nxlg:nxrg) )
+       ALLOCATE( r1yv(nysg:nyng) )
+       ALLOCATE( r2yv(nysg:nyng) )
+       ALLOCATE( r1yo(nysg:nyng) )
+       ALLOCATE( r2yo(nysg:nyng) )
+       ALLOCATE( r1zw(nzb:nzt+1) )
+       ALLOCATE( r2zw(nzb:nzt+1) )
+       ALLOCATE( r1zo(nzb:nzt+1) )
+       ALLOCATE( r2zo(nzb:nzt+1) )
+!
+!--    Note that the node coordinates xfs... and xcs... are relative to the
+!--    lower-left-bottom corner of the fc-array, not the actual child domain
+!--    corner
+       DO  i = nxlg, nxrg
+          xfsu    = coord_x(i) - ( lower_left_coord_x + xb - xexl )
+          xfso    = coord_x(i) + 0.5_wp * dx - ( lower_left_coord_x + xb - xexl )
+          icu(i)  = icl + FLOOR( xfsu / cg%dx )
+          ico(i)  = icl + FLOOR( ( xfso - 0.5_wp * cg%dx ) / cg%dx )
+          xcsu    = ( icu(i) - icl ) * cg%dx
+          xcso    = ( ico(i) - icl ) * cg%dx + 0.5_wp * cg%dx
+          r2xu(i) = ( xfsu - xcsu ) / cg%dx
+          r2xo(i) = ( xfso - xcso ) / cg%dx
+          r1xu(i) = 1.0_wp - r2xu(i)
+          r1xo(i) = 1.0_wp - r2xo(i)
+       ENDDO
+
+       DO  j = nysg, nyng
+          yfsv    = coord_y(j) - ( lower_left_coord_y + yb - yexs )
+          yfso    = coord_y(j) + 0.5_wp * dy - ( lower_left_coord_y + yb - yexs )
+          jcv(j)  = jcs + FLOOR( yfsv / cg%dy )
+          jco(j)  = jcs + FLOOR( ( yfso -0.5_wp * cg%dy ) / cg%dy )
+          ycsv    = ( jcv(j) - jcs ) * cg%dy
+          ycso    = ( jco(j) - jcs ) * cg%dy + 0.5_wp * cg%dy
+          r2yv(j) = ( yfsv - ycsv ) / cg%dy
+          r2yo(j) = ( yfso - ycso ) / cg%dy
+          r1yv(j) = 1.0_wp - r2yv(j)
+          r1yo(j) = 1.0_wp - r2yo(j)
+       ENDDO
+
+       DO  k = nzb, nzt + 1
+          zfsw = zw(k)
+          zfso = zu(k)
+
+          DO kc = 0, cg%nz+1
+             IF ( cg%zw(kc) > zfsw )  EXIT
+          ENDDO
+          kcw(k) = kc - 1
+          
+          DO kc = 0, cg%nz+1
+             IF ( cg%zu(kc) > zfso )  EXIT
+          ENDDO
+          kco(k) = kc - 1
+
+          zcsw    = cg%zw(kcw(k))
+          zcso    = cg%zu(kco(k))
+          kdzw    = MIN( kcw(k)+1, cg%nz+1 )
+          kdzo    = MIN( kco(k)+1, cg%nz+1 )
+          r2zw(k) = ( zfsw - zcsw ) / cg%dzw(kdzw)
+          r2zo(k) = ( zfso - zcso ) / cg%dzu(kdzo)
+          r1zw(k) = 1.0_wp - r2zw(k)
+          r1zo(k) = 1.0_wp - r2zo(k)
+       ENDDO
+      
+    END SUBROUTINE pmci_init_interp_tril
+
+
+
+    SUBROUTINE pmci_init_loglaw_correction
+!
+!--    Precomputation of the index and log-ratio arrays for the log-law
+!--    corrections for near-wall nodes after the nest-BC interpolation.
+!--    These are used by the interpolation routines interp_tril_lr and
+!--    interp_tril_ns.
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  direction      !< Wall normal index: 1=k, 2=j, 3=i.
+       INTEGER(iwp) ::  dum            !< dummy value for reduce operation
+       INTEGER(iwp) ::  i              !<
+       INTEGER(iwp) ::  ierr           !< MPI status
+       INTEGER(iwp) ::  inc            !< Wall outward-normal index increment -1
+                                       !< or 1, for direction=1, inc=1 always
+       INTEGER(iwp) ::  j              !<
+       INTEGER(iwp) ::  k              !<
+       INTEGER(iwp) ::  k_wall_u_ji    !< topography top index on u-grid
+       INTEGER(iwp) ::  k_wall_u_ji_p  !< topography top index on u-grid
+       INTEGER(iwp) ::  k_wall_u_ji_m  !< topography top index on u-grid
+       INTEGER(iwp) ::  k_wall_v_ji    !< topography top index on v-grid
+       INTEGER(iwp) ::  k_wall_v_ji_p  !< topography top index on v-grid
+       INTEGER(iwp) ::  k_wall_v_ji_m  !< topography top index on v-grid
+       INTEGER(iwp) ::  k_wall_w_ji    !< topography top index on w-grid
+       INTEGER(iwp) ::  k_wall_w_ji_p  !< topography top index on w-grid
+       INTEGER(iwp) ::  k_wall_w_ji_m  !< topography top index on w-grid
+       INTEGER(iwp) ::  kb             !<
+       INTEGER(iwp) ::  lc             !<
+       INTEGER(iwp) ::  ni             !<
+       INTEGER(iwp) ::  nj             !<
+       INTEGER(iwp) ::  nk             !<
+       INTEGER(iwp) ::  nzt_topo_max   !<
+       INTEGER(iwp) ::  wall_index     !<  Index of the wall-node coordinate
+
+       REAL(wp)     ::  z0_topo      !<  roughness at vertical walls
+       REAL(wp), ALLOCATABLE, DIMENSION(:) ::  lcr   !<
+
+!
+!--    First determine the maximum k-index needed for the near-wall corrections.
+!--    This maximum is individual for each boundary to minimize the storage
+!--    requirements and to minimize the corresponding loop k-range in the
+!--    interpolation routines.
+       nzt_topo_nestbc_l = nzb
+       IF ( bc_dirichlet_l )  THEN
+          DO  i = nxl-1, nxl
+             DO  j = nys, nyn
+!
+!--             Concept need to be reconsidered for 3D-topography
+!--             Determine largest topography index on scalar grid
+                nzt_topo_nestbc_l = MAX( nzt_topo_nestbc_l,                    &
+                                    get_topography_top_index_ji( j, i, 's' ) )
+!
+!--             Determine largest topography index on u grid
+                nzt_topo_nestbc_l = MAX( nzt_topo_nestbc_l,                    &
+                                    get_topography_top_index_ji( j, i, 'u' ) )
+!
+!--             Determine largest topography index on v grid
+                nzt_topo_nestbc_l = MAX( nzt_topo_nestbc_l,                    &
+                                    get_topography_top_index_ji( j, i, 'v' ) )
+!
+!--             Determine largest topography index on w grid
+                nzt_topo_nestbc_l = MAX( nzt_topo_nestbc_l,                    &
+                                    get_topography_top_index_ji( j, i, 'w' ) )
+             ENDDO
+          ENDDO
+          nzt_topo_nestbc_l = nzt_topo_nestbc_l + 1
+       ENDIF
+      
+       nzt_topo_nestbc_r = nzb
+       IF ( bc_dirichlet_r )  THEN
+          i = nxr + 1
+          DO  j = nys, nyn
+!
+!--             Concept need to be reconsidered for 3D-topography
+!--             Determine largest topography index on scalar grid
+                nzt_topo_nestbc_r = MAX( nzt_topo_nestbc_r,                    &
+                                    get_topography_top_index_ji( j, i, 's' ) )
+!
+!--             Determine largest topography index on u grid
+                nzt_topo_nestbc_r = MAX( nzt_topo_nestbc_r,                    &
+                                    get_topography_top_index_ji( j, i, 'u' ) )
+!
+!--             Determine largest topography index on v grid
+                nzt_topo_nestbc_r = MAX( nzt_topo_nestbc_r,                    &
+                                    get_topography_top_index_ji( j, i, 'v' ) )
+!
+!--             Determine largest topography index on w grid
+                nzt_topo_nestbc_r = MAX( nzt_topo_nestbc_r,                    &
+                                    get_topography_top_index_ji( j, i, 'w' ) )
+          ENDDO
+          nzt_topo_nestbc_r = nzt_topo_nestbc_r + 1
+       ENDIF
+
+       nzt_topo_nestbc_s = nzb
+       IF ( bc_dirichlet_s )  THEN
+          DO  j = nys-1, nys
+             DO  i = nxl, nxr
+!
+!--             Concept need to be reconsidered for 3D-topography
+!--             Determine largest topography index on scalar grid
+                nzt_topo_nestbc_s = MAX( nzt_topo_nestbc_s,                    &
+                                    get_topography_top_index_ji( j, i, 's' ) )
+!
+!--             Determine largest topography index on u grid
+                nzt_topo_nestbc_s = MAX( nzt_topo_nestbc_s,                    &
+                                    get_topography_top_index_ji( j, i, 'u' ) )
+!
+!--             Determine largest topography index on v grid
+                nzt_topo_nestbc_s = MAX( nzt_topo_nestbc_s,                    &
+                                    get_topography_top_index_ji( j, i, 'v' ) )
+!
+!--             Determine largest topography index on w grid
+                nzt_topo_nestbc_s = MAX( nzt_topo_nestbc_s,                    &
+                                    get_topography_top_index_ji( j, i, 'w' ) )
+             ENDDO
+          ENDDO
+          nzt_topo_nestbc_s = nzt_topo_nestbc_s + 1
+       ENDIF
+
+       nzt_topo_nestbc_n = nzb
+       IF ( bc_dirichlet_n )  THEN
+          j = nyn + 1
+          DO  i = nxl, nxr
+!
+!--             Concept need to be reconsidered for 3D-topography
+!--             Determine largest topography index on scalar grid
+                nzt_topo_nestbc_n = MAX( nzt_topo_nestbc_n,                    &
+                                    get_topography_top_index_ji( j, i, 's' ) )
+!
+!--             Determine largest topography index on u grid
+                nzt_topo_nestbc_n = MAX( nzt_topo_nestbc_n,                    &
+                                    get_topography_top_index_ji( j, i, 'u' ) )
+!
+!--             Determine largest topography index on v grid
+                nzt_topo_nestbc_n = MAX( nzt_topo_nestbc_n,                    &
+                                    get_topography_top_index_ji( j, i, 'v' ) )
+!
+!--             Determine largest topography index on w grid
+                nzt_topo_nestbc_n = MAX( nzt_topo_nestbc_n,                    &
+                                    get_topography_top_index_ji( j, i, 'w' ) )
+          ENDDO
+          nzt_topo_nestbc_n = nzt_topo_nestbc_n + 1
+       ENDIF
+
+#if defined( __parallel )
+!
+!--       Determine global topography-top index along child boundary. 
+          dum = nzb
+          CALL MPI_ALLREDUCE( nzt_topo_nestbc_l, dum, 1, MPI_INTEGER,          &
+                              MPI_MAX, comm1dy, ierr )
+          nzt_topo_nestbc_l = dum
+
+          dum = nzb
+          CALL MPI_ALLREDUCE( nzt_topo_nestbc_r, dum, 1, MPI_INTEGER,          &
+                              MPI_MAX, comm1dy, ierr )
+          nzt_topo_nestbc_r = dum
+
+          dum = nzb
+          CALL MPI_ALLREDUCE( nzt_topo_nestbc_n, dum, 1, MPI_INTEGER,          &
+                              MPI_MAX, comm1dx, ierr )
+          nzt_topo_nestbc_n = dum
+
+          dum = nzb
+          CALL MPI_ALLREDUCE( nzt_topo_nestbc_s, dum, 1, MPI_INTEGER,          &
+                              MPI_MAX, comm1dx, ierr )
+          nzt_topo_nestbc_s = dum
+#endif
+!
+!--    Then determine the maximum number of near-wall nodes per wall point based
+!--    on the grid-spacing ratios.
+       nzt_topo_max = MAX( nzt_topo_nestbc_l, nzt_topo_nestbc_r,               &
+                           nzt_topo_nestbc_s, nzt_topo_nestbc_n )
+!
+!--    Note that the outer division must be integer division.
+       ni = CEILING( cg%dx / dx ) / 2
+       nj = CEILING( cg%dy / dy ) / 2
+       nk = 1
+       DO  k = 1, nzt_topo_max
+          nk = MAX( nk, CEILING( cg%dzu(kco(k)+1) / dzu(k) ) )
+       ENDDO
+       nk = nk / 2   !  Note that this must be integer division.
+       ncorr =  MAX( ni, nj, nk )
+
+       ALLOCATE( lcr(0:ncorr-1) )
+       lcr = 1.0_wp
+
+       z0_topo = roughness_length
+!
+!--    First horizontal walls. Note that also logc_w_? and logc_ratio_w_? and
+!--    logc_kbounds_* need to be allocated and initialized here.
+!--    Left boundary
+       IF ( bc_dirichlet_l )  THEN
+
+          ALLOCATE( logc_u_l(1:2,nzb:nzt_topo_nestbc_l,nys:nyn) )
+          ALLOCATE( logc_v_l(1:2,nzb:nzt_topo_nestbc_l,nys:nyn) )
+          ALLOCATE( logc_w_l(1:2,nzb:nzt_topo_nestbc_l,nys:nyn) )
+          ALLOCATE( logc_kbounds_u_l(1:2,nys:nyn) )
+          ALLOCATE( logc_kbounds_v_l(1:2,nys:nyn) )
+          ALLOCATE( logc_kbounds_w_l(1:2,nys:nyn) )
+          ALLOCATE( logc_ratio_u_l(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_l,nys:nyn) )
+          ALLOCATE( logc_ratio_v_l(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_l,nys:nyn) )
+          ALLOCATE( logc_ratio_w_l(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_l,nys:nyn) )
+          logc_u_l       = 0
+          logc_v_l       = 0
+          logc_w_l       = 0
+          logc_ratio_u_l = 1.0_wp
+          logc_ratio_v_l = 1.0_wp
+          logc_ratio_w_l = 1.0_wp
+          direction      = 1
+          inc            = 1
+
+          DO  j = nys, nyn
+!
+!--          Left boundary for u
+             i   = 0
+!
+!--          For loglaw correction the roughness z0 is required. z0, however, 
+!--          is part of the surfacetypes now. Set default roughness instead. 
+!--          Determine topography top index on u-grid
+             kb  = get_topography_top_index_ji( j, i, 'u' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                            j, inc, wall_index, z0_topo,                       &
+                            kb, direction, ncorr )
+
+             logc_u_l(1,k,j) = lc
+             logc_ratio_u_l(1,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+!
+!--          Left boundary for v
+             i   = -1
+!
+!--          Determine topography top index on v-grid
+             kb  = get_topography_top_index_ji( j, i, 'v' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                            j, inc, wall_index, z0_topo,                       &
+                            kb, direction, ncorr )
+
+             logc_v_l(1,k,j) = lc
+             logc_ratio_v_l(1,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+
+          ENDDO
+
+       ENDIF
+!
+!--    Right boundary
+       IF ( bc_dirichlet_r )  THEN
+           
+          ALLOCATE( logc_u_r(1:2,nzb:nzt_topo_nestbc_r,nys:nyn) )
+          ALLOCATE( logc_v_r(1:2,nzb:nzt_topo_nestbc_r,nys:nyn) )
+          ALLOCATE( logc_w_r(1:2,nzb:nzt_topo_nestbc_r,nys:nyn) )          
+          ALLOCATE( logc_kbounds_u_r(1:2,nys:nyn) )
+          ALLOCATE( logc_kbounds_v_r(1:2,nys:nyn) )
+          ALLOCATE( logc_kbounds_w_r(1:2,nys:nyn) )
+          ALLOCATE( logc_ratio_u_r(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_r,nys:nyn) )
+          ALLOCATE( logc_ratio_v_r(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_r,nys:nyn) )
+          ALLOCATE( logc_ratio_w_r(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_r,nys:nyn) )
+          logc_u_r       = 0
+          logc_v_r       = 0
+          logc_w_r       = 0
+          logc_ratio_u_r = 1.0_wp
+          logc_ratio_v_r = 1.0_wp
+          logc_ratio_w_r = 1.0_wp
+          direction      = 1
+          inc            = 1
+
+          DO  j = nys, nyn
+!
+!--          Right boundary for u
+             i   = nxr + 1
+!
+!--          For loglaw correction the roughness z0 is required. z0, however, 
+!--          is part of the surfacetypes now, so call subroutine according
+!--          to the present surface tpye. 
+!--          Determine topography top index on u-grid
+             kb  = get_topography_top_index_ji( j, i, 'u' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                                                 j, inc, wall_index, z0_topo,  &
+                                                 kb, direction, ncorr )
+
+             logc_u_r(1,k,j) = lc
+             logc_ratio_u_r(1,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+!
+!--          Right boundary for v
+             i   = nxr + 1
+!
+!--          Determine topography top index on v-grid
+             kb  = get_topography_top_index_ji( j, i, 'v' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                                                 j, inc, wall_index, z0_topo,  &
+                                                 kb, direction, ncorr )
+
+             logc_v_r(1,k,j) = lc
+             logc_ratio_v_r(1,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+
+          ENDDO
+
+       ENDIF
+!
+!--    South boundary
+       IF ( bc_dirichlet_s )  THEN
+
+          ALLOCATE( logc_u_s(1:2,nzb:nzt_topo_nestbc_s,nxl:nxr) )
+          ALLOCATE( logc_v_s(1:2,nzb:nzt_topo_nestbc_s,nxl:nxr) )
+          ALLOCATE( logc_w_s(1:2,nzb:nzt_topo_nestbc_s,nxl:nxr) )
+          ALLOCATE( logc_kbounds_u_s(1:2,nxl:nxr) )
+          ALLOCATE( logc_kbounds_v_s(1:2,nxl:nxr) )
+          ALLOCATE( logc_kbounds_w_s(1:2,nxl:nxr) )
+          ALLOCATE( logc_ratio_u_s(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_s,nxl:nxr) )
+          ALLOCATE( logc_ratio_v_s(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_s,nxl:nxr) )
+          ALLOCATE( logc_ratio_w_s(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_s,nxl:nxr) )
+          logc_u_s       = 0
+          logc_v_s       = 0
+          logc_w_s       = 0
+          logc_ratio_u_s = 1.0_wp
+          logc_ratio_v_s = 1.0_wp
+          logc_ratio_w_s = 1.0_wp
+          direction      = 1
+          inc            = 1
+
+          DO  i = nxl, nxr
+!
+!--          South boundary for u
+             j   = -1
+!
+!--          Determine topography top index on u-grid
+             kb  = get_topography_top_index_ji( j, i, 'u' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                                                 j, inc, wall_index, z0_topo,  &
+                                                 kb, direction, ncorr )
+
+             logc_u_s(1,k,i) = lc
+             logc_ratio_u_s(1,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+!
+!--          South boundary for v
+             j   = 0
+!
+!--          Determine topography top index on v-grid
+             kb  = get_topography_top_index_ji( j, i, 'v' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                                                 j, inc, wall_index, z0_topo,  &
+                                                 kb, direction, ncorr )
+
+             logc_v_s(1,k,i) = lc
+             logc_ratio_v_s(1,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+
+          ENDDO
+
+       ENDIF
+!
+!--    North boundary
+       IF ( bc_dirichlet_n )  THEN
+
+          ALLOCATE( logc_u_n(1:2,nzb:nzt_topo_nestbc_n,nxl:nxr) )
+          ALLOCATE( logc_v_n(1:2,nzb:nzt_topo_nestbc_n,nxl:nxr) )
+          ALLOCATE( logc_w_n(1:2,nzb:nzt_topo_nestbc_n,nxl:nxr) )
+          ALLOCATE( logc_kbounds_u_n(1:2,nxl:nxr) )
+          ALLOCATE( logc_kbounds_v_n(1:2,nxl:nxr) )
+          ALLOCATE( logc_kbounds_w_n(1:2,nxl:nxr) )
+          ALLOCATE( logc_ratio_u_n(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_n,nxl:nxr) )
+          ALLOCATE( logc_ratio_v_n(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_n,nxl:nxr) )
+          ALLOCATE( logc_ratio_w_n(1:2,0:ncorr-1,nzb:nzt_topo_nestbc_n,nxl:nxr) )
+          logc_u_n       = 0
+          logc_v_n       = 0
+          logc_w_n       = 0
+          logc_ratio_u_n = 1.0_wp
+          logc_ratio_v_n = 1.0_wp
+          logc_ratio_w_n = 1.0_wp
+          direction      = 1
+          inc            = 1
+
+          DO  i = nxl, nxr
+!
+!--          North boundary for u
+             j   = nyn + 1
+!
+!--          Determine topography top index on u-grid
+             kb  = get_topography_top_index_ji( j, i, 'u' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                                                 j, inc, wall_index, z0_topo,  &
+                                                 kb, direction, ncorr )
+
+             logc_u_n(1,k,i) = lc
+             logc_ratio_u_n(1,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+!
+!--          North boundary for v
+             j   = nyn + 1
+!
+!--          Determine topography top index on v-grid
+             kb  = get_topography_top_index_ji( j, i, 'v' )
+             k   = kb + 1
+             wall_index = kb
+
+             CALL pmci_define_loglaw_correction_parameters( lc, lcr, k,        &
+                                                 j, inc, wall_index, z0_topo,  &
+                                                 kb, direction, ncorr )
+             logc_v_n(1,k,i) = lc
+             logc_ratio_v_n(1,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+             lcr(0:ncorr-1) = 1.0_wp
+
+          ENDDO
+
+       ENDIF
+!       
+!--    Then vertical walls and corners if necessary
+       IF ( topography /= 'flat' )  THEN
+!
+!--       Workaround, set z0 at vertical surfaces simply to the given roughness
+!--       lenth, which is required to determine the logarithmic correction 
+!--       factors at the child boundaries, which are at the ghost-points. 
+!--       The surface data type for vertical surfaces, however, is not defined 
+!--       at ghost-points, so that no z0 can be retrieved at this point. 
+!--       Maybe, revise this later and define vertical surface datattype also
+!--       at ghost-points.
+          z0_topo = roughness_length
+
+          kb = 0       ! kb is not used when direction > 1        
+!        
+!--       Left boundary
+          IF ( bc_dirichlet_l )  THEN
+             logc_kbounds_u_l(1:2,nys:nyn) = 0
+             logc_kbounds_v_l(1:2,nys:nyn) = 0             
+             logc_kbounds_w_l(1:2,nys:nyn) = 0
+             
+             direction  = 2
+
+             DO  j = nys, nyn
+!
+!--             Determine the lowest k-indices for u at j,i, j+1,i and j-1,i. 
+                i             = 0
+                k_wall_u_ji   = get_topography_top_index_ji( j,   i, 'u' )
+                k_wall_u_ji_p = get_topography_top_index_ji( j+1, i, 'u' )
+                k_wall_u_ji_m = get_topography_top_index_ji( j-1, i, 'u' )
+!
+!--             Wall for u on the south side.
+                IF ( ( k_wall_u_ji <  k_wall_u_ji_m ) .AND.                    &
+                     ( k_wall_u_ji >= k_wall_u_ji_p ) )  THEN
+                   inc        =  1
+                   wall_index =  j
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.
+                   logc_kbounds_u_l(1,j) = k_wall_u_ji + 1
+                   logc_kbounds_u_l(2,j) = k_wall_u_ji_m
+                   DO  k = logc_kbounds_u_l(1,j), logc_kbounds_u_l(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_u_l(2,k,j) = 0
+                         logc_ratio_u_l(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_u_l(2,k,j) = inc * lc
+                         logc_ratio_u_l(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for u on the north side.
+                IF ( ( k_wall_u_ji <  k_wall_u_ji_p ) .AND.                    &
+                     ( k_wall_u_ji >= k_wall_u_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  j + 1
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.                   
+                   logc_kbounds_u_l(1,j) = k_wall_u_ji + 1
+                   logc_kbounds_u_l(2,j) = k_wall_u_ji_p
+                   DO  k = logc_kbounds_u_l(1,j), logc_kbounds_u_l(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_u_l(2,k,j) = 0
+                         logc_ratio_u_l(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_u_l(2,k,j) = inc * lc
+                         logc_ratio_u_l(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Determine the lowest k-indices for w at j,i, j+1,i and j-1,i. 
+                i             = -1
+                k_wall_w_ji   = get_topography_top_index_ji( j,   i, 'w' )
+                k_wall_w_ji_p = get_topography_top_index_ji( j+1, i, 'w' )
+                k_wall_w_ji_m = get_topography_top_index_ji( j-1, i, 'w' )
+!
+!--             Wall for w on the south side.                
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_m ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_p ) )  THEN
+                   inc        =  1
+                   wall_index =  j
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.
+                   logc_kbounds_w_l(1,j) = k_wall_w_ji + 1
+                   logc_kbounds_w_l(2,j) = k_wall_w_ji_m
+                   DO  k = logc_kbounds_w_l(1,j), logc_kbounds_w_l(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_l(2,k,j) = 0
+                         logc_ratio_w_l(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_l(2,k,j) = inc * lc
+                         logc_ratio_w_l(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for w on the north side.
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_p ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  j+1
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.
+                   logc_kbounds_w_l(1,j) = k_wall_w_ji + 1
+                   logc_kbounds_w_l(2,j) = k_wall_w_ji_p
+                   DO  k = logc_kbounds_w_l(1,j), logc_kbounds_w_l(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_l(2,k,j) = 0
+                         logc_ratio_w_l(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_l(2,k,j) = inc * lc
+                         logc_ratio_w_l(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+                   
+             ENDDO
+
+          ENDIF   !  IF ( bc_dirichlet_l )
+!        
+!--       Right boundary
+          IF ( bc_dirichlet_r )  THEN
+             logc_kbounds_u_r(1:2,nys:nyn) = 0
+             logc_kbounds_v_r(1:2,nys:nyn) = 0             
+             logc_kbounds_w_r(1:2,nys:nyn) = 0
+
+             direction  = 2
+             i  = nx + 1
+
+             DO  j = nys, nyn
+!
+!--             Determine the lowest k-indices for u at j,i, j+1,i and j-1,i. 
+                k_wall_u_ji   = get_topography_top_index_ji( j,   i, 'u' )
+                k_wall_u_ji_p = get_topography_top_index_ji( j+1, i, 'u' )
+                k_wall_u_ji_m = get_topography_top_index_ji( j-1, i, 'u' )
+!
+!--             Wall for u on the south side.
+                IF ( ( k_wall_u_ji <  k_wall_u_ji_m ) .AND.                    &
+                     ( k_wall_u_ji >= k_wall_u_ji_p ) )  THEN
+                   inc        =  1
+                   wall_index =  j
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.                  
+                   logc_kbounds_u_r(1,j) = k_wall_u_ji + 1
+                   logc_kbounds_u_r(2,j) = k_wall_u_ji_m
+                   DO  k = logc_kbounds_u_r(1,j), logc_kbounds_u_r(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction, ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_u_r(2,k,j) = 0
+                         logc_ratio_u_r(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_u_r(2,k,j) = inc * lc
+                         logc_ratio_u_r(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for u on the south side.
+                IF ( ( k_wall_u_ji <  k_wall_u_ji_p ) .AND.                    &
+                     ( k_wall_u_ji >= k_wall_u_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  j + 1                 
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.                   
+                   logc_kbounds_u_r(1,j) = k_wall_u_ji + 1
+                   logc_kbounds_u_r(2,j) = k_wall_u_ji_p
+                   DO  k = logc_kbounds_u_r(1,j), logc_kbounds_u_r(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_u_r(2,k,j) = 0
+                         logc_ratio_u_r(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_u_r(2,k,j) = inc * lc
+                         logc_ratio_u_r(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Determine the lowest k-indices for w at j,i, j+1,i and j-1,i. 
+                k_wall_w_ji   = get_topography_top_index_ji( j,   i, 'w' )
+                k_wall_w_ji_p = get_topography_top_index_ji( j+1, i, 'w' )
+                k_wall_w_ji_m = get_topography_top_index_ji( j-1, i, 'w' )
+!
+!--             Wall for w on the south side.                
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_m ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_p ) )  THEN
+                   inc        =  1
+                   wall_index =  j
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.                    
+                   logc_kbounds_w_r(1,j) = k_wall_w_ji + 1
+                   logc_kbounds_w_r(2,j) = k_wall_w_ji_m
+                   DO  k = logc_kbounds_w_r(1,j), logc_kbounds_w_r(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_r(2,k,j) = 0
+                         logc_ratio_w_r(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_r(2,k,j) = inc * lc
+                         logc_ratio_w_r(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for w on the north side.
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_p ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  j+1
+!
+!--                Store the kbounds for use in pmci_interp_tril_lr.                   
+                   logc_kbounds_w_r(1,j) = k_wall_w_ji + 1
+                   logc_kbounds_w_r(2,j) = k_wall_w_ji_p
+                   DO  k = logc_kbounds_w_r(1,j), logc_kbounds_w_r(2,j)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, j, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_r(2,k,j) = 0
+                         logc_ratio_w_r(2,0:ncorr-1,k,j) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_r(2,k,j) = inc * lc
+                         logc_ratio_w_r(2,0:ncorr-1,k,j) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+                   
+             ENDDO
+             
+          ENDIF   !  IF ( bc_dirichlet_r )
+!        
+!--       South boundary
+          IF ( bc_dirichlet_s )  THEN
+             logc_kbounds_u_s(1:2,nxl:nxr) = 0
+             logc_kbounds_v_s(1:2,nxl:nxr) = 0
+             logc_kbounds_w_s(1:2,nxl:nxr) = 0
+
+             direction  = 3
+
+             DO  i = nxl, nxr
+!
+!--             Determine the lowest k-indices for v at j,i, j,i+1 and j,i-1.
+                j             = 0                
+                k_wall_v_ji   = get_topography_top_index_ji( j, i,   'v' )
+                k_wall_v_ji_p = get_topography_top_index_ji( j, i+1, 'v' )
+                k_wall_v_ji_m = get_topography_top_index_ji( j, i-1, 'v' )
+!
+!--             Wall for v on the left side.
+                IF ( ( k_wall_v_ji <  k_wall_v_ji_m ) .AND.                    &
+                     ( k_wall_v_ji >= k_wall_v_ji_p ) )  THEN
+                   inc        =  1
+                   wall_index =  i
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.                    
+                   logc_kbounds_v_s(1,i) = k_wall_v_ji + 1
+                   logc_kbounds_v_s(2,i) = k_wall_v_ji_m
+                   DO  k = logc_kbounds_v_s(1,i), logc_kbounds_v_s(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_v_s(2,k,i) = 0
+                         logc_ratio_v_s(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_v_s(2,k,i) = inc * lc
+                         logc_ratio_v_s(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for v on the right side.
+                IF ( ( k_wall_v_ji <  k_wall_v_ji_p ) .AND.                    &
+                     ( k_wall_v_ji >= k_wall_v_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  i+1
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.                   
+                   logc_kbounds_v_s(1,i) = k_wall_v_ji + 1
+                   logc_kbounds_v_s(2,i) = k_wall_v_ji_p
+                   DO  k = logc_kbounds_v_s(1,i), logc_kbounds_v_s(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_v_s(2,k,i) = 0
+                         logc_ratio_v_s(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_v_s(2,k,i) = inc * lc
+                         logc_ratio_v_s(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Determine the lowest k-indices for w at j,i, j,i+1 and j,i-1. 
+                j             = -1
+                k_wall_w_ji   = get_topography_top_index_ji( j, i,   'w' )
+                k_wall_w_ji_p = get_topography_top_index_ji( j, i+1, 'w' )
+                k_wall_w_ji_m = get_topography_top_index_ji( j, i-1, 'w' )
+!
+!--             Wall for w on the left side.
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_m ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_p ) )  THEN
+                   inc        =  1
+                   wall_index =  i
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.
+                   logc_kbounds_w_s(1,i) = k_wall_w_ji + 1
+                   logc_kbounds_w_s(2,i) = k_wall_w_ji_m
+                   DO  k = logc_kbounds_w_s(1,i), logc_kbounds_w_s(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_s(2,k,i) = 0
+                         logc_ratio_w_s(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_s(2,k,i) = inc * lc
+                         logc_ratio_w_s(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for w on the right side.
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_p ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  i+1
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.
+                   logc_kbounds_w_s(1,i) = k_wall_w_ji + 1
+                   logc_kbounds_w_s(2,i) = k_wall_w_ji_p
+                   DO  k = logc_kbounds_w_s(1,i), logc_kbounds_w_s(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_s(2,k,i) = 0
+                         logc_ratio_w_s(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_s(2,k,i) = inc * lc
+                         logc_ratio_w_s(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+
+             ENDDO
+
+          ENDIF   !  IF (bc_dirichlet_s )
+!        
+!--       North boundary
+          IF ( bc_dirichlet_n )  THEN
+             logc_kbounds_u_n(1:2,nxl:nxr) = 0             
+             logc_kbounds_v_n(1:2,nxl:nxr) = 0
+             logc_kbounds_w_n(1:2,nxl:nxr) = 0
+
+             direction  = 3
+             j  = ny + 1
+
+             DO  i = nxl, nxr
+!
+!--             Determine the lowest k-indices for v at j,i, j,i+1 and j,i-1
+                k_wall_v_ji   = get_topography_top_index_ji( j, i,   'v' )
+                k_wall_v_ji_p = get_topography_top_index_ji( j, i+1, 'v' )
+                k_wall_v_ji_m = get_topography_top_index_ji( j, i-1, 'v' )
+!
+!--             Wall for v on the left side.
+                IF ( ( k_wall_v_ji <  k_wall_v_ji_m ) .AND.                    &
+                     ( k_wall_v_ji >= k_wall_v_ji_p ) )  THEN
+                   inc        = 1
+                   wall_index = i                   
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.
+                   logc_kbounds_v_n(1,i) = k_wall_v_ji + 1
+                   logc_kbounds_v_n(2,i) = k_wall_v_ji_m
+                   DO  k = logc_kbounds_v_n(1,i), logc_kbounds_v_n(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_v_n(2,k,i) = 0
+                         logc_ratio_v_n(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_v_n(2,k,i) = inc * lc
+                         logc_ratio_v_n(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for v on the right side.
+                IF ( ( k_wall_v_ji <  k_wall_v_ji_p ) .AND.                    &
+                     ( k_wall_v_ji >= k_wall_v_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  i + 1
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.
+                   logc_kbounds_v_n(1,i) = k_wall_v_ji + 1
+                   logc_kbounds_v_n(2,i) = k_wall_v_ji_p
+                   DO  k = logc_kbounds_v_n(1,i), logc_kbounds_v_n(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_v_n(2,k,i) = 0
+                         logc_ratio_v_n(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_v_n(2,k,i) = inc * lc
+                         logc_ratio_v_n(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Determine the lowest k-indices for w at j,i, j,i+1 and j,i-1.
+                k_wall_w_ji   = get_topography_top_index_ji( j, i,   'w' )
+                k_wall_w_ji_p = get_topography_top_index_ji( j, i+1, 'w' )
+                k_wall_w_ji_m = get_topography_top_index_ji( j, i-1, 'w' )                   
+!
+!--             Wall for w on the left side.
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_m ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_p ) )  THEN
+                   inc        = 1
+                   wall_index = i
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.
+                   logc_kbounds_w_n(1,i) = k_wall_w_ji + 1
+                   logc_kbounds_w_n(2,i) = k_wall_w_ji_m
+                   DO  k = logc_kbounds_w_n(1,i), logc_kbounds_w_n(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_n(2,k,i) = 0
+                         logc_ratio_w_n(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_n(2,k,i) = inc * lc
+                         logc_ratio_w_n(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+!
+!--             Wall for w on the right side, but not on the left side
+                IF ( ( k_wall_w_ji <  k_wall_w_ji_p ) .AND.                    &
+                     ( k_wall_w_ji >= k_wall_w_ji_m ) )  THEN
+                   inc        = -1
+                   wall_index =  i+1
+!
+!--                Store the kbounds for use in pmci_interp_tril_sn.
+                   logc_kbounds_w_n(1,i) = k_wall_w_ji + 1
+                   logc_kbounds_w_n(2,i) = k_wall_w_ji_p
+                   DO  k = logc_kbounds_w_n(1,i), logc_kbounds_w_n(2,i)
+                      CALL pmci_define_loglaw_correction_parameters( lc, lcr,  &
+                           k, i, inc, wall_index, z0_topo, kb, direction,      &
+                           ncorr )
+                      IF ( lc == -99 )  THEN
+!                         
+!--                      The pivot point is out of subdomain, skip the correction. 
+                         logc_w_n(2,k,i) = 0
+                         logc_ratio_w_n(2,0:ncorr-1,k,i) = 1.0_wp
+                      ELSE
+!
+!--                      The direction of the wall-normal index is stored as the
+!--                      sign of the logc-element.
+                         logc_w_n(2,k,i) = inc * lc
+                         logc_ratio_w_n(2,0:ncorr-1,k,i) = lcr(0:ncorr-1)
+                      ENDIF
+                      lcr(0:ncorr-1) = 1.0_wp
+                   ENDDO
+                ENDIF
+
+             ENDDO
+
+          ENDIF   !  IF ( bc_dirichlet_n )
+
+       ENDIF   !  IF ( topography /= 'flat' )
+
+    END SUBROUTINE pmci_init_loglaw_correction
+
+
+
+    SUBROUTINE pmci_define_loglaw_correction_parameters( lc, lcr, k, ij, inc,  &
+         wall_index, z0_l, kb, direction, ncorr )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN)  ::  direction                 !<
+       INTEGER(iwp), INTENT(IN)  ::  ij                        !<
+       INTEGER(iwp), INTENT(IN)  ::  inc                       !<
+       INTEGER(iwp), INTENT(IN)  ::  k                         !<
+       INTEGER(iwp), INTENT(IN)  ::  kb                        !<
+       INTEGER(iwp), INTENT(OUT) ::  lc                        !<
+       INTEGER(iwp), INTENT(IN)  ::  ncorr                     !<
+       INTEGER(iwp), INTENT(IN)  ::  wall_index                !<
+
+       INTEGER(iwp) ::  alcorr                                 !<
+       INTEGER(iwp) ::  corr_index                             !<
+       INTEGER(iwp) ::  lcorr                                  !<
+
+       LOGICAL      ::  more                                   !<             
+
+       REAL(wp), DIMENSION(0:ncorr-1), INTENT(INOUT) ::  lcr   !<
+       REAL(wp), INTENT(IN)      ::  z0_l                      !<
+      
+       REAL(wp)     ::  logvelc1                               !<
+      
+
+       SELECT CASE ( direction )
+
+          CASE (1)   !  k
+             more = .TRUE.
+             lcorr = 0
+             DO  WHILE ( more .AND. lcorr <= ncorr-1 )
+                corr_index = k + lcorr
+                IF ( lcorr == 0 )  THEN
+                   CALL pmci_find_logc_pivot_k( lc, logvelc1, z0_l, kb )
+                ENDIF
+               
+                IF ( corr_index < lc )  THEN
+                   lcr(lcorr) = LOG( ( zu(k) - zw(kb) ) / z0_l ) / logvelc1
+                   more = .TRUE.
+                ELSE
+                   lcr(lcorr) = 1.0_wp
+                   more = .FALSE.
+                ENDIF
+                lcorr = lcorr + 1
+             ENDDO
+
+          CASE (2)   !  j
+             more = .TRUE.
+             lcorr  = 0
+             alcorr = 0
+             DO  WHILE ( more  .AND.  alcorr <= ncorr-1 )
+                corr_index = ij + lcorr   ! In this case (direction = 2) ij is j
+                IF ( lcorr == 0 )  THEN
+                   CALL pmci_find_logc_pivot_j( lc, logvelc1, ij, wall_index,  &
+                                                z0_l, inc )
+                ENDIF
+!
+!--             The role of inc here is to make the comparison operation "<"
+!--             valid in both directions
+                IF ( ( inc * corr_index < inc * lc ) .AND. ( lc /= -99 ) )  THEN
+                   lcr(alcorr) = LOG( ABS( coord_y(corr_index) + 0.5_wp * dy   &
+                                         - coord_y(wall_index) ) / z0_l )      &
+                                 / logvelc1
+                   more = .TRUE.
+                ELSE
+                   lcr(alcorr) = 1.0_wp
+                   more = .FALSE.
+                ENDIF
+                lcorr  = lcorr + inc
+                alcorr = ABS( lcorr )
+             ENDDO
+
+          CASE (3)   !  i
+             more = .TRUE.
+             lcorr  = 0
+             alcorr = 0
+             DO  WHILE ( more  .AND.  alcorr <= ncorr-1 )
+                corr_index = ij + lcorr   ! In this case (direction = 3) ij is i
+                IF ( lcorr == 0 )  THEN
+                   CALL pmci_find_logc_pivot_i( lc, logvelc1, ij, wall_index,  &
+                                                z0_l, inc )
+                ENDIF
+!
+!--             The role of inc here is to make the comparison operation "<"
+!--             valid in both directions
+                IF ( ( inc * corr_index < inc * lc ) .AND. ( lc /= -99 ) )  THEN
+                   lcr(alcorr) = LOG( ABS( coord_x(corr_index) + 0.5_wp * dx   &
+                                         - coord_x(wall_index) ) / z0_l )      &
+                                 / logvelc1
+                   more = .TRUE.
+                ELSE
+                   lcr(alcorr) = 1.0_wp
+                   more = .FALSE.
+                ENDIF
+                lcorr  = lcorr + inc
+                alcorr = ABS( lcorr )
+             ENDDO
+
+       END SELECT
+
+    END SUBROUTINE pmci_define_loglaw_correction_parameters
+
+
+
+    SUBROUTINE pmci_find_logc_pivot_k( lc, logzc1, z0_l, kb )
+!
+!--    Finds the pivot node and the log-law factor for near-wall nodes for
+!--    which the wall-parallel velocity components will be log-law corrected
+!--    after interpolation. This subroutine is only for horizontal walls.
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN)  ::  kb   !<
+       INTEGER(iwp), INTENT(OUT) ::  lc   !<
+
+       INTEGER(iwp) ::  kbc               !<
+       INTEGER(iwp) ::  k1                !<
+
+       REAL(wp), INTENT(OUT) ::  logzc1   !<
+       REAL(wp), INTENT(IN)  ::  z0_l     !<
+
+       REAL(wp) ::  zuc1                  !<
+
+!
+!--    kbc is the first coarse-grid point above the surface
+       kbc = nzb + 1
+       DO  WHILE ( cg%zu(kbc) < zu(kb) )
+          kbc = kbc + 1
+       ENDDO
+       zuc1  = cg%zu(kbc)
+       k1    = kb + 1
+       DO  WHILE ( zu(k1) < zuc1 )  !  Important: must be <, not <=
+          k1 = k1 + 1
+       ENDDO
+       logzc1 = LOG( (zu(k1) - zw(kb) ) / z0_l )
+       lc = k1
+
+    END SUBROUTINE pmci_find_logc_pivot_k
+
+
+
+    SUBROUTINE pmci_find_logc_pivot_j( lc, logyc1, j, jw, z0_l, inc )
+!
+!--    Finds the pivot node and the log-law factor for near-wall nodes for
+!--    which the wall-parallel velocity components will be log-law corrected
+!--    after interpolation. This subroutine is only for vertical walls on
+!--    south/north sides of the node. If the pivot node is found to be outside 
+!--    the subdomain, a marker value of -99 is set to lc and this tells 
+!--    pmci_init_loglaw_correction to not do the correction in this case.
+      
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN)  ::  inc    !<  increment must be 1 or -1.
+       INTEGER(iwp), INTENT(IN)  ::  j      !<
+       INTEGER(iwp), INTENT(IN)  ::  jw     !<
+       INTEGER(iwp), INTENT(OUT) ::  lc     !<
+
+       INTEGER(iwp) ::  jwc                 !<
+       INTEGER(iwp) ::  j1                  !<
+
+       REAL(wp), INTENT(IN)  ::  z0_l       !<
+       REAL(wp), INTENT(OUT) ::  logyc1     !<
+
+       REAL(wp) ::  ycb                     !<       
+       REAL(wp) ::  yc1                     !<
+       
+!
+!--    yc1 is the y-coordinate of the first coarse-grid u- and w-nodes out from
+!--    the wall. Here we assume that the wall index in the coarse grid is the
+!--    closest one if they don't match.
+       jwc  = pmci_find_nearest_coarse_grid_index_j( jw )
+       yc1  = cg%coord_y(jwc) - lower_left_coord_y + 0.5_wp * inc * cg%dy
+!       
+!--    Check if yc1 is out of the subdomain y-range. In such case set the marker 
+!--    value -99 for lc in order to skip the loglaw-correction locally.
+       IF ( yc1 < ( REAL( nysg, KIND=wp ) + 0.5_wp ) * dy  )  THEN
+          lc = -99
+          logyc1 = 1.0_wp
+       ELSE IF ( yc1 > ( REAL( nyng, KIND=wp ) + 0.5_wp ) * dy )  THEN
+          lc = -99
+          logyc1 = 1.0_wp
+       ELSE
+!
+!--       j1 is the first fine-grid index further away from the wall than yc1
+          j1 = j
+!
+!--       Important: the binary relation must be <, not <=
+          ycb = 0.5_wp * dy - lower_left_coord_y
+          DO  WHILE ( inc * ( coord_y(j1) + ycb ) < inc * yc1 )
+             j1 = j1 + inc
+          ENDDO
+          
+          logyc1 = LOG( ABS( coord_y(j1) + 0.5_wp * dy - coord_y(jw) ) / z0_l )
+          lc = j1
+       ENDIF
+       
+    END SUBROUTINE pmci_find_logc_pivot_j
+
+
+
+    SUBROUTINE pmci_find_logc_pivot_i( lc, logxc1, i, iw, z0_l, inc )
+!
+!--    Finds the pivot node and the log-law factor for near-wall nodes for
+!--    which the wall-parallel velocity components will be log-law corrected
+!--    after interpolation. This subroutine is only for vertical walls on
+!--    left/right sides of the node. If the pivot node is found to be outside 
+!--    the subdomain, a marker value of -99 is set to lc and this tells 
+!--    pmci_init_loglaw_correction to not do the correction in this case.
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN)  ::  i      !<
+       INTEGER(iwp), INTENT(IN)  ::  inc    !< increment must be 1 or -1.
+       INTEGER(iwp), INTENT(IN)  ::  iw     !<
+       INTEGER(iwp), INTENT(OUT) ::  lc     !<
+
+       INTEGER(iwp) ::  iwc                 !<
+       INTEGER(iwp) ::  i1                  !<
+
+       REAL(wp), INTENT(IN)  ::  z0_l       !<
+       REAL(wp), INTENT(OUT) ::  logxc1     !<
+
+       REAL(wp) ::  xcb                     !<
+       REAL(wp) ::  xc1                     !<
+
+!
+!--    xc1 is the x-coordinate of the first coarse-grid v- and w-nodes out from
+!--    the wall. Here we assume that the wall index in the coarse grid is the
+!--    closest one if they don't match.
+       iwc  = pmci_find_nearest_coarse_grid_index_i( iw )
+       xc1  = cg%coord_x(iwc) - lower_left_coord_x + 0.5_wp * inc * cg%dx
+!       
+!--    Check if xc1 is out of the subdomain x-range. In such case set the marker 
+!--    value -99 for lc in order to skip the loglaw-correction locally.        
+       IF ( xc1 < ( REAL( nxlg, KIND=wp ) + 0.5_wp ) * dx  )  THEN
+          lc = -99
+          logxc1 = 1.0_wp
+       ELSE IF ( xc1 > ( REAL( nxrg, KIND=wp ) + 0.5_wp ) * dx )  THEN
+          lc = -99
+          logxc1 = 1.0_wp
+       ELSE    
+!
+!--       i1 is the first fine-grid index futher away from the wall than xc1.
+          i1 = i
+!
+!--       Important: the binary relation must be <, not <= 
+          xcb = 0.5_wp * dx - lower_left_coord_x
+          DO  WHILE ( inc * ( coord_x(i1) + xcb ) < inc * xc1 )
+             i1 = i1 + inc
+          ENDDO
+      
+          logxc1 = LOG( ABS( coord_x(i1) + 0.5_wp*dx - coord_x(iw) ) / z0_l )
+          lc = i1
+       ENDIF
+       
+    END SUBROUTINE pmci_find_logc_pivot_i
+
+
+    
+    FUNCTION pmci_find_nearest_coarse_grid_index_j( jw ) 
+
+      IMPLICIT NONE
+      INTEGER(iwp) :: jw         !< Fine-grid wall index
+
+      INTEGER(iwp) :: jc
+      INTEGER(iwp) :: pmci_find_nearest_coarse_grid_index_j
+      REAL(wp) :: dist
+      REAL(wp) :: newdist
+
+      
+      dist = coord_y(nyn) - coord_y(nys)
+      DO jc = jcs, jcn
+         newdist = ABS( cg%coord_y(jc) - coord_y(jw) )
+         IF ( newdist < dist )  THEN
+            pmci_find_nearest_coarse_grid_index_j = jc
+            dist = newdist
+         ENDIF
+      ENDDO
+      
+    END FUNCTION pmci_find_nearest_coarse_grid_index_j
+
+
+    
+    FUNCTION pmci_find_nearest_coarse_grid_index_i( iw ) 
+
+      IMPLICIT NONE
+      INTEGER(iwp) :: iw         !< Fine-grid wall index
+
+      INTEGER(iwp) :: ic
+      INTEGER(iwp) :: pmci_find_nearest_coarse_grid_index_i
+      REAL(wp) :: dist
+      REAL(wp) :: newdist
+
+      
+      dist = coord_x(nxr) - coord_x(nxl)
+      DO ic = icl, icr
+         newdist = ABS( cg%coord_x(ic) - coord_x(iw) )
+         IF ( newdist < dist )  THEN
+            pmci_find_nearest_coarse_grid_index_i = ic
+            dist = newdist
+         ENDIF
+      ENDDO
+      
+    END FUNCTION pmci_find_nearest_coarse_grid_index_i
+
+    
+      
+    SUBROUTINE pmci_init_anterp_tophat
+!
+!--    Precomputation of the child-array indices for
+!--    corresponding coarse-grid array index and the
+!--    Under-relaxation coefficients to be used by anterp_tophat.
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i        !< Fine-grid index
+       INTEGER(iwp) ::  ii       !< Coarse-grid index
+       INTEGER(iwp) ::  istart   !<
+       INTEGER(iwp) ::  ir       !<
+       INTEGER(iwp) ::  j        !< Fine-grid index
+       INTEGER(iwp) ::  jj       !< Coarse-grid index
+       INTEGER(iwp) ::  jstart   !<
+       INTEGER(iwp) ::  jr       !<
+       INTEGER(iwp) ::  k        !< Fine-grid index
+       INTEGER(iwp) ::  kk       !< Coarse-grid index
+       INTEGER(iwp) ::  kstart   !<
+       REAL(wp)     ::  xi       !<
+       REAL(wp)     ::  eta      !<
+       REAL(wp)     ::  zeta     !<
+     
+!
+!--    Default values for under-relaxation lengths:
+       IF ( anterp_relax_length_l < 0.0_wp )  THEN
+          anterp_relax_length_l = 0.1_wp * ( nx + 1 ) * dx
+       ENDIF
+       IF ( anterp_relax_length_r < 0.0_wp )  THEN
+          anterp_relax_length_r = 0.1_wp * ( nx + 1 ) * dx
+       ENDIF
+       IF ( anterp_relax_length_s < 0.0_wp )  THEN
+          anterp_relax_length_s = 0.1_wp * ( ny + 1 ) * dy
+       ENDIF
+       IF ( anterp_relax_length_n < 0.0_wp )  THEN
+          anterp_relax_length_n = 0.1_wp * ( ny + 1 ) * dy
+       ENDIF
+       IF ( anterp_relax_length_t < 0.0_wp )  THEN
+          anterp_relax_length_t = 0.1_wp * zu(nzt)
+       ENDIF
+!
+!--    First determine kctu and kctw that are the coarse-grid upper bounds for
+!--    index k
+       kk = 0
+       DO  WHILE ( cg%zu(kk) <= zu(nzt) )
+          kk = kk + 1
+       ENDDO
+       kctu = kk - 1
+
+       kk = 0
+       DO  WHILE ( cg%zw(kk) <= zw(nzt-1) )
+          kk = kk + 1
+       ENDDO
+       kctw = kk - 1
+
+       ALLOCATE( iflu(icl:icr) )
+       ALLOCATE( iflo(icl:icr) )
+       ALLOCATE( ifuu(icl:icr) )
+       ALLOCATE( ifuo(icl:icr) )
+       ALLOCATE( jflv(jcs:jcn) )
+       ALLOCATE( jflo(jcs:jcn) )
+       ALLOCATE( jfuv(jcs:jcn) )
+       ALLOCATE( jfuo(jcs:jcn) )
+       ALLOCATE( kflw(0:kctw) )
+       ALLOCATE( kflo(0:kctu) )
+       ALLOCATE( kfuw(0:kctw) )
+       ALLOCATE( kfuo(0:kctu) )
+
+       ALLOCATE( ijkfc_u(0:kctu,jcs:jcn,icl:icr) )
+       ALLOCATE( ijkfc_v(0:kctu,jcs:jcn,icl:icr) )
+       ALLOCATE( ijkfc_w(0:kctw,jcs:jcn,icl:icr) )
+       ALLOCATE( ijkfc_s(0:kctu,jcs:jcn,icl:icr) )
+       ijkfc_u = 0
+       ijkfc_v = 0
+       ijkfc_w = 0
+       ijkfc_s = 0
+!
+!--    i-indices of u for each ii-index value
+!--    ii=icr is redundant for anterpolation
+       istart = nxlg
+       DO  ii = icl, icr-1
+          i = istart
+          DO  WHILE ( ( coord_x(i) < cg%coord_x(ii) - 0.5_wp * cg%dx )  .AND.  &
+                      ( i < nxrg ) )
+             i  = i + 1
+          ENDDO
+          iflu(ii) = MIN( MAX( i, nxlg ), nxrg )
+          ir = i
+          DO  WHILE ( ( coord_x(ir) <= cg%coord_x(ii) + 0.5_wp * cg%dx )  .AND.&
+                      ( i < nxrg+1 ) )
+             i  = i + 1
+             ir = MIN( i, nxrg )
+          ENDDO
+          ifuu(ii) = MIN( MAX( i-1, iflu(ii) ), nxrg )
+          istart = iflu(ii)
+       ENDDO
+       iflu(icr) = nxrg
+       ifuu(icr) = nxrg
+!
+!--    i-indices of others for each ii-index value
+!--    ii=icr is redundant for anterpolation
+       istart = nxlg
+       DO  ii = icl, icr-1
+          i = istart
+          DO  WHILE ( ( coord_x(i) + 0.5_wp * dx < cg%coord_x(ii) )  .AND.     &
+                      ( i < nxrg ) )
+             i  = i + 1
+          ENDDO
+          iflo(ii) = MIN( MAX( i, nxlg ), nxrg )
+          ir = i
+          DO  WHILE ( ( coord_x(ir) + 0.5_wp * dx <= cg%coord_x(ii) + cg%dx )  &
+                      .AND.  ( i < nxrg+1 ) )
+             i  = i + 1
+             ir = MIN( i, nxrg )
+          ENDDO
+          ifuo(ii) = MIN( MAX( i-1, iflo(ii) ), nxrg )
+          istart = iflo(ii)
+       ENDDO
+       iflo(icr) = nxrg
+       ifuo(icr) = nxrg
+!
+!--    j-indices of v for each jj-index value
+!--    jj=jcn is redundant for anterpolation
+       jstart = nysg
+       DO  jj = jcs, jcn-1
+          j = jstart
+          DO  WHILE ( ( coord_y(j) < cg%coord_y(jj) - 0.5_wp * cg%dy )  .AND.  &
+                      ( j < nyng ) )
+             j  = j + 1
+          ENDDO
+          jflv(jj) = MIN( MAX( j, nysg ), nyng )
+          jr = j
+          DO  WHILE ( ( coord_y(jr) <= cg%coord_y(jj) + 0.5_wp * cg%dy )  .AND.&
+                      ( j < nyng+1 ) )
+             j  = j + 1
+             jr = MIN( j, nyng )
+          ENDDO
+          jfuv(jj) = MIN( MAX( j-1, jflv(jj) ), nyng )
+          jstart = jflv(jj)
+       ENDDO
+       jflv(jcn) = nyng
+       jfuv(jcn) = nyng
+!
+!--    j-indices of others for each jj-index value
+!--    jj=jcn is redundant for anterpolation
+       jstart = nysg
+       DO  jj = jcs, jcn-1
+          j = jstart
+          DO  WHILE ( ( coord_y(j) + 0.5_wp * dy < cg%coord_y(jj) )  .AND.     &
+                      ( j < nyng ) )
+             j  = j + 1
+          ENDDO
+          jflo(jj) = MIN( MAX( j, nysg ), nyng )
+          jr = j
+          DO  WHILE ( ( coord_y(jr) + 0.5_wp * dy <= cg%coord_y(jj) + cg%dy )  &
+                      .AND.  ( j < nyng+1 ) )
+             j  = j + 1
+             jr = MIN( j, nyng )
+          ENDDO
+          jfuo(jj) = MIN( MAX( j-1, jflo(jj) ), nyng )
+          jstart = jflo(jj)
+       ENDDO
+       jflo(jcn) = nyng
+       jfuo(jcn) = nyng
+!
+!--    k-indices of w for each kk-index value
+       kstart  = 0
+       kflw(0) = 0
+       kfuw(0) = 0
+       DO  kk = 1, kctw
+          k = kstart
+          DO  WHILE ( ( zw(k) < cg%zu(kk) )  .AND.  ( k < nzt ) )
+             k = k + 1
+          ENDDO
+          kflw(kk) = MIN( MAX( k, 1 ), nzt + 1 )
+          DO  WHILE ( ( zw(k) <= cg%zu(kk+1) )  .AND.  ( k < nzt+1 ) )
+             k  = k + 1
+          ENDDO
+          kfuw(kk) = MIN( MAX( k-1, kflw(kk) ), nzt + 1 )
+          kstart = kflw(kk)
+       ENDDO
+!
+!--    k-indices of others for each kk-index value
+       kstart  = 0
+       kflo(0) = 0
+       kfuo(0) = 0
+       DO  kk = 1, kctu
+          k = kstart
+          DO  WHILE ( ( zu(k) < cg%zw(kk-1) )  .AND.  ( k < nzt ) )
+             k = k + 1
+          ENDDO
+          kflo(kk) = MIN( MAX( k, 1 ), nzt + 1 )
+          DO  WHILE ( ( zu(k) <= cg%zw(kk) )  .AND.  ( k < nzt+1 ) )
+             k = k + 1
+          ENDDO
+          kfuo(kk) = MIN( MAX( k-1, kflo(kk) ), nzt + 1 )
+          kstart = kflo(kk)
+       ENDDO
+!
+!--    Precomputation of number of fine-grid nodes inside coarse-grid ij-faces.
+!--    Note that ii, jj, and kk are coarse-grid indices. 
+!--    This information is needed in anterpolation.
+       DO  ii = icl, icr
+          DO  jj = jcs, jcn
+             DO kk = 0, kctu
+!
+!--             u-component
+                DO  i = iflu(ii), ifuu(ii)
+                   DO  j = jflo(jj), jfuo(jj)
+                      DO  k = kflo(kk), kfuo(kk)
+                         ijkfc_u(kk,jj,ii) = ijkfc_u(kk,jj,ii) + MERGE( 1, 0,  &
+                                            BTEST( wall_flags_0(k,j,i), 1 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+!
+!--             v-component 
+                DO  i = iflo(ii), ifuo(ii)
+                   DO  j = jflv(jj), jfuv(jj)
+                      DO  k = kflo(kk), kfuo(kk)
+                         ijkfc_v(kk,jj,ii) = ijkfc_v(kk,jj,ii) + MERGE( 1, 0,  &
+                                            BTEST( wall_flags_0(k,j,i), 2 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+!
+!--             scalars
+                DO  i = iflo(ii), ifuo(ii)
+                   DO  j = jflo(jj), jfuo(jj)
+                      DO  k = kflo(kk), kfuo(kk)
+                         ijkfc_s(kk,jj,ii) = ijkfc_s(kk,jj,ii) + MERGE( 1, 0,  &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+
+             DO kk = 0, kctw
+!
+!--             w-component 
+                DO  i = iflo(ii), ifuo(ii)
+                   DO  j = jflo(jj), jfuo(jj)
+                      DO  k = kflw(kk), kfuw(kk)
+                         ijkfc_w(kk,jj,ii) = ijkfc_w(kk,jj,ii) + MERGE( 1, 0,  &
+                                            BTEST( wall_flags_0(k,j,i), 3 ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+        
+          ENDDO
+       ENDDO
+!
+!--    Spatial under-relaxation coefficients
+       ALLOCATE( frax(icl:icr) )
+       ALLOCATE( fray(jcs:jcn) )
+       
+       frax(icl:icr) = 1.0_wp
+       fray(jcs:jcn) = 1.0_wp
+
+       IF ( nesting_mode /= 'vertical' )  THEN
+          DO  ii = icl, icr
+             IF ( ifuu(ii) < ( nx + 1 ) / 2 )  THEN   
+                xi = ( MAX( 0.0_wp, ( cg%coord_x(ii) -                         &
+                     lower_left_coord_x ) ) / anterp_relax_length_l )**4
+                frax(ii) = xi / ( 1.0_wp + xi )
+             ELSE
+                xi = ( MAX( 0.0_wp, ( lower_left_coord_x + ( nx + 1 ) * dx -   &
+                                      cg%coord_x(ii) ) ) /                     &
+                       anterp_relax_length_r )**4
+                frax(ii) = xi / ( 1.0_wp + xi )                
+             ENDIF
+          ENDDO
+
+
+          DO  jj = jcs, jcn
+             IF ( jfuv(jj) < ( ny + 1 ) / 2 )  THEN 
+                eta = ( MAX( 0.0_wp, ( cg%coord_y(jj) -                        &
+                     lower_left_coord_y ) ) / anterp_relax_length_s )**4
+                fray(jj) = eta / ( 1.0_wp + eta )
+             ELSE
+                eta = ( MAX( 0.0_wp, ( lower_left_coord_y + ( ny + 1 ) * dy -  &
+                                       cg%coord_y(jj)) ) /                     &
+                        anterp_relax_length_n )**4
+                fray(jj) = eta / ( 1.0_wp + eta )
+             ENDIF
+          ENDDO
+       ENDIF
+      
+       ALLOCATE( fraz(0:kctu) )
+       DO  kk = 0, kctu
+          zeta = ( ( zu(nzt) - cg%zu(kk) ) / anterp_relax_length_t )**4
+          fraz(kk) = zeta / ( 1.0_wp + zeta )
+       ENDDO
+
+    END SUBROUTINE pmci_init_anterp_tophat
+
+
+
+    SUBROUTINE pmci_init_tkefactor
+
+!
+!--    Computes the scaling factor for the SGS TKE from coarse grid to be used
+!--    as BC for the fine grid. Based on the Kolmogorov energy spectrum
+!--    for the inertial subrange and assumption of sharp cut-off of the resolved
+!--    energy spectrum. Near the surface, the reduction of TKE is made
+!--    smaller than further away from the surface.
+!--    Please note, in case parent and child model operate in RANS mode, 
+!--    TKE is not grid depenedent and weighting factor is one. 
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)        ::  k                     !< index variable along z
+       INTEGER(iwp)        ::  k_wall                !< topography-top index along z
+       INTEGER(iwp)        ::  kc                    !<
+
+       REAL(wp), PARAMETER ::  cfw = 0.2_wp          !<
+       REAL(wp), PARAMETER ::  c_tkef = 0.6_wp       !<
+       REAL(wp)            ::  fw                    !<
+       REAL(wp), PARAMETER ::  fw0 = 0.9_wp          !<
+       REAL(wp)            ::  glsf                  !<
+       REAL(wp)            ::  glsc                  !<
+       REAL(wp)            ::  height                !<
+       REAL(wp), PARAMETER ::  p13 = 1.0_wp/3.0_wp   !<
+       REAL(wp), PARAMETER ::  p23 = 2.0_wp/3.0_wp   !<        
+
+!
+       IF ( .NOT. rans_mode  .AND.  .NOT. rans_mode_parent )  THEN 
+          IF ( bc_dirichlet_l )  THEN
+             ALLOCATE( tkefactor_l(nzb:nzt+1,nysg:nyng) )
+             tkefactor_l = 0.0_wp
+             i = nxl - 1
+             DO  j = nysg, nyng
+                k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                DO  k = k_wall + 1, nzt
+                   kc     = kco(k) + 1
+                   glsf   = ( dx * dy * dzu(k) )**p13
+                   glsc   = ( cg%dx * cg%dy *cg%dzu(kc) )**p13
+                   height = zu(k) - zu(k_wall)
+                   fw     = EXP( -cfw * height / glsf )
+                   tkefactor_l(k,j) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *      &
+                                                 ( glsf / glsc )**p23 )
+                ENDDO
+                tkefactor_l(k_wall,j) = c_tkef * fw0
+             ENDDO
+          ENDIF
+
+          IF ( bc_dirichlet_r )  THEN
+             ALLOCATE( tkefactor_r(nzb:nzt+1,nysg:nyng) )
+             tkefactor_r = 0.0_wp
+             i = nxr + 1
+             DO  j = nysg, nyng
+                k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                DO  k = k_wall + 1, nzt
+                   kc     = kco(k) + 1
+                   glsf   = ( dx * dy * dzu(k) )**p13
+                   glsc   = ( cg%dx * cg%dy * cg%dzu(kc) )**p13
+                   height = zu(k) - zu(k_wall)
+                   fw     = EXP( -cfw * height / glsf )
+                   tkefactor_r(k,j) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *      &
+                                                 ( glsf / glsc )**p23 )
+                ENDDO
+                tkefactor_r(k_wall,j) = c_tkef * fw0
+             ENDDO
+          ENDIF
+
+          IF ( bc_dirichlet_s )  THEN
+             ALLOCATE( tkefactor_s(nzb:nzt+1,nxlg:nxrg) )
+             tkefactor_s = 0.0_wp
+             j = nys - 1
+             DO  i = nxlg, nxrg
+                k_wall = get_topography_top_index_ji( j, i, 's' )
+                
+                DO  k = k_wall + 1, nzt
+    
+                   kc     = kco(k) + 1
+                   glsf   = ( dx * dy * dzu(k) )**p13
+                   glsc   = ( cg%dx * cg%dy * cg%dzu(kc) ) ** p13
+                   height = zu(k) - zu(k_wall)
+                   fw     = EXP( -cfw*height / glsf )
+                   tkefactor_s(k,i) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *      &
+                        ( glsf / glsc )**p23 )
+                ENDDO
+                tkefactor_s(k_wall,i) = c_tkef * fw0
+             ENDDO
+          ENDIF
+
+          IF ( bc_dirichlet_n )  THEN
+             ALLOCATE( tkefactor_n(nzb:nzt+1,nxlg:nxrg) )
+             tkefactor_n = 0.0_wp
+             j = nyn + 1
+             DO  i = nxlg, nxrg
+                k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                DO  k = k_wall + 1, nzt
+
+                   kc     = kco(k) + 1
+                   glsf   = ( dx * dy * dzu(k) )**p13
+                   glsc   = ( cg%dx * cg%dy * cg%dzu(kc) )**p13
+                   height = zu(k) - zu(k_wall)
+                   fw     = EXP( -cfw * height / glsf )
+                   tkefactor_n(k,i) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *     &
+                                                 ( glsf / glsc )**p23 )
+                ENDDO
+                tkefactor_n(k_wall,i) = c_tkef * fw0
+             ENDDO
+          ENDIF
+
+          ALLOCATE( tkefactor_t(nysg:nyng,nxlg:nxrg) )
+          k = nzt
+
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+!
+!--             Determine vertical index for local topography top
+                k_wall = get_topography_top_index_ji( j, i, 's' )
+
+                kc     = kco(k) + 1
+                glsf   = ( dx * dy * dzu(k) )**p13
+                glsc   = ( cg%dx * cg%dy * cg%dzu(kc) )**p13
+                height = zu(k) - zu(k_wall)
+                fw     = EXP( -cfw * height / glsf )
+                tkefactor_t(j,i) = c_tkef * ( fw0 * fw + ( 1.0_wp - fw ) *        &
+                                              ( glsf / glsc )**p23 )
+             ENDDO
+          ENDDO
+!
+!--    RANS mode
+       ELSE
+          IF ( bc_dirichlet_l )  THEN
+             ALLOCATE( tkefactor_l(nzb:nzt+1,nysg:nyng) )
+             tkefactor_l = 1.0_wp
+          ENDIF
+          IF ( bc_dirichlet_r )  THEN
+             ALLOCATE( tkefactor_r(nzb:nzt+1,nysg:nyng) )
+             tkefactor_r = 1.0_wp
+          ENDIF
+          IF ( bc_dirichlet_s )  THEN
+             ALLOCATE( tkefactor_s(nzb:nzt+1,nxlg:nxrg) )
+             tkefactor_s = 1.0_wp
+          ENDIF
+          IF ( bc_dirichlet_n )  THEN
+             ALLOCATE( tkefactor_n(nzb:nzt+1,nxlg:nxrg) )
+             tkefactor_n = 1.0_wp
+          ENDIF
+
+          ALLOCATE( tkefactor_t(nysg:nyng,nxlg:nxrg) )
+          tkefactor_t = 1.0_wp
+
+       ENDIF
+      
+    END SUBROUTINE pmci_init_tkefactor
+
+#endif
+ END SUBROUTINE pmci_setup_child
+
+
+
+ SUBROUTINE pmci_setup_coordinates
+
+#if defined( __parallel )
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  j   !<
+
+!
+!-- Create coordinate arrays.
+    ALLOCATE( coord_x(-nbgp:nx+nbgp) )
+    ALLOCATE( coord_y(-nbgp:ny+nbgp) )
+     
+    DO  i = -nbgp, nx + nbgp
+       coord_x(i) = lower_left_coord_x + i * dx
+    ENDDO
+     
+    DO  j = -nbgp, ny + nbgp
+       coord_y(j) = lower_left_coord_y + j * dy
+    ENDDO
+
+#endif
+ END SUBROUTINE pmci_setup_coordinates
+
+
+
+
+ SUBROUTINE pmci_set_array_pointer( name, child_id, nz_cl, n )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN)          ::  child_id    !<
+    INTEGER(iwp), INTENT(IN)          ::  nz_cl       !<
+    INTEGER(iwp), INTENT(IN),OPTIONAL ::  n           !< index of chemical species
+
+    CHARACTER(LEN=*), INTENT(IN) ::  name        !<
+
+#if defined( __parallel )
+    INTEGER(iwp) ::  ierr        !<
+
+    REAL(wp), POINTER, DIMENSION(:,:)     ::  p_2d        !<
+    REAL(wp), POINTER, DIMENSION(:,:,:)   ::  p_3d        !<
+    REAL(wp), POINTER, DIMENSION(:,:,:)   ::  p_3d_sec    !<
+    INTEGER(idp), POINTER, DIMENSION(:,:) ::  i_2d        !<
+
+
+    NULLIFY( p_3d )
+    NULLIFY( p_2d )
+    NULLIFY( i_2d )
+
+!
+!-- List of array names, which can be coupled.
+!-- In case of 3D please change also the second array for the pointer version
+    IF ( TRIM(name) == "u"          )  p_3d => u
+    IF ( TRIM(name) == "v"          )  p_3d => v
+    IF ( TRIM(name) == "w"          )  p_3d => w
+    IF ( TRIM(name) == "e"          )  p_3d => e
+    IF ( TRIM(name) == "pt"         )  p_3d => pt
+    IF ( TRIM(name) == "q"          )  p_3d => q
+    IF ( TRIM(name) == "qc"         )  p_3d => qc
+    IF ( TRIM(name) == "qr"         )  p_3d => qr
+    IF ( TRIM(name) == "nr"         )  p_3d => nr
+    IF ( TRIM(name) == "nc"         )  p_3d => nc
+    IF ( TRIM(name) == "s"          )  p_3d => s
+    IF ( TRIM(name) == "diss"       )  p_3d => diss   
+    IF ( TRIM(name) == "nr_part"    )  i_2d => nr_part
+    IF ( TRIM(name) == "part_adr"   )  i_2d => part_adr
+    IF ( INDEX( TRIM(name), "chem_" ) /= 0 )  p_3d => chem_species(n)%conc
+
+!
+!-- Next line is just an example for a 2D array (not active for coupling!)
+!-- Please note, that z0 has to be declared as TARGET array in modules.f90
+!    IF ( TRIM(name) == "z0" )    p_2d => z0
+
+#if defined( __nopointer )
+    IF ( ASSOCIATED( p_3d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, p_3d, nz_cl, nz )
+    ELSEIF ( ASSOCIATED( p_2d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, p_2d )
+    ELSEIF ( ASSOCIATED( i_2d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, i_2d )
+    ELSE
+!
+!--    Give only one message for the root domain
+       IF ( myid == 0  .AND.  cpl_id == 1 )  THEN
+
+          message_string = 'pointer for array "' // TRIM( name ) //            &
+                           '" can''t be associated'
+          CALL message( 'pmci_set_array_pointer', 'PA0117', 3, 2, 0, 6, 0 )
+       ELSE
+!
+!--       Avoid others to continue
+          CALL MPI_BARRIER( comm2d, ierr )
+       ENDIF
+    ENDIF
+#else
+    IF ( TRIM(name) == "u"    )  p_3d_sec => u_2
+    IF ( TRIM(name) == "v"    )  p_3d_sec => v_2
+    IF ( TRIM(name) == "w"    )  p_3d_sec => w_2
+    IF ( TRIM(name) == "e"    )  p_3d_sec => e_2
+    IF ( TRIM(name) == "pt"   )  p_3d_sec => pt_2
+    IF ( TRIM(name) == "q"    )  p_3d_sec => q_2
+    IF ( TRIM(name) == "qc"   )  p_3d_sec => qc_2
+    IF ( TRIM(name) == "qr"   )  p_3d_sec => qr_2
+    IF ( TRIM(name) == "nr"   )  p_3d_sec => nr_2
+    IF ( TRIM(name) == "nc"   )  p_3d_sec => nc_2
+    IF ( TRIM(name) == "s"    )  p_3d_sec => s_2
+    IF ( TRIM(name) == "diss" )  p_3d_sec => diss_2
+    IF ( INDEX( TRIM(name), "chem_" ) /= 0 )  p_3d_sec => spec_conc_2(:,:,:,n)
+
+    IF ( ASSOCIATED( p_3d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, p_3d, nz_cl, nz,                    &
+                                 array_2 = p_3d_sec )
+    ELSEIF ( ASSOCIATED( p_2d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, p_2d )
+    ELSEIF ( ASSOCIATED( i_2d ) )  THEN
+       CALL pmc_s_set_dataarray( child_id, i_2d )
+    ELSE
+!
+!--    Give only one message for the root domain
+       IF ( myid == 0  .AND.  cpl_id == 1 )  THEN
+
+          message_string = 'pointer for array "' // TRIM( name ) //            &
+                           '" can''t be associated'
+          CALL message( 'pmci_set_array_pointer', 'PA0117', 3, 2, 0, 6, 0 )
+       ELSE
+!
+!--       Avoid others to continue
+          CALL MPI_BARRIER( comm2d, ierr )
+       ENDIF
+
+   ENDIF
+#endif
+
+#endif
+END SUBROUTINE pmci_set_array_pointer
+
+
+INTEGER FUNCTION get_number_of_childs ()
+
+   IMPLICIT NONE
+
+#if defined( __parallel )
+   get_number_of_childs = SIZE( pmc_parent_for_child ) - 1
+#else
+   get_number_of_childs = 0
+#endif
+
+   RETURN
+
+END FUNCTION get_number_of_childs
+
+
+INTEGER FUNCTION get_childid (id_index)
+
+   IMPLICIT NONE
+
+   INTEGER,INTENT(IN)                 :: id_index
+
+#if defined( __parallel )
+   get_childid = pmc_parent_for_child(id_index)
+#else
+   get_childid = 0
+#endif
+
+   RETURN
+
+END FUNCTION get_childid
+
+
+SUBROUTINE  get_child_edges (m, lx_coord, lx_coord_b, rx_coord, rx_coord_b,    &
+                               sy_coord, sy_coord_b, ny_coord, ny_coord_b,     &
+                               uz_coord, uz_coord_b)
+   IMPLICIT NONE
+   INTEGER,INTENT(IN)             ::  m
+   REAL(wp),INTENT(OUT)           ::  lx_coord, lx_coord_b
+   REAL(wp),INTENT(OUT)           ::  rx_coord, rx_coord_b
+   REAL(wp),INTENT(OUT)           ::  sy_coord, sy_coord_b
+   REAL(wp),INTENT(OUT)           ::  ny_coord, ny_coord_b
+   REAL(wp),INTENT(OUT)           ::  uz_coord, uz_coord_b
+
+   lx_coord = childgrid(m)%lx_coord
+   rx_coord = childgrid(m)%rx_coord
+   sy_coord = childgrid(m)%sy_coord
+   ny_coord = childgrid(m)%ny_coord
+   uz_coord = childgrid(m)%uz_coord
+
+   lx_coord_b = childgrid(m)%lx_coord_b
+   rx_coord_b = childgrid(m)%rx_coord_b
+   sy_coord_b = childgrid(m)%sy_coord_b
+   ny_coord_b = childgrid(m)%ny_coord_b
+   uz_coord_b = childgrid(m)%uz_coord_b
+
+END SUBROUTINE get_child_edges
+
+SUBROUTINE  get_child_gridspacing (m, dx,dy,dz)
+
+   IMPLICIT NONE
+   INTEGER,INTENT(IN)             ::  m
+   REAL(wp),INTENT(OUT)           ::  dx,dy
+   REAL(wp),INTENT(OUT),OPTIONAL  ::  dz
+
+   dx = childgrid(m)%dx
+   dy = childgrid(m)%dy
+   IF(PRESENT(dz))   THEN
+      dz = childgrid(m)%dz
+   ENDIF
+
+END SUBROUTINE get_child_gridspacing
+
+SUBROUTINE pmci_create_child_arrays( name, is, ie, js, je, nzc,n  )
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(IN) ::  name    !<
+
+    INTEGER(iwp), INTENT(IN) ::  ie      !<
+    INTEGER(iwp), INTENT(IN) ::  is      !<
+    INTEGER(iwp), INTENT(IN) ::  je      !<
+    INTEGER(iwp), INTENT(IN) ::  js      !<
+    INTEGER(iwp), INTENT(IN) ::  nzc     !<  Note that nzc is cg%nz
+
+    INTEGER(iwp), INTENT(IN), OPTIONAL ::  n  !< number of chemical species
+
+#if defined( __parallel )
+    INTEGER(iwp) ::  ierr    !<
+
+    REAL(wp), POINTER,DIMENSION(:,:)       ::  p_2d    !<
+    REAL(wp), POINTER,DIMENSION(:,:,:)     ::  p_3d    !<
+    INTEGER(idp), POINTER,DIMENSION(:,:)   ::  i_2d    !<
+
+
+    NULLIFY( p_3d )
+    NULLIFY( p_2d )
+    NULLIFY( i_2d )
+
+!
+!-- List of array names, which can be coupled
+    IF ( TRIM( name ) == "u" )  THEN
+       IF ( .NOT. ALLOCATED( uc ) )  ALLOCATE( uc(0:nzc+1,js:je,is:ie) )
+       p_3d => uc
+    ELSEIF ( TRIM( name ) == "v" )  THEN
+       IF ( .NOT. ALLOCATED( vc ) )  ALLOCATE( vc(0:nzc+1,js:je,is:ie) )
+       p_3d => vc
+    ELSEIF ( TRIM( name ) == "w" )  THEN
+       IF ( .NOT. ALLOCATED( wc ) )  ALLOCATE( wc(0:nzc+1,js:je,is:ie) )
+       p_3d => wc
+    ELSEIF ( TRIM( name ) == "e" )  THEN
+       IF ( .NOT. ALLOCATED( ec ) )  ALLOCATE( ec(0:nzc+1,js:je,is:ie) )
+       p_3d => ec
+    ELSEIF ( TRIM( name ) == "diss" )  THEN
+       IF ( .NOT. ALLOCATED( dissc ) )  ALLOCATE( dissc(0:nzc+1,js:je,is:ie) )
+       p_3d => dissc
+    ELSEIF ( TRIM( name ) == "pt")  THEN
+       IF ( .NOT. ALLOCATED( ptc ) )  ALLOCATE( ptc(0:nzc+1,js:je,is:ie) )
+       p_3d => ptc
+    ELSEIF ( TRIM( name ) == "q")  THEN
+       IF ( .NOT. ALLOCATED( q_c ) )  ALLOCATE( q_c(0:nzc+1,js:je,is:ie) )
+       p_3d => q_c
+    ELSEIF ( TRIM( name ) == "qc")  THEN
+       IF ( .NOT. ALLOCATED( qcc ) )  ALLOCATE( qcc(0:nzc+1,js:je,is:ie) )
+       p_3d => qcc
+    ELSEIF ( TRIM( name ) == "qr")  THEN
+       IF ( .NOT. ALLOCATED( qrc ) )  ALLOCATE( qrc(0:nzc+1,js:je,is:ie) )
+       p_3d => qrc
+    ELSEIF ( TRIM( name ) == "nr")  THEN
+       IF ( .NOT. ALLOCATED( nrc ) )  ALLOCATE( nrc(0:nzc+1,js:je,is:ie) )
+       p_3d => nrc
+    ELSEIF ( TRIM( name ) == "nc")  THEN
+       IF ( .NOT. ALLOCATED( ncc ) )  ALLOCATE( ncc(0:nzc+1,js:je,is:ie) )
+       p_3d => ncc
+    ELSEIF ( TRIM( name ) == "s")  THEN
+       IF ( .NOT. ALLOCATED( sc ) )  ALLOCATE( sc(0:nzc+1,js:je,is:ie) )
+       p_3d => sc
+    ELSEIF ( TRIM( name ) == "nr_part") THEN
+       IF ( .NOT. ALLOCATED( nr_partc ) )  ALLOCATE( nr_partc(js:je,is:ie) )
+       i_2d => nr_partc
+    ELSEIF ( TRIM( name ) == "part_adr") THEN
+       IF ( .NOT. ALLOCATED( part_adrc ) )  ALLOCATE( part_adrc(js:je,is:ie) )
+       i_2d => part_adrc
+    ELSEIF ( TRIM( name(1:5) ) == "chem_" )  THEN
+       IF ( .NOT. ALLOCATED( chem_spec_c ) )                                   &
+          ALLOCATE( chem_spec_c(0:nzc+1,js:je,is:ie,1:nspec) )
+       p_3d => chem_spec_c(:,:,:,n)
+    !ELSEIF (trim(name) == "z0") then
+       !IF (.not.allocated(z0c))  allocate(z0c(js:je, is:ie))
+       !p_2d => z0c
+    ENDIF
+
+    IF ( ASSOCIATED( p_3d ) )  THEN
+       CALL pmc_c_set_dataarray( p_3d )
+    ELSEIF ( ASSOCIATED( p_2d ) )  THEN
+       CALL pmc_c_set_dataarray( p_2d )
+    ELSEIF ( ASSOCIATED( i_2d ) )  THEN
+       CALL pmc_c_set_dataarray( i_2d )
+    ELSE
+!
+!--    Give only one message for the first child domain
+       IF ( myid == 0  .AND.  cpl_id == 2 )  THEN
+
+          message_string = 'pointer for array "' // TRIM( name ) //            &
+                           '" can''t be associated'
+          CALL message( 'pmci_create_child_arrays', 'PA0170', 3, 2, 0, 6, 0 )
+       ELSE
+!
+!--       Prevent others from continuing
+          CALL MPI_BARRIER( comm2d, ierr )
+       ENDIF
+    ENDIF
+
+#endif
+ END SUBROUTINE pmci_create_child_arrays
+
+
+
+ SUBROUTINE pmci_parent_initialize
+
+!
+!-- Send data for the children in order to let them create initial 
+!-- conditions by interpolating the parent-domain fields.
+#if defined( __parallel )
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  child_id    !<
+    INTEGER(iwp) ::  m           !<
+
+    REAL(wp) ::  waittime        !<
+
+
+    DO  m = 1, SIZE( pmc_parent_for_child ) - 1
+       child_id = pmc_parent_for_child(m)
+       CALL pmc_s_fillbuffer( child_id, waittime=waittime )
+    ENDDO
+
+#endif
+ END SUBROUTINE pmci_parent_initialize
+
+
+
+ SUBROUTINE pmci_child_initialize
+
+!
+!-- Create initial conditions for the current child domain by interpolating 
+!-- the parent-domain fields.
+#if defined( __parallel )
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i          !<
+    INTEGER(iwp) ::  icl        !<
+    INTEGER(iwp) ::  icr        !<
+    INTEGER(iwp) ::  j          !<
+    INTEGER(iwp) ::  jcn        !<
+    INTEGER(iwp) ::  jcs        !<
+    INTEGER(iwp) ::  k          !< 
+    INTEGER(iwp) ::  n          !< running index for chemical species
+
+    REAL(wp) ::  waittime       !<
+
+!
+!-- Root model is never anyone's child
+    IF ( cpl_id > 1 )  THEN
+!
+!--    Child domain boundaries in the parent index space
+       icl = coarse_bound(1)
+       icr = coarse_bound(2)
+       jcs = coarse_bound(3)
+       jcn = coarse_bound(4)
+!
+!--    Get data from the parent
+       CALL pmc_c_getbuffer( waittime = waittime )
+!
+!--    The interpolation.
+       CALL pmci_interp_tril_all ( u,  uc,  icu, jco, kco, r1xu, r2xu, r1yo,   &
+                                   r2yo, r1zo, r2zo, 'u' )
+       CALL pmci_interp_tril_all ( v,  vc,  ico, jcv, kco, r1xo, r2xo, r1yv,   &
+                                   r2yv, r1zo, r2zo, 'v' )
+       CALL pmci_interp_tril_all ( w,  wc,  ico, jco, kcw, r1xo, r2xo, r1yo,   &
+                                   r2yo, r1zw, r2zw, 'w' )
+
+       IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.          &
+            (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.           &
+               .NOT. constant_diffusion ) )  THEN
+          CALL pmci_interp_tril_all ( e,  ec,  ico, jco, kco, r1xo, r2xo, r1yo, &
+                                      r2yo, r1zo, r2zo, 'e' )
+       ENDIF
+
+       IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
+          CALL pmci_interp_tril_all ( diss,  dissc,  ico, jco, kco, r1xo, r2xo,&
+                                      r1yo, r2yo, r1zo, r2zo, 's' )
+       ENDIF
+
+       IF ( .NOT. neutral )  THEN
+          CALL pmci_interp_tril_all ( pt, ptc, ico, jco, kco, r1xo, r2xo,      &
+                                      r1yo, r2yo, r1zo, r2zo, 's' )
+       ENDIF
+
+       IF ( humidity )  THEN
+
+          CALL pmci_interp_tril_all ( q, q_c, ico, jco, kco, r1xo, r2xo, r1yo, &
+                                      r2yo, r1zo, r2zo, 's' )
+
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+             CALL pmci_interp_tril_all ( qc, qcc, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo, 's' ) 
+             CALL pmci_interp_tril_all ( nc, ncc, ico, jco, kco, r1xo, r2xo,   &
+                                         r1yo, r2yo, r1zo, r2zo, 's' )   
+          ENDIF
+
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+             CALL pmci_interp_tril_all ( qr, qrc, ico, jco, kco, r1xo, r2xo,   &
+                                         r1yo, r2yo, r1zo, r2zo, 's' )
+             CALL pmci_interp_tril_all ( nr, nrc, ico, jco, kco, r1xo, r2xo,   &
+                                         r1yo, r2yo, r1zo, r2zo, 's' )
+          ENDIF
+
+       ENDIF
+
+       IF ( passive_scalar )  THEN
+          CALL pmci_interp_tril_all ( s, sc, ico, jco, kco, r1xo, r2xo, r1yo,  &
+                                      r2yo, r1zo, r2zo, 's' )
+       ENDIF
+
+       IF ( air_chemistry  .AND.  nest_chemistry)  THEN
+          DO  n = 1, nspec
+             CALL pmci_interp_tril_all ( chem_species(n)%conc,                 &
+                                         chem_spec_c(:,:,:,n),                 &
+                                         ico, jco, kco, r1xo, r2xo, r1yo,      &
+                                         r2yo, r1zo, r2zo, 's' )
+          ENDDO
+       ENDIF
+
+       IF ( topography /= 'flat' )  THEN
+!
+!--       Inside buildings set velocities and TKE back to zero.
+!--       Other scalars (pt, q, s, km, kh, p, sa, ...) are ignored at present,
+!--       maybe revise later.
+          DO   i = nxlg, nxrg
+             DO   j = nysg, nyng
+                DO  k = nzb, nzt
+                   u(k,j,i)   = MERGE( u(k,j,i), 0.0_wp,                       &
+                                       BTEST( wall_flags_0(k,j,i), 1 ) )
+                   v(k,j,i)   = MERGE( v(k,j,i), 0.0_wp,                       &
+                                       BTEST( wall_flags_0(k,j,i), 2 ) )
+                   w(k,j,i)   = MERGE( w(k,j,i), 0.0_wp,                       &
+                                       BTEST( wall_flags_0(k,j,i), 3 ) )
+!                    e(k,j,i)   = MERGE( e(k,j,i), 0.0_wp,                       &
+!                                        BTEST( wall_flags_0(k,j,i), 0 ) )
+                   u_p(k,j,i) = MERGE( u_p(k,j,i), 0.0_wp,                     &
+                                       BTEST( wall_flags_0(k,j,i), 1 ) )
+                   v_p(k,j,i) = MERGE( v_p(k,j,i), 0.0_wp,                     &
+                                       BTEST( wall_flags_0(k,j,i), 2 ) )
+                   w_p(k,j,i) = MERGE( w_p(k,j,i), 0.0_wp,                     &
+                                       BTEST( wall_flags_0(k,j,i), 3 ) )
+!                    e_p(k,j,i) = MERGE( e_p(k,j,i), 0.0_wp,                     &
+!                                        BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+
+
+ CONTAINS
+
+
+    SUBROUTINE pmci_interp_tril_all( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y,    &
+                                     r1z, r2z, var )
+!
+!--    Interpolation of the internal values for the child-domain initialization
+!--    This subroutine is based on trilinear interpolation.
+!--    Coding based on interp_tril_lr/sn/t
+       IMPLICIT NONE
+
+       CHARACTER(LEN=1), INTENT(IN) :: var  !<
+
+       INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic    !<
+       INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc    !<
+       INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc    !<
+
+       INTEGER(iwp) ::  i        !<
+       INTEGER(iwp) ::  ib       !<
+       INTEGER(iwp) ::  ie       !<
+       INTEGER(iwp) ::  j        !<
+       INTEGER(iwp) ::  jb       !<
+       INTEGER(iwp) ::  je       !<
+       INTEGER(iwp) ::  k        !<
+       INTEGER(iwp) ::  k_wall   !<
+       INTEGER(iwp) ::  k1       !<
+       INTEGER(iwp) ::  kb       !<
+       INTEGER(iwp) ::  kbc      !<
+       INTEGER(iwp) ::  l        !<
+       INTEGER(iwp) ::  m        !<
+       INTEGER(iwp) ::  n        !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(INOUT) :: f !<
+       REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(IN) :: fc       !<
+       REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN) :: r1x   !<
+       REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN) :: r2x   !<
+       REAL(wp), DIMENSION(nysg:nyng), INTENT(IN) :: r1y   !<
+       REAL(wp), DIMENSION(nysg:nyng), INTENT(IN) :: r2y   !<
+       REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r1z   !<
+       REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN) :: r2z   !<
+
+       REAL(wp) ::  fk         !<
+       REAL(wp) ::  fkj        !<
+       REAL(wp) ::  fkjp       !<
+       REAL(wp) ::  fkp        !<
+       REAL(wp) ::  fkpj       !<
+       REAL(wp) ::  fkpjp      !<
+       REAL(wp) ::  logratio   !<
+       REAL(wp) ::  logzuc1    !<
+       REAL(wp) ::  zuc1       !<
+       REAL(wp) ::  z0_topo    !<  roughness at vertical walls
+
+
+       ib = nxl
+       ie = nxr
+       jb = nys
+       je = nyn
+       IF ( nesting_mode /= 'vertical' )  THEN
+          IF ( bc_dirichlet_l )  THEN
+             ib = nxl - 1
+!
+!--          For u, nxl is a ghost node, but not for the other variables
+             IF ( var == 'u' )  THEN
+                ib = nxl
+             ENDIF
+          ENDIF
+          IF ( bc_dirichlet_s )  THEN
+             jb = nys - 1
+!
+!--          For v, nys is a ghost node, but not for the other variables
+             IF ( var == 'v' )  THEN
+                jb = nys
+             ENDIF
+          ENDIF
+          IF ( bc_dirichlet_r )  THEN
+             ie = nxr + 1
+          ENDIF
+          IF ( bc_dirichlet_n )  THEN
+             je = nyn + 1
+          ENDIF
+       ENDIF
+!
+!--    Trilinear interpolation.
+       DO  i = ib, ie
+          DO  j = jb, je
+!
+!--          Determine the vertical index of the first node above the
+!--          topography top at grid point (j,i) in order to not overwrite 
+!--          the bottom BC.
+             kb = get_topography_top_index_ji( j, i, TRIM ( var ) ) + 1
+             DO  k = kb, nzt + 1
+                l = ic(i)
+                m = jc(j)
+                n = kc(k)
+                fkj      = r1x(i) * fc(n,m,l)     + r2x(i) * fc(n,m,l+1)
+                fkjp     = r1x(i) * fc(n,m+1,l)   + r2x(i) * fc(n,m+1,l+1)
+                fkpj     = r1x(i) * fc(n+1,m,l)   + r2x(i) * fc(n+1,m,l+1)
+                fkpjp    = r1x(i) * fc(n+1,m+1,l) + r2x(i) * fc(n+1,m+1,l+1)
+                fk       = r1y(j) * fkj  + r2y(j) * fkjp
+                fkp      = r1y(j) * fkpj + r2y(j) * fkpjp
+                f(k,j,i) = r1z(k) * fk   + r2z(k) * fkp
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Correct the interpolated values of u and v in near-wall nodes, i.e. in
+!--    the nodes below the coarse-grid nodes with k=1. The corrction is only
+!--    made over horizontal wall surfaces in this phase. For the nest boundary
+!--    conditions, a corresponding correction is made for all vertical walls,
+!--    too.
+       IF ( constant_flux_layer .AND. ( var == 'u' .OR. var == 'v' ) )  THEN
+          z0_topo = roughness_length
+          DO  i = ib, nxr
+             DO  j = jb, nyn
+!
+!--             Determine vertical index of topography top at grid point (j,i)
+                k_wall = get_topography_top_index_ji( j, i, TRIM ( var ) )
+!
+!--             kbc is the first coarse-grid point above the surface
+                kbc = 1
+                DO  WHILE ( cg%zu(kbc) < zu(k_wall) )
+                   kbc = kbc + 1
+                ENDDO
+                zuc1 = cg%zu(kbc)
+                k1   = k_wall + 1
+                DO  WHILE ( zu(k1) < zuc1 )
+                   k1 = k1 + 1
+                ENDDO
+                logzuc1 = LOG( ( zu(k1) - zu(k_wall) ) / z0_topo )
+
+                k = k_wall + 1
+                DO  WHILE ( zu(k) < zuc1 )
+                   logratio = ( LOG( ( zu(k) - zu(k_wall) ) / z0_topo ) ) /    &
+                                logzuc1
+                   f(k,j,i) = logratio * f(k1,j,i)
+                   k  = k + 1
+                ENDDO
+                f(k_wall,j,i) = 0.0_wp
+             ENDDO
+          ENDDO
+
+       ELSEIF ( var == 'w' )  THEN
+
+          DO  i = ib, nxr
+              DO  j = jb, nyn
+!
+!--              Determine vertical index of topography top at grid point (j,i)
+                 k_wall = get_topography_top_index_ji( j, i, 'w' )
+
+                 f(k_wall,j,i) = 0.0_wp
+              ENDDO
+           ENDDO
+
+       ENDIF
+
+    END SUBROUTINE pmci_interp_tril_all
+
+#endif
+ END SUBROUTINE pmci_child_initialize
+
+
+
+ SUBROUTINE pmci_check_setting_mismatches
+!
+!-- Check for mismatches between settings of master and child variables
+!-- (e.g., all children have to follow the end_time settings of the root model).
+!-- The root model overwrites variables in the other models, so these variables
+!-- only need to be set once in file PARIN.
+
+#if defined( __parallel )
+
+    USE control_parameters,                                                    &
+        ONLY:  dt_restart, end_time, message_string, restart_time, time_restart
+
+    IMPLICIT NONE
+
+    INTEGER ::  ierr
+
+    REAL(wp) ::  dt_restart_root
+    REAL(wp) ::  end_time_root
+    REAL(wp) ::  restart_time_root
+    REAL(wp) ::  time_restart_root
+
+!
+!-- Check the time to be simulated.
+!-- Here, and in the following, the root process communicates the respective
+!-- variable to all others, and its value will then be compared with the local
+!-- values.
+    IF ( pmc_is_rootmodel() )  end_time_root = end_time
+    CALL MPI_BCAST( end_time_root, 1, MPI_REAL, 0, comm_world_nesting, ierr )
+
+    IF ( .NOT. pmc_is_rootmodel() )  THEN
+       IF ( end_time /= end_time_root )  THEN
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings:& end_time(root) = ', end_time_root,            &
+               '& end_time(child) = ', end_time, '& child value is set',       &
+               ' to root value'
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
+                        0 )
+          end_time = end_time_root
+       ENDIF
+    ENDIF
+!
+!-- Same for restart time
+    IF ( pmc_is_rootmodel() )  restart_time_root = restart_time
+    CALL MPI_BCAST( restart_time_root, 1, MPI_REAL, 0, comm_world_nesting, ierr )
+
+    IF ( .NOT. pmc_is_rootmodel() )  THEN
+       IF ( restart_time /= restart_time_root )  THEN
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings: & restart_time(root) = ', restart_time_root,   &
+               '& restart_time(child) = ', restart_time, '& child ',           &
+               'value is set to root value'
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
+                        0 )
+          restart_time = restart_time_root
+       ENDIF
+    ENDIF
+!
+!-- Same for dt_restart
+    IF ( pmc_is_rootmodel() )  dt_restart_root = dt_restart
+    CALL MPI_BCAST( dt_restart_root, 1, MPI_REAL, 0, comm_world_nesting, ierr )
+
+    IF ( .NOT. pmc_is_rootmodel() )  THEN
+       IF ( dt_restart /= dt_restart_root )  THEN
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings: & dt_restart(root) = ', dt_restart_root,       &
+               '& dt_restart(child) = ', dt_restart, '& child ',               &
+               'value is set to root value'
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
+                        0 )
+          dt_restart = dt_restart_root
+       ENDIF
+    ENDIF
+!
+!-- Same for time_restart
+    IF ( pmc_is_rootmodel() )  time_restart_root = time_restart
+    CALL MPI_BCAST( time_restart_root, 1, MPI_REAL, 0, comm_world_nesting, ierr )
+
+    IF ( .NOT. pmc_is_rootmodel() )  THEN
+       IF ( time_restart /= time_restart_root )  THEN
+          WRITE( message_string, * )  'mismatch between root model and ',      &
+               'child settings: & time_restart(root) = ', time_restart_root,   &
+               '& time_restart(child) = ', time_restart, '& child ',           &
+               'value is set to root value'
+          CALL message( 'pmci_check_setting_mismatches', 'PA0419', 0, 1, 0, 6, &
+                        0 )
+          time_restart = time_restart_root
+       ENDIF
+    ENDIF
+
+#endif
+
+ END SUBROUTINE pmci_check_setting_mismatches
+
+
+
+ SUBROUTINE pmci_ensure_nest_mass_conservation
+
+!
+!-- Adjust the volume-flow rate through the top boundary so that the net volume
+!-- flow through all boundaries of the current nest domain becomes zero.
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                           !<
+    INTEGER(iwp) ::  ierr                        !<
+    INTEGER(iwp) ::  j                           !<
+    INTEGER(iwp) ::  k                           !<
+
+    REAL(wp) ::  dxdy                            !<
+    REAL(wp) ::  innor                           !<
+    REAL(wp) ::  w_lt                            !<
+    REAL(wp), DIMENSION(1:3) ::  volume_flow_l   !<
+
+!
+!-- Sum up the volume flow through the left/right boundaries
+    volume_flow(1)   = 0.0_wp
+    volume_flow_l(1) = 0.0_wp
+
+    IF ( bc_dirichlet_l )  THEN
+       i = 0
+       innor = dy
+       DO   j = nys, nyn
+          DO   k = nzb+1, nzt
+             volume_flow_l(1) = volume_flow_l(1) + innor * u(k,j,i) * dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 ) )
+          ENDDO
+       ENDDO
+    ENDIF
+
+    IF ( bc_dirichlet_r )  THEN
+       i = nx + 1
+       innor = -dy
+       DO   j = nys, nyn
+          DO   k = nzb+1, nzt
+             volume_flow_l(1) = volume_flow_l(1) + innor * u(k,j,i) * dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 ) )
+          ENDDO
+       ENDDO
+    ENDIF
+
+#if defined( __parallel )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( volume_flow_l(1), volume_flow(1), 1, MPI_REAL,         &
+                        MPI_SUM, comm2d, ierr )
+#else
+    volume_flow(1) = volume_flow_l(1)
+#endif
+    
+!
+!-- Sum up the volume flow through the south/north boundaries
+    volume_flow(2)   = 0.0_wp
+    volume_flow_l(2) = 0.0_wp
+
+    IF ( bc_dirichlet_s )  THEN
+       j = 0
+       innor = dx
+       DO   i = nxl, nxr
+          DO   k = nzb+1, nzt
+             volume_flow_l(2) = volume_flow_l(2) + innor * v(k,j,i) * dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 ) )
+          ENDDO
+       ENDDO
+    ENDIF
+
+    IF ( bc_dirichlet_n )  THEN
+       j = ny + 1
+       innor = -dx
+       DO   i = nxl, nxr
+          DO   k = nzb+1, nzt
+             volume_flow_l(2) = volume_flow_l(2) + innor * v(k,j,i) * dzw(k)   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 ) )
+          ENDDO
+       ENDDO
+    ENDIF
+
+#if defined( __parallel )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL,         &
+                        MPI_SUM, comm2d, ierr )
+#else
+    volume_flow(2) = volume_flow_l(2)
+#endif
+
+!
+!-- Sum up the volume flow through the top boundary
+    volume_flow(3)   = 0.0_wp
+    volume_flow_l(3) = 0.0_wp
+    dxdy = dx * dy
+    k = nzt
+    DO   i = nxl, nxr
+       DO   j = nys, nyn
+          volume_flow_l(3) = volume_flow_l(3) - w(k,j,i) * dxdy
+       ENDDO
+    ENDDO
+
+#if defined( __parallel )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLREDUCE( volume_flow_l(3), volume_flow(3), 1, MPI_REAL,         &
+                        MPI_SUM, comm2d, ierr )
+#else
+    volume_flow(3) = volume_flow_l(3)
+#endif
+
+!
+!-- Correct the top-boundary value of w
+    w_lt = (volume_flow(1) + volume_flow(2) + volume_flow(3)) / area_t
+    DO   i = nxl, nxr
+       DO   j = nys, nyn
+          DO  k = nzt, nzt + 1
+             w(k,j,i) = w(k,j,i) + w_lt
+          ENDDO
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE pmci_ensure_nest_mass_conservation
+
+
+
+ SUBROUTINE pmci_synchronize
+
+#if defined( __parallel )
+!
+!-- Unify the time steps for each model and synchronize using 
+!-- MPI_ALLREDUCE with the MPI_MIN operator over all processes using 
+!-- the global communicator MPI_COMM_WORLD.
+   
+   IMPLICIT NONE
+
+   INTEGER(iwp)           :: ierr  !<
+   REAL(wp), DIMENSION(1) :: dtl   !<
+   REAL(wp), DIMENSION(1) :: dtg   !<
+
+   
+   dtl(1) = dt_3d 
+   CALL MPI_ALLREDUCE( dtl, dtg, 1, MPI_REAL, MPI_MIN, MPI_COMM_WORLD, ierr )
+   dt_3d  = dtg(1)
+
+#endif
+ END SUBROUTINE pmci_synchronize
+                
+
+
+ SUBROUTINE pmci_set_swaplevel( swaplevel )
+
+!
+!-- After each Runge-Kutta sub-timestep, alternately set buffer one or buffer
+!-- two active
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  swaplevel  !< swaplevel (1 or 2) of PALM's
+                                            !< timestep
+
+    INTEGER(iwp)            ::  child_id    !<
+    INTEGER(iwp)            ::  m           !<
+
+#if defined( __parallel )
+    DO  m = 1, SIZE( pmc_parent_for_child )-1
+       child_id = pmc_parent_for_child(m)
+       CALL pmc_s_set_active_data_array( child_id, swaplevel )
+    ENDDO
+#endif
+ END SUBROUTINE pmci_set_swaplevel
+
+
+
+ SUBROUTINE pmci_datatrans( local_nesting_mode )
+!
+!-- This subroutine controls the nesting according to the nestpar 
+!-- parameter nesting_mode (two-way (default) or one-way) and the 
+!-- order of anterpolations according to the nestpar parameter 
+!-- nesting_datatransfer_mode (cascade, overlap or mixed (default)).
+!-- Although nesting_mode is a variable of this model, pass it as 
+!-- an argument to allow for example to force one-way initialization 
+!-- phase.
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(IN) ::  local_nesting_mode
+
+
+    IF ( TRIM( local_nesting_mode ) == 'one-way' )  THEN
+
+       CALL pmci_child_datatrans( parent_to_child )
+       CALL pmci_parent_datatrans( parent_to_child )
+
+    ELSE
+
+       IF( nesting_datatransfer_mode == 'cascade' )  THEN
+
+          CALL pmci_child_datatrans( parent_to_child )
+          CALL pmci_parent_datatrans( parent_to_child )
+
+          CALL pmci_parent_datatrans( child_to_parent )
+          CALL pmci_child_datatrans( child_to_parent )
+
+       ELSEIF( nesting_datatransfer_mode == 'overlap')  THEN
+
+          CALL pmci_parent_datatrans( parent_to_child )
+          CALL pmci_child_datatrans( parent_to_child )
+
+          CALL pmci_child_datatrans( child_to_parent )
+          CALL pmci_parent_datatrans( child_to_parent )
+
+       ELSEIF( TRIM( nesting_datatransfer_mode ) == 'mixed' )  THEN
+
+          CALL pmci_parent_datatrans( parent_to_child )
+          CALL pmci_child_datatrans( parent_to_child )
+
+          CALL pmci_parent_datatrans( child_to_parent )
+          CALL pmci_child_datatrans( child_to_parent )
+
+       ENDIF
+
+    ENDIF
+
+ END SUBROUTINE pmci_datatrans
+
+
+
+ SUBROUTINE pmci_parent_datatrans( direction )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  direction   !<
+
+#if defined( __parallel )
+    INTEGER(iwp) ::  child_id    !<
+    INTEGER(iwp) ::  i           !<
+    INTEGER(iwp) ::  j           !<
+    INTEGER(iwp) ::  k           !<
+    INTEGER(iwp) ::  m           !<
+
+
+    DO  m = 1, SIZE( pmc_parent_for_child ) - 1
+       child_id = pmc_parent_for_child(m)
+       
+       IF ( direction == parent_to_child )  THEN
+          CALL cpu_log( log_point_s(71), 'pmc parent send', 'start' )
+          CALL pmc_s_fillbuffer( child_id )
+          CALL cpu_log( log_point_s(71), 'pmc parent send', 'stop' )
+       ELSE
+!
+!--       Communication from child to parent
+          CALL cpu_log( log_point_s(72), 'pmc parent recv', 'start' )
+          child_id = pmc_parent_for_child(m)
+          CALL pmc_s_getdata_from_buffer( child_id )
+          CALL cpu_log( log_point_s(72), 'pmc parent recv', 'stop' )
+!
+!--       The anterpolated data is now available in u etc
+          IF ( topography /= 'flat' )  THEN
+!
+!--          Inside buildings/topography reset velocities back to zero.
+!--          Scalars (pt, q, s, km, kh, p, sa, ...) are ignored at
+!--          present, maybe revise later.
+!--          Resetting of e is removed as unnecessary since e is not 
+!--          anterpolated, and as incorrect since it overran the default 
+!--          Neumann condition (bc_e_b). 
+             DO   i = nxlg, nxrg
+                DO   j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      u(k,j,i)  = MERGE( u(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 1 ) )
+                      v(k,j,i)  = MERGE( v(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 2 ) )
+                      w(k,j,i)  = MERGE( w(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 3 ) )
+!
+!--                 TO_DO: zero setting of temperature within topography creates
+!--                       wrong results
+!                   pt(nzb:nzb_s_inner(j,i),j,i) = 0.0_wp
+!                   IF ( humidity  .OR.  passive_scalar )  THEN
+!                      q(nzb:nzb_s_inner(j,i),j,i) = 0.0_wp
+!                   ENDIF
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+    ENDDO
+
+#endif
+ END SUBROUTINE pmci_parent_datatrans
+
+
+
+ SUBROUTINE pmci_child_datatrans( direction )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  direction   !<
+
+#if defined( __parallel )
+    INTEGER(iwp) ::  icl         !<
+    INTEGER(iwp) ::  icr         !<
+    INTEGER(iwp) ::  jcs         !<
+    INTEGER(iwp) ::  jcn         !<
+    
+    REAL(wp), DIMENSION(1) ::  dtl         !<
+
+
+    dtl = dt_3d
+    IF ( cpl_id > 1 )  THEN
+!
+!--    Child domain boundaries in the parent indice space.
+       icl = coarse_bound(1)
+       icr = coarse_bound(2)
+       jcs = coarse_bound(3)
+       jcn = coarse_bound(4)
+
+       IF ( direction == parent_to_child )  THEN
+
+          CALL cpu_log( log_point_s(73), 'pmc child recv', 'start' )
+          CALL pmc_c_getbuffer( )
+          CALL cpu_log( log_point_s(73), 'pmc child recv', 'stop' )
+
+          CALL cpu_log( log_point_s(75), 'pmc interpolation', 'start' )
+          CALL pmci_interpolation
+          CALL cpu_log( log_point_s(75), 'pmc interpolation', 'stop' )
+
+       ELSE
+!
+!--       direction == child_to_parent
+          CALL cpu_log( log_point_s(76), 'pmc anterpolation', 'start' )
+          CALL pmci_anterpolation
+          CALL cpu_log( log_point_s(76), 'pmc anterpolation', 'stop' )
+
+          CALL cpu_log( log_point_s(74), 'pmc child send', 'start' )
+          CALL pmc_c_putbuffer( )
+          CALL cpu_log( log_point_s(74), 'pmc child send', 'stop' )
+
+       ENDIF
+    ENDIF
+
+  CONTAINS
+
+   
+    SUBROUTINE pmci_interpolation
+
+!
+!--    A wrapper routine for all interpolation actions
+      
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  n          !< running index for number of chemical species
+      
+!
+!--    In case of vertical nesting no interpolation is needed for the
+!--    horizontal boundaries
+       IF ( nesting_mode /= 'vertical' )  THEN
+       
+!
+!--       Left border pe:
+          IF ( bc_dirichlet_l )  THEN
+             
+             CALL pmci_interp_tril_lr( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_l, logc_ratio_u_l,               &
+                                       logc_kbounds_u_l,                       &
+                                       nzt_topo_nestbc_l, 'l', 'u' )
+
+             CALL pmci_interp_tril_lr( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_l, logc_ratio_v_l,               &
+                                       logc_kbounds_v_l,                       &               
+                                       nzt_topo_nestbc_l, 'l', 'v' )
+
+             CALL pmci_interp_tril_lr( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_l, logc_ratio_w_l,               &
+                                       logc_kbounds_w_l,                       &
+                                       nzt_topo_nestbc_l, 'l', 'w' )
+
+             IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.   &
+                  (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.    &
+                     .NOT. constant_diffusion ) )  THEN
+                CALL pmci_interp_tril_lr( e,  ec,  ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_l, logc_ratio_w_l,            &
+                                          logc_kbounds_w_l,                    &
+                                          nzt_topo_nestbc_l, 'l', 'e' )
+             ENDIF
+
+             IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
+                CALL pmci_interp_tril_lr( diss,  dissc,  ico, jco, kco, r1xo,  &
+                                          r2xo, r1yo, r2yo, r1zo, r2zo,        &
+                                          logc_w_l, logc_ratio_w_l,            &
+                                          logc_kbounds_w_l,                    &
+                                          nzt_topo_nestbc_l, 'l', 's' )
+             ENDIF
+
+             IF ( .NOT. neutral )  THEN
+                CALL pmci_interp_tril_lr( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_l, logc_ratio_w_l,            &
+                                          logc_kbounds_w_l,                    &                
+                                          nzt_topo_nestbc_l, 'l', 's' )
+             ENDIF
+
+             IF ( humidity )  THEN
+
+                CALL pmci_interp_tril_lr( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_l, logc_ratio_w_l,            &
+                                          logc_kbounds_w_l,                    &
+                                          nzt_topo_nestbc_l, 'l', 's' )
+
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+                   CALL pmci_interp_tril_lr( qc, qcc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_l, logc_ratio_w_l,         &
+                                             logc_kbounds_w_l,                 &
+                                             nzt_topo_nestbc_l, 'l', 's' )  
+
+                   CALL pmci_interp_tril_lr( nc, ncc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_l, logc_ratio_w_l,         &
+                                             logc_kbounds_w_l,                 &
+                                             nzt_topo_nestbc_l, 'l', 's' )          
+                ENDIF
+
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+                   CALL pmci_interp_tril_lr( qr, qrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_l, logc_ratio_w_l,         &
+                                             logc_kbounds_w_l,                 &
+                                             nzt_topo_nestbc_l, 'l', 's' ) 
+
+                   CALL pmci_interp_tril_lr( nr, nrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_l, logc_ratio_w_l,         &
+                                             logc_kbounds_w_l,                 &                
+                                             nzt_topo_nestbc_l, 'l', 's' )             
+                ENDIF
+
+             ENDIF
+
+             IF ( passive_scalar )  THEN
+                CALL pmci_interp_tril_lr( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_l, logc_ratio_w_l,            &
+                                          logc_kbounds_w_l,                    & 
+                                          nzt_topo_nestbc_l, 'l', 's' )
+             ENDIF
+
+             IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+                DO  n = 1, nspec
+                   CALL pmci_interp_tril_lr( chem_species(n)%conc,             &
+                                             chem_spec_c(:,:,:,n),             &
+                                             ico, jco, kco, r1xo, r2xo,        &
+                                             r1yo, r2yo, r1zo, r2zo,           &
+                                             logc_w_l, logc_ratio_w_l,         &
+                                             logc_kbounds_w_l,                 & 
+                                             nzt_topo_nestbc_l, 'l', 's' )
+                ENDDO
+             ENDIF
+
+          ENDIF
+!
+!--       Right border pe
+          IF ( bc_dirichlet_r )  THEN
+             
+             CALL pmci_interp_tril_lr( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_r, logc_ratio_u_r,               &
+                                       logc_kbounds_u_r,                       &
+                                       nzt_topo_nestbc_r, 'r', 'u' )
+
+             CALL pmci_interp_tril_lr( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_r, logc_ratio_v_r,               &
+                                       logc_kbounds_v_r,                       &
+                                       nzt_topo_nestbc_r, 'r', 'v' )
+
+             CALL pmci_interp_tril_lr( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_r, logc_ratio_w_r,               &
+                                       logc_kbounds_w_r,                       &
+                                       nzt_topo_nestbc_r, 'r', 'w' )
+
+             IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.   &
+                  (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.    &
+                     .NOT. constant_diffusion ) )  THEN
+                CALL pmci_interp_tril_lr( e,  ec,  ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo,r2yo, r1zo, r2zo,               &
+                                          logc_w_r, logc_ratio_w_r,            &
+                                          logc_kbounds_w_r,                    &
+                                          nzt_topo_nestbc_r, 'r', 'e' )
+
+             ENDIF
+
+             IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
+                CALL pmci_interp_tril_lr( diss,  dissc,  ico, jco, kco, r1xo,  &
+                                          r2xo, r1yo,r2yo, r1zo, r2zo,         &
+                                          logc_w_r, logc_ratio_w_r,            &
+                                          logc_kbounds_w_r,                    &
+                                          nzt_topo_nestbc_r, 'r', 's' )
+
+             ENDIF
+
+             IF ( .NOT. neutral )  THEN
+                CALL pmci_interp_tril_lr( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_r, logc_ratio_w_r,            &
+                                          logc_kbounds_w_r,                    &
+                                          nzt_topo_nestbc_r, 'r', 's' )
+             ENDIF
+
+             IF ( humidity )  THEN
+                CALL pmci_interp_tril_lr( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_r, logc_ratio_w_r,            &
+                                          logc_kbounds_w_r,                    &
+                                          nzt_topo_nestbc_r, 'r', 's' )
+
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+
+                   CALL pmci_interp_tril_lr( qc, qcc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_r, logc_ratio_w_r,         &
+                                             logc_kbounds_w_r,                 &
+                                             nzt_topo_nestbc_r, 'r', 's' ) 
+     
+                   CALL pmci_interp_tril_lr( nc, ncc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_r, logc_ratio_w_r,         &
+                                             logc_kbounds_w_r,                 &
+                                             nzt_topo_nestbc_r, 'r', 's' )
+
+
+                ENDIF
+
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+
+     
+                   CALL pmci_interp_tril_lr( qr, qrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_r, logc_ratio_w_r,         &
+                                             logc_kbounds_w_r,                 &
+                                             nzt_topo_nestbc_r, 'r', 's' ) 
+
+                   CALL pmci_interp_tril_lr( nr, nrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_r, logc_ratio_w_r,         &
+                                             logc_kbounds_w_r,                 &
+                                             nzt_topo_nestbc_r, 'r', 's' ) 
+
+                ENDIF
+
+             ENDIF
+
+             IF ( passive_scalar )  THEN
+                CALL pmci_interp_tril_lr( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_r, logc_ratio_w_r,            &
+                                          logc_kbounds_w_r,                    &
+                                          nzt_topo_nestbc_r, 'r', 's' )
+             ENDIF
+
+             IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+                DO  n = 1, nspec
+                   CALL pmci_interp_tril_lr( chem_species(n)%conc,             &
+                                             chem_spec_c(:,:,:,n),             &
+                                             ico, jco, kco, r1xo, r2xo,        &
+                                             r1yo, r2yo, r1zo, r2zo,           &
+                                             logc_w_r, logc_ratio_w_r,         &
+                                             logc_kbounds_w_r,                 &
+                                             nzt_topo_nestbc_r, 'r', 's' )
+                ENDDO
+             ENDIF
+          ENDIF
+!
+!--       South border pe
+          IF ( bc_dirichlet_s )  THEN
+
+             CALL pmci_interp_tril_sn( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_s, logc_ratio_u_s,               &
+                                       logc_kbounds_u_s,                       &
+                                       nzt_topo_nestbc_s, 's', 'u' )
+
+             CALL pmci_interp_tril_sn( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_s, logc_ratio_v_s,               &
+                                       logc_kbounds_v_s,                       &
+                                       nzt_topo_nestbc_s, 's', 'v' )
+
+             CALL pmci_interp_tril_sn( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_s, logc_ratio_w_s,               &
+                                       logc_kbounds_w_s,                       &
+                                       nzt_topo_nestbc_s, 's','w' )
+
+             IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.   &
+                  (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.    &
+                     .NOT. constant_diffusion ) )  THEN
+                CALL pmci_interp_tril_sn( e,  ec,  ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_s, logc_ratio_w_s,            &
+                                          logc_kbounds_w_s,                    &
+                                          nzt_topo_nestbc_s, 's', 'e' )
+
+             ENDIF
+
+             IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
+                CALL pmci_interp_tril_sn( diss, dissc,  ico, jco, kco, r1xo,   &
+                                          r2xo, r1yo, r2yo, r1zo, r2zo,        &
+                                          logc_w_s, logc_ratio_w_s,            &
+                                          logc_kbounds_w_s,                    &
+                                          nzt_topo_nestbc_s, 's', 's' )
+
+             ENDIF
+
+             IF ( .NOT. neutral )  THEN
+                CALL pmci_interp_tril_sn( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_s, logc_ratio_w_s,            &
+                                          logc_kbounds_w_s,                    &
+                                          nzt_topo_nestbc_s, 's', 's' )
+             ENDIF
+
+             IF ( humidity )  THEN
+                CALL pmci_interp_tril_sn( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo,r2yo, r1zo, r2zo,               &
+                                          logc_w_s, logc_ratio_w_s,            &
+                                          logc_kbounds_w_s,                    &
+                                          nzt_topo_nestbc_s, 's', 's' )
+
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+
+                   CALL pmci_interp_tril_sn( qc, qcc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo,r2yo, r1zo, r2zo,      &
+                                             logc_w_s, logc_ratio_w_s,         &
+                                             logc_kbounds_w_s,                 &
+                                             nzt_topo_nestbc_s, 's', 's' )
+
+                   CALL pmci_interp_tril_sn( nc, ncc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo,r2yo, r1zo, r2zo,      &
+                                             logc_w_s, logc_ratio_w_s,         &
+                                             logc_kbounds_w_s,                 &
+                                             nzt_topo_nestbc_s, 's', 's' )
+
+                ENDIF
+
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+
+                   CALL pmci_interp_tril_sn( qr, qrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo,r2yo, r1zo, r2zo,      &
+                                             logc_w_s, logc_ratio_w_s,         &
+                                             logc_kbounds_w_s,                 &
+                                             nzt_topo_nestbc_s, 's', 's' )
+
+                   CALL pmci_interp_tril_sn( nr, nrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo,r2yo, r1zo, r2zo,      &
+                                             logc_w_s, logc_ratio_w_s,         &
+                                             logc_kbounds_w_s,                 &
+                                             nzt_topo_nestbc_s, 's', 's' )
+
+                ENDIF
+
+             ENDIF
+
+             IF ( passive_scalar )  THEN
+                CALL pmci_interp_tril_sn( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo,r2yo, r1zo, r2zo,               &
+                                          logc_w_s, logc_ratio_w_s,            &
+                                          logc_kbounds_w_s,                    &
+                                          nzt_topo_nestbc_s, 's', 's' )
+             ENDIF
+
+             IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+                DO  n = 1, nspec
+                   CALL pmci_interp_tril_sn( chem_species(n)%conc,             &
+                                             chem_spec_c(:,:,:,n),             &
+                                             ico, jco, kco, r1xo, r2xo,        &
+                                             r1yo, r2yo, r1zo, r2zo,           &
+                                             logc_w_s, logc_ratio_w_s,         &
+                                             logc_kbounds_w_s,                 &
+                                             nzt_topo_nestbc_s, 's', 's' )
+                ENDDO
+             ENDIF
+          ENDIF
+!
+!--       North border pe
+          IF ( bc_dirichlet_n )  THEN
+             
+             CALL pmci_interp_tril_sn( u,  uc,  icu, jco, kco, r1xu, r2xu,     &
+                                       r1yo, r2yo, r1zo, r2zo,                 &
+                                       logc_u_n, logc_ratio_u_n,               &
+                                       logc_kbounds_u_n,                       &
+                                       nzt_topo_nestbc_n, 'n', 'u' )
+
+             CALL pmci_interp_tril_sn( v,  vc,  ico, jcv, kco, r1xo, r2xo,     &
+                                       r1yv, r2yv, r1zo, r2zo,                 &
+                                       logc_v_n, logc_ratio_v_n,               &
+                                       logc_kbounds_v_n,                       &
+                                       nzt_topo_nestbc_n, 'n', 'v' )
+
+             CALL pmci_interp_tril_sn( w,  wc,  ico, jco, kcw, r1xo, r2xo,     &
+                                       r1yo, r2yo, r1zw, r2zw,                 &
+                                       logc_w_n, logc_ratio_w_n,               &
+                                       logc_kbounds_w_n,                       &
+                                       nzt_topo_nestbc_n, 'n', 'w' )
+
+             IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.   & 
+                  (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.    &
+                     .NOT. constant_diffusion ) )  THEN
+                CALL pmci_interp_tril_sn( e,  ec,  ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_n, logc_ratio_w_n,            &
+                                          logc_kbounds_w_n,                    &
+                                          nzt_topo_nestbc_n, 'n', 'e' )
+
+             ENDIF
+
+             IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
+                CALL pmci_interp_tril_sn( diss, dissc,  ico, jco, kco, r1xo,   &
+                                          r2xo, r1yo, r2yo, r1zo, r2zo,        &
+                                          logc_w_n, logc_ratio_w_n,            &
+                                          logc_kbounds_w_n,                    &
+                                          nzt_topo_nestbc_n, 'n', 's' )
+
+             ENDIF
+
+             IF ( .NOT. neutral )  THEN
+                CALL pmci_interp_tril_sn( pt, ptc, ico, jco, kco, r1xo, r2xo,  &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_n, logc_ratio_w_n,            &
+                                          logc_kbounds_w_n,                    &
+                                          nzt_topo_nestbc_n, 'n', 's' )
+             ENDIF
+
+             IF ( humidity )  THEN
+                CALL pmci_interp_tril_sn( q, q_c, ico, jco, kco, r1xo, r2xo,   &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_n, logc_ratio_w_n,            &
+                                          logc_kbounds_w_n,                    &
+                                          nzt_topo_nestbc_n, 'n', 's' )
+
+                IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+
+                   CALL pmci_interp_tril_sn( qc, qcc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_n, logc_ratio_w_n,         &
+                                             logc_kbounds_w_n,                 &
+                                             nzt_topo_nestbc_n, 'n', 's' )
+
+                   CALL pmci_interp_tril_sn( nc, ncc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_u_n, logc_ratio_u_n,         &
+                                             logc_kbounds_w_n,                 &
+                                             nzt_topo_nestbc_n, 'n', 's' )
+
+                ENDIF
+
+                IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+
+                   CALL pmci_interp_tril_sn( qr, qrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_n, logc_ratio_w_n,         &
+                                             logc_kbounds_w_n,                 &
+                                             nzt_topo_nestbc_n, 'n', 's' )
+
+                   CALL pmci_interp_tril_sn( nr, nrc, ico, jco, kco, r1xo,     &
+                                             r2xo, r1yo, r2yo, r1zo, r2zo,     &
+                                             logc_w_n, logc_ratio_w_n,         &
+                                             logc_kbounds_w_n,                 &
+                                             nzt_topo_nestbc_n, 'n', 's' )
+
+                ENDIF
+
+             ENDIF
+
+             IF ( passive_scalar )  THEN
+                CALL pmci_interp_tril_sn( s, sc, ico, jco, kco, r1xo, r2xo,    &
+                                          r1yo, r2yo, r1zo, r2zo,              &
+                                          logc_w_n, logc_ratio_w_n,            &
+                                          logc_kbounds_w_n,                    &
+                                          nzt_topo_nestbc_n, 'n', 's' )
+             ENDIF
+
+             IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+                DO  n = 1, nspec
+                   CALL pmci_interp_tril_sn( chem_species(n)%conc,             &
+                                             chem_spec_c(:,:,:,n),             &
+                                             ico, jco, kco, r1xo, r2xo,        &
+                                             r1yo, r2yo, r1zo, r2zo,           &
+                                             logc_w_n, logc_ratio_w_n,         &
+                                             logc_kbounds_w_n,                 &
+                                             nzt_topo_nestbc_n, 'n', 's' )
+                ENDDO
+             ENDIF
+          ENDIF
+
+       ENDIF       ! IF ( nesting_mode /= 'vertical' )
+!
+!--    All PEs are top-border PEs
+       CALL pmci_interp_tril_t( u,  uc,  icu, jco, kco, r1xu, r2xu, r1yo,      &
+                                r2yo, r1zo, r2zo, 'u' )
+       CALL pmci_interp_tril_t( v,  vc,  ico, jcv, kco, r1xo, r2xo, r1yv,      &
+                                r2yv, r1zo, r2zo, 'v' )
+       CALL pmci_interp_tril_t( w,  wc,  ico, jco, kcw, r1xo, r2xo, r1yo,      &
+                                r2yo, r1zw, r2zw, 'w' )
+
+       IF ( (        rans_mode_parent  .AND.         rans_mode )  .OR.         &
+            (  .NOT. rans_mode_parent  .AND.  .NOT.  rans_mode  .AND.          &
+               .NOT. constant_diffusion ) )  THEN
+          CALL pmci_interp_tril_t( e,  ec,  ico, jco, kco, r1xo, r2xo, r1yo,   &
+                                   r2yo, r1zo, r2zo, 'e' )
+       ENDIF
+
+       IF ( rans_mode_parent  .AND.  rans_mode  .AND.  rans_tke_e )  THEN
+          CALL pmci_interp_tril_t( diss, dissc, ico, jco, kco, r1xo, r2xo,     &
+                                   r1yo, r2yo, r1zo, r2zo, 's' )
+       ENDIF
+
+       IF ( .NOT. neutral )  THEN
+          CALL pmci_interp_tril_t( pt, ptc, ico, jco, kco, r1xo, r2xo, r1yo,   &
+                                   r2yo, r1zo, r2zo, 's' )
+       ENDIF
+
+       IF ( humidity )  THEN
+
+          CALL pmci_interp_tril_t( q, q_c, ico, jco, kco, r1xo, r2xo, r1yo,    &
+                                   r2yo, r1zo, r2zo, 's' )
+
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+
+             CALL pmci_interp_tril_t( qc, qcc, ico, jco, kco, r1xo, r2xo, r1yo,&
+                                      r2yo, r1zo, r2zo, 's' )
+
+             CALL pmci_interp_tril_t( nc, ncc, ico, jco, kco, r1xo, r2xo, r1yo,&
+                                      r2yo, r1zo, r2zo, 's' )
+
+          ENDIF
+
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+
+
+             CALL pmci_interp_tril_t( qr, qrc, ico, jco, kco, r1xo, r2xo, r1yo,&
+                                      r2yo, r1zo, r2zo, 's' )
+
+             CALL pmci_interp_tril_t( nr, nrc, ico, jco, kco, r1xo, r2xo, r1yo,&
+                                      r2yo, r1zo, r2zo, 's' )
+
+          ENDIF
+
+       ENDIF
+
+       IF ( passive_scalar )  THEN
+          CALL pmci_interp_tril_t( s, sc, ico, jco, kco, r1xo, r2xo, r1yo,     &
+                                   r2yo, r1zo, r2zo, 's' )
+       ENDIF
+
+       IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+          DO  n = 1, nspec
+             CALL pmci_interp_tril_t( chem_species(n)%conc,                    &
+                                      chem_spec_c(:,:,:,n),                    &
+                                      ico, jco, kco, r1xo, r2xo,               &
+                                      r1yo, r2yo, r1zo, r2zo,                  &
+                                      's' )
+          ENDDO
+       ENDIF
+
+   END SUBROUTINE pmci_interpolation
+
+
+
+   SUBROUTINE pmci_anterpolation
+
+!
+!--   A wrapper routine for all anterpolation actions.
+!--   Note that TKE is not anterpolated.
+      IMPLICIT NONE
+
+      INTEGER(iwp) ::  n          !< running index for number of chemical species
+
+
+
+      CALL pmci_anterp_tophat( u,  uc,  kctu, iflu, ifuu, jflo, jfuo, kflo,    &
+                               kfuo, ijkfc_u, 'u' )
+      CALL pmci_anterp_tophat( v,  vc,  kctu, iflo, ifuo, jflv, jfuv, kflo,    &
+                               kfuo, ijkfc_v, 'v' )
+      CALL pmci_anterp_tophat( w,  wc,  kctw, iflo, ifuo, jflo, jfuo, kflw,    &
+                               kfuw, ijkfc_w, 'w' )
+!
+!--   Anterpolation of TKE and dissipation rate if parent and child are in 
+!--   RANS mode.
+      IF ( rans_mode_parent  .AND.  rans_mode )  THEN
+         CALL pmci_anterp_tophat( e, ec, kctu, iflo, ifuo, jflo, jfuo, kflo,   &
+                                  kfuo, ijkfc_s, 'e' )
+!
+!--      Anterpolation of dissipation rate only if TKE-e closure is applied.
+         IF ( rans_tke_e )  THEN
+            CALL pmci_anterp_tophat( diss, dissc, kctu, iflo, ifuo, jflo, jfuo,&
+                                     kflo, kfuo, ijkfc_s, 'diss' )
+         ENDIF
+
+      ENDIF
+
+      IF ( .NOT. neutral )  THEN
+         CALL pmci_anterp_tophat( pt, ptc, kctu, iflo, ifuo, jflo, jfuo, kflo, &
+                                  kfuo, ijkfc_s, 'pt' )
+      ENDIF
+
+      IF ( humidity )  THEN
+
+         CALL pmci_anterp_tophat( q, q_c, kctu, iflo, ifuo, jflo, jfuo, kflo,  &
+                                  kfuo, ijkfc_s, 'q' )
+
+         IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+
+            CALL pmci_anterp_tophat( qc, qcc, kctu, iflo, ifuo, jflo, jfuo,    &
+                                     kflo, kfuo, ijkfc_s, 'qc' )
+
+            CALL pmci_anterp_tophat( nc, ncc, kctu, iflo, ifuo, jflo, jfuo,    &
+                                     kflo, kfuo, ijkfc_s, 'nc' )
+
+         ENDIF
+
+         IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+
+            CALL pmci_anterp_tophat( qr, qrc, kctu, iflo, ifuo, jflo, jfuo,    &
+                                     kflo, kfuo, ijkfc_s, 'qr' )
+
+            CALL pmci_anterp_tophat( nr, nrc, kctu, iflo, ifuo, jflo, jfuo,    &
+                                     kflo, kfuo, ijkfc_s, 'nr' )
+
+         ENDIF
+
+      ENDIF
+
+      IF ( passive_scalar )  THEN
+         CALL pmci_anterp_tophat( s, sc, kctu, iflo, ifuo, jflo, jfuo, kflo,   &
+                                  kfuo, ijkfc_s, 's' )
+      ENDIF
+
+      IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+         DO  n = 1, nspec
+            CALL pmci_anterp_tophat( chem_species(n)%conc,                     &
+                                     chem_spec_c(:,:,:,n),                     &
+                                     kctu, iflo, ifuo, jflo, jfuo, kflo,       &
+                                     kfuo, ijkfc_s, 's' )
+         ENDDO
+      ENDIF
+
+   END SUBROUTINE pmci_anterpolation
+
+
+
+   SUBROUTINE pmci_interp_tril_lr( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z, &
+                                   r2z, logc, logc_ratio, logc_kbounds,        &
+                                   nzt_topo_nestbc, edge, var )
+!
+!--   Interpolation of ghost-node values used as the child-domain boundary
+!--   conditions. This subroutine handles the left and right boundaries. It is
+!--   based on trilinear interpolation.
+
+      IMPLICIT NONE
+
+      INTEGER(iwp) ::  nzt_topo_nestbc   !<
+
+      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                                      INTENT(INOUT) ::  f       !<
+      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                          &
+                                      INTENT(IN)    ::  fc      !<
+      REAL(wp), DIMENSION(1:2,0:ncorr-1,nzb:nzt_topo_nestbc,nys:nyn),          &
+                                      INTENT(IN)    ::  logc_ratio   !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x     !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x     !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y     !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y     !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z     !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z     !<
+      
+      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic     !<
+      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc     !<
+      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc     !<
+      INTEGER(iwp), DIMENSION(1:2,nzb:nzt_topo_nestbc,nys:nyn),                &
+                                          INTENT(IN)           ::  logc   !<
+      INTEGER(iwp), DIMENSION(1:2,nys:nyn), INTENT(IN)         ::  logc_kbounds !<
+
+      CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
+      CHARACTER(LEN=1), INTENT(IN) ::  var    !<
+
+      INTEGER(iwp) ::  i        !<
+      INTEGER(iwp) ::  ib       !<
+      INTEGER(iwp) ::  ibgp     !<
+      INTEGER(iwp) ::  j        !<
+      INTEGER(iwp) ::  jco      !<
+      INTEGER(iwp) ::  jcorr    !<
+      INTEGER(iwp) ::  jinc     !<
+      INTEGER(iwp) ::  j1       !<
+      INTEGER(iwp) ::  k        !<
+      INTEGER(iwp) ::  k_wall   !< vertical index of topography top
+      INTEGER(iwp) ::  kco      !<
+      INTEGER(iwp) ::  kcorr    !<
+      INTEGER(iwp) ::  k1       !<
+      INTEGER(iwp) ::  l        !<
+      INTEGER(iwp) ::  m        !<
+      INTEGER(iwp) ::  n        !<
+      
+      REAL(wp) ::  fkj         !<
+      REAL(wp) ::  fkjp        !<
+      REAL(wp) ::  fkpj        !<
+      REAL(wp) ::  fkpjp       !<
+      REAL(wp) ::  fk          !<
+      REAL(wp) ::  fkp         !<
+      
+! 
+!--   Check which edge is to be handled
+      IF ( edge == 'l' )  THEN
+!
+!--      For u, nxl is a ghost node, but not for the other variables
+         IF ( var == 'u' )  THEN
+            i  = nxl
+            ib = nxl - 1 
+         ELSE
+            i  = nxl - 1
+            ib = nxl - 2
+         ENDIF
+      ELSEIF ( edge == 'r' )  THEN
+         i  = nxr + 1
+         ib = nxr + 2
+      ENDIF
+      
+      DO  j = nys, nyn+1
+!
+!--      Determine vertical index of topography top at grid point (j,i)
+         k_wall = get_topography_top_index_ji( j, i, TRIM( var ) )
+
+         DO  k = k_wall, nzt+1
+            l = ic(i)
+            m = jc(j)
+            n = kc(k)
+            fkj      = r1x(i) * fc(n,m,l)     + r2x(i) * fc(n,m,l+1)
+            fkjp     = r1x(i) * fc(n,m+1,l)   + r2x(i) * fc(n,m+1,l+1)
+            fkpj     = r1x(i) * fc(n+1,m,l)   + r2x(i) * fc(n+1,m,l+1)
+            fkpjp    = r1x(i) * fc(n+1,m+1,l) + r2x(i) * fc(n+1,m+1,l+1)
+            fk       = r1y(j) * fkj  + r2y(j) * fkjp
+            fkp      = r1y(j) * fkpj + r2y(j) * fkpjp
+            f(k,j,i) = r1z(k) * fk   + r2z(k) * fkp
+         ENDDO
+      ENDDO
+!
+!--   Generalized log-law-correction algorithm.
+!--   Doubly two-dimensional index arrays logc(1:2,:,:) and log-ratio arrays 
+!--   logc_ratio(1:2,0:ncorr-1,:,:) have been precomputed in subroutine
+!--   pmci_init_loglaw_correction.
+!
+!--   Solid surface below the node 
+      IF ( constant_flux_layer .AND. ( var == 'u' .OR. var == 'v' ) )  THEN
+         DO  j = nys, nyn
+!
+!--         Determine vertical index of topography top at grid point (j,i)
+            k_wall = get_topography_top_index_ji( j, i, TRIM ( var ) )
+
+            k = k_wall+1
+            IF ( ( logc(1,k,j) /= 0 )  .AND.  ( logc(2,k,j) == 0 ) )  THEN
+               k1 = logc(1,k,j)
+               DO  kcorr = 0, ncorr - 1
+                  kco = k + kcorr
+                  f(kco,j,i) = logc_ratio(1,kcorr,k,j) * f(k1,j,i)
+               ENDDO
+            ENDIF
+         ENDDO
+      ENDIF
+!
+!--   In case of non-flat topography, also vertical walls and corners need to be
+!--   treated. Only single and double wall nodes are corrected. Triple and
+!--   higher-multiple wall nodes are not corrected as the log law would not be
+!--   valid anyway in such locations.
+      IF ( topography /= 'flat' )  THEN
+
+         IF ( constant_flux_layer .AND. ( var == 'u' .OR. var == 'w' ) )  THEN           
+!
+!--         Solid surface only on south/north side of the node                   
+            DO  j = nys, nyn
+               DO  k = logc_kbounds(1,j), logc_kbounds(2,j)   
+                  IF ( ( logc(2,k,j) /= 0 )  .AND.  ( logc(1,k,j) == 0 ) )  THEN
+!
+!--                  Direction of the wall-normal index is carried in as the
+!--                  sign of logc
+                     jinc = SIGN( 1, logc(2,k,j) )
+                     j1   = ABS( logc(2,k,j) )
+                     DO  jcorr = 0, ncorr-1
+                        jco = j + jinc * jcorr
+                        IF ( jco >= nys .AND. jco <= nyn )  THEN
+                           f(k,jco,i) = logc_ratio(2,jcorr,k,j) * f(k,j1,i)
+                        ENDIF
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+!
+!--      Solid surface on both below and on south/north side of the node           
+         IF ( constant_flux_layer .AND. var == 'u' )  THEN
+            DO  j = nys, nyn
+               k = logc_kbounds(1,j)
+               IF ( ( logc(2,k,j) /= 0 )  .AND.  ( logc(1,k,j) /= 0 ) )  THEN
+                  k1   = logc(1,k,j)                 
+                  jinc = SIGN( 1, logc(2,k,j) )
+                  j1   = ABS( logc(2,k,j) )                 
+                  DO  jcorr = 0, ncorr-1
+                     jco = j + jinc * jcorr
+                     IF ( jco >= nys .AND. jco <= nyn )  THEN
+                        DO  kcorr = 0, ncorr-1
+                           kco = k + kcorr
+                           f(kco,jco,i) = 0.5_wp * ( logc_ratio(1,kcorr,k,j) * &
+                                                     f(k1,j,i)                 &
+                                                   + logc_ratio(2,jcorr,k,j) * &
+                                                     f(k,j1,i) )
+                        ENDDO
+                     ENDIF
+                  ENDDO
+               ENDIF
+            ENDDO
+         ENDIF
+
+      ENDIF  ! ( topography /= 'flat' )
+!
+!--   Rescale if f is the TKE.
+      IF ( var == 'e')  THEN
+         IF ( edge == 'l' )  THEN
+            DO  j = nys, nyn + 1
+!
+!--            Determine vertical index of topography top at grid point (j,i)
+               k_wall = get_topography_top_index_ji( j, i, 's' )
+
+               DO  k = k_wall, nzt + 1
+                  f(k,j,i) = tkefactor_l(k,j) * f(k,j,i)
+               ENDDO
+            ENDDO
+         ELSEIF ( edge == 'r' )  THEN           
+            DO  j = nys, nyn+1
+!
+!--            Determine vertical index of topography top at grid point (j,i)
+               k_wall = get_topography_top_index_ji( j, i, 's' )
+
+               DO  k = k_wall, nzt+1
+                  f(k,j,i) = tkefactor_r(k,j) * f(k,j,i)
+               ENDDO
+            ENDDO
+         ENDIF
+      ENDIF
+!
+!--   Store the boundary values also into the other redundant ghost node layers.
+!--   Please note, in case of only one ghost node layer, e.g. for the PW 
+!--   scheme, the following loops will not be entered.
+      IF ( edge == 'l' )  THEN
+         DO  ibgp = -nbgp, ib
+            f(0:nzt+1,nysg:nyng,ibgp) = f(0:nzt+1,nysg:nyng,i)
+         ENDDO
+      ELSEIF ( edge == 'r' )  THEN
+         DO  ibgp = ib, nx+nbgp
+            f(0:nzt+1,nysg:nyng,ibgp) = f(0:nzt+1,nysg:nyng,i)
+         ENDDO
+      ENDIF
+
+   END SUBROUTINE pmci_interp_tril_lr
+
+
+
+   SUBROUTINE pmci_interp_tril_sn( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z, &
+                                   r2z, logc, logc_ratio, logc_kbounds,        &
+                                   nzt_topo_nestbc, edge, var )
+
+!
+!--   Interpolation of ghost-node values used as the child-domain boundary
+!--   conditions. This subroutine handles the south and north boundaries. 
+!--   This subroutine is based on trilinear interpolation.
+
+      IMPLICIT NONE
+
+      INTEGER(iwp) ::  nzt_topo_nestbc   !<
+
+      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                                      INTENT(INOUT) ::  f             !<
+      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                          &
+                                      INTENT(IN)    ::  fc            !<
+      REAL(wp), DIMENSION(1:2,0:ncorr-1,nzb:nzt_topo_nestbc,nxl:nxr),          &
+                                      INTENT(IN)    ::  logc_ratio    !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x           !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x           !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y           !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y           !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z           !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z           !<
+      
+      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN)           ::  ic    !<
+      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN)           ::  jc    !<
+      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN)           ::  kc    !<
+      INTEGER(iwp), DIMENSION(1:2,nzb:nzt_topo_nestbc,nxl:nxr),                &
+                                          INTENT(IN)           ::  logc  !<
+      INTEGER(iwp), DIMENSION(1:2,nxl:nxr), INTENT(IN)         ::  logc_kbounds  !< 
+
+      CHARACTER(LEN=1), INTENT(IN) ::  edge   !<
+      CHARACTER(LEN=1), INTENT(IN) ::  var    !<
+      
+      INTEGER(iwp) ::  i       !<
+      INTEGER(iwp) ::  iinc    !<
+      INTEGER(iwp) ::  icorr   !<
+      INTEGER(iwp) ::  ico     !<
+      INTEGER(iwp) ::  i1      !<
+      INTEGER(iwp) ::  j       !<
+      INTEGER(iwp) ::  jb      !<
+      INTEGER(iwp) ::  jbgp    !<
+      INTEGER(iwp) ::  k       !<
+      INTEGER(iwp) ::  k_wall   !< vertical index of topography top
+      INTEGER(iwp) ::  kcorr   !<
+      INTEGER(iwp) ::  kco     !<
+      INTEGER(iwp) ::  k1      !<
+      INTEGER(iwp) ::  l       !<
+      INTEGER(iwp) ::  m       !<
+      INTEGER(iwp) ::  n       !<
+                            
+      REAL(wp) ::  fk          !<
+      REAL(wp) ::  fkj         !<
+      REAL(wp) ::  fkjp        !<
+      REAL(wp) ::  fkpj        !<
+      REAL(wp) ::  fkpjp       !<
+      REAL(wp) ::  fkp         !<
+      
+!
+!--   Check which edge is to be handled: south or north
+      IF ( edge == 's' )  THEN
+!
+!--      For v, nys is a ghost node, but not for the other variables
+         IF ( var == 'v' )  THEN
+            j  = nys
+            jb = nys - 1 
+         ELSE
+            j  = nys - 1
+            jb = nys - 2
+         ENDIF
+      ELSEIF ( edge == 'n' )  THEN
+         j  = nyn + 1
+         jb = nyn + 2
+      ENDIF
+
+      DO  i = nxl, nxr+1
+!
+!--      Determine vertical index of topography top at grid point (j,i)
+         k_wall = get_topography_top_index_ji( j, i, TRIM( var ) )
+
+         DO  k = k_wall, nzt+1
+            l = ic(i)
+            m = jc(j)
+            n = kc(k)              
+            fkj      = r1x(i) * fc(n,m,l)     + r2x(i) * fc(n,m,l+1)
+            fkjp     = r1x(i) * fc(n,m+1,l)   + r2x(i) * fc(n,m+1,l+1)
+            fkpj     = r1x(i) * fc(n+1,m,l)   + r2x(i) * fc(n+1,m,l+1)
+            fkpjp    = r1x(i) * fc(n+1,m+1,l) + r2x(i) * fc(n+1,m+1,l+1)
+            fk       = r1y(j) * fkj  + r2y(j) * fkjp
+            fkp      = r1y(j) * fkpj + r2y(j) * fkpjp
+            f(k,j,i) = r1z(k) * fk   + r2z(k) * fkp
+         ENDDO
+      ENDDO
+!
+!--   Generalized log-law-correction algorithm.
+!--   Multiply two-dimensional index arrays logc(1:2,:,:) and log-ratio arrays 
+!--   logc_ratio(1:2,0:ncorr-1,:,:) have been precomputed in subroutine
+!--   pmci_init_loglaw_correction.
+!
+!--   Solid surface below the node 
+      IF ( constant_flux_layer .AND. ( var == 'u'  .OR.  var == 'v' ) )  THEN           
+         DO  i = nxl, nxr
+!
+!--         Determine vertical index of topography top at grid point (j,i)
+            k_wall = get_topography_top_index_ji( j, i, TRIM( var ) )
+
+            k = k_wall + 1
+            IF ( ( logc(1,k,i) /= 0 )  .AND.  ( logc(2,k,i) == 0 ) )  THEN
+               k1 = logc(1,k,i)
+               DO  kcorr = 0, ncorr-1
+                  kco = k + kcorr
+                  f(kco,j,i) = logc_ratio(1,kcorr,k,i) * f(k1,j,i)
+               ENDDO
+            ENDIF
+         ENDDO
+      ENDIF
+!
+!--   In case of non-flat topography, also vertical walls and corners need to be
+!--   treated. Only single and double wall nodes are corrected.
+!--   Triple and higher-multiple wall nodes are not corrected as it would be
+!--   extremely complicated and the log law would not be valid anyway in such
+!--   locations.
+      IF ( topography /= 'flat' )  THEN
+
+         IF ( constant_flux_layer .AND. ( var == 'v' .OR. var == 'w' ) )  THEN
+            DO  i = nxl, nxr
+               DO  k = logc_kbounds(1,i), logc_kbounds(2,i)
+!
+!--               Solid surface only on left/right side of the node           
+                  IF ( ( logc(2,k,i) /= 0 )  .AND.  ( logc(1,k,i) == 0 ) )  THEN
+!
+!--                  Direction of the wall-normal index is carried in as the
+!--                  sign of logc
+                     iinc = SIGN( 1, logc(2,k,i) )
+                     i1  = ABS( logc(2,k,i) )
+                     DO  icorr = 0, ncorr-1
+                        ico = i + iinc * icorr
+                        IF ( ico >= nxl .AND. ico <= nxr )  THEN
+                           f(k,j,ico) = logc_ratio(2,icorr,k,i) * f(k,j,i1)
+                        ENDIF
+                     ENDDO
+                  ENDIF
+               ENDDO
+            ENDDO
+         ENDIF
+!
+!--      Solid surface on both below and on left/right side of the node           
+         IF ( constant_flux_layer .AND. var == 'v' )  THEN
+            DO  i = nxl, nxr
+               k = logc_kbounds(1,i)
+               IF ( ( logc(2,k,i) /= 0 )  .AND.  ( logc(1,k,i) /= 0 ) )  THEN
+                  k1   = logc(1,k,i)         
+                  iinc = SIGN( 1, logc(2,k,i) )
+                  i1   = ABS( logc(2,k,i) )
+                  DO  icorr = 0, ncorr-1
+                     ico = i + iinc * icorr
+                     IF ( ico >= nxl .AND. ico <= nxr )  THEN
+                        DO  kcorr = 0, ncorr-1
+                           kco = k + kcorr
+                           f(kco,j,ico) = 0.5_wp * ( logc_ratio(1,kcorr,k,i) * &
+                                                     f(k1,j,i)                 &
+                                                   + logc_ratio(2,icorr,k,i) * &
+                                                     f(k,j,i1) )
+                        ENDDO
+                     ENDIF
+                  ENDDO
+               ENDIF
+            ENDDO
+         ENDIF
+         
+      ENDIF  ! ( topography /= 'flat' )
+!
+!--   Rescale if f is the TKE.
+      IF ( var == 'e')  THEN
+         IF ( edge == 's' )  THEN
+            DO  i = nxl, nxr + 1
+!
+!--            Determine vertical index of topography top at grid point (j,i)
+               k_wall = get_topography_top_index_ji( j, i, 's' )
+               DO  k = k_wall, nzt+1
+                  f(k,j,i) = tkefactor_s(k,i) * f(k,j,i)
+               ENDDO
+            ENDDO
+         ELSEIF ( edge == 'n' )  THEN
+            DO  i = nxl, nxr + 1
+!
+!--            Determine vertical index of topography top at grid point (j,i)
+               k_wall = get_topography_top_index_ji( j, i, 's' )
+               DO  k = k_wall, nzt+1
+                  f(k,j,i) = tkefactor_n(k,i) * f(k,j,i)
+               ENDDO
+            ENDDO
+         ENDIF
+      ENDIF
+!
+!--   Store the boundary values also into the other redundant ghost node layers.
+!--   Please note, in case of only one ghost node layer, e.g. for the PW 
+!--   scheme, the following loops will not be entered.
+      IF ( edge == 's' )  THEN
+         DO  jbgp = -nbgp, jb
+            f(0:nzt+1,jbgp,nxlg:nxrg) = f(0:nzt+1,j,nxlg:nxrg)
+         ENDDO
+      ELSEIF ( edge == 'n' )  THEN
+         DO  jbgp = jb, ny+nbgp
+            f(0:nzt+1,jbgp,nxlg:nxrg) = f(0:nzt+1,j,nxlg:nxrg)
+         ENDDO
+      ENDIF
+
+   END SUBROUTINE pmci_interp_tril_sn
+
+ 
+
+   SUBROUTINE pmci_interp_tril_t( f, fc, ic, jc, kc, r1x, r2x, r1y, r2y, r1z,  &
+                                  r2z, var )
+
+!
+!--   Interpolation of ghost-node values used as the child-domain boundary
+!--   conditions. This subroutine handles the top boundary. 
+!--   This subroutine is based on trilinear interpolation.
+
+      IMPLICIT NONE
+
+      REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                      &
+                                      INTENT(INOUT) ::  f     !<
+      REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr),                          &
+                                      INTENT(IN)    ::  fc    !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r1x   !<
+      REAL(wp), DIMENSION(nxlg:nxrg), INTENT(IN)    ::  r2x   !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r1y   !<
+      REAL(wp), DIMENSION(nysg:nyng), INTENT(IN)    ::  r2y   !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r1z   !<
+      REAL(wp), DIMENSION(nzb:nzt+1), INTENT(IN)    ::  r2z   !<
+      
+      INTEGER(iwp), DIMENSION(nxlg:nxrg), INTENT(IN) ::  ic    !<
+      INTEGER(iwp), DIMENSION(nysg:nyng), INTENT(IN) ::  jc    !<
+      INTEGER(iwp), DIMENSION(nzb:nzt+1), INTENT(IN) ::  kc    !<
+      
+      CHARACTER(LEN=1), INTENT(IN) :: var   !<
+
+      INTEGER(iwp) ::  i   !<
+      INTEGER(iwp) ::  ib  !<
+      INTEGER(iwp) ::  ie  !<
+      INTEGER(iwp) ::  j   !<
+      INTEGER(iwp) ::  jb   !<
+      INTEGER(iwp) ::  je   !<      
+      INTEGER(iwp) ::  k   !<
+      INTEGER(iwp) ::  l   !<
+      INTEGER(iwp) ::  m   !<
+      INTEGER(iwp) ::  n   !<
+      
+      REAL(wp) ::  fk          !<
+      REAL(wp) ::  fkj         !<
+      REAL(wp) ::  fkjp        !<
+      REAL(wp) ::  fkpj        !<
+      REAL(wp) ::  fkpjp       !<
+      REAL(wp) ::  fkp         !<
+
+      
+      IF ( var == 'w' )  THEN
+         k  = nzt
+      ELSE
+         k  = nzt + 1
+      ENDIF
+!
+!--   These exceedings by one are needed only to avoid stripes
+!--   and spots in visualization. They have no effect on the 
+!--   actual solution.     
+      ib = nxl-1
+      ie = nxr+1
+      jb = nys-1
+      je = nyn+1
+!
+!--   The exceedings must not be made past the outer edges in 
+!--   case of pure vertical nesting.
+      IF ( nesting_mode == 'vertical' )  THEN
+         IF ( nxl == 0  )  ib = nxl
+         IF ( nxr == nx )  ie = nxr
+         IF ( nys == 0  )  jb = nys
+         IF ( nyn == ny )  je = nyn
+      ENDIF
+         
+      DO  i = ib, ie
+         DO  j = jb, je
+            l = ic(i)
+            m = jc(j)
+            n = kc(k)            
+            fkj      = r1x(i) * fc(n,m,l)     + r2x(i) * fc(n,m,l+1)
+            fkjp     = r1x(i) * fc(n,m+1,l)   + r2x(i) * fc(n,m+1,l+1)
+            fkpj     = r1x(i) * fc(n+1,m,l)   + r2x(i) * fc(n+1,m,l+1)
+            fkpjp    = r1x(i) * fc(n+1,m+1,l) + r2x(i) * fc(n+1,m+1,l+1)
+            fk       = r1y(j) * fkj  + r2y(j) * fkjp
+            fkp      = r1y(j) * fkpj + r2y(j) * fkpjp
+            f(k,j,i) = r1z(k) * fk   + r2z(k) * fkp
+         ENDDO
+      ENDDO
+!
+!--   Just fill up the second ghost-node layer for w.
+      IF ( var == 'w' )  THEN
+         f(nzt+1,:,:) = f(nzt,:,:)
+      ENDIF
+!
+!--   Rescale if f is the TKE.
+!--   It is assumed that the bottom surface never reaches the top boundary of a
+!--   nest domain.
+      IF ( var == 'e' )  THEN
+         DO  i = nxl, nxr
+            DO  j = nys, nyn
+               f(k,j,i) = tkefactor_t(j,i) * f(k,j,i)
+            ENDDO
+         ENDDO
+      ENDIF
+
+    END SUBROUTINE pmci_interp_tril_t
+
+
+
+    SUBROUTINE pmci_anterp_tophat( f, fc, kct, ifl, ifu, jfl, jfu, kfl, kfu,   &
+                                   ijkfc, var )
+!
+!--    Anterpolation of internal-node values to be used as the parent-domain
+!--    values. This subroutine is based on the first-order numerical
+!--    integration of the fine-grid values contained within the coarse-grid
+!--    cell.
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*), INTENT(IN) ::  var   !< identifyer for treated variable
+
+       INTEGER(iwp) ::  i         !< Running index x-direction - fine-grid
+       INTEGER(iwp) ::  ii        !< Running index x-direction - coarse grid
+       INTEGER(iwp) ::  iclp      !< Left boundary index for anterpolation along x
+       INTEGER(iwp) ::  icrm      !< Right boundary index for anterpolation along x
+       INTEGER(iwp) ::  j         !< Running index y-direction - fine-grid
+       INTEGER(iwp) ::  jj        !< Running index y-direction - coarse grid
+       INTEGER(iwp) ::  jcnm      !< North boundary index for anterpolation along y
+       INTEGER(iwp) ::  jcsp      !< South boundary index for anterpolation along y
+       INTEGER(iwp) ::  k         !< Running index z-direction - fine-grid     
+       INTEGER(iwp) ::  kk        !< Running index z-direction - coarse grid
+       INTEGER(iwp) ::  kcb = 0   !< Bottom boundary index for anterpolation along z
+       INTEGER(iwp) ::  var_flag  !< bit number used to flag topography on respective grid
+
+       INTEGER(iwp), INTENT(IN) ::  kct   !< Top boundary index for anterpolation along z
+
+       INTEGER(iwp), DIMENSION(icl:icr), INTENT(IN) ::  ifl !< Indicates start index of child cells belonging to certain parent cell - x direction
+       INTEGER(iwp), DIMENSION(icl:icr), INTENT(IN) ::  ifu !< Indicates end index of child cells belonging to certain parent cell - x direction
+       INTEGER(iwp), DIMENSION(jcs:jcn), INTENT(IN) ::  jfl !< Indicates start index of child cells belonging to certain parent cell - y direction
+       INTEGER(iwp), DIMENSION(jcs:jcn), INTENT(IN) ::  jfu !< Indicates start index of child cells belonging to certain parent cell - y direction
+       INTEGER(iwp), DIMENSION(0:kct), INTENT(IN)   ::  kfl !< Indicates start index of child cells belonging to certain parent cell - z direction
+       INTEGER(iwp), DIMENSION(0:kct), INTENT(IN)   ::  kfu !< Indicates start index of child cells belonging to certain parent cell - z direction
+
+       INTEGER(iwp), DIMENSION(0:kct,jcs:jcn,icl:icr), INTENT(IN) :: ijkfc !< number of child grid points contributing to a parent grid box
+
+       REAL(wp) ::  cellsum   !< sum of respective child cells belonging to parent cell 
+       REAL(wp) ::  fra       !< relaxation faction
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg), INTENT(IN) ::  f   !< Treated variable - child domain
+       REAL(wp), DIMENSION(0:cg%nz+1,jcs:jcn,icl:icr), INTENT(INOUT)  ::  fc  !< Treated variable - parent domain
+  
+!
+!--    Initialize the index bounds for anterpolation 
+       iclp = icl 
+       icrm = icr 
+       jcsp = jcs 
+       jcnm = jcn 
+       kcb  = 0
+!
+!--    Define the index bounds iclp, icrm, jcsp and jcnm.
+!--    Note that kcb is simply zero and kct enters here as a parameter and it is
+!--    determined in pmci_init_anterp_tophat.
+!--    Please note, grid points used also for interpolation (from parent to
+!--    child) are excluded in anterpolation, e.g. anterpolation is only from 
+!--    nzb:kct-1, as kct is used for interpolation. Following this approach
+!--    avoids numerical problems which may accumulate, particularly for shallow
+!--    child domain, leading to increased velocity variances. A more 
+!--    comprehensive explanation for this is still pending.
+       IF ( nesting_mode == 'vertical' )  THEN
+          IF ( bc_dirichlet_l )  THEN
+             iclp = icl + nhll
+          ENDIF
+          IF ( bc_dirichlet_r ) THEN
+             icrm = icr - nhlr
+          ENDIF
+          IF ( bc_dirichlet_s )  THEN
+             jcsp = jcs + nhls
+          ENDIF
+          IF ( bc_dirichlet_n )  THEN
+             jcnm = jcn - nhln
+          ENDIF
+       ELSE
+          IF ( bc_dirichlet_l )  THEN
+             IF ( var == 'u' )  THEN
+                iclp = icl + nhll + 1 + 1
+             ELSE
+                iclp = icl + nhll + 1
+             ENDIF
+          ENDIF
+          IF ( bc_dirichlet_r )  THEN
+             icrm = icr - nhlr - 1
+          ENDIF
+
+          IF ( bc_dirichlet_s )  THEN
+             IF ( var == 'v' )  THEN
+                jcsp = jcs + nhls + 1 + 1
+             ELSE
+                jcsp = jcs + nhls + 1
+             ENDIF
+          ENDIF
+          IF ( bc_dirichlet_n )  THEN
+             jcnm = jcn - nhln - 1
+          ENDIF
+       ENDIF
+!
+!--    Set masking bit for topography flags 
+       IF ( var == 'u' )  THEN 
+          var_flag = 1 
+       ELSEIF ( var == 'v' )  THEN
+          var_flag = 2 
+       ELSEIF ( var == 'w' )  THEN
+          var_flag = 3
+       ELSE
+          var_flag = 0
+       ENDIF  
+
+!
+!--    Note that ii, jj, and kk are coarse-grid indices and i,j, and k 
+!--    are fine-grid indices.
+       DO  ii = iclp, icrm
+          DO  jj = jcsp, jcnm
+!
+!--          For simplicity anterpolate within buildings and under elevated
+!--          terrain too
+             DO  kk = kcb, kct - 1
+
+                cellsum = 0.0_wp
+                DO  i = ifl(ii), ifu(ii)
+                   DO  j = jfl(jj), jfu(jj)
+                      DO  k = kfl(kk), kfu(kk)
+                         cellsum = cellsum + MERGE( f(k,j,i), 0.0_wp,          &
+                                        BTEST( wall_flags_0(k,j,i), var_flag ) )
+                      ENDDO
+                   ENDDO
+                ENDDO
+!
+!--             Spatial under-relaxation.
+                fra  = frax(ii) * fray(jj) * fraz(kk)
+!
+!--             In case all child grid points are inside topography, i.e. 
+!--             ijkfc and cellsum are zero, also parent solution would have 
+!--             zero values at that grid point, which may cause problems in 
+!--             particular for the temperature. Therefore, in case cellsum is 
+!--             zero, keep the parent solution at this point. 
+                IF ( ijkfc(kk,jj,ii) /= 0 )  THEN
+                   fc(kk,jj,ii) = ( 1.0_wp - fra ) * fc(kk,jj,ii) +            &
+                                    fra * cellsum  /                           &
+                                    REAL( ijkfc(kk,jj,ii), KIND=wp )
+                ENDIF  
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE pmci_anterp_tophat
+
+#endif
+
+ END SUBROUTINE pmci_child_datatrans
+
+! Description:
+! ------------
+!> Set boundary conditions for the prognostic quantities after interpolation 
+!> and anterpolation at upward- and downward facing surfaces.  
+!> @todo: add Dirichlet boundary conditions for pot. temperature, humdidity and
+!> passive scalar.
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmci_boundary_conds
+
+    USE chem_modules,                                                          &
+        ONLY:  ibc_cs_b
+
+    USE control_parameters,                                                    &
+        ONLY:  ibc_pt_b, ibc_q_b, ibc_s_b, ibc_uv_b
+
+    USE surface_mod,                                                           &
+        ONLY:  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< Index along x-direction
+    INTEGER(iwp) ::  j  !< Index along y-direction
+    INTEGER(iwp) ::  k  !< Index along z-direction
+    INTEGER(iwp) ::  m  !< Running index for surface type
+    INTEGER(iwp) ::  n  !< running index for number of chemical species
+    
+!
+!-- Set Dirichlet boundary conditions for horizontal velocity components
+    IF ( ibc_uv_b == 0 )  THEN
+!
+!--    Upward-facing surfaces
+       DO  m = 1, bc_h(0)%ns
+          i = bc_h(0)%i(m)            
+          j = bc_h(0)%j(m)
+          k = bc_h(0)%k(m)
+          u(k-1,j,i) = 0.0_wp
+          v(k-1,j,i) = 0.0_wp
+       ENDDO
+!
+!--    Downward-facing surfaces
+       DO  m = 1, bc_h(1)%ns
+          i = bc_h(1)%i(m)            
+          j = bc_h(1)%j(m)
+          k = bc_h(1)%k(m)
+          u(k+1,j,i) = 0.0_wp
+          v(k+1,j,i) = 0.0_wp
+       ENDDO
+    ENDIF
+!
+!-- Set Dirichlet boundary conditions for vertical velocity component
+!-- Upward-facing surfaces
+    DO  m = 1, bc_h(0)%ns
+       i = bc_h(0)%i(m)            
+       j = bc_h(0)%j(m)
+       k = bc_h(0)%k(m)
+       w(k-1,j,i) = 0.0_wp
+    ENDDO
+!
+!-- Downward-facing surfaces
+    DO  m = 1, bc_h(1)%ns
+       i = bc_h(1)%i(m)            
+       j = bc_h(1)%j(m)
+       k = bc_h(1)%k(m)
+       w(k+1,j,i) = 0.0_wp
+    ENDDO
+!
+!-- Set Neumann boundary conditions for potential temperature
+    IF ( .NOT. neutral )  THEN
+       IF ( ibc_pt_b == 1 )  THEN
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             pt(k-1,j,i) = pt(k,j,i)
+          ENDDO
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)            
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+             pt(k+1,j,i) = pt(k,j,i)
+          ENDDO   
+       ENDIF
+    ENDIF
+!
+!-- Set Neumann boundary conditions for humidity and cloud-physical quantities
+    IF ( humidity )  THEN
+       IF ( ibc_q_b == 1 )  THEN
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             q(k-1,j,i) = q(k,j,i)
+          ENDDO  
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)            
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+             q(k+1,j,i) = q(k,j,i)
+          ENDDO  
+       ENDIF
+       IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             nc(k-1,j,i) = 0.0_wp
+             qc(k-1,j,i) = 0.0_wp
+          ENDDO  
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)            
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+
+             nc(k+1,j,i) = 0.0_wp
+             qc(k+1,j,i) = 0.0_wp
+          ENDDO  
+       ENDIF
+
+       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             nr(k-1,j,i) = 0.0_wp
+             qr(k-1,j,i) = 0.0_wp
+          ENDDO  
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)            
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+             nr(k+1,j,i) = 0.0_wp
+             qr(k+1,j,i) = 0.0_wp
+          ENDDO  
+       ENDIF
+
+    ENDIF
+!
+!-- Set Neumann boundary conditions for passive scalar
+    IF ( passive_scalar )  THEN
+       IF ( ibc_s_b == 1 )  THEN
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)            
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             s(k-1,j,i) = s(k,j,i)
+          ENDDO 
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)            
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+             s(k+1,j,i) = s(k,j,i)
+          ENDDO  
+       ENDIF
+    ENDIF
+!
+!-- Set Neumann boundary conditions for chemical species
+    IF ( air_chemistry  .AND.  nest_chemistry )  THEN
+       IF ( ibc_cs_b == 1 )  THEN
+          DO  n = 1, nspec
+             DO  m = 1, bc_h(0)%ns
+                i = bc_h(0)%i(m)            
+                j = bc_h(0)%j(m)
+                k = bc_h(0)%k(m)
+                chem_species(n)%conc(k-1,j,i) = chem_species(n)%conc(k,j,i)
+             ENDDO 
+             DO  m = 1, bc_h(1)%ns
+                i = bc_h(1)%i(m)            
+                j = bc_h(1)%j(m)
+                k = bc_h(1)%k(m)
+                chem_species(n)%conc(k+1,j,i) = chem_species(n)%conc(k,j,i)
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+
+ END SUBROUTINE pmci_boundary_conds
+
+
+END MODULE pmc_interface
Index: /palm/tags/release-6.0/SOURCE/pmc_mpi_wrapper_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_mpi_wrapper_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_mpi_wrapper_mod.f90	(revision 3477)
@@ -0,0 +1,708 @@
+ MODULE pmc_mpi_wrapper
+
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Extent interface by logical buffer 
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2809 2018-02-15 09:55:58Z schwenkel
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2599 2017-11-01 13:18:45Z hellstea
+! Some cleanup and commenting improvements only.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1901 2016-05-04 15:39:38Z raasch
+! Code clean up. The words server/client changed to parent/child. 
+!
+! 1900 2016-05-04 15:27:53Z raasch
+! re-formatted to match PALM style
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! kind=dp replaced by wp
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statement added (nesting can only be used in parallel mode),
+! kind-parameters adjusted to PALM-kinds
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Initial revision by K. Ketelsen
+!
+! Description:
+! ------------
+!
+! MPI Wrapper of Palm Model Coupler
+!-------------------------------------------------------------------------------!
+
+#if defined( __parallel )
+    USE, INTRINSIC ::  ISO_C_BINDING
+
+#if !defined( __mpifh )
+    USE MPI
+#endif
+
+    USE kinds
+    USE pmc_handle_communicator,                                                &
+        ONLY: m_model_comm, m_model_rank, m_to_parent_comm, m_to_child_comm
+
+    IMPLICIT NONE
+
+#if defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+
+    PRIVATE
+    SAVE
+
+    INTERFACE pmc_send_to_parent
+       MODULE PROCEDURE pmc_send_to_parent_integer
+       MODULE PROCEDURE pmc_send_to_parent_integer_2
+       MODULE PROCEDURE pmc_send_to_parent_real_r1
+       MODULE PROCEDURE pmc_send_to_parent_real_r2
+       MODULE PROCEDURE pmc_send_to_parent_real_r3
+    END INTERFACE pmc_send_to_parent
+
+    INTERFACE pmc_recv_from_parent
+       MODULE PROCEDURE pmc_recv_from_parent_logical
+       MODULE PROCEDURE pmc_recv_from_parent_integer
+       MODULE PROCEDURE pmc_recv_from_parent_real_r1
+       MODULE PROCEDURE pmc_recv_from_parent_real_r2
+       MODULE PROCEDURE pmc_recv_from_parent_real_r3
+    END INTERFACE pmc_recv_from_parent
+
+    INTERFACE pmc_send_to_child
+       MODULE PROCEDURE pmc_send_to_child_logical
+       MODULE PROCEDURE pmc_send_to_child_integer
+       MODULE PROCEDURE pmc_send_to_child_real_r1
+       MODULE PROCEDURE pmc_send_to_child_real_r2
+       MODULE PROCEDURE pmc_send_to_child_real_r3
+    END INTERFACE pmc_send_to_child
+
+    INTERFACE pmc_recv_from_child
+       MODULE PROCEDURE pmc_recv_from_child_integer
+       MODULE PROCEDURE pmc_recv_from_child_integer_2
+       MODULE PROCEDURE pmc_recv_from_child_real_r1
+       MODULE PROCEDURE pmc_recv_from_child_real_r2
+       MODULE PROCEDURE pmc_recv_from_child_real_r3
+    END INTERFACE pmc_recv_from_child
+
+    INTERFACE pmc_bcast
+       MODULE PROCEDURE pmc_bcast_integer
+       MODULE PROCEDURE pmc_bcast_character
+    END INTERFACE pmc_bcast
+
+    INTERFACE pmc_inter_bcast
+       MODULE PROCEDURE pmc_inter_bcast_integer_1
+    END INTERFACE pmc_inter_bcast
+
+    INTERFACE pmc_alloc_mem
+       MODULE PROCEDURE pmc_alloc_mem_integer_1
+       MODULE PROCEDURE pmc_alloc_mem_Real_1
+    END INTERFACE pmc_alloc_mem
+
+    INTERFACE pmc_time
+       MODULE PROCEDURE pmc_time
+    END INTERFACE pmc_time
+
+    PUBLIC pmc_alloc_mem, pmc_bcast, pmc_inter_bcast, pmc_recv_from_child,      &
+           pmc_recv_from_parent, pmc_send_to_child, pmc_send_to_parent,         &
+           pmc_time
+
+ CONTAINS
+
+
+ SUBROUTINE pmc_recv_from_parent_logical( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                ::  n            !<
+    INTEGER, INTENT(IN)                ::  parent_rank  !<
+    INTEGER, INTENT(IN)                ::  tag          !<
+    INTEGER, INTENT(OUT)               ::  ierr         !<
+
+    LOGICAL, INTENT(OUT)               ::  buf          !<
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_LOGICAL, parent_rank, tag, m_to_parent_comm,    &
+                   MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_parent_logical
+
+ SUBROUTINE pmc_send_to_child_logical( child_id, buf, n, child_rank, tag,      &
+                                       ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)               ::  child_id     !<
+    INTEGER, INTENT(IN)               ::  n            !<
+    INTEGER, INTENT(IN)               ::  child_rank   !<
+    INTEGER, INTENT(IN)               ::  tag          !<
+    INTEGER, INTENT(OUT)              ::  ierr         !<
+
+    LOGICAL, INTENT(IN)               ::  buf          !<
+   
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_LOGICAL, child_rank, tag,                       &
+                   m_to_child_comm(child_id), ierr )
+
+ END SUBROUTINE pmc_send_to_child_logical
+
+
+ SUBROUTINE pmc_send_to_parent_integer( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, DIMENSION(:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)               ::  n            !<
+    INTEGER, INTENT(IN)               ::  parent_rank  !<
+    INTEGER, INTENT(IN)               ::  tag          !<
+    INTEGER, INTENT(OUT)              ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_INTEGER, parent_rank, tag, m_to_parent_comm,     &
+                   ierr )
+
+ END SUBROUTINE pmc_send_to_parent_integer
+
+
+ SUBROUTINE pmc_recv_from_parent_integer( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, DIMENSION(:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                ::  n            !<
+    INTEGER, INTENT(IN)                ::  parent_rank  !<
+    INTEGER, INTENT(IN)                ::  tag          !<
+    INTEGER, INTENT(OUT)               ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_INTEGER, parent_rank, tag, m_to_parent_comm,     &
+                   MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_parent_integer
+
+
+
+ SUBROUTINE pmc_send_to_parent_integer_2( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, DIMENSION(:,:), INTENT(IN) :: buf          !<
+    INTEGER, INTENT(IN)                 :: n            !<
+    INTEGER, INTENT(IN)                 :: parent_rank  !<
+    INTEGER, INTENT(IN)                 :: tag          !<
+    INTEGER, INTENT(OUT)                :: ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_INTEGER, parent_rank, tag, m_to_parent_comm,     &
+                   ierr )
+
+ END SUBROUTINE pmc_send_to_parent_integer_2
+
+
+
+ SUBROUTINE pmc_send_to_parent_real_r1( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)                ::  n            !<
+    INTEGER, INTENT(IN)                ::  parent_rank  !<
+    INTEGER, INTENT(IN)                ::  tag          !<
+    INTEGER, INTENT(OUT)               ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_REAL, parent_rank, tag, m_to_parent_comm, ierr )
+
+ END SUBROUTINE pmc_send_to_parent_real_r1
+
+
+
+ SUBROUTINE pmc_recv_from_parent_real_r1( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                 ::  n            !<
+    INTEGER, INTENT(IN)                 ::  parent_rank  !<
+    INTEGER, INTENT(IN)                 ::  tag          !<
+    INTEGER, INTENT(OUT)                ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_REAL, parent_rank, tag, m_to_parent_comm,        &
+                   MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_parent_real_r1
+
+
+
+ SUBROUTINE pmc_send_to_parent_real_r2( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:,:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)                  ::  n            !<
+    INTEGER, INTENT(IN)                  ::  parent_rank  !<
+    INTEGER, INTENT(IN)                  ::  tag          !<
+    INTEGER, INTENT(OUT)                 ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_REAL, parent_rank, tag, m_to_parent_comm, ierr )
+
+ END SUBROUTINE pmc_send_to_parent_real_r2
+
+
+ SUBROUTINE pmc_recv_from_parent_real_r2( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:,:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                   ::  n            !<
+    INTEGER, INTENT(IN)                   ::  parent_rank  !<
+    INTEGER, INTENT(IN)                   ::  tag          !<
+    INTEGER, INTENT(OUT)                  ::  ierr         !<
+
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_REAL, parent_rank, tag, m_to_parent_comm,        &
+                   MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_parent_real_r2
+
+
+
+ SUBROUTINE pmc_send_to_parent_real_r3( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:,:,:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)                    ::  n            !<
+    INTEGER, INTENT(IN)                    ::  parent_rank  !<
+    INTEGER, INTENT(IN)                    ::  tag          !<
+    INTEGER, INTENT(OUT)                   ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_REAL, parent_rank, tag, m_to_parent_comm, ierr )
+
+ END SUBROUTINE pmc_send_to_parent_real_r3
+
+
+
+ SUBROUTINE pmc_recv_from_parent_real_r3( buf, n, parent_rank, tag, ierr )
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:,:,:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                     ::  n            !<
+    INTEGER, INTENT(IN)                     ::  parent_rank  !<
+    INTEGER, INTENT(IN)                     ::  tag          !<
+    INTEGER, INTENT(OUT)                    ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_REAL, parent_rank, tag, m_to_parent_comm,        &
+                   MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_parent_real_r3
+
+
+ SUBROUTINE pmc_send_to_child_integer( child_id, buf, n, child_rank, tag,       &
+                                       ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)               ::  child_id     !<
+    INTEGER, DIMENSION(:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)               ::  n            !<
+    INTEGER, INTENT(IN)               ::  child_rank   !<
+    INTEGER, INTENT(IN)               ::  tag          !<
+    INTEGER, INTENT(OUT)              ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_INTEGER, child_rank, tag,                        &
+                   m_to_child_comm(child_id), ierr )
+
+ END SUBROUTINE pmc_send_to_child_integer
+
+
+
+ SUBROUTINE pmc_recv_from_child_integer( child_id, buf, n, child_rank, tag,     &
+                                         ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                  ::  child_id     !<
+    INTEGER, DIMENSION(:), INTENT(INOUT) ::  buf          !<
+    INTEGER, INTENT(IN)                  ::  n            !<
+    INTEGER, INTENT(IN)                  ::  child_rank   !<
+    INTEGER, INTENT(IN)                  ::  tag          !<
+    INTEGER, INTENT(OUT)                 ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_INTEGER, child_rank, tag,                        &
+                   m_to_child_comm(child_id), MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_child_integer
+
+
+
+ SUBROUTINE pmc_recv_from_child_integer_2( child_id, buf, n, child_rank,        &
+                                           tag, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                  ::  child_id     !<
+    INTEGER, DIMENSION(:,:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                  ::  n            !<
+    INTEGER, INTENT(IN)                  ::  child_rank   !<
+    INTEGER, INTENT(IN)                  ::  tag          !<
+    INTEGER, INTENT(OUT)                 ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_INTEGER, child_rank, tag,                        &
+                   m_to_child_comm(child_id), MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_child_integer_2
+
+
+
+ SUBROUTINE pmc_send_to_child_real_r1( child_id, buf, n, child_rank, tag,       &
+                                       ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                ::  child_id     !<
+    REAL(wp), DIMENSION(:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)                ::  n            !<
+    INTEGER, INTENT(IN)                ::  child_rank   !<
+    INTEGER, INTENT(IN)                ::  tag          !<
+    INTEGER, INTENT(OUT)               ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_REAL, child_rank, tag,                           &
+                   m_to_child_comm(child_id), ierr )
+
+ END SUBROUTINE pmc_send_to_child_real_r1
+
+
+
+ SUBROUTINE pmc_recv_from_child_real_r1( child_id, buf, n, child_rank, tag,     &
+                                         ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                   ::  child_id     !<
+    REAL(wp), DIMENSION(:), INTENT(INOUT) ::  buf          !<
+    INTEGER, INTENT(IN)                   ::  n            !<
+    INTEGER, INTENT(IN)                   ::  child_rank   !<
+    INTEGER, INTENT(IN)                   ::  tag          !<
+    INTEGER, INTENT(OUT)                  ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_REAL, child_rank, tag,                           &
+                   m_to_child_comm(child_id), MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_child_real_r1
+
+
+
+ SUBROUTINE pmc_send_to_child_real_r2( child_id, buf, n, child_rank, tag,       &
+                                       ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                  ::  child_id     !<
+    REAL(wp), DIMENSION(:,:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)                  ::  n            !<
+    INTEGER, INTENT(IN)                  ::  child_rank   !<
+    INTEGER, INTENT(IN)                  ::  tag          !<
+    INTEGER, INTENT(OUT)                 ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_REAL, child_rank, tag,                           &
+                   m_to_child_comm(child_id), ierr )
+
+ END SUBROUTINE pmc_send_to_child_real_r2
+
+
+
+ SUBROUTINE pmc_recv_from_child_real_r2( child_id, buf, n, child_rank, tag,     &
+                                         ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                   ::  child_id     !<
+    REAL(wp), DIMENSION(:,:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                   ::  n            !<
+    INTEGER, INTENT(IN)                   ::  child_rank   !<
+    INTEGER, INTENT(IN)                   ::  tag          !<
+    INTEGER, INTENT(OUT)                  ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_REAL, child_rank, tag,                           &
+                   m_to_child_comm(child_id), MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_child_real_r2
+
+
+
+ SUBROUTINE pmc_send_to_child_real_r3( child_id, buf, n, child_rank, tag,       &
+                                       ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                    ::  child_id     !<
+    REAL(wp), DIMENSION(:,:,:), INTENT(IN) ::  buf          !<
+    INTEGER, INTENT(IN)                    ::  n            !<
+    INTEGER, INTENT(IN)                    ::  child_rank   !<
+    INTEGER, INTENT(IN)                    ::  tag          !<
+    INTEGER, INTENT(OUT)                   ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_SEND( buf, n, MPI_REAL, child_rank, tag,                           &
+                   m_to_child_comm(child_id), ierr )
+
+ END SUBROUTINE pmc_send_to_child_real_r3
+
+
+
+ SUBROUTINE pmc_recv_from_child_real_r3( child_id, buf, n, child_rank, tag,     &
+                                         ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN)                     ::  child_id     !<
+    REAL(wp), DIMENSION(:,:,:), INTENT(OUT) ::  buf          !<
+    INTEGER, INTENT(IN)                     ::  n            !<
+    INTEGER, INTENT(IN)                     ::  child_rank   !<
+    INTEGER, INTENT(IN)                     ::  tag          !<
+    INTEGER, INTENT(OUT)                    ::  ierr         !<
+
+    
+    ierr = 0
+    CALL MPI_RECV( buf, n, MPI_REAL, child_rank, tag,                           & 
+                   m_to_child_comm(child_id), MPI_STATUS_IGNORE, ierr )
+
+ END SUBROUTINE pmc_recv_from_child_real_r3
+
+
+
+ SUBROUTINE pmc_bcast_integer( buf, root_pe, comm, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(INOUT)         ::  buf      !<
+    INTEGER, INTENT(IN)            ::  root_pe  !<
+    INTEGER, INTENT(IN), OPTIONAL  ::  comm     !<
+    INTEGER, INTENT(OUT), OPTIONAL ::  ierr     !<
+
+    INTEGER ::  mycomm  !<
+    INTEGER ::  myerr   !<
+
+
+    IF ( PRESENT( comm ) )  THEN
+       mycomm = comm
+    ELSE
+       mycomm = m_model_comm
+    ENDIF
+
+    CALL MPI_BCAST( buf, 1, MPI_INTEGER, root_pe, mycomm, myerr )
+
+    IF ( PRESENT( ierr ) )  THEN
+       ierr = myerr
+    ENDIF
+
+ END SUBROUTINE pmc_bcast_integer
+
+
+
+ SUBROUTINE pmc_bcast_character( buf, root_pe, comm, ierr )
+
+    IMPLICIT NONE
+
+    CHARACTER(LEN=*), INTENT(INOUT) ::  buf      !<
+    INTEGER, INTENT(IN)             ::  root_pe  !<
+    INTEGER, INTENT(IN), OPTIONAL   ::  comm     !<
+    INTEGER, INTENT(OUT), OPTIONAL  ::  ierr     !<
+
+    INTEGER ::  mycomm  !<
+    INTEGER ::  myerr   !<
+
+    
+    IF ( PRESENT( comm ) )  THEN
+       mycomm = comm
+    ELSE
+       mycomm = m_model_comm
+    ENDIF
+
+    CALL MPI_BCAST( buf, LEN(buf), MPI_CHARACTER, root_pe, mycomm, myerr )
+
+    IF ( PRESENT( ierr ) )  THEN
+       ierr = myerr
+    ENDIF
+
+ END SUBROUTINE pmc_bcast_character
+
+
+
+ SUBROUTINE pmc_inter_bcast_integer_1( buf, child_id, ierr )
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(INOUT),DIMENSION(:) ::  buf        !<
+    INTEGER, INTENT(IN),optional        ::  child_id   !<
+    INTEGER, INTENT(OUT),optional       ::  ierr       !<
+
+    INTEGER ::  mycomm   !<
+    INTEGER ::  myerr    !<
+    INTEGER ::  root_pe  !<
+
+!
+!-- Process 0 on parent broadcast to all child processes
+    IF ( PRESENT( child_id ) )  THEN
+
+       mycomm = m_to_child_comm(child_id)
+
+       IF ( m_model_rank == 0 )  THEN
+          root_pe = MPI_ROOT
+       ELSE
+          root_pe = MPI_PROC_NULL
+       ENDIF
+
+    ELSE
+       mycomm  = m_to_parent_comm
+       root_pe = 0
+    ENDIF
+
+    CALL MPI_BCAST( buf, SIZE( buf ), MPI_INTEGER, root_pe, mycomm, myerr )
+
+    IF ( PRESENT( ierr ) )  THEN
+       ierr = myerr
+    ENDIF
+
+ END SUBROUTINE pmc_inter_bcast_integer_1
+
+
+
+ SUBROUTINE pmc_alloc_mem_integer_1( iarray, idim1 )
+!
+!-- Allocate memory with MPI_ALLOC_MEM using intermediate C-pointer
+
+    IMPLICIT NONE
+
+    INTEGER, DIMENSION(:), POINTER, INTENT(INOUT) ::  iarray  !<
+    INTEGER, INTENT(IN)                           ::  idim1   !<
+
+    INTEGER, DIMENSION(1)          ::  ashape   !<
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  winsize  !<
+    INTEGER                        ::  ierr     !<
+
+    TYPE(C_PTR)                    ::  p_myind  !<
+
+    
+    winsize = idim1 * STORAGE_SIZE( ierr )/8
+
+    CALL MPI_ALLOC_MEM( winsize, MPI_INFO_NULL, p_myind, ierr )
+    ashape(1) = idim1
+    CALL C_F_POINTER( p_myind, iarray, ashape )
+
+ END SUBROUTINE pmc_alloc_mem_integer_1
+
+
+
+ SUBROUTINE pmc_alloc_mem_real_1( array, idim1, base_ptr )
+
+    IMPLICIT NONE
+
+    INTEGER(idp), INTENT(IN)                            ::  idim1     !<
+    REAL(KIND=wp), DIMENSION(:), POINTER, INTENT(INOUT) ::  array     !<
+    TYPE(C_PTR), INTENT(OUT), OPTIONAL                  ::  base_ptr  !<
+
+    INTEGER, DIMENSION(1)          :: ashape   !<
+    INTEGER(KIND=MPI_ADDRESS_KIND) :: winsize  !<
+    INTEGER                        :: ierr     !<
+
+    TYPE(C_PTR)                    :: p_myind  !<
+
+    
+    winsize = idim1 * wp
+
+    CALL MPI_ALLOC_MEM( winsize , MPI_INFO_NULL, p_myind, ierr )
+    ashape(1) = idim1
+    CALL C_F_POINTER( p_myind, array, ashape )
+
+    IF ( PRESENT( base_ptr ) )  THEN
+       base_ptr = p_myind
+    ENDIF
+
+ END SUBROUTINE pmc_alloc_mem_Real_1
+
+
+
+ FUNCTION pmc_time()
+
+    REAL(kind=wp) :: pmc_time  !<
+
+    
+    pmc_time = MPI_WTIME()
+
+  END FUNCTION pmc_time
+
+#endif
+ END MODULE pmc_mpi_wrapper
Index: /palm/tags/release-6.0/SOURCE/pmc_parent_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_parent_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_parent_mod.f90	(revision 3477)
@@ -0,0 +1,1091 @@
+ MODULE pmc_parent
+
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! explicit kind settings
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Comment extended
+! 
+! 2841 2018-02-27 15:02:57Z Giersch
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2809 2018-02-15 09:55:58Z schwenkel
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Introduce particle transfer in nested models.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2599 2017-11-01 13:18:45Z hellstea
+! Some cleanup and commenting improvements only.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1938 2016-06-13 15:26:05Z hellstea
+! Minor clean up.
+! 
+! 1901 2016-05-04 15:39:38Z raasch
+! Module renamed. Code clean up. The words server/client changed to parent/child. 
+!
+! 1900 2016-05-04 15:27:53Z raasch
+! re-formatted to match PALM style
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! gfortran requires pointer attributes for some array declarations,
+! long line wrapped
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! introduction of different datatransfer modes
+!
+! 1791 2016-03-11 10:41:25Z raasch
+! Debug write-statements commented out
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! change in child-parent data transfer: parent now gets data from child
+! instead that child put's it to the parent
+!
+! 1779 2016-03-03 08:01:28Z raasch
+! kind=dp replaced by wp,
+! error messages removed or changed to PALM style, dim_order removed
+! array management changed from linked list to sequential loop
+!
+! 1766 2016-02-29 08:37:15Z raasch
+! modifications to allow for using PALM's pointer version
+! +new routine pmc_s_set_active_data_array
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! cpp-statement added (nesting can only be used in parallel mode)
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Initial revision by K. Ketelsen
+!
+! Description:
+! ------------
+!
+! Parent part of Palm Model Coupler
+!------------------------------------------------------------------------------!
+
+#if defined( __parallel )
+    USE, INTRINSIC ::  ISO_C_BINDING
+
+#if !defined( __mpifh )
+    USE MPI
+#endif
+    USE kinds
+    USE pmc_general,                                                           &
+        ONLY: arraydef, childdef, da_namedef, da_namelen, pedef,               &
+              pmc_g_setname, pmc_max_array, pmc_max_models, pmc_sort
+
+    USE pmc_handle_communicator,                                               &
+        ONLY: m_model_comm,m_model_rank,m_model_npes, m_to_child_comm,         &
+              m_world_rank, pmc_parent_for_child
+
+    USE pmc_mpi_wrapper,                                                       &
+        ONLY: pmc_alloc_mem, pmc_bcast, pmc_time
+
+   IMPLICIT NONE
+
+#if defined( __mpifh )
+   INCLUDE "mpif.h"
+#endif
+
+   PRIVATE
+   SAVE
+
+   TYPE childindexdef
+      INTEGER                              ::  nrpoints       !<
+      INTEGER, DIMENSION(:,:), ALLOCATABLE ::  index_list_2d  !<
+   END TYPE childindexdef
+
+   TYPE(childdef), DIMENSION(pmc_max_models),PUBLIC   ::  children     !<
+   TYPE(childindexdef), DIMENSION(pmc_max_models)     ::  indchildren  !<
+
+   INTEGER ::  next_array_in_list = 0  !<
+
+
+   PUBLIC pmc_parent_for_child
+
+
+   INTERFACE pmc_parentinit
+      MODULE PROCEDURE  pmc_parentinit
+   END INTERFACE pmc_parentinit
+
+    INTERFACE pmc_s_set_2d_index_list
+        MODULE PROCEDURE pmc_s_set_2d_index_list
+    END INTERFACE pmc_s_set_2d_index_list
+
+    INTERFACE pmc_s_clear_next_array_list
+        MODULE PROCEDURE pmc_s_clear_next_array_list
+    END INTERFACE pmc_s_clear_next_array_list
+
+    INTERFACE pmc_s_getnextarray
+        MODULE PROCEDURE pmc_s_getnextarray
+    END INTERFACE pmc_s_getnextarray
+
+    INTERFACE pmc_s_set_dataarray
+        MODULE PROCEDURE pmc_s_set_dataarray_2d
+        MODULE PROCEDURE pmc_s_set_dataarray_3d
+        MODULE PROCEDURE pmc_s_set_dataarray_ip2d
+    END INTERFACE pmc_s_set_dataarray
+
+    INTERFACE pmc_s_setind_and_allocmem
+        MODULE PROCEDURE pmc_s_setind_and_allocmem
+    END INTERFACE pmc_s_setind_and_allocmem
+
+    INTERFACE pmc_s_fillbuffer
+        MODULE PROCEDURE pmc_s_fillbuffer
+    END INTERFACE pmc_s_fillbuffer
+
+    INTERFACE pmc_s_getdata_from_buffer
+        MODULE PROCEDURE pmc_s_getdata_from_buffer
+    END INTERFACE pmc_s_getdata_from_buffer
+
+    INTERFACE pmc_s_set_active_data_array
+        MODULE PROCEDURE pmc_s_set_active_data_array
+    END INTERFACE pmc_s_set_active_data_array
+
+    INTERFACE pmc_s_get_child_npes
+        MODULE PROCEDURE pmc_s_get_child_npes
+    END INTERFACE pmc_s_get_child_npes
+
+    PUBLIC pmc_parentinit, pmc_s_clear_next_array_list, pmc_s_fillbuffer,      &
+           pmc_s_getdata_from_buffer, pmc_s_getnextarray,                      &
+           pmc_s_setind_and_allocmem, pmc_s_set_active_data_array,             &
+           pmc_s_set_dataarray, pmc_s_set_2d_index_list,                       &
+           pmc_s_get_child_npes
+
+ CONTAINS
+
+
+ SUBROUTINE pmc_parentinit
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  childid   !<
+    INTEGER(iwp) ::  i         !<
+    INTEGER(iwp) ::  j         !<
+    INTEGER(iwp) ::  istat     !<
+
+    DO  i = 1, SIZE( pmc_parent_for_child )-1
+
+       childid = pmc_parent_for_child( i )
+
+       children(childid)%model_comm = m_model_comm
+       children(childid)%inter_comm = m_to_child_comm(childid)
+
+!
+!--    Get rank and size
+       CALL MPI_COMM_RANK( children(childid)%model_comm,                       &
+                           children(childid)%model_rank, istat )
+       CALL MPI_COMM_SIZE( children(childid)%model_comm,                       &
+                           children(childid)%model_npes, istat )
+       CALL MPI_COMM_REMOTE_SIZE( children(childid)%inter_comm,                &
+                                  children(childid)%inter_npes, istat )
+!
+!--    Intra communicator is used for MPI_GET
+       CALL MPI_INTERCOMM_MERGE( children(childid)%inter_comm, .FALSE.,        &
+                                 children(childid)%intra_comm, istat )
+       CALL MPI_COMM_RANK( children(childid)%intra_comm,                       &
+                           children(childid)%intra_rank, istat )
+
+       ALLOCATE( children(childid)%pes(children(childid)%inter_npes))
+!
+!--    Allocate array of TYPE arraydef for all child PEs to store information
+!--    of the transfer array
+       DO  j = 1, children(childid)%inter_npes
+         ALLOCATE( children(childid)%pes(j)%array_list(pmc_max_array) )
+       ENDDO
+
+       CALL get_da_names_from_child (childid)
+
+    ENDDO
+
+ END SUBROUTINE pmc_parentinit
+
+
+
+ SUBROUTINE pmc_s_set_2d_index_list( childid, index_list )
+
+     IMPLICIT NONE
+
+     INTEGER(iwp), INTENT(IN)                    :: childid     !<
+     INTEGER(iwp), DIMENSION(:,:), INTENT(INOUT) :: index_list  !<
+
+     INTEGER(iwp) ::  ian    !<
+     INTEGER(iwp) ::  ie     !<
+     INTEGER(iwp) ::  ip     !<
+     INTEGER(iwp) ::  is     !<
+     INTEGER(iwp) ::  istat  !<
+
+
+     IF ( m_model_rank == 0 )  THEN
+!
+!--     Sort to ascending parent process order
+        CALL pmc_sort( index_list, 6 )
+        is = 1
+        DO  ip = 0, m_model_npes-1
+!
+!--        Split into parent processes
+           ie = is - 1
+!
+!--        There may be no entry for this process
+           IF ( is <= SIZE( index_list,2 )  .AND.  ie >= 0 )  THEN
+              DO WHILE ( index_list(6,ie+1 ) == ip )
+                 ie = ie + 1
+                 IF ( ie == SIZE( index_list,2 ) )  EXIT
+              ENDDO
+              ian = ie - is + 1
+           ELSE
+              is  = -1
+              ie  = -2
+              ian =  0
+           ENDIF
+!
+!--        Send data to other parent processes
+           IF ( ip == 0 )  THEN
+              indchildren(childid)%nrpoints = ian
+              IF ( ian > 0)  THEN
+                  ALLOCATE( indchildren(childid)%index_list_2d(6,ian) )
+                  indchildren(childid)%index_list_2d(:,1:ian) =                &
+                                                             index_list(:,is:ie)
+              ENDIF
+           ELSE
+              CALL MPI_SEND( ian, 1, MPI_INTEGER, ip, 1000, m_model_comm,      &
+                             istat )
+              IF ( ian > 0)  THEN
+                  CALL MPI_SEND( index_list(1,is), 6*ian, MPI_INTEGER, ip,     &
+                                 1001, m_model_comm, istat )
+              ENDIF
+           ENDIF
+           is = ie + 1
+        ENDDO
+     ELSE
+        CALL MPI_RECV( indchildren(childid)%nrpoints, 1, MPI_INTEGER, 0, 1000, &
+                       m_model_comm, MPI_STATUS_IGNORE, istat )
+        ian = indchildren(childid)%nrpoints
+        IF ( ian > 0 )  THEN
+           ALLOCATE( indchildren(childid)%index_list_2d(6,ian) )
+           CALL MPI_RECV( indchildren(childid)%index_list_2d, 6*ian,           &
+                          MPI_INTEGER, 0, 1001, m_model_comm,                  &
+                          MPI_STATUS_IGNORE, istat)
+        ENDIF
+     ENDIF
+     CALL set_pe_index_list( children(childid),                                &
+                             indchildren(childid)%index_list_2d,               &
+                             indchildren(childid)%nrpoints )
+
+ END SUBROUTINE pmc_s_set_2d_index_list
+
+
+
+ SUBROUTINE pmc_s_clear_next_array_list
+
+    IMPLICIT NONE
+
+    next_array_in_list = 0
+
+ END SUBROUTINE pmc_s_clear_next_array_list
+
+
+
+ LOGICAL FUNCTION pmc_s_getnextarray( childid, myname )
+
+!
+!-- Althoug there are no linked lists any more in PMC, this call still looks like working with a list
+
+    CHARACTER(LEN=*), INTENT(OUT) ::  myname    !<
+    INTEGER(iwp), INTENT(IN)      ::  childid   !<
+
+    TYPE(arraydef), POINTER :: ar
+    TYPE(pedef), POINTER    :: ape
+
+    next_array_in_list = next_array_in_list + 1
+!
+!-- Array names are the same on all children processes, so take first
+!-- process to get the name
+    ape => children(childid)%pes(1)
+
+    IF ( next_array_in_list > ape%nr_arrays )  THEN
+!
+!--    All arrays are done
+       pmc_s_getnextarray = .FALSE.
+       RETURN
+    ENDIF
+
+    ar => ape%array_list(next_array_in_list)
+    myname = ar%name
+!
+!-- Return true if there is still an array in the list
+
+    pmc_s_getnextarray = .TRUE.
+
+ END FUNCTION pmc_s_getnextarray
+
+
+
+ SUBROUTINE pmc_s_set_dataarray_2d( childid, array, array_2 )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  childid   !<
+
+    REAL(wp), INTENT(IN), DIMENSION(:,:), POINTER           ::  array    !<
+    REAL(wp), INTENT(IN), DIMENSION(:,:), POINTER, OPTIONAL ::  array_2  !<
+
+    INTEGER(iwp)               ::  nrdims      !<
+    INTEGER(iwp), DIMENSION(4) ::  dims        !<
+    TYPE(C_PTR)           ::  array_adr   !<
+    TYPE(C_PTR)           ::  second_adr  !<
+
+
+    dims      = 1
+    nrdims    = 2
+    dims(1)   = SIZE( array,1 )
+    dims(2)   = SIZE( array,2 )
+    array_adr = C_LOC( array )
+
+    IF ( PRESENT( array_2 ) )  THEN
+       second_adr = C_LOC(array_2)
+       CALL pmc_s_setarray( childid, nrdims, dims, array_adr,                  &
+                            second_adr = second_adr)
+    ELSE
+       CALL pmc_s_setarray( childid, nrdims, dims, array_adr )
+    ENDIF
+
+ END SUBROUTINE pmc_s_set_dataarray_2d
+
+ SUBROUTINE pmc_s_set_dataarray_ip2d( childid, array )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp),INTENT(IN) ::  childid   !<
+
+    INTEGER(idp), INTENT(IN), DIMENSION(:,:), POINTER           ::  array    !<
+
+    INTEGER(iwp)               ::  nrdims      !<
+    INTEGER(iwp), DIMENSION(4) ::  dims        !<
+    TYPE(C_PTR)           ::  array_adr   !<
+
+
+    dims      = 1
+    nrdims    = 2
+    dims(1)   = SIZE( array,1 )
+    dims(2)   = SIZE( array,2 )
+    array_adr = C_LOC( array )
+
+    CALL pmc_s_setarray( childid, nrdims, dims, array_adr , dimkey=22)
+
+ END SUBROUTINE pmc_s_set_dataarray_ip2d
+
+
+ SUBROUTINE pmc_s_set_dataarray_3d( childid, array, nz_cl, nz, array_2 )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  childid   !<
+    INTEGER(iwp), INTENT(IN) ::  nz        !<
+    INTEGER(iwp), INTENT(IN) ::  nz_cl     !<
+
+    REAL(wp), INTENT(IN), DIMENSION(:,:,:), POINTER           ::  array    !<
+    REAL(wp), INTENT(IN), DIMENSION(:,:,:), POINTER, OPTIONAL ::  array_2  !<
+
+    INTEGER(iwp)               ::  nrdims      !<
+    INTEGER(iwp), DIMENSION(4) ::  dims        !<
+    TYPE(C_PTR)           ::  array_adr   !<
+    TYPE(C_PTR)           ::  second_adr  !<
+
+    nrdims    = 3
+    dims(1)   = SIZE( array,1 )
+    dims(2)   = SIZE( array,2 )
+    dims(3)   = SIZE( array,3 )
+    dims(4)   = nz_cl+dims(1)-nz  ! works for first dimension 1:nz and 0:nz+1
+
+    array_adr = C_LOC(array)
+!
+!-- In PALM's pointer version, two indices have to be stored internally.
+!-- The active address of the data array is set in swap_timelevel.
+    IF ( PRESENT( array_2 ) )  THEN
+      second_adr = C_LOC( array_2 )
+      CALL pmc_s_setarray( childid, nrdims, dims, array_adr,                   &
+                           second_adr = second_adr)
+    ELSE
+       CALL pmc_s_setarray( childid, nrdims, dims, array_adr )
+    ENDIF
+
+ END SUBROUTINE pmc_s_set_dataarray_3d
+
+
+
+ SUBROUTINE pmc_s_setind_and_allocmem( childid )
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    IMPLICIT NONE
+
+!
+!-- Naming convention for appendices:   _pc  -> parent to child transfer
+!--                                     _cp  -> child to parent transfer
+!--                                     send -> parent to child transfer
+!--                                     recv -> child to parent transfer
+    INTEGER(iwp), INTENT(IN) ::  childid   !<
+
+    INTEGER(iwp)                   ::  arlen    !<
+    INTEGER(iwp)                   ::  i        !<
+    INTEGER(iwp)                   ::  ierr     !<
+    INTEGER(iwp)                   ::  j        !<
+    INTEGER(iwp)                   ::  myindex  !<
+    INTEGER(iwp)                   ::  rcount   !< count MPI requests
+    INTEGER(iwp)                   ::  tag      !<
+
+    INTEGER(idp)                   ::  bufsize  !< size of MPI data window
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  winsize  !<
+
+    INTEGER(iwp), DIMENSION(1024)       ::  req      !<
+
+    TYPE(C_PTR)             ::  base_ptr  !<
+    TYPE(pedef), POINTER    ::  ape       !<
+    TYPE(arraydef), POINTER ::  ar        !<
+
+    REAL(wp),DIMENSION(:), POINTER, SAVE ::  base_array_pc  !< base array for parent to child transfer
+    REAL(wp),DIMENSION(:), POINTER, SAVE ::  base_array_cp  !< base array for child to parent transfer
+
+!
+!-- Parent to child direction
+    myindex = 1
+    rcount  = 0
+    bufsize = 8
+!
+!-- First stride: compute size and set index
+    DO  i = 1, children(childid)%inter_npes
+
+       ape => children(childid)%pes(i)
+       tag = 200
+
+       DO  j = 1, ape%nr_arrays
+
+          ar  => ape%array_list(j)
+          IF ( ar%nrdims == 2 )  THEN
+             arlen = ape%nrele
+          ELSEIF ( ar%nrdims == 3 )  THEN
+             arlen = ape%nrele * ar%a_dim(4)
+          ELSE
+             arlen = -1
+          ENDIF
+          ar%sendindex = myindex
+
+          tag    = tag + 1
+          rcount = rcount + 1
+          CALL MPI_ISEND( myindex, 1, MPI_INTEGER, i-1, tag,                   &
+                          children(childid)%inter_comm, req(rcount), ierr )
+!
+!--       Maximum of 1024 pending requests
+
+          IF ( rcount == 1024 )  THEN
+             CALL MPI_WAITALL( rcount, req, MPI_STATUSES_IGNORE, ierr )
+             rcount = 0
+          ENDIF
+
+          myindex = myindex + arlen
+          bufsize = bufsize + arlen
+          ar%sendsize = arlen
+       ENDDO
+
+       IF ( rcount > 0 )  THEN
+          CALL MPI_WAITALL( rcount, req, MPI_STATUSES_IGNORE, ierr )
+       ENDIF
+
+    ENDDO
+!
+!-- Create RMA (One Sided Communication) window for data buffer parent to
+!-- child transfer.
+!-- The buffer of MPI_GET (counterpart of transfer) can be PE-local, i.e.
+!-- it can but must not be part of the MPI RMA window. Only one RMA window is
+!-- required to prepare the data for
+!--                       parent -> child transfer on the parent side
+!-- and for
+!--                       child -> parent transfer on the child side
+    CALL pmc_alloc_mem( base_array_pc, bufsize )
+    children(childid)%totalbuffersize = bufsize * wp
+
+    winsize = bufsize * wp
+    CALL MPI_WIN_CREATE( base_array_pc, winsize, wp, MPI_INFO_NULL,            &
+                         children(childid)%intra_comm,                         &
+                         children(childid)%win_parent_child, ierr )
+!
+!-- Open window to set data
+    CALL MPI_WIN_FENCE( 0, children(childid)%win_parent_child, ierr )
+!
+!-- Second stride: set buffer pointer
+    DO  i = 1, children(childid)%inter_npes
+
+       ape => children(childid)%pes(i)
+
+       DO  j = 1, ape%nr_arrays
+
+          ar => ape%array_list(j)
+          ar%sendbuf = C_LOC( base_array_pc(ar%sendindex) )
+
+          IF ( ar%sendindex + ar%sendsize > bufsize )  THEN             
+             WRITE( message_string, '(a,i4,4i7,1x,a)' )                        &
+                    'parent buffer too small ',i,                              &
+                    ar%sendindex,ar%sendsize,ar%sendindex+ar%sendsize,         &
+                    bufsize,trim(ar%name)
+             CALL message( 'pmc_s_setind_and_allocmem', 'PA0429', 3, 2, 0, 6, 0 )
+          ENDIF
+       ENDDO
+    ENDDO
+!
+!-- Child to parent direction
+    bufsize = 8
+!
+!-- First stride: compute size and set index
+    DO  i = 1, children(childid)%inter_npes
+       ape => children(childid)%pes(i)
+       tag = 300
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+!
+!--       Receive index from child
+          tag = tag + 1
+          CALL MPI_RECV( myindex, 1, MPI_INTEGER, i-1, tag,                    &
+                         children(childid)%inter_comm, MPI_STATUS_IGNORE, ierr )
+          IF ( ar%nrdims == 3 )  THEN
+             bufsize = MAX( bufsize,                                           &
+                            INT( ape%nrele * ar%a_dim(4), MPI_ADDRESS_KIND ) )
+          ELSE
+             bufsize = MAX( bufsize, INT( ape%nrele, MPI_ADDRESS_KIND ) )
+          ENDIF
+          ar%recvindex = myindex
+        ENDDO
+    ENDDO
+!
+!-- Create RMA (one sided communication, RMA = Remote Memory Access) data buffer.
+!-- The buffer for MPI_GET can be PE local, i.e. it can but must not be part of
+!-- the MPI RMA window
+    CALL pmc_alloc_mem( base_array_cp, bufsize, base_ptr )
+    children(childid)%totalbuffersize = bufsize * wp
+
+    CALL MPI_BARRIER( children(childid)%intra_comm, ierr )
+!
+!-- Second stride: set buffer pointer
+    DO  i = 1, children(childid)%inter_npes
+       ape => children(childid)%pes(i)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+          ar%recvbuf = base_ptr
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE pmc_s_setind_and_allocmem
+
+
+
+ SUBROUTINE pmc_s_fillbuffer( childid, waittime, particle_transfer )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN)             ::  childid   !<
+
+    REAL(wp), INTENT(OUT), OPTIONAL ::  waittime  !<
+    LOGICAL, INTENT(IN), OPTIONAL   ::  particle_transfer  !<
+
+
+    INTEGER(iwp)               ::  ierr     !<
+    INTEGER(iwp)               ::  ij       !<
+    INTEGER(iwp)               ::  ip       !<
+    INTEGER(iwp)               ::  j        !<
+    INTEGER(iwp)               ::  myindex  !<
+    
+    LOGICAL                    ::  lo_ptrans
+
+    INTEGER(iwp), DIMENSION(1) ::  buf_shape
+
+    REAL(wp)                            ::  t1       !<
+    REAL(wp)                            ::  t2       !<
+    REAL(wp), POINTER, DIMENSION(:)     ::  buf      !<
+    REAL(wp), POINTER, DIMENSION(:,:)   ::  data_2d  !<
+    REAL(wp), POINTER, DIMENSION(:,:,:) ::  data_3d  !<
+    INTEGER(idp), POINTER, DIMENSION(:)     ::  ibuf      !<
+    INTEGER(idp), POINTER, DIMENSION(:,:)   ::  idata_2d  !<
+
+    TYPE(pedef), POINTER    ::  ape  !<
+    TYPE(arraydef), POINTER ::  ar   !<
+
+!
+!-- Synchronization of the model is done in pmci_synchronize.
+!-- Therefor the RMA window can be filled without
+!-- sychronization at this point and a barrier is not necessary.
+!-- Please note that waittime has to be set in pmc_s_fillbuffer AND
+!-- pmc_c_getbuffer
+    IF ( PRESENT( waittime) )  THEN
+      t1 = pmc_time()
+      CALL MPI_BARRIER( children(childid)%intra_comm, ierr )
+      t2 = pmc_time()
+      waittime = t2- t1
+    ENDIF
+
+    lo_ptrans = .FALSE.
+    IF ( PRESENT( particle_transfer))    lo_ptrans = particle_transfer
+
+    DO  ip = 1, children(childid)%inter_npes
+       ape => children(childid)%pes(ip)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+          myindex = 1
+
+          IF ( ar%dimkey == 2 .AND. .NOT.lo_ptrans  )  THEN                            ! PALM 2D REAL*8 Array
+
+             buf_shape(1) = ape%nrele
+             CALL C_F_POINTER( ar%sendbuf, buf, buf_shape )
+             CALL C_F_POINTER( ar%data, data_2d, ar%a_dim(1:2) )
+             DO  ij = 1, ape%nrele
+                buf(myindex) = data_2d(ape%locind(ij)%j,ape%locind(ij)%i)
+                myindex = myindex + 1
+             ENDDO
+
+          ELSEIF ( ar%dimkey == 3  .AND. .NOT.lo_ptrans  )  THEN                       ! PALM 3D REAL*8 Array
+
+             buf_shape(1) = ape%nrele*ar%a_dim(4)
+             CALL C_F_POINTER( ar%sendbuf, buf, buf_shape )
+             CALL C_F_POINTER( ar%data, data_3d, ar%a_dim(1:3) )
+             DO  ij = 1, ape%nrele
+                buf(myindex:myindex+ar%a_dim(4)-1) =                            &
+                        data_3d(1:ar%a_dim(4),ape%locind(ij)%j,ape%locind(ij)%i)
+                myindex = myindex + ar%a_dim(4)
+             ENDDO
+          ELSEIF ( ar%dimkey == 22 .AND. lo_ptrans  )  THEN                           ! 2D INTEGER*8 Array for particle Transfer
+
+             buf_shape(1) = ape%nrele
+             CALL C_F_POINTER( ar%sendbuf, ibuf, buf_shape )
+             CALL C_F_POINTER( ar%data, idata_2d, ar%a_dim(1:2) )
+             DO  ij = 1, ape%nrele
+                ibuf(myindex) = idata_2d(ape%locind(ij)%j,ape%locind(ij)%i)
+                myindex = myindex + 1
+             ENDDO
+          ENDIF
+        ENDDO
+    ENDDO
+!
+!-- Buffer is filled
+    CALL MPI_BARRIER( children(childid)%intra_comm, ierr )
+
+ END SUBROUTINE pmc_s_fillbuffer
+
+
+
+ SUBROUTINE pmc_s_getdata_from_buffer( childid, waittime , particle_transfer, child_process_nr )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN)             ::  childid      !<
+    REAL(wp), INTENT(OUT), OPTIONAL ::  waittime     !<
+    LOGICAL, INTENT(IN), OPTIONAL   ::  particle_transfer     !<
+    INTEGER(iwp), INTENT(IN), OPTIONAL   ::  child_process_nr      !<
+
+    INTEGER(iwp)                        ::  ierr          !<
+    INTEGER(iwp)                   ::  ij            !<
+    INTEGER(iwp)                   ::  ip            !<
+    INTEGER(iwp)                   ::  ip_start      !<
+    INTEGER(iwp)                   ::  ip_end        !<
+    INTEGER(iwp)                   ::  j             !<
+    INTEGER(iwp)                   ::  myindex       !<
+    INTEGER(iwp)                   ::  nr            !<
+    INTEGER(iwp)                   ::  target_pe     !<
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp   !<
+    
+    LOGICAL                        ::  lo_ptrans
+
+    INTEGER(iwp), DIMENSION(1)          ::  buf_shape     !<
+
+    REAL(wp)                                ::  t1       !<
+    REAL(wp)                                ::  t2       !<
+    REAL(wp), POINTER, DIMENSION(:)         ::  buf      !<
+    REAL(wp), POINTER, DIMENSION(:,:)       ::  data_2d  !<
+    REAL(wp), POINTER, DIMENSION(:,:,:)     ::  data_3d  !<
+    INTEGER(idp), POINTER, DIMENSION(:)     ::  ibuf      !<
+    INTEGER(idp), POINTER, DIMENSION(:,:)   ::  idata_2d  !<
+
+    TYPE(pedef), POINTER                    ::  ape  !<
+    TYPE(arraydef), POINTER                 ::  ar   !<
+
+
+    t1 = pmc_time()
+
+    IF(PRESENT(child_process_nr)) then
+       ip_start = child_process_nr
+       ip_end   = child_process_nr
+    ELSE
+       ip_start = 1
+       ip_end   = children(childid)%inter_npes
+    END IF
+
+    lo_ptrans = .FALSE.
+    IF ( PRESENT( particle_transfer))    lo_ptrans = particle_transfer
+
+    IF(ip_start == 1)   THEN
+!
+!--    Wait for child to fill buffer
+       CALL MPI_BARRIER( children(childid)%intra_comm, ierr )
+       t2 = pmc_time() - t1
+       IF ( PRESENT( waittime ) )  waittime = t2
+
+       CALL MPI_BARRIER( children(childid)%intra_comm, ierr )
+    ENDIF
+
+    DO  ip = ip_start,ip_end
+       ape => children(childid)%pes(ip)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+          
+          IF ( ar%recvindex < 0 )  CYCLE
+
+          IF ( ar%dimkey == 2  .AND. .NOT.lo_ptrans  )  THEN
+             nr = ape%nrele
+          ELSEIF ( ar%dimkey == 3  .AND. .NOT.lo_ptrans  )  THEN
+             nr = ape%nrele * ar%a_dim(4)
+          ELSE IF ( ar%dimkey == 22 .AND. lo_ptrans)  THEN
+             nr = ape%nrele
+          ELSE
+             CYCLE                                        !particle array are not transfered here
+          ENDIF
+          buf_shape(1) = nr
+          IF(lo_ptrans)   THEN
+             CALL C_F_POINTER( ar%recvbuf, ibuf, buf_shape )
+          ELSE
+             CALL C_F_POINTER( ar%recvbuf, buf, buf_shape )
+          ENDIF
+
+!
+!--       MPI passive target RMA
+          IF ( nr > 0 )  THEN
+             target_disp = ar%recvindex - 1
+!
+!--          Child processes are located behind parent process
+             target_pe = ip - 1 + m_model_npes
+             CALL MPI_WIN_LOCK( MPI_LOCK_SHARED, target_pe, 0,                      &
+                                children(childid)%win_parent_child, ierr )
+             IF(lo_ptrans)   THEN
+                CALL MPI_GET( ibuf, nr*8, MPI_BYTE, target_pe, target_disp, nr*8,    &              !There is no MPI_INTEGER8 datatype
+                              MPI_BYTE, children(childid)%win_parent_child, ierr )
+             ELSE
+                CALL MPI_GET( buf, nr, MPI_REAL, target_pe, target_disp, nr,        &
+                              MPI_REAL, children(childid)%win_parent_child, ierr )
+             ENDIF
+             CALL MPI_WIN_UNLOCK( target_pe,                                        &
+                                  children(childid)%win_parent_child, ierr )
+          ENDIF
+          myindex = 1
+          IF ( ar%dimkey == 2  .AND. .NOT.lo_ptrans  )  THEN
+
+             CALL C_F_POINTER( ar%data, data_2d, ar%a_dim(1:2) )
+             DO  ij = 1, ape%nrele
+                data_2d(ape%locind(ij)%j,ape%locind(ij)%i) = buf(myindex)
+                myindex = myindex + 1
+             ENDDO
+
+          ELSEIF ( ar%dimkey == 3  .AND. .NOT.lo_ptrans  )  THEN
+
+             CALL C_F_POINTER( ar%data, data_3d, ar%a_dim(1:3))
+             DO  ij = 1, ape%nrele
+                data_3d(1:ar%a_dim(4),ape%locind(ij)%j,ape%locind(ij)%i) =     &
+                                              buf(myindex:myindex+ar%a_dim(4)-1)
+                myindex = myindex + ar%a_dim(4)
+             ENDDO
+
+          ELSE IF ( ar%dimkey == 22 .AND. lo_ptrans)  THEN
+
+             CALL C_F_POINTER( ar%data, idata_2d, ar%a_dim(1:2) )
+             DO  ij = 1, ape%nrele
+                idata_2d(ape%locind(ij)%j,ape%locind(ij)%i) = ibuf(myindex)
+                myindex = myindex + 1
+             ENDDO
+
+          ENDIF
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE pmc_s_getdata_from_buffer
+
+
+
+ SUBROUTINE get_da_names_from_child( childid )
+
+!
+!-- Get data array description and name from child
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  childid  !<
+
+    TYPE(da_namedef) ::  myname  !<
+
+    DO
+       CALL pmc_bcast( myname%couple_index, 0, comm=m_to_child_comm(childid) )
+
+       IF ( myname%couple_index == -1 )  EXIT
+
+       CALL pmc_bcast( myname%parentdesc,   0, comm=m_to_child_comm(childid) )
+       CALL pmc_bcast( myname%nameonparent, 0, comm=m_to_child_comm(childid) )
+       CALL pmc_bcast( myname%childdesc,    0, comm=m_to_child_comm(childid) )
+       CALL pmc_bcast( myname%nameonchild,  0, comm=m_to_child_comm(childid) )
+
+       CALL pmc_g_setname( children(childid), myname%couple_index,             &
+                           myname%nameonparent )
+   ENDDO
+
+ END SUBROUTINE get_da_names_from_child
+
+
+
+ SUBROUTINE pmc_s_setarray(childid, nrdims, dims, array_adr, second_adr, dimkey )
+
+!
+!-- Set array for child inter process 0
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN)               :: childid    !<
+    INTEGER(iwp), INTENT(IN)               :: nrdims     !<
+    INTEGER(iwp), INTENT(IN), DIMENSION(:) :: dims       !<
+
+    TYPE(C_PTR), INTENT(IN)           :: array_adr  !<
+    TYPE(C_PTR), INTENT(IN), OPTIONAL :: second_adr !<
+    INTEGER(iwp), INTENT(IN), OPTIONAL     :: dimkey     !<
+
+    INTEGER(iwp) ::  i  !< local counter
+
+    TYPE(pedef), POINTER    ::  ape  !<
+    TYPE(arraydef), POINTER ::  ar   !<
+
+
+    DO  i = 1, children(childid)%inter_npes
+       ape => children(childid)%pes(i)
+       ar  => ape%array_list(next_array_in_list)
+       ar%nrdims = nrdims
+       ar%dimkey = nrdims
+       IF(PRESENT(dimkey)) ar%dimkey = dimkey
+       ar%a_dim  = dims
+       ar%data   = array_adr
+       IF ( PRESENT( second_adr ) )  THEN
+          ar%po_data(1) = array_adr
+          ar%po_data(2) = second_adr
+       ELSE
+          ar%po_data(1) = C_NULL_PTR
+          ar%po_data(2) = C_NULL_PTR
+       ENDIF
+    ENDDO
+
+ END SUBROUTINE pmc_s_setarray
+
+
+
+ SUBROUTINE pmc_s_set_active_data_array( childid, iactive )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  childid   !<
+    INTEGER(iwp), INTENT(IN) ::  iactive   !<
+
+    INTEGER(iwp) :: ip  !<
+    INTEGER(iwp) :: j   !<
+
+    TYPE(pedef), POINTER    ::  ape  !<
+    TYPE(arraydef), POINTER ::  ar   !<
+
+    DO  ip = 1, children(childid)%inter_npes
+       ape => children(childid)%pes(ip)
+       DO  j = 1, ape%nr_arrays
+          ar => ape%array_list(j)
+          if(mod(ar%dimkey,10) == 2) CYCLE           !Not for 2D array
+          IF ( iactive == 1  .OR.  iactive == 2 )  THEN
+             ar%data = ar%po_data(iactive)
+          ENDIF
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE pmc_s_set_active_data_array
+
+ INTEGER FUNCTION pmc_s_get_child_npes (child_id)
+   IMPLICIT NONE
+
+   INTEGER(iwp),INTENT(IN)                 :: child_id
+
+   pmc_s_get_child_npes = children(child_id)%inter_npes
+
+   RETURN
+ END FUNCTION pmc_s_get_child_npes
+
+
+ SUBROUTINE set_pe_index_list( mychild, index_list, nrp )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN), DIMENSION(:,:) ::  index_list  !<
+    INTEGER(iwp), INTENT(IN)                 ::  nrp         !<
+
+    TYPE(childdef), INTENT(INOUT)       ::  mychild     !<
+
+    INTEGER(iwp)                            :: i        !<
+    INTEGER(iwp)                            :: ierr     !<
+    INTEGER(iwp)                            :: ind      !<
+    INTEGER(iwp)                            :: indwin   !<
+    INTEGER(iwp)                            :: indwin2  !<
+    INTEGER(iwp)                            :: i2       !<
+    INTEGER(iwp)                            :: j        !<
+    INTEGER(iwp)                            :: rempe    !<
+    INTEGER(KIND=MPI_ADDRESS_KIND)          :: winsize  !<
+
+    INTEGER(iwp), DIMENSION(mychild%inter_npes)  :: remind   !<
+
+    INTEGER(iwp), DIMENSION(:), POINTER          :: remindw  !<
+    INTEGER(iwp), DIMENSION(:), POINTER          :: rldef    !<
+
+    TYPE(pedef), POINTER                    :: ape      !<
+
+!
+!-- First, count entries for every remote child process
+    DO  i = 1, mychild%inter_npes
+       ape => mychild%pes(i)
+       ape%nrele = 0
+    ENDDO
+!
+!-- Loop over number of coarse grid cells
+    DO  j = 1, nrp
+       rempe = index_list(5,j) + 1   ! process number on remote process
+       ape => mychild%pes(rempe)
+       ape%nrele = ape%nrele + 1     ! Increment number of elements for this child process
+    ENDDO
+
+    DO  i = 1, mychild%inter_npes
+       ape => mychild%pes(i)
+       ALLOCATE( ape%locind(ape%nrele) )
+    ENDDO
+
+    remind = 0
+!
+!-- Second, create lists
+!-- Loop over number of coarse grid cells
+    DO  j = 1, nrp
+       rempe = index_list(5,j) + 1
+       ape => mychild%pes(rempe)
+       remind(rempe)     = remind(rempe)+1
+       ind               = remind(rempe)
+       ape%locind(ind)%i = index_list(1,j)
+       ape%locind(ind)%j = index_list(2,j)
+    ENDDO
+!
+!-- Prepare number of elements for children processes
+    CALL pmc_alloc_mem( rldef, mychild%inter_npes*2 )
+!
+!-- Number of child processes * size of INTEGER (i just arbitrary INTEGER)
+    winsize = mychild%inter_npes*STORAGE_SIZE(i)/8*2
+
+    CALL MPI_WIN_CREATE( rldef, winsize, iwp, MPI_INFO_NULL,                   &
+                         mychild%intra_comm, indwin, ierr )
+!
+!-- Open window to set data
+    CALL MPI_WIN_FENCE( 0, indwin, ierr )
+
+    rldef(1) = 0            ! index on remote process 0
+    rldef(2) = remind(1)    ! number of elements on remote process 0
+!
+!-- Reserve buffer for index array
+    DO  i = 2, mychild%inter_npes
+       i2          = (i-1) * 2 + 1
+       rldef(i2)   = rldef(i2-2) + rldef(i2-1) * 2  ! index on remote process
+       rldef(i2+1) = remind(i)                      ! number of elements on remote process
+    ENDDO
+!
+!-- Close window to allow child to access data
+    CALL MPI_WIN_FENCE( 0, indwin, ierr )
+!
+!-- Child has retrieved data
+    CALL MPI_WIN_FENCE( 0, indwin, ierr )
+
+    i2 = 2 * mychild%inter_npes - 1
+    winsize = ( rldef(i2) + rldef(i2+1) ) * 2
+!
+!-- Make sure, MPI_ALLOC_MEM works
+    winsize = MAX( winsize, INT( 1, MPI_ADDRESS_KIND ) )
+
+    CALL pmc_alloc_mem( remindw, INT( winsize ) )
+
+    CALL MPI_BARRIER( m_model_comm, ierr )
+    CALL MPI_WIN_CREATE( remindw, winsize*STORAGE_SIZE(i)/8, iwp, MPI_INFO_NULL,     &
+                         mychild%intra_comm, indwin2, ierr )
+!
+!-- Open window to set data
+    CALL MPI_WIN_FENCE( 0, indwin2, ierr )
+!
+!-- Create the 2D index list
+    DO  j = 1, nrp
+       rempe = index_list(5,j) + 1    ! process number on remote process
+       ape => mychild%pes(rempe)
+       i2    = rempe * 2 - 1
+       ind   = rldef(i2) + 1
+       remindw(ind)   = index_list(3,j)
+       remindw(ind+1) = index_list(4,j)
+       rldef(i2)      = rldef(i2)+2
+    ENDDO
+!
+!-- All data are set
+    CALL MPI_WIN_FENCE( 0, indwin2, ierr )
+!
+!-- Don't know why, but this barrier is necessary before windows can be freed
+!-- TODO: find out why this is required
+    CALL MPI_BARRIER( mychild%intra_comm, ierr )
+
+    CALL MPI_WIN_FREE( indwin, ierr )
+    CALL MPI_WIN_FREE( indwin2, ierr )
+
+!
+!-- TODO: check if the following idea needs to be done
+!-- Sollte funktionieren, Problem mit MPI implementation
+!-- https://www.lrz.de/services/software/parallel/mpi/onesided
+!-- CALL MPI_Free_mem (remindw, ierr)
+
+ END SUBROUTINE set_pe_index_list
+
+#endif
+ END MODULE pmc_parent
Index: /palm/tags/release-6.0/SOURCE/pmc_particle_interface.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pmc_particle_interface.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pmc_particle_interface.f90	(revision 3477)
@@ -0,0 +1,1152 @@
+MODULE pmc_particle_interface
+
+!------------------------------------------------------------------------------!
+! This file is part of PALM.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------! 
+! $Id$
+! unused variables removed
+! 
+! 3123 2018-07-12 16:21:53Z suehring
+! Correct working precision for REAL numbers
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 2967 2018-04-13 11:22:08Z Giersch
+! bugfix: missing parallel cpp-directives added
+! 
+! 2884 2018-03-14 08:33:20Z scharf
+! B: corrected KIND of variable "parsize" for some MPI calls
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2809 2018-02-15 09:55:58Z schwenkel
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE.
+!  
+!
+! Initial Version (by Klaus Ketelsen)
+!
+! 
+! Description:
+! ------------
+! Introduce particle transfer in nested models. 
+! Interface to palm lpm model to handel particle transfer between parent and
+! child model.
+!------------------------------------------------------------------------------!
+
+   USE, INTRINSIC ::  ISO_C_BINDING
+
+#if defined( __parallel )  &&  !defined( __mpifh )
+   USE MPI
+#endif
+
+   USE kinds
+
+   USE pegrid,                                                                 &
+       ONLY: myidx,myidy
+
+   USE indices,                                                                &
+       ONLY: nx, ny, nxl, nxr, nys, nyn, nzb, nzt, nxlg, nxrg, nysg, nyng, nbgp
+
+   USE grid_variables,                                                         &
+       ONLY:  dx, dy
+
+   USE arrays_3d,                                                              &
+        ONLY: zw
+
+   USE control_parameters,                                                     &
+       ONLY:  message_string
+
+   USE particle_attributes,                                                    &
+       ONLY:  prt_count, particles, grid_particles,                            &
+              particle_type, number_of_particles, zero_particle,               &
+              ibc_par_t, ibc_par_lr, ibc_par_ns, alloc_factor
+
+   USE lpm_pack_and_sort_mod
+
+   USE lpm_exchange_horiz_mod,                                                 &
+       ONLY: realloc_particles_array
+
+#if defined( __parallel )
+   USE pmc_general,                                                            &
+       ONLY: pedef
+
+   USE pmc_parent,                                                             &
+       ONLY: children, pmc_s_fillbuffer, pmc_s_getdata_from_buffer,            &
+             pmc_s_get_child_npes
+
+   USE pmc_child,                                                              &
+       ONLY:  me, pmc_c_getbuffer, pmc_c_putbuffer
+
+   USE pmc_interface,                                                          &
+       ONLY: cpl_id, get_number_of_childs, nr_part,  part_adr, nested_run,     &
+             get_childid, get_child_edges, nr_partc,  part_adrc,               &
+             coarse_bound, coord_x, coord_y, cg,   get_child_gridspacing,      &
+             lower_left_coord_x, lower_left_coord_y
+
+    USE pmc_handle_communicator,                                               &
+        ONLY:  pmc_parent_for_child
+
+   USE pmc_mpi_wrapper,                                                        &
+       ONLY: pmc_send_to_parent, pmc_recv_from_child
+
+#endif
+
+   IMPLICIT NONE
+
+#if defined( __parallel )  &&  defined( __mpifh )
+   INCLUDE "mpif.h"
+#endif
+
+   PRIVATE
+   SAVE
+
+   TYPE  coarse_particle_def
+      INTEGER(iwp) ::  nr_particle
+      
+      TYPE(particle_type),ALLOCATABLE,DIMENSION(:) ::  parent_particles
+   END TYPE  coarse_particle_def
+
+   INTEGER(iwp),PARAMETER ::  Min_particles_per_column = 100      !<
+   INTEGER(iwp),PARAMETER ::  max_nr_particle_in_rma_win = 100000 !<
+
+   INTEGER(iwp) ::  nr_fine_in_coarse  !< Number of fine grid cells in coarse grid (one direction)
+   INTEGER(iwp) ::  particle_win_child !< 
+
+   INTEGER(iwp),ALLOCATABLE,DIMENSION(:) ::  particle_win_parent !<
+   
+   TYPE(C_PTR), ALLOCATABLE,DIMENSION(:) ::  buf_ptr !<
+   
+   TYPE(particle_type), DIMENSION(:),POINTER ::  particle_in_win !<
+
+   TYPE(coarse_particle_def),ALLOCATABLE,DIMENSION(:,:) ::  coarse_particles !<
+
+   
+
+   INTERFACE pmcp_g_init
+      MODULE PROCEDURE pmcp_g_init
+   END  INTERFACE pmcp_g_init
+
+   INTERFACE pmcp_g_alloc_win
+      MODULE PROCEDURE pmcp_g_alloc_win
+   END  INTERFACE pmcp_g_alloc_win
+
+   INTERFACE pmcp_c_get_particle_from_parent
+      MODULE PROCEDURE pmcp_c_get_particle_from_parent
+   END  INTERFACE pmcp_c_get_particle_from_parent
+
+   INTERFACE pmcp_c_send_particle_to_parent
+      MODULE PROCEDURE pmcp_c_send_particle_to_parent
+   END  INTERFACE pmcp_c_send_particle_to_parent
+
+   INTERFACE pmcp_p_fill_particle_win
+      MODULE PROCEDURE pmcp_p_fill_particle_win
+   END  INTERFACE pmcp_p_fill_particle_win
+
+   INTERFACE pmcp_p_empty_particle_win
+      MODULE PROCEDURE pmcp_p_empty_particle_win
+   END  INTERFACE pmcp_p_empty_particle_win
+
+   INTERFACE pmcp_g_print_number_of_particles
+      MODULE PROCEDURE pmcp_g_print_number_of_particles
+   END  INTERFACE pmcp_g_print_number_of_particles
+
+   INTERFACE pmcp_p_delete_particles_in_fine_grid_area
+      MODULE PROCEDURE pmcp_p_delete_particles_in_fine_grid_area
+   END  INTERFACE pmcp_p_delete_particles_in_fine_grid_area
+
+   PUBLIC pmcp_g_init, pmcp_g_alloc_win, pmcp_c_get_particle_from_parent
+   PUBLIC pmcp_c_send_particle_to_parent, pmcp_p_fill_particle_win, pmcp_g_print_number_of_particles
+   PUBLIC pmcp_p_empty_particle_win, pmcp_p_delete_particles_in_fine_grid_area
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> general routine:
+!> Initializing actions of the particle interface
+!> check particle boundary conditions for the child models
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_g_init
+ 
+    IMPLICIT NONE
+ 
+    INTEGER(iwp) ::  nr_childs !< Number of child models of the current model
+
+#if defined( __parallel )
+
+    nr_childs = get_number_of_childs()
+!
+!-- Check if the current model has child models
+    IF ( nr_childs > 0 )   THEN
+       ALLOCATE( nr_part(nysg:nyng, nxlg:nxrg) )
+       ALLOCATE( part_adr(nysg:nyng, nxlg:nxrg) )
+       nr_part = 0
+       part_adr   = 0
+    ENDIF
+
+!
+!-- Set the boundary conditions to nested for all non root (i.e child) models
+    IF ( cpl_id > 1 )  THEN 
+    
+       IF ( ibc_par_t /= 3 )   THEN
+          ibc_par_t  = 3
+          message_string = 'In Child model:  ibc_par_t is automatically set to nested '
+          CALL message( 'pmcp_g_init ', 'PA0477', 0, 1, 0, 6, 0 )
+       ENDIF
+    
+       IF ( ibc_par_lr /= 3 )   THEN
+          ibc_par_lr = 3
+          message_string = 'In Child model:  ibc_par_lr is automatically set to nested '
+          CALL message( 'pmcp_g_init ', 'PA0478', 0, 1, 0, 6, 0 )
+       ENDIF
+        
+       IF ( ibc_par_ns /= 3 )   THEN
+          ibc_par_ns = 3
+          message_string = 'In Child model:  ibc_par_ns is automatically set to nested '
+          CALL message( 'pmcp_g_init ', 'PA0479', 0, 1, 0, 6, 0 )
+       ENDIF
+       
+    ENDIF
+
+#endif
+ END SUBROUTINE pmcp_g_init
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> general routine:
+!> allocate the MPI windows
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_g_alloc_win
+ 
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  m         !< loop index
+    INTEGER(iwp) ::  ierr      !< error code 
+    INTEGER(iwp) ::  icl       !< left boundary in coarse(parent) index space
+    INTEGER(iwp) ::  icr       !< right boundary in coarse(parent) index space
+    INTEGER(iwp) ::  jcs       !< south boundary in coarse(parent) index space
+    INTEGER(iwp) ::  jcn       !< north boundary in coarse(parent) index space
+    INTEGER(iwp) ::  child_id  !< Id of a child model
+    INTEGER(iwp) ::  nr_childs !< Number of child models of the current model
+    
+    INTEGER ::  parsize !<
+    TYPE(C_PTR), SAVE ::  ptr !<
+    
+    TYPE(particle_type),DIMENSION(:),POINTER ::  win_buffer !<
+    
+    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
+
+#if defined( __parallel )
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  winsize !<
+
+!
+!-- If the model has a parent model prepare the structures for transfer
+    IF ( cpl_id > 1 )  THEN 
+
+       parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8
+
+       CALL MPI_ALLOC_MEM( parsize_mpi_address_kind , MPI_INFO_NULL, ptr, ierr )
+       parsize = parsize_mpi_address_kind
+       buf_shape(1) = 1
+       CALL C_F_POINTER( ptr, win_buffer, buf_shape )
+       CALL MPI_WIN_CREATE( win_buffer, parsize_mpi_address_kind, parsize,     &
+                            MPI_INFO_NULL, me%intra_comm, particle_win_child,  &
+                            ierr )
+
+!
+!--    Child domain boundaries in the parent index space
+       icl = coarse_bound(1)
+       icr = coarse_bound(2)
+       jcs = coarse_bound(3)
+       jcn = coarse_bound(4)
+
+       ALLOCATE( coarse_particles(jcs:jcn, icl:icr) )
+
+       coarse_particles(:,:)%nr_particle = 0
+    ENDIF
+
+!
+!-- If the model has child models prepare the structures for transfer
+    nr_childs = get_number_of_childs()
+    IF ( nr_childs > 0 )   THEN
+       ALLOCATE( particle_win_parent(nr_childs) )
+       ALLOCATE( buf_ptr(nr_childs) )
+       DO  m = 1, nr_childs
+          child_id = get_childid(m)
+          parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8
+          parsize = parsize_mpi_address_kind
+
+          winsize = max_nr_particle_in_rma_win * parsize_mpi_address_kind
+          CALL MPI_ALLOC_MEM( winsize , MPI_INFO_NULL, buf_ptr(m), ierr )
+          buf_shape(1) = max_nr_particle_in_rma_win
+          CALL C_F_POINTER( buf_ptr(m), win_buffer, buf_shape )
+          CALL MPI_WIN_CREATE( win_buffer, winsize, parsize, MPI_INFO_NULL,    &
+                               children(child_id)%intra_comm,                  &
+                               particle_win_parent(m), ierr )
+          ENDDO
+    ENDIF
+
+#endif
+ END SUBROUTINE pmcp_g_alloc_win
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> child routine:
+!> Read/get particles out of the parent MPI window 
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_c_get_particle_from_parent
+ 
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i    !< x grid index
+    INTEGER(iwp) ::  icl  !< left boundary in coarse(parent) index space
+    INTEGER(iwp) ::  ierr !< error code
+    INTEGER(iwp) ::  ij   !< combined xy index for the buffer array
+    INTEGER(iwp) ::  ip   !< loop index (child PEs)
+    INTEGER(iwp) ::  j    !< y grid index
+    INTEGER(iwp) ::  jcs  !< south boundary in coarse(parent) index space
+    INTEGER(iwp) ::  nr   !< number of particles to receive from a parent box 
+    
+    INTEGER ::  parsize !<
+
+#if defined( __parallel )
+    TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
+
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp !<
+
+    IF ( cpl_id > 1 )  THEN
+    
+       CALL pmc_c_getbuffer( particle_transfer = .TRUE. ) !Get number of particle/column and offset in RMA window xx
+
+!
+!--    Wait for buffer to fill.
+!
+!--    The parent side (in pmc_s_fillbuffer) is filling the buffer in the MPI RMA window
+!--    When the filling is complete, a MPI_BARRIER is called.
+!--    The child is not allowd to access the parent-buffer before it is completely filled
+!--    Synchronization is done implicitely in pmc_c_getbuffer and pmc_s_fillbuffer on the parent side
+
+       icl = coarse_bound(1)
+       jcs = coarse_bound(3)
+
+       DO  ip = 1, me%inter_npes
+
+          ape => me%pes(ip)
+
+          DO  ij = 1, ape%nrele
+              j = ape%locind(ij)%j + jcs - 1
+              i = ape%locind(ij)%i + icl - 1
+              nr = nr_partc(j,i)
+              IF ( nr > 0 )  THEN
+
+                 CALL check_and_alloc_coarse_particle (i, j, nr)
+                 parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8
+                 parsize = parsize_mpi_address_kind
+                 target_disp = part_adrc(j,i) - 1
+                 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0,               &
+                                    particle_win_child, ierr )
+                 CALL MPI_GET( coarse_particles(j,i)%parent_particles,         &
+                               nr * parsize, MPI_BYTE, ip - 1, target_disp,    &
+                               nr * parsize, MPI_BYTE, particle_win_child, ierr )
+                 CALL MPI_WIN_UNLOCK( ip - 1, particle_win_child, ierr )
+             ENDIF
+             coarse_particles(j,i)%nr_particle = nr
+          ENDDO
+       ENDDO
+
+       CALL c_copy_particle_to_child_grid
+    ENDIF
+
+#endif
+ END SUBROUTINE pmcp_c_get_particle_from_parent
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> child routine:
+!> Write/put particles into the parent MPI window
+!------------------------------------------------------------------------------!
+  SUBROUTINE pmcp_c_send_particle_to_parent
+  
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  disp_offset            !<
+    INTEGER(iwp) ::  i                      !< x loop index
+    INTEGER(iwp) ::  icl                    !< left boundary in coarse(parent) index space
+    INTEGER(iwp) ::  icr                    !< right boundary in coarse(parent) index space
+    INTEGER(iwp) ::  ierr                   !< error code
+    INTEGER(iwp) ::  ij                     !< combined xy index for the buffer array
+    INTEGER(iwp) ::  ip                     !< loop index (child PEs)
+    INTEGER(iwp) ::  j                      !< y loop index
+    INTEGER(iwp) ::  jcs                    !< south boundary in coarse(parent) index space
+    INTEGER(iwp) ::  jcn                    !< north boundary in coarse(parent) index space
+    INTEGER(iwp) ::  max_nr_particle_per_pe !< maximum number of particles per PE (depending on grid apect ratio)
+    INTEGER(iwp) ::  n                      !< shorter variable name for nr_fine_in_coarse
+    INTEGER(iwp) ::  nr                     !< shorter variabel name for nr_partc
+    INTEGER(iwp) ::  pe_offset              !< offset index of the current PE
+    
+    INTEGER ::  parsize !<
+    
+    REAL(wp) ::  eps=0.00001 !< used in calculations to avoid rounding errors
+    REAL(wp) ::  xx          !< number of fine grid cells inside a coarse grid cell in x-direction
+    REAL(wp) ::  yy          !< number of fine grid cells inside a coarse grid cell in y-direction
+
+ !   TYPE(particle_type) ::  dummy_part !< dummy particle (needed for size calculations)
+
+#if defined( __parallel )
+    TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
+
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  parsize_mpi_address_kind !<
+    INTEGER(KIND=MPI_ADDRESS_KIND) ::  target_disp !<
+    
+    
+    IF ( cpl_id > 1 )  THEN
+       CALL c_copy_particle_to_coarse_grid
+
+!
+!--    Child domain boundaries in the parent index space
+
+       icl = coarse_bound(1)
+       icr = coarse_bound(2)
+       jcs = coarse_bound(3)
+       jcn = coarse_bound(4)
+
+       nr_partc = 0
+       
+       DO i = icl, icr
+          DO j = jcs, jcn
+             nr_partc(j,i) = coarse_particles(j,i)%nr_particle
+          ENDDO
+       ENDDO
+       part_adrc = 0
+
+!
+!--    compute number of fine grid cells in coarse grid (one direction)
+       xx = (cg%dx + eps) / dx ! +eps to avoid rounding error
+       yy = (cg%dy + eps) / dy
+       nr_fine_in_coarse = MAX( INT(xx), INT(yy) )
+
+       IF ( MOD( coord_x(0), cg%dx ) /= 0.0 .OR. MOD( coord_y(0), cg%dy ) /= 0.0 ) THEN
+          nr_fine_in_coarse = nr_fine_in_coarse + 1
+       ENDIF
+
+!
+!--    Assign a number to my child PE to select different areas in the RMA window on server side
+!--    With this number a square of child PEs is defined which share the same coarse grid cells
+
+       n           = nr_fine_in_coarse ! local variable n to make folloing statements shorter
+       pe_offset   = MOD( myidx, n ) * n + MOD( myidy, n)
+       max_nr_particle_per_pe = max_nr_particle_in_rma_win / ( n * n )
+       disp_offset            = pe_offset * max_nr_particle_per_pe
+       parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8
+       parsize = parsize_mpi_address_kind
+       DO  ip = 1, me%inter_npes
+
+          ape => me%pes(ip)
+
+          target_disp = disp_offset
+          DO ij = 1, ape%nrele
+             j  = ape%locind(ij)%j + jcs - 1
+             i  = ape%locind(ij)%i + icl - 1
+             nr = nr_partc(j,i)
+             IF( nr > 0 ) THEN
+                IF ( target_disp + nr - disp_offset >= max_nr_particle_per_pe ) THEN
+                   WRITE(9,*) 'RMA window too small on child ',                &
+                              target_disp + nr - disp_offset,                  &
+                              max_nr_particle_per_pe, max_nr_particle_in_rma_win
+                   message_string = 'RMA window too small on child'
+                   CALL message( 'pmci_create_child_arrays', 'PA0480', 3, 2, 0, 6, 0 )
+                ENDIF
+                CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0,                &
+                                   particle_win_child, ierr )
+                CALL MPI_PUT( coarse_particles(j,i)%parent_particles,          &
+                              nr * parsize, MPI_BYTE, ip - 1, target_disp,     &
+                              nr * parsize, MPI_BYTE,  particle_win_child, ierr )
+                CALL MPI_WIN_UNLOCK( ip - 1, particle_win_child, ierr )
+                part_adrc(j,i) = target_disp + 1
+                target_disp    = target_disp + nr
+             ENDIF
+          ENDDO
+       ENDDO
+
+       CALL pmc_c_putbuffer ( particle_transfer = .TRUE. )   !Send new number of particle/column and offset to parent
+
+    ENDIF
+
+#endif
+ END SUBROUTINE pmcp_c_send_particle_to_parent
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> parent routine:
+!> write particles into the MPI window
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_p_fill_particle_win
+ 
+    IMPLICIT NONE
+
+    LOGICAL      ::  active_particle !< Particles located in the fine/child grid area are marked as active (to be transferred)
+    LOGICAL,SAVE ::  lfirst = .TRUE. !< 
+    
+    INTEGER(iwp) ::  child_id            !< id of the child model
+    INTEGER(iwp) ::  i                   !< x grid box index
+    INTEGER(iwp) ::  ij                  !< combined xy index for the buffer array
+    INTEGER(iwp) ::  ip                  !< loop index (child PEs)
+    INTEGER(iwp) ::  j                   !< y grid box index
+    INTEGER(iwp) ::  k                   !< z grid box index
+    INTEGER(iwp) ::  m                   !< loop index (number of childs)
+    INTEGER(iwp) ::  n                   !< loop index (number of particles)
+    INTEGER(iwp) ::  nr_part_col         !< Number of particles to transfer per column
+    INTEGER(iwp) ::  number_of_particles !<
+    INTEGER(iwp) ::  pindex              !<
+    INTEGER(iwp) ::  tot_particle_count  !< Total number of particles per child
+    
+    REAL(wp) ::  dx_child   !< child grid spacing
+    REAL(wp) ::  dy_child   !< child grid spacing
+    REAL(wp) ::  dz_child   !< child grid spacing
+    REAL(wp) ::  ny_coord   !< north coordinate of child grid
+    REAL(wp) ::  ny_coord_b !< north coordinate of child grid boundary
+    REAL(wp) ::  lx_coord   !< left coordinate of child grid
+    REAL(wp) ::  lx_coord_b !< left coordinate of child grid boundary
+    REAL(wp) ::  rx_coord   !< right coordinate of child grid
+    REAL(wp) ::  rx_coord_b !< right coordinate of child grid boundary
+    REAL(wp) ::  sy_coord   !< south coordinate of child grid
+    REAL(wp) ::  sy_coord_b !< south coordinate of child grid boundary
+    REAL(wp) ::  uz_coord   !< upper coordinate of child grid
+    REAL(wp) ::  uz_coord_b !< upper coordinate of child grid boundary
+    REAL(wp) ::  x          !< particle position
+    REAL(wp) ::  y          !< particle position
+    REAL(wp) ::  z          !< particle position
+   
+    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
+    
+#if defined( __parallel )
+    TYPE(pedef), POINTER ::  ape !< TO_DO Klaus: give a description and better name of the variable
+
+    DO  m = 1, get_number_of_childs()
+
+       child_id = get_childid(m)
+
+       CALL get_child_edges( m, lx_coord, lx_coord_b, rx_coord, rx_coord_b,    &
+                                sy_coord, sy_coord_b, ny_coord, ny_coord_b,    &
+                                uz_coord, uz_coord_b) 
+
+       CALL get_child_gridspacing( m, dx_child, dy_child, dz_child )
+
+       IF ( lfirst )   THEN
+          WRITE(9,'(a,5f10.2)') 'edges          ',lx_coord,rx_coord,sy_coord,ny_coord,uz_coord
+          WRITE(9,'(a,5f10.2)') 'edges boundary ',lx_coord_b,rx_coord_b,sy_coord_b,ny_coord_b,uz_coord_b
+          WRITE(9,'(a,5f10.2)') 'child spacing  ',dx_child, dy_child, dz_child,lower_left_coord_x,lower_left_coord_y
+       ENDIF
+!
+!--    reset values for every child
+       tot_particle_count = 0 
+       nr_part  = 0           
+       part_adr = 0
+       pindex   = 1
+
+       buf_shape(1) = max_nr_particle_in_rma_win
+       CALL C_F_POINTER( buf_ptr(m), particle_in_win , buf_shape )
+
+       DO  ip = 1, children(child_id)%inter_npes
+
+          ape => children(child_id)%pes(ip)
+
+          nr_part_col   = 0 
+	  
+          DO  ij = 1, ape%nrele
+             
+!
+!--          Inside the PMC adressing of 3d arrays starts with 1
+             i = ape%locind(ij)%i + nxl - nbgp - 1
+             j = ape%locind(ij)%j + nys - nbgp - 1
+             nr_part_col = 0   ! Number of particles to transfer per column
+             part_adr(j,i) = pindex
+             
+             DO  k = nzb + 1, nzt
+                number_of_particles = prt_count(k,j,i)
+                
+                IF ( number_of_particles <= 0 )  CYCLE
+                
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                ! Select particles within boundary area
+
+                DO n = 1, number_of_particles
+                   x = particles(n)%x
+                   y = particles(n)%y
+                   z = particles(n)%z
+!
+!--                check if the particle is located in the fine grid area
+                   active_particle = ((x > lx_coord .AND. x < rx_coord) .AND.  &  
+                                      (y > sy_coord .AND. y < ny_coord) .AND.  &
+                                      (z > 0.000000001 .AND. z < uz_coord))
+                   IF ( active_particle .AND. particles(n)%particle_mask )  THEN
+                      
+                      particle_in_win(pindex) = particles(n)
+!
+!--                   Change particle positions and origin relative to global origin
+                      particle_in_win(pindex)%x = particle_in_win(pindex)%x + lower_left_coord_x
+                      particle_in_win(pindex)%y = particle_in_win(pindex)%y + lower_left_coord_y
+                      particle_in_win(pindex)%origin_x = particle_in_win(pindex)%origin_x + lower_left_coord_x
+                      particle_in_win(pindex)%origin_y = particle_in_win(pindex)%origin_y + lower_left_coord_y
+
+                      tot_particle_count = tot_particle_count + 1
+                      nr_part_col        = nr_part_col + 1
+                      pindex             = pindex + 1
+                      IF ( pindex > max_nr_particle_in_rma_win ) THEN
+                         WRITE(9,*) 'RMA window too small on parent ',pindex, max_nr_particle_in_rma_win
+                         message_string = 'RMA window too small on parent'
+                         CALL message( 'pmci_create_child_arrays', 'PA0481', 3, 2, 0, 6, 0 )   ! PA number has to be adjusted
+                     ENDIF
+                   END IF
+                ENDDO
+             ENDDO
+             nr_part(j,i) = nr_part_col
+          ENDDO
+       ENDDO
+
+       CALL pmc_s_fillbuffer( child_id, particle_transfer = .TRUE. )
+    ENDDO
+
+    lfirst = .FALSE.
+
+#endif
+ END SUBROUTINE pmcp_p_fill_particle_win
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> parent routine:
+!> delete particles from the MPI window
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_p_empty_particle_win
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  child_id           !< model id of the child
+    INTEGER(iwp) ::  ip                 !< loop index (child PEs)
+    INTEGER(iwp) ::  m                  !< loop index (number of childs)
+
+    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
+
+#if defined( __parallel )
+    DO  m = 1, get_number_of_childs()
+
+       child_id = get_childid(m)
+
+       buf_shape(1) = max_nr_particle_in_rma_win
+       CALL C_F_POINTER( buf_ptr(m), particle_in_win , buf_shape )
+
+!
+!--    In some cells of the coarse grid, there are contributions from more than
+!--    one child process. Therefore p_copy_particle_to_org_grid is done for one
+!--    child process per call
+       DO ip = 1, pmc_s_get_child_npes( child_id )
+
+          nr_part  = 0
+          part_adr = 0
+
+          CALL pmc_s_getdata_from_buffer( child_id, particle_transfer = .TRUE.,&
+                                          child_process_nr = ip )
+          CALL p_copy_particle_to_org_grid( m )
+       ENDDO
+
+    ENDDO
+
+#endif
+ END SUBROUTINE pmcp_p_empty_particle_win
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> parent routine:
+!> After the transfer mark all parent particles that are still inside on of the 
+!> child areas for deletion. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_p_delete_particles_in_fine_grid_area
+
+    IMPLICIT NONE
+
+    LOGICAL ::  to_delete !< particles outside of model domain are marked as to_delete
+    
+    INTEGER(iwp) ::  i !< loop index (x grid)
+    INTEGER(iwp) ::  j !< loop index (y grid)
+    INTEGER(iwp) ::  k !< loop index (z grid)
+    INTEGER(iwp) ::  m !< loop index (number of particles)
+    INTEGER(iwp) ::  n !< loop index (number of childs)
+    
+    REAL(wp) ::  dx_child   !< child grid spacing
+    REAL(wp) ::  dy_child   !< child grid spacing
+    REAL(wp) ::  dz_child   !< child grid spacing
+    REAL(wp) ::  ny_coord   !< north coordinate of child grid
+    REAL(wp) ::  ny_coord_b !< north coordinate of child grid boundary
+    REAL(wp) ::  lx_coord   !< left coordinate of child grid
+    REAL(wp) ::  lx_coord_b !< left coordinate of child grid boundary
+    REAL(wp) ::  rx_coord   !< right coordinate of child grid
+    REAL(wp) ::  rx_coord_b !< right coordinate of child grid boundary
+    REAL(wp) ::  sy_coord   !< south coordinate of child grid
+    REAL(wp) ::  sy_coord_b !< south coordinate of child grid boundary
+    REAL(wp) ::  uz_coord   !< upper coordinate of child grid
+    REAL(wp) ::  uz_coord_b !< upper coordinate of child grid boundary
+    REAL(wp) ::  x          !< particle position
+    REAL(wp) ::  y          !< particle position
+    REAL(wp) ::  z          !< particle position
+    
+#if defined( __parallel )
+    DO  m = 1, get_number_of_childs()
+       CALL get_child_edges( m, lx_coord, lx_coord_b, rx_coord, rx_coord_b,    &
+                                sy_coord, sy_coord_b, ny_coord, ny_coord_b,    &
+                                uz_coord, uz_coord_b )
+
+
+       CALL get_child_gridspacing( m, dx_child, dy_child, dz_child ) 
+
+       DO i = nxl, nxr
+          DO j = nys, nyn
+             DO k = nzb, nzt
+                number_of_particles = prt_count(k,j,i)
+
+                IF ( number_of_particles == 0 ) CYCLE
+
+                particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+
+                DO n = 1, number_of_particles
+                   x = particles(n)%x
+                   y = particles(n)%y
+                   z = particles(n)%z
+
+                   to_delete = ((x > lx_coord .AND. x < rx_coord) .AND.        &
+                                (y > sy_coord .AND. y < ny_coord) .AND.        &
+                                (z > 0.000000001 .AND. z < uz_coord))
+
+                   IF ( to_delete ) THEN
+                      particles(n)%particle_mask = .FALSE.
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ENDDO
+
+#endif
+ END SUBROUTINE pmcp_p_delete_particles_in_fine_grid_area
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> general routine:
+!> print the total number of of the current model and its child models into a file 
+!------------------------------------------------------------------------------!
+ SUBROUTINE pmcp_g_print_number_of_particles (my_time,local_nr_particles)
+ 
+    USE pegrid,                                                                &
+        ONLY: myid
+ 
+    IMPLICIT NONE
+
+    INTEGER(iwp),INTENT(IN) ::  local_nr_particles !<
+    
+    REAL(wp),INTENT(IN) ::  my_time !<
+     
+    LOGICAL, SAVE ::  is_file_open=.FALSE. !< 
+    
+    INTEGER(iwp) ::  child_id           !<
+    INTEGER(iwp) ::  child_nr_particles !< total number of particles in all child models 
+    INTEGER(iwp) ::  ierr               !< error code 
+    INTEGER(iwp) ::  m                  !< loop index (number of childs)
+    
+    CHARACTER(LEN=16) ::  fname !< filename 
+    
+    INTEGER(iwp),DIMENSION(2) ::  ivalr !< integer value to be received
+    INTEGER(iwp),DIMENSION(2) ::  ivals !< integer value to be send
+    
+#if defined( __parallel )
+    child_nr_particles = 0
+    IF ( myid == 0 )  THEN
+       IF ( cpl_id > 1 )  THEN 
+          ivals(1) = local_nr_particles
+          CALL pmc_send_to_parent( ivals, 1, 0, 400, ierr )
+       ENDIF
+       DO  m = 1, SIZE( pmc_parent_for_child ) - 1
+
+          child_id = pmc_parent_for_child(m)
+          CALL pmc_recv_from_child( child_id, ivalr, 1, 0, 400, ierr )
+          child_nr_particles = child_nr_particles + ivalr(1)
+       ENDDO
+
+       IF ( SIZE( pmc_parent_for_child ) > 1 ) THEN
+          IF ( .NOT. is_file_open )  THEN !kk muss noch auf file_open umgestellt werden
+             WRITE(fname,'(a,i2.2)') 'nr_particles_',cpl_id
+             OPEN (333,file = fname)
+             is_file_open = .true.
+          ENDIF
+          WRITE(333,'(f12.2,3i10)') my_time,local_nr_particles + child_nr_particles,local_nr_particles,child_nr_particles
+       ENDIF
+    ENDIF
+
+#endif
+ END SUBROUTINE pmcp_g_print_number_of_particles
+
+
+!------------------------------------------------------------------------------!
+!------------------------------------------------------------------------------!
+! Private subroutines
+!------------------------------------------------------------------------------!
+!------------------------------------------------------------------------------!
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> child routine
+!> update the size of the local buffer (coarse_particles)
+!------------------------------------------------------------------------------!
+ SUBROUTINE check_and_alloc_coarse_particle (ic,jc,nr,with_copy)
+    
+    IMPLICIT NONE
+    
+    INTEGER(iwp),INTENT(IN) ::  ic !< coarse x grid index
+    INTEGER(iwp),INTENT(IN) ::  jc !< coarse y grid index
+    INTEGER(iwp),INTENT(IN) ::  nr !< number of particles to be transferred/stored in local buffer
+    
+    LOGICAL,INTENT(IN),OPTIONAL ::  with_copy !< copy particles in buffer? or reallocate empty buffer
+
+    LOGICAL :: with_copy_lo !< local variable of with copy
+    
+    INTEGER(iwp) ::  new_size !< new size of the local buffer
+    INTEGER(iwp) ::  old_size !< old size of the local buffer
+    
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  tmp_particles_d !<
+
+#if defined( __parallel )
+    with_copy_lo = .FALSE.
+    IF ( PRESENT( with_copy ) ) with_copy_lo = with_copy
+
+    IF ( .NOT. ALLOCATED( coarse_particles(jc,ic)%parent_particles ) ) THEN
+       new_size = MAX( nr, Min_particles_per_column )
+       ALLOCATE( coarse_particles(jc,ic)%parent_particles(new_size) )
+    ELSEIF ( nr > SIZE( coarse_particles(jc,ic)%parent_particles ) ) THEN
+
+       old_size = SIZE( coarse_particles(jc,ic)%parent_particles )
+       new_size = old_size * ( 1.0_wp + alloc_factor / 100.0_wp )
+       new_size = MAX( nr, new_size, old_size + Min_particles_per_column )
+
+!
+!--    Copy existing particles to new particle buffer
+       IF ( with_copy_lo ) THEN 
+          ALLOCATE( tmp_particles_d(old_size) )
+          tmp_particles_d(1:old_size) = coarse_particles(jc,ic)%parent_particles
+
+          DEALLOCATE( coarse_particles(jc,ic)%parent_particles )
+          ALLOCATE( coarse_particles(jc,ic)%parent_particles(new_size) )
+
+          coarse_particles(jc,ic)%parent_particles(1:old_size)          = tmp_particles_d(1:old_size)
+          coarse_particles(jc,ic)%parent_particles(old_size+1:new_size) = zero_particle
+
+          DEALLOCATE( tmp_particles_d )
+!
+!--    allocate or reallocate an empty buffer
+       ELSE 
+          DEALLOCATE( coarse_particles(jc,ic)%parent_particles )
+          ALLOCATE( coarse_particles(jc,ic)%parent_particles(new_size) )
+       ENDIF
+    ENDIF
+
+#endif
+ END SUBROUTINE check_and_alloc_coarse_particle
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> child routine: 
+!> copy/sort particles out of the local buffer into the respective grid boxes
+!------------------------------------------------------------------------------!
+ SUBROUTINE c_copy_particle_to_child_grid
+ 
+    IMPLICIT NONE
+ 
+    INTEGER(iwp) ::  ic  !< coarse x grid index 
+    INTEGER(iwp) ::  icl !< left boundary in coarse(parent) index space
+    INTEGER(iwp) ::  icr !< right boundary in coarse(parent) index space
+    INTEGER(iwp) ::  ip  !< x grid index
+    INTEGER(iwp) ::  jc  !< coarse y grid index
+    INTEGER(iwp) ::  jcn !< north boundary in coarse(parent) index space
+    INTEGER(iwp) ::  jcs !< south boundary in coarse(parent) index space
+    INTEGER(iwp) ::  jp  !< y grid index
+    INTEGER(iwp) ::  kp  !< z grid index
+    INTEGER(iwp) ::  n   !< loop index (number of particles)
+    INTEGER(iwp) ::  nr  !< short variable for name number or particles
+    
+    REAL(wp) ::  xc  !< child x coordinate
+    REAL(wp) ::  xoc !< child x origin
+    REAL(wp) ::  yc  !< child y coordinate
+    REAL(wp) ::  yoc !< child y origin
+    REAL(wp) ::  zc  !< child z coordinate
+
+#if defined( __parallel )
+!
+!-- Child domain boundaries in the parent index space
+    icl = coarse_bound(1)
+    icr = coarse_bound(2)
+    jcs = coarse_bound(3)
+    jcn = coarse_bound(4)
+
+    DO ic = icl, icr
+       DO jc = jcs, jcn
+          nr = coarse_particles(jc,ic)%nr_particle
+
+          IF ( nr > 0 ) THEN
+             DO n = 1, nr
+                xc =  coarse_particles(jc,ic)%parent_particles(n)%x-lower_left_coord_x
+                yc =  coarse_particles(jc,ic)%parent_particles(n)%y-lower_left_coord_y
+                zc =  coarse_particles(jc,ic)%parent_particles(n)%z
+                xoc = coarse_particles(jc,ic)%parent_particles(n)%origin_x-lower_left_coord_x
+                yoc = coarse_particles(jc,ic)%parent_particles(n)%origin_y-lower_left_coord_y
+                ip = xc / dx
+                jp = yc / dy
+                kp = nzt
+                DO WHILE ( zw(kp-1) > zc .AND. kp > nzb + 1 )         ! kk search loop has to be optimzed !!!
+                   kp = kp - 1
+                ENDDO 
+
+                IF ( ip >= nxl .AND. ip <= nxr .AND. jp >= nys .AND. jp <= nyn ) THEN
+                   prt_count(kp,jp,ip) = prt_count(kp,jp,ip) + 1
+                   IF ( prt_count(kp,jp,ip) > SIZE( grid_particles(kp,jp,ip)%particles ) ) THEN
+                      CALL realloc_particles_array( ip, jp, kp )
+                   ENDIF
+                   coarse_particles(jc,ic)%parent_particles(n)%x = xc                   ! Adjust coordinates to child grid
+                   coarse_particles(jc,ic)%parent_particles(n)%y = yc
+                   coarse_particles(jc,ic)%parent_particles(n)%origin_x = xoc           ! Adjust origins to child grid
+                   coarse_particles(jc,ic)%parent_particles(n)%origin_y = yoc
+                   grid_particles(kp,jp,ip)%particles(prt_count(kp,jp,ip)) = coarse_particles(jc,ic)%parent_particles(n)
+                ENDIF
+             ENDDO
+          ENDIF
+       ENDDO
+    ENDDO
+
+#endif
+ END SUBROUTINE c_copy_particle_to_child_grid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> child routine:
+!> copy particles which left the model area into the local buffer
+!------------------------------------------------------------------------------!
+ SUBROUTINE c_copy_particle_to_coarse_grid
+ 
+    IMPLICIT NONE
+    
+    LOGICAL ::  boundary_particle !<
+    
+    INTEGER(iwp) ::  i    !< loop index (x grid)
+    INTEGER(iwp) ::  ic   !< loop index (coarse x grid)
+    INTEGER(iwp) ::  icl  !< left boundary in coarse(parent) index space
+    INTEGER(iwp) ::  icr  !< left boundary in coarse(parent) index space
+    INTEGER(iwp) ::  ierr !< error code
+    INTEGER(iwp) ::  j    !< loop index (y grid)
+    INTEGER(iwp) ::  jc   !< loop index (coarse y grid)
+    INTEGER(iwp) ::  jcs  !< south boundary in coarse(parent) index space
+    INTEGER(iwp) ::  jcn  !< north boundary in coarse(parent) index space
+    INTEGER(iwp) ::  k    !< loop index (z grid)
+    INTEGER(iwp) ::  n    !< loop index (number of particles)
+    
+    REAL(wp) ::  x       !< x coordinate
+    REAL(wp) ::  xo      !< x origin
+    REAL(wp) ::  x_left  !< absolute left boundary
+    REAL(wp) ::  x_right !< absolute right boundary
+    REAL(wp) ::  y       !< left boundary in coarse(parent) index space
+    REAL(wp) ::  yo      !< y origin
+    REAL(wp) ::  y_north !< absolute north boundary
+    REAL(wp) ::  y_south !< absoulte south boundary
+    REAL(wp) ::  z       !< z coordinate
+
+#if defined( __parallel )
+!
+!-- Child domain boundaries in the parent index space
+
+    icl = coarse_bound(1)
+    icr = coarse_bound(2)
+    jcs = coarse_bound(3)
+    jcn = coarse_bound(4)
+
+!
+!-- absolute coordinates
+    x_left  = coord_x(0)
+    x_right = coord_x(nx) + dx
+    y_south = coord_y(0)
+    y_north = coord_y(ny) + dy
+
+!   Clear Particle Buffer
+
+    DO ic = icl, icr
+       DO jc = jcs, jcn
+          coarse_particles(jc,ic)%nr_particle = 0
+       ENDDO
+    ENDDO
+
+!
+!-- Determine particles which leave the inner area in east or west dirextion
+!-- Compute only first (nxl) and last (nxr) loop iterration.
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb + 1, nzt
+             number_of_particles = prt_count(k,j,i)
+             IF ( number_of_particles <= 0 )  CYCLE
+             particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+             DO  n = 1, number_of_particles
+                IF ( particles(n)%particle_mask )  THEN
+                   x =  particles(n)%x+ lower_left_coord_x  
+                   y =  particles(n)%y+ lower_left_coord_y 
+                   xo = particles(n)%origin_x + lower_left_coord_x
+                   yo = particles(n)%origin_y + lower_left_coord_y
+                   z =  particles(n)%z
+                   
+                   boundary_particle = .FALSE.
+                   boundary_particle = boundary_particle .OR. (x < x_left  .OR. x > x_right)
+                   boundary_particle = boundary_particle .OR. (y < y_south .OR. y > y_north)
+                   boundary_particle = boundary_particle .OR. (z > zw(nzt))
+
+                   IF ( boundary_particle ) THEN                     
+                      ic = x / cg%dx                     !TODO anpassen auf Mehrfachnesting
+                      jc = y / cg%dy
+
+                      IF ( ic >= icl .AND. ic <= icr .AND. jc >= jcs .AND. jc <= jcn ) THEN
+                         coarse_particles(jc,ic)%nr_particle = coarse_particles(jc,ic)%nr_particle + 1
+                         CALL check_and_alloc_coarse_particle( ic, jc, coarse_particles(jc,ic)%nr_particle, with_copy=.TRUE. )
+
+                         coarse_particles(jc,ic)%parent_particles(coarse_particles(jc,ic)%nr_particle)   = particles(n)
+                         coarse_particles(jc,ic)%parent_particles(coarse_particles(jc,ic)%nr_particle)%x = x   !adapt to global coordinates
+                         coarse_particles(jc,ic)%parent_particles(coarse_particles(jc,ic)%nr_particle)%y = y
+                         coarse_particles(jc,ic)%parent_particles(coarse_particles(jc,ic)%nr_particle)%origin_x = xo
+                         coarse_particles(jc,ic)%parent_particles(coarse_particles(jc,ic)%nr_particle)%origin_y = yo
+!--                      Mark particle as deleted after copying it to the transfer buffer
+                         grid_particles(k,j,i)%particles(n)%particle_mask = .FALSE.
+                      ELSE
+                         WRITE(9,'(a,10i6)') 'This should not happen ',i,j,k,ic,jc,icl,icr,jcs,jcn
+                         CALL MPI_Abort( MPI_COMM_WORLD, 9999, ierr )
+                      ENDIF
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!- Pack particles (eliminate those marked for deletion),
+!- determine new number of particles
+   CALL lpm_sort_in_subboxes
+
+#endif
+ END SUBROUTINE c_copy_particle_to_coarse_grid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> parent routine:
+!> copy/sort particles from the MPI window into the respective grid boxes
+!------------------------------------------------------------------------------!
+ SUBROUTINE p_copy_particle_to_org_grid( m )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp),INTENT(IN) ::  m        !<
+
+    INTEGER(iwp) ::  i      !< loop index (x grid)
+    INTEGER(iwp) ::  j      !< loop index (y grid)
+    INTEGER(iwp) ::  k      !< loop index (z grid)
+    INTEGER(iwp) ::  n      !< loop index (nr part)
+    INTEGER(iwp) ::  nr     !< short variable name for nr_part
+    INTEGER(iwp) ::  pindex !< short variable name part_adr
+    
+    REAL(wp) ::  x  !< x coordinate
+    REAL(wp) ::  xo !< x origin
+    REAL(wp) ::  y  !< y coordinate
+    REAL(wp) ::  yo !< y origin
+    REAL(wp) ::  z  !< z coordinate
+    
+    INTEGER(iwp),DIMENSION(1) ::  buf_shape !<
+
+#if defined( __parallel )
+    buf_shape(1) = max_nr_particle_in_rma_win
+    CALL C_F_POINTER( buf_ptr(m), particle_in_win , buf_shape )
+
+    DO i = nxl, nxr
+       DO j = nys, nyn
+          nr = nr_part(j,i)
+          IF ( nr > 0 ) THEN
+             pindex = part_adr(j,i)
+             DO n = 1, nr
+                x = particle_in_win(pindex)%x-lower_left_coord_x
+                y = particle_in_win(pindex)%y-lower_left_coord_y
+                z = particle_in_win(pindex)%z
+                xo = particle_in_win(pindex)%origin_x-lower_left_coord_x
+                yo = particle_in_win(pindex)%origin_y-lower_left_coord_y
+                k = nzt + 1
+                DO WHILE ( zw(k-1) > z .AND. k > nzb + 1 )                               ! kk search loop has to be optimzed !!!
+                   k = k - 1
+                END DO
+
+                prt_count(k,j,i) = prt_count(k,j,i) + 1
+                IF ( prt_count(k,j,i) > SIZE( grid_particles(k,j,i)%particles ) ) THEN
+                   CALL realloc_particles_array( i, j, k )
+                ENDIF
+                grid_particles(k,j,i)%particles(prt_count(k,j,i)) = particle_in_win(pindex)
+                
+!
+!--             Update particle positions and origins relative to parent domain
+                grid_particles(k,j,i)%particles(prt_count(k,j,i))%x = x
+                grid_particles(k,j,i)%particles(prt_count(k,j,i))%y = y
+                grid_particles(k,j,i)%particles(prt_count(k,j,i))%origin_x = xo
+                grid_particles(k,j,i)%particles(prt_count(k,j,i))%origin_y = yo
+                pindex = pindex + 1
+             ENDDO
+          ENDIF
+       ENDDO
+    ENDDO
+
+#endif
+ END SUBROUTINE p_copy_particle_to_org_grid
+
+
+END MODULE pmc_particle_interface
Index: /palm/tags/release-6.0/SOURCE/poisfft_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/poisfft_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/poisfft_mod.f90	(revision 3477)
@@ -0,0 +1,1492 @@
+!> @file poisfft_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed,
+! declarations of omp_get_thread_num now as omp-directive
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2300 2017-06-29 13:31:14Z raasch
+! settings depending on host variable removed or replaced by loop_optimization
+! 
+! 2119 2017-01-17 16:51:50Z raasch
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related code removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1482 2014-10-18 12:34:45Z raasch
+! use 2d-decomposition, if accelerator boards are used
+!
+! 1406 2014-05-16 13:47:01Z raasch
+! bugfix for pgi 14.4: declare create moved after array declaration
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1306 2014-03-13 14:30:59Z raasch
+! openmp sections removed from the overlap branch,
+! second argument removed from parameter list
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! resorting of arrays moved to separate routines resort_for_...,
+! one argument, used as temporary work array, removed from all transpose
+! routines
+! overlapping fft / transposition implemented
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! tridia routines moved to seperate module tridia_solver
+!
+! 1208 2013-08-13 06:41:49Z raasch
+! acc-update clauses added for "ar" so that ffts other than cufft can also be
+! used (although they are not ported and will give a poor performance)
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! further openACC porting of non-parallel (MPI) branch:
+! tridiagonal routines split into extermal subroutines (instead using CONTAINS),
+! no distinction between parallel/non-parallel in poisfft and tridia any more,
+! tridia routines moved to end of file because of probable bug in PGI compiler 12.5
+! (otherwise "invalid device function" is indicated during runtime),
+! optimization of tridia routines: constant elements and coefficients of tri are
+! stored in seperate arrays ddzuw and tric, last dimension of tri reduced from 5
+! to 2,
+! poisfft_init is now called internally from poisfft, maketri is called from
+! poisfft_init,
+! ibc_p_b = 2 removed
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! routines fftx, ffty, fftxp, fftyp removed, calls replaced by fft_x, fft_y,
+! in the 1D-decomposition routines fft_x, ffty are replaced by fft_x_1d,
+! fft_y_1d
+!
+! 1103 2013-02-20 02:15:53Z raasch
+! tri, ar, and ar1 arguments in tridia-routines (2d) are removed because they
+! sometimes cause segmentation faults with intel 12.1 compiler
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 2012-09-21 07:03:55Z raasch
+! FLOAT type conversion replaced by REAL
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! indices nxa, nya, etc. replaced by nx, ny, etc.
+!
+! 940 2012-07-09 14:31:00Z raasch
+! special handling of tri-array as an argument in tridia_1dd routines switched
+! off because it caused segmentation faults with intel 12.1 compiler
+!
+! 877 2012-04-03 11:21:44Z suehring
+! Bugfix: Avoid divisions by zero in case of using a 'neumann' bc for the
+! pressure at the top of the model domain.
+!
+! 809 2012-01-30 13:32:58Z maronga
+! Bugfix: replaced .AND. and .NOT. with && and ! in the preprocessor directives
+!
+! 807 2012-01-25 11:53:51Z maronga
+! New cpp directive "__check" implemented which is used by check_namelist_files
+! (most of the code is unneeded by check_namelist_files).
+!
+! Revision 1.1  1997/07/24 11:24:14  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Solves the Poisson equation with a 2D spectral method
+!>        d^2 p / dx^2 + d^2 p / dy^2 + d^2 p / dz^2 = s
+!>
+!> Input:
+!> real    ar   contains (nnz,nny,nnx) elements of the velocity divergence,
+!>              starting from (1,nys,nxl)
+!>
+!> Output:
+!> real    ar   contains the solution for perturbation pressure p
+!------------------------------------------------------------------------------!
+ MODULE poisfft_mod
+ 
+
+    USE fft_xy,                                                                &
+        ONLY:  fft_init, fft_y, fft_y_1d, fft_y_m, fft_x, fft_x_1d, fft_x_m
+
+    USE indices,                                                               &
+        ONLY:  nnx, nny, nx, nxl, nxr, ny, nys, nyn, nz
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxl_z, nxr_y, nxr_z, nys_x, nys_z, nyn_x, nyn_z, nzb_x,  &
+               nzb_y, nzt_x, nzt_y
+
+    USE tridia_solver,                                                         &
+        ONLY:  tridia_1dd, tridia_init, tridia_substi, tridia_substi_overlap
+
+    IMPLICIT NONE
+
+    LOGICAL, SAVE ::  poisfft_initialized = .FALSE.
+
+    PRIVATE
+
+    PUBLIC  poisfft, poisfft_init
+
+    INTERFACE poisfft
+       MODULE PROCEDURE poisfft
+    END INTERFACE poisfft
+
+    INTERFACE poisfft_init
+       MODULE PROCEDURE poisfft_init
+    END INTERFACE poisfft_init
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Setup coefficients for FFT and the tridiagonal solver
+!------------------------------------------------------------------------------!
+    SUBROUTINE poisfft_init
+
+       IMPLICIT NONE
+
+
+       CALL fft_init
+
+       CALL tridia_init
+
+       poisfft_initialized = .TRUE.
+
+    END SUBROUTINE poisfft_init
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Two-dimensional Fourier Transformation in x- and y-direction.
+!------------------------------------------------------------------------------!
+    SUBROUTINE poisfft( ar )
+
+       USE control_parameters,                                                 &
+           ONLY:  transpose_compute_overlap
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  ii           !<
+       INTEGER(iwp) ::  iind         !<
+       INTEGER(iwp) ::  inew         !<
+       INTEGER(iwp) ::  jj           !<
+       INTEGER(iwp) ::  jind         !<
+       INTEGER(iwp) ::  jnew         !<
+       INTEGER(iwp) ::  ki           !<
+       INTEGER(iwp) ::  kk           !<
+       INTEGER(iwp) ::  knew         !<
+       INTEGER(iwp) ::  n            !<
+       INTEGER(iwp) ::  nblk         !<
+       INTEGER(iwp) ::  nnx_y        !<
+       INTEGER(iwp) ::  nny_z        !<
+       INTEGER(iwp) ::  nnz_x        !<
+       INTEGER(iwp) ::  nxl_y_bound  !<
+       INTEGER(iwp) ::  nxr_y_bound  !<
+
+       INTEGER(iwp), DIMENSION(4) ::  isave  !<
+
+       REAL(wp), DIMENSION(1:nz,nys:nyn,nxl:nxr) ::  ar      !<
+       REAL(wp), DIMENSION(nys:nyn,nxl:nxr,1:nz) ::  ar_inv  !<
+
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  ar1      !<
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  f_in     !<
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  f_inv    !<
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  f_out_y  !<
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  f_out_z  !<
+
+
+       CALL cpu_log( log_point_s(3), 'poisfft', 'start' )
+
+       IF ( .NOT. poisfft_initialized )  CALL poisfft_init
+
+!
+!--    Two-dimensional Fourier Transformation in x- and y-direction.
+       IF ( pdims(2) == 1  .AND.  pdims(1) > 1 )  THEN
+
+!
+!--       1d-domain-decomposition along x:
+!--       FFT along y and transposition y --> x
+          CALL ffty_tr_yx( ar, ar )
+
+!
+!--       FFT along x, solving the tridiagonal system and backward FFT
+          CALL fftx_tri_fftx( ar )
+
+!
+!--       Transposition x --> y and backward FFT along y
+          CALL tr_xy_ffty( ar, ar )
+
+       ELSEIF ( pdims(1) == 1 .AND. pdims(2) > 1 )  THEN
+
+!
+!--       1d-domain-decomposition along y:
+!--       FFT along x and transposition x --> y
+          CALL fftx_tr_xy( ar, ar )
+
+!
+!--       FFT along y, solving the tridiagonal system and backward FFT
+          CALL ffty_tri_ffty( ar )
+
+!
+!--       Transposition y --> x and backward FFT along x
+          CALL tr_yx_fftx( ar, ar )
+
+       ELSEIF ( .NOT. transpose_compute_overlap )  THEN
+
+!
+!--       2d-domain-decomposition or no decomposition (1 PE run)
+!--       Transposition z --> x
+          CALL cpu_log( log_point_s(5), 'transpo forward', 'start' )
+          CALL resort_for_zx( ar, ar_inv )
+          CALL transpose_zx( ar_inv, ar )
+          CALL cpu_log( log_point_s(5), 'transpo forward', 'pause' )
+
+          CALL cpu_log( log_point_s(4), 'fft_x', 'start' )
+          CALL fft_x( ar, 'forward' )
+          CALL cpu_log( log_point_s(4), 'fft_x', 'pause' )
+
+!
+!--       Transposition x --> y
+          CALL cpu_log( log_point_s(5), 'transpo forward', 'continue' )
+          CALL resort_for_xy( ar, ar_inv )
+          CALL transpose_xy( ar_inv, ar )
+          CALL cpu_log( log_point_s(5), 'transpo forward', 'pause' )
+
+          CALL cpu_log( log_point_s(7), 'fft_y', 'start' )
+          CALL fft_y( ar, 'forward', ar_tr = ar,                &
+                      nxl_y_bound = nxl_y, nxr_y_bound = nxr_y, &
+                      nxl_y_l = nxl_y, nxr_y_l = nxr_y )
+          CALL cpu_log( log_point_s(7), 'fft_y', 'pause' )
+
+!
+!--       Transposition y --> z
+          CALL cpu_log( log_point_s(5), 'transpo forward', 'continue' )
+          CALL resort_for_yz( ar, ar_inv )
+          CALL transpose_yz( ar_inv, ar )
+          CALL cpu_log( log_point_s(5), 'transpo forward', 'stop' )
+
+!
+!--       Solve the tridiagonal equation system along z
+          CALL cpu_log( log_point_s(6), 'tridia', 'start' )
+          CALL tridia_substi( ar )
+          CALL cpu_log( log_point_s(6), 'tridia', 'stop' )
+
+!
+!--       Inverse Fourier Transformation
+!--       Transposition z --> y
+          CALL cpu_log( log_point_s(8), 'transpo invers', 'start' )
+          CALL transpose_zy( ar, ar_inv )
+          CALL resort_for_zy( ar_inv, ar )
+          CALL cpu_log( log_point_s(8), 'transpo invers', 'pause' )
+
+          CALL cpu_log( log_point_s(7), 'fft_y', 'continue' )
+          CALL fft_y( ar, 'backward', ar_tr = ar,               &
+                      nxl_y_bound = nxl_y, nxr_y_bound = nxr_y, &
+                      nxl_y_l = nxl_y, nxr_y_l = nxr_y )
+          CALL cpu_log( log_point_s(7), 'fft_y', 'stop' )
+
+!
+!--       Transposition y --> x
+          CALL cpu_log( log_point_s(8), 'transpo invers', 'continue' )
+          CALL transpose_yx( ar, ar_inv )
+          CALL resort_for_yx( ar_inv, ar )
+          CALL cpu_log( log_point_s(8), 'transpo invers', 'pause' )
+
+          CALL cpu_log( log_point_s(4), 'fft_x', 'continue' )
+          CALL fft_x( ar, 'backward' )
+          CALL cpu_log( log_point_s(4), 'fft_x', 'stop' )
+
+!
+!--       Transposition x --> z
+          CALL cpu_log( log_point_s(8), 'transpo invers', 'continue' )
+          CALL transpose_xz( ar, ar_inv )
+          CALL resort_for_xz( ar_inv, ar )
+          CALL cpu_log( log_point_s(8), 'transpo invers', 'stop' )
+
+       ELSE
+
+!
+!--       2d-domain-decomposition or no decomposition (1 PE run) with
+!--       overlapping transposition / fft
+!--       cputime logging must not use barriers, which would prevent overlapping
+          ALLOCATE( f_out_y(0:ny,nxl_y:nxr_y,nzb_y:nzt_y), &
+                    f_out_z(0:nx,nys_x:nyn_x,nzb_x:nzt_x) )
+!
+!--       Transposition z --> x + subsequent fft along x
+          ALLOCATE( f_inv(nys:nyn,nxl:nxr,1:nz) )
+          CALL resort_for_zx( ar, f_inv )
+!
+!--       Save original indices and gridpoint counter
+          isave(1) = nz
+          isave(2) = nzb_x
+          isave(3) = nzt_x
+          isave(4) = sendrecvcount_zx
+!
+!--       Set new indices for transformation
+          nblk  = nz / pdims(1)
+          nz    = pdims(1)
+          nnz_x = 1
+          nzb_x = 1 + myidx * nnz_x
+          nzt_x = ( myidx + 1 ) * nnz_x
+          sendrecvcount_zx = nnx * nny * nnz_x
+
+          ALLOCATE( ar1(0:nx,nys_x:nyn_x,nzb_x:nzt_x) )
+          ALLOCATE( f_in(nys:nyn,nxl:nxr,1:nz) )
+
+          DO  kk = 1, nblk
+
+             IF ( kk == 1 )  THEN
+                CALL cpu_log( log_point_s(5), 'transpo forward', 'start', cpu_log_nowait )
+             ELSE
+                CALL cpu_log( log_point_s(5), 'transpo forward', 'continue', cpu_log_nowait )
+             ENDIF
+
+             DO  knew = 1, nz
+                ki = kk + nblk * ( knew - 1 )
+                f_in(:,:,knew) = f_inv(:,:,ki)
+             ENDDO
+
+             CALL transpose_zx( f_in, ar1(:,:,:))
+             CALL cpu_log( log_point_s(5), 'transpo forward', 'pause' )
+
+             IF ( kk == 1 )  THEN
+                CALL cpu_log( log_point_s(4), 'fft_x', 'start', cpu_log_nowait )
+             ELSE
+                CALL cpu_log( log_point_s(4), 'fft_x', 'continue', cpu_log_nowait )
+             ENDIF
+
+             n = isave(2) + kk - 1
+             CALL fft_x( ar1(:,:,:), 'forward',  ar_2d = f_out_z(:,:,n))
+             CALL cpu_log( log_point_s(4), 'fft_x', 'pause' )
+
+          ENDDO
+!
+!--       Restore original indices/counters
+          nz               = isave(1)
+          nzb_x            = isave(2)
+          nzt_x            = isave(3)
+          sendrecvcount_zx = isave(4)
+
+          DEALLOCATE( ar1, f_in, f_inv )
+
+!
+!--       Transposition x --> y + subsequent fft along y
+          ALLOCATE( f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx) )
+          CALL resort_for_xy( f_out_z, f_inv )
+!
+!--       Save original indices and gridpoint counter
+          isave(1) = nx
+          isave(2) = nxl_y
+          isave(3) = nxr_y
+          isave(4) = sendrecvcount_xy
+!
+!--       Set new indices for transformation
+          nblk  = ( ( nx+1 ) / pdims(2) ) - 1
+          nx    = pdims(2)
+          nnx_y = 1
+          nxl_y = myidy * nnx_y
+          nxr_y = ( myidy + 1 ) * nnx_y - 1
+          sendrecvcount_xy = nnx_y * ( nyn_x-nys_x+1 ) * ( nzt_x-nzb_x+1 )
+
+          ALLOCATE( ar1(0:ny,nxl_y:nxr_y,nzb_y:nzt_y) )
+          ALLOCATE( f_in(nys_x:nyn_x,nzb_x:nzt_x,0:nx) )
+
+          DO  ii = 0, nblk
+
+             CALL cpu_log( log_point_s(5), 'transpo forward', 'continue', cpu_log_nowait )
+
+             DO  inew = 0, nx-1
+                iind = ii + ( nblk + 1 ) * inew
+                f_in(:,:,inew) = f_inv(:,:,iind)
+             ENDDO
+
+             CALL transpose_xy( f_in, ar1(:,:,:) )
+
+             CALL cpu_log( log_point_s(5), 'transpo forward', 'pause' )
+
+             IF ( ii == 1 )  THEN
+                CALL cpu_log( log_point_s(7), 'fft_y', 'start', cpu_log_nowait )
+             ELSE
+                CALL cpu_log( log_point_s(7), 'fft_y', 'continue', cpu_log_nowait )
+             ENDIF
+
+             nxl_y_bound = isave(2)
+             nxr_y_bound = isave(3)
+             n           = isave(2) + ii
+             CALL fft_y( ar1(:,:,:), 'forward', ar_tr = f_out_y,               &
+                         nxl_y_bound = nxl_y_bound, nxr_y_bound = nxr_y_bound, &
+                         nxl_y_l = n, nxr_y_l = n )
+
+             CALL cpu_log( log_point_s(7), 'fft_y', 'pause' )
+
+          ENDDO
+!
+!--       Restore original indices/counters
+          nx               = isave(1)
+          nxl_y            = isave(2)
+          nxr_y            = isave(3)
+          sendrecvcount_xy = isave(4)
+
+          DEALLOCATE( ar1, f_in, f_inv )
+
+!
+!--       Transposition y --> z + subsequent tridia + resort for z --> y
+          ALLOCATE( f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny) )
+          CALL resort_for_yz( f_out_y, f_inv )
+!
+!--       Save original indices and gridpoint counter
+          isave(1) = ny
+          isave(2) = nys_z
+          isave(3) = nyn_z
+          isave(4) = sendrecvcount_yz
+!
+!--       Set new indices for transformation
+          nblk             = ( ( ny+1 ) / pdims(1) ) - 1
+          ny               = pdims(1)
+          nny_z            = 1
+          nys_z            = myidx * nny_z
+          nyn_z            = ( myidx + 1 ) * nny_z - 1
+          sendrecvcount_yz = ( nxr_y-nxl_y+1 ) * nny_z * ( nzt_y-nzb_y+1 )
+
+          ALLOCATE( ar1(nxl_z:nxr_z,nys_z:nyn_z,1:nz) )
+          ALLOCATE( f_in(nxl_y:nxr_y,nzb_y:nzt_y,0:ny) )
+
+          DO  jj = 0, nblk
+!
+!--          Forward Fourier Transformation
+!--          Transposition y --> z
+             CALL cpu_log( log_point_s(5), 'transpo forward', 'continue', cpu_log_nowait )
+
+             DO  jnew = 0, ny-1
+                jind = jj + ( nblk + 1 ) * jnew
+                f_in(:,:,jnew) = f_inv(:,:,jind)
+             ENDDO
+
+             CALL transpose_yz( f_in, ar1(:,:,:) )
+
+             IF ( jj == nblk )  THEN
+                CALL cpu_log( log_point_s(5), 'transpo forward', 'stop' )
+             ELSE
+                CALL cpu_log( log_point_s(5), 'transpo forward', 'pause' )
+             ENDIF
+
+!
+!--          Solve the tridiagonal equation system along z
+             CALL cpu_log( log_point_s(6), 'tridia', 'start', cpu_log_nowait )
+
+             n = isave(2) + jj
+             CALL tridia_substi_overlap( ar1(:,:,:), n )
+
+             CALL cpu_log( log_point_s(6), 'tridia', 'stop' )
+
+!
+!--          Inverse Fourier Transformation
+!--          Transposition z --> y
+!--          Only one thread should call MPI routines, therefore forward and
+!--          backward tranpose are in the same section
+             IF ( jj == 0 )  THEN
+                CALL cpu_log( log_point_s(8), 'transpo invers', 'start', cpu_log_nowait )
+             ELSE
+                CALL cpu_log( log_point_s(8), 'transpo invers', 'continue', cpu_log_nowait )
+             ENDIF
+
+             CALL transpose_zy( ar1(:,:,:), f_in )
+
+             DO  jnew = 0, ny-1
+                jind = jj + ( nblk + 1 ) * jnew
+                f_inv(:,:,jind) = f_in(:,:,jnew)
+             ENDDO
+
+             CALL cpu_log( log_point_s(8), 'transpo invers', 'pause' )
+
+          ENDDO
+!
+!--       Restore original indices/counters
+          ny               = isave(1)
+          nys_z            = isave(2)
+          nyn_z            = isave(3)
+          sendrecvcount_yz = isave(4)
+
+          CALL resort_for_zy( f_inv, f_out_y )
+
+          DEALLOCATE( ar1, f_in, f_inv )
+
+!
+!--       fft along y backward + subsequent transposition y --> x
+          ALLOCATE( f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx) )
+!
+!--       Save original indices and gridpoint counter
+          isave(1) = nx
+          isave(2) = nxl_y
+          isave(3) = nxr_y
+          isave(4) = sendrecvcount_xy
+!
+!--       Set new indices for transformation
+          nblk             = (( nx+1 ) / pdims(2) ) - 1
+          nx               = pdims(2)
+          nnx_y            = 1
+          nxl_y            = myidy * nnx_y
+          nxr_y            = ( myidy + 1 ) * nnx_y - 1
+          sendrecvcount_xy = nnx_y * ( nyn_x-nys_x+1 ) * ( nzt_x-nzb_x+1 )
+
+          ALLOCATE( ar1(0:ny,nxl_y:nxr_y,nzb_y:nzt_y) )
+          ALLOCATE( f_in(nys_x:nyn_x,nzb_x:nzt_x,0:nx) )
+
+          DO  ii = 0, nblk
+
+             CALL cpu_log( log_point_s(7), 'fft_y', 'continue', cpu_log_nowait )
+
+             n = isave(2) + ii
+             nxl_y_bound = isave(2)
+             nxr_y_bound = isave(3)
+
+             CALL fft_y( ar1(:,:,:), 'backward', ar_tr = f_out_y,              &
+                         nxl_y_bound = nxl_y_bound, nxr_y_bound = nxr_y_bound, &
+                         nxl_y_l = n, nxr_y_l = n )
+
+             IF ( ii == nblk )  THEN
+                CALL cpu_log( log_point_s(7), 'fft_y', 'stop' )
+             ELSE
+                CALL cpu_log( log_point_s(7), 'fft_y', 'pause' )
+             ENDIF
+
+             CALL cpu_log( log_point_s(8), 'transpo invers', 'continue', cpu_log_nowait )
+
+             CALL transpose_yx( ar1(:,:,:), f_in )
+
+             DO  inew = 0, nx-1
+                iind = ii + (nblk+1) * inew
+                f_inv(:,:,iind) = f_in(:,:,inew)
+             ENDDO
+
+             CALL cpu_log( log_point_s(8), 'transpo invers', 'pause' )
+
+          ENDDO
+!
+!--       Restore original indices/counters
+          nx               = isave(1)
+          nxl_y            = isave(2)
+          nxr_y            = isave(3)
+          sendrecvcount_xy = isave(4)
+
+          CALL resort_for_yx( f_inv, f_out_z )
+
+          DEALLOCATE( ar1, f_in, f_inv )
+
+!
+!--       fft along x backward + subsequent final transposition x --> z
+          ALLOCATE( f_inv(nys:nyn,nxl:nxr,1:nz) )
+!
+!--       Save original indices and gridpoint counter
+          isave(1) = nz
+          isave(2) = nzb_x
+          isave(3) = nzt_x
+          isave(4) = sendrecvcount_zx
+!
+!--       Set new indices for transformation
+          nblk             = nz / pdims(1)
+          nz               = pdims(1)
+          nnz_x            = 1
+          nzb_x            = 1 + myidx * nnz_x
+          nzt_x            = ( myidx + 1 ) * nnz_x
+          sendrecvcount_zx = nnx * nny * nnz_x
+
+          ALLOCATE( ar1(0:nx,nys_x:nyn_x,nzb_x:nzt_x) )
+          ALLOCATE( f_in(nys:nyn,nxl:nxr,1:nz) )
+
+          DO  kk = 1, nblk
+
+             CALL cpu_log( log_point_s(4), 'fft_x', 'continue', cpu_log_nowait )
+
+             n = isave(2) + kk - 1
+             CALL fft_x( ar1(:,:,:), 'backward', f_out_z(:,:,n))
+
+             IF ( kk == nblk )  THEN
+                CALL cpu_log( log_point_s(4), 'fft_x', 'stop' )
+             ELSE
+                CALL cpu_log( log_point_s(4), 'fft_x', 'pause' )
+             ENDIF
+
+             CALL cpu_log( log_point_s(8), 'transpo invers', 'continue', cpu_log_nowait )
+
+             CALL transpose_xz( ar1(:,:,:), f_in )
+
+             DO  knew = 1, nz
+                ki = kk + nblk * (knew-1)
+                f_inv(:,:,ki) = f_in(:,:,knew)
+             ENDDO
+
+             IF ( kk == nblk )  THEN
+                CALL cpu_log( log_point_s(8), 'transpo invers', 'stop' )
+             ELSE
+                CALL cpu_log( log_point_s(8), 'transpo invers', 'pause' )
+             ENDIF
+
+          ENDDO
+!
+!--       Restore original indices/counters
+          nz               = isave(1)
+          nzb_x            = isave(2)
+          nzt_x            = isave(3)
+          sendrecvcount_zx = isave(4)
+
+          CALL resort_for_xz( f_inv, ar )
+
+          DEALLOCATE( ar1, f_in, f_inv )
+
+       ENDIF
+
+       CALL cpu_log( log_point_s(3), 'poisfft', 'stop' )
+
+    END SUBROUTINE poisfft
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along y with subsequent transposition y --> x for
+!> a 1d-decomposition along x.
+!>
+!> @attention The performance of this routine is much faster on the NEC-SX6,
+!>            if the first index of work_ffty_vec is odd. Otherwise
+!>            memory bank conflicts may occur (especially if the index is a
+!>            multiple of 128). That's why work_ffty_vec is dimensioned as
+!>            0:ny+1.
+!>            Of course, this will not work if users are using an odd number
+!>            of gridpoints along y.
+!------------------------------------------------------------------------------!
+    SUBROUTINE ffty_tr_yx( f_in, f_out )
+
+       USE control_parameters,                                                 &
+           ONLY:  loop_optimization
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)            ::  i            !<
+       INTEGER(iwp)            ::  iend         !<
+       INTEGER(iwp)            ::  iouter       !<
+       INTEGER(iwp)            ::  ir           !<
+       INTEGER(iwp)            ::  j            !<
+       INTEGER(iwp)            ::  k            !<
+
+       INTEGER(iwp), PARAMETER ::  stridex = 4  !<
+
+       REAL(wp), DIMENSION(1:nz,0:ny,nxl:nxr)             ::  f_in   !<
+       REAL(wp), DIMENSION(nnx,1:nz,nys_x:nyn_x,pdims(1)) ::  f_out  !<
+       REAL(wp), DIMENSION(nxl:nxr,1:nz,0:ny)             ::  work   !<
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  work_ffty      !<
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  work_ffty_vec  !<
+
+!
+!--    Carry out the FFT along y, where all data are present due to the
+!--    1d-decomposition along x. Resort the data in a way that x becomes
+!--    the first index.
+       CALL cpu_log( log_point_s(7), 'fft_y_1d', 'start' )
+
+       IF ( loop_optimization == 'vector' )  THEN
+
+          ALLOCATE( work_ffty_vec(0:ny+1,1:nz,nxl:nxr) )
+!
+!--       Code optimized for vector processors
+          !$OMP PARALLEL PRIVATE ( i, j, k )
+          !$OMP DO
+          DO  i = nxl, nxr
+
+             DO  j = 0, ny
+                DO  k = 1, nz
+                   work_ffty_vec(j,k,i) = f_in(k,j,i)
+                ENDDO
+             ENDDO
+
+             CALL fft_y_m( work_ffty_vec(:,:,i), ny+1, 'forward' )
+
+          ENDDO
+
+          !$OMP DO
+          DO  k = 1, nz
+             DO  j = 0, ny
+                DO  i = nxl, nxr
+                   work(i,k,j) = work_ffty_vec(j,k,i)
+                ENDDO
+             ENDDO
+          ENDDO
+          !$OMP END PARALLEL
+
+          DEALLOCATE( work_ffty_vec )
+
+       ELSE
+!
+!--       Cache optimized code.
+          ALLOCATE( work_ffty(0:ny,stridex) )
+!
+!--       The i-(x-)direction is split into a strided outer loop and an inner
+!--       loop for better cache performance
+          !$OMP PARALLEL PRIVATE (i,iend,iouter,ir,j,k,work_ffty)
+          !$OMP DO
+          DO  iouter = nxl, nxr, stridex
+
+             iend = MIN( iouter+stridex-1, nxr )  ! Upper bound for inner i loop
+
+             DO  k = 1, nz
+
+                DO  i = iouter, iend
+
+                   ir = i-iouter+1  ! counter within a stride
+                   DO  j = 0, ny
+                      work_ffty(j,ir) = f_in(k,j,i)
+                   ENDDO
+!
+!--                FFT along y
+                   CALL fft_y_1d( work_ffty(:,ir), 'forward' )
+
+                ENDDO
+
+!
+!--             Resort
+                DO  j = 0, ny
+                   DO  i = iouter, iend
+                      work(i,k,j) = work_ffty(j,i-iouter+1)
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+          ENDDO
+          !$OMP END PARALLEL
+
+          DEALLOCATE( work_ffty )
+
+       ENDIF
+
+       CALL cpu_log( log_point_s(7), 'fft_y_1d', 'pause' )
+
+!
+!--    Transpose array
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start' )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( work(nxl,1,0),      sendrecvcount_xy, MPI_REAL, &
+                          f_out(1,1,nys_x,1), sendrecvcount_xy, MPI_REAL, &
+                          comm1dx, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+    END SUBROUTINE ffty_tr_yx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!>  Transposition x --> y with a subsequent backward Fourier transformation for
+!>  a 1d-decomposition along x
+!------------------------------------------------------------------------------!
+    SUBROUTINE tr_xy_ffty( f_in, f_out )
+
+       USE control_parameters,                                                 &
+           ONLY:  loop_optimization
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)            ::  i            !<
+       INTEGER(iwp)            ::  iend         !<
+       INTEGER(iwp)            ::  iouter       !<
+       INTEGER(iwp)            ::  ir           !<
+       INTEGER(iwp)            ::  j            !<
+       INTEGER(iwp)            ::  k            !<
+
+       INTEGER(iwp), PARAMETER ::  stridex = 4  !<
+
+       REAL(wp), DIMENSION(nnx,1:nz,nys_x:nyn_x,pdims(1)) ::  f_in   !<
+       REAL(wp), DIMENSION(1:nz,0:ny,nxl:nxr)             ::  f_out  !<
+       REAL(wp), DIMENSION(nxl:nxr,1:nz,0:ny)             ::  work   !<
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  work_ffty         !<
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  work_ffty_vec     !<
+
+!
+!--    Transpose array
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start' )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( f_in(1,1,nys_x,1), sendrecvcount_xy, MPI_REAL, &
+                          work(nxl,1,0),     sendrecvcount_xy, MPI_REAL, &
+                          comm1dx, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+!
+!--    Resort the data in a way that y becomes the first index and carry out the
+!--    backward fft along y.
+       CALL cpu_log( log_point_s(7), 'fft_y_1d', 'continue' )
+
+       IF ( loop_optimization == 'vector' )  THEN
+
+          ALLOCATE( work_ffty_vec(0:ny+1,1:nz,nxl:nxr) )
+!
+!--       Code optimized for vector processors
+          !$OMP PARALLEL PRIVATE ( i, j, k )
+          !$OMP DO
+          DO  k = 1, nz
+             DO  j = 0, ny
+                DO  i = nxl, nxr
+                   work_ffty_vec(j,k,i) = work(i,k,j)
+                ENDDO
+             ENDDO
+          ENDDO
+
+          !$OMP DO
+          DO  i = nxl, nxr
+
+             CALL fft_y_m( work_ffty_vec(:,:,i), ny+1, 'backward' )
+
+             DO  j = 0, ny
+                DO  k = 1, nz
+                   f_out(k,j,i) = work_ffty_vec(j,k,i)
+                ENDDO
+             ENDDO
+
+          ENDDO
+          !$OMP END PARALLEL
+
+          DEALLOCATE( work_ffty_vec )
+
+       ELSE
+!
+!--       Cache optimized code.
+          ALLOCATE( work_ffty(0:ny,stridex) )
+!
+!--       The i-(x-)direction is split into a strided outer loop and an inner
+!--       loop for better cache performance
+          !$OMP PARALLEL PRIVATE ( i, iend, iouter, ir, j, k, work_ffty )
+          !$OMP DO
+          DO  iouter = nxl, nxr, stridex
+
+             iend = MIN( iouter+stridex-1, nxr )  ! Upper bound for inner i loop
+
+             DO  k = 1, nz
+!
+!--             Resort
+                DO  j = 0, ny
+                   DO  i = iouter, iend
+                      work_ffty(j,i-iouter+1) = work(i,k,j)
+                   ENDDO
+                ENDDO
+
+                DO  i = iouter, iend
+
+!
+!--                FFT along y
+                   ir = i-iouter+1  ! counter within a stride
+                   CALL fft_y_1d( work_ffty(:,ir), 'backward' )
+
+                   DO  j = 0, ny
+                      f_out(k,j,i) = work_ffty(j,ir)
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+          ENDDO
+          !$OMP END PARALLEL
+
+          DEALLOCATE( work_ffty )
+
+       ENDIF
+
+       CALL cpu_log( log_point_s(7), 'fft_y_1d', 'stop' )
+
+    END SUBROUTINE tr_xy_ffty
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> FFT along x, solution of the tridiagonal system and backward FFT for
+!> a 1d-decomposition along x
+!>
+!> @warning this subroutine may still not work for hybrid parallelization
+!>          with OpenMP (for possible necessary changes see the original
+!>          routine poisfft_hybrid, developed by Klaus Ketelsen, May 2002)
+!------------------------------------------------------------------------------!
+    SUBROUTINE fftx_tri_fftx( ar )
+
+       USE control_parameters,                                                 &
+           ONLY:  loop_optimization
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx2, ddy2
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                   !<
+       INTEGER(iwp) ::  j                   !<
+       INTEGER(iwp) ::  k                   !<
+       INTEGER(iwp) ::  m                   !<
+       INTEGER(iwp) ::  n                   !<
+!$     INTEGER(iwp) ::  omp_get_thread_num  !<
+       INTEGER(iwp) ::  tn                  !<
+
+       REAL(wp), DIMENSION(0:nx)                          ::  work_fftx  !<
+       REAL(wp), DIMENSION(0:nx,1:nz)                     ::  work_trix  !<
+       REAL(wp), DIMENSION(nnx,1:nz,nys_x:nyn_x,pdims(1)) ::  ar         !<
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE          ::  tri        !<
+
+
+       CALL cpu_log( log_point_s(33), 'fft_x_1d + tridia', 'start' )
+
+       ALLOCATE( tri(5,0:nx,0:nz-1,0:threads_per_task-1) )
+
+       tn = 0              ! Default thread number in case of one thread
+!$OMP  PARALLEL DO PRIVATE ( i, j, k, m, n, tn, work_fftx, work_trix )
+       DO  j = nys_x, nyn_x
+
+!$        tn = omp_get_thread_num()
+
+          IF ( loop_optimization == 'vector' )  THEN
+!
+!--          Code optimized for vector processors
+             DO  k = 1, nz
+
+                m = 0
+                DO  n = 1, pdims(1)
+                   DO  i = 1, nnx
+                      work_trix(m,k) = ar(i,k,j,n)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+             CALL fft_x_m( work_trix, 'forward' )
+
+          ELSE
+!
+!--          Cache optimized code
+             DO  k = 1, nz
+
+                m = 0
+                DO  n = 1, pdims(1)
+                   DO  i = 1, nnx
+                      work_fftx(m) = ar(i,k,j,n)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+                CALL fft_x_1d( work_fftx, 'forward' )
+
+                DO  i = 0, nx
+                   work_trix(i,k) = work_fftx(i)
+                ENDDO
+
+             ENDDO
+
+          ENDIF
+
+!
+!--       Solve the linear equation system
+          CALL tridia_1dd( ddx2, ddy2, nx, ny, j, work_trix, tri(:,:,:,tn) )
+
+          IF ( loop_optimization == 'vector' )  THEN
+!
+!--          Code optimized for vector processors
+             CALL fft_x_m( work_trix, 'backward' )
+
+             DO  k = 1, nz
+
+                m = 0
+                DO  n = 1, pdims(1)
+                   DO  i = 1, nnx
+                      ar(i,k,j,n) = work_trix(m,k)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+          ELSE
+!
+!--          Cache optimized code
+             DO  k = 1, nz
+
+                DO  i = 0, nx
+                   work_fftx(i) = work_trix(i,k)
+                ENDDO
+
+                CALL fft_x_1d( work_fftx, 'backward' )
+
+                m = 0
+                DO  n = 1, pdims(1)
+                   DO  i = 1, nnx
+                      ar(i,k,j,n) = work_fftx(m)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+          ENDIF
+
+       ENDDO
+
+       DEALLOCATE( tri )
+
+       CALL cpu_log( log_point_s(33), 'fft_x_1d + tridia', 'stop' )
+
+    END SUBROUTINE fftx_tri_fftx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Fourier-transformation along x with subsequent transposition x --> y for
+!> a 1d-decomposition along y.
+!>
+!> @attention NEC-branch of this routine may significantly profit from
+!>            further optimizations. So far, performance is much worse than
+!>            for routine ffty_tr_yx (more than three times slower).
+!------------------------------------------------------------------------------!
+    SUBROUTINE fftx_tr_xy( f_in, f_out )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  loop_optimization
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i  !<
+       INTEGER(iwp) ::  j  !<
+       INTEGER(iwp) ::  k  !<
+
+       REAL(wp), DIMENSION(0:nx,1:nz,nys:nyn)             ::  work_fftx  !<
+       REAL(wp), DIMENSION(1:nz,nys:nyn,0:nx)             ::  f_in       !<
+       REAL(wp), DIMENSION(nny,1:nz,nxl_y:nxr_y,pdims(2)) ::  f_out      !<
+       REAL(wp), DIMENSION(nys:nyn,1:nz,0:nx)             ::  work       !<
+
+!
+!--    Carry out the FFT along x, where all data are present due to the
+!--    1d-decomposition along y. Resort the data in a way that y becomes
+!--    the first index.
+       CALL cpu_log( log_point_s(4), 'fft_x_1d', 'start' )
+
+       IF ( loop_optimization == 'vector' )  THEN
+!
+!--       Code for vector processors
+!$OMP     PARALLEL PRIVATE ( i, j, k )
+!$OMP     DO
+          DO  i = 0, nx
+
+             DO  j = nys, nyn
+                DO  k = 1, nz
+                   work_fftx(i,k,j) = f_in(k,j,i)
+                ENDDO
+             ENDDO
+
+          ENDDO
+
+!$OMP     DO
+          DO  j = nys, nyn
+
+             CALL fft_x_m( work_fftx(:,:,j), 'forward' )
+
+             DO  k = 1, nz
+                DO  i = 0, nx
+                   work(j,k,i) = work_fftx(i,k,j)
+                ENDDO
+             ENDDO
+
+          ENDDO
+!$OMP     END PARALLEL
+
+       ELSE
+
+!
+!--       Cache optimized code (there might be still a potential for better
+!--       optimization).
+!$OMP     PARALLEL PRIVATE (i,j,k)
+!$OMP     DO
+          DO  i = 0, nx
+
+             DO  j = nys, nyn
+                DO  k = 1, nz
+                   work_fftx(i,k,j) = f_in(k,j,i)
+                ENDDO
+             ENDDO
+
+          ENDDO
+
+!$OMP     DO
+          DO  j = nys, nyn
+             DO  k = 1, nz
+
+                CALL fft_x_1d( work_fftx(0:nx,k,j), 'forward' )
+
+                DO  i = 0, nx
+                   work(j,k,i) = work_fftx(i,k,j)
+                ENDDO
+             ENDDO
+
+          ENDDO
+!$OMP     END PARALLEL
+
+       ENDIF
+       CALL cpu_log( log_point_s(4), 'fft_x_1d', 'pause' )
+
+!
+!--    Transpose array
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start' )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( work(nys,1,0),      sendrecvcount_xy, MPI_REAL, &
+                          f_out(1,1,nxl_y,1), sendrecvcount_xy, MPI_REAL, &
+                          comm1dy, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+    END SUBROUTINE fftx_tr_xy
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition y --> x with a subsequent backward Fourier transformation for
+!> a 1d-decomposition along x.
+!------------------------------------------------------------------------------!
+    SUBROUTINE tr_yx_fftx( f_in, f_out )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  loop_optimization
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i  !<
+       INTEGER(iwp) ::  j  !<
+       INTEGER(iwp) ::  k  !<
+
+       REAL(wp), DIMENSION(0:nx,1:nz,nys:nyn)             ::  work_fftx  !<
+       REAL(wp), DIMENSION(nny,1:nz,nxl_y:nxr_y,pdims(2)) ::  f_in       !<
+       REAL(wp), DIMENSION(1:nz,nys:nyn,0:nx)             ::  f_out      !<
+       REAL(wp), DIMENSION(nys:nyn,1:nz,0:nx)             ::  work       !<
+
+!
+!--    Transpose array
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start' )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( f_in(1,1,nxl_y,1), sendrecvcount_xy, MPI_REAL, &
+                          work(nys,1,0),     sendrecvcount_xy, MPI_REAL, &
+                          comm1dy, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+!
+!--    Carry out the FFT along x, where all data are present due to the
+!--    1d-decomposition along y. Resort the data in a way that y becomes
+!--    the first index.
+       CALL cpu_log( log_point_s(4), 'fft_x_1d', 'continue' )
+
+       IF ( loop_optimization == 'vector' )  THEN
+!
+!--       Code optimized for vector processors
+!$OMP     PARALLEL PRIVATE ( i, j, k )
+!$OMP     DO
+          DO  j = nys, nyn
+
+             DO  k = 1, nz
+                DO  i = 0, nx
+                   work_fftx(i,k,j) = work(j,k,i)
+                ENDDO
+             ENDDO
+
+             CALL fft_x_m( work_fftx(:,:,j), 'backward' )
+
+          ENDDO
+
+!$OMP     DO
+          DO  i = 0, nx
+             DO  j = nys, nyn
+                DO  k = 1, nz
+                   f_out(k,j,i) = work_fftx(i,k,j)
+                ENDDO
+             ENDDO
+          ENDDO
+!$OMP     END PARALLEL
+
+       ELSE
+
+!
+!--       Cache optimized code (there might be still a potential for better
+!--       optimization).
+!$OMP     PARALLEL PRIVATE (i,j,k)
+!$OMP     DO
+          DO  j = nys, nyn
+             DO  k = 1, nz
+
+                DO  i = 0, nx
+                   work_fftx(i,k,j) = work(j,k,i)
+                ENDDO
+
+                CALL fft_x_1d( work_fftx(0:nx,k,j), 'backward' )
+
+             ENDDO
+          ENDDO
+
+!$OMP     DO
+          DO  i = 0, nx
+             DO  j = nys, nyn
+                DO  k = 1, nz
+                   f_out(k,j,i) = work_fftx(i,k,j)
+                ENDDO
+             ENDDO
+          ENDDO
+!$OMP     END PARALLEL
+
+       ENDIF
+       CALL cpu_log( log_point_s(4), 'fft_x_1d', 'stop' )
+
+    END SUBROUTINE tr_yx_fftx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> FFT along y, solution of the tridiagonal system and backward FFT for
+!> a 1d-decomposition along y.
+!>
+!> @warning this subroutine may still not work for hybrid parallelization
+!>          with OpenMP (for possible necessary changes see the original
+!>          routine poisfft_hybrid, developed by Klaus Ketelsen, May 2002)
+!------------------------------------------------------------------------------!
+    SUBROUTINE ffty_tri_ffty( ar )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  loop_optimization
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx2, ddy2
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                   !<
+       INTEGER(iwp) ::  j                   !<
+       INTEGER(iwp) ::  k                   !<
+       INTEGER(iwp) ::  m                   !<
+       INTEGER(iwp) ::  n                   !<
+!$     INTEGER(iwp) ::  omp_get_thread_num  !<
+       INTEGER(iwp) ::  tn                  !<
+
+       REAL(wp), DIMENSION(0:ny)                          ::  work_ffty  !<
+       REAL(wp), DIMENSION(0:ny,1:nz)                     ::  work_triy  !<
+       REAL(wp), DIMENSION(nny,1:nz,nxl_y:nxr_y,pdims(2)) ::  ar         !<
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE          ::  tri        !<
+
+
+       CALL cpu_log( log_point_s(39), 'fft_y_1d + tridia', 'start' )
+
+       ALLOCATE( tri(5,0:ny,0:nz-1,0:threads_per_task-1) )
+
+       tn = 0           ! Default thread number in case of one thread
+!$OMP  PARALLEL DO PRIVATE ( i, j, k, m, n, tn, work_ffty, work_triy )
+       DO  i = nxl_y, nxr_y
+
+!$        tn = omp_get_thread_num()
+
+          IF ( loop_optimization == 'vector' )  THEN
+!
+!--          Code optimized for vector processors
+             DO  k = 1, nz
+
+                m = 0
+                DO  n = 1, pdims(2)
+                   DO  j = 1, nny
+                      work_triy(m,k) = ar(j,k,i,n)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+             CALL fft_y_m( work_triy, ny, 'forward' )
+
+          ELSE
+!
+!--          Cache optimized code
+             DO  k = 1, nz
+
+                m = 0
+                DO  n = 1, pdims(2)
+                   DO  j = 1, nny
+                      work_ffty(m) = ar(j,k,i,n)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+                CALL fft_y_1d( work_ffty, 'forward' )
+
+                DO  j = 0, ny
+                   work_triy(j,k) = work_ffty(j)
+                ENDDO
+
+             ENDDO
+
+          ENDIF
+
+!
+!--       Solve the linear equation system
+          CALL tridia_1dd( ddy2, ddx2, ny, nx, i, work_triy, tri(:,:,:,tn) )
+
+          IF ( loop_optimization == 'vector' )  THEN
+!
+!--          Code optimized for vector processors
+             CALL fft_y_m( work_triy, ny, 'backward' )
+
+             DO  k = 1, nz
+
+                m = 0
+                DO  n = 1, pdims(2)
+                   DO  j = 1, nny
+                      ar(j,k,i,n) = work_triy(m,k)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+          ELSE
+!
+!--          Cache optimized code
+             DO  k = 1, nz
+
+                DO  j = 0, ny
+                   work_ffty(j) = work_triy(j,k)
+                ENDDO
+
+                CALL fft_y_1d( work_ffty, 'backward' )
+
+                m = 0
+                DO  n = 1, pdims(2)
+                   DO  j = 1, nny
+                      ar(j,k,i,n) = work_ffty(m)
+                      m = m + 1
+                   ENDDO
+                ENDDO
+
+             ENDDO
+
+          ENDIF
+
+       ENDDO
+
+       DEALLOCATE( tri )
+
+       CALL cpu_log( log_point_s(39), 'fft_y_1d + tridia', 'stop' )
+
+    END SUBROUTINE ffty_tri_ffty
+
+ END MODULE poisfft_mod
Index: /palm/tags/release-6.0/SOURCE/poismg_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/poismg_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/poismg_mod.f90	(revision 3477)
@@ -0,0 +1,2370 @@
+!> @file poismg.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables in mesoscale-offline nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Set lateral boundary conditions for divergence
+!
+! 2937 2018-03-27 14:58:33Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Large-scale forcing implemented (MS)
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! sendrecv_in_background related parts removed
+! 
+! 2232 2017-05-30 17:47:52Z suehring
+!
+! 2073 2016-11-30 14:34:05Z raasch
+! change of openmp directives in restrict
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented (stll error in optimized multigrid)
+! 
+! 2021 2016-10-07 14:08:57Z suehring
+! Bugfix: restore nest_bound_(l/r/s/n) in case of mg_switch_to_pe0
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1934 2016-06-13 09:46:57Z hellstea
+! Rename subroutines and cpu-measure log points to indicate default version
+! 
+! 1904 2016-05-11 13:06:12Z suehring
+! Bugfix: enable special_exchange_horiz only for finer grid levels.
+! Some formatting adjustments and variable descriptions.
+!
+! 1898 2016-05-03 11:27:17Z suehring
+! Bugfix: bottom and top boundary condition in resid_fast
+! Bugfix: restriction at nzb+1
+! formatting adjustments, variable descriptions added in some declaration blocks
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1609 2015-07-03 15:37:58Z maronga
+! Bugfix: allow compilation without __parallel.
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! Initial revision.
+! Routine re-written and optimised based on poismg.
+!
+! Following optimisations have been made:
+! - vectorisation (for Intel-CPUs) of the red-black algorithm by resorting
+!   array elements with even and odd indices
+! - explicit boundary conditions for building walls removed (solver is
+!   running through the buildings
+! - reduced data transfer in case of ghost point exchange, because only
+!   "red" or "black" data points need to be exchanged. This is not applied
+!   for coarser grid levels, since for then the transfer time is latency bound
+!
+!
+! Description:
+! ------------
+!> Solves the Poisson equation for the perturbation pressure with a multigrid
+!> V- or W-Cycle scheme.
+!>
+!> This multigrid method was originally developed for PALM by Joerg Uhlenbrock,
+!> September 2000 - July 2001. It has been optimised for speed by Klaus
+!> Ketelsen in November 2014.
+!> 
+!> @attention Loop unrolling and cache optimization in SOR-Red/Black method
+!>            still does not give the expected speedup! 
+!>
+!> @todo Further work required.
+!------------------------------------------------------------------------------!
+ MODULE poismg_mod
+ 
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
+               bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
+               bc_radiation_s, grid_level, nesting_offline
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE kinds
+
+    USE pegrid
+
+    PRIVATE
+
+    INTEGER, SAVE                             ::  ind_even_odd    !< border index between even and odd k index
+    INTEGER, DIMENSION(:), SAVE, ALLOCATABLE  ::  even_odd_level  !< stores ind_even_odd for all MG levels
+
+    REAL(wp), DIMENSION(:,:), SAVE, ALLOCATABLE ::  f1_mg_b, f2_mg_b, f3_mg_b  !< blocked version of f1_mg ...
+
+    INTERFACE poismg
+       MODULE PROCEDURE poismg
+    END INTERFACE poismg
+
+    INTERFACE sort_k_to_even_odd_blocks
+       MODULE PROCEDURE sort_k_to_even_odd_blocks
+       MODULE PROCEDURE sort_k_to_even_odd_blocks_int
+       MODULE PROCEDURE sort_k_to_even_odd_blocks_1d
+    END INTERFACE sort_k_to_even_odd_blocks
+
+    PUBLIC poismg
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Solves the Poisson equation for the perturbation pressure with a multigrid
+!> V- or W-Cycle scheme.
+!------------------------------------------------------------------------------!
+    SUBROUTINE poismg( r )
+
+       USE arrays_3d,                                                          &
+           ONLY:  d, p_loc
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, gathered_size, grid_level,             &
+                  grid_level_count, ibc_p_t,                                   &
+                  maximum_grid_level, message_string, mgcycles, mg_cycles,     &
+                  mg_switch_to_pe0_level, residual_limit, subdomain_size
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxl_mg, nxr, nxrg, nxr_mg, nys, nysg, nys_mg, nyn,&
+                  nyng, nyn_mg, nzb, nzt, nzt_mg
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  maxerror          !<
+       REAL(wp) ::  maximum_mgcycles  !<
+       REAL(wp) ::  residual_norm     !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ::  r  !<
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p3  !<
+
+
+       CALL cpu_log( log_point_s(29), 'poismg', 'start' )
+!
+!--    Initialize arrays and variables used in this subroutine
+
+!--    If the number of grid points of the gathered grid, which is collected
+!--    on PE0, is larger than the number of grid points of an PE, than array
+!--    p3 will be enlarged.
+       IF ( gathered_size > subdomain_size )  THEN
+          ALLOCATE( p3(nzb:nzt_mg(mg_switch_to_pe0_level)+1,nys_mg(            &
+                    mg_switch_to_pe0_level)-1:nyn_mg(mg_switch_to_pe0_level)+1,&
+                    nxl_mg(mg_switch_to_pe0_level)-1:nxr_mg(                   &
+                    mg_switch_to_pe0_level)+1) )
+       ELSE
+          ALLOCATE ( p3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ENDIF
+
+       p3 = 0.0_wp
+
+ 
+!
+!--    Ghost boundaries have to be added to divergence array.
+!--    Exchange routine needs to know the grid level!
+       grid_level = maximum_grid_level
+       CALL exchange_horiz( d, 1)
+!
+!--    Set bottom and top boundary conditions
+       d(nzb,:,:) = d(nzb+1,:,:)
+       IF ( ibc_p_t == 1 )  d(nzt+1,:,: ) = d(nzt,:,:)
+!
+!--    Set lateral boundary conditions in non-cyclic case
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )                          &
+             d(:,:,nxl-1) = d(:,:,nxl)
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )                          &
+             d(:,:,nxr+1) = d(:,:,nxr)
+       ENDIF
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )                          &
+             d(:,nyn+1,:) = d(:,nyn,:)
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )                          &
+             d(:,nys-1,:) = d(:,nys,:)
+       ENDIF
+!
+!--    Initiation of the multigrid scheme. Does n cycles until the
+!--    residual is smaller than the given limit. The accuracy of the solution
+!--    of the poisson equation will increase with the number of cycles.
+!--    If the number of cycles is preset by the user, this number will be
+!--    carried out regardless of the accuracy.
+       grid_level_count =  0
+       mgcycles         =  0
+       IF ( mg_cycles == -1 )  THEN
+          maximum_mgcycles = 0
+          residual_norm    = 1.0_wp
+       ELSE
+          maximum_mgcycles = mg_cycles
+          residual_norm    = 0.0_wp
+       ENDIF
+
+!
+!--    Initial settings for sorting k-dimension from sequential order (alternate
+!--    even/odd) into blocks of even and odd or vice versa
+       CALL init_even_odd_blocks
+
+!
+!--    Sort input arrays in even/odd blocks along k-dimension
+       CALL sort_k_to_even_odd_blocks( d, grid_level )
+       CALL sort_k_to_even_odd_blocks( p_loc, grid_level )
+
+!
+!--    The complete multigrid cycles are running in block mode, i.e. over
+!--    seperate data blocks of even and odd indices
+       DO WHILE ( residual_norm > residual_limit  .OR. &
+                  mgcycles < maximum_mgcycles )
+ 
+          CALL next_mg_level( d, p_loc, p3, r)
+
+!
+!--       Calculate the residual if the user has not preset the number of
+!--       cycles to be performed
+          IF ( maximum_mgcycles == 0 )  THEN
+             CALL resid( d, p_loc, r )
+             maxerror = SUM( r(nzb+1:nzt,nys:nyn,nxl:nxr)**2 )
+
+#if defined( __parallel )
+             IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+                CALL MPI_ALLREDUCE( maxerror, residual_norm, 1, MPI_REAL,      &
+                                    MPI_SUM, comm2d, ierr)
+#else
+                residual_norm = maxerror
+#endif
+             residual_norm = SQRT( residual_norm )
+          ENDIF
+
+          mgcycles = mgcycles + 1
+
+!
+!--       If the user has not limited the number of cycles, stop the run in case
+!--       of insufficient convergence
+          IF ( mgcycles > 1000  .AND.  mg_cycles == -1 )  THEN
+             message_string = 'no sufficient convergence within 1000 cycles'
+             CALL message( 'poismg', 'PA0283', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDDO
+
+       DEALLOCATE( p3 )
+!
+!--    Result has to be sorted back from even/odd blocks to sequential order
+       CALL sort_k_to_sequential( p_loc )
+!
+!--    Unset the grid level. Variable is used to determine the MPI datatypes for
+!--    ghost point exchange
+       grid_level = 0
+
+       CALL cpu_log( log_point_s(29), 'poismg', 'stop' )
+
+    END SUBROUTINE poismg
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computes the residual of the perturbation pressure.
+!------------------------------------------------------------------------------!
+    SUBROUTINE resid( f_mg, p_mg, r )
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  rho_air_mg
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t
+       USE grid_variables,                                                     &
+           ONLY:  ddx2_mg, ddy2_mg
+
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i        !< index variable along x
+       INTEGER(iwp) ::  j        !< index variable along y
+       INTEGER(iwp) ::  k        !< index variable along z
+       INTEGER(iwp) ::  l        !< index indicating grid level
+       INTEGER(iwp) ::  km1      !< index variable along z dimension (k-1)
+       INTEGER(iwp) ::  kp1      !< index variable along z dimension (k+1)
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f_mg  !< velocity divergence
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  p_mg  !< perturbation pressure
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  r     !< residuum of perturbation pressure
+
+!
+!--    Calculate the residual
+       l = grid_level
+
+       CALL cpu_log( log_point_s(53), 'resid', 'start' )
+       !$OMP PARALLEL PRIVATE (i,j,k,km1,kp1)
+       !$OMP DO
+       DO  i = nxl_mg(l), nxr_mg(l)
+          DO  j = nys_mg(l), nyn_mg(l)
+                !DIR$ IVDEP
+             DO k = ind_even_odd+1, nzt_mg(l)
+                km1 = k-ind_even_odd-1
+                kp1 = k-ind_even_odd
+                r(k,j,i) = f_mg(k,j,i)                                         &
+                      - rho_air_mg(k,l) * ddx2_mg(l) *                         &
+                      ( p_mg(k,j,i+1) +  p_mg(k,j,i-1)  )                      &
+                      - rho_air_mg(k,l) * ddy2_mg(l) *                         &
+                      ( p_mg(k,j+1,i) + p_mg(k,j-1,i)  )                       &
+                      - f2_mg_b(k,l) * p_mg(kp1,j,i)                           &
+                      - f3_mg_b(k,l) * p_mg(km1,j,i)                           &
+                      + f1_mg_b(k,l) * p_mg(k,j,i)
+             ENDDO
+             !DIR$ IVDEP
+             DO k = nzb+1, ind_even_odd
+                km1 = k+ind_even_odd
+                kp1 = k+ind_even_odd+1
+                r(k,j,i) = f_mg(k,j,i)                                         &
+                      - rho_air_mg(k,l) * ddx2_mg(l) *                         &
+                      ( p_mg(k,j,i+1) +  p_mg(k,j,i-1)  )                      &
+                      - rho_air_mg(k,l) * ddy2_mg(l) *                         &
+                      ( p_mg(k,j+1,i) + p_mg(k,j-1,i)  )                       &
+                      - f2_mg_b(k,l) * p_mg(kp1,j,i)                           &
+                      - f3_mg_b(k,l) * p_mg(km1,j,i)                           &
+                      + f1_mg_b(k,l) * p_mg(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+!
+!--    Horizontal boundary conditions
+       CALL exchange_horiz( r, 1)
+
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+             r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l))
+          ENDIF
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+             r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l))
+          ENDIF
+       ENDIF
+
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+             r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:)
+          ENDIF
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+             r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:)
+          ENDIF
+       ENDIF
+
+!
+!--    Boundary conditions at bottom and top of the domain. Points may be within
+!--    buildings, but that doesn't matter.
+       IF ( ibc_p_b == 1 )  THEN
+!
+!--       equivalent to r(nzb,:,: ) = r(nzb+1,:,:)
+          r(nzb,:,: ) = r(ind_even_odd+1,:,:)
+       ELSE
+          r(nzb,:,: ) = 0.0_wp
+       ENDIF
+
+       IF ( ibc_p_t == 1 )  THEN
+!
+!--       equivalent to r(nzt_mg(l)+1,:,: ) = r(nzt_mg(l),:,:)
+          r(nzt_mg(l)+1,:,: ) = r(ind_even_odd,:,:)
+       ELSE
+          r(nzt_mg(l)+1,:,: ) = 0.0_wp
+       ENDIF
+
+       CALL cpu_log( log_point_s(53), 'resid', 'stop' )
+
+    END SUBROUTINE resid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interpolates the residual on the next coarser grid with "full weighting"
+!> scheme
+!------------------------------------------------------------------------------!
+    SUBROUTINE restrict( f_mg, r )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t
+
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i    !< index variable along x on finer grid
+       INTEGER(iwp) ::  ic   !< index variable along x on coarser grid
+       INTEGER(iwp) ::  j    !< index variable along y on finer grid
+       INTEGER(iwp) ::  jc   !< index variable along y on coarser grid
+       INTEGER(iwp) ::  k    !< index variable along z on finer grid
+       INTEGER(iwp) ::  kc   !< index variable along z on coarser grid
+       INTEGER(iwp) ::  l    !< index indicating finer grid level
+       INTEGER(iwp) ::  km1  !< index variable along z dimension (k-1 on finer level) 
+       INTEGER(iwp) ::  kp1  !< index variable along z dimension (k+1 on finer level)
+
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::       &
+                                         f_mg  !< Residual on coarser grid level
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level+1)+1,                         &
+                           nys_mg(grid_level+1)-1:nyn_mg(grid_level+1)+1,      &
+                           nxl_mg(grid_level+1)-1:nxr_mg(grid_level+1)+1) ::   &
+                                         r !< Residual on finer grid level
+
+!
+!--    Interpolate the residual
+       l = grid_level
+
+       CALL cpu_log( log_point_s(54), 'restrict', 'start' )
+!
+!--    No wall treatment
+       !$OMP PARALLEL PRIVATE (i,j,k,ic,jc,kc,km1,kp1)
+       !$OMP DO SCHEDULE( STATIC )
+       DO  ic = nxl_mg(l), nxr_mg(l)
+          i = 2*ic
+          DO  jc = nys_mg(l), nyn_mg(l)
+!
+!--          Calculation for the first point along k
+             j  = 2*jc
+!
+!--          Calculation for the other points along k
+             !DIR$ IVDEP
+             DO k = ind_even_odd+1, nzt_mg(l+1)    ! Fine grid at this point
+                km1 = k-ind_even_odd-1
+                kp1 = k-ind_even_odd
+                kc  = k-ind_even_odd               ! Coarse grid index
+
+                f_mg(kc,jc,ic) = 1.0_wp / 64.0_wp * (                      &
+                               8.0_wp * r(k,j,i)                            &
+                             + 4.0_wp * ( r(k,j,i-1)     + r(k,j,i+1)     + &
+                                          r(k,j+1,i)     + r(k,j-1,i)     ) &
+                             + 2.0_wp * ( r(k,j-1,i-1)   + r(k,j+1,i-1)   + &
+                                          r(k,j-1,i+1)   + r(k,j+1,i+1)   ) &
+                             + 4.0_wp * r(km1,j,i)                          &
+                             + 2.0_wp * ( r(km1,j,i-1)   + r(km1,j,i+1)   + &
+                                          r(km1,j+1,i)   + r(km1,j-1,i)   ) &
+                             +          ( r(km1,j-1,i-1) + r(km1,j+1,i-1) + &
+                                          r(km1,j-1,i+1) + r(km1,j+1,i+1) ) &
+                             + 4.0_wp * r(kp1,j,i)                          &
+                             + 2.0_wp * ( r(kp1,j,i-1)   + r(kp1,j,i+1)   + &
+                                          r(kp1,j+1,i)   + r(kp1,j-1,i)   ) &
+                             +          ( r(kp1,j-1,i-1) + r(kp1,j+1,i-1) + &
+                                          r(kp1,j-1,i+1) + r(kp1,j+1,i+1) ) &
+                                        )
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP ENDDO
+       !$OMP END PARALLEL
+
+!
+!--    Ghost point exchange
+       CALL exchange_horiz( f_mg, 1)
+!
+!--    Horizontal boundary conditions
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+             f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l))
+          ENDIF
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+             f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l))
+          ENDIF
+       ENDIF
+
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+             f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:)
+          ENDIF
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+             f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:)
+          ENDIF
+       ENDIF
+
+!
+!--    Boundary conditions at bottom and top of the domain.
+!--    These points are not handled by the above loop. Points may be within
+!--    buildings, but that doesn't matter. Remark: f_mg is ordered sequentielly
+!--    after interpolation on coarse grid (is ordered in odd-even blocks further
+!--    below). 
+       IF ( ibc_p_b == 1 )  THEN
+          f_mg(nzb,:,: ) = f_mg(nzb+1,:,:)
+       ELSE
+          f_mg(nzb,:,: ) = 0.0_wp
+       ENDIF
+
+       IF ( ibc_p_t == 1 )  THEN
+          f_mg(nzt_mg(l)+1,:,: ) = f_mg(nzt_mg(l),:,:)
+       ELSE
+          f_mg(nzt_mg(l)+1,:,: ) = 0.0_wp
+       ENDIF
+
+       CALL cpu_log( log_point_s(54), 'restrict', 'stop' )
+!
+!--    Since residual is in sequential order after interpolation, an additional 
+!--    sorting in odd-even blocks along z dimension is required at this point.
+       CALL sort_k_to_even_odd_blocks( f_mg , l)
+
+    END SUBROUTINE restrict
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interpolates the correction of the perturbation pressure 
+!> to the next finer grid.
+!------------------------------------------------------------------------------!
+    SUBROUTINE prolong( p, temp )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i   !< index variable along x on coarser grid level
+       INTEGER(iwp) ::  j   !< index variable along y on coarser grid level
+       INTEGER(iwp) ::  k   !< index variable along z on coarser grid level
+       INTEGER(iwp) ::  l   !< index indicating finer grid level
+       INTEGER(iwp) ::  kp1 !< index variable along z
+       INTEGER(iwp) ::  ke  !< index for prolog even
+       INTEGER(iwp) ::  ko  !< index for prolog odd
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1 ) ::  &
+                               p     !< perturbation pressure on coarser grid level
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::       &
+                               temp  !< perturbation pressure on finer grid level
+
+
+       CALL cpu_log( log_point_s(55), 'prolong', 'start' )
+
+!
+!--    First, store elements of the coarser grid on the next finer grid
+       l = grid_level
+       ind_even_odd = even_odd_level(grid_level-1)
+
+       !$OMP PARALLEL PRIVATE (i,j,k,kp1,ke,ko)
+       !$OMP DO
+       DO  i = nxl_mg(l-1), nxr_mg(l-1)
+          DO  j = nys_mg(l-1), nyn_mg(l-1)
+
+             !DIR$ IVDEP
+             DO k = ind_even_odd+1, nzt_mg(l-1)
+                kp1 = k - ind_even_odd
+                ke  = 2 * ( k-ind_even_odd - 1 ) + 1
+                ko  = 2 * k - 1
+!
+!--             Points of the coarse grid are directly stored on the next finer
+!--             grid
+                temp(ko,2*j,2*i)   = p(k,j,i)
+!
+!--             Points between two coarse-grid points
+                temp(ko,2*j,2*i+1) = 0.5_wp * ( p(k,j,i) + p(k,j,i+1) )
+                temp(ko,2*j+1,2*i) = 0.5_wp * ( p(k,j,i) + p(k,j+1,i) )
+                temp(ke,2*j,2*i)   = 0.5_wp * ( p(k,j,i) + p(kp1,j,i) )
+!
+!--             Points in the center of the planes stretched by four points
+!--             of the coarse grid cube
+                temp(ko,2*j+1,2*i+1) = 0.25_wp * ( p(k,j,i)   + p(k,j,i+1) +   &
+                                                   p(k,j+1,i) + p(k,j+1,i+1) )
+                temp(ke,2*j,2*i+1)   = 0.25_wp * ( p(k,j,i)   + p(k,j,i+1) +   &
+                                                   p(kp1,j,i) + p(kp1,j,i+1) )
+                temp(ke,2*j+1,2*i)   = 0.25_wp * ( p(k,j,i)   + p(k,j+1,i) +   &
+                                                   p(kp1,j,i) + p(kp1,j+1,i) )
+!
+!--             Points in the middle of coarse grid cube
+                temp(ke,2*j+1,2*i+1) = 0.125_wp *                              &
+                                               ( p(k,j,i)     + p(k,j,i+1)   + &
+                                                 p(k,j+1,i)   + p(k,j+1,i+1) + &
+                                                 p(kp1,j,i)   + p(kp1,j,i+1) + &
+                                                 p(kp1,j+1,i) + p(kp1,j+1,i+1) )
+
+             ENDDO
+
+             !DIR$ IVDEP
+             DO k = nzb+1, ind_even_odd
+                kp1 = k + ind_even_odd + 1
+                ke  = 2 * k
+                ko  = 2 * ( k + ind_even_odd )
+!
+!--             Points of the coarse grid are directly stored on the next finer
+!--             grid
+                temp(ko,2*j,2*i)   = p(k,j,i)
+!
+!--             Points between two coarse-grid points
+                temp(ko,2*j,2*i+1) = 0.5_wp * ( p(k,j,i) + p(k,j,i+1) )
+                temp(ko,2*j+1,2*i) = 0.5_wp * ( p(k,j,i) + p(k,j+1,i) )
+                temp(ke,2*j,2*i)   = 0.5_wp * ( p(k,j,i) + p(kp1,j,i) )
+!
+!--             Points in the center of the planes stretched by four points
+!--             of the coarse grid cube
+                temp(ko,2*j+1,2*i+1) = 0.25_wp * ( p(k,j,i)   + p(k,j,i+1) +   &
+                                                   p(k,j+1,i) + p(k,j+1,i+1) )
+                temp(ke,2*j,2*i+1)   = 0.25_wp * ( p(k,j,i)   + p(k,j,i+1) +   &
+                                                   p(kp1,j,i) + p(kp1,j,i+1) )
+                temp(ke,2*j+1,2*i)   = 0.25_wp * ( p(k,j,i)   + p(k,j+1,i) +   &
+                                                   p(kp1,j,i) + p(kp1,j+1,i) )
+!
+!--             Points in the middle of coarse grid cube
+                temp(ke,2*j+1,2*i+1) = 0.125_wp *                              &
+                                               ( p(k,j,i)     + p(k,j,i+1)   + &
+                                                 p(k,j+1,i)   + p(k,j+1,i+1) + &
+                                                 p(kp1,j,i)   + p(kp1,j,i+1) + &
+                                                 p(kp1,j+1,i) + p(kp1,j+1,i+1) )
+
+             ENDDO
+
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+
+       ind_even_odd = even_odd_level(grid_level)
+!
+!--    Horizontal boundary conditions
+       CALL exchange_horiz( temp, 1)
+
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+             temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l))
+          ENDIF
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+             temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l))
+          ENDIF
+       ENDIF
+
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+             temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:)
+          ENDIF
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+             temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:)
+          ENDIF
+       ENDIF
+
+!
+!--    Bottom and top boundary conditions
+       IF ( ibc_p_b == 1 )  THEN
+!
+!--       equivalent to temp(nzb,:,: ) = temp(nzb+1,:,:)
+          temp(nzb,:,: ) = temp(ind_even_odd+1,:,:)
+       ELSE
+          temp(nzb,:,: ) = 0.0_wp
+       ENDIF
+
+       IF ( ibc_p_t == 1 )  THEN
+!
+!--       equivalent to temp(nzt_mg(l)+1,:,: ) = temp(nzt_mg(l),:,:)
+          temp(nzt_mg(l)+1,:,: ) = temp(ind_even_odd,:,:)
+       ELSE
+          temp(nzt_mg(l)+1,:,: ) = 0.0_wp
+       ENDIF
+
+       CALL cpu_log( log_point_s(55), 'prolong', 'stop' )
+
+    END SUBROUTINE prolong
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Relaxation method for the multigrid scheme. A Gauss-Seidel iteration with
+!> 3D-Red-Black decomposition (GS-RB) is used.
+!------------------------------------------------------------------------------!
+    SUBROUTINE redblack( f_mg, p_mg )
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  rho_air_mg
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t, ngsrb 
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx2_mg, ddy2_mg
+
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: color    !< grid point color, either red or black
+       INTEGER(iwp) :: i        !< index variable along x
+       INTEGER(iwp) :: ic       !< index variable along x
+       INTEGER(iwp) :: j        !< index variable along y
+       INTEGER(iwp) :: jc       !< index variable along y
+       INTEGER(iwp) :: jj       !< index variable along y
+       INTEGER(iwp) :: k        !< index variable along z
+       INTEGER(iwp) :: l        !< grid level
+       INTEGER(iwp) :: n        !< loop variable GauÃ-Seidel iterations
+       INTEGER(iwp) :: km1      !< index variable (k-1)
+       INTEGER(iwp) :: kp1      !< index variable (k+1)
+
+       LOGICAL      :: unroll   !< flag indicating whether loop unrolling is possible
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::       &
+                                      f_mg  !< residual of perturbation pressure 
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::       &
+                                      p_mg  !< perturbation pressure
+
+       l = grid_level
+
+       unroll = ( MOD( nyn_mg(l)-nys_mg(l)+1, 4 ) == 0  .AND.                  &
+                  MOD( nxr_mg(l)-nxl_mg(l)+1, 2 ) == 0 )
+
+       DO  n = 1, ngsrb
+       
+          DO  color = 1, 2
+
+             IF ( .NOT. unroll )  THEN
+
+                CALL cpu_log( log_point_s(36), 'redblack_no_unroll_f', 'start' )
+!
+!--             Without unrolling of loops, no cache optimization
+                !$OMP PARALLEL PRIVATE (i,j,k,km1,kp1)
+                !$OMP DO
+                DO  i = nxl_mg(l), nxr_mg(l), 2
+                   DO  j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+                      !DIR$ IVDEP
+                      DO  k = ind_even_odd+1, nzt_mg(l)
+                         km1 = k-ind_even_odd-1
+                         kp1 = k-ind_even_odd
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+                   ENDDO
+                ENDDO
+   
+                !$OMP DO
+                DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+                   DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+                       !DIR$ IVDEP
+                       DO  k = ind_even_odd+1, nzt_mg(l)
+                         km1 = k-ind_even_odd-1
+                         kp1 = k-ind_even_odd
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+                   ENDDO
+                ENDDO
+  
+                !$OMP DO
+                DO  i = nxl_mg(l), nxr_mg(l), 2
+                   DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+                      !DIR$ IVDEP
+                      DO  k = nzb+1, ind_even_odd
+                         km1 = k+ind_even_odd
+                         kp1 = k+ind_even_odd+1
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+                !$OMP DO
+                DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+                   DO  j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+                      !DIR$ IVDEP
+                      DO  k = nzb+1, ind_even_odd
+                         km1 = k+ind_even_odd
+                         kp1 = k+ind_even_odd+1
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+                   ENDDO
+                ENDDO
+                !$OMP END PARALLEL
+
+                CALL cpu_log( log_point_s(36), 'redblack_no_unroll_f', 'stop' )
+
+             ELSE
+!
+!--              Loop unrolling along y, only one i loop for better cache use
+                CALL cpu_log( log_point_s(38), 'redblack_unroll_f', 'start' )
+
+                !$OMP PARALLEL PRIVATE (i,j,k,ic,jc,km1,kp1,jj)
+                !$OMP DO
+                DO  ic = nxl_mg(l), nxr_mg(l), 2
+                   DO  jc = nys_mg(l), nyn_mg(l), 4
+                      i  = ic
+                      jj = jc+2-color
+                      !DIR$ IVDEP
+                      DO  k = ind_even_odd+1, nzt_mg(l)
+                         km1 = k-ind_even_odd-1
+                         kp1 = k-ind_even_odd
+                         j   = jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+
+                      i  = ic+1
+                      jj = jc+color-1
+                      !DIR$ IVDEP
+                      DO  k = ind_even_odd+1, nzt_mg(l)
+                         km1 = k-ind_even_odd-1
+                         kp1 = k-ind_even_odd
+                         j   = jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+
+                      i  = ic
+                      jj = jc+color-1
+                      !DIR$ IVDEP
+                      DO  k = nzb+1, ind_even_odd
+                         km1 = k+ind_even_odd
+                         kp1 = k+ind_even_odd+1
+                         j   = jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+
+                      i  = ic+1
+                      jj = jc+2-color
+                      !DIR$ IVDEP
+                      DO  k = nzb+1, ind_even_odd
+                         km1 = k+ind_even_odd
+                         kp1 = k+ind_even_odd+1
+                         j   = jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg_b(k,l) * (               &
+                                 rho_air_mg(k,l) * ddx2_mg(l) *                &
+                               ( p_mg(k,j,i+1) + p_mg(k,j,i-1) )               &
+                               + rho_air_mg(k,l) * ddy2_mg(l) *                &
+                               ( p_mg(k,j+1,i) + p_mg(k,j-1,i) )               &
+                               + f2_mg_b(k,l) * p_mg(kp1,j,i)                  &
+                               + f3_mg_b(k,l) * p_mg(km1,j,i)                  &
+                               - f_mg(k,j,i)                   )
+                      ENDDO
+
+                   ENDDO
+                ENDDO
+                !$OMP END PARALLEL
+
+                CALL cpu_log( log_point_s(38), 'redblack_unroll_f', 'stop' )
+
+             ENDIF
+
+!
+!--          Horizontal boundary conditions
+             CALL special_exchange_horiz( p_mg, color )
+
+             IF ( .NOT. bc_lr_cyc )  THEN
+                IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+                   p_mg(:,:,nxl_mg(l)-1) = p_mg(:,:,nxl_mg(l))
+                ENDIF
+                IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+                   p_mg(:,:,nxr_mg(l)+1) = p_mg(:,:,nxr_mg(l))
+                ENDIF
+             ENDIF
+
+             IF ( .NOT. bc_ns_cyc )  THEN
+                IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+                   p_mg(:,nyn_mg(l)+1,:) = p_mg(:,nyn_mg(l),:)
+                ENDIF
+                IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+                   p_mg(:,nys_mg(l)-1,:) = p_mg(:,nys_mg(l),:)
+                ENDIF
+             ENDIF
+
+!
+!--          Bottom and top boundary conditions
+             IF ( ibc_p_b == 1 )  THEN
+!
+!--             equivalent to p_mg(nzb,:,: ) = p_mg(nzb+1,:,:) 
+                p_mg(nzb,:,: ) = p_mg(ind_even_odd+1,:,:)
+             ELSE
+                p_mg(nzb,:,: ) = 0.0_wp
+             ENDIF
+
+             IF ( ibc_p_t == 1 )  THEN
+!
+!--             equivalent to p_mg(nzt_mg(l)+1,:,: ) = p_mg(nzt_mg(l),:,:)
+                p_mg(nzt_mg(l)+1,:,: ) = p_mg(ind_even_odd,:,:)
+             ELSE
+                p_mg(nzt_mg(l)+1,:,: ) = 0.0_wp
+             ENDIF
+
+          ENDDO
+
+       ENDDO
+
+    END SUBROUTINE redblack
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sort k-Dimension from sequential into blocks of even and odd.
+!> This is required to vectorize the red-black subroutine.
+!> Version for 3D-REAL arrays
+!------------------------------------------------------------------------------!
+    SUBROUTINE sort_k_to_even_odd_blocks( p_mg , glevel )
+
+
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  glevel  !< grid level 
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(glevel)+1,                               &
+                           nys_mg(glevel)-1:nyn_mg(glevel)+1,                  &
+                           nxl_mg(glevel)-1:nxr_mg(glevel)+1) ::               &
+                                      p_mg  !< array to be sorted
+!
+!--    Local variables
+       INTEGER(iwp) :: i        !< index variable along x
+       INTEGER(iwp) :: j        !< index variable along y
+       INTEGER(iwp) :: k        !< index variable along z
+       INTEGER(iwp) :: l        !< grid level
+       INTEGER(iwp) :: ind      !< index variable along z
+       REAL(wp), DIMENSION(nzb:nzt_mg(glevel)+1) ::  tmp  !< odd-even sorted temporary array
+
+
+       CALL cpu_log( log_point_s(52), 'sort_k_to_even_odd', 'start' )
+
+       l = glevel
+       ind_even_odd = even_odd_level(l)
+
+       !$OMP PARALLEL PRIVATE (i,j,k,ind,tmp)
+       !$OMP DO
+       DO  i = nxl_mg(l)-1, nxr_mg(l)+1
+          DO  j = nys_mg(l)-1, nyn_mg(l)+1
+
+!
+!--          Sort the data with even k index
+             ind = nzb-1
+             DO  k = nzb, nzt_mg(l), 2
+                ind = ind + 1
+                tmp(ind) = p_mg(k,j,i)
+             ENDDO
+!
+!--          Sort the data with odd k index
+             DO  k = nzb+1, nzt_mg(l)+1, 2
+                ind = ind + 1
+                tmp(ind) = p_mg(k,j,i)
+             ENDDO
+
+             p_mg(:,j,i) = tmp
+
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+
+       CALL cpu_log( log_point_s(52), 'sort_k_to_even_odd', 'stop' )
+
+    END SUBROUTINE sort_k_to_even_odd_blocks
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sort k-Dimension from sequential into blocks of even and odd.
+!> This is required to vectorize the red-black subroutine.
+!> Version for 1D-REAL arrays
+!------------------------------------------------------------------------------!
+    SUBROUTINE sort_k_to_even_odd_blocks_1d( f_mg, f_mg_b, glevel )
+
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  glevel  !< grid level
+
+       REAL(wp), DIMENSION(nzb+1:nzt_mg(glevel)) ::  f_mg    !< 1D input array
+       REAL(wp), DIMENSION(nzb:nzt_mg(glevel)+1) ::  f_mg_b  !< 1D output array
+
+!
+!--    Local variables
+       INTEGER(iwp) :: ind   !< index variable along z
+       INTEGER(iwp) :: k     !< index variable along z 
+
+
+       ind = nzb - 1
+!
+!--    Sort the data with even k index
+       DO  k = nzb, nzt_mg(glevel), 2
+          ind = ind + 1
+          IF ( k >= nzb+1  .AND.  k <= nzt_mg(glevel) )  THEN
+             f_mg_b(ind) = f_mg(k)
+          ENDIF
+       ENDDO
+!
+!--    Sort the data with odd k index
+       DO  k = nzb+1, nzt_mg(glevel)+1, 2
+          ind = ind + 1
+          IF( k >= nzb+1  .AND.  k <= nzt_mg(glevel) )  THEN
+             f_mg_b(ind) = f_mg(k)
+          ENDIF
+       ENDDO
+
+    END SUBROUTINE sort_k_to_even_odd_blocks_1d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sort k-Dimension from sequential into blocks of even and odd.
+!> This is required to vectorize the red-black subroutine.
+!> Version for 2D-INTEGER arrays
+!------------------------------------------------------------------------------!
+    SUBROUTINE sort_k_to_even_odd_blocks_int( i_mg , glevel )
+
+
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  glevel  !< grid level
+
+       INTEGER(iwp), DIMENSION(nzb:nzt_mg(glevel)+1,                           &
+                               nys_mg(glevel)-1:nyn_mg(glevel)+1,              &
+                               nxl_mg(glevel)-1:nxr_mg(glevel)+1) ::           &
+                                    i_mg    !< array to be sorted 
+!
+!--    Local variables
+       INTEGER(iwp) :: i        !< index variabel along x
+       INTEGER(iwp) :: j        !< index variable along y
+       INTEGER(iwp) :: k        !< index variable along z
+       INTEGER(iwp) :: l        !< grid level 
+       INTEGER(iwp) :: ind      !< index variable along z
+       INTEGER(iwp),DIMENSION(nzb:nzt_mg(glevel)+1) ::  tmp  !< temporary odd-even sorted array
+
+
+       CALL cpu_log( log_point_s(52), 'sort_k_to_even_odd', 'start' )
+
+       l = glevel
+       ind_even_odd = even_odd_level(l)
+
+       DO  i = nxl_mg(l)-1, nxr_mg(l)+1
+          DO  j = nys_mg(l)-1, nyn_mg(l)+1
+
+!
+!--          Sort the data with even k index
+             ind = nzb-1
+             DO  k = nzb, nzt_mg(l), 2
+                ind = ind + 1
+                tmp(ind) = i_mg(k,j,i)
+             ENDDO
+!
+!++          ATTENTION: Check reason for this error. Remove it or replace WRITE
+!++                     by PALM message
+#if defined ( __parallel )
+             IF ( ind /= ind_even_odd )  THEN
+                WRITE (0,*) 'ERROR ==> illegal ind_even_odd ',ind,ind_even_odd,l
+                CALL MPI_ABORT(MPI_COMM_WORLD,i,j)
+             ENDIF
+#endif
+!
+!--          Sort the data with odd k index
+             DO  k = nzb+1, nzt_mg(l)+1, 2
+                ind = ind + 1
+                tmp(ind) = i_mg(k,j,i)
+             ENDDO
+
+             i_mg(:,j,i) = tmp
+
+          ENDDO
+       ENDDO
+
+       CALL cpu_log( log_point_s(52), 'sort_k_to_even_odd', 'stop' )
+
+    END SUBROUTINE sort_k_to_even_odd_blocks_int
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sort k-dimension from blocks of even and odd into sequential
+!------------------------------------------------------------------------------!
+    SUBROUTINE sort_k_to_sequential( p_mg )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  grid_level
+
+       USE indices,                                                            &
+           ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::       &
+                                     p_mg  !< array to be sorted
+!
+!--    Local variables
+       INTEGER(iwp) :: i        !< index variable along x
+       INTEGER(iwp) :: j        !< index variable along y
+       INTEGER(iwp) :: k        !< index variable along z
+       INTEGER(iwp) :: l        !< grid level
+       INTEGER(iwp) :: ind      !< index variable along z
+
+       REAL(wp),DIMENSION(nzb:nzt_mg(grid_level)+1) ::  tmp
+
+
+       l = grid_level
+
+       !$OMP PARALLEL PRIVATE (i,j,k,ind,tmp)
+       !$OMP DO
+       DO  i = nxl_mg(l)-1, nxr_mg(l)+1
+          DO  j = nys_mg(l)-1, nyn_mg(l)+1
+
+             ind = nzb - 1
+             tmp = p_mg(:,j,i)
+             DO  k = nzb, nzt_mg(l), 2
+                ind = ind + 1
+                p_mg(k,j,i) = tmp(ind)
+             ENDDO
+
+             DO  k = nzb+1, nzt_mg(l)+1, 2
+                ind = ind + 1
+                p_mg(k,j,i) = tmp(ind)
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+
+    END SUBROUTINE sort_k_to_sequential
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Gather subdomain data from all PEs.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mg_gather( f2, f2_sub )
+
+       USE control_parameters,                                                 &
+           ONLY:  grid_level
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+           ONLY:  mg_loc_ind, nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i       !<
+       INTEGER(iwp) ::  il      !<
+       INTEGER(iwp) ::  ir      !<
+       INTEGER(iwp) ::  j       !<
+       INTEGER(iwp) ::  jn      !<
+       INTEGER(iwp) ::  js      !<
+       INTEGER(iwp) ::  k       !<
+       INTEGER(iwp) ::  nwords  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f2    !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f2_l  !<
+
+       REAL(wp), DIMENSION(nzb:mg_loc_ind(5,myid)+1,                           &
+                           mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1,          &
+                           mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) ::  f2_sub  !<
+
+
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(34), 'mg_gather', 'start' )
+
+       f2_l = 0.0_wp
+
+!
+!--    Store the local subdomain array on the total array
+       js = mg_loc_ind(3,myid)
+       IF ( south_border_pe )  js = js - 1
+       jn = mg_loc_ind(4,myid)
+       IF ( north_border_pe )  jn = jn + 1
+       il = mg_loc_ind(1,myid)
+       IF ( left_border_pe )   il = il - 1
+       ir = mg_loc_ind(2,myid)
+       IF ( right_border_pe )  ir = ir + 1
+       DO  i = il, ir
+          DO  j = js, jn
+             DO  k = nzb, nzt_mg(grid_level)+1
+                f2_l(k,j,i) = f2_sub(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Find out the number of array elements of the total array
+       nwords = SIZE( f2 )
+
+!
+!--    Gather subdomain data from all PEs
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( f2_l(nzb,nys_mg(grid_level)-1,nxl_mg(grid_level)-1), &
+                           f2(nzb,nys_mg(grid_level)-1,nxl_mg(grid_level)-1),   &
+                           nwords, MPI_REAL, MPI_SUM, comm2d, ierr )
+
+       CALL cpu_log( log_point_s(34), 'mg_gather', 'stop' )
+#endif
+    
+    END SUBROUTINE mg_gather
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo It might be possible to improve the speed of this routine by using
+!>       non-blocking communication
+!------------------------------------------------------------------------------!
+    SUBROUTINE mg_scatter( p2, p2_sub )
+
+       USE control_parameters,                                                 &
+           ONLY:  grid_level
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+           ONLY:  mg_loc_ind, nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nwords  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1) ::  p2  !<
+
+       REAL(wp), DIMENSION(nzb:mg_loc_ind(5,myid)+1,                           &
+                           mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1,          &
+                           mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) ::  p2_sub  !<
+
+!
+!--    Find out the number of array elements of the subdomain array
+       nwords = SIZE( p2_sub )
+
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(35), 'mg_scatter', 'start' )
+
+       p2_sub = p2(:,mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1, &
+                     mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1)
+
+       CALL cpu_log( log_point_s(35), 'mg_scatter', 'stop' )
+#endif
+    
+    END SUBROUTINE mg_scatter
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This is where the multigrid technique takes place. V- and W- Cycle are
+!> implemented and steered by the parameter "gamma". Parameter "nue" determines
+!> the convergence of the multigrid iterative solution. There are nue times
+!> RB-GS iterations. It should be set to "1" or "2", considering the time effort
+!> one would like to invest. Last choice shows a very good converging factor,
+!> but leads to an increase in computing time.
+!------------------------------------------------------------------------------!
+    RECURSIVE SUBROUTINE next_mg_level( f_mg, p_mg, p3, r )
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_dirrad, bc_lr_raddir, bc_ns_dirrad, bc_ns_raddir,      &
+                  child_domain, gamma_mg, grid_level_count, maximum_grid_level,&
+                  mg_switch_to_pe0_level, mg_switch_to_pe0, ngsrb
+
+       USE indices,                                                            &
+           ONLY:  mg_loc_ind, nxl, nxl_mg, nxr, nxr_mg, nys, nys_mg, nyn,      &
+                  nyn_mg, nzb, nzt, nzt_mg
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i            !< index variable along x
+       INTEGER(iwp) ::  j            !< index variable along y
+       INTEGER(iwp) ::  k            !< index variable along z
+       INTEGER(iwp) ::  nxl_mg_save  !<
+       INTEGER(iwp) ::  nxr_mg_save  !<
+       INTEGER(iwp) ::  nyn_mg_save  !<
+       INTEGER(iwp) ::  nys_mg_save  !<
+       INTEGER(iwp) ::  nzt_mg_save  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: f_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: p_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: p3    !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: r     !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1) ::  f2  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1) ::  p2  !<
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  f2_sub  !<
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p2_sub  !<
+
+!
+!--    Restriction to the coarsest grid
+    10 IF ( grid_level == 1 )  THEN
+
+!
+!--       Solution on the coarsest grid. Double the number of Gauss-Seidel
+!--       iterations in order to get a more accurate solution.
+          ngsrb = 2 * ngsrb
+
+          ind_even_odd = even_odd_level(grid_level)
+
+          CALL redblack( f_mg, p_mg )
+
+          ngsrb = ngsrb / 2
+
+
+       ELSEIF ( grid_level /= 1 )  THEN
+
+          grid_level_count(grid_level) = grid_level_count(grid_level) + 1
+
+!
+!--       Solution on the actual grid level
+          ind_even_odd = even_odd_level(grid_level)
+
+          CALL redblack( f_mg, p_mg )
+
+!
+!--       Determination of the actual residual
+          CALL resid( f_mg, p_mg, r )
+
+!--       Restriction of the residual (finer grid values!) to the next coarser
+!--       grid. Therefore, the grid level has to be decremented now. nxl..nzt have
+!--       to be set to the coarse grid values, because these variables are needed
+!--       for the exchange of ghost points in routine exchange_horiz
+          grid_level = grid_level - 1
+
+          nxl = nxl_mg(grid_level)
+          nys = nys_mg(grid_level)
+          nxr = nxr_mg(grid_level)
+          nyn = nyn_mg(grid_level)
+          nzt = nzt_mg(grid_level)
+
+          IF ( grid_level == mg_switch_to_pe0_level )  THEN
+
+!
+!--          From this level on, calculations are done on PE0 only.
+!--          First, carry out restriction on the subdomain.
+!--          Therefore, indices of the level have to be changed to subdomain
+!--          values in between (otherwise, the restrict routine would expect
+!--          the gathered array)
+
+             nxl_mg_save = nxl_mg(grid_level)
+             nxr_mg_save = nxr_mg(grid_level)
+             nys_mg_save = nys_mg(grid_level)
+             nyn_mg_save = nyn_mg(grid_level)
+             nzt_mg_save = nzt_mg(grid_level)
+             nxl_mg(grid_level) = mg_loc_ind(1,myid)
+             nxr_mg(grid_level) = mg_loc_ind(2,myid)
+             nys_mg(grid_level) = mg_loc_ind(3,myid)
+             nyn_mg(grid_level) = mg_loc_ind(4,myid)
+             nzt_mg(grid_level) = mg_loc_ind(5,myid)
+             nxl = mg_loc_ind(1,myid)
+             nxr = mg_loc_ind(2,myid)
+             nys = mg_loc_ind(3,myid)
+             nyn = mg_loc_ind(4,myid)
+             nzt = mg_loc_ind(5,myid)
+
+             ALLOCATE( f2_sub(nzb:nzt_mg(grid_level)+1,                    &
+                              nys_mg(grid_level)-1:nyn_mg(grid_level)+1,   &
+                              nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) )
+
+             CALL restrict( f2_sub, r )
+
+!
+!--          Restore the correct indices of this level
+             nxl_mg(grid_level) = nxl_mg_save
+             nxr_mg(grid_level) = nxr_mg_save
+             nys_mg(grid_level) = nys_mg_save
+             nyn_mg(grid_level) = nyn_mg_save
+             nzt_mg(grid_level) = nzt_mg_save
+             nxl = nxl_mg(grid_level)
+             nxr = nxr_mg(grid_level)
+             nys = nys_mg(grid_level)
+             nyn = nyn_mg(grid_level)
+             nzt = nzt_mg(grid_level)
+!
+!--          Gather all arrays from the subdomains on PE0
+             CALL mg_gather( f2, f2_sub )
+
+!
+!--          Set switch for routine exchange_horiz, that no ghostpoint exchange
+!--          has to be carried out from now on
+             mg_switch_to_pe0 = .TRUE.
+
+!
+!--          In case of non-cyclic lateral boundary conditions, both in- and
+!--          outflow conditions have to be used on all PEs after the switch,
+!--          because then they have the total domain.
+             IF ( bc_lr_dirrad )  THEN
+                bc_dirichlet_l  = .TRUE.
+                bc_dirichlet_r  = .FALSE.
+                bc_radiation_l = .FALSE.
+                bc_radiation_r = .TRUE.
+             ELSEIF ( bc_lr_raddir )  THEN
+                bc_dirichlet_l  = .FALSE.
+                bc_dirichlet_r  = .TRUE.
+                bc_radiation_l = .TRUE.
+                bc_radiation_r = .FALSE.
+             ELSEIF ( child_domain  .OR.  nesting_offline )  THEN
+                bc_dirichlet_l = .TRUE.
+                bc_dirichlet_r = .TRUE.
+             ENDIF
+
+             IF ( bc_ns_dirrad )  THEN
+                bc_dirichlet_n  = .TRUE.
+                bc_dirichlet_s  = .FALSE.
+                bc_radiation_n = .FALSE.
+                bc_radiation_s = .TRUE.
+             ELSEIF ( bc_ns_raddir )  THEN
+                bc_dirichlet_n  = .FALSE.
+                bc_dirichlet_s  = .TRUE.
+                bc_radiation_n = .TRUE.
+                bc_radiation_s = .FALSE.
+             ELSEIF ( child_domain  .OR.  nesting_offline)  THEN
+                bc_dirichlet_s = .TRUE.
+                bc_dirichlet_n = .TRUE.
+             ENDIF
+
+             DEALLOCATE( f2_sub )
+
+          ELSE
+
+             CALL restrict( f2, r )
+
+             ind_even_odd = even_odd_level(grid_level)  ! must be after restrict
+
+          ENDIF
+
+          p2 = 0.0_wp
+
+!
+!--       Repeat the same procedure till the coarsest grid is reached
+          CALL next_mg_level( f2, p2, p3, r )
+
+       ENDIF
+
+!
+!--    Now follows the prolongation
+       IF ( grid_level >= 2 )  THEN
+
+!
+!--       Prolongation of the new residual. The values are transferred
+!--       from the coarse to the next finer grid.
+          IF ( grid_level == mg_switch_to_pe0_level+1 )  THEN
+
+#if defined( __parallel )
+!
+!--          At this level, the new residual first has to be scattered from
+!--          PE0 to the other PEs
+             ALLOCATE( p2_sub(nzb:mg_loc_ind(5,myid)+1,             &
+                       mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1,   &
+                       mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) )
+
+             CALL mg_scatter( p2, p2_sub )
+
+!
+!--          Therefore, indices of the previous level have to be changed to
+!--          subdomain values in between (otherwise, the prolong routine would
+!--          expect the gathered array)
+             nxl_mg_save = nxl_mg(grid_level-1)
+             nxr_mg_save = nxr_mg(grid_level-1)
+             nys_mg_save = nys_mg(grid_level-1)
+             nyn_mg_save = nyn_mg(grid_level-1)
+             nzt_mg_save = nzt_mg(grid_level-1)
+             nxl_mg(grid_level-1) = mg_loc_ind(1,myid)
+             nxr_mg(grid_level-1) = mg_loc_ind(2,myid)
+             nys_mg(grid_level-1) = mg_loc_ind(3,myid)
+             nyn_mg(grid_level-1) = mg_loc_ind(4,myid)
+             nzt_mg(grid_level-1) = mg_loc_ind(5,myid)
+
+!
+!--          Set switch for routine exchange_horiz, that ghostpoint exchange
+!--          has to be carried again out from now on
+             mg_switch_to_pe0 = .FALSE.
+
+!
+!--          For non-cyclic lateral boundary conditions and in case of nesting, 
+!--          restore the in-/outflow conditions. 
+             bc_dirichlet_l = .FALSE.;  bc_dirichlet_r = .FALSE.
+             bc_dirichlet_n = .FALSE.;  bc_dirichlet_s = .FALSE.
+             bc_radiation_l = .FALSE.;  bc_radiation_r = .FALSE.
+             bc_radiation_n = .FALSE.;  bc_radiation_s = .FALSE.
+
+             IF ( pleft == MPI_PROC_NULL )  THEN
+                IF ( bc_lr_dirrad  .OR.  child_domain  .OR.  nesting_offline ) &
+                THEN
+                   bc_dirichlet_l = .TRUE.
+                ELSEIF ( bc_lr_raddir )  THEN
+                   bc_radiation_l = .TRUE.
+                ENDIF
+             ENDIF
+
+             IF ( pright == MPI_PROC_NULL )  THEN
+                IF ( bc_lr_dirrad )  THEN
+                   bc_radiation_r = .TRUE.
+                ELSEIF ( bc_lr_raddir  .OR.  child_domain  .OR.                &
+                         nesting_offline )  THEN
+                   bc_dirichlet_r = .TRUE.
+                ENDIF
+             ENDIF
+
+             IF ( psouth == MPI_PROC_NULL )  THEN
+                IF ( bc_ns_dirrad )  THEN
+                   bc_radiation_s = .TRUE.
+                ELSEIF ( bc_ns_raddir  .OR.  child_domain  .OR.                &
+                         nesting_offline )  THEN
+                   bc_dirichlet_s = .TRUE.
+                ENDIF
+             ENDIF
+
+             IF ( pnorth == MPI_PROC_NULL )  THEN
+                IF ( bc_ns_dirrad  .OR.  child_domain  .OR.  nesting_offline ) &
+                THEN
+                   bc_dirichlet_n = .TRUE.
+                ELSEIF ( bc_ns_raddir )  THEN
+                   bc_radiation_n = .TRUE.
+                ENDIF
+             ENDIF
+
+             CALL prolong( p2_sub, p3 )
+
+!
+!--          Restore the correct indices of the previous level
+             nxl_mg(grid_level-1) = nxl_mg_save
+             nxr_mg(grid_level-1) = nxr_mg_save
+             nys_mg(grid_level-1) = nys_mg_save
+             nyn_mg(grid_level-1) = nyn_mg_save
+             nzt_mg(grid_level-1) = nzt_mg_save
+
+             DEALLOCATE( p2_sub )
+#endif
+
+          ELSE
+
+             CALL prolong( p2, p3 )
+
+          ENDIF
+
+!
+!--       Computation of the new pressure correction. Therefore,
+!--       values from prior grids are added up automatically stage by stage.
+          DO  i = nxl_mg(grid_level)-1, nxr_mg(grid_level)+1
+             DO  j = nys_mg(grid_level)-1, nyn_mg(grid_level)+1
+                DO  k = nzb, nzt_mg(grid_level)+1
+                   p_mg(k,j,i) = p_mg(k,j,i) + p3(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Relaxation of the new solution
+          CALL redblack( f_mg, p_mg )
+
+       ENDIF
+
+
+!
+!--    The following few lines serve the steering of the multigrid scheme
+       IF ( grid_level == maximum_grid_level )  THEN
+
+          GOTO 20
+
+       ELSEIF ( grid_level /= maximum_grid_level  .AND.  grid_level /= 1  .AND. &
+                grid_level_count(grid_level) /= gamma_mg )  THEN
+
+          GOTO 10
+
+       ENDIF
+
+!
+!--    Reset counter for the next call of poismg
+       grid_level_count(grid_level) = 0
+
+!
+!--    Continue with the next finer level. nxl..nzt have to be
+!--    set to the finer grid values, because these variables are needed for the
+!--    exchange of ghost points in routine exchange_horiz
+       grid_level = grid_level + 1
+       ind_even_odd = even_odd_level(grid_level)
+
+       nxl = nxl_mg(grid_level)
+       nxr = nxr_mg(grid_level)
+       nys = nys_mg(grid_level)
+       nyn = nyn_mg(grid_level)
+       nzt = nzt_mg(grid_level)
+
+    20 CONTINUE
+
+    END SUBROUTINE next_mg_level
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initial settings for sorting k-dimension from sequential order (alternate
+!> even/odd) into blocks of even and odd or vice versa
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_even_odd_blocks
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  f1_mg, f2_mg, f3_mg
+
+       USE control_parameters,                                                 &
+           ONLY:  grid_level, maximum_grid_level
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, nzt_mg
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt_mg
+
+       IMPLICIT NONE
+!
+!--    Local variables
+       INTEGER(iwp) ::  i     !<  
+       INTEGER(iwp) ::  l     !<
+
+       LOGICAL, SAVE ::  lfirst = .TRUE.
+
+
+       IF ( .NOT. lfirst )  RETURN
+
+       ALLOCATE( even_odd_level(maximum_grid_level) )
+
+       ALLOCATE( f1_mg_b(nzb:nzt+1,maximum_grid_level),                        &
+                 f2_mg_b(nzb:nzt+1,maximum_grid_level),                        &
+                 f3_mg_b(nzb:nzt+1,maximum_grid_level) )
+
+!
+!--    Set border index between the even and odd block
+       DO  i = maximum_grid_level, 1, -1
+          even_odd_level(i) = nzt_mg(i) / 2
+       ENDDO
+
+!
+!--    Sort grid coefficients used in red/black scheme and for calculating the
+!--    residual to block (even/odd) structure
+       DO  l = maximum_grid_level, 1 , -1
+          CALL sort_k_to_even_odd_blocks( f1_mg(nzb+1:nzt_mg(grid_level),l),   &
+                                          f1_mg_b(nzb:nzt_mg(grid_level)+1,l), &
+                                          l )
+          CALL sort_k_to_even_odd_blocks( f2_mg(nzb+1:nzt_mg(grid_level),l),   &
+                                          f2_mg_b(nzb:nzt_mg(grid_level)+1,l), &
+                                          l )
+          CALL sort_k_to_even_odd_blocks( f3_mg(nzb+1:nzt_mg(grid_level),l),   &
+                                          f3_mg_b(nzb:nzt_mg(grid_level)+1,l), &
+                                          l )
+       ENDDO
+
+       lfirst = .FALSE.
+
+     END SUBROUTINE init_even_odd_blocks
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Special exchange_horiz subroutine for use in redblack. Transfers only
+!> "red" or "black" data points.
+!------------------------------------------------------------------------------!
+     SUBROUTINE special_exchange_horiz( p_mg, color )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  grid_level, mg_switch_to_pe0_level, synchronous_exchange
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxl_mg, nxr, nxr_mg, nys, nys_mg, nyn,      &
+                  nyn_mg, nzb, nzt, nzt_mg
+
+       IMPLICIT NONE
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::       &
+                                    p_mg   !< treated array
+
+       INTEGER(iwp), intent(IN) ::  color  !< flag for grid point type (red or black)
+!
+!--    Local variables
+       INTEGER(iwp) ::  i        !< index variable along x
+       INTEGER(iwp) ::  i1       !< index variable along x on coarse level 
+       INTEGER(iwp) ::  i2       !< index variable along x on coarse level 
+
+       INTEGER(iwp) ::  j        !< index variable along y
+       INTEGER(iwp) ::  j1       !< index variable along y on coarse level 
+       INTEGER(iwp) ::  j2       !< index variable along y on coarse level 
+       INTEGER(iwp) ::  k        !< index variable along z
+       INTEGER(iwp) ::  l        !< short for grid level
+       INTEGER(iwp) ::  jys      !< index for lower local PE boundary along y
+       INTEGER(iwp) ::  jyn      !< index for upper local PE boundary along y
+       INTEGER(iwp) ::  ixl      !< index for lower local PE boundary along x
+       INTEGER(iwp) ::  ixr      !< index for upper local PE boundary along x 
+
+       LOGICAL      ::  synchronous_exchange_save    !< dummy to reset synchronous_exchange to prescribed value
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  temp  !< temporary array on next coarser grid level
+
+#if defined ( __parallel )
+       synchronous_exchange_save   = synchronous_exchange
+       synchronous_exchange        = .FALSE.
+
+       l = grid_level
+
+       ind_even_odd = even_odd_level(grid_level)
+
+!
+!--    Restricted transfer only on finer levels with enough data.
+!--    Restricted transfer is not possible for levels smaller or equal to 
+!--    'switch to PE0 levels', since array bounds does not fit. Moreover, 
+!--    it is not possible for the coarsest grid level, since the dimensions
+!--    of temp are not defined. For such cases, normal exchange_horiz is called.
+       IF ( l > 1 .AND. l > mg_switch_to_pe0_level + 1 .AND.                   &
+            ( ngp_xz(grid_level) >= 900 .OR. ngp_yz(grid_level) >= 900 ) )  THEN
+
+          jys = nys_mg(grid_level-1)
+          jyn = nyn_mg(grid_level-1)
+          ixl = nxl_mg(grid_level-1)
+          ixr = nxr_mg(grid_level-1)
+          ALLOCATE( temp(nzb:nzt_mg(l-1)+1,jys-1:jyn+1,ixl-1:ixr+1) )
+!
+!--       Handling the even k Values
+!--       Collecting data for the north - south exchange
+!--       Since only every second value has to be transfered, data are stored
+!--       on the next coarser grid level, because the arrays on that level
+!--       have just the required size
+          i1 = nxl_mg(grid_level-1)
+          i2 = nxl_mg(grid_level-1)
+
+          DO  i = nxl_mg(l), nxr_mg(l), 2
+             DO  j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,jys,i1) = p_mg(k,j,i)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,jyn,i2) = p_mg(k,j,i)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+             DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,jys,i1) = p_mg(k,j,i)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,jyn,i2) = p_mg(k,j,i)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          grid_level = grid_level-1
+
+          nxl = nxl_mg(grid_level)
+          nys = nys_mg(grid_level)
+          nxr = nxr_mg(grid_level)
+          nyn = nyn_mg(grid_level)
+          nzt = nzt_mg(grid_level)
+
+          send_receive = 'ns'
+          CALL exchange_horiz( temp, 1 )
+
+          grid_level = grid_level+1
+
+          i1 = nxl_mg(grid_level-1)
+          i2 = nxl_mg(grid_level-1)
+
+          DO  i = nxl_mg(l), nxr_mg(l), 2
+             DO  j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,nyn_mg(l)+1,i) = temp(k-ind_even_odd,jyn+1,i1)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,nys_mg(l)-1,i) = temp(k-ind_even_odd,jys-1,i2)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+             DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,nyn_mg(l)+1,i) = temp(k-ind_even_odd,jyn+1,i1)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,nys_mg(l)-1,i) = temp(k-ind_even_odd,jys-1,i2)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+!
+!--       Collecting data for the left - right exchange
+!--       Since only every second value has to be transfered, data are stored
+!--       on the next coarser grid level, because the arrays on that level
+!--       have just the required size
+          j1 = nys_mg(grid_level-1)
+          j2 = nys_mg(grid_level-1)
+
+          DO j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+             DO  i = nxl_mg(l), nxr_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,j1,ixl) = p_mg(k,j,i)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,j2,ixr) = p_mg(k,j,i)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO j = nys_mg(l) + (color-1), nyn_mg(l), 2
+             DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,j1,ixl) = p_mg(k,j,i)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      temp(k-ind_even_odd,j2,ixr) = p_mg(k,j,i)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          grid_level = grid_level-1
+          send_receive = 'lr'
+
+          CALL exchange_horiz( temp, 1 )
+
+          grid_level = grid_level+1
+
+          j1 = nys_mg(grid_level-1)
+          j2 = nys_mg(grid_level-1)
+
+          DO j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+             DO  i = nxl_mg(l), nxr_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,j,nxr_mg(l)+1)  = temp(k-ind_even_odd,j1,ixr+1)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,j,nxl_mg(l)-1)  = temp(k-ind_even_odd,j2,ixl-1)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO j = nys_mg(l) + (color-1), nyn_mg(l), 2
+             DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,j,nxr_mg(l)+1)  = temp(k-ind_even_odd,j1,ixr+1)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = ind_even_odd+1, nzt_mg(l)
+                      p_mg(k,j,nxl_mg(l)-1)  = temp(k-ind_even_odd,j2,ixl-1)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+!
+!--       Now handling the even k values
+!--       Collecting data for the north - south exchange
+!--       Since only every second value has to be transfered, data are stored
+!--       on the next coarser grid level, because the arrays on that level
+!--       have just the required size
+          i1 = nxl_mg(grid_level-1)
+          i2 = nxl_mg(grid_level-1)
+
+          DO  i = nxl_mg(l), nxr_mg(l), 2
+             DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,jys,i1) = p_mg(k,j,i)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,jyn,i2) = p_mg(k,j,i)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+             DO j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,jys,i1) = p_mg(k,j,i)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,jyn,i2) = p_mg(k,j,i)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          grid_level = grid_level-1
+
+          send_receive = 'ns'
+          CALL exchange_horiz( temp, 1 )
+
+          grid_level = grid_level+1
+
+          i1 = nxl_mg(grid_level-1)
+          i2 = nxl_mg(grid_level-1)
+
+          DO  i = nxl_mg(l), nxr_mg(l), 2
+             DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,nyn_mg(l)+1,i) = temp(k,jyn+1,i1)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,nys_mg(l)-1,i) = temp(k,jys-1,i2)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+             DO j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+
+                IF ( j == nys_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,nyn_mg(l)+1,i) = temp(k,jyn+1,i1)
+                   ENDDO
+                   i1 = i1 + 1
+
+                ENDIF
+
+                IF ( j == nyn_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,nys_mg(l)-1,i) = temp(k,jys-1,i2)
+                   ENDDO
+                   i2 = i2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          j1 = nys_mg(grid_level-1)
+          j2 = nys_mg(grid_level-1)
+
+          DO  i = nxl_mg(l), nxr_mg(l), 2
+             DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,j1,ixl) = p_mg(k,j,i)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,j2,ixr) = p_mg(k,j,i)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+             DO j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,j1,ixl) = p_mg(k,j,i)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      temp(k,j2,ixr) = p_mg(k,j,i)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          grid_level = grid_level-1
+
+          send_receive = 'lr'
+          CALL exchange_horiz( temp, 1 )
+
+          grid_level = grid_level+1
+
+          nxl = nxl_mg(grid_level)
+          nys = nys_mg(grid_level)
+          nxr = nxr_mg(grid_level)
+          nyn = nyn_mg(grid_level)
+          nzt = nzt_mg(grid_level)
+
+          j1 = nys_mg(grid_level-1)
+          j2 = nys_mg(grid_level-1)
+
+          DO  i = nxl_mg(l), nxr_mg(l), 2
+             DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,j,nxr_mg(l)+1)  = temp(k,j1,ixr+1)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,j,nxl_mg(l)-1)  = temp(k,j2,ixl-1)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+             DO j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+
+                IF ( i == nxl_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,j,nxr_mg(l)+1)  = temp(k,j1,ixr+1)
+                   ENDDO
+                   j1 = j1 + 1
+
+                ENDIF
+
+                IF ( i == nxr_mg(l) )  THEN
+                   !DIR$ IVDEP
+                   DO  k = nzb+1, ind_even_odd
+                      p_mg(k,j,nxl_mg(l)-1)  = temp(k,j2,ixl-1)
+                   ENDDO
+                   j2 = j2 + 1
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+          DEALLOCATE( temp )
+
+       ELSE
+
+!
+!--       Standard horizontal ghost boundary exchange for small coarse grid
+!--       levels, where the transfer time is latency bound
+          CALL exchange_horiz( p_mg, 1 )
+
+       ENDIF
+
+!
+!--    Reset values to default PALM setup
+       synchronous_exchange   = synchronous_exchange_save
+       send_receive = 'al'
+#else
+
+!
+!--    Standard horizontal ghost boundary exchange for small coarse grid
+!--    levels, where the transfer time is latency bound
+       CALL exchange_horiz( p_mg, 1 )
+#endif
+
+    END SUBROUTINE special_exchange_horiz
+
+ END MODULE poismg_mod
Index: /palm/tags/release-6.0/SOURCE/poismg_noopt_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/poismg_noopt_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/poismg_noopt_mod.f90	(revision 3477)
@@ -0,0 +1,1955 @@
+!> @file poismg_noopt_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables in mesoscale-offline nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Set lateral boundary conditions for divergence
+! 
+! 2793 2018-02-07 10:54:33Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Rename file into poismg_noopt_mod
+! - Modularize poismg_noopt - initialization of masking flags moved from 
+!   init_grid
+! - Masking of downward-facing walls walls 
+! - Large-scale forcing implemented (MS) 
+! 
+! 2591 2017-10-30 08:07:25Z maronga
+! 
+! 2586 2017-10-27 13:03:50Z kanani
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Bugfixes OpenMP
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2021 2016-10-07 14:08:57Z suehring
+! Bugfix: restore nest_bound_(l/r/s/n) in case of mg_switch_to_pe0
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1934 2016-06-13 09:46:57Z hellstea
+! Rename subroutines and cpu-measure log points to indicate _noopt version
+! 
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1159 2013-05-21 11:58:22Z fricke
+! bc_lr/ns_dirneu/neudir removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1056 2012-11-16 15:28:04Z raasch
+! Bugfix: all ghost points have to be used for allocating p3
+! arrays p2, f2, and f2_l changed from allocatable to automatic
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 996 2012-09-07 10:41:47Z raasch
+! little reformatting
+!
+! 978 2012-08-09 08:28:32Z fricke
+! bc_lr/ns_dirneu/neudir added
+!
+! 880 2012-04-13 06:28:59Z raasch
+! Bugfix: preprocessor statements for parallel execution added
+!
+! 778 2011-11-07 14:18:25Z fricke
+! Allocation of p3 changes when multigrid is used and the collected field on PE0
+! has more grid points than the subdomain of an PE.
+!
+! 707 2011-03-29 11:39:40Z raasch
+! p_loc is used instead of p in the main routine (poismg).
+! On coarse grid levels, gathered data are identically processed on all PEs
+! (before, on PE0 only), so that the subsequent scattering of data is not
+! neccessary any more.
+! bc_lr/ns replaced by bc_lr/ns_cyc/dirrad/raddir
+! Bugfix: bottom (nzb) and top (nzt+1) boundary conditions set in routines
+! resid and restrict. They were missed before which may have led to
+! unpredictable results.
+!
+! 667 2010-12-23 12:06:00Z suehring/gryschka
+! Calls of exchange_horiz are modified.
+!
+! 622 2010-12-10 08:08:13Z raasch
+! optional barriers included in order to speed up collective operations
+!
+! 257 2009-03-11 15:17:42Z heinze
+! Output of messages replaced by message handling routine.
+!
+! 181 2008-07-30 07:07:47Z raasch
+! Bugfix: grid_level+1 has to be used in restrict for flags-array
+!
+! 114 2007-10-10 00:03:15Z raasch
+! Boundary conditions at walls are implicitly set using flag arrays. Only
+! Neumann BC is allowed. Upper walls are still not realized.
+! Bottom and top BCs for array f_mg in restrict removed because boundary
+! values are not needed (right hand side of SOR iteration).
+!
+! 75 2007-03-22 09:54:05Z raasch
+! 2nd+3rd argument removed from exchange horiz
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.6  2005/03/26 20:55:54  raasch
+! Implementation of non-cyclic (Neumann) horizontal boundary conditions,
+! routine prolong simplified (one call of exchange_horiz spared)
+!
+! Revision 1.1  2001/07/20 13:10:51  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Solves the Poisson equation for the perturbation pressure with a multigrid
+!> V- or W-Cycle scheme.
+!>
+!> This multigrid method was originally developed for PALM by Joerg Uhlenbrock,
+!> September 2000 - July 2001.
+!> 
+!> @attention Loop unrolling and cache optimization in SOR-Red/Black method
+!>            still does not give the expected speedup! 
+!>
+!> @todo Further work required.
+!> @todo Formatting adjustments required (indention after modularization) 
+!------------------------------------------------------------------------------!
+ MODULE poismg_noopt_mod
+ 
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
+               bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
+               bc_radiation_s, child_domain, grid_level, nesting_offline
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE kinds
+
+    USE pegrid
+
+    PRIVATE
+
+    INTERFACE poismg_noopt
+       MODULE PROCEDURE poismg_noopt
+    END INTERFACE poismg_noopt
+
+    INTERFACE poismg_noopt_init
+       MODULE PROCEDURE poismg_noopt_init
+    END INTERFACE poismg_noopt_init
+
+    PUBLIC poismg_noopt, poismg_noopt_init
+
+ CONTAINS
+
+    SUBROUTINE poismg_noopt( r )
+    
+
+       USE arrays_3d,                                                          &
+           ONLY:  d, p_loc
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, gathered_size, grid_level_count,       &
+                  ibc_p_t, maximum_grid_level, message_string, mgcycles,       &
+                  mg_cycles, mg_switch_to_pe0_level, residual_limit,           &
+                  subdomain_size
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, gathered_size, grid_level,             &
+                  grid_level_count, ibc_p_t,                                   &
+                  maximum_grid_level, message_string, mgcycles, mg_cycles,     &
+                  mg_switch_to_pe0_level, residual_limit, subdomain_size
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxl_mg, nxr, nxrg, nxr_mg, nys, nysg, nys_mg, nyn,&
+                  nyng, nyn_mg, nzb, nzt, nzt_mg
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  maxerror          !<
+       REAL(wp) ::  maximum_mgcycles  !<
+       REAL(wp) ::  residual_norm     !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ::  r  !<
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p3  !<
+
+
+       CALL cpu_log( log_point_s(29), 'poismg_noopt', 'start' )
+!
+!--    Initialize arrays and variables used in this subroutine
+
+!--    If the number of grid points of the gathered grid, which is collected
+!--    on PE0, is larger than the number of grid points of an PE, than array
+!--    p3 will be enlarged.
+       IF ( gathered_size > subdomain_size )  THEN 
+          ALLOCATE( p3(nzb:nzt_mg(mg_switch_to_pe0_level)+1,nys_mg(               &
+                       mg_switch_to_pe0_level)-1:nyn_mg(mg_switch_to_pe0_level)+1,&
+                       nxl_mg(mg_switch_to_pe0_level)-1:nxr_mg(                   &
+                       mg_switch_to_pe0_level)+1) )
+       ELSE
+          ALLOCATE ( p3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ENDIF
+
+       p3 = 0.0_wp
+    
+!
+!--    Ghost boundaries have to be added to divergence array.
+!--    Exchange routine needs to know the grid level!
+       grid_level = maximum_grid_level
+       CALL exchange_horiz( d, 1)
+!
+!--    Set bottom and top boundary conditions
+       d(nzb,:,:) = d(nzb+1,:,:)
+       IF ( ibc_p_t == 1 )  d(nzt+1,:,: ) = d(nzt,:,:)
+!
+!--    Set lateral boundary conditions in non-cyclic case
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l   .OR.  bc_radiation_l )                         &
+             d(:,:,nxl-1) = d(:,:,nxl)
+          IF ( bc_dirichlet_r   .OR.  bc_radiation_r )                         &
+             d(:,:,nxr+1) = d(:,:,nxr)
+       ENDIF
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n   .OR.  bc_radiation_n )                         &
+             d(:,nyn+1,:) = d(:,nyn,:)
+          IF ( bc_dirichlet_s   .OR.  bc_radiation_s )                         &
+             d(:,nys-1,:) = d(:,nys,:)
+       ENDIF
+
+!
+!--    Initiation of the multigrid scheme. Does n cycles until the 
+!--    residual is smaller than the given limit. The accuracy of the solution 
+!--    of the poisson equation will increase with the number of cycles.
+!--    If the number of cycles is preset by the user, this number will be
+!--    carried out regardless of the accuracy.
+       grid_level_count =  0
+       mgcycles         =  0
+       IF ( mg_cycles == -1 )  THEN
+          maximum_mgcycles = 0
+          residual_norm    = 1.0_wp
+       ELSE
+          maximum_mgcycles = mg_cycles
+          residual_norm    = 0.0_wp
+       ENDIF
+
+       DO WHILE ( residual_norm > residual_limit  .OR. &
+                  mgcycles < maximum_mgcycles )
+    
+          CALL next_mg_level_noopt( d, p_loc, p3, r)
+
+!
+!--       Calculate the residual if the user has not preset the number of
+!--       cycles to be performed
+          IF ( maximum_mgcycles == 0 )  THEN
+             CALL resid_noopt( d, p_loc, r )
+             maxerror = SUM( r(nzb+1:nzt,nys:nyn,nxl:nxr)**2 )
+
+#if defined( __parallel )
+             IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+                CALL MPI_ALLREDUCE( maxerror, residual_norm, 1, MPI_REAL,      &
+                                    MPI_SUM, comm2d, ierr)
+#else
+                residual_norm = maxerror
+#endif
+             residual_norm = SQRT( residual_norm )
+          ENDIF
+
+          mgcycles = mgcycles + 1
+
+!
+!--       If the user has not limited the number of cycles, stop the run in case
+!--       of insufficient convergence
+          IF ( mgcycles > 1000  .AND.  mg_cycles == -1 )  THEN
+             message_string = 'no sufficient convergence within 1000 cycles'
+             CALL message( 'poismg_noopt', 'PA0283', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDDO
+
+       DEALLOCATE( p3 )
+
+!
+!--    Unset the grid level. Variable is used to determine the MPI datatypes for
+!--    ghost point exchange
+       grid_level = 0 
+
+       CALL cpu_log( log_point_s(29), 'poismg_noopt', 'stop' )
+
+    END SUBROUTINE poismg_noopt
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computes the residual of the perturbation pressure.
+!------------------------------------------------------------------------------!
+    SUBROUTINE resid_noopt( f_mg, p_mg, r )
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  f1_mg, f2_mg, f3_mg, rho_air_mg
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx2_mg, ddy2_mg
+
+       USE indices,                                                            &
+           ONLY:  flags, wall_flags_1, wall_flags_2, wall_flags_3, wall_flags_4,&
+                  wall_flags_5, wall_flags_6, wall_flags_7, wall_flags_8,      &
+                  wall_flags_9, wall_flags_10, nxl_mg, nxr_mg, nys_mg, nyn_mg, &
+                  nzb, nzt_mg
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i
+       INTEGER(iwp) ::  j
+       INTEGER(iwp) ::  k
+       INTEGER(iwp) ::  l
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  p_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  r     !<
+
+!
+!--    Calculate the residual
+       l = grid_level
+
+!
+!--    Choose flag array of this level
+       SELECT CASE ( l )
+          CASE ( 1 )
+             flags => wall_flags_1
+          CASE ( 2 )
+             flags => wall_flags_2
+          CASE ( 3 )
+             flags => wall_flags_3
+          CASE ( 4 )
+             flags => wall_flags_4
+          CASE ( 5 )
+             flags => wall_flags_5
+          CASE ( 6 )
+             flags => wall_flags_6
+          CASE ( 7 )
+             flags => wall_flags_7
+          CASE ( 8 )
+             flags => wall_flags_8
+          CASE ( 9 )
+             flags => wall_flags_9
+          CASE ( 10 )
+             flags => wall_flags_10
+       END SELECT
+
+!$OMP PARALLEL PRIVATE (i,j,k)
+!$OMP DO
+       DO  i = nxl_mg(l), nxr_mg(l)
+          DO  j = nys_mg(l), nyn_mg(l) 
+             DO  k = nzb+1, nzt_mg(l)
+                r(k,j,i) = f_mg(k,j,i)                                         &
+                           - rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           - rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           - f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           - f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           + f1_mg(k,l) * p_mg(k,j,i)
+!
+!--             Residual within topography should be zero
+                r(k,j,i) = r(k,j,i) * ( 1.0_wp - IBITS( flags(k,j,i), 6, 1 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP END PARALLEL
+
+!
+!--    Horizontal boundary conditions
+       CALL exchange_horiz( r, 1)
+
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+             r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l))
+          ENDIF
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+             r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l))
+          ENDIF
+       ENDIF
+
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+             r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:)
+          ENDIF
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+             r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:)
+          ENDIF
+       ENDIF
+
+!
+!--    Boundary conditions at bottom and top of the domain.
+!--    These points are not handled by the above loop. Points may be within
+!--    buildings, but that doesn't matter. 
+       IF ( ibc_p_b == 1 )  THEN
+          r(nzb,:,: ) = r(nzb+1,:,:)
+       ELSE
+          r(nzb,:,: ) = 0.0_wp
+       ENDIF
+
+       IF ( ibc_p_t == 1 )  THEN
+          r(nzt_mg(l)+1,:,: ) = r(nzt_mg(l),:,:)
+       ELSE
+          r(nzt_mg(l)+1,:,: ) = 0.0_wp
+       ENDIF
+
+
+    END SUBROUTINE resid_noopt
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interpolates the residual on the next coarser grid with "full weighting"
+!> scheme.
+!------------------------------------------------------------------------------!
+    SUBROUTINE restrict_noopt( f_mg, r )
+
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t
+
+       USE indices,                                                            &
+           ONLY:  flags, wall_flags_1, wall_flags_2, wall_flags_3, wall_flags_4,&
+                  wall_flags_5, wall_flags_6, wall_flags_7, wall_flags_8,      &
+                  wall_flags_9, wall_flags_10, nxl_mg, nxr_mg, nys_mg, nyn_mg, &
+                  nzb, nzt_mg
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i    !<
+       INTEGER(iwp) ::  ic   !<
+       INTEGER(iwp) ::  j    !<
+       INTEGER(iwp) ::  jc   !<
+       INTEGER(iwp) ::  k    !<
+       INTEGER(iwp) ::  kc   !<
+       INTEGER(iwp) ::  l    !<
+
+       REAL(wp) ::  rkjim    !<
+       REAL(wp) ::  rkjip    !<
+       REAL(wp) ::  rkjmi    !<
+       REAL(wp) ::  rkjmim   !<
+       REAL(wp) ::  rkjmip   !<
+       REAL(wp) ::  rkjpi    !<
+       REAL(wp) ::  rkjpim   !<
+       REAL(wp) ::  rkjpip   !<
+       REAL(wp) ::  rkmji    !<
+       REAL(wp) ::  rkmjim   !<
+       REAL(wp) ::  rkmjip   !<
+       REAL(wp) ::  rkmjmi   !<
+       REAL(wp) ::  rkmjmim  !<
+       REAL(wp) ::  rkmjmip  !<
+       REAL(wp) ::  rkmjpi   !<
+       REAL(wp) ::  rkmjpim  !<
+       REAL(wp) ::  rkmjpip  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f_mg  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level+1)+1,                         &
+                           nys_mg(grid_level+1)-1:nyn_mg(grid_level+1)+1,      &
+                           nxl_mg(grid_level+1)-1:nxr_mg(grid_level+1)+1) ::  r !<
+
+!
+!--    Interpolate the residual
+       l = grid_level
+
+!
+!--    Choose flag array of the upper level
+       SELECT CASE ( l+1 )
+          CASE ( 1 )
+             flags => wall_flags_1
+          CASE ( 2 )
+             flags => wall_flags_2
+          CASE ( 3 )
+             flags => wall_flags_3
+          CASE ( 4 )
+             flags => wall_flags_4
+          CASE ( 5 )
+             flags => wall_flags_5
+          CASE ( 6 )
+             flags => wall_flags_6
+          CASE ( 7 )
+             flags => wall_flags_7
+          CASE ( 8 )
+             flags => wall_flags_8
+          CASE ( 9 )
+             flags => wall_flags_9
+          CASE ( 10 )
+             flags => wall_flags_10
+       END SELECT
+       
+!$OMP PARALLEL PRIVATE (i,j,k,ic,jc,kc, rkjim,rkjip,rkjpi,rkjmi,rkjmim,rkjpim, &
+!$OMP rkjmip, rkjpip,rkmji,rkmjim,rkmjip,rkmjpi,rkmjmi,rkmjmim,rkmjpim,rkmjmip,&
+!$OMP rkmjpip          )
+!$OMP DO
+       DO  ic = nxl_mg(l), nxr_mg(l)    
+          i = 2*ic 
+          DO  jc = nys_mg(l), nyn_mg(l)  
+             j = 2*jc
+             DO  kc = nzb+1, nzt_mg(l)
+                k = 2*kc-1
+!
+!--             Use implicit Neumann BCs if the respective gridpoint is inside
+!--             the building
+                rkjim   = r(k,j,i-1)     + IBITS( flags(k,j,i-1), 6, 1 ) *     &
+                                           ( r(k,j,i) - r(k,j,i-1) )
+                rkjip   = r(k,j,i+1)     + IBITS( flags(k,j,i+1), 6, 1 ) *     &
+                                           ( r(k,j,i) - r(k,j,i+1) )
+                rkjpi   = r(k,j+1,i)     + IBITS( flags(k,j+1,i), 6, 1 ) *     &
+                                           ( r(k,j,i) - r(k,j+1,i) )
+                rkjmi   = r(k,j-1,i)     + IBITS( flags(k,j-1,i), 6, 1 ) *     &
+                                           ( r(k,j,i) - r(k,j-1,i) )
+                rkjmim  = r(k,j-1,i-1)   + IBITS( flags(k,j-1,i-1), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k,j-1,i-1) )
+                rkjpim  = r(k,j+1,i-1)   + IBITS( flags(k,j+1,i-1), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k,j+1,i-1) )
+                rkjmip  = r(k,j-1,i+1)   + IBITS( flags(k,j-1,i+1), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k,j-1,i+1) )
+                rkjpip  = r(k,j+1,i+1)   + IBITS( flags(k,j+1,i+1), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k,j+1,i+1) )
+                rkmji   = r(k-1,j,i)     + IBITS( flags(k-1,j,i), 6, 1 ) *     &
+                                           ( r(k,j,i) - r(k-1,j,i) )
+                rkmjim  = r(k-1,j,i-1)   + IBITS( flags(k-1,j,i-1), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k-1,j,i-1) )
+                rkmjip  = r(k-1,j,i+1)   + IBITS( flags(k-1,j,i+1), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k-1,j,i+1) )
+                rkmjpi  = r(k-1,j+1,i)   + IBITS( flags(k-1,j+1,i), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k-1,j+1,i) )
+                rkmjmi  = r(k-1,j-1,i)   + IBITS( flags(k-1,j-1,i), 6, 1 ) *   &
+                                           ( r(k,j,i) - r(k-1,j-1,i) )
+                rkmjmim = r(k-1,j-1,i-1) + IBITS( flags(k-1,j-1,i-1), 6, 1 ) * &
+                                           ( r(k,j,i) - r(k-1,j-1,i-1) )
+                rkmjpim = r(k-1,j+1,i-1) + IBITS( flags(k-1,j+1,i-1), 6, 1 ) * &
+                                           ( r(k,j,i) - r(k-1,j+1,i-1) )
+                rkmjmip = r(k-1,j-1,i+1) + IBITS( flags(k-1,j-1,i+1), 6, 1 ) * &
+                                           ( r(k,j,i) - r(k-1,j-1,i+1) )
+                rkmjpip = r(k-1,j+1,i+1) + IBITS( flags(k-1,j+1,i+1), 6, 1 ) * &
+                                           ( r(k,j,i) - r(k-1,j+1,i+1) )
+
+                f_mg(kc,jc,ic) = 1.0_wp / 64.0_wp * (                         &
+                                 8.0_wp * r(k,j,i)                            &
+                               + 4.0_wp * ( rkjim   + rkjip   +               &
+                                            rkjpi   + rkjmi   )               &
+                               + 2.0_wp * ( rkjmim  + rkjpim  +               &
+                                            rkjmip  + rkjpip  )               &
+                               + 4.0_wp * rkmji                               &
+                               + 2.0_wp * ( rkmjim  + rkmjim  +               &
+                                            rkmjpi  + rkmjmi  )               &
+                               +          ( rkmjmim + rkmjpim +               &
+                                            rkmjmip + rkmjpip )               &
+                               + 4.0_wp * r(k+1,j,i)                          &
+                               + 2.0_wp * ( r(k+1,j,i-1)   + r(k+1,j,i+1)   + &
+                                            r(k+1,j+1,i)   + r(k+1,j-1,i)   ) &
+                               +          ( r(k+1,j-1,i-1) + r(k+1,j+1,i-1) + &
+                                            r(k+1,j-1,i+1) + r(k+1,j+1,i+1) ) &
+                                                    )
+
+!             f_mg(kc,jc,ic) = 1.0_wp / 64.0_wp * (                         &
+!                              8.0_wp * r(k,j,i)                            &
+!                            + 4.0_wp * ( r(k,j,i-1)     + r(k,j,i+1)     + &
+!                                         r(k,j+1,i)     + r(k,j-1,i)     ) &
+!                            + 2.0_wp * ( r(k,j-1,i-1)   + r(k,j+1,i-1)   + &
+!                                         r(k,j-1,i+1)   + r(k,j+1,i+1)   ) &
+!                            + 4.0_wp * r(k-1,j,i)                          &
+!                            + 2.0_wp * ( r(k-1,j,i-1)   + r(k-1,j,i+1)   + &
+!                                         r(k-1,j+1,i)   + r(k-1,j-1,i)   ) &
+!                            +          ( r(k-1,j-1,i-1) + r(k-1,j+1,i-1) + &
+!                                         r(k-1,j-1,i+1) + r(k-1,j+1,i+1) ) &
+!                            + 4.0_wp * r(k+1,j,i)                          &
+!                            + 2.0_wp * ( r(k+1,j,i-1)   + r(k+1,j,i+1)   + &
+!                                         r(k+1,j+1,i)   + r(k+1,j-1,i)   ) &
+!                            +          ( r(k+1,j-1,i-1) + r(k+1,j+1,i-1) + &
+!                                         r(k+1,j-1,i+1) + r(k+1,j+1,i+1) ) &
+!                                                )
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP END PARALLEL
+
+!
+!--    Horizontal boundary conditions
+       CALL exchange_horiz( f_mg, 1)
+
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+             f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l))
+          ENDIF
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+             f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l))
+          ENDIF
+       ENDIF
+
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+             f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:)
+          ENDIF
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+             f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:)
+          ENDIF
+       ENDIF
+
+!
+!--    Boundary conditions at bottom and top of the domain.
+!--    These points are not handled by the above loop. Points may be within
+!--    buildings, but that doesn't matter. 
+       IF ( ibc_p_b == 1 )  THEN
+          f_mg(nzb,:,: ) = f_mg(nzb+1,:,:)
+       ELSE
+          f_mg(nzb,:,: ) = 0.0_wp
+       ENDIF
+
+       IF ( ibc_p_t == 1 )  THEN
+          f_mg(nzt_mg(l)+1,:,: ) = f_mg(nzt_mg(l),:,:)
+       ELSE
+          f_mg(nzt_mg(l)+1,:,: ) = 0.0_wp
+       ENDIF
+
+
+   END SUBROUTINE restrict_noopt
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Interpolates the correction of the perturbation pressure 
+!> to the next finer grid.
+!------------------------------------------------------------------------------!
+ SUBROUTINE prolong_noopt( p, temp )
+
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t
+    USE indices,                                                               &
+        ONLY:  nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  j  !<
+    INTEGER(iwp) ::  k  !<
+    INTEGER(iwp) ::  l  !<
+
+    REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                           &
+                        nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,        &
+                        nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1 ) ::  p  !<
+
+    REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                        nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                        nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  temp  !<
+
+
+!
+!-- First, store elements of the coarser grid on the next finer grid
+    l = grid_level
+
+!$OMP PARALLEL PRIVATE (i,j,k)
+!$OMP DO
+    DO  i = nxl_mg(l-1), nxr_mg(l-1)
+       DO  j = nys_mg(l-1), nyn_mg(l-1)
+!CDIR NODEP
+          DO  k = nzb+1, nzt_mg(l-1)
+!
+!--          Points of the coarse grid are directly stored on the next finer
+!--          grid
+             temp(2*k-1,2*j,2*i) = p(k,j,i) 
+! 
+!--          Points between two coarse-grid points
+             temp(2*k-1,2*j,2*i+1) = 0.5_wp * ( p(k,j,i) + p(k,j,i+1) )
+             temp(2*k-1,2*j+1,2*i) = 0.5_wp * ( p(k,j,i) + p(k,j+1,i) )
+             temp(2*k,2*j,2*i)     = 0.5_wp * ( p(k,j,i) + p(k+1,j,i) )
+!
+!--          Points in the center of the planes stretched by four points
+!--          of the coarse grid cube
+             temp(2*k-1,2*j+1,2*i+1) = 0.25_wp * ( p(k,j,i)   + p(k,j,i+1) + &
+                                                   p(k,j+1,i) + p(k,j+1,i+1) )
+             temp(2*k,2*j,2*i+1)     = 0.25_wp * ( p(k,j,i)   + p(k,j,i+1) + &
+                                                   p(k+1,j,i) + p(k+1,j,i+1) )
+             temp(2*k,2*j+1,2*i)     = 0.25_wp * ( p(k,j,i)   + p(k,j+1,i) + &
+                                                   p(k+1,j,i) + p(k+1,j+1,i) )
+!
+!--          Points in the middle of coarse grid cube
+             temp(2*k,2*j+1,2*i+1) = 0.125_wp * ( p(k,j,i)     + p(k,j,i+1)   + &
+                                                  p(k,j+1,i)   + p(k,j+1,i+1) + &
+                                                  p(k+1,j,i)   + p(k+1,j,i+1) + &
+                                                  p(k+1,j+1,i) + p(k+1,j+1,i+1) )
+          ENDDO
+       ENDDO
+    ENDDO
+!$OMP END PARALLEL 
+                          
+!
+!-- Horizontal boundary conditions
+    CALL exchange_horiz( temp, 1)
+
+    IF ( .NOT. bc_lr_cyc )  THEN
+       IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+          temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l))
+       ENDIF
+       IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+          temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l))
+       ENDIF
+    ENDIF
+
+    IF ( .NOT. bc_ns_cyc )  THEN
+       IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+          temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:)
+       ENDIF
+       IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+          temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:)
+       ENDIF
+    ENDIF
+
+!
+!-- Bottom and top boundary conditions
+    IF ( ibc_p_b == 1 )  THEN
+       temp(nzb,:,: ) = temp(nzb+1,:,:)
+    ELSE
+       temp(nzb,:,: ) = 0.0_wp
+    ENDIF
+
+    IF ( ibc_p_t == 1 )  THEN
+       temp(nzt_mg(l)+1,:,: ) = temp(nzt_mg(l),:,:)
+    ELSE
+       temp(nzt_mg(l)+1,:,: ) = 0.0_wp
+    ENDIF
+
+  
+ END SUBROUTINE prolong_noopt
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Relaxation method for the multigrid scheme. A Gauss-Seidel iteration with
+!> 3D-Red-Black decomposition (GS-RB) is used.
+!------------------------------------------------------------------------------!
+    SUBROUTINE redblack_noopt( f_mg, p_mg )
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  f1_mg, f2_mg, f3_mg, rho_air_mg
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t, ngsrb
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx2_mg, ddy2_mg
+
+       USE indices,                                                            &
+           ONLY:  flags, wall_flags_1, wall_flags_2, wall_flags_3, wall_flags_4,&
+                  wall_flags_5, wall_flags_6, wall_flags_7, wall_flags_8,      &
+                  wall_flags_9, wall_flags_10, nxl_mg, nxr_mg, nys_mg, nyn_mg, &
+                  nzb, nzt_mg
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: color    !<
+       INTEGER(iwp) :: i        !<
+       INTEGER(iwp) :: ic       !<
+       INTEGER(iwp) :: j        !<
+       INTEGER(iwp) :: jc       !<
+       INTEGER(iwp) :: jj       !<
+       INTEGER(iwp) :: k        !<
+       INTEGER(iwp) :: l        !<
+       INTEGER(iwp) :: n        !<
+
+       LOGICAL :: unroll        !<
+
+       REAL(wp) ::  wall_left   !<
+       REAL(wp) ::  wall_north  !<
+       REAL(wp) ::  wall_right  !<
+       REAL(wp) ::  wall_south  !<
+       REAL(wp) ::  wall_total  !<
+       REAL(wp) ::  wall_top    !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  p_mg  !<
+
+       l = grid_level
+
+!
+!--    Choose flag array of this level
+       SELECT CASE ( l )
+          CASE ( 1 )
+             flags => wall_flags_1
+          CASE ( 2 )
+             flags => wall_flags_2
+          CASE ( 3 )
+             flags => wall_flags_3
+          CASE ( 4 )
+             flags => wall_flags_4
+          CASE ( 5 )
+             flags => wall_flags_5
+          CASE ( 6 )
+             flags => wall_flags_6
+          CASE ( 7 )
+             flags => wall_flags_7
+          CASE ( 8 )
+             flags => wall_flags_8
+          CASE ( 9 )
+             flags => wall_flags_9
+          CASE ( 10 )
+             flags => wall_flags_10
+       END SELECT
+
+       unroll = ( MOD( nyn_mg(l)-nys_mg(l)+1, 4 ) == 0  .AND. &
+                  MOD( nxr_mg(l)-nxl_mg(l)+1, 2 ) == 0 )
+
+       DO  n = 1, ngsrb
+          
+          DO  color = 1, 2
+
+             IF ( .NOT. unroll )  THEN
+
+                CALL cpu_log( log_point_s(36), 'redblack_no_unroll_noopt', 'start' )
+
+!
+!--             Without unrolling of loops, no cache optimization
+                DO  i = nxl_mg(l), nxr_mg(l), 2
+                   DO  j = nys_mg(l) + 2 - color, nyn_mg(l), 2 
+                      DO  k = nzb+1, nzt_mg(l), 2
+!                      p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                    &
+!                                ddx2_mg(l) * ( p_mg(k,j,i+1) + p_mg(k,j,i-1) ) &
+!                              + ddy2_mg(l) * ( p_mg(k,j+1,i) + p_mg(k,j-1,i) ) &
+!                              + f2_mg(k,l) * p_mg(k+1,j,i)                     &
+!                              + f3_mg(k,l) * p_mg(k-1,j,i) - f_mg(k,j,i)       &
+!                                                       )
+
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                    )
+                      ENDDO
+                   ENDDO
+                ENDDO
+      
+                DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+                   DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+                      DO  k = nzb+1, nzt_mg(l), 2 
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                               rho_air_mg(k,l) * ddx2_mg(l) *                  &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                     )
+                      ENDDO
+                   ENDDO
+                ENDDO
+     
+                DO  i = nxl_mg(l), nxr_mg(l), 2
+                   DO  j = nys_mg(l) + (color-1), nyn_mg(l), 2
+                      DO  k = nzb+2, nzt_mg(l), 2
+                        p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                  &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                    )
+                      ENDDO
+                   ENDDO
+                ENDDO
+
+                DO  i = nxl_mg(l)+1, nxr_mg(l), 2
+                   DO  j = nys_mg(l) + 2 - color, nyn_mg(l), 2
+                      DO  k = nzb+2, nzt_mg(l), 2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                    )
+                      ENDDO
+                   ENDDO
+                ENDDO
+                CALL cpu_log( log_point_s(36), 'redblack_no_unroll_noopt', 'stop' )
+
+             ELSE
+
+!
+!--             Loop unrolling along y, only one i loop for better cache use
+                CALL cpu_log( log_point_s(38), 'redblack_unroll_noopt', 'start' )
+                DO  ic = nxl_mg(l), nxr_mg(l), 2
+                   DO  jc = nys_mg(l), nyn_mg(l), 4
+                      i  = ic
+                      jj = jc+2-color
+                      DO  k = nzb+1, nzt_mg(l), 2
+                         j = jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)               )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                     )
+                      ENDDO
+      
+                      i  = ic+1
+                      jj = jc+color-1
+                      DO  k = nzb+1, nzt_mg(l), 2 
+                         j =jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                     )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                &
+                            rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                              ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                            ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                            ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                          + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                              ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                            ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                            ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                          + f2_mg(k,l) *                                      &
+                              ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                            ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                          + f3_mg(k,l) *                                      &
+                              ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                            ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                          - f_mg(k,j,i)                    )
+                      ENDDO
+
+                      i  = ic
+                      jj = jc+color-1
+                      DO  k = nzb+2, nzt_mg(l), 2
+                         j =jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                    )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                     )
+                      ENDDO
+
+                      i  = ic+1
+                      jj = jc+2-color
+                      DO  k = nzb+2, nzt_mg(l), 2
+                         j =jj
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                     )
+                         j = jj+2
+                         p_mg(k,j,i) = 1.0_wp / f1_mg(k,l) * (                 &
+                             rho_air_mg(k,l) * ddx2_mg(l) *                    &
+                               ( p_mg(k,j,i+1) + IBITS( flags(k,j,i), 5, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i+1) ) + &
+                                 p_mg(k,j,i-1) + IBITS( flags(k,j,i), 4, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j,i-1) ) ) &
+                           + rho_air_mg(k,l) * ddy2_mg(l) *                    &
+                               ( p_mg(k,j+1,i) + IBITS( flags(k,j,i), 3, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j+1,i) ) + &
+                                 p_mg(k,j-1,i) + IBITS( flags(k,j,i), 2, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k,j-1,i) ) ) &
+                           + f2_mg(k,l) *                                      &
+                               ( p_mg(k+1,j,i) + IBITS( flags(k,j,i), 7, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k+1,j,i) ) ) &
+                           + f3_mg(k,l) *                                      &
+                               ( p_mg(k-1,j,i) + IBITS( flags(k,j,i), 0, 1 ) * &
+                                             ( p_mg(k,j,i) - p_mg(k-1,j,i) ) ) &
+                           - f_mg(k,j,i)                     )
+                      ENDDO
+
+                   ENDDO
+                ENDDO
+                CALL cpu_log( log_point_s(38), 'redblack_unroll_noopt', 'stop' )
+
+             ENDIF
+
+!
+!--          Horizontal boundary conditions
+             CALL exchange_horiz( p_mg, 1 )
+
+             IF ( .NOT. bc_lr_cyc )  THEN
+                IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+                   p_mg(:,:,nxl_mg(l)-1) = p_mg(:,:,nxl_mg(l))
+                ENDIF
+                IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+                   p_mg(:,:,nxr_mg(l)+1) = p_mg(:,:,nxr_mg(l))
+                ENDIF
+             ENDIF
+
+             IF ( .NOT. bc_ns_cyc )  THEN
+                IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+                   p_mg(:,nyn_mg(l)+1,:) = p_mg(:,nyn_mg(l),:)
+                ENDIF
+                IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+                   p_mg(:,nys_mg(l)-1,:) = p_mg(:,nys_mg(l),:)
+                ENDIF
+             ENDIF
+
+!
+!--          Bottom and top boundary conditions
+             IF ( ibc_p_b == 1 )  THEN
+                p_mg(nzb,:,: ) = p_mg(nzb+1,:,:)
+             ELSE
+                p_mg(nzb,:,: ) = 0.0_wp
+             ENDIF
+
+             IF ( ibc_p_t == 1 )  THEN
+                p_mg(nzt_mg(l)+1,:,: ) = p_mg(nzt_mg(l),:,:)
+             ELSE
+                p_mg(nzt_mg(l)+1,:,: ) = 0.0_wp
+             ENDIF
+
+          ENDDO
+
+       ENDDO
+
+!
+!--    Set pressure within topography and at the topography surfaces
+!$OMP PARALLEL PRIVATE (i,j,k,wall_left,wall_north,wall_right,wall_south,wall_top,wall_total)
+!$OMP DO
+       DO  i = nxl_mg(l), nxr_mg(l)
+          DO  j = nys_mg(l), nyn_mg(l) 
+             DO  k = nzb, nzt_mg(l)
+!
+!--             First, set pressure inside topography to zero
+                p_mg(k,j,i) = p_mg(k,j,i) * ( 1.0_wp - IBITS( flags(k,j,i), 6, 1 ) )
+!
+!--             Second, determine if the gridpoint inside topography is adjacent
+!--             to a wall and set its value to a value given by the average of
+!--             those values obtained from Neumann boundary condition
+                wall_left  = IBITS( flags(k,j,i-1), 5, 1 )
+                wall_right = IBITS( flags(k,j,i+1), 4, 1 )
+                wall_south = IBITS( flags(k,j-1,i), 3, 1 )
+                wall_north = IBITS( flags(k,j+1,i), 2, 1 )
+                wall_top   = IBITS( flags(k+1,j,i), 0, 1 )
+                wall_total = wall_left + wall_right + wall_south + wall_north + &
+                             wall_top
+
+                IF ( wall_total > 0.0_wp )  THEN
+                   p_mg(k,j,i) = 1.0_wp / wall_total *                 &
+                                        ( wall_left  * p_mg(k,j,i-1) + &
+                                          wall_right * p_mg(k,j,i+1) + &
+                                          wall_south * p_mg(k,j-1,i) + &
+                                          wall_north * p_mg(k,j+1,i) + &
+                                          wall_top   * p_mg(k+1,j,i) )
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP END PARALLEL
+
+!
+!--    One more time horizontal boundary conditions
+       CALL exchange_horiz( p_mg, 1)
+
+
+    END SUBROUTINE redblack_noopt
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Gather subdomain data from all PEs.
+!------------------------------------------------------------------------------!
+    SUBROUTINE mg_gather_noopt( f2, f2_sub )
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+           ONLY:  mg_loc_ind, nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i       !<
+       INTEGER(iwp) ::  il      !<
+       INTEGER(iwp) ::  ir      !<
+       INTEGER(iwp) ::  j       !<
+       INTEGER(iwp) ::  jn      !<
+       INTEGER(iwp) ::  js      !<
+       INTEGER(iwp) ::  k       !<
+       INTEGER(iwp) ::  nwords  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f2    !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                       nys_mg(grid_level)-1:nyn_mg(grid_level)+1,              &
+                       nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) ::  f2_l  !<
+
+       REAL(wp), DIMENSION(nzb:mg_loc_ind(5,myid)+1,                           &
+                           mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1,          &
+                           mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) ::  f2_sub  !<
+
+
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(34), 'mg_gather_noopt', 'start' )
+
+       f2_l = 0.0_wp
+
+!
+!--    Store the local subdomain array on the total array
+       js = mg_loc_ind(3,myid)
+       IF ( south_border_pe )  js = js - 1
+       jn = mg_loc_ind(4,myid)
+       IF ( north_border_pe )  jn = jn + 1
+       il = mg_loc_ind(1,myid)
+       IF ( left_border_pe )   il = il - 1
+       ir = mg_loc_ind(2,myid)
+       IF ( right_border_pe )  ir = ir + 1
+       DO  i = il, ir
+          DO  j = js, jn
+             DO  k = nzb, nzt_mg(grid_level)+1
+                f2_l(k,j,i) = f2_sub(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Find out the number of array elements of the total array
+       nwords = SIZE( f2 )
+
+!
+!--    Gather subdomain data from all PEs
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( f2_l(nzb,nys_mg(grid_level)-1,nxl_mg(grid_level)-1),&
+                           f2(nzb,nys_mg(grid_level)-1,nxl_mg(grid_level)-1),  &
+                           nwords, MPI_REAL, MPI_SUM, comm2d, ierr )
+
+       CALL cpu_log( log_point_s(34), 'mg_gather_noopt', 'stop' )
+#endif
+       
+    END SUBROUTINE mg_gather_noopt
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo It may be possible to improve the speed of this routine by using
+!>       non-blocking communication
+!------------------------------------------------------------------------------!
+    SUBROUTINE mg_scatter_noopt( p2, p2_sub )
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point_s
+
+       USE indices,                                                            &
+           ONLY:  mg_loc_ind, nxl_mg, nxr_mg, nys_mg, nyn_mg, nzb, nzt_mg
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nwords  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1) ::  p2  !<
+
+       REAL(wp), DIMENSION(nzb:mg_loc_ind(5,myid)+1,                           &
+                           mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1,          &
+                           mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) ::  p2_sub  !<
+
+!
+!--    Find out the number of array elements of the subdomain array
+       nwords = SIZE( p2_sub )
+
+#if defined( __parallel )
+       CALL cpu_log( log_point_s(35), 'mg_scatter_noopt', 'start' )
+
+       p2_sub = p2(:,mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1, &
+                     mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1)
+
+       CALL cpu_log( log_point_s(35), 'mg_scatter_noopt', 'stop' )
+#endif
+       
+    END SUBROUTINE mg_scatter_noopt
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This is where the multigrid technique takes place. V- and W- Cycle are
+!> implemented and steered by the parameter "gamma". Parameter "nue" determines
+!> the convergence of the multigrid iterative solution. There are nue times
+!> RB-GS iterations. It should be set to "1" or "2", considering the time effort
+!> one would like to invest. Last choice shows a very good converging factor,
+!> but leads to an increase in computing time.
+!------------------------------------------------------------------------------!
+    RECURSIVE SUBROUTINE next_mg_level_noopt( f_mg, p_mg, p3, r )
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_dirrad, bc_lr_raddir, bc_ns_dirrad, bc_ns_raddir,      &
+                  gamma_mg, grid_level_count, maximum_grid_level,              &
+                  mg_switch_to_pe0_level, mg_switch_to_pe0, ngsrb
+
+
+       USE indices,                                                            &
+           ONLY:  mg_loc_ind, nxl, nxl_mg, nxr, nxr_mg, nys, nys_mg, nyn,      &
+                  nyn_mg, nzb, nzt, nzt_mg
+
+       USE kinds
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i            !<
+       INTEGER(iwp) ::  j            !<
+       INTEGER(iwp) ::  k            !<
+       INTEGER(iwp) ::  nxl_mg_save  !<
+       INTEGER(iwp) ::  nxr_mg_save  !<
+       INTEGER(iwp) ::  nyn_mg_save  !<
+       INTEGER(iwp) ::  nys_mg_save  !<
+       INTEGER(iwp) ::  nzt_mg_save  !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: f_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: p_mg  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: p3    !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level)+1,                           &
+                           nys_mg(grid_level)-1:nyn_mg(grid_level)+1,          &
+                           nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) :: r     !<
+
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1) ::  f2  !<
+       REAL(wp), DIMENSION(nzb:nzt_mg(grid_level-1)+1,                         &
+                           nys_mg(grid_level-1)-1:nyn_mg(grid_level-1)+1,      &
+                           nxl_mg(grid_level-1)-1:nxr_mg(grid_level-1)+1) ::  p2  !<
+
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  f2_sub  !<
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p2_sub  !<
+
+!
+!--    Restriction to the coarsest grid
+    10 IF ( grid_level == 1 )  THEN
+
+!
+!--       Solution on the coarsest grid. Double the number of Gauss-Seidel
+!--       iterations in order to get a more accurate solution.
+          ngsrb = 2 * ngsrb
+
+          CALL redblack_noopt( f_mg, p_mg )
+
+          ngsrb = ngsrb / 2
+
+
+       ELSEIF ( grid_level /= 1 )  THEN
+
+          grid_level_count(grid_level) = grid_level_count(grid_level) + 1
+
+!
+!--       Solution on the actual grid level
+          CALL redblack_noopt( f_mg, p_mg )
+
+!
+!--       Determination of the actual residual
+          CALL resid_noopt( f_mg, p_mg, r )
+
+!
+!--       Restriction of the residual (finer grid values!) to the next coarser
+!--       grid. Therefore, the grid level has to be decremented now. nxl..nzt have
+!--       to be set to the coarse grid values, because these variables are needed
+!--       for the exchange of ghost points in routine exchange_horiz
+          grid_level = grid_level - 1
+          nxl = nxl_mg(grid_level)
+          nys = nys_mg(grid_level)
+          nxr = nxr_mg(grid_level)
+          nyn = nyn_mg(grid_level)
+          nzt = nzt_mg(grid_level)
+
+          IF ( grid_level == mg_switch_to_pe0_level )  THEN
+
+!
+!--          From this level on, calculations are done on PE0 only.
+!--          First, carry out restriction on the subdomain.
+!--          Therefore, indices of the level have to be changed to subdomain values
+!--          in between (otherwise, the restrict routine would expect
+!--          the gathered array)
+
+             nxl_mg_save = nxl_mg(grid_level)
+             nxr_mg_save = nxr_mg(grid_level)
+             nys_mg_save = nys_mg(grid_level)
+             nyn_mg_save = nyn_mg(grid_level)
+             nzt_mg_save = nzt_mg(grid_level)
+             nxl_mg(grid_level) = mg_loc_ind(1,myid)
+             nxr_mg(grid_level) = mg_loc_ind(2,myid)
+             nys_mg(grid_level) = mg_loc_ind(3,myid)
+             nyn_mg(grid_level) = mg_loc_ind(4,myid)
+             nzt_mg(grid_level) = mg_loc_ind(5,myid)
+             nxl = mg_loc_ind(1,myid)
+             nxr = mg_loc_ind(2,myid)
+             nys = mg_loc_ind(3,myid)
+             nyn = mg_loc_ind(4,myid)
+             nzt = mg_loc_ind(5,myid)
+
+             ALLOCATE( f2_sub(nzb:nzt_mg(grid_level)+1,                    &
+                              nys_mg(grid_level)-1:nyn_mg(grid_level)+1,   &
+                              nxl_mg(grid_level)-1:nxr_mg(grid_level)+1) )
+
+             CALL restrict_noopt( f2_sub, r )
+
+!
+!--          Restore the correct indices of this level
+             nxl_mg(grid_level) = nxl_mg_save
+             nxr_mg(grid_level) = nxr_mg_save
+             nys_mg(grid_level) = nys_mg_save
+             nyn_mg(grid_level) = nyn_mg_save
+             nzt_mg(grid_level) = nzt_mg_save
+             nxl = nxl_mg(grid_level)
+             nxr = nxr_mg(grid_level)
+             nys = nys_mg(grid_level)
+             nyn = nyn_mg(grid_level)
+             nzt = nzt_mg(grid_level)
+!
+!--          Gather all arrays from the subdomains on PE0
+             CALL mg_gather_noopt( f2, f2_sub )
+
+!
+!--          Set switch for routine exchange_horiz, that no ghostpoint exchange
+!--          has to be carried out from now on
+             mg_switch_to_pe0 = .TRUE.
+
+!
+!--          In case of non-cyclic lateral boundary conditions, both in- and
+!--          outflow conditions have to be used on all PEs after the switch,
+!--          because then they have the total domain.
+             IF ( bc_lr_dirrad )  THEN
+                bc_dirichlet_l  = .TRUE.
+                bc_dirichlet_r  = .FALSE.
+                bc_radiation_l = .FALSE.
+                bc_radiation_r = .TRUE.
+             ELSEIF ( bc_lr_raddir )  THEN
+                bc_dirichlet_l  = .FALSE.
+                bc_dirichlet_r  = .TRUE.
+                bc_radiation_l = .TRUE.
+                bc_radiation_r = .FALSE.
+             ELSEIF ( child_domain  .OR.  nesting_offline )  THEN
+                bc_dirichlet_l = .TRUE.
+                bc_dirichlet_r = .TRUE.
+             ENDIF
+
+             IF ( bc_ns_dirrad )  THEN
+                bc_dirichlet_n  = .TRUE.
+                bc_dirichlet_s  = .FALSE.
+                bc_radiation_n = .FALSE.
+                bc_radiation_s = .TRUE.
+             ELSEIF ( bc_ns_raddir )  THEN
+                bc_dirichlet_n  = .FALSE.
+                bc_dirichlet_s  = .TRUE.
+                bc_radiation_n = .TRUE.
+                bc_radiation_s = .FALSE.
+             ELSEIF ( child_domain  .OR.  nesting_offline )  THEN
+                bc_dirichlet_s = .TRUE.
+                bc_dirichlet_n = .TRUE.
+             ENDIF
+
+             DEALLOCATE( f2_sub )
+
+          ELSE
+
+             CALL restrict_noopt( f2, r )
+
+          ENDIF
+
+          p2 = 0.0_wp
+
+!
+!--       Repeat the same procedure till the coarsest grid is reached
+          CALL next_mg_level_noopt( f2, p2, p3, r )
+
+       ENDIF
+
+!
+!--    Now follows the prolongation
+       IF ( grid_level >= 2 )  THEN
+
+!
+!--       Prolongation of the new residual. The values are transferred 
+!--       from the coarse to the next finer grid.
+          IF ( grid_level == mg_switch_to_pe0_level+1 )  THEN
+
+#if defined( __parallel )
+!
+!--          At this level, the new residual first has to be scattered from
+!--          PE0 to the other PEs
+             ALLOCATE( p2_sub(nzb:mg_loc_ind(5,myid)+1,             &
+                       mg_loc_ind(3,myid)-1:mg_loc_ind(4,myid)+1,   &
+                       mg_loc_ind(1,myid)-1:mg_loc_ind(2,myid)+1) )
+
+             CALL mg_scatter_noopt( p2, p2_sub )
+
+!
+!--          Therefore, indices of the previous level have to be changed to
+!--          subdomain values in between (otherwise, the prolong routine would
+!--          expect the gathered array)
+             nxl_mg_save = nxl_mg(grid_level-1)
+             nxr_mg_save = nxr_mg(grid_level-1)
+             nys_mg_save = nys_mg(grid_level-1)
+             nyn_mg_save = nyn_mg(grid_level-1)
+             nzt_mg_save = nzt_mg(grid_level-1)
+             nxl_mg(grid_level-1) = mg_loc_ind(1,myid)
+             nxr_mg(grid_level-1) = mg_loc_ind(2,myid)
+             nys_mg(grid_level-1) = mg_loc_ind(3,myid)
+             nyn_mg(grid_level-1) = mg_loc_ind(4,myid)
+             nzt_mg(grid_level-1) = mg_loc_ind(5,myid)
+
+!
+!--          Set switch for routine exchange_horiz, that ghostpoint exchange
+!--          has to be carried again out from now on
+             mg_switch_to_pe0 = .FALSE.
+
+!
+!--          For non-cyclic lateral boundary conditions and in case of nesting, 
+!--          restore the in-/outflow conditions. 
+             bc_dirichlet_l = .FALSE.;  bc_dirichlet_r = .FALSE.
+             bc_dirichlet_n = .FALSE.;  bc_dirichlet_s = .FALSE.
+             bc_radiation_l = .FALSE.;  bc_radiation_r = .FALSE.
+             bc_radiation_n = .FALSE.;  bc_radiation_s = .FALSE.
+
+             IF ( pleft == MPI_PROC_NULL )  THEN
+                IF ( bc_lr_dirrad  .OR.  child_domain  .OR.  nesting_offline )  &
+                THEN
+                   bc_dirichlet_l = .TRUE.
+                ELSEIF ( bc_lr_raddir )  THEN
+                   bc_radiation_l = .TRUE.
+                ENDIF
+             ENDIF
+
+             IF ( pright == MPI_PROC_NULL )  THEN
+                IF ( bc_lr_dirrad )  THEN
+                   bc_radiation_r = .TRUE.
+                ELSEIF ( bc_lr_raddir  .OR.  child_domain  .OR.                 &
+                         nesting_offline )  THEN
+                   bc_dirichlet_r = .TRUE.
+                ENDIF
+             ENDIF
+
+             IF ( psouth == MPI_PROC_NULL )  THEN
+                IF ( bc_ns_dirrad )  THEN
+                   bc_radiation_s = .TRUE.
+                ELSEIF ( bc_ns_raddir  .OR.  child_domain  .OR.                 &
+                         nesting_offline )  THEN
+                   bc_dirichlet_s = .TRUE.
+                ENDIF
+             ENDIF
+
+             IF ( pnorth == MPI_PROC_NULL )  THEN
+                IF ( bc_ns_dirrad  .OR.  child_domain  .OR.  nesting_offline )  &
+                THEN
+                   bc_dirichlet_n = .TRUE.
+                ELSEIF ( bc_ns_raddir )  THEN
+                   bc_radiation_n = .TRUE.
+                ENDIF
+             ENDIF
+
+             CALL prolong_noopt( p2_sub, p3 )
+
+!
+!--          Restore the correct indices of the previous level
+             nxl_mg(grid_level-1) = nxl_mg_save
+             nxr_mg(grid_level-1) = nxr_mg_save
+             nys_mg(grid_level-1) = nys_mg_save
+             nyn_mg(grid_level-1) = nyn_mg_save
+             nzt_mg(grid_level-1) = nzt_mg_save
+
+             DEALLOCATE( p2_sub )
+#endif
+
+          ELSE
+
+             CALL prolong_noopt( p2, p3 )
+
+          ENDIF
+
+!
+!--       Computation of the new pressure correction. Therefore, 
+!--       values from prior grids are added up automatically stage by stage.
+          DO  i = nxl_mg(grid_level)-1, nxr_mg(grid_level)+1
+             DO  j = nys_mg(grid_level)-1, nyn_mg(grid_level)+1
+                DO  k = nzb, nzt_mg(grid_level)+1 
+                   p_mg(k,j,i) = p_mg(k,j,i) + p3(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Relaxation of the new solution
+          CALL redblack_noopt( f_mg, p_mg )
+
+       ENDIF
+
+
+!
+!--    The following few lines serve the steering of the multigrid scheme 
+       IF ( grid_level == maximum_grid_level )  THEN
+
+          GOTO 20
+
+       ELSEIF ( grid_level /= maximum_grid_level  .AND.  grid_level /= 1  .AND. &
+                grid_level_count(grid_level) /= gamma_mg )  THEN
+
+          GOTO 10
+
+       ENDIF
+
+!
+!--    Reset counter for the next call of poismg_noopt
+       grid_level_count(grid_level) = 0
+
+!
+!--    Continue with the next finer level. nxl..nzt have to be
+!--    set to the finer grid values, because these variables are needed for the
+!--    exchange of ghost points in routine exchange_horiz
+       grid_level = grid_level + 1
+       nxl = nxl_mg(grid_level)
+       nxr = nxr_mg(grid_level)
+       nys = nys_mg(grid_level)
+       nyn = nyn_mg(grid_level)
+       nzt = nzt_mg(grid_level)
+
+    20 CONTINUE
+
+    END SUBROUTINE next_mg_level_noopt
+
+
+
+    SUBROUTINE poismg_noopt_init
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, masking_method, maximum_grid_level
+
+       USE indices,                                                            &
+           ONLY:  flags, nxl_mg, nxr_mg, nyn_mg, nys_mg, nzb, nzt_mg,          &
+                  wall_flags_0, wall_flags_1,                                  &
+                  wall_flags_10, wall_flags_2, wall_flags_3,  wall_flags_4,    &
+                  wall_flags_5, wall_flags_6, wall_flags_7, wall_flags_8,      &
+                  wall_flags_9
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< index variable along x 
+       INTEGER(iwp) ::  inc           !< incremental parameter for coarsening grid level
+       INTEGER(iwp) ::  j             !< index variable along y
+       INTEGER(iwp) ::  k             !< index variable along z
+       INTEGER(iwp) ::  l             !< loop variable indication current grid level
+       INTEGER(iwp) ::  nxl_l         !< index of left PE boundary for multigrid level
+       INTEGER(iwp) ::  nxr_l         !< index of right PE boundary for multigrid level
+       INTEGER(iwp) ::  nyn_l         !< index of north PE boundary for multigrid level
+       INTEGER(iwp) ::  nys_l         !< index of south PE boundary for multigrid level
+       INTEGER(iwp) ::  nzt_l         !< index of top PE boundary for multigrid level
+
+       INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE ::  topo_tmp
+!
+!--    Gridpoint increment of the current level. 
+       inc = 1
+       DO  l = maximum_grid_level, 1 , -1
+!
+!--       Set grid_level as it is required for exchange_horiz_2d_int
+          grid_level = l
+
+          nxl_l = nxl_mg(l)
+          nxr_l = nxr_mg(l)
+          nys_l = nys_mg(l)
+          nyn_l = nyn_mg(l)
+          nzt_l = nzt_mg(l)
+!
+!--       Assign the flag level to be calculated
+          SELECT CASE ( l )
+             CASE ( 1 )
+                flags => wall_flags_1
+             CASE ( 2 )
+                flags => wall_flags_2
+             CASE ( 3 )
+                flags => wall_flags_3
+             CASE ( 4 )
+                flags => wall_flags_4
+             CASE ( 5 )
+                flags => wall_flags_5
+             CASE ( 6 )
+                flags => wall_flags_6
+             CASE ( 7 )
+                flags => wall_flags_7
+             CASE ( 8 )
+                flags => wall_flags_8
+             CASE ( 9 )
+                flags => wall_flags_9
+             CASE ( 10 )
+                flags => wall_flags_10
+          END SELECT
+
+!
+!--       Depending on the grid level, set the respective bits in case of
+!--       neighbouring walls
+!--       Bit 0:  wall to the bottom
+!--       Bit 1:  wall to the top (not realized in remaining PALM code so far)
+!--       Bit 2:  wall to the south
+!--       Bit 3:  wall to the north
+!--       Bit 4:  wall to the left
+!--       Bit 5:  wall to the right
+!--       Bit 6:  inside building
+
+          flags = 0
+!
+!--       In case of masking method, flags are not set and multigrid method
+!--       works like FFT-solver
+          IF ( .NOT. masking_method )  THEN
+
+!
+!--          Allocate temporary array for topography heights on coarser grid
+!--          level. Please note, 2 ghoist points are required, in order to
+!--          calculate flags() on the interior ghost point. 
+             ALLOCATE( topo_tmp(nzb:nzt_l+1,nys_l-1:nyn_l+1,nxl_l-1:nxr_l+1) )
+             topo_tmp = 0
+             
+             DO  i = nxl_l, nxr_l
+                DO  j = nys_l, nyn_l
+                   DO  k = nzb, nzt_l
+                      topo_tmp(k,j,i) = wall_flags_0(k*inc,j*inc,i*inc)
+                   ENDDO
+                ENDDO
+             ENDDO
+             topo_tmp(nzt_l+1,:,:) = topo_tmp(nzt_l,:,:)
+!
+!--          Exchange ghost points on respective multigrid level. 2 ghost points
+!--          are required, in order to calculate flags on 
+!--          nys_l-1 / nyn_l+1 / nxl_l-1 / nxr_l+1. 
+             CALL exchange_horiz_int( topo_tmp, nys_l, nyn_l, nxl_l, nxr_l, nzt_l, 1 )
+!
+!--          Set non-cyclic boundary conditions on respective multigrid level
+             IF ( .NOT. bc_ns_cyc )  THEN
+                IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
+!                    topo_tmp(:,-2,:) = topo_tmp(:,0,:)
+                   topo_tmp(:,-1,:) = topo_tmp(:,0,:)
+                ENDIF
+                IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
+!                    topo_tmp(:,nyn_l+2,:) = topo_tmp(:,nyn_l,:)
+                   topo_tmp(:,nyn_l+1,:) = topo_tmp(:,nyn_l,:)
+                ENDIF
+             ENDIF
+             IF ( .NOT. bc_lr_cyc )  THEN
+                IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
+!                    topo_tmp(:,:,-2) = topo_tmp(:,:,0)
+                   topo_tmp(:,:,-1) = topo_tmp(:,:,0)
+                ENDIF
+                IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
+!                    topo_tmp(:,:,nxr_l+2) = topo_tmp(:,:,nxr_l)      
+                   topo_tmp(:,:,nxr_l+1) = topo_tmp(:,:,nxr_l)    
+                ENDIF        
+             ENDIF
+                       
+             DO  i = nxl_l, nxr_l
+                DO  j = nys_l, nyn_l
+                   DO  k = nzb, nzt_l     
+!
+!--                   Inside/outside building (inside building does not need
+!--                   further tests for walls)
+                      IF ( .NOT. BTEST( topo_tmp(k,j,i), 0 ) )  THEN
+
+                         flags(k,j,i) = IBSET( flags(k,j,i), 6 )
+
+                      ELSE
+!
+!--                      Bottom wall
+                         IF ( .NOT. BTEST( topo_tmp(k-1,j,i), 0 ) )  THEN
+                            flags(k,j,i) = IBSET( flags(k,j,i), 0 )
+                         ENDIF
+!
+!--                      South wall
+                         IF ( .NOT. BTEST( topo_tmp(k,j-1,i), 0 ) )  THEN
+                            flags(k,j,i) = IBSET( flags(k,j,i), 2 )
+                         ENDIF
+!
+!--                      North wall
+                         IF ( .NOT. BTEST( topo_tmp(k,j+1,i), 0 ) )  THEN
+                            flags(k,j,i) = IBSET( flags(k,j,i), 3 )
+                         ENDIF
+!
+!--                      Left wall
+                         IF ( .NOT. BTEST( topo_tmp(k,j,i-1), 0 ) )  THEN
+                            flags(k,j,i) = IBSET( flags(k,j,i), 4 )
+                         ENDIF
+!
+!--                      Right wall
+                         IF ( .NOT. BTEST( topo_tmp(k,j,i+1), 0 ) )  THEN
+                            flags(k,j,i) = IBSET( flags(k,j,i), 5 )
+                         ENDIF
+!
+!--                      Top wall
+                         IF ( .NOT. BTEST( topo_tmp(k+1,j,i), 0 ) )  THEN
+                            flags(k,j,i) = IBSET( flags(k,j,i), 7 )
+                         ENDIF
+
+                      ENDIF
+                            
+                   ENDDO
+                ENDDO
+             ENDDO
+             flags(nzt_l+1,:,:) = flags(nzt_l,:,:)
+
+             CALL exchange_horiz_int( flags, nys_l, nyn_l, nxl_l, nxr_l, nzt_l, 1 )
+
+             DEALLOCATE( topo_tmp )
+
+          ENDIF
+
+          inc = inc * 2
+
+       ENDDO
+!
+!--    Reset grid_level to "normal" grid
+       grid_level = 0
+
+    END SUBROUTINE poismg_noopt_init
+
+ END MODULE poismg_noopt_mod
Index: /palm/tags/release-6.0/SOURCE/posix_calls_from_fortran.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/posix_calls_from_fortran.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/posix_calls_from_fortran.f90	(revision 3477)
@@ -0,0 +1,89 @@
+!> @posix_calls_from_fortran.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id: posix_calls_from_fortran.f90 2696 2017-12-14 17:12:51Z kanani $
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 1986 2016-08-10 14:07:17Z gronemeier
+! Forced header and separation lines into 80 columns
+! 
+! 1986 2016-08-10 14:07:17Z gronemeier
+! Initial revision
+! 
+! Description:
+! ------------
+!> Collection of POSIX-command calls for Fortran
+!------------------------------------------------------------------------------!
+ MODULE posix_calls_from_fortran
+
+    USE, INTRINSIC ::  iso_c_binding, ONLY: c_int
+
+    IMPLICIT none
+
+    PRIVATE
+
+
+    INTERFACE
+
+       FUNCTION fsleep( seconds )  BIND( C, NAME='sleep' )
+          IMPORT
+          INTEGER(c_int) ::  fsleep
+          INTEGER(c_int), INTENT(IN), VALUE ::  seconds
+       END FUNCTION fsleep
+
+    END INTERFACE
+
+    INTERFACE fortran_sleep
+       MODULE PROCEDURE fortran_sleep
+    END INTERFACE fortran_sleep
+
+    PUBLIC fortran_sleep
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Wait a specified amount of seconds
+!------------------------------------------------------------------------------!
+    SUBROUTINE fortran_sleep( seconds )
+
+       INTEGER, INTENT(IN) ::  seconds
+
+       INTEGER(c_int)      ::  seconds_in_c
+       INTEGER(c_int)      ::  sleep_return_value
+
+       seconds_in_c = seconds
+
+       sleep_return_value = fsleep( seconds_in_c )
+
+   END SUBROUTINE fortran_sleep
+
+ END MODULE posix_calls_from_fortran
+
Index: /palm/tags/release-6.0/SOURCE/pres.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/pres.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/pres.f90	(revision 3477)
@@ -0,0 +1,942 @@
+!> @file pres.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfixes in offline nesting.
+! Add comment. 
+! 
+! 3341 2018-10-15 10:31:27Z suehring
+! Rename variables for boundary flags and nesting
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Dollar sign added before Id
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! To avoid jumps while plotting w-profiles w level nzt+1 is set to w level nzt 
+! after velocity modifications through the pressure solver were carried out
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! poismg_noopt modularized (MS)
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! comment changed + some formatting
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related code removed
+! 
+! 2073 2016-11-30 14:34:05Z raasch
+! openmp bugfix for calculation of new divergence
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1932 2016-06-10 12:09:21Z suehring
+! Initial version of purely vertical nesting introduced.
+!
+! 1931 2016-06-10 12:06:59Z suehring
+! Rename multigrid into multigrid_noopt and multigrid_fast into multigrid
+!
+! 1929 2016-06-09 16:25:25Z suehring
+! Bugfix: weight_substep for initial call, replace by local variable
+! 
+! 1918 2016-05-27 14:35:57Z raasch
+! sum of divergence is also calculated when pres is called before the initial
+! first time step,
+! stearing is modified by using intermediate_timestep_count = 0 in order to
+! determine if pres is called before the first initial timestep,
+! bugfix: in case of Neumann conditions for pressure both at bottom and top,
+!         mean vertical velocity is also removed for the first time step
+! bugfix for calculating divergences
+!
+! 1908 2016-05-25 17:22:32Z suehring
+! New divergence for output into RUN_CONTROL file is calculated only at last 
+! Runge-Kutta step
+!
+! 1845 2016-04-08 08:29:13Z raasch
+! nzb_2d replace by nzb_u|v_inner
+! 
+! 1799 2016-04-05 08:35:55Z gronemeier
+! Bugfix: excluded third dimension from horizontal volume flow calculation
+! 
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! poismg_fast + respective module added, adjustments for psolver-queries
+!
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1306 2014-03-13 14:30:59Z raasch
+! second argument removed from routine poisfft
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed, independent clauses added,
+! end parallel replaced by end parallel loop
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! openACC porting of reduction operations, loops for calculating d are
+! using the rflags_s_inner multiply flag instead of the nzb_s_inner loop index
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! call of poisfft_hybrid removed
+!
+! 1117 2013-03-27 11:15:36Z suehring
+! Bugfix in OpenMP parallelization.
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! GPU-porting of several loops, some loops rearranged
+!
+! 1111 2013-03-08 23:54:10Z
+! openACC statements added,
+! ibc_p_b = 2 removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! adjustment of array tend for cases with unequal subdomain sizes removed
+!
+! Revision 1.1  1997/07/24 11:24:44  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Compute the divergence of the provisional velocity field. Solve the Poisson
+!> equation for the perturbation pressure. Compute the final velocities using
+!> this perturbation pressure. Compute the remaining divergence.
+!------------------------------------------------------------------------------!
+ SUBROUTINE pres
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  d, ddzu, ddzu_pres, ddzw, dzw, p, p_loc, rho_air, rho_air_zw,   &
+               tend, u, v, w
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, bc_radiation_l, bc_radiation_n,           &
+               bc_radiation_r, bc_radiation_s, child_domain,                   &
+               conserve_volume_flow, coupling_mode,                            &
+               dt_3d, gathered_size, ibc_p_b, ibc_p_t,                         &
+               intermediate_timestep_count, intermediate_timestep_count_max,   &
+               mg_switch_to_pe0_level, nesting_offline,                        &
+               psolver, subdomain_size,                                        &
+               topography, volume_flow, volume_flow_area, volume_flow_initial
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, ngp_2dh_outer, nx, nxl, nxlg, nxl_mg, nxr, nxrg, nxr_mg,  &
+               ny, nys, nysg, nys_mg, nyn, nyng, nyn_mg, nzb, nzt, nzt_mg,     &
+               wall_flags_0
+
+    USE kinds
+
+    USE pegrid
+    
+    USE pmc_interface,                                                         &
+        ONLY:  nesting_mode 
+
+    USE poisfft_mod,                                                           &
+        ONLY:  poisfft
+
+    USE poismg_mod
+
+    USE poismg_noopt_mod
+
+    USE statistics,                                                            &
+        ONLY:  statistic_regions, sums_divnew_l, sums_divold_l, weight_pres,   &
+               weight_substep
+
+    USE surface_mod,                                                           &
+        ONLY :  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i              !<
+    INTEGER(iwp) ::  j              !<
+    INTEGER(iwp) ::  k              !<
+    INTEGER(iwp) ::  m              !<
+
+    REAL(wp)     ::  ddt_3d         !<
+    REAL(wp)     ::  d_weight_pres  !<
+    REAL(wp)     ::  localsum       !<
+    REAL(wp)     ::  threadsum      !<
+    REAL(wp)     ::  weight_pres_l  !<
+    REAL(wp)     ::  weight_substep_l !<
+
+    REAL(wp), DIMENSION(1:3)   ::  volume_flow_l       !<
+    REAL(wp), DIMENSION(1:3)   ::  volume_flow_offset  !<
+    REAL(wp), DIMENSION(1:nzt) ::  w_l                 !<
+    REAL(wp), DIMENSION(1:nzt) ::  w_l_l               !<
+
+    LOGICAL :: child_domain_nvn      !<
+
+
+    CALL cpu_log( log_point(8), 'pres', 'start' )
+
+
+!
+!-- Calculate quantities to be used locally
+    ddt_3d = 1.0_wp / dt_3d
+    IF ( intermediate_timestep_count == 0 )  THEN
+!
+!--    If pres is called before initial time step
+       weight_pres_l    = 1.0_wp
+       d_weight_pres    = 1.0_wp
+       weight_substep_l = 1.0_wp
+    ELSE
+       weight_pres_l    = weight_pres(intermediate_timestep_count)
+       d_weight_pres    = 1.0_wp / weight_pres(intermediate_timestep_count)
+       weight_substep_l = weight_substep(intermediate_timestep_count)
+    ENDIF
+
+!
+!-- Multigrid method expects array d to have one ghost layer.
+!-- 
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+     
+       DEALLOCATE( d )
+       ALLOCATE( d(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ) 
+
+!
+!--    Since p is later used to hold the weighted average of the substeps, it
+!--    cannot be used in the iterative solver. Therefore, its initial value is
+!--    stored on p_loc, which is then iteratively advanced in every substep.
+       IF ( intermediate_timestep_count <= 1 )  THEN
+          DO  i = nxl-1, nxr+1
+             DO  j = nys-1, nyn+1
+                DO  k = nzb, nzt+1
+                   p_loc(k,j,i) = p(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( psolver == 'sor'  .AND.  intermediate_timestep_count <= 1 )  THEN
+
+!
+!--    Since p is later used to hold the weighted average of the substeps, it
+!--    cannot be used in the iterative solver. Therefore, its initial value is
+!--    stored on p_loc, which is then iteratively advanced in every substep.
+       p_loc = p
+
+    ENDIF
+
+!
+!-- Conserve the volume flow at the outflow in case of non-cyclic lateral
+!-- boundary conditions
+!-- WARNING: so far, this conservation does not work at the left/south
+!--          boundary if the topography at the inflow differs from that at the
+!--          outflow! For this case, volume_flow_area needs adjustment!
+!
+!-- Left/right
+    IF ( conserve_volume_flow  .AND.  ( bc_radiation_l .OR.                    &
+                                        bc_radiation_r ) )  THEN
+
+       volume_flow(1)   = 0.0_wp
+       volume_flow_l(1) = 0.0_wp
+
+       IF ( bc_radiation_l )  THEN
+          i = 0
+       ELSEIF ( bc_radiation_r )  THEN
+          i = nx+1
+       ENDIF
+
+       DO  j = nys, nyn
+!
+!--       Sum up the volume flow through the south/north boundary
+          DO  k = nzb+1, nzt
+             volume_flow_l(1) = volume_flow_l(1) + u(k,j,i) * dzw(k)           &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 )  &
+                                            )
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )   
+       IF ( collective_wait )  CALL MPI_BARRIER( comm1dy, ierr )
+       CALL MPI_ALLREDUCE( volume_flow_l(1), volume_flow(1), 1, MPI_REAL, &
+                           MPI_SUM, comm1dy, ierr )   
+#else
+       volume_flow = volume_flow_l  
+#endif
+       volume_flow_offset(1) = ( volume_flow_initial(1) - volume_flow(1) ) &
+                               / volume_flow_area(1)
+
+       DO  j = nysg, nyng
+          DO  k = nzb+1, nzt
+             u(k,j,i) = u(k,j,i) + volume_flow_offset(1)                       &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 )  &
+                                            )
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+!
+!-- South/north
+    IF ( conserve_volume_flow  .AND.  ( bc_radiation_n .OR. bc_radiation_s ) )  THEN
+
+       volume_flow(2)   = 0.0_wp
+       volume_flow_l(2) = 0.0_wp
+
+       IF ( bc_radiation_s )  THEN
+          j = 0
+       ELSEIF ( bc_radiation_n )  THEN
+          j = ny+1
+       ENDIF
+
+       DO  i = nxl, nxr
+!
+!--       Sum up the volume flow through the south/north boundary
+          DO  k = nzb+1, nzt
+             volume_flow_l(2) = volume_flow_l(2) + v(k,j,i) * dzw(k)           &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 )  &
+                                            )
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )   
+       IF ( collective_wait )  CALL MPI_BARRIER( comm1dx, ierr )
+       CALL MPI_ALLREDUCE( volume_flow_l(2), volume_flow(2), 1, MPI_REAL, &
+                           MPI_SUM, comm1dx, ierr )   
+#else
+       volume_flow = volume_flow_l  
+#endif
+       volume_flow_offset(2) = ( volume_flow_initial(2) - volume_flow(2) )    &
+                               / volume_flow_area(2)
+
+       DO  i = nxlg, nxrg
+          DO  k = nzb+1, nzt
+             v(k,j,i) = v(k,j,i) + volume_flow_offset(2)                       &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 )  &
+                                            )
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+!
+!-- Remove mean vertical velocity in case that Neumann conditions are
+!-- used both at bottom and top boundary, and if not a nested domain in a 
+!-- normal nesting run. In case of vertical nesting, this must be done.
+!-- Therefore an auxiliary logical variable child_domain_nvn is used here, and 
+!-- nvn stands for non-vertical nesting. 
+!-- This cannot be done before the first initial time step because ngp_2dh_outer
+!-- is not yet known then.
+    child_domain_nvn = child_domain
+    IF ( child_domain .AND. nesting_mode == 'vertical' )  THEN
+       child_domain_nvn = .FALSE.
+    ENDIF
+
+    IF ( ibc_p_b == 1  .AND.  ibc_p_t == 1  .AND.  .NOT. nesting_offline  .AND. &
+         .NOT. child_domain_nvn  .AND. intermediate_timestep_count /= 0 )       &
+    THEN
+       w_l = 0.0_wp;  w_l_l = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                w_l_l(k) = w_l_l(k) + w(k,j,i)                                 &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 3 )  &
+                                            )
+             ENDDO
+          ENDDO
+       ENDDO
+#if defined( __parallel )   
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( w_l_l(1), w_l(1), nzt, MPI_REAL, MPI_SUM, &
+                           comm2d, ierr )
+#else
+       w_l = w_l_l
+#endif
+       DO  k = 1, nzt
+          w_l(k) = w_l(k) / ngp_2dh_outer(k,0)
+       ENDDO
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+                w(k,j,i) = w(k,j,i) - w_l(k)                                   &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 3 )  &
+                                            )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Compute the divergence of the provisional velocity field.
+    CALL cpu_log( log_point_s(1), 'divergence', 'start' )
+
+    IF ( psolver(1:9) == 'multigrid' )  THEN
+       !$OMP PARALLEL DO SCHEDULE( STATIC ) PRIVATE (i,j,k)
+       DO  i = nxl-1, nxr+1
+          DO  j = nys-1, nyn+1
+             DO  k = nzb, nzt+1
+                d(k,j,i) = 0.0_wp
+             ENDDO
+          ENDDO
+       ENDDO
+    ELSE
+       !$OMP PARALLEL DO SCHEDULE( STATIC ) PRIVATE (i,j,k)
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                d(k,j,i) = 0.0_wp
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+    localsum  = 0.0_wp
+    threadsum = 0.0_wp
+
+#if defined( __ibm )
+    !$OMP PARALLEL PRIVATE (i,j,k) FIRSTPRIVATE(threadsum) REDUCTION(+:localsum)
+    !$OMP DO SCHEDULE( STATIC )
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+             d(k,j,i) = ( ( u(k,j,i+1) - u(k,j,i) ) * rho_air(k) * ddx +       &
+                          ( v(k,j+1,i) - v(k,j,i) ) * rho_air(k) * ddy +       &
+                          ( w(k,j,i)   * rho_air_zw(k) -                       &
+                            w(k-1,j,i) * rho_air_zw(k-1) ) * ddzw(k)           &
+                        ) * ddt_3d * d_weight_pres                             &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,i), 0 )    &
+                                          )
+          ENDDO
+!
+!--       Compute possible PE-sum of divergences for flow_statistics
+          DO  k = nzb+1, nzt
+             threadsum = threadsum + ABS( d(k,j,i) )                           &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,i), 0 )    &
+                                          )
+          ENDDO
+
+       ENDDO
+    ENDDO
+
+    IF ( intermediate_timestep_count == intermediate_timestep_count_max  .OR.  &
+         intermediate_timestep_count == 0 )  THEN
+       localsum = localsum + threadsum * dt_3d * weight_pres_l
+    ENDIF
+    !$OMP END PARALLEL
+#else
+
+    !$OMP PARALLEL PRIVATE (i,j,k)
+    !$OMP DO SCHEDULE( STATIC )
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = 1, nzt
+             d(k,j,i) = ( ( u(k,j,i+1) - u(k,j,i) ) * rho_air(k) * ddx +       &
+                          ( v(k,j+1,i) - v(k,j,i) ) * rho_air(k) * ddy +       &
+                          ( w(k,j,i)   * rho_air_zw(k) -                       &
+                            w(k-1,j,i) * rho_air_zw(k-1) ) * ddzw(k)           &
+                        ) * ddt_3d * d_weight_pres                             &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,i), 0 )    &
+                                          )     
+          ENDDO
+       ENDDO
+    ENDDO
+    !$OMP END PARALLEL
+
+!
+!-- Compute possible PE-sum of divergences for flow_statistics. Carry out
+!-- computation only at last Runge-Kutta substep.
+    IF ( intermediate_timestep_count == intermediate_timestep_count_max  .OR.  &
+         intermediate_timestep_count == 0 )  THEN
+       !$OMP PARALLEL PRIVATE (i,j,k) FIRSTPRIVATE(threadsum) REDUCTION(+:localsum)
+       !$OMP DO SCHEDULE( STATIC )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                threadsum = threadsum + ABS( d(k,j,i) )
+             ENDDO
+          ENDDO
+       ENDDO
+       localsum = localsum + threadsum * dt_3d * weight_pres_l
+       !$OMP END PARALLEL
+    ENDIF
+#endif
+
+!
+!-- For completeness, set the divergence sum of all statistic regions to those
+!-- of the total domain
+    IF ( intermediate_timestep_count == intermediate_timestep_count_max  .OR.  &
+         intermediate_timestep_count == 0 )  THEN
+       sums_divold_l(0:statistic_regions) = localsum
+    ENDIF
+
+    CALL cpu_log( log_point_s(1), 'divergence', 'stop' )
+
+!
+!-- Compute the pressure perturbation solving the Poisson equation
+    IF ( psolver == 'poisfft' )  THEN
+
+!
+!--    Solve Poisson equation via FFT and solution of tridiagonal matrices
+       CALL poisfft( d )
+
+!
+!--    Store computed perturbation pressure and set boundary condition in
+!--    z-direction
+       !$OMP PARALLEL DO PRIVATE (i,j,k)
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                tend(k,j,i) = d(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Bottom boundary:
+!--    This condition is only required for internal output. The pressure
+!--    gradient (dp(nzb+1)-dp(nzb))/dz is not used anywhere else.
+       IF ( ibc_p_b == 1 )  THEN
+!
+!--       Neumann (dp/dz = 0). Using surfae data type, first for non-natural 
+!--       surfaces, then for natural and urban surfaces
+!--       Upward facing
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             tend(k-1,j,i) = tend(k,j,i)
+          ENDDO
+!
+!--       Downward facing
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+             tend(k+1,j,i) = tend(k,j,i)
+          ENDDO
+
+       ELSE
+!
+!--       Dirichlet. Using surface data type, first for non-natural 
+!--       surfaces, then for natural and urban surfaces
+!--       Upward facing
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(0)%ns
+             i = bc_h(0)%i(m)
+             j = bc_h(0)%j(m)
+             k = bc_h(0)%k(m)
+             tend(k-1,j,i) = 0.0_wp
+          ENDDO
+!
+!--       Downward facing
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, bc_h(1)%ns
+             i = bc_h(1)%i(m)
+             j = bc_h(1)%j(m)
+             k = bc_h(1)%k(m)
+             tend(k+1,j,i) = 0.0_wp
+          ENDDO
+
+       ENDIF
+
+!
+!--    Top boundary
+       IF ( ibc_p_t == 1 )  THEN
+!
+!--       Neumann
+          !$OMP PARALLEL DO PRIVATE (i,j,k)
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                tend(nzt+1,j,i) = tend(nzt,j,i)
+             ENDDO
+          ENDDO
+
+       ELSE
+!
+!--       Dirichlet
+          !$OMP PARALLEL DO PRIVATE (i,j,k)
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                tend(nzt+1,j,i) = 0.0_wp
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!--    Exchange boundaries for p
+       CALL exchange_horiz( tend, nbgp )
+      
+    ELSEIF ( psolver == 'sor' )  THEN
+
+!
+!--    Solve Poisson equation for perturbation pressure using SOR-Red/Black
+!--    scheme
+       CALL sor( d, ddzu_pres, ddzw, p_loc )
+       tend = p_loc
+
+    ELSEIF ( psolver(1:9) == 'multigrid' )  THEN
+
+!
+!--    Solve Poisson equation for perturbation pressure using Multigrid scheme,
+!--    array tend is used to store the residuals.
+
+!--    If the number of grid points of the gathered grid, which is collected
+!--    on PE0, is larger than the number of grid points of an PE, than array
+!--    tend will be enlarged. 
+       IF ( gathered_size > subdomain_size )  THEN
+          DEALLOCATE( tend )
+          ALLOCATE( tend(nzb:nzt_mg(mg_switch_to_pe0_level)+1,nys_mg(          &
+                    mg_switch_to_pe0_level)-1:nyn_mg(mg_switch_to_pe0_level)+1,&
+                    nxl_mg(mg_switch_to_pe0_level)-1:nxr_mg(                   &
+                    mg_switch_to_pe0_level)+1) )
+       ENDIF
+
+       IF ( psolver == 'multigrid' )  THEN
+          CALL poismg( tend )
+       ELSE
+          CALL poismg_noopt( tend )
+       ENDIF
+
+       IF ( gathered_size > subdomain_size )  THEN
+          DEALLOCATE( tend )
+          ALLOCATE( tend(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ENDIF
+
+!
+!--    Restore perturbation pressure on tend because this array is used
+!--    further below to correct the velocity fields
+       DO  i = nxl-1, nxr+1
+          DO  j = nys-1, nyn+1
+             DO  k = nzb, nzt+1
+                tend(k,j,i) = p_loc(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+!
+!-- Store perturbation pressure on array p, used for pressure data output.
+!-- Ghost layers are added in the output routines (except sor-method: see below)
+    IF ( intermediate_timestep_count <= 1 )  THEN
+       !$OMP PARALLEL PRIVATE (i,j,k)
+       !$OMP DO
+       DO  i = nxl-1, nxr+1
+          DO  j = nys-1, nyn+1
+             DO  k = nzb, nzt+1
+                p(k,j,i) = tend(k,j,i) * &
+                           weight_substep_l
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+
+    ELSEIF ( intermediate_timestep_count > 1 )  THEN
+       !$OMP PARALLEL PRIVATE (i,j,k)
+       !$OMP DO
+       DO  i = nxl-1, nxr+1
+          DO  j = nys-1, nyn+1
+             DO  k = nzb, nzt+1
+                p(k,j,i) = p(k,j,i) + tend(k,j,i) * &
+                           weight_substep_l
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+
+    ENDIF
+       
+!
+!-- SOR-method needs ghost layers for the next timestep
+    IF ( psolver == 'sor' )  CALL exchange_horiz( p, nbgp )
+
+!
+!-- Correction of the provisional velocities with the current perturbation 
+!-- pressure just computed
+    IF ( conserve_volume_flow  .AND.  ( bc_lr_cyc .OR. bc_ns_cyc ) )  THEN
+       volume_flow_l(1) = 0.0_wp
+       volume_flow_l(2) = 0.0_wp
+    ENDIF
+!
+!-- Add pressure gradients to the velocity components. Note, the loops are
+!-- running over the entire model domain, even though, in case of non-cyclic 
+!-- boundaries u- and v-component are not prognostic at i=0 and j=0, 
+!-- respectiveley. However, in case of Dirichlet boundary conditions for the 
+!-- velocities, zero-gradient conditions for the pressure are set, so that
+!-- no modification is imposed at the boundaries. 
+    !$OMP PARALLEL PRIVATE (i,j,k)
+    !$OMP DO
+    DO  i = nxl, nxr   
+       DO  j = nys, nyn
+
+          DO  k = nzb+1, nzt
+             w(k,j,i) = w(k,j,i) - dt_3d *                                     &
+                           ( tend(k+1,j,i) - tend(k,j,i) ) * ddzu(k+1)         &
+                                     * weight_pres_l                           &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 3 )  &
+                                            )
+          ENDDO
+
+          DO  k = nzb+1, nzt
+             u(k,j,i) = u(k,j,i) - dt_3d *                                     &
+                           ( tend(k,j,i) - tend(k,j,i-1) ) * ddx               &
+                                     * weight_pres_l                           &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 )  &
+                                            )
+          ENDDO
+
+          DO  k = nzb+1, nzt
+             v(k,j,i) = v(k,j,i) - dt_3d *                                     &
+                           ( tend(k,j,i) - tend(k,j-1,i) ) * ddy               &
+                                     * weight_pres_l                           &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 )  &
+                                            )
+          ENDDO                                                         
+
+       ENDDO
+    ENDDO
+    !$OMP END PARALLEL
+
+!
+!-- The vertical velocity is not set to zero at nzt + 1 for nested domains
+!-- Instead it is set to the values of nzt (see routine vnest_boundary_conds 
+!-- or pmci_interp_tril_t) BEFORE calling the pressure solver. To avoid jumps
+!-- while plotting profiles w at the top has to be set to the values in the 
+!-- height nzt after above modifications. Hint: w level nzt+1 does not impact
+!-- results. 
+    IF ( child_domain  .OR.  coupling_mode == 'vnested_fine' ) THEN
+       w(nzt+1,:,:) = w(nzt,:,:)
+    ENDIF
+
+!
+!-- Sum up the volume flow through the right and north boundary
+    IF ( conserve_volume_flow  .AND.  bc_lr_cyc  .AND.  bc_ns_cyc  .AND.       &
+         nxr == nx )  THEN
+
+       !$OMP PARALLEL PRIVATE (j,k)
+       !$OMP DO
+       DO  j = nys, nyn
+          !$OMP CRITICAL
+          DO  k = nzb+1, nzt
+             volume_flow_l(1) = volume_flow_l(1) + u(k,j,nxr) * dzw(k)         &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,nxr), 1 )&
+                                            )
+          ENDDO
+          !$OMP END CRITICAL
+       ENDDO
+       !$OMP END PARALLEL
+
+    ENDIF
+
+    IF ( conserve_volume_flow  .AND.  bc_ns_cyc  .AND.  bc_lr_cyc  .AND.       &
+         nyn == ny )  THEN
+
+       !$OMP PARALLEL PRIVATE (i,k)
+       !$OMP DO
+       DO  i = nxl, nxr
+          !$OMP CRITICAL
+          DO  k = nzb+1, nzt
+             volume_flow_l(2) = volume_flow_l(2) + v(k,nyn,i) * dzw(k)         &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,nyn,i), 2 )&
+                                            )
+           ENDDO
+          !$OMP END CRITICAL
+       ENDDO
+       !$OMP END PARALLEL
+
+    ENDIF
+    
+!
+!-- Conserve the volume flow
+    IF ( conserve_volume_flow  .AND.  ( bc_lr_cyc  .AND.  bc_ns_cyc ) )  THEN
+
+#if defined( __parallel )   
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( volume_flow_l(1), volume_flow(1), 2, MPI_REAL, &
+                           MPI_SUM, comm2d, ierr )  
+#else
+       volume_flow = volume_flow_l  
+#endif   
+
+       volume_flow_offset(1:2) = ( volume_flow_initial(1:2) - volume_flow(1:2) ) / &
+                            volume_flow_area(1:2)
+
+       !$OMP PARALLEL PRIVATE (i,j,k)
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                u(k,j,i) = u(k,j,i) + volume_flow_offset(1)                    &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 )  &
+                                            )
+             ENDDO
+             DO  k = nzb+1, nzt
+                v(k,j,i) = v(k,j,i) + volume_flow_offset(2)                    &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 2 )  &
+                                            )
+             ENDDO
+          ENDDO
+       ENDDO
+
+       !$OMP END PARALLEL
+
+    ENDIF
+
+!
+!-- Exchange of boundaries for the velocities
+    CALL exchange_horiz( u, nbgp )
+    CALL exchange_horiz( v, nbgp )
+    CALL exchange_horiz( w, nbgp )
+
+!
+!-- Compute the divergence of the corrected velocity field,
+!-- A possible PE-sum is computed in flow_statistics. Carry out computation
+!-- only at last Runge-Kutta step.
+    IF ( intermediate_timestep_count == intermediate_timestep_count_max  .OR.  &
+         intermediate_timestep_count == 0 )  THEN
+       CALL cpu_log( log_point_s(1), 'divergence', 'start' )
+       sums_divnew_l = 0.0_wp
+
+!
+!--    d must be reset to zero because it can contain nonzero values below the
+!--    topography
+       IF ( topography /= 'flat' )  d = 0.0_wp
+
+       localsum  = 0.0_wp
+       threadsum = 0.0_wp
+
+       !$OMP PARALLEL PRIVATE (i,j,k) FIRSTPRIVATE(threadsum) REDUCTION(+:localsum)
+#if defined( __ibm )
+       !$OMP DO SCHEDULE( STATIC )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+             d(k,j,i) = ( ( u(k,j,i+1) - u(k,j,i) ) * rho_air(k) * ddx +       &
+                          ( v(k,j+1,i) - v(k,j,i) ) * rho_air(k) * ddy +       &
+                          ( w(k,j,i)   * rho_air_zw(k) -                       &
+                            w(k-1,j,i) * rho_air_zw(k-1) ) * ddzw(k)           &
+                        ) * MERGE( 1.0_wp, 0.0_wp,                             &
+                                   BTEST( wall_flags_0(k,j,i), 0 )             &
+                                 )
+             ENDDO
+             DO  k = nzb+1, nzt
+                threadsum = threadsum + ABS( d(k,j,i) )
+             ENDDO
+          ENDDO
+       ENDDO
+#else
+       !$OMP DO SCHEDULE( STATIC )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                d(k,j,i) = ( ( u(k,j,i+1) - u(k,j,i) ) * rho_air(k) * ddx +    &
+                             ( v(k,j+1,i) - v(k,j,i) ) * rho_air(k) * ddy +    &
+                             ( w(k,j,i)   * rho_air_zw(k) -                    &
+                               w(k-1,j,i) * rho_air_zw(k-1) ) * ddzw(k)        &
+                           ) * MERGE( 1.0_wp, 0.0_wp,                          &
+                                   BTEST( wall_flags_0(k,j,i), 0 )             &
+                                    )
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Compute possible PE-sum of divergences for flow_statistics
+       !$OMP DO SCHEDULE( STATIC )
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                threadsum = threadsum + ABS( d(k,j,i) )
+             ENDDO
+          ENDDO
+       ENDDO
+#endif
+
+       localsum = localsum + threadsum
+       !$OMP END PARALLEL
+
+!
+!--    For completeness, set the divergence sum of all statistic regions to those
+!--    of the total domain
+       sums_divnew_l(0:statistic_regions) = localsum
+
+       CALL cpu_log( log_point_s(1), 'divergence', 'stop' )
+
+    ENDIF
+
+    CALL cpu_log( log_point(8), 'pres', 'stop' )
+
+
+ END SUBROUTINE pres
Index: /palm/tags/release-6.0/SOURCE/print_1d.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/print_1d.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/print_1d.f90	(revision 3477)
@@ -0,0 +1,195 @@
+!> @file print_1d.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused format statement removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1697 2015-10-28 17:14:10Z raasch
+! small E- and F-FORMAT changes to avoid informative compiler messages about
+! insufficient field width
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.1  1997/09/19 07:45:22  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> List output of 1D-profiles.
+!------------------------------------------------------------------------------!
+ SUBROUTINE print_1d
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  run_description_header, simulated_time_chr
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzt
+
+    USE kinds
+
+    USE pegrid
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, hom, region, statistic_regions
+
+    IMPLICIT NONE
+
+
+    CHARACTER (LEN=20) ::  period_chr  !<
+
+    INTEGER(iwp) ::  k   !<
+    INTEGER(iwp) ::  sr  !<
+
+
+!
+!-- If required, compute statistics.
+    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
+
+!
+!-- Flow_statistics has its own cpu-time measuring.
+    CALL cpu_log( log_point(18), 'print_1d', 'start' )
+
+    IF ( myid == 0 )  THEN
+!
+!--    Open file for list output of profiles.
+       CALL check_open( 16 )
+
+!
+!--    Prepare header.
+       period_chr = ' no time-average!'
+
+!
+!--    Output for the total domain (and each subregion, if applicable).
+       DO  sr = 0, statistic_regions
+!
+!--       Write header.
+          WRITE ( 16, 112 )
+          WRITE ( 16, 100 )  TRIM( run_description_header ) // '    ' // &
+                             TRIM( region( sr ) ), TRIM( period_chr ), 'uv'
+          WRITE ( 16, 105 )  TRIM( simulated_time_chr )
+          WRITE ( 16, 111 )
+
+!
+!--       Output of values on the scalar levels.
+          WRITE ( 16, 120 )
+          WRITE ( 16, 111 )
+          DO  k = nzt+1, nzb, -1
+             WRITE ( 16, 121)  k, zu(k), hom(k,1,1,sr),           &
+                               hom(k,1,1,sr) - hom(k,1,5,sr),     &
+                               hom(k,1,2,sr),                     &
+                               hom(k,1,2,sr) - hom(k,1,6,sr),     &
+                               hom(k,1,4,sr),                     &
+                               hom(k,1,4,sr) - hom(k,1,7,sr),     &
+                               hom(k,1,8,sr), hom(k,1,9,sr),      &
+                               hom(k,1,10,sr), hom(k,1,11,sr), zu(k), k
+          ENDDO
+          WRITE ( 16, 111 )
+          WRITE ( 16, 120 )
+          WRITE ( 16, 111 )
+
+!
+!--       Output of values on the w-levels.
+          WRITE ( 16, 112 )
+          WRITE ( 16, 100 )  TRIM( run_description_header ) // '    ' // &
+                             TRIM( region( sr ) ), TRIM( period_chr ), 'w'
+          WRITE ( 16, 105 )  TRIM( simulated_time_chr )
+          WRITE ( 16, 111 )
+
+          WRITE ( 16, 130 )
+          WRITE ( 16, 111 )
+          DO  k = nzt+1, nzb, -1
+             WRITE ( 16, 131)  k, zw(k), hom(k,1,16,sr),            &
+                               hom(k,1,18,sr), hom(k,1,12,sr), &
+                               hom(k,1,19,sr), hom(k,1,14,sr), &
+                               hom(k,1,20,sr), zw(k), k
+          ENDDO
+          WRITE ( 16, 111 )
+          WRITE ( 16, 130 )
+          WRITE ( 16, 111 )
+
+       ENDDO
+
+    ENDIF
+
+    CALL cpu_log( log_point(18), 'print_1d', 'stop' )
+
+!
+!-- Formats.
+100 FORMAT (1X,A/1X,10('-')/ &
+            ' Horizontally',A,' averaged profiles on the ',A,'-level')
+105 FORMAT (' Time: ',A)
+111 FORMAT (1X,131('-'))
+112 FORMAT (/)
+120 FORMAT ('   k     zu      u     du     v     dv     theta dtheta ', &
+            ' e      Km    Kh     l      zu      k')
+121 FORMAT (1X,I4,1X,F7.1,1X,F6.2,1X,F5.2,1X,F6.2,1X,F5.2,2X,F6.2,1X,F5.2, &
+            1X,F7.4,1X,F5.2,1X,F5.2,1X,F6.2,1X,F7.1,2X,I4)
+130 FORMAT ('   k     zw       w''theta''   wtheta     w''u''       wu       ',&
+            '  w''v''       wv        zw      k')
+131 FORMAT (1X,I4,1X,F7.1,6(1X,E10.3),1X,F7.1,2X,I4)
+
+
+ END SUBROUTINE print_1d
Index: /palm/tags/release-6.0/SOURCE/prognostic_equations.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/prognostic_equations.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/prognostic_equations.f90	(revision 3477)
@@ -0,0 +1,2625 @@
+!> @file prognostic_equations.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! Remove cpu-logs from i,j loop in cache version.
+! 
+! 3458 2018-10-30 14:51:23Z kanani
+! remove duplicate USE chem_modules
+! from chemistry branch r3443, banzhafs, basit:
+! chem_depo call introduced
+! code added for decycling chemistry
+!
+! 3386 2018-10-19 16:28:22Z gronemeier
+! Renamed tcm_prognostic to tcm_prognostic_equations
+! 
+! 3355 2018-10-16 14:03:34Z knoop
+! (from branch resler)
+! Fix for chemistry call
+! 
+! 3302 2018-10-03 02:39:40Z raasch
+! Stokes drift + wave breaking term added
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! Code added for decycling chemistry (basit)
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! omp_get_thread_num now declared in omp directive
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Remove unused variables from USE statements
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Revise recent bugfix for nesting
+! 
+! 3021 2018-05-16 08:14:20Z maronga
+! Bugfix in IF clause for nesting
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Fixed a bug in the IF condition to call pcm_tendency in case of 
+! potential temperature
+! 
+! 2815 2018-02-19 11:29:57Z kanani
+! Rename chem_tendency to chem_prognostic_equations,
+! implement vector version for air chemistry
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2719 2018-01-02 09:02:06Z maronga
+! Bugfix for last change.
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Moved TKE equation to tcm_prognostic (TG)
+! - Added switch for chemical reactions (RF, FK)
+! - Implementation of chemistry module (RF, BK, FK)
+! 
+! 2563 2017-10-19 15:36:10Z Giersch
+! Variable wind_turbine moved to module control_parameters
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Modularize large-scale forcing and nudging
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2261 2017-06-08 14:25:57Z raasch
+! bugfix for r2232: openmp directives removed
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjutst to new surface-type structure. Remove call for usm_wall_heat_flux, 
+! which is realized directly in diffusion_s now.
+! 
+! 2192 2017-03-22 04:14:10Z raasch
+! Bugfix for misplaced and missing openMP directives from r2155
+!
+! 2155 2017-02-21 09:57:40Z hoffmann
+! Bugfix in the calculation of microphysical quantities on ghost points.
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC version of subroutine removed
+!
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+!
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters.
+!
+! 2007 2016-08-24 15:47:17Z kanani
+! Added pt tendency calculation based on energy balance at urban surfaces
+! (new urban surface model)
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1976 2016-07-27 13:28:04Z maronga
+! Simplied calls to radiation model
+!
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+!
+! 1914 2016-05-26 14:44:07Z witha
+! Added calls for wind turbine model
+!
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Renamed canopy model calls.
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! Kessler microphysics scheme moved to microphysics.
+!
+! 1757 2016-02-22 15:49:32Z maronga
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added optional model spin-up without radiation / land surface model calls.
+! Formatting corrections.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1585 2015-04-30 07:05:52Z maronga
+! Added call for temperature tendency calculation due to radiative flux divergence
+!
+! 1517 2015-01-07 19:12:25Z hoffmann
+! advec_s_bc_mod addded, since advec_s_bc is now a module
+!
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+! parameters cthf and plant_canopy moved to module plant_canopy_model_mod.
+! Removed double-listing of use_upstream_for_tke in ONLY-list of module
+! control_parameters
+!
+! 1409 2014-05-23 12:11:32Z suehring
+! Bugfix: i_omp_start changed for advec_u_ws at left inflow and outflow boundary.
+! This ensures that left-hand side fluxes are also calculated for nxl in that
+! case, even though the solution at nxl is overwritten in boundary_conds()
+!
+! 1398 2014-05-07 11:15:00Z heinze
+! Rayleigh-damping for horizontal velocity components changed: instead of damping
+! against ug and vg, damping against u_init and v_init is used to allow for a
+! homogenized treatment in case of nudging
+!
+! 1380 2014-04-28 12:40:45Z heinze
+! Change order of calls for scalar prognostic quantities:
+! ls_advec -> nudging -> subsidence since initial profiles
+!
+! 1374 2014-04-25 12:55:07Z raasch
+! missing variables added to ONLY lists
+!
+! 1365 2014-04-22 15:03:56Z boeske
+! Calls of ls_advec for large scale advection added,
+! subroutine subsidence is only called if use_subsidence_tendencies = .F.,
+! new argument ls_index added to the calls of subsidence
+! +ls_index
+!
+! 1361 2014-04-16 15:17:48Z hoffmann
+! Two-moment microphysics moved to the start of prognostic equations. This makes
+! the 3d arrays for tend_q, tend_qr, tend_pt and tend_pt redundant.
+! Additionally, it is allowed to call the microphysics just once during the time
+! step (not at each sub-time step).
+!
+! Two-moment cloud physics added for vector and accelerator optimization.
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1337 2014-03-25 15:11:48Z heinze
+! Bugfix: REAL constants provided with KIND-attribute
+!
+! 1332 2014-03-25 11:59:43Z suehring
+! Bugfix: call advec_ws or advec_pw for TKE only if NOT use_upstream_for_tke
+!
+! 1330 2014-03-24 17:29:32Z suehring
+! In case of SGS-particle velocity advection of TKE is also allowed with
+! dissipative 5th-order scheme.
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop vector clauses removed, independent clauses added
+!
+! 1246 2013-11-01 08:59:45Z heinze
+! enable nudging also for accelerator version
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! usage of nudging enabled (so far not implemented for accelerator version)
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! two arguments removed from routine buoyancy, ref_state updated on device
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! those parts requiring global communication moved to time_integration,
+! loop index bounds in accelerator version replaced by i_left, i_right, j_south,
+! j_north
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! optimized cloud physics: calculation of microphysical tendencies transfered
+! to microphysics.f90; qr and nr are only calculated if precipitation is required
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! update directives for prognostic quantities removed
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! small changes in code formatting
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! implementation of two new prognostic equations for rain drop concentration (nr)
+! and rain water content (qr)
+!
+! currently, only available for cache loop optimization
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1019 2012-09-28 06:46:45Z raasch
+! non-optimized version of prognostic_equations removed
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! new branch prognostic_equations_acc
+! OpenACC statements added + code changes required for GPU optimization
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog- and upstream-spline-scheme removed
+!
+! 978 2012-08-09 08:28:32Z fricke
+! km_damp_x and km_damp_y removed in calls of diffusion_u and diffusion_v
+! add ptdf_x, ptdf_y for damping the potential temperature at the inflow
+! boundary in case of non-cyclic lateral boundaries
+! Bugfix: first thread index changes for WS-scheme at the inflow
+!
+! 940 2012-07-09 14:31:00Z raasch
+! temperature equation can be switched off
+!
+! Revision 1.1  2000/04/13 14:56:27  schroeter
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Solving the prognostic equations.
+!------------------------------------------------------------------------------!
+ MODULE prognostic_equations_mod
+
+
+    USE advec_s_bc_mod,                                                        &
+        ONLY:  advec_s_bc
+
+    USE advec_s_pw_mod,                                                        &
+        ONLY:  advec_s_pw
+
+    USE advec_s_up_mod,                                                        &
+        ONLY:  advec_s_up
+
+    USE advec_u_pw_mod,                                                        &
+        ONLY:  advec_u_pw
+
+    USE advec_u_up_mod,                                                        &
+        ONLY:  advec_u_up
+
+    USE advec_v_pw_mod,                                                        &
+        ONLY:  advec_v_pw
+
+    USE advec_v_up_mod,                                                        &
+        ONLY:  advec_v_up
+
+    USE advec_w_pw_mod,                                                        &
+        ONLY:  advec_w_pw
+
+    USE advec_w_up_mod,                                                        &
+        ONLY:  advec_w_up
+
+    USE advec_ws,                                                              &
+        ONLY:  advec_s_ws, advec_u_ws, advec_v_ws, advec_w_ws
+
+    USE arrays_3d,                                                             &
+        ONLY:  diss_l_e, diss_l_nc, diss_l_nr, diss_l_pt, diss_l_q, diss_l_qc, &
+               diss_l_qr, diss_l_s, diss_l_sa, diss_s_e, diss_s_nc, diss_s_nr, &
+               diss_s_pt, diss_s_q, diss_s_qc, diss_s_qr, diss_s_s, diss_s_sa, &
+               e, e_p, flux_s_e, flux_s_nc, flux_s_nr, flux_s_pt, flux_s_q,    &
+               flux_s_qc, flux_s_qr, flux_s_s, flux_s_sa, flux_l_e, flux_l_nc, &
+               flux_l_nr, flux_l_pt, flux_l_q, flux_l_qc, flux_l_qr, flux_l_s, &
+               flux_l_sa, nc, nc_p, nr, nr_p, pt, ptdf_x, ptdf_y, pt_init,     &
+               pt_p, prho, q, q_init, q_p, qc, qc_p, qr, qr_p, rdf, rdf_sc,    &
+               ref_state, rho_ocean, s, s_init, s_p, tend, te_m, tnc_m,        &
+               tnr_m, tpt_m, tq_m, tqc_m, tqr_m, ts_m, tu_m, tv_m, tw_m, u,    &
+               ug, u_init, u_p, v, vg, vpt, v_init, v_p, w, w_p
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  call_microphysics_at_all_substeps, bulk_cloud_model,            &
+               bcm_actions, microphysics_sat_adjust,                           &
+               microphysics_morrison, microphysics_seifert
+
+    USE buoyancy_mod,                                                          &
+        ONLY:  buoyancy
+           
+    USE chem_modules,                                                          &
+        ONLY:  call_chem_at_all_substeps, chem_gasphase_on, cs_name, do_depo
+
+    USE chem_photolysis_mod,                                                   &
+        ONLY:  photolysis_control
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_boundary_conds, chem_depo, chem_integrate,                 &
+               chem_prognostic_equations, chem_species,                        &
+               nspec, nvar, spc_names
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, constant_diffusion,                              &
+               dp_external, dp_level_ind_b, dp_smooth_factor, dpdxy, dt_3d,    &
+               humidity, intermediate_timestep_count,                          &
+               intermediate_timestep_count_max, large_scale_forcing,           &
+               large_scale_subsidence, neutral, nudging,                       &
+               ocean_mode, passive_scalar, plant_canopy, pt_reference,         &
+               scalar_advec, scalar_advec, simulated_time, sloping_surface,    &
+               timestep_scheme, tsc, use_subsidence_tendencies,                &
+               use_upstream_for_tke, wind_turbine, ws_scheme_mom,              & 
+               ws_scheme_sca, urban_surface, land_surface,                     &
+               time_since_reference_point
+
+    USE coriolis_mod,                                                          &
+        ONLY:  coriolis
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE diffusion_s_mod,                                                       &
+        ONLY:  diffusion_s
+
+    USE diffusion_u_mod,                                                       &
+        ONLY:  diffusion_u
+
+    USE diffusion_v_mod,                                                       &
+        ONLY:  diffusion_v
+
+    USE diffusion_w_mod,                                                       &
+        ONLY:  diffusion_w
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxlu, nxr, nxrg, nyn, nyng, nys, nysg, nysv,   &
+               nzb, nzt, wall_flags_0
+
+    USE kinds
+
+    USE lsf_nudging_mod,                                                       &
+        ONLY:  ls_advec, nudge
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_prognostic_equations, stokes_drift_terms, stokes_force,   &
+               wave_breaking, wave_breaking_term
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  cthf, pcm_tendency
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_tendency,                                  &
+               skip_time_do_radiation
+                          
+    USE salsa_mod,                                                             &
+        ONLY:  aerosol_mass, aerosol_number, dt_salsa, last_salsa_time, nbins, &
+               ncc_tot, ngast, salsa, salsa_boundary_conds, salsa_diagnostics, &
+               salsa_driver, salsa_gas, salsa_gases_from_chem, salsa_tendency, &
+               skip_time_do_salsa
+               
+    USE salsa_util_mod,                                                        &
+        ONLY:  sums_salsa_ws_l                              
+    
+    USE statistics,                                                            &
+        ONLY:  hom
+
+    USE subsidence_mod,                                                        &
+        ONLY:  subsidence
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                surf_usm_v
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_prognostic_equations
+
+    USE user_actions_mod,                                                      &
+        ONLY:  user_actions
+
+    USE wind_turbine_model_mod,                                                &
+        ONLY:  wtm_tendencies
+
+
+    PRIVATE
+    PUBLIC prognostic_equations_cache, prognostic_equations_vector
+
+    INTERFACE prognostic_equations_cache
+       MODULE PROCEDURE prognostic_equations_cache
+    END INTERFACE prognostic_equations_cache
+
+    INTERFACE prognostic_equations_vector
+       MODULE PROCEDURE prognostic_equations_vector
+    END INTERFACE prognostic_equations_vector
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Version with one optimized loop over all equations. It is only allowed to
+!> be called for the Wicker and Skamarock or Piascek-Williams advection scheme.
+!>
+!> Here the calls of most subroutines are embedded in two DO loops over i and j,
+!> so communication between CPUs is not allowed (does not make sense) within
+!> these loops.
+!>
+!> (Optimized to avoid cache missings, i.e. for Power4/5-architectures.)
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE prognostic_equations_cache
+
+
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  b                   !< index for aerosol size bins (salsa)
+    INTEGER(iwp) ::  c                   !< index for chemical compounds (salsa)
+    INTEGER(iwp) ::  g                   !< index for gaseous compounds (salsa)
+    INTEGER(iwp) ::  i                   !<
+    INTEGER(iwp) ::  i_omp_start         !<
+    INTEGER(iwp) ::  j                   !<
+    INTEGER(iwp) ::  k                   !<
+!$  INTEGER(iwp) ::  omp_get_thread_num  !<
+    INTEGER(iwp) ::  tn = 0              !<
+
+    LOGICAL      ::  loop_start          !<
+    INTEGER(iwp) ::  n
+    INTEGER(iwp) :: lsp
+    INTEGER(iwp) :: lsp_usr              !< lsp running index for chem spcs
+
+
+!
+!-- Time measurement can only be performed for the whole set of equations
+    CALL cpu_log( log_point(32), 'all progn.equations', 'start' )
+
+!
+!-- Calculation of chemical reactions. This is done outside of main loop,
+!-- since exchange of ghost points is required after this update of the
+!-- concentrations of chemical species                                    
+    IF ( air_chemistry )  THEN
+       lsp_usr = 1
+!
+!--    Chemical reactions
+       CALL cpu_log( log_point(82), '(chem react + exch_h)', 'start' )
+  
+       IF ( chem_gasphase_on ) THEN
+!
+!--       If required, calculate photolysis frequencies - 
+!--       UNFINISHED: Why not before the intermediate timestep loop?
+          IF ( intermediate_timestep_count ==  1 )  THEN
+             CALL photolysis_control
+          ENDIF
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                IF ( intermediate_timestep_count == 1 .OR.                        &
+                     call_chem_at_all_substeps )  THEN
+                   CALL chem_integrate (i,j)
+                   IF ( do_depo )  THEN
+                      CALL chem_depo(i,j)
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDIF
+!
+!--    Loop over chemical species       
+       CALL cpu_log( log_point_s(84), 'chemistry exch-horiz ', 'start' )
+       DO  lsp = 1, nspec
+          CALL exchange_horiz( chem_species(lsp)%conc, nbgp )    
+          lsp_usr = 1  
+          DO WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' )
+             IF ( TRIM(chem_species(lsp)%name) == TRIM(cs_name(lsp_usr)) )  THEN
+
+                CALL chem_boundary_conds( chem_species(lsp)%conc_p,                                 &
+                                          chem_species(lsp)%conc_pr_init ) 
+             
+             ENDIF
+             lsp_usr = lsp_usr +1
+          ENDDO
+
+
+       ENDDO
+       CALL cpu_log( log_point_s(84), 'chemistry exch-horiz ', 'stop' )
+     
+       CALL cpu_log( log_point(82), '(chem react + exch_h)', 'stop' )
+
+    ENDIF       
+
+!
+!-- Run SALSA and aerosol dynamic processes. SALSA is run with a longer time 
+!-- step. The exchange of ghost points is required after this update of the 
+!-- concentrations of aerosol number and mass 
+    IF ( salsa )  THEN
+       
+       IF ( time_since_reference_point >= skip_time_do_salsa )  THEN                 
+          IF ( ( time_since_reference_point - last_salsa_time ) >= dt_salsa )  &
+          THEN
+             CALL cpu_log( log_point_s(90), 'salsa processes ', 'start' )
+             !$OMP PARALLEL PRIVATE (i,j,b,c,g)
+             !$OMP DO
+!
+!--          Call salsa processes
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   CALL salsa_diagnostics( i, j )
+                   CALL salsa_driver( i, j, 3 )
+                   CALL salsa_diagnostics( i, j )
+                ENDDO
+             ENDDO
+             
+             CALL cpu_log( log_point_s(90), 'salsa processes ', 'stop' )
+             
+             CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'start' )
+!
+!--          Exchange ghost points and decycle if needed.
+             DO  b = 1, nbins
+                CALL exchange_horiz( aerosol_number(b)%conc, nbgp )
+                CALL salsa_boundary_conds( aerosol_number(b)%conc_p,           &
+                                           aerosol_number(b)%init )
+                DO  c = 1, ncc_tot
+                   CALL exchange_horiz( aerosol_mass((c-1)*nbins+b)%conc, nbgp )
+                   CALL salsa_boundary_conds(                                  &
+                                           aerosol_mass((c-1)*nbins+b)%conc_p, &
+                                           aerosol_mass((c-1)*nbins+b)%init )
+                ENDDO
+             ENDDO
+             
+             IF ( .NOT. salsa_gases_from_chem )  THEN
+                DO  g = 1, ngast
+                   CALL exchange_horiz( salsa_gas(g)%conc, nbgp )
+                   CALL salsa_boundary_conds( salsa_gas(g)%conc_p,             &
+                                              salsa_gas(g)%init )
+                ENDDO
+             ENDIF
+             CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'stop' )
+             
+             !$OMP END PARALLEL
+             last_salsa_time = time_since_reference_point
+             
+          ENDIF
+          
+       ENDIF
+       
+    ENDIF 
+
+!
+!-- If required, calculate cloud microphysics
+    IF ( bulk_cloud_model  .AND.  .NOT. microphysics_sat_adjust  .AND.         &
+         ( intermediate_timestep_count == 1  .OR.                              &
+           call_microphysics_at_all_substeps ) )                               &
+    THEN
+       !$OMP PARALLEL PRIVATE (i,j)
+       !$OMP DO
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             CALL bcm_actions( i, j )
+           ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+    ENDIF
+
+!
+!-- Loop over all prognostic equations
+!-- b, c ang g added for SALSA
+    !$OMP PARALLEL PRIVATE (i,i_omp_start,j,k,loop_start,tn,b,c,g)
+
+    !$  tn = omp_get_thread_num()
+    loop_start = .TRUE.
+
+    !$OMP DO
+    DO  i = nxl, nxr
+
+!
+!--    Store the first loop index. It differs for each thread and is required
+!--    later in advec_ws
+       IF ( loop_start )  THEN
+          loop_start  = .FALSE.
+          i_omp_start = i
+       ENDIF
+
+       DO  j = nys, nyn
+!
+!--       Tendency terms for u-velocity component. Please note, in case of 
+!--       non-cyclic boundary conditions the grid point i=0 is excluded from
+!--       the prognostic equations for the u-component.    
+          IF ( i >= nxlu )  THEN
+
+             tend(:,j,i) = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_mom )  THEN
+                   CALL advec_u_ws( i, j, i_omp_start, tn )
+                ELSE
+                   CALL advec_u_pw( i, j )
+                ENDIF
+             ELSE
+                CALL advec_u_up( i, j )
+             ENDIF
+             CALL diffusion_u( i, j )
+             CALL coriolis( i, j, 1 )
+             IF ( sloping_surface  .AND.  .NOT. neutral )  THEN
+                CALL buoyancy( i, j, pt, 1 )
+             ENDIF
+
+!
+!--          Drag by plant canopy
+             IF ( plant_canopy )  CALL pcm_tendency( i, j, 1 )
+
+!
+!--          External pressure gradient
+             IF ( dp_external )  THEN
+                DO  k = dp_level_ind_b+1, nzt
+                   tend(k,j,i) = tend(k,j,i) - dpdxy(1) * dp_smooth_factor(k)
+                ENDDO
+             ENDIF
+
+!
+!--          Nudging
+             IF ( nudging )  CALL nudge( i, j, simulated_time, 'u' )
+
+!
+!--          Effect of Stokes drift (in ocean mode only)
+             IF ( stokes_force )  CALL stokes_drift_terms( i, j, 1 )
+
+!
+!--          Forces by wind turbines
+             IF ( wind_turbine )  CALL wtm_tendencies( i, j, 1 )
+
+             CALL user_actions( i, j, 'u-tendency' )
+!
+!--          Prognostic equation for u-velocity component
+             DO  k = nzb+1, nzt
+
+                u_p(k,j,i) = u(k,j,i) + ( dt_3d *                               &
+                                            ( tsc(2) * tend(k,j,i) +            &
+                                              tsc(3) * tu_m(k,j,i) )            &
+                                            - tsc(5) * rdf(k)                   &
+                                                     * ( u(k,j,i) - u_init(k) ) &
+                                        ) * MERGE( 1.0_wp, 0.0_wp,              &
+                                                   BTEST( wall_flags_0(k,j,i), 1 )&
+                                                 )
+             ENDDO
+
+!
+!--          Add turbulence generated by wave breaking (in ocean mode only)
+             IF ( wave_breaking  .AND.                                         &
+               intermediate_timestep_count == intermediate_timestep_count_max )&
+             THEN
+                CALL wave_breaking_term( i, j, 1 )
+             ENDIF
+
+!
+!--          Calculate tendencies for the next Runge-Kutta step
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( intermediate_timestep_count == 1 )  THEN
+                   DO  k = nzb+1, nzt
+                      tu_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ELSEIF ( intermediate_timestep_count < &
+                         intermediate_timestep_count_max )  THEN
+                   DO  k = nzb+1, nzt
+                      tu_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                &
+                                     + 5.3125_wp * tu_m(k,j,i)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+          ENDIF
+!
+!--       Tendency terms for v-velocity component. Please note, in case of 
+!--       non-cyclic boundary conditions the grid point j=0 is excluded from
+!--       the prognostic equations for the v-component. !--       
+          IF ( j >= nysv )  THEN
+
+             tend(:,j,i) = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_mom )  THEN
+                    CALL advec_v_ws( i, j, i_omp_start, tn )
+                ELSE
+                    CALL advec_v_pw( i, j )
+                ENDIF
+             ELSE
+                CALL advec_v_up( i, j )
+             ENDIF
+             CALL diffusion_v( i, j )
+             CALL coriolis( i, j, 2 )
+
+!
+!--          Drag by plant canopy
+             IF ( plant_canopy )  CALL pcm_tendency( i, j, 2 )
+
+!
+!--          External pressure gradient
+             IF ( dp_external )  THEN
+                DO  k = dp_level_ind_b+1, nzt
+                   tend(k,j,i) = tend(k,j,i) - dpdxy(2) * dp_smooth_factor(k)
+                ENDDO
+             ENDIF
+
+!
+!--          Nudging
+             IF ( nudging )  CALL nudge( i, j, simulated_time, 'v' )
+
+!
+!--          Effect of Stokes drift (in ocean mode only)
+             IF ( stokes_force )  CALL stokes_drift_terms( i, j, 2 )
+
+!
+!--          Forces by wind turbines
+             IF ( wind_turbine )  CALL wtm_tendencies( i, j, 2 )
+
+             CALL user_actions( i, j, 'v-tendency' )
+!
+!--          Prognostic equation for v-velocity component
+             DO  k = nzb+1, nzt
+                v_p(k,j,i) = v(k,j,i) + ( dt_3d *                              &
+                                            ( tsc(2) * tend(k,j,i) +           &
+                                              tsc(3) * tv_m(k,j,i) )           &
+                                            - tsc(5) * rdf(k)                  &
+                                                     * ( v(k,j,i) - v_init(k) )&
+                                        ) * MERGE( 1.0_wp, 0.0_wp,             &
+                                                   BTEST( wall_flags_0(k,j,i), 2 )&
+                                                 )
+             ENDDO
+
+!
+!--          Add turbulence generated by wave breaking (in ocean mode only)
+             IF ( wave_breaking  .AND.                                         &
+               intermediate_timestep_count == intermediate_timestep_count_max )&
+             THEN
+                CALL wave_breaking_term( i, j, 2 )
+             ENDIF
+
+!
+!--          Calculate tendencies for the next Runge-Kutta step
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( intermediate_timestep_count == 1 )  THEN
+                   DO  k = nzb+1, nzt
+                      tv_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ELSEIF ( intermediate_timestep_count < &
+                         intermediate_timestep_count_max )  THEN
+                   DO  k = nzb+1, nzt
+                      tv_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                 &
+                                     + 5.3125_wp * tv_m(k,j,i)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+          ENDIF
+
+!
+!--       Tendency terms for w-velocity component
+          tend(:,j,i) = 0.0_wp
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( ws_scheme_mom )  THEN
+                CALL advec_w_ws( i, j, i_omp_start, tn )
+             ELSE
+                CALL advec_w_pw( i, j )
+             END IF
+          ELSE
+             CALL advec_w_up( i, j )
+          ENDIF
+          CALL diffusion_w( i, j )
+          CALL coriolis( i, j, 3 )
+
+          IF ( .NOT. neutral )  THEN
+             IF ( ocean_mode )  THEN
+                CALL buoyancy( i, j, rho_ocean, 3 )
+             ELSE
+                IF ( .NOT. humidity )  THEN
+                   CALL buoyancy( i, j, pt, 3 )
+                ELSE
+                   CALL buoyancy( i, j, vpt, 3 )
+                ENDIF
+             ENDIF
+          ENDIF
+
+!
+!--       Drag by plant canopy
+          IF ( plant_canopy )  CALL pcm_tendency( i, j, 3 )
+
+!
+!--       Effect of Stokes drift (in ocean mode only)
+          IF ( stokes_force )  CALL stokes_drift_terms( i, j, 3 )
+
+!
+!--       Forces by wind turbines
+          IF ( wind_turbine )  CALL wtm_tendencies( i, j, 3 )
+
+          CALL user_actions( i, j, 'w-tendency' )
+!
+!--       Prognostic equation for w-velocity component
+          DO  k = nzb+1, nzt-1
+             w_p(k,j,i) = w(k,j,i) + ( dt_3d *                                 &
+                                             ( tsc(2) * tend(k,j,i) +          &
+                                               tsc(3) * tw_m(k,j,i) )          &
+                                             - tsc(5) * rdf(k) * w(k,j,i)      &
+                                     ) * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 3 )&
+                                              )
+          ENDDO
+
+!
+!--       Calculate tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                DO  k = nzb+1, nzt-1
+                   tw_m(k,j,i) = tend(k,j,i)
+                ENDDO
+             ELSEIF ( intermediate_timestep_count < &
+                      intermediate_timestep_count_max )  THEN
+                DO  k = nzb+1, nzt-1
+                   tw_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                    &
+                                  + 5.3125_wp * tw_m(k,j,i)
+                ENDDO
+             ENDIF
+          ENDIF
+
+!
+!--       If required, compute prognostic equation for potential temperature
+          IF ( .NOT. neutral )  THEN
+!
+!--          Tendency terms for potential temperature
+             tend(:,j,i) = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( ws_scheme_sca )  THEN
+                      CALL advec_s_ws( i, j, pt, 'pt', flux_s_pt, diss_s_pt,   &
+                                       flux_l_pt, diss_l_pt, i_omp_start, tn )
+                   ELSE
+                      CALL advec_s_pw( i, j, pt )
+                   ENDIF
+             ELSE
+                CALL advec_s_up( i, j, pt )
+             ENDIF
+             CALL diffusion_s( i, j, pt,                                       &
+                               surf_def_h(0)%shf, surf_def_h(1)%shf,           &
+                               surf_def_h(2)%shf,                              &
+                               surf_lsm_h%shf,    surf_usm_h%shf,              &
+                               surf_def_v(0)%shf, surf_def_v(1)%shf,           &
+                               surf_def_v(2)%shf, surf_def_v(3)%shf,           &
+                               surf_lsm_v(0)%shf, surf_lsm_v(1)%shf,           &
+                               surf_lsm_v(2)%shf, surf_lsm_v(3)%shf,           &
+                               surf_usm_v(0)%shf, surf_usm_v(1)%shf,           &
+                               surf_usm_v(2)%shf, surf_usm_v(3)%shf )
+
+!
+!--          Consideration of heat sources within the plant canopy
+             IF ( plant_canopy  .AND.                                          &
+                (cthf /= 0.0_wp  .OR. urban_surface  .OR.  land_surface) )  THEN
+                CALL pcm_tendency( i, j, 4 )
+             ENDIF
+
+!
+!--          Large scale advection
+             IF ( large_scale_forcing )  THEN
+                CALL ls_advec( i, j, simulated_time, 'pt' )
+             ENDIF
+
+!
+!--          Nudging
+             IF ( nudging )  CALL nudge( i, j, simulated_time, 'pt' )
+
+!
+!--          If required, compute effect of large-scale subsidence/ascent
+             IF ( large_scale_subsidence  .AND.                                &
+                  .NOT. use_subsidence_tendencies )  THEN
+                CALL subsidence( i, j, tend, pt, pt_init, 2 )
+             ENDIF
+
+!
+!--          If required, add tendency due to radiative heating/cooling
+             IF ( radiation  .AND.                                             &
+                  simulated_time > skip_time_do_radiation )  THEN
+                CALL radiation_tendency ( i, j, tend )
+             ENDIF
+
+
+             CALL user_actions( i, j, 'pt-tendency' )
+!
+!--          Prognostic equation for potential temperature
+             DO  k = nzb+1, nzt
+                pt_p(k,j,i) = pt(k,j,i) + ( dt_3d *                            &
+                                                  ( tsc(2) * tend(k,j,i) +     &
+                                                    tsc(3) * tpt_m(k,j,i) )    &
+                                                  - tsc(5)                     &
+                                                  * ( pt(k,j,i) - pt_init(k) ) &
+                                                  * ( rdf_sc(k) + ptdf_x(i)    &
+                                                                + ptdf_y(j) )  &
+                                          )                                    &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              )
+             ENDDO
+
+!
+!--          Calculate tendencies for the next Runge-Kutta step
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( intermediate_timestep_count == 1 )  THEN
+                   DO  k = nzb+1, nzt
+                      tpt_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ELSEIF ( intermediate_timestep_count < &
+                         intermediate_timestep_count_max )  THEN
+                   DO  k = nzb+1, nzt
+                      tpt_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +              &
+                                        5.3125_wp * tpt_m(k,j,i)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+          ENDIF
+
+!
+!--       If required, compute prognostic equation for total water content
+          IF ( humidity )  THEN
+
+!
+!--          Tendency-terms for total water content / scalar
+             tend(:,j,i) = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' ) &
+             THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( i, j, q, 'q', flux_s_q, &
+                                diss_s_q, flux_l_q, diss_l_q, i_omp_start, tn )
+                ELSE
+                   CALL advec_s_pw( i, j, q )
+                ENDIF
+             ELSE
+                CALL advec_s_up( i, j, q )
+             ENDIF
+             CALL diffusion_s( i, j, q,                                        &
+                               surf_def_h(0)%qsws, surf_def_h(1)%qsws,         &
+                               surf_def_h(2)%qsws,                             &
+                               surf_lsm_h%qsws,    surf_usm_h%qsws,            &
+                               surf_def_v(0)%qsws, surf_def_v(1)%qsws,         &
+                               surf_def_v(2)%qsws, surf_def_v(3)%qsws,         &
+                               surf_lsm_v(0)%qsws, surf_lsm_v(1)%qsws,         &
+                               surf_lsm_v(2)%qsws, surf_lsm_v(3)%qsws,         &
+                               surf_usm_v(0)%qsws, surf_usm_v(1)%qsws,         &
+                               surf_usm_v(2)%qsws, surf_usm_v(3)%qsws )
+
+!
+!--          Sink or source of humidity due to canopy elements
+             IF ( plant_canopy )  CALL pcm_tendency( i, j, 5 )
+
+!
+!--          Large scale advection
+             IF ( large_scale_forcing )  THEN
+                CALL ls_advec( i, j, simulated_time, 'q' )
+             ENDIF
+
+!
+!--          Nudging
+             IF ( nudging )  CALL nudge( i, j, simulated_time, 'q' )
+
+!
+!--          If required compute influence of large-scale subsidence/ascent
+             IF ( large_scale_subsidence  .AND.                                &
+                  .NOT. use_subsidence_tendencies )  THEN
+                CALL subsidence( i, j, tend, q, q_init, 3 )
+             ENDIF
+
+             CALL user_actions( i, j, 'q-tendency' )
+
+!
+!--          Prognostic equation for total water content / scalar
+             DO  k = nzb+1, nzt
+                q_p(k,j,i) = q(k,j,i) + ( dt_3d *                              &
+                                                ( tsc(2) * tend(k,j,i) +       &
+                                                  tsc(3) * tq_m(k,j,i) )       &
+                                                - tsc(5) * rdf_sc(k) *         &
+                                                      ( q(k,j,i) - q_init(k) ) &
+                                        )                                      &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              )                
+                IF ( q_p(k,j,i) < 0.0_wp )  q_p(k,j,i) = 0.1_wp * q(k,j,i)
+             ENDDO
+
+!
+!--          Calculate tendencies for the next Runge-Kutta step
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( intermediate_timestep_count == 1 )  THEN
+                   DO  k = nzb+1, nzt
+                      tq_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ELSEIF ( intermediate_timestep_count < &
+                         intermediate_timestep_count_max )  THEN
+                   DO  k = nzb+1, nzt
+                      tq_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +               &
+                                       5.3125_wp * tq_m(k,j,i)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+!
+!--          If required, calculate prognostic equations for cloud water content
+!--          and cloud drop concentration
+             IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+!
+!--             Calculate prognostic equation for cloud water content
+                tend(:,j,i) = 0.0_wp
+                IF ( timestep_scheme(1:5) == 'runge' ) &
+                THEN
+                   IF ( ws_scheme_sca )  THEN
+                      CALL advec_s_ws( i, j, qc, 'qc', flux_s_qc,       &
+                                       diss_s_qc, flux_l_qc, diss_l_qc, &
+                                       i_omp_start, tn )
+                   ELSE
+                      CALL advec_s_pw( i, j, qc )
+                   ENDIF
+                ELSE
+                   CALL advec_s_up( i, j, qc )
+                ENDIF
+                CALL diffusion_s( i, j, qc,                                   &
+                                  surf_def_h(0)%qcsws, surf_def_h(1)%qcsws,   &
+                                  surf_def_h(2)%qcsws,                        &
+                                  surf_lsm_h%qcsws,    surf_usm_h%qcsws,      &  
+                                  surf_def_v(0)%qcsws, surf_def_v(1)%qcsws,   &
+                                  surf_def_v(2)%qcsws, surf_def_v(3)%qcsws,   &
+                                  surf_lsm_v(0)%qcsws, surf_lsm_v(1)%qcsws,   &
+                                  surf_lsm_v(2)%qcsws, surf_lsm_v(3)%qcsws,   &
+                                  surf_usm_v(0)%qcsws, surf_usm_v(1)%qcsws,   &
+                                  surf_usm_v(2)%qcsws, surf_usm_v(3)%qcsws )
+
+!
+!--             Prognostic equation for cloud water content
+                DO  k = nzb+1, nzt
+                   qc_p(k,j,i) = qc(k,j,i) + ( dt_3d *                         &
+                                                      ( tsc(2) * tend(k,j,i) + &
+                                                        tsc(3) * tqc_m(k,j,i) )&
+                                                      - tsc(5) * rdf_sc(k)     &
+                                                               * qc(k,j,i)     &
+                                             )                                 &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              ) 
+                   IF ( qc_p(k,j,i) < 0.0_wp )  qc_p(k,j,i) = 0.0_wp
+                ENDDO
+!
+!--             Calculate tendencies for the next Runge-Kutta step
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( intermediate_timestep_count == 1 )  THEN
+                      DO  k = nzb+1, nzt
+                         tqc_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ELSEIF ( intermediate_timestep_count < &
+                            intermediate_timestep_count_max )  THEN
+                      DO  k = nzb+1, nzt
+                         tqc_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +           &
+                                           5.3125_wp * tqc_m(k,j,i)
+                      ENDDO
+                   ENDIF
+                ENDIF
+
+!
+!--             Calculate prognostic equation for cloud drop concentration.
+                tend(:,j,i) = 0.0_wp
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( ws_scheme_sca )  THEN
+                      CALL advec_s_ws( i, j, nc, 'nc', flux_s_nc,    &
+                                    diss_s_nc, flux_l_nc, diss_l_nc, &
+                                    i_omp_start, tn )
+                   ELSE
+                      CALL advec_s_pw( i, j, nc )
+                   ENDIF
+                ELSE
+                   CALL advec_s_up( i, j, nc )
+                ENDIF
+                CALL diffusion_s( i, j, nc,                                    &
+                                  surf_def_h(0)%ncsws, surf_def_h(1)%ncsws,    &
+                                  surf_def_h(2)%ncsws,                         &
+                                  surf_lsm_h%ncsws,    surf_usm_h%ncsws,       &
+                                  surf_def_v(0)%ncsws, surf_def_v(1)%ncsws,    &
+                                  surf_def_v(2)%ncsws, surf_def_v(3)%ncsws,    &
+                                  surf_lsm_v(0)%ncsws, surf_lsm_v(1)%ncsws,    &
+                                  surf_lsm_v(2)%ncsws, surf_lsm_v(3)%ncsws,    &
+                                  surf_usm_v(0)%ncsws, surf_usm_v(1)%ncsws,    &
+                                  surf_usm_v(2)%ncsws, surf_usm_v(3)%ncsws )
+
+!
+!--             Prognostic equation for cloud drop concentration
+                DO  k = nzb+1, nzt
+                   nc_p(k,j,i) = nc(k,j,i) + ( dt_3d *                         &
+                                                      ( tsc(2) * tend(k,j,i) + &
+                                                        tsc(3) * tnc_m(k,j,i) )&
+                                                      - tsc(5) * rdf_sc(k)     &
+                                                               * nc(k,j,i)     &
+                                             )                                 &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              )
+                   IF ( nc_p(k,j,i) < 0.0_wp )  nc_p(k,j,i) = 0.0_wp
+                ENDDO
+!
+!--             Calculate tendencies for the next Runge-Kutta step
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( intermediate_timestep_count == 1 )  THEN
+                      DO  k = nzb+1, nzt
+                         tnc_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ELSEIF ( intermediate_timestep_count < &
+                            intermediate_timestep_count_max )  THEN
+                      DO  k = nzb+1, nzt
+                         tnc_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +           &
+                                           5.3125_wp * tnc_m(k,j,i)
+                      ENDDO
+                   ENDIF
+                ENDIF
+
+             ENDIF
+!
+!--          If required, calculate prognostic equations for rain water content
+!--          and rain drop concentration
+             IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+!
+!--             Calculate prognostic equation for rain water content
+                tend(:,j,i) = 0.0_wp
+                IF ( timestep_scheme(1:5) == 'runge' ) &
+                THEN
+                   IF ( ws_scheme_sca )  THEN
+                      CALL advec_s_ws( i, j, qr, 'qr', flux_s_qr,       &
+                                       diss_s_qr, flux_l_qr, diss_l_qr, &
+                                       i_omp_start, tn )
+                   ELSE
+                      CALL advec_s_pw( i, j, qr )
+                   ENDIF
+                ELSE
+                   CALL advec_s_up( i, j, qr )
+                ENDIF
+                CALL diffusion_s( i, j, qr,                                   &
+                                  surf_def_h(0)%qrsws, surf_def_h(1)%qrsws,   &
+                                  surf_def_h(2)%qrsws,                        &
+                                  surf_lsm_h%qrsws,    surf_usm_h%qrsws,      &  
+                                  surf_def_v(0)%qrsws, surf_def_v(1)%qrsws,   &
+                                  surf_def_v(2)%qrsws, surf_def_v(3)%qrsws,   &
+                                  surf_lsm_v(0)%qrsws, surf_lsm_v(1)%qrsws,   &
+                                  surf_lsm_v(2)%qrsws, surf_lsm_v(3)%qrsws,   &
+                                  surf_usm_v(0)%qrsws, surf_usm_v(1)%qrsws,   &
+                                  surf_usm_v(2)%qrsws, surf_usm_v(3)%qrsws )
+
+!
+!--             Prognostic equation for rain water content
+                DO  k = nzb+1, nzt
+                   qr_p(k,j,i) = qr(k,j,i) + ( dt_3d *                         &
+                                                      ( tsc(2) * tend(k,j,i) + &
+                                                        tsc(3) * tqr_m(k,j,i) )&
+                                                      - tsc(5) * rdf_sc(k)     &
+                                                               * qr(k,j,i)     &
+                                             )                                 &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              ) 
+                   IF ( qr_p(k,j,i) < 0.0_wp )  qr_p(k,j,i) = 0.0_wp
+                ENDDO
+!
+!--             Calculate tendencies for the next Runge-Kutta step
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( intermediate_timestep_count == 1 )  THEN
+                      DO  k = nzb+1, nzt
+                         tqr_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ELSEIF ( intermediate_timestep_count < &
+                            intermediate_timestep_count_max )  THEN
+                      DO  k = nzb+1, nzt
+                         tqr_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +           &
+                                           5.3125_wp * tqr_m(k,j,i)
+                      ENDDO
+                   ENDIF
+                ENDIF
+
+!
+!--             Calculate prognostic equation for rain drop concentration.
+                tend(:,j,i) = 0.0_wp
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( ws_scheme_sca )  THEN
+                      CALL advec_s_ws( i, j, nr, 'nr', flux_s_nr,    &
+                                    diss_s_nr, flux_l_nr, diss_l_nr, &
+                                    i_omp_start, tn )
+                   ELSE
+                      CALL advec_s_pw( i, j, nr )
+                   ENDIF
+                ELSE
+                   CALL advec_s_up( i, j, nr )
+                ENDIF
+                CALL diffusion_s( i, j, nr,                                    &
+                                  surf_def_h(0)%nrsws, surf_def_h(1)%nrsws,    &
+                                  surf_def_h(2)%nrsws,                         &
+                                  surf_lsm_h%nrsws,    surf_usm_h%nrsws,       &
+                                  surf_def_v(0)%nrsws, surf_def_v(1)%nrsws,    &
+                                  surf_def_v(2)%nrsws, surf_def_v(3)%nrsws,    &
+                                  surf_lsm_v(0)%nrsws, surf_lsm_v(1)%nrsws,    &
+                                  surf_lsm_v(2)%nrsws, surf_lsm_v(3)%nrsws,    &
+                                  surf_usm_v(0)%nrsws, surf_usm_v(1)%nrsws,    &
+                                  surf_usm_v(2)%nrsws, surf_usm_v(3)%nrsws )
+
+!
+!--             Prognostic equation for rain drop concentration
+                DO  k = nzb+1, nzt
+                   nr_p(k,j,i) = nr(k,j,i) + ( dt_3d *                         &
+                                                      ( tsc(2) * tend(k,j,i) + &
+                                                        tsc(3) * tnr_m(k,j,i) )&
+                                                      - tsc(5) * rdf_sc(k)     &
+                                                               * nr(k,j,i)     &
+                                             )                                 &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              )
+                   IF ( nr_p(k,j,i) < 0.0_wp )  nr_p(k,j,i) = 0.0_wp
+                ENDDO
+!
+!--             Calculate tendencies for the next Runge-Kutta step
+                IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                   IF ( intermediate_timestep_count == 1 )  THEN
+                      DO  k = nzb+1, nzt
+                         tnr_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ELSEIF ( intermediate_timestep_count < &
+                            intermediate_timestep_count_max )  THEN
+                      DO  k = nzb+1, nzt
+                         tnr_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +           &
+                                           5.3125_wp * tnr_m(k,j,i)
+                      ENDDO
+                   ENDIF
+                ENDIF
+
+             ENDIF
+
+          ENDIF
+
+!
+!--       If required, compute prognostic equation for scalar
+          IF ( passive_scalar )  THEN
+!
+!--          Tendency-terms for total water content / scalar
+             tend(:,j,i) = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' ) &
+             THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( i, j, s, 's', flux_s_s, &
+                                diss_s_s, flux_l_s, diss_l_s, i_omp_start, tn )
+                ELSE
+                   CALL advec_s_pw( i, j, s )
+                ENDIF
+             ELSE
+                CALL advec_s_up( i, j, s )
+             ENDIF
+             CALL diffusion_s( i, j, s,                                        &
+                               surf_def_h(0)%ssws, surf_def_h(1)%ssws,         &
+                               surf_def_h(2)%ssws,                             &
+                               surf_lsm_h%ssws,    surf_usm_h%ssws,            &
+                               surf_def_v(0)%ssws, surf_def_v(1)%ssws,         &
+                               surf_def_v(2)%ssws, surf_def_v(3)%ssws,         &
+                               surf_lsm_v(0)%ssws, surf_lsm_v(1)%ssws,         &
+                               surf_lsm_v(2)%ssws, surf_lsm_v(3)%ssws,         &
+                               surf_usm_v(0)%ssws, surf_usm_v(1)%ssws,         &
+                               surf_usm_v(2)%ssws, surf_usm_v(3)%ssws )
+
+!
+!--          Sink or source of scalar concentration due to canopy elements
+             IF ( plant_canopy )  CALL pcm_tendency( i, j, 7 )
+
+!
+!--          Large scale advection, still need to be extended for scalars
+!              IF ( large_scale_forcing )  THEN
+!                 CALL ls_advec( i, j, simulated_time, 's' )
+!              ENDIF
+
+!
+!--          Nudging, still need to be extended for scalars
+!              IF ( nudging )  CALL nudge( i, j, simulated_time, 's' )
+
+!
+!--          If required compute influence of large-scale subsidence/ascent.
+!--          Note, the last argument is of no meaning in this case, as it is
+!--          only used in conjunction with large_scale_forcing, which is to
+!--          date not implemented for scalars.
+             IF ( large_scale_subsidence  .AND.                                &
+                  .NOT. use_subsidence_tendencies  .AND.                       &
+                  .NOT. large_scale_forcing )  THEN
+                CALL subsidence( i, j, tend, s, s_init, 3 )
+             ENDIF
+
+             CALL user_actions( i, j, 's-tendency' )
+
+!
+!--          Prognostic equation for scalar
+             DO  k = nzb+1, nzt
+                s_p(k,j,i) = s(k,j,i) + (  dt_3d *                             &
+                                            ( tsc(2) * tend(k,j,i) +           &
+                                              tsc(3) * ts_m(k,j,i) )           &
+                                            - tsc(5) * rdf_sc(k)               &
+                                                     * ( s(k,j,i) - s_init(k) )&
+                                        )                                      &
+                                       * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                              )
+                IF ( s_p(k,j,i) < 0.0_wp )  s_p(k,j,i) = 0.1_wp * s(k,j,i)
+             ENDDO
+
+!
+!--          Calculate tendencies for the next Runge-Kutta step
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( intermediate_timestep_count == 1 )  THEN
+                   DO  k = nzb+1, nzt
+                      ts_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ELSEIF ( intermediate_timestep_count < &
+                         intermediate_timestep_count_max )  THEN
+                   DO  k = nzb+1, nzt
+                      ts_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +               &
+                                       5.3125_wp * ts_m(k,j,i)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+          ENDIF
+!
+!--       Calculate prognostic equations for turbulence closure
+          CALL tcm_prognostic_equations( i, j, i_omp_start, tn )
+
+!
+!--       Calculate prognostic equation for chemical quantites
+          IF ( air_chemistry )  THEN
+             !> TODO: remove time measurement since it slows down performance because it will be called extremely often
+!
+!--          Loop over chemical species
+             DO  lsp = 1, nvar                         
+                CALL chem_prognostic_equations( chem_species(lsp)%conc_p,      &
+                                     chem_species(lsp)%conc,                   &
+                                     chem_species(lsp)%tconc_m,                &
+                                     chem_species(lsp)%conc_pr_init,           &
+                                     i, j, i_omp_start, tn, lsp,               &
+                                     chem_species(lsp)%flux_s_cs,              &
+                                     chem_species(lsp)%diss_s_cs,              &
+                                     chem_species(lsp)%flux_l_cs,              &
+                                     chem_species(lsp)%diss_l_cs )       
+             ENDDO
+          
+          ENDIF   ! Chemical equations
+!
+!--       Calculate prognostic equations for the ocean
+          IF ( ocean_mode )  THEN
+             CALL ocean_prognostic_equations( i, j, i_omp_start, tn )
+          ENDIF
+       
+          IF ( salsa )  THEN 
+!
+!--          Loop over aerosol size bins: number and mass bins
+             IF ( time_since_reference_point >= skip_time_do_salsa )  THEN
+             
+                DO  b = 1, nbins                
+                   sums_salsa_ws_l = aerosol_number(b)%sums_ws_l
+                   CALL salsa_tendency( 'aerosol_number',                      &
+                                         aerosol_number(b)%conc_p,             &
+                                         aerosol_number(b)%conc,               &
+                                         aerosol_number(b)%tconc_m,            &
+                                         i, j, i_omp_start, tn, b, b,          &
+                                         aerosol_number(b)%flux_s,             &
+                                         aerosol_number(b)%diss_s,             &
+                                         aerosol_number(b)%flux_l,             &
+                                         aerosol_number(b)%diss_l,             &
+                                         aerosol_number(b)%init )
+                   aerosol_number(b)%sums_ws_l = sums_salsa_ws_l
+                   DO  c = 1, ncc_tot
+                      sums_salsa_ws_l = aerosol_mass((c-1)*nbins+b)%sums_ws_l 
+                      CALL salsa_tendency( 'aerosol_mass',                     &
+                                            aerosol_mass((c-1)*nbins+b)%conc_p,&
+                                            aerosol_mass((c-1)*nbins+b)%conc,  &
+                                            aerosol_mass((c-1)*nbins+b)%tconc_m,&
+                                            i, j, i_omp_start, tn, b, c,       &
+                                            aerosol_mass((c-1)*nbins+b)%flux_s,&
+                                            aerosol_mass((c-1)*nbins+b)%diss_s,&
+                                            aerosol_mass((c-1)*nbins+b)%flux_l,&
+                                            aerosol_mass((c-1)*nbins+b)%diss_l,&
+                                            aerosol_mass((c-1)*nbins+b)%init )
+                      aerosol_mass((c-1)*nbins+b)%sums_ws_l = sums_salsa_ws_l
+                   ENDDO
+                ENDDO
+                IF ( .NOT. salsa_gases_from_chem )  THEN
+                   DO  g = 1, ngast
+                      sums_salsa_ws_l = salsa_gas(g)%sums_ws_l
+                      CALL salsa_tendency( 'salsa_gas', salsa_gas(g)%conc_p,   &
+                                      salsa_gas(g)%conc, salsa_gas(g)%tconc_m, &
+                                      i, j, i_omp_start, tn, g, g,             &
+                                      salsa_gas(g)%flux_s, salsa_gas(g)%diss_s,&
+                                      salsa_gas(g)%flux_l, salsa_gas(g)%diss_l,&
+                                      salsa_gas(g)%init )
+                      salsa_gas(g)%sums_ws_l = sums_salsa_ws_l
+                   ENDDO
+                ENDIF
+             
+             ENDIF
+             
+          ENDIF        
+
+       ENDDO  ! loop over j
+    ENDDO  ! loop over i
+    !$OMP END PARALLEL
+
+
+    CALL cpu_log( log_point(32), 'all progn.equations', 'stop' )
+
+
+ END SUBROUTINE prognostic_equations_cache
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Version for vector machines
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE prognostic_equations_vector
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  b     !< index for aerosol size bins (salsa)
+    INTEGER(iwp) ::  c     !< index for chemical compounds (salsa)
+    INTEGER(iwp) ::  g     !< index for gaseous compounds (salsa)
+    INTEGER(iwp) ::  i     !<
+    INTEGER(iwp) ::  j     !<
+    INTEGER(iwp) ::  k     !<
+    INTEGER(iwp) ::  lsp   !< running index for chemical species
+
+    REAL(wp)     ::  sbt  !<
+
+!
+!-- Run SALSA and aerosol dynamic processes. SALSA is run with a longer time 
+!-- step. The exchange of ghost points is required after this update of the 
+!-- concentrations of aerosol number and mass 
+    IF ( salsa )  THEN
+       
+       IF ( time_since_reference_point >= skip_time_do_salsa )  THEN
+       
+          IF ( ( time_since_reference_point - last_salsa_time ) >= dt_salsa )  &
+          THEN
+          
+             CALL cpu_log( log_point_s(90), 'salsa processes ', 'start' )
+             !$OMP PARALLEL PRIVATE (i,j,b,c,g)
+             !$OMP DO
+!
+!--          Call salsa processes
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   CALL salsa_diagnostics( i, j )
+                   CALL salsa_driver( i, j, 3 )
+                   CALL salsa_diagnostics( i, j )
+                ENDDO
+             ENDDO
+             
+             CALL cpu_log( log_point_s(90), 'salsa processes ', 'stop' )
+             
+             CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'start' )
+!
+!--          Exchange ghost points and decycle if needed.
+             DO  b = 1, nbins
+                CALL exchange_horiz( aerosol_number(b)%conc, nbgp )
+                CALL salsa_boundary_conds( aerosol_number(b)%conc_p,           &
+                                           aerosol_number(b)%init )
+                DO  c = 1, ncc_tot
+                   CALL exchange_horiz( aerosol_mass((c-1)*nbins+b)%conc, nbgp )
+                   CALL salsa_boundary_conds(                                  &
+                                           aerosol_mass((c-1)*nbins+b)%conc_p, &
+                                           aerosol_mass((c-1)*nbins+b)%init )
+                ENDDO
+             ENDDO
+             
+             IF ( .NOT. salsa_gases_from_chem )  THEN
+                DO  g = 1, ngast
+                   CALL exchange_horiz( salsa_gas(g)%conc, nbgp )
+                   CALL salsa_boundary_conds( salsa_gas(g)%conc_p,             &
+                                              salsa_gas(g)%init )
+                ENDDO
+             ENDIF
+             CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'stop' )
+             
+             !$OMP END PARALLEL
+             last_salsa_time = time_since_reference_point
+             
+          ENDIF
+          
+       ENDIF
+       
+    ENDIF 
+
+!
+!-- If required, calculate cloud microphysical impacts
+    IF ( bulk_cloud_model  .AND.  .NOT. microphysics_sat_adjust  .AND.         &
+         ( intermediate_timestep_count == 1  .OR.                              &
+           call_microphysics_at_all_substeps )                                 &
+       )  THEN
+       CALL cpu_log( log_point(51), 'microphysics', 'start' )
+       CALL bcm_actions
+       CALL cpu_log( log_point(51), 'microphysics', 'stop' )
+    ENDIF
+
+!
+!-- u-velocity component
+    CALL cpu_log( log_point(5), 'u-equation', 'start' )
+
+    tend = 0.0_wp
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( ws_scheme_mom )  THEN
+          CALL advec_u_ws
+       ELSE
+          CALL advec_u_pw
+       ENDIF
+    ELSE
+       CALL advec_u_up
+    ENDIF
+    CALL diffusion_u
+    CALL coriolis( 1 )
+    IF ( sloping_surface  .AND.  .NOT. neutral )  THEN
+       CALL buoyancy( pt, 1 )
+    ENDIF
+
+!
+!-- Drag by plant canopy
+    IF ( plant_canopy )  CALL pcm_tendency( 1 )
+
+!
+!-- External pressure gradient
+    IF ( dp_external )  THEN
+       DO  i = nxlu, nxr
+          DO  j = nys, nyn
+             DO  k = dp_level_ind_b+1, nzt
+                tend(k,j,i) = tend(k,j,i) - dpdxy(1) * dp_smooth_factor(k)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Nudging
+    IF ( nudging )  CALL nudge( simulated_time, 'u' )
+
+!
+!-- Effect of Stokes drift (in ocean mode only)
+    IF ( stokes_force )  CALL stokes_drift_terms( 1 )
+
+!
+!-- Forces by wind turbines
+    IF ( wind_turbine )  CALL wtm_tendencies( 1 )
+
+    CALL user_actions( 'u-tendency' )
+
+!
+!-- Prognostic equation for u-velocity component
+    DO  i = nxlu, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+             u_p(k,j,i) = u(k,j,i) + ( dt_3d * ( tsc(2) * tend(k,j,i) +          &
+                                                 tsc(3) * tu_m(k,j,i) )          &
+                                               - tsc(5) * rdf(k) *               &
+                                                        ( u(k,j,i) - u_init(k) ) &
+                                     ) * MERGE( 1.0_wp, 0.0_wp,                  &
+                                                 BTEST( wall_flags_0(k,j,i), 1 ) &
+                                              )
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Add turbulence generated by wave breaking (in ocean mode only)
+    IF ( wave_breaking  .AND.                                                  &
+         intermediate_timestep_count == intermediate_timestep_count_max )      &
+    THEN
+       CALL wave_breaking_term( 1 )
+    ENDIF
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  i = nxlu, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   tu_m(k,j,i) = tend(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < &
+                intermediate_timestep_count_max )  THEN
+          DO  i = nxlu, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   tu_m(k,j,i) =    -9.5625_wp * tend(k,j,i)                   &
+                                   + 5.3125_wp * tu_m(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+
+    CALL cpu_log( log_point(5), 'u-equation', 'stop' )
+
+!
+!-- v-velocity component
+    CALL cpu_log( log_point(6), 'v-equation', 'start' )
+
+    tend = 0.0_wp
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( ws_scheme_mom )  THEN
+          CALL advec_v_ws
+       ELSE
+          CALL advec_v_pw
+       END IF
+    ELSE
+       CALL advec_v_up
+    ENDIF
+    CALL diffusion_v
+    CALL coriolis( 2 )
+
+!
+!-- Drag by plant canopy
+    IF ( plant_canopy )  CALL pcm_tendency( 2 )
+
+!
+!-- External pressure gradient
+    IF ( dp_external )  THEN
+       DO  i = nxl, nxr
+          DO  j = nysv, nyn
+             DO  k = dp_level_ind_b+1, nzt
+                tend(k,j,i) = tend(k,j,i) - dpdxy(2) * dp_smooth_factor(k)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Nudging
+    IF ( nudging )  CALL nudge( simulated_time, 'v' )
+
+!
+!-- Effect of Stokes drift (in ocean mode only)
+    IF ( stokes_force )  CALL stokes_drift_terms( 2 )
+
+!
+!-- Forces by wind turbines
+    IF ( wind_turbine )  CALL wtm_tendencies( 2 )
+
+    CALL user_actions( 'v-tendency' )
+
+!
+!-- Prognostic equation for v-velocity component
+    DO  i = nxl, nxr
+       DO  j = nysv, nyn
+          DO  k = nzb+1, nzt
+             v_p(k,j,i) = v(k,j,i) + ( dt_3d * ( tsc(2) * tend(k,j,i) +        &
+                                                 tsc(3) * tv_m(k,j,i) )        &
+                                               - tsc(5) * rdf(k) *             &
+                                                      ( v(k,j,i) - v_init(k) ) &
+                                     ) * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 2 )&
+                                              )
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Add turbulence generated by wave breaking (in ocean mode only)
+    IF ( wave_breaking  .AND.                                                  &
+         intermediate_timestep_count == intermediate_timestep_count_max )      &
+    THEN
+       CALL wave_breaking_term( 2 )
+    ENDIF
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nysv, nyn
+                DO  k = nzb+1, nzt
+                   tv_m(k,j,i) = tend(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < &
+                intermediate_timestep_count_max )  THEN
+          DO  i = nxl, nxr
+             DO  j = nysv, nyn
+                DO  k = nzb+1, nzt
+                   tv_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                    &
+                                  + 5.3125_wp * tv_m(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+
+    CALL cpu_log( log_point(6), 'v-equation', 'stop' )
+
+!
+!-- w-velocity component
+    CALL cpu_log( log_point(7), 'w-equation', 'start' )
+
+    tend = 0.0_wp
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( ws_scheme_mom )  THEN
+          CALL advec_w_ws
+       ELSE
+          CALL advec_w_pw
+       ENDIF
+    ELSE
+       CALL advec_w_up
+    ENDIF
+    CALL diffusion_w
+    CALL coriolis( 3 )
+
+    IF ( .NOT. neutral )  THEN
+       IF ( ocean_mode )  THEN
+          CALL buoyancy( rho_ocean, 3 )
+       ELSE
+          IF ( .NOT. humidity )  THEN
+             CALL buoyancy( pt, 3 )
+          ELSE
+             CALL buoyancy( vpt, 3 )
+          ENDIF
+       ENDIF
+    ENDIF
+
+!
+!-- Drag by plant canopy
+    IF ( plant_canopy )  CALL pcm_tendency( 3 )
+
+!
+!-- Effect of Stokes drift (in ocean mode only)
+    IF ( stokes_force )  CALL stokes_drift_terms( 3 )
+
+!
+!-- Forces by wind turbines
+    IF ( wind_turbine )  CALL wtm_tendencies( 3 )
+
+    CALL user_actions( 'w-tendency' )
+
+!
+!-- Prognostic equation for w-velocity component
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt-1
+             w_p(k,j,i) = w(k,j,i) + ( dt_3d * ( tsc(2) * tend(k,j,i) +        &
+                                                 tsc(3) * tw_m(k,j,i) )        &
+                                               - tsc(5) * rdf(k) * w(k,j,i)    &
+                                     ) * MERGE( 1.0_wp, 0.0_wp,                &
+                                                BTEST( wall_flags_0(k,j,i), 3 )&
+                                              )
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt-1
+                   tw_m(k,j,i) = tend(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < &
+                intermediate_timestep_count_max )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt-1
+                   tw_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                    &
+                                  + 5.3125_wp * tw_m(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+
+    CALL cpu_log( log_point(7), 'w-equation', 'stop' )
+
+
+!
+!-- If required, compute prognostic equation for potential temperature
+    IF ( .NOT. neutral )  THEN
+
+       CALL cpu_log( log_point(13), 'pt-equation', 'start' )
+
+!
+!--    pt-tendency terms with communication
+       sbt = tsc(2)
+       IF ( scalar_advec == 'bc-scheme' )  THEN
+
+          IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--          Bott-Chlond scheme always uses Euler time step. Thus:
+             sbt = 1.0_wp
+          ENDIF
+          tend = 0.0_wp
+          CALL advec_s_bc( pt, 'pt' )
+
+       ENDIF
+
+!
+!--    pt-tendency terms with no communication
+       IF ( scalar_advec /= 'bc-scheme' )  THEN
+          tend = 0.0_wp
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( ws_scheme_sca )  THEN
+                CALL advec_s_ws( pt, 'pt' )
+             ELSE
+                CALL advec_s_pw( pt )
+             ENDIF
+          ELSE
+             CALL advec_s_up( pt )
+          ENDIF
+       ENDIF
+
+       CALL diffusion_s( pt,                                                   &
+                         surf_def_h(0)%shf, surf_def_h(1)%shf,                 &
+                         surf_def_h(2)%shf,                                    &
+                         surf_lsm_h%shf,    surf_usm_h%shf,                    &
+                         surf_def_v(0)%shf, surf_def_v(1)%shf,                 &
+                         surf_def_v(2)%shf, surf_def_v(3)%shf,                 &
+                         surf_lsm_v(0)%shf, surf_lsm_v(1)%shf,                 &
+                         surf_lsm_v(2)%shf, surf_lsm_v(3)%shf,                 &
+                         surf_usm_v(0)%shf, surf_usm_v(1)%shf,                 &
+                         surf_usm_v(2)%shf, surf_usm_v(3)%shf )
+
+!
+!--    Consideration of heat sources within the plant canopy
+       IF ( plant_canopy  .AND.                                          &
+            (cthf /= 0.0_wp  .OR. urban_surface  .OR.  land_surface) )  THEN
+          CALL pcm_tendency( 4 )
+       ENDIF
+
+!
+!--    Large scale advection
+       IF ( large_scale_forcing )  THEN
+          CALL ls_advec( simulated_time, 'pt' )
+       ENDIF
+
+!
+!--    Nudging
+       IF ( nudging )  CALL nudge( simulated_time, 'pt' )
+
+!
+!--    If required compute influence of large-scale subsidence/ascent
+       IF ( large_scale_subsidence  .AND.                                      &
+            .NOT. use_subsidence_tendencies )  THEN
+          CALL subsidence( tend, pt, pt_init, 2 )
+       ENDIF
+
+!
+!--    If required, add tendency due to radiative heating/cooling
+       IF ( radiation  .AND.                                                   &
+            simulated_time > skip_time_do_radiation )  THEN
+            CALL radiation_tendency ( tend )
+       ENDIF
+
+       CALL user_actions( 'pt-tendency' )
+
+!
+!--    Prognostic equation for potential temperature
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                pt_p(k,j,i) = pt(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +      &
+                                                   tsc(3) * tpt_m(k,j,i) )     &
+                                                 - tsc(5) *                    &
+                                                   ( pt(k,j,i) - pt_init(k) ) *&
+                                          ( rdf_sc(k) + ptdf_x(i) + ptdf_y(j) )&
+                                          )                                    &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tpt_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tpt_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +              &
+                                        5.3125_wp * tpt_m(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+       CALL cpu_log( log_point(13), 'pt-equation', 'stop' )
+
+    ENDIF
+
+!
+!-- If required, compute prognostic equation for total water content
+    IF ( humidity )  THEN
+
+       CALL cpu_log( log_point(29), 'q-equation', 'start' )
+
+!
+!--    Scalar/q-tendency terms with communication
+       sbt = tsc(2)
+       IF ( scalar_advec == 'bc-scheme' )  THEN
+
+          IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--          Bott-Chlond scheme always uses Euler time step. Thus:
+             sbt = 1.0_wp
+          ENDIF
+          tend = 0.0_wp
+          CALL advec_s_bc( q, 'q' )
+
+       ENDIF
+
+!
+!--    Scalar/q-tendency terms with no communication
+       IF ( scalar_advec /= 'bc-scheme' )  THEN
+          tend = 0.0_wp
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( ws_scheme_sca )  THEN
+                CALL advec_s_ws( q, 'q' )
+             ELSE
+                CALL advec_s_pw( q )
+             ENDIF
+          ELSE
+             CALL advec_s_up( q )
+          ENDIF
+       ENDIF
+
+       CALL diffusion_s( q,                                                    &
+                         surf_def_h(0)%qsws, surf_def_h(1)%qsws,               &
+                         surf_def_h(2)%qsws,                                   &
+                         surf_lsm_h%qsws,    surf_usm_h%qsws,                  &
+                         surf_def_v(0)%qsws, surf_def_v(1)%qsws,               &
+                         surf_def_v(2)%qsws, surf_def_v(3)%qsws,               &
+                         surf_lsm_v(0)%qsws, surf_lsm_v(1)%qsws,               &
+                         surf_lsm_v(2)%qsws, surf_lsm_v(3)%qsws,               &
+                         surf_usm_v(0)%qsws, surf_usm_v(1)%qsws,               &
+                         surf_usm_v(2)%qsws, surf_usm_v(3)%qsws )
+
+!
+!--    Sink or source of humidity due to canopy elements
+       IF ( plant_canopy ) CALL pcm_tendency( 5 )
+
+!
+!--    Large scale advection
+       IF ( large_scale_forcing )  THEN
+          CALL ls_advec( simulated_time, 'q' )
+       ENDIF
+
+!
+!--    Nudging
+       IF ( nudging )  CALL nudge( simulated_time, 'q' )
+
+!
+!--    If required compute influence of large-scale subsidence/ascent
+       IF ( large_scale_subsidence  .AND.                                      &
+            .NOT. use_subsidence_tendencies )  THEN
+         CALL subsidence( tend, q, q_init, 3 )
+       ENDIF
+
+       CALL user_actions( 'q-tendency' )
+
+!
+!--    Prognostic equation for total water content
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                q_p(k,j,i) = q(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +        &
+                                                 tsc(3) * tq_m(k,j,i) )        &
+                                               - tsc(5) * rdf_sc(k) *          &
+                                                      ( q(k,j,i) - q_init(k) ) &
+                                        ) * MERGE( 1.0_wp, 0.0_wp,             &
+                                                   BTEST( wall_flags_0(k,j,i), 0 ) &
+                                                 )
+                IF ( q_p(k,j,i) < 0.0_wp )  q_p(k,j,i) = 0.1_wp * q(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tq_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tq_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                 &
+                                     + 5.3125_wp * tq_m(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+       CALL cpu_log( log_point(29), 'q-equation', 'stop' )
+
+!
+!--    If required, calculate prognostic equations for cloud water content
+!--    and cloud drop concentration
+       IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+
+          CALL cpu_log( log_point(67), 'qc-equation', 'start' )
+
+!
+!--       Calculate prognostic equation for cloud water content
+          sbt = tsc(2)
+          IF ( scalar_advec == 'bc-scheme' )  THEN
+
+             IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--             Bott-Chlond scheme always uses Euler time step. Thus:
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
+             CALL advec_s_bc( qc, 'qc' )
+
+          ENDIF
+
+!
+!--       qc-tendency terms with no communication
+          IF ( scalar_advec /= 'bc-scheme' )  THEN
+             tend = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( qc, 'qc' )
+                ELSE
+                   CALL advec_s_pw( qc )
+                ENDIF
+             ELSE
+                CALL advec_s_up( qc )
+             ENDIF
+          ENDIF
+
+          CALL diffusion_s( qc,                                                &
+                            surf_def_h(0)%qcsws, surf_def_h(1)%qcsws,          &
+                            surf_def_h(2)%qcsws,                               &
+                            surf_lsm_h%qcsws,    surf_usm_h%qcsws,             &
+                            surf_def_v(0)%qcsws, surf_def_v(1)%qcsws,          &
+                            surf_def_v(2)%qcsws, surf_def_v(3)%qcsws,          &
+                            surf_lsm_v(0)%qcsws, surf_lsm_v(1)%qcsws,          &
+                            surf_lsm_v(2)%qcsws, surf_lsm_v(3)%qcsws,          &
+                            surf_usm_v(0)%qcsws, surf_usm_v(1)%qcsws,          &
+                            surf_usm_v(2)%qcsws, surf_usm_v(3)%qcsws )
+
+!
+!--       Prognostic equation for cloud water content
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   qc_p(k,j,i) = qc(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +   &
+                                                      tsc(3) * tqc_m(k,j,i) )  &
+                                                    - tsc(5) * rdf_sc(k) *     &
+                                                               qc(k,j,i)       &
+                                             )                                 &
+                                    * MERGE( 1.0_wp, 0.0_wp,                   &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                   IF ( qc_p(k,j,i) < 0.0_wp )  qc_p(k,j,i) = 0.0_wp
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Calculate tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tqc_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSEIF ( intermediate_timestep_count < &
+                      intermediate_timestep_count_max )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tqc_m(k,j,i) =   -9.5625_wp * tend(k,j,i)             &
+                                         + 5.3125_wp * tqc_m(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+
+          CALL cpu_log( log_point(67), 'qc-equation', 'stop' )
+
+          CALL cpu_log( log_point(68), 'nc-equation', 'start' )
+!
+!--       Calculate prognostic equation for cloud drop concentration
+          sbt = tsc(2)
+          IF ( scalar_advec == 'bc-scheme' )  THEN
+
+             IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--             Bott-Chlond scheme always uses Euler time step. Thus:
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
+             CALL advec_s_bc( nc, 'nc' )
+
+          ENDIF
+
+!
+!--       nc-tendency terms with no communication
+          IF ( scalar_advec /= 'bc-scheme' )  THEN
+             tend = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( nc, 'nc' )
+                ELSE
+                   CALL advec_s_pw( nc )
+                ENDIF
+             ELSE
+                CALL advec_s_up( nc )
+             ENDIF
+          ENDIF
+
+          CALL diffusion_s( nc,                                                &
+                            surf_def_h(0)%ncsws, surf_def_h(1)%ncsws,          &
+                            surf_def_h(2)%ncsws,                               &
+                            surf_lsm_h%ncsws,    surf_usm_h%ncsws,             & 
+                            surf_def_v(0)%ncsws, surf_def_v(1)%ncsws,          &
+                            surf_def_v(2)%ncsws, surf_def_v(3)%ncsws,          &
+                            surf_lsm_v(0)%ncsws, surf_lsm_v(1)%ncsws,          &
+                            surf_lsm_v(2)%ncsws, surf_lsm_v(3)%ncsws,          &
+                            surf_usm_v(0)%ncsws, surf_usm_v(1)%ncsws,          &
+                            surf_usm_v(2)%ncsws, surf_usm_v(3)%ncsws )
+
+!
+!--       Prognostic equation for cloud drop concentration
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   nc_p(k,j,i) = nc(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +   &
+                                                      tsc(3) * tnc_m(k,j,i) )  &
+                                                    - tsc(5) * rdf_sc(k) *     &
+                                                               nc(k,j,i)       &
+                                             )                                 &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                   IF ( nc_p(k,j,i) < 0.0_wp )  nc_p(k,j,i) = 0.0_wp
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Calculate tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tnc_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSEIF ( intermediate_timestep_count < &
+                      intermediate_timestep_count_max )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tnc_m(k,j,i) =  -9.5625_wp * tend(k,j,i)             &
+                                         + 5.3125_wp * tnc_m(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+
+          CALL cpu_log( log_point(68), 'nc-equation', 'stop' )
+
+       ENDIF
+!
+!--    If required, calculate prognostic equations for rain water content
+!--    and rain drop concentration
+       IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+
+          CALL cpu_log( log_point(52), 'qr-equation', 'start' )
+
+!
+!--       Calculate prognostic equation for rain water content
+          sbt = tsc(2)
+          IF ( scalar_advec == 'bc-scheme' )  THEN
+
+             IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--             Bott-Chlond scheme always uses Euler time step. Thus:
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
+             CALL advec_s_bc( qr, 'qr' )
+
+          ENDIF
+
+!
+!--       qr-tendency terms with no communication
+          IF ( scalar_advec /= 'bc-scheme' )  THEN
+             tend = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( qr, 'qr' )
+                ELSE
+                   CALL advec_s_pw( qr )
+                ENDIF
+             ELSE
+                CALL advec_s_up( qr )
+             ENDIF
+          ENDIF
+
+          CALL diffusion_s( qr,                                                &
+                            surf_def_h(0)%qrsws, surf_def_h(1)%qrsws,          &
+                            surf_def_h(2)%qrsws,                               &
+                            surf_lsm_h%qrsws,    surf_usm_h%qrsws,             &
+                            surf_def_v(0)%qrsws, surf_def_v(1)%qrsws,          &
+                            surf_def_v(2)%qrsws, surf_def_v(3)%qrsws,          &
+                            surf_lsm_v(0)%qrsws, surf_lsm_v(1)%qrsws,          &
+                            surf_lsm_v(2)%qrsws, surf_lsm_v(3)%qrsws,          &
+                            surf_usm_v(0)%qrsws, surf_usm_v(1)%qrsws,          &
+                            surf_usm_v(2)%qrsws, surf_usm_v(3)%qrsws )
+
+!
+!--       Prognostic equation for rain water content
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   qr_p(k,j,i) = qr(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +   &
+                                                      tsc(3) * tqr_m(k,j,i) )  &
+                                                    - tsc(5) * rdf_sc(k) *     &
+                                                               qr(k,j,i)       &
+                                             )                                 &
+                                    * MERGE( 1.0_wp, 0.0_wp,                   &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                   IF ( qr_p(k,j,i) < 0.0_wp )  qr_p(k,j,i) = 0.0_wp
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Calculate tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tqr_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSEIF ( intermediate_timestep_count < &
+                      intermediate_timestep_count_max )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tqr_m(k,j,i) =   -9.5625_wp * tend(k,j,i)             &
+                                         + 5.3125_wp * tqr_m(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+
+          CALL cpu_log( log_point(52), 'qr-equation', 'stop' )
+          CALL cpu_log( log_point(53), 'nr-equation', 'start' )
+
+!
+!--       Calculate prognostic equation for rain drop concentration
+          sbt = tsc(2)
+          IF ( scalar_advec == 'bc-scheme' )  THEN
+
+             IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--             Bott-Chlond scheme always uses Euler time step. Thus:
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
+             CALL advec_s_bc( nr, 'nr' )
+
+          ENDIF
+
+!
+!--       nr-tendency terms with no communication
+          IF ( scalar_advec /= 'bc-scheme' )  THEN
+             tend = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( nr, 'nr' )
+                ELSE
+                   CALL advec_s_pw( nr )
+                ENDIF
+             ELSE
+                CALL advec_s_up( nr )
+             ENDIF
+          ENDIF
+
+          CALL diffusion_s( nr,                                                &
+                            surf_def_h(0)%nrsws, surf_def_h(1)%nrsws,          &
+                            surf_def_h(2)%nrsws,                               &
+                            surf_lsm_h%nrsws,    surf_usm_h%nrsws,             & 
+                            surf_def_v(0)%nrsws, surf_def_v(1)%nrsws,          &
+                            surf_def_v(2)%nrsws, surf_def_v(3)%nrsws,          &
+                            surf_lsm_v(0)%nrsws, surf_lsm_v(1)%nrsws,          &
+                            surf_lsm_v(2)%nrsws, surf_lsm_v(3)%nrsws,          &
+                            surf_usm_v(0)%nrsws, surf_usm_v(1)%nrsws,          &
+                            surf_usm_v(2)%nrsws, surf_usm_v(3)%nrsws )
+
+!
+!--       Prognostic equation for rain drop concentration
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   nr_p(k,j,i) = nr(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +   &
+                                                      tsc(3) * tnr_m(k,j,i) )  &
+                                                    - tsc(5) * rdf_sc(k) *     &
+                                                               nr(k,j,i)       &
+                                             )                                 &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                   IF ( nr_p(k,j,i) < 0.0_wp )  nr_p(k,j,i) = 0.0_wp
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Calculate tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tnr_m(k,j,i) = tend(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSEIF ( intermediate_timestep_count < &
+                      intermediate_timestep_count_max )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb+1, nzt
+                         tnr_m(k,j,i) =  -9.5625_wp * tend(k,j,i)             &
+                                         + 5.3125_wp * tnr_m(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+
+          CALL cpu_log( log_point(53), 'nr-equation', 'stop' )
+
+       ENDIF
+
+    ENDIF
+!
+!-- If required, compute prognostic equation for scalar
+    IF ( passive_scalar )  THEN
+
+       CALL cpu_log( log_point(66), 's-equation', 'start' )
+
+!
+!--    Scalar/q-tendency terms with communication
+       sbt = tsc(2)
+       IF ( scalar_advec == 'bc-scheme' )  THEN
+
+          IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--          Bott-Chlond scheme always uses Euler time step. Thus:
+             sbt = 1.0_wp
+          ENDIF
+          tend = 0.0_wp
+          CALL advec_s_bc( s, 's' )
+
+       ENDIF
+
+!
+!--    Scalar/q-tendency terms with no communication
+       IF ( scalar_advec /= 'bc-scheme' )  THEN
+          tend = 0.0_wp
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( ws_scheme_sca )  THEN
+                CALL advec_s_ws( s, 's' )
+             ELSE
+                CALL advec_s_pw( s )
+             ENDIF
+          ELSE
+             CALL advec_s_up( s )
+          ENDIF
+       ENDIF
+
+       CALL diffusion_s( s,                                                    &
+                         surf_def_h(0)%ssws, surf_def_h(1)%ssws,               &
+                         surf_def_h(2)%ssws,                                   &
+                         surf_lsm_h%ssws,    surf_usm_h%ssws,                  &
+                         surf_def_v(0)%ssws, surf_def_v(1)%ssws,               &
+                         surf_def_v(2)%ssws, surf_def_v(3)%ssws,               &
+                         surf_lsm_v(0)%ssws, surf_lsm_v(1)%ssws,               &
+                         surf_lsm_v(2)%ssws, surf_lsm_v(3)%ssws,               &
+                         surf_usm_v(0)%ssws, surf_usm_v(1)%ssws,               &
+                         surf_usm_v(2)%ssws, surf_usm_v(3)%ssws )
+
+!
+!--    Sink or source of humidity due to canopy elements
+       IF ( plant_canopy ) CALL pcm_tendency( 7 )
+
+!
+!--    Large scale advection. Not implemented for scalars so far.
+!        IF ( large_scale_forcing )  THEN
+!           CALL ls_advec( simulated_time, 'q' )
+!        ENDIF
+
+!
+!--    Nudging. Not implemented for scalars so far.
+!        IF ( nudging )  CALL nudge( simulated_time, 'q' )
+
+!
+!--    If required compute influence of large-scale subsidence/ascent.
+!--    Not implemented for scalars so far.
+       IF ( large_scale_subsidence  .AND.                                      &
+            .NOT. use_subsidence_tendencies  .AND.                             &
+            .NOT. large_scale_forcing )  THEN
+         CALL subsidence( tend, s, s_init, 3 )
+       ENDIF
+
+       CALL user_actions( 's-tendency' )
+
+!
+!--    Prognostic equation for total water content
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                s_p(k,j,i) = s(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +        &
+                                                 tsc(3) * ts_m(k,j,i) )        &
+                                               - tsc(5) * rdf_sc(k) *          &
+                                                    ( s(k,j,i) - s_init(k) )   &
+                                        )                                      &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                IF ( s_p(k,j,i) < 0.0_wp )  s_p(k,j,i) = 0.1_wp * s(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      ts_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      ts_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                 &
+                                     + 5.3125_wp * ts_m(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+       CALL cpu_log( log_point(66), 's-equation', 'stop' )
+
+    ENDIF
+
+!
+!-- Calculate prognostic equations for turbulence closure
+    CALL tcm_prognostic_equations()
+
+!
+!-- Calculate prognostic equation for chemical quantites
+    IF ( air_chemistry )  THEN
+       CALL cpu_log( log_point(83), '(chem advec+diff+prog)', 'start' )
+!
+!--    Loop over chemical species
+       DO  lsp = 1, nvar                         
+          CALL chem_prognostic_equations( chem_species(lsp)%conc_p,            &
+                                          chem_species(lsp)%conc,              &
+                                          chem_species(lsp)%tconc_m,           &
+                                          chem_species(lsp)%conc_pr_init,      &
+                                          lsp )
+       ENDDO
+
+       CALL cpu_log( log_point(83), '(chem advec+diff+prog)', 'stop' )             
+    ENDIF   ! Chemicals equations
+        
+    IF ( salsa )  THEN 
+       CALL cpu_log( log_point_s(92), 'salsa advec+diff+prog ', 'start' )
+!
+!--          Loop over aerosol size bins: number and mass bins
+       IF ( time_since_reference_point >= skip_time_do_salsa )  THEN
+       
+          DO  b = 1, nbins                
+             sums_salsa_ws_l = aerosol_number(b)%sums_ws_l
+             CALL salsa_tendency( 'aerosol_number', aerosol_number(b)%conc_p,  &
+                                   aerosol_number(b)%conc,                     &
+                                   aerosol_number(b)%tconc_m,                  &
+                                   b, b, aerosol_number(b)%init )
+             aerosol_number(b)%sums_ws_l = sums_salsa_ws_l
+             DO  c = 1, ncc_tot
+                sums_salsa_ws_l = aerosol_mass((c-1)*nbins+b)%sums_ws_l 
+                CALL salsa_tendency( 'aerosol_mass',                           &
+                                      aerosol_mass((c-1)*nbins+b)%conc_p,      &
+                                      aerosol_mass((c-1)*nbins+b)%conc,        &
+                                      aerosol_mass((c-1)*nbins+b)%tconc_m,     &
+                                      b, c, aerosol_mass((c-1)*nbins+b)%init )
+                aerosol_mass((c-1)*nbins+b)%sums_ws_l = sums_salsa_ws_l
+             ENDDO
+          ENDDO
+          IF ( .NOT. salsa_gases_from_chem )  THEN
+             DO  g = 1, ngast
+                sums_salsa_ws_l = salsa_gas(g)%sums_ws_l
+                CALL salsa_tendency( 'salsa_gas', salsa_gas(g)%conc_p,         &
+                                      salsa_gas(g)%conc, salsa_gas(g)%tconc_m, &
+                                      g, g, salsa_gas(g)%init )
+                salsa_gas(g)%sums_ws_l = sums_salsa_ws_l
+             ENDDO
+          ENDIF
+       
+       ENDIF
+       
+       CALL cpu_log( log_point_s(92), 'salsa advec+diff+prog ', 'stop' )
+    ENDIF  
+
+!
+!-- Calculate prognostic equations for the ocean
+    IF ( ocean_mode )  CALL ocean_prognostic_equations()
+
+ END SUBROUTINE prognostic_equations_vector
+
+
+ END MODULE prognostic_equations_mod
Index: /palm/tags/release-6.0/SOURCE/progress_bar_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/progress_bar_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/progress_bar_mod.f90	(revision 3477)
@@ -0,0 +1,248 @@
+!> @file progress_bar_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Increase printed length of run identifier,
+! bugfix for restarts
+! 
+! 3225 2018-08-30 16:33:14Z kanani
+! Increase printed length of run identifier,
+! bugfix for restarts
+! 
+! 2726 2018-01-08 17:40:52Z kanani
+! Exclude spinup time from progress bar 
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_flush replaced by FORTRAN statement
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1468 2014-09-24 14:06:57Z maronga
+! Added support for progress file PROGRESS which is used in case of batch jobs
+!
+! Description:
+! ------------
+!> This routine prints either a progress bar on the standard output in case of
+!> interactive runs, or it prints the progress in a separate file called
+!> PROGRESS.
+!------------------------------------------------------------------------------!
+ MODULE progress_bar
+ 
+
+    USE control_parameters,                                                    &
+        ONLY : end_time, initializing_actions, run_identifier, simulated_time, &
+               simulated_time_at_begin, spinup_time, time_restart
+
+    USE, INTRINSIC ::  ISO_FORTRAN_ENV,                                        &
+        ONLY :  OUTPUT_UNIT
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    PRIVATE
+    PUBLIC   progress_bar_disabled, finish_progress_bar, output_progress_bar
+
+    CHARACTER(LEN=60) ::  bar      !< progress bar, initially filled with "_"
+    CHARACTER(LEN=60) ::  crosses  !< filled with "X"
+
+    INTEGER(iwp) ::  ilength !< length of progress bar filled with "X"
+
+    LOGICAL ::  progress_bar_disabled = .FALSE.   !< envpar-Namelist switch
+
+    REAL(wp) ::  time_to_be_simulated !< in sec
+
+    LOGICAL ::  initialized = .FALSE. !< switch to determine if bar is initialized
+
+    SAVE
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize the progress bar/file
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE init_progress_bar
+
+       IMPLICIT NONE
+
+!
+!--    Calculate the time to be simulated in this job
+!--    (in case of automatic restarts the calculated time will probably be
+!--    larger than the time which will actually be simulated)
+       IF ( time_restart /= 9999999.9_wp  .AND.  time_restart < end_time  .AND.&
+            time_restart > simulated_time_at_begin )  THEN
+          time_to_be_simulated = time_restart - simulated_time_at_begin
+       ELSEIF ( initializing_actions == 'read_restart_data' )  THEN
+          time_to_be_simulated = end_time     - simulated_time_at_begin
+       ELSE
+          time_to_be_simulated = end_time     - simulated_time_at_begin        &
+                                              - spinup_time
+       ENDIF
+
+       IF ( progress_bar_disabled )  THEN
+
+          CALL check_open ( 117 )
+          WRITE ( 117, FMT='(A34,/)' ) run_identifier
+
+       ELSE
+          bar = '____________________________________________________________'
+          crosses = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
+!
+!--       Line feed on stdout to seperate the progress bar from previous messages
+          WRITE ( OUTPUT_UNIT, '(1X)' )
+#if defined( __intel_compiler )
+!
+!--       The Intel compiler does not allow to immediately flush the output buffer
+!--       in case that option ADVANCE='NO' is used in the write statement.
+!--       A workaround is to set a special carriage control feature and use "+" as
+!--       first output character, but this non-standard and only available with the
+!--       Intel compiler
+          OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='FORTRAN' )
+#endif
+
+       ENDIF
+
+       initialized = .TRUE.
+
+    END SUBROUTINE init_progress_bar
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Print progress data to standard output (interactive) or to file (batch jobs)
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE output_progress_bar
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  remaining_time_in_percent  !< remaining time to be simulated
+                                               !< in the job
+       REAL(wp) ::  remaining_time_in_percent_total !< total remaining time of
+                                                    !< the job chain
+
+       IF ( .NOT. initialized )  CALL init_progress_bar
+
+       IF ( initializing_actions == 'read_restart_data' )  THEN
+          remaining_time_in_percent =                                             &
+             ( simulated_time - simulated_time_at_begin )                         &
+             / time_to_be_simulated
+
+          remaining_time_in_percent_total = simulated_time / end_time
+       ELSE
+          remaining_time_in_percent =                                             &
+             ( simulated_time - simulated_time_at_begin - spinup_time )           &
+             / time_to_be_simulated
+
+          remaining_time_in_percent_total = ( ( simulated_time - spinup_time )    &
+                                            / ( end_time       - spinup_time ) )
+       ENDIF
+
+!
+!--    In batch mode, use a file (PROGRESS), otherwise use progress bar
+       IF ( progress_bar_disabled )  THEN
+
+          BACKSPACE ( 117 )
+          WRITE ( 117, FMT='(F5.2,1X,F5.2)' ) remaining_time_in_percent,       &
+                                              remaining_time_in_percent_total
+          FLUSH( 117 )
+
+       ELSE
+
+!
+!--       Calculate length of progress bar
+          ilength = remaining_time_in_percent * 60.0_wp
+          ilength = MIN( ilength, 60 )
+
+          bar(1:ilength) = crosses(1:ilength)
+
+#if defined( __intel_compiler )
+          WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')' )        &
+                  '+', bar,                                                    &
+                   MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) *       &
+                                  100.0_wp )
+#else
+          WRITE ( OUTPUT_UNIT, '(A,6X,''['',A,''] '',F5.1,'' left'')',         &
+                  ADVANCE='NO' )  CHAR( 13 ), bar,                             &
+                   MAX( 0.0_wp, ( 1.0_wp - remaining_time_in_percent ) *       &
+                                  100.0_wp )
+#endif
+          FLUSH( OUTPUT_UNIT )
+
+       ENDIF
+
+    END SUBROUTINE output_progress_bar
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Finalization of the progress bar/file
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE finish_progress_bar
+
+       IMPLICIT NONE
+
+       IF ( progress_bar_disabled )  THEN
+
+          CALL close_file ( 117 )
+
+       ELSE
+       
+#if defined( __intel_compiler )
+!
+!--       Reset to the default carriage control
+          OPEN ( OUTPUT_UNIT, CARRIAGECONTROL='LIST' )
+#endif
+!
+!--       Line feed when simulation has finished
+          WRITE ( OUTPUT_UNIT, '(1X)' )
+
+       ENDIF
+
+    END SUBROUTINE finish_progress_bar
+
+
+ END MODULE progress_bar
Index: /palm/tags/release-6.0/SOURCE/radiation_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/radiation_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/radiation_model_mod.f90	(revision 3477)
@@ -0,0 +1,10356 @@
+!> @file radiation_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2015-2018 Institute of Computer Science of the 
+!                     Czech Academy of Sciences, Prague
+! Copyright 2015-2018 Czech Technical University in Prague
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! From branch resler@3462, pavelkrc:
+! add MRT shaping function for human
+! 
+! 3449 2018-10-29 19:36:56Z suehring
+! New RTM version 3.0: (Pavel Krc, Jaroslav Resler, ICS, Prague)
+!   - Interaction of plant canopy with LW radiation
+!   - Transpiration from resolved plant canopy dependent on radiation
+!     called from RTM
+! 
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! - workaround: return unit=illegal in check_data_output for certain variables
+!   when check called from init_masks
+! - Use pointer in masked output to reduce code redundancies
+! - Add terrain-following masked output
+! 
+! 3424 2018-10-25 07:29:10Z gronemeier
+! bugfix: add rad_lw_in, rad_lw_out, rad_sw_out to radiation_check_data_output
+! 
+! 3378 2018-10-19 12:34:59Z kanani
+! merge from radiation branch (r3362) into trunk
+! (moh.hefny):
+! - removed read/write_svf_on_init and read_dist_max_svf (not used anymore)
+! - bugfix nzut > nzpt in calculating maxboxes
+! 
+! 3372 2018-10-18 14:03:19Z raasch
+! bugfix: kind type of 2nd argument of mpi_win_allocate changed, misplaced
+!         __parallel directive
+! 
+! 3351 2018-10-15 18:40:42Z suehring
+! Do not overwrite values of spectral and broadband albedo during initialization
+! if they are already initialized in the urban-surface model via ASCII input.
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! - New RTM version 2.9: (Pavel Krc, Jaroslav Resler, ICS, Prague)
+!   added calculation of the MRT inside the RTM module
+!   MRT fluxes are consequently used in the new biometeorology module
+!   for calculation of biological indices (MRT, PET)
+!   Fixes of v. 2.5 and SVN trunk:
+!    - proper initialization of rad_net_l
+!    - make arrays nsurfs and surfstart TARGET to prevent some MPI problems
+!    - initialization of arrays used in MPI one-sided operation as 1-D arrays
+!      to prevent problems with some MPI/compiler combinations
+!    - fix indexing of target displacement in subroutine request_itarget to 
+!      consider nzub
+!    - fix LAD dimmension range in PCB calculation
+!    - check ierr in all MPI calls
+!    - use proper per-gridbox sky and diffuse irradiance
+!    - fix shading for reflected irradiance
+!    - clear away the residuals of "atmospheric surfaces" implementation
+!    - fix rounding bug in raytrace_2d introduced in SVN trunk
+! - New RTM version 2.5: (Pavel Krc, Jaroslav Resler, ICS, Prague)
+!   can use angular discretization for all SVF
+!   (i.e. reflected and emitted radiation in addition to direct and diffuse),
+!   allowing for much better scaling wih high resoltion and/or complex terrain
+! - Unite array grow factors
+! - Fix slightly shifted terrain height in raytrace_2d
+! - Use more efficient MPI_Win_allocate for reverse gridsurf index
+! - Fix random MPI RMA bugs on Intel compilers
+! - Fix approx. double plant canopy sink values for reflected radiation
+! - Fix mostly missing plant canopy sinks for direct radiation
+! - Fix discretization errors for plant canopy sink in diffuse radiation
+! - Fix rounding errors in raytrace_2d
+!
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3272 2018-09-24 10:16:32Z suehring
+! - split direct and diffusion shortwave radiation using RRTMG rather than using
+!   calc_diffusion_radiation, in case of RRTMG
+! - removed the namelist variable split_diffusion_radiation. Now splitting depends
+!   on the choise of radiation radiation scheme
+! - removed calculating the rdiation flux for surfaces at the radiation scheme
+!   in case of using RTM since it will be calculated anyway in the radiation 
+!   interaction routine.
+! - set SW radiation flux for surfaces to zero at night in case of no RTM is used
+! - precalculate the unit vector yxdir of ray direction to avoid the temporarly 
+!   array allocation during the subroutine call
+! - fixed a bug in calculating the max number of boxes ray can cross in the domain
+! 
+! 3264 2018-09-20 13:54:11Z moh.hefny
+! Bugfix in raytrace_2d calls
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed or commented
+! 
+! 3233 2018-09-07 13:21:24Z schwenkel
+! Adapted for the use of cloud_droplets 
+! 
+! 3230 2018-09-05 09:29:05Z schwenkel
+! Bugfix in radiation_constant_surf: changed (10.0 - emissivity_urb) to 
+! (1.0 - emissivity_urb)
+! 
+! 3226 2018-08-31 12:27:09Z suehring
+! Bugfixes in calculation of sky-view factors and canopy-sink factors.
+! 
+! 3186 2018-07-30 17:07:14Z suehring
+! Remove print statement
+! 
+! 3180 2018-07-27 11:00:56Z suehring
+! Revise concept for calculation of effective radiative temperature and mapping
+! of radiative heating
+! 
+! 3175 2018-07-26 14:07:38Z suehring
+! Bugfix for commit 3172
+! 
+! 3173 2018-07-26 12:55:23Z suehring
+! Revise output of surface radiation quantities in case of overhanging 
+! structures
+! 
+! 3172 2018-07-26 12:06:06Z suehring
+! Bugfixes:
+!  - temporal work-around for calculation of effective radiative surface 
+!    temperature
+!  - prevent positive solar radiation during nighttime
+! 
+! 3170 2018-07-25 15:19:37Z suehring
+! Bugfix, map signle-column radiation forcing profiles on top of any topography
+! 
+! 3156 2018-07-19 16:30:54Z knoop
+! Bugfix: replaced usage of the pt array with the surf%pt_surface array
+!
+! 3137 2018-07-17 06:44:21Z maronga
+! String length for trace_names fixed
+! 
+! 3127 2018-07-15 08:01:25Z maronga
+! A few pavement parameters updated.
+! 
+! 3123 2018-07-12 16:21:53Z suehring
+! Correct working precision for INTEGER number
+! 
+! 3122 2018-07-11 21:46:41Z maronga
+! Bugfix: maximum distance for raytracing was set to  -999 m by default,
+! effectively switching off all surface reflections when max_raytracing_dist
+! was not explicitly set in namelist
+! 
+! 3117 2018-07-11 09:59:11Z maronga
+! Bugfix: water vapor was not transfered to RRTMG when bulk_cloud_model = .F.
+! Bugfix: changed the calculation of RRTMG boundary conditions (Mohamed Salim)
+! Bugfix: dry residual atmosphere is replaced by standard RRTMG atmosphere
+! 
+! 3116 2018-07-10 14:31:58Z suehring
+! Output of long/shortwave radiation at surface
+! 
+! 3107 2018-07-06 15:55:51Z suehring
+! Bugfix, missing index for dz
+! 
+! 3066 2018-06-12 08:55:55Z Giersch
+! Error message revised 
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by dz(1), error message concerning vertical stretching was 
+! added  
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 3026 2018-05-22 10:30:53Z schwenkel
+! Changed the name specific humidity to mixing ratio, since we are computing
+! mixing ratios.
+! 
+! 3016 2018-05-09 10:53:37Z Giersch
+! Revised structure of reading svf data according to PALM coding standard: 
+! svf_code_field/len and fsvf removed, error messages PA0493 and PA0494 added,
+! allocation status of output arrays checked. 
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Introduced plant canopy height similar to urban canopy height to limit
+! the memory requirement to allocate lad.
+! Deactivated automatic setting of minimum raytracing distance.
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Further allocation checks implemented (averaged data will be assigned to fill
+! values if no allocation happened so far) 
+! 
+! 2995 2018-04-19 12:13:16Z Giersch
+! IF-statement in radiation_init removed so that the calculation of radiative 
+! fluxes at model start is done in any case, bugfix in 
+! radiation_presimulate_solar_pos (end_time is the sum of end_time and the 
+! spinup_time specified in the p3d_file ), list of variables/fields that have
+! to be written out or read in case of restarts has been extended
+! 
+! 2977 2018-04-17 10:27:57Z kanani
+! Implement changes from branch radiation (r2948-2971) with minor modifications,
+! plus some formatting.
+! (moh.hefny):
+! - replaced plant_canopy by npcbl to check tree existence to avoid weird 
+!   allocation of related arrays (after domain decomposition some domains 
+!   contains no trees although plant_canopy (global parameter) is still TRUE).
+! - added a namelist parameter to force RTM settings
+! - enabled the option to switch radiation reflections off
+! - renamed surf_reflections to surface_reflections 
+! - removed average_radiation flag from the namelist (now it is implicitly set 
+!   in init_3d_model according to RTM)
+! - edited read and write sky view factors and CSF routines to account for
+!   the sub-domains which may not contain any of them
+! 
+! 2967 2018-04-13 11:22:08Z raasch
+! bugfix: missing parallel cpp-directives added
+! 
+! 2964 2018-04-12 16:04:03Z Giersch
+! Error message PA0491 has been introduced which could be previously found in 
+! check_open. The variable numprocs_previous_run is only known in case of 
+! initializing_actions == read_restart_data
+! 
+! 2963 2018-04-12 14:47:44Z suehring
+! - Introduce index for vegetation/wall, pavement/green-wall and water/window 
+!   surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+! - Minor bugfix in initialization of albedo for window surfaces
+! 
+! 2944 2018-04-03 16:20:18Z suehring
+! Fixed bad commit
+! 
+! 2943 2018-04-03 16:17:10Z suehring
+! No read of nsurfl from SVF file since it is calculated in
+! radiation_interaction_init,
+! allocation of arrays in radiation_read_svf only if not yet allocated,
+! update of 2920 revision comment.
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed radiation_par to radiation_parameters
+! 
+! 2930 2018-03-23 16:30:46Z suehring
+! Remove default surfaces from radiation model, does not make much sense to 
+! apply radiation model without energy-balance solvers; Further, add check for 
+! this. 
+! 
+! 2920 2018-03-22 11:22:01Z kanani
+! - Bugfix: Initialize pcbl array (=-1)
+! RTM version 2.0 (Jaroslav Resler, Pavel Krc, Mohamed Salim):
+! - new major version of radiation interactions
+! - substantially enhanced performance and scalability
+! - processing of direct and diffuse solar radiation separated from reflected 
+!   radiation, removed virtual surfaces
+! - new type of sky discretization by azimuth and elevation angles
+! - diffuse radiation processed cumulatively using sky view factor
+! - used precalculated apparent solar positions for direct irradiance
+! - added new 2D raytracing process for processing whole vertical column at once
+!   to increase memory efficiency and decrease number of MPI RMA operations
+! - enabled limiting the number of view factors between surfaces by the distance
+!   and value
+! - fixing issues induced by transferring radiation interactions from 
+!   urban_surface_mod to radiation_mod
+! - bugfixes and other minor enhancements
+! 
+! 2906 2018-03-19 08:56:40Z Giersch
+! NAMELIST paramter read/write_svf_on_init have been removed, functions 
+! check_open and close_file are used now for opening/closing files related to
+! svf data, adjusted unit number and error numbers 
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Calculations of the index range of the subdomain on file which overlaps with
+! the current subdomain are already done in read_restart_data_mod
+! radiation_read_restart_data was renamed to radiation_rrd_local and 
+! radiation_last_actions was renamed to radiation_wrd_local, variable named 
+! found has been introduced for checking if restart data was found, reading 
+! of restart strings has been moved completely to read_restart_data_mod, 
+! radiation_rrd_local is already inside the overlap loop programmed in 
+! read_restart_data_mod, the marker *** end rad *** is not necessary anymore,
+! strings and their respective lengths are written out and read now in case of 
+! restart runs to get rid of prescribed character lengths (Giersch)
+!
+! 2809 2018-02-15 09:55:58Z suehring
+! Bugfix for gfortran: Replace the function C_SIZEOF with STORAGE_SIZE
+! 
+! 2753 2018-01-16 14:16:49Z suehring
+! Tile approach for spectral albedo implemented. 
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2724 2018-01-05 12:12:38Z maronga
+! Set default of average_radiation to .FALSE.
+! 
+! 2723 2018-01-05 09:27:03Z maronga
+! Bugfix in calculation of rad_lw_out (clear-sky). First grid level was used
+! instead of the surface value
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2707 2017-12-18 18:34:46Z suehring
+! Changes from last commit documented
+! 
+! 2706 2017-12-18 18:33:49Z suehring
+! Bugfix, in average radiation case calculate exner function before using it.
+!
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Improved reading/writing of SVF from/to file (BM)
+! - Bugfixes concerning RRTMG as well as average_radiation options (M. Salim)
+! - Revised initialization of surface albedo and some minor bugfixes (MS)
+! - Update net radiation after running radiation interaction routine (MS)
+! - Revisions from M Salim included
+! - Adjustment to topography and surface structure (MS)
+! - Initialization of albedo and surface emissivity via input file (MS)
+! - albedo_pars extended (MS)
+! 
+! 2604 2017-11-06 13:29:00Z schwenkel
+! bugfix for calculation of effective radius using morrison microphysics
+! 
+! 2601 2017-11-02 16:22:46Z scharf
+! added emissivity to namelist
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Bugfix: calculation of shortwave and longwave albedos for RRTMG swapped
+! 
+! 2547 2017-10-16 12:41:56Z schwenkel
+! extended by cloud_droplets option, minor bugfix and correct calculation of
+! cloud droplet number concentration
+! 
+! 2544 2017-10-13 18:09:32Z maronga
+! Moved date and time quantitis to separate module date_and_time_mod
+! 
+! 2512 2017-10-04 08:26:59Z raasch
+! upper bounds of cross section and 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! 
+! 2504 2017-09-27 10:36:13Z maronga
+! Updates pavement types and albedo parameters
+! 
+! 2328 2017-08-03 12:34:22Z maronga
+! Emissivity can now be set individually for each pixel.
+! Albedo type can be inferred from land surface model.
+! Added default albedo type for bare soil
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+! Improved syntax layout
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! type of write_binary changed from CHARACTER to LOGICAL
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Added output of rad_sw_out for radiation_scheme = 'constant'
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! Numbering changed (2 timeseries removed)
+! 
+! 2249 2017-06-06 13:58:01Z sward
+! Allow for RRTMG runs without humidity/cloud physics
+! 
+! 2248 2017-06-06 13:52:54Z sward
+! Error no changed
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+! 
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! Bugfix in read restart
+! 
+! 2200 2017-04-11 11:37:51Z suehring
+! Bugfix in call of exchange_horiz_2d and read restart data
+! 
+! 2163 2017-03-01 13:23:15Z schwenkel
+! Bugfix in radiation_check_data_output
+! 
+! 2157 2017-02-22 15:10:35Z suehring
+! Bugfix in read_restart data
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Removed CALL of auxiliary SUBROUTINE get_usm_info,
+! flag urban_surface is now defined in module control_parameters.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added calculation of solar directional vector for new urban surface 
+! model,
+! accounted for urban_surface model in radiation_check_parameters,
+! correction of comments for zenith angle.
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Output of 2D/3D/masked data is now directly done within this module. The
+! radiation schemes have been simplified for better usability so that
+! rad_lw_in, rad_lw_out, rad_sw_in, and rad_sw_out are available independent of
+! the radiation code used.
+! 
+! 1856 2016-04-13 12:56:17Z maronga
+! Bugfix: allocation of rad_lw_out for radiation_scheme = 'clear-sky'
+! 
+! 1853 2016-04-11 09:00:35Z maronga
+! Added routine for radiation_scheme = constant.
+!  
+! 1849 2016-04-08 11:33:18Z hoffmann 
+! Adapted for modularization of microphysics
+!
+! 1826 2016-04-07 12:01:39Z maronga
+! Further modularization.
+! 
+! 1788 2016-03-10 11:01:04Z maronga
+! Added new albedo class for pavements / roads.
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! palm-netcdf-module removed in order to avoid a circular module dependency,
+! netcdf-variables moved to netcdf-module, new routine netcdf_handle_error_rad
+! added
+!
+! 1757 2016-02-22 15:49:32Z maronga
+! Added parameter unscheduled_radiation_calls. Bugfix: interpolation of sounding
+! profiles for pressure and temperature above the LES domain.
+! 
+! 1709 2015-11-04 14:47:01Z maronga
+! Bugfix: set initial value for rrtm_lwuflx_dt to zero, small formatting
+! corrections
+! 
+! 1701 2015-11-02 07:43:04Z maronga
+! Bugfixes: wrong index for output of timeseries, setting of nz_snd_end
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added option for spin-up runs without radiation (skip_time_do_radiation). Bugfix
+! in calculation of pressure profiles. Bugfix in calculation of trace gas profiles.
+! Added output of radiative heating rates.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1606 2015-06-29 10:43:37Z maronga
+! Added preprocessor directive __netcdf to allow for compiling without netCDF.
+! Note, however, that RRTMG cannot be used without netCDF.
+! 
+! 1590 2015-05-08 13:56:27Z maronga
+! Bugfix: definition of character strings requires same length for all elements
+! 
+! 1587 2015-05-04 14:19:01Z maronga
+! Added albedo class for snow
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Added support for RRTMG
+! 
+! 1571 2015-03-12 16:12:49Z maronga
+! Added missing KIND attribute. Removed upper-case variable names
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added support for data output. Various variables have been renamed. Added
+! interface for different radiation schemes (currently: clear-sky, constant, and
+! RRTM (not yet implemented).
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> Radiation models and interfaces
+!> @todo Replace dz(1) appropriatly to account for grid stretching
+!> @todo move variable definitions used in radiation_init only to the subroutine
+!>       as they are no longer required after initialization.
+!> @todo Output of full column vertical profiles used in RRTMG
+!> @todo Output of other rrtm arrays (such as volume mixing ratios)
+!> @todo Check for mis-used NINT() calls in raytrace_2d
+!>       RESULT: Original was correct (carefully verified formula), the change
+!>               to INT broke raytracing      -- P. Krc
+!> @todo Optimize radiation_tendency routines
+!>
+!> @note Many variables have a leading dummy dimension (0:0) in order to
+!>       match the assume-size shape expected by the RRTMG model.
+!------------------------------------------------------------------------------!
+ MODULE radiation_model_mod
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, hyp, nc, pt, p, q, ql, u, v, w, zu, zw, exner, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, g, lv_d_cp, l_v, pi, r_d, rho_l, solar_constant,      &
+               barometric_formula
+
+    USE calc_mean_profile_mod,                                                 &
+        ONLY:  calc_mean_profile
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, coupling_char, dz,                              &
+               humidity,                                                       &
+               initializing_actions, io_blocks, io_group,                      &
+               latitude, longitude, large_scale_forcing, lsf_surf,             &
+               message_string, plant_canopy, pt_surface,&
+               rho_surface, surface_pressure, time_since_reference_point,      &
+               urban_surface, land_surface, end_time, spinup_time, dt_spinup
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE grid_variables,                                                        &
+         ONLY:  ddx, ddy, dx, dy 
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  calc_date_and_time, d_hours_day, d_seconds_hour, day_of_year,   &
+               d_seconds_year, day_of_year_init, time_utc_init, time_utc
+
+    USE indices,                                                               &
+        ONLY:  nnx, nny, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg,   &
+               nzb, nzt
+
+    USE, INTRINSIC :: iso_c_binding
+
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, microphysics_morrison, na_init, nc_const, sigma_gc
+
+#if defined ( __netcdf )
+    USE NETCDF
+#endif
+
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  albedo_type_f, albedo_pars_f, building_type_f, pavement_type_f, &
+               vegetation_type_f, water_type_f
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  lad_s, pc_heating_rate, pc_transpiration_rate, pc_latent_rate,  &
+               plant_canopy_transpiration, pcm_calc_transpiration_rate
+
+    USE pegrid
+
+#if defined ( __rrtmg )
+    USE parrrsw,                                                               &
+        ONLY:  naerec, nbndsw
+
+    USE parrrtm,                                                               &
+        ONLY:  nbndlw
+
+    USE rrtmg_lw_init,                                                         &
+        ONLY:  rrtmg_lw_ini
+
+    USE rrtmg_sw_init,                                                         &
+        ONLY:  rrtmg_sw_ini
+
+    USE rrtmg_lw_rad,                                                          &
+        ONLY:  rrtmg_lw
+
+    USE rrtmg_sw_rad,                                                          &
+        ONLY:  rrtmg_sw
+#endif
+    USE statistics,                                                            &
+        ONLY:  hom
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index, get_topography_top_index_ji,          &
+               ind_pav_green, ind_veg_wall, ind_wat_win,                       &
+               surf_lsm_h, surf_lsm_v, surf_type, surf_usm_h, surf_usm_v
+
+    IMPLICIT NONE
+
+    CHARACTER(10) :: radiation_scheme = 'clear-sky' ! 'constant', 'clear-sky', or 'rrtmg'
+
+!
+!-- Predefined Land surface classes (albedo_type) after Briegleb (1992)
+    CHARACTER(37), DIMENSION(0:33), PARAMETER :: albedo_type_name = (/      &
+                                   'user defined                         ', & !  0 
+                                   'ocean                                ', & !  1
+                                   'mixed farming, tall grassland        ', & !  2
+                                   'tall/medium grassland                ', & !  3 
+                                   'evergreen shrubland                  ', & !  4
+                                   'short grassland/meadow/shrubland     ', & !  5
+                                   'evergreen needleleaf forest          ', & !  6
+                                   'mixed deciduous evergreen forest     ', & !  7
+                                   'deciduous forest                     ', & !  8
+                                   'tropical evergreen broadleaved forest', & !  9
+                                   'medium/tall grassland/woodland       ', & ! 10
+                                   'desert, sandy                        ', & ! 11 
+                                   'desert, rocky                        ', & ! 12 
+                                   'tundra                               ', & ! 13
+                                   'land ice                             ', & ! 14 
+                                   'sea ice                              ', & ! 15 
+                                   'snow                                 ', & ! 16
+                                   'bare soil                            ', & ! 17
+                                   'asphalt/concrete mix                 ', & ! 18
+                                   'asphalt (asphalt concrete)           ', & ! 19
+                                   'concrete (Portland concrete)         ', & ! 20
+                                   'sett                                 ', & ! 21
+                                   'paving stones                        ', & ! 22
+                                   'cobblestone                          ', & ! 23
+                                   'metal                                ', & ! 24
+                                   'wood                                 ', & ! 25
+                                   'gravel                               ', & ! 26
+                                   'fine gravel                          ', & ! 27
+                                   'pebblestone                          ', & ! 28
+                                   'woodchips                            ', & ! 29
+                                   'tartan (sports)                      ', & ! 30
+                                   'artifical turf (sports)              ', & ! 31
+                                   'clay (sports)                        ', & ! 32
+                                   'building (dummy)                     '  & ! 33
+                                                         /)
+
+    REAL(wp), PARAMETER :: sigma_sb       = 5.67037321E-8_wp !< Stefan-Boltzmann constant
+
+    INTEGER(iwp) :: albedo_type  = 9999999, & !< Albedo surface type
+                    dots_rad     = 0          !< starting index for timeseries output 
+
+    LOGICAL ::  unscheduled_radiation_calls = .TRUE., & !< flag parameter indicating whether additional calls of the radiation code are allowed
+                constant_albedo = .FALSE.,            & !< flag parameter indicating whether the albedo may change depending on zenith
+                force_radiation_call = .FALSE.,       & !< flag parameter for unscheduled radiation calls
+                lw_radiation = .TRUE.,                & !< flag parameter indicating whether longwave radiation shall be calculated
+                radiation = .FALSE.,                  & !< flag parameter indicating whether the radiation model is used
+                sun_up    = .TRUE.,                   & !< flag parameter indicating whether the sun is up or down
+                sw_radiation = .TRUE.,                & !< flag parameter indicating whether shortwave radiation shall be calculated
+                sun_direction = .FALSE.,              & !< flag parameter indicating whether solar direction shall be calculated
+                average_radiation = .FALSE.,          & !< flag to set the calculation of radiation averaging for the domain
+                radiation_interactions = .FALSE.,     & !< flag to activiate RTM (TRUE only if vertical urban/land surface and trees exist)
+                surface_reflections = .TRUE.,         & !< flag to switch the calculation of radiation interaction between surfaces.
+                                                        !< When it switched off, only the effect of buildings and trees shadow
+                                                        !< will be considered. However fewer SVFs are expected.
+                radiation_interactions_on = .TRUE.      !< namelist flag to force RTM activiation regardless to vertical urban/land surface and trees
+
+    REAL(wp) :: albedo = 9999999.9_wp,           & !< NAMELIST alpha
+                albedo_lw_dif = 9999999.9_wp,    & !< NAMELIST aldif
+                albedo_lw_dir = 9999999.9_wp,    & !< NAMELIST aldir
+                albedo_sw_dif = 9999999.9_wp,    & !< NAMELIST asdif
+                albedo_sw_dir = 9999999.9_wp,    & !< NAMELIST asdir
+                decl_1,                          & !< declination coef. 1
+                decl_2,                          & !< declination coef. 2
+                decl_3,                          & !< declination coef. 3
+                dt_radiation = 0.0_wp,           & !< radiation model timestep
+                emissivity = 9999999.9_wp,       & !< NAMELIST surface emissivity
+                lon = 0.0_wp,                    & !< longitude in radians
+                lat = 0.0_wp,                    & !< latitude in radians
+                net_radiation = 0.0_wp,          & !< net radiation at surface
+                skip_time_do_radiation = 0.0_wp, & !< Radiation model is not called before this time
+                sky_trans,                       & !< sky transmissivity
+                time_radiation = 0.0_wp            !< time since last call of radiation code
+
+
+    REAL(wp), DIMENSION(0:0) ::  zenith,         & !< cosine of solar zenith angle
+                                 sun_dir_lat,    & !< solar directional vector in latitudes
+                                 sun_dir_lon       !< solar directional vector in longitudes
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rad_net_av       !< average of net radiation (rad_net) at surface
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rad_lw_in_xy_av  !< average of incoming longwave radiation at surface
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rad_lw_out_xy_av !< average of outgoing longwave radiation at surface
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rad_sw_in_xy_av  !< average of incoming shortwave radiation at surface
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rad_sw_out_xy_av !< average of outgoing shortwave radiation at surface
+!
+!-- Land surface albedos for solar zenith angle of 60Â° after Briegleb (1992)     
+!-- (shortwave, longwave, broadband):   sw,      lw,      bb,
+    REAL(wp), DIMENSION(0:2,1:33), PARAMETER :: albedo_pars = RESHAPE( (/& 
+                                   0.06_wp, 0.06_wp, 0.06_wp,            & !  1
+                                   0.09_wp, 0.28_wp, 0.19_wp,            & !  2
+                                   0.11_wp, 0.33_wp, 0.23_wp,            & !  3
+                                   0.11_wp, 0.33_wp, 0.23_wp,            & !  4
+                                   0.14_wp, 0.34_wp, 0.25_wp,            & !  5
+                                   0.06_wp, 0.22_wp, 0.14_wp,            & !  6
+                                   0.06_wp, 0.27_wp, 0.17_wp,            & !  7
+                                   0.06_wp, 0.31_wp, 0.19_wp,            & !  8
+                                   0.06_wp, 0.22_wp, 0.14_wp,            & !  9
+                                   0.06_wp, 0.28_wp, 0.18_wp,            & ! 10
+                                   0.35_wp, 0.51_wp, 0.43_wp,            & ! 11
+                                   0.24_wp, 0.40_wp, 0.32_wp,            & ! 12
+                                   0.10_wp, 0.27_wp, 0.19_wp,            & ! 13
+                                   0.90_wp, 0.65_wp, 0.77_wp,            & ! 14
+                                   0.90_wp, 0.65_wp, 0.77_wp,            & ! 15
+                                   0.95_wp, 0.70_wp, 0.82_wp,            & ! 16
+                                   0.08_wp, 0.08_wp, 0.08_wp,            & ! 17
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 18
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 19
+                                   0.30_wp, 0.30_wp, 0.30_wp,            & ! 20
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 21
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 22
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 23
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 24
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 25
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 26
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 27
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 28
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 29
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 30
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 31
+                                   0.17_wp, 0.17_wp, 0.17_wp,            & ! 32
+                                   0.17_wp, 0.17_wp, 0.17_wp             & ! 33
+                                 /), (/ 3, 33 /) )
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: &
+                        rad_lw_cs_hr,                  & !< longwave clear sky radiation heating rate (K/s)
+                        rad_lw_cs_hr_av,               & !< average of rad_lw_cs_hr
+                        rad_lw_hr,                     & !< longwave radiation heating rate (K/s)
+                        rad_lw_hr_av,                  & !< average of rad_sw_hr
+                        rad_lw_in,                     & !< incoming longwave radiation (W/m2)
+                        rad_lw_in_av,                  & !< average of rad_lw_in
+                        rad_lw_out,                    & !< outgoing longwave radiation (W/m2)
+                        rad_lw_out_av,                 & !< average of rad_lw_out
+                        rad_sw_cs_hr,                  & !< shortwave clear sky radiation heating rate (K/s)
+                        rad_sw_cs_hr_av,               & !< average of rad_sw_cs_hr
+                        rad_sw_hr,                     & !< shortwave radiation heating rate (K/s)
+                        rad_sw_hr_av,                  & !< average of rad_sw_hr
+                        rad_sw_in,                     & !< incoming shortwave radiation (W/m2)
+                        rad_sw_in_av,                  & !< average of rad_sw_in
+                        rad_sw_out,                    & !< outgoing shortwave radiation (W/m2)
+                        rad_sw_out_av                    !< average of rad_sw_out
+
+
+!
+!-- Variables and parameters used in RRTMG only
+#if defined ( __rrtmg )
+    CHARACTER(LEN=12) :: rrtm_input_file = "RAD_SND_DATA" !< name of the NetCDF input file (sounding data)
+
+
+!
+!-- Flag parameters for RRTMGS (should not be changed)
+    INTEGER(iwp), PARAMETER :: rrtm_idrv     = 1, & !< flag for longwave upward flux calculation option (0,1)
+                               rrtm_inflglw  = 2, & !< flag for lw cloud optical properties (0,1,2)
+                               rrtm_iceflglw = 0, & !< flag for lw ice particle specifications (0,1,2,3)
+                               rrtm_liqflglw = 1, & !< flag for lw liquid droplet specifications
+                               rrtm_inflgsw  = 2, & !< flag for sw cloud optical properties (0,1,2)
+                               rrtm_iceflgsw = 0, & !< flag for sw ice particle specifications (0,1,2,3)
+                               rrtm_liqflgsw = 1    !< flag for sw liquid droplet specifications
+
+!
+!-- The following variables should be only changed with care, as this will 
+!-- require further setting of some variables, which is currently not
+!-- implemented (aerosols, ice phase).
+    INTEGER(iwp) :: nzt_rad,           & !< upper vertical limit for radiation calculations
+                    rrtm_icld = 0,     & !< cloud flag (0: clear sky column, 1: cloudy column)
+                    rrtm_iaer = 0        !< aerosol option flag (0: no aerosol layers, for lw only: 6 (requires setting of rrtm_sw_ecaer), 10: one or more aerosol layers (not implemented)
+
+    INTEGER(iwp) :: nc_stat !< local variable for storin the result of netCDF calls for error message handling
+
+    LOGICAL :: snd_exists = .FALSE.      !< flag parameter to check whether a user-defined input files exists
+
+    REAL(wp), PARAMETER :: mol_mass_air_d_wv = 1.607793_wp !< molecular weight dry air / water vapor
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE :: hyp_snd,     & !< hypostatic pressure from sounding data (hPa)
+                                           rrtm_tsfc,   & !< dummy array for storing surface temperature
+                                           t_snd          !< actual temperature from sounding data (hPa)
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: rrtm_ccl4vmr,   & !< CCL4 volume mixing ratio (g/mol)
+                                             rrtm_cfc11vmr,  & !< CFC11 volume mixing ratio (g/mol)
+                                             rrtm_cfc12vmr,  & !< CFC12 volume mixing ratio (g/mol)
+                                             rrtm_cfc22vmr,  & !< CFC22 volume mixing ratio (g/mol)
+                                             rrtm_ch4vmr,    & !< CH4 volume mixing ratio
+                                             rrtm_cicewp,    & !< in-cloud ice water path (g/mÂ²)
+                                             rrtm_cldfr,     & !< cloud fraction (0,1)
+                                             rrtm_cliqwp,    & !< in-cloud liquid water path (g/mÂ²)
+                                             rrtm_co2vmr,    & !< CO2 volume mixing ratio (g/mol)
+                                             rrtm_emis,      & !< surface emissivity (0-1)  
+                                             rrtm_h2ovmr,    & !< H2O volume mixing ratio
+                                             rrtm_n2ovmr,    & !< N2O volume mixing ratio
+                                             rrtm_o2vmr,     & !< O2 volume mixing ratio
+                                             rrtm_o3vmr,     & !< O3 volume mixing ratio
+                                             rrtm_play,      & !< pressure layers (hPa, zu-grid)
+                                             rrtm_plev,      & !< pressure layers (hPa, zw-grid)
+                                             rrtm_reice,     & !< cloud ice effective radius (microns)
+                                             rrtm_reliq,     & !< cloud water drop effective radius (microns)
+                                             rrtm_tlay,      & !< actual temperature (K, zu-grid)
+                                             rrtm_tlev,      & !< actual temperature (K, zw-grid)
+                                             rrtm_lwdflx,    & !< RRTM output of incoming longwave radiation flux (W/m2)
+                                             rrtm_lwdflxc,   & !< RRTM output of outgoing clear sky longwave radiation flux (W/m2) 
+                                             rrtm_lwuflx,    & !< RRTM output of outgoing longwave radiation flux (W/m2)
+                                             rrtm_lwuflxc,   & !< RRTM output of incoming clear sky longwave radiation flux (W/m2)
+                                             rrtm_lwuflx_dt, & !< RRTM output of incoming clear sky longwave radiation flux (W/m2)
+                                             rrtm_lwuflxc_dt,& !< RRTM output of outgoing clear sky longwave radiation flux (W/m2)
+                                             rrtm_lwhr,      & !< RRTM output of longwave radiation heating rate (K/d)
+                                             rrtm_lwhrc,     & !< RRTM output of incoming longwave clear sky radiation heating rate (K/d)
+                                             rrtm_swdflx,    & !< RRTM output of incoming shortwave radiation flux (W/m2)
+                                             rrtm_swdflxc,   & !< RRTM output of outgoing clear sky shortwave radiation flux (W/m2) 
+                                             rrtm_swuflx,    & !< RRTM output of outgoing shortwave radiation flux (W/m2)
+                                             rrtm_swuflxc,   & !< RRTM output of incoming clear sky shortwave radiation flux (W/m2)
+                                             rrtm_swhr,      & !< RRTM output of shortwave radiation heating rate (K/d)
+                                             rrtm_swhrc,     & !< RRTM output of incoming shortwave clear sky radiation heating rate (K/d) 
+                                             rrtm_dirdflux,  & !< RRTM output of incoming direct shortwave (W/m2) 
+                                             rrtm_difdflux     !< RRTM output of incoming diffuse shortwave (W/m2) 
+
+    REAL(wp), DIMENSION(1) ::                rrtm_aldif,     & !< surface albedo for longwave diffuse radiation
+                                             rrtm_aldir,     & !< surface albedo for longwave direct radiation
+                                             rrtm_asdif,     & !< surface albedo for shortwave diffuse radiation
+                                             rrtm_asdir        !< surface albedo for shortwave direct radiation
+
+!
+!-- Definition of arrays that are currently not used for calling RRTMG (due to setting of flag parameters)
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  rad_lw_cs_in,   & !< incoming clear sky longwave radiation (W/m2) (not used)
+                                                rad_lw_cs_out,  & !< outgoing clear sky longwave radiation (W/m2) (not used)
+                                                rad_sw_cs_in,   & !< incoming clear sky shortwave radiation (W/m2) (not used)
+                                                rad_sw_cs_out,  & !< outgoing clear sky shortwave radiation (W/m2) (not used)
+                                                rrtm_lw_tauaer, & !< lw aerosol optical depth
+                                                rrtm_lw_taucld, & !< lw in-cloud optical depth
+                                                rrtm_sw_taucld, & !< sw in-cloud optical depth
+                                                rrtm_sw_ssacld, & !< sw in-cloud single scattering albedo
+                                                rrtm_sw_asmcld, & !< sw in-cloud asymmetry parameter
+                                                rrtm_sw_fsfcld, & !< sw in-cloud forward scattering fraction
+                                                rrtm_sw_tauaer, & !< sw aerosol optical depth
+                                                rrtm_sw_ssaaer, & !< sw aerosol single scattering albedo
+                                                rrtm_sw_asmaer, & !< sw aerosol asymmetry parameter
+                                                rrtm_sw_ecaer     !< sw aerosol optical detph at 0.55 microns (rrtm_iaer = 6 only)
+
+#endif
+!
+!-- Parameters of urban and land surface models
+    INTEGER(iwp)                                   ::  nzu                                !< number of layers of urban surface (will be calculated)
+    INTEGER(iwp)                                   ::  nzp                                !< number of layers of plant canopy (will be calculated)
+    INTEGER(iwp)                                   ::  nzub,nzut                          !< bottom and top layer of urban surface (will be calculated)
+    INTEGER(iwp)                                   ::  nzpt                               !< top layer of plant canopy (will be calculated)
+!-- parameters of urban and land surface models
+    INTEGER(iwp), PARAMETER                        ::  nzut_free = 3                      !< number of free layers above top of of topography
+    INTEGER(iwp), PARAMETER                        ::  ndsvf = 2                          !< number of dimensions of real values in SVF
+    INTEGER(iwp), PARAMETER                        ::  idsvf = 2                          !< number of dimensions of integer values in SVF
+    INTEGER(iwp), PARAMETER                        ::  ndcsf = 1                          !< number of dimensions of real values in CSF
+    INTEGER(iwp), PARAMETER                        ::  idcsf = 2                          !< number of dimensions of integer values in CSF
+    INTEGER(iwp), PARAMETER                        ::  kdcsf = 4                          !< number of dimensions of integer values in CSF calculation array
+    INTEGER(iwp), PARAMETER                        ::  id = 1                             !< position of d-index in surfl and surf
+    INTEGER(iwp), PARAMETER                        ::  iz = 2                             !< position of k-index in surfl and surf
+    INTEGER(iwp), PARAMETER                        ::  iy = 3                             !< position of j-index in surfl and surf
+    INTEGER(iwp), PARAMETER                        ::  ix = 4                             !< position of i-index in surfl and surf
+
+    INTEGER(iwp), PARAMETER                        ::  nsurf_type = 10                    !< number of surf types incl. phys.(land+urban) & (atm.,sky,boundary) surfaces - 1
+
+    INTEGER(iwp), PARAMETER                        ::  iup_u    = 0                       !< 0 - index of urban upward surface (ground or roof)
+    INTEGER(iwp), PARAMETER                        ::  idown_u  = 1                       !< 1 - index of urban downward surface (overhanging)
+    INTEGER(iwp), PARAMETER                        ::  inorth_u = 2                       !< 2 - index of urban northward facing wall
+    INTEGER(iwp), PARAMETER                        ::  isouth_u = 3                       !< 3 - index of urban southward facing wall
+    INTEGER(iwp), PARAMETER                        ::  ieast_u  = 4                       !< 4 - index of urban eastward facing wall
+    INTEGER(iwp), PARAMETER                        ::  iwest_u  = 5                       !< 5 - index of urban westward facing wall
+
+    INTEGER(iwp), PARAMETER                        ::  iup_l    = 6                       !< 6 - index of land upward surface (ground or roof)
+    INTEGER(iwp), PARAMETER                        ::  inorth_l = 7                       !< 7 - index of land northward facing wall
+    INTEGER(iwp), PARAMETER                        ::  isouth_l = 8                       !< 8 - index of land southward facing wall
+    INTEGER(iwp), PARAMETER                        ::  ieast_l  = 9                       !< 9 - index of land eastward facing wall
+    INTEGER(iwp), PARAMETER                        ::  iwest_l  = 10                      !< 10- index of land westward facing wall
+
+    INTEGER(iwp), DIMENSION(0:nsurf_type), PARAMETER ::  idir = (/0, 0,0, 0,1,-1,0,0, 0,1,-1/)   !< surface normal direction x indices
+    INTEGER(iwp), DIMENSION(0:nsurf_type), PARAMETER ::  jdir = (/0, 0,1,-1,0, 0,0,1,-1,0, 0/)   !< surface normal direction y indices
+    INTEGER(iwp), DIMENSION(0:nsurf_type), PARAMETER ::  kdir = (/1,-1,0, 0,0, 0,1,0, 0,0, 0/)   !< surface normal direction z indices
+    REAL(wp),     DIMENSION(0:nsurf_type)          :: facearea                            !< area of single face in respective
+                                                                                          !< direction (will be calc'd)
+
+
+!-- indices and sizes of urban and land surface models
+    INTEGER(iwp)                                   ::  startland        !< start index of block of land and roof surfaces
+    INTEGER(iwp)                                   ::  endland          !< end index of block of land and roof surfaces
+    INTEGER(iwp)                                   ::  nlands           !< number of land and roof surfaces in local processor
+    INTEGER(iwp)                                   ::  startwall        !< start index of block of wall surfaces
+    INTEGER(iwp)                                   ::  endwall          !< end index of block of wall surfaces
+    INTEGER(iwp)                                   ::  nwalls           !< number of wall surfaces in local processor
+
+!-- indices and sizes of urban and land surface models
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE,TARGET ::  surfl_l          !< coordinates of i-th local surface in local grid - surfl[:,k] = [d, z, y, x]
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE,TARGET ::  surf_l           !< coordinates of i-th surface in grid - surf[:,k] = [d, z, y, x]
+    INTEGER(iwp), DIMENSION(:,:), POINTER          ::  surfl            !< coordinates of i-th local surface in local grid - surfl[:,k] = [d, z, y, x]
+    INTEGER(iwp), DIMENSION(:,:), POINTER          ::  surf             !< coordinates of i-th surface in grid - surf[:,k] = [d, z, y, x]
+    INTEGER(iwp)                                   ::  nsurfl           !< number of all surfaces in local processor
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE,TARGET ::  nsurfs           !< array of number of all surfaces in individual processors
+    INTEGER(iwp)                                   ::  nsurf            !< global number of surfaces in index array of surfaces (nsurf = proc nsurfs)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE,TARGET ::  surfstart        !< starts of blocks of surfaces for individual processors in array surf (indexed from 1)
+                                                                        !< respective block for particular processor is surfstart[iproc+1]+1 : surfstart[iproc+1]+nsurfs[iproc+1]
+
+!-- block variables needed for calculation of the plant canopy model inside the urban surface model
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  pct              !< top layer of the plant canopy
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  pch              !< heights of the plant canopy
+    INTEGER(iwp)                                   ::  npcbl = 0        !< number of the plant canopy gridboxes in local processor
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  pcbl             !< k,j,i coordinates of l-th local plant canopy box pcbl[:,l] = [k, j, i]
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinsw          !< array of absorbed sw radiation for local plant canopy box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinswdir       !< array of absorbed direct sw radiation for local plant canopy box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinswdif       !< array of absorbed diffusion sw radiation for local plant canopy box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinlw          !< array of absorbed lw radiation for local plant canopy box
+
+!-- configuration parameters (they can be setup in PALM config)
+    LOGICAL                                        ::  raytrace_mpi_rma = .TRUE.          !< use MPI RMA to access LAD and gridsurf from remote processes during raytracing
+    LOGICAL                                        ::  rad_angular_discretization = .TRUE.!< whether to use fixed resolution discretization of view factors for
+                                                                                          !< reflected radiation (as opposed to all mutually visible pairs)
+    LOGICAL                                        ::  plant_lw_interact = .TRUE.         !< whether plant canopy interacts with LW radiation (in addition to SW)
+    INTEGER(iwp)                                   ::  mrt_nlevels = 0                    !< number of vertical boxes above surface for which to calculate MRT
+    LOGICAL                                        ::  mrt_skip_roof = .TRUE.             !< do not calculate MRT above roof surfaces
+    LOGICAL                                        ::  mrt_include_sw = .TRUE.            !< should MRT calculation include SW radiation as well?
+    LOGICAL                                        ::  mrt_geom_human = .TRUE.            !< MRT direction weights simulate human body instead of a sphere
+    INTEGER(iwp)                                   ::  nrefsteps = 3                      !< number of reflection steps to perform
+    REAL(wp), PARAMETER                            ::  ext_coef = 0.6_wp                  !< extinction coefficient (a.k.a. alpha)
+    INTEGER(iwp), PARAMETER                        ::  rad_version_len = 10               !< length of identification string of rad version
+    CHARACTER(rad_version_len), PARAMETER          ::  rad_version = 'RAD v. 3.0'         !< identification of version of binary svf and restart files
+    INTEGER(iwp)                                   ::  raytrace_discrete_elevs = 40       !< number of discretization steps for elevation (nadir to zenith)
+    INTEGER(iwp)                                   ::  raytrace_discrete_azims = 80       !< number of discretization steps for azimuth (out of 360 degrees)
+    REAL(wp)                                       ::  max_raytracing_dist = -999.0_wp    !< maximum distance for raytracing (in metres)
+    REAL(wp)                                       ::  min_irrf_value = 1e-6_wp           !< minimum potential irradiance factor value for raytracing
+    REAL(wp), DIMENSION(1:30)                      ::  svfnorm_report_thresh = 1e21_wp    !< thresholds of SVF normalization values to report
+    INTEGER(iwp)                                   ::  svfnorm_report_num                 !< number of SVF normalization thresholds to report
+
+!-- radiation related arrays to be used in radiation_interaction routine
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  rad_sw_in_dir    !< direct sw radiation
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  rad_sw_in_diff   !< diffusion sw radiation
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  rad_lw_in_diff   !< diffusion lw radiation
+
+!-- parameters required for RRTMG lower boundary condition
+    REAL(wp)                   :: albedo_urb      !< albedo value retuned to RRTMG boundary cond.
+    REAL(wp)                   :: emissivity_urb  !< emissivity value retuned to RRTMG boundary cond.
+    REAL(wp)                   :: t_rad_urb       !< temperature value retuned to RRTMG boundary cond.
+
+!-- type for calculation of svf
+    TYPE t_svf
+        INTEGER(iwp)                               :: isurflt           !< 
+        INTEGER(iwp)                               :: isurfs            !< 
+        REAL(wp)                                   :: rsvf              !< 
+        REAL(wp)                                   :: rtransp           !< 
+    END TYPE
+
+!-- type for calculation of csf
+    TYPE t_csf
+        INTEGER(iwp)                               :: ip                !< 
+        INTEGER(iwp)                               :: itx               !< 
+        INTEGER(iwp)                               :: ity               !< 
+        INTEGER(iwp)                               :: itz               !< 
+        INTEGER(iwp)                               :: isurfs            !< Idx of source face / -1 for sky
+        REAL(wp)                                   :: rcvf              !< Canopy view factor for faces /
+                                                                        !< canopy sink factor for sky (-1)
+    END TYPE
+
+!-- arrays storing the values of USM
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  svfsurf          !< svfsurf[:,isvf] = index of target and source surface for svf[isvf]
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  svf              !< array of shape view factors+direct irradiation factors for local surfaces
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfins          !< array of sw radiation falling to local surface after i-th reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinl          !< array of lw radiation for local surface after i-th reflection
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  skyvf            !< array of sky view factor for each local surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  skyvft           !< array of sky view factor including transparency for each local surface
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  dsitrans         !< dsidir[isvfl,i] = path transmittance of i-th
+                                                                        !< direction of direct solar irradiance per target surface
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  dsitransc        !< dtto per plant canopy box
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  dsidir           !< dsidir[:,i] = unit vector of i-th
+                                                                        !< direction of direct solar irradiance
+    INTEGER(iwp)                                   ::  ndsidir          !< number of apparent solar directions used
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  dsidir_rev       !< dsidir_rev[ielev,iazim] = i for dsidir or -1 if not present
+
+    INTEGER(iwp)                                   ::  nmrtbl           !< No. of local grid boxes for which MRT is calculated
+    INTEGER(iwp)                                   ::  nmrtf            !< number of MRT factors for local processor
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  mrtbl            !< coordinates of i-th local MRT box - surfl[:,i] = [z, y, x]
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  mrtfsurf         !< mrtfsurf[:,imrtf] = index of target MRT box and source surface for mrtf[imrtf]
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtf             !< array of MRT factors for each local MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtft            !< array of MRT factors including transparency for each local MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtsky           !< array of sky view factor for each local MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtskyt          !< array of sky view factor including transparency for each local MRT box
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  mrtdsit          !< array of direct solar transparencies for each local MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtinsw          !< mean SW radiant flux for each MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtinlw          !< mean LW radiant flux for each MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrt              !< mean radiant temperature for each MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtinsw_av       !< time average mean SW radiant flux for each MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrtinlw_av       !< time average mean LW radiant flux for each MRT box
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  mrt_av           !< time average mean radiant temperature for each MRT box
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinsw         !< array of sw radiation falling to local surface including radiation from reflections
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlw         !< array of lw radiation falling to local surface including radiation from reflections
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinswdir      !< array of direct sw radiation falling to local surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinswdif      !< array of diffuse sw radiation from sky and model boundary falling to local surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlwdif      !< array of diffuse lw radiation from sky and model boundary falling to local surface
+    
+                                                                        !< Outward radiation is only valid for nonvirtual surfaces
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutsl        !< array of reflected sw radiation for local surface in i-th reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutll        !< array of reflected + emitted lw radiation for local surface in i-th reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfouts         !< array of reflected sw radiation for all surfaces in i-th reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutl         !< array of reflected + emitted lw radiation for all surfaces in i-th reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlg         !< global array of incoming lw radiation from plant canopy
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutsw        !< array of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutlw        !< array of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfemitlwl      !< array of emitted lw radiation for local surface used to calculate effective surface temperature for radiation model
+
+!-- block variables needed for calculation of the plant canopy model inside the urban surface model
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  csfsurf          !< csfsurf[:,icsf] = index of target surface and csf grid index for csf[icsf]
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  csf              !< array of plant canopy sink fators + direct irradiation factors (transparency)
+    REAL(wp), DIMENSION(:,:,:), POINTER            ::  sub_lad          !< subset of lad_s within urban surface, transformed to plain Z coordinate
+    REAL(wp), DIMENSION(:), POINTER                ::  sub_lad_g        !< sub_lad globalized (used to avoid MPI RMA calls in raytracing)
+    REAL(wp)                                       ::  prototype_lad    !< prototype leaf area density for computing effective optical depth
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE        ::  nzterr, plantt   !< temporary global arrays for raytracing
+    INTEGER(iwp)                                   ::  plantt_max
+
+!-- arrays and variables for calculation of svf and csf
+    TYPE(t_svf), DIMENSION(:), POINTER             ::  asvf             !< pointer to growing svc array
+    TYPE(t_csf), DIMENSION(:), POINTER             ::  acsf             !< pointer to growing csf array
+    TYPE(t_svf), DIMENSION(:), POINTER             ::  amrtf            !< pointer to growing mrtf array
+    TYPE(t_svf), DIMENSION(:), ALLOCATABLE, TARGET ::  asvf1, asvf2     !< realizations of svf array
+    TYPE(t_csf), DIMENSION(:), ALLOCATABLE, TARGET ::  acsf1, acsf2     !< realizations of csf array
+    TYPE(t_svf), DIMENSION(:), ALLOCATABLE, TARGET ::  amrtf1, amrtf2   !< realizations of mftf array
+    INTEGER(iwp)                                   ::  nsvfla           !< dimmension of array allocated for storage of svf in local processor
+    INTEGER(iwp)                                   ::  ncsfla           !< dimmension of array allocated for storage of csf in local processor
+    INTEGER(iwp)                                   ::  nmrtfa           !< dimmension of array allocated for storage of mrt
+    INTEGER(iwp)                                   ::  msvf, mcsf, mmrtf!< mod for swapping the growing array
+    INTEGER(iwp), PARAMETER                        ::  gasize = 100000  !< initial size of growing arrays
+    REAL(wp), PARAMETER                            ::  grow_factor = 1.4_wp !< growth factor of growing arrays
+    INTEGER(iwp)                                   ::  nsvfl            !< number of svf for local processor
+    INTEGER(iwp)                                   ::  ncsfl            !< no. of csf in local processor
+                                                                        !< needed only during calc_svf but must be here because it is
+                                                                        !< shared between subroutines calc_svf and raytrace
+    INTEGER(iwp), DIMENSION(:,:,:,:), POINTER      ::  gridsurf         !< reverse index of local surfl[d,k,j,i] (for case rad_angular_discretization)
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE    ::  gridpcbl         !< reverse index of local pcbl[k,j,i]
+    INTEGER(iwp), PARAMETER                        ::  nsurf_type_u = 6 !< number of urban surf types (used in gridsurf)
+
+!-- temporary arrays for calculation of csf in raytracing
+    INTEGER(iwp)                                   ::  maxboxesg        !< max number of boxes ray can cross in the domain
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  boxes            !< coordinates of gridboxes being crossed by ray
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  crlens           !< array of crossing lengths of ray for particular grid boxes
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE        ::  lad_ip           !< array of numbers of process where lad is stored 
+#if defined( __parallel )
+    INTEGER(kind=MPI_ADDRESS_KIND), &
+                  DIMENSION(:), ALLOCATABLE        ::  lad_disp         !< array of displaycements of lad in local array of proc lad_ip
+    INTEGER(iwp)                                   ::  win_lad          !< MPI RMA window for leaf area density
+    INTEGER(iwp)                                   ::  win_gridsurf     !< MPI RMA window for reverse grid surface index
+#endif
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  lad_s_ray        !< array of received lad_s for appropriate gridboxes crossed by ray
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE        ::  target_surfl
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE      ::  rt2_track
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  rt2_track_lad
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  rt2_track_dist
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  rt2_dist
+
+
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- Energy balance variables
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- parameters of the land, roof and wall surfaces
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: albedo_surf        !< albedo of the surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: emiss_surf         !< emissivity of the wall surface
+
+
+    INTERFACE radiation_check_data_output
+       MODULE PROCEDURE radiation_check_data_output
+    END INTERFACE radiation_check_data_output
+
+    INTERFACE radiation_check_data_output_pr
+       MODULE PROCEDURE radiation_check_data_output_pr
+    END INTERFACE radiation_check_data_output_pr
+  
+    INTERFACE radiation_check_parameters
+       MODULE PROCEDURE radiation_check_parameters
+    END INTERFACE radiation_check_parameters
+  
+    INTERFACE radiation_clearsky
+       MODULE PROCEDURE radiation_clearsky
+    END INTERFACE radiation_clearsky
+ 
+    INTERFACE radiation_constant
+       MODULE PROCEDURE radiation_constant
+    END INTERFACE radiation_constant
+ 
+    INTERFACE radiation_control
+       MODULE PROCEDURE radiation_control
+    END INTERFACE radiation_control
+
+    INTERFACE radiation_3d_data_averaging
+       MODULE PROCEDURE radiation_3d_data_averaging
+    END INTERFACE radiation_3d_data_averaging
+
+    INTERFACE radiation_data_output_2d
+       MODULE PROCEDURE radiation_data_output_2d
+    END INTERFACE radiation_data_output_2d
+
+    INTERFACE radiation_data_output_3d
+       MODULE PROCEDURE radiation_data_output_3d
+    END INTERFACE radiation_data_output_3d
+
+    INTERFACE radiation_data_output_mask
+       MODULE PROCEDURE radiation_data_output_mask
+    END INTERFACE radiation_data_output_mask
+
+    INTERFACE radiation_define_netcdf_grid
+       MODULE PROCEDURE radiation_define_netcdf_grid
+    END INTERFACE radiation_define_netcdf_grid
+
+    INTERFACE radiation_header
+       MODULE PROCEDURE radiation_header
+    END INTERFACE radiation_header 
+  
+    INTERFACE radiation_init
+       MODULE PROCEDURE radiation_init
+    END INTERFACE radiation_init
+
+    INTERFACE radiation_parin
+       MODULE PROCEDURE radiation_parin
+    END INTERFACE radiation_parin
+    
+    INTERFACE radiation_rrtmg
+       MODULE PROCEDURE radiation_rrtmg
+    END INTERFACE radiation_rrtmg
+
+    INTERFACE radiation_tendency
+       MODULE PROCEDURE radiation_tendency
+       MODULE PROCEDURE radiation_tendency_ij
+    END INTERFACE radiation_tendency
+
+    INTERFACE radiation_rrd_local
+       MODULE PROCEDURE radiation_rrd_local
+    END INTERFACE radiation_rrd_local
+
+    INTERFACE radiation_wrd_local
+       MODULE PROCEDURE radiation_wrd_local
+    END INTERFACE radiation_wrd_local
+
+    INTERFACE radiation_interaction
+       MODULE PROCEDURE radiation_interaction
+    END INTERFACE radiation_interaction
+
+    INTERFACE radiation_interaction_init
+       MODULE PROCEDURE radiation_interaction_init
+    END INTERFACE radiation_interaction_init
+ 
+    INTERFACE radiation_presimulate_solar_pos
+       MODULE PROCEDURE radiation_presimulate_solar_pos
+    END INTERFACE radiation_presimulate_solar_pos
+
+    INTERFACE radiation_radflux_gridbox
+       MODULE PROCEDURE radiation_radflux_gridbox
+    END INTERFACE radiation_radflux_gridbox
+
+    INTERFACE radiation_calc_svf
+       MODULE PROCEDURE radiation_calc_svf
+    END INTERFACE radiation_calc_svf
+
+    INTERFACE radiation_write_svf
+       MODULE PROCEDURE radiation_write_svf
+    END INTERFACE radiation_write_svf
+
+    INTERFACE radiation_read_svf
+       MODULE PROCEDURE radiation_read_svf
+    END INTERFACE radiation_read_svf
+
+
+    SAVE
+
+    PRIVATE
+
+!
+!-- Public functions / NEEDS SORTING
+    PUBLIC radiation_check_data_output, radiation_check_data_output_pr,        &
+           radiation_check_parameters, radiation_control,                      &
+           radiation_header, radiation_init, radiation_parin,                  &
+           radiation_3d_data_averaging, radiation_tendency,                    &
+           radiation_data_output_2d, radiation_data_output_3d,                 &
+           radiation_define_netcdf_grid, radiation_wrd_local,                  &
+           radiation_rrd_local, radiation_data_output_mask,                    &
+           radiation_radflux_gridbox, radiation_calc_svf, radiation_write_svf, &
+           radiation_interaction, radiation_interaction_init,                  &
+           radiation_read_svf, radiation_presimulate_solar_pos
+            
+
+    
+!
+!-- Public variables and constants / NEEDS SORTING
+    PUBLIC albedo, albedo_type, decl_1, decl_2, decl_3, dots_rad, dt_radiation,&
+           emissivity, force_radiation_call, lat, lon, mrt_geom_human,         &
+           mrt_include_sw, mrt_nlevels, mrtbl, mrtinsw, mrtinlw, nmrtbl,       &
+           rad_net_av, radiation, radiation_scheme, rad_lw_in,                 &
+           rad_lw_in_av, rad_lw_out, rad_lw_out_av,                            &
+           rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr, rad_lw_hr_av, rad_sw_in,  &
+           rad_sw_in_av, rad_sw_out, rad_sw_out_av, rad_sw_cs_hr,              &
+           rad_sw_cs_hr_av, rad_sw_hr, rad_sw_hr_av, sigma_sb, solar_constant, &
+           skip_time_do_radiation, time_radiation, unscheduled_radiation_calls,&
+           zenith, calc_zenith, sun_direction, sun_dir_lat, sun_dir_lon,       &
+           nrefsteps, nsvfl, svf,                                              &
+           svfsurf, surfinsw, surfinlw, surfins, surfinl, surfinswdir,         &
+           surfinswdif, surfoutsw, surfoutlw, surfinlwdif, rad_sw_in_dir,      &
+           rad_sw_in_diff, rad_lw_in_diff, surfouts, surfoutl, surfoutsl,      &
+           surfoutll, idir, jdir, kdir, id, iz, iy, ix,                        &
+           surf, surfl, nsurfl, pcbinswdir, pcbinswdif, pcbinsw, pcbinlw,      &
+           iup_u, inorth_u, isouth_u, ieast_u, iwest_u,                        &
+           iup_l, inorth_l, isouth_l, ieast_l, iwest_l,                        &
+           nsurf_type, nzub, nzut, nzu, pch, nsurf,                            &
+           idsvf, ndsvf, idcsf, ndcsf, kdcsf, pct,                             &
+           radiation_interactions, startwall, startland, endland, endwall,     &
+           skyvf, skyvft, radiation_interactions_on, average_radiation, npcbl, &
+           pcbl
+
+#if defined ( __rrtmg )
+    PUBLIC rrtm_aldif, rrtm_aldir, rrtm_asdif, rrtm_asdir
+#endif
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine controls the calls of the radiation schemes
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_control
+ 
+ 
+       IMPLICIT NONE
+
+
+       SELECT CASE ( TRIM( radiation_scheme ) )
+
+          CASE ( 'constant' )
+             CALL radiation_constant
+          
+          CASE ( 'clear-sky' ) 
+             CALL radiation_clearsky
+       
+          CASE ( 'rrtmg' )
+             CALL radiation_rrtmg
+
+          CASE DEFAULT
+
+       END SELECT
+
+
+    END SUBROUTINE radiation_control
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for radiation model
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_check_data_output( var, unit, i, ilen, k )
+ 
+ 
+       USE control_parameters,                                                 &
+           ONLY: data_output, message_string
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  unit     !< 
+       CHARACTER (LEN=*) ::  var      !<
+
+       INTEGER(iwp) :: i
+       INTEGER(iwp) :: ilen
+       INTEGER(iwp) :: k
+
+       SELECT CASE ( TRIM( var ) )
+
+          CASE ( 'rad_lw_cs_hr', 'rad_lw_hr', 'rad_lw_in', 'rad_lw_out', &
+                 'rad_sw_cs_hr', 'rad_sw_hr', 'rad_sw_in', 'rad_sw_out'  )
+             IF (  .NOT.  radiation  .OR.  radiation_scheme /= 'rrtmg' )  THEN
+                message_string = '"output of "' // TRIM( var ) // '" requi' // &
+                                 'res radiation = .TRUE. and ' //              &
+                                 'radiation_scheme = "rrtmg"'
+                CALL message( 'check_parameters', 'PA0406', 1, 2, 0, 6, 0 )
+             ENDIF
+             unit = 'K/h'     
+
+          CASE ( 'rad_net*', 'rrtm_aldif*', 'rrtm_aldir*', 'rrtm_asdif*',      &
+                 'rrtm_asdir*', 'rad_lw_in*', 'rad_lw_out*', 'rad_sw_in*',     &
+                 'rad_sw_out*')
+             IF ( i == 0 .AND. ilen == 0 .AND. k == 0)  THEN
+                ! Workaround for masked output (calls with i=ilen=k=0)
+                unit = 'illegal'
+                RETURN
+             ENDIF
+             IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
+                message_string = 'illegal value for data_output: "' //         &
+                                 TRIM( var ) // '" & only 2d-horizontal ' //   &
+                                 'cross sections are allowed for this value'
+                CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF (  .NOT.  radiation  .OR.  radiation_scheme /= "rrtmg" )  THEN
+                IF ( TRIM( var ) == 'rrtm_aldif*'  .OR.                        &
+                     TRIM( var ) == 'rrtm_aldir*'  .OR.                        &
+                     TRIM( var ) == 'rrtm_asdif*'  .OR.                        &
+                     TRIM( var ) == 'rrtm_asdir*'      )                       &
+                THEN
+                   message_string = 'output of "' // TRIM( var ) // '" require'&
+                                    // 's radiation = .TRUE. and radiation_sch'&
+                                    // 'eme = "rrtmg"'
+                   CALL message( 'check_parameters', 'PA0409', 1, 2, 0, 6, 0 )
+                ENDIF
+             ENDIF
+
+             IF ( TRIM( var ) == 'rad_net*'      ) unit = 'W/m2'   
+             IF ( TRIM( var ) == 'rad_lw_in*'    ) unit = 'W/m2'
+             IF ( TRIM( var ) == 'rad_lw_out*'   ) unit = 'W/m2'
+             IF ( TRIM( var ) == 'rad_sw_in*'    ) unit = 'W/m2'
+             IF ( TRIM( var ) == 'rad_sw_out*'   ) unit = 'W/m2'
+             IF ( TRIM( var ) == 'rad_sw_in'     ) unit = 'W/m2'
+             IF ( TRIM( var ) == 'rrtm_aldif*'   ) unit = ''   
+             IF ( TRIM( var ) == 'rrtm_aldir*'   ) unit = '' 
+             IF ( TRIM( var ) == 'rrtm_asdif*'   ) unit = '' 
+             IF ( TRIM( var ) == 'rrtm_asdir*'   ) unit = '' 
+
+          CASE ( 'rad_mrt', 'rad_mrt_sw', 'rad_mrt_lw'  )
+
+             IF ( i == 0 .AND. ilen == 0 .AND. k == 0)  THEN
+                ! Workaround for masked output (calls with i=ilen=k=0)
+                unit = 'illegal'
+                RETURN
+             ENDIF
+
+             IF ( .NOT.  radiation ) THEN
+                message_string = 'output of "' // TRIM( var ) // '" require'&
+                                 // 's radiation = .TRUE.'
+                CALL message( 'check_parameters', 'PA0509', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( mrt_nlevels == 0 ) THEN
+                message_string = 'output of "' // TRIM( var ) // '" require'&
+                                 // 's mrt_nlevels > 0'
+                CALL message( 'check_parameters', 'PA0510', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'rad_mrt_sw'  .AND.  .NOT. mrt_include_sw ) THEN
+                message_string = 'output of "' // TRIM( var ) // '" require'&
+                                 // 's rad_mrt_sw = .TRUE.'
+                CALL message( 'check_parameters', 'PA0511', 1, 2, 0, 6, 0 )
+             ENDIF
+             IF ( TRIM( var ) == 'rad_mrt' ) THEN
+                unit = 'K'
+             ELSE
+                unit = 'W m-2'
+             ENDIF
+
+          CASE DEFAULT
+             unit = 'illegal'
+
+       END SELECT
+
+
+    END SUBROUTINE radiation_check_data_output
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output of profiles for radiation model
+!------------------------------------------------------------------------------!  
+    SUBROUTINE radiation_check_data_output_pr( variable, var_count, unit,      &
+               dopr_unit )
+ 
+       USE arrays_3d,                                                          &
+           ONLY: zu
+
+       USE control_parameters,                                                 &
+           ONLY: data_output_pr, message_string
+
+       USE indices
+
+       USE profil_parameter
+
+       USE statistics
+
+       IMPLICIT NONE
+   
+       CHARACTER (LEN=*) ::  unit      !< 
+       CHARACTER (LEN=*) ::  variable  !< 
+       CHARACTER (LEN=*) ::  dopr_unit !< local value of dopr_unit
+ 
+       INTEGER(iwp) ::  var_count     !< 
+
+       SELECT CASE ( TRIM( variable ) )
+       
+         CASE ( 'rad_net' )
+             IF ( (  .NOT.  radiation )  .OR.  radiation_scheme == 'constant' )&
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme = "constant"'
+                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 99
+                dopr_unit  = 'W/m2'
+                hom(:,2,99,:)  = SPREAD( zw, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+          CASE ( 'rad_lw_in' )
+             IF ( (  .NOT.  radiation)  .OR.  radiation_scheme == 'constant' ) &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme = "constant"'
+                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 100
+                dopr_unit  = 'W/m2'
+                hom(:,2,100,:)  = SPREAD( zw, 2, statistic_regions+1 )
+                unit = dopr_unit 
+             ENDIF
+
+          CASE ( 'rad_lw_out' )
+             IF ( (  .NOT. radiation )  .OR.  radiation_scheme == 'constant' ) &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme = "constant"'
+                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 101
+                dopr_unit  = 'W/m2'
+                hom(:,2,101,:)  = SPREAD( zw, 2, statistic_regions+1 )
+                unit = dopr_unit   
+             ENDIF
+
+          CASE ( 'rad_sw_in' )
+             IF ( (  .NOT. radiation )  .OR.  radiation_scheme == 'constant' ) &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme = "constant"'
+                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 102
+                dopr_unit  = 'W/m2'
+                hom(:,2,102,:)  = SPREAD( zw, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+          CASE ( 'rad_sw_out')
+             IF ( (  .NOT.  radiation )  .OR.  radiation_scheme == 'constant' )&
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme = "constant"'
+                CALL message( 'check_parameters', 'PA0408', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 103
+                dopr_unit  = 'W/m2'
+                hom(:,2,103,:)  = SPREAD( zw, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+          CASE ( 'rad_lw_cs_hr' )
+             IF ( (  .NOT.  radiation )  .OR.  radiation_scheme /= 'rrtmg' )   &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 104
+                dopr_unit  = 'K/h'
+                hom(:,2,104,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+          CASE ( 'rad_lw_hr' )
+             IF ( (  .NOT.  radiation )  .OR.  radiation_scheme /= 'rrtmg' )   &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 105
+                dopr_unit  = 'K/h'
+                hom(:,2,105,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+          CASE ( 'rad_sw_cs_hr' )
+             IF ( (  .NOT.  radiation )  .OR.  radiation_scheme /= 'rrtmg' )   &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 106
+                dopr_unit  = 'K/h'
+                hom(:,2,106,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+          CASE ( 'rad_sw_hr' )
+             IF ( (  .NOT.  radiation )  .OR.  radiation_scheme /= 'rrtmg' )   &
+             THEN
+                message_string = 'data_output_pr = ' //                        &
+                                 TRIM( data_output_pr(var_count) ) // ' is' // &
+                                 'not available for radiation = .FALSE. or ' //&
+                                 'radiation_scheme /= "rrtmg"'
+                CALL message( 'check_parameters', 'PA0413', 1, 2, 0, 6, 0 )
+             ELSE
+                dopr_index(var_count) = 107
+                dopr_unit  = 'K/h'
+                hom(:,2,107,:)  = SPREAD( zu, 2, statistic_regions+1 )
+                unit = dopr_unit
+             ENDIF
+
+
+          CASE DEFAULT
+             unit = 'illegal'
+
+       END SELECT
+
+
+    END SUBROUTINE radiation_check_data_output_pr
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for radiation model
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_check_parameters
+
+       USE control_parameters,                                                 &
+           ONLY: land_surface, message_string, urban_surface
+
+       USE netcdf_data_input_mod,                                              &
+           ONLY:  input_pids_static                 
+    
+       IMPLICIT NONE
+       
+!
+!--    In case no urban-surface or land-surface model is applied, usage of 
+!--    a radiation model make no sense.         
+       IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
+          message_string = 'Usage of radiation module is only allowed if ' //  &
+                           'land-surface and/or urban-surface model is applied.'
+          CALL message( 'check_parameters', 'PA0486', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( radiation_scheme /= 'constant'   .AND.                             &
+            radiation_scheme /= 'clear-sky'  .AND.                             &
+            radiation_scheme /= 'rrtmg' )  THEN
+          message_string = 'unknown radiation_scheme = '//                     &
+                           TRIM( radiation_scheme )
+          CALL message( 'check_parameters', 'PA0405', 1, 2, 0, 6, 0 )
+       ELSEIF ( radiation_scheme == 'rrtmg' )  THEN
+#if ! defined ( __rrtmg )
+          message_string = 'radiation_scheme = "rrtmg" requires ' //           & 
+                           'compilation of PALM with pre-processor ' //        &
+                           'directive -D__rrtmg'
+          CALL message( 'check_parameters', 'PA0407', 1, 2, 0, 6, 0 )
+#endif
+#if defined ( __rrtmg ) && ! defined( __netcdf )
+          message_string = 'radiation_scheme = "rrtmg" requires ' //           & 
+                           'the use of NetCDF (preprocessor directive ' //     &
+                           '-D__netcdf'
+          CALL message( 'check_parameters', 'PA0412', 1, 2, 0, 6, 0 )
+#endif
+
+       ENDIF
+!
+!--    Checks performed only if data is given via namelist only. 
+       IF ( .NOT. input_pids_static )  THEN
+          IF ( albedo_type == 0  .AND.  albedo == 9999999.9_wp  .AND.          &
+               radiation_scheme == 'clear-sky')  THEN
+             message_string = 'radiation_scheme = "clear-sky" in combination'//& 
+                              'with albedo_type = 0 requires setting of'//     &
+                              'albedo /= 9999999.9'
+             CALL message( 'check_parameters', 'PA0410', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( albedo_type == 0  .AND.  radiation_scheme == 'rrtmg'  .AND.     &
+             ( albedo_lw_dif == 9999999.9_wp .OR. albedo_lw_dir == 9999999.9_wp&
+          .OR. albedo_sw_dif == 9999999.9_wp .OR. albedo_sw_dir == 9999999.9_wp& 
+             ) ) THEN
+             message_string = 'radiation_scheme = "rrtmg" in combination' //   & 
+                              'with albedo_type = 0 requires setting of ' //   &
+                              'albedo_lw_dif /= 9999999.9' //                  &
+                              'albedo_lw_dir /= 9999999.9' //                  &
+                              'albedo_sw_dif /= 9999999.9 and' //              &
+                              'albedo_sw_dir /= 9999999.9'
+             CALL message( 'check_parameters', 'PA0411', 1, 2, 0, 6, 0 )
+          ENDIF
+       ENDIF
+!
+!--    Parallel rad_angular_discretization without raytrace_mpi_rma is not implemented
+#if defined( __parallel )      
+       IF ( rad_angular_discretization  .AND.  .NOT. raytrace_mpi_rma )  THEN
+          message_string = 'rad_angular_discretization can only be used ' //  &
+                           'together with raytrace_mpi_rma or when ' //  &
+                           'no parallelization is applied.'
+          CALL message( 'check_parameters', 'PA0486', 1, 2, 0, 6, 0 )
+       ENDIF
+#endif
+
+       IF ( cloud_droplets  .AND.   radiation_scheme == 'rrtmg'  .AND.         &
+            average_radiation ) THEN
+          message_string = 'average_radiation = .T. with radiation_scheme'//   & 
+                           '= "rrtmg" in combination cloud_droplets = .T.'//   &
+                           'is not implementd'
+          CALL message( 'check_parameters', 'PA0560', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    Incialize svf normalization reporting histogram
+       svfnorm_report_num = 1
+       DO WHILE ( svfnorm_report_thresh(svfnorm_report_num) < 1e20_wp          &
+                   .AND. svfnorm_report_num <= 30 )
+          svfnorm_report_num = svfnorm_report_num + 1
+       ENDDO
+       svfnorm_report_num = svfnorm_report_num - 1
+
+
+ 
+    END SUBROUTINE radiation_check_parameters 
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the radiation model
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_init
+    
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i         !< running index x-direction 
+       INTEGER(iwp) ::  ioff      !< offset in x between surface element reference grid point in atmosphere and actual surface 
+       INTEGER(iwp) ::  j         !< running index y-direction 
+       INTEGER(iwp) ::  joff      !< offset in y between surface element reference grid point in atmosphere and actual surface 
+       INTEGER(iwp) ::  l         !< running index for orientation of vertical surfaces 
+       INTEGER(iwp) ::  m         !< running index for surface elements
+#if defined( __rrtmg )
+       INTEGER(iwp) ::  ind_type  !< running index for subgrid-surface tiles
+#endif
+
+!
+!--    Allocate array for storing the surface net radiation
+       IF ( .NOT. ALLOCATED ( surf_lsm_h%rad_net )  .AND.                      &
+                  surf_lsm_h%ns > 0  )   THEN
+          ALLOCATE( surf_lsm_h%rad_net(1:surf_lsm_h%ns) )
+          surf_lsm_h%rad_net = 0.0_wp 
+       ENDIF
+       IF ( .NOT. ALLOCATED ( surf_usm_h%rad_net )  .AND.                      &
+                  surf_usm_h%ns > 0  )  THEN
+          ALLOCATE( surf_usm_h%rad_net(1:surf_usm_h%ns) )
+          surf_usm_h%rad_net = 0.0_wp 
+       ENDIF
+       DO  l = 0, 3
+          IF ( .NOT. ALLOCATED ( surf_lsm_v(l)%rad_net )  .AND.                &
+                     surf_lsm_v(l)%ns > 0  )  THEN
+             ALLOCATE( surf_lsm_v(l)%rad_net(1:surf_lsm_v(l)%ns) )
+             surf_lsm_v(l)%rad_net = 0.0_wp 
+          ENDIF
+          IF ( .NOT. ALLOCATED ( surf_usm_v(l)%rad_net )  .AND.                &
+                     surf_usm_v(l)%ns > 0  )  THEN
+             ALLOCATE( surf_usm_v(l)%rad_net(1:surf_usm_v(l)%ns) )
+             surf_usm_v(l)%rad_net = 0.0_wp 
+          ENDIF
+       ENDDO
+
+
+!
+!--    Allocate array for storing the surface longwave (out) radiation change
+       IF ( .NOT. ALLOCATED ( surf_lsm_h%rad_lw_out_change_0 )  .AND.          &
+                  surf_lsm_h%ns > 0  )   THEN
+          ALLOCATE( surf_lsm_h%rad_lw_out_change_0(1:surf_lsm_h%ns) )
+          surf_lsm_h%rad_lw_out_change_0 = 0.0_wp 
+       ENDIF
+       IF ( .NOT. ALLOCATED ( surf_usm_h%rad_lw_out_change_0 )  .AND.          &
+                  surf_usm_h%ns > 0  )  THEN
+          ALLOCATE( surf_usm_h%rad_lw_out_change_0(1:surf_usm_h%ns) )
+          surf_usm_h%rad_lw_out_change_0 = 0.0_wp 
+       ENDIF
+       DO  l = 0, 3
+          IF ( .NOT. ALLOCATED ( surf_lsm_v(l)%rad_lw_out_change_0 )  .AND.    &
+                     surf_lsm_v(l)%ns > 0  )  THEN
+             ALLOCATE( surf_lsm_v(l)%rad_lw_out_change_0(1:surf_lsm_v(l)%ns) )
+             surf_lsm_v(l)%rad_lw_out_change_0 = 0.0_wp 
+          ENDIF
+          IF ( .NOT. ALLOCATED ( surf_usm_v(l)%rad_lw_out_change_0 )  .AND.    &
+                     surf_usm_v(l)%ns > 0  )  THEN
+             ALLOCATE( surf_usm_v(l)%rad_lw_out_change_0(1:surf_usm_v(l)%ns) )
+             surf_usm_v(l)%rad_lw_out_change_0 = 0.0_wp 
+          ENDIF
+       ENDDO
+
+!
+!--    Allocate surface arrays for incoming/outgoing short/longwave radiation
+       IF ( .NOT. ALLOCATED ( surf_lsm_h%rad_sw_in )  .AND.                    &
+                  surf_lsm_h%ns > 0  )   THEN
+          ALLOCATE( surf_lsm_h%rad_sw_in(1:surf_lsm_h%ns)  )
+          ALLOCATE( surf_lsm_h%rad_sw_out(1:surf_lsm_h%ns) )
+          ALLOCATE( surf_lsm_h%rad_lw_in(1:surf_lsm_h%ns)  )
+          ALLOCATE( surf_lsm_h%rad_lw_out(1:surf_lsm_h%ns) )
+          surf_lsm_h%rad_sw_in  = 0.0_wp 
+          surf_lsm_h%rad_sw_out = 0.0_wp 
+          surf_lsm_h%rad_lw_in  = 0.0_wp 
+          surf_lsm_h%rad_lw_out = 0.0_wp 
+       ENDIF
+       IF ( .NOT. ALLOCATED ( surf_usm_h%rad_sw_in )  .AND.                    &
+                  surf_usm_h%ns > 0  )  THEN
+          ALLOCATE( surf_usm_h%rad_sw_in(1:surf_usm_h%ns)  )
+          ALLOCATE( surf_usm_h%rad_sw_out(1:surf_usm_h%ns) )
+          ALLOCATE( surf_usm_h%rad_lw_in(1:surf_usm_h%ns)  )
+          ALLOCATE( surf_usm_h%rad_lw_out(1:surf_usm_h%ns) )
+          surf_usm_h%rad_sw_in  = 0.0_wp 
+          surf_usm_h%rad_sw_out = 0.0_wp 
+          surf_usm_h%rad_lw_in  = 0.0_wp 
+          surf_usm_h%rad_lw_out = 0.0_wp 
+       ENDIF
+       DO  l = 0, 3
+          IF ( .NOT. ALLOCATED ( surf_lsm_v(l)%rad_sw_in )  .AND.              &
+                     surf_lsm_v(l)%ns > 0  )  THEN
+             ALLOCATE( surf_lsm_v(l)%rad_sw_in(1:surf_lsm_v(l)%ns)  )
+             ALLOCATE( surf_lsm_v(l)%rad_sw_out(1:surf_lsm_v(l)%ns) )
+             ALLOCATE( surf_lsm_v(l)%rad_lw_in(1:surf_lsm_v(l)%ns)  )
+             ALLOCATE( surf_lsm_v(l)%rad_lw_out(1:surf_lsm_v(l)%ns) )
+             surf_lsm_v(l)%rad_sw_in  = 0.0_wp 
+             surf_lsm_v(l)%rad_sw_out = 0.0_wp 
+             surf_lsm_v(l)%rad_lw_in  = 0.0_wp 
+             surf_lsm_v(l)%rad_lw_out = 0.0_wp 
+          ENDIF
+          IF ( .NOT. ALLOCATED ( surf_usm_v(l)%rad_sw_in )  .AND.              &
+                     surf_usm_v(l)%ns > 0  )  THEN
+             ALLOCATE( surf_usm_v(l)%rad_sw_in(1:surf_usm_v(l)%ns)  )
+             ALLOCATE( surf_usm_v(l)%rad_sw_out(1:surf_usm_v(l)%ns) )
+             ALLOCATE( surf_usm_v(l)%rad_lw_in(1:surf_usm_v(l)%ns)  )
+             ALLOCATE( surf_usm_v(l)%rad_lw_out(1:surf_usm_v(l)%ns) )
+             surf_usm_v(l)%rad_sw_in  = 0.0_wp 
+             surf_usm_v(l)%rad_sw_out = 0.0_wp 
+             surf_usm_v(l)%rad_lw_in  = 0.0_wp 
+             surf_usm_v(l)%rad_lw_out = 0.0_wp 
+          ENDIF
+       ENDDO
+!
+!--    Fix net radiation in case of radiation_scheme = 'constant'
+       IF ( radiation_scheme == 'constant' )  THEN
+          IF ( ALLOCATED( surf_lsm_h%rad_net ) )                               &
+             surf_lsm_h%rad_net    = net_radiation
+          IF ( ALLOCATED( surf_usm_h%rad_net ) )                               &
+             surf_usm_h%rad_net    = net_radiation
+!
+!--       Todo: weight with inclination angle
+          DO  l = 0, 3
+             IF ( ALLOCATED( surf_lsm_v(l)%rad_net ) )                         &
+                surf_lsm_v(l)%rad_net = net_radiation
+             IF ( ALLOCATED( surf_usm_v(l)%rad_net ) )                         &
+                surf_usm_v(l)%rad_net = net_radiation
+          ENDDO
+!          radiation = .FALSE.
+!
+!--    Calculate orbital constants
+       ELSE
+          decl_1 = SIN(23.45_wp * pi / 180.0_wp)
+          decl_2 = 2.0_wp * pi / 365.0_wp
+          decl_3 = decl_2 * 81.0_wp
+          lat    = latitude * pi / 180.0_wp
+          lon    = longitude * pi / 180.0_wp
+       ENDIF
+
+       IF ( radiation_scheme == 'clear-sky'  .OR.                              &
+            radiation_scheme == 'constant')  THEN
+
+
+!
+!--       Allocate arrays for incoming/outgoing short/longwave radiation
+          IF ( .NOT. ALLOCATED ( rad_sw_in ) )  THEN
+             ALLOCATE ( rad_sw_in(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( .NOT. ALLOCATED ( rad_sw_out ) )  THEN
+             ALLOCATE ( rad_sw_out(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_in ) )  THEN
+             ALLOCATE ( rad_lw_in(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( .NOT. ALLOCATED ( rad_lw_out ) )  THEN
+             ALLOCATE ( rad_lw_out(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+!
+!--       Allocate average arrays for incoming/outgoing short/longwave radiation
+          IF ( .NOT. ALLOCATED ( rad_sw_in_av ) )  THEN
+             ALLOCATE ( rad_sw_in_av(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( .NOT. ALLOCATED ( rad_sw_out_av ) )  THEN
+             ALLOCATE ( rad_sw_out_av(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_in_av ) )  THEN
+             ALLOCATE ( rad_lw_in_av(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( .NOT. ALLOCATED ( rad_lw_out_av ) )  THEN
+             ALLOCATE ( rad_lw_out_av(0:0,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+!
+!--       Allocate arrays for broadband albedo, and level 1 initialization
+!--       via namelist paramter, unless not already allocated.
+          IF ( .NOT. ALLOCATED(surf_lsm_h%albedo) )  THEN
+             ALLOCATE( surf_lsm_h%albedo(0:2,1:surf_lsm_h%ns)     )
+             surf_lsm_h%albedo    = albedo
+          ENDIF
+          IF ( .NOT. ALLOCATED(surf_usm_h%albedo) )  THEN
+             ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns)     )
+             surf_usm_h%albedo    = albedo
+          ENDIF
+
+          DO  l = 0, 3
+             IF ( .NOT. ALLOCATED( surf_lsm_v(l)%albedo ) )  THEN
+                ALLOCATE( surf_lsm_v(l)%albedo(0:2,1:surf_lsm_v(l)%ns) )
+                surf_lsm_v(l)%albedo = albedo
+             ENDIF
+             IF ( .NOT. ALLOCATED( surf_usm_v(l)%albedo ) )  THEN
+                ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) )
+                surf_usm_v(l)%albedo = albedo
+             ENDIF
+          ENDDO
+!
+!--       Level 2 initialization of broadband albedo via given albedo_type. 
+!--       Only if albedo_type is non-zero. In case of urban surface and 
+!--       input data is read from ASCII file, albedo_type will be zero, so that
+!--       albedo won't be overwritten. 
+          DO  m = 1, surf_lsm_h%ns
+             IF ( surf_lsm_h%albedo_type(ind_veg_wall,m) /= 0 )                &
+                surf_lsm_h%albedo(ind_veg_wall,m) =                            &
+                           albedo_pars(2,surf_lsm_h%albedo_type(ind_veg_wall,m))
+             IF ( surf_lsm_h%albedo_type(ind_pav_green,m) /= 0 )               &
+                surf_lsm_h%albedo(ind_pav_green,m) =                           &
+                           albedo_pars(2,surf_lsm_h%albedo_type(ind_pav_green,m))
+             IF ( surf_lsm_h%albedo_type(ind_wat_win,m) /= 0 )                 &
+                surf_lsm_h%albedo(ind_wat_win,m) =                             &
+                           albedo_pars(2,surf_lsm_h%albedo_type(ind_wat_win,m))
+          ENDDO
+          DO  m = 1, surf_usm_h%ns
+             IF ( surf_usm_h%albedo_type(ind_veg_wall,m) /= 0 )                &
+                surf_usm_h%albedo(ind_veg_wall,m) =                            &
+                           albedo_pars(2,surf_usm_h%albedo_type(ind_veg_wall,m))
+             IF ( surf_usm_h%albedo_type(ind_pav_green,m) /= 0 )               &
+                surf_usm_h%albedo(ind_pav_green,m) =                           &
+                           albedo_pars(2,surf_usm_h%albedo_type(ind_pav_green,m))
+             IF ( surf_usm_h%albedo_type(ind_wat_win,m) /= 0 )                 &
+                surf_usm_h%albedo(ind_wat_win,m) =                             &
+                           albedo_pars(2,surf_usm_h%albedo_type(ind_wat_win,m))
+          ENDDO
+
+          DO  l = 0, 3
+             DO  m = 1, surf_lsm_v(l)%ns
+                IF ( surf_lsm_v(l)%albedo_type(ind_veg_wall,m) /= 0 )          &
+                   surf_lsm_v(l)%albedo(ind_veg_wall,m) =                      &
+                        albedo_pars(2,surf_lsm_v(l)%albedo_type(ind_veg_wall,m))
+                IF ( surf_lsm_v(l)%albedo_type(ind_pav_green,m) /= 0 )         &
+                   surf_lsm_v(l)%albedo(ind_pav_green,m) =                     &
+                        albedo_pars(2,surf_lsm_v(l)%albedo_type(ind_pav_green,m))
+                IF ( surf_lsm_v(l)%albedo_type(ind_wat_win,m) /= 0 )           &
+                   surf_lsm_v(l)%albedo(ind_wat_win,m) =                       &
+                        albedo_pars(2,surf_lsm_v(l)%albedo_type(ind_wat_win,m))
+             ENDDO
+             DO  m = 1, surf_usm_v(l)%ns
+                IF ( surf_usm_v(l)%albedo_type(ind_veg_wall,m) /= 0 )          &
+                   surf_usm_v(l)%albedo(ind_veg_wall,m) =                      &
+                        albedo_pars(2,surf_usm_v(l)%albedo_type(ind_veg_wall,m))
+                IF ( surf_usm_v(l)%albedo_type(ind_pav_green,m) /= 0 )         &
+                   surf_usm_v(l)%albedo(ind_pav_green,m) =                     &
+                        albedo_pars(2,surf_usm_v(l)%albedo_type(ind_pav_green,m))
+                IF ( surf_usm_v(l)%albedo_type(ind_wat_win,m) /= 0 )           &
+                   surf_usm_v(l)%albedo(ind_wat_win,m) =                       &
+                        albedo_pars(2,surf_usm_v(l)%albedo_type(ind_wat_win,m))
+             ENDDO
+          ENDDO
+
+!
+!--       Level 3 initialization at grid points where albedo type is zero.
+!--       This case, albedo is taken from file. In case of constant radiation
+!--       or clear sky, only broadband albedo is given.
+          IF ( albedo_pars_f%from_file )  THEN
+!
+!--          Horizontal surfaces
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+                IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
+                   IF ( surf_lsm_h%albedo_type(ind_veg_wall,m) == 0 )          &
+                      surf_lsm_h%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
+                   IF ( surf_lsm_h%albedo_type(ind_pav_green,m) == 0 )         &
+                      surf_lsm_h%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                   IF ( surf_lsm_h%albedo_type(ind_wat_win,m) == 0 )           &
+                      surf_lsm_h%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                ENDIF
+             ENDDO
+             DO  m = 1, surf_usm_h%ns
+                i = surf_usm_h%i(m)
+                j = surf_usm_h%j(m)
+                IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
+                   IF ( surf_usm_h%albedo_type(ind_veg_wall,m) == 0 )          &
+                      surf_usm_h%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
+                   IF ( surf_usm_h%albedo_type(ind_pav_green,m) == 0 )         &
+                      surf_usm_h%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                   IF ( surf_usm_h%albedo_type(ind_wat_win,m) == 0 )           &
+                      surf_usm_h%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                ENDIF
+             ENDDO 
+!
+!--          Vertical surfaces            
+             DO  l = 0, 3
+
+                ioff = surf_lsm_v(l)%ioff
+                joff = surf_lsm_v(l)%joff
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i = surf_lsm_v(l)%i(m) + ioff
+                   j = surf_lsm_v(l)%j(m) + joff
+                   IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
+                      IF ( surf_lsm_v(l)%albedo_type(ind_veg_wall,m) == 0 )    &
+                         surf_lsm_v(l)%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
+                      IF ( surf_lsm_v(l)%albedo_type(ind_pav_green,m) == 0 )   &
+                         surf_lsm_v(l)%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                      IF ( surf_lsm_v(l)%albedo_type(ind_wat_win,m) == 0 )     &
+                         surf_lsm_v(l)%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                   ENDIF
+                ENDDO
+
+                ioff = surf_usm_v(l)%ioff
+                joff = surf_usm_v(l)%joff
+                DO  m = 1, surf_usm_h%ns
+                   i = surf_usm_h%i(m) + joff
+                   j = surf_usm_h%j(m) + joff
+                   IF ( albedo_pars_f%pars_xy(0,j,i) /= albedo_pars_f%fill )  THEN
+                      IF ( surf_usm_v(l)%albedo_type(ind_veg_wall,m) == 0 )    &
+                         surf_usm_v(l)%albedo(ind_veg_wall,m) = albedo_pars_f%pars_xy(0,j,i)
+                      IF ( surf_usm_v(l)%albedo_type(ind_pav_green,m) == 0 )   &
+                         surf_usm_v(l)%albedo(ind_pav_green,m) = albedo_pars_f%pars_xy(0,j,i)
+                      IF ( surf_usm_v(l)%albedo_type(ind_wat_win,m) == 0 )     &
+                         surf_lsm_v(l)%albedo(ind_wat_win,m) = albedo_pars_f%pars_xy(0,j,i)
+                   ENDIF
+                ENDDO
+             ENDDO
+
+          ENDIF  
+!
+!--    Initialization actions for RRTMG
+       ELSEIF ( radiation_scheme == 'rrtmg' )  THEN
+#if defined ( __rrtmg )
+!
+!--       Allocate albedos for short/longwave radiation, horizontal surfaces
+!--       for wall/green/window (USM) or vegetation/pavement/water surfaces
+!--       (LSM). 
+          ALLOCATE ( surf_lsm_h%aldif(0:2,1:surf_lsm_h%ns)       )
+          ALLOCATE ( surf_lsm_h%aldir(0:2,1:surf_lsm_h%ns)       )
+          ALLOCATE ( surf_lsm_h%asdif(0:2,1:surf_lsm_h%ns)       )
+          ALLOCATE ( surf_lsm_h%asdir(0:2,1:surf_lsm_h%ns)       )
+          ALLOCATE ( surf_lsm_h%rrtm_aldif(0:2,1:surf_lsm_h%ns)  )
+          ALLOCATE ( surf_lsm_h%rrtm_aldir(0:2,1:surf_lsm_h%ns)  )
+          ALLOCATE ( surf_lsm_h%rrtm_asdif(0:2,1:surf_lsm_h%ns)  )
+          ALLOCATE ( surf_lsm_h%rrtm_asdir(0:2,1:surf_lsm_h%ns)  )
+
+          ALLOCATE ( surf_usm_h%aldif(0:2,1:surf_usm_h%ns)       )
+          ALLOCATE ( surf_usm_h%aldir(0:2,1:surf_usm_h%ns)       )
+          ALLOCATE ( surf_usm_h%asdif(0:2,1:surf_usm_h%ns)       )
+          ALLOCATE ( surf_usm_h%asdir(0:2,1:surf_usm_h%ns)       )
+          ALLOCATE ( surf_usm_h%rrtm_aldif(0:2,1:surf_usm_h%ns)  )
+          ALLOCATE ( surf_usm_h%rrtm_aldir(0:2,1:surf_usm_h%ns)  )
+          ALLOCATE ( surf_usm_h%rrtm_asdif(0:2,1:surf_usm_h%ns)  )
+          ALLOCATE ( surf_usm_h%rrtm_asdir(0:2,1:surf_usm_h%ns)  )
+
+!
+!--       Allocate broadband albedo (temporary for the current radiation 
+!--       implementations)
+          IF ( .NOT. ALLOCATED(surf_lsm_h%albedo) )                            &
+             ALLOCATE( surf_lsm_h%albedo(0:2,1:surf_lsm_h%ns)     )
+          IF ( .NOT. ALLOCATED(surf_usm_h%albedo) )                            &
+             ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns)     )
+
+!
+!--       Allocate albedos for short/longwave radiation, vertical surfaces 
+          DO  l = 0, 3
+
+             ALLOCATE ( surf_lsm_v(l)%aldif(0:2,1:surf_lsm_v(l)%ns)      )
+             ALLOCATE ( surf_lsm_v(l)%aldir(0:2,1:surf_lsm_v(l)%ns)      )
+             ALLOCATE ( surf_lsm_v(l)%asdif(0:2,1:surf_lsm_v(l)%ns)      )
+             ALLOCATE ( surf_lsm_v(l)%asdir(0:2,1:surf_lsm_v(l)%ns)      )
+
+             ALLOCATE ( surf_lsm_v(l)%rrtm_aldif(0:2,1:surf_lsm_v(l)%ns) )
+             ALLOCATE ( surf_lsm_v(l)%rrtm_aldir(0:2,1:surf_lsm_v(l)%ns) )
+             ALLOCATE ( surf_lsm_v(l)%rrtm_asdif(0:2,1:surf_lsm_v(l)%ns) )
+             ALLOCATE ( surf_lsm_v(l)%rrtm_asdir(0:2,1:surf_lsm_v(l)%ns) )
+
+             ALLOCATE ( surf_usm_v(l)%aldif(0:2,1:surf_usm_v(l)%ns)      )
+             ALLOCATE ( surf_usm_v(l)%aldir(0:2,1:surf_usm_v(l)%ns)      )
+             ALLOCATE ( surf_usm_v(l)%asdif(0:2,1:surf_usm_v(l)%ns)      )
+             ALLOCATE ( surf_usm_v(l)%asdir(0:2,1:surf_usm_v(l)%ns)      )
+
+             ALLOCATE ( surf_usm_v(l)%rrtm_aldif(0:2,1:surf_usm_v(l)%ns) )
+             ALLOCATE ( surf_usm_v(l)%rrtm_aldir(0:2,1:surf_usm_v(l)%ns) )
+             ALLOCATE ( surf_usm_v(l)%rrtm_asdif(0:2,1:surf_usm_v(l)%ns) )
+             ALLOCATE ( surf_usm_v(l)%rrtm_asdir(0:2,1:surf_usm_v(l)%ns) )
+!
+!--          Allocate broadband albedo (temporary for the current radiation
+!--          implementations)
+             IF ( .NOT. ALLOCATED( surf_lsm_v(l)%albedo ) )                    &
+                ALLOCATE( surf_lsm_v(l)%albedo(0:2,1:surf_lsm_v(l)%ns) )
+             IF ( .NOT. ALLOCATED( surf_usm_v(l)%albedo ) )                    &
+                ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns) )
+
+          ENDDO
+!
+!--       Level 1 initialization of spectral albedos via namelist 
+!--       paramters. Please note, this case all surface tiles are initialized 
+!--       the same. 
+          IF ( surf_lsm_h%ns > 0 )  THEN
+             surf_lsm_h%aldif  = albedo_lw_dif
+             surf_lsm_h%aldir  = albedo_lw_dir
+             surf_lsm_h%asdif  = albedo_sw_dif
+             surf_lsm_h%asdir  = albedo_sw_dir
+             surf_lsm_h%albedo = albedo_sw_dif
+          ENDIF
+          IF ( surf_usm_h%ns > 0 )  THEN
+             IF ( surf_usm_h%albedo_from_ascii )  THEN
+                surf_usm_h%aldif  = surf_usm_h%albedo
+                surf_usm_h%aldir  = surf_usm_h%albedo
+                surf_usm_h%asdif  = surf_usm_h%albedo
+                surf_usm_h%asdir  = surf_usm_h%albedo
+             ELSE
+                surf_usm_h%aldif  = albedo_lw_dif
+                surf_usm_h%aldir  = albedo_lw_dir
+                surf_usm_h%asdif  = albedo_sw_dif
+                surf_usm_h%asdir  = albedo_sw_dir
+                surf_usm_h%albedo = albedo_sw_dif
+             ENDIF
+          ENDIF
+
+          DO  l = 0, 3
+
+             IF ( surf_lsm_v(l)%ns > 0 )  THEN
+                surf_lsm_v(l)%aldif  = albedo_lw_dif
+                surf_lsm_v(l)%aldir  = albedo_lw_dir
+                surf_lsm_v(l)%asdif  = albedo_sw_dif
+                surf_lsm_v(l)%asdir  = albedo_sw_dir
+                surf_lsm_v(l)%albedo = albedo_sw_dif
+             ENDIF
+
+             IF ( surf_usm_v(l)%ns > 0 )  THEN
+                IF ( surf_usm_v(l)%albedo_from_ascii )  THEN
+                   surf_usm_v(l)%aldif  = surf_usm_v(l)%albedo
+                   surf_usm_v(l)%aldir  = surf_usm_v(l)%albedo
+                   surf_usm_v(l)%asdif  = surf_usm_v(l)%albedo
+                   surf_usm_v(l)%asdir  = surf_usm_v(l)%albedo
+                ELSE
+                   surf_usm_v(l)%aldif  = albedo_lw_dif
+                   surf_usm_v(l)%aldir  = albedo_lw_dir
+                   surf_usm_v(l)%asdif  = albedo_sw_dif
+                   surf_usm_v(l)%asdir  = albedo_sw_dir
+                ENDIF
+             ENDIF
+          ENDDO
+
+!
+!--       Level 2 initialization of spectral albedos via albedo_type. 
+!--       Please note, for natural- and urban-type surfaces, a tile approach 
+!--       is applied so that the resulting albedo is calculated via the weighted 
+!--       average of respective surface fractions. 
+          DO  m = 1, surf_lsm_h%ns
+!
+!--          Spectral albedos for vegetation/pavement/water surfaces
+             DO  ind_type = 0, 2
+                IF ( surf_lsm_h%albedo_type(ind_type,m) /= 0 )  THEN
+                   surf_lsm_h%aldif(ind_type,m) =                              &
+                               albedo_pars(0,surf_lsm_h%albedo_type(ind_type,m))
+                   surf_lsm_h%asdif(ind_type,m) =                              &
+                               albedo_pars(1,surf_lsm_h%albedo_type(ind_type,m))
+                   surf_lsm_h%aldir(ind_type,m) =                              &
+                               albedo_pars(0,surf_lsm_h%albedo_type(ind_type,m))
+                   surf_lsm_h%asdir(ind_type,m) =                              &
+                               albedo_pars(1,surf_lsm_h%albedo_type(ind_type,m))
+                   surf_lsm_h%albedo(ind_type,m) =                             &
+                               albedo_pars(2,surf_lsm_h%albedo_type(ind_type,m))
+                ENDIF
+             ENDDO
+
+          ENDDO
+!
+!--       For urban surface only if albedo has not been already initialized 
+!--       in the urban-surface model via the ASCII file.
+          IF ( .NOT. surf_usm_h%albedo_from_ascii )  THEN
+             DO  m = 1, surf_usm_h%ns
+!
+!--             Spectral albedos for wall/green/window surfaces
+                DO  ind_type = 0, 2
+                   IF ( surf_usm_h%albedo_type(ind_type,m) /= 0 )  THEN
+                      surf_usm_h%aldif(ind_type,m) =                           &
+                               albedo_pars(0,surf_usm_h%albedo_type(ind_type,m))
+                      surf_usm_h%asdif(ind_type,m) =                           &
+                               albedo_pars(1,surf_usm_h%albedo_type(ind_type,m))
+                      surf_usm_h%aldir(ind_type,m) =                           &
+                               albedo_pars(0,surf_usm_h%albedo_type(ind_type,m))
+                      surf_usm_h%asdir(ind_type,m) =                           &
+                               albedo_pars(1,surf_usm_h%albedo_type(ind_type,m))
+                      surf_usm_h%albedo(ind_type,m) =                          &
+                               albedo_pars(2,surf_usm_h%albedo_type(ind_type,m))
+                   ENDIF
+                ENDDO
+
+             ENDDO
+          ENDIF
+
+          DO l = 0, 3
+
+             DO  m = 1, surf_lsm_v(l)%ns
+!
+!--             Spectral albedos for vegetation/pavement/water surfaces
+                DO  ind_type = 0, 2
+                   IF ( surf_lsm_v(l)%albedo_type(ind_type,m) /= 0 )  THEN
+                      surf_lsm_v(l)%aldif(ind_type,m) =                        &
+                            albedo_pars(0,surf_lsm_v(l)%albedo_type(ind_type,m))
+                      surf_lsm_v(l)%asdif(ind_type,m) =                        &
+                            albedo_pars(1,surf_lsm_v(l)%albedo_type(ind_type,m))
+                      surf_lsm_v(l)%aldir(ind_type,m) =                        &
+                            albedo_pars(0,surf_lsm_v(l)%albedo_type(ind_type,m))
+                      surf_lsm_v(l)%asdir(ind_type,m) =                        &
+                            albedo_pars(1,surf_lsm_v(l)%albedo_type(ind_type,m))
+                      surf_lsm_v(l)%albedo(ind_type,m) =                       &
+                            albedo_pars(2,surf_lsm_v(l)%albedo_type(ind_type,m))
+                   ENDIF
+                ENDDO
+             ENDDO
+!
+!--          For urban surface only if albedo has not been already initialized 
+!--          in the urban-surface model via the ASCII file.
+             IF ( .NOT. surf_usm_v(l)%albedo_from_ascii )  THEN
+                DO  m = 1, surf_usm_v(l)%ns
+!
+!--                Spectral albedos for wall/green/window surfaces
+                   DO  ind_type = 0, 2
+                      IF ( surf_usm_v(l)%albedo_type(ind_type,m) /= 0 )  THEN
+                         surf_usm_v(l)%aldif(ind_type,m) =                     &
+                            albedo_pars(0,surf_usm_v(l)%albedo_type(ind_type,m))
+                         surf_usm_v(l)%asdif(ind_type,m) =                     &
+                            albedo_pars(1,surf_usm_v(l)%albedo_type(ind_type,m))
+                         surf_usm_v(l)%aldir(ind_type,m) =                     &
+                            albedo_pars(0,surf_usm_v(l)%albedo_type(ind_type,m))
+                         surf_usm_v(l)%asdir(ind_type,m) =                     &
+                            albedo_pars(1,surf_usm_v(l)%albedo_type(ind_type,m))
+                         surf_usm_v(l)%albedo(ind_type,m) =                    &
+                            albedo_pars(2,surf_usm_v(l)%albedo_type(ind_type,m))
+                      ENDIF
+                   ENDDO
+
+                ENDDO
+             ENDIF
+          ENDDO
+!
+!--       Level 3 initialization at grid points where albedo type is zero.
+!--       This case, spectral albedos are taken from file if available
+          IF ( albedo_pars_f%from_file )  THEN
+!
+!--          Horizontal
+             DO  m = 1, surf_lsm_h%ns
+                i = surf_lsm_h%i(m)
+                j = surf_lsm_h%j(m)
+!
+!--             Spectral albedos for vegetation/pavement/water surfaces
+                DO  ind_type = 0, 2
+                   IF ( surf_lsm_h%albedo_type(ind_type,m) == 0 )  THEN
+                      IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
+                         surf_lsm_h%albedo(ind_type,m) =                       &
+                                                albedo_pars_f%pars_xy(1,j,i)
+                      IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
+                         surf_lsm_h%aldir(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(1,j,i)
+                      IF ( albedo_pars_f%pars_xy(2,j,i) /= albedo_pars_f%fill )&
+                         surf_lsm_h%aldif(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(2,j,i)
+                      IF ( albedo_pars_f%pars_xy(3,j,i) /= albedo_pars_f%fill )&
+                         surf_lsm_h%asdir(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(3,j,i)
+                      IF ( albedo_pars_f%pars_xy(4,j,i) /= albedo_pars_f%fill )&
+                         surf_lsm_h%asdif(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(4,j,i)
+                   ENDIF
+                ENDDO
+             ENDDO
+!
+!--          For urban surface only if albedo has not been already initialized 
+!--          in the urban-surface model via the ASCII file.
+             IF ( .NOT. surf_usm_h%albedo_from_ascii )  THEN
+                DO  m = 1, surf_usm_h%ns
+                   i = surf_usm_h%i(m)
+                   j = surf_usm_h%j(m)
+!
+!--                Spectral albedos for wall/green/window surfaces
+                   DO  ind_type = 0, 2
+                      IF ( surf_usm_h%albedo_type(ind_type,m) == 0 )  THEN
+                         IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%albedo(ind_type,m) =                       &
+                                                albedo_pars_f%pars_xy(1,j,i)
+                         IF ( albedo_pars_f%pars_xy(1,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%aldir(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(1,j,i)
+                         IF ( albedo_pars_f%pars_xy(2,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%aldif(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(2,j,i)
+                         IF ( albedo_pars_f%pars_xy(3,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%asdir(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(3,j,i)
+                         IF ( albedo_pars_f%pars_xy(4,j,i) /= albedo_pars_f%fill )&
+                            surf_usm_h%asdif(ind_type,m) =                        &
+                                                albedo_pars_f%pars_xy(4,j,i)
+                      ENDIF
+                   ENDDO
+
+                ENDDO
+             ENDIF
+!
+!--          Vertical
+             DO  l = 0, 3
+                ioff = surf_lsm_v(l)%ioff
+                joff = surf_lsm_v(l)%joff
+
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i = surf_lsm_v(l)%i(m)
+                   j = surf_lsm_v(l)%j(m)
+!
+!--                Spectral albedos for vegetation/pavement/water surfaces
+                   DO  ind_type = 0, 2
+                      IF ( surf_lsm_v(l)%albedo_type(ind_type,m) == 0 )  THEN
+                         IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
+                              albedo_pars_f%fill )                             &
+                            surf_lsm_v(l)%albedo(ind_type,m) =                 &
+                                          albedo_pars_f%pars_xy(1,j+joff,i+ioff)
+                         IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
+                              albedo_pars_f%fill )                             &
+                            surf_lsm_v(l)%aldir(ind_type,m) =                  &
+                                          albedo_pars_f%pars_xy(1,j+joff,i+ioff)
+                         IF ( albedo_pars_f%pars_xy(2,j+joff,i+ioff) /=        &
+                              albedo_pars_f%fill )                             &
+                            surf_lsm_v(l)%aldif(ind_type,m) =                  &
+                                          albedo_pars_f%pars_xy(2,j+joff,i+ioff)
+                         IF ( albedo_pars_f%pars_xy(3,j+joff,i+ioff) /=        &
+                              albedo_pars_f%fill )                             &
+                            surf_lsm_v(l)%asdir(ind_type,m) =                  &
+                                          albedo_pars_f%pars_xy(3,j+joff,i+ioff)
+                         IF ( albedo_pars_f%pars_xy(4,j+joff,i+ioff) /=        &
+                              albedo_pars_f%fill )                             &
+                            surf_lsm_v(l)%asdif(ind_type,m) =                  &
+                                          albedo_pars_f%pars_xy(4,j+joff,i+ioff)
+                      ENDIF
+                   ENDDO
+                ENDDO
+!
+!--             For urban surface only if albedo has not been already initialized 
+!--             in the urban-surface model via the ASCII file.
+                IF ( .NOT. surf_usm_v(l)%albedo_from_ascii )  THEN
+                   ioff = surf_usm_v(l)%ioff
+                   joff = surf_usm_v(l)%joff
+
+                   DO  m = 1, surf_usm_v(l)%ns
+                      i = surf_usm_v(l)%i(m)
+                      j = surf_usm_v(l)%j(m)
+!
+!--                   Spectral albedos for wall/green/window surfaces
+                      DO  ind_type = 0, 2
+                         IF ( surf_usm_v(l)%albedo_type(ind_type,m) == 0 )  THEN
+                            IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%albedo(ind_type,m) =                 &
+                                             albedo_pars_f%pars_xy(1,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(1,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%aldir(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(1,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(2,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%aldif(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(2,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(3,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%asdir(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(3,j+joff,i+ioff)
+                            IF ( albedo_pars_f%pars_xy(4,j+joff,i+ioff) /=        &
+                                 albedo_pars_f%fill )                             &
+                               surf_usm_v(l)%asdif(ind_type,m) =                  &
+                                             albedo_pars_f%pars_xy(4,j+joff,i+ioff)
+                         ENDIF
+                      ENDDO
+
+                   ENDDO
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+!
+!--       Calculate initial values of current (cosine of) the zenith angle and 
+!--       whether the sun is up
+          CALL calc_zenith     
+!
+!--       Calculate initial surface albedo for different surfaces
+          IF ( .NOT. constant_albedo )  THEN
+!
+!--          Horizontally aligned natural and urban surfaces
+             CALL calc_albedo( surf_lsm_h    )
+             CALL calc_albedo( surf_usm_h    )
+!
+!--          Vertically aligned natural and urban surfaces
+             DO  l = 0, 3
+                CALL calc_albedo( surf_lsm_v(l) )
+                CALL calc_albedo( surf_usm_v(l) )
+             ENDDO
+          ELSE
+!
+!--          Initialize sun-inclination independent spectral albedos
+!--          Horizontal surfaces
+             IF ( surf_lsm_h%ns > 0 )  THEN
+                surf_lsm_h%rrtm_aldir = surf_lsm_h%aldir
+                surf_lsm_h%rrtm_asdir = surf_lsm_h%asdir
+                surf_lsm_h%rrtm_aldif = surf_lsm_h%aldif
+                surf_lsm_h%rrtm_asdif = surf_lsm_h%asdif
+             ENDIF
+             IF ( surf_usm_h%ns > 0 )  THEN
+                surf_usm_h%rrtm_aldir = surf_usm_h%aldir
+                surf_usm_h%rrtm_asdir = surf_usm_h%asdir
+                surf_usm_h%rrtm_aldif = surf_usm_h%aldif
+                surf_usm_h%rrtm_asdif = surf_usm_h%asdif
+             ENDIF
+!
+!--          Vertical surfaces
+             DO  l = 0, 3
+                IF ( surf_lsm_v(l)%ns > 0 )  THEN
+                   surf_lsm_v(l)%rrtm_aldir = surf_lsm_v(l)%aldir
+                   surf_lsm_v(l)%rrtm_asdir = surf_lsm_v(l)%asdir
+                   surf_lsm_v(l)%rrtm_aldif = surf_lsm_v(l)%aldif
+                   surf_lsm_v(l)%rrtm_asdif = surf_lsm_v(l)%asdif
+                ENDIF
+                IF ( surf_usm_v(l)%ns > 0 )  THEN
+                   surf_usm_v(l)%rrtm_aldir = surf_usm_v(l)%aldir
+                   surf_usm_v(l)%rrtm_asdir = surf_usm_v(l)%asdir
+                   surf_usm_v(l)%rrtm_aldif = surf_usm_v(l)%aldif
+                   surf_usm_v(l)%rrtm_asdif = surf_usm_v(l)%asdif
+                ENDIF
+             ENDDO
+
+          ENDIF
+
+!
+!--       Allocate 3d arrays of radiative fluxes and heating rates
+          IF ( .NOT. ALLOCATED ( rad_sw_in ) )  THEN
+             ALLOCATE ( rad_sw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_in = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_in_av ) )  THEN
+             ALLOCATE ( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_out ) )  THEN
+             ALLOCATE ( rad_sw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_out = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_out_av ) )  THEN
+             ALLOCATE ( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_hr ) )  THEN
+             ALLOCATE ( rad_sw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_hr_av ) )  THEN
+             ALLOCATE ( rad_sw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_hr_av = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_cs_hr ) )  THEN
+             ALLOCATE ( rad_sw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_cs_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_sw_cs_hr_av ) )  THEN
+             ALLOCATE ( rad_sw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_sw_cs_hr_av = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_in ) )  THEN
+             ALLOCATE ( rad_lw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_in     = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_in_av ) )  THEN
+             ALLOCATE ( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_out ) )  THEN
+             ALLOCATE ( rad_lw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+            rad_lw_out    = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_out_av ) )  THEN
+             ALLOCATE ( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_hr ) )  THEN
+             ALLOCATE ( rad_lw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_hr_av ) )  THEN
+             ALLOCATE ( rad_lw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_hr_av = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_cs_hr ) )  THEN
+             ALLOCATE ( rad_lw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_cs_hr = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED ( rad_lw_cs_hr_av ) )  THEN
+             ALLOCATE ( rad_lw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             rad_lw_cs_hr_av = 0.0_wp
+          ENDIF
+
+          ALLOCATE ( rad_sw_cs_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ALLOCATE ( rad_sw_cs_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          rad_sw_cs_in  = 0.0_wp
+          rad_sw_cs_out = 0.0_wp
+
+          ALLOCATE ( rad_lw_cs_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ALLOCATE ( rad_lw_cs_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          rad_lw_cs_in  = 0.0_wp
+          rad_lw_cs_out = 0.0_wp
+
+!
+!--       Allocate 1-element array for surface temperature 
+!--       (RRTMG anticipates an array as passed argument).
+          ALLOCATE ( rrtm_tsfc(1) )
+!
+!--       Allocate surface emissivity. 
+!--       Values will be given directly before calling rrtm_lw.
+          ALLOCATE ( rrtm_emis(0:0,1:nbndlw+1) )
+
+!
+!--       Initialize RRTMG
+          IF ( lw_radiation )  CALL rrtmg_lw_ini ( c_p )
+          IF ( sw_radiation )  CALL rrtmg_sw_ini ( c_p )
+
+!
+!--       Set input files for RRTMG
+          INQUIRE(FILE="RAD_SND_DATA", EXIST=snd_exists) 
+          IF ( .NOT. snd_exists )  THEN
+             rrtm_input_file = "rrtmg_lw.nc"
+          ENDIF
+
+!
+!--       Read vertical layers for RRTMG from sounding data
+!--       The routine provides nzt_rad, hyp_snd(1:nzt_rad),
+!--       t_snd(nzt+2:nzt_rad), rrtm_play(1:nzt_rad), rrtm_plev(1_nzt_rad+1), 
+!--       rrtm_tlay(nzt+2:nzt_rad), rrtm_tlev(nzt+2:nzt_rad+1)
+          CALL read_sounding_data
+
+!
+!--       Read trace gas profiles from file. This routine provides
+!--       the rrtm_ arrays (1:nzt_rad+1)
+          CALL read_trace_gas_data
+#endif
+       ENDIF
+
+!
+!--    Perform user actions if required
+       CALL user_init_radiation
+
+!
+!--    Calculate radiative fluxes at model start
+       SELECT CASE ( TRIM( radiation_scheme ) )
+
+          CASE ( 'rrtmg' )
+             CALL radiation_rrtmg
+
+          CASE ( 'clear-sky' )
+             CALL radiation_clearsky
+
+          CASE ( 'constant' )
+             CALL radiation_constant
+
+          CASE DEFAULT
+
+       END SELECT
+
+       RETURN
+
+    END SUBROUTINE radiation_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> A simple clear sky radiation model
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_clearsky
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  l         !< running index for surface orientation
+       REAL(wp)     ::  pt1       !< potential temperature at first grid level or mean value at urban layer top 
+       REAL(wp)     ::  pt1_l     !< potential temperature at first grid level or mean value at urban layer top at local subdomain 
+       REAL(wp)     ::  ql1       !< liquid water mixing ratio at first grid level or mean value at urban layer top 
+       REAL(wp)     ::  ql1_l     !< liquid water mixing ratio at first grid level or mean value at urban layer top at local subdomain 
+
+       TYPE(surf_type), POINTER ::  surf !< pointer on respective surface type, used to generalize routine   
+
+!
+!--    Calculate current zenith angle
+       CALL calc_zenith
+
+!
+!--    Calculate sky transmissivity
+       sky_trans = 0.6_wp + 0.2_wp * zenith(0)
+
+!
+!--    Calculate value of the Exner function at model surface
+!
+!--    In case averaged radiation is used, calculate mean temperature and 
+!--    liquid water mixing ratio at the urban-layer top.
+       IF ( average_radiation ) THEN
+          pt1   = 0.0_wp
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  ql1   = 0.0_wp
+
+          pt1_l = SUM( pt(nzut,nys:nyn,nxl:nxr) )
+          IF ( bulk_cloud_model  .OR.  cloud_droplets  )  ql1_l = SUM( ql(nzut,nys:nyn,nxl:nxr) )
+
+#if defined( __parallel )      
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( pt1_l, pt1, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_AllReduce1:', ierr, pt1_l, pt1
+              FLUSH(9)
+          ENDIF
+
+          IF ( bulk_cloud_model  .OR.  cloud_droplets ) THEN
+              CALL MPI_ALLREDUCE( ql1_l, ql1, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+              IF ( ierr /= 0 ) THEN
+                  WRITE(9,*) 'Error MPI_AllReduce2:', ierr, ql1_l, ql1
+                  FLUSH(9)
+              ENDIF
+          ENDIF
+#else
+          pt1 = pt1_l 
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  ql1 = ql1_l
+#endif
+
+          IF ( bulk_cloud_model  .OR.  cloud_droplets  )  pt1 = pt1 + lv_d_cp / exner(nzut) * ql1
+!
+!--       Finally, divide by number of grid points
+          pt1 = pt1 / REAL( ( nx + 1 ) * ( ny + 1 ), KIND=wp )
+       ENDIF
+!
+!--    Call clear-sky calculation for each surface orientation. 
+!--    First, horizontal surfaces
+       surf => surf_lsm_h
+       CALL radiation_clearsky_surf
+       surf => surf_usm_h
+       CALL radiation_clearsky_surf
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          surf => surf_lsm_v(l)
+          CALL radiation_clearsky_surf
+          surf => surf_usm_v(l)
+          CALL radiation_clearsky_surf
+       ENDDO
+
+       CONTAINS
+
+          SUBROUTINE radiation_clearsky_surf
+
+             IMPLICIT NONE
+
+             INTEGER(iwp) ::  i         !< index x-direction
+             INTEGER(iwp) ::  j         !< index y-direction
+             INTEGER(iwp) ::  k         !< index z-direction
+             INTEGER(iwp) ::  m         !< running index for surface elements
+
+             IF ( surf%ns < 1 )  RETURN
+
+!
+!--          Calculate radiation fluxes and net radiation (rad_net) assuming 
+!--          homogeneous urban radiation conditions. 
+             IF ( average_radiation ) THEN       
+
+                k = nzut
+
+                surf%rad_sw_in  = solar_constant * sky_trans * zenith(0)
+                surf%rad_sw_out = albedo_urb * surf%rad_sw_in
+                
+                surf%rad_lw_in  = 0.8_wp * sigma_sb * (pt1 * exner(k+1))**4
+
+                surf%rad_lw_out = emissivity_urb * sigma_sb * (t_rad_urb)**4   &
+                                    + (1.0_wp - emissivity_urb) * surf%rad_lw_in
+
+                surf%rad_net = surf%rad_sw_in - surf%rad_sw_out                &
+                             + surf%rad_lw_in - surf%rad_lw_out
+
+                surf%rad_lw_out_change_0 = 3.0_wp * emissivity_urb * sigma_sb  &
+                                           * (t_rad_urb)**3
+
+!
+!--          Calculate radiation fluxes and net radiation (rad_net) for each surface 
+!--          element.
+             ELSE
+
+                DO  m = 1, surf%ns
+                   i = surf%i(m)
+                   j = surf%j(m)
+                   k = surf%k(m)
+
+                   surf%rad_sw_in(m) = solar_constant * sky_trans * zenith(0)
+
+!
+!--                Weighted average according to surface fraction. 
+!--                ATTENTION: when radiation interactions are switched on the 
+!--                calculated fluxes below are not actually used as they are 
+!--                overwritten in radiation_interaction.
+                   surf%rad_sw_out(m) = ( surf%frac(ind_veg_wall,m)  *         &
+                                          surf%albedo(ind_veg_wall,m)          &
+                                        + surf%frac(ind_pav_green,m) *         &
+                                          surf%albedo(ind_pav_green,m)         &
+                                        + surf%frac(ind_wat_win,m)   *         &
+                                          surf%albedo(ind_wat_win,m) )         &
+                                        * surf%rad_sw_in(m)
+
+                   surf%rad_lw_out(m) = ( surf%frac(ind_veg_wall,m)  *         &
+                                          surf%emissivity(ind_veg_wall,m)      &
+                                        + surf%frac(ind_pav_green,m) *         &
+                                          surf%emissivity(ind_pav_green,m)     &
+                                        + surf%frac(ind_wat_win,m)   *         &
+                                          surf%emissivity(ind_wat_win,m)       &
+                                        )                                      &
+                                        * sigma_sb                             &
+                                        * ( surf%pt_surface(m) * exner(nzb) )**4
+
+                   surf%rad_lw_out_change_0(m) =                               &
+                                      ( surf%frac(ind_veg_wall,m)  *           &
+                                        surf%emissivity(ind_veg_wall,m)        &
+                                      + surf%frac(ind_pav_green,m) *           &
+                                        surf%emissivity(ind_pav_green,m)       &
+                                      + surf%frac(ind_wat_win,m)   *           &
+                                        surf%emissivity(ind_wat_win,m)         &
+                                      ) * 3.0_wp * sigma_sb                    &
+                                      * ( surf%pt_surface(m) * exner(nzb) )** 3
+
+
+                   IF ( bulk_cloud_model  .OR.  cloud_droplets  )  THEN
+                      pt1 = pt(k,j,i) + lv_d_cp / exner(k) * ql(k,j,i)
+                      surf%rad_lw_in(m)  = 0.8_wp * sigma_sb * (pt1 * exner(k))**4
+                   ELSE
+                      surf%rad_lw_in(m)  = 0.8_wp * sigma_sb * (pt(k,j,i) * exner(k))**4
+                   ENDIF
+
+                   surf%rad_net(m) = surf%rad_sw_in(m) - surf%rad_sw_out(m)    &
+                                   + surf%rad_lw_in(m) - surf%rad_lw_out(m)
+
+                ENDDO
+
+             ENDIF
+
+!
+!--          Fill out values in radiation arrays
+             DO  m = 1, surf%ns
+                i = surf%i(m)
+                j = surf%j(m)
+                rad_sw_in(0,j,i) = surf%rad_sw_in(m)
+                rad_sw_out(0,j,i) = surf%rad_sw_out(m)
+                rad_lw_in(0,j,i) = surf%rad_lw_in(m)
+                rad_lw_out(0,j,i) = surf%rad_lw_out(m)
+             ENDDO
+ 
+          END SUBROUTINE radiation_clearsky_surf
+
+    END SUBROUTINE radiation_clearsky
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This scheme keeps the prescribed net radiation constant during the run
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_constant
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  l         !< running index for surface orientation
+
+       REAL(wp)     ::  pt1       !< potential temperature at first grid level or mean value at urban layer top 
+       REAL(wp)     ::  pt1_l     !< potential temperature at first grid level or mean value at urban layer top at local subdomain 
+       REAL(wp)     ::  ql1       !< liquid water mixing ratio at first grid level or mean value at urban layer top 
+       REAL(wp)     ::  ql1_l     !< liquid water mixing ratio at first grid level or mean value at urban layer top at local subdomain 
+
+       TYPE(surf_type), POINTER ::  surf !< pointer on respective surface type, used to generalize routine
+
+!
+!--    In case averaged radiation is used, calculate mean temperature and 
+!--    liquid water mixing ratio at the urban-layer top.
+       IF ( average_radiation ) THEN   
+          pt1   = 0.0_wp
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  ql1   = 0.0_wp
+
+          pt1_l = SUM( pt(nzut,nys:nyn,nxl:nxr) )
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  ql1_l = SUM( ql(nzut,nys:nyn,nxl:nxr) )
+
+#if defined( __parallel )      
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( pt1_l, pt1, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_AllReduce3:', ierr, pt1_l, pt1
+              FLUSH(9)
+          ENDIF
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  THEN
+             CALL MPI_ALLREDUCE( ql1_l, ql1, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+             IF ( ierr /= 0 ) THEN
+                 WRITE(9,*) 'Error MPI_AllReduce4:', ierr, ql1_l, ql1
+                 FLUSH(9)
+             ENDIF
+          ENDIF
+#else
+          pt1 = pt1_l
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  ql1 = ql1_l
+#endif
+          IF ( bulk_cloud_model  .OR.  cloud_droplets )  pt1 = pt1 + lv_d_cp / exner(nzut+1) * ql1
+!
+!--       Finally, divide by number of grid points
+          pt1 = pt1 / REAL( ( nx + 1 ) * ( ny + 1 ), KIND=wp )
+       ENDIF
+
+!
+!--    First, horizontal surfaces
+       surf => surf_lsm_h
+       CALL radiation_constant_surf
+       surf => surf_usm_h
+       CALL radiation_constant_surf
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          surf => surf_lsm_v(l)
+          CALL radiation_constant_surf
+          surf => surf_usm_v(l)
+          CALL radiation_constant_surf
+       ENDDO
+
+       CONTAINS
+
+          SUBROUTINE radiation_constant_surf
+
+             IMPLICIT NONE
+
+             INTEGER(iwp) ::  i         !< index x-direction
+             INTEGER(iwp) ::  ioff      !< offset between surface element and adjacent grid point along x
+             INTEGER(iwp) ::  j         !< index y-direction
+             INTEGER(iwp) ::  joff      !< offset between surface element and adjacent grid point along y
+             INTEGER(iwp) ::  k         !< index z-direction
+             INTEGER(iwp) ::  koff      !< offset between surface element and adjacent grid point along z
+             INTEGER(iwp) ::  m         !< running index for surface elements
+
+             IF ( surf%ns < 1 )  RETURN
+
+!--          Calculate homogenoeus urban radiation fluxes
+             IF ( average_radiation ) THEN
+
+                surf%rad_net = net_radiation
+
+                surf%rad_lw_in  = 0.8_wp * sigma_sb * (pt1 * exner(nzut+1))**4
+
+                surf%rad_lw_out = emissivity_urb * sigma_sb * (t_rad_urb)**4   &
+                                    + ( 1.0_wp - emissivity_urb )             & ! shouldn't be this a bulk value -- emissivity_urb?
+                                    * surf%rad_lw_in
+
+                surf%rad_lw_out_change_0 = 3.0_wp * emissivity_urb * sigma_sb  &
+                                           * t_rad_urb**3
+
+                surf%rad_sw_in = ( surf%rad_net - surf%rad_lw_in               &
+                                     + surf%rad_lw_out )                       &
+                                     / ( 1.0_wp - albedo_urb )
+
+                surf%rad_sw_out =  albedo_urb * surf%rad_sw_in
+
+!
+!--          Calculate radiation fluxes for each surface element
+             ELSE
+!
+!--             Determine index offset between surface element and adjacent 
+!--             atmospheric grid point
+                ioff = surf%ioff
+                joff = surf%joff
+                koff = surf%koff
+
+!
+!--             Prescribe net radiation and estimate the remaining radiative fluxes
+                DO  m = 1, surf%ns
+                   i = surf%i(m)
+                   j = surf%j(m)
+                   k = surf%k(m)
+
+                   surf%rad_net(m) = net_radiation
+
+                   IF ( bulk_cloud_model  .OR.  cloud_droplets )  THEN
+                      pt1 = pt(k,j,i) + lv_d_cp / exner(k) * ql(k,j,i)
+                      surf%rad_lw_in(m)  = 0.8_wp * sigma_sb * (pt1 * exner(k))**4
+                   ELSE
+                      surf%rad_lw_in(m)  = 0.8_wp * sigma_sb *                 &
+                                             ( pt(k,j,i) * exner(k) )**4
+                   ENDIF
+
+!
+!--                Weighted average according to surface fraction. 
+                   surf%rad_lw_out(m) = ( surf%frac(ind_veg_wall,m)  *         &
+                                          surf%emissivity(ind_veg_wall,m)      &
+                                        + surf%frac(ind_pav_green,m) *         &
+                                          surf%emissivity(ind_pav_green,m)     &
+                                        + surf%frac(ind_wat_win,m)   *         &
+                                          surf%emissivity(ind_wat_win,m)       &
+                                        )                                      &
+                                      * sigma_sb                               &
+                                      * ( surf%pt_surface(m) * exner(nzb) )**4
+
+                   surf%rad_sw_in(m) = ( surf%rad_net(m) - surf%rad_lw_in(m)   &
+                                       + surf%rad_lw_out(m) )                  &
+                                       / ( 1.0_wp -                            &
+                                          ( surf%frac(ind_veg_wall,m)  *       &
+                                            surf%albedo(ind_veg_wall,m)        &
+                                         +  surf%frac(ind_pav_green,m) *       &
+                                            surf%albedo(ind_pav_green,m)       &
+                                         +  surf%frac(ind_wat_win,m)   *       &
+                                            surf%albedo(ind_wat_win,m) )       &
+                                         )
+
+                   surf%rad_sw_out(m) = ( surf%frac(ind_veg_wall,m)  *         &
+                                          surf%albedo(ind_veg_wall,m)          &
+                                        + surf%frac(ind_pav_green,m) *         &
+                                          surf%albedo(ind_pav_green,m)         &
+                                        + surf%frac(ind_wat_win,m)   *         &
+                                          surf%albedo(ind_wat_win,m) )         &
+                                      * surf%rad_sw_in(m)
+
+                ENDDO
+
+             ENDIF
+
+!
+!--          Fill out values in radiation arrays
+             DO  m = 1, surf%ns
+                i = surf%i(m)
+                j = surf%j(m)
+                rad_sw_in(0,j,i) = surf%rad_sw_in(m)
+                rad_sw_out(0,j,i) = surf%rad_sw_out(m)
+                rad_lw_in(0,j,i) = surf%rad_lw_in(m)
+                rad_lw_out(0,j,i) = surf%rad_lw_out(m)
+             ENDDO
+
+          END SUBROUTINE radiation_constant_surf
+          
+
+    END SUBROUTINE radiation_constant
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for radiation model
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_header ( io )
+
+
+       IMPLICIT NONE
+ 
+       INTEGER(iwp), INTENT(IN) ::  io            !< Unit of the output file
+    
+
+       
+!
+!--    Write radiation model header
+       WRITE( io, 3 )
+
+       IF ( radiation_scheme == "constant" )  THEN
+          WRITE( io, 4 ) net_radiation
+       ELSEIF ( radiation_scheme == "clear-sky" )  THEN
+          WRITE( io, 5 )
+       ELSEIF ( radiation_scheme == "rrtmg" )  THEN
+          WRITE( io, 6 )
+          IF ( .NOT. lw_radiation )  WRITE( io, 10 )
+          IF ( .NOT. sw_radiation )  WRITE( io, 11 )
+       ENDIF 
+
+       IF ( albedo_type_f%from_file  .OR.  vegetation_type_f%from_file  .OR.   &
+            pavement_type_f%from_file  .OR.  water_type_f%from_file  .OR.      &
+            building_type_f%from_file )  THEN
+             WRITE( io, 13 )
+       ELSE  
+          IF ( albedo_type == 0 )  THEN
+             WRITE( io, 7 ) albedo
+          ELSE
+             WRITE( io, 8 ) TRIM( albedo_type_name(albedo_type) )
+          ENDIF
+       ENDIF
+       IF ( constant_albedo )  THEN
+          WRITE( io, 9 )
+       ENDIF
+       
+       WRITE( io, 12 ) dt_radiation
+ 
+
+ 3 FORMAT (//' Radiation model information:'/                                  &
+              ' ----------------------------'/)
+ 4 FORMAT ('    --> Using constant net radiation: net_radiation = ', F6.2,     &
+           // 'W/m**2')
+ 5 FORMAT ('    --> Simple radiation scheme for clear sky is used (no clouds,',&
+                   ' default)')
+ 6 FORMAT ('    --> RRTMG scheme is used')
+ 7 FORMAT (/'    User-specific surface albedo: albedo =', F6.3)
+ 8 FORMAT (/'    Albedo is set for land surface type: ', A)
+ 9 FORMAT (/'    --> Albedo is fixed during the run')
+10 FORMAT (/'    --> Longwave radiation is disabled')
+11 FORMAT (/'    --> Shortwave radiation is disabled.')
+12 FORMAT  ('    Timestep: dt_radiation = ', F6.2, '  s')
+13 FORMAT (/'    Albedo is set individually for each xy-location, according ', &
+                 'to given surface type.')
+
+
+    END SUBROUTINE radiation_header
+   
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &radiation_parameters for radiation model
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_parin
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
+       
+       NAMELIST /radiation_par/   albedo, albedo_lw_dif, albedo_lw_dir,         &
+                                  albedo_sw_dif, albedo_sw_dir, albedo_type,    &
+                                  constant_albedo, dt_radiation, emissivity,    &
+                                  lw_radiation, max_raytracing_dist,            &
+                                  min_irrf_value, mrt_geom_human,               &
+                                  mrt_include_sw, mrt_nlevels,                  &
+                                  mrt_skip_roof, net_radiation, nrefsteps,      &
+                                  plant_lw_interact, rad_angular_discretization,&
+                                  radiation_interactions_on, radiation_scheme,  &
+                                  raytrace_discrete_azims,                      &
+                                  raytrace_discrete_elevs, raytrace_mpi_rma,    &
+                                  skip_time_do_radiation, surface_reflections,  &
+                                  svfnorm_report_thresh, sw_radiation,          &
+                                  unscheduled_radiation_calls
+
+   
+       NAMELIST /radiation_parameters/ albedo, albedo_lw_dif, albedo_lw_dir,    &
+                                  albedo_sw_dif, albedo_sw_dir, albedo_type,    &
+                                  constant_albedo, dt_radiation, emissivity,    &
+                                  lw_radiation, max_raytracing_dist,            &
+                                  min_irrf_value, mrt_geom_human,               &
+                                  mrt_include_sw, mrt_nlevels,                  &
+                                  mrt_skip_roof, net_radiation, nrefsteps,      &
+                                  plant_lw_interact, rad_angular_discretization,&
+                                  radiation_interactions_on, radiation_scheme,  &
+                                  raytrace_discrete_azims,                      &
+                                  raytrace_discrete_elevs, raytrace_mpi_rma,    &
+                                  skip_time_do_radiation, surface_reflections,  &
+                                  svfnorm_report_thresh, sw_radiation,          &
+                                  unscheduled_radiation_calls
+   
+       line = ' '
+       
+!
+!--    Try to find radiation model namelist
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&radiation_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, radiation_parameters, ERR = 10 )
+
+!
+!--    Set flag that indicates that the radiation model is switched on
+       radiation = .TRUE.
+
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'radiation_parameters', line )
+!
+!--    Try to find old namelist
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&radiation_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, radiation_par, ERR = 13, END = 14 )
+
+       message_string = 'namelist radiation_par is deprecated and will be ' // &
+                     'removed in near future. Please use namelist ' //         &
+                     'radiation_parameters instead'
+       CALL message( 'radiation_parin', 'PA0487', 0, 1, 0, 6, 0 )
+
+!
+!--    Set flag that indicates that the radiation model is switched on
+       radiation = .TRUE.
+
+       IF ( .NOT.  radiation_interactions_on  .AND.  surface_reflections )  THEN
+          message_string = 'surface_reflections is allowed only when '      // &
+               'radiation_interactions_on is set to TRUE'
+          CALL message( 'radiation_parin', 'PA0293',1, 2, 0, 6, 0 )
+       ENDIF
+
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'radiation_par', line )
+
+ 14    CONTINUE
+       
+    END SUBROUTINE radiation_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Implementation of the RRTMG radiation_scheme
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_rrtmg
+
+#if defined ( __rrtmg )
+       USE indices,                                                            &
+           ONLY:  nbgp
+
+       USE particle_attributes,                                                &
+           ONLY:  grid_particles, number_of_particles, particles,              &
+                  particle_advection_start, prt_count
+
+       IMPLICIT NONE
+
+
+       INTEGER(iwp) ::  i, j, k, l, m, n !< loop indices
+       INTEGER(iwp) ::  k_topo     !< topography top index
+
+       REAL(wp)     ::  nc_rad, &    !< number concentration of cloud droplets
+                        s_r2,   &    !< weighted sum over all droplets with r^2
+                        s_r3         !< weighted sum over all droplets with r^3
+
+       REAL(wp), DIMENSION(0:nzt+1) :: pt_av, q_av, ql_av
+!
+!--    Just dummy arguments
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: rrtm_lw_taucld_dum,          &
+                                                  rrtm_lw_tauaer_dum,          &
+                                                  rrtm_sw_taucld_dum,          &
+                                                  rrtm_sw_ssacld_dum,          &
+                                                  rrtm_sw_asmcld_dum,          &
+                                                  rrtm_sw_fsfcld_dum,          &
+                                                  rrtm_sw_tauaer_dum,          &
+                                                  rrtm_sw_ssaaer_dum,          &
+                                                  rrtm_sw_asmaer_dum,          &
+                                                  rrtm_sw_ecaer_dum
+
+!
+!--    Calculate current (cosine of) zenith angle and whether the sun is up
+       CALL calc_zenith     
+!
+!--    Calculate surface albedo. In case average radiation is applied, 
+!--    this is not required.
+       IF ( .NOT. constant_albedo )  THEN
+!
+!--       Horizontally aligned default, natural and urban surfaces
+          CALL calc_albedo( surf_lsm_h    )
+          CALL calc_albedo( surf_usm_h    )
+!
+!--       Vertically aligned default, natural and urban surfaces
+          DO  l = 0, 3
+             CALL calc_albedo( surf_lsm_v(l) )
+             CALL calc_albedo( surf_usm_v(l) )
+          ENDDO
+       ENDIF
+
+!
+!--    Prepare input data for RRTMG
+
+!
+!--    In case of large scale forcing with surface data, calculate new pressure
+!--    profile. nzt_rad might be modified by these calls and all required arrays
+!--    will then be re-allocated
+       IF ( large_scale_forcing  .AND.  lsf_surf )  THEN
+          CALL read_sounding_data
+          CALL read_trace_gas_data
+       ENDIF
+
+
+       IF ( average_radiation ) THEN
+
+          rrtm_asdir(1)  = albedo_urb
+          rrtm_asdif(1)  = albedo_urb
+          rrtm_aldir(1)  = albedo_urb
+          rrtm_aldif(1)  = albedo_urb
+
+          rrtm_emis = emissivity_urb
+!
+!--       Calculate mean pt profile. Actually, only one height level is required.
+          CALL calc_mean_profile( pt, 4 )
+          pt_av = hom(:, 1, 4, 0)
+          
+          IF ( humidity )  THEN
+             CALL calc_mean_profile( q, 41 )
+             q_av  = hom(:, 1, 41, 0)
+          ENDIF
+!
+!--       Prepare profiles of temperature and H2O volume mixing ratio
+          rrtm_tlev(0,nzb+1) = t_rad_urb
+
+          IF ( bulk_cloud_model )  THEN
+
+             CALL calc_mean_profile( ql, 54 )
+             ! average ql is now in hom(:, 1, 54, 0)
+             ql_av = hom(:, 1, 54, 0)
+             
+             DO k = nzb+1, nzt+1
+                rrtm_tlay(0,k) = pt_av(k) * ( (hyp(k) ) / 100000._wp       &
+                                 )**.286_wp + lv_d_cp * ql_av(k)
+                rrtm_h2ovmr(0,k) = mol_mass_air_d_wv * (q_av(k) - ql_av(k))
+             ENDDO
+          ELSE
+             DO k = nzb+1, nzt+1
+                rrtm_tlay(0,k) = pt_av(k) * ( (hyp(k) ) / 100000._wp       &
+                                 )**.286_wp
+             ENDDO
+
+             IF ( humidity )  THEN
+                DO k = nzb+1, nzt+1
+                   rrtm_h2ovmr(0,k) = mol_mass_air_d_wv * q_av(k)
+                ENDDO
+             ELSE
+                rrtm_h2ovmr(0,nzb+1:nzt+1) = 0.0_wp
+             ENDIF
+          ENDIF
+
+!
+!--       Avoid temperature/humidity jumps at the top of the LES domain by 
+!--       linear interpolation from nzt+2 to nzt+7
+          DO k = nzt+2, nzt+7
+             rrtm_tlay(0,k) = rrtm_tlay(0,nzt+1)                            &
+                           + ( rrtm_tlay(0,nzt+8) - rrtm_tlay(0,nzt+1) )    &
+                           / ( rrtm_play(0,nzt+8) - rrtm_play(0,nzt+1) )    &
+                           * ( rrtm_play(0,k) - rrtm_play(0,nzt+1) )
+
+             rrtm_h2ovmr(0,k) = rrtm_h2ovmr(0,nzt+1)                        &
+                           + ( rrtm_h2ovmr(0,nzt+8) - rrtm_h2ovmr(0,nzt+1) )&
+                           / ( rrtm_play(0,nzt+8)   - rrtm_play(0,nzt+1)   )&
+                           * ( rrtm_play(0,k) - rrtm_play(0,nzt+1) )
+
+          ENDDO
+
+!--       Linear interpolate to zw grid
+          DO k = nzb+2, nzt+8
+             rrtm_tlev(0,k)   = rrtm_tlay(0,k-1) + (rrtm_tlay(0,k) -        &
+                                rrtm_tlay(0,k-1))                           &
+                                / ( rrtm_play(0,k) - rrtm_play(0,k-1) )     &
+                                * ( rrtm_plev(0,k) - rrtm_play(0,k-1) )
+          ENDDO
+
+
+!
+!--       Calculate liquid water path and cloud fraction for each column.
+!--       Note that LWP is required in g/mÂ² instead of kg/kg m.
+          rrtm_cldfr  = 0.0_wp
+          rrtm_reliq  = 0.0_wp
+          rrtm_cliqwp = 0.0_wp
+          rrtm_icld   = 0
+
+          IF ( bulk_cloud_model )  THEN
+             DO k = nzb+1, nzt+1
+                rrtm_cliqwp(0,k) =  ql_av(k) * 1000._wp *                   &
+                                    (rrtm_plev(0,k) - rrtm_plev(0,k+1))     &
+                                    * 100._wp / g 
+
+                IF ( rrtm_cliqwp(0,k) > 0._wp )  THEN
+                   rrtm_cldfr(0,k) = 1._wp
+                   IF ( rrtm_icld == 0 )  rrtm_icld = 1
+
+!
+!--                Calculate cloud droplet effective radius
+                   rrtm_reliq(0,k) = 1.0E6_wp * ( 3.0_wp * ql_av(k)         &
+                                     * rho_surface                          &
+                                     / ( 4.0_wp * pi * nc_const * rho_l )   &
+                                     )**0.33333333333333_wp                 &
+                                     * EXP( LOG( sigma_gc )**2 )
+!
+!--                Limit effective radius
+                   IF ( rrtm_reliq(0,k) > 0.0_wp )  THEN
+                      rrtm_reliq(0,k) = MAX(rrtm_reliq(0,k),2.5_wp)
+                      rrtm_reliq(0,k) = MIN(rrtm_reliq(0,k),60.0_wp)
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDIF
+
+!
+!--       Set surface temperature
+          rrtm_tsfc = t_rad_urb
+          
+          IF ( lw_radiation )  THEN        
+          
+             CALL rrtmg_lw( 1, nzt_rad      , rrtm_icld    , rrtm_idrv      ,&
+             rrtm_play       , rrtm_plev    , rrtm_tlay    , rrtm_tlev      ,&
+             rrtm_tsfc       , rrtm_h2ovmr  , rrtm_o3vmr   , rrtm_co2vmr    ,&
+             rrtm_ch4vmr     , rrtm_n2ovmr  , rrtm_o2vmr   , rrtm_cfc11vmr  ,&
+             rrtm_cfc12vmr   , rrtm_cfc22vmr, rrtm_ccl4vmr , rrtm_emis      ,&
+             rrtm_inflglw    , rrtm_iceflglw, rrtm_liqflglw, rrtm_cldfr     ,&
+             rrtm_lw_taucld  , rrtm_cicewp  , rrtm_cliqwp  , rrtm_reice     ,& 
+             rrtm_reliq      , rrtm_lw_tauaer,                               &
+             rrtm_lwuflx     , rrtm_lwdflx  , rrtm_lwhr  ,                   &
+             rrtm_lwuflxc    , rrtm_lwdflxc , rrtm_lwhrc ,                   &
+             rrtm_lwuflx_dt  ,  rrtm_lwuflxc_dt )
+
+!
+!--          Save fluxes
+             DO k = nzb, nzt+1
+                rad_lw_in(k,:,:)  = rrtm_lwdflx(0,k)
+                rad_lw_out(k,:,:) = rrtm_lwuflx(0,k)
+             ENDDO
+             rad_lw_in_diff(:,:) = rad_lw_in(0,:,:)
+!
+!--          Save heating rates (convert from K/d to K/h). 
+!--          Further, even though an aggregated radiation is computed, map
+!--          signle-column profiles on top of any topography, in order to 
+!--          obtain correct near surface radiation heating/cooling rates.
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   k_topo = get_topography_top_index_ji( j, i, 's' )
+                   DO k = k_topo+1, nzt+1
+                      rad_lw_hr(k,j,i)     = rrtm_lwhr(0,k-k_topo)  * d_hours_day
+                      rad_lw_cs_hr(k,j,i)  = rrtm_lwhrc(0,k-k_topo) * d_hours_day
+                   ENDDO
+                ENDDO
+             ENDDO
+
+          ENDIF
+
+          IF ( sw_radiation .AND. sun_up )  THEN
+             CALL rrtmg_sw( 1, nzt_rad      , rrtm_icld     , rrtm_iaer      ,&
+             rrtm_play      , rrtm_plev     , rrtm_tlay     , rrtm_tlev      ,&
+             rrtm_tsfc      , rrtm_h2ovmr   , rrtm_o3vmr    , rrtm_co2vmr    ,&
+             rrtm_ch4vmr    , rrtm_n2ovmr   , rrtm_o2vmr    , rrtm_asdir     ,&
+             rrtm_asdif     , rrtm_aldir    , rrtm_aldif    , zenith         ,&
+             0.0_wp         , day_of_year   , solar_constant, rrtm_inflgsw   ,&
+             rrtm_iceflgsw  , rrtm_liqflgsw , rrtm_cldfr    , rrtm_sw_taucld ,&
+             rrtm_sw_ssacld , rrtm_sw_asmcld, rrtm_sw_fsfcld, rrtm_cicewp    ,&
+             rrtm_cliqwp    , rrtm_reice    , rrtm_reliq    , rrtm_sw_tauaer ,&
+             rrtm_sw_ssaaer , rrtm_sw_asmaer, rrtm_sw_ecaer , rrtm_swuflx    ,&
+             rrtm_swdflx    , rrtm_swhr     , rrtm_swuflxc  , rrtm_swdflxc   ,&
+             rrtm_swhrc     , rrtm_dirdflux , rrtm_difdflux )
+  
+!
+!--          Save fluxes:
+!--          - whole domain
+             DO k = nzb, nzt+1
+                rad_sw_in(k,:,:)  = rrtm_swdflx(0,k)
+                rad_sw_out(k,:,:) = rrtm_swuflx(0,k)
+             ENDDO
+!--          - direct and diffuse SW at urban-surface-layer (required by RTM)
+             rad_sw_in_dir(:,:) = rrtm_dirdflux(0,nzb)
+             rad_sw_in_diff(:,:) = rrtm_difdflux(0,nzb)
+
+!
+!--          Save heating rates (convert from K/d to K/s)
+             DO k = nzb+1, nzt+1
+                rad_sw_hr(k,:,:)     = rrtm_swhr(0,k)  * d_hours_day
+                rad_sw_cs_hr(k,:,:)  = rrtm_swhrc(0,k) * d_hours_day
+             ENDDO
+!
+!--       Solar radiation is zero during night
+          ELSE
+             rad_sw_in  = 0.0_wp
+             rad_sw_out = 0.0_wp
+             rad_sw_in_dir(:,:) = 0.0_wp
+             rad_sw_in_diff(:,:) = 0.0_wp
+          ENDIF
+!
+!--    RRTMG is called for each (j,i) grid point separately, starting at the 
+!--    highest topography level. Here no RTM is used since average_radiation is false
+       ELSE
+!
+!--       Loop over all grid points
+          DO i = nxl, nxr
+             DO j = nys, nyn
+
+!
+!--             Prepare profiles of temperature and H2O volume mixing ratio
+                DO  m = surf_lsm_h%start_index(j,i), surf_lsm_h%end_index(j,i)
+                   rrtm_tlev(0,nzb+1) = surf_lsm_h%pt_surface(m) * exner(nzb)
+                ENDDO
+                DO  m = surf_usm_h%start_index(j,i), surf_usm_h%end_index(j,i)
+                   rrtm_tlev(0,nzb+1) = surf_usm_h%pt_surface(m) * exner(nzb)
+                ENDDO
+
+
+                IF ( bulk_cloud_model )  THEN
+                   DO k = nzb+1, nzt+1
+                      rrtm_tlay(0,k) = pt(k,j,i) * exner(k)                    &
+                                        + lv_d_cp * ql(k,j,i)
+                      rrtm_h2ovmr(0,k) = mol_mass_air_d_wv * (q(k,j,i) - ql(k,j,i))
+                   ENDDO
+                ELSEIF ( cloud_droplets )  THEN
+                   DO k = nzb+1, nzt+1
+                      rrtm_tlay(0,k) = pt(k,j,i) * exner(k)                     &
+                                        + lv_d_cp * ql(k,j,i)
+                      rrtm_h2ovmr(0,k) = mol_mass_air_d_wv * q(k,j,i) 
+                   ENDDO
+                ELSE
+                   DO k = nzb+1, nzt+1
+                      rrtm_tlay(0,k) = pt(k,j,i) * exner(k)
+                   ENDDO
+
+                   IF ( humidity )  THEN
+                      DO k = nzb+1, nzt+1
+                         rrtm_h2ovmr(0,k) =  mol_mass_air_d_wv * q(k,j,i)
+                      ENDDO   
+                   ELSE
+                      rrtm_h2ovmr(0,nzb+1:nzt+1) = 0.0_wp
+                   ENDIF
+                ENDIF
+
+!
+!--             Avoid temperature/humidity jumps at the top of the LES domain by 
+!--             linear interpolation from nzt+2 to nzt+7
+                DO k = nzt+2, nzt+7
+                   rrtm_tlay(0,k) = rrtm_tlay(0,nzt+1)                         &
+                                 + ( rrtm_tlay(0,nzt+8) - rrtm_tlay(0,nzt+1) ) &
+                                 / ( rrtm_play(0,nzt+8) - rrtm_play(0,nzt+1) ) &
+                                 * ( rrtm_play(0,k)     - rrtm_play(0,nzt+1) )
+
+                   rrtm_h2ovmr(0,k) = rrtm_h2ovmr(0,nzt+1)                     &
+                              + ( rrtm_h2ovmr(0,nzt+8) - rrtm_h2ovmr(0,nzt+1) )&
+                              / ( rrtm_play(0,nzt+8)   - rrtm_play(0,nzt+1)   )&
+                              * ( rrtm_play(0,k)       - rrtm_play(0,nzt+1) )
+
+                ENDDO
+
+!--             Linear interpolate to zw grid
+                DO k = nzb+2, nzt+8
+                   rrtm_tlev(0,k)   = rrtm_tlay(0,k-1) + (rrtm_tlay(0,k) -     &
+                                      rrtm_tlay(0,k-1))                        &
+                                      / ( rrtm_play(0,k) - rrtm_play(0,k-1) )  &
+                                      * ( rrtm_plev(0,k) - rrtm_play(0,k-1) )
+                ENDDO
+
+
+!
+!--             Calculate liquid water path and cloud fraction for each column.
+!--             Note that LWP is required in g/mÂ² instead of kg/kg m.
+                rrtm_cldfr  = 0.0_wp
+                rrtm_reliq  = 0.0_wp
+                rrtm_cliqwp = 0.0_wp
+                rrtm_icld   = 0
+
+                IF ( bulk_cloud_model  .OR.  cloud_droplets )  THEN
+                   DO k = nzb+1, nzt+1
+                      rrtm_cliqwp(0,k) =  ql(k,j,i) * 1000.0_wp *              &
+                                          (rrtm_plev(0,k) - rrtm_plev(0,k+1))  &
+                                          * 100.0_wp / g 
+
+                      IF ( rrtm_cliqwp(0,k) > 0.0_wp )  THEN
+                         rrtm_cldfr(0,k) = 1.0_wp
+                         IF ( rrtm_icld == 0 )  rrtm_icld = 1
+
+!
+!--                      Calculate cloud droplet effective radius
+                         IF ( bulk_cloud_model )  THEN
+!
+!--                         Calculete effective droplet radius. In case of using 
+!--                         cloud_scheme = 'morrison' and a non reasonable number 
+!--                         of cloud droplets the inital aerosol number  
+!--                         concentration is considered.
+                            IF ( microphysics_morrison )  THEN
+                               IF ( nc(k,j,i) > 1.0E-20_wp )  THEN
+                                  nc_rad = nc(k,j,i)
+                               ELSE
+                                  nc_rad = na_init
+                               ENDIF 
+                            ELSE
+                               nc_rad = nc_const
+                            ENDIF  
+
+                            rrtm_reliq(0,k) = 1.0E6_wp * ( 3.0_wp * ql(k,j,i)     &
+                                              * rho_surface                       &
+                                              / ( 4.0_wp * pi * nc_rad * rho_l )  &
+                                              )**0.33333333333333_wp              &
+                                              * EXP( LOG( sigma_gc )**2 )
+
+                         ELSEIF ( cloud_droplets )  THEN
+                            number_of_particles = prt_count(k,j,i)
+
+                            IF (number_of_particles <= 0)  CYCLE
+                            particles => grid_particles(k,j,i)%particles(1:number_of_particles)
+                            s_r2 = 0.0_wp
+                            s_r3 = 0.0_wp
+
+                            DO  n = 1, number_of_particles
+                               IF ( particles(n)%particle_mask )  THEN
+                                  s_r2 = s_r2 + particles(n)%radius**2 *       &
+                                         particles(n)%weight_factor
+                                  s_r3 = s_r3 + particles(n)%radius**3 *       &
+                                         particles(n)%weight_factor
+                               ENDIF
+                            ENDDO
+
+                            IF ( s_r2 > 0.0_wp )  rrtm_reliq(0,k) = s_r3 / s_r2
+
+                         ENDIF
+
+!
+!--                      Limit effective radius
+                         IF ( rrtm_reliq(0,k) > 0.0_wp )  THEN
+                            rrtm_reliq(0,k) = MAX(rrtm_reliq(0,k),2.5_wp)
+                            rrtm_reliq(0,k) = MIN(rrtm_reliq(0,k),60.0_wp)
+                        ENDIF
+                      ENDIF
+                   ENDDO
+                ENDIF
+
+!
+!--             Write surface emissivity and surface temperature at current 
+!--             surface element on RRTMG-shaped array.
+!--             Please note, as RRTMG is a single column model, surface attributes
+!--             are only obtained from horizontally aligned surfaces (for 
+!--             simplicity). Taking surface attributes from horizontal and 
+!--             vertical walls would lead to multiple solutions.  
+!--             Moreover, for natural- and urban-type surfaces, several surface
+!--             classes can exist at a surface element next to each other. 
+!--             To obtain bulk parameters, apply a weighted average for these 
+!--             surfaces. 
+                DO  m = surf_lsm_h%start_index(j,i), surf_lsm_h%end_index(j,i)
+                   rrtm_emis = surf_lsm_h%frac(ind_veg_wall,m)  *              &
+                               surf_lsm_h%emissivity(ind_veg_wall,m)  +        &
+                               surf_lsm_h%frac(ind_pav_green,m) *              &
+                               surf_lsm_h%emissivity(ind_pav_green,m) +        & 
+                               surf_lsm_h%frac(ind_wat_win,m)   *              &
+                               surf_lsm_h%emissivity(ind_wat_win,m)
+                   rrtm_tsfc = surf_lsm_h%pt_surface(m) * exner(nzb)
+                ENDDO             
+                DO  m = surf_usm_h%start_index(j,i), surf_usm_h%end_index(j,i)
+                   rrtm_emis = surf_usm_h%frac(ind_veg_wall,m)  *              &
+                               surf_usm_h%emissivity(ind_veg_wall,m)  +        &
+                               surf_usm_h%frac(ind_pav_green,m) *              &
+                               surf_usm_h%emissivity(ind_pav_green,m) +        & 
+                               surf_usm_h%frac(ind_wat_win,m)   *              &
+                               surf_usm_h%emissivity(ind_wat_win,m)
+                   rrtm_tsfc = surf_usm_h%pt_surface(m) * exner(nzb)
+                ENDDO
+!
+!--             Obtain topography top index (lower bound of RRTMG)
+                k_topo = get_topography_top_index_ji( j, i, 's' )
+
+                IF ( lw_radiation )  THEN
+!
+!--                Due to technical reasons, copy optical depth to dummy arguments
+!--                which are allocated on the exact size as the rrtmg_lw is called.
+!--                As one dimesion is allocated with zero size, compiler complains
+!--                that rank of the array does not match that of the 
+!--                assumed-shaped arguments in the RRTMG library. In order to 
+!--                avoid this, write to dummy arguments and give pass the entire 
+!--                dummy array. Seems to be the only existing work-around.  
+                   ALLOCATE( rrtm_lw_taucld_dum(1:nbndlw+1,0:0,k_topo+1:nzt_rad+1) )
+                   ALLOCATE( rrtm_lw_tauaer_dum(0:0,k_topo+1:nzt_rad+1,1:nbndlw+1) )
+
+                   rrtm_lw_taucld_dum =                                        &
+                               rrtm_lw_taucld(1:nbndlw+1,0:0,k_topo+1:nzt_rad+1)
+                   rrtm_lw_tauaer_dum =                                        &
+                               rrtm_lw_tauaer(0:0,k_topo+1:nzt_rad+1,1:nbndlw+1)
+
+                   CALL rrtmg_lw( 1,                                           &                                        
+                                  nzt_rad-k_topo,                              &
+                                  rrtm_icld,                                   &
+                                  rrtm_idrv,                                   &
+                                  rrtm_play(:,k_topo+1:nzt_rad+1),             &
+                                  rrtm_plev(:,k_topo+1:nzt_rad+2),             &
+                                  rrtm_tlay(:,k_topo+1:nzt_rad+1),             &
+                                  rrtm_tlev(:,k_topo+1:nzt_rad+2),             &
+                                  rrtm_tsfc,                                   &
+                                  rrtm_h2ovmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_o3vmr(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_co2vmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_ch4vmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_n2ovmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_o2vmr(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_cfc11vmr(:,k_topo+1:nzt_rad+1),         &
+                                  rrtm_cfc12vmr(:,k_topo+1:nzt_rad+1),         &
+                                  rrtm_cfc22vmr(:,k_topo+1:nzt_rad+1),         &
+                                  rrtm_ccl4vmr(:,k_topo+1:nzt_rad+1),          &
+                                  rrtm_emis,                                   &
+                                  rrtm_inflglw,                                &
+                                  rrtm_iceflglw,                               &
+                                  rrtm_liqflglw,                               &
+                                  rrtm_cldfr(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_lw_taucld_dum,                          &
+                                  rrtm_cicewp(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_cliqwp(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_reice(:,k_topo+1:nzt_rad+1),            & 
+                                  rrtm_reliq(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_lw_tauaer_dum,                          &
+                                  rrtm_lwuflx(:,k_topo:nzt_rad+1),             &
+                                  rrtm_lwdflx(:,k_topo:nzt_rad+1),             &
+                                  rrtm_lwhr(:,k_topo+1:nzt_rad+1),             &
+                                  rrtm_lwuflxc(:,k_topo:nzt_rad+1),            &
+                                  rrtm_lwdflxc(:,k_topo:nzt_rad+1),            &
+                                  rrtm_lwhrc(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_lwuflx_dt(:,k_topo:nzt_rad+1),          &
+                                  rrtm_lwuflxc_dt(:,k_topo:nzt_rad+1) )
+
+                   DEALLOCATE ( rrtm_lw_taucld_dum )
+                   DEALLOCATE ( rrtm_lw_tauaer_dum )
+!
+!--                Save fluxes
+                   DO k = k_topo, nzt+1
+                      rad_lw_in(k,j,i)  = rrtm_lwdflx(0,k)
+                      rad_lw_out(k,j,i) = rrtm_lwuflx(0,k)
+                   ENDDO
+
+!
+!--                Save heating rates (convert from K/d to K/h)
+                   DO k = k_topo+1, nzt+1
+                      rad_lw_hr(k,j,i)     = rrtm_lwhr(0,k-k_topo)  * d_hours_day
+                      rad_lw_cs_hr(k,j,i)  = rrtm_lwhrc(0,k-k_topo) * d_hours_day
+                   ENDDO
+
+!
+!--                Save surface radiative fluxes and change in LW heating rate 
+!--                onto respective surface elements
+!--                Horizontal surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)
+                      surf_lsm_h%rad_lw_in(m)           = rrtm_lwdflx(0,k_topo)
+                      surf_lsm_h%rad_lw_out(m)          = rrtm_lwuflx(0,k_topo)
+                      surf_lsm_h%rad_lw_out_change_0(m) = rrtm_lwuflx_dt(0,k_topo)
+                   ENDDO             
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)
+                      surf_usm_h%rad_lw_in(m)           = rrtm_lwdflx(0,k_topo)
+                      surf_usm_h%rad_lw_out(m)          = rrtm_lwuflx(0,k_topo)
+                      surf_usm_h%rad_lw_out_change_0(m) = rrtm_lwuflx_dt(0,k_topo)
+                   ENDDO 
+!
+!--                Vertical surfaces. Fluxes are obtain at vertical level of the 
+!--                respective surface element
+                   DO  l = 0, 3
+                      DO  m = surf_lsm_v(l)%start_index(j,i),                  &
+                              surf_lsm_v(l)%end_index(j,i)
+                         k                                    = surf_lsm_v(l)%k(m)
+                         surf_lsm_v(l)%rad_lw_in(m)           = rrtm_lwdflx(0,k)
+                         surf_lsm_v(l)%rad_lw_out(m)          = rrtm_lwuflx(0,k)
+                         surf_lsm_v(l)%rad_lw_out_change_0(m) = rrtm_lwuflx_dt(0,k)
+                      ENDDO             
+                      DO  m = surf_usm_v(l)%start_index(j,i),                  &
+                              surf_usm_v(l)%end_index(j,i)
+                         k                                    = surf_usm_v(l)%k(m)
+                         surf_usm_v(l)%rad_lw_in(m)           = rrtm_lwdflx(0,k)
+                         surf_usm_v(l)%rad_lw_out(m)          = rrtm_lwuflx(0,k)
+                         surf_usm_v(l)%rad_lw_out_change_0(m) = rrtm_lwuflx_dt(0,k)
+                      ENDDO 
+                   ENDDO
+
+                ENDIF
+
+                IF ( sw_radiation .AND. sun_up )  THEN
+!
+!--                Get albedo for direct/diffusive long/shortwave radiation at 
+!--                current (y,x)-location from surface variables. 
+!--                Only obtain it from horizontal surfaces, as RRTMG is a single 
+!--                column model
+!--                (Please note, only one loop will entered, controlled by 
+!--                start-end index.)
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)
+                      rrtm_asdir(1)  = SUM( surf_lsm_h%frac(:,m) *             &
+                                            surf_lsm_h%rrtm_asdir(:,m) )
+                      rrtm_asdif(1)  = SUM( surf_lsm_h%frac(:,m) *             &
+                                            surf_lsm_h%rrtm_asdif(:,m) )
+                      rrtm_aldir(1)  = SUM( surf_lsm_h%frac(:,m) *             &
+                                            surf_lsm_h%rrtm_aldir(:,m) )
+                      rrtm_aldif(1)  = SUM( surf_lsm_h%frac(:,m) *             &
+                                            surf_lsm_h%rrtm_aldif(:,m) )
+                   ENDDO             
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)
+                      rrtm_asdir(1)  = SUM( surf_usm_h%frac(:,m) *             &
+                                            surf_usm_h%rrtm_asdir(:,m) )
+                      rrtm_asdif(1)  = SUM( surf_usm_h%frac(:,m) *             &
+                                            surf_usm_h%rrtm_asdif(:,m) )
+                      rrtm_aldir(1)  = SUM( surf_usm_h%frac(:,m) *             &
+                                            surf_usm_h%rrtm_aldir(:,m) )
+                      rrtm_aldif(1)  = SUM( surf_usm_h%frac(:,m) *             &
+                                            surf_usm_h%rrtm_aldif(:,m) )
+                   ENDDO
+!
+!--                Due to technical reasons, copy optical depths and other 
+!--                to dummy arguments which are allocated on the exact size as the 
+!--                rrtmg_sw is called.
+!--                As one dimesion is allocated with zero size, compiler complains
+!--                that rank of the array does not match that of the 
+!--                assumed-shaped arguments in the RRTMG library. In order to 
+!--                avoid this, write to dummy arguments and give pass the entire 
+!--                dummy array. Seems to be the only existing work-around.  
+                   ALLOCATE( rrtm_sw_taucld_dum(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1) )
+                   ALLOCATE( rrtm_sw_ssacld_dum(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1) )
+                   ALLOCATE( rrtm_sw_asmcld_dum(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1) )
+                   ALLOCATE( rrtm_sw_fsfcld_dum(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1) )
+                   ALLOCATE( rrtm_sw_tauaer_dum(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1) )
+                   ALLOCATE( rrtm_sw_ssaaer_dum(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1) )
+                   ALLOCATE( rrtm_sw_asmaer_dum(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1) )
+                   ALLOCATE( rrtm_sw_ecaer_dum(0:0,k_topo+1:nzt_rad+1,1:naerec+1)  )
+     
+                   rrtm_sw_taucld_dum = rrtm_sw_taucld(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1)
+                   rrtm_sw_ssacld_dum = rrtm_sw_ssacld(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1)
+                   rrtm_sw_asmcld_dum = rrtm_sw_asmcld(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1)
+                   rrtm_sw_fsfcld_dum = rrtm_sw_fsfcld(1:nbndsw+1,0:0,k_topo+1:nzt_rad+1)
+                   rrtm_sw_tauaer_dum = rrtm_sw_tauaer(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1)
+                   rrtm_sw_ssaaer_dum = rrtm_sw_ssaaer(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1)
+                   rrtm_sw_asmaer_dum = rrtm_sw_asmaer(0:0,k_topo+1:nzt_rad+1,1:nbndsw+1)
+                   rrtm_sw_ecaer_dum  = rrtm_sw_ecaer(0:0,k_topo+1:nzt_rad+1,1:naerec+1)
+
+                   CALL rrtmg_sw( 1,                                           &
+                                  nzt_rad-k_topo,                              &
+                                  rrtm_icld,                                   &
+                                  rrtm_iaer,                                   &
+                                  rrtm_play(:,k_topo+1:nzt_rad+1),             &
+                                  rrtm_plev(:,k_topo+1:nzt_rad+2),             &
+                                  rrtm_tlay(:,k_topo+1:nzt_rad+1),             &
+                                  rrtm_tlev(:,k_topo+1:nzt_rad+2),             &
+                                  rrtm_tsfc,                                   &
+                                  rrtm_h2ovmr(:,k_topo+1:nzt_rad+1),           &                               
+                                  rrtm_o3vmr(:,k_topo+1:nzt_rad+1),            &        
+                                  rrtm_co2vmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_ch4vmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_n2ovmr(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_o2vmr(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_asdir,                                  & 
+                                  rrtm_asdif,                                  &
+                                  rrtm_aldir,                                  &
+                                  rrtm_aldif,                                  &
+                                  zenith,                                      &
+                                  0.0_wp,                                      &
+                                  day_of_year,                                 &
+                                  solar_constant,                              &
+                                  rrtm_inflgsw,                                &
+                                  rrtm_iceflgsw,                               &
+                                  rrtm_liqflgsw,                               &
+                                  rrtm_cldfr(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_sw_taucld_dum,                          &
+                                  rrtm_sw_ssacld_dum,                          &
+                                  rrtm_sw_asmcld_dum,                          &
+                                  rrtm_sw_fsfcld_dum,                          &
+                                  rrtm_cicewp(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_cliqwp(:,k_topo+1:nzt_rad+1),           &
+                                  rrtm_reice(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_reliq(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_sw_tauaer_dum,                          &
+                                  rrtm_sw_ssaaer_dum,                          &
+                                  rrtm_sw_asmaer_dum,                          &
+                                  rrtm_sw_ecaer_dum,                           &
+                                  rrtm_swuflx(:,k_topo:nzt_rad+1),             &  
+                                  rrtm_swdflx(:,k_topo:nzt_rad+1),             & 
+                                  rrtm_swhr(:,k_topo+1:nzt_rad+1),             & 
+                                  rrtm_swuflxc(:,k_topo:nzt_rad+1),            & 
+                                  rrtm_swdflxc(:,k_topo:nzt_rad+1),            &
+                                  rrtm_swhrc(:,k_topo+1:nzt_rad+1),            &
+                                  rrtm_dirdflux(:,k_topo:nzt_rad+1),           &
+                                  rrtm_difdflux(:,k_topo:nzt_rad+1) )
+
+                   DEALLOCATE( rrtm_sw_taucld_dum )
+                   DEALLOCATE( rrtm_sw_ssacld_dum )
+                   DEALLOCATE( rrtm_sw_asmcld_dum )
+                   DEALLOCATE( rrtm_sw_fsfcld_dum )
+                   DEALLOCATE( rrtm_sw_tauaer_dum )
+                   DEALLOCATE( rrtm_sw_ssaaer_dum )
+                   DEALLOCATE( rrtm_sw_asmaer_dum )
+                   DEALLOCATE( rrtm_sw_ecaer_dum )
+!
+!--                Save fluxes
+                   DO k = nzb, nzt+1
+                      rad_sw_in(k,j,i)  = rrtm_swdflx(0,k)
+                      rad_sw_out(k,j,i) = rrtm_swuflx(0,k)
+                   ENDDO
+!
+!--                Save heating rates (convert from K/d to K/s)
+                   DO k = nzb+1, nzt+1
+                      rad_sw_hr(k,j,i)     = rrtm_swhr(0,k)  * d_hours_day
+                      rad_sw_cs_hr(k,j,i)  = rrtm_swhrc(0,k) * d_hours_day
+                   ENDDO
+
+!
+!--                Save surface radiative fluxes onto respective surface elements
+!--                Horizontal surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)
+                      surf_lsm_h%rad_sw_in(m)     = rrtm_swdflx(0,k_topo)
+                      surf_lsm_h%rad_sw_out(m)    = rrtm_swuflx(0,k_topo)
+                   ENDDO             
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)
+                      surf_usm_h%rad_sw_in(m)     = rrtm_swdflx(0,k_topo)
+                      surf_usm_h%rad_sw_out(m)    = rrtm_swuflx(0,k_topo)
+                   ENDDO 
+!
+!--                Vertical surfaces. Fluxes are obtain at respective vertical 
+!--                level of the surface element
+                   DO  l = 0, 3
+                      DO  m = surf_lsm_v(l)%start_index(j,i),                  &
+                              surf_lsm_v(l)%end_index(j,i)
+                         k                           = surf_lsm_v(l)%k(m)
+                         surf_lsm_v(l)%rad_sw_in(m)  = rrtm_swdflx(0,k)
+                         surf_lsm_v(l)%rad_sw_out(m) = rrtm_swuflx(0,k)
+                      ENDDO             
+                      DO  m = surf_usm_v(l)%start_index(j,i),                  &
+                              surf_usm_v(l)%end_index(j,i)
+                         k                           = surf_usm_v(l)%k(m)
+                         surf_usm_v(l)%rad_sw_in(m)  = rrtm_swdflx(0,k)
+                         surf_usm_v(l)%rad_sw_out(m) = rrtm_swuflx(0,k)
+                      ENDDO 
+                   ENDDO
+!
+!--             Solar radiation is zero during night
+                ELSE
+                   rad_sw_in  = 0.0_wp
+                   rad_sw_out = 0.0_wp
+!--             !!!!!!!! ATTENSION !!!!!!!!!!!!!!!
+!--             Surface radiative fluxes should be also set to zero here                  
+!--                Save surface radiative fluxes onto respective surface elements
+!--                Horizontal surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)
+                      surf_lsm_h%rad_sw_in(m)     = 0.0_wp
+                      surf_lsm_h%rad_sw_out(m)    = 0.0_wp
+                   ENDDO             
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)
+                      surf_usm_h%rad_sw_in(m)     = 0.0_wp
+                      surf_usm_h%rad_sw_out(m)    = 0.0_wp
+                   ENDDO 
+!
+!--                Vertical surfaces. Fluxes are obtain at respective vertical 
+!--                level of the surface element
+                   DO  l = 0, 3
+                      DO  m = surf_lsm_v(l)%start_index(j,i),                  &
+                              surf_lsm_v(l)%end_index(j,i)
+                         k                           = surf_lsm_v(l)%k(m)
+                         surf_lsm_v(l)%rad_sw_in(m)  = 0.0_wp
+                         surf_lsm_v(l)%rad_sw_out(m) = 0.0_wp
+                      ENDDO             
+                      DO  m = surf_usm_v(l)%start_index(j,i),                  &
+                              surf_usm_v(l)%end_index(j,i)
+                         k                           = surf_usm_v(l)%k(m)
+                         surf_usm_v(l)%rad_sw_in(m)  = 0.0_wp
+                         surf_usm_v(l)%rad_sw_out(m) = 0.0_wp
+                      ENDDO 
+                   ENDDO
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+       ENDIF
+!
+!--    Finally, calculate surface net radiation for surface elements.
+       IF (  .NOT.  radiation_interactions  ) THEN
+!--       First, for horizontal surfaces    
+          DO  m = 1, surf_lsm_h%ns
+             surf_lsm_h%rad_net(m) = surf_lsm_h%rad_sw_in(m)                   &
+                                   - surf_lsm_h%rad_sw_out(m)                  &
+                                   + surf_lsm_h%rad_lw_in(m)                   &
+                                   - surf_lsm_h%rad_lw_out(m)
+          ENDDO
+          DO  m = 1, surf_usm_h%ns
+             surf_usm_h%rad_net(m) = surf_usm_h%rad_sw_in(m)                   &
+                                   - surf_usm_h%rad_sw_out(m)                  &
+                                   + surf_usm_h%rad_lw_in(m)                   &
+                                   - surf_usm_h%rad_lw_out(m)
+          ENDDO
+!
+!--       Vertical surfaces. 
+!--       Todo: weight with azimuth and zenith angle according to their orientation!
+          DO  l = 0, 3     
+             DO  m = 1, surf_lsm_v(l)%ns
+                surf_lsm_v(l)%rad_net(m) = surf_lsm_v(l)%rad_sw_in(m)          &
+                                         - surf_lsm_v(l)%rad_sw_out(m)         &
+                                         + surf_lsm_v(l)%rad_lw_in(m)          &
+                                         - surf_lsm_v(l)%rad_lw_out(m)
+             ENDDO
+             DO  m = 1, surf_usm_v(l)%ns
+                surf_usm_v(l)%rad_net(m) = surf_usm_v(l)%rad_sw_in(m)          &
+                                         - surf_usm_v(l)%rad_sw_out(m)         &
+                                         + surf_usm_v(l)%rad_lw_in(m)          &
+                                         - surf_usm_v(l)%rad_lw_out(m)
+             ENDDO
+          ENDDO
+       ENDIF
+
+
+       CALL exchange_horiz( rad_lw_in,  nbgp )
+       CALL exchange_horiz( rad_lw_out, nbgp )
+       CALL exchange_horiz( rad_lw_hr,    nbgp )
+       CALL exchange_horiz( rad_lw_cs_hr, nbgp )
+
+       CALL exchange_horiz( rad_sw_in,  nbgp )
+       CALL exchange_horiz( rad_sw_out, nbgp ) 
+       CALL exchange_horiz( rad_sw_hr,    nbgp )
+       CALL exchange_horiz( rad_sw_cs_hr, nbgp )
+
+#endif
+
+    END SUBROUTINE radiation_rrtmg
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the cosine of the zenith angle (variable is called zenith)
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_zenith
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  declination,  & !< solar declination angle
+                    hour_angle      !< solar hour angle
+!
+!--    Calculate current day and time based on the initial values and simulation
+!--    time
+       CALL calc_date_and_time
+
+!
+!--    Calculate solar declination and hour angle   
+       declination = ASIN( decl_1 * SIN(decl_2 * REAL(day_of_year, KIND=wp) - decl_3) )
+       hour_angle  = 2.0_wp * pi * (time_utc / 86400.0_wp) + lon - pi
+
+!
+!--    Calculate cosine of solar zenith angle
+       zenith(0) = SIN(lat) * SIN(declination) + COS(lat) * COS(declination)   &
+                                            * COS(hour_angle)
+       zenith(0) = MAX(0.0_wp,zenith(0))
+
+!
+!--    Calculate solar directional vector
+       IF ( sun_direction )  THEN
+
+!
+!--       Direction in longitudes equals to sin(solar_azimuth) * sin(zenith)
+          sun_dir_lon(0) = -SIN(hour_angle) * COS(declination)
+
+!
+!--       Direction in latitues equals to cos(solar_azimuth) * sin(zenith)
+          sun_dir_lat(0) = SIN(declination) * COS(lat) - COS(hour_angle) &
+                              * COS(declination) * SIN(lat)
+       ENDIF
+
+!
+!--    Check if the sun is up (otheriwse shortwave calculations can be skipped)
+       IF ( zenith(0) > 0.0_wp )  THEN
+          sun_up = .TRUE.
+       ELSE
+          sun_up = .FALSE.
+       END IF
+
+    END SUBROUTINE calc_zenith
+
+#if defined ( __rrtmg ) && defined ( __netcdf )
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates surface albedo components based on Briegleb (1992) and 
+!> Briegleb et al. (1986)
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_albedo( surf )
+
+        IMPLICIT NONE
+
+        INTEGER(iwp)    ::  ind_type !< running index surface tiles
+        INTEGER(iwp)    ::  m        !< running index surface elements
+
+        TYPE(surf_type) ::  surf !< treated surfaces
+
+        IF ( sun_up  .AND.  .NOT. average_radiation )  THEN
+
+           DO  m = 1, surf%ns
+!
+!--           Loop over surface elements
+              DO  ind_type = 0, SIZE( surf%albedo_type, 1 ) - 1
+           
+!
+!--              Ocean
+                 IF ( surf%albedo_type(ind_type,m) == 1 )  THEN
+                    surf%rrtm_aldir(ind_type,m) = 0.026_wp /                    &
+                                                ( zenith(0)**1.7_wp + 0.065_wp )&
+                                     + 0.15_wp * ( zenith(0) - 0.1_wp )         &
+                                               * ( zenith(0) - 0.5_wp )         &
+                                               * ( zenith(0) - 1.0_wp )
+                    surf%rrtm_asdir(ind_type,m) = surf%rrtm_aldir(ind_type,m)
+!
+!--              Snow
+                 ELSEIF ( surf%albedo_type(ind_type,m) == 16 )  THEN
+                    IF ( zenith(0) < 0.5_wp )  THEN
+                       surf%rrtm_aldir(ind_type,m) =                           &
+                                 0.5_wp * ( 1.0_wp - surf%aldif(ind_type,m) )  &
+                                        * ( 3.0_wp / ( 1.0_wp + 4.0_wp         &
+                                        * zenith(0) ) ) - 1.0_wp
+                       surf%rrtm_asdir(ind_type,m) =                           &
+                                 0.5_wp * ( 1.0_wp - surf%asdif(ind_type,m) )  &
+                                        * ( 3.0_wp / ( 1.0_wp + 4.0_wp         &
+                                        * zenith(0) ) ) - 1.0_wp
+
+                       surf%rrtm_aldir(ind_type,m) =                           &
+                                       MIN(0.98_wp, surf%rrtm_aldir(ind_type,m))
+                       surf%rrtm_asdir(ind_type,m) =                           &
+                                       MIN(0.98_wp, surf%rrtm_asdir(ind_type,m))
+                    ELSE
+                       surf%rrtm_aldir(ind_type,m) = surf%aldif(ind_type,m)
+                       surf%rrtm_asdir(ind_type,m) = surf%asdif(ind_type,m)
+                    ENDIF
+!
+!--              Sea ice
+                 ELSEIF ( surf%albedo_type(ind_type,m) == 15 )  THEN
+                    surf%rrtm_aldir(ind_type,m) = surf%aldif(ind_type,m)
+                    surf%rrtm_asdir(ind_type,m) = surf%asdif(ind_type,m)
+
+!
+!--              Asphalt
+                 ELSEIF ( surf%albedo_type(ind_type,m) == 17 )  THEN
+                    surf%rrtm_aldir(ind_type,m) = surf%aldif(ind_type,m)
+                    surf%rrtm_asdir(ind_type,m) = surf%asdif(ind_type,m)
+
+
+!
+!--              Bare soil
+                 ELSEIF ( surf%albedo_type(ind_type,m) == 18 )  THEN
+                    surf%rrtm_aldir(ind_type,m) = surf%aldif(ind_type,m)
+                    surf%rrtm_asdir(ind_type,m) = surf%asdif(ind_type,m)
+
+!
+!--              Land surfaces
+                 ELSE
+                    SELECT CASE ( surf%albedo_type(ind_type,m) )
+
+!
+!--                    Surface types with strong zenith dependence
+                       CASE ( 1, 2, 3, 4, 11, 12, 13 )
+                          surf%rrtm_aldir(ind_type,m) =                        &
+                                surf%aldif(ind_type,m) * 1.4_wp /              &
+                                           ( 1.0_wp + 0.8_wp * zenith(0) )
+                          surf%rrtm_asdir(ind_type,m) =                        &
+                                surf%asdif(ind_type,m) * 1.4_wp /              &
+                                           ( 1.0_wp + 0.8_wp * zenith(0) )
+!
+!--                    Surface types with weak zenith dependence
+                       CASE ( 5, 6, 7, 8, 9, 10, 14 )
+                          surf%rrtm_aldir(ind_type,m) =                        &
+                                surf%aldif(ind_type,m) * 1.1_wp /              &
+                                           ( 1.0_wp + 0.2_wp * zenith(0) )
+                          surf%rrtm_asdir(ind_type,m) =                        &
+                                surf%asdif(ind_type,m) * 1.1_wp /              &
+                                           ( 1.0_wp + 0.2_wp * zenith(0) )
+
+                       CASE DEFAULT
+
+                    END SELECT
+                 ENDIF
+!
+!--              Diffusive albedo is taken from Table 2
+                 surf%rrtm_aldif(ind_type,m) = surf%aldif(ind_type,m)
+                 surf%rrtm_asdif(ind_type,m) = surf%asdif(ind_type,m)
+              ENDDO
+           ENDDO
+!
+!--     Set albedo in case of average radiation
+        ELSEIF ( sun_up  .AND.  average_radiation )  THEN
+           surf%rrtm_asdir = albedo_urb
+           surf%rrtm_asdif = albedo_urb
+           surf%rrtm_aldir = albedo_urb
+           surf%rrtm_aldif = albedo_urb  
+!
+!--     Darkness
+        ELSE
+           surf%rrtm_aldir = 0.0_wp
+           surf%rrtm_asdir = 0.0_wp
+           surf%rrtm_aldif = 0.0_wp
+           surf%rrtm_asdif = 0.0_wp
+        ENDIF
+
+    END SUBROUTINE calc_albedo
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read sounding data (pressure and temperature) from RADIATION_DATA.
+!------------------------------------------------------------------------------!
+    SUBROUTINE read_sounding_data
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: id,           & !< NetCDF id of input file
+                       id_dim_zrad,  & !< pressure level id in the NetCDF file
+                       id_var,       & !< NetCDF variable id
+                       k,            & !< loop index
+                       nz_snd,       & !< number of vertical levels in the sounding data
+                       nz_snd_start, & !< start vertical index for sounding data to be used
+                       nz_snd_end      !< end vertical index for souding data to be used
+
+       REAL(wp) :: t_surface           !< actual surface temperature
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  hyp_snd_tmp, & !< temporary hydrostatic pressure profile (sounding)
+                                               t_snd_tmp      !< temporary temperature profile (sounding)
+
+!
+!--    In case of updates, deallocate arrays first (sufficient to check one
+!--    array as the others are automatically allocated). This is required
+!--    because nzt_rad might change during the update
+       IF ( ALLOCATED ( hyp_snd ) )  THEN
+          DEALLOCATE( hyp_snd )
+          DEALLOCATE( t_snd )
+          DEALLOCATE ( rrtm_play )
+          DEALLOCATE ( rrtm_plev )
+          DEALLOCATE ( rrtm_tlay )
+          DEALLOCATE ( rrtm_tlev )
+
+          DEALLOCATE ( rrtm_cicewp )
+          DEALLOCATE ( rrtm_cldfr )
+          DEALLOCATE ( rrtm_cliqwp )
+          DEALLOCATE ( rrtm_reice )
+          DEALLOCATE ( rrtm_reliq )
+          DEALLOCATE ( rrtm_lw_taucld )
+          DEALLOCATE ( rrtm_lw_tauaer )
+
+          DEALLOCATE ( rrtm_lwdflx  )
+          DEALLOCATE ( rrtm_lwdflxc )
+          DEALLOCATE ( rrtm_lwuflx  )
+          DEALLOCATE ( rrtm_lwuflxc )
+          DEALLOCATE ( rrtm_lwuflx_dt )
+          DEALLOCATE ( rrtm_lwuflxc_dt )
+          DEALLOCATE ( rrtm_lwhr  )
+          DEALLOCATE ( rrtm_lwhrc )
+
+          DEALLOCATE ( rrtm_sw_taucld )
+          DEALLOCATE ( rrtm_sw_ssacld )
+          DEALLOCATE ( rrtm_sw_asmcld )
+          DEALLOCATE ( rrtm_sw_fsfcld )
+          DEALLOCATE ( rrtm_sw_tauaer )
+          DEALLOCATE ( rrtm_sw_ssaaer )
+          DEALLOCATE ( rrtm_sw_asmaer ) 
+          DEALLOCATE ( rrtm_sw_ecaer )   
+ 
+          DEALLOCATE ( rrtm_swdflx  )
+          DEALLOCATE ( rrtm_swdflxc )
+          DEALLOCATE ( rrtm_swuflx  )
+          DEALLOCATE ( rrtm_swuflxc )
+          DEALLOCATE ( rrtm_swhr  )
+          DEALLOCATE ( rrtm_swhrc )
+          DEALLOCATE ( rrtm_dirdflux )
+          DEALLOCATE ( rrtm_difdflux )
+
+       ENDIF
+
+!
+!--    Open file for reading
+       nc_stat = NF90_OPEN( rrtm_input_file, NF90_NOWRITE, id )
+       CALL netcdf_handle_error_rad( 'read_sounding_data', 549 )
+
+!
+!--    Inquire dimension of z axis and save in nz_snd
+       nc_stat = NF90_INQ_DIMID( id, "Pressure", id_dim_zrad )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim_zrad, len = nz_snd )
+       CALL netcdf_handle_error_rad( 'read_sounding_data', 551 )
+
+!
+! !--    Allocate temporary array for storing pressure data
+       ALLOCATE( hyp_snd_tmp(1:nz_snd) )
+       hyp_snd_tmp = 0.0_wp
+
+
+!--    Read pressure from file
+       nc_stat = NF90_INQ_VARID( id, "Pressure", id_var )
+       nc_stat = NF90_GET_VAR( id, id_var, hyp_snd_tmp(:), start = (/1/),      &
+                               count = (/nz_snd/) )
+       CALL netcdf_handle_error_rad( 'read_sounding_data', 552 )
+
+!
+!--    Allocate temporary array for storing temperature data
+       ALLOCATE( t_snd_tmp(1:nz_snd) )
+       t_snd_tmp = 0.0_wp
+
+!
+!--    Read temperature from file
+       nc_stat = NF90_INQ_VARID( id, "ReferenceTemperature", id_var )
+       nc_stat = NF90_GET_VAR( id, id_var, t_snd_tmp(:), start = (/1/),        &
+                               count = (/nz_snd/) )
+       CALL netcdf_handle_error_rad( 'read_sounding_data', 553 )
+
+!
+!--    Calculate start of sounding data
+       nz_snd_start = nz_snd + 1
+       nz_snd_end   = nz_snd + 1
+
+!
+!--    Start filling vertical dimension at 10hPa above the model domain (hyp is
+!--    in Pa, hyp_snd in hPa).
+       DO  k = 1, nz_snd
+          IF ( hyp_snd_tmp(k) < ( hyp(nzt+1) - 1000.0_wp) * 0.01_wp )  THEN
+             nz_snd_start = k
+             EXIT
+          END IF
+       END DO
+
+       IF ( nz_snd_start <= nz_snd )  THEN
+          nz_snd_end = nz_snd
+       END IF
+
+
+!
+!--    Calculate of total grid points for RRTMG calculations
+       nzt_rad = nzt + nz_snd_end - nz_snd_start + 1
+
+!
+!--    Save data above LES domain in hyp_snd, t_snd
+       ALLOCATE( hyp_snd(nzb+1:nzt_rad) )
+       ALLOCATE( t_snd(nzb+1:nzt_rad)   )
+       hyp_snd = 0.0_wp
+       t_snd = 0.0_wp
+
+       hyp_snd(nzt+2:nzt_rad) = hyp_snd_tmp(nz_snd_start+1:nz_snd_end)
+       t_snd(nzt+2:nzt_rad)   = t_snd_tmp(nz_snd_start+1:nz_snd_end)
+
+       nc_stat = NF90_CLOSE( id )
+
+!
+!--    Calculate pressure levels on zu and zw grid. Sounding data is added at 
+!--    top of the LES domain. This routine does not consider horizontal or 
+!--    vertical variability of pressure and temperature
+       ALLOCATE ( rrtm_play(0:0,nzb+1:nzt_rad+1)   )
+       ALLOCATE ( rrtm_plev(0:0,nzb+1:nzt_rad+2)   )
+
+       t_surface = pt_surface * exner(nzb)
+       DO k = nzb+1, nzt+1
+          rrtm_play(0,k) = hyp(k) * 0.01_wp
+          rrtm_plev(0,k) = barometric_formula(zw(k-1),                         &
+                              pt_surface * exner(nzb), &
+                              surface_pressure )
+       ENDDO
+
+       DO k = nzt+2, nzt_rad
+          rrtm_play(0,k) = hyp_snd(k)
+          rrtm_plev(0,k) = 0.5_wp * ( rrtm_play(0,k) + rrtm_play(0,k-1) )
+       ENDDO
+       rrtm_plev(0,nzt_rad+1) = MAX( 0.5 * hyp_snd(nzt_rad),                   &
+                                   1.5 * hyp_snd(nzt_rad)                      &
+                                 - 0.5 * hyp_snd(nzt_rad-1) )
+       rrtm_plev(0,nzt_rad+2)  = MIN( 1.0E-4_wp,                               &
+                                      0.25_wp * rrtm_plev(0,nzt_rad+1) )
+
+       rrtm_play(0,nzt_rad+1) = 0.5 * rrtm_plev(0,nzt_rad+1)
+
+!
+!--    Calculate temperature/humidity levels at top of the LES domain. 
+!--    Currently, the temperature is taken from sounding data (might lead to a 
+!--    temperature jump at interface. To do: Humidity is currently not 
+!--    calculated above the LES domain.
+       ALLOCATE ( rrtm_tlay(0:0,nzb+1:nzt_rad+1)   )
+       ALLOCATE ( rrtm_tlev(0:0,nzb+1:nzt_rad+2)   )
+
+       DO k = nzt+8, nzt_rad
+          rrtm_tlay(0,k)   = t_snd(k)
+       ENDDO
+       rrtm_tlay(0,nzt_rad+1) = 2.0_wp * rrtm_tlay(0,nzt_rad)                  &
+                                - rrtm_tlay(0,nzt_rad-1)
+       DO k = nzt+9, nzt_rad+1
+          rrtm_tlev(0,k)   = rrtm_tlay(0,k-1) + (rrtm_tlay(0,k)                &
+                             - rrtm_tlay(0,k-1))                               &
+                             / ( rrtm_play(0,k) - rrtm_play(0,k-1) )           &
+                             * ( rrtm_plev(0,k) - rrtm_play(0,k-1) )
+       ENDDO
+
+       rrtm_tlev(0,nzt_rad+2)   = 2.0_wp * rrtm_tlay(0,nzt_rad+1)              &
+                                  - rrtm_tlev(0,nzt_rad)
+!
+!--    Allocate remaining RRTMG arrays
+       ALLOCATE ( rrtm_cicewp(0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_cldfr(0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_cliqwp(0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_reice(0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_reliq(0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_lw_taucld(1:nbndlw+1,0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_lw_tauaer(0:0,nzb+1:nzt_rad+1,1:nbndlw+1) )
+       ALLOCATE ( rrtm_sw_taucld(1:nbndsw+1,0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_sw_ssacld(1:nbndsw+1,0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_sw_asmcld(1:nbndsw+1,0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_sw_fsfcld(1:nbndsw+1,0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_sw_tauaer(0:0,nzb+1:nzt_rad+1,1:nbndsw+1) )
+       ALLOCATE ( rrtm_sw_ssaaer(0:0,nzb+1:nzt_rad+1,1:nbndsw+1) )
+       ALLOCATE ( rrtm_sw_asmaer(0:0,nzb+1:nzt_rad+1,1:nbndsw+1) ) 
+       ALLOCATE ( rrtm_sw_ecaer(0:0,nzb+1:nzt_rad+1,1:naerec+1) )    
+
+!
+!--    The ice phase is currently not considered in PALM
+       rrtm_cicewp = 0.0_wp
+       rrtm_reice  = 0.0_wp
+
+!
+!--    Set other parameters (move to NAMELIST parameters in the future)
+       rrtm_lw_tauaer = 0.0_wp
+       rrtm_lw_taucld = 0.0_wp
+       rrtm_sw_taucld = 0.0_wp
+       rrtm_sw_ssacld = 0.0_wp
+       rrtm_sw_asmcld = 0.0_wp
+       rrtm_sw_fsfcld = 0.0_wp
+       rrtm_sw_tauaer = 0.0_wp
+       rrtm_sw_ssaaer = 0.0_wp
+       rrtm_sw_asmaer = 0.0_wp
+       rrtm_sw_ecaer  = 0.0_wp
+
+
+       ALLOCATE ( rrtm_swdflx(0:0,nzb:nzt_rad+1)  )
+       ALLOCATE ( rrtm_swuflx(0:0,nzb:nzt_rad+1)  )
+       ALLOCATE ( rrtm_swhr(0:0,nzb+1:nzt_rad+1)  )
+       ALLOCATE ( rrtm_swuflxc(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_swdflxc(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_swhrc(0:0,nzb+1:nzt_rad+1) )
+       ALLOCATE ( rrtm_dirdflux(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_difdflux(0:0,nzb:nzt_rad+1) )
+
+       rrtm_swdflx  = 0.0_wp
+       rrtm_swuflx  = 0.0_wp
+       rrtm_swhr    = 0.0_wp  
+       rrtm_swuflxc = 0.0_wp
+       rrtm_swdflxc = 0.0_wp
+       rrtm_swhrc   = 0.0_wp
+       rrtm_dirdflux = 0.0_wp
+       rrtm_difdflux = 0.0_wp
+
+       ALLOCATE ( rrtm_lwdflx(0:0,nzb:nzt_rad+1)  )
+       ALLOCATE ( rrtm_lwuflx(0:0,nzb:nzt_rad+1)  )
+       ALLOCATE ( rrtm_lwhr(0:0,nzb+1:nzt_rad+1)  )
+       ALLOCATE ( rrtm_lwuflxc(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_lwdflxc(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_lwhrc(0:0,nzb+1:nzt_rad+1) )
+
+       rrtm_lwdflx  = 0.0_wp
+       rrtm_lwuflx  = 0.0_wp
+       rrtm_lwhr    = 0.0_wp  
+       rrtm_lwuflxc = 0.0_wp
+       rrtm_lwdflxc = 0.0_wp
+       rrtm_lwhrc   = 0.0_wp
+
+       ALLOCATE ( rrtm_lwuflx_dt(0:0,nzb:nzt_rad+1) )
+       ALLOCATE ( rrtm_lwuflxc_dt(0:0,nzb:nzt_rad+1) )
+
+       rrtm_lwuflx_dt = 0.0_wp
+       rrtm_lwuflxc_dt = 0.0_wp
+
+    END SUBROUTINE read_sounding_data
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read trace gas data from file
+!------------------------------------------------------------------------------!
+    SUBROUTINE read_trace_gas_data
+
+       USE rrsw_ncpar
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), PARAMETER :: num_trace_gases = 10 !< number of trace gases (absorbers)
+
+       CHARACTER(LEN=5), DIMENSION(num_trace_gases), PARAMETER ::              & !< trace gas names
+           trace_names = (/'O3   ', 'CO2  ', 'CH4  ', 'N2O  ', 'O2   ',        &
+                           'CFC11', 'CFC12', 'CFC22', 'CCL4 ', 'H2O  '/)
+
+       INTEGER(iwp) :: id,     & !< NetCDF id
+                       k,      & !< loop index
+                       m,      & !< loop index
+                       n,      & !< loop index
+                       nabs,   & !< number of absorbers
+                       np,     & !< number of pressure levels
+                       id_abs, & !< NetCDF id of the respective absorber
+                       id_dim, & !< NetCDF id of asborber's dimension
+                       id_var    !< NetCDf id ot the absorber
+
+       REAL(wp) :: p_mls_l, p_mls_u, p_wgt_l, p_wgt_u, p_mls_m
+
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  p_mls,          & !< pressure levels for the absorbers
+                                                 rrtm_play_tmp,  & !< temporary array for pressure zu-levels
+                                                 rrtm_plev_tmp,  & !< temporary array for pressure zw-levels
+                                                 trace_path_tmp    !< temporary array for storing trace gas path data
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  trace_mls,      & !< array for storing the absorber amounts
+                                                 trace_mls_path, & !< array for storing trace gas path data
+                                                 trace_mls_tmp     !< temporary array for storing trace gas data
+
+
+!
+!--    In case of updates, deallocate arrays first (sufficient to check one
+!--    array as the others are automatically allocated)
+       IF ( ALLOCATED ( rrtm_o3vmr ) )  THEN
+          DEALLOCATE ( rrtm_o3vmr  )
+          DEALLOCATE ( rrtm_co2vmr )
+          DEALLOCATE ( rrtm_ch4vmr )
+          DEALLOCATE ( rrtm_n2ovmr )
+          DEALLOCATE ( rrtm_o2vmr  )
+          DEALLOCATE ( rrtm_cfc11vmr )
+          DEALLOCATE ( rrtm_cfc12vmr )
+          DEALLOCATE ( rrtm_cfc22vmr )
+          DEALLOCATE ( rrtm_ccl4vmr  )
+          DEALLOCATE ( rrtm_h2ovmr  )     
+       ENDIF
+
+!
+!--    Allocate trace gas profiles
+       ALLOCATE ( rrtm_o3vmr(0:0,1:nzt_rad+1)  )
+       ALLOCATE ( rrtm_co2vmr(0:0,1:nzt_rad+1) )
+       ALLOCATE ( rrtm_ch4vmr(0:0,1:nzt_rad+1) )
+       ALLOCATE ( rrtm_n2ovmr(0:0,1:nzt_rad+1) )
+       ALLOCATE ( rrtm_o2vmr(0:0,1:nzt_rad+1)  )
+       ALLOCATE ( rrtm_cfc11vmr(0:0,1:nzt_rad+1) )
+       ALLOCATE ( rrtm_cfc12vmr(0:0,1:nzt_rad+1) )
+       ALLOCATE ( rrtm_cfc22vmr(0:0,1:nzt_rad+1) )
+       ALLOCATE ( rrtm_ccl4vmr(0:0,1:nzt_rad+1)  )
+       ALLOCATE ( rrtm_h2ovmr(0:0,1:nzt_rad+1)  )
+
+!
+!--    Open file for reading
+       nc_stat = NF90_OPEN( rrtm_input_file, NF90_NOWRITE, id )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 549 )
+!
+!--    Inquire dimension ids and dimensions
+       nc_stat = NF90_INQ_DIMID( id, "Pressure", id_dim )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim, len = np) 
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+
+       nc_stat = NF90_INQ_DIMID( id, "Absorber", id_dim )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim, len = nabs ) 
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+   
+
+!
+!--    Allocate pressure, and trace gas arrays     
+       ALLOCATE( p_mls(1:np) )
+       ALLOCATE( trace_mls(1:num_trace_gases,1:np) ) 
+       ALLOCATE( trace_mls_tmp(1:nabs,1:np) ) 
+
+
+       nc_stat = NF90_INQ_VARID( id, "Pressure", id_var )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+       nc_stat = NF90_GET_VAR( id, id_var, p_mls )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+
+       nc_stat = NF90_INQ_VARID( id, "AbsorberAmountMLS", id_var )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+       nc_stat = NF90_GET_VAR( id, id_var, trace_mls_tmp )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 550 )
+
+
+!
+!--    Write absorber amounts (mls) to trace_mls
+       DO n = 1, num_trace_gases
+          CALL getAbsorberIndex( TRIM( trace_names(n) ), id_abs )
+
+          trace_mls(n,1:np) = trace_mls_tmp(id_abs,1:np)
+
+!
+!--       Replace missing values by zero
+          WHERE ( trace_mls(n,:) > 2.0_wp )  
+             trace_mls(n,:) = 0.0_wp
+          END WHERE
+       END DO
+
+       DEALLOCATE ( trace_mls_tmp )
+
+       nc_stat = NF90_CLOSE( id )
+       CALL netcdf_handle_error_rad( 'read_trace_gas_data', 551 )
+
+!
+!--    Add extra pressure level for calculations of the trace gas paths
+       ALLOCATE ( rrtm_play_tmp(1:nzt_rad+1) )
+       ALLOCATE ( rrtm_plev_tmp(1:nzt_rad+2) )
+
+       rrtm_play_tmp(1:nzt_rad)   = rrtm_play(0,1:nzt_rad) 
+       rrtm_plev_tmp(1:nzt_rad+1) = rrtm_plev(0,1:nzt_rad+1)
+       rrtm_play_tmp(nzt_rad+1)   = rrtm_plev(0,nzt_rad+1) * 0.5_wp
+       rrtm_plev_tmp(nzt_rad+2)   = MIN( 1.0E-4_wp, 0.25_wp                    &
+                                         * rrtm_plev(0,nzt_rad+1) )
+ 
+!
+!--    Calculate trace gas path (zero at surface) with interpolation to the
+!--    sounding levels
+       ALLOCATE ( trace_mls_path(1:nzt_rad+2,1:num_trace_gases) )
+
+       trace_mls_path(nzb+1,:) = 0.0_wp
+       
+       DO k = nzb+2, nzt_rad+2
+          DO m = 1, num_trace_gases
+             trace_mls_path(k,m) = trace_mls_path(k-1,m)
+
+!
+!--          When the pressure level is higher than the trace gas pressure
+!--          level, assume that 
+             IF ( rrtm_plev_tmp(k-1) > p_mls(1) )  THEN             
+                
+                trace_mls_path(k,m) = trace_mls_path(k,m) + trace_mls(m,1)     &
+                                      * ( rrtm_plev_tmp(k-1)                   &
+                                          - MAX( p_mls(1), rrtm_plev_tmp(k) )  &
+                                        ) / g
+             ENDIF
+
+!
+!--          Integrate for each sounding level from the contributing p_mls 
+!--          levels
+             DO n = 2, np
+!
+!--             Limit p_mls so that it is within the model level
+                p_mls_u = MIN( rrtm_plev_tmp(k-1),                             &
+                          MAX( rrtm_plev_tmp(k), p_mls(n) ) )
+                p_mls_l = MIN( rrtm_plev_tmp(k-1),                             &
+                          MAX( rrtm_plev_tmp(k), p_mls(n-1) ) )
+
+                IF ( p_mls_l > p_mls_u )  THEN
+
+!
+!--                Calculate weights for interpolation
+                   p_mls_m = 0.5_wp * (p_mls_l + p_mls_u)
+                   p_wgt_u = (p_mls(n-1) - p_mls_m) / (p_mls(n-1) - p_mls(n))
+                   p_wgt_l = (p_mls_m - p_mls(n))   / (p_mls(n-1) - p_mls(n))
+
+!
+!--                Add level to trace gas path
+                   trace_mls_path(k,m) = trace_mls_path(k,m)                   &
+                                         +  ( p_wgt_u * trace_mls(m,n)         &
+                                            + p_wgt_l * trace_mls(m,n-1) )     &
+                                         * (p_mls_l - p_mls_u) / g
+                ENDIF
+             ENDDO
+
+             IF ( rrtm_plev_tmp(k) < p_mls(np) )  THEN 
+                trace_mls_path(k,m) = trace_mls_path(k,m) + trace_mls(m,np)    &
+                                      * ( MIN( rrtm_plev_tmp(k-1), p_mls(np) ) &
+                                          - rrtm_plev_tmp(k)                   &
+                                        ) / g 
+             ENDIF  
+          ENDDO
+       ENDDO
+
+
+!
+!--    Prepare trace gas path profiles
+       ALLOCATE ( trace_path_tmp(1:nzt_rad+1) )
+
+       DO m = 1, num_trace_gases
+
+          trace_path_tmp(1:nzt_rad+1) = ( trace_mls_path(2:nzt_rad+2,m)        &
+                                       - trace_mls_path(1:nzt_rad+1,m) ) * g   &
+                                       / ( rrtm_plev_tmp(1:nzt_rad+1)          &
+                                       - rrtm_plev_tmp(2:nzt_rad+2) )
+
+!
+!--       Save trace gas paths to the respective arrays
+          SELECT CASE ( TRIM( trace_names(m) ) )
+
+             CASE ( 'O3' )
+
+                rrtm_o3vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'CO2' )
+
+                rrtm_co2vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'CH4' )
+
+                rrtm_ch4vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'N2O' )
+
+                rrtm_n2ovmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'O2' )
+
+                rrtm_o2vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'CFC11' )
+
+                rrtm_cfc11vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'CFC12' )
+
+                rrtm_cfc12vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'CFC22' )
+
+                rrtm_cfc22vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'CCL4' )
+
+                rrtm_ccl4vmr(0,:) = trace_path_tmp(:)
+
+             CASE ( 'H2O' )
+
+                rrtm_h2ovmr(0,:) = trace_path_tmp(:)
+                
+             CASE DEFAULT
+
+          END SELECT
+
+       ENDDO
+
+       DEALLOCATE ( trace_path_tmp )
+       DEALLOCATE ( trace_mls_path )
+       DEALLOCATE ( rrtm_play_tmp )
+       DEALLOCATE ( rrtm_plev_tmp )
+       DEALLOCATE ( trace_mls )
+       DEALLOCATE ( p_mls )
+
+    END SUBROUTINE read_trace_gas_data
+
+
+    SUBROUTINE netcdf_handle_error_rad( routine_name, errno )
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       USE NETCDF
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=6) ::  message_identifier
+       CHARACTER(LEN=*) ::  routine_name
+
+       INTEGER(iwp) ::  errno
+
+       IF ( nc_stat /= NF90_NOERR )  THEN
+
+          WRITE( message_identifier, '(''NC'',I4.4)' )  errno
+          message_string = TRIM( NF90_STRERROR( nc_stat ) )
+
+          CALL message( routine_name, message_identifier, 2, 2, 0, 6, 1 )
+
+       ENDIF
+
+    END SUBROUTINE netcdf_handle_error_rad
+#endif
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate temperature tendency due to radiative cooling/heating.
+!> Cache-optimized version.
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_tendency_ij ( i, j, tend )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i, j, k !< loop indices
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: tend !< pt tendency term
+
+    IF ( radiation_scheme == 'rrtmg' )  THEN
+#if defined  ( __rrtmg )
+!
+!--    Calculate tendency based on heating rate
+       DO k = nzb+1, nzt+1
+          tend(k,j,i) = tend(k,j,i) + (rad_lw_hr(k,j,i) + rad_sw_hr(k,j,i))    &
+                                         * d_exner(k) * d_seconds_hour
+       ENDDO
+#endif
+    ENDIF
+
+    END SUBROUTINE radiation_tendency_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate temperature tendency due to radiative cooling/heating.
+!> Vector-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_tendency ( tend )
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i, j, k !< loop indices
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: tend !< pt tendency term
+
+    IF ( radiation_scheme == 'rrtmg' )  THEN
+#if defined  ( __rrtmg )
+!
+!--    Calculate tendency based on heating rate
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO k = nzb+1, nzt+1
+                tend(k,j,i) = tend(k,j,i) + ( rad_lw_hr(k,j,i)                 &
+                                          +  rad_sw_hr(k,j,i) ) * d_exner(k)   &
+                                          * d_seconds_hour
+             ENDDO
+          ENDDO
+       ENDDO
+#endif
+    ENDIF
+
+
+ END SUBROUTINE radiation_tendency
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine calculates interaction of the solar radiation
+!> with urban and land surfaces and updates all surface heatfluxes.
+!> It calculates also the required parameters for RRTMG lower BC.
+!>
+!> For more info. see Resler et al. 2017
+!>
+!> The new version 2.0 was radically rewriten, the discretization scheme
+!> has been changed. This new version significantly improves effectivity
+!> of the paralelization and the scalability of the model.
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE radiation_interaction
+
+     IMPLICIT NONE
+
+     INTEGER(iwp)                      :: i, j, k, kk, is, js, d, ku, refstep, m, mm, l, ll
+     INTEGER(iwp)                      :: isurf, isurfsrc, isvf, icsf, ipcgb
+     INTEGER(iwp)                      :: imrt, imrtf
+     INTEGER(iwp)                      :: isd                !< solar direction number
+     INTEGER(iwp)                      :: pc_box_dimshift    !< transform for best accuracy
+     INTEGER(iwp), DIMENSION(0:3)      :: reorder = (/ 1, 0, 3, 2 /)
+     
+     REAL(wp), DIMENSION(3,3)          :: mrot               !< grid rotation matrix (zyx)
+     REAL(wp), DIMENSION(3,0:nsurf_type):: vnorm             !< face direction normal vectors (zyx)
+     REAL(wp), DIMENSION(3)            :: sunorig            !< grid rotated solar direction unit vector (zyx)
+     REAL(wp), DIMENSION(3)            :: sunorig_grid       !< grid squashed solar direction unit vector (zyx)
+     REAL(wp), DIMENSION(0:nsurf_type) :: costheta           !< direct irradiance factor of solar angle
+     REAL(wp), DIMENSION(nzub:nzut)    :: pchf_prep          !< precalculated factor for canopy temperature tendency
+     REAL(wp), PARAMETER               :: alpha = 0._wp      !< grid rotation (TODO: add to namelist or remove)
+     REAL(wp)                          :: pc_box_area, pc_abs_frac, pc_abs_eff
+     REAL(wp)                          :: asrc               !< area of source face
+     REAL(wp)                          :: pcrad              !< irradiance from plant canopy
+     REAL(wp)                          :: pabsswl  = 0.0_wp  !< total absorbed SW radiation energy in local processor (W)
+     REAL(wp)                          :: pabssw   = 0.0_wp  !< total absorbed SW radiation energy in all processors (W)
+     REAL(wp)                          :: pabslwl  = 0.0_wp  !< total absorbed LW radiation energy in local processor (W)
+     REAL(wp)                          :: pabslw   = 0.0_wp  !< total absorbed LW radiation energy in all processors (W)
+     REAL(wp)                          :: pemitlwl = 0.0_wp  !< total emitted LW radiation energy in all processors (W)
+     REAL(wp)                          :: pemitlw  = 0.0_wp  !< total emitted LW radiation energy in all processors (W)
+     REAL(wp)                          :: pinswl   = 0.0_wp  !< total received SW radiation energy in local processor (W)
+     REAL(wp)                          :: pinsw    = 0.0_wp  !< total received SW radiation energy in all processor (W)
+     REAL(wp)                          :: pinlwl   = 0.0_wp  !< total received LW radiation energy in local processor (W)
+     REAL(wp)                          :: pinlw    = 0.0_wp  !< total received LW radiation energy in all processor (W)
+     REAL(wp)                          :: emiss_sum_surfl    !< sum of emissisivity of surfaces in local processor
+     REAL(wp)                          :: emiss_sum_surf     !< sum of emissisivity of surfaces in all processor
+     REAL(wp)                          :: area_surfl         !< total area of surfaces in local processor
+     REAL(wp)                          :: area_surf          !< total area of surfaces in all processor
+     REAL(wp)                          :: area_hor           !< total horizontal area of domain in all processor
+
+#if ! defined( __nopointer )
+     IF ( plant_canopy )  THEN
+         pchf_prep(:) = r_d * exner(nzub:nzut)                                 &
+                     / (c_p * hyp(nzub:nzut) * dx*dy*dz(1)) !< equals to 1 / (rho * c_p * Vbox * T)
+     ENDIF
+#endif
+     sun_direction = .TRUE.
+     CALL calc_zenith  !< required also for diffusion radiation
+
+!--     prepare rotated normal vectors and irradiance factor
+     vnorm(1,:) = kdir(:)
+     vnorm(2,:) = jdir(:)
+     vnorm(3,:) = idir(:)
+     mrot(1, :) = (/ 1._wp,  0._wp,      0._wp      /)
+     mrot(2, :) = (/ 0._wp,  COS(alpha), SIN(alpha) /)
+     mrot(3, :) = (/ 0._wp, -SIN(alpha), COS(alpha) /)
+     sunorig = (/ zenith(0), sun_dir_lat, sun_dir_lon /)
+     sunorig = MATMUL(mrot, sunorig)
+     DO d = 0, nsurf_type
+         costheta(d) = DOT_PRODUCT(sunorig, vnorm(:,d))
+     ENDDO
+
+     IF ( zenith(0) > 0 )  THEN
+!--      now we will "squash" the sunorig vector by grid box size in
+!--      each dimension, so that this new direction vector will allow us
+!--      to traverse the ray path within grid coordinates directly
+         sunorig_grid = (/ sunorig(1)/dz(1), sunorig(2)/dy, sunorig(3)/dx /)
+!--      sunorig_grid = sunorig_grid / norm2(sunorig_grid)
+         sunorig_grid = sunorig_grid / SQRT(SUM(sunorig_grid**2))
+
+         IF ( npcbl > 0 )  THEN
+!--         precompute effective box depth with prototype Leaf Area Density
+            pc_box_dimshift = MAXLOC(ABS(sunorig), 1) - 1
+            CALL box_absorb(CSHIFT((/dz(1),dy,dx/), pc_box_dimshift),       &
+                                60, prototype_lad,                          &
+                                CSHIFT(ABS(sunorig), pc_box_dimshift),      &
+                                pc_box_area, pc_abs_frac)
+            pc_box_area = pc_box_area * ABS(sunorig(pc_box_dimshift+1)      &
+                          / sunorig(1))
+            pc_abs_eff = LOG(1._wp - pc_abs_frac) / prototype_lad
+         ENDIF
+     ENDIF
+
+!--  if radiation scheme is not RRTMG, split diffusion and direct part of the solar downward radiation
+!--  comming from radiation model and store it in 2D arrays
+     IF (  radiation_scheme /= 'rrtmg'  )  CALL calc_diffusion_radiation
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!--     First pass: direct + diffuse irradiance + thermal
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+     surfinswdir   = 0._wp !nsurfl
+     surfins       = 0._wp !nsurfl
+     surfinl       = 0._wp !nsurfl
+     surfoutsl(:)  = 0.0_wp !start-end
+     surfoutll(:)  = 0.0_wp !start-end
+     IF ( nmrtbl > 0 )  THEN
+        mrtinsw(:) = 0._wp
+        mrtinlw(:) = 0._wp
+     ENDIF
+     surfinlg(:)  = 0._wp !global
+
+
+!--  Set up thermal radiation from surfaces
+!--  emiss_surf is defined only for surfaces for which energy balance is calculated
+!--  Workaround: reorder surface data type back on 1D array including all surfaces,
+!--  which implies to reorder horizontal and vertical surfaces
+!
+!--  Horizontal walls
+     mm = 1
+     DO  i = nxl, nxr
+        DO  j = nys, nyn
+!--           urban
+           DO  m = surf_usm_h%start_index(j,i), surf_usm_h%end_index(j,i)
+              surfoutll(mm) = SUM ( surf_usm_h%frac(:,m) *                  &
+                                    surf_usm_h%emissivity(:,m) )            &
+                                  * sigma_sb                                &
+                                  * surf_usm_h%pt_surface(m)**4
+              albedo_surf(mm) = SUM ( surf_usm_h%frac(:,m) *                &
+                                      surf_usm_h%albedo(:,m) )
+              emiss_surf(mm)  = SUM ( surf_usm_h%frac(:,m) *                &
+                                      surf_usm_h%emissivity(:,m) )
+              mm = mm + 1
+           ENDDO
+!--           land
+           DO  m = surf_lsm_h%start_index(j,i), surf_lsm_h%end_index(j,i)
+              surfoutll(mm) = SUM ( surf_lsm_h%frac(:,m) *                  &
+                                    surf_lsm_h%emissivity(:,m) )            &
+                                  * sigma_sb                                &
+                                  * surf_lsm_h%pt_surface(m)**4
+              albedo_surf(mm) = SUM ( surf_lsm_h%frac(:,m) *                &
+                                      surf_lsm_h%albedo(:,m) )
+              emiss_surf(mm)  = SUM ( surf_lsm_h%frac(:,m) *                &
+                                      surf_lsm_h%emissivity(:,m) )
+              mm = mm + 1
+           ENDDO
+        ENDDO
+     ENDDO
+!
+!--     Vertical walls
+     DO  i = nxl, nxr
+        DO  j = nys, nyn
+           DO  ll = 0, 3
+              l = reorder(ll)
+!--              urban
+              DO  m = surf_usm_v(l)%start_index(j,i),                       &
+                      surf_usm_v(l)%end_index(j,i)
+                 surfoutll(mm) = SUM ( surf_usm_v(l)%frac(:,m) *            &
+                                       surf_usm_v(l)%emissivity(:,m) )      &
+                                  * sigma_sb                                &
+                                  * surf_usm_v(l)%pt_surface(m)**4
+                 albedo_surf(mm) = SUM ( surf_usm_v(l)%frac(:,m) *          &
+                                         surf_usm_v(l)%albedo(:,m) )
+                 emiss_surf(mm)  = SUM ( surf_usm_v(l)%frac(:,m) *          &
+                                         surf_usm_v(l)%emissivity(:,m) )
+                 mm = mm + 1
+              ENDDO
+!--              land
+              DO  m = surf_lsm_v(l)%start_index(j,i),                       &
+                      surf_lsm_v(l)%end_index(j,i)
+                 surfoutll(mm) = SUM ( surf_lsm_v(l)%frac(:,m) *            &
+                                       surf_lsm_v(l)%emissivity(:,m) )      &
+                                  * sigma_sb                                &
+                                  * surf_lsm_v(l)%pt_surface(m)**4
+                 albedo_surf(mm) = SUM ( surf_lsm_v(l)%frac(:,m) *          &
+                                         surf_lsm_v(l)%albedo(:,m) )
+                 emiss_surf(mm)  = SUM ( surf_lsm_v(l)%frac(:,m) *          &
+                                         surf_lsm_v(l)%emissivity(:,m) )
+                 mm = mm + 1
+              ENDDO
+           ENDDO
+        ENDDO
+     ENDDO
+
+#if defined( __parallel )
+!--     might be optimized and gather only values relevant for current processor
+     CALL MPI_AllGatherv(surfoutll, nsurfl, MPI_REAL, &
+                         surfoutl, nsurfs, surfstart, MPI_REAL, comm2d, ierr) !nsurf global
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllGatherv1:', ierr, SIZE(surfoutll), nsurfl, &
+                     SIZE(surfoutl), nsurfs, surfstart
+         FLUSH(9)
+     ENDIF
+#else
+     surfoutl(:) = surfoutll(:) !nsurf global
+#endif
+
+     IF ( surface_reflections)  THEN
+        DO  isvf = 1, nsvfl
+           isurf = svfsurf(1, isvf)
+           k     = surfl(iz, isurf)
+           j     = surfl(iy, isurf)
+           i     = surfl(ix, isurf)
+           isurfsrc = svfsurf(2, isvf)
+!
+!--        For surface-to-surface factors we calculate thermal radiation in 1st pass
+           IF ( plant_lw_interact )  THEN
+              surfinl(isurf) = surfinl(isurf) + svf(1,isvf) * svf(2,isvf) * surfoutl(isurfsrc)
+           ELSE
+              surfinl(isurf) = surfinl(isurf) + svf(1,isvf) * surfoutl(isurfsrc)
+           ENDIF
+        ENDDO
+     ENDIF
+!
+!--  diffuse radiation using sky view factor
+     DO isurf = 1, nsurfl
+        j = surfl(iy, isurf)
+        i = surfl(ix, isurf)
+        surfinswdif(isurf) = rad_sw_in_diff(j,i) * skyvft(isurf)
+        IF ( plant_lw_interact )  THEN
+           surfinlwdif(isurf) = rad_lw_in_diff(j,i) * skyvft(isurf)
+        ELSE
+           surfinlwdif(isurf) = rad_lw_in_diff(j,i) * skyvf(isurf)
+        ENDIF
+     ENDDO
+!
+!--  MRT diffuse irradiance
+     DO  imrt = 1, nmrtbl
+        j = mrtbl(iy, imrt)
+        i = mrtbl(ix, imrt)
+        mrtinsw(imrt) = mrtskyt(imrt) * rad_sw_in_diff(j,i)
+        mrtinlw(imrt) = mrtsky(imrt) * rad_lw_in_diff(j,i)
+     ENDDO
+
+     !-- direct radiation
+     IF ( zenith(0) > 0 )  THEN
+        !--Identify solar direction vector (discretized number) 1)
+        !--
+        j = FLOOR(ACOS(zenith(0)) / pi * raytrace_discrete_elevs)
+        i = MODULO(NINT(ATAN2(sun_dir_lon(0), sun_dir_lat(0))               &
+                        / (2._wp*pi) * raytrace_discrete_azims-.5_wp, iwp), &
+                   raytrace_discrete_azims)
+        isd = dsidir_rev(j, i)
+        DO isurf = 1, nsurfl
+           j = surfl(iy, isurf)
+           i = surfl(ix, isurf)
+           surfinswdir(isurf) = rad_sw_in_dir(j,i) *                        &
+                costheta(surfl(id, isurf)) * dsitrans(isurf, isd) / zenith(0)
+        ENDDO
+!
+!--     MRT direct irradiance
+        DO  imrt = 1, nmrtbl
+           j = mrtbl(iy, imrt)
+           i = mrtbl(ix, imrt)
+           mrtinsw(imrt) = mrtinsw(imrt) + mrtdsit(imrt, isd) * rad_sw_in_dir(j,i) &
+                                     / zenith(0) / 4._wp ! normal to sphere
+        ENDDO
+     ENDIF
+!
+!--  MRT first pass thermal
+     DO  imrtf = 1, nmrtf
+        imrt = mrtfsurf(1, imrtf)
+        isurfsrc = mrtfsurf(2, imrtf)
+        mrtinlw(imrt) = mrtinlw(imrt) + mrtf(imrtf) * surfoutl(isurfsrc)
+     ENDDO
+
+     IF ( npcbl > 0 )  THEN
+
+         pcbinswdir(:) = 0._wp
+         pcbinswdif(:) = 0._wp
+         pcbinlw(:) = 0._wp
+!
+!--      pcsf first pass
+         DO icsf = 1, ncsfl
+             ipcgb = csfsurf(1, icsf)
+             i = pcbl(ix,ipcgb)
+             j = pcbl(iy,ipcgb)
+             k = pcbl(iz,ipcgb)
+             isurfsrc = csfsurf(2, icsf)
+
+             IF ( isurfsrc == -1 )  THEN
+!
+!--             Diffuse rad from sky.
+                pcbinswdif(ipcgb) = csf(1,icsf) * rad_sw_in_diff(j,i)
+!
+!--             Absorbed diffuse LW from sky minus emitted to sky
+                IF ( plant_lw_interact )  THEN
+                   pcbinlw(ipcgb) = csf(1,icsf)                                  &
+                                       * (rad_lw_in_diff(j, i)                   &
+                                          - sigma_sb * (pt(k,j,i)*exner(k))**4)
+                ENDIF
+!
+!--             Direct rad
+                IF ( zenith(0) > 0 )  THEN
+!--                Estimate directed box absorption
+                   pc_abs_frac = 1._wp - exp(pc_abs_eff * lad_s(k,j,i))
+!
+!--                isd has already been established, see 1)
+                   pcbinswdir(ipcgb) = rad_sw_in_dir(j, i) * pc_box_area &
+                                       * pc_abs_frac * dsitransc(ipcgb, isd)
+                ENDIF
+             ELSE
+                IF ( plant_lw_interact )  THEN
+!
+!--                Thermal emission from plan canopy towards respective face
+                   pcrad = sigma_sb * (pt(k,j,i) * exner(k))**4 * csf(1,icsf)
+                   surfinlg(isurfsrc) = surfinlg(isurfsrc) + pcrad
+!
+!--                Remove the flux above + absorb LW from first pass from surfaces
+                   asrc = facearea(surf(id, isurfsrc))
+                   pcbinlw(ipcgb) = pcbinlw(ipcgb)                      &
+                                    + (csf(1,icsf) * surfoutl(isurfsrc) & ! Absorb from first pass surf emit
+                                       - pcrad)                         & ! Remove emitted heatflux
+                                    * asrc
+                ENDIF
+             ENDIF
+         ENDDO
+
+         pcbinsw(:) = pcbinswdir(:) + pcbinswdif(:)
+     ENDIF
+
+     IF ( plant_lw_interact )  THEN
+!
+!--     Exchange incoming lw radiation from plant canopy
+#if defined( __parallel )
+        CALL MPI_Allreduce(MPI_IN_PLACE, surfinlg, nsurf, MPI_REAL, MPI_SUM, comm2d, ierr)
+        IF ( ierr /= 0 )  THEN
+           WRITE (9,*) 'Error MPI_Allreduce:', ierr
+           FLUSH(9)
+        ENDIF
+        surfinl(:) = surfinl(:) + surfinlg(surfstart(myid)+1:surfstart(myid+1))
+#else
+        surfinl(:) = surfinl(:) + surfinlg(:)
+#endif
+     ENDIF
+
+     surfins = surfinswdir + surfinswdif
+     surfinl = surfinl + surfinlwdif
+     surfinsw = surfins
+     surfinlw = surfinl
+     surfoutsw = 0.0_wp
+     surfoutlw = surfoutll
+     surfemitlwl = surfoutll
+
+     IF ( .NOT.  surface_reflections )  THEN
+!
+!--     Set nrefsteps to 0 to disable reflections        
+        nrefsteps = 0
+        surfoutsl = albedo_surf * surfins
+        surfoutll = (1._wp - emiss_surf) * surfinl
+        surfoutsw = surfoutsw + surfoutsl
+        surfoutlw = surfoutlw + surfoutll
+     ENDIF
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!--     Next passes - reflections
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+     DO refstep = 1, nrefsteps
+
+         surfoutsl = albedo_surf * surfins
+!--         for non-transparent surfaces, longwave albedo is 1 - emissivity
+         surfoutll = (1._wp - emiss_surf) * surfinl
+
+#if defined( __parallel )
+         CALL MPI_AllGatherv(surfoutsl, nsurfl, MPI_REAL, &
+             surfouts, nsurfs, surfstart, MPI_REAL, comm2d, ierr)
+         IF ( ierr /= 0 ) THEN
+             WRITE(9,*) 'Error MPI_AllGatherv2:', ierr, SIZE(surfoutsl), nsurfl, &
+                        SIZE(surfouts), nsurfs, surfstart
+             FLUSH(9)
+         ENDIF
+
+         CALL MPI_AllGatherv(surfoutll, nsurfl, MPI_REAL, &
+             surfoutl, nsurfs, surfstart, MPI_REAL, comm2d, ierr)
+         IF ( ierr /= 0 ) THEN
+             WRITE(9,*) 'Error MPI_AllGatherv3:', ierr, SIZE(surfoutll), nsurfl, &
+                        SIZE(surfoutl), nsurfs, surfstart
+             FLUSH(9)
+         ENDIF
+
+#else
+         surfouts = surfoutsl
+         surfoutl = surfoutll
+#endif
+
+!--         reset for next pass input
+         surfins = 0._wp
+         surfinl = 0._wp
+
+!--         reflected radiation
+         DO isvf = 1, nsvfl
+             isurf = svfsurf(1, isvf)
+             isurfsrc = svfsurf(2, isvf)
+             surfins(isurf) = surfins(isurf) + svf(1,isvf) * svf(2,isvf) * surfouts(isurfsrc)
+             IF ( plant_lw_interact )  THEN
+                surfinl(isurf) = surfinl(isurf) + svf(1,isvf) * svf(2,isvf) * surfoutl(isurfsrc)
+             ELSE
+                surfinl(isurf) = surfinl(isurf) + svf(1,isvf) * surfoutl(isurfsrc)
+             ENDIF
+         ENDDO
+!
+!--      NOTE: PC absorbtion and MRT from reflected can both be done at once
+!--      after all reflections if we do one more MPI_ALLGATHERV on surfout.
+!--      Advantage: less local computation. Disadvantage: one more collective
+!--      MPI call.
+!
+!--      Radiation absorbed by plant canopy
+         DO  icsf = 1, ncsfl
+             ipcgb = csfsurf(1, icsf)
+             isurfsrc = csfsurf(2, icsf)
+             IF ( isurfsrc == -1 )  CYCLE ! sky->face only in 1st pass, not here
+!
+!--          Calculate source surface area. If the `surf' array is removed
+!--          before timestepping starts (future version), then asrc must be
+!--          stored within `csf'
+             asrc = facearea(surf(id, isurfsrc))
+             pcbinsw(ipcgb) = pcbinsw(ipcgb) + csf(1,icsf) * surfouts(isurfsrc) * asrc
+             IF ( plant_lw_interact )  THEN
+                pcbinlw(ipcgb) = pcbinlw(ipcgb) + csf(1,icsf) * surfoutl(isurfsrc) * asrc
+             ENDIF
+         ENDDO
+!
+!--      MRT reflected
+         DO  imrtf = 1, nmrtf
+            imrt = mrtfsurf(1, imrtf)
+            isurfsrc = mrtfsurf(2, imrtf)
+            mrtinsw(imrt) = mrtinsw(imrt) + mrtft(imrtf) * surfouts(isurfsrc)
+            mrtinlw(imrt) = mrtinlw(imrt) + mrtf(imrtf) * surfoutl(isurfsrc)
+         ENDDO
+
+         surfinsw = surfinsw  + surfins
+         surfinlw = surfinlw  + surfinl
+         surfoutsw = surfoutsw + surfoutsl
+         surfoutlw = surfoutlw + surfoutll
+
+     ENDDO ! refstep
+
+!--  push heat flux absorbed by plant canopy to respective 3D arrays
+     IF ( npcbl > 0 )  THEN
+         pc_heating_rate(:,:,:) = 0.0_wp
+         DO ipcgb = 1, npcbl
+             j = pcbl(iy, ipcgb)
+             i = pcbl(ix, ipcgb)
+             k = pcbl(iz, ipcgb)
+!
+!--          Following expression equals former kk = k - nzb_s_inner(j,i)
+             kk = k - get_topography_top_index_ji( j, i, 's' )  !- lad arrays are defined flat
+             pc_heating_rate(kk, j, i) = (pcbinsw(ipcgb) + pcbinlw(ipcgb)) &
+                 * pchf_prep(k) * pt(k, j, i) !-- = dT/dt
+         ENDDO
+
+         IF ( humidity .AND. plant_canopy_transpiration ) THEN
+!--          Calculation of plant canopy transpiration rate and correspondidng latent heat rate
+             pc_transpiration_rate(:,:,:) = 0.0_wp
+             pc_latent_rate(:,:,:) = 0.0_wp
+             DO ipcgb = 1, npcbl
+                 i = pcbl(ix, ipcgb)
+                 j = pcbl(iy, ipcgb)
+                 k = pcbl(iz, ipcgb)
+                 kk = k - get_topography_top_index_ji( j, i, 's' )  !- lad arrays are defined flat
+                 CALL pcm_calc_transpiration_rate( i, j, k, kk, pcbinsw(ipcgb), pcbinlw(ipcgb), &
+                                                   pc_transpiration_rate(kk,j,i), pc_latent_rate(kk,j,i) )
+              ENDDO
+         ENDIF
+     ENDIF
+!
+!--  Calculate black body MRT (after all reflections)
+     IF ( nmrtbl > 0 )  THEN
+        IF ( mrt_include_sw )  THEN
+           mrt(:) = ((mrtinsw(:) + mrtinlw(:)) / sigma_sb) ** .25_wp
+        ELSE
+           mrt(:) = (mrtinlw(:) / sigma_sb) ** .25_wp
+        ENDIF
+     ENDIF
+!
+!--     Transfer radiation arrays required for energy balance to the respective data types
+     DO  i = 1, nsurfl
+        m  = surfl(5,i)
+!
+!--     (1) Urban surfaces
+!--     upward-facing
+        IF ( surfl(1,i) == iup_u )  THEN
+           surf_usm_h%rad_sw_in(m)  = surfinsw(i)
+           surf_usm_h%rad_sw_out(m) = surfoutsw(i)
+           surf_usm_h%rad_lw_in(m)  = surfinlw(i)
+           surf_usm_h%rad_lw_out(m) = surfoutlw(i)
+           surf_usm_h%rad_net(m)    = surfinsw(i) - surfoutsw(i) +          &
+                                      surfinlw(i) - surfoutlw(i)
+           surf_usm_h%rad_net_l(m)  = surf_usm_h%rad_net(m)
+!
+!--     northward-facding
+        ELSEIF ( surfl(1,i) == inorth_u )  THEN
+           surf_usm_v(0)%rad_sw_in(m)  = surfinsw(i)
+           surf_usm_v(0)%rad_sw_out(m) = surfoutsw(i)
+           surf_usm_v(0)%rad_lw_in(m)  = surfinlw(i)
+           surf_usm_v(0)%rad_lw_out(m) = surfoutlw(i)
+           surf_usm_v(0)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+           surf_usm_v(0)%rad_net_l(m)  = surf_usm_v(0)%rad_net(m)
+!
+!--     southward-facding
+        ELSEIF ( surfl(1,i) == isouth_u )  THEN
+           surf_usm_v(1)%rad_sw_in(m)  = surfinsw(i)
+           surf_usm_v(1)%rad_sw_out(m) = surfoutsw(i)
+           surf_usm_v(1)%rad_lw_in(m)  = surfinlw(i)
+           surf_usm_v(1)%rad_lw_out(m) = surfoutlw(i)
+           surf_usm_v(1)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+           surf_usm_v(1)%rad_net_l(m)  = surf_usm_v(1)%rad_net(m)
+!
+!--     eastward-facing
+        ELSEIF ( surfl(1,i) == ieast_u )  THEN
+           surf_usm_v(2)%rad_sw_in(m)  = surfinsw(i)
+           surf_usm_v(2)%rad_sw_out(m) = surfoutsw(i)
+           surf_usm_v(2)%rad_lw_in(m)  = surfinlw(i)
+           surf_usm_v(2)%rad_lw_out(m) = surfoutlw(i)
+           surf_usm_v(2)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+           surf_usm_v(2)%rad_net_l(m)  = surf_usm_v(2)%rad_net(m)
+!
+!--     westward-facding
+        ELSEIF ( surfl(1,i) == iwest_u )  THEN
+           surf_usm_v(3)%rad_sw_in(m)  = surfinsw(i)
+           surf_usm_v(3)%rad_sw_out(m) = surfoutsw(i)
+           surf_usm_v(3)%rad_lw_in(m)  = surfinlw(i)
+           surf_usm_v(3)%rad_lw_out(m) = surfoutlw(i)
+           surf_usm_v(3)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+           surf_usm_v(3)%rad_net_l(m)  = surf_usm_v(3)%rad_net(m)
+!
+!--     (2) land surfaces
+!--     upward-facing
+        ELSEIF ( surfl(1,i) == iup_l )  THEN
+           surf_lsm_h%rad_sw_in(m)  = surfinsw(i)
+           surf_lsm_h%rad_sw_out(m) = surfoutsw(i)
+           surf_lsm_h%rad_lw_in(m)  = surfinlw(i)
+           surf_lsm_h%rad_lw_out(m) = surfoutlw(i)
+           surf_lsm_h%rad_net(m)    = surfinsw(i) - surfoutsw(i) +          &
+                                      surfinlw(i) - surfoutlw(i)
+!
+!--     northward-facding
+        ELSEIF ( surfl(1,i) == inorth_l )  THEN
+           surf_lsm_v(0)%rad_sw_in(m)  = surfinsw(i)
+           surf_lsm_v(0)%rad_sw_out(m) = surfoutsw(i)
+           surf_lsm_v(0)%rad_lw_in(m)  = surfinlw(i)
+           surf_lsm_v(0)%rad_lw_out(m) = surfoutlw(i)
+           surf_lsm_v(0)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+!
+!--     southward-facding
+        ELSEIF ( surfl(1,i) == isouth_l )  THEN
+           surf_lsm_v(1)%rad_sw_in(m)  = surfinsw(i)
+           surf_lsm_v(1)%rad_sw_out(m) = surfoutsw(i)
+           surf_lsm_v(1)%rad_lw_in(m)  = surfinlw(i)
+           surf_lsm_v(1)%rad_lw_out(m) = surfoutlw(i)
+           surf_lsm_v(1)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+!
+!--     eastward-facing
+        ELSEIF ( surfl(1,i) == ieast_l )  THEN
+           surf_lsm_v(2)%rad_sw_in(m)  = surfinsw(i)
+           surf_lsm_v(2)%rad_sw_out(m) = surfoutsw(i)
+           surf_lsm_v(2)%rad_lw_in(m)  = surfinlw(i)
+           surf_lsm_v(2)%rad_lw_out(m) = surfoutlw(i)
+           surf_lsm_v(2)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+!
+!--     westward-facing
+        ELSEIF ( surfl(1,i) == iwest_l )  THEN
+           surf_lsm_v(3)%rad_sw_in(m)  = surfinsw(i)
+           surf_lsm_v(3)%rad_sw_out(m) = surfoutsw(i)
+           surf_lsm_v(3)%rad_lw_in(m)  = surfinlw(i)
+           surf_lsm_v(3)%rad_lw_out(m) = surfoutlw(i)
+           surf_lsm_v(3)%rad_net(m)    = surfinsw(i) - surfoutsw(i) +       &
+                                         surfinlw(i) - surfoutlw(i)
+        ENDIF
+
+     ENDDO
+
+     DO  m = 1, surf_usm_h%ns
+        surf_usm_h%surfhf(m) = surf_usm_h%rad_sw_in(m)  +                   &
+                               surf_usm_h%rad_lw_in(m)  -                   &
+                               surf_usm_h%rad_sw_out(m) -                   &
+                               surf_usm_h%rad_lw_out(m)
+     ENDDO
+     DO  m = 1, surf_lsm_h%ns
+        surf_lsm_h%surfhf(m) = surf_lsm_h%rad_sw_in(m)  +                   &
+                               surf_lsm_h%rad_lw_in(m)  -                   &
+                               surf_lsm_h%rad_sw_out(m) -                   &
+                               surf_lsm_h%rad_lw_out(m)
+     ENDDO
+
+     DO  l = 0, 3
+!--     urban
+        DO  m = 1, surf_usm_v(l)%ns
+           surf_usm_v(l)%surfhf(m) = surf_usm_v(l)%rad_sw_in(m)  +          &
+                                     surf_usm_v(l)%rad_lw_in(m)  -          &
+                                     surf_usm_v(l)%rad_sw_out(m) -          &
+                                     surf_usm_v(l)%rad_lw_out(m)
+        ENDDO
+!--     land
+        DO  m = 1, surf_lsm_v(l)%ns
+           surf_lsm_v(l)%surfhf(m) = surf_lsm_v(l)%rad_sw_in(m)  +          &
+                                     surf_lsm_v(l)%rad_lw_in(m)  -          &
+                                     surf_lsm_v(l)%rad_sw_out(m) -          &
+                                     surf_lsm_v(l)%rad_lw_out(m)
+
+        ENDDO
+     ENDDO
+!
+!--  Calculate the average temperature, albedo, and emissivity for urban/land
+!--  domain when using average_radiation in the respective radiation model
+
+!--  calculate horizontal area
+! !!! ATTENTION!!! uniform grid is assumed here
+     area_hor = (nx+1) * (ny+1) * dx * dy
+!
+!--  absorbed/received SW & LW and emitted LW energy of all physical
+!--  surfaces (land and urban) in local processor
+     pinswl = 0._wp
+     pinlwl = 0._wp
+     pabsswl = 0._wp
+     pabslwl = 0._wp
+     pemitlwl = 0._wp
+     emiss_sum_surfl = 0._wp
+     area_surfl = 0._wp
+     DO  i = 1, nsurfl
+        d = surfl(id, i)
+!--  received SW & LW
+        pinswl = pinswl + (surfinswdir(i) + surfinswdif(i)) * facearea(d)
+        pinlwl = pinlwl + surfinlwdif(i) * facearea(d)
+!--   absorbed SW & LW
+        pabsswl = pabsswl + (1._wp - albedo_surf(i)) *                   &
+                                                surfinsw(i) * facearea(d)
+        pabslwl = pabslwl + emiss_surf(i) * surfinlw(i) * facearea(d)
+!--   emitted LW
+        pemitlwl = pemitlwl + surfemitlwl(i) * facearea(d)
+!--   emissivity and area sum
+        emiss_sum_surfl = emiss_sum_surfl + emiss_surf(i) * facearea(d)
+        area_surfl = area_surfl + facearea(d)
+     END DO
+!
+!--  add the absorbed SW energy by plant canopy
+     IF ( npcbl > 0 )  THEN
+        pabsswl = pabsswl + SUM(pcbinsw)
+        pabslwl = pabslwl + SUM(pcbinlw)
+        pinswl = pinswl + SUM(pcbinswdir) + SUM(pcbinswdif)
+     ENDIF
+!
+!--  gather all rad flux energy in all processors
+#if defined( __parallel )
+     CALL MPI_ALLREDUCE( pinswl, pinsw, 1, MPI_REAL, MPI_SUM, comm2d, ierr)
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce5:', ierr, pinswl, pinsw
+         FLUSH(9)
+     ENDIF
+     CALL MPI_ALLREDUCE( pinlwl, pinlw, 1, MPI_REAL, MPI_SUM, comm2d, ierr)
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce6:', ierr, pinlwl, pinlw
+         FLUSH(9)
+     ENDIF
+     CALL MPI_ALLREDUCE( pabsswl, pabssw, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce7:', ierr, pabsswl, pabssw
+         FLUSH(9)
+     ENDIF
+     CALL MPI_ALLREDUCE( pabslwl, pabslw, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce8:', ierr, pabslwl, pabslw
+         FLUSH(9)
+     ENDIF
+     CALL MPI_ALLREDUCE( pemitlwl, pemitlw, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce8:', ierr, pemitlwl, pemitlw
+         FLUSH(9)
+     ENDIF
+     CALL MPI_ALLREDUCE( emiss_sum_surfl, emiss_sum_surf, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce9:', ierr, emiss_sum_surfl, emiss_sum_surf
+         FLUSH(9)
+     ENDIF
+     CALL MPI_ALLREDUCE( area_surfl, area_surf, 1, MPI_REAL, MPI_SUM, comm2d, ierr )
+     IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllReduce10:', ierr, area_surfl, area_surf
+         FLUSH(9)
+     ENDIF
+#else
+     pinsw = pinswl
+     pinlw = pinlwl
+     pabssw = pabsswl
+     pabslw = pabslwl
+     pemitlw = pemitlwl
+     emiss_sum_surf = emiss_sum_surfl
+     area_surf = area_surfl
+#endif
+
+!--  (1) albedo
+     IF ( pinsw /= 0.0_wp )  &
+          albedo_urb = (pinsw - pabssw) / pinsw
+!--  (2) average emmsivity
+     IF ( area_surf /= 0.0_wp ) &
+          emissivity_urb = emiss_sum_surf / area_surf
+!
+!--  Temporally comment out calculation of effective radiative temperature. 
+!--  See below for more explanation.
+!--  (3) temperature
+!--   first we calculate an effective horizontal area to account for
+!--   the effect of vertical surfaces (which contributes to LW emission)
+!--   We simply use the ratio of the total LW to the incoming LW flux 
+      area_hor = pinlw/rad_lw_in_diff(nyn,nxl)
+      t_rad_urb = ( (pemitlw - pabslw + emissivity_urb*pinlw) / &
+           (emissivity_urb*sigma_sb * area_hor) )**0.25_wp
+
+    CONTAINS
+
+!------------------------------------------------------------------------------!
+!> Calculates radiation absorbed by box with given size and LAD.
+!>
+!> Simulates resol**2 rays (by equally spacing a bounding horizontal square
+!> conatining all possible rays that would cross the box) and calculates
+!> average transparency per ray. Returns fraction of absorbed radiation flux
+!> and area for which this fraction is effective.
+!------------------------------------------------------------------------------!
+    PURE SUBROUTINE box_absorb(boxsize, resol, dens, uvec, area, absorb)
+       IMPLICIT NONE
+
+       REAL(wp), DIMENSION(3), INTENT(in) :: &
+            boxsize, &      !< z, y, x size of box in m
+            uvec            !< z, y, x unit vector of incoming flux
+       INTEGER(iwp), INTENT(in) :: &
+            resol           !< No. of rays in x and y dimensions
+       REAL(wp), INTENT(in) :: &
+            dens            !< box density (e.g. Leaf Area Density)
+       REAL(wp), INTENT(out) :: &
+            area, &         !< horizontal area for flux absorbtion
+            absorb          !< fraction of absorbed flux
+       REAL(wp) :: &
+            xshift, yshift, &
+            xmin, xmax, ymin, ymax, &
+            xorig, yorig, &
+            dx1, dy1, dz1, dx2, dy2, dz2, &
+            crdist, &
+            transp
+       INTEGER(iwp) :: &
+            i, j
+
+       xshift = uvec(3) / uvec(1) * boxsize(1)
+       xmin = min(0._wp, -xshift)
+       xmax = boxsize(3) + max(0._wp, -xshift)
+       yshift = uvec(2) / uvec(1) * boxsize(1)
+       ymin = min(0._wp, -yshift)
+       ymax = boxsize(2) + max(0._wp, -yshift)
+
+       transp = 0._wp
+       DO i = 1, resol
+          xorig = xmin + (xmax-xmin) * (i-.5_wp) / resol
+          DO j = 1, resol
+             yorig = ymin + (ymax-ymin) * (j-.5_wp) / resol
+
+             dz1 = 0._wp
+             dz2 = boxsize(1)/uvec(1)
+
+             IF ( uvec(2) > 0._wp )  THEN
+                dy1 = -yorig             / uvec(2) !< crossing with y=0
+                dy2 = (boxsize(2)-yorig) / uvec(2) !< crossing with y=boxsize(2)
+             ELSE !uvec(2)==0
+                dy1 = -huge(1._wp)
+                dy2 = huge(1._wp)
+             ENDIF
+
+             IF ( uvec(3) > 0._wp )  THEN
+                dx1 = -xorig             / uvec(3) !< crossing with x=0
+                dx2 = (boxsize(3)-xorig) / uvec(3) !< crossing with x=boxsize(3)
+             ELSE !uvec(3)==0
+                dx1 = -huge(1._wp)
+                dx2 = huge(1._wp)
+             ENDIF
+
+             crdist = max(0._wp, (min(dz2, dy2, dx2) - max(dz1, dy1, dx1)))
+             transp = transp + exp(-ext_coef * dens * crdist)
+          ENDDO
+       ENDDO
+       transp = transp / resol**2
+       area = (boxsize(3)+xshift)*(boxsize(2)+yshift)
+       absorb = 1._wp - transp
+
+    END SUBROUTINE box_absorb
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine splits direct and diffusion dw radiation
+!> It sould not be called in case the radiation model already does it
+!> It follows <CITATION>
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_diffusion_radiation 
+    
+        REAL(wp), PARAMETER                          :: lowest_solarUp = 0.1_wp  !< limit the sun elevation to protect stability of the calculation
+        INTEGER(iwp)                                 :: i, j
+        REAL(wp)                                     ::  year_angle              !< angle
+        REAL(wp)                                     ::  etr                     !< extraterestrial radiation
+        REAL(wp)                                     ::  corrected_solarUp       !< corrected solar up radiation
+        REAL(wp)                                     ::  horizontalETR           !< horizontal extraterestrial radiation
+        REAL(wp)                                     ::  clearnessIndex          !< clearness index
+        REAL(wp)                                     ::  diff_frac               !< diffusion fraction of the radiation
+
+        
+!--     Calculate current day and time based on the initial values and simulation time
+        year_angle = ( (day_of_year_init * 86400) + time_utc_init              &
+                        + time_since_reference_point )  * d_seconds_year       &
+                        * 2.0_wp * pi
+        
+        etr = solar_constant * (1.00011_wp +                                   &
+                          0.034221_wp * cos(year_angle) +                      &
+                          0.001280_wp * sin(year_angle) +                      &
+                          0.000719_wp * cos(2.0_wp * year_angle) +             &
+                          0.000077_wp * sin(2.0_wp * year_angle))
+        
+!--    
+!--     Under a very low angle, we keep extraterestrial radiation at
+!--     the last small value, therefore the clearness index will be pushed
+!--     towards 0 while keeping full continuity.
+!--    
+        IF ( zenith(0) <= lowest_solarUp )  THEN
+            corrected_solarUp = lowest_solarUp
+        ELSE
+            corrected_solarUp = zenith(0)
+        ENDIF
+        
+        horizontalETR = etr * corrected_solarUp
+        
+        DO i = nxl, nxr
+            DO j = nys, nyn
+                clearnessIndex = rad_sw_in(0,j,i) / horizontalETR
+                diff_frac = 1.0_wp / (1.0_wp + exp(-5.0033_wp + 8.6025_wp * clearnessIndex))
+                rad_sw_in_diff(j,i) = rad_sw_in(0,j,i) * diff_frac
+                rad_sw_in_dir(j,i)  = rad_sw_in(0,j,i) * (1.0_wp - diff_frac)
+                rad_lw_in_diff(j,i) = rad_lw_in(0,j,i)
+            ENDDO
+        ENDDO
+        
+    END SUBROUTINE calc_diffusion_radiation
+
+
+ END SUBROUTINE radiation_interaction
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine initializes structures needed for radiative transfer
+!> model. This model calculates transformation processes of the
+!> radiation inside urban and land canopy layer. The module includes also
+!> the interaction of the radiation with the resolved plant canopy.
+!>
+!> For more info. see Resler et al. 2017
+!>
+!> The new version 2.0 was radically rewriten, the discretization scheme
+!> has been changed. This new version significantly improves effectivity
+!> of the paralelization and the scalability of the model.
+!>
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_interaction_init
+
+       USE control_parameters,                                                 &
+           ONLY:  dz_stretch_level_start
+           
+       USE netcdf_data_input_mod,                                              &
+           ONLY:  leaf_area_density_f
+
+       USE plant_canopy_model_mod,                                             &
+           ONLY:  pch_index, lad_s
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: i, j, k, l, m, d
+       INTEGER(iwp) :: k_topo     !< vertical index indicating topography top for given (j,i)
+       INTEGER(iwp) :: nzptl, nzubl, nzutl, isurf, ipcgb, imrt
+       REAL(wp)     :: mrl
+#if defined( __parallel )
+       INTEGER(iwp), DIMENSION(:), POINTER       ::  gridsurf_rma   !< fortran pointer, but lower bounds are 1
+       TYPE(c_ptr)                               ::  gridsurf_rma_p !< allocated c pointer
+       INTEGER(iwp)                              ::  minfo          !< MPI RMA window info handle
+#endif
+
+!
+!--     precalculate face areas for different face directions using normal vector
+        DO d = 0, nsurf_type
+            facearea(d) = 1._wp
+            IF ( idir(d) == 0 ) facearea(d) = facearea(d) * dx
+            IF ( jdir(d) == 0 ) facearea(d) = facearea(d) * dy
+            IF ( kdir(d) == 0 ) facearea(d) = facearea(d) * dz(1)
+        ENDDO
+!
+!--    Find nzub, nzut, nzu via wall_flag_0 array (nzb_s_inner will be
+!--    removed later). The following contruct finds the lowest / largest index
+!--    for any upward-facing wall (see bit 12).
+       nzubl = MINVAL( get_topography_top_index( 's' ) )
+       nzutl = MAXVAL( get_topography_top_index( 's' ) )
+
+       nzubl = MAX( nzubl, nzb )
+
+       IF ( plant_canopy )  THEN
+!--        allocate needed arrays
+           ALLOCATE( pct(nys:nyn,nxl:nxr) )
+           ALLOCATE( pch(nys:nyn,nxl:nxr) )
+
+!--        calculate plant canopy height
+           npcbl = 0
+           pct   = 0
+           pch   = 0
+           DO i = nxl, nxr
+               DO j = nys, nyn
+!
+!--                Find topography top index
+                   k_topo = get_topography_top_index_ji( j, i, 's' )
+
+                   DO k = nzt+1, 0, -1
+                       IF ( lad_s(k,j,i) /= 0.0_wp )  THEN
+!--                        we are at the top of the pcs
+                           pct(j,i) = k + k_topo
+                           pch(j,i) = k
+                           npcbl = npcbl + pch(j,i)
+                           EXIT
+                       ENDIF
+                   ENDDO
+               ENDDO
+           ENDDO
+
+           nzutl = MAX( nzutl, MAXVAL( pct ) )
+           nzptl = MAXVAL( pct )
+!--        code of plant canopy model uses parameter pch_index
+!--        we need to setup it here to right value
+!--        (pch_index, lad_s and other arrays in PCM are defined flat)
+           pch_index = MERGE( leaf_area_density_f%nz - 1, MAXVAL( pch ),       &
+                              leaf_area_density_f%from_file )
+
+           prototype_lad = MAXVAL( lad_s ) * .9_wp  !< better be *1.0 if lad is either 0 or maxval(lad) everywhere
+           IF ( prototype_lad <= 0._wp ) prototype_lad = .3_wp
+           !WRITE(message_string, '(a,f6.3)') 'Precomputing effective box optical ' &
+           !    // 'depth using prototype leaf area density = ', prototype_lad
+           !CALL message('usm_init_urban_surface', 'PA0520', 0, 0, -1, 6, 0)
+       ENDIF
+
+       nzutl = MIN( nzutl + nzut_free, nzt )
+
+#if defined( __parallel )
+       CALL MPI_AllReduce(nzubl, nzub, 1, MPI_INTEGER, MPI_MIN, comm2d, ierr )
+       IF ( ierr /= 0 ) THEN
+           WRITE(9,*) 'Error MPI_AllReduce11:', ierr, nzubl, nzub
+           FLUSH(9)
+       ENDIF
+       CALL MPI_AllReduce(nzutl, nzut, 1, MPI_INTEGER, MPI_MAX, comm2d, ierr )
+       IF ( ierr /= 0 ) THEN
+           WRITE(9,*) 'Error MPI_AllReduce12:', ierr, nzutl, nzut
+           FLUSH(9)
+       ENDIF
+       CALL MPI_AllReduce(nzptl, nzpt, 1, MPI_INTEGER, MPI_MAX, comm2d, ierr )
+       IF ( ierr /= 0 ) THEN
+           WRITE(9,*) 'Error MPI_AllReduce13:', ierr, nzptl, nzpt
+           FLUSH(9)
+       ENDIF
+#else
+       nzub = nzubl
+       nzut = nzutl
+       nzpt = nzptl
+#endif
+!
+!--    Stretching (non-uniform grid spacing) is not considered in the radiation 
+!--    model. Therefore, vertical stretching has to be applied above the area 
+!--    where the parts of the radiation model which assume constant grid spacing
+!--    are active. ABS (...) is required because the default value of 
+!--    dz_stretch_level_start is -9999999.9_wp (negative). 
+       IF ( ABS( dz_stretch_level_start(1) ) <= zw(nzut) ) THEN
+          WRITE( message_string, * ) 'The lowest level where vertical ',       &
+                                     'stretching is applied have to be ',      &
+                                     'greater than ', zw(nzut)
+          CALL message( 'radiation_interaction_init', 'PA0496', 1, 2, 0, 6, 0 )
+       ENDIF 
+!
+!--    global number of urban and plant layers
+       nzu = nzut - nzub + 1
+       nzp = nzpt - nzub + 1
+!
+!--    check max_raytracing_dist relative to urban surface layer height
+       mrl = 2.0_wp * nzu * dz(1)
+!--    set max_raytracing_dist to double the urban surface layer height, if not set
+       IF ( max_raytracing_dist == -999.0_wp ) THEN
+          max_raytracing_dist = mrl
+       ENDIF
+!--    check if max_raytracing_dist set too low (here we only warn the user. Other
+!      option is to correct the value again to double the urban surface layer height)
+       IF ( max_raytracing_dist  <  mrl ) THEN
+          WRITE(message_string, '(a,f6.1)') 'Max_raytracing_dist is set less than ', &
+               'double the urban surface layer height, i.e. ', mrl
+          CALL message('radiation_interaction_init', 'PA0521', 0, 0, -1, 6, 0)
+       ENDIF
+!        IF ( max_raytracing_dist <= mrl ) THEN
+!           IF ( max_raytracing_dist /= -999.0_wp ) THEN
+! !--          max_raytracing_dist too low
+!              WRITE(message_string, '(a,f6.1)') 'Max_raytracing_dist too low, ' &
+!                    // 'override to value ', mrl
+!              CALL message('radiation_interaction_init', 'PA0521', 0, 0, -1, 6, 0)
+!           ENDIF
+!           max_raytracing_dist = mrl
+!        ENDIF
+!
+!--    allocate urban surfaces grid
+!--    calc number of surfaces in local proc
+       CALL location_message( '    calculation of indices for surfaces', .TRUE. )
+       nsurfl = 0
+!
+!--    Number of horizontal surfaces including land- and roof surfaces in both USM and LSM. Note that
+!--    All horizontal surface elements are already counted in surface_mod.
+       startland = 1
+       nsurfl    = surf_usm_h%ns + surf_lsm_h%ns
+       endland   = nsurfl
+       nlands    = endland - startland + 1
+
+!
+!--    Number of vertical surfaces in both USM and LSM. Note that all vertical surface elements are
+!--    already counted in surface_mod.
+       startwall = nsurfl+1
+       DO  i = 0,3
+          nsurfl = nsurfl + surf_usm_v(i)%ns + surf_lsm_v(i)%ns
+       ENDDO
+       endwall = nsurfl
+       nwalls  = endwall - startwall + 1
+
+!--    fill gridpcbl and pcbl
+       IF ( npcbl > 0 )  THEN
+           ALLOCATE( pcbl(iz:ix, 1:npcbl) )
+           ALLOCATE( gridpcbl(nzub:nzpt,nys:nyn,nxl:nxr) )
+           pcbl = -1
+           gridpcbl(:,:,:) = 0
+           ipcgb = 0
+           DO i = nxl, nxr
+               DO j = nys, nyn
+!
+!--                Find topography top index
+                   k_topo = get_topography_top_index_ji( j, i, 's' )
+
+                   DO k = k_topo + 1, pct(j,i)
+                       ipcgb = ipcgb + 1
+                       gridpcbl(k,j,i) = ipcgb
+                       pcbl(:,ipcgb) = (/ k, j, i /)
+                   ENDDO
+               ENDDO
+           ENDDO
+           ALLOCATE( pcbinsw( 1:npcbl ) )
+           ALLOCATE( pcbinswdir( 1:npcbl ) )
+           ALLOCATE( pcbinswdif( 1:npcbl ) )
+           ALLOCATE( pcbinlw( 1:npcbl ) )
+       ENDIF
+
+!--    fill surfl (the ordering of local surfaces given by the following
+!--    cycles must not be altered, certain file input routines may depend
+!--    on it)
+       ALLOCATE(surfl_l(5*nsurfl))  ! is it necessary to allocate it with (5,nsurfl)?
+       surfl(1:5,1:nsurfl) => surfl_l(1:5*nsurfl)
+       isurf = 0
+       IF ( rad_angular_discretization )  THEN
+!
+!--       Allocate and fill the reverse indexing array gridsurf
+#if defined( __parallel )
+!
+!--       raytrace_mpi_rma is asserted
+
+          CALL MPI_Info_create(minfo, ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Info_create1:', ierr
+              FLUSH(9)
+          ENDIF
+          CALL MPI_Info_set(minfo, 'accumulate_ordering', '', ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Info_set1:', ierr
+              FLUSH(9)
+          ENDIF
+          CALL MPI_Info_set(minfo, 'accumulate_ops', 'same_op', ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Info_set2:', ierr
+              FLUSH(9)
+          ENDIF
+          CALL MPI_Info_set(minfo, 'same_size', 'true', ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Info_set3:', ierr
+              FLUSH(9)
+          ENDIF
+          CALL MPI_Info_set(minfo, 'same_disp_unit', 'true', ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Info_set4:', ierr
+              FLUSH(9)
+          ENDIF
+
+          CALL MPI_Win_allocate(INT(STORAGE_SIZE(1_iwp)/8*nsurf_type_u*nzu*nny*nnx, &
+                                    kind=MPI_ADDRESS_KIND), STORAGE_SIZE(1_iwp)/8,  &
+                                minfo, comm2d, gridsurf_rma_p, win_gridsurf, ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Win_allocate1:', ierr, &
+                 INT(STORAGE_SIZE(1_iwp)/8*nsurf_type_u*nzu*nny*nnx,kind=MPI_ADDRESS_KIND), &
+                 STORAGE_SIZE(1_iwp)/8, win_gridsurf
+              FLUSH(9)
+          ENDIF
+
+          CALL MPI_Info_free(minfo, ierr)
+          IF ( ierr /= 0 ) THEN
+              WRITE(9,*) 'Error MPI_Info_free1:', ierr
+              FLUSH(9)
+          ENDIF
+
+!
+!--       On Intel compilers, calling c_f_pointer to transform a C pointer
+!--       directly to a multi-dimensional Fotran pointer leads to strange
+!--       errors on dimension boundaries. However, transforming to a 1D
+!--       pointer and then redirecting a multidimensional pointer to it works
+!--       fine.
+          CALL c_f_pointer(gridsurf_rma_p, gridsurf_rma, (/ nsurf_type_u*nzu*nny*nnx /))
+          gridsurf(0:nsurf_type_u-1, nzub:nzut, nys:nyn, nxl:nxr) =>                &
+                     gridsurf_rma(1:nsurf_type_u*nzu*nny*nnx)
+#else
+          ALLOCATE(gridsurf(0:nsurf_type_u-1,nzub:nzut,nys:nyn,nxl:nxr) )
+#endif
+          gridsurf(:,:,:,:) = -999
+       ENDIF
+
+!--    add horizontal surface elements (land and urban surfaces)
+!--    TODO: add urban overhanging surfaces (idown_u)
+       DO i = nxl, nxr
+           DO j = nys, nyn
+              DO  m = surf_usm_h%start_index(j,i), surf_usm_h%end_index(j,i)
+                 k = surf_usm_h%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/iup_u,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(iup_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+
+              DO  m = surf_lsm_h%start_index(j,i), surf_lsm_h%end_index(j,i)
+                 k = surf_lsm_h%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/iup_l,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(iup_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+
+           ENDDO
+       ENDDO
+
+!--    add vertical surface elements (land and urban surfaces)
+!--    TODO: remove the hard coding of l = 0 to l = idirection
+       DO i = nxl, nxr
+           DO j = nys, nyn
+              l = 0
+              DO  m = surf_usm_v(l)%start_index(j,i), surf_usm_v(l)%end_index(j,i)
+                 k = surf_usm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/inorth_u,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(inorth_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+              DO  m = surf_lsm_v(l)%start_index(j,i), surf_lsm_v(l)%end_index(j,i)
+                 k = surf_lsm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/inorth_l,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(inorth_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+
+              l = 1
+              DO  m = surf_usm_v(l)%start_index(j,i), surf_usm_v(l)%end_index(j,i)
+                 k = surf_usm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/isouth_u,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(isouth_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+              DO  m = surf_lsm_v(l)%start_index(j,i), surf_lsm_v(l)%end_index(j,i)
+                 k = surf_lsm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/isouth_l,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(isouth_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+
+              l = 2
+              DO  m = surf_usm_v(l)%start_index(j,i), surf_usm_v(l)%end_index(j,i)
+                 k = surf_usm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/ieast_u,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(ieast_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+              DO  m = surf_lsm_v(l)%start_index(j,i), surf_lsm_v(l)%end_index(j,i)
+                 k = surf_lsm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/ieast_l,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(ieast_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+
+              l = 3
+              DO  m = surf_usm_v(l)%start_index(j,i), surf_usm_v(l)%end_index(j,i)
+                 k = surf_usm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/iwest_u,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(iwest_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+              DO  m = surf_lsm_v(l)%start_index(j,i), surf_lsm_v(l)%end_index(j,i)
+                 k = surf_lsm_v(l)%k(m)
+                 isurf = isurf + 1
+                 surfl(:,isurf) = (/iwest_l,k,j,i,m/)
+                 IF ( rad_angular_discretization ) THEN
+                    gridsurf(iwest_u,k,j,i) = isurf
+                 ENDIF
+              ENDDO
+           ENDDO
+       ENDDO
+!
+!--    Add local MRT boxes for specified number of levels
+       nmrtbl = 0
+       IF ( mrt_nlevels > 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  m = surf_usm_h%start_index(j,i), surf_usm_h%end_index(j,i)
+!
+!--                Skip roof if requested
+                   IF ( mrt_skip_roof  .AND.  surf_usm_h%isroof_surf(m) )  CYCLE
+!
+!--                Cycle over specified no of levels
+                   nmrtbl = nmrtbl + mrt_nlevels
+                ENDDO
+!
+!--             Dtto for LSM
+                DO  m = surf_lsm_h%start_index(j,i), surf_lsm_h%end_index(j,i)
+                   nmrtbl = nmrtbl + mrt_nlevels
+                ENDDO
+             ENDDO
+          ENDDO
+
+          ALLOCATE( mrtbl(iz:ix,nmrtbl), mrtsky(nmrtbl), mrtskyt(nmrtbl), &
+                    mrtinsw(nmrtbl), mrtinlw(nmrtbl), mrt(nmrtbl) )
+
+          imrt = 0
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  m = surf_usm_h%start_index(j,i), surf_usm_h%end_index(j,i)
+!
+!--                Skip roof if requested
+                   IF ( mrt_skip_roof  .AND.  surf_usm_h%isroof_surf(m) )  CYCLE
+!
+!--                Cycle over specified no of levels
+                   l = surf_usm_h%k(m)
+                   DO  k = l, l + mrt_nlevels - 1
+                      imrt = imrt + 1
+                      mrtbl(:,imrt) = (/k,j,i/)
+                   ENDDO
+                ENDDO
+!
+!--             Dtto for LSM
+                DO  m = surf_lsm_h%start_index(j,i), surf_lsm_h%end_index(j,i)
+                   l = surf_lsm_h%k(m)
+                   DO  k = l, l + mrt_nlevels - 1
+                      imrt = imrt + 1
+                      mrtbl(:,imrt) = (/k,j,i/)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    broadband albedo of the land, roof and wall surface
+!--    for domain border and sky set artifically to 1.0
+!--    what allows us to calculate heat flux leaving over
+!--    side and top borders of the domain
+       ALLOCATE ( albedo_surf(nsurfl) )
+       albedo_surf = 1.0_wp
+!
+!--    Also allocate further array for emissivity with identical order of
+!--    surface elements as radiation arrays.
+       ALLOCATE ( emiss_surf(nsurfl)  )
+
+
+!
+!--    global array surf of indices of surfaces and displacement index array surfstart
+       ALLOCATE(nsurfs(0:numprocs-1))
+
+#if defined( __parallel )
+       CALL MPI_Allgather(nsurfl,1,MPI_INTEGER,nsurfs,1,MPI_INTEGER,comm2d,ierr)
+       IF ( ierr /= 0 ) THEN
+         WRITE(9,*) 'Error MPI_AllGather1:', ierr, nsurfl, nsurfs
+         FLUSH(9)
+     ENDIF
+
+#else
+       nsurfs(0) = nsurfl
+#endif
+       ALLOCATE(surfstart(0:numprocs))
+       k = 0
+       DO i=0,numprocs-1
+           surfstart(i) = k
+           k = k+nsurfs(i)
+       ENDDO
+       surfstart(numprocs) = k
+       nsurf = k
+       ALLOCATE(surf_l(5*nsurf))
+       surf(1:5,1:nsurf) => surf_l(1:5*nsurf)
+
+#if defined( __parallel )
+       CALL MPI_AllGatherv(surfl_l, nsurfl*5, MPI_INTEGER, surf_l, nsurfs*5, &
+           surfstart(0:numprocs-1)*5, MPI_INTEGER, comm2d, ierr)
+       IF ( ierr /= 0 ) THEN
+           WRITE(9,*) 'Error MPI_AllGatherv4:', ierr, SIZE(surfl_l), nsurfl*5, &
+                      SIZE(surf_l), nsurfs*5, surfstart(0:numprocs-1)*5
+           FLUSH(9)
+       ENDIF
+#else
+       surf = surfl
+#endif
+
+!--
+!--    allocation of the arrays for direct and diffusion radiation
+       CALL location_message( '    allocation of radiation arrays', .TRUE. )
+!--    rad_sw_in, rad_lw_in are computed in radiation model,
+!--    splitting of direct and diffusion part is done
+!--    in calc_diffusion_radiation for now
+
+       ALLOCATE( rad_sw_in_dir(nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( rad_sw_in_diff(nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( rad_lw_in_diff(nysg:nyng,nxlg:nxrg) )
+       rad_sw_in_dir  = 0.0_wp
+       rad_sw_in_diff = 0.0_wp
+       rad_lw_in_diff = 0.0_wp
+
+!--    allocate radiation arrays
+       ALLOCATE( surfins(nsurfl) )
+       ALLOCATE( surfinl(nsurfl) )
+       ALLOCATE( surfinsw(nsurfl) )
+       ALLOCATE( surfinlw(nsurfl) )
+       ALLOCATE( surfinswdir(nsurfl) )
+       ALLOCATE( surfinswdif(nsurfl) )
+       ALLOCATE( surfinlwdif(nsurfl) )
+       ALLOCATE( surfoutsl(nsurfl) )
+       ALLOCATE( surfoutll(nsurfl) )
+       ALLOCATE( surfoutsw(nsurfl) )
+       ALLOCATE( surfoutlw(nsurfl) )
+       ALLOCATE( surfouts(nsurf) )
+       ALLOCATE( surfoutl(nsurf) )
+       ALLOCATE( surfinlg(nsurf) )
+       ALLOCATE( skyvf(nsurfl) )
+       ALLOCATE( skyvft(nsurfl) )
+       ALLOCATE( surfemitlwl(nsurfl) )
+
+!
+!--    In case of average_radiation, aggregated surface albedo and emissivity,
+!--    also set initial value for t_rad_urb.
+!--    For now set an arbitrary initial value.
+       IF ( average_radiation )  THEN
+          albedo_urb = 0.1_wp
+          emissivity_urb = 0.9_wp
+          t_rad_urb = pt_surface
+       ENDIF
+
+    END SUBROUTINE radiation_interaction_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates shape view factors (SVF), plant sink canopy factors (PCSF),
+!> sky-view factors, discretized path for direct solar radiation, MRT factors
+!> and other preprocessed data needed for radiation_interaction.
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_calc_svf
+    
+        IMPLICIT NONE
+        
+        INTEGER(iwp)                                  :: i, j, k, d, ip, jp
+        INTEGER(iwp)                                  :: isvf, ksvf, icsf, kcsf, npcsfl, isvf_surflt, imrt, imrtf, ipcgb
+        INTEGER(iwp)                                  :: sd, td
+        INTEGER(iwp)                                  :: iaz, izn      !< azimuth, zenith counters
+        INTEGER(iwp)                                  :: naz, nzn      !< azimuth, zenith num of steps
+        REAL(wp)                                      :: az0, zn0      !< starting azimuth/zenith
+        REAL(wp)                                      :: azs, zns      !< azimuth/zenith cycle step
+        REAL(wp)                                      :: az1, az2      !< relative azimuth of section borders
+        REAL(wp)                                      :: azmid         !< ray (center) azimuth
+        REAL(wp)                                      :: yxlen         !< |yxdir|
+        REAL(wp), DIMENSION(2)                        :: yxdir         !< y,x *unit* vector of ray direction (in grid units)
+        REAL(wp), DIMENSION(:), ALLOCATABLE           :: zdirs         !< directions in z (tangent of elevation)
+        REAL(wp), DIMENSION(:), ALLOCATABLE           :: zcent         !< zenith angle centers
+        REAL(wp), DIMENSION(:), ALLOCATABLE           :: zbdry         !< zenith angle boundaries
+        REAL(wp), DIMENSION(:), ALLOCATABLE           :: vffrac        !< view factor fractions for individual rays
+        REAL(wp), DIMENSION(:), ALLOCATABLE           :: vffrac0       !< dtto (original values)
+        REAL(wp), DIMENSION(:), ALLOCATABLE           :: ztransp       !< array of transparency in z steps
+        INTEGER(iwp)                                  :: lowest_free_ray !< index into zdirs
+        INTEGER(iwp), DIMENSION(:), ALLOCATABLE       :: itarget       !< face indices of detected obstacles
+        INTEGER(iwp)                                  :: itarg0, itarg1
+
+        INTEGER(iwp)                                  :: udim
+        INTEGER(iwp), DIMENSION(:), ALLOCATABLE,TARGET:: nzterrl_l
+        INTEGER(iwp), DIMENSION(:,:), POINTER         :: nzterrl
+        REAL(wp),     DIMENSION(:), ALLOCATABLE,TARGET:: csflt_l, pcsflt_l
+        REAL(wp),     DIMENSION(:,:), POINTER         :: csflt, pcsflt
+        INTEGER(iwp), DIMENSION(:), ALLOCATABLE,TARGET:: kcsflt_l,kpcsflt_l
+        INTEGER(iwp), DIMENSION(:,:), POINTER         :: kcsflt,kpcsflt
+        INTEGER(iwp), DIMENSION(:), ALLOCATABLE       :: icsflt,dcsflt,ipcsflt,dpcsflt
+        REAL(wp), DIMENSION(3)                        :: uv
+        LOGICAL                                       :: visible
+        REAL(wp), DIMENSION(3)                        :: sa, ta          !< real coordinates z,y,x of source and target
+        REAL(wp)                                      :: difvf           !< differential view factor
+        REAL(wp)                                      :: transparency, rirrf, sqdist, svfsum
+        INTEGER(iwp)                                  :: isurflt, isurfs, isurflt_prev
+        INTEGER(idp)                                  :: ray_skip_maxdist, ray_skip_minval !< skipped raytracing counts
+        INTEGER(iwp)                                  :: max_track_len !< maximum 2d track length
+        INTEGER(iwp)                                  :: minfo
+        REAL(wp), DIMENSION(:), POINTER               :: lad_s_rma       !< fortran 1D pointer
+        TYPE(c_ptr)                                   :: lad_s_rma_p     !< allocated c pointer
+#if defined( __parallel )
+        INTEGER(kind=MPI_ADDRESS_KIND)                :: size_lad_rma
+#endif
+!    
+        INTEGER(iwp), DIMENSION(0:svfnorm_report_num) :: svfnorm_counts
+        CHARACTER(200)                                :: msg
+
+!--     calculation of the SVF
+        CALL location_message( '    calculation of SVF and CSF', .TRUE. )
+        CALL radiation_write_debug_log('Start calculation of SVF and CSF')
+
+!--     initialize variables and temporary arrays for calculation of svf and csf
+        nsvfl  = 0
+        ncsfl  = 0
+        nsvfla = gasize
+        msvf   = 1
+        ALLOCATE( asvf1(nsvfla) )
+        asvf => asvf1
+        IF ( plant_canopy )  THEN
+            ncsfla = gasize
+            mcsf   = 1
+            ALLOCATE( acsf1(ncsfla) )
+            acsf => acsf1
+        ENDIF
+        nmrtf = 0
+        IF ( mrt_nlevels > 0 )  THEN
+           nmrtfa = gasize
+           mmrtf = 1
+           ALLOCATE ( amrtf1(nmrtfa) )
+           amrtf => amrtf1
+        ENDIF
+        ray_skip_maxdist = 0
+        ray_skip_minval = 0
+        
+!--     initialize temporary terrain and plant canopy height arrays (global 2D array!)
+        ALLOCATE( nzterr(0:(nx+1)*(ny+1)-1) )
+#if defined( __parallel )
+        !ALLOCATE( nzterrl(nys:nyn,nxl:nxr) )
+        ALLOCATE( nzterrl_l((nyn-nys+1)*(nxr-nxl+1)) )
+        nzterrl(nys:nyn,nxl:nxr) => nzterrl_l(1:(nyn-nys+1)*(nxr-nxl+1))
+        nzterrl = get_topography_top_index( 's' )
+        CALL MPI_AllGather( nzterrl_l, nnx*nny, MPI_INTEGER, &
+                            nzterr, nnx*nny, MPI_INTEGER, comm2d, ierr )
+        IF ( ierr /= 0 ) THEN
+            WRITE(9,*) 'Error MPI_AllGather1:', ierr, SIZE(nzterrl_l), nnx*nny, &
+                       SIZE(nzterr), nnx*nny
+            FLUSH(9)
+        ENDIF
+        DEALLOCATE(nzterrl_l)
+#else
+        nzterr = RESHAPE( get_topography_top_index( 's' ), (/(nx+1)*(ny+1)/) )
+#endif
+        IF ( plant_canopy )  THEN
+            ALLOCATE( plantt(0:(nx+1)*(ny+1)-1) )
+            maxboxesg = nx + ny + nzp + 1
+            max_track_len = nx + ny + 1
+!--         temporary arrays storing values for csf calculation during raytracing
+            ALLOCATE( boxes(3, maxboxesg) )
+            ALLOCATE( crlens(maxboxesg) )
+
+#if defined( __parallel )
+            CALL MPI_AllGather( pct, nnx*nny, MPI_INTEGER, &
+                                plantt, nnx*nny, MPI_INTEGER, comm2d, ierr )
+            IF ( ierr /= 0 ) THEN
+                WRITE(9,*) 'Error MPI_AllGather2:', ierr, SIZE(pct), nnx*nny, &
+                           SIZE(plantt), nnx*nny
+                FLUSH(9)
+            ENDIF
+
+!--         temporary arrays storing values for csf calculation during raytracing
+            ALLOCATE( lad_ip(maxboxesg) )
+            ALLOCATE( lad_disp(maxboxesg) )
+
+            IF ( raytrace_mpi_rma )  THEN
+                ALLOCATE( lad_s_ray(maxboxesg) )
+                
+                ! set conditions for RMA communication
+                CALL MPI_Info_create(minfo, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Info_create2:', ierr
+                    FLUSH(9)
+                ENDIF
+                CALL MPI_Info_set(minfo, 'accumulate_ordering', '', ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Info_set5:', ierr
+                    FLUSH(9)
+                ENDIF
+                CALL MPI_Info_set(minfo, 'accumulate_ops', 'same_op', ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Info_set6:', ierr
+                    FLUSH(9)
+                ENDIF
+                CALL MPI_Info_set(minfo, 'same_size', 'true', ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Info_set7:', ierr
+                    FLUSH(9)
+                ENDIF
+                CALL MPI_Info_set(minfo, 'same_disp_unit', 'true', ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Info_set8:', ierr
+                    FLUSH(9)
+                ENDIF
+
+!--             Allocate and initialize the MPI RMA window
+!--             must be in accordance with allocation of lad_s in plant_canopy_model
+!--             optimization of memory should be done
+!--             Argument X of function STORAGE_SIZE(X) needs arbitrary REAL(wp) value, set to 1.0_wp for now
+                size_lad_rma = STORAGE_SIZE(1.0_wp)/8*nnx*nny*nzp
+                CALL MPI_Win_allocate(size_lad_rma, STORAGE_SIZE(1.0_wp)/8, minfo, comm2d, &
+                                        lad_s_rma_p, win_lad, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Win_allocate2:', ierr, size_lad_rma, &
+                                STORAGE_SIZE(1.0_wp)/8, win_lad
+                    FLUSH(9)
+                ENDIF
+                CALL c_f_pointer(lad_s_rma_p, lad_s_rma, (/ nzp*nny*nnx /))
+                sub_lad(nzub:nzpt, nys:nyn, nxl:nxr) => lad_s_rma(1:nzp*nny*nnx)
+            ELSE
+                ALLOCATE(sub_lad(nzub:nzpt, nys:nyn, nxl:nxr))
+            ENDIF
+#else
+            plantt = RESHAPE( pct(nys:nyn,nxl:nxr), (/(nx+1)*(ny+1)/) )
+            ALLOCATE(sub_lad(nzub:nzpt, nys:nyn, nxl:nxr))
+#endif
+            plantt_max = MAXVAL(plantt)
+            ALLOCATE( rt2_track(2, max_track_len), rt2_track_lad(nzub:plantt_max, max_track_len), &
+                      rt2_track_dist(0:max_track_len), rt2_dist(plantt_max-nzub+2) )
+
+            sub_lad(:,:,:) = 0._wp
+            DO i = nxl, nxr
+                DO j = nys, nyn
+                    k = get_topography_top_index_ji( j, i, 's' )
+
+                    sub_lad(k:nzpt, j, i) = lad_s(0:nzpt-k, j, i)
+                ENDDO
+            ENDDO
+
+#if defined( __parallel )
+            IF ( raytrace_mpi_rma )  THEN
+                CALL MPI_Info_free(minfo, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Info_free2:', ierr
+                    FLUSH(9)
+                ENDIF
+                CALL MPI_Win_lock_all(0, win_lad, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Win_lock_all1:', ierr, win_lad
+                    FLUSH(9)
+                ENDIF
+                
+            ELSE
+                ALLOCATE( sub_lad_g(0:(nx+1)*(ny+1)*nzp-1) )
+                CALL MPI_AllGather( sub_lad, nnx*nny*nzp, MPI_REAL, &
+                                    sub_lad_g, nnx*nny*nzp, MPI_REAL, comm2d, ierr )
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_AllGather3:', ierr, SIZE(sub_lad), &
+                                nnx*nny*nzp, SIZE(sub_lad_g), nnx*nny*nzp
+                    FLUSH(9)
+                ENDIF
+            ENDIF
+#endif
+        ENDIF
+
+!--     prepare the MPI_Win for collecting the surface indices
+!--     from the reverse index arrays gridsurf from processors of target surfaces
+#if defined( __parallel )
+        IF ( rad_angular_discretization )  THEN
+!
+!--         raytrace_mpi_rma is asserted
+            CALL MPI_Win_lock_all(0, win_gridsurf, ierr)
+            IF ( ierr /= 0 ) THEN
+                WRITE(9,*) 'Error MPI_Win_lock_all2:', ierr, win_gridsurf
+                FLUSH(9)
+            ENDIF
+        ENDIF
+#endif
+
+
+        !--Directions opposite to face normals are not even calculated,
+        !--they must be preset to 0
+        !--
+        dsitrans(:,:) = 0._wp
+        
+        DO isurflt = 1, nsurfl
+!--         determine face centers
+            td = surfl(id, isurflt)
+            ta = (/ REAL(surfl(iz, isurflt), wp) - 0.5_wp * kdir(td),  &
+                      REAL(surfl(iy, isurflt), wp) - 0.5_wp * jdir(td),  &
+                      REAL(surfl(ix, isurflt), wp) - 0.5_wp * idir(td)  /)
+
+            !--Calculate sky view factor and raytrace DSI paths
+            skyvf(isurflt) = 0._wp
+            skyvft(isurflt) = 0._wp
+
+            !--Select a proper half-sphere for 2D raytracing
+            SELECT CASE ( td )
+               CASE ( iup_u, iup_l )
+                  az0 = 0._wp
+                  naz = raytrace_discrete_azims
+                  azs = 2._wp * pi / REAL(naz, wp)
+                  zn0 = 0._wp
+                  nzn = raytrace_discrete_elevs / 2
+                  zns = pi / 2._wp / REAL(nzn, wp)
+               CASE ( isouth_u, isouth_l )
+                  az0 = pi / 2._wp
+                  naz = raytrace_discrete_azims / 2
+                  azs = pi / REAL(naz, wp)
+                  zn0 = 0._wp
+                  nzn = raytrace_discrete_elevs
+                  zns = pi / REAL(nzn, wp)
+               CASE ( inorth_u, inorth_l )
+                  az0 = - pi / 2._wp
+                  naz = raytrace_discrete_azims / 2
+                  azs = pi / REAL(naz, wp)
+                  zn0 = 0._wp
+                  nzn = raytrace_discrete_elevs
+                  zns = pi / REAL(nzn, wp)
+               CASE ( iwest_u, iwest_l )
+                  az0 = pi
+                  naz = raytrace_discrete_azims / 2
+                  azs = pi / REAL(naz, wp)
+                  zn0 = 0._wp
+                  nzn = raytrace_discrete_elevs
+                  zns = pi / REAL(nzn, wp)
+               CASE ( ieast_u, ieast_l )
+                  az0 = 0._wp
+                  naz = raytrace_discrete_azims / 2
+                  azs = pi / REAL(naz, wp)
+                  zn0 = 0._wp
+                  nzn = raytrace_discrete_elevs
+                  zns = pi / REAL(nzn, wp)
+               CASE DEFAULT
+                  WRITE(message_string, *) 'ERROR: the surface type ', td,     &
+                                           ' is not supported for calculating',&
+                                           ' SVF'
+                  CALL message( 'radiation_calc_svf', 'PA0488', 1, 2, 0, 6, 0 )
+            END SELECT
+
+            ALLOCATE ( zdirs(1:nzn), zcent(1:nzn), zbdry(0:nzn), vffrac(1:nzn*naz), &
+                       ztransp(1:nzn*naz), itarget(1:nzn*naz) )   !FIXME allocate itarget only
+                                                                  !in case of rad_angular_discretization
+
+            itarg0 = 1
+            itarg1 = nzn
+            zcent(:) = (/( zn0+(REAL(izn,wp)-.5_wp)*zns, izn=1, nzn )/)
+            zbdry(:) = (/( zn0+REAL(izn,wp)*zns, izn=0, nzn )/)
+            IF ( td == iup_u  .OR.  td == iup_l )  THEN
+               vffrac(1:nzn) = (COS(2 * zbdry(0:nzn-1)) - COS(2 * zbdry(1:nzn))) / 2._wp / REAL(naz, wp)
+!
+!--            For horizontal target, vf fractions are constant per azimuth
+               DO iaz = 1, naz-1
+                  vffrac(iaz*nzn+1:(iaz+1)*nzn) = vffrac(1:nzn)
+               ENDDO
+!--            sum of whole vffrac equals 1, verified
+            ENDIF
+!
+!--         Calculate sky-view factor and direct solar visibility using 2D raytracing
+            DO iaz = 1, naz
+               azmid = az0 + (REAL(iaz, wp) - .5_wp) * azs
+               IF ( td /= iup_u  .AND.  td /= iup_l )  THEN
+                  az2 = REAL(iaz, wp) * azs - pi/2._wp
+                  az1 = az2 - azs
+                  !TODO precalculate after 1st line
+                  vffrac(itarg0:itarg1) = (SIN(az2) - SIN(az1))               &
+                              * (zbdry(1:nzn) - zbdry(0:nzn-1)                &
+                                 + SIN(zbdry(0:nzn-1))*COS(zbdry(0:nzn-1))    &
+                                 - SIN(zbdry(1:nzn))*COS(zbdry(1:nzn)))       &
+                              / (2._wp * pi)
+!--               sum of whole vffrac equals 1, verified
+               ENDIF
+               yxdir(:) = (/ COS(azmid) / dy, SIN(azmid) / dx /)
+               yxlen = SQRT(SUM(yxdir(:)**2))
+               zdirs(:) = COS(zcent(:)) / (dz(1) * yxlen * SIN(zcent(:)))
+               yxdir(:) = yxdir(:) / yxlen
+
+               CALL raytrace_2d(ta, yxdir, nzn, zdirs,                        &
+                                    surfstart(myid) + isurflt, facearea(td),  &
+                                    vffrac(itarg0:itarg1), .TRUE., .TRUE.,    &
+                                    .FALSE., lowest_free_ray,                 &
+                                    ztransp(itarg0:itarg1),                   &
+                                    itarget(itarg0:itarg1))
+
+               skyvf(isurflt) = skyvf(isurflt) + &
+                                SUM(vffrac(itarg0:itarg0+lowest_free_ray-1))
+               skyvft(isurflt) = skyvft(isurflt) + &
+                                 SUM(ztransp(itarg0:itarg0+lowest_free_ray-1) &
+                                             * vffrac(itarg0:itarg0+lowest_free_ray-1))
+ 
+!--            Save direct solar transparency
+               j = MODULO(NINT(azmid/                                          &
+                               (2._wp*pi)*raytrace_discrete_azims-.5_wp, iwp), &
+                          raytrace_discrete_azims)
+
+               DO k = 1, raytrace_discrete_elevs/2
+                  i = dsidir_rev(k-1, j)
+                  IF ( i /= -1  .AND.  k <= lowest_free_ray )  &
+                     dsitrans(isurflt, i) = ztransp(itarg0+k-1)
+               ENDDO
+
+!
+!--            Advance itarget indices
+               itarg0 = itarg1 + 1
+               itarg1 = itarg1 + nzn
+            ENDDO
+
+            IF ( rad_angular_discretization )  THEN
+!--            sort itarget by face id
+               CALL quicksort_itarget(itarget,vffrac,ztransp,1,nzn*naz)
+!
+!--            find the first valid position
+               itarg0 = 1
+               DO WHILE ( itarg0 <= nzn*naz )
+                  IF ( itarget(itarg0) /= -1 )  EXIT
+                  itarg0 = itarg0 + 1
+               ENDDO
+
+               DO  i = itarg0, nzn*naz
+!
+!--               For duplicate values, only sum up vf fraction value
+                  IF ( i < nzn*naz )  THEN
+                     IF ( itarget(i+1) == itarget(i) )  THEN
+                        vffrac(i+1) = vffrac(i+1) + vffrac(i)
+                        CYCLE
+                     ENDIF
+                  ENDIF
+!
+!--               write to the svf array
+                  nsvfl = nsvfl + 1
+!--               check dimmension of asvf array and enlarge it if needed
+                  IF ( nsvfla < nsvfl )  THEN
+                     k = CEILING(REAL(nsvfla, kind=wp) * grow_factor)
+                     IF ( msvf == 0 )  THEN
+                        msvf = 1
+                        ALLOCATE( asvf1(k) )
+                        asvf => asvf1
+                        asvf1(1:nsvfla) = asvf2
+                        DEALLOCATE( asvf2 )
+                     ELSE
+                        msvf = 0
+                        ALLOCATE( asvf2(k) )
+                        asvf => asvf2
+                        asvf2(1:nsvfla) = asvf1
+                        DEALLOCATE( asvf1 )
+                     ENDIF
+
+                     WRITE (msg,'(A,3I12)') 'Grow asvf:',nsvfl,nsvfla,k
+                     CALL radiation_write_debug_log( msg )
+                     
+                     nsvfla = k
+                  ENDIF
+!--               write svf values into the array
+                  asvf(nsvfl)%isurflt = isurflt
+                  asvf(nsvfl)%isurfs = itarget(i)
+                  asvf(nsvfl)%rsvf = vffrac(i)
+                  asvf(nsvfl)%rtransp = ztransp(i)
+               END DO
+
+            ENDIF ! rad_angular_discretization
+
+            DEALLOCATE ( zdirs, zcent, zbdry, vffrac, ztransp, itarget ) !FIXME itarget shall be allocated only
+                                                                  !in case of rad_angular_discretization
+!
+!--         Following calculations only required for surface_reflections
+            IF ( surface_reflections  .AND.  .NOT. rad_angular_discretization )  THEN
+
+               DO  isurfs = 1, nsurf
+                  IF ( .NOT.  surface_facing(surfl(ix, isurflt), surfl(iy, isurflt), &
+                     surfl(iz, isurflt), surfl(id, isurflt), &
+                     surf(ix, isurfs), surf(iy, isurfs), &
+                     surf(iz, isurfs), surf(id, isurfs)) )  THEN
+                     CYCLE
+                  ENDIF
+                  
+                  sd = surf(id, isurfs)
+                  sa = (/ REAL(surf(iz, isurfs), wp) - 0.5_wp * kdir(sd),  &
+                          REAL(surf(iy, isurfs), wp) - 0.5_wp * jdir(sd),  &
+                          REAL(surf(ix, isurfs), wp) - 0.5_wp * idir(sd)  /)
+
+!--               unit vector source -> target
+                  uv = (/ (ta(1)-sa(1))*dz(1), (ta(2)-sa(2))*dy, (ta(3)-sa(3))*dx /)
+                  sqdist = SUM(uv(:)**2)
+                  uv = uv / SQRT(sqdist)
+
+!--               reject raytracing above max distance
+                  IF ( SQRT(sqdist) > max_raytracing_dist ) THEN
+                     ray_skip_maxdist = ray_skip_maxdist + 1
+                     CYCLE
+                  ENDIF
+                 
+                  difvf = dot_product((/ kdir(sd), jdir(sd), idir(sd) /), uv) & ! cosine of source normal and direction
+                      * dot_product((/ kdir(td), jdir(td), idir(td) /), -uv) &  ! cosine of target normal and reverse direction
+                      / (pi * sqdist) ! square of distance between centers
+!
+!--               irradiance factor (our unshaded shape view factor) = view factor per differential target area * source area
+                  rirrf = difvf * facearea(sd)
+
+!--               reject raytracing for potentially too small view factor values
+                  IF ( rirrf < min_irrf_value ) THEN
+                      ray_skip_minval = ray_skip_minval + 1
+                      CYCLE
+                  ENDIF
+
+!--               raytrace + process plant canopy sinks within
+                  CALL raytrace(sa, ta, isurfs, difvf, facearea(td), .TRUE., &
+                                visible, transparency)
+
+                  IF ( .NOT.  visible ) CYCLE
+                 ! rsvf = rirrf * transparency
+
+!--               write to the svf array
+                  nsvfl = nsvfl + 1
+!--               check dimmension of asvf array and enlarge it if needed
+                  IF ( nsvfla < nsvfl )  THEN
+                     k = CEILING(REAL(nsvfla, kind=wp) * grow_factor)
+                     IF ( msvf == 0 )  THEN
+                        msvf = 1
+                        ALLOCATE( asvf1(k) )
+                        asvf => asvf1
+                        asvf1(1:nsvfla) = asvf2
+                        DEALLOCATE( asvf2 )
+                     ELSE
+                        msvf = 0
+                        ALLOCATE( asvf2(k) )
+                        asvf => asvf2
+                        asvf2(1:nsvfla) = asvf1
+                        DEALLOCATE( asvf1 )
+                     ENDIF
+
+                     WRITE(msg,'(A,3I12)') 'Grow asvf:',nsvfl,nsvfla,k
+                     CALL radiation_write_debug_log( msg )
+                     
+                     nsvfla = k
+                  ENDIF
+!--               write svf values into the array
+                  asvf(nsvfl)%isurflt = isurflt
+                  asvf(nsvfl)%isurfs = isurfs
+                  asvf(nsvfl)%rsvf = rirrf !we postopne multiplication by transparency
+                  asvf(nsvfl)%rtransp = transparency !a.k.a. Direct Irradiance Factor
+               ENDDO
+            ENDIF
+        ENDDO
+
+!--
+!--     Raytrace to canopy boxes to fill dsitransc TODO optimize
+        dsitransc(:,:) = 0._wp
+        az0 = 0._wp
+        naz = raytrace_discrete_azims
+        azs = 2._wp * pi / REAL(naz, wp)
+        zn0 = 0._wp
+        nzn = raytrace_discrete_elevs / 2
+        zns = pi / 2._wp / REAL(nzn, wp)
+        ALLOCATE ( zdirs(1:nzn), zcent(1:nzn), vffrac(1:nzn), ztransp(1:nzn), &
+               itarget(1:nzn) )
+        zcent(:) = (/( zn0+(REAL(izn,wp)-.5_wp)*zns, izn=1, nzn )/)
+        vffrac(:) = 0._wp
+
+        DO  ipcgb = 1, npcbl
+           ta = (/ REAL(pcbl(iz, ipcgb), wp),  &
+                   REAL(pcbl(iy, ipcgb), wp),  &
+                   REAL(pcbl(ix, ipcgb), wp) /)
+!--        Calculate direct solar visibility using 2D raytracing
+           DO  iaz = 1, naz
+              azmid = az0 + (REAL(iaz, wp) - .5_wp) * azs
+              yxdir(:) = (/ COS(azmid) / dy, SIN(azmid) / dx /)
+              yxlen = SQRT(SUM(yxdir(:)**2))
+              zdirs(:) = COS(zcent(:)) / (dz(1) * yxlen * SIN(zcent(:)))
+              yxdir(:) = yxdir(:) / yxlen
+              CALL raytrace_2d(ta, yxdir, nzn, zdirs,                                &
+                                   -999, -999._wp, vffrac, .FALSE., .FALSE., .TRUE., &
+                                   lowest_free_ray, ztransp, itarget)
+
+!--           Save direct solar transparency
+              j = MODULO(NINT(azmid/                                         &
+                             (2._wp*pi)*raytrace_discrete_azims-.5_wp, iwp), &
+                         raytrace_discrete_azims)
+              DO  k = 1, raytrace_discrete_elevs/2
+                 i = dsidir_rev(k-1, j)
+                 IF ( i /= -1  .AND.  k <= lowest_free_ray ) &
+                    dsitransc(ipcgb, i) = ztransp(k)
+              ENDDO
+           ENDDO
+        ENDDO
+        DEALLOCATE ( zdirs, zcent, vffrac, ztransp, itarget )
+!--
+!--     Raytrace to MRT boxes
+        IF ( nmrtbl > 0 )  THEN
+           mrtdsit(:,:) = 0._wp
+           mrtsky(:) = 0._wp
+           mrtskyt(:) = 0._wp
+           az0 = 0._wp
+           naz = raytrace_discrete_azims
+           azs = 2._wp * pi / REAL(naz, wp)
+           zn0 = 0._wp
+           nzn = raytrace_discrete_elevs
+           zns = pi / REAL(nzn, wp)
+           ALLOCATE ( zdirs(1:nzn), zcent(1:nzn), zbdry(0:nzn), vffrac(1:nzn*naz), vffrac0(1:nzn), &
+                      ztransp(1:nzn*naz), itarget(1:nzn*naz) )   !FIXME allocate itarget only
+                                                                 !in case of rad_angular_discretization
+
+           zcent(:) = (/( zn0+(REAL(izn,wp)-.5_wp)*zns, izn=1, nzn )/)
+           zbdry(:) = (/( zn0+REAL(izn,wp)*zns, izn=0, nzn )/)
+           vffrac0(:) = (COS(zbdry(0:nzn-1)) - COS(zbdry(1:nzn))) / 2._wp / REAL(naz, wp)
+           !
+           !--Modify direction weights to simulate human body (lower weight for top-down)
+           IF ( mrt_geom_human )  THEN
+              vffrac0(:) = vffrac0(:) * MAX(0._wp, SIN(zcent(:))*0.88_wp + COS(zcent(:))*0.12_wp)
+              vffrac0(:) = vffrac0(:) / (SUM(vffrac0) * REAL(naz, wp))
+           ENDIF
+
+           DO  imrt = 1, nmrtbl
+              ta = (/ REAL(mrtbl(iz, imrt), wp),  &
+                      REAL(mrtbl(iy, imrt), wp),  &
+                      REAL(mrtbl(ix, imrt), wp) /)
+!
+!--           vf fractions are constant per azimuth
+              DO iaz = 0, naz-1
+                 vffrac(iaz*nzn+1:(iaz+1)*nzn) = vffrac0(:)
+              ENDDO
+!--           sum of whole vffrac equals 1, verified
+              itarg0 = 1
+              itarg1 = nzn
+!
+!--           Calculate sky-view factor and direct solar visibility using 2D raytracing
+              DO  iaz = 1, naz
+                 azmid = az0 + (REAL(iaz, wp) - .5_wp) * azs
+                 yxdir(:) = (/ COS(azmid) / dy, SIN(azmid) / dx /)
+                 yxlen = SQRT(SUM(yxdir(:)**2))
+                 zdirs(:) = COS(zcent(:)) / (dz(1) * yxlen * SIN(zcent(:)))
+                 yxdir(:) = yxdir(:) / yxlen
+
+                 CALL raytrace_2d(ta, yxdir, nzn, zdirs,                         &
+                                  -999, -999._wp, vffrac(itarg0:itarg1), .TRUE., &
+                                  .FALSE., .TRUE., lowest_free_ray,              &
+                                  ztransp(itarg0:itarg1),                        &
+                                  itarget(itarg0:itarg1))
+
+!--              Sky view factors for MRT
+                 mrtsky(imrt) = mrtsky(imrt) + &
+                                  SUM(vffrac(itarg0:itarg0+lowest_free_ray-1))
+                 mrtskyt(imrt) = mrtskyt(imrt) + &
+                                   SUM(ztransp(itarg0:itarg0+lowest_free_ray-1) &
+                                               * vffrac(itarg0:itarg0+lowest_free_ray-1))
+!--              Direct solar transparency for MRT
+                 j = MODULO(NINT(azmid/                                         &
+                                (2._wp*pi)*raytrace_discrete_azims-.5_wp, iwp), &
+                            raytrace_discrete_azims)
+                 DO  k = 1, raytrace_discrete_elevs/2
+                    i = dsidir_rev(k-1, j)
+                    IF ( i /= -1  .AND.  k <= lowest_free_ray ) &
+                       mrtdsit(imrt, i) = ztransp(itarg0+k-1)
+                 ENDDO
+!
+!--              Advance itarget indices
+                 itarg0 = itarg1 + 1
+                 itarg1 = itarg1 + nzn
+              ENDDO
+
+!--           sort itarget by face id
+              CALL quicksort_itarget(itarget,vffrac,ztransp,1,nzn*naz)
+!
+!--           find the first valid position
+              itarg0 = 1
+              DO WHILE ( itarg0 <= nzn*naz )
+                 IF ( itarget(itarg0) /= -1 )  EXIT
+                 itarg0 = itarg0 + 1
+              ENDDO
+
+              DO  i = itarg0, nzn*naz
+!
+!--              For duplicate values, only sum up vf fraction value
+                 IF ( i < nzn*naz )  THEN
+                    IF ( itarget(i+1) == itarget(i) )  THEN
+                       vffrac(i+1) = vffrac(i+1) + vffrac(i)
+                       CYCLE
+                    ENDIF
+                 ENDIF
+!
+!--              write to the mrtf array
+                 nmrtf = nmrtf + 1
+!--              check dimmension of mrtf array and enlarge it if needed
+                 IF ( nmrtfa < nmrtf )  THEN
+                    k = CEILING(REAL(nmrtfa, kind=wp) * grow_factor)
+                    IF ( mmrtf == 0 )  THEN
+                       mmrtf = 1
+                       ALLOCATE( amrtf1(k) )
+                       amrtf => amrtf1
+                       amrtf1(1:nmrtfa) = amrtf2
+                       DEALLOCATE( amrtf2 )
+                    ELSE
+                       mmrtf = 0
+                       ALLOCATE( amrtf2(k) )
+                       amrtf => amrtf2
+                       amrtf2(1:nmrtfa) = amrtf1
+                       DEALLOCATE( amrtf1 )
+                    ENDIF
+
+                    WRITE (msg,'(A,3I12)') 'Grow amrtf:', nmrtf, nmrtfa, k
+                    CALL radiation_write_debug_log( msg )
+
+                    nmrtfa = k
+                 ENDIF
+!--              write mrtf values into the array
+                 amrtf(nmrtf)%isurflt = imrt
+                 amrtf(nmrtf)%isurfs = itarget(i)
+                 amrtf(nmrtf)%rsvf = vffrac(i)
+                 amrtf(nmrtf)%rtransp = ztransp(i)
+              ENDDO ! itarg
+
+           ENDDO ! imrt
+           DEALLOCATE ( zdirs, zcent, zbdry, vffrac, vffrac0, ztransp, itarget )
+!
+!--        Move MRT factors to final arrays
+           ALLOCATE ( mrtf(nmrtf), mrtft(nmrtf), mrtfsurf(2,nmrtf) )
+           DO  imrtf = 1, nmrtf
+              mrtf(imrtf) = amrtf(imrtf)%rsvf
+              mrtft(imrtf) = amrtf(imrtf)%rsvf * amrtf(imrtf)%rtransp
+              mrtfsurf(:,imrtf) = (/amrtf(imrtf)%isurflt, amrtf(imrtf)%isurfs /)
+           ENDDO
+           IF ( ALLOCATED(amrtf1) )  DEALLOCATE( amrtf1 )
+           IF ( ALLOCATED(amrtf2) )  DEALLOCATE( amrtf2 )
+        ENDIF ! nmrtbl > 0
+
+        IF ( rad_angular_discretization )  THEN
+#if defined( __parallel )
+!--        finalize MPI_RMA communication established to get global index of the surface from grid indices
+!--        flush all MPI window pending requests
+           CALL MPI_Win_flush_all(win_gridsurf, ierr)
+           IF ( ierr /= 0 ) THEN
+               WRITE(9,*) 'Error MPI_Win_flush_all1:', ierr, win_gridsurf
+               FLUSH(9)
+           ENDIF
+!--        unlock MPI window
+           CALL MPI_Win_unlock_all(win_gridsurf, ierr)
+           IF ( ierr /= 0 ) THEN
+               WRITE(9,*) 'Error MPI_Win_unlock_all1:', ierr, win_gridsurf
+               FLUSH(9)
+           ENDIF
+!--        free MPI window
+           CALL MPI_Win_free(win_gridsurf, ierr)
+           IF ( ierr /= 0 ) THEN
+               WRITE(9,*) 'Error MPI_Win_free1:', ierr, win_gridsurf
+               FLUSH(9)
+           ENDIF
+#else
+           DEALLOCATE ( gridsurf )
+#endif
+        ENDIF
+
+        CALL radiation_write_debug_log( 'End of calculation SVF' )
+        WRITE(msg, *) 'Raytracing skipped for maximum distance of ', &
+           max_raytracing_dist, ' m on ', ray_skip_maxdist, ' pairs.'
+        CALL radiation_write_debug_log( msg )
+        WRITE(msg, *) 'Raytracing skipped for minimum potential value of ', &
+           min_irrf_value , ' on ', ray_skip_minval, ' pairs.'
+        CALL radiation_write_debug_log( msg )
+
+        CALL location_message( '    waiting for completion of SVF and CSF calculation in all processes', .TRUE. )
+!--     deallocate temporary global arrays
+        DEALLOCATE(nzterr)
+        
+        IF ( plant_canopy )  THEN
+!--         finalize mpi_rma communication and deallocate temporary arrays
+#if defined( __parallel )
+            IF ( raytrace_mpi_rma )  THEN
+                CALL MPI_Win_flush_all(win_lad, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Win_flush_all2:', ierr, win_lad
+                    FLUSH(9)
+                ENDIF
+!--             unlock MPI window
+                CALL MPI_Win_unlock_all(win_lad, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Win_unlock_all2:', ierr, win_lad
+                    FLUSH(9)
+                ENDIF
+!--             free MPI window
+                CALL MPI_Win_free(win_lad, ierr)
+                IF ( ierr /= 0 ) THEN
+                    WRITE(9,*) 'Error MPI_Win_free2:', ierr, win_lad
+                    FLUSH(9)
+                ENDIF
+!--             deallocate temporary arrays storing values for csf calculation during raytracing
+                DEALLOCATE( lad_s_ray )
+!--             sub_lad is the pointer to lad_s_rma in case of raytrace_mpi_rma
+!--             and must not be deallocated here
+            ELSE
+                DEALLOCATE(sub_lad)
+                DEALLOCATE(sub_lad_g)
+            ENDIF
+#else
+            DEALLOCATE(sub_lad)
+#endif
+            DEALLOCATE( boxes )
+            DEALLOCATE( crlens )
+            DEALLOCATE( plantt )
+            DEALLOCATE( rt2_track, rt2_track_lad, rt2_track_dist, rt2_dist )
+        ENDIF
+
+        CALL location_message( '    calculation of the complete SVF array', .TRUE. )
+
+        IF ( rad_angular_discretization )  THEN
+           CALL radiation_write_debug_log( 'Load svf from the structure array to plain arrays' )
+           ALLOCATE( svf(ndsvf,nsvfl) )
+           ALLOCATE( svfsurf(idsvf,nsvfl) )
+
+           DO isvf = 1, nsvfl
+               svf(:, isvf) = (/ asvf(isvf)%rsvf, asvf(isvf)%rtransp /)
+               svfsurf(:, isvf) = (/ asvf(isvf)%isurflt, asvf(isvf)%isurfs /)
+           ENDDO
+        ELSE
+           CALL radiation_write_debug_log( 'Start SVF sort' )
+!--        sort svf ( a version of quicksort )
+           CALL quicksort_svf(asvf,1,nsvfl)
+
+           !< load svf from the structure array to plain arrays
+           CALL radiation_write_debug_log( 'Load svf from the structure array to plain arrays' )
+           ALLOCATE( svf(ndsvf,nsvfl) )
+           ALLOCATE( svfsurf(idsvf,nsvfl) )
+           svfnorm_counts(:) = 0._wp
+           isurflt_prev = -1
+           ksvf = 1
+           svfsum = 0._wp
+           DO isvf = 1, nsvfl
+!--            normalize svf per target face
+               IF ( asvf(ksvf)%isurflt /= isurflt_prev )  THEN
+                   IF ( isurflt_prev /= -1  .AND.  svfsum /= 0._wp )  THEN
+                       !< update histogram of logged svf normalization values
+                       i = searchsorted(svfnorm_report_thresh, svfsum / (1._wp-skyvf(isurflt_prev)))
+                       svfnorm_counts(i) = svfnorm_counts(i) + 1
+
+                       svf(1, isvf_surflt:isvf-1) = svf(1, isvf_surflt:isvf-1) / svfsum * (1._wp-skyvf(isurflt_prev))
+                   ENDIF
+                   isurflt_prev = asvf(ksvf)%isurflt
+                   isvf_surflt = isvf
+                   svfsum = asvf(ksvf)%rsvf !?? / asvf(ksvf)%rtransp
+               ELSE
+                   svfsum = svfsum + asvf(ksvf)%rsvf !?? / asvf(ksvf)%rtransp
+               ENDIF
+
+               svf(:, isvf) = (/ asvf(ksvf)%rsvf, asvf(ksvf)%rtransp /)
+               svfsurf(:, isvf) = (/ asvf(ksvf)%isurflt, asvf(ksvf)%isurfs /)
+
+!--            next element
+               ksvf = ksvf + 1
+           ENDDO
+
+           IF ( isurflt_prev /= -1  .AND.  svfsum /= 0._wp )  THEN
+               i = searchsorted(svfnorm_report_thresh, svfsum / (1._wp-skyvf(isurflt_prev)))
+               svfnorm_counts(i) = svfnorm_counts(i) + 1
+
+               svf(1, isvf_surflt:nsvfl) = svf(1, isvf_surflt:nsvfl) / svfsum * (1._wp-skyvf(isurflt_prev))
+           ENDIF
+           WRITE(9, *) 'SVF normalization histogram:', svfnorm_counts,  &
+                       'on thresholds:', svfnorm_report_thresh(1:svfnorm_report_num), '(val < thresh <= val)'
+           !TODO we should be able to deallocate skyvf, from now on we only need skyvft
+        ENDIF ! rad_angular_discretization
+
+!--     deallocate temporary asvf array
+!--     DEALLOCATE(asvf) - ifort has a problem with deallocation of allocatable target
+!--     via pointing pointer - we need to test original targets
+        IF ( ALLOCATED(asvf1) )  THEN
+            DEALLOCATE(asvf1)
+        ENDIF
+        IF ( ALLOCATED(asvf2) )  THEN
+            DEALLOCATE(asvf2)
+        ENDIF
+
+        npcsfl = 0
+        IF ( plant_canopy )  THEN
+
+            CALL location_message( '    calculation of the complete CSF array', .TRUE. )
+            CALL radiation_write_debug_log( 'Calculation of the complete CSF array' )
+!--         sort and merge csf for the last time, keeping the array size to minimum
+            CALL merge_and_grow_csf(-1)
+            
+!--         aggregate csb among processors
+!--         allocate necessary arrays
+            udim = max(ncsfl,1)
+            ALLOCATE( csflt_l(ndcsf*udim) )
+            csflt(1:ndcsf,1:udim) => csflt_l(1:ndcsf*udim)
+            ALLOCATE( kcsflt_l(kdcsf*udim) )
+            kcsflt(1:kdcsf,1:udim) => kcsflt_l(1:kdcsf*udim)
+            ALLOCATE( icsflt(0:numprocs-1) )
+            ALLOCATE( dcsflt(0:numprocs-1) )
+            ALLOCATE( ipcsflt(0:numprocs-1) )
+            ALLOCATE( dpcsflt(0:numprocs-1) )
+            
+!--         fill out arrays of csf values and 
+!--         arrays of number of elements and displacements
+!--         for particular precessors
+            icsflt = 0
+            dcsflt = 0
+            ip = -1
+            j = -1
+            d = 0
+            DO kcsf = 1, ncsfl
+                j = j+1
+                IF ( acsf(kcsf)%ip /= ip )  THEN
+!--                 new block of the processor
+!--                 number of elements of previous block
+                    IF ( ip>=0) icsflt(ip) = j
+                    d = d+j
+!--                 blank blocks
+                    DO jp = ip+1, acsf(kcsf)%ip-1
+!--                     number of elements is zero, displacement is equal to previous
+                        icsflt(jp) = 0
+                        dcsflt(jp) = d
+                    ENDDO
+!--                 the actual block
+                    ip = acsf(kcsf)%ip
+                    dcsflt(ip) = d
+                    j = 0
+                ENDIF
+                csflt(1,kcsf) = acsf(kcsf)%rcvf
+!--             fill out integer values of itz,ity,itx,isurfs
+                kcsflt(1,kcsf) = acsf(kcsf)%itz
+                kcsflt(2,kcsf) = acsf(kcsf)%ity
+                kcsflt(3,kcsf) = acsf(kcsf)%itx
+                kcsflt(4,kcsf) = acsf(kcsf)%isurfs
+            ENDDO
+!--         last blank blocks at the end of array
+            j = j+1
+            IF ( ip>=0 ) icsflt(ip) = j
+            d = d+j
+            DO jp = ip+1, numprocs-1
+!--             number of elements is zero, displacement is equal to previous
+                icsflt(jp) = 0
+                dcsflt(jp) = d
+            ENDDO
+            
+!--         deallocate temporary acsf array
+!--         DEALLOCATE(acsf) - ifort has a problem with deallocation of allocatable target
+!--         via pointing pointer - we need to test original targets
+            IF ( ALLOCATED(acsf1) )  THEN
+                DEALLOCATE(acsf1)
+            ENDIF
+            IF ( ALLOCATED(acsf2) )  THEN
+                DEALLOCATE(acsf2)
+            ENDIF
+                    
+#if defined( __parallel )
+!--         scatter and gather the number of elements to and from all processor
+!--         and calculate displacements
+            CALL radiation_write_debug_log( 'Scatter and gather the number of elements to and from all processor' )
+            CALL MPI_AlltoAll(icsflt,1,MPI_INTEGER,ipcsflt,1,MPI_INTEGER,comm2d, ierr)
+            IF ( ierr /= 0 ) THEN
+                WRITE(9,*) 'Error MPI_AlltoAll1:', ierr, SIZE(icsflt), SIZE(ipcsflt)
+                FLUSH(9)
+            ENDIF
+
+            npcsfl = SUM(ipcsflt)
+            d = 0
+            DO i = 0, numprocs-1
+                dpcsflt(i) = d
+                d = d + ipcsflt(i)
+            ENDDO
+
+!--         exchange csf fields between processors
+            CALL radiation_write_debug_log( 'Exchange csf fields between processors' )
+            udim = max(npcsfl,1)
+            ALLOCATE( pcsflt_l(ndcsf*udim) )
+            pcsflt(1:ndcsf,1:udim) => pcsflt_l(1:ndcsf*udim)
+            ALLOCATE( kpcsflt_l(kdcsf*udim) )
+            kpcsflt(1:kdcsf,1:udim) => kpcsflt_l(1:kdcsf*udim)
+            CALL MPI_AlltoAllv(csflt_l, ndcsf*icsflt, ndcsf*dcsflt, MPI_REAL, &
+                pcsflt_l, ndcsf*ipcsflt, ndcsf*dpcsflt, MPI_REAL, comm2d, ierr)
+            IF ( ierr /= 0 ) THEN
+                WRITE(9,*) 'Error MPI_AlltoAllv1:', ierr, SIZE(ipcsflt), ndcsf*icsflt, &
+                            ndcsf*dcsflt, SIZE(pcsflt_l),ndcsf*ipcsflt, ndcsf*dpcsflt
+                FLUSH(9)
+            ENDIF
+
+            CALL MPI_AlltoAllv(kcsflt_l, kdcsf*icsflt, kdcsf*dcsflt, MPI_INTEGER, &
+                kpcsflt_l, kdcsf*ipcsflt, kdcsf*dpcsflt, MPI_INTEGER, comm2d, ierr)
+            IF ( ierr /= 0 ) THEN
+                WRITE(9,*) 'Error MPI_AlltoAllv2:', ierr, SIZE(kcsflt_l),kdcsf*icsflt, &
+                           kdcsf*dcsflt, SIZE(kpcsflt_l), kdcsf*ipcsflt, kdcsf*dpcsflt
+                FLUSH(9)
+            ENDIF
+            
+#else
+            npcsfl = ncsfl
+            ALLOCATE( pcsflt(ndcsf,max(npcsfl,ndcsf)) )
+            ALLOCATE( kpcsflt(kdcsf,max(npcsfl,kdcsf)) )
+            pcsflt = csflt
+            kpcsflt = kcsflt
+#endif
+
+!--         deallocate temporary arrays
+            DEALLOCATE( csflt_l )
+            DEALLOCATE( kcsflt_l )
+            DEALLOCATE( icsflt )
+            DEALLOCATE( dcsflt )
+            DEALLOCATE( ipcsflt )
+            DEALLOCATE( dpcsflt )
+
+!--         sort csf ( a version of quicksort )
+            CALL radiation_write_debug_log( 'Sort csf' )
+            CALL quicksort_csf2(kpcsflt, pcsflt, 1, npcsfl)
+
+!--         aggregate canopy sink factor records with identical box & source
+!--         againg across all values from all processors
+            CALL radiation_write_debug_log( 'Aggregate canopy sink factor records with identical box' )
+
+            IF ( npcsfl > 0 )  THEN
+                icsf = 1 !< reading index
+                kcsf = 1 !< writing index
+                DO while (icsf < npcsfl)
+!--                 here kpcsf(kcsf) already has values from kpcsf(icsf)
+                    IF ( kpcsflt(3,icsf) == kpcsflt(3,icsf+1)  .AND.  &
+                         kpcsflt(2,icsf) == kpcsflt(2,icsf+1)  .AND.  &
+                         kpcsflt(1,icsf) == kpcsflt(1,icsf+1)  .AND.  &
+                         kpcsflt(4,icsf) == kpcsflt(4,icsf+1) )  THEN
+
+                        pcsflt(1,kcsf) = pcsflt(1,kcsf) + pcsflt(1,icsf+1)
+
+!--                     advance reading index, keep writing index
+                        icsf = icsf + 1
+                    ELSE
+!--                     not identical, just advance and copy
+                        icsf = icsf + 1
+                        kcsf = kcsf + 1
+                        kpcsflt(:,kcsf) = kpcsflt(:,icsf)
+                        pcsflt(:,kcsf) = pcsflt(:,icsf)
+                    ENDIF
+                ENDDO
+!--             last written item is now also the last item in valid part of array
+                npcsfl = kcsf
+            ENDIF
+
+            ncsfl = npcsfl
+            IF ( ncsfl > 0 )  THEN
+                ALLOCATE( csf(ndcsf,ncsfl) )
+                ALLOCATE( csfsurf(idcsf,ncsfl) )
+                DO icsf = 1, ncsfl
+                    csf(:,icsf) = pcsflt(:,icsf)
+                    csfsurf(1,icsf) =  gridpcbl(kpcsflt(1,icsf),kpcsflt(2,icsf),kpcsflt(3,icsf))
+                    csfsurf(2,icsf) =  kpcsflt(4,icsf)
+                ENDDO
+            ENDIF
+            
+!--         deallocation of temporary arrays
+            IF ( npcbl > 0 )  DEALLOCATE( gridpcbl )
+            DEALLOCATE( pcsflt_l )
+            DEALLOCATE( kpcsflt_l )
+            CALL radiation_write_debug_log( 'End of aggregate csf' )
+            
+        ENDIF
+
+#if defined( __parallel )
+        CALL MPI_BARRIER( comm2d, ierr )
+#endif
+        CALL radiation_write_debug_log( 'End of radiation_calc_svf (after mpi_barrier)' )
+
+        RETURN
+        
+!        WRITE( message_string, * )  &
+!            'I/O error when processing shape view factors / ',  &
+!            'plant canopy sink factors / direct irradiance factors.'
+!        CALL message( 'init_urban_surface', 'PA0502', 2, 2, 0, 6, 0 )
+       
+    END SUBROUTINE radiation_calc_svf
+
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Raytracing for detecting obstacles and calculating compound canopy sink
+!> factors. (A simple obstacle detection would only need to process faces in
+!> 3 dimensions without any ordering.)
+!> Assumtions:
+!> -----------
+!> 1. The ray always originates from a face midpoint (only one coordinate equals
+!>    *.5, i.e. wall) and doesn't travel parallel to the surface (that would mean
+!>    shape factor=0). Therefore, the ray may never travel exactly along a face
+!>    or an edge.
+!> 2. From grid bottom to urban surface top the grid has to be *equidistant*
+!>    within each of the dimensions, including vertical (but the resolution
+!>    doesn't need to be the same in all three dimensions).
+!------------------------------------------------------------------------------!
+    SUBROUTINE raytrace(src, targ, isrc, difvf, atarg, create_csf, visible, transparency)
+        IMPLICIT NONE
+
+        REAL(wp), DIMENSION(3), INTENT(in)     :: src, targ    !< real coordinates z,y,x
+        INTEGER(iwp), INTENT(in)               :: isrc         !< index of source face for csf
+        REAL(wp), INTENT(in)                   :: difvf        !< differential view factor for csf
+        REAL(wp), INTENT(in)                   :: atarg        !< target surface area for csf
+        LOGICAL, INTENT(in)                    :: create_csf   !< whether to generate new CSFs during raytracing
+        LOGICAL, INTENT(out)                   :: visible
+        REAL(wp), INTENT(out)                  :: transparency !< along whole path
+        INTEGER(iwp)                           :: i, k, d
+        INTEGER(iwp)                           :: seldim       !< dimension to be incremented
+        INTEGER(iwp)                           :: ncsb         !< no of written plant canopy sinkboxes
+        INTEGER(iwp)                           :: maxboxes     !< max no of gridboxes visited
+        REAL(wp)                               :: distance     !< euclidean along path
+        REAL(wp)                               :: crlen        !< length of gridbox crossing
+        REAL(wp)                               :: lastdist     !< beginning of current crossing
+        REAL(wp)                               :: nextdist     !< end of current crossing
+        REAL(wp)                               :: realdist     !< distance in meters per unit distance
+        REAL(wp)                               :: crmid        !< midpoint of crossing
+        REAL(wp)                               :: cursink      !< sink factor for current canopy box
+        REAL(wp), DIMENSION(3)                 :: delta        !< path vector
+        REAL(wp), DIMENSION(3)                 :: uvect        !< unit vector
+        REAL(wp), DIMENSION(3)                 :: dimnextdist  !< distance for each dimension increments
+        INTEGER(iwp), DIMENSION(3)             :: box          !< gridbox being crossed
+        INTEGER(iwp), DIMENSION(3)             :: dimnext      !< next dimension increments along path
+        INTEGER(iwp), DIMENSION(3)             :: dimdelta     !< dimension direction = +- 1
+        INTEGER(iwp)                           :: px, py       !< number of processors in x and y dir before 
+                                                               !< the processor in the question
+        INTEGER(iwp)                           :: ip           !< number of processor where gridbox reside
+        INTEGER(iwp)                           :: ig           !< 1D index of gridbox in global 2D array
+        REAL(wp)                               :: lad_s_target !< recieved lad_s of particular grid box
+
+!
+!--     Maximum number of gridboxes visited equals to maximum number of boundaries crossed in each dimension plus one. That's also
+!--     the maximum number of plant canopy boxes written. We grow the acsf array accordingly using exponential factor.
+        maxboxes = SUM(ABS(NINT(targ, iwp) - NINT(src, iwp))) + 1
+        IF ( plant_canopy  .AND.  ncsfl + maxboxes > ncsfla )  THEN
+!--         use this code for growing by fixed exponential increments (equivalent to case where ncsfl always increases by 1)
+!--         k = CEILING(grow_factor ** real(CEILING(log(real(ncsfl + maxboxes, kind=wp)) &
+!--                                                / log(grow_factor)), kind=wp))
+!--         or use this code to simply always keep some extra space after growing
+            k = CEILING(REAL(ncsfl + maxboxes, kind=wp) * grow_factor)
+
+            CALL merge_and_grow_csf(k)
+        ENDIF
+        
+        transparency = 1._wp
+        ncsb = 0
+
+        delta(:) = targ(:) - src(:)
+        distance = SQRT(SUM(delta(:)**2))
+        IF ( distance == 0._wp )  THEN
+            visible = .TRUE.
+            RETURN
+        ENDIF
+        uvect(:) = delta(:) / distance
+        realdist = SQRT(SUM( (uvect(:)*(/dz(1),dy,dx/))**2 ))
+
+        lastdist = 0._wp
+
+!--     Since all face coordinates have values *.5 and we'd like to use
+!--     integers, all these have .5 added
+        DO d = 1, 3
+            IF ( uvect(d) == 0._wp )  THEN
+                dimnext(d) = 999999999
+                dimdelta(d) = 999999999
+                dimnextdist(d) = 1.0E20_wp
+            ELSE IF ( uvect(d) > 0._wp )  THEN
+                dimnext(d) = CEILING(src(d) + .5_wp)
+                dimdelta(d) = 1
+                dimnextdist(d) = (dimnext(d) - .5_wp - src(d)) / uvect(d)
+            ELSE
+                dimnext(d) = FLOOR(src(d) + .5_wp)
+                dimdelta(d) = -1
+                dimnextdist(d) = (dimnext(d) - .5_wp - src(d)) / uvect(d)
+            ENDIF
+        ENDDO
+
+        DO
+!--         along what dimension will the next wall crossing be?
+            seldim = minloc(dimnextdist, 1)
+            nextdist = dimnextdist(seldim)
+            IF ( nextdist > distance ) nextdist = distance
+
+            crlen = nextdist - lastdist
+            IF ( crlen > .001_wp )  THEN
+                crmid = (lastdist + nextdist) * .5_wp
+                box = NINT(src(:) + uvect(:) * crmid, iwp)
+
+!--             calculate index of the grid with global indices (box(2),box(3))
+!--             in the array nzterr and plantt and id of the coresponding processor
+                px = box(3)/nnx
+                py = box(2)/nny
+                ip = px*pdims(2)+py
+                ig = ip*nnx*nny + (box(3)-px*nnx)*nny + box(2)-py*nny
+                IF ( box(1) <= nzterr(ig) )  THEN
+                    visible = .FALSE.
+                    RETURN
+                ENDIF
+
+                IF ( plant_canopy )  THEN
+                    IF ( box(1) <= plantt(ig) )  THEN
+                        ncsb = ncsb + 1
+                        boxes(:,ncsb) = box
+                        crlens(ncsb) = crlen
+#if defined( __parallel )
+                        lad_ip(ncsb) = ip
+                        lad_disp(ncsb) = (box(3)-px*nnx)*(nny*nzp) + (box(2)-py*nny)*nzp + box(1)-nzub
+#endif
+                    ENDIF
+                ENDIF
+            ENDIF
+
+            IF ( nextdist >= distance ) EXIT
+            lastdist = nextdist
+            dimnext(seldim) = dimnext(seldim) + dimdelta(seldim)
+            dimnextdist(seldim) = (dimnext(seldim) - .5_wp - src(seldim)) / uvect(seldim)
+        ENDDO
+        
+        IF ( plant_canopy )  THEN
+#if defined( __parallel )
+            IF ( raytrace_mpi_rma )  THEN
+!--             send requests for lad_s to appropriate processor
+                CALL cpu_log( log_point_s(77), 'rad_rma_lad', 'start' )
+                DO i = 1, ncsb
+                    CALL MPI_Get(lad_s_ray(i), 1, MPI_REAL, lad_ip(i), lad_disp(i), &
+                                 1, MPI_REAL, win_lad, ierr)
+                    IF ( ierr /= 0 )  THEN
+                        WRITE(9,*) 'Error MPI_Get1:', ierr, lad_s_ray(i), &
+                                   lad_ip(i), lad_disp(i), win_lad
+                        FLUSH(9)
+                    ENDIF
+                ENDDO
+                
+!--             wait for all pending local requests complete
+                CALL MPI_Win_flush_local_all(win_lad, ierr)
+                IF ( ierr /= 0 )  THEN
+                    WRITE(9,*) 'Error MPI_Win_flush_local_all1:', ierr, win_lad
+                    FLUSH(9)
+                ENDIF
+                CALL cpu_log( log_point_s(77), 'rad_rma_lad', 'stop' )
+                
+            ENDIF
+#endif
+
+!--         calculate csf and transparency
+            DO i = 1, ncsb
+#if defined( __parallel )
+                IF ( raytrace_mpi_rma )  THEN
+                    lad_s_target = lad_s_ray(i)
+                ELSE
+                    lad_s_target = sub_lad_g(lad_ip(i)*nnx*nny*nzp + lad_disp(i))
+                ENDIF
+#else
+                lad_s_target = sub_lad(boxes(1,i),boxes(2,i),boxes(3,i))
+#endif
+                cursink = 1._wp - exp(-ext_coef * lad_s_target * crlens(i)*realdist)
+
+                IF ( create_csf )  THEN
+!--                 write svf values into the array
+                    ncsfl = ncsfl + 1
+                    acsf(ncsfl)%ip = lad_ip(i)
+                    acsf(ncsfl)%itx = boxes(3,i)
+                    acsf(ncsfl)%ity = boxes(2,i)
+                    acsf(ncsfl)%itz = boxes(1,i)
+                    acsf(ncsfl)%isurfs = isrc
+                    acsf(ncsfl)%rcvf = cursink*transparency*difvf*atarg
+                ENDIF  !< create_csf
+
+                transparency = transparency * (1._wp - cursink)
+                
+            ENDDO
+        ENDIF
+        
+        visible = .TRUE.
+
+    END SUBROUTINE raytrace
+    
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> A new, more efficient version of ray tracing algorithm that processes a whole
+!> arc instead of a single ray.
+!>
+!> In all comments, horizon means tangent of horizon angle, i.e.
+!> vertical_delta / horizontal_distance
+!------------------------------------------------------------------------------!
+   SUBROUTINE raytrace_2d(origin, yxdir, nrays, zdirs, iorig, aorig, vffrac,  &
+                              calc_svf, create_csf, skip_1st_pcb,             &
+                              lowest_free_ray, transparency, itarget)
+      IMPLICIT NONE
+
+      REAL(wp), DIMENSION(3), INTENT(IN)     ::  origin        !< z,y,x coordinates of ray origin
+      REAL(wp), DIMENSION(2), INTENT(IN)     ::  yxdir         !< y,x *unit* vector of ray direction (in grid units)
+      INTEGER(iwp)                           ::  nrays         !< number of rays (z directions) to raytrace
+      REAL(wp), DIMENSION(nrays), INTENT(IN) ::  zdirs         !< list of z directions to raytrace (z/hdist, grid, zenith->nadir)
+      INTEGER(iwp), INTENT(in)               ::  iorig         !< index of origin face for csf
+      REAL(wp), INTENT(in)                   ::  aorig         !< origin face area for csf
+      REAL(wp), DIMENSION(nrays), INTENT(in) ::  vffrac        !< view factor fractions of each ray for csf
+      LOGICAL, INTENT(in)                    ::  calc_svf      !< whether to calculate SFV (identify obstacle surfaces)
+      LOGICAL, INTENT(in)                    ::  create_csf    !< whether to create canopy sink factors
+      LOGICAL, INTENT(in)                    ::  skip_1st_pcb  !< whether to skip first plant canopy box during raytracing
+      INTEGER(iwp), INTENT(out)              ::  lowest_free_ray !< index into zdirs
+      REAL(wp), DIMENSION(nrays), INTENT(OUT) ::  transparency !< transparencies of zdirs paths
+      INTEGER(iwp), DIMENSION(nrays), INTENT(OUT) ::  itarget  !< global indices of target faces for zdirs
+
+      INTEGER(iwp), DIMENSION(nrays)         ::  target_procs
+      REAL(wp)                               ::  horizon       !< highest horizon found after raytracing (z/hdist)
+      INTEGER(iwp)                           ::  i, k, l, d
+      INTEGER(iwp)                           ::  seldim       !< dimension to be incremented
+      REAL(wp), DIMENSION(2)                 ::  yxorigin     !< horizontal copy of origin (y,x)
+      REAL(wp)                               ::  distance     !< euclidean along path
+      REAL(wp)                               ::  lastdist     !< beginning of current crossing
+      REAL(wp)                               ::  nextdist     !< end of current crossing
+      REAL(wp)                               ::  crmid        !< midpoint of crossing
+      REAL(wp)                               ::  horz_entry   !< horizon at entry to column
+      REAL(wp)                               ::  horz_exit    !< horizon at exit from column
+      REAL(wp)                               ::  bdydim       !< boundary for current dimension
+      REAL(wp), DIMENSION(2)                 ::  crossdist    !< distances to boundary for dimensions
+      REAL(wp), DIMENSION(2)                 ::  dimnextdist  !< distance for each dimension increments
+      INTEGER(iwp), DIMENSION(2)             ::  column       !< grid column being crossed
+      INTEGER(iwp), DIMENSION(2)             ::  dimnext      !< next dimension increments along path
+      INTEGER(iwp), DIMENSION(2)             ::  dimdelta     !< dimension direction = +- 1
+      INTEGER(iwp)                           ::  px, py       !< number of processors in x and y dir before 
+                                                              !< the processor in the question
+      INTEGER(iwp)                           ::  ip           !< number of processor where gridbox reside
+      INTEGER(iwp)                           ::  ig           !< 1D index of gridbox in global 2D array
+      INTEGER(iwp)                           ::  wcount       !< RMA window item count
+      INTEGER(iwp)                           ::  maxboxes     !< max no of CSF created
+      INTEGER(iwp)                           ::  nly          !< maximum  plant canopy height 
+      INTEGER(iwp)                           ::  ntrack
+      REAL(wp)                               ::  zbottom, ztop !< urban surface boundary in real numbers
+      REAL(wp)                               ::  zorig        !< z coordinate of ray column entry
+      REAL(wp)                               ::  zexit        !< z coordinate of ray column exit
+      REAL(wp)                               ::  qdist        !< ratio of real distance to z coord difference
+      REAL(wp)                               ::  dxxyy        !< square of real horizontal distance
+      REAL(wp)                               ::  curtrans     !< transparency of current PC box crossing
+      INTEGER(iwp)                           ::  zb0
+      INTEGER(iwp)                           ::  zb1
+      INTEGER(iwp)                           ::  nz
+      INTEGER(iwp)                           ::  iz
+      INTEGER(iwp)                           ::  zsgn
+      INTEGER(iwp)                           ::  lowest_lad   !< lowest column cell for which we need LAD
+      INTEGER(iwp)                           ::  lastdir      !< wall direction before hitting this column
+      INTEGER(iwp), DIMENSION(2)             ::  lastcolumn
+
+#if defined( __parallel )
+      INTEGER(MPI_ADDRESS_KIND)              ::  wdisp        !< RMA window displacement
+#endif
+      
+      yxorigin(:) = origin(2:3)
+      transparency(:) = 1._wp !-- Pre-set the all rays to transparent before reducing
+      horizon = -HUGE(1._wp)
+      lowest_free_ray = nrays
+      IF ( rad_angular_discretization  .AND.  calc_svf )  THEN
+         ALLOCATE(target_surfl(nrays))
+         target_surfl(:) = -1
+         lastdir = -999
+         lastcolumn(:) = -999
+      ENDIF
+
+!--   Determine distance to boundary (in 2D xy)
+      IF ( yxdir(1) > 0._wp )  THEN
+         bdydim = ny + .5_wp !< north global boundary
+         crossdist(1) = (bdydim - yxorigin(1)) / yxdir(1)
+      ELSEIF ( yxdir(1) == 0._wp )  THEN
+         crossdist(1) = HUGE(1._wp)
+      ELSE
+          bdydim = -.5_wp !< south global boundary
+          crossdist(1) = (bdydim - yxorigin(1)) / yxdir(1)
+      ENDIF
+
+      IF ( yxdir(2) >= 0._wp )  THEN
+          bdydim = nx + .5_wp !< east global boundary
+          crossdist(2) = (bdydim - yxorigin(2)) / yxdir(2)
+      ELSEIF ( yxdir(2) == 0._wp )  THEN
+         crossdist(2) = HUGE(1._wp)
+      ELSE
+          bdydim = -.5_wp !< west global boundary
+          crossdist(2) = (bdydim - yxorigin(2)) / yxdir(2)
+      ENDIF
+      distance = minval(crossdist, 1)
+
+      IF ( plant_canopy )  THEN
+         rt2_track_dist(0) = 0._wp
+         rt2_track_lad(:,:) = 0._wp
+         nly = plantt_max - nzub + 1
+      ENDIF
+
+      lastdist = 0._wp
+
+!--   Since all face coordinates have values *.5 and we'd like to use
+!--   integers, all these have .5 added
+      DO  d = 1, 2
+          IF ( yxdir(d) == 0._wp )  THEN
+              dimnext(d) = HUGE(1_iwp)
+              dimdelta(d) = HUGE(1_iwp)
+              dimnextdist(d) = HUGE(1._wp)
+          ELSE IF ( yxdir(d) > 0._wp )  THEN
+              dimnext(d) = FLOOR(yxorigin(d) + .5_wp) + 1
+              dimdelta(d) = 1
+              dimnextdist(d) = (dimnext(d) - .5_wp - yxorigin(d)) / yxdir(d)
+          ELSE
+              dimnext(d) = CEILING(yxorigin(d) + .5_wp) - 1
+              dimdelta(d) = -1
+              dimnextdist(d) = (dimnext(d) - .5_wp - yxorigin(d)) / yxdir(d)
+          ENDIF
+      ENDDO
+
+      ntrack = 0
+      DO
+!--      along what dimension will the next wall crossing be?
+         seldim = minloc(dimnextdist, 1)
+         nextdist = dimnextdist(seldim)
+         IF ( nextdist > distance )  nextdist = distance
+
+         IF ( nextdist > lastdist )  THEN
+            ntrack = ntrack + 1
+            crmid = (lastdist + nextdist) * .5_wp
+            column = NINT(yxorigin(:) + yxdir(:) * crmid, iwp)
+
+!--         calculate index of the grid with global indices (column(1),column(2))
+!--         in the array nzterr and plantt and id of the coresponding processor
+            px = column(2)/nnx
+            py = column(1)/nny
+            ip = px*pdims(2)+py
+            ig = ip*nnx*nny + (column(2)-px*nnx)*nny + column(1)-py*nny
+
+            IF ( lastdist == 0._wp )  THEN
+               horz_entry = -HUGE(1._wp)
+            ELSE
+               horz_entry = (REAL(nzterr(ig), wp) + .5_wp - origin(1)) / lastdist
+            ENDIF
+            horz_exit = (REAL(nzterr(ig), wp) + .5_wp - origin(1)) / nextdist
+
+            IF ( rad_angular_discretization  .AND.  calc_svf )  THEN
+!
+!--            Identify vertical obstacles hit by rays in current column
+               DO WHILE ( lowest_free_ray > 0 )
+                  IF ( zdirs(lowest_free_ray) > horz_entry )  EXIT
+!
+!--               This may only happen after 1st column, so lastdir and lastcolumn are valid
+                  CALL request_itarget(lastdir,                                         &
+                        CEILING(-0.5_wp + origin(1) + zdirs(lowest_free_ray)*lastdist), &
+                        lastcolumn(1), lastcolumn(2),                                   &
+                        target_surfl(lowest_free_ray), target_procs(lowest_free_ray))
+                  lowest_free_ray = lowest_free_ray - 1
+               ENDDO
+!
+!--            Identify horizontal obstacles hit by rays in current column
+               DO WHILE ( lowest_free_ray > 0 )
+                  IF ( zdirs(lowest_free_ray) > horz_exit )  EXIT
+                  CALL request_itarget(iup_u, nzterr(ig)+1, column(1), column(2), &
+                                       target_surfl(lowest_free_ray),           &
+                                       target_procs(lowest_free_ray))
+                  lowest_free_ray = lowest_free_ray - 1
+               ENDDO
+            ENDIF
+
+            horizon = MAX(horizon, horz_entry, horz_exit)
+
+            IF ( plant_canopy )  THEN
+               rt2_track(:, ntrack) = column(:)
+               rt2_track_dist(ntrack) = nextdist
+            ENDIF
+         ENDIF
+
+         IF ( nextdist >= distance )  EXIT
+
+         IF ( rad_angular_discretization  .AND.  calc_svf )  THEN
+!
+!--         Save wall direction of coming building column (= this air column)
+            IF ( seldim == 1 )  THEN
+               IF ( dimdelta(seldim) == 1 )  THEN
+                  lastdir = isouth_u
+               ELSE
+                  lastdir = inorth_u
+               ENDIF
+            ELSE
+               IF ( dimdelta(seldim) == 1 )  THEN
+                  lastdir = iwest_u
+               ELSE
+                  lastdir = ieast_u
+               ENDIF
+            ENDIF
+            lastcolumn = column
+         ENDIF
+         lastdist = nextdist
+         dimnext(seldim) = dimnext(seldim) + dimdelta(seldim)
+         dimnextdist(seldim) = (dimnext(seldim) - .5_wp - yxorigin(seldim)) / yxdir(seldim)
+      ENDDO
+
+      IF ( plant_canopy )  THEN
+!--      Request LAD WHERE applicable
+!--      
+#if defined( __parallel )
+         IF ( raytrace_mpi_rma )  THEN
+!--         send requests for lad_s to appropriate processor
+            !CALL cpu_log( log_point_s(77), 'usm_init_rma', 'start' )
+            DO  i = 1, ntrack
+               px = rt2_track(2,i)/nnx
+               py = rt2_track(1,i)/nny
+               ip = px*pdims(2)+py
+               ig = ip*nnx*nny + (rt2_track(2,i)-px*nnx)*nny + rt2_track(1,i)-py*nny
+
+               IF ( rad_angular_discretization  .AND.  calc_svf )  THEN
+!
+!--               For fixed view resolution, we need plant canopy even for rays
+!--               to opposing surfaces
+                  lowest_lad = nzterr(ig) + 1
+               ELSE
+!
+!--               We only need LAD for rays directed above horizon (to sky)
+                  lowest_lad = CEILING( -0.5_wp + origin(1) +            &
+                                    MIN( horizon * rt2_track_dist(i-1),  & ! entry
+                                         horizon * rt2_track_dist(i)   ) ) ! exit
+               ENDIF
+!
+!--            Skip asking for LAD where all plant canopy is under requested level
+               IF ( plantt(ig) < lowest_lad )  CYCLE
+
+               wdisp = (rt2_track(2,i)-px*nnx)*(nny*nzp) + (rt2_track(1,i)-py*nny)*nzp + lowest_lad-nzub
+               wcount = plantt(ig)-lowest_lad+1
+               ! TODO send request ASAP - even during raytracing
+               CALL MPI_Get(rt2_track_lad(lowest_lad:plantt(ig), i), wcount, MPI_REAL, ip,    &
+                            wdisp, wcount, MPI_REAL, win_lad, ierr)
+               IF ( ierr /= 0 )  THEN
+                  WRITE(9,*) 'Error MPI_Get2:', ierr, rt2_track_lad(lowest_lad:plantt(ig), i), &
+                             wcount, ip, wdisp, win_lad
+                  FLUSH(9)
+               ENDIF
+            ENDDO
+
+!--         wait for all pending local requests complete
+            ! TODO WAIT selectively for each column later when needed
+            CALL MPI_Win_flush_local_all(win_lad, ierr)
+            IF ( ierr /= 0 )  THEN
+               WRITE(9,*) 'Error MPI_Win_flush_local_all2:', ierr, win_lad
+               FLUSH(9)
+            ENDIF
+            !CALL cpu_log( log_point_s(77), 'usm_init_rma', 'stop' )
+
+         ELSE ! raytrace_mpi_rma = .F.
+            DO  i = 1, ntrack
+               px = rt2_track(2,i)/nnx
+               py = rt2_track(1,i)/nny
+               ip = px*pdims(2)+py
+               ig = ip*nnx*nny*nzp + (rt2_track(2,i)-px*nnx)*(nny*nzp) + (rt2_track(1,i)-py*nny)*nzp
+               rt2_track_lad(nzub:plantt_max, i) = sub_lad_g(ig:ig+nly-1)
+            ENDDO
+         ENDIF
+#else
+         DO  i = 1, ntrack
+            rt2_track_lad(nzub:plantt_max, i) = sub_lad(rt2_track(1,i), rt2_track(2,i), nzub:plantt_max)
+         ENDDO
+#endif
+      ENDIF ! plant_canopy
+
+      IF ( rad_angular_discretization  .AND.  calc_svf )  THEN
+#if defined( __parallel )
+!--      wait for all gridsurf requests to complete
+         CALL MPI_Win_flush_local_all(win_gridsurf, ierr)
+         IF ( ierr /= 0 )  THEN
+            WRITE(9,*) 'Error MPI_Win_flush_local_all3:', ierr, win_gridsurf
+            FLUSH(9)
+         ENDIF
+#endif
+!
+!--      recalculate local surf indices into global ones
+         DO i = 1, nrays
+            IF ( target_surfl(i) == -1 )  THEN
+               itarget(i) = -1
+            ELSE
+               itarget(i) = target_surfl(i) + surfstart(target_procs(i))
+            ENDIF
+         ENDDO
+         
+         DEALLOCATE( target_surfl )
+         
+      ELSE
+         itarget(:) = -1
+      ENDIF ! rad_angular_discretization
+
+      IF ( plant_canopy )  THEN
+!--      Skip the PCB around origin if requested (for MRT, the PCB might not be there)
+!--      
+         IF ( skip_1st_pcb  .AND.  NINT(origin(1)) <= plantt_max )  THEN
+            rt2_track_lad(NINT(origin(1), iwp), 1) = 0._wp
+         ENDIF
+
+!--      Assert that we have space allocated for CSFs
+!--      
+         maxboxes = (ntrack + MAX(CEILING(origin(1)-.5_wp) - nzub,          &
+                                  nzut - CEILING(origin(1)-.5_wp))) * nrays
+         IF ( ncsfl + maxboxes > ncsfla )  THEN
+!--         use this code for growing by fixed exponential increments (equivalent to case where ncsfl always increases by 1)
+!--         k = CEILING(grow_factor ** real(CEILING(log(real(ncsfl + maxboxes, kind=wp)) &
+!--                                                / log(grow_factor)), kind=wp))
+!--         or use this code to simply always keep some extra space after growing
+            k = CEILING(REAL(ncsfl + maxboxes, kind=wp) * grow_factor)
+            CALL merge_and_grow_csf(k)
+         ENDIF
+
+!--      Calculate transparencies and store new CSFs
+!--      
+         zbottom = REAL(nzub, wp) - .5_wp
+         ztop = REAL(plantt_max, wp) + .5_wp
+
+!--      Reverse direction of radiation (face->sky), only when calc_svf
+!--      
+         IF ( calc_svf )  THEN
+            DO  i = 1, ntrack ! for each column
+               dxxyy = ((dy*yxdir(1))**2 + (dx*yxdir(2))**2) * (rt2_track_dist(i)-rt2_track_dist(i-1))**2
+               px = rt2_track(2,i)/nnx
+               py = rt2_track(1,i)/nny
+               ip = px*pdims(2)+py
+
+               DO  k = 1, nrays ! for each ray
+!
+!--               NOTE 6778:
+!--               With traditional svf discretization, CSFs under the horizon
+!--               (i.e. for surface to surface radiation)  are created in
+!--               raytrace(). With rad_angular_discretization, we must create
+!--               CSFs under horizon only for one direction, otherwise we would
+!--               have duplicate amount of energy. Although we could choose
+!--               either of the two directions (they differ only by
+!--               discretization error with no bias), we choose the the backward
+!--               direction, because it tends to cumulate high canopy sink
+!--               factors closer to raytrace origin, i.e. it should potentially
+!--               cause less moiree.
+                  IF ( .NOT. rad_angular_discretization )  THEN
+                     IF ( zdirs(k) <= horizon )  CYCLE
+                  ENDIF
+
+                  zorig = origin(1) + zdirs(k) * rt2_track_dist(i-1)
+                  IF ( zorig <= zbottom  .OR.  zorig >= ztop )  CYCLE
+
+                  zsgn = INT(SIGN(1._wp, zdirs(k)), iwp)
+                  rt2_dist(1) = 0._wp
+                  IF ( zdirs(k) == 0._wp )  THEN ! ray is exactly horizontal
+                     nz = 2
+                     rt2_dist(nz) = SQRT(dxxyy)
+                     iz = CEILING(-.5_wp + zorig, iwp)
+                  ELSE
+                     zexit = MIN(MAX(origin(1) + zdirs(k) * rt2_track_dist(i), zbottom), ztop)
+
+                     zb0 = FLOOR(  zorig * zsgn - .5_wp) + 1  ! because it must be greater than orig
+                     zb1 = CEILING(zexit * zsgn - .5_wp) - 1  ! because it must be smaller than exit
+                     nz = MAX(zb1 - zb0 + 3, 2)
+                     rt2_dist(nz) = SQRT(((zexit-zorig)*dz(1))**2 + dxxyy)
+                     qdist = rt2_dist(nz) / (zexit-zorig)
+                     rt2_dist(2:nz-1) = (/( ((REAL(l, wp) + .5_wp) * zsgn - zorig) * qdist , l = zb0, zb1 )/)
+                     iz = zb0 * zsgn
+                  ENDIF
+
+                  DO  l = 2, nz
+                     IF ( rt2_track_lad(iz, i) > 0._wp )  THEN
+                        curtrans = exp(-ext_coef * rt2_track_lad(iz, i) * (rt2_dist(l)-rt2_dist(l-1)))
+
+                        IF ( create_csf )  THEN
+                           ncsfl = ncsfl + 1
+                           acsf(ncsfl)%ip = ip
+                           acsf(ncsfl)%itx = rt2_track(2,i)
+                           acsf(ncsfl)%ity = rt2_track(1,i)
+                           acsf(ncsfl)%itz = iz
+                           acsf(ncsfl)%isurfs = iorig
+                           acsf(ncsfl)%rcvf = (1._wp - curtrans)*transparency(k)*vffrac(k)
+                        ENDIF
+
+                        transparency(k) = transparency(k) * curtrans
+                     ENDIF
+                     iz = iz + zsgn
+                  ENDDO ! l = 1, nz - 1
+               ENDDO ! k = 1, nrays
+            ENDDO ! i = 1, ntrack
+
+            transparency(1:lowest_free_ray) = 1._wp !-- Reset rays above horizon to transparent (see NOTE 6778)
+         ENDIF
+
+!--      Forward direction of radiation (sky->face), always
+!--      
+         DO  i = ntrack, 1, -1 ! for each column backwards
+            dxxyy = ((dy*yxdir(1))**2 + (dx*yxdir(2))**2) * (rt2_track_dist(i)-rt2_track_dist(i-1))**2
+            px = rt2_track(2,i)/nnx
+            py = rt2_track(1,i)/nny
+            ip = px*pdims(2)+py
+
+            DO  k = 1, nrays ! for each ray
+!
+!--            See NOTE 6778 above
+               IF ( zdirs(k) <= horizon )  CYCLE
+
+               zexit = origin(1) + zdirs(k) * rt2_track_dist(i-1)
+               IF ( zexit <= zbottom  .OR.  zexit >= ztop )  CYCLE
+
+               zsgn = -INT(SIGN(1._wp, zdirs(k)), iwp)
+               rt2_dist(1) = 0._wp
+               IF ( zdirs(k) == 0._wp )  THEN ! ray is exactly horizontal
+                  nz = 2
+                  rt2_dist(nz) = SQRT(dxxyy)
+                  iz = NINT(zexit, iwp)
+               ELSE
+                  zorig = MIN(MAX(origin(1) + zdirs(k) * rt2_track_dist(i), zbottom), ztop)
+
+                  zb0 = FLOOR(  zorig * zsgn - .5_wp) + 1  ! because it must be greater than orig
+                  zb1 = CEILING(zexit * zsgn - .5_wp) - 1  ! because it must be smaller than exit
+                  nz = MAX(zb1 - zb0 + 3, 2)
+                  rt2_dist(nz) = SQRT(((zexit-zorig)*dz(1))**2 + dxxyy)
+                  qdist = rt2_dist(nz) / (zexit-zorig)
+                  rt2_dist(2:nz-1) = (/( ((REAL(l, wp) + .5_wp) * zsgn - zorig) * qdist , l = zb0, zb1 )/)
+                  iz = zb0 * zsgn
+               ENDIF
+
+               DO  l = 2, nz
+                  IF ( rt2_track_lad(iz, i) > 0._wp )  THEN
+                     curtrans = exp(-ext_coef * rt2_track_lad(iz, i) * (rt2_dist(l)-rt2_dist(l-1)))
+
+                     IF ( create_csf )  THEN
+                        ncsfl = ncsfl + 1
+                        acsf(ncsfl)%ip = ip
+                        acsf(ncsfl)%itx = rt2_track(2,i)
+                        acsf(ncsfl)%ity = rt2_track(1,i)
+                        acsf(ncsfl)%itz = iz
+                        IF ( itarget(k) /= -1 )  ERROR STOP !FIXME remove after test
+                        acsf(ncsfl)%isurfs = -1
+                        acsf(ncsfl)%rcvf = (1._wp - curtrans)*transparency(k)*aorig*vffrac(k)
+                     ENDIF  ! create_csf
+
+                     transparency(k) = transparency(k) * curtrans
+                  ENDIF
+                  iz = iz + zsgn
+               ENDDO ! l = 1, nz - 1
+            ENDDO ! k = 1, nrays
+         ENDDO ! i = 1, ntrack
+      ENDIF ! plant_canopy
+
+      IF ( .NOT. (rad_angular_discretization  .AND.  calc_svf) )  THEN
+!
+!--      Just update lowest_free_ray according to horizon
+         DO WHILE ( lowest_free_ray > 0 )
+            IF ( zdirs(lowest_free_ray) > horizon )  EXIT
+            lowest_free_ray = lowest_free_ray - 1
+         ENDDO
+      ENDIF
+
+   CONTAINS
+
+      SUBROUTINE request_itarget( d, z, y, x, isurfl, iproc )
+
+         INTEGER(iwp), INTENT(in)            ::  d, z, y, x
+         INTEGER(iwp), TARGET, INTENT(out)   ::  isurfl
+         INTEGER(iwp), INTENT(out)           ::  iproc
+#if defined( __parallel )
+#else
+         INTEGER(iwp)                        ::  target_displ  !< index of the grid in the local gridsurf array
+#endif
+         INTEGER(iwp)                        ::  px, py        !< number of processors in x and y direction
+                                                               !< before the processor in the question
+#if defined( __parallel )
+         INTEGER(KIND=MPI_ADDRESS_KIND)      ::  target_displ  !< index of the grid in the local gridsurf array
+
+!
+!--      Calculate target processor and index in the remote local target gridsurf array
+         px = x / nnx
+         py = y / nny
+         iproc = px * pdims(2) + py
+         target_displ = ((x-px*nnx) * nny + y - py*nny ) * nzu * nsurf_type_u +&
+                        ( z-nzub ) * nsurf_type_u + d
+!
+!--      Send MPI_Get request to obtain index target_surfl(i)
+         CALL MPI_GET( isurfl, 1, MPI_INTEGER, iproc, target_displ,            &
+                       1, MPI_INTEGER, win_gridsurf, ierr)
+         IF ( ierr /= 0 )  THEN
+            WRITE( 9,* ) 'Error MPI_Get3:', ierr, isurfl, iproc, target_displ, &
+                         win_gridsurf
+            FLUSH( 9 )
+         ENDIF
+#else
+!--      set index target_surfl(i)
+         isurfl = gridsurf(d,z,y,x)
+#endif
+
+      END SUBROUTINE request_itarget
+
+   END SUBROUTINE raytrace_2d
+ 
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Calculates apparent solar positions for all timesteps and stores discretized
+!> positions.
+!------------------------------------------------------------------------------!
+   SUBROUTINE radiation_presimulate_solar_pos
+      IMPLICIT NONE
+
+      INTEGER(iwp)                              ::  it, i, j
+      REAL(wp)                                  ::  tsrp_prev
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE     ::  dsidir_tmp       !< dsidir_tmp[:,i] = unit vector of i-th
+                                                                     !< appreant solar direction
+
+      ALLOCATE ( dsidir_rev(0:raytrace_discrete_elevs/2-1,                 &
+                            0:raytrace_discrete_azims-1) )
+      dsidir_rev(:,:) = -1
+      ALLOCATE ( dsidir_tmp(3,                                             &
+                     raytrace_discrete_elevs/2*raytrace_discrete_azims) )
+      ndsidir = 0
+
+!
+!--   We will artificialy update time_since_reference_point and return to
+!--   true value later
+      tsrp_prev = time_since_reference_point
+      sun_direction = .TRUE.
+
+!
+!--   Process spinup time if configured
+      IF ( spinup_time > 0._wp )  THEN
+         DO  it = 0, CEILING(spinup_time / dt_spinup)
+            time_since_reference_point = -spinup_time + REAL(it, wp) * dt_spinup
+            CALL simulate_pos
+         ENDDO
+      ENDIF
+!
+!--   Process simulation time
+      DO  it = 0, CEILING(( end_time - spinup_time ) / dt_radiation)
+         time_since_reference_point = REAL(it, wp) * dt_radiation
+         CALL simulate_pos
+      ENDDO
+
+      time_since_reference_point = tsrp_prev
+
+!--   Allocate global vars which depend on ndsidir
+      ALLOCATE ( dsidir ( 3, ndsidir ) )
+      dsidir(:,:) = dsidir_tmp(:, 1:ndsidir)
+      DEALLOCATE ( dsidir_tmp )
+
+      ALLOCATE ( dsitrans(nsurfl, ndsidir) )
+      ALLOCATE ( dsitransc(npcbl, ndsidir) )
+      IF ( nmrtbl > 0 )  ALLOCATE ( mrtdsit(nmrtbl, ndsidir) )
+
+      WRITE ( message_string, * ) 'Precalculated', ndsidir, ' solar positions', &
+                                  'from', it, ' timesteps.'
+      CALL message( 'radiation_presimulate_solar_pos', 'UI0013', 0, 0, 0, 6, 0 )
+
+      CONTAINS
+
+      !------------------------------------------------------------------------!
+      ! Description:
+      ! ------------
+      !> Simuates a single position
+      !------------------------------------------------------------------------!
+      SUBROUTINE simulate_pos
+         IMPLICIT NONE
+!
+!--      Update apparent solar position based on modified t_s_r_p
+         CALL calc_zenith
+         IF ( zenith(0) > 0 )  THEN
+!--         
+!--         Identify solar direction vector (discretized number) 1)
+            i = MODULO(NINT(ATAN2(sun_dir_lon(0), sun_dir_lat(0))               &
+                            / (2._wp*pi) * raytrace_discrete_azims-.5_wp, iwp), &
+                       raytrace_discrete_azims)
+            j = FLOOR(ACOS(zenith(0)) / pi * raytrace_discrete_elevs)
+            IF ( dsidir_rev(j, i) == -1 )  THEN
+               ndsidir = ndsidir + 1
+               dsidir_tmp(:, ndsidir) =                                              &
+                     (/ COS((REAL(j,wp)+.5_wp) * pi      / raytrace_discrete_elevs), &
+                        SIN((REAL(j,wp)+.5_wp) * pi      / raytrace_discrete_elevs)  &
+                      * COS((REAL(i,wp)+.5_wp) * 2_wp*pi / raytrace_discrete_azims), &
+                        SIN((REAL(j,wp)+.5_wp) * pi      / raytrace_discrete_elevs)  &
+                      * SIN((REAL(i,wp)+.5_wp) * 2_wp*pi / raytrace_discrete_azims) /)
+               dsidir_rev(j, i) = ndsidir
+            ENDIF
+         ENDIF
+      END SUBROUTINE simulate_pos
+
+   END SUBROUTINE radiation_presimulate_solar_pos
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Determines whether two faces are oriented towards each other. Since the
+!> surfaces follow the gird box surfaces, it checks first whether the two surfaces
+!> are directed in the same direction, then it checks if the two surfaces are
+!> located in confronted direction but facing away from each other, e.g. <--| |-->
+!------------------------------------------------------------------------------!
+    PURE LOGICAL FUNCTION surface_facing(x, y, z, d, x2, y2, z2, d2)
+        IMPLICIT NONE
+        INTEGER(iwp),   INTENT(in)  :: x, y, z, d, x2, y2, z2, d2
+      
+        surface_facing = .FALSE.
+
+!-- first check: are the two surfaces directed in the same direction
+        IF ( (d==iup_u  .OR.  d==iup_l )                             &
+             .AND. (d2==iup_u  .OR. d2==iup_l) ) RETURN
+        IF ( (d==isouth_u  .OR.  d==isouth_l ) &
+             .AND.  (d2==isouth_u  .OR.  d2==isouth_l) ) RETURN
+        IF ( (d==inorth_u  .OR.  d==inorth_l ) &
+             .AND.  (d2==inorth_u  .OR.  d2==inorth_l) ) RETURN
+        IF ( (d==iwest_u  .OR.  d==iwest_l )     &
+             .AND.  (d2==iwest_u  .OR.  d2==iwest_l ) ) RETURN
+        IF ( (d==ieast_u  .OR.  d==ieast_l )     &
+             .AND.  (d2==ieast_u  .OR.  d2==ieast_l ) ) RETURN
+
+!-- second check: are surfaces facing away from each other
+        SELECT CASE (d)
+            CASE (iup_u, iup_l)                     !< upward facing surfaces
+                IF ( z2 < z ) RETURN
+            CASE (isouth_u, isouth_l)               !< southward facing surfaces
+                IF ( y2 > y ) RETURN
+            CASE (inorth_u, inorth_l)               !< northward facing surfaces
+                IF ( y2 < y ) RETURN
+            CASE (iwest_u, iwest_l)                 !< westward facing surfaces
+                IF ( x2 > x ) RETURN
+            CASE (ieast_u, ieast_l)                 !< eastward facing surfaces
+                IF ( x2 < x ) RETURN
+        END SELECT
+
+        SELECT CASE (d2)
+            CASE (iup_u)                            !< ground, roof
+                IF ( z < z2 ) RETURN
+            CASE (isouth_u, isouth_l)               !< south facing
+                IF ( y > y2 ) RETURN
+            CASE (inorth_u, inorth_l)               !< north facing
+                IF ( y < y2 ) RETURN
+            CASE (iwest_u, iwest_l)                 !< west facing
+                IF ( x > x2 ) RETURN
+            CASE (ieast_u, ieast_l)                 !< east facing
+                IF ( x < x2 ) RETURN
+            CASE (-1)
+                CONTINUE
+        END SELECT
+
+        surface_facing = .TRUE.
+        
+    END FUNCTION surface_facing
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Soubroutine reads svf and svfsurf data from saved file
+!> SVF means sky view factors and CSF means canopy sink factors
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_read_svf
+
+       IMPLICIT NONE
+       
+       CHARACTER(rad_version_len)   :: rad_version_field
+       
+       INTEGER(iwp)                 :: i
+       INTEGER(iwp)                 :: ndsidir_from_file = 0
+       INTEGER(iwp)                 :: npcbl_from_file = 0
+       INTEGER(iwp)                 :: nsurfl_from_file = 0
+       
+       DO  i = 0, io_blocks-1
+          IF ( i == io_group )  THEN
+
+!
+!--          numprocs_previous_run is only known in case of reading restart
+!--          data. If a new initial run which reads svf data is started the
+!--          following query will be skipped
+             IF ( initializing_actions == 'read_restart_data' ) THEN
+
+                IF ( numprocs_previous_run /= numprocs ) THEN
+                   WRITE( message_string, * ) 'A different number of ',        &
+                                              'processors between the run ',   &
+                                              'that has written the svf data ',&
+                                              'and the one that will read it ',&
+                                              'is not allowed' 
+                   CALL message( 'check_open', 'PA0491', 1, 2, 0, 6, 0 )
+                ENDIF
+
+             ENDIF
+              
+!
+!--          Open binary file 
+             CALL check_open( 88 )
+
+!
+!--          read and check version
+             READ ( 88 ) rad_version_field
+             IF ( TRIM(rad_version_field) /= TRIM(rad_version) )  THEN
+                 WRITE( message_string, * ) 'Version of binary SVF file "',    &
+                             TRIM(rad_version_field), '" does not match ',     &
+                             'the version of model "', TRIM(rad_version), '"'
+                 CALL message( 'radiation_read_svf', 'PA0482', 1, 2, 0, 6, 0 )
+             ENDIF
+              
+!
+!--          read nsvfl, ncsfl, nsurfl
+             READ ( 88 ) nsvfl, ncsfl, nsurfl_from_file, npcbl_from_file,      &
+                         ndsidir_from_file
+             
+             IF ( nsvfl < 0  .OR.  ncsfl < 0 )  THEN
+                 WRITE( message_string, * ) 'Wrong number of SVF or CSF'
+                 CALL message( 'radiation_read_svf', 'PA0483', 1, 2, 0, 6, 0 )
+             ELSE
+                 WRITE(message_string,*) '    Number of SVF, CSF, and nsurfl ',&
+                                         'to read', nsvfl, ncsfl,              &
+                                         nsurfl_from_file
+                 CALL location_message( message_string, .TRUE. )
+             ENDIF
+             
+             IF ( nsurfl_from_file /= nsurfl )  THEN
+                 WRITE( message_string, * ) 'nsurfl from SVF file does not ',  &
+                                            'match calculated nsurfl from ',   &
+                                            'radiation_interaction_init'
+                 CALL message( 'radiation_read_svf', 'PA0490', 1, 2, 0, 6, 0 )
+             ENDIF
+             
+             IF ( npcbl_from_file /= npcbl )  THEN
+                 WRITE( message_string, * ) 'npcbl from SVF file does not ',   &
+                                            'match calculated npcbl from ',    &
+                                            'radiation_interaction_init'
+                 CALL message( 'radiation_read_svf', 'PA0493', 1, 2, 0, 6, 0 )
+             ENDIF
+             
+             IF ( ndsidir_from_file /= ndsidir )  THEN
+                 WRITE( message_string, * ) 'ndsidir from SVF file does not ', &
+                                            'match calculated ndsidir from ',  &
+                                            'radiation_presimulate_solar_pos'
+                 CALL message( 'radiation_read_svf', 'PA0494', 1, 2, 0, 6, 0 )
+             ENDIF
+              
+!
+!--          Arrays skyvf, skyvft, dsitrans and dsitransc are allready 
+!--          allocated in radiation_interaction_init and 
+!--          radiation_presimulate_solar_pos
+             IF ( nsurfl > 0 )  THEN
+                READ(88) skyvf
+                READ(88) skyvft
+                READ(88) dsitrans  
+             ENDIF
+              
+             IF ( plant_canopy  .AND.  npcbl > 0 ) THEN
+                READ ( 88 )  dsitransc
+             ENDIF
+             
+!
+!--          The allocation of svf, svfsurf, csf and csfsurf happens in routine 
+!--          radiation_calc_svf which is not called if the program enters 
+!--          radiation_read_svf. Therefore these arrays has to allocate in the 
+!--          following
+             IF ( nsvfl > 0 )  THEN
+                ALLOCATE( svf(ndsvf,nsvfl) )
+                ALLOCATE( svfsurf(idsvf,nsvfl) )
+                READ(88) svf
+                READ(88) svfsurf
+             ENDIF
+
+             IF ( plant_canopy  .AND.  ncsfl > 0 )  THEN
+                ALLOCATE( csf(ndcsf,ncsfl) )
+                ALLOCATE( csfsurf(idcsf,ncsfl) )
+                READ(88) csf
+                READ(88) csfsurf
+             ENDIF
+              
+!
+!--          Close binary file                 
+             CALL close_file( 88 )
+                
+          ENDIF
+#if defined( __parallel )
+          CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       ENDDO
+
+    END SUBROUTINE radiation_read_svf
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine stores svf, svfsurf, csf and csfsurf data to a file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_write_svf
+
+       IMPLICIT NONE
+       
+       INTEGER(iwp)        :: i
+
+       DO  i = 0, io_blocks-1
+          IF ( i == io_group )  THEN
+!
+!--          Open binary file 
+             CALL check_open( 89 )
+
+             WRITE ( 89 )  rad_version
+             WRITE ( 89 )  nsvfl, ncsfl, nsurfl, npcbl, ndsidir
+             IF ( nsurfl > 0 ) THEN
+                WRITE ( 89 )  skyvf
+                WRITE ( 89 )  skyvft
+                WRITE ( 89 )  dsitrans
+             ENDIF
+             IF ( npcbl > 0 ) THEN
+                WRITE ( 89 )  dsitransc
+             ENDIF
+             IF ( nsvfl > 0 ) THEN
+                WRITE ( 89 )  svf
+                WRITE ( 89 )  svfsurf
+             ENDIF
+             IF ( plant_canopy  .AND.  ncsfl > 0 )  THEN
+                 WRITE ( 89 )  csf
+                 WRITE ( 89 )  csfsurf
+             ENDIF
+
+!
+!--          Close binary file                 
+             CALL close_file( 89 )
+
+          ENDIF
+#if defined( __parallel )
+          CALL MPI_BARRIER( comm2d, ierr )
+#endif
+       ENDDO
+    END SUBROUTINE radiation_write_svf
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Block of auxiliary subroutines:
+!> 1. quicksort and corresponding comparison
+!> 2. merge_and_grow_csf for implementation of "dynamical growing"
+!>    array for csf
+!------------------------------------------------------------------------------!
+!-- quicksort.f -*-f90-*-
+!-- Author: t-nissie, adaptation J.Resler
+!-- License: GPLv3
+!-- Gist: https://gist.github.com/t-nissie/479f0f16966925fa29ea
+    RECURSIVE SUBROUTINE quicksort_itarget(itarget, vffrac, ztransp, first, last)
+        IMPLICIT NONE
+        INTEGER(iwp), DIMENSION(:), INTENT(INOUT)   :: itarget
+        REAL(wp), DIMENSION(:), INTENT(INOUT)       :: vffrac, ztransp
+        INTEGER(iwp), INTENT(IN)                    :: first, last
+        INTEGER(iwp)                                :: x, t
+        INTEGER(iwp)                                :: i, j
+        REAL(wp)                                    :: tr
+
+        IF ( first>=last ) RETURN
+        x = itarget((first+last)/2)
+        i = first
+        j = last
+        DO
+            DO WHILE ( itarget(i) < x )
+               i=i+1
+            ENDDO
+            DO WHILE ( x < itarget(j) )
+                j=j-1
+            ENDDO
+            IF ( i >= j ) EXIT
+            t = itarget(i);  itarget(i) = itarget(j);  itarget(j) = t
+            tr = vffrac(i);  vffrac(i) = vffrac(j);  vffrac(j) = tr
+            tr = ztransp(i);  ztransp(i) = ztransp(j);  ztransp(j) = tr
+            i=i+1
+            j=j-1
+        ENDDO
+        IF ( first < i-1 ) CALL quicksort_itarget(itarget, vffrac, ztransp, first, i-1)
+        IF ( j+1 < last )  CALL quicksort_itarget(itarget, vffrac, ztransp, j+1, last)
+    END SUBROUTINE quicksort_itarget
+
+    PURE FUNCTION svf_lt(svf1,svf2) result (res)
+      TYPE (t_svf), INTENT(in) :: svf1,svf2
+      LOGICAL                  :: res
+      IF ( svf1%isurflt < svf2%isurflt  .OR.    &
+          (svf1%isurflt == svf2%isurflt  .AND.  svf1%isurfs < svf2%isurfs) )  THEN
+          res = .TRUE.
+      ELSE
+          res = .FALSE.
+      ENDIF
+    END FUNCTION svf_lt
+
+
+!-- quicksort.f -*-f90-*-
+!-- Author: t-nissie, adaptation J.Resler
+!-- License: GPLv3
+!-- Gist: https://gist.github.com/t-nissie/479f0f16966925fa29ea
+    RECURSIVE SUBROUTINE quicksort_svf(svfl, first, last)
+        IMPLICIT NONE
+        TYPE(t_svf), DIMENSION(:), INTENT(INOUT)  :: svfl
+        INTEGER(iwp), INTENT(IN)                  :: first, last
+        TYPE(t_svf)                               :: x, t
+        INTEGER(iwp)                              :: i, j
+
+        IF ( first>=last ) RETURN
+        x = svfl( (first+last) / 2 )
+        i = first
+        j = last
+        DO
+            DO while ( svf_lt(svfl(i),x) )
+               i=i+1
+            ENDDO
+            DO while ( svf_lt(x,svfl(j)) )
+                j=j-1
+            ENDDO
+            IF ( i >= j ) EXIT
+            t = svfl(i);  svfl(i) = svfl(j);  svfl(j) = t
+            i=i+1
+            j=j-1
+        ENDDO
+        IF ( first < i-1 ) CALL quicksort_svf(svfl, first, i-1)
+        IF ( j+1 < last )  CALL quicksort_svf(svfl, j+1, last)
+    END SUBROUTINE quicksort_svf
+
+    PURE FUNCTION csf_lt(csf1,csf2) result (res)
+      TYPE (t_csf), INTENT(in) :: csf1,csf2
+      LOGICAL                  :: res
+      IF ( csf1%ip < csf2%ip  .OR.    &
+           (csf1%ip == csf2%ip  .AND.  csf1%itx < csf2%itx)  .OR.  &
+           (csf1%ip == csf2%ip  .AND.  csf1%itx == csf2%itx  .AND.  csf1%ity < csf2%ity)  .OR.  &
+           (csf1%ip == csf2%ip  .AND.  csf1%itx == csf2%itx  .AND.  csf1%ity == csf2%ity  .AND.   &
+            csf1%itz < csf2%itz)  .OR.  &
+           (csf1%ip == csf2%ip  .AND.  csf1%itx == csf2%itx  .AND.  csf1%ity == csf2%ity  .AND.   &
+            csf1%itz == csf2%itz  .AND.  csf1%isurfs < csf2%isurfs) )  THEN
+          res = .TRUE.
+      ELSE
+          res = .FALSE.
+      ENDIF
+    END FUNCTION csf_lt
+
+
+!-- quicksort.f -*-f90-*-
+!-- Author: t-nissie, adaptation J.Resler
+!-- License: GPLv3
+!-- Gist: https://gist.github.com/t-nissie/479f0f16966925fa29ea
+    RECURSIVE SUBROUTINE quicksort_csf(csfl, first, last)
+        IMPLICIT NONE
+        TYPE(t_csf), DIMENSION(:), INTENT(INOUT)  :: csfl
+        INTEGER(iwp), INTENT(IN)                  :: first, last
+        TYPE(t_csf)                               :: x, t
+        INTEGER(iwp)                              :: i, j
+
+        IF ( first>=last ) RETURN
+        x = csfl( (first+last)/2 )
+        i = first
+        j = last
+        DO
+            DO while ( csf_lt(csfl(i),x) )
+                i=i+1
+            ENDDO
+            DO while ( csf_lt(x,csfl(j)) )
+                j=j-1
+            ENDDO
+            IF ( i >= j ) EXIT
+            t = csfl(i);  csfl(i) = csfl(j);  csfl(j) = t
+            i=i+1
+            j=j-1
+        ENDDO
+        IF ( first < i-1 ) CALL quicksort_csf(csfl, first, i-1)
+        IF ( j+1 < last )  CALL quicksort_csf(csfl, j+1, last)
+    END SUBROUTINE quicksort_csf
+
+    
+    SUBROUTINE merge_and_grow_csf(newsize)
+        INTEGER(iwp), INTENT(in)                :: newsize  !< new array size after grow, must be >= ncsfl
+                                                            !< or -1 to shrink to minimum
+        INTEGER(iwp)                            :: iread, iwrite
+        TYPE(t_csf), DIMENSION(:), POINTER      :: acsfnew
+        CHARACTER(100)                          :: msg
+
+        IF ( newsize == -1 )  THEN
+!--         merge in-place
+            acsfnew => acsf
+        ELSE
+!--         allocate new array
+            IF ( mcsf == 0 )  THEN
+                ALLOCATE( acsf1(newsize) )
+                acsfnew => acsf1
+            ELSE
+                ALLOCATE( acsf2(newsize) )
+                acsfnew => acsf2
+            ENDIF
+        ENDIF
+
+        IF ( ncsfl >= 1 )  THEN
+!--         sort csf in place (quicksort)
+            CALL quicksort_csf(acsf,1,ncsfl)
+
+!--         while moving to a new array, aggregate canopy sink factor records with identical box & source
+            acsfnew(1) = acsf(1)
+            iwrite = 1
+            DO iread = 2, ncsfl
+!--             here acsf(kcsf) already has values from acsf(icsf)
+                IF ( acsfnew(iwrite)%itx == acsf(iread)%itx &
+                         .AND.  acsfnew(iwrite)%ity == acsf(iread)%ity &
+                         .AND.  acsfnew(iwrite)%itz == acsf(iread)%itz &
+                         .AND.  acsfnew(iwrite)%isurfs == acsf(iread)%isurfs )  THEN
+
+                    acsfnew(iwrite)%rcvf = acsfnew(iwrite)%rcvf + acsf(iread)%rcvf
+!--                 advance reading index, keep writing index
+                ELSE
+!--                 not identical, just advance and copy
+                    iwrite = iwrite + 1
+                    acsfnew(iwrite) = acsf(iread)
+                ENDIF
+            ENDDO
+            ncsfl = iwrite
+        ENDIF
+
+        IF ( newsize == -1 )  THEN
+!--         allocate new array and copy shrinked data
+            IF ( mcsf == 0 )  THEN
+                ALLOCATE( acsf1(ncsfl) )
+                acsf1(1:ncsfl) = acsf2(1:ncsfl)
+            ELSE
+                ALLOCATE( acsf2(ncsfl) )
+                acsf2(1:ncsfl) = acsf1(1:ncsfl)
+            ENDIF
+        ENDIF
+
+!--     deallocate old array
+        IF ( mcsf == 0 )  THEN
+            mcsf = 1
+            acsf => acsf1
+            DEALLOCATE( acsf2 )
+        ELSE
+            mcsf = 0
+            acsf => acsf2
+            DEALLOCATE( acsf1 )
+        ENDIF
+        ncsfla = newsize
+
+        WRITE(msg,'(A,2I12)') 'Grow acsf2:',ncsfl,ncsfla
+        CALL radiation_write_debug_log( msg )
+
+    END SUBROUTINE merge_and_grow_csf
+
+    
+!-- quicksort.f -*-f90-*-
+!-- Author: t-nissie, adaptation J.Resler
+!-- License: GPLv3
+!-- Gist: https://gist.github.com/t-nissie/479f0f16966925fa29ea
+    RECURSIVE SUBROUTINE quicksort_csf2(kpcsflt, pcsflt, first, last)
+        IMPLICIT NONE
+        INTEGER(iwp), DIMENSION(:,:), INTENT(INOUT)  :: kpcsflt
+        REAL(wp), DIMENSION(:,:), INTENT(INOUT)      :: pcsflt
+        INTEGER(iwp), INTENT(IN)                     :: first, last
+        REAL(wp), DIMENSION(ndcsf)                   :: t2
+        INTEGER(iwp), DIMENSION(kdcsf)               :: x, t1
+        INTEGER(iwp)                                 :: i, j
+
+        IF ( first>=last ) RETURN
+        x = kpcsflt(:, (first+last)/2 )
+        i = first
+        j = last
+        DO
+            DO while ( csf_lt2(kpcsflt(:,i),x) )
+                i=i+1
+            ENDDO
+            DO while ( csf_lt2(x,kpcsflt(:,j)) )
+                j=j-1
+            ENDDO
+            IF ( i >= j ) EXIT
+            t1 = kpcsflt(:,i);  kpcsflt(:,i) = kpcsflt(:,j);  kpcsflt(:,j) = t1
+            t2 = pcsflt(:,i);  pcsflt(:,i) = pcsflt(:,j);  pcsflt(:,j) = t2
+            i=i+1
+            j=j-1
+        ENDDO
+        IF ( first < i-1 ) CALL quicksort_csf2(kpcsflt, pcsflt, first, i-1)
+        IF ( j+1 < last )  CALL quicksort_csf2(kpcsflt, pcsflt, j+1, last)
+    END SUBROUTINE quicksort_csf2
+    
+
+    PURE FUNCTION csf_lt2(item1, item2) result(res)
+        INTEGER(iwp), DIMENSION(kdcsf), INTENT(in)  :: item1, item2
+        LOGICAL                                     :: res
+        res = ( (item1(3) < item2(3))                                                        &
+             .OR.  (item1(3) == item2(3)  .AND.  item1(2) < item2(2))                            &
+             .OR.  (item1(3) == item2(3)  .AND.  item1(2) == item2(2)  .AND.  item1(1) < item2(1)) &
+             .OR.  (item1(3) == item2(3)  .AND.  item1(2) == item2(2)  .AND.  item1(1) == item2(1) &
+                 .AND.  item1(4) < item2(4)) )
+    END FUNCTION csf_lt2
+
+    PURE FUNCTION searchsorted(athresh, val) result(ind)
+        REAL(wp), DIMENSION(:), INTENT(IN)  :: athresh
+        REAL(wp), INTENT(IN)                :: val
+        INTEGER(iwp)                        :: ind
+        INTEGER(iwp)                        :: i
+
+        DO i = LBOUND(athresh, 1), UBOUND(athresh, 1)
+            IF ( val < athresh(i) ) THEN
+                ind = i - 1
+                RETURN
+            ENDIF
+        ENDDO
+        ind = UBOUND(athresh, 1)
+    END FUNCTION searchsorted
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> radiation_radflux_gridbox subroutine gives the sw and lw radiation fluxes at the 
+!> faces of a gridbox defined at i,j,k and located in the urban layer.
+!> The total sw and the diffuse sw radiation as well as the lw radiation fluxes at
+!> the gridbox 6 faces are stored in sw_gridbox, swd_gridbox, and lw_gridbox arrays, 
+!> respectively, in the following order:
+!>  up_face, down_face, north_face, south_face, east_face, west_face
+!> 
+!> The subroutine reports also how successful was the search process via the parameter
+!> i_feedback as follow:
+!> - i_feedback =  1 : successful
+!> - i_feedback = -1 : unsuccessful; the requisted point is outside the urban domain
+!> - i_feedback =  0 : uncomplete; some gridbox faces fluxes are missing
+!> 
+!> 
+!> It is called outside from usm_urban_surface_mod whenever the radiation fluxes
+!> are needed.
+!>
+!> This routine is not used so far. However, it may serve as an interface for radiation
+!> fluxes of urban and land surfaces
+!>
+!> TODO:
+!>    - Compare performance when using some combination of the Fortran intrinsic 
+!>      functions, e.g. MINLOC, MAXLOC, ALL, ANY and COUNT functions, which search
+!>      surfl array for elements meeting user-specified criterion, i.e. i,j,k
+!>    - Report non-found or incomplete radiation fluxes arrays , if any, at the 
+!>      gridbox faces in an error message form
+!>
+!------------------------------------------------------------------------------!
+    SUBROUTINE radiation_radflux_gridbox(i,j,k,sw_gridbox,swd_gridbox,lw_gridbox,i_feedback)
+        
+        IMPLICIT NONE
+
+        INTEGER(iwp),                 INTENT(in)  :: i,j,k                 !< gridbox indices at which fluxes are required
+        INTEGER(iwp)                              :: ii,jj,kk,d            !< surface indices and type
+        INTEGER(iwp)                              :: l                     !< surface id
+        REAL(wp)    , DIMENSION(1:6), INTENT(out) :: sw_gridbox,lw_gridbox !< total sw and lw radiation fluxes of 6 faces of a gridbox, w/m2 
+        REAL(wp)    , DIMENSION(1:6), INTENT(out) :: swd_gridbox           !< diffuse sw radiation from sky and model boundary of 6 faces of a gridbox, w/m2
+        INTEGER(iwp),                 INTENT(out) :: i_feedback            !< feedback to report how the search was successful 
+
+
+!-- initialize variables
+        i_feedback  = -999999
+        sw_gridbox  = -999999.9_wp
+        lw_gridbox  = -999999.9_wp
+        swd_gridbox = -999999.9_wp
+        
+!-- check the requisted grid indices
+        IF ( k < nzb   .OR.  k > nzut  .OR.   &
+             j < nysg  .OR.  j > nyng  .OR.   &
+             i < nxlg  .OR.  i > nxrg         &
+             ) THEN
+           i_feedback = -1
+           RETURN
+        ENDIF
+
+!-- search for the required grid and formulate the fluxes at the 6 gridbox faces
+        DO l = 1, nsurfl
+            ii = surfl(ix,l)
+            jj = surfl(iy,l)
+            kk = surfl(iz,l)
+
+            IF ( ii == i  .AND.  jj == j  .AND.  kk == k ) THEN
+               d = surfl(id,l)
+
+               SELECT CASE ( d )
+
+               CASE (iup_u,iup_l)                          !- gridbox up_facing face
+                  sw_gridbox(1) = surfinsw(l)
+                  lw_gridbox(1) = surfinlw(l)
+                  swd_gridbox(1) = surfinswdif(l)
+
+               CASE (inorth_u,inorth_l)                    !- gridbox north_facing face
+                  sw_gridbox(3) = surfinsw(l)
+                  lw_gridbox(3) = surfinlw(l)
+                  swd_gridbox(3) = surfinswdif(l)
+
+               CASE (isouth_u,isouth_l)                    !- gridbox south_facing face
+                  sw_gridbox(4) = surfinsw(l)
+                  lw_gridbox(4) = surfinlw(l)
+                  swd_gridbox(4) = surfinswdif(l)
+
+               CASE (ieast_u,ieast_l)                      !- gridbox east_facing face
+                  sw_gridbox(5) = surfinsw(l)
+                  lw_gridbox(5) = surfinlw(l)
+                  swd_gridbox(5) = surfinswdif(l)
+
+               CASE (iwest_u,iwest_l)                      !- gridbox west_facing face
+                  sw_gridbox(6) = surfinsw(l)
+                  lw_gridbox(6) = surfinlw(l)
+                  swd_gridbox(6) = surfinswdif(l)
+
+               END SELECT
+
+            ENDIF
+
+        IF ( ALL( sw_gridbox(:)  /= -999999.9_wp )  ) EXIT
+        ENDDO
+
+!-- check the completeness of the fluxes at all gidbox faces        
+!-- TODO: report non-found or incomplete rad fluxes arrays in an error message form
+        IF ( ANY( sw_gridbox(:)  <= -999999.9_wp )  .OR.   &
+             ANY( swd_gridbox(:) <= -999999.9_wp )  .OR.   &
+             ANY( lw_gridbox(:)  <= -999999.9_wp ) ) THEN
+           i_feedback = 0
+        ELSE
+           i_feedback = 1
+        ENDIF
+        
+        RETURN
+        
+    END SUBROUTINE radiation_radflux_gridbox
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data
+!------------------------------------------------------------------------------!
+SUBROUTINE radiation_3d_data_averaging( mode, variable )
+ 
+
+    USE control_parameters
+
+    USE indices
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode    !< 
+    CHARACTER (LEN=*) :: variable !< 
+
+    LOGICAL      ::  match_lsm !< flag indicating natural-type surface
+    LOGICAL      ::  match_usm !< flag indicating urban-type surface
+    
+    INTEGER(iwp) ::  i !< 
+    INTEGER(iwp) ::  j !< 
+    INTEGER(iwp) ::  k !< 
+    INTEGER(iwp) ::  l, m !< index of current surface element
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+             CASE ( 'rad_net*' )
+                IF ( .NOT. ALLOCATED( rad_net_av ) )  THEN
+                   ALLOCATE( rad_net_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_net_av = 0.0_wp
+             
+             CASE ( 'rad_lw_in*' )
+                IF ( .NOT. ALLOCATED( rad_lw_in_xy_av ) )  THEN
+                   ALLOCATE( rad_lw_in_xy_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_in_xy_av = 0.0_wp
+                
+             CASE ( 'rad_lw_out*' )
+                IF ( .NOT. ALLOCATED( rad_lw_out_xy_av ) )  THEN
+                   ALLOCATE( rad_lw_out_xy_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_out_xy_av = 0.0_wp
+                
+             CASE ( 'rad_sw_in*' )
+                IF ( .NOT. ALLOCATED( rad_sw_in_xy_av ) )  THEN
+                   ALLOCATE( rad_sw_in_xy_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_in_xy_av = 0.0_wp
+                
+             CASE ( 'rad_sw_out*' )
+                IF ( .NOT. ALLOCATED( rad_sw_out_xy_av ) )  THEN
+                   ALLOCATE( rad_sw_out_xy_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_out_xy_av = 0.0_wp                
+
+             CASE ( 'rad_lw_in' )
+                IF ( .NOT. ALLOCATED( rad_lw_in_av ) )  THEN
+                   ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_in_av = 0.0_wp
+
+             CASE ( 'rad_lw_out' )
+                IF ( .NOT. ALLOCATED( rad_lw_out_av ) )  THEN
+                   ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_out_av = 0.0_wp
+
+             CASE ( 'rad_lw_cs_hr' )
+                IF ( .NOT. ALLOCATED( rad_lw_cs_hr_av ) )  THEN
+                   ALLOCATE( rad_lw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_cs_hr_av = 0.0_wp
+
+             CASE ( 'rad_lw_hr' )
+                IF ( .NOT. ALLOCATED( rad_lw_hr_av ) )  THEN
+                   ALLOCATE( rad_lw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_lw_hr_av = 0.0_wp
+
+             CASE ( 'rad_sw_in' )
+                IF ( .NOT. ALLOCATED( rad_sw_in_av ) )  THEN
+                   ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_in_av = 0.0_wp
+
+             CASE ( 'rad_sw_out' )
+                IF ( .NOT. ALLOCATED( rad_sw_out_av ) )  THEN
+                   ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_out_av = 0.0_wp
+
+             CASE ( 'rad_sw_cs_hr' )
+                IF ( .NOT. ALLOCATED( rad_sw_cs_hr_av ) )  THEN
+                   ALLOCATE( rad_sw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_cs_hr_av = 0.0_wp
+
+             CASE ( 'rad_sw_hr' )
+                IF ( .NOT. ALLOCATED( rad_sw_hr_av ) )  THEN
+                   ALLOCATE( rad_sw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                rad_sw_hr_av = 0.0_wp
+
+             CASE ( 'rad_mrt_sw' )
+                IF ( .NOT. ALLOCATED( mrtinsw_av ) )  THEN
+                   ALLOCATE( mrtinsw_av(nmrtbl) )
+                ENDIF
+                mrtinsw_av = 0.0_wp
+
+             CASE ( 'rad_mrt_lw' )
+                IF ( .NOT. ALLOCATED( mrtinlw_av ) )  THEN
+                   ALLOCATE( mrtinlw_av(nmrtbl) )
+                ENDIF
+                mrtinlw_av = 0.0_wp
+
+             CASE ( 'rad_mrt' )
+                IF ( .NOT. ALLOCATED( mrt_av ) )  THEN
+                   ALLOCATE( mrt_av(nmrtbl) )
+                ENDIF
+                mrt_av = 0.0_wp
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'rad_net*' )
+             IF ( ALLOCATED( rad_net_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                     IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         rad_net_av(j,i) = rad_net_av(j,i) +                   &
+                                         surf_lsm_h%rad_net(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         rad_net_av(j,i) = rad_net_av(j,i) +                   &
+                                         surf_usm_h%rad_net(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_in*' )
+             IF ( ALLOCATED( rad_lw_in_xy_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         rad_lw_in_xy_av(j,i) = rad_lw_in_xy_av(j,i) +         &
+                                         surf_lsm_h%rad_lw_in(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         rad_lw_in_xy_av(j,i) = rad_lw_in_xy_av(j,i) +         &
+                                         surf_usm_h%rad_lw_in(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_lw_out*' )
+             IF ( ALLOCATED( rad_lw_out_xy_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         rad_lw_out_xy_av(j,i) = rad_lw_out_xy_av(j,i) +       &
+                                                 surf_lsm_h%rad_lw_out(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         rad_lw_out_xy_av(j,i) = rad_lw_out_xy_av(j,i) +       &
+                                                 surf_usm_h%rad_lw_out(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_sw_in*' )
+             IF ( ALLOCATED( rad_sw_in_xy_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         rad_sw_in_xy_av(j,i) = rad_sw_in_xy_av(j,i) +         &
+                                                surf_lsm_h%rad_sw_in(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         rad_sw_in_xy_av(j,i) = rad_sw_in_xy_av(j,i) +         &
+                                                surf_usm_h%rad_sw_in(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_sw_out*' )
+             IF ( ALLOCATED( rad_sw_out_xy_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         rad_sw_out_xy_av(j,i) = rad_sw_out_xy_av(j,i) +       &
+                                                 surf_lsm_h%rad_sw_out(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         rad_sw_out_xy_av(j,i) = rad_sw_out_xy_av(j,i) +       &
+                                                 surf_usm_h%rad_sw_out(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_lw_in' )
+             IF ( ALLOCATED( rad_lw_in_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_in_av(k,j,i) = rad_lw_in_av(k,j,i)             &
+                                               + rad_lw_in(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_out' )
+             IF ( ALLOCATED( rad_lw_out_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_out_av(k,j,i) = rad_lw_out_av(k,j,i)           &
+                                                + rad_lw_out(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_cs_hr' )
+             IF ( ALLOCATED( rad_lw_cs_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_cs_hr_av(k,j,i) = rad_lw_cs_hr_av(k,j,i)       &
+                                                  + rad_lw_cs_hr(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_hr' )
+             IF ( ALLOCATED( rad_lw_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_hr_av(k,j,i) = rad_lw_hr_av(k,j,i)             &
+                                               + rad_lw_hr(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_in' )
+             IF ( ALLOCATED( rad_sw_in_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_in_av(k,j,i) = rad_sw_in_av(k,j,i)             &
+                                               + rad_sw_in(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_out' )
+             IF ( ALLOCATED( rad_sw_out_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_out_av(k,j,i) = rad_sw_out_av(k,j,i)           &
+                                                + rad_sw_out(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_cs_hr' )
+             IF ( ALLOCATED( rad_sw_cs_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_cs_hr_av(k,j,i) = rad_sw_cs_hr_av(k,j,i)       &
+                                                  + rad_sw_cs_hr(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_hr' )
+             IF ( ALLOCATED( rad_sw_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_hr_av(k,j,i) = rad_sw_hr_av(k,j,i)             &
+                                               + rad_sw_hr(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_mrt_sw' )
+             IF ( ALLOCATED( mrtinsw_av ) )  THEN
+                mrtinsw_av(:) = mrtinsw_av(:) + mrtinsw(:)
+             ENDIF
+
+          CASE ( 'rad_mrt_lw' )
+             IF ( ALLOCATED( mrtinlw_av ) )  THEN
+                mrtinlw_av(:) = mrtinlw_av(:) + mrtinlw(:)
+             ENDIF
+
+          CASE ( 'rad_mrt' )
+             IF ( ALLOCATED( mrt_av ) )  THEN
+                mrt_av(:) = mrt_av(:) + mrt(:)
+             ENDIF
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'rad_net*' )
+             IF ( ALLOCATED( rad_net_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      rad_net_av(j,i) = rad_net_av(j,i)                        &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_lw_in*' )
+             IF ( ALLOCATED( rad_lw_in_xy_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      rad_lw_in_xy_av(j,i) = rad_lw_in_xy_av(j,i)              &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_lw_out*' )
+             IF ( ALLOCATED( rad_lw_out_xy_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      rad_lw_out_xy_av(j,i) = rad_lw_out_xy_av(j,i)            &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_sw_in*' )
+             IF ( ALLOCATED( rad_sw_in_xy_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      rad_sw_in_xy_av(j,i) = rad_sw_in_xy_av(j,i)              &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE ( 'rad_sw_out*' )
+             IF ( ALLOCATED( rad_sw_out_xy_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      rad_sw_out_xy_av(j,i) = rad_sw_out_xy_av(j,i)             &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_in' )
+             IF ( ALLOCATED( rad_lw_in_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_in_av(k,j,i) = rad_lw_in_av(k,j,i)             &
+                                               / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_out' )
+             IF ( ALLOCATED( rad_lw_out_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_out_av(k,j,i) = rad_lw_out_av(k,j,i)           &
+                                                / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_cs_hr' )
+             IF ( ALLOCATED( rad_lw_cs_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_cs_hr_av(k,j,i) = rad_lw_cs_hr_av(k,j,i)       &
+                                                / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_lw_hr' )
+             IF ( ALLOCATED( rad_lw_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_lw_hr_av(k,j,i) = rad_lw_hr_av(k,j,i)             &
+                                               / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_in' )
+             IF ( ALLOCATED( rad_sw_in_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_in_av(k,j,i) = rad_sw_in_av(k,j,i)             &
+                                               / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_out' )
+             IF ( ALLOCATED( rad_sw_out_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_out_av(k,j,i) = rad_sw_out_av(k,j,i)           &
+                                                / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_cs_hr' )
+             IF ( ALLOCATED( rad_sw_cs_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_cs_hr_av(k,j,i) = rad_sw_cs_hr_av(k,j,i)       &
+                                                / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_sw_hr' )
+             IF ( ALLOCATED( rad_sw_hr_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         rad_sw_hr_av(k,j,i) = rad_sw_hr_av(k,j,i)             &
+                                               / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'rad_mrt_sw' )
+             IF ( ALLOCATED( mrtinsw_av ) )  THEN
+                mrtinsw_av(:) = mrtinsw_av(:)  / REAL( average_count_3d, KIND=wp )
+             ENDIF
+
+          CASE ( 'rad_mrt_lw' )
+             IF ( ALLOCATED( mrtinlw_av ) )  THEN
+                mrtinlw_av(:) = mrtinlw_av(:) / REAL( average_count_3d, KIND=wp )
+             ENDIF
+
+          CASE ( 'rad_mrt' )
+             IF ( ALLOCATED( mrt_av ) )  THEN
+                mrt_av(:) = mrt_av(:) / REAL( average_count_3d, KIND=wp )
+             ENDIF
+
+       END SELECT
+
+    ENDIF
+
+END SUBROUTINE radiation_3d_data_averaging
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+SUBROUTINE radiation_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(IN)  ::  var         !< 
+    LOGICAL, INTENT(OUT)           ::  found       !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_x      !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_y      !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_z      !< 
+
+    found  = .TRUE.
+
+!
+!-- Check for the grid
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'rad_lw_cs_hr', 'rad_lw_hr', 'rad_sw_cs_hr', 'rad_sw_hr',        &
+              'rad_lw_cs_hr_xy', 'rad_lw_hr_xy', 'rad_sw_cs_hr_xy',            &
+              'rad_sw_hr_xy', 'rad_lw_cs_hr_xz', 'rad_lw_hr_xz',               &
+              'rad_sw_cs_hr_xz', 'rad_sw_hr_xz', 'rad_lw_cs_hr_yz',            &
+              'rad_lw_hr_yz', 'rad_sw_cs_hr_yz', 'rad_sw_hr_yz',               &
+              'rad_mrt', 'rad_mrt_sw', 'rad_mrt_lw' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'
+
+       CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_sw_in', 'rad_sw_out',            &
+              'rad_lw_in_xy', 'rad_lw_out_xy', 'rad_sw_in_xy','rad_sw_out_xy', &
+              'rad_lw_in_xz', 'rad_lw_out_xz', 'rad_sw_in_xz','rad_sw_out_xz', &
+              'rad_lw_in_yz', 'rad_lw_out_yz', 'rad_sw_in_yz','rad_sw_out_yz' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zw'
+
+
+       CASE DEFAULT
+          found  = .FALSE.
+          grid_x = 'none'
+          grid_y = 'none'
+          grid_z = 'none'
+
+        END SELECT
+
+    END SUBROUTINE radiation_define_netcdf_grid
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 2D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_data_output_2d( av, variable, found, grid, mode,         &
+                                      local_pf, two_d, nzb_do, nzt_do )
+ 
+    USE indices
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid     !< 
+    CHARACTER (LEN=*) ::  mode     !< 
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av !< 
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  m  !< index of surface element at grid point (j,i)
+    INTEGER(iwp) ::  nzb_do   !< 
+    INTEGER(iwp) ::  nzt_do   !< 
+
+    LOGICAL      ::  found !< 
+    LOGICAL      ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+    found = .TRUE.
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'rad_net*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Obtain rad_net from its respective surface type
+!--                Natural-type surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_lsm_h%rad_net(m)
+                   ENDDO
+!
+!--                Urban-type surfaces
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_usm_h%rad_net(m)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( rad_net_av ) ) THEN
+                ALLOCATE( rad_net_av(nysg:nyng,nxlg:nxrg) )
+                rad_net_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) = rad_net_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+          two_d = .TRUE.
+          grid = 'zu1'
+          
+       CASE ( 'rad_lw_in*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Obtain rad_net from its respective surface type
+!--                Natural-type surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_lsm_h%rad_lw_in(m)
+                   ENDDO
+!
+!--                Urban-type surfaces
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_usm_h%rad_lw_in(m)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( rad_lw_in_xy_av ) ) THEN
+                ALLOCATE( rad_lw_in_xy_av(nysg:nyng,nxlg:nxrg) )
+                rad_lw_in_xy_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) = rad_lw_in_xy_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+          two_d = .TRUE.
+          grid = 'zu1'
+          
+       CASE ( 'rad_lw_out*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Obtain rad_net from its respective surface type
+!--                Natural-type surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_lsm_h%rad_lw_out(m)
+                   ENDDO
+!
+!--                Urban-type surfaces
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_usm_h%rad_lw_out(m)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( rad_lw_out_xy_av ) ) THEN
+                ALLOCATE( rad_lw_out_xy_av(nysg:nyng,nxlg:nxrg) )
+                rad_lw_out_xy_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) = rad_lw_out_xy_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+          two_d = .TRUE.
+          grid = 'zu1'
+          
+       CASE ( 'rad_sw_in*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Obtain rad_net from its respective surface type
+!--                Natural-type surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_lsm_h%rad_sw_in(m)
+                   ENDDO
+!
+!--                Urban-type surfaces
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_usm_h%rad_sw_in(m)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( rad_sw_in_xy_av ) ) THEN
+                ALLOCATE( rad_sw_in_xy_av(nysg:nyng,nxlg:nxrg) )
+                rad_sw_in_xy_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) = rad_sw_in_xy_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+          two_d = .TRUE.
+          grid = 'zu1'
+          
+       CASE ( 'rad_sw_out*_xy' )        ! 2d-array
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Obtain rad_net from its respective surface type
+!--                Natural-type surfaces
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_lsm_h%rad_sw_out(m)
+                   ENDDO
+!
+!--                Urban-type surfaces
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)  
+                      local_pf(i,j,nzb+1) = surf_usm_h%rad_sw_out(m)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( .NOT. ALLOCATED( rad_sw_out_xy_av ) ) THEN
+                ALLOCATE( rad_sw_out_xy_av(nysg:nyng,nxlg:nxrg) )
+                rad_sw_out_xy_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   local_pf(i,j,nzb+1) = rad_sw_out_xy_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+          two_d = .TRUE.
+          grid = 'zu1'          
+          
+       CASE ( 'rad_lw_in_xy', 'rad_lw_in_xz', 'rad_lw_in_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_in(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_in_av ) ) THEN
+               ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_in_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_in_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zu'
+
+       CASE ( 'rad_lw_out_xy', 'rad_lw_out_xz', 'rad_lw_out_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_out(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_out_av ) ) THEN
+               ALLOCATE( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_out_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_out_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF   
+          IF ( mode == 'xy' )  grid = 'zu'
+
+       CASE ( 'rad_lw_cs_hr_xy', 'rad_lw_cs_hr_xz', 'rad_lw_cs_hr_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_cs_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_cs_hr_av ) ) THEN
+               ALLOCATE( rad_lw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_cs_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_cs_hr_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zw'
+
+       CASE ( 'rad_lw_hr_xy', 'rad_lw_hr_xz', 'rad_lw_hr_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_hr_av ) ) THEN
+               ALLOCATE( rad_lw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_hr_av= REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_lw_hr_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zw'
+
+       CASE ( 'rad_sw_in_xy', 'rad_sw_in_xz', 'rad_sw_in_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_in(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_in_av ) ) THEN
+               ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_in_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_in_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zu'
+
+       CASE ( 'rad_sw_out_xy', 'rad_sw_out_xz', 'rad_sw_out_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_out(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_out_av ) ) THEN
+               ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_out_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = rad_sw_out_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zu'
+
+       CASE ( 'rad_sw_cs_hr_xy', 'rad_sw_cs_hr_xz', 'rad_sw_cs_hr_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_cs_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_cs_hr_av ) ) THEN
+               ALLOCATE( rad_sw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_cs_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_cs_hr_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zw'
+
+       CASE ( 'rad_sw_hr_xy', 'rad_sw_hr_xz', 'rad_sw_hr_yz' )
+          IF ( av == 0 ) THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_hr(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_hr_av ) ) THEN
+               ALLOCATE( rad_sw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+             DO  i = nxl, nxr
+                DO  j = nys, nyn 
+                   DO  k = nzb_do, nzt_do
+                      local_pf(i,j,k) = rad_sw_hr_av(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( mode == 'xy' )  grid = 'zw'
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+ 
+ END SUBROUTINE radiation_data_output_2d
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+ 
+
+    USE indices
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av          !<
+    INTEGER(iwp) ::  i, j, k, l  !<
+    INTEGER(iwp) ::  nzb_do      !<
+    INTEGER(iwp) ::  nzt_do      !<
+
+    LOGICAL      ::  found       !<
+
+    REAL(wp)     ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !<
+
+    found = .TRUE.
+
+
+    SELECT CASE ( TRIM( variable ) )
+
+      CASE ( 'rad_sw_in' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_in(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_in_av ) ) THEN
+               ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_in_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_in_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_sw_out' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_out(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_out_av ) ) THEN
+               ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_out_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_out_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_sw_cs_hr' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_cs_hr(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_cs_hr_av ) ) THEN
+               ALLOCATE( rad_sw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_cs_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_cs_hr_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_sw_hr' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_hr(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_sw_hr_av ) ) THEN
+               ALLOCATE( rad_sw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_sw_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_sw_hr_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_lw_in' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_in(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_in_av ) ) THEN
+               ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_in_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_in_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_lw_out' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_out(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_out_av ) ) THEN
+               ALLOCATE( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_out_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_out_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_lw_cs_hr' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_cs_hr(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_cs_hr_av ) ) THEN
+               ALLOCATE( rad_lw_cs_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+               rad_lw_cs_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_cs_hr_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_lw_hr' )
+         IF ( av == 0 )  THEN
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_hr(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ELSE
+            IF ( .NOT. ALLOCATED( rad_lw_hr_av ) ) THEN
+               ALLOCATE( rad_lw_hr_av(nzb+1:nzt+1,nysg:nyng,nxlg:nxrg) )
+              rad_lw_hr_av = REAL( fill_value, KIND = wp )
+            ENDIF
+            DO  i = nxl, nxr
+               DO  j = nys, nyn
+                  DO  k = nzb_do, nzt_do
+                     local_pf(i,j,k) = rad_lw_hr_av(k,j,i)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+
+      CASE ( 'rad_mrt_sw' )
+         local_pf = REAL( fill_value, KIND = wp )
+         IF ( av == 0 )  THEN
+            DO  l = 1, nmrtbl
+               i = mrtbl(ix,l)
+               j = mrtbl(iy,l)
+               k = mrtbl(iz,l)
+               local_pf(i,j,k) = mrtinsw(l)
+            ENDDO
+         ELSE
+            IF ( ALLOCATED( mrtinsw_av ) ) THEN
+               DO  l = 1, nmrtbl
+                  i = mrtbl(ix,l)
+                  j = mrtbl(iy,l)
+                  k = mrtbl(iz,l)
+                  local_pf(i,j,k) = mrtinsw_av(l)
+               ENDDO
+            ENDIF
+         ENDIF
+
+      CASE ( 'rad_mrt_lw' )
+         local_pf = REAL( fill_value, KIND = wp )
+         IF ( av == 0 )  THEN
+            DO  l = 1, nmrtbl
+               i = mrtbl(ix,l)
+               j = mrtbl(iy,l)
+               k = mrtbl(iz,l)
+               local_pf(i,j,k) = mrtinlw(l)
+            ENDDO
+         ELSE
+            IF ( ALLOCATED( mrtinlw_av ) ) THEN
+               DO  l = 1, nmrtbl
+                  i = mrtbl(ix,l)
+                  j = mrtbl(iy,l)
+                  k = mrtbl(iz,l)
+                  local_pf(i,j,k) = mrtinlw_av(l)
+               ENDDO
+            ENDIF
+         ENDIF
+
+      CASE ( 'rad_mrt' )
+         local_pf = REAL( fill_value, KIND = wp )
+         IF ( av == 0 )  THEN
+            DO  l = 1, nmrtbl
+               i = mrtbl(ix,l)
+               j = mrtbl(iy,l)
+               k = mrtbl(iz,l)
+               local_pf(i,j,k) = mrt(l)
+            ENDDO
+         ELSE
+            IF ( ALLOCATED( mrt_av ) ) THEN
+               DO  l = 1, nmrtbl
+                  i = mrtbl(ix,l)
+                  j = mrtbl(iy,l)
+                  k = mrtbl(iz,l)
+                  local_pf(i,j,k) = mrt_av(l)
+               ENDDO
+            ENDIF
+         ENDIF
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE radiation_data_output_3d
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining masked data output
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_data_output_mask( av, variable, found, local_pf )
+ 
+    USE control_parameters
+        
+    USE indices
+    
+    USE kinds
+    
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable   !< 
+
+    CHARACTER(LEN=5) ::  grid        !< flag to distinquish between staggered grids
+
+    INTEGER(iwp) ::  av              !< 
+    INTEGER(iwp) ::  i               !< 
+    INTEGER(iwp) ::  j               !< 
+    INTEGER(iwp) ::  k               !< 
+    INTEGER(iwp) ::  topo_top_ind    !< k index of highest horizontal surface
+
+    LOGICAL ::  found                !< true if output array was found
+    LOGICAL ::  resorted             !< true if array is resorted
+
+
+    REAL(wp),                                                                  &
+       DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
+          local_pf   !< 
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to array which needs to be resorted for output
+
+
+    found    = .TRUE.
+    grid     = 's'
+    resorted = .FALSE.
+
+    SELECT CASE ( TRIM( variable ) )
+
+
+       CASE ( 'rad_lw_in' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_lw_in
+          ELSE
+             to_be_resorted => rad_lw_in_av
+          ENDIF
+
+       CASE ( 'rad_lw_out' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_lw_out
+          ELSE
+             to_be_resorted => rad_lw_out_av
+          ENDIF
+
+       CASE ( 'rad_lw_cs_hr' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_lw_cs_hr
+          ELSE
+             to_be_resorted => rad_lw_cs_hr_av
+          ENDIF
+
+       CASE ( 'rad_lw_hr' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_lw_hr
+          ELSE
+             to_be_resorted => rad_lw_hr_av
+          ENDIF
+
+       CASE ( 'rad_sw_in' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_sw_in
+          ELSE
+             to_be_resorted => rad_sw_in_av
+          ENDIF
+
+       CASE ( 'rad_sw_out' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_sw_out
+          ELSE
+             to_be_resorted => rad_sw_out_av
+          ENDIF
+
+       CASE ( 'rad_sw_cs_hr' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_sw_cs_hr
+          ELSE
+             to_be_resorted => rad_sw_cs_hr_av
+          ENDIF
+
+       CASE ( 'rad_sw_hr' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => rad_sw_hr
+          ELSE
+             to_be_resorted => rad_sw_hr_av
+          ENDIF
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+!
+!-- Resort the array to be output, if not done above
+    IF ( .NOT. resorted )  THEN
+       IF ( .NOT. mask_surface(mid) )  THEN
+!
+!--       Default masked output
+          DO  i = 1, mask_size_l(mid,1)
+             DO  j = 1, mask_size_l(mid,2)
+                DO  k = 1, mask_size_l(mid,3)
+                   local_pf(i,j,k) =  to_be_resorted(mask_k(mid,k), &
+                                      mask_j(mid,j),mask_i(mid,i))
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ELSE
+!
+!--       Terrain-following masked output
+          DO  i = 1, mask_size_l(mid,1)
+             DO  j = 1, mask_size_l(mid,2)
+!
+!--             Get k index of highest horizontal surface
+                topo_top_ind = get_topography_top_index_ji( mask_j(mid,j), &
+                                                            mask_i(mid,i), &
+                                                            grid )
+!
+!--             Save output array
+                DO  k = 1, mask_size_l(mid,3)
+                   local_pf(i,j,k) = to_be_resorted(                       &
+                                          MIN( topo_top_ind+mask_k(mid,k), &
+                                               nzt+1 ),                    &
+                                          mask_j(mid,j),                   &
+                                          mask_i(mid,i)                     )
+                ENDDO
+             ENDDO
+          ENDDO
+
+       ENDIF
+    ENDIF
+
+
+
+ END SUBROUTINE radiation_data_output_mask
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Subroutine writes local (subdomain) restart data
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_wrd_local
+
+
+    IMPLICIT NONE
+
+
+    IF ( ALLOCATED( rad_net_av ) )  THEN
+       CALL wrd_write_string( 'rad_net_av' )
+       WRITE ( 14 )  rad_net_av
+    ENDIF
+    
+    IF ( ALLOCATED( rad_lw_in_xy_av ) )  THEN
+       CALL wrd_write_string( 'rad_lw_in_xy_av' )
+       WRITE ( 14 )  rad_lw_in_xy_av
+    ENDIF
+    
+    IF ( ALLOCATED( rad_lw_out_xy_av ) )  THEN
+       CALL wrd_write_string( 'rad_lw_out_xy_av' )
+       WRITE ( 14 )  rad_lw_out_xy_av
+    ENDIF
+    
+    IF ( ALLOCATED( rad_sw_in_xy_av ) )  THEN
+       CALL wrd_write_string( 'rad_sw_in_xy_av' )
+       WRITE ( 14 )  rad_sw_in_xy_av
+    ENDIF
+    
+    IF ( ALLOCATED( rad_sw_out_xy_av ) )  THEN
+       CALL wrd_write_string( 'rad_sw_out_xy_av' )
+       WRITE ( 14 )  rad_sw_out_xy_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_in ) )  THEN
+       CALL wrd_write_string( 'rad_lw_in' )
+       WRITE ( 14 )  rad_lw_in
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_in_av ) )  THEN
+       CALL wrd_write_string( 'rad_lw_in_av' )
+       WRITE ( 14 )  rad_lw_in_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_out ) )  THEN
+       CALL wrd_write_string( 'rad_lw_out' )
+       WRITE ( 14 )  rad_lw_out
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_out_av) )  THEN
+       CALL wrd_write_string( 'rad_lw_out_av' )
+       WRITE ( 14 )  rad_lw_out_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_cs_hr) )  THEN
+       CALL wrd_write_string( 'rad_lw_cs_hr' )
+       WRITE ( 14 )  rad_lw_cs_hr
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_cs_hr_av) )  THEN
+       CALL wrd_write_string( 'rad_lw_cs_hr_av' )
+       WRITE ( 14 )  rad_lw_cs_hr_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_hr) )  THEN
+       CALL wrd_write_string( 'rad_lw_hr' )
+       WRITE ( 14 )  rad_lw_hr
+    ENDIF
+
+    IF ( ALLOCATED( rad_lw_hr_av) )  THEN
+       CALL wrd_write_string( 'rad_lw_hr_av' )
+       WRITE ( 14 )  rad_lw_hr_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_in) )  THEN
+       CALL wrd_write_string( 'rad_sw_in' )
+       WRITE ( 14 )  rad_sw_in
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_in_av) )  THEN
+       CALL wrd_write_string( 'rad_sw_in_av' )
+       WRITE ( 14 )  rad_sw_in_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_out) )  THEN
+       CALL wrd_write_string( 'rad_sw_out' )
+       WRITE ( 14 )  rad_sw_out
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_out_av) )  THEN
+       CALL wrd_write_string( 'rad_sw_out_av' )
+       WRITE ( 14 )  rad_sw_out_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_cs_hr) )  THEN
+       CALL wrd_write_string( 'rad_sw_cs_hr' )
+       WRITE ( 14 )  rad_sw_cs_hr
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_cs_hr_av) )  THEN
+       CALL wrd_write_string( 'rad_sw_cs_hr_av' )
+       WRITE ( 14 )  rad_sw_cs_hr_av
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_hr) )  THEN
+       CALL wrd_write_string( 'rad_sw_hr' )
+       WRITE ( 14 )  rad_sw_hr
+    ENDIF
+
+    IF ( ALLOCATED( rad_sw_hr_av) )  THEN
+       CALL wrd_write_string( 'rad_sw_hr_av' )
+       WRITE ( 14 )  rad_sw_hr_av
+    ENDIF
+
+
+ END SUBROUTINE radiation_wrd_local
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Subroutine reads local (subdomain) restart data
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,    &
+                                nxr_on_file, nynf, nync, nyn_on_file, nysf,    &
+                                nysc, nys_on_file, tmp_2d, tmp_3d, found )
+ 
+
+    USE control_parameters
+        
+    USE indices
+    
+    USE kinds
+    
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i               !< 
+    INTEGER(iwp) ::  k               !< 
+    INTEGER(iwp) ::  nxlc            !< 
+    INTEGER(iwp) ::  nxlf            !< 
+    INTEGER(iwp) ::  nxl_on_file     !< 
+    INTEGER(iwp) ::  nxrc            !< 
+    INTEGER(iwp) ::  nxrf            !< 
+    INTEGER(iwp) ::  nxr_on_file     !< 
+    INTEGER(iwp) ::  nync            !< 
+    INTEGER(iwp) ::  nynf            !< 
+    INTEGER(iwp) ::  nyn_on_file     !< 
+    INTEGER(iwp) ::  nysc            !< 
+    INTEGER(iwp) ::  nysf            !< 
+    INTEGER(iwp) ::  nys_on_file     !< 
+
+    LOGICAL, INTENT(OUT)  :: found
+
+    REAL(wp), DIMENSION(nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_2d   !< 
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !< 
+
+    REAL(wp), DIMENSION(0:0,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d2   !< 
+
+
+    found = .TRUE.
+
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'rad_net_av' )
+          IF ( .NOT. ALLOCATED( rad_net_av ) )  THEN
+             ALLOCATE( rad_net_av(nysg:nyng,nxlg:nxrg) )
+          ENDIF  
+          IF ( k == 1 )  READ ( 13 )  tmp_2d
+          rad_net_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =           &
+                        tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                        
+       CASE ( 'rad_lw_in_xy_av' )
+          IF ( .NOT. ALLOCATED( rad_lw_in_xy_av ) )  THEN
+             ALLOCATE( rad_lw_in_xy_av(nysg:nyng,nxlg:nxrg) )
+          ENDIF  
+          IF ( k == 1 )  READ ( 13 )  tmp_2d
+          rad_lw_in_xy_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =      &
+                        tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                        
+       CASE ( 'rad_lw_out_xy_av' )
+          IF ( .NOT. ALLOCATED( rad_lw_out_xy_av ) )  THEN
+             ALLOCATE( rad_lw_out_xy_av(nysg:nyng,nxlg:nxrg) )
+          ENDIF  
+          IF ( k == 1 )  READ ( 13 )  tmp_2d
+          rad_lw_out_xy_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =     &
+                        tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                        
+       CASE ( 'rad_sw_in_xy_av' )
+          IF ( .NOT. ALLOCATED( rad_sw_in_xy_av ) )  THEN
+             ALLOCATE( rad_sw_in_xy_av(nysg:nyng,nxlg:nxrg) )
+          ENDIF  
+          IF ( k == 1 )  READ ( 13 )  tmp_2d
+          rad_sw_in_xy_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =      &
+                        tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                        
+       CASE ( 'rad_sw_out_xy_av' )
+          IF ( .NOT. ALLOCATED( rad_sw_out_xy_av ) )  THEN
+             ALLOCATE( rad_sw_out_xy_av(nysg:nyng,nxlg:nxrg) )
+          ENDIF  
+          IF ( k == 1 )  READ ( 13 )  tmp_2d
+          rad_sw_out_xy_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =     &
+                        tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                        
+       CASE ( 'rad_lw_in' )
+          IF ( .NOT. ALLOCATED( rad_lw_in ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_lw_in(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_lw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_lw_in(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =   &
+                   tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_lw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =     &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_lw_in_av' )
+          IF ( .NOT. ALLOCATED( rad_lw_in_av ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_lw_in_av(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_lw_in_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =&
+                    tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_lw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =  &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_lw_out' )
+          IF ( .NOT. ALLOCATED( rad_lw_out ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_lw_out(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_lw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_lw_out(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =  &
+                    tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_lw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =    &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_lw_out_av' )
+          IF ( .NOT. ALLOCATED( rad_lw_out_av ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_lw_out_av(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_lw_out_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) &
+                   = tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_lw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_lw_cs_hr' )
+          IF ( .NOT. ALLOCATED( rad_lw_cs_hr ) )  THEN
+             ALLOCATE( rad_lw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_lw_cs_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =        &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_lw_cs_hr_av' )
+          IF ( .NOT. ALLOCATED( rad_lw_cs_hr_av ) )  THEN
+             ALLOCATE( rad_lw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_lw_cs_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =     &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_lw_hr' )
+          IF ( .NOT. ALLOCATED( rad_lw_hr ) )  THEN
+             ALLOCATE( rad_lw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_lw_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_lw_hr_av' )
+          IF ( .NOT. ALLOCATED( rad_lw_hr_av ) )  THEN
+             ALLOCATE( rad_lw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_lw_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =        &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_sw_in' )
+          IF ( .NOT. ALLOCATED( rad_sw_in ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_sw_in(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_sw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_sw_in(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =   &
+                    tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_sw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =     &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_sw_in_av' )
+          IF ( .NOT. ALLOCATED( rad_sw_in_av ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_sw_in_av(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_sw_in_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =&
+                    tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_sw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =  &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_sw_out' )
+          IF ( .NOT. ALLOCATED( rad_sw_out ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_sw_out(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_sw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_sw_out(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =  &
+                    tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_sw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =    &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_sw_out_av' )
+          IF ( .NOT. ALLOCATED( rad_sw_out_av ) )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                ALLOCATE( rad_sw_out_av(0:0,nysg:nyng,nxlg:nxrg) )
+             ELSE
+                ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+          ENDIF  
+          IF ( k == 1 )  THEN
+             IF ( radiation_scheme == 'clear-sky'  .OR.                    &
+                  radiation_scheme == 'constant')  THEN
+                READ ( 13 )  tmp_3d2
+                rad_sw_out_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) &
+                   = tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ELSE
+                READ ( 13 )  tmp_3d
+                rad_sw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &
+                    tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+             ENDIF
+          ENDIF
+
+       CASE ( 'rad_sw_cs_hr' )
+          IF ( .NOT. ALLOCATED( rad_sw_cs_hr ) )  THEN
+             ALLOCATE( rad_sw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_sw_cs_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =        &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_sw_cs_hr_av' )
+          IF ( .NOT. ALLOCATED( rad_sw_cs_hr_av ) )  THEN
+             ALLOCATE( rad_sw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_sw_cs_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =     &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_sw_hr' )
+          IF ( .NOT. ALLOCATED( rad_sw_hr ) )  THEN
+             ALLOCATE( rad_sw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_sw_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE ( 'rad_sw_hr_av' )
+          IF ( .NOT. ALLOCATED( rad_sw_hr_av ) )  THEN
+             ALLOCATE( rad_sw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ENDIF
+          IF ( k == 1 )  READ ( 13 )  tmp_3d
+          rad_lw_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =        &
+                  tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+       CASE DEFAULT
+
+          found = .FALSE.
+
+    END SELECT
+
+ END SUBROUTINE radiation_rrd_local
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Subroutine writes debug information
+!------------------------------------------------------------------------------!
+ SUBROUTINE radiation_write_debug_log ( message )
+    !> it writes debug log with time stamp
+    CHARACTER(*)  :: message
+    CHARACTER(15) :: dtc
+    CHARACTER(8)  :: date
+    CHARACTER(10) :: time
+    CHARACTER(5)  :: zone
+    CALL date_and_time(date, time, zone)
+    dtc = date(7:8)//','//time(1:2)//':'//time(3:4)//':'//time(5:10)
+    WRITE(9,'(2A)') dtc, TRIM(message)
+    FLUSH(9)
+ END SUBROUTINE radiation_write_debug_log
+
+ END MODULE radiation_model_mod
Index: /palm/tags/release-6.0/SOURCE/random_function_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/random_function_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/random_function_mod.f90	(revision 3477)
@@ -0,0 +1,156 @@
+!> @file random_function_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.1  1998/02/04 16:09:45  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Random number generator, produces numbers equally distributed in interval [0,1]
+!> This routine is taken from the "numerical recipies"
+!------------------------------------------------------------------------------!
+ MODULE random_function_mod
+ 
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+    PUBLIC random_function, random_function_ini
+
+    INTEGER(iwp), PUBLIC, SAVE ::  random_iv(32)  !<
+    INTEGER(iwp), PUBLIC, SAVE ::  random_iy      !<
+
+    INTERFACE random_function_ini
+       MODULE PROCEDURE random_function_ini
+    END INTERFACE random_function_ini
+
+    INTERFACE random_function
+       MODULE PROCEDURE random_function
+    END INTERFACE random_function
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE random_function_ini
+
+       IMPLICIT NONE
+
+       random_iv = 0
+       random_iy = 0
+
+    END SUBROUTINE random_function_ini
+
+    FUNCTION random_function( idum )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  ia               !<
+       INTEGER(iwp) ::  idum             !<
+       INTEGER(iwp) ::  im               !<
+       INTEGER(iwp) ::  iq               !<
+       INTEGER(iwp) ::  ir               !<
+       INTEGER(iwp) ::  ndiv             !<
+       INTEGER(iwp) ::  ntab             !<
+
+       INTEGER(iwp) ::  j                !<
+       INTEGER(iwp) ::  k                !<
+
+       REAL(wp)     ::  am               !<
+       REAL(wp)     ::  eps              !<
+       REAL(wp)     ::  random_function  !<
+       REAL(wp)     ::  rnmx             !<
+
+       PARAMETER ( ia=16807, im=2147483647, am=1.0_wp/im, iq=127773, ir=2836, &
+                   ntab=32, ndiv=1+(im-1)/ntab, eps=1.2e-7_wp, rnmx=1.0_wp-eps )
+
+       IF ( idum .le. 0  .or.  random_iy .eq. 0 )  THEN
+          idum = max (-idum,1)
+          DO  j = ntab+8,1,-1
+             k    = idum / iq
+             idum = ia * ( idum - k * iq ) - ir * k
+             IF ( idum .lt. 0 )  idum = idum + im
+             IF ( j .le. ntab )  random_iv(j) = idum
+          ENDDO
+          random_iy = random_iv(1)
+       ENDIF
+
+       k    = idum / iq
+       idum = ia * ( idum - k * iq ) - ir * k
+       IF ( idum .lt. 0 )  idum = idum + im
+       j            = 1 + random_iy / ndiv
+       random_iy    = random_iv(j)
+       random_iv(j) = idum
+       random_function  = min ( am * random_iy , rnmx )
+
+    END FUNCTION random_function
+
+ END MODULE random_function_mod
Index: /palm/tags/release-6.0/SOURCE/random_gauss.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/random_gauss.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/random_gauss.f90	(revision 3477)
@@ -0,0 +1,116 @@
+!> @file random_gauss.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! RCS Log replace by Id keyword, revision history cleaned up
+!
+! Revision 1.1  1998/03/25 20:09:47  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Generates a gaussian distributed random number (mean value 1, sigma = 1)
+!> This routine is taken from the "numerical recipies".
+!------------------------------------------------------------------------------!
+ FUNCTION random_gauss( idum, upper_limit )
+ 
+
+    USE kinds
+
+    USE random_function_mod,                                                   &
+        ONLY:  random_function
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  idum          !<
+    INTEGER(iwp) ::  iset          !<
+
+    REAL(wp)     ::  fac           !<
+    REAL(wp)     ::  gset          !<
+    REAL(wp)     ::  random_gauss  !<
+    REAL(wp)     ::  rsq           !<
+    REAL(wp)     ::  upper_limit   !<
+    REAL(wp)     ::  v1            !<
+    REAL(wp)     ::  v2            !<
+
+    SAVE  iset, gset
+
+    DATA  iset /0/
+
+!
+!-- Random numbers are created as long as they do not fall below the given
+!-- upper limit
+    DO
+
+       IF ( iset == 0 )  THEN
+          rsq = 0.0_wp
+          DO  WHILE ( rsq >= 1.0_wp  .OR.  rsq == 0.0_wp )
+             v1  = 2.0_wp * random_function( idum ) - 1.0_wp
+             v2  = 2.0_wp * random_function( idum ) - 1.0_wp
+             rsq = v1**2 + v2**2
+          ENDDO
+          fac          = SQRT( -2.0_wp * LOG( rsq ) / rsq )
+          gset         = v1 * fac
+          random_gauss = v2 * fac + 1.0_wp
+          iset         = 1
+       ELSE
+          random_gauss = gset + 1.0_wp
+          iset         = 0
+       ENDIF
+
+       IF ( ABS( random_gauss - 1.0_wp ) <= upper_limit )  EXIT
+
+    ENDDO
+
+ END FUNCTION random_gauss
Index: /palm/tags/release-6.0/SOURCE/random_generator_parallel_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/random_generator_parallel_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/random_generator_parallel_mod.f90	(revision 3477)
@@ -0,0 +1,568 @@
+!> @file random_generator_parallel_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variable removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Formatting (MS)
+! 
+! 2255 2017-06-07 11:58:09Z knoop
+! Implemented PALM specific error message handling
+! 
+! 2173 2017-03-08 15:56:54Z knoop
+!
+! 2172 2017-03-08 15:55:25Z knoop
+! Bugfix: added global initialization routine and removed global array
+! 
+! 2144 2017-02-07 15:32:45Z knoop
+! Bugfix: compile time parameter replacement prevented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1400 2014-05-09 14:03:54Z knoop
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> This module contains and supports the random number generating routine ran_parallel.
+!> ran_parallel returns a uniform random deviate between 0.0 and 1.0 
+!> (exclusive of the end point values).
+!> Additionally it provides the generator with five integer for use as initial state space.
+!> The first tree integers (iran, jran, kran) are maintained as non negative values, 
+!> while the last two (mran, nran) have 32-bit nonzero values. 
+!> Also provided by this module is support for initializing or reinitializing 
+!> the state space to a desired standard sequence number, hashing the initial 
+!> values to random values, and allocating and deallocating the internal workspace
+!> Random number generator, produces numbers equally distributed in interval
+!>
+!> This routine is taken from the "numerical recipies vol. 2"
+!------------------------------------------------------------------------------!
+MODULE random_generator_parallel
+ 
+
+   USE kinds
+   
+   IMPLICIT NONE
+   
+   PRIVATE
+   PUBLIC random_number_parallel, random_seed_parallel, random_dummy,          &
+          id_random_array, seq_random_array, init_parallel_random_generator
+   
+   INTEGER(isp), SAVE :: lenran=0             !< 
+   INTEGER(isp), SAVE :: seq=0                !< 
+   INTEGER(isp), SAVE :: iran0                !< 
+   INTEGER(isp), SAVE :: jran0                !< 
+   INTEGER(isp), SAVE :: kran0                !< 
+   INTEGER(isp), SAVE :: mran0                !< 
+   INTEGER(isp), SAVE :: nran0                !< 
+   INTEGER(isp), SAVE :: rans                 !< 
+   
+   INTEGER(isp), DIMENSION(:, :), POINTER, SAVE :: ranseeds   !< 
+   
+   INTEGER(isp), DIMENSION(:), POINTER, SAVE :: iran   !< 
+   INTEGER(isp), DIMENSION(:), POINTER, SAVE :: jran   !< 
+   INTEGER(isp), DIMENSION(:), POINTER, SAVE :: kran   !< 
+   INTEGER(isp), DIMENSION(:), POINTER, SAVE :: mran   !< 
+   INTEGER(isp), DIMENSION(:), POINTER, SAVE :: nran   !< 
+   INTEGER(isp), DIMENSION(:), POINTER, SAVE :: ranv   !< 
+   
+   
+    
+   INTEGER(isp), DIMENSION(:,:), ALLOCATABLE   ::  id_random_array    !< 
+   INTEGER(isp), DIMENSION(:,:,:), ALLOCATABLE ::  seq_random_array   !< 
+   
+   REAL(wp), SAVE :: amm   !< 
+   
+   REAL(wp) :: random_dummy=0.0   !< 
+   
+   INTERFACE init_parallel_random_generator
+      MODULE PROCEDURE init_parallel_random_generator
+   END INTERFACE
+   
+   INTERFACE random_number_parallel
+      MODULE PROCEDURE ran0_s
+   END INTERFACE
+   
+   INTERFACE random_seed_parallel
+      MODULE PROCEDURE random_seed_parallel
+   END INTERFACE
+   
+   INTERFACE ran_hash
+      MODULE PROCEDURE ran_hash_v
+   END INTERFACE
+   
+   INTERFACE reallocate
+      MODULE PROCEDURE reallocate_iv,reallocate_im
+   END INTERFACE
+   
+   INTERFACE arth
+      MODULE PROCEDURE arth_i
+   END INTERFACE
+
+ CONTAINS
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize the parallel random number generator for a specific subdomain
+!------------------------------------------------------------------------------!
+   SUBROUTINE init_parallel_random_generator( nx, nys, nyn, nxl, nxr )
+
+      USE kinds
+
+      USE control_parameters,                                                  &
+          ONLY: ensemble_member_nr
+
+      IMPLICIT NONE
+
+      INTEGER(isp), INTENT(IN) ::  nx    !< 
+      INTEGER(isp), INTENT(IN) ::  nys   !< 
+      INTEGER(isp), INTENT(IN) ::  nyn   !< 
+      INTEGER(isp), INTENT(IN) ::  nxl   !< 
+      INTEGER(isp), INTENT(IN) ::  nxr   !< 
+
+      INTEGER(iwp) ::  i   !<
+      INTEGER(iwp) ::  j   !<
+
+!--   Allocate ID-array and state-space-array
+      ALLOCATE ( seq_random_array(5,nys:nyn,nxl:nxr) )
+      ALLOCATE ( id_random_array(nys:nyn,nxl:nxr) )
+      seq_random_array = 0
+      id_random_array  = 0
+
+!--   Asigning an ID to every vertical gridpoint column 
+!--   dependig on the ensemble run number.
+      DO i=nxl, nxr
+         DO j=nys, nyn
+            id_random_array(j,i) = j*(nx+1.0_wp) + i + 1.0_wp + 1E6 * &
+                                   ( ensemble_member_nr - 1000 )
+         ENDDO
+      ENDDO
+!--   Initializing with random_seed_parallel for every vertical 
+!--   gridpoint column.
+      random_dummy=0
+      DO i = nxl, nxr
+         DO j = nys, nyn
+            CALL random_seed_parallel (random_sequence=id_random_array(j, i))
+            CALL random_number_parallel (random_dummy)
+            CALL random_seed_parallel (get=seq_random_array(:, j, i))
+         ENDDO
+      ENDDO
+
+   END SUBROUTINE init_parallel_random_generator
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Lagged Fibonacci generator combined with a Marsaglia shiftsequence. 
+!> Returns as harvest a uniform random deviate between 0.0 and 1.0 (exclusive of the end point values). 
+!> This generator has the same calling and initialization conventions as Fortran 90's random_number routine. 
+!> Use random_seed_parallel to initialize or reinitialize to a particular sequence. 
+!> The period of this generator is about 2.0 x 10^28, and it fully vectorizes.
+!> Validity of the integer model assumed by this generator is tested at initialization.
+!------------------------------------------------------------------------------!
+   SUBROUTINE ran0_s(harvest)
+
+      USE kinds
+      
+      IMPLICIT NONE
+      
+      REAL(wp), INTENT(OUT) :: harvest   !< 
+      
+      IF  (lenran < 1) CALL ran_init(1)  !- Initialization routine in ran_state.
+      
+      !- Update Fibonacci generator, which has period p^2 + p + 1, p = 2^31 - 69.
+      rans = iran0 - kran0   
+      
+      IF  (rans < 0) rans = rans + 2147483579_isp
+      
+      iran0 = jran0
+      jran0 = kran0
+      kran0 = rans
+      
+      nran0 = ieor( nran0, ishft (nran0, 13) ) !- Update Marsaglia shift sequence with period 2^32 - 1.
+      nran0 = ieor( nran0, ishft (nran0, -17) )
+      nran0 = ieor( nran0, ishft (nran0, 5) )
+      
+      rans  = ieor( nran0, rans )   !- Combine the generators.
+      
+      harvest = amm * merge( rans, not(rans), rans < 0 ) !- Make the result positive definite (note that amm is negative).
+      
+   END SUBROUTINE ran0_s
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize or reinitialize the random generator state space to vectors of size length. 
+!> The saved variable seq is hashed (via calls to the module routine ran_hash) 
+!> to create unique starting seeds, different for each vector component.
+!------------------------------------------------------------------------------!
+   SUBROUTINE ran_init( length )
+   
+      USE kinds
+      
+      IMPLICIT NONE
+      
+      INTEGER(isp), INTENT(IN) ::  length   !< 
+   
+      INTEGER(isp) ::  hg    !< 
+      INTEGER(isp) ::  hgm   !< 
+      INTEGER(isp) ::  hgng  !< 
+      
+      INTEGER(isp) ::  new   !< 
+      INTEGER(isp) ::  j     !< 
+      INTEGER(isp) ::  hgt   !< 
+      
+      IF ( length < lenran ) RETURN !- Simply return if enough space is already allocated.
+      
+      hg=huge(1_isp)
+      hgm=-hg
+      hgng=hgm-1
+      hgt = hg
+      
+      !- The following lines check that kind value isp is in fact a 32-bit integer 
+      !- with the usual properties that we expect it to have (under negation and wrap-around addition).
+      !- If all of these tests are satisfied, then the routines that use this module are portable, 
+      !- even though they go beyond Fortran 90's integer model.
+      
+      IF  ( hg /= 2147483647 ) CALL ran_error('arithmetic assumption 1 failed')
+      IF  ( hgng >= 0 )        CALL ran_error('arithmetic assumption 2 failed')
+      IF  ( hgt+1 /= hgng )    CALL ran_error('arithmetic assumption 3 failed')
+      IF  ( not(hg) >= 0 )     CALL ran_error('arithmetic assumption 4 failed')
+      IF  ( not(hgng) < 0 )    CALL ran_error('arithmetic assumption 5 failed')
+      IF  ( hg+hgng >= 0 )     CALL ran_error('arithmetic assumption 6 failed')
+      IF  ( not(-1_isp) < 0 )  CALL ran_error('arithmetic assumption 7 failed')
+      IF  ( not(0_isp) >= 0 )  CALL ran_error('arithmetic assumption 8 failed')
+      IF  ( not(1_isp) >= 0 )  CALL ran_error('arithmetic assumption 9 failed')
+      
+      IF  ( lenran > 0) THEN                          !- Reallocate space, or ...
+      
+         ranseeds => reallocate( ranseeds, length, 5)
+         ranv => reallocate( ranv, length-1)
+         new = lenran+1
+         
+      ELSE                                            !- allocate space.
+      
+         ALLOCATE(ranseeds(length,5))
+         ALLOCATE(ranv(length-1))
+         new = 1   !- Index of first location not yet initialized.
+         amm = nearest(1.0_wp,-1.0_wp)/hgng
+         !- Use of nearest is to ensure that returned random deviates are strictly lessthan 1.0.
+         IF  (amm*hgng >= 1.0 .or. amm*hgng <= 0.0)                            &
+            CALL ran_error('arithmetic assumption 10 failed')
+            
+      END IF 
+      
+      !- Set starting values, unique by seq and vector component.
+      ranseeds(new:,1) = seq
+      ranseeds(new:,2:5)=spread(arth(new,1,size(ranseeds(new:,1))),2,4)
+      
+      DO j=1,4   !- Hash them.
+         CALL ran_hash(ranseeds(new:,j), ranseeds(new:,j+1))
+      END DO
+      
+      WHERE (ranseeds (new: ,1:3) < 0)                                         & 
+         ranseeds(new: ,1:3)=not(ranseeds(new: ,1:3))  !- Enforce nonnegativity.
+         
+      WHERE (ranseeds(new: ,4:5) == 0) ranseeds(new: ,4:5)=1 !- Enforce nonzero.
+      
+      IF  (new == 1) THEN !- Set scalar seeds.
+      
+         iran0 = ranseeds(1,1)
+         jran0 = ranseeds(1,2)
+         kran0 = ranseeds(1,3)
+         mran0 = ranseeds(1,4)
+         nran0 = ranseeds(1,5)
+         rans  = nran0
+         
+      END IF 
+      
+      IF  (length > 1) THEN   !- Point to vector seeds.
+      
+         iran => ranseeds(2:,1)
+         jran => ranseeds(2:,2)
+         kran => ranseeds(2:,3)
+         mran => ranseeds(2:,4)
+         nran => ranseeds(2:,5)
+         ranv = nran
+         
+      END IF 
+      
+      lenran = length
+      
+   END SUBROUTINE ran_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> User interface to release the workspace used by the random number routines.
+!------------------------------------------------------------------------------!
+   SUBROUTINE ran_deallocate
+   
+      IF  ( lenran > 0 ) THEN
+      
+         DEALLOCATE(ranseeds, ranv)
+         NULLIFY(ranseeds, ranv, iran, jran, kran, mran, nran)
+         lenran = 0
+         
+      END IF 
+      
+   END SUBROUTINE ran_deallocate
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> User interface for seeding the random number routines. 
+!> Syntax is exactly like Fortran 90's random_seed routine, 
+!> with one additional argument keyword: random_sequence, set to any integer 
+!> value, causes an immediate new initialization, seeded by that integer.
+!------------------------------------------------------------------------------!
+   SUBROUTINE random_seed_parallel( random_sequence, state_size, put, get )
+   
+      IMPLICIT NONE
+      
+      INTEGER(isp), OPTIONAL, INTENT(IN)  ::  random_sequence   !< 
+      INTEGER(isp), OPTIONAL, INTENT(OUT) ::  state_size        !< 
+      
+      INTEGER(isp), DIMENSION(:), OPTIONAL, INTENT(IN)  ::  put   !< 
+      INTEGER(isp), DIMENSION(:), OPTIONAL, INTENT(OUT) ::  get   !< 
+      
+      IF  ( present(state_size) ) THEN
+      
+         state_size = 5 * lenran
+         
+      ELSE IF  ( present(put) ) THEN
+      
+         IF  ( lenran == 0 ) RETURN
+         
+         ranseeds = reshape( put,shape(ranseeds) )
+         
+         WHERE (ranseeds(:,1:3) < 0) ranseeds(: ,1:3) = not(ranseeds(: ,1:3))
+         !- Enforce nonnegativity and nonzero conditions on any user-supplied seeds.
+         
+         WHERE (ranseeds(:,4:5) == 0) ranseeds(:,4:5) = 1
+         
+         iran0 = ranseeds(1,1)
+         jran0 = ranseeds(1,2)
+         kran0 = ranseeds(1,3)
+         mran0 = ranseeds(1,4)
+         nran0 = ranseeds(1,5)
+         
+      ELSE IF  ( present(get) ) THEN
+      
+         IF  (lenran == 0) RETURN
+         
+         ranseeds(1,1:5) = (/ iran0,jran0,kran0,mran0,nran0 /)
+         get = reshape( ranseeds, shape(get) )
+         
+      ELSE IF  ( present(random_sequence) ) THEN
+      
+         CALL ran_deallocate
+         seq = random_sequence
+         
+      END IF 
+      
+   END SUBROUTINE random_seed_parallel
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> DES-like hashing of two 32-bit integers, using shifts, 
+!> xor's, and adds to make the internal nonlinear function.
+!------------------------------------------------------------------------------!
+   SUBROUTINE ran_hash_v( il, ir )
+   
+      IMPLICIT NONE
+      
+      INTEGER(isp), DIMENSION(:), INTENT(INOUT) ::  il   !< 
+      INTEGER(isp), DIMENSION(:), INTENT(INOUT) ::  ir   !< 
+      
+      INTEGER(isp), DIMENSION(size(il)) ::  is   !< 
+      
+      INTEGER(isp) :: j   !< 
+      
+      DO j=1,4
+      
+         is = ir
+         ir = ieor( ir, ishft(ir,5) ) + 1422217823
+         ir = ieor( ir, ishft(ir,-16) ) + 1842055030
+         ir = ieor( ir, ishft(ir,9) ) + 80567781
+         ir = ieor( il, ir )
+         il = is
+      END DO
+      
+   END SUBROUTINE ran_hash_v
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> User interface to process error-messages 
+!> produced by the random_number_parallel module
+!------------------------------------------------------------------------------!
+   SUBROUTINE ran_error(string)
+
+      USE control_parameters,                                                &
+        ONLY: message_string
+
+      CHARACTER(LEN=*), INTENT(IN) ::  string   !< Error message string
+
+      message_string = 'incompatible integer arithmetic: ' // TRIM( string )
+      CALL message( 'ran_init', 'PA0453', 1, 2, 0, 6, 0 )
+
+   END SUBROUTINE ran_error
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reallocates the generators state space "ranseeds" to vectors of size length. 
+!------------------------------------------------------------------------------!
+   FUNCTION reallocate_iv( p, n )
+
+      USE control_parameters,                                                &
+        ONLY: message_string
+   
+      INTEGER(isp), DIMENSION(:), POINTER ::  p               !< 
+      INTEGER(isp), DIMENSION(:), POINTER ::  reallocate_iv   !< 
+      
+      INTEGER(isp), INTENT(IN) ::  n   !< 
+      
+      INTEGER(isp) ::  nold   !< 
+      INTEGER(isp) ::  ierr   !< 
+      
+      ALLOCATE(reallocate_iv(n),stat=ierr)
+      
+      IF (ierr /= 0) THEN
+         message_string = 'problem in attempt to allocate memory'
+         CALL message( 'reallocate_iv', 'PA0454', 1, 2, 0, 6, 0 )
+      END IF
+
+      IF (.not. associated(p)) RETURN
+      
+      nold = size(p)
+      
+      reallocate_iv(1:min(nold,n)) = p(1:min(nold,n))
+      
+      DEALLOCATE(p)
+      
+   END FUNCTION reallocate_iv
+   
+   FUNCTION reallocate_im( p, n, m )
+
+      USE control_parameters,                                                &
+        ONLY: message_string
+   
+      INTEGER(isp), DIMENSION(:,:), POINTER ::  p               !< 
+      INTEGER(isp), DIMENSION(:,:), POINTER ::  reallocate_im   !< 
+      
+      INTEGER(isp), INTENT(IN) ::  m   !< 
+      INTEGER(isp), INTENT(IN) ::  n   !< 
+      
+      INTEGER(isp) ::  mold   !< 
+      INTEGER(isp) ::  nold   !< 
+      INTEGER(isp) ::  ierr   !< 
+      
+      ALLOCATE(reallocate_im(n,m),stat=ierr)
+      
+      IF (ierr /= 0) THEN
+         message_string = 'problem in attempt to allocate memory'
+         CALL message( 'reallocate_im', 'PA0454', 1, 2, 0, 6, 0 )
+      END IF
+
+      IF (.not. associated(p)) RETURN
+      
+      nold = size(p,1)
+      mold = size(p,2)
+      
+      reallocate_im(1:min(nold,n),1:min(mold,m)) =                             &
+         p(1:min(nold,n),1:min(mold,m))
+         
+      DEALLOCATE(p)
+      
+   END FUNCTION reallocate_im
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reallocates the generators state space "ranseeds" to vectors of size length. 
+!------------------------------------------------------------------------------!
+   FUNCTION arth_i(first,increment,n)
+   
+      INTEGER(isp), INTENT(IN) ::  first       !< 
+      INTEGER(isp), INTENT(IN) ::  increment   !< 
+      INTEGER(isp), INTENT(IN) ::  n           !< 
+      
+      INTEGER(isp), DIMENSION(n) ::  arth_i    !< 
+      
+      INTEGER(isp) ::  k      !< 
+      INTEGER(isp) ::  k2     !< 
+      INTEGER(isp) ::  temp   !< 
+      
+      INTEGER(isp), PARAMETER ::  npar_arth=16   !< 
+      INTEGER(isp), PARAMETER ::  npar2_arth=8   !< 
+      
+      IF (n > 0) arth_i(1) = first
+      
+      IF (n <= npar_arth) THEN
+      
+         DO k=2,n
+            arth_i(k) = arth_i(k-1)+increment
+         END DO
+         
+      ELSE
+      
+         DO k=2,npar2_arth
+            arth_i(k) = arth_i(k-1) + increment
+         END DO
+         
+         temp = increment * npar2_arth
+         k = npar2_arth
+         
+         DO
+            IF (k >= n) EXIT
+            k2 = k + k
+            arth_i(k+1:min(k2,n)) = temp + arth_i(1:min(k,n-k))
+            temp = temp + temp
+            k = k2
+         END DO
+         
+      END IF
+      
+   END FUNCTION arth_i
+
+END MODULE random_generator_parallel
Index: /palm/tags/release-6.0/SOURCE/read_restart_data_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/read_restart_data_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/read_restart_data_mod.f90	(revision 3477)
@@ -0,0 +1,2014 @@
+!> @file read_restart_data_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Added chemistry profiles for restart run (basit)
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3289 2018-09-28 10:23:58Z suehring
+! Introduce module parameter for number of inflow profiles
+! 
+! 3288 2018-09-28 10:23:08Z suehring
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables for boundary flags
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! New parameters concerning vertical grid stretching have been added
+! 
+! 3056 2018-06-04 07:49:35Z Giersch
+! found variable has to be set to false inside overlap loop
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! precipitation_rate_av removed
+! 
+! 3003 2018-04-23 10:22:58Z Giersch
+! z_i is also read to use the last known inversion height from the 
+! initial run as the first inversion height which is written into the
+! run control file 
+! 
+! 2956 2018-04-10 11:01:03Z Giersch
+! spectrum_x and spectrum_y have been moved to global data
+! 
+! 2921 2018-03-22 15:05:23Z Giersch
+! spinup_time, day_of_year_init and time_utc_init are also read now
+! 
+! 2912 2018-03-20 13:00:05Z knoop
+! Added gust module interface calls
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> Reads restart data from restart-file(s) (binary format).
+!>
+!> @todo: Revise max_pr_cs (profiles for chemistry)
+!------------------------------------------------------------------------------!
+ MODULE read_restart_data_mod
+
+
+    USE control_parameters
+
+    USE chem_modules,                                                                              &
+       ONLY: max_pr_cs
+
+
+    IMPLICIT NONE
+
+
+    INTERFACE rrd_global
+       MODULE PROCEDURE rrd_global
+    END INTERFACE rrd_global
+
+    INTERFACE rrd_read_parts_of_global
+       MODULE PROCEDURE rrd_read_parts_of_global
+    END INTERFACE rrd_read_parts_of_global
+
+    INTERFACE rrd_local
+       MODULE PROCEDURE rrd_local
+    END INTERFACE rrd_local
+
+    INTERFACE rrd_skip_global
+       MODULE PROCEDURE rrd_skip_global
+    END INTERFACE rrd_skip_global
+
+
+    PUBLIC rrd_global, rrd_read_parts_of_global, rrd_local, rrd_skip_global
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads values of global control variables from restart-file (binary format) 
+!> created by PE0 of the previous run
+!------------------------------------------------------------------------------!
+    SUBROUTINE rrd_global
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  inflow_damping_factor, mean_inflow_profiles, pt_init,        &
+                  q_init, ref_state, sa_init, s_init, u_init, ug, v_init, vg
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY:  bcm_rrd_global
+
+       USE date_and_time_mod,                                                  &
+           ONLY:  day_of_year_init, time_utc_init
+
+       USE flight_mod,                                                         &
+           ONLY: flight_rrd_global
+
+       USE grid_variables,                                                     &
+           ONLY:  dx, dy
+
+       USE gust_mod,                                                           &
+           ONLY :  gust_rrd_global
+
+       USE indices,                                                            &
+           ONLY:  nz, nx, nx_on_file, ny, ny_on_file
+
+       USE model_1d_mod,                                                       &
+           ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
+
+       USE netcdf_interface,                                                   &
+           ONLY:  netcdf_precision, output_for_t0
+
+       USE ocean_mod,                                                          &
+           ONLY:  ocean_rrd_global
+
+       USE particle_attributes,                                                &
+           ONLY:  curvature_solution_effects
+
+       USE pegrid
+
+       USE radiation_model_mod,                                                &
+           ONLY:  time_radiation
+
+       USE spectra_mod,                                                        &
+           ONLY:  average_count_sp, spectrum_x, spectrum_y
+
+       USE statistics,                                                         &
+           ONLY:  statistic_regions, hom, hom_sum, pr_palm, u_max, u_max_ijk,  &
+                  v_max, v_max_ijk, w_max, w_max_ijk, z_i
+
+       USE synthetic_turbulence_generator_mod,                                 &
+           ONLY: stg_rrd_global
+
+       USE user_read_restart_data_mod,                                         &
+           ONLY:  user_rrd_global 
+
+       USE vertical_nesting_mod,                                               &
+           ONLY:  vnest_init
+
+       USE wind_turbine_model_mod,                                             &
+           ONLY: wtm_rrd_global
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=10) ::  binary_version_global, version_on_file
+
+       LOGICAL ::  found  
+
+
+       CALL check_open( 13 )
+!
+!--    Make version number check first
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+       READ ( 13 )  version_on_file
+
+       binary_version_global = '4.7'
+       IF ( TRIM( version_on_file ) /= TRIM( binary_version_global ) )  THEN
+          WRITE( message_string, * ) 'version mismatch concerning ',           &
+                                     'binary_version_global:',                 &
+                                     '&version on file    = "',                &
+                                     TRIM( version_on_file ), '"',             &
+                                     '&version on program = "',                &
+                                     TRIM( binary_version_global ), '"'
+          CALL message( 'rrd_global', 'PA0296', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    Read number of PEs and horizontal index bounds of all PEs used in the
+!--    previous run
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( TRIM( restart_string(1:length) ) /= 'numprocs' )  THEN
+          WRITE( message_string, * ) 'numprocs not found in data from prior ', &
+                                     'run on PE ', myid
+          CALL message( 'rrd_global', 'PA0297', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  numprocs_previous_run
+
+       IF ( .NOT. ALLOCATED( hor_index_bounds_previous_run ) )  THEN
+          ALLOCATE( hor_index_bounds_previous_run(4,0:numprocs_previous_run-1) )
+       ENDIF
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'hor_index_bounds' )  THEN
+          WRITE( message_string, * ) 'hor_index_bounds not found in data ',    &
+                                     'from prior run on PE ', myid
+          CALL message( 'rrd_global', 'PA0298', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  hor_index_bounds_previous_run
+
+!
+!--    Read vertical number of gridpoints and number of different areas used
+!--    for computing statistics. Allocate arrays depending on these values,
+!--    which are needed for the following read instructions.
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'nz' )  THEN
+          WRITE( message_string, * ) 'nz not found in data from prior run ',   &
+                                     'on PE ', myid
+          CALL message( 'rrd_global', 'PA0299', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  nz
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'max_pr_user' )  THEN
+          WRITE( message_string, * ) 'max_pr_user not found in data from ',    &
+                                     'prior run on PE ', myid
+          CALL message( 'rrd_global', 'PA0300', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  max_pr_user    ! This value is checked against the number of
+                                   ! user profiles given for the current run
+                                   ! in routine user_parin (it has to match)
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'statistic_regions' )  THEN
+          WRITE( message_string, * ) 'statistic_regions not found in data ',   &
+                                     'from prior run on PE ', myid
+          CALL message( 'rrd_global', 'PA0301', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  statistic_regions
+
+       IF ( .NOT. ALLOCATED( ug ) )  THEN
+          ALLOCATE( ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1),                    &
+                    v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1),           &
+                    ref_state(0:nz+1), s_init(0:nz+1), sa_init(0:nz+1),        &
+                    hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions),     &
+                    hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs,0:statistic_regions) )
+       ENDIF
+
+!
+!--    Now read all control parameters:
+!--    Caution: When the following read instructions have been changed, the
+!--    -------  version number stored in the variable binary_version_global has
+!--             to be increased. The same changes must also be done in
+!--             wrd_write_global.
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       DO WHILE ( restart_string(1:length) /= 'binary_version_local' )
+
+          found = .FALSE.
+
+          SELECT CASE ( restart_string(1:length) )
+
+             CASE ( 'advected_distance_x' )
+                READ ( 13 )  advected_distance_x
+             CASE ( 'advected_distance_y' )
+                READ ( 13 )  advected_distance_y
+             CASE ( 'alpha_surface' )
+                READ ( 13 )  alpha_surface
+             CASE ( 'average_count_pr' )
+                READ ( 13 )  average_count_pr
+             CASE ( 'average_count_sp' )
+                READ ( 13 )  average_count_sp
+             CASE ( 'average_count_3d' )
+                READ ( 13 )  average_count_3d
+             CASE ( 'bc_e_b' )
+                READ ( 13 )  bc_e_b
+             CASE ( 'bc_lr' )
+                READ ( 13 )  bc_lr
+             CASE ( 'bc_ns' )
+                READ ( 13 )  bc_ns
+             CASE ( 'bc_p_b' )
+                READ ( 13 )  bc_p_b
+             CASE ( 'bc_p_t' )
+                READ ( 13 )  bc_p_t
+             CASE ( 'bc_pt_b' )
+                READ ( 13 )  bc_pt_b
+             CASE ( 'bc_pt_t' )
+                READ ( 13 )  bc_pt_t
+             CASE ( 'bc_pt_t_val' )
+                READ ( 13 )  bc_pt_t_val
+             CASE ( 'bc_q_b' )
+                READ ( 13 )  bc_q_b
+             CASE ( 'bc_q_t' )
+                READ ( 13 )  bc_q_t
+             CASE ( 'bc_q_t_val' )
+                READ ( 13 )  bc_q_t_val
+             CASE ( 'bc_s_b' )
+                READ ( 13 )  bc_s_b
+             CASE ( 'bc_s_t' )
+                READ ( 13 )  bc_s_t
+             CASE ( 'bc_uv_b' )
+                READ ( 13 )  bc_uv_b
+             CASE ( 'bc_uv_t' )
+                READ ( 13 )  bc_uv_t
+             CASE ( 'building_height' )
+                READ ( 13 )  building_height
+             CASE ( 'building_length_x' )
+                READ ( 13 )  building_length_x
+             CASE ( 'building_length_y' )
+                READ ( 13 )  building_length_y
+             CASE ( 'building_wall_left' )
+                READ ( 13 )  building_wall_left
+             CASE ( 'building_wall_south' )
+                READ ( 13 )  building_wall_south
+             CASE ( 'call_psolver_at_all_substeps' )
+                READ ( 13 )  call_psolver_at_all_substeps
+             CASE ( 'canyon_height' )
+                READ ( 13 )  canyon_height
+             CASE ( 'canyon_wall_left' )
+                READ ( 13 )  canyon_wall_left
+             CASE ( 'canyon_wall_south' )
+                READ ( 13 )  canyon_wall_south
+             CASE ( 'canyon_width_x' )
+                READ ( 13 )  canyon_width_x
+             CASE ( 'canyon_width_y' )
+                READ ( 13 )  canyon_width_y
+             CASE ( 'cfl_factor' )
+                READ ( 13 )  cfl_factor
+             CASE ( 'cloud_droplets' )
+                READ ( 13 )  cloud_droplets
+             CASE ( 'collective_wait' )
+                READ ( 13 )  collective_wait
+             CASE ( 'conserve_volume_flow' )
+                READ ( 13 )  conserve_volume_flow
+             CASE ( 'conserve_volume_flow_mode' )
+                READ ( 13 )  conserve_volume_flow_mode
+             CASE ( 'constant_flux_layer' )
+                READ ( 13 )  constant_flux_layer
+             CASE ( 'coupling_start_time' )
+                READ ( 13 )  coupling_start_time
+             CASE ( 'current_timestep_number' )
+                READ ( 13 )  current_timestep_number
+             CASE ( 'curvature_solution_effects' )
+                READ ( 13 )  curvature_solution_effects
+             CASE ( 'cycle_mg' )
+                READ ( 13 )  cycle_mg
+             CASE ( 'damp_level_1d' )
+                READ ( 13 )  damp_level_1d
+             CASE ( 'day_of_year_init' )
+                READ ( 13 )  day_of_year_init
+             CASE ( 'dissipation_1d' )
+                READ ( 13 )  dissipation_1d
+             CASE ( 'do2d_xy_time_count' )
+                READ ( 13 )  do2d_xy_time_count
+             CASE ( 'do2d_xz_time_count' )
+                READ ( 13 )  do2d_xz_time_count
+             CASE ( 'do2d_yz_time_count' )
+                READ ( 13 )  do2d_yz_time_count
+             CASE ( 'do3d_time_count' )
+                READ ( 13 )  do3d_time_count
+             CASE ( 'dp_external' )
+                READ ( 13 )  dp_external
+             CASE ( 'dp_level_b' )
+                READ ( 13 )  dp_level_b
+             CASE ( 'dp_smooth' )
+                READ ( 13 )  dp_smooth
+             CASE ( 'dpdxy' )
+                READ ( 13 )  dpdxy
+             CASE ( 'dt_3d' )
+                READ ( 13 )  dt_3d
+             CASE ( 'dt_pr_1d' )
+                READ ( 13 )  dt_pr_1d
+             CASE ( 'dt_run_control_1d' )
+                READ ( 13 )  dt_run_control_1d
+             CASE ( 'dvrp_filecount' )
+                READ ( 13 )  dvrp_filecount
+             CASE ( 'dx' )
+                READ ( 13 )  dx
+             CASE ( 'dy' )
+                READ ( 13 )  dy
+             CASE ( 'dz' )
+                READ ( 13 )  dz
+             CASE ( 'dz_max' )
+                READ ( 13 )  dz_max
+             CASE ( 'dz_stretch_factor' )
+                READ ( 13 )  dz_stretch_factor
+             CASE ( 'dz_stretch_factor_array' )
+                READ ( 13 )  dz_stretch_factor_array
+             CASE ( 'dz_stretch_level' )
+                READ ( 13 )  dz_stretch_level
+             CASE ( 'dz_stretch_level_end' )
+                READ ( 13 )  dz_stretch_level_end
+             CASE ( 'dz_stretch_level_start' )
+                READ ( 13 )  dz_stretch_level_start
+             CASE ( 'e_min' )
+                READ ( 13 )  e_min
+             CASE ( 'end_time_1d' )
+                READ ( 13 )  end_time_1d
+             CASE ( 'fft_method' )
+                READ ( 13 )  fft_method
+             CASE ( 'first_call_lpm' )
+                READ ( 13 )  first_call_lpm
+             CASE ( 'galilei_transformation' )
+                READ ( 13 )  galilei_transformation
+             CASE ( 'hom' )
+                READ ( 13 )  hom
+             CASE ( 'hom_sum' )
+                READ ( 13 )  hom_sum
+             CASE ( 'humidity' )
+                READ ( 13 )  humidity
+             CASE ( 'inflow_damping_factor' )
+                IF ( .NOT. ALLOCATED( inflow_damping_factor ) )  THEN
+                   ALLOCATE( inflow_damping_factor(0:nz+1) )
+                ENDIF
+                READ ( 13 )  inflow_damping_factor
+             CASE ( 'inflow_damping_height' )
+                READ ( 13 )  inflow_damping_height
+             CASE ( 'inflow_damping_width' )
+                READ ( 13 )  inflow_damping_width
+             CASE ( 'inflow_disturbance_begin' )
+                READ ( 13 )  inflow_disturbance_begin
+             CASE ( 'inflow_disturbance_end' )
+                READ ( 13 )  inflow_disturbance_end
+             CASE ( 'km_constant' )
+                READ ( 13 )  km_constant
+             CASE ( 'large_scale_forcing' )
+                READ ( 13 )  large_scale_forcing
+             CASE ( 'large_scale_subsidence' )
+                READ ( 13 )  large_scale_subsidence
+             CASE ( 'latitude' )
+                READ ( 13 )  latitude
+             CASE ( 'longitude' )
+                READ ( 13 )  longitude
+             CASE ( 'loop_optimization' )
+                READ ( 13 )  loop_optimization
+             CASE ( 'masking_method' )
+                READ ( 13 )  masking_method
+             CASE ( 'mean_inflow_profiles' )
+                IF ( .NOT. ALLOCATED( mean_inflow_profiles ) )  THEN
+                   ALLOCATE( mean_inflow_profiles(0:nz+1,1:num_mean_inflow_profiles) )
+                ENDIF
+                READ ( 13 )  mean_inflow_profiles
+             CASE ( 'mg_cycles' )
+                READ ( 13 )  mg_cycles
+             CASE ( 'mg_switch_to_pe0_level' )
+                READ ( 13 )  mg_switch_to_pe0_level
+             CASE ( 'mixing_length_1d' )
+                READ ( 13 )  mixing_length_1d
+             CASE ( 'momentum_advec' )
+                READ ( 13 )  momentum_advec
+             CASE ( 'most_method' )
+                READ ( 13 )  most_method
+             CASE ( 'netcdf_precision' )
+                READ ( 13 )  netcdf_precision
+             CASE ( 'neutral' )
+                READ ( 13 )  neutral
+             CASE ( 'ngsrb' )
+                READ ( 13 )  ngsrb
+             CASE ( 'nsor' )
+                READ ( 13 )  nsor
+             CASE ( 'nsor_ini' )
+                READ ( 13 )  nsor_ini
+             CASE ( 'nudging' )
+                READ ( 13 )  nudging
+             CASE ( 'num_leg' )
+                READ ( 13 )  num_leg
+             CASE ( 'nx' )
+                READ ( 13 )  nx
+                nx_on_file = nx
+             CASE ( 'ny' )
+                READ ( 13 )  ny
+                ny_on_file = ny
+             CASE ( 'ocean_mode' )
+                READ ( 13 )  ocean_mode
+             CASE ( 'old_dt' )
+                READ ( 13 )  old_dt
+             CASE ( 'omega' )
+                READ ( 13 )  omega
+             CASE ( 'omega_sor' )
+                READ ( 13 )  omega_sor
+             CASE ( 'output_for_t0' )
+                READ (13)    output_for_t0
+             CASE ( 'passive_scalar' )
+                READ ( 13 )  passive_scalar
+             CASE ( 'prandtl_number' )
+                READ ( 13 )  prandtl_number
+             CASE ( 'psolver' )
+                READ ( 13 )  psolver
+             CASE ( 'pt_damping_factor' )
+                READ ( 13 )  pt_damping_factor
+             CASE ( 'pt_damping_width' )
+                READ ( 13 )  pt_damping_width
+             CASE ( 'pt_init' )
+                READ ( 13 )  pt_init
+             CASE ( 'pt_reference' )
+                READ ( 13 )  pt_reference
+             CASE ( 'pt_surface' )
+                READ ( 13 )  pt_surface
+             CASE ( 'pt_surface_initial_change' )
+                READ ( 13 )  pt_surface_initial_change
+             CASE ( 'pt_vertical_gradient' )
+                READ ( 13 )  pt_vertical_gradient
+             CASE ( 'pt_vertical_gradient_level' )
+                READ ( 13 )  pt_vertical_gradient_level
+             CASE ( 'pt_vertical_gradient_level_ind' )
+                READ ( 13 )  pt_vertical_gradient_level_ind
+             CASE ( 'q_init' )
+                READ ( 13 )  q_init
+             CASE ( 'q_surface' )
+                READ ( 13 )  q_surface
+             CASE ( 'q_surface_initial_change' )
+                READ ( 13 )  q_surface_initial_change
+             CASE ( 'q_vertical_gradient' )
+                READ ( 13 )  q_vertical_gradient
+             CASE ( 'q_vertical_gradient_level' )
+                READ ( 13 )  q_vertical_gradient_level
+             CASE ( 'q_vertical_gradient_level_ind' )
+                READ ( 13 )  q_vertical_gradient_level_ind
+             CASE ( 'random_generator' )
+                READ ( 13 )  random_generator
+             CASE ( 'random_heatflux' )
+                READ ( 13 )  random_heatflux
+             CASE ( 'rans_mode' )
+                READ ( 13 )  rans_mode
+             CASE ( 'rayleigh_damping_factor' )
+                READ ( 13 )  rayleigh_damping_factor
+             CASE ( 'rayleigh_damping_height' )
+                READ ( 13 )  rayleigh_damping_height
+             CASE ( 'recycling_width' )
+                READ ( 13 )  recycling_width
+             CASE ( 'recycling_yshift' )
+                READ ( 13 ) recycling_yshift
+             CASE ( 'ref_state' )
+                READ ( 13 )  ref_state
+             CASE ( 'reference_state' )
+                READ ( 13 )  reference_state
+             CASE ( 'residual_limit' )
+                READ ( 13 )  residual_limit
+             CASE ( 'roughness_length' )
+                READ ( 13 )  roughness_length
+             CASE ( 'run_coupled' )
+                READ ( 13 )  run_coupled
+             CASE ( 'runnr' )
+                READ ( 13 )  runnr
+             CASE ( 's_init' )
+                READ ( 13 )  s_init
+             CASE ( 's_surface' )
+                READ ( 13 )  s_surface
+             CASE ( 's_surface_initial_change' )
+                READ ( 13 )  s_surface_initial_change
+             CASE ( 's_vertical_gradient' )
+                READ ( 13 )  s_vertical_gradient
+             CASE ( 's_vertical_gradient_level' )
+                READ ( 13 )  s_vertical_gradient_level
+             CASE ( 's_vertical_gradient_level_ind' )
+                READ ( 13 )  s_vertical_gradient_level_ind
+             CASE ( 'scalar_advec' )
+                READ ( 13 )  scalar_advec
+             CASE ( 'simulated_time' )
+                READ ( 13 )  simulated_time
+             CASE ( 'spectrum_x' )
+                IF ( .NOT. ALLOCATED( spectrum_x ) )  THEN
+                   ALLOCATE( spectrum_x( 1:nx/2, 1:100, 1:10 ) )
+                ENDIF
+                READ ( 13 )  spectrum_x
+             CASE ( 'spectrum_y' )
+                IF ( .NOT. ALLOCATED( spectrum_y ) )  THEN
+                   ALLOCATE( spectrum_y( 1:ny/2, 1:100, 1:10 ) )
+                ENDIF
+                READ ( 13 )  spectrum_y
+             CASE ( 'spinup_time' )
+                READ ( 13 )  spinup_time
+             CASE ( 'surface_heatflux' )
+                READ ( 13 )  surface_heatflux
+             CASE ( 'surface_pressure' )
+                READ ( 13 )  surface_pressure
+             CASE ( 'surface_scalarflux' )
+                READ ( 13 )  surface_scalarflux
+             CASE ( 'surface_waterflux' )
+                READ ( 13 )  surface_waterflux
+             CASE ( 'time_coupling' )
+                READ ( 13 )  time_coupling
+             CASE ( 'time_disturb' )
+                READ ( 13 )  time_disturb
+             CASE ( 'time_do2d_xy' )
+                READ ( 13 )  time_do2d_xy
+             CASE ( 'time_do2d_xz' )
+                READ ( 13 )  time_do2d_xz
+             CASE ( 'time_do2d_yz' )
+                READ ( 13 )  time_do2d_yz
+             CASE ( 'time_do3d' )
+                READ ( 13 )  time_do3d
+             CASE ( 'time_do_av' )
+                READ ( 13 )  time_do_av
+             CASE ( 'time_do_sla' )
+                READ ( 13 )  time_do_sla
+             CASE ( 'time_domask' )
+                READ ( 13 )  time_domask
+             CASE ( 'time_dopr' )
+                READ ( 13 )  time_dopr
+             CASE ( 'time_dopr_av' )
+                READ ( 13 )  time_dopr_av
+             CASE ( 'time_dopr_listing' )
+                READ ( 13 )  time_dopr_listing
+             CASE ( 'time_dopts' )
+                READ ( 13 )  time_dopts
+             CASE ( 'time_dosp' )
+                READ ( 13 )  time_dosp
+             CASE ( 'time_dots' )
+                READ ( 13 )  time_dots
+             CASE ( 'time_dvrp' )
+                READ ( 13 )  time_dvrp
+             CASE ( 'time_radiation' )
+                READ ( 13 )  time_radiation
+             CASE ( 'time_restart' )
+                READ ( 13 )  time_restart
+             CASE ( 'time_run_control' )
+                READ ( 13 )  time_run_control
+             CASE ( 'time_since_reference_point' )
+                READ ( 13 )  time_since_reference_point
+             CASE ( 'time_utc_init' )
+                READ ( 13 )  time_utc_init
+             CASE ( 'timestep_scheme' )
+                READ ( 13 )  timestep_scheme
+             CASE ( 'top_heatflux' )
+                READ ( 13 )  top_heatflux
+             CASE ( 'top_momentumflux_u' )
+                READ ( 13 )  top_momentumflux_u
+             CASE ( 'top_momentumflux_v' )
+                READ ( 13 )  top_momentumflux_v
+             CASE ( 'top_scalarflux' )
+                READ ( 13 )  top_scalarflux
+             CASE ( 'topography' )
+                READ ( 13 )  topography
+             CASE ( 'topography_grid_convention' )
+                READ ( 13 )  topography_grid_convention
+             CASE ( 'tsc' )
+                READ ( 13 )  tsc
+             CASE ( 'tunnel_height' )
+                READ ( 13 )  tunnel_height
+             CASE ( 'tunnel_length' )
+                READ ( 13 )  tunnel_length
+             CASE ( 'tunnel_wall_depth' )
+                READ ( 13 )  tunnel_wall_depth
+             CASE ( 'tunnel_width_x' )
+                READ ( 13 )  tunnel_width_x
+             CASE ( 'tunnel_width_y' )
+                READ ( 13 )  tunnel_width_y
+             CASE ( 'turbulence_closure' )
+                READ ( 13 )  turbulence_closure
+             CASE ( 'turbulent_inflow' )
+                READ ( 13 )  turbulent_inflow
+             CASE ( 'u_bulk' )
+                READ ( 13 )  u_bulk
+             CASE ( 'u_init' )
+                READ ( 13 )  u_init
+             CASE ( 'u_max' )
+                READ ( 13 )  u_max
+             CASE ( 'u_max_ijk' )
+                READ ( 13 )  u_max_ijk
+             CASE ( 'ug' )
+                READ ( 13 )  ug
+             CASE ( 'ug_surface' )
+                READ ( 13 )  ug_surface
+             CASE ( 'ug_vertical_gradient' )
+                READ ( 13 )  ug_vertical_gradient
+             CASE ( 'ug_vertical_gradient_level' )
+                READ ( 13 )  ug_vertical_gradient_level
+             CASE ( 'ug_vertical_gradient_level_ind' )
+                READ ( 13 )  ug_vertical_gradient_level_ind
+             CASE ( 'use_surface_fluxes' )
+                READ ( 13 )  use_surface_fluxes
+             CASE ( 'use_top_fluxes' )
+                READ ( 13 )  use_top_fluxes
+             CASE ( 'use_ug_for_galilei_tr' )
+                READ ( 13 )  use_ug_for_galilei_tr
+             CASE ( 'use_upstream_for_tke' )
+                READ ( 13 )  use_upstream_for_tke
+             CASE ( 'v_bulk' )
+                READ ( 13 )  v_bulk
+             CASE ( 'v_init' )
+                READ ( 13 )  v_init
+             CASE ( 'v_max' )
+                READ ( 13 )  v_max
+             CASE ( 'v_max_ijk' )
+                READ ( 13 )  v_max_ijk
+             CASE ( 'vg' )
+                READ ( 13 )  vg
+             CASE ( 'vg_surface' )
+                READ ( 13 )  vg_surface
+             CASE ( 'vg_vertical_gradient' )
+                READ ( 13 )  vg_vertical_gradient
+             CASE ( 'vg_vertical_gradient_level' )
+                READ ( 13 )  vg_vertical_gradient_level
+             CASE ( 'vg_vertical_gradient_level_ind' )
+                READ ( 13 )  vg_vertical_gradient_level_ind
+             CASE ( 'virtual_flight' )
+                READ ( 13 )  virtual_flight
+             CASE ( 'vnest_init' )
+                READ ( 13 )  vnest_init
+             CASE ( 'volume_flow_area' )
+                READ ( 13 )  volume_flow_area
+             CASE ( 'volume_flow_initial' )
+                READ ( 13 )  volume_flow_initial
+             CASE ( 'subs_vertical_gradient' )
+                READ ( 13 )  subs_vertical_gradient
+             CASE ( 'subs_vertical_gradient_level' )
+                READ ( 13 )  subs_vertical_gradient_level
+             CASE ( 'subs_vertical_gradient_level_i' )
+                READ ( 13 )  subs_vertical_gradient_level_i
+             CASE ( 'w_max' )
+                READ ( 13 )  w_max
+             CASE ( 'w_max_ijk' )
+                READ ( 13 )  w_max_ijk
+             CASE ( 'wall_adjustment' )
+                READ ( 13 )  wall_adjustment
+             CASE ( 'wall_heatflux' )
+                READ ( 13 )  wall_heatflux
+             CASE ( 'wall_humidityflux' )
+                READ ( 13 )  wall_humidityflux
+             CASE ( 'wall_scalarflux' )
+                READ ( 13 )  wall_scalarflux
+             CASE ( 'y_shift' )
+                READ ( 13 )  y_shift
+             CASE ( 'z0h_factor' )
+                READ ( 13 )  z0h_factor
+             CASE ( 'zeta_max' )
+                READ ( 13 )  zeta_max
+             CASE ( 'zeta_min' )
+                READ ( 13 )  zeta_min
+             CASE ( 'z_i' )
+                READ ( 13 )  z_i
+
+             CASE DEFAULT
+!
+!--             Read global variables from of other modules
+                IF ( .NOT. found )  CALL bcm_rrd_global( found )
+                IF ( .NOT. found )  CALL flight_rrd_global( found )
+                IF ( .NOT. found )  CALL gust_rrd_global( found )
+                IF ( .NOT. found )  CALL ocean_rrd_global( found )
+                IF ( .NOT. found )  CALL stg_rrd_global ( found )
+                IF ( .NOT. found )  CALL wtm_rrd_global( found )
+!
+!--             Read user-defined global variables
+                IF ( .NOT. found )  CALL user_rrd_global( found )
+
+                IF ( .NOT. found )  THEN
+                   WRITE( message_string, * ) 'unknown variable named "',      &
+                                           restart_string(1:length),           &
+                                          '" found in global data from ',      & 
+                                          'prior run on PE ', myid
+                CALL message( 'rrd_global', 'PA0302', 1, 2, 0, 6, 0 )
+ 
+                ENDIF
+
+          END SELECT
+!
+!--       Read next string
+          READ ( 13 )  length
+          READ ( 13 )  restart_string(1:length)    
+
+       ENDDO
+ 
+
+    CALL close_file( 13 )
+
+    
+    END SUBROUTINE rrd_global
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Skipping the global control variables from restart-file (binary format)
+!> except some information needed when reading restart data from a previous
+!> run which used a smaller total domain or/and a different domain decomposition
+!> (initializing_actions  == 'cyclic_fill').
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE rrd_read_parts_of_global
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  ref_state
+
+       USE indices,                                                            &
+           ONLY:  nz, nx_on_file, ny_on_file
+
+       USE kinds
+
+       USE pegrid
+
+       USE statistics,                                                         &
+           ONLY:  statistic_regions, hom, hom_sum, pr_palm
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=10) ::  version_on_file
+       CHARACTER (LEN=20) ::  momentum_advec_check
+       CHARACTER (LEN=20) ::  scalar_advec_check
+       CHARACTER (LEN=1)  ::  cdum
+
+       INTEGER(iwp) ::  max_pr_user_on_file
+       INTEGER(iwp) ::  nz_on_file
+       INTEGER(iwp) ::  statistic_regions_on_file
+       INTEGER(iwp) ::  tmp_mpru
+       INTEGER(iwp) ::  tmp_sr
+
+       REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE ::  hom_sum_on_file
+       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  hom_on_file
+
+
+       CALL check_open( 13 )
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+       READ ( 13 )  version_on_file
+
+!
+!-- Read number of PEs and horizontal index bounds of all PEs used in previous
+!-- run
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'numprocs' )  THEN
+          WRITE( message_string, * ) 'numprocs not found in data from prior ', &
+                                     'run on PE ', myid
+          CALL message( 'rrd_read_parts_of_global', 'PA0297', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  numprocs_previous_run
+
+       IF ( .NOT. ALLOCATED( hor_index_bounds_previous_run ) )  THEN
+          ALLOCATE( hor_index_bounds_previous_run(4,0:numprocs_previous_run-1) )
+       ENDIF
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'hor_index_bounds' )  THEN
+          WRITE( message_string, * ) 'hor_index_bounds not found in data ',    &
+                                     'from prior run on PE ', myid
+          CALL message( 'rrd_read_parts_of_global', 'PA0298', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  hor_index_bounds_previous_run
+
+!
+!-- Read vertical number of gridpoints and number of different areas used
+!-- for computing statistics. Allocate arrays depending on these values,
+!-- which are needed for the following read instructions.
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'nz' )  THEN
+          message_string = 'nz not found in restart data file'
+          CALL message( 'rrd_read_parts_of_global', 'PA0303', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  nz_on_file
+       IF ( nz_on_file /= nz )  THEN
+          WRITE( message_string, * ) 'mismatch concerning number of ',         &
+                                     'gridpoints along z:',                    &
+                                     '&nz on file    = "', nz_on_file, '"',    &
+                                     '&nz from run   = "', nz, '"'
+          CALL message( 'rrd_read_parts_of_global', 'PA0304', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'max_pr_user' )  THEN
+          message_string = 'max_pr_user not found in restart data file'
+          CALL message( 'rrd_read_parts_of_global', 'PA0305', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  max_pr_user_on_file
+       IF ( max_pr_user_on_file /= max_pr_user )  THEN
+          WRITE( message_string, * ) 'number of user profiles on res',         &
+                                     'tart data file differs from the ',       &
+                                     'current run:&max_pr_user on file    = "',&
+                                     max_pr_user_on_file, '"',                 &
+                                     '&max_pr_user from run   = "',            &
+                                     max_pr_user, '"'
+          CALL message( 'rrd_read_parts_of_global', 'PA0306', 0, 0, 0, 6, 0 )
+          tmp_mpru = MIN( max_pr_user_on_file, max_pr_user )
+       ELSE
+          tmp_mpru = max_pr_user
+       ENDIF
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       IF ( restart_string(1:length) /= 'statistic_regions' )  THEN
+          message_string = 'statistic_regions not found in restart data file'
+          CALL message( 'rrd_read_parts_of_global', 'PA0307', 1, 2, 0, 6, 0 )
+       ENDIF
+       READ ( 13 )  statistic_regions_on_file
+       IF ( statistic_regions_on_file /= statistic_regions )  THEN
+          WRITE( message_string, * ) 'statistic regions on restart data file ',&
+                                     'differ from the current run:',           &
+                                     '&statistic regions on file    = "',      &
+                                     statistic_regions_on_file, '"',           &
+                                     '&statistic regions from run   = "',      &
+                                      statistic_regions, '"',                  &
+                                     '&statistic data may be lost!'
+          CALL message( 'rrd_read_parts_of_global', 'PA0308', 0, 1, 0, 6, 0 )
+          tmp_sr = MIN( statistic_regions_on_file, statistic_regions )
+       ELSE
+          tmp_sr = statistic_regions
+       ENDIF
+
+!
+!-- Now read and check some control parameters and skip the rest
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       DO  WHILE ( restart_string(1:length) /= 'binary_version_local' )
+
+          SELECT CASE ( restart_string(1:length) )
+
+             CASE ( 'average_count_pr' )
+                READ ( 13 )  average_count_pr
+                IF ( average_count_pr /= 0 )  THEN
+                   WRITE( message_string, * ) 'inflow profiles not ',          &
+                                  'temporally averaged. &Averaging will be ',  &
+                                  'done now using', average_count_pr,          & 
+                                  ' samples.'
+                   CALL message( 'rrd_read_parts_of_global', 'PA0309',         &
+                                 0, 1, 0, 6, 0 )
+                ENDIF
+
+             CASE ( 'hom' )
+                ALLOCATE( hom_on_file(0:nz+1,2,pr_palm+max_pr_user_on_file,    &
+                          0:statistic_regions_on_file) )
+                READ ( 13 )  hom_on_file
+                hom(:,:,1:pr_palm+tmp_mpru,0:tmp_sr) =                         &
+                             hom_on_file(:,:,1:pr_palm+tmp_mpru,0:tmp_sr)
+                DEALLOCATE( hom_on_file )
+
+             CASE ( 'hom_sum' )
+                ALLOCATE( hom_sum_on_file(0:nz+1,pr_palm+max_pr_user_on_file,  &
+                          0:statistic_regions_on_file) )
+                READ ( 13 )  hom_sum_on_file
+                hom_sum(:,1:pr_palm+tmp_mpru,0:tmp_sr) =                       &
+                             hom_sum_on_file(:,1:pr_palm+tmp_mpru,0:tmp_sr)
+                DEALLOCATE( hom_sum_on_file )
+
+             CASE ( 'momentum_advec' )
+                momentum_advec_check = momentum_advec
+                READ ( 13 )  momentum_advec
+                IF ( TRIM( momentum_advec_check ) /= TRIM( momentum_advec ) )  &
+                THEN
+                   WRITE( message_string, * ) 'momentum_advec of the restart ',&
+                                  'run differs from momentum_advec of the ',   &
+                                  'initial run.'
+                   CALL message( 'rrd_read_parts_of_global', 'PA0100',         &
+                                 1, 2, 0, 6, 0 )
+                ENDIF
+
+             CASE ( 'nx' )
+                READ ( 13 )  nx_on_file
+
+             CASE ( 'ny' )
+                READ ( 13 )  ny_on_file
+
+             CASE ( 'ref_state' )
+                READ ( 13 )  ref_state
+
+             CASE ( 'scalar_advec' )
+                scalar_advec_check = scalar_advec
+                READ ( 13 )  scalar_advec
+                IF ( TRIM( scalar_advec_check ) /= TRIM( scalar_advec ) )      &
+                THEN
+                   WRITE( message_string, * ) 'scalar_advec of the restart ',  &
+                                  'run differs from scalar_advec of the ',     &
+                                  'initial run.'
+                   CALL message( 'rrd_read_parts_of_global', 'PA0101',         &
+                                 1, 2, 0, 6, 0 )
+                ENDIF
+
+             CASE DEFAULT
+
+                READ ( 13 )  cdum
+
+          END SELECT
+
+          READ ( 13 )  length
+          READ ( 13 )  restart_string(1:length)
+
+       ENDDO
+
+!
+!-- Calculate the temporal average of vertical profiles, if neccessary
+    IF ( average_count_pr /= 0 )  THEN
+       hom_sum = hom_sum / REAL( average_count_pr, KIND=wp )
+    ENDIF
+
+
+    CALL close_file( 13 )
+
+
+    END SUBROUTINE rrd_read_parts_of_global
+
+
+! Description:
+! ------------
+!> Reads processor specific data of variables and arrays from restart file 
+!> (binary format).
+!------------------------------------------------------------------------------!
+ SUBROUTINE rrd_local 
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  e, kh, km, p, pt, q, ql, s, u, u_m_l, u_m_n, u_m_r, u_m_s,      &
+               v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, w, w_m_l, w_m_n, w_m_r, w_m_s
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY :  bcm_rrd_local
+
+    USE averaging
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_rrd_local
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE gust_mod,                                                              &
+        ONLY :  gust_rrd_local
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, nx_on_file, ny, nys, nysg, nyn, &
+               nyng, ny_on_file, nzb, nzt
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_rrd_local
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_rrd_local
+
+    USE particle_attributes,                                                   &
+        ONLY:  iran_part
+
+    USE pegrid
+
+    USE radiation_model_mod,                                                   &
+        ONLY: radiation_rrd_local
+
+    USE random_function_mod,                                                   &
+        ONLY:  random_iv, random_iy
+
+    USE random_generator_parallel,                                             &
+        ONLY:  id_random_array, seq_random_array
+    
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_rrd_local
+
+    USE surface_mod,                                                           &
+        ONLY :  surface_rrd_local
+        
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_rrd_local
+
+    USE user_read_restart_data_mod,                                            &
+        ONLY:  user_rrd_local 
+ 
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=7)  ::  myid_char_save
+    CHARACTER (LEN=10) ::  binary_version_local
+    CHARACTER (LEN=10) ::  version_on_file
+
+    INTEGER(iwp) ::  files_to_be_opened  !<
+    INTEGER(iwp) ::  i                   !<
+    INTEGER(iwp) ::  j                   !<
+    INTEGER(iwp) ::  k                   !<
+    INTEGER(iwp) ::  myid_on_file        !<
+    INTEGER(iwp) ::  numprocs_on_file    !<
+    INTEGER(iwp) ::  nxlc                !<
+    INTEGER(iwp) ::  nxlf                !<
+    INTEGER(iwp) ::  nxlpr               !<
+    INTEGER(iwp) ::  nxl_on_file         !<
+    INTEGER(iwp) ::  nxrc                !<
+    INTEGER(iwp) ::  nxrf                !<
+    INTEGER(iwp) ::  nxrpr               !<
+    INTEGER(iwp) ::  nxr_on_file         !<
+    INTEGER(iwp) ::  nync                !<
+    INTEGER(iwp) ::  nynf                !<
+    INTEGER(iwp) ::  nynpr               !<
+    INTEGER(iwp) ::  nyn_on_file         !<
+    INTEGER(iwp) ::  nysc                !<
+    INTEGER(iwp) ::  nysf                !<
+    INTEGER(iwp) ::  nyspr               !<
+    INTEGER(iwp) ::  nys_on_file         !<
+    INTEGER(iwp) ::  nzb_on_file         !<
+    INTEGER(iwp) ::  nzt_on_file         !<
+    INTEGER(iwp) ::  offset_x            !<
+    INTEGER(iwp) ::  offset_y            !<
+    INTEGER(iwp) ::  shift_x             !<
+    INTEGER(iwp) ::  shift_y             !<
+
+    INTEGER(iwp), DIMENSION(numprocs_previous_run) ::  file_list       !<
+    INTEGER(iwp), DIMENSION(numprocs_previous_run) ::  overlap_count   !<
+
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nxlfa      !<
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nxrfa      !<
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nynfa      !<
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nysfa      !<
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  offset_xa  !<
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  offset_ya  !<
+
+    INTEGER(isp), DIMENSION(:,:),   ALLOCATABLE ::  tmp_2d_id_random   !< temporary array for storing random generator data
+    INTEGER(isp), DIMENSION(:,:,:), ALLOCATABLE ::  tmp_2d_seq_random  !< temporary array for storing random generator data
+
+    LOGICAL ::  found
+
+    REAL(wp), DIMENSION(:,:),   ALLOCATABLE   ::  tmp_2d      !< temporary array for storing 2D data
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3d      !< temporary array for storing 3D data
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwul   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwun   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwur   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwus   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvl   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvn   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvr   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvs   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwwl   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwwn   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwwr   !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwws   !<
+
+
+!
+!-- Read data from previous model run.
+    CALL cpu_log( log_point_s(14), 'rrd_local', 'start' )
+
+!
+!-- Check which of the restart files contain data needed for the subdomain
+!-- of this PE
+    files_to_be_opened = 0
+
+    DO  i = 1, numprocs_previous_run
+!
+!--    Store array bounds of the previous run ("pr") in temporary scalars
+       nxlpr = hor_index_bounds_previous_run(1,i-1)
+       nxrpr = hor_index_bounds_previous_run(2,i-1)
+       nyspr = hor_index_bounds_previous_run(3,i-1)
+       nynpr = hor_index_bounds_previous_run(4,i-1)
+
+!
+!--    Determine the offsets. They may be non-zero in case that the total domain
+!--    on file is smaller than the current total domain.
+       offset_x = ( nxl / ( nx_on_file + 1 ) ) * ( nx_on_file + 1 )
+       offset_y = ( nys / ( ny_on_file + 1 ) ) * ( ny_on_file + 1 )
+
+!
+!--    Start with this offset and then check, if the subdomain on file
+!--    matches another time(s) in the current subdomain by shifting it
+!--    for nx_on_file+1, ny_on_file+1 respectively
+    
+       shift_y = 0
+       j       = 0
+       DO WHILE (  nyspr+shift_y <= nyn-offset_y )
+          
+          IF ( nynpr+shift_y >= nys-offset_y ) THEN 
+
+             shift_x = 0
+             DO WHILE ( nxlpr+shift_x <= nxr-offset_x )
+                
+                IF ( nxrpr+shift_x >= nxl-offset_x ) THEN
+                   j = j +1
+                   IF ( j > 1000 )  THEN
+!
+!--                   Array bound exceeded
+                      message_string = 'data from subdomain of previous' //    &
+                                       ' run mapped more than 1000 times'
+                      CALL message( 'rrd_local', 'PA0284', 2, 2, -1,           &
+                                       6, 1 )
+                   ENDIF
+
+                   IF ( j == 1 )  THEN
+                      files_to_be_opened = files_to_be_opened + 1
+                      file_list(files_to_be_opened) = i-1
+                   ENDIF
+                      
+                   offset_xa(files_to_be_opened,j) = offset_x + shift_x
+                   offset_ya(files_to_be_opened,j) = offset_y + shift_y
+!
+!--                Index bounds of overlapping data
+                   nxlfa(files_to_be_opened,j) = MAX( nxl-offset_x-shift_x,    &
+                                                      nxlpr )
+                   nxrfa(files_to_be_opened,j) = MIN( nxr-offset_x-shift_x,    &
+                                                      nxrpr )
+                   nysfa(files_to_be_opened,j) = MAX( nys-offset_y-shift_y,    & 
+                                                      nyspr )
+                   nynfa(files_to_be_opened,j) = MIN( nyn-offset_y-shift_y,    & 
+                                                      nynpr )
+
+                ENDIF
+
+                shift_x = shift_x + ( nx_on_file + 1 )
+             ENDDO
+       
+          ENDIF
+             
+          shift_y = shift_y + ( ny_on_file + 1 )             
+       ENDDO
+          
+       IF ( j > 0 )  overlap_count(files_to_be_opened) = j
+          
+    ENDDO
+   
+!
+!-- Save the id-string of the current process, since myid_char may now be used
+!-- to open files created by PEs with other id.
+    myid_char_save = myid_char
+
+    IF ( files_to_be_opened /= 1  .OR.  numprocs /= numprocs_previous_run )    &
+    THEN
+       WRITE( message_string, * ) 'number of PEs or virtual PE-grid changed ', &
+                        'in restart run & PE', myid, ' will read from files ', &
+                         file_list(1:files_to_be_opened)
+       CALL message( 'rrd_local', 'PA0285', 0, 0, 0, 6, 0 )
+    ENDIF
+
+!
+!-- Read data from all restart files determined above
+    DO  i = 1, files_to_be_opened
+ 
+       j = file_list(i)
+!
+!--    Set the filename (underscore followed by four digit processor id)
+       WRITE (myid_char,'(''_'',I6.6)')  j
+
+!
+!--    Open the restart file. If this file has been created by PE0 (_000000),
+!--    the global variables at the beginning of the file have to be skipped
+!--    first.
+       CALL check_open( 13 )
+       IF ( j == 0 )  CALL rrd_skip_global
+
+!
+!--    First compare the version numbers
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+       READ ( 13 )  version_on_file
+
+       binary_version_local = '4.7'
+       IF ( TRIM( version_on_file ) /= TRIM( binary_version_local ) )  THEN
+          WRITE( message_string, * ) 'version mismatch concerning ',           &
+                      'binary_version_local:',                                 &
+                      '&version on file    = "', TRIM( version_on_file ), '"', &
+                      '&version in program = "', TRIM( binary_version_local ), '"'
+          CALL message( 'rrd_local', 'PA0286', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    Read number of processors, processor-id, and array ranges.
+!--    Compare the array ranges with those stored in the index bound array.
+       READ ( 13 )  numprocs_on_file, myid_on_file, nxl_on_file, nxr_on_file,  &
+                    nys_on_file, nyn_on_file, nzb_on_file, nzt_on_file
+
+       IF ( nxl_on_file /= hor_index_bounds_previous_run(1,j) )  THEN
+          WRITE( message_string, * ) 'problem with index bound nxl on ',       &
+                            'restart file "', myid_char, '"',                  &
+                            '&nxl = ', nxl_on_file, ' but it should be',       &
+                            '&= ', hor_index_bounds_previous_run(1,j),         &
+                            '&from the index bound information array'
+          CALL message( 'rrd_local', 'PA0287', 2, 2, -1, 6, 1 )
+       ENDIF
+
+       IF ( nxr_on_file /= hor_index_bounds_previous_run(2,j) )  THEN
+           WRITE( message_string, * ) 'problem with index bound nxr on ',      &
+                               'restart file "', myid_char, '"'  ,             &
+                               ' nxr = ', nxr_on_file, ' but it should be',    &
+                               ' = ', hor_index_bounds_previous_run(2,j),      &
+                               ' from the index bound information array' 
+          CALL message( 'rrd_local', 'PA0288', 2, 2, -1, 6, 1 )
+
+       ENDIF
+
+       IF ( nys_on_file /= hor_index_bounds_previous_run(3,j) )  THEN
+          WRITE( message_string, * ) 'problem with index bound nys on ',       &
+                                 'restart file "', myid_char, '"',             &
+                                 '&nys = ', nys_on_file, ' but it should be',  &
+                                 '&= ', hor_index_bounds_previous_run(3,j),    &
+                                 '&from the index bound information array'
+          CALL message( 'rrd_local', 'PA0289', 2, 2, -1, 6, 1 ) 
+       ENDIF
+
+       IF ( nyn_on_file /= hor_index_bounds_previous_run(4,j) )  THEN
+          WRITE( message_string, * ) 'problem with index bound nyn on ',       &
+                               'restart file "', myid_char, '"',               &
+                               '&nyn = ', nyn_on_file, ' but it should be',    &
+                               '&= ', hor_index_bounds_previous_run(4,j),      &
+                               '&from the index bound information array'
+          CALL message( 'rrd_local', 'PA0290', 2, 2, -1, 6, 1 ) 
+       ENDIF
+
+       IF ( nzb_on_file /= nzb )  THEN
+          WRITE( message_string, * ) 'mismatch between actual data and data ', &
+                                     'from prior run on PE ', myid,            &
+                                     '&nzb on file = ', nzb_on_file,           &
+                                     '&nzb         = ', nzb
+          CALL message( 'rrd_local', 'PA0291', 1, 2, 0, 6, 0 )  
+       ENDIF
+
+       IF ( nzt_on_file /= nzt )  THEN
+          WRITE( message_string, * ) 'mismatch between actual data and data ', &
+                                     'from prior run on PE ', myid,            &
+                                     '&nzt on file = ', nzt_on_file,           &
+                                     '&nzt         = ', nzt
+          CALL message( 'rrd_local', 'PA0292', 1, 2, 0, 6, 0 )  
+       ENDIF
+
+!
+!--    Allocate temporary arrays sized as the arrays on the restart file
+       ALLOCATE( tmp_2d(nys_on_file-nbgp:nyn_on_file+nbgp,                     &
+                        nxl_on_file-nbgp:nxr_on_file+nbgp),                    &
+                 tmp_3d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,           &
+                        nxl_on_file-nbgp:nxr_on_file+nbgp) )
+
+!
+!--    Read arrays
+!--    ATTENTION: If the following read commands have been altered, the 
+!--    ---------- version number of the variable binary_version_local must 
+!--               be altered, too. Furthermore, the output list of arrays in 
+!--               wrd_write_local must also be altered 
+!--               accordingly.
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+       
+
+!
+!--    Loop over processor specific field data
+       DO  WHILE ( restart_string(1:length) /= '*** end ***' )
+
+!
+!--       Map data on file as often as needed (data are read only for k=1)
+          DO  k = 1, overlap_count(i)
+
+             found = .FALSE.
+             
+!
+!--          Get the index range of the subdomain on file which overlap with
+!--          the current subdomain
+             nxlf = nxlfa(i,k)
+             nxlc = nxlfa(i,k) + offset_xa(i,k)
+             nxrf = nxrfa(i,k)
+             nxrc = nxrfa(i,k) + offset_xa(i,k)
+             nysf = nysfa(i,k)
+             nysc = nysfa(i,k) + offset_ya(i,k)
+             nynf = nynfa(i,k)
+             nync = nynfa(i,k) + offset_ya(i,k)
+
+
+             SELECT CASE ( restart_string(1:length) )
+
+                CASE ( 'ghf_av' )
+                   IF ( .NOT. ALLOCATED( ghf_av ) )  THEN
+                      ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   ghf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'e' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   e(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'e_av' )
+                   IF ( .NOT. ALLOCATED( e_av ) )  THEN
+                      ALLOCATE( e_av(nzb:nzt+1,nys-nbgp:nyn+nbgp,              &
+                                     nxl-nbgp:nxr+nbgp) )    
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   e_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'iran' ) ! matching random numbers is still unresolved
+                                ! issue
+                   IF ( k == 1 )  READ ( 13 )  iran, iran_part
+
+                CASE ( 'kh' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   kh(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'kh_av' )
+                   IF ( .NOT. ALLOCATED( kh_av ) )  THEN
+                      ALLOCATE( kh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg ))
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   kh_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'km' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   km(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'km_av' )
+                   IF ( .NOT. ALLOCATED( km_av ) )  THEN
+                      ALLOCATE( km_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg ))
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   km_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'lpt_av' )
+                   IF ( .NOT. ALLOCATED( lpt_av ) )  THEN
+                      ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg ))
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   lpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'lwp_av' )
+                   IF ( .NOT. ALLOCATED( lwp_av ) )  THEN
+                      ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   lwp_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'p' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   p(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'p_av' )
+                   IF ( .NOT. ALLOCATED( p_av ) )  THEN
+                      ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   p_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'pc_av' )
+                   IF ( .NOT. ALLOCATED( pc_av ) )  THEN
+                      ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   pc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'pr_av' )
+                   IF ( .NOT. ALLOCATED( pr_av ) )  THEN
+                      ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   pr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'pt' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   pt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'pt_av' )
+                   IF ( .NOT. ALLOCATED( pt_av ) )  THEN
+                      ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   pt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'q' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   q(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'q_av' )
+                   IF ( .NOT. ALLOCATED( q_av ) )  THEN
+                      ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg ))
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   q_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'ql' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   ql(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =             &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'ql_av' )
+                   IF ( .NOT. ALLOCATED( ql_av ) )  THEN
+                      ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   ql_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'ql_c_av' )
+                   IF ( .NOT. ALLOCATED( ql_c_av ) )  THEN
+                      ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   ql_c_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =        &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'ql_v_av' )
+                   IF ( .NOT. ALLOCATED( ql_v_av ) )  THEN
+                      ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   ql_v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =        &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'ql_vp_av' )
+                   IF ( .NOT. ALLOCATED( ql_vp_av ) )  THEN
+                      ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   ql_vp_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =       &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'qsws_av' )
+                   IF ( .NOT. ALLOCATED( qsws_av ) )  THEN
+                      ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF  
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   qsws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =         &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'qv_av' )
+                   IF ( .NOT. ALLOCATED( qv_av ) )  THEN
+                      ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   qv_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =          &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'r_a_av' )
+                   IF ( .NOT. ALLOCATED( r_a_av ) )  THEN
+                      ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   r_a_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'random_iv' )  ! still unresolved issue
+                   IF ( k == 1 )  READ ( 13 )  random_iv
+                   IF ( k == 1 )  READ ( 13 )  random_iy
+
+                CASE ( 'seq_random_array' )
+                   ALLOCATE( tmp_2d_id_random(nys_on_file:nyn_on_file,         &
+                                              nxl_on_file:nxr_on_file) )
+                   ALLOCATE( tmp_2d_seq_random(5,nys_on_file:nyn_on_file,      &
+                                                 nxl_on_file:nxr_on_file) )
+                   IF ( .NOT. ALLOCATED( id_random_array ) )  THEN
+                      ALLOCATE( id_random_array(nys:nyn,nxl:nxr) )
+                   ENDIF
+                   IF ( .NOT. ALLOCATED( seq_random_array ) )  THEN
+                      ALLOCATE( seq_random_array(5,nys:nyn,nxl:nxr) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d_id_random
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d_seq_random
+                   id_random_array(nysc:nync,nxlc:nxrc) =                      &
+                      tmp_2d_id_random(nysf:nynf,nxlf:nxrf)
+                   seq_random_array(:,nysc:nync,nxlc:nxrc) =                   &
+                      tmp_2d_seq_random(:,nysf:nynf,nxlf:nxrf)
+                   DEALLOCATE( tmp_2d_id_random, tmp_2d_seq_random )
+
+                CASE ( 's' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   s(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 's_av' )
+                   IF ( .NOT. ALLOCATED( s_av ) )  THEN
+                      ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg))
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   s_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'shf_av' )
+                   IF ( .NOT. ALLOCATED( shf_av ) )  THEN
+                      ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =          &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                   
+                CASE ( 'ssws_av' )
+                   IF ( .NOT. ALLOCATED( ssws_av ) )  THEN
+                      ALLOCATE( ssws_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF  
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   ssws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =         &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+                 
+                CASE ( 'ts_av' )
+                   IF ( .NOT. ALLOCATED( ts_av ) )  THEN
+                      ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   ts_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =           &
+                        tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'tsurf_av' )
+                   IF ( .NOT. ALLOCATED( tsurf_av ) )  THEN
+                      ALLOCATE( tsurf_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   tsurf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'u' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   u(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'u_av' )
+                   IF ( .NOT. ALLOCATED( u_av ) )  THEN
+                      ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'u_m_l' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwul(nzb:nzt+1,                           &
+                                nys_on_file-nbgp:nyn_on_file+nbgp,1:2) )
+                      READ ( 13 )  tmp_3dwul
+                   ENDIF
+                   IF ( bc_radiation_l )  THEN
+                      u_m_l(:,nysc-nbgp:nync+nbgp,:) =                         & 
+                         tmp_3dwul(:,nysf-nbgp:nynf+nbgp,:)
+                   ENDIF
+
+                CASE ( 'u_m_n' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwun(nzb:nzt+1,ny-1:ny,                   &
+                                          nxl_on_file-nbgp:nxr_on_file+nbgp) )
+                      READ ( 13 )  tmp_3dwun
+                   ENDIF
+                   IF ( bc_radiation_n )  THEN
+                      u_m_n(:,:,nxlc-nbgp:nxrc+nbgp) =                         & 
+                         tmp_3dwun(:,:,nxlf-nbgp:nxrf+nbgp)
+                   ENDIF
+
+                CASE ( 'u_m_r' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwur(nzb:nzt+1,                           &
+                                nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) )
+                      READ ( 13 )  tmp_3dwur
+                   ENDIF
+                   IF ( bc_radiation_r )  THEN
+                      u_m_r(:,nysc-nbgp:nync+nbgp,:) =                         & 
+                         tmp_3dwur(:,nysf-nbgp:nynf+nbgp,:)
+                   ENDIF
+
+                CASE ( 'u_m_s' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwus(nzb:nzt+1,0:1,                       &
+                                          nxl_on_file-nbgp:nxr_on_file+nbgp) )
+                      READ ( 13 )  tmp_3dwus
+                   ENDIF
+                   IF ( bc_radiation_s )  THEN
+                      u_m_s(:,:,nxlc-nbgp:nxrc+nbgp) =                         &
+                         tmp_3dwus(:,:,nxlf-nbgp:nxrf+nbgp)
+                   ENDIF
+
+                CASE ( 'us_av' )
+                   IF ( .NOT. ALLOCATED( us_av ) )  THEN
+                      ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   us_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =           &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'v' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   v(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'v_av' )
+                   IF ( .NOT. ALLOCATED( v_av ) )  THEN
+                      ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'v_m_l' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwvl(nzb:nzt+1,                           &
+                                nys_on_file-nbgp:nyn_on_file+nbgp,0:1) )
+                      READ ( 13 )  tmp_3dwvl
+                   ENDIF
+                   IF ( bc_radiation_l )  THEN
+                      v_m_l(:,nysc-nbgp:nync+nbgp,:) =                         & 
+                         tmp_3dwvl(:,nysf-nbgp:nynf+nbgp,:)
+                   ENDIF
+
+                CASE ( 'v_m_n' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwvn(nzb:nzt+1,ny-1:ny,                   &
+                                          nxl_on_file-nbgp:nxr_on_file+nbgp) )
+                      READ ( 13 )  tmp_3dwvn
+                   ENDIF
+                   IF ( bc_radiation_n )  THEN
+                      v_m_n(:,:,nxlc-nbgp:nxrc+nbgp) =                         &
+                         tmp_3dwvn(:,:,nxlf-nbgp:nxrf+nbgp)
+                   ENDIF
+
+                CASE ( 'v_m_r' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwvr(nzb:nzt+1,                           &
+                                nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) )
+                      READ ( 13 )  tmp_3dwvr
+                   ENDIF
+                   IF ( bc_radiation_r )  THEN
+                      v_m_r(:,nysc-nbgp:nync+nbgp,:) =                         &
+                         tmp_3dwvr(:,nysf-nbgp:nynf+nbgp,:)
+                   ENDIF
+
+                CASE ( 'v_m_s' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwvs(nzb:nzt+1,1:2,                       &
+                                          nxl_on_file-nbgp:nxr_on_file+nbgp) )
+                      READ ( 13 )  tmp_3dwvs
+                   ENDIF
+                   IF ( bc_radiation_s )  THEN
+                      v_m_s(:,:,nxlc-nbgp:nxrc+nbgp) =                         &
+                         tmp_3dwvs(:,:,nxlf-nbgp:nxrf+nbgp)
+                   ENDIF
+
+                CASE ( 'vpt' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   vpt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =            &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'vpt_av' )
+                   IF ( .NOT. ALLOCATED( vpt_av ) )  THEN
+                      ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   vpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'w' )
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   w(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =              &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'w_av' )
+                   IF ( .NOT. ALLOCATED( w_av ) )  THEN
+                      ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_3d
+                   w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =           &
+                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'w_m_l' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwwl(nzb:nzt+1,&
+                                nys_on_file-nbgp:nyn_on_file+nbgp,0:1) )
+                      READ ( 13 )  tmp_3dwwl
+                   ENDIF
+                   IF ( bc_radiation_l )  THEN
+                      w_m_l(:,nysc-nbgp:nync+nbgp,:) =                         & 
+                         tmp_3dwwl(:,nysf-nbgp:nynf+nbgp,:)
+                   ENDIF
+
+                CASE ( 'w_m_n' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwwn(nzb:nzt+1,ny-1:ny, &
+                                          nxl_on_file-nbgp:nxr_on_file+nbgp) )
+                      READ ( 13 )  tmp_3dwwn
+                   ENDIF
+                   IF ( bc_radiation_n )  THEN
+                      w_m_n(:,:,nxlc-nbgp:nxrc+nbgp) =                         &
+                         tmp_3dwwn(:,:,nxlf-nbgp:nxrf+nbgp)
+                   ENDIF
+
+                CASE ( 'w_m_r' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwwr(nzb:nzt+1,&
+                                nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) )
+                      READ ( 13 )  tmp_3dwwr
+                   ENDIF
+                   IF ( bc_radiation_r )  THEN
+                      w_m_r(:,nysc-nbgp:nync+nbgp,:) =                         & 
+                         tmp_3dwwr(:,nysf-nbgp:nynf+nbgp,:)
+                   ENDIF
+
+                CASE ( 'w_m_s' )
+                   IF ( k == 1 )  THEN
+                      ALLOCATE( tmp_3dwws(nzb:nzt+1,0:1, &
+                                          nxl_on_file-nbgp:nxr_on_file+nbgp) )
+                      READ ( 13 )  tmp_3dwws
+                   ENDIF
+                   IF ( bc_radiation_s )  THEN
+                      w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) =                         & 
+                         tmp_3dwws(:,:,nxlf-nbgp:nxrf+nbgp)
+                   ENDIF
+
+                CASE ( 'z0_av' )
+                   IF ( .NOT. ALLOCATED( z0_av ) )  THEN
+                      ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   z0_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =           &
+                      tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'z0h_av' )
+                   IF ( .NOT. ALLOCATED( z0h_av ) )  THEN
+                      ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   z0h_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =          &
+                       tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE ( 'z0q_av' )
+                   IF ( .NOT. ALLOCATED( z0q_av ) )  THEN
+                      ALLOCATE( z0q_av(nysg:nyng,nxlg:nxrg) )
+                   ENDIF
+                   IF ( k == 1 )  READ ( 13 )  tmp_2d
+                   z0q_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)  =          &
+                       tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+
+                CASE DEFAULT
+
+!
+!--                Read restart data of other modules
+                   IF ( .NOT. found ) CALL bcm_rrd_local( i, k, nxlf,          &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_2d, tmp_3d, found )
+
+                   IF ( .NOT. found ) CALL chem_rrd_local( i, k, nxlf,         &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            & 
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_3d, found )
+
+                   IF ( .NOT. found ) CALL gust_rrd_local( i, k, nxlf,         &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_2d, tmp_3d, found )
+
+                   IF ( .NOT. found ) CALL lsm_rrd_local( i, k, nxlf,          & 
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_2d, found )
+
+                   IF ( .NOT. found ) CALL ocean_rrd_local( i, k, nxlf,        &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_2d, tmp_3d, found )
+
+                   IF ( .NOT. found ) CALL radiation_rrd_local( i, k, nxlf,    &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_2d, tmp_3d, found )
+
+                   IF ( .NOT. found ) CALL surface_rrd_local( i, k, nxlf,      &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            & 
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, found )
+
+                   IF ( .NOT. found ) CALL usm_rrd_local( i, k, nxlf,          &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, found )
+!
+!--                Read salsa restart data
+                   IF ( .NOT. found  .AND.  salsa )  THEN
+                      CALL salsa_rrd_local
+                   ENDIF                                               
+
+!
+!--                Read user-defined restart data
+                   IF ( .NOT. found ) CALL user_rrd_local( i, k, nxlf,         &
+                                           nxlc, nxl_on_file, nxrf, nxrc,      &
+                                           nxr_on_file, nynf, nync,            &
+                                           nyn_on_file, nysf, nysc,            &
+                                           nys_on_file, tmp_3d, found )
+
+
+                   IF ( .NOT. found )  THEN
+                      WRITE( message_string, * ) 'unknown variable named "',   &
+                                                 restart_string(1:length),     &
+                                                '" found in subdomain data ',  & 
+                                                'from prior run on PE ', myid
+                      CALL message( 'rrd_local', 'PA0302', 1, 2, 0, 6, 0 )
+ 
+                   ENDIF
+
+             END SELECT
+
+          ENDDO ! overlaploop 
+
+!
+!--       Deallocate arrays needed for specific variables only
+          IF ( ALLOCATED( tmp_3dwul ) )  DEALLOCATE( tmp_3dwul )
+          IF ( ALLOCATED( tmp_3dwun ) )  DEALLOCATE( tmp_3dwun )
+          IF ( ALLOCATED( tmp_3dwur ) )  DEALLOCATE( tmp_3dwur )
+          IF ( ALLOCATED( tmp_3dwus ) )  DEALLOCATE( tmp_3dwus )
+          IF ( ALLOCATED( tmp_3dwvl ) )  DEALLOCATE( tmp_3dwvl )
+          IF ( ALLOCATED( tmp_3dwvn ) )  DEALLOCATE( tmp_3dwvn )
+          IF ( ALLOCATED( tmp_3dwvr ) )  DEALLOCATE( tmp_3dwvr )
+          IF ( ALLOCATED( tmp_3dwvs ) )  DEALLOCATE( tmp_3dwvs )
+          IF ( ALLOCATED( tmp_3dwwl ) )  DEALLOCATE( tmp_3dwwl )
+          IF ( ALLOCATED( tmp_3dwwn ) )  DEALLOCATE( tmp_3dwwn )
+          IF ( ALLOCATED( tmp_3dwwr ) )  DEALLOCATE( tmp_3dwwr )
+          IF ( ALLOCATED( tmp_3dwws ) )  DEALLOCATE( tmp_3dwws )
+
+!
+!--       Read next character string
+          READ ( 13 )  length
+          READ ( 13 )  restart_string(1:length)
+
+       ENDDO ! dataloop
+
+!
+!--    Close the restart file
+       CALL close_file( 13 )
+
+       DEALLOCATE( tmp_2d, tmp_3d )
+
+    ENDDO  ! loop over restart files
+
+
+!
+!-- Restore the original filename for the restart file to be written
+    myid_char = myid_char_save
+
+!
+!-- End of time measuring for reading binary data
+    CALL cpu_log( log_point_s(14), 'rrd_local', 'stop' )
+
+ END SUBROUTINE rrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Skipping the global control variables from restart-file (binary format)
+!------------------------------------------------------------------------------!
+
+    SUBROUTINE rrd_skip_global
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=1) ::  cdum
+
+
+       READ ( 13 )  length
+       READ ( 13 )  restart_string(1:length)
+
+       DO  WHILE ( restart_string(1:length) /= 'binary_version_local' )
+
+          READ ( 13 )  cdum
+          READ ( 13 )  length 
+          READ ( 13 )  restart_string(1:length)
+
+       ENDDO
+
+       BACKSPACE ( 13 )
+       BACKSPACE ( 13 )
+
+
+    END SUBROUTINE rrd_skip_global
+
+
+ END MODULE read_restart_data_mod
Index: /palm/tags/release-6.0/SOURCE/run_control.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/run_control.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/run_control.f90	(revision 3477)
@@ -0,0 +1,176 @@
+!> @file run_control.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! routine local_flush replaced by FORTRAN statement
+!
+! 1697 2015-10-28 17:14:10Z raasch
+! small E- and F-FORMAT changes to avoid informative compiler messages about
+! insufficient field width
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! output format for theta* changed to avoid output of *****
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog scheme removed
+!
+! Revision 1.1  1997/08/11 06:25:38  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Computation and output of run-control quantities
+!------------------------------------------------------------------------------!
+ SUBROUTINE run_control
+ 
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE control_parameters,                                                    &
+        ONLY:  advected_distance_x, advected_distance_y,                       &
+               current_timestep_number, disturbance_created, dt_3d, mgcycles,  &
+               run_control_header, runnr, simulated_time, simulated_time_chr,  &
+               timestep_reason
+
+    USE indices,                                                               &
+        ONLY:  nzb
+
+    USE kinds
+
+    USE pegrid
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, hom, pr_palm, u_max, u_max_ijk, v_max,  &
+               v_max_ijk, w_max, w_max_ijk
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=1) ::  disturb_chr
+
+!
+!-- If required, do statistics
+    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
+
+!
+!-- Flow_statistics has its own cpu-time measurement
+    CALL cpu_log( log_point(11), 'run_control', 'start' )
+
+!
+!-- Output
+    IF ( myid == 0 )  THEN
+
+!
+!--    Check, whether file unit is already open (may have been opened in header
+!--    before)
+       CALL check_open( 15 )
+
+!
+!--    If required, write header
+       IF ( .NOT. run_control_header )  THEN
+          WRITE ( 15, 100 )
+          run_control_header = .TRUE.
+       ENDIF
+
+!
+!--    If required, set disturbance flag
+       IF ( disturbance_created )  THEN
+          disturb_chr = 'D'
+       ELSE
+          disturb_chr = ' '
+       ENDIF
+       WRITE ( 15, 101 )  runnr, current_timestep_number, simulated_time_chr,  &
+                          INT( ( simulated_time-INT( simulated_time ) ) * 100),&
+                          dt_3d, timestep_reason, u_max, disturb_chr,          &
+                          v_max, disturb_chr, w_max, hom(nzb,1,pr_palm,0),     &
+                          hom(nzb+8,1,pr_palm,0), hom(nzb+3,1,pr_palm,0),      &
+                          hom(nzb+6,1,pr_palm,0), hom(nzb+4,1,pr_palm,0),      &
+                          hom(nzb+5,1,pr_palm,0), hom(nzb+9,1,pr_palm,0),      &
+                          hom(nzb+10,1,pr_palm,0), u_max_ijk(1:3),             &
+                          v_max_ijk(1:3), w_max_ijk(1:3),                      &
+                          advected_distance_x/1000.0_wp,                       &
+                          advected_distance_y/1000.0_wp, mgcycles
+!
+!--    Write buffer contents to disc immediately
+       FLUSH( 15 )
+
+    ENDIF
+!
+!-- If required, reset disturbance flag. This has to be done outside the above 
+!-- IF-loop, because the flag would otherwise only be reset on PE0
+    IF ( disturbance_created )  disturbance_created = .FALSE.
+
+    CALL cpu_log( log_point(11), 'run_control', 'stop' )
+
+!
+!-- Formats
+100 FORMAT (///'Run-control output:'/ &
+              &'------------------'// &
+          &'RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U', &
+          &'*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD    ', &
+          &' DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVEC', &
+          &'Y   MGCYC'/                                                        &
+          &'----------------------------------------------------------------', &
+          &'----------------------------------------------------------------', &
+          &'----------------------------------------------------------------', &
+          &'---------')
+101 FORMAT (I3,1X,I6,1X,A8,'.',I2.2,1X,F8.4,A1,1X,F8.4,A1,F8.4,A1,F8.4,1X,     &
+            F6.3,1X,F5.2, &
+            2X,E10.3,2X,F6.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3)
+
+ END SUBROUTINE run_control
Index: /palm/tags/release-6.0/SOURCE/salsa_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/salsa_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/salsa_mod.f90	(revision 3477)
@@ -0,0 +1,11648 @@
+!> @file salsa_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the 
+! terms of the GNU General Public License as published by the Free Software 
+! Foundation, either version 3 of the License, or (at your option) any later 
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! NetCDF input routine renamed
+! 
+! 3467 2018-10-30 19:05:21Z suehring
+! Initial revision
+! 
+! 3412 2018-10-24 07:25:57Z monakurppa
+!
+! Authors:
+! --------
+! @author monakurppa
+!
+!
+! Description:
+! ------------
+!> Sectional aerosol module for large scale applications SALSA 
+!> (Kokkola et al., 2008, ACP 8, 2469-2483). Solves the aerosol number and mass
+!> concentration as well as chemical composition. Includes aerosol dynamic 
+!> processes: nucleation, condensation/evaporation of vapours, coagulation and
+!> deposition on tree leaves, ground and roofs. 
+!> Implementation is based on formulations implemented in UCLALES-SALSA except
+!> for deposition which is based on parametrisations by Zhang et al. (2001, 
+!> Atmos. Environ. 35, 549-560) or Petroff&Zhang (2010, Geosci. Model Dev. 3, 
+!> 753-769)
+!>
+!> @todo Implement turbulent inflow of aerosols in inflow_turbulence.
+!> @todo Deposition on walls and horizontal surfaces calculated from the aerosol 
+!>       dry radius, not wet
+!> @todo Deposition on subgrid scale vegetation 
+!> @todo Deposition on vegetation calculated by default for deciduous broadleaf 
+!>       trees
+!> @todo Revise masked data output. There is a potential bug in case of 
+!>       terrain-following masked output, according to data_output_mask. 
+!> @todo There are now improved interfaces for NetCDF data input which can be
+!>       used instead of get variable etc.
+!------------------------------------------------------------------------------!
+ MODULE salsa_mod
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, g, p_0, pi, r_d
+ 
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_species, nspec, nvar, spc_names
+
+    USE chem_modules,                                                          &
+        ONLY:  call_chem_at_all_substeps, chem_gasphase_on
+
+    USE control_parameters
+        
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb,  &
+               nzb_s_inner, nz, nzt, wall_flags_0
+     
+    USE kinds
+    
+    USE pegrid
+    
+    USE salsa_util_mod
+
+    IMPLICIT NONE
+!
+!-- SALSA constants:
+!
+!-- Local constants:
+    INTEGER(iwp), PARAMETER ::  ngast   = 5 !< total number of gaseous tracers:
+                                            !< 1 = H2SO4, 2 = HNO3, 3 = NH3, 
+                                            !< 4 = OCNV (non-volatile OC), 
+                                            !< 5 = OCSV (semi-volatile)  
+    INTEGER(iwp), PARAMETER ::  nmod    = 7 !< number of modes for initialising 
+                                            !< the aerosol size distribution                                              
+    INTEGER(iwp), PARAMETER ::  nreg    = 2 !< Number of main size subranges 
+    INTEGER(iwp), PARAMETER ::  maxspec = 7 !< Max. number of aerosol species
+!    
+!-- Universal constants
+    REAL(wp), PARAMETER ::  abo    = 1.380662E-23_wp  !< Boltzmann constant (J/K)
+    REAL(wp), PARAMETER ::  alv    = 2.260E+6_wp      !< latent heat for H2O 
+                                                      !< vaporisation (J/kg)
+    REAL(wp), PARAMETER ::  alv_d_rv  = 4896.96865_wp !< alv / rv
+    REAL(wp), PARAMETER ::  am_airmol = 4.8096E-26_wp !< Average mass of one air
+                                                      !< molecule (Jacobson, 
+                                                      !< 2005, Eq. 2.3)                                                   
+    REAL(wp), PARAMETER ::  api6   = 0.5235988_wp     !< pi / 6   
+    REAL(wp), PARAMETER ::  argas  = 8.314409_wp      !< Gas constant (J/(mol K))
+    REAL(wp), PARAMETER ::  argas_d_cpd = 8.281283865E-3_wp !< argas per cpd
+    REAL(wp), PARAMETER ::  avo    = 6.02214E+23_wp   !< Avogadro constant (1/mol)
+    REAL(wp), PARAMETER ::  d_sa   = 5.539376964394570E-10_wp !< diameter of 
+                                                      !< condensing sulphuric 
+                                                      !< acid molecule (m)  
+    REAL(wp), PARAMETER ::  for_ppm_to_nconc =  7.243016311E+16_wp !< 
+                                                 !< ppm * avo / R (K/(Pa*m3))
+    REAL(wp), PARAMETER ::  epsoc  = 0.15_wp          !< water uptake of organic
+                                                      !< material     
+    REAL(wp), PARAMETER ::  mclim  = 1.0E-23_wp    !< mass concentration min 
+                                                   !< limit for aerosols (kg/m3)                                                   
+    REAL(wp), PARAMETER ::  n3     = 158.79_wp !< Number of H2SO4 molecules in
+                                               !< 3 nm cluster if d_sa=5.54e-10m
+    REAL(wp), PARAMETER ::  nclim  = 1.0_wp    !< number concentration min limit 
+                                               !< for aerosols and gases (#/m3)
+    REAL(wp), PARAMETER ::  surfw0 = 0.073_wp  !< surface tension of pure water 
+                                               !< at ~ 293 K (J/m2)   
+    REAL(wp), PARAMETER ::  vclim  = 1.0E-24_wp    !< volume concentration min 
+                                                   !< limit for aerosols (m3/m3)                                           
+!-- Molar masses in kg/mol
+    REAL(wp), PARAMETER ::  ambc   = 12.0E-3_wp     !< black carbon (BC)
+    REAL(wp), PARAMETER ::  amdair = 28.970E-3_wp   !< dry air
+    REAL(wp), PARAMETER ::  amdu   = 100.E-3_wp     !< mineral dust 
+    REAL(wp), PARAMETER ::  amh2o  = 18.0154E-3_wp  !< H2O
+    REAL(wp), PARAMETER ::  amh2so4  = 98.06E-3_wp  !< H2SO4
+    REAL(wp), PARAMETER ::  amhno3 = 63.01E-3_wp    !< HNO3
+    REAL(wp), PARAMETER ::  amn2o  = 44.013E-3_wp   !< N2O
+    REAL(wp), PARAMETER ::  amnh3  = 17.031E-3_wp   !< NH3
+    REAL(wp), PARAMETER ::  amo2   = 31.9988E-3_wp  !< O2
+    REAL(wp), PARAMETER ::  amo3   = 47.998E-3_wp   !< O3
+    REAL(wp), PARAMETER ::  amoc   = 150.E-3_wp     !< organic carbon (OC)
+    REAL(wp), PARAMETER ::  amss   = 58.44E-3_wp    !< sea salt (NaCl)
+!-- Densities in kg/m3
+    REAL(wp), PARAMETER ::  arhobc     = 2000.0_wp !< black carbon
+    REAL(wp), PARAMETER ::  arhodu     = 2650.0_wp !< mineral dust
+    REAL(wp), PARAMETER ::  arhoh2o    = 1000.0_wp !< H2O
+    REAL(wp), PARAMETER ::  arhoh2so4  = 1830.0_wp !< SO4 
+    REAL(wp), PARAMETER ::  arhohno3   = 1479.0_wp !< HNO3
+    REAL(wp), PARAMETER ::  arhonh3    = 1530.0_wp !< NH3 
+    REAL(wp), PARAMETER ::  arhooc     = 2000.0_wp !< organic carbon
+    REAL(wp), PARAMETER ::  arhoss     = 2165.0_wp !< sea salt (NaCl)
+!-- Volume of molecule in m3/#
+    REAL(wp), PARAMETER ::  amvh2o   = amh2o /avo / arhoh2o      !< H2O
+    REAL(wp), PARAMETER ::  amvh2so4 = amh2so4 / avo / arhoh2so4 !< SO4
+    REAL(wp), PARAMETER ::  amvhno3  = amhno3 / avo / arhohno3   !< HNO3 
+    REAL(wp), PARAMETER ::  amvnh3   = amnh3 / avo / arhonh3     !< NH3  
+    REAL(wp), PARAMETER ::  amvoc    = amoc / avo / arhooc       !< OC
+    REAL(wp), PARAMETER ::  amvss    = amss / avo / arhoss       !< sea salt
+    
+!
+!-- SALSA switches:
+    INTEGER(iwp) ::  nj3 = 1 !< J3 parametrization (nucleation)
+                             !< 1 = condensational sink (Kerminen&Kulmala, 2002)
+                             !< 2 = coagulational sink (Lehtinen et al. 2007)
+                             !< 3 = coagS+self-coagulation (Anttila et al. 2010)                                       
+    INTEGER(iwp) ::  nsnucl = 0 !< Choice of the nucleation scheme:
+                                !< 0 = off   
+                                !< 1 = binary nucleation
+                                !< 2 = activation type nucleation
+                                !< 3 = kinetic nucleation
+                                !< 4 = ternary nucleation
+                                !< 5 = nucleation with ORGANICs
+                                !< 6 = activation type of nucleation with 
+                                !<     H2SO4+ORG
+                                !< 7 = heteromolecular nucleation with H2SO4*ORG
+                                !< 8 = homomolecular nucleation of  H2SO4 + 
+                                !<     heteromolecular nucleation with H2SO4*ORG
+                                !< 9 = homomolecular nucleation of  H2SO4 and ORG 
+                                !<     +heteromolecular nucleation with H2SO4*ORG 
+    LOGICAL ::  advect_particle_water = .TRUE.  !< advect water concentration of 
+                                                !< particles                                
+    LOGICAL ::  decycle_lr            = .FALSE. !< Undo cyclic boundary
+                                                !< conditions: left and right
+    LOGICAL ::  decycle_ns            = .FALSE. !< north and south boundaries
+    LOGICAL ::  feedback_to_palm      = .FALSE. !< allow feedback due to 
+                                                !< hydration and/or condensation
+                                                !< of H20
+    LOGICAL ::  no_insoluble          = .FALSE. !< Switch to exclude insoluble  
+                                                !< chemical components 
+    LOGICAL ::  read_restart_data_salsa = .FALSE. !< read restart data for salsa
+    LOGICAL ::  salsa                 = .FALSE.   !< SALSA master switch
+    LOGICAL ::  salsa_gases_from_chem = .FALSE.   !< Transfer the gaseous 
+                                                  !< components to SALSA from  
+                                                  !< from chemistry model
+    LOGICAL ::  van_der_waals_coagc   = .FALSE.   !< Enhancement of coagulation 
+                                                  !< kernel by van der Waals and
+                                                  !< viscous forces
+    LOGICAL ::  write_binary_salsa    = .FALSE.   !< read binary for salsa
+!-- Process switches: nl* is read from the NAMELIST and is NOT changed.
+!--                   ls* is the switch used and will get the value of nl* 
+!--                       except for special circumstances (spinup period etc.)
+    LOGICAL ::  nlcoag       = .FALSE. !< Coagulation master switch
+    LOGICAL ::  lscoag       = .FALSE. !<
+    LOGICAL ::  nlcnd        = .FALSE. !< Condensation master switch
+    LOGICAL ::  lscnd        = .FALSE. !<
+    LOGICAL ::  nlcndgas     = .FALSE. !< Condensation of precursor gases
+    LOGICAL ::  lscndgas     = .FALSE. !<
+    LOGICAL ::  nlcndh2oae   = .FALSE. !< Condensation of H2O on aerosol
+    LOGICAL ::  lscndh2oae   = .FALSE. !< particles (FALSE -> equilibrium calc.)
+    LOGICAL ::  nldepo       = .FALSE. !< Deposition master switch
+    LOGICAL ::  lsdepo       = .FALSE. !< 
+    LOGICAL ::  nldepo_topo  = .FALSE. !< Deposition on vegetation master switch
+    LOGICAL ::  lsdepo_topo  = .FALSE. !< 
+    LOGICAL ::  nldepo_vege  = .FALSE. !< Deposition on walls master switch
+    LOGICAL ::  lsdepo_vege  = .FALSE. !< 
+    LOGICAL ::  nldistupdate = .TRUE.  !< Size distribution update master switch                                      
+    LOGICAL ::  lsdistupdate = .FALSE. !<                                     
+!
+!-- SALSA variables:
+    CHARACTER (LEN=20) ::  bc_salsa_b = 'neumann'   !< bottom boundary condition                                      
+    CHARACTER (LEN=20) ::  bc_salsa_t = 'neumann'   !< top boundary condition 
+    CHARACTER (LEN=20) ::  depo_vege_type = 'zhang2001' !< or 'petroff2010' 
+    CHARACTER (LEN=20) ::  depo_topo_type = 'zhang2001' !< or 'petroff2010' 
+    CHARACTER (LEN=20), DIMENSION(4) ::  decycle_method = & 
+                             (/'dirichlet','dirichlet','dirichlet','dirichlet'/)
+                                 !< Decycling method at horizontal boundaries, 
+                                 !< 1=left, 2=right, 3=south, 4=north
+                                 !< dirichlet = initial size distribution and 
+                                 !< chemical composition set for the ghost and 
+                                 !< first three layers
+                                 !< neumann = zero gradient
+    CHARACTER (LEN=3), DIMENSION(maxspec) ::  listspec = &  !< Active aerosols
+                                   (/'SO4','   ','   ','   ','   ','   ','   '/)
+    CHARACTER (LEN=20) ::  salsa_source_mode = 'no_source' 
+                                                    !< 'read_from_file',
+                                                    !< 'constant' or 'no_source'                                   
+    INTEGER(iwp) ::  dots_salsa = 0  !< starting index for salsa-timeseries
+    INTEGER(iwp) ::  fn1a = 1    !< last index for bin subranges:  subrange 1a
+    INTEGER(iwp) ::  fn2a = 1    !<                              subrange 2a
+    INTEGER(iwp) ::  fn2b = 1    !<                              subrange 2b
+    INTEGER(iwp), DIMENSION(ngast) ::  gas_index_chem = (/ 1, 1, 1, 1, 1/) !<
+                                 !< Index of gaseous compounds in the chemistry 
+                                 !< model. In SALSA, 1 = H2SO4, 2 = HNO3, 
+                                 !< 3 = NH3, 4 = OCNV, 5 = OCSV
+    INTEGER(iwp) ::  ibc_salsa_b !<
+    INTEGER(iwp) ::  ibc_salsa_t !<
+    INTEGER(iwp) ::  igctyp = 0  !< Initial gas concentration type
+                                 !< 0 = uniform (use H2SO4_init, HNO3_init, 
+                                 !<     NH3_init, OCNV_init and OCSV_init)
+                                 !< 1 = read vertical profile from an input file  
+    INTEGER(iwp) ::  in1a = 1    !< start index for bin subranges: subrange 1a
+    INTEGER(iwp) ::  in2a = 1    !<                              subrange 2a
+    INTEGER(iwp) ::  in2b = 1    !<                              subrange 2b 
+    INTEGER(iwp) ::  isdtyp = 0  !< Initial size distribution type
+                                 !< 0 = uniform
+                                 !< 1 = read vertical profile of the mode number
+                                 !<     concentration from an input file  
+    INTEGER(iwp) ::  ibc  = -1 !< Indice for: black carbon (BC)
+    INTEGER(iwp) ::  idu  = -1 !< dust
+    INTEGER(iwp) ::  inh  = -1 !< NH3 
+    INTEGER(iwp) ::  ino  = -1 !< HNO3   
+    INTEGER(iwp) ::  ioc  = -1 !< organic carbon (OC)
+    INTEGER(iwp) ::  iso4 = -1 !< SO4 or H2SO4   
+    INTEGER(iwp) ::  iss  = -1 !< sea salt
+    INTEGER(iwp) ::  lod_aero = 0   !< level of detail for aerosol emissions
+    INTEGER(iwp) ::  lod_gases = 0  !< level of detail for gaseous emissions    
+    INTEGER(iwp), DIMENSION(nreg) ::  nbin = (/ 3, 7/)    !< Number of size bins
+                                               !< for each aerosol size subrange
+    INTEGER(iwp) ::  nbins = 1  !< total number of size bins
+    INTEGER(iwp) ::  ncc   = 1  !< number of chemical components used      
+    INTEGER(iwp) ::  ncc_tot = 1!< total number of chemical compounds (ncc+1 
+                                !< if particle water is advected)
+    REAL(wp) ::  act_coeff = 1.0E-7_wp     !< Activation coefficient
+    REAL(wp) ::  aerosol_source = 0.0_wp   !< Constant aerosol flux (#/(m3*s))
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::  emission_mass_fracs  !< array for 
+                                    !< aerosol composition per emission category
+                                    !< 1:SO4 2:OC 3:BC 4:DU 5:SS 6:NO 7:NH  
+    REAL(wp) ::  dt_salsa  = 0.00001_wp    !< Time step of SALSA
+    REAL(wp) ::  H2SO4_init = nclim        !< Init value for sulphuric acid gas
+    REAL(wp) ::  HNO3_init  = nclim        !< Init value for nitric acid gas
+    REAL(wp) ::  last_salsa_time = 0.0_wp  !< time of the previous salsa 
+                                           !< timestep
+    REAL(wp) ::  nf2a = 1.0_wp             !< Number fraction allocated to a-
+                                           !< bins in subrange 2
+                                           !< (b-bins will get 1-nf2a)   
+    REAL(wp) ::  NH3_init  = nclim         !< Init value for ammonia gas
+    REAL(wp) ::  OCNV_init = nclim         !< Init value for non-volatile 
+                                           !< organic gases
+    REAL(wp) ::  OCSV_init = nclim         !< Init value for semi-volatile 
+                                           !< organic gases
+    REAL(wp), DIMENSION(nreg+1) ::  reglim = & !< Min&max diameters of size subranges
+                                 (/ 3.0E-9_wp, 5.0E-8_wp, 1.0E-5_wp/)
+    REAL(wp) ::  rhlim = 1.20_wp    !< RH limit in %/100. Prevents 
+                                    !< unrealistically high RH in condensation                            
+    REAL(wp) ::  skip_time_do_salsa = 0.0_wp !< Starting time of SALSA (s) 
+!-- Initial log-normal size distribution: mode diameter (dpg, micrometres), 
+!-- standard deviation (sigmag) and concentration (n_lognorm, #/cm3)
+    REAL(wp), DIMENSION(nmod) ::  dpg   = (/0.013_wp, 0.054_wp, 0.86_wp,       &
+                                            0.2_wp, 0.2_wp, 0.2_wp, 0.2_wp/) 
+    REAL(wp), DIMENSION(nmod) ::  sigmag  = (/1.8_wp, 2.16_wp, 2.21_wp,        &
+                                              2.0_wp, 2.0_wp, 2.0_wp, 2.0_wp/)  
+    REAL(wp), DIMENSION(nmod) ::  n_lognorm = (/1.04e+5_wp, 3.23E+4_wp, 5.4_wp,&
+                                                0.0_wp, 0.0_wp, 0.0_wp, 0.0_wp/)
+!-- Initial mass fractions / chemical composition of the size distribution    
+    REAL(wp), DIMENSION(maxspec) ::  mass_fracs_a = & !< mass fractions between 
+             (/1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0/) !< aerosol species for A bins
+    REAL(wp), DIMENSION(maxspec) ::  mass_fracs_b = & !< mass fractions between 
+             (/0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0/) !< aerosol species for B bins
+             
+    REAL(wp), ALLOCATABLE, DIMENSION(:) ::  bin_low_limits  !< to deliver 
+                                                            !< information about 
+                                                            !< the lower 
+                                                            !< diameters per bin                                        
+    REAL(wp), ALLOCATABLE, DIMENSION(:) ::  nsect     !< Background number 
+                                                      !< concentration per bin
+    REAL(wp), ALLOCATABLE, DIMENSION(:) ::  massacc   !< Mass accomodation 
+                                                      !< coefficients per bin                                              
+!
+!-- SALSA derived datatypes: 
+!
+!-- Prognostic variable: Aerosol size bin information (number (#/m3) and 
+!-- mass (kg/m3) concentration) and the concentration of gaseous tracers (#/m3).
+!-- Gas tracers are contained sequentially in dimension 4 as: 
+!-- 1. H2SO4, 2. HNO3, 3. NH3, 4. OCNV (non-volatile organics), 
+!-- 5. OCSV (semi-volatile)
+    TYPE salsa_variable
+       REAL(wp), POINTER, DIMENSION(:,:,:), CONTIGUOUS     ::  conc
+       REAL(wp), POINTER, DIMENSION(:,:,:), CONTIGUOUS     ::  conc_p
+       REAL(wp), POINTER, DIMENSION(:,:,:), CONTIGUOUS     ::  tconc_m
+       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::  flux_s, diss_s
+       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  flux_l, diss_l
+       REAL(wp), ALLOCATABLE, DIMENSION(:)     ::  init
+       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  source
+       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::  sums_ws_l
+    END TYPE salsa_variable
+    
+!-- Map bin indices between parallel size distributions    
+    TYPE t_parallelbin
+       INTEGER(iwp) ::  cur  ! Index for current distribution
+       INTEGER(iwp) ::  par  ! Index for corresponding parallel distribution
+    END TYPE t_parallelbin
+    
+!-- Datatype used to store information about the binned size distributions of 
+!-- aerosols
+    TYPE t_section
+       REAL(wp) ::  vhilim   !< bin volume at the high limit
+       REAL(wp) ::  vlolim   !< bin volume at the low limit
+       REAL(wp) ::  vratiohi !< volume ratio between the center and high limit
+       REAL(wp) ::  vratiolo !< volume ratio between the center and low limit
+       REAL(wp) ::  dmid     !< bin middle diameter (m)
+       !******************************************************
+       ! ^ Do NOT change the stuff above after initialization !
+       !******************************************************
+       REAL(wp) ::  dwet    !< Wet diameter or mean droplet diameter (m)
+       REAL(wp), DIMENSION(maxspec+1) ::  volc !< Volume concentrations 
+                            !< (m^3/m^3) of aerosols + water. Since most of 
+                            !< the stuff in SALSA is hard coded, these *have to
+                            !< be* in the order
+                            !< 1:SO4, 2:OC, 3:BC, 4:DU, 5:SS, 6:NO, 7:NH, 8:H2O
+       REAL(wp) ::  veqh2o  !< Equilibrium H2O concentration for each particle
+       REAL(wp) ::  numc    !< Number concentration of particles/droplets (#/m3)
+       REAL(wp) ::  core    !< Volume of dry particle
+    END TYPE t_section  
+!
+!-- Local aerosol properties in SALSA 
+    TYPE(t_section), ALLOCATABLE ::  aero(:)
+!
+!-- SALSA tracers:
+!-- Tracers as x = x(k,j,i,bin). The 4th dimension contains all the size bins 
+!-- sequentially for each aerosol species  + water.
+!
+!-- Prognostic tracers:
+!
+!-- Number concentration (#/m3) 
+    TYPE(salsa_variable), ALLOCATABLE, DIMENSION(:), TARGET ::  aerosol_number
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nconc_1
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nconc_2
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  nconc_3
+!
+!-- Mass concentration (kg/m3) 
+    TYPE(salsa_variable), ALLOCATABLE, DIMENSION(:), TARGET ::  aerosol_mass
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mconc_1
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mconc_2
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  mconc_3
+!
+!-- Gaseous tracers (#/m3) 
+    TYPE(salsa_variable), ALLOCATABLE, DIMENSION(:), TARGET ::  salsa_gas
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  gconc_1
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  gconc_2
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET ::  gconc_3
+!
+!-- Diagnostic tracers
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  sedim_vd !< sedimentation
+                                                           !< velocity per size 
+                                                           !< bin (m/s)
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  Ra_dry !< dry radius (m)
+    
+!-- Particle component index tables
+    TYPE(component_index) :: prtcl !< Contains "getIndex" which gives the index 
+                                   !< for a given aerosol component name, i.e. 
+                                   !< 1:SO4, 2:OC, 3:BC, 4:DU,
+                                   !< 5:SS, 6:NO, 7:NH, 8:H2O  
+!                                   
+!-- Data output arrays:
+!-- Gases:
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_H2SO4_av  !< H2SO4
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_HNO3_av   !< HNO3
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_NH3_av    !< NH3
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_OCNV_av   !< non-vola-
+                                                                    !< tile OC
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  g_OCSV_av   !< semi-vol.
+                                                                    !< OC
+!-- Integrated:                                                                    
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  LDSA_av  !< lung deposited 
+                                                         !< surface area                                                    
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  Ntot_av  !< total number conc.
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  PM25_av  !< PM2.5
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  PM10_av  !< PM10
+!-- In the particle phase:    
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_BC_av  !< black carbon 
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_DU_av  !< dust 
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_H2O_av !< liquid water
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_NH_av  !< ammonia 
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_NO_av  !< nitrates 
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_OC_av  !< org. carbon 
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_SO4_av !< sulphates
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET ::  s_SS_av  !< sea salt
+!-- Bins:    
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  mbins_av  !< bin mass 
+                                                            !< concentration 
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::  Nbins_av  !< bin number 
+                                                            !< concentration  
+        
+!
+!-- PALM interfaces:
+!
+!-- Boundary conditions:
+    INTERFACE salsa_boundary_conds
+       MODULE PROCEDURE salsa_boundary_conds
+       MODULE PROCEDURE salsa_boundary_conds_decycle
+    END INTERFACE salsa_boundary_conds
+!    
+!-- Data output checks for 2D/3D data to be done in check_parameters
+    INTERFACE salsa_check_data_output
+       MODULE PROCEDURE salsa_check_data_output
+    END INTERFACE salsa_check_data_output
+    
+!
+!-- Input parameter checks to be done in check_parameters
+    INTERFACE salsa_check_parameters
+       MODULE PROCEDURE salsa_check_parameters
+    END INTERFACE salsa_check_parameters
+
+!
+!-- Averaging of 3D data for output
+    INTERFACE salsa_3d_data_averaging
+       MODULE PROCEDURE salsa_3d_data_averaging
+    END INTERFACE salsa_3d_data_averaging
+
+!
+!-- Data output of 2D quantities
+    INTERFACE salsa_data_output_2d
+       MODULE PROCEDURE salsa_data_output_2d
+    END INTERFACE salsa_data_output_2d
+
+!
+!-- Data output of 3D data
+    INTERFACE salsa_data_output_3d
+       MODULE PROCEDURE salsa_data_output_3d
+    END INTERFACE salsa_data_output_3d
+    
+!
+!-- Data output of 3D data
+    INTERFACE salsa_data_output_mask
+       MODULE PROCEDURE salsa_data_output_mask
+    END INTERFACE salsa_data_output_mask
+
+!
+!-- Definition of data output quantities
+    INTERFACE salsa_define_netcdf_grid
+       MODULE PROCEDURE salsa_define_netcdf_grid
+    END INTERFACE salsa_define_netcdf_grid
+    
+!
+!-- Output of information to the header file
+    INTERFACE salsa_header
+       MODULE PROCEDURE salsa_header
+    END INTERFACE salsa_header
+  
+!
+!-- Initialization actions  
+    INTERFACE salsa_init
+       MODULE PROCEDURE salsa_init
+    END INTERFACE salsa_init
+ 
+!
+!-- Initialization of arrays
+    INTERFACE salsa_init_arrays
+       MODULE PROCEDURE salsa_init_arrays
+    END INTERFACE salsa_init_arrays
+
+!
+!-- Writing of binary output for restart runs  !!! renaming?!
+    INTERFACE salsa_wrd_local
+       MODULE PROCEDURE salsa_wrd_local
+    END INTERFACE salsa_wrd_local
+    
+!
+!-- Reading of NAMELIST parameters
+    INTERFACE salsa_parin
+       MODULE PROCEDURE salsa_parin
+    END INTERFACE salsa_parin
+
+!
+!-- Reading of parameters for restart runs
+    INTERFACE salsa_rrd_local
+       MODULE PROCEDURE salsa_rrd_local
+    END INTERFACE salsa_rrd_local
+    
+!
+!-- Swapping of time levels (required for prognostic variables)
+    INTERFACE salsa_swap_timelevel
+       MODULE PROCEDURE salsa_swap_timelevel
+    END INTERFACE salsa_swap_timelevel
+
+    INTERFACE salsa_driver
+       MODULE PROCEDURE salsa_driver
+    END INTERFACE salsa_driver
+
+    INTERFACE salsa_tendency
+       MODULE PROCEDURE salsa_tendency
+       MODULE PROCEDURE salsa_tendency_ij
+    END INTERFACE salsa_tendency
+    
+    
+    
+    SAVE
+
+    PRIVATE
+!
+!-- Public functions: 
+    PUBLIC salsa_boundary_conds, salsa_check_data_output,                      &
+           salsa_check_parameters, salsa_3d_data_averaging,                    &
+           salsa_data_output_2d, salsa_data_output_3d, salsa_data_output_mask, &
+           salsa_define_netcdf_grid, salsa_diagnostics, salsa_driver,          &
+           salsa_header, salsa_init, salsa_init_arrays, salsa_parin,           &
+           salsa_rrd_local, salsa_swap_timelevel, salsa_tendency,              &
+           salsa_wrd_local
+!
+!-- Public parameters, constants and initial values
+    PUBLIC dots_salsa, dt_salsa, last_salsa_time, lsdepo, salsa,               &
+           salsa_gases_from_chem, skip_time_do_salsa
+!
+!-- Public prognostic variables
+    PUBLIC aerosol_mass, aerosol_number, fn2a, fn2b, gconc_2, in1a, in2b,      &
+           mconc_2, nbins, ncc, ncc_tot, nclim, nconc_2, ngast, prtcl, Ra_dry, &
+           salsa_gas, sedim_vd
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &salsa_par for new modules
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_parin
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line   !< dummy string that contains the current line
+                                  !< of the parameter file 
+                                  
+    NAMELIST /salsa_parameters/             &
+                          advect_particle_water, & ! Switch for advecting 
+                                                ! particle water. If .FALSE., 
+                                                ! equilibration is called at 
+                                                ! each time step.       
+                          bc_salsa_b,       &   ! bottom boundary condition
+                          bc_salsa_t,       &   ! top boundary condition
+                          decycle_lr,       &   ! decycle SALSA components
+                          decycle_method,   &   ! decycle method applied: 
+                                                ! 1=left 2=right 3=south 4=north
+                          decycle_ns,       &   ! decycle SALSA components
+                          depo_vege_type,   &   ! Parametrisation type
+                          depo_topo_type,   &   ! Parametrisation type
+                          dpg,              &   ! Mean diameter for the initial 
+                                                ! log-normal modes
+                          dt_salsa,         &   ! SALSA timestep in seconds
+                          feedback_to_palm, &   ! allow feedback due to
+                                                ! hydration / condensation
+                          H2SO4_init,       &   ! Init value for sulphuric acid
+                          HNO3_init,        &   ! Init value for nitric acid
+                          igctyp,           &   ! Initial gas concentration type 
+                          isdtyp,           &   ! Initial size distribution type                                                
+                          listspec,         &   ! List of actived aerosols 
+                                                ! (string list)
+                          mass_fracs_a,     &   ! Initial relative contribution  
+                                                ! of each species to particle  
+                                                ! volume in a-bins, 0 for unused 
+                          mass_fracs_b,     &   ! Initial relative contribution  
+                                                ! of each species to particle 
+                                                ! volume in b-bins, 0 for unused
+                          n_lognorm,        &   ! Number concentration for the 
+                                                ! log-normal modes                                                
+                          nbin,             &   ! Number of size bins for 
+                                                ! aerosol size subranges 1 & 2
+                          nf2a,             &   ! Number fraction of particles 
+                                                ! allocated to a-bins in 
+                                                ! subrange 2 b-bins will get 
+                                                ! 1-nf2a                          
+                          NH3_init,         &   ! Init value for ammonia 
+                          nj3,              &   ! J3 parametrization
+                                                ! 1 = condensational sink 
+                                                !     (Kerminen&Kulmala, 2002)
+                                                ! 2 = coagulational sink 
+                                                !     (Lehtinen et al. 2007)
+                                                ! 3 = coagS+self-coagulation 
+                                                !     (Anttila et al. 2010)                                                   
+                          nlcnd,            &   ! Condensation master switch
+                          nlcndgas,         &   ! Condensation of gases
+                          nlcndh2oae,       &   ! Condensation of H2O                           
+                          nlcoag,           &   ! Coagulation master switch
+                          nldepo,           &   ! Deposition master switch
+                          nldepo_vege,      &   ! Deposition on vegetation 
+                                                ! master switch
+                          nldepo_topo,      &   ! Deposition on topo master
+                                                ! switch                          
+                          nldistupdate,     &   ! Size distribution update
+                                                ! master switch
+                          nsnucl,           &   ! Nucleation scheme: 
+                                                ! 0 = off,
+                                                ! 1 = binary nucleation
+                                                ! 2 = activation type nucleation
+                                                ! 3 = kinetic nucleation
+                                                ! 4 = ternary nucleation
+                                                ! 5 = nucleation with organics
+                                                ! 6 = activation type of 
+                                                !     nucleation with H2SO4+ORG
+                                                ! 7 = heteromolecular nucleation 
+                                                !     with H2SO4*ORG
+                                                ! 8 = homomolecular nucleation  
+                                                !     of H2SO4 + heteromolecular 
+                                                !     nucleation with H2SO4*ORG
+                                                ! 9 = homomolecular nucleation 
+                                                !     of H2SO4 and ORG + hetero-
+                                                !     molecular nucleation with 
+                                                !     H2SO4*ORG
+                          OCNV_init,        &   ! Init value for non-volatile 
+                                                ! organic gases
+                          OCSV_init,        &   ! Init value for semi-volatile 
+                                                ! organic gases
+                          read_restart_data_salsa, & ! read restart data for 
+                                                     ! salsa
+                          reglim,           &   ! Min&max diameter limits of 
+                                                ! size subranges
+                          salsa,            &   ! Master switch for SALSA
+                          salsa_source_mode,&   ! 'read_from_file' or 'constant' 
+                                                ! or 'no_source'
+                          sigmag,           &   ! stdev for the initial log-
+                                                ! normal modes                                                
+                          skip_time_do_salsa, & ! Starting time of SALSA (s)
+                          van_der_waals_coagc,& ! include van der Waals forces
+                          write_binary_salsa    ! Write binary for salsa
+                           
+       
+    line = ' '
+       
+!
+!-- Try to find salsa package
+    REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&salsa_parameters' ) == 0 )
+       READ ( 11, '(A)', END=10 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, salsa_parameters )
+
+!
+!-- Set flag that indicates that the new module is switched on
+!-- Note that this parameter needs to be declared in modules.f90
+    salsa = .TRUE.
+
+ 10 CONTINUE
+       
+ END SUBROUTINE salsa_parin
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for salsa.
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_check_parameters
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+       
+    IMPLICIT NONE
+    
+!
+!-- Checks go here (cf. check_parameters.f90).
+    IF ( salsa  .AND.  .NOT.  humidity )  THEN
+       WRITE( message_string, * ) 'salsa = ', salsa, ' is ',                   &
+              'not allowed with humidity = ', humidity
+       CALL message( 'check_parameters', 'SA0009', 1, 2, 0, 6, 0 )
+    ENDIF
+    
+    IF ( bc_salsa_b == 'dirichlet' )  THEN
+       ibc_salsa_b = 0
+    ELSEIF ( bc_salsa_b == 'neumann' )  THEN
+       ibc_salsa_b = 1
+    ELSE
+       message_string = 'unknown boundary condition: bc_salsa_b = "'           &
+                         // TRIM( bc_salsa_t ) // '"'
+       CALL message( 'check_parameters', 'SA0011', 1, 2, 0, 6, 0 )                  
+    ENDIF
+    
+    IF ( bc_salsa_t == 'dirichlet' )  THEN
+       ibc_salsa_t = 0
+    ELSEIF ( bc_salsa_t == 'neumann' )  THEN
+       ibc_salsa_t = 1
+    ELSE
+       message_string = 'unknown boundary condition: bc_salsa_t = "'           &
+                         // TRIM( bc_salsa_t ) // '"'
+       CALL message( 'check_parameters', 'SA0012', 1, 2, 0, 6, 0 )                  
+    ENDIF
+    
+    IF ( nj3 < 1  .OR.  nj3 > 3 )  THEN
+       message_string = 'unknown nj3 (must be 1-3)'
+       CALL message( 'check_parameters', 'SA0044', 1, 2, 0, 6, 0 )
+    ENDIF
+           
+ END SUBROUTINE salsa_check_parameters
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf. 
+!> Same grid as for other scalars (see netcdf_interface_mod.f90)
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_x   !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_y   !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_z   !< 
+    CHARACTER (LEN=*), INTENT(IN)  ::  var      !<
+    
+    LOGICAL, INTENT(OUT) ::  found   !<
+    
+    found  = .TRUE.
+!
+!-- Check for the grid
+
+    IF ( var(1:2) == 'g_' )  THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'    
+    ELSEIF ( var(1:4) == 'LDSA' )  THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'
+    ELSEIF ( var(1:5) == 'm_bin' )  THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'
+    ELSEIF ( var(1:5) == 'N_bin' )  THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'
+    ELSEIF ( var(1:4) == 'Ntot' ) THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'
+    ELSEIF ( var(1:2) == 'PM' )  THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'
+    ELSEIF ( var(1:2) == 's_' )  THEN
+       grid_x = 'x' 
+       grid_y = 'y' 
+       grid_z = 'zu'
+    ELSE
+       found  = .FALSE.
+       grid_x = 'none'
+       grid_y = 'none'
+       grid_z = 'none'
+    ENDIF
+
+ END SUBROUTINE salsa_define_netcdf_grid
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for new module
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_header( io )
+
+    IMPLICIT NONE
+ 
+    INTEGER(iwp), INTENT(IN) ::  io   !< Unit of the output file
+!
+!-- Write SALSA header
+    WRITE( io, 1 )
+    WRITE( io, 2 ) skip_time_do_salsa
+    WRITE( io, 3 ) dt_salsa
+    WRITE( io, 12 )  SHAPE( aerosol_number(1)%conc ), nbins
+    IF ( advect_particle_water )  THEN
+       WRITE( io, 16 )  SHAPE( aerosol_mass(1)%conc ), ncc_tot*nbins,          &
+                        advect_particle_water
+    ELSE
+       WRITE( io, 16 )  SHAPE( aerosol_mass(1)%conc ), ncc*nbins,              &
+                        advect_particle_water
+    ENDIF
+    IF ( .NOT. salsa_gases_from_chem )  THEN
+       WRITE( io, 17 )  SHAPE( aerosol_mass(1)%conc ), ngast,                  &
+                        salsa_gases_from_chem
+    ENDIF
+    WRITE( io, 4 ) 
+    IF ( nsnucl > 0 )  THEN
+       WRITE( io, 5 ) nsnucl, nj3
+    ENDIF
+    IF ( nlcoag )  THEN
+       WRITE( io, 6 ) 
+    ENDIF
+    IF ( nlcnd )  THEN
+       WRITE( io, 7 ) nlcndgas, nlcndh2oae
+    ENDIF
+    IF ( nldepo )  THEN
+       WRITE( io, 14 ) nldepo_vege, nldepo_topo
+    ENDIF
+    WRITE( io, 8 )  reglim, nbin, bin_low_limits
+    WRITE( io, 15 ) nsect
+    WRITE( io, 13 ) ncc, listspec, mass_fracs_a, mass_fracs_b
+    IF ( .NOT. salsa_gases_from_chem )  THEN
+       WRITE( io, 18 ) ngast, H2SO4_init, HNO3_init, NH3_init, OCNV_init,      &
+                       OCSV_init
+    ENDIF
+    WRITE( io, 9 )  isdtyp, igctyp
+    IF ( isdtyp == 0 )  THEN
+       WRITE( io, 10 )  dpg, sigmag, n_lognorm
+    ELSE
+       WRITE( io, 11 )
+    ENDIF
+    
+
+1   FORMAT (//' SALSA information:'/                                           &
+              ' ------------------------------'/)
+2   FORMAT   ('    Starts at: skip_time_do_salsa = ', F10.2, '  s')
+3   FORMAT  (/'    Timestep: dt_salsa = ', F6.2, '  s')
+12  FORMAT  (/'    Array shape (z,y,x,bins):'/                                 &
+              '       aerosol_number:  ', 4(I3)) 
+16  FORMAT  (/'       aerosol_mass:    ', 4(I3),/                              &
+              '       (advect_particle_water = ', L1, ')')
+17  FORMAT   ('       salsa_gas: ', 4(I3),/                                    &
+              '       (salsa_gases_from_chem = ', L1, ')')
+4   FORMAT  (/'    Aerosol dynamic processes included: ')
+5   FORMAT  (/'       nucleation (scheme = ', I1, ' and J3 parametrization = ',&
+               I1, ')')
+6   FORMAT  (/'       coagulation')
+7   FORMAT  (/'       condensation (of precursor gases = ', L1,                &
+              '          and water vapour = ', L1, ')' )
+14  FORMAT  (/'       dry deposition (on vegetation = ', L1,                   &
+              '          and on topography = ', L1, ')')              
+8   FORMAT  (/'    Aerosol bin subrange limits (in metres): ',  3(ES10.2E3) /  &
+              '    Number of size bins for each aerosol subrange: ', 2I3,/     &
+              '    Aerosol bin limits (in metres): ', *(ES10.2E3))
+15  FORMAT   ('    Initial number concentration in bins at the lowest level',  &
+              ' (#/m**3):', *(ES10.2E3))        
+13  FORMAT  (/'    Number of chemical components used: ', I1,/                 &
+              '       Species: ',7(A6),/                                       &
+              '    Initial relative contribution of each species to particle', & 
+              ' volume in:',/                                                  &
+              '       a-bins: ', 7(F6.3),/                                     &
+              '       b-bins: ', 7(F6.3))
+18  FORMAT  (/'    Number of gaseous tracers used: ', I1,/                     &
+              '    Initial gas concentrations:',/                              &
+              '       H2SO4: ',ES12.4E3, ' #/m**3',/                           &
+              '       HNO3:  ',ES12.4E3, ' #/m**3',/                           &
+              '       NH3:   ',ES12.4E3, ' #/m**3',/                           &
+              '       OCNV:  ',ES12.4E3, ' #/m**3',/                           &
+              '       OCSV:  ',ES12.4E3, ' #/m**3')
+9    FORMAT (/'   Initialising concentrations: ', /                            &
+              '      Aerosol size distribution: isdtyp = ', I1,/               &
+              '      Gas concentrations: igctyp = ', I1 )
+10   FORMAT ( '      Mode diametres: dpg(nmod) = ', 7(F7.3),/                  &
+              '      Standard deviation: sigmag(nmod) = ', 7(F7.2),/           &
+              '      Number concentration: n_lognorm(nmod) = ', 7(ES12.4E3) )
+11   FORMAT (/'      Size distribution read from a file.')
+
+ END SUBROUTINE salsa_header
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate SALSA arrays and define pointers if required
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_init_arrays
+ 
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,     &
+               surf_usm_v
+
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  gases_available !< Number of available gas components in 
+                                     !< the chemistry model
+    INTEGER(iwp) ::  i   !< loop index for allocating
+    INTEGER(iwp) ::  l   !< loop index for allocating: surfaces
+    INTEGER(iwp) ::  lsp !< loop index for chem species in the chemistry model
+    
+    gases_available = 0
+
+!
+!-- Allocate prognostic variables (see salsa_swap_timelevel)
+#if defined( __nopointer )
+    message_string = 'SALSA runs only with POINTER Version'
+    CALL message( 'salsa_mod: salsa_init_arrays', 'SA0023', 1, 2, 0, 6, 0 )
+#else         
+!
+!-- Set derived indices:
+!-- (This does the same as the subroutine salsa_initialize in SALSA/
+!-- UCLALES-SALSA)        
+    in1a = 1                ! 1st index of subrange 1a
+    in2a = in1a + nbin(1)   ! 1st index of subrange 2a
+    fn1a = in2a - 1         ! last index of subrange 1a
+    fn2a = fn1a + nbin(2)   ! last index of subrange 2a
+    
+!    
+!-- If the fraction of insoluble aerosols in subrange 2 is zero: do not allocate
+!-- arrays for them
+    IF ( nf2a > 0.999999_wp  .AND.  SUM( mass_fracs_b ) < 0.00001_wp )  THEN
+       no_insoluble = .TRUE.
+       in2b = fn2a+1    ! 1st index of subrange 2b
+       fn2b = fn2a      ! last index of subrange 2b
+    ELSE
+       in2b = in2a + nbin(2)   ! 1st index of subrange 2b
+       fn2b = fn2a + nbin(2)   ! last index of subrange 2b
+    ENDIF
+    
+    
+    nbins = fn2b   ! total number of aerosol size bins
+!    
+!-- Create index tables for different aerosol components
+    CALL component_index_constructor( prtcl, ncc, maxspec, listspec )
+    
+    ncc_tot = ncc
+    IF ( advect_particle_water )  ncc_tot = ncc + 1  ! Add water 
+    
+!
+!-- Allocate:
+    ALLOCATE( aero(nbins), bin_low_limits(nbins), nsect(nbins), massacc(nbins) )
+    IF ( nldepo ) ALLOCATE( sedim_vd(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins) )          
+    ALLOCATE( Ra_dry(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins) )
+    
+!    
+!-- Aerosol number concentration
+    ALLOCATE( aerosol_number(nbins) )
+    ALLOCATE( nconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins),                    &
+              nconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins),                    &
+              nconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins) )
+    nconc_1 = 0.0_wp
+    nconc_2 = 0.0_wp
+    nconc_3 = 0.0_wp
+    
+    DO i = 1, nbins
+       aerosol_number(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => nconc_1(:,:,:,i)
+       aerosol_number(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => nconc_2(:,:,:,i)
+       aerosol_number(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => nconc_3(:,:,:,i)
+       ALLOCATE( aerosol_number(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),     &
+                 aerosol_number(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),     &
+                 aerosol_number(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                 aerosol_number(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                 aerosol_number(i)%init(nzb:nzt+1),                            &
+                 aerosol_number(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+    ENDDO      
+    
+!    
+!-- Aerosol mass concentration    
+    ALLOCATE( aerosol_mass(ncc_tot*nbins) ) 
+    ALLOCATE( mconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncc_tot*nbins),            &
+              mconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncc_tot*nbins),            &
+              mconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ncc_tot*nbins) )
+    mconc_1 = 0.0_wp
+    mconc_2 = 0.0_wp
+    mconc_3 = 0.0_wp
+    
+    DO i = 1, ncc_tot*nbins
+       aerosol_mass(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => mconc_1(:,:,:,i)
+       aerosol_mass(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => mconc_2(:,:,:,i)
+       aerosol_mass(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => mconc_3(:,:,:,i)       
+       ALLOCATE( aerosol_mass(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),       &
+                 aerosol_mass(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),       &
+                 aerosol_mass(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                 aerosol_mass(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                 aerosol_mass(i)%init(nzb:nzt+1),                              &
+                 aerosol_mass(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1)  )
+    ENDDO
+    
+!
+!-- Surface fluxes: answs = aerosol number, amsws = aerosol mass 
+!
+!-- Horizontal surfaces: default type
+    DO  l = 0, 2   ! upward (l=0), downward (l=1) and model top (l=2)
+       ALLOCATE( surf_def_h(l)%answs( 1:surf_def_h(l)%ns, nbins ) )
+       ALLOCATE( surf_def_h(l)%amsws( 1:surf_def_h(l)%ns, nbins*ncc_tot ) )
+       surf_def_h(l)%answs = 0.0_wp
+       surf_def_h(l)%amsws = 0.0_wp
+    ENDDO
+!-- Horizontal surfaces: natural type    
+    IF ( land_surface )  THEN
+       ALLOCATE( surf_lsm_h%answs( 1:surf_lsm_h%ns, nbins ) )
+       ALLOCATE( surf_lsm_h%amsws( 1:surf_lsm_h%ns, nbins*ncc_tot ) )
+       surf_lsm_h%answs = 0.0_wp
+       surf_lsm_h%amsws = 0.0_wp
+    ENDIF
+!-- Horizontal surfaces: urban type 
+    IF ( urban_surface )  THEN
+       ALLOCATE( surf_usm_h%answs( 1:surf_usm_h%ns, nbins ) )
+       ALLOCATE( surf_usm_h%amsws( 1:surf_usm_h%ns, nbins*ncc_tot ) )
+       surf_usm_h%answs = 0.0_wp
+       surf_usm_h%amsws = 0.0_wp
+    ENDIF
+!
+!-- Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and 
+!-- westward (l=3) facing
+    DO  l = 0, 3    
+       ALLOCATE( surf_def_v(l)%answs( 1:surf_def_v(l)%ns, nbins ) )
+       surf_def_v(l)%answs = 0.0_wp
+       ALLOCATE( surf_def_v(l)%amsws( 1:surf_def_v(l)%ns, nbins*ncc_tot ) )
+       surf_def_v(l)%amsws = 0.0_wp
+       
+       IF ( land_surface)  THEN
+          ALLOCATE( surf_lsm_v(l)%answs( 1:surf_lsm_v(l)%ns, nbins ) )
+          surf_lsm_v(l)%answs = 0.0_wp
+          ALLOCATE( surf_lsm_v(l)%amsws( 1:surf_lsm_v(l)%ns, nbins*ncc_tot ) )
+          surf_lsm_v(l)%amsws = 0.0_wp
+       ENDIF
+       
+       IF ( urban_surface )  THEN
+          ALLOCATE( surf_usm_v(l)%answs( 1:surf_usm_v(l)%ns, nbins ) )
+          surf_usm_v(l)%answs = 0.0_wp
+          ALLOCATE( surf_usm_v(l)%amsws( 1:surf_usm_v(l)%ns, nbins*ncc_tot ) )
+          surf_usm_v(l)%amsws = 0.0_wp
+       ENDIF
+    ENDDO    
+    
+!
+!-- Concentration of gaseous tracers (1. SO4, 2. HNO3, 3. NH3, 4. OCNV, 5. OCSV)
+!-- (number concentration (#/m3) )
+!
+!-- If chemistry is on, read gas phase concentrations from there. Otherwise, 
+!-- allocate salsa_gas array.
+
+    IF ( air_chemistry )  THEN   
+       DO  lsp = 1, nvar
+          IF ( TRIM( chem_species(lsp)%name ) == 'H2SO4' )  THEN
+             gases_available = gases_available + 1
+             gas_index_chem(1) = lsp
+          ELSEIF ( TRIM( chem_species(lsp)%name ) == 'HNO3' )  THEN
+             gases_available = gases_available + 1  
+             gas_index_chem(2) = lsp
+          ELSEIF ( TRIM( chem_species(lsp)%name ) == 'NH3' )  THEN
+             gases_available = gases_available + 1
+             gas_index_chem(3) = lsp
+          ELSEIF ( TRIM( chem_species(lsp)%name ) == 'OCNV' )  THEN
+             gases_available = gases_available + 1
+             gas_index_chem(4) = lsp
+          ELSEIF ( TRIM( chem_species(lsp)%name ) == 'OCSV' )  THEN
+             gases_available = gases_available + 1
+             gas_index_chem(5) = lsp
+          ENDIF
+       ENDDO
+
+       IF ( gases_available == ngast )  THEN
+          salsa_gases_from_chem = .TRUE.
+       ELSE
+          WRITE( message_string, * ) 'SALSA is run together with chemistry '// &
+                                     'but not all gaseous components are '//   &
+                                     'provided by kpp (H2SO4, HNO3, NH3, '//   &
+                                     'OCNV, OCSC)'
+       CALL message( 'check_parameters', 'SA0024', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ELSE
+
+       ALLOCATE( salsa_gas(ngast) ) 
+       ALLOCATE( gconc_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngast),                 &
+                 gconc_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngast),                 &
+                 gconc_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg,ngast) )
+       gconc_1 = 0.0_wp
+       gconc_2 = 0.0_wp
+       gconc_3 = 0.0_wp
+       
+       DO i = 1, ngast
+          salsa_gas(i)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    => gconc_1(:,:,:,i)
+          salsa_gas(i)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  => gconc_2(:,:,:,i)
+          salsa_gas(i)%tconc_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) => gconc_3(:,:,:,i)
+          ALLOCATE( salsa_gas(i)%flux_s(nzb+1:nzt,0:threads_per_task-1),       &
+                    salsa_gas(i)%diss_s(nzb+1:nzt,0:threads_per_task-1),       &
+                    salsa_gas(i)%flux_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                    salsa_gas(i)%diss_l(nzb+1:nzt,nys:nyn,0:threads_per_task-1),&
+                    salsa_gas(i)%init(nzb:nzt+1),                              &
+                    salsa_gas(i)%sums_ws_l(nzb:nzt+1,0:threads_per_task-1) )
+       ENDDO       
+!
+!--    Surface fluxes: gtsws = gaseous tracer flux
+!
+!--    Horizontal surfaces: default type
+       DO  l = 0, 2   ! upward (l=0), downward (l=1) and model top (l=2)
+          ALLOCATE( surf_def_h(l)%gtsws( 1:surf_def_h(l)%ns, ngast ) )
+          surf_def_h(l)%gtsws = 0.0_wp
+       ENDDO
+!--    Horizontal surfaces: natural type   
+       IF ( land_surface )  THEN
+          ALLOCATE( surf_lsm_h%gtsws( 1:surf_lsm_h%ns, ngast ) )
+          surf_lsm_h%gtsws = 0.0_wp
+       ENDIF
+!--    Horizontal surfaces: urban type          
+       IF ( urban_surface )  THEN 
+          ALLOCATE( surf_usm_h%gtsws( 1:surf_usm_h%ns, ngast ) )
+          surf_usm_h%gtsws = 0.0_wp
+       ENDIF
+!
+!--    Vertical surfaces: northward (l=0), southward (l=1), eastward (l=2) and 
+!--    westward (l=3) facing
+       DO  l = 0, 3     
+          ALLOCATE( surf_def_v(l)%gtsws( 1:surf_def_v(l)%ns, ngast ) )
+          surf_def_v(l)%gtsws = 0.0_wp
+          IF ( land_surface )  THEN
+             ALLOCATE( surf_lsm_v(l)%gtsws( 1:surf_lsm_v(l)%ns, ngast ) )
+             surf_lsm_v(l)%gtsws = 0.0_wp
+          ENDIF
+          IF ( urban_surface )  THEN
+             ALLOCATE( surf_usm_v(l)%gtsws( 1:surf_usm_v(l)%ns, ngast ) )
+             surf_usm_v(l)%gtsws = 0.0_wp
+          ENDIF
+       ENDDO
+    ENDIF
+    
+#endif
+
+ END SUBROUTINE salsa_init_arrays
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of SALSA. Based on salsa_initialize in UCLALES-SALSA. 
+!> Subroutines salsa_initialize, SALSAinit and DiagInitAero in UCLALES-SALSA are
+!> also merged here.
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_init
+
+    IMPLICIT NONE
+    
+    INTEGER(iwp) :: b
+    INTEGER(iwp) :: c
+    INTEGER(iwp) :: g
+    INTEGER(iwp) :: i
+    INTEGER(iwp) :: j
+    
+    bin_low_limits = 0.0_wp
+    nsect          = 0.0_wp
+    massacc        = 1.0_wp 
+    
+!
+!-- Indices for chemical components used (-1 = not used)
+    i = 0
+    IF ( is_used( prtcl, 'SO4' ) )  THEN
+       iso4 = get_index( prtcl,'SO4' )
+       i = i + 1
+    ENDIF
+    IF ( is_used( prtcl,'OC' ) )  THEN
+       ioc = get_index(prtcl, 'OC')
+       i = i + 1
+    ENDIF
+    IF ( is_used( prtcl, 'BC' ) )  THEN
+       ibc = get_index( prtcl, 'BC' )
+       i = i + 1
+    ENDIF
+    IF ( is_used( prtcl, 'DU' ) )  THEN
+       idu = get_index( prtcl, 'DU' )
+       i = i + 1
+    ENDIF
+    IF ( is_used( prtcl, 'SS' ) )  THEN
+       iss = get_index( prtcl, 'SS' )
+       i = i + 1
+    ENDIF
+    IF ( is_used( prtcl, 'NO' ) )  THEN
+       ino = get_index( prtcl, 'NO' )
+       i = i + 1
+    ENDIF
+    IF ( is_used( prtcl, 'NH' ) )  THEN
+       inh = get_index( prtcl, 'NH' )
+       i = i + 1
+    ENDIF
+!    
+!-- All species must be known
+    IF ( i /= ncc )  THEN
+       message_string = 'Unknown aerosol species/component(s) given in the' // &
+                        ' initialization'
+       CALL message( 'salsa_mod: salsa_init', 'SA0020', 1, 2, 0, 6, 0 )
+    ENDIF
+    
+!
+!-- Initialise
+!
+!-- Aerosol size distribution (TYPE t_section)
+    aero(:)%dwet     = 1.0E-10_wp
+    aero(:)%veqh2o   = 1.0E-10_wp
+    aero(:)%numc     = nclim
+    aero(:)%core     = 1.0E-10_wp
+    DO c = 1, maxspec+1    ! 1:SO4, 2:OC, 3:BC, 4:DU, 5:SS, 6:NO, 7:NH, 8:H2O
+       aero(:)%volc(c) = 0.0_wp
+    ENDDO
+    
+    IF ( nldepo )  sedim_vd = 0.0_wp
+!    
+!-- Initilisation actions that are NOT conducted for restart runs
+    IF ( .NOT. read_restart_data_salsa )  THEN    
+    
+       DO  b = 1, nbins
+          aerosol_number(b)%conc      = nclim
+          aerosol_number(b)%conc_p    = 0.0_wp
+          aerosol_number(b)%tconc_m   = 0.0_wp
+          aerosol_number(b)%flux_s    = 0.0_wp
+          aerosol_number(b)%diss_s    = 0.0_wp
+          aerosol_number(b)%flux_l    = 0.0_wp
+          aerosol_number(b)%diss_l    = 0.0_wp
+          aerosol_number(b)%init      = nclim
+          aerosol_number(b)%sums_ws_l = 0.0_wp
+       ENDDO
+       DO  c = 1, ncc_tot*nbins
+          aerosol_mass(c)%conc      = mclim
+          aerosol_mass(c)%conc_p    = 0.0_wp
+          aerosol_mass(c)%tconc_m   = 0.0_wp
+          aerosol_mass(c)%flux_s    = 0.0_wp
+          aerosol_mass(c)%diss_s    = 0.0_wp
+          aerosol_mass(c)%flux_l    = 0.0_wp
+          aerosol_mass(c)%diss_l    = 0.0_wp
+          aerosol_mass(c)%init      = mclim
+          aerosol_mass(c)%sums_ws_l = 0.0_wp
+       ENDDO
+       
+       IF ( .NOT. salsa_gases_from_chem )  THEN
+          DO  g = 1, ngast
+             salsa_gas(g)%conc_p    = 0.0_wp
+             salsa_gas(g)%tconc_m   = 0.0_wp
+             salsa_gas(g)%flux_s    = 0.0_wp
+             salsa_gas(g)%diss_s    = 0.0_wp
+             salsa_gas(g)%flux_l    = 0.0_wp
+             salsa_gas(g)%diss_l    = 0.0_wp
+             salsa_gas(g)%sums_ws_l = 0.0_wp
+          ENDDO
+       
+!
+!--       Set initial value for gas compound tracers and initial values
+          salsa_gas(1)%conc = H2SO4_init
+          salsa_gas(1)%init = H2SO4_init
+          salsa_gas(2)%conc = HNO3_init
+          salsa_gas(2)%init = HNO3_init
+          salsa_gas(3)%conc = NH3_init
+          salsa_gas(3)%init = NH3_init
+          salsa_gas(4)%conc = OCNV_init
+          salsa_gas(4)%init = OCNV_init
+          salsa_gas(5)%conc = OCSV_init
+          salsa_gas(5)%init = OCSV_init      
+       ENDIF
+!
+!--    Aerosol radius in each bin: dry and wet (m)
+       Ra_dry = 1.0E-10_wp
+!    
+!--    Initialise aerosol tracers    
+       aero(:)%vhilim   = 0.0_wp
+       aero(:)%vlolim   = 0.0_wp
+       aero(:)%vratiohi = 0.0_wp
+       aero(:)%vratiolo = 0.0_wp
+       aero(:)%dmid     = 0.0_wp
+!
+!--    Initialise the sectional particle size distribution
+       CALL set_sizebins()
+!
+!--    Initialise location-dependent aerosol size distributions and 
+!--    chemical compositions:
+       CALL aerosol_init 
+!
+!--    Initalisation run of SALSA
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             CALL salsa_driver( i, j, 1 )
+             CALL salsa_diagnostics( i, j )
+          ENDDO
+       ENDDO 
+    ENDIF
+!
+!-- Set the aerosol and gas sources
+    IF ( salsa_source_mode == 'read_from_file' )  THEN
+       CALL salsa_set_source
+    ENDIF
+    
+ END SUBROUTINE salsa_init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializes particle size distribution grid by calculating size bin limits 
+!> and mid-size for *dry* particles in each bin. Called from salsa_initialize 
+!> (only at the beginning of simulation).
+!> Size distribution described using:
+!>   1) moving center method (subranges 1 and 2)
+!>      (Jacobson, Atmos. Env., 31, 131-144, 1997)
+!>   2) fixed sectional method (subrange 3)
+!> Size bins in each subrange are spaced logarithmically
+!> based on given subrange size limits and bin number.
+!
+!> Mona changed 06/2017: Use geometric mean diameter to describe the mean 
+!> particle diameter in a size bin, not the arithmeric mean which clearly
+!> overestimates the total particle volume concentration. 
+!
+!> Coded by:
+!> Hannele Korhonen (FMI) 2005
+!> Harri Kokkola (FMI) 2006
+!
+!> Bug fixes for box model + updated for the new aerosol datatype:
+!> Juha Tonttila (FMI) 2014
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_sizebins
+               
+    IMPLICIT NONE
+!    
+!-- Local variables
+    INTEGER(iwp) ::  cc
+    INTEGER(iwp) ::  dd
+    REAL(wp) ::  ratio_d !< ratio of the upper and lower diameter of subranges
+!
+!-- vlolim&vhilim: min & max *dry* volumes [fxm] 
+!-- dmid: bin mid *dry* diameter (m)
+!-- vratiolo&vratiohi: volume ratio between the center and low/high limit
+!
+!-- 1) Size subrange 1:
+    ratio_d = reglim(2) / reglim(1)   ! section spacing (m)
+    DO  cc = in1a,fn1a
+       aero(cc)%vlolim = api6 * ( reglim(1) * ratio_d **                       &
+                                ( REAL( cc-1 ) / nbin(1) ) ) ** 3.0_wp
+       aero(cc)%vhilim = api6 * ( reglim(1) * ratio_d **                       &
+                                ( REAL( cc ) / nbin(1) ) ) ** 3.0_wp
+       aero(cc)%dmid = SQRT( ( aero(cc)%vhilim / api6 ) ** ( 1.0_wp / 3.0_wp ) &
+                           * ( aero(cc)%vlolim / api6 ) ** ( 1.0_wp / 3.0_wp ) )
+       aero(cc)%vratiohi = aero(cc)%vhilim / ( api6 * aero(cc)%dmid ** 3.0_wp )
+       aero(cc)%vratiolo = aero(cc)%vlolim / ( api6 * aero(cc)%dmid ** 3.0_wp )
+    ENDDO
+!
+!-- 2) Size subrange 2: 
+!-- 2.1) Sub-subrange 2a: high hygroscopicity
+    ratio_d = reglim(3) / reglim(2)   ! section spacing
+    DO  dd = in2a, fn2a
+       cc = dd - in2a
+       aero(dd)%vlolim = api6 * ( reglim(2) * ratio_d **                       &
+                                  ( REAL( cc ) / nbin(2) ) ) ** 3.0_wp
+       aero(dd)%vhilim = api6 * ( reglim(2) * ratio_d **                       &
+                                  ( REAL( cc+1 ) / nbin(2) ) ) ** 3.0_wp
+       aero(dd)%dmid = SQRT( ( aero(dd)%vhilim / api6 ) ** ( 1.0_wp / 3.0_wp ) &
+                           * ( aero(dd)%vlolim / api6 ) ** ( 1.0_wp / 3.0_wp ) )
+       aero(dd)%vratiohi = aero(dd)%vhilim / ( api6 * aero(dd)%dmid ** 3.0_wp )
+       aero(dd)%vratiolo = aero(dd)%vlolim / ( api6 * aero(dd)%dmid ** 3.0_wp )
+    ENDDO
+!          
+!-- 2.2) Sub-subrange 2b: low hygroscopicity
+    IF ( .NOT. no_insoluble )  THEN
+       aero(in2b:fn2b)%vlolim   = aero(in2a:fn2a)%vlolim
+       aero(in2b:fn2b)%vhilim   = aero(in2a:fn2a)%vhilim
+       aero(in2b:fn2b)%dmid     = aero(in2a:fn2a)%dmid
+       aero(in2b:fn2b)%vratiohi = aero(in2a:fn2a)%vratiohi
+       aero(in2b:fn2b)%vratiolo = aero(in2a:fn2a)%vratiolo
+    ENDIF
+!          
+!-- Initialize the wet diameter with the bin dry diameter to avoid numerical 
+!-- problems later
+    aero(:)%dwet = aero(:)%dmid
+!
+!-- Save bin limits (lower diameter) to be delivered to the host model if needed
+    DO cc = 1, nbins
+       bin_low_limits(cc) = ( aero(cc)%vlolim / api6 )**( 1.0_wp / 3.0_wp )
+    ENDDO    
+    
+ END SUBROUTINE set_sizebins
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initilize altitude-dependent aerosol size distributions and compositions.
+!>
+!> Mona added 06/2017: Correct the number and mass concentrations by normalizing 
+!< by the given total number and mass concentration.
+!>
+!> Tomi Raatikainen, FMI, 29.2.2016
+!------------------------------------------------------------------------------!
+ SUBROUTINE aerosol_init
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  zu
+ 
+    USE NETCDF
+    
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  get_attribute, netcdf_data_input_get_dimension_length,          &
+               get_variable, open_read_file
+    
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  b          !< loop index: size bins
+    INTEGER(iwp) ::  c          !< loop index: chemical components
+    INTEGER(iwp) ::  ee         !< index: end
+    INTEGER(iwp) ::  g          !< loop index: gases
+    INTEGER(iwp) ::  i          !< loop index: x-direction
+    INTEGER(iwp) ::  id_faero   !< NetCDF id of PIDS_SALSA
+    INTEGER(iwp) ::  id_fchem   !< NetCDF id of PIDS_CHEM
+    INTEGER(iwp) ::  j          !< loop index: y-direction
+    INTEGER(iwp) ::  k          !< loop index: z-direction
+    INTEGER(iwp) ::  kk         !< loop index: z-direction
+    INTEGER(iwp) ::  nz_file    !< Number of grid-points in file (heights)                            
+    INTEGER(iwp) ::  prunmode
+    INTEGER(iwp) ::  ss !< index: start 
+    LOGICAL  ::  netcdf_extend = .FALSE. !< Flag indicating wether netcdf 
+                                         !< topography input file or not
+    REAL(wp), DIMENSION(nbins) ::  core  !< size of the bin mid aerosol particle, 
+    REAL(wp) ::  flag           !< flag to mask topography grid points
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pr_gas !< gas profiles
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pr_mass_fracs_a !< mass fraction 
+                                                              !< profiles: a
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pr_mass_fracs_b !< and b
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pr_nsect !< sectional size 
+                                                       !< distribution profile
+    REAL(wp), DIMENSION(nbins)            ::  nsect  !< size distribution (#/m3)
+    REAL(wp), DIMENSION(0:nz+1,nbins)     ::  pndist !< size dist as a function 
+                                                     !< of height (#/m3)
+    REAL(wp), DIMENSION(0:nz+1)           ::  pnf2a  !< number fraction: bins 2a
+    REAL(wp), DIMENSION(0:nz+1,maxspec)   ::  pvf2a  !< mass distributions of  
+                                                     !< aerosol species for a  
+    REAL(wp), DIMENSION(0:nz+1,maxspec)   ::  pvf2b  !< and b-bins     
+    REAL(wp), DIMENSION(0:nz+1)           ::  pvfOC1a !< mass fraction between 
+                                                     !< SO4 and OC in 1a
+    REAL(wp), DIMENSION(:), ALLOCATABLE   ::  pr_z
+
+    prunmode = 1
+!
+!-- Bin mean aerosol particle volume (m3)
+    core(:) = 0.0_wp
+    core(1:nbins) = api6 * aero(1:nbins)%dmid ** 3.0_wp
+!    
+!-- Set concentrations to zero 
+    nsect(:)     = 0.0_wp
+    pndist(:,:)  = 0.0_wp
+    pnf2a(:)     = nf2a   
+    pvf2a(:,:)   = 0.0_wp
+    pvf2b(:,:)   = 0.0_wp
+    pvfOC1a(:)   = 0.0_wp
+
+    IF ( isdtyp == 1 )  THEN
+!
+!--    Read input profiles from PIDS_SALSA    
+!    
+!--    Location-dependent size distributions and compositions.      
+       INQUIRE( FILE='PIDS_SALSA'// TRIM( coupling_char ), EXIST=netcdf_extend )
+       IF ( netcdf_extend )  THEN
+!
+!--       Open file in read-only mode  
+          CALL open_read_file( 'PIDS_SALSA' // TRIM( coupling_char ), id_faero )
+!
+!--       Input heights   
+          CALL netcdf_data_input_get_dimension_length( id_faero, nz_file, "profile_z" ) 
+          
+          ALLOCATE( pr_z(nz_file), pr_mass_fracs_a(maxspec,nz_file),           &
+                    pr_mass_fracs_b(maxspec,nz_file), pr_nsect(nbins,nz_file) ) 
+          CALL get_variable( id_faero, 'profile_z', pr_z ) 
+!       
+!--       Mass fracs profile: 1: H2SO4 (sulphuric acid), 2: OC (organic carbon), 
+!--                           3: BC (black carbon),      4: DU (dust),  
+!--                           5: SS (sea salt),          6: HNO3 (nitric acid),
+!--                           7: NH3 (ammonia)          
+          CALL get_variable( id_faero, "profile_mass_fracs_a", pr_mass_fracs_a,&
+                             0, nz_file-1, 0, maxspec-1 )
+          CALL get_variable( id_faero, "profile_mass_fracs_b", pr_mass_fracs_b,&
+                             0, nz_file-1, 0, maxspec-1 )
+          CALL get_variable( id_faero, "profile_nsect", pr_nsect, 0, nz_file-1,&
+                             0, nbins-1 )                   
+          
+          kk = 1
+          DO  k = nzb, nz+1
+             IF ( kk < nz_file )  THEN
+                DO  WHILE ( pr_z(kk+1) <= zu(k) )
+                   kk = kk + 1
+                   IF ( kk == nz_file )  EXIT
+                ENDDO
+             ENDIF
+             IF ( kk < nz_file )  THEN
+!             
+!--             Set initial value for gas compound tracers and initial values
+                pvf2a(k,:) = pr_mass_fracs_a(:,kk) + ( zu(k) - pr_z(kk) ) / (  &
+                            pr_z(kk+1) - pr_z(kk) ) * ( pr_mass_fracs_a(:,kk+1)&
+                            - pr_mass_fracs_a(:,kk) )    
+                pvf2b(k,:) = pr_mass_fracs_b(:,kk) + ( zu(k) - pr_z(kk) ) / (  &
+                            pr_z(kk+1) - pr_z(kk) ) * ( pr_mass_fracs_b(:,kk+1)&
+                            - pr_mass_fracs_b(:,kk) )             
+                pndist(k,:) = pr_nsect(:,kk) + ( zu(k) - pr_z(kk) ) / (        &
+                              pr_z(kk+1) - pr_z(kk) ) * ( pr_nsect(:,kk+1) -   &
+                              pr_nsect(:,kk) )
+             ELSE
+                pvf2a(k,:) = pr_mass_fracs_a(:,kk)       
+                pvf2b(k,:) = pr_mass_fracs_b(:,kk)
+                pndist(k,:) = pr_nsect(:,kk)
+             ENDIF
+             IF ( iso4 < 0 )  THEN 
+                pvf2a(k,1) = 0.0_wp
+                pvf2b(k,1) = 0.0_wp
+             ENDIF
+             IF ( ioc < 0 )  THEN 
+                pvf2a(k,2) = 0.0_wp
+                pvf2b(k,2) = 0.0_wp
+             ENDIF
+             IF ( ibc < 0 )  THEN 
+                pvf2a(k,3) = 0.0_wp
+                pvf2b(k,3) = 0.0_wp
+             ENDIF
+             IF ( idu < 0 )  THEN 
+                pvf2a(k,4) = 0.0_wp
+                pvf2b(k,4) = 0.0_wp
+             ENDIF
+             IF ( iss < 0 )  THEN 
+                pvf2a(k,5) = 0.0_wp
+                pvf2b(k,5) = 0.0_wp
+             ENDIF
+             IF ( ino < 0 )  THEN 
+                pvf2a(k,6) = 0.0_wp
+                pvf2b(k,6) = 0.0_wp
+             ENDIF
+             IF ( inh < 0 )  THEN 
+                pvf2a(k,7) = 0.0_wp
+                pvf2b(k,7) = 0.0_wp
+             ENDIF
+!
+!--          Then normalise the mass fraction so that SUM = 1 
+             pvf2a(k,:) = pvf2a(k,:) / SUM( pvf2a(k,:) )
+             IF ( SUM( pvf2b(k,:) ) > 0.0_wp ) pvf2b(k,:) = pvf2b(k,:) /       &
+                                                            SUM( pvf2b(k,:) )
+          ENDDO          
+          DEALLOCATE( pr_z, pr_mass_fracs_a, pr_mass_fracs_b, pr_nsect )
+       ELSE
+          message_string = 'Input file '// TRIM( 'PIDS_SALSA' ) //             &
+                           TRIM( coupling_char ) // ' for SALSA missing!'
+          CALL message( 'salsa_mod: aerosol_init', 'SA0032', 1, 2, 0, 6, 0 )                
+       ENDIF   ! netcdf_extend   
+ 
+    ELSEIF ( isdtyp == 0 )  THEN
+!
+!--    Mass fractions for species in a and b-bins
+       IF ( iso4 > 0 )  THEN
+          pvf2a(:,1) = mass_fracs_a(iso4) 
+          pvf2b(:,1) = mass_fracs_b(iso4)
+       ENDIF
+       IF ( ioc > 0 )  THEN
+          pvf2a(:,2) = mass_fracs_a(ioc)
+          pvf2b(:,2) = mass_fracs_b(ioc) 
+       ENDIF
+       IF ( ibc > 0 )  THEN
+          pvf2a(:,3) = mass_fracs_a(ibc) 
+          pvf2b(:,3) = mass_fracs_b(ibc)
+       ENDIF 
+       IF ( idu > 0 )  THEN
+          pvf2a(:,4) = mass_fracs_a(idu)
+          pvf2b(:,4) = mass_fracs_b(idu) 
+       ENDIF
+       IF ( iss > 0 )  THEN
+          pvf2a(:,5) = mass_fracs_a(iss)
+          pvf2b(:,5) = mass_fracs_b(iss) 
+       ENDIF
+       IF ( ino > 0 )  THEN
+          pvf2a(:,6) = mass_fracs_a(ino)
+          pvf2b(:,6) = mass_fracs_b(ino)
+       ENDIF
+       IF ( inh > 0 )  THEN
+          pvf2a(:,7) = mass_fracs_a(inh)
+          pvf2b(:,7) = mass_fracs_b(inh)
+       ENDIF
+       DO  k = nzb, nz+1
+          pvf2a(k,:) = pvf2a(k,:) / SUM( pvf2a(k,:) )
+          IF ( SUM( pvf2b(k,:) ) > 0.0_wp ) pvf2b(k,:) = pvf2b(k,:) /          &
+                                                         SUM( pvf2b(k,:) )
+       ENDDO
+       
+       CALL size_distribution( n_lognorm, dpg, sigmag, nsect )
+!
+!--    Normalize by the given total number concentration
+       nsect = nsect * SUM( n_lognorm ) * 1.0E+6_wp / SUM( nsect )      
+       DO  b = in1a, fn2b
+          pndist(:,b) = nsect(b)
+       ENDDO
+    ENDIF
+    
+    IF ( igctyp == 1 )  THEN
+!
+!--    Read input profiles from PIDS_CHEM    
+!    
+!--    Location-dependent size distributions and compositions.      
+       INQUIRE( FILE='PIDS_CHEM' // TRIM( coupling_char ), EXIST=netcdf_extend )
+       IF ( netcdf_extend  .AND.  .NOT. salsa_gases_from_chem )  THEN
+!
+!--       Open file in read-only mode      
+          CALL open_read_file( 'PIDS_CHEM' // TRIM( coupling_char ), id_fchem )
+!
+!--       Input heights   
+          CALL netcdf_data_input_get_dimension_length( id_fchem, nz_file, "profile_z" ) 
+          ALLOCATE( pr_z(nz_file), pr_gas(ngast,nz_file) ) 
+          CALL get_variable( id_fchem, 'profile_z', pr_z ) 
+!       
+!--       Gases:
+          CALL get_variable( id_fchem, "profile_H2SO4", pr_gas(1,:) )
+          CALL get_variable( id_fchem, "profile_HNO3", pr_gas(2,:) )
+          CALL get_variable( id_fchem, "profile_NH3", pr_gas(3,:) )
+          CALL get_variable( id_fchem, "profile_OCNV", pr_gas(4,:) )
+          CALL get_variable( id_fchem, "profile_OCSV", pr_gas(5,:) )
+          
+          kk = 1
+          DO  k = nzb, nz+1
+             IF ( kk < nz_file )  THEN
+                DO  WHILE ( pr_z(kk+1) <= zu(k) )
+                   kk = kk + 1
+                   IF ( kk == nz_file )  EXIT
+                ENDDO
+             ENDIF
+             IF ( kk < nz_file )  THEN
+!             
+!--             Set initial value for gas compound tracers and initial values
+                DO  g = 1, ngast
+                   salsa_gas(g)%init(k) =  pr_gas(g,kk) + ( zu(k) - pr_z(kk) ) &
+                                           / ( pr_z(kk+1) - pr_z(kk) ) *       &
+                                           ( pr_gas(g,kk+1) - pr_gas(g,kk) )
+                   salsa_gas(g)%conc(k,:,:) = salsa_gas(g)%init(k)
+                ENDDO
+             ELSE
+                DO  g = 1, ngast
+                   salsa_gas(g)%init(k) =  pr_gas(g,kk) 
+                   salsa_gas(g)%conc(k,:,:) = salsa_gas(g)%init(k)
+                ENDDO
+             ENDIF
+          ENDDO
+          
+          DEALLOCATE( pr_z, pr_gas )
+       ELSEIF ( .NOT. netcdf_extend  .AND.  .NOT.  salsa_gases_from_chem )  THEN
+          message_string = 'Input file '// TRIM( 'PIDS_CHEM' ) //              &
+                           TRIM( coupling_char ) // ' for SALSA missing!'
+          CALL message( 'salsa_mod: aerosol_init', 'SA0033', 1, 2, 0, 6, 0 )                
+       ENDIF   ! netcdf_extend     
+    ENDIF
+
+    IF ( ioc > 0  .AND.  iso4 > 0 )  THEN      
+!--    Both are there, so use the given "massDistrA"
+       pvfOC1a(:) = pvf2a(:,2) / ( pvf2a(:,2) + pvf2a(:,1) )  ! Normalize
+    ELSEIF ( ioc > 0 )  THEN
+!--    Pure organic carbon
+       pvfOC1a(:) = 1.0_wp
+    ELSEIF ( iso4 > 0 )  THEN
+!--    Pure SO4
+       pvfOC1a(:) = 0.0_wp   
+    ELSE
+       message_string = 'Either OC or SO4 must be active for aerosol region 1a!'
+       CALL message( 'salsa_mod: aerosol_init', 'SA0021', 1, 2, 0, 6, 0 )
+    ENDIF    
+    
+!
+!-- Initialize concentrations
+    DO  i = nxlg, nxrg 
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt+1
+!
+!--          Predetermine flag to mask topography          
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!          
+!--          a) Number concentrations
+!--           Region 1:
+             DO  b = in1a, fn1a
+                aerosol_number(b)%conc(k,j,i) = pndist(k,b) * flag
+                IF ( prunmode == 1 )  THEN
+                   aerosol_number(b)%init = pndist(:,b)
+                ENDIF
+             ENDDO
+!             
+!--           Region 2:
+             IF ( nreg > 1 )  THEN
+                DO  b = in2a, fn2a
+                   aerosol_number(b)%conc(k,j,i) = MAX( 0.0_wp, pnf2a(k) ) *   &
+                                                    pndist(k,b) * flag
+                   IF ( prunmode == 1 )  THEN
+                      aerosol_number(b)%init = MAX( 0.0_wp, nf2a ) * pndist(:,b)
+                   ENDIF
+                ENDDO
+                IF ( .NOT. no_insoluble )  THEN
+                   DO  b = in2b, fn2b
+                      IF ( pnf2a(k) < 1.0_wp )  THEN              
+                         aerosol_number(b)%conc(k,j,i) = MAX( 0.0_wp, 1.0_wp   &
+                                               - pnf2a(k) ) * pndist(k,b) * flag
+                         IF ( prunmode == 1 )  THEN
+                            aerosol_number(b)%init = MAX( 0.0_wp, 1.0_wp -     &
+                                                          nf2a ) * pndist(:,b)
+                         ENDIF
+                      ENDIF
+                   ENDDO
+                ENDIF
+             ENDIF
+!
+!--          b) Aerosol mass concentrations
+!--             bin subrange 1: done here separately due to the SO4/OC convention
+!--          SO4:
+             IF ( iso4 > 0 )  THEN
+                ss = ( iso4 - 1 ) * nbins + in1a !< start
+                ee = ( iso4 - 1 ) * nbins + fn1a !< end
+                b = in1a
+                DO  c = ss, ee
+                   aerosol_mass(c)%conc(k,j,i) = MAX( 0.0_wp, 1.0_wp -         &
+                                                  pvfOC1a(k) ) * pndist(k,b) * &
+                                                  core(b) * arhoh2so4 * flag
+                   IF ( prunmode == 1 )  THEN
+                      aerosol_mass(c)%init = MAX( 0.0_wp, 1.0_wp - MAXVAL(     &
+                                             pvfOC1a ) ) * pndist(:,b) *       &
+                                             core(b) * arhoh2so4
+                   ENDIF
+                   b = b+1
+                ENDDO
+             ENDIF
+!--          OC:
+             IF ( ioc > 0 ) THEN
+                ss = ( ioc - 1 ) * nbins + in1a !< start
+                ee = ( ioc - 1 ) * nbins + fn1a !< end 
+                b = in1a
+                DO  c = ss, ee 
+                   aerosol_mass(c)%conc(k,j,i) = MAX( 0.0_wp, pvfOC1a(k) ) *   &
+                                           pndist(k,b) * core(b) * arhooc * flag
+                   IF ( prunmode == 1 )  THEN
+                      aerosol_mass(c)%init = MAX( 0.0_wp, MAXVAL( pvfOC1a ) )  &
+                                             * pndist(:,b) *  core(b) * arhooc
+                   ENDIF
+                   b = b+1
+                ENDDO 
+             ENDIF
+             
+             prunmode = 3  ! Init only once
+  
+          ENDDO !< k
+       ENDDO !< j
+    ENDDO !< i
+    
+!
+!-- c) Aerosol mass concentrations
+!--    bin subrange 2:
+    IF ( nreg > 1 ) THEN
+    
+       IF ( iso4 > 0 ) THEN
+          CALL set_aero_mass( iso4, pvf2a(:,1), pvf2b(:,1), pnf2a, pndist,     &
+                              core, arhoh2so4 )
+       ENDIF
+       IF ( ioc > 0 ) THEN
+          CALL set_aero_mass( ioc, pvf2a(:,2), pvf2b(:,2), pnf2a, pndist, core,&
+                              arhooc )
+       ENDIF
+       IF ( ibc > 0 ) THEN
+          CALL set_aero_mass( ibc, pvf2a(:,3), pvf2b(:,3), pnf2a, pndist, core,&
+                              arhobc )
+       ENDIF
+       IF ( idu > 0 ) THEN
+          CALL set_aero_mass( idu, pvf2a(:,4), pvf2b(:,4), pnf2a, pndist, core,&
+                              arhodu )
+       ENDIF
+       IF ( iss > 0 ) THEN
+          CALL set_aero_mass( iss, pvf2a(:,5), pvf2b(:,5), pnf2a, pndist, core,&
+                              arhoss )
+       ENDIF
+       IF ( ino > 0 ) THEN
+          CALL set_aero_mass( ino, pvf2a(:,6), pvf2b(:,6), pnf2a, pndist, core,&
+                              arhohno3 )
+       ENDIF
+       IF ( inh > 0 ) THEN
+          CALL set_aero_mass( inh, pvf2a(:,7), pvf2b(:,7), pnf2a, pndist, core,&
+                              arhonh3 )
+       ENDIF
+
+    ENDIF
+    
+ END SUBROUTINE aerosol_init
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Create a lognormal size distribution and discretise to a sectional 
+!> representation.
+!------------------------------------------------------------------------------!
+ SUBROUTINE size_distribution( in_ntot, in_dpg, in_sigma, psd_sect )
+   
+    IMPLICIT NONE
+   
+!-- Log-normal size distribution: modes   
+    REAL(wp), DIMENSION(:), INTENT(in) ::  in_dpg    !< geometric mean diameter 
+                                                     !< (micrometres) 
+    REAL(wp), DIMENSION(:), INTENT(in) ::  in_ntot   !< number conc. (#/cm3)
+    REAL(wp), DIMENSION(:), INTENT(in) ::  in_sigma  !< standard deviation
+    REAL(wp), DIMENSION(:), INTENT(inout) ::  psd_sect !< sectional size 
+                                                       !< distribution
+    INTEGER(iwp) ::  b          !< running index: bin
+    INTEGER(iwp) ::  ib         !< running index: iteration
+    REAL(wp) ::  d1             !< particle diameter (m, dummy)
+    REAL(wp) ::  d2             !< particle diameter (m, dummy)
+    REAL(wp) ::  delta_d        !< (d2-d1)/10                                                      
+    REAL(wp) ::  deltadp        !< bin width 
+    REAL(wp) ::  dmidi          !< ( d1 + d2 ) / 2
+    
+    DO  b = in1a, fn2b !< aerosol size bins
+       psd_sect(b) = 0.0_wp
+!--    Particle diameter at the low limit (largest in the bin) (m)
+       d1 = ( aero(b)%vlolim / api6 ) ** ( 1.0_wp / 3.0_wp )
+!--    Particle diameter at the high limit (smallest in the bin) (m)
+       d2 = ( aero(b)%vhilim / api6 ) ** ( 1.0_wp / 3.0_wp )
+!--    Span of particle diameter in a bin (m)
+       delta_d = ( d2 - d1 ) / 10.0_wp
+!--    Iterate:             
+       DO  ib = 1, 10
+          d1 = ( aero(b)%vlolim / api6 ) ** ( 1.0_wp / 3.0_wp ) + ( ib - 1)    &
+               * delta_d
+          d2 = d1 + delta_d
+          dmidi = ( d1 + d2 ) / 2.0_wp
+          deltadp = LOG10( d2 / d1 )
+          
+!--       Size distribution
+!--       in_ntot = total number, total area, or total volume concentration
+!--       in_dpg = geometric-mean number, area, or volume diameter
+!--       n(k) = number, area, or volume concentration in a bin
+!--       n_lognorm and dpg converted to units of #/m3 and m
+          psd_sect(b) = psd_sect(b) + SUM( in_ntot * 1.0E+6_wp * deltadp /     &
+                     ( SQRT( 2.0_wp * pi ) * LOG10( in_sigma ) ) *             &
+                     EXP( -LOG10( dmidi / ( 1.0E-6_wp * in_dpg ) )**2.0_wp /   &
+                     ( 2.0_wp * LOG10( in_sigma ) ** 2.0_wp ) ) )
+ 
+       ENDDO
+    ENDDO
+   
+ END SUBROUTINE size_distribution
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sets the mass concentrations to aerosol arrays in 2a and 2b.
+!>
+!> Tomi Raatikainen, FMI, 29.2.2016
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_aero_mass( ispec, ppvf2a, ppvf2b, ppnf2a, ppndist, pcore, prho )
+    
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(in) :: ispec  !< Aerosol species index
+    REAL(wp), INTENT(in) ::  pcore(nbins) !< Aerosol bin mid core volume    
+    REAL(wp), INTENT(in) ::  ppndist(0:nz+1,nbins) !< Aerosol size distribution
+    REAL(wp), INTENT(in) ::  ppnf2a(0:nz+1) !< Number fraction for 2a    
+    REAL(wp), INTENT(in) ::  ppvf2a(0:nz+1) !< Mass distributions for a 
+    REAL(wp), INTENT(in) ::  ppvf2b(0:nz+1) !< and b bins    
+    REAL(wp), INTENT(in) ::  prho !< Aerosol density
+    INTEGER(iwp) ::  b  !< loop index 
+    INTEGER(iwp) ::  c  !< loop index        
+    INTEGER(iwp) ::  ee !< index: end 
+    INTEGER(iwp) ::  i  !< loop index 
+    INTEGER(iwp) ::  j  !< loop index 
+    INTEGER(iwp) ::  k  !< loop index
+    INTEGER(iwp) ::  prunmode  !< 1 = initialise
+    INTEGER(iwp) ::  ss !< index: start 
+    REAL(wp) ::  flag   !< flag to mask topography grid points
+    
+    prunmode = 1
+    
+    DO i = nxlg, nxrg 
+       DO j = nysg, nyng
+          DO k = nzb, nzt+1  
+!
+!--          Predetermine flag to mask topography
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) ) 
+!             
+!--          Regime 2a:
+             ss = ( ispec - 1 ) * nbins + in2a
+             ee = ( ispec - 1 ) * nbins + fn2a
+             b = in2a
+             DO c = ss, ee
+                aerosol_mass(c)%conc(k,j,i) = MAX( 0.0_wp, ppvf2a(k) ) *       &
+                               ppnf2a(k) * ppndist(k,b) * pcore(b) * prho * flag
+                IF ( prunmode == 1 )  THEN
+                   aerosol_mass(c)%init = MAX( 0.0_wp, MAXVAL( ppvf2a(:) ) ) * &
+                                          MAXVAL( ppnf2a ) * pcore(b) * prho * &
+                                          MAXVAL( ppndist(:,b) ) 
+                ENDIF
+                b = b+1
+             ENDDO
+!--          Regime 2b:
+             IF ( .NOT. no_insoluble )  THEN
+                ss = ( ispec - 1 ) * nbins + in2b
+                ee = ( ispec - 1 ) * nbins + fn2b
+                b = in2a
+                DO c = ss, ee
+                   aerosol_mass(c)%conc(k,j,i) = MAX( 0.0_wp, ppvf2b(k) ) * (  &
+                                         1.0_wp - ppnf2a(k) ) * ppndist(k,b) * &
+                                         pcore(b) * prho * flag
+                   IF ( prunmode == 1 )  THEN
+                      aerosol_mass(c)%init = MAX( 0.0_wp, MAXVAL( ppvf2b(:) ) )&
+                                        * ( 1.0_wp - MAXVAL( ppnf2a ) ) *      &
+                                        MAXVAL( ppndist(:,b) ) * pcore(b) * prho
+                   ENDIF
+                   b = b+1
+                ENDDO
+             ENDIF
+             prunmode = 3  ! Init only once
+          ENDDO
+       ENDDO
+    ENDDO
+ END SUBROUTINE set_aero_mass
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_swap_timelevel( mod_count )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  mod_count  !<
+    INTEGER(iwp) ::  b  !<    
+    INTEGER(iwp) ::  c  !<    
+    INTEGER(iwp) ::  g  !<
+
+!
+!-- Example for prognostic variable "prog_var"
+#if defined( __nopointer )
+    IF ( myid == 0 )  THEN
+       message_string =  ' SALSA runs only with POINTER Version'
+       CALL message( 'salsa_swap_timelevel', 'SA0022', 1, 2, 0, 6, 0 )
+    ENDIF
+#else
+    
+    SELECT CASE ( mod_count )
+
+       CASE ( 0 )
+
+          DO  b = 1, nbins
+             aerosol_number(b)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)   =>        &
+                nconc_1(:,:,:,b)
+             aerosol_number(b)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg) =>        &
+                nconc_2(:,:,:,b)
+             DO  c = 1, ncc_tot
+                aerosol_mass((c-1)*nbins+b)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  &
+                   => mconc_1(:,:,:,(c-1)*nbins+b)
+                aerosol_mass((c-1)*nbins+b)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)&
+                   => mconc_2(:,:,:,(c-1)*nbins+b)
+             ENDDO
+          ENDDO
+          
+          IF ( .NOT. salsa_gases_from_chem )  THEN
+             DO  g = 1, ngast
+                salsa_gas(g)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)   =>          &
+                   gconc_1(:,:,:,g)
+                salsa_gas(g)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg) =>          &
+                   gconc_2(:,:,:,g)
+             ENDDO
+          ENDIF
+
+       CASE ( 1 )
+
+          DO  b = 1, nbins
+             aerosol_number(b)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)   =>        &
+                nconc_2(:,:,:,b)
+             aerosol_number(b)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg) =>        &
+                nconc_1(:,:,:,b)
+             DO  c = 1, ncc_tot
+                aerosol_mass((c-1)*nbins+b)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  &
+                   => mconc_2(:,:,:,(c-1)*nbins+b)
+                aerosol_mass((c-1)*nbins+b)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)&
+                   => mconc_1(:,:,:,(c-1)*nbins+b)
+             ENDDO
+          ENDDO
+          
+          IF ( .NOT. salsa_gases_from_chem )  THEN
+             DO  g = 1, ngast
+                salsa_gas(g)%conc(nzb:nzt+1,nysg:nyng,nxlg:nxrg)   =>          &
+                   gconc_2(:,:,:,g)
+                salsa_gas(g)%conc_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg) =>          &
+                   gconc_1(:,:,:,g)
+             ENDDO
+          ENDIF
+
+    END SELECT
+#endif
+
+ END SUBROUTINE salsa_swap_timelevel
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data.
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_rrd_local  
+
+    
+    IMPLICIT NONE
+    
+    CHARACTER (LEN=20) :: field_char   !< 
+    INTEGER(iwp) ::  b  !<    
+    INTEGER(iwp) ::  c  !<
+    INTEGER(iwp) ::  g  !<
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  j  !<
+    INTEGER(iwp) ::  k  !<   
+    
+    IF ( read_restart_data_salsa )  THEN
+       READ ( 13 )  field_char
+
+       DO  WHILE ( TRIM( field_char ) /= '*** end salsa ***' )
+       
+          DO b = 1, nbins
+             READ ( 13 )  aero(b)%vlolim
+             READ ( 13 )  aero(b)%vhilim
+             READ ( 13 )  aero(b)%dmid
+             READ ( 13 )  aero(b)%vratiohi
+             READ ( 13 )  aero(b)%vratiolo
+          ENDDO
+
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO k = nzb+1, nzt
+                   DO  b = 1, nbins
+                      READ ( 13 )  aerosol_number(b)%conc(k,j,i)
+                      DO  c = 1, ncc_tot
+                         READ ( 13 )  aerosol_mass((c-1)*nbins+b)%conc(k,j,i)
+                      ENDDO
+                   ENDDO
+                   IF ( .NOT. salsa_gases_from_chem )  THEN
+                      DO  g = 1, ngast
+                         READ ( 13 )  salsa_gas(g)%conc(k,j,i)
+                      ENDDO 
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+          READ ( 13 )  field_char
+
+       ENDDO
+       
+    ENDIF
+
+ END SUBROUTINE salsa_rrd_local
+    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data.
+!> Note that the following input variables in PARIN have to be equal between
+!> restart runs:
+!>    listspec, nbin, nbin2, nf2a, ncc, mass_fracs_a, mass_fracs_b
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_wrd_local
+
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  b  !<    
+    INTEGER(iwp) ::  c  !<
+    INTEGER(iwp) ::  g  !<
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  j  !<
+    INTEGER(iwp) ::  k  !<
+    
+    IF ( write_binary  .AND.  write_binary_salsa )  THEN
+       
+       DO b = 1, nbins
+          WRITE ( 14 )  aero(b)%vlolim
+          WRITE ( 14 )  aero(b)%vhilim
+          WRITE ( 14 )  aero(b)%dmid
+          WRITE ( 14 )  aero(b)%vratiohi
+          WRITE ( 14 )  aero(b)%vratiolo
+       ENDDO
+       
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                DO  b = 1, nbins
+                   WRITE ( 14 )  aerosol_number(b)%conc(k,j,i)
+                   DO  c = 1, ncc_tot
+                      WRITE ( 14 )  aerosol_mass((c-1)*nbins+b)%conc(k,j,i)
+                   ENDDO
+                ENDDO
+                IF ( .NOT. salsa_gases_from_chem )  THEN
+                   DO  g = 1, ngast
+                      WRITE ( 14 )  salsa_gas(g)%conc(k,j,i)
+                   ENDDO 
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+       
+       WRITE ( 14 )  '*** end salsa ***   '
+          
+    ENDIF
+       
+ END SUBROUTINE salsa_wrd_local   
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Performs necessary unit and dimension conversion between the host model and 
+!> SALSA module, and calls the main SALSA routine.
+!> Partially adobted form the original SALSA boxmodel version.
+!> Now takes masses in as kg/kg from LES!! Converted to m3/m3 for SALSA
+!> 05/2016 Juha: This routine is still pretty much in its original shape. 
+!>               It's dumb as a mule and twice as ugly, so implementation of
+!>               an improved solution is necessary sooner or later.
+!> Juha Tonttila, FMI, 2014
+!> Jaakko Ahola, FMI, 2016
+!> Only aerosol processes included, Mona Kurppa, UHel, 2017
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_driver( i, j, prunmode )
+
+    USE arrays_3d,                                                             &
+        ONLY: pt_p, q_p, rho_air_zw, u, v, w
+        
+    USE plant_canopy_model_mod,                                                &
+        ONLY: lad_s
+        
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,     &
+               surf_usm_v
+ 
+    IMPLICIT NONE
+    
+    INTEGER(iwp), INTENT(in) ::  i   !< loop index
+    INTEGER(iwp), INTENT(in) ::  j   !< loop index
+    INTEGER(iwp), INTENT(in) ::  prunmode !< 1: Initialization call
+                                          !< 2: Spinup period call
+                                          !< 3: Regular runtime call
+!-- Local variables
+    TYPE(t_section), DIMENSION(fn2b) ::  aero_old !< helper array 
+    INTEGER(iwp) ::  bb     !< loop index
+    INTEGER(iwp) ::  cc     !< loop index
+    INTEGER(iwp) ::  endi   !< end index
+    INTEGER(iwp) ::  k_wall !< vertical index of topography top
+    INTEGER(iwp) ::  k      !< loop index
+    INTEGER(iwp) ::  l      !< loop index
+    INTEGER(iwp) ::  nc_h2o !< index of H2O in the prtcl index table 
+    INTEGER(iwp) ::  ss     !< loop index
+    INTEGER(iwp) ::  str    !< start index
+    INTEGER(iwp) ::  vc     !< default index in prtcl
+    REAL(wp) ::  cw_old     !< previous H2O mixing ratio 
+    REAL(wp) ::  flag       !< flag to mask topography grid points
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_adn !< air density (kg/m3)    
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_cs  !< H2O sat. vapour conc.
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_cw  !< H2O vapour concentration
+    REAL(wp) ::  in_lad                       !< leaf area density (m2/m3)
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_p   !< pressure (Pa)     
+    REAL(wp) ::  in_rh                        !< relative humidity                     
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_t   !< temperature (K)
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_u   !< wind magnitude (m/s) 
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  kvis   !< kinematic viscosity of air(m2/s)                                            
+    REAL(wp), DIMENSION(nzb:nzt+1,fn2b) ::  Sc      !< particle Schmidt number    
+    REAL(wp), DIMENSION(nzb:nzt+1,fn2b) ::  vd      !< particle fall seed (m/s,
+                                                    !< sedimentation velocity)
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  ppm_to_nconc !< Conversion factor 
+                                                    !< from ppm to #/m3                                                     
+    REAL(wp) ::  zgso4  !< SO4
+    REAL(wp) ::  zghno3 !< HNO3
+    REAL(wp) ::  zgnh3  !< NH3
+    REAL(wp) ::  zgocnv !< non-volatile OC
+    REAL(wp) ::  zgocsv !< semi-volatile OC 
+    
+    aero_old(:)%numc = 0.0_wp
+    in_adn           = 0.0_wp    
+    in_cs            = 0.0_wp
+    in_cw            = 0.0_wp 
+    in_lad           = 0.0_wp
+    in_rh            = 0.0_wp
+    in_p             = 0.0_wp 
+    in_t             = 0.0_wp 
+    in_u             = 0.0_wp
+    kvis             = 0.0_wp
+    Sc               = 0.0_wp
+    vd               = 0.0_wp
+    ppm_to_nconc     = 1.0_wp
+    zgso4            = nclim
+    zghno3           = nclim
+    zgnh3            = nclim
+    zgocnv           = nclim
+    zgocsv           = nclim
+    
+!       
+!-- Aerosol number is always set, but mass can be uninitialized
+    DO cc = 1, nbins
+       aero(cc)%volc     = 0.0_wp
+       aero_old(cc)%volc = 0.0_wp
+    ENDDO 
+!    
+!-- Set the salsa runtime config (How to make this more efficient?)
+    CALL set_salsa_runtime( prunmode )
+!             
+!-- Calculate thermodynamic quantities needed in SALSA
+    CALL salsa_thrm_ij( i, j, p_ij=in_p, temp_ij=in_t, cw_ij=in_cw,            &
+                        cs_ij=in_cs, adn_ij=in_adn )
+!
+!-- Magnitude of wind: needed for deposition
+    IF ( lsdepo )  THEN
+       in_u(nzb+1:nzt) = SQRT(                                                 &
+                   ( 0.5_wp * ( u(nzb+1:nzt,j,i) + u(nzb+1:nzt,j,i+1) ) )**2 + &  
+                   ( 0.5_wp * ( v(nzb+1:nzt,j,i) + v(nzb+1:nzt,j+1,i) ) )**2 + &
+                   ( 0.5_wp * ( w(nzb:nzt-1,j,i) + w(nzb+1:nzt,j,  i) ) )**2 )
+    ENDIF
+!
+!-- Calculate conversion factors for gas concentrations
+    ppm_to_nconc = for_ppm_to_nconc * in_p / in_t
+!
+!-- Determine topography-top index on scalar grid
+    k_wall = MAXLOC( MERGE( 1, 0, BTEST( wall_flags_0(:,j,i), 12 ) ),          &
+                     DIM = 1 ) - 1     
+               
+    DO k = nzb+1, nzt
+!
+!--    Predetermine flag to mask topography
+       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!       
+!--    Do not run inside buildings        
+       IF ( flag == 0.0_wp )  CYCLE   
+!
+!--    Wind velocity for dry depositon on vegetation   
+       IF ( lsdepo_vege  .AND.  plant_canopy  )  THEN
+          in_lad = lad_s(k-k_wall,j,i)
+       ENDIF       
+!
+!--    For initialization and spinup, limit the RH with the parameter rhlim
+       IF ( prunmode < 3 ) THEN
+          in_cw(k) = MIN( in_cw(k), in_cs(k) * rhlim )
+       ELSE
+          in_cw(k) = in_cw(k)
+       ENDIF
+       cw_old = in_cw(k) !* in_adn(k)
+!                
+!--    Set volume concentrations:
+!--    Sulphate (SO4) or sulphuric acid H2SO4 
+       IF ( iso4 > 0 )  THEN
+          vc = 1
+          str = ( iso4-1 ) * nbins + 1    ! start index
+          endi = iso4 * nbins             ! end index
+          cc = 1
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhoh2so4
+             cc = cc+1
+          ENDDO
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+       
+!--    Organic carbon (OC) compounds
+       IF ( ioc > 0 )  THEN
+          vc = 2
+          str = ( ioc-1 ) * nbins + 1
+          endi = ioc * nbins
+          cc = 1
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhooc 
+             cc = cc+1
+          ENDDO
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+       
+!--    Black carbon (BC)
+       IF ( ibc > 0 )  THEN
+          vc = 3
+          str = ( ibc-1 ) * nbins + 1 + fn1a
+          endi = ibc * nbins
+          cc = 1 + fn1a
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhobc 
+             cc = cc+1
+          ENDDO                   
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+
+!--    Dust (DU)
+       IF ( idu > 0 )  THEN
+          vc = 4
+          str = ( idu-1 ) * nbins + 1 + fn1a
+          endi = idu * nbins
+          cc = 1 + fn1a
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhodu 
+             cc = cc+1
+          ENDDO
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+
+!--    Sea salt (SS)
+       IF ( iss > 0 )  THEN
+          vc = 5
+          str = ( iss-1 ) * nbins + 1 + fn1a
+          endi = iss * nbins
+          cc = 1 + fn1a
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhoss  
+             cc = cc+1
+          ENDDO
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+
+!--    Nitrate (NO(3-)) or nitric acid HNO3
+       IF ( ino > 0 )  THEN
+          vc = 6
+          str = ( ino-1 ) * nbins + 1 
+          endi = ino * nbins
+          cc = 1
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhohno3 
+             cc = cc+1
+          ENDDO
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+
+!--    Ammonium (NH(4+)) or ammonia NH3
+       IF ( inh > 0 )  THEN
+          vc = 7
+          str = ( inh-1 ) * nbins + 1
+          endi = inh * nbins
+          cc = 1
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhonh3  
+             cc = cc+1
+          ENDDO
+          aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+       ENDIF
+
+!--    Water (always used)
+       nc_h2o = get_index( prtcl,'H2O' )
+       vc = 8
+       str = ( nc_h2o-1 ) * nbins + 1
+       endi = nc_h2o * nbins
+       cc = 1
+       IF ( advect_particle_water )  THEN
+          DO ss = str, endi
+             aero(cc)%volc(vc) = aerosol_mass(ss)%conc(k,j,i) / arhoh2o 
+             cc = cc+1
+          ENDDO
+       ELSE
+         aero(1:nbins)%volc(vc) = mclim 
+       ENDIF
+       aero_old(1:nbins)%volc(vc) = aero(1:nbins)%volc(vc)
+!
+!--    Number concentrations (numc) and particle sizes 
+!--    (dwet = wet diameter, core = dry volume)
+       DO  bb = 1, nbins
+          aero(bb)%numc = aerosol_number(bb)%conc(k,j,i)  
+          aero_old(bb)%numc = aero(bb)%numc
+          IF ( aero(bb)%numc > nclim )  THEN
+             aero(bb)%dwet = ( SUM( aero(bb)%volc(:) ) / aero(bb)%numc / api6 )&
+                                **( 1.0_wp / 3.0_wp )
+             aero(bb)%core = SUM( aero(bb)%volc(1:7) ) / aero(bb)%numc 
+          ELSE
+             aero(bb)%dwet = aero(bb)%dmid
+             aero(bb)%core = api6 * ( aero(bb)%dwet ) ** 3.0_wp
+          ENDIF
+       ENDDO
+!       
+!--    On EACH call of salsa_driver, calculate the ambient sizes of 
+!--    particles by equilibrating soluble fraction of particles with water
+!--    using the ZSR method.
+       in_rh = in_cw(k) / in_cs(k)
+       IF ( prunmode==1  .OR.  .NOT. advect_particle_water )  THEN
+          CALL equilibration( in_rh, in_t(k), aero, .TRUE. )
+       ENDIF
+!
+!--    Gaseous tracer concentrations in #/m3
+       IF ( salsa_gases_from_chem )  THEN       
+!       
+!--       Convert concentrations in ppm to #/m3
+          zgso4  = chem_species(gas_index_chem(1))%conc(k,j,i) * ppm_to_nconc(k)
+          zghno3 = chem_species(gas_index_chem(2))%conc(k,j,i) * ppm_to_nconc(k)
+          zgnh3  = chem_species(gas_index_chem(3))%conc(k,j,i) * ppm_to_nconc(k)
+          zgocnv = chem_species(gas_index_chem(4))%conc(k,j,i) * ppm_to_nconc(k)     
+          zgocsv = chem_species(gas_index_chem(5))%conc(k,j,i) * ppm_to_nconc(k)                 
+       ELSE
+          zgso4  = salsa_gas(1)%conc(k,j,i) 
+          zghno3 = salsa_gas(2)%conc(k,j,i) 
+          zgnh3  = salsa_gas(3)%conc(k,j,i) 
+          zgocnv = salsa_gas(4)%conc(k,j,i) 
+          zgocsv = salsa_gas(5)%conc(k,j,i)
+       ENDIF    
+!
+!--    ***************************************!
+!--                   Run SALSA               !
+!--    ***************************************!
+       CALL run_salsa( in_p(k), in_cw(k), in_cs(k), in_t(k), in_u(k),          &
+                       in_adn(k), in_lad, zgso4, zgocnv, zgocsv, zghno3, zgnh3,&
+                       aero, prtcl, kvis(k), Sc(k,:), vd(k,:), dt_salsa )
+!--    ***************************************!
+       IF ( lsdepo ) sedim_vd(k,j,i,:) = vd(k,:)
+!                            
+!--    Calculate changes in concentrations
+       DO bb = 1, nbins
+          aerosol_number(bb)%conc(k,j,i) = aerosol_number(bb)%conc(k,j,i)      &
+                                 +  ( aero(bb)%numc - aero_old(bb)%numc ) * flag
+       ENDDO
+       
+       IF ( iso4 > 0 )  THEN
+          vc = 1
+          str = ( iso4-1 ) * nbins + 1
+          endi = iso4 * nbins
+          cc = 1
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhoh2so4 * flag
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( ioc > 0 )  THEN
+          vc = 2
+          str = ( ioc-1 ) * nbins + 1
+          endi = ioc * nbins
+          cc = 1
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhooc * flag
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( ibc > 0 )  THEN
+          vc = 3
+          str = ( ibc-1 ) * nbins + 1 + fn1a
+          endi = ibc * nbins
+          cc = 1 + fn1a
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhobc * flag 
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( idu > 0 )  THEN
+          vc = 4
+          str = ( idu-1 ) * nbins + 1 + fn1a
+          endi = idu * nbins
+          cc = 1 + fn1a
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhodu * flag
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( iss > 0 )  THEN
+          vc = 5
+          str = ( iss-1 ) * nbins + 1 + fn1a
+          endi = iss * nbins
+          cc = 1 + fn1a
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhoss * flag
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( ino > 0 )  THEN
+          vc = 6
+          str = ( ino-1 ) * nbins + 1
+          endi = ino * nbins
+          cc = 1
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhohno3 * flag
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( inh > 0 )  THEN
+          vc = 7
+          str = ( ino-1 ) * nbins + 1
+          endi = ino * nbins
+          cc = 1
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhonh3 * flag
+             cc = cc+1
+          ENDDO
+       ENDIF
+       
+       IF ( advect_particle_water )  THEN
+          nc_h2o = get_index( prtcl,'H2O' )
+          vc = 8
+          str = ( nc_h2o-1 ) * nbins + 1
+          endi = nc_h2o * nbins
+          cc = 1
+          DO ss = str, endi
+             aerosol_mass(ss)%conc(k,j,i) = aerosol_mass(ss)%conc(k,j,i)       &
+                               + ( aero(cc)%volc(vc) - aero_old(cc)%volc(vc) ) &
+                               * arhoh2o * flag
+             IF ( prunmode == 1 )  THEN
+                aerosol_mass(ss)%init(k) = MAX( aerosol_mass(ss)%init(k),      &
+                                               aerosol_mass(ss)%conc(k,j,i) )
+             ENDIF
+             cc = cc+1                              
+          ENDDO
+       ENDIF
+
+!--    Condensation of precursor gases
+       IF ( lscndgas )  THEN
+          IF ( salsa_gases_from_chem )  THEN          
+!          
+!--          SO4 (or H2SO4)
+             chem_species( gas_index_chem(1) )%conc(k,j,i) =                &
+                            chem_species( gas_index_chem(1) )%conc(k,j,i) + &
+                                                  ( zgso4 / ppm_to_nconc(k) - &
+                       chem_species( gas_index_chem(1) )%conc(k,j,i) ) * flag
+!                            
+!--          HNO3
+             chem_species( gas_index_chem(2) )%conc(k,j,i) =                &
+                            chem_species( gas_index_chem(2) )%conc(k,j,i) + &
+                                                 ( zghno3 / ppm_to_nconc(k) - &
+                       chem_species( gas_index_chem(2) )%conc(k,j,i) ) * flag
+!                           
+!--          NH3
+             chem_species( gas_index_chem(3) )%conc(k,j,i) =                &
+                            chem_species( gas_index_chem(3) )%conc(k,j,i) + &
+                                                  ( zgnh3 / ppm_to_nconc(k) - &
+                       chem_species( gas_index_chem(3) )%conc(k,j,i) ) * flag
+!                            
+!--          non-volatile OC
+             chem_species( gas_index_chem(4) )%conc(k,j,i) =                &
+                            chem_species( gas_index_chem(4) )%conc(k,j,i) + &
+                                                 ( zgocnv / ppm_to_nconc(k) - &
+                       chem_species( gas_index_chem(4) )%conc(k,j,i) ) * flag
+!                           
+!--          semi-volatile OC
+             chem_species( gas_index_chem(5) )%conc(k,j,i) =                &
+                            chem_species( gas_index_chem(5) )%conc(k,j,i) + &
+                                                 ( zgocsv / ppm_to_nconc(k) - &
+                       chem_species( gas_index_chem(5) )%conc(k,j,i) ) * flag                 
+          
+          ELSE
+!          
+!--          SO4 (or H2SO4)
+             salsa_gas(1)%conc(k,j,i) = salsa_gas(1)%conc(k,j,i) + ( zgso4 -   &
+                                          salsa_gas(1)%conc(k,j,i) ) * flag
+!                            
+!--          HNO3
+             salsa_gas(2)%conc(k,j,i) = salsa_gas(2)%conc(k,j,i) + ( zghno3 -  &
+                                          salsa_gas(2)%conc(k,j,i) ) * flag
+!                           
+!--          NH3
+             salsa_gas(3)%conc(k,j,i) = salsa_gas(3)%conc(k,j,i) + ( zgnh3 -   &
+                                          salsa_gas(3)%conc(k,j,i) ) * flag
+!                            
+!--          non-volatile OC
+             salsa_gas(4)%conc(k,j,i) = salsa_gas(4)%conc(k,j,i) + ( zgocnv -  &
+                                          salsa_gas(4)%conc(k,j,i) ) * flag
+!                           
+!--          semi-volatile OC
+             salsa_gas(5)%conc(k,j,i) = salsa_gas(5)%conc(k,j,i) + ( zgocsv -  &
+                                          salsa_gas(5)%conc(k,j,i) ) * flag
+          ENDIF
+       ENDIF
+!                
+!--    Tendency of water vapour mixing ratio is obtained from the 
+!--    change in RH during SALSA run. This releases heat and changes pt.
+!--    Assumes no temperature change during SALSA run.
+!--    q = r / (1+r), Euler method for integration
+!
+       IF ( feedback_to_palm )  THEN
+          q_p(k,j,i) = q_p(k,j,i) + 1.0_wp / ( in_cw(k) * in_adn(k) + 1.0_wp ) &
+                       ** 2.0_wp * ( in_cw(k) - cw_old ) * in_adn(k) 
+          pt_p(k,j,i) = pt_p(k,j,i) + alv / c_p * ( in_cw(k) - cw_old ) *      &
+                        in_adn(k) / ( in_cw(k) / in_adn(k) + 1.0_wp ) ** 2.0_wp&
+                        * pt_p(k,j,i) / in_t(k)
+       ENDIF
+                         
+    ENDDO   ! k
+!    
+!-- Set surfaces and wall fluxes due to deposition  
+    IF ( lsdepo_topo  .AND.  prunmode == 3 )  THEN 
+       IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
+          CALL depo_topo( i, j, surf_def_h(0), vd, Sc, kvis, in_u, rho_air_zw )
+          DO  l = 0, 3
+             CALL depo_topo( i, j, surf_def_v(l), vd, Sc, kvis, in_u,          &
+                             rho_air_zw**0.0_wp )
+          ENDDO
+       ELSE
+          CALL depo_topo( i, j, surf_usm_h, vd, Sc, kvis, in_u, rho_air_zw )
+          DO  l = 0, 3
+             CALL depo_topo( i, j, surf_usm_v(l), vd, Sc, kvis, in_u,          &
+                             rho_air_zw**0.0_wp )
+          ENDDO
+          CALL depo_topo( i, j, surf_lsm_h, vd, Sc, kvis, in_u, rho_air_zw )
+          DO  l = 0, 3
+             CALL depo_topo( i, j, surf_lsm_v(l), vd, Sc, kvis, in_u,          &
+                             rho_air_zw**0.0_wp )
+          ENDDO
+       ENDIF
+    ENDIF
+    
+ END SUBROUTINE salsa_driver
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The SALSA subroutine
+!> Modified for the new aerosol datatype,
+!> Juha Tonttila, FMI, 2014.
+!> Only aerosol processes included, Mona Kurppa, UHel, 2017
+!------------------------------------------------------------------------------!    
+ SUBROUTINE run_salsa( ppres, pcw, pcs, ptemp, mag_u, adn, lad, pc_h2so4,      &
+                       pc_ocnv, pc_ocsv, pc_hno3, pc_nh3, paero, prtcl, kvis,  &
+                       Sc, vc, ptstep )
+
+    IMPLICIT NONE
+!
+!-- Input parameters and variables 
+    REAL(wp), INTENT(in) ::  adn    !< air density (kg/m3)
+    REAL(wp), INTENT(in) ::  lad    !< leaf area density (m2/m3)
+    REAL(wp), INTENT(in) ::  mag_u  !< magnitude of wind (m/s)
+    REAL(wp), INTENT(in) ::  ppres  !< atmospheric pressure at each grid 
+                                    !< point (Pa)
+    REAL(wp), INTENT(in) ::  ptemp  !< temperature at each grid point (K)
+    REAL(wp), INTENT(in) ::  ptstep !< time step of salsa processes (s)
+    TYPE(component_index), INTENT(in) :: prtcl  !< part. component index table
+!       
+!-- Input variables that are changed within:
+    REAL(wp), INTENT(inout) ::  kvis     !< kinematic viscosity of air (m2/s)
+    REAL(wp), INTENT(inout) ::  Sc(:)    !< particle Schmidt number
+    REAL(wp), INTENT(inout) ::  vc(:)    !< particle fall speed (m/s, 
+                                         !< sedimentation velocity)
+!-- Gas phase concentrations at each grid point (#/m3)
+    REAL(wp), INTENT(inout) ::  pc_h2so4 !< sulphuric acid
+    REAL(wp), INTENT(inout) ::  pc_hno3  !< nitric acid
+    REAL(wp), INTENT(inout) ::  pc_nh3   !< ammonia
+    REAL(wp), INTENT(inout) ::  pc_ocnv  !< nonvolatile OC
+    REAL(wp), INTENT(inout) ::  pc_ocsv  !< semivolatile OC
+    REAL(wp), INTENT(inout) ::  pcs      !< Saturation concentration of water
+                                         !< vapour (kg/m3)
+    REAL(wp), INTENT(inout) ::  pcw      !< Water vapour concentration (kg/m3)                                                   
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b) 
+!
+!-- Coagulation
+    IF ( lscoag )   THEN
+       CALL coagulation( paero, ptstep, ptemp, ppres )
+    ENDIF
+!
+!-- Condensation
+    IF ( lscnd )   THEN
+       CALL condensation( paero, pc_h2so4, pc_ocnv, pc_ocsv,  pc_hno3, pc_nh3, &
+                          pcw, pcs, ptemp, ppres, ptstep, prtcl )
+    ENDIF   
+!    
+!-- Deposition
+    IF ( lsdepo )  THEN
+       CALL deposition( paero, ptemp, adn, mag_u, lad, kvis, Sc, vc ) 
+    ENDIF        
+!
+!-- Size distribution bin update
+!-- Mona: why done 3 times in SALSA-standalone?
+    IF ( lsdistupdate )   THEN
+       CALL distr_update( paero )
+    ENDIF
+    
+  END SUBROUTINE run_salsa 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Set logical switches according to the host model state and user-specified 
+!> NAMELIST options.
+!> Juha Tonttila, FMI, 2014
+!> Only aerosol processes included, Mona Kurppa, UHel, 2017
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_salsa_runtime( prunmode )
+ 
+    IMPLICIT NONE
+    
+    INTEGER(iwp), INTENT(in) ::  prunmode
+    
+    SELECT CASE(prunmode)
+
+       CASE(1) !< Initialization
+          lscoag       = .FALSE.
+          lscnd        = .FALSE.
+          lscndgas     = .FALSE.
+          lscndh2oae   = .FALSE.
+          lsdepo       = .FALSE.
+          lsdepo_vege  = .FALSE.
+          lsdepo_topo  = .FALSE.
+          lsdistupdate = .TRUE.
+
+       CASE(2)  !< Spinup period
+          lscoag      = ( .FALSE. .AND. nlcoag   )
+          lscnd       = ( .TRUE.  .AND. nlcnd    )
+          lscndgas    = ( .TRUE.  .AND. nlcndgas )
+          lscndh2oae  = ( .TRUE.  .AND. nlcndh2oae )
+
+       CASE(3)  !< Run
+          lscoag       = nlcoag
+          lscnd        = nlcnd
+          lscndgas     = nlcndgas
+          lscndh2oae   = nlcndh2oae
+          lsdepo       = nldepo
+          lsdepo_vege  = nldepo_vege
+          lsdepo_topo  = nldepo_topo
+          lsdistupdate = nldistupdate
+
+    END SELECT
+
+
+ END SUBROUTINE set_salsa_runtime 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the absolute temperature (using hydrostatic pressure), saturation 
+!> vapour pressure and mixing ratio over water, relative humidity and air 
+!> density needed in the SALSA model. 
+!> NOTE, no saturation adjustment takes place -> the resulting water vapour 
+!> mixing ratio can be supersaturated, allowing the microphysical calculations
+!> in SALSA.
+!
+!> Juha Tonttila, FMI, 2014 (original SALSAthrm)
+!> Mona Kurppa, UHel, 2017 (adjustment for PALM and only aerosol processes)
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_thrm_ij( i, j, p_ij, temp_ij, cw_ij, cs_ij, adn_ij )
+ 
+    USE arrays_3d,                                                             &
+        ONLY: p, pt, q, zu
+        
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  barometric_formula, exner_function, ideal_gas_law_rho, magnus 
+        
+    USE control_parameters,                                                    &
+        ONLY: pt_surface, surface_pressure
+        
+    IMPLICIT NONE
+   
+    INTEGER(iwp), INTENT(in) ::  i
+    INTEGER(iwp), INTENT(in) ::  j 
+    REAL(wp), DIMENSION(:), INTENT(inout) ::  adn_ij
+    REAL(wp), DIMENSION(:), INTENT(inout) ::  p_ij        
+    REAL(wp), DIMENSION(:), INTENT(inout) ::  temp_ij
+    REAL(wp), DIMENSION(:), INTENT(inout), OPTIONAL ::  cw_ij
+    REAL(wp), DIMENSION(:), INTENT(inout), OPTIONAL ::  cs_ij 
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  e_s !< saturation vapour pressure 
+                                           !< over water (Pa)
+    REAL(wp) ::  t_surface !< absolute surface temperature (K)
+!
+!-- Pressure p_ijk (Pa) = hydrostatic pressure + perturbation pressure (p)
+    t_surface = pt_surface * exner_function( surface_pressure )
+    p_ij(:) = 100.0_wp * barometric_formula( zu, t_surface, surface_pressure ) &
+              + p(:,j,i)
+!             
+!-- Absolute ambient temperature (K)
+    temp_ij(:) = pt(:,j,i) * exner_function( p_ij(:) )        
+!
+!-- Air density 
+    adn_ij(:) = ideal_gas_law_rho( p_ij(:), temp_ij(:) )
+!
+!-- Water vapour concentration r_v (kg/m3)
+    IF ( PRESENT( cw_ij ) )  THEN
+       cw_ij(:) = ( q(:,j,i) / ( 1.0_wp - q(:,j,i) ) ) * adn_ij(:) 
+    ENDIF
+!
+!-- Saturation mixing ratio r_s (kg/kg) from vapour pressure at temp (Pa)
+    IF ( PRESENT( cs_ij ) )  THEN
+       e_s(:) = magnus( temp_ij(:) ) 
+       cs_ij(:) = ( 0.622_wp * e_s / ( p_ij(:) - e_s(:) ) ) * adn_ij(:)  
+    ENDIF
+    
+ END SUBROUTINE salsa_thrm_ij 
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates ambient sizes of particles by equilibrating soluble fraction of 
+!> particles with water using the ZSR method (Stokes and Robinson, 1966).
+!> Method:
+!> Following chemical components are assumed water-soluble
+!> - (ammonium) sulphate (100%)
+!> - sea salt (100 %)
+!> - organic carbon (epsoc * 100%) 
+!> Exact thermodynamic considerations neglected.
+!> - If particles contain no sea salt, calculation according to sulphate 
+!>   properties
+!> - If contain sea salt but no sulphate, calculation according to sea salt 
+!>   properties
+!> - If contain both sulphate and sea salt -> the molar fraction of these 
+!>   compounds determines which one of them is used as the basis of calculation.
+!> If sulphate and sea salt coexist in a particle, it is assumed that the Cl is 
+!> replaced by sulphate; thus only either sulphate + organics or sea salt + 
+!> organics is included in the calculation of soluble fraction.
+!> Molality parameterizations taken from Table 1 of Tang: Thermodynamic and 
+!> optical properties of mixed-salt aerosols of atmospheric importance, 
+!> J. Geophys. Res., 102 (D2), 1883-1893 (1997)
+!
+!> Coded by:
+!> Hannele Korhonen (FMI) 2005 
+!> Harri Kokkola (FMI) 2006
+!> Matti Niskanen(FMI) 2012
+!> Anton Laakso  (FMI) 2013
+!> Modified for the new aerosol datatype, Juha Tonttila (FMI) 2014
+!
+!> fxm: should sea salt form a solid particle when prh is very low (even though 
+!> it could be mixed with e.g. sulphate)?
+!> fxm: crashes if no sulphate or sea salt
+!> fxm: do we really need to consider Kelvin effect for subrange 2
+!------------------------------------------------------------------------------!      
+ SUBROUTINE equilibration( prh, ptemp, paero, init )
+     
+    IMPLICIT NONE
+!
+!-- Input variables
+    LOGICAL, INTENT(in) ::  init   !< TRUE: Initialization call
+                                   !< FALSE: Normal runtime: update water 
+                                   !<        content only for 1a
+    REAL(wp), INTENT(in) ::  prh   !< relative humidity [0-1]
+    REAL(wp), INTENT(in) ::  ptemp !< temperature (K)
+!
+!-- Output variables 
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b)     
+!
+!-- Local
+    INTEGER(iwp) :: b      !< loop index
+    INTEGER(iwp) :: counti  !< loop index
+    REAL(wp) ::  zaw        !< water activity [0-1]        
+    REAL(wp) ::  zbinmol(7) !< binary molality of each components (mol/kg)
+    REAL(wp) ::  zcore      !< Volume of dry particle    
+    REAL(wp) ::  zdold      !< Old diameter
+    REAL(wp) ::  zdwet      !< Wet diameter or mean droplet diameter
+    REAL(wp) ::  zke        !< Kelvin term in the KÃ¶hler equation
+    REAL(wp) ::  zlwc       !< liquid water content [kg/m3-air]
+    REAL(wp) ::  zrh        !< Relative humidity
+    REAL(wp) ::  zvpart(7)  !< volume of chem. compounds in one particle 
+    
+    zaw       = 0.0_wp
+    zbinmol   = 0.0_wp
+    zcore     = 0.0_wp
+    zdold     = 0.0_wp
+    zdwet     = 0.0_wp
+    zlwc      = 0.0_wp
+    zrh       = 0.0_wp
+    
+!                
+!-- Relative humidity:
+    zrh = prh
+    zrh = MAX( zrh, 0.05_wp )
+    zrh = MIN( zrh, 0.98_wp)    
+!
+!-- 1) Regime 1: sulphate and partly water-soluble OC. Done for every CALL
+    DO  b = in1a, fn1a   ! size bin
+          
+       zbinmol = 0.0_wp
+       zdold   = 1.0_wp  
+       zke     = 1.02_wp
+        
+       IF ( paero(b)%numc > nclim )  THEN
+!
+!--       Volume in one particle
+          zvpart = 0.0_wp
+          zvpart(1:2) = paero(b)%volc(1:2) / paero(b)%numc
+          zvpart(6:7) = paero(b)%volc(6:7) / paero(b)%numc
+!                
+!--       Total volume and wet diameter of one dry particle 
+          zcore = SUM( zvpart(1:2) )
+          zdwet = paero(b)%dwet
+          
+          counti = 0
+          DO  WHILE ( ABS( zdwet / zdold - 1.0_wp ) > 1.0E-2_wp ) 
+          
+             zdold = MAX( zdwet, 1.0E-20_wp )
+             zaw = MAX( 1.0E-3_wp, zrh / zke ) ! To avoid underflow
+!                   
+!--          Binary molalities (mol/kg): 
+!--          Sulphate
+             zbinmol(1) = 1.1065495E+2_wp - 3.6759197E+2_wp * zaw              &
+                                          + 5.0462934E+2_wp * zaw**2.0_wp      &
+                                          - 3.1543839E+2_wp * zaw**3.0_wp      &
+                                          + 6.770824E+1_wp  * zaw**4.0_wp 
+!--          Organic carbon                     
+             zbinmol(2) = 1.0_wp / ( zaw * amh2o ) - 1.0_wp / amh2o 
+!--          Nitric acid                              
+             zbinmol(6) = 2.306844303E+1_wp - 3.563608869E+1_wp * zaw          &
+                                            - 6.210577919E+1_wp * zaw**2.0_wp  &
+                                            + 5.510176187E+2_wp * zaw**3.0_wp  &
+                                            - 1.460055286E+3_wp * zaw**4.0_wp  &
+                                            + 1.894467542E+3_wp * zaw**5.0_wp  &
+                                            - 1.220611402E+3_wp * zaw**6.0_wp  &
+                                            + 3.098597737E+2_wp * zaw**7.0_wp 
+! 
+!--          Calculate the liquid water content (kg/m3-air) using ZSR (see e.g. 
+!--          Eq. 10.98 in Seinfeld and Pandis (2006))
+             zlwc = ( paero(b)%volc(1) * ( arhoh2so4 / amh2so4 ) ) /           &
+                    zbinmol(1) + epsoc * paero(b)%volc(2) * ( arhooc / amoc )  &
+                    / zbinmol(2) + ( paero(b)%volc(6) * ( arhohno3/amhno3 ) )  &
+                    / zbinmol(6)
+!                            
+!--          Particle wet diameter (m) 
+             zdwet = ( zlwc / paero(b)%numc / arhoh2o / api6 +                 &
+                     ( SUM( zvpart(6:7) ) / api6 ) +      &
+                       zcore / api6 )**( 1.0_wp / 3.0_wp )
+!                             
+!--          Kelvin effect (Eq. 10.85 in in Seinfeld and Pandis (2006)). Avoid 
+!--          overflow.
+             zke = EXP( MIN( 50.0_wp,                                          &
+                       4.0_wp * surfw0 * amvh2so4 / ( abo * ptemp *  zdwet ) ) )
+             
+             counti = counti + 1
+             IF ( counti > 1000 )  THEN 
+                message_string = 'Subrange 1: no convergence!'
+                CALL message( 'salsa_mod: equilibration', 'SA0042',            &
+                              1, 2, 0, 6, 0 )
+             ENDIF
+          ENDDO
+!                
+!--       Instead of lwc, use the volume concentration of water from now on 
+!--       (easy to convert...)
+          paero(b)%volc(8) = zlwc / arhoh2o
+!                
+!--       If this is initialization, update the core and wet diameter
+          IF ( init )  THEN
+             paero(b)%dwet = zdwet
+             paero(b)%core = zcore
+          ENDIF
+          
+       ELSE
+!--       If initialization
+!--       1.2) empty bins given bin average values  
+          IF ( init )  THEN
+             paero(b)%dwet = paero(b)%dmid
+             paero(b)%core = api6 * paero(b)%dmid ** 3.0_wp
+          ENDIF
+          
+       ENDIF
+             
+    ENDDO !< b
+!
+!-- 2) Regime 2a: sulphate, OC, BC and sea salt
+!--    This is done only for initialization call, otherwise the water contents
+!--    are computed via condensation
+    IF ( init )  THEN
+       DO  b = in2a, fn2b 
+             
+!--       Initialize
+          zke     = 1.02_wp
+          zbinmol = 0.0_wp
+          zdold   = 1.0_wp
+!                
+!--       1) Particle properties calculated for non-empty bins
+          IF ( paero(b)%numc > nclim )  THEN
+!                
+!--          Volume in one particle [fxm]
+             zvpart = 0.0_wp
+             zvpart(1:7) = paero(b)%volc(1:7) / paero(b)%numc
+!
+!--          Total volume and wet diameter of one dry particle [fxm] 
+             zcore = SUM( zvpart(1:5) )
+             zdwet = paero(b)%dwet
+
+             counti = 0
+             DO  WHILE ( ABS( zdwet / zdold - 1.0_wp ) > 1.0E-12_wp )
+             
+                zdold = MAX( zdwet, 1.0E-20_wp )
+                zaw = zrh / zke
+!                      
+!--             Binary molalities (mol/kg):
+!--             Sulphate
+                zbinmol(1) = 1.1065495E+2_wp - 3.6759197E+2_wp * zaw           &  
+                        + 5.0462934E+2_wp * zaw**2 - 3.1543839E+2_wp * zaw**3  &
+                        + 6.770824E+1_wp  * zaw**4 
+!--             Organic carbon                        
+                zbinmol(2) = 1.0_wp / ( zaw * amh2o ) - 1.0_wp / amh2o 
+!--             Nitric acid
+                zbinmol(6) = 2.306844303E+1_wp - 3.563608869E+1_wp * zaw       &
+                     - 6.210577919E+1_wp * zaw**2 + 5.510176187E+2_wp * zaw**3 &
+                     - 1.460055286E+3_wp * zaw**4 + 1.894467542E+3_wp * zaw**5 &
+                     - 1.220611402E+3_wp * zaw**6 + 3.098597737E+2_wp * zaw**7 
+!--             Sea salt (natrium chloride)                                 
+                zbinmol(5) = 5.875248E+1_wp - 1.8781997E+2_wp * zaw            &
+                         + 2.7211377E+2_wp * zaw**2 - 1.8458287E+2_wp * zaw**3 &
+                         + 4.153689E+1_wp  * zaw**4 
+!                                 
+!--             Calculate the liquid water content (kg/m3-air)
+                zlwc = ( paero(b)%volc(1) * ( arhoh2so4 / amh2so4 ) ) /        &
+                       zbinmol(1) + epsoc * ( paero(b)%volc(2) * ( arhooc /    &
+                       amoc ) ) / zbinmol(2) + ( paero(b)%volc(6) * ( arhohno3 &
+                       / amhno3 ) ) / zbinmol(6) + ( paero(b)%volc(5) *        &
+                       ( arhoss / amss ) ) / zbinmol(5)
+                       
+!--             Particle wet radius (m) 
+                zdwet = ( zlwc / paero(b)%numc / arhoh2o / api6 +              &
+                          ( SUM( zvpart(6:7) ) / api6 )  + &
+                           zcore / api6 ) ** ( 1.0_wp / 3.0_wp )
+!                                
+!--             Kelvin effect (Eq. 10.85 in Seinfeld and Pandis (2006))
+                zke = EXP( MIN( 50.0_wp,                                       &
+                        4.0_wp * surfw0 * amvh2so4 / ( abo * zdwet * ptemp ) ) )
+                         
+                counti = counti + 1
+                IF ( counti > 1000 )  THEN 
+                   message_string = 'Subrange 2: no convergence!'
+                CALL message( 'salsa_mod: equilibration', 'SA0043',            &
+                              1, 2, 0, 6, 0 )
+                ENDIF
+             ENDDO
+!                   
+!--          Liquid water content; instead of LWC use the volume concentration
+             paero(b)%volc(8) = zlwc / arhoh2o
+             paero(b)%dwet    = zdwet
+             paero(b)%core    = zcore
+             
+          ELSE
+!--          2.2) empty bins given bin average values 
+             paero(b)%dwet = paero(b)%dmid
+             paero(b)%core = api6 * paero(b)%dmid ** 3.0_wp
+          ENDIF
+               
+       ENDDO   ! b
+    ENDIF
+
+ END SUBROUTINE equilibration 
+ 
+!------------------------------------------------------------------------------!
+!> Description:
+!> ------------
+!> Calculation of the settling velocity vc (m/s) per aerosol size bin and 
+!> deposition on plant canopy (lsdepo_vege). 
+!
+!> Deposition is based on either the scheme presented in: 
+!> Zhang et al. (2001), Atmos. Environ. 35, 549-560 (includes collection due to 
+!> Brownian diffusion, impaction, interception and sedimentation) 
+!> OR
+!> Petroff & Zhang (2010), Geosci. Model Dev. 3, 753-769 (includes also 
+!> collection due to turbulent impaction)
+!
+!> Equation numbers refer to equation in Jacobson (2005): Fundamentals of 
+!> Atmospheric Modeling, 2nd Edition. 
+!
+!> Subroutine follows closely sedim_SALSA in UCLALES-SALSA written by Juha 
+!> Tonttila (KIT/FMI) and Zubair Maalick (UEF).
+!> Rewritten to PALM by Mona Kurppa (UH), 2017. 
+!
+!> Call for grid point i,j,k
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE deposition( paero, tk, adn, mag_u, lad, kvis, Sc, vc )
+ 
+    USE plant_canopy_model_mod,                                                &
+        ONLY: cdc
+ 
+    IMPLICIT NONE
+    
+    REAL(wp), INTENT(in)    ::  adn    !< air density (kg/m3)  
+    REAL(wp), INTENT(out)   ::  kvis   !< kinematic viscosity of air (m2/s) 
+    REAL(wp), INTENT(in) ::     lad    !< leaf area density (m2/m3)
+    REAL(wp), INTENT(in)    ::  mag_u  !< wind velocity (m/s)
+    REAL(wp), INTENT(out)   ::  Sc(:)  !< particle Schmidt number  
+    REAL(wp), INTENT(in)    ::  tk     !< abs.temperature (K)   
+    REAL(wp), INTENT(out)   ::  vc(:)  !< critical fall speed i.e. settling 
+                                       !< velocity of an aerosol particle (m/s) 
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b)        
+    
+    INTEGER(iwp) ::  b      !< loop index
+    INTEGER(iwp) ::  c      !< loop index
+    REAL(wp) ::  avis       !< molecular viscocity of air (kg/(m*s))
+    REAL(wp), PARAMETER ::  c_A = 1.249_wp !< Constants A, B and C for 
+    REAL(wp), PARAMETER ::  c_B = 0.42_wp  !< calculating  the Cunningham  
+    REAL(wp), PARAMETER ::  c_C = 0.87_wp  !< slip-flow correction (Cc)  
+                                           !< according to Jacobson (2005), 
+                                           !< Eq. 15.30
+    REAL(wp) ::  Cc         !< Cunningham slip-flow correction factor     
+    REAL(wp) ::  Kn         !< Knudsen number    
+    REAL(wp) ::  lambda     !< molecular mean free path (m)
+    REAL(wp) ::  mdiff      !< particle diffusivity coefficient    
+    REAL(wp) ::  pdn        !< particle density (kg/m3)      
+    REAL(wp) ::  ustar      !< friction velocity (m/s)    
+    REAL(wp) ::  va         !< thermal speed of an air molecule (m/s) 
+    REAL(wp) ::  zdwet      !< wet diameter (m)                              
+!
+!-- Initialise 
+    Cc            = 0.0_wp
+    Kn            = 0.0_wp
+    mdiff         = 0.0_wp
+    pdn           = 1500.0_wp    ! default value 
+    ustar         = 0.0_wp 
+!
+!-- Molecular viscosity of air (Eq. 4.54)
+    avis = 1.8325E-5_wp * ( 416.16_wp / ( tk + 120.0_wp ) ) * ( tk /           &
+           296.16_wp )**1.5_wp
+!              
+!-- Kinematic viscosity (Eq. 4.55)
+    kvis =  avis / adn
+!       
+!-- Thermal velocity of an air molecule (Eq. 15.32)
+    va = SQRT( 8.0_wp * abo * tk / ( pi * am_airmol ) ) 
+!
+!-- Mean free path (m) (Eq. 15.24)
+    lambda = 2.0_wp * avis / ( adn * va )
+    
+    DO  b = 1, nbins
+    
+       IF ( paero(b)%numc < nclim )  CYCLE
+       zdwet = paero(b)%dwet
+!
+!--    Knudsen number (Eq. 15.23)
+       Kn = MAX( 1.0E-2_wp, lambda / ( zdwet * 0.5_wp ) ) ! To avoid underflow
+!
+!--    Cunningham slip-flow correction (Eq. 15.30)
+       Cc = 1.0_wp + Kn * ( c_A + c_B * EXP( -c_C / Kn ) )
+
+!--    Particle diffusivity coefficient (Eq. 15.29)
+       mdiff = ( abo * tk * Cc ) / ( 3.0_wp * pi * avis * zdwet )
+!       
+!--    Particle Schmidt number (Eq. 15.36)
+       Sc(b) = kvis / mdiff       
+!       
+!--    Critical fall speed i.e. settling velocity  (Eq. 20.4)                 
+       vc(b) = MIN( 1.0_wp, terminal_vel( 0.5_wp * zdwet, pdn, adn, avis, Cc) )
+       
+       IF ( lsdepo_vege  .AND.  plant_canopy  .AND.  lad > 0.0_wp )  THEN
+!       
+!--       Friction velocity calculated following Prandtl (1925):
+          ustar = SQRT( cdc ) * mag_u
+          CALL depo_vege( paero, b, vc(b), mag_u, ustar, kvis, Sc(b), lad )
+       ENDIF 
+    ENDDO
+ 
+ END SUBROUTINE deposition 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------ 
+!> Calculate change in number and volume concentrations due to deposition on 
+!> plant canopy.
+!------------------------------------------------------------------------------!
+ SUBROUTINE depo_vege( paero, b, vc, mag_u, ustar, kvis_a, Sc, lad )
+  
+    IMPLICIT NONE 
+    
+    INTEGER(iwp), INTENT(in) ::  b  !< loop index
+    REAL(wp), INTENT(in) ::  kvis_a !< kinematic viscosity of air (m2/s)
+    REAL(wp), INTENT(in) ::  lad    !< leaf area density (m2/m3)
+    REAL(wp), INTENT(in) ::  mag_u  !< wind velocity (m/s)   
+    REAL(wp), INTENT(in) ::  Sc     !< particle Schmidt number 
+    REAL(wp), INTENT(in) ::  ustar  !< friction velocity (m/s)                                    
+    REAL(wp), INTENT(in) ::  vc     !< terminal velocity (m/s)  
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b)  
+    
+    INTEGER(iwp) ::  c      !< loop index
+    REAL(wp), PARAMETER ::  c_A = 1.249_wp !< Constants A, B and C for 
+    REAL(wp), PARAMETER ::  c_B = 0.42_wp  !< calculating  the Cunningham  
+    REAL(wp), PARAMETER ::  c_C = 0.87_wp  !< slip-flow correction (Cc)  
+                                           !< according to Jacobson (2005), 
+                                           !< Eq. 15.30
+    REAL(wp) ::  alpha       !< parameter, Table 3 in Zhang et al. (2001)  
+    REAL(wp) ::  depo        !< deposition efficiency
+    REAL(wp) ::  C_Br        !< coefficient for Brownian diffusion
+    REAL(wp) ::  C_IM        !< coefficient for inertial impaction
+    REAL(wp) ::  C_IN        !< coefficient for interception
+    REAL(wp) ::  C_IT        !< coefficient for turbulent impaction   
+    REAL(wp) ::  gamma       !< parameter, Table 3 in Zhang et al. (2001)    
+    REAL(wp) ::  par_A       !< parameter A for the characteristic radius of 
+                             !< collectors, Table 3 in Zhang et al. (2001)    
+    REAL(wp) ::  rt          !< the overall quasi-laminar resistance for 
+                             !< particles
+    REAL(wp) ::  St          !< Stokes number for smooth surfaces or bluff 
+                             !< surface elements                                 
+    REAL(wp) ::  tau_plus    !< dimensionless particle relaxation time   
+    REAL(wp) ::  v_bd        !< deposition velocity due to Brownian diffusion
+    REAL(wp) ::  v_im        !< deposition velocity due to impaction
+    REAL(wp) ::  v_in        !< deposition velocity due to interception
+    REAL(wp) ::  v_it        !< deposition velocity due to turbulent impaction                                
+!
+!-- Initialise 
+    depo     = 0.0_wp 
+    rt       = 0.0_wp
+    St       = 0.0_wp
+    tau_plus = 0.0_wp
+    v_bd     = 0.0_wp     
+    v_im     = 0.0_wp        
+    v_in     = 0.0_wp        
+    v_it     = 0.0_wp         
+       
+    IF ( depo_vege_type == 'zhang2001' )  THEN
+!       
+!--    Parameters for the land use category 'deciduous broadleaf trees'(Table 3)     
+       par_A = 5.0E-3_wp
+       alpha = 0.8_wp
+       gamma = 0.56_wp  
+!       
+!--    Stokes number for vegetated surfaces (Seinfeld & Pandis (2006): Eq.19.24)  
+       St = vc * ustar / ( g * par_A )         
+!          
+!--    The overall quasi-laminar resistance for particles (Zhang et al., Eq. 5)        
+       rt = MAX( EPSILON( 1.0_wp ), ( 3.0_wp * ustar * EXP( -St**0.5_wp ) *    &
+                         ( Sc**( -gamma ) + ( St / ( alpha + St ) )**2.0_wp +  &
+                           0.5_wp * ( paero(b)%dwet / par_A )**2.0_wp ) ) )
+       depo = ( rt + vc ) * lad
+       paero(b)%numc = paero(b)%numc - depo * paero(b)%numc * dt_salsa
+       DO  c = 1, maxspec+1
+          paero(b)%volc(c) = paero(b)%volc(c) - depo * paero(b)%volc(c) *      &
+                             dt_salsa
+       ENDDO
+       
+    ELSEIF ( depo_vege_type == 'petroff2010' )  THEN
+!
+!--    vd = v_BD + v_IN + v_IM + v_IT + vc 
+!--    Deposition efficiencies from Table 1. Constants from Table 2.
+       C_Br  = 1.262_wp
+       C_IM  = 0.130_wp
+       C_IN  = 0.216_wp
+       C_IT  = 0.056_wp
+       par_A = 0.03_wp   ! Here: leaf width (m)      
+!       
+!--    Stokes number for vegetated surfaces (Seinfeld & Pandis (2006): Eq.19.24)  
+       St = vc * ustar / ( g * par_A )         
+!
+!--    Non-dimensional relexation time of the particle on top of canopy
+       tau_plus = vc * ustar**2.0_wp / ( kvis_a * g ) 
+!
+!--    Brownian diffusion
+       v_bd = mag_u * C_Br * Sc**( -2.0_wp / 3.0_wp ) *                        &
+              ( mag_u * par_A / kvis_a )**( -0.5_wp )
+!
+!--    Interception
+       v_in = mag_u * C_IN * paero(b)%dwet / par_A * ( 2.0_wp + LOG( 2.0_wp *  &
+              par_A / paero(b)%dwet ) )                     
+!
+!--    Impaction: Petroff (2009) Eq. 18
+       v_im = mag_u * C_IM * ( St / ( St + 0.47_wp ) )**2.0_wp
+       
+       IF ( tau_plus < 20.0_wp )  THEN
+          v_it = 2.5E-3_wp * C_IT * tau_plus**2.0_wp
+       ELSE
+          v_it = C_IT
+       ENDIF
+       depo = ( v_bd + v_in + v_im + v_it + vc ) * lad     
+       paero(b)%numc = paero(b)%numc - depo * paero(b)%numc * dt_salsa     
+       DO  c = 1, maxspec+1
+          paero(b)%volc(c) = paero(b)%volc(c) - depo * paero(b)%volc(c) *      &
+                             dt_salsa
+       ENDDO
+    ENDIF  
+ 
+ END SUBROUTINE depo_vege
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------  
+!> Calculate deposition on horizontal and vertical surfaces. Implement as 
+!> surface flux.
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE depo_topo( i, j, surf, vc, Sc, kvis, mag_u, norm )
+ 
+    USE surface_mod,                                                           &
+        ONLY:  surf_type
+ 
+    IMPLICIT NONE
+    
+    INTEGER(iwp), INTENT(in) ::  i     !< loop index
+    INTEGER(iwp), INTENT(in) ::  j     !< loop index
+    REAL(wp), INTENT(in) ::  kvis(:)   !< kinematic viscosity of air (m2/s) 
+    REAL(wp), INTENT(in) ::  mag_u(:)  !< wind velocity (m/s)                                                 
+    REAL(wp), INTENT(in) ::  norm(:)   !< normalisation (usually air density)
+    REAL(wp), INTENT(in) ::  Sc(:,:)  !< particle Schmidt number 
+    REAL(wp), INTENT(in) ::  vc(:,:)  !< terminal velocity (m/s)   
+    TYPE(surf_type), INTENT(inout) :: surf  !< respective surface type 
+    INTEGER(iwp) ::  b      !< loop index
+    INTEGER(iwp) ::  c      !< loop index
+    INTEGER(iwp) ::  k      !< loop index
+    INTEGER(iwp) ::  m      !< loop index
+    INTEGER(iwp) ::  surf_e !< End index of surface elements at (j,i)-gridpoint
+    INTEGER(iwp) ::  surf_s !< Start index of surface elements at (j,i)-gridpoint
+    REAL(wp) ::  alpha      !< parameter, Table 3 in Zhang et al. (2001) 
+    REAL(wp) ::  C_Br       !< coefficient for Brownian diffusion
+    REAL(wp) ::  C_IM       !< coefficient for inertial impaction
+    REAL(wp) ::  C_IN       !< coefficient for interception
+    REAL(wp) ::  C_IT       !< coefficient for turbulent impaction 
+    REAL(wp) ::  depo       !< deposition efficiency
+    REAL(wp) ::  gamma      !< parameter, Table 3 in Zhang et al. (2001) 
+    REAL(wp) ::  par_A      !< parameter A for the characteristic radius of 
+                            !< collectors, Table 3 in Zhang et al. (2001) 
+    REAL(wp) ::  rt         !< the overall quasi-laminar resistance for 
+                            !< particles
+    REAL(wp) ::  St         !< Stokes number for bluff surface elements  
+    REAL(wp) ::  tau_plus   !< dimensionless particle relaxation time   
+    REAL(wp) ::  v_bd       !< deposition velocity due to Brownian diffusion
+    REAL(wp) ::  v_im       !< deposition velocity due to impaction
+    REAL(wp) ::  v_in       !< deposition velocity due to interception
+    REAL(wp) ::  v_it       !< deposition velocity due to turbulent impaction  
+!
+!-- Initialise 
+    rt       = 0.0_wp
+    St       = 0.0_wp
+    tau_plus = 0.0_wp
+    v_bd     = 0.0_wp     
+    v_im     = 0.0_wp        
+    v_in     = 0.0_wp        
+    v_it     = 0.0_wp                                 
+    surf_s   = surf%start_index(j,i)
+    surf_e   = surf%end_index(j,i) 
+    
+    DO  m = surf_s, surf_e 
+       k = surf%k(m)        
+       DO  b = 1, nbins
+          IF ( aerosol_number(b)%conc(k,j,i) <= nclim  .OR.                    &
+               Sc(k+1,b) < 1.0_wp )  CYCLE   
+                    
+          IF ( depo_topo_type == 'zhang2001' )  THEN
+!       
+!--          Parameters for the land use category 'urban' in Table 3
+             alpha = 1.5_wp
+             gamma = 0.56_wp 
+             par_A = 10.0E-3_wp
+!       
+!--          Stokes number for smooth surfaces or surfaces with bluff roughness
+!--          elements (Seinfeld and Pandis, 2nd edition (2006): Eq. 19.23)       
+             St = MAX( 0.01_wp, vc(k+1,b) * surf%us(m) ** 2.0_wp /             &
+                       ( g * kvis(k+1)  ) ) 
+!          
+!--          The overall quasi-laminar resistance for particles (Eq. 5)        
+             rt = MAX( EPSILON( 1.0_wp ), ( 3.0_wp * surf%us(m) * (            &
+                       Sc(k+1,b)**( -gamma ) + ( St / ( alpha + St ) )**2.0_wp &
+                        + 0.5_wp * ( Ra_dry(k,j,i,b) / par_A )**2.0_wp ) *     &
+                       EXP( -St**0.5_wp ) ) ) 
+             depo = vc(k+1,b) + rt
+             
+          ELSEIF ( depo_topo_type == 'petroff2010' )  THEN 
+!
+!--          vd = v_BD + v_IN + v_IM + v_IT + vc 
+!--          Deposition efficiencies from Table 1. Constants from Table 2.
+             C_Br  = 1.262_wp
+             C_IM  = 0.130_wp
+             C_IN  = 0.216_wp
+             C_IT  = 0.056_wp
+             par_A = 0.03_wp   ! Here: leaf width (m)  
+!       
+!--          Stokes number for smooth surfaces or surfaces with bluff roughness
+!--          elements (Seinfeld and Pandis, 2nd edition (2006): Eq. 19.23)       
+             St = MAX( 0.01_wp, vc(k+1,b) * surf%us(m) ** 2.0_wp /             &
+                       ( g *  kvis(k+1) ) )              
+!
+!--          Non-dimensional relexation time of the particle on top of canopy
+             tau_plus = vc(k+1,b) * surf%us(m)**2.0_wp / ( kvis(k+1) * g ) 
+!
+!--          Brownian diffusion
+             v_bd = mag_u(k+1) * C_Br * Sc(k+1,b)**( -2.0_wp / 3.0_wp ) *      &
+                    ( mag_u(k+1) * par_A / kvis(k+1) )**( -0.5_wp )
+!
+!--          Interception
+             v_in = mag_u(k+1) * C_IN * Ra_dry(k,j,i,b)/ par_A * ( 2.0_wp +    &
+                    LOG( 2.0_wp * par_A / Ra_dry(k,j,i,b) ) )                     
+!
+!--          Impaction: Petroff (2009) Eq. 18
+             v_im = mag_u(k+1) * C_IM * ( St / ( St + 0.47_wp ) )**2.0_wp
+             
+             IF ( tau_plus < 20.0_wp )  THEN
+                v_it = 2.5E-3_wp * C_IT * tau_plus**2.0_wp
+             ELSE
+                v_it = C_IT
+             ENDIF
+             depo =  v_bd + v_in + v_im + v_it + vc(k+1,b)        
+          
+          ENDIF
+          IF ( lod_aero == 3  .OR.  salsa_source_mode ==  'no_source' )  THEN
+             surf%answs(m,b) = -depo * norm(k) * aerosol_number(b)%conc(k,j,i) 
+             DO  c = 1, ncc_tot    
+                surf%amsws(m,(c-1)*nbins+b) = -depo *  norm(k) *               &
+                                         aerosol_mass((c-1)*nbins+b)%conc(k,j,i)
+             ENDDO    ! c
+          ELSE
+             surf%answs(m,b) = SUM( aerosol_number(b)%source(:,j,i) ) -        &
+                               MAX( 0.0_wp, depo * norm(k) *                   &
+                               aerosol_number(b)%conc(k,j,i) )
+             DO  c = 1, ncc_tot    
+                surf%amsws(m,(c-1)*nbins+b) = SUM(                             &
+                               aerosol_mass((c-1)*nbins+b)%source(:,j,i) ) -   &
+                               MAX(  0.0_wp, depo *  norm(k) *                 &
+                               aerosol_mass((c-1)*nbins+b)%conc(k,j,i) )
+             ENDDO 
+          ENDIF
+       ENDDO    ! b
+    ENDDO    ! m     
+     
+ END SUBROUTINE depo_topo
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+! Function for calculating terminal velocities for different particles sizes.
+!------------------------------------------------------------------------------!
+ REAL(wp) FUNCTION terminal_vel( radius, rhop, rhoa, visc, beta )
+ 
+    IMPLICIT NONE
+   
+    REAL(wp), INTENT(in) ::  beta    !< Cunningham correction factor
+    REAL(wp), INTENT(in) ::  radius  !< particle radius (m)
+    REAL(wp), INTENT(in) ::  rhop    !< particle density (kg/m3)
+    REAL(wp), INTENT(in) ::  rhoa    !< air density (kg/m3)
+    REAL(wp), INTENT(in) ::  visc    !< molecular viscosity of air (kg/(m*s))
+    
+    REAL(wp), PARAMETER ::  rhoa_ref = 1.225_wp ! reference air density (kg/m3)
+!
+!-- Stokes law with Cunningham slip correction factor
+    terminal_vel = ( 4.0_wp * radius**2.0_wp ) * ( rhop - rhoa ) * g * beta /  &
+                   ( 18.0_wp * visc ) ! (m/s)
+        
+ END FUNCTION terminal_vel
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates particle loss and change in size distribution due to (Brownian)
+!> coagulation. Only for particles with dwet < 30 micrometres. 
+!
+!> Method:
+!> Semi-implicit, non-iterative method: (Jacobson, 1994)
+!> Volume concentrations of the smaller colliding particles added to the bin of
+!> the larger colliding particles. Start from first bin and use the updated 
+!> number and volume for calculation of following bins. NB! Our bin numbering
+!> does not follow particle size in subrange 2.
+!
+!> Schematic for bin numbers in different subranges:
+!>             1                            2
+!>    +-------------------------------------------+
+!>  a | 1 | 2 | 3 || 4 | 5 | 6 | 7 |  8 |  9 | 10||
+!>  b |           ||11 |12 |13 |14 | 15 | 16 | 17||
+!>    +-------------------------------------------+
+!
+!> Exact coagulation coefficients for each pressure level are scaled according
+!> to current particle wet size (linear scaling).
+!> Bins are organized in terms of the dry size of the condensation nucleus, 
+!> while coagulation kernell is calculated with the actual hydrometeor
+!> size.
+!
+!> Called from salsa_driver
+!> fxm: Process selection should be made smarter - now just lots of IFs inside
+!>      loops
+!
+!> Coded by:
+!> Hannele Korhonen (FMI) 2005
+!> Harri Kokkola (FMI) 2006
+!> Tommi Bergman (FMI) 2012
+!> Matti Niskanen(FMI) 2012
+!> Anton Laakso  (FMI) 2013
+!> Juha Tonttila (FMI) 2014
+!------------------------------------------------------------------------------!
+ SUBROUTINE coagulation( paero, ptstep, ptemp, ppres )
+               
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b) !< Aerosol properties
+    REAL(wp), INTENT(in) ::  ppres  !< ambient pressure (Pa)
+    REAL(wp), INTENT(in) ::  ptemp  !< ambient temperature (K) 
+    REAL(wp), INTENT(in) ::  ptstep !< time step (s)
+!-- Local variables
+    INTEGER(iwp) ::  index_2a !< corresponding bin in subrange 2a
+    INTEGER(iwp) ::  index_2b !< corresponding bin in subrange 2b
+    INTEGER(iwp) ::  b !< loop index
+    INTEGER(iwp) ::  ll !< loop index
+    INTEGER(iwp) ::  mm !< loop index
+    INTEGER(iwp) ::  nn !< loop index
+    REAL(wp) ::  pressi !< pressure
+    REAL(wp) ::  temppi !< temperature
+    REAL(wp) ::  zcc(fn2b,fn2b)   !< updated coagulation coefficients (m3/s)  
+    REAL(wp) ::  zdpart_mm        !< diameter of particle (m)
+    REAL(wp) ::  zdpart_nn        !< diameter of particle (m)    
+    REAL(wp) ::  zminusterm       !< coagulation loss in a bin (1/s)
+    REAL(wp) ::  zplusterm(8)     !< coagulation gain in a bin (fxm/s)
+                                  !< (for each chemical compound)
+    REAL(wp) ::  zmpart(fn2b)     !< approximate mass of particles (kg)
+    
+    zcc       = 0.0_wp
+    zmpart    = 0.0_wp
+    zdpart_mm = 0.0_wp
+    zdpart_nn = 0.0_wp
+!
+!-- 1) Coagulation to coarse mode calculated in a simplified way: 
+!--    CoagSink ~ Dp in continuum subrange, thus we calculate 'effective' 
+!--    number concentration of coarse particles
+
+!-- 2) Updating coagulation coefficients 
+!    
+!-- Aerosol mass (kg). Density of 1500 kg/m3 assumed
+    zmpart(1:fn2b) = api6 * ( MIN( paero(1:fn2b)%dwet, 30.0E-6_wp )**3.0_wp  ) &
+                     * 1500.0_wp 
+    temppi = ptemp
+    pressi = ppres
+    zcc    = 0.0_wp
+!
+!-- Aero-aero coagulation
+    DO  mm = 1, fn2b   ! smaller colliding particle
+       IF ( paero(mm)%numc < nclim )  CYCLE
+       DO  nn = mm, fn2b   ! larger colliding particle
+          IF ( paero(nn)%numc < nclim )  CYCLE
+          
+          zdpart_mm = MIN( paero(mm)%dwet, 30.0E-6_wp )     ! Limit to 30 um
+          zdpart_nn = MIN( paero(nn)%dwet, 30.0E-6_wp )     ! Limit to 30 um
+!             
+!--       Coagulation coefficient of particles (m3/s)
+          zcc(mm,nn) = coagc( zdpart_mm, zdpart_nn, zmpart(mm), zmpart(nn),    &
+                              temppi, pressi )
+          zcc(nn,mm) = zcc(mm,nn)
+       ENDDO
+    ENDDO
+       
+!    
+!-- 3) New particle and volume concentrations after coagulation:
+!--    Calculated according to Jacobson (2005) eq. 15.9
+!
+!-- Aerosols in subrange 1a:
+    DO  b = in1a, fn1a
+       IF ( paero(b)%numc < nclim )  CYCLE
+       zminusterm   = 0.0_wp
+       zplusterm(:) = 0.0_wp
+!       
+!--    Particles lost by coagulation with larger aerosols
+       DO  ll = b+1, fn2b
+          zminusterm = zminusterm + zcc(b,ll) * paero(ll)%numc
+       ENDDO
+!       
+!--    Coagulation gain in a bin: change in volume conc. (cm3/cm3):
+       DO ll = in1a, b-1
+          zplusterm(1:2) = zplusterm(1:2) + zcc(ll,b) * paero(ll)%volc(1:2)
+          zplusterm(6:7) = zplusterm(6:7) + zcc(ll,b) * paero(ll)%volc(6:7)
+          zplusterm(8)   = zplusterm(8)   + zcc(ll,b) * paero(ll)%volc(8)
+       ENDDO
+!       
+!--    Volume and number concentrations after coagulation update [fxm]
+       paero(b)%volc(1:2) = ( paero(b)%volc(1:2) + ptstep * zplusterm(1:2) * &
+                             paero(b)%numc ) / ( 1.0_wp + ptstep * zminusterm )
+       paero(b)%volc(6:7) = ( paero(b)%volc(6:7) + ptstep * zplusterm(6:7) * &
+                             paero(b)%numc ) / ( 1.0_wp + ptstep * zminusterm )
+       paero(b)%volc(8)   = ( paero(b)%volc(8)   + ptstep * zplusterm(8) *   &
+                             paero(b)%numc ) / ( 1.0_wp + ptstep * zminusterm )
+       paero(b)%numc = paero(b)%numc / ( 1.0_wp + ptstep * zminusterm  +     &
+                        0.5_wp * ptstep * zcc(b,b) * paero(b)%numc )               
+    ENDDO
+!             
+!-- Aerosols in subrange 2a:
+    DO  b = in2a, fn2a
+       IF ( paero(b)%numc < nclim )  CYCLE
+       zminusterm   = 0.0_wp
+       zplusterm(:) = 0.0_wp
+!       
+!--    Find corresponding size bin in subrange 2b
+       index_2b = b - in2a + in2b
+!       
+!--    Particles lost by larger particles in 2a
+       DO  ll = b+1, fn2a
+          zminusterm = zminusterm + zcc(b,ll) * paero(ll)%numc 
+       ENDDO
+!       
+!--    Particles lost by larger particles in 2b
+       IF ( .NOT. no_insoluble )  THEN
+          DO  ll = index_2b+1, fn2b
+             zminusterm = zminusterm + zcc(b,ll) * paero(ll)%numc
+          ENDDO
+       ENDIF
+!       
+!--    Particle volume gained from smaller particles in subranges 1, 2a and 2b
+       DO  ll = in1a, b-1
+          zplusterm(1:2) = zplusterm(1:2) + zcc(ll,b) * paero(ll)%volc(1:2)
+          zplusterm(6:7) = zplusterm(6:7) + zcc(ll,b) * paero(ll)%volc(6:7)
+          zplusterm(8)   = zplusterm(8)   + zcc(ll,b) * paero(ll)%volc(8)
+       ENDDO  
+!       
+!--    Particle volume gained from smaller particles in 2a
+!--    (Note, for components not included in the previous loop!)
+       DO  ll = in2a, b-1
+          zplusterm(3:5) = zplusterm(3:5) + zcc(ll,b)*paero(ll)%volc(3:5)             
+       ENDDO
+       
+!       
+!--    Particle volume gained from smaller (and equal) particles in 2b
+       IF ( .NOT. no_insoluble )  THEN
+          DO  ll = in2b, index_2b
+             zplusterm(1:8) = zplusterm(1:8) + zcc(ll,b) * paero(ll)%volc(1:8)
+          ENDDO
+       ENDIF
+!       
+!--    Volume and number concentrations after coagulation update [fxm]
+       paero(b)%volc(1:8) = ( paero(b)%volc(1:8) + ptstep * zplusterm(1:8) * &
+                             paero(b)%numc ) / ( 1.0_wp + ptstep * zminusterm )
+       paero(b)%numc = paero(b)%numc / ( 1.0_wp + ptstep * zminusterm +      &
+                        0.5_wp * ptstep * zcc(b,b) * paero(b)%numc )
+    ENDDO
+!             
+!-- Aerosols in subrange 2b:
+    IF ( .NOT. no_insoluble )  THEN
+       DO  b = in2b, fn2b
+          IF ( paero(b)%numc < nclim )  CYCLE
+          zminusterm   = 0.0_wp
+          zplusterm(:) = 0.0_wp
+!       
+!--       Find corresponding size bin in subsubrange 2a
+          index_2a = b - in2b + in2a
+!       
+!--       Particles lost to larger particles in subranges 2b
+          DO  ll = b+1, fn2b
+             zminusterm = zminusterm + zcc(b,ll) * paero(ll)%numc
+          ENDDO
+!       
+!--       Particles lost to larger and equal particles in 2a
+          DO  ll = index_2a, fn2a
+             zminusterm = zminusterm + zcc(b,ll) * paero(ll)%numc
+          ENDDO
+!       
+!--       Particle volume gained from smaller particles in subranges 1 & 2a
+          DO  ll = in1a, index_2a-1
+             zplusterm(1:8) = zplusterm(1:8) + zcc(ll,b) * paero(ll)%volc(1:8)
+          ENDDO
+!       
+!--       Particle volume gained from smaller particles in 2b
+          DO  ll = in2b, b-1
+             zplusterm(1:8) = zplusterm(1:8) + zcc(ll,b) * paero(ll)%volc(1:8)
+          ENDDO
+!       
+!--       Volume and number concentrations after coagulation update [fxm]
+          paero(b)%volc(1:8) = ( paero(b)%volc(1:8) + ptstep * zplusterm(1:8)&
+                           * paero(b)%numc ) / ( 1.0_wp + ptstep * zminusterm )
+          paero(b)%numc = paero(b)%numc / ( 1.0_wp + ptstep * zminusterm  +  &
+                           0.5_wp * ptstep * zcc(b,b) * paero(b)%numc )
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE coagulation
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of coagulation coefficients. Extended version of the function 
+!> originally found in mo_salsa_init. 
+!
+!> J. Tonttila, FMI, 05/2014 
+!------------------------------------------------------------------------------! 
+ REAL(wp) FUNCTION coagc( diam1, diam2, mass1, mass2, temp, pres )
+ 
+    IMPLICIT NONE
+!       
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  diam1 !< diameter of colliding particle 1 (m)
+    REAL(wp), INTENT(in) ::  diam2 !< diameter of colliding particle 2 (m)
+    REAL(wp), INTENT(in) ::  mass1 !< mass of colliding particle 1 (kg)
+    REAL(wp), INTENT(in) ::  mass2 !< mass of colliding particle 2 (kg)
+    REAL(wp), INTENT(in) ::  pres  !< ambient pressure (Pa?) [fxm]
+    REAL(wp), INTENT(in) ::  temp  !< ambient temperature (K)       
+!
+!-- Local variables
+    REAL(wp) ::  fmdist !< distance of flux matching (m)   
+    REAL(wp) ::  knud_p !< particle Knudsen number
+    REAL(wp) ::  mdiam  !< mean diameter of colliding particles (m)  
+    REAL(wp) ::  mfp    !< mean free path of air molecules (m)    
+    REAL(wp) ::  visc   !< viscosity of air (kg/(m s))                   
+    REAL(wp), DIMENSION (2) ::  beta   !< Cunningham correction factor
+    REAL(wp), DIMENSION (2) ::  dfpart !< particle diffusion coefficient 
+                                       !< (m2/s)       
+    REAL(wp), DIMENSION (2) ::  diam   !< diameters of particles (m)
+    REAL(wp), DIMENSION (2) ::  flux   !< flux in continuum and free molec. 
+                                       !< regime (m/s)       
+    REAL(wp), DIMENSION (2) ::  knud   !< particle Knudsen number        
+    REAL(wp), DIMENSION (2) ::  mpart  !< masses of particles (kg)
+    REAL(wp), DIMENSION (2) ::  mtvel  !< particle mean thermal velocity (m/s)
+    REAL(wp), DIMENSION (2) ::  omega  !< particle mean free path             
+    REAL(wp), DIMENSION (2) ::  tva    !< temporary variable (m)       
+!
+!-- Initialisation
+    coagc   = 0.0_wp
+!
+!-- 1) Initializing particle and ambient air variables
+    diam  = (/ diam1, diam2 /) !< particle diameters (m)
+    mpart = (/ mass1, mass2 /) !< particle masses (kg)
+!-- Viscosity of air (kg/(m s))       
+    visc = ( 7.44523E-3_wp * temp ** 1.5_wp ) /                                &
+           ( 5093.0_wp * ( temp + 110.4_wp ) ) 
+!-- Mean free path of air (m)            
+    mfp = ( 1.656E-10_wp * temp + 1.828E-8_wp ) * ( p_0 + 1325.0_wp ) / pres
+!
+!-- 2) Slip correction factor for small particles 
+    knud = 2.0_wp * EXP( LOG(mfp) - LOG(diam) )! Knudsen number for air (15.23)
+!-- Cunningham correction factor (Allen and Raabe, Aerosol Sci. Tech. 4, 269)       
+    beta = 1.0_wp + knud * ( 1.142_wp + 0.558_wp * EXP( -0.999_wp / knud ) )
+!
+!-- 3) Particle properties
+!-- Diffusion coefficient (m2/s) (Jacobson (2005) eq. 15.29)
+    dfpart = beta * abo * temp / ( 3.0_wp * pi * visc * diam ) 
+!-- Mean thermal velocity (m/s) (Jacobson (2005) eq. 15.32)
+    mtvel = SQRT( ( 8.0_wp * abo * temp ) / ( pi * mpart ) )
+!-- Particle mean free path (m) (Jacobson (2005) eq. 15.34 )
+    omega = 8.0_wp * dfpart / ( pi * mtvel ) 
+!-- Mean diameter (m)
+    mdiam = 0.5_wp * ( diam(1) + diam(2) )
+!
+!-- 4) Calculation of fluxes (Brownian collision kernels) and flux matching 
+!-- following Jacobson (2005):
+!-- Flux in continuum regime (m3/s) (eq. 15.28)
+    flux(1) = 4.0_wp * pi * mdiam * ( dfpart(1) + dfpart(2) )
+!-- Flux in free molec. regime (m3/s) (eq. 15.31)
+    flux(2) = pi * SQRT( ( mtvel(1)**2.0_wp ) + ( mtvel(2)**2.0_wp ) ) *      &
+              ( mdiam**2.0_wp )
+!-- temporary variables (m) to calculate flux matching distance (m)
+    tva(1) = ( ( mdiam + omega(1) )**3.0_wp - ( mdiam**2.0_wp +                &
+               omega(1)**2.0_wp ) * SQRT( ( mdiam**2.0_wp + omega(1)**2.0_wp ) &
+               ) ) / ( 3.0_wp * mdiam * omega(1) ) - mdiam
+    tva(2) = ( ( mdiam + omega(2) )**3.0_wp - ( mdiam**2.0_wp +                &
+               omega(2)**2.0_wp ) * SQRT( ( mdiam**2 + omega(2)**2 ) ) ) /     &
+             ( 3.0_wp * mdiam * omega(2) ) - mdiam
+!-- Flux matching distance (m) i.e. the mean distance from the centre of a 
+!-- sphere reached by particles leaving sphere's surface and travelling a 
+!-- distance of particle mean free path mfp (eq. 15 34)                 
+    fmdist = SQRT( tva(1)**2 + tva(2)**2.0_wp) 
+!
+!-- 5) Coagulation coefficient (m3/s) (eq. 15.33). Here assumed 
+!-- coalescence efficiency 1!!
+    coagc = flux(1) / ( mdiam / ( mdiam + fmdist) + flux(1) / flux(2) ) 
+!-- coagulation coefficient = coalescence efficiency * collision kernel
+!
+!-- Corrected collision kernel following Karl et al., 2016 (ACP):
+!-- Inclusion of van der Waals and viscous forces
+    IF ( van_der_waals_coagc )  THEN
+       knud_p = SQRT( omega(1)**2 + omega(2)**2 ) / mdiam   
+       IF ( knud_p >= 0.1_wp  .AND.  knud_p <= 10.0_wp )  THEN
+          coagc = coagc * ( 2.0_wp + 0.4_wp * LOG( knud_p ) )
+       ELSE
+          coagc = coagc * 3.0_wp
+       ENDIF
+    ENDIF
+    
+ END FUNCTION coagc
+ 
+!------------------------------------------------------------------------------!    
+! Description:
+! ------------
+!> Calculates the change in particle volume and gas phase 
+!> concentrations due to nucleation, condensation and dissolutional growth.
+!
+!> Sulphuric acid and organic vapour: only condensation and no evaporation.
+!
+!> New gas and aerosol phase concentrations calculated according to Jacobson 
+!> (1997): Numerical techniques to solve condensational and dissolutional growth
+!> equations when growth is coupled to reversible reactions, Aerosol Sci. Tech.,
+!> 27, pp 491-498.
+!
+!> Following parameterization has been used:
+!> Molecular diffusion coefficient of condensing vapour (m2/s) 
+!> (Reid et al. (1987): Properties of gases and liquids, McGraw-Hill, New York.)
+!> D = {1.d-7*sqrt(1/M_air + 1/M_gas)*T^1.75} / &
+!      {p_atm/p_stand * (d_air^(1/3) + d_gas^(1/3))^2 }
+! M_air = 28.965 : molar mass of air (g/mol)
+! d_air = 19.70  : diffusion volume of air
+! M_h2so4 = 98.08 : molar mass of h2so4 (g/mol)
+! d_h2so4 = 51.96  : diffusion volume of h2so4 
+!
+!> Called from main aerosol model
+!
+!> fxm: calculated for empty bins too
+!> fxm: same diffusion coefficients and mean free paths used for sulphuric acid
+!>      and organic vapours (average values? 'real' values for each?)
+!> fxm: one should really couple with vapour production and loss terms as well
+!>      should nucleation be coupled here as well????
+!
+! Coded by:
+! Hannele Korhonen (FMI) 2005
+! Harri Kokkola (FMI) 2006
+! Juha Tonttila (FMI) 2014
+! Rewritten to PALM by Mona Kurppa (UHel) 2017
+!------------------------------------------------------------------------------!
+ SUBROUTINE condensation( paero, pcsa, pcocnv, pcocsv, pchno3, pcnh3, pcw, pcs,&
+                          ptemp, ppres, ptstep, prtcl )
+        
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(IN) ::  ppres !< ambient pressure (Pa)
+    REAL(wp), INTENT(IN) ::  pcs   !< Water vapour saturation concentration 
+                                   !< (kg/m3)      
+    REAL(wp), INTENT(IN) ::  ptemp !< ambient temperature (K)
+    REAL(wp), INTENT(IN) ::  ptstep            !< timestep (s)  
+    TYPE(component_index), INTENT(in) :: prtcl !< Keeps track which substances
+                                               !< are used                                               
+    REAL(wp), INTENT(INOUT) ::  pchno3 !< Gas concentrations (#/m3):
+                                       !< nitric acid HNO3
+    REAL(wp), INTENT(INOUT) ::  pcnh3  !< ammonia NH3
+    REAL(wp), INTENT(INOUT) ::  pcocnv !< non-volatile organics
+    REAL(wp), INTENT(INOUT) ::  pcocsv !< semi-volatile organics
+    REAL(wp), INTENT(INOUT) ::  pcsa   !< sulphuric acid H2SO4
+    REAL(wp), INTENT(INOUT) ::  pcw    !< Water vapor concentration (kg/m3) 
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b) !< Aerosol properties                                      
+!-- Local variables 
+    REAL(wp) ::  zbeta(fn2b) !< transitional correction factor for aerosols
+    REAL(wp) ::  zcolrate(fn2b) !< collision rate of molecules to particles 
+                                !< (1/s)
+    REAL(wp) ::  zcolrate_ocnv(fn2b) !< collision rate of organic molecules 
+                                     !< to particles (1/s)
+    REAL(wp) ::  zcs_ocnv !< condensation sink of nonvolatile organics (1/s)       
+    REAL(wp) ::  zcs_ocsv !< condensation sink of semivolatile organics (1/s)
+    REAL(wp) ::  zcs_su !< condensation sink of sulfate (1/s)
+    REAL(wp) ::  zcs_tot!< total condensation sink (1/s) (gases) 
+!-- vapour concentration after time step (#/m3)
+    REAL(wp) ::  zcvap_new1 !< sulphuric acid
+    REAL(wp) ::  zcvap_new2 !< nonvolatile organics
+    REAL(wp) ::  zcvap_new3 !< semivolatile organics
+    REAL(wp) ::  zdfpart(in1a+1) !< particle diffusion coefficient (m2/s)     
+    REAL(wp) ::  zdfvap !< air diffusion coefficient (m2/s)
+!-- change in vapour concentration (#/m3)
+    REAL(wp) ::  zdvap1 !< sulphuric acid
+    REAL(wp) ::  zdvap2 !< nonvolatile organics
+    REAL(wp) ::  zdvap3 !< semivolatile organics 
+    REAL(wp) ::  zdvoloc(fn2b) !< change of organics volume in each bin [fxm]    
+    REAL(wp) ::  zdvolsa(fn2b) !< change of sulphate volume in each bin [fxm]
+    REAL(wp) ::  zj3n3(2)      !< Formation massrate of molecules in 
+                               !< nucleation, (molec/m3s). 1: H2SO4
+                               !< and 2: organic vapor       
+    REAL(wp) ::  zknud(fn2b) !< particle Knudsen number       
+    REAL(wp) ::  zmfp    !< mean free path of condensing vapour (m)
+    REAL(wp) ::  zrh     !< Relative humidity [0-1]         
+    REAL(wp) ::  zvisc   !< viscosity of air (kg/(m s))     
+    REAL(wp) ::  zn_vs_c !< ratio of nucleation of all mass transfer in the 
+                         !< smallest bin
+    REAL(wp) ::  zxocnv  !< ratio of organic vapour in 3nm particles 
+    REAL(wp) ::  zxsa    !< Ratio in 3nm particles: sulphuric acid
+    
+    zj3n3  = 0.0_wp
+    zrh    = pcw / pcs    
+    zxocnv = 0.0_wp
+    zxsa   = 0.0_wp
+!
+!-- Nucleation
+    IF ( nsnucl > 0 )  THEN
+       CALL nucleation( paero, ptemp, zrh, ppres, pcsa, pcocnv, pcnh3, ptstep, &
+                        zj3n3, zxsa, zxocnv )
+    ENDIF
+!
+!-- Condensation on pre-existing particles
+    IF ( lscndgas )  THEN
+!
+!--    Initialise:
+       zdvolsa = 0.0_wp  
+       zdvoloc = 0.0_wp
+       zcolrate = 0.0_wp
+!             
+!--    1) Properties of air and condensing gases:
+!--    Viscosity of air (kg/(m s)) (Eq. 4.54 in Jabonson (2005))
+       zvisc = ( 7.44523E-3_wp * ptemp ** 1.5_wp ) / ( 5093.0_wp *             &
+                 ( ptemp + 110.4_wp ) )
+!--    Diffusion coefficient of air (m2/s)
+       zdfvap = 5.1111E-10_wp * ptemp ** 1.75_wp * ( p_0 + 1325.0_wp ) / ppres 
+!--    Mean free path (m): same for H2SO4 and organic compounds
+       zmfp = 3.0_wp * zdfvap * SQRT( pi * amh2so4 / ( 8.0_wp * argas * ptemp ) )
+!                    
+!--    2) Transition regime correction factor zbeta for particles:
+!--       Fuchs and Sutugin (1971), In: Hidy et al. (ed.) Topics in current 
+!--       aerosol research, Pergamon. Size of condensing molecule considered  
+!--       only for nucleation mode (3 - 20 nm)
+!
+!--    Particle Knudsen number: condensation of gases on aerosols 
+       zknud(in1a:in1a+1) = 2.0_wp * zmfp / ( paero(in1a:in1a+1)%dwet + d_sa )
+       zknud(in1a+2:fn2b) = 2.0_wp * zmfp / paero(in1a+2:fn2b)%dwet
+!    
+!--    Transitional correction factor: aerosol + gas (the semi-empirical Fuchs-
+!--    Sutugin interpolation function (Fuchs and Sutugin, 1971))
+       zbeta = ( zknud + 1.0_wp ) / ( 0.377_wp * zknud + 1.0_wp + 4.0_wp /     &
+               ( 3.0_wp * massacc ) * ( zknud + zknud ** 2.0_wp ) )
+!                   
+!--    3) Collision rate of molecules to particles
+!--       Particle diffusion coefficient considered only for nucleation mode 
+!--       (3 - 20 nm)
+!
+!--    Particle diffusion coefficient (m2/s) (e.g. Eq. 15.29 in Jacobson (2005))
+       zdfpart = abo * ptemp * zbeta(in1a:in1a+1) / ( 3.0_wp * pi * zvisc *    &
+                 paero(in1a:in1a+1)%dwet )
+!              
+!--    Collision rate (mass-transfer coefficient): gases on aerosols (1/s) 
+!--    (Eq. 16.64 in Jacobson (2005))
+       zcolrate(in1a:in1a+1) = MERGE( 2.0_wp * pi *                            &
+                                      ( paero(in1a:in1a+1)%dwet + d_sa ) *     &
+                                      ( zdfvap + zdfpart ) * zbeta(in1a:in1a+1)& 
+                                        * paero(in1a:in1a+1)%numc, 0.0_wp,     &
+                                      paero(in1a:in1a+1)%numc > nclim )
+       zcolrate(in1a+2:fn2b) = MERGE( 2.0_wp * pi * paero(in1a+2:fn2b)%dwet *  &
+                                      zdfvap * zbeta(in1a+2:fn2b) *            &
+                                      paero(in1a+2:fn2b)%numc, 0.0_wp,         &
+                                      paero(in1a+2:fn2b)%numc > nclim )
+!                  
+!-- 4) Condensation sink (1/s)
+       zcs_tot = SUM( zcolrate )   ! total sink
+!
+!--    5) Changes in gas-phase concentrations and particle volume
+!
+!--    5.1) Organic vapours 
+!
+!--    5.1.1) Non-volatile organic compound: condenses onto all bins
+       IF ( pcocnv > 1.0E+10_wp  .AND.  zcs_tot > 1.0E-30_wp  .AND.            &
+            is_used( prtcl,'OC' ) )                                            &
+       THEN
+!--       Ratio of nucleation vs. condensation rates in the smallest bin    
+          zn_vs_c = 0.0_wp  
+          IF ( zj3n3(2) > 1.0_wp )  THEN
+             zn_vs_c = ( zj3n3(2) ) / ( zj3n3(2) + pcocnv * zcolrate(in1a) )
+          ENDIF
+!       
+!--       Collision rate in the smallest bin, including nucleation and 
+!--       condensation(see Jacobson, Fundamentals of Atmospheric Modeling, 2nd 
+!--       Edition (2005), equation (16.73) )
+          zcolrate_ocnv = zcolrate
+          zcolrate_ocnv(in1a) = zcolrate_ocnv(in1a) + zj3n3(2) / pcocnv
+!       
+!--       Total sink for organic vapor
+          zcs_ocnv = zcs_tot + zj3n3(2) / pcocnv
+!       
+!--       New gas phase concentration (#/m3)
+          zcvap_new2 = pcocnv / ( 1.0_wp + ptstep * zcs_ocnv )
+!       
+!--       Change in gas concentration (#/m3)
+          zdvap2 = pcocnv - zcvap_new2
+!
+!--       Updated vapour concentration (#/m3)                
+          pcocnv = zcvap_new2
+!       
+!--       Volume change of particles (m3(OC)/m3(air))
+          zdvoloc = zcolrate_ocnv(in1a:fn2b) / zcs_ocnv * amvoc * zdvap2
+!       
+!--       Change of volume due to condensation in 1a-2b
+          paero(in1a:fn2b)%volc(2) = paero(in1a:fn2b)%volc(2) + zdvoloc  
+!       
+!--       Change of number concentration in the smallest bin caused by 
+!--       nucleation (Jacobson (2005), equation (16.75)). If zxocnv = 0, then  
+!--       the chosen nucleation mechanism doesn't take into account the non-
+!--       volatile organic vapors and thus the paero doesn't have to be updated.
+          IF ( zxocnv > 0.0_wp )  THEN
+             paero(in1a)%numc = paero(in1a)%numc + zn_vs_c * zdvoloc(in1a) /   &
+                                amvoc / ( n3 * zxocnv )
+          ENDIF
+       ENDIF
+!    
+!--    5.1.2) Semivolatile organic compound: all bins except subrange 1
+       zcs_ocsv = SUM( zcolrate(in2a:fn2b) ) !< sink for semi-volatile organics
+       IF ( pcocsv > 1.0E+10_wp  .AND.  zcs_ocsv > 1.0E-30  .AND.              &
+            is_used( prtcl,'OC') )                                             &
+       THEN
+!
+!--       New gas phase concentration (#/m3)
+          zcvap_new3 = pcocsv / ( 1.0_wp + ptstep * zcs_ocsv )
+!       
+!--       Change in gas concentration (#/m3)
+          zdvap3 = pcocsv - zcvap_new3 
+!       
+!--       Updated gas concentration (#/m3)                
+          pcocsv = zcvap_new3
+!       
+!--       Volume change of particles (m3(OC)/m3(air))
+          zdvoloc(in2a:fn2b) = zdvoloc(in2a:fn2b) + zcolrate(in2a:fn2b) /      &
+                               zcs_ocsv * amvoc * zdvap3
+!                            
+!--       Change of volume due to condensation in 1a-2b
+          paero(in1a:fn2b)%volc(2) = paero(in1a:fn2b)%volc(2) + zdvoloc 
+       ENDIF
+!
+!-- 5.2) Sulphate: condensed on all bins
+       IF ( pcsa > 1.0E+10_wp  .AND.  zcs_tot > 1.0E-30_wp  .AND.              &
+            is_used( prtcl,'SO4' ) )                                           &
+       THEN
+!    
+!--    Ratio of mass transfer between nucleation and condensation
+          zn_vs_c = 0.0_wp
+          IF ( zj3n3(1) > 1.0_wp )  THEN
+             zn_vs_c = ( zj3n3(1) ) / ( zj3n3(1) + pcsa * zcolrate(in1a) )
+          ENDIF
+!       
+!--       Collision rate in the smallest bin, including nucleation and 
+!--       condensation (see Jacobson, Fundamentals of Atmospheric Modeling, 2nd 
+!--       Edition (2005), equation (16.73))
+          zcolrate(in1a) = zcolrate(in1a) + zj3n3(1) / pcsa     
+!       
+!--       Total sink for sulfate (1/s)
+          zcs_su = zcs_tot + zj3n3(1) / pcsa
+!       
+!--       Sulphuric acid:
+!--       New gas phase concentration (#/m3)
+          zcvap_new1 = pcsa / ( 1.0_wp + ptstep * zcs_su )
+!       
+!--       Change in gas concentration (#/m3)
+          zdvap1 = pcsa - zcvap_new1
+!       
+!--       Updating vapour concentration (#/m3)
+          pcsa = zcvap_new1
+!       
+!--       Volume change of particles (m3(SO4)/m3(air)) by condensation
+          zdvolsa = zcolrate(in1a:fn2b) / zcs_su * amvh2so4 * zdvap1
+!--       For validation: zdvolsa = 5.5 mum3/cm3 per 12 h       
+       !   zdvolsa = zdvolsa / SUM( zdvolsa ) * 5.5E-12_wp * dt_salsa / 43200.0_wp  
+          !0.3E-12_wp, 0.6E-12_wp, 11.0E-12_wp, 4.6E-12_wp, 9.2E-12_wp    
+!       
+!--       Change of volume concentration of sulphate in aerosol [fxm]
+          paero(in1a:fn2b)%volc(1) = paero(in1a:fn2b)%volc(1) + zdvolsa
+!       
+!--       Change of number concentration in the smallest bin caused by nucleation
+!--       (Jacobson (2005), equation (16.75))
+          IF ( zxsa > 0.0_wp )  THEN
+             paero(in1a)%numc = paero(in1a)%numc + zn_vs_c * zdvolsa(in1a) /   &
+                                amvh2so4 / ( n3 * zxsa )
+          ENDIF
+       ENDIF
+    ENDIF
+!
+!
+!-- Condensation of water vapour
+    IF ( lscndh2oae )  THEN 
+       CALL gpparth2o( paero, ptemp, ppres, pcs, pcw, ptstep )
+    ENDIF
+!   
+!
+!-- Partitioning of H2O, HNO3, and NH3: Dissolutional growth
+    IF ( lscndgas  .AND.  ino > 0  .AND.  inh > 0  .AND.                       &
+         ( pchno3 > 1.0E+10_wp  .OR.  pcnh3 > 1.0E+10_wp ) )                   &
+    THEN
+       CALL gpparthno3( ppres, ptemp, paero, pchno3, pcnh3, pcw, pcs, zbeta,   &
+                        ptstep )
+    ENDIF
+    
+ END SUBROUTINE condensation
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the particle number and volume increase, and gas-phase
+!> concentration decrease due to nucleation subsequent growth to detectable size 
+!> of 3 nm.
+!
+!> Method:
+!> When the formed clusters grow by condensation (possibly also by self-
+!> coagulation), their number is reduced due to scavenging to pre-existing
+!> particles. Thus, the apparent nucleation rate at 3 nm is significantly lower
+!> than the real nucleation rate (at ~1 nm).
+!
+!> Calculation of the formation rate of detectable particles at 3 nm (i.e. J3):
+!> nj3 = 1: Kerminen, V.-M. and Kulmala, M. (2002), J. Aerosol Sci.,33, 609-622.
+!> nj3 = 2: Lehtinen et al. (2007), J. Aerosol Sci., 38(9), 988-994.
+!> nj3 = 3: Anttila et al. (2010), J. Aerosol Sci., 41(7), 621-636.
+!
+!> Called from subroutine condensation (in module salsa_dynamics_mod.f90)
+!
+!> Calls one of the following subroutines:
+!>  - binnucl
+!>  - ternucl
+!>  - kinnucl
+!>  - actnucl
+!
+!> fxm: currently only sulphuric acid grows particles from 1 to 3 nm
+!>  (if asked from Markku, this is terribly wrong!!!)
+!
+!> Coded by:
+!> Hannele Korhonen (FMI) 2005
+!> Harri Kokkola (FMI) 2006
+!> Matti Niskanen(FMI) 2012
+!> Anton Laakso  (FMI) 2013
+!------------------------------------------------------------------------------!
+
+ SUBROUTINE nucleation( paero, ptemp, prh, ppres, pcsa, pcocnv, pcnh3, ptstep, &
+                        pj3n3, pxsa, pxocnv )
+    IMPLICIT NONE
+!       
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pcnh3    !< ammonia concentration (#/m3) 
+    REAL(wp), INTENT(in) ::  pcocnv   !< conc. of non-volatile OC (#/m3)      
+    REAL(wp), INTENT(in) ::  pcsa     !< sulphuric acid conc. (#/m3)
+    REAL(wp), INTENT(in) ::  ppres    !< ambient air pressure (Pa)
+    REAL(wp), INTENT(in) ::  prh      !< ambient rel. humidity [0-1]       
+    REAL(wp), INTENT(in) ::  ptemp    !< ambient temperature (K)
+    REAL(wp), INTENT(in) ::  ptstep   !< time step (s) of SALSA
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b) !< aerosol properties                                                  
+    REAL(wp), INTENT(inout) ::  pj3n3(2) !< formation mass rate of molecules 
+                                         !< (molec/m3s) for 1: H2SO4 and 
+                                         !< 2: organic vapour 
+    REAL(wp), INTENT(out) ::  pxocnv !< ratio of non-volatile organic vapours in
+                                     !< 3nm aerosol particles
+    REAL(wp), INTENT(out) ::  pxsa   !< ratio of H2SO4 in 3nm aerosol particles
+!-- Local variables
+    INTEGER(iwp) ::  iteration
+    REAL(wp) ::  zbeta(fn2b)  !< transitional correction factor                                         
+    REAL(wp) ::  zc_h2so4     !< H2SO4 conc. (#/cm3) !UNITS!
+    REAL(wp) ::  zc_org       !< organic vapour conc. (#/cm3)
+    REAL(wp) ::  zCoagStot    !< total losses due to coagulation, including 
+                              !< condensation and self-coagulation       
+    REAL(wp) ::  zcocnv_local !< organic vapour conc. (#/m3) 
+    REAL(wp) ::  zcsink       !< condensational sink (#/m2)       
+    REAL(wp) ::  zcsa_local   !< H2SO4 conc. (#/m3)       
+    REAL(wp) ::  zdcrit       !< diameter of critical cluster (m)
+    REAL(wp) ::  zdelta_vap   !< change of H2SO4 and organic vapour
+                              !< concentration (#/m3)       
+    REAL(wp) ::  zdfvap       !< air diffusion coefficient (m2/s)
+    REAL(wp) ::  zdmean       !< mean diameter of existing particles (m) 
+    REAL(wp) ::  zeta         !< constant: proportional to ratio of CS/GR (m) 
+                              !< (condensation sink / growth rate)                                   
+    REAL(wp) ::  zgamma       !< proportionality factor ((nm2*m2)/h)                                        
+    REAL(wp) ::  zGRclust     !< growth rate of formed clusters (nm/h)
+    REAL(wp) ::  zGRtot       !< total growth rate        
+    REAL(wp) ::  zj3          !< number conc. of formed 3nm particles (#/m3)       
+    REAL(wp) ::  zjnuc        !< nucleation rate at ~1nm (#/m3s)
+    REAL(wp) ::  zKeff        !< effective cogulation coefficient between 
+                              !< freshly nucleated particles       
+    REAL(wp) ::  zknud(fn2b)  !< particle Knudsen number       
+    REAL(wp) ::  zkocnv       !< lever: zkocnv=1 --> organic compounds involved
+                              !< in nucleation    
+    REAL(wp) ::  zksa         !< lever: zksa=1 --> H2SO4 involved in nucleation 
+    REAL(wp) ::  zlambda      !< parameter for adjusting the growth rate due to 
+                              !< self-coagulation                                  
+    REAL(wp) ::  zmfp         !< mean free path of condesing vapour(m)                                        
+    REAL(wp) ::  zmixnh3      !< ammonia mixing ratio (ppt)
+    REAL(wp) ::  zNnuc        !< number of clusters/particles at the size range
+                              !< d1-dx (#/m3)  
+    REAL(wp) ::  znoc         !< number of organic molecules in critical cluster
+    REAL(wp) ::  znsa         !< number of H2SO4 molecules in critical cluster                                           
+!
+!-- Variable determined for the m-parameter
+    REAL(wp) ::  zCc_2(fn2b) !<
+    REAL(wp) ::  zCc_c !<
+    REAL(wp) ::  zCc_x !<
+    REAL(wp) ::  zCoagS_c !<
+    REAL(wp) ::  zCoagS_x !<
+    REAL(wp) ::  zcv_2(fn2b) !<
+    REAL(wp) ::  zcv_c !<
+    REAL(wp) ::  zcv_c2(fn2b) !<
+    REAL(wp) ::  zcv_x !<
+    REAL(wp) ::  zcv_x2(fn2b) !<
+    REAL(wp) ::  zDc_2(fn2b) !<
+    REAL(wp) ::  zDc_c(fn2b) !<
+    REAL(wp) ::  zDc_c2(fn2b) !<
+    REAL(wp) ::  zDc_x(fn2b) !<
+    REAL(wp) ::  zDc_x2(fn2b) !<
+    REAL(wp) ::  zgammaF_2(fn2b) !<
+    REAL(wp) ::  zgammaF_c(fn2b) !<
+    REAL(wp) ::  zgammaF_x(fn2b) !<
+    REAL(wp) ::  zK_c2(fn2b) !<
+    REAL(wp) ::  zK_x2(fn2b) !<
+    REAL(wp) ::  zknud_2(fn2b) !<
+    REAL(wp) ::  zknud_c !<
+    REAL(wp) ::  zknud_x !<       
+    REAL(wp) ::  zm_2(fn2b) !<
+    REAL(wp) ::  zm_c !<
+    REAL(wp) ::  zm_para !<
+    REAL(wp) ::  zm_x !<
+    REAL(wp) ::  zmyy !<
+    REAL(wp) ::  zomega_2c(fn2b) !<
+    REAL(wp) ::  zomega_2x(fn2b) !<
+    REAL(wp) ::  zomega_c(fn2b) !<
+    REAL(wp) ::  zomega_x(fn2b) !<
+    REAL(wp) ::  zRc2(fn2b) !<
+    REAL(wp) ::  zRx2(fn2b) !<
+    REAL(wp) ::  zsigma_c2(fn2b) !<
+    REAL(wp) ::  zsigma_x2(fn2b) !<
+!
+!-- 1) Nucleation rate (zjnuc) and diameter of critical cluster (zdcrit)
+    zjnuc  = 0.0_wp
+    znsa   = 0.0_wp
+    znoc   = 0.0_wp
+    zdcrit = 0.0_wp
+    zksa   = 0.0_wp
+    zkocnv = 0.0_wp
+    
+    SELECT CASE ( nsnucl )
+    
+    CASE(1)   ! Binary H2SO4-H2O nucleation
+       
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit,  zksa, &
+                     zkocnv )      
+    
+    CASE(2)   ! Activation type nucleation
+    
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa,  znoc, zdcrit, zksa,  &
+                     zkocnv )
+       CALL actnucl( pcsa, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv, act_coeff )
+    
+    CASE(3)   ! Kinetically limited nucleation of (NH4)HSO4 clusters
+       
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa,    &
+                     zkocnv )
+
+       CALL kinnucl( zc_h2so4, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+    
+    CASE(4)   ! Ternary H2SO4-H2O-NH3 nucleation
+    
+       zmixnh3 = pcnh3 * ptemp * argas / ( ppres * avo )
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       CALL ternucl( zc_h2so4, zmixnh3, ptemp, prh, zjnuc, znsa, znoc, zdcrit, &
+                     zksa, zkocnv ) 
+    
+    CASE(5)   ! Organic nucleation, J~[ORG] or J~[ORG]**2
+    
+       zc_org = pcocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa,    &
+                     zkocnv )  
+       CALL orgnucl( pcocnv, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+    
+    CASE(6)   ! Sum of H2SO4 and organic activation type nucleation, 
+              ! J~[H2SO4]+[ORG]
+       
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa,    &
+                     zkocnv )  
+       CALL sumnucl( pcsa, pcocnv, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+
+            
+    CASE(7)   ! Heteromolecular nucleation, J~[H2SO4]*[ORG]
+       
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       zc_org = pcocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa,    &
+                     zkocnv )  
+       CALL hetnucl( zc_h2so4, zc_org, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+    
+    CASE(8)   ! Homomolecular nucleation of H2SO4 and heteromolecular 
+              ! nucleation of H2SO4 and organic vapour, 
+              ! J~[H2SO4]**2 + [H2SO4]*[ORG] (EUCAARI project)
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       zc_org = pcocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa,    &
+                     zkocnv )  
+       CALL SAnucl( zc_h2so4, zc_org, zjnuc, zdcrit, znsa, znoc, zksa, zkocnv )
+    
+    CASE(9)   ! Homomolecular nucleation of H2SO4 and organic vapour and
+              ! heteromolecular nucleation of H2SO4 and organic vapour,
+              ! J~[H2SO4]**2 + [H2SO4]*[ORG]+[ORG]**2 (EUCAARI project)
+    
+       zc_h2so4 = pcsa * 1.0E-6_wp   ! sulphuric acid conc. to #/cm3
+       zc_org = pcocnv * 1.0E-6_wp   ! conc. of non-volatile OC to #/cm3
+       CALL binnucl( zc_h2so4, ptemp, prh, zjnuc, znsa, znoc, zdcrit, zksa,    &
+                     zkocnv )  
+
+       CALL SAORGnucl( zc_h2so4, zc_org, zjnuc, zdcrit, znsa, znoc, zksa,      &
+                       zkocnv )
+    END SELECT
+    
+    zcsa_local = pcsa
+    zcocnv_local = pcocnv
+!
+!-- 2) Change of particle and gas concentrations due to nucleation
+!          
+!-- 2.1) Check that there is enough H2SO4 and organic vapour to produce the
+!--      nucleation  
+    IF ( nsnucl <= 4 )  THEN 
+!--    If the chosen nucleation scheme is 1-4, nucleation occurs only due to 
+!--    H2SO4. All of the total vapour concentration that is taking part to the
+!--    nucleation is there for sulphuric acid (sa = H2SO4) and non-volatile 
+!--    organic vapour is zero.
+       pxsa   = 1.0_wp   ! ratio of sulphuric acid in 3nm particles 
+       pxocnv = 0.0_wp   ! ratio of non-volatile origanic vapour
+                                ! in 3nm particles
+    ELSEIF ( nsnucl > 4 )  THEN
+!--    If the chosen nucleation scheme is 5-9, nucleation occurs due to organic
+!--    vapour or the combination of organic vapour and H2SO4. The number of 
+!--    needed molecules depends on the chosen nucleation type and it has an 
+!--    effect also on the minimum ratio of the molecules present. 
+       IF ( pcsa * znsa + pcocnv * znoc < 1.E-14_wp )  THEN
+          pxsa   = 0.0_wp
+          pxocnv = 0.0_wp             
+       ELSE
+          pxsa   = pcsa * znsa / ( pcsa * znsa + pcocnv * znoc ) 
+          pxocnv = pcocnv * znoc / ( pcsa * znsa + pcocnv * znoc )
+       ENDIF  
+    ENDIF
+!    
+!-- The change in total vapour concentration is the sum of the concentrations
+!-- of the vapours taking part to the nucleation (depends on the chosen 
+!-- nucleation scheme)
+    zdelta_vap = MIN( zjnuc * ( znoc + znsa ), ( pcocnv * zkocnv + pcsa *      &
+                      zksa ) / ptstep ) 
+!                      
+!-- Nucleation rate J at ~1nm (#/m3s)                           
+    zjnuc = zdelta_vap / ( znoc + znsa )
+!    
+!-- H2SO4 concentration after nucleation in #/m3            
+    zcsa_local = MAX( 1.0_wp, pcsa - zdelta_vap * pxsa ) 
+!    
+!-- Non-volative organic vapour concentration after nucleation (#/m3)
+    zcocnv_local = MAX( 1.0_wp, pcocnv - zdelta_vap * pxocnv )
+!
+!-- 2.2) Formation rate of 3 nm particles (Kerminen & Kulmala, 2002)
+!
+!-- 2.2.1) Growth rate of clusters formed by H2SO4
+!
+!-- GR = 3.0e-15 / dens_clus * sum( molecspeed * molarmass * conc )
+!  
+!-- dens_clus  = density of the clusters (here 1830 kg/m3) 
+!-- molarmass  = molar mass of condensing species (here 98.08 g/mol)
+!-- conc       = concentration of condensing species [#/m3]
+!-- molecspeed = molecular speed of condensing species [m/s]
+!--            = sqrt( 8.0 * R * ptemp / ( pi * molarmass ) )
+!-- (Seinfeld & Pandis, 1998)
+!
+!-- Growth rate by H2SO4 and organic vapour in nm/h (Eq. 21)
+    zGRclust = 2.3623E-15_wp * SQRT( ptemp ) * ( zcsa_local + zcocnv_local )
+!    
+!-- 2.2.2) Condensational sink of pre-existing particle population
+!
+!-- Diffusion coefficient (m2/s)
+    zdfvap = 5.1111E-10_wp * ptemp ** 1.75_wp * ( p_0 + 1325.0_wp ) / ppres
+!-- Mean free path of condensing vapour (m) (Jacobson (2005), Eq. 15.25 and 
+!-- 16.29)
+    zmfp = 3.0_wp * zdfvap * SQRT( pi * amh2so4 / ( 8.0_wp * argas * ptemp ) )
+!-- Knudsen number            
+    zknud = 2.0_wp * zmfp / ( paero(:)%dwet + d_sa )                     
+!-- Transitional regime correction factor (zbeta) according to Fuchs and 
+!-- Sutugin (1971), In: Hidy et al. (ed.), Topics in current  aerosol research,
+!-- Pergamon. (Eq. 4 in Kerminen and Kulmala, 2002)
+    zbeta = ( zknud + 1.0_wp) / ( 0.377_wp * zknud + 1.0_wp + 4.0_wp /         &
+            ( 3.0_wp * massacc ) * ( zknud + zknud ** 2 ) )  
+!-- Condensational sink (#/m2) (Eq. 3)
+    zcsink = SUM( paero(:)%dwet * zbeta * paero(:)%numc )
+!
+!-- Parameterised formation rate of detectable 3 nm particles (i.e. J3)
+    IF ( nj3 == 1 )  THEN   ! Kerminen and Kulmala (2002)
+!--    2.2.3) Parameterised formation rate of detectable 3 nm particles
+!--    Constants needed for the parameterisation:
+!--    dapp = 3 nm and dens_nuc = 1830 kg/m3
+       IF ( zcsink < 1.0E-30_wp )  THEN 
+          zeta = 0._dp
+       ELSE
+!--       Mean diameter of backgroud population (nm)
+          zdmean = 1.0_wp / SUM( paero(:)%numc ) * SUM( paero(:)%numc *        &
+                   paero(:)%dwet ) * 1.0E+9_wp
+!--       Proportionality factor (nm2*m2/h) (Eq. 22)
+          zgamma = 0.23_wp * ( zdcrit * 1.0E+9_wp ) ** 0.2_wp * ( zdmean /     &
+                 150.0_wp ) ** 0.048_wp * ( ptemp / 293.0_wp ) ** ( -0.75_wp ) &
+                 * ( arhoh2so4 / 1000.0_wp ) ** ( -0.33_wp )
+!--       Factor eta (nm) (Eq. 11)
+          zeta = MIN( zgamma * zcsink / zGRclust, zdcrit * 1.0E11_wp ) 
+       ENDIF
+!       
+!--    Number conc. of clusters surviving to 3 nm in a time step (#/m3) (Eq.14)
+       zj3 = zjnuc * EXP( MIN( 0.0_wp, zeta / 3.0_wp - zeta /                  &
+                               ( zdcrit * 1.0E9_wp ) ) )                    
+
+    ELSEIF ( nj3 > 1 )  THEN
+!--    Defining the value for zm_para. The growth is investigated between
+!--    [d1,reglim(1)] = [zdcrit,3nm]    
+!--    m = LOG( CoagS_dx / CoagX_zdcrit ) / LOG( reglim / zdcrit ) 
+!--    (Lehtinen et al. 2007, Eq. 5)
+!--    The steps for the coagulation sink for reglim = 3nm and zdcrit ~= 1nm are
+!--    explained in article of Kulmala et al. (2001). The particles of diameter
+!--    zdcrit ~1.14 nm  and reglim = 3nm are both in turn the "number 1" 
+!--    variables (Kulmala et al. 2001).             
+!--    c = critical (1nm), x = 3nm, 2 = wet or mean droplet
+!--    Sum of the radii, R12 = R1 + zR2 (m) of two particles 1 and 2
+       zRc2 = zdcrit / 2.0_wp + paero(:)%dwet / 2.0_wp
+       zRx2 = reglim(1) / 2.0_wp + paero(:)%dwet / 2.0_wp
+!       
+!--    The mass of particle (kg) (comes only from H2SO4)
+       zm_c = 4.0_wp / 3.0_wp * pi * ( zdcrit / 2.0_wp ) ** 3.0_wp * arhoh2so4                     
+       zm_x = 4.0_wp / 3.0_wp * pi * ( reglim(1) / 2.0_wp ) ** 3.0_wp *        &
+              arhoh2so4                  
+       zm_2 = 4.0_wp / 3.0_wp * pi * ( paero(:)%dwet / 2.0_wp )** 3.0_wp *     &
+              arhoh2so4
+!              
+!--    Mean relative thermal velocity between the particles (m/s)
+       zcv_c = SQRT( 8.0_wp * abo * ptemp / ( pi * zm_c ) )
+       zcv_x = SQRT( 8.0_wp * abo * ptemp / ( pi * zm_x ) )
+       zcv_2 = SQRT( 8.0_wp * abo * ptemp / ( pi * zm_2 ) )
+!       
+!--    Average velocity after coagulation               
+       zcv_c2 = SQRT( zcv_c ** 2.0_wp + zcv_2 ** 2.0_wp )
+       zcv_x2 = SQRT( zcv_x ** 2.0_wp + zcv_2 ** 2.0_wp )
+!       
+!--    Knudsen number (zmfp = mean free path of condensing vapour)
+       zknud_c = 2.0_wp * zmfp / zdcrit
+       zknud_x = 2.0_wp * zmfp / reglim(1)
+       zknud_2 = MAX( 0.0_wp, 2.0_wp * zmfp / paero(:)%dwet )
+!
+!--    Cunningham correction factor                
+       zCc_c = 1.0_wp + zknud_c * ( 1.142_wp + 0.558_wp *                      &
+               EXP( -0.999_wp / zknud_c ) ) 
+       zCc_x = 1.0_wp + zknud_x * ( 1.142_wp + 0.558_wp *                      &
+               EXP( -0.999_wp / zknud_x ) )
+       zCc_2 = 1.0_wp + zknud_2 * ( 1.142_wp + 0.558_wp *                      &
+               EXP( -0.999_wp / zknud_2 ) )
+!                      
+!--    Gas dynamic viscosity (N*s/m2). 
+!--    Viscocity(air @20C) = 1.81e-5_dp N/m2 *s (Hinds, p. 25)                      
+       zmyy = 1.81E-5_wp * ( ptemp / 293.0_wp) ** ( 0.74_wp ) 
+!       
+!--    Particle diffusion coefficient (m2/s)                
+       zDc_c = abo * ptemp * zCc_c / ( 3.0_wp * pi * zmyy * zdcrit )  
+       zDc_x = abo * ptemp * zCc_x / ( 3.0_wp * pi * zmyy * reglim(1) )
+       zDc_2 = abo * ptemp * zCc_2 / ( 3.0_wp * pi * zmyy * paero(:)%dwet )
+!       
+!--    D12 = D1+D2 (Seinfield and Pandis, 2nd ed. Eq. 13.38)
+       zDc_c2 = zDc_c + zDc_2   
+       zDc_x2 = zDc_x + zDc_2 
+!       
+!--    zgammaF = 8*D/pi/zcv (m) for calculating zomega
+       zgammaF_c = 8.0_wp * zDc_c / pi / zcv_c 
+       zgammaF_x = 8.0_wp * zDc_x / pi / zcv_x
+       zgammaF_2 = 8.0_wp * zDc_2 / pi / zcv_2
+!       
+!--    zomega (m) for calculating zsigma              
+       zomega_c = ( ( zRc2 + zgammaF_c ) ** 3 - ( zRc2 ** 2 +                  &
+                      zgammaF_c ) ** ( 3.0_wp / 2.0_wp ) ) / ( 3.0_wp *        &
+                      zRc2 * zgammaF_c ) - zRc2  
+       zomega_x = ( ( zRx2 + zgammaF_x ) ** 3.0_wp - ( zRx2 ** 2.0_wp +        &
+                      zgammaF_x ) ** ( 3.0_wp / 2.0_wp ) ) / ( 3.0_wp *        &
+                      zRx2 * zgammaF_x ) - zRx2
+       zomega_2c = ( ( zRc2 + zgammaF_2 ) ** 3.0_wp - ( zRc2 ** 2.0_wp +       &
+                       zgammaF_2 ) ** ( 3.0_wp / 2.0_wp ) ) / ( 3.0_wp *       &
+                       zRc2 * zgammaF_2 ) - zRc2 
+       zomega_2x = ( ( zRx2 + zgammaF_2 ) ** 3.0_wp - ( zRx2 ** 2.0_wp +       &
+                       zgammaF_2 ) ** ( 3.0_wp / 2.0_wp ) ) / ( 3.0_wp *       &
+                       zRx2 * zgammaF_2 ) - zRx2 
+!                       
+!--    The distance (m) at which the two fluxes are matched (condensation and
+!--    coagulation sinks?)           
+       zsigma_c2 = SQRT( zomega_c ** 2.0_wp + zomega_2c ** 2.0_wp ) 
+       zsigma_x2 = SQRT( zomega_x ** 2.0_wp + zomega_2x ** 2.0_wp ) 
+!       
+!--    Coagulation coefficient in the continuum regime (m*m2/s)
+       zK_c2 = 4.0_wp * pi * zRc2 * zDc_c2 / ( zRc2 / ( zRc2 + zsigma_c2 ) +   &
+               4.0_wp * zDc_c2 / ( zcv_c2 * zRc2 ) ) 
+       zK_x2 = 4.0_wp * pi * zRx2 * zDc_x2 / ( zRx2 / ( zRx2 + zsigma_x2 ) +   &
+               4.0_wp * zDc_x2 / ( zcv_x2 * zRx2 ) )
+!               
+!--    Coagulation sink (1/s)
+       zCoagS_c = MAX( 1.0E-20_wp, SUM( zK_c2 * paero(:)%numc ) )          
+       zCoagS_x = MAX( 1.0E-20_wp, SUM( zK_x2 * paero(:)%numc ) ) 
+!       
+!--    Parameter m for calculating the coagulation sink onto background 
+!--    particles (Eq. 5&6 in Lehtinen et al. 2007)             
+       zm_para = LOG( zCoagS_x / zCoagS_c ) / LOG( reglim(1) / zdcrit )
+!       
+!--    Parameter gamma for calculating the formation rate J of particles having
+!--    a diameter zdcrit < d < reglim(1) (Anttila et al. 2010, eq. 5)
+       zgamma = ( ( ( reglim(1) / zdcrit ) ** ( zm_para + 1.0_wp ) ) - 1.0_wp )&
+                / ( zm_para + 1.0_wp )     
+                
+       IF ( nj3 == 2 )  THEN   ! Coagulation sink
+!       
+!--       Formation rate J before iteration (#/m3s)                
+          zj3 = zjnuc * EXP( MIN( 0.0_wp, -zgamma * zdcrit * zCoagS_c /        &
+                ( zGRclust * 1.0E-9_wp / ( 60.0_wp ** 2.0_wp ) ) ) )
+                
+       ELSEIF ( nj3 == 3 )  THEN  ! Coagulation sink and self-coag.
+!--       IF polluted air... then the self-coagulation becomes important. 
+!--       Self-coagulation of small particles < 3 nm.
+!
+!--       "Effective" coagulation coefficient between freshly-nucleated 
+!--       particles:
+          zKeff = 5.0E-16_wp   ! cm3/s
+!          
+!--       zlambda parameter for "adjusting" the growth rate due to the 
+!--       self-coagulation
+          zlambda = 6.0_wp 
+          IF ( reglim(1) >= 10.0E-9_wp )  THEN   ! for particles >10 nm:
+             zKeff   = 5.0E-17_wp
+             zlambda = 3.0_wp
+          ENDIF
+!          
+!--       Initial values for coagulation sink and growth rate  (m/s)
+          zCoagStot = zCoagS_c
+          zGRtot = zGRclust * 1.0E-9_wp / 60.0_wp ** 2.0_wp 
+!          
+!--       Number of clusters/particles at the size range [d1,dx] (#/m3):
+          zNnuc = zjnuc / zCoagStot !< Initial guess 
+!          
+!--       Coagulation sink and growth rate due to self-coagulation:
+          DO  iteration = 1, 5
+             zCoagStot = zCoagS_c + zKeff * zNnuc * 1.0E-6_wp   ! (1/s)  
+             zGRtot = zGRclust * 1.0E-9_wp / ( 3600.0_wp ) +  1.5708E-6_wp *   &
+                      zlambda * zdcrit ** 3.0_wp * ( zNnuc * 1.0E-6_wp ) *     &
+                      zcv_c * avo * 1.0E-9_wp / 3600.0_wp 
+             zeta = - zCoagStot / ( ( zm_para + 1.0_wp ) * zGRtot * ( zdcrit **&
+                      zm_para ) )   ! Eq. 7b (Anttila) 
+             zNnuc =  zNnuc_tayl( zdcrit, reglim(1), zm_para, zjnuc, zeta,     &
+                      zGRtot )
+          ENDDO
+!          
+!--       Calculate the final values with new zNnuc:	
+          zCoagStot = zCoagS_c + zKeff * zNnuc * 1.0E-6_wp   ! (1/s) 
+          zGRtot = zGRclust * 1.0E-9_wp / 3600.0_wp + 1.5708E-6_wp *  zlambda  &
+                   * zdcrit ** 3.0_wp * ( zNnuc * 1.0E-6_wp ) * zcv_c * avo *  &
+                   1.0E-9_wp / 3600.0_wp !< (m/s)
+          zj3 = zjnuc * EXP( MIN( 0.0_wp, -zgamma * zdcrit * zCoagStot /       &
+                zGRtot ) )   ! (Eq. 5a) (#/m3s)
+                
+       ENDIF
+       
+    ENDIF
+!-- If J3 very small (< 1 #/cm3), neglect particle formation. In real atmosphere
+!-- this would mean that clusters form but coagulate to pre-existing particles 
+!-- who gain sulphate. Since CoagS ~ CS (4piD*CS'), we do *not* update H2SO4 
+!-- concentration here but let condensation take care of it.
+!-- Formation mass rate of molecules (molec/m3s) for 1: H2SO4 and 2: organic 
+!-- vapour
+    pj3n3(1) = zj3 * n3 * pxsa
+    pj3n3(2) = zj3 * n3 * pxocnv
+                                  
+                         
+ END SUBROUTINE nucleation
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the nucleation rate and the size of critical clusters assuming 
+!> binary nucleation. 
+!> Parametrisation according to Vehkamaki et al. (2002), J. Geophys. Res., 
+!> 107(D22), 4622. Called from subroutine nucleation. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE binnucl( pc_sa, ptemp, prh, pnuc_rate, pn_crit_sa, pn_crit_ocnv,   &
+                     pd_crit, pk_sa, pk_ocnv )
+                    
+    IMPLICIT NONE
+!       
+!-- Input and output variables        
+    REAL(wp), INTENT(in) ::   pc_sa        !< H2SO4 conc. (#/cm3)
+    REAL(wp), INTENT(in) ::   prh          !< relative humidity [0-1]       
+    REAL(wp), INTENT(in) ::   ptemp        !< ambient temperature (K)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucleation rate (#/(m3 s))
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pd_crit      !< diameter of critical cluster (m)
+    REAL(wp), INTENT(out) ::  pk_sa        !< Lever: if pk_sa = 1, H2SO4 is
+                                           !< involved in nucleation. 
+    REAL(wp), INTENT(out) ::  pk_ocnv      !< Lever: if pk_ocnv = 1, organic
+                                           !< compounds are involved in
+                                           !< nucleation. 
+!-- Local variables
+    REAL(wp) ::  zx    !< mole fraction of sulphate in critical cluster
+    REAL(wp) ::  zntot !< number of molecules in critical cluster
+    REAL(wp) ::  zt    !< temperature
+    REAL(wp) ::  zpcsa !< sulfuric acid concentration
+    REAL(wp) ::  zrh   !< relative humidity
+    REAL(wp) ::  zma   !<
+    REAL(wp) ::  zmw   !<
+    REAL(wp) ::  zxmass!<
+    REAL(wp) ::  za    !<
+    REAL(wp) ::  zb    !<
+    REAL(wp) ::  zc    !<
+    REAL(wp) ::  zroo  !<
+    REAL(wp) ::  zm1   !<
+    REAL(wp) ::  zm2   !<
+    REAL(wp) ::  zv1   !<
+    REAL(wp) ::  zv2   !<
+    REAL(wp) ::  zcoll !<
+    
+    pnuc_rate = 0.0_wp
+    pd_crit   = 1.0E-9_wp
+
+!             
+!-- 1) Checking that we are in the validity range of the parameterization  
+    zt    = MAX( ptemp, 190.15_wp )
+    zt    = MIN( zt,    300.15_wp )
+    zpcsa = MAX( pc_sa, 1.0E4_wp  )
+    zpcsa = MIN( zpcsa, 1.0E11_wp ) 
+    zrh   = MAX( prh,   0.0001_wp )
+    zrh   = MIN( zrh,   1.0_wp    )
+!               
+!-- 2) Mole fraction of sulphate in a critical cluster (Eq. 11)
+    zx = 0.7409967177282139_wp                                           &
+         - 0.002663785665140117_wp * zt                                  &
+         + 0.002010478847383187_wp * LOG( zrh )                          &
+         - 0.0001832894131464668_wp* zt * LOG( zrh )                     &
+         + 0.001574072538464286_wp * LOG( zrh ) ** 2                     &
+         - 0.00001790589121766952_wp * zt * LOG( zrh ) ** 2              &
+         + 0.0001844027436573778_wp * LOG( zrh ) ** 3                    &
+         - 1.503452308794887E-6_wp * zt * LOG( zrh ) ** 3                &
+         - 0.003499978417957668_wp * LOG( zpcsa )                        &
+         + 0.0000504021689382576_wp * zt * LOG( zpcsa )
+!                   
+!-- 3) Nucleation rate (Eq. 12)
+    pnuc_rate = 0.1430901615568665_wp                                    &
+        + 2.219563673425199_wp * zt                                      &
+        - 0.02739106114964264_wp * zt ** 2                               &
+        + 0.00007228107239317088_wp * zt ** 3                            &
+        + 5.91822263375044_wp / zx                                       &
+        + 0.1174886643003278_wp * LOG( zrh )                             &
+        + 0.4625315047693772_wp * zt * LOG( zrh )                        &
+        - 0.01180591129059253_wp * zt ** 2 * LOG( zrh )                  &
+        + 0.0000404196487152575_wp * zt ** 3 * LOG( zrh )                &
+        + ( 15.79628615047088_wp * LOG( zrh ) ) / zx                     &
+        - 0.215553951893509_wp * LOG( zrh ) ** 2                         &
+        - 0.0810269192332194_wp * zt * LOG( zrh ) ** 2                   &
+        + 0.001435808434184642_wp * zt ** 2 * LOG( zrh ) ** 2            &
+        - 4.775796947178588E-6_wp * zt ** 3 * LOG( zrh ) ** 2            &
+        - (2.912974063702185_wp * LOG( zrh ) ** 2 ) / zx                 &
+        - 3.588557942822751_wp * LOG( zrh ) ** 3                         &
+        + 0.04950795302831703_wp * zt * LOG( zrh ) ** 3                  &
+        - 0.0002138195118737068_wp * zt ** 2 * LOG( zrh ) ** 3           &
+        + 3.108005107949533E-7_wp * zt ** 3 * LOG( zrh ) ** 3            &
+        - ( 0.02933332747098296_wp * LOG( zrh ) ** 3 ) / zx              &
+        + 1.145983818561277_wp * LOG( zpcsa )                            &
+        - 0.6007956227856778_wp * zt * LOG( zpcsa )                      &
+        + 0.00864244733283759_wp * zt ** 2 * LOG( zpcsa )                &
+        - 0.00002289467254710888_wp * zt ** 3 * LOG( zpcsa )             &
+        - ( 8.44984513869014_wp * LOG( zpcsa ) ) / zx                    &
+        + 2.158548369286559_wp * LOG( zrh ) * LOG( zpcsa )               &
+        + 0.0808121412840917_wp * zt * LOG( zrh ) * LOG( zpcsa )         &
+        - 0.0004073815255395214_wp * zt ** 2 * LOG( zrh ) * LOG( zpcsa ) &
+        - 4.019572560156515E-7_wp * zt ** 3 * LOG( zrh ) * LOG( zpcsa )  & 
+        + ( 0.7213255852557236_wp * LOG( zrh ) * LOG( zpcsa ) ) / zx     &
+        + 1.62409850488771_wp * LOG( zrh ) ** 2 * LOG( zpcsa )           &
+        - 0.01601062035325362_wp * zt * LOG( zrh ) ** 2 * LOG( zpcsa )   &
+        + 0.00003771238979714162_wp*zt**2* LOG( zrh )**2 * LOG( zpcsa )  &
+        + 3.217942606371182E-8_wp * zt**3 * LOG( zrh )**2 * LOG( zpcsa ) &
+        - (0.01132550810022116_wp * LOG( zrh )**2 * LOG( zpcsa ) ) / zx  &
+        + 9.71681713056504_wp * LOG( zpcsa ) ** 2                        &
+        - 0.1150478558347306_wp * zt * LOG( zpcsa ) ** 2                 &
+        + 0.0001570982486038294_wp * zt ** 2 * LOG( zpcsa ) ** 2         &
+        + 4.009144680125015E-7_wp * zt ** 3 * LOG( zpcsa ) ** 2          &
+        + ( 0.7118597859976135_wp * LOG( zpcsa ) ** 2 ) / zx             &
+        - 1.056105824379897_wp * LOG( zrh ) * LOG( zpcsa ) ** 2          &
+        + 0.00903377584628419_wp * zt * LOG( zrh ) * LOG( zpcsa )**2     &
+        - 0.00001984167387090606_wp*zt**2*LOG( zrh )*LOG( zpcsa )**2     &
+        + 2.460478196482179E-8_wp * zt**3 * LOG( zrh ) * LOG( zpcsa )**2 &
+        - ( 0.05790872906645181_wp * LOG( zrh ) * LOG( zpcsa )**2 ) / zx &
+        - 0.1487119673397459_wp * LOG( zpcsa ) ** 3                      &
+        + 0.002835082097822667_wp * zt * LOG( zpcsa ) ** 3               &
+        - 9.24618825471694E-6_wp * zt ** 2 * LOG( zpcsa ) ** 3           &
+        + 5.004267665960894E-9_wp * zt ** 3 * LOG( zpcsa ) ** 3          &
+        - ( 0.01270805101481648_wp * LOG( zpcsa ) ** 3 ) / zx
+!           
+!-- Nucleation rate in #/(cm3 s)
+    pnuc_rate = EXP( pnuc_rate ) 
+!       
+!-- Check the validity of parameterization
+    IF ( pnuc_rate < 1.0E-7_wp )  THEN 
+       pnuc_rate = 0.0_wp
+       pd_crit   = 1.0E-9_wp
+    ENDIF
+!                
+!-- 4) Total number of molecules in the critical cluster (Eq. 13)
+    zntot = - 0.002954125078716302_wp                                    &
+      - 0.0976834264241286_wp * zt                                       &
+      + 0.001024847927067835_wp * zt ** 2                                &
+      - 2.186459697726116E-6_wp * zt ** 3                                &
+      - 0.1017165718716887_wp / zx                                       &
+      - 0.002050640345231486_wp * LOG( zrh )                             &
+      - 0.007585041382707174_wp * zt * LOG( zrh )                        &
+      + 0.0001926539658089536_wp * zt ** 2 * LOG( zrh )                  &
+      - 6.70429719683894E-7_wp * zt ** 3 * LOG( zrh )                    &
+      - ( 0.2557744774673163_wp * LOG( zrh ) ) / zx                      &
+      + 0.003223076552477191_wp * LOG( zrh ) ** 2                        &
+      + 0.000852636632240633_wp * zt * LOG( zrh ) ** 2                   &
+      - 0.00001547571354871789_wp * zt ** 2 * LOG( zrh ) ** 2            &
+      + 5.666608424980593E-8_wp * zt ** 3 * LOG( zrh ) ** 2              &
+      + ( 0.03384437400744206_wp * LOG( zrh ) ** 2 ) / zx                &
+      + 0.04743226764572505_wp * LOG( zrh ) ** 3                         &
+      - 0.0006251042204583412_wp * zt * LOG( zrh ) ** 3                  &
+      + 2.650663328519478E-6_wp * zt ** 2 * LOG( zrh ) ** 3              &
+      - 3.674710848763778E-9_wp * zt ** 3 * LOG( zrh ) ** 3              &
+      - ( 0.0002672510825259393_wp * LOG( zrh ) ** 3 ) / zx              &
+      - 0.01252108546759328_wp * LOG( zpcsa )                            &
+      + 0.005806550506277202_wp * zt * LOG( zpcsa )                      &
+      - 0.0001016735312443444_wp * zt ** 2 * LOG( zpcsa )                &
+      + 2.881946187214505E-7_wp * zt ** 3 * LOG( zpcsa )                 &
+      + ( 0.0942243379396279_wp * LOG( zpcsa ) ) / zx                    &
+      - 0.0385459592773097_wp * LOG( zrh ) * LOG( zpcsa )                &
+      - 0.0006723156277391984_wp * zt * LOG( zrh ) * LOG( zpcsa )        &
+      + 2.602884877659698E-6_wp * zt ** 2 * LOG( zrh ) * LOG( zpcsa )    &
+      + 1.194163699688297E-8_wp * zt ** 3 * LOG( zrh ) * LOG( zpcsa )    &
+      - ( 0.00851515345806281_wp * LOG( zrh ) * LOG( zpcsa ) ) / zx      &
+      - 0.01837488495738111_wp * LOG( zrh ) ** 2 * LOG( zpcsa )          &
+      + 0.0001720723574407498_wp * zt * LOG( zrh ) ** 2 * LOG( zpcsa )   &
+      - 3.717657974086814E-7_wp * zt**2 * LOG( zrh )**2 * LOG( zpcsa )   &
+      - 5.148746022615196E-10_wp * zt**3 * LOG( zrh )**2 * LOG( zpcsa )  &
+      + ( 0.0002686602132926594_wp * LOG(zrh)**2 * LOG(zpcsa) ) / zx     &
+      - 0.06199739728812199_wp * LOG( zpcsa ) ** 2                       &
+      + 0.000906958053583576_wp * zt * LOG( zpcsa ) ** 2                 &
+      - 9.11727926129757E-7_wp * zt ** 2 * LOG( zpcsa ) ** 2             &
+      - 5.367963396508457E-9_wp * zt ** 3 * LOG( zpcsa ) ** 2            &
+      - ( 0.007742343393937707_wp * LOG( zpcsa ) ** 2 ) / zx             &
+      + 0.0121827103101659_wp * LOG( zrh ) * LOG( zpcsa ) ** 2           &
+      - 0.0001066499571188091_wp * zt * LOG( zrh ) * LOG( zpcsa ) ** 2   &
+      + 2.534598655067518E-7_wp * zt**2 * LOG( zrh ) * LOG( zpcsa )**2   &
+      - 3.635186504599571E-10_wp * zt**3 * LOG( zrh ) * LOG( zpcsa )**2  &
+      + ( 0.0006100650851863252_wp * LOG( zrh ) * LOG( zpcsa ) **2 )/ zx &
+      + 0.0003201836700403512_wp * LOG( zpcsa ) ** 3                     &
+      - 0.0000174761713262546_wp * zt * LOG( zpcsa ) ** 3                &
+      + 6.065037668052182E-8_wp * zt ** 2 * LOG( zpcsa ) ** 3            &
+      - 1.421771723004557E-11_wp * zt ** 3 * LOG( zpcsa ) ** 3           &
+      + ( 0.0001357509859501723_wp * LOG( zpcsa ) ** 3 ) / zx
+    zntot = EXP( zntot )  ! in #
+!
+!-- 5) Size of the critical cluster pd_crit (m) (diameter) (Eq. 14)
+    pn_crit_sa = zx * zntot
+    pd_crit    = 2.0E-9_wp * EXP( -1.6524245_wp + 0.42316402_wp  * zx +        &
+                 0.33466487_wp * LOG( zntot ) )
+!
+!-- 6) Organic compounds not involved when binary nucleation is assumed
+    pn_crit_ocnv = 0.0_wp   ! number of organic molecules 
+    pk_sa        = 1.0_wp   ! if = 1, H2SO4 involved in nucleation
+    pk_ocnv      = 0.0_wp   ! if = 1, organic compounds involved
+!                
+!-- Set nucleation rate to collision rate                
+    IF ( pn_crit_sa < 4.0_wp ) THEN
+!       
+!--    Volumes of the colliding objects
+       zma    = 96.0_wp   ! molar mass of SO4 in g/mol
+       zmw    = 18.0_wp   ! molar mass of water in g/mol
+       zxmass = 1.0_wp    ! mass fraction of H2SO4
+       za = 0.7681724_wp + zxmass * ( 2.1847140_wp + zxmass * (     &
+            7.1630022_wp + zxmass * ( -44.31447_wp + zxmass * (     &
+            88.75606 + zxmass * ( -75.73729_wp + zxmass *           &
+            23.43228_wp ) ) ) ) )
+       zb = 1.808225E-3_wp + zxmass * ( -9.294656E-3_wp + zxmass *  &
+            ( -0.03742148_wp + zxmass * ( 0.2565321_wp + zxmass *   &
+            ( -0.5362872_wp + zxmass * ( 0.4857736 - zxmass *       &
+            0.1629592_wp ) ) ) ) )
+       zc = - 3.478524E-6_wp + zxmass * ( 1.335867E-5_wp + zxmass * &
+           ( 5.195706E-5_wp + zxmass * ( -3.717636E-4_wp + zxmass * &
+           ( 7.990811E-4_wp + zxmass * ( -7.458060E-4_wp + zxmass * &
+             2.58139E-4_wp ) ) ) ) )
+!             
+!--    Density for the sulphuric acid solution (Eq. 10 in Vehkamaki)
+       zroo = za + zt * ( zb + zc * zt )   ! g/cm^3
+       zroo = zroo * 1.0E+3_wp   ! kg/m^3
+       zm1  = 0.098_wp   ! molar mass of H2SO4 in kg/mol
+       zm2  = zm1
+       zv1  = zm1 / avo / zroo   ! volume 
+       zv2  = zv1
+!       
+!--    Collision rate 
+       zcoll =  zpcsa * zpcsa * ( 3.0_wp * pi / 4.0_wp ) ** ( 1.0_wp / 6.0_wp )&
+                * SQRT( 6.0_wp * argas * zt / zm1 + 6.0_wp * argas * zt / zm2 )&
+                * ( zv1 ** ( 1.0_wp / 3.0_wp ) + zv2 ** ( 1.0_wp /3.0_wp ) ) **&
+                2.0_wp * 1.0E+6_wp    ! m3 -> cm3
+
+       zcoll      = MIN( zcoll, 1.0E+10_wp )
+       pnuc_rate  = zcoll   ! (#/(cm3 s))
+       
+    ELSE             
+       pnuc_rate  = MIN( pnuc_rate, 1.0E+10_wp )                
+    ENDIF             
+    pnuc_rate = pnuc_rate * 1.0E+6_wp   ! (#/(m3 s))
+       
+ END SUBROUTINE binnucl
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the nucleation rate and the size of critical clusters assuming
+!> ternary nucleation. Parametrisation according to: 
+!> Napari et al. (2002), J. Chem. Phys., 116, 4221-4227 and 
+!> Napari et al. (2002), J. Geophys. Res., 107(D19), AAC 6-1-ACC 6-6. 
+!> Called from subroutine nucleation. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE ternucl( pc_sa, pc_nh3, ptemp, prh, pnuc_rate, pn_crit_sa,         &
+                     pn_crit_ocnv, pd_crit, pk_sa, pk_ocnv )
+                     
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::   pc_nh3  !< ammonia mixing ratio (ppt)       
+    REAL(wp), INTENT(in) ::   pc_sa   !< H2SO4 conc. (#/cm3)
+    REAL(wp), INTENT(in) ::   prh     !< relative humidity [0-1]
+    REAL(wp), INTENT(in) ::   ptemp   !< ambient temperature (K)
+    REAL(wp), INTENT(out) ::  pd_crit !< diameter of critical 
+                                                  !< cluster (m) 
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1,organic compounds 
+                                      !< are involved in nucleation                                                     
+    REAL(wp), INTENT(out) ::  pk_sa   !< Lever: if pk_sa = 1, H2SO4 is involved
+                                      !< in nucleation                                                      
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)                                                     
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucleation rate (#/(m3 s))
+!-- Local variables
+    REAL(wp) ::  zlnj !< logarithm of nucleation rate
+    
+!-- 1) Checking that we are in the validity range of the parameterization. 
+!--    Validity of parameterization : DO NOT REMOVE!
+    IF ( ptemp < 240.0_wp  .OR.  ptemp > 300.0_wp )  THEN
+       message_string = 'Invalid input value: ptemp'
+       CALL message( 'salsa_mod: ternucl', 'SA0045', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( prh < 0.05_wp  .OR.  prh > 0.95_wp )  THEN
+       message_string = 'Invalid input value: prh'
+       CALL message( 'salsa_mod: ternucl', 'SA0046', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( pc_sa < 1.0E+4_wp  .OR.  pc_sa > 1.0E+9_wp )  THEN
+       message_string = 'Invalid input value: pc_sa'
+       CALL message( 'salsa_mod: ternucl', 'SA0047', 1, 2, 0, 6, 0 )
+    ENDIF
+    IF ( pc_nh3 < 0.1_wp  .OR.  pc_nh3 > 100.0_wp )  THEN
+       message_string = 'Invalid input value: pc_nh3'
+       CALL message( 'salsa_mod: ternucl', 'SA0048', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- 2) Nucleation rate (Eq. 7 in Napari et al., 2002: Parameterization of 
+!--    ternary nucleation of sulfuric acid - ammonia - water.
+    zlnj = - 84.7551114741543_wp                                               &
+           + 0.3117595133628944_wp * prh                                       &
+           + 1.640089605712946_wp * prh * ptemp                                &
+           - 0.003438516933381083_wp * prh * ptemp ** 2.0_wp                   &
+           - 0.00001097530402419113_wp * prh * ptemp ** 3.0_wp                 &
+           - 0.3552967070274677_wp / LOG( pc_sa )                              &
+           - ( 0.06651397829765026_wp * prh ) / LOG( pc_sa )                   &
+           - ( 33.84493989762471_wp * ptemp ) / LOG( pc_sa )                   &
+           - ( 7.823815852128623_wp * prh * ptemp ) / LOG( pc_sa)              &
+           + ( 0.3453602302090915_wp * ptemp ** 2.0_wp ) / LOG( pc_sa )        &
+           + ( 0.01229375748100015_wp * prh * ptemp ** 2.0_wp ) / LOG( pc_sa ) &
+           - ( 0.000824007160514956_wp *ptemp ** 3.0_wp ) / LOG( pc_sa )       &
+           + ( 0.00006185539100670249_wp * prh * ptemp ** 3.0_wp )             &
+             / LOG( pc_sa )                                                    &
+           + 3.137345238574998_wp * LOG( pc_sa )                               &
+           + 3.680240980277051_wp * prh * LOG( pc_sa )                         &
+           - 0.7728606202085936_wp * ptemp * LOG( pc_sa )                      &
+           - 0.204098217156962_wp * prh * ptemp * LOG( pc_sa )                 &
+           + 0.005612037586790018_wp * ptemp ** 2.0_wp * LOG( pc_sa )          &
+           + 0.001062588391907444_wp * prh * ptemp ** 2.0_wp * LOG( pc_sa )    &
+           - 9.74575691760229E-6_wp * ptemp ** 3.0_wp * LOG( pc_sa )           &
+           - 1.265595265137352E-6_wp * prh * ptemp ** 3.0_wp * LOG( pc_sa )    &
+           + 19.03593713032114_wp * LOG( pc_sa ) ** 2.0_wp                     &
+           - 0.1709570721236754_wp * ptemp * LOG( pc_sa ) ** 2.0_wp            &
+           + 0.000479808018162089_wp * ptemp ** 2.0_wp * LOG( pc_sa ) ** 2.0_wp&
+           - 4.146989369117246E-7_wp * ptemp ** 3.0_wp * LOG( pc_sa ) ** 2.0_wp&
+           + 1.076046750412183_wp * LOG( pc_nh3 )                              &
+           + 0.6587399318567337_wp * prh * LOG( pc_nh3 )                       &
+           + 1.48932164750748_wp * ptemp * LOG( pc_nh3 )                       & 
+           + 0.1905424394695381_wp * prh * ptemp * LOG( pc_nh3 )               &
+           - 0.007960522921316015_wp * ptemp ** 2.0_wp * LOG( pc_nh3 )         &
+           - 0.001657184248661241_wp * prh * ptemp ** 2.0_wp * LOG( pc_nh3 )   &
+           + 7.612287245047392E-6_wp * ptemp ** 3.0_wp * LOG( pc_nh3 )         &
+           + 3.417436525881869E-6_wp * prh * ptemp ** 3.0_wp * LOG( pc_nh3 )   &
+           + ( 0.1655358260404061_wp * LOG( pc_nh3 ) ) / LOG( pc_sa)           &
+           + ( 0.05301667612522116_wp * prh * LOG( pc_nh3 ) ) / LOG( pc_sa )   &
+           + ( 3.26622914116752_wp * ptemp * LOG( pc_nh3 ) ) / LOG( pc_sa )    &
+           - ( 1.988145079742164_wp * prh * ptemp * LOG( pc_nh3 ) )            &
+             / LOG( pc_sa )                                                    &
+           - ( 0.04897027401984064_wp * ptemp ** 2.0_wp * LOG( pc_nh3) )       &
+             / LOG( pc_sa )                                                    &
+           + ( 0.01578269253599732_wp * prh * ptemp ** 2.0_wp * LOG( pc_nh3 )  &
+             ) / LOG( pc_sa )                                                  &
+           + ( 0.0001469672236351303_wp * ptemp ** 3.0_wp * LOG( pc_nh3 ) )    &
+             / LOG( pc_sa )                                                    &
+           - ( 0.00002935642836387197_wp * prh * ptemp ** 3.0_wp *LOG( pc_nh3 )&
+             ) / LOG( pc_sa )                                                  &
+           + 6.526451177887659_wp * LOG( pc_sa ) * LOG( pc_nh3 )               & 
+           - 0.2580021816722099_wp * ptemp * LOG( pc_sa ) * LOG( pc_nh3 )      &
+           + 0.001434563104474292_wp * ptemp ** 2.0_wp * LOG( pc_sa )          &
+             * LOG( pc_nh3 )                                                   &
+           -  2.020361939304473E-6_wp * ptemp ** 3.0_wp * LOG( pc_sa )         &
+             * LOG( pc_nh3 )                                                   &
+           - 0.160335824596627_wp * LOG( pc_sa ) ** 2.0_wp * LOG( pc_nh3 )     &
+           +  0.00889880721460806_wp * ptemp * LOG( pc_sa ) ** 2.0_wp          &
+             * LOG( pc_nh3 )                                                   &
+           -  0.00005395139051155007_wp * ptemp ** 2.0_wp                      &
+             * LOG( pc_sa) ** 2.0_wp * LOG( pc_nh3 )                           &
+           +  8.39521718689596E-8_wp * ptemp ** 3.0_wp * LOG( pc_sa ) ** 2.0_wp&
+             * LOG( pc_nh3 )                                                   &
+           + 6.091597586754857_wp * LOG( pc_nh3 ) ** 2.0_wp                    &
+           + 8.5786763679309_wp * prh * LOG( pc_nh3 ) ** 2.0_wp                &
+           - 1.253783854872055_wp * ptemp * LOG( pc_nh3 ) ** 2.0_wp            &
+           - 0.1123577232346848_wp * prh * ptemp * LOG( pc_nh3 ) ** 2.0_wp     &
+           + 0.00939835595219825_wp * ptemp ** 2.0_wp * LOG( pc_nh3 ) ** 2.0_wp&
+           + 0.0004726256283031513_wp * prh * ptemp ** 2.0_wp                  &
+             * LOG( pc_nh3) ** 2.0_wp                                          &
+           - 0.00001749269360523252_wp * ptemp ** 3.0_wp                       &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           - 6.483647863710339E-7_wp * prh * ptemp ** 3.0_wp                   &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           + ( 0.7284285726576598_wp * LOG( pc_nh3 ) ** 2.0_wp ) / LOG( pc_sa )&
+           + ( 3.647355600846383_wp * ptemp * LOG( pc_nh3 ) ** 2.0_wp )        &
+             / LOG( pc_sa )                                                    &
+           - ( 0.02742195276078021_wp * ptemp ** 2.0_wp                        &
+             * LOG( pc_nh3) ** 2.0_wp ) / LOG( pc_sa )                         &
+           + ( 0.00004934777934047135_wp * ptemp ** 3.0_wp                     &
+             * LOG( pc_nh3 ) ** 2.0_wp ) / LOG( pc_sa )                        &
+           + 41.30162491567873_wp * LOG( pc_sa ) * LOG( pc_nh3 ) ** 2.0_wp     &
+           - 0.357520416800604_wp * ptemp * LOG( pc_sa )                       &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           + 0.000904383005178356_wp * ptemp ** 2.0_wp * LOG( pc_sa )          &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           - 5.737876676408978E-7_wp * ptemp ** 3.0_wp * LOG( pc_sa )          &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           - 2.327363918851818_wp * LOG( pc_sa ) ** 2.0_wp                     &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           + 0.02346464261919324_wp * ptemp * LOG( pc_sa ) ** 2.0_wp           &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           - 0.000076518969516405_wp * ptemp ** 2.0_wp                         &
+             * LOG( pc_sa ) ** 2.0_wp * LOG( pc_nh3 ) ** 2.0_wp                &
+           + 8.04589834836395E-8_wp * ptemp ** 3.0_wp * LOG( pc_sa ) ** 2.0_wp &
+             * LOG( pc_nh3 ) ** 2.0_wp                                         &
+           - 0.02007379204248076_wp * LOG( prh )                               &
+           - 0.7521152446208771_wp * ptemp * LOG( prh )                        &
+           + 0.005258130151226247_wp * ptemp ** 2.0_wp * LOG( prh )            &
+           - 8.98037634284419E-6_wp * ptemp ** 3.0_wp * LOG( prh )             &
+           + ( 0.05993213079516759_wp * LOG( prh ) ) / LOG( pc_sa )            &
+           + ( 5.964746463184173_wp * ptemp * LOG( prh ) ) / LOG( pc_sa )      &
+           - ( 0.03624322255690942_wp * ptemp ** 2.0_wp * LOG( prh ) )         &
+             / LOG( pc_sa )                                                    &
+           + ( 0.00004933369382462509_wp * ptemp ** 3.0_wp * LOG( prh ) )      &
+             / LOG( pc_sa )                                                    &
+           - 0.7327310805365114_wp * LOG( pc_nh3 ) * LOG( prh )                &
+           - 0.01841792282958795_wp * ptemp * LOG( pc_nh3 ) * LOG( prh )       &
+           + 0.0001471855981005184_wp * ptemp ** 2.0_wp * LOG( pc_nh3 )        &
+             * LOG( prh )                                                      &
+           - 2.377113195631848E-7_wp * ptemp ** 3.0_wp * LOG( pc_nh3 )         &
+             * LOG( prh )
+    pnuc_rate = EXP( zlnj )   ! (#/(cm3 s))
+!    
+!-- Check validity of parametrization             
+    IF ( pnuc_rate < 1.0E-5_wp )  THEN 
+       pnuc_rate = 0.0_wp
+       pd_crit   = 1.0E-9_wp
+    ELSEIF ( pnuc_rate > 1.0E6_wp )  THEN
+       message_string = 'Invalid output value: nucleation rate > 10^6 1/cm3s'
+       CALL message( 'salsa_mod: ternucl', 'SA0049', 1, 2, 0, 6, 0 )
+    ENDIF
+    pnuc_rate = pnuc_rate * 1.0E6_wp   ! (#/(m3 s))
+!             
+!-- 3) Number of H2SO4 molecules in a critical cluster (Eq. 9)
+    pn_crit_sa = 38.16448247950508_wp + 0.7741058259731187_wp * zlnj +         &
+                 0.002988789927230632_wp * zlnj ** 2.0_wp -                    &
+                 0.3576046920535017_wp * ptemp -                               &
+                 0.003663583011953248_wp * zlnj * ptemp +                      &
+                 0.000855300153372776_wp * ptemp ** 2.0_wp
+!-- Kinetic limit: at least 2 H2SO4 molecules in a cluster                                 
+    pn_crit_sa = MAX( pn_crit_sa, 2.0E0_wp ) 
+!             
+!-- 4) Size of the critical cluster in nm (Eq. 12)
+    pd_crit = 0.1410271086638381_wp - 0.001226253898894878_wp * zlnj -         &
+              7.822111731550752E-6_wp * zlnj ** 2.0_wp -                       &
+              0.001567273351921166_wp * ptemp -                                &
+              0.00003075996088273962_wp * zlnj * ptemp +                       &
+              0.00001083754117202233_wp * ptemp ** 2.0_wp  
+    pd_crit = pd_crit * 2.0E-9_wp   ! Diameter in m
+!
+!-- 5) Organic compounds not involved when ternary nucleation assumed
+    pn_crit_ocnv = 0.0_wp 
+    pk_sa   = 1.0_wp
+    pk_ocnv = 0.0_wp
+    
+ END SUBROUTINE ternucl
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the nucleation rate and the size of critical clusters assuming 
+!> kinetic nucleation. Each sulphuric acid molecule forms an (NH4)HSO4 molecule 
+!> in the atmosphere and two colliding (NH4)HSO4 molecules form a stable
+!> cluster. See Sihto et al. (2006), Atmos. Chem. Phys., 6(12), 4079-4091.
+!>
+!> Below the following assumption have been made:
+!>  nucrate = coagcoeff*zpcsa**2
+!>  coagcoeff = 8*sqrt(3*boltz*ptemp*r_abs/dens_abs)
+!>  r_abs = 0.315d-9 radius of bisulphate molecule [m]
+!>  dens_abs = 1465  density of - " - [kg/m3]
+!------------------------------------------------------------------------------!
+ SUBROUTINE kinnucl( pc_sa, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv,      &
+                     pk_sa, pk_ocnv ) 
+                     
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pc_sa     !< H2SO4 conc. (#/m3)
+    REAL(wp), INTENT(out) ::  pd_crit  !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv  !< Lever: if pk_ocnv = 1, organic 
+                                       !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa    !< Lever: if pk_sa = 1, H2SO4 is involved
+                                       !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucl. rate (#/(m3 s))
+    
+!-- Nucleation rate (#/(m3 s))
+    pnuc_rate = 5.0E-13_wp * pc_sa ** 2.0_wp * 1.0E+6_wp
+!-- Organic compounds not involved when kinetic nucleation is assumed.
+    pn_crit_sa   = 2.0_wp
+    pn_crit_ocnv = 0.0_wp 
+    pk_sa        = 1.0_wp
+    pk_ocnv      = 0.0_wp             
+    pd_crit      = 7.9375E-10_wp   ! (m)
+    
+ END SUBROUTINE kinnucl
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the nucleation rate and the size of critical clusters assuming 
+!> activation type nucleation.
+!> See Riipinen et al. (2007), Atmos. Chem. Phys., 7(8), 1899-1914.
+!------------------------------------------------------------------------------!
+ SUBROUTINE actnucl( psa_conc, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv,   &
+                     pk_sa, pk_ocnv, activ ) 
+
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  psa_conc !< H2SO4 conc. (#/m3)
+    REAL(wp), INTENT(in) ::  activ    !<
+    REAL(wp), INTENT(out) ::  pd_crit !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1, organic 
+                                      !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa   !< Lever: if pk_sa = 1, H2SO4 is involved
+                                      !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucl. rate (#/(m3 s))
+    
+!-- act_coeff 1e-7 by default
+    pnuc_rate = activ * psa_conc   ! (#/(m3 s))
+!-- Organic compounds not involved when kinetic nucleation is assumed.
+    pn_crit_sa   = 2.0_wp
+    pn_crit_ocnv = 0.0_wp 
+    pk_sa        = 1.0_wp
+    pk_ocnv      = 0.0_wp
+    pd_crit      = 7.9375E-10_wp   ! (m)
+ END SUBROUTINE actnucl
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Conciders only the organic matter in nucleation. Paasonen et al. (2010) 
+!> determined particle formation rates for 2 nm particles, J2, from different
+!> kind of combinations of sulphuric acid and organic matter concentration.
+!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
+!------------------------------------------------------------------------------!
+ SUBROUTINE orgnucl( pc_org, pnuc_rate, pd_crit, pn_crit_sa, pn_crit_ocnv,     &
+                     pk_sa, pk_ocnv )
+
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
+    REAL(wp), INTENT(out) ::  pd_crit !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1, organic 
+                                      !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa !< Lever: if pk_sa = 1, H2SO4 is involved 
+                                    !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucl. rate (#/(m3 s))
+!-- Local variables
+    REAL(wp) ::  Aorg = 1.3E-7_wp !< (1/s) (Paasonen et al. Table 4: median)
+    
+!-- Homomolecular nuleation - which one?          
+    pnuc_rate = Aorg * pc_org 
+!-- H2SO4 not involved when pure organic nucleation is assumed.
+    pn_crit_sa   = 0.0_wp
+    pn_crit_ocnv = 1.0_wp 
+    pk_sa        = 0.0_wp
+    pk_ocnv      = 1.0_wp
+    pd_crit      = 1.5E-9_wp   ! (m)
+    
+ END SUBROUTINE orgnucl
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Conciders both the organic vapor and H2SO4 in nucleation - activation type 
+!> of nucleation. 
+!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
+!------------------------------------------------------------------------------!
+ SUBROUTINE sumnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa,            &
+                     pn_crit_ocnv, pk_sa, pk_ocnv )
+
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
+    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
+    REAL(wp), INTENT(out) ::  pd_crit !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1, organic 
+                                      !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa   !< Lever: if pk_sa = 1, H2SO4 is involved
+                                      !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucl. rate (#/(m3 s))
+!-- Local variables
+    REAL(wp) ::  As1 = 6.1E-7_wp  !< (1/s)
+    REAL(wp) ::  As2 = 0.39E-7_wp !< (1/s) (Paasonen et al. Table 3.)
+    
+!-- Nucleation rate  (#/m3/s)
+    pnuc_rate = As1 * pc_sa + As2 * pc_org 
+!-- Both Organic compounds and H2SO4 are involved when SUMnucleation is assumed.
+    pn_crit_sa   = 1.0_wp
+    pn_crit_ocnv = 1.0_wp 
+    pk_sa        = 1.0_wp
+    pk_ocnv      = 1.0_wp           
+    pd_crit      = 1.5E-9_wp   ! (m)
+    
+ END SUBROUTINE sumnucl
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Conciders both the organic vapor and H2SO4 in nucleation - heteromolecular 
+!> nucleation. 
+!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
+!------------------------------------------------------------------------------!
+ SUBROUTINE hetnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa,            &
+                     pn_crit_ocnv, pk_sa, pk_ocnv )
+
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
+    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
+    REAL(wp), INTENT(out) ::  pd_crit !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1, organic 
+                                      !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa   !< Lever: if pk_sa = 1, H2SO4 is involved
+                                      !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucl. rate (#/(m3 s))
+!-- Local variables
+    REAL(wp) ::  zKhet = 4.1E-14_wp !< (cm3/s) (Paasonen et al. Table 4: median)
+    
+!-- Nucleation rate (#/m3/s)
+    pnuc_rate = zKhet * pc_sa * pc_org * 1.0E6_wp 
+!-- Both Organic compounds and H2SO4 are involved when heteromolecular
+!-- nucleation is assumed.
+    pn_crit_sa   = 1.0_wp
+    pn_crit_ocnv = 1.0_wp 
+    pk_sa        = 1.0_wp
+    pk_ocnv      = 1.0_wp  
+    pd_crit      = 1.5E-9_wp   ! (m)
+    
+ END SUBROUTINE hetnucl
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Takes into account the homomolecular nucleation of sulphuric acid H2SO4 with 
+!> both of the available vapours.
+!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
+!------------------------------------------------------------------------------!
+ SUBROUTINE SAnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa,             &
+                    pn_crit_ocnv, pk_sa, pk_ocnv )
+
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
+    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
+    REAL(wp), INTENT(out) ::  pd_crit !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1, organic 
+                                      !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa   !< Lever: if pk_sa = 1, H2SO4 is involved
+                                      !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucleation rate (#/(m3 s))
+!-- Local variables
+    REAL(wp) ::  zKsa1 = 1.1E-14_wp !< (cm3/s)
+    REAL(wp) ::  zKsa2 = 3.2E-14_wp  !< (cm3/s) (Paasonen et al. Table 3.)
+    
+!-- Nucleation rate (#/m3/s)
+    pnuc_rate = ( zKsa1 * pc_sa ** 2.0_wp + zKsa2 * pc_sa * pc_org ) * 1.0E+6_wp 
+!-- Both Organic compounds and H2SO4 are involved when SAnucleation is assumed.
+    pn_crit_sa   = 3.0_wp
+    pn_crit_ocnv = 1.0_wp 
+    pk_sa        = 1.0_wp
+    pk_ocnv      = 1.0_wp
+    pd_crit      = 1.5E-9_wp   ! (m)
+    
+ END SUBROUTINE SAnucl
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Takes into account the homomolecular nucleation of both sulphuric acid and 
+!> Lorganic with heteromolecular nucleation.
+!> See Paasonen et al. (2010), Atmos. Chem. Phys., 10, 11223-11242.
+!------------------------------------------------------------------------------!
+ SUBROUTINE SAORGnucl( pc_sa, pc_org, pnuc_rate, pd_crit, pn_crit_sa,          &
+                       pn_crit_ocnv, pk_sa, pk_ocnv )
+
+    IMPLICIT NONE
+    
+!-- Input and output variables
+    REAL(wp), INTENT(in) ::  pc_org   !< organic vapour concentration (#/m3)
+    REAL(wp), INTENT(in) ::  pc_sa    !< H2SO4 conc. (#/m3)
+    REAL(wp), INTENT(out) ::  pd_crit !< critical diameter of clusters (m)
+    REAL(wp), INTENT(out) ::  pk_ocnv !< Lever: if pk_ocnv = 1, organic 
+                                      !< compounds are involved in nucleation
+    REAL(wp), INTENT(out) ::  pk_sa   !< Lever: if pk_sa = 1, H2SO4 is involved 
+                                      !< in nucleation 
+    REAL(wp), INTENT(out) ::  pn_crit_ocnv !< number of organic molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pn_crit_sa   !< number of H2SO4 molecules in 
+                                           !< cluster (#)
+    REAL(wp), INTENT(out) ::  pnuc_rate    !< nucl. rate (#/(m3 s))
+!-- Local variables
+    REAL(wp) ::  zKs1 = 1.4E-14_wp   !< (cm3/s])
+    REAL(wp) ::  zKs2 = 2.6E-14_wp   !< (cm3/s])
+    REAL(wp) ::  zKs3 = 0.037E-14_wp !< (cm3/s]) (Paasonen et al. Table 3.)
+    
+!-- Nucleation rate (#/m3/s)         
+    pnuc_rate = ( zKs1 * pc_sa **2 + zKs2 * pc_sa * pc_org + zKs3 *            &
+                  pc_org ** 2.0_wp ) * 1.0E+6_wp
+!-- Organic compounds not involved when kinetic nucleation is assumed.
+    pn_crit_sa   = 3.0_wp
+    pn_crit_ocnv = 3.0_wp 
+    pk_sa        = 1.0_wp
+    pk_ocnv      = 1.0_wp
+    pd_crit      = 1.5E-9_wp   ! (m)
+ 
+ END SUBROUTINE SAORGnucl
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Function zNnuc_tayl is connected to the calculation of self-coagualtion of 
+!> small particles. It calculates number of the particles in the size range
+!> [zdcrit,dx] using Taylor-expansion (please note that the expansion is not 
+!> valid for certain rational numbers, e.g. -4/3 and -3/2)
+!------------------------------------------------------------------------------!
+ FUNCTION zNnuc_tayl( d1, dx, zm_para, zjnuc_t, zeta, zGRtot ) 
+    IMPLICIT NONE
+  
+    INTEGER(iwp) ::  i
+    REAL(wp) ::  d1
+    REAL(wp) ::  dx
+    REAL(wp) ::  zjnuc_t
+    REAL(wp) ::  zeta
+    REAL(wp) ::  term1
+    REAL(wp) ::  term2
+    REAL(wp) ::  term3
+    REAL(wp) ::  term4
+    REAL(wp) ::  term5
+    REAL(wp) ::  zNnuc_tayl
+    REAL(wp) ::  zGRtot
+    REAL(wp) ::  zm_para
+
+    zNnuc_tayl = 0.0_wp
+
+    DO  i = 0, 29
+       IF ( i == 0  .OR.  i == 1 )  THEN
+          term1 = 1.0_wp
+       ELSE
+          term1 = term1 * REAL( i, SELECTED_REAL_KIND(12,307) )
+       END IF
+       term2 = ( REAL( i, SELECTED_REAL_KIND(12,307) ) * ( zm_para + 1.0_wp    &
+               ) + 1.0_wp ) * term1
+       term3 = zeta ** i
+       term4 = term3 / term2
+       term5 = REAL( i, SELECTED_REAL_KIND(12,307) ) * ( zm_para + 1.0_wp )    &
+               + 1.0_wp
+       zNnuc_tayl = zNnuc_tayl + term4 * ( dx ** term5 - d1 ** term5 ) 
+    ENDDO
+    zNnuc_tayl = zNnuc_tayl * zjnuc_t * EXP( -zeta *                           &
+                   ( d1 ** ( zm_para + 1 ) ) ) / zGRtot
+                  
+ END FUNCTION zNnuc_tayl
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the condensation of water vapour on aerosol particles. Follows the 
+!> analytical predictor method by Jacobson (2005).
+!> For equations, see Jacobson (2005), Fundamentals of atmospheric modelling 
+!> (2nd edition).
+!------------------------------------------------------------------------------!
+ SUBROUTINE gpparth2o( paero, ptemp, ppres, pcs, pcw, ptstep )
+        
+    IMPLICIT NONE
+!
+!-- Input and output variables  
+    REAL(wp), INTENT(in) ::  ppres  !< Air pressure (Pa)
+    REAL(wp), INTENT(in) ::  pcs    !< Water vapour saturation 
+                                             !< concentration (kg/m3)
+    REAL(wp), INTENT(in) ::  ptemp  !< Ambient temperature (K)  
+    REAL(wp), INTENT(in) ::  ptstep !< timestep (s)
+    REAL(wp), INTENT(inout) ::  pcw !< Water vapour concentration 
+                                                !< (kg/m3)
+    TYPE(t_section), INTENT(inout) ::  paero(nbins) !< Aerosol properties
+!-- Local variables
+    INTEGER(iwp) ::  b !< loop index
+    INTEGER(iwp) ::  nstr
+    REAL(wp) ::  adt     !< internal timestep in this subroutine
+    REAL(wp) ::  adtc(nbins) 
+    REAL(wp) ::  rhoair      
+    REAL(wp) ::  ttot       
+    REAL(wp) ::  zact    !< Water activity
+    REAL(wp) ::  zaelwc1 !< Current aerosol water content 
+    REAL(wp) ::  zaelwc2 !< New aerosol water content after 
+                                     !< equilibrium calculation     
+    REAL(wp) ::  zbeta   !< Transitional correction factor 
+    REAL(wp) ::  zcwc    !< Current water vapour mole concentration
+    REAL(wp) ::  zcwcae(nbins) !< Current water mole concentrations
+                               !< in aerosols
+    REAL(wp) ::  zcwint  !< Current and new water vapour mole concentrations
+    REAL(wp) ::  zcwintae(nbins) !< Current and new water mole concentrations
+                                 !< in aerosols
+    REAL(wp) ::  zcwn    !< New water vapour mole concentration
+    REAL(wp) ::  zcwnae(nbins) !< New water mole concentration in aerosols
+    REAL(wp) ::  zcwsurfae(nbins) !< Surface mole concentration
+    REAL(wp) ::  zcwtot  !< Total water mole concentration
+    REAL(wp) ::  zdfh2o
+    REAL(wp) ::  zhlp1
+    REAL(wp) ::  zhlp2
+    REAL(wp) ::  zhlp3       
+    REAL(wp) ::  zka(nbins)     !< Activity coefficient       
+    REAL(wp) ::  zkelvin(nbins) !< Kelvin effect
+    REAL(wp) ::  zknud
+    REAL(wp) ::  zmfph2o        !< mean free path of H2O gas molecule
+    REAL(wp) ::  zmtae(nbins)   !< Mass transfer coefficients
+    REAL(wp) ::  zrh            !< Relative humidity [0-1]      
+    REAL(wp) ::  zthcond       
+    REAL(wp) ::  zwsatae(nbins) !< Water saturation ratio above aerosols
+!
+!-- Relative humidity [0-1]
+    zrh = pcw / pcs
+!-- Calculate the condensation only for 2a/2b aerosol bins
+    nstr = in2a
+!-- Save the current aerosol water content, 8 in paero is H2O
+    zaelwc1 = SUM( paero(in1a:fn2b)%volc(8) ) * arhoh2o
+!
+!-- Equilibration:
+    IF ( advect_particle_water )  THEN
+       IF ( zrh < 0.98_wp  .OR.  .NOT. lscndh2oae )  THEN
+          CALL equilibration( zrh, ptemp, paero, .TRUE. )
+       ELSE
+          CALL equilibration( zrh, ptemp, paero, .FALSE. )
+       ENDIF
+    ENDIF
+!                                        
+!-- The new aerosol water content after equilibrium calculation
+    zaelwc2 = SUM( paero(in1a:fn2b)%volc(8) ) * arhoh2o
+!-- New water vapour mixing ratio (kg/m3)
+    pcw = pcw - ( zaelwc2 - zaelwc1 ) * ppres * amdair / ( argas * ptemp )
+!                  
+!-- Initialise variables
+    adtc(:)  = 0.0_wp
+    zcwc     = 0.0_wp
+    zcwcae   = 0.0_wp       
+    zcwint   = 0.0_wp
+    zcwintae = 0.0_wp       
+    zcwn     = 0.0_wp
+    zcwnae   = 0.0_wp
+    zhlp1    = 0.0_wp
+    zwsatae  = 0.0_wp    
+!          
+!-- Air:
+!-- Density (kg/m3)
+    rhoair = amdair * ppres / ( argas * ptemp )
+!-- Thermal conductivity of air                       
+    zthcond = 0.023807_wp + 7.1128E-5_wp * ( ptemp - 273.16_wp )
+!             
+!-- Water vapour: 
+!
+!-- Molecular diffusion coefficient (cm2/s) (eq.16.17)
+    zdfh2o = ( 5.0_wp / ( 16.0_wp * avo * rhoair * 1.0E-3_wp *                 &
+             ( 3.11E-8_wp ) ** 2.0_wp ) ) * SQRT( argas * 1.0E+7_wp * ptemp *  &
+             amdair * 1.0E+3_wp * ( amh2o + amdair ) * 1.0E+3_wp / ( 2.0_wp *  &
+             pi * amh2o * 1.0E+3_wp ) )
+    zdfh2o = zdfh2o * 1.0E-4   ! Unit change to m^2/s 
+!    
+!-- Mean free path (eq. 15.25 & 16.29)
+    zmfph2o = 3.0_wp * zdfh2o * SQRT( pi * amh2o / ( 8.0_wp * argas * ptemp ) ) 
+    zka = 1.0_wp   ! Assume activity coefficients as 1 for now.
+!    
+!-- Kelvin effect (eq. 16.33) 
+    zkelvin = 1.0_wp                   
+    zkelvin(1:nbins) = EXP( 4.0_wp * surfw0 * amh2o / ( argas * ptemp *        &
+                            arhoh2o * paero(1:nbins)%dwet) )
+!                           
+! --Aerosols:
+    zmtae(:)     = 0.0_wp   ! mass transfer coefficient
+    zcwsurfae(:) = 0.0_wp   ! surface mole concentrations
+    DO  b = 1, nbins
+       IF ( paero(b)%numc > nclim  .AND.  zrh > 0.98_wp )  THEN
+!       
+!--       Water activity
+          zact = acth2o( paero(b) )
+!          
+!--       Saturation mole concentration over flat surface. Limit the super-
+!--       saturation to max 1.01 for the mass transfer. Experimental!          
+          zcwsurfae(b) = MAX( pcs, pcw / 1.01_wp ) * rhoair / amh2o
+!          
+!--       Equilibrium saturation ratio
+          zwsatae(b) = zact * zkelvin(b)
+!          
+!--       Knudsen number (eq. 16.20)
+          zknud = 2.0_wp * zmfph2o / paero(b)%dwet
+!          
+!--       Transitional correction factor (Fuks & Sutugin, 1971)
+          zbeta = ( zknud + 1.0_wp ) / ( 0.377_wp * zknud + 1.0_wp + 4.0_wp /  &
+                  ( 3.0_wp * massacc(b) ) * ( zknud + zknud ** 2.0_wp ) )
+!                  
+!--       Mass transfer of H2O: Eq. 16.64 but here D^eff =  zdfh2o * zbeta
+          zhlp1 = paero(b)%numc * 2.0_wp * pi * paero(b)%dwet * zdfh2o *    &
+                  zbeta 
+!--       1st term on the left side of the denominator in eq. 16.55
+          zhlp2 = amh2o * zdfh2o * alv * zwsatae(b) * zcwsurfae(b) /         &
+                  ( zthcond * ptemp )
+!--       2nd term on the left side of the denominator in eq. 16.55                           
+          zhlp3 = ( (alv * amh2o ) / ( argas * ptemp ) ) - 1.0_wp
+!--       Full eq. 16.64: Mass transfer coefficient (1/s)
+          zmtae(b) = zhlp1 / ( zhlp2 * zhlp3 + 1.0_wp )
+       ENDIF
+    ENDDO
+!
+!-- Current mole concentrations of water
+    zcwc = pcw * rhoair / amh2o   ! as vapour
+    zcwcae(1:nbins) = paero(1:nbins)%volc(8) * arhoh2o / amh2o   ! in aerosols
+    zcwtot = zcwc + SUM( zcwcae )   ! total water concentration
+    ttot = 0.0_wp
+    adtc = 0.0_wp
+    zcwintae = zcwcae   
+!             
+!-- Substepping loop
+    zcwint = 0.0_wp
+    DO  WHILE ( ttot < ptstep )
+       adt = 2.0E-2_wp   ! internal timestep
+!       
+!--    New vapour concentration: (eq. 16.71)
+       zhlp1 = zcwc + adt * ( SUM( zmtae(nstr:nbins) * zwsatae(nstr:nbins) *   &
+                                   zcwsurfae(nstr:nbins) ) )   ! numerator
+       zhlp2 = 1.0_wp + adt * ( SUM( zmtae(nstr:nbins) ) )   ! denomin.
+       zcwint = zhlp1 / zhlp2   ! new vapour concentration
+       zcwint = MIN( zcwint, zcwtot )
+       IF ( ANY( paero(:)%numc > nclim )  .AND. zrh > 0.98_wp )  THEN
+          DO  b = nstr, nbins
+             zcwintae(b) = zcwcae(b) + MIN( MAX( adt * zmtae(b) *           &
+                          ( zcwint - zwsatae(b) * zcwsurfae(b) ),            &
+                          -0.02_wp * zcwcae(b) ), 0.05_wp * zcwcae(b) )
+             zwsatae(b) = acth2o( paero(b), zcwintae(b) ) * zkelvin(b)
+          ENDDO
+       ENDIF
+       zcwintae(nstr:nbins) = MAX( zcwintae(nstr:nbins), 0.0_wp )
+!       
+!--    Update vapour concentration for consistency
+       zcwint = zcwtot - SUM( zcwintae(1:nbins) )
+!--    Update "old" values for next cycle
+       zcwcae = zcwintae
+
+       ttot = ttot + adt
+    ENDDO   ! ADT 
+    zcwn   = zcwint
+    zcwnae = zcwintae
+    pcw    = zcwn * amh2o / rhoair
+    paero(1:nbins)%volc(8) = MAX( 0.0_wp, zcwnae(1:nbins) * amh2o / arhoh2o )
+    
+ END SUBROUTINE gpparth2o
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the activity coefficient of liquid water 
+!------------------------------------------------------------------------------!    
+ REAL(wp) FUNCTION acth2o( ppart, pcw )
+               
+    IMPLICIT NONE
+
+    TYPE(t_section), INTENT(in) ::  ppart !< Aerosol properties of a bin 
+    REAL(wp), INTENT(in), OPTIONAL ::  pcw !< molar concentration of water 
+                                           !< (mol/m3)
+
+    REAL(wp) ::  zns !< molar concentration of solutes (mol/m3)
+    REAL(wp) ::  znw !< molar concentration of water (mol/m3)
+
+    zns = ( 3.0_wp * ( ppart%volc(1) * arhoh2so4 / amh2so4 ) +               &
+                     ( ppart%volc(2) * arhooc / amoc ) +                     &
+            2.0_wp * ( ppart%volc(5) * arhoss / amss ) +                     &
+                     ( ppart%volc(6) * arhohno3 / amhno3 ) +                 &
+                     ( ppart%volc(7) * arhonh3 / amnh3 ) )
+    IF ( PRESENT(pcw) ) THEN
+       znw = pcw
+    ELSE
+       znw = ppart%volc(8) * arhoh2o / amh2o
+    ENDIF
+!-- Activity = partial pressure of water vapour / 
+!--            sat. vapour pressure of water over a bulk liquid surface
+!--          = molality * activity coefficient (Jacobson, 2005: eq. 17.20-21)
+!-- Assume activity coefficient of 1 for water 
+    acth2o = MAX( 0.1_wp, znw / MAX( EPSILON( 1.0_wp ),( znw + zns ) ) )
+ END FUNCTION acth2o
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the dissolutional growth of particles (i.e. gas transfers to a 
+!> particle surface and dissolves in liquid water on the surface). Treated here 
+!> as a non-equilibrium (time-dependent) process. Gases: HNO3 and NH3 
+!> (Chapter 17.14 in Jacobson, 2005).
+!
+!> Called from subroutine condensation. 
+!> Coded by:
+!> Harri Kokkola (FMI) 
+!------------------------------------------------------------------------------! 
+ SUBROUTINE gpparthno3( ppres, ptemp, paero, pghno3, pgnh3, pcw, pcs, pbeta,   &
+                        ptstep )
+               
+    IMPLICIT NONE
+!
+!-- Input and output variables 
+    REAL(wp), INTENT(in) ::  pbeta(nbins) !< transitional correction factor for
+                                          !< aerosols    
+    REAL(wp), INTENT(in) ::  ppres        !< ambient pressure (Pa) 
+    REAL(wp), INTENT(in) ::  pcs          !< water vapour saturation 
+                                          !< concentration (kg/m3)
+    REAL(wp), INTENT(in) ::  ptemp        !< ambient temperature (K)
+    REAL(wp), INTENT(in) ::  ptstep       !< time step (s)
+    REAL(wp), INTENT(inout) ::  pghno3    !< nitric acid concentration (#/m3)
+    REAL(wp), INTENT(inout) ::  pgnh3     !< ammonia conc. (#/m3)    
+    REAL(wp), INTENT(inout) ::  pcw       !< water vapour concentration (kg/m3)
+    TYPE(t_section), INTENT(inout) ::  paero(nbins) !< Aerosol properties
+!    
+!-- Local variables
+    INTEGER(iwp) ::  b              !< loop index
+    REAL(wp) ::  adt                !< timestep 
+    REAL(wp) ::  zachhso4ae(nbins)  !< Activity coefficients for HHSO4
+    REAL(wp) ::  zacnh3ae(nbins)    !< Activity coefficients for NH3
+    REAL(wp) ::  zacnh4hso2ae(nbins)!< Activity coefficients for NH4HSO2
+    REAL(wp) ::  zacno3ae(nbins)    !< Activity coefficients for HNO3
+    REAL(wp) ::  zcgnh3eqae(nbins)  !< Equilibrium gas concentration: NH3
+    REAL(wp) ::  zcgno3eqae(nbins)  !< Equilibrium gas concentration: HNO3
+    REAL(wp) ::  zcgwaeqae(nbins)   !< Equilibrium gas concentration: H2O
+    REAL(wp) ::  zcnh3c             !< Current NH3 gas concentration
+    REAL(wp) ::  zcnh3int           !< Intermediate NH3 gas concentration
+    REAL(wp) ::  zcnh3intae(nbins)  !< Intermediate NH3 aerosol concentration
+    REAL(wp) ::  zcnh3n             !< New NH3 gas concentration
+    REAL(wp) ::  zcnh3cae(nbins)    !< Current NH3 in aerosols
+    REAL(wp) ::  zcnh3nae(nbins)    !< New NH3 in aerosols 
+    REAL(wp) ::  zcnh3tot           !< Total NH3 concentration
+    REAL(wp) ::  zcno3c             !< Current HNO3 gas concentration
+    REAL(wp) ::  zcno3int           !< Intermediate HNO3 gas concentration
+    REAL(wp) ::  zcno3intae(nbins)  !< Intermediate HNO3 aerosol concentration
+    REAL(wp) ::  zcno3n             !< New HNO3 gas concentration                 
+    REAL(wp) ::  zcno3cae(nbins)    !< Current HNO3 in aerosols
+    REAL(wp) ::  zcno3nae(nbins)    !< New HNO3 in aerosols
+    REAL(wp) ::  zcno3tot           !< Total HNO3 concentration   
+    REAL(wp) ::  zdfvap             !< Diffusion coefficient for vapors
+    REAL(wp) ::  zhlp1              !< helping variable
+    REAL(wp) ::  zhlp2              !< helping variable    
+    REAL(wp) ::  zkelnh3ae(nbins)   !< Kelvin effects for NH3
+    REAL(wp) ::  zkelno3ae(nbins)   !< Kelvin effect for HNO3
+    REAL(wp) ::  zmolsae(nbins,7)   !< Ion molalities from pdfite
+    REAL(wp) ::  zmtnh3ae(nbins)    !< Mass transfer coefficients for NH3
+    REAL(wp) ::  zmtno3ae(nbins)    !< Mass transfer coefficients for HNO3
+    REAL(wp) ::  zrh                !< relative humidity
+    REAL(wp) ::  zsathno3ae(nbins)  !< HNO3 saturation ratio
+    REAL(wp) ::  zsatnh3ae(nbins)   !< NH3 saturation ratio = the partial 
+                                    !< pressure of a gas divided by its 
+                                    !< saturation vapor pressure over a surface
+!          
+!-- Initialise:
+    adt          = ptstep
+    zachhso4ae   = 0.0_wp
+    zacnh3ae     = 0.0_wp
+    zacnh4hso2ae = 0.0_wp
+    zacno3ae     = 0.0_wp
+    zcgnh3eqae   = 0.0_wp
+    zcgno3eqae   = 0.0_wp
+    zcnh3c       = 0.0_wp
+    zcnh3cae     = 0.0_wp
+    zcnh3int     = 0.0_wp
+    zcnh3intae   = 0.0_wp
+    zcnh3n       = 0.0_wp
+    zcnh3nae     = 0.0_wp
+    zcnh3tot     = 0.0_wp
+    zcno3c       = 0.0_wp
+    zcno3cae     = 0.0_wp  
+    zcno3int     = 0.0_wp
+    zcno3intae   = 0.0_wp
+    zcno3n       = 0.0_wp
+    zcno3nae     = 0.0_wp
+    zcno3tot     = 0.0_wp
+    zhlp1        = 0.0_wp
+    zhlp2        = 0.0_wp
+    zkelno3ae    = 1.0_wp   
+    zkelnh3ae    = 1.0_wp  
+    zmolsae      = 0.0_wp
+    zmtno3ae     = 0.0_wp
+    zmtnh3ae     = 0.0_wp
+    zrh          = 0.0_wp
+    zsatnh3ae    = 1.0_wp
+    zsathno3ae   = 1.0_wp
+!             
+!-- Diffusion coefficient (m2/s)             
+    zdfvap = 5.1111E-10_wp * ptemp ** 1.75_wp * ( p_0 + 1325.0_wp ) / ppres 
+!             
+!-- Kelvin effects (Jacobson (2005), eq. 16.33)
+    zkelno3ae(1:nbins) = EXP( 4.0_wp * surfw0 * amvhno3 / ( abo * ptemp *      &
+                              paero(1:nbins)%dwet ) ) 
+    zkelnh3ae(1:nbins) = EXP( 4.0_wp * surfw0 * amvnh3 / ( abo * ptemp *       &
+                              paero(1:nbins)%dwet ) )
+!                             
+!-- Current vapour mole concentrations (mol/m3)
+    zcno3c = pghno3 / avo            ! HNO3
+    zcnh3c = pgnh3 / avo             ! NH3
+!             
+!-- Current particle mole concentrations (mol/m3)
+    zcno3cae(1:nbins) = paero(1:nbins)%volc(6) * arhohno3 / amhno3
+    zcnh3cae(1:nbins) = paero(1:nbins)%volc(7) * arhonh3 / amnh3
+!    
+!-- Total mole concentrations: gas and particle phase
+    zcno3tot = zcno3c + SUM( zcno3cae(1:nbins) )
+    zcnh3tot = zcnh3c + SUM( zcnh3cae(1:nbins) )
+!   
+!-- Relative humidity [0-1]
+    zrh = pcw / pcs
+!    
+!-- Mass transfer coefficients (Jacobson, Eq. 16.64)
+    zmtno3ae(1:nbins) = 2.0_wp * pi * paero(1:nbins)%dwet * zdfvap *           &
+                        paero(1:nbins)%numc * pbeta(1:nbins)
+    zmtnh3ae(1:nbins) = 2.0_wp * pi * paero(1:nbins)%dwet * zdfvap *           &
+                        paero(1:nbins)%numc * pbeta(1:nbins)
+
+!    
+!-- Get the equilibrium concentrations above aerosols
+    CALL NONHEquil( zrh, ptemp, paero, zcgno3eqae, zcgnh3eqae, zacno3ae,       &
+                    zacnh3ae, zacnh4hso2ae, zachhso4ae, zmolsae )
+    
+!
+!-- NH4/HNO3 saturation ratios for aerosols
+    CALL SVsat( ptemp, paero, zacno3ae, zacnh3ae, zacnh4hso2ae, zachhso4ae,    &
+                zcgno3eqae, zcno3cae, zcnh3cae, zkelno3ae, zkelnh3ae,          &
+                zsathno3ae, zsatnh3ae, zmolsae ) 
+!    
+!-- Intermediate concentrations    
+    zhlp1 = SUM( zcno3cae(1:nbins) / ( 1.0_wp + adt * zmtno3ae(1:nbins) *      &
+            zsathno3ae(1:nbins) ) )
+    zhlp2 = SUM( zmtno3ae(1:nbins) / ( 1.0_wp + adt * zmtno3ae(1:nbins) *      &
+            zsathno3ae(1:nbins) ) )
+    zcno3int = ( zcno3tot - zhlp1 ) / ( 1.0_wp + adt * zhlp2 )
+
+    zhlp1 = SUM( zcnh3cae(1:nbins) / ( 1.0_wp + adt * zmtnh3ae(1:nbins) *      &
+            zsatnh3ae(1:nbins) ) )
+    zhlp2 = SUM( zmtnh3ae(1:nbins) / ( 1.0_wp + adt * zmtnh3ae(1:nbins) *      &
+            zsatnh3ae(1:nbins) ) )
+    zcnh3int = ( zcnh3tot - zhlp1 )/( 1.0_wp + adt * zhlp2 )
+
+    zcno3int = MIN(zcno3int, zcno3tot)
+    zcnh3int = MIN(zcnh3int, zcnh3tot)
+!
+!-- Calculate the new particle concentrations
+    zcno3intae = zcno3cae
+    zcnh3intae = zcnh3cae
+    DO  b = 1, nbins
+       zcno3intae(b) = ( zcno3cae(b) + adt * zmtno3ae(b) * zcno3int ) /     &
+            ( 1.0_wp + adt * zmtno3ae(b) * zsathno3ae(b) )
+       zcnh3intae(b) = ( zcnh3cae(b) + adt * zmtnh3ae(b) * zcnh3int ) /     &
+            ( 1.0_wp + adt * zmtnh3ae(b) * zsatnh3ae(b) )
+    ENDDO
+
+    zcno3intae(1:nbins) = MAX( zcno3intae(1:nbins), 0.0_wp )
+    zcnh3intae(1:nbins) = MAX( zcnh3intae(1:nbins), 0.0_wp )
+
+    zcno3n   = zcno3int    ! Final molar gas concentration of HNO3
+    zcno3nae = zcno3intae  ! Final molar particle concentration of HNO3
+    
+    zcnh3n   = zcnh3int    ! Final molar gas concentration of NH3
+    zcnh3nae = zcnh3intae  ! Final molar particle concentration of NH3
+!
+!-- Model timestep reached - update the new arrays
+    pghno3 = zcno3n * avo
+    pgnh3  = zcnh3n * avo
+
+    DO  b = in1a, fn2b
+       paero(b)%volc(6) = zcno3nae(b) * amhno3 / arhohno3
+       paero(b)%volc(7) = zcnh3nae(b) * amnh3 / arhonh3
+    ENDDO
+    
+   
+ END SUBROUTINE gpparthno3
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the equilibrium concentrations above aerosols (reference?)
+!------------------------------------------------------------------------------!
+ SUBROUTINE NONHEquil( prh, ptemp, ppart, pcgno3eq, pcgnh3eq, pgammano,        &
+                       pgammanh, pgammanh4hso2, pgammahhso4, pmols )
+    
+    IMPLICIT NONE
+    
+    REAL(wp), INTENT(in) ::  prh    !< relative humidity
+    REAL(wp), INTENT(in) ::  ptemp  !< ambient temperature (K)
+    
+    TYPE(t_section), INTENT(inout) ::  ppart(nbins) !< Aerosol properties
+!-- Equilibrium molar concentration above aerosols:
+    REAL(wp), INTENT(inout) ::  pcgnh3eq(nbins)      !< of NH3 
+    REAL(wp), INTENT(inout) ::  pcgno3eq(nbins)      !< of HNO3 
+                                                     !< Activity coefficients:
+    REAL(wp), INTENT(inout) ::  pgammahhso4(nbins)   !< HHSO4   
+    REAL(wp), INTENT(inout) ::  pgammanh(nbins)      !< NH3
+    REAL(wp), INTENT(inout) ::  pgammanh4hso2(nbins) !< NH4HSO2  
+    REAL(wp), INTENT(inout) ::  pgammano(nbins)      !< HNO3
+    REAL(wp), INTENT(inout) ::  pmols(nbins,7)       !< Ion molalities
+    
+    INTEGER(iwp) ::  b
+
+    REAL(wp) ::  zgammas(7)    !< Activity coefficients    
+    REAL(wp) ::  zhlp          !< Dummy variable
+    REAL(wp) ::  zions(7)      !< molar concentration of ion (mol/m3)
+    REAL(wp) ::  zphcl         !< Equilibrium vapor pressures (Pa??)    
+    REAL(wp) ::  zphno3        !< Equilibrium vapor pressures (Pa??)
+    REAL(wp) ::  zpnh3         !< Equilibrium vapor pressures (Pa??)
+    REAL(wp) ::  zwatertotal   !< Total water in particles (mol/m3) ???    
+
+    zgammas     = 0.0_wp
+    zhlp        = 0.0_wp
+    zions       = 0.0_wp
+    zphcl       = 0.0_wp
+    zphno3      = 0.0_wp
+    zpnh3       = 0.0_wp
+    zwatertotal = 0.0_wp
+
+    DO  b = 1, nbins
+    
+       IF ( ppart(b)%numc < nclim )  CYCLE
+!
+!--    2*H2SO4 + CL + NO3 - Na - NH4
+       zhlp = 2.0_wp * ppart(b)%volc(1) * arhoh2so4 / amh2so4 +               &
+              ppart(b)%volc(5) * arhoss / amss +                              &
+              ppart(b)%volc(6) * arhohno3 / amhno3 -                          &
+              ppart(b)%volc(5) * arhoss / amss -                              &
+              ppart(b)%volc(7) * arhonh3 / amnh3
+
+       zhlp = MAX( zhlp, 1.0E-30_wp )
+
+       zions(1) = zhlp                                   ! H+
+       zions(2) = ppart(b)%volc(7) * arhonh3 / amnh3     ! NH4+
+       zions(3) = ppart(b)%volc(5) * arhoss / amss       ! Na+
+       zions(4) = ppart(b)%volc(1) * arhoh2so4 / amh2so4 ! SO4(2-)
+       zions(5) = 0.0_wp                                 ! HSO4-
+       zions(6) = ppart(b)%volc(6) * arhohno3 / amhno3   ! NO3-
+       zions(7) = ppart(b)%volc(5) * arhoss / amss       ! Cl-
+
+       zwatertotal = ppart(b)%volc(8) * arhoh2o / amh2o
+       IF ( zwatertotal > 1.0E-30_wp )  THEN
+          CALL inorganic_pdfite( prh, ptemp, zions, zwatertotal, zphno3, zphcl,&
+                                 zpnh3, zgammas, pmols(b,:) )
+       ENDIF
+!
+!--    Activity coefficients 
+       pgammano(b) = zgammas(1)           ! HNO3
+       pgammanh(b) = zgammas(3)           ! NH3 
+       pgammanh4hso2(b) = zgammas(6)      ! NH4HSO2
+       pgammahhso4(b) = zgammas(7)        ! HHSO4
+!
+!--    Equilibrium molar concentrations (mol/m3) from equlibrium pressures (Pa)
+       pcgno3eq(b) = zphno3 / ( argas * ptemp )
+       pcgnh3eq(b) = zpnh3 / ( argas * ptemp )
+
+    ENDDO
+
+  END SUBROUTINE NONHEquil
+  
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate saturation ratios of NH4 and HNO3 for aerosols
+!------------------------------------------------------------------------------!
+ SUBROUTINE SVsat( ptemp, ppart, pachno3, pacnh3, pacnh4hso2, pachhso4,        &
+                   pchno3eq, pchno3, pcnh3, pkelhno3, pkelnh3, psathno3,       &
+                   psatnh3, pmols )
+
+    IMPLICIT NONE
+    
+    REAL(wp), INTENT(in) ::  ptemp  !< ambient temperature (K)
+    
+    TYPE(t_section), INTENT(inout) ::  ppart(nbins) !< Aerosol properties
+!-- Activity coefficients
+    REAL(wp), INTENT(in) ::  pachhso4(nbins)   !<
+    REAL(wp), INTENT(in) ::  pacnh3(nbins)     !< 
+    REAL(wp), INTENT(in) ::  pacnh4hso2(nbins) !<
+    REAL(wp), INTENT(in) ::  pachno3(nbins)    !<
+    REAL(wp), INTENT(in) ::  pchno3eq(nbins) !< Equilibrium surface concentration
+                                             !< of HNO3
+    REAL(wp), INTENT(in) ::  pchno3(nbins)   !< Current particle mole 
+                                             !< concentration of HNO3 (mol/m3)
+    REAL(wp), INTENT(in) ::  pcnh3(nbins)    !< Current particle mole 
+                                             !< concentration of NH3 (mol/m3)
+    REAL(wp), INTENT(in) ::  pkelhno3(nbins) !< Kelvin effect for HNO3
+    REAL(wp), INTENT(in) ::  pkelnh3(nbins)  !< Kelvin effect for NH3
+    REAL(wp), INTENT(in) ::  pmols(nbins,7)
+!-- Saturation ratios
+    REAL(wp), INTENT(out) ::  psathno3(nbins) !<
+    REAL(wp), INTENT(out) ::  psatnh3(nbins)  !< 
+    
+    INTEGER :: b   !< running index for aerosol bins
+!-- Constants for calculating equilibrium constants:    
+    REAL(wp), PARAMETER ::  a1 = -22.52_wp     !< 
+    REAL(wp), PARAMETER ::  a2 = -1.50_wp      !< 
+    REAL(wp), PARAMETER ::  a3 = 13.79_wp      !< 
+    REAL(wp), PARAMETER ::  a4 = 29.17_wp      !< 
+    REAL(wp), PARAMETER ::  b1 = 26.92_wp      !< 
+    REAL(wp), PARAMETER ::  b2 = 26.92_wp      !< 
+    REAL(wp), PARAMETER ::  b3 = -5.39_wp      !< 
+    REAL(wp), PARAMETER ::  b4 = 16.84_wp      !< 
+    REAL(wp), PARAMETER ::  K01 = 1.01E-14_wp  !< 
+    REAL(wp), PARAMETER ::  K02 = 1.81E-5_wp   !< 
+    REAL(wp), PARAMETER ::  K03 = 57.64_wp     !< 
+    REAL(wp), PARAMETER ::  K04 = 2.51E+6_wp   !< 
+!-- Equilibrium constants of equilibrium reactions
+    REAL(wp) ::  KllH2O    !< H2O(aq) <--> H+ + OH- (mol/kg)
+    REAL(wp) ::  KllNH3    !< NH3(aq) + H2O(aq) <--> NH4+ + OH- (mol/kg)
+    REAL(wp) ::  KglNH3    !< NH3(g) <--> NH3(aq) (mol/kg/atm)
+    REAL(wp) ::  KglHNO3   !< HNO3(g) <--> H+ + NO3- (mol2/kg2/atm)
+    REAL(wp) ::  zmolno3   !< molality of NO3- (mol/kg)
+    REAL(wp) ::  zmolhp    !< molality of H+ (mol/kg)
+    REAL(wp) ::  zmolso4   !< molality of SO4(2-) (mol/kg)
+    REAL(wp) ::  zmolcl    !< molality of Cl (mol/kg)
+    REAL(wp) ::  zmolnh4   !< Molality of NH4 (mol/kg)
+    REAL(wp) ::  zmolna    !< Molality of Na (mol/kg)
+    REAL(wp) ::  zhlp1     !<
+    REAL(wp) ::  zhlp2     !<
+    REAL(wp) ::  zhlp3     !<
+    REAL(wp) ::  zxi       !<
+    REAL(wp) ::  zt0       !< Reference temp
+    
+    zhlp1   = 0.0_wp
+    zhlp2   = 0.0_wp 
+    zhlp3   = 0.0_wp
+    zmolcl  = 0.0_wp
+    zmolhp  = 0.0_wp
+    zmolna  = 0.0_wp
+    zmolnh4 = 0.0_wp
+    zmolno3 = 0.0_wp
+    zmolso4 = 0.0_wp
+    zt0     = 298.15_wp 
+    zxi     = 0.0_wp
+!
+!-- Calculates equlibrium rate constants based on Table B.7 in Jacobson (2005) 
+!-- K^ll_H20, K^ll_NH3, K^gl_NH3, K^gl_HNO3 
+    zhlp1 = zt0 / ptemp
+    zhlp2 = zhlp1 - 1.0_wp
+    zhlp3 = 1.0_wp + LOG( zhlp1 ) - zhlp1
+
+    KllH2O = K01 * EXP( a1 * zhlp2 + b1 * zhlp3 )
+    KllNH3 = K02 * EXP( a2 * zhlp2 + b2 * zhlp3 )
+    KglNH3 = K03 * EXP( a3 * zhlp2 + b3 * zhlp3 )
+    KglHNO3 = K04 * EXP( a4 * zhlp2 + b4 * zhlp3 )
+
+    DO  b = 1, nbins
+
+       IF ( ppart(b)%numc > nclim  .AND.  ppart(b)%volc(8) > 1.0E-30_wp  )  THEN
+!
+!--       Molality of H+ and NO3- 
+          zhlp1 = pcnh3(b) * amnh3 + ppart(b)%volc(1) * arhoh2so4 +            &
+                  ppart(b)%volc(2) * arhooc + ppart(b)%volc(5) * arhoss +      &
+                  ppart(b)%volc(8) * arhoh2o
+          zmolno3 = pchno3(b) / zhlp1  !< mol/kg
+!
+!--       Particle mole concentration ratio: (NH3+SS)/H2SO4       
+          zxi = ( pcnh3(b) + ppart(b)%volc(5) * arhoss / amss ) /              &
+                ( ppart(b)%volc(1) * arhoh2so4 / amh2so4 )
+                
+          IF ( zxi <= 2.0_wp )  THEN
+!
+!--          Molality of SO4(2-)
+             zhlp1 = pcnh3(b) * amnh3 + pchno3(b) * amhno3 +                   &
+                     ppart(b)%volc(2) * arhooc + ppart(b)%volc(5) * arhoss +   &
+                     ppart(b)%volc(8) * arhoh2o
+             zmolso4 = ( ppart(b)%volc(1) * arhoh2so4 / amh2so4 ) / zhlp1
+!
+!--          Molality of Cl-
+             zhlp1 = pcnh3(b) * amnh3 + pchno3(b) * amhno3 +                   &
+                     ppart(b)%volc(2) * arhooc + ppart(b)%volc(1) * arhoh2so4  &
+                     + ppart(b)%volc(8) * arhoh2o
+             zmolcl = ( ppart(b)%volc(5) * arhoss / amss ) / zhlp1
+!
+!--          Molality of NH4+
+             zhlp1 =  pchno3(b) * amhno3 + ppart(b)%volc(1) * arhoh2so4 +      &
+                      ppart(b)%volc(2) * arhooc + ppart(b)%volc(5) * arhoss +  &
+                      ppart(b)%volc(8) * arhoh2o
+             zmolnh4 = pcnh3(b) / zhlp1
+!             
+!--          Molality of Na+
+             zmolna = zmolcl
+!
+!--          Molality of H+
+             zmolhp = 2.0_wp * zmolso4 + zmolno3 + zmolcl - ( zmolnh4 + zmolna )
+
+          ELSE
+
+             zhlp2 = pkelhno3(b) * zmolno3 * pachno3(b) ** 2.0_wp
+!
+!--          Mona debugging
+             IF ( zhlp2 > 1.0E-30_wp )  THEN
+                zmolhp = KglHNO3 * pchno3eq(b) / zhlp2 ! Eq. 17.38
+             ELSE
+                zmolhp = 0.0_wp
+             ENDIF
+
+          ENDIF
+
+          zhlp1 = ppart(b)%volc(8) * arhoh2o * argas * ptemp * KglHNO3
+!
+!--       Saturation ratio for NH3 and for HNO3
+          IF ( zmolhp > 0.0_wp )  THEN
+             zhlp2 = pkelnh3(b) / ( zhlp1 * zmolhp )
+             zhlp3 = KllH2O / ( KllNH3 + KglNH3 )
+             psatnh3(b) = zhlp2 * ( ( pacnh4hso2(b) / pachhso4(b) ) **2.0_wp ) &
+                          * zhlp3
+             psathno3(b) = ( pkelhno3(b) * zmolhp * pachno3(b)**2.0_wp ) / zhlp1
+          ELSE
+             psatnh3(b) = 1.0_wp
+             psathno3(b) = 1.0_wp
+          ENDIF
+       ELSE
+          psatnh3(b) = 1.0_wp
+          psathno3(b) = 1.0_wp
+       ENDIF
+
+    ENDDO
+
+  END SUBROUTINE SVsat
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prototype module for calculating the water content of a mixed inorganic/
+!> organic particle + equilibrium water vapour pressure above the solution 
+!> (HNO3, HCL, NH3 and representative organic compounds. Efficient calculation 
+!> of the partitioning of species between gas and aerosol. Based in a chamber 
+!> study. 
+!
+!> Written by Dave Topping. Pure organic component properties predicted by Mark 
+!> Barley based on VOCs predicted in MCM simulations performed by Mike Jenkin. 
+!> Delivered by Gordon McFiggans as Deliverable D22 from WP1.4 in the EU FP6 
+!> EUCAARI Integrated Project.
+!
+!> Queries concerning the use of this code through Gordon McFiggans, 
+!> g.mcfiggans@manchester.ac.uk,
+!> Ownership: D. Topping, Centre for Atmospheric Sciences, University of 
+!> Manchester, 2007
+!
+!> Rewritten to PALM by Mona Kurppa, UHel, 2017
+!------------------------------------------------------------------------------!
+ SUBROUTINE inorganic_pdfite( RH, temp, ions, water_total, Press_HNO3,         &
+                               Press_HCL, Press_NH3, gamma_out, mols_out )
+    
+    IMPLICIT NONE
+    
+    REAL(wp), DIMENSION(:) ::  gamma_out !< Activity coefficient for calculating 
+                                         !< the non-ideal dissociation constants
+                                         !< 1: HNO3, 2: HCL, 3: NH4+/H+ (NH3)
+                                         !< 4: HHSO4**2/H2SO4, 
+                                         !< 5: H2SO4**3/HHSO4**2
+                                         !< 6: NH4HSO2, 7: HHSO4
+    REAL(wp), DIMENSION(:) ::  ions      !< ion molarities (mol/m3)
+                                         !< 1: H+, 2: NH4+, 3: Na+, 4: SO4(2-),
+                                         !< 5: HSO4-, 6: NO3-, 7: Cl-
+    REAL(wp), DIMENSION(7) ::  ions_mol  !< ion molalities (mol/kg)
+                                         !< 1: H+, 2: NH4+, 3: Na+, 4: SO4(2-), 
+                                         !< 5: HSO4-, 6: NO3-, 7: Cl-
+    REAL(wp), DIMENSION(:) ::  mols_out  !< ion molality output (mol/kg)
+                                         !< 1: H+, 2: NH4+, 3: Na+, 4: SO4(2-),
+                                         !< 5: HSO4-, 6: NO3-, 7: Cl-
+    REAL(wp) ::  act_product               !< ionic activity coef. product:
+                                           !< = (gamma_h2so4**3d0) / 
+                                           !<   (gamma_hhso4**2d0)       
+    REAL(wp) ::  ammonium_chloride         !< 
+    REAL(wp) ::  ammonium_chloride_eq_frac !<                          
+    REAL(wp) ::  ammonium_nitrate          !< 
+    REAL(wp) ::  ammonium_nitrate_eq_frac  !<       
+    REAL(wp) ::  ammonium_sulphate         !<  
+    REAL(wp) ::  ammonium_sulphate_eq_frac !<
+    REAL(wp) ::  binary_h2so4              !< binary H2SO4 activity coeff.       
+    REAL(wp) ::  binary_hcl                !< binary HCL activity coeff.
+    REAL(wp) ::  binary_hhso4              !< binary HHSO4 activity coeff.     
+    REAL(wp) ::  binary_hno3               !< binary HNO3 activity coeff.
+    REAL(wp) ::  binary_nh4hso4            !< binary NH4HSO4 activity coeff.    
+    REAL(wp) ::  charge_sum                !< sum of ionic charges
+    REAL(wp) ::  gamma_h2so4               !< activity coefficient       
+    REAL(wp) ::  gamma_hcl                 !< activity coefficient
+    REAL(wp) ::  gamma_hhso4               !< activity coeffient       
+    REAL(wp) ::  gamma_hno3                !< activity coefficient
+    REAL(wp) ::  gamma_nh3                 !< activity coefficient
+    REAL(wp) ::  gamma_nh4hso4             !< activity coefficient
+    REAL(wp) ::  h_out                     !<
+    REAL(wp) ::  h_real                    !< new hydrogen ion conc.
+    REAL(wp) ::  H2SO4_hcl                 !< contribution of H2SO4       
+    REAL(wp) ::  H2SO4_hno3                !< contribution of H2SO4
+    REAL(wp) ::  H2SO4_nh3                 !< contribution of H2SO4
+    REAL(wp) ::  H2SO4_nh4hso4             !< contribution of H2SO4       
+    REAL(wp) ::  HCL_h2so4                 !< contribution of HCL        
+    REAL(wp) ::  HCL_hhso4                 !< contribution of HCL        
+    REAL(wp) ::  HCL_hno3                  !< contribution of HCL
+    REAL(wp) ::  HCL_nh3                   !< contribution of HCL
+    REAL(wp) ::  HCL_nh4hso4               !< contribution of HCL 
+    REAL(wp) ::  henrys_temp_dep           !< temperature dependence of 
+                                           !< Henry's Law       
+    REAL(wp) ::  HNO3_h2so4                !< contribution of HNO3       
+    REAL(wp) ::  HNO3_hcl                  !< contribution of HNO3
+    REAL(wp) ::  HNO3_hhso4                !< contribution of HNO3
+    REAL(wp) ::  HNO3_nh3                  !< contribution of HNO3
+    REAL(wp) ::  HNO3_nh4hso4              !< contribution of HNO3
+    REAL(wp) ::  hso4_out                  !< 
+    REAL(wp) ::  hso4_real                 !< new bisulphate ion conc.
+    REAL(wp) ::  hydrochloric_acid         !<
+    REAL(wp) ::  hydrochloric_acid_eq_frac !<
+    REAL(wp) ::  Kh                        !< equilibrium constant for H+       
+    REAL(wp) ::  K_hcl                     !< equilibrium constant of HCL       
+    REAL(wp) ::  K_hno3                    !< equilibrium constant of HNO3
+    REAL(wp) ::  Knh4                      !< equilibrium constant for NH4+
+    REAL(wp) ::  Kw                        !< equil. const. for water_surface  
+    REAL(wp) ::  Ln_h2so4_act              !< gamma_h2so4 = EXP(Ln_h2so4_act) 
+    REAL(wp) ::  Ln_HCL_act                !< gamma_hcl = EXP( Ln_HCL_act )
+    REAL(wp) ::  Ln_hhso4_act              !< gamma_hhso4 = EXP(Ln_hhso4_act) 
+    REAL(wp) ::  Ln_HNO3_act               !< gamma_hno3 = EXP( Ln_HNO3_act )
+    REAL(wp) ::  Ln_NH4HSO4_act            !< gamma_nh4hso4 = 
+                                           !< EXP( Ln_NH4HSO4_act )
+    REAL(wp) ::  molality_ratio_nh3        !< molality ratio of NH3 
+                                           !< (NH4+ and H+) 
+    REAL(wp) ::  Na2SO4_h2so4              !< contribution of Na2SO4                                              
+    REAL(wp) ::  Na2SO4_hcl                !< contribution of Na2SO4 
+    REAL(wp) ::  Na2SO4_hhso4              !< contribution of Na2SO4        
+    REAL(wp) ::  Na2SO4_hno3               !< contribution of Na2SO4
+    REAL(wp) ::  Na2SO4_nh3                !< contribution of Na2SO4
+    REAL(wp) ::  Na2SO4_nh4hso4            !< contribution of Na2SO4       
+    REAL(wp) ::  NaCl_h2so4                !< contribution of NaCl       
+    REAL(wp) ::  NaCl_hcl                  !< contribution of NaCl
+    REAL(wp) ::  NaCl_hhso4                !< contribution of NaCl       
+    REAL(wp) ::  NaCl_hno3                 !< contribution of NaCl
+    REAL(wp) ::  NaCl_nh3                  !< contribution of NaCl
+    REAL(wp) ::  NaCl_nh4hso4              !< contribution of NaCl       
+    REAL(wp) ::  NaNO3_h2so4               !< contribution of NaNO3       
+    REAL(wp) ::  NaNO3_hcl                 !< contribution of NaNO3
+    REAL(wp) ::  NaNO3_hhso4               !< contribution of NaNO3       
+    REAL(wp) ::  NaNO3_hno3                !< contribution of NaNO3
+    REAL(wp) ::  NaNO3_nh3                 !< contribution of NaNO3  
+    REAL(wp) ::  NaNO3_nh4hso4             !< contribution of NaNO3       
+    REAL(wp) ::  NH42SO4_h2so4             !< contribution of NH42SO4       
+    REAL(wp) ::  NH42SO4_hcl               !< contribution of NH42SO4
+    REAL(wp) ::  NH42SO4_hhso4             !< contribution of NH42SO4       
+    REAL(wp) ::  NH42SO4_hno3              !< contribution of NH42SO4
+    REAL(wp) ::  NH42SO4_nh3               !< contribution of NH42SO4
+    REAL(wp) ::  NH42SO4_nh4hso4           !< contribution of NH42SO4
+    REAL(wp) ::  NH4Cl_h2so4               !< contribution of NH4Cl       
+    REAL(wp) ::  NH4Cl_hcl                 !< contribution of NH4Cl
+    REAL(wp) ::  NH4Cl_hhso4               !< contribution of NH4Cl       
+    REAL(wp) ::  NH4Cl_hno3                !< contribution of NH4Cl
+    REAL(wp) ::  NH4Cl_nh3                 !< contribution of NH4Cl
+    REAL(wp) ::  NH4Cl_nh4hso4             !< contribution of NH4Cl       
+    REAL(wp) ::  NH4NO3_h2so4              !< contribution of NH4NO3
+    REAL(wp) ::  NH4NO3_hcl                !< contribution of NH4NO3
+    REAL(wp) ::  NH4NO3_hhso4              !< contribution of NH4NO3
+    REAL(wp) ::  NH4NO3_hno3               !< contribution of NH4NO3
+    REAL(wp) ::  NH4NO3_nh3                !< contribution of NH4NO3
+    REAL(wp) ::  NH4NO3_nh4hso4            !< contribution of NH4NO3       
+    REAL(wp) ::  nitric_acid               !<
+    REAL(wp) ::  nitric_acid_eq_frac       !< Equivalent fractions
+    REAL(wp) ::  Press_HCL                 !< partial pressure of HCL        
+    REAL(wp) ::  Press_HNO3                !< partial pressure of HNO3
+    REAL(wp) ::  Press_NH3                 !< partial pressure of NH3        
+    REAL(wp) ::  RH                        !< relative humidity [0-1]
+    REAL(wp) ::  temp                      !< temperature
+    REAL(wp) ::  so4_out                   !< 
+    REAL(wp) ::  so4_real                  !< new sulpate ion concentration       
+    REAL(wp) ::  sodium_chloride           !<
+    REAL(wp) ::  sodium_chloride_eq_frac   !<   
+    REAL(wp) ::  sodium_nitrate            !<
+    REAL(wp) ::  sodium_nitrate_eq_frac    !<    
+    REAL(wp) ::  sodium_sulphate           !<
+    REAL(wp) ::  sodium_sulphate_eq_frac   !<       
+    REAL(wp) ::  solutes                   !<
+    REAL(wp) ::  sulphuric_acid            !<       
+    REAL(wp) ::  sulphuric_acid_eq_frac    !< 
+    REAL(wp) ::  water_total               !<
+    
+    REAL(wp) ::  a !< auxiliary variable 
+    REAL(wp) ::  b !< auxiliary variable
+    REAL(wp) ::  c !< auxiliary variable 
+    REAL(wp) ::  root1 !< auxiliary variable 
+    REAL(wp) ::  root2 !< auxiliary variable
+
+    INTEGER(iwp) ::  binary_case
+    INTEGER(iwp) ::  full_complexity
+!       
+!-- Value initialisation
+    binary_h2so4    = 0.0_wp   
+    binary_hcl      = 0.0_wp  
+    binary_hhso4    = 0.0_wp  
+    binary_hno3     = 0.0_wp  
+    binary_nh4hso4  = 0.0_wp  
+    henrys_temp_dep = ( 1.0_wp / temp - 1.0_wp / 298.0_wp )
+    HCL_hno3        = 1.0_wp
+    H2SO4_hno3      = 1.0_wp
+    NH42SO4_hno3    = 1.0_wp
+    NH4NO3_hno3     = 1.0_wp
+    NH4Cl_hno3      = 1.0_wp
+    Na2SO4_hno3     = 1.0_wp
+    NaNO3_hno3      = 1.0_wp
+    NaCl_hno3       = 1.0_wp
+    HNO3_hcl        = 1.0_wp
+    H2SO4_hcl       = 1.0_wp
+    NH42SO4_hcl     = 1.0_wp
+    NH4NO3_hcl      = 1.0_wp
+    NH4Cl_hcl       = 1.0_wp
+    Na2SO4_hcl      = 1.0_wp 
+    NaNO3_hcl       = 1.0_wp
+    NaCl_hcl        = 1.0_wp
+    HNO3_nh3        = 1.0_wp
+    HCL_nh3         = 1.0_wp
+    H2SO4_nh3       = 1.0_wp 
+    NH42SO4_nh3     = 1.0_wp 
+    NH4NO3_nh3      = 1.0_wp
+    NH4Cl_nh3       = 1.0_wp
+    Na2SO4_nh3      = 1.0_wp
+    NaNO3_nh3       = 1.0_wp
+    NaCl_nh3        = 1.0_wp
+    HNO3_hhso4      = 1.0_wp 
+    HCL_hhso4       = 1.0_wp
+    NH42SO4_hhso4   = 1.0_wp
+    NH4NO3_hhso4    = 1.0_wp
+    NH4Cl_hhso4     = 1.0_wp
+    Na2SO4_hhso4    = 1.0_wp
+    NaNO3_hhso4     = 1.0_wp
+    NaCl_hhso4      = 1.0_wp
+    HNO3_h2so4      = 1.0_wp
+    HCL_h2so4       = 1.0_wp
+    NH42SO4_h2so4   = 1.0_wp 
+    NH4NO3_h2so4    = 1.0_wp
+    NH4Cl_h2so4     = 1.0_wp
+    Na2SO4_h2so4    = 1.0_wp
+    NaNO3_h2so4     = 1.0_wp
+    NaCl_h2so4      = 1.0_wp
+!-- New NH3 variables
+    HNO3_nh4hso4    = 1.0_wp 
+    HCL_nh4hso4     = 1.0_wp
+    H2SO4_nh4hso4   = 1.0_wp
+    NH42SO4_nh4hso4 = 1.0_wp 
+    NH4NO3_nh4hso4  = 1.0_wp
+    NH4Cl_nh4hso4   = 1.0_wp
+    Na2SO4_nh4hso4  = 1.0_wp
+    NaNO3_nh4hso4   = 1.0_wp
+    NaCl_nh4hso4    = 1.0_wp
+!
+!-- Juha Tonttila added
+    mols_out   = 0.0_wp
+    Press_HNO3 = 0.0_wp
+    Press_HCL  = 0.0_wp
+    Press_NH3  = 0.0_wp !< Initialising vapour pressure over the
+                        !< multicomponent particle
+    gamma_out  = 1.0_wp !< i.e. don't alter the ideal mixing ratios if 
+                        !< there's nothing there.
+!       
+!-- 1) - COMPOSITION DEFINITIONS
+!
+!-- a) Inorganic ion pairing:
+!-- In order to calculate the water content, which is also used in 
+!-- calculating vapour pressures, one needs to pair the anions and cations 
+!-- for use in the ZSR mixing rule. The equation provided by Clegg et al. 
+!-- (2001) is used for ion pairing. The solutes chosen comprise of 9 
+!-- inorganic salts and acids which provide a pairing between each anion and
+!-- cation: (NH4)2SO4, NH4NO3, NH4Cl, Na2SO4, NaNO3, NaCl, H2SO4, HNO3, HCL.  
+!-- The organic compound is treated as a seperate solute.
+!-- Ions: 1: H+, 2: NH4+, 3: Na+, 4: SO4(2-), 5: HSO4-, 6: NO3-, 7: Cl-
+!
+    charge_sum = ions(1) + ions(2) + ions(3) + 2.0_wp * ions(4) + ions(5) +    &
+                 ions(6) + ions(7)
+    nitric_acid       = 0.0_wp   ! HNO3
+    nitric_acid       = ( 2.0_wp * ions(1) * ions(6) *                         &
+                        ( ( 1.0_wp / 1.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    hydrochloric_acid = 0.0_wp   ! HCL 
+    hydrochloric_acid = ( 2.0_wp * ions(1) * ions(7) *                         &
+                        ( ( 1.0_wp / 1.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    sulphuric_acid    = 0.0_wp   ! H2SO4
+    sulphuric_acid    = ( 2.0_wp * ions(1) * ions(4) *                         &
+                        ( ( 2.0_wp / 2.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    ammonium_sulphate = 0.0_wp   ! (NH4)2SO4
+    ammonium_sulphate = ( 2.0_wp * ions(2) * ions(4) *                         &
+                        ( ( 2.0_wp / 2.0_wp ) ** 0.5_wp ) ) / ( charge_sum ) 
+    ammonium_nitrate  = 0.0_wp   ! NH4NO3
+    ammonium_nitrate  = ( 2.0_wp * ions(2) * ions(6) *                         &
+                        ( ( 1.0_wp / 1.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    ammonium_chloride = 0.0_wp   ! NH4Cl
+    ammonium_chloride = ( 2.0_wp * ions(2) * ions(7) *                         &
+                        ( ( 1.0_wp / 1.0_wp ) ** 0.5_wp ) ) / ( charge_sum )    
+    sodium_sulphate   = 0.0_wp   ! Na2SO4
+    sodium_sulphate   = ( 2.0_wp * ions(3) * ions(4) *                         &
+                        ( ( 2.0_wp / 2.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    sodium_nitrate    = 0.0_wp   ! NaNO3
+    sodium_nitrate    = ( 2.0_wp * ions(3) *ions(6) *                          &
+                        ( ( 1.0_wp / 1.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    sodium_chloride   = 0.0_wp   ! NaCl
+    sodium_chloride   = ( 2.0_wp * ions(3) * ions(7) *                         &
+                        ( ( 1.0_wp / 1.0_wp ) ** 0.5_wp ) ) / ( charge_sum )
+    solutes = 0.0_wp
+    solutes = 3.0_wp * sulphuric_acid +   2.0_wp * hydrochloric_acid +         &
+              2.0_wp * nitric_acid +      3.0_wp * ammonium_sulphate +         &
+              2.0_wp * ammonium_nitrate + 2.0_wp * ammonium_chloride +         &
+              3.0_wp * sodium_sulphate +  2.0_wp * sodium_nitrate +            &
+              2.0_wp * sodium_chloride
+
+! 
+!-- b) Inorganic equivalent fractions:
+!-- These values are calculated so that activity coefficients can be 
+!-- expressed by a linear additive rule, thus allowing more efficient
+!-- calculations and future expansion (see more detailed description below)               
+    nitric_acid_eq_frac       = 2.0_wp * nitric_acid / ( solutes )
+    hydrochloric_acid_eq_frac = 2.0_wp * hydrochloric_acid / ( solutes )
+    sulphuric_acid_eq_frac    = 3.0_wp * sulphuric_acid / ( solutes )
+    ammonium_sulphate_eq_frac = 3.0_wp * ammonium_sulphate / ( solutes )
+    ammonium_nitrate_eq_frac  = 2.0_wp * ammonium_nitrate / ( solutes )
+    ammonium_chloride_eq_frac = 2.0_wp * ammonium_chloride / ( solutes )
+    sodium_sulphate_eq_frac   = 3.0_wp * sodium_sulphate / ( solutes )
+    sodium_nitrate_eq_frac    = 2.0_wp * sodium_nitrate / ( solutes )
+    sodium_chloride_eq_frac   = 2.0_wp * sodium_chloride / ( solutes )
+!
+!-- Inorganic ion molalities
+    ions_mol(:) = 0.0_wp
+    ions_mol(1) = ions(1) / ( water_total * 18.01528E-3_wp )   ! H+
+    ions_mol(2) = ions(2) / ( water_total * 18.01528E-3_wp )   ! NH4+
+    ions_mol(3) = ions(3) / ( water_total * 18.01528E-3_wp )   ! Na+
+    ions_mol(4) = ions(4) / ( water_total * 18.01528E-3_wp )   ! SO4(2-)
+    ions_mol(5) = ions(5) / ( water_total * 18.01528E-3_wp )   ! HSO4(2-)
+    ions_mol(6) = ions(6) / ( water_total * 18.01528E-3_wp )   !  NO3-
+    ions_mol(7) = ions(7) / ( water_total * 18.01528E-3_wp )   ! Cl-
+
+!--    ***
+!-- At this point we may need to introduce a method for prescribing H+ when
+!-- there is no 'real' value for H+..i.e. in the sulphate poor domain
+!-- This will give a value for solve quadratic proposed by Zaveri et al. 2005
+!
+!-- 2) - WATER CALCULATION
+!
+!-- a) The water content is calculated using the ZSR rule with solute 
+!-- concentrations calculated using 1a above. Whilst the usual approximation of
+!-- ZSR relies on binary data consisting of 5th or higher order polynomials, in
+!-- this code 4 different RH regimes are used, each housing cubic equations for 
+!-- the water associated with each solute listed above. Binary water contents 
+!-- for inorganic components were calculated using AIM online (Clegg et al 
+!-- 1998). The water associated with the organic compound is calculated assuming
+!-- ideality and that aw = RH.
+!
+!-- b) Molality of each inorganic ion and organic solute (initial input) is
+!-- calculated for use in vapour pressure calculation. 
+!
+!-- 3) - BISULPHATE ION DISSOCIATION CALCULATION
+!
+!-- The dissociation of the bisulphate ion is calculated explicitly. A solution
+!-- to the equilibrium equation between the bisulphate ion, hydrogen ion and 
+!-- sulphate ion is found using tabulated equilibrium constants (referenced). It
+!-- is necessary to calculate the activity coefficients of HHSO4 and H2SO4 in a
+!-- non-iterative manner. These are calculated using the same format as 
+!-- described in 4) below, where both activity coefficients were fit to the 
+!-- output from ADDEM (Topping et al 2005a,b) covering an extensive composition
+!-- space, providing the activity coefficients and bisulphate ion dissociation 
+!-- as a function of equivalent mole fractions and relative humidity.
+!
+!-- NOTE: the flags "binary_case" and "full_complexity" are not used in this 
+!-- prototype. They are used for simplification of the fit expressions when 
+!-- using limited composition regions. This section of code calculates the 
+!-- bisulphate ion concentration
+!
+    IF ( ions(1) > 0.0_wp .AND. ions(4) > 0.0_wp ) THEN
+!       
+!--    HHSO4:
+       binary_case = 1
+       IF ( RH > 0.1_wp  .AND.  RH < 0.9_wp )  THEN
+          binary_hhso4 = - 4.9521_wp * ( RH**3 ) + 9.2881_wp * ( RH**2 ) -     &
+                           10.777_wp * RH + 6.0534_wp
+       ELSEIF ( RH >= 0.9_wp  .AND.  RH < 0.955_wp )  THEN
+          binary_hhso4 = - 6.3777_wp * RH + 5.962_wp
+       ELSEIF ( RH >= 0.955_wp  .AND.  RH < 0.99_wp )  THEN
+          binary_hhso4 = 2367.2_wp * ( RH**3 ) - 6849.7_wp * ( RH**2 ) +       &
+                         6600.9_wp * RH - 2118.7_wp    
+       ELSEIF ( RH >= 0.99_wp  .AND.  RH < 0.9999_wp )  THEN
+          binary_hhso4 = 3E-7_wp * ( RH**5 ) - 2E-5_wp * ( RH**4 ) +           &
+                         0.0004_wp * ( RH**3 ) - 0.0035_wp * ( RH**2 ) +       &
+                         0.0123_wp * RH - 0.3025_wp
+       ENDIF
+       
+       IF ( nitric_acid > 0.0_wp )  THEN
+          HNO3_hhso4 = - 4.2204_wp * ( RH**4 ) + 12.193_wp * ( RH**3 ) -       &
+                         12.481_wp * ( RH**2 ) + 6.459_wp * RH - 1.9004_wp
+       ENDIF
+       
+       IF ( hydrochloric_acid > 0.0_wp )  THEN
+          HCL_hhso4 = - 54.845_wp * ( RH**7 ) + 209.54_wp * ( RH**6 ) -        &
+                        336.59_wp * ( RH**5 ) + 294.21_wp * ( RH**4 ) -        &
+                        150.07_wp * ( RH**3 ) + 43.767_wp * ( RH**2 ) -        &
+                        6.5495_wp * RH + 0.60048_wp
+       ENDIF
+       
+       IF ( ammonium_sulphate > 0.0_wp )  THEN
+          NH42SO4_hhso4 = 16.768_wp * ( RH**3 ) - 28.75_wp * ( RH**2 ) +       &
+                          20.011_wp * RH - 8.3206_wp
+       ENDIF
+       
+       IF ( ammonium_nitrate > 0.0_wp )  THEN
+          NH4NO3_hhso4 = - 17.184_wp * ( RH**4 ) + 56.834_wp * ( RH**3 ) -     &
+                           65.765_wp * ( RH**2 ) + 35.321_wp * RH - 9.252_wp
+       ENDIF
+       
+       IF (ammonium_chloride > 0.0_wp )  THEN
+          IF ( RH < 0.2_wp .AND. RH >= 0.1_wp )  THEN
+             NH4Cl_hhso4 = 3.2809_wp * RH - 2.0637_wp
+          ELSEIF ( RH >= 0.2_wp .AND. RH < 0.99_wp )  THEN
+             NH4Cl_hhso4 = - 1.2981_wp * ( RH**3 ) + 4.7461_wp * ( RH**2 ) -   &
+                             2.3269_wp * RH - 1.1259_wp
+          ENDIF
+       ENDIF
+       
+       IF ( sodium_sulphate > 0.0_wp )  THEN
+          Na2SO4_hhso4 = 118.87_wp * ( RH**6 ) - 358.63_wp * ( RH**5 ) +       &
+                         435.85_wp * ( RH**4 ) - 272.88_wp * ( RH**3 ) +       &
+                         94.411_wp * ( RH**2 ) - 18.21_wp * RH + 0.45935_wp
+       ENDIF
+       
+       IF ( sodium_nitrate > 0.0_wp )  THEN
+          IF ( RH < 0.2_wp  .AND.  RH >= 0.1_wp )  THEN
+             NaNO3_hhso4 = 4.8456_wp * RH - 2.5773_wp    
+          ELSEIF ( RH >= 0.2_wp  .AND.  RH < 0.99_wp )  THEN
+             NaNO3_hhso4 = 0.5964_wp * ( RH**3 ) - 0.38967_wp * ( RH**2 ) +    &
+                           1.7918_wp * RH - 1.9691_wp 
+          ENDIF
+       ENDIF
+       
+       IF ( sodium_chloride > 0.0_wp )  THEN
+          IF ( RH < 0.2_wp )  THEN
+             NaCl_hhso4 = 0.51995_wp * RH - 1.3981_wp
+          ELSEIF ( RH >= 0.2_wp  .AND.  RH < 0.99_wp )  THEN
+             NaCl_hhso4 = 1.6539_wp * RH - 1.6101_wp
+          ENDIF
+       ENDIF
+       
+       Ln_hhso4_act = binary_hhso4 +                                           &
+                      nitric_acid_eq_frac       * HNO3_hhso4 +                 &
+                      hydrochloric_acid_eq_frac * HCL_hhso4 +                  &
+                      ammonium_sulphate_eq_frac * NH42SO4_hhso4 +              &
+                      ammonium_nitrate_eq_frac  * NH4NO3_hhso4 +               &
+                      ammonium_chloride_eq_frac * NH4Cl_hhso4 +                &
+                      sodium_sulphate_eq_frac   * Na2SO4_hhso4 +               &
+                      sodium_nitrate_eq_frac    * NaNO3_hhso4 +                &
+                      sodium_chloride_eq_frac   * NaCl_hhso4
+       gamma_hhso4 = EXP( Ln_hhso4_act )   ! molal activity coefficient of HHSO4
+
+!--    H2SO4 (sulphuric acid):
+       IF ( RH >= 0.1_wp  .AND.  RH < 0.9_wp )  THEN
+          binary_h2so4 = 2.4493_wp * ( RH**2 ) - 6.2326_wp * RH + 2.1763_wp
+       ELSEIF ( RH >= 0.9_wp  .AND.  RH < 0.98 )  THEN
+          binary_h2so4 = 914.68_wp * ( RH**3 ) - 2502.3_wp * ( RH**2 ) +       &
+                         2281.9_wp * RH - 695.11_wp
+       ELSEIF ( RH >= 0.98  .AND.  RH < 0.9999 )  THEN
+          binary_h2so4 = 3E-8_wp * ( RH**4 ) - 5E-6_wp * ( RH**3 ) +           &
+                       0.0003_wp * ( RH**2 ) - 0.0022_wp * RH - 1.1305_wp
+       ENDIF
+       
+       IF ( nitric_acid > 0.0_wp )  THEN
+          HNO3_h2so4 = - 16.382_wp * ( RH**5 ) + 46.677_wp * ( RH**4 ) -       &
+                         54.149_wp * ( RH**3 ) + 34.36_wp * ( RH**2 ) -        &
+                         12.54_wp * RH + 2.1368_wp
+       ENDIF
+       
+       IF ( hydrochloric_acid > 0.0_wp )  THEN
+          HCL_h2so4 = - 14.409_wp * ( RH**5 ) + 42.804_wp * ( RH**4 ) -        &
+                         47.24_wp * ( RH**3 ) + 24.668_wp * ( RH**2 ) -        &
+                        5.8015_wp * RH + 0.084627_wp
+       ENDIF
+       
+       IF ( ammonium_sulphate > 0.0_wp )  THEN
+          NH42SO4_h2so4 = 66.71_wp * ( RH**5 ) - 187.5_wp * ( RH**4 ) +        &
+                         210.57_wp * ( RH**3 ) - 121.04_wp * ( RH**2 ) +       &
+                         39.182_wp * RH - 8.0606_wp
+       ENDIF
+       
+       IF ( ammonium_nitrate > 0.0_wp )  THEN
+          NH4NO3_h2so4 = - 22.532_wp * ( RH**4 ) + 66.615_wp * ( RH**3 ) -     &
+                           74.647_wp * ( RH**2 ) + 37.638_wp * RH - 6.9711_wp 
+       ENDIF
+       
+       IF ( ammonium_chloride > 0.0_wp )  THEN
+          IF ( RH >= 0.1_wp  .AND.  RH < 0.2_wp )  THEN
+             NH4Cl_h2so4 = - 0.32089_wp * RH + 0.57738_wp
+          ELSEIF ( RH >= 0.2_wp  .AND.  RH < 0.9_wp )  THEN
+             NH4Cl_h2so4 = 18.089_wp * ( RH**5 ) - 51.083_wp * ( RH**4 ) +     &
+                            50.32_wp * ( RH**3 ) - 17.012_wp * ( RH**2 ) -     &
+                          0.93435_wp * RH + 1.0548_wp
+          ELSEIF ( RH >= 0.9_wp  .AND.  RH < 0.99_wp )  THEN
+             NH4Cl_h2so4 = - 1.5749_wp * RH + 1.7002_wp
+          ENDIF
+       ENDIF
+       
+       IF ( sodium_sulphate > 0.0_wp )  THEN
+          Na2SO4_h2so4 = 29.843_wp * ( RH**4 ) - 69.417_wp * ( RH**3 ) +       &
+                         61.507_wp * ( RH**2 ) - 29.874_wp * RH + 7.7556_wp
+       ENDIF
+       
+       IF ( sodium_nitrate > 0.0_wp )  THEN
+          NaNO3_h2so4 = - 122.37_wp * ( RH**6 ) + 427.43_wp * ( RH**5 ) -      &
+                          604.68_wp * ( RH**4 ) + 443.08_wp * ( RH**3 ) -      &
+                          178.61_wp * ( RH**2 ) + 37.242_wp * RH - 1.9564_wp
+       ENDIF
+       
+       IF ( sodium_chloride > 0.0_wp )  THEN
+          NaCl_h2so4 = - 40.288_wp * ( RH**5 ) + 115.61_wp * ( RH**4 ) -       &
+                         129.99_wp * ( RH**3 ) + 72.652_wp * ( RH**2 ) -       &
+                         22.124_wp * RH + 4.2676_wp
+       ENDIF
+       
+       Ln_h2so4_act = binary_h2so4 +                                           &
+                      nitric_acid_eq_frac       * HNO3_h2so4 +                 &
+                      hydrochloric_acid_eq_frac * HCL_h2so4 +                  &
+                      ammonium_sulphate_eq_frac * NH42SO4_h2so4 +              &
+                      ammonium_nitrate_eq_frac  * NH4NO3_h2so4 +               &
+                      ammonium_chloride_eq_frac * NH4Cl_h2so4 +                &
+                      sodium_sulphate_eq_frac   * Na2SO4_h2so4 +               &
+                      sodium_nitrate_eq_frac    * NaNO3_h2so4 +                &
+                      sodium_chloride_eq_frac   * NaCl_h2so4                     
+
+       gamma_h2so4 = EXP( Ln_h2so4_act )    ! molal activity coefficient 
+!          
+!--    Export activity coefficients
+       IF ( gamma_h2so4 > 1.0E-10_wp )  THEN
+          gamma_out(4) = ( gamma_hhso4**2.0_wp ) / gamma_h2so4
+       ENDIF
+       IF ( gamma_hhso4 > 1.0E-10_wp )  THEN
+          gamma_out(5) = ( gamma_h2so4**3.0_wp ) / ( gamma_hhso4**2.0_wp )
+       ENDIF
+!
+!--    Ionic activity coefficient product
+       act_product = ( gamma_h2so4**3.0_wp ) / ( gamma_hhso4**2.0_wp )
+!
+!--    Solve the quadratic equation (i.e. x in ax**2 + bx + c = 0)
+       a = 1.0_wp
+       b = - 1.0_wp * ( ions(4) + ions(1) + ( ( water_total * 18.0E-3_wp ) /   &
+          ( 99.0_wp * act_product ) ) )
+       c = ions(4) * ions(1)
+       root1 = ( ( -1.0_wp * b ) + ( ( ( b**2 ) - 4.0_wp * a * c )**0.5_wp     &
+               ) ) / ( 2 * a )
+       root2 = ( ( -1.0_wp * b ) - ( ( ( b**2 ) - 4.0_wp * a * c) **0.5_wp     &
+               ) ) / ( 2 * a )
+
+       IF ( root1 > ions(1)  .OR.  root1 < 0.0_wp )  THEN
+          root1 = 0.0_wp
+       ENDIF
+
+       IF ( root2 > ions(1)  .OR.  root2 < 0.0_wp )  THEN
+          root2 = 0.0_wp
+       ENDIF
+!          
+!--    Calculate the new hydrogen ion, bisulphate ion and sulphate ion 
+!--    concentration
+       hso4_real = 0.0_wp
+       h_real    = ions(1)
+       so4_real  = ions(4)
+       IF ( root1 == 0.0_wp )  THEN
+          hso4_real = root2
+       ELSEIF ( root2 == 0.0_wp )  THEN
+          hso4_real = root1
+       ENDIF
+       h_real   = ions(1) - hso4_real
+       so4_real = ions(4) - hso4_real
+!
+!--    Recalculate ion molalities
+       ions_mol(1) = h_real    / ( water_total * 18.01528E-3_wp )   ! H+
+       ions_mol(4) = so4_real  / ( water_total * 18.01528E-3_wp )   ! SO4(2-)
+       ions_mol(5) = hso4_real / ( water_total * 18.01528E-3_wp )   ! HSO4(2-)
+
+       h_out    = h_real
+       hso4_out = hso4_real
+       so4_out  = so4_real
+       
+    ELSEIF ( ions(1) == 0.0_wp  .OR.  ions(4) == 0.0_wp )  THEN
+       h_out    = ions(1)
+       hso4_out = 0.0_wp
+       so4_out  = ions(4)
+    ENDIF
+
+!
+!-- 4) ACTIVITY COEFFICIENTS -for vapour pressures of HNO3,HCL and NH3
+!
+!-- This section evaluates activity coefficients and vapour pressures using the
+!-- water content calculated above) for each inorganic condensing species: 
+!-- a - HNO3, b - NH3, c - HCL.
+!-- The following procedure is used:
+!-- Zaveri et al (2005) found that one could express the variation of activity
+!-- coefficients linearly in log-space if equivalent mole fractions were used. 
+!-- So, by a taylor series expansion LOG( activity coefficient ) = 
+!--    LOG( binary activity coefficient at a given RH ) + 
+!--    (equivalent mole fraction compound A) * 
+!--    ('interaction' parameter between A and condensing species) + 
+!--    equivalent mole fraction compound B) * 
+!--    ('interaction' parameter between B and condensing species). 
+!-- Here, the interaction parameters have been fit to ADDEM by searching the 
+!-- whole compositon space and fit usign the Levenberg-Marquardt non-linear 
+!-- least squares algorithm.
+!
+!-- They are given as a function of RH and vary with complexity ranging from 
+!-- linear to 5th order polynomial expressions, the binary activity coefficients
+!-- were calculated using AIM online.
+!-- NOTE: for NH3, no binary activity coefficient was used and the data were fit
+!-- to the ratio of the activity coefficients for the ammonium and hydrogen 
+!-- ions. Once the activity coefficients are obtained the vapour pressure can be
+!-- easily calculated using tabulated equilibrium constants (referenced). This 
+!-- procedure differs from that of Zaveri et al (2005) in that it is not assumed
+!-- one can carry behaviour from binary mixtures in multicomponent systems. To
+!-- this end we have fit the 'interaction' parameters explicitly to a general 
+!-- inorganic equilibrium model (ADDEM - Topping et al. 2005a,b). Such 
+!-- parameters take into account bisulphate ion dissociation and water content.
+!-- This also allows us to consider one regime for all composition space, rather
+!-- than defining sulphate rich and sulphate poor regimes
+!-- NOTE: The flags "binary_case" and "full_complexity" are not used in this 
+!-- prototype. They are used for simplification of the fit expressions when 
+!-- using limited composition regions.
+!
+!-- a) - ACTIVITY COEFF/VAPOUR PRESSURE - HNO3
+    IF ( ions(1) > 0.0_wp  .AND.  ions(6) > 0.0_wp )  THEN
+       binary_case = 1
+       IF ( RH > 0.1_wp  .AND.  RH < 0.98_wp )  THEN
+          IF ( binary_case == 1 )  THEN
+             binary_hno3 = 1.8514_wp * ( RH**3 ) - 4.6991_wp * ( RH**2 ) +     &
+                           1.5514_wp * RH + 0.90236_wp
+          ELSEIF ( binary_case == 2 )  THEN
+             binary_hno3 = - 1.1751_wp * ( RH**2 ) - 0.53794_wp * RH +         &
+                             1.2808_wp
+          ENDIF
+       ELSEIF ( RH >= 0.98_wp  .AND.  RH < 0.9999_wp )  THEN
+          binary_hno3 = 1244.69635941351_wp * ( RH**3 ) -                      &
+                        2613.93941099991_wp * ( RH**2 ) +                      &
+                        1525.0684974546_wp * RH -155.946764059316_wp
+       ENDIF
+!          
+!--    Contributions from other solutes
+       full_complexity = 1
+       IF ( hydrochloric_acid > 0.0_wp )  THEN   ! HCL
+          IF ( full_complexity == 1  .OR.  RH < 0.4_wp )  THEN
+             HCL_hno3 = 16.051_wp * ( RH**4 ) - 44.357_wp * ( RH**3 ) +        &
+                        45.141_wp * ( RH**2 ) - 21.638_wp * RH + 4.8182_wp
+          ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+             HCL_hno3 = - 1.5833_wp * RH + 1.5569_wp
+          ENDIF
+       ENDIF
+       
+       IF ( sulphuric_acid > 0.0_wp )  THEN   ! H2SO4
+          IF ( full_complexity == 1  .OR.  RH < 0.4_wp )  THEN
+             H2SO4_hno3 = - 3.0849_wp * ( RH**3 ) + 5.9609_wp * ( RH**2 ) -    &
+                             4.468_wp * RH + 1.5658_wp
+          ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+             H2SO4_hno3 = - 0.93473_wp * RH + 0.9363_wp
+          ENDIF
+       ENDIF
+       
+       IF ( ammonium_sulphate > 0.0_wp )  THEN   ! NH42SO4
+          NH42SO4_hno3 = 16.821_wp * ( RH**3 ) - 28.391_wp * ( RH**2 ) +       &
+                         18.133_wp * RH - 6.7356_wp
+       ENDIF
+       
+       IF ( ammonium_nitrate > 0.0_wp )  THEN   ! NH4NO3
+          NH4NO3_hno3 = 11.01_wp * ( RH**3 ) - 21.578_wp * ( RH**2 ) +         &
+                       14.808_wp * RH - 4.2593_wp
+       ENDIF
+       
+       IF ( ammonium_chloride > 0.0_wp )  THEN   ! NH4Cl
+          IF ( full_complexity == 1  .OR.  RH <= 0.4_wp )  THEN
+             NH4Cl_hno3 = - 1.176_wp * ( RH**3 ) + 5.0828_wp * ( RH**2 ) -     &
+                           3.8792_wp * RH - 0.05518_wp
+          ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+             NH4Cl_hno3 = 2.6219_wp * ( RH**2 ) - 2.2609_wp * RH - 0.38436_wp
+          ENDIF
+       ENDIF
+       
+       IF ( sodium_sulphate > 0.0_wp )  THEN   ! Na2SO4
+          Na2SO4_hno3 = 35.504_wp * ( RH**4 ) - 80.101_wp * ( RH**3 ) +        &
+                        67.326_wp * ( RH**2 ) - 28.461_wp * RH + 5.6016_wp
+       ENDIF
+       
+       IF ( sodium_nitrate > 0.0_wp )  THEN   ! NaNO3
+          IF ( full_complexity == 1 .OR. RH <= 0.4_wp ) THEN
+             NaNO3_hno3 = 23.659_wp * ( RH**5 ) - 66.917_wp * ( RH**4 ) +      &
+                          74.686_wp * ( RH**3 ) - 40.795_wp * ( RH**2 ) +      &
+                          10.831_wp * RH - 1.4701_wp
+          ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+             NaNO3_hno3 = 14.749_wp * ( RH**4 ) - 35.237_wp * ( RH**3 ) +      &
+                          31.196_wp * ( RH**2 ) - 12.076_wp * RH + 1.3605_wp
+          ENDIF
+       ENDIF
+       
+       IF ( sodium_chloride > 0.0_wp )  THEN   ! NaCl
+          IF ( full_complexity == 1  .OR.  RH <= 0.4_wp )  THEN
+             NaCl_hno3 = 13.682_wp * ( RH**4 ) - 35.122_wp * ( RH**3 ) +       &
+                         33.397_wp * ( RH**2 ) - 14.586_wp * RH + 2.6276_wp
+          ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+             NaCl_hno3 = 1.1882_wp * ( RH**3 ) - 1.1037_wp * ( RH**2 ) -       &
+                         0.7642_wp * RH + 0.6671_wp
+          ENDIF
+       ENDIF
+       
+       Ln_HNO3_act = binary_hno3 +                                             &
+                     hydrochloric_acid_eq_frac * HCL_hno3 +                    &
+                     sulphuric_acid_eq_frac    * H2SO4_hno3 +                  &
+                     ammonium_sulphate_eq_frac * NH42SO4_hno3 +                &
+                     ammonium_nitrate_eq_frac  * NH4NO3_hno3 +                 &
+                     ammonium_chloride_eq_frac * NH4Cl_hno3 +                  &
+                     sodium_sulphate_eq_frac   * Na2SO4_hno3 +                 &
+                     sodium_nitrate_eq_frac    * NaNO3_hno3 +                  &
+                     sodium_chloride_eq_frac   * NaCl_hno3
+
+       gamma_hno3   = EXP( Ln_HNO3_act )   ! Molal activity coefficient of HNO3
+       gamma_out(1) = gamma_hno3
+!
+!--    Partial pressure calculation
+!--    K_hno3 = 2.51 * ( 10**6 )  
+!--    K_hno3 = 2.628145923d6 !< calculated by AIM online (Clegg et al 1998)
+!--    after Chameides (1984) (and NIST database)
+       K_hno3     = 2.6E6_wp * EXP( 8700.0_wp * henrys_temp_dep) 
+       Press_HNO3 = ( ions_mol(1) * ions_mol(6) * ( gamma_hno3**2 ) ) /        &
+                      K_hno3
+    ENDIF
+!       
+!-- b) - ACTIVITY COEFF/VAPOUR PRESSURE - NH3
+!-- Follow the two solute approach of Zaveri et al. (2005)
+    IF ( ions(2) > 0.0_wp  .AND.  ions_mol(1) > 0.0_wp )  THEN 
+!--    NH4HSO4:
+       binary_nh4hso4 = 56.907_wp * ( RH**6 ) - 155.32_wp * ( RH**5 ) +        &
+                        142.94_wp * ( RH**4 ) - 32.298_wp * ( RH**3 ) -        &
+                        27.936_wp * ( RH**2 ) + 19.502_wp * RH - 4.2618_wp
+       IF ( nitric_acid > 0.0_wp)  THEN   ! HNO3
+          HNO3_nh4hso4 = 104.8369_wp * ( RH**8 ) - 288.8923_wp * ( RH**7 ) +   &
+                         129.3445_wp * ( RH**6 ) + 373.0471_wp * ( RH**5 ) -   &
+                         571.0385_wp * ( RH**4 ) + 326.3528_wp * ( RH**3 ) -   &
+                           74.169_wp * ( RH**2 ) - 2.4999_wp * RH + 3.17_wp
+       ENDIF
+       
+       IF ( hydrochloric_acid > 0.0_wp)  THEN   ! HCL 
+          HCL_nh4hso4 = - 7.9133_wp * ( RH**8 ) + 126.6648_wp * ( RH**7 ) -    &
+                        460.7425_wp * ( RH**6 ) + 731.606_wp  * ( RH**5 ) -    &
+                        582.7467_wp * ( RH**4 ) + 216.7197_wp * ( RH**3 ) -   &
+                         11.3934_wp * ( RH**2 ) - 17.7728_wp  * RH + 5.75_wp
+       ENDIF
+       
+       IF ( sulphuric_acid > 0.0_wp)  THEN   ! H2SO4
+          H2SO4_nh4hso4 = 195.981_wp * ( RH**8 ) - 779.2067_wp * ( RH**7 ) +   &
+                        1226.3647_wp * ( RH**6 ) - 964.0261_wp * ( RH**5 ) +   &
+                         391.7911_wp * ( RH**4 ) - 84.1409_wp  * ( RH**3 ) +   &
+                          20.0602_wp * ( RH**2 ) - 10.2663_wp  * RH + 3.5817_wp
+       ENDIF
+       
+       IF ( ammonium_sulphate > 0.0_wp)  THEN   ! NH42SO4
+          NH42SO4_nh4hso4 = 617.777_wp * ( RH**8 ) - 2547.427_wp * ( RH**7 )   &
+                        + 4361.6009_wp * ( RH**6 ) - 4003.162_wp * ( RH**5 )   &
+                        + 2117.8281_wp * ( RH**4 ) - 640.0678_wp * ( RH**3 )   &
+                        + 98.0902_wp   * ( RH**2 ) - 2.2615_wp  * RH - 2.3811_wp
+       ENDIF
+       
+       IF ( ammonium_nitrate > 0.0_wp)  THEN   ! NH4NO3
+          NH4NO3_nh4hso4 = - 104.4504_wp * ( RH**8 ) + 539.5921_wp *           &
+                ( RH**7 ) - 1157.0498_wp * ( RH**6 ) + 1322.4507_wp *          &
+                ( RH**5 ) - 852.2475_wp * ( RH**4 ) + 298.3734_wp *            &
+                ( RH**3 ) - 47.0309_wp * ( RH**2 ) + 1.297_wp * RH -           &
+                0.8029_wp
+       ENDIF
+       
+       IF ( ammonium_chloride > 0.0_wp)  THEN   ! NH4Cl
+          NH4Cl_nh4hso4 = 258.1792_wp * ( RH**8 ) - 1019.3777_wp *             &
+             ( RH**7 ) + 1592.8918_wp * ( RH**6 ) - 1221.0726_wp *             &
+             ( RH**5 ) + 442.2548_wp * ( RH**4 ) - 43.6278_wp *                &
+             ( RH**3 ) - 7.5282_wp * ( RH**2 ) - 3.8459_wp * RH + 2.2728_wp
+       ENDIF
+       
+       IF ( sodium_sulphate > 0.0_wp)  THEN   ! Na2SO4
+          Na2SO4_nh4hso4 = 225.4238_wp * ( RH**8 ) - 732.4113_wp *             &
+               ( RH**7 ) + 843.7291_wp * ( RH**6 ) - 322.7328_wp *             &
+               ( RH**5 ) - 88.6252_wp * ( RH**4 ) + 72.4434_wp *               &
+               ( RH**3 ) + 22.9252_wp * ( RH**2 ) - 25.3954_wp * RH +          &
+               4.6971_wp
+       ENDIF
+       
+       IF ( sodium_nitrate > 0.0_wp)  THEN   ! NaNO3
+          NaNO3_nh4hso4 = 96.1348_wp * ( RH**8 ) - 341.6738_wp * ( RH**7 ) +   &
+                         406.5314_wp * ( RH**6 ) - 98.5777_wp * ( RH**5 ) -    &
+                         172.8286_wp * ( RH**4 ) + 149.3151_wp * ( RH**3 ) -   &
+                          38.9998_wp * ( RH**2 ) - 0.2251 * RH + 0.4953_wp
+       ENDIF
+       
+       IF ( sodium_chloride > 0.0_wp)  THEN   ! NaCl
+          NaCl_nh4hso4 = 91.7856_wp * ( RH**8 ) - 316.6773_wp * ( RH**7 ) +    &
+                        358.2703_wp * ( RH**6 ) - 68.9142 * ( RH**5 ) -        &
+                        156.5031_wp * ( RH**4 ) + 116.9592_wp * ( RH**3 ) -    &
+                        22.5271_wp * ( RH**2 ) - 3.7716_wp * RH + 1.56_wp
+       ENDIF
+
+       Ln_NH4HSO4_act = binary_nh4hso4 +                                       &
+                        nitric_acid_eq_frac       * HNO3_nh4hso4 +             &
+                        hydrochloric_acid_eq_frac * HCL_nh4hso4 +              &
+                        sulphuric_acid_eq_frac    * H2SO4_nh4hso4 +            &  
+                        ammonium_sulphate_eq_frac * NH42SO4_nh4hso4 +          &
+                        ammonium_nitrate_eq_frac  * NH4NO3_nh4hso4 +           &
+                        ammonium_chloride_eq_frac * NH4Cl_nh4hso4 +            &
+                        sodium_sulphate_eq_frac   * Na2SO4_nh4hso4 +           & 
+                        sodium_nitrate_eq_frac    * NaNO3_nh4hso4 +            &
+                        sodium_chloride_eq_frac   * NaCl_nh4hso4
+  
+       gamma_nh4hso4 = EXP( Ln_NH4HSO4_act ) ! molal act. coefficient of NH4HSO4
+!--    Molal activity coefficient of NO3-
+       gamma_out(6)  = gamma_nh4hso4
+!--    Molal activity coefficient of NH4+        
+       gamma_nh3     = ( gamma_nh4hso4**2 ) / ( gamma_hhso4**2 )   
+       gamma_out(3)  = gamma_nh3
+!        
+!--    This actually represents the ratio of the ammonium to hydrogen ion 
+!--    activity coefficients (see Zaveri paper) - multiply this by the ratio 
+!--    of the ammonium to hydrogen ion molality and the ratio of appropriate 
+!--    equilibrium constants
+!
+!--    Equilibrium constants
+!--    Kh = 57.64d0    ! Zaveri et al. (2005)
+       Kh = 5.8E1_wp * EXP( 4085.0_wp * henrys_temp_dep )   ! after Chameides 
+!                                                   ! (1984) (and NIST database)
+!--    Knh4 = 1.81E-5_wp    ! Zaveri et al. (2005)
+       Knh4 = 1.7E-5_wp * EXP( -4325.0_wp * henrys_temp_dep )   ! Chameides 
+                                                                ! (1984)
+!--    Kw = 1.01E-14_wp    ! Zaveri et al (2005)
+       Kw = 1.E-14_wp * EXP( -6716.0_wp * henrys_temp_dep )   ! Chameides 
+                                                              ! (1984)
+!
+       molality_ratio_nh3 = ions_mol(2) / ions_mol(1)
+!--    Partial pressure calculation       
+       Press_NH3 = molality_ratio_nh3 * gamma_nh3 * ( Kw / ( Kh * Knh4 ) )
+    
+    ENDIF
+!       
+!-- c) - ACTIVITY COEFF/VAPOUR PRESSURE - HCL
+    IF ( ions(1) > 0.0_wp  .AND.  ions(7) > 0.0_wp )  THEN
+       binary_case = 1
+       IF ( RH > 0.1_wp  .AND.  RH < 0.98 )  THEN
+          IF ( binary_case == 1 )  THEN
+             binary_hcl = - 5.0179_wp * ( RH**3 ) + 9.8816_wp * ( RH**2 ) -    &
+                            10.789_wp * RH + 5.4737_wp
+          ELSEIF ( binary_case == 2 )  THEN
+             binary_hcl = - 4.6221_wp * RH + 4.2633_wp
+          ENDIF
+       ELSEIF ( RH >= 0.98_wp  .AND.  RH < 0.9999_wp )  THEN
+          binary_hcl = 775.6111008626_wp * ( RH**3 ) - 2146.01320888771_wp *   &
+                     ( RH**2 ) + 1969.01979670259_wp *  RH - 598.878230033926_wp
+       ENDIF
+    ENDIF
+    
+    IF ( nitric_acid > 0.0_wp )  THEN   ! HNO3
+       IF ( full_complexity == 1  .OR.  RH <= 0.4_wp )  THEN
+          HNO3_hcl = 9.6256_wp * ( RH**4 ) - 26.507_wp * ( RH**3 ) +           &
+                     27.622_wp * ( RH**2 ) - 12.958_wp * RH + 2.2193_wp
+       ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+          HNO3_hcl = 1.3242_wp * ( RH**2 ) - 1.8827_wp * RH + 0.55706_wp
+       ENDIF
+    ENDIF
+    
+    IF ( sulphuric_acid > 0.0_wp )  THEN   ! H2SO4
+       IF ( full_complexity == 1  .OR.  RH <= 0.4 )  THEN
+          H2SO4_hcl = 1.4406_wp * ( RH**3 ) - 2.7132_wp * ( RH**2 ) +          &
+                       1.014_wp * RH + 0.25226_wp
+       ELSEIF ( full_complexity == 0 .AND. RH > 0.4_wp ) THEN
+          H2SO4_hcl = 0.30993_wp * ( RH**2 ) - 0.99171_wp * RH + 0.66913_wp
+       ENDIF
+    ENDIF
+    
+    IF ( ammonium_sulphate > 0.0_wp )  THEN   ! NH42SO4
+       NH42SO4_hcl = 22.071_wp * ( RH**3 ) - 40.678_wp * ( RH**2 ) +           &
+                     27.893_wp * RH - 9.4338_wp
+    ENDIF
+    
+    IF ( ammonium_nitrate > 0.0_wp )  THEN   ! NH4NO3
+       NH4NO3_hcl = 19.935_wp * ( RH**3 ) - 42.335_wp * ( RH**2 ) +            &
+                    31.275_wp * RH - 8.8675_wp
+    ENDIF
+    
+    IF ( ammonium_chloride > 0.0_wp )  THEN   ! NH4Cl
+       IF ( full_complexity == 1  .OR.  RH <= 0.4_wp )  THEN
+          NH4Cl_hcl = 2.8048_wp * ( RH**3 ) - 4.3182_wp * ( RH**2 ) +          &
+                      3.1971_wp * RH - 1.6824_wp
+       ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+          NH4Cl_hcl = 1.2304_wp * ( RH**2 ) - 0.18262_wp * RH - 1.0643_wp
+       ENDIF
+    ENDIF
+    
+    IF ( sodium_sulphate > 0.0_wp )  THEN   ! Na2SO4
+       Na2SO4_hcl = 36.104_wp * ( RH**4 ) - 78.658_wp * ( RH**3 ) +            &
+                    63.441_wp * ( RH**2 ) - 26.727_wp * RH + 5.7007_wp
+    ENDIF
+    
+    IF ( sodium_nitrate > 0.0_wp )  THEN   ! NaNO3
+       IF ( full_complexity == 1  .OR.  RH <= 0.4_wp )  THEN
+          NaNO3_hcl = 54.471_wp * ( RH**5 ) - 159.42_wp * ( RH**4 ) +          &
+                      180.25_wp * ( RH**3 ) - 98.176_wp * ( RH**2 ) +          &
+                      25.309_wp * RH - 2.4275_wp
+       ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+          NaNO3_hcl = 21.632_wp * ( RH**4 ) - 53.088_wp * ( RH**3 ) +          &
+                      47.285_wp * ( RH**2 ) - 18.519_wp * RH + 2.6846_wp
+       ENDIF
+    ENDIF
+    
+    IF ( sodium_chloride > 0.0_wp )  THEN   ! NaCl
+       IF ( full_complexity == 1  .OR.  RH <= 0.4_wp )  THEN
+          NaCl_hcl = 5.4138_wp * ( RH**4 ) - 12.079_wp * ( RH**3 ) +           &
+                      9.627_wp * ( RH**2 ) - 3.3164_wp * RH + 0.35224_wp
+       ELSEIF ( full_complexity == 0  .AND.  RH > 0.4_wp )  THEN
+          NaCl_hcl = 2.432_wp * ( RH**3 ) - 4.3453_wp * ( RH**2 ) +            &
+                    2.3834_wp * RH - 0.4762_wp
+       ENDIF
+    ENDIF
+              
+    Ln_HCL_act = binary_hcl +                                                  &
+                 nitric_acid_eq_frac       * HNO3_hcl +                        &
+                 sulphuric_acid_eq_frac    * H2SO4_hcl +                       &
+                 ammonium_sulphate_eq_frac * NH42SO4_hcl +                     &
+                 ammonium_nitrate_eq_frac  * NH4NO3_hcl +                      &
+                 ammonium_chloride_eq_frac * NH4Cl_hcl +                       &
+                 sodium_sulphate_eq_frac   * Na2SO4_hcl +                      &
+                 sodium_nitrate_eq_frac    * NaNO3_hcl +                       &
+                 sodium_chloride_eq_frac   * NaCl_hcl
+
+     gamma_hcl    = EXP( Ln_HCL_act )   ! Molal activity coefficient
+     gamma_out(2) = gamma_hcl
+!     
+!--  Equilibrium constant after Wagman et al. (1982) (and NIST database)
+     K_hcl = 2E6_wp * EXP( 9000.0_wp * henrys_temp_dep )   
+                                                    
+     Press_HCL = ( ions_mol(1) * ions_mol(7) * ( gamma_hcl**2 ) ) / K_hcl
+!
+!-- 5) Ion molility output
+    mols_out = ions_mol
+!
+!-- REFERENCES
+!-- Clegg et al. (1998) A Thermodynamic Model of the System 
+!--    H+-NH4+-Na+-SO42- -NO3--Cl--H2O at 298.15 K, J. Phys. Chem., 102A,      
+!--    2155-2171. 
+!-- Clegg et al. (2001) Thermodynamic modelling of aqueous aerosols containing 
+!--    electrolytes and dissolved organic compounds. Journal of Aerosol Science 
+!--    2001;32(6):713-738.
+!-- Topping et al. (2005a) A curved multi-component aerosol hygroscopicity model 
+!--    framework: Part 1 - Inorganic compounds. Atmospheric Chemistry and 
+!--    Physics 2005;5:1205-1222.
+!-- Topping et al. (2005b) A curved multi-component aerosol hygroscopicity model 
+!--    framework: Part 2 - Including organic compounds. Atmospheric Chemistry 
+!--    and Physics 2005;5:1223-1242.
+!-- Wagman et al. (1982). The NBS tables of chemical thermodynamic properties: 
+!--    selected values for inorganic and Câ and Câ organic substances in SI 
+!--    units (book)
+!-- Zaveri et al. (2005). A new method for multicomponent activity coefficients 
+!--    of electrolytes in aqueous atmospheric aerosols, JGR, 110, D02201, 2005.
+ END SUBROUTINE inorganic_pdfite
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Update the particle size distribution. Put particles into corrects bins.
+!>
+!> Moving-centre method assumed, i.e. particles are allowed to grow to their 
+!> exact size as long as they are not crossing the fixed diameter bin limits. 
+!> If the particles in a size bin cross the lower or upper diameter limit, they 
+!> are all moved to the adjacent diameter bin and their volume is averaged with
+!> the particles in the new bin, which then get a new diameter. 
+!
+!> Moving-centre method minimises numerical diffusion. 
+!------------------------------------------------------------------------------!      
+ SUBROUTINE distr_update( paero )
+    
+    IMPLICIT NONE
+
+!-- Input and output variables
+    TYPE(t_section), INTENT(inout) ::  paero(fn2b) !< Aerosols particle 
+                                    !< size distribution and properties
+!-- Local variables
+    INTEGER(iwp) ::  b !< loop index
+    INTEGER(iwp) ::  mm !< loop index
+    INTEGER(iwp) ::  counti
+    LOGICAL  ::  within_bins !< logical (particle belongs to the bin?)    
+    REAL(wp) ::  znfrac !< number fraction to be moved to the larger bin
+    REAL(wp) ::  zvfrac !< volume fraction to be moved to the larger bin
+    REAL(wp) ::  zVexc  !< Volume in the grown bin which exceeds the bin 
+                        !< upper limit    
+    REAL(wp) ::  zVihi  !< particle volume at the high end of the bin    
+    REAL(wp) ::  zVilo  !< particle volume at the low end of the bin     
+    REAL(wp) ::  zvpart !< particle volume (m3)    
+    REAL(wp) ::  zVrat  !< volume ratio of a size bin
+    
+    zvpart = 0.0_wp
+    zvfrac = 0.0_wp
+
+    within_bins = .FALSE.
+    
+!
+!-- Check if the volume of the bin is within bin limits after update
+    counti = 0
+    DO  WHILE ( .NOT. within_bins )
+       within_bins = .TRUE.
+
+       DO  b = fn2b-1, in1a, -1
+          mm = 0
+          IF ( paero(b)%numc > nclim )  THEN
+
+             zvpart = 0.0_wp
+             zvfrac = 0.0_wp
+
+             IF ( b == fn2a )  CYCLE 
+!
+!--          Dry volume
+             zvpart = SUM( paero(b)%volc(1:7) ) / paero(b)%numc 
+!
+!--          Smallest bin cannot decrease
+             IF ( paero(b)%vlolim > zvpart  .AND.  b == in1a ) CYCLE
+!
+!--          Decreasing bins
+             IF ( paero(b)%vlolim > zvpart )  THEN
+                mm = b - 1
+                IF ( b == in2b )  mm = fn1a    ! 2b goes to 1a
+               
+                paero(mm)%numc = paero(mm)%numc + paero(b)%numc
+                paero(b)%numc = 0.0_wp
+                paero(mm)%volc(:) = paero(mm)%volc(:) + paero(b)%volc(:) 
+                paero(b)%volc(:) = 0.0_wp
+                CYCLE
+             ENDIF
+!
+!--          If size bin has not grown, cycle
+!--          Changed by Mona: compare to the arithmetic mean volume, as done 
+!--          originally. Now particle volume is derived from the geometric mean 
+!--          diameter, not arithmetic (see SUBROUTINE set_sizebins).
+             IF ( zvpart <= api6 * ( ( aero(b)%vhilim + aero(b)%vlolim ) /     &
+                  ( 2.0_wp * api6 ) ) )  CYCLE  
+             IF ( ABS( zvpart - api6 * paero(b)%dmid ** 3.0_wp ) < &
+                  1.0E-35_wp )  CYCLE  ! Mona: to avoid precision problems
+!                   
+!--          Volume ratio of the size bin
+             zVrat = paero(b)%vhilim / paero(b)%vlolim
+!--          Particle volume at the low end of the bin
+             zVilo = 2.0_wp * zvpart / ( 1.0_wp + zVrat )
+!--          Particle volume at the high end of the bin
+             zVihi = zVrat * zVilo
+!--          Volume in the grown bin which exceeds the bin upper limit
+             zVexc = 0.5_wp * ( zVihi + paero(b)%vhilim )
+!--          Number fraction to be moved to the larger bin
+             znfrac = MIN( 1.0_wp, ( zVihi - paero(b)%vhilim) /                &
+                           ( zVihi - zVilo ) )
+!--          Volume fraction to be moved to the larger bin
+             zvfrac = MIN( 0.99_wp, znfrac * zVexc / zvpart )
+             IF ( zvfrac < 0.0_wp )  THEN
+                message_string = 'Error: zvfrac < 0'
+                CALL message( 'salsa_mod: distr_update', 'SA0050',             &
+                              1, 2, 0, 6, 0 )
+             ENDIF
+!
+!--          Update bin
+             mm = b + 1
+!--          Volume (cm3/cm3)
+             paero(mm)%volc(:) = paero(mm)%volc(:) + znfrac * paero(b)%numc *  &
+                                 zVexc * paero(b)%volc(:) /                    &
+                                 SUM( paero(b)%volc(1:7) )
+             paero(b)%volc(:) = paero(b)%volc(:) - znfrac * paero(b)%numc *    &
+                                 zVexc * paero(b)%volc(:) /                    &
+                                 SUM( paero(b)%volc(1:7) )
+
+!--          Number concentration (#/m3)
+             paero(mm)%numc = paero(mm)%numc + znfrac * paero(b)%numc
+             paero(b)%numc = paero(b)%numc * ( 1.0_wp - znfrac )
+
+          ENDIF     ! nclim
+          
+          IF ( paero(b)%numc > nclim )   THEN
+             zvpart = SUM( paero(b)%volc(1:7) ) / paero(b)%numc 
+             within_bins = ( paero(b)%vlolim < zvpart  .AND.                  &
+                             zvpart < paero(b)%vhilim )
+          ENDIF
+
+       ENDDO ! - b
+
+       counti = counti + 1
+       IF ( counti > 100 )  THEN
+          message_string = 'Error: Aerosol bin update not converged'
+          CALL message( 'salsa_mod: distr_update', 'SA0051', 1, 2, 0, 6, 0 )
+       ENDIF 
+
+    ENDDO ! - within bins
+    
+ END SUBROUTINE distr_update
+      
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> salsa_diagnostics: Update properties for the current timestep:
+!>
+!> Juha Tonttila, FMI, 2014
+!> Tomi Raatikainen, FMI, 2016
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_diagnostics( i, j )
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  p, pt, zu
+        
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY: g
+    
+    USE control_parameters,                                                    &
+        ONLY:  pt_surface, surface_pressure
+        
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    IMPLICIT NONE
+    
+    INTEGER(iwp), INTENT(in) ::  i  !<
+    INTEGER(iwp), INTENT(in) ::  j  !<    
+
+    INTEGER(iwp) ::  b !<
+    INTEGER(iwp) ::  c  !< 
+    INTEGER(iwp) ::  gt  !< 
+    INTEGER(iwp) ::  k  !<
+    INTEGER(iwp) ::  nc !<
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  flag         !< flag to mask topography
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  flag_zddry   !< flag to mask zddry
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_adn       !< air density (kg/m3)    
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_p         !< pressure
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  in_t         !< temperature (K)    
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  mcsum        !< sum of mass concentration
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  ppm_to_nconc !< Conversion factor 
+                                                    !< from ppm to #/m3 
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  zddry  !<
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  zvol   !<
+    
+    flag_zddry   = 0.0_wp
+    in_adn       = 0.0_wp
+    in_p         = 0.0_wp
+    in_t         = 0.0_wp
+    ppm_to_nconc = 1.0_wp
+    zddry        = 0.0_wp
+    zvol         = 0.0_wp
+    
+    CALL cpu_log( log_point_s(94), 'salsa diagnostics ', 'start' )
+
+!             
+!-- Calculate thermodynamic quantities needed in SALSA
+    CALL salsa_thrm_ij( i, j, p_ij=in_p, temp_ij=in_t, adn_ij=in_adn )       
+!
+!-- Calculate conversion factors for gas concentrations
+    ppm_to_nconc = for_ppm_to_nconc * in_p / in_t
+!
+!-- Predetermine flag to mask topography
+    flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(:,j,i), 0 ) ) 
+    
+    DO  b = 1, nbins   ! aerosol size bins
+!             
+!--    Remove negative values 
+       aerosol_number(b)%conc(:,j,i) = MAX( nclim,                             &
+                                       aerosol_number(b)%conc(:,j,i) ) * flag
+       mcsum = 0.0_wp   ! total mass concentration 
+       DO  c = 1, ncc_tot
+!             
+!--       Remove negative concentrations 
+          aerosol_mass((c-1)*nbins+b)%conc(:,j,i) = MAX( mclim,                &
+                                     aerosol_mass((c-1)*nbins+b)%conc(:,j,i) ) &
+                                     * flag
+          mcsum = mcsum + aerosol_mass((c-1)*nbins+b)%conc(:,j,i) * flag
+       ENDDO         
+!                
+!--    Check that number and mass concentration match qualitatively 
+       IF ( ANY ( aerosol_number(b)%conc(:,j,i) > nclim  .AND.                 &
+                  mcsum <= 0.0_wp ) )                                          &
+       THEN
+          DO  k = nzb+1, nzt
+             IF ( aerosol_number(b)%conc(k,j,i) > nclim  .AND.                 &
+               mcsum(k) <= 0.0_wp ) &
+             THEN
+                aerosol_number(b)%conc(k,j,i) = nclim * flag(k)
+                DO  c = 1, ncc_tot
+                   aerosol_mass((c-1)*nbins+b)%conc(k,j,i) = mclim * flag(k)
+                ENDDO
+             ENDIF
+          ENDDO
+       ENDIF
+!             
+!--    Update aerosol particle radius
+       CALL bin_mixrat( 'dry', b, i, j, zvol )
+       zvol = zvol / arhoh2so4    ! Why on sulphate?
+!                   
+!--    Particles smaller then 0.1 nm diameter are set to zero 
+       zddry = ( zvol / MAX( nclim, aerosol_number(b)%conc(:,j,i) ) / api6 )** &
+               ( 1.0_wp / 3.0_wp )
+       flag_zddry = MERGE( 1.0_wp, 0.0_wp, ( zddry < 1.0E-10_wp  .AND.         &
+                                       aerosol_number(b)%conc(:,j,i) > nclim ) )
+!                   
+!--    Volatile species to the gas phase
+       IF ( is_used( prtcl, 'SO4' ) .AND. lscndgas )  THEN
+          nc = get_index( prtcl, 'SO4' )
+          c = ( nc - 1 ) * nbins + b                      
+          IF ( salsa_gases_from_chem )  THEN
+             chem_species( gas_index_chem(1) )%conc(:,j,i) =                   &
+                               chem_species( gas_index_chem(1) )%conc(:,j,i) + &
+                               aerosol_mass(c)%conc(:,j,i) * avo * flag *      &
+                               flag_zddry / ( amh2so4 * ppm_to_nconc ) 
+          ELSE
+             salsa_gas(1)%conc(:,j,i) = salsa_gas(1)%conc(:,j,i) +             &
+                                        aerosol_mass(c)%conc(:,j,i) / amh2so4 *&
+                                        avo * flag * flag_zddry
+          ENDIF
+       ENDIF
+       IF ( is_used( prtcl, 'OC' )  .AND.  lscndgas )  THEN
+          nc = get_index( prtcl, 'OC' )
+          c = ( nc - 1 ) * nbins + b
+          IF ( salsa_gases_from_chem )  THEN
+             chem_species( gas_index_chem(5) )%conc(:,j,i) =                   &
+                               chem_species( gas_index_chem(5) )%conc(:,j,i) + &
+                               aerosol_mass(c)%conc(:,j,i) * avo * flag *      &
+                               flag_zddry / ( amoc * ppm_to_nconc ) 
+          ELSE                         
+             salsa_gas(5)%conc(:,j,i) = salsa_gas(5)%conc(:,j,i) + &
+                                        aerosol_mass(c)%conc(:,j,i) / amoc *   &
+                                        avo * flag * flag_zddry
+          ENDIF
+       ENDIF
+       IF ( is_used( prtcl, 'NO' )  .AND.  lscndgas )  THEN
+          nc = get_index( prtcl, 'NO' )
+          c = ( nc - 1 ) * nbins + b                      
+          IF ( salsa_gases_from_chem )  THEN
+                chem_species( gas_index_chem(2) )%conc(:,j,i) =                &
+                               chem_species( gas_index_chem(2) )%conc(:,j,i) + &
+                               aerosol_mass(c)%conc(:,j,i) * avo * flag *      &
+                               flag_zddry / ( amhno3 * ppm_to_nconc )                   
+          ELSE
+             salsa_gas(2)%conc(:,j,i) = salsa_gas(2)%conc(:,j,i) +             &
+                                        aerosol_mass(c)%conc(:,j,i) / amhno3 * &
+                                        avo * flag * flag_zddry
+          ENDIF
+       ENDIF
+       IF ( is_used( prtcl, 'NH' )  .AND.  lscndgas )  THEN
+          nc = get_index( prtcl, 'NH' )
+          c = ( nc - 1 ) * nbins + b                      
+          IF ( salsa_gases_from_chem )  THEN
+                chem_species( gas_index_chem(3) )%conc(:,j,i) =                &
+                               chem_species( gas_index_chem(3) )%conc(:,j,i) + &
+                               aerosol_mass(c)%conc(:,j,i) * avo * flag *      &
+                               flag_zddry / ( amnh3 * ppm_to_nconc )                         
+          ELSE
+             salsa_gas(3)%conc(:,j,i) = salsa_gas(3)%conc(:,j,i) +             &
+                                        aerosol_mass(c)%conc(:,j,i) / amnh3 *  &
+                                        avo * flag * flag_zddry
+          ENDIF
+       ENDIF
+!                      
+!--    Mass and number to zero (insoluble species and water are lost)
+       DO  c = 1, ncc_tot
+          aerosol_mass((c-1)*nbins+b)%conc(:,j,i) = MERGE( mclim * flag,       &
+                                      aerosol_mass((c-1)*nbins+b)%conc(:,j,i), &
+                                      flag_zddry > 0.0_wp )
+       ENDDO
+       aerosol_number(b)%conc(:,j,i) = MERGE( nclim * flag,                    &
+                                              aerosol_number(b)%conc(:,j,i),   &
+                                              flag_zddry > 0.0_wp )       
+       Ra_dry(:,j,i,b) = MAX( 1.0E-10_wp, 0.5_wp * zddry )      
+       
+    ENDDO
+    IF ( .NOT. salsa_gases_from_chem )  THEN
+       DO  gt = 1, ngast
+          salsa_gas(gt)%conc(:,j,i) = MAX( nclim, salsa_gas(gt)%conc(:,j,i) )  &
+                                      * flag
+       ENDDO
+    ENDIF
+    
+    CALL cpu_log( log_point_s(94), 'salsa diagnostics ', 'stop' )
+
+ END SUBROUTINE salsa_diagnostics
+
+ 
+! 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the tendencies for aerosol number and mass concentrations. 
+!> Cache-optimized.
+!------------------------------------------------------------------------------! 
+ SUBROUTINE salsa_tendency_ij( id, rs_p, rs, trs_m, i, j, i_omp_start, tn, b,  &
+                               c, flux_s, diss_s, flux_l, diss_l, rs_init )
+    
+    USE advec_ws,                                                              &
+        ONLY:  advec_s_ws 
+    USE advec_s_pw_mod,                                                        &
+        ONLY:  advec_s_pw
+    USE advec_s_up_mod,                                                        &
+        ONLY:  advec_s_up
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, hyp, pt, rdf_sc, tend
+    USE diffusion_s_mod,                                                       &
+        ONLY:  diffusion_s
+    USE indices,                                                               &
+        ONLY:  wall_flags_0
+    USE pegrid,                                                                &
+        ONLY:  threads_per_task, myid     
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                                 surf_usm_v
+    
+    IMPLICIT NONE
+    
+    CHARACTER (LEN = *) ::  id
+    INTEGER(iwp) ::  b   !< bin index in derived type aerosol_size_bin    
+    INTEGER(iwp) ::  c   !< bin index in derived type aerosol_size_bin    
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  i_omp_start !<
+    INTEGER(iwp) ::  j   !<
+    INTEGER(iwp) ::  k   !< 
+    INTEGER(iwp) ::  nc  !< (c-1)*nbins+b
+    INTEGER(iwp) ::  tn  !<
+    REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ::  diss_l  !<
+    REAL(wp), DIMENSION(nzb+1:nzt,0:threads_per_task-1)         ::  diss_s  !<
+    REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ::  flux_l  !<
+    REAL(wp), DIMENSION(nzb+1:nzt,0:threads_per_task-1)         ::  flux_s  !< 
+    REAL(wp), DIMENSION(nzb:nzt+1)                              ::  rs_init !<
+    REAL(wp), DIMENSION(:,:,:), POINTER                         ::  rs_p    !< 
+    REAL(wp), DIMENSION(:,:,:), POINTER                         ::  rs      !<
+    REAL(wp), DIMENSION(:,:,:), POINTER                         ::  trs_m   !<
+    
+    nc = (c-1)*nbins+b    
+!
+!-- Tendency-terms for reactive scalar
+    tend(:,j,i) = 0.0_wp
+    
+    IF ( id == 'aerosol_number'  .AND.  lod_aero == 3 )  THEN
+       tend(:,j,i) = tend(:,j,i) + aerosol_number(b)%source(:,j,i)
+    ELSEIF ( id == 'aerosol_mass'  .AND.  lod_aero == 3 )  THEN
+       tend(:,j,i) = tend(:,j,i) + aerosol_mass(nc)%source(:,j,i)
+    ENDIF
+!    
+!-- Advection terms
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( ws_scheme_sca )  THEN
+          CALL advec_s_ws( i, j, rs, id, flux_s, diss_s, flux_l, diss_l,       &
+                           i_omp_start, tn )
+       ELSE
+          CALL advec_s_pw( i, j, rs )
+       ENDIF
+    ELSE
+       CALL advec_s_up( i, j, rs )
+    ENDIF
+!
+!-- Diffusion terms    
+    IF ( id == 'aerosol_number' )  THEN
+       CALL diffusion_s( i, j, rs,                   surf_def_h(0)%answs(:,b), &
+                           surf_def_h(1)%answs(:,b), surf_def_h(2)%answs(:,b), &
+                           surf_lsm_h%answs(:,b),    surf_usm_h%answs(:,b),    &
+                           surf_def_v(0)%answs(:,b), surf_def_v(1)%answs(:,b), &
+                           surf_def_v(2)%answs(:,b), surf_def_v(3)%answs(:,b), &
+                           surf_lsm_v(0)%answs(:,b), surf_lsm_v(1)%answs(:,b), &
+                           surf_lsm_v(2)%answs(:,b), surf_lsm_v(3)%answs(:,b), &
+                           surf_usm_v(0)%answs(:,b), surf_usm_v(1)%answs(:,b), &
+                           surf_usm_v(2)%answs(:,b), surf_usm_v(3)%answs(:,b) )
+!
+!--    Sedimentation for aerosol number and mass
+       IF ( lsdepo )  THEN
+          tend(nzb+1:nzt,j,i) = tend(nzb+1:nzt,j,i) - MAX( 0.0_wp,             &
+                         ( rs(nzb+2:nzt+1,j,i) * sedim_vd(nzb+2:nzt+1,j,i,b) - &
+                           rs(nzb+1:nzt,j,i) * sedim_vd(nzb+1:nzt,j,i,b) ) *   &
+                         ddzu(nzb+1:nzt) ) * MERGE( 1.0_wp, 0.0_wp,            &
+                         BTEST( wall_flags_0(nzb:nzt-1,j,i), 0 ) )
+       ENDIF
+       
+    ELSEIF ( id == 'aerosol_mass' )  THEN
+       CALL diffusion_s( i, j, rs,                  surf_def_h(0)%amsws(:,nc), & 
+                         surf_def_h(1)%amsws(:,nc), surf_def_h(2)%amsws(:,nc), &
+                         surf_lsm_h%amsws(:,nc),    surf_usm_h%amsws(:,nc),    &
+                         surf_def_v(0)%amsws(:,nc), surf_def_v(1)%amsws(:,nc), &
+                         surf_def_v(2)%amsws(:,nc), surf_def_v(3)%amsws(:,nc), &
+                         surf_lsm_v(0)%amsws(:,nc), surf_lsm_v(1)%amsws(:,nc), &
+                         surf_lsm_v(2)%amsws(:,nc), surf_lsm_v(3)%amsws(:,nc), &
+                         surf_usm_v(0)%amsws(:,nc), surf_usm_v(1)%amsws(:,nc), &
+                         surf_usm_v(2)%amsws(:,nc), surf_usm_v(3)%amsws(:,nc) ) 
+!
+!--    Sedimentation for aerosol number and mass
+       IF ( lsdepo )  THEN
+          tend(nzb+1:nzt,j,i) = tend(nzb+1:nzt,j,i) - MAX( 0.0_wp,             &
+                         ( rs(nzb+2:nzt+1,j,i) * sedim_vd(nzb+2:nzt+1,j,i,b) - &
+                           rs(nzb+1:nzt,j,i) * sedim_vd(nzb+1:nzt,j,i,b) ) *   &
+                         ddzu(nzb+1:nzt) ) * MERGE( 1.0_wp, 0.0_wp,            &
+                         BTEST( wall_flags_0(nzb:nzt-1,j,i), 0 ) )
+       ENDIF                         
+    ELSEIF ( id == 'salsa_gas' )  THEN
+       CALL diffusion_s( i, j, rs,                   surf_def_h(0)%gtsws(:,b), &
+                           surf_def_h(1)%gtsws(:,b), surf_def_h(2)%gtsws(:,b), &
+                           surf_lsm_h%gtsws(:,b),    surf_usm_h%gtsws(:,b),    &
+                           surf_def_v(0)%gtsws(:,b), surf_def_v(1)%gtsws(:,b), &
+                           surf_def_v(2)%gtsws(:,b), surf_def_v(3)%gtsws(:,b), &
+                           surf_lsm_v(0)%gtsws(:,b), surf_lsm_v(1)%gtsws(:,b), &
+                           surf_lsm_v(2)%gtsws(:,b), surf_lsm_v(3)%gtsws(:,b), &
+                           surf_usm_v(0)%gtsws(:,b), surf_usm_v(1)%gtsws(:,b), &
+                           surf_usm_v(2)%gtsws(:,b), surf_usm_v(3)%gtsws(:,b) ) 
+    ENDIF
+!
+!-- Prognostic equation for a scalar
+    DO  k = nzb+1, nzt
+       rs_p(k,j,i) = rs(k,j,i) +  ( dt_3d  * ( tsc(2) * tend(k,j,i) +          &
+                                               tsc(3) * trs_m(k,j,i) )         &
+                                             - tsc(5) * rdf_sc(k)              &
+                                           * ( rs(k,j,i) - rs_init(k) ) )      &
+                                  * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,j,i), 0 ) )
+       IF ( rs_p(k,j,i) < 0.0_wp )  rs_p(k,j,i) = 0.1_wp * rs(k,j,i) 
+    ENDDO
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  k = nzb+1, nzt
+             trs_m(k,j,i) = tend(k,j,i)
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < &
+                intermediate_timestep_count_max )  THEN
+          DO  k = nzb+1, nzt
+             trs_m(k,j,i) = -9.5625_wp * tend(k,j,i) + 5.3125_wp * trs_m(k,j,i)
+          ENDDO
+       ENDIF
+    ENDIF
+ 
+ END SUBROUTINE salsa_tendency_ij
+ 
+! 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the tendencies for aerosol number and mass concentrations. 
+!> Vector-optimized.
+!------------------------------------------------------------------------------! 
+ SUBROUTINE salsa_tendency( id, rs_p, rs, trs_m, b, c, rs_init )
+    
+    USE advec_ws,                                                              &
+        ONLY:  advec_s_ws 
+    USE advec_s_pw_mod,                                                        &
+        ONLY:  advec_s_pw
+    USE advec_s_up_mod,                                                        &
+        ONLY:  advec_s_up
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, hyp, pt, rdf_sc, tend
+    USE diffusion_s_mod,                                                       &
+        ONLY:  diffusion_s
+    USE indices,                                                               &
+        ONLY:  wall_flags_0
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                                 surf_usm_v
+    
+    IMPLICIT NONE
+    
+    CHARACTER (LEN = *) ::  id
+    INTEGER(iwp) ::  b   !< bin index in derived type aerosol_size_bin    
+    INTEGER(iwp) ::  c   !< bin index in derived type aerosol_size_bin    
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  j   !<
+    INTEGER(iwp) ::  k   !< 
+    INTEGER(iwp) ::  nc  !< (c-1)*nbins+b
+    REAL(wp), DIMENSION(nzb:nzt+1)                              ::  rs_init !<
+    REAL(wp), DIMENSION(:,:,:), POINTER                         ::  rs_p    !< 
+    REAL(wp), DIMENSION(:,:,:), POINTER                         ::  rs      !<
+    REAL(wp), DIMENSION(:,:,:), POINTER                         ::  trs_m   !<
+    
+    nc = (c-1)*nbins+b    
+!
+!-- Tendency-terms for reactive scalar
+    tend = 0.0_wp
+    
+    IF ( id == 'aerosol_number'  .AND.  lod_aero == 3 )  THEN
+       tend = tend + aerosol_number(b)%source
+    ELSEIF ( id == 'aerosol_mass'  .AND.  lod_aero == 3 )  THEN
+       tend = tend + aerosol_mass(nc)%source
+    ENDIF
+!    
+!-- Advection terms
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( ws_scheme_sca )  THEN
+          CALL advec_s_ws( rs, id )
+       ELSE
+          CALL advec_s_pw( rs )
+       ENDIF
+    ELSE
+       CALL advec_s_up( rs )
+    ENDIF
+!
+!-- Diffusion terms    
+    IF ( id == 'aerosol_number' )  THEN
+       CALL diffusion_s(   rs,                       surf_def_h(0)%answs(:,b), &
+                           surf_def_h(1)%answs(:,b), surf_def_h(2)%answs(:,b), &
+                           surf_lsm_h%answs(:,b),    surf_usm_h%answs(:,b),    &
+                           surf_def_v(0)%answs(:,b), surf_def_v(1)%answs(:,b), &
+                           surf_def_v(2)%answs(:,b), surf_def_v(3)%answs(:,b), &
+                           surf_lsm_v(0)%answs(:,b), surf_lsm_v(1)%answs(:,b), &
+                           surf_lsm_v(2)%answs(:,b), surf_lsm_v(3)%answs(:,b), &
+                           surf_usm_v(0)%answs(:,b), surf_usm_v(1)%answs(:,b), &
+                           surf_usm_v(2)%answs(:,b), surf_usm_v(3)%answs(:,b) )                                 
+    ELSEIF ( id == 'aerosol_mass' )  THEN
+       CALL diffusion_s( rs,                        surf_def_h(0)%amsws(:,nc), & 
+                         surf_def_h(1)%amsws(:,nc), surf_def_h(2)%amsws(:,nc), &
+                         surf_lsm_h%amsws(:,nc),    surf_usm_h%amsws(:,nc),    &
+                         surf_def_v(0)%amsws(:,nc), surf_def_v(1)%amsws(:,nc), &
+                         surf_def_v(2)%amsws(:,nc), surf_def_v(3)%amsws(:,nc), &
+                         surf_lsm_v(0)%amsws(:,nc), surf_lsm_v(1)%amsws(:,nc), &
+                         surf_lsm_v(2)%amsws(:,nc), surf_lsm_v(3)%amsws(:,nc), &
+                         surf_usm_v(0)%amsws(:,nc), surf_usm_v(1)%amsws(:,nc), &
+                         surf_usm_v(2)%amsws(:,nc), surf_usm_v(3)%amsws(:,nc) )                         
+    ELSEIF ( id == 'salsa_gas' )  THEN
+       CALL diffusion_s(   rs,                       surf_def_h(0)%gtsws(:,b), &
+                           surf_def_h(1)%gtsws(:,b), surf_def_h(2)%gtsws(:,b), &
+                           surf_lsm_h%gtsws(:,b),    surf_usm_h%gtsws(:,b),    &
+                           surf_def_v(0)%gtsws(:,b), surf_def_v(1)%gtsws(:,b), &
+                           surf_def_v(2)%gtsws(:,b), surf_def_v(3)%gtsws(:,b), &
+                           surf_lsm_v(0)%gtsws(:,b), surf_lsm_v(1)%gtsws(:,b), &
+                           surf_lsm_v(2)%gtsws(:,b), surf_lsm_v(3)%gtsws(:,b), &
+                           surf_usm_v(0)%gtsws(:,b), surf_usm_v(1)%gtsws(:,b), &
+                           surf_usm_v(2)%gtsws(:,b), surf_usm_v(3)%gtsws(:,b) ) 
+    ENDIF
+!
+!-- Prognostic equation for a scalar
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          IF ( id == 'salsa_gas'  .AND.  lod_gases == 3 )  THEN
+             tend(:,j,i) = tend(:,j,i) + salsa_gas(b)%source(:,j,i) *          &
+                           for_ppm_to_nconc * hyp(:) / pt(:,j,i) * ( hyp(:) /  &
+                           100000.0_wp )**0.286_wp ! ppm to #/m3
+          ELSEIF ( id == 'aerosol_mass'  .OR.  id == 'aerosol_number')  THEN
+!
+!--          Sedimentation for aerosol number and mass
+             IF ( lsdepo )  THEN
+                tend(nzb+1:nzt,j,i) = tend(nzb+1:nzt,j,i) - MAX( 0.0_wp,       &
+                         ( rs(nzb+2:nzt+1,j,i) * sedim_vd(nzb+2:nzt+1,j,i,b) - &
+                           rs(nzb+1:nzt,j,i) * sedim_vd(nzb+1:nzt,j,i,b) ) *   &
+                         ddzu(nzb+1:nzt) ) * MERGE( 1.0_wp, 0.0_wp,            &
+                         BTEST( wall_flags_0(nzb:nzt-1,j,i), 0 ) )
+             ENDIF  
+          ENDIF
+          DO  k = nzb+1, nzt
+             rs_p(k,j,i) = rs(k,j,i) +  ( dt_3d  * ( tsc(2) * tend(k,j,i) +    &
+                                                     tsc(3) * trs_m(k,j,i) )   &
+                                                   - tsc(5) * rdf_sc(k)        &
+                                                 * ( rs(k,j,i) - rs_init(k) ) )&
+                                        * MERGE( 1.0_wp, 0.0_wp,               &
+                                          BTEST( wall_flags_0(k,j,i), 0 ) )
+             IF ( rs_p(k,j,i) < 0.0_wp )  rs_p(k,j,i) = 0.1_wp * rs(k,j,i) 
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Calculate tendencies for the next Runge-Kutta step
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+       IF ( intermediate_timestep_count == 1 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   trs_m(k,j,i) = tend(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSEIF ( intermediate_timestep_count < &
+                intermediate_timestep_count_max )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   trs_m(k,j,i) =  -9.5625_wp * tend(k,j,i)                    &
+                                   + 5.3125_wp * trs_m(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+ 
+ END SUBROUTINE salsa_tendency
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Boundary conditions for prognostic variables in SALSA
+!------------------------------------------------------------------------------! 
+ SUBROUTINE salsa_boundary_conds
+ 
+    USE surface_mod,                                                           &
+        ONLY :  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  b  !< index for aerosol size bins    
+    INTEGER(iwp) ::  c  !< index for chemical compounds in aerosols
+    INTEGER(iwp) ::  g  !< idex for gaseous compounds
+    INTEGER(iwp) ::  i  !< grid index x direction
+    INTEGER(iwp) ::  j  !< grid index y direction
+    INTEGER(iwp) ::  k  !< grid index y direction
+    INTEGER(iwp) ::  kb !< variable to set respective boundary value, depends on
+                        !< facing.
+    INTEGER(iwp) ::  l  !< running index boundary type, for up- and downward- 
+                        !< facing walls
+    INTEGER(iwp) ::  m  !< running index surface elements
+    
+!
+!-- Surface conditions: 
+    IF ( ibc_salsa_b == 0 )  THEN   ! Dirichlet 
+!    
+!--    Run loop over all non-natural and natural walls. Note, in wall-datatype
+!--    the k coordinate belongs to the atmospheric grid point, therefore, set
+!--    s_p at k-1 
+ 
+       DO  l = 0, 1
+!
+!--       Set kb, for upward-facing surfaces value at topography top (k-1) is 
+!--       set, for downward-facing surfaces at topography bottom (k+1)
+          kb = MERGE ( -1, 1, l == 0 )
+          !$OMP PARALLEL PRIVATE( b, c, g, i, j, k )
+          !$OMP DO
+          DO  m = 1, bc_h(l)%ns
+          
+             i = bc_h(l)%i(m)
+             j = bc_h(l)%j(m)
+             k = bc_h(l)%k(m)
+             
+             DO  b = 1, nbins
+                aerosol_number(b)%conc_p(k+kb,j,i) =                           &
+                                                aerosol_number(b)%conc(k+kb,j,i)
+                DO  c = 1, ncc_tot
+                   aerosol_mass((c-1)*nbins+b)%conc_p(k+kb,j,i) =              &
+                                      aerosol_mass((c-1)*nbins+b)%conc(k+kb,j,i)
+                ENDDO
+             ENDDO
+             IF ( .NOT. salsa_gases_from_chem )  THEN
+                DO  g = 1, ngast
+                   salsa_gas(g)%conc_p(k+kb,j,i) = salsa_gas(g)%conc(k+kb,j,i)
+                ENDDO
+             ENDIF
+             
+          ENDDO
+          !$OMP END PARALLEL
+          
+       ENDDO
+    
+    ELSE   ! Neumann
+    
+       DO l = 0, 1
+!
+!--       Set kb, for upward-facing surfaces value at topography top (k-1) is 
+!--       set, for downward-facing surfaces at topography bottom (k+1)       
+          kb = MERGE( -1, 1, l == 0 )
+          !$OMP PARALLEL PRIVATE( b, c, g, i, j, k )
+          !$OMP DO
+          DO  m = 1, bc_h(l)%ns
+             
+             i = bc_h(l)%i(m)
+             j = bc_h(l)%j(m)
+             k = bc_h(l)%k(m)
+             
+             DO  b = 1, nbins
+                aerosol_number(b)%conc_p(k+kb,j,i) =                           &
+                                                 aerosol_number(b)%conc_p(k,j,i)
+                DO  c = 1, ncc_tot
+                   aerosol_mass((c-1)*nbins+b)%conc_p(k+kb,j,i) =              &
+                                       aerosol_mass((c-1)*nbins+b)%conc_p(k,j,i)
+                ENDDO
+             ENDDO
+             IF ( .NOT. salsa_gases_from_chem ) THEN
+                DO  g = 1, ngast
+                   salsa_gas(g)%conc_p(k+kb,j,i) = salsa_gas(g)%conc_p(k,j,i)
+                ENDDO
+             ENDIF
+                
+          ENDDO
+          !$OMP END PARALLEL
+       ENDDO
+     
+    ENDIF
+
+!
+!--Top boundary conditions:
+    IF ( ibc_salsa_t == 0 )  THEN   ! Dirichlet 
+   
+       DO  b = 1, nbins
+          aerosol_number(b)%conc_p(nzt+1,:,:) =                                &
+                                               aerosol_number(b)%conc(nzt+1,:,:)
+          DO  c = 1, ncc_tot
+             aerosol_mass((c-1)*nbins+b)%conc_p(nzt+1,:,:) =                   &
+                                     aerosol_mass((c-1)*nbins+b)%conc(nzt+1,:,:)
+          ENDDO
+       ENDDO
+       IF ( .NOT. salsa_gases_from_chem )  THEN
+          DO  g = 1, ngast
+             salsa_gas(g)%conc_p(nzt+1,:,:) = salsa_gas(g)%conc(nzt+1,:,:)
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( ibc_salsa_t == 1 )  THEN   ! Neumann 
+    
+       DO  b = 1, nbins
+          aerosol_number(b)%conc_p(nzt+1,:,:) =                                &
+                                               aerosol_number(b)%conc_p(nzt,:,:)
+          DO  c = 1, ncc_tot
+             aerosol_mass((c-1)*nbins+b)%conc_p(nzt+1,:,:) =                   &
+                                     aerosol_mass((c-1)*nbins+b)%conc_p(nzt,:,:)
+          ENDDO
+       ENDDO
+       IF ( .NOT. salsa_gases_from_chem )  THEN
+          DO  g = 1, ngast
+             salsa_gas(g)%conc_p(nzt+1,:,:) = salsa_gas(g)%conc_p(nzt,:,:)
+          ENDDO
+       ENDIF
+       
+    ENDIF
+!
+!-- Lateral boundary conditions at the outflow    
+    IF ( bc_radiation_s )  THEN
+       DO  b = 1, nbins
+          aerosol_number(b)%conc_p(:,nys-1,:) = aerosol_number(b)%conc_p(:,nys,:)
+          DO  c = 1, ncc_tot
+             aerosol_mass((c-1)*nbins+b)%conc_p(:,nys-1,:) =                   &
+                                     aerosol_mass((c-1)*nbins+b)%conc_p(:,nys,:)
+          ENDDO
+       ENDDO
+    ELSEIF ( bc_radiation_n )  THEN
+       DO  b = 1, nbins
+          aerosol_number(b)%conc_p(:,nyn+1,:) = aerosol_number(b)%conc_p(:,nyn,:)
+          DO  c = 1, ncc_tot
+             aerosol_mass((c-1)*nbins+b)%conc_p(:,nyn+1,:) =                   &
+                                     aerosol_mass((c-1)*nbins+b)%conc_p(:,nyn,:)
+          ENDDO
+       ENDDO
+    ELSEIF ( bc_radiation_l )  THEN
+       DO  b = 1, nbins
+          aerosol_number(b)%conc_p(:,nxl-1,:) = aerosol_number(b)%conc_p(:,nxl,:)
+          DO  c = 1, ncc_tot
+             aerosol_mass((c-1)*nbins+b)%conc_p(:,nxl-1,:) =                   &
+                                     aerosol_mass((c-1)*nbins+b)%conc_p(:,nxl,:)
+          ENDDO
+       ENDDO
+    ELSEIF ( bc_radiation_r )  THEN
+       DO  b = 1, nbins
+          aerosol_number(b)%conc_p(:,nxr+1,:) = aerosol_number(b)%conc_p(:,nxr,:)
+          DO  c = 1, ncc_tot
+             aerosol_mass((c-1)*nbins+b)%conc_p(:,nxr+1,:) =                   &
+                                     aerosol_mass((c-1)*nbins+b)%conc_p(:,nxr,:)
+          ENDDO
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE salsa_boundary_conds
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+! Undoing of the previously done cyclic boundary conditions.
+!------------------------------------------------------------------------------! 
+ SUBROUTINE salsa_boundary_conds_decycle ( sq, sq_init )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  boundary !< 
+    INTEGER(iwp) ::  ee !<
+    INTEGER(iwp) ::  copied !< 
+    INTEGER(iwp) ::  i  !<
+    INTEGER(iwp) ::  j  !<
+    INTEGER(iwp) ::  k  !<
+    INTEGER(iwp) ::  ss !<
+    REAL(wp), DIMENSION(nzb:nzt+1) ::  sq_init
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  sq
+    REAL(wp) ::  flag !< flag to mask topography grid points
+
+    flag = 0.0_wp
+!
+!-- Left and right boundaries
+    IF ( decycle_lr  .AND.  ( bc_lr_cyc  .OR. bc_lr == 'nested' ) )  THEN
+    
+       DO  boundary = 1, 2
+
+          IF ( decycle_method(boundary) == 'dirichlet' )  THEN
+!    
+!--          Initial profile is copied to ghost and first three layers          
+             ss = 1
+             ee = 0
+             IF ( boundary == 1  .AND.  nxl == 0 )  THEN
+                ss = nxlg
+                ee = nxl+2
+             ELSEIF ( boundary == 2  .AND.  nxr == nx )  THEN
+                ss = nxr-2
+                ee = nxrg
+             ENDIF
+             
+             DO  i = ss, ee
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, nzt             
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 0 ) )
+                      sq(k,j,i) = sq_init(k) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          ELSEIF ( decycle_method(boundary) == 'neumann' )  THEN
+!
+!--          The value at the boundary is copied to the ghost layers to simulate
+!--          an outlet with zero gradient
+             ss = 1
+             ee = 0
+             IF ( boundary == 1  .AND.  nxl == 0 )  THEN
+                ss = nxlg
+                ee = nxl-1
+                copied = nxl
+             ELSEIF ( boundary == 2  .AND.  nxr == nx )  THEN
+                ss = nxr+1
+                ee = nxrg
+                copied = nxr
+             ENDIF
+             
+              DO  i = ss, ee
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, nzt             
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 0 ) )
+                      sq(k,j,i) = sq(k,j,copied) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          ELSE
+             WRITE(message_string,*)                                           &
+                                 'unknown decycling method: decycle_method (', &
+                     boundary, ') ="' // TRIM( decycle_method(boundary) ) // '"'
+             CALL message( 'salsa_boundary_conds_decycle', 'SA0029',           &
+                           1, 2, 0, 6, 0 )
+          ENDIF
+       ENDDO
+    ENDIF
+    
+!
+!-- South and north boundaries
+     IF ( decycle_ns  .AND.  ( bc_ns_cyc  .OR. bc_ns == 'nested' ) )  THEN
+    
+       DO  boundary = 3, 4
+
+          IF ( decycle_method(boundary) == 'dirichlet' )  THEN
+!    
+!--          Initial profile is copied to ghost and first three layers          
+             ss = 1
+             ee = 0
+             IF ( boundary == 3  .AND.  nys == 0 )  THEN
+                ss = nysg
+                ee = nys+2
+             ELSEIF ( boundary == 4  .AND.  nyn == ny )  THEN
+                ss = nyn-2
+                ee = nyng
+             ENDIF
+             
+             DO  i = nxlg, nxrg
+                DO  j = ss, ee
+                   DO  k = nzb+1, nzt             
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 0 ) )
+                      sq(k,j,i) = sq_init(k) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          ELSEIF ( decycle_method(boundary) == 'neumann' )  THEN
+!
+!--          The value at the boundary is copied to the ghost layers to simulate
+!--          an outlet with zero gradient
+             ss = 1
+             ee = 0
+             IF ( boundary == 3  .AND.  nys == 0 )  THEN
+                ss = nysg
+                ee = nys-1
+                copied = nys
+             ELSEIF ( boundary == 4  .AND.  nyn == ny )  THEN
+                ss = nyn+1
+                ee = nyng
+                copied = nyn
+             ENDIF
+             
+              DO  i = nxlg, nxrg
+                DO  j = ss, ee
+                   DO  k = nzb+1, nzt             
+                      flag = MERGE( 1.0_wp, 0.0_wp,                            &
+                                    BTEST( wall_flags_0(k,j,i), 0 ) )
+                      sq(k,j,i) = sq(k,copied,i) * flag
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          ELSE
+             WRITE(message_string,*)                                           &
+                                 'unknown decycling method: decycle_method (', &
+                     boundary, ') ="' // TRIM( decycle_method(boundary) ) // '"'
+             CALL message( 'salsa_boundary_conds_decycle', 'SA0030',           &
+                           1, 2, 0, 6, 0 )
+          ENDIF
+       ENDDO
+    ENDIF   
+ 
+ END SUBROUTINE salsa_boundary_conds_decycle
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the total dry or wet mass concentration for individual bins
+!> Juha Tonttila (FMI) 2015
+!> Tomi Raatikainen (FMI) 2016
+!------------------------------------------------------------------------------!
+ SUBROUTINE bin_mixrat( itype, ibin, i, j, mconc )
+
+    IMPLICIT NONE
+    
+    CHARACTER(len=*), INTENT(in) ::  itype !< 'dry' or 'wet'
+    INTEGER(iwp), INTENT(in) ::  ibin   !< index of the chemical component
+    INTEGER(iwp), INTENT(in) ::  i      !< loop index for x-direction
+    INTEGER(iwp), INTENT(in) ::  j      !< loop index for y-direction 
+    REAL(wp), DIMENSION(:), INTENT(out) ::  mconc     !< total dry or wet mass 
+                                                      !< concentration
+                                                      
+    INTEGER(iwp) ::  c                  !< loop index for mass bin number
+    INTEGER(iwp) ::  iend               !< end index: include water or not     
+    
+!-- Number of components 
+    IF ( itype == 'dry' )  THEN
+       iend = get_n_comp( prtcl ) - 1 
+    ELSE IF ( itype == 'wet' )  THEN
+       iend = get_n_comp( prtcl ) 
+    ELSE
+       STOP 'bin_mixrat: Error in itype'
+    ENDIF
+
+    mconc = 0.0_wp
+    
+    DO c = ibin, iend*nbins+ibin, nbins !< every nbins'th element
+       mconc = mconc + aerosol_mass(c)%conc(:,j,i)
+    ENDDO
+    
+ END SUBROUTINE bin_mixrat 
+
+!------------------------------------------------------------------------------!
+!> Description:
+!> ------------
+!> Define aerosol fluxes: constant or read from a from file
+!------------------------------------------------------------------------------! 
+ SUBROUTINE salsa_set_source
+ 
+ !   USE date_and_time_mod,                                                     &
+ !       ONLY:  index_dd, index_hh, index_mm
+#if defined( __netcdf )
+    USE NETCDF
+    
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  get_attribute, netcdf_data_input_get_dimension_length,          &
+               get_variable, open_read_file
+    
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, surf_lsm_h, surf_usm_h
+ 
+    IMPLICIT NONE
+    
+    INTEGER(iwp), PARAMETER ::  ndm = 3  !< number of default modes
+    INTEGER(iwp), PARAMETER ::  ndc = 4  !< number of default categories
+    
+    CHARACTER (LEN=10) ::  unita !< Unit of aerosol fluxes
+    CHARACTER (LEN=10) ::  unitg !< Unit of gaseous fluxes
+    INTEGER(iwp) ::  b           !< loop index: aerosol number bins
+    INTEGER(iwp) ::  c           !< loop index: aerosol chemical components
+    INTEGER(iwp) ::  ee          !< loop index: end
+    INTEGER(iwp), ALLOCATABLE, DIMENSION(:) ::  eci !< emission category index
+    INTEGER(iwp) ::  g           !< loop index: gaseous tracers
+    INTEGER(iwp) ::  i           !< loop index: x-direction   
+    INTEGER(iwp) ::  id_faero    !< NetCDF id of aerosol source input file 
+    INTEGER(iwp) ::  id_fchem    !< NetCDF id of aerosol source input file                              
+    INTEGER(iwp) ::  id_sa       !< NetCDF id of variable: source   
+    INTEGER(iwp) ::  j           !< loop index: y-direction
+    INTEGER(iwp) ::  k           !< loop index: z-direction
+    INTEGER(iwp) ::  kg          !< loop index: z-direction (gases)
+    INTEGER(iwp) ::  n_dt        !< number of time steps in the emission file
+    INTEGER(iwp) ::  nc_stat     !< local variable for storing the result of 
+                                 !< netCDF calls for error message handling
+    INTEGER(iwp) ::  nb_file     !< Number of grid-points in file (bins)                                  
+    INTEGER(iwp) ::  ncat        !< Number of emission categories 
+    INTEGER(iwp) ::  ng_file     !< Number of grid-points in file (gases)  
+    INTEGER(iwp) ::  num_vars    !< number of variables in input file
+    INTEGER(iwp) ::  nz_file     !< number of grid-points in file     
+    INTEGER(iwp) ::  n           !< loop index
+    INTEGER(iwp) ::  ni          !< loop index
+    INTEGER(iwp) ::  ss          !< loop index
+    LOGICAL  ::  netcdf_extend = .FALSE. !< Flag indicating wether netcdf 
+                                         !< topography input file or not   
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:)   :: dum_var_4d !< variable for 
+                                                              !< temporary data                                        
+    REAL(wp) ::  fillval         !< fill value 
+    REAL(wp) ::  flag            !< flag to mask topography grid points
+    REAL(wp), DIMENSION(nbins) ::  nsect_emission  !< sectional emission (lod1)
+    REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  pm_emission  !< aerosol mass 
+                                                             !< emission (lod1)
+    REAL(wp), DIMENSION(nbins) ::  source_ijka !< aerosol source at (k,j,i)
+!
+!-- The default size distribution and mass composition per emission category:
+!-- 1 = traffic, 2 = road dust, 3 = wood combustion, 4 = other 
+!-- Mass fractions: H2SO4, OC, BC, DU, SS, HNO3, NH3
+    CHARACTER(LEN=15), DIMENSION(ndc) ::  cat_name_table = &!< emission category
+                                         (/'road traffic   ','road dust      ',&
+                                           'wood combustion','other          '/)
+    REAL(wp), DIMENSION(ndc) ::  avg_density        !< average density
+    REAL(wp), DIMENSION(ndc) ::  conversion_factor  !< unit conversion factor  
+                                                    !< for aerosol emissions 
+    REAL(wp), DIMENSION(ndm), PARAMETER ::  dpg_table = & !< mean diameter (mum)
+                                            (/ 13.5E-3_wp, 1.4_wp, 5.4E-2_wp/)
+    REAL(wp), DIMENSION(ndm) ::  ntot_table                                       
+    REAL(wp), DIMENSION(maxspec,ndc), PARAMETER ::  mass_fraction_table =      &
+       RESHAPE( (/ 0.04_wp, 0.48_wp, 0.48_wp, 0.0_wp,  0.0_wp, 0.0_wp, 0.0_wp, &
+                   0.0_wp,  0.05_wp, 0.0_wp,  0.95_wp, 0.0_wp, 0.0_wp, 0.0_wp, &
+                   0.0_wp,  0.5_wp,  0.5_wp,  0.0_wp,  0.0_wp, 0.0_wp, 0.0_wp, &
+                   0.0_wp,  0.5_wp,  0.5_wp,  0.0_wp,  0.0_wp, 0.0_wp, 0.0_wp  &
+                /), (/maxspec,ndc/) )         
+    REAL(wp), DIMENSION(ndm,ndc), PARAMETER ::  PMfrac_table = & !< rel. mass
+                                     RESHAPE( (/ 0.016_wp, 0.000_wp, 0.984_wp, &
+                                                 0.000_wp, 1.000_wp, 0.000_wp, &
+                                                 0.000_wp, 0.000_wp, 1.000_wp, &
+                                                 1.000_wp, 0.000_wp, 1.000_wp  &
+                                              /), (/ndm,ndc/) )                                   
+    REAL(wp), DIMENSION(ndm), PARAMETER ::  sigmag_table = &     !< mode std
+                                            (/1.6_wp, 1.4_wp, 1.7_wp/) 
+    avg_density    = 1.0_wp
+    nb_file        = 0
+    ng_file        = 0
+    nsect_emission = 0.0_wp
+    nz_file        = 0
+    source_ijka    = 0.0_wp
+!
+!-- First gases, if needed:
+    IF ( .NOT. salsa_gases_from_chem )  THEN    
+!       
+!--    Read sources from PIDS_CHEM      
+       INQUIRE( FILE='PIDS_CHEM' // TRIM( coupling_char ), EXIST=netcdf_extend )
+       IF ( .NOT. netcdf_extend )  THEN
+          message_string = 'Input file '// TRIM( 'PIDS_CHEM' ) //              &
+                           TRIM( coupling_char ) // ' for SALSA missing!'
+          CALL message( 'salsa_mod: salsa_set_source', 'SA0027', 1, 2, 0, 6, 0 )                
+       ENDIF   ! netcdf_extend  
+       
+       CALL location_message( '    salsa_set_source: NOTE! Gaseous emissions'//&
+               ' should be provided with following emission indices:'//        &
+               ' 1=H2SO4, 2=HNO3, 3=NH3, 4=OCNV, 5=OCSV', .TRUE. )
+       CALL location_message( '    salsa_set_source: No time dependency for '//&
+                              'gaseous emissions. Use emission_values '//      &
+                              'directly.', .TRUE. )
+!
+!--    Open PIDS_CHEM in read-only mode 
+       CALL open_read_file( 'PIDS_CHEM' // TRIM( coupling_char ), id_fchem )
+!
+!--    Inquire the level of detail (lod)
+       CALL get_attribute( id_fchem, 'lod', lod_gases, .FALSE.,                &
+                           "emission_values" ) 
+                           
+       IF ( lod_gases == 2 )  THEN
+!                              
+!--       Index of gaseous compounds
+          CALL netcdf_data_input_get_dimension_length( id_fchem, ng_file, "nspecies" )  
+          IF ( ng_file < 5 )  THEN
+             message_string = 'Some gaseous emissions missing.'
+             CALL message( 'salsa_mod: salsa_set_source', 'SA0041',            &
+                           1, 2, 0, 6, 0 )
+          ENDIF       
+!
+!--       Get number of emission categories  
+          CALL netcdf_data_input_get_dimension_length( id_fchem, ncat, "ncat" )       
+!
+!--       Inquire the unit of gaseous fluxes
+          CALL get_attribute( id_fchem, 'units', unitg, .FALSE.,               &
+                              "emission_values")       
+!
+!--       Inquire the fill value 
+          CALL get_attribute( id_fchem, '_FillValue', fillval, .FALSE.,        &
+                              "emission_values" )
+!        
+!--       Read surface emission data (x,y) PE-wise   
+          ALLOCATE( dum_var_4d(ng_file,ncat,nys:nyn,nxl:nxr) )      
+          CALL get_variable( id_fchem, 'emission_values', dum_var_4d, nxl, nxr,&
+                             nys, nyn, 0, ncat-1, 0, ng_file-1 )
+          DO  g = 1, ngast
+             ALLOCATE( salsa_gas(g)%source(ncat,nys:nyn,nxl:nxr) )
+             salsa_gas(g)%source = 0.0_wp
+             salsa_gas(g)%source = salsa_gas(g)%source + dum_var_4d(g,:,:,:)
+          ENDDO                   
+!   
+!--       Set surface fluxes of gaseous compounds on horizontal surfaces.
+!--       Set fluxes only for either default, land or urban surface.
+          IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
+             CALL set_gas_flux( surf_def_h(0), ncat, unitg  )
+          ELSE
+             CALL set_gas_flux( surf_lsm_h, ncat, unitg  )
+             CALL set_gas_flux( surf_usm_h, ncat, unitg  )
+          ENDIF
+          
+          DEALLOCATE( dum_var_4d )
+          DO  g = 1, ngast
+             DEALLOCATE( salsa_gas(g)%source )
+          ENDDO
+       ELSE
+          message_string = 'Input file PIDS_CHEM needs to have lod = 2 when '//&
+                           'SALSA is applied but not the chemistry module!'
+          CALL message( 'salsa_mod: salsa_set_source', 'SA0039', 1, 2, 0, 6, 0 )    
+       ENDIF             
+    ENDIF 
+!       
+!-- Read sources from PIDS_SALSA        
+    INQUIRE( FILE='PIDS_SALSA' // TRIM( coupling_char ), EXIST=netcdf_extend )
+    IF ( .NOT. netcdf_extend )  THEN
+       message_string = 'Input file '// TRIM( 'PIDS_SALSA' ) //                &
+                         TRIM( coupling_char ) // ' for SALSA missing!'
+       CALL message( 'salsa_mod: salsa_set_source', 'SA0034', 1, 2, 0, 6, 0 )                
+    ENDIF   ! netcdf_extend      
+!
+!-- Open file in read-only mode     
+    CALL open_read_file( 'PIDS_SALSA' // TRIM( coupling_char ), id_faero )
+!
+!-- Get number of emission categories and their indices       
+    CALL netcdf_data_input_get_dimension_length( id_faero, ncat, "ncat" ) 
+!
+!-- Get emission category indices
+    ALLOCATE( eci(1:ncat) )
+    CALL get_variable( id_faero, 'emission_category_index', eci ) 
+!
+!-- Inquire the level of detail (lod)
+    CALL get_attribute( id_faero, 'lod', lod_aero, .FALSE.,                    &
+                        "aerosol_emission_values" ) 
+                            
+    IF ( lod_aero < 3  .AND.  ibc_salsa_b  == 0 ) THEN
+       message_string = 'lod1/2 for aerosol emissions requires '//             &
+                        'bc_salsa_b = "Neumann"'
+       CALL message( 'salsa_mod: salsa_set_source','SA0025', 1, 2, 0, 6, 0 )
+    ENDIF
+!
+!-- Inquire the fill value 
+    CALL get_attribute( id_faero, '_FillValue', fillval, .FALSE.,              &
+                        "aerosol_emission_values" )
+!
+!-- Aerosol chemical composition:
+    ALLOCATE( emission_mass_fracs(1:ncat,1:maxspec) )
+    emission_mass_fracs = 0.0_wp
+!-- Chemical composition: 1: H2SO4 (sulphuric acid), 2: OC (organic carbon), 
+!--                       3: BC (black carbon), 4: DU (dust),  
+!--                       5: SS (sea salt),     6: HNO3 (nitric acid), 
+!--                       7: NH3 (ammonia)
+    DO  n = 1, ncat
+       IF  ( lod_aero < 2 )  THEN
+          emission_mass_fracs(n,:) = mass_fraction_table(:,n)
+       ELSE
+          CALL get_variable( id_faero, "emission_mass_fracs",                  &
+                             emission_mass_fracs(n,:) )
+       ENDIF 
+!
+!--    If the chemical component is not activated, set its mass fraction to 0
+!--    to avoid inbalance between number and mass flux
+       IF ( iso4 < 0 )  emission_mass_fracs(n,1) = 0.0_wp
+       IF ( ioc  < 0 )  emission_mass_fracs(n,2) = 0.0_wp
+       IF ( ibc  < 0 )  emission_mass_fracs(n,3) = 0.0_wp
+       IF ( idu  < 0 )  emission_mass_fracs(n,4) = 0.0_wp
+       IF ( iss  < 0 )  emission_mass_fracs(n,5) = 0.0_wp
+       IF ( ino  < 0 )  emission_mass_fracs(n,6) = 0.0_wp
+       IF ( inh  < 0 )  emission_mass_fracs(n,7) = 0.0_wp
+!--    Then normalise the mass fraction so that SUM = 1                   
+       emission_mass_fracs(n,:) = emission_mass_fracs(n,:) /                   &
+                                  SUM( emission_mass_fracs(n,:) )
+    ENDDO
+    
+    IF ( lod_aero > 1 )  THEN
+!
+!--    Aerosol geometric mean diameter  
+       CALL netcdf_data_input_get_dimension_length( id_faero, nb_file, 'Dmid' )     
+       IF ( nb_file /= nbins )  THEN
+          message_string = 'The number of size bins in aerosol input data '//  &
+                           'does not correspond to the model set-up'
+          CALL message( 'salsa_mod: salsa_set_source','SA0040', 1, 2, 0, 6, 0 )
+       ENDIF
+    ENDIF
+
+    IF ( lod_aero < 3 )  THEN
+       CALL location_message( '    salsa_set_source: No time dependency for '//&
+                             'aerosol emissions. Use aerosol_emission_values'//&
+                             ' directly.', .TRUE. )
+!
+!--    Allocate source arrays 
+       DO  b = 1, nbins
+          ALLOCATE( aerosol_number(b)%source(1:ncat,nys:nyn,nxl:nxr) )
+          aerosol_number(b)%source = 0.0_wp
+       ENDDO 
+       DO  c = 1, ncc_tot*nbins
+          ALLOCATE( aerosol_mass(c)%source(1:ncat,nys:nyn,nxl:nxr) )
+          aerosol_mass(c)%source = 0.0_wp
+       ENDDO
+       
+       IF ( lod_aero == 1 )  THEN
+          DO  n = 1, ncat
+             avg_density(n) = emission_mass_fracs(n,1) * arhoh2so4 +           &
+                              emission_mass_fracs(n,2) * arhooc +              &
+                              emission_mass_fracs(n,3) * arhobc +              &
+                              emission_mass_fracs(n,4) * arhodu +              &
+                              emission_mass_fracs(n,5) * arhoss +              &
+                              emission_mass_fracs(n,6) * arhohno3 +            &
+                              emission_mass_fracs(n,7) * arhonh3
+          ENDDO    
+!
+!--       Emission unit
+          CALL get_attribute( id_faero, 'units', unita, .FALSE.,               &
+                              "aerosol_emission_values")
+          conversion_factor = 1.0_wp
+          IF  ( unita == 'kg/m2/yr' )  THEN
+             conversion_factor = 3.170979e-8_wp / avg_density
+          ELSEIF  ( unita == 'g/m2/yr' )  THEN
+             conversion_factor = 3.170979e-8_wp * 1.0E-3_wp / avg_density
+          ELSEIF  ( unita == 'kg/m2/s' )  THEN
+             conversion_factor = 1.0_wp / avg_density
+          ELSEIF  ( unita == 'g/m2/s' )  THEN
+             conversion_factor = 1.0E-3_wp / avg_density
+          ELSE 
+             message_string = 'unknown unit for aerosol emissions: '           &
+                              // TRIM( unita ) // ' (lod1)'
+             CALL message( 'salsa_mod: salsa_set_source','SA0035',             &
+                           1, 2, 0, 6, 0 )
+          ENDIF
+!        
+!--       Read surface emission data (x,y) PE-wise  
+          ALLOCATE( pm_emission(ncat,nys:nyn,nxl:nxr) )
+          CALL get_variable( id_faero, 'aerosol_emission_values', pm_emission, &
+                             nxl, nxr, nys, nyn, 0, ncat-1 )
+          DO  ni = 1, SIZE( eci )
+             n = eci(ni)
+!
+!--          Calculate the number concentration of a log-normal size 
+!--          distribution following Jacobson (2005): Eq 13.25.
+             ntot_table = 6.0_wp * PMfrac_table(:,n) / ( pi * dpg_table**3 *   &
+                          EXP( 4.5_wp * LOG( sigmag_table )**2 ) ) * 1.0E+12_wp
+!                          
+!--          Sectional size distibution from a log-normal one                          
+             CALL size_distribution( ntot_table, dpg_table, sigmag_table,      &
+                                     nsect_emission )
+             DO  b = 1, nbins
+                aerosol_number(b)%source(ni,:,:) =                             &
+                                    aerosol_number(b)%source(ni,:,:) +         &
+                                    pm_emission(ni,:,:) * conversion_factor(n) &
+                                    * nsect_emission(b) 
+             ENDDO
+          ENDDO
+       ELSEIF ( lod_aero == 2 )  THEN             
+!        
+!--       Read surface emission data (x,y) PE-wise   
+          ALLOCATE( dum_var_4d(nb_file,ncat,nys:nyn,nxl:nxr) )
+          CALL get_variable( id_faero, 'aerosol_emission_values', dum_var_4d,  &
+                             nxl, nxr, nys, nyn, 0, ncat-1, 0, nb_file-1 )
+          DO  b = 1, nbins
+             aerosol_number(b)%source = dum_var_4d(b,:,:,:)
+          ENDDO
+          DEALLOCATE( dum_var_4d )
+       ENDIF
+!   
+!--    Set surface fluxes of aerosol number and mass on horizontal surfaces.
+!--    Set fluxes only for either default, land or urban surface.
+       IF ( .NOT. land_surface  .AND.  .NOT. urban_surface )  THEN
+          CALL set_flux( surf_def_h(0), ncat )
+       ELSE
+          CALL set_flux( surf_usm_h, ncat )
+          CALL set_flux( surf_lsm_h, ncat )
+       ENDIF
+          
+    ELSEIF ( lod_aero == 3 )  THEN
+!
+!--    Inquire aerosol emission rate per bin (#/(m3s))
+       nc_stat = NF90_INQ_VARID( id_faero, "aerosol_emission_values", id_sa )
+  
+!
+!--    Emission time step
+       CALL netcdf_data_input_get_dimension_length( id_faero, n_dt, 'dt_emission' ) 
+       IF ( n_dt > 1 )  THEN
+          CALL location_message( '    salsa_set_source: hourly emission data'//&
+                                 ' provided but currently the value of the '// &
+                                 ' first hour is applied.', .TRUE. )
+       ENDIF
+!
+!--    Allocate source arrays 
+       DO  b = 1, nbins
+          ALLOCATE( aerosol_number(b)%source(nzb:nzt+1,nys:nyn,nxl:nxr) )
+          aerosol_number(b)%source = 0.0_wp
+       ENDDO
+       DO  c = 1, ncc_tot*nbins
+          ALLOCATE( aerosol_mass(c)%source(nzb:nzt+1,nys:nyn,nxl:nxr) )
+          aerosol_mass(c)%source = 0.0_wp
+       ENDDO
+!
+!--    Get dimension of z-axis:      
+       CALL netcdf_data_input_get_dimension_length( id_faero, nz_file, 'z' )
+!        
+!--    Read surface emission data (x,y) PE-wise             
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = 0, nz_file-1
+!
+!--             Predetermine flag to mask topography                                 
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i), 0 ))
+!                                             
+!--             No sources inside buildings !                                          
+                IF ( flag == 0.0_wp )  CYCLE                          
+! 
+!--             Read volume source:
+                nc_stat = NF90_GET_VAR( id_faero, id_sa, source_ijka,          &
+                                        start = (/ i+1, j+1, k+1, 1, 1 /),     &
+                                        count = (/ 1, 1, 1, 1, nb_file /) )
+                IF ( nc_stat /= NF90_NOERR )  THEN
+                   message_string = 'error in aerosol emissions: lod3'
+                   CALL message( 'salsa_mod: salsa_set_source','SA0038', 1, 2, &
+                                 0, 6, 0 )
+                ENDIF
+!       
+!--             Set mass fluxes.  First bins include only SO4 and/or OC. Call 
+!--             subroutine set_mass_source for larger bins.                            
+!
+!--             Sulphate and organic carbon
+                IF ( iso4 > 0  .AND.  ioc > 0 ) THEN                 
+!--                First sulphate:                     
+                   ss = ( iso4 - 1 ) * nbins + in1a   ! start
+                   ee = ( iso4 - 1 ) * nbins + fn1a   ! end
+                   b = in1a            
+                   DO  c = ss, ee
+                      IF ( source_ijka(b) /= fillval )                         &
+                      aerosol_mass(c)%source(k,j,i) =                          &
+                         aerosol_mass(c)%source(k,j,i) +                       &
+                         emission_mass_fracs(1,1) / ( emission_mass_fracs(1,1) &
+                         + emission_mass_fracs(1,2) ) * source_ijka(b) *       &
+                         aero(b)%core * arhoh2so4 
+                      b = b+1
+                   ENDDO                  
+!--                Then organic carbon:                      
+                   ss = ( ioc - 1 ) * nbins + in1a   ! start
+                   ee = ( ioc - 1 ) * nbins + fn1a   ! end 
+                   b = in1a
+                   DO  c = ss, ee 
+                      IF ( source_ijka(b) /= fillval )                         &
+                      aerosol_mass(c)%source(k,j,i) =                          &
+                         aerosol_mass(c)%source(k,j,i) +                       &
+                         emission_mass_fracs(1,2) / ( emission_mass_fracs(1,1) &
+                         + emission_mass_fracs(1,2) ) * source_ijka(b) *       &
+                         aero(b)%core * arhooc 
+                      b = b+1
+                   ENDDO
+                   
+                   CALL set_mass_source( k, j, i, iso4,                        &
+                                        emission_mass_fracs(1,1), arhoh2so4,   &
+                                        source_ijka, fillval )
+                   CALL set_mass_source( k, j, i, ioc, emission_mass_fracs(1,2),&
+                                         arhooc, source_ijka, fillval )                      
+!--             Only sulphate:                                             
+                ELSEIF ( iso4 > 0  .AND.  ioc < 0 ) THEN                    
+                   ss = ( iso4 - 1 ) * nbins + in1a   ! start
+                   ee = ( iso4 - 1 ) * nbins + fn1a   ! end
+                   b = in1a            
+                   DO  c = ss, ee
+                      IF ( source_ijka(b) /= fillval )                         &
+                      aerosol_mass(c)%source(k,j,i) =                          &
+                         aerosol_mass(c)%source(k,j,i) + source_ijka(b) *      &
+                         aero(b)%core * arhoh2so4 
+                      b = b+1
+                   ENDDO 
+                   CALL set_mass_source( k, j, i, iso4,                        &
+                                        emission_mass_fracs(1,1), arhoh2so4,   &
+                                        source_ijka, fillval )    
+!--             Only organic carbon:                                            
+                ELSEIF ( iso4 < 0  .AND.  ioc > 0 ) THEN                    
+                   ss = ( ioc - 1 ) * nbins + in1a   ! start
+                   ee = ( ioc - 1 ) * nbins + fn1a   ! end 
+                   b = in1a
+                   DO  c = ss, ee 
+                      IF ( source_ijka(b) /= fillval )                         &
+                      aerosol_mass(c)%source(k,j,i) =                          &
+                         aerosol_mass(c)%source(k,j,i) + source_ijka(b)  *     &
+                         aero(b)%core * arhooc 
+                      b = b+1
+                   ENDDO 
+                   CALL set_mass_source( k, j, i, ioc, emission_mass_fracs(1,2),&
+                                         arhooc,  source_ijka, fillval )                                    
+                ENDIF
+!--             Black carbon
+                IF ( ibc > 0 ) THEN
+                   CALL set_mass_source( k, j, i, ibc, emission_mass_fracs(1,3),&
+                                         arhobc, source_ijka, fillval )
+                ENDIF
+!--             Dust
+                IF ( idu > 0 ) THEN
+                   CALL set_mass_source( k, j, i, idu, emission_mass_fracs(1,4),&
+                                         arhodu, source_ijka, fillval )
+                ENDIF
+!--             Sea salt
+                IF ( iss > 0 ) THEN
+                   CALL set_mass_source( k, j, i, iss, emission_mass_fracs(1,5),&
+                                         arhoss, source_ijka, fillval )
+                ENDIF
+!--             Nitric acid
+                IF ( ino > 0 ) THEN
+                   CALL set_mass_source( k, j, i, ino, emission_mass_fracs(1,6),&
+                                         arhohno3, source_ijka, fillval )
+                ENDIF
+!--             Ammonia
+                IF ( inh > 0 ) THEN
+                   CALL set_mass_source( k, j, i, inh, emission_mass_fracs(1,7),&
+                                         arhonh3, source_ijka, fillval )
+                ENDIF
+!                             
+!--             Save aerosol number sources in the end                            
+                DO  b = 1, nbins
+                   IF ( source_ijka(b) /= fillval )                            &
+                   aerosol_number(b)%source(k,j,i) =                           &
+                      aerosol_number(b)%source(k,j,i) + source_ijka(b)
+                ENDDO                     
+             ENDDO    ! k
+          ENDDO    ! j
+       ENDDO    ! i
+
+    ELSE      
+       message_string = 'NetCDF attribute lod is not set properly.'
+       CALL message( 'salsa_mod: salsa_set_source','SA0026', 1, 2, 0, 6, 0 )
+    ENDIF 
+ 
+#endif    
+ END SUBROUTINE salsa_set_source
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sets the gaseous fluxes
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_gas_flux( surface, ncat_emission, unit )
+ 
+    USE arrays_3d,                                                             &
+        ONLY: dzw, hyp, pt, rho_air_zw
+        
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+ 
+    USE surface_mod,                                                           &
+        ONLY:  surf_type
+    
+    IMPLICIT NONE
+    
+    CHARACTER(LEN=*) ::  unit       !< flux unit in the input file  
+    INTEGER(iwp) ::  ncat_emission  !< number of emission categories
+    TYPE(surf_type), INTENT(inout) :: surface  !< respective surface type
+    INTEGER(iwp) ::  g   !< loop index
+    INTEGER(iwp) ::  i   !< loop index
+    INTEGER(iwp) ::  j   !< loop index
+    INTEGER(iwp) ::  k   !< loop index
+    INTEGER(iwp) ::  m   !< running index for surface elements
+    INTEGER(iwp) ::  n   !< running index for emission categories
+    REAL(wp), DIMENSION(ngast) ::  conversion_factor 
+    
+    conversion_factor = 1.0_wp
+    
+    DO  m = 1, surface%ns
+!
+!--    Get indices of respective grid point
+       i = surface%i(m)
+       j = surface%j(m)
+       k = surface%k(m)
+       
+       IF ( unit == '#/m2/s' )  THEN
+          conversion_factor = 1.0_wp
+       ELSEIF ( unit == 'g/m2/s' )  THEN
+          conversion_factor(1) = avo / ( amh2so4 * 1000.0_wp )
+          conversion_factor(2) = avo / ( amhno3 * 1000.0_wp )
+          conversion_factor(3) = avo / ( amnh3 * 1000.0_wp )
+          conversion_factor(4) = avo / ( amoc * 1000.0_wp )
+          conversion_factor(5) = avo / ( amoc * 1000.0_wp )
+       ELSEIF ( unit == 'ppm/m2/s' )  THEN
+          conversion_factor = for_ppm_to_nconc * hyp(k) / pt(k,j,i) * ( hyp(k) &
+                              / 100000.0_wp )**0.286_wp * dx * dy * dzw(k)
+       ELSEIF ( unit == 'mumol/m2/s' )  THEN
+          conversion_factor = 1.0E-6_wp * avo
+       ELSE
+          message_string = 'Unknown unit for gaseous emissions!'
+          CALL message( 'salsa_mod: set_gas_flux', 'SA0031', 1, 2, 0, 6, 0 )
+       ENDIF
+       
+       DO  n = 1, ncat_emission
+          DO  g = 1, ngast
+             IF ( .NOT. salsa_gas(g)%source(n,j,i) > 0.0_wp )  THEN
+                salsa_gas(g)%source(n,j,i) = 0.0_wp
+                CYCLE
+             ENDIF
+             surface%gtsws(m,g) = surface%gtsws(m,g) +                         &
+                                  salsa_gas(g)%source(n,j,i) * rho_air_zw(k-1) &
+                                  * conversion_factor(g)
+          ENDDO
+       ENDDO
+    ENDDO
+    
+ END SUBROUTINE set_gas_flux 
+  
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sets the aerosol flux to aerosol arrays in 2a and 2b.
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_flux( surface, ncat_emission )
+ 
+    USE arrays_3d,                                                             &
+        ONLY: hyp, pt, rho_air_zw
+ 
+    USE surface_mod,                                                           &
+        ONLY:  surf_type
+    
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  ncat_emission  !< number of emission categories
+    TYPE(surf_type), INTENT(inout) :: surface  !< respective surface type
+    INTEGER(iwp) ::  b  !< loop index
+    INTEGER(iwp) ::  ee  !< loop index
+    INTEGER(iwp) ::  g   !< loop index
+    INTEGER(iwp) ::  i   !< loop index
+    INTEGER(iwp) ::  j   !< loop index
+    INTEGER(iwp) ::  k   !< loop index
+    INTEGER(iwp) ::  m   !< running index for surface elements
+    INTEGER(iwp) ::  n   !< loop index for emission categories
+    INTEGER(iwp) ::  c   !< loop index
+    INTEGER(iwp) ::  ss  !< loop index
+    
+    DO  m = 1, surface%ns
+!
+!--    Get indices of respective grid point
+       i = surface%i(m)
+       j = surface%j(m)
+       k = surface%k(m)
+       
+       DO  n = 1, ncat_emission  
+          DO  b = 1, nbins
+             IF (  aerosol_number(b)%source(n,j,i) < 0.0_wp )  THEN
+                aerosol_number(b)%source(n,j,i) = 0.0_wp
+                CYCLE
+             ENDIF
+!       
+!--          Set mass fluxes.  First bins include only SO4 and/or OC.      
+
+             IF ( b <= fn1a )  THEN
+!
+!--             Both sulphate and organic carbon
+                IF ( iso4 > 0  .AND.  ioc > 0 )  THEN
+                
+                   c = ( iso4 - 1 ) * nbins + b   
+                   surface%amsws(m,c) = surface%amsws(m,c) +                   &
+                                        emission_mass_fracs(n,1) /             &
+                                        ( emission_mass_fracs(n,1) +           &
+                                          emission_mass_fracs(n,2) ) *         &
+                                          aerosol_number(b)%source(n,j,i) *    &
+                                          api6 * aero(b)%dmid**3.0_wp *        &
+                                          arhoh2so4 * rho_air_zw(k-1)
+                   aerosol_mass(c)%source(n,j,i) =                             &
+                              aerosol_mass(c)%source(n,j,i) + surface%amsws(m,c)
+                   c = ( ioc - 1 ) * nbins + b   
+                   surface%amsws(m,c) = surface%amsws(m,c) +                   &
+                                        emission_mass_fracs(n,2) /             &
+                                        ( emission_mass_fracs(n,1) +           & 
+                                          emission_mass_fracs(n,2) ) *         &
+                                          aerosol_number(b)%source(n,j,i) *    &
+                                          api6 * aero(b)%dmid**3.0_wp * arhooc &
+                                          * rho_air_zw(k-1)
+                   aerosol_mass(c)%source(n,j,i) =                             &
+                              aerosol_mass(c)%source(n,j,i) + surface%amsws(m,c)
+!
+!--             Only sulphates
+                ELSEIF ( iso4 > 0  .AND.  ioc < 0 )  THEN
+                   c = ( iso4 - 1 ) * nbins + b   
+                   surface%amsws(m,c) = surface%amsws(m,c) +                   &
+                                        aerosol_number(b)%source(n,j,i) * api6 &
+                                        * aero(b)%dmid**3.0_wp * arhoh2so4     &
+                                        * rho_air_zw(k-1)
+                   aerosol_mass(c)%source(n,j,i) =                             &
+                              aerosol_mass(c)%source(n,j,i) + surface%amsws(m,c)
+!             
+!--             Only organic carbon             
+                ELSEIF ( iso4 < 0  .AND.  ioc > 0 )  THEN
+                   c = ( ioc - 1 ) * nbins + b   
+                   surface%amsws(m,c) = surface%amsws(m,c) +                   &
+                                        aerosol_number(b)%source(n,j,i) * api6 &
+                                        * aero(b)%dmid**3.0_wp * arhooc        &
+                                        * rho_air_zw(k-1)
+                   aerosol_mass(c)%source(n,j,i) =                             &
+                              aerosol_mass(c)%source(n,j,i) + surface%amsws(m,c)
+                ENDIF
+                
+             ELSEIF ( b > fn1a )  THEN
+!
+!--             Sulphate
+                IF ( iso4 > 0 )  THEN
+                   CALL set_mass_flux( surface, m, b, iso4, n,                 &
+                                       emission_mass_fracs(n,1), arhoh2so4,    &
+                                       aerosol_number(b)%source(n,j,i) )
+                ENDIF 
+!             
+!--             Organic carbon                 
+                IF ( ioc > 0 )  THEN          
+                  CALL set_mass_flux( surface, m, b, ioc, n,                   &
+                                      emission_mass_fracs(n,2), arhooc,        &
+                                      aerosol_number(b)%source(n,j,i) )
+                ENDIF
+!
+!--             Black carbon
+                IF ( ibc > 0 )  THEN
+                   CALL set_mass_flux( surface, m, b, ibc, n,                  &
+                                       emission_mass_fracs(n,3), arhobc,       &
+                                       aerosol_number(b)%source(n,j,i) )
+                ENDIF
+!
+!--             Dust
+                IF ( idu > 0 )  THEN
+                   CALL set_mass_flux( surface, m, b, idu, n,                  &
+                                       emission_mass_fracs(n,4), arhodu,       &
+                                       aerosol_number(b)%source(n,j,i) )
+                ENDIF
+!
+!--             Sea salt
+                IF ( iss > 0 )  THEN
+                   CALL set_mass_flux( surface, m, b, iss, n,                  &
+                                       emission_mass_fracs(n,5), arhoss,       &
+                                       aerosol_number(b)%source(n,j,i) )
+                ENDIF
+!
+!--             Nitric acid
+                IF ( ino > 0 )  THEN
+                   CALL set_mass_flux( surface, m, b, ino, n,                  &
+                                       emission_mass_fracs(n,6), arhohno3,     &
+                                       aerosol_number(b)%source(n,j,i) )
+                ENDIF
+!
+!--             Ammonia
+                IF ( inh > 0 )  THEN
+                   CALL set_mass_flux( surface, m, b, inh, n,                  &
+                                       emission_mass_fracs(n,7), arhonh3,      &
+                                       aerosol_number(b)%source(n,j,i) )
+                ENDIF
+                
+             ENDIF
+!             
+!--          Save number fluxes in the end 
+             surface%answs(m,b) = surface%answs(m,b) +                         &
+                               aerosol_number(b)%source(n,j,i) * rho_air_zw(k-1)
+             aerosol_number(b)%source(n,j,i) = surface%answs(m,b)
+          ENDDO
+       
+       ENDDO
+       
+    ENDDO
+    
+ END SUBROUTINE set_flux 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sets the mass emissions to aerosol arrays in 2a and 2b.
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_mass_flux( surface, surf_num, b, ispec, n, mass_frac, prho,    &
+                           nsource )
+                           
+    USE arrays_3d,                                                             &
+        ONLY:  rho_air_zw
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_type
+    
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(in) :: b         !< Aerosol size bin index
+    INTEGER(iwp), INTENT(in) :: ispec     !< Aerosol species index
+    INTEGER(iwp), INTENT(in) :: n         !< emission category number    
+    INTEGER(iwp), INTENT(in) :: surf_num  !< index surface elements
+    REAL(wp), INTENT(in) ::  mass_frac    !< mass fraction of a chemical 
+                                          !< compound in all bins 
+    REAL(wp), INTENT(in) ::  nsource      !< number source (#/m2/s)
+    REAL(wp), INTENT(in) ::  prho         !< Aerosol density
+    TYPE(surf_type), INTENT(inout) ::  surface  !< respective surface type
+     
+    INTEGER(iwp) ::  ee !< index: end 
+    INTEGER(iwp) ::  i  !< loop index 
+    INTEGER(iwp) ::  j  !< loop index
+    INTEGER(iwp) ::  k  !< loop index
+    INTEGER(iwp) ::  c  !< loop index
+    INTEGER(iwp) ::  ss !<index: start 
+    
+!
+!-- Get indices of respective grid point
+    i = surface%i(surf_num)
+    j = surface%j(surf_num)
+    k = surface%k(surf_num)
+!          
+!-- Subrange 2a:
+    c = ( ispec - 1 ) * nbins + b
+    surface%amsws(surf_num,c) = surface%amsws(surf_num,c) + mass_frac * nsource&
+                                * aero(b)%core * prho * rho_air_zw(k-1)
+    aerosol_mass(c)%source(n,j,i) = aerosol_mass(c)%source(n,j,i) +            &
+                                    surface%amsws(surf_num,c)
+!          
+!-- Subrange 2b:
+    IF ( .NOT. no_insoluble )  THEN
+       WRITE(*,*) 'All emissions are soluble!'
+    ENDIF
+    
+ END SUBROUTINE set_mass_flux
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sets the mass sources to aerosol arrays in 2a and 2b.
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_mass_source( k, j, i,  ispec, mass_frac, prho, nsource, fillval )
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_type
+    
+    IMPLICIT NONE
+    
+    INTEGER(iwp), INTENT(in) :: ispec     !< Aerosol species index
+    REAL(wp), INTENT(in) ::  fillval      !< _FillValue in the NetCDF file
+    REAL(wp), INTENT(in) ::  mass_frac    !< mass fraction of a chemical 
+                                          !< compound in all bins  
+    REAL(wp), INTENT(in), DIMENSION(:) ::  nsource  !< number source
+    REAL(wp), INTENT(in) ::  prho         !< Aerosol density
+    
+    INTEGER(iwp) ::  b !< loop index    
+    INTEGER(iwp) ::  ee !< index: end 
+    INTEGER(iwp) ::  i  !< loop index 
+    INTEGER(iwp) ::  j  !< loop index
+    INTEGER(iwp) ::  k  !< loop index
+    INTEGER(iwp) ::  c  !< loop index
+    INTEGER(iwp) ::  ss !<index: start 
+!          
+!-- Subrange 2a:
+    ss = ( ispec - 1 ) * nbins + in2a
+    ee = ( ispec - 1 ) * nbins + fn2a
+    b = in2a
+    DO c = ss, ee
+       IF ( nsource(b) /= fillval )  THEN
+          aerosol_mass(c)%source(k,j,i) = aerosol_mass(c)%source(k,j,i) +      &
+                                       mass_frac * nsource(b) * aero(b)%core * &
+                                       prho 
+       ENDIF
+       b = b+1
+    ENDDO
+!          
+!-- Subrange 2b:
+    IF ( .NOT. no_insoluble )  THEN
+       WRITE(*,*) 'All sources are soluble!'
+    ENDIF
+    
+ END SUBROUTINE set_mass_source 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for salsa.
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_check_data_output( var, unit )
+ 
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit     !< 
+    CHARACTER (LEN=*) ::  var      !< 
+
+    SELECT CASE ( TRIM( var ) )
+          
+       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV',               &
+              'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4',  'N_bin5',  'N_bin6',    &
+              'N_bin7', 'N_bin8', 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12',   &
+              'Ntot' )
+          IF (  .NOT.  salsa )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                       'res salsa = .TRUE.'
+             CALL message( 'check_parameters', 'SA0006', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = '#/m3'
+          
+       CASE ( 'LDSA' )
+          IF (  .NOT.  salsa )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                       'res salsa = .TRUE.'
+             CALL message( 'check_parameters', 'SA0003', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'mum2/cm3'          
+          
+       CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4',  'm_bin5',  'm_bin6',    &
+              'm_bin7', 'm_bin8', 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12',   &
+              'PM2.5',  'PM10',   's_BC',   's_DU',    's_H2O',   's_NH',      &
+              's_NO',   's_OC',   's_SO4',  's_SS' )
+          IF (  .NOT.  salsa )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                       'res salsa = .TRUE.'
+             CALL message( 'check_parameters', 'SA0001', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'kg/m3'
+             
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+ END SUBROUTINE salsa_check_data_output
+ 
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_3d_data_averaging( mode, variable )
+ 
+
+    USE control_parameters
+
+    USE indices
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode       !< 
+    CHARACTER (LEN=*) ::  variable   !< 
+
+    INTEGER(iwp) ::  b   !<     
+    INTEGER(iwp) ::  c   !<
+    INTEGER(iwp) ::  i   !<
+    INTEGER(iwp) ::  icc !<
+    INTEGER(iwp) ::  j   !< 
+    INTEGER(iwp) ::  k   !< 
+    
+    REAL(wp) ::  df       !< For calculating LDSA: fraction of particles 
+                          !< depositing in the alveolar (or tracheobronchial)
+                          !< region of the lung. Depends on the particle size 
+    REAL(wp) ::  mean_d   !< Particle diameter in micrometres
+    REAL(wp) ::  nc       !< Particle number concentration in units 1/cm**3
+    REAL(wp) ::  temp_bin !<
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to 
+                                                     !< selected output variable
+    
+    temp_bin = 0.0_wp
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+       
+          CASE ( 'g_H2SO4' )
+             IF ( .NOT. ALLOCATED( g_H2SO4_av ) )  THEN
+                ALLOCATE( g_H2SO4_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             g_H2SO4_av = 0.0_wp
+             
+          CASE ( 'g_HNO3' )
+             IF ( .NOT. ALLOCATED( g_HNO3_av ) )  THEN
+                ALLOCATE( g_HNO3_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             g_HNO3_av = 0.0_wp
+             
+          CASE ( 'g_NH3' )
+             IF ( .NOT. ALLOCATED( g_NH3_av ) )  THEN
+                ALLOCATE( g_NH3_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             g_NH3_av = 0.0_wp
+             
+          CASE ( 'g_OCNV' )
+             IF ( .NOT. ALLOCATED( g_OCNV_av ) )  THEN
+                ALLOCATE( g_OCNV_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             g_OCNV_av = 0.0_wp
+             
+          CASE ( 'g_OCSV' )
+             IF ( .NOT. ALLOCATED( g_OCSV_av ) )  THEN
+                ALLOCATE( g_OCSV_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             g_OCSV_av = 0.0_wp             
+             
+          CASE ( 'LDSA' )
+             IF ( .NOT. ALLOCATED( LDSA_av ) )  THEN
+                ALLOCATE( LDSA_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             LDSA_av = 0.0_wp
+             
+          CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6',   &
+                 'N_bin7', 'N_bin8', 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
+             IF ( .NOT. ALLOCATED( Nbins_av ) )  THEN
+                ALLOCATE( Nbins_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins) )
+             ENDIF
+             Nbins_av = 0.0_wp
+             
+          CASE ( 'Ntot' )
+             IF ( .NOT. ALLOCATED( Ntot_av ) )  THEN
+                ALLOCATE( Ntot_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             Ntot_av = 0.0_wp
+             
+          CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6',   &
+                 'm_bin7', 'm_bin8', 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
+             IF ( .NOT. ALLOCATED( mbins_av ) )  THEN
+                ALLOCATE( mbins_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg,nbins) )
+             ENDIF
+             mbins_av = 0.0_wp
+             
+          CASE ( 'PM2.5' )
+             IF ( .NOT. ALLOCATED( PM25_av ) )  THEN
+                ALLOCATE( PM25_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             PM25_av = 0.0_wp
+             
+          CASE ( 'PM10' )
+             IF ( .NOT. ALLOCATED( PM10_av ) )  THEN
+                ALLOCATE( PM10_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             PM10_av = 0.0_wp
+             
+          CASE ( 's_BC' )
+             IF ( .NOT. ALLOCATED( s_BC_av ) )  THEN
+                ALLOCATE( s_BC_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_BC_av = 0.0_wp
+          
+          CASE ( 's_DU' )
+             IF ( .NOT. ALLOCATED( s_DU_av ) )  THEN
+                ALLOCATE( s_DU_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_DU_av = 0.0_wp
+             
+          CASE ( 's_H2O' )
+             IF ( .NOT. ALLOCATED( s_H2O_av ) )  THEN
+                ALLOCATE( s_H2O_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_H2O_av = 0.0_wp
+             
+          CASE ( 's_NH' )
+             IF ( .NOT. ALLOCATED( s_NH_av ) )  THEN
+                ALLOCATE( s_NH_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_NH_av = 0.0_wp
+             
+          CASE ( 's_NO' )
+             IF ( .NOT. ALLOCATED( s_NO_av ) )  THEN
+                ALLOCATE( s_NO_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_NO_av = 0.0_wp
+             
+          CASE ( 's_OC' )
+             IF ( .NOT. ALLOCATED( s_OC_av ) )  THEN
+                ALLOCATE( s_OC_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_OC_av = 0.0_wp
+             
+          CASE ( 's_SO4' )
+             IF ( .NOT. ALLOCATED( s_SO4_av ) )  THEN
+                ALLOCATE( s_SO4_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_SO4_av = 0.0_wp   
+          
+          CASE ( 's_SS' )
+             IF ( .NOT. ALLOCATED( s_SS_av ) )  THEN
+                ALLOCATE( s_SS_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             s_SS_av = 0.0_wp
+          
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+       
+          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
+             IF ( TRIM( variable(3:) ) == 'H2SO4' )  THEN
+                icc = 1
+                to_be_resorted => g_H2SO4_av
+             ELSEIF ( TRIM( variable(3:) ) == 'HNO3' )  THEN
+                icc = 2
+                to_be_resorted => g_HNO3_av   
+             ELSEIF ( TRIM( variable(3:) ) == 'NH3' )  THEN
+                icc = 3
+                to_be_resorted => g_NH3_av   
+             ELSEIF ( TRIM( variable(3:) ) == 'OCNV' )  THEN
+                icc = 4
+                to_be_resorted => g_OCNV_av   
+             ELSEIF ( TRIM( variable(3:) ) == 'OCSV' )  THEN
+                icc = 5
+                to_be_resorted => g_OCSV_av        
+             ENDIF
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +         &
+                                              salsa_gas(icc)%conc(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'LDSA' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  b = 1, nbins 
+!                      
+!--                      Diameter in micrometres
+                         mean_d = 1.0E+6_wp * Ra_dry(k,j,i,b) * 2.0_wp
+!                               
+!--                      Deposition factor: alveolar (use Ra_dry)                              
+                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp *     &
+                                ( LOG( mean_d ) + 2.84_wp )**2.0_wp )          &
+                                  + 19.11_wp * EXP( -0.482_wp *                &
+                                  ( LOG( mean_d ) - 1.362_wp )**2.0_wp ) )
+!                                    
+!--                      Number concentration in 1/cm3
+                         nc = 1.0E-6_wp * aerosol_number(b)%conc(k,j,i)    
+!                         
+!--                      Lung-deposited surface area LDSA (units mum2/cm3)                            
+                         temp_bin = temp_bin + pi * mean_d**2.0_wp * df * nc
+                      ENDDO
+                      LDSA_av(k,j,i) = LDSA_av(k,j,i) + temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6',   &
+                 'N_bin7', 'N_bin8', 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      DO  b = 1, nbins 
+                         Nbins_av(k,j,i,b) = Nbins_av(k,j,i,b) +               &
+                                             aerosol_number(b)%conc(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+          
+          CASE ( 'Ntot' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      DO  b = 1, nbins 
+                         Ntot_av(k,j,i) = Ntot_av(k,j,i) +                     &
+                                          aerosol_number(b)%conc(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6',   &
+                 'm_bin7', 'm_bin8', 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      DO  b = 1, nbins 
+                         DO  c = b, nbins*ncc_tot, nbins
+                            mbins_av(k,j,i,b) = mbins_av(k,j,i,b) +            &
+                                                aerosol_mass(c)%conc(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'PM2.5' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  b = 1, nbins
+                         IF ( 2.0_wp * Ra_dry(k,j,i,b) <= 2.5E-6_wp )  THEN
+                            DO  c = b, nbins*ncc, nbins
+                               temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                            ENDDO
+                         ENDIF
+                      ENDDO
+                      PM25_av(k,j,i) = PM25_av(k,j,i) + temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'PM10' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  b = 1, nbins
+                         IF ( 2.0_wp * Ra_dry(k,j,i,b) <= 10.0E-6_wp )  THEN
+                            DO  c = b, nbins*ncc, nbins
+                               temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                            ENDDO
+                         ENDIF
+                      ENDDO
+                      PM10_av(k,j,i) = PM10_av(k,j,i) + temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 's_BC', 's_DU', 's_H2O', 's_NH', 's_NO', 's_OC', 's_SO4',     &
+                 's_SS' )
+             IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
+                icc = get_index( prtcl, TRIM( variable(3:) ) )
+                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_BC_av
+                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_DU_av   
+                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_NH_av   
+                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_NO_av   
+                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_OC_av   
+                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_SO4_av   
+                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_SS_av       
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         DO  c = ( icc-1 )*nbins+1, icc*nbins 
+                            to_be_resorted(k,j,i) = to_be_resorted(k,j,i) +    &
+                                                    aerosol_mass(c)%conc(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+             
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+       
+          CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV', 'g_OCSV' )
+             IF ( TRIM( variable(3:) ) == 'H2SO4' )  THEN
+                icc = 1
+                to_be_resorted => g_H2SO4_av
+             ELSEIF ( TRIM( variable(3:) ) == 'HNO3' )  THEN
+                icc = 2
+                to_be_resorted => g_HNO3_av   
+             ELSEIF ( TRIM( variable(3:) ) == 'NH3' )  THEN
+                icc = 3
+                to_be_resorted => g_NH3_av   
+             ELSEIF ( TRIM( variable(3:) ) == 'OCNV' )  THEN
+                icc = 4
+                to_be_resorted => g_OCNV_av   
+             ELSEIF ( TRIM( variable(3:) ) == 'OCSV' )  THEN
+                icc = 5
+                to_be_resorted => g_OCSV_av        
+             ENDIF
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      to_be_resorted(k,j,i) = to_be_resorted(k,j,i)            &
+                                             / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'LDSA' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      LDSA_av(k,j,i) = LDSA_av(k,j,i)                          &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'N_bin1', 'N_bin2', 'N_bin3', 'N_bin4', 'N_bin5', 'N_bin6',   &
+                 'N_bin7', 'N_bin8', 'N_bin9', 'N_bin10', 'N_bin11', 'N_bin12' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      DO  b = 1, nbins 
+                         Nbins_av(k,j,i,b) = Nbins_av(k,j,i,b)                 &
+                                             / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'Ntot' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      Ntot_av(k,j,i) = Ntot_av(k,j,i)                          &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'm_bin1', 'm_bin2', 'm_bin3', 'm_bin4', 'm_bin5', 'm_bin6',   &
+                 'm_bin7', 'm_bin8', 'm_bin9', 'm_bin10', 'm_bin11', 'm_bin12' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      DO  b = 1, nbins 
+                         DO  c = b, nbins*ncc, nbins
+                            mbins_av(k,j,i,b) = mbins_av(k,j,i,b)              &
+                                             / REAL( average_count_3d, KIND=wp )
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'PM2.5' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      PM25_av(k,j,i) = PM25_av(k,j,i)                          &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 'PM10' )
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt+1
+                      PM10_av(k,j,i) = PM10_av(k,j,i)                          &
+                                        / REAL( average_count_3d, KIND=wp )
+                   ENDDO
+                ENDDO
+             ENDDO
+             
+          CASE ( 's_BC', 's_DU', 's_H2O', 's_NH', 's_NO', 's_OC', 's_SO4',     &
+                 's_SS' )
+             IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
+                icc = get_index( prtcl, TRIM( variable(3:) ) )
+                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_BC_av
+                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_DU_av   
+                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_NH_av   
+                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_NO_av   
+                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_OC_av   
+                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_SO4_av   
+                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_SS_av 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         to_be_resorted(k,j,i) = to_be_resorted(k,j,i)         &
+                                             / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+       END SELECT
+
+    ENDIF
+
+ END SUBROUTINE salsa_3d_data_averaging
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 2D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_data_output_2d( av, variable, found, grid, mode,             &
+                                      local_pf, two_d )
+ 
+    USE indices
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid       !< 
+    CHARACTER (LEN=*) ::  mode       !< 
+    CHARACTER (LEN=*) ::  variable   !<
+    CHARACTER (LEN=5) ::  vari       !<  trimmed format of variable
+
+    INTEGER(iwp) ::  av   !< 
+    INTEGER(iwp) ::  b    !<
+    INTEGER(iwp) ::  c    !< 
+    INTEGER(iwp) ::  i    !<
+    INTEGER(iwp) ::  icc  !< index of a chemical compound
+    INTEGER(iwp) ::  j    !< 
+    INTEGER(iwp) ::  k    !< 
+
+    LOGICAL ::  found   !< 
+    LOGICAL ::  two_d   !< flag parameter that indicates 2D variables 
+                        !< (horizontal cross sections)
+    
+    REAL(wp) ::  df       !< For calculating LDSA: fraction of particles 
+                          !< depositing in the alveolar (or tracheobronchial)
+                          !< region of the lung. Depends on the particle size 
+    REAL(wp) ::  mean_d   !< Particle diameter in micrometres
+    REAL(wp) ::  nc       !< Particle number concentration in units 1/cm**3
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb:nzt+1) ::  local_pf !< local
+       !< array to which output data is resorted to
+    REAL(wp) ::  temp_bin !< 
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to 
+                                                     !< selected output variable
+    
+    found = .TRUE.
+    temp_bin  = 0.0_wp
+    
+    IF ( TRIM( variable(1:2) ) == 'g_' )  THEN
+       vari = TRIM( variable( 3:LEN( TRIM( variable ) ) - 3 ) )
+       IF ( av == 0 )  THEN
+          IF ( vari == 'H2SO4')  icc = 1
+          IF ( vari == 'HNO3')   icc = 2
+          IF ( vari == 'NH3')    icc = 3
+          IF ( vari == 'OCNV')   icc = 4
+          IF ( vari == 'OCSV')   icc = 5
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   local_pf(i,j,k) = MERGE( salsa_gas(icc)%conc(k,j,i),        &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          IF ( vari == 'H2SO4' )  to_be_resorted => g_H2SO4_av
+          IF ( vari == 'HNO3' )   to_be_resorted => g_HNO3_av   
+          IF ( vari == 'NH3' )    to_be_resorted => g_NH3_av   
+          IF ( vari == 'OCNV' )   to_be_resorted => g_OCNV_av   
+          IF ( vari == 'OCSV' )   to_be_resorted => g_OCSV_av        
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),             &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( mode == 'xy' )  grid = 'zu'
+
+    ELSEIF ( TRIM( variable(1:4) ) == 'LDSA' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   temp_bin = 0.0_wp
+                   DO  b = 1, nbins
+!                      
+!--                   Diameter in micrometres
+                      mean_d = 1.0E+6_wp * Ra_dry(k,j,i,b) * 2.0_wp 
+!                               
+!--                   Deposition factor: alveolar                               
+                      df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp * ( LOG( &
+                             mean_d ) + 2.84_wp )**2.0_wp ) + 19.11_wp * EXP(  &
+                            -0.482_wp * ( LOG( mean_d ) - 1.362_wp )**2.0_wp ) )
+!                                    
+!--                   Number concentration in 1/cm3
+                      nc = 1.0E-6_wp * aerosol_number(b)%conc(k,j,i)
+!                         
+!--                   Lung-deposited surface area LDSA (units mum2/cm3)                       
+                      temp_bin = temp_bin + pi * mean_d**2.0_wp * df * nc 
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin,  REAL( -999.0_wp,        &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   local_pf(i,j,k) = MERGE( LDSA_av(k,j,i), REAL( -999.0_wp,   &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( mode == 'xy' )  grid = 'zu'
+    
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin1' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(1)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,1),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin2' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(2)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,2),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin3' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(3)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,3),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin4' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(4)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,4),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin5' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(5)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,5),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin6' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(6)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,6),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin7' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(7)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,7),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin8' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(8)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,8),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'N_bin9' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(9)%conc(k,j,i),     &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,9),                 &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    
+    ELSEIF ( TRIM( variable(1:7) ) == 'N_bin10' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(10)%conc(k,j,i),    &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,10),                &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:7) ) == 'N_bin11' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(11)%conc(k,j,i),    &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,11),                &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:7) ) == 'N_bin12' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( aerosol_number(12)%conc(k,j,i),    &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,12),                &
+                                            REAL( -999.0_wp, KIND = wp ),      &
+                                            BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    
+    ELSEIF ( TRIM( variable(1:4) ) == 'Ntot' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   temp_bin = 0.0_wp
+                   DO  b = 1, nbins
+                      temp_bin = temp_bin + aerosol_number(b)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   local_pf(i,j,k) = MERGE( Ntot_av(k,j,i), REAL( -999.0_wp,   &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( mode == 'xy' )  grid = 'zu'
+    
+    
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin1' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 1, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,1), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin2' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 2, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,2), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin3' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 3, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,3), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin4' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 4, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,4), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin5' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 5, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,5), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin6' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 6, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,6), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin7' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 7, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,7), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin8' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 8, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,8), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:6) ) == 'm_bin9' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 9, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,9), REAL( -999.0_wp,&
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:7) ) == 'm_bin10' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 10, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,10), REAL(          &
+                       -999.0_wp, KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:7) ) == 'm_bin11' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 11, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,11), REAL(          &
+                       -999.0_wp, KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+       
+    ELSEIF ( TRIM( variable(1:7) ) == 'm_bin12' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1   
+                   temp_bin = 0.0_wp
+                   DO  c = 12, ncc_tot*nbins, nbins
+                      temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1                      
+                   local_pf(i,j,k) = MERGE( mbins_av(k,j,i,12), REAL(          &
+                       -999.0_wp, KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+    
+    ELSEIF ( TRIM( variable(1:5) ) == 'PM2.5' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   temp_bin = 0.0_wp
+                   DO  b = 1, nbins
+                      IF ( 2.0_wp * Ra_dry(k,j,i,b) <= 2.5E-6_wp )  THEN
+                         DO  c = b, nbins*ncc, nbins
+                            temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                         ENDDO
+                      ENDIF
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,         &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   local_pf(i,j,k) = MERGE( PM25_av(k,j,i), REAL( -999.0_wp,   &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( mode == 'xy' )  grid = 'zu'
+    
+    
+    ELSEIF ( TRIM( variable(1:4) ) == 'PM10' )  THEN
+       IF ( av == 0 )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   temp_bin = 0.0_wp
+                   DO  b = 1, nbins
+                      IF ( 2.0_wp * Ra_dry(k,j,i,b) <= 10.0E-6_wp )  THEN
+                         DO  c = b, nbins*ncc, nbins
+                            temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                         ENDDO
+                      ENDIF
+                   ENDDO
+                   local_pf(i,j,k) = MERGE( temp_bin,  REAL( -999.0_wp,        &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ELSE
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb, nzt+1
+                   local_pf(i,j,k) = MERGE( PM10_av(k,j,i), REAL( -999.0_wp,   &
+                                 KIND = wp ),  BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+       IF ( mode == 'xy' )  grid = 'zu'
+    
+    ELSEIF ( TRIM( variable(1:2) ) == 's_' )  THEN
+       vari = TRIM( variable( 3:LEN( TRIM( variable ) ) - 3 ) )
+       IF ( is_used( prtcl, vari ) )  THEN
+          icc = get_index( prtcl, vari )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  c = ( icc-1 )*nbins+1, icc*nbins, 1
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin, REAL( -999.0_wp,      &
+                                  KIND = wp ), BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( vari == 'BC' )   to_be_resorted => s_BC_av
+             IF ( vari == 'DU' )   to_be_resorted => s_DU_av   
+             IF ( vari == 'NH' )   to_be_resorted => s_NH_av   
+             IF ( vari == 'NO' )   to_be_resorted => s_NO_av   
+             IF ( vari == 'OC' )   to_be_resorted => s_OC_av   
+             IF ( vari == 'SO4' )  to_be_resorted => s_SO4_av   
+             IF ( vari == 'SS' )   to_be_resorted => s_SS_av       
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),          &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ELSE
+          local_pf = 0.0_wp 
+       ENDIF
+
+       IF ( mode == 'xy' )  grid = 'zu'
+       
+    ELSE
+       found = .FALSE.
+       grid  = 'none'
+    
+    ENDIF
+ 
+ END SUBROUTINE salsa_data_output_2d
+
+ 
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 3D output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_data_output_3d( av, variable, found, local_pf )
+
+    USE indices
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(in) ::  variable   !< 
+    
+    INTEGER(iwp) ::  av   !< 
+    INTEGER(iwp) ::  c    !<
+    INTEGER(iwp) ::  i    !<
+    INTEGER(iwp) ::  icc  !< index of a chemical compound
+    INTEGER(iwp) ::  j    !< 
+    INTEGER(iwp) ::  k    !< 
+    INTEGER(iwp) ::  n    !<
+
+    LOGICAL ::  found   !< 
+    REAL(wp) ::  df       !< For calculating LDSA: fraction of particles 
+                          !< depositing in the alveolar (or tracheobronchial)
+                          !< region of the lung. Depends on the particle size 
+    REAL(wp) ::  mean_d   !< Particle diameter in micrometres
+    REAL(wp) ::  nc       !< Particle number concentration in units 1/cm**3
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb:nzt+1) ::  local_pf  !< local
+                                  !< array to which output data is resorted to
+    REAL(wp) ::  temp_bin  !< 
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to 
+                                                     !< selected output variable
+       
+    found     = .TRUE.
+    temp_bin  = 0.0_wp
+    
+    SELECT CASE ( TRIM( variable ) )
+    
+       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
+          IF ( av == 0 )  THEN
+             IF ( TRIM( variable ) == 'g_H2SO4')  icc = 1
+             IF ( TRIM( variable ) == 'g_HNO3')   icc = 2
+             IF ( TRIM( variable ) == 'g_NH3')    icc = 3
+             IF ( TRIM( variable ) == 'g_OCNV')   icc = 4
+             IF ( TRIM( variable ) == 'g_OCSV')   icc = 5
+             
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( salsa_gas(icc)%conc(k,j,i),     &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( TRIM( variable(3:) ) == 'H2SO4' ) to_be_resorted => g_H2SO4_av
+             IF ( TRIM( variable(3:) ) == 'HNO3' )  to_be_resorted => g_HNO3_av   
+             IF ( TRIM( variable(3:) ) == 'NH3' )   to_be_resorted => g_NH3_av   
+             IF ( TRIM( variable(3:) ) == 'OCNV' )  to_be_resorted => g_OCNV_av   
+             IF ( TRIM( variable(3:) ) == 'OCSV' )  to_be_resorted => g_OCSV_av 
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),          &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'LDSA' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+!                      
+!--                      Diameter in micrometres
+                         mean_d = 1.0E+6_wp * Ra_dry(k,j,i,n) * 2.0_wp 
+!                               
+!--                      Deposition factor: alveolar                             
+                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp *     &
+                                ( LOG( mean_d ) + 2.84_wp )**2.0_wp )          &
+                                  + 19.11_wp * EXP( -0.482_wp *                &
+                                  ( LOG( mean_d ) - 1.362_wp )**2.0_wp ) )
+!                                    
+!--                      Number concentration in 1/cm3
+                         nc = 1.0E-6_wp * aerosol_number(n)%conc(k,j,i)
+!                         
+!--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                         temp_bin = temp_bin + pi * mean_d**2.0_wp * df * nc 
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( LDSA_av(k,j,i),                 &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'Ntot' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins                         
+                         temp_bin = temp_bin + aerosol_number(n)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( Ntot_av(k,j,i),                 &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'PM2.5' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+                         IF ( 2.0_wp * Ra_dry(k,j,i,n) <= 2.5E-6_wp )  THEN
+                            DO  c = n, nbins*ncc, nbins
+                               temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                            ENDDO
+                         ENDIF
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( PM25_av(k,j,i),                 &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'PM10' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+                         IF ( 2.0_wp * Ra_dry(k,j,i,n) <= 10.0E-6_wp )  THEN
+                            DO  c = n, nbins*ncc, nbins
+                               temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                            ENDDO
+                         ENDIF
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1
+                      local_pf(i,j,k) = MERGE( PM10_av(k,j,i),                 &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin1' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(1)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,1),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin2' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1 
+                      local_pf(i,j,k) = MERGE( aerosol_number(2)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,2),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin3' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(3)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,3),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin4' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1    
+                      local_pf(i,j,k) = MERGE( aerosol_number(4)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,4),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin5' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(5)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,5),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin6' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(6)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,6),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin7' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(7)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,7),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin8' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                  
+                      local_pf(i,j,k) = MERGE( aerosol_number(8)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,8),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin9' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(9)%conc(k,j,i),  &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,9),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin10' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(10)%conc(k,j,i), &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,10),             &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin11' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(11)%conc(k,j,i), &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,11),             &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin12' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( aerosol_number(12)%conc(k,j,i), &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( Nbins_av(k,j,i,12),             &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin1' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 1, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,1),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin2' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 2, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,2),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin3' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 3, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,3),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin4' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 4, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,4),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin5' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 5, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,5),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin6' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 6, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,6),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin7' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 7, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,7),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin8' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 8, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,8),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin9' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 9, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,9),              &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin10' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 10, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,10),             &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin11' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 11, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,11),             &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin12' )
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1   
+                      temp_bin = 0.0_wp
+                      DO  c = 12, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                      ENDDO
+                      local_pf(i,j,k) = MERGE( temp_bin,                       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb, nzt+1                      
+                      local_pf(i,j,k) = MERGE( mbins_av(k,j,i,12),             &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+                 
+       CASE ( 's_BC', 's_DU', 's_H2O', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+          IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
+             icc = get_index( prtcl, TRIM( variable(3:) ) )
+             IF ( av == 0 )  THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         temp_bin = 0.0_wp
+                         DO  c = ( icc-1 )*nbins+1, icc*nbins                          
+                            temp_bin = temp_bin + aerosol_mass(c)%conc(k,j,i)
+                         ENDDO
+                         local_pf(i,j,k) = MERGE( temp_bin,                    &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_BC_av
+                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_DU_av   
+                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_NH_av   
+                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_NO_av   
+                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_OC_av   
+                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_SO4_av   
+                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_SS_av 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1                      
+                         local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),       &
+                                               REAL( -999.0_wp, KIND = wp ),   &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) ) 
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+ END SUBROUTINE salsa_data_output_3d
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining mask output variables
+!------------------------------------------------------------------------------!
+ SUBROUTINE salsa_data_output_mask( av, variable, found, local_pf )
+ 
+    USE control_parameters,                                                    &
+        ONLY:  mask_size_l, mid
+ 
+    IMPLICIT NONE
+    
+    CHARACTER (LEN=*) ::  variable   !< 
+
+    INTEGER(iwp) ::  av   !< 
+    INTEGER(iwp) ::  c    !<
+    INTEGER(iwp) ::  i    !<
+    INTEGER(iwp) ::  icc  !< index of a chemical compound
+    INTEGER(iwp) ::  j    !< 
+    INTEGER(iwp) ::  k    !< 
+    INTEGER(iwp) ::  n    !<
+
+    LOGICAL  ::  found    !< 
+    REAL(wp) ::  df       !< For calculating LDSA: fraction of particles 
+                          !< depositing in the alveolar (or tracheobronchial)
+                          !< region of the lung. Depends on the particle size 
+    REAL(wp) ::  mean_d       !< Particle diameter in micrometres
+    REAL(wp) ::  nc       !< Particle number concentration in units 1/cm**3
+
+    REAL(wp),                                                                  &
+       DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
+          local_pf   !< 
+    REAL(wp) ::  temp_bin   !< 
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to 
+                                                     !< selected output variable
+
+    found     = .TRUE.
+    temp_bin  = 0.0_wp
+
+    SELECT CASE ( TRIM( variable ) )
+    
+       CASE ( 'g_H2SO4', 'g_HNO3', 'g_NH3', 'g_OCNV',  'g_OCSV' )
+          IF ( av == 0 )  THEN
+             IF ( TRIM( variable ) == 'g_H2SO4')  icc = 1
+             IF ( TRIM( variable ) == 'g_HNO3')   icc = 2
+             IF ( TRIM( variable ) == 'g_NH3')    icc = 3
+             IF ( TRIM( variable ) == 'g_OCNV')   icc = 4
+             IF ( TRIM( variable ) == 'g_OCSV')   icc = 5
+             
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      local_pf(i,j,k) = salsa_gas(icc)%conc(mask_k(mid,k),     &
+                                                    mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             IF ( TRIM( variable(3:) ) == 'H2SO4' ) to_be_resorted => g_H2SO4_av
+             IF ( TRIM( variable(3:) ) == 'HNO3' )  to_be_resorted => g_HNO3_av   
+             IF ( TRIM( variable(3:) ) == 'NH3' )   to_be_resorted => g_NH3_av   
+             IF ( TRIM( variable(3:) ) == 'OCNV' )  to_be_resorted => g_OCNV_av   
+             IF ( TRIM( variable(3:) ) == 'OCSV' )  to_be_resorted => g_OCSV_av 
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      local_pf(i,j,k) = to_be_resorted(mask_k(mid,k),          &
+                                                    mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'LDSA' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+!                      
+!--                      Diameter in micrometres
+                         mean_d = 1.0E+6_wp * Ra_dry(mask_k(mid,k),            &
+                                       mask_j(mid,j),mask_i(mid,i),n) * 2.0_wp
+!                               
+!--                      Deposition factor: alveolar (use Ra_dry for the size??)                                
+                         df = ( 0.01555_wp / mean_d ) * ( EXP( -0.416_wp *     &
+                                ( LOG( mean_d ) + 2.84_wp )**2.0_wp )          &
+                                  + 19.11_wp * EXP( -0.482_wp *                &
+                                  ( LOG( mean_d ) - 1.362_wp )**2.0_wp ) )
+!                                    
+!--                      Number concentration in 1/cm3
+                         nc = 1.0E-6_wp * aerosol_number(n)%conc(mask_k(mid,k),&
+                                                    mask_j(mid,j),mask_i(mid,i))
+!                         
+!--                      Lung-deposited surface area LDSA (units mum2/cm3)
+                         temp_bin = temp_bin + pi * mean_d**2.0_wp * df * nc 
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = LDSA_av(mask_k(mid,k),                &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'Ntot' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+                         temp_bin = temp_bin + aerosol_number(n)%conc(         &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Ntot_av(mask_k(mid,k),                &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'PM2.5' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+                         IF ( 2.0_wp * Ra_dry(mask_k(mid,k),mask_j(mid,j),     &
+                              mask_i(mid,i),n) <= 2.5E-6_wp )  THEN
+                            DO  c = n, nbins*ncc, nbins
+                               temp_bin = temp_bin + aerosol_mass(c)%conc(     &
+                                     mask_k(mid,k), mask_j(mid,j),mask_i(mid,i))
+                            ENDDO
+                         ENDIF
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = PM25_av(mask_k(mid,k),                &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'PM10' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  n = 1, nbins
+                         IF ( 2.0_wp * Ra_dry(mask_k(mid,k),mask_j(mid,j),     &
+                              mask_i(mid,i),n) <= 10.0E-6_wp )  THEN
+                            DO  c = n, nbins*ncc, nbins
+                               temp_bin = temp_bin + aerosol_mass(c)%conc(     &
+                                      mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                            ENDDO
+                         ENDIF
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = PM10_av(mask_k(mid,k),                &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin1' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(1)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),1)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin2' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(2)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),2)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin3' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(3)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),3)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin4' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(4)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),4)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin5' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(5)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i))
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),5)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin6' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(6)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),6)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin7' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(7)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),7)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin8' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(8)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),8)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin9' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(9)%conc(mask_k(mid,k),  &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),9)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin10' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(10)%conc(mask_k(mid,k), &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                 mask_j(mid,j),mask_i(mid,i),10)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'N_bin11' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(11)%conc(mask_k(mid,k), &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                 mask_j(mid,j),mask_i(mid,i),11)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'N_bin12' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)                      
+                      local_pf(i,j,k) = aerosol_number(12)%conc(mask_k(mid,k), &
+                                                 mask_j(mid,j),mask_i(mid,i)) 
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = Nbins_av(mask_k(mid,k),               &
+                                                 mask_j(mid,j),mask_i(mid,i),12)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin1' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 1, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),1)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin2' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 2, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),2)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin3' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 3, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),3)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin4' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 4, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),4)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin5' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 5, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),5)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin6' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 6, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),6)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin7' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 7, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),7)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin8' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 8, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),8)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin9' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 9, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                  mask_j(mid,j),mask_i(mid,i),9)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       
+       CASE ( 'm_bin10' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 10, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                 mask_j(mid,j),mask_i(mid,i),10)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin11' )
+         IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 11, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                 mask_j(mid,j),mask_i(mid,i),11)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 'm_bin12' )
+          IF ( av == 0 )  THEN
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                      temp_bin = 0.0_wp
+                      DO  c = 12, ncc_tot*nbins, nbins
+                         temp_bin = temp_bin + aerosol_mass(c)%conc(           &
+                                    mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                      local_pf(i,j,k) = temp_bin
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSE
+             DO  i = 1, mask_size_l(mid,1)
+                DO  j = 1, mask_size_l(mid,2)
+                   DO  k = 1, mask_size_l(mid,3)
+                       local_pf(i,j,k) = mbins_av(mask_k(mid,k),               &
+                                                 mask_j(mid,j),mask_i(mid,i),12)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+          
+       CASE ( 's_BC', 's_DU', 's_NH', 's_NO', 's_OC', 's_SO4', 's_SS' )
+          IF ( is_used( prtcl, TRIM( variable(3:) ) ) )  THEN
+             icc = get_index( prtcl, TRIM( variable(3:) ) )
+             IF ( av == 0 )  THEN
+                DO  i = 1, mask_size_l(mid,1)
+                   DO  j = 1, mask_size_l(mid,2)
+                      DO  k = 1, mask_size_l(mid,3)
+                         temp_bin = 0.0_wp
+                         DO  c = ( icc-1 )*nbins+1, icc*nbins 
+                            temp_bin = temp_bin + aerosol_mass(c)%conc(        &
+                                      mask_k(mid,k),mask_j(mid,j),mask_i(mid,i))
+                         ENDDO
+                         local_pf(i,j,k) = temp_bin
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ELSE
+                IF ( TRIM( variable(3:) ) == 'BC' )   to_be_resorted => s_BC_av
+                IF ( TRIM( variable(3:) ) == 'DU' )   to_be_resorted => s_DU_av   
+                IF ( TRIM( variable(3:) ) == 'NH' )   to_be_resorted => s_NH_av   
+                IF ( TRIM( variable(3:) ) == 'NO' )   to_be_resorted => s_NO_av   
+                IF ( TRIM( variable(3:) ) == 'OC' )   to_be_resorted => s_OC_av   
+                IF ( TRIM( variable(3:) ) == 'SO4' )  to_be_resorted => s_SO4_av   
+                IF ( TRIM( variable(3:) ) == 'SS' )   to_be_resorted => s_SS_av 
+                DO  i = 1, mask_size_l(mid,1)
+                   DO  j = 1, mask_size_l(mid,2)
+                      DO  k = 1, mask_size_l(mid,3)                   
+                         local_pf(i,j,k) = to_be_resorted(mask_k(mid,k),       &
+                                                    mask_j(mid,j),mask_i(mid,i))
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+          ENDIF
+       
+       CASE DEFAULT
+          found = .FALSE.
+    
+    END SELECT
+    
+ END SUBROUTINE salsa_data_output_mask
+ 
+
+ END MODULE salsa_mod
Index: /palm/tags/release-6.0/SOURCE/salsa_util_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/salsa_util_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/salsa_util_mod.f90	(revision 3477)
@@ -0,0 +1,194 @@
+!> @file salsa_util_mod.f90
+!--------------------------------------------------------------------------------!
+! This file is part of PALM-4U.
+!
+! PALM-4U is free software: you can redistribute it and/or modify it under the 
+! terms of the GNU General Public License as published by the Free Software 
+! Foundation, either version 3 of the License, or (at your option) any later 
+! version.
+!
+! PALM-4U is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision
+! 
+! 
+!
+! Authors:
+! --------
+! @author monakurppa
+!
+!
+! Description:
+! ------------
+!> Utility functions used in salsa_mod.
+!------------------------------------------------------------------------------!
+ MODULE salsa_util_mod
+ 
+    USE kinds
+    
+    USE pegrid
+    
+    IMPLICIT NONE
+    
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sums_salsa_ws_l !< subdomain sum 
+                                        !< of vertical passive salsa flux w's' 
+                                        !< (5th-order advection scheme only)
+
+!-- Component index
+    TYPE component_index
+       INTEGER(iwp) ::  ncomp !< Number of components
+       INTEGER(iwp), ALLOCATABLE ::  ind(:) !< Component index
+       CHARACTER(len=3), ALLOCATABLE ::  comp(:) !< Component name
+    END TYPE component_index 
+    
+    SAVE
+    
+    INTERFACE component_index_constructor
+       MODULE PROCEDURE component_index_constructor
+    END INTERFACE component_index_constructor
+    
+    INTERFACE get_index
+       MODULE PROCEDURE get_index
+    END INTERFACE get_index
+    
+    INTERFACE get_n_comp
+       MODULE PROCEDURE get_n_comp
+    END INTERFACE get_n_comp
+    
+    INTERFACE is_used
+       MODULE PROCEDURE is_used
+    END INTERFACE is_used
+    
+    PRIVATE
+    PUBLIC component_index, component_index_constructor, get_index, get_n_comp,&
+           is_used, sums_salsa_ws_l
+    
+ CONTAINS
+    
+!------------------------------------------------------------------------------!    
+! Description:
+! ------------
+!> Creates index tables for different (aerosol) components 
+!------------------------------------------------------------------------------!
+    SUBROUTINE component_index_constructor( SELF, ncomp, nlist, listcomp )
+
+       IMPLICIT NONE
+       
+       TYPE(component_index), INTENT(inout) ::  SELF !< Object containing the indices 
+                                                     !< of different aerosol components
+       INTEGER(iwp), INTENT(inout) ::  ncomp !< Number of components
+       INTEGER(iwp), INTENT(in) ::     nlist !< Maximum number of components
+       CHARACTER(len=3), INTENT(in) ::  listcomp(nlist) !< List cof component
+                                                        !< names
+       INTEGER(iwp) ::  i, jj
+       
+       ncomp = 0
+       
+       DO  WHILE ( listcomp(ncomp+1) /= '  ' .AND. ncomp < nlist )
+          ncomp = ncomp + 1
+       ENDDO
+       
+       SELF%ncomp = ncomp 
+       ALLOCATE( SELF%ind(ncomp), SELF%comp(ncomp) )
+       
+       DO i = 1, ncomp
+          SELF%ind(i) = i
+       ENDDO
+       
+       jj = 1
+       DO i = 1, nlist
+          IF ( listcomp(i) == '') CYCLE
+          SELF%comp(jj) = listcomp(i)
+          jj = jj+1
+       ENDDO
+       
+    END SUBROUTINE component_index_constructor
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Gives the index of a component in the component list
+!------------------------------------------------------------------------------!
+    INTEGER FUNCTION get_index( SELF, incomp )
+
+       IMPLICIT NONE
+       
+       TYPE(component_index), INTENT(in) ::  SELF !< Object containing the 
+                                                  !< indices of different 
+                                                  !< aerosol components
+       CHARACTER(len=*), INTENT(in) ::  incomp !< Component name
+       INTEGER(iwp) ::  i
+       
+       IF ( ANY(SELF%comp == incomp) ) THEN
+          i = 1
+          DO WHILE ( (SELF%comp(i) /= incomp) )
+             i = i+1
+          ENDDO
+          get_index = i
+       ELSEIF ( incomp == 'H2O' ) THEN
+          get_index = SELF%ncomp + 1
+       ELSE
+          STOP 'get_index: FAILED, no such component -'
+       ENDIF
+       
+       RETURN
+       
+    END FUNCTION get_index
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Get the number of (aerosol) components used
+!------------------------------------------------------------------------------!
+    INTEGER FUNCTION get_n_comp( SELF )
+
+       IMPLICIT NONE
+
+       TYPE(component_index), INTENT(in) ::  SELF !< Object containing the 
+                                                  !< indices of different 
+                                                  !< aerosol components
+       get_n_comp = SELF%ncomp
+       RETURN
+       
+    END FUNCTION
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Tells if the (aerosol) component is being used in the simulation
+!------------------------------------------------------------------------------!
+    LOGICAL FUNCTION is_used( SELF, icomp )
+
+       IMPLICIT NONE
+       
+       TYPE(component_index), INTENT(in) ::  SELF !< Object containing the 
+                                                  !< indices of different 
+                                                  !< aerosol components
+       CHARACTER(len=*), INTENT(in) ::  icomp !< Component name
+       
+       IF ( ANY(SELF%comp == icomp) ) THEN
+          is_used = .TRUE.
+       ELSE
+          is_used = .FALSE.
+       ENDIF
+       
+       RETURN
+       
+    END FUNCTION
+
+ END MODULE salsa_util_mod
Index: /palm/tags/release-6.0/SOURCE/set_slicer_attributes_dvrp.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/set_slicer_attributes_dvrp.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/set_slicer_attributes_dvrp.f90	(revision 3477)
@@ -0,0 +1,109 @@
+!> @file set_slicer_attributes_dvrp.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 305 2009-04-27 11:58:42Z raasch
+! Initial version
+!
+! Description:
+! ------------
+!> This routine sets the dvrp-slicer attributes
+!------------------------------------------------------------------------------!
+ SUBROUTINE set_slicer_attributes_dvrp( n_slicer )
+ 
+
+#if defined( __dvrp_graphics )
+
+    USE dvrp_variables,                                                        &
+        ONLY:  dvrp_colortable_entries, interval_h_dvrp, interval_values_dvrp, &
+               slicer_range_limits_dvrp
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  j         !<
+    INTEGER(iwp) ::  n_slicer  !<
+
+    REAL(wp)     ::  maxv      !<
+    REAL(wp)     ::  meav      !<
+    REAL(wp)     ::  minv      !<
+
+
+!
+!-- Set interval values to user settings.
+!-- The middle of this interval defines the change from blue to yellow
+    minv = slicer_range_limits_dvrp(1,n_slicer)
+    maxv = slicer_range_limits_dvrp(2,n_slicer)
+    meav = ( minv + maxv ) * 0.5_wp
+
+!
+!-- Create appropriate colortable with 100 entries.
+!-- This table ranges from deep blue (min) to deep red (max)
+    DO  j = 1, 50
+       interval_values_dvrp(1,j) = minv + (meav-minv) * ( j - 1.0_wp ) / 50.0_wp
+       interval_values_dvrp(2,j) = minv + (meav-minv) * ( j )          / 50.0_wp
+       interval_h_dvrp(:,j) = 270.0_wp - ( j - 1.0_wp ) * 90.0_wp / 49.0_wp
+    ENDDO
+
+    DO  j = 51, 100
+       interval_values_dvrp(1,j) = meav + (maxv-meav) * ( j - 51.0_wp ) / 50.0_wp
+       interval_values_dvrp(2,j) = meav + (maxv-meav) * ( j - 50.0_wp ) / 50.0_wp
+       interval_h_dvrp(:,j) = 70.0_wp - ( j - 51.0_wp ) * 90.0_wp / 49.0_wp
+    ENDDO
+
+    dvrp_colortable_entries = 100
+
+#endif
+
+ END SUBROUTINE set_slicer_attributes_dvrp
Index: /palm/tags/release-6.0/SOURCE/singleton_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/singleton_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/singleton_mod.f90	(revision 3477)
@@ -0,0 +1,1194 @@
+!> @file singleton_mod.f90
+!------------------------------------------------------------------------------!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+!
+! Revision 1.1  2002/05/02 18:56:59  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Multivariate Fast Fourier Transform
+!>
+!> Fortran 90 Implementation of Singleton's mixed-radix algorithm,
+!> RC Singleton, Stanford Research Institute, Sept. 1968.
+!>
+!> Adapted from fftn.c, translated from Fortran 66 to C by Mark Olesen and
+!> John Beale.
+!>
+!> Fourier transforms can be computed either in place, using assumed size
+!> arguments, or by generic function, using assumed shape arguments.
+!>
+!>
+!> Public:
+!>
+!>   fftkind                              kind parameter of complex arguments
+!>                                        and function results.
+!>
+!>   fft(array, dim, inv, stat)           generic transform function
+!>    COMPLEX(fftkind), DIMENSION(:,...,:), INTENT(IN)           :: array
+!>    INTEGER,          DIMENSION(:),       INTENT(IN),  OPTIONAL:: dim
+!>    LOGICAL,                              INTENT(IN),  OPTIONAL:: inv
+!>    INTEGER,                              INTENT(OUT), OPTIONAL:: stat
+!>
+!>   fftn(array, shape, dim, inv, stat)   in place transform subroutine
+!>    COMPLEX(fftkind), DIMENSION(*), INTENT(INOUT)        :: array
+!>    INTEGER,          DIMENSION(:), INTENT(IN)           :: shape
+!>    INTEGER,          DIMENSION(:), INTENT(IN),  OPTIONAL:: dim
+!>    LOGICAL,                        INTENT(IN),  OPTIONAL:: inv
+!>    INTEGER,                        INTENT(OUT), OPTIONAL:: stat
+!>
+!>
+!> Formal Parameters:
+!>
+!>   array    The complex array to be transformed. array can be of arbitrary
+!>            rank (i.e. up to seven).
+!>
+!>   shape    With subroutine fftn, the shape of the array to be transformed
+!>            has to be passed separately, since fftradix - the internal trans-
+!>            formation routine - will treat array always as one dimensional.
+!>            The product of elements in shape must be the number of
+!>            elements in array.
+!>            Although passing array with assumed shape would have been nicer,
+!>            I prefered assumed size in order to prevent the compiler from
+!>            using a copy-in-copy-out mechanism. That would generally be
+!>            necessary with fftn passing array to fftradix and with fftn
+!>            being prepared for accepting non consecutive array sections.
+!>            Using assumed size, it's up to the user to pass an array argu-
+!>            ment, that can be addressed as continous one dimensional array
+!>            without copying. Otherwise, transformation will not really be
+!>            performed in place.
+!>            On the other hand, since the rank of array and the size of
+!>            shape needn't match, fftn is appropriate for handling more than
+!>            seven dimensions.
+!>            As far as function fft is concerned all this doesn't matter,
+!>            because the argument will be copied anyway. Thus no extra
+!>            shape argument is needed for fft.
+!>
+!> Optional Parameters:
+!>
+!>   dim      One dimensional integer array, containing the dimensions to be
+!>            transformed. Default is (/1,...,N/) with N being the rank of
+!>            array, i.e. complete transform. dim can restrict transformation
+!>            to a subset of available dimensions. Its size must not exceed the
+!>            rank of array or the size of shape respectivly.
+!>
+!>   inv      If .true., inverse transformation will be performed. Default is
+!>            .false., i.e. forward transformation.
+!>
+!>   stat     If present, a system dependent nonzero status value will be
+!>            returned in stat, if allocation of temporary storage failed.
+!>
+!>
+!> Scaling:
+!>
+!>   Transformation results will always be scaled by the square root of the
+!>   product of sizes of each dimension in dim. (See examples below)
+!>
+!>
+!> Examples:
+!>
+!>   Let A be a L*M*N three dimensional complex array. Then
+!>
+!>     result = fft(A)
+!>
+!>   will produce a three dimensional transform, scaled by sqrt(L*M*N), while
+!>
+!>     call fftn(A, SHAPE(A))
+!>
+!>   will do the same in place.
+!>
+!>     result = fft(A, dim=(/1,3/))
+!>
+!>   will transform with respect to the first and the third dimension, scaled
+!>   by sqrt(L*N).
+!>
+!>     result = fft(fft(A), inv=.true.)
+!>
+!>   should (approximately) reproduce A.
+!>   With B having the same shape as A
+!>
+!>     result = fft(fft(A) * CONJG(fft(B)), inv=.true.)
+!>
+!>   will correlate A and B.
+!>
+!>
+!> Remarks:
+!>
+!>   Following changes have been introduced with respect to fftn.c:
+!>   - complex arguments and results are of type complex, rather than
+!>     real an imaginary part separately.
+!>   - increment parameter (magnitude of isign) has been dropped,
+!>     inc is always one, direction of transform is given by inv.     
+!>   - maxf and maxp have been dropped. The amount of temporary storage
+!>     needed is determined by the fftradix routine. Both fftn and fft
+!>     can handle any size of array. (Maybe they take a lot of time and
+!>     memory, but they will do it)
+!>
+!>   Redesigning fftradix in a way, that it handles assumed shape arrays
+!>   would have been desirable. However, I found it rather hard to do this
+!>   in an efficient way. Problems were:
+!>   - to prevent stride multiplications when indexing arrays. At least our
+!>     compiler was not clever enough to discover that in fact additions
+!>     would do the job as well. On the other hand, I haven't been clever
+!>     enough to find an implementation using array operations.
+!>   - fftradix is rather large and different versions would be necessaray
+!>     for each possible rank of array.
+!>   Consequently, in place transformation still needs the argument stored
+!>   in a consecutive bunch of memory and can't be performed on array
+!>   sections like A(100:199:-3, 50:1020). Calling fftn with such sections
+!>   will most probably imply copy-in-copy-out. However, the function fft
+!>   works with everything it gets and should be convenient to use.
+!>
+!> Michael Steffens, 09.12.96, <Michael.Steffens@mbox.muk.uni-hannover.de>
+!> Restructured fftradix for better optimization. M. Steffens, 4 June 1997
+!------------------------------------------------------------------------------!
+ MODULE singleton
+ 
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    PRIVATE
+    PUBLIC:: fft, fftn
+
+    REAL(wp), PARAMETER:: sin60 = 0.86602540378443865_wp
+    REAL(wp), PARAMETER:: cos72 = 0.30901699437494742_wp
+    REAL(wp), PARAMETER:: sin72 = 0.95105651629515357_wp
+    REAL(wp), PARAMETER:: pi    = 3.14159265358979323_wp
+
+    INTERFACE fft
+       MODULE PROCEDURE fft1d
+       MODULE PROCEDURE fft2d
+       MODULE PROCEDURE fft3d
+       MODULE PROCEDURE fft4d
+       MODULE PROCEDURE fft5d
+       MODULE PROCEDURE fft6d
+       MODULE PROCEDURE fft7d
+    END INTERFACE
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft1d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(:), INTENT(IN)           :: array
+    INTEGER(iwp), DIMENSION(:), INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),               INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                    INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), DIMENSION(SIZE(array, 1)):: ft
+
+    INTEGER(iwp)::  ishape(1)
+
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array )
+    CALL fftn(ft, ishape, inv = inv,  stat = stat)
+
+ END FUNCTION fft1d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft2d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(:,:), INTENT(IN)           :: array
+    INTEGER(iwp), DIMENSION(:),   INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),                 INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                      INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), DIMENSION(SIZE(array, 1), SIZE(array, 2)):: ft
+
+    INTEGER(iwp) ::  ishape(2)
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array )
+    CALL fftn(ft, ishape, dim, inv, stat)
+
+ END FUNCTION fft2d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft3d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(:,:,:), INTENT(IN)           :: array
+    INTEGER(iwp), DIMENSION(:),     INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),                   INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                        INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), &
+         DIMENSION(SIZE(array, 1), SIZE(array, 2), SIZE(array, 3)):: ft
+
+    INTEGER(iwp) ::  ishape(3)
+
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array)
+    CALL fftn(ft, ishape, dim, inv, stat)
+
+ END FUNCTION fft3d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft4d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(:,:,:,:), INTENT(IN)           :: array
+    INTEGER(iwp), DIMENSION(:),       INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),                     INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                          INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), DIMENSION( &
+         SIZE(array, 1), SIZE(array, 2), SIZE(array, 3), SIZE(array, 4)):: ft
+
+    INTEGER(iwp) ::  ishape(4)
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array )
+    CALL fftn(ft, ishape, dim, inv, stat)
+
+ END FUNCTION fft4d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft5d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(:,:,:,:,:), INTENT(IN)           :: array
+    INTEGER(iwp), DIMENSION(:),         INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),                       INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                            INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), DIMENSION( &
+         SIZE(array, 1), SIZE(array, 2), SIZE(array, 3), SIZE(array, 4), &
+         SIZE(array, 5)):: ft
+
+    INTEGER(iwp) ::  ishape(5)
+
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array )
+    CALL fftn(ft, ishape, dim, inv, stat)
+
+ END FUNCTION fft5d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft6d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(:,:,:,:,:,:), INTENT(IN)           :: array
+    INTEGER(iwp), DIMENSION(:),           INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),                         INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                              INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), DIMENSION( &
+         SIZE(array, 1), SIZE(array, 2), SIZE(array, 3), SIZE(array, 4), &
+         SIZE(array, 5), SIZE(array, 6)):: ft
+
+    INTEGER(iwp) ::  ishape(6)
+
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array )
+    CALL fftn(ft, ishape, dim, inv, stat)
+
+ END FUNCTION fft6d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing function description.
+!------------------------------------------------------------------------------!
+ FUNCTION fft7d(array, dim, inv, stat) RESULT(ft)
+!
+!-- Formal parameters
+    COMPLEX(wp), DIMENSION(:,:,:,:,:,:,:), INTENT(IN)           :: array
+    INTEGER(iwp),          DIMENSION(:),   INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),                          INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                               INTENT(IN),  OPTIONAL:: inv
+!
+!-- Function result
+    COMPLEX(wp), DIMENSION( &
+         SIZE(array, 1), SIZE(array, 2), SIZE(array, 3), SIZE(array, 4), &
+         SIZE(array, 5), SIZE(array, 6), SIZE(array, 7)):: ft
+
+    INTEGER(iwp) ::  ishape(7)
+
+!
+!-- Intrinsics used
+    INTRINSIC SIZE, SHAPE
+
+    ft = array
+    ishape = SHAPE( array )
+    CALL fftn(ft, ishape, dim, inv, stat)
+
+ END FUNCTION fft7d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE fftn(array, shape, dim, inv, stat)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(*), INTENT(INOUT)        :: array
+    INTEGER(iwp), DIMENSION(:), INTENT(IN)           :: shape
+    INTEGER(iwp), DIMENSION(:), INTENT(IN),  OPTIONAL:: dim
+    INTEGER(iwp),               INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                    INTENT(IN),  OPTIONAL:: inv
+!
+!-- Local arrays
+    INTEGER(iwp), DIMENSION(SIZE(shape)):: d
+!
+!-- Local scalars
+    LOGICAL      :: inverse
+    INTEGER(iwp) :: i, ndim, ntotal
+    REAL(wp):: scale
+!
+!-- Intrinsics used
+    INTRINSIC PRESENT, MIN, PRODUCT, SIZE, SQRT
+
+!
+!-- Optional parameter settings
+    IF (PRESENT(inv)) THEN
+       inverse = inv
+    ELSE
+       inverse = .FALSE.
+    END IF
+    IF (PRESENT(dim)) THEN
+       ndim = MIN(SIZE(dim), SIZE(d))
+       d(1:ndim) = DIM(1:ndim)
+    ELSE
+       ndim = SIZE(d)
+       d = (/(i, i = 1, SIZE(d))/)
+    END IF
+
+    ntotal = PRODUCT(shape)
+    scale = SQRT(1.0_wp / PRODUCT(shape(d(1:ndim))))
+    DO i = 1, ntotal
+       array(i) = CMPLX(REAL(array(i)) * scale, AIMAG(array(i)) * scale, &
+            KIND=wp)
+    END DO
+
+    DO i = 1, ndim
+       CALL fftradix(array, ntotal, shape(d(i)), PRODUCT(shape(1:d(i))), &
+            inverse, stat)
+       IF (PRESENT(stat)) THEN
+          IF (stat /=0) RETURN
+       END IF
+    END DO
+
+ END SUBROUTINE fftn
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE fftradix(array, ntotal, npass, nspan, inv, stat)
+!
+!-- Formal parameters
+    COMPLEX(wp),  DIMENSION(*), INTENT(INOUT)        :: array
+    INTEGER(iwp),               INTENT(IN)           :: ntotal, npass, nspan
+    INTEGER(iwp),               INTENT(OUT), OPTIONAL:: stat
+    LOGICAL,                    INTENT(IN)           :: inv
+!
+!-- Local arrays
+    COMPLEX(wp),  DIMENSION(:), ALLOCATABLE  :: ctmp
+    INTEGER(iwp), DIMENSION(BIT_SIZE(0))     :: factor
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE  :: perm
+    REAL(wp),     DIMENSION(:), ALLOCATABLE  :: sine, cosine
+!
+!-- Local scalars
+    INTEGER(iwp)         :: maxfactor, nfactor, nsquare, nperm
+!
+!-- Intrinsics used
+    INTRINSIC MAXVAL, MOD, PRESENT, ISHFT, BIT_SIZE, SIN, COS, &
+         CMPLX, REAL, AIMAG
+
+    IF (npass <= 1) RETURN
+
+    CALL factorize(npass, factor, nfactor, nsquare)
+
+    maxfactor = MAXVAL(factor(:nfactor))
+    IF (nfactor - ISHFT(nsquare, 1) > 0) THEN
+       nperm = MAX(nfactor + 1, PRODUCT(factor(nsquare+1: nfactor-nsquare)) - 1)
+    ELSE
+       nperm = nfactor + 1
+    END IF
+
+    IF (PRESENT(stat)) THEN
+       ALLOCATE(ctmp(maxfactor), sine(maxfactor), cosine(maxfactor), STAT=stat)
+       IF (stat /= 0) RETURN
+       CALL transform(array, ntotal, npass, nspan, &
+            factor, nfactor, ctmp, sine, cosine, inv)
+       DEALLOCATE(sine, cosine, STAT=stat)
+       IF (stat /= 0) RETURN
+       ALLOCATE(perm(nperm), STAT=stat)
+       IF (stat /= 0) RETURN
+       CALL permute(array, ntotal, npass, nspan, &
+            factor, nfactor, nsquare, maxfactor, &
+            ctmp, perm)
+       DEALLOCATE(perm, ctmp, STAT=stat)
+       IF (stat /= 0) RETURN
+    ELSE
+       ALLOCATE(ctmp(maxfactor), sine(maxfactor), cosine(maxfactor))
+       CALL transform(array, ntotal, npass, nspan, &
+            factor, nfactor, ctmp, sine, cosine, inv)
+       DEALLOCATE(sine, cosine)
+       ALLOCATE(perm(nperm))
+       CALL permute(array, ntotal, npass, nspan, &
+            factor, nfactor, nsquare, maxfactor, &
+            ctmp, perm)
+       DEALLOCATE(perm, ctmp)
+    END IF
+
+
+  CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE factorize(npass, factor, nfactor, nsquare)
+!
+!--   Formal parameters
+      INTEGER(iwp),               INTENT(IN) :: npass
+      INTEGER(iwp), DIMENSION(*), INTENT(OUT):: factor
+      INTEGER(iwp),               INTENT(OUT):: nfactor, nsquare
+!
+!--   Local scalars
+      INTEGER(iwp):: j, jj, k
+
+      nfactor = 0
+      k = npass
+      DO WHILE (MOD(k, 16) == 0) 
+         nfactor = nfactor + 1
+         factor(nfactor) = 4
+         k = k / 16
+      END DO
+      j = 3
+      jj = 9
+      DO
+         DO WHILE (MOD(k, jj) == 0)
+            nfactor = nfactor + 1
+            factor(nfactor) = j
+            k = k / jj
+         END DO
+         j = j + 2
+         jj = j * j
+         IF (jj > k) EXIT
+      END DO
+      IF (k <= 4) THEN
+         nsquare = nfactor
+         factor(nfactor + 1) = k
+         IF (k /= 1) nfactor = nfactor + 1
+      ELSE 
+         IF (k - ISHFT(k / 4, 2) == 0) THEN
+            nfactor = nfactor + 1
+            factor(nfactor) = 2
+            k = k / 4
+         END IF
+         nsquare = nfactor
+         j = 2
+         DO
+            IF (MOD(k, j) == 0) THEN
+               nfactor = nfactor + 1
+               factor(nfactor) = j
+               k = k / j
+            END IF
+            j = ISHFT((j + 1) / 2, 1) + 1
+            IF (j > k) EXIT
+         END DO
+      END IF
+      IF (nsquare > 0) THEN
+         j = nsquare
+         DO
+            nfactor = nfactor + 1
+            factor(nfactor) = factor(j)
+            j = j - 1
+            IF (j==0) EXIT
+         END DO
+      END IF
+
+    END SUBROUTINE factorize
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE transform(array, ntotal, npass, nspan, &
+         factor, nfactor, ctmp, sine, cosine, inv) !-- compute fourier transform
+!
+!--   Formal parameters
+      COMPLEX(wp),  DIMENSION(*), INTENT(IN OUT):: array
+      COMPLEX(wp),  DIMENSION(*), INTENT(OUT)   :: ctmp
+      INTEGER(iwp),               INTENT(IN)    :: ntotal, npass, nspan
+      INTEGER(iwp), DIMENSION(*), INTENT(IN)    :: factor
+      INTEGER(iwp),               INTENT(IN)    :: nfactor
+      LOGICAL,                    INTENT(IN)    :: inv
+      REAL(wp),     DIMENSION(*), INTENT(OUT)   :: sine, cosine
+!
+!--   Local scalars
+      INTEGER(iwp):: ii, ispan
+      INTEGER(iwp):: j, jc, jf, jj
+      INTEGER(iwp):: k, kk, kspan, k1, k2, k3, k4
+      INTEGER(iwp):: nn, nt
+      REAL(wp)    :: s60, c72, s72, pi2, radf
+      REAL(wp)    :: c1, s1, c2, s2, c3, s3, cd, sd, ak
+      COMPLEX(wp) :: cc, cj, ck, cjp, cjm, ckp, ckm
+
+      c72 = cos72
+      IF (inv) THEN
+         s72 = sin72
+         s60 = sin60
+         pi2 = pi
+      ELSE
+         s72 = -sin72
+         s60 = -sin60
+         pi2 = -pi
+      END IF
+
+      nt = ntotal
+      nn = nt - 1
+      kspan = nspan
+      jc = nspan / npass
+      radf = pi2 * jc
+      pi2 = pi2 * 2.0_wp !-- use 2 PI from here on
+
+      ii = 0
+      jf = 0
+      DO
+         sd = radf / kspan
+         cd = SIN(sd)
+         cd = 2.0_wp * cd * cd
+         sd = SIN(sd + sd)
+         kk = 1
+         ii = ii + 1
+
+         SELECT CASE (factor(ii))
+         CASE (2)
+!
+!--         Transform for factor of 2 (including rotation factor)
+            kspan = kspan / 2
+            k1 = kspan + 2
+            DO
+               DO
+                  k2 = kk + kspan
+                  ck = array(k2)
+                  array(k2) = array(kk)-ck
+                  array(kk) = array(kk) + ck
+                  kk = k2 + kspan
+                  IF (kk > nn) EXIT
+               END DO
+               kk = kk - nn
+               IF (kk > jc) EXIT
+            END DO
+            IF (kk > kspan) RETURN
+            DO
+               c1 = 1.0_wp - cd
+               s1 = sd
+               DO
+                  DO
+                     DO
+                        k2 = kk + kspan
+                        ck = array(kk) - array(k2)
+                        array(kk) = array(kk) + array(k2)
+                        array(k2) = ck * CMPLX(c1, s1, KIND=wp)
+                        kk = k2 + kspan
+                        IF (kk >= nt) EXIT
+                     END DO
+                     k2 = kk - nt
+                     c1 = -c1
+                     kk = k1 - k2
+                     IF (kk <= k2) EXIT
+                  END DO
+                  ak = c1 - (cd * c1 + sd * s1)
+                  s1 = sd * c1 - cd * s1 + s1
+                  c1 = 2.0_wp - (ak * ak + s1 * s1)
+                  s1 = s1 * c1
+                  c1 = c1 * ak
+                  kk = kk + jc
+                  IF (kk >= k2) EXIT
+               END DO
+               k1 = k1 + 1 + 1
+               kk = (k1 - kspan) / 2 + jc
+               IF (kk > jc + jc) EXIT
+            END DO
+
+         CASE (4) !-- transform for factor of 4
+            ispan = kspan
+            kspan = kspan / 4
+
+            DO
+               c1 = 1.0_wp
+               s1 = 0.0_wp
+               DO
+                  DO
+                     k1 = kk + kspan
+                     k2 = k1 + kspan
+                     k3 = k2 + kspan
+                     ckp = array(kk) + array(k2)
+                     ckm = array(kk) - array(k2)
+                     cjp = array(k1) + array(k3)
+                     cjm = array(k1) - array(k3)
+                     array(kk) = ckp + cjp
+                     cjp = ckp - cjp
+                     IF (inv) THEN
+                        ckp = ckm + CMPLX(-AIMAG(cjm), REAL(cjm), KIND=wp)
+                        ckm = ckm + CMPLX(AIMAG(cjm), -REAL(cjm), KIND=wp)
+                     ELSE
+                        ckp = ckm + CMPLX(AIMAG(cjm), -REAL(cjm), KIND=wp)
+                        ckm = ckm + CMPLX(-AIMAG(cjm), REAL(cjm), KIND=wp)
+                     END IF
+!
+!--                  Avoid useless multiplies
+                     IF (s1 == 0.0_wp) THEN
+                        array(k1) = ckp
+                        array(k2) = cjp
+                        array(k3) = ckm
+                     ELSE
+                        array(k1) = ckp * CMPLX(c1, s1, KIND=wp)
+                        array(k2) = cjp * CMPLX(c2, s2, KIND=wp)
+                        array(k3) = ckm * CMPLX(c3, s3, KIND=wp)
+                     END IF
+                     kk = k3 + kspan
+                     IF (kk > nt) EXIT
+                  END DO
+
+                  c2 = c1 - (cd * c1 + sd * s1)
+                  s1 = sd * c1 - cd * s1 + s1
+                  c1 = 2.0_wp - (c2 * c2 + s1 * s1)
+                  s1 = s1 * c1
+                  c1 = c1 * c2
+!
+!--               Values of c2, c3, s2, s3 that will get used next time
+                  c2 = c1 * c1 - s1 * s1
+                  s2 = 2.0_wp * c1 * s1
+                  c3 = c2 * c1 - s2 * s1
+                  s3 = c2 * s1 + s2 * c1
+                  kk = kk - nt + jc
+                  IF (kk > kspan) EXIT
+               END DO
+               kk = kk - kspan + 1
+               IF (kk > jc) EXIT
+            END DO
+            IF (kspan == jc) RETURN
+
+         CASE default
+!
+!--         Transform for odd factors
+            k = factor(ii)
+            ispan = kspan
+            kspan = kspan / k
+
+            SELECT CASE (k)
+            CASE (3) !-- transform for factor of 3 (optional code)
+               DO
+                  DO
+                     k1 = kk + kspan
+                     k2 = k1 + kspan
+                     ck = array(kk)
+                     cj = array(k1) + array(k2)
+                     array(kk) = ck + cj
+                     ck = ck - CMPLX( &
+                          0.5_wp * REAL (cj), &
+                          0.5_wp * AIMAG(cj), &
+                          KIND=wp)
+                     cj = CMPLX( &
+                          (REAL (array(k1)) - REAL (array(k2))) * s60, &
+                          (AIMAG(array(k1)) - AIMAG(array(k2))) * s60, &
+                          KIND=wp)
+                     array(k1) = ck + CMPLX(-AIMAG(cj), REAL(cj), KIND=wp)
+                     array(k2) = ck + CMPLX(AIMAG(cj), -REAL(cj), KIND=wp)
+                     kk = k2 + kspan
+                     IF (kk >= nn) EXIT
+                  END DO
+                  kk = kk - nn
+                  IF (kk > kspan) EXIT
+               END DO
+
+            CASE (5) !-- transform for factor of 5 (optional code)
+               c2 = c72 * c72 - s72 * s72
+               s2 = 2.0_wp * c72 * s72
+               DO
+                  DO
+                     k1 = kk + kspan
+                     k2 = k1 + kspan
+                     k3 = k2 + kspan
+                     k4 = k3 + kspan
+                     ckp = array(k1) + array(k4)
+                     ckm = array(k1) - array(k4)
+                     cjp = array(k2) + array(k3)
+                     cjm = array(k2) - array(k3)
+                     cc = array(kk)
+                     array(kk) = cc + ckp + cjp
+                     ck = CMPLX(REAL(ckp) * c72, AIMAG(ckp) * c72, &
+                          KIND=wp) + &
+                          CMPLX(REAL(cjp) * c2,  AIMAG(cjp) * c2,  &
+                          KIND=wp) + cc
+                     cj = CMPLX(REAL(ckm) * s72, AIMAG(ckm) * s72, &
+                          KIND=wp) + &
+                          CMPLX(REAL(cjm) * s2,  AIMAG(cjm) * s2,  &
+                          KIND=wp)
+                     array(k1) = ck + CMPLX(-AIMAG(cj), REAL(cj), KIND=wp)
+                     array(k4) = ck + CMPLX(AIMAG(cj), -REAL(cj), KIND=wp)
+                     ck = CMPLX(REAL(ckp) * c2,  AIMAG(ckp) * c2,  &
+                          KIND=wp) + &
+                          CMPLX(REAL(cjp) * c72, AIMAG(cjp) * c72, &
+                          KIND=wp) + cc
+                     cj = CMPLX(REAL(ckm) * s2,  AIMAG(ckm) * s2,  &
+                          KIND=wp) - &
+                          CMPLX(REAL(cjm) * s72, AIMAG(cjm) * s72, &
+                          KIND=wp)
+                     array(k2) = ck + CMPLX(-AIMAG(cj), REAL(cj), KIND=wp)
+                     array(k3) = ck + CMPLX(AIMAG(cj), -REAL(cj), KIND=wp)
+                     kk = k4 + kspan
+                     IF (kk >= nn) EXIT
+                  END DO
+                  kk = kk - nn
+                  IF (kk > kspan) EXIT
+               END DO
+
+            CASE default
+               IF (k /= jf) THEN
+                  jf = k
+                  s1 = pi2 / k
+                  c1 = COS(s1)
+                  s1 = SIN(s1)
+                  cosine (jf) = 1.0_wp
+                  sine (jf) = 0.0_wp
+                  j = 1
+                  DO
+                     cosine (j) = cosine (k) * c1 + sine (k) * s1
+                     sine (j) = cosine (k) * s1 - sine (k) * c1
+                     k = k-1
+                     cosine (k) = cosine (j)
+                     sine (k) = -sine (j)
+                     j = j + 1
+                     IF (j >= k) EXIT
+                  END DO
+               END IF
+               DO
+                  DO
+                     k1 = kk
+                     k2 = kk + ispan
+                     cc = array(kk)
+                     ck = cc
+                     j = 1
+                     k1 = k1 + kspan
+                     DO
+                        k2 = k2 - kspan
+                        j = j + 1
+                        ctmp(j) = array(k1) + array(k2)
+                        ck = ck + ctmp(j)
+                        j = j + 1
+                        ctmp(j) = array(k1) - array(k2)
+                        k1 = k1 + kspan
+                        IF (k1 >= k2) EXIT
+                     END DO
+                     array(kk) = ck
+                     k1 = kk
+                     k2 = kk + ispan
+                     j = 1
+                     DO
+                        k1 = k1 + kspan
+                        k2 = k2 - kspan
+                        jj = j
+                        ck = cc
+                        cj = (0.0_wp, 0.0_wp)
+                        k = 1
+                        DO
+                           k = k + 1
+                           ck = ck + CMPLX( &
+                                REAL (ctmp(k)) * cosine(jj), &
+                                AIMAG(ctmp(k)) * cosine(jj), KIND=wp)
+                           k = k + 1
+                           cj = cj + CMPLX( &
+                                REAL (ctmp(k)) * sine(jj), &
+                                AIMAG(ctmp(k)) * sine(jj), KIND=wp)
+                           jj = jj + j
+                           IF (jj > jf) jj = jj - jf
+                           IF (k >= jf) EXIT
+                        END DO
+                        k = jf - j
+                        array(k1) = ck + CMPLX(-AIMAG(cj), REAL(cj), &
+                             KIND=wp)
+                        array(k2) = ck + CMPLX(AIMAG(cj), -REAL(cj), &
+                             KIND=wp)
+                        j = j + 1
+                        IF (j >= k) EXIT
+                     END DO
+                     kk = kk + ispan
+                     IF (kk > nn) EXIT
+                  END DO
+                  kk = kk - nn
+                  IF (kk > kspan) EXIT
+               END DO
+
+            END SELECT
+!
+!--         Multiply by rotation factor (except for factors of 2 and 4)
+            IF (ii == nfactor) RETURN
+            kk = jc + 1
+            DO
+               c2 = 1.0_wp - cd
+               s1 = sd
+               DO
+                  c1 = c2
+                  s2 = s1
+                  kk = kk + kspan
+                  DO
+                     DO
+                        array(kk) = CMPLX(c2, s2, KIND=wp) * array(kk)
+                        kk = kk + ispan
+                        IF (kk > nt) EXIT
+                     END DO
+                     ak = s1 * s2
+                     s2 = s1 * c2 + c1 * s2
+                     c2 = c1 * c2 - ak
+                     kk = kk - nt + kspan
+                     IF (kk > ispan) EXIT
+                  END DO
+                  c2 = c1 - (cd * c1 + sd * s1)
+                  s1 = s1 + sd * c1 - cd * s1
+                  c1 = 2.0_wp - (c2 * c2 + s1 * s1)
+                  s1 = s1 * c1
+                  c2 = c2 * c1
+                  kk = kk - ispan + jc
+                  IF (kk > kspan) EXIT
+               END DO
+               kk = kk - kspan + jc + 1
+               IF (kk > jc + jc) EXIT
+            END DO
+
+         END SELECT
+      END DO
+    END SUBROUTINE transform
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE permute(array, ntotal, npass, nspan, &
+         factor, nfactor, nsquare, maxfactor, &
+         ctmp, perm)
+!
+!--   Formal parameters
+      COMPLEX(wp),  DIMENSION(*), INTENT(IN OUT):: array
+      COMPLEX(wp),  DIMENSION(*), INTENT(OUT)   :: ctmp
+      INTEGER(iwp),               INTENT(IN)    :: ntotal, npass, nspan
+      INTEGER(iwp), DIMENSION(*), INTENT(IN OUT):: factor
+      INTEGER(iwp),               INTENT(IN)    :: nfactor, nsquare
+      INTEGER(iwp),               INTENT(IN)    :: maxfactor
+      INTEGER(iwp), DIMENSION(*), INTENT(OUT)   :: perm
+!
+!--   Local scalars
+      COMPLEX(wp) :: ck
+      INTEGER(iwp):: ii, ispan
+      INTEGER(iwp):: j, jc, jj
+      INTEGER(iwp):: k, kk, kspan, kt, k1, k2, k3
+      INTEGER(iwp):: nn, nt
+!
+!--   Permute the results to normal order---done in two stages
+!--   Permutation for square factors of n
+
+      nt = ntotal
+      nn = nt - 1
+      kt = nsquare
+      kspan = nspan
+      jc = nspan / npass
+
+      perm (1) = nspan
+      IF (kt > 0) THEN
+         k = kt + kt + 1
+         IF (nfactor < k) k = k - 1
+         j = 1
+         perm (k + 1) = jc
+         DO
+            perm (j + 1) = perm (j) / factor(j)
+            perm (k) = perm (k + 1) * factor(j)
+            j = j + 1
+            k = k - 1
+            IF (j >= k) EXIT
+         END DO
+         k3 = perm (k + 1)
+         kspan = perm (2)
+         kk = jc + 1
+         k2 = kspan + 1
+         j = 1
+
+         IF (npass /= ntotal) THEN
+            permute_multi: DO
+               DO
+                  DO
+                     k = kk + jc
+                     DO
+!
+!--                     Swap array(kk) <> array(k2)
+                        ck = array(kk)
+                        array(kk) = array(k2)
+                        array(k2) = ck
+                        kk = kk + 1
+                        k2 = k2 + 1
+                        IF (kk >= k) EXIT
+                     END DO
+                     kk = kk + nspan - jc
+                     k2 = k2 + nspan - jc
+                     IF (kk >= nt) EXIT
+                  END DO
+                  kk = kk - nt + jc
+                  k2 = k2 - nt + kspan
+                  IF (k2 >= nspan) EXIT
+               END DO
+               DO
+                  DO
+                     k2 = k2 - perm (j)
+                     j = j + 1
+                     k2 = perm (j + 1) + k2
+                     IF (k2 <= perm (j)) EXIT
+                  END DO
+                  j = 1
+                  DO
+                     IF (kk < k2) CYCLE permute_multi
+                     kk = kk + jc
+                     k2 = k2 + kspan
+                     IF (k2 >= nspan) EXIT
+                  END DO
+                  IF (kk >= nspan) EXIT
+               END DO
+               EXIT
+            END DO permute_multi
+         ELSE
+            permute_single: DO
+               DO
+!
+!--               Swap array(kk) <> array(k2)
+                  ck = array(kk)
+                  array(kk) = array(k2)
+                  array(k2) = ck
+                  kk = kk + 1
+                  k2 = k2 + kspan
+                  IF (k2 >= nspan) EXIT
+               END DO
+               DO
+                  DO
+                     k2 = k2 - perm (j)
+                     j = j + 1
+                     k2 = perm (j + 1) + k2
+                     IF (k2 <= perm (j)) EXIT
+                  END DO
+                  j = 1
+                  DO
+                     IF (kk < k2) CYCLE permute_single
+                     kk = kk + 1
+                     k2 = k2 + kspan
+                     IF (k2 >= nspan) EXIT
+                  END DO
+                  IF (kk >= nspan) EXIT
+               END DO
+               EXIT
+            END DO permute_single
+         END IF
+         jc = k3
+      END IF
+
+      IF (ISHFT(kt, 1) + 1 >= nfactor) RETURN
+
+      ispan = perm (kt + 1)
+!
+!--   Permutation for square-free factors of n
+      j = nfactor - kt
+      factor(j + 1) = 1
+      DO
+         factor(j) = factor(j) * factor(j+1)
+         j = j - 1
+         IF (j == kt) EXIT
+      END DO
+      kt = kt + 1
+      nn = factor(kt) - 1
+      j = 0
+      jj = 0
+      DO
+         k = kt + 1
+         k2 = factor(kt)
+         kk = factor(k)
+         j = j + 1
+         IF (j > nn) EXIT !-- exit infinite loop
+         jj = jj + kk
+         DO WHILE (jj >= k2)
+            jj = jj - k2
+            k2 = kk
+            k = k + 1
+            kk = factor(k)
+            jj = jj + kk
+         END DO
+         perm (j) = jj
+      END DO
+!
+!--   Determine the permutation cycles of length greater than 1
+      j = 0
+      DO
+         DO
+            j = j + 1
+            kk = perm(j)
+            IF (kk >= 0) EXIT
+         END DO
+         IF (kk /= j) THEN
+            DO
+               k = kk
+               kk = perm (k)
+               perm (k) = -kk
+               IF (kk == j) EXIT
+            END DO
+            k3 = kk
+         ELSE
+            perm (j) = -j
+            IF (j == nn) EXIT !-- exit infinite loop
+         END IF
+      END DO
+!
+!--   Reorder a and b, following the permutation cycles
+      DO
+         j = k3 + 1
+         nt = nt - ispan
+         ii = nt - 1 + 1
+         IF (nt < 0) EXIT !-- exit infinite loop
+         DO
+            DO
+               j = j-1
+               IF (perm(j) >= 0) EXIT
+            END DO
+            jj = jc
+            DO
+               kspan = jj
+               IF (jj > maxfactor) kspan = maxfactor
+               jj = jj - kspan
+               k = perm(j)
+               kk = jc * k + ii + jj
+               k1 = kk + kspan
+               k2 = 0
+               DO
+                  k2 = k2 + 1
+                  ctmp(k2) = array(k1)
+                  k1 = k1 - 1
+                  IF (k1 == kk) EXIT
+               END DO
+               DO
+                  k1 = kk + kspan
+                  k2 = k1 - jc * (k + perm(k))
+                  k = -perm(k)
+                  DO
+                     array(k1) = array(k2)
+                     k1 = k1 - 1
+                     k2 = k2 - 1
+                     IF (k1 == kk) EXIT
+                  END DO
+                  kk = k2
+                  IF (k == j) EXIT
+               END DO
+               k1 = kk + kspan
+               k2 = 0
+               DO
+                  k2 = k2 + 1
+                  array(k1) = ctmp(k2)
+                  k1 = k1 - 1
+                  IF (k1 == kk) EXIT
+               END DO
+               IF (jj == 0) EXIT
+            END DO
+            IF (j == 1) EXIT
+         END DO
+      END DO
+
+    END SUBROUTINE permute
+
+ END SUBROUTINE fftradix
+
+ END MODULE singleton
Index: /palm/tags/release-6.0/SOURCE/sor.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/sor.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/sor.f90	(revision 3477)
@@ -0,0 +1,257 @@
+!> @file sor.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Rename variables in mesoscale-offline nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Corrected "Former revisions" section
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Large-scale forcing implemented (MS)
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/11 06:25:56  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Solve the Poisson-equation with the SOR-Red/Black-scheme.
+!------------------------------------------------------------------------------!
+ SUBROUTINE sor( d, ddzu, ddzw, p )
+
+    USE arrays_3d,                                                             &
+        ONLY:  rho_air, rho_air_zw
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx2, ddy2
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nz, nzb, nzt
+
+    USE kinds
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
+               bc_dirichlet_s, bc_lr_cyc, bc_ns_cyc, bc_radiation_l,           &
+               bc_radiation_n, bc_radiation_r, bc_radiation_s, ibc_p_b,        &
+               ibc_p_t, n_sor, omega_sor
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i              !<
+    INTEGER(iwp) ::  j              !<
+    INTEGER(iwp) ::  k              !<
+    INTEGER(iwp) ::  n              !<
+    INTEGER(iwp) ::  nxl1           !<
+    INTEGER(iwp) ::  nxl2           !<
+    INTEGER(iwp) ::  nys1           !<
+    INTEGER(iwp) ::  nys2           !<
+
+    REAL(wp)     ::  ddzu(1:nz+1)   !<
+    REAL(wp)     ::  ddzw(1:nzt+1)  !<
+
+    REAL(wp)     ::  d(nzb+1:nzt,nys:nyn,nxl:nxr)      !<
+    REAL(wp)     ::  p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !<
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  f1         !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  f2         !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  f3         !<
+
+    ALLOCATE( f1(1:nz), f2(1:nz), f3(1:nz) )
+
+!
+!-- Compute pre-factors.
+    DO  k = 1, nz
+         f2(k) = ddzu(k+1) * ddzw(k) * rho_air_zw(k)
+         f3(k) = ddzu(k)   * ddzw(k) * rho_air_zw(k-1)
+         f1(k) = 2.0_wp * ( ddx2 + ddy2 ) * rho_air(k) + f2(k) + f3(k)
+    ENDDO
+
+!
+!-- Limits for RED- and BLACK-part.
+    IF ( MOD( nxl , 2 ) == 0 )  THEN
+       nxl1 = nxl
+       nxl2 = nxl + 1
+    ELSE
+       nxl1 = nxl + 1
+       nxl2 = nxl
+    ENDIF
+    IF ( MOD( nys , 2 ) == 0 )  THEN
+       nys1 = nys
+       nys2 = nys + 1
+    ELSE
+       nys1 = nys + 1
+       nys2 = nys
+    ENDIF
+
+    DO  n = 1, n_sor
+
+!
+!--    RED-part
+       DO  i = nxl1, nxr, 2
+          DO  j = nys2, nyn, 2
+             DO  k = nzb+1, nzt
+                p(k,j,i) = p(k,j,i) + omega_sor / f1(k) * (            &
+                           rho_air(k) * ddx2 * ( p(k,j,i+1) + p(k,j,i-1) ) +   &
+                           rho_air(k) * ddy2 * ( p(k,j+1,i) + p(k,j-1,i) ) +   &
+                           f2(k) * p(k+1,j,i)                              +   &
+                           f3(k) * p(k-1,j,i)                              -   &
+                           d(k,j,i)                                        -   &
+                           f1(k) * p(k,j,i)           )
+             ENDDO
+          ENDDO
+       ENDDO
+
+       DO  i = nxl2, nxr, 2
+          DO  j = nys1, nyn, 2
+             DO  k = nzb+1, nzt
+                p(k,j,i) = p(k,j,i) + omega_sor / f1(k) * (                    &
+                           rho_air(k) * ddx2 * ( p(k,j,i+1) + p(k,j,i-1) ) +   &
+                           rho_air(k) * ddy2 * ( p(k,j+1,i) + p(k,j-1,i) ) +   &
+                           f2(k) * p(k+1,j,i)                              +   &
+                           f3(k) * p(k-1,j,i)                              -   &
+                           d(k,j,i)                                        -   &
+                           f1(k) * p(k,j,i)           )
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Exchange of boundary values for p.
+       CALL exchange_horiz( p, nbgp )
+
+!
+!--    Horizontal (Neumann) boundary conditions in case of non-cyclic boundaries
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  p(:,:,nxl-1) = p(:,:,nxl)
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  p(:,:,nxr+1) = p(:,:,nxr)
+       ENDIF
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  p(:,nyn+1,:) = p(:,nyn,:)
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  p(:,nys-1,:) = p(:,nys,:)
+       ENDIF
+
+!
+!--    BLACK-part
+       DO  i = nxl1, nxr, 2
+          DO  j = nys1, nyn, 2
+             DO  k = nzb+1, nzt
+                p(k,j,i) = p(k,j,i) + omega_sor / f1(k) * (            &
+                           rho_air(k) * ddx2 * ( p(k,j,i+1) + p(k,j,i-1) ) +   &
+                           rho_air(k) * ddy2 * ( p(k,j+1,i) + p(k,j-1,i) ) +   &
+                           f2(k) * p(k+1,j,i)                              +   &
+                           f3(k) * p(k-1,j,i)                              -   &
+                           d(k,j,i)                                        -   &
+                           f1(k) * p(k,j,i)           )
+             ENDDO
+          ENDDO
+       ENDDO
+
+       DO  i = nxl2, nxr, 2
+          DO  j = nys2, nyn, 2
+             DO  k = nzb+1, nzt
+                p(k,j,i) = p(k,j,i) + omega_sor / f1(k) * (            &
+                           rho_air(k) * ddx2 * ( p(k,j,i+1) + p(k,j,i-1) ) +   &
+                           rho_air(k) * ddy2 * ( p(k,j+1,i) + p(k,j-1,i) ) +   &
+                           f2(k) * p(k+1,j,i)                              +   &
+                           f3(k) * p(k-1,j,i)                              -   &
+                           d(k,j,i)                                        -   &
+                           f1(k) * p(k,j,i)           )
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Exchange of boundary values for p.
+       CALL exchange_horiz( p, nbgp )
+
+!
+!--    Boundary conditions top/bottom.
+!--    Bottom boundary
+       IF ( ibc_p_b == 1 )  THEN       !       Neumann
+          p(nzb,:,:) = p(nzb+1,:,:)
+       ELSE                            !       Dirichlet
+          p(nzb,:,:) = 0.0_wp
+       ENDIF
+
+!
+!--    Top boundary
+       IF ( ibc_p_t == 1 )  THEN                 !  Neumann
+          p(nzt+1,:,:) = p(nzt,:,:)
+       ELSE                      !  Dirichlet
+          p(nzt+1,:,:) = 0.0_wp
+       ENDIF
+
+!
+!--    Horizontal (Neumann) boundary conditions in case of non-cyclic boundaries
+       IF ( .NOT. bc_lr_cyc )  THEN
+          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  p(:,:,nxl-1) = p(:,:,nxl)
+          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  p(:,:,nxr+1) = p(:,:,nxr)
+       ENDIF
+       IF ( .NOT. bc_ns_cyc )  THEN
+          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  p(:,nyn+1,:) = p(:,nyn,:)
+          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  p(:,nys-1,:) = p(:,nys,:)
+       ENDIF
+
+
+    ENDDO
+
+    DEALLOCATE( f1, f2, f3 )
+
+ END SUBROUTINE sor
Index: /palm/tags/release-6.0/SOURCE/spectra_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/spectra_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/spectra_mod.f90	(revision 3477)
@@ -0,0 +1,962 @@
+!> @file spectra_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2956 2018-04-10 11:01:03Z Giersch
+! spectrum_x and spectrum_y will only be allocated if they are not allocated 
+! before (e.g. in case of restart runs) 
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed spectra_par to spectra_parameters
+! 
+! 2841 2018-02-27 15:02:57Z knoop
+! Bugfix: wrong placement of include 'mpif.h' corrected
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2216 2017-04-28 12:54:20Z suehring
+!
+! 2193 2017-03-22 04:21:28Z raasch
+! Normalization of spectra output adjusted
+!
+! 2192 2017-03-22 04:14:10Z raasch
+! bugfix for index bounds of arrays spectrum_x and spectrum_y
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Additional default spectra for passive scalar
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! file renamed, reading the spectra_par NAMELIST moved from package_parin to
+! here
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! bugfix: preprocessor directives included for the non-parallel case
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! MPI module used by default on all machines
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! routine is modularized, filename renamed from calc_spectra to spectrum,
+! privious data module spectrum moved from modules.f90 to here,
+! cpp-direktives for spectra removed, immediate return if no spectra levels are
+! given
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1575 2015-03-27 09:56:27Z raasch
+! adjustments for psolver-queries
+!
+! 1511 2014-12-16 15:54:16Z suehring
+! Bugfix concerning spectra normalization
+!
+! 1431 2014-07-15 14:47:17Z suehring
+! Wavenumber-integrated spectra coincide with respective variance. 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kinds
+!
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: nzb_x, nzb_yd, nyn_x, nyn_x, nzt_x, nzt_yd belong to transpose_indices 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! resorting of array moved to separate routine resort_for_zx,
+! one argument removed from the transpose_..d routines
+!
+! 1120 2013-04-05 15:11:35Z raasch
+! bugfix: calls of fft_x|y replaced by fft_x|y_1d
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! adjustment of array tend for cases with unequal subdomain sizes removed
+!
+! Revision 1.1  2001/01/05 15:08:07  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Calculate horizontal spectra along x and y. 
+!> ATTENTION: 1d-decomposition along y still needs improvement, because in that
+!>            case the gridpoint number along z still depends on the PE number
+!>            because transpose_xz has to be used (and possibly also
+!>            transpose_zyd needs modification).
+!------------------------------------------------------------------------------!
+ MODULE spectra_mod
+
+    USE kinds
+
+    PRIVATE
+
+    CHARACTER (LEN=2),  DIMENSION(10) ::  spectra_direction = 'x'
+    CHARACTER (LEN=10), DIMENSION(10) ::  data_output_sp  = ' '
+
+    INTEGER(iwp) ::  average_count_sp = 0
+    INTEGER(iwp) ::  dosp_time_count = 0
+    INTEGER(iwp) ::  n_sp_x = 0, n_sp_y = 0
+
+    INTEGER(iwp) ::  comp_spectra_level(100) = 999999
+
+    LOGICAL ::  calculate_spectra   = .FALSE.  !< internal switch that spectra are calculated
+    LOGICAL ::  spectra_initialized = .FALSE.  !< internal switch that spectra related quantities are initialized
+
+    REAL(wp) ::  averaging_interval_sp = 9999999.9_wp  !< averaging interval for spectra output
+    REAL(wp) ::  dt_dosp = 9999999.9_wp                !< time interval for spectra output
+    REAL(wp) ::  skip_time_dosp = 9999999.9_wp         !< no output of spectra data before this interval has passed
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  var_d
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  spectrum_x, spectrum_y
+
+    SAVE
+
+    INTERFACE calc_spectra
+       MODULE PROCEDURE calc_spectra
+    END INTERFACE calc_spectra
+
+    INTERFACE preprocess_spectra
+       MODULE PROCEDURE preprocess_spectra
+    END INTERFACE preprocess_spectra
+
+    INTERFACE calc_spectra_x
+       MODULE PROCEDURE calc_spectra_x
+    END INTERFACE calc_spectra_x
+
+    INTERFACE calc_spectra_y
+       MODULE PROCEDURE calc_spectra_y
+    END INTERFACE calc_spectra_y
+
+    INTERFACE spectra_check_parameters
+       MODULE PROCEDURE spectra_check_parameters
+    END INTERFACE spectra_check_parameters
+
+    INTERFACE spectra_header
+       MODULE PROCEDURE spectra_header
+    END INTERFACE spectra_header
+
+    INTERFACE spectra_init
+       MODULE PROCEDURE spectra_init
+    END INTERFACE spectra_init
+
+    INTERFACE spectra_parin
+       MODULE PROCEDURE spectra_parin
+    END INTERFACE spectra_parin
+
+    PUBLIC average_count_sp, averaging_interval_sp, calc_spectra,              &
+           calculate_spectra, comp_spectra_level, data_output_sp,              &
+           dosp_time_count, dt_dosp, n_sp_x, n_sp_y, plot_spectra_level,       &
+           skip_time_dosp, spectra_check_parameters, spectra_direction,        &
+           spectra_header, spectra_init, spectra_parin, spectrum_x,            &
+           spectrum_y, var_d
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &spectra_par for calculating spectra
+!------------------------------------------------------------------------------!
+    SUBROUTINE spectra_parin
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_data_output, message_string
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current  &
+                                    !< line of the parameter file
+
+       NAMELIST /spectra_par/  averaging_interval_sp, comp_spectra_level,      &
+                               data_output_sp, dt_dosp, skip_time_dosp,        &
+                               spectra_direction
+
+       NAMELIST /spectra_parameters/                                           &
+                               averaging_interval_sp, comp_spectra_level,      &
+                               data_output_sp, dt_dosp, skip_time_dosp,        &
+                               spectra_direction
+!
+!--    Position the namelist-file at the beginning (it was already opened in
+!--    parin), search for the namelist-group of the package and position the
+!--    file at this line.
+       line = ' '
+
+!
+!--    Try to find the spectra package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&spectra_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read namelist
+       READ ( 11, spectra_parameters, ERR = 10 )
+
+!
+!--    Default setting of dt_dosp here (instead of check_parameters), because
+!--    its current value is needed in init_pegrid
+       IF ( dt_dosp == 9999999.9_wp )  dt_dosp = dt_data_output
+
+!
+!--    Set general switch that spectra shall be calculated
+       calculate_spectra = .TRUE.
+
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'spectra_parameters', line )
+!
+!--    Try to find the old namelist
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&spectra_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read namelist
+       READ ( 11, spectra_par, ERR = 13, END = 14 )
+
+       
+       message_string = 'namelist spectra_par is deprecated and will be ' // &
+                     'removed in near future. Please use namelist ' //       &
+                     'spectra_parameters instead'
+       CALL message( 'spectra_parin', 'PA0487', 0, 1, 0, 6, 0 )
+!
+!--    Default setting of dt_dosp here (instead of check_parameters), because
+!--    its current value is needed in init_pegrid
+       IF ( dt_dosp == 9999999.9_wp )  dt_dosp = dt_data_output
+
+!
+!--    Set general switch that spectra shall be calculated
+       calculate_spectra = .TRUE.
+       
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'spectra_par', line )
+       
+       
+ 14    CONTINUE
+
+    END SUBROUTINE spectra_parin
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of spectra related variables
+!------------------------------------------------------------------------------!
+    SUBROUTINE spectra_init
+
+       USE indices,                                                            &
+           ONLY:  nx, ny, nzb, nzt
+
+       IMPLICIT NONE
+
+       IF ( spectra_initialized )  RETURN
+
+       IF ( dt_dosp /= 9999999.9_wp )  THEN
+
+          IF ( .NOT. ALLOCATED( spectrum_x ) )  THEN
+             ALLOCATE( spectrum_x( 1:nx/2, 1:100, 1:10 ) )
+             spectrum_x = 0.0_wp
+          ENDIF
+
+          IF ( .NOT. ALLOCATED( spectrum_y ) )  THEN
+             ALLOCATE( spectrum_y( 1:ny/2, 1:100, 1:10 ) )
+             spectrum_y = 0.0_wp
+          ENDIF
+
+          ALLOCATE( var_d(nzb:nzt+1) )
+          var_d = 0.0_wp
+       ENDIF
+
+       spectra_initialized = .TRUE.
+
+    END SUBROUTINE spectra_init
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check spectra related quantities
+!------------------------------------------------------------------------------!
+    SUBROUTINE spectra_check_parameters
+
+       USE control_parameters,                                                 &
+           ONLY:  averaging_interval, message_string, skip_time_data_output
+
+       IMPLICIT NONE
+
+!
+!--    Check the average interval
+       IF ( averaging_interval_sp == 9999999.9_wp )  THEN
+          averaging_interval_sp = averaging_interval
+       ENDIF
+
+       IF ( averaging_interval_sp > dt_dosp )  THEN
+          WRITE( message_string, * )  'averaging_interval_sp = ',              &
+                averaging_interval_sp, ' must be <= dt_dosp = ', dt_dosp
+          CALL message( 'spectra_check_parameters', 'PA0087', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--    Set the default skip time interval for data output, if necessary
+       IF ( skip_time_dosp == 9999999.9_wp )                                   &
+                                          skip_time_dosp = skip_time_data_output
+
+    END SUBROUTINE spectra_check_parameters
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for spectra
+!>
+!> @todo Output of netcdf data format and compression level
+!------------------------------------------------------------------------------!
+    SUBROUTINE spectra_header ( io )
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_averaging_input_pr
+
+!       USE netcdf_interface,                                                  &
+!           ONLY:  netcdf_data_format_string, netcdf_deflate
+
+       IMPLICIT NONE
+
+!       CHARACTER (LEN=40) ::  output_format       !< internal string
+
+       INTEGER(iwp) ::  i                         !< internal counter
+       INTEGER(iwp), INTENT(IN) ::  io            !< Unit of the output file
+
+!
+!--    Spectra output
+       IF ( dt_dosp /= 9999999.9_wp )  THEN
+          WRITE ( io, 1 )
+
+!          output_format = netcdf_data_format_string
+!          IF ( netcdf_deflate == 0 )  THEN
+!             WRITE ( io, 2 )  output_format
+!          ELSE
+!             WRITE ( io, 3 )  TRIM( output_format ), netcdf_deflate
+!          ENDIF
+          WRITE ( io, 2 )  'see profiles or other quantities'
+          WRITE ( io, 4 )  dt_dosp
+          IF ( skip_time_dosp /= 0.0_wp )  WRITE ( io, 5 )  skip_time_dosp
+          WRITE ( io, 6 )  ( data_output_sp(i), i = 1,10 ),     &
+                           ( spectra_direction(i), i = 1,10 ),  &
+                           ( comp_spectra_level(i), i = 1,100 ), &
+                           averaging_interval_sp, dt_averaging_input_pr
+       ENDIF
+
+     1 FORMAT ('    Spectra:')
+     2 FORMAT ('       Output format: ',A/)
+!     3 FORMAT ('       Output format: ',A, '   compressed with level: ',I1/)
+     4 FORMAT ('       Output every ',F7.1,' s'/)
+     5 FORMAT ('       No output during initial ',F8.2,' s')
+     6 FORMAT ('       Arrays:     ', 10(A5,',')/                         &
+               '       Directions: ', 10(A5,',')/                         &
+               '       height levels  k = ', 20(I3,',')/                  &
+               '                          ', 20(I3,',')/                  &
+               '                          ', 20(I3,',')/                  &
+               '                          ', 20(I3,',')/                  &
+               '                          ', 19(I3,','),I3,'.'/           &
+               '       Time averaged over ', F7.1, ' s,' /                &
+               '       Profiles for the time averaging are taken every ', &
+                    F6.1,' s')
+
+    END SUBROUTINE spectra_header
+
+
+
+    SUBROUTINE calc_spectra
+
+       USE arrays_3d,                                                          &
+           ONLY:  d, tend
+
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, message_string, psolver
+
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point
+
+       USE fft_xy,                                                             &
+           ONLY:  fft_init
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nyn, nys, nzb, nzt
+
+       USE kinds
+
+       USE pegrid,                                                             &
+           ONLY:  myid, pdims
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  m  !<
+       INTEGER(iwp) ::  pr !<
+
+
+!
+!--    Check if user gave any levels for spectra to be calculated
+       IF ( comp_spectra_level(1) == 999999 )  RETURN
+
+       CALL cpu_log( log_point(30), 'calc_spectra', 'start' )
+
+!
+!--    Initialize spectra related quantities
+       CALL spectra_init
+
+!
+!--    Initialize ffts
+       CALL fft_init
+
+!
+!--    Reallocate array d in required size
+       IF ( psolver(1:9) == 'multigrid' )  THEN
+          DEALLOCATE( d )
+          ALLOCATE( d(nzb+1:nzt,nys:nyn,nxl:nxr) )
+       ENDIF
+
+       m = 1
+       DO WHILE ( data_output_sp(m) /= ' '  .AND.  m <= 10 )
+!
+!--       Transposition from z --> x  ( y --> x in case of a 1d-decomposition
+!--       along x)
+          IF ( INDEX( spectra_direction(m), 'x' ) /= 0 )  THEN
+
+!
+!--          Calculation of spectra works for cyclic boundary conditions only
+             IF ( .NOT. bc_lr_cyc )  THEN
+
+                message_string = 'non-cyclic lateral boundaries along x do'//  &
+                                 ' not &  allow calculation of spectra along x'
+                CALL message( 'calc_spectra', 'PA0160', 1, 2, 0, 6, 0 )
+             ENDIF
+
+             CALL preprocess_spectra( m, pr )
+
+#if defined( __parallel )
+             IF ( pdims(2) /= 1 )  THEN
+                CALL resort_for_zx( d, tend )
+                CALL transpose_zx( tend, d )
+             ELSE
+                CALL transpose_yxd( d, d )
+             ENDIF
+             CALL calc_spectra_x( d, m )
+#else
+             message_string = 'sorry, calculation of spectra in non paral' //  &
+                              'lel mode& is still not realized'
+             CALL message( 'calc_spectra', 'PA0161', 1, 2, 0, 6, 0 )
+#endif
+
+          ENDIF
+
+!
+!--       Transposition from z --> y (d is rearranged only in case of a
+!--       1d-decomposition along x)
+          IF ( INDEX( spectra_direction(m), 'y' ) /= 0 )  THEN
+
+!
+!--          Calculation of spectra works for cyclic boundary conditions only
+             IF ( .NOT. bc_ns_cyc )  THEN
+                IF ( myid == 0 )  THEN
+                   message_string = 'non-cyclic lateral boundaries along y' // &
+                                    ' do not & allow calculation of spectra' //&
+                                    ' along y'
+                   CALL message( 'calc_spectra', 'PA0162', 1, 2, 0, 6, 0 )
+                ENDIF
+                CALL local_stop
+             ENDIF
+
+             CALL preprocess_spectra( m, pr )
+
+#if defined( __parallel )
+             CALL transpose_zyd( d, d )
+             CALL calc_spectra_y( d, m )
+#else
+             message_string = 'sorry, calculation of spectra in non paral' //  &
+                              'lel mode& is still not realized'
+             CALL message( 'calc_spectra', 'PA0161', 1, 2, 0, 6, 0 )
+#endif
+
+          ENDIF
+
+!
+!--       Increase counter for next spectrum
+          m = m + 1
+          
+       ENDDO
+
+!
+!--    Increase counter for averaging process in routine plot_spectra
+       average_count_sp = average_count_sp + 1
+
+       CALL cpu_log( log_point(30), 'calc_spectra', 'stop' )
+
+    END SUBROUTINE calc_spectra
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE preprocess_spectra( m, pr )
+
+       USE arrays_3d,                                                          &
+           ONLY:  d, pt, q, s, u, v, w
+
+       USE indices,                                                            &
+           ONLY:  ngp_2dh, nxl, nxr, nyn, nys, nzb, nzt
+
+       USE kinds
+
+#if defined( __parallel )
+#if !defined( __mpifh )
+       USE MPI
+#endif
+#endif
+
+       USE pegrid,                                                             &
+           ONLY:  collective_wait, comm2d, ierr
+
+       USE statistics,                                                         &
+           ONLY:  hom
+
+
+       IMPLICIT NONE
+
+#if defined( __parallel )
+#if defined( __mpifh )
+       INCLUDE "mpif.h"
+#endif
+#endif
+
+       INTEGER(iwp) :: i  !<
+       INTEGER(iwp) :: j  !<
+       INTEGER(iwp) :: k  !<
+       INTEGER(iwp) :: m  !<
+       INTEGER(iwp) :: pr !<
+
+       REAL(wp), DIMENSION(nzb:nzt+1) :: var_d_l
+
+       SELECT CASE ( TRIM( data_output_sp(m) ) )
+          
+       CASE ( 'u' )
+          pr = 1
+          d(nzb+1:nzt,nys:nyn,nxl:nxr) = u(nzb+1:nzt,nys:nyn,nxl:nxr)
+       
+       CASE ( 'v' )
+          pr = 2
+          d(nzb+1:nzt,nys:nyn,nxl:nxr) = v(nzb+1:nzt,nys:nyn,nxl:nxr)
+       
+       CASE ( 'w' )
+          pr = 3
+          d(nzb+1:nzt,nys:nyn,nxl:nxr) = w(nzb+1:nzt,nys:nyn,nxl:nxr)
+       
+       CASE ( 'theta' )
+          pr = 4
+          d(nzb+1:nzt,nys:nyn,nxl:nxr) = pt(nzb+1:nzt,nys:nyn,nxl:nxr)
+       
+       CASE ( 'q' )
+          pr = 41
+          d(nzb+1:nzt,nys:nyn,nxl:nxr) = q(nzb+1:nzt,nys:nyn,nxl:nxr)
+          
+       CASE ( 's' )
+          pr = 117
+          d(nzb+1:nzt,nys:nyn,nxl:nxr) = s(nzb+1:nzt,nys:nyn,nxl:nxr)
+       
+       CASE DEFAULT
+!
+!--       The DEFAULT case is reached either if the parameter data_output_sp(m)
+!--       contains a wrong character string or if the user has coded a special
+!--       case in the user interface. There, the subroutine user_spectra
+!--       checks which of these two conditions applies.
+          CALL user_spectra( 'preprocess', m, pr )
+          
+       END SELECT
+
+!
+!--    Subtract horizontal mean from the array, for which spectra have to be
+!--    calculated. Moreover, calculate variance of the respective quantitiy, 
+!--    later used for normalizing spectra output. 
+       var_d_l(:) = 0.0_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                d(k,j,i)   = d(k,j,i) - hom(k,1,pr,0)
+                var_d_l(k) = var_d_l(k) + d(k,j,i) * d(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Compute total variance from local variances
+       var_d(:) = 0.0_wp
+#if defined( __parallel ) 
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( var_d_l(0), var_d(0), nzt+1-nzb, MPI_REAL, MPI_SUM, &
+                           comm2d, ierr )
+#else
+       var_d(:) = var_d_l(:)
+#endif
+       var_d(:) = var_d(:) / ngp_2dh(0)
+
+    END SUBROUTINE preprocess_spectra
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_spectra_x( ddd, m )
+
+       USE fft_xy,                                                             &
+           ONLY:  fft_x_1d
+
+       USE grid_variables,                                                     &
+           ONLY:  dx
+
+       USE indices,                                                            &
+           ONLY:  nx, ny
+
+       USE kinds
+
+#if defined( __parallel )
+#if !defined( __mpifh )
+       USE MPI
+#endif
+#endif
+
+       USE pegrid,                                                             &
+           ONLY:  comm2d, ierr, myid
+
+       USE transpose_indices,                                                  &
+           ONLY:  nyn_x, nys_x, nzb_x, nzt_x
+
+
+       IMPLICIT NONE
+
+#if defined( __parallel )
+#if defined( __mpifh )
+       INCLUDE "mpif.h"
+#endif
+#endif
+
+       INTEGER(iwp) ::  i         !<
+       INTEGER(iwp) ::  j         !<
+       INTEGER(iwp) ::  k         !<
+       INTEGER(iwp) ::  m         !<
+       INTEGER(iwp) ::  n         !<
+
+       REAL(wp) ::  exponent     !<
+       REAL(wp) ::  sum_spec_dum !< wavenumber-integrated spectrum
+    
+       REAL(wp), DIMENSION(0:nx) ::  work !<
+    
+       REAL(wp), DIMENSION(0:nx/2) ::  sums_spectra_l !<
+    
+       REAL(wp), DIMENSION(0:nx/2,100) ::  sums_spectra !<
+    
+       REAL(wp), DIMENSION(0:nx,nys_x:nyn_x,nzb_x:nzt_x) ::  ddd !<
+
+!
+!--    Exponent for geometric average
+       exponent = 1.0_wp / ( ny + 1.0_wp )
+
+!
+!--    Loop over all levels defined by the user
+       n = 1
+       DO WHILE ( comp_spectra_level(n) /= 999999  .AND.  n <= 100 )
+
+          k = comp_spectra_level(n)
+
+!
+!--       Calculate FFT only if the corresponding level is situated on this PE
+          IF ( k >= nzb_x  .AND.  k <= nzt_x )  THEN
+          
+             DO  j = nys_x, nyn_x
+
+                work = ddd(0:nx,j,k)
+                CALL fft_x_1d( work, 'forward' )
+
+                ddd(0,j,k) = dx * work(0)**2
+                DO  i = 1, nx/2
+                   ddd(i,j,k) = dx * ( work(i)**2 + work(nx+1-i)**2 )
+                ENDDO
+
+             ENDDO
+
+!
+!--          Local sum and geometric average of these spectra
+!--          (WARNING: no global sum should be performed, because floating
+!--          point overflow may occur)
+             DO  i = 0, nx/2
+
+                sums_spectra_l(i) = 1.0_wp
+                DO  j = nys_x, nyn_x
+                   sums_spectra_l(i) = sums_spectra_l(i) * ddd(i,j,k)**exponent
+                ENDDO
+
+             ENDDO
+          
+          ELSE
+
+             sums_spectra_l = 1.0_wp
+
+          ENDIF
+
+!
+!--       Global sum of spectra on PE0 (from where they are written on file)
+          sums_spectra(:,n) = 0.0_wp
+#if defined( __parallel )   
+          CALL MPI_BARRIER( comm2d, ierr )  ! Necessary?
+          CALL MPI_REDUCE( sums_spectra_l(0), sums_spectra(0,n), nx/2+1,       &
+                           MPI_REAL, MPI_PROD, 0, comm2d, ierr )
+#else
+          sums_spectra(:,n) = sums_spectra_l
+#endif
+!
+!--       Normalize spectra by variance
+          sum_spec_dum = SUM( sums_spectra(1:nx/2,n) )
+
+          IF ( sum_spec_dum /= 0.0_wp )  THEN
+             sums_spectra(1:nx/2,n) = sums_spectra(1:nx/2,n) *                 &
+                                      var_d(k) / sum_spec_dum
+          ENDIF
+          n = n + 1
+
+       ENDDO
+       n = n - 1
+
+       IF ( myid == 0 )  THEN
+!
+!--       Sum of spectra for later averaging (see routine data_output_spectra)
+          DO  i = 1, nx/2
+             DO k = 1, n
+                spectrum_x(i,k,m) = spectrum_x(i,k,m) + sums_spectra(i,k)
+             ENDDO
+          ENDDO
+
+       ENDIF
+!
+!--    n_sp_x is needed by data_output_spectra_x
+       n_sp_x = n
+
+    END SUBROUTINE calc_spectra_x
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_spectra_y( ddd, m )
+
+       USE fft_xy,                                                             &
+           ONLY:  fft_y_1d
+
+       USE grid_variables,                                                     &
+           ONLY:  dy
+
+       USE indices,                                                            &
+           ONLY:  nx, ny
+
+       USE kinds
+
+#if defined( __parallel )
+#if !defined( __mpifh )
+       USE MPI
+#endif
+#endif
+
+       USE pegrid,                                                             &
+           ONLY:  comm2d, ierr, myid
+
+       USE transpose_indices,                                                  &
+           ONLY:  nxl_yd, nxr_yd, nzb_yd, nzt_yd
+
+
+       IMPLICIT NONE
+
+#if defined( __parallel )
+#if defined( __mpifh )
+       INCLUDE "mpif.h"
+#endif
+#endif
+
+       INTEGER(iwp) ::  i         !<
+       INTEGER(iwp) ::  j         !<
+       INTEGER(iwp) ::  k         !<
+       INTEGER(iwp) ::  m         !<
+       INTEGER(iwp) ::  n         !<
+
+       REAL(wp) ::  exponent !<
+       REAL(wp) ::  sum_spec_dum !< wavenumber-integrated spectrum
+    
+       REAL(wp), DIMENSION(0:ny) ::  work !<
+    
+       REAL(wp), DIMENSION(0:ny/2) ::  sums_spectra_l !<
+    
+       REAL(wp), DIMENSION(0:ny/2,100) ::  sums_spectra !<
+    
+       REAL(wp), DIMENSION(0:ny,nxl_yd:nxr_yd,nzb_yd:nzt_yd) :: ddd !<
+
+
+!
+!--    Exponent for geometric average
+       exponent = 1.0_wp / ( nx + 1.0_wp )
+
+!
+!--    Loop over all levels defined by the user
+       n = 1
+       DO WHILE ( comp_spectra_level(n) /= 999999  .AND.  n <= 100 )
+
+          k = comp_spectra_level(n)
+
+!
+!--       Calculate FFT only if the corresponding level is situated on this PE
+          IF ( k >= nzb_yd  .AND.  k <= nzt_yd )  THEN
+          
+             DO  i = nxl_yd, nxr_yd
+
+                work = ddd(0:ny,i,k)
+                CALL fft_y_1d( work, 'forward' )
+
+                ddd(0,i,k) = dy * work(0)**2
+                DO  j = 1, ny/2
+                   ddd(j,i,k) = dy * ( work(j)**2 + work(ny+1-j)**2 )
+                ENDDO
+
+             ENDDO
+
+!
+!--          Local sum and geometric average of these spectra
+!--          (WARNING: no global sum should be performed, because floating
+!--          point overflow may occur)
+             DO  j = 0, ny/2
+
+                sums_spectra_l(j) = 1.0_wp
+                DO  i = nxl_yd, nxr_yd
+                   sums_spectra_l(j) = sums_spectra_l(j) * ddd(j,i,k)**exponent
+                ENDDO
+
+             ENDDO
+          
+          ELSE
+
+             sums_spectra_l = 1.0_wp
+
+          ENDIF
+
+!
+!--       Global sum of spectra on PE0 (from where they are written on file)
+          sums_spectra(:,n) = 0.0_wp
+#if defined( __parallel )   
+          CALL MPI_BARRIER( comm2d, ierr )  ! Necessary?
+          CALL MPI_REDUCE( sums_spectra_l(0), sums_spectra(0,n), ny/2+1,       &
+                           MPI_REAL, MPI_PROD, 0, comm2d, ierr )
+#else
+          sums_spectra(:,n) = sums_spectra_l
+#endif
+!
+!--       Normalize spectra by variance
+          sum_spec_dum = SUM( sums_spectra(1:ny/2,n) )
+          IF ( sum_spec_dum /= 0.0_wp )  THEN
+             sums_spectra(1:ny/2,n) = sums_spectra(1:ny/2,n) *                 &
+                                      var_d(k) / sum_spec_dum
+          ENDIF
+          n = n + 1
+
+       ENDDO
+       n = n - 1
+
+
+       IF ( myid == 0 )  THEN
+!
+!--       Sum of spectra for later averaging (see routine data_output_spectra)
+          DO  j = 1, ny/2
+             DO k = 1, n
+                spectrum_y(j,k,m) = spectrum_y(j,k,m) + sums_spectra(j,k)
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+!
+!--    n_sp_y is needed by data_output_spectra_y
+       n_sp_y = n
+
+    END SUBROUTINE calc_spectra_y
+
+ END MODULE spectra_mod
Index: /palm/tags/release-6.0/SOURCE/subsidence_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/subsidence_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/subsidence_mod.f90	(revision 3477)
@@ -0,0 +1,426 @@
+!> @file subsidence_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! small message change
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! ocean renamed ocean_mode
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1862 2016-04-14 09:07:42Z hoffmann
+! Bugfix: In case of vector machine optimized model runs, sums_ls_l should not 
+! be addressed if large_scale_forcing is false because sums_ls_l is not 
+! allocated. 
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 1729 2015-11-20 11:01:48Z gronemeier
+! Bugfix: shifting of initial profiles only once each time step
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1489 2014-10-30 08:09:12Z raasch
+! bugfix: sums_ls_l can only be used if large_scale_forcing is switched on
+!
+! 1382 2014-04-30 12:15:41Z boeske
+! Changed the weighting factor that is used in the summation of subsidence 
+! tendencies for profile data output from weight_pres to weight_substep
+! added Neumann boundary conditions for profile data output of subsidence terms
+! at nzt+1
+! 
+! 1380 2014-04-28 12:40:45Z heinze
+! Shifting only necessary in case of scalar Rayleigh damping
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Summation of subsidence tendencies for data output added 
+! +ls_index, sums_ls_l, tmp_tend
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 3.7 2009-12-11 14:15:58Z heinze
+! Initial revision 
+!
+! Description:
+! ------------
+!> Impact of large-scale subsidence or ascent as tendency term for use 
+!> in the prognostic equation of potential temperature. This enables the 
+!> construction of a constant boundary layer height z_i with time.
+!-----------------------------------------------------------------------------!
+ MODULE subsidence_mod
+ 
+
+
+    IMPLICIT NONE
+
+    PRIVATE
+    PUBLIC  init_w_subsidence, subsidence
+
+    INTERFACE init_w_subsidence
+       MODULE PROCEDURE init_w_subsidence
+    END INTERFACE init_w_subsidence
+
+    INTERFACE subsidence
+       MODULE PROCEDURE subsidence
+       MODULE PROCEDURE subsidence_ij
+    END INTERFACE subsidence
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_w_subsidence 
+
+       USE arrays_3d,                                                          &
+           ONLY:  dzu, w_subs, zu
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string, ocean_mode, subs_vertical_gradient,          &
+                  subs_vertical_gradient_level, subs_vertical_gradient_level_i
+
+       USE indices,                                                            &
+           ONLY:  nzb, nzt
+
+       USE kinds
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i !< 
+       INTEGER(iwp) ::  k !< 
+
+       REAL(wp)     ::  gradient   !< 
+       REAL(wp)     ::  ws_surface !< 
+
+       IF ( .NOT. ALLOCATED( w_subs ) )  THEN
+          ALLOCATE( w_subs(nzb:nzt+1) )
+          w_subs = 0.0_wp
+       ENDIF 
+
+       IF ( ocean_mode )  THEN
+          message_string = 'applying large scale vertical motion is not ' //   &
+                           'allowed for ocean mode'
+          CALL message( 'init_w_subsidence', 'PA0324', 2, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--   Compute the profile of the subsidence/ascent velocity 
+!--   using the given gradients
+      i = 1
+      gradient = 0.0_wp
+      ws_surface = 0.0_wp
+      
+
+      subs_vertical_gradient_level_i(1) = 0
+      DO  k = 1, nzt+1
+         IF ( i < 11 )  THEN
+            IF ( subs_vertical_gradient_level(i) < zu(k)  .AND. &
+                 subs_vertical_gradient_level(i) >= 0.0_wp )  THEN
+               gradient = subs_vertical_gradient(i) / 100.0_wp
+               subs_vertical_gradient_level_i(i) = k - 1
+               i = i + 1
+            ENDIF
+         ENDIF
+         IF ( gradient /= 0.0_wp )  THEN
+            IF ( k /= 1 )  THEN
+               w_subs(k) = w_subs(k-1) + dzu(k) * gradient
+            ELSE
+               w_subs(k) = ws_surface   + 0.5_wp * dzu(k) * gradient
+            ENDIF
+         ELSE
+            w_subs(k) = w_subs(k-1)
+         ENDIF
+      ENDDO
+
+!
+!--   In case of no given gradients for the subsidence/ascent velocity,
+!--   choose zero gradient
+      IF ( subs_vertical_gradient_level(1) == -9999999.9_wp )  THEN
+         subs_vertical_gradient_level(1) = 0.0_wp
+      ENDIF
+
+    END SUBROUTINE init_w_subsidence
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE subsidence( tendency, var, var_init, ls_index ) 
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, w_subs
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, intermediate_timestep_count, large_scale_forcing,     &
+                  scalar_rayleigh_damping
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,        &
+                  wall_flags_0
+
+       USE kinds
+
+       USE statistics,                                                         &
+           ONLY:  sums_ls_l, weight_substep
+
+       IMPLICIT NONE
+ 
+       INTEGER(iwp) ::  i !< 
+       INTEGER(iwp) ::  j !< 
+       INTEGER(iwp) ::  k !< 
+       INTEGER(iwp) ::  ls_index !<
+
+       REAL(wp)     ::  tmp_tend !<
+       REAL(wp)     ::  tmp_grad !< 
+    
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var      !< 
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  tendency !< 
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  var_init                     !< 
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  var_mod                      !< 
+
+       var_mod = var_init
+
+!
+!--    Influence of w_subsidence on the current tendency term
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             DO  k = nzb+1, nzt 
+                IF ( w_subs(k) < 0.0_wp )  THEN    ! large-scale subsidence
+                   tmp_tend = - w_subs(k) *                                    &
+                              ( var(k+1,j,i) - var(k,j,i) ) * ddzu(k+1) *      &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ELSE                               ! large-scale ascent
+                   tmp_tend = - w_subs(k) *                                    &
+                              ( var(k,j,i) - var(k-1,j,i) ) * ddzu(k) *        &
+                                        MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDIF
+
+                tendency(k,j,i) = tendency(k,j,i) + tmp_tend
+
+                IF ( large_scale_forcing )  THEN
+                   sums_ls_l(k,ls_index) = sums_ls_l(k,ls_index) + tmp_tend    &
+                                 * weight_substep(intermediate_timestep_count) &
+                                 * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDIF
+             ENDDO
+
+             IF ( large_scale_forcing )  THEN
+                sums_ls_l(nzt+1,ls_index) = sums_ls_l(nzt,ls_index)
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+!
+!--    Shifting of the initial profile is especially necessary with Rayleigh 
+!--    damping switched on
+       IF ( scalar_rayleigh_damping .AND.                                      &
+            intermediate_timestep_count == 1 )  THEN
+          DO  k = nzb, nzt
+             IF ( w_subs(k) < 0.0_wp )  THEN      ! large-scale subsidence
+                var_mod(k) = var_init(k) - dt_3d * w_subs(k) *  &
+                                  ( var_init(k+1) - var_init(k) ) * ddzu(k+1)
+             ENDIF
+          ENDDO
+!
+!--      At the upper boundary, the initial profile is shifted with aid of 
+!--      the gradient tmp_grad. (This is ok if the gradients are linear.)
+         IF ( w_subs(nzt) < 0.0_wp )  THEN
+            tmp_grad = ( var_init(nzt+1) - var_init(nzt) ) * ddzu(nzt+1)
+            var_mod(nzt+1) = var_init(nzt+1) -  &
+                                 dt_3d * w_subs(nzt+1) * tmp_grad
+         ENDIF
+       
+
+         DO  k = nzt+1, nzb+1, -1
+            IF ( w_subs(k) >= 0.0_wp )  THEN  ! large-scale ascent
+               var_mod(k) = var_init(k) - dt_3d * w_subs(k) *  &
+                                  ( var_init(k) - var_init(k-1) ) * ddzu(k) 
+            ENDIF
+         ENDDO
+!
+!--      At the lower boundary shifting is not necessary because the 
+!--      subsidence velocity w_subs(nzb) vanishes.
+         IF ( w_subs(nzb+1) >= 0.0_wp )  THEN
+            var_mod(nzb) = var_init(nzb)
+         ENDIF
+
+         var_init = var_mod
+      ENDIF
+
+
+ END SUBROUTINE subsidence
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+ SUBROUTINE subsidence_ij( i, j, tendency, var, var_init, ls_index ) 
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, w_subs
+
+       USE control_parameters,                                                 &
+           ONLY:  dt_3d, intermediate_timestep_count, large_scale_forcing,     &
+                  scalar_rayleigh_damping
+
+       USE indices,                                                            &
+           ONLY:  nxl, nxlg, nxrg, nyng, nys, nysg, nzb, nzt, wall_flags_0
+
+       USE kinds
+
+       USE statistics,                                                         &
+           ONLY:  sums_ls_l, weight_substep
+
+       IMPLICIT NONE
+ 
+       INTEGER(iwp) ::  i !< 
+       INTEGER(iwp) ::  j !< 
+       INTEGER(iwp) ::  k !< 
+       INTEGER(iwp) ::  ls_index !<
+
+       REAL(wp)     ::  tmp_tend !<
+       REAL(wp)     ::  tmp_grad !< 
+    
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var      !< 
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  tendency !< 
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  var_init                     !< 
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  var_mod                      !< 
+
+       var_mod = var_init
+
+!
+!--    Influence of w_subsidence on the current tendency term
+       DO  k = nzb+1, nzt 
+          IF ( w_subs(k) < 0.0_wp )  THEN      ! large-scale subsidence
+             tmp_tend = - w_subs(k) * ( var(k+1,j,i) - var(k,j,i) )            &
+                                    * ddzu(k+1)                                &
+                                    * MERGE( 1.0_wp, 0.0_wp,                   &
+                                             BTEST( wall_flags_0(k,j,i), 0 ) )
+          ELSE                                 ! large-scale ascent
+             tmp_tend = - w_subs(k) * ( var(k,j,i) - var(k-1,j,i) ) * ddzu(k)  &
+                                    * MERGE( 1.0_wp, 0.0_wp,                   &
+                                             BTEST( wall_flags_0(k,j,i), 0 ) )
+          ENDIF
+
+          tendency(k,j,i) = tendency(k,j,i) + tmp_tend
+
+          IF ( large_scale_forcing )  THEN
+             sums_ls_l(k,ls_index) = sums_ls_l(k,ls_index) + tmp_tend          &
+                                  * weight_substep(intermediate_timestep_count)&
+                                  * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,j,i), 0 ) )
+          ENDIF
+       ENDDO
+
+       IF ( large_scale_forcing )  THEN
+          sums_ls_l(nzt+1,ls_index) = sums_ls_l(nzt,ls_index)
+       ENDIF
+
+!
+!--    Shifting of the initial profile is especially necessary with Rayleigh 
+!--    damping switched on
+       IF ( scalar_rayleigh_damping .AND.                                      &
+            intermediate_timestep_count == 1 )  THEN
+          IF ( i == nxl .AND. j == nys )  THEN ! shifting only once per PE 
+
+             DO  k = nzb, nzt
+                IF ( w_subs(k) < 0.0_wp )  THEN      ! large-scale subsidence
+                   var_mod(k) = var_init(k) - dt_3d * w_subs(k) *  &
+                                     ( var_init(k+1) - var_init(k) ) * ddzu(k+1)
+                ENDIF
+             ENDDO
+!
+!--          At the upper boundary, the initial profile is shifted with aid of 
+!--          the gradient tmp_grad. (This is ok if the gradients are linear.)
+             IF ( w_subs(nzt) < 0.0_wp )  THEN
+                tmp_grad = ( var_init(nzt+1) - var_init(nzt) ) * ddzu(nzt+1)
+                var_mod(nzt+1) = var_init(nzt+1) -  &
+                                     dt_3d * w_subs(nzt+1) * tmp_grad
+             ENDIF
+       
+
+             DO  k = nzt+1, nzb+1, -1
+                IF ( w_subs(k) >= 0.0_wp )  THEN  ! large-scale ascent
+                   var_mod(k) = var_init(k) - dt_3d * w_subs(k) *  &
+                                      ( var_init(k) - var_init(k-1) ) * ddzu(k)
+                ENDIF
+             ENDDO
+!
+!--          At the lower boundary shifting is not necessary because the 
+!--          subsidence velocity w_subs(nzb) vanishes.
+             IF ( w_subs(nzb+1) >= 0.0_wp )  THEN
+                var_mod(nzb) = var_init(nzb)
+             ENDIF
+
+             var_init = var_mod 
+
+          ENDIF
+       ENDIF
+
+ END SUBROUTINE subsidence_ij
+
+
+ END MODULE subsidence_mod
Index: /palm/tags/release-6.0/SOURCE/sum_up_3d_data.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/sum_up_3d_data.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/sum_up_3d_data.f90	(revision 3477)
@@ -0,0 +1,1233 @@
+!> @file sum_up_3d_data.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Adjustment of biometeorology calls
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Renamed output variables
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! (from branch resler)
+! Add biometeorology,
+! fix chemistry output call,
+! move usm calls
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3291 2018-09-28 11:33:03Z scharf
+! corrected previous commit for 3D topography
+! 
+! 3285 2018-09-27 17:16:52Z scharf
+! bugfix for shf_av and qsws_av
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3176 2018-07-26 17:12:48Z suehring
+! Remove output of latent heat flux at urban-surfaces and set fill values 
+! instead 
+! 
+! 3173 2018-07-26 12:55:23Z suehring
+! Bugfix for last commit
+! 
+! 3170 2018-07-25 15:19:37Z suehring
+! Revise output of surface quantities in case of overhanging structures
+! 
+! 3151 2018-07-19 08:45:38Z raasch
+! Remaining preprocessor directive __chem removed
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! prr field added to ONLY-list, prr* case/pr* case/precipitation_rate_av 
+! removed, further allocation checks implemented
+! 
+! 2963 2018-04-12 14:47:44Z suehring
+! Introduce index for vegetation/wall, pavement/green-wall and water/window 
+! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Changed comment
+! 
+! 2817 2018-02-19 16:32:21Z suehring
+! Preliminary gust module interface implemented
+! 
+! 2798 2018-02-09 17:16:39Z suehring
+! Consider also default-type surfaces for surface temperature output. 
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! Enable output of ground-heat flux also at urban surfaces.
+! 
+! 2790 2018-02-06 11:57:19Z suehring
+! Bugfix in summation of surface sensible and latent heat flux
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2743 2018-01-12 16:03:39Z suehring
+! In case of natural- and urban-type surfaces output surfaces fluxes in W/m2.
+! 
+! 2742 2018-01-12 14:59:47Z suehring
+! Enable output of surface temperature
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! output of r_a moved from land-surface to consider also urban-type surfaces
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Implementation of uv exposure model (FK)
+! - output of diss_av, kh_av, km_av (turbulence_closure_mod) (TG)
+! - Implementation of chemistry module (FK)
+! - Workaround for sum-up usm arrays in case of restart runs, to avoid program 
+!   crash (MS)
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new surface concept
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean and rho_av to rho_ocean_av
+! 
+! 2024 2016-10-12 16:42:37Z kanani
+! Added missing CASE for ssws*
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters,
+! changed prefix for urban surface model output to "usm_",
+! introduced control parameter varnamelength for LEN of trimvar.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added support for new urban surface model (temporary modifications of 
+! SELECT CASE ( ) necessary, see variable trimvar),
+! added comments in variable declaration section
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! Bugfix in summation of passive scalar
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Radiation actions are now done directly in the respective module
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Land surface actions are now done directly in the respective module
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Scalar surface flux added
+! 
+! 1949 2016-06-17 07:19:16Z maronga
+! Bugfix: calculation of lai_av, c_veg_av and c_liq_av.
+! 
+! 1849 2016-04-08 11:33:18Z hoffmann
+! precipitation_rate moved to arrays_3d
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Added z0q and z0q_av
+! 
+! 1693 2015-10-27 08:35:45Z maronga
+! Last revision text corrected
+! 
+! 1691 2015-10-26 16:17:44Z maronga
+! Added output of Obukhov length and radiative heating rates for RRTMG. 
+! Corrected output of liquid water path.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Adapted for RRTMG
+! 
+! 1555 2015-03-04 17:44:27Z maronga
+! Added output of r_a and r_s
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added support for land surface model and radiation model data.
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! barrier argument removed from cpu_log,
+! module interfaces removed
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! ql is calculated by calc_liquid_water_content
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! +nr, prr, qr
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1007 2012-09-19 14:30:36Z franke
+! Bugfix in calculation of ql_vp
+!
+! 978 2012-08-09 08:28:32Z fricke
+! +z0h*
+!
+! Revision 1.1  2006/02/23 12:55:23  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Sum-up the values of 3d-arrays. The real averaging is later done in routine
+!> average_3d_data. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE sum_up_3d_data
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, d_exner, e, heatflux_output_conversion, nc, nr, p, prr,    &
+               pt, q, qc, ql, ql_c, ql_v, qr, s, u, v, vpt, w,                 &
+               waterflux_output_conversion
+
+    USE averaging,                                                             &
+        ONLY:  e_av, ghf_av, lpt_av, lwp_av, ol_av, p_av, pc_av, pr_av, pt_av, &
+               q_av, ql_av, ql_c_av, ql_v_av, ql_vp_av, qsws_av, qv_av,        &
+               r_a_av, s_av, shf_av, ssws_av, ts_av, tsurf_av, u_av, us_av,    &
+               v_av, vpt_av, w_av, z0_av, z0h_av, z0q_av
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, lv_d_cp, l_v
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_3d_data_averaging
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_3d_data_averaging
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_3d_data_averaging
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, average_count_3d, biometeorology, doav, doav_n,  &
+               land_surface, ocean_mode, rho_surface, urban_surface,           &
+               uv_exposure, varnamelength
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE gust_mod,                                                              &
+        ONLY:  gust_3d_data_averaging, gust_module_enabled
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt 
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_3d_data_averaging
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_3d_data_averaging
+
+    USE particle_attributes,                                                   &
+        ONLY:  grid_particles, number_of_particles, particles, prt_count
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  radiation, radiation_3d_data_averaging
+         
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_3d_data_averaging          
+
+    USE surface_mod,                                                           &
+        ONLY:  ind_pav_green, ind_veg_wall, ind_wat_win,                       &
+               surf_def_h, surf_lsm_h, surf_usm_h
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_3d_data_averaging
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_average_3d_data
+
+    USE uv_exposure_model_mod,                                                &
+        ONLY:  uvem_3d_data_averaging
+
+
+    IMPLICIT NONE
+
+    LOGICAL      ::  match_def !< flag indicating default-type surface
+    LOGICAL      ::  match_lsm !< flag indicating natural-type surface
+    LOGICAL      ::  match_usm !< flag indicating urban-type surface
+    
+    INTEGER(iwp) ::  i   !< grid index x direction
+    INTEGER(iwp) ::  ii  !< running index
+    INTEGER(iwp) ::  j   !< grid index y direction
+    INTEGER(iwp) ::  k   !< grid index x direction
+    INTEGER(iwp) ::  m   !< running index surface type
+    INTEGER(iwp) ::  n   !< 
+
+    REAL(wp)     ::  mean_r !< 
+    REAL(wp)     ::  s_r2   !< 
+    REAL(wp)     ::  s_r3   !< 
+
+    CHARACTER (LEN=varnamelength) ::  trimvar  !< TRIM of output-variable string
+
+
+    CALL cpu_log (log_point(34),'sum_up_3d_data','start')
+
+!
+!-- Allocate and initialize the summation arrays if called for the very first
+!-- time or the first time after average_3d_data has been called 
+!-- (some or all of the arrays may have been already allocated
+!-- in rrd_local)
+    IF ( average_count_3d == 0 )  THEN
+
+       DO  ii = 1, doav_n
+
+          trimvar = TRIM( doav(ii) )
+
+          SELECT CASE ( trimvar )
+
+             CASE ( 'ghf*' )
+                IF ( .NOT. ALLOCATED( ghf_av ) )  THEN
+                   ALLOCATE( ghf_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ghf_av = 0.0_wp
+
+             CASE ( 'e' )
+                IF ( .NOT. ALLOCATED( e_av ) )  THEN
+                   ALLOCATE( e_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                e_av = 0.0_wp
+
+             CASE ( 'thetal' )
+                IF ( .NOT. ALLOCATED( lpt_av ) )  THEN
+                   ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                lpt_av = 0.0_wp
+
+             CASE ( 'lwp*' )
+                IF ( .NOT. ALLOCATED( lwp_av ) )  THEN
+                   ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                lwp_av = 0.0_wp
+
+             CASE ( 'ol*' )
+                IF ( .NOT. ALLOCATED( ol_av ) )  THEN
+                   ALLOCATE( ol_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ol_av = 0.0_wp
+
+             CASE ( 'p' )
+                IF ( .NOT. ALLOCATED( p_av ) )  THEN
+                   ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                p_av = 0.0_wp
+
+             CASE ( 'pc' )
+                IF ( .NOT. ALLOCATED( pc_av ) )  THEN
+                   ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                pc_av = 0.0_wp
+
+             CASE ( 'pr' )
+                IF ( .NOT. ALLOCATED( pr_av ) )  THEN
+                   ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                pr_av = 0.0_wp
+
+             CASE ( 'theta' )
+                IF ( .NOT. ALLOCATED( pt_av ) )  THEN
+                   ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                pt_av = 0.0_wp
+
+             CASE ( 'q' )
+                IF ( .NOT. ALLOCATED( q_av ) )  THEN
+                   ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                q_av = 0.0_wp
+
+             CASE ( 'ql' )
+                IF ( .NOT. ALLOCATED( ql_av ) )  THEN
+                   ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ql_av = 0.0_wp
+
+             CASE ( 'ql_c' )
+                IF ( .NOT. ALLOCATED( ql_c_av ) )  THEN
+                   ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ql_c_av = 0.0_wp
+
+             CASE ( 'ql_v' )
+                IF ( .NOT. ALLOCATED( ql_v_av ) )  THEN
+                   ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ql_v_av = 0.0_wp
+
+             CASE ( 'ql_vp' )
+                IF ( .NOT. ALLOCATED( ql_vp_av ) )  THEN
+                   ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ql_vp_av = 0.0_wp
+
+             CASE ( 'qsws*' )
+                IF ( .NOT. ALLOCATED( qsws_av ) )  THEN
+                   ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qsws_av = 0.0_wp
+
+             CASE ( 'qv' )
+                IF ( .NOT. ALLOCATED( qv_av ) )  THEN
+                   ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                qv_av = 0.0_wp
+
+             CASE ( 'r_a*' )
+                IF ( .NOT. ALLOCATED( r_a_av ) )  THEN
+                   ALLOCATE( r_a_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                r_a_av = 0.0_wp
+
+             CASE ( 's' )
+                IF ( .NOT. ALLOCATED( s_av ) )  THEN
+                   ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                s_av = 0.0_wp
+
+             CASE ( 'shf*' )
+                IF ( .NOT. ALLOCATED( shf_av ) )  THEN
+                   ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                shf_av = 0.0_wp
+                
+             CASE ( 'ssws*' )
+                IF ( .NOT. ALLOCATED( ssws_av ) )  THEN
+                   ALLOCATE( ssws_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ssws_av = 0.0_wp                
+
+             CASE ( 't*' )
+                IF ( .NOT. ALLOCATED( ts_av ) )  THEN
+                   ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                ts_av = 0.0_wp
+
+             CASE ( 'tsurf*' )
+                IF ( .NOT. ALLOCATED( tsurf_av ) )  THEN
+                   ALLOCATE( tsurf_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                tsurf_av = 0.0_wp
+
+             CASE ( 'u' )
+                IF ( .NOT. ALLOCATED( u_av ) )  THEN
+                   ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                u_av = 0.0_wp
+
+             CASE ( 'us*' )
+                IF ( .NOT. ALLOCATED( us_av ) )  THEN
+                   ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                us_av = 0.0_wp
+
+             CASE ( 'v' )
+                IF ( .NOT. ALLOCATED( v_av ) )  THEN
+                   ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                v_av = 0.0_wp
+
+             CASE ( 'thetav' )
+                IF ( .NOT. ALLOCATED( vpt_av ) )  THEN
+                   ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                vpt_av = 0.0_wp
+
+             CASE ( 'w' )
+                IF ( .NOT. ALLOCATED( w_av ) )  THEN
+                   ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                w_av = 0.0_wp
+
+             CASE ( 'z0*' )
+                IF ( .NOT. ALLOCATED( z0_av ) )  THEN
+                   ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                z0_av = 0.0_wp
+
+             CASE ( 'z0h*' )
+                IF ( .NOT. ALLOCATED( z0h_av ) )  THEN
+                   ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                z0h_av = 0.0_wp
+
+             CASE ( 'z0q*' )
+                IF ( .NOT. ALLOCATED( z0q_av ) )  THEN
+                   ALLOCATE( z0q_av(nysg:nyng,nxlg:nxrg) )
+                ENDIF
+                z0q_av = 0.0_wp
+
+
+             CASE DEFAULT
+
+!
+!--             Allocating and initializing data arrays for other modules
+
+                IF ( air_chemistry  .AND. &
+                     (trimvar(1:3) == 'kc_' .OR. trimvar(1:3) == 'em_') )  THEN
+                   CALL chem_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( bulk_cloud_model )  THEN
+                   CALL bcm_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( gust_module_enabled )  THEN
+                   CALL gust_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( biometeorology  .AND.  trimvar(1:5) == 'biom_')  THEN
+                   CALL biom_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( land_surface )  THEN
+                   CALL lsm_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( ocean_mode )  THEN
+                   CALL ocean_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( radiation )  THEN
+                   CALL radiation_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+                
+!
+!--             SALSA quantity
+                IF ( salsa )  THEN
+                   CALL salsa_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF                
+
+                CALL tcm_3d_data_averaging( 'allocate', doav(ii) )
+
+                IF ( urban_surface  .AND.  trimvar(1:4) == 'usm_' )  THEN
+                   CALL usm_average_3d_data( 'allocate', doav(ii) )
+                ENDIF
+
+                IF ( uv_exposure  .AND.  trimvar(1:5) == 'uvem_')  THEN
+                   CALL uvem_3d_data_averaging( 'allocate', doav(ii) )
+                ENDIF
+
+!
+!--             User-defined quantities
+                CALL user_3d_data_averaging( 'allocate', doav(ii) )
+
+          END SELECT
+
+       ENDDO
+
+    ENDIF
+
+!
+!-- Loop of all variables to be averaged.
+    DO  ii = 1, doav_n
+
+       trimvar = TRIM( doav(ii) )
+!
+!--    Store the array chosen on the temporary array.
+       SELECT CASE ( trimvar )
+
+          CASE ( 'ghf*' )
+             IF ( ALLOCATED( ghf_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+!
+!--                   Check whether grid point is a natural- or urban-type 
+!--                   surface.
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+!
+!--                   In order to avoid double-counting of surface properties,
+!--                   always assume that natural-type surfaces are below urban-
+!--                   type surfaces, e.g. in case of bridges.
+!--                   Further, take only the last suface element, i.e. the
+!--                   uppermost surface which would be visible from above
+                      IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         ghf_av(j,i) = ghf_av(j,i) +                           &
+                                         surf_lsm_h%ghf(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         ghf_av(j,i) = ghf_av(j,i) +                           &
+                                         surf_usm_h%frac(ind_veg_wall,m)  *    &
+                                         surf_usm_h%wghf_eb(m)        +        &
+                                         surf_usm_h%frac(ind_pav_green,m) *    &
+                                         surf_usm_h%wghf_eb_green(m)  +        &
+                                         surf_usm_h%frac(ind_wat_win,m)   *    &
+                                         surf_usm_h%wghf_eb_window(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'e' )
+             IF ( ALLOCATED( e_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         e_av(k,j,i) = e_av(k,j,i) + e(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'thetal' )
+             IF ( ALLOCATED( lpt_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         lpt_av(k,j,i) = lpt_av(k,j,i) + pt(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'lwp*' )
+             IF ( ALLOCATED( lwp_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      lwp_av(j,i) = lwp_av(j,i) + SUM( ql(nzb:nzt,j,i)            &
+                                                  * dzw(1:nzt+1) ) * rho_surface
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ol*' )
+             IF ( ALLOCATED( ol_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         ol_av(j,i) = ol_av(j,i) +                             &
+                                         surf_def_h(0)%ol(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         ol_av(j,i) = ol_av(j,i) +                             &
+                                         surf_lsm_h%ol(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         ol_av(j,i) = ol_av(j,i) +                             &
+                                         surf_usm_h%ol(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'p' )
+             IF ( ALLOCATED( p_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         p_av(k,j,i) = p_av(k,j,i) + p(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'pc' )
+             IF ( ALLOCATED( pc_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         pc_av(k,j,i) = pc_av(k,j,i) + prt_count(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'pr' )
+             IF ( ALLOCATED( pr_av ) ) THEN
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         number_of_particles = prt_count(k,j,i)
+                         IF ( number_of_particles <= 0 )  CYCLE
+                         particles =>                                          &
+                         grid_particles(k,j,i)%particles(1:number_of_particles)
+                         s_r2 = 0.0_wp
+                         s_r3 = 0.0_wp
+
+                         DO  n = 1, number_of_particles
+                            IF ( particles(n)%particle_mask )  THEN
+                               s_r2 = s_r2 + particles(n)%radius**2 *          &
+                                   particles(n)%weight_factor
+                               s_r3 = s_r3 + particles(n)%radius**3 *          &
+                                   particles(n)%weight_factor
+                            ENDIF
+                         ENDDO
+
+                         IF ( s_r2 > 0.0_wp )  THEN
+                            mean_r = s_r3 / s_r2
+                         ELSE
+                            mean_r = 0.0_wp
+                         ENDIF
+                         pr_av(k,j,i) = pr_av(k,j,i) + mean_r
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'theta' )
+             IF ( ALLOCATED( pt_av ) ) THEN
+                IF ( .NOT. bulk_cloud_model ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                            pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ELSE
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                            pt_av(k,j,i) = pt_av(k,j,i) + pt(k,j,i) + lv_d_cp * &
+                                                          d_exner(k) * ql(k,j,i)
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDIF
+             ENDIF
+
+          CASE ( 'q' )
+             IF ( ALLOCATED( q_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         q_av(k,j,i) = q_av(k,j,i) + q(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql' )
+             IF ( ALLOCATED( ql_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_av(k,j,i) = ql_av(k,j,i) + ql(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql_c' )
+             IF ( ALLOCATED( ql_c_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_c_av(k,j,i) = ql_c_av(k,j,i) + ql_c(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql_v' )
+             IF ( ALLOCATED( ql_v_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         ql_v_av(k,j,i) = ql_v_av(k,j,i) + ql_v(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ql_vp' )
+             IF ( ALLOCATED( ql_vp_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      DO  k = nzb, nzt+1
+                         number_of_particles = prt_count(k,j,i)
+                         IF ( number_of_particles <= 0 )  CYCLE
+                         particles =>                                          & 
+                         grid_particles(k,j,i)%particles(1:number_of_particles)
+                         DO  n = 1, number_of_particles
+                            IF ( particles(n)%particle_mask )  THEN
+                               ql_vp_av(k,j,i) = ql_vp_av(k,j,i) + &
+                                                 particles(n)%weight_factor /  &
+                                                 number_of_particles
+                            ENDIF
+                         ENDDO
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qsws*' )
+!
+!--          In case of default surfaces, clean-up flux by density.
+!--          In case of land- and urban-surfaces, convert fluxes into
+!--          dynamic units.
+             IF ( ALLOCATED( qsws_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         qsws_av(j,i) = qsws_av(j,i) +                         &
+                                         surf_def_h(0)%qsws(m) *               &
+                                         waterflux_output_conversion(nzb)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         qsws_av(j,i) = qsws_av(j,i) +                         &
+                                         surf_lsm_h%qsws(m) * l_v
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'qv' )
+             IF ( ALLOCATED( qv_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         qv_av(k,j,i) = qv_av(k,j,i) + q(k,j,i) - ql(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'r_a*' )
+             IF ( ALLOCATED( r_a_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         r_a_av(j,i) = r_a_av(j,i) +                           &
+                                         surf_lsm_h%r_a(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         r_a_av(j,i) = r_a_av(j,i) +                           &
+                                         surf_usm_h%frac(ind_veg_wall,m)  *    &
+                                         surf_usm_h%r_a(m)       +             & 
+                                         surf_usm_h%frac(ind_pav_green,m) *    &
+                                         surf_usm_h%r_a_green(m) +             & 
+                                         surf_usm_h%frac(ind_wat_win,m)   *    &
+                                         surf_usm_h%r_a_window(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 's' )
+             IF ( ALLOCATED( s_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         s_av(k,j,i) = s_av(k,j,i) + s(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'shf*' )
+!
+!--          In case of default surfaces, clean-up flux by density.
+!--          In case of land- and urban-surfaces, convert fluxes into
+!--          dynamic units.
+             IF ( ALLOCATED( shf_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         shf_av(j,i) = shf_av(j,i) +                           &
+                                         surf_def_h(0)%shf(m)  *               &
+                                         heatflux_output_conversion(nzb)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         shf_av(j,i) = shf_av(j,i) +                           &
+                                         surf_lsm_h%shf(m) * c_p
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         shf_av(j,i) = shf_av(j,i) +                           &
+                                         surf_usm_h%shf(m) * c_p
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'ssws*' )
+             IF ( ALLOCATED( ssws_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         ssws_av(j,i) = ssws_av(j,i) +                         &
+                                         surf_def_h(0)%ssws(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         ssws_av(j,i) = ssws_av(j,i) +                         &
+                                         surf_lsm_h%ssws(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         ssws_av(j,i) = ssws_av(j,i) +                         &
+                                         surf_usm_h%ssws(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 't*' )
+             IF ( ALLOCATED( ts_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         ts_av(j,i) = ts_av(j,i) +                             &
+                                         surf_def_h(0)%ts(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         ts_av(j,i) = ts_av(j,i) +                             &
+                                         surf_lsm_h%ts(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         ts_av(j,i) = ts_av(j,i) +                             &
+                                         surf_usm_h%ts(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'tsurf*' )
+             IF ( ALLOCATED( tsurf_av ) ) THEN    
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         tsurf_av(j,i) = tsurf_av(j,i) +                       &
+                                         surf_def_h(0)%pt_surface(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         tsurf_av(j,i) = tsurf_av(j,i) +                       &
+                                         surf_lsm_h%pt_surface(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         tsurf_av(j,i) = tsurf_av(j,i) +                       &
+                                         surf_usm_h%pt_surface(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'u' )
+             IF ( ALLOCATED( u_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         u_av(k,j,i) = u_av(k,j,i) + u(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'us*' )
+             IF ( ALLOCATED( us_av ) ) THEN   
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         us_av(j,i) = us_av(j,i) +                             &
+                                         surf_def_h(0)%us(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         us_av(j,i) = us_av(j,i) +                             &
+                                         surf_lsm_h%us(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         us_av(j,i) = us_av(j,i) +                             &
+                                         surf_usm_h%us(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'v' )
+             IF ( ALLOCATED( v_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         v_av(k,j,i) = v_av(k,j,i) + v(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'thetav' )
+             IF ( ALLOCATED( vpt_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         vpt_av(k,j,i) = vpt_av(k,j,i) + vpt(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'w' )
+             IF ( ALLOCATED( w_av ) ) THEN 
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         w_av(k,j,i) = w_av(k,j,i) + w(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'z0*' )
+             IF ( ALLOCATED( z0_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         z0_av(j,i) = z0_av(j,i) +                             &
+                                         surf_def_h(0)%z0(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         z0_av(j,i) = z0_av(j,i) +                             &
+                                         surf_lsm_h%z0(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         z0_av(j,i) = z0_av(j,i) +                             &
+                                         surf_usm_h%z0(m)
+                      ENDIF
+                   ENDDO
+                ENDDO   
+             ENDIF
+
+          CASE ( 'z0h*' )
+             IF ( ALLOCATED( z0h_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         z0h_av(j,i) = z0h_av(j,i) +                           &
+                                         surf_def_h(0)%z0h(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         z0h_av(j,i) = z0h_av(j,i) +                           &
+                                         surf_lsm_h%z0h(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         z0h_av(j,i) = z0h_av(j,i) +                           &
+                                         surf_usm_h%z0h(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+   
+          CASE ( 'z0q*' )
+             IF ( ALLOCATED( z0q_av ) ) THEN 
+                DO  i = nxl, nxr
+                   DO  j = nys, nyn
+                      match_def = surf_def_h(0)%start_index(j,i) <=            &
+                                  surf_def_h(0)%end_index(j,i)
+                      match_lsm = surf_lsm_h%start_index(j,i) <=               &
+                                  surf_lsm_h%end_index(j,i)
+                      match_usm = surf_usm_h%start_index(j,i) <=               &
+                                  surf_usm_h%end_index(j,i)
+
+                      IF ( match_def )  THEN
+                         m = surf_def_h(0)%end_index(j,i)
+                         z0q_av(j,i) = z0q_av(j,i) +                           &
+                                         surf_def_h(0)%z0q(m)
+                      ELSEIF ( match_lsm  .AND.  .NOT. match_usm )  THEN
+                         m = surf_lsm_h%end_index(j,i)
+                         z0q_av(j,i) = z0q_av(j,i) +                           &
+                                         surf_lsm_h%z0q(m)
+                      ELSEIF ( match_usm )  THEN
+                         m = surf_usm_h%end_index(j,i)
+                         z0q_av(j,i) = z0q_av(j,i) +                           &
+                                         surf_usm_h%z0q(m)
+                      ENDIF
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE DEFAULT
+!
+!--          Summing up data from other modules
+             IF ( bulk_cloud_model )  THEN
+                CALL bcm_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+
+             IF ( air_chemistry  .AND. &
+                  (trimvar(1:3) == 'kc_' .OR. trimvar(1:3) == 'em_') )  THEN
+                CALL chem_3d_data_averaging( 'sum',doav(ii) )
+             ENDIF
+
+             IF ( gust_module_enabled )  THEN
+                CALL gust_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+
+             IF ( biometeorology  .AND.  trimvar(1:5) == 'biom_' )  THEN
+                   CALL biom_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+
+             IF ( land_surface )  THEN
+                CALL lsm_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+
+             IF ( ocean_mode )  THEN
+                CALL ocean_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+
+             IF ( radiation )  THEN
+                CALL radiation_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+             
+!
+!--          SALSA quantity
+             IF ( salsa )  THEN
+                CALL salsa_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF                 
+
+             CALL tcm_3d_data_averaging( 'sum', doav(ii) )
+
+!--          In case of urban surface variables it should be always checked
+!--          if respective arrays are allocated, at least in case of a restart
+!--          run, as averaged usm arrays are not read from file at the moment.
+             IF ( urban_surface  .AND.  trimvar(1:4) == 'usm_' )  THEN
+                CALL usm_average_3d_data( 'allocate', doav(ii) )
+                CALL usm_average_3d_data( 'sum', doav(ii) )
+             ENDIF
+
+             IF ( uv_exposure )  THEN
+                CALL uvem_3d_data_averaging( 'sum', doav(ii) )
+             ENDIF
+
+!
+!--          User-defined quantities
+             CALL user_3d_data_averaging( 'sum', doav(ii) )
+
+       END SELECT
+
+    ENDDO
+
+    CALL cpu_log( log_point(34), 'sum_up_3d_data', 'stop' )
+
+
+ END SUBROUTINE sum_up_3d_data
Index: /palm/tags/release-6.0/SOURCE/surface_coupler.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/surface_coupler.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/surface_coupler.f90	(revision 3477)
@@ -0,0 +1,851 @@
+!> @file surface_coupler.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjust to new surface structure. Transfer 1D surface fluxes onto 2D grid 
+! (and back). 
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1427 2014-07-07 14:04:59Z maronga
+! Bugfix: value of l_v corrected.
+! 
+! 1418 2014-06-06 13:05:08Z fricke
+! Bugfix: For caluclation of the salinity flux at the sea surface, 
+!          the given value for salinity must be in percent and not in psu
+!
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: ONLY statement for module pegrid removed 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 880 2012-04-13 06:28:59Z raasch
+! Bugfix: preprocessor statements for parallel execution added
+!
+! 109 2007-08-28 15:26:47Z letzel
+! Initial revision
+!
+! Description:
+! ------------
+!> Data exchange at the interface between coupled models
+!------------------------------------------------------------------------------!
+ SUBROUTINE surface_coupler
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  pt, rho_ocean, sa, total_2d_a, total_2d_o, u, v
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, l_v
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_mode, coupling_mode_remote, coupling_topology,         &
+               humidity, humidity_remote, land_surface, message_string,        &
+               terminate_coupled, terminate_coupled_remote,                    &
+               time_since_reference_point, urban_surface
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, nx_a, nx_o, ny, nyn, nyng, nys, &
+               nysg, ny_a, ny_o, nzt
+
+    USE kinds
+
+    USE pegrid
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_lsm_h, surf_type, surf_usm_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                                    !< index variable x-direction 
+    INTEGER(iwp) ::  j                                    !< index variable y-direction 
+    INTEGER(iwp) ::  m                                    !< running index for surface elements
+
+    REAL(wp)    ::  cpw = 4218.0_wp                       !< heat capacity of water at constant pressure
+    REAL(wp)    ::  time_since_reference_point_rem        !< 
+    REAL(wp)    ::  total_2d(-nbgp:ny+nbgp,-nbgp:nx+nbgp) !< 
+
+    REAL(wp), DIMENSION(nysg:nyng,nxlg:nxrg) ::  surface_flux !< dummy array for surface fluxes on 2D grid
+
+
+#if defined( __parallel )
+
+    CALL cpu_log( log_point(39), 'surface_coupler', 'start' )
+
+
+
+!
+!-- In case of model termination initiated by the remote model 
+!-- (terminate_coupled_remote > 0), initiate termination of the local model. 
+!-- The rest of the coupler must then be skipped because it would cause an MPI 
+!-- intercomminucation hang.
+!-- If necessary, the coupler will be called at the beginning of the next 
+!-- restart run.
+
+    IF ( coupling_topology == 0 ) THEN
+       CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER, target_id, &
+                          0,                                                   &
+                          terminate_coupled_remote, 1, MPI_INTEGER, target_id, &
+                          0, comm_inter, status, ierr )
+    ELSE
+       IF ( myid == 0) THEN
+          CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER, &
+                             target_id, 0,                             &
+                             terminate_coupled_remote, 1, MPI_INTEGER, & 
+                             target_id, 0,                             &
+                             comm_inter, status, ierr )
+       ENDIF
+       CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d, &
+                       ierr )
+
+       ALLOCATE( total_2d_a(-nbgp:ny_a+nbgp,-nbgp:nx_a+nbgp),       &
+                 total_2d_o(-nbgp:ny_o+nbgp,-nbgp:nx_o+nbgp) )
+
+    ENDIF
+
+    IF ( terminate_coupled_remote > 0 )  THEN
+       WRITE( message_string, * ) 'remote model "',                            &
+                                  TRIM( coupling_mode_remote ),                &
+                                  '" terminated',                              &
+                                  '&with terminate_coupled_remote = ',         &
+                                  terminate_coupled_remote,                    &
+                                  '&local model  "', TRIM( coupling_mode ),    &
+                                  '" has',                                     &
+                                  '&terminate_coupled = ',                     &
+                                   terminate_coupled
+       CALL message( 'surface_coupler', 'PA0310', 1, 2, 0, 6, 0 )
+       RETURN
+    ENDIF
+ 
+
+!
+!-- Exchange the current simulated time between the models,
+!-- currently just for total_2d
+    IF ( coupling_topology == 0 ) THEN
+   
+       CALL MPI_SEND( time_since_reference_point, 1, MPI_REAL, target_id, 11, &
+                      comm_inter, ierr )
+       CALL MPI_RECV( time_since_reference_point_rem, 1, MPI_REAL, target_id, &
+                      11, comm_inter, status, ierr )
+    ELSE
+
+       IF ( myid == 0 ) THEN
+
+          CALL MPI_SEND( time_since_reference_point, 1, MPI_REAL, target_id, &
+                         11, comm_inter, ierr )
+          CALL MPI_RECV( time_since_reference_point_rem, 1, MPI_REAL,        &
+                         target_id, 11, comm_inter, status, ierr )
+
+       ENDIF
+
+       CALL MPI_BCAST( time_since_reference_point_rem, 1, MPI_REAL, 0, comm2d, &
+                       ierr )
+
+    ENDIF
+
+!
+!-- Exchange the interface data
+    IF ( coupling_mode == 'atmosphere_to_ocean' )  THEN
+    
+!
+!--    Horizontal grid size and number of processors is equal in ocean and
+!--    atmosphere
+       IF ( coupling_topology == 0 )  THEN
+
+!
+!--       Send heat flux at bottom surface to the ocean. First, transfer from 
+!--       1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_equal( surf_def_h(0)%shf, surf_lsm_h%shf,     &
+                                        surf_usm_h%shf )
+          CALL MPI_SEND( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, target_id, &
+                         12, comm_inter, ierr )
+!
+!--       Send humidity flux at bottom surface to the ocean. First, transfer
+!--       from 1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_equal( surf_def_h(0)%qsws, surf_lsm_h%qsws,   &
+                                        surf_usm_h%qsws )
+          IF ( humidity )  THEN
+             CALL MPI_SEND( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL,         &
+                            target_id, 13, comm_inter, ierr )
+          ENDIF
+!
+!--       Receive temperature at the bottom surface from the ocean
+          CALL MPI_RECV( pt(0,nysg,nxlg), 1, type_xy, target_id, 14,           &
+                         comm_inter, status, ierr )
+!
+!--       Send the momentum flux (u) at bottom surface to the ocean. First, 
+!--       transfer from 1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_equal( surf_def_h(0)%usws, surf_lsm_h%usws,   &
+                                        surf_usm_h%usws )
+          CALL MPI_SEND( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, target_id, &
+                         15, comm_inter, ierr )
+!
+!--       Send the momentum flux (v) at bottom surface to the ocean. First, 
+!--       transfer from 1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_equal( surf_def_h(0)%vsws, surf_lsm_h%vsws,   &
+                                        surf_usm_h%vsws )
+          CALL MPI_SEND( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, target_id, &
+                         16, comm_inter, ierr )
+!
+!--       Receive u at the bottom surface from the ocean
+          CALL MPI_RECV( u(0,nysg,nxlg), 1, type_xy, target_id, 17,            &
+                         comm_inter, status, ierr )
+!
+!--       Receive v at the bottom surface from the ocean
+          CALL MPI_RECV( v(0,nysg,nxlg), 1, type_xy, target_id, 18,            &
+                         comm_inter, status, ierr )
+!
+!--    Horizontal grid size or number of processors differs between 
+!--    ocean and atmosphere
+       ELSE
+      
+!
+!--       Send heat flux at bottom surface to the ocean
+          total_2d_a = 0.0_wp
+          total_2d   = 0.0_wp
+!
+!--       Transfer from 1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_unequal( surf_def_h(0)%shf, surf_lsm_h%shf,   &
+                                          surf_usm_h%shf )
+
+          CALL MPI_REDUCE( total_2d, total_2d_a, ngp_a, MPI_REAL, MPI_SUM, 0,  &
+                           comm2d, ierr )
+          CALL interpolate_to_ocean( 12 )   
+!
+!--       Send humidity flux at bottom surface to the ocean
+          IF ( humidity )  THEN
+             total_2d_a = 0.0_wp
+             total_2d   = 0.0_wp
+!
+!--          Transfer from 1D surface type to 2D grid.
+             CALL transfer_1D_to_2D_unequal( surf_def_h(0)%qsws,              &
+                                             surf_lsm_h%qsws,                 &
+                                             surf_usm_h%qsws )
+
+             CALL MPI_REDUCE( total_2d, total_2d_a, ngp_a, MPI_REAL, MPI_SUM, &
+                              0, comm2d, ierr )
+             CALL interpolate_to_ocean( 13 )
+          ENDIF
+!
+!--       Receive temperature at the bottom surface from the ocean
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL,          &
+                            target_id, 14, comm_inter, status, ierr )   
+          ENDIF
+          CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_BCAST( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL, 0, comm2d, &
+                          ierr )
+          pt(0,nysg:nyng,nxlg:nxrg) = total_2d_a(nysg:nyng,nxlg:nxrg)
+!
+!--       Send momentum flux (u) at bottom surface to the ocean
+          total_2d_a = 0.0_wp 
+          total_2d   = 0.0_wp
+!
+!--       Transfer from 1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_unequal( surf_def_h(0)%usws, surf_lsm_h%usws, &
+                                          surf_usm_h%usws )
+          CALL MPI_REDUCE( total_2d, total_2d_a, ngp_a, MPI_REAL, MPI_SUM, 0, &
+                           comm2d, ierr )
+          CALL interpolate_to_ocean( 15 )
+!
+!--       Send momentum flux (v) at bottom surface to the ocean
+          total_2d_a = 0.0_wp
+          total_2d   = 0.0_wp
+!
+!--       Transfer from 1D surface type to 2D grid.
+          CALL transfer_1D_to_2D_unequal( surf_def_h(0)%usws, surf_lsm_h%usws, &
+                                          surf_usm_h%usws )
+          CALL MPI_REDUCE( total_2d, total_2d_a, ngp_a, MPI_REAL, MPI_SUM, 0, &
+                           comm2d, ierr )
+          CALL interpolate_to_ocean( 16 )
+!
+!--       Receive u at the bottom surface from the ocean
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL, &
+                            target_id, 17, comm_inter, status, ierr )
+          ENDIF
+          CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_BCAST( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL, 0, comm2d, &
+                          ierr )
+          u(0,nysg:nyng,nxlg:nxrg) = total_2d_a(nysg:nyng,nxlg:nxrg)
+!
+!--       Receive v at the bottom surface from the ocean
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL, &
+                            target_id, 18, comm_inter, status, ierr )
+          ENDIF
+          CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_BCAST( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL, 0, comm2d, &
+                          ierr )
+          v(0,nysg:nyng,nxlg:nxrg) = total_2d_a(nysg:nyng,nxlg:nxrg)
+
+       ENDIF
+
+    ELSEIF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
+
+!
+!--    Horizontal grid size and number of processors is equal
+!--    in ocean and atmosphere
+       IF ( coupling_topology == 0 ) THEN
+!
+!--       Receive heat flux at the sea surface (top) from the atmosphere
+          CALL MPI_RECV( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, target_id, 12, &
+                         comm_inter, status, ierr )
+          CALL transfer_2D_to_1D_equal( surf_def_h(2)%shf )
+!
+!--       Receive humidity flux from the atmosphere (bottom)
+!--       and add it to the heat flux at the sea surface (top)...
+          IF ( humidity_remote )  THEN
+             CALL MPI_RECV( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, &
+                            target_id, 13, comm_inter, status, ierr )
+             CALL transfer_2D_to_1D_equal( surf_def_h(2)%qsws )
+          ENDIF
+!
+!--       Send sea surface temperature to the atmosphere model
+          CALL MPI_SEND( pt(nzt,nysg,nxlg), 1, type_xy, target_id, 14, &
+                         comm_inter, ierr )
+!
+!--       Receive momentum flux (u) at the sea surface (top) from the atmosphere
+          CALL MPI_RECV( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, target_id, 15, &
+                         comm_inter, status, ierr )
+          CALL transfer_2D_to_1D_equal( surf_def_h(2)%usws )
+!
+!--       Receive momentum flux (v) at the sea surface (top) from the atmosphere
+          CALL MPI_RECV( surface_flux(nysg,nxlg), ngp_xy, MPI_REAL, target_id, 16, &
+                         comm_inter, status, ierr )
+          CALL transfer_2D_to_1D_equal( surf_def_h(2)%vsws )
+!
+!--       Send u to the atmosphere
+          CALL MPI_SEND( u(nzt,nysg,nxlg), 1, type_xy, target_id, 17, &
+                         comm_inter, ierr )
+!
+!--       Send v to the atmosphere
+          CALL MPI_SEND( v(nzt,nysg,nxlg), 1, type_xy, target_id, 18, &
+                         comm_inter, ierr )
+!
+!--    Horizontal gridsize or number of processors differs between 
+!--    ocean and atmosphere
+       ELSE
+!
+!--       Receive heat flux at the sea surface (top) from the atmosphere
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, &
+                            target_id, 12, comm_inter, status, ierr )
+          ENDIF
+          CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_BCAST( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, 0, comm2d, &
+                          ierr )
+          CALL transfer_2D_to_1D_unequal( surf_def_h(2)%shf )
+!
+!--       Receive humidity flux at the sea surface (top) from the atmosphere
+          IF ( humidity_remote )  THEN
+             IF ( myid == 0 )  THEN
+                CALL MPI_RECV( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, &
+                               target_id, 13, comm_inter, status, ierr )
+             ENDIF
+             CALL MPI_BARRIER( comm2d, ierr )
+             CALL MPI_BCAST( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, 0, &
+                             comm2d, ierr)
+             CALL transfer_2D_to_1D_unequal( surf_def_h(2)%qsws )
+          ENDIF
+!
+!--       Send surface temperature to atmosphere
+          total_2d_o = 0.0_wp
+          total_2d   = 0.0_wp
+          total_2d(nys:nyn,nxl:nxr) = pt(nzt,nys:nyn,nxl:nxr)
+
+          CALL MPI_REDUCE( total_2d, total_2d_o, ngp_o, MPI_REAL, MPI_SUM, 0, &
+                           comm2d, ierr) 
+          CALL interpolate_to_atmos( 14 )
+!
+!--       Receive momentum flux (u) at the sea surface (top) from the atmosphere
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, &
+                            target_id, 15, comm_inter, status, ierr )
+          ENDIF
+          CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_BCAST( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, &
+                          0, comm2d, ierr )
+          CALL transfer_2D_to_1D_unequal( surf_def_h(2)%usws )
+!
+!--       Receive momentum flux (v) at the sea surface (top) from the atmosphere
+          IF ( myid == 0 )  THEN
+             CALL MPI_RECV( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, &
+                            target_id, 16, comm_inter, status, ierr )
+          ENDIF
+          CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_BCAST( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, 0, comm2d, &
+                          ierr )
+          CALL transfer_2D_to_1D_unequal( surf_def_h(2)%vsws )
+!
+!--       Send u to atmosphere
+          total_2d_o = 0.0_wp  
+          total_2d   = 0.0_wp
+          total_2d(nys:nyn,nxl:nxr) = u(nzt,nys:nyn,nxl:nxr)
+          CALL MPI_REDUCE( total_2d, total_2d_o, ngp_o, MPI_REAL, MPI_SUM, 0, &
+                           comm2d, ierr )
+          CALL interpolate_to_atmos( 17 )
+!
+!--       Send v to atmosphere
+          total_2d_o = 0.0_wp
+          total_2d   = 0.0_wp
+          total_2d(nys:nyn,nxl:nxr) = v(nzt,nys:nyn,nxl:nxr)
+          CALL MPI_REDUCE( total_2d, total_2d_o, ngp_o, MPI_REAL, MPI_SUM, 0, &
+                           comm2d, ierr )
+          CALL interpolate_to_atmos( 18 )
+        
+       ENDIF
+
+!
+!--    Conversions of fluxes received from atmosphere
+       IF ( humidity_remote )  THEN
+!
+!--       Here top heat flux is still the sum of atmospheric bottom heat fluxes,
+!--       * latent heat of vaporization in m2/s2, or 540 cal/g, or 40.65 kJ/mol
+!--       /(rho_atm(=1.0)*c_p)
+          DO  m = 1, surf_def_h(2)%ns
+             i = surf_def_h(2)%i(m)
+             j = surf_def_h(2)%j(m)
+             
+             surf_def_h(2)%shf(m) = surf_def_h(2)%shf(m) +                     &
+                                    surf_def_h(2)%qsws(m) * l_v / c_p
+!
+!--          ...and convert it to a salinity flux at the sea surface (top)
+!--          following Steinhorn (1991), JPO 21, pp. 1681-1683:
+!--          S'w' = -S * evaporation / ( rho_water * ( 1 - S ) )
+             surf_def_h(2)%sasws(m) = -1.0_wp * sa(nzt,j,i) * 0.001_wp *       &
+                                      surf_def_h(2)%qsws(m) /                  &
+                                    ( rho_ocean(nzt,j,i) *                     &
+                                      ( 1.0_wp - sa(nzt,j,i) * 0.001_wp )      &
+                                    )
+          ENDDO
+       ENDIF
+
+!
+!--    Adjust the kinematic heat flux with respect to ocean density
+!--    (constants are the specific heat capacities for air and water), as well 
+!--    as momentum fluxes 
+       DO  m = 1, surf_def_h(2)%ns
+          i = surf_def_h(2)%i(m)
+          j = surf_def_h(2)%j(m)
+          surf_def_h(2)%shf(m) = surf_def_h(2)%shf(m) / rho_ocean(nzt,j,i) *   &
+                                 c_p / cpw
+
+          surf_def_h(2)%usws(m) = surf_def_h(2)%usws(m) / rho_ocean(nzt,j,i)
+          surf_def_h(2)%vsws(m) = surf_def_h(2)%vsws(m) / rho_ocean(nzt,j,i)
+       ENDDO
+
+    ENDIF
+
+    IF ( coupling_topology == 1 )  THEN
+       DEALLOCATE( total_2d_o, total_2d_a )
+    ENDIF
+
+    CALL cpu_log( log_point(39), 'surface_coupler', 'stop' )
+
+#endif
+
+     CONTAINS 
+
+!       Description:
+!------------------------------------------------------------------------------!
+!>      Data transfer from 1D surface-data type to 2D dummy array for equal 
+!>      grids in atmosphere and ocean.
+!------------------------------------------------------------------------------!
+        SUBROUTINE transfer_1D_to_2D_equal( def_1d, lsm_1d, usm_1d )
+
+           IMPLICIT NONE
+
+            INTEGER(iwp) ::  i   !< running index x
+            INTEGER(iwp) ::  j   !< running index y
+            INTEGER(iwp) ::  m   !< running index surface type
+
+            REAL(wp), DIMENSION(1:surf_def_h(0)%ns) ::  def_1d !< 1D surface flux, default surfaces
+            REAL(wp), DIMENSION(1:surf_lsm_h%ns)    ::  lsm_1d !< 1D surface flux, natural surfaces
+            REAL(wp), DIMENSION(1:surf_usm_h%ns)    ::  usm_1d !< 1D surface flux, urban surfaces
+!
+!--         Transfer surface flux at default surfaces to 2D grid 
+            DO  m = 1, surf_def_h(0)%ns
+               i = surf_def_h(0)%i(m)
+               j = surf_def_h(0)%j(m)
+               surface_flux(j,i) = def_1d(m)
+            ENDDO
+!
+!--         Transfer surface flux at natural surfaces to 2D grid 
+            IF ( land_surface )  THEN 
+               DO  m = 1, SIZE(lsm_1d)
+                  i = surf_lsm_h%i(m)
+                  j = surf_lsm_h%j(m)
+                  surface_flux(j,i) = lsm_1d(m)
+               ENDDO
+            ENDIF
+!
+!--         Transfer surface flux at natural surfaces to 2D grid 
+            IF ( urban_surface )  THEN 
+               DO  m = 1, SIZE(usm_1d)
+                  i = surf_usm_h%i(m)
+                  j = surf_usm_h%j(m)
+                  surface_flux(j,i) = usm_1d(m)
+               ENDDO
+            ENDIF
+
+        END SUBROUTINE transfer_1D_to_2D_equal
+
+!       Description:
+!------------------------------------------------------------------------------!
+!>      Data transfer from 2D array for equal grids onto 1D surface-data type
+!>      array.
+!------------------------------------------------------------------------------!
+        SUBROUTINE transfer_2D_to_1D_equal( def_1d )
+
+           IMPLICIT NONE
+
+            INTEGER(iwp) ::  i   !< running index x
+            INTEGER(iwp) ::  j   !< running index y
+            INTEGER(iwp) ::  m   !< running index surface type
+
+            REAL(wp), DIMENSION(1:surf_def_h(2)%ns) ::  def_1d !< 1D surface flux, default surfaces
+!
+!--         Transfer surface flux to 1D surface type, only for default surfaces 
+            DO  m = 1, surf_def_h(2)%ns
+               i = surf_def_h(2)%i(m)
+               j = surf_def_h(2)%j(m)
+               def_1d(m) = surface_flux(j,i)
+            ENDDO
+
+        END SUBROUTINE transfer_2D_to_1D_equal
+
+!       Description:
+!------------------------------------------------------------------------------!
+!>      Data transfer from 1D surface-data type to 2D dummy array from unequal 
+!>      grids in atmosphere and ocean.
+!------------------------------------------------------------------------------!
+        SUBROUTINE transfer_1D_to_2D_unequal( def_1d, lsm_1d, usm_1d )
+
+           IMPLICIT NONE
+
+            INTEGER(iwp) ::  i   !< running index x
+            INTEGER(iwp) ::  j   !< running index y
+            INTEGER(iwp) ::  m   !< running index surface type
+
+            REAL(wp), DIMENSION(1:surf_def_h(0)%ns) ::  def_1d !< 1D surface flux, default surfaces
+            REAL(wp), DIMENSION(1:surf_lsm_h%ns)    ::  lsm_1d !< 1D surface flux, natural surfaces
+            REAL(wp), DIMENSION(1:surf_usm_h%ns)    ::  usm_1d !< 1D surface flux, urban surfaces
+!
+!--         Transfer surface flux at default surfaces to 2D grid. Transfer no
+!--         ghost-grid points since total_2d is a global array.
+            DO  m = 1, SIZE(def_1d)
+               i = surf_def_h(0)%i(m)
+               j = surf_def_h(0)%j(m)
+
+               IF ( i >= nxl  .AND.  i <= nxr  .AND.                           &
+                    j >= nys  .AND.  j <= nyn )  THEN
+                  total_2d(j,i) = def_1d(m)
+               ENDIF
+            ENDDO
+!
+!--         Transfer surface flux at natural surfaces to 2D grid 
+            IF ( land_surface )  THEN 
+               DO  m = 1, SIZE(lsm_1d)
+                  i = surf_lsm_h%i(m)
+                  j = surf_lsm_h%j(m)
+
+                  IF ( i >= nxl  .AND.  i <= nxr  .AND.                        &
+                       j >= nys  .AND.  j <= nyn )  THEN
+                     total_2d(j,i) = lsm_1d(m)
+                  ENDIF
+               ENDDO
+            ENDIF
+!
+!--         Transfer surface flux at natural surfaces to 2D grid 
+            IF ( urban_surface )  THEN 
+               DO  m = 1, SIZE(usm_1d)
+                  i = surf_usm_h%i(m)
+                  j = surf_usm_h%j(m)
+
+                  IF ( i >= nxl  .AND.  i <= nxr  .AND.                        &
+                       j >= nys  .AND.  j <= nyn )  THEN
+                     total_2d(j,i) = usm_1d(m)
+                  ENDIF
+               ENDDO
+            ENDIF
+
+        END SUBROUTINE transfer_1D_to_2D_unequal
+
+!       Description:
+!------------------------------------------------------------------------------!
+!>      Data transfer from 2D dummy array from unequal grids to 1D surface-data 
+!>      type.
+!------------------------------------------------------------------------------!
+        SUBROUTINE transfer_2D_to_1D_unequal( def_1d )
+
+           IMPLICIT NONE
+
+            INTEGER(iwp) ::  i   !< running index x
+            INTEGER(iwp) ::  j   !< running index y
+            INTEGER(iwp) ::  m   !< running index surface type
+
+            REAL(wp), DIMENSION(1:surf_def_h(2)%ns) ::  def_1d !< 1D surface flux, default surfaces
+!
+!--         Transfer 2D surface flux to default surfaces data type. Transfer no
+!--         ghost-grid points since total_2d is a global array.
+            DO  m = 1, SIZE(def_1d)
+               i = surf_def_h(2)%i(m)
+               j = surf_def_h(2)%j(m)
+
+               IF ( i >= nxl  .AND.  i <= nxr  .AND.                           &
+                    j >= nys  .AND.  j <= nyn )  THEN
+                  def_1d(m) = total_2d_o(j,i)
+               ENDIF
+            ENDDO
+
+
+        END SUBROUTINE transfer_2D_to_1D_unequal
+
+  END SUBROUTINE surface_coupler
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+  SUBROUTINE interpolate_to_atmos( tag )
+
+#if defined( __parallel )
+
+    USE arrays_3d,                                                             &
+        ONLY:  total_2d_a, total_2d_o
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nx_a, nx_o, ny, ny_a, ny_o
+
+    USE kinds
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  dnx  !< 
+    INTEGER(iwp) ::  dnx2 !< 
+    INTEGER(iwp) ::  dny  !< 
+    INTEGER(iwp) ::  dny2 !< 
+    INTEGER(iwp) ::  i    !< 
+    INTEGER(iwp) ::  ii   !< 
+    INTEGER(iwp) ::  j    !< 
+    INTEGER(iwp) ::  jj   !< 
+
+    INTEGER(iwp), intent(in) ::  tag !< 
+
+    CALL MPI_BARRIER( comm2d, ierr )
+
+    IF ( myid == 0 )  THEN
+!
+!--    Cyclic boundary conditions for the total 2D-grid
+       total_2d_o(-nbgp:-1,:) = total_2d_o(ny+1-nbgp:ny,:)
+       total_2d_o(:,-nbgp:-1) = total_2d_o(:,nx+1-nbgp:nx)
+
+       total_2d_o(ny+1:ny+nbgp,:) = total_2d_o(0:nbgp-1,:)
+       total_2d_o(:,nx+1:nx+nbgp) = total_2d_o(:,0:nbgp-1)
+
+!
+!--    Number of gridpoints of the fine grid within one mesh of the coarse grid
+       dnx = (nx_o+1) / (nx_a+1) 
+       dny = (ny_o+1) / (ny_a+1) 
+
+!
+!--    Distance for interpolation around coarse grid points within the fine
+!--    grid (note: 2*dnx2 must not be equal with dnx)
+       dnx2 = 2 * ( dnx / 2 )
+       dny2 = 2 * ( dny / 2 )
+
+       total_2d_a = 0.0_wp
+!
+!--    Interpolation from ocean-grid-layer to atmosphere-grid-layer
+       DO  j = 0, ny_a
+          DO  i = 0, nx_a 
+             DO  jj = 0, dny2
+                DO  ii = 0, dnx2
+                   total_2d_a(j,i) = total_2d_a(j,i) &
+                                     + total_2d_o(j*dny+jj,i*dnx+ii)
+                ENDDO
+             ENDDO
+             total_2d_a(j,i) = total_2d_a(j,i) / ( ( dnx2 + 1 ) * ( dny2 + 1 ) )
+          ENDDO
+       ENDDO
+! 
+!--    Cyclic boundary conditions for atmosphere grid
+       total_2d_a(-nbgp:-1,:) = total_2d_a(ny_a+1-nbgp:ny_a,:)
+       total_2d_a(:,-nbgp:-1) = total_2d_a(:,nx_a+1-nbgp:nx_a)
+       
+       total_2d_a(ny_a+1:ny_a+nbgp,:) = total_2d_a(0:nbgp-1,:)
+       total_2d_a(:,nx_a+1:nx_a+nbgp) = total_2d_a(:,0:nbgp-1)
+!
+!--    Transfer of the atmosphere-grid-layer to the atmosphere
+       CALL MPI_SEND( total_2d_a(-nbgp,-nbgp), ngp_a, MPI_REAL, target_id, &
+                      tag, comm_inter, ierr )
+
+    ENDIF
+
+    CALL MPI_BARRIER( comm2d, ierr )
+
+#endif
+
+  END SUBROUTINE interpolate_to_atmos
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+  SUBROUTINE interpolate_to_ocean( tag )
+
+#if defined( __parallel )
+
+    USE arrays_3d,                                                             &
+        ONLY:  total_2d_a, total_2d_o
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nx_a, nx_o, ny, ny_a, ny_o
+
+    USE kinds
+
+    USE pegrid
+
+    IMPLICIT NONE
+
+    INTEGER(iwp)             ::  dnx !< 
+    INTEGER(iwp)             ::  dny !< 
+    INTEGER(iwp)             ::  i   !< 
+    INTEGER(iwp)             ::  ii  !< 
+    INTEGER(iwp)             ::  j   !< 
+    INTEGER(iwp)             ::  jj  !< 
+    INTEGER(iwp), intent(in) ::  tag !< 
+
+    REAL(wp)                 ::  fl  !< 
+    REAL(wp)                 ::  fr  !< 
+    REAL(wp)                 ::  myl !< 
+    REAL(wp)                 ::  myr !< 
+
+    CALL MPI_BARRIER( comm2d, ierr )
+
+    IF ( myid == 0 )  THEN   
+
+!
+!--    Number of gridpoints of the fine grid within one mesh of the coarse grid
+       dnx = ( nx_o + 1 ) / ( nx_a + 1 ) 
+       dny = ( ny_o + 1 ) / ( ny_a + 1 ) 
+
+! 
+!--    Cyclic boundary conditions for atmosphere grid
+       total_2d_a(-nbgp:-1,:) = total_2d_a(ny+1-nbgp:ny,:)
+       total_2d_a(:,-nbgp:-1) = total_2d_a(:,nx+1-nbgp:nx)
+       
+       total_2d_a(ny+1:ny+nbgp,:) = total_2d_a(0:nbgp-1,:)
+       total_2d_a(:,nx+1:nx+nbgp) = total_2d_a(:,0:nbgp-1)
+!
+!--    Bilinear Interpolation from atmosphere grid-layer to ocean grid-layer
+       DO  j = 0, ny
+          DO  i = 0, nx
+             myl = ( total_2d_a(j+1,i)   - total_2d_a(j,i)   ) / dny
+             myr = ( total_2d_a(j+1,i+1) - total_2d_a(j,i+1) ) / dny
+             DO  jj = 0, dny-1
+                fl = myl*jj + total_2d_a(j,i)  
+                fr = myr*jj + total_2d_a(j,i+1)  
+                DO  ii = 0, dnx-1
+                   total_2d_o(j*dny+jj,i*dnx+ii) = ( fr - fl ) / dnx * ii + fl
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+! 
+!--    Cyclic boundary conditions for ocean grid
+       total_2d_o(-nbgp:-1,:) = total_2d_o(ny_o+1-nbgp:ny_o,:)
+       total_2d_o(:,-nbgp:-1) = total_2d_o(:,nx_o+1-nbgp:nx_o)
+
+       total_2d_o(ny_o+1:ny_o+nbgp,:) = total_2d_o(0:nbgp-1,:)
+       total_2d_o(:,nx_o+1:nx_o+nbgp) = total_2d_o(:,0:nbgp-1)
+
+       CALL MPI_SEND( total_2d_o(-nbgp,-nbgp), ngp_o, MPI_REAL, &
+                      target_id, tag, comm_inter, ierr )
+
+    ENDIF
+
+    CALL MPI_BARRIER( comm2d, ierr )  
+
+#endif
+
+  END SUBROUTINE interpolate_to_ocean
Index: /palm/tags/release-6.0/SOURCE/surface_layer_fluxes_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/surface_layer_fluxes_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/surface_layer_fluxes_mod.f90	(revision 3477)
@@ -0,0 +1,2402 @@
+!> @file surface_layer_fluxes_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3271 2018-09-24 08:20:34Z suehring
+! Comment revised
+! 
+! 3157 2018-07-19 21:08:49Z maronga
+! Added local free convection velocity scale w_lfc in calculation of uvw_abs.
+! This can be switche on/off by the user via the flag namelist parameter 
+! use_free_convection_scaling
+! 
+! 3152 2018-07-19 13:26:52Z suehring
+! q_surface is now part of surface structure
+! 
+! 3149 2018-07-19 05:48:09Z maronga
+! Correct accidental last commit
+! 
+! 3148 2018-07-19 05:45:25Z maronga
+! Major bugfix in calculation of Obukhov length
+! 
+! 3146 2018-07-18 22:36:19Z maronga
+! move phi_m from turbulence_closure_mod
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Implementation of chemistry module (FK)
+! - Added calculation of pt1 and qv1 for all surface types. Added calculation of
+!   pt_surface for default-type surfaces (BM)
+! - Add flag to disable computation of qsws in case of urban surface (MS)
+! 
+! 2547 2017-10-16 12:41:56Z schwenkel
+! extended by cloud_droplets option
+! 
+! 2321 2017-07-24 15:57:07Z schwenkel
+! Bugfix: Correct index in lookup table for Obukhov length 
+! 
+! 2299 2017-06-29 10:14:38Z suehring
+! Adjusted for allow separate spinups of LSM and atmosphere code
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2281 2017-06-13 11:34:50Z suehring
+! Clean-up unnecessary index access to surface type
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new surface concept
+! OpenMP bugfix
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related code removed
+! 
+! 2091 2016-12-21 16:38:18Z suehring
+! Bugfix in calculation of vsws ( incorrect linear interpolation of us ) 
+! 
+! 2076 2016-12-02 13:54:20Z raasch
+! further openmp bugfix for lookup method
+! 
+! 2073 2016-11-30 14:34:05Z raasch
+! openmp bugfix for lookup method
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Account for urban surface model in computation of vertical kinematic heatflux
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1992 2016-08-12 15:14:59Z suehring
+! Minor bug, declaration of look-up index as INTEGER
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Treat humidity and passive scalar separately
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! Bugfix: avoid segmentation fault in case one grid point is horizontally 
+! completely surrounded by topography
+! 
+! 1920 2016-05-30 10:50:15Z suehring
+! Avoid segmentation fault (see change in 1915) by different initialization of 
+! us instead of adding a very small number in the denominator
+!
+! 1915 2016-05-27 11:05:02Z suehring
+! Bugfix: avoid segmentation fault in case of most_method = 'circular' at first
+! timestep
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme replaced by microphysics_*
+!
+! 1788 2016-03-10 11:01:04Z maronga
+! Added parameter z0q which replaces z0h in the similarity functions for
+! humidity.
+! Syntax layout improved.
+! 
+! 1757 2016-02-22 15:49:32Z maronga
+! Minor fixes.
+!
+! 1749 2016-02-09 12:19:56Z raasch
+! further OpenACC adjustments
+!
+! 1747 2016-02-08 12:25:53Z raasch
+! adjustments for OpenACC usage
+!
+! 1709 2015-11-04 14:47:01Z maronga
+! Bugfix: division by zero could occur when calculating rib at low wind speeds
+! Bugfix: calculation of uv_total for neutral = .T., initial value for ol for
+! neutral = .T.
+! 
+! 1705 2015-11-02 14:28:56Z maronga
+! Typo removed
+!
+! 1697 2015-10-28 17:14:10Z raasch
+! FORTRAN and OpenMP errors removed
+!
+! 1696 2015-10-27 10:03:34Z maronga
+! Modularized and completely re-written version of prandtl_fluxes.f90. In the
+! course of the re-writing two additional methods have been implemented. See
+! updated description.
+!
+! 1551 2015-03-03 14:18:16Z maronga
+! Removed land surface model part. The surface fluxes are now always calculated
+! within prandtl_fluxes, based on the given surface temperature/humidity (which 
+! is either provided by the land surface model, by large scale forcing data, or
+! directly prescribed by the user.
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Adapted for land surface model
+! 
+! 1494 2014-11-21 17:14:03Z maronga
+! Bugfixes: qs is now calculated before calculation of Rif. calculation of
+! buoyancy flux in Rif corrected (added missing humidity term), allow use of 
+! topography for coupled runs (not tested)
+! 
+! 1361 2014-04-16 15:17:48Z hoffmann
+! Bugfix: calculation of turbulent fluxes of rain water content (qrsws) and rain 
+! drop concentration (nrsws) added
+! 
+! 1340 2014-03-25 19:45:13Z kanani
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1276 2014-01-15 13:40:41Z heinze
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openACC "kernels do" replaced by "kernels loop", "loop independent" added
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! OpenACC statements added
+!
+! 978 2012-08-09 08:28:32Z fricke
+! roughness length for scalar quantities z0h added
+!
+! Revision 1.1  1998/01/23 10:06:06  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Diagnostic computation of vertical fluxes in the constant flux layer from the
+!> values of the variables at grid point k=1. Three different methods are
+!> available:
+!> 1) the "old" version (most_method = 'circular') which is fast, but inaccurate
+!> 2) a Newton iteration method (most_method = 'newton'), which is accurate, but
+!>    slower
+!> 3) a method using a lookup table which is fast and accurate. Note, however,
+!>    that this method cannot be used in case of roughness heterogeneity
+!>
+!> @todo (re)move large_scale_forcing actions
+!> @todo check/optimize OpenMP directives
+!> @todo simplify if conditions (which flux need to be computed in which case)
+!------------------------------------------------------------------------------!
+ MODULE surface_layer_fluxes_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  e, kh, nc, nr, pt, q, ql, qc, qr, s, u, v, vpt, w, zu, zw,      &
+               drho_air_zw, rho_air_zw, d_exner
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, kappa, lv_d_cp, pi, rd_d_rv
+
+    USE chem_modules,                                                          &
+        ONLY:  constant_csflux, nvar
+
+    USE cpulog
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, cloud_droplets,                                  &
+               constant_heatflux, constant_scalarflux,                         &
+               constant_waterflux, coupling_mode, humidity, ibc_e_b,           &
+               ibc_pt_b, initializing_actions,                                 &
+               intermediate_timestep_count, intermediate_timestep_count_max,   &
+               land_surface, large_scale_forcing, lsf_surf, message_string,    &
+               most_method, neutral, passive_scalar, pt_surface, q_surface,    &
+               run_coupled, surface_pressure, simulated_time, terminate_run,   &
+               time_since_reference_point, urban_surface,                      &
+               use_free_convection_scaling, zeta_max, zeta_min
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy  
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nys, nyn, nzb
+
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, microphysics_morrison, microphysics_seifert
+
+    USE pegrid
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  aero_resist_kray, skip_time_do_lsm
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_type,     &
+                surf_usm_h, surf_usm_v
+        
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i              !< loop index x direction
+    INTEGER(iwp) ::  j              !< loop index y direction
+    INTEGER(iwp) ::  k              !< loop index z direction
+    INTEGER(iwp) ::  l              !< loop index for surf type
+    INTEGER(iwp) ::  li_bnd  = 7500 !< Lookup table index of the last time step
+
+    INTEGER(iwp), PARAMETER ::  num_steps = 15000  !< number of steps in the lookup table
+
+    LOGICAL      ::  coupled_run       !< Flag for coupled atmosphere-ocean runs
+    LOGICAL      ::  downward = .FALSE.!< Flag indicating downward-facing horizontal surface
+    LOGICAL      ::  mom_uv  = .FALSE. !< Flag indicating calculation of usvs and vsus at vertical surfaces
+    LOGICAL      ::  mom_w   = .FALSE. !< Flag indicating calculation of wsus and wsvs at vertical surfaces
+    LOGICAL      ::  mom_tke = .FALSE. !< Flag indicating calculation of momentum fluxes at vertical surfaces used for TKE production 
+    LOGICAL      ::  surf_vertical     !< Flag indicating vertical surfaces
+
+    REAL(wp), DIMENSION(0:num_steps-1) :: rib_tab,  & !< Lookup table bulk Richardson number
+                                          ol_tab      !< Lookup table values of L
+
+    REAL(wp)     ::  e_s,               & !< Saturation water vapor pressure
+                     ol_max = 1.0E6_wp, & !< Maximum Obukhov length
+                     rib_max,           & !< Maximum Richardson number in lookup table
+                     rib_min,           & !< Minimum Richardson number in lookup table
+                     z_mo                 !< Height of the constant flux layer where MOST is assumed
+
+    TYPE(surf_type), POINTER ::  surf     !< surf-type array, used to generalize subroutines
+
+
+    SAVE
+
+    PRIVATE
+
+    PUBLIC init_surface_layer_fluxes, phi_m, surface_layer_fluxes
+
+    INTERFACE init_surface_layer_fluxes
+       MODULE PROCEDURE init_surface_layer_fluxes
+    END INTERFACE init_surface_layer_fluxes
+
+    INTERFACE phi_m
+       MODULE PROCEDURE phi_m
+    END INTERFACE phi_m
+
+    INTERFACE surface_layer_fluxes
+       MODULE PROCEDURE surface_layer_fluxes
+    END INTERFACE surface_layer_fluxes
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Main routine to compute the surface fluxes
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_layer_fluxes
+
+       IMPLICIT NONE
+
+       surf_vertical = .FALSE.
+       downward      = .FALSE.
+!
+!--    Derive potential temperature and specific humidity at first grid level 
+!--    from the fields pt and q
+!
+!--    First call for horizontal default-type surfaces (l=0 - upward facing, 
+!--    l=1 - downward facing)
+       DO  l = 0, 1
+          IF ( surf_def_h(l)%ns >= 1  )  THEN
+             surf => surf_def_h(l)
+             CALL calc_pt_q
+             IF ( .NOT. neutral )  THEN
+                CALL calc_pt_surface
+                IF ( humidity )  THEN
+                   CALL calc_q_surface
+                   CALL calc_vpt_surface
+                ENDIF
+             ENDIF
+          ENDIF
+       ENDDO
+!
+!--    Call for natural-type horizontal surfaces
+       IF ( surf_lsm_h%ns >= 1  )  THEN
+          surf => surf_lsm_h
+          CALL calc_pt_q
+       ENDIF
+
+!
+!--    Call for urban-type horizontal surfaces
+       IF ( surf_usm_h%ns >= 1  )  THEN
+          surf => surf_usm_h
+          CALL calc_pt_q
+       ENDIF
+
+!
+!--    Call for natural-type vertical surfaces
+       DO  l = 0, 3
+          IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+             surf => surf_lsm_v(l)
+             CALL calc_pt_q
+          ENDIF
+
+!--       Call for urban-type vertical surfaces
+          IF ( surf_usm_v(l)%ns >= 1  )  THEN
+             surf => surf_usm_v(l)
+             CALL calc_pt_q
+          ENDIF
+       ENDDO
+
+!
+!--    First, calculate the new Obukhov length, then new friction velocity,
+!--    followed by the new scaling parameters (th*, q*, etc.), and the new
+!--    surface fluxes if required. The old routine ("circular") requires a 
+!--    different order of calls as the scaling parameters from the previous time
+!--    steps are used to calculate the Obukhov length
+
+!
+!--    Depending on setting of most_method use the "old" routine
+!--    Note, each routine is called for different surface types. 
+!--    First call for default-type horizontal surfaces, for natural- and 
+!--    urban-type surfaces. Note, at this place only upward-facing horizontal
+!--    surfaces are treted. 
+       IF ( most_method == 'circular' )  THEN
+!
+!--       Default-type upward-facing horizontal surfaces
+          IF ( surf_def_h(0)%ns >= 1  )  THEN
+             surf => surf_def_h(0)
+             CALL calc_scaling_parameters
+             CALL calc_uvw_abs
+             IF ( .NOT. neutral )  CALL calc_ol
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+!
+!--       Natural-type horizontal surfaces
+          IF ( surf_lsm_h%ns >= 1  )  THEN
+             surf => surf_lsm_h
+             CALL calc_scaling_parameters
+             CALL calc_uvw_abs
+             IF ( .NOT. neutral )  CALL calc_ol
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+!
+!--       Urban-type horizontal surfaces
+          IF ( surf_usm_h%ns >= 1  )  THEN
+             surf => surf_usm_h
+             CALL calc_scaling_parameters
+             CALL calc_uvw_abs
+             IF ( .NOT. neutral )  CALL calc_ol
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+!
+!--    Use either Newton iteration or a lookup table for the bulk Richardson
+!--    number to calculate the Obukhov length 
+       ELSEIF ( most_method == 'newton'  .OR.  most_method == 'lookup' )  THEN
+!
+!--       Default-type upward-facing horizontal surfaces
+          IF ( surf_def_h(0)%ns >= 1  )  THEN
+             surf => surf_def_h(0)
+             CALL calc_uvw_abs
+             IF ( .NOT. neutral )  CALL calc_ol
+             CALL calc_us
+             CALL calc_scaling_parameters
+             CALL calc_surface_fluxes
+          ENDIF
+!
+!--       Natural-type horizontal surfaces
+          IF ( surf_lsm_h%ns >= 1  )  THEN
+             surf => surf_lsm_h
+             CALL calc_uvw_abs
+             IF ( .NOT. neutral )  CALL calc_ol
+             CALL calc_us
+             CALL calc_scaling_parameters
+             CALL calc_surface_fluxes
+          ENDIF
+!
+!--       Urban-type horizontal surfaces
+          IF ( surf_usm_h%ns >= 1  )  THEN
+             surf => surf_usm_h
+             CALL calc_uvw_abs
+             IF ( .NOT. neutral )  CALL calc_ol
+             CALL calc_us
+             CALL calc_scaling_parameters
+             CALL calc_surface_fluxes
+          ENDIF
+
+       ENDIF
+!
+!--    Treat downward-facing horizontal surfaces. Note, so far, these are 
+!--    always default type. Stratification is not considered
+!--    in this case, hence, no further distinction between different 
+!--    most_method is required.  
+       IF ( surf_def_h(1)%ns >= 1  )  THEN
+          downward = .TRUE.
+          surf => surf_def_h(1)
+          CALL calc_uvw_abs
+          CALL calc_us
+          CALL calc_surface_fluxes
+          downward = .FALSE.
+       ENDIF
+!
+!--    Calculate surfaces fluxes at vertical surfaces for momentum 
+!--    and subgrid-scale TKE.
+!--    No stability is considered. Therefore, scaling parameters and Obukhov-
+!--    length do not need to be calculated and no distinction in 'circular',
+!--    'Newton' or 'lookup' is necessary so far. 
+!--    Note, this will change if stability is once considered.
+       surf_vertical = .TRUE.
+!
+!--    Calculate horizontal momentum fluxes at north- and south-facing 
+!--    surfaces(usvs).
+!--    For default-type surfaces
+       mom_uv = .TRUE. 
+       DO  l = 0, 1
+          IF ( surf_def_v(l)%ns >= 1  )  THEN
+             surf => surf_def_v(l)
+!
+!--          Compute surface-parallel velocity
+             CALL calc_uvw_abs_v_ugrid
+!
+!--          Compute respective friction velocity on staggered grid
+             CALL calc_us
+!
+!--          Compute respective surface fluxes for momentum and TKE
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO
+!
+!--    For natural-type surfaces. Please note, even though stability is not
+!--    considered for the calculation of momentum fluxes at vertical surfaces,
+!--    scaling parameters and Obukov length are calculated nevertheless in this
+!--    case. This is due to the requirement of ts in parameterization of heat
+!--    flux in land-surface model in case of aero_resist_kray is not true.
+       IF ( .NOT. aero_resist_kray )  THEN
+          IF ( most_method == 'circular' )  THEN
+             DO  l = 0, 1
+                IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+                   surf => surf_lsm_v(l)
+!
+!--                Compute scaling parameters
+                   CALL calc_scaling_parameters
+!
+!--                Compute surface-parallel velocity
+                   CALL calc_uvw_abs_v_ugrid
+!
+!--                Compute Obukhov length
+                   IF ( .NOT. neutral )  CALL calc_ol
+!
+!--                Compute respective friction velocity on staggered grid
+                   CALL calc_us
+!
+!--                Compute respective surface fluxes for momentum and TKE
+                   CALL calc_surface_fluxes
+                ENDIF
+             ENDDO
+          ELSE
+             DO  l = 0, 1
+                IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+                   surf => surf_lsm_v(l)
+!
+!--                Compute surface-parallel velocity
+                   CALL calc_uvw_abs_v_ugrid
+!
+!--                Compute Obukhov length
+                   IF ( .NOT. neutral )  CALL calc_ol
+!
+!--                Compute respective friction velocity on staggered grid
+                   CALL calc_us
+!
+!--                Compute scaling parameters
+                   CALL calc_scaling_parameters
+!
+!--                Compute respective surface fluxes for momentum and TKE
+                   CALL calc_surface_fluxes
+                ENDIF
+             ENDDO
+          ENDIF
+!
+!--    No ts is required, so scaling parameters and Obukhov length do not need
+!--    to be computed.
+       ELSE
+          DO  l = 0, 1
+             IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+                surf => surf_lsm_v(l)
+!   
+!--             Compute surface-parallel velocity
+                CALL calc_uvw_abs_v_ugrid
+!
+!--             Compute respective friction velocity on staggered grid
+                CALL calc_us
+!
+!--             Compute respective surface fluxes for momentum and TKE
+                CALL calc_surface_fluxes
+             ENDIF
+          ENDDO
+       ENDIF
+!
+!--    For urban-type surfaces
+       DO  l = 0, 1
+          IF ( surf_usm_v(l)%ns >= 1  )  THEN
+             surf => surf_usm_v(l)
+!
+!--          Compute surface-parallel velocity
+             CALL calc_uvw_abs_v_ugrid
+!
+!--          Compute respective friction velocity on staggered grid
+             CALL calc_us
+!
+!--          Compute respective surface fluxes for momentum and TKE
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO
+!
+!--    Calculate horizontal momentum fluxes at east- and west-facing 
+!--    surfaces (vsus).
+!--    For default-type surfaces
+       DO  l = 2, 3
+          IF ( surf_def_v(l)%ns >= 1  )  THEN
+             surf => surf_def_v(l)
+!
+!--          Compute surface-parallel velocity
+             CALL calc_uvw_abs_v_vgrid
+!
+!--          Compute respective friction velocity on staggered grid
+             CALL calc_us
+!
+!--          Compute respective surface fluxes for momentum and TKE
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO
+!
+!--    For natural-type surfaces. Please note, even though stability is not
+!--    considered for the calculation of momentum fluxes at vertical surfaces,
+!--    scaling parameters and Obukov length are calculated nevertheless in this
+!--    case. This is due to the requirement of ts in parameterization of heat
+!--    flux in land-surface model in case of aero_resist_kray is not true.
+       IF ( .NOT. aero_resist_kray )  THEN
+          IF ( most_method == 'circular' )  THEN
+             DO  l = 2, 3
+                IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+                   surf => surf_lsm_v(l)
+!
+!--                Compute scaling parameters
+                   CALL calc_scaling_parameters
+!
+!--                Compute surface-parallel velocity
+                   CALL calc_uvw_abs_v_vgrid
+!
+!--                Compute Obukhov length
+                   IF ( .NOT. neutral )  CALL calc_ol
+!
+!--                Compute respective friction velocity on staggered grid
+                   CALL calc_us
+!
+!--                Compute respective surface fluxes for momentum and TKE
+                   CALL calc_surface_fluxes
+                ENDIF
+             ENDDO
+          ELSE
+             DO  l = 2, 3
+                IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+                   surf => surf_lsm_v(l)
+!
+!--                Compute surface-parallel velocity
+                   CALL calc_uvw_abs_v_vgrid
+!
+!--                Compute Obukhov length
+                   IF ( .NOT. neutral )  CALL calc_ol
+!
+!--                Compute respective friction velocity on staggered grid
+                   CALL calc_us
+!
+!--                Compute scaling parameters
+                   CALL calc_scaling_parameters
+!
+!--                Compute respective surface fluxes for momentum and TKE
+                   CALL calc_surface_fluxes
+                ENDIF
+             ENDDO
+          ENDIF
+       ELSE
+          DO  l = 2, 3
+             IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+                surf => surf_lsm_v(l)
+!   
+!--             Compute surface-parallel velocity
+                CALL calc_uvw_abs_v_vgrid
+!
+!--             Compute respective friction velocity on staggered grid
+                CALL calc_us
+!
+!--             Compute respective surface fluxes for momentum and TKE
+                CALL calc_surface_fluxes
+             ENDIF
+          ENDDO
+       ENDIF
+!
+!--    For urban-type surfaces
+       DO  l = 2, 3
+          IF ( surf_usm_v(l)%ns >= 1  )  THEN
+             surf => surf_usm_v(l)
+!
+!--          Compute surface-parallel velocity
+             CALL calc_uvw_abs_v_vgrid
+!
+!--          Compute respective friction velocity on staggered grid
+             CALL calc_us
+!
+!--          Compute respective surface fluxes for momentum and TKE
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO
+       mom_uv = .FALSE.
+!
+!--    Calculate horizontal momentum fluxes of w (wsus and wsvs) at vertial 
+!--    surfaces.
+       mom_w = .TRUE.
+!
+!--    Default-type surfaces
+       DO  l = 0, 3
+          IF ( surf_def_v(l)%ns >= 1  )  THEN
+             surf => surf_def_v(l)
+             CALL calc_uvw_abs_v_wgrid
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO 
+!
+!--    Natural-type surfaces
+       DO  l = 0, 3
+          IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+             surf => surf_lsm_v(l)
+             CALL calc_uvw_abs_v_wgrid
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO 
+!
+!--    Urban-type surfaces
+       DO  l = 0, 3
+          IF ( surf_usm_v(l)%ns >= 1  )  THEN
+             surf => surf_usm_v(l)
+             CALL calc_uvw_abs_v_wgrid
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO 
+       mom_w = .FALSE.   
+!
+!--    Calculate momentum fluxes usvs, vsus, wsus and wsvs at vertical 
+!--    surfaces for TKE production. Note, here, momentum fluxes are defined 
+!--    at grid center and are not staggered as before.
+       mom_tke = .TRUE.
+!
+!--    Default-type surfaces
+       DO  l = 0, 3
+          IF ( surf_def_v(l)%ns >= 1  )  THEN
+             surf => surf_def_v(l)
+             CALL calc_uvw_abs_v_sgrid
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO 
+!
+!--    Natural-type surfaces
+       DO  l = 0, 3
+          IF ( surf_lsm_v(l)%ns >= 1  )  THEN
+             surf => surf_lsm_v(l)
+             CALL calc_uvw_abs_v_sgrid
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO 
+!
+!--    Urban-type surfaces
+       DO  l = 0, 3
+          IF ( surf_usm_v(l)%ns >= 1  )  THEN
+             surf => surf_usm_v(l)
+             CALL calc_uvw_abs_v_sgrid
+             CALL calc_us
+             CALL calc_surface_fluxes
+          ENDIF
+       ENDDO 
+       mom_tke = .FALSE.
+  
+
+    END SUBROUTINE surface_layer_fluxes
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializing actions for the surface layer routine. Basically, this involves
+!> the preparation of a lookup table for the the bulk Richardson number vs 
+!> Obukhov length L when using the lookup table method.
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_surface_layer_fluxes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: li,         & !< Index for loop to create lookup table
+                       num_steps_n   !< Number of non-stretched zeta steps
+
+       LOGICAL :: terminate_run_l = .FALSE.    !< Flag to terminate run (global)
+
+       REAL(wp), PARAMETER ::  zeta_stretch = -10.0_wp !< Start of stretching in the free convection limit
+                               
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: zeta_tmp
+
+
+       REAL(wp) :: zeta_step,            & !< Increment of zeta
+                   regr      = 1.01_wp,  & !< Stretching factor of zeta_step in the free convection limit
+                   regr_old  = 1.0E9_wp, & !< Stretching factor of last iteration step
+                   z0h_min   = 0.0_wp,   & !< Minimum value of z0h to create table
+                   z0_min    = 0.0_wp      !< Minimum value of z0 to create table
+
+
+
+
+!
+!--    In case of runs with neutral statification, set Obukhov length to a
+!--    large value
+       IF ( neutral )  THEN
+          IF ( surf_def_h(0)%ns >= 1 )  surf_def_h(0)%ol = 1.0E10_wp
+          IF ( surf_lsm_h%ns    >= 1 )  surf_lsm_h%ol    = 1.0E10_wp
+          IF ( surf_usm_h%ns    >= 1 )  surf_usm_h%ol    = 1.0E10_wp
+       ENDIF
+
+       IF ( most_method == 'lookup' )  THEN
+
+!
+!--       Check for roughness heterogeneity. In that case terminate run and
+!--       inform user. Check for both, natural and non-natural walls.
+          IF ( surf_def_h(0)%ns >= 1 )  THEN
+             IF ( MINVAL( surf_def_h(0)%z0h ) /= MAXVAL( surf_def_h(0)%z0h )  .OR. &
+                  MINVAL( surf_def_h(0)%z0  ) /= MAXVAL( surf_def_h(0)%z0  ) )  THEN
+                terminate_run_l = .TRUE.
+             ENDIF
+          ENDIF
+          IF ( surf_lsm_h%ns >= 1 )  THEN
+             IF ( MINVAL( surf_lsm_h%z0h ) /= MAXVAL( surf_lsm_h%z0h )  .OR.       &
+                  MINVAL( surf_lsm_h%z0  ) /= MAXVAL( surf_lsm_h%z0  ) )  THEN
+                terminate_run_l = .TRUE.
+             ENDIF
+          ENDIF
+          IF ( surf_usm_h%ns >= 1 )  THEN
+             IF ( MINVAL( surf_usm_h%z0h ) /= MAXVAL( surf_usm_h%z0h )  .OR.       &
+                  MINVAL( surf_usm_h%z0  ) /= MAXVAL( surf_usm_h%z0  ) )  THEN
+                terminate_run_l = .TRUE.
+             ENDIF
+          ENDIF
+!
+!--       Check roughness homogeneity between differt surface types. 
+          IF ( surf_lsm_h%ns >= 1  .AND.  surf_def_h(0)%ns >= 1 )  THEN
+             IF ( MINVAL( surf_lsm_h%z0h ) /= MAXVAL( surf_def_h(0)%z0h )  .OR.    &
+                  MINVAL( surf_lsm_h%z0  ) /= MAXVAL( surf_def_h(0)%z0  ) )  THEN
+                terminate_run_l = .TRUE.
+             ENDIF
+          ENDIF
+          IF ( surf_usm_h%ns >= 1  .AND.  surf_def_h(0)%ns >= 1 )  THEN
+             IF ( MINVAL( surf_usm_h%z0h ) /= MAXVAL( surf_def_h(0)%z0h )  .OR.    &
+                  MINVAL( surf_usm_h%z0  ) /= MAXVAL( surf_def_h(0)%z0  ) )  THEN
+                terminate_run_l = .TRUE.
+             ENDIF
+          ENDIF
+          IF ( surf_usm_h%ns >= 1  .AND.  surf_lsm_h%ns >= 1 )  THEN
+             IF ( MINVAL( surf_usm_h%z0h ) /= MAXVAL( surf_lsm_h%z0h )  .OR.       &
+                  MINVAL( surf_usm_h%z0  ) /= MAXVAL( surf_lsm_h%z0  ) )  THEN
+                terminate_run_l = .TRUE.
+             ENDIF
+          ENDIF
+
+
+#if defined( __parallel )
+!
+!--       Make a logical OR for all processes. Force termiation of model if result
+!--       is TRUE
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( terminate_run_l, terminate_run, 1, MPI_LOGICAL,  &
+                              MPI_LOR, comm2d, ierr )
+#else
+          terminate_run = terminate_run_l
+#endif
+
+          IF ( terminate_run )  THEN
+             message_string = 'most_method = "lookup" cannot be used in ' //   &
+                              'combination with a prescribed roughness '  //   &
+                              'heterogeneity'
+             CALL message( 'surface_layer_fluxes', 'PA0116', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          ALLOCATE(  zeta_tmp(0:num_steps-1) )
+
+!
+!--       Use the lowest possible value for z_mo
+          k    = nzb
+          z_mo = zu(k+1) - zw(k)
+
+!
+!--       Calculate z/L range from zeta_stretch to zeta_max using 90% of the
+!--       available steps (num_steps). The calculation is done with negative
+!--       values of zeta in order to simplify the stretching in the free
+!--       convection limit for the remaining 10% of steps.
+          zeta_tmp(0) = - zeta_max
+          num_steps_n = ( num_steps * 9 / 10 ) - 1
+          zeta_step   = (zeta_max - zeta_stretch) / REAL(num_steps_n)
+
+          DO li = 1, num_steps_n
+             zeta_tmp(li) = zeta_tmp(li-1) + zeta_step
+          ENDDO
+
+!
+!--       Calculate stretching factor for the free convection range
+          DO  WHILE ( ABS( (regr-regr_old) / regr_old ) > 1.0E-10_wp )
+             regr_old = regr
+             regr = ( 1.0_wp - ( -zeta_min / zeta_step ) * ( 1.0_wp - regr )   &
+                    )**( 10.0_wp / REAL(num_steps) )
+          ENDDO
+
+!
+!--       Calculate z/L range from zeta_min to zeta_stretch
+          DO li = num_steps_n+1, num_steps-1
+             zeta_tmp(li) = zeta_tmp(li-1) + zeta_step
+             zeta_step = zeta_step * regr
+          ENDDO
+
+!
+!--       Save roughness lengths to temporary variables
+          IF ( surf_def_h(0)%ns >= 1  )  THEN
+             z0h_min = surf_def_h(0)%z0h(1)
+             z0_min  = surf_def_h(0)%z0(1)
+          ELSEIF ( surf_lsm_h%ns >= 1 )  THEN
+             z0h_min = surf_lsm_h%z0h(1)
+             z0_min  = surf_lsm_h%z0(1)
+          ELSEIF ( surf_usm_h%ns >= 1 )  THEN
+             z0h_min = surf_usm_h%z0h(1)
+             z0_min  = surf_usm_h%z0(1)
+          ENDIF         
+!
+!--       Calculate lookup table for the Richardson number versus Obukhov length
+!--       The Richardson number (rib) is defined depending on the choice of 
+!--       boundary conditions for temperature
+          IF ( ibc_pt_b == 1 )  THEN
+             DO li = 0, num_steps-1
+                ol_tab(li)  = - z_mo / zeta_tmp(num_steps-1-li)
+                rib_tab(li) = z_mo / ol_tab(li)  / ( LOG( z_mo / z0_min )       &
+                                                - psi_m( z_mo / ol_tab(li) )    &
+                                                + psi_m( z0_min / ol_tab(li) )  &
+                                                  )**3
+             ENDDO  
+          ELSE
+             DO li = 0, num_steps-1
+                ol_tab(li)  = - z_mo / zeta_tmp(num_steps-1-li)
+                rib_tab(li) = z_mo / ol_tab(li)  * ( LOG( z_mo / z0h_min )     &
+                                              - psi_h( z_mo / ol_tab(li) )     &
+                                              + psi_h( z0h_min / ol_tab(li) )  &
+                                            )                                  &
+                                          / ( LOG( z_mo / z0_min )             &
+                                              - psi_m( z_mo / ol_tab(li) )     &
+                                              + psi_m( z0_min / ol_tab(li) )   &
+                                            )**2
+             ENDDO
+          ENDIF
+
+!
+!--       Determine minimum values of rib in the lookup table. Set upper limit 
+!--       to critical Richardson number (0.25)
+          rib_min  = MINVAL(rib_tab)
+          rib_max  = 0.25 !MAXVAL(rib_tab)
+
+          DEALLOCATE( zeta_tmp )
+       ENDIF
+
+    END SUBROUTINE init_surface_layer_fluxes
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the absolute value of the horizontal velocity (relative to the
+!> surface) for horizontal surface elements. This is required by all methods.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_uvw_abs
+    
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  ibit          !< flag to mask computation of relative velocity in case of downward-facing surfaces
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+
+       REAL(wp)     :: w_lfc          !< local free convection velocity scale
+!
+!--    ibit is 1 for upward-facing surfaces, zero for downward-facing surfaces.
+       ibit = MERGE( 1, 0, .NOT. downward )
+
+       DO  m = 1, surf%ns
+
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+       
+!
+!--       Calculate free convection velocity scale w_lfc is 
+!--       use_free_convection_scaling = .T.. This will maintain a horizontal
+!--       velocity even for very weak wind convective conditions. SIGN is used
+!--       to set w_lfc to zero under stable conditions.
+          IF ( use_free_convection_scaling )  THEN 
+             w_lfc = ABS(g / surf%pt1(m) * surf%z_mo(m) * surf%shf(m))
+             w_lfc = ( 0.5_wp * ( w_lfc + SIGN(w_lfc,surf%shf(m)) ) )**(0.33333_wp)
+          ELSE
+             w_lfc = 0.0_wp
+          ENDIF
+
+!
+!--       Compute the absolute value of the horizontal velocity.
+!--       (relative to the surface in case the lower surface is the ocean).
+!--       Please note, in new surface modelling concept the index values changed,
+!--       i.e. the reference grid point is not the surface-grid point itself but
+!--       the first grid point outside of the topography. 
+!--       Note, in case of coupled ocean-atmosphere simulations relative velocity
+!--       with respect to the ocean surface is used, hence, (k-1,j,i) values
+!--       are used to calculate the absolute velocity. 
+!--       However, this do not apply for downward-facing walls. To mask this, 
+!--       use ibit, which checks for upward/downward-facing surfaces. 
+          surf%uvw_abs(m) = SQRT(                                              &
+                              ( 0.5_wp * (   u(k,j,i)   + u(k,j,i+1)           &
+                                        -  ( u(k-1,j,i) + u(k-1,j,i+1)         &
+                                           ) * ibit                            &
+                                         )                                     &
+                              )**2 +                                           &
+                              ( 0.5_wp * (   v(k,j,i)   + v(k,j+1,i)           &
+                                        -  ( v(k-1,j,i) + v(k-1,j+1,i)         &
+                                           ) * ibit                            &
+                                         )                                     &
+                              )**2  + w_lfc**2                                 &
+                                )
+
+                                
+
+       ENDDO
+
+    END SUBROUTINE calc_uvw_abs
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the absolute value of the horizontal velocity (relative to the
+!> surface) for horizontal surface elements. This is required by all methods.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_uvw_abs_v_ugrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+
+       REAL(wp)     ::  u_i
+       REAL(wp)     ::  w_i
+
+
+       DO  m = 1, surf%ns
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+!
+!--       Compute the absolute value of the surface parallel velocity on u-grid.
+          u_i  = u(k,j,i)
+          w_i  = 0.25_wp * ( w(k-1,j,i-1) + w(k-1,j,i) +                       &
+                             w(k,j,i-1)   + w(k,j,i) ) 
+
+          surf%uvw_abs(m) = SQRT( u_i**2 + w_i**2 ) 
+
+       ENDDO
+
+    END SUBROUTINE calc_uvw_abs_v_ugrid
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the absolute value of the horizontal velocity (relative to the
+!> surface) for horizontal surface elements. This is required by all methods.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_uvw_abs_v_vgrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+
+       REAL(wp)     ::  v_i
+       REAL(wp)     ::  w_i
+
+
+       DO  m = 1, surf%ns
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+
+          v_i  = u(k,j,i)
+          w_i  = 0.25_wp * ( w(k-1,j-1,i) + w(k-1,j,i) +                       &
+                             w(k,j-1,i)   + w(k,j,i) ) 
+
+          surf%uvw_abs(m) = SQRT( v_i**2 + w_i**2 ) 
+
+       ENDDO
+
+    END SUBROUTINE calc_uvw_abs_v_vgrid
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the absolute value of the horizontal velocity (relative to the
+!> surface) for horizontal surface elements. This is required by all methods.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_uvw_abs_v_wgrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+
+       REAL(wp)     ::  u_i
+       REAL(wp)     ::  v_i
+       REAL(wp)     ::  w_i
+!
+!--    North- (l=0) and south-facing (l=1) surfaces 
+       IF ( l == 0  .OR.  l == 1 )  THEN
+          DO  m = 1, surf%ns
+             i   = surf%i(m)            
+             j   = surf%j(m)
+             k   = surf%k(m)
+
+             u_i  = 0.25_wp * ( u(k+1,j,i+1) + u(k+1,j,i) +                    &
+                                u(k,j,i+1)   + u(k,j,i) )
+             v_i  = 0.0_wp
+             w_i  = w(k,j,i)
+
+             surf%uvw_abs(m) = SQRT( u_i**2 + v_i**2 + w_i**2 ) 
+          ENDDO
+!
+!--    East- (l=2) and west-facing (l=3) surfaces
+       ELSE
+          DO  m = 1, surf%ns
+             i   = surf%i(m)            
+             j   = surf%j(m)
+             k   = surf%k(m)
+
+             u_i  = 0.0_wp
+             v_i  = 0.25_wp * ( v(k+1,j+1,i) + v(k+1,j,i) +                    &
+                                v(k,j+1,i)   + v(k,j,i) )
+             w_i  = w(k,j,i)
+
+             surf%uvw_abs(m) = SQRT( u_i**2 + v_i**2 + w_i**2 ) 
+          ENDDO
+       ENDIF            
+
+    END SUBROUTINE calc_uvw_abs_v_wgrid
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Compute the absolute value of the horizontal velocity (relative to the
+!> surface) for horizontal surface elements. This is required by all methods.
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_uvw_abs_v_sgrid
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i             !< running index x direction
+       INTEGER(iwp) ::  j             !< running index y direction
+       INTEGER(iwp) ::  k             !< running index z direction
+       INTEGER(iwp) ::  m             !< running index surface elements
+
+       REAL(wp)     ::  u_i
+       REAL(wp)     ::  v_i
+       REAL(wp)     ::  w_i
+
+!
+!--    North- (l=0) and south-facing (l=1) walls 
+       IF ( l == 0  .OR.  l == 1 )  THEN
+          DO  m = 1, surf%ns
+             i   = surf%i(m)            
+             j   = surf%j(m)
+             k   = surf%k(m)
+
+             u_i = 0.5_wp * ( u(k,j,i) + u(k,j,i+1) )
+             v_i = 0.0_wp
+             w_i = 0.5_wp * ( w(k,j,i) + w(k-1,j,i) )
+
+             surf%uvw_abs(m) = SQRT( u_i**2 + v_i**2 + w_i**2 ) 
+          ENDDO
+!
+!--    East- (l=2) and west-facing (l=3) walls 
+       ELSE
+          DO  m = 1, surf%ns
+             i   = surf%i(m)            
+             j   = surf%j(m)
+             k   = surf%k(m)
+
+             u_i = 0.0_wp
+             v_i = 0.5_wp * ( v(k,j,i) + v(k,j+1,i) )
+             w_i = 0.5_wp * ( w(k,j,i) + w(k-1,j,i) )
+
+             surf%uvw_abs(m) = SQRT( u_i**2 + v_i**2 + w_i**2 ) 
+          ENDDO
+       ENDIF  
+
+    END SUBROUTINE calc_uvw_abs_v_sgrid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the Obukhov length (L) and Richardson flux number (z/L)
+!------------------------------------------------------------------------------!
+    SUBROUTINE calc_ol
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  iter    !< Newton iteration step
+       INTEGER(iwp) ::  li      !< look index
+       INTEGER(iwp) ::  m       !< loop variable over all horizontal wall elements 
+
+       REAL(wp)     :: f,      & !< Function for Newton iteration: f = Ri - [...]/[...]^2 = 0
+                       f_d_ol, & !< Derivative of f
+                       ol_l,   & !< Lower bound of L for Newton iteration
+                       ol_m,   & !< Previous value of L for Newton iteration
+                       ol_old, & !< Previous time step value of L
+                       ol_u      !< Upper bound of L for Newton iteration
+
+       IF ( TRIM( most_method ) /= 'circular' )  THEN
+!
+!--       Evaluate bulk Richardson number (calculation depends on
+!--       definition based on setting of boundary conditions
+          IF ( ibc_pt_b /= 1 )  THEN
+             IF ( humidity )  THEN
+                !$OMP PARALLEL DO PRIVATE( z_mo )
+                DO  m = 1, surf%ns
+
+                   z_mo = surf%z_mo(m)
+
+                   surf%rib(m) = g * z_mo                                      &
+                                 * ( surf%vpt1(m) - surf%vpt_surface(m) )      &
+                                 / ( surf%uvw_abs(m)**2 * surf%vpt1(m)         &
+                                 + 1.0E-20_wp )
+                ENDDO
+             ELSE
+                !$OMP PARALLEL DO PRIVATE( z_mo )
+                DO  m = 1, surf%ns
+
+                   z_mo = surf%z_mo(m)
+
+                   surf%rib(m) = g * z_mo                                      &
+                                 * ( surf%pt1(m) - surf%pt_surface(m) )        &
+                                 / ( surf%uvw_abs(m)**2 * surf%pt1(m)          &
+                                 + 1.0E-20_wp )
+                ENDDO
+             ENDIF
+          ELSE
+             IF ( humidity )  THEN
+                !$OMP PARALLEL DO PRIVATE( k, z_mo )
+                DO  m = 1, surf%ns
+
+                   k   = surf%k(m)
+
+                   z_mo = surf%z_mo(m)
+
+                   surf%rib(m) = - g * z_mo * ( ( 1.0_wp + 0.61_wp             &
+                           * surf%qv1(m) ) * surf%shf(m) + 0.61_wp             &
+                           * surf%pt1(m) * surf%qsws(m) ) *                    &
+                             drho_air_zw(k-1)                /                 &
+                         ( surf%uvw_abs(m)**3 * surf%vpt1(m) * kappa**2        &
+                           + 1.0E-20_wp )
+                ENDDO
+             ELSE
+                !$OMP PARALLEL DO PRIVATE( k, z_mo )
+                DO  m = 1, surf%ns
+
+                   k   = surf%k(m)
+
+                   z_mo = surf%z_mo(m)
+
+                   surf%rib(m) = - g * z_mo * surf%shf(m) *                    &
+                                        drho_air_zw(k-1)            /          &
+                        ( surf%uvw_abs(m)**3 * surf%pt1(m) * kappa**2          &
+                           + 1.0E-20_wp )
+                ENDDO
+             ENDIF
+          ENDIF
+
+       ENDIF
+
+
+!
+!--    Calculate the Obukhov length either using a Newton iteration
+!--    method, via a lookup table, or using the old circular way
+       IF ( TRIM( most_method ) == 'newton' )  THEN
+
+          DO  m = 1, surf%ns
+
+             i   = surf%i(m)            
+             j   = surf%j(m)
+
+             z_mo = surf%z_mo(m)
+
+!
+!--          Store current value in case the Newton iteration fails
+             ol_old = surf%ol(m)
+
+!
+!--          Ensure that the bulk Richardson number and the Obukhov 
+!--          length have the same sign
+             IF ( surf%rib(m) * surf%ol(m) < 0.0_wp  .OR.                      &
+                  ABS( surf%ol(m) ) == ol_max )  THEN
+                IF ( surf%rib(m) > 1.0_wp ) surf%ol(m) =  0.01_wp
+                IF ( surf%rib(m) < 0.0_wp ) surf%ol(m) = -0.01_wp
+             ENDIF
+!
+!--          Iteration to find Obukhov length
+             iter = 0
+             DO
+                iter = iter + 1
+!
+!--             In case of divergence, use the value of the previous time step
+                IF ( iter > 1000 )  THEN
+                   surf%ol(m) = ol_old
+                   EXIT
+                ENDIF
+
+                ol_m = surf%ol(m)
+                ol_l = ol_m - 0.001_wp * ol_m
+                ol_u = ol_m + 0.001_wp * ol_m
+
+
+                IF ( ibc_pt_b /= 1 )  THEN
+!
+!--                Calculate f = Ri - [...]/[...]^2 = 0
+                   f = surf%rib(m) - ( z_mo / ol_m ) * (                       &
+                                                 LOG( z_mo / surf%z0h(m) )     &
+                                                 - psi_h( z_mo / ol_m )        &
+                                                 + psi_h( surf%z0h(m) /        &
+                                                          ol_m )               &
+                                                               )               &
+                                              / ( LOG( z_mo / surf%z0(m) )     &
+                                                 - psi_m( z_mo / ol_m )        &
+                                                 + psi_m( surf%z0(m) /         &
+                                                          ol_m )               &
+                                                 )**2
+
+!
+!--                 Calculate df/dL
+                    f_d_ol = ( - ( z_mo / ol_u ) * ( LOG( z_mo /               &
+                                                             surf%z0h(m) )     &
+                                            - psi_h( z_mo / ol_u )             &
+                                            + psi_h( surf%z0h(m) / ol_u )      &
+                                              )                                &
+                                            / ( LOG( z_mo / surf%z0(m) )       &
+                                            - psi_m( z_mo / ol_u )             &
+                                            + psi_m( surf%z0(m) / ol_u )       &
+                                              )**2                             &
+                           + ( z_mo / ol_l ) * ( LOG( z_mo / surf%z0h(m) )     &
+                                            - psi_h( z_mo / ol_l )             &
+                                            + psi_h( surf%z0h(m) / ol_l )      &
+                                              )                                &
+                                            / ( LOG( z_mo / surf%z0(m) )       &
+                                            - psi_m( z_mo / ol_l )             &
+                                            + psi_m( surf%z0(m) / ol_l )       &
+                                              )**2                             &
+                             ) / ( ol_u - ol_l )
+                ELSE
+!
+!--                Calculate f = Ri - 1 /[...]^3 = 0
+                   f = surf%rib(m) - ( z_mo / ol_m ) /                         &
+                                                ( LOG( z_mo / surf%z0(m) )     &
+                                            - psi_m( z_mo / ol_m )             &
+                                            + psi_m( surf%z0(m) / ol_m )       &
+                                                )**3
+
+!
+!--                Calculate df/dL
+                   f_d_ol = ( - ( z_mo / ol_u ) / ( LOG( z_mo /                &
+                                                            surf%z0(m) )       &
+                                            - psi_m( z_mo / ol_u )             &
+                                            + psi_m( surf%z0(m) / ol_u )       &
+                                                     )**3                      &
+                           + ( z_mo / ol_l ) / ( LOG( z_mo / surf%z0(m) )      &
+                                            - psi_m( z_mo / ol_l )             &
+                                            + psi_m( surf%z0(m) / ol_l )       &
+                                               )**3                            &
+                                  ) / ( ol_u - ol_l )
+                ENDIF
+!
+!--             Calculate new L
+                surf%ol(m) = ol_m - f / f_d_ol
+
+!
+!--             Ensure that the bulk Richardson number and the Obukhov 
+!--             length have the same sign and ensure convergence.
+                IF ( surf%ol(m) * ol_m < 0.0_wp )  surf%ol(m) = ol_m * 0.5_wp
+!
+!--             If unrealistic value occurs, set L to the maximum
+!--             value that is allowed
+                IF ( ABS( surf%ol(m) ) > ol_max )  THEN
+                   surf%ol(m) = ol_max
+                   EXIT
+                ENDIF
+!
+!--             Check for convergence
+                IF ( ABS( ( surf%ol(m) - ol_m ) /                              &
+                     surf%ol(m) ) < 1.0E-4_wp )  THEN
+                   EXIT
+                ELSE
+                   CYCLE
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+       ELSEIF ( TRIM( most_method ) == 'lookup' )  THEN
+
+          !$OMP PARALLEL DO PRIVATE( i, j, z_mo, li ) FIRSTPRIVATE( li_bnd ) LASTPRIVATE( li_bnd )
+          DO  m = 1, surf%ns
+
+             i   = surf%i(m)            
+             j   = surf%j(m)
+!
+!--          If the bulk Richardson number is outside the range of the lookup
+!--          table, set it to the exceeding threshold value
+             IF ( surf%rib(m) < rib_min )  surf%rib(m) = rib_min
+             IF ( surf%rib(m) > rib_max )  surf%rib(m) = rib_max
+
+!
+!--          Find the correct index bounds for linear interpolation. As the
+!--          Richardson number will not differ very much from time step to
+!--          time step , use the index from the last step and search in the 
+!--          correct direction
+             li = li_bnd
+             IF ( rib_tab(li) - surf%rib(m) > 0.0_wp )  THEN
+                DO  WHILE ( rib_tab(li-1) - surf%rib(m) > 0.0_wp  .AND.  li > 0 )
+                   li = li-1
+                ENDDO
+             ELSE
+                DO  WHILE ( rib_tab(li) - surf%rib(m) < 0.0_wp                 &
+                           .AND.  li < num_steps-1 )
+                   li = li+1
+                ENDDO
+             ENDIF
+             li_bnd = li
+
+!
+!--          Linear interpolation to find the correct value of z/L
+             surf%ol(m) = ( ol_tab(li-1) + ( ol_tab(li) - ol_tab(li-1) )       &
+                         / (  rib_tab(li) - rib_tab(li-1) )                    &
+                         * ( surf%rib(m) - rib_tab(li-1) ) )
+
+          ENDDO
+
+       ELSEIF ( TRIM( most_method ) == 'circular' )  THEN
+
+          IF ( .NOT. humidity )  THEN
+             !$OMP PARALLEL DO PRIVATE( z_mo )
+             DO  m = 1, surf%ns
+
+                z_mo = surf%z_mo(m)
+
+                surf%ol(m) =  ( surf%pt1(m) *  surf%us(m)**2 ) /               &
+                                       ( kappa * g *                           &
+                                         surf%ts(m) + 1E-30_wp )
+!
+!--             Limit the value range of the Obukhov length.
+!--             This is necessary for very small velocities (u,v --> 1), because
+!--             the absolute value of ol can then become very small, which in
+!--             consequence would result in very large shear stresses and very
+!--             small momentum fluxes (both are generally unrealistic).
+                IF ( ( z_mo / ( surf%ol(m) + 1E-30_wp ) ) < zeta_min )         &
+                   surf%ol(m) = z_mo / zeta_min
+                IF ( ( z_mo / ( surf%ol(m) + 1E-30_wp ) ) > zeta_max )         &
+                   surf%ol(m) = z_mo / zeta_max
+
+             ENDDO
+          ELSEIF ( bulk_cloud_model  .OR.  cloud_droplets )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns
+
+                i   = surf%i(m)            
+                j   = surf%j(m)
+                k   = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+
+                surf%ol(m) =  ( surf%vpt1(m) * surf%us(m)**2 ) /               &
+                    ( kappa * g * ( surf%ts(m) +                               &
+                         0.61_wp * surf%pt1(m) * surf%us(m)                    &
+                       + 0.61_wp * surf%qv1(m) * surf%ts(m) -                  &
+                                   surf%ts(m)  * ql(k,j,i) ) + 1E-30_wp )
+!
+!--             Limit the value range of the Obukhov length.
+!--             This is necessary for very small velocities (u,v --> 1), because
+!--             the absolute value of ol can then become very small, which in
+!--             consequence would result in very large shear stresses and very
+!--             small momentum fluxes (both are generally unrealistic).
+                IF ( ( z_mo / ( surf%ol(m) + 1E-30_wp ) ) < zeta_min )         &
+                   surf%ol(m) = z_mo / zeta_min
+                IF ( ( z_mo / ( surf%ol(m) + 1E-30_wp ) ) > zeta_max )         &
+                   surf%ol(m) = z_mo / zeta_max
+
+             ENDDO
+          ELSE
+
+             !$OMP PARALLEL DO PRIVATE( z_mo )
+             DO  m = 1, surf%ns
+
+                z_mo = surf%z_mo(m)
+
+                surf%ol(m) =  ( surf%vpt1(m) *  surf%us(m)**2 ) /              &
+                    ( kappa * g * ( surf%ts(m) + 0.61_wp * surf%pt1(m) *       &
+                                    surf%qs(m) + 0.61_wp * surf%qv1(m) *       &
+                                    surf%ts(m) ) + 1E-30_wp )
+
+!
+!--             Limit the value range of the Obukhov length.
+!--             This is necessary for very small velocities (u,v --> 1), because
+!--             the absolute value of ol can then become very small, which in
+!--             consequence would result in very large shear stresses and very
+!--             small momentum fluxes (both are generally unrealistic).
+                IF ( ( z_mo / ( surf%ol(m) + 1E-30_wp ) ) < zeta_min )         &
+                   surf%ol(m) = z_mo / zeta_min
+                IF ( ( z_mo / ( surf%ol(m) + 1E-30_wp ) ) > zeta_max )         &
+                   surf%ol(m) = z_mo / zeta_max
+
+             ENDDO
+
+          ENDIF
+
+       ENDIF
+
+    END SUBROUTINE calc_ol
+
+!
+!-- Calculate friction velocity u*
+    SUBROUTINE calc_us
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  m       !< loop variable over all horizontal surf elements 
+
+!
+!--    Compute u* at horizontal surfaces at the scalars' grid points
+       IF ( .NOT. surf_vertical )  THEN
+!
+!--       Compute u* at upward-facing surfaces
+          IF ( .NOT. downward )  THEN
+             !$OMP PARALLEL  DO PRIVATE( z_mo )
+             DO  m = 1, surf%ns
+
+                z_mo = surf%z_mo(m)
+!
+!--             Compute u* at the scalars' grid points
+                surf%us(m) = kappa * surf%uvw_abs(m) /                         &
+                            ( LOG( z_mo / surf%z0(m) )                         &
+                           - psi_m( z_mo / surf%ol(m) )                        &
+                           + psi_m( surf%z0(m) / surf%ol(m) ) )
+   
+             ENDDO
+!
+!--       Compute u* at downward-facing surfaces. This case, do not consider
+!--       any stability. 
+          ELSE
+             !$OMP PARALLEL  DO PRIVATE( z_mo )
+             DO  m = 1, surf%ns
+
+                z_mo = surf%z_mo(m)
+!
+!--             Compute u* at the scalars' grid points
+                surf%us(m) = kappa * surf%uvw_abs(m) / LOG( z_mo / surf%z0(m) )
+   
+             ENDDO
+          ENDIF
+!
+!--    Compute u* at vertical surfaces at the u/v/v grid, respectively. 
+!--    No stability is considered in this case.
+       ELSE
+          !$OMP PARALLEL DO PRIVATE( z_mo )
+          DO  m = 1, surf%ns
+             z_mo = surf%z_mo(m)
+
+             surf%us(m) = kappa * surf%uvw_abs(m) / LOG( z_mo / surf%z0(m) )
+          ENDDO
+       ENDIF
+
+    END SUBROUTINE calc_us
+
+!
+!-- Calculate potential temperature, specific humidity, and virtual potential
+!-- temperature at first grid level
+    SUBROUTINE calc_pt_q
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  m       !< loop variable over all horizontal surf elements 
+
+       !$OMP PARALLEL DO PRIVATE( i, j, k )
+       DO  m = 1, surf%ns 
+
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+
+          IF ( bulk_cloud_model ) THEN
+             surf%pt1(m) = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
+             surf%qv1(m) = q(k,j,i) - ql(k,j,i)
+          ELSEIF( cloud_droplets ) THEN
+             surf%pt1(m) = pt(k,j,i) + lv_d_cp * d_exner(k) * ql(k,j,i)
+             surf%qv1(m) = q(k,j,i) 
+          ELSE
+             surf%pt1(m) = pt(k,j,i)
+             IF ( humidity )  THEN
+                surf%qv1(m) = q(k,j,i)
+             ELSE
+                surf%qv1(m) = 0.0_wp
+             ENDIF
+          ENDIF 
+
+          IF ( humidity )  THEN
+             surf%vpt1(m) = pt(k,j,i) * ( 1.0_wp + 0.61_wp * q(k,j,i) )
+          ENDIF
+          
+       ENDDO
+
+    END SUBROUTINE calc_pt_q
+
+
+!
+!-- Set potential temperature at surface grid level.
+!-- ( only for upward-facing surfs )
+    SUBROUTINE calc_pt_surface
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k_off    !< index offset between surface and atmosphere grid point (-1 for upward-, +1 for downward-facing walls) 
+       INTEGER(iwp) ::  m       !< loop variable over all horizontal surf elements 
+       
+       k_off = surf%koff
+       !$OMP PARALLEL DO PRIVATE( i, j, k )
+       DO  m = 1, surf%ns 
+
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+
+          surf%pt_surface(m) = pt(k+k_off,j,i)
+
+       ENDDO
+
+    END SUBROUTINE calc_pt_surface
+
+!
+!-- Set mixing ratio at surface grid level. ( Only for upward-facing surfs. )
+    SUBROUTINE calc_q_surface
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k_off   !< index offset between surface and atmosphere grid point (-1 for upward-, +1 for downward-facing walls) 
+       INTEGER(iwp) ::  m       !< loop variable over all horizontal surf elements 
+       
+       k_off = surf%koff
+       !$OMP PARALLEL DO PRIVATE( i, j, k )
+       DO  m = 1, surf%ns 
+
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+
+          surf%q_surface(m) = q(k+k_off,j,i)
+
+       ENDDO
+
+    END SUBROUTINE calc_q_surface
+    
+!
+!-- Set virtual potential temperature at surface grid level.
+!-- ( only for upward-facing surfs )
+    SUBROUTINE calc_vpt_surface
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k_off    !< index offset between surface and atmosphere grid point (-1 for upward-, +1 for downward-facing walls) 
+       INTEGER(iwp) ::  m       !< loop variable over all horizontal surf elements 
+       
+       k_off = surf%koff
+       !$OMP PARALLEL DO PRIVATE( i, j, k )
+       DO  m = 1, surf%ns 
+
+          i   = surf%i(m)            
+          j   = surf%j(m)
+          k   = surf%k(m)
+
+          surf%vpt_surface(m) = vpt(k+k_off,j,i)
+
+       ENDDO
+
+    END SUBROUTINE calc_vpt_surface
+    
+!
+!-- Calculate the other MOST scaling parameters theta*, q*, (qc*, qr*, nc*, nr*)
+    SUBROUTINE calc_scaling_parameters
+
+       IMPLICIT NONE
+
+
+       INTEGER(iwp)  ::  m       !< loop variable over all horizontal surf elements 
+       INTEGER(iwp)  ::  lsp     !< running index for chemical species
+! 
+!--    Compute theta* at horizontal surfaces
+       IF ( constant_heatflux  .AND.  .NOT. surf_vertical )  THEN
+!
+!--       For a given heat flux in the surface layer:
+
+          !$OMP PARALLEL DO PRIVATE( i, j, k )
+          DO  m = 1, surf%ns 
+
+             i   = surf%i(m)            
+             j   = surf%j(m)
+             k   = surf%k(m)
+
+             surf%ts(m) = -surf%shf(m) * drho_air_zw(k-1) /                    &
+                                  ( surf%us(m) + 1E-30_wp )
+
+!
+!--          ts must be limited, because otherwise overflow may occur in case
+!--          of us=0 when computing ol further below
+             IF ( surf%ts(m) < -1.05E5_wp )  surf%ts(m) = -1.0E5_wp
+             IF ( surf%ts(m) >  1.0E5_wp  )  surf%ts(m) =  1.0E5_wp
+
+          ENDDO
+
+       ELSEIF ( .NOT. surf_vertical ) THEN
+!
+!--       For a given surface temperature:
+          IF ( large_scale_forcing  .AND.  lsf_surf )  THEN
+
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, surf%ns 
+                i   = surf%i(m)            
+                j   = surf%j(m)
+                k   = surf%k(m)
+
+                pt(k-1,j,i) = pt_surface
+             ENDDO
+          ENDIF
+
+          !$OMP PARALLEL DO PRIVATE( z_mo )
+          DO  m = 1, surf%ns   
+
+             z_mo = surf%z_mo(m)
+
+             surf%ts(m) = kappa * ( surf%pt1(m) - surf%pt_surface(m) )      &
+                                  / ( LOG( z_mo / surf%z0h(m) )             &
+                                      - psi_h( z_mo / surf%ol(m) )          &
+                                      + psi_h( surf%z0h(m) / surf%ol(m) ) )
+
+          ENDDO
+
+       ENDIF
+! 
+!--    Compute theta* at vertical surfaces. This is only required in case of 
+!--    land-surface model, in order to compute aerodynamical resistance.
+       IF ( surf_vertical )  THEN
+          !$OMP PARALLEL DO PRIVATE( i, j )
+          DO  m = 1, surf%ns 
+
+             i          =  surf%i(m)            
+             j          =  surf%j(m)
+             surf%ts(m) = -surf%shf(m) / ( surf%us(m) + 1E-30_wp )
+!
+!--          ts must be limited, because otherwise overflow may occur in case
+!--          of us=0 when computing ol further below
+             IF ( surf%ts(m) < -1.05E5_wp )  surf%ts(m) = -1.0E5_wp
+             IF ( surf%ts(m) >  1.0E5_wp  )  surf%ts(m) =  1.0E5_wp
+
+          ENDDO
+       ENDIF
+
+!
+!--    If required compute q* at horizontal surfaces
+       IF ( humidity )  THEN
+          IF ( constant_waterflux  .AND.  .NOT. surf_vertical )  THEN
+!
+!--          For a given water flux in the surface layer
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, surf%ns  
+
+                i   = surf%i(m)            
+                j   = surf%j(m)
+                k   = surf%k(m)
+                surf%qs(m) = -surf%qsws(m) * drho_air_zw(k-1) /                &
+                                               ( surf%us(m) + 1E-30_wp )
+
+             ENDDO
+
+          ELSEIF ( .NOT. surf_vertical )  THEN 
+             coupled_run = ( coupling_mode == 'atmosphere_to_ocean'  .AND.     &
+                             run_coupled )
+
+             IF ( large_scale_forcing  .AND.  lsf_surf )  THEN
+                !$OMP PARALLEL DO PRIVATE( i, j, k )
+                DO  m = 1, surf%ns  
+
+                   i   = surf%i(m)           
+                   j   = surf%j(m)
+                   k   = surf%k(m)
+                   q(k-1,j,i) = q_surface
+                   
+                ENDDO
+             ENDIF
+
+!
+!--          Assume saturation for atmosphere coupled to ocean (but not
+!--          in case of precursor runs)
+             IF ( coupled_run )  THEN
+                !$OMP PARALLEL DO PRIVATE( i, j, k, e_s )
+                DO  m = 1, surf%ns   
+                   i   = surf%i(m)            
+                   j   = surf%j(m)
+                   k   = surf%k(m)
+                   e_s = 6.1_wp * &
+                              EXP( 0.07_wp * ( MIN(pt(k-1,j,i),pt(k,j,i))      &
+                                               - 273.15_wp ) )
+                   q(k-1,j,i) = rd_d_rv * e_s / ( surface_pressure - e_s )
+                ENDDO
+             ENDIF
+
+             IF ( bulk_cloud_model  .OR.  cloud_droplets )  THEN
+               !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+                DO  m = 1, surf%ns   
+
+                   i   = surf%i(m)            
+                   j   = surf%j(m)
+                   k   = surf%k(m)
+   
+                   z_mo = surf%z_mo(m)
+
+                   surf%qs(m) = kappa * ( surf%qv1(m) - surf%q_surface(m) )    &
+                                        / ( LOG( z_mo / surf%z0q(m) )          &
+                                            - psi_h( z_mo / surf%ol(m) )       &
+                                            + psi_h( surf%z0q(m) /             &
+                                                     surf%ol(m) ) )
+                ENDDO
+             ELSE
+                !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+                DO  m = 1, surf%ns   
+
+                   i   = surf%i(m)            
+                   j   = surf%j(m)
+                   k   = surf%k(m)
+   
+                   z_mo = surf%z_mo(m)
+
+                   surf%qs(m) = kappa * ( q(k,j,i) - q(k-1,j,i) )              &
+                                        / ( LOG( z_mo / surf%z0q(m) )          &
+                                            - psi_h( z_mo / surf%ol(m) )       &
+                                            + psi_h( surf%z0q(m) /             &
+                                                     surf%ol(m) ) )
+                ENDDO
+             ENDIF
+          ENDIF
+! 
+!--       Compute q* at vertical surfaces
+          IF ( surf_vertical )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns  
+
+                i          =  surf%i(m)            
+                j          =  surf%j(m)
+                surf%qs(m) = -surf%qsws(m) / ( surf%us(m) + 1E-30_wp )
+
+             ENDDO
+          ENDIF
+       ENDIF
+       
+!
+!--    If required compute s*
+       IF ( passive_scalar )  THEN
+!
+!--       At horizontal surfaces
+          IF ( constant_scalarflux  .AND.  .NOT. surf_vertical )  THEN
+!
+!--          For a given scalar flux in the surface layer
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns  
+                i   = surf%i(m)            
+                j   = surf%j(m)
+                surf%ss(m) = -surf%ssws(m) / ( surf%us(m) + 1E-30_wp )
+             ENDDO
+          ENDIF
+!
+!--       At vertical surfaces
+          IF ( surf_vertical )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns  
+                i          =  surf%i(m)            
+                j          =  surf%j(m)
+                surf%ss(m) = -surf%ssws(m) / ( surf%us(m) + 1E-30_wp )
+             ENDDO
+          ENDIF
+       ENDIF
+
+!
+!--    If required compute cs* (chemical species)
+       IF ( air_chemistry  )  THEN  
+!
+!--       At horizontal surfaces                             
+          DO  lsp = 1, nvar
+             IF ( constant_csflux(lsp)  .AND.  .NOT.  surf_vertical )  THEN
+!--             For a given chemical species' flux in the surface layer
+                !$OMP PARALLEL DO PRIVATE( i, j )
+                DO  m = 1, surf%ns  
+                   i   = surf%i(m)            
+                   j   = surf%j(m)
+                   surf%css(lsp,m) = -surf%cssws(lsp,m) / ( surf%us(m) + 1E-30_wp )
+                ENDDO
+             ENDIF
+          ENDDO
+!
+!--       At vertical surfaces
+          IF ( surf_vertical )  THEN
+             DO  lsp = 1, nvar
+                !$OMP PARALLEL DO PRIVATE( i, j )
+                DO  m = 1, surf%ns  
+                   i   = surf%i(m)            
+                   j   = surf%j(m)
+                   surf%css(lsp,m) = -surf%cssws(lsp,m) / ( surf%us(m) + 1E-30_wp )
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+!
+!--    If required compute qc* and nc*
+       IF ( bulk_cloud_model  .AND.  microphysics_morrison  .AND.              &
+            .NOT. surf_vertical )  THEN
+          !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+          DO  m = 1, surf%ns    
+
+             i    = surf%i(m)            
+             j    = surf%j(m)
+             k    = surf%k(m)
+
+             z_mo = surf%z_mo(m)
+
+             surf%qcs(m) = kappa * ( qc(k,j,i) - qc(k-1,j,i) )                 &
+                                 / ( LOG( z_mo / surf%z0q(m) )                 &
+                                 - psi_h( z_mo / surf%ol(m) )                  &
+                                 + psi_h( surf%z0q(m) / surf%ol(m) ) )
+
+             surf%ncs(m) = kappa * ( nc(k,j,i) - nc(k-1,j,i) )                 &
+                                 / ( LOG( z_mo / surf%z0q(m) )                 &
+                                 - psi_h( z_mo / surf%ol(m) )                  &
+                                 + psi_h( surf%z0q(m) / surf%ol(m) ) )
+          ENDDO
+
+       ENDIF
+
+!
+!--    If required compute qr* and nr*
+       IF ( bulk_cloud_model  .AND.  microphysics_seifert  .AND.               &
+            .NOT. surf_vertical )  THEN
+          !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+          DO  m = 1, surf%ns    
+
+             i    = surf%i(m)            
+             j    = surf%j(m)
+             k    = surf%k(m)
+
+             z_mo = surf%z_mo(m)
+
+             surf%qrs(m) = kappa * ( qr(k,j,i) - qr(k-1,j,i) )                 &
+                                 / ( LOG( z_mo / surf%z0q(m) )                 &
+                                 - psi_h( z_mo / surf%ol(m) )                  &
+                                 + psi_h( surf%z0q(m) / surf%ol(m) ) )
+
+             surf%nrs(m) = kappa * ( nr(k,j,i) - nr(k-1,j,i) )                 &
+                                 / ( LOG( z_mo / surf%z0q(m) )                 &
+                                 - psi_h( z_mo / surf%ol(m) )                  &
+                                 + psi_h( surf%z0q(m) / surf%ol(m) ) )
+          ENDDO
+
+       ENDIF
+
+    END SUBROUTINE calc_scaling_parameters
+
+
+
+!
+!-- Calculate surface fluxes usws, vsws, shf, qsws, (qcsws, qrsws, ncsws, nrsws)
+    SUBROUTINE calc_surface_fluxes
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)  ::  m       !< loop variable over all horizontal surf elements
+       INTEGER(iwp)  ::  lsp     !< running index for chemical species
+
+       REAL(wp)                            ::  dum     !< dummy to precalculate logarithm
+       REAL(wp)                            ::  flag_u  !< flag indicating u-grid, used for calculation of horizontal momentum fluxes at vertical surfaces
+       REAL(wp)                            ::  flag_v  !< flag indicating v-grid, used for calculation of horizontal momentum fluxes at vertical surfaces
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_i     !< u-component interpolated onto scalar grid point, required for momentum fluxes at vertical surfaces 
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_i     !< v-component interpolated onto scalar grid point, required for momentum fluxes at vertical surfaces 
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  w_i     !< w-component interpolated onto scalar grid point, required for momentum fluxes at vertical surfaces 
+
+!
+!--    Calcuate surface fluxes at horizontal walls
+       IF ( .NOT. surf_vertical )  THEN
+!
+!--       Compute u'w' for the total model domain at upward-facing surfaces.
+!--       First compute the corresponding component of u* and square it.
+          IF ( .NOT. downward )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns  
+   
+                i = surf%i(m)            
+                j = surf%j(m)
+                k = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+                surf%usws(m) = kappa * ( u(k,j,i) - u(k-1,j,i) )               &
+                              / ( LOG( z_mo / surf%z0(m) )                     &
+                                  - psi_m( z_mo / surf%ol(m) )                 &
+                                  + psi_m( surf%z0(m) / surf%ol(m) ) )
+!
+!--             Please note, the computation of usws is not fully accurate. Actually 
+!--             a further interpolation of us onto the u-grid, where usws is defined, 
+!--             is required. However, this is not done as this would require several
+!--             data transfers between 2D-grid and the surf-type. 
+!--             The impact of the missing interpolation is negligible as several 
+!--             tests had shown. 
+!--             Same also for ol.  
+                surf%usws(m) = -surf%usws(m) * surf%us(m) * rho_air_zw(k-1)
+
+             ENDDO
+!
+!--       At downward-facing surfaces
+          ELSE
+             !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns  
+   
+                i = surf%i(m)            
+                j = surf%j(m)
+                k = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+                surf%usws(m) = kappa * u(k,j,i) / LOG( z_mo / surf%z0(m) )
+                surf%usws(m) = surf%usws(m) * surf%us(m) * rho_air_zw(k)
+
+             ENDDO     
+          ENDIF
+
+!
+!--       Compute v'w' for the total model domain.
+!--       First compute the corresponding component of u* and square it.
+!--       Upward-facing surfaces
+          IF ( .NOT. downward )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns  
+                i = surf%i(m)            
+                j = surf%j(m)
+                k = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+                surf%vsws(m) = kappa * ( v(k,j,i) - v(k-1,j,i) )               &
+                           / ( LOG( z_mo / surf%z0(m) )                        &
+                               - psi_m( z_mo / surf%ol(m) )                    &
+                               + psi_m( surf%z0(m) / surf%ol(m) ) )
+!
+!--             Please note, the computation of vsws is not fully accurate. Actually 
+!--             a further interpolation of us onto the v-grid, where vsws is defined, 
+!--             is required. However, this is not done as this would require several
+!--             data transfers between 2D-grid and the surf-type. 
+!--             The impact of the missing interpolation is negligible as several 
+!--             tests had shown. 
+!--             Same also for ol.  
+                surf%vsws(m) = -surf%vsws(m) * surf%us(m) * rho_air_zw(k-1)
+             ENDDO
+!
+!--       Downward-facing surfaces
+          ELSE
+             !$OMP PARALLEL DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns  
+                i = surf%i(m)            
+                j = surf%j(m)
+                k = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+                surf%vsws(m) = kappa * v(k,j,i) / LOG( z_mo / surf%z0(m) )
+                surf%vsws(m) = surf%vsws(m) * surf%us(m) * rho_air_zw(k)
+             ENDDO
+          ENDIF
+!
+!--       Compute the vertical kinematic heat flux
+          IF (  .NOT.  constant_heatflux  .AND.  ( ( time_since_reference_point&
+               <=  skip_time_do_lsm  .AND. simulated_time > 0.0_wp ) .OR.      &
+               .NOT.  land_surface )  .AND.  .NOT. urban_surface  .AND.        &
+               .NOT. downward )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, surf%ns 
+                i    = surf%i(m)            
+                j    = surf%j(m)
+                k    = surf%k(m)
+                surf%shf(m) = -surf%ts(m) * surf%us(m) * rho_air_zw(k-1)
+             ENDDO
+          ENDIF
+!
+!--       Compute the vertical water flux
+          IF (  .NOT.  constant_waterflux  .AND.  humidity  .AND.              &
+               ( ( time_since_reference_point <= skip_time_do_lsm  .AND.       &
+               simulated_time > 0.0_wp ) .OR.  .NOT.  land_surface  )  .AND.   &
+               .NOT.  urban_surface  .AND.  .NOT. downward )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, surf%ns 
+                i    = surf%i(m)            
+                j    = surf%j(m)
+                k    = surf%k(m)
+                surf%qsws(m) = -surf%qs(m) * surf%us(m) * rho_air_zw(k-1)
+             ENDDO
+          ENDIF
+!
+!--       Compute the vertical scalar flux
+          IF (  .NOT.  constant_scalarflux  .AND.  passive_scalar  .AND.       &
+                .NOT.  downward )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns   
+
+                i    = surf%i(m)            
+                j    = surf%j(m)
+                surf%ssws(m) = -surf%ss(m) * surf%us(m)
+
+             ENDDO
+          ENDIF   
+!
+!--       Compute the vertical chemical species' flux
+          DO  lsp = 1, nvar
+             IF (  .NOT.  constant_csflux(lsp)  .AND.  air_chemistry  .AND.    &
+                   .NOT.  downward )  THEN
+                !$OMP PARALLEL DO PRIVATE( i, j )
+                DO  m = 1, surf%ns   
+                   i     = surf%i(m)            
+                   j     = surf%j(m)
+                   surf%cssws(lsp,m) = -surf%css(lsp,m) * surf%us(m)
+                ENDDO
+             ENDIF   
+          ENDDO
+
+!
+!--       Compute (turbulent) fluxes of cloud water content and cloud drop conc.
+          IF ( bulk_cloud_model  .AND.  microphysics_morrison  .AND.           &
+               .NOT. downward)  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns   
+
+                i    = surf%i(m)            
+                j    = surf%j(m)
+
+                surf%qcsws(m) = -surf%qcs(m) * surf%us(m)
+                surf%ncsws(m) = -surf%ncs(m) * surf%us(m)
+             ENDDO
+          ENDIF    
+!
+!--       Compute (turbulent) fluxes of rain water content and rain drop conc.
+          IF ( bulk_cloud_model  .AND.  microphysics_seifert  .AND.            &
+               .NOT. downward)  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j )
+             DO  m = 1, surf%ns   
+
+                i    = surf%i(m)            
+                j    = surf%j(m)
+
+                surf%qrsws(m) = -surf%qrs(m) * surf%us(m)
+                surf%nrsws(m) = -surf%nrs(m) * surf%us(m)
+             ENDDO
+          ENDIF
+
+!
+!--       Bottom boundary condition for the TKE. 
+          IF ( ibc_e_b == 2 )  THEN
+             !$OMP PARALLEL DO PRIVATE( i, j, k )
+             DO  m = 1, surf%ns   
+
+                i    = surf%i(m)            
+                j    = surf%j(m)
+                k    = surf%k(m)
+
+                e(k,j,i) = ( surf%us(m) / 0.1_wp )**2
+!
+!--             As a test: cm = 0.4
+!               e(k,j,i) = ( us(j,i) / 0.4_wp )**2
+                e(k-1,j,i)   = e(k,j,i)
+
+             ENDDO
+          ENDIF
+!
+!--    Calcuate surface fluxes at vertical surfaces. No stability is considered. 
+       ELSE
+!
+!--       Compute usvs l={0,1} and vsus l={2,3}
+          IF ( mom_uv )  THEN
+!
+!--          Generalize computation by introducing flags. At north- and south-
+!--          facing surfaces u-component is used, at east- and west-facing
+!--          surfaces v-component is used.
+             flag_u = MERGE( 1.0_wp, 0.0_wp, l == 0  .OR.  l == 1 )   
+             flag_v = MERGE( 1.0_wp, 0.0_wp, l == 2  .OR.  l == 3 )   
+             !$OMP PARALLEL  DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns  
+                i = surf%i(m)            
+                j = surf%j(m)
+                k = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+                surf%mom_flux_uv(m) = kappa *                                  &
+                                ( flag_u * u(k,j,i) + flag_v * v(k,j,i) )  /   &
+                                                        LOG( z_mo / surf%z0(m) )
+
+               surf%mom_flux_uv(m) =                                           &
+                                    - surf%mom_flux_uv(m) * surf%us(m)
+             ENDDO
+          ENDIF
+!
+!--       Compute wsus l={0,1} and wsvs l={2,3}
+          IF ( mom_w )  THEN
+             !$OMP PARALLEL  DO PRIVATE( i, j, k, z_mo )
+             DO  m = 1, surf%ns  
+                i = surf%i(m)            
+                j = surf%j(m)
+                k = surf%k(m)
+
+                z_mo = surf%z_mo(m)
+
+                surf%mom_flux_w(m) = kappa * w(k,j,i) / LOG( z_mo / surf%z0(m) )
+
+                surf%mom_flux_w(m) =                                           &
+                                     - surf%mom_flux_w(m) * surf%us(m)
+             ENDDO
+          ENDIF
+!
+!--       Compute momentum fluxes used for subgrid-scale TKE production at 
+!--       vertical surfaces. In constrast to the calculated momentum fluxes at 
+!--       vertical surfaces before, which are defined on the u/v/w-grid, 
+!--       respectively), the TKE fluxes are defined at the scalar grid. 
+!--       
+          IF ( mom_tke )  THEN
+!
+!--          Precalculate velocity components at scalar grid point. 
+             ALLOCATE( u_i(1:surf%ns) )
+             ALLOCATE( v_i(1:surf%ns) )
+             ALLOCATE( w_i(1:surf%ns) )
+
+             IF ( l == 0  .OR.  l == 1 )  THEN
+                !$OMP PARALLEL DO PRIVATE( i, j, k )
+                DO  m = 1, surf%ns  
+                   i = surf%i(m)            
+                   j = surf%j(m)
+                   k = surf%k(m)
+
+                   u_i(m) = 0.5_wp * ( u(k,j,i) + u(k,j,i+1) )
+                   v_i(m) = 0.0_wp
+                   w_i(m) = 0.5_wp * ( w(k,j,i) + w(k-1,j,i) )
+                ENDDO
+             ELSE
+                !$OMP PARALLEL DO PRIVATE( i, j, k )
+                DO  m = 1, surf%ns  
+                   i = surf%i(m)            
+                   j = surf%j(m)
+                   k = surf%k(m)
+
+                   u_i(m) = 0.0_wp
+                   v_i(m) = 0.5_wp * ( v(k,j,i) + v(k,j+1,i) )
+                   w_i(m) = 0.5_wp * ( w(k,j,i) + w(k-1,j,i) )
+                ENDDO
+             ENDIF
+
+             !$OMP PARALLEL DO PRIVATE( i, j, dum, z_mo )
+             DO  m = 1, surf%ns  
+                i = surf%i(m)            
+                j = surf%j(m)
+
+                z_mo = surf%z_mo(m)
+
+                dum = kappa / LOG( z_mo / surf%z0(m) )
+!
+!--             usvs (l=0,1) and vsus (l=2,3)
+                surf%mom_flux_tke(0,m) = dum * ( u_i(m) + v_i(m) )
+!
+!--             wsvs (l=0,1) and wsus (l=2,3)
+                surf%mom_flux_tke(1,m) = dum * w_i(m)
+
+                surf%mom_flux_tke(0:1,m) =                                     &
+                               - surf%mom_flux_tke(0:1,m) * surf%us(m)
+             ENDDO
+!
+!--          Deallocate temporary arrays
+             DEALLOCATE( u_i )             
+             DEALLOCATE( v_i )  
+             DEALLOCATE( w_i )  
+          ENDIF
+       ENDIF
+
+    END SUBROUTINE calc_surface_fluxes
+
+
+!
+!-- Integrated stability function for momentum
+    FUNCTION psi_m( zeta ) 
+       
+       USE kinds
+
+       IMPLICIT NONE 
+
+       REAL(wp)            :: psi_m !< Integrated similarity function result
+       REAL(wp)            :: zeta  !< Stability parameter z/L
+       REAL(wp)            :: x     !< dummy variable
+
+       REAL(wp), PARAMETER :: a = 1.0_wp            !< constant
+       REAL(wp), PARAMETER :: b = 0.66666666666_wp  !< constant
+       REAL(wp), PARAMETER :: c = 5.0_wp            !< constant
+       REAL(wp), PARAMETER :: d = 0.35_wp           !< constant
+       REAL(wp), PARAMETER :: c_d_d = c / d         !< constant
+       REAL(wp), PARAMETER :: bc_d_d = b * c / d    !< constant
+
+
+       IF ( zeta < 0.0_wp )  THEN
+          x = SQRT( SQRT( 1.0_wp  - 16.0_wp * zeta ) )
+          psi_m = pi * 0.5_wp - 2.0_wp * ATAN( x ) + LOG( ( 1.0_wp + x )**2    &
+                  * ( 1.0_wp + x**2 ) * 0.125_wp )
+       ELSE
+
+          psi_m = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - a * zeta         &
+                   - bc_d_d
+!
+!--       Old version for stable conditions (only valid for z/L < 0.5)
+!--       psi_m = - 5.0_wp * zeta
+
+       ENDIF
+
+    END FUNCTION psi_m
+
+
+!
+!-- Integrated stability function for heat and moisture
+    FUNCTION psi_h( zeta ) 
+       
+       USE kinds
+
+       IMPLICIT NONE 
+
+       REAL(wp)            :: psi_h !< Integrated similarity function result
+       REAL(wp)            :: zeta  !< Stability parameter z/L
+       REAL(wp)            :: x     !< dummy variable
+
+       REAL(wp), PARAMETER :: a = 1.0_wp            !< constant
+       REAL(wp), PARAMETER :: b = 0.66666666666_wp  !< constant
+       REAL(wp), PARAMETER :: c = 5.0_wp            !< constant
+       REAL(wp), PARAMETER :: d = 0.35_wp           !< constant
+       REAL(wp), PARAMETER :: c_d_d = c / d         !< constant
+       REAL(wp), PARAMETER :: bc_d_d = b * c / d    !< constant
+
+
+       IF ( zeta < 0.0_wp )  THEN
+          x = SQRT( 1.0_wp  - 16.0_wp * zeta )
+          psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp )
+       ELSE
+          psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp          &
+                  + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d             &
+                  + 1.0_wp
+!
+!--       Old version for stable conditions (only valid for z/L < 0.5)
+!--       psi_h = - 5.0_wp * zeta
+       ENDIF
+
+    END FUNCTION psi_h
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates stability function for momentum
+!>
+!> @author Hauke Wurps
+!------------------------------------------------------------------------------!
+    FUNCTION phi_m( zeta ) 
+   
+       IMPLICIT NONE 
+   
+       REAL(wp)            :: phi_m         !< Value of the function
+       REAL(wp)            :: zeta          !< Stability parameter z/L
+   
+       REAL(wp), PARAMETER :: a = 16.0_wp   !< constant
+       REAL(wp), PARAMETER :: c = 5.0_wp    !< constant
+   
+       IF ( zeta < 0.0_wp )  THEN
+          phi_m = 1.0_wp / SQRT( SQRT( 1.0_wp - a * zeta ) )
+       ELSE
+          phi_m = 1.0_wp + c * zeta
+       ENDIF
+   
+    END FUNCTION phi_m
+
+ END MODULE surface_layer_fluxes_mod
Index: /palm/tags/release-6.0/SOURCE/surface_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/surface_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/surface_mod.f90	(revision 3477)
@@ -0,0 +1,4626 @@
+!> @file surface_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix in surface_wrd_local for cloud and rain water flux
+! 
+! 3418 2018-10-24 16:07:39Z kanani
+! -Parameters for latent heat flux in usm, usm averages (rvtils)
+! 
+! 3351 2018-10-15 18:40:42Z suehring
+! New flag indication that albedo at urban surfaces is initialized via ASCII
+! file
+! 
+! 3298 2018-10-02 12:21:11Z kanani
+! - Minor formatting/clean-up (kanani)
+! - Removed initialization of cssws with surface_csflux values. Only the value 0 
+!   is now passed to all the chemical species of the selected mechanism. 
+!   The real inizialization is conducted in init_3d_model_mod.f90 (Russo)
+! - Added calls and variables for inizialization of chemistry emission 
+!   fluxes (Russo)
+! - Setting of cssws to zero moved (forkel)
+! - Set cssws to zero before setting values (forkel)
+! - Distinguish flux conversion factors for gases and PM (forkel)
+! - Some questions/todo's on conversion factors (forkel)
+!
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3254 2018-09-17 10:53:57Z suehring
+! Remove redundant subroutine argument
+! 
+! 3253 2018-09-17 08:39:12Z suehring
+! Bugfix, missing deallocation of q_surface
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3222 2018-08-30 13:35:35Z suehring
+! +building_type, pavement_type, vegetation_type, water_type
+! +building_type_name, pavement_type_name, vegetation_type_name, water_type_name 
+! 
+! 3176 2018-07-26 17:12:48Z suehring
+! Bugfix in restarts for surface elements.
+! 
+! 3152 2018-07-19 13:26:52Z suehring
+! q_surface added
+! 
+! 3147 2018-07-18 22:38:11Z maronga
+! Added vpt_surface and vpt1
+! 
+! 3146 2018-07-18 22:36:19Z maronga
+! Initialize Obukhov length, friction velocity and momentum fluxes also 
+! in case of restarts and cyclic fill
+! 
+! 3026 2018-05-22 10:30:53Z schwenkel
+! Changed the name specific humidity to mixing ratio, since we are computing
+! mixing ratios.
+! 
+! 2977 2018-04-17 10:27:57Z kanani
+! Implement changes from branch radiation (r2948-2971) with minor modifications,
+! plus some formatting.
+! (moh.hefny)
+! Added flag to check the existence of vertical urban/land surfaces, required
+! to activate RTM
+! 
+! 2970 2018-04-13 15:09:23Z suehring
+! Remove un-necessary initialization of surface elements in old large-scale 
+! forcing mode
+! 
+! 2963 2018-04-12 14:47:44Z suehring
+! Introduce index for vegetation/wall, pavement/green-wall and water/window 
+! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+! 
+! 2942 2018-04-03 13:51:09Z suehring
+! Bugfix in assigning surface element data after restart
+! 
+! 2940 2018-04-03 11:22:42Z suehring
+! Bugfix in reading restart data of vertical surface elements
+! 
+! 2920 2018-03-22 11:22:01Z kanani
+! Correct comment for surface directions
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Calculations of the index range of the subdomain on file which overlaps with
+! the current subdomain are already done in read_restart_data_mod,
+! surface_read/write_restart_data was renamed to surface_r/wrd_local, variable 
+! named found has been introduced for checking if restart data was found, 
+! reading of restart strings has been moved completely to 
+! read_restart_data_mod, surface_rrd_local is already inside the overlap loop 
+! programmed in read_restart_data_mod, SAVE attribute added where necessary, 
+! deallocation and allocation of some arrays have been changed to take care of 
+! different restart files that can be opened (index i), the marker *** end 
+! surf *** is not necessary anymore, strings and their respective lengths are 
+! written out and read now in case of restart runs to get rid of prescribed 
+! character lengths (Giersch)
+! 
+! 2813 2018-02-16 16:28:14Z suehring
+! Some more bugfixes concerning restart runs 
+! 
+! 2812 2018-02-16 13:40:25Z hellstea
+! Entries 'u_out', 'v_out' and 'w_out' removed from the functions
+! get_topography_top_index and get_topography_top_index_ji  
+! 
+! 2805 2018-02-14 17:00:09Z suehring
+! Bugfix in re-mapping surface elements in case of restart runs 
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2759 2018-01-17 16:24:59Z suehring
+! Bugfix, consider density in vertical fluxes of passive scalar as well as 
+! chemical species.
+! 
+! 2753 2018-01-16 14:16:49Z suehring
+! +r_a_green, r_a_window
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Changes from last commit documented
+! 
+! 2706 2017-12-18 18:33:49Z suehring
+! In case of restarts read and write pt_surface
+!
+! 2698 2017-12-14 18:46:24Z suehring
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Missing code for css added to surf_*, handling of surface_csflux updated (FK)
+! - Bugfixes in reading/writing restart data in case several surface types are 
+!   present at the same time (MS)
+! - Implementation of chemistry module (FK)
+! - Allocation of pt1 and qv1 now done for all surface types (MS)
+! - Revised classification of surface types
+! - Introduce offset values to simplify index determination of surface elements
+! - Dimensions of function get_topo_top_index (MS)
+! - added variables for USM 
+! - adapted to changes in USM (RvT)
+! 
+! 2688 2017-12-12 17:27:04Z Giersch
+! Allocation and initialization of the latent heat flux (qsws) at the top of 
+! the ocean domain in case of coupled runs. In addtion, a double if-query has 
+! been removed.  
+! 
+! 2638 2017-11-23 12:44:23Z raasch
+! bugfix for constant top momentumflux
+! 
+! 2575 2017-10-24 09:57:58Z maronga
+! Pavement parameterization revised
+! 
+! 2547 2017-10-16 12:41:56Z schwenkel
+! extended by cloud_droplets option
+!
+! 2526 2017-10-10 11:29:14Z monakurppa
+! Implementation of a new aerosol module salsa: new surface fluxes for aerosols 
+! and gases.
+! 
+! 2508 2017-10-02 08:57:09Z suehring
+! Minor formatting adjustment
+! 
+! 2478 2017-09-18 13:37:24Z suehring
+! Bugfixes in initializing model top
+!
+! 2378 2017-08-31 13:57:27Z suehring
+! Bugfix in write restart data
+! 
+! 2339 2017-08-07 13:55:26Z gronemeier
+! corrected timestamp in header
+! 
+! 2338 2017-08-07 12:15:38Z gronemeier
+! Modularize 1D model
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! New function to obtain topography top index. 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2270 2017-06-09 12:18:47Z maronga
+! Parameters removed/added due to changes in the LSM
+! 
+! 2269 2017-06-09 11:57:32Z suehring
+! Formatting and description adjustments
+! 
+! 2256 2017-06-07 13:58:08Z suehring
+! Enable heating at downward-facing surfaces
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Surface module defines derived data structures to treat surface-
+!> bounded grid cells. Three different types of surfaces are defined: 
+!> default surfaces, natural surfaces, and urban surfaces. The module
+!> encompasses the allocation and initialization of surface arrays, and handles 
+!> reading and writing restart data. 
+!> In addition, a further derived data structure is defined, in order to set
+!> boundary conditions at surfaces.  
+!> @todo For the moment, downward-facing surfaces are only classified as  
+!>        default type 
+!> @todo Clean up urban-surface variables (some of them are not used any more) 
+!> @todo Revise chemistry surface flux part (reduce loops?!) 
+!> @todo Get rid-off deallocation routines in restarts
+!------------------------------------------------------------------------------!
+ MODULE surface_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  heatflux_input_conversion, momentumflux_input_conversion,       &
+               rho_air, rho_air_zw, zu, zw, waterflux_input_conversion 
+
+    USE chem_modules
+
+    USE control_parameters
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt, wall_flags_0
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE kinds
+
+    USE model_1d_mod,                                                          &
+        ONLY:  rif1d, us1d, usws1d, vsws1d
+
+
+    IMPLICIT NONE
+
+!
+!-- Data type used to identify grid-points where horizontal boundary conditions 
+!-- are applied 
+    TYPE bc_type
+
+       INTEGER(iwp) :: ns                                  !< number of surface elements on the PE
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  i       !< x-index linking to the PALM 3D-grid  
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  j       !< y-index linking to the PALM 3D-grid    
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k       !< z-index linking to the PALM 3D-grid   
+
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: start_index !< start index within surface data type for given (j,i) 
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: end_index   !< end index within surface data type for given (j,i)  
+
+    END TYPE bc_type
+!
+!-- Data type used to identify and treat surface-bounded grid points  
+    TYPE surf_type
+
+       LOGICAL ::  albedo_from_ascii = .FALSE. !< flag indicating that albedo for urban surfaces is input via ASCII format (just for a workaround)
+    
+       INTEGER(iwp) :: ioff                                !< offset value in x-direction, used to determine index of surface element
+       INTEGER(iwp) :: joff                                !< offset value in y-direction, used to determine index of surface element
+       INTEGER(iwp) :: koff                                !< offset value in z-direction, used to determine index of surface element
+       INTEGER(iwp) :: ns                                  !< number of surface elements on the PE
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  i       !< x-index linking to the PALM 3D-grid  
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  j       !< y-index linking to the PALM 3D-grid    
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k       !< z-index linking to the PALM 3D-grid       
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  facing  !< Bit indicating surface orientation 
+     
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: start_index !< Start index within surface data type for given (j,i) 
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: end_index   !< End index within surface data type for given (j,i)  
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  z_mo      !< surface-layer height 
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  uvw_abs   !< absolute surface-parallel velocity
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  us        !< friction velocity
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ts        !< scaling parameter temerature
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qs        !< scaling parameter humidity
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ss        !< scaling parameter passive scalar
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qcs       !< scaling parameter qc
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ncs       !< scaling parameter nc
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qrs       !< scaling parameter qr
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  nrs       !< scaling parameter nr
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ol        !< Obukhov length
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rib       !< Richardson bulk number
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  z0        !< roughness length for momentum
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  z0h       !< roughness length for heat
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  z0q       !< roughness length for humidity
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt1       !< potential temperature at first grid level
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qv1       !< mixing ratio at first grid level
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  vpt1      !< virtual potential temperature at first grid level
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  css     !< scaling parameter chemical species
+!
+!--    Define arrays for surface fluxes
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  usws      !< vertical momentum flux for u-component at horizontal surfaces
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  vsws      !< vertical momentum flux for v-component at horizontal surfaces 
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  shf       !< surface flux sensible heat
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws      !< surface flux latent heat 
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ssws      !< surface flux passive scalar
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qcsws     !< surface flux qc
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ncsws     !< surface flux nc
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qrsws     !< surface flux qr
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  nrsws     !< surface flux nr
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  sasws     !< surface flux salinity
+!--    Added for SALSA:
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  answs   !< surface flux aerosol number: dim 1: flux, dim 2: bin
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  amsws   !< surface flux aerosol mass:   dim 1: flux, dim 2: bin
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  gtsws   !< surface flux gesous tracers: dim 1: flux, dim 2: gas
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  cssws   !< surface flux chemical species
+!
+!--    Required for horizontal walls in production_e
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_0       !< virtual velocity component (see production_e_init for further explanation)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_0       !< virtual velocity component (see production_e_init for further explanation)
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  mom_flux_uv  !< momentum flux usvs and vsus at vertical surfaces (used in diffusion_u and diffusion_v)
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  mom_flux_w   !< momentum flux wsus and wsvs at vertical surfaces (used in diffusion_w)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  mom_flux_tke !< momentum flux usvs, vsus, wsus, wsvs at vertical surfaces at grid center (used in production_e)
+!
+!--    Variables required for LSM as well as for USM
+       CHARACTER(LEN=40), DIMENSION(:), ALLOCATABLE ::  building_type_name    !< building type name at surface element
+       CHARACTER(LEN=40), DIMENSION(:), ALLOCATABLE ::  pavement_type_name    !< pavement type name at surface element
+       CHARACTER(LEN=40), DIMENSION(:), ALLOCATABLE ::  vegetation_type_name  !< water type at name surface element
+       CHARACTER(LEN=40), DIMENSION(:), ALLOCATABLE ::  water_type_name       !< water type at name surface element
+       
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nzt_pavement     !< top index for pavement in soil
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  building_type    !< building type at surface element
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  pavement_type    !< pavement type at surface element
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  vegetation_type  !< vegetation type at surface element
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  water_type       !< water type at surface element
+       
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  albedo_type   !< albedo type, for each fraction (wall,green,window or vegetation,pavement water)
+
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  building_surface    !< flag parameter indicating that the surface element is covered by buildings (no LSM actions, not implemented yet)
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  building_covered    !< flag indicating that buildings are on top of orography, only used for vertical surfaces in LSM
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  pavement_surface    !< flag parameter for pavements
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  water_surface       !< flag parameter for water surfaces
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  vegetation_surface  !< flag parameter for natural land surfaces
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  albedo            !< broadband albedo for each surface fraction (LSM: vegetation, water, pavement; USM: wall, green, window)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  emissivity        !< emissivity of the surface, for each fraction  (LSM: vegetation, water, pavement; USM: wall, green, window)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  frac              !< relative surface fraction (LSM: vegetation, water, pavement; USM: wall, green, window)
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  aldif           !< albedo for longwave diffusive radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  aldir           !< albedo for longwave direct radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  asdif           !< albedo for shortwave diffusive radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  asdir           !< albedo for shortwave direct radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  rrtm_aldif      !< albedo for longwave diffusive radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  rrtm_aldir      !< albedo for longwave direct radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  rrtm_asdif      !< albedo for shortwave diffusive radiation, solar angle of 60Â°
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE   ::  rrtm_asdir      !< albedo for shortwave direct radiation, solar angle of 60Â°
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  q_surface         !< skin-surface mixing ratio
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  pt_surface        !< skin-surface temperature
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  vpt_surface       !< skin-surface virtual temperature
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  rad_net           !< net radiation 
+       REAL(wp), DIMENSION(:), ALLOCATABLE   ::  rad_net_l         !< net radiation, used in USM
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lambda_h          !< heat conductivity of soil/ wall (W/m/K) 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lambda_h_green    !< heat conductivity of green soil (W/m/K) 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lambda_h_window   !< heat conductivity of windows (W/m/K) 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lambda_h_def      !< default heat conductivity of soil (W/m/K)   
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rad_lw_in           !< incoming longwave radiation
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rad_lw_out          !< emitted longwave radiation
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rad_sw_in           !< incoming shortwave radiation
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rad_sw_out          !< emitted shortwave radiation
+       
+
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_liq               !< liquid water coverage (of vegetated area)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_veg               !< vegetation coverage
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  f_sw_in             !< fraction of absorbed shortwave radiation by the surface layer (not implemented yet)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  ghf                 !< ground heat flux
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  g_d                 !< coefficient for dependence of r_canopy on water vapour pressure deficit
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  lai                 !< leaf area index
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  lambda_surface_u    !< coupling between surface and soil (depends on vegetation type) (W/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  lambda_surface_s    !< coupling between surface and soil (depends on vegetation type) (W/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_eb             !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_liq            !< surface flux of latent heat (liquid water portion)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_liq_eb         !< surface flux of latent heat (liquid water portion)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_soil           !< surface flux of latent heat (soil portion)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_soil_eb        !< surface flux of latent heat (soil portion)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_veg            !< surface flux of latent heat (vegetation portion)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_veg_eb         !< surface flux of latent heat (vegetation portion)
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_a                 !< aerodynamic resistance 
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_a_green           !< aerodynamic resistance at green fraction
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_a_window          !< aerodynamic resistance at window fraction
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_canopy            !< canopy resistance
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_soil              !< soil resistance
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_soil_min          !< minimum soil resistance
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_s                 !< total surface resistance (combination of r_soil and r_canopy)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  r_canopy_min        !< minimum canopy (stomatal) resistance
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  alpha_vg          !< coef. of Van Genuchten
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lambda_w          !< hydraulic diffusivity of soil (?)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  gamma_w           !< hydraulic conductivity of soil (W/m/K)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  gamma_w_sat       !< hydraulic conductivity at saturation
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  l_vg              !< coef. of Van Genuchten
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  m_fc              !< soil moisture at field capacity (m3/m3)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  m_res             !< residual soil moisture
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  m_sat             !< saturation soil moisture (m3/m3)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  m_wilt            !< soil moisture at permanent wilting point (m3/m3)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  n_vg              !< coef. Van Genuchten  
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_c_total_def   !< default volumetric heat capacity of the (soil) layer (J/m3/K)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_c_total       !< volumetric heat capacity of the actual soil matrix (J/m3/K)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  root_fr           !< root fraction within the soil layers
+!
+!--    Urban surface variables
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  surface_types   !< array of types of wall parameters
+
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  isroof_surf          !< flag indicating roof surfaces
+       LOGICAL, DIMENSION(:), ALLOCATABLE  ::  ground_level         !< flag indicating ground floor level surfaces 
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  target_temp_summer  !< indoor target temperature summer
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  target_temp_winter  !< indoor target temperature summer        
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_surface           !< heat capacity of the wall surface skin (J/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_surface_green     !< heat capacity of the green surface skin (J/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_surface_window    !< heat capacity of the window surface skin (J/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  green_type_roof     !< type of the green roof
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  lambda_surf         !< heat conductivity between air and surface (W/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  lambda_surf_green   !< heat conductivity between air and green surface (W/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  lambda_surf_window  !< heat conductivity between air and window surface (W/m2/K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  thickness_wall      !< thickness of the wall, roof and soil layers
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  thickness_green     !< thickness of the green wall, roof and soil layers
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  thickness_window    !< thickness of the window wall, roof and soil layers
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  transmissivity      !< transmissivity of windows
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfoutsl           !< reflected shortwave radiation for local surface in i-th reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfoutll           !< reflected + emitted longwave radiation for local surface in i-th reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfhf              !< total radiation flux incoming to minus outgoing from local surface
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  tt_surface_wall_m   !< surface temperature tendency (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  tt_surface_window_m !< window surface temperature tendency (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  tt_surface_green_m  !< green surface temperature tendency (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wshf                !< kinematic wall heat flux of sensible heat (actually no longer needed)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wshf_eb             !< wall heat flux of sensible heat in wall normal direction
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wghf_eb             !< wall ground heat flux
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wghf_eb_window      !< window ground heat flux
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wghf_eb_green       !< green ground heat flux
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  iwghf_eb            !< indoor wall ground heat flux
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  iwghf_eb_window     !< indoor window ground heat flux
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rad_lw_out_change_0
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinsw            !< shortwave radiation falling to local surface including radiation from reflections
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfoutsw           !< total shortwave radiation outgoing from nonvirtual surfaces surfaces after all reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinlw            !< longwave radiation falling to local surface including radiation from reflections
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfoutlw           !< total longwave radiation outgoing from nonvirtual surfaces surfaces after all reflection
+
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_c_wall        !< volumetric heat capacity of the material ( J m-3 K-1 ) (= 2.19E6)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dz_wall           !< wall grid spacing (center-center)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddz_wall          !< 1/dz_wall
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dz_wall_stag      !< wall grid spacing (edge-edge)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddz_wall_stag     !< 1/dz_wall_stag
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tt_wall_m         !< t_wall prognostic array 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  zw                !< wall layer depths (m)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_c_window      !< volumetric heat capacity of the window material ( J m-3 K-1 ) (= 2.19E6)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dz_window         !< window grid spacing (center-center)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddz_window        !< 1/dz_window
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dz_window_stag    !< window grid spacing (edge-edge)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddz_window_stag   !< 1/dz_window_stag
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tt_window_m       !< t_window prognostic array 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  zw_window         !< window layer depths (m)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_c_green       !< volumetric heat capacity of the green material ( J m-3 K-1 ) (= 2.19E6)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rho_c_total_green !< volumetric heat capacity of the moist green material ( J m-3 K-1 ) (= 2.19E6)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dz_green          !< green grid spacing (center-center)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddz_green         !< 1/dz_green
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  dz_green_stag     !< green grid spacing (edge-edge)
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddz_green_stag    !< 1/dz_green_stag
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tt_green_m        !< t_green prognostic array 
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  zw_green          !< green layer depths (m)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  n_vg_green        !< vangenuchten parameters
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  alpha_vg_green    !< vangenuchten parameters
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  l_vg_green    !< vangenuchten parameters
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  gamma_w_green_sat    !< hydraulic conductivity
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  lambda_w_green
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  gamma_w_green    !< hydraulic conductivity
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tswc_h_m
+
+
+!-- arrays for time averages
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  rad_net_av       !< average of rad_net_l
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinsw_av      !< average of sw radiation falling to local surface including radiation from reflections
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinlw_av      !< average of lw radiation falling to local surface including radiation from reflections
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinswdir_av   !< average of direct sw radiation falling to local surface
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinswdif_av   !< average of diffuse sw radiation from sky and model boundary falling to local surface
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinlwdif_av   !< average of diffuse lw radiation from sky and model boundary falling to local surface
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinswref_av   !< average of sw radiation falling to surface from reflections
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinlwref_av   !< average of lw radiation falling to surface from reflections
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfoutsw_av     !< average of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfoutlw_av     !< average of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfins_av       !< average of array of residua of sw radiation absorbed in surface after last reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfinl_av       !< average of array of residua of lw radiation absorbed in surface after last reflection
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  surfhf_av        !< average of total radiation flux incoming to minus outgoing from local surface  
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wghf_eb_av       !< average of wghf_eb
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wghf_eb_window_av  !< average of wghf_eb window
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wghf_eb_green_av   !< average of wghf_eb window
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  iwghf_eb_av        !< indoor average of wghf_eb
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  iwghf_eb_window_av !< indoor average of wghf_eb window
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  wshf_eb_av       !< average of wshf_eb
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_eb_av       !< average of qsws_eb
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_veg_eb_av       !< average of qsws_veg_eb
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_liq_eb_av       !< average of qsws_liq_eb
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_surf_wall_av        !< average of wall surface temperature (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_surf_av        !< average of wall surface temperature (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_surf_window_av !< average of window surface temperature (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_surf_green_av  !< average of green wall surface temperature (K)
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  t_surf_10cm_av   !< average of the near surface temperature (K)
+
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  t_wall_av      !< Average of t_wall
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  t_window_av    !< Average of t_window
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  t_green_av     !< Average of t_green
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  swc_av         !< Average of swc
+
+    END TYPE surf_type
+
+    TYPE (bc_type), DIMENSION(0:1)           ::  bc_h        !< boundary condition data type, horizontal upward- and downward facing surfaces
+
+    TYPE (surf_type), DIMENSION(0:2), TARGET ::  surf_def_h  !< horizontal default surfaces (Up, Down, and Top)
+    TYPE (surf_type), DIMENSION(0:3), TARGET ::  surf_def_v  !< vertical default surfaces (North, South, East, West)
+    TYPE (surf_type)                , TARGET ::  surf_lsm_h  !< horizontal natural land surfaces, so far only upward-facing
+    TYPE (surf_type), DIMENSION(0:3), TARGET ::  surf_lsm_v  !< vertical land surfaces (North, South, East, West)
+    TYPE (surf_type)                , TARGET ::  surf_usm_h  !< horizontal urban surfaces, so far only upward-facing
+    TYPE (surf_type), DIMENSION(0:3), TARGET ::  surf_usm_v  !< vertical urban surfaces (North, South, East, West)
+
+    INTEGER(iwp), PARAMETER ::  ind_veg_wall  = 0            !< index for vegetation / wall-surface fraction, used for access of albedo, emissivity, etc., for each surface type   
+    INTEGER(iwp), PARAMETER ::  ind_pav_green = 1            !< index for pavement / green-wall surface fraction, used for access of albedo, emissivity, etc., for each surface type
+    INTEGER(iwp), PARAMETER ::  ind_wat_win   = 2            !< index for water / window-surface fraction, used for access of albedo, emissivity, etc., for each surface type
+
+    INTEGER(iwp) ::  ns_h_on_file(0:2)                       !< total number of horizontal surfaces with the same facing, required for writing restart data 
+    INTEGER(iwp) ::  ns_v_on_file(0:3)                       !< total number of vertical surfaces with the same facing, required for writing restart data 
+
+    LOGICAL ::  vertical_surfaces_exist = .FALSE.   !< flag indicating that there are vertical urban/land surfaces 
+                                                    !< in the domain (required to activiate RTM)
+
+    LOGICAL ::  surf_bulk_cloud_model = .FALSE.                          !< use cloud microphysics
+    LOGICAL ::  surf_microphysics_morrison = .FALSE.                  !< use 2-moment Morrison (add. prog. eq. for nc and qc)
+    LOGICAL ::  surf_microphysics_seifert = .FALSE.                   !< use 2-moment Seifert and Beheng scheme
+
+
+    SAVE
+
+    PRIVATE
+
+    INTERFACE init_bc
+       MODULE PROCEDURE init_bc
+    END INTERFACE init_bc
+
+    INTERFACE init_surfaces
+       MODULE PROCEDURE init_surfaces
+    END INTERFACE init_surfaces
+
+    INTERFACE init_surface_arrays
+       MODULE PROCEDURE init_surface_arrays
+    END INTERFACE init_surface_arrays
+
+    INTERFACE surface_rrd_local
+       MODULE PROCEDURE surface_rrd_local
+    END INTERFACE surface_rrd_local
+
+    INTERFACE surface_wrd_local
+       MODULE PROCEDURE surface_wrd_local
+    END INTERFACE surface_wrd_local
+
+    INTERFACE surface_last_actions
+       MODULE PROCEDURE surface_last_actions
+    END INTERFACE surface_last_actions
+
+    INTERFACE surface_restore_elements
+       MODULE PROCEDURE surface_restore_elements_1d
+       MODULE PROCEDURE surface_restore_elements_2d
+    END INTERFACE surface_restore_elements
+
+!
+!-- Public variables
+    PUBLIC bc_h, ind_pav_green, ind_veg_wall, ind_wat_win, ns_h_on_file,       &
+           ns_v_on_file, surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v,       &
+           surf_usm_h, surf_usm_v, surf_type, vertical_surfaces_exist,         &
+           surf_bulk_cloud_model, surf_microphysics_morrison, surf_microphysics_seifert
+!
+!-- Public subroutines and functions
+    PUBLIC get_topography_top_index, get_topography_top_index_ji, init_bc,     &
+           init_surfaces,                                                      &
+           init_surface_arrays, surface_rrd_local,                     & 
+           surface_restore_elements, surface_wrd_local,               &
+           surface_last_actions
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize data type for setting boundary conditions at horizontal surfaces. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_bc
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i         !<
+       INTEGER(iwp) ::  j         !<
+       INTEGER(iwp) ::  k         !<
+
+       INTEGER(iwp), DIMENSION(0:1) ::  num_h         !<
+       INTEGER(iwp), DIMENSION(0:1) ::  num_h_kji     !<
+       INTEGER(iwp), DIMENSION(0:1) ::  start_index_h !<
+
+!
+!--    First of all, count the number of upward- and downward-facing surfaces
+       num_h = 0
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+!
+!--             Check if current gridpoint belongs to the atmosphere
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+!
+!--                Upward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k-1,j,i), 0 ) )              &
+                      num_h(0) = num_h(0) + 1
+!
+!--                Downward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k+1,j,i), 0 ) )              &
+                      num_h(1) = num_h(1) + 1
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Save the number of surface elements
+       bc_h(0)%ns = num_h(0)
+       bc_h(1)%ns = num_h(1)
+!
+!--    ALLOCATE data type variables
+!--    Upward facing
+       ALLOCATE( bc_h(0)%i(1:bc_h(0)%ns) )
+       ALLOCATE( bc_h(0)%j(1:bc_h(0)%ns) )
+       ALLOCATE( bc_h(0)%k(1:bc_h(0)%ns) )
+       ALLOCATE( bc_h(0)%start_index(nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( bc_h(0)%end_index(nysg:nyng,nxlg:nxrg)   )
+       bc_h(0)%start_index = 1
+       bc_h(0)%end_index   = 0
+!
+!--    Downward facing
+       ALLOCATE( bc_h(1)%i(1:bc_h(1)%ns) )
+       ALLOCATE( bc_h(1)%j(1:bc_h(1)%ns) )
+       ALLOCATE( bc_h(1)%k(1:bc_h(1)%ns) )
+       ALLOCATE( bc_h(1)%start_index(nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( bc_h(1)%end_index(nysg:nyng,nxlg:nxrg)   )
+       bc_h(1)%start_index = 1
+       bc_h(1)%end_index   = 0
+!
+!--    Store the respective indices on data type
+       num_h(0:1)         = 1
+       start_index_h(0:1) = 1
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+
+             num_h_kji(0:1) = 0
+             DO  k = nzb+1, nzt
+!
+!--             Check if current gridpoint belongs to the atmosphere
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+!
+!--                Upward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k-1,j,i), 0 ) )  THEN
+                      bc_h(0)%i(num_h(0)) = i
+                      bc_h(0)%j(num_h(0)) = j
+                      bc_h(0)%k(num_h(0)) = k
+                      num_h_kji(0)        = num_h_kji(0) + 1
+                      num_h(0)            = num_h(0) + 1
+                   ENDIF
+!
+!--                Downward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k+1,j,i), 0 ) )  THEN
+                      bc_h(1)%i(num_h(1)) = i
+                      bc_h(1)%j(num_h(1)) = j
+                      bc_h(1)%k(num_h(1)) = k
+                      num_h_kji(1)        = num_h_kji(1) + 1
+                      num_h(1)            = num_h(1) + 1
+                   ENDIF
+                ENDIF
+             ENDDO
+             bc_h(0)%start_index(j,i) = start_index_h(0)
+             bc_h(0)%end_index(j,i)   = bc_h(0)%start_index(j,i) + num_h_kji(0) - 1
+             start_index_h(0)         = bc_h(0)%end_index(j,i) + 1
+
+             bc_h(1)%start_index(j,i) = start_index_h(1)
+             bc_h(1)%end_index(j,i)   = bc_h(1)%start_index(j,i) + num_h_kji(1) - 1
+             start_index_h(1)         = bc_h(1)%end_index(j,i) + 1
+          ENDDO
+       ENDDO
+
+
+    END SUBROUTINE init_bc
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize horizontal and vertical surfaces. Counts the number of default-,
+!> natural and urban surfaces and allocates memory, respectively. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_surface_arrays
+
+
+       USE pegrid
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)                 ::  i         !< running index x-direction 
+       INTEGER(iwp)                 ::  j         !< running index y-direction
+       INTEGER(iwp)                 ::  k         !< running index z-direction
+       INTEGER(iwp)                 ::  l         !< index variable for surface facing
+       INTEGER(iwp)                 ::  num_lsm_h !< number of horizontally-aligned natural surfaces 
+       INTEGER(iwp)                 ::  num_usm_h !< number of horizontally-aligned urban surfaces 
+
+       INTEGER(iwp), DIMENSION(0:2) ::  num_def_h !< number of horizontally-aligned default surfaces 
+       INTEGER(iwp), DIMENSION(0:3) ::  num_def_v !< number of vertically-aligned default surfaces 
+       INTEGER(iwp), DIMENSION(0:3) ::  num_lsm_v !< number of vertically-aligned natural surfaces 
+       INTEGER(iwp), DIMENSION(0:3) ::  num_usm_v !< number of vertically-aligned urban surfaces 
+
+       INTEGER(iwp)              ::  num_surf_v_l !< number of vertically-aligned local urban/land surfaces
+       INTEGER(iwp)              ::  num_surf_v   !< number of vertically-aligned total urban/land surfaces
+
+       LOGICAL ::  building                       !< flag indicating building grid point
+       LOGICAL ::  terrain                        !< flag indicating natural terrain grid point
+
+       num_def_h = 0
+       num_def_v = 0
+       num_lsm_h = 0
+       num_lsm_v = 0
+       num_usm_h = 0
+       num_usm_v = 0
+!
+!--    Surfaces are classified according to the input data read from static
+!--    input file. If no input file is present, all surfaces are classified
+!--    either as natural, urban, or default, depending on the setting of 
+!--    land_surface and urban_surface. To control this, use the control
+!--    flag topo_no_distinct
+!
+!--    Count number of horizontal surfaces on local domain 
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             Check if current gridpoint belongs to the atmosphere
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+!
+!--                Check if grid point adjoins to any upward-facing horizontal
+!--                surface, e.g. the Earth surface, plane roofs, or ceilings.
+
+                   IF ( .NOT. BTEST( wall_flags_0(k-1,j,i), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building. 
+                      terrain  = BTEST( wall_flags_0(k-1,j,i), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k-1,j,i), 6 )  .OR.       &
+                                 topo_no_distinct
+!
+!--                   Land-surface type
+                      IF ( land_surface  .AND.  terrain )  THEN
+                         num_lsm_h    = num_lsm_h    + 1 
+!
+!--                   Urban surface tpye
+                      ELSEIF ( urban_surface  .AND.  building )  THEN
+                         num_usm_h    = num_usm_h    + 1 
+!
+!--                   Default-surface type
+                      ELSEIF ( .NOT. land_surface    .AND.                     &
+                               .NOT. urban_surface )  THEN
+                               
+                         num_def_h(0) = num_def_h(0) + 1
+!
+!--                   Unclassifified surface-grid point. Give error message.
+                      ELSE 
+                         WRITE( message_string, * )                           &
+                                          'Unclassified upward-facing ' //    &
+                                          'surface element at '//             &
+                                          'grid point (k,j,i) = ', k, j, i
+                         CALL message( 'surface_mod', 'PA0999', 1, 2, 0, 6, 0 )
+                      ENDIF
+
+                   ENDIF
+!
+!--                Check for top-fluxes
+                   IF ( k == nzt  .AND.  use_top_fluxes )  THEN
+                      num_def_h(2) = num_def_h(2) + 1
+!
+!--                Check for any other downward-facing surface. So far only for 
+!--                default surface type.
+                   ELSEIF ( .NOT. BTEST( wall_flags_0(k+1,j,i), 0 ) )  THEN
+                      num_def_h(1) = num_def_h(1) + 1
+                   ENDIF 
+
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+!
+!--    Count number of vertical surfaces on local domain 
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+!
+!--                Northward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k,j-1,i), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+
+                      terrain  = BTEST( wall_flags_0(k,j-1,i), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j-1,i), 6 )   .OR.       &
+                                 topo_no_distinct
+                      IF (  land_surface  .AND.  terrain )  THEN
+                         num_lsm_v(0) = num_lsm_v(0) + 1 
+                      ELSEIF ( urban_surface  .AND.  building )  THEN
+                         num_usm_v(0) = num_usm_v(0) + 1 
+!
+!--                   Default-surface type
+                      ELSEIF ( .NOT. land_surface    .AND.                     &
+                               .NOT. urban_surface )  THEN
+                         num_def_v(0) = num_def_v(0) + 1 
+!
+!--                   Unclassifified surface-grid point. Give error message.
+                      ELSE 
+                         WRITE( message_string, * )                           &
+                                          'Unclassified northward-facing ' // &
+                                          'surface element at '//             &
+                                          'grid point (k,j,i) = ', k, j, i
+                         CALL message( 'surface_mod', 'PA0999', 1, 2, 0, 6, 0 ) 
+
+                      ENDIF
+                   ENDIF
+!
+!--                Southward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k,j+1,i), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j+1,i), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j+1,i), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF (  land_surface  .AND.  terrain )  THEN
+                         num_lsm_v(1) = num_lsm_v(1) + 1 
+                      ELSEIF ( urban_surface  .AND.  building )  THEN
+                         num_usm_v(1) = num_usm_v(1) + 1 
+!
+!--                   Default-surface type
+                      ELSEIF ( .NOT. land_surface    .AND.                     &
+                               .NOT. urban_surface )  THEN
+                         num_def_v(1) = num_def_v(1) + 1 
+!
+!--                   Unclassifified surface-grid point. Give error message.
+                      ELSE 
+                         WRITE( message_string, * )                           &
+                                          'Unclassified southward-facing ' // &
+                                          'surface element at '//             &
+                                          'grid point (k,j,i) = ', k, j, i
+                         CALL message( 'surface_mod', 'PA0999', 1, 2, 0, 6, 0 ) 
+
+                      ENDIF
+                   ENDIF
+!
+!--                Eastward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k,j,i-1), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j,i-1), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j,i-1), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF (  land_surface  .AND.  terrain )  THEN
+                         num_lsm_v(2) = num_lsm_v(2) + 1 
+                      ELSEIF ( urban_surface  .AND.  building )  THEN
+                         num_usm_v(2) = num_usm_v(2) + 1 
+!
+!--                   Default-surface type
+                      ELSEIF ( .NOT. land_surface    .AND.                     &
+                               .NOT. urban_surface )  THEN
+                         num_def_v(2) = num_def_v(2) + 1 
+!
+!--                   Unclassifified surface-grid point. Give error message.
+                      ELSE 
+                         WRITE( message_string, * )                           &
+                                          'Unclassified eastward-facing ' //  &
+                                          'surface element at '//             &
+                                          'grid point (k,j,i) = ', k, j, i
+                         CALL message( 'surface_mod', 'PA0999', 1, 2, 0, 6, 0 ) 
+
+                      ENDIF
+                   ENDIF
+!
+!--                Westward-facing
+                   IF ( .NOT. BTEST( wall_flags_0(k,j,i+1), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j,i+1), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j,i+1), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF (  land_surface  .AND.  terrain )  THEN
+                         num_lsm_v(3) = num_lsm_v(3) + 1 
+                      ELSEIF ( urban_surface  .AND.  building )  THEN
+                         num_usm_v(3) = num_usm_v(3) + 1 
+!
+!--                   Default-surface type
+                      ELSEIF ( .NOT. land_surface    .AND.                     &
+                               .NOT. urban_surface )  THEN
+                         num_def_v(3) = num_def_v(3) + 1 
+!
+!--                   Unclassifified surface-grid point. Give error message.
+                      ELSE 
+                         WRITE( message_string, * )                           &
+                                          'Unclassified westward-facing ' //  &
+                                          'surface element at '//             &
+                                          'grid point (k,j,i) = ', k, j, i
+                         CALL message( 'surface_mod', 'PA0999', 1, 2, 0, 6, 0 ) 
+
+                      ENDIF
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Store number of surfaces per core.
+!--    Horizontal surface, default type, upward facing
+       surf_def_h(0)%ns = num_def_h(0)
+!
+!--    Horizontal surface, default type, downward facing
+       surf_def_h(1)%ns = num_def_h(1)
+!
+!--    Horizontal surface, default type, top downward facing
+       surf_def_h(2)%ns = num_def_h(2)
+!
+!--    Horizontal surface, natural type, so far only upward-facing
+       surf_lsm_h%ns    = num_lsm_h  
+!
+!--    Horizontal surface, urban type, so far only upward-facing
+       surf_usm_h%ns    = num_usm_h    
+!
+!--    Vertical surface, default type, northward facing
+       surf_def_v(0)%ns = num_def_v(0)
+!
+!--    Vertical surface, default type, southward facing
+       surf_def_v(1)%ns = num_def_v(1)
+!
+!--    Vertical surface, default type, eastward facing
+       surf_def_v(2)%ns = num_def_v(2)
+!
+!--    Vertical surface, default type, westward facing
+       surf_def_v(3)%ns = num_def_v(3)
+!
+!--    Vertical surface, natural type, northward facing
+       surf_lsm_v(0)%ns = num_lsm_v(0)
+!
+!--    Vertical surface, natural type, southward facing
+       surf_lsm_v(1)%ns = num_lsm_v(1)
+!
+!--    Vertical surface, natural type, eastward facing
+       surf_lsm_v(2)%ns = num_lsm_v(2)
+!
+!--    Vertical surface, natural type, westward facing
+       surf_lsm_v(3)%ns = num_lsm_v(3)
+!
+!--    Vertical surface, urban type, northward facing
+       surf_usm_v(0)%ns = num_usm_v(0)
+!
+!--    Vertical surface, urban type, southward facing
+       surf_usm_v(1)%ns = num_usm_v(1)
+!
+!--    Vertical surface, urban type, eastward facing
+       surf_usm_v(2)%ns = num_usm_v(2)
+!
+!--    Vertical surface, urban type, westward facing
+       surf_usm_v(3)%ns = num_usm_v(3)
+!
+!--    Allocate required attributes for horizontal surfaces - default type. 
+!--    Upward-facing (l=0) and downward-facing (l=1).
+       DO  l = 0, 1
+          CALL allocate_surface_attributes_h ( surf_def_h(l), nys, nyn, nxl, nxr )
+       ENDDO
+!
+!--    Allocate required attributes for model top
+       CALL allocate_surface_attributes_h_top ( surf_def_h(2), nys, nyn, nxl, nxr )
+!
+!--    Allocate required attributes for horizontal surfaces - natural type. 
+       CALL allocate_surface_attributes_h ( surf_lsm_h, nys, nyn, nxl, nxr )
+!
+!--    Allocate required attributes for horizontal surfaces - urban type. 
+       CALL allocate_surface_attributes_h ( surf_usm_h, nys, nyn, nxl, nxr )
+
+!
+!--    Allocate required attributes for vertical surfaces. 
+!--    Northward-facing (l=0), southward-facing (l=1), eastward-facing (l=2)
+!--    and westward-facing (l=3).
+!--    Default type.
+       DO  l = 0, 3
+          CALL allocate_surface_attributes_v ( surf_def_v(l),                  &
+                                               nys, nyn, nxl, nxr )
+       ENDDO
+!
+!--    Natural type
+       DO  l = 0, 3
+          CALL allocate_surface_attributes_v ( surf_lsm_v(l),                  &
+                                               nys, nyn, nxl, nxr )
+       ENDDO
+!
+!--    Urban type
+       DO  l = 0, 3
+          CALL allocate_surface_attributes_v ( surf_usm_v(l),                  &
+                                               nys, nyn, nxl, nxr )
+       ENDDO
+!
+!--    Set the flag for the existence of vertical urban/land surfaces
+       num_surf_v_l = 0
+       DO  l = 0, 3
+          num_surf_v_l = num_surf_v_l + surf_usm_v(l)%ns + surf_lsm_v(l)%ns
+       ENDDO
+
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( num_surf_v_l, num_surf_v, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr)
+#else
+       num_surf_v = num_surf_v_l
+#endif
+       IF ( num_surf_v > 0 ) vertical_surfaces_exist = .TRUE.
+        
+
+    END SUBROUTINE init_surface_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Deallocating memory for upward and downward-facing horizontal surface types, 
+!> except for top fluxes. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE deallocate_surface_attributes_h( surfaces )
+
+       IMPLICIT NONE
+
+
+       TYPE(surf_type) ::  surfaces  !< respective surface type
+
+
+       DEALLOCATE ( surfaces%start_index )
+       DEALLOCATE ( surfaces%end_index )
+!
+!--    Indices to locate surface element
+       DEALLOCATE ( surfaces%i )
+       DEALLOCATE ( surfaces%j )
+       DEALLOCATE ( surfaces%k )
+!
+!--    Surface-layer height
+       DEALLOCATE ( surfaces%z_mo )
+!
+!--    Surface orientation
+       DEALLOCATE ( surfaces%facing )
+!
+!--    Surface-parallel wind velocity
+       DEALLOCATE ( surfaces%uvw_abs )
+!
+!--    Roughness
+       DEALLOCATE ( surfaces%z0 )
+       DEALLOCATE ( surfaces%z0h )
+       DEALLOCATE ( surfaces%z0q )
+!
+!--    Friction velocity
+       DEALLOCATE ( surfaces%us )
+!
+!--    Stability parameter
+       DEALLOCATE ( surfaces%ol )
+!
+!--    Bulk Richardson number
+       DEALLOCATE ( surfaces%rib )
+!
+!--    Vertical momentum fluxes of u and v
+       DEALLOCATE ( surfaces%usws )  
+       DEALLOCATE ( surfaces%vsws )  
+!
+!--    Required in production_e
+       IF ( .NOT. constant_diffusion )  THEN    
+          DEALLOCATE ( surfaces%u_0 )  
+          DEALLOCATE ( surfaces%v_0 )
+       ENDIF 
+!
+!--    Characteristic temperature and surface flux of sensible heat
+       DEALLOCATE ( surfaces%ts )    
+       DEALLOCATE ( surfaces%shf )    
+!
+!--    surface temperature
+       DEALLOCATE ( surfaces%pt_surface ) 
+!
+!--    Characteristic humidity and surface flux of latent heat
+       IF ( humidity )  THEN          
+          DEALLOCATE ( surfaces%qs ) 
+          DEALLOCATE ( surfaces%qsws )  
+          DEALLOCATE ( surfaces%q_surface   )
+          DEALLOCATE ( surfaces%vpt_surface )
+       ENDIF 
+!
+!--    Characteristic scalar and surface flux of scalar
+       IF ( passive_scalar )  THEN
+          DEALLOCATE ( surfaces%ss )   
+          DEALLOCATE ( surfaces%ssws ) 
+       ENDIF 
+!
+!--    Scaling parameter (cs*) and surface flux of chemical species
+       IF ( air_chemistry )  THEN
+          DEALLOCATE ( surfaces%css )   
+          DEALLOCATE ( surfaces%cssws ) 
+       ENDIF 
+!
+!--    Arrays for storing potential temperature and
+!--    mixing ratio at first grid level
+       DEALLOCATE ( surfaces%pt1 )
+       DEALLOCATE ( surfaces%qv1 )
+       DEALLOCATE ( surfaces%vpt1 )
+       
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_morrison)  THEN
+          DEALLOCATE ( surfaces%qcs )
+          DEALLOCATE ( surfaces%ncs )
+          DEALLOCATE ( surfaces%qcsws )
+          DEALLOCATE ( surfaces%ncsws )
+       ENDIF
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          DEALLOCATE ( surfaces%qrs )
+          DEALLOCATE ( surfaces%nrs )
+          DEALLOCATE ( surfaces%qrsws )
+          DEALLOCATE ( surfaces%nrsws )
+       ENDIF
+!
+!--    Salinity surface flux
+       IF ( ocean_mode )  DEALLOCATE ( surfaces%sasws )
+
+    END SUBROUTINE deallocate_surface_attributes_h
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocating memory for upward and downward-facing horizontal surface types, 
+!> except for top fluxes. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE allocate_surface_attributes_h( surfaces,                        &
+                                              nys_l, nyn_l, nxl_l, nxr_l )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nyn_l  !< north bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nys_l  !< south bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nxl_l  !< west bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nxr_l  !< east bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+
+       TYPE(surf_type) ::  surfaces  !< respective surface type
+
+!
+!--    Allocate arrays for start and end index of horizontal surface type 
+!--    for each (j,i)-grid point. This is required e.g. in diffion_x, which is
+!--    called for each (j,i). In order to find the location where the 
+!--    respective flux is store within the surface-type, start- and end- 
+!--    index are stored for each (j,i). For example, each (j,i) can have
+!--    several entries where fluxes for horizontal surfaces might be stored,
+!--    e.g. for overhanging structures where several upward-facing surfaces
+!--    might exist for given (j,i).
+!--    If no surface of respective type exist at current (j,i), set indicies
+!--    such that loop in diffusion routines will not be entered.
+       ALLOCATE ( surfaces%start_index(nys_l:nyn_l,nxl_l:nxr_l) )
+       ALLOCATE ( surfaces%end_index(nys_l:nyn_l,nxl_l:nxr_l)   )
+       surfaces%start_index = 0
+       surfaces%end_index   = -1
+!
+!--    Indices to locate surface element
+       ALLOCATE ( surfaces%i(1:surfaces%ns)  )
+       ALLOCATE ( surfaces%j(1:surfaces%ns)  )
+       ALLOCATE ( surfaces%k(1:surfaces%ns)  )
+!
+!--    Surface-layer height
+       ALLOCATE ( surfaces%z_mo(1:surfaces%ns) )
+!
+!--    Surface orientation
+       ALLOCATE ( surfaces%facing(1:surfaces%ns) )
+!
+!--    Surface-parallel wind velocity
+       ALLOCATE ( surfaces%uvw_abs(1:surfaces%ns) )
+!
+!--    Roughness
+       ALLOCATE ( surfaces%z0(1:surfaces%ns)  )
+       ALLOCATE ( surfaces%z0h(1:surfaces%ns) )
+       ALLOCATE ( surfaces%z0q(1:surfaces%ns) )
+!
+!--    Friction velocity
+       ALLOCATE ( surfaces%us(1:surfaces%ns) )
+!
+!--    Stability parameter
+       ALLOCATE ( surfaces%ol(1:surfaces%ns) )
+!
+!--    Bulk Richardson number
+       ALLOCATE ( surfaces%rib(1:surfaces%ns) )
+!
+!--    Vertical momentum fluxes of u and v
+       ALLOCATE ( surfaces%usws(1:surfaces%ns) )  
+       ALLOCATE ( surfaces%vsws(1:surfaces%ns) )  
+!
+!--    Required in production_e
+       IF ( .NOT. constant_diffusion )  THEN    
+          ALLOCATE ( surfaces%u_0(1:surfaces%ns) )  
+          ALLOCATE ( surfaces%v_0(1:surfaces%ns) )
+       ENDIF 
+!
+!--    Characteristic temperature and surface flux of sensible heat
+       ALLOCATE ( surfaces%ts(1:surfaces%ns)  )    
+       ALLOCATE ( surfaces%shf(1:surfaces%ns) )    
+!
+!--    surface temperature
+       ALLOCATE ( surfaces%pt_surface(1:surfaces%ns) ) 
+!
+!--    Characteristic humidity, surface flux of latent heat, and surface virtual potential temperature
+       IF ( humidity )  THEN
+          ALLOCATE ( surfaces%qs(1:surfaces%ns)   ) 
+          ALLOCATE ( surfaces%qsws(1:surfaces%ns) )      
+          ALLOCATE ( surfaces%q_surface(1:surfaces%ns)   ) 
+          ALLOCATE ( surfaces%vpt_surface(1:surfaces%ns) ) 
+       ENDIF 
+!
+!--    Characteristic scalar and surface flux of scalar
+       IF ( passive_scalar )  THEN
+          ALLOCATE ( surfaces%ss(1:surfaces%ns)   )   
+          ALLOCATE ( surfaces%ssws(1:surfaces%ns) ) 
+       ENDIF 
+!
+!--    Scaling parameter (cs*) and surface flux of chemical species
+       IF ( air_chemistry )  THEN
+          ALLOCATE ( surfaces%css(1:nvar,1:surfaces%ns)   )   
+          ALLOCATE ( surfaces%cssws(1:nvar,1:surfaces%ns) ) 
+       ENDIF 
+!
+!--    Arrays for storing potential temperature and
+!--    mixing ratio at first grid level
+       ALLOCATE ( surfaces%pt1(1:surfaces%ns) )
+       ALLOCATE ( surfaces%qv1(1:surfaces%ns) )
+       ALLOCATE ( surfaces%vpt1(1:surfaces%ns) )
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_morrison)  THEN
+          ALLOCATE ( surfaces%qcs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%ncs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%qcsws(1:surfaces%ns) )
+          ALLOCATE ( surfaces%ncsws(1:surfaces%ns) )
+       ENDIF
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          ALLOCATE ( surfaces%qrs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%nrs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%qrsws(1:surfaces%ns) )
+          ALLOCATE ( surfaces%nrsws(1:surfaces%ns) )
+       ENDIF
+!
+!--    Salinity surface flux
+       IF ( ocean_mode )  ALLOCATE ( surfaces%sasws(1:surfaces%ns) )
+
+    END SUBROUTINE allocate_surface_attributes_h
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Deallocating memory for model-top fluxes  
+!------------------------------------------------------------------------------!
+    SUBROUTINE deallocate_surface_attributes_h_top( surfaces )
+
+       IMPLICIT NONE
+
+
+       TYPE(surf_type) ::  surfaces !< respective surface type
+
+       DEALLOCATE ( surfaces%start_index )
+       DEALLOCATE ( surfaces%end_index )
+!
+!--    Indices to locate surface (model-top) element
+       DEALLOCATE ( surfaces%i )
+       DEALLOCATE ( surfaces%j )
+       DEALLOCATE ( surfaces%k )
+
+       IF ( .NOT. constant_diffusion )  THEN    
+          DEALLOCATE ( surfaces%u_0 )  
+          DEALLOCATE ( surfaces%v_0 )
+       ENDIF 
+!
+!--    Vertical momentum fluxes of u and v
+       DEALLOCATE ( surfaces%usws )  
+       DEALLOCATE ( surfaces%vsws )  
+!
+!--    Sensible heat flux
+       DEALLOCATE ( surfaces%shf )    
+!
+!--    Latent heat flux
+       IF ( humidity .OR. coupling_mode == 'ocean_to_atmosphere')  THEN
+          DEALLOCATE ( surfaces%qsws )      
+       ENDIF 
+!
+!--    Scalar flux
+       IF ( passive_scalar )  THEN
+          DEALLOCATE ( surfaces%ssws ) 
+       ENDIF 
+!
+!--    Chemical species flux
+       IF ( air_chemistry )  THEN
+          DEALLOCATE ( surfaces%cssws ) 
+       ENDIF 
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_morrison)  THEN
+          DEALLOCATE ( surfaces%qcsws )
+          DEALLOCATE ( surfaces%ncsws )
+       ENDIF
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          DEALLOCATE ( surfaces%qrsws )
+          DEALLOCATE ( surfaces%nrsws )
+       ENDIF
+!
+!--    Salinity flux
+       IF ( ocean_mode )  DEALLOCATE ( surfaces%sasws )
+
+    END SUBROUTINE deallocate_surface_attributes_h_top
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocating memory for model-top fluxes  
+!------------------------------------------------------------------------------!
+    SUBROUTINE allocate_surface_attributes_h_top( surfaces,                    &
+                                                  nys_l, nyn_l, nxl_l, nxr_l )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nyn_l  !< north bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nys_l  !< south bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nxl_l  !< west bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nxr_l  !< east bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+
+       TYPE(surf_type) ::  surfaces !< respective surface type
+
+       ALLOCATE ( surfaces%start_index(nys_l:nyn_l,nxl_l:nxr_l) )
+       ALLOCATE ( surfaces%end_index(nys_l:nyn_l,nxl_l:nxr_l)   )
+       surfaces%start_index = 0
+       surfaces%end_index   = -1
+!
+!--    Indices to locate surface (model-top) element
+       ALLOCATE ( surfaces%i(1:surfaces%ns)  )
+       ALLOCATE ( surfaces%j(1:surfaces%ns)  )
+       ALLOCATE ( surfaces%k(1:surfaces%ns)  )
+
+       IF ( .NOT. constant_diffusion )  THEN    
+          ALLOCATE ( surfaces%u_0(1:surfaces%ns) )  
+          ALLOCATE ( surfaces%v_0(1:surfaces%ns) )
+       ENDIF 
+!
+!--    Vertical momentum fluxes of u and v
+       ALLOCATE ( surfaces%usws(1:surfaces%ns) )  
+       ALLOCATE ( surfaces%vsws(1:surfaces%ns) )  
+!
+!--    Sensible heat flux
+       ALLOCATE ( surfaces%shf(1:surfaces%ns) )    
+!
+!--    Latent heat flux
+       IF ( humidity .OR. coupling_mode == 'ocean_to_atmosphere')  THEN
+          ALLOCATE ( surfaces%qsws(1:surfaces%ns) )      
+       ENDIF 
+!
+!--    Scalar flux
+       IF ( passive_scalar )  THEN
+          ALLOCATE ( surfaces%ssws(1:surfaces%ns) ) 
+       ENDIF 
+!
+!--    Chemical species flux
+       IF ( air_chemistry )  THEN
+          ALLOCATE ( surfaces%cssws(1:nvar,1:surfaces%ns) ) 
+       ENDIF 
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_morrison)  THEN
+          ALLOCATE ( surfaces%qcsws(1:surfaces%ns) )
+          ALLOCATE ( surfaces%ncsws(1:surfaces%ns) )
+       ENDIF
+!
+!--       
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          ALLOCATE ( surfaces%qrsws(1:surfaces%ns) )
+          ALLOCATE ( surfaces%nrsws(1:surfaces%ns) )
+       ENDIF
+!
+!--    Salinity flux
+       IF ( ocean_mode )  ALLOCATE ( surfaces%sasws(1:surfaces%ns) )
+
+    END SUBROUTINE allocate_surface_attributes_h_top
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Deallocating memory for vertical surface types. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE deallocate_surface_attributes_v( surfaces )
+
+       IMPLICIT NONE
+
+
+       TYPE(surf_type) ::  surfaces !< respective surface type
+
+!
+!--    Allocate arrays for start and end index of vertical surface type 
+!--    for each (j,i)-grid point. This is required in diffion_x, which is
+!--    called for each (j,i). In order to find the location where the 
+!--    respective flux is store within the surface-type, start- and end- 
+!--    index are stored for each (j,i). For example, each (j,i) can have
+!--    several entries where fluxes for vertical surfaces might be stored.  
+!--    In the flat case, where no vertical walls exit, set indicies such 
+!--    that loop in diffusion routines will not be entered. 
+       DEALLOCATE ( surfaces%start_index )
+       DEALLOCATE ( surfaces%end_index )
+!
+!--    Indices to locate surface element.
+       DEALLOCATE ( surfaces%i )
+       DEALLOCATE ( surfaces%j )
+       DEALLOCATE ( surfaces%k )
+!
+!--    Surface-layer height
+       DEALLOCATE ( surfaces%z_mo )
+!
+!--    Surface orientation
+       DEALLOCATE ( surfaces%facing )
+!
+!--    Surface parallel wind velocity
+       DEALLOCATE ( surfaces%uvw_abs )
+!
+!--    Roughness
+       DEALLOCATE ( surfaces%z0 )
+       DEALLOCATE ( surfaces%z0h )
+       DEALLOCATE ( surfaces%z0q )
+
+!
+!--    Friction velocity
+       DEALLOCATE ( surfaces%us )
+!
+!--    Allocate Obukhov length and bulk Richardson number. Actually, at
+!--    vertical surfaces these are only required for natural surfaces.  
+!--    for natural land surfaces
+       DEALLOCATE( surfaces%ol ) 
+       DEALLOCATE( surfaces%rib ) 
+!
+!--    Allocate arrays for surface momentum fluxes for u and v. For u at north- 
+!--    and south-facing surfaces, for v at east- and west-facing surfaces.
+       DEALLOCATE ( surfaces%mom_flux_uv )
+!
+!--    Allocate array for surface momentum flux for w - wsus and wsvs
+       DEALLOCATE ( surfaces%mom_flux_w ) 
+!
+!--    Allocate array for surface momentum flux for subgrid-scale tke wsus and 
+!--    wsvs; first index usvs or vsws, second index for wsus or wsvs, depending
+!--    on surface.
+       DEALLOCATE ( surfaces%mom_flux_tke )  
+!
+!--    Characteristic temperature and surface flux of sensible heat
+       DEALLOCATE ( surfaces%ts )    
+       DEALLOCATE ( surfaces%shf )
+!
+!--    surface temperature
+       DEALLOCATE ( surfaces%pt_surface ) 
+!
+!--    Characteristic humidity and surface flux of latent heat
+       IF ( humidity )  THEN
+          DEALLOCATE ( surfaces%qs ) 
+          DEALLOCATE ( surfaces%qsws )  
+          DEALLOCATE ( surfaces%q_surface   )
+          DEALLOCATE ( surfaces%vpt_surface )
+       ENDIF 
+!
+!--    Characteristic scalar and surface flux of scalar
+       IF ( passive_scalar )  THEN
+          DEALLOCATE ( surfaces%ss )   
+          DEALLOCATE ( surfaces%ssws ) 
+       ENDIF
+!
+!--    Scaling parameter (cs*) and surface flux of chemical species
+       IF ( air_chemistry )  THEN
+             DEALLOCATE ( surfaces%css )   
+             DEALLOCATE ( surfaces%cssws ) 
+       ENDIF 
+!
+!--    Arrays for storing potential temperature and
+!--    mixing ratio at first grid level
+       DEALLOCATE ( surfaces%pt1 )
+       DEALLOCATE ( surfaces%qv1 )
+       DEALLOCATE ( surfaces%vpt1 )
+
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          DEALLOCATE ( surfaces%qcs )
+          DEALLOCATE ( surfaces%ncs )
+          DEALLOCATE ( surfaces%qcsws )
+          DEALLOCATE ( surfaces%ncsws )
+       ENDIF
+
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          DEALLOCATE ( surfaces%qrs )
+          DEALLOCATE ( surfaces%nrs )
+          DEALLOCATE ( surfaces%qrsws )
+          DEALLOCATE ( surfaces%nrsws )
+       ENDIF
+!
+!--    Salinity surface flux
+       IF ( ocean_mode )  DEALLOCATE ( surfaces%sasws )
+
+    END SUBROUTINE deallocate_surface_attributes_v
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocating memory for vertical surface types. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE allocate_surface_attributes_v( surfaces,                        &
+                                              nys_l, nyn_l, nxl_l, nxr_l )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  nyn_l  !< north bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nys_l  !< south bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nxl_l  !< west bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+       INTEGER(iwp) ::  nxr_l  !< east bound of local 2d array start/end_index, is equal to nyn, except for restart-array
+
+       TYPE(surf_type) ::  surfaces !< respective surface type
+
+!
+!--    Allocate arrays for start and end index of vertical surface type 
+!--    for each (j,i)-grid point. This is required in diffion_x, which is
+!--    called for each (j,i). In order to find the location where the 
+!--    respective flux is store within the surface-type, start- and end- 
+!--    index are stored for each (j,i). For example, each (j,i) can have
+!--    several entries where fluxes for vertical surfaces might be stored.  
+!--    In the flat case, where no vertical walls exit, set indicies such 
+!--    that loop in diffusion routines will not be entered. 
+       ALLOCATE ( surfaces%start_index(nys_l:nyn_l,nxl_l:nxr_l) )
+       ALLOCATE ( surfaces%end_index(nys_l:nyn_l,nxl_l:nxr_l)   )
+       surfaces%start_index = 0
+       surfaces%end_index   = -1
+!
+!--    Indices to locate surface element.
+       ALLOCATE ( surfaces%i(1:surfaces%ns) )
+       ALLOCATE ( surfaces%j(1:surfaces%ns) )
+       ALLOCATE ( surfaces%k(1:surfaces%ns) )
+!
+!--    Surface-layer height
+       ALLOCATE ( surfaces%z_mo(1:surfaces%ns) )
+!
+!--    Surface orientation
+       ALLOCATE ( surfaces%facing(1:surfaces%ns) )
+!
+!--    Surface parallel wind velocity
+       ALLOCATE ( surfaces%uvw_abs(1:surfaces%ns) )
+!
+!--    Roughness
+       ALLOCATE ( surfaces%z0(1:surfaces%ns)  )
+       ALLOCATE ( surfaces%z0h(1:surfaces%ns) )
+       ALLOCATE ( surfaces%z0q(1:surfaces%ns) )
+
+!
+!--    Friction velocity
+       ALLOCATE ( surfaces%us(1:surfaces%ns) )
+!
+!--    Allocate Obukhov length and bulk Richardson number. Actually, at
+!--    vertical surfaces these are only required for natural surfaces.  
+!--    for natural land surfaces
+       ALLOCATE( surfaces%ol(1:surfaces%ns)  ) 
+       ALLOCATE( surfaces%rib(1:surfaces%ns) ) 
+!
+!--    Allocate arrays for surface momentum fluxes for u and v. For u at north- 
+!--    and south-facing surfaces, for v at east- and west-facing surfaces.
+       ALLOCATE ( surfaces%mom_flux_uv(1:surfaces%ns) )
+!
+!--    Allocate array for surface momentum flux for w - wsus and wsvs
+       ALLOCATE ( surfaces%mom_flux_w(1:surfaces%ns) ) 
+!
+!--    Allocate array for surface momentum flux for subgrid-scale tke wsus and 
+!--    wsvs; first index usvs or vsws, second index for wsus or wsvs, depending
+!--    on surface.
+       ALLOCATE ( surfaces%mom_flux_tke(0:1,1:surfaces%ns) )  
+!
+!--    Characteristic temperature and surface flux of sensible heat
+       ALLOCATE ( surfaces%ts(1:surfaces%ns)  )    
+       ALLOCATE ( surfaces%shf(1:surfaces%ns) )
+!
+!--    surface temperature
+       ALLOCATE ( surfaces%pt_surface(1:surfaces%ns) ) 
+!
+!--    Characteristic humidity and surface flux of latent heat
+       IF ( humidity )  THEN
+          ALLOCATE ( surfaces%qs(1:surfaces%ns)          ) 
+          ALLOCATE ( surfaces%qsws(1:surfaces%ns)        )   
+          ALLOCATE ( surfaces%q_surface(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%vpt_surface(1:surfaces%ns) )            
+       ENDIF 
+!
+!--    Characteristic scalar and surface flux of scalar
+       IF ( passive_scalar )  THEN
+          ALLOCATE ( surfaces%ss(1:surfaces%ns)   )   
+          ALLOCATE ( surfaces%ssws(1:surfaces%ns) ) 
+       ENDIF
+!
+!--    Scaling parameter (cs*) and surface flux of chemical species
+       IF ( air_chemistry )  THEN
+             ALLOCATE ( surfaces%css(1:nvar,1:surfaces%ns)   )   
+             ALLOCATE ( surfaces%cssws(1:nvar,1:surfaces%ns) ) 
+       ENDIF 
+!
+!--    Arrays for storing potential temperature and
+!--    mixing ratio at first grid level
+       ALLOCATE ( surfaces%pt1(1:surfaces%ns) )
+       ALLOCATE ( surfaces%qv1(1:surfaces%ns) )
+       ALLOCATE ( surfaces%vpt1(1:surfaces%ns) )
+
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          ALLOCATE ( surfaces%qcs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%ncs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%qcsws(1:surfaces%ns) )
+          ALLOCATE ( surfaces%ncsws(1:surfaces%ns) )
+       ENDIF
+
+       IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+          ALLOCATE ( surfaces%qrs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%nrs(1:surfaces%ns)   )
+          ALLOCATE ( surfaces%qrsws(1:surfaces%ns) )
+          ALLOCATE ( surfaces%nrsws(1:surfaces%ns) )
+       ENDIF
+!
+!--    Salinity surface flux
+       IF ( ocean_mode )  ALLOCATE ( surfaces%sasws(1:surfaces%ns) )
+
+    END SUBROUTINE allocate_surface_attributes_v
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize surface elements, i.e. set initial values for surface fluxes, 
+!> friction velocity, calcuation of start/end indices, etc. . 
+!> Please note, further initialization concerning 
+!> special surface characteristics, e.g. soil- and vegatation type, 
+!> building type, etc., is done in the land-surface and urban-surface module, 
+!> respectively.  
+!------------------------------------------------------------------------------!
+    SUBROUTINE init_surfaces
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i         !< running index x-direction
+       INTEGER(iwp) ::  j         !< running index y-direction
+       INTEGER(iwp) ::  k         !< running index z-direction
+
+       INTEGER(iwp)                 ::  start_index_lsm_h !< dummy to determing local start index in surface type for given (j,i), for horizontal natural surfaces
+       INTEGER(iwp)                 ::  start_index_usm_h !< dummy to determing local start index in surface type for given (j,i), for horizontal urban surfaces
+
+       INTEGER(iwp)                 ::  num_lsm_h     !< current number of horizontal surface element, natural type
+       INTEGER(iwp)                 ::  num_lsm_h_kji !< dummy to determing local end index in surface type for given (j,i), for for horizonal natural surfaces
+       INTEGER(iwp)                 ::  num_usm_h     !< current number of horizontal surface element, urban type
+       INTEGER(iwp)                 ::  num_usm_h_kji !< dummy to determing local end index in surface type for given (j,i), for for horizonal urban surfaces
+
+       INTEGER(iwp), DIMENSION(0:2) ::  num_def_h     !< current number of horizontal surface element, default type
+       INTEGER(iwp), DIMENSION(0:2) ::  num_def_h_kji !< dummy to determing local end index in surface type for given (j,i), for horizonal default surfaces
+       INTEGER(iwp), DIMENSION(0:2) ::  start_index_def_h !< dummy to determing local start index in surface type for given (j,i), for horizontal default surfaces
+     
+       INTEGER(iwp), DIMENSION(0:3) ::  num_def_v     !< current number of vertical surface element, default type
+       INTEGER(iwp), DIMENSION(0:3) ::  num_def_v_kji !< dummy to determing local end index in surface type for given (j,i), for vertical default surfaces
+       INTEGER(iwp), DIMENSION(0:3) ::  num_lsm_v     !< current number of vertical surface element, natural type
+       INTEGER(iwp), DIMENSION(0:3) ::  num_lsm_v_kji !< dummy to determing local end index in surface type for given (j,i), for vertical natural surfaces
+       INTEGER(iwp), DIMENSION(0:3) ::  num_usm_v     !< current number of vertical surface element, urban type
+       INTEGER(iwp), DIMENSION(0:3) ::  num_usm_v_kji !< dummy to determing local end index in surface type for given (j,i), for vertical urban surfaces
+
+       INTEGER(iwp), DIMENSION(0:3) ::  start_index_def_v !< dummy to determing local start index in surface type for given (j,i), for vertical default surfaces
+       INTEGER(iwp), DIMENSION(0:3) ::  start_index_lsm_v !< dummy to determing local start index in surface type for given (j,i), for vertical natural surfaces
+       INTEGER(iwp), DIMENSION(0:3) ::  start_index_usm_v !< dummy to determing local start index in surface type for given (j,i), for vertical urban surfaces
+
+       LOGICAL ::  building     !< flag indicating building grid point
+       LOGICAL ::  terrain      !< flag indicating natural terrain grid point
+
+!
+!--    Set offset indices, i.e. index difference between surface element and 
+!--    surface-bounded grid point.
+!--    Upward facing - no horizontal offsets
+       surf_def_h(0:2)%ioff = 0
+       surf_def_h(0:2)%joff = 0
+
+       surf_lsm_h%ioff = 0
+       surf_lsm_h%joff = 0
+
+       surf_usm_h%ioff = 0
+       surf_usm_h%joff = 0
+!
+!--    Upward facing vertical offsets
+       surf_def_h(0)%koff   = -1
+       surf_lsm_h%koff      = -1
+       surf_usm_h%koff      = -1
+!
+!--    Downward facing vertical offset
+       surf_def_h(1:2)%koff = 1
+!
+!--    Vertical surfaces - no vertical offset
+       surf_def_v(0:3)%koff = 0
+       surf_lsm_v(0:3)%koff = 0
+       surf_usm_v(0:3)%koff = 0
+!
+!--    North- and southward facing - no offset in x
+       surf_def_v(0:1)%ioff = 0
+       surf_lsm_v(0:1)%ioff = 0
+       surf_usm_v(0:1)%ioff = 0
+!
+!--    Northward facing offset in y
+       surf_def_v(0)%joff = -1
+       surf_lsm_v(0)%joff = -1
+       surf_usm_v(0)%joff = -1
+!
+!--    Southward facing offset in y
+       surf_def_v(1)%joff = 1
+       surf_lsm_v(1)%joff = 1
+       surf_usm_v(1)%joff = 1
+
+!
+!--    East- and westward facing - no offset in y
+       surf_def_v(2:3)%joff = 0
+       surf_lsm_v(2:3)%joff = 0
+       surf_usm_v(2:3)%joff = 0
+!
+!--    Eastward facing offset in x
+       surf_def_v(2)%ioff = -1
+       surf_lsm_v(2)%ioff = -1
+       surf_usm_v(2)%ioff = -1
+!
+!--    Westward facing offset in y
+       surf_def_v(3)%ioff = 1
+       surf_lsm_v(3)%ioff = 1
+       surf_usm_v(3)%ioff = 1
+
+!
+!--    Initialize surface attributes, store indicies, surfaces orientation, etc., 
+       num_def_h(0:2) = 1
+       num_def_v(0:3) = 1
+
+       num_lsm_h      = 1
+       num_lsm_v(0:3) = 1
+
+       num_usm_h      = 1
+       num_usm_v(0:3) = 1
+
+       start_index_def_h(0:2) = 1
+       start_index_def_v(0:3) = 1
+
+       start_index_lsm_h      = 1
+       start_index_lsm_v(0:3) = 1
+
+       start_index_usm_h      = 1
+       start_index_usm_v(0:3) = 1
+
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+
+             num_def_h_kji = 0
+             num_def_v_kji = 0
+             num_lsm_h_kji = 0
+             num_lsm_v_kji = 0
+             num_usm_h_kji = 0
+             num_usm_v_kji = 0
+
+             DO  k = nzb+1, nzt
+!
+!--             Check if current gridpoint belongs to the atmosphere
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+!
+!--                Upward-facing surface. Distinguish between differet surface types.
+!--                To do, think about method to flag natural and non-natural 
+!--                surfaces. 
+                   IF ( .NOT. BTEST( wall_flags_0(k-1,j,i), 0 ) )  THEN 
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k-1,j,i), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k-1,j,i), 6 )  .OR.       &
+                                 topo_no_distinct
+!
+!--                   Natural surface type          
+                      IF ( land_surface  .AND.  terrain )  THEN
+                         CALL initialize_horizontal_surfaces( k, j, i,         &
+                                                              surf_lsm_h,      &
+                                                              num_lsm_h,       &
+                                                              num_lsm_h_kji,   &
+                                                              .TRUE., .FALSE. )  
+!
+!--                   Urban surface tpye
+                      ELSEIF ( urban_surface  .AND.  building )  THEN
+                         CALL initialize_horizontal_surfaces( k, j, i,         &
+                                                              surf_usm_h,      &
+                                                              num_usm_h,       &
+                                                              num_usm_h_kji,   &
+                                                              .TRUE., .FALSE. )  
+!
+!--                   Default surface type
+                      ELSE
+                         CALL initialize_horizontal_surfaces( k, j, i,         &
+                                                              surf_def_h(0),   &
+                                                              num_def_h(0),    &
+                                                              num_def_h_kji(0),&
+                                                              .TRUE., .FALSE. )  
+                      ENDIF
+                   ENDIF  
+!
+!--                downward-facing surface, first, model top. Please note, 
+!--                for the moment, downward-facing surfaces are always of 
+!--                default type
+                   IF ( k == nzt  .AND.  use_top_fluxes )  THEN
+                      CALL initialize_top( k, j, i, surf_def_h(2),             &
+                                           num_def_h(2), num_def_h_kji(2) )
+!
+!--                Check for any other downward-facing surface. So far only for 
+!--                default surface type.
+                   ELSEIF ( .NOT. BTEST( wall_flags_0(k+1,j,i), 0 ) )  THEN
+                      CALL initialize_horizontal_surfaces( k, j, i,            &
+                                                           surf_def_h(1),      &
+                                                           num_def_h(1),       &
+                                                           num_def_h_kji(1),   &
+                                                           .FALSE., .TRUE. )    
+                   ENDIF 
+!
+!--                Check for vertical walls and, if required, initialize it.
+!                  Start with northward-facing surface.
+                   IF ( .NOT. BTEST( wall_flags_0(k,j-1,i), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j-1,i), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j-1,i), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF ( urban_surface  .AND.  building )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_usm_v(0),     &
+                                                            num_usm_v(0),      &
+                                                            num_usm_v_kji(0),  &
+                                                            .FALSE., .FALSE.,  &             
+                                                            .FALSE., .TRUE. ) 
+                      ELSEIF ( land_surface  .AND.  terrain )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_lsm_v(0),     &
+                                                            num_lsm_v(0),      &
+                                                            num_lsm_v_kji(0),  &
+                                                            .FALSE., .FALSE.,  &             
+                                                            .FALSE., .TRUE. ) 
+                      ELSE
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_def_v(0),     &
+                                                            num_def_v(0),      &
+                                                            num_def_v_kji(0),  &
+                                                            .FALSE., .FALSE.,  &             
+                                                            .FALSE., .TRUE. ) 
+                      ENDIF
+                   ENDIF
+!
+!--                southward-facing surface
+                   IF ( .NOT. BTEST( wall_flags_0(k,j+1,i), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j+1,i), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j+1,i), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF ( urban_surface  .AND.  building )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_usm_v(1),     &
+                                                            num_usm_v(1),      &
+                                                            num_usm_v_kji(1),  &
+                                                            .FALSE., .FALSE.,  &
+                                                            .TRUE., .FALSE. )
+                      ELSEIF ( land_surface  .AND.  terrain )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_lsm_v(1),     &
+                                                            num_lsm_v(1),      &
+                                                            num_lsm_v_kji(1),  &
+                                                            .FALSE., .FALSE.,  &
+                                                            .TRUE., .FALSE. )  
+                      ELSE
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_def_v(1),     &
+                                                            num_def_v(1),      &
+                                                            num_def_v_kji(1),  &
+                                                            .FALSE., .FALSE.,  &
+                                                            .TRUE., .FALSE. ) 
+                      ENDIF
+                   ENDIF
+!
+!--                eastward-facing surface
+                   IF ( .NOT. BTEST( wall_flags_0(k,j,i-1), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j,i-1), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j,i-1), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF ( urban_surface  .AND.  building )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_usm_v(2),     &
+                                                            num_usm_v(2),      &
+                                                            num_usm_v_kji(2),  &
+                                                            .TRUE., .FALSE.,   &
+                                                            .FALSE., .FALSE. ) 
+                      ELSEIF ( land_surface  .AND.  terrain )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_lsm_v(2),     &
+                                                            num_lsm_v(2),      &
+                                                            num_lsm_v_kji(2),  &
+                                                            .TRUE., .FALSE.,   &
+                                                            .FALSE., .FALSE. ) 
+                      ELSE
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_def_v(2),     &
+                                                            num_def_v(2),      &
+                                                            num_def_v_kji(2),  &
+                                                            .TRUE., .FALSE.,   &
+                                                            .FALSE., .FALSE. ) 
+                      ENDIF
+                   ENDIF 
+!   
+!--                westward-facing surface
+                   IF ( .NOT. BTEST( wall_flags_0(k,j,i+1), 0 ) )  THEN
+!
+!--                   Determine flags indicating terrain or building
+                      terrain  = BTEST( wall_flags_0(k,j,i+1), 5 )  .OR.       &
+                                 topo_no_distinct
+                      building = BTEST( wall_flags_0(k,j,i+1), 6 )  .OR.       &
+                                 topo_no_distinct
+                      IF ( urban_surface  .AND.  building )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_usm_v(3),     &
+                                                            num_usm_v(3),      &
+                                                            num_usm_v_kji(3),  &
+                                                           .FALSE., .TRUE.,    &
+                                                           .FALSE., .FALSE. ) 
+                      ELSEIF ( land_surface  .AND.  terrain )  THEN
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_lsm_v(3),     &
+                                                            num_lsm_v(3),      &
+                                                            num_lsm_v_kji(3),  &
+                                                           .FALSE., .TRUE.,    &
+                                                           .FALSE., .FALSE. ) 
+                      ELSE
+                         CALL initialize_vertical_surfaces( k, j, i,           &
+                                                            surf_def_v(3),     &
+                                                            num_def_v(3),      &
+                                                            num_def_v_kji(3),  &
+                                                           .FALSE., .TRUE.,    &
+                                                           .FALSE., .FALSE. ) 
+                      ENDIF
+                   ENDIF
+                ENDIF
+
+ 
+             ENDDO
+!
+!--          Determine start- and end-index at grid point (j,i). Also, for 
+!--          horizontal surfaces more than 1 horizontal surface element can 
+!--          exist at grid point (j,i) if overhanging structures are present.
+!--          Upward-facing surfaces
+             surf_def_h(0)%start_index(j,i) = start_index_def_h(0)
+             surf_def_h(0)%end_index(j,i)   = surf_def_h(0)%start_index(j,i) + &
+                                                 num_def_h_kji(0) - 1
+             start_index_def_h(0)           = surf_def_h(0)%end_index(j,i) + 1
+!
+!--          Downward-facing surfaces, except model top
+             surf_def_h(1)%start_index(j,i) = start_index_def_h(1)                                                 
+             surf_def_h(1)%end_index(j,i)   = surf_def_h(1)%start_index(j,i) + &
+                                                 num_def_h_kji(1) - 1
+             start_index_def_h(1)           = surf_def_h(1)%end_index(j,i) + 1
+!
+!--          Downward-facing surfaces -- model top fluxes
+             surf_def_h(2)%start_index(j,i) = start_index_def_h(2)                                                 
+             surf_def_h(2)%end_index(j,i)   = surf_def_h(2)%start_index(j,i) + &
+                                                 num_def_h_kji(2) - 1
+             start_index_def_h(2)           = surf_def_h(2)%end_index(j,i) + 1
+!
+!--          Horizontal natural land surfaces
+             surf_lsm_h%start_index(j,i)    = start_index_lsm_h
+             surf_lsm_h%end_index(j,i)      = surf_lsm_h%start_index(j,i) +    &
+                                                 num_lsm_h_kji - 1
+             start_index_lsm_h              = surf_lsm_h%end_index(j,i) + 1
+!
+!--          Horizontal urban surfaces
+             surf_usm_h%start_index(j,i)    = start_index_usm_h
+             surf_usm_h%end_index(j,i)      = surf_usm_h%start_index(j,i) +    &
+                                                 num_usm_h_kji - 1
+             start_index_usm_h              = surf_usm_h%end_index(j,i) + 1
+
+!
+!--          Vertical surfaces - Default type
+             surf_def_v(0)%start_index(j,i) = start_index_def_v(0)
+             surf_def_v(1)%start_index(j,i) = start_index_def_v(1)
+             surf_def_v(2)%start_index(j,i) = start_index_def_v(2)
+             surf_def_v(3)%start_index(j,i) = start_index_def_v(3)
+             surf_def_v(0)%end_index(j,i)   = start_index_def_v(0) +           & 
+                                              num_def_v_kji(0) - 1
+             surf_def_v(1)%end_index(j,i)   = start_index_def_v(1) +           &
+                                              num_def_v_kji(1) - 1
+             surf_def_v(2)%end_index(j,i)   = start_index_def_v(2) +           &
+                                              num_def_v_kji(2) - 1
+             surf_def_v(3)%end_index(j,i)   = start_index_def_v(3) +           &
+                                              num_def_v_kji(3) - 1
+             start_index_def_v(0)           = surf_def_v(0)%end_index(j,i) + 1
+             start_index_def_v(1)           = surf_def_v(1)%end_index(j,i) + 1
+             start_index_def_v(2)           = surf_def_v(2)%end_index(j,i) + 1
+             start_index_def_v(3)           = surf_def_v(3)%end_index(j,i) + 1
+!
+!--          Natural type
+             surf_lsm_v(0)%start_index(j,i) = start_index_lsm_v(0)
+             surf_lsm_v(1)%start_index(j,i) = start_index_lsm_v(1)
+             surf_lsm_v(2)%start_index(j,i) = start_index_lsm_v(2)
+             surf_lsm_v(3)%start_index(j,i) = start_index_lsm_v(3)
+             surf_lsm_v(0)%end_index(j,i)   = start_index_lsm_v(0) +           & 
+                                              num_lsm_v_kji(0) - 1
+             surf_lsm_v(1)%end_index(j,i)   = start_index_lsm_v(1) +           &
+                                              num_lsm_v_kji(1) - 1
+             surf_lsm_v(2)%end_index(j,i)   = start_index_lsm_v(2) +           &
+                                              num_lsm_v_kji(2) - 1
+             surf_lsm_v(3)%end_index(j,i)   = start_index_lsm_v(3) +           &
+                                              num_lsm_v_kji(3) - 1
+             start_index_lsm_v(0)           = surf_lsm_v(0)%end_index(j,i) + 1
+             start_index_lsm_v(1)           = surf_lsm_v(1)%end_index(j,i) + 1
+             start_index_lsm_v(2)           = surf_lsm_v(2)%end_index(j,i) + 1
+             start_index_lsm_v(3)           = surf_lsm_v(3)%end_index(j,i) + 1
+!
+!--          Urban type
+             surf_usm_v(0)%start_index(j,i) = start_index_usm_v(0)
+             surf_usm_v(1)%start_index(j,i) = start_index_usm_v(1)
+             surf_usm_v(2)%start_index(j,i) = start_index_usm_v(2)
+             surf_usm_v(3)%start_index(j,i) = start_index_usm_v(3)
+             surf_usm_v(0)%end_index(j,i)   = start_index_usm_v(0) +           & 
+                                              num_usm_v_kji(0) - 1
+             surf_usm_v(1)%end_index(j,i)   = start_index_usm_v(1) +           &
+                                              num_usm_v_kji(1) - 1
+             surf_usm_v(2)%end_index(j,i)   = start_index_usm_v(2) +           &
+                                              num_usm_v_kji(2) - 1
+             surf_usm_v(3)%end_index(j,i)   = start_index_usm_v(3) +           &
+                                              num_usm_v_kji(3) - 1
+             start_index_usm_v(0)           = surf_usm_v(0)%end_index(j,i) + 1
+             start_index_usm_v(1)           = surf_usm_v(1)%end_index(j,i) + 1
+             start_index_usm_v(2)           = surf_usm_v(2)%end_index(j,i) + 1
+             start_index_usm_v(3)           = surf_usm_v(3)%end_index(j,i) + 1
+
+
+          ENDDO
+       ENDDO
+
+       CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize horizontal surface elements, upward- and downward-facing. 
+!> Note, horizontal surface type alsw comprises model-top fluxes, which are,
+!> initialized in a different routine. 
+!------------------------------------------------------------------------------!
+          SUBROUTINE initialize_horizontal_surfaces( k, j, i, surf, num_h,     &
+                                                     num_h_kji, upward_facing, &
+                                                     downward_facing )       
+
+             IMPLICIT NONE 
+
+             INTEGER(iwp)  ::  i                !< running index x-direction
+             INTEGER(iwp)  ::  j                !< running index y-direction
+             INTEGER(iwp)  ::  k                !< running index z-direction
+             INTEGER(iwp)  ::  num_h            !< current number of surface element
+             INTEGER(iwp)  ::  num_h_kji        !< dummy increment
+             INTEGER(iwp)  ::  lsp              !< running index chemical species
+             INTEGER(iwp)  ::  lsp_pr           !< running index chemical species??
+
+             LOGICAL       ::  upward_facing    !< flag indicating upward-facing surface
+             LOGICAL       ::  downward_facing  !< flag indicating downward-facing surface
+
+             TYPE( surf_type ) :: surf          !< respective surface type
+
+!
+!--          Store indices of respective surface element
+             surf%i(num_h) = i
+             surf%j(num_h) = j
+             surf%k(num_h) = k
+!
+!--          Surface orientation, bit 0 is set to 1 for upward-facing surfaces, 
+!--          bit 1 is for downward-facing surfaces.
+             IF ( upward_facing   )  surf%facing(num_h) = IBSET( surf%facing(num_h), 0 )
+             IF ( downward_facing )  surf%facing(num_h) = IBSET( surf%facing(num_h), 1 )
+!
+!--          Initialize surface-layer height
+             IF ( upward_facing )  THEN
+                surf%z_mo(num_h)  = zu(k) - zw(k-1)
+             ELSE
+                surf%z_mo(num_h)  = zw(k) - zu(k)
+             ENDIF
+ 
+             surf%z0(num_h)    = roughness_length
+             surf%z0h(num_h)   = z0h_factor * roughness_length
+             surf%z0q(num_h)   = z0h_factor * roughness_length          
+!
+!--          Initialization in case of 1D pre-cursor run
+             IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )&
+             THEN
+                IF ( .NOT. constant_diffusion )  THEN
+                   IF ( constant_flux_layer )  THEN
+                      surf%ol(num_h)   = surf%z_mo(num_h) /                    &
+                                            ( rif1d(nzb+1) + 1.0E-20_wp )
+                      surf%us(num_h)   = us1d
+                      surf%usws(num_h) = usws1d
+                      surf%vsws(num_h) = vsws1d
+                   ELSE
+                      surf%ol(num_h)   = surf%z_mo(num_h) / zeta_min
+                      surf%us(num_h)   = 0.0_wp
+                      surf%usws(num_h) = 0.0_wp
+                      surf%vsws(num_h) = 0.0_wp
+                   ENDIF
+                ELSE
+                   surf%ol(num_h)   = surf%z_mo(num_h) / zeta_min
+                   surf%us(num_h)   = 0.0_wp
+                   surf%usws(num_h) = 0.0_wp
+                   surf%vsws(num_h) = 0.0_wp
+                ENDIF
+!
+!--          Initialization in all other cases
+             ELSE
+
+                surf%ol(num_h)   = surf%z_mo(num_h) / zeta_min
+!
+!--             Very small number is required for calculation of Obukhov length 
+!--             at first timestep     
+                surf%us(num_h)    = 1E-30_wp 
+                surf%usws(num_h)  = 0.0_wp
+                surf%vsws(num_h)  = 0.0_wp
+        
+             ENDIF
+
+             surf%rib(num_h)     = 0.0_wp 
+             surf%uvw_abs(num_h) = 0.0_wp
+
+             IF ( .NOT. constant_diffusion )  THEN    
+                surf%u_0(num_h)     = 0.0_wp  
+                surf%v_0(num_h)     = 0.0_wp
+             ENDIF 
+
+             surf%ts(num_h)   = 0.0_wp
+!
+!--          Set initial value for surface temperature
+             surf%pt_surface(num_h) = pt_surface
+             
+             IF ( humidity )  THEN
+                surf%qs(num_h)   = 0.0_wp
+                IF ( surf_bulk_cloud_model .AND. surf_microphysics_morrison)  THEN
+                   surf%qcs(num_h) = 0.0_wp
+                   surf%ncs(num_h) = 0.0_wp
+   
+                   surf%qcsws(num_h) = 0.0_wp
+                   surf%ncsws(num_h) = 0.0_wp
+
+                ENDIF
+                IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+                   surf%qrs(num_h) = 0.0_wp
+                   surf%nrs(num_h) = 0.0_wp
+   
+                   surf%qrsws(num_h) = 0.0_wp
+                   surf%nrsws(num_h) = 0.0_wp
+
+                   surf%pt1(num_h)  = 0.0_wp
+                   surf%qv1(num_h)  = 0.0_wp
+                   surf%vpt1(num_h) = 0.0_wp
+                   
+                ENDIF
+                
+                surf%q_surface(num_h)   = q_surface
+                surf%vpt_surface(num_h) = surf%pt_surface(num_h) *             &
+                                   ( 1.0_wp + 0.61_wp * surf%q_surface(num_h) )
+             ENDIF
+
+             IF ( passive_scalar )  surf%ss(num_h) = 0.0_wp
+
+             DO  lsp = 1, nvar
+                IF ( air_chemistry )  surf%css(lsp,num_h)   = 0.0_wp
+!
+!--             Ensure that fluxes of compounds which are not specified in 
+!--             namelist are all zero --> kanani: revise
+                IF ( air_chemistry )  surf%cssws(lsp,num_h) = 0.0_wp
+             ENDDO
+!
+!--          Inititalize surface fluxes of sensible and latent heat, as well as
+!--          passive scalar
+             IF ( use_surface_fluxes )  THEN
+
+                IF ( upward_facing )  THEN
+                   IF ( constant_heatflux )  THEN
+!   
+!--                   Initialize surface heatflux. However, skip this for now if 
+!--                   if random_heatflux is set. This case, shf is initialized later.
+                      IF ( .NOT. random_heatflux )  THEN
+                         surf%shf(num_h) = surface_heatflux *                  &
+                                                 heatflux_input_conversion(k-1)
+!
+!--                      Check if surface heat flux might be replaced by 
+!--                      prescribed wall heatflux
+                         IF ( k-1 /= 0 )  THEN
+                            surf%shf(num_h) = wall_heatflux(0) *               &
+                                                 heatflux_input_conversion(k-1)
+                         ENDIF
+                      ENDIF
+                   ELSE
+                      surf%shf(num_h) = 0.0_wp
+                   ENDIF
+!
+!--             Set heat-flux at downward-facing surfaces
+                ELSE
+                   surf%shf(num_h) = wall_heatflux(5) *                        &
+                                             heatflux_input_conversion(k)
+                ENDIF
+
+                IF ( humidity )  THEN
+                   IF ( upward_facing )  THEN
+                      IF ( constant_waterflux )  THEN
+                         surf%qsws(num_h) = surface_waterflux *                &
+                                                 waterflux_input_conversion(k-1)
+                         IF ( k-1 /= 0 )  THEN
+                            surf%qsws(num_h) = wall_humidityflux(0) *          &
+                                                 waterflux_input_conversion(k-1)
+                         ENDIF
+                      ELSE
+                         surf%qsws(num_h) = 0.0_wp
+                      ENDIF
+                   ELSE
+                      surf%qsws(num_h) = wall_humidityflux(5) *                &
+                                                waterflux_input_conversion(k)
+                   ENDIF
+                ENDIF
+
+                IF ( passive_scalar )  THEN
+                   IF ( upward_facing )  THEN
+                      IF ( constant_scalarflux )  THEN
+                         surf%ssws(num_h) = surface_scalarflux  * rho_air_zw(k-1)
+
+                         IF ( k-1 /= 0 )                                       &
+                            surf%ssws(num_h) = wall_scalarflux(0) *            &
+                                               rho_air_zw(k-1)
+
+                      ELSE
+                         surf%ssws(num_h) = 0.0_wp
+                      ENDIF
+                   ELSE
+                      surf%ssws(num_h) = wall_scalarflux(5) * rho_air_zw(k)
+                   ENDIF
+                ENDIF
+
+                IF ( air_chemistry )  THEN
+                   lsp_pr = 1
+                   DO  WHILE ( TRIM( surface_csflux_name( lsp_pr ) ) /= 'novalue' )   !<'novalue' is the default
+                      DO  lsp = 1, nvar
+!
+!--                      Assign surface flux for each variable species
+                         IF ( TRIM( spc_names(lsp) ) == TRIM( surface_csflux_name(lsp_pr) ) )  THEN   
+                            IF ( upward_facing )  THEN
+                               IF ( constant_csflux(lsp_pr) )  THEN
+                                  surf%cssws(lsp,num_h) =                      &
+                                                       surface_csflux(lsp_pr) *&
+                                                       rho_air_zw(k-1)
+
+                                  IF ( k-1 /= 0 )                              &
+                                     surf%cssws(lsp,num_h) =                   &
+                                                       wall_csflux(lsp,0) *    &
+                                                       rho_air_zw(k-1) 
+                               ELSE
+                                  surf%cssws(lsp,num_h) = 0.0_wp
+                               ENDIF
+                            ELSE
+                               surf%cssws(lsp,num_h) = wall_csflux(lsp,5) *    &
+                                                       rho_air_zw(k)
+                            ENDIF
+                         ENDIF
+                      ENDDO
+                      lsp_pr = lsp_pr + 1
+                   ENDDO
+                ENDIF
+
+                IF ( ocean_mode )  THEN
+                   IF ( upward_facing )  THEN 
+                      surf%sasws(num_h) = bottom_salinityflux * rho_air_zw(k-1)
+                   ELSE
+                      surf%sasws(num_h) = 0.0_wp
+                   ENDIF
+                ENDIF
+             ENDIF
+!
+!--          Increment surface indices
+             num_h     = num_h + 1
+             num_h_kji = num_h_kji + 1      
+
+
+          END SUBROUTINE initialize_horizontal_surfaces
+       
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize model-top fluxes. Currently, only the heatflux and salinity flux 
+!> can be prescribed, latent flux is zero in this case!
+!------------------------------------------------------------------------------!
+          SUBROUTINE initialize_top( k, j, i, surf, num_h, num_h_kji )       
+
+             IMPLICIT NONE 
+
+             INTEGER(iwp)  ::  i                !< running index x-direction
+             INTEGER(iwp)  ::  j                !< running index y-direction
+             INTEGER(iwp)  ::  k                !< running index z-direction
+             INTEGER(iwp)  ::  num_h            !< current number of surface element
+             INTEGER(iwp)  ::  num_h_kji        !< dummy increment
+             INTEGER(iwp)  ::  lsp              !< running index for chemical species
+
+             TYPE( surf_type ) :: surf          !< respective surface type
+!
+!--          Store indices of respective surface element
+             surf%i(num_h) = i
+             surf%j(num_h) = j
+             surf%k(num_h) = k
+!
+!--          Initialize top heat flux
+             IF ( constant_top_heatflux )                                      &
+                surf%shf(num_h) = top_heatflux * heatflux_input_conversion(nzt+1)
+!
+!--          Initialization in case of a coupled model run
+             IF ( coupling_mode == 'ocean_to_atmosphere' )  THEN
+                surf%shf(num_h) = 0.0_wp
+                surf%qsws(num_h) = 0.0_wp
+             ENDIF
+!
+!--          Prescribe latent heat flux at the top      
+             IF ( humidity )  THEN
+                surf%qsws(num_h) = 0.0_wp
+                IF ( surf_bulk_cloud_model  .AND.  surf_microphysics_morrison ) THEN
+                   surf%ncsws(num_h) = 0.0_wp
+                   surf%qcsws(num_h) = 0.0_wp
+                ENDIF
+                IF ( surf_bulk_cloud_model  .AND.  surf_microphysics_seifert ) THEN
+                   surf%nrsws(num_h) = 0.0_wp
+                   surf%qrsws(num_h) = 0.0_wp
+                ENDIF
+             ENDIF
+!
+!--          Prescribe top scalar flux
+             IF ( passive_scalar .AND. constant_top_scalarflux )               &
+                surf%ssws(num_h) = top_scalarflux * rho_air_zw(nzt+1)
+!
+!--          Prescribe top chemical species' flux
+             DO  lsp = 1, nvar
+                IF ( air_chemistry  .AND.  constant_top_csflux(lsp) )  THEN 
+                   surf%cssws(lsp,num_h) = top_csflux(lsp) * rho_air_zw(nzt+1)
+                ENDIF
+             ENDDO
+!
+!--          Prescribe top salinity flux
+             IF ( ocean_mode .AND. constant_top_salinityflux)                  &
+                surf%sasws(num_h) = top_salinityflux * rho_air_zw(nzt+1)
+!
+!--          Top momentum fluxes
+             IF ( constant_top_momentumflux )  THEN
+                surf%usws(num_h) = top_momentumflux_u *                        &
+                                            momentumflux_input_conversion(nzt+1)
+                surf%vsws(num_h) = top_momentumflux_v *                        &
+                                            momentumflux_input_conversion(nzt+1)
+             ENDIF
+!
+!--          Increment surface indices
+             num_h     = num_h + 1
+             num_h_kji = num_h_kji + 1      
+
+
+          END SUBROUTINE initialize_top
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize vertical surface elements. 
+!------------------------------------------------------------------------------!
+          SUBROUTINE initialize_vertical_surfaces( k, j, i, surf, num_v,       &
+                                                   num_v_kji, east_facing,     &
+                                                   west_facing, south_facing,  &
+                                                   north_facing )       
+
+             IMPLICIT NONE 
+
+             INTEGER(iwp)  ::  component       !< index of wall_fluxes_ array for respective orientation 
+             INTEGER(iwp)  ::  i               !< running index x-direction
+             INTEGER(iwp)  ::  j               !< running index x-direction
+             INTEGER(iwp)  ::  k               !< running index x-direction
+             INTEGER(iwp)  ::  l               !< index variable for the surface type, indicating the facing 
+             INTEGER(iwp)  ::  num_v           !< current number of surface element
+             INTEGER(iwp)  ::  num_v_kji       !< current number of surface element at (j,i)
+             INTEGER(iwp)  ::  lsp             !< running index for chemical species
+
+
+             LOGICAL       ::  east_facing     !< flag indicating east-facing surfaces
+             LOGICAL       ::  north_facing    !< flag indicating north-facing surfaces
+             LOGICAL       ::  south_facing    !< flag indicating south-facing surfaces
+             LOGICAL       ::  west_facing     !< flag indicating west-facing surfaces
+
+             TYPE( surf_type ) :: surf         !< respective surface type
+
+!
+!--          Store indices of respective wall element
+             surf%i(num_v)   = i
+             surf%j(num_v)   = j
+             surf%k(num_v)   = k
+!
+!--          Initialize surface-layer height, or more precisely, distance to surface
+             IF ( north_facing  .OR.  south_facing )  THEN
+                surf%z_mo(num_v)  = 0.5_wp * dy
+             ELSE
+                surf%z_mo(num_v)  = 0.5_wp * dx
+             ENDIF
+
+             surf%facing(num_v)  = 0
+!
+!--          Surface orientation. Moreover, set component id to map wall_heatflux, 
+!--          etc., on surface type (further below)
+             IF ( north_facing )  THEN
+                surf%facing(num_v) = 5 !IBSET( surf%facing(num_v), 0 )  
+                component          = 4
+             ENDIF
+
+             IF ( south_facing )  THEN
+                surf%facing(num_v) = 6 !IBSET( surf%facing(num_v), 1 ) 
+                component          = 3
+             ENDIF
+
+             IF ( east_facing )  THEN
+                surf%facing(num_v) = 7 !IBSET( surf%facing(num_v), 2 )
+                component          = 2
+             ENDIF
+
+             IF ( west_facing )  THEN
+                surf%facing(num_v) = 8 !IBSET( surf%facing(num_v), 3 ) 
+                component          = 1
+             ENDIF
+
+ 
+             surf%z0(num_v)  = roughness_length
+             surf%z0h(num_v) = z0h_factor * roughness_length
+             surf%z0q(num_v) = z0h_factor * roughness_length
+
+             surf%us(num_v)  = 0.0_wp
+!
+!--          If required, initialize Obukhov length
+             IF ( ALLOCATED( surf%ol ) )                                       &
+                surf%ol(num_v) = surf%z_mo(num_v) / zeta_min
+
+             surf%uvw_abs(num_v)   = 0.0_wp
+
+             surf%mom_flux_uv(num_v) = 0.0_wp
+             surf%mom_flux_w(num_v)  = 0.0_wp
+             surf%mom_flux_tke(0:1,num_v) = 0.0_wp
+
+             surf%ts(num_v)    = 0.0_wp
+             surf%shf(num_v)   = wall_heatflux(component)
+!
+!--          Set initial value for surface temperature
+             surf%pt_surface(num_v) = pt_surface
+
+             IF ( humidity )  THEN
+                surf%qs(num_v)   = 0.0_wp
+                surf%qsws(num_v) = wall_humidityflux(component)
+!
+!--             Following wall fluxes are assumed to be zero 
+                IF ( surf_bulk_cloud_model .AND. surf_microphysics_morrison)  THEN
+                   surf%qcs(num_v) = 0.0_wp
+                   surf%ncs(num_v) = 0.0_wp
+   
+                   surf%qcsws(num_v) = 0.0_wp
+                   surf%ncsws(num_v) = 0.0_wp
+                ENDIF
+                IF ( surf_bulk_cloud_model .AND. surf_microphysics_seifert)  THEN
+                   surf%qrs(num_v) = 0.0_wp
+                   surf%nrs(num_v) = 0.0_wp
+   
+                   surf%qrsws(num_v) = 0.0_wp
+                   surf%nrsws(num_v) = 0.0_wp
+                ENDIF
+             ENDIF
+
+             IF ( passive_scalar )  THEN
+                surf%ss(num_v)   = 0.0_wp
+                surf%ssws(num_v) = wall_scalarflux(component)
+             ENDIF
+
+             IF ( air_chemistry )  THEN        
+                DO  lsp = 1, nvar
+                   surf%css(lsp,num_v)   = 0.0_wp
+                   surf%cssws(lsp,num_v) = wall_csflux(lsp,component)
+                ENDDO
+             ENDIF
+
+!
+!--          So far, salinityflux at vertical surfaces is simply zero 
+!--          at the moment  
+             IF ( ocean_mode )  surf%sasws(num_v) = wall_salinityflux(component)
+!
+!--          Increment wall indices
+             num_v                 = num_v + 1
+             num_v_kji             = num_v_kji + 1
+
+          END SUBROUTINE initialize_vertical_surfaces
+
+    END SUBROUTINE init_surfaces
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Determines topography-top index at given (j,i)-position.  
+!------------------------------------------------------------------------------!
+    FUNCTION get_topography_top_index_ji( j, i, grid )
+
+       IMPLICIT NONE 
+
+       CHARACTER(LEN=*) ::  grid                         !< flag to distinquish between staggered grids
+       INTEGER(iwp)     ::  i                            !< grid index in x-dimension
+       INTEGER(iwp)     ::  ibit                         !< bit position where topography information is stored on respective grid
+       INTEGER(iwp)     ::  j                            !< grid index in y-dimension
+       INTEGER(iwp)     ::  get_topography_top_index_ji  !< topography top index
+
+       SELECT CASE ( TRIM( grid ) )
+
+          CASE ( 's'     )
+             ibit = 12
+          CASE ( 'u'     )
+             ibit = 14
+          CASE ( 'v'     )
+             ibit = 16
+          CASE ( 'w'     )
+             ibit = 18
+          CASE ( 's_out' )
+             ibit = 24
+          CASE DEFAULT
+!
+!--          Set default to scalar grid
+             ibit = 12 
+
+       END SELECT
+
+       get_topography_top_index_ji = MAXLOC(                                   &
+                                     MERGE( 1, 0,                              &
+                                            BTEST( wall_flags_0(:,j,i), ibit ) &
+                                          ), DIM = 1                           &
+                                           ) - 1
+
+       RETURN
+
+    END FUNCTION get_topography_top_index_ji
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Determines topography-top index at each (j,i)-position.  
+!------------------------------------------------------------------------------!
+    FUNCTION get_topography_top_index( grid )
+
+       IMPLICIT NONE 
+
+       CHARACTER(LEN=*) ::  grid                      !< flag to distinquish between staggered grids
+       INTEGER(iwp)     ::  ibit                      !< bit position where topography information is stored on respective grid
+       INTEGER(iwp), DIMENSION(nys:nyn,nxl:nxr) ::  get_topography_top_index  !< topography top index
+
+       SELECT CASE ( TRIM( grid ) )
+
+          CASE ( 's'     )
+             ibit = 12
+          CASE ( 'u'     )
+             ibit = 14
+          CASE ( 'v'     )
+             ibit = 16
+          CASE ( 'w'     )
+             ibit = 18
+          CASE ( 's_out' )
+             ibit = 24
+          CASE DEFAULT
+!
+!--          Set default to scalar grid
+             ibit = 12 
+
+       END SELECT
+
+       get_topography_top_index(nys:nyn,nxl:nxr) = MAXLOC(                     &
+                         MERGE( 1, 0,                                          &
+                                 BTEST( wall_flags_0(:,nys:nyn,nxl:nxr), ibit )&
+                              ), DIM = 1                                       &
+                                                         ) - 1
+
+       RETURN
+
+    END FUNCTION get_topography_top_index
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Gathers all surface elements with the same facing (but possibly different 
+!> type) onto a surface type, and writes binary data into restart files. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_wrd_local
+
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=1)             ::  dum           !< dummy string to create output-variable name
+
+       INTEGER(iwp)                 ::  i             !< running index x-direction
+       INTEGER(iwp)                 ::  j             !< running index y-direction
+       INTEGER(iwp)                 ::  l             !< index surface type orientation
+       INTEGER(iwp)                 ::  lsp           !< running index chemical species
+       INTEGER(iwp)                 ::  m             !< running index for surface elements on individual surface array
+       INTEGER(iwp), DIMENSION(0:2) ::  start_index_h !< start index for horizontal surface elements on gathered surface array
+       INTEGER(iwp), DIMENSION(0:3) ::  mm            !< running index for surface elements on gathered surface array
+       INTEGER(iwp), DIMENSION(0:3) ::  start_index_v !< start index for vertical surface elements on gathered surface array
+
+       TYPE(surf_type), DIMENSION(0:2) ::  surf_h     !< gathered horizontal surfaces, contains all surface types
+       TYPE(surf_type), DIMENSION(0:3) ::  surf_v     !< gathered vertical surfaces, contains all surface types
+
+!
+!--    Determine total number of horizontal and vertical surface elements before
+!--    writing var_list
+       CALL surface_last_actions
+!
+!--    Count number of grid points with same facing and allocate attributes respectively
+!--    Horizontal upward facing
+       surf_h(0)%ns = ns_h_on_file(0)
+       CALL allocate_surface_attributes_h( surf_h(0), nys, nyn, nxl, nxr )
+!
+!--    Horizontal downward facing
+       surf_h(1)%ns = ns_h_on_file(1)
+       CALL allocate_surface_attributes_h( surf_h(1), nys, nyn, nxl, nxr )
+!
+!--    Model top
+       surf_h(2)%ns = ns_h_on_file(2)
+       CALL allocate_surface_attributes_h_top( surf_h(2), nys, nyn, nxl, nxr )
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          surf_v(l)%ns = ns_v_on_file(l)
+          CALL allocate_surface_attributes_v( surf_v(l),                       &
+                                              nys, nyn, nxl, nxr )
+       ENDDO
+!
+!--    In the following, gather data from surfaces elements with the same 
+!--    facing (but possibly differt type) on 1 data-type array.
+       mm(0:2) = 1
+       DO  l = 0, 2
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  m = surf_def_h(l)%start_index(j,i),                        &
+                        surf_def_h(l)%end_index(j,i)
+                   IF ( ALLOCATED( surf_def_h(l)%us ) )                        &
+                      surf_h(l)%us(mm(l))      = surf_def_h(l)%us(m)
+                   IF ( ALLOCATED( surf_def_h(l)%ts ) )                        &
+                      surf_h(l)%ts(mm(l))      = surf_def_h(l)%ts(m)
+                   IF ( ALLOCATED( surf_def_h(l)%qs ) )                        &
+                      surf_h(l)%qs(mm(l))      = surf_def_h(l)%qs(m)
+                   IF ( ALLOCATED( surf_def_h(l)%ss ) )                        &
+                      surf_h(l)%ss(mm(l))      = surf_def_h(l)%ss(m)
+                   IF ( ALLOCATED( surf_def_h(l)%qcs ) )                       &
+                      surf_h(l)%qcs(mm(l))     = surf_def_h(l)%qcs(m)
+                   IF ( ALLOCATED( surf_def_h(l)%ncs ) )                       &
+                      surf_h(l)%ncs(mm(l))     = surf_def_h(l)%ncs(m)
+                   IF ( ALLOCATED( surf_def_h(l)%qrs ) )                       &
+                      surf_h(l)%qrs(mm(l))     = surf_def_h(l)%qrs(m)
+                   IF ( ALLOCATED( surf_def_h(l)%nrs ) )                       &
+                      surf_h(l)%nrs(mm(l))     = surf_def_h(l)%nrs(m)
+                   IF ( ALLOCATED( surf_def_h(l)%ol ) )                        &
+                      surf_h(l)%ol(mm(l))      = surf_def_h(l)%ol(m)
+                   IF ( ALLOCATED( surf_def_h(l)%rib ) )                       &
+                      surf_h(l)%rib(mm(l))     = surf_def_h(l)%rib(m)
+                   IF ( ALLOCATED( surf_def_h(l)%pt_surface ) )                &
+                      surf_h(l)%pt_surface(mm(l)) = surf_def_h(l)%pt_surface(m)
+                   IF ( ALLOCATED( surf_def_h(l)%q_surface ) )                 &
+                      surf_h(l)%q_surface(mm(l)) = surf_def_h(l)%q_surface(m) 
+                   IF ( ALLOCATED( surf_def_h(l)%vpt_surface ) )               &
+                      surf_h(l)%vpt_surface(mm(l)) = surf_def_h(l)%vpt_surface(m)                      
+                   IF ( ALLOCATED( surf_def_h(l)%usws ) )                      &
+                      surf_h(l)%usws(mm(l))    = surf_def_h(l)%usws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%vsws ) )                      &
+                      surf_h(l)%vsws(mm(l))    = surf_def_h(l)%vsws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%shf ) )                       &
+                      surf_h(l)%shf(mm(l))     = surf_def_h(l)%shf(m)
+                   IF ( ALLOCATED( surf_def_h(l)%qsws ) )                      &
+                      surf_h(l)%qsws(mm(l))    = surf_def_h(l)%qsws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%ssws ) )                      &
+                      surf_h(l)%ssws(mm(l))    = surf_def_h(l)%ssws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%css ) )  THEN 
+                      DO  lsp = 1,nvar
+                         surf_h(l)%css(lsp,mm(l)) = surf_def_h(l)%css(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_def_h(l)%cssws ) )  THEN 
+                      DO  lsp = 1,nvar
+                         surf_h(l)%cssws(lsp,mm(l)) = surf_def_h(l)%cssws(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_def_h(l)%qcsws ) )                     &
+                      surf_h(l)%qcsws(mm(l))   = surf_def_h(l)%qcsws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%qrsws ) )                     &
+                      surf_h(l)%qrsws(mm(l))   = surf_def_h(l)%qrsws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%ncsws ) )                     &
+                      surf_h(l)%ncsws(mm(l))   = surf_def_h(l)%ncsws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%nrsws ) )                     &
+                      surf_h(l)%nrsws(mm(l))   = surf_def_h(l)%nrsws(m)
+                   IF ( ALLOCATED( surf_def_h(l)%sasws ) )                     &
+                      surf_h(l)%sasws(mm(l))   = surf_def_h(l)%sasws(m)
+                
+                   mm(l) = mm(l) + 1
+                ENDDO
+
+                IF ( l == 0 )  THEN
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)
+                      IF ( ALLOCATED( surf_lsm_h%us ) )                        &
+                         surf_h(0)%us(mm(0))      = surf_lsm_h%us(m)
+                      IF ( ALLOCATED( surf_lsm_h%ts ) )                        &
+                         surf_h(0)%ts(mm(0))      = surf_lsm_h%ts(m)
+                      IF ( ALLOCATED( surf_lsm_h%qs ) )                        &
+                         surf_h(0)%qs(mm(0))      = surf_lsm_h%qs(m)
+                      IF ( ALLOCATED( surf_lsm_h%ss ) )                        &
+                         surf_h(0)%ss(mm(0))      = surf_lsm_h%ss(m)
+                      IF ( ALLOCATED( surf_lsm_h%qcs ) )                       &
+                         surf_h(0)%qcs(mm(0))     = surf_lsm_h%qcs(m)
+                      IF ( ALLOCATED( surf_lsm_h%ncs ) )                       &
+                         surf_h(0)%ncs(mm(0))     = surf_lsm_h%ncs(m)
+                      IF ( ALLOCATED( surf_lsm_h%qrs ) )                       &
+                         surf_h(0)%qrs(mm(0))     = surf_lsm_h%qrs(m)
+                      IF ( ALLOCATED( surf_lsm_h%nrs ) )                       &
+                         surf_h(0)%nrs(mm(0))     = surf_lsm_h%nrs(m)
+                      IF ( ALLOCATED( surf_lsm_h%ol ) )                        &
+                         surf_h(0)%ol(mm(0))      = surf_lsm_h%ol(m)
+                      IF ( ALLOCATED( surf_lsm_h%rib ) )                       &
+                         surf_h(0)%rib(mm(0))     = surf_lsm_h%rib(m)
+                      IF ( ALLOCATED( surf_lsm_h%pt_surface ) )                &
+                         surf_h(l)%pt_surface(mm(l)) = surf_lsm_h%pt_surface(m)
+                      IF ( ALLOCATED( surf_def_h(l)%q_surface ) )              &
+                         surf_h(l)%q_surface(mm(l)) = surf_lsm_h%q_surface(m)
+                      IF ( ALLOCATED( surf_def_h(l)%vpt_surface ) )            &
+                         surf_h(l)%vpt_surface(mm(l)) = surf_lsm_h%vpt_surface(m)
+                      IF ( ALLOCATED( surf_lsm_h%usws ) )                      &
+                         surf_h(0)%usws(mm(0))    = surf_lsm_h%usws(m)
+                      IF ( ALLOCATED( surf_lsm_h%vsws ) )                      &
+                         surf_h(0)%vsws(mm(0))    = surf_lsm_h%vsws(m)
+                      IF ( ALLOCATED( surf_lsm_h%shf ) )                       &
+                         surf_h(0)%shf(mm(0))     = surf_lsm_h%shf(m)
+                      IF ( ALLOCATED( surf_lsm_h%qsws ) )                      &
+                         surf_h(0)%qsws(mm(0))    = surf_lsm_h%qsws(m)
+                      IF ( ALLOCATED( surf_lsm_h%ssws ) )                      &
+                         surf_h(0)%ssws(mm(0))    = surf_lsm_h%ssws(m)
+                      IF ( ALLOCATED( surf_lsm_h%css ) )  THEN                  
+                         DO  lsp = 1, nvar
+                            surf_h(0)%css(lsp,mm(0)) = surf_lsm_h%css(lsp,m)
+                         ENDDO
+                      ENDIF
+                      IF ( ALLOCATED( surf_lsm_h%cssws ) )  THEN
+                         DO  lsp = 1, nvar
+                            surf_h(0)%cssws(lsp,mm(0)) = surf_lsm_h%cssws(lsp,m)
+                         ENDDO 
+                      ENDIF
+                      IF ( ALLOCATED( surf_lsm_h%qcsws ) )                     &
+                         surf_h(0)%qcsws(mm(0))   = surf_lsm_h%qcsws(m)
+                      IF ( ALLOCATED( surf_lsm_h%qrsws ) )                     &
+                         surf_h(0)%qrsws(mm(0))   = surf_lsm_h%qrsws(m)
+                      IF ( ALLOCATED( surf_lsm_h%ncsws ) )                     &
+                         surf_h(0)%ncsws(mm(0))   = surf_lsm_h%ncsws(m)
+                      IF ( ALLOCATED( surf_lsm_h%nrsws ) )                     &
+                         surf_h(0)%nrsws(mm(0))   = surf_lsm_h%nrsws(m)
+                      IF ( ALLOCATED( surf_lsm_h%sasws ) )                     &
+                        surf_h(0)%sasws(mm(0))   = surf_lsm_h%sasws(m)
+                
+                      mm(0) = mm(0) + 1
+             
+                   ENDDO
+
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)
+                      IF ( ALLOCATED( surf_usm_h%us ) )                        &
+                         surf_h(0)%us(mm(0))      = surf_usm_h%us(m)
+                      IF ( ALLOCATED( surf_usm_h%ts ) )                        &
+                         surf_h(0)%ts(mm(0))      = surf_usm_h%ts(m)
+                      IF ( ALLOCATED( surf_usm_h%qs ) )                        &
+                         surf_h(0)%qs(mm(0))      = surf_usm_h%qs(m)
+                      IF ( ALLOCATED( surf_usm_h%ss ) )                        &
+                         surf_h(0)%ss(mm(0))      = surf_usm_h%ss(m)
+                      IF ( ALLOCATED( surf_usm_h%qcs ) )                       &
+                         surf_h(0)%qcs(mm(0))     = surf_usm_h%qcs(m)
+                      IF ( ALLOCATED( surf_usm_h%ncs ) )                       &
+                         surf_h(0)%ncs(mm(0))     = surf_usm_h%ncs(m)
+                      IF ( ALLOCATED( surf_usm_h%qrs ) )                       &
+                         surf_h(0)%qrs(mm(0))     = surf_usm_h%qrs(m)
+                      IF ( ALLOCATED( surf_usm_h%nrs ) )                       &
+                         surf_h(0)%nrs(mm(0))     = surf_usm_h%nrs(m)
+                      IF ( ALLOCATED( surf_usm_h%ol ) )                        &
+                         surf_h(0)%ol(mm(0))      = surf_usm_h%ol(m)
+                      IF ( ALLOCATED( surf_usm_h%rib ) )                       &
+                         surf_h(0)%rib(mm(0))     = surf_usm_h%rib(m)
+                      IF ( ALLOCATED( surf_usm_h%pt_surface ) )                &
+                         surf_h(l)%pt_surface(mm(l)) = surf_usm_h%pt_surface(m)
+                       IF ( ALLOCATED( surf_usm_h%q_surface ) )                &
+                         surf_h(l)%q_surface(mm(l)) = surf_usm_h%q_surface(m)
+                      IF ( ALLOCATED( surf_usm_h%vpt_surface ) )               &
+                         surf_h(l)%vpt_surface(mm(l)) = surf_usm_h%vpt_surface(m)
+                      IF ( ALLOCATED( surf_usm_h%usws ) )                      &
+                         surf_h(0)%usws(mm(0))    = surf_usm_h%usws(m)
+                      IF ( ALLOCATED( surf_usm_h%vsws ) )                      &
+                         surf_h(0)%vsws(mm(0))    = surf_usm_h%vsws(m)
+                      IF ( ALLOCATED( surf_usm_h%shf ) )                       &
+                         surf_h(0)%shf(mm(0))     = surf_usm_h%shf(m)
+                      IF ( ALLOCATED( surf_usm_h%qsws ) )                      &
+                         surf_h(0)%qsws(mm(0))    = surf_usm_h%qsws(m)
+                      IF ( ALLOCATED( surf_usm_h%ssws ) )                      &
+                         surf_h(0)%ssws(mm(0))    = surf_usm_h%ssws(m)
+                      IF ( ALLOCATED( surf_usm_h%css ) )  THEN             
+                         DO lsp = 1, nvar
+                            surf_h(0)%css(lsp,mm(0)) = surf_usm_h%css(lsp,m)
+                         ENDDO
+                      ENDIF
+                      IF ( ALLOCATED( surf_usm_h%cssws ) )  THEN             
+                         DO lsp = 1, nvar
+                            surf_h(0)%cssws(lsp,mm(0)) = surf_usm_h%cssws(lsp,m)
+                         ENDDO
+                      ENDIF
+                      IF ( ALLOCATED( surf_usm_h%qcsws ) )                     &
+                         surf_h(0)%qcsws(mm(0))   = surf_usm_h%qcsws(m)
+                      IF ( ALLOCATED( surf_usm_h%qrsws ) )                     &
+                         surf_h(0)%qrsws(mm(0))   = surf_usm_h%qrsws(m)
+                      IF ( ALLOCATED( surf_usm_h%ncsws ) )                     &
+                         surf_h(0)%ncsws(mm(0))   = surf_usm_h%ncsws(m)
+                      IF ( ALLOCATED( surf_usm_h%nrsws ) )                     &
+                         surf_h(0)%nrsws(mm(0))   = surf_usm_h%nrsws(m)
+                      IF ( ALLOCATED( surf_usm_h%sasws ) )                     &
+                        surf_h(0)%sasws(mm(0))   = surf_usm_h%sasws(m)
+                
+                      mm(0) = mm(0) + 1
+             
+                   ENDDO
+
+
+                ENDIF
+
+             ENDDO
+
+          ENDDO
+!
+!--       Gather start- and end indices
+          start_index_h(l) = 1                                        
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                surf_h(l)%start_index(j,i) = start_index_h(l)
+                surf_h(l)%end_index(j,i)   = surf_h(l)%start_index(j,i) -1
+
+                DO  m = surf_def_h(l)%start_index(j,i),                        &
+                        surf_def_h(l)%end_index(j,i)
+                   surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1
+                ENDDO
+                IF ( l == 0 )  THEN
+                   DO  m = surf_lsm_h%start_index(j,i),                        &
+                           surf_lsm_h%end_index(j,i)
+                      surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1
+                   ENDDO
+                   DO  m = surf_usm_h%start_index(j,i),                        &
+                           surf_usm_h%end_index(j,i)
+                      surf_h(l)%end_index(j,i) = surf_h(l)%end_index(j,i) + 1
+                   ENDDO
+                ENDIF
+
+                start_index_h(l) = surf_h(l)%end_index(j,i) + 1
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+
+       mm(0:3) = 1
+       DO  l = 0, 3
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  m = surf_def_v(l)%start_index(j,i),                        &
+                        surf_def_v(l)%end_index(j,i)
+                   IF ( ALLOCATED( surf_def_v(l)%us ) )                        &
+                      surf_v(l)%us(mm(l))      = surf_def_v(l)%us(m)
+                   IF ( ALLOCATED( surf_def_v(l)%ts ) )                        &
+                      surf_v(l)%ts(mm(l))      = surf_def_v(l)%ts(m)
+                   IF ( ALLOCATED( surf_def_v(l)%qs ) )                        &
+                      surf_v(l)%qs(mm(l))      = surf_def_v(l)%qs(m)
+                   IF ( ALLOCATED( surf_def_v(l)%ss ) )                        &
+                      surf_v(l)%ss(mm(l))      = surf_def_v(l)%ss(m)
+                   IF ( ALLOCATED( surf_def_v(l)%qcs ) )                       &
+                      surf_v(l)%qcs(mm(l))     = surf_def_v(l)%qcs(m)
+                   IF ( ALLOCATED( surf_def_v(l)%ncs ) )                       &
+                      surf_v(l)%ncs(mm(l))     = surf_def_v(l)%ncs(m)
+                   IF ( ALLOCATED( surf_def_v(l)%qrs ) )                       &
+                      surf_v(l)%qrs(mm(l))     = surf_def_v(l)%qrs(m)
+                   IF ( ALLOCATED( surf_def_v(l)%nrs ) )                       &
+                      surf_v(l)%nrs(mm(l))     = surf_def_v(l)%nrs(m)
+                   IF ( ALLOCATED( surf_def_v(l)%ol ) )                        &
+                      surf_v(l)%ol(mm(l))      = surf_def_v(l)%ol(m)
+                   IF ( ALLOCATED( surf_def_v(l)%rib ) )                       &
+                      surf_v(l)%rib(mm(l))     = surf_def_v(l)%rib(m)
+                   IF ( ALLOCATED( surf_def_v(l)%pt_surface ) )                &
+                      surf_v(l)%pt_surface(mm(l)) = surf_def_v(l)%pt_surface(m)
+                   IF ( ALLOCATED( surf_def_v(l)%q_surface ) )                 &
+                      surf_v(l)%q_surface(mm(l)) = surf_def_v(l)%q_surface(m)
+                   IF ( ALLOCATED( surf_def_v(l)%vpt_surface ) )               &
+                      surf_v(l)%vpt_surface(mm(l)) = surf_def_v(l)%vpt_surface(m)
+                   IF ( ALLOCATED( surf_def_v(l)%shf ) )                       &
+                      surf_v(l)%shf(mm(l))     = surf_def_v(l)%shf(m)
+                   IF ( ALLOCATED( surf_def_v(l)%qsws ) )                      &
+                      surf_v(l)%qsws(mm(l))    = surf_def_v(l)%qsws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%ssws ) )                      &
+                      surf_v(l)%ssws(mm(l))    = surf_def_v(l)%ssws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%css ) )  THEN               
+                      DO  lsp = 1, nvar
+                         surf_v(l)%css(lsp,mm(l)) = surf_def_v(l)%css(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_def_v(l)%cssws ) )  THEN               
+                      DO  lsp = 1, nvar
+                         surf_v(l)%cssws(lsp,mm(l)) = surf_def_v(l)%cssws(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_def_v(l)%qcsws ) )                     &
+                      surf_v(l)%qcsws(mm(l))   = surf_def_v(l)%qcsws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%qrsws ) )                     &
+                      surf_v(l)%qrsws(mm(l))   = surf_def_v(l)%qrsws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%ncsws ) )                     &
+                      surf_v(l)%ncsws(mm(l))   = surf_def_v(l)%ncsws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%nrsws ) )                     &
+                      surf_v(l)%nrsws(mm(l))   = surf_def_v(l)%nrsws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%sasws ) )                     &
+                      surf_v(l)%sasws(mm(l))   = surf_def_v(l)%sasws(m)
+                   IF ( ALLOCATED( surf_def_v(l)%mom_flux_uv) )                &
+                      surf_v(l)%mom_flux_uv(mm(l))  = surf_def_v(l)%mom_flux_uv(m)
+                   IF ( ALLOCATED( surf_def_v(l)%mom_flux_w) )                 &
+                      surf_v(l)%mom_flux_w(mm(l))   = surf_def_v(l)%mom_flux_w(m)
+                   IF ( ALLOCATED( surf_def_v(l)%mom_flux_tke) )               &
+                      surf_v(l)%mom_flux_tke(0:1,mm(l)) = surf_def_v(l)%mom_flux_tke(0:1,m)
+                
+                   mm(l) = mm(l) + 1
+                ENDDO
+
+                DO  m = surf_lsm_v(l)%start_index(j,i),                        &
+                        surf_lsm_v(l)%end_index(j,i)
+                   IF ( ALLOCATED( surf_lsm_v(l)%us ) )                        &
+                      surf_v(l)%us(mm(l))      = surf_lsm_v(l)%us(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%ts ) )                        &
+                      surf_v(l)%ts(mm(l))      = surf_lsm_v(l)%ts(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%qs ) )                        &
+                      surf_v(l)%qs(mm(l))      = surf_lsm_v(l)%qs(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%ss ) )                        &
+                      surf_v(l)%ss(mm(l))      = surf_lsm_v(l)%ss(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%qcs ) )                       &
+                      surf_v(l)%qcs(mm(l))     = surf_lsm_v(l)%qcs(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%ncs ) )                       &
+                      surf_v(l)%ncs(mm(l))     = surf_lsm_v(l)%ncs(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%qrs ) )                       &
+                      surf_v(l)%qrs(mm(l))     = surf_lsm_v(l)%qrs(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%nrs ) )                       &
+                      surf_v(l)%nrs(mm(l))     = surf_lsm_v(l)%nrs(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%ol ) )                        &
+                      surf_v(l)%ol(mm(l))      = surf_lsm_v(l)%ol(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%rib ) )                       &
+                      surf_v(l)%rib(mm(l))     = surf_lsm_v(l)%rib(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%pt_surface ) )                &
+                      surf_v(l)%pt_surface(mm(l)) = surf_lsm_v(l)%pt_surface(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%q_surface ) )                 &
+                      surf_v(l)%q_surface(mm(l)) = surf_lsm_v(l)%q_surface(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%vpt_surface ) )               &
+                      surf_v(l)%vpt_surface(mm(l)) = surf_lsm_v(l)%vpt_surface(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%usws ) )                      &
+                      surf_v(l)%usws(mm(l))    = surf_lsm_v(l)%usws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%vsws ) )                      &
+                      surf_v(l)%vsws(mm(l))    = surf_lsm_v(l)%vsws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%shf ) )                       &
+                      surf_v(l)%shf(mm(l))     = surf_lsm_v(l)%shf(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%qsws ) )                      &
+                      surf_v(l)%qsws(mm(l))    = surf_lsm_v(l)%qsws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%ssws ) )                      &
+                      surf_v(l)%ssws(mm(l))    = surf_lsm_v(l)%ssws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%css ) )  THEN              
+                      DO  lsp = 1, nvar
+                         surf_v(l)%css(lsp,mm(l)) = surf_lsm_v(l)%css(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_lsm_v(l)%cssws ) )  THEN              
+                      DO  lsp = 1, nvar
+                         surf_v(l)%cssws(lsp,mm(l)) = surf_lsm_v(l)%cssws(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_lsm_v(l)%qcsws ) )                     &
+                      surf_v(l)%qcsws(mm(l))   = surf_lsm_v(l)%qcsws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%qrsws ) )                     &
+                      surf_v(l)%qrsws(mm(l))   = surf_lsm_v(l)%qrsws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%ncsws ) )                     &
+                      surf_v(l)%ncsws(mm(l))   = surf_lsm_v(l)%ncsws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%nrsws ) )                     &
+                      surf_v(l)%nrsws(mm(l))   = surf_lsm_v(l)%nrsws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%sasws ) )                     &
+                      surf_v(l)%sasws(mm(l))   = surf_lsm_v(l)%sasws(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%mom_flux_uv) )                &
+                      surf_v(l)%mom_flux_uv(mm(l))  = surf_lsm_v(l)%mom_flux_uv(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%mom_flux_w) )                 &
+                      surf_v(l)%mom_flux_w(mm(l))   = surf_lsm_v(l)%mom_flux_w(m)
+                   IF ( ALLOCATED( surf_lsm_v(l)%mom_flux_tke) )               &
+                      surf_v(l)%mom_flux_tke(0:1,mm(l)) = surf_lsm_v(l)%mom_flux_tke(0:1,m)
+                
+                   mm(l) = mm(l) + 1
+                ENDDO
+
+                DO  m = surf_usm_v(l)%start_index(j,i),                        &
+                        surf_usm_v(l)%end_index(j,i)
+                   IF ( ALLOCATED( surf_usm_v(l)%us ) )                        &
+                      surf_v(l)%us(mm(l))      = surf_usm_v(l)%us(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%ts ) )                        &
+                      surf_v(l)%ts(mm(l))      = surf_usm_v(l)%ts(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%qs ) )                        &
+                      surf_v(l)%qs(mm(l))      = surf_usm_v(l)%qs(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%ss ) )                        &
+                      surf_v(l)%ss(mm(l))      = surf_usm_v(l)%ss(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%qcs ) )                       &
+                      surf_v(l)%qcs(mm(l))     = surf_usm_v(l)%qcs(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%ncs ) )                       &
+                      surf_v(l)%ncs(mm(l))     = surf_usm_v(l)%ncs(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%qrs ) )                       &
+                      surf_v(l)%qrs(mm(l))     = surf_usm_v(l)%qrs(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%nrs ) )                       &
+                      surf_v(l)%nrs(mm(l))     = surf_usm_v(l)%nrs(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%ol ) )                        &
+                      surf_v(l)%ol(mm(l))      = surf_usm_v(l)%ol(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%rib ) )                       &
+                      surf_v(l)%rib(mm(l))     = surf_usm_v(l)%rib(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%pt_surface ) )                &
+                      surf_v(l)%pt_surface(mm(l)) = surf_usm_v(l)%pt_surface(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%q_surface ) )                 &
+                      surf_v(l)%q_surface(mm(l)) = surf_usm_v(l)%q_surface(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%vpt_surface ) )               &
+                      surf_v(l)%vpt_surface(mm(l)) = surf_usm_v(l)%vpt_surface(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%usws ) )                      &
+                      surf_v(l)%usws(mm(l))    = surf_usm_v(l)%usws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%vsws ) )                      &
+                      surf_v(l)%vsws(mm(l))    = surf_usm_v(l)%vsws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%shf ) )                       &
+                      surf_v(l)%shf(mm(l))     = surf_usm_v(l)%shf(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%qsws ) )                      &
+                      surf_v(l)%qsws(mm(l))    = surf_usm_v(l)%qsws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%ssws ) )                      &
+                      surf_v(l)%ssws(mm(l))    = surf_usm_v(l)%ssws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%css ) )  THEN              
+                      DO  lsp = 1, nvar
+                         surf_v(l)%css(lsp,mm(l)) = surf_usm_v(l)%css(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_usm_v(l)%cssws ) )  THEN              
+                      DO  lsp = 1, nvar
+                         surf_v(l)%cssws(lsp,mm(l)) = surf_usm_v(l)%cssws(lsp,m)
+                      ENDDO
+                   ENDIF
+                   IF ( ALLOCATED( surf_usm_v(l)%qcsws ) )                     &
+                      surf_v(l)%qcsws(mm(l))   = surf_usm_v(l)%qcsws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%qrsws ) )                     &
+                      surf_v(l)%qrsws(mm(l))   = surf_usm_v(l)%qrsws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%ncsws ) )                     &
+                      surf_v(l)%ncsws(mm(l))   = surf_usm_v(l)%ncsws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%nrsws ) )                     &
+                      surf_v(l)%nrsws(mm(l))   = surf_usm_v(l)%nrsws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%sasws ) )                     &
+                      surf_v(l)%sasws(mm(l))   = surf_usm_v(l)%sasws(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%mom_flux_uv) )                &
+                      surf_v(l)%mom_flux_uv(mm(l))  = surf_usm_v(l)%mom_flux_uv(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%mom_flux_w) )                 &
+                      surf_v(l)%mom_flux_w(mm(l))   = surf_usm_v(l)%mom_flux_w(m)
+                   IF ( ALLOCATED( surf_usm_v(l)%mom_flux_tke) )               &
+                      surf_v(l)%mom_flux_tke(0:1,mm(l)) = surf_usm_v(l)%mom_flux_tke(0:1,m)
+                
+                   mm(l) = mm(l) + 1
+                ENDDO
+             
+             ENDDO
+          ENDDO
+!
+!--       Gather start- and end indices
+          start_index_v(l) = 1                                        
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                surf_v(l)%start_index(j,i) = start_index_v(l)
+                surf_v(l)%end_index(j,i)   = surf_v(l)%start_index(j,i) -1
+
+                DO  m = surf_def_v(l)%start_index(j,i),                        &
+                        surf_def_v(l)%end_index(j,i)
+                   surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1
+                ENDDO
+                DO  m = surf_lsm_v(l)%start_index(j,i),                        &
+                        surf_lsm_v(l)%end_index(j,i)
+                   surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1
+                ENDDO
+                DO  m = surf_usm_v(l)%start_index(j,i),                        &
+                        surf_usm_v(l)%end_index(j,i)
+                   surf_v(l)%end_index(j,i) = surf_v(l)%end_index(j,i) + 1
+                ENDDO
+
+                start_index_v(l) = surf_v(l)%end_index(j,i) + 1
+             ENDDO
+          ENDDO
+
+       ENDDO
+
+
+       CALL wrd_write_string( 'ns_h_on_file' )
+       WRITE ( 14 )  ns_h_on_file
+
+       CALL wrd_write_string( 'ns_v_on_file' )
+       WRITE ( 14 )  ns_v_on_file
+
+!
+!--    Write required restart data.
+!--    Start with horizontal surfaces (upward-, downward-facing, and model top)
+       DO  l = 0, 2
+          WRITE( dum, '(I1)')  l
+
+          CALL wrd_write_string( 'surf_h(' // dum // ')%start_index' )
+          WRITE ( 14 )  surf_h(l)%start_index
+
+          CALL wrd_write_string( 'surf_h(' // dum // ')%end_index' )
+          WRITE ( 14 )  surf_h(l)%end_index
+
+          IF ( ALLOCATED ( surf_h(l)%us ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%us' ) 
+             WRITE ( 14 )  surf_h(l)%us
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%ts ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%ts' ) 
+             WRITE ( 14 )  surf_h(l)%ts
+          ENDIF
+          
+          IF ( ALLOCATED ( surf_h(l)%qs ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%qs' )  
+             WRITE ( 14 )  surf_h(l)%qs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%ss ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%ss' )  
+             WRITE ( 14 )  surf_h(l)%ss
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%qcs ) )  THEN  
+             CALL wrd_write_string( 'surf_h(' // dum // ')%qcs' )
+             WRITE ( 14 )  surf_h(l)%qcs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%ncs ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%ncs' ) 
+             WRITE ( 14 )  surf_h(l)%ncs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%qrs ) )  THEN  
+             CALL wrd_write_string( 'surf_h(' // dum // ')%qrs' )
+             WRITE ( 14 )  surf_h(l)%qrs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%nrs ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%nrs' )  
+             WRITE ( 14 )  surf_h(l)%nrs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%ol ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%ol' )  
+             WRITE ( 14 )  surf_h(l)%ol
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%rib ) )  THEN
+            CALL wrd_write_string( 'surf_h(' // dum // ')%rib' ) 
+             WRITE ( 14 )  surf_h(l)%rib
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%pt_surface ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%pt_surface' ) 
+             WRITE ( 14 )  surf_h(l)%pt_surface
+          ENDIF
+          
+          IF ( ALLOCATED ( surf_h(l)%q_surface ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%q_surface' ) 
+             WRITE ( 14 )  surf_h(l)%q_surface
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%vpt_surface ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%vpt_surface' ) 
+             WRITE ( 14 )  surf_h(l)%vpt_surface
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%usws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%usws' ) 
+             WRITE ( 14 )  surf_h(l)%usws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%vsws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%vsws' )  
+             WRITE ( 14 )  surf_h(l)%vsws
+          ENDIF
+          
+          IF ( ALLOCATED ( surf_h(l)%shf ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%shf' ) 
+             WRITE ( 14 )  surf_h(l)%shf
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%qsws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%qsws' )  
+             WRITE ( 14 )  surf_h(l)%qsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%ssws ) )  THEN 
+             CALL wrd_write_string( 'surf_h(' // dum // ')%ssws' )  
+             WRITE ( 14 )  surf_h(l)%ssws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%css ) )  THEN 
+             CALL wrd_write_string( 'surf_h(' // dum // ')%css' )
+             WRITE ( 14 )  surf_h(l)%css
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%cssws ) )  THEN 
+             CALL wrd_write_string( 'surf_h(' // dum // ')%cssws' )
+             WRITE ( 14 )  surf_h(l)%cssws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%qcsws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%qcsws' )  
+             WRITE ( 14 )  surf_h(l)%qcsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%ncsws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%ncsws' )  
+             WRITE ( 14 )  surf_h(l)%ncsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%qrsws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%qrsws' )  
+             WRITE ( 14 )  surf_h(l)%qrsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%nrsws ) )  THEN
+             CALL wrd_write_string( 'surf_h(' // dum // ')%nrsws' )  
+             WRITE ( 14 )  surf_h(l)%nrsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_h(l)%sasws ) )  THEN 
+             CALL wrd_write_string( 'surf_h(' // dum // ')%sasws' ) 
+             WRITE ( 14 )  surf_h(l)%sasws
+          ENDIF     
+  
+       ENDDO
+!
+!--    Write vertical surfaces
+       DO  l = 0, 3
+          WRITE( dum, '(I1)')  l
+
+          CALL wrd_write_string( 'surf_v(' // dum // ')%start_index' )
+          WRITE ( 14 )  surf_v(l)%start_index
+
+          CALL wrd_write_string( 'surf_v(' // dum // ')%end_index' )
+          WRITE ( 14 )   surf_v(l)%end_index
+
+          IF ( ALLOCATED ( surf_v(l)%us ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%us' )  
+             WRITE ( 14 )  surf_v(l)%us
+          ENDIF  
+
+          IF ( ALLOCATED ( surf_v(l)%ts ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%ts' ) 
+             WRITE ( 14 )  surf_v(l)%ts
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%qs ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%qs' )  
+             WRITE ( 14 )  surf_v(l)%qs
+          ENDIF  
+
+          IF ( ALLOCATED ( surf_v(l)%ss ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%ss' ) 
+             WRITE ( 14 )  surf_v(l)%ss
+          ENDIF  
+          
+          IF ( ALLOCATED ( surf_v(l)%qcs ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%qcs' ) 
+             WRITE ( 14 )  surf_v(l)%qcs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%ncs ) )  THEN 
+             CALL wrd_write_string( 'surf_v(' // dum // ')%ncs' )
+             WRITE ( 14 )  surf_v(l)%ncs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%qrs ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%qrs' )  
+             WRITE ( 14 )  surf_v(l)%qrs
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%nrs ) )  THEN 
+             CALL wrd_write_string( 'surf_v(' // dum // ')%nrs' ) 
+             WRITE ( 14 )  surf_v(l)%nrs
+          ENDIF  
+
+          IF ( ALLOCATED ( surf_v(l)%ol ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%ol' )  
+             WRITE ( 14 )  surf_v(l)%ol
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%rib ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%rib' )
+             WRITE ( 14 )  surf_v(l)%rib
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%pt_surface ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%pt_surface' )
+             WRITE ( 14 )  surf_v(l)%pt_surface
+          ENDIF 
+          
+          IF ( ALLOCATED ( surf_v(l)%q_surface ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%q_surface' )
+             WRITE ( 14 )  surf_v(l)%q_surface
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%vpt_surface ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%vpt_surface' )
+             WRITE ( 14 )  surf_v(l)%vpt_surface
+          ENDIF 
+
+          IF ( ALLOCATED ( surf_v(l)%shf ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%shf' )  
+             WRITE ( 14 )  surf_v(l)%shf
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%qsws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%qsws' )  
+             WRITE ( 14 )  surf_v(l)%qsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%ssws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%ssws' )  
+             WRITE ( 14 )  surf_v(l)%ssws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%css ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%css' )  
+             WRITE ( 14 )  surf_v(l)%css
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%cssws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%cssws' ) 
+             WRITE ( 14 )  surf_v(l)%cssws
+          ENDIF  
+
+          IF ( ALLOCATED ( surf_v(l)%qcsws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%qcsws' ) 
+             WRITE ( 14 )  surf_v(l)%qcsws
+          ENDIF  
+
+          IF ( ALLOCATED ( surf_v(l)%ncsws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%ncsws' ) 
+             WRITE ( 14 )  surf_v(l)%ncsws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%qrsws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%qrsws' )  
+             WRITE ( 14 )  surf_v(l)%qrsws
+          ENDIF  
+
+          IF ( ALLOCATED ( surf_v(l)%nrsws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%nrsws' )  
+             WRITE ( 14 )  surf_v(l)%nrsws
+          ENDIF 
+
+          IF ( ALLOCATED ( surf_v(l)%sasws ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%sasws' ) 
+             WRITE ( 14 )  surf_v(l)%sasws
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%mom_flux_uv ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%mom_uv' )  
+             WRITE ( 14 )  surf_v(l)%mom_flux_uv
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%mom_flux_w ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%mom_w' ) 
+             WRITE ( 14 )  surf_v(l)%mom_flux_w
+          ENDIF
+
+          IF ( ALLOCATED ( surf_v(l)%mom_flux_tke ) )  THEN
+             CALL wrd_write_string( 'surf_v(' // dum // ')%mom_tke' )  
+             WRITE ( 14 )  surf_v(l)%mom_flux_tke
+          ENDIF 
+
+       ENDDO
+
+
+    END SUBROUTINE surface_wrd_local
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads surface-related restart data. Please note, restart data for a certain
+!> surface orientation (e.g. horizontal upward-facing) is stored in one 
+!> array, even if surface elements may belong to different surface types 
+!> natural or urban for example). Surface elements are redistributed into its
+!> respective surface types within this routine. This allows e.g. changing the 
+!> surface type after reading the restart data, which might be required in case 
+!> of cyclic_fill mode. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_rrd_local( ii, kk, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & 
+                                  nxr_on_file, nynf, nync, nyn_on_file, nysf,  &
+                                  nysc, nys_on_file, found )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)       ::  i           !< running index along x-direction, refers to former domain size
+       INTEGER(iwp)       ::  ic          !< running index along x-direction, refers to current domain size
+       INTEGER(iwp)       ::  j           !< running index along y-direction, refers to former domain size
+       INTEGER(iwp)       ::  jc          !< running index along y-direction, refers to former domain size
+       INTEGER(iwp)       ::  m           !< running index for surface elements, refers to gathered array encompassing all surface types
+       INTEGER(iwp)       ::  mm          !< running index for surface elements, refers to individual surface types
+       INTEGER(iwp)       ::  ii               !< running index over input files
+       INTEGER(iwp)       ::  kk               !< running index over previous input files covering current local domain
+       INTEGER(iwp)       ::  nxlc             !< index of left boundary on current subdomain
+       INTEGER(iwp)       ::  nxlf             !< index of left boundary on former subdomain 
+       INTEGER(iwp)       ::  nxl_on_file      !< index of left boundary on former local domain 
+       INTEGER(iwp)       ::  nxrc             !< index of right boundary on current subdomain
+       INTEGER(iwp)       ::  nxrf             !< index of right boundary on former subdomain
+       INTEGER(iwp)       ::  nxr_on_file      !< index of right boundary on former local domain  
+       INTEGER(iwp)       ::  nync             !< index of north boundary on current subdomain
+       INTEGER(iwp)       ::  nynf             !< index of north boundary on former subdomain
+       INTEGER(iwp)       ::  nyn_on_file      !< index of norht boundary on former local domain  
+       INTEGER(iwp)       ::  nysc             !< index of south boundary on current subdomain 
+       INTEGER(iwp)       ::  nysf             !< index of south boundary on former subdomain
+       INTEGER(iwp)       ::  nys_on_file      !< index of south boundary on former local domain  
+
+       INTEGER(iwp), SAVE  ::  l           !< index variable for surface type
+
+       LOGICAL                         ::  surf_match_def     !< flag indicating that surface element is of default type
+       LOGICAL                         ::  surf_match_lsm     !< flag indicating that surface element is of natural type
+       LOGICAL                         ::  surf_match_usm     !< flag indicating that surface element is of urban type
+
+       LOGICAL, INTENT(OUT) ::  found
+
+       LOGICAL, SAVE ::  horizontal_surface !< flag indicating horizontal surfaces
+       LOGICAL, SAVE ::  vertical_surface   !< flag indicating vertical surfaces
+
+       TYPE(surf_type), DIMENSION(0:2), SAVE ::  surf_h             !< horizontal surface type on file
+       TYPE(surf_type), DIMENSION(0:3), SAVE ::  surf_v             !< vertical surface type on file
+
+
+       found              = .TRUE.
+
+       SELECT CASE ( restart_string(1:length) )
+
+          CASE ( 'ns_h_on_file' )
+             IF ( kk == 1 )  THEN
+                READ ( 13 )  ns_h_on_file
+
+                IF ( ALLOCATED( surf_h(0)%start_index ) )                      &
+                   CALL deallocate_surface_attributes_h( surf_h(0) )           
+                IF ( ALLOCATED( surf_h(1)%start_index ) )                      &
+                   CALL deallocate_surface_attributes_h( surf_h(1) )           
+                IF ( ALLOCATED( surf_h(2)%start_index ) )                      &
+                   CALL deallocate_surface_attributes_h_top( surf_h(2) )       
+
+!--             Allocate memory for number of surface elements on file. 
+!--             Please note, these number is not necessarily the same as 
+!--             the final number of surface elements on local domain,
+!--             which is the case if processor topology changes during
+!--             restart runs.  
+!--             Horizontal upward facing
+                surf_h(0)%ns = ns_h_on_file(0)
+                CALL allocate_surface_attributes_h( surf_h(0),                 &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file, nxr_on_file )
+
+!--             Horizontal downward facing
+                surf_h(1)%ns = ns_h_on_file(1)
+                CALL allocate_surface_attributes_h( surf_h(1),                 &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file, nxr_on_file )
+
+!--             Model top
+                surf_h(2)%ns = ns_h_on_file(2)
+                CALL allocate_surface_attributes_h_top( surf_h(2),             &
+                                            nys_on_file, nyn_on_file,          &
+                                            nxl_on_file, nxr_on_file )
+
+!
+!--             Initial setting of flags for horizontal and vertical surfaces,
+!--             will be set after start- and end-indices are read. 
+                horizontal_surface = .FALSE.
+                vertical_surface   = .FALSE.
+
+             ENDIF   
+
+          CASE ( 'ns_v_on_file' )
+             IF ( kk == 1 ) THEN
+                READ ( 13 )  ns_v_on_file
+
+                DO  l = 0, 3
+                   IF ( ALLOCATED( surf_v(l)%start_index ) )                   &
+                      CALL deallocate_surface_attributes_v( surf_v(l) )
+                ENDDO
+
+!--                Vertical surfaces
+                DO  l = 0, 3
+                   surf_v(l)%ns = ns_v_on_file(l)
+                   CALL allocate_surface_attributes_v( surf_v(l),              &
+                                           nys_on_file, nyn_on_file,           &
+                                           nxl_on_file, nxr_on_file )
+               ENDDO
+
+             ENDIF
+
+          CASE ( 'surf_h(0)%start_index' )
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_h(0)%start_index
+             l = 0
+          CASE ( 'surf_h(0)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_h(0)%end_index
+             horizontal_surface = .TRUE.
+             vertical_surface   = .FALSE.
+          CASE ( 'surf_h(0)%us' )         
+             IF ( ALLOCATED( surf_h(0)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(0)%us
+          CASE ( 'surf_h(0)%ts' )         
+             IF ( ALLOCATED( surf_h(0)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(0)%ts
+          CASE ( 'surf_h(0)%qs' )         
+             IF ( ALLOCATED( surf_h(0)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(0)%qs
+          CASE ( 'surf_h(0)%ss' )         
+             IF ( ALLOCATED( surf_h(0)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(0)%ss
+          CASE ( 'surf_h(0)%qcs' )         
+             IF ( ALLOCATED( surf_h(0)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%qcs
+          CASE ( 'surf_h(0)%ncs' )         
+             IF ( ALLOCATED( surf_h(0)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%ncs
+          CASE ( 'surf_h(0)%qrs' )         
+             IF ( ALLOCATED( surf_h(0)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%qrs
+          CASE ( 'surf_h(0)%nrs' )         
+             IF ( ALLOCATED( surf_h(0)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%nrs
+          CASE ( 'surf_h(0)%ol' )         
+             IF ( ALLOCATED( surf_h(0)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(0)%ol
+          CASE ( 'surf_h(0)%rib' )         
+             IF ( ALLOCATED( surf_h(0)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%rib
+          CASE ( 'surf_h(0)%pt_surface' )         
+             IF ( ALLOCATED( surf_h(0)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_h(0)%pt_surface
+          CASE ( 'surf_h(0)%q_surface' )         
+             IF ( ALLOCATED( surf_h(0)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_h(0)%q_surface
+          CASE ( 'surf_h(0)%vpt_surface' )         
+             IF ( ALLOCATED( surf_h(0)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_h(0)%vpt_surface
+          CASE ( 'surf_h(0)%usws' )         
+             IF ( ALLOCATED( surf_h(0)%usws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(0)%usws
+          CASE ( 'surf_h(0)%vsws' )         
+             IF ( ALLOCATED( surf_h(0)%vsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(0)%vsws
+          CASE ( 'surf_h(0)%shf' )         
+             IF ( ALLOCATED( surf_h(0)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%shf
+          CASE ( 'surf_h(0)%qsws' )         
+             IF ( ALLOCATED( surf_h(0)%qsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(0)%qsws
+          CASE ( 'surf_h(0)%ssws' )         
+             IF ( ALLOCATED( surf_h(0)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(0)%ssws
+          CASE ( 'surf_h(0)%css' )
+             IF ( ALLOCATED( surf_h(0)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(0)%css
+          CASE ( 'surf_h(0)%cssws' )         
+             IF ( ALLOCATED( surf_h(0)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(0)%cssws
+          CASE ( 'surf_h(0)%qcsws' )         
+             IF ( ALLOCATED( surf_h(0)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(0)%qcsws
+          CASE ( 'surf_h(0)%ncsws' )         
+             IF ( ALLOCATED( surf_h(0)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(0)%ncsws
+          CASE ( 'surf_h(0)%qrsws' )         
+             IF ( ALLOCATED( surf_h(0)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(0)%qrsws
+          CASE ( 'surf_h(0)%nrsws' )         
+             IF ( ALLOCATED( surf_h(0)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(0)%nrsws
+          CASE ( 'surf_h(0)%sasws' )         
+             IF ( ALLOCATED( surf_h(0)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(0)%sasws
+
+          CASE ( 'surf_h(1)%start_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_h(1)%start_index
+             l = 1
+          CASE ( 'surf_h(1)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_h(1)%end_index
+          CASE ( 'surf_h(1)%us' )         
+             IF ( ALLOCATED( surf_h(1)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(1)%us
+          CASE ( 'surf_h(1)%ts' )         
+             IF ( ALLOCATED( surf_h(1)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(1)%ts
+          CASE ( 'surf_h(1)%qs' )         
+             IF ( ALLOCATED( surf_h(1)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(1)%qs
+          CASE ( 'surf_h(1)%ss' )         
+             IF ( ALLOCATED( surf_h(1)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(1)%ss
+          CASE ( 'surf_h(1)%qcs' )         
+             IF ( ALLOCATED( surf_h(1)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%qcs
+          CASE ( 'surf_h(1)%ncs' )         
+             IF ( ALLOCATED( surf_h(1)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%ncs
+          CASE ( 'surf_h(1)%qrs' )         
+             IF ( ALLOCATED( surf_h(1)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%qrs
+          CASE ( 'surf_h(1)%nrs' )         
+             IF ( ALLOCATED( surf_h(1)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%nrs
+          CASE ( 'surf_h(1)%ol' )         
+             IF ( ALLOCATED( surf_h(1)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(1)%ol
+          CASE ( 'surf_h(1)%rib' )         
+             IF ( ALLOCATED( surf_h(1)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%rib
+          CASE ( 'surf_h(1)%pt_surface' )         
+             IF ( ALLOCATED( surf_h(1)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_h(1)%pt_surface
+          CASE ( 'surf_h(1)%q_surface' )         
+             IF ( ALLOCATED( surf_h(1)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_h(1)%q_surface
+          CASE ( 'surf_h(1)%vpt_surface' )         
+             IF ( ALLOCATED( surf_h(1)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_h(1)%vpt_surface
+          CASE ( 'surf_h(1)%usws' )         
+             IF ( ALLOCATED( surf_h(1)%usws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(1)%usws
+          CASE ( 'surf_h(1)%vsws' )         
+             IF ( ALLOCATED( surf_h(1)%vsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(1)%vsws
+          CASE ( 'surf_h(1)%shf' )         
+             IF ( ALLOCATED( surf_h(1)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%shf
+          CASE ( 'surf_h(1)%qsws' )         
+             IF ( ALLOCATED( surf_h(1)%qsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(1)%qsws
+          CASE ( 'surf_h(1)%ssws' )         
+             IF ( ALLOCATED( surf_h(1)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(1)%ssws
+          CASE ( 'surf_h(1)%css' )
+             IF ( ALLOCATED( surf_h(1)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(1)%css
+          CASE ( 'surf_h(1)%cssws' )         
+             IF ( ALLOCATED( surf_h(1)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(1)%cssws
+          CASE ( 'surf_h(1)%qcsws' )         
+             IF ( ALLOCATED( surf_h(1)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(1)%qcsws
+          CASE ( 'surf_h(1)%ncsws' )         
+             IF ( ALLOCATED( surf_h(1)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(1)%ncsws
+          CASE ( 'surf_h(1)%qrsws' )         
+             IF ( ALLOCATED( surf_h(1)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(1)%qrsws
+          CASE ( 'surf_h(1)%nrsws' )         
+             IF ( ALLOCATED( surf_h(1)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(1)%nrsws
+          CASE ( 'surf_h(1)%sasws' )         
+             IF ( ALLOCATED( surf_h(1)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(1)%sasws
+
+          CASE ( 'surf_h(2)%start_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_h(2)%start_index
+             l = 2
+          CASE ( 'surf_h(2)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_h(2)%end_index
+          CASE ( 'surf_h(2)%us' )         
+             IF ( ALLOCATED( surf_h(2)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(2)%us
+          CASE ( 'surf_h(2)%ts' )         
+             IF ( ALLOCATED( surf_h(2)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(2)%ts
+          CASE ( 'surf_h(2)%qs' )        
+             IF ( ALLOCATED( surf_h(2)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(2)%qs
+          CASE ( 'surf_h(2)%ss' )         
+             IF ( ALLOCATED( surf_h(2)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(2)%ss
+          CASE ( 'surf_h(2)%qcs' )         
+             IF ( ALLOCATED( surf_h(2)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%qcs
+          CASE ( 'surf_h(2)%ncs' )         
+             IF ( ALLOCATED( surf_h(2)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%ncs
+          CASE ( 'surf_h(2)%qrs' )         
+             IF ( ALLOCATED( surf_h(2)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%qrs
+          CASE ( 'surf_h(2)%nrs' )         
+             IF ( ALLOCATED( surf_h(2)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%nrs
+          CASE ( 'surf_h(2)%ol' )         
+             IF ( ALLOCATED( surf_h(2)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_h(2)%ol
+          CASE ( 'surf_h(2)%rib' )         
+             IF ( ALLOCATED( surf_h(2)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%rib
+          CASE ( 'surf_h(2)%pt_surface' )         
+             IF ( ALLOCATED( surf_h(2)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_h(2)%pt_surface
+          CASE ( 'surf_h(2)%q_surface' )         
+             IF ( ALLOCATED( surf_h(2)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_h(2)%q_surface
+          CASE ( 'surf_h(2)%vpt_surface' )         
+             IF ( ALLOCATED( surf_h(2)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_h(2)%vpt_surface
+          CASE ( 'surf_h(2)%usws' )         
+             IF ( ALLOCATED( surf_h(2)%usws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(2)%usws
+          CASE ( 'surf_h(2)%vsws' )         
+             IF ( ALLOCATED( surf_h(2)%vsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(2)%vsws
+          CASE ( 'surf_h(2)%shf' )         
+             IF ( ALLOCATED( surf_h(2)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%shf
+          CASE ( 'surf_h(2)%qsws' )         
+             IF ( ALLOCATED( surf_h(2)%qsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(2)%qsws
+          CASE ( 'surf_h(2)%ssws' )         
+             IF ( ALLOCATED( surf_h(2)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_h(2)%ssws
+          CASE ( 'surf_h(2)%css' )
+             IF ( ALLOCATED( surf_h(2)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_h(2)%css
+          CASE ( 'surf_h(2)%cssws' )         
+             IF ( ALLOCATED( surf_h(2)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(2)%cssws
+          CASE ( 'surf_h(2)%qcsws' )         
+             IF ( ALLOCATED( surf_h(2)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(2)%qcsws
+          CASE ( 'surf_h(2)%ncsws' )         
+             IF ( ALLOCATED( surf_h(2)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(2)%ncsws
+          CASE ( 'surf_h(2)%qrsws' )         
+             IF ( ALLOCATED( surf_h(2)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(2)%qrsws
+          CASE ( 'surf_h(2)%nrsws' )         
+             IF ( ALLOCATED( surf_h(2)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(2)%nrsws
+          CASE ( 'surf_h(2)%sasws' )         
+             IF ( ALLOCATED( surf_h(2)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_h(2)%sasws
+
+          CASE ( 'surf_v(0)%start_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(0)%start_index
+             l = 0
+             horizontal_surface = .FALSE.
+             vertical_surface   = .TRUE.
+          CASE ( 'surf_v(0)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(0)%end_index
+          CASE ( 'surf_v(0)%us' )         
+             IF ( ALLOCATED( surf_v(0)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(0)%us
+          CASE ( 'surf_v(0)%ts' )         
+             IF ( ALLOCATED( surf_v(0)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(0)%ts
+          CASE ( 'surf_v(0)%qs' )         
+             IF ( ALLOCATED( surf_v(0)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(0)%qs
+          CASE ( 'surf_v(0)%ss' )         
+             IF ( ALLOCATED( surf_v(0)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(0)%ss
+          CASE ( 'surf_v(0)%qcs' )         
+             IF ( ALLOCATED( surf_v(0)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%qcs
+          CASE ( 'surf_v(0)%ncs' )         
+             IF ( ALLOCATED( surf_v(0)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%ncs
+          CASE ( 'surf_v(0)%qrs' )         
+             IF ( ALLOCATED( surf_v(0)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%qrs
+          CASE ( 'surf_v(0)%nrs' )         
+             IF ( ALLOCATED( surf_v(0)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%nrs
+          CASE ( 'surf_v(0)%ol' )         
+             IF ( ALLOCATED( surf_v(0)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(0)%ol
+          CASE ( 'surf_v(0)%rib' )         
+             IF ( ALLOCATED( surf_v(0)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%rib
+          CASE ( 'surf_v(0)%pt_surface' )         
+             IF ( ALLOCATED( surf_v(0)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(0)%pt_surface
+          CASE ( 'surf_v(0)%q_surface' )         
+             IF ( ALLOCATED( surf_v(0)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_v(0)%q_surface
+          CASE ( 'surf_v(0)%vpt_surface' )         
+             IF ( ALLOCATED( surf_v(0)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(0)%vpt_surface
+          CASE ( 'surf_v(0)%shf' )         
+             IF ( ALLOCATED( surf_v(0)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%shf
+          CASE ( 'surf_v(0)%qsws' )         
+             IF ( ALLOCATED( surf_v(0)%qsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(0)%qsws
+          CASE ( 'surf_v(0)%ssws' )         
+             IF ( ALLOCATED( surf_v(0)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(0)%ssws
+          CASE ( 'surf_v(0)%css' ) 
+             IF ( ALLOCATED( surf_v(0)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(0)%css
+          CASE ( 'surf_v(0)%cssws' )         
+             IF ( ALLOCATED( surf_v(0)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(0)%cssws
+          CASE ( 'surf_v(0)%qcsws' )         
+             IF ( ALLOCATED( surf_v(0)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(0)%qcsws
+          CASE ( 'surf_v(0)%ncsws' )         
+             IF ( ALLOCATED( surf_v(0)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(0)%ncsws
+          CASE ( 'surf_v(0)%qrsws' )         
+             IF ( ALLOCATED( surf_v(0)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(0)%qrsws
+          CASE ( 'surf_v(0)%nrsws' )         
+             IF ( ALLOCATED( surf_v(0)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(0)%nrsws
+          CASE ( 'surf_v(0)%sasws' )         
+             IF ( ALLOCATED( surf_v(0)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(0)%sasws
+          CASE ( 'surf_v(0)%mom_uv' )         
+             IF ( ALLOCATED( surf_v(0)%mom_flux_uv )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(0)%mom_flux_uv
+          CASE ( 'surf_v(0)%mom_w' )         
+             IF ( ALLOCATED( surf_v(0)%mom_flux_w )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(0)%mom_flux_w
+          CASE ( 'surf_v(0)%mom_tke' )         
+             IF ( ALLOCATED( surf_v(0)%mom_flux_tke )  .AND.  kk == 1 )        &
+                READ ( 13 )  surf_v(0)%mom_flux_tke
+
+          CASE ( 'surf_v(1)%start_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(1)%start_index
+             l = 1
+          CASE ( 'surf_v(1)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(1)%end_index
+          CASE ( 'surf_v(1)%us' )         
+             IF ( ALLOCATED( surf_v(1)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(1)%us
+          CASE ( 'surf_v(1)%ts' )         
+             IF ( ALLOCATED( surf_v(1)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(1)%ts
+          CASE ( 'surf_v(1)%qs' )         
+             IF ( ALLOCATED( surf_v(1)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(1)%qs
+          CASE ( 'surf_v(1)%ss' )         
+             IF ( ALLOCATED( surf_v(1)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(1)%ss
+          CASE ( 'surf_v(1)%qcs' )         
+             IF ( ALLOCATED( surf_v(1)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%qcs
+          CASE ( 'surf_v(1)%ncs' )         
+             IF ( ALLOCATED( surf_v(1)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%ncs
+          CASE ( 'surf_v(1)%qrs' )         
+             IF ( ALLOCATED( surf_v(1)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%qrs
+          CASE ( 'surf_v(1)%nrs' )         
+             IF ( ALLOCATED( surf_v(1)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%nrs
+          CASE ( 'surf_v(1)%ol' )         
+             IF ( ALLOCATED( surf_v(1)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(1)%ol
+          CASE ( 'surf_v(1)%rib' )         
+             IF ( ALLOCATED( surf_v(1)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%rib
+          CASE ( 'surf_v(1)%pt_surface' )         
+             IF ( ALLOCATED( surf_v(1)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(1)%pt_surface
+          CASE ( 'surf_v(1)%q_surface' )         
+             IF ( ALLOCATED( surf_v(1)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_v(1)%q_surface
+          CASE ( 'surf_v(1)%vpt_surface' )         
+             IF ( ALLOCATED( surf_v(1)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(1)%vpt_surface
+          CASE ( 'surf_v(1)%shf' )         
+             IF ( ALLOCATED( surf_v(1)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%shf
+          CASE ( 'surf_v(1)%qsws' )         
+             IF ( ALLOCATED( surf_v(1)%qsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(1)%qsws
+          CASE ( 'surf_v(1)%ssws' )         
+             IF ( ALLOCATED( surf_v(1)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(1)%ssws
+          CASE ( 'surf_v(1)%css' ) 
+             IF ( ALLOCATED( surf_v(1)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(1)%css
+          CASE ( 'surf_v(1)%cssws' )         
+             IF ( ALLOCATED( surf_v(1)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(1)%cssws
+          CASE ( 'surf_v(1)%qcsws' )         
+             IF ( ALLOCATED( surf_v(1)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(1)%qcsws
+          CASE ( 'surf_v(1)%ncsws' )         
+             IF ( ALLOCATED( surf_v(1)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(1)%ncsws
+          CASE ( 'surf_v(1)%qrsws' )         
+             IF ( ALLOCATED( surf_v(1)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(1)%qrsws
+          CASE ( 'surf_v(1)%nrsws' )         
+             IF ( ALLOCATED( surf_v(1)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(1)%nrsws
+          CASE ( 'surf_v(1)%sasws' )         
+             IF ( ALLOCATED( surf_v(1)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(1)%sasws
+          CASE ( 'surf_v(1)%mom_uv' )         
+             IF ( ALLOCATED( surf_v(1)%mom_flux_uv )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(1)%mom_flux_uv
+          CASE ( 'surf_v(1)%mom_w' )         
+             IF ( ALLOCATED( surf_v(1)%mom_flux_w )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(1)%mom_flux_w
+          CASE ( 'surf_v(1)%mom_tke' )         
+             IF ( ALLOCATED( surf_v(1)%mom_flux_tke )  .AND.  kk == 1 )        &
+                READ ( 13 )  surf_v(1)%mom_flux_tke
+
+          CASE ( 'surf_v(2)%start_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(2)%start_index
+             l = 2
+          CASE ( 'surf_v(2)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(2)%end_index
+          CASE ( 'surf_v(2)%us' )         
+             IF ( ALLOCATED( surf_v(2)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(2)%us
+          CASE ( 'surf_v(2)%ts' )         
+             IF ( ALLOCATED( surf_v(2)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(2)%ts
+          CASE ( 'surf_v(2)%qs' )         
+             IF ( ALLOCATED( surf_v(2)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(2)%qs
+          CASE ( 'surf_v(2)%ss' )         
+             IF ( ALLOCATED( surf_v(2)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(2)%ss
+          CASE ( 'surf_v(2)%qcs' )         
+             IF ( ALLOCATED( surf_v(2)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%qcs
+          CASE ( 'surf_v(2)%ncs' )         
+             IF ( ALLOCATED( surf_v(2)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%ncs
+          CASE ( 'surf_v(2)%qrs' )         
+             IF ( ALLOCATED( surf_v(2)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%qrs
+          CASE ( 'surf_v(2)%nrs' )         
+             IF ( ALLOCATED( surf_v(2)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%nrs
+          CASE ( 'surf_v(2)%ol' )         
+             IF ( ALLOCATED( surf_v(2)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(2)%ol
+          CASE ( 'surf_v(2)%rib' )         
+             IF ( ALLOCATED( surf_v(2)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%rib
+          CASE ( 'surf_v(2)%pt_surface' )         
+             IF ( ALLOCATED( surf_v(2)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(2)%pt_surface
+          CASE ( 'surf_v(2)%q_surface' )         
+             IF ( ALLOCATED( surf_v(2)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_v(2)%q_surface
+          CASE ( 'surf_v(2)%vpt_surface' )         
+             IF ( ALLOCATED( surf_v(2)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(2)%vpt_surface
+          CASE ( 'surf_v(2)%shf' )         
+             IF ( ALLOCATED( surf_v(2)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%shf
+          CASE ( 'surf_v(2)%qsws' )         
+             IF ( ALLOCATED( surf_v(2)%qsws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(2)%qsws
+          CASE ( 'surf_v(2)%ssws' )         
+             IF ( ALLOCATED( surf_v(2)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(2)%ssws
+          CASE ( 'surf_v(2)%css' ) 
+             IF ( ALLOCATED( surf_v(2)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(2)%css
+          CASE ( 'surf_v(2)%cssws' )         
+             IF ( ALLOCATED( surf_v(2)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(2)%cssws
+          CASE ( 'surf_v(2)%qcsws' )         
+             IF ( ALLOCATED( surf_v(2)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(2)%qcsws
+          CASE ( 'surf_v(2)%ncsws' )         
+             IF ( ALLOCATED( surf_v(2)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(2)%ncsws
+          CASE ( 'surf_v(2)%qrsws' )         
+             IF ( ALLOCATED( surf_v(2)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(2)%qrsws
+          CASE ( 'surf_v(2)%nrsws' )         
+             IF ( ALLOCATED( surf_v(2)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(2)%nrsws
+          CASE ( 'surf_v(2)%sasws' )         
+             IF ( ALLOCATED( surf_v(2)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(2)%sasws
+          CASE ( 'surf_v(2)%mom_uv' )         
+             IF ( ALLOCATED( surf_v(2)%mom_flux_uv )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(2)%mom_flux_uv
+          CASE ( 'surf_v(2)%mom_w' )         
+             IF ( ALLOCATED( surf_v(2)%mom_flux_w )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(2)%mom_flux_w
+          CASE ( 'surf_v(2)%mom_tke' )         
+             IF ( ALLOCATED( surf_v(2)%mom_flux_tke )  .AND.  kk == 1 )        &
+                READ ( 13 )  surf_v(2)%mom_flux_tke
+
+          CASE ( 'surf_v(3)%start_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(3)%start_index
+             l = 3
+          CASE ( 'surf_v(3)%end_index' )   
+             IF ( kk == 1 )                                                    &
+                READ ( 13 )  surf_v(3)%end_index
+          CASE ( 'surf_v(3)%us' )         
+             IF ( ALLOCATED( surf_v(3)%us )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(3)%us
+          CASE ( 'surf_v(3)%ts' )         
+             IF ( ALLOCATED( surf_v(3)%ts )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(3)%ts
+          CASE ( 'surf_v(3)%qs' )        
+             IF ( ALLOCATED( surf_v(3)%qs )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(3)%qs
+          CASE ( 'surf_v(3)%ss' )         
+             IF ( ALLOCATED( surf_v(3)%ss )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(3)%ss
+          CASE ( 'surf_v(3)%qcs' )         
+             IF ( ALLOCATED( surf_v(3)%qcs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%qcs
+          CASE ( 'surf_v(3)%ncs' )         
+             IF ( ALLOCATED( surf_v(3)%ncs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%ncs
+          CASE ( 'surf_v(3)%qrs' )         
+             IF ( ALLOCATED( surf_v(3)%qrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%qrs
+          CASE ( 'surf_v(3)%nrs' )         
+             IF ( ALLOCATED( surf_v(3)%nrs )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%nrs
+          CASE ( 'surf_v(3)%ol' )         
+             IF ( ALLOCATED( surf_v(3)%ol )  .AND.  kk == 1 )                  &
+                READ ( 13 )  surf_v(3)%ol
+          CASE ( 'surf_v(3)%rib' )         
+             IF ( ALLOCATED( surf_v(3)%rib )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%rib
+          CASE ( 'surf_v(3)%pt_surface' )         
+             IF ( ALLOCATED( surf_v(3)%pt_surface )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(3)%pt_surface
+          CASE ( 'surf_v(3)%q_surface' )         
+             IF ( ALLOCATED( surf_v(3)%q_surface )  .AND.  kk == 1 )           &
+                READ ( 13 )  surf_v(3)%q_surface
+          CASE ( 'surf_v(3)%vpt_surface' )         
+             IF ( ALLOCATED( surf_v(3)%vpt_surface )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(3)%vpt_surface
+          CASE ( 'surf_v(3)%shf' )         
+             IF ( ALLOCATED( surf_v(3)%shf )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%shf
+          CASE ( 'surf_v(3)%qsws' )         
+             IF ( ALLOCATED( surf_v(3)%qsws )  .AND.  kk == 1 )                & 
+                READ ( 13 )  surf_v(3)%qsws
+          CASE ( 'surf_v(3)%ssws' )         
+             IF ( ALLOCATED( surf_v(3)%ssws )  .AND.  kk == 1 )                &
+                READ ( 13 )  surf_v(3)%ssws
+          CASE ( 'surf_v(3)%css' ) 
+             IF ( ALLOCATED( surf_v(3)%css )  .AND.  kk == 1 )                 &
+                READ ( 13 )  surf_v(3)%css
+          CASE ( 'surf_v(3)%cssws' )         
+             IF ( ALLOCATED( surf_v(3)%cssws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(3)%cssws
+          CASE ( 'surf_v(3)%qcsws' )         
+             IF ( ALLOCATED( surf_v(3)%qcsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(3)%qcsws
+          CASE ( 'surf_v(3)%ncsws' )         
+             IF ( ALLOCATED( surf_v(3)%ncsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(3)%ncsws
+          CASE ( 'surf_v(3)%qrsws' )         
+             IF ( ALLOCATED( surf_v(3)%qrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(3)%qrsws
+          CASE ( 'surf_v(3)%nrsws' )         
+             IF ( ALLOCATED( surf_v(3)%nrsws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(3)%nrsws
+          CASE ( 'surf_v(3)%sasws' )         
+             IF ( ALLOCATED( surf_v(3)%sasws )  .AND.  kk == 1 )               &
+                READ ( 13 )  surf_v(3)%sasws
+          CASE ( 'surf_v(3)%mom_uv' )         
+             IF ( ALLOCATED( surf_v(3)%mom_flux_uv )  .AND.  kk == 1 )         &
+                READ ( 13 )  surf_v(3)%mom_flux_uv
+          CASE ( 'surf_v(3)%mom_w' )         
+             IF ( ALLOCATED( surf_v(3)%mom_flux_w )  .AND.  kk == 1 )          &
+                READ ( 13 )  surf_v(3)%mom_flux_w
+          CASE ( 'surf_v(3)%mom_tke' )         
+             IF ( ALLOCATED( surf_v(3)%mom_flux_tke )  .AND.  kk == 1 )        &
+                READ ( 13 )  surf_v(3)%mom_flux_tke
+
+          CASE DEFAULT
+
+                found = .FALSE.
+
+       END SELECT
+!
+!--    Redistribute surface elements on its respective type. 
+       IF ( horizontal_surface  .AND.                                          &
+            .NOT. INDEX( restart_string(1:length), '%start_index' ) /= 0 )     &
+       THEN
+       
+          ic = nxlc
+          DO  i = nxlf, nxrf
+             jc = nysc
+             DO  j = nysf, nynf
+
+                surf_match_def  = surf_def_h(l)%end_index(jc,ic) >=            &
+                                  surf_def_h(l)%start_index(jc,ic)
+                surf_match_lsm  = ( surf_lsm_h%end_index(jc,ic)  >=            &
+                                    surf_lsm_h%start_index(jc,ic) )            &
+                            .AND.  l == 0 
+                surf_match_usm  = ( surf_usm_h%end_index(jc,ic)  >=            &
+                                    surf_usm_h%start_index(jc,ic) )            &
+                            .AND.  l == 0 
+                           
+                IF ( surf_match_def )  THEN
+                   mm = surf_def_h(l)%start_index(jc,ic)
+                   DO  m = surf_h(l)%start_index(j,i),                         &
+                           surf_h(l)%end_index(j,i)
+                      IF ( surf_def_h(l)%end_index(jc,ic) >= mm )              &
+                         CALL restore_surface_elements( surf_def_h(l),         &
+                                                        mm, surf_h(l), m )
+                      mm = mm + 1
+                   ENDDO
+                ENDIF
+
+                IF ( surf_match_lsm )  THEN
+                   mm = surf_lsm_h%start_index(jc,ic)
+                   DO  m = surf_h(l)%start_index(j,i),                         &
+                           surf_h(l)%end_index(j,i)
+                      IF ( surf_lsm_h%end_index(jc,ic) >= mm )                 &
+                         CALL restore_surface_elements( surf_lsm_h,            &
+                                                        mm, surf_h(l), m )
+                      mm = mm + 1
+                   ENDDO
+                ENDIF
+
+                IF ( surf_match_usm )  THEN
+                   mm = surf_usm_h%start_index(jc,ic)
+                   DO  m = surf_h(l)%start_index(j,i),                         &
+                           surf_h(l)%end_index(j,i)
+                      IF ( surf_usm_h%end_index(jc,ic) >= mm )                 &
+                         CALL restore_surface_elements( surf_usm_h,            &
+                                                        mm, surf_h(l), m )
+                      mm = mm + 1
+                   ENDDO
+                ENDIF
+
+                jc = jc + 1
+             ENDDO
+             ic = ic + 1
+          ENDDO
+       ELSEIF ( vertical_surface  .AND.                                        &
+            .NOT. INDEX( restart_string(1:length), '%start_index' ) /= 0 )     &
+       THEN
+          ic = nxlc
+          DO  i = nxlf, nxrf
+             jc = nysc
+             DO  j = nysf, nynf
+
+                surf_match_def  = surf_def_v(l)%end_index(jc,ic) >=            &
+                                  surf_def_v(l)%start_index(jc,ic)
+                surf_match_lsm  = surf_lsm_v(l)%end_index(jc,ic) >=            &
+                                  surf_lsm_v(l)%start_index(jc,ic)
+                surf_match_usm  = surf_usm_v(l)%end_index(jc,ic) >=            &
+                                  surf_usm_v(l)%start_index(jc,ic)
+                                  
+                IF ( surf_match_def )  THEN
+                   mm = surf_def_v(l)%start_index(jc,ic)
+                   DO  m = surf_v(l)%start_index(j,i),                         &
+                           surf_v(l)%end_index(j,i)
+                      IF ( surf_def_v(l)%end_index(jc,ic) >= mm )              &
+                         CALL restore_surface_elements( surf_def_v(l),         &
+                                                        mm, surf_v(l), m )
+                      mm = mm + 1
+                   ENDDO
+                ENDIF
+
+                IF ( surf_match_lsm )  THEN
+                   mm = surf_lsm_v(l)%start_index(jc,ic)
+                   DO  m = surf_v(l)%start_index(j,i),                         &
+                           surf_v(l)%end_index(j,i)
+                      IF ( surf_lsm_v(l)%end_index(jc,ic) >= mm )              &
+                         CALL restore_surface_elements( surf_lsm_v(l),         &
+                                                        mm, surf_v(l), m )
+                      mm = mm + 1
+                   ENDDO
+                ENDIF
+
+                IF ( surf_match_usm )  THEN
+                   mm = surf_usm_v(l)%start_index(jc,ic)
+                   DO  m = surf_v(l)%start_index(j,i),                         &
+                           surf_v(l)%end_index(j,i)
+                      IF ( surf_usm_v(l)%end_index(jc,ic) >= mm )              &
+                         CALL restore_surface_elements( surf_usm_v(l),         &
+                                                        mm, surf_v(l), m )
+                      mm = mm + 1
+                   ENDDO
+                ENDIF
+
+                jc = jc + 1
+             ENDDO
+             ic = ic + 1
+          ENDDO
+       ENDIF
+
+
+    CONTAINS
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Restores surfacle elements back on its respective type.
+!------------------------------------------------------------------------------!
+          SUBROUTINE restore_surface_elements( surf_target, m_target,          &
+                                               surf_file,   m_file )
+
+             IMPLICIT NONE
+
+             INTEGER(iwp)      ::  m_file      !< respective surface-element index of current surface array 
+             INTEGER(iwp)      ::  m_target    !< respecitve surface-element index of surface array on file
+             INTEGER(iwp)      ::  lsp         !< running index chemical species
+
+             TYPE( surf_type ) ::  surf_target !< target surface type
+             TYPE( surf_type ) ::  surf_file   !< surface type on file
+
+
+             IF ( INDEX( restart_string(1:length), '%us' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%us )  .AND.                        &
+                     ALLOCATED( surf_file%us   ) )                             & 
+                   surf_target%us(m_target) = surf_file%us(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%ol' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%ol )  .AND.                        &
+                     ALLOCATED( surf_file%ol   ) )                             & 
+                   surf_target%ol(m_target) = surf_file%ol(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%pt_surface' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%pt_surface )  .AND.                &
+                     ALLOCATED( surf_file%pt_surface   ) )                     & 
+                   surf_target%pt_surface(m_target) = surf_file%pt_surface(m_file)
+             ENDIF
+             
+             IF ( INDEX( restart_string(1:length), '%q_surface' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%q_surface )  .AND.                 &
+                     ALLOCATED( surf_file%q_surface   ) )                      & 
+                   surf_target%q_surface(m_target) = surf_file%q_surface(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%vpt_surface' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%vpt_surface )  .AND.               &
+                     ALLOCATED( surf_file%vpt_surface   ) )                    & 
+                   surf_target%vpt_surface(m_target) = surf_file%vpt_surface(m_file)
+             ENDIF
+             
+             IF ( INDEX( restart_string(1:length), '%usws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%usws )  .AND.                      &
+                     ALLOCATED( surf_file%usws   ) )                           & 
+                   surf_target%usws(m_target) = surf_file%usws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%vsws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%vsws )  .AND.                      &
+                     ALLOCATED( surf_file%vsws   ) )                           & 
+                   surf_target%vsws(m_target) = surf_file%vsws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%ts' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%ts )  .AND.                        &
+                     ALLOCATED( surf_file%ts   ) )                             & 
+                   surf_target%ts(m_target) = surf_file%ts(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%shf' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%shf )  .AND.                       &
+                     ALLOCATED( surf_file%shf   ) )                            & 
+                   surf_target%shf(m_target) = surf_file%shf(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%qs' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%qs )  .AND.                        &
+                     ALLOCATED( surf_file%qs   ) )                             & 
+                   surf_target%qs(m_target) = surf_file%qs(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%qsws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%qsws )  .AND.                      &
+                     ALLOCATED( surf_file%qsws   ) )                           & 
+                   surf_target%qsws(m_target) = surf_file%qsws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%ss' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%ss )  .AND.                        &
+                     ALLOCATED( surf_file%ss   ) )                             & 
+                   surf_target%ss(m_target) = surf_file%ss(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%ssws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%ssws )  .AND.                      &
+                     ALLOCATED( surf_file%ssws   ) )                           & 
+                   surf_target%ssws(m_target) = surf_file%ssws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%css' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%css )  .AND.                     &
+                     ALLOCATED( surf_file%css   ) )  THEN                  
+                   DO  lsp = 1, nvar
+                      surf_target%css(lsp,m_target) = surf_file%css(lsp,m_file)
+                   ENDDO
+                ENDIF
+             ENDIF
+             IF ( INDEX( restart_string(1:length), '%cssws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%cssws )  .AND.                     &
+                     ALLOCATED( surf_file%cssws   ) )  THEN                  
+                   DO  lsp = 1, nvar
+                      surf_target%cssws(lsp,m_target) = surf_file%cssws(lsp,m_file)
+                   ENDDO
+                ENDIF
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%qcs' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%qcs )  .AND.                       &
+                     ALLOCATED( surf_file%qcs   ) )                            & 
+                  surf_target%qcs(m_target) = surf_file%qcs(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%qcsws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%qcsws )  .AND.                     &
+                     ALLOCATED( surf_file%qcsws   ) )                          & 
+                   surf_target%qcsws(m_target) = surf_file%qcsws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%ncs' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%ncs )  .AND.                       &
+                     ALLOCATED( surf_file%ncs   ) )                            & 
+                   surf_target%ncs(m_target) = surf_file%ncs(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%ncsws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%ncsws )  .AND.                     &
+                     ALLOCATED( surf_file%ncsws   ) )                          & 
+                   surf_target%ncsws(m_target) = surf_file%ncsws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%qrs' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%qrs )  .AND.                       &
+                     ALLOCATED( surf_file%qrs   ) )                            & 
+                  surf_target%qrs(m_target) = surf_file%qrs(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%qrsws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%qrsws )  .AND.                     &
+                     ALLOCATED( surf_file%qrsws   ) )                          & 
+                   surf_target%qrsws(m_target) = surf_file%qrsws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%nrs' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%nrs )  .AND.                       &
+                     ALLOCATED( surf_file%nrs   ) )                            & 
+                   surf_target%nrs(m_target) = surf_file%nrs(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%nrsws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%nrsws )  .AND.                     &
+                     ALLOCATED( surf_file%nrsws   ) )                          & 
+                   surf_target%nrsws(m_target) = surf_file%nrsws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%sasws' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%sasws )  .AND.                     &
+                     ALLOCATED( surf_file%sasws   ) )                          & 
+                   surf_target%sasws(m_target) = surf_file%sasws(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%mom_uv' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%mom_flux_uv )  .AND.               &
+                     ALLOCATED( surf_file%mom_flux_uv   ) )                    & 
+                   surf_target%mom_flux_uv(m_target) =                         &
+                                           surf_file%mom_flux_uv(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%mom_w' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%mom_flux_w )  .AND.                &
+                     ALLOCATED( surf_file%mom_flux_w   ) )                     & 
+                   surf_target%mom_flux_w(m_target) =                          &
+                                           surf_file%mom_flux_w(m_file)
+             ENDIF
+
+             IF ( INDEX( restart_string(1:length), '%mom_tke' ) /= 0 )  THEN 
+                IF ( ALLOCATED( surf_target%mom_flux_tke )  .AND.              &
+                     ALLOCATED( surf_file%mom_flux_tke   ) )                   & 
+                   surf_target%mom_flux_tke(0:1,m_target) =                    &
+                                           surf_file%mom_flux_tke(0:1,m_file)
+             ENDIF
+
+
+          END SUBROUTINE restore_surface_elements
+
+
+    END SUBROUTINE surface_rrd_local
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Counts the number of surface elements with the same facing, required for 
+!> reading and writing restart data.
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_last_actions
+
+       IMPLICIT NONE
+!
+!--    Horizontal surfaces
+       ns_h_on_file(0) = surf_def_h(0)%ns + surf_lsm_h%ns + surf_usm_h%ns
+       ns_h_on_file(1) = surf_def_h(1)%ns
+       ns_h_on_file(2) = surf_def_h(2)%ns
+!
+!--    Vertical surfaces
+       ns_v_on_file(0) = surf_def_v(0)%ns + surf_lsm_v(0)%ns + surf_usm_v(0)%ns
+       ns_v_on_file(1) = surf_def_v(1)%ns + surf_lsm_v(1)%ns + surf_usm_v(1)%ns
+       ns_v_on_file(2) = surf_def_v(2)%ns + surf_lsm_v(2)%ns + surf_usm_v(2)%ns
+       ns_v_on_file(3) = surf_def_v(3)%ns + surf_lsm_v(3)%ns + surf_usm_v(3)%ns
+
+    END SUBROUTINE surface_last_actions
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine maps surface data read from file after restart - 1D arrays
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_restore_elements_1d( surf_target, surf_file,            &
+                                            start_index_c,                     &
+                                            start_index_on_file,               &
+                                            end_index_on_file,                 &
+                                            nxlc, nysc, nxlf, nxrf, nysf, nynf,&
+                                            nys_on_file, nyn_on_file,          &
+                                            nxl_on_file,nxr_on_file )
+
+       IMPLICIT NONE
+    
+       INTEGER(iwp) ::  i         !< running index along x-direction, refers to former domain size
+       INTEGER(iwp) ::  ic        !< running index along x-direction, refers to current domain size
+       INTEGER(iwp) ::  j         !< running index along y-direction, refers to former domain size
+       INTEGER(iwp) ::  jc        !< running index along y-direction, refers to former domain size        
+       INTEGER(iwp) ::  m         !< surface-element index on file
+       INTEGER(iwp) ::  mm        !< surface-element index on current subdomain
+       INTEGER(iwp) ::  nxlc      !< index of left boundary on current subdomain
+       INTEGER(iwp) ::  nxlf      !< index of left boundary on former subdomain 
+       INTEGER(iwp) ::  nxrf      !< index of right boundary on former subdomain
+       INTEGER(iwp) ::  nysc      !< index of north boundary on current subdomain
+       INTEGER(iwp) ::  nynf      !< index of north boundary on former subdomain
+       INTEGER(iwp) ::  nysf      !< index of south boundary on former subdomain
+
+       INTEGER(iwp) ::  nxl_on_file !< leftmost index on file
+       INTEGER(iwp) ::  nxr_on_file !< rightmost index on file
+       INTEGER(iwp) ::  nyn_on_file !< northmost index on file
+       INTEGER(iwp) ::  nys_on_file !< southmost index on file
+
+       INTEGER(iwp), DIMENSION(nys:nyn,nxl:nxr) ::  start_index_c             
+       INTEGER(iwp), DIMENSION(nys_on_file:nyn_on_file,nxl_on_file:nxr_on_file) :: & 
+                            start_index_on_file   !< start index of surface elements on file
+       INTEGER(iwp), DIMENSION(nys_on_file:nyn_on_file,nxl_on_file:nxr_on_file) :: & 
+                            end_index_on_file     !< end index of surface elements on file
+       
+       REAL(wp), DIMENSION(:) ::  surf_target !< target surface type
+       REAL(wp), DIMENSION(:) ::  surf_file   !< surface type on file
+
+       ic = nxlc
+       DO  i = nxlf, nxrf
+          jc = nysc
+          DO  j = nysf, nynf
+
+             mm = start_index_c(jc,ic)
+             DO  m = start_index_on_file(j,i), end_index_on_file(j,i)
+                surf_target(mm) = surf_file(m)
+                mm = mm + 1
+             ENDDO
+
+             jc = jc + 1
+          ENDDO
+          ic = ic + 1
+       ENDDO
+
+
+    END SUBROUTINE surface_restore_elements_1d
+   
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine maps surface data read from file after restart - 2D arrays
+!------------------------------------------------------------------------------! 
+    SUBROUTINE surface_restore_elements_2d( surf_target, surf_file,            &
+                                            start_index_c,                     &
+                                            start_index_on_file,               &
+                                            end_index_on_file,                 &
+                                            nxlc, nysc, nxlf, nxrf, nysf, nynf,&
+                                            nys_on_file, nyn_on_file,          &
+                                            nxl_on_file,nxr_on_file )
+
+       IMPLICIT NONE
+    
+       INTEGER(iwp) ::  i         !< running index along x-direction, refers to former domain size
+       INTEGER(iwp) ::  ic        !< running index along x-direction, refers to current domain size
+       INTEGER(iwp) ::  j         !< running index along y-direction, refers to former domain size
+       INTEGER(iwp) ::  jc        !< running index along y-direction, refers to former domain size        
+       INTEGER(iwp) ::  m         !< surface-element index on file
+       INTEGER(iwp) ::  mm        !< surface-element index on current subdomain
+       INTEGER(iwp) ::  nxlc      !< index of left boundary on current subdomain
+       INTEGER(iwp) ::  nxlf      !< index of left boundary on former subdomain 
+       INTEGER(iwp) ::  nxrf      !< index of right boundary on former subdomain
+       INTEGER(iwp) ::  nysc      !< index of north boundary on current subdomain
+       INTEGER(iwp) ::  nynf      !< index of north boundary on former subdomain
+       INTEGER(iwp) ::  nysf      !< index of south boundary on former subdomain
+
+       INTEGER(iwp) ::  nxl_on_file !< leftmost index on file
+       INTEGER(iwp) ::  nxr_on_file !< rightmost index on file
+       INTEGER(iwp) ::  nyn_on_file !< northmost index on file
+       INTEGER(iwp) ::  nys_on_file !< southmost index on file
+
+       INTEGER(iwp), DIMENSION(nys:nyn,nxl:nxr) ::  start_index_c !< start index of surface type
+       INTEGER(iwp), DIMENSION(nys_on_file:nyn_on_file,nxl_on_file:nxr_on_file) :: & 
+                            start_index_on_file   !< start index of surface elements on file
+       INTEGER(iwp), DIMENSION(nys_on_file:nyn_on_file,nxl_on_file:nxr_on_file) :: & 
+                            end_index_on_file     !< end index of surface elements on file
+       
+       REAL(wp), DIMENSION(:,:) ::  surf_target !< target surface type
+       REAL(wp), DIMENSION(:,:) ::  surf_file   !< surface type on file
+       
+       ic = nxlc
+       DO  i = nxlf, nxrf
+          jc = nysc
+          DO  j = nysf, nynf
+             mm = start_index_c(jc,ic)
+             DO  m = start_index_on_file(j,i), end_index_on_file(j,i)
+                surf_target(:,mm) = surf_file(:,m)
+                mm = mm + 1
+             ENDDO
+
+             jc = jc + 1
+          ENDDO
+          ic = ic + 1
+       ENDDO
+
+    END SUBROUTINE surface_restore_elements_2d
+
+
+ END MODULE surface_mod
Index: /palm/tags/release-6.0/SOURCE/surface_output_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/surface_output_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/surface_output_mod.f90	(revision 3477)
@@ -0,0 +1,3286 @@
+!> @file surface_output_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add output variables
+! Write data into binary file
+! Initial implenentation from Klaus Ketelsen and Matthias Suehring
+!
+! 3420 2018-10-24 17:30:08Z gronemeier
+!
+! Description:
+! ------------
+!> Generate output for surface data.
+!
+!------------------------------------------------------------------------------!
+
+MODULE surface_output_mod
+
+   USE kinds
+
+   USE arrays_3d,                                                              &
+       ONLY:  zu, zw
+   USE control_parameters,                                                     &
+       ONLY:  surface_data_output
+   USE grid_variables,                                                         &
+       ONLY: dx,dy
+   USE indices,                                                                &
+       ONLY: nxl, nxr, nys, nyn, nzb, nzt
+   USE surface_mod,                                                            &
+       ONLY:  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v,                  &
+              surf_usm_h, surf_usm_v
+
+   IMPLICIT NONE
+
+   TYPE surf_out                !< data structure which contains all surfaces elements of all types on subdomain
+   
+      INTEGER(iwp) ::  ns       !< number of surface elements
+      INTEGER(iwp) ::  npoints  !< number of points  / vertices which define a surface element
+      
+      REAL(wp) ::  fillvalue = -9999.9_wp !< fillvalue for surface elements which are not defined
+      
+      REAL(wp), DIMENSION(:), ALLOCATABLE   ::  var_out  !< output variables
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var_av   !< variables used for averaging
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  points   !< points  / vertices of a surface element
+      REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  polygons !< polygon data of a surface element
+   END TYPE surf_out
+   
+   CHARACTER(LEN=100), DIMENSION(300)       ::  data_output_surf = ' '  !< namelist variable which describes the output variables
+   CHARACTER(LEN=100), DIMENSION(0:1,300)   ::  dosurf = ' '            !< internal variable which describes the output variables and separates 
+                                                                        !< averaged from non-averaged output
+   
+   INTEGER(iwp) ::  average_count_surf = 0                !< number of ensemble members used for averaging
+   INTEGER(iwp) ::  dosurf_no(0:1) = 0                    !< number of surface output quantities
+
+   LOGICAL :: first_output(0:1) = .FALSE.                 !< true if first output was already called
+
+   REAL(wp) ::  averaging_interval_surf  = 9999999.9_wp   !< averaging interval
+   REAL(wp) ::  dt_dosurf = 9999999.9_wp                  !< time interval for instantaneous data output
+   REAL(wp) ::  dt_dosurf_av = 9999999.9_wp               !< time interval for averaged data output
+   REAL(wp) ::  skip_time_dosurf = 0.0_wp                 !< skip time for instantaneous data output
+   REAL(wp) ::  skip_time_dosurf_av = 0.0_wp              !< skip time for averaged data output
+   REAL(wp) ::  time_dosurf = 0.0_wp                      !< internal counter variable to check for instantaneous data output
+   REAL(wp) ::  time_dosurf_av = 0.0_wp                   !< internal counter variable to check for averaged data output
+
+   
+   TYPE(surf_out) ::  surfaces      !< variable which contains all required output information
+   
+   SAVE
+
+   PRIVATE
+
+   INTERFACE  surface_output
+      MODULE PROCEDURE surface_output
+   END INTERFACE  surface_output
+   
+   INTERFACE  surface_output_averaging
+      MODULE PROCEDURE surface_output_averaging
+   END INTERFACE  surface_output_averaging
+   
+   INTERFACE  surface_output_check_parameters
+      MODULE PROCEDURE surface_output_check_parameters
+   END INTERFACE  surface_output_check_parameters
+   
+   INTERFACE  surface_output_init
+      MODULE PROCEDURE surface_output_init
+   END INTERFACE  surface_output_init
+   
+   INTERFACE  surface_output_parin
+      MODULE PROCEDURE surface_output_parin
+   END INTERFACE  surface_output_parin
+
+!
+!--Public subroutines
+   PUBLIC surface_output, surface_output_averaging,                            &
+          surface_output_check_parameters, surface_output_init,                &
+          surface_output_parin
+!
+!--Public variables
+   PUBLIC average_count_surf, averaging_interval_surf, dt_dosurf, dt_dosurf_av,&
+          skip_time_dosurf, skip_time_dosurf_av, time_dosurf, time_dosurf_av
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization surface-data output data structure: calculation of vertices
+!> and polygon data for the surface elements, allocation of required arrays.
+!------------------------------------------------------------------------------!
+   SUBROUTINE surface_output_init
+      IMPLICIT NONE
+
+      INTEGER(iwp) ::  i     !< grid index in x-direction, also running variable for counting non-average data output
+      INTEGER(iwp) ::  ilen  !< string length
+      INTEGER(iwp) ::  j     !< grid index in y-direction, also running variable for counting average data output
+      INTEGER(iwp) ::  k     !< grid index in z-direction
+      INTEGER(iwp) ::  l     !< running index for surface-element orientation
+      INTEGER(iwp) ::  m     !< running index for surface elements
+      INTEGER(iwp) ::  n_out !< running index for number of output variables
+      
+     
+      INTEGER(iwp) ::  npg   !< counter variable for all surface elements ( or polygons )
+      
+      INTEGER(iwp), ALLOCATABLE, DIMENSION(:,:,:) ::  point_index !< dummy array used to check where the reference points for surface polygons are located
+           
+!
+!--   Determine the number of surface elements on subdomain
+      surfaces%ns = surf_def_h(0)%ns + surf_lsm_h%ns + surf_usm_h%ns           & !horizontal upward-facing
+                  + surf_def_h(1)%ns                                           & !horizontal downard-facing    
+                  + surf_def_v(0)%ns + surf_lsm_v(0)%ns + surf_usm_v(0)%ns     & !northward-facing
+                  + surf_def_v(1)%ns + surf_lsm_v(1)%ns + surf_usm_v(1)%ns     & !southward-facing   
+                  + surf_def_v(2)%ns + surf_lsm_v(2)%ns + surf_usm_v(2)%ns     & !westward-facing   
+                  + surf_def_v(3)%ns + surf_lsm_v(3)%ns + surf_usm_v(3)%ns       !eastward-facing   
+!
+!--   Allocate output variable and set to _FillValue attribute
+      ALLOCATE ( surfaces%var_out(1:surfaces%ns) )
+      surfaces%var_out = surfaces%fillvalue
+!
+!--   If there is an output of time average output variables, allocate the 
+!--   required array.
+      IF ( dosurf_no(1) > 0 )  THEN
+         ALLOCATE ( surfaces%var_av(1:surfaces%ns,1:dosurf_no(1)) )
+         surfaces%var_av = 0.0_wp
+      ENDIF
+!
+!--   Initialize points and polygon data. 
+!--   In a first step, count the number of points which are defining 
+!--   the surfaces and the polygons.
+      ALLOCATE( point_index(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
+      point_index = -1
+!
+!--   Horizontal default surfaces
+      surfaces%npoints = 0
+      DO  l = 0, 1
+         DO  m = 1, surf_def_h(0)%ns
+!
+!--         Determine the indices of the respective grid cell inside the topography
+            i = surf_def_h(0)%i(m) + surf_def_h(0)%ioff
+            j = surf_def_h(0)%j(m) + surf_def_h(0)%joff
+            k = surf_def_h(0)%k(m) + surf_def_h(0)%koff
+!
+!--         Check if the vertices that define the surface element are already 
+!--         defined, if not, increment the counter.
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+            ENDIF
+            IF ( point_index(k,j+1,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k,j+1,i) = surfaces%npoints
+            ENDIF
+            IF ( point_index(k,j,i+1) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k,j,i+1) = surfaces%npoints
+            ENDIF
+            IF ( point_index(k,j+1,i+1) < 0)  THEN
+               surfaces%npoints       = surfaces%npoints + 1    
+               point_index(k,j+1,i+1) = surfaces%npoints
+            ENDIF
+         ENDDO
+      ENDDO
+      DO  m = 1, surf_lsm_h%ns
+         i = surf_lsm_h%i(m) + surf_lsm_h%ioff
+         j = surf_lsm_h%j(m) + surf_lsm_h%joff
+         k = surf_lsm_h%k(m) + surf_lsm_h%koff
+
+         IF ( point_index(k,j,i) < 0)  THEN
+            surfaces%npoints   = surfaces%npoints + 1    
+            point_index(k,j,i) = surfaces%npoints
+         ENDIF
+         IF ( point_index(k,j+1,i) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j+1,i) = surfaces%npoints
+         ENDIF
+         IF ( point_index(k,j,i+1) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j,i+1) = surfaces%npoints
+         ENDIF
+         IF ( point_index(k,j+1,i+1) < 0)  THEN
+            surfaces%npoints       = surfaces%npoints + 1    
+            point_index(k,j+1,i+1) = surfaces%npoints
+         ENDIF   
+      ENDDO
+      DO  m = 1, surf_usm_h%ns
+         i = surf_usm_h%i(m) + surf_usm_h%ioff
+         j = surf_usm_h%j(m) + surf_usm_h%joff
+         k = surf_usm_h%k(m) + surf_usm_h%koff
+
+         IF ( point_index(k,j,i) < 0)  THEN
+            surfaces%npoints   = surfaces%npoints + 1    
+            point_index(k,j,i) = surfaces%npoints
+         ENDIF
+         IF ( point_index(k,j+1,i) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j+1,i) = surfaces%npoints
+         ENDIF
+         IF ( point_index(k,j,i+1) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j,i+1) = surfaces%npoints
+         ENDIF
+         IF ( point_index(k,j+1,i+1) < 0)  THEN
+            surfaces%npoints       = surfaces%npoints + 1    
+            point_index(k,j+1,i+1) = surfaces%npoints
+         ENDIF     
+      ENDDO
+!
+!--   Vertical surfaces
+      DO  l = 0, 3
+         DO  m = 1, surf_def_v(l)%ns
+!
+!--         Determine the indices of the respective grid cell inside the topography.
+!--         Please note, j-index for north-facing surfaces ( l==0 ) is 
+!--         identical to the reference j-index outside the grid box. 
+!--         Equivalent for east-facing surfaces and i-index.
+            i = surf_def_v(l)%i(m) + MERGE( surf_def_v(l)%ioff, 0, l == 2 )
+            j = surf_def_v(l)%j(m) + MERGE( surf_def_v(l)%joff, 0, l == 0 )
+            k = surf_def_v(l)%k(m) + surf_def_v(l)%koff
+!
+!--         Lower left /front vertex
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+            ENDIF 
+!
+!--         Upper left / front vertex
+            IF ( point_index(k+1,j,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k+1,j,i) = surfaces%npoints
+            ENDIF
+!
+!--         Upper / lower right index for north- and south-facing surfaces
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               IF ( point_index(k,j,i+1) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j,i+1) = surfaces%npoints
+               ENDIF 
+               IF ( point_index(k+1,j,i+1) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j,i+1) = surfaces%npoints
+               ENDIF
+!
+!--         Upper / lower front index for east- and west-facing surfaces
+            ELSEIF ( l == 2  .AND.  l == 3 )  THEN
+               IF ( point_index(k,j+1,i) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j+1,i) = surfaces%npoints
+               ENDIF 
+               IF ( point_index(k+1,j+1,i) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j+1,i) = surfaces%npoints
+               ENDIF
+            ENDIF            
+            
+         ENDDO
+         DO  m = 1, surf_lsm_v(l)%ns
+            i = surf_lsm_v(l)%i(m) + MERGE( surf_lsm_v(l)%ioff, 0, l == 2 )
+            j = surf_lsm_v(l)%j(m) + MERGE( surf_lsm_v(l)%joff, 0, l == 0 )
+            k = surf_lsm_v(l)%k(m) + surf_lsm_v(l)%koff
+!
+!--         Lower left /front vertex
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+            ENDIF 
+!
+!--         Upper left / front vertex
+            IF ( point_index(k+1,j,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k+1,j,i) = surfaces%npoints
+            ENDIF
+!
+!--         Upper / lower right index for north- and south-facing surfaces
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               IF ( point_index(k,j,i+1) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j,i+1) = surfaces%npoints
+               ENDIF 
+               IF ( point_index(k+1,j,i+1) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j,i+1) = surfaces%npoints
+               ENDIF
+!
+!--         Upper / lower front index for east- and west-facing surfaces
+            ELSEIF ( l == 2  .AND.  l == 3 )  THEN
+               IF ( point_index(k,j+1,i) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j+1,i) = surfaces%npoints
+               ENDIF 
+               IF ( point_index(k+1,j+1,i) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j+1,i) = surfaces%npoints
+               ENDIF
+            ENDIF       
+         ENDDO
+         DO  m = 1, surf_usm_v(l)%ns
+            i = surf_usm_v(l)%i(m) + MERGE( surf_usm_v(l)%ioff, 0, l == 2 )
+            j = surf_usm_v(l)%j(m) + MERGE( surf_usm_v(l)%joff, 0, l == 0 )
+            k = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff
+!
+!--         Lower left /front vertex
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+            ENDIF 
+!
+!--         Upper left / front vertex
+            IF ( point_index(k+1,j,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k+1,j,i) = surfaces%npoints
+            ENDIF
+!
+!--         Upper / lower right index for north- and south-facing surfaces
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               IF ( point_index(k,j,i+1) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j,i+1) = surfaces%npoints
+               ENDIF 
+               IF ( point_index(k+1,j,i+1) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j,i+1) = surfaces%npoints
+               ENDIF
+!
+!--         Upper / lower front index for east- and west-facing surfaces
+            ELSEIF ( l == 2  .AND.  l == 3 )  THEN
+               IF ( point_index(k,j+1,i) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j+1,i) = surfaces%npoints
+               ENDIF 
+               IF ( point_index(k+1,j+1,i) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j+1,i) = surfaces%npoints
+               ENDIF
+            ENDIF    
+         ENDDO
+      ENDDO
+!
+!--   Allocate the number of points and polygons. Note, the number of polygons
+!--   is identical to the number of surfaces elements, whereas the number
+!--   of points (vertices) which define the polygons can be larger.
+      ALLOCATE( surfaces%points(3,1:surfaces%npoints) )
+      ALLOCATE( surfaces%polygons(5,1:surfaces%ns)    )      
+!
+!--   After the number of vertices is counted, repeat the loops and define the
+!--   vertices. 
+!--   Start with the horizontal default surfaces
+      surfaces%npoints = 0
+      point_index      = -1
+      npg              = 0
+      DO  l = 0, 1
+         DO  m = 1, surf_def_h(0)%ns
+!
+!--         Determine the indices of the respective grid cell inside the topography
+            i = surf_def_h(0)%i(m) + surf_def_h(0)%ioff
+            j = surf_def_h(0)%j(m) + surf_def_h(0)%joff
+            k = surf_def_h(0)%k(m) + surf_def_h(0)%koff
+!
+!--         Check if the vertices that define the surface element are already 
+!--         defined, if not, increment the counter.
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF
+            IF ( point_index(k,j+1,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k,j+1,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF
+            IF ( point_index(k,j,i+1) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k,j,i+1) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF
+            IF ( point_index(k,j+1,i+1) < 0)  THEN
+               surfaces%npoints       = surfaces%npoints + 1    
+               point_index(k,j+1,i+1) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF
+            
+            npg = npg + 1
+            surfaces%polygons(1,npg)   = 4
+            surfaces%polygons(2,npg)   = point_index(k,j,i)
+            surfaces%polygons(3,npg)   = point_index(k,j+1,i)
+            surfaces%polygons(4,npg)   = point_index(k,j+1,i+1)
+            surfaces%polygons(5,npg)   = point_index(k,j,i+1)  
+         ENDDO
+      ENDDO
+      DO  m = 1, surf_lsm_h%ns
+         i = surf_lsm_h%i(m) + surf_lsm_h%ioff
+         j = surf_lsm_h%j(m) + surf_lsm_h%joff
+         k = surf_lsm_h%k(m) + surf_lsm_h%koff
+
+         IF ( point_index(k,j,i) < 0)  THEN
+            surfaces%npoints   = surfaces%npoints + 1    
+            point_index(k,j,i) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         IF ( point_index(k,j+1,i) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j+1,i) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         IF ( point_index(k,j,i+1) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j,i+1) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         IF ( point_index(k,j+1,i+1) < 0)  THEN
+            surfaces%npoints       = surfaces%npoints + 1    
+            point_index(k,j+1,i+1) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         
+         npg = npg + 1
+         surfaces%polygons(1,npg)   = 4
+         surfaces%polygons(2,npg)   = point_index(k,j,i)
+         surfaces%polygons(3,npg)   = point_index(k,j+1,i)
+         surfaces%polygons(4,npg)   = point_index(k,j+1,i+1)
+         surfaces%polygons(5,npg)   = point_index(k,j,i+1)  
+      ENDDO
+      DO  m = 1, surf_usm_h%ns
+         i = surf_usm_h%i(m) + surf_usm_h%ioff
+         j = surf_usm_h%j(m) + surf_usm_h%joff
+         k = surf_usm_h%k(m) + surf_usm_h%koff
+
+         IF ( point_index(k,j,i) < 0)  THEN
+            surfaces%npoints   = surfaces%npoints + 1    
+            point_index(k,j,i) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         IF ( point_index(k,j+1,i) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j+1,i) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         IF ( point_index(k,j,i+1) < 0)  THEN
+            surfaces%npoints     = surfaces%npoints + 1    
+            point_index(k,j,i+1) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         IF ( point_index(k,j+1,i+1) < 0)  THEN
+            surfaces%npoints       = surfaces%npoints + 1    
+            point_index(k,j+1,i+1) = surfaces%npoints
+            surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+            surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+            surfaces%points(3,surfaces%npoints) = zw(k)
+         ENDIF
+         
+         npg = npg + 1
+         surfaces%polygons(1,npg)   = 4
+         surfaces%polygons(2,npg)   = point_index(k,j,i)
+         surfaces%polygons(3,npg)   = point_index(k,j+1,i)
+         surfaces%polygons(4,npg)   = point_index(k,j+1,i+1)
+         surfaces%polygons(5,npg)   = point_index(k,j,i+1)    
+      ENDDO
+      DO  l = 0, 3
+         DO  m = 1, surf_def_v(l)%ns
+!
+!--         Determine the indices of the respective grid cell inside the topography.
+!--         Please note, j-index for north-facing surfaces ( l==0 ) is 
+!--         identical to the reference j-index outside the grid box. 
+!--         Equivalent for east-facing surfaces and i-index.
+            i = surf_def_v(l)%i(m) + MERGE( surf_def_v(l)%ioff, 0, l == 2 )
+            j = surf_def_v(l)%j(m) + MERGE( surf_def_v(l)%joff, 0, l == 0 )
+            k = surf_def_v(l)%k(m) + surf_def_v(l)%koff
+!
+!--         Lower left /front vertex
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF 
+!
+!--         Upper left / front vertex
+            IF ( point_index(k+1,j,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k+1,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k+1)
+            ENDIF
+!
+!--         Upper / lower right index for north- and south-facing surfaces
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               IF ( point_index(k,j,i+1) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j,i+1) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k)
+               ENDIF 
+               IF ( point_index(k+1,j,i+1) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j,i+1) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k+1)
+               ENDIF
+!
+!--         Upper / lower front index for east- and west-facing surfaces
+            ELSEIF ( l == 2  .AND.  l == 3 )  THEN
+               IF ( point_index(k,j+1,i) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j+1,i) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k)
+               ENDIF 
+               IF ( point_index(k+1,j+1,i) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j+1,i) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k+1)
+               ENDIF
+            ENDIF          
+            
+            npg = npg + 1            
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               surfaces%polygons(1,npg)   = 4
+               surfaces%polygons(2,npg)   = point_index(k,j,i)
+               surfaces%polygons(3,npg)   = point_index(k,j,i+1)
+               surfaces%polygons(4,npg)   = point_index(k+1,j,i+1)
+               surfaces%polygons(5,npg)   = point_index(k+1,j,i)  
+            ELSE
+               surfaces%polygons(1,npg)   = 4
+               surfaces%polygons(2,npg)   = point_index(k,j,i)
+               surfaces%polygons(3,npg)   = point_index(k,j+1,i)
+               surfaces%polygons(4,npg)   = point_index(k+1,j+1,i)
+               surfaces%polygons(5,npg)   = point_index(k+1,j,i)
+            ENDIF
+            
+         ENDDO
+         DO  m = 1, surf_lsm_v(l)%ns
+            i = surf_lsm_v(l)%i(m) + MERGE( surf_lsm_v(l)%ioff, 0, l == 2 )
+            j = surf_lsm_v(l)%j(m) + MERGE( surf_lsm_v(l)%joff, 0, l == 0 )
+            k = surf_lsm_v(l)%k(m) + surf_lsm_v(l)%koff
+!
+!--         Lower left /front vertex
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF 
+!
+!--         Upper left / front vertex
+            IF ( point_index(k+1,j,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k+1,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k+1)
+            ENDIF
+!
+!--         Upper / lower right index for north- and south-facing surfaces
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               IF ( point_index(k,j,i+1) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j,i+1) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k)
+               ENDIF 
+               IF ( point_index(k+1,j,i+1) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j,i+1) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k+1)
+               ENDIF
+!
+!--         Upper / lower front index for east- and west-facing surfaces
+            ELSEIF ( l == 2  .AND.  l == 3 )  THEN
+               IF ( point_index(k,j+1,i) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j+1,i) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k)
+               ENDIF 
+               IF ( point_index(k+1,j+1,i) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j+1,i) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k+1)
+               ENDIF
+            ENDIF
+            
+            npg = npg + 1            
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               surfaces%polygons(1,npg)   = 4
+               surfaces%polygons(2,npg)   = point_index(k,j,i)
+               surfaces%polygons(3,npg)   = point_index(k,j,i+1)
+               surfaces%polygons(4,npg)   = point_index(k+1,j,i+1)
+               surfaces%polygons(5,npg)   = point_index(k+1,j,i)  
+            ELSE
+               surfaces%polygons(1,npg)   = 4
+               surfaces%polygons(2,npg)   = point_index(k,j,i)
+               surfaces%polygons(3,npg)   = point_index(k,j+1,i)
+               surfaces%polygons(4,npg)   = point_index(k+1,j+1,i)
+               surfaces%polygons(5,npg)   = point_index(k+1,j,i)
+            ENDIF
+         ENDDO
+         DO  m = 1, surf_usm_v(l)%ns
+            i = surf_usm_v(l)%i(m) + MERGE( surf_usm_v(l)%ioff, 0, l == 2 )
+            j = surf_usm_v(l)%j(m) + MERGE( surf_usm_v(l)%joff, 0, l == 0 )
+            k = surf_usm_v(l)%k(m) + surf_usm_v(l)%koff
+!
+!--         Lower left /front vertex
+            IF ( point_index(k,j,i) < 0)  THEN
+               surfaces%npoints   = surfaces%npoints + 1    
+               point_index(k,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k)
+            ENDIF 
+!
+!--         Upper left / front vertex
+            IF ( point_index(k+1,j,i) < 0)  THEN
+               surfaces%npoints     = surfaces%npoints + 1    
+               point_index(k+1,j,i) = surfaces%npoints
+               surfaces%points(1,surfaces%npoints) = ( i - 0.5_wp ) * dx
+               surfaces%points(2,surfaces%npoints) = ( j - 0.5_wp ) * dy
+               surfaces%points(3,surfaces%npoints) = zw(k+1)
+            ENDIF
+!
+!--         Upper / lower right index for north- and south-facing surfaces
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               IF ( point_index(k,j,i+1) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j,i+1) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k)
+               ENDIF 
+               IF ( point_index(k+1,j,i+1) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j,i+1) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i + 1 - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j     - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k+1)
+               ENDIF
+!
+!--         Upper / lower front index for east- and west-facing surfaces
+            ELSEIF ( l == 2  .AND.  l == 3 )  THEN
+               IF ( point_index(k,j+1,i) < 0)  THEN
+                  surfaces%npoints     = surfaces%npoints + 1    
+                  point_index(k,j+1,i) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k)
+               ENDIF 
+               IF ( point_index(k+1,j+1,i) < 0)  THEN
+                  surfaces%npoints       = surfaces%npoints + 1    
+                  point_index(k+1,j+1,i) = surfaces%npoints
+                  surfaces%points(1,surfaces%npoints) = ( i     - 0.5_wp ) * dx
+                  surfaces%points(2,surfaces%npoints) = ( j + 1 - 0.5_wp ) * dy
+                  surfaces%points(3,surfaces%npoints) = zw(k+1)
+               ENDIF
+            ENDIF
+            
+            npg = npg + 1            
+            IF ( l == 0  .AND.  l == 1 )  THEN
+               surfaces%polygons(1,npg)   = 4
+               surfaces%polygons(2,npg)   = point_index(k,j,i)
+               surfaces%polygons(3,npg)   = point_index(k,j,i+1)
+               surfaces%polygons(4,npg)   = point_index(k+1,j,i+1)
+               surfaces%polygons(5,npg)   = point_index(k+1,j,i)  
+            ELSE
+               surfaces%polygons(1,npg)   = 4
+               surfaces%polygons(2,npg)   = point_index(k,j,i)
+               surfaces%polygons(3,npg)   = point_index(k,j+1,i)
+               surfaces%polygons(4,npg)   = point_index(k+1,j+1,i)
+               surfaces%polygons(5,npg)   = point_index(k+1,j,i)
+            ENDIF
+         ENDDO
+      ENDDO
+!
+!--   Deallocate temporary dummy variable
+      DEALLOCATE ( point_index )
+!
+!--   Now, vertices as well as polygon data can be written to NetCDF files
+!--   ... 
+   END SUBROUTINE surface_output_init
+   
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine for controlling the data output. Surface data is collected from 
+!> different types of surfaces (default, natural, urban) and different 
+!> orientation and written to one 1D-output array. Further, NetCDF routines
+!> are called to write the surface data in the respective NetCDF files.
+!------------------------------------------------------------------------------!   
+   SUBROUTINE surface_output( av )
+   
+      USE control_parameters,                                                  &
+          ONLY:  io_blocks, io_group, simulated_time
+
+      USE pegrid,                                                              &
+          ONLY:  comm2d, ierr
+
+   
+      IMPLICIT NONE
+
+      CHARACTER(LEN=100) ::  trimvar = ' ' !< dummy for single output variable
+      
+      INTEGER(iwp) ::  av     !< id indicating average or non-average data output
+      INTEGER(iwp) ::  i      !< loop index
+      INTEGER(iwp) ::  l      !< running index for surface-element orientation
+      INTEGER(iwp) ::  m      !< running index for surface elements
+      INTEGER(iwp) ::  n_out  !< counter variables for surface output
+
+!
+!--   Return, if nothing to output
+      IF ( dosurf_no(av) == 0 )  RETURN
+!
+!--   Open files
+      CALL check_open( 25+av )
+!
+!--   Write coordinates 
+      IF ( .NOT. first_output(av) )  THEN
+         DO  i = 0, io_blocks-1
+            IF ( i == io_group )  THEN
+               WRITE ( 25+av )  surfaces%npoints
+               WRITE ( 25+av )  surfaces%ns
+               WRITE ( 25+av )  surfaces%points
+               WRITE ( 25+av )  surfaces%polygons
+            ENDIF
+            CALL MPI_BARRIER( comm2d, ierr )
+            first_output(av) = .TRUE.
+         ENDDO
+      ENDIF
+!
+!--   Write time coordinate
+      DO  i = 0, io_blocks-1
+         IF ( i == io_group )  THEN
+            trimvar = 'time'
+            WRITE ( 25+av )  trimvar
+            WRITE ( 25+av )  simulated_time
+         ENDIF
+         CALL MPI_BARRIER( comm2d, ierr )
+      ENDDO
+
+
+      n_out = 0
+      DO  WHILE ( dosurf(av,n_out+1)(1:1) /= ' ' )
+
+         n_out   = n_out + 1
+         trimvar = TRIM( dosurf(av,n_out) )
+!
+!--      Set the output array to the _FillValue in case it is not 
+!--      defined for each type of surface.
+         surfaces%var_out = surfaces%fillvalue
+         SELECT CASE ( trimvar )
+
+            CASE ( 'us' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%us,               &
+                                             surf_def_h(1)%us,                 &
+                                             surf_lsm_h%us,                    &
+                                             surf_usm_h%us,                    &
+                                             surf_def_v(0)%us,                 &
+                                             surf_lsm_v(0)%us,                 &
+                                             surf_usm_v(0)%us,                 &
+                                             surf_def_v(1)%us,                 &
+                                             surf_lsm_v(1)%us,                 &
+                                             surf_usm_v(1)%us,                 &
+                                             surf_def_v(2)%us,                 &
+                                             surf_lsm_v(2)%us,                 &
+                                             surf_usm_v(2)%us,                 &
+                                             surf_def_v(3)%us,                 &
+                                             surf_lsm_v(3)%us,                 &
+                                             surf_usm_v(3)%us ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ts' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ts,               &
+                                               surf_def_h(1)%ts,               &
+                                               surf_lsm_h%ts,                  &
+                                               surf_usm_h%ts,                  &
+                                               surf_def_v(0)%ts,               &
+                                               surf_lsm_v(0)%ts,               &
+                                               surf_usm_v(0)%ts,               &
+                                               surf_def_v(1)%ts,               &
+                                               surf_lsm_v(1)%ts,               &
+                                               surf_usm_v(1)%ts,               &
+                                               surf_def_v(2)%ts,               &
+                                               surf_lsm_v(2)%ts,               &
+                                               surf_usm_v(2)%ts,               &
+                                               surf_def_v(3)%ts,               &
+                                               surf_lsm_v(3)%ts,               &
+                                               surf_usm_v(3)%ts ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'qs' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qs,               &
+                                               surf_def_h(1)%qs,               &
+                                               surf_lsm_h%qs,                  &
+                                               surf_usm_h%qs,                  &
+                                               surf_def_v(0)%qs,               &
+                                               surf_lsm_v(0)%qs,               &
+                                               surf_usm_v(0)%qs,               &
+                                               surf_def_v(1)%qs,               &
+                                               surf_lsm_v(1)%qs,               &
+                                               surf_usm_v(1)%qs,               &
+                                               surf_def_v(2)%qs,               &
+                                               surf_lsm_v(2)%qs,               &
+                                               surf_usm_v(2)%qs,               &
+                                               surf_def_v(3)%qs,               &
+                                               surf_lsm_v(3)%qs,               &
+                                               surf_usm_v(3)%qs ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ss' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ss,               &
+                                               surf_def_h(1)%ss,               &
+                                               surf_lsm_h%ss,                  &
+                                               surf_usm_h%ss,                  &
+                                               surf_def_v(0)%ss,               &
+                                               surf_lsm_v(0)%ss,               &
+                                               surf_usm_v(0)%ss,               &
+                                               surf_def_v(1)%ss,               &
+                                               surf_lsm_v(1)%ss,               &
+                                               surf_usm_v(1)%ss,               &
+                                               surf_def_v(2)%ss,               &
+                                               surf_lsm_v(2)%ss,               &
+                                               surf_usm_v(2)%ss,               &
+                                               surf_def_v(3)%ss,               &
+                                               surf_lsm_v(3)%ss,               &
+                                               surf_usm_v(3)%ss ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'qcs' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qcs,              &
+                                               surf_def_h(1)%qcs,              &
+                                               surf_lsm_h%qcs,                 &
+                                               surf_usm_h%qcs,                 &
+                                               surf_def_v(0)%qcs,              &
+                                               surf_lsm_v(0)%qcs,              &
+                                               surf_usm_v(0)%qcs,              &
+                                               surf_def_v(1)%qcs,              &
+                                               surf_lsm_v(1)%qcs,              &
+                                               surf_usm_v(1)%qcs,              &
+                                               surf_def_v(2)%qcs,              &
+                                               surf_lsm_v(2)%qcs,              &
+                                               surf_usm_v(2)%qcs,              &
+                                               surf_def_v(3)%qcs,              &
+                                               surf_lsm_v(3)%qcs,              &
+                                               surf_usm_v(3)%qcs ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ncs' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ncs,              &
+                                               surf_def_h(1)%ncs,              &
+                                               surf_lsm_h%ncs,                 &
+                                               surf_usm_h%ncs,                 &
+                                               surf_def_v(0)%ncs,              &
+                                               surf_lsm_v(0)%ncs,              &
+                                               surf_usm_v(0)%ncs,              &
+                                               surf_def_v(1)%ncs,              &
+                                               surf_lsm_v(1)%ncs,              &
+                                               surf_usm_v(1)%ncs,              &
+                                               surf_def_v(2)%ncs,              &
+                                               surf_lsm_v(2)%ncs,              &
+                                               surf_usm_v(2)%ncs,              &
+                                               surf_def_v(3)%ncs,              &
+                                               surf_lsm_v(3)%ncs,              &
+                                               surf_usm_v(3)%ncs ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'qrs' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qrs,              &
+                                               surf_def_h(1)%qrs,              &
+                                               surf_lsm_h%qrs,                 &
+                                               surf_usm_h%qrs,                 &
+                                               surf_def_v(0)%qrs,              &
+                                               surf_lsm_v(0)%qrs,              &
+                                               surf_usm_v(0)%qrs,              &
+                                               surf_def_v(1)%qrs,              &
+                                               surf_lsm_v(1)%qrs,              &
+                                               surf_usm_v(1)%qrs,              &
+                                               surf_def_v(2)%qrs,              &
+                                               surf_lsm_v(2)%qrs,              &
+                                               surf_usm_v(2)%qrs,              &
+                                               surf_def_v(3)%qrs,              &
+                                               surf_lsm_v(3)%qrs,              &
+                                               surf_usm_v(3)%qrs ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'nrs' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%nrs,              &
+                                               surf_def_h(1)%nrs,              &
+                                               surf_lsm_h%nrs,                 &
+                                               surf_usm_h%nrs,                 &
+                                               surf_def_v(0)%nrs,              &
+                                               surf_lsm_v(0)%nrs,              &
+                                               surf_usm_v(0)%nrs,              &
+                                               surf_def_v(1)%nrs,              &
+                                               surf_lsm_v(1)%nrs,              &
+                                               surf_usm_v(1)%nrs,              &
+                                               surf_def_v(2)%nrs,              &
+                                               surf_lsm_v(2)%nrs,              &
+                                               surf_usm_v(2)%nrs,              &
+                                               surf_def_v(3)%nrs,              &
+                                               surf_lsm_v(3)%nrs,              &
+                                               surf_usm_v(3)%nrs ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ol' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ol,               &
+                                               surf_def_h(1)%ol,               &
+                                               surf_lsm_h%ol,                  &
+                                               surf_usm_h%ol,                  &
+                                               surf_def_v(0)%ol,               &
+                                               surf_lsm_v(0)%ol,               &
+                                               surf_usm_v(0)%ol,               &
+                                               surf_def_v(1)%ol,               &
+                                               surf_lsm_v(1)%ol,               &
+                                               surf_usm_v(1)%ol,               &
+                                               surf_def_v(2)%ol,               &
+                                               surf_lsm_v(2)%ol,               &
+                                               surf_usm_v(2)%ol,               &
+                                               surf_def_v(3)%ol,               &
+                                               surf_lsm_v(3)%ol,               &
+                                               surf_usm_v(3)%ol ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'z0' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%z0,               &
+                                               surf_def_h(1)%z0,               &
+                                               surf_lsm_h%z0,                  &
+                                               surf_usm_h%z0,                  &
+                                               surf_def_v(0)%z0,               &
+                                               surf_lsm_v(0)%z0,               &
+                                               surf_usm_v(0)%z0,               &
+                                               surf_def_v(1)%z0,               &
+                                               surf_lsm_v(1)%z0,               &
+                                               surf_usm_v(1)%z0,               &
+                                               surf_def_v(2)%z0,               &
+                                               surf_lsm_v(2)%z0,               &
+                                               surf_usm_v(2)%z0,               &
+                                               surf_def_v(3)%z0,               &
+                                               surf_lsm_v(3)%z0,               &
+                                               surf_usm_v(3)%z0 )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'z0h' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%z0h,              &
+                                               surf_def_h(1)%z0h,              &
+                                               surf_lsm_h%z0h,                 &
+                                               surf_usm_h%z0h,                 &
+                                               surf_def_v(0)%z0h,              &
+                                               surf_lsm_v(0)%z0h,              &
+                                               surf_usm_v(0)%z0h,              &
+                                               surf_def_v(1)%z0h,              &
+                                               surf_lsm_v(1)%z0h,              &
+                                               surf_usm_v(1)%z0h,              &
+                                               surf_def_v(2)%z0h,              &
+                                               surf_lsm_v(2)%z0h,              &
+                                               surf_usm_v(2)%z0h,              &
+                                               surf_def_v(3)%z0h,              &
+                                               surf_lsm_v(3)%z0h,              &
+                                               surf_usm_v(3)%z0h )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'z0q' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%z0q,              &
+                                               surf_def_h(1)%z0q,              &
+                                               surf_lsm_h%z0q,                 &
+                                               surf_usm_h%z0q,                 &
+                                               surf_def_v(0)%z0q,              &
+                                               surf_lsm_v(0)%z0q,              &
+                                               surf_usm_v(0)%z0q,              &
+                                               surf_def_v(1)%z0q,              &
+                                               surf_lsm_v(1)%z0q,              &
+                                               surf_usm_v(1)%z0q,              &
+                                               surf_def_v(2)%z0q,              &
+                                               surf_lsm_v(2)%z0q,              &
+                                               surf_usm_v(2)%z0q,              &
+                                               surf_def_v(3)%z0q,              &
+                                               surf_lsm_v(3)%z0q,              &
+                                               surf_usm_v(3)%z0q ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+
+               ENDIF
+
+            CASE ( 'theta1' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%pt1,              &
+                                               surf_def_h(1)%pt1,              &
+                                               surf_lsm_h%pt1,                 &
+                                               surf_usm_h%pt1,                 &
+                                               surf_def_v(0)%pt1,              &
+                                               surf_lsm_v(0)%pt1,              &
+                                               surf_usm_v(0)%pt1,              &
+                                               surf_def_v(1)%pt1,              &
+                                               surf_lsm_v(1)%pt1,              &
+                                               surf_usm_v(1)%pt1,              &
+                                               surf_def_v(2)%pt1,              &
+                                               surf_lsm_v(2)%pt1,              &
+                                               surf_usm_v(2)%pt1,              &
+                                               surf_def_v(3)%pt1,              &
+                                               surf_lsm_v(3)%pt1,              &
+                                               surf_usm_v(3)%pt1 )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'qv1' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qv1,              &
+                                               surf_def_h(1)%qv1,              &
+                                               surf_lsm_h%qv1,                 &
+                                               surf_usm_h%qv1,                 &
+                                               surf_def_v(0)%qv1,              &
+                                               surf_lsm_v(0)%qv1,              &
+                                               surf_usm_v(0)%qv1,              &
+                                               surf_def_v(1)%qv1,              &
+                                               surf_lsm_v(1)%qv1,              &
+                                               surf_usm_v(1)%qv1,              &
+                                               surf_def_v(2)%qv1,              &
+                                               surf_lsm_v(2)%qv1,              &
+                                               surf_usm_v(2)%qv1,              &
+                                               surf_def_v(3)%qv1,              &
+                                               surf_lsm_v(3)%qv1,              &
+                                               surf_usm_v(3)%qv1 )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'thetav1' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%vpt1,             &
+                                               surf_def_h(1)%vpt1,             &
+                                               surf_lsm_h%vpt1,                &
+                                               surf_usm_h%vpt1,                &
+                                               surf_def_v(0)%vpt1,             &
+                                               surf_lsm_v(0)%vpt1,             &
+                                               surf_usm_v(0)%vpt1,             &
+                                               surf_def_v(1)%vpt1,             &
+                                               surf_lsm_v(1)%vpt1,             &
+                                               surf_usm_v(1)%vpt1,             &
+                                               surf_def_v(2)%vpt1,             &
+                                               surf_lsm_v(2)%vpt1,             &
+                                               surf_usm_v(2)%vpt1,             &
+                                               surf_def_v(3)%vpt1,             &
+                                               surf_lsm_v(3)%vpt1,             &
+                                               surf_usm_v(3)%vpt1 )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'usws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%usws,             &
+                                               surf_def_h(1)%usws,             &
+                                               surf_lsm_h%usws,                &
+                                               surf_usm_h%usws,                &
+                                               surf_def_v(0)%usws,             &
+                                               surf_lsm_v(0)%usws,             &
+                                               surf_usm_v(0)%usws,             &
+                                               surf_def_v(1)%usws,             &
+                                               surf_lsm_v(1)%usws,             &
+                                               surf_usm_v(1)%usws,             &
+                                               surf_def_v(2)%usws,             &
+                                               surf_lsm_v(2)%usws,             &
+                                               surf_usm_v(2)%usws,             &
+                                               surf_def_v(3)%usws,             &
+                                               surf_lsm_v(3)%usws,             &
+                                               surf_usm_v(3)%usws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'vsws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%vsws,             &
+                                               surf_def_h(1)%vsws,             &
+                                               surf_lsm_h%vsws,                &
+                                               surf_usm_h%vsws,                &
+                                               surf_def_v(0)%vsws,             &
+                                               surf_lsm_v(0)%vsws,             &
+                                               surf_usm_v(0)%vsws,             &
+                                               surf_def_v(1)%vsws,             &
+                                               surf_lsm_v(1)%vsws,             &
+                                               surf_usm_v(1)%vsws,             &
+                                               surf_def_v(2)%vsws,             &
+                                               surf_lsm_v(2)%vsws,             &
+                                               surf_usm_v(2)%vsws,             &
+                                               surf_def_v(3)%vsws,             &
+                                               surf_lsm_v(3)%vsws,             &
+                                               surf_usm_v(3)%vsws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'shf' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%shf,              &
+                                               surf_def_h(1)%shf,              &
+                                               surf_lsm_h%shf,                 &
+                                               surf_usm_h%shf,                 &
+                                               surf_def_v(0)%shf,              &
+                                               surf_lsm_v(0)%shf,              &
+                                               surf_usm_v(0)%shf,              &
+                                               surf_def_v(1)%shf,              &
+                                               surf_lsm_v(1)%shf,              &
+                                               surf_usm_v(1)%shf,              &
+                                               surf_def_v(2)%shf,              &
+                                               surf_lsm_v(2)%shf,              &
+                                               surf_usm_v(2)%shf,              &
+                                               surf_def_v(3)%shf,              &
+                                               surf_lsm_v(3)%shf,              &
+                                               surf_usm_v(3)%shf )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+               ENDIF
+
+            CASE ( 'qsws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qsws,             &
+                                               surf_def_h(1)%qsws,             &
+                                               surf_lsm_h%qsws,                &
+                                               surf_usm_h%qsws,                &
+                                               surf_def_v(0)%qsws,             &
+                                               surf_lsm_v(0)%qsws,             &
+                                               surf_usm_v(0)%qsws,             &
+                                               surf_def_v(1)%qsws,             &
+                                               surf_lsm_v(1)%qsws,             &
+                                               surf_usm_v(1)%qsws,             &
+                                               surf_def_v(2)%qsws,             &
+                                               surf_lsm_v(2)%qsws,             &
+                                               surf_usm_v(2)%qsws,             &
+                                               surf_def_v(3)%qsws,             &
+                                               surf_lsm_v(3)%qsws,             &
+                                               surf_usm_v(3)%qsws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ssws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ssws,             &
+                                               surf_def_h(1)%ssws,             &
+                                               surf_lsm_h%ssws,                &
+                                               surf_usm_h%ssws,                &
+                                               surf_def_v(0)%ssws,             &
+                                               surf_lsm_v(0)%ssws,             &
+                                               surf_usm_v(0)%ssws,             &
+                                               surf_def_v(1)%ssws,             &
+                                               surf_lsm_v(1)%ssws,             &
+                                               surf_usm_v(1)%ssws,             &
+                                               surf_def_v(2)%ssws,             &
+                                               surf_lsm_v(2)%ssws,             &
+                                               surf_usm_v(2)%ssws,             &
+                                               surf_def_v(3)%ssws,             &
+                                               surf_lsm_v(3)%ssws,             &
+                                               surf_usm_v(3)%ssws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'qcsws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qcsws,            &
+                                               surf_def_h(1)%qcsws,            &
+                                               surf_lsm_h%qcsws,               &
+                                               surf_usm_h%qcsws,               &
+                                               surf_def_v(0)%qcsws,            &
+                                               surf_lsm_v(0)%qcsws,            &
+                                               surf_usm_v(0)%qcsws,            &
+                                               surf_def_v(1)%qcsws,            &
+                                               surf_lsm_v(1)%qcsws,            &
+                                               surf_usm_v(1)%qcsws,            &
+                                               surf_def_v(2)%qcsws,            &
+                                               surf_lsm_v(2)%qcsws,            &
+                                               surf_usm_v(2)%qcsws,            &
+                                               surf_def_v(3)%qcsws,            &
+                                               surf_lsm_v(3)%qcsws,            &
+                                               surf_usm_v(3)%qcsws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ncsws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ncsws,            &
+                                               surf_def_h(1)%ncsws,            &
+                                               surf_lsm_h%ncsws,               &
+                                               surf_usm_h%ncsws,               &
+                                               surf_def_v(0)%ncsws,            &
+                                               surf_lsm_v(0)%ncsws,            &
+                                               surf_usm_v(0)%ncsws,            &
+                                               surf_def_v(1)%ncsws,            &
+                                               surf_lsm_v(1)%ncsws,            &
+                                               surf_usm_v(1)%ncsws,            &
+                                               surf_def_v(2)%ncsws,            &
+                                               surf_lsm_v(2)%ncsws,            &
+                                               surf_usm_v(2)%ncsws,            &
+                                               surf_def_v(3)%ncsws,            &
+                                               surf_lsm_v(3)%ncsws,            &
+                                               surf_usm_v(3)%ncsws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'qrsws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%qrsws,            &
+                                               surf_def_h(1)%qrsws,            &
+                                               surf_lsm_h%qrsws,               &
+                                               surf_usm_h%qrsws,               &
+                                               surf_def_v(0)%qrsws,            &
+                                               surf_lsm_v(0)%qrsws,            &
+                                               surf_usm_v(0)%qrsws,            &
+                                               surf_def_v(1)%qrsws,            &
+                                               surf_lsm_v(1)%qrsws,            &
+                                               surf_usm_v(1)%qrsws,            &
+                                               surf_def_v(2)%qrsws,            &
+                                               surf_lsm_v(2)%qrsws,            &
+                                               surf_usm_v(2)%qrsws,            &
+                                               surf_def_v(3)%qrsws,            &
+                                               surf_lsm_v(3)%qrsws,            &
+                                               surf_usm_v(3)%qrsws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'nrsws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%nrsws,            &
+                                               surf_def_h(1)%nrsws,            &
+                                               surf_lsm_h%nrsws,               &
+                                               surf_usm_h%nrsws,               &
+                                               surf_def_v(0)%nrsws,            &
+                                               surf_lsm_v(0)%nrsws,            &
+                                               surf_usm_v(0)%nrsws,            &
+                                               surf_def_v(1)%nrsws,            &
+                                               surf_lsm_v(1)%nrsws,            &
+                                               surf_usm_v(1)%nrsws,            &
+                                               surf_def_v(2)%nrsws,            &
+                                               surf_lsm_v(2)%nrsws,            &
+                                               surf_usm_v(2)%nrsws,            &
+                                               surf_def_v(3)%nrsws,            &
+                                               surf_lsm_v(3)%nrsws,            &
+                                               surf_usm_v(3)%nrsws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'sasws' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%sasws,            &
+                                               surf_def_h(1)%sasws,            &
+                                               surf_lsm_h%sasws,               &
+                                               surf_usm_h%sasws,               &
+                                               surf_def_v(0)%sasws,            &
+                                               surf_lsm_v(0)%sasws,            &
+                                               surf_usm_v(0)%sasws,            &
+                                               surf_def_v(1)%sasws,            &
+                                               surf_lsm_v(1)%sasws,            &
+                                               surf_usm_v(1)%sasws,            &
+                                               surf_def_v(2)%sasws,            &
+                                               surf_lsm_v(2)%sasws,            &
+                                               surf_usm_v(2)%sasws,            &
+                                               surf_def_v(3)%sasws,            &
+                                               surf_lsm_v(3)%sasws,            &
+                                               surf_usm_v(3)%sasws )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'q_surface' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%q_surface,        &
+                                               surf_def_h(1)%q_surface,        &
+                                               surf_lsm_h%q_surface,           &
+                                               surf_usm_h%q_surface,           &
+                                               surf_def_v(0)%q_surface,        &
+                                               surf_lsm_v(0)%q_surface,        &
+                                               surf_usm_v(0)%q_surface,        &
+                                               surf_def_v(1)%q_surface,        &
+                                               surf_lsm_v(1)%q_surface,        &
+                                               surf_usm_v(1)%q_surface,        &
+                                               surf_def_v(2)%q_surface,        &
+                                               surf_lsm_v(2)%q_surface,        &
+                                               surf_usm_v(2)%q_surface,        &
+                                               surf_def_v(3)%q_surface,        &
+                                               surf_lsm_v(3)%q_surface,        &
+                                               surf_usm_v(3)%q_surface )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'theta_surface' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%pt_surface,       &
+                                               surf_def_h(1)%pt_surface,       &
+                                               surf_lsm_h%pt_surface,          &
+                                               surf_usm_h%pt_surface,          &
+                                               surf_def_v(0)%pt_surface,       &
+                                               surf_lsm_v(0)%pt_surface,       &
+                                               surf_usm_v(0)%pt_surface,       &
+                                               surf_def_v(1)%pt_surface,       &
+                                               surf_lsm_v(1)%pt_surface,       &
+                                               surf_usm_v(1)%pt_surface,       &
+                                               surf_def_v(2)%pt_surface,       &
+                                               surf_lsm_v(2)%pt_surface,       &
+                                               surf_usm_v(2)%pt_surface,       &
+                                               surf_def_v(3)%pt_surface,       &
+                                               surf_lsm_v(3)%pt_surface,       &
+                                               surf_usm_v(3)%pt_surface )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'thetav_surface' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%vpt_surface,      &
+                                               surf_def_h(1)%vpt_surface,      &
+                                               surf_lsm_h%vpt_surface,         &
+                                               surf_usm_h%vpt_surface,         &
+                                               surf_def_v(0)%vpt_surface,      &
+                                               surf_lsm_v(0)%vpt_surface,      &
+                                               surf_usm_v(0)%vpt_surface,      &
+                                               surf_def_v(1)%vpt_surface,      &
+                                               surf_lsm_v(1)%vpt_surface,      &
+                                               surf_usm_v(1)%vpt_surface,      &
+                                               surf_def_v(2)%vpt_surface,      &
+                                               surf_lsm_v(2)%vpt_surface,      &
+                                               surf_usm_v(2)%vpt_surface,      &
+                                               surf_def_v(3)%vpt_surface,      &
+                                               surf_lsm_v(3)%vpt_surface,      &
+                                               surf_usm_v(3)%vpt_surface)
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'rad_net' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%rad_net,          &
+                                               surf_def_h(1)%rad_net,          &
+                                               surf_lsm_h%rad_net,             &
+                                               surf_usm_h%rad_net,             &
+                                               surf_def_v(0)%rad_net,          &
+                                               surf_lsm_v(0)%rad_net,          &
+                                               surf_usm_v(0)%rad_net,          &
+                                               surf_def_v(1)%rad_net,          &
+                                               surf_lsm_v(1)%rad_net,          &
+                                               surf_usm_v(1)%rad_net,          &
+                                               surf_def_v(2)%rad_net,          &
+                                               surf_lsm_v(2)%rad_net,          &
+                                               surf_usm_v(2)%rad_net,          &
+                                               surf_def_v(3)%rad_net,          &
+                                               surf_lsm_v(3)%rad_net,          &
+                                               surf_usm_v(3)%rad_net ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'rad_lw_in' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%rad_lw_in,        &
+                                               surf_def_h(1)%rad_lw_in,        &
+                                               surf_lsm_h%rad_lw_in,           &
+                                               surf_usm_h%rad_lw_in,           &
+                                               surf_def_v(0)%rad_lw_in,        &
+                                               surf_lsm_v(0)%rad_lw_in,        &
+                                               surf_usm_v(0)%rad_lw_in,        &
+                                               surf_def_v(1)%rad_lw_in,        &
+                                               surf_lsm_v(1)%rad_lw_in,        &
+                                               surf_usm_v(1)%rad_lw_in,        &
+                                               surf_def_v(2)%rad_lw_in,        &
+                                               surf_lsm_v(2)%rad_lw_in,        &
+                                               surf_usm_v(2)%rad_lw_in,        &
+                                               surf_def_v(3)%rad_lw_in,        &
+                                               surf_lsm_v(3)%rad_lw_in,        &
+                                               surf_usm_v(3)%rad_lw_in )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'rad_lw_out' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%rad_lw_out,       &
+                                               surf_def_h(1)%rad_lw_out,       &
+                                               surf_lsm_h%rad_lw_out,          &
+                                               surf_usm_h%rad_lw_out,          &
+                                               surf_def_v(0)%rad_lw_out,       &
+                                               surf_lsm_v(0)%rad_lw_out,       &
+                                               surf_usm_v(0)%rad_lw_out,       &
+                                               surf_def_v(1)%rad_lw_out,       &
+                                               surf_lsm_v(1)%rad_lw_out,       &
+                                               surf_usm_v(1)%rad_lw_out,       &
+                                               surf_def_v(2)%rad_lw_out,       &
+                                               surf_lsm_v(2)%rad_lw_out,       &
+                                               surf_usm_v(2)%rad_lw_out,       &
+                                               surf_def_v(3)%rad_lw_out,       &
+                                               surf_lsm_v(3)%rad_lw_out,       &
+                                               surf_usm_v(3)%rad_lw_out )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'rad_sw_in' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%rad_sw_in,        &
+                                               surf_def_h(1)%rad_sw_in,        &
+                                               surf_lsm_h%rad_sw_in,           &
+                                               surf_usm_h%rad_sw_in,           &
+                                               surf_def_v(0)%rad_sw_in,        &
+                                               surf_lsm_v(0)%rad_sw_in,        &
+                                               surf_usm_v(0)%rad_sw_in,        &
+                                               surf_def_v(1)%rad_sw_in,        &
+                                               surf_lsm_v(1)%rad_sw_in,        &
+                                               surf_usm_v(1)%rad_sw_in,        &
+                                               surf_def_v(2)%rad_sw_in,        &
+                                               surf_lsm_v(2)%rad_sw_in,        &
+                                               surf_usm_v(2)%rad_sw_in,        &
+                                               surf_def_v(3)%rad_sw_in,        &
+                                               surf_lsm_v(3)%rad_sw_in,        &
+                                               surf_usm_v(3)%rad_sw_in )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'rad_sw_out' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%rad_sw_out,       &
+                                               surf_def_h(1)%rad_sw_out,       &
+                                               surf_lsm_h%rad_sw_out,          &
+                                               surf_usm_h%rad_sw_out,          &
+                                               surf_def_v(0)%rad_sw_out,       &
+                                               surf_lsm_v(0)%rad_sw_out,       &
+                                               surf_usm_v(0)%rad_sw_out,       &
+                                               surf_def_v(1)%rad_sw_out,       &
+                                               surf_lsm_v(1)%rad_sw_out,       &
+                                               surf_usm_v(1)%rad_sw_out,       &
+                                               surf_def_v(2)%rad_sw_out,       &
+                                               surf_lsm_v(2)%rad_sw_out,       &
+                                               surf_usm_v(2)%rad_sw_out,       &
+                                               surf_def_v(3)%rad_sw_out,       &
+                                               surf_lsm_v(3)%rad_sw_out,       &
+                                               surf_usm_v(3)%rad_sw_out )
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'ghf' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%ghf,              &
+                                               surf_def_h(1)%ghf,              &
+                                               surf_lsm_h%ghf,                 &
+                                               surf_usm_h%ghf,                 &
+                                               surf_def_v(0)%ghf,              &
+                                               surf_lsm_v(0)%ghf,              &
+                                               surf_usm_v(0)%ghf,              &
+                                               surf_def_v(1)%ghf,              &
+                                               surf_lsm_v(1)%ghf,              &
+                                               surf_usm_v(1)%ghf,              &
+                                               surf_def_v(2)%ghf,              &
+                                               surf_lsm_v(2)%ghf,              &
+                                               surf_usm_v(2)%ghf,              &
+                                               surf_def_v(3)%ghf,              &
+                                               surf_lsm_v(3)%ghf,              &
+                                               surf_usm_v(3)%ghf )      
+                                                                        ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+                      
+            CASE ( 'r_a' )                                                     
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%r_a,              &
+                                               surf_def_h(1)%r_a,              &
+                                               surf_lsm_h%r_a,                 &
+                                               surf_usm_h%r_a,                 &
+                                               surf_def_v(0)%r_a,              &
+                                               surf_lsm_v(0)%r_a,              &
+                                               surf_usm_v(0)%r_a,              &
+                                               surf_def_v(1)%r_a,              &
+                                               surf_lsm_v(1)%r_a,              &
+                                               surf_usm_v(1)%r_a,              &
+                                               surf_def_v(2)%r_a,              &
+                                               surf_lsm_v(2)%r_a,              &
+                                               surf_usm_v(2)%r_a,              &
+                                               surf_def_v(3)%r_a,              &
+                                               surf_lsm_v(3)%r_a,              &
+                                               surf_usm_v(3)%r_a )      
+                                                                      ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+                        
+            CASE ( 'r_soil' )                                                  
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%r_soil,           &
+                                               surf_def_h(1)%r_soil,           &
+                                               surf_lsm_h%r_soil,              &
+                                               surf_usm_h%r_soil,              &
+                                               surf_def_v(0)%r_soil,           &
+                                               surf_lsm_v(0)%r_soil,           &
+                                               surf_usm_v(0)%r_soil,           &
+                                               surf_def_v(1)%r_soil,           &
+                                               surf_lsm_v(1)%r_soil,           &
+                                               surf_usm_v(1)%r_soil,           &
+                                               surf_def_v(2)%r_soil,           &
+                                               surf_lsm_v(2)%r_soil,           &
+                                               surf_usm_v(2)%r_soil,           &
+                                               surf_def_v(3)%r_soil,           &
+                                               surf_lsm_v(3)%r_soil,           &
+                                               surf_usm_v(3)%r_soil ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'r_canopy' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%r_canopy,         &
+                                               surf_def_h(1)%r_canopy,         &
+                                               surf_lsm_h%r_canopy,            &
+                                               surf_usm_h%r_canopy,            &
+                                               surf_def_v(0)%r_canopy,         &
+                                               surf_lsm_v(0)%r_canopy,         &
+                                               surf_usm_v(0)%r_canopy,         &
+                                               surf_def_v(1)%r_canopy,         &
+                                               surf_lsm_v(1)%r_canopy,         &
+                                               surf_usm_v(1)%r_canopy,         &
+                                               surf_def_v(2)%r_canopy,         &
+                                               surf_lsm_v(2)%r_canopy,         &
+                                               surf_usm_v(2)%r_canopy,         &
+                                               surf_def_v(3)%r_canopy,         &
+                                               surf_lsm_v(3)%r_canopy,         &
+                                               surf_usm_v(3)%r_canopy ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+            CASE ( 'r_s' )
+!
+!--            Output of instantaneous data
+               IF ( av == 0 )  THEN
+                  CALL surface_output_collect( surf_def_h(0)%r_s,              &
+                                               surf_def_h(1)%r_s,              &
+                                               surf_lsm_h%r_s,                 &
+                                               surf_usm_h%r_s,                 &
+                                               surf_def_v(0)%r_s,              &
+                                               surf_lsm_v(0)%r_s,              &
+                                               surf_usm_v(0)%r_s,              &
+                                               surf_def_v(1)%r_s,              &
+                                               surf_lsm_v(1)%r_s,              &
+                                               surf_usm_v(1)%r_s,              &
+                                               surf_def_v(2)%r_s,              &
+                                               surf_lsm_v(2)%r_s,              &
+                                               surf_usm_v(2)%r_s,              &
+                                               surf_def_v(3)%r_s,              &
+                                               surf_lsm_v(3)%r_s,              &
+                                               surf_usm_v(3)%r_s ) 
+               ELSE
+!
+!--               Output of averaged data
+                  surfaces%var_out(:) = surfaces%var_av(:,n_out) /             &
+                                        REAL( average_count_surf, KIND=wp )
+                  surfaces%var_av(:,n_out) = 0.0_wp
+                                                        
+               ENDIF
+
+!
+!--            Add further variables:
+!--            'css', 'cssws', 'qsws_liq', 'qsws_soil', 'qsws_veg'
+
+         END SELECT
+!
+!--      Write to binary file: 
+!--      - surfaces%points ( 3, 1-npoints )
+!--      - surfaces%polygons ( 5, 1-ns )
+!--      - surfaces%var_out ( 1-ns, time )
+!--      - Dimension: 1-nsurfaces, 1-npoints - can be ordered consecutively
+!--      - Distinguish between average and non-average data
+         DO  i = 0, io_blocks-1
+            IF ( i == io_group )  THEN
+               WRITE ( 25+av )  trimvar
+               WRITE ( 25+av )  surfaces%var_out
+            ENDIF
+            CALL MPI_BARRIER( comm2d, ierr )
+         ENDDO
+
+      ENDDO
+      
+!
+!--      If averaged output was written to NetCDF file, set the counter to zero
+         IF ( av == 1 )  average_count_surf = 0
+             
+   END SUBROUTINE surface_output
+   
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Routine for controlling the data averaging. 
+!------------------------------------------------------------------------------!     
+   SUBROUTINE surface_output_averaging
+   
+      IMPLICIT NONE
+      
+      CHARACTER(LEN=100) ::  trimvar !< dummy variable for current output variable
+       
+      INTEGER(iwp) ::  l      !< running index for surface-element orientation
+      INTEGER(iwp) ::  m      !< running index for surface elements
+      INTEGER(iwp) ::  n_out  !< counter variables for surface output
+      
+      n_out = 0
+      DO  WHILE ( dosurf(1,n_out+1)(1:1) /= ' ' )
+         
+         n_out   = n_out + 1
+         trimvar = TRIM( dosurf(1,n_out) )
+
+         SELECT CASE ( trimvar )
+
+            CASE ( 'us' )
+               CALL surface_output_sum_up( surf_def_h(0)%us,                   &
+                                           surf_def_h(1)%us,                   &
+                                           surf_lsm_h%us,                      &
+                                           surf_usm_h%us,                      &
+                                           surf_def_v(0)%us,                   &
+                                           surf_lsm_v(0)%us,                   &
+                                           surf_usm_v(0)%us,                   &
+                                           surf_def_v(1)%us,                   &
+                                           surf_lsm_v(1)%us,                   &
+                                           surf_usm_v(1)%us,                   &
+                                           surf_def_v(2)%us,                   &
+                                           surf_lsm_v(2)%us,                   &
+                                           surf_usm_v(2)%us,                   &
+                                           surf_def_v(3)%us,                   &
+                                           surf_lsm_v(3)%us,                   &
+                                           surf_usm_v(3)%us, n_out ) 
+
+            CASE ( 'ts' )
+               CALL surface_output_sum_up( surf_def_h(0)%ts,                   &
+                                           surf_def_h(1)%ts,                   &
+                                           surf_lsm_h%ts,                      &
+                                           surf_usm_h%ts,                      &
+                                           surf_def_v(0)%ts,                   &
+                                           surf_lsm_v(0)%ts,                   &
+                                           surf_usm_v(0)%ts,                   &
+                                           surf_def_v(1)%ts,                   &
+                                           surf_lsm_v(1)%ts,                   &
+                                           surf_usm_v(1)%ts,                   &
+                                           surf_def_v(2)%ts,                   &
+                                           surf_lsm_v(2)%ts,                   &
+                                           surf_usm_v(2)%ts,                   &
+                                           surf_def_v(3)%ts,                   &
+                                           surf_lsm_v(3)%ts,                   &
+                                           surf_usm_v(3)%ts, n_out ) 
+
+            CASE ( 'qs' )
+               CALL surface_output_sum_up( surf_def_h(0)%qs,                   &
+                                           surf_def_h(1)%qs,                   &
+                                           surf_lsm_h%qs,                      &
+                                           surf_usm_h%qs,                      &
+                                           surf_def_v(0)%qs,                   &
+                                           surf_lsm_v(0)%qs,                   &
+                                           surf_usm_v(0)%qs,                   &
+                                           surf_def_v(1)%qs,                   &
+                                           surf_lsm_v(1)%qs,                   &
+                                           surf_usm_v(1)%qs,                   &
+                                           surf_def_v(2)%qs,                   &
+                                           surf_lsm_v(2)%qs,                   &
+                                           surf_usm_v(2)%qs,                   &
+                                           surf_def_v(3)%qs,                   &
+                                           surf_lsm_v(3)%qs,                   &
+                                           surf_usm_v(3)%qs, n_out ) 
+
+            CASE ( 'ss' )
+               CALL surface_output_sum_up( surf_def_h(0)%ss,                   &
+                                           surf_def_h(1)%ss,                   &
+                                           surf_lsm_h%ss,                      &
+                                           surf_usm_h%ss,                      &
+                                           surf_def_v(0)%ss,                   &
+                                           surf_lsm_v(0)%ss,                   &
+                                           surf_usm_v(0)%ss,                   &
+                                           surf_def_v(1)%ss,                   &
+                                           surf_lsm_v(1)%ss,                   &
+                                           surf_usm_v(1)%ss,                   &
+                                           surf_def_v(2)%ss,                   &
+                                           surf_lsm_v(2)%ss,                   &
+                                           surf_usm_v(2)%ss,                   &
+                                           surf_def_v(3)%ss,                   &
+                                           surf_lsm_v(3)%ss,                   &
+                                           surf_usm_v(3)%ss, n_out ) 
+
+            CASE ( 'qcs' )
+               CALL surface_output_sum_up( surf_def_h(0)%qcs,                  &
+                                           surf_def_h(1)%qcs,                  &
+                                           surf_lsm_h%qcs,                     &
+                                           surf_usm_h%qcs,                     &
+                                           surf_def_v(0)%qcs,                  &
+                                           surf_lsm_v(0)%qcs,                  &
+                                           surf_usm_v(0)%qcs,                  &
+                                           surf_def_v(1)%qcs,                  &
+                                           surf_lsm_v(1)%qcs,                  &
+                                           surf_usm_v(1)%qcs,                  &
+                                           surf_def_v(2)%qcs,                  &
+                                           surf_lsm_v(2)%qcs,                  &
+                                           surf_usm_v(2)%qcs,                  &
+                                           surf_def_v(3)%qcs,                  &
+                                           surf_lsm_v(3)%qcs,                  &
+                                           surf_usm_v(3)%qcs, n_out ) 
+
+            CASE ( 'ncs' )
+               CALL surface_output_sum_up( surf_def_h(0)%ncs,                  &
+                                           surf_def_h(1)%ncs,                  &
+                                           surf_lsm_h%ncs,                     &
+                                           surf_usm_h%ncs,                     &
+                                           surf_def_v(0)%ncs,                  &
+                                           surf_lsm_v(0)%ncs,                  &
+                                           surf_usm_v(0)%ncs,                  &
+                                           surf_def_v(1)%ncs,                  &
+                                           surf_lsm_v(1)%ncs,                  &
+                                           surf_usm_v(1)%ncs,                  &
+                                           surf_def_v(2)%ncs,                  &
+                                           surf_lsm_v(2)%ncs,                  &
+                                           surf_usm_v(2)%ncs,                  &
+                                           surf_def_v(3)%ncs,                  &
+                                           surf_lsm_v(3)%ncs,                  &
+                                           surf_usm_v(3)%ncs, n_out ) 
+
+            CASE ( 'qrs' )
+               CALL surface_output_sum_up( surf_def_h(0)%qrs,                  &
+                                           surf_def_h(1)%qrs,                  &
+                                           surf_lsm_h%qrs,                     &
+                                           surf_usm_h%qrs,                     &
+                                           surf_def_v(0)%qrs,                  &
+                                           surf_lsm_v(0)%qrs,                  &
+                                           surf_usm_v(0)%qrs,                  &
+                                           surf_def_v(1)%qrs,                  &
+                                           surf_lsm_v(1)%qrs,                  &
+                                           surf_usm_v(1)%qrs,                  &
+                                           surf_def_v(2)%qrs,                  &
+                                           surf_lsm_v(2)%qrs,                  &
+                                           surf_usm_v(2)%qrs,                  &
+                                           surf_def_v(3)%qrs,                  &
+                                           surf_lsm_v(3)%qrs,                  &
+                                           surf_usm_v(3)%qrs, n_out ) 
+
+            CASE ( 'nrs' )
+               CALL surface_output_sum_up( surf_def_h(0)%nrs,                  &
+                                           surf_def_h(1)%nrs,                  &
+                                           surf_lsm_h%nrs,                     &
+                                           surf_usm_h%nrs,                     &
+                                           surf_def_v(0)%nrs,                  &
+                                           surf_lsm_v(0)%nrs,                  &
+                                           surf_usm_v(0)%nrs,                  &
+                                           surf_def_v(1)%nrs,                  &
+                                           surf_lsm_v(1)%nrs,                  &
+                                           surf_usm_v(1)%nrs,                  &
+                                           surf_def_v(2)%nrs,                  &
+                                           surf_lsm_v(2)%nrs,                  &
+                                           surf_usm_v(2)%nrs,                  &
+                                           surf_def_v(3)%nrs,                  &
+                                           surf_lsm_v(3)%nrs,                  &
+                                           surf_usm_v(3)%nrs, n_out ) 
+
+            CASE ( 'ol' )
+               CALL surface_output_sum_up( surf_def_h(0)%ol,                   &
+                                           surf_def_h(1)%ol,                   &
+                                           surf_lsm_h%ol,                      &
+                                           surf_usm_h%ol,                      &
+                                           surf_def_v(0)%ol,                   &
+                                           surf_lsm_v(0)%ol,                   &
+                                           surf_usm_v(0)%ol,                   &
+                                           surf_def_v(1)%ol,                   &
+                                           surf_lsm_v(1)%ol,                   &
+                                           surf_usm_v(1)%ol,                   &
+                                           surf_def_v(2)%ol,                   &
+                                           surf_lsm_v(2)%ol,                   &
+                                           surf_usm_v(2)%ol,                   &
+                                           surf_def_v(3)%ol,                   &
+                                           surf_lsm_v(3)%ol,                   &
+                                           surf_usm_v(3)%ol, n_out ) 
+
+            CASE ( 'z0' )
+               CALL surface_output_sum_up( surf_def_h(0)%z0,                   &
+                                           surf_def_h(1)%z0,                   &
+                                           surf_lsm_h%z0,                      &
+                                           surf_usm_h%z0,                      &
+                                           surf_def_v(0)%z0,                   &
+                                           surf_lsm_v(0)%z0,                   &
+                                           surf_usm_v(0)%z0,                   &
+                                           surf_def_v(1)%z0,                   &
+                                           surf_lsm_v(1)%z0,                   &
+                                           surf_usm_v(1)%z0,                   &
+                                           surf_def_v(2)%z0,                   &
+                                           surf_lsm_v(2)%z0,                   &
+                                           surf_usm_v(2)%z0,                   &
+                                           surf_def_v(3)%z0,                   &
+                                           surf_lsm_v(3)%z0,                   &
+                                           surf_usm_v(3)%z0, n_out ) 
+
+            CASE ( 'z0h' )
+               CALL surface_output_sum_up( surf_def_h(0)%z0h,                  &
+                                           surf_def_h(1)%z0h,                  &
+                                           surf_lsm_h%z0h,                     &
+                                           surf_usm_h%z0h,                     &
+                                           surf_def_v(0)%z0h,                  &
+                                           surf_lsm_v(0)%z0h,                  &
+                                           surf_usm_v(0)%z0h,                  &
+                                           surf_def_v(1)%z0h,                  &
+                                           surf_lsm_v(1)%z0h,                  &
+                                           surf_usm_v(1)%z0h,                  &
+                                           surf_def_v(2)%z0h,                  &
+                                           surf_lsm_v(2)%z0h,                  &
+                                           surf_usm_v(2)%z0h,                  &
+                                           surf_def_v(3)%z0h,                  &
+                                           surf_lsm_v(3)%z0h,                  &
+                                           surf_usm_v(3)%z0h, n_out )          
+
+            CASE ( 'z0q' )
+               CALL surface_output_sum_up( surf_def_h(0)%z0q,                  &
+                                           surf_def_h(1)%z0q,                  &
+                                           surf_lsm_h%z0q,                     &
+                                           surf_usm_h%z0q,                     &
+                                           surf_def_v(0)%z0q,                  &
+                                           surf_lsm_v(0)%z0q,                  &
+                                           surf_usm_v(0)%z0q,                  &
+                                           surf_def_v(1)%z0q,                  &
+                                           surf_lsm_v(1)%z0q,                  &
+                                           surf_usm_v(1)%z0q,                  &
+                                           surf_def_v(2)%z0q,                  &
+                                           surf_lsm_v(2)%z0q,                  &
+                                           surf_usm_v(2)%z0q,                  &
+                                           surf_def_v(3)%z0q,                  &
+                                           surf_lsm_v(3)%z0q,                  &
+                                           surf_usm_v(3)%z0q, n_out ) 
+
+            CASE ( 'theta1' )                                                  
+               CALL surface_output_sum_up( surf_def_h(0)%pt1,                  &
+                                           surf_def_h(1)%pt1,                  &
+                                           surf_lsm_h%pt1,                     &
+                                           surf_usm_h%pt1,                     &
+                                           surf_def_v(0)%pt1,                  &
+                                           surf_lsm_v(0)%pt1,                  &
+                                           surf_usm_v(0)%pt1,                  &
+                                           surf_def_v(1)%pt1,                  &
+                                           surf_lsm_v(1)%pt1,                  &
+                                           surf_usm_v(1)%pt1,                  &
+                                           surf_def_v(2)%pt1,                  &
+                                           surf_lsm_v(2)%pt1,                  &
+                                           surf_usm_v(2)%pt1,                  &
+                                           surf_def_v(3)%pt1,                  &
+                                           surf_lsm_v(3)%pt1,                  &
+                                           surf_usm_v(3)%pt1, n_out )          
+                                                                               
+            CASE ( 'qv1' )                                                     
+               CALL surface_output_sum_up( surf_def_h(0)%qv1,                  &
+                                           surf_def_h(1)%qv1,                  &
+                                           surf_lsm_h%qv1,                     &
+                                           surf_usm_h%qv1,                     &
+                                           surf_def_v(0)%qv1,                  &
+                                           surf_lsm_v(0)%qv1,                  &
+                                           surf_usm_v(0)%qv1,                  &
+                                           surf_def_v(1)%qv1,                  &
+                                           surf_lsm_v(1)%qv1,                  &
+                                           surf_usm_v(1)%qv1,                  &
+                                           surf_def_v(2)%qv1,                  &
+                                           surf_lsm_v(2)%qv1,                  &
+                                           surf_usm_v(2)%qv1,                  &
+                                           surf_def_v(3)%qv1,                  &
+                                           surf_lsm_v(3)%qv1,                  &
+                                           surf_usm_v(3)%qv1, n_out ) 
+
+            CASE ( 'thetav1' )
+               CALL surface_output_sum_up( surf_def_h(0)%vpt1,                 &
+                                           surf_def_h(1)%vpt1,                 &
+                                           surf_lsm_h%vpt1,                    &
+                                           surf_usm_h%vpt1,                    &
+                                           surf_def_v(0)%vpt1,                 &
+                                           surf_lsm_v(0)%vpt1,                 &
+                                           surf_usm_v(0)%vpt1,                 &
+                                           surf_def_v(1)%vpt1,                 &
+                                           surf_lsm_v(1)%vpt1,                 &
+                                           surf_usm_v(1)%vpt1,                 &
+                                           surf_def_v(2)%vpt1,                 &
+                                           surf_lsm_v(2)%vpt1,                 &
+                                           surf_usm_v(2)%vpt1,                 &
+                                           surf_def_v(3)%vpt1,                 &
+                                           surf_lsm_v(3)%vpt1,                 &
+                                           surf_usm_v(3)%vpt1, n_out ) 
+
+            CASE ( 'usws' )
+               CALL surface_output_sum_up( surf_def_h(0)%usws,                 &
+                                           surf_def_h(1)%usws,                 &
+                                           surf_lsm_h%usws,                    &
+                                           surf_usm_h%usws,                    &
+                                           surf_def_v(0)%usws,                 &
+                                           surf_lsm_v(0)%usws,                 &
+                                           surf_usm_v(0)%usws,                 &
+                                           surf_def_v(1)%usws,                 &
+                                           surf_lsm_v(1)%usws,                 &
+                                           surf_usm_v(1)%usws,                 &
+                                           surf_def_v(2)%usws,                 &
+                                           surf_lsm_v(2)%usws,                 &
+                                           surf_usm_v(2)%usws,                 &
+                                           surf_def_v(3)%usws,                 &
+                                           surf_lsm_v(3)%usws,                 &
+                                           surf_usm_v(3)%usws, n_out ) 
+
+            CASE ( 'vsws' )
+               CALL surface_output_sum_up( surf_def_h(0)%vsws,                 &
+                                           surf_def_h(1)%vsws,                 &
+                                           surf_lsm_h%vsws,                    &
+                                           surf_usm_h%vsws,                    &
+                                           surf_def_v(0)%vsws,                 &
+                                           surf_lsm_v(0)%vsws,                 &
+                                           surf_usm_v(0)%vsws,                 &
+                                           surf_def_v(1)%vsws,                 &
+                                           surf_lsm_v(1)%vsws,                 &
+                                           surf_usm_v(1)%vsws,                 &
+                                           surf_def_v(2)%vsws,                 &
+                                           surf_lsm_v(2)%vsws,                 &
+                                           surf_usm_v(2)%vsws,                 &
+                                           surf_def_v(3)%vsws,                 &
+                                           surf_lsm_v(3)%vsws,                 &
+                                           surf_usm_v(3)%vsws, n_out ) 
+
+            CASE ( 'shf' )
+               CALL surface_output_sum_up( surf_def_h(0)%shf,                  &
+                                           surf_def_h(1)%shf,                  &
+                                           surf_lsm_h%shf,                     &
+                                           surf_usm_h%shf,                     &  
+                                           surf_def_v(0)%shf,                  &
+                                           surf_lsm_v(0)%shf,                  &
+                                           surf_usm_v(0)%shf,                  &
+                                           surf_def_v(1)%shf,                  &
+                                           surf_lsm_v(1)%shf,                  &
+                                           surf_usm_v(1)%shf,                  &
+                                           surf_def_v(2)%shf,                  &
+                                           surf_lsm_v(2)%shf,                  &
+                                           surf_usm_v(2)%shf,                  &
+                                           surf_def_v(3)%shf,                  &
+                                           surf_lsm_v(3)%shf,                  &
+                                           surf_usm_v(3)%shf, n_out )
+
+            CASE ( 'qsws' )
+               CALL surface_output_sum_up( surf_def_h(0)%qsws,                 &
+                                           surf_def_h(1)%qsws,                 &
+                                           surf_lsm_h%qsws,                    &
+                                           surf_usm_h%qsws,                    &
+                                           surf_def_v(0)%qsws,                 &
+                                           surf_lsm_v(0)%qsws,                 &
+                                           surf_usm_v(0)%qsws,                 &
+                                           surf_def_v(1)%qsws,                 &
+                                           surf_lsm_v(1)%qsws,                 &
+                                           surf_usm_v(1)%qsws,                 &
+                                           surf_def_v(2)%qsws,                 &
+                                           surf_lsm_v(2)%qsws,                 &
+                                           surf_usm_v(2)%qsws,                 &
+                                           surf_def_v(3)%qsws,                 &
+                                           surf_lsm_v(3)%qsws,                 &
+                                           surf_usm_v(3)%qsws, n_out ) 
+
+            CASE ( 'ssws' )
+               CALL surface_output_sum_up( surf_def_h(0)%ssws,                 &
+                                           surf_def_h(1)%ssws,                 &
+                                           surf_lsm_h%ssws,                    &
+                                           surf_usm_h%ssws,                    &
+                                           surf_def_v(0)%ssws,                 &
+                                           surf_lsm_v(0)%ssws,                 &
+                                           surf_usm_v(0)%ssws,                 &
+                                           surf_def_v(1)%ssws,                 &
+                                           surf_lsm_v(1)%ssws,                 &
+                                           surf_usm_v(1)%ssws,                 &
+                                           surf_def_v(2)%ssws,                 &
+                                           surf_lsm_v(2)%ssws,                 &
+                                           surf_usm_v(2)%ssws,                 &
+                                           surf_def_v(3)%ssws,                 &
+                                           surf_lsm_v(3)%ssws,                 &
+                                           surf_usm_v(3)%ssws, n_out ) 
+
+            CASE ( 'qcsws' )
+               CALL surface_output_sum_up( surf_def_h(0)%qcsws,                &
+                                           surf_def_h(1)%qcsws,                &
+                                           surf_lsm_h%qcsws,                   &
+                                           surf_usm_h%qcsws,                   &
+                                           surf_def_v(0)%qcsws,                &
+                                           surf_lsm_v(0)%qcsws,                &
+                                           surf_usm_v(0)%qcsws,                &
+                                           surf_def_v(1)%qcsws,                &
+                                           surf_lsm_v(1)%qcsws,                &
+                                           surf_usm_v(1)%qcsws,                &
+                                           surf_def_v(2)%qcsws,                &
+                                           surf_lsm_v(2)%qcsws,                &
+                                           surf_usm_v(2)%qcsws,                &
+                                           surf_def_v(3)%qcsws,                &
+                                           surf_lsm_v(3)%qcsws,                &
+                                           surf_usm_v(3)%qcsws, n_out ) 
+
+            CASE ( 'ncsws' )
+               CALL surface_output_sum_up( surf_def_h(0)%ncsws,                &
+                                           surf_def_h(1)%ncsws,                &
+                                           surf_lsm_h%ncsws,                   &
+                                           surf_usm_h%ncsws,                   &
+                                           surf_def_v(0)%ncsws,                &
+                                           surf_lsm_v(0)%ncsws,                &
+                                           surf_usm_v(0)%ncsws,                &
+                                           surf_def_v(1)%ncsws,                &
+                                           surf_lsm_v(1)%ncsws,                &
+                                           surf_usm_v(1)%ncsws,                &
+                                           surf_def_v(2)%ncsws,                &
+                                           surf_lsm_v(2)%ncsws,                &
+                                           surf_usm_v(2)%ncsws,                &
+                                           surf_def_v(3)%ncsws,                &
+                                           surf_lsm_v(3)%ncsws,                &
+                                           surf_usm_v(3)%ncsws, n_out ) 
+
+            CASE ( 'qrsws' )
+               CALL surface_output_sum_up( surf_def_h(0)%qrsws,                &
+                                           surf_def_h(1)%qrsws,                &
+                                           surf_lsm_h%qrsws,                   &
+                                           surf_usm_h%qrsws,                   &
+                                           surf_def_v(0)%qrsws,                &
+                                           surf_lsm_v(0)%qrsws,                &
+                                           surf_usm_v(0)%qrsws,                &
+                                           surf_def_v(1)%qrsws,                &
+                                           surf_lsm_v(1)%qrsws,                &
+                                           surf_usm_v(1)%qrsws,                &
+                                           surf_def_v(2)%qrsws,                &
+                                           surf_lsm_v(2)%qrsws,                &
+                                           surf_usm_v(2)%qrsws,                &
+                                           surf_def_v(3)%qrsws,                &
+                                           surf_lsm_v(3)%qrsws,                &
+                                           surf_usm_v(3)%qrsws, n_out ) 
+
+            CASE ( 'nrsws' )
+               CALL surface_output_sum_up( surf_def_h(0)%nrsws,                &
+                                           surf_def_h(1)%nrsws,                &
+                                           surf_lsm_h%nrsws,                   &
+                                           surf_usm_h%nrsws,                   &
+                                           surf_def_v(0)%nrsws,                &
+                                           surf_lsm_v(0)%nrsws,                &
+                                           surf_usm_v(0)%nrsws,                &
+                                           surf_def_v(1)%nrsws,                &
+                                           surf_lsm_v(1)%nrsws,                &
+                                           surf_usm_v(1)%nrsws,                &
+                                           surf_def_v(2)%nrsws,                &
+                                           surf_lsm_v(2)%nrsws,                &
+                                           surf_usm_v(2)%nrsws,                &
+                                           surf_def_v(3)%nrsws,                &
+                                           surf_lsm_v(3)%nrsws,                &
+                                           surf_usm_v(3)%nrsws, n_out ) 
+
+            CASE ( 'sasws' )
+               CALL surface_output_sum_up( surf_def_h(0)%sasws,                &
+                                           surf_def_h(1)%sasws,                &
+                                           surf_lsm_h%sasws,                   &
+                                           surf_usm_h%sasws,                   &
+                                           surf_def_v(0)%sasws,                &
+                                           surf_lsm_v(0)%sasws,                &
+                                           surf_usm_v(0)%sasws,                &
+                                           surf_def_v(1)%sasws,                &
+                                           surf_lsm_v(1)%sasws,                &
+                                           surf_usm_v(1)%sasws,                &
+                                           surf_def_v(2)%sasws,                &
+                                           surf_lsm_v(2)%sasws,                &
+                                           surf_usm_v(2)%sasws,                &
+                                           surf_def_v(3)%sasws,                &
+                                           surf_lsm_v(3)%sasws,                &
+                                           surf_usm_v(3)%sasws, n_out ) 
+
+            CASE ( 'q_surface' )
+               CALL surface_output_sum_up( surf_def_h(0)%q_surface,            &
+                                           surf_def_h(1)%q_surface,            &
+                                           surf_lsm_h%q_surface,               &
+                                           surf_usm_h%q_surface,               &
+                                           surf_def_v(0)%q_surface,            &
+                                           surf_lsm_v(0)%q_surface,            &
+                                           surf_usm_v(0)%q_surface,            &
+                                           surf_def_v(1)%q_surface,            &
+                                           surf_lsm_v(1)%q_surface,            &
+                                           surf_usm_v(1)%q_surface,            &
+                                           surf_def_v(2)%q_surface,            &
+                                           surf_lsm_v(2)%q_surface,            &
+                                           surf_usm_v(2)%q_surface,            &
+                                           surf_def_v(3)%q_surface,            &
+                                           surf_lsm_v(3)%q_surface,            &
+                                           surf_usm_v(3)%q_surface, n_out ) 
+
+            CASE ( 'theta_surface' )
+               CALL surface_output_sum_up( surf_def_h(0)%pt_surface,           &
+                                           surf_def_h(1)%pt_surface,           &
+                                           surf_lsm_h%pt_surface,              &
+                                           surf_usm_h%pt_surface,              &
+                                           surf_def_v(0)%pt_surface,           &
+                                           surf_lsm_v(0)%pt_surface,           &
+                                           surf_usm_v(0)%pt_surface,           &
+                                           surf_def_v(1)%pt_surface,           &
+                                           surf_lsm_v(1)%pt_surface,           &
+                                           surf_usm_v(1)%pt_surface,           &
+                                           surf_def_v(2)%pt_surface,           &
+                                           surf_lsm_v(2)%pt_surface,           &
+                                           surf_usm_v(2)%pt_surface,           &
+                                           surf_def_v(3)%pt_surface,           &
+                                           surf_lsm_v(3)%pt_surface,           &
+                                           surf_usm_v(3)%pt_surface, n_out ) 
+
+            CASE ( 'thetav_surface' )
+               CALL surface_output_sum_up( surf_def_h(0)%vpt_surface,          &
+                                           surf_def_h(1)%vpt_surface,          &
+                                           surf_lsm_h%vpt_surface,             &
+                                           surf_usm_h%vpt_surface,             &
+                                           surf_def_v(0)%vpt_surface,          &
+                                           surf_lsm_v(0)%vpt_surface,          &
+                                           surf_usm_v(0)%vpt_surface,          &
+                                           surf_def_v(1)%vpt_surface,          &
+                                           surf_lsm_v(1)%vpt_surface,          &
+                                           surf_usm_v(1)%vpt_surface,          &
+                                           surf_def_v(2)%vpt_surface,          &
+                                           surf_lsm_v(2)%vpt_surface,          &
+                                           surf_usm_v(2)%vpt_surface,          &
+                                           surf_def_v(3)%vpt_surface,          &
+                                           surf_lsm_v(3)%vpt_surface,          &
+                                           surf_usm_v(3)%vpt_surface, n_out ) 
+
+            CASE ( 'rad_net' )
+               CALL surface_output_sum_up( surf_def_h(0)%rad_net,              &
+                                           surf_def_h(1)%rad_net,              &
+                                           surf_lsm_h%rad_net,                 &
+                                           surf_usm_h%rad_net,                 &
+                                           surf_def_v(0)%rad_net,              &
+                                           surf_lsm_v(0)%rad_net,              &
+                                           surf_usm_v(0)%rad_net,              &
+                                           surf_def_v(1)%rad_net,              &
+                                           surf_lsm_v(1)%rad_net,              &
+                                           surf_usm_v(1)%rad_net,              &
+                                           surf_def_v(2)%rad_net,              &
+                                           surf_lsm_v(2)%rad_net,              &
+                                           surf_usm_v(2)%rad_net,              &
+                                           surf_def_v(3)%rad_net,              &
+                                           surf_lsm_v(3)%rad_net,              &
+                                           surf_usm_v(3)%rad_net, n_out ) 
+
+            CASE ( 'rad_lw_in' )
+               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_in,            &
+                                           surf_def_h(1)%rad_lw_in,            &
+                                           surf_lsm_h%rad_lw_in,               &
+                                           surf_usm_h%rad_lw_in,               &
+                                           surf_def_v(0)%rad_lw_in,            &
+                                           surf_lsm_v(0)%rad_lw_in,            &
+                                           surf_usm_v(0)%rad_lw_in,            &
+                                           surf_def_v(1)%rad_lw_in,            &
+                                           surf_lsm_v(1)%rad_lw_in,            &
+                                           surf_usm_v(1)%rad_lw_in,            &
+                                           surf_def_v(2)%rad_lw_in,            &
+                                           surf_lsm_v(2)%rad_lw_in,            &
+                                           surf_usm_v(2)%rad_lw_in,            &
+                                           surf_def_v(3)%rad_lw_in,            &
+                                           surf_lsm_v(3)%rad_lw_in,            &
+                                           surf_usm_v(3)%rad_lw_in, n_out ) 
+
+            CASE ( 'rad_lw_out' )
+               CALL surface_output_sum_up( surf_def_h(0)%rad_lw_out,           &
+                                           surf_def_h(1)%rad_lw_out,           &
+                                           surf_lsm_h%rad_lw_out,              &
+                                           surf_usm_h%rad_lw_out,              &
+                                           surf_def_v(0)%rad_lw_out,           &
+                                           surf_lsm_v(0)%rad_lw_out,           &
+                                           surf_usm_v(0)%rad_lw_out,           &
+                                           surf_def_v(1)%rad_lw_out,           &
+                                           surf_lsm_v(1)%rad_lw_out,           &
+                                           surf_usm_v(1)%rad_lw_out,           &
+                                           surf_def_v(2)%rad_lw_out,           &
+                                           surf_lsm_v(2)%rad_lw_out,           &
+                                           surf_usm_v(2)%rad_lw_out,           &
+                                           surf_def_v(3)%rad_lw_out,           &
+                                           surf_lsm_v(3)%rad_lw_out,           &
+                                           surf_usm_v(3)%rad_lw_out, n_out ) 
+
+            CASE ( 'rad_sw_in' )
+               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_in,            &
+                                           surf_def_h(1)%rad_sw_in,            &
+                                           surf_lsm_h%rad_sw_in,               &
+                                           surf_usm_h%rad_sw_in,               &
+                                           surf_def_v(0)%rad_sw_in,            &
+                                           surf_lsm_v(0)%rad_sw_in,            &
+                                           surf_usm_v(0)%rad_sw_in,            &
+                                           surf_def_v(1)%rad_sw_in,            &
+                                           surf_lsm_v(1)%rad_sw_in,            &
+                                           surf_usm_v(1)%rad_sw_in,            &
+                                           surf_def_v(2)%rad_sw_in,            &
+                                           surf_lsm_v(2)%rad_sw_in,            &
+                                           surf_usm_v(2)%rad_sw_in,            &
+                                           surf_def_v(3)%rad_sw_in,            &
+                                           surf_lsm_v(3)%rad_sw_in,            &
+                                           surf_usm_v(3)%rad_sw_in, n_out ) 
+
+            CASE ( 'rad_sw_out' )
+               CALL surface_output_sum_up( surf_def_h(0)%rad_sw_out,           &
+                                           surf_def_h(1)%rad_sw_out,           &
+                                           surf_lsm_h%rad_sw_out,              &
+                                           surf_usm_h%rad_sw_out,              &
+                                           surf_def_v(0)%rad_sw_out,           &
+                                           surf_lsm_v(0)%rad_sw_out,           &
+                                           surf_usm_v(0)%rad_sw_out,           &
+                                           surf_def_v(1)%rad_sw_out,           &
+                                           surf_lsm_v(1)%rad_sw_out,           &
+                                           surf_usm_v(1)%rad_sw_out,           &
+                                           surf_def_v(2)%rad_sw_out,           &
+                                           surf_lsm_v(2)%rad_sw_out,           &
+                                           surf_usm_v(2)%rad_sw_out,           &
+                                           surf_def_v(3)%rad_sw_out,           &
+                                           surf_lsm_v(3)%rad_sw_out,           &
+                                           surf_usm_v(3)%rad_sw_out, n_out ) 
+
+            CASE ( 'ghf' )
+               CALL surface_output_sum_up( surf_def_h(0)%ghf,                  &
+                                           surf_def_h(1)%ghf,                  &
+                                           surf_lsm_h%ghf,                     &
+                                           surf_usm_h%ghf,                     &
+                                           surf_def_v(0)%ghf,                  &
+                                           surf_lsm_v(0)%ghf,                  &
+                                           surf_usm_v(0)%ghf,                  &
+                                           surf_def_v(1)%ghf,                  &
+                                           surf_lsm_v(1)%ghf,                  &
+                                           surf_usm_v(1)%ghf,                  &
+                                           surf_def_v(2)%ghf,                  &
+                                           surf_lsm_v(2)%ghf,                  &
+                                           surf_usm_v(2)%ghf,                  &
+                                           surf_def_v(3)%ghf,                  &
+                                           surf_lsm_v(3)%ghf,                  &
+                                           surf_usm_v(3)%ghf, n_out )          
+                                                                               
+            CASE ( 'r_a' )                                                     
+               CALL surface_output_sum_up( surf_def_h(0)%r_a,                  &
+                                           surf_def_h(1)%r_a,                  &
+                                           surf_lsm_h%r_a,                     &
+                                           surf_usm_h%r_a,                     &
+                                           surf_def_v(0)%r_a,                  &
+                                           surf_lsm_v(0)%r_a,                  &
+                                           surf_usm_v(0)%r_a,                  &
+                                           surf_def_v(1)%r_a,                  &
+                                           surf_lsm_v(1)%r_a,                  &
+                                           surf_usm_v(1)%r_a,                  &
+                                           surf_def_v(2)%r_a,                  &
+                                           surf_lsm_v(2)%r_a,                  &
+                                           surf_usm_v(2)%r_a,                  &
+                                           surf_def_v(3)%r_a,                  &
+                                           surf_lsm_v(3)%r_a,                  &
+                                           surf_usm_v(3)%r_a, n_out )          
+                                                                               
+            CASE ( 'r_soil' )                                                  
+               CALL surface_output_sum_up( surf_def_h(0)%r_soil,               &
+                                           surf_def_h(1)%r_soil,               &
+                                           surf_lsm_h%r_soil,                  &
+                                           surf_usm_h%r_soil,                  &
+                                           surf_def_v(0)%r_soil,               &
+                                           surf_lsm_v(0)%r_soil,               &
+                                           surf_usm_v(0)%r_soil,               &
+                                           surf_def_v(1)%r_soil,               &
+                                           surf_lsm_v(1)%r_soil,               &
+                                           surf_usm_v(1)%r_soil,               &
+                                           surf_def_v(2)%r_soil,               &
+                                           surf_lsm_v(2)%r_soil,               &
+                                           surf_usm_v(2)%r_soil,               &
+                                           surf_def_v(3)%r_soil,               &
+                                           surf_lsm_v(3)%r_soil,               &
+                                           surf_usm_v(3)%r_soil, n_out ) 
+
+            CASE ( 'r_canopy' )
+               CALL surface_output_sum_up( surf_def_h(0)%r_canopy,             &
+                                           surf_def_h(1)%r_canopy,             &
+                                           surf_lsm_h%r_canopy,                &
+                                           surf_usm_h%r_canopy,                &
+                                           surf_def_v(0)%r_canopy,             &
+                                           surf_lsm_v(0)%r_canopy,             &
+                                           surf_usm_v(0)%r_canopy,             &
+                                           surf_def_v(1)%r_canopy,             &
+                                           surf_lsm_v(1)%r_canopy,             &
+                                           surf_usm_v(1)%r_canopy,             &
+                                           surf_def_v(2)%r_canopy,             &
+                                           surf_lsm_v(2)%r_canopy,             &
+                                           surf_usm_v(2)%r_canopy,             &
+                                           surf_def_v(3)%r_canopy,             &
+                                           surf_lsm_v(3)%r_canopy,             &
+                                           surf_usm_v(3)%r_canopy, n_out ) 
+
+            CASE ( 'r_s' )
+               CALL surface_output_sum_up( surf_def_h(0)%r_s,                  &
+                                           surf_def_h(1)%r_s,                  &
+                                           surf_lsm_h%r_s,                     &
+                                           surf_usm_h%r_s,                     &
+                                           surf_def_v(0)%r_s,                  &
+                                           surf_lsm_v(0)%r_s,                  &
+                                           surf_usm_v(0)%r_s,                  &
+                                           surf_def_v(1)%r_s,                  &
+                                           surf_lsm_v(1)%r_s,                  &
+                                           surf_usm_v(1)%r_s,                  &
+                                           surf_def_v(2)%r_s,                  &
+                                           surf_lsm_v(2)%r_s,                  &
+                                           surf_usm_v(2)%r_s,                  &
+                                           surf_def_v(3)%r_s,                  &
+                                           surf_lsm_v(3)%r_s,                  &
+                                           surf_usm_v(3)%r_s, n_out ) 
+
+         END SELECT
+      ENDDO
+      
+   
+   END SUBROUTINE surface_output_averaging
+   
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sum-up the surface data for average output variables.  
+!------------------------------------------------------------------------------!   
+   SUBROUTINE surface_output_sum_up(  var_def_h0, var_def_h1,                  &
+                                      var_lsm_h, var_usm_h,                    &
+                                      var_def_v0, var_def_v1, var_def_v2,      &
+                                      var_def_v3,                              &
+                                      var_lsm_v0, var_lsm_v1, var_lsm_v2,      &
+                                      var_lsm_v3,                              &
+                                      var_usm_v0, var_usm_v1, var_usm_v2,      &
+                                      var_usm_v3, n_out )
+   
+      IMPLICIT NONE
+
+      INTEGER(iwp) ::  m          !< running index for surface elements
+      INTEGER(iwp) ::  n_out      !< index for output variable
+      INTEGER(iwp) ::  n_surf     !< running index for surface elements
+      
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_h0 !< output variable at upward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_h1 !< output variable at downward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_h  !< output variable at upward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_h  !< output variable at upward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v0 !< output variable at northward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v1 !< output variable at southward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v2 !< output variable at eastward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v3 !< output variable at westward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v0 !< output variable at northward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v1 !< output variable at southward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v2 !< output variable at eastward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v3 !< output variable at westward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v0 !< output variable at northward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v1 !< output variable at southward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v2 !< output variable at eastward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v3 !< output variable at westward-facing urban-type surfaces
+     
+!     
+!--   Set counter variable to zero before the variable is written to 
+!--   the output array. 
+      n_surf = 0
+      
+!
+!--   Write the horizontal surfaces.
+!--   Before each the variable is written to the output data structure, first 
+!--   check if the variable for the respective surface type is defined. 
+!--   If a variable is not defined, skip the block and increment the counter
+!--   variable by the number of surface elements of this type. Usually this 
+!--   is zere, however, there might be the situation that e.g. urban surfaces
+!--   are defined but the respective variable is not allocated for this surface
+!--   type. To write the data on the exact position, increment the counter. 
+      IF ( ALLOCATED( var_def_h0 ) )  THEN
+         DO  m = 1, surf_def_h(0)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_def_h0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_h(0)%ns  
+      ENDIF
+      IF ( ALLOCATED( var_def_h1 ) )  THEN
+         DO  m = 1, surf_def_h(1)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_def_h1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_h(1)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_h ) )  THEN
+         DO  m = 1, surf_lsm_h%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_lsm_h(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_h%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_h ) )  THEN
+         DO  m = 1, surf_usm_h%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_usm_h(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_h%ns
+      ENDIF
+!
+!--   Write northward-facing
+      IF ( ALLOCATED( var_def_v0 ) )  THEN
+         DO  m = 1, surf_def_v(0)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_def_v0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(0)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v0 ) )  THEN
+         DO  m = 1, surf_lsm_v(0)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_lsm_v0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(0)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v0 ) )  THEN
+         DO  m = 1, surf_usm_v(0)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_usm_v0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(0)%ns
+      ENDIF
+!
+!--   Write southward-facing
+      IF ( ALLOCATED( var_def_v1 ) )  THEN
+         DO  m = 1, surf_def_v(1)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_def_v1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(1)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v1 ) )  THEN
+         DO  m = 1, surf_lsm_v(1)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_lsm_v1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(1)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v1 ) )  THEN
+         DO  m = 1, surf_usm_v(1)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_usm_v1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(1)%ns
+      ENDIF
+!
+!--   Write eastward-facing
+      IF ( ALLOCATED( var_def_v2 ) )  THEN
+         DO  m = 1, surf_def_v(2)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_def_v2(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(2)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v2 ) )  THEN
+         DO  m = 1, surf_lsm_v(2)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_lsm_v2(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(2)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v2 ) )  THEN
+         DO  m = 1, surf_usm_v(2)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_usm_v2(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(2)%ns
+      ENDIF
+!
+!--   Write westward-facing
+      IF ( ALLOCATED( var_def_v3 ) )  THEN
+         DO  m = 1, surf_def_v(3)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_def_v3(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(3)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v3 ) )  THEN
+         DO  m = 1, surf_lsm_v(3)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_lsm_v3(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(3)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v3 ) )  THEN
+         DO  m = 1, surf_usm_v(3)%ns 
+            n_surf                        = n_surf + 1
+            surfaces%var_av(n_surf,n_out) = surfaces%var_av(n_surf,n_out)      &
+                                          + var_usm_v3(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(3)%ns
+      ENDIF
+   
+   END SUBROUTINE surface_output_sum_up
+   
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Collect the surface data from different types and different orientation.
+!------------------------------------------------------------------------------!
+   SUBROUTINE surface_output_collect( var_def_h0, var_def_h1,                  &
+                                      var_lsm_h, var_usm_h,                    &
+                                      var_def_v0, var_def_v1, var_def_v2,      &
+                                      var_def_v3,                              &
+                                      var_lsm_v0, var_lsm_v1, var_lsm_v2,      &
+                                      var_lsm_v3,                              &
+                                      var_usm_v0, var_usm_v1, var_usm_v2,      &
+                                      var_usm_v3 )
+   
+      IMPLICIT NONE
+
+      INTEGER(iwp) ::  m      !< running index for surface elements
+      INTEGER(iwp) ::  n_surf !< running index for surface elements
+      
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_h0 !< output variable at upward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_h1 !< output variable at downward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_h  !< output variable at upward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_h  !< output variable at upward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v0 !< output variable at northward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v1 !< output variable at southward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v2 !< output variable at eastward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_def_v3 !< output variable at westward-facing default-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v0 !< output variable at northward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v1 !< output variable at southward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v2 !< output variable at eastward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_lsm_v3 !< output variable at westward-facing natural-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v0 !< output variable at northward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v1 !< output variable at southward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v2 !< output variable at eastward-facing urban-type surfaces
+      REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(IN) ::  var_usm_v3 !< output variable at westward-facing urban-type surfaces
+     
+!     
+!--   Set counter variable to zero before the variable is written to 
+!--   the output array. 
+      n_surf = 0
+      
+!
+!--   Write the horizontal surfaces.
+!--   Before each the variable is written to the output data structure, first 
+!--   check if the variable for the respective surface type is defined. 
+!--   If a variable is not defined, skip the block and increment the counter
+!--   variable by the number of surface elements of this type. Usually this 
+!--   is zere, however, there might be the situation that e.g. urban surfaces
+!--   are defined but the respective variable is not allocated for this surface
+!--   type. To write the data on the exact position, increment the counter. 
+      IF ( ALLOCATED( var_def_h0 ) )  THEN
+         DO  m = 1, surf_def_h(0)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_def_h0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_h(0)%ns  
+      ENDIF
+      IF ( ALLOCATED( var_def_h1 ) )  THEN
+         DO  m = 1, surf_def_h(1)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_def_h1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_h(1)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_h ) )  THEN
+         DO  m = 1, surf_lsm_h%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_lsm_h(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_h%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_h ) )  THEN
+         DO  m = 1, surf_usm_h%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_usm_h(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_h%ns
+      ENDIF
+!
+!--   Write northward-facing
+      IF ( ALLOCATED( var_def_v0 ) )  THEN
+         DO  m = 1, surf_def_v(0)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_def_v0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(0)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v0 ) )  THEN
+         DO  m = 1, surf_lsm_v(0)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_lsm_v0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(0)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v0 ) )  THEN
+         DO  m = 1, surf_usm_v(0)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_usm_v0(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(0)%ns
+      ENDIF
+!
+!--   Write southward-facing
+      IF ( ALLOCATED( var_def_v1 ) )  THEN
+         DO  m = 1, surf_def_v(1)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_def_v1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(1)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v1 ) )  THEN
+         DO  m = 1, surf_lsm_v(1)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_lsm_v1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(1)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v1 ) )  THEN
+         DO  m = 1, surf_usm_v(1)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_usm_v1(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(1)%ns
+      ENDIF
+!
+!--   Write eastward-facing
+      IF ( ALLOCATED( var_def_v2 ) )  THEN
+         DO  m = 1, surf_def_v(2)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_def_v2(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(2)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v2 ) )  THEN
+         DO  m = 1, surf_lsm_v(2)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_lsm_v2(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(2)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v2 ) )  THEN
+         DO  m = 1, surf_usm_v(2)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_usm_v2(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(2)%ns
+      ENDIF
+!
+!--   Write westward-facing
+      IF ( ALLOCATED( var_def_v3 ) )  THEN
+         DO  m = 1, surf_def_v(3)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_def_v3(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_def_v(3)%ns
+      ENDIF
+      IF ( ALLOCATED( var_lsm_v3 ) )  THEN
+         DO  m = 1, surf_lsm_v(3)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_lsm_v3(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_lsm_v(3)%ns
+      ENDIF
+      IF ( ALLOCATED( var_usm_v3 ) )  THEN
+         DO  m = 1, surf_usm_v(3)%ns 
+            n_surf                   = n_surf + 1
+            surfaces%var_out(n_surf) = var_usm_v3(m)
+         ENDDO
+      ELSE
+         n_surf = n_surf + surf_usm_v(3)%ns
+      ENDIF
+   
+   END SUBROUTINE surface_output_collect
+   
+   
+   
+!    SUBROUTINE data_output_surf_driver (time)
+!       IMPLICIT NONE
+! 
+!       REAL(kind=wp),INTENT(IN)    :: time
+!       CHARACTER(LEN=64)           :: filename
+!       INTEGER,SAVE                :: file_number=1
+! 
+!       if(output_mode == "legacy_VTK")   then
+!           CALL prepare_vtk_data
+! 
+!           write(filename,'(a,i5.5,a)') 'surface_output_',file_number,'.vtk'
+!           if(myid == surf_io_pe)   write(9,*) 'Legacy VTK surface output to file: ',trim(filename)
+!           file_number = file_number+1
+! 
+!           CALL write_ascii_vtk (filename, time)
+!       END IF
+! 
+!       RETURN
+!    END SUBROUTINE data_output_surf_driver
+   
+   
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for output of surface parameters
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_output_parin
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
+       
+
+       NAMELIST /surface_output_parameters/                                    &
+                                  averaging_interval_surf, data_output_surf,   &
+                                  dt_dosurf, dt_dosurf_av,                     &
+                                  skip_time_dosurf, skip_time_dosurf_av
+                                  
+       line = ' '
+  
+!
+!--    Try to find the namelist
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&surface_output_parameters' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read namelist
+       READ ( 11, surface_output_parameters, ERR = 10 )
+!
+!--    Set flag that indicates that surface data output is switched on
+       surface_data_output = .TRUE.
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'surface_output_parameters', line )      
+       
+ 14    CONTINUE
+       
+
+    END SUBROUTINE surface_output_parin
+    
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check the input parameters for consistency. Further pre-process the given 
+!> output variables, i.e. separate them into average and non-average output
+!> variables and map them onto internal output array. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE surface_output_check_parameters
+
+       USE control_parameters,                                                 &
+           ONLY:  averaging_interval, dt_data_output, dt_data_output_av,       &
+                  message_string, skip_time_data_output,                       &
+                  skip_time_data_output_av
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=100) ::  trimvar !< dummy for single output variable
+
+       INTEGER(iwp) ::  av    !< id indicating average or non-average data output
+       INTEGER(iwp) ::  ilen  !< string length
+       INTEGER(iwp) ::  n_out !< running index for number of output variables
+
+!
+!--    Check the average interval
+       IF ( averaging_interval_surf == 9999999.9_wp )  THEN
+          averaging_interval_surf = averaging_interval
+       ENDIF
+!
+!--    Set the default data-output interval dt_data_output if necessary
+       IF ( dt_dosurf    == 9999999.9_wp )  dt_dosurf    = dt_data_output
+       IF ( dt_dosurf_av == 9999999.9_wp )  dt_dosurf_av = dt_data_output
+
+       IF ( averaging_interval_surf > dt_dosurf_av )  THEN
+          WRITE( message_string, * )  'averaging_interval_surf = ',            &
+                averaging_interval_surf, ' must be <= dt_dosurf_av = ',        &
+                dt_dosurf_av
+          CALL message( 'surface_output_check_parameters',                     &
+                        'PA0087', 1, 2, 0, 6, 0 )
+       ENDIF
+
+!
+!--   Count number of output variables and separate output strings for 
+!--   average and non-average output variables.
+      n_out = 0
+      DO WHILE ( data_output_surf(n_out+1)(1:1) /= ' ' )
+
+         n_out = n_out + 1
+         ilen = LEN_TRIM( data_output_surf(n_out) )
+         trimvar = TRIM( data_output_surf(n_out) )
+
+!
+!--      Check for data averaging
+         av = 0
+         IF ( ilen > 3 )  THEN
+            IF ( data_output_surf(n_out)(ilen-2:ilen) == '_av' )  THEN
+               trimvar = data_output_surf(n_out)(1:ilen-3)
+               av      = 1
+            ENDIF
+         ENDIF
+
+         dosurf_no(av) = dosurf_no(av) + 1
+         dosurf(av,dosurf_no(av)) = TRIM( trimvar )
+
+!
+!--      Check if all output variables are known
+         SELECT CASE ( TRIM( trimvar ) )
+
+            CASE ( 'css', 'cssws', 'qsws_liq', 'qsws_soil', 'qsws_veg' )
+               message_string = TRIM( trimvar ) //                             &
+                             ' is not yet implemented in the surface output'
+               CALL message( 'surface_output_check_parameters',                &
+                             'PA0087', 1, 2, 0, 6, 0 )
+
+            CASE ( 'us', 'ts', 'qs', 'ss', 'qcs', 'ncs', 'qrs', 'nrs', 'ol' )
+
+            CASE ( 'z0', 'z0h', 'z0q' )
+
+            CASE ( 'theta1', 'qv1', 'thetav1' )
+
+            CASE ( 'usws', 'vsws' )
+
+            CASE ( 'qcsws', 'ncsws', 'qrsws', 'nrsws', 'sasws' )
+
+            CASE ( 'shf', 'qsws', 'ssws' )
+
+            CASE ( 'q_surface', 'theta_surface', 'thetav_surface' )
+
+            CASE ( 'rad_net' )
+
+            CASE ( 'rad_lw_in', 'rad_lw_out', 'rad_sw_in', 'rad_sw_out' )
+
+            CASE ( 'ghf' )
+
+            CASE ( 'r_a', 'r_canopy', 'r_soil', 'r_s' )
+
+            CASE DEFAULT
+               message_string = TRIM( trimvar ) //                             &
+                             ' is not part of the surface output'
+               CALL message( 'surface_output_check_parameters',                &
+                             'PA0087', 1, 2, 0, 6, 0 )
+         END SELECT
+
+       ENDDO
+
+    END SUBROUTINE surface_output_check_parameters
+
+!--Private Subroutines (Only called from tinside his module)
+
+
+
+!    SUBROUTINE write_ascii_vtk (filename,time)
+!       IMPLICIT NONE
+!       CHARACTER(LEN=*),INTENT(IN)   :: filename
+!       REAL(kind=wp),INTENT(IN)      :: time
+! 
+!       INTEGER                       :: file_id=251
+!       INTEGER                       :: n
+! 
+!       IF(myid == surf_io_pe)  then
+!          open(file_id,file=TRIM(filename))                                 ! Please use check_open in the final version
+! 
+!          write(file_id,'(a)') "# vtk DataFile Version 3.0"
+!          write(file_id,'(a,f8.2,a)') "legacy vtk File generated by PALM,  simulation time = ",time," sec"
+!          write(file_id,'(a)') "ASCII"
+! 
+!          write(file_id,'(a)') "DATASET POLYDATA"
+!          write(file_id,'(a,i5,a)') "POINTS ",npo," float"
+!          do n=1,npo
+!             write (file_id,'(8f10.1)') points(1:3,n)
+!          end do
+! 
+!          write(file_id,'(a,8i10)') "POLYGONS ",npg, 5*npg
+!          do n=1,npg
+!             write(file_id,'(8i10)') polygons(:,n)
+!          end do
+! 
+!          write(file_id,'(a,i10)') "CELL_DATA ",npg
+!          write(file_id,'(a,i10)') "SCALARS cell_scalars float 1 "
+!          write(file_id,'(a,i10)') "LOOKUP_TABLE default "
+! 
+!          do n=1,npg
+!             write(file_id,'(f10.2)') cell_scalars(n)
+!          end do
+! 
+!          close (file_id)
+! 
+!          DEALLOCATE (points,polygons,cell_scalars)
+!       ENDIF
+! 
+!       RETURN
+!    END SUBROUTINE write_ascii_vtk
+
+END MODULE surface_output_mod
Index: /palm/tags/release-6.0/SOURCE/swap_timelevel.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/swap_timelevel.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/swap_timelevel.f90	(revision 3477)
@@ -0,0 +1,314 @@
+!> @file swap_timelevel.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3303 2018-10-03 12:04:15Z raasch
+! bugfix for swapping in case of ocean mode
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Moved TKE to turbulence_closure_mod (TG)
+! Implementation of chemistry module (FK)
+! 
+! 2350 2017-08-15 11:48:26Z kanani
+! Bugfix in nopointer version
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new surface concept
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives removed
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added swapping of urban surface model quantities,
+! removed redundance for land surface model
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme replaced by microphysics_*
+!
+! swap_timelevel.f90 1766 2016-02-29 08:37:15Z raasch
+! setting the swap level for pmc data transfer
+!
+! 1747 2016-02-08 12:25:53Z raasch
+! explicit loops in nopointer case to omit craypointer option of pgi compiler
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Added swapping of land surface model quantities
+! 
+! 1374 2014-04-25 12:55:07Z raasch
+! bugfix: use-statement for nopointer-case added
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! revision history before 2012 removed,
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! calculation of qr and nr is restricted to precipitation
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! openACC directives added
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! swap of timelevels for nr, qr added
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1032 2012-10-21 13:03:21Z letzel
+! save memory by not allocating pt_2 in case of neutral = .T.
+!
+! 1010 2012-09-20 07:59:54Z raasch
+! cpp switch __nopointer added for pointer free version
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog scheme removed
+!
+! Revision 1.1  2000/01/10  10:08:58  10:08:58  raasch (Siegfried Raasch)
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> Swap of timelevels of variables after each timestep
+!------------------------------------------------------------------------------!
+ SUBROUTINE swap_timelevel
+ 
+
+#if defined( __nopointer )
+    USE arrays_3d,                                                             &
+        ONLY:  nc, nc_p, nr, nr_p, pt, pt_p, q, q_p, qc, qc_p, qr, qr_p, s,    &
+               s_p, sa, sa_p, u, u_p, v, v_p, w, w_p
+#else
+    USE arrays_3d,                                                             &
+        ONLY:  nc, nc_1, nc_2, nc_p, nr, nr_1, nr_2, nr_p, pt, pt_1, pt_2,     &
+               pt_p, q, q_1, q_2, q_p, qc, qc_1, qc_2, qc_p, qr, qr_1, qr_2,   &
+               qr_p, s, s_1, s_2, s_p, sa, sa_1, sa_2, sa_p, u, u_1, u_2, u_p, &
+               v, v_1, v_2, v_p, w, w_1, w_2, w_p
+#endif
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model, bcm_swap_timelevel
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_swap_timelevel 
+
+    USE cpulog,                                                                &
+        ONLY: cpu_log, log_point
+
+    USE control_parameters,                                                    &
+        ONLY:  air_chemistry, humidity, land_surface, neutral, ocean_mode,     &
+               passive_scalar, simulated_time, timestep_count, urban_surface,  &
+               time_since_reference_point
+
+    USE gust_mod,                                                              &
+        ONLY: gust_module_enabled, gust_swap_timelevel
+
+#if defined( __nopointer )
+    USE indices,                                                               &
+        ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt
+#endif
+
+    USE land_surface_model_mod,                                                &
+        ONLY: lsm_swap_timelevel
+
+    USE ocean_mod,                                                             &
+        ONLY:  ocean_swap_timelevel
+
+    USE pmc_interface,                                                         &
+        ONLY: nested_run, pmci_set_swaplevel
+         
+    USE salsa_mod,                                                             &
+        ONLY:  salsa, salsa_swap_timelevel, skip_time_do_salsa             
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_swap_timelevel
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_swap_timelevel
+
+
+    IMPLICIT NONE
+
+#if defined( __nopointer )
+    INTEGER ::  i, j, k     !> loop indices
+#endif
+    INTEGER ::  swap_level  !> swap_level for steering the pmc data transfer
+
+!
+!-- Incrementing timestep counter
+    timestep_count = timestep_count + 1
+
+!
+!-- Swap of variables
+#if defined( __nopointer )
+    CALL cpu_log( log_point(28), 'swap_timelevel (nop)', 'start' )
+
+    DO  i = nxlg, nxrg
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt+1
+             u(k,j,i)  = u_p(k,j,i)
+             v(k,j,i)  = v_p(k,j,i)
+             w(k,j,i)  = w_p(k,j,i)
+             pt(k,j,i) = pt_p(k,j,i)
+          ENDDO
+       ENDDO
+    ENDDO
+
+    IF ( humidity )  THEN
+       q = q_p
+    ENDIF
+
+    IF ( passive_scalar )  s = s_p             
+
+!
+!-- Swapping the timelevel of other modules
+    IF ( humidity  .AND.  bulk_cloud_model )  CALL bcm_swap_timelevel( 0 )
+    IF ( gust_module_enabled )                CALL gust_swap_timelevel( 0 )
+    IF ( land_surface )                       CALL lsm_swap_timelevel( 0 )
+    IF ( ocean_mode )                         CALL ocean_swap_timelevel( 0 )
+    CALL tcm_swap_timelevel( 0 )
+    IF ( urban_surface )                      CALL usm_swap_timelevel( 0 )
+
+    CALL cpu_log( log_point(28), 'swap_timelevel (nop)', 'stop' )
+#else
+    CALL cpu_log( log_point(28), 'swap_timelevel', 'start' )
+
+    SELECT CASE ( MOD( timestep_count, 2 ) )
+
+       CASE ( 0 )
+
+          u  => u_1;   u_p  => u_2
+          v  => v_1;   v_p  => v_2
+          w  => w_1;   w_p  => w_2
+          IF ( .NOT. neutral )  THEN
+             pt => pt_1;  pt_p => pt_2
+          ENDIF
+          IF ( humidity )  THEN
+             q => q_1;    q_p => q_2
+          ENDIF
+          IF ( passive_scalar )  THEN
+             s => s_1;    s_p => s_2
+          ENDIF
+
+          swap_level = 1
+
+       CASE ( 1 )
+
+          u  => u_2;   u_p  => u_1
+          v  => v_2;   v_p  => v_1
+          w  => w_2;   w_p  => w_1
+          IF ( .NOT. neutral )  THEN
+             pt => pt_2;  pt_p => pt_1
+          ENDIF
+          IF ( humidity )  THEN
+             q => q_2;    q_p => q_1
+          ENDIF
+          IF ( passive_scalar )  THEN
+             s => s_2;    s_p => s_1
+          ENDIF
+
+          swap_level = 2
+
+    END SELECT
+
+    IF ( humidity  .AND.  bulk_cloud_model )  THEN
+       CALL bcm_swap_timelevel( MOD( timestep_count, 2) )
+    ENDIF
+
+    IF ( air_chemistry )  CALL chem_swap_timelevel( MOD( timestep_count, 2) )
+
+    IF ( gust_module_enabled )  THEN
+       CALL gust_swap_timelevel( MOD( timestep_count, 2) )
+    ENDIF
+
+    IF ( land_surface )  THEN
+       CALL lsm_swap_timelevel( MOD( timestep_count, 2) )
+    ENDIF
+
+    IF ( ocean_mode )  THEN
+       CALL ocean_swap_timelevel( MOD( timestep_count, 2 ) )
+    ENDIF
+   
+    IF ( salsa  .AND.  simulated_time >= time_since_reference_point )  THEN
+       CALL salsa_swap_timelevel(  MOD( timestep_count, 2 ) )
+    ENDIF  
+
+    CALL tcm_swap_timelevel( MOD( timestep_count, 2) )
+
+    IF ( urban_surface )  THEN
+       CALL usm_swap_timelevel( MOD( timestep_count, 2) )
+    ENDIF
+
+!
+!-- Set the swap level for steering the pmc data transfer
+    IF ( nested_run )  CALL pmci_set_swaplevel( swap_level )
+
+    CALL cpu_log( log_point(28), 'swap_timelevel', 'stop' )
+#endif
+
+ END SUBROUTINE swap_timelevel
+
+
Index: /palm/tags/release-6.0/SOURCE/synthetic_turbulence_generator_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/synthetic_turbulence_generator_mod.f90	(revision 3477)
@@ -0,0 +1,2110 @@
+!> @synthetic_turbulence_generator_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Error messages and numbers reivsed. 
+! 
+! 3349 2018-10-15 16:39:41Z suehring
+! Fix for format descriptor
+! 
+! 3348 2018-10-15 14:30:51Z suehring
+! - Revise structure of init routine
+! - introduce new parameters to skip STG for some timesteps
+! - introduce time-dependent parametrization of Reynolds-stress tensor
+! - Bugfix in allocation of mean_inflow_profiles
+! 
+! 3341 2018-10-15 10:31:27Z suehring
+! Introduce module parameter for number of inflow profiles
+! 
+! 3288 2018-09-28 10:23:08Z suehring
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3186 2018-07-30 17:07:14Z suehring
+! Mask topography while imposing inflow perturbations at the boundaries; do not
+! impose perturbations at top boundary as well as ghost points
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables and extend error message
+! Enable geneartor also for stretched grids
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Error message related to vertical stretching has been added, dz was replaced
+! by dz(1)
+! 
+! 3051 2018-05-30 17:43:55Z suehring
+! Bugfix in calculation of initial Reynolds-stress tensor.
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error messages revised
+! 
+! 3044 2018-05-25 10:59:41Z gronemeier
+! Add missing variable descriptions
+!
+! 3038 2018-05-24 10:54:00Z gronemeier
+! updated variable descriptions
+!
+! 2967 2018-04-13 11:22:08Z raasch
+! bugfix: missing parallel cpp-directives added
+!
+! 2946 2018-04-04 17:01:23Z suehring
+! Remove unused module load
+!
+! 2945 2018-04-04 16:27:14Z suehring
+! - Bugfix in parallelization of synthetic turbulence generator in case the
+!   z-dimension is not an integral divisor of the number of processors along
+!   the x- and y-dimension
+! - Revision in control mimic in case of RAN-LES nesting
+!
+! 2938 2018-03-27 15:52:42Z suehring
+! Apply turbulence generator at all non-cyclic lateral boundaries in case of
+! realistic Inifor large-scale forcing or RANS-LES nesting
+!
+! 2936 2018-03-27 14:49:27Z suehring
+! variable named found has been introduced for checking if restart data was found,
+! reading of restart strings has been moved completely to read_restart_data_mod,
+! redundant skipping function has been removed, stg_read/write_restart_data
+! have been renamed to stg_r/wrd_global, stg_rrd_global is called in
+! read_restart_data_mod now, flag syn_turb_gen_prerun and marker *** end stg
+! *** have been removed (Giersch), strings and their respective lengths are
+! written out and read now in case of restart runs to get rid of prescribed
+! character lengths (Giersch), CASE DEFAULT was added if restart data is read
+!
+! 2841 2018-02-27 15:02:57Z suehring
+! Bugfix: wrong placement of include 'mpif.h' corrected
+!
+! 2836 2018-02-26 13:40:05Z Giersch
+! The variables synthetic_turbulence_generator and
+! use_synthetic_turbulence_generator have been abbreviated + syn_turb_gen_prerun
+! flag is used to define if module related parameters were outputted as restart
+! data
+!
+! 2716 2017-12-29 16:35:59Z kanani
+! Corrected "Former revisions" section
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2669 2017-12-06 16:03:27Z raasch
+! unit number for file containing turbulence generator data changed to 90
+! bugfix: preprocessor directives added for MPI specific code
+!
+! 2576 2017-10-24 13:49:46Z Giersch
+! Definition of a new function called stg_skip_global to skip module
+! parameters during reading restart data
+!
+! 2563 2017-10-19 15:36:10Z Giersch
+! stg_read_restart_data is called in stg_parin in the case of a restart run
+!
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Initial revision
+!
+!
+!
+! Authors:
+! --------
+! @author Tobias Gronemeier, Matthias Suehring, Atsushi Inagaki, Micha Gryschka, Christoph Knigge
+! 
+!
+!
+! Description:
+! ------------
+!> The module generates turbulence at the inflow boundary based on a method by
+!> Xie and Castro (2008) utilizing a Lund rotation (Lund, 1998) and a mass-flux
+!> correction by Kim et al. (2013).
+!> The turbulence is correlated based on length scales in y- and z-direction and
+!> a time scale for each velocity component. The profiles of length and time
+!> scales, mean u, v, w, e and pt, and all components of the Reynolds stress
+!> tensor can be either read from file STG_PROFILES, or will be parametrized
+!> within the boundary layer. 
+!>
+!> @todo test restart
+!>       enable cyclic_fill
+!>       implement turbulence generation for e and pt
+!> @todo Input of height-constant length scales via namelist
+!> @note <Enter notes on the module>
+!> @bug  Height information from input file is not used. Profiles from input
+!>       must match with current PALM grid.
+!>       In case of restart, velocity seeds differ from precursor run if a11,
+!>       a22, or a33 are zero.
+!------------------------------------------------------------------------------!
+ MODULE synthetic_turbulence_generator_mod
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  mean_inflow_profiles, q, pt, u, v, w, zu, zw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, kappa, pi
+
+    USE control_parameters,                                                    &
+        ONLY:  initializing_actions, num_mean_inflow_profiles, message_string, &
+               syn_turb_gen
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nzb, nzt, nxl, nxlg, nxr, nxrg, nys, nyn, nyng, nysg
+
+    USE kinds
+
+#if defined( __parallel )  &&  !defined( __mpifh )
+    USE MPI
+#endif
+
+    USE nesting_offl_mod,                                                      &
+        ONLY:  zi_ribulk
+
+    USE pegrid,                                                                &
+        ONLY:  comm1dx, comm1dy, comm2d, ierr, myidx, myidy, pdims
+
+    USE transpose_indices,                                                     &
+        ONLY: nzb_x, nzt_x
+
+
+    IMPLICIT NONE
+
+#if defined( __parallel )  &&  defined( __mpifh )
+    INCLUDE "mpif.h"
+#endif
+
+
+    LOGICAL ::  velocity_seed_initialized = .FALSE.     !< true after first call of stg_main
+    LOGICAL ::  parametrize_inflow_turbulence = .FALSE. !< flag indicating that inflow turbulence is either read from file (.FALSE.) or if it parametrized
+    LOGICAL ::  use_syn_turb_gen = .FALSE.              !< switch to use synthetic turbulence generator
+
+    INTEGER(iwp) ::  id_stg_left        !< left lateral boundary core id in case of turbulence generator
+    INTEGER(iwp) ::  id_stg_north       !< north lateral boundary core id in case of turbulence generator
+    INTEGER(iwp) ::  id_stg_right       !< right lateral boundary core id in case of turbulence generator
+    INTEGER(iwp) ::  id_stg_south       !< south lateral boundary core id in case of turbulence generator
+    INTEGER(iwp) ::  stg_type_xz        !< MPI type for full z range
+    INTEGER(iwp) ::  stg_type_xz_small  !< MPI type for small z range
+    INTEGER(iwp) ::  stg_type_yz        !< MPI type for full z range
+    INTEGER(iwp) ::  stg_type_yz_small  !< MPI type for small z range
+    INTEGER(iwp) ::  merg               !< maximum length scale (in gp)
+    INTEGER(iwp) ::  mergp              !< merg + nbgp
+    INTEGER(iwp) ::  nzb_x_stg          !< lower bound of z coordinate (required for transposing z on PEs along x)
+    INTEGER(iwp) ::  nzt_x_stg          !< upper bound of z coordinate (required for transposing z on PEs along x)
+    INTEGER(iwp) ::  nzb_y_stg          !< lower bound of z coordinate (required for transposing z on PEs along y)
+    INTEGER(iwp) ::  nzt_y_stg          !< upper bound of z coordinate (required for transposing z on PEs along y)
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  displs_xz      !< displacement for MPI_GATHERV
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  recv_count_xz  !< receive count for MPI_GATHERV
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  displs_yz      !< displacement for MPI_GATHERV
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  recv_count_yz  !< receive count for MPI_GATHERV
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nux            !< length scale of u in x direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nuy            !< length scale of u in y direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nuz            !< length scale of u in z direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nvx            !< length scale of v in x direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nvy            !< length scale of v in y direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nvz            !< length scale of v in z direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nwx            !< length scale of w in x direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nwy            !< length scale of w in y direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nwz            !< length scale of w in z direction (in gp)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  seed           !< seed of random number for rn-generator
+
+    REAL(wp) ::  cosmo_ref = 10.0_wp      !< height of first vertical grid level in mesoscale model, used for calculation of scaling parameters
+    REAL(wp) ::  dt_stg_adjust = 300.0_wp !< time interval for adjusting turbulence statistics
+    REAL(wp) ::  dt_stg_call = 5.0_wp     !< time interval for calling synthetic turbulence generator
+    REAL(wp) ::  mc_factor                !< mass flux correction factor
+    REAL(wp) ::  scale_l                  !< scaling parameter used for turbulence parametrization - Obukhov length
+    REAL(wp) ::  scale_us                 !< scaling parameter used for turbulence parametrization - friction velocity
+    REAL(wp) ::  scale_wm                 !< scaling parameter used for turbulence parametrization - momentum scale  
+    REAL(wp) ::  time_stg_adjust = 0.0_wp !< time counter for adjusting turbulence information   
+    REAL(wp) ::  time_stg_call = 0.0_wp   !< time counter for calling generator   
+    
+    
+    REAL(wp),DIMENSION(:), ALLOCATABLE ::  r11              !< Reynolds parameter
+    REAL(wp),DIMENSION(:), ALLOCATABLE ::  r21              !< Reynolds parameter
+    REAL(wp),DIMENSION(:), ALLOCATABLE ::  r22              !< Reynolds parameter
+    REAL(wp),DIMENSION(:), ALLOCATABLE ::  r31              !< Reynolds parameter
+    REAL(wp),DIMENSION(:), ALLOCATABLE ::  r32              !< Reynolds parameter
+    REAL(wp),DIMENSION(:), ALLOCATABLE ::  r33              !< Reynolds parameter
+    
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  a11             !< coefficient for Lund rotation
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  a21             !< coefficient for Lund rotation
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  a22             !< coefficient for Lund rotation
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  a31             !< coefficient for Lund rotation
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  a32             !< coefficient for Lund rotation
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  a33             !< coefficient for Lund rotation
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  tu              !< Lagrangian time scale of u
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  tv              !< Lagrangian time scale of v
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  tw              !< Lagrangian time scale of w
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bux           !< filter function for u in x direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  buy           !< filter function for u in y direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  buz           !< filter function for u in z direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bvx           !< filter function for v in x direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bvy           !< filter function for v in y direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bvz           !< filter function for v in z direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bwx           !< filter function for w in y direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bwy           !< filter function for w in y direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  bwz           !< filter function for w in z direction
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fu_xz         !< velocity seed for u at xz plane
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fuo_xz        !< velocity seed for u at xz plane with new random number
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fu_yz         !< velocity seed for u at yz plane
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fuo_yz        !< velocity seed for u at yz plane with new random number
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fv_xz         !< velocity seed for v at xz plane
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fvo_xz        !< velocity seed for v at xz plane with new random number
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fv_yz         !< velocity seed for v at yz plane
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fvo_yz        !< velocity seed for v at yz plane with new random number
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fw_xz         !< velocity seed for w at xz plane
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fwo_xz        !< velocity seed for w at xz plane with new random number
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fw_yz         !< velocity seed for w at yz plane
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  fwo_yz        !< velocity seed for w at yz plane with new random number
+    
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  dist_xz     !< imposed disturbances at north/south boundary
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  dist_yz     !< imposed disturbances at north/south boundary
+
+!
+!-- PALM interfaces:
+!-- Adjust time and lenght scales, Reynolds stress, and filter functions
+    INTERFACE stg_adjust
+       MODULE PROCEDURE stg_adjust
+    END INTERFACE stg_adjust
+!
+!-- Input parameter checks to be done in check_parameters
+    INTERFACE stg_check_parameters
+       MODULE PROCEDURE stg_check_parameters
+    END INTERFACE stg_check_parameters
+
+!
+!-- Calculate filter functions
+    INTERFACE stg_filter_func
+       MODULE PROCEDURE stg_filter_func
+    END INTERFACE stg_filter_func
+
+!
+!-- Generate velocity seeds at south and north domain boundary
+    INTERFACE stg_generate_seed_xz
+       MODULE PROCEDURE stg_generate_seed_xz
+    END INTERFACE stg_generate_seed_xz
+!
+!-- Generate velocity seeds at left and/or right domain boundary
+    INTERFACE stg_generate_seed_yz
+       MODULE PROCEDURE stg_generate_seed_yz
+    END INTERFACE stg_generate_seed_yz
+
+!
+!-- Output of information to the header file
+    INTERFACE stg_header
+       MODULE PROCEDURE stg_header
+    END INTERFACE stg_header
+
+!
+!-- Initialization actions
+    INTERFACE stg_init
+       MODULE PROCEDURE stg_init
+    END INTERFACE stg_init
+
+!
+!-- Main procedure of synth. turb. gen.
+    INTERFACE stg_main
+       MODULE PROCEDURE stg_main
+    END INTERFACE stg_main
+
+!
+!-- Reading of NAMELIST parameters
+    INTERFACE stg_parin
+       MODULE PROCEDURE stg_parin
+    END INTERFACE stg_parin
+
+!
+!-- Reading of parameters for restart runs
+    INTERFACE stg_rrd_global
+       MODULE PROCEDURE stg_rrd_global
+    END INTERFACE stg_rrd_global
+
+!
+!-- Writing of binary output for restart runs
+    INTERFACE stg_wrd_global
+       MODULE PROCEDURE stg_wrd_global
+    END INTERFACE stg_wrd_global
+
+    SAVE
+
+    PRIVATE
+
+!
+!-- Public interfaces
+    PUBLIC  stg_adjust, stg_check_parameters, stg_header, stg_init, stg_main,  &
+            stg_parin, stg_rrd_global, stg_wrd_global
+
+!
+!-- Public variables
+    PUBLIC  dt_stg_call, dt_stg_adjust, id_stg_left, id_stg_north,             &
+            id_stg_right, id_stg_south, parametrize_inflow_turbulence,         &
+            time_stg_adjust, time_stg_call, use_syn_turb_gen
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for synthetic turbulence generator
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_check_parameters
+
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr, bc_ns, child_domain, nesting_offline, rans_mode,         &
+               turbulent_inflow
+
+    USE pmc_interface,                                                         &
+        ONLY : rans_mode_parent
+
+
+    IMPLICIT NONE
+
+    IF ( .NOT. use_syn_turb_gen  .AND.  .NOT. rans_mode  .AND.                 &
+          nesting_offline )  THEN
+       message_string = 'Synthetic turbulence generator is required ' //       &
+                        'if offline nesting is applied and PALM operates ' //  &
+                        'in LES mode.'
+       CALL message( 'stg_check_parameters', 'PA0520', 0, 0, 0, 6, 0 )
+    ENDIF
+
+    IF ( .NOT. use_syn_turb_gen  .AND.  child_domain                           &
+         .AND. rans_mode_parent  .AND.  .NOT. rans_mode )  THEN
+       message_string = 'Synthetic turbulence generator is required ' //       &
+                        'when nesting is applied and parent operates in '  //  &
+                        'RANS-mode but current child in LES mode.'
+       CALL message( 'stg_check_parameters', 'PA0524', 1, 2, 0, 6, 0 )
+    ENDIF
+
+    IF ( use_syn_turb_gen )  THEN
+
+       IF ( .NOT. nesting_offline  .AND.  .NOT. child_domain )  THEN 
+       
+          IF ( INDEX( initializing_actions, 'set_constant_profiles' ) == 0     &
+        .AND.  INDEX( initializing_actions, 'read_restart_data' ) == 0 )  THEN
+             message_string = 'Using synthetic turbulence generator ' //       &
+                              'requires %initializing_actions = '         //   &
+                              '"set_constant_profiles" or "read_restart_data"' //&
+                              ', if not offline nesting is applied.'
+             CALL message( 'stg_check_parameters', 'PA0015', 1, 2, 0, 6, 0 )
+          ENDIF
+
+          IF ( bc_lr /= 'dirichlet/radiation' )  THEN
+             message_string = 'Using synthetic turbulence generator ' //       &
+                              'requires &bc_lr = "dirichlet/radiation", ' //   &
+                              'if not offline nesting is applied.'
+             CALL message( 'stg_check_parameters', 'PA0035', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( bc_ns /= 'cyclic' )  THEN
+             message_string = 'Using synthetic turbulence generator ' //       &
+                              'requires &bc_ns = "cyclic", ' //               &
+                              'if not offline nesting is applied.'
+             CALL message( 'stg_check_parameters', 'PA0037', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDIF
+
+       IF ( turbulent_inflow )  THEN
+          message_string = 'Using synthetic turbulence generator ' //          &
+                           'in combination &with turbulent_inflow = .T. '//    &
+                              'is not allowed'
+          CALL message( 'stg_check_parameters', 'PA0039', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    ENDIF
+
+ END SUBROUTINE stg_check_parameters
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for synthetic turbulence generator
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_header ( io )
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp), INTENT(IN) ::  io   !< Unit of the output file
+
+!
+!-- Write synthetic turbulence generator Header
+    WRITE( io, 1 )
+    IF ( use_syn_turb_gen )  THEN
+       WRITE( io, 2 )
+    ELSE
+       WRITE( io, 3 )
+    ENDIF
+    
+    IF ( parametrize_inflow_turbulence )  THEN
+       WRITE( io, 4 ) dt_stg_adjust
+    ELSE
+       WRITE( io, 5 )
+    ENDIF
+
+1   FORMAT (//' Synthetic turbulence generator information:'/                  &
+              ' ------------------------------------------'/)
+2   FORMAT ('    synthetic turbulence generator is switched on')
+3   FORMAT ('    synthetic turbulence generator is switched off')
+4   FORMAT ('    imposed turbulence statistics are parametrized and ajdusted to boundary-layer development each ', F8.2, ' s' )
+5   FORMAT ('    imposed turbulence is read from file' )
+
+ END SUBROUTINE stg_header
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the synthetic turbulence generator
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_init
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, ddzw, u_init, v_init, zu
+
+    USE control_parameters,                                                    &
+        ONLY:  child_domain, coupling_char, e_init, nesting_offline, rans_mode
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy, dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nz
+
+    USE pmc_interface,                                                         &
+        ONLY : rans_mode_parent
+
+
+    IMPLICIT NONE
+
+    LOGICAL ::  file_stg_exist = .FALSE. !< flag indicating whether parameter file for Reynolds stress and length scales exist
+
+#if defined( __parallel )
+    INTEGER(KIND=MPI_ADDRESS_KIND) :: extent !< extent of new MPI type
+    INTEGER(KIND=MPI_ADDRESS_KIND) :: tob=0  !< dummy variable
+#endif
+
+    INTEGER(iwp) :: i                        !> grid index in x-direction
+    INTEGER(iwp) :: j                        !> loop index
+    INTEGER(iwp) :: k                        !< index
+    INTEGER(iwp) :: newtype                  !< dummy MPI type
+    INTEGER(iwp) :: realsize                 !< size of REAL variables
+    INTEGER(iwp) :: nseed                    !< dimension of random number seed
+    INTEGER(iwp) :: startseed = 1234567890   !< start seed for random number generator
+
+!
+!-- Dummy variables used for reading profiles
+    REAL(wp) :: d1      !< u profile
+    REAL(wp) :: d2      !< v profile
+    REAL(wp) :: d3      !< w profile
+    REAL(wp) :: d5      !< e profile
+    REAL(wp) :: d11     !< vertical interpolation for a11
+    REAL(wp) :: d21     !< vertical interpolation for a21
+    REAL(wp) :: d22     !< vertical interpolation for a22
+    REAL(wp) :: luy     !< length scale for u in y direction
+    REAL(wp) :: luz     !< length scale for u in z direction
+    REAL(wp) :: lvy     !< length scale for v in y direction
+    REAL(wp) :: lvz     !< length scale for v in z direction
+    REAL(wp) :: lwy     !< length scale for w in y direction
+    REAL(wp) :: lwz     !< length scale for w in z direction
+    REAL(wp) :: nnz     !< increment used to determine processor decomposition of z-axis along x and y direction
+    REAL(wp) :: zz      !< height
+
+
+#if defined( __parallel )
+    CALL MPI_BARRIER( comm2d, ierr )
+#endif
+
+    CALL  cpu_log( log_point(57), 'synthetic_turbulence_gen', 'start' )
+
+#if defined( __parallel )
+!
+!-- Determine processor decomposition of z-axis along x- and y-direction
+    nnz = nz / pdims(1)
+    nzb_x_stg = 1 + myidx * INT( nnz )
+    nzt_x_stg = ( myidx + 1 ) * INT( nnz )
+
+    IF ( MOD( nz , pdims(1) ) /= 0  .AND.  myidx == id_stg_right )             &
+       nzt_x_stg = nzt_x_stg + myidx * ( nnz - INT( nnz ) )
+
+    IF ( nesting_offline   .OR.  ( child_domain  .AND.  rans_mode_parent       &
+                            .AND.  .NOT.  rans_mode ) )  THEN
+       nnz = nz / pdims(2)
+       nzb_y_stg = 1 + myidy * INT( nnz )
+       nzt_y_stg = ( myidy + 1 ) * INT( nnz )
+
+       IF ( MOD( nz , pdims(2) ) /= 0  .AND.  myidy == id_stg_north )          &
+          nzt_y_stg = nzt_y_stg + myidy * ( nnz - INT( nnz ) )
+    ENDIF
+
+!
+!-- Define MPI type used in stg_generate_seed_yz to gather vertical splitted
+!-- velocity seeds
+    CALL MPI_TYPE_SIZE( MPI_REAL, realsize, ierr )
+    extent = 1 * realsize
+!
+!-- Set-up MPI datatyp to involve all cores for turbulence generation at yz
+!-- layer
+!-- stg_type_yz: yz-slice with vertical bounds nzb:nzt+1
+    CALL MPI_TYPE_CREATE_SUBARRAY( 2, [nzt-nzb+2,nyng-nysg+1],                 &
+            [1,nyng-nysg+1], [0,0], MPI_ORDER_FORTRAN, MPI_REAL, newtype, ierr )
+    CALL MPI_TYPE_CREATE_RESIZED( newtype, tob, extent, stg_type_yz, ierr )
+    CALL MPI_TYPE_COMMIT( stg_type_yz, ierr )
+    CALL MPI_TYPE_FREE( newtype, ierr )
+
+    ! stg_type_yz_small: yz-slice with vertical bounds nzb_x_stg:nzt_x_stg+1
+    CALL MPI_TYPE_CREATE_SUBARRAY( 2, [nzt_x_stg-nzb_x_stg+2,nyng-nysg+1],     &
+            [1,nyng-nysg+1], [0,0], MPI_ORDER_FORTRAN, MPI_REAL, newtype, ierr )
+    CALL MPI_TYPE_CREATE_RESIZED( newtype, tob, extent, stg_type_yz_small, ierr )
+    CALL MPI_TYPE_COMMIT( stg_type_yz_small, ierr )
+    CALL MPI_TYPE_FREE( newtype, ierr )
+
+    ! receive count and displacement for MPI_GATHERV in stg_generate_seed_yz
+    ALLOCATE( recv_count_yz(pdims(1)), displs_yz(pdims(1)) )
+
+    recv_count_yz           = nzt_x_stg-nzb_x_stg + 1
+    recv_count_yz(pdims(1)) = recv_count_yz(pdims(1)) + 1
+
+    DO  j = 1, pdims(1)
+       displs_yz(j) = 0 + (nzt_x_stg-nzb_x_stg+1) * (j-1)
+    ENDDO
+!
+!-- Set-up MPI datatyp to involve all cores for turbulence generation at xz
+!-- layer
+!-- stg_type_xz: xz-slice with vertical bounds nzb:nzt+1
+    IF ( nesting_offline  .OR.  ( child_domain .AND.  rans_mode_parent         &
+                           .AND.  .NOT.  rans_mode ) )  THEN
+       CALL MPI_TYPE_CREATE_SUBARRAY( 2, [nzt-nzb+2,nxrg-nxlg+1],              &
+               [1,nxrg-nxlg+1], [0,0], MPI_ORDER_FORTRAN, MPI_REAL, newtype, ierr )
+       CALL MPI_TYPE_CREATE_RESIZED( newtype, tob, extent, stg_type_xz, ierr )
+       CALL MPI_TYPE_COMMIT( stg_type_xz, ierr )
+       CALL MPI_TYPE_FREE( newtype, ierr )
+
+       ! stg_type_yz_small: xz-slice with vertical bounds nzb_x_stg:nzt_x_stg+1
+       CALL MPI_TYPE_CREATE_SUBARRAY( 2, [nzt_y_stg-nzb_y_stg+2,nxrg-nxlg+1],  &
+               [1,nxrg-nxlg+1], [0,0], MPI_ORDER_FORTRAN, MPI_REAL, newtype, ierr )
+       CALL MPI_TYPE_CREATE_RESIZED( newtype, tob, extent, stg_type_xz_small, ierr )
+       CALL MPI_TYPE_COMMIT( stg_type_xz_small, ierr )
+       CALL MPI_TYPE_FREE( newtype, ierr )
+
+       ! receive count and displacement for MPI_GATHERV in stg_generate_seed_yz
+       ALLOCATE( recv_count_xz(pdims(2)), displs_xz(pdims(2)) )
+
+       recv_count_xz           = nzt_y_stg-nzb_y_stg + 1
+       recv_count_xz(pdims(2)) = recv_count_xz(pdims(2)) + 1
+
+       DO  j = 1, pdims(2)
+          displs_xz(j) = 0 + (nzt_y_stg-nzb_y_stg+1) * (j-1)
+       ENDDO
+
+    ENDIF
+
+#endif
+!
+!-- Define seed of random number
+    CALL RANDOM_SEED()
+    CALL RANDOM_SEED( size=nseed )
+    ALLOCATE( seed(1:nseed) )
+    DO  j = 1, nseed
+       seed(j) = startseed + j
+    ENDDO
+    CALL RANDOM_SEED(put=seed)
+!
+!-- Allocate required arrays
+!-- mean_inflow profiles must not be allocated in offline nesting
+    IF ( .NOT. nesting_offline  .AND.  .NOT.  child_domain )  THEN 
+       IF ( .NOT. ALLOCATED( mean_inflow_profiles ) )                          &
+          ALLOCATE( mean_inflow_profiles(nzb:nzt+1,1:num_mean_inflow_profiles) )
+    ENDIF
+
+    ALLOCATE ( a11(nzb:nzt+1), a21(nzb:nzt+1), a22(nzb:nzt+1),                 &
+               a31(nzb:nzt+1), a32(nzb:nzt+1), a33(nzb:nzt+1),                 &
+               nux(nzb:nzt+1), nuy(nzb:nzt+1), nuz(nzb:nzt+1),                 &
+               nvx(nzb:nzt+1), nvy(nzb:nzt+1), nvz(nzb:nzt+1),                 &
+               nwx(nzb:nzt+1), nwy(nzb:nzt+1), nwz(nzb:nzt+1),                 &
+               r11(nzb:nzt+1), r21(nzb:nzt+1), r22(nzb:nzt+1),                 &
+               r31(nzb:nzt+1), r32(nzb:nzt+1), r33(nzb:nzt+1),                 &
+               tu(nzb:nzt+1),  tv(nzb:nzt+1),  tw(nzb:nzt+1)   )
+               
+    ALLOCATE ( dist_xz(nzb:nzt+1,nxlg:nxrg,3) )
+    ALLOCATE ( dist_yz(nzb:nzt+1,nysg:nyng,3) )
+    dist_xz = 0.0_wp
+    dist_yz = 0.0_wp
+!
+!-- Read inflow profile
+!-- Height levels of profiles in input profile is as follows:
+!-- zu: luy, luz, tu, lvy, lvz, tv, r11, r21, r22, d1, d2, d5
+!-- zw: lwy, lwz, tw, r31, r32, r33, d3
+!-- WARNING: zz is not used at the moment
+    INQUIRE( FILE = 'STG_PROFILES' // TRIM( coupling_char ),                   &
+             EXIST = file_stg_exist  )
+
+    IF ( file_stg_exist )  THEN
+
+       OPEN( 90, FILE='STG_PROFILES'//TRIM( coupling_char ), STATUS='OLD',     &
+                      FORM='FORMATTED')
+!
+!--    Skip header
+       READ( 90, * )
+
+       DO  k = nzb+1, nzt+1
+          READ( 90, * ) zz, luy, luz, tu(k), lvy, lvz, tv(k), lwy, lwz, tw(k), &
+                        r11(k), r21(k), r22(k), r31(k), r32(k), r33(k),        &
+                        d1, d2, d3, d5
+
+!
+!--       Convert length scales from meter to number of grid points. 
+          nuy(k) = INT( luy * ddy )
+          nuz(k) = INT( luz * ddzw(k) )
+          nvy(k) = INT( lvy * ddy )
+          nvz(k) = INT( lvz * ddzw(k) )
+          nwy(k) = INT( lwy * ddy )
+          nwz(k) = INT( lwz * ddzw(k) )
+!
+!--       Workaround, assume isotropic turbulence
+          nwx(k) = nwy(k)
+          nvx(k) = nvy(k)
+          nux(k) = nuy(k)
+!
+!--       Save Mean inflow profiles
+          IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN
+             mean_inflow_profiles(k,1) = d1
+             mean_inflow_profiles(k,2) = d2
+            !  mean_inflow_profiles(k,4) = d4
+             mean_inflow_profiles(k,5) = d5
+          ENDIF
+       ENDDO
+!
+!--    Set lenght scales at surface grid point
+       nuy(nzb) = nuy(nzb+1) 
+       nuz(nzb) = nuz(nzb+1)
+       nvy(nzb) = nvy(nzb+1)
+       nvz(nzb) = nvz(nzb+1)
+       nwy(nzb) = nwy(nzb+1)
+       nwz(nzb) = nwz(nzb+1)
+       
+       CLOSE( 90 )
+!
+!--    Calculate coefficient matrix from Reynolds stress tensor  
+!--    (Lund rotation)
+       CALL calc_coeff_matrix
+!
+!-- No information about turbulence and its length scales are available.
+!-- Instead, parametrize turbulence which is imposed at the boundaries. 
+!-- Set flag which indicates that turbulence is parametrized, which is done 
+!-- later when energy-balance models are already initialized. This is 
+!-- because the STG needs information about surface properties such as 
+!-- roughness to build 'realistic' turbulence profiles. 
+    ELSE
+!
+!--    Set flag indicating that turbulence is parametrized
+       parametrize_inflow_turbulence = .TRUE.
+!
+!--    Determine boundary-layer depth, which is used to initialize lenght 
+!--    scales
+       CALL calc_scaling_variables
+!
+!--    Initialize lenght and time scales, which in turn are used
+!--    to initialize the filter functions.
+       CALL calc_length_and_time_scale
+            
+    ENDIF
+
+!
+!-- Assign initial profiles. Note, this is only required if turbulent
+!-- inflow from the left is desired, not in case of any of the 
+!-- nesting (offline or self nesting) approaches.
+    IF ( .NOT. nesting_offline  .AND.  .NOT.  child_domain )  THEN 
+       u_init = mean_inflow_profiles(:,1)
+       v_init = mean_inflow_profiles(:,2)
+      !pt_init = mean_inflow_profiles(:,4)
+       e_init = MAXVAL( mean_inflow_profiles(:,5) )
+    ENDIF
+    
+!
+!-- Define the size of the filter functions and allocate them.
+    merg = 0
+
+    ! arrays must be large enough to cover the largest length scale
+    DO  k = nzb, nzt+1
+       j = MAX( ABS(nux(k)), ABS(nuy(k)), ABS(nuz(k)), &
+                ABS(nvx(k)), ABS(nvy(k)), ABS(nvz(k)), &
+                ABS(nwx(k)), ABS(nwy(k)), ABS(nwz(k))  )
+       IF ( j > merg )  merg = j
+    ENDDO
+
+    merg  = 2 * merg
+    mergp = merg + nbgp
+
+    ALLOCATE ( bux(-merg:merg,nzb:nzt+1),                                      &
+               buy(-merg:merg,nzb:nzt+1),                                      &
+               buz(-merg:merg,nzb:nzt+1),                                      &
+               bvx(-merg:merg,nzb:nzt+1),                                      &
+               bvy(-merg:merg,nzb:nzt+1),                                      &
+               bvz(-merg:merg,nzb:nzt+1),                                      &
+               bwx(-merg:merg,nzb:nzt+1),                                      &
+               bwy(-merg:merg,nzb:nzt+1),                                      &
+               bwz(-merg:merg,nzb:nzt+1)  )
+
+!
+!-- Allocate velocity seeds for turbulence at xz-layer
+    ALLOCATE ( fu_xz( nzb:nzt+1,nxlg:nxrg), fuo_xz(nzb:nzt+1,nxlg:nxrg),       &
+               fv_xz( nzb:nzt+1,nxlg:nxrg), fvo_xz(nzb:nzt+1,nxlg:nxrg),       &
+               fw_xz( nzb:nzt+1,nxlg:nxrg), fwo_xz(nzb:nzt+1,nxlg:nxrg)  )
+
+!
+!-- Allocate velocity seeds for turbulence at yz-layer
+    ALLOCATE ( fu_yz( nzb:nzt+1,nysg:nyng), fuo_yz(nzb:nzt+1,nysg:nyng),       &
+               fv_yz( nzb:nzt+1,nysg:nyng), fvo_yz(nzb:nzt+1,nysg:nyng),       &
+               fw_yz( nzb:nzt+1,nysg:nyng), fwo_yz(nzb:nzt+1,nysg:nyng)  )
+
+    fu_xz  = 0.0_wp
+    fuo_xz = 0.0_wp
+    fv_xz  = 0.0_wp
+    fvo_xz = 0.0_wp
+    fw_xz  = 0.0_wp
+    fwo_xz = 0.0_wp
+
+    fu_yz  = 0.0_wp
+    fuo_yz = 0.0_wp
+    fv_yz  = 0.0_wp
+    fvo_yz = 0.0_wp
+    fw_yz  = 0.0_wp
+    fwo_yz = 0.0_wp
+
+!
+!-- Create filter functions
+    CALL stg_filter_func( nux, bux ) !filter ux
+    CALL stg_filter_func( nuy, buy ) !filter uy
+    CALL stg_filter_func( nuz, buz ) !filter uz
+    CALL stg_filter_func( nvx, bvx ) !filter vx
+    CALL stg_filter_func( nvy, bvy ) !filter vy
+    CALL stg_filter_func( nvz, bvz ) !filter vz
+    CALL stg_filter_func( nwx, bwx ) !filter wx
+    CALL stg_filter_func( nwy, bwy ) !filter wy
+    CALL stg_filter_func( nwz, bwz ) !filter wz
+
+#if defined( __parallel )
+    CALL MPI_BARRIER( comm2d, ierr )
+#endif
+
+!
+!-- In case of restart, calculate velocity seeds fu, fv, fw from former
+!   time step.
+!   Bug: fu, fv, fw are different in those heights where a11, a22, a33
+!        are 0 compared to the prerun. This is mostly for k=nzt+1.
+    IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
+       IF ( myidx == id_stg_left  .OR.  myidx == id_stg_right )  THEN
+
+          IF ( myidx == id_stg_left  )  i = -1
+          IF ( myidx == id_stg_right )  i = nxr+1
+
+          DO  j = nysg, nyng
+             DO  k = nzb, nzt+1
+
+                IF  ( a11(k) .NE. 0._wp ) THEN
+                   fu_yz(k,j) = ( u(k,j,i) / mc_factor - u_init(k) ) / a11(k)
+                ELSE
+                   fu_yz(k,j) = 0._wp
+                ENDIF
+
+                IF  ( a22(k) .NE. 0._wp ) THEN
+                   fv_yz(k,j) = ( v(k,j,i) / mc_factor - a21(k) * fu_yz(k,j) - &
+                               v_init(k) ) / a22(k)
+                ELSE
+                   fv_yz(k,j) = 0._wp
+                ENDIF
+
+                IF  ( a33(k) .NE. 0._wp ) THEN
+                   fw_yz(k,j) = ( w(k,j,i) / mc_factor - a31(k) * fu_yz(k,j) - &
+                               a32(k) * fv_yz(k,j) ) / a33(k)
+                ELSE
+                   fw_yz = 0._wp
+                ENDIF
+
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+
+    CALL  cpu_log( log_point(57), 'synthetic_turbulence_gen', 'stop' )
+
+ END SUBROUTINE stg_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate filter function bxx from length scale nxx following Eg.9 and 10
+!> (Xie and Castro, 2008)
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_filter_func( nxx, bxx )
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: k         !< loop index
+    INTEGER(iwp) :: n_k       !< length scale nXX in height k
+    INTEGER(iwp) :: n_k2      !< n_k * 2
+    INTEGER(iwp) :: nf        !< index for length scales
+
+    REAL(wp) :: bdenom        !< denominator for filter functions bXX
+    REAL(wp) :: qsi = 1.0_wp  !< minimization factor
+
+    INTEGER(iwp), DIMENSION(:) :: nxx(nzb:nzt+1)           !< length scale (in gp)
+
+    REAL(wp), DIMENSION(:,:) :: bxx(-merg:merg,nzb:nzt+1)  !< filter function
+
+
+    bxx = 0.0_wp
+
+    DO  k = nzb, nzt+1
+       bdenom = 0.0_wp
+       n_k    = nxx(k)
+       IF ( n_k /= 0 )  THEN
+          n_k2 = n_k * 2
+
+!
+!--       ( Eq.10 )^2
+          DO  nf = -n_k2, n_k2
+             bdenom = bdenom + EXP( -qsi * pi * ABS(nf) / n_k )**2
+          ENDDO
+
+!
+!--       ( Eq.9 )
+          bdenom = SQRT( bdenom )
+          DO  nf = -n_k2, n_k2
+             bxx(nf,k) = EXP( -qsi * pi * ABS(nf) / n_k ) / bdenom
+          ENDDO
+       ENDIF
+    ENDDO
+
+ END SUBROUTINE stg_filter_func
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &stg_par for synthetic turbulence generator
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_parin
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line   !< dummy string that contains the current line of the parameter file
+
+
+    NAMELIST /stg_par/  dt_stg_adjust, dt_stg_call, use_syn_turb_gen
+
+    line = ' '
+
+!
+!-- Try to find stg package
+    REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&stg_par' ) == 0 )
+       READ ( 11, '(A)', END=20 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read namelist
+    READ ( 11, stg_par, ERR = 10, END = 20 )
+
+!
+!-- Set flag that indicates that the synthetic turbulence generator is switched
+!-- on
+    syn_turb_gen = .TRUE.
+    GOTO 20
+
+ 10 BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'stg_par', line )
+
+ 20 CONTINUE
+
+ END SUBROUTINE stg_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data.
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_rrd_global( found )
+
+
+    USE control_parameters,                                                    &
+        ONLY: length, restart_string
+
+
+    IMPLICIT NONE
+
+    LOGICAL, INTENT(OUT)  ::  found !< flag indicating if variable was found
+
+
+    found = .TRUE.
+
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'mc_factor' )
+          READ ( 13 )  mc_factor
+       CASE ( 'use_syn_turb_gen' )
+          READ ( 13 )  use_syn_turb_gen
+
+       CASE DEFAULT
+
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE stg_rrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data.
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_wrd_global
+
+
+    IMPLICIT NONE
+
+    CALL wrd_write_string( 'mc_factor' )
+    WRITE ( 14 )  mc_factor
+
+    CALL wrd_write_string( 'use_syn_turb_gen' )
+    WRITE ( 14 )  use_syn_turb_gen
+
+
+ END SUBROUTINE stg_wrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Create turbulent inflow fields for u, v, w with prescribed length scales and
+!> Reynolds stress tensor after a method of Xie and Castro (2008), modified
+!> following suggestions of Kim et al. (2013), and using a Lund rotation
+!> (Lund, 1998).
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_main
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw
+
+    USE control_parameters,                                                    &
+        ONLY:  child_domain, dt_3d, intermediate_timestep_count,               &
+               nesting_offline, rans_mode, simulated_time, volume_flow_initial
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  wall_flags_0
+
+    USE statistics,                                                            &
+        ONLY:  weight_substep
+
+    USE pmc_interface,                                                         &
+        ONLY : rans_mode_parent
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i           !< grid index in x-direction
+    INTEGER(iwp) :: j           !< loop index in y-direction
+    INTEGER(iwp) :: k           !< loop index in z-direction
+
+    REAL(wp) :: dt_stg          !< wheighted subtimestep
+    REAL(wp) :: mc_factor_l     !< local mass flux correction factor
+    REAL(wp) :: volume_flow     !< mass flux through lateral boundary
+    REAL(wp) :: volume_flow_l   !< local mass flux through lateral boundary
+
+    CALL  cpu_log( log_point(57), 'synthetic_turbulence_gen', 'start' )
+
+!
+!-- Calculate time step which is needed for filter functions
+    dt_stg = MAX( dt_3d, dt_stg_call ) !* weight_substep(intermediate_timestep_count)
+!
+!-- Initial value of fu, fv, fw
+    IF ( simulated_time == 0.0_wp .AND. .NOT. velocity_seed_initialized )  THEN
+       CALL stg_generate_seed_yz( nuy, nuz, buy, buz, fu_yz, id_stg_left )
+       CALL stg_generate_seed_yz( nvy, nvz, bvy, bvz, fv_yz, id_stg_left )
+       CALL stg_generate_seed_yz( nwy, nwz, bwy, bwz, fw_yz, id_stg_left )
+
+       IF ( nesting_offline  .OR.  ( child_domain .AND.  rans_mode_parent      &
+                                .AND.  .NOT.  rans_mode ) )  THEN
+!
+!--       Generate turbulence at right boundary
+          CALL stg_generate_seed_yz( nuy, nuz, buy, buz, fu_yz, id_stg_right )
+          CALL stg_generate_seed_yz( nvy, nvz, bvy, bvz, fv_yz, id_stg_right )
+          CALL stg_generate_seed_yz( nwy, nwz, bwy, bwz, fw_yz, id_stg_right )
+!
+!--       Generate turbulence at north boundary
+          CALL stg_generate_seed_xz( nux, nuz, bux, buz, fu_xz, id_stg_north )
+          CALL stg_generate_seed_xz( nvx, nvz, bvx, bvz, fv_xz, id_stg_north )
+          CALL stg_generate_seed_xz( nwx, nwz, bwx, bwz, fw_xz, id_stg_north )
+!
+!--       Generate turbulence at south boundary
+          CALL stg_generate_seed_xz( nux, nuz, bux, buz, fu_xz, id_stg_south )
+          CALL stg_generate_seed_xz( nvx, nvz, bvx, bvz, fv_xz, id_stg_south )
+          CALL stg_generate_seed_xz( nwx, nwz, bwx, bwz, fw_xz, id_stg_south )
+       ENDIF
+       velocity_seed_initialized = .TRUE.
+    ENDIF
+    
+!
+!-- New set of fu, fv, fw
+    CALL stg_generate_seed_yz( nuy, nuz, buy, buz, fuo_yz, id_stg_left )
+    CALL stg_generate_seed_yz( nvy, nvz, bvy, bvz, fvo_yz, id_stg_left )
+    CALL stg_generate_seed_yz( nwy, nwz, bwy, bwz, fwo_yz, id_stg_left )
+    
+    IF ( nesting_offline  .OR.  ( child_domain .AND.  rans_mode_parent         &
+                          .AND.  .NOT.  rans_mode ) )  THEN
+!
+!--    Generate turbulence at right boundary
+       CALL stg_generate_seed_yz( nuy, nuz, buy, buz, fuo_yz, id_stg_right )
+       CALL stg_generate_seed_yz( nvy, nvz, bvy, bvz, fvo_yz, id_stg_right )
+       CALL stg_generate_seed_yz( nwy, nwz, bwy, bwz, fwo_yz, id_stg_right )
+!
+!--    Generate turbulence at north boundary
+       CALL stg_generate_seed_xz( nux, nuz, bux, buz, fuo_xz, id_stg_north )
+       CALL stg_generate_seed_xz( nvx, nvz, bvx, bvz, fvo_xz, id_stg_north )
+       CALL stg_generate_seed_xz( nwx, nwz, bwx, bwz, fwo_xz, id_stg_north )
+!
+!--    Generate turbulence at south boundary
+       CALL stg_generate_seed_xz( nux, nuz, bux, buz, fuo_xz, id_stg_south )
+       CALL stg_generate_seed_xz( nvx, nvz, bvx, bvz, fvo_xz, id_stg_south )
+       CALL stg_generate_seed_xz( nwx, nwz, bwx, bwz, fwo_xz, id_stg_south )
+    ENDIF
+    
+!
+!-- Turbulence generation at left and or right boundary
+    IF ( myidx == id_stg_left  .OR.  myidx == id_stg_right )  THEN
+    
+       DO  j = nysg, nyng
+          DO  k = nzb, nzt + 1
+!
+!--          Update fu, fv, fw following Eq. 14 of Xie and Castro (2008)
+             IF ( tu(k) == 0.0_wp )  THEN
+                fu_yz(k,j) = fuo_yz(k,j)
+             ELSE
+                fu_yz(k,j) = fu_yz(k,j) * EXP( -pi * dt_stg * 0.5_wp / tu(k) ) + &
+                         fuo_yz(k,j) * SQRT( 1.0_wp - EXP( -pi * dt_stg / tu(k) ) )
+             ENDIF
+
+             IF ( tv(k) == 0.0_wp )  THEN
+                fv_yz(k,j) = fvo_yz(k,j)
+             ELSE
+                fv_yz(k,j) = fv_yz(k,j) * EXP( -pi * dt_stg * 0.5_wp / tv(k) ) + &
+                         fvo_yz(k,j) * SQRT( 1.0_wp - EXP( -pi * dt_stg / tv(k) ) )
+             ENDIF
+
+             IF ( tw(k) == 0.0_wp )  THEN
+                fw_yz(k,j) = fwo_yz(k,j)
+             ELSE
+                fw_yz(k,j) = fw_yz(k,j) * EXP( -pi * dt_stg * 0.5_wp / tw(k) ) + &
+                         fwo_yz(k,j) * SQRT( 1.0_wp - EXP( -pi * dt_stg / tw(k) ) )
+             ENDIF
+!
+!--          Lund rotation following Eq. 17 in Xie and Castro (2008).
+!--          Additional factors are added to improve the variance of v and w
+             IF( k == 0 )  THEN
+                dist_yz(k,j,1) = 0.0_wp
+                dist_yz(k,j,2) = 0.0_wp
+                dist_yz(k,j,3) = 0.0_wp
+             ELSE
+                dist_yz(k,j,1) = MIN( a11(k) * fu_yz(k,j), 3.0_wp )
+                !experimental test of 1.2
+                dist_yz(k,j,2) = MIN( ( SQRT( a22(k) / MAXVAL(a22) )           &
+                                      * 1.2_wp )                               &
+                                     * (   a21(k) * fu_yz(k,j)                 &
+                                         + a22(k) * fv_yz(k,j) ), 3.0_wp )
+                dist_yz(k,j,3) = MIN( ( SQRT(a33(k) / MAXVAL(a33) )            &
+                                      * 1.3_wp )                               &
+                                    * (   a31(k) * fu_yz(k,j)                  &
+                                        + a32(k) * fv_yz(k,j)                  &
+                                        + a33(k) * fw_yz(k,j) ), 3.0_wp )
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+!
+!--    Mass flux correction following Kim et al. (2013)
+!--    This correction factor insures that the mass flux is preserved at the
+!--    inflow boundary
+       IF ( .NOT. nesting_offline  .AND.  .NOT. child_domain )  THEN 
+          mc_factor_l = 0.0_wp
+          mc_factor   = 0.0_wp
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                mc_factor_l = mc_factor_l + dzw(k)  *                          &
+                              ( mean_inflow_profiles(k,1) + dist_yz(k,j,1) )
+             ENDDO
+          ENDDO
+
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( mc_factor_l, mc_factor, 1, MPI_REAL, MPI_SUM,    &
+                              comm1dy, ierr )
+#else
+          mc_factor = mc_factor_l
+#endif
+
+          mc_factor = volume_flow_initial(1) / mc_factor
+
+!
+!--       Add disturbance at the inflow
+          DO  j = nysg, nyng
+             DO  k = nzb, nzt+1
+                 u(k,j,-nbgp+1:0) = ( mean_inflow_profiles(k,1) +              &
+                                      dist_yz(k,j,1)             ) * mc_factor
+                 v(k,j,-nbgp:-1)  = ( mean_inflow_profiles(k,2) +              &
+                                      dist_yz(k,j,2)             ) * mc_factor
+                 w(k,j,-nbgp:-1)  =   dist_yz(k,j,3)               * mc_factor
+             ENDDO
+          ENDDO
+
+       ELSE
+!
+!--       First, calculate volume flow at yz boundary
+          IF ( myidx == id_stg_left  )  i = nxl
+          IF ( myidx == id_stg_right )  i = nxr+1
+
+          volume_flow_l = 0.0_wp
+          volume_flow   = 0.0_wp
+          mc_factor_l   = 0.0_wp
+          mc_factor     = 0.0_wp
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                volume_flow_l = volume_flow_l + u(k,j,i) * dzw(k) * dy         &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 ) )
+
+                mc_factor_l = mc_factor_l     + ( u(k,j,i) + dist_yz(k,j,1) )  &
+                                                         * dzw(k) * dy         &
+                                     * MERGE( 1.0_wp, 0.0_wp,                  &
+                                              BTEST( wall_flags_0(k,j,i), 1 ) )
+             ENDDO
+          ENDDO
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( volume_flow_l, volume_flow,                      &
+                              1, MPI_REAL, MPI_SUM, comm1dy, ierr )
+          CALL MPI_ALLREDUCE( mc_factor_l, mc_factor,                          &
+                              1, MPI_REAL, MPI_SUM, comm1dy, ierr )
+#else
+          volume_flow = volume_flow_l
+          mc_factor   = mc_factor_l
+#endif
+
+          mc_factor = volume_flow / mc_factor
+
+!
+!--       Add disturbances
+          IF ( myidx == id_stg_left  )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   u(k,j,0) = ( u(k,j,0) + dist_yz(k,j,1) )                    &
+                       * mc_factor * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,0), 1 ) )
+                   u(k,j,-1) = u(k,j,0)
+                   v(k,j,-1)  = ( v(k,j,-1)  + dist_yz(k,j,2)  )               &
+                       * mc_factor * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,-1), 2 ) )
+                   w(k,j,-1)  = ( w(k,j,-1)  + dist_yz(k,j,3)  )               &
+                       * mc_factor * MERGE( 1.0_wp, 0.0_wp,                    &
+                                            BTEST( wall_flags_0(k,j,-1), 3 ) )
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( myidx == id_stg_right  )  THEN
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   u(k,j,nxr+1) = ( u(k,j,nxr+1) + dist_yz(k,j,1) )            &
+                     * mc_factor * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,j,nxr+1), 1 ) )
+                   v(k,j,nxr+1) = ( v(k,j,nxr+1) + dist_yz(k,j,2) )            &
+                     * mc_factor * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,j,nxr+1), 2 ) )
+                   w(k,j,nxr+1) = ( w(k,j,nxr+1) + dist_yz(k,j,3) )            &
+                     * mc_factor * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,j,nxr+1), 3 ) )
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+    ENDIF
+!
+!-- Turbulence generation at north and south boundary
+    IF ( myidy == id_stg_north  .OR.  myidy == id_stg_south )  THEN
+   
+       DO  i = nxlg, nxrg
+          DO  k = nzb, nzt + 1
+!
+!--          Update fu, fv, fw following Eq. 14 of Xie and Castro (2008)
+             IF ( tu(k) == 0.0_wp )  THEN
+                fu_xz(k,i) = fuo_xz(k,i)
+             ELSE
+                fu_xz(k,i) = fu_xz(k,i) * EXP( -pi * dt_stg * 0.5_wp / tu(k) ) +     &
+                         fuo_xz(k,i) * SQRT( 1.0_wp - EXP( -pi * dt_stg / tu(k) ) )
+             ENDIF
+
+             IF ( tv(k) == 0.0_wp )  THEN
+                fv_xz(k,i) = fvo_xz(k,i)
+             ELSE
+                fv_xz(k,i) = fv_xz(k,i) * EXP( -pi * dt_stg * 0.5_wp / tv(k) ) +     &
+                      fvo_xz(k,i) * SQRT( 1.0_wp - EXP( -pi * dt_stg / tv(k) ) )
+             ENDIF
+            
+             IF ( tw(k) == 0.0_wp )  THEN
+                fw_xz(k,i) = fwo_xz(k,i)
+             ELSE
+                fw_xz(k,i) = fw_xz(k,i) * EXP( -pi * dt_stg * 0.5_wp / tw(k) ) +     &
+                      fwo_xz(k,i) * SQRT( 1.0_wp - EXP( -pi * dt_stg / tw(k) ) )
+             ENDIF
+!
+!--          Lund rotation following Eq. 17 in Xie and Castro (2008).
+!--          Additional factors are added to improve the variance of v and w
+             IF( k == 0 )  THEN
+                dist_xz(k,i,1) = 0.0_wp
+                dist_xz(k,i,2) = 0.0_wp
+                dist_xz(k,i,3) = 0.0_wp
+
+             ELSE
+                dist_xz(k,i,1) = MIN( a11(k) * fu_xz(k,i), 3.0_wp )
+                !experimental test of 1.2
+                dist_xz(k,i,2) = MIN( ( SQRT( a22(k) / MAXVAL(a22) )           &
+                                      * 1.2_wp )                               &
+                                     * (   a21(k) * fu_xz(k,i)                 &
+                                         + a22(k) * fv_xz(k,i) ), 3.0_wp )
+                dist_xz(k,i,3) = MIN( ( SQRT(a33(k) / MAXVAL(a33) )            &
+                                      * 1.3_wp )                               &
+                                    * (   a31(k) * fu_xz(k,i)                  &
+                                        + a32(k) * fv_xz(k,i)                  &
+                                        + a33(k) * fw_xz(k,i) ), 3.0_wp )
+             ENDIF
+
+          ENDDO
+       ENDDO
+
+!
+!--    Mass flux correction following Kim et al. (2013)
+!--    This correction factor insures that the mass flux is preserved at the
+!--    inflow boundary.
+!--    First, calculate volume flow at xz boundary
+       IF ( myidy == id_stg_south  ) j = nys
+       IF ( myidy == id_stg_north )  j = nyn+1
+
+       volume_flow_l = 0.0_wp
+       volume_flow   = 0.0_wp
+       mc_factor_l   = 0.0_wp
+       mc_factor     = 0.0_wp
+       DO  i = nxl, nxr
+          DO  k = nzb+1, nzt
+             volume_flow_l = volume_flow_l + v(k,j,i) * dzw(k) * dx            &
+                                  * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,j,i), 2 ) )
+
+             mc_factor_l = mc_factor_l     + ( v(k,j,i) + dist_xz(k,i,2) )     &
+                                                      * dzw(k) * dx            &
+                                  * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,j,i), 2 ) )
+          ENDDO
+       ENDDO
+#if defined( __parallel )
+       CALL MPI_ALLREDUCE( volume_flow_l, volume_flow,                         &
+                           1, MPI_REAL, MPI_SUM, comm1dx, ierr )
+       CALL MPI_ALLREDUCE( mc_factor_l, mc_factor,                             &
+                           1, MPI_REAL, MPI_SUM, comm1dx, ierr )
+#else
+       volume_flow = volume_flow_l
+       mc_factor   = mc_factor_l
+#endif
+
+       mc_factor = volume_flow / mc_factor
+
+!
+!--    Add disturbances
+       IF ( myidy == id_stg_south  )  THEN
+
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                u(k,-1,i) = ( u(k,-1,i) + dist_xz(k,i,1) )                     &
+                      * mc_factor * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,-1,i), 1 ) )
+                v(k,0,i)  = ( v(k,0,i)  + dist_xz(k,i,2)  )                    &
+                      * mc_factor * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,0,i), 2 ) )
+                v(k,-1,i) = v(k,0,i)
+                w(k,-1,i) = ( w(k,-1,i) + dist_xz(k,i,3)  )                    &
+                      * mc_factor * MERGE( 1.0_wp, 0.0_wp,                     &
+                                           BTEST( wall_flags_0(k,-1,i), 3 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+       IF ( myidy == id_stg_north  )  THEN
+
+          DO  i = nxl, nxr
+             DO  k = nzb+1, nzt
+                u(k,nyn+1,i) = ( u(k,nyn+1,i) + dist_xz(k,i,1) )               &
+                     * mc_factor * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,nyn+1,i), 1 ) )
+                v(k,nyn+1,i) = ( v(k,nyn+1,i) + dist_xz(k,i,2) )               &
+                     * mc_factor * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,nyn+1,i), 2 ) )
+                w(k,nyn+1,i) = ( w(k,nyn+1,i) + dist_xz(k,i,3) )               &
+                     * mc_factor * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,nyn+1,i), 3 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+    ENDIF
+!
+!-- Finally, set time counter for calling STG to zero
+    time_stg_call = 0.0_wp
+
+    CALL  cpu_log( log_point(57), 'synthetic_turbulence_gen', 'stop' )
+
+ END SUBROUTINE stg_main
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Generate a set of random number rand_it wich is equal on each PE
+!> and calculate the velocity seed f_n.
+!> f_n is splitted in vertical direction by the number of PEs in x-direction and
+!> and each PE calculates a vertical subsection of f_n. At the the end, all
+!> parts are collected to form the full array.
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_generate_seed_yz( n_y, n_z, b_y, b_z, f_n, id )
+
+
+    USE indices,                                                               &
+        ONLY: ny
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: id          !< core ids at respective boundaries
+    INTEGER(iwp) :: j           !< loop index in y-direction
+    INTEGER(iwp) :: jj          !< loop index in y-direction
+    INTEGER(iwp) :: k           !< loop index in z-direction
+    INTEGER(iwp) :: kk          !< loop index in z-direction
+    INTEGER(iwp) :: send_count  !< send count for MPI_GATHERV
+
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_y    !< length scale in y-direction
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_z    !< length scale in z-direction
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_y2   !< n_y*2
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_z2   !< n_z*2
+
+    REAL(wp) :: nyz_inv         !< inverse of number of grid points in yz-slice
+    REAL(wp) :: rand_av         !< average of random number
+    REAL(wp) :: rand_sigma_inv  !< inverse of stdev of random number
+
+    REAL(wp), DIMENSION(-merg:merg,nzb:nzt+1)    :: b_y     !< filter function in y-direction
+    REAL(wp), DIMENSION(-merg:merg,nzb:nzt+1)    :: b_z     !< filter function in z-direction
+    REAL(wp), DIMENSION(nzb_x_stg:nzt_x_stg+1,nysg:nyng) :: f_n_l   !<  local velocity seed
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng)     :: f_n     !<  velocity seed
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE        :: rand_it !<  random number
+
+
+!
+!-- Generate random numbers using a seed generated in stg_init.
+!-- The set of random numbers are modified to have an average of 0 and
+!-- unit variance.
+    ALLOCATE( rand_it(nzb-mergp:nzt+1+mergp,-mergp:ny+mergp) )
+
+    rand_av        = 0.0_wp
+    rand_sigma_inv = 0.0_wp
+    nyz_inv        = 1.0_wp / REAL( ( nzt+1 - nzb+1 ) * ( ny+1 ), KIND=wp )
+
+    DO  j = 0, ny
+       DO  k = nzb, nzt+1
+          CALL RANDOM_NUMBER( rand_it(k,j) )
+          rand_av = rand_av + rand_it(k,j)
+       ENDDO
+    ENDDO
+
+    rand_av = rand_av * nyz_inv
+
+    DO  j = 0, ny
+       DO  k = nzb, nzt+1
+          rand_it(k,j)   = rand_it(k,j) - rand_av
+          rand_sigma_inv = rand_sigma_inv + rand_it(k,j) ** 2
+       ENDDO
+    ENDDO
+
+    rand_sigma_inv = 1.0_wp / SQRT(rand_sigma_inv * nyz_inv)
+
+    DO  j = 0, ny
+       DO  k = nzb, nzt+1
+          rand_it(k,j) = rand_it(k,j) * rand_sigma_inv
+       ENDDO
+    ENDDO
+
+!
+!-- Periodic fill of random number in space
+    DO  j = 0, ny
+       DO  k = 1, mergp
+          rand_it(nzb  -k,j) = rand_it(nzt+2-k,j)    ! bottom margin
+          rand_it(nzt+1+k,j) = rand_it(nzb+k-1,j)    ! top margin
+       ENDDO
+    ENDDO
+    DO  j = 1, mergp
+       DO  k = nzb-mergp, nzt+1+mergp
+          rand_it(k,  -j) = rand_it(k,ny-j+1)        ! south margin
+          rand_it(k,ny+j) = rand_it(k,   j-1)        ! north margin
+       ENDDO
+    ENDDO
+
+!
+!-- Generate velocity seed following Eq.6 of Xie and Castro (2008)
+    n_y2 = n_y * 2
+    n_z2 = n_z * 2
+    f_n_l  = 0.0_wp
+
+    DO  j = nysg, nyng
+       DO  k = nzb_x_stg, nzt_x_stg+1
+          DO  jj = -n_y2(k), n_y2(k)
+             DO  kk = -n_z2(k), n_z2(k)
+                f_n_l(k,j) = f_n_l(k,j)                                        &
+                           + b_y(jj,k) * b_z(kk,k) * rand_it(k+kk,j+jj)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+    DEALLOCATE( rand_it )
+!
+!-- Gather velocity seeds of full subdomain
+    send_count = nzt_x_stg - nzb_x_stg + 1
+    IF ( nzt_x_stg == nzt )  send_count = send_count + 1
+
+#if defined( __parallel )
+    CALL MPI_GATHERV( f_n_l(nzb_x_stg,nysg), send_count, stg_type_yz_small,    &
+                      f_n(nzb+1,nysg), recv_count_yz, displs_yz, stg_type_yz,  &
+                      id, comm1dx, ierr )
+#else
+    f_n(nzb+1:nzt+1,nysg:nyng) = f_n_l(nzb_x_stg:nzt_x_stg+1,nysg:nyng)
+#endif
+
+
+ END SUBROUTINE stg_generate_seed_yz
+
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Generate a set of random number rand_it wich is equal on each PE
+!> and calculate the velocity seed f_n.
+!> f_n is splitted in vertical direction by the number of PEs in y-direction and
+!> and each PE calculates a vertical subsection of f_n. At the the end, all
+!> parts are collected to form the full array.
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_generate_seed_xz( n_x, n_z, b_x, b_z, f_n, id )
+
+
+    USE indices,                                                               &
+        ONLY: nx
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: id          !< core ids at respective boundaries
+    INTEGER(iwp) :: i           !< loop index in x-direction
+    INTEGER(iwp) :: ii          !< loop index in x-direction
+    INTEGER(iwp) :: k           !< loop index in z-direction
+    INTEGER(iwp) :: kk          !< loop index in z-direction
+    INTEGER(iwp) :: send_count  !< send count for MPI_GATHERV
+
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_x    !< length scale in x-direction
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_z    !< length scale in z-direction
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_x2   !< n_x*2
+    INTEGER(iwp), DIMENSION(nzb:nzt+1) :: n_z2   !< n_z*2
+
+    REAL(wp) :: nxz_inv         !< inverse of number of grid points in xz-slice
+    REAL(wp) :: rand_av         !< average of random number
+    REAL(wp) :: rand_sigma_inv  !< inverse of stdev of random number
+
+    REAL(wp), DIMENSION(-merg:merg,nzb:nzt+1)    :: b_x     !< filter function in x-direction
+    REAL(wp), DIMENSION(-merg:merg,nzb:nzt+1)    :: b_z     !< filter function in z-direction
+    REAL(wp), DIMENSION(nzb_y_stg:nzt_y_stg+1,nxlg:nxrg) :: f_n_l   !<  local velocity seed
+    REAL(wp), DIMENSION(nzb:nzt+1,nxlg:nxrg)     :: f_n     !<  velocity seed
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE        :: rand_it !<  random number
+
+
+!
+!-- Generate random numbers using a seed generated in stg_init.
+!-- The set of random numbers are modified to have an average of 0 and
+!-- unit variance.
+    ALLOCATE( rand_it(nzb-mergp:nzt+1+mergp,-mergp:nx+mergp) )
+
+    rand_av        = 0.0_wp
+    rand_sigma_inv = 0.0_wp
+    nxz_inv        = 1.0_wp / REAL( ( nzt+1 - nzb+1 ) * ( nx+1 ), KIND=wp )
+
+    DO  i = 0, nx
+       DO  k = nzb, nzt+1
+          CALL RANDOM_NUMBER( rand_it(k,i) )
+          rand_av = rand_av + rand_it(k,i)
+       ENDDO
+    ENDDO
+
+    rand_av = rand_av * nxz_inv
+
+    DO  i = 0, nx
+       DO  k = nzb, nzt+1
+          rand_it(k,i)   = rand_it(k,i) - rand_av
+          rand_sigma_inv = rand_sigma_inv + rand_it(k,i) ** 2
+       ENDDO
+    ENDDO
+
+    rand_sigma_inv = 1.0_wp / SQRT(rand_sigma_inv * nxz_inv)
+
+    DO  i = 0, nx
+       DO  k = nzb, nzt+1
+          rand_it(k,i) = rand_it(k,i) * rand_sigma_inv
+       ENDDO
+    ENDDO
+
+!
+!-- Periodic fill of random number in space
+    DO  i = 0, nx
+       DO  k = 1, mergp
+          rand_it(nzb-k,i)   = rand_it(nzt+2-k,i)    ! bottom margin
+          rand_it(nzt+1+k,i) = rand_it(nzb+k-1,i)    ! top margin
+       ENDDO
+    ENDDO
+    DO  i = 1, mergp
+       DO  k = nzb-mergp, nzt+1+mergp
+          rand_it(k,-i)   = rand_it(k,nx-i+1)        ! left margin
+          rand_it(k,nx+i) = rand_it(k,i-1)           ! right margin
+       ENDDO
+    ENDDO
+
+!
+!-- Generate velocity seed following Eq.6 of Xie and Castro (2008)
+    n_x2 = n_x * 2
+    n_z2 = n_z * 2
+    f_n_l  = 0.0_wp
+
+    DO  i = nxlg, nxrg
+       DO  k = nzb_y_stg, nzt_y_stg+1
+          DO  ii = -n_x2(k), n_x2(k)
+             DO  kk = -n_z2(k), n_z2(k)
+                f_n_l(k,i) = f_n_l(k,i)                                        &
+                           + b_x(ii,k) * b_z(kk,k) * rand_it(k+kk,i+ii)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+    DEALLOCATE( rand_it )
+
+!
+!-- Gather velocity seeds of full subdomain
+    send_count = nzt_y_stg - nzb_y_stg + 1
+    IF ( nzt_y_stg == nzt )  send_count = send_count + 1
+
+
+#if defined( __parallel )
+    CALL MPI_GATHERV( f_n_l(nzb_y_stg,nxlg), send_count, stg_type_xz_small,    &
+                      f_n(nzb+1,nxlg), recv_count_xz, displs_xz, stg_type_xz,  &
+                      id, comm1dy, ierr )
+#else
+    f_n(nzb+1:nzt+1,nxlg:nxrg) = f_n_l(nzb_y_stg:nzt_y_stg+1,nxlg:nxrg)
+#endif
+
+
+ END SUBROUTINE stg_generate_seed_xz
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parametrization of the Reynolds stress tensor, following the parametrization
+!> described in Rotach et al. (1996), which is applied in state-of-the-art
+!> dispserion modelling. Please note, the parametrization does not distinguish
+!> between along-wind and cross-wind turbulence. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE parametrize_reynolds_stress
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: k            !< loop index in z-direction
+    
+    REAL(wp)     ::  zzi         !< ratio of z/zi
+    
+!
+!-- 
+    DO  k = nzb+1, nzt+1
+          
+       IF ( zu(k) <= zi_ribulk )  THEN
+!
+!--       Determine normalized height coordinate
+          zzi = zu(k) / zi_ribulk
+!
+!--       u'u' and v'v'. Assume isotropy. Note, add a small negative number
+!--       to the denominator, else the merge-function can crash if scale_l is 
+!--       zero. 
+          r11(k) = scale_us**2 * (                                             &
+                      MERGE( 0.35_wp * (                                       &
+                           - zi_ribulk / ( kappa * scale_l - 10E-4_wp )        &
+                                       )**( 2.0_wp / 3.0_wp ),                 &
+                             0.0_wp,                                           &
+                             scale_l < 0.0_wp )                                &
+                    + 5.0_wp - 4.0_wp * zzi                                    &
+                                 )
+                                 
+          r22(k) = r11(k)
+!
+!--       w'w'
+          r33(k) = scale_wm**2 * (                                             &
+                      1.5_wp * zzi**( 2.0_wp / 3.0_wp ) * EXP( -2.0_wp * zzi ) &
+                    + ( 1.7_wp - zzi ) * ( scale_us / scale_wm )**2            &                     
+                                 )
+!
+!--       u'w' and v'w'. Assume isotropy.
+          r31(k) = - scale_us**2 * (                                           &
+                         1.0_wp - EXP( 3.0_wp * ( zzi - 1.0_wp ) )             &
+                                   )
+                              
+          r32(k) = r31(k)
+!
+!--       For u'v' no parametrization exist so far - ?. For simplicity assume
+!--       a similar profile as for u'w'. 
+          r21(k) = r31(k)
+!
+!--    Above the boundary layer, assmume laminar flow conditions.
+       ELSE
+          r11(k) = 10E-8_wp
+          r22(k) = 10E-8_wp
+          r33(k) = 10E-8_wp
+          r21(k) = 10E-8_wp
+          r31(k) = 10E-8_wp
+          r32(k) = 10E-8_wp
+       ENDIF
+!        write(9,*) zu(k), r11(k), r33(k), r31(k), zi_ribulk, scale_us, scale_wm, scale_l
+    ENDDO
+
+!
+!-- Set bottom boundary condition    
+    r11(nzb) = r11(nzb+1)
+    r22(nzb) = r22(nzb+1)
+    r33(nzb) = r33(nzb+1)
+
+    r21(nzb) = r11(nzb+1)
+    r31(nzb) = r31(nzb+1)
+    r32(nzb) = r32(nzb+1)
+    
+
+ END SUBROUTINE parametrize_reynolds_stress 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the coefficient matrix from the Lund rotation. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE calc_coeff_matrix
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: k   !< loop index in z-direction
+    
+!
+!-- Calculate coefficient matrix. Split loops to allow for loop vectorization.
+    DO  k = nzb+1, nzt+1
+       IF ( r11(k) > 0.0_wp )  THEN
+          a11(k) = SQRT( r11(k) ) 
+          a21(k) = r21(k) / a11(k)
+          a31(k) = r31(k) / a11(k)
+       ELSE
+          a11(k) = 10E-8_wp
+          a21(k) = 10E-8_wp
+          a31(k) = 10E-8_wp
+       ENDIF
+    ENDDO
+    DO  k = nzb+1, nzt+1
+       a22(k) = r22(k) - a21(k)**2 
+       IF ( a22(k) > 0.0_wp )  THEN
+          a22(k) = SQRT( a22(k) )
+          a32(k) = r32(k) - a21(k) * a31(k) / a22(k)
+       ELSE 
+          a22(k) = 10E-8_wp
+          a32(k) = 10E-8_wp
+       ENDIF
+    ENDDO
+    DO  k = nzb+1, nzt+1
+       a33(k) = r33(k) - a31(k)**2 - a32(k)**2
+       IF ( a33(k) > 0.0_wp )  THEN
+          a33(k) =  SQRT( a33(k) )
+       ELSE
+          a33(k) = 10E-8_wp
+       ENDIF
+    ENDDO   
+!
+!-- Set bottom boundary condition
+    a11(nzb) = a11(nzb+1)
+    a22(nzb) = a22(nzb+1)
+    a21(nzb) = a21(nzb+1)
+    a33(nzb) = a33(nzb+1)    
+    a31(nzb) = a31(nzb+1)
+    a32(nzb) = a32(nzb+1)    
+
+ END SUBROUTINE calc_coeff_matrix
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine controls the re-adjustment of the turbulence statistics used
+!> for generating turbulence at the lateral boundaries.  
+!------------------------------------------------------------------------------!
+ SUBROUTINE stg_adjust
+
+    IMPLICIT NONE
+    
+    INTEGER(iwp) ::  k
+
+    CALL  cpu_log( log_point(57), 'synthetic_turbulence_gen', 'start' )
+!
+!-- Compute mean boundary layer height according to Richardson-Bulk
+!-- criterion using the inflow profiles. Further velocity scale as well as
+!-- mean friction velocity are calculated.
+    CALL calc_scaling_variables
+!
+!-- Set length and time scales depending on boundary-layer height
+    CALL calc_length_and_time_scale
+!
+!-- Parametrize Reynolds-stress tensor, diagonal elements as well
+!-- as r21 (v'u'), r31 (w'u'), r32 (w'v'). Parametrization follows
+!-- Rotach et al. (1996) and is based on boundary-layer depth, 
+!-- friction velocity and velocity scale. 
+    CALL parametrize_reynolds_stress
+!
+!-- Calculate coefficient matrix from Reynolds stress tensor  
+!-- (Lund rotation)
+    CALL calc_coeff_matrix
+!
+!-- Determine filter functions on basis of updated length scales
+    CALL stg_filter_func( nux, bux ) !filter ux
+    CALL stg_filter_func( nuy, buy ) !filter uy
+    CALL stg_filter_func( nuz, buz ) !filter uz
+    CALL stg_filter_func( nvx, bvx ) !filter vx
+    CALL stg_filter_func( nvy, bvy ) !filter vy
+    CALL stg_filter_func( nvz, bvz ) !filter vz
+    CALL stg_filter_func( nwx, bwx ) !filter wx
+    CALL stg_filter_func( nwy, bwy ) !filter wy
+    CALL stg_filter_func( nwz, bwz ) !filter wz
+!
+!-- Reset time counter for controlling next adjustment to zero
+    time_stg_adjust = 0.0_wp
+    
+    CALL  cpu_log( log_point(57), 'synthetic_turbulence_gen', 'stop' )
+    
+ END SUBROUTINE stg_adjust 
+ 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates turbuluent length and time scales if these are not available
+!> from measurements. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE calc_length_and_time_scale
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, ddzw, u_init, v_init, zu, zw
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy, dx, dy
+        
+    USE statistics,                                                            &
+        ONLY:  hom
+
+    IMPLICIT NONE
+
+
+    INTEGER(iwp) :: k            !< loop index in z-direction
+
+    REAL(wp) ::  length_scale    !< typical length scale
+    
+!
+!-- In initial call the boundary-layer depth can be zero. This case, set 
+!-- minimum value for boundary-layer depth, to setup length scales correctly.
+    zi_ribulk = MAX( zi_ribulk, zw(nzb+2) )
+!
+!-- Set-up default turbulent length scales. From the numerical point of
+!-- view the imposed perturbations should not be immediately dissipated
+!-- by the numerics. The numerical dissipation, however, acts on scales
+!-- up to 8 x the grid spacing. For this reason, set the turbulence 
+!-- length scale to 8 time the grid spacing. Further, above the boundary
+!-- layer height, set turbulence lenght scales to zero (equivalent to not
+!-- imposing any perturbations) in order to save computational costs. 
+!-- Typical time scales are derived by assuming Taylors's hypothesis, 
+!-- using the length scales and the mean profiles of u- and v-component.
+    DO  k = nzb+1, nzt+1
+    
+       length_scale = 8.0_wp * MIN( dx, dy, dzw(k) )
+          
+       IF ( zu(k) <= zi_ribulk )  THEN  
+!
+!--       Assume isotropic turbulence length scales
+          nux(k) = MAX( INT( length_scale * ddx     ), 1 )
+          nuy(k) = MAX( INT( length_scale * ddy     ), 1 )
+          nuz(k) = MAX( INT( length_scale * ddzw(k) ), 1 )
+          nvx(k) = MAX( INT( length_scale * ddx     ), 1 )
+          nvy(k) = MAX( INT( length_scale * ddy     ), 1 )
+          nvz(k) = MAX( INT( length_scale * ddzw(k) ), 1 )
+          nwx(k) = MAX( INT( length_scale * ddx     ), 1 )
+          nwy(k) = MAX( INT( length_scale * ddy     ), 1 )
+          nwz(k) = MAX( INT( length_scale * ddzw(k) ), 1 )
+!
+!--       Limit time scales, else they become very larger for low wind speed, 
+!--       imposing long-living inflow perturbations which in turn propagate
+!--       further into the model domain. Use u_init and v_init to calculate
+!--       the time scales, which will be equal to the inflow profiles, both, 
+!--       in offline nesting mode or in dirichlet/radiation mode. 
+          tu(k)  = MIN( dt_stg_adjust, length_scale /                          &
+                                  ( ABS( u_init(k) ) + 0.1_wp ) )
+          tv(k)  = MIN( dt_stg_adjust, length_scale /                          &
+                                  ( ABS( v_init(k) ) + 0.1_wp ) )
+!
+!--       Time scale of w-component is a mixture from u- and v-component. 
+          tw(k)  = SQRT( tu(k)**2 + tv(k)**2 )
+!
+!--    Above the boundary layer length scales are zero, i.e. imposed turbulence
+!--    is not correlated in space and time, just white noise. This saves
+!--    computations power. 
+       ELSE
+          nux(k) = 0.0_wp
+          nuy(k) = 0.0_wp
+          nuz(k) = 0.0_wp
+          nvx(k) = 0.0_wp
+          nvy(k) = 0.0_wp
+          nvz(k) = 0.0_wp
+          nwx(k) = 0.0_wp
+          nwy(k) = 0.0_wp
+          nwz(k) = 0.0_wp
+          
+          tu(k)  = 0.0_wp
+          tv(k)  = 0.0_wp
+          tw(k)  = 0.0_wp
+       ENDIF
+    ENDDO
+!
+!-- Set bottom boundary condition for the length and time scales 
+    nux(nzb) = nux(nzb+1)
+    nuy(nzb) = nuy(nzb+1)
+    nuz(nzb) = nuz(nzb+1)
+    nvx(nzb) = nvx(nzb+1)
+    nvy(nzb) = nvy(nzb+1)
+    nvz(nzb) = nvz(nzb+1)
+    nwx(nzb) = nwx(nzb+1)
+    nwy(nzb) = nwy(nzb+1)
+    nwz(nzb) = nwz(nzb+1)
+
+    tu(nzb)  = tu(nzb+1)
+    tv(nzb)  = tv(nzb+1)
+    tw(nzb)  = tw(nzb+1)
+
+
+ END SUBROUTINE calc_length_and_time_scale 
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate scaling variables which are used for turbulence parametrization
+!> according to Rotach et al. (1996). Scaling variables are: friction velocity,
+!> boundary-layer depth, momentum velocity scale, and Obukhov length. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE calc_scaling_variables
+
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
+               humidity, pt_surface
+             
+    USE indices,                                                               &
+        ONLY:  nx, ny  
+        
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, surf_lsm_h, surf_usm_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i            !< loop index in x-direction
+    INTEGER(iwp) :: j            !< loop index in y-direction
+    INTEGER(iwp) :: k            !< loop index in z-direction
+    INTEGER(iwp) :: k_ref        !< index in z-direction for reference height 
+    INTEGER(iwp) :: m            !< surface element index
+
+    REAL(wp) ::  friction_vel_l         !< mean friction veloctiy on subdomain
+    REAL(wp) ::  shf_mean               !< mean surface sensible heat flux
+    REAL(wp) ::  shf_mean_l             !< mean surface sensible heat flux on subdomain
+    REAL(wp) ::  u_int                  !< u-component
+    REAL(wp) ::  v_int                  !< v-component
+    REAL(wp) ::  vpt_surface            !< near-surface virtual potential temperature
+    REAL(wp) ::  w_convective           !< convective velocity scale
+    REAL(wp) ::  z0_mean                !< mean roughness length
+    REAL(wp) ::  z0_mean_l              !< mean roughness length on subdomain
+   
+!
+!-- Mean friction velocity and velocity scale. Therefore, 
+!-- pre-calculate mean roughness length and surface sensible heat flux
+!-- in the model domain, which are further used to estimate friction 
+!-- velocity and velocity scale. Note, for z0 linear averaging is applied,
+!-- even though this is known to unestimate the effective roughness.
+!-- This need to be revised later.
+    z0_mean_l  = 0.0_wp
+    shf_mean_l = 0.0_wp
+    DO  m = 1, surf_def_h(0)%ns
+       z0_mean_l  = z0_mean_l  + surf_def_h(0)%z0(m)
+       shf_mean_l = shf_mean_l + surf_def_h(0)%shf(m)
+    ENDDO    
+    DO  m = 1, surf_lsm_h%ns
+       z0_mean_l  = z0_mean_l  + surf_lsm_h%z0(m)
+       shf_mean_l = shf_mean_l + surf_lsm_h%shf(m)
+    ENDDO
+    DO  m = 1, surf_usm_h%ns
+       z0_mean_l  = z0_mean_l  + surf_usm_h%z0(m)
+       shf_mean_l = shf_mean_l + surf_usm_h%shf(m)
+    ENDDO
+    
+#if defined( __parallel )
+    CALL MPI_ALLREDUCE( z0_mean_l, z0_mean, 1, MPI_REAL, MPI_SUM,              &
+                        comm2d, ierr )
+    CALL MPI_ALLREDUCE( shf_mean_l, shf_mean, 1, MPI_REAL, MPI_SUM,            &
+                        comm2d, ierr )
+#else
+    z0_mean  = z0_mean_l
+    shf_mean = shf_mean_l
+#endif
+    z0_mean  = z0_mean  / REAL( ( nx + 1 ) * ( ny + 1 ), KIND = wp )
+    shf_mean = shf_mean / REAL( ( nx + 1 ) * ( ny + 1 ), KIND = wp )
+        
+!
+!-- Note, Inifor does not use logarithmic interpolation of the 
+!-- velocity components near the ground, so that near-surface
+!-- wind speed and thus the friction velocity is overestimated. 
+!-- However, friction velocity is used for turbulence 
+!-- parametrization, so that more physically meaningful values are important.
+!-- Hence, derive friction velocity from wind speed at a reference height.
+!-- For a first guess use 20 m, which is in the range of the first 
+!-- COSMO vertical level. 
+    k_ref = MINLOC( ABS( zu - cosmo_ref ), DIM = 1 ) - 1
+    
+    friction_vel_l = 0.0_wp
+    IF ( bc_dirichlet_l  .OR.  bc_dirichlet_r )  THEN
+       
+       i = MERGE( -1, nxr + 1, bc_dirichlet_l )
+
+       DO  j = nys, nyn
+!
+!--       Note, in u- and v- component the imposed perturbations 
+!--       from the STG are already included. Check whether this 
+!--       makes any difference compared to using the pure-mean 
+!--       inflow profiles. 
+          u_int = MERGE( u(k_ref,j,i+1), u(k_ref,j,i), bc_dirichlet_l )
+          v_int = v(k_ref,j,i)
+!
+!--       Calculate friction velocity and sum-up. Therefore, assume 
+!--       neutral condtions.
+          friction_vel_l = friction_vel_l + kappa *                            &
+                            SQRT( u_int * u_int + v_int * v_int )  /           &
+                            LOG( zu(k_ref) / z0_mean )
+          
+       ENDDO
+       
+    ENDIF
+    
+    IF ( bc_dirichlet_s  .OR.  bc_dirichlet_n )  THEN
+       
+       j = MERGE( -1, nyn + 1, bc_dirichlet_s )
+    
+       DO  i = nxl, nxr
+          
+          u_int = u(k_ref,j,i)
+          v_int = MERGE( v(k_ref,j+1,i), v(k_ref,j,i), bc_dirichlet_s )
+ 
+          friction_vel_l = friction_vel_l + kappa *                            &
+                            SQRT( u_int * u_int + v_int * v_int )  /           &
+                            LOG( zu(k_ref) / z0_mean )                       
+          
+       ENDDO
+       
+    ENDIF
+    
+#if defined( __parallel )
+    CALL MPI_ALLREDUCE( friction_vel_l, scale_us, 1, MPI_REAL, MPI_SUM,        &
+                        comm2d, ierr )
+#else
+    scale_us = friction_vel_l
+#endif
+    scale_us = scale_us / REAL( 2 * nx + 2 * ny, KIND = wp )
+    
+!
+!-- Compute mean Obukhov length
+    IF ( shf_mean > 0.0_wp )  THEN
+       scale_l = - pt_surface / ( kappa * g ) * scale_us**3 / shf_mean
+    ELSE
+       scale_l = 0.0_wp
+    ENDIF
+    
+!
+!-- Compute mean convective velocity scale. Note, in case the mean heat flux 
+!-- is negative, set convective velocity scale to zero.
+    IF ( shf_mean > 0.0_wp )  THEN
+       w_convective = ( g * shf_mean * zi_ribulk / pt_surface )**( 1.0_wp / 3.0_wp )
+    ELSE
+       w_convective = 0.0_wp
+    ENDIF
+!
+!-- Finally, in order to consider also neutral or stable stratification, 
+!-- compute momentum velocity scale from u* and convective velocity scale, 
+!-- according to Rotach et al. (1996). 
+    scale_wm = ( scale_us**3 + 0.6_wp * w_convective**3 )**( 1.0_wp / 3.0_wp )
+   
+ END SUBROUTINE calc_scaling_variables
+
+ END MODULE synthetic_turbulence_generator_mod
Index: /palm/tags/release-6.0/SOURCE/temperton_fft_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/temperton_fft_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/temperton_fft_mod.f90	(revision 3477)
@@ -0,0 +1,2186 @@
+!> @file temperton_fft_mod.f90
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2300 2017-06-29 13:31:14Z raasch
+! NEC related CPP directives removed
+! 
+! 1851 2016-04-08 13:32:50Z maronga
+!
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! Revision 1.1  2003/03/12 16:41:59  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Fast Fourier transformation developed by Clive Temperton, ECMWF.
+!------------------------------------------------------------------------------!
+ MODULE temperton_fft
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+    PUBLIC set99, fft991cy
+
+    INTEGER(iwp), PARAMETER ::  nfft =  32  !< maximum length of calls to *fft
+    INTEGER(iwp), PARAMETER ::  nout =   6  !< standard output stream
+
+CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calls fortran-versions of fft's.
+!> 
+!> Method:
+!> 
+!> Subroutine 'fft991cy' - multiple fast real periodic transform
+!> supersedes previous routine 'fft991cy'.
+!> 
+!> Real transform of length n performed by removing redundant
+!> operations from complex transform of length n.
+!> 
+!> a       is the array containing input & output data.
+!> work    is an area of size (n+1)*min(lot,nfft).
+!> trigs   is a previously prepared list of trig function values.
+!> ifax    is a previously prepared list of factors of n.
+!> inc     is the increment within each data 'vector'
+!>         (e.g. inc=1 for consecutively stored data).
+!> jump    is the increment between the start of each data vector.
+!> n       is the length of the data vectors.
+!> lot     is the number of data vectors.
+!> isign = +1 for transform from spectral to gridpoint
+!>       = -1 for transform from gridpoint to spectral.
+!> 
+!> ordering of coefficients:
+!> a(0),b(0),a(1),b(1),a(2),b(2),.,a(n/2),b(n/2)
+!> where b(0)=b(n/2)=0; (n+2) locations required.
+!> 
+!> ordering of data:
+!> x(0),x(1),x(2),.,x(n-1), 0 , 0 ; (n+2) locations required.
+!> 
+!> Vectorization is achieved on cray by doing the transforms
+!> in parallel.
+!> 
+!> n must be composed of factors 2,3 & 5 but does not have to be even.
+!> 
+!> definition of transforms:
+!> 
+!> isign=+1: x(j)=sum(k=0,.,n-1)(c(k)*exp(2*i*j*k*pi/n))
+!> where c(k)=a(k)+i*b(k) and c(n-k)=a(k)-i*b(k)
+!> 
+!> isign=-1: a(k)=(1/n)*sum(j=0,.,n-1)(x(j)*cos(2*j*k*pi/n))
+!> b(k)=-(1/n)*sum(j=0,.,n-1)(x(j)*sin(2*j*k*pi/n))
+!> 
+!> calls fortran-versions of fft's  !!!
+!> dimension a(n),work(n),trigs(n),ifax(1)
+!------------------------------------------------------------------------------!
+  SUBROUTINE fft991cy(a,work,trigs,ifax,inc,jump,n,lot,isign)
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    !  Scalar arguments 
+    INTEGER(iwp) ::  inc   !< 
+    INTEGER(iwp) ::  isign !< 
+    INTEGER(iwp) ::  jump  !< 
+    INTEGER(iwp) ::  lot   !< 
+    INTEGER(iwp) ::  n     !< 
+
+    !  Array arguments 
+    REAL(wp)     ::  a(*)     !< 
+    REAL(wp)     ::  trigs(*) !< 
+    REAL(wp)     ::  work(*)  !< 
+    INTEGER(iwp) ::  ifax(*)  !< 
+
+    !  Local scalars: 
+    INTEGER(iwp) ::  i      !< 
+    INTEGER(iwp) ::  ia     !< 
+    INTEGER(iwp) ::  ibase  !< 
+    INTEGER(iwp) ::  ierr   !< 
+    INTEGER(iwp) ::  ifac   !< 
+    INTEGER(iwp) ::  igo    !< 
+    INTEGER(iwp) ::  ii     !< 
+    INTEGER(iwp) ::  istart !< 
+    INTEGER(iwp) ::  ix     !< 
+    INTEGER(iwp) ::  iz     !< 
+    INTEGER(iwp) ::  j      !< 
+    INTEGER(iwp) ::  jbase  !< 
+    INTEGER(iwp) ::  jj     !< 
+    INTEGER(iwp) ::  k      !< 
+    INTEGER(iwp) ::  la     !< 
+    INTEGER(iwp) ::  nb     !< 
+    INTEGER(iwp) ::  nblox  !< 
+    INTEGER(iwp) ::  nfax   !< 
+    INTEGER(iwp) ::  nvex   !< 
+    INTEGER(iwp) ::  nx     !< 
+
+    !  Intrinsic functions 
+!    INTRINSIC MOD
+
+
+    !  Executable statements 
+
+    IF (ifax(10)/=n) CALL set99(trigs,ifax,n)
+    nfax = ifax(1)
+    nx = n + 1
+    IF (MOD(n,2)==1) nx = n
+    nblox = 1 + (lot-1)/nfft
+    nvex = lot - (nblox-1)*nfft
+    IF (isign==-1) GO TO 50
+
+    ! isign=+1, spectral to gridpoint transform
+
+    istart = 1
+    DO nb = 1, nblox
+       ia = istart
+       i = istart
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO j = 1, nvex
+          a(i+inc) = 0.5_wp*a(i)
+          i = i + jump
+       END DO
+       IF (MOD(n,2)==1) GO TO 10
+       i = istart + n*inc
+       DO j = 1, nvex
+          a(i) = 0.5_wp*a(i)
+          i = i + jump
+       END DO
+10     CONTINUE
+       ia = istart + inc
+       la = 1
+       igo = + 1
+
+       DO k = 1, nfax
+          ifac = ifax(k+1)
+          ierr = -1
+          IF (igo==-1) GO TO 20
+          CALL rpassm(a(ia),a(ia+la*inc),work(1),work(ifac*la+1),trigs,inc,1, &
+               &          jump,nx,nvex,n,ifac,la,ierr)
+          GO TO 30
+20        CONTINUE
+          CALL rpassm(work(1),work(la+1),a(ia),a(ia+ifac*la*inc),trigs,1,inc,nx, &
+               &          jump,nvex,n,ifac,la,ierr)
+30        CONTINUE
+          IF (ierr/=0) GO TO 100
+          la = ifac*la
+          igo = -igo
+          ia = istart
+       END DO
+
+       ! If necessary, copy results back to a
+
+       IF (MOD(nfax,2)==0) GO TO 40
+       ibase = 1
+       jbase = ia
+       DO jj = 1, nvex
+          i = ibase
+          j = jbase
+          DO ii = 1, n
+             a(j) = work(i)
+             i = i + 1
+             j = j + inc
+          END DO
+          ibase = ibase + nx
+          jbase = jbase + jump
+       END DO
+40     CONTINUE
+
+       ! Fill in zeros at end
+
+       ix = istart + n*inc
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO j = 1, nvex
+          a(ix) = 0.0_wp
+          a(ix+inc) = 0.0_wp
+          ix = ix + jump
+       END DO
+
+       istart = istart + nvex*jump
+       nvex = nfft
+    END DO
+    RETURN
+
+    ! isign=-1, gridpoint to spectral transform
+
+50  CONTINUE
+    istart = 1
+    DO nb = 1, nblox
+       ia = istart
+       la = n
+       igo = + 1
+
+       DO k = 1, nfax
+          ifac = ifax(nfax+2-k)
+          la = la/ifac
+          ierr = -1
+          IF (igo==-1) GO TO 60
+          CALL qpassm(a(ia),a(ia+ifac*la*inc),work(1),work(la+1),trigs,inc,1, &
+               &          jump,nx,nvex,n,ifac,la,ierr)
+          GO TO 70
+60        CONTINUE
+          CALL qpassm(work(1),work(ifac*la+1),a(ia),a(ia+la*inc),trigs,1,inc,nx, &
+               &          jump,nvex,n,ifac,la,ierr)
+70        CONTINUE
+          IF (ierr/=0) GO TO 100
+          igo = -igo
+          ia = istart + inc
+       END DO
+
+       ! If necessary, copy results back to a
+
+       IF (MOD(nfax,2)==0) GO TO 80
+       ibase = 1
+       jbase = ia
+       DO jj = 1, nvex
+          i = ibase
+          j = jbase
+          DO ii = 1, n
+             a(j) = work(i)
+             i = i + 1
+             j = j + inc
+          END DO
+          ibase = ibase + nx
+          jbase = jbase + jump
+       END DO
+80     CONTINUE
+
+       ! Shift a(0) & fill in zero imag parts
+
+       ix = istart
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO j = 1, nvex
+          a(ix) = a(ix+inc)
+          a(ix+inc) = 0.0_wp
+          ix = ix + jump
+       END DO
+       IF (MOD(n,2)==1) GO TO 90
+       iz = istart + (n+1)*inc
+       DO j = 1, nvex
+          a(iz) = 0.0_wp
+          iz = iz + jump
+       END DO
+90     CONTINUE
+
+       istart = istart + nvex*jump
+       nvex = nfft
+    END DO
+    RETURN
+
+    ! Error messages
+
+100 CONTINUE
+
+    SELECT CASE (ierr)
+    CASE (:-1)
+       WRITE (nout,'(A,I5,A)') ' Vector length =',nvex,', greater than nfft'
+    CASE (0)
+       WRITE (nout,'(A,I3,A)') ' Factor =',ifac,', not catered for'
+    CASE (1:)
+       WRITE (nout,'(A,I3,A)') ' Factor =',ifac,', only catered for if la*ifac=n'
+    END SELECT
+
+    RETURN
+  END SUBROUTINE fft991cy
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Performs one pass through data as part of 
+!> multiple real fft (fourier analysis) routine.
+!> 
+!> Method:
+!> 
+!> a       is first real input vector
+!>         equivalence b(1) with a(ifac*la*inc1+1)
+!> c       is first real output vector
+!>         equivalence d(1) with c(la*inc2+1)
+!> trigs   is a precalculated list of sines & cosines
+!> inc1    is the addressing increment for a
+!> inc2    is the addressing increment for c
+!> inc3    is the increment between input vectors a
+!> inc4    is the increment between output vectors c
+!> lot     is the number of vectors
+!> n       is the length of the vectors
+!> ifac    is the current factor of n
+!>         la = n/(product of factors used so far)
+!> ierr    is an error indicator:
+!>         0 - pass completed without error
+!>         1 - lot greater than nfft
+!>         2 - ifac not catered for
+!>         3 - ifac only catered for if la=n/ifac
+!------------------------------------------------------------------------------!
+  SUBROUTINE qpassm(a,b,c,d,trigs,inc1,inc2,inc3,inc4,lot,n,ifac,la,ierr)
+
+    USE kinds
+
+    IMPLICIT NONE 
+
+    !  Scalar arguments 
+    INTEGER(iwp) ::  ierr !< 
+    INTEGER(iwp) ::  ifac !< 
+    INTEGER(iwp) ::  inc1 !< 
+    INTEGER(iwp) ::  inc2 !< 
+    INTEGER(iwp) ::  inc3 !< 
+    INTEGER(iwp) ::  inc4 !< 
+    INTEGER(iwp) ::  la   !< 
+    INTEGER(iwp) ::  lot  !< 
+    INTEGER(iwp) ::  n    !< 
+
+    !  Array arguments 
+    ! REAL :: a(n),b(n),c(n),d(n),trigs(n)
+    REAL(wp) ::  a(*)     !< 
+    REAL(wp) ::  b(*)     !< 
+    REAL(wp) ::  c(*)     !< 
+    REAL(wp) ::  d(*)     !< 
+    REAL(wp) ::  trigs(*) !<
+ 
+    !  Local scalars: 
+    REAL(wp) ::  a0     !< 
+    REAL(wp) ::  a1     !< 
+    REAL(wp) ::  a10    !< 
+    REAL(wp) ::  a11    !< 
+    REAL(wp) ::  a2     !< 
+    REAL(wp) ::  a20    !< 
+    REAL(wp) ::  a21    !< 
+    REAL(wp) ::  a3     !< 
+    REAL(wp) ::  a4     !< 
+    REAL(wp) ::  a5     !< 
+    REAL(wp) ::  a6     !< 
+    REAL(wp) ::  b0     !< 
+    REAL(wp) ::  b1     !< 
+    REAL(wp) ::  b10    !< 
+    REAL(wp) ::  b11    !< 
+    REAL(wp) ::  b2     !< 
+    REAL(wp) ::  b20    !< 
+    REAL(wp) ::  b21    !< 
+    REAL(wp) ::  b3     !< 
+    REAL(wp) ::  b4     !< 
+    REAL(wp) ::  b5     !< 
+    REAL(wp) ::  b6     !< 
+    REAL(wp) ::  c1     !< 
+    REAL(wp) ::  c2     !< 
+    REAL(wp) ::  c3     !< 
+    REAL(wp) ::  c4     !< 
+    REAL(wp) ::  c5     !< 
+    REAL(wp) ::  qrt5   !< 
+    REAL(wp) ::  s1     !< 
+    REAL(wp) ::  s2     !< 
+    REAL(wp) ::  s3     !< 
+    REAL(wp) ::  s4     !< 
+    REAL(wp) ::  s5     !< 
+    REAL(wp) ::  sin36  !< 
+    REAL(wp) ::  sin45  !< 
+    REAL(wp) ::  sin60  !< 
+    REAL(wp) ::  sin72  !< 
+    REAL(wp) ::  z      !< 
+    REAL(wp) ::  zqrt5  !< 
+    REAL(wp) ::  zsin36 !< 
+    REAL(wp) ::  zsin45 !< 
+    REAL(wp) ::  zsin60 !< 
+    REAL(wp) ::  zsin72 !< 
+
+    INTEGER(iwp) ::  i     !< 
+    INTEGER(iwp) ::  ia    !< 
+    INTEGER(iwp) ::  ib    !< 
+    INTEGER(iwp) ::  ibad  !< 
+    INTEGER(iwp) ::  ibase !< 
+    INTEGER(iwp) ::  ic    !< 
+    INTEGER(iwp) ::  id    !< 
+    INTEGER(iwp) ::  ie    !< 
+    INTEGER(iwp) ::  if    !< 
+    INTEGER(iwp) ::  ig    !< 
+    INTEGER(iwp) ::  igo   !< 
+    INTEGER(iwp) ::  ih    !< 
+    INTEGER(iwp) ::  iink  !< 
+    INTEGER(iwp) ::  ijk   !< 
+    INTEGER(iwp) ::  ijump !< 
+    INTEGER(iwp) ::  j     !< 
+    INTEGER(iwp) ::  ja    !< 
+    INTEGER(iwp) ::  jb    !< 
+    INTEGER(iwp) ::  jbase !< 
+    INTEGER(iwp) ::  jc    !< 
+    INTEGER(iwp) ::  jd    !< 
+    INTEGER(iwp) ::  je    !< 
+    INTEGER(iwp) ::  jf    !< 
+    INTEGER(iwp) ::  jink  !< 
+    INTEGER(iwp) ::  k     !< 
+    INTEGER(iwp) ::  kb    !< 
+    INTEGER(iwp) ::  kc    !< 
+    INTEGER(iwp) ::  kd    !< 
+    INTEGER(iwp) ::  ke    !< 
+    INTEGER(iwp) ::  kf    !< 
+    INTEGER(iwp) ::  kstop !< 
+    INTEGER(iwp) ::  l     !< 
+    INTEGER(iwp) ::  m     !< 
+
+    !  Intrinsic functions 
+!    INTRINSIC REAL, SQRT
+
+    !  Data statements 
+    DATA sin36/0.587785252292473_wp/, sin72/0.951056516295154_wp/, &
+         &      qrt5/0.559016994374947_wp/, sin60/0.866025403784437_wp/
+
+
+    !  Executable statements 
+
+    m = n/ifac
+    iink = la*inc1
+    jink = la*inc2
+    ijump = (ifac-1)*iink
+    kstop = (n-ifac)/(2*ifac)
+
+    ibad = 1
+    IF (lot>nfft) GO TO 180
+    ibase = 0
+    jbase = 0
+    igo = ifac - 1
+    IF (igo==7) igo = 6
+    ibad = 2
+    IF (igo<1 .OR. igo>6) GO TO 180
+    GO TO (10,40,70,100,130,160) igo
+
+    ! Coding for factor 2
+
+10  CONTINUE
+    ia = 1
+    ib = ia + iink
+    ja = 1
+    jb = ja + (2*m-la)*inc2
+
+    IF (la==m) GO TO 30
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + a(ib+i)
+          c(jb+j) = a(ia+i) - a(ib+i)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ja = ja + jink
+    jink = 2*jink
+    jb = jb - jink
+    ibase = ibase + ijump
+    ijump = 2*ijump + iink
+    IF (ja==jb) GO TO 20
+    DO k = la, kstop, la
+       kb = k + k
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       jbase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             c(ja+j) = a(ia+i) + (c1*a(ib+i)+s1*b(ib+i))
+             c(jb+j) = a(ia+i) - (c1*a(ib+i)+s1*b(ib+i))
+             d(ja+j) = (c1*b(ib+i)-s1*a(ib+i)) + b(ia+i)
+             d(jb+j) = (c1*b(ib+i)-s1*a(ib+i)) - b(ia+i)
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ibase = ibase + ijump
+       ja = ja + jink
+       jb = jb - jink
+    END DO
+    IF (ja>jb) GO TO 170
+20  CONTINUE
+    jbase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i)
+          d(ja+j) = -a(ib+i)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+30  CONTINUE
+    z = 1.0_wp/REAL(n,KIND=wp)
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = z*(a(ia+i)+a(ib+i))
+          c(jb+j) = z*(a(ia+i)-a(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 3
+
+40  CONTINUE
+    ia = 1
+    ib = ia + iink
+    ic = ib + iink
+    ja = 1
+    jb = ja + (2*m-la)*inc2
+    jc = jb
+
+    IF (la==m) GO TO 60
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + (a(ib+i)+a(ic+i))
+          c(jb+j) = a(ia+i) - 0.5_wp*(a(ib+i)+a(ic+i))
+          d(jb+j) = sin60*(a(ic+i)-a(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ja = ja + jink
+    jink = 2*jink
+    jb = jb + jink
+    jc = jc - jink
+    ibase = ibase + ijump
+    ijump = 2*ijump + iink
+    IF (ja==jc) GO TO 50
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       jbase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             a1 = (c1*a(ib+i)+s1*b(ib+i)) + (c2*a(ic+i)+s2*b(ic+i))
+             b1 = (c1*b(ib+i)-s1*a(ib+i)) + (c2*b(ic+i)-s2*a(ic+i))
+             a2 = a(ia+i) - 0.5_wp*a1
+             b2 = b(ia+i) - 0.5_wp*b1
+             a3 = sin60*((c1*a(ib+i)+s1*b(ib+i))-(c2*a(ic+i)+s2*b(ic+i)))
+             b3 = sin60*((c1*b(ib+i)-s1*a(ib+i))-(c2*b(ic+i)-s2*a(ic+i)))
+             c(ja+j) = a(ia+i) + a1
+             d(ja+j) = b(ia+i) + b1
+             c(jb+j) = a2 + b3
+             d(jb+j) = b2 - a3
+             c(jc+j) = a2 - b3
+             d(jc+j) = -(b2+a3)
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ibase = ibase + ijump
+       ja = ja + jink
+       jb = jb + jink
+       jc = jc - jink
+    END DO
+    IF (ja>jc) GO TO 170
+50  CONTINUE
+    jbase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + 0.5_wp*(a(ib+i)-a(ic+i))
+          d(ja+j) = -sin60*(a(ib+i)+a(ic+i))
+          c(jb+j) = a(ia+i) - (a(ib+i)-a(ic+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+60  CONTINUE
+    z = 1.0_wp/REAL(n,KIND=wp)
+    zsin60 = z*sin60
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = z*(a(ia+i)+(a(ib+i)+a(ic+i)))
+          c(jb+j) = z*(a(ia+i)-0.5_wp*(a(ib+i)+a(ic+i)))
+          d(jb+j) = zsin60*(a(ic+i)-a(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 4
+
+70  CONTINUE
+    ia = 1
+    ib = ia + iink
+    ic = ib + iink
+    id = ic + iink
+    ja = 1
+    jb = ja + (2*m-la)*inc2
+    jc = jb + 2*m*inc2
+    jd = jb
+
+    IF (la==m) GO TO 90
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = (a(ia+i)+a(ic+i)) + (a(ib+i)+a(id+i))
+          c(jc+j) = (a(ia+i)+a(ic+i)) - (a(ib+i)+a(id+i))
+          c(jb+j) = a(ia+i) - a(ic+i)
+          d(jb+j) = a(id+i) - a(ib+i)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ja = ja + jink
+    jink = 2*jink
+    jb = jb + jink
+    jc = jc - jink
+    jd = jd - jink
+    ibase = ibase + ijump
+    ijump = 2*ijump + iink
+    IF (jb==jc) GO TO 80
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       kd = kc + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       c3 = trigs(kd+1)
+       s3 = trigs(kd+2)
+       jbase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             a0 = a(ia+i) + (c2*a(ic+i)+s2*b(ic+i))
+             a2 = a(ia+i) - (c2*a(ic+i)+s2*b(ic+i))
+             a1 = (c1*a(ib+i)+s1*b(ib+i)) + (c3*a(id+i)+s3*b(id+i))
+             a3 = (c1*a(ib+i)+s1*b(ib+i)) - (c3*a(id+i)+s3*b(id+i))
+             b0 = b(ia+i) + (c2*b(ic+i)-s2*a(ic+i))
+             b2 = b(ia+i) - (c2*b(ic+i)-s2*a(ic+i))
+             b1 = (c1*b(ib+i)-s1*a(ib+i)) + (c3*b(id+i)-s3*a(id+i))
+             b3 = (c1*b(ib+i)-s1*a(ib+i)) - (c3*b(id+i)-s3*a(id+i))
+             c(ja+j) = a0 + a1
+             c(jc+j) = a0 - a1
+             d(ja+j) = b0 + b1
+             d(jc+j) = b1 - b0
+             c(jb+j) = a2 + b3
+             c(jd+j) = a2 - b3
+             d(jb+j) = b2 - a3
+             d(jd+j) = -(b2+a3)
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ibase = ibase + ijump
+       ja = ja + jink
+       jb = jb + jink
+       jc = jc - jink
+       jd = jd - jink
+    END DO
+    IF (jb>jc) GO TO 170
+80  CONTINUE
+    sin45 = SQRT(0.5_wp)
+    jbase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + sin45*(a(ib+i)-a(id+i))
+          c(jb+j) = a(ia+i) - sin45*(a(ib+i)-a(id+i))
+          d(ja+j) = -a(ic+i) - sin45*(a(ib+i)+a(id+i))
+          d(jb+j) = a(ic+i) - sin45*(a(ib+i)+a(id+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+90  CONTINUE
+    z = 1.0_wp/REAL(n,KIND=wp)
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = z*((a(ia+i)+a(ic+i))+(a(ib+i)+a(id+i)))
+          c(jc+j) = z*((a(ia+i)+a(ic+i))-(a(ib+i)+a(id+i)))
+          c(jb+j) = z*(a(ia+i)-a(ic+i))
+          d(jb+j) = z*(a(id+i)-a(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 5
+
+100 CONTINUE
+    ia = 1
+    ib = ia + iink
+    ic = ib + iink
+    id = ic + iink
+    ie = id + iink
+    ja = 1
+    jb = ja + (2*m-la)*inc2
+    jc = jb + 2*m*inc2
+    jd = jc
+    je = jb
+
+    IF (la==m) GO TO 120
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          a1 = a(ib+i) + a(ie+i)
+          a3 = a(ib+i) - a(ie+i)
+          a2 = a(ic+i) + a(id+i)
+          a4 = a(ic+i) - a(id+i)
+          a5 = a(ia+i) - 0.25_wp*(a1+a2)
+          a6 = qrt5*(a1-a2)
+          c(ja+j) = a(ia+i) + (a1+a2)
+          c(jb+j) = a5 + a6
+          c(jc+j) = a5 - a6
+          d(jb+j) = -sin72*a3 - sin36*a4
+          d(jc+j) = -sin36*a3 + sin72*a4
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ja = ja + jink
+    jink = 2*jink
+    jb = jb + jink
+    jc = jc + jink
+    jd = jd - jink
+    je = je - jink
+    ibase = ibase + ijump
+    ijump = 2*ijump + iink
+    IF (jb==jd) GO TO 110
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       kd = kc + kb
+       ke = kd + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       c3 = trigs(kd+1)
+       s3 = trigs(kd+2)
+       c4 = trigs(ke+1)
+       s4 = trigs(ke+2)
+       jbase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             a1 = (c1*a(ib+i)+s1*b(ib+i)) + (c4*a(ie+i)+s4*b(ie+i))
+             a3 = (c1*a(ib+i)+s1*b(ib+i)) - (c4*a(ie+i)+s4*b(ie+i))
+             a2 = (c2*a(ic+i)+s2*b(ic+i)) + (c3*a(id+i)+s3*b(id+i))
+             a4 = (c2*a(ic+i)+s2*b(ic+i)) - (c3*a(id+i)+s3*b(id+i))
+             b1 = (c1*b(ib+i)-s1*a(ib+i)) + (c4*b(ie+i)-s4*a(ie+i))
+             b3 = (c1*b(ib+i)-s1*a(ib+i)) - (c4*b(ie+i)-s4*a(ie+i))
+             b2 = (c2*b(ic+i)-s2*a(ic+i)) + (c3*b(id+i)-s3*a(id+i))
+             b4 = (c2*b(ic+i)-s2*a(ic+i)) - (c3*b(id+i)-s3*a(id+i))
+             a5 = a(ia+i) - 0.25_wp*(a1+a2)
+             a6 = qrt5*(a1-a2)
+             b5 = b(ia+i) - 0.25_wp*(b1+b2)
+             b6 = qrt5*(b1-b2)
+             a10 = a5 + a6
+             a20 = a5 - a6
+             b10 = b5 + b6
+             b20 = b5 - b6
+             a11 = sin72*b3 + sin36*b4
+             a21 = sin36*b3 - sin72*b4
+             b11 = sin72*a3 + sin36*a4
+             b21 = sin36*a3 - sin72*a4
+             c(ja+j) = a(ia+i) + (a1+a2)
+             c(jb+j) = a10 + a11
+             c(je+j) = a10 - a11
+             c(jc+j) = a20 + a21
+             c(jd+j) = a20 - a21
+             d(ja+j) = b(ia+i) + (b1+b2)
+             d(jb+j) = b10 - b11
+             d(je+j) = -(b10+b11)
+             d(jc+j) = b20 - b21
+             d(jd+j) = -(b20+b21)
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ibase = ibase + ijump
+       ja = ja + jink
+       jb = jb + jink
+       jc = jc + jink
+       jd = jd - jink
+       je = je - jink
+    END DO
+    IF (jb>jd) GO TO 170
+110 CONTINUE
+    jbase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          a1 = a(ib+i) + a(ie+i)
+          a3 = a(ib+i) - a(ie+i)
+          a2 = a(ic+i) + a(id+i)
+          a4 = a(ic+i) - a(id+i)
+          a5 = a(ia+i) + 0.25_wp*(a3-a4)
+          a6 = qrt5*(a3+a4)
+          c(ja+j) = a5 + a6
+          c(jb+j) = a5 - a6
+          c(jc+j) = a(ia+i) - (a3-a4)
+          d(ja+j) = -sin36*a1 - sin72*a2
+          d(jb+j) = -sin72*a1 + sin36*a2
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+120 CONTINUE
+    z = 1.0_wp/REAL(n,KIND=wp)
+    zqrt5 = z*qrt5
+    zsin36 = z*sin36
+    zsin72 = z*sin72
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          a1 = a(ib+i) + a(ie+i)
+          a3 = a(ib+i) - a(ie+i)
+          a2 = a(ic+i) + a(id+i)
+          a4 = a(ic+i) - a(id+i)
+          a5 = z*(a(ia+i)-0.25_wp*(a1+a2))
+          a6 = zqrt5*(a1-a2)
+          c(ja+j) = z*(a(ia+i)+(a1+a2))
+          c(jb+j) = a5 + a6
+          c(jc+j) = a5 - a6
+          d(jb+j) = -zsin72*a3 - zsin36*a4
+          d(jc+j) = -zsin36*a3 + zsin72*a4
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 6
+
+130 CONTINUE
+    ia = 1
+    ib = ia + iink
+    ic = ib + iink
+    id = ic + iink
+    ie = id + iink
+    if = ie + iink
+    ja = 1
+    jb = ja + (2*m-la)*inc2
+    jc = jb + 2*m*inc2
+    jd = jc + 2*m*inc2
+    je = jc
+    jf = jb
+
+    IF (la==m) GO TO 150
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          a11 = (a(ic+i)+a(if+i)) + (a(ib+i)+a(ie+i))
+          c(ja+j) = (a(ia+i)+a(id+i)) + a11
+          c(jc+j) = (a(ia+i)+a(id+i)-0.5_wp*a11)
+          d(jc+j) = sin60*((a(ic+i)+a(if+i))-(a(ib+i)+a(ie+i)))
+          a11 = (a(ic+i)-a(if+i)) + (a(ie+i)-a(ib+i))
+          c(jb+j) = (a(ia+i)-a(id+i)) - 0.5_wp*a11
+          d(jb+j) = sin60*((a(ie+i)-a(ib+i))-(a(ic+i)-a(if+i)))
+          c(jd+j) = (a(ia+i)-a(id+i)) + a11
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ja = ja + jink
+    jink = 2*jink
+    jb = jb + jink
+    jc = jc + jink
+    jd = jd - jink
+    je = je - jink
+    jf = jf - jink
+    ibase = ibase + ijump
+    ijump = 2*ijump + iink
+    IF (jc==jd) GO TO 140
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       kd = kc + kb
+       ke = kd + kb
+       kf = ke + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       c3 = trigs(kd+1)
+       s3 = trigs(kd+2)
+       c4 = trigs(ke+1)
+       s4 = trigs(ke+2)
+       c5 = trigs(kf+1)
+       s5 = trigs(kf+2)
+       jbase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             a1 = c1*a(ib+i) + s1*b(ib+i)
+             b1 = c1*b(ib+i) - s1*a(ib+i)
+             a2 = c2*a(ic+i) + s2*b(ic+i)
+             b2 = c2*b(ic+i) - s2*a(ic+i)
+             a3 = c3*a(id+i) + s3*b(id+i)
+             b3 = c3*b(id+i) - s3*a(id+i)
+             a4 = c4*a(ie+i) + s4*b(ie+i)
+             b4 = c4*b(ie+i) - s4*a(ie+i)
+             a5 = c5*a(if+i) + s5*b(if+i)
+             b5 = c5*b(if+i) - s5*a(if+i)
+             a11 = (a2+a5) + (a1+a4)
+             a20 = (a(ia+i)+a3) - 0.5_wp*a11
+             a21 = sin60*((a2+a5)-(a1+a4))
+             b11 = (b2+b5) + (b1+b4)
+             b20 = (b(ia+i)+b3) - 0.5_wp*b11
+             b21 = sin60*((b2+b5)-(b1+b4))
+             c(ja+j) = (a(ia+i)+a3) + a11
+             d(ja+j) = (b(ia+i)+b3) + b11
+             c(jc+j) = a20 - b21
+             d(jc+j) = a21 + b20
+             c(je+j) = a20 + b21
+             d(je+j) = a21 - b20
+             a11 = (a2-a5) + (a4-a1)
+             a20 = (a(ia+i)-a3) - 0.5_wp*a11
+             a21 = sin60*((a4-a1)-(a2-a5))
+             b11 = (b5-b2) - (b4-b1)
+             b20 = (b3-b(ia+i)) - 0.5_wp*b11
+             b21 = sin60*((b5-b2)+(b4-b1))
+             c(jb+j) = a20 - b21
+             d(jb+j) = a21 - b20
+             c(jd+j) = a11 + (a(ia+i)-a3)
+             d(jd+j) = b11 + (b3-b(ia+i))
+             c(jf+j) = a20 + b21
+             d(jf+j) = a21 + b20
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ibase = ibase + ijump
+       ja = ja + jink
+       jb = jb + jink
+       jc = jc + jink
+       jd = jd - jink
+       je = je - jink
+       jf = jf - jink
+    END DO
+    IF (jc>jd) GO TO 170
+140 CONTINUE
+    jbase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = (a(ia+i)+0.5_wp*(a(ic+i)-a(ie+i))) + sin60*(a(ib+i)-a(if+i))
+          d(ja+j) = -(a(id+i)+0.5_wp*(a(ib+i)+a(if+i))) - sin60*(a(ic+i)+a(ie+i))
+          c(jb+j) = a(ia+i) - (a(ic+i)-a(ie+i))
+          d(jb+j) = a(id+i) - (a(ib+i)+a(if+i))
+          c(jc+j) = (a(ia+i)+0.5_wp*(a(ic+i)-a(ie+i))) - sin60*(a(ib+i)-a(if+i))
+          d(jc+j) = -(a(id+i)+0.5_wp*(a(ib+i)+a(if+i))) + sin60*(a(ic+i)+a(ie+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+150 CONTINUE
+    z = 1.0_wp/REAL(n,KIND=wp)
+    zsin60 = z*sin60
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          a11 = (a(ic+i)+a(if+i)) + (a(ib+i)+a(ie+i))
+          c(ja+j) = z*((a(ia+i)+a(id+i))+a11)
+          c(jc+j) = z*((a(ia+i)+a(id+i))-0.5_wp*a11)
+          d(jc+j) = zsin60*((a(ic+i)+a(if+i))-(a(ib+i)+a(ie+i)))
+          a11 = (a(ic+i)-a(if+i)) + (a(ie+i)-a(ib+i))
+          c(jb+j) = z*((a(ia+i)-a(id+i))-0.5_wp*a11)
+          d(jb+j) = zsin60*((a(ie+i)-a(ib+i))-(a(ic+i)-a(if+i)))
+          c(jd+j) = z*((a(ia+i)-a(id+i))+a11)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 8
+
+160 CONTINUE
+    ibad = 3
+    IF (la/=m) GO TO 180
+    ia = 1
+    ib = ia + iink
+    ic = ib + iink
+    id = ic + iink
+    ie = id + iink
+    if = ie + iink
+    ig = if + iink
+    ih = ig + iink
+    ja = 1
+    jb = ja + la*inc2
+    jc = jb + 2*m*inc2
+    jd = jc + 2*m*inc2
+    je = jd + 2*m*inc2
+    z = 1.0_wp/REAL(n,KIND=wp)
+    zsin45 = z*SQRT(0.5_wp)
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = z*(((a(ia+i)+a(ie+i))+(a(ic+i)+a(ig+i)))+((a(id+i)+ &
+               &          a(ih+i))+(a(ib+i)+a(if+i))))
+          c(je+j) = z*(((a(ia+i)+a(ie+i))+(a(ic+i)+a(ig+i)))-((a(id+i)+ &
+               &          a(ih+i))+(a(ib+i)+a(if+i))))
+          c(jc+j) = z*((a(ia+i)+a(ie+i))-(a(ic+i)+a(ig+i)))
+          d(jc+j) = z*((a(id+i)+a(ih+i))-(a(ib+i)+a(if+i)))
+          c(jb+j) = z*(a(ia+i)-a(ie+i)) + zsin45*((a(ih+i)-a(id+i))-(a(if+ &
+               &          i)-a(ib+i)))
+          c(jd+j) = z*(a(ia+i)-a(ie+i)) - zsin45*((a(ih+i)-a(id+i))-(a(if+ &
+               &          i)-a(ib+i)))
+          d(jb+j) = zsin45*((a(ih+i)-a(id+i))+(a(if+i)-a(ib+i))) + &
+               &          z*(a(ig+i)-a(ic+i))
+          d(jd+j) = zsin45*((a(ih+i)-a(id+i))+(a(if+i)-a(ib+i))) - &
+               &          z*(a(ig+i)-a(ic+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    ! Return
+
+170 CONTINUE
+    ibad = 0
+180 CONTINUE
+    ierr = ibad
+    RETURN
+  END SUBROUTINE qpassm
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+  SUBROUTINE rpassm(a,b,c,d,trigs,inc1,inc2,inc3,inc4,lot,n,ifac,la,ierr)
+    ! Dimension a(n),b(n),c(n),d(n),trigs(n)
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    !  Scalar arguments 
+    INTEGER(iwp) ::  ierr !< 
+    INTEGER(iwp) ::  ifac !< 
+    INTEGER(iwp) ::  inc1 !< 
+    INTEGER(iwp) ::  inc2 !< 
+    INTEGER(iwp) ::  inc3 !< 
+    INTEGER(iwp) ::  inc4 !< 
+    INTEGER(iwp) ::  la   !< 
+    INTEGER(iwp) ::  lot  !< 
+    INTEGER(iwp) ::  n    !< 
+
+    !  Array arguments 
+    REAL(wp) ::  a(*)     !< 
+    REAL(wp) ::  b(*)     !< 
+    REAL(wp) ::  c(*)     !< 
+    REAL(wp) ::  d(*)     !< 
+    REAL(wp) ::  trigs(*) !< 
+
+    !  Local scalars: 
+    REAL(wp) ::  c1     !< 
+    REAL(wp) ::  c2     !< 
+    REAL(wp) ::  c3     !< 
+    REAL(wp) ::  c4     !< 
+    REAL(wp) ::  c5     !< 
+    REAL(wp) ::  qqrt5  !< 
+    REAL(wp) ::  qrt5   !< 
+    REAL(wp) ::  s1     !< 
+    REAL(wp) ::  s2     !< 
+    REAL(wp) ::  s3     !< 
+    REAL(wp) ::  s4     !< 
+    REAL(wp) ::  s5     !< 
+    REAL(wp) ::  sin36  !< 
+    REAL(wp) ::  sin45  !< 
+    REAL(wp) ::  sin60  !< 
+    REAL(wp) ::  sin72  !< 
+    REAL(wp) ::  ssin36 !< 
+    REAL(wp) ::  ssin45 !< 
+    REAL(wp) ::  ssin60 !< 
+    REAL(wp) ::  ssin72 !< 
+
+    INTEGER(iwp) ::  i     !< 
+    INTEGER(iwp) ::  ia    !< 
+    INTEGER(iwp) ::  ib    !< 
+    INTEGER(iwp) ::  ibad  !< 
+    INTEGER(iwp) ::  ibase !< 
+    INTEGER(iwp) ::  ic    !< 
+    INTEGER(iwp) ::  id    !< 
+    INTEGER(iwp) ::  ie    !< 
+    INTEGER(iwp) ::  if    !< 
+    INTEGER(iwp) ::  igo   !< 
+    INTEGER(iwp) ::  iink  !< 
+    INTEGER(iwp) ::  ijk   !< 
+    INTEGER(iwp) ::  j     !< 
+    INTEGER(iwp) ::  ja    !< 
+    INTEGER(iwp) ::  jb    !< 
+    INTEGER(iwp) ::  jbase !< 
+    INTEGER(iwp) ::  jc    !< 
+    INTEGER(iwp) ::  jd    !< 
+    INTEGER(iwp) ::  je    !< 
+    INTEGER(iwp) ::  jf    !< 
+    INTEGER(iwp) ::  jg    !< 
+    INTEGER(iwp) ::  jh    !< 
+    INTEGER(iwp) ::  jink  !< 
+    INTEGER(iwp) ::  jump  !< 
+    INTEGER(iwp) ::  k     !< 
+    INTEGER(iwp) ::  kb    !< 
+    INTEGER(iwp) ::  kc    !< 
+    INTEGER(iwp) ::  kd    !< 
+    INTEGER(iwp) ::  ke    !< 
+    INTEGER(iwp) ::  kf    !< 
+    INTEGER(iwp) ::  kstop !< 
+    INTEGER(iwp) ::  l     !< 
+    INTEGER(iwp) ::  m     !< 
+
+    !  Local arrays: 
+    REAL(wp) ::  a10(nfft) !< 
+    REAL(wp) ::  a11(nfft) !< 
+    REAL(wp) ::  a20(nfft) !< 
+    REAL(wp) ::  a21(nfft) !< 
+    REAL(wp) ::  b10(nfft) !< 
+    REAL(wp) ::  b11(nfft) !< 
+    REAL(wp) ::  b20(nfft) !< 
+    REAL(wp) ::  b21(nfft) !< 
+
+    !  Intrinsic functions 
+!    INTRINSIC SQRT
+
+    !  Data statements 
+    DATA sin36/0.587785252292473_wp/, sin72/0.951056516295154_wp/, &
+         &      qrt5/0.559016994374947_wp/, sin60/0.866025403784437_wp/
+
+
+    !  Executable statements 
+
+    m = n/ifac
+    iink = la*inc1
+    jink = la*inc2
+    jump = (ifac-1)*jink
+    kstop = (n-ifac)/(2*ifac)
+
+    ibad = 1
+    IF (lot>nfft) GO TO 180
+    ibase = 0
+    jbase = 0
+    igo = ifac - 1
+    IF (igo==7) igo = 6
+    ibad = 2
+    IF (igo<1 .OR. igo>6) GO TO 180
+    GO TO (10,40,70,100,130,160) igo
+
+    ! Coding for factor 2
+
+10  CONTINUE
+    ia = 1
+    ib = ia + (2*m-la)*inc1
+    ja = 1
+    jb = ja + jink
+
+    IF (la==m) GO TO 30
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + a(ib+i)
+          c(jb+j) = a(ia+i) - a(ib+i)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ia = ia + iink
+    iink = 2*iink
+    ib = ib - iink
+    ibase = 0
+    jbase = jbase + jump
+    jump = 2*jump + jink
+    IF (ia==ib) GO TO 20
+    DO k = la, kstop, la
+       kb = k + k
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       ibase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             c(ja+j) = a(ia+i) + a(ib+i)
+             d(ja+j) = b(ia+i) - b(ib+i)
+             c(jb+j) = c1*(a(ia+i)-a(ib+i)) - s1*(b(ia+i)+b(ib+i))
+             d(jb+j) = s1*(a(ia+i)-a(ib+i)) + c1*(b(ia+i)+b(ib+i))
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ia = ia + iink
+       ib = ib - iink
+       jbase = jbase + jump
+    END DO
+    IF (ia>ib) GO TO 170
+20  CONTINUE
+    ibase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i)
+          c(jb+j) = -b(ia+i)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+30  CONTINUE
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = 2.0_wp*(a(ia+i)+a(ib+i))
+          c(jb+j) = 2.0_wp*(a(ia+i)-a(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 3
+
+40  CONTINUE
+    ia = 1
+    ib = ia + (2*m-la)*inc1
+    ic = ib
+    ja = 1
+    jb = ja + jink
+    jc = jb + jink
+
+    IF (la==m) GO TO 60
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + a(ib+i)
+          c(jb+j) = (a(ia+i)-0.5_wp*a(ib+i)) - (sin60*(b(ib+i)))
+          c(jc+j) = (a(ia+i)-0.5_wp*a(ib+i)) + (sin60*(b(ib+i)))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ia = ia + iink
+    iink = 2*iink
+    ib = ib + iink
+    ic = ic - iink
+    jbase = jbase + jump
+    jump = 2*jump + jink
+    IF (ia==ic) GO TO 50
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       ibase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             c(ja+j) = a(ia+i) + (a(ib+i)+a(ic+i))
+             d(ja+j) = b(ia+i) + (b(ib+i)-b(ic+i))
+             c(jb+j) = c1*((a(ia+i)-0.5_wp*(a(ib+i)+a(ic+i)))-(sin60*(b(ib+i)+ &
+                  &            b(ic+i))))                                      &
+                  &    - s1*((b(ia+i)-0.5_wp*(b(ib+i)-b(ic+i)))+(sin60*(a(ib+i)- &
+                  &            a(ic+i))))
+             d(jb+j) = s1*((a(ia+i)-0.5_wp*(a(ib+i)+a(ic+i)))-(sin60*(b(ib+i)+ &
+                  &            b(ic+i))))                                      &
+                  &    + c1*((b(ia+i)-0.5_wp*(b(ib+i)-b(ic+i)))+(sin60*(a(ib+i)- &
+                  &            a(ic+i))))
+             c(jc+j) = c2*((a(ia+i)-0.5_wp*(a(ib+i)+a(ic+i)))+(sin60*(b(ib+i)+ &
+                  &            b(ic+i))))                                      &
+                  &    - s2*((b(ia+i)-0.5_wp*(b(ib+i)-b(ic+i)))-(sin60*(a(ib+i)- &
+                  &            a(ic+i))))
+             d(jc+j) = s2*((a(ia+i)-0.5_wp*(a(ib+i)+a(ic+i)))+(sin60*(b(ib+i)+ &
+                  &            b(ic+i))))                                      &
+                  &    + c2*((b(ia+i)-0.5_wp*(b(ib+i)-b(ic+i)))-(sin60*(a(ib+i)- &
+                  &            a(ic+i))))
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ia = ia + iink
+       ib = ib + iink
+       ic = ic - iink
+       jbase = jbase + jump
+    END DO
+    IF (ia>ic) GO TO 170
+50  CONTINUE
+    ibase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + a(ib+i)
+          c(jb+j) = (0.5_wp*a(ia+i)-a(ib+i)) - (sin60*b(ia+i))
+          c(jc+j) = -(0.5_wp*a(ia+i)-a(ib+i)) - (sin60*b(ia+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+60  CONTINUE
+    ssin60 = 2.0_wp*sin60
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = 2.0_wp*(a(ia+i)+a(ib+i))
+          c(jb+j) = (2.0_wp*a(ia+i)-a(ib+i)) - (ssin60*b(ib+i))
+          c(jc+j) = (2.0_wp*a(ia+i)-a(ib+i)) + (ssin60*b(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 4
+
+70  CONTINUE
+    ia = 1
+    ib = ia + (2*m-la)*inc1
+    ic = ib + 2*m*inc1
+    id = ib
+    ja = 1
+    jb = ja + jink
+    jc = jb + jink
+    jd = jc + jink
+
+    IF (la==m) GO TO 90
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = (a(ia+i)+a(ic+i)) + a(ib+i)
+          c(jb+j) = (a(ia+i)-a(ic+i)) - b(ib+i)
+          c(jc+j) = (a(ia+i)+a(ic+i)) - a(ib+i)
+          c(jd+j) = (a(ia+i)-a(ic+i)) + b(ib+i)
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ia = ia + iink
+    iink = 2*iink
+    ib = ib + iink
+    ic = ic - iink
+    id = id - iink
+    jbase = jbase + jump
+    jump = 2*jump + jink
+    IF (ib==ic) GO TO 80
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       kd = kc + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       c3 = trigs(kd+1)
+       s3 = trigs(kd+2)
+       ibase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+             c(ja+j) = (a(ia+i)+a(ic+i)) + (a(ib+i)+a(id+i))
+             d(ja+j) = (b(ia+i)-b(ic+i)) + (b(ib+i)-b(id+i))
+             c(jc+j) = c2*((a(ia+i)+a(ic+i))-(a(ib+i)+a(id+i))) - s2*((b(ia+ &
+                  &            i)-b(ic+i))-(b(ib+i)-b(id+i)))
+             d(jc+j) = s2*((a(ia+i)+a(ic+i))-(a(ib+i)+a(id+i))) + c2*((b(ia+ &
+                  &            i)-b(ic+i))-(b(ib+i)-b(id+i)))
+             c(jb+j) = c1*((a(ia+i)-a(ic+i))-(b(ib+i)+b(id+i))) - s1*((b(ia+ &
+                  &            i)+b(ic+i))+(a(ib+i)-a(id+i)))
+             d(jb+j) = s1*((a(ia+i)-a(ic+i))-(b(ib+i)+b(id+i))) + c1*((b(ia+ &
+                  &            i)+b(ic+i))+(a(ib+i)-a(id+i)))
+             c(jd+j) = c3*((a(ia+i)-a(ic+i))+(b(ib+i)+b(id+i))) - s3*((b(ia+ &
+                  &            i)+b(ic+i))-(a(ib+i)-a(id+i)))
+             d(jd+j) = s3*((a(ia+i)-a(ic+i))+(b(ib+i)+b(id+i))) + c3*((b(ia+ &
+                  &            i)+b(ic+i))-(a(ib+i)-a(id+i)))
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ia = ia + iink
+       ib = ib + iink
+       ic = ic - iink
+       id = id - iink
+       jbase = jbase + jump
+    END DO
+    IF (ib>ic) GO TO 170
+80  CONTINUE
+    ibase = 0
+    sin45 = SQRT(0.5_wp)
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + a(ib+i)
+          c(jb+j) = sin45*((a(ia+i)-a(ib+i))-(b(ia+i)+b(ib+i)))
+          c(jc+j) = b(ib+i) - b(ia+i)
+          c(jd+j) = -sin45*((a(ia+i)-a(ib+i))+(b(ia+i)+b(ib+i)))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+90  CONTINUE
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = 2.0_wp*((a(ia+i)+a(ic+i))+a(ib+i))
+          c(jb+j) = 2.0_wp*((a(ia+i)-a(ic+i))-b(ib+i))
+          c(jc+j) = 2.0_wp*((a(ia+i)+a(ic+i))-a(ib+i))
+          c(jd+j) = 2.0_wp*((a(ia+i)-a(ic+i))+b(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    ! Coding for factor 5
+
+    GO TO 170
+100 CONTINUE
+    ia = 1
+    ib = ia + (2*m-la)*inc1
+    ic = ib + 2*m*inc1
+    id = ic
+    ie = ib
+    ja = 1
+    jb = ja + jink
+    jc = jb + jink
+    jd = jc + jink
+    je = jd + jink
+
+    IF (la==m) GO TO 120
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ia+i) + (a(ib+i)+a(ic+i))
+          c(jb+j) = ((a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))+qrt5*(a(ib+i)-a(ic+i))) - &
+               &          (sin72*b(ib+i)+sin36*b(ic+i))
+          c(jc+j) = ((a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))-qrt5*(a(ib+i)-a(ic+i))) - &
+               &          (sin36*b(ib+i)-sin72*b(ic+i))
+          c(jd+j) = ((a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))-qrt5*(a(ib+i)-a(ic+i))) + &
+               &          (sin36*b(ib+i)-sin72*b(ic+i))
+          c(je+j) = ((a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))+qrt5*(a(ib+i)-a(ic+i))) + &
+               &          (sin72*b(ib+i)+sin36*b(ic+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ia = ia + iink
+    iink = 2*iink
+    ib = ib + iink
+    ic = ic + iink
+    id = id - iink
+    ie = ie - iink
+    jbase = jbase + jump
+    jump = 2*jump + jink
+    IF (ib==id) GO TO 110
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       kd = kc + kb
+       ke = kd + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       c3 = trigs(kd+1)
+       s3 = trigs(kd+2)
+       c4 = trigs(ke+1)
+       s4 = trigs(ke+2)
+       ibase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+
+             a10(ijk) = (a(ia+i)-0.25_wp*((a(ib+i)+a(ie+i))+(a(ic+i)+a(id+i)))) + &
+                  &            qrt5*((a(ib+i)+a(ie+i))-(a(ic+i)+a(id+i)))
+             a20(ijk) = (a(ia+i)-0.25_wp*((a(ib+i)+a(ie+i))+(a(ic+i)+a(id+i)))) - &
+                  &            qrt5*((a(ib+i)+a(ie+i))-(a(ic+i)+a(id+i)))
+             b10(ijk) = (b(ia+i)-0.25_wp*((b(ib+i)-b(ie+i))+(b(ic+i)-b(id+i)))) + &
+                  &            qrt5*((b(ib+i)-b(ie+i))-(b(ic+i)-b(id+i)))
+             b20(ijk) = (b(ia+i)-0.25_wp*((b(ib+i)-b(ie+i))+(b(ic+i)-b(id+i)))) - &
+                  &            qrt5*((b(ib+i)-b(ie+i))-(b(ic+i)-b(id+i)))
+             a11(ijk) = sin72*(b(ib+i)+b(ie+i)) + sin36*(b(ic+i)+b(id+i))
+             a21(ijk) = sin36*(b(ib+i)+b(ie+i)) - sin72*(b(ic+i)+b(id+i))
+             b11(ijk) = sin72*(a(ib+i)-a(ie+i)) + sin36*(a(ic+i)-a(id+i))
+             b21(ijk) = sin36*(a(ib+i)-a(ie+i)) - sin72*(a(ic+i)-a(id+i))
+
+             c(ja+j) = a(ia+i) + ((a(ib+i)+a(ie+i))+(a(ic+i)+a(id+i)))
+             d(ja+j) = b(ia+i) + ((b(ib+i)-b(ie+i))+(b(ic+i)-b(id+i)))
+             c(jb+j) = c1*(a10(ijk)-a11(ijk)) - s1*(b10(ijk)+b11(ijk))
+             d(jb+j) = s1*(a10(ijk)-a11(ijk)) + c1*(b10(ijk)+b11(ijk))
+             c(je+j) = c4*(a10(ijk)+a11(ijk)) - s4*(b10(ijk)-b11(ijk))
+             d(je+j) = s4*(a10(ijk)+a11(ijk)) + c4*(b10(ijk)-b11(ijk))
+             c(jc+j) = c2*(a20(ijk)-a21(ijk)) - s2*(b20(ijk)+b21(ijk))
+             d(jc+j) = s2*(a20(ijk)-a21(ijk)) + c2*(b20(ijk)+b21(ijk))
+             c(jd+j) = c3*(a20(ijk)+a21(ijk)) - s3*(b20(ijk)-b21(ijk))
+             d(jd+j) = s3*(a20(ijk)+a21(ijk)) + c3*(b20(ijk)-b21(ijk))
+
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ia = ia + iink
+       ib = ib + iink
+       ic = ic + iink
+       id = id - iink
+       ie = ie - iink
+       jbase = jbase + jump
+    END DO
+    IF (ib>id) GO TO 170
+110 CONTINUE
+    ibase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = (a(ia+i)+a(ib+i)) + a(ic+i)
+          c(jb+j) = (qrt5*(a(ia+i)-a(ib+i))+(0.25_wp*(a(ia+i)+a(ib+i))-a(ic+i))) - &
+               &          (sin36*b(ia+i)+sin72*b(ib+i))
+          c(je+j) = -(qrt5*(a(ia+i)-a(ib+i))+(0.25_wp*(a(ia+i)+a(ib+i))-a(ic+i))) - &
+               &          (sin36*b(ia+i)+sin72*b(ib+i))
+          c(jc+j) = (qrt5*(a(ia+i)-a(ib+i))-(0.25_wp*(a(ia+i)+a(ib+i))-a(ic+i))) - &
+               &          (sin72*b(ia+i)-sin36*b(ib+i))
+          c(jd+j) = -(qrt5*(a(ia+i)-a(ib+i))-(0.25_wp*(a(ia+i)+a(ib+i))-a(ic+i))) - &
+               &          (sin72*b(ia+i)-sin36*b(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+120 CONTINUE
+    qqrt5 = 2.0_wp*qrt5
+    ssin36 = 2.0_wp*sin36
+    ssin72 = 2.0_wp*sin72
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = 2.0_wp*(a(ia+i)+(a(ib+i)+a(ic+i)))
+          c(jb+j) = (2.0_wp*(a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))+qqrt5*(a(ib+i)-a(ic+ &
+               &          i))) - (ssin72*b(ib+i)+ssin36*b(ic+i))
+          c(jc+j) = (2.0_wp*(a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))-qqrt5*(a(ib+i)-a(ic+ &
+               &          i))) - (ssin36*b(ib+i)-ssin72*b(ic+i))
+          c(jd+j) = (2.0_wp*(a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))-qqrt5*(a(ib+i)-a(ic+ &
+               &          i))) + (ssin36*b(ib+i)-ssin72*b(ic+i))
+          c(je+j) = (2.0_wp*(a(ia+i)-0.25_wp*(a(ib+i)+a(ic+i)))+qqrt5*(a(ib+i)-a(ic+ &
+               &          i))) + (ssin72*b(ib+i)+ssin36*b(ic+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 6
+
+130 CONTINUE
+    ia = 1
+    ib = ia + (2*m-la)*inc1
+    ic = ib + 2*m*inc1
+    id = ic + 2*m*inc1
+    ie = ic
+    if = ib
+    ja = 1
+    jb = ja + jink
+    jc = jb + jink
+    jd = jc + jink
+    je = jd + jink
+    jf = je + jink
+
+    IF (la==m) GO TO 150
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = (a(ia+i)+a(id+i)) + (a(ib+i)+a(ic+i))
+          c(jd+j) = (a(ia+i)-a(id+i)) - (a(ib+i)-a(ic+i))
+          c(jb+j) = ((a(ia+i)-a(id+i))+0.5_wp*(a(ib+i)-a(ic+i))) - (sin60*(b(ib+ &
+               &          i)+b(ic+i)))
+          c(jf+j) = ((a(ia+i)-a(id+i))+0.5_wp*(a(ib+i)-a(ic+i))) + (sin60*(b(ib+ &
+               &          i)+b(ic+i)))
+          c(jc+j) = ((a(ia+i)+a(id+i))-0.5_wp*(a(ib+i)+a(ic+i))) - (sin60*(b(ib+ &
+               &          i)-b(ic+i)))
+          c(je+j) = ((a(ia+i)+a(id+i))-0.5_wp*(a(ib+i)+a(ic+i))) + (sin60*(b(ib+ &
+               &          i)-b(ic+i)))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    ia = ia + iink
+    iink = 2*iink
+    ib = ib + iink
+    ic = ic + iink
+    id = id - iink
+    ie = ie - iink
+    if = if - iink
+    jbase = jbase + jump
+    jump = 2*jump + jink
+    IF (ic==id) GO TO 140
+    DO k = la, kstop, la
+       kb = k + k
+       kc = kb + kb
+       kd = kc + kb
+       ke = kd + kb
+       kf = ke + kb
+       c1 = trigs(kb+1)
+       s1 = trigs(kb+2)
+       c2 = trigs(kc+1)
+       s2 = trigs(kc+2)
+       c3 = trigs(kd+1)
+       s3 = trigs(kd+2)
+       c4 = trigs(ke+1)
+       s4 = trigs(ke+2)
+       c5 = trigs(kf+1)
+       s5 = trigs(kf+2)
+       ibase = 0
+       DO l = 1, la
+          i = ibase
+          j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+          DO ijk = 1, lot
+
+             a11(ijk) = (a(ie+i)+a(ib+i)) + (a(ic+i)+a(if+i))
+             a20(ijk) = (a(ia+i)+a(id+i)) - 0.5_wp*a11(ijk)
+             a21(ijk) = sin60*((a(ie+i)+a(ib+i))-(a(ic+i)+a(if+i)))
+             b11(ijk) = (b(ib+i)-b(ie+i)) + (b(ic+i)-b(if+i))
+             b20(ijk) = (b(ia+i)-b(id+i)) - 0.5_wp*b11(ijk)
+             b21(ijk) = sin60*((b(ib+i)-b(ie+i))-(b(ic+i)-b(if+i)))
+
+             c(ja+j) = (a(ia+i)+a(id+i)) + a11(ijk)
+             d(ja+j) = (b(ia+i)-b(id+i)) + b11(ijk)
+             c(jc+j) = c2*(a20(ijk)-b21(ijk)) - s2*(b20(ijk)+a21(ijk))
+             d(jc+j) = s2*(a20(ijk)-b21(ijk)) + c2*(b20(ijk)+a21(ijk))
+             c(je+j) = c4*(a20(ijk)+b21(ijk)) - s4*(b20(ijk)-a21(ijk))
+             d(je+j) = s4*(a20(ijk)+b21(ijk)) + c4*(b20(ijk)-a21(ijk))
+
+             a11(ijk) = (a(ie+i)-a(ib+i)) + (a(ic+i)-a(if+i))
+             b11(ijk) = (b(ie+i)+b(ib+i)) - (b(ic+i)+b(if+i))
+             a20(ijk) = (a(ia+i)-a(id+i)) - 0.5_wp*a11(ijk)
+             a21(ijk) = sin60*((a(ie+i)-a(ib+i))-(a(ic+i)-a(if+i)))
+             b20(ijk) = (b(ia+i)+b(id+i)) + 0.5_wp*b11(ijk)
+             b21(ijk) = sin60*((b(ie+i)+b(ib+i))+(b(ic+i)+b(if+i)))
+
+             c(jd+j) = c3*((a(ia+i)-a(id+i))+a11(ijk)) - s3*((b(ia+i)+b(id+ &
+                  &            i))-b11(ijk))
+             d(jd+j) = s3*((a(ia+i)-a(id+i))+a11(ijk)) + c3*((b(ia+i)+b(id+ &
+                  &            i))-b11(ijk))
+             c(jb+j) = c1*(a20(ijk)-b21(ijk)) - s1*(b20(ijk)-a21(ijk))
+             d(jb+j) = s1*(a20(ijk)-b21(ijk)) + c1*(b20(ijk)-a21(ijk))
+             c(jf+j) = c5*(a20(ijk)+b21(ijk)) - s5*(b20(ijk)+a21(ijk))
+             d(jf+j) = s5*(a20(ijk)+b21(ijk)) + c5*(b20(ijk)+a21(ijk))
+
+             i = i + inc3
+             j = j + inc4
+          END DO
+          ibase = ibase + inc1
+          jbase = jbase + inc2
+       END DO
+       ia = ia + iink
+       ib = ib + iink
+       ic = ic + iink
+       id = id - iink
+       ie = ie - iink
+       if = if - iink
+       jbase = jbase + jump
+    END DO
+    IF (ic>id) GO TO 170
+140 CONTINUE
+    ibase = 0
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = a(ib+i) + (a(ia+i)+a(ic+i))
+          c(jd+j) = b(ib+i) - (b(ia+i)+b(ic+i))
+          c(jb+j) = (sin60*(a(ia+i)-a(ic+i))) - (0.5_wp*(b(ia+i)+b(ic+i))+b(ib+i))
+          c(jf+j) = -(sin60*(a(ia+i)-a(ic+i))) - (0.5_wp*(b(ia+i)+b(ic+i))+b(ib+i))
+          c(jc+j) = sin60*(b(ic+i)-b(ia+i)) + (0.5_wp*(a(ia+i)+a(ic+i))-a(ib+i))
+          c(je+j) = sin60*(b(ic+i)-b(ia+i)) - (0.5_wp*(a(ia+i)+a(ic+i))-a(ib+i))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    GO TO 170
+150 CONTINUE
+    ssin60 = 2.0_wp*sin60
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = (2.0_wp*(a(ia+i)+a(id+i))) + (2.0_wp*(a(ib+i)+a(ic+i)))
+          c(jd+j) = (2.0_wp*(a(ia+i)-a(id+i))) - (2.0_wp*(a(ib+i)-a(ic+i)))
+          c(jb+j) = (2.0_wp*(a(ia+i)-a(id+i))+(a(ib+i)-a(ic+i))) - (ssin60*(b(ib+ &
+               &          i)+b(ic+i)))
+          c(jf+j) = (2.0_wp*(a(ia+i)-a(id+i))+(a(ib+i)-a(ic+i))) + (ssin60*(b(ib+ &
+               &          i)+b(ic+i)))
+          c(jc+j) = (2.0_wp*(a(ia+i)+a(id+i))-(a(ib+i)+a(ic+i))) - (ssin60*(b(ib+ &
+               &          i)-b(ic+i)))
+          c(je+j) = (2.0_wp*(a(ia+i)+a(id+i))-(a(ib+i)+a(ic+i))) + (ssin60*(b(ib+ &
+               &          i)-b(ic+i)))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+    GO TO 170
+
+    ! Coding for factor 8
+
+160 CONTINUE
+    ibad = 3
+    IF (la/=m) GO TO 180
+    ia = 1
+    ib = ia + la*inc1
+    ic = ib + 2*la*inc1
+    id = ic + 2*la*inc1
+    ie = id + 2*la*inc1
+    ja = 1
+    jb = ja + jink
+    jc = jb + jink
+    jd = jc + jink
+    je = jd + jink
+    jf = je + jink
+    jg = jf + jink
+    jh = jg + jink
+    ssin45 = SQRT(2.0_wp)
+
+    DO l = 1, la
+       i = ibase
+       j = jbase
+!DIR$ IVDEP
+!CDIR NODEP
+!OCL NOVREC
+       DO ijk = 1, lot
+          c(ja+j) = 2.0_wp*(((a(ia+i)+a(ie+i))+a(ic+i))+(a(ib+i)+a(id+i)))
+          c(je+j) = 2.0_wp*(((a(ia+i)+a(ie+i))+a(ic+i))-(a(ib+i)+a(id+i)))
+          c(jc+j) = 2.0_wp*(((a(ia+i)+a(ie+i))-a(ic+i))-(b(ib+i)-b(id+i)))
+          c(jg+j) = 2.0_wp*(((a(ia+i)+a(ie+i))-a(ic+i))+(b(ib+i)-b(id+i)))
+          c(jb+j) = 2.0_wp*((a(ia+i)-a(ie+i))-b(ic+i)) + ssin45*((a(ib+i)-a(id+ &
+               &              i))-(b(ib+i)+b(id+i)))
+          c(jf+j) = 2.0_wp*((a(ia+i)-a(ie+i))-b(ic+i)) - ssin45*((a(ib+i)-a(id+ &
+               &              i))-(b(ib+i)+b(id+i)))
+          c(jd+j) = 2.0_wp*((a(ia+i)-a(ie+i))+b(ic+i)) - ssin45*((a(ib+i)-a(id+ &
+               &              i))+(b(ib+i)+b(id+i)))
+          c(jh+j) = 2.0_wp*((a(ia+i)-a(ie+i))+b(ic+i)) + ssin45*((a(ib+i)-a(id+ &
+               &              i))+(b(ib+i)+b(id+i)))
+          i = i + inc3
+          j = j + inc4
+       END DO
+       ibase = ibase + inc1
+       jbase = jbase + inc2
+    END DO
+
+    ! Return
+
+170 CONTINUE
+    ibad = 0
+180 CONTINUE
+    ierr = ibad
+    RETURN
+  END SUBROUTINE rpassm
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computes factors of n & trigonometric functins required by fft99 & fft991cy
+!> Method: Dimension trigs(n),ifax(1),jfax(10),lfax(7)
+!> subroutine 'set99' - computes factors of n & trigonometric
+!> functins required by fft99 & fft991cy
+!------------------------------------------------------------------------------!
+  SUBROUTINE set99(trigs,ifax,n)
+
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    !  Scalar arguments 
+    INTEGER(iwp) ::  n !< 
+
+    !  Array arguments 
+    INTEGER(iwp) ::  ifax(*)  !< 
+    REAL(wp)     ::  trigs(*) !< 
+
+
+    !  Local scalars: 
+    REAL(wp) ::  angle    !< 
+    REAL(wp) ::  del      !< 
+    INTEGER(iwp) ::  i    !< 
+    INTEGER(iwp) ::  ifac !< 
+    INTEGER(iwp) ::  ixxx !< 
+    INTEGER(iwp) ::  k    !< 
+    INTEGER(iwp) ::  l    !< 
+    INTEGER(iwp) ::  nfax !< 
+    INTEGER(iwp) ::  nhl  !< 
+    INTEGER(iwp) ::  nil  !< 
+    INTEGER(iwp) ::  nu   !< 
+
+    !  Local arrays: 
+    INTEGER(iwp) ::  jfax(10) !< 
+    INTEGER(iwp) ::  lfax(7)  !< 
+
+    !  Intrinsic functions 
+!    INTRINSIC ASIN, COS, MOD, REAL, SIN
+
+    !  Data statements 
+    DATA lfax/6, 8, 5, 4, 3, 2, 1/
+
+
+    !  Executable statements 
+    ixxx = 1
+
+    del = 4.0_wp*ASIN(1.0_wp)/REAL(n,KIND=wp)
+    nil = 0
+    nhl = (n/2) - 1
+    DO k = nil, nhl
+       angle = REAL(k,KIND=wp)*del
+       trigs(2*k+1) = COS(angle)
+       trigs(2*k+2) = SIN(angle)
+    END DO
+
+    ! Find factors of n (8,6,5,4,3,2; only one 8 allowed)
+    ! Look for sixes first, store factors in descending order
+    nu = n
+    ifac = 6
+    k = 0
+    l = 1
+10  CONTINUE
+    IF (MOD(nu,ifac)/=0) GO TO 30
+    k = k + 1
+    jfax(k) = ifac
+    IF (ifac/=8) GO TO 20
+    IF (k==1) GO TO 20
+    jfax(1) = 8
+    jfax(k) = 6
+20  CONTINUE
+    nu = nu/ifac
+    IF (nu==1) GO TO 40
+    IF (ifac/=8) GO TO 10
+30  CONTINUE
+    l = l + 1
+    ifac = lfax(l)
+    IF (ifac>1) GO TO 10
+
+!    WRITE (nout,'(A,I4,A)') ' n =',n,' - Contains illegal factors'
+    message_string = 'number of gridpoints along x or/and y ' //               &
+                     'contain illegal  factors' //                             &
+                     '&only factors 2, 3, 5 are allowed' 
+    CALL message( 'temperton_fft', 'PA0311', 1, 2, 0, 6, 0 )
+
+    RETURN
+
+    ! Now reverse order of factors
+40  CONTINUE
+    nfax = k
+    ifax(1) = nfax
+    DO i = 1, nfax
+       ifax(nfax+2-i) = jfax(i)
+    END DO
+    ifax(10) = n
+    RETURN
+  END SUBROUTINE set99
+
+ END MODULE temperton_fft
Index: /palm/tags/release-6.0/SOURCE/time_integration.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/time_integration.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/time_integration.f90	(revision 3477)
@@ -0,0 +1,1654 @@
+!> @file time_integration.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! new module for virtual measurements introduced
+! 
+! 3472 2018-10-30 20:43:50Z suehring
+! Add indoor model (kanani, srissman, tlang)
+! 
+! 3467 2018-10-30 19:05:21Z suehring
+! Implementation of a new aerosol module salsa.
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Add biometeorology
+! 
+! 3421 2018-10-24 18:39:32Z gronemeier
+! Surface data output
+! 
+! 3418 2018-10-24 16:07:39Z kanani
+! call to material_heat_model now with check if spinup runs (rvtils)
+! 
+! 3378 2018-10-19 12:34:59Z kanani
+! merge from radiation branch (r3362) into trunk
+! (moh.hefny):
+! Bugfix in the if statement to call radiation_interaction
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! - offline nesting separated from large-scale forcing module
+! - changes for synthetic turbulence generator
+! 
+! 3343 2018-10-15 10:38:52Z suehring
+! - Formatting, clean-up, comments (kanani)
+! - Added CALL to chem_emissions_setup (Russo)
+! - Code added for decycling chemistry (basit)
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3198 2018-08-15 09:23:10Z sward
+! Added multi_agent_system_end; defined start time for MAS relative to
+! time_since_reference_point
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Replace simulated_time by time_since_reference_point in COSMO nesting mode. 
+! Rename subroutines and variables in COSMO nesting mode
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Added multi agent system
+! 
+! 3042 2018-05-25 10:44:37Z schwenkel
+! Changed the name specific humidity to mixing ratio
+! 
+! 3040 2018-05-25 10:22:08Z schwenkel
+! Fixed bug in IF statement
+! Ensure that the time when calling the radiation to be the time step of the
+! pre-calculated time when first calculate the positions of the sun
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! First call of flow_statistics has been removed. It is already called in 
+! run_control itself
+! 
+! 2984 2018-04-18 11:51:30Z hellstea
+! CALL pmci_ensure_nest_mass_conservation is removed (so far only commented out)
+! as seemingly unnecessary.
+! 
+! 2941 2018-04-03 11:54:58Z kanani
+! Deduct spinup_time from RUN_CONTROL output of main 3d run 
+! (use time_since_reference_point instead of simulated_time)
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! Nesting of dissipation rate in case of RANS mode and TKE-e closure is applied
+! 
+! 2936 2018-03-27 14:49:27Z suehring
+! Little formatting adjustment.
+! 
+! 2817 2018-02-19 16:32:21Z knoop
+! Preliminary gust module interface implemented
+! 
+! 2801 2018-02-14 16:01:55Z thiele
+! Changed lpm from subroutine to module.
+! Introduce particle transfer in nested models.
+! 
+! 2776 2018-01-31 10:44:42Z Giersch
+! Variable use_synthetic_turbulence_generator has been abbreviated
+! 
+! 2773 2018-01-30 14:12:54Z suehring
+! - Nesting for chemical species
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed preprocessor directive __chem
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Implementation of uv exposure model (FK)
+! - Moved vnest_boundary_conds_khkm from tcm_diffusivities to here (TG)
+! - renamed diffusivities to tcm_diffusivities (TG)
+! - implement prognostic equation for diss (TG)
+! - Moved/commented CALL to chem_emissions (FK)
+! - Added CALL to chem_emissions (FK)
+! - Implementation of chemistry module (FK)
+! - Calls for setting boundary conditions in USM and LSM (MS)
+! - Large-scale forcing with larger-scale models implemented (MS)
+! - Rename usm_radiation into radiation_interactions; merge with branch 
+!   radiation (MS)
+! - added call for usm_green_heat_model for green building surfaces (RvT)
+! - added call for usm_temperature_near_surface for use in indoor model (RvT)
+! 
+! 2617 2017-11-16 12:47:24Z suehring
+! Bugfix, assure that the reference state does not become zero.
+! 
+! 2563 2017-10-19 15:36:10Z Giersch
+! Variable wind_turbine moved to module control_parameters
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical grid nesting implemented (SadiqHuq)
+! 
+! 2320 2017-07-21 12:47:43Z suehring
+! Set bottom boundary conditions after nesting interpolation and anterpolation
+! 
+! 2299 2017-06-29 10:14:38Z maronga
+! Call of soil model adjusted
+! 
+! 2292 2017-06-20 09:51:42Z schwenkel
+! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 
+! includes two more prognostic equations for cloud drop concentration (nc)  
+! and cloud water content (qc). 
+! 
+! 2271 2017-06-09 12:34:55Z sward
+! Start timestep message changed
+! 
+! 2259 2017-06-08 09:09:11Z gronemeier
+! Implemented synthetic turbulence generator
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography and surface concept
+! Modify passed parameters for disturb_field
+! 
+! 2178 2017-03-17 11:07:39Z hellstea
+! Setting perturbations at all times near inflow boundary is removed
+! in case of nested boundaries
+!
+! 2174 2017-03-13 08:18:57Z maronga
+! Added support for nesting with cloud microphysics
+! 
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related code removed
+! 
+! 2050 2016-11-08 15:00:55Z gronemeier
+! Implement turbulent outflow condition
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters,
+! removed commented CALLs of global_min_max.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Added CALLs for new urban surface model
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1976 2016-07-27 13:28:04Z maronga
+! Simplified calls to radiation model
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! flight module added
+! 
+! 1919 2016-05-27 14:51:23Z raasch
+! Initial version of purely vertical nesting introduced. 
+!
+! 1918 2016-05-27 14:35:57Z raasch
+! determination of time step moved to the end of the time step loop,
+! the first time step is now always calculated before the time step loop (i.e.
+! also in case of restart runs)
+!
+! 1914 2016-05-26 14:44:07Z witha
+! Added call for wind turbine model
+!
+! 1878 2016-04-19 12:30:36Z hellstea
+! Synchronization for nested runs rewritten
+! 
+! 1853 2016-04-11 09:00:35Z maronga
+! Adjusted for use with radiation_scheme = constant
+!
+! 1849 2016-04-08 11:33:18Z hoffmann
+! Adapted for modularization of microphysics
+!
+! 1833 2016-04-07 14:23:03Z raasch
+! spectrum renamed spectra_mod, spectra related variables moved to spectra_mod
+!
+! 1831 2016-04-07 13:15:51Z hoffmann
+! turbulence renamed collision_turbulence
+!
+! 1822 2016-04-07 07:49:42Z hoffmann
+! icloud_scheme replaced by microphysics_*
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! output message in case unscheduled radiation calls removed
+!
+! 1797 2016-03-21 16:50:28Z raasch
+! introduction of different datatransfer modes
+!
+! 1791 2016-03-11 10:41:25Z raasch
+! call of pmci_update_new removed
+!
+! 1786 2016-03-08 05:49:27Z raasch
+! +module spectrum
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! switch back of netcdf data format for mask output moved to the mask output
+! routine
+!
+! 1781 2016-03-03 15:12:23Z raasch
+! some pmc calls removed at the beginning (before timeloop),
+! pmc initialization moved to the main program
+!
+! 1764 2016-02-28 12:45:19Z raasch
+! PMC_ACTIVE flags removed,
+! bugfix: nest synchronization after first call of timestep
+!
+! 1762 2016-02-25 12:31:13Z hellstea
+! Introduction of nested domain feature
+!
+! 1736 2015-12-04 08:56:33Z raasch
+! no perturbations added to total domain if energy limit has been set zero
+!
+! 1691 2015-10-26 16:17:44Z maronga
+! Added option for spin-ups without land surface and radiation models. Moved calls
+! for radiation and lan surface schemes.
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1671 2015-09-25 03:29:37Z raasch
+! bugfix: ghostpoint exchange for array diss in case that sgs velocities are used
+! for particles
+!
+! 1585 2015-04-30 07:05:52Z maronga
+! Moved call of radiation scheme. Added support for RRTM
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Added interface for different radiation schemes.
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Added calls for the land surface model and radiation scheme
+! 
+! 1402 2014-05-09 14:25:13Z raasch
+! location messages modified
+! 
+! 1384 2014-05-02 14:31:06Z raasch
+! location messages added
+! 
+! 1380 2014-04-28 12:40:45Z heinze
+! CALL of nudge_ref added 
+! bc_pt_t_val and bc_q_t_val are updated in case nudging is used
+! 
+! 1365 2014-04-22 15:03:56Z boeske
+! Reset sums_ls_l to zero at each timestep
+! +sums_ls_l
+! Calculation of reference state (previously in subroutine calc_mean_profile)
+
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1308 2014-03-13 14:58:42Z fricke
+! +netcdf_data_format_save
+! For masked data, parallel netcdf output is not tested so far, hence 
+! netcdf_data_format is switched back to non-paralell output.
+!
+! 1276 2014-01-15 13:40:41Z heinze
+! Use LSF_DATA also in case of Dirichlet bottom boundary condition for scalars
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! acc-update-host directive for timestep removed
+!
+! 1241 2013-10-30 11:36:58Z heinze
+! Generalize calc_mean_profile for wider use
+! Determine shf and qsws in dependence on data from LSF_DATA
+! Determine ug and vg in dependence on data from LSF_DATA
+! 1221 2013-09-10 08:59:13Z raasch
+! host update of arrays before timestep is called
+!
+! 1179 2013-06-14 05:57:58Z raasch
+! mean profiles for reference state are only calculated if required,
+! small bugfix for background communication
+!
+! 1171 2013-05-30 11:27:45Z raasch
+! split of prognostic_equations deactivated (comment lines), for the time being
+!
+! 1128 2013-04-12 06:19:32Z raasch
+! asynchronous transfer of ghost point data realized for acc-optimized version:
+! prognostic_equations are first called two times for those points required for
+! the left-right and north-south exchange, respectively, and then for the
+! remaining points,
+! those parts requiring global communication moved from prognostic_equations to
+! here
+!
+! 1115 2013-03-26 18:16:16Z hoffmann
+! calculation of qr and nr is restricted to precipitation
+!
+! 1113 2013-03-10 02:48:14Z raasch
+! GPU-porting of boundary conditions,
+! openACC directives updated
+! formal parameter removed from routine boundary_conds
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! +internal timestep counter for cpu statistics added,
+! openACC directives updated
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1065 2012-11-22 17:42:36Z hoffmann
+! exchange of diss (dissipation rate) in case of turbulence = .TRUE. added
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! exchange of ghost points for nr, qr added
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1019 2012-09-28 06:46:45Z raasch
+! non-optimized version of prognostic_equations removed
+!
+! 1015 2012-09-27 09:23:24Z raasch
+! +call of prognostic_equations_acc
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog- and upstream-spline-scheme removed
+!
+! 849 2012-03-15 10:35:09Z raasch
+! advec_particles renamed lpm, first_call_advec_particles renamed first_call_lpm
+!
+! 825 2012-02-19 03:03:44Z raasch
+! wang_collision_kernel renamed wang_kernel
+!
+! Revision 1.1  1997/08/11 06:19:04  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Integration in time of the model equations, statistical analysis and graphic
+!> output
+!------------------------------------------------------------------------------!
+ SUBROUTINE time_integration
+ 
+
+    USE advec_ws,                                                              &
+        ONLY:  ws_statistics
+
+    USE arrays_3d,                                                             &
+        ONLY:  diss, diss_p, dzu, e, e_p, nc, nc_p, nr, nr_p, prho, pt, pt_p, pt_init, &
+               q_init, q, qc, qc_p, ql, ql_c, ql_v, ql_vp, qr, qr_p, q_p,      &
+               ref_state, rho_ocean, s, s_p, sa_p, tend, u, u_p, v, vpt,       &
+               v_p, w, w_p
+
+    USE biometeorology_mod,                                                    &
+        ONLY:  biom_calculate_static_grid, time_biom_results
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, calc_liquid_water_content,                     &
+              collision_turbulence, microphysics_morrison, microphysics_seifert
+
+    USE calc_mean_profile_mod,                                                 &
+        ONLY:  calc_mean_profile
+
+    USE chem_emissions_mod,                                                    &
+        ONLY:  chem_emissions_setup
+
+    USE chem_modules,                                                          &
+        ONLY:  bc_cs_t_val, call_chem_at_all_substeps, cs_name,                &
+               constant_csflux, do_emis, nspec, nspec_out
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  chem_boundary_conds, chem_species
+
+    USE control_parameters,                                                    &
+        ONLY:  advected_distance_x, advected_distance_y, air_chemistry,        &
+               average_count_3d, averaging_interval, averaging_interval_pr,    &
+               bc_lr_cyc, bc_ns_cyc, bc_pt_t_val, bc_q_t_val, biometeorology,  &
+               call_psolver_at_all_substeps,  child_domain, cloud_droplets,    &
+               constant_flux_layer, constant_heatflux,                         &
+               create_disturbances, dopr_n, constant_diffusion, coupling_mode, &
+               coupling_start_time, current_timestep_number,                   &
+               disturbance_created, disturbance_energy_limit, dist_range,      &
+               do_sum, dt_3d, dt_averaging_input, dt_averaging_input_pr,       &
+               dt_coupling, dt_data_output_av, dt_disturb, dt_do2d_xy,         &
+               dt_do2d_xz, dt_do2d_yz, dt_do3d, dt_domask,dt_dopts, dt_dopr,   &
+               dt_dopr_listing, dt_dots, dt_dvrp, dt_run_control, end_time,    &
+               first_call_lpm, first_call_mas, galilei_transformation,         &
+               humidity, indoor_model, intermediate_timestep_count,            &
+               intermediate_timestep_count_max,                                &
+               land_surface, large_scale_forcing,                              &
+               loop_optimization, lsf_surf, lsf_vert, masks, mid,              &
+               multi_agent_system_end, multi_agent_system_start,               &
+               nesting_offline, neutral, nr_timesteps_this_run, nudging,       &
+               ocean_mode, passive_scalar, pt_reference,                       &
+               pt_slope_offset, random_heatflux, rans_mode,                    &
+               rans_tke_e, run_coupled, simulated_time, simulated_time_chr,    &
+               skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz,        &
+               skip_time_do3d, skip_time_domask, skip_time_dopr,               &
+               skip_time_data_output_av, sloping_surface, stop_dt,             &
+               surface_data_output, terminate_coupled, terminate_run,          &
+               timestep_scheme,                                                &
+               time_coupling, time_do2d_xy, time_do2d_xz, time_do2d_yz,        &
+               time_do3d, time_domask, time_dopr, time_dopr_av,                &
+               time_dopr_listing, time_dopts, time_dosp, time_dosp_av,         &
+               time_dots, time_do_av, time_do_sla, time_disturb, time_dvrp,    &
+               time_run_control, time_since_reference_point,                   &
+               turbulent_inflow, turbulent_outflow, urban_surface,             &
+               use_initial_profile_as_reference,                               &
+               use_single_reference_value, uv_exposure, u_gtrans, v_gtrans,    &
+               virtual_flight, virtual_measurement, wind_turbine,              &
+               ws_scheme_mom, ws_scheme_sca
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  calc_date_and_time, hour_call_emis, hour_of_year
+
+    USE flight_mod,                                                            &
+        ONLY:  flight_measurement
+
+    USE gust_mod,                                                              &
+        ONLY:  gust_actions, gust_module_enabled
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, nzb, nzt
+
+    USE indoor_model_mod,                                                      &
+        ONLY:  dt_indoor, im_main_heatcool, skip_time_do_indoor, time_indoor
+
+    USE interaction_droplets_ptq_mod,                                          &
+        ONLY:  interaction_droplets_ptq
+
+    USE interfaces
+
+    USE kinds
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_boundary_condition, lsm_energy_balance, lsm_soil_model,     &
+               skip_time_do_lsm
+
+    USE lsf_nudging_mod,                                                       &
+        ONLY:  calc_tnudge, ls_forcing_surf, ls_forcing_vert, nudge_ref
+
+    USE multi_agent_system_mod,                                                &
+        ONLY:  agents_active, multi_agent_system
+
+    USE nesting_offl_mod,                                                      &
+        ONLY:  nesting_offl_bc, nesting_offl_mass_conservation
+        
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  chem_emis, chem_emis_att, nest_offl,                            &
+               netcdf_data_input_offline_nesting
+
+    USE ocean_mod,                                                             &
+        ONLY:  prho_reference
+
+    USE particle_attributes,                                                   &
+        ONLY:  particle_advection, particle_advection_start,                   &
+               use_sgs_for_particles, wang_kernel
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run, nesting_mode, pmci_boundary_conds, pmci_datatrans,  &
+               pmci_ensure_nest_mass_conservation, pmci_synchronize
+
+    USE progress_bar,                                                          &
+        ONLY:  finish_progress_bar, output_progress_bar
+
+    USE prognostic_equations_mod,                                              &
+        ONLY:  prognostic_equations_cache, prognostic_equations_vector
+
+    USE radiation_model_mod,                                                   &
+        ONLY: dt_radiation, force_radiation_call, radiation, radiation_control,&
+              radiation_interaction, radiation_interactions,                   &
+              skip_time_do_radiation, time_radiation
+
+    USE spectra_mod,                                                           &
+        ONLY: average_count_sp, averaging_interval_sp, calc_spectra, dt_dosp,  &
+              skip_time_dosp
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, hom, pr_palm, sums_ls_l
+
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  surface_layer_fluxes
+
+    USE surface_mod,                                                           &
+        ONLY:  surf_def_h, surf_lsm_h, surf_usm_h
+
+    USE surface_output_mod,                                                    &
+        ONLY:  average_count_surf, averaging_interval_surf, dt_dosurf,         &
+               dt_dosurf_av, surface_output, surface_output_averaging,         &
+               skip_time_dosurf, skip_time_dosurf_av, time_dosurf,             &
+               time_dosurf_av
+
+    USE turbulence_closure_mod,                                                &
+        ONLY:  tcm_diffusivities, production_e_init
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_boundary_condition, usm_material_heat_model,                &
+               usm_material_model,                                             &
+               usm_surface_energy_balance, usm_green_heat_model,               &
+               usm_temperature_near_surface
+
+    USE synthetic_turbulence_generator_mod,                                    &
+        ONLY:  dt_stg_call, dt_stg_adjust, parametrize_inflow_turbulence,      &
+               stg_adjust, stg_main, time_stg_adjust, time_stg_call,           &
+               use_syn_turb_gen
+         
+    USE salsa_mod,                                                             &
+        ONLY: aerosol_number, aerosol_mass, nbins, ncc_tot, ngast, salsa,      &
+              salsa_boundary_conds, salsa_gas, salsa_gases_from_chem,          &
+              skip_time_do_salsa           
+
+    USE user_actions_mod,                                                      &
+        ONLY:  user_actions
+
+    USE uv_exposure_model_mod,                                                 &
+        ONLY:  uvem_calc_exposure
+
+    USE wind_turbine_model_mod,                                                &
+        ONLY:  wtm_forces
+
+    USE lpm_mod,                                                               &
+        ONLY:  lpm
+
+    USE vertical_nesting_mod,                                                  &
+        ONLY:  vnested, vnest_anterpolate, vnest_anterpolate_e,                &
+               vnest_boundary_conds, vnest_boundary_conds_khkm,                & 
+               vnest_deallocate, vnest_init, vnest_init_fine,                  &
+               vnest_start_time
+               
+    USE virtual_measurement_mod,                                               &
+        ONLY:  vm_sampling, vm_time_start
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=9) ::  time_to_string   !<
+    
+    INTEGER(iwp)      ::  b !< index for aerosol size bins    
+    INTEGER(iwp)      ::  c !< index for chemical compounds in aerosol size bins
+    INTEGER(iwp)      ::  g !< index for gaseous compounds 
+    INTEGER(iwp)      ::  lsp
+    INTEGER(iwp)      ::  lsp_usr   !<
+    INTEGER(iwp)      ::  n         !< loop counter for chemistry species
+
+    REAL(wp) ::  dt_3d_old  !< temporary storage of timestep to be used for
+                            !< steering of run control output interval
+    REAL(wp) ::  time_since_reference_point_save  !< original value of
+                                                  !< time_since_reference_point
+
+!
+!-- At beginning determine the first time step
+    CALL timestep
+!
+!-- Synchronize the timestep in case of nested run.
+    IF ( nested_run )  THEN
+!
+!--    Synchronization by unifying the time step.
+!--    Global minimum of all time-steps is used for all.
+       CALL pmci_synchronize
+    ENDIF
+
+!
+!-- Determine and print out the run control quantities before the first time
+!-- step of this run. For the initial run, some statistics (e.g. divergence)
+!-- need to be determined first --> CALL flow_statistics at the beginning of
+!-- run_control
+    CALL run_control
+!
+!-- Data exchange between coupled models in case that a call has been omitted 
+!-- at the end of the previous run of a job chain.
+    IF ( coupling_mode /= 'uncoupled'  .AND.  run_coupled .AND. .NOT. vnested)  THEN
+!
+!--    In case of model termination initiated by the local model the coupler 
+!--    must not be called because this would again cause an MPI hang. 
+       DO WHILE ( time_coupling >= dt_coupling  .AND.  terminate_coupled == 0 )
+          CALL surface_coupler
+          time_coupling = time_coupling - dt_coupling
+       ENDDO
+       IF (time_coupling == 0.0_wp  .AND.                                      &
+           time_since_reference_point < dt_coupling )                          &
+       THEN
+          time_coupling = time_since_reference_point
+       ENDIF
+    ENDIF
+
+#if defined( __dvrp_graphics )
+!
+!-- Time measurement with dvrp software  
+    CALL DVRP_LOG_EVENT( 2, current_timestep_number )
+#endif
+
+    CALL location_message( 'starting timestep-sequence', .TRUE. )
+!
+!-- Start of the time loop
+    DO  WHILE ( simulated_time < end_time  .AND.  .NOT. stop_dt  .AND. &
+                .NOT. terminate_run )
+
+       CALL cpu_log( log_point_s(10), 'timesteps', 'start' )
+!
+!--    Vertical nesting: initialize fine grid
+       IF ( vnested ) THEN
+          IF ( .NOT. vnest_init  .AND.  simulated_time >= vnest_start_time )  THEN
+             CALL cpu_log( log_point(80), 'vnest_init', 'start' )
+             CALL vnest_init_fine
+             vnest_init = .TRUE.
+             CALL cpu_log( log_point(80), 'vnest_init', 'stop' )
+          ENDIF
+       ENDIF
+!
+!--    Determine ug, vg and w_subs in dependence on data from external file 
+!--    LSF_DATA
+       IF ( large_scale_forcing .AND. lsf_vert )  THEN
+           CALL ls_forcing_vert ( simulated_time )
+           sums_ls_l = 0.0_wp
+       ENDIF
+
+!
+!--    Set pt_init and q_init to the current profiles taken from 
+!--    NUDGING_DATA 
+       IF ( nudging )  THEN
+           CALL nudge_ref ( simulated_time )
+!
+!--        Store temperature gradient at the top boundary for possible Neumann
+!--        boundary condition
+           bc_pt_t_val = ( pt_init(nzt+1) - pt_init(nzt) ) / dzu(nzt+1)
+           bc_q_t_val  = ( q_init(nzt+1) - q_init(nzt) ) / dzu(nzt+1)
+           IF ( air_chemistry )  THEN
+              DO  lsp = 1, nspec
+                 bc_cs_t_val = (  chem_species(lsp)%conc_pr_init(nzt+1)       &
+                                - chem_species(lsp)%conc_pr_init(nzt) )       &
+                               / dzu(nzt+1)
+              ENDDO
+           ENDIF
+       ENDIF
+!
+!--    If forcing by larger-scale models is applied, check if new data
+!--    at domain boundaries need to be read.
+       IF ( nesting_offline )  THEN
+          IF ( nest_offl%time(nest_offl%tind_p) <= time_since_reference_point )&
+             CALL netcdf_data_input_offline_nesting
+       ENDIF
+
+!
+!--    Execute the gust module actions
+       IF ( gust_module_enabled )  THEN
+          CALL gust_actions( 'before_timestep' )
+       ENDIF
+
+!
+!--    Execute the user-defined actions
+       CALL user_actions( 'before_timestep' )
+
+!
+!--    Calculate forces by wind turbines
+       IF ( wind_turbine )  THEN
+
+          CALL cpu_log( log_point(55), 'wind_turbine', 'start' )
+
+          CALL wtm_forces
+
+          CALL cpu_log( log_point(55), 'wind_turbine', 'stop' )
+
+       ENDIF   
+       
+!
+!--    Start of intermediate step loop
+       intermediate_timestep_count = 0
+       DO  WHILE ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )
+
+          intermediate_timestep_count = intermediate_timestep_count + 1
+
+!
+!--       Set the steering factors for the prognostic equations which depend
+!--       on the timestep scheme
+          CALL timestep_scheme_steering
+
+!
+!--       Calculate those variables needed in the tendency terms which need
+!--       global communication
+          IF ( .NOT. use_single_reference_value  .AND. &
+               .NOT. use_initial_profile_as_reference )  THEN
+!
+!--          Horizontally averaged profiles to be used as reference state in
+!--          buoyancy terms (WARNING: only the respective last call of
+!--          calc_mean_profile defines the reference state!)
+             IF ( .NOT. neutral )  THEN
+                CALL calc_mean_profile( pt, 4 )
+                ref_state(:)  = hom(:,1,4,0) ! this is used in the buoyancy term
+             ENDIF
+             IF ( ocean_mode )  THEN
+                CALL calc_mean_profile( rho_ocean, 64 )
+                ref_state(:)  = hom(:,1,64,0)
+             ENDIF
+             IF ( humidity )  THEN
+                CALL calc_mean_profile( vpt, 44 )
+                ref_state(:)  = hom(:,1,44,0)
+             ENDIF
+!
+!--          Assure that ref_state does not become zero at any level
+!--          ( might be the case if a vertical level is completely occupied 
+!--            with topography ).
+             ref_state = MERGE( MAXVAL(ref_state), ref_state,                  &
+                                ref_state == 0.0_wp )
+          ENDIF
+
+          IF ( .NOT. constant_diffusion )  CALL production_e_init
+          IF ( ( ws_scheme_mom .OR. ws_scheme_sca )  .AND.  &
+               intermediate_timestep_count == 1 )  CALL ws_statistics
+!
+!--       In case of nudging calculate current nudging time scale and horizontal
+!--       means of u, v, pt and q
+          IF ( nudging )  THEN
+             CALL calc_tnudge( simulated_time )
+             CALL calc_mean_profile( u, 1 )
+             CALL calc_mean_profile( v, 2 )
+             CALL calc_mean_profile( pt, 4 )
+             CALL calc_mean_profile( q, 41 )
+          ENDIF
+
+!
+!--       Solve the prognostic equations. A fast cache optimized version with
+!--       only one single loop is used in case of Piascek-Williams advection
+!--       scheme. NEC vector machines use a different version, because
+!--       in the other versions a good vectorization is prohibited due to
+!--       inlining problems.
+          IF ( loop_optimization == 'cache' )  THEN
+             CALL prognostic_equations_cache
+          ELSEIF ( loop_optimization == 'vector' )  THEN
+             CALL prognostic_equations_vector
+          ENDIF
+
+!
+!--       Particle transport/physics with the Lagrangian particle model
+!--       (only once during intermediate steps, because it uses an Euler-step)
+!--       ### particle model should be moved before prognostic_equations, in order
+!--       to regard droplet interactions directly
+          IF ( particle_advection  .AND.                         &
+               simulated_time >= particle_advection_start  .AND. &
+               intermediate_timestep_count == 1 )  THEN
+             CALL lpm
+             first_call_lpm = .FALSE.
+          ENDIF
+
+!
+!--       Interaction of droplets with temperature and mixing ratio.
+!--       Droplet condensation and evaporation is calculated within
+!--       advec_particles.
+          IF ( cloud_droplets  .AND.  &
+               intermediate_timestep_count == intermediate_timestep_count_max )&
+          THEN
+             CALL interaction_droplets_ptq
+          ENDIF
+
+!
+!--       Movement of agents in multi agent system
+          IF ( agents_active  .AND.                                            &
+               time_since_reference_point >= multi_agent_system_start  .AND.   &
+               time_since_reference_point <= multi_agent_system_end    .AND.   &
+               intermediate_timestep_count == 1 )  THEN
+             CALL multi_agent_system
+             first_call_mas = .FALSE.
+          ENDIF
+
+!
+!--       Exchange of ghost points (lateral boundary conditions)
+          CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'start' )
+
+          CALL exchange_horiz( u_p, nbgp )
+          CALL exchange_horiz( v_p, nbgp )
+          CALL exchange_horiz( w_p, nbgp )
+          CALL exchange_horiz( pt_p, nbgp )
+          IF ( .NOT. constant_diffusion )  CALL exchange_horiz( e_p, nbgp )
+          IF ( rans_tke_e  .OR.  wang_kernel  .OR.  collision_turbulence       &
+               .OR.  use_sgs_for_particles )  THEN
+             IF ( rans_tke_e )  THEN
+                CALL exchange_horiz( diss_p, nbgp )
+             ELSE
+                CALL exchange_horiz( diss, nbgp )
+             ENDIF
+          ENDIF
+          IF ( ocean_mode )  THEN
+             CALL exchange_horiz( sa_p, nbgp )
+             CALL exchange_horiz( rho_ocean, nbgp )
+             CALL exchange_horiz( prho, nbgp )
+          ENDIF
+          IF ( humidity )  THEN
+             CALL exchange_horiz( q_p, nbgp )
+             IF ( bulk_cloud_model .AND. microphysics_morrison )  THEN
+                CALL exchange_horiz( qc_p, nbgp )
+                CALL exchange_horiz( nc_p, nbgp )
+             ENDIF
+             IF ( bulk_cloud_model .AND. microphysics_seifert )  THEN
+                CALL exchange_horiz( qr_p, nbgp )
+                CALL exchange_horiz( nr_p, nbgp )
+             ENDIF
+          ENDIF
+          IF ( cloud_droplets )  THEN
+             CALL exchange_horiz( ql, nbgp )
+             CALL exchange_horiz( ql_c, nbgp )
+             CALL exchange_horiz( ql_v, nbgp )
+             CALL exchange_horiz( ql_vp, nbgp )
+          ENDIF
+          IF ( passive_scalar )  CALL exchange_horiz( s_p, nbgp )
+          IF ( air_chemistry )  THEN
+             DO  lsp = 1, nspec
+                CALL exchange_horiz( chem_species(lsp)%conc_p, nbgp )
+!
+!--             kanani: Push chem_boundary_conds after CALL boundary_conds
+                lsp_usr = 1
+                DO WHILE ( TRIM( cs_name( lsp_usr ) ) /= 'novalue' )
+                   IF ( TRIM(chem_species(lsp)%name) == TRIM(cs_name(lsp_usr)) )  THEN
+                      CALL chem_boundary_conds( chem_species(lsp)%conc_p,              &
+                                                chem_species(lsp)%conc_pr_init )
+                   ENDIF
+                   lsp_usr = lsp_usr + 1
+                ENDDO
+             ENDDO
+          ENDIF
+
+          IF ( salsa  .AND.  time_since_reference_point >= skip_time_do_salsa )&
+          THEN
+             CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'start' )
+             DO  b = 1, nbins
+                CALL exchange_horiz( aerosol_number(b)%conc_p, nbgp )
+                CALL cpu_log( log_point_s(93), 'salsa decycle', 'start' )
+                CALL salsa_boundary_conds( aerosol_number(b)%conc_p,           &
+                                           aerosol_number(b)%init )
+                CALL cpu_log( log_point_s(93), 'salsa decycle', 'stop' )
+                DO  c = 1, ncc_tot
+                   CALL exchange_horiz( aerosol_mass((c-1)*nbins+b)%conc_p,    &
+                                        nbgp )
+                   CALL cpu_log( log_point_s(93), 'salsa decycle', 'start' )
+                   CALL salsa_boundary_conds( aerosol_mass((c-1)*nbins+b)%conc_p,&
+                                              aerosol_mass((c-1)*nbins+b)%init )
+                   CALL cpu_log( log_point_s(93), 'salsa decycle', 'stop' )
+                ENDDO
+             ENDDO
+             IF ( .NOT. salsa_gases_from_chem )  THEN
+                DO  g = 1, ngast
+                   CALL exchange_horiz( salsa_gas(g)%conc_p, nbgp ) 
+                   CALL cpu_log( log_point_s(93), 'salsa decycle', 'start' )
+                   CALL salsa_boundary_conds( salsa_gas(g)%conc_p,             &
+                                              salsa_gas(g)%init )
+                   CALL cpu_log( log_point_s(93), 'salsa decycle', 'stop' )
+             ENDDO
+             ENDIF
+             CALL cpu_log( log_point_s(91), 'salsa exch-horiz ', 'stop' )
+          ENDIF         
+
+          CALL cpu_log( log_point(26), 'exchange-horiz-progn', 'stop' )
+
+!
+!--       Boundary conditions for the prognostic quantities (except of the
+!--       velocities at the outflow in case of a non-cyclic lateral wall)
+          CALL boundary_conds
+!
+!--       Swap the time levels in preparation for the next time step.
+          CALL swap_timelevel
+
+!
+!--       Vertical nesting: Interpolate fine grid data to the coarse grid
+          IF ( vnest_init ) THEN
+             CALL cpu_log( log_point(81), 'vnest_anterpolate', 'start' )
+             CALL vnest_anterpolate
+             CALL cpu_log( log_point(81), 'vnest_anterpolate', 'stop' )
+          ENDIF
+
+          IF ( nested_run )  THEN
+
+             CALL cpu_log( log_point(60), 'nesting', 'start' )
+!
+!--          Domain nesting. The data transfer subroutines pmci_parent_datatrans
+!--          and pmci_child_datatrans are called inside the wrapper
+!--          subroutine pmci_datatrans according to the control parameters
+!--          nesting_mode and nesting_datatransfer_mode.
+!--          TO_DO: why is nesting_mode given as a parameter here?
+             CALL pmci_datatrans( nesting_mode )
+
+             IF ( TRIM( nesting_mode ) == 'two-way' .OR.                       &
+                  nesting_mode == 'vertical' )  THEN
+!
+!--             Exchange_horiz is needed for all parent-domains after the
+!--             anterpolation
+                CALL exchange_horiz( u, nbgp )
+                CALL exchange_horiz( v, nbgp )
+                CALL exchange_horiz( w, nbgp )
+                IF ( .NOT. neutral )  CALL exchange_horiz( pt, nbgp )
+
+                IF ( humidity )  THEN
+
+                   CALL exchange_horiz( q, nbgp )
+
+                   IF ( bulk_cloud_model  .AND.  microphysics_morrison )  THEN
+                       CALL exchange_horiz( qc, nbgp )
+                       CALL exchange_horiz( nc, nbgp )
+                   ENDIF
+                   IF ( bulk_cloud_model  .AND.  microphysics_seifert )  THEN
+                       CALL exchange_horiz( qr, nbgp )
+                       CALL exchange_horiz( nr, nbgp )
+                   ENDIF
+
+                ENDIF
+
+                IF ( passive_scalar )  CALL exchange_horiz( s, nbgp )  
+               
+                IF ( .NOT. constant_diffusion )  CALL exchange_horiz( e, nbgp )
+
+                IF ( .NOT. constant_diffusion  .AND.  rans_mode  .AND.         &
+                                                      rans_tke_e )             &
+                   CALL exchange_horiz( diss, nbgp )
+
+                IF ( air_chemistry )  THEN
+                   DO  n = 1, nspec     
+                      CALL exchange_horiz( chem_species(n)%conc, nbgp ) 
+                   ENDDO
+                ENDIF
+
+             ENDIF
+!
+!--          Set boundary conditions again after interpolation and anterpolation.
+             CALL pmci_boundary_conds
+!
+!--          Correct the w top-BC in nest domains to ensure mass conservation.
+!--          This action must never be done for the root domain. Vertical 
+!--          Commented out April 18, 2018 as seemingly unnecessary. 
+!--          Will later be completely removed.
+!--             IF ( child_domain )  THEN
+!--                CALL pmci_ensure_nest_mass_conservation
+!--             ENDIF
+
+
+             CALL cpu_log( log_point(60), 'nesting', 'stop' )
+
+          ENDIF
+
+!
+!--       Temperature offset must be imposed at cyclic boundaries in x-direction
+!--       when a sloping surface is used
+          IF ( sloping_surface )  THEN
+             IF ( nxl ==  0 )  pt(:,:,nxlg:nxl-1) = pt(:,:,nxlg:nxl-1) - &
+                                                    pt_slope_offset
+             IF ( nxr == nx )  pt(:,:,nxr+1:nxrg) = pt(:,:,nxr+1:nxrg) + &
+                                                    pt_slope_offset
+          ENDIF
+
+!
+!--       Impose a turbulent inflow using the recycling method
+          IF ( turbulent_inflow )  CALL  inflow_turbulence
+
+!
+!--       Set values at outflow boundary using the special outflow condition
+          IF ( turbulent_outflow )  CALL  outflow_turbulence
+
+!
+!--       Impose a random perturbation on the horizontal velocity field
+          IF ( create_disturbances  .AND.                                      &
+               ( call_psolver_at_all_substeps  .AND.                           &
+               intermediate_timestep_count == intermediate_timestep_count_max )&
+          .OR. ( .NOT. call_psolver_at_all_substeps  .AND.                     &
+               intermediate_timestep_count == 1 ) )                            &
+          THEN
+             time_disturb = time_disturb + dt_3d
+             IF ( time_disturb >= dt_disturb )  THEN
+                IF ( disturbance_energy_limit /= 0.0_wp  .AND.                 &
+                     hom(nzb+5,1,pr_palm,0) < disturbance_energy_limit )  THEN
+                   CALL disturb_field( 'u', tend, u )
+                   CALL disturb_field( 'v', tend, v )
+                ELSEIF ( ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )            &
+                     .AND. .NOT. child_domain  .AND.  .NOT.  nesting_offline )  &
+                THEN
+!
+!--                Runs with a non-cyclic lateral wall need perturbations
+!--                near the inflow throughout the whole simulation
+                   dist_range = 1
+                   CALL disturb_field( 'u', tend, u )
+                   CALL disturb_field( 'v', tend, v )
+                   dist_range = 0
+                ENDIF
+                time_disturb = time_disturb - dt_disturb
+             ENDIF
+          ENDIF
+
+!
+!--       Map forcing data derived from larger scale model onto domain 
+!--       boundaries. 
+          IF ( nesting_offline  .AND.  intermediate_timestep_count ==          &
+                                       intermediate_timestep_count_max  )      &
+             CALL nesting_offl_bc
+!
+!--       Impose a turbulent inflow using synthetic generated turbulence, 
+!--       only once per time step.
+          IF ( use_syn_turb_gen  .AND.  time_stg_call >= dt_stg_call  .AND.    &
+             intermediate_timestep_count == intermediate_timestep_count_max )  THEN! &
+             CALL stg_main
+          ENDIF
+!
+!--       Ensure mass conservation. This need to be done after imposing
+!--       synthetic turbulence and top boundary condition for pressure is set to
+!--       Neumann conditions. 
+!--       Is this also required in case of Dirichlet?
+          IF ( nesting_offline )  CALL nesting_offl_mass_conservation
+!
+!--       Reduce the velocity divergence via the equation for perturbation
+!--       pressure.
+          IF ( intermediate_timestep_count == 1  .OR. &
+                call_psolver_at_all_substeps )  THEN
+
+             IF (  vnest_init ) THEN
+!
+!--             Compute pressure in the CG, interpolate top boundary conditions
+!--             to the FG and then compute pressure in the FG
+                IF ( coupling_mode == 'vnested_crse' )  CALL pres
+
+                CALL cpu_log( log_point(82), 'vnest_bc', 'start' )
+                CALL vnest_boundary_conds
+                CALL cpu_log( log_point(82), 'vnest_bc', 'stop' )
+ 
+                IF ( coupling_mode == 'vnested_fine' )  CALL pres
+
+!--             Anterpolate TKE, satisfy Germano Identity
+                CALL cpu_log( log_point(83), 'vnest_anter_e', 'start' )
+                CALL vnest_anterpolate_e
+                CALL cpu_log( log_point(83), 'vnest_anter_e', 'stop' )
+
+             ELSE
+
+                CALL pres
+
+             ENDIF
+
+          ENDIF
+
+!
+!--       If required, compute liquid water content
+          IF ( bulk_cloud_model )  THEN
+             CALL calc_liquid_water_content
+          ENDIF
+!
+!--       If required, compute virtual potential temperature 
+          IF ( humidity )  THEN 
+             CALL compute_vpt 
+          ENDIF 
+
+!
+!--       Compute the diffusion quantities
+          IF ( .NOT. constant_diffusion )  THEN
+
+!
+!--          Determine surface fluxes shf and qsws and surface values 
+!--          pt_surface and q_surface in dependence on data from external 
+!--          file LSF_DATA respectively
+             IF ( ( large_scale_forcing .AND. lsf_surf ) .AND. &
+                 intermediate_timestep_count == intermediate_timestep_count_max )&
+             THEN
+                CALL ls_forcing_surf( simulated_time )
+             ENDIF
+
+!
+!--          First the vertical (and horizontal) fluxes in the surface 
+!--          (constant flux) layer are computed
+             IF ( constant_flux_layer )  THEN
+                CALL cpu_log( log_point(19), 'surface_layer_fluxes', 'start' )
+                CALL surface_layer_fluxes
+                CALL cpu_log( log_point(19), 'surface_layer_fluxes', 'stop' )
+             ENDIF
+!
+!--          If required, solve the energy balance for the surface and run soil 
+!--          model. Call for horizontal as well as vertical surfaces
+             IF ( land_surface .AND. time_since_reference_point >= skip_time_do_lsm)  THEN
+
+                CALL cpu_log( log_point(54), 'land_surface', 'start' )
+!
+!--             Call for horizontal upward-facing surfaces
+                CALL lsm_energy_balance( .TRUE., -1 )
+                CALL lsm_soil_model( .TRUE., -1, .TRUE. )
+!
+!--             Call for northward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 0 )
+                CALL lsm_soil_model( .FALSE., 0, .TRUE. )
+!
+!--             Call for southward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 1 )
+                CALL lsm_soil_model( .FALSE., 1, .TRUE. )
+!
+!--             Call for eastward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 2 )
+                CALL lsm_soil_model( .FALSE., 2, .TRUE. )
+!
+!--             Call for westward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 3 )
+                CALL lsm_soil_model( .FALSE., 3, .TRUE. )
+!
+!--             At the end, set boundary conditons for potential temperature
+!--             and humidity after running the land-surface model. This 
+!--             might be important for the nesting, where arrays are transfered.
+                CALL lsm_boundary_condition
+
+                CALL cpu_log( log_point(54), 'land_surface', 'stop' )
+             ENDIF
+!
+!--          If required, solve the energy balance for urban surfaces and run 
+!--          the material heat model
+             IF (urban_surface) THEN
+                CALL cpu_log( log_point(74), 'urban_surface', 'start' )
+                
+                CALL usm_surface_energy_balance( .FALSE. )
+                IF ( usm_material_model )  THEN
+                   CALL usm_green_heat_model
+                   CALL usm_material_heat_model ( .FALSE. )
+                ENDIF
+
+                CALL usm_temperature_near_surface
+!
+!--             At the end, set boundary conditons for potential temperature
+!--             and humidity after running the urban-surface model. This 
+!--             might be important for the nesting, where arrays are transfered.
+                CALL usm_boundary_condition
+
+                CALL cpu_log( log_point(74), 'urban_surface', 'stop' )
+             ENDIF
+!
+!--          Compute the diffusion coefficients
+             CALL cpu_log( log_point(17), 'diffusivities', 'start' )
+             IF ( .NOT. humidity ) THEN
+                IF ( ocean_mode )  THEN
+                   CALL tcm_diffusivities( prho, prho_reference )
+                ELSE
+                   CALL tcm_diffusivities( pt, pt_reference )
+                ENDIF
+             ELSE
+                CALL tcm_diffusivities( vpt, pt_reference )
+             ENDIF
+             CALL cpu_log( log_point(17), 'diffusivities', 'stop' )
+!
+!--          Vertical nesting: set fine grid eddy viscosity top boundary condition
+             IF ( vnest_init )  CALL vnest_boundary_conds_khkm
+
+          ENDIF
+
+!
+!--       If required, calculate radiative fluxes and heating rates
+          IF ( radiation .AND. intermediate_timestep_count                     &
+               == intermediate_timestep_count_max .AND. time_since_reference_point >    &
+               skip_time_do_radiation )  THEN
+
+               time_radiation = time_radiation + dt_3d
+
+             IF ( time_radiation >= dt_radiation .OR. force_radiation_call )   &
+             THEN
+
+                CALL cpu_log( log_point(50), 'radiation', 'start' )
+
+                IF ( .NOT. force_radiation_call )  THEN
+                   time_radiation = time_radiation - dt_radiation
+                ENDIF
+
+!
+!--             Adjust the current time to the time step of the radiation model.
+!--             Needed since radiation is pre-calculated and stored only on apparent 
+!--             solar positions
+                time_since_reference_point_save = time_since_reference_point
+                time_since_reference_point =                                   &
+                                    REAL( FLOOR( time_since_reference_point /  &
+                                                 dt_radiation), wp )           &
+                                             * dt_radiation
+
+                CALL radiation_control
+
+                CALL cpu_log( log_point(50), 'radiation', 'stop' )
+
+                IF ( ( urban_surface  .OR.  land_surface )  .AND.               &
+                     radiation_interactions )  THEN
+                   CALL cpu_log( log_point(75), 'radiation_interaction', 'start' )
+                   CALL radiation_interaction
+                   CALL cpu_log( log_point(75), 'radiation_interaction', 'stop' )
+                ENDIF
+    
+!
+!--             Return the current time to its original value
+                time_since_reference_point = time_since_reference_point_save
+
+             ENDIF
+          ENDIF
+
+       ENDDO   ! Intermediate step loop
+!
+!--    If required, consider chemical emissions
+       IF ( air_chemistry  .AND.  do_emis )  THEN
+!
+!--       Update the time --> kanani: revise location of this CALL
+          CALL calc_date_and_time
+!
+!--       Call emission routine only once an hour
+          IF (hour_of_year  .GT.  hour_call_emis )  THEN
+             CALL chem_emissions_setup( chem_emis_att, chem_emis, nspec_out )
+             hour_call_emis = hour_of_year
+          ENDIF
+       ENDIF
+!
+!--    If required, do UV exposure calculations
+       IF ( uv_exposure )  THEN
+          CALL uvem_calc_exposure
+       ENDIF
+!
+!--    If required, calculate indoor temperature, waste heat, heat flux
+!--    through wall, etc.
+!--    dt_indoor steers the frequency of the indoor model calculations
+       IF (       indoor_model                                                    &
+            .AND. intermediate_timestep_count == intermediate_timestep_count_max  &
+            .AND. time_since_reference_point > skip_time_do_indoor )  THEN
+
+          time_indoor = time_indoor + dt_3d
+
+          IF ( time_indoor >= dt_indoor )  THEN
+
+             time_indoor = time_indoor - dt_indoor
+
+             CALL cpu_log( log_point(76), 'indoor_model', 'start' )
+             CALL im_main_heatcool
+             CALL cpu_log( log_point(76), 'indoor_model', 'stop' )
+
+          ENDIF
+       ENDIF
+!
+!--    Increase simulation time and output times
+       nr_timesteps_this_run      = nr_timesteps_this_run + 1
+       current_timestep_number    = current_timestep_number + 1
+       simulated_time             = simulated_time   + dt_3d
+       time_since_reference_point = simulated_time - coupling_start_time
+       simulated_time_chr         = time_to_string( time_since_reference_point )
+
+
+
+
+       IF ( simulated_time >= skip_time_data_output_av )  THEN
+          time_do_av         = time_do_av       + dt_3d
+       ENDIF
+       IF ( simulated_time >= skip_time_do2d_xy )  THEN
+          time_do2d_xy       = time_do2d_xy     + dt_3d
+       ENDIF
+       IF ( simulated_time >= skip_time_do2d_xz )  THEN
+          time_do2d_xz       = time_do2d_xz     + dt_3d
+       ENDIF
+       IF ( simulated_time >= skip_time_do2d_yz )  THEN
+          time_do2d_yz       = time_do2d_yz     + dt_3d
+       ENDIF
+       IF ( simulated_time >= skip_time_do3d    )  THEN
+          time_do3d          = time_do3d        + dt_3d
+       ENDIF
+       DO  mid = 1, masks
+          IF ( simulated_time >= skip_time_domask(mid) )  THEN
+             time_domask(mid)= time_domask(mid) + dt_3d
+          ENDIF
+       ENDDO
+       time_dvrp          = time_dvrp        + dt_3d
+       IF ( simulated_time >= skip_time_dosp )  THEN
+          time_dosp       = time_dosp        + dt_3d
+       ENDIF
+       time_dots          = time_dots        + dt_3d
+       IF ( .NOT. first_call_lpm )  THEN
+          time_dopts      = time_dopts       + dt_3d
+       ENDIF
+       IF ( simulated_time >= skip_time_dopr )  THEN
+          time_dopr       = time_dopr        + dt_3d
+       ENDIF
+       time_dopr_listing  = time_dopr_listing + dt_3d
+       time_run_control   = time_run_control + dt_3d
+!
+!--    Increment time-counter for surface output
+       IF ( surface_data_output )  THEN
+          IF ( simulated_time >= skip_time_dosurf )  THEN
+             time_dosurf    = time_dosurf + dt_3d
+          ENDIF
+          IF ( simulated_time >= skip_time_dosurf_av )  THEN
+             time_dosurf_av = time_dosurf_av + dt_3d
+          ENDIF
+       ENDIF
+!
+!--    In case of synthetic turbulence generation and parametrized turbulence
+!--    information, update the time counter and if required, adjust the 
+!--    STG to new atmospheric conditions.
+       IF ( use_syn_turb_gen  )  THEN
+          IF ( parametrize_inflow_turbulence )  THEN
+             time_stg_adjust = time_stg_adjust + dt_3d
+             IF ( time_stg_adjust >= dt_stg_adjust )  CALL stg_adjust
+          ENDIF
+          time_stg_call = time_stg_call + dt_3d
+       ENDIF
+
+!
+!--    Data exchange between coupled models
+       IF ( coupling_mode /= 'uncoupled'  .AND.  run_coupled                   &
+                                          .AND. .NOT. vnested )  THEN
+          time_coupling = time_coupling + dt_3d
+
+!
+!--       In case of model termination initiated by the local model 
+!--       (terminate_coupled > 0), the coupler must be skipped because it would 
+!--       cause an MPI intercomminucation hang.
+!--       If necessary, the coupler will be called at the beginning of the 
+!--       next restart run.
+          DO WHILE ( time_coupling >= dt_coupling .AND. terminate_coupled == 0 )
+             CALL surface_coupler
+             time_coupling = time_coupling - dt_coupling
+          ENDDO
+       ENDIF
+
+!
+!--    Biometeorology calculation of stationary thermal indices
+       IF ( biometeorology  .AND.  time_do3d >= dt_do3d )  THEN
+          CALL biom_calculate_static_grid ( .FALSE. )
+          time_biom_results = time_since_reference_point
+       ENDIF
+
+!
+!--    Execute the gust module actions
+       IF ( gust_module_enabled )  THEN
+          CALL gust_actions( 'after_integration' )
+       ENDIF
+
+!
+!--    Execute user-defined actions
+       CALL user_actions( 'after_integration' )
+
+!
+!--    If Galilei transformation is used, determine the distance that the
+!--    model has moved so far
+       IF ( galilei_transformation )  THEN
+          advected_distance_x = advected_distance_x + u_gtrans * dt_3d
+          advected_distance_y = advected_distance_y + v_gtrans * dt_3d
+       ENDIF
+
+!
+!--    Check, if restart is necessary (because cpu-time is expiring or
+!--    because it is forced by user) and set stop flag
+!--    This call is skipped if the remote model has already initiated a restart.
+       IF ( .NOT. terminate_run )  CALL check_for_restart
+
+!
+!--    Carry out statistical analysis and output at the requested output times.
+!--    The MOD function is used for calculating the output time counters (like
+!--    time_dopr) in order to regard a possible decrease of the output time
+!--    interval in case of restart runs
+
+!
+!--    Set a flag indicating that so far no statistics have been created
+!--    for this time step
+       flow_statistics_called = .FALSE.
+
+!
+!--    If required, call flow_statistics for averaging in time
+       IF ( averaging_interval_pr /= 0.0_wp  .AND.  &
+            ( dt_dopr - time_dopr ) <= averaging_interval_pr  .AND.  &
+            simulated_time >= skip_time_dopr )  THEN
+          time_dopr_av = time_dopr_av + dt_3d
+          IF ( time_dopr_av >= dt_averaging_input_pr )  THEN
+             do_sum = .TRUE.
+             time_dopr_av = MOD( time_dopr_av, &
+                                    MAX( dt_averaging_input_pr, dt_3d ) )
+          ENDIF
+       ENDIF
+       IF ( do_sum )  CALL flow_statistics
+
+!
+!--    Sum-up 3d-arrays for later output of time-averaged 2d/3d/masked data
+       IF ( averaging_interval /= 0.0_wp  .AND.                                &
+            ( dt_data_output_av - time_do_av ) <= averaging_interval  .AND. &
+            simulated_time >= skip_time_data_output_av )                    &
+       THEN
+          time_do_sla = time_do_sla + dt_3d
+          IF ( time_do_sla >= dt_averaging_input )  THEN
+             CALL sum_up_3d_data
+             average_count_3d = average_count_3d + 1
+             time_do_sla = MOD( time_do_sla, MAX( dt_averaging_input, dt_3d ) )
+          ENDIF
+       ENDIF
+!
+!--    Average surface data
+       IF ( surface_data_output )  THEN
+          IF ( averaging_interval_surf /= 0.0_wp  .AND.                        & 
+               ( dt_dosurf_av - time_dosurf_av ) <= averaging_interval_surf    &
+          .AND.  simulated_time >= skip_time_dosurf_av )  THEN
+             IF ( time_dosurf_av >= dt_averaging_input )  THEN        
+                CALL surface_output_averaging
+                average_count_surf = average_count_surf + 1
+             ENDIF
+          ENDIF
+       ENDIF
+
+!
+!--    Calculate spectra for time averaging
+       IF ( averaging_interval_sp /= 0.0_wp  .AND.  &
+            ( dt_dosp - time_dosp ) <= averaging_interval_sp  .AND.  &
+            simulated_time >= skip_time_dosp )  THEN
+          time_dosp_av = time_dosp_av + dt_3d
+          IF ( time_dosp_av >= dt_averaging_input_pr )  THEN
+             CALL calc_spectra
+             time_dosp_av = MOD( time_dosp_av, &
+                                 MAX( dt_averaging_input_pr, dt_3d ) )
+          ENDIF
+       ENDIF
+
+!
+!--    Call flight module and output data
+       IF ( virtual_flight )  THEN
+          CALL flight_measurement
+          CALL data_output_flight
+       ENDIF
+!
+!--    Take virtual measurements
+       IF ( virtual_measurement  .AND.                                         &
+            vm_time_start <= time_since_reference_point )  CALL vm_sampling
+
+!
+!--    Profile output (ASCII) on file
+       IF ( time_dopr_listing >= dt_dopr_listing )  THEN
+          CALL print_1d
+          time_dopr_listing = MOD( time_dopr_listing, MAX( dt_dopr_listing, &
+                                                           dt_3d ) )
+       ENDIF
+
+!
+!--    Graphic output for PROFIL
+       IF ( time_dopr >= dt_dopr )  THEN
+          IF ( dopr_n /= 0 )  CALL data_output_profiles
+          time_dopr = MOD( time_dopr, MAX( dt_dopr, dt_3d ) )
+          time_dopr_av = 0.0_wp    ! due to averaging (see above)
+       ENDIF
+
+!
+!--    Graphic output for time series
+       IF ( time_dots >= dt_dots )  THEN
+          CALL data_output_tseries
+          time_dots = MOD( time_dots, MAX( dt_dots, dt_3d ) )
+       ENDIF
+
+!
+!--    Output of spectra (formatted for use with PROFIL), in case of no
+!--    time averaging, spectra has to be calculated before
+       IF ( time_dosp >= dt_dosp )  THEN
+          IF ( average_count_sp == 0 )  CALL calc_spectra
+          CALL data_output_spectra
+          time_dosp = MOD( time_dosp, MAX( dt_dosp, dt_3d ) )
+       ENDIF
+
+!
+!--    2d-data output (cross-sections)
+       IF ( time_do2d_xy >= dt_do2d_xy )  THEN
+          CALL data_output_2d( 'xy', 0 )
+          time_do2d_xy = MOD( time_do2d_xy, MAX( dt_do2d_xy, dt_3d ) )
+       ENDIF
+       IF ( time_do2d_xz >= dt_do2d_xz )  THEN
+          CALL data_output_2d( 'xz', 0 )
+          time_do2d_xz = MOD( time_do2d_xz, MAX( dt_do2d_xz, dt_3d ) )
+       ENDIF
+       IF ( time_do2d_yz >= dt_do2d_yz )  THEN
+          CALL data_output_2d( 'yz', 0 )
+          time_do2d_yz = MOD( time_do2d_yz, MAX( dt_do2d_yz, dt_3d ) )
+       ENDIF
+
+!
+!--    3d-data output (volume data)
+       IF ( time_do3d >= dt_do3d )  THEN
+          CALL data_output_3d( 0 )
+          time_do3d = MOD( time_do3d, MAX( dt_do3d, dt_3d ) )
+       ENDIF
+
+!
+!--    Masked data output
+       DO  mid = 1, masks
+          IF ( time_domask(mid) >= dt_domask(mid) )  THEN
+             CALL data_output_mask( 0 )
+             time_domask(mid) = MOD( time_domask(mid),  &
+                                     MAX( dt_domask(mid), dt_3d ) )
+          ENDIF
+       ENDDO
+
+!
+!--    Output of time-averaged 2d/3d/masked data
+       IF ( time_do_av >= dt_data_output_av )  THEN
+          CALL average_3d_data
+          CALL data_output_2d( 'xy', 1 )
+          CALL data_output_2d( 'xz', 1 )
+          CALL data_output_2d( 'yz', 1 )
+          CALL data_output_3d( 1 )
+          DO  mid = 1, masks
+             CALL data_output_mask( 1 )
+          ENDDO
+          time_do_av = MOD( time_do_av, MAX( dt_data_output_av, dt_3d ) )
+       ENDIF
+!
+!--    Output of surface data, instantaneous and averaged data
+       IF ( surface_data_output )  THEN
+          IF ( time_dosurf >= dt_dosurf )  THEN
+             CALL surface_output( 0 )
+             time_dosurf = MOD( time_dosurf, MAX( dt_dosurf, dt_3d ) )
+          ENDIF
+          IF ( time_dosurf_av >= dt_dosurf_av )  THEN
+             CALL surface_output( 1 )
+             time_dosurf_av = MOD( time_dosurf_av, MAX( dt_dosurf_av, dt_3d ) )
+          ENDIF
+       ENDIF
+
+!
+!--    Output of particle time series
+       IF ( particle_advection )  THEN
+          IF ( time_dopts >= dt_dopts  .OR. &
+               ( simulated_time >= particle_advection_start  .AND. &
+                 first_call_lpm ) )  THEN
+             CALL data_output_ptseries
+             time_dopts = MOD( time_dopts, MAX( dt_dopts, dt_3d ) )
+          ENDIF
+       ENDIF
+
+!
+!--    Output of dvrp-graphics (isosurface, particles, slicer)
+#if defined( __dvrp_graphics )
+       CALL DVRP_LOG_EVENT( -2, current_timestep_number-1 )
+#endif
+       IF ( time_dvrp >= dt_dvrp )  THEN
+          CALL data_output_dvrp
+          time_dvrp = MOD( time_dvrp, MAX( dt_dvrp, dt_3d ) )
+       ENDIF
+#if defined( __dvrp_graphics )
+       CALL DVRP_LOG_EVENT( 2, current_timestep_number )
+#endif
+
+!
+!--    If required, set the heat flux for the next time step at a random value
+       IF ( constant_heatflux  .AND.  random_heatflux )  THEN
+          IF ( surf_def_h(0)%ns >= 1 )  CALL disturb_heatflux( surf_def_h(0) )
+          IF ( surf_lsm_h%ns    >= 1 )  CALL disturb_heatflux( surf_lsm_h    )
+          IF ( surf_usm_h%ns    >= 1 )  CALL disturb_heatflux( surf_usm_h    )
+       ENDIF
+
+!
+!--    Execute the gust module actions
+       IF ( gust_module_enabled )  THEN
+          CALL gust_actions( 'after_timestep' )
+       ENDIF
+
+!
+!--    Execute user-defined actions
+       CALL user_actions( 'after_timestep' )
+
+!
+!--    Determine size of next time step. Save timestep dt_3d because it is
+!--    newly calculated in routine timestep, but required further below for
+!--    steering the run control output interval
+       dt_3d_old = dt_3d
+       CALL timestep
+
+!
+!--    Synchronize the timestep in case of nested run.
+       IF ( nested_run )  THEN
+!
+!--       Synchronize by unifying the time step.
+!--       Global minimum of all time-steps is used for all.
+          CALL pmci_synchronize
+       ENDIF
+
+!
+!--    Computation and output of run control parameters.
+!--    This is also done whenever perturbations have been imposed
+       IF ( time_run_control >= dt_run_control  .OR.                     &
+            timestep_scheme(1:5) /= 'runge'  .OR.  disturbance_created ) &
+       THEN
+          CALL run_control
+          IF ( time_run_control >= dt_run_control )  THEN
+             time_run_control = MOD( time_run_control, &
+                                     MAX( dt_run_control, dt_3d_old ) )
+          ENDIF
+       ENDIF
+
+!
+!--    Output elapsed simulated time in form of a progress bar on stdout
+       IF ( myid == 0 )  CALL output_progress_bar
+
+       CALL cpu_log( log_point_s(10), 'timesteps', 'stop' )
+
+
+    ENDDO   ! time loop
+
+!
+!-- Vertical nesting: Deallocate variables initialized for vertical nesting    
+    IF ( vnest_init )  CALL vnest_deallocate
+
+    IF ( myid == 0 )  CALL finish_progress_bar
+
+#if defined( __dvrp_graphics )
+    CALL DVRP_LOG_EVENT( -2, current_timestep_number )
+#endif
+
+    CALL location_message( 'finished time-stepping', .TRUE. )
+
+ END SUBROUTINE time_integration
Index: /palm/tags/release-6.0/SOURCE/time_integration_spinup.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/time_integration_spinup.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/time_integration_spinup.f90	(revision 3477)
@@ -0,0 +1,635 @@
+!> @file time_integration_spinup.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! call to material_heat_model now with check if spinup runs (rvtils)
+! 
+! 3337 2018-10-12 15:17:09Z kanani
+! (from branch resler)
+! Add pt1 initialization
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 2983 2018-04-18 10:43:40Z suehring
+! Revise limitation of wall-adjacent velocity.
+! 
+! 2934 2018-03-26 19:13:22Z suehring
+! Synchronize parent and child models after spinup.
+! 
+! 2881 2018-03-13 16:24:40Z maronga
+! Added flag for switching on/off calculation of soil moisture
+! 
+! 2818 2018-02-19 16:42:36Z maronga
+! Velocity components near walls/ground are now set to the profiles stored in
+! u_init and v_init. Activated soil moisture calculation during spinup.
+! 
+! 2782 2018-02-02 11:51:10Z maronga
+! Bugfix and re-activation of homogeneous setting of velocity components 
+! during spinup
+! 
+! 2758 2018-01-17 12:55:21Z suehring
+! Comment out homogeneous setting of wind velocity as this will lead to zero
+! friction velocity and cause problems in MOST relationships.
+! 
+! 2728 2018-01-09 07:03:53Z maronga
+! Set velocity componenets to homogeneous values during spinup
+! 
+! 2724 2018-01-05 12:12:38Z maronga
+! Use dt_spinup for all active components during spinup
+! 
+! 2723 2018-01-05 09:27:03Z maronga
+! Bugfix: array rad_sw_in no longer exists and is thus removed from RUN_CONTROL
+! output.
+! Added output of XY and 3D data during spinup.
+! Bugfix: time step in LSM and USM was set to dt_3d instead of dt_spinup
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Added radiation interactions (moved from USM) (MS)
+! 
+! 2544 2017-10-13 18:09:32Z maronga
+! Date and time quantities are now read from date_and_time_mod 
+! 
+! 2299 2017-06-29 10:14:38Z maronga
+! Call of soil model adjusted to avoid prognostic equation for soil moisture
+! during spinup.
+! Better representation of diurnal cycle of near-surface temperature.
+! Excluded prognostic equation for soil moisture during spinup.
+! Added output of run control data for spinup.
+! 
+! 2297 2017-06-28 14:35:57Z scharf
+! bugfixes
+! 
+! 2296 2017-06-28 07:53:56Z maronga
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Integration in time of the non-atmospheric model components such as land
+!> surface model and urban surface model
+!------------------------------------------------------------------------------!
+ SUBROUTINE time_integration_spinup
+ 
+    USE arrays_3d,                                                             &
+        ONLY:  pt, pt_p, u, u_init, v, v_init
+
+    USE control_parameters,                                                    &
+        ONLY:  averaging_interval_pr, calc_soil_moisture_during_spinup,        &
+               constant_diffusion, constant_flux_layer, coupling_start_time,   &
+               data_output_during_spinup, dopr_n, do_sum,                      &
+               dt_averaging_input_pr, dt_dopr, dt_dots, dt_do2d_xy, dt_do3d,   &
+               dt_spinup, dt_3d, humidity, intermediate_timestep_count,        &
+               intermediate_timestep_count_max, land_surface,                  &
+               simulated_time, simulated_time_chr, skip_time_dopr,             &
+               skip_time_do2d_xy, skip_time_do3d, spinup_pt_amplitude,         &
+               spinup_pt_mean, spinup_time, timestep_count, time_dopr,         &
+               time_dopr_av, time_dots, time_do2d_xy, time_do3d,               &
+               time_run_control, time_since_reference_point, urban_surface
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE date_and_time_mod,                                                     &
+        ONLY: day_of_year_init, time_utc_init
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nzb, nzt, nysg, nyng, nxlg, nxrg
+
+
+    USE land_surface_model_mod,                                                &
+        ONLY:  lsm_energy_balance, lsm_soil_model, lsm_swap_timelevel
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+    USE kinds
+
+    USE radiation_model_mod,                                                   &
+        ONLY:  force_radiation_call, radiation, radiation_control,             &
+               radiation_interaction, radiation_interactions, time_radiation
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called
+
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  surface_layer_fluxes
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                surf_usm_v
+
+    USE urban_surface_mod,                                                     &
+        ONLY:  usm_material_heat_model, usm_material_model,                    &
+               usm_surface_energy_balance, usm_swap_timelevel,                 &
+               usm_green_heat_model, usm_temperature_near_surface
+
+
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=9) ::  time_to_string          !< 
+  
+    INTEGER(iwp) ::  i !< running index
+    INTEGER(iwp) ::  j !< running index
+    INTEGER(iwp) ::  k !< running index
+    INTEGER(iwp) ::  l !< running index
+    INTEGER(iwp) ::  m !< running index
+
+    INTEGER(iwp) :: current_timestep_number_spinup = 0  !< number if timestep during spinup
+  
+    LOGICAL :: run_control_header_spinup = .FALSE.  !< flag parameter for steering whether the header information must be output
+
+    REAL(wp) ::  pt_spinup   !< temporary storage of temperature
+    REAL(wp) ::  dt_save     !< temporary storage for time step
+                  
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  pt_save  !< temporary storage of temperature
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_save   !< temporary storage of u wind component
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_save   !< temporary storage of v wind component
+
+
+!
+!-- Save 3D arrays because they are to be changed for spinup purpose
+    ALLOCATE( pt_save(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( u_save(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( v_save(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+    CALL exchange_horiz( pt, nbgp )   
+    CALL exchange_horiz( u,  nbgp )  
+    CALL exchange_horiz( v,  nbgp )  
+ 
+    pt_save = pt
+    u_save  = u
+    v_save  = v
+
+!
+!-- Set the same wall-adjacent velocity to all grid points. The sign of the 
+!-- original velocity field must be preserved because the surface schemes crash 
+!-- otherwise. The precise reason is still unknown. A minimum velocity of 0.1
+!-- m/s is used to maintain turbulent transfer at the surface.
+    IF ( land_surface )  THEN
+       DO  m = 1, surf_lsm_h%ns
+          i   = surf_lsm_h%i(m)            
+          j   = surf_lsm_h%j(m)
+          k   = surf_lsm_h%k(m)
+          u(k,j,i) = SIGN(1.0_wp,u_init(k)) * MAX( ABS( u_init(k) ),0.1_wp)
+          v(k,j,i) = SIGN(1.0_wp,v_init(k)) * MAX( ABS( v_init(k) ),0.1_wp)
+       ENDDO
+
+       DO  l = 0, 3
+          DO  m = 1, surf_lsm_v(l)%ns
+             i   = surf_lsm_v(l)%i(m)            
+             j   = surf_lsm_v(l)%j(m)
+             k   = surf_lsm_v(l)%k(m)
+             u(k,j,i) = SIGN(1.0_wp,u_init(k)) * MAX( ABS( u_init(k) ),0.1_wp)
+             v(k,j,i) = SIGN(1.0_wp,v_init(k)) * MAX( ABS( v_init(k) ),0.1_wp)
+          ENDDO
+       ENDDO
+    ENDIF
+
+    IF ( urban_surface )  THEN
+       DO  m = 1, surf_usm_h%ns
+          i   = surf_usm_h%i(m)            
+          j   = surf_usm_h%j(m)
+          k   = surf_usm_h%k(m)
+          u(k,j,i) = SIGN(1.0_wp,u_init(k)) * MAX( ABS( u_init(k) ),0.1_wp)
+          v(k,j,i) = SIGN(1.0_wp,v_init(k)) * MAX( ABS( v_init(k) ),0.1_wp)
+       ENDDO
+
+       DO  l = 0, 3
+          DO  m = 1, surf_usm_v(l)%ns
+             i   = surf_usm_v(l)%i(m)            
+             j   = surf_usm_v(l)%j(m)
+             k   = surf_usm_v(l)%k(m)
+             u(k,j,i) = SIGN(1.0_wp,u_init(k)) * MAX( ABS( u_init(k) ),0.1_wp)
+             v(k,j,i) = SIGN(1.0_wp,v_init(k)) * MAX( ABS( v_init(k) ),0.1_wp)
+          ENDDO
+       ENDDO
+    ENDIF
+
+    CALL exchange_horiz( u,  nbgp )
+    CALL exchange_horiz( v,  nbgp )
+
+    dt_save = dt_3d
+    dt_3d   = dt_spinup
+
+    CALL location_message( 'starting spinup-sequence', .TRUE. )
+!
+!-- Start of the time loop
+    DO  WHILE ( simulated_time < spinup_time )
+
+       CALL cpu_log( log_point_s(15), 'timesteps spinup', 'start' )
+   
+!
+!--    Start of intermediate step loop
+       intermediate_timestep_count = 0
+       DO  WHILE ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )
+
+          intermediate_timestep_count = intermediate_timestep_count + 1
+
+!
+!--       Set the steering factors for the prognostic equations which depend
+!--       on the timestep scheme
+          CALL timestep_scheme_steering
+
+
+!
+!--       Estimate a near-surface air temperature based on the position of the 
+!--       sun and user input about mean temperature and amplitude. The time is
+!--       shifted by one hour to simulate a lag between air temperature and
+!--       incoming radiation
+          pt_spinup = spinup_pt_mean + spinup_pt_amplitude                     &
+             * solar_angle (time_utc_init + time_since_reference_point - 3600.0)
+
+!
+!--       Map air temperature to all grid points in the vicinity of a surface
+!--       element
+          IF ( land_surface )  THEN
+             DO  m = 1, surf_lsm_h%ns
+                i   = surf_lsm_h%i(m)            
+                j   = surf_lsm_h%j(m)
+                k   = surf_lsm_h%k(m)
+                pt(k,j,i) = pt_spinup
+             ENDDO
+
+             DO  l = 0, 3
+                DO  m = 1, surf_lsm_v(l)%ns
+                   i   = surf_lsm_v(l)%i(m)            
+                   j   = surf_lsm_v(l)%j(m)
+                   k   = surf_lsm_v(l)%k(m)
+                   pt(k,j,i) = pt_spinup
+                ENDDO
+             ENDDO
+          ENDIF
+
+          IF ( urban_surface )  THEN
+             DO  m = 1, surf_usm_h%ns
+                i   = surf_usm_h%i(m)            
+                j   = surf_usm_h%j(m)
+                k   = surf_usm_h%k(m)
+                pt(k,j,i) = pt_spinup
+                !!!!!!!!!!!!!!!!HACK!!!!!!!!!!!!!
+                surf_usm_h%pt1 = pt_spinup
+                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+             ENDDO
+
+             DO  l = 0, 3
+                DO  m = 1, surf_usm_v(l)%ns
+                   i   = surf_usm_v(l)%i(m)            
+                   j   = surf_usm_v(l)%j(m)
+                   k   = surf_usm_v(l)%k(m)
+                   pt(k,j,i) = pt_spinup
+                   !!!!!!!!!!!!!!!!HACK!!!!!!!!!!!!!
+                   surf_usm_v(l)%pt1 = pt_spinup
+                   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+                ENDDO
+             ENDDO
+          ENDIF
+
+          CALL exchange_horiz( pt,  nbgp )    
+
+
+!
+!--       Swap the time levels in preparation for the next time step.
+          timestep_count = timestep_count + 1
+     
+          IF ( land_surface )  THEN
+              CALL lsm_swap_timelevel ( 0 )
+          ENDIF
+
+          IF ( urban_surface )  THEN
+             CALL usm_swap_timelevel ( 0 )
+          ENDIF
+
+          IF ( land_surface )  THEN
+             CALL lsm_swap_timelevel ( MOD( timestep_count, 2) )
+          ENDIF
+
+          IF ( urban_surface )  THEN
+             CALL usm_swap_timelevel ( MOD( timestep_count, 2) )
+          ENDIF
+         
+!
+!--       If required, compute virtual potential temperature 
+          IF ( humidity )  THEN 
+             CALL compute_vpt 
+          ENDIF 
+
+!
+!--       Compute the diffusion quantities
+          IF ( .NOT. constant_diffusion )  THEN
+
+!
+!--          First the vertical (and horizontal) fluxes in the surface 
+!--          (constant flux) layer are computed
+             IF ( constant_flux_layer )  THEN
+                CALL cpu_log( log_point(19), 'surface_layer_fluxes', 'start' )
+                CALL surface_layer_fluxes
+                CALL cpu_log( log_point(19), 'surface_layer_fluxes', 'stop' )
+             ENDIF
+
+!
+!--          If required, solve the energy balance for the surface and run soil 
+!--          model. Call for horizontal as well as vertical surfaces.
+!--          The prognostic equation for soil moisure is switched off
+             IF ( land_surface )  THEN
+
+                CALL cpu_log( log_point(54), 'land_surface', 'start' )
+!
+!--             Call for horizontal upward-facing surfaces
+                CALL lsm_energy_balance( .TRUE., -1 )
+                CALL lsm_soil_model( .TRUE., -1, calc_soil_moisture_during_spinup )
+!
+!--             Call for northward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 0 )
+                CALL lsm_soil_model( .FALSE., 0, calc_soil_moisture_during_spinup )
+!
+!--             Call for southward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 1 )
+                CALL lsm_soil_model( .FALSE., 1, calc_soil_moisture_during_spinup )
+!
+!--             Call for eastward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 2 )
+                CALL lsm_soil_model( .FALSE., 2, calc_soil_moisture_during_spinup )
+!
+!--             Call for westward-facing surfaces
+                CALL lsm_energy_balance( .FALSE., 3 )
+                CALL lsm_soil_model( .FALSE., 3, calc_soil_moisture_during_spinup )
+
+                CALL cpu_log( log_point(54), 'land_surface', 'stop' )
+             ENDIF
+
+!
+!--          If required, solve the energy balance for urban surfaces and run 
+!--          the material heat model
+             IF (urban_surface) THEN
+                CALL cpu_log( log_point(74), 'urban_surface', 'start' )
+                CALL usm_surface_energy_balance( .TRUE. )
+                IF ( usm_material_model )  THEN
+                   CALL usm_green_heat_model
+                   CALL usm_material_heat_model( .TRUE. )
+                ENDIF
+                IF ( urban_surface ) THEN
+                   CALL usm_temperature_near_surface
+                ENDIF
+                CALL cpu_log( log_point(74), 'urban_surface', 'stop' )
+             ENDIF
+
+          ENDIF
+
+!
+!--       If required, calculate radiative fluxes and heating rates
+          IF ( radiation .AND. intermediate_timestep_count                     &
+               == intermediate_timestep_count_max )  THEN
+
+               time_radiation = time_radiation + dt_3d
+
+             IF ( time_radiation >= dt_3d .OR. force_radiation_call )          &
+             THEN
+
+                CALL cpu_log( log_point(50), 'radiation', 'start' )
+
+                IF ( .NOT. force_radiation_call )  THEN
+                   time_radiation = time_radiation - dt_3d
+                ENDIF
+
+                CALL radiation_control
+
+                CALL cpu_log( log_point(50), 'radiation', 'stop' )
+
+                IF ( radiation_interactions )  THEN
+                   CALL cpu_log( log_point(75), 'radiation_interaction', 'start' )
+                   CALL radiation_interaction
+                   CALL cpu_log( log_point(75), 'radiation_interaction', 'stop' )
+                ENDIF
+             ENDIF
+          ENDIF
+
+       ENDDO   ! Intermediate step loop
+
+!
+!--    Increase simulation time and output times
+       current_timestep_number_spinup = current_timestep_number_spinup + 1
+       simulated_time             = simulated_time   + dt_3d
+       simulated_time_chr         = time_to_string( simulated_time )
+       time_since_reference_point = simulated_time - coupling_start_time
+
+       IF ( data_output_during_spinup )  THEN
+          IF ( simulated_time >= skip_time_do2d_xy )  THEN
+             time_do2d_xy       = time_do2d_xy     + dt_3d
+          ENDIF
+          IF ( simulated_time >= skip_time_do3d    )  THEN
+             time_do3d          = time_do3d        + dt_3d
+          ENDIF
+          time_dots          = time_dots        + dt_3d
+          IF ( simulated_time >= skip_time_dopr )  THEN
+             time_dopr       = time_dopr        + dt_3d
+          ENDIF
+          time_run_control   = time_run_control + dt_3d
+
+!
+!--       Carry out statistical analysis and output at the requested output times.
+!--       The MOD function is used for calculating the output time counters (like
+!--       time_dopr) in order to regard a possible decrease of the output time
+!--       interval in case of restart runs
+
+!
+!--       Set a flag indicating that so far no statistics have been created
+!--       for this time step
+          flow_statistics_called = .FALSE.
+
+!
+!--       If required, call flow_statistics for averaging in time
+          IF ( averaging_interval_pr /= 0.0_wp  .AND.                          &
+             ( dt_dopr - time_dopr ) <= averaging_interval_pr  .AND.           &
+             simulated_time >= skip_time_dopr )  THEN
+             time_dopr_av = time_dopr_av + dt_3d
+             IF ( time_dopr_av >= dt_averaging_input_pr )  THEN
+                do_sum = .TRUE.
+                time_dopr_av = MOD( time_dopr_av,                              &
+                               MAX( dt_averaging_input_pr, dt_3d ) )
+             ENDIF
+          ENDIF
+          IF ( do_sum )  CALL flow_statistics
+
+!
+!--       Output of profiles
+          IF ( time_dopr >= dt_dopr )  THEN
+             IF ( dopr_n /= 0 )  CALL data_output_profiles
+             time_dopr = MOD( time_dopr, MAX( dt_dopr, dt_3d ) )
+             time_dopr_av = 0.0_wp    ! due to averaging (see above)
+          ENDIF
+
+!
+!--       Output of time series
+          IF ( time_dots >= dt_dots )  THEN
+             CALL data_output_tseries
+             time_dots = MOD( time_dots, MAX( dt_dots, dt_3d ) )
+          ENDIF
+
+!
+!--       2d-data output (cross-sections)
+          IF ( time_do2d_xy >= dt_do2d_xy )  THEN
+             CALL data_output_2d( 'xy', 0 )
+             time_do2d_xy = MOD( time_do2d_xy, MAX( dt_do2d_xy, dt_3d ) )
+          ENDIF
+
+!
+!--       3d-data output (volume data)
+          IF ( time_do3d >= dt_do3d )  THEN
+             CALL data_output_3d( 0 )
+             time_do3d = MOD( time_do3d, MAX( dt_do3d, dt_3d ) )
+          ENDIF
+
+
+       ENDIF
+
+!
+!--    Computation and output of run control parameters.
+!--    This is also done whenever perturbations have been imposed
+!        IF ( time_run_control >= dt_run_control  .OR.                           &
+!             timestep_scheme(1:5) /= 'runge'  .OR.  disturbance_created )       &
+!        THEN
+!           CALL run_control
+!           IF ( time_run_control >= dt_run_control )  THEN
+!              time_run_control = MOD( time_run_control,                         &
+!                                      MAX( dt_run_control, dt_3d ) )
+!           ENDIF
+!        ENDIF
+
+       CALL cpu_log( log_point_s(15), 'timesteps spinup', 'stop' )
+
+
+!
+!--    Run control output
+       IF ( myid == 0 )  THEN
+!
+!--       If necessary, write header
+          IF ( .NOT. run_control_header_spinup )  THEN
+             CALL check_open( 15 )
+             WRITE ( 15, 100 )
+             run_control_header_spinup = .TRUE.
+          ENDIF
+!
+!--       Write some general information about the spinup in run control file
+          WRITE ( 15, 101 )  current_timestep_number_spinup, simulated_time_chr, dt_3d, pt_spinup
+!
+!--       Write buffer contents to disc immediately
+          FLUSH( 15 )
+       ENDIF
+
+
+
+    ENDDO   ! time loop
+
+!
+!-- Write back saved arrays to the 3D arrays
+    pt   = pt_save
+    pt_p = pt_save
+    u    = u_save
+    v    = v_save
+
+!
+!-- Reset time step
+    dt_3d = dt_save
+
+    DEALLOCATE(pt_save)
+    DEALLOCATE(u_save)
+    DEALLOCATE(v_save)
+
+#if defined( __parallel )
+    IF ( nested_run )  CALL MPI_BARRIER( MPI_COMM_WORLD, ierr )
+#endif
+
+    CALL location_message( 'finished spinup-sequence', .TRUE. )
+
+
+!
+!-- Formats
+100 FORMAT (///'Spinup control output:'/  &
+            '--------------------------------'// &
+            'ITER.  HH:MM:SS    DT   PT(z_MO)'/   &
+            '--------------------------------')
+101 FORMAT (I5,2X,A9,1X,F6.2,3X,F6.2,2X,F6.2)
+
+ CONTAINS
+
+!
+!-- Returns the cosine of the solar zenith angle at a given time. This routine
+!-- is similar to that for calculation zenith (see radiation_model_mod.f90)
+    FUNCTION solar_angle( local_time ) 
+
+       USE basic_constants_and_equations_mod,                                  &
+       ONLY:  pi
+      
+       USE kinds
+
+       USE radiation_model_mod,                                                &
+           ONLY:  decl_1, decl_2, decl_3, lat, lon
+
+       IMPLICIT NONE 
+
+
+       REAL(wp) ::  solar_angle     !< cosine of the solar zenith angle
+
+       REAL(wp) ::  day             !< day of the year
+       REAL(wp) ::  declination     !< solar declination angle
+       REAL(wp) ::  hour_angle      !< solar hour angle
+       REAL(wp) ::  time_utc        !< current time in UTC
+       REAL(wp), INTENT(IN) :: local_time
+!
+!--    Calculate current day and time based on the initial values and simulation
+!--    time
+
+       day = day_of_year_init + INT(FLOOR( local_time / 86400.0_wp ), KIND=iwp)
+       time_utc = MOD(local_time, 86400.0_wp)
+
+
+!
+!--    Calculate solar declination and hour angle   
+       declination = ASIN( decl_1 * SIN(decl_2 * REAL(day, KIND=wp) - decl_3) )
+       hour_angle  = 2.0_wp * pi * (time_utc / 86400.0_wp) + lon - pi
+
+!
+!--    Calculate cosine of solar zenith angle
+       solar_angle = SIN(lat) * SIN(declination) + COS(lat) * COS(declination) &
+                     * COS(hour_angle)
+
+
+    END FUNCTION solar_angle
+
+
+ END SUBROUTINE time_integration_spinup
Index: /palm/tags/release-6.0/SOURCE/time_to_string.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/time_to_string.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/time_to_string.f90	(revision 3477)
@@ -0,0 +1,95 @@
+!> @file time_to_string.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1997/08/11 06:26:08  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Transforming the time from real to character-string hh:mm:ss
+!------------------------------------------------------------------------------!
+ FUNCTION time_to_string( time )
+ 
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=9) ::  time_to_string !< 
+
+    INTEGER(iwp)      ::  hours   !< 
+    INTEGER(iwp)      ::  minutes !< 
+    INTEGER(iwp)      ::  seconds !< 
+
+    REAL(wp)          ::  rest_time !< 
+    REAL(wp)          ::  time      !< 
+
+!
+!-- Calculate the number of hours, minutes, and seconds
+    hours     = INT( time / 3600.0_wp )
+    rest_time = time - hours * 3600_wp
+    minutes   = INT( rest_time / 60.0_wp )
+    seconds   = rest_time - minutes * 60
+
+!
+!-- Build the string
+    IF ( hours < 100 )  THEN
+       WRITE (time_to_string,'(I2.2,'':'',I2.2,'':'',I2.2)')  hours, minutes, &
+                                                              seconds
+    ELSE
+       WRITE (time_to_string,'(I3.3,'':'',I2.2,'':'',I2.2)')  hours, minutes, &
+                                                              seconds
+    ENDIF
+
+ END FUNCTION time_to_string
Index: /palm/tags/release-6.0/SOURCE/timestep.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/timestep.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/timestep.f90	(revision 3477)
@@ -0,0 +1,435 @@
+!> @file timestep.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Stokes drift is regarded in timestep calculation
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3120 2018-07-11 18:30:57Z gronemeier
+! Put ABS( km ) in computation of time step according to the diffusion criterion
+! 
+! 3084 2018-06-19 15:30:55Z gronemeier
+! limit increase of dt_3d only in case of RANS mode
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! limit dt_3d to be at maximum 2*old_dt; define old_dt at beginning of routine
+! Add km/kh_max
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2365 2017-08-21 14:59:59Z kanani
+! Vertical grid nesting: Sync fine and coarse grid timestep (SadiqHuq)
+! 
+! 2258 2017-06-08 07:55:13Z suehring
+! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
+!
+! 2168 2017-03-06 13:08:38Z suehring
+!
+! 2130 2017-01-24 16:25:39Z raasch
+! bugfix: in case of nested runs the stop condition in case of too small
+! timesteps is communicated to all parent/child processes,
+! some formatting done
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives and related part of code removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1849 2016-04-08 11:33:18Z hoffmann
+! Adapted for modularization of microphysics
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes due to new module structure of the plant canopy model:
+!   calculations and parameters related to the plant canopy model removed
+!   (the limitation of the canopy drag, i.e. that the canopy drag itself should
+!   not change the sign of the velocity components, is now assured for in the
+!   calculation of the canopy tendency terms in subroutine plant_canopy_model) 
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc porting
+! bugfix for calculation of advective timestep in case of vertically stretched
+! grids
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! timestep is reduced in two-moment cloud scheme according to the maximum 
+! terminal velocity of rain drops
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog scheme removed
+!
+! 978 2012-08-09 08:28:32Z fricke
+! restriction of the outflow damping layer in the diffusion criterion removed
+!
+! 866 2012-03-28 06:44:41Z raasch
+! bugfix for timestep calculation in case of Galilei transformation,
+! special treatment in case of mirror velocity boundary condition removed
+!
+! Revision 1.1  1997/08/11 06:26:19  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Compute the time step under consideration of the FCL and diffusion criterion.
+!------------------------------------------------------------------------------!
+ SUBROUTINE timestep
+ 
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzu, dzw, kh, km, u, u_stokes_zu, v, v_stokes_zu, w
+
+    USE control_parameters,                                                    &
+        ONLY:  cfl_factor, coupling_mode, dt_3d, dt_fixed, dt_max,             &
+               galilei_transformation, old_dt, message_string, rans_mode,      &
+               stop_dt, terminate_coupled, terminate_coupled_remote,           &
+               timestep_reason, u_gtrans, use_ug_for_galilei_tr, v_gtrans
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dx2, dy, dy2
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt
+
+    USE interfaces
+
+    USE kinds
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  dt_precipitation
+
+    USE pegrid
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+    USE statistics,                                                            &
+        ONLY:  flow_statistics_called, hom, u_max, u_max_ijk, v_max, v_max_ijk,&
+               w_max, w_max_ijk
+
+    USE vertical_nesting_mod,                                                  &
+        ONLY:  vnested, vnest_timestep_sync
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i !< 
+    INTEGER(iwp) ::  j !< 
+    INTEGER(iwp) ::  k !< 
+    INTEGER(iwp) ::  km_max_ijk(3) = -1  !< index values (i,j,k) of location where km_max occurs
+    INTEGER(iwp) ::  kh_max_ijk(3) = -1  !< index values (i,j,k) of location where kh_max occurs
+
+    LOGICAL ::  stop_dt_local !< local switch for controlling the time stepping
+
+    REAL(wp) ::  div               !< 
+    REAL(wp) ::  dt_diff           !< 
+    REAL(wp) ::  dt_diff_l         !< 
+    REAL(wp) ::  dt_u              !< 
+    REAL(wp) ::  dt_u_l            !< 
+    REAL(wp) ::  dt_v              !< 
+    REAL(wp) ::  dt_v_l            !< 
+    REAL(wp) ::  dt_w              !< 
+    REAL(wp) ::  dt_w_l            !< 
+    REAL(wp) ::  km_max            !< maximum of Km in entire domain
+    REAL(wp) ::  kh_max            !< maximum of Kh in entire domain
+    REAL(wp) ::  u_gtrans_l        !< 
+    REAL(wp) ::  v_gtrans_l        !< 
+ 
+    REAL(wp), DIMENSION(2)         ::  uv_gtrans   !< 
+    REAL(wp), DIMENSION(2)         ::  uv_gtrans_l !< 
+    REAL(wp), DIMENSION(3)         ::  reduce      !< 
+    REAL(wp), DIMENSION(3)         ::  reduce_l    !< 
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dxyz2_min   !<  
+
+
+    CALL cpu_log( log_point(12), 'calculate_timestep', 'start' )
+!
+!--    Save former time step as reference
+       old_dt = dt_3d
+
+!
+!-- In case of Galilei-transform not using the geostrophic wind as translation
+!-- velocity, compute the volume-averaged horizontal velocity components, which
+!-- will then be subtracted from the horizontal wind for the time step and
+!-- horizontal advection routines.
+    IF ( galilei_transformation  .AND. .NOT.  use_ug_for_galilei_tr )  THEN
+       IF ( flow_statistics_called )  THEN
+!
+!--       Horizontal averages already existent, just need to average them 
+!--       vertically.
+          u_gtrans = 0.0_wp
+          v_gtrans = 0.0_wp
+          DO  k = nzb+1, nzt
+             u_gtrans = u_gtrans + hom(k,1,1,0)
+             v_gtrans = v_gtrans + hom(k,1,2,0)
+          ENDDO
+          u_gtrans = u_gtrans / REAL( nzt - nzb, KIND=wp )
+          v_gtrans = v_gtrans / REAL( nzt - nzb, KIND=wp )
+       ELSE
+!
+!--       Averaging over the entire model domain.
+          u_gtrans_l = 0.0_wp
+          v_gtrans_l = 0.0_wp
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                DO  k = nzb+1, nzt
+                   u_gtrans_l = u_gtrans_l + u(k,j,i)
+                   v_gtrans_l = v_gtrans_l + v(k,j,i)
+                ENDDO
+             ENDDO
+          ENDDO
+          uv_gtrans_l(1) = u_gtrans_l /                                        &
+                           REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb), KIND=wp )
+          uv_gtrans_l(2) = v_gtrans_l /                                        &
+                           REAL( (nxr-nxl+1)*(nyn-nys+1)*(nzt-nzb), KIND=wp )
+#if defined( __parallel )
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( uv_gtrans_l, uv_gtrans, 2, MPI_REAL, MPI_SUM,    &
+                              comm2d, ierr )
+          u_gtrans = uv_gtrans(1) / REAL( numprocs, KIND=wp )
+          v_gtrans = uv_gtrans(2) / REAL( numprocs, KIND=wp )
+#else
+          u_gtrans = uv_gtrans_l(1)
+          v_gtrans = uv_gtrans_l(2)
+#endif
+       ENDIF
+    ENDIF
+
+!
+!-- Determine the maxima of the velocity components, including their
+!-- grid index positions.
+    CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, 'abs', 0.0_wp, &
+                         u_max, u_max_ijk )
+    CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, v, 'abs', 0.0_wp, &
+                         v_max, v_max_ijk )
+    CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, w, 'abs', 0.0_wp, &
+                         w_max, w_max_ijk )
+
+    IF ( .NOT. dt_fixed )  THEN
+!
+!--    Variable time step:
+!--    Calculate the maximum time step according to the CFL-criterion,
+!--    individually for each velocity component
+       dt_u_l = 999999.9_wp
+       dt_v_l = 999999.9_wp
+       dt_w_l = 999999.9_wp
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                dt_u_l = MIN( dt_u_l, ( dx     /                               &
+                                 ( ABS( u(k,j,i) - u_gtrans + u_stokes_zu(k) ) &
+                                   + 1.0E-10_wp ) ) )
+                dt_v_l = MIN( dt_v_l, ( dy     /                               &
+                                 ( ABS( v(k,j,i) - v_gtrans + v_stokes_zu(k) ) &
+                                   + 1.0E-10_wp ) ) )
+                dt_w_l = MIN( dt_w_l, ( dzu(k) /                               &
+                                 ( ABS( w(k,j,i) )            + 1.0E-10_wp ) ) )
+             ENDDO
+          ENDDO
+       ENDDO
+
+#if defined( __parallel )
+       reduce_l(1) = dt_u_l
+       reduce_l(2) = dt_v_l
+       reduce_l(3) = dt_w_l
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( reduce_l, reduce, 3, MPI_REAL, MPI_MIN, comm2d, ierr )
+       dt_u = reduce(1)
+       dt_v = reduce(2)
+       dt_w = reduce(3)
+#else
+       dt_u = dt_u_l
+       dt_v = dt_v_l
+       dt_w = dt_w_l
+#endif
+
+!
+!--    Compute time step according to the diffusion criterion.
+!--    First calculate minimum grid spacing which only depends on index k.
+!--    When using the dynamic subgrid model, negative km are possible.
+       dt_diff_l = 999999.0_wp
+
+       DO  k = nzb+1, nzt
+           dxyz2_min(k) = MIN( dx2, dy2, dzw(k)*dzw(k) ) * 0.125_wp
+       ENDDO
+
+       !$OMP PARALLEL private(i,j,k) reduction(MIN: dt_diff_l)
+       !$OMP DO
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                dt_diff_l = MIN( dt_diff_l, dxyz2_min(k) /                     &
+                                    ( MAX( kh(k,j,i), ABS( km(k,j,i) ) )       &
+                                      + 1E-20_wp ) )
+             ENDDO
+          ENDDO
+       ENDDO
+       !$OMP END PARALLEL
+#if defined( __parallel )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLREDUCE( dt_diff_l, dt_diff, 1, MPI_REAL, MPI_MIN, comm2d,   &
+                           ierr )
+#else
+       dt_diff = dt_diff_l
+#endif
+
+!
+!--    The time step is the minimum of the 3-4 components and the diffusion time
+!--    step minus a reduction (cfl_factor) to be on the safe side.
+!--    The time step must not exceed the maximum allowed value.
+       dt_3d = cfl_factor * MIN( dt_diff, dt_u, dt_v, dt_w, dt_precipitation )
+       dt_3d = MIN( dt_3d, dt_max )
+!
+!--    In RANS mode, the time step must not increase by more than a factor of 2
+       IF ( rans_mode )  dt_3d = MIN( dt_3d, dt_max, 2.0_wp * old_dt )
+
+!
+!--    Remember the restricting time step criterion for later output.
+       IF ( MIN( dt_u, dt_v, dt_w ) < dt_diff )  THEN
+          timestep_reason = 'A'
+       ELSE
+          timestep_reason = 'D'
+       ENDIF
+
+!
+!--    Set flag if the time step becomes too small.
+       IF ( dt_3d < ( 0.00001_wp * dt_max ) )  THEN
+          stop_dt = .TRUE.
+
+!
+!--       Determine the maxima of the diffusion coefficients, including their
+!--       grid index positions.
+          CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, km, 'abs',  &
+                               0.0_wp, km_max, km_max_ijk )
+          CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, kh, 'abs',  &
+                               0.0_wp, kh_max, kh_max_ijk )
+
+          WRITE( message_string, * ) 'Time step has reached minimum limit.',   &
+               '&dt              = ', dt_3d, ' s  Simulation is terminated.',  &
+               '&old_dt          = ', old_dt, ' s',                            &
+               '&dt_u            = ', dt_u, ' s',                              &
+               '&dt_v            = ', dt_v, ' s',                              &
+               '&dt_w            = ', dt_w, ' s',                              &
+               '&dt_diff         = ', dt_diff, ' s',                           &
+               '&u_max           = ', u_max, ' m/s    k=', u_max_ijk(1),       &
+               '  j=', u_max_ijk(2), '  i=', u_max_ijk(3),                     &
+               '&v_max           = ', v_max, ' m/s    k=', v_max_ijk(1),       &
+               '  j=', v_max_ijk(2), '  i=', v_max_ijk(3),                     &
+               '&w_max           = ', w_max, ' m/s    k=', w_max_ijk(1),       &
+               '  j=', w_max_ijk(2), '  i=', w_max_ijk(3),                     &
+               '&km_max          = ', km_max, ' m2/s2  k=', km_max_ijk(1),     &
+               '  j=', km_max_ijk(2), '  i=', km_max_ijk(3),                   &
+               '&kh_max          = ', kh_max, ' m2/s2  k=', kh_max_ijk(1),     &
+                '  j=', kh_max_ijk(2), '  i=', kh_max_ijk(3)
+          CALL message( 'timestep', 'PA0312', 0, 1, 0, 6, 0 )
+!
+!--       In case of coupled runs inform the remote model of the termination 
+!--       and its reason, provided the remote model has not already been 
+!--       informed of another termination reason (terminate_coupled > 0) before.
+#if defined( __parallel )
+          IF ( coupling_mode /= 'uncoupled' .AND. terminate_coupled == 0 )  THEN
+             terminate_coupled = 2
+             IF ( myid == 0 )  THEN
+                CALL MPI_SENDRECV( &
+                     terminate_coupled,        1, MPI_INTEGER, target_id,  0,  &
+                     terminate_coupled_remote, 1, MPI_INTEGER, target_id,  0,  &
+                     comm_inter, status, ierr )
+             ENDIF
+             CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0,      &
+                             comm2d, ierr)
+          ENDIF
+#endif
+       ENDIF
+
+!
+!--    In case of nested runs all parent/child processes have to terminate if
+!--    one process has set the stop flag, i.e. they need to set the stop flag
+!--    too.
+       IF ( nested_run )  THEN
+          stop_dt_local = stop_dt
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( stop_dt_local, stop_dt, 1, MPI_LOGICAL, MPI_LOR, &
+                              MPI_COMM_WORLD, ierr )
+#endif
+       ENDIF
+
+!
+!--    Ensure a smooth value (two significant digits) of the timestep.
+       div = 1000.0_wp
+       DO  WHILE ( dt_3d < div )
+          div = div / 10.0_wp
+       ENDDO
+       dt_3d = NINT( dt_3d * 100.0_wp / div ) * div / 100.0_wp
+
+    ENDIF
+
+!
+!-- Vertical nesting: coarse and fine grid timestep has to be identical    
+    IF ( vnested )  CALL vnest_timestep_sync
+
+    CALL cpu_log( log_point(12), 'calculate_timestep', 'stop' )
+
+ END SUBROUTINE timestep
Index: /palm/tags/release-6.0/SOURCE/timestep_scheme_steering.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/timestep_scheme_steering.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/timestep_scheme_steering.f90	(revision 3477)
@@ -0,0 +1,100 @@
+!> @file timestep_scheme_steering.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL constants defined as wp-kind
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1001 2012-09-13 14:08:46Z raasch
+! all actions concerning leapfrog scheme removed
+!
+! Revision 1.1  2004/01/28 15:34:47  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Depending on the timestep scheme set the steering factors for the prognostic
+!> equations.
+!------------------------------------------------------------------------------!
+ SUBROUTINE timestep_scheme_steering
+ 
+
+    USE control_parameters,                                                    &
+        ONLY:  intermediate_timestep_count, timestep_scheme, tsc
+
+    USE kinds
+
+    IMPLICIT NONE
+
+
+    IF ( timestep_scheme(1:5) == 'runge' )  THEN
+!
+!--    Runge-Kutta schemes (here the factors depend on the respective
+!--    intermediate step)
+       IF ( timestep_scheme == 'runge-kutta-2' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             tsc(1:5) = (/ 1.0_wp, 1.0_wp,  0.0_wp, 0.0_wp, 0.0_wp /)
+          ELSE
+             tsc(1:5) = (/ 1.0_wp, 0.5_wp, -0.5_wp, 0.0_wp, 1.0_wp /)
+          ENDIF
+       ELSE
+          IF ( intermediate_timestep_count == 1 )  THEN
+             tsc(1:5) = (/ 1.0_wp,  1.0_wp /  3.0_wp,           0.0_wp, 0.0_wp, 0.0_wp /)
+          ELSEIF ( intermediate_timestep_count == 2 )  THEN
+             tsc(1:5) = (/ 1.0_wp, 15.0_wp / 16.0_wp, -25.0_wp/48.0_wp, 0.0_wp, 0.0_wp /)
+          ELSE
+             tsc(1:5) = (/ 1.0_wp,  8.0_wp / 15.0_wp,   1.0_wp/15.0_wp, 0.0_wp, 1.0_wp /)
+          ENDIF          
+       ENDIF
+
+    ELSEIF ( timestep_scheme == 'euler' )  THEN
+!
+!--    Euler scheme
+       tsc(1:5) = (/ 1.0_wp, 1.0_wp, 0.0_wp, 0.0_wp, 1.0_wp /)
+
+    ENDIF
+
+
+ END SUBROUTINE timestep_scheme_steering
Index: /palm/tags/release-6.0/SOURCE/transpose.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/transpose.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/transpose.f90	(revision 3477)
@@ -0,0 +1,1040 @@
+!> @file transpose.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2119 2017-01-17 16:51:50Z raasch
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives removed
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1324 2014-03-21 09:13:16Z suehring
+! Bugfix: ONLY statement for module pegrid removed 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! cpu_log_nowait parameter added to cpu measurements of the transpositions
+! required for solving the Poisson equation (poisfft),
+! module interfaces removed
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! re-sorting of the transposed / to be transposed arrays moved to separate
+! routines resort_for_...
+!
+! 1111 2013-03-08 23:54:10Z raasch
+! openACC directives added,
+! resorting data from/to work changed, work got 4 dimensions instead of 1
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! preprocessor lines rearranged so that routines can also be used in serial
+! (non-parallel) mode
+!
+! 1092 2013-02-02 11:24:22Z raasch
+! unused variables removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 1003 2012-09-14 14:35:53Z raasch
+! indices nxa, nya, etc. replaced by nx, ny, etc.
+!
+! Revision 1.1  1997/07/24 11:25:18  raasch
+! Initial revision
+!
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resorting data for the transposition from x to y. The transposition itself
+!> is carried out in transpose_xy
+!------------------------------------------------------------------------------!
+ SUBROUTINE resort_for_xy( f_in, f_inv )
+ 
+
+     USE indices,                                                              &
+         ONLY:  nx
+
+     USE kinds
+
+     USE transpose_indices,                                                    &
+         ONLY:  nyn_x, nys_x, nzb_x, nzt_x
+
+     IMPLICIT NONE
+
+     REAL(wp) ::  f_in(0:nx,nys_x:nyn_x,nzb_x:nzt_x)  !< 
+     REAL(wp) ::  f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx) !< 
+
+
+     INTEGER(iwp) ::  i !< 
+     INTEGER(iwp) ::  j !< 
+     INTEGER(iwp) ::  k !< 
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    !$OMP  PARALLEL PRIVATE ( i, j, k )
+    !$OMP  DO
+     DO  i = 0, nx
+         DO  k = nzb_x, nzt_x
+             DO  j = nys_x, nyn_x
+                 f_inv(j,k,i) = f_in(i,j,k)
+             ENDDO
+         ENDDO
+     ENDDO
+     !$OMP  END PARALLEL
+
+ END SUBROUTINE resort_for_xy
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from x to y. For the input array, all
+!> elements along x reside on the same PE, while after transposition, all
+!> elements along y reside on the same PE.
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_xy( f_inv, f_out )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nx, ny
+        
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxr_y, nyn_x, nys_x, nzb_x, nzb_y, nzt_x, nzt_y
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  ys !< 
+ 
+    REAL(wp) ::  f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx) !< 
+    REAL(wp) ::  f_out(0:ny,nxl_y:nxr_y,nzb_y:nzt_y) !< 
+
+    REAL(wp), DIMENSION(nyn_x-nys_x+1,nzb_y:nzt_y,nxl_y:nxr_y,0:pdims(2)-1) ::  work !< 
+
+
+    IF ( numprocs /= 1 )  THEN
+
+#if defined( __parallel )
+!
+!--    Transpose array
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start', cpu_log_nowait )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( f_inv(nys_x,nzb_x,0),  sendrecvcount_xy, MPI_REAL, &
+                          work(1,nzb_y,nxl_y,0), sendrecvcount_xy, MPI_REAL, &
+                          comm1dy, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+
+!
+!--    Reorder transposed array
+!$OMP  PARALLEL PRIVATE ( i, j, k, l, ys )
+!$OMP  DO
+       DO  l = 0, pdims(2) - 1
+          ys = 0 + l * ( nyn_x - nys_x + 1 )
+          DO  i = nxl_y, nxr_y
+             DO  k = nzb_y, nzt_y
+                DO  j = ys, ys + nyn_x - nys_x
+                   f_out(j,i,k) = work(j-ys+1,k,i,l)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+#endif
+
+    ELSE
+
+!
+!--    Reorder transposed array
+!$OMP  PARALLEL PRIVATE ( i, j, k )
+!$OMP  DO
+       DO  k = nzb_y, nzt_y
+          DO  i = nxl_y, nxr_y
+             DO  j = 0, ny
+                f_out(j,i,k) = f_inv(j,k,i)
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+    ENDIF
+
+ END SUBROUTINE transpose_xy
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resorting data after the transposition from x to z. The transposition itself
+!> is carried out in transpose_xz
+!------------------------------------------------------------------------------!
+ SUBROUTINE resort_for_xz( f_inv, f_out )
+
+
+     USE indices,                                                              &
+         ONLY:  nxl, nxr, nyn, nys, nz
+
+     USE kinds
+
+     IMPLICIT NONE
+
+     REAL(wp) ::  f_inv(nys:nyn,nxl:nxr,1:nz) !< 
+     REAL(wp) ::  f_out(1:nz,nys:nyn,nxl:nxr) !< 
+
+     INTEGER(iwp) ::  i !< 
+     INTEGER(iwp) ::  j !< 
+     INTEGER(iwp) ::  k !< 
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous.
+!-- In case of parallel fft/transposition, scattered store is faster in
+!-- backward direction!!!
+    !$OMP  PARALLEL PRIVATE ( i, j, k )
+    !$OMP  DO
+     DO  k = 1, nz
+         DO  i = nxl, nxr
+             DO  j = nys, nyn
+                 f_out(k,j,i) = f_inv(j,i,k)
+             ENDDO
+         ENDDO
+     ENDDO
+     !$OMP  END PARALLEL
+
+ END SUBROUTINE resort_for_xz
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from x to z. For the input array, all
+!> elements along x reside on the same PE, while after transposition, all
+!> elements along z reside on the same PE.
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_xz( f_in, f_inv )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nnx, nx, nxl, nxr, nyn, nys, nz
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nyn_x, nys_x, nzb_x, nzt_x
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  xs !< 
+
+    REAL(wp) ::  f_in(0:nx,nys_x:nyn_x,nzb_x:nzt_x) !< 
+    REAL(wp) ::  f_inv(nys:nyn,nxl:nxr,1:nz) !< 
+
+    REAL(wp), DIMENSION(nys_x:nyn_x,nnx,nzb_x:nzt_x,0:pdims(1)-1) ::  work !< 
+
+
+!
+!-- If the PE grid is one-dimensional along y, the array has only to be
+!-- reordered locally and therefore no transposition has to be done.
+    IF ( pdims(1) /= 1 )  THEN
+
+#if defined( __parallel )
+!
+!--    Reorder input array for transposition
+!$OMP  PARALLEL PRIVATE ( i, j, k, l, xs )
+!$OMP  DO
+       DO  l = 0, pdims(1) - 1
+          xs = 0 + l * nnx
+          DO  k = nzb_x, nzt_x
+             DO  i = xs, xs + nnx - 1
+                DO  j = nys_x, nyn_x
+                   work(j,i-xs+1,k,l) = f_in(i,j,k)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+!
+!--    Transpose array
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start', cpu_log_nowait )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( work(nys_x,1,nzb_x,0), sendrecvcount_zx, MPI_REAL, &
+                          f_inv(nys,nxl,1),      sendrecvcount_zx, MPI_REAL, &
+                          comm1dx, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+    ELSE
+
+!
+!--    Reorder the array in a way that the z index is in first position
+!$OMP  PARALLEL PRIVATE ( i, j, k )
+!$OMP  DO
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = 1, nz
+                f_inv(j,i,k) = f_in(i,j,k)
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+    ENDIF
+
+ END SUBROUTINE transpose_xz
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resorting data after the transposition from y to x. The transposition itself
+!> is carried out in transpose_yx
+!------------------------------------------------------------------------------!
+ SUBROUTINE resort_for_yx( f_inv, f_out )
+
+
+     USE indices,                                                              &
+         ONLY:  nx
+
+     USE kinds
+
+     USE transpose_indices,                                                    &
+         ONLY:  nyn_x, nys_x, nzb_x, nzt_x
+
+     IMPLICIT NONE
+
+     REAL(wp) ::  f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx) !< 
+     REAL(wp) ::  f_out(0:nx,nys_x:nyn_x,nzb_x:nzt_x) !< 
+
+
+     INTEGER(iwp) ::  i !< 
+     INTEGER(iwp) ::  j !< 
+     INTEGER(iwp) ::  k !< 
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    !$OMP  PARALLEL PRIVATE ( i, j, k )
+    !$OMP  DO
+     DO  i = 0, nx
+         DO  k = nzb_x, nzt_x
+             DO  j = nys_x, nyn_x
+                 f_out(i,j,k) = f_inv(j,k,i)
+             ENDDO
+         ENDDO
+     ENDDO
+     !$OMP  END PARALLEL
+
+ END SUBROUTINE resort_for_yx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from y to x. For the input array, all
+!> elements along y reside on the same PE, while after transposition, all
+!> elements along x reside on the same PE.
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_yx( f_in, f_inv )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nx, ny
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxr_y, nyn_x, nys_x, nzb_x, nzb_y, nzt_x, nzt_y
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  ys !< 
+
+    REAL(wp) ::  f_in(0:ny,nxl_y:nxr_y,nzb_y:nzt_y)  !< 
+    REAL(wp) ::  f_inv(nys_x:nyn_x,nzb_x:nzt_x,0:nx) !< 
+
+    REAL(wp), DIMENSION(nyn_x-nys_x+1,nzb_y:nzt_y,nxl_y:nxr_y,0:pdims(2)-1) ::  work !< 
+
+
+    IF ( numprocs /= 1 )  THEN
+
+#if defined( __parallel )
+!
+!--    Reorder input array for transposition
+!$OMP  PARALLEL PRIVATE ( i, j, k, l, ys )
+!$OMP  DO
+       DO  l = 0, pdims(2) - 1
+          ys = 0 + l * ( nyn_x - nys_x + 1 )
+          DO  i = nxl_y, nxr_y
+             DO  k = nzb_y, nzt_y
+                DO  j = ys, ys + nyn_x - nys_x
+                   work(j-ys+1,k,i,l) = f_in(j,i,k)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+!
+!--    Transpose array
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start', cpu_log_nowait )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( work(1,nzb_y,nxl_y,0), sendrecvcount_xy, MPI_REAL, &
+                          f_inv(nys_x,nzb_x,0),  sendrecvcount_xy, MPI_REAL, &
+                          comm1dy, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+    ELSE
+
+!
+!--    Reorder array f_in the same way as ALLTOALL did it
+!$OMP  PARALLEL PRIVATE ( i, j, k )
+!$OMP  DO
+       DO  i = nxl_y, nxr_y
+          DO  k = nzb_y, nzt_y
+             DO  j = 0, ny
+                f_inv(j,k,i) = f_in(j,i,k)
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+    ENDIF
+
+ END SUBROUTINE transpose_yx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from y to x. For the input array, all
+!> elements along y reside on the same PE, while after transposition, all
+!> elements along x reside on the same PE.
+!> This is a direct transposition for arrays with indices in regular order
+!> (k,j,i) (cf. transpose_yx).
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_yxd( f_in, f_out )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nnx, nny, nnz, nx, nxl, nxr, nyn, nys, nz
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nyn_x, nys_x, nzb_x, nzt_x
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  m  !< 
+    INTEGER(iwp) ::  xs !< 
+
+    REAL(wp) ::  f_in(1:nz,nys:nyn,nxl:nxr)          !< 
+    REAL(wp) ::  f_inv(nxl:nxr,1:nz,nys:nyn)         !< 
+    REAL(wp) ::  f_out(0:nx,nys_x:nyn_x,nzb_x:nzt_x) !< 
+    REAL(wp) ::  work(nnx*nny*nnz)                   !< 
+#if defined( __parallel )
+
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    DO  k = 1, nz
+       DO  j = nys, nyn
+          DO  i = nxl, nxr
+             f_inv(i,k,j) = f_in(k,j,i)
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Transpose array
+    CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start' )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLTOALL( f_inv(nxl,1,nys), sendrecvcount_xy, MPI_REAL, &
+                       work(1),          sendrecvcount_xy, MPI_REAL, &
+                       comm1dx, ierr )
+    CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+
+!
+!-- Reorder transposed array
+    m = 0
+    DO  l = 0, pdims(1) - 1
+       xs = 0 + l * nnx
+       DO  j = nys_x, nyn_x
+          DO  k = 1, nz
+             DO  i = xs, xs + nnx - 1
+                m = m + 1
+                f_out(i,j,k) = work(m)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+#endif
+
+ END SUBROUTINE transpose_yxd
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resorting data for the transposition from y to z. The transposition itself
+!> is carried out in transpose_yz
+!------------------------------------------------------------------------------!
+ SUBROUTINE resort_for_yz( f_in, f_inv )
+
+
+     USE indices,                                                              &
+         ONLY:  ny
+
+     USE kinds
+
+     USE transpose_indices,                                                    &
+         ONLY:  nxl_y, nxr_y, nzb_y, nzt_y
+
+     IMPLICIT NONE
+
+     REAL(wp) ::  f_in(0:ny,nxl_y:nxr_y,nzb_y:nzt_y)  !< 
+     REAL(wp) ::  f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny) !< 
+
+     INTEGER(iwp) ::  i !< 
+     INTEGER(iwp) ::  j !< 
+     INTEGER(iwp) ::  k !< 
+
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    !$OMP  PARALLEL PRIVATE ( i, j, k )
+    !$OMP  DO
+     DO  j = 0, ny
+         DO  k = nzb_y, nzt_y
+             DO  i = nxl_y, nxr_y
+                 f_inv(i,k,j) = f_in(j,i,k)
+             ENDDO
+         ENDDO
+     ENDDO
+     !$OMP  END PARALLEL
+
+ END SUBROUTINE resort_for_yz
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from y to z. For the input array, all
+!> elements along y reside on the same PE, while after transposition, all
+!> elements along z reside on the same PE.
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_yz( f_inv, f_out )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  ny, nz
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxl_z, nxr_y, nxr_z, nyn_z, nys_z, nzb_y, nzt_y
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  zs !< 
+
+    REAL(wp) ::  f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny) !< 
+    REAL(wp) ::  f_out(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !< 
+
+    REAL(wp), DIMENSION(nxl_z:nxr_z,nzt_y-nzb_y+1,nys_z:nyn_z,0:pdims(1)-1) ::  work !< 
+
+
+!
+!-- If the PE grid is one-dimensional along y, only local reordering
+!-- of the data is necessary and no transposition has to be done.
+    IF ( pdims(1) == 1 )  THEN
+
+!$OMP  PARALLEL PRIVATE ( i, j, k )
+!$OMP  DO
+       DO  j = 0, ny
+          DO  k = nzb_y, nzt_y
+             DO  i = nxl_y, nxr_y
+                f_out(i,j,k) = f_inv(i,k,j)
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+    ELSE
+
+#if defined( __parallel )
+!
+!--    Transpose array
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start', cpu_log_nowait )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( f_inv(nxl_y,nzb_y,0),  sendrecvcount_yz, MPI_REAL, &
+                          work(nxl_z,1,nys_z,0), sendrecvcount_yz, MPI_REAL, &
+                          comm1dx, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+
+!
+!--    Reorder transposed array
+!$OMP  PARALLEL PRIVATE ( i, j, k, l, zs )
+!$OMP  DO
+       DO  l = 0, pdims(1) - 1
+          zs = 1 + l * ( nzt_y - nzb_y + 1 )
+          DO  j = nys_z, nyn_z
+             DO  k = zs, zs + nzt_y - nzb_y
+                DO  i = nxl_z, nxr_z
+                   f_out(i,j,k) = work(i,k-zs+1,j,l)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+#endif
+
+   ENDIF
+
+ END SUBROUTINE transpose_yz
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resorting data for the transposition from z to x. The transposition itself
+!> is carried out in transpose_zx
+!------------------------------------------------------------------------------!
+ SUBROUTINE resort_for_zx( f_in, f_inv )
+
+
+     USE indices,                                                              &
+         ONLY:  nxl, nxr, nyn, nys, nz
+
+     USE kinds
+
+     IMPLICIT NONE
+
+     REAL(wp) ::  f_in(1:nz,nys:nyn,nxl:nxr)  !< 
+     REAL(wp) ::  f_inv(nys:nyn,nxl:nxr,1:nz) !< 
+
+     INTEGER(iwp) ::  i !< 
+     INTEGER(iwp) ::  j !< 
+     INTEGER(iwp) ::  k !< 
+
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    !$OMP  PARALLEL PRIVATE ( i, j, k )
+    !$OMP  DO
+     DO  k = 1,nz
+         DO  i = nxl, nxr
+             DO  j = nys, nyn
+                 f_inv(j,i,k) = f_in(k,j,i)
+             ENDDO
+         ENDDO
+     ENDDO
+     !$OMP  END PARALLEL
+
+ END SUBROUTINE resort_for_zx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from z to x. For the input array, all
+!> elements along z reside on the same PE, while after transposition, all
+!> elements along x reside on the same PE.
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_zx( f_inv, f_out )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nnx, nx, nxl, nxr, nyn, nys, nz
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nyn_x, nys_x, nzb_x, nzt_x
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  xs !< 
+
+    REAL(wp) ::  f_inv(nys:nyn,nxl:nxr,1:nz)         !< 
+    REAL(wp) ::  f_out(0:nx,nys_x:nyn_x,nzb_x:nzt_x) !< 
+
+    REAL(wp), DIMENSION(nys_x:nyn_x,nnx,nzb_x:nzt_x,0:pdims(1)-1) ::  work !< 
+
+
+!
+!-- If the PE grid is one-dimensional along y, only local reordering
+!-- of the data is necessary and no transposition has to be done.
+    IF ( pdims(1) == 1 )  THEN
+
+!$OMP  PARALLEL PRIVATE ( i, j, k )
+!$OMP  DO
+       DO  k = 1, nz
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                f_out(i,j,k) = f_inv(j,i,k)
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+    ELSE
+
+#if defined( __parallel )
+!
+!--    Transpose array
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start', cpu_log_nowait )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( f_inv(nys,nxl,1),      sendrecvcount_zx, MPI_REAL, &
+                          work(nys_x,1,nzb_x,0), sendrecvcount_zx, MPI_REAL, &
+                          comm1dx, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+
+!
+!--    Reorder transposed array
+!$OMP  PARALLEL PRIVATE ( i, j, k, l, xs )
+!$OMP  DO
+       DO  l = 0, pdims(1) - 1
+          xs = 0 + l * nnx
+          DO  k = nzb_x, nzt_x
+             DO  i = xs, xs + nnx - 1
+                DO  j = nys_x, nyn_x
+                   f_out(i,j,k) = work(j,i-xs+1,k,l)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+#endif
+
+    ENDIF
+
+ END SUBROUTINE transpose_zx
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Resorting data after the transposition from z to y. The transposition itself
+!> is carried out in transpose_zy
+!------------------------------------------------------------------------------!
+ SUBROUTINE resort_for_zy( f_inv, f_out )
+
+
+     USE indices,                                                              &
+         ONLY:  ny
+
+     USE kinds
+
+     USE transpose_indices,                                                    &
+         ONLY:  nxl_y, nxr_y, nzb_y, nzt_y
+
+     IMPLICIT NONE
+
+     REAL(wp) ::  f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny) !< 
+     REAL(wp) ::  f_out(0:ny,nxl_y:nxr_y,nzb_y:nzt_y) !< 
+
+
+     INTEGER(iwp) ::  i !< 
+     INTEGER(iwp) ::  j !< 
+     INTEGER(iwp) ::  k !< 
+
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    !$OMP  PARALLEL PRIVATE ( i, j, k )
+    !$OMP  DO
+     DO  k = nzb_y, nzt_y
+         DO  j = 0, ny
+             DO  i = nxl_y, nxr_y
+                 f_out(j,i,k) = f_inv(i,k,j)
+             ENDDO
+         ENDDO
+     ENDDO
+     !$OMP  END PARALLEL
+
+ END SUBROUTINE resort_for_zy
+
+
+!------------------------------------------------------------------------------!
+! Description:cpu_log_nowait
+! ------------
+!> Transposition of input array (f_in) from z to y. For the input array, all
+!> elements along z reside on the same PE, while after transposition, all
+!> elements along y reside on the same PE.
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_zy( f_in, f_inv )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, cpu_log_nowait, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  ny, nz
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_y, nxl_z, nxr_y, nxr_z, nyn_z, nys_z, nzb_y, nzt_y
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  zs !< 
+
+    REAL(wp) ::  f_in(nxl_z:nxr_z,nys_z:nyn_z,1:nz)  !< 
+    REAL(wp) ::  f_inv(nxl_y:nxr_y,nzb_y:nzt_y,0:ny) !< 
+
+    REAL(wp), DIMENSION(nxl_z:nxr_z,nzt_y-nzb_y+1,nys_z:nyn_z,0:pdims(1)-1) ::  work !<
+
+!
+!-- If the PE grid is one-dimensional along y, the array has only to be
+!-- reordered locally and therefore no transposition has to be done.
+    IF ( pdims(1) /= 1 )  THEN
+
+#if defined( __parallel )
+!
+!--    Reorder input array for transposition
+!$OMP  PARALLEL PRIVATE ( i, j, k, l, zs )
+!$OMP  DO
+       DO  l = 0, pdims(1) - 1
+          zs = 1 + l * ( nzt_y - nzb_y + 1 )
+          DO  j = nys_z, nyn_z
+             DO  k = zs, zs + nzt_y - nzb_y
+                DO  i = nxl_z, nxr_z
+                   work(i,k-zs+1,j,l) = f_in(i,j,k)
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+!
+!--    Transpose array
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start', cpu_log_nowait )
+       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+       CALL MPI_ALLTOALL( work(nxl_z,1,nys_z,0), sendrecvcount_yz, MPI_REAL, &
+                          f_inv(nxl_y,nzb_y,0),  sendrecvcount_yz, MPI_REAL, &
+                          comm1dx, ierr )
+       CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+#endif
+
+    ELSE
+!
+!--    Reorder the array in the same way like ALLTOALL did it
+!$OMP  PARALLEL PRIVATE ( i, j, k )
+!$OMP  DO
+       DO  k = nzb_y, nzt_y
+          DO  j = 0, ny
+             DO  i = nxl_y, nxr_y
+                f_inv(i,k,j) = f_in(i,j,k)
+             ENDDO
+          ENDDO
+       ENDDO
+!$OMP  END PARALLEL
+
+    ENDIF
+
+ END SUBROUTINE transpose_zy
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Transposition of input array (f_in) from z to y. For the input array, all
+!> elements along z reside on the same PE, while after transposition, all
+!> elements along y reside on the same PE.
+!> This is a direct transposition for arrays with indices in regular order
+!> (k,j,i) (cf. transpose_zy).
+!------------------------------------------------------------------------------!
+ SUBROUTINE transpose_zyd( f_in, f_out )
+
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nnx, nny, nnz, nxl, nxr, nyn, nys, ny, nz
+
+    USE kinds
+
+    USE pegrid
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_yd, nxr_yd, nzb_yd, nzt_yd
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< 
+    INTEGER(iwp) ::  j  !< 
+    INTEGER(iwp) ::  k  !< 
+    INTEGER(iwp) ::  l  !< 
+    INTEGER(iwp) ::  m  !< 
+    INTEGER(iwp) ::  ys !< 
+
+    REAL(wp) ::  f_in(1:nz,nys:nyn,nxl:nxr)              !< 
+    REAL(wp) ::  f_inv(nys:nyn,nxl:nxr,1:nz)             !< 
+    REAL(wp) ::  f_out(0:ny,nxl_yd:nxr_yd,nzb_yd:nzt_yd) !< 
+    REAL(wp) ::  work(nnx*nny*nnz)                       !< 
+
+#if defined( __parallel )
+
+!
+!-- Rearrange indices of input array in order to make data to be send
+!-- by MPI contiguous
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = 1, nz
+             f_inv(j,i,k) = f_in(k,j,i)
+          ENDDO
+       ENDDO
+    ENDDO
+
+!
+!-- Move data to different array, because memory location of work1 is
+!-- needed further below (work1 = work2).
+!-- If the PE grid is one-dimensional along x, only local reordering
+!-- of the data is necessary and no transposition has to be done.
+    IF ( pdims(2) == 1 )  THEN
+       DO  k = 1, nz
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                f_out(j,i,k) = f_inv(j,i,k)
+             ENDDO
+          ENDDO
+       ENDDO
+       RETURN
+    ENDIF
+
+!
+!-- Transpose array
+    CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'start' )
+    IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+    CALL MPI_ALLTOALL( f_inv(nys,nxl,1), sendrecvcount_zyd, MPI_REAL, &
+                       work(1),          sendrecvcount_zyd, MPI_REAL, &
+                       comm1dy, ierr )
+    CALL cpu_log( log_point_s(32), 'mpi_alltoall', 'stop' )
+
+!
+!-- Reorder transposed array
+    m = 0
+    DO  l = 0, pdims(2) - 1
+       ys = 0 + l * nny
+       DO  k = nzb_yd, nzt_yd
+          DO  i = nxl_yd, nxr_yd
+             DO  j = ys, ys + nny - 1
+                m = m + 1
+                f_out(j,i,k) = work(m)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDDO
+
+#endif
+
+ END SUBROUTINE transpose_zyd
Index: /palm/tags/release-6.0/SOURCE/tridia_solver_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/tridia_solver_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/tridia_solver_mod.f90	(revision 3477)
@@ -0,0 +1,670 @@
+!> @file tridia_solver_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2119 2017-01-17 16:51:50Z raasch
+!
+! 2118 2017-01-17 16:38:49Z raasch
+! OpenACC directives removed
+! 
+! 2037 2016-10-26 11:15:40Z knoop
+! Anelastic approximation implemented
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+!
+! 1815 2016-04-06 13:49:59Z raasch
+! cpp-switch intel11 removed
+!
+! 1808 2016-04-05 19:44:00Z raasch
+! test output removed
+!
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1406 2014-05-16 13:47:01Z raasch
+! bugfix for pgi 14.4: declare create moved after array declaration
+! 
+! 1342 2014-03-26 17:04:47Z kanani
+! REAL constants defined as wp-kind
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1257 2013-11-08 15:18:40Z raasch
+! openacc loop and loop vector clauses removed, declare create moved after
+! the FORTRAN declaration statement
+!
+! 1221 2013-09-10 08:59:13Z raasch
+! dummy argument tri in 1d-routines replaced by tri_for_1d because of name
+! conflict with arry tri in module arrays_3d
+!
+! 1216 2013-08-26 09:31:42Z raasch
+! +tridia_substi_overlap for handling overlapping fft / transposition
+!
+! 1212 2013-08-15 08:46:27Z raasch
+! Initial revision.
+! Routines have been moved to seperate module from former file poisfft to here.
+! The tridiagonal matrix coefficients of array tri are calculated only once at
+! the beginning, i.e. routine split is called within tridia_init.
+!
+!
+! Description:
+! ------------
+!> solves the linear system of equations:
+!>
+!> -(4 pi^2(i^2/(dx^2*nnx^2)+j^2/(dy^2*nny^2))+
+!>   1/(dzu(k)*dzw(k))+1/(dzu(k-1)*dzw(k)))*p(i,j,k)+
+!> 1/(dzu(k)*dzw(k))*p(i,j,k+1)+1/(dzu(k-1)*dzw(k))*p(i,j,k-1)=d(i,j,k)
+!>
+!> by using the Thomas algorithm
+!------------------------------------------------------------------------------!
+ MODULE tridia_solver
+ 
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE indices,                                                               &
+        ONLY:  nx, ny, nz
+
+    USE kinds
+
+    USE transpose_indices,                                                     &
+        ONLY:  nxl_z, nyn_z, nxr_z, nys_z
+
+    IMPLICIT NONE
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddzuw !< 
+
+    PRIVATE
+
+    INTERFACE tridia_substi
+       MODULE PROCEDURE tridia_substi
+    END INTERFACE tridia_substi
+
+    INTERFACE tridia_substi_overlap
+       MODULE PROCEDURE tridia_substi_overlap
+    END INTERFACE tridia_substi_overlap
+
+    PUBLIC  tridia_substi, tridia_substi_overlap, tridia_init, tridia_1dd
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
+    SUBROUTINE tridia_init
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu_pres, ddzw, rho_air_zw
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  k !< 
+
+       ALLOCATE( ddzuw(0:nz-1,3) )
+
+       DO  k = 0, nz-1
+          ddzuw(k,1) = ddzu_pres(k+1) * ddzw(k+1) * rho_air_zw(k)
+          ddzuw(k,2) = ddzu_pres(k+2) * ddzw(k+1) * rho_air_zw(k+1)
+          ddzuw(k,3) = -1.0_wp * &
+                       ( ddzu_pres(k+2) * ddzw(k+1) * rho_air_zw(k+1) +        &
+                         ddzu_pres(k+1) * ddzw(k+1) * rho_air_zw(k) )
+       ENDDO
+!
+!--    Calculate constant coefficients of the tridiagonal matrix
+       CALL maketri
+       CALL split
+
+    END SUBROUTINE tridia_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computes the i- and j-dependent component of the matrix
+!> Provide the constant coefficients of the tridiagonal matrix for solution
+!> of the Poisson equation in Fourier space.
+!> The coefficients are computed following the method of
+!> Schmidt et al. (DFVLR-Mitteilung 84-15), which departs from Stephan
+!> Siano's original version by discretizing the Poisson equation,
+!> before it is Fourier-transformed.
+!------------------------------------------------------------------------------!
+    SUBROUTINE maketri
+
+
+          USE arrays_3d,                                                       &
+              ONLY:  tric, rho_air
+
+          USE control_parameters,                                              &
+              ONLY:  ibc_p_b, ibc_p_t
+
+          USE grid_variables,                                                  &
+              ONLY:  dx, dy
+
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i    !< 
+          INTEGER(iwp) ::  j    !< 
+          INTEGER(iwp) ::  k    !< 
+          INTEGER(iwp) ::  nnxh !< 
+          INTEGER(iwp) ::  nnyh !< 
+
+          REAL(wp)    ::  ll(nxl_z:nxr_z,nys_z:nyn_z) !< 
+
+
+          nnxh = ( nx + 1 ) / 2
+          nnyh = ( ny + 1 ) / 2
+
+          DO  j = nys_z, nyn_z
+             DO  i = nxl_z, nxr_z
+                IF ( j >= 0  .AND.  j <= nnyh )  THEN
+                   IF ( i >= 0  .AND.  i <= nnxh )  THEN
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * i ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                   ELSE
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( nx+1-i ) ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                   ENDIF
+                ELSE
+                   IF ( i >= 0  .AND.  i <= nnxh )  THEN
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * i ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( ny+1-j ) ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                   ELSE
+                      ll(i,j) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( nx+1-i ) ) / &
+                                            REAL( nx+1, KIND=wp ) ) ) / ( dx * dx ) + &
+                                2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( ny+1-j ) ) / &
+                                            REAL( ny+1, KIND=wp ) ) ) / ( dy * dy )
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+
+          DO  k = 0, nz-1
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+                   tric(i,j,k) = ddzuw(k,3) - ll(i,j) * rho_air(k+1)
+                ENDDO
+             ENDDO
+          ENDDO
+
+          IF ( ibc_p_b == 1 )  THEN
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+                   tric(i,j,0) = tric(i,j,0) + ddzuw(0,1)
+                ENDDO
+             ENDDO
+          ENDIF
+          IF ( ibc_p_t == 1 )  THEN
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+                   tric(i,j,nz-1) = tric(i,j,nz-1) + ddzuw(nz-1,2)
+                ENDDO
+             ENDDO
+          ENDIF
+
+    END SUBROUTINE maketri
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Substitution (Forward and Backward) (Thomas algorithm)
+!------------------------------------------------------------------------------!
+    SUBROUTINE tridia_substi( ar )
+
+
+          USE arrays_3d,                                                       & 
+              ONLY:  tri
+
+          USE control_parameters,                                              &
+              ONLY:  ibc_p_b, ibc_p_t
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  j !< 
+          INTEGER(iwp) ::  k !< 
+
+          REAL(wp)     ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !< 
+
+          REAL(wp), DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1)   ::  ar1 !< 
+
+!
+!--       Forward substitution
+          DO  k = 0, nz - 1
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+
+                   IF ( k == 0 )  THEN
+                      ar1(i,j,k) = ar(i,j,k+1)
+                   ELSE
+                      ar1(i,j,k) = ar(i,j,k+1) - tri(i,j,k,2) * ar1(i,j,k-1)
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Backward substitution
+!--       Note, the 1.0E-20 in the denominator is due to avoid divisions
+!--       by zero appearing if the pressure bc is set to neumann at the top of
+!--       the model domain.
+          DO  k = nz-1, 0, -1
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+
+                   IF ( k == nz-1 )  THEN
+                      ar(i,j,k+1) = ar1(i,j,k) / ( tri(i,j,k,1) + 1.0E-20_wp )
+                   ELSE
+                      ar(i,j,k+1) = ( ar1(i,j,k) - ddzuw(k,2) * ar(i,j,k+2) ) &
+                              / tri(i,j,k,1)
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Indices i=0, j=0 correspond to horizontally averaged pressure.
+!--       The respective values of ar should be zero at all k-levels if
+!--       acceleration of horizontally averaged vertical velocity is zero.
+          IF ( ibc_p_b == 1  .AND.  ibc_p_t == 1 )  THEN
+             IF ( nys_z == 0  .AND.  nxl_z == 0 )  THEN
+                DO  k = 1, nz
+                   ar(nxl_z,nys_z,k) = 0.0_wp
+                ENDDO
+             ENDIF
+          ENDIF
+
+    END SUBROUTINE tridia_substi
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Substitution (Forward and Backward) (Thomas algorithm)
+!------------------------------------------------------------------------------!
+    SUBROUTINE tridia_substi_overlap( ar, jj )
+
+
+          USE arrays_3d,                                                       &
+              ONLY:  tri
+
+          USE control_parameters,                                              &
+              ONLY:  ibc_p_b, ibc_p_t
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i  !< 
+          INTEGER(iwp) ::  j  !< 
+          INTEGER(iwp) ::  jj !< 
+          INTEGER(iwp) ::  k  !< 
+
+          REAL(wp)     ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !< 
+
+          REAL(wp), DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1) ::  ar1 !<
+
+!
+!--       Forward substitution
+          DO  k = 0, nz - 1
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+
+                   IF ( k == 0 )  THEN
+                      ar1(i,j,k) = ar(i,j,k+1)
+                   ELSE
+                      ar1(i,j,k) = ar(i,j,k+1) - tri(i,jj,k,2) * ar1(i,j,k-1)
+                   ENDIF
+
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Backward substitution
+!--       Note, the 1.0E-20 in the denominator is due to avoid divisions
+!--       by zero appearing if the pressure bc is set to neumann at the top of
+!--       the model domain.
+          DO  k = nz-1, 0, -1
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+
+                   IF ( k == nz-1 )  THEN
+                      ar(i,j,k+1) = ar1(i,j,k) / ( tri(i,jj,k,1) + 1.0E-20_wp )
+                   ELSE
+                      ar(i,j,k+1) = ( ar1(i,j,k) - ddzuw(k,2) * ar(i,j,k+2) ) &
+                              / tri(i,jj,k,1)
+                   ENDIF
+                ENDDO
+             ENDDO
+          ENDDO
+
+!
+!--       Indices i=0, j=0 correspond to horizontally averaged pressure.
+!--       The respective values of ar should be zero at all k-levels if
+!--       acceleration of horizontally averaged vertical velocity is zero.
+          IF ( ibc_p_b == 1  .AND.  ibc_p_t == 1 )  THEN
+             IF ( nys_z == 0  .AND.  nxl_z == 0 )  THEN
+                DO  k = 1, nz
+                   ar(nxl_z,nys_z,k) = 0.0_wp
+                ENDDO
+             ENDIF
+          ENDIF
+
+    END SUBROUTINE tridia_substi_overlap
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Splitting of the tridiagonal matrix (Thomas algorithm)
+!------------------------------------------------------------------------------!
+    SUBROUTINE split
+
+
+          USE arrays_3d,                                                       & 
+              ONLY:  tri, tric
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  j !< 
+          INTEGER(iwp) ::  k !< 
+!
+!--       Splitting
+          DO  j = nys_z, nyn_z
+             DO  i = nxl_z, nxr_z
+                tri(i,j,0,1) = tric(i,j,0)
+             ENDDO
+          ENDDO
+
+          DO  k = 1, nz-1
+             DO  j = nys_z, nyn_z
+                DO  i = nxl_z, nxr_z
+                   tri(i,j,k,2) = ddzuw(k,1) / tri(i,j,k-1,1)
+                   tri(i,j,k,1) = tric(i,j,k) - ddzuw(k-1,2) * tri(i,j,k,2)
+                ENDDO
+             ENDDO
+          ENDDO
+
+    END SUBROUTINE split
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Solves the linear system of equations for a 1d-decomposition along x (see
+!> tridia)
+!>
+!> @attention when using the intel compilers older than 12.0, array tri must
+!>            be passed as an argument to the contained subroutines. Otherwise
+!>            addres faults will occur. This feature can be activated with
+!>            cpp-switch __intel11
+!>            On NEC, tri should not be passed (except for routine substi_1dd)
+!>            because this causes very bad performance.
+!------------------------------------------------------------------------------!
+ 
+    SUBROUTINE tridia_1dd( ddx2, ddy2, nx, ny, j, ar, tri_for_1d )
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu_pres, ddzw, rho_air, rho_air_zw
+
+       USE control_parameters,                                                 &
+           ONLY:  ibc_p_b, ibc_p_t
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i                  !< 
+       INTEGER(iwp) ::  j                  !< 
+       INTEGER(iwp) ::  k                  !< 
+       INTEGER(iwp) ::  nnyh               !< 
+       INTEGER(iwp) ::  nx                 !< 
+       INTEGER(iwp) ::  ny                 !< 
+
+       REAL(wp)     ::  ddx2 !< 
+       REAL(wp)     ::  ddy2 !< 
+
+       REAL(wp), DIMENSION(0:nx,1:nz)     ::  ar         !< 
+       REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !< 
+
+
+       nnyh = ( ny + 1 ) / 2
+
+!
+!--    Define constant elements of the tridiagonal matrix.
+!--    The compiler on SX6 does loop exchange. If 0:nx is a high power of 2,
+!--    the exchanged loops create bank conflicts. The following directive
+!--    prohibits loop exchange and the loops perform much better.
+!CDIR NOLOOPCHG
+       DO  k = 0, nz-1
+          DO  i = 0,nx
+             tri_for_1d(2,i,k) = ddzu_pres(k+1) * ddzw(k+1) * rho_air_zw(k)
+             tri_for_1d(3,i,k) = ddzu_pres(k+2) * ddzw(k+1) * rho_air_zw(k+1)
+          ENDDO
+       ENDDO
+
+       IF ( j <= nnyh )  THEN
+          CALL maketri_1dd( j )
+       ELSE
+          CALL maketri_1dd( ny+1-j )
+       ENDIF
+
+       CALL split_1dd
+       CALL substi_1dd( ar, tri_for_1d )
+
+    CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> computes the i- and j-dependent component of the matrix
+!------------------------------------------------------------------------------!
+       SUBROUTINE maketri_1dd( j )
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i    !< 
+          INTEGER(iwp) ::  j    !< 
+          INTEGER(iwp) ::  k    !< 
+          INTEGER(iwp) ::  nnxh !< 
+
+          REAL(wp)     ::  a !< 
+          REAL(wp)     ::  c !< 
+
+          REAL(wp), DIMENSION(0:nx) ::  l !< 
+
+
+          nnxh = ( nx + 1 ) / 2
+!
+!--       Provide the tridiagonal matrix for solution of the Poisson equation in
+!--       Fourier space. The coefficients are computed following the method of
+!--       Schmidt et al. (DFVLR-Mitteilung 84-15), which departs from Stephan
+!--       Siano's original version by discretizing the Poisson equation,
+!--       before it is Fourier-transformed
+          DO  i = 0, nx
+             IF ( i >= 0 .AND. i <= nnxh ) THEN
+                l(i) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * i ) / &
+                                   REAL( nx+1, KIND=wp ) ) ) * ddx2 + &
+                       2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                   REAL( ny+1, KIND=wp ) ) ) * ddy2
+             ELSE
+                l(i) = 2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * ( nx+1-i ) ) / &
+                                   REAL( nx+1, KIND=wp ) ) ) * ddx2 + &
+                       2.0_wp * ( 1.0_wp - COS( ( 2.0_wp * pi * j ) / &
+                                   REAL( ny+1, KIND=wp ) ) ) * ddy2
+             ENDIF
+          ENDDO
+
+          DO  k = 0, nz-1
+             DO  i = 0, nx
+                a = -1.0_wp * ddzu_pres(k+2) * ddzw(k+1) * rho_air_zw(k+1)
+                c = -1.0_wp * ddzu_pres(k+1) * ddzw(k+1) * rho_air_zw(k)
+                tri_for_1d(1,i,k) = a + c - l(i) * rho_air(k+1)
+             ENDDO
+          ENDDO
+          IF ( ibc_p_b == 1 )  THEN
+             DO  i = 0, nx
+                tri_for_1d(1,i,0) = tri_for_1d(1,i,0) + tri_for_1d(2,i,0)
+             ENDDO
+          ENDIF
+          IF ( ibc_p_t == 1 )  THEN
+             DO  i = 0, nx
+                tri_for_1d(1,i,nz-1) = tri_for_1d(1,i,nz-1) + tri_for_1d(3,i,nz-1)
+             ENDDO
+          ENDIF
+
+       END SUBROUTINE maketri_1dd
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Splitting of the tridiagonal matrix (Thomas algorithm)
+!------------------------------------------------------------------------------!
+       SUBROUTINE split_1dd
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  k !< 
+
+
+!
+!--       Splitting
+          DO  i = 0, nx
+             tri_for_1d(4,i,0) = tri_for_1d(1,i,0)
+          ENDDO
+          DO  k = 1, nz-1
+             DO  i = 0, nx
+                tri_for_1d(5,i,k) = tri_for_1d(2,i,k) / tri_for_1d(4,i,k-1)
+                tri_for_1d(4,i,k) = tri_for_1d(1,i,k) - tri_for_1d(3,i,k-1) * tri_for_1d(5,i,k)
+             ENDDO
+          ENDDO
+
+       END SUBROUTINE split_1dd
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Substitution (Forward and Backward) (Thomas algorithm)
+!------------------------------------------------------------------------------!
+       SUBROUTINE substi_1dd( ar, tri_for_1d )
+
+
+          IMPLICIT NONE
+
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  k !< 
+
+          REAL(wp), DIMENSION(0:nx,nz)       ::  ar         !< 
+          REAL(wp), DIMENSION(0:nx,0:nz-1)   ::  ar1        !< 
+          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !< 
+
+!
+!--       Forward substitution
+          DO  i = 0, nx
+             ar1(i,0) = ar(i,1)
+          ENDDO
+          DO  k = 1, nz-1
+             DO  i = 0, nx
+                ar1(i,k) = ar(i,k+1) - tri_for_1d(5,i,k) * ar1(i,k-1)
+             ENDDO
+          ENDDO
+
+!
+!--       Backward substitution
+!--       Note, the add of 1.0E-20 in the denominator is due to avoid divisions
+!--       by zero appearing if the pressure bc is set to neumann at the top of
+!--       the model domain.
+          DO  i = 0, nx
+             ar(i,nz) = ar1(i,nz-1) / ( tri_for_1d(4,i,nz-1) + 1.0E-20_wp )
+          ENDDO
+          DO  k = nz-2, 0, -1
+             DO  i = 0, nx
+                ar(i,k+1) = ( ar1(i,k) - tri_for_1d(3,i,k) * ar(i,k+2) ) &
+                            / tri_for_1d(4,i,k)
+             ENDDO
+          ENDDO
+
+!
+!--       Indices i=0, j=0 correspond to horizontally averaged pressure.
+!--       The respective values of ar should be zero at all k-levels if
+!--       acceleration of horizontally averaged vertical velocity is zero.
+          IF ( ibc_p_b == 1  .AND.  ibc_p_t == 1 )  THEN
+             IF ( j == 0 )  THEN
+                DO  k = 1, nz
+                   ar(0,k) = 0.0_wp
+                ENDDO
+             ENDIF
+          ENDIF
+
+       END SUBROUTINE substi_1dd
+
+    END SUBROUTINE tridia_1dd
+
+
+ END MODULE tridia_solver
Index: /palm/tags/release-6.0/SOURCE/turbulence_closure_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/turbulence_closure_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/turbulence_closure_mod.f90	(revision 3477)
@@ -0,0 +1,5049 @@
+!> @file turbulence_closure_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Added support for buildings in the dynamic SGS model
+! 
+! 3398 2018-10-22 19:30:24Z knoop
+! Refactored production_e and production_e_ij (removed code redundancy)
+! 
+! 3386 2018-10-19 16:28:22Z gronemeier
+! Renamed tcm_prognostic to tcm_prognostic_equations
+! 
+! 3385 2018-10-19 14:52:29Z knoop
+! Restructured loops and ifs in production_e to ease vectorization on GPUs
+! 
+! 3300 2018-10-02 14:16:54Z gronemeier
+! - removed global array wall_flags_0_global, hence reduced accuracy of l_wall
+!   calculation
+! - removed maxloc call as this produced different results for different
+!   compiler options
+! 
+! 3294 2018-10-01 02:37:10Z raasch
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3245 2018-09-13 14:08:16Z knoop
+! unused variables removed, shortest_distance has wp now
+! 
+! 3183 2018-07-27 14:25:55Z suehring
+! Rename variables and remove unused variable from USE statement
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Use MOST for km only in RANS mode
+! 
+! 3130 2018-07-16 11:08:55Z gronemeier
+! - move boundary condition of km and kh to tcm_diffusivities
+! - calculate km at boundaries according to MOST
+! - move phi_m to surface_layer_fluxes_mod
+! 
+! 3129 2018-07-16 07:45:13Z gronemeier
+! - move limitation of diss to boundary_conds
+! - move boundary conditions for e and diss to boundary_conds
+! - consider non-default surfaces in tcm_diffusivities
+! - use z_mo within surface layer instead of calculating it
+! - resort output after case select -> reduced code duplication
+! - when using rans_tke_e and 1d-model, do not use e1d, km1d and diss1d
+! 
+! 3121 2018-07-11 18:46:49Z gronemeier
+! - created the function phi_m
+! - implemented km = u* * kappa * zp / phi_m in production_e_init for all
+!   surfaces
+! 
+! 3120 2018-07-11 18:30:57Z gronemeier
+! - changed tcm_diffusivities to tcm_diffusivities_default
+! - created subroutine tcm_diffusivities that calls tcm_diffusivities_default
+!   and tcm_diffusivities_dynamic
+! 
+! 3086 2018-06-25 09:08:04Z gronemeier
+! bugfix: set rans_const_sigma(1) = 1.3
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! - set limits of diss at the end of prognostic equations
+! - call production_e to calculate production term of diss
+! - limit change of diss to -90% to +100%
+! - remove factor 0.5 from diffusion_diss_ij
+! - rename c_m into c_0, and c_h into c_4
+! - add rans_const_c and rans_const_sigma as namelist parameters
+! - add calculation of mixing length for profile output in case of rans_tke_e
+! - changed format of annotations to comply with doxygen standards
+! - calculate and save dissipation rate during rans_tke_l mode
+! - set bc at vertical walls for e, diss, km, kh
+! - bugfix: set l_wall = 0.0 within buildings
+! - set l_wall at bottom and top boundary (rans-mode)
+! - bugfix in production term for dissipation rate
+! - bugfix in diffusion of dissipation rate
+! - disable check for 1D model if rans_tke_e is used
+! - bugfixes for initialization (rans-mode):
+!    - correction of dissipation-rate formula
+!    - calculate km based on l_wall
+!    - initialize diss if 1D model is not used
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Bugfix: nzb_do and nzt_do were not used for 3d data output
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Further allocation checks implemented
+! 
+! 2938 2018-03-27 15:52:42Z suehring
+! Further todo's
+! 
+! 2936 2018-03-27 14:49:27Z gronemeier
+! - defined l_grid only within this module
+! - Moved l_wall definition from modules.f90
+! - Get level of highest topography, used to limit upward distance calculation
+! - Consider cyclic boundary conditions for mixing length calculation
+! - Moved copy of wall_flags into subarray to subroutine
+! - Implemented l_wall calculation in case of RANS simulation
+! - Moved init of l_black to tcm_init_mixing_length
+! - Moved init_mixing_length from init_grid.f90 and
+!   renamed it to tcm_init_mixing_length
+! 
+! 2764 2018-01-22 09:25:36Z gronemeier
+! Bugfix: remove duplicate SAVE statements
+! 
+! 2746 2018-01-15 12:06:04Z suehring
+! Move flag plant canopy to modules
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2701 2017-12-15 15:40:50Z suehring
+! Changes from last commit documented
+! 
+! 2698 2017-12-14 18:46:24Z suehring
+! Bugfix in get_topography_top_index
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Initial revision
+!
+! 
+! 
+!
+! Authors:
+! --------
+! @author Tobias Gronemeier
+! @author Hauke Wurps
+!
+! Description:
+! ------------
+!> This module contains the available turbulence closures for PALM.
+!>
+!>
+!> @todo test initialization for all possibilities
+!>       add OpenMP directives whereever possible
+!>       remove debug output variables (dummy1, dummy2, dummy3)
+!> @todo Check for random disturbances
+!> @note <Enter notes on the module>
+!------------------------------------------------------------------------------!
+ MODULE turbulence_closure_mod
+ 
+
+#if defined( __nopointer )
+    USE arrays_3d,                                                             &
+        ONLY:  diss, diss_p, dzu, e, e_p, kh, km,                              &
+               mean_inflow_profiles, prho, pt, tdiss_m, te_m, tend, u, v, vpt, w
+#else
+    USE arrays_3d,                                                             &
+        ONLY:  diss, diss_1, diss_2, diss_3, diss_p, dzu, e, e_1, e_2, e_3,    &
+               e_p, kh, km, mean_inflow_profiles, prho, pt, tdiss_m,           &
+               te_m, tend, u, v, vpt, w
+#endif
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  g, kappa, lv_d_cp, lv_d_rd, rd_d_rv
+
+    USE control_parameters,                                                    &
+        ONLY:  constant_diffusion, dt_3d, e_init, humidity,                    &
+               initializing_actions, intermediate_timestep_count,              &
+               intermediate_timestep_count_max, km_constant,                   &
+               les_dynamic, les_mw, ocean_mode, plant_canopy, prandtl_number,  &
+               pt_reference, rans_mode, rans_tke_e, rans_tke_l,                &
+               simulated_time,timestep_scheme, turbulence_closure,             &
+               turbulent_inflow, use_upstream_for_tke, vpt_reference,          &
+               ws_scheme_sca, current_timestep_number
+
+    USE advec_ws,                                                              &
+        ONLY:  advec_s_ws
+
+    USE advec_s_bc_mod,                                                        &
+        ONLY:  advec_s_bc
+
+    USE advec_s_pw_mod,                                                        &
+        ONLY:  advec_s_pw
+
+    USE advec_s_up_mod,                                                        &
+        ONLY:  advec_s_up
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzt,     &
+               wall_flags_0
+
+    USE kinds
+
+    USE ocean_mod,                                                             &
+        ONLY:  prho_reference
+
+    USE pegrid
+
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pcm_tendency
+
+    USE statistics,                                                            &
+        ONLY:  hom, hom_sum, statistic_regions
+
+    USE user_actions_mod,                                                      &
+        ONLY:  user_actions
+
+
+    IMPLICIT NONE
+
+
+    REAL(wp) ::  c_0                !< constant used for diffusion coefficient and dissipation (dependent on mode RANS/LES)
+    REAL(wp) ::  c_1                !< model constant for RANS mode
+    REAL(wp) ::  c_2                !< model constant for RANS mode
+    REAL(wp) ::  c_3                !< model constant for RANS mode
+    REAL(wp) ::  c_4                !< model constant for RANS mode
+    REAL(wp) ::  l_max              !< maximum length scale for Blackadar mixing length
+    REAL(wp) ::  dsig_e = 1.0_wp    !< factor to calculate Ke from Km (1/sigma_e)
+    REAL(wp) ::  dsig_diss = 1.0_wp !< factor to calculate K_diss from Km (1/sigma_diss)
+
+    REAL(wp), DIMENSION(0:4) :: rans_const_c = &       !< model constants for RANS mode (namelist param)
+       (/ 0.55_wp, 1.44_wp, 1.92_wp, 1.44_wp, 0.0_wp /) !> default values fit for standard-tke-e closure
+
+    REAL(wp), DIMENSION(2) :: rans_const_sigma = &     !< model constants for RANS mode, sigma values (sigma_e, sigma_diss) (namelist param)
+       (/ 1.0_wp, 1.30_wp /)
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l_black    !< mixing length according to Blackadar
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  l_grid     !< geometric mean of grid sizes dx, dy, dz 
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  l_wall !< near-wall mixing length
+
+    !> @todo remove debug variables
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, TARGET :: &
+       diss_prod1, diss_adve1, diss_diff1, &
+       diss_prod2, diss_adve2, diss_diff2, &
+       diss_prod3, diss_adve3, diss_diff3, &
+       dummy1, dummy2, dummy3
+
+
+    PUBLIC c_0, rans_const_c, rans_const_sigma
+
+!
+!-- PALM interfaces:
+!-- Input parameter checks to be done in check_parameters
+    INTERFACE tcm_check_parameters
+       MODULE PROCEDURE tcm_check_parameters
+    END INTERFACE tcm_check_parameters
+
+!
+!-- Data output checks for 2D/3D data to be done in check_parameters
+    INTERFACE tcm_check_data_output
+       MODULE PROCEDURE tcm_check_data_output
+    END INTERFACE tcm_check_data_output
+
+!
+!-- Definition of data output quantities
+    INTERFACE tcm_define_netcdf_grid
+       MODULE PROCEDURE tcm_define_netcdf_grid
+    END INTERFACE tcm_define_netcdf_grid
+
+!
+!-- Averaging of 3D data for output
+    INTERFACE tcm_3d_data_averaging
+       MODULE PROCEDURE tcm_3d_data_averaging
+    END INTERFACE tcm_3d_data_averaging
+
+!
+!-- Data output of 2D quantities
+    INTERFACE tcm_data_output_2d
+       MODULE PROCEDURE tcm_data_output_2d
+    END INTERFACE tcm_data_output_2d
+
+!
+!-- Data output of 3D data
+    INTERFACE tcm_data_output_3d
+       MODULE PROCEDURE tcm_data_output_3d
+    END INTERFACE tcm_data_output_3d
+
+!
+!-- Initialization actions  
+    INTERFACE tcm_init
+       MODULE PROCEDURE tcm_init
+    END INTERFACE tcm_init
+
+!
+!-- Initialization of arrays
+    INTERFACE tcm_init_arrays
+       MODULE PROCEDURE tcm_init_arrays
+    END INTERFACE tcm_init_arrays
+
+!
+!-- Initialization of TKE production term
+    INTERFACE production_e_init
+       MODULE PROCEDURE production_e_init
+    END INTERFACE production_e_init
+
+!
+!-- Prognostic equations for TKE and TKE dissipation rate
+    INTERFACE tcm_prognostic_equations
+       MODULE PROCEDURE tcm_prognostic_equations
+       MODULE PROCEDURE tcm_prognostic_equations_ij
+    END INTERFACE tcm_prognostic_equations
+
+!
+!-- Production term for TKE
+    INTERFACE production_e
+       MODULE PROCEDURE production_e
+       MODULE PROCEDURE production_e_ij
+    END INTERFACE production_e
+
+!
+!-- Diffusion term for TKE
+    INTERFACE diffusion_e
+       MODULE PROCEDURE diffusion_e
+       MODULE PROCEDURE diffusion_e_ij
+    END INTERFACE diffusion_e
+
+!
+!-- Diffusion term for TKE dissipation rate
+    INTERFACE diffusion_diss
+       MODULE PROCEDURE diffusion_diss
+       MODULE PROCEDURE diffusion_diss_ij
+    END INTERFACE diffusion_diss
+
+!
+!-- Mixing length for LES case
+    INTERFACE mixing_length_les
+       MODULE PROCEDURE mixing_length_les
+    END INTERFACE mixing_length_les
+
+!
+!-- Mixing length for RANS case
+    INTERFACE mixing_length_rans
+       MODULE PROCEDURE mixing_length_rans
+    END INTERFACE mixing_length_rans
+
+!
+!-- Call tcm_diffusivities_default and tcm_diffusivities_dynamic
+    INTERFACE tcm_diffusivities
+       MODULE PROCEDURE tcm_diffusivities
+    END INTERFACE tcm_diffusivities
+
+!
+!-- Calculate diffusivities
+    INTERFACE tcm_diffusivities_default
+       MODULE PROCEDURE tcm_diffusivities_default
+    END INTERFACE tcm_diffusivities_default
+
+!
+!-- Calculate diffusivities according to dynamic sgs model
+    INTERFACE tcm_diffusivities_dynamic
+       MODULE PROCEDURE tcm_diffusivities_dynamic
+    END INTERFACE tcm_diffusivities_dynamic
+
+!
+!-- Box-filter method for dynamic sgs model
+    INTERFACE tcm_box_filter_2d
+       MODULE PROCEDURE tcm_box_filter_2d_single
+       MODULE PROCEDURE tcm_box_filter_2d_array
+    END INTERFACE tcm_box_filter_2d
+
+!
+!-- Swapping of time levels (required for prognostic variables)
+    INTERFACE tcm_swap_timelevel
+       MODULE PROCEDURE tcm_swap_timelevel
+    END INTERFACE tcm_swap_timelevel
+
+    SAVE
+
+    PRIVATE
+!
+!-- Add INTERFACES that must be available to other modules (alphabetical order)
+    PUBLIC production_e_init, tcm_3d_data_averaging, tcm_check_data_output,    &
+           tcm_check_parameters, tcm_data_output_2d, tcm_data_output_3d,       &
+           tcm_define_netcdf_grid, tcm_diffusivities, tcm_init,                &
+           tcm_init_arrays, tcm_prognostic_equations, tcm_swap_timelevel
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for turbulence closure module.
+!> @todo remove rans_mode from initialization namelist and rework checks
+!>   The way it is implemented at the moment, the user has to set two variables
+!>   so that the RANS mode is working. It would be better if only one parameter
+!>   has to be set.
+!>   2018-06-18, gronemeier
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_check_parameters
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string, turbulent_inflow, turbulent_outflow
+
+    IMPLICIT NONE
+
+!
+!-- Define which turbulence closure is going to be used
+    IF ( rans_mode )  THEN
+
+!
+!--    Assign values to constants for RANS mode
+       dsig_e    = 1.0_wp / rans_const_sigma(1)
+       dsig_diss = 1.0_wp / rans_const_sigma(2)
+
+       c_0 = rans_const_c(0)
+       c_1 = rans_const_c(1)
+       c_2 = rans_const_c(2)
+       c_3 = rans_const_c(3)   !> @todo clarify how to switch between different models
+       c_4 = rans_const_c(4)
+
+       SELECT CASE ( TRIM( turbulence_closure ) )
+
+          CASE ( 'TKE-l' )
+             rans_tke_l = .TRUE.
+
+          CASE ( 'TKE-e' )
+             rans_tke_e = .TRUE.
+
+          CASE DEFAULT
+             message_string = 'Unknown turbulence closure: ' //                &
+                              TRIM( turbulence_closure )
+             CALL message( 'tcm_check_parameters', 'PA0500', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+       IF ( turbulent_inflow .OR. turbulent_outflow )  THEN
+          message_string = 'turbulent inflow/outflow is not yet '//            &
+                           'implemented for RANS mode'
+          CALL message( 'tcm_check_parameters', 'PA0501', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       message_string = 'RANS mode is still in development! ' //               &
+                        '&Not all features of PALM are yet compatible '//      &
+                        'with RANS mode. &Use at own risk!'
+       CALL message( 'tcm_check_parameters', 'PA0502', 0, 1, 0, 6, 0 )
+
+    ELSE
+
+       c_0 = 0.1_wp !according to Lilly (1967) and Deardorff (1980)
+
+       dsig_e = 1.0_wp !assure to use K_m to calculate TKE instead 
+                       !of K_e which is used in RANS mode
+
+       SELECT CASE ( TRIM( turbulence_closure ) )
+
+          CASE ( 'Moeng_Wyngaard' )
+             les_mw = .TRUE.
+
+          CASE ( 'dynamic' )
+             les_dynamic = .TRUE.
+
+          CASE DEFAULT
+             !> @todo rework this part so that only one call of this error exists
+             message_string = 'Unknown turbulence closure: ' //                &
+                              TRIM( turbulence_closure )
+             CALL message( 'tcm_check_parameters', 'PA0500', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+    ENDIF
+
+ END SUBROUTINE tcm_check_parameters
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_check_data_output( var, unit )
+ 
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit     !< unit of output variable
+    CHARACTER (LEN=*) ::  var      !< name of output variable
+
+
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'diss' )
+          unit = 'm2/s3'
+
+       CASE ( 'diss1', 'diss2',                         &                      !> @todo remove later
+              'diss_prod1', 'diss_adve1', 'diss_diff1', &
+              'diss_prod2', 'diss_adve2', 'diss_diff2', &
+              'diss_prod3', 'diss_adve3', 'diss_diff3', 'dummy3'  )
+          unit = 'debug output'
+
+       CASE ( 'kh', 'km' )
+          unit = 'm2/s'
+
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+ END SUBROUTINE tcm_check_data_output
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_x   !< x grid of output variable
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_y   !< y grid of output variable
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_z   !< z grid of output variable
+    CHARACTER (LEN=*), INTENT(IN)  ::  var      !< name of output variable
+
+    LOGICAL, INTENT(OUT) ::  found   !< flag if output variable is found
+
+    found  = .TRUE.
+
+!
+!-- Check for the grid
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'diss', 'diss_xy', 'diss_xz', 'diss_yz' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'
+
+       CASE ( 'diss1', 'diss2',                         &                       !> @todo remove later
+              'diss_prod1', 'diss_adve1', 'diss_diff1', &
+              'diss_prod2', 'diss_adve2', 'diss_diff2', &
+              'diss_prod3', 'diss_adve3', 'diss_diff3', 'dummy3' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'
+
+       CASE ( 'kh', 'kh_xy', 'kh_xz', 'kh_yz' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'
+
+       CASE ( 'km', 'km_xy', 'km_xz', 'km_yz' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu'
+
+       CASE DEFAULT
+          found  = .FALSE.
+          grid_x = 'none'
+          grid_y = 'none'
+          grid_z = 'none'
+
+    END SELECT
+
+ END SUBROUTINE tcm_define_netcdf_grid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Average 3D data.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_3d_data_averaging( mode, variable )
+ 
+
+    USE averaging,                                                             &
+        ONLY:  diss_av, kh_av, km_av
+
+    USE control_parameters,                                                    &
+        ONLY:  average_count_3d
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode       !< flag defining mode 'allocate', 'sum' or 'average'
+    CHARACTER (LEN=*) ::  variable   !< name of variable
+
+    INTEGER(iwp) ::  i   !< loop index
+    INTEGER(iwp) ::  j   !< loop index
+    INTEGER(iwp) ::  k   !< loop index
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'diss' )
+             IF ( .NOT. ALLOCATED( diss_av ) )  THEN
+                ALLOCATE( diss_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             diss_av = 0.0_wp
+
+          CASE ( 'kh' )
+             IF ( .NOT. ALLOCATED( kh_av ) )  THEN
+                ALLOCATE( kh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             kh_av = 0.0_wp
+
+          CASE ( 'km' )
+             IF ( .NOT. ALLOCATED( km_av ) )  THEN
+                ALLOCATE( km_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             km_av = 0.0_wp
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'diss' )
+             IF ( ALLOCATED( diss_av ) ) THEN             
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         diss_av(k,j,i) = diss_av(k,j,i) + diss(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'kh' )
+             IF ( ALLOCATED( kh_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         kh_av(k,j,i) = kh_av(k,j,i) + kh(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'km' )
+             IF ( ALLOCATED( km_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         km_av(k,j,i) = km_av(k,j,i) + km(k,j,i)
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'diss' )
+             IF ( ALLOCATED( diss_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         diss_av(k,j,i) = diss_av(k,j,i)                       & 
+                                        / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'kh' )
+             IF ( ALLOCATED( kh_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         kh_av(k,j,i) = kh_av(k,j,i)                           & 
+                                        / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+          CASE ( 'km' )
+             IF ( ALLOCATED( km_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb, nzt+1
+                         km_av(k,j,i) = km_av(k,j,i)                           & 
+                                        / REAL( average_count_3d, KIND=wp )
+                      ENDDO
+                   ENDDO
+                ENDDO
+             ENDIF
+
+       END SELECT
+
+    ENDIF
+
+ END SUBROUTINE tcm_3d_data_averaging
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define 2D output variables.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_data_output_2d( av, variable, found, grid, mode, local_pf,     &
+                                nzb_do, nzt_do )
+ 
+    USE averaging,                                                             &
+        ONLY:  diss_av, kh_av, km_av
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid       !< name of vertical grid
+    CHARACTER (LEN=*) ::  mode       !< either 'xy', 'xz' or 'yz'
+    CHARACTER (LEN=*) ::  variable   !< name of variable
+
+    INTEGER(iwp) ::  av        !< flag for (non-)average output
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+    INTEGER(iwp) ::  i         !< loop index
+    INTEGER(iwp) ::  j         !< loop index
+    INTEGER(iwp) ::  k         !< loop index
+    INTEGER(iwp) ::  nzb_do    !< vertical output index (bottom)
+    INTEGER(iwp) ::  nzt_do    !< vertical output index (top)
+
+    LOGICAL ::  found   !< flag if output variable is found
+    LOGICAL ::  resorted  !< flag if output is already resorted
+
+    REAL(wp) ::  fill_value = -999.0_wp  !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< local
+       !< array to which output data is resorted to
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to selected output variable
+    
+    found = .TRUE.
+    resorted = .FALSE.
+!
+!-- Set masking flag for topography for not resorted arrays
+    flag_nr = 0
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'diss_xy', 'diss_xz', 'diss_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss
+          ELSE
+             IF ( .NOT. ALLOCATED( diss_av ) ) THEN
+                ALLOCATE( diss_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                diss_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => diss_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'kh_xy', 'kh_xz', 'kh_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => kh
+          ELSE
+             IF ( .NOT. ALLOCATED( kh_av ) ) THEN
+                ALLOCATE( kh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                kh_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => kh_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE ( 'km_xy', 'km_xz', 'km_yz' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => km
+          ELSE
+             IF ( .NOT. ALLOCATED( km_av ) ) THEN
+                ALLOCATE( km_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                km_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => km_av
+          ENDIF
+          IF ( mode == 'xy' ) grid = 'zu'
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+
+    IF ( found .AND. .NOT. resorted )  THEN
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb_do, nzt_do
+                local_pf(i,j,k) = MERGE( to_be_resorted(k,j,i),                &
+                                         REAL( fill_value, KIND = wp ),        &
+                                         BTEST( wall_flags_0(k,j,i), flag_nr ) ) 
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+ 
+ END SUBROUTINE tcm_data_output_2d
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Define 3D output variables.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+ 
+
+    USE averaging,                                                             &
+        ONLY:  diss_av, kh_av, km_av
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable   !< name of variable
+
+    INTEGER(iwp) ::  av        !< flag for (non-)average output
+    INTEGER(iwp) ::  flag_nr   !< number of masking flag
+    INTEGER(iwp) ::  i         !< loop index
+    INTEGER(iwp) ::  j         !< loop index
+    INTEGER(iwp) ::  k         !< loop index
+    INTEGER(iwp) ::  nzb_do    !< lower limit of the data output (usually 0)
+    INTEGER(iwp) ::  nzt_do    !< vertical upper limit of the data output (usually nz_do3d)
+
+    LOGICAL ::  found     !< flag if output variable is found
+    LOGICAL ::  resorted  !< flag if output is already resorted
+
+    REAL(wp) ::  fill_value = -999.0_wp  !< value for the _FillValue attribute
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf   !< local
+       !< array to which output data is resorted to
+
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  to_be_resorted  !< points to selected output variable
+
+    found = .TRUE.
+    resorted = .FALSE.
+!
+!-- Set masking flag for topography for not resorted arrays
+    flag_nr = 0
+
+    SELECT CASE ( TRIM( variable ) )
+
+       CASE ( 'diss' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss
+          ELSE
+             IF ( .NOT. ALLOCATED( diss_av ) ) THEN
+                ALLOCATE( diss_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                diss_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => diss_av
+          ENDIF
+
+       CASE ( 'kh' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => kh
+          ELSE
+             IF ( .NOT. ALLOCATED( kh_av ) ) THEN
+                ALLOCATE( kh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                kh_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => kh_av
+          ENDIF
+
+       CASE ( 'km' )
+          IF ( av == 0 )  THEN
+             to_be_resorted => km
+          ELSE
+             IF ( .NOT. ALLOCATED( km_av ) ) THEN
+                ALLOCATE( km_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+                km_av = REAL( fill_value, KIND = wp )
+             ENDIF
+             to_be_resorted => km_av
+          ENDIF
+
+       CASE ( 'dummy3' )                                                        !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => dummy3
+          ENDIF
+
+       CASE ( 'diss1' )                                                         !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => dummy1
+          ENDIF
+
+       CASE ( 'diss2' )                                                         !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => dummy2
+          ENDIF
+
+       CASE ( 'diss_prod1' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_prod1
+          ENDIF
+
+       CASE ( 'diss_adve1' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_adve1
+          ENDIF
+
+       CASE ( 'diss_diff1' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_diff1
+          ENDIF
+
+       CASE ( 'diss_prod2' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_prod2
+          ENDIF
+
+       CASE ( 'diss_adve2' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_adve2
+          ENDIF
+
+       CASE ( 'diss_diff2' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_diff2
+          ENDIF
+
+       CASE ( 'diss_prod3' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_prod3
+          ENDIF
+
+       CASE ( 'diss_adve3' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_adve3
+          ENDIF
+
+       CASE ( 'diss_diff3' )                                                    !> @todo remove later
+          IF ( av == 0 )  THEN
+             to_be_resorted => diss_diff3
+          ENDIF
+          
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+    IF ( found .AND. .NOT. resorted )  THEN
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb_do, nzt_do
+                local_pf(i,j,k) = MERGE(                                 &
+                                   to_be_resorted(k,j,i),                &
+                                   REAL( fill_value, KIND = wp ),        &
+                                   BTEST( wall_flags_0(k,j,i), flag_nr ) )
+             ENDDO
+          ENDDO
+       ENDDO
+       resorted = .TRUE.
+    ENDIF
+
+ END SUBROUTINE tcm_data_output_3d
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate arrays and assign pointers.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_init_arrays
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  collision_turbulence
+
+    USE particle_attributes,                                                   &
+        ONLY:  use_sgs_for_particles, wang_kernel
+
+    USE pmc_interface,                                                         &
+        ONLY:  nested_run
+
+    IMPLICIT NONE
+
+    ALLOCATE( kh(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( km(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+    ALLOCATE( dummy1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )                           !> @todo remove later
+    ALLOCATE( dummy2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( dummy3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_adve1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_adve2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_adve3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_prod1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_prod2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_prod3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_diff1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_diff2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( diss_diff3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    dummy1 = 0.0_wp
+    dummy2 = 0.0_wp
+    dummy3 = 0.0_wp
+    diss_adve1 = 0.0_wp
+    diss_adve2 = 0.0_wp
+    diss_adve3 = 0.0_wp
+    diss_prod1 = 0.0_wp
+    diss_prod2 = 0.0_wp
+    diss_prod3 = 0.0_wp
+    diss_diff1 = 0.0_wp
+    diss_diff2 = 0.0_wp
+    diss_diff3 = 0.0_wp
+
+#if defined( __nopointer )
+    ALLOCATE( e(nzb:nzt+1,nysg:nyng,nxlg:nxrg)    )
+    ALLOCATE( e_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  )
+    ALLOCATE( te_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+#else
+    ALLOCATE( e_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( e_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+    ALLOCATE( e_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+#endif
+!
+!-- Allocate arrays required for dissipation. 
+!-- Please note, if it is a nested run, arrays need to be allocated even if
+!-- they do not necessarily need to be transferred, which is attributed to 
+!-- the design of the model coupler which allocates memory for each variable. 
+    IF ( rans_mode  .OR.  use_sgs_for_particles  .OR.  wang_kernel  .OR.       &
+         collision_turbulence  .OR.  nested_run )  THEN
+#if defined( __nopointer )
+       ALLOCATE( diss(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       IF ( rans_tke_e )  THEN
+          ALLOCATE( diss_p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  )
+          ALLOCATE( tdiss_m(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ENDIF
+#else
+       ALLOCATE( diss_1(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       IF ( rans_tke_e  .OR.  nested_run )  THEN
+          ALLOCATE( diss_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+          ALLOCATE( diss_3(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ENDIF
+#endif
+    ENDIF
+
+#if ! defined( __nopointer )
+!
+!-- Initial assignment of pointers
+    e  => e_1;   e_p  => e_2;   te_m  => e_3
+
+    IF ( rans_mode  .OR.  use_sgs_for_particles  .OR.     &
+         wang_kernel  .OR.  collision_turbulence  .OR.  nested_run )  THEN
+       diss => diss_1
+       IF ( rans_tke_e  .OR.  nested_run )  THEN
+       diss_p => diss_2; tdiss_m => diss_3
+       ENDIF
+    ENDIF
+#endif
+
+ END SUBROUTINE tcm_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of turbulence closure module.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_init
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_dirichlet_l, complex_terrain, topography
+
+    USE model_1d_mod,                                                          &
+        ONLY:  e1d, kh1d, km1d
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i            !< loop index
+    INTEGER(iwp) :: j            !< loop index
+    INTEGER(iwp) :: k            !< loop index
+    INTEGER(iwp) :: nz_s_shift   !< lower shift index for scalars
+    INTEGER(iwp) :: nz_s_shift_l !< local lower shift index in case of turbulent inflow
+
+!
+!-- Initialize mixing length
+    CALL tcm_init_mixing_length
+    dummy3 = l_wall                 !> @todo remove later
+
+!
+!-- Actions for initial runs
+    IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.            &
+         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+
+       IF ( INDEX( initializing_actions, 'set_1d-model_profiles' ) /= 0 )  THEN
+
+          IF ( .NOT. rans_tke_e ) THEN
+!
+!--          Transfer initial profiles to the arrays of the 3D model
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   e(:,j,i)  = e1d
+                   kh(:,j,i) = kh1d
+                   km(:,j,i) = km1d
+                ENDDO
+             ENDDO
+
+             IF ( constant_diffusion )  THEN
+                e = 0.0_wp
+             ENDIF
+
+          ELSE
+!
+!--          In case of TKE-e closure in RANS mode, do not use e, diss, and km
+!--          profiles from 1D model. Instead, initialize with constant profiles
+             IF ( constant_diffusion )  THEN
+                km = km_constant
+                kh = km / prandtl_number
+                e  = 0.0_wp
+             ELSEIF ( e_init > 0.0_wp )  THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      DO  k = nzb+1, nzt
+                         km(k,j,i) = c_0 * l_wall(k,j,i) * SQRT( e_init )
+                      ENDDO
+                   ENDDO
+                ENDDO
+                km(nzb,:,:)   = km(nzb+1,:,:)
+                km(nzt+1,:,:) = km(nzt,:,:)
+                kh = km / prandtl_number
+                e  = e_init
+             ELSE
+                IF ( .NOT. ocean_mode )  THEN
+                   kh   = 0.01_wp   ! there must exist an initial diffusion, because 
+                   km   = 0.01_wp   ! otherwise no TKE would be produced by the
+                                     ! production terms, as long as not yet
+                                     ! e = (u*/cm)**2 at k=nzb+1
+                ELSE
+                   kh   = 0.00001_wp
+                   km   = 0.00001_wp
+                ENDIF
+                e    = 0.0_wp
+             ENDIF
+
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, nzt
+                      diss(k,j,i) = c_0**4 * e(k,j,i)**2 / km(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+             diss(nzb,:,:) = diss(nzb+1,:,:)
+             diss(nzt+1,:,:) = diss(nzt,:,:)
+
+          ENDIF
+
+       ELSEIF ( INDEX(initializing_actions, 'set_constant_profiles') /= 0 .OR. &
+                INDEX( initializing_actions, 'inifor' ) /= 0 )  THEN
+
+          IF ( constant_diffusion )  THEN
+             km = km_constant
+             kh = km / prandtl_number
+             e  = 0.0_wp
+          ELSEIF ( e_init > 0.0_wp )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, nzt
+                      km(k,j,i) = c_0 * l_wall(k,j,i) * SQRT( e_init )
+                   ENDDO
+                ENDDO
+             ENDDO
+             km(nzb,:,:)   = km(nzb+1,:,:)
+             km(nzt+1,:,:) = km(nzt,:,:)
+             kh = km / prandtl_number
+             e  = e_init
+          ELSE
+             IF ( .NOT. ocean_mode )  THEN
+                kh   = 0.01_wp   ! there must exist an initial diffusion, because 
+                km   = 0.01_wp   ! otherwise no TKE would be produced by the
+                                 ! production terms, as long as not yet
+                                 ! e = (u*/cm)**2 at k=nzb+1
+             ELSE
+                kh   = 0.00001_wp
+                km   = 0.00001_wp
+             ENDIF
+             e    = 0.0_wp
+          ENDIF
+
+          IF ( rans_tke_e )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, nzt
+                      diss(k,j,i) = c_0**4 * e(k,j,i)**2 / km(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+             diss(nzb,:,:) = diss(nzb+1,:,:)
+             diss(nzt+1,:,:) = diss(nzt,:,:)
+          ENDIF
+
+       ENDIF
+!
+!--    Store initial profiles for output purposes etc.
+       hom(:,1,23,:) = SPREAD( km(:,nys,nxl), 2, statistic_regions+1 )
+       hom(:,1,24,:) = SPREAD( kh(:,nys,nxl), 2, statistic_regions+1 )
+!
+!--    Initialize old and new time levels.
+       te_m = 0.0_wp
+       e_p = e
+       IF ( rans_tke_e )  THEN
+          tdiss_m = 0.0_wp
+          diss_p = diss
+       ENDIF
+
+    ELSEIF ( TRIM( initializing_actions ) == 'read_restart_data'  .OR.         &
+             TRIM( initializing_actions ) == 'cyclic_fill' )                   &
+    THEN
+
+!
+!--    In case of complex terrain and cyclic fill method as initialization,
+!--    shift initial data in the vertical direction for each point in the 
+!--    x-y-plane depending on local surface height
+       IF ( complex_terrain  .AND.                                             &
+            TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                nz_s_shift = get_topography_top_index_ji( j, i, 's' )
+
+                e(nz_s_shift:nzt+1,j,i)  =  e(0:nzt+1-nz_s_shift,j,i)
+                km(nz_s_shift:nzt+1,j,i) = km(0:nzt+1-nz_s_shift,j,i)
+                kh(nz_s_shift:nzt+1,j,i) = kh(0:nzt+1-nz_s_shift,j,i)
+             ENDDO
+          ENDDO
+          IF ( rans_tke_e )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   nz_s_shift = get_topography_top_index_ji( j, i, 's' )
+
+                   diss(nz_s_shift:nzt+1,j,i) = diss(0:nzt+1-nz_s_shift,j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+!
+!--    Initialization of the turbulence recycling method
+       IF ( TRIM( initializing_actions ) == 'cyclic_fill'  .AND.               &
+            turbulent_inflow )  THEN
+          mean_inflow_profiles(:,5) = hom_sum(:,8,0)   ! e
+!
+!--       In case of complex terrain, determine vertical displacement at inflow 
+!--       boundary and adjust mean inflow profiles
+          IF ( complex_terrain )  THEN
+             IF ( nxlg <= 0 .AND. nxrg >= 0 .AND.  &
+                  nysg <= 0 .AND. nyng >= 0        )  THEN
+                nz_s_shift_l = get_topography_top_index_ji( 0, 0, 's' )
+             ELSE
+                nz_s_shift_l = 0
+             ENDIF
+#if defined( __parallel )
+             CALL MPI_ALLREDUCE(nz_s_shift_l, nz_s_shift, 1, MPI_INTEGER,      &
+                                MPI_MAX, comm2d, ierr)
+#else
+             nz_s_shift = nz_s_shift_l
+#endif
+             mean_inflow_profiles(nz_s_shift:nzt+1,5) =  &
+                hom_sum(0:nzt+1-nz_s_shift,8,0)  ! e
+          ENDIF
+!
+!--       Use these mean profiles at the inflow (provided that Dirichlet
+!--       conditions are used)
+          IF ( bc_dirichlet_l )  THEN
+             DO  j = nysg, nyng
+                DO  k = nzb, nzt+1
+                   e(k,j,nxlg:-1)  = mean_inflow_profiles(k,5)
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+!
+!--    Inside buildings set TKE back to zero
+       IF ( TRIM( initializing_actions ) == 'cyclic_fill' .AND.                &
+            topography /= 'flat' )  THEN
+!
+!--       Inside buildings set TKE back to zero.
+!--       Other scalars (km, kh,...) are ignored at present,
+!--       maybe revise later.
+          DO  i = nxlg, nxrg
+             DO  j = nysg, nyng
+                DO  k = nzb, nzt
+                   e(k,j,i)     = MERGE( e(k,j,i), 0.0_wp,                     &
+                                         BTEST( wall_flags_0(k,j,i), 0 ) )
+                ENDDO
+             ENDDO
+          ENDDO
+
+          IF ( rans_tke_e )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb, nzt
+                      diss(k,j,i)    = MERGE( diss(k,j,i), 0.0_wp,             &
+                                              BTEST( wall_flags_0(k,j,i), 0 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+!
+!--    Initialize new time levels (only done in order to set boundary values
+!--    including ghost points)
+       e_p = e
+!
+!--    Allthough tendency arrays are set in prognostic_equations, they have
+!--    to be predefined here because there they are used (but multiplied with 0)
+!--    before they are set.
+       te_m = 0.0_wp
+
+       IF ( rans_tke_e )  THEN
+          diss_p = diss
+          tdiss_m = 0.0_wp
+       ENDIF
+
+    ENDIF
+
+ END SUBROUTINE tcm_init
+
+
+! Description:
+! -----------------------------------------------------------------------------!
+!> Pre-computation of grid-dependent and near-wall mixing length.
+!> @todo consider walls in horizontal direction at a distance further than a
+!>       single grid point (RANS mode)
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_init_mixing_length
+
+    USE arrays_3d,                                                             &
+        ONLY:  dzw, ug, vg, zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_lr_cyc, bc_ns_cyc, f, message_string, wall_adjustment_factor
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb,  &
+               nzt, wall_flags_0
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: dist_dx        !< found distance devided by dx
+    INTEGER(iwp) :: i              !< index variable along x
+    INTEGER(iwp) :: ii             !< index variable along x
+    INTEGER(iwp) :: j              !< index variable along y
+    INTEGER(iwp) :: k              !< index variable along z
+    INTEGER(iwp) :: k_max_topo = 0 !< index of maximum topography height
+    INTEGER(iwp) :: kk             !< index variable along z
+    INTEGER(iwp) :: rad_i          !< search radius in grid points along x
+    INTEGER(iwp) :: rad_i_l        !< possible search radius to the left
+    INTEGER(iwp) :: rad_i_r        !< possible search radius to the right
+    INTEGER(iwp) :: rad_j          !< search radius in grid points along y
+    INTEGER(iwp) :: rad_j_n        !< possible search radius to north
+    INTEGER(iwp) :: rad_j_s        !< possible search radius to south
+    INTEGER(iwp) :: rad_k          !< search radius in grid points along z
+    INTEGER(iwp) :: rad_k_b        !< search radius in grid points along negative z
+    INTEGER(iwp) :: rad_k_t        !< search radius in grid points along positive z
+
+    INTEGER(KIND=1), DIMENSION(:,:), ALLOCATABLE :: vic_yz !< contains a quarter of a single yz-slice of vicinity
+
+    INTEGER(KIND=1), DIMENSION(:,:,:), ALLOCATABLE :: vicinity !< contains topography information of the vicinity of (i/j/k)
+
+    INTEGER(iwp), DIMENSION(:,:,:), ALLOCATABLE :: wall_flags_dummy    !< dummy array required for MPI_ALLREDUCE command
+
+    REAL(wp) :: radius           !< search radius in meter
+
+    ALLOCATE( l_grid(1:nzt) )
+    ALLOCATE( l_wall(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!
+!-- Initialize the mixing length in case of an LES-simulation
+    IF ( .NOT. rans_mode )  THEN
+!
+!--    Compute the grid-dependent mixing length.
+       DO  k = 1, nzt
+          l_grid(k)  = ( dx * dy * dzw(k) )**0.33333333333333_wp
+       ENDDO
+!
+!--    Initialize near-wall mixing length l_wall only in the vertical direction
+!--    for the moment, multiplication with wall_adjustment_factor further below
+       l_wall(nzb,:,:)   = l_grid(1)
+       DO  k = nzb+1, nzt
+          l_wall(k,:,:)  = l_grid(k)
+       ENDDO
+       l_wall(nzt+1,:,:) = l_grid(nzt)
+
+       DO  k = 1, nzt
+          IF ( l_grid(k) > 1.5_wp * dx * wall_adjustment_factor .OR.            &
+               l_grid(k) > 1.5_wp * dy * wall_adjustment_factor )  THEN
+             WRITE( message_string, * ) 'grid anisotropy exceeds ',             &
+                                        'threshold given by only local',        &
+                                        ' &horizontal reduction of near_wall ', &
+                                        'mixing length l_wall',                 &
+                                        ' &starting from height level k = ', k, &
+                                        '.'
+             CALL message( 'init_grid', 'PA0202', 0, 1, 0, 6, 0 )
+             EXIT
+          ENDIF
+       ENDDO
+!
+!--    In case of topography: limit near-wall mixing length l_wall further:
+!--    Go through all points of the subdomain one by one and look for the closest
+!--    surface.
+!--    Is this correct in the ocean case?
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!
+!--             Check if current gridpoint belongs to the atmosphere
+                IF ( BTEST( wall_flags_0(k,j,i), 0 ) )  THEN
+!
+!--                Check for neighbouring grid-points.
+!--                Vertical distance, down
+                   IF ( .NOT. BTEST( wall_flags_0(k-1,j,i), 0 ) )              &
+                      l_wall(k,j,i) = MIN( l_grid(k), zu(k) - zw(k-1) )
+!
+!--                Vertical distance, up
+                   IF ( .NOT. BTEST( wall_flags_0(k+1,j,i), 0 ) )              &
+                      l_wall(k,j,i) = MIN( l_grid(k), zw(k) - zu(k) )
+!
+!--                y-distance
+                   IF ( .NOT. BTEST( wall_flags_0(k,j-1,i), 0 )  .OR.          &
+                        .NOT. BTEST( wall_flags_0(k,j+1,i), 0 ) )              &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k), 0.5_wp * dy )
+!
+!--                x-distance
+                   IF ( .NOT. BTEST( wall_flags_0(k,j,i-1), 0 )  .OR.          &
+                        .NOT. BTEST( wall_flags_0(k,j,i+1), 0 ) )              &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k), 0.5_wp * dx )
+!
+!--                 yz-distance (vertical edges, down)
+                    IF ( .NOT. BTEST( wall_flags_0(k-1,j-1,i), 0 )  .OR.       &
+                         .NOT. BTEST( wall_flags_0(k-1,j+1,i), 0 )  )          &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),           &
+                                           SQRT( 0.25_wp * dy**2 +             &
+                                          ( zu(k) - zw(k-1) )**2 ) )
+!
+!--                  yz-distance (vertical edges, up)
+                    IF ( .NOT. BTEST( wall_flags_0(k+1,j-1,i), 0 )  .OR.       &
+                         .NOT. BTEST( wall_flags_0(k+1,j+1,i), 0 )  )          &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),           &
+                                           SQRT( 0.25_wp * dy**2 +             &
+                                          ( zw(k) - zu(k) )**2 ) )
+!   
+!--                 xz-distance (vertical edges, down)
+                    IF ( .NOT. BTEST( wall_flags_0(k-1,j,i-1), 0 )  .OR.       &
+                         .NOT. BTEST( wall_flags_0(k-1,j,i+1), 0 )  )          &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),           &
+                                           SQRT( 0.25_wp * dx**2 +             &
+                                          ( zu(k) - zw(k-1) )**2 ) )
+!
+!--                 xz-distance (vertical edges, up)
+                    IF ( .NOT. BTEST( wall_flags_0(k+1,j,i-1), 0 )  .OR.       &
+                         .NOT. BTEST( wall_flags_0(k+1,j,i+1), 0 )  )          &
+                     l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),            &
+                                           SQRT( 0.25_wp * dx**2 +             &
+                                          ( zw(k) - zu(k) )**2 ) )
+!
+!--                xy-distance (horizontal edges)
+                   IF ( .NOT. BTEST( wall_flags_0(k,j-1,i-1), 0 )  .OR.        &
+                        .NOT. BTEST( wall_flags_0(k,j+1,i-1), 0 )  .OR.        &
+                        .NOT. BTEST( wall_flags_0(k,j-1,i+1), 0 )  .OR.        &
+                        .NOT. BTEST( wall_flags_0(k,j+1,i+1), 0 ) )            &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),           &
+                                           SQRT( 0.25_wp * ( dx**2 + dy**2 ) ) )
+!
+!--                xyz distance (vertical and horizontal edges, down)
+                   IF ( .NOT. BTEST( wall_flags_0(k-1,j-1,i-1), 0 )  .OR.      &
+                        .NOT. BTEST( wall_flags_0(k-1,j+1,i-1), 0 )  .OR.      &
+                        .NOT. BTEST( wall_flags_0(k-1,j-1,i+1), 0 )  .OR.      &
+                        .NOT. BTEST( wall_flags_0(k-1,j+1,i+1), 0 ) )          &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),           &
+                                           SQRT( 0.25_wp * ( dx**2 + dy**2 )   &
+                                                 +  ( zu(k) - zw(k-1) )**2  ) )
+!
+!--                xyz distance (vertical and horizontal edges, up)
+                   IF ( .NOT. BTEST( wall_flags_0(k+1,j-1,i-1), 0 )  .OR.      &
+                        .NOT. BTEST( wall_flags_0(k+1,j+1,i-1), 0 )  .OR.      &
+                        .NOT. BTEST( wall_flags_0(k+1,j-1,i+1), 0 )  .OR.      &
+                        .NOT. BTEST( wall_flags_0(k+1,j+1,i+1), 0 ) )          &
+                      l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k),           &
+                                           SQRT( 0.25_wp * ( dx**2 + dy**2 )   &
+                                                 +  ( zw(k) - zu(k) )**2  ) )
+                     
+                ENDIF
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSE
+!
+!-- Initialize the mixing length in case of a RANS simulation
+       ALLOCATE( l_black(nzb:nzt+1) )
+
+!
+!--    Calculate mixing length according to Blackadar (1962)
+       IF ( f /= 0.0_wp )  THEN
+          l_max = 2.7E-4_wp * SQRT( ug(nzt+1)**2 + vg(nzt+1)**2 ) /            &
+                  ABS( f ) + 1.0E-10_wp
+       ELSE
+          l_max = 30.0_wp
+       ENDIF
+
+       DO  k = nzb, nzt
+          l_black(k) = kappa * zu(k) / ( 1.0_wp + kappa * zu(k) / l_max )
+       ENDDO
+
+       l_black(nzt+1) = l_black(nzt)
+
+!
+!--    Get height level of highest topography within local subdomain
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt-1
+                IF ( .NOT. BTEST( wall_flags_0(k,j,i), 0 ) .AND.  &
+                     k > k_max_topo )  &
+                   k_max_topo = k
+             ENDDO
+          ENDDO
+       ENDDO
+
+       l_wall(nzb,:,:) = l_black(nzb)
+       l_wall(nzt+1,:,:) = l_black(nzt+1)
+!
+!--    Limit mixing length to either nearest wall or Blackadar mixing length.
+!--    For that, analyze each grid point (i/j/k) ("analysed grid point") and 
+!--    search within its vicinity for the shortest distance to a wall by cal-
+!--    culating the distance between the analysed grid point and the "viewed
+!--    grid point" if it contains a wall (belongs to topography).
+       DO  k = nzb+1, nzt
+
+          radius = l_black(k)  ! radius within walls are searched
+!
+!--       Set l_wall to its default maximum value (l_back)
+          l_wall(k,:,:) = radius
+
+!
+!--       Compute search radius as number of grid points in all directions
+          rad_i = CEILING( radius / dx )
+          rad_j = CEILING( radius / dy )
+
+          DO  kk = 0, nzt-k
+             rad_k_t = kk
+!
+!--          Limit upward search radius to height of maximum topography
+             IF ( zu(k+kk)-zu(k) >= radius .OR. k+kk >= k_max_topo )  EXIT
+          ENDDO
+
+          DO  kk = 0, k
+             rad_k_b = kk
+             IF ( zu(k)-zu(k-kk) >= radius )  EXIT
+          ENDDO
+
+!
+!--       Get maximum vertical radius; necessary for defining arrays
+          rad_k = MAX( rad_k_b, rad_k_t )
+!
+!--       When analysed grid point lies above maximum topography, set search
+!--       radius to 0 if the distance between the analysed grid point and max 
+!--       topography height is larger than the maximum search radius
+          IF ( zu(k-rad_k_b) > zu(k_max_topo) )  rad_k_b = 0
+!
+!--       Search within vicinity only if the vertical search radius is >0
+          IF ( rad_k_b /= 0 .OR. rad_k_t /= 0 )  THEN
+
+             !> @note shape of vicinity is larger in z direction
+             !>   Shape of vicinity is two grid points larger than actual search
+             !>   radius in vertical direction. The first and last grid point is
+             !>   always set to 1 to asure correct detection of topography. See
+             !>   function "shortest_distance" for details.
+             !>   2018-03-16, gronemeier
+             ALLOCATE( vicinity(-rad_k-1:rad_k+1,-rad_j:rad_j,-rad_i:rad_i) )
+             ALLOCATE( vic_yz(0:rad_k+1,0:rad_j) )
+
+             vicinity = 1
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+!
+!--                Start search only if (i/j/k) belongs to atmosphere
+                   IF ( BTEST( wall_flags_0(k,j,i), 0 )  )  THEN
+!
+!--                   Reset topography within vicinity
+                      vicinity(-rad_k:rad_k,:,:) = 0
+!
+!--                   Copy area surrounding analysed grid point into vicinity.
+!--                   First, limit size of data copied to vicinity by the domain
+!--                   border
+                      !> @note limit copied area to 1 grid point in hor. dir.
+                      !>   Ignore walls in horizontal direction which are
+                      !>   further away than a single grid point. This allows to
+                      !>   only search within local subdomain without the need
+                      !>   of global topography information.
+                      !>   The error made by this assumption are acceptable at
+                      !>   the moment.
+                      !>   2018-10-01, gronemeier
+                      rad_i_l = MIN( 1, rad_i, i )
+                      rad_i_r = MIN( 1, rad_i, nx-i )
+
+                      rad_j_s = MIN( 1, rad_j, j )
+                      rad_j_n = MIN( 1, rad_j, ny-j )
+
+                      CALL copy_into_vicinity( k, j, i,           &
+                                               -rad_k_b, rad_k_t, &
+                                               -rad_j_s, rad_j_n, &
+                                               -rad_i_l, rad_i_r  )
+                      !> @note in case of cyclic boundaries, those parts of the
+                      !>   topography which lies beyond the domain borders but
+                      !>   still within the search radius still needs to be
+                      !>   copied into 'vicinity'. As the effective search
+                      !>   radius is limited to 1 at the moment, no further
+                      !>   copying is needed. Old implementation (prior to
+                      !>   2018-10-01) had this covered but used a global array.
+                      !>   2018-10-01, gronemeier
+
+!
+!--                   Search for walls only if there is any within vicinity
+                      IF ( MAXVAL( vicinity(-rad_k:rad_k,:,:) ) /= 0 )  THEN
+!
+!--                      Search within first half (positive x)
+                         dist_dx = rad_i
+                         DO  ii = 0, dist_dx
+!
+!--                         Search along vertical direction only if below
+!--                         maximum topography
+                            IF ( rad_k_t > 0 ) THEN
+!
+!--                            Search for walls within octant (+++)
+                               vic_yz = vicinity(0:rad_k+1,0:rad_j,ii)
+                               l_wall(k,j,i) = MIN( l_wall(k,j,i),             &
+                                       shortest_distance( vic_yz, .TRUE., ii ) )
+!
+!--                            Search for walls within octant (+-+)
+!--                            Switch order of array so that the analysed grid
+!--                            point is always located at (0/0) (required by
+!--                            shortest_distance").
+                               vic_yz = vicinity(0:rad_k+1,0:-rad_j:-1,ii)
+                               l_wall(k,j,i) = MIN( l_wall(k,j,i),             &
+                                       shortest_distance( vic_yz, .TRUE., ii ) )
+
+                            ENDIF
+!
+!--                         Search for walls within octant (+--)
+                            vic_yz = vicinity(0:-rad_k-1:-1,0:-rad_j:-1,ii)
+                            l_wall(k,j,i) = MIN( l_wall(k,j,i),                &
+                                      shortest_distance( vic_yz, .FALSE., ii ) )
+!
+!--                         Search for walls within octant (++-)
+                            vic_yz = vicinity(0:-rad_k-1:-1,0:rad_j,ii)
+                            l_wall(k,j,i) = MIN( l_wall(k,j,i),                &
+                                      shortest_distance( vic_yz, .FALSE., ii ) )
+!
+!--                         Reduce search along x by already found distance
+                            dist_dx = CEILING( l_wall(k,j,i) / dx )
+
+                         ENDDO
+!
+!-                       Search within second half (negative x)
+                         DO  ii = 0, -dist_dx, -1
+!
+!--                         Search along vertical direction only if below
+!--                         maximum topography
+                            IF ( rad_k_t > 0 ) THEN
+!
+!--                            Search for walls within octant (-++)
+                               vic_yz = vicinity(0:rad_k+1,0:rad_j,ii)
+                               l_wall(k,j,i) = MIN( l_wall(k,j,i),             &
+                                      shortest_distance( vic_yz, .TRUE., -ii ) )
+!
+!--                            Search for walls within octant (--+)
+!--                            Switch order of array so that the analysed grid
+!--                            point is always located at (0/0) (required by
+!--                            shortest_distance").
+                               vic_yz = vicinity(0:rad_k+1,0:-rad_j:-1,ii)
+                               l_wall(k,j,i) = MIN( l_wall(k,j,i),             &
+                                      shortest_distance( vic_yz, .TRUE., -ii ) )
+
+                            ENDIF
+!
+!--                         Search for walls within octant (---)
+                            vic_yz = vicinity(0:-rad_k-1:-1,0:-rad_j:-1,ii)
+                            l_wall(k,j,i) = MIN( l_wall(k,j,i),                &
+                                     shortest_distance( vic_yz, .FALSE., -ii ) )
+!
+!--                         Search for walls within octant (-+-)
+                            vic_yz = vicinity(0:-rad_k-1:-1,0:rad_j,ii)
+                            l_wall(k,j,i) = MIN( l_wall(k,j,i),                &
+                                     shortest_distance( vic_yz, .FALSE., -ii ) )
+!
+!--                         Reduce search along x by already found distance
+                            dist_dx = CEILING( l_wall(k,j,i) / dx )
+
+                         ENDDO
+
+                      ENDIF  !Check for any walls within vicinity
+
+                   ELSE  !Check if (i,j,k) belongs to atmosphere
+
+                      l_wall(k,j,i) = l_black(k)
+
+                   ENDIF
+
+                ENDDO  !j loop
+             ENDDO  !i loop
+
+             DEALLOCATE( vicinity )
+             DEALLOCATE( vic_yz )
+
+          ENDIF  !check vertical size of vicinity
+
+       ENDDO  !k loop
+
+    ENDIF  !LES or RANS mode
+
+!
+!-- Set lateral boundary conditions for l_wall
+    CALL exchange_horiz( l_wall, nbgp )
+
+    CONTAINS
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate the shortest distance between position (i/j/k)=(0/0/0) and 
+!> (pos_i/jj/kk), where (jj/kk) is the position of the maximum of 'array'
+!> closest to the origin (0/0) of 'array'.
+!------------------------------------------------------------------------------!
+    REAL(wp) FUNCTION shortest_distance( array, orientation, pos_i )
+
+       IMPLICIT NONE
+
+       LOGICAL, INTENT(IN) :: orientation    !< flag if array represents an array oriented upwards (true) or downwards (false)
+
+       INTEGER(iwp), INTENT(IN) :: pos_i     !< x position of the yz-plane 'array'
+
+       INTEGER(iwp) :: a                     !< loop index
+       INTEGER(iwp) :: b                     !< loop index
+       INTEGER(iwp) :: jj                    !< loop index
+
+       INTEGER(KIND=1) :: maximum            !< maximum of array along z dimension
+
+       INTEGER(iwp), DIMENSION(0:rad_j) :: loc_k !< location of closest wall along vertical dimension
+
+       INTEGER(KIND=1), DIMENSION(0:rad_k+1,0:rad_j), INTENT(IN) :: array !< array containing a yz-plane at position pos_i
+
+!
+!--    Get coordinate of first maximum along vertical dimension
+!--    at each y position of array (similar to function maxloc but more stable).
+       DO  a = 0, rad_j
+          loc_k(a) = rad_k+1
+          maximum = MAXVAL( array(:,a) )
+          DO  b = 0, rad_k+1
+             IF ( array(b,a) == maximum )  THEN
+                loc_k(a) = b
+                EXIT
+             ENDIF
+          ENDDO
+       ENDDO
+!
+!--    Set distance to the default maximum value (=search radius)
+       shortest_distance = radius
+!
+!--    Calculate distance between position (0/0/0) and
+!--    position (pos_i/jj/loc(jj)) and only save the shortest distance.
+       IF ( orientation ) THEN  !if array is oriented upwards
+          DO  jj = 0, rad_j
+             shortest_distance =                                               &
+                MIN( shortest_distance,                                        &
+                     SQRT( MAX(REAL(pos_i, KIND=wp)*dx-0.5_wp*dx, 0.0_wp)**2   &
+                         + MAX(REAL(jj, KIND=wp)*dy-0.5_wp*dy, 0.0_wp)**2      &
+                         + MAX(zw(loc_k(jj)+k-1)-zu(k), 0.0_wp)**2             &
+                         )                                                     &
+                   )
+          ENDDO
+       ELSE  !if array is oriented downwards
+          !> @note MAX within zw required to circumvent error at domain border
+          !>   At the domain border, if non-cyclic boundary is present, the
+          !>   index for zw could be -1, which will be errorneous (zw(-1) does
+          !>   not exist). The MAX function limits the index to be at least 0.
+          DO  jj = 0, rad_j
+             shortest_distance =                                               &
+                MIN( shortest_distance,                                        &
+                     SQRT( MAX(REAL(pos_i, KIND=wp)*dx-0.5_wp*dx, 0.0_wp)**2   &
+                         + MAX(REAL(jj, KIND=wp)*dy-0.5_wp*dy, 0.0_wp)**2      &
+                         + MAX(zu(k)-zw(MAX(k-loc_k(jj),0_iwp)), 0.0_wp)**2    &
+                         )                                                     &
+                   )
+          ENDDO
+       ENDIF
+       
+    END FUNCTION
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Copy a subarray of size (kb:kt,js:jn,il:ir) centered around grid point 
+!> (kp,jp,ip) containing the first bit of wall_flags_0 into the array
+!> 'vicinity'. Only copy first bit as this indicates the presence of topography.
+!------------------------------------------------------------------------------!
+    SUBROUTINE copy_into_vicinity( kp, jp, ip, kb, kt, js, jn, il, ir )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) :: il !< left loop boundary
+       INTEGER(iwp), INTENT(IN) :: ip !< center position in x-direction
+       INTEGER(iwp), INTENT(IN) :: ir !< right loop boundary
+       INTEGER(iwp), INTENT(IN) :: jn !< northern loop boundary
+       INTEGER(iwp), INTENT(IN) :: jp !< center position in y-direction
+       INTEGER(iwp), INTENT(IN) :: js !< southern loop boundary
+       INTEGER(iwp), INTENT(IN) :: kb !< bottom loop boundary
+       INTEGER(iwp), INTENT(IN) :: kp !< center position in z-direction
+       INTEGER(iwp), INTENT(IN) :: kt !< top loop boundary
+
+       INTEGER(iwp) :: i   !< loop index
+       INTEGER(iwp) :: j   !< loop index
+       INTEGER(iwp) :: k   !< loop index
+
+       DO  i = il, ir
+          DO  j = js, jn
+             DO  k = kb, kt
+                vicinity(k,j,i) = MERGE( 0, 1,               &
+                       BTEST( wall_flags_0(kp+k,jp+j,ip+i), 0 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE copy_into_vicinity
+
+ END SUBROUTINE tcm_init_mixing_length
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize virtual velocities used later in production_e.
+!------------------------------------------------------------------------------!
+ SUBROUTINE production_e_init
+
+    USE arrays_3d,                                                             &
+        ONLY:  drho_air_zw, zu
+
+    USE control_parameters,                                                    &
+        ONLY:  constant_flux_layer
+
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  phi_m
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_lsm_h, surf_usm_h 
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i      !< grid index x-direction
+    INTEGER(iwp) ::  j      !< grid index y-direction
+    INTEGER(iwp) ::  k      !< grid index z-direction
+    INTEGER(iwp) ::  m      !< running index surface elements
+    
+    REAL(wp) ::  km_sfc     !< diffusion coefficient, used to compute virtual velocities
+
+    IF ( constant_flux_layer )  THEN
+!
+!--    Calculate a virtual velocity at the surface in a way that the
+!--    vertical velocity gradient at k = 1 (u(k+1)-u_0) matches the
+!--    Prandtl law (-w'u'/km). This gradient is used in the TKE shear
+!--    production term at k=1 (see production_e_ij).
+!--    The velocity gradient has to be limited in case of too small km
+!--    (otherwise the timestep may be significantly reduced by large
+!--    surface winds).
+!--    not available in case of non-cyclic boundary conditions.
+!--    Default surfaces, upward-facing
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_def_h(0)%ns
+
+          i = surf_def_h(0)%i(m)            
+          j = surf_def_h(0)%j(m)
+          k = surf_def_h(0)%k(m)
+!
+!--       Note, calculation of u_0 and v_0 is not fully accurate, as u/v 
+!--       and km are not on the same grid. Actually, a further 
+!--       interpolation of km onto the u/v-grid is necessary. However, the
+!--       effect of this error is negligible.
+          km_sfc = kappa * surf_def_h(0)%us(m) * surf_def_h(0)%z_mo(m) /       &
+                   phi_m( surf_def_h(0)%z_mo(m) / surf_def_h(0)%ol(m) )
+
+          surf_def_h(0)%u_0(m) = u(k+1,j,i) + surf_def_h(0)%usws(m) *          &
+                                     drho_air_zw(k-1)               *          &
+                                     ( zu(k+1) - zu(k-1)    )       /          &
+                                     ( km_sfc  + 1.0E-20_wp )
+          surf_def_h(0)%v_0(m) = v(k+1,j,i) + surf_def_h(0)%vsws(m) *          &
+                                     drho_air_zw(k-1)               *          &
+                                     ( zu(k+1) - zu(k-1)    )       /          &
+                                     ( km_sfc  + 1.0E-20_wp )   
+
+          IF ( ABS( u(k+1,j,i) - surf_def_h(0)%u_0(m) )  >                     &
+               ABS( u(k+1,j,i) - u(k-1,j,i)           )                        &
+             )  surf_def_h(0)%u_0(m) = u(k-1,j,i)
+
+          IF ( ABS( v(k+1,j,i) - surf_def_h(0)%v_0(m) )  >                     &
+               ABS( v(k+1,j,i) - v(k-1,j,i)           )                        &
+             )  surf_def_h(0)%v_0(m) = v(k-1,j,i)
+
+       ENDDO
+!
+!--    Default surfaces, downward-facing surfaces
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_def_h(1)%ns
+
+          i = surf_def_h(1)%i(m)            
+          j = surf_def_h(1)%j(m)
+          k = surf_def_h(1)%k(m)
+!
+!--       Note, calculation of u_0 and v_0 is not fully accurate, as u/v 
+!--       and km are not on the same grid. Actually, a further 
+!--       interpolation of km onto the u/v-grid is necessary. However, the
+!--       effect of this error is negligible.
+          surf_def_h(1)%u_0(m) = u(k-1,j,i) - surf_def_h(1)%usws(m) *          &
+                                     drho_air_zw(k-1) *                        &
+                                     ( zu(k+1)    - zu(k-1)    )  /            &
+                                     ( km(k,j,i)  + 1.0E-20_wp )  
+          surf_def_h(1)%v_0(m) = v(k-1,j,i) - surf_def_h(1)%vsws(m) *          &
+                                     drho_air_zw(k-1) *                        &
+                                     ( zu(k+1)    - zu(k-1)    )  /            &
+                                     ( km(k,j,i)  + 1.0E-20_wp )  
+
+          IF ( ABS( surf_def_h(1)%u_0(m) - u(k-1,j,i) )  >                     &
+               ABS( u(k+1,j,i)           - u(k-1,j,i) )                        &
+             )  surf_def_h(1)%u_0(m) = u(k+1,j,i)
+
+          IF ( ABS( surf_def_h(1)%v_0(m) - v(k-1,j,i) )  >                     &
+               ABS( v(k+1,j,i)           - v(k-1,j,i) )                        &
+             )  surf_def_h(1)%v_0(m) = v(k+1,j,i)
+
+       ENDDO
+!
+!--    Natural surfaces, upward-facing
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_lsm_h%ns
+
+          i = surf_lsm_h%i(m)
+          j = surf_lsm_h%j(m)
+          k = surf_lsm_h%k(m)
+!
+!--       Note, calculation of u_0 and v_0 is not fully accurate, as u/v 
+!--       and km are not on the same grid. Actually, a further 
+!--       interpolation of km onto the u/v-grid is necessary. However, the
+!--       effect of this error is negligible.
+          km_sfc = kappa * surf_lsm_h%us(m) * surf_lsm_h%z_mo(m) /             &
+                   phi_m( surf_lsm_h%z_mo(m) / surf_lsm_h%ol(m) )
+
+          surf_lsm_h%u_0(m) = u(k+1,j,i) + surf_lsm_h%usws(m)    *             &
+                                        drho_air_zw(k-1)         *             &
+                                        ( zu(k+1) - zu(k-1)    ) /             &
+                                        ( km_sfc  + 1.0E-20_wp )  
+          surf_lsm_h%v_0(m) = v(k+1,j,i) + surf_lsm_h%vsws(m)    *             &
+                                        drho_air_zw(k-1)         *             &
+                                        ( zu(k+1) - zu(k-1)    ) /             &
+                                        ( km_sfc  + 1.0E-20_wp )
+
+          IF ( ABS( u(k+1,j,i) - surf_lsm_h%u_0(m) )  >                        &
+               ABS( u(k+1,j,i) - u(k-1,j,i)   )                                &
+             )  surf_lsm_h%u_0(m) = u(k-1,j,i)
+
+          IF ( ABS( v(k+1,j,i) - surf_lsm_h%v_0(m) )  >                        &
+               ABS( v(k+1,j,i) - v(k-1,j,i)   )                                &
+             )  surf_lsm_h%v_0(m) = v(k-1,j,i)
+
+       ENDDO
+!
+!--    Urban surfaces, upward-facing
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_usm_h%ns
+
+          i = surf_usm_h%i(m)
+          j = surf_usm_h%j(m)
+          k = surf_usm_h%k(m)
+!
+!--       Note, calculation of u_0 and v_0 is not fully accurate, as u/v 
+!--       and km are not on the same grid. Actually, a further 
+!--       interpolation of km onto the u/v-grid is necessary. However, the
+!--       effect of this error is negligible.
+          km_sfc = kappa * surf_usm_h%us(m) * surf_usm_h%z_mo(m) /             &
+                   phi_m( surf_usm_h%z_mo(m) / surf_usm_h%ol(m) )
+
+          surf_usm_h%u_0(m) = u(k+1,j,i) + surf_usm_h%usws(m)    *             &
+                                        drho_air_zw(k-1)         *             &
+                                        ( zu(k+1) - zu(k-1)    ) /             &
+                                        ( km_sfc  + 1.0E-20_wp )
+          surf_usm_h%v_0(m) = v(k+1,j,i) + surf_usm_h%vsws(m)    *             &
+                                        drho_air_zw(k-1)         *             &
+                                        ( zu(k+1) - zu(k-1)    ) /             &
+                                        ( km_sfc  + 1.0E-20_wp )
+
+          IF ( ABS( u(k+1,j,i) - surf_usm_h%u_0(m) )  >                        &
+               ABS( u(k+1,j,i) - u(k-1,j,i)   )                                &
+             )  surf_usm_h%u_0(m) = u(k-1,j,i)
+
+          IF ( ABS( v(k+1,j,i) - surf_usm_h%v_0(m) )  >                        &
+               ABS( v(k+1,j,i) - v(k-1,j,i)   )                                &
+             )  surf_usm_h%v_0(m) = v(k-1,j,i)
+
+       ENDDO
+
+    ENDIF
+
+ END SUBROUTINE production_e_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prognostic equation for subgrid-scale TKE and TKE dissipation rate.
+!> Vector-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_prognostic_equations
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu
+
+    USE control_parameters,                                                    &
+        ONLY:  f, scalar_advec, tsc
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i       !< loop index
+    INTEGER(iwp) ::  j       !< loop index
+    INTEGER(iwp) ::  k       !< loop index
+    INTEGER(iwp) ::  m       !< loop index
+    INTEGER(iwp) ::  surf_e  !< end index of surface elements at given i-j position
+    INTEGER(iwp) ::  surf_s  !< start index of surface elements at given i-j position
+
+    REAL(wp)     ::  sbt     !< wheighting factor for sub-time step
+
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: advec  !< advection term of TKE tendency
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) :: produc !< production term of TKE tendency
+
+!
+!-- If required, compute prognostic equation for turbulent kinetic
+!-- energy (TKE)
+    IF ( .NOT. constant_diffusion )  THEN
+
+       CALL cpu_log( log_point(16), 'tke-equation', 'start' )
+
+       sbt = tsc(2)
+       IF ( .NOT. use_upstream_for_tke )  THEN
+          IF ( scalar_advec == 'bc-scheme' )  THEN
+
+             IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--             Bott-Chlond scheme always uses Euler time step. Thus:
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
+             CALL advec_s_bc( e, 'e' )
+
+          ENDIF
+       ENDIF
+
+!
+!--    TKE-tendency terms with no communication
+       IF ( scalar_advec /= 'bc-scheme'  .OR.  use_upstream_for_tke )  THEN
+          IF ( use_upstream_for_tke )  THEN
+             tend = 0.0_wp
+             CALL advec_s_up( e )
+          ELSE
+             tend = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( e, 'e' )
+                ELSE
+                   CALL advec_s_pw( e )
+                ENDIF
+             ELSE
+                CALL advec_s_up( e )
+             ENDIF
+          ENDIF
+       ENDIF
+
+       IF ( rans_tke_e )  advec = tend
+
+       CALL production_e( .FALSE. )
+
+!
+!--    Save production term for prognostic equation of TKE dissipation rate
+       IF ( rans_tke_e )  produc = tend - advec
+
+       IF ( .NOT. humidity )  THEN
+          IF ( ocean_mode )  THEN
+             CALL diffusion_e( prho, prho_reference )
+          ELSE
+             CALL diffusion_e( pt, pt_reference )
+          ENDIF
+       ELSE
+          CALL diffusion_e( vpt, pt_reference )
+       ENDIF
+
+!
+!--    Additional sink term for flows through plant canopies
+       IF ( plant_canopy )  CALL pcm_tendency( 6 )
+
+       CALL user_actions( 'e-tendency' )
+
+!
+!--    Prognostic equation for TKE.
+!--    Eliminate negative TKE values, which can occur due to numerical
+!--    reasons in the course of the integration. In such cases the old TKE
+!--    value is reduced by 90%.
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                e_p(k,j,i) = e(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +        &
+                                                 tsc(3) * te_m(k,j,i) )        &
+                                        )                                      &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                IF ( e_p(k,j,i) < 0.0_wp )  e_p(k,j,i) = 0.1_wp * e(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Use special boundary condition in case of TKE-e closure
+       !> @todo do the same for usm and lsm surfaces
+       !>   2018-06-05, gronemeier
+       IF ( rans_tke_e )  THEN
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+                surf_s = surf_def_h(0)%start_index(j,i)
+                surf_e = surf_def_h(0)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k = surf_def_h(0)%k(m)
+                   e_p(k,j,i) = surf_def_h(0)%us(m)**2 / c_0**2
+                ENDDO
+             ENDDO
+          ENDDO
+       ENDIF
+
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      te_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      te_m(k,j,i) =   -9.5625_wp * tend(k,j,i)                 &
+                                     + 5.3125_wp * te_m(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+       CALL cpu_log( log_point(16), 'tke-equation', 'stop' )
+
+    ENDIF   ! TKE equation
+
+!
+!-- If required, compute prognostic equation for TKE dissipation rate
+    IF ( rans_tke_e )  THEN
+
+       CALL cpu_log( log_point(33), 'diss-equation', 'start' )
+
+       sbt = tsc(2)
+       IF ( .NOT. use_upstream_for_tke )  THEN
+          IF ( scalar_advec == 'bc-scheme' )  THEN
+
+             IF ( timestep_scheme(1:5) /= 'runge' )  THEN
+!
+!--             Bott-Chlond scheme always uses Euler time step. Thus:
+                sbt = 1.0_wp
+             ENDIF
+             tend = 0.0_wp
+             CALL advec_s_bc( diss, 'diss' )
+
+          ENDIF
+       ENDIF
+
+!
+!--    dissipation-tendency terms with no communication
+       IF ( scalar_advec /= 'bc-scheme'  .OR.  use_upstream_for_tke )  THEN
+          IF ( use_upstream_for_tke )  THEN
+             tend = 0.0_wp
+             CALL advec_s_up( diss )
+          ELSE
+             tend = 0.0_wp
+             IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                IF ( ws_scheme_sca )  THEN
+                   CALL advec_s_ws( diss, 'diss' )
+                ELSE
+                   CALL advec_s_pw( diss )
+                ENDIF
+             ELSE
+                CALL advec_s_up( diss )
+             ENDIF
+          ENDIF
+       ENDIF
+
+!
+!--    Production of TKE dissipation rate
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+!                tend(k,j,i) = tend(k,j,i) + c_1 * diss(k,j,i) / ( e(k,j,i) + 1.0E-20_wp ) * produc(k)
+                tend(k,j,i) = tend(k,j,i) + c_1 * c_0**4 * f / c_4               &  !> @todo needs revision
+                      / surf_def_h(0)%us(surf_def_h(0)%start_index(j,i))       &
+                      * SQRT(e(k,j,i)) * produc(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+       CALL diffusion_diss
+
+!
+!--    Additional sink term for flows through plant canopies
+!        IF ( plant_canopy )  CALL pcm_tendency( ? )                            !> @query what to do with this?
+
+!        CALL user_actions( 'diss-tendency' )                                   !> @todo not yet implemented
+
+!
+!--    Prognostic equation for TKE dissipation.
+!--    Eliminate negative dissipation values, which can occur due to numerical
+!--    reasons in the course of the integration. In such cases the old
+!--    dissipation value is reduced by 90%.
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                diss_p(k,j,i) = diss(k,j,i) + ( dt_3d * ( sbt * tend(k,j,i) +  &
+                                                 tsc(3) * tdiss_m(k,j,i) )     &
+                                        )                                      &
+                                   * MERGE( 1.0_wp, 0.0_wp,                    &
+                                             BTEST( wall_flags_0(k,j,i), 0 )   &
+                                          )
+                IF ( diss_p(k,j,i) < 0.0_wp )                                  &
+                   diss_p(k,j,i) = 0.1_wp * diss(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Use special boundary condition in case of TKE-e closure
+       DO  i = nxl, nxr
+          DO  j = nys, nyn
+             surf_s = surf_def_h(0)%start_index(j,i)
+             surf_e = surf_def_h(0)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_def_h(0)%k(m)
+                diss_p(k,j,i) = surf_def_h(0)%us(m)**3 / kappa * ddzu(k)
+             ENDDO
+          ENDDO
+       ENDDO
+
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tdiss_m(k,j,i) = tend(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   DO  k = nzb+1, nzt
+                      tdiss_m(k,j,i) =   -9.5625_wp * tend(k,j,i)              &
+                                        + 5.3125_wp * tdiss_m(k,j,i)
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+       ENDIF
+
+       CALL cpu_log( log_point(33), 'diss-equation', 'stop' )
+
+    ENDIF
+
+ END SUBROUTINE tcm_prognostic_equations
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prognostic equation for subgrid-scale TKE and TKE dissipation rate.
+!> Cache-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_prognostic_equations_ij( i, j, i_omp, tn )
+
+    USE arrays_3d,                                                             &
+        ONLY:  diss_l_diss, diss_l_e, diss_s_diss, diss_s_e, flux_l_diss,      &
+               flux_l_e, flux_s_diss, flux_s_e
+
+    USE control_parameters,                                                    &
+        ONLY:  tsc
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i       !< loop index x direction
+    INTEGER(iwp) ::  i_omp   !< first loop index of i-loop in prognostic_equations
+    INTEGER(iwp) ::  j       !< loop index y direction
+    INTEGER(iwp) ::  k       !< loop index z direction
+    INTEGER(iwp) ::  tn      !< task number of openmp task
+
+!    INTEGER(iwp) :: pis = 32 !< debug variable, print from i=pis                !> @todo remove later
+!    INTEGER(iwp) :: pie = 32 !< debug variable, print until i=pie               !> @todo remove later
+!    INTEGER(iwp) :: pjs = 26 !< debug variable, print from j=pjs                !> @todo remove later
+!    INTEGER(iwp) :: pje = 26 !< debug variable, print until j=pje               !> @todo remove later
+!    INTEGER(iwp) :: pkb = 1  !< debug variable, print from k=pkb                !> @todo remove later
+!    INTEGER(iwp) :: pkt = 7  !< debug variable, print until k=pkt               !> @todo remove later
+
+    REAL(wp), DIMENSION(nzb:nzt+1) :: dum_adv   !< debug variable               !> @todo remove later
+    REAL(wp), DIMENSION(nzb:nzt+1) :: dum_pro   !< debug variable               !> @todo remove later
+    REAL(wp), DIMENSION(nzb:nzt+1) :: dum_dif   !< debug variable               !> @todo remove later
+
+!5555 FORMAT(A,7(1X,E12.5))   !> @todo remove later
+
+!
+!-- If required, compute prognostic equation for turbulent kinetic
+!-- energy (TKE)
+    IF ( .NOT. constant_diffusion )  THEN
+
+!
+!--    Tendency-terms for TKE
+       tend(:,j,i) = 0.0_wp
+       IF ( timestep_scheme(1:5) == 'runge'  &
+           .AND.  .NOT. use_upstream_for_tke )  THEN
+           IF ( ws_scheme_sca )  THEN
+               CALL advec_s_ws( i, j, e, 'e', flux_s_e, diss_s_e, &
+                                flux_l_e, diss_l_e , i_omp, tn )
+           ELSE
+               CALL advec_s_pw( i, j, e )
+           ENDIF
+       ELSE
+          CALL advec_s_up( i, j, e )
+       ENDIF
+
+       dum_adv = tend(:,j,i)                                                    !> @todo remove later
+
+       CALL production_e( i, j, .FALSE. )
+
+       dum_pro = tend(:,j,i) - dum_adv                                          !> @todo remove later
+
+       IF ( .NOT. humidity )  THEN
+          IF ( ocean_mode )  THEN
+             CALL diffusion_e( i, j, prho, prho_reference )
+          ELSE
+             CALL diffusion_e( i, j, pt, pt_reference )
+          ENDIF
+       ELSE
+          CALL diffusion_e( i, j, vpt, pt_reference )
+       ENDIF
+
+       dum_dif = tend(:,j,i) - dum_adv - dum_pro                                !> @todo remove later
+
+!
+!--    Additional sink term for flows through plant canopies
+       IF ( plant_canopy )  CALL pcm_tendency( i, j, 6 )
+
+       CALL user_actions( i, j, 'e-tendency' )
+
+!
+!--    Prognostic equation for TKE.
+!--    Eliminate negative TKE values, which can occur due to numerical
+!--    reasons in the course of the integration. In such cases the old
+!--    TKE value is reduced by 90%.
+       DO  k = nzb+1, nzt
+          e_p(k,j,i) = e(k,j,i) + ( dt_3d * ( tsc(2) * tend(k,j,i) +           &
+                                              tsc(3) * te_m(k,j,i) )           &
+                                  )                                            &
+                                 * MERGE( 1.0_wp, 0.0_wp,                      &
+                                          BTEST( wall_flags_0(k,j,i), 0 )      &
+                                        )
+          IF ( e_p(k,j,i) <= 0.0_wp )  e_p(k,j,i) = 0.1_wp * e(k,j,i)
+       ENDDO
+
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  k = nzb+1, nzt
+                te_m(k,j,i) = tend(k,j,i)
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  k = nzb+1, nzt
+                te_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +                     &
+                                 5.3125_wp * te_m(k,j,i)
+             ENDDO
+          ENDIF
+       ENDIF
+
+!        if ( i >= pis .and. i <= pie .and. j >= pjs .and. j <= pje ) then        !> @todo remove later
+!           WRITE(9, *) '------'
+!           WRITE(9, '(A,F8.3,1X,F8.3,1X,I2)') 't, dt, int_ts:', simulated_time, dt_3d, intermediate_timestep_count
+!           WRITE(9, *) 'i:', i
+!           WRITE(9, *) 'j:', j
+!           WRITE(9, *) 'k:', pkb, ' - ', pkt
+!           WRITE(9, *) '---'
+!           WRITE(9, *) 'e:'
+!           WRITE(9, 5555) 'adv :', dum_adv(pkb:pkt)
+!           WRITE(9, 5555) 'pro :', dum_pro(pkb:pkt)
+!           WRITE(9, 5555) 'dif :', dum_dif(pkb:pkt)
+!           WRITE(9, 5555) 'tend:', tend(pkb:pkt,j,i)
+!           WRITE(9, 5555) 'e_p :', e_p(pkb:pkt,j,i)
+!           WRITE(9, 5555) 'e   :', e(pkb:pkt,j,i)
+!           FLUSH(9)
+!        endif
+
+    ENDIF   ! TKE equation
+
+!
+!-- If required, compute prognostic equation for TKE dissipation rate
+    IF ( rans_tke_e )  THEN
+
+!
+!--    Tendency-terms for dissipation
+       tend(:,j,i) = 0.0_wp
+       IF ( timestep_scheme(1:5) == 'runge'  &
+           .AND.  .NOT. use_upstream_for_tke )  THEN
+           IF ( ws_scheme_sca )  THEN
+               CALL advec_s_ws( i, j, diss, 'diss', flux_s_diss, diss_s_diss,  &
+                                flux_l_diss, diss_l_diss, i_omp, tn )
+           ELSE
+               CALL advec_s_pw( i, j, diss )
+           ENDIF
+       ELSE
+          CALL advec_s_up( i, j, diss )
+       ENDIF
+
+       IF ( intermediate_timestep_count == 1 )  diss_adve1(:,j,i) = tend(:,j,i) !> @todo remove later
+       IF ( intermediate_timestep_count == 2 )  diss_adve2(:,j,i) = tend(:,j,i)
+       IF ( intermediate_timestep_count == 3 )  diss_adve3(:,j,i) = tend(:,j,i)
+
+!
+!--    Production of TKE dissipation rate
+       CALL production_e( i, j, .TRUE. )
+
+       IF ( intermediate_timestep_count == 1 )  diss_prod1(:,j,i) = tend(:,j,i) - diss_adve1(:,j,i) !> @todo remove later
+       IF ( intermediate_timestep_count == 2 )  diss_prod2(:,j,i) = tend(:,j,i) - diss_adve2(:,j,i)
+       IF ( intermediate_timestep_count == 3 )  diss_prod3(:,j,i) = tend(:,j,i) - diss_adve3(:,j,i)
+
+       dum_pro = tend(:,j,i) - dum_adv                                          !> @todo remove later
+
+!
+!--    Diffusion term of TKE dissipation rate
+       CALL diffusion_diss( i, j )
+
+       IF ( intermediate_timestep_count == 1 )  diss_diff1(:,j,i) = tend(:,j,i) - diss_adve1(:,j,i) - diss_prod1(:,j,i) !> @todo remove later
+       IF ( intermediate_timestep_count == 2 )  diss_diff2(:,j,i) = tend(:,j,i) - diss_adve2(:,j,i) - diss_prod2(:,j,i)
+       IF ( intermediate_timestep_count == 3 )  diss_diff3(:,j,i) = tend(:,j,i) - diss_adve3(:,j,i) - diss_prod3(:,j,i)
+!        IF ( intermediate_timestep_count == 3 )  dummy3(:,j,i) = km(:,j,i)
+
+       dum_dif = tend(:,j,i) - dum_adv - dum_pro                                !> @todo remove later
+
+!
+!--    Additional sink term for flows through plant canopies
+!        IF ( plant_canopy )  CALL pcm_tendency( i, j, ? )                      !> @todo not yet implemented
+
+!        CALL user_actions( i, j, 'diss-tendency' )                             !> @todo not yet implemented
+
+!
+!--    Prognostic equation for TKE dissipation
+!--    Eliminate negative dissipation values, which can occur due to
+!--    numerical reasons in the course of the integration. In such cases
+!--    the old dissipation value is reduced by 90%.
+       DO  k = nzb+1, nzt
+          diss_p(k,j,i) = diss(k,j,i) + ( dt_3d * ( tsc(2) * tend(k,j,i) +     &
+                                                    tsc(3) * tdiss_m(k,j,i) )  &
+                                        )                                      &
+                                        * MERGE( 1.0_wp, 0.0_wp,               &
+                                                BTEST( wall_flags_0(k,j,i), 0 )&
+                                               )
+       ENDDO
+
+!
+!--    Calculate tendencies for the next Runge-Kutta step
+       IF ( timestep_scheme(1:5) == 'runge' )  THEN
+          IF ( intermediate_timestep_count == 1 )  THEN
+             DO  k = nzb+1, nzt
+                tdiss_m(k,j,i) = tend(k,j,i)
+             ENDDO
+          ELSEIF ( intermediate_timestep_count < &
+                   intermediate_timestep_count_max )  THEN
+             DO  k = nzb+1, nzt
+                tdiss_m(k,j,i) =   -9.5625_wp * tend(k,j,i) +                  &
+                                    5.3125_wp * tdiss_m(k,j,i)
+             ENDDO
+          ENDIF
+       ENDIF
+
+       IF ( intermediate_timestep_count == 1 )  dummy1(:,j,i) = diss_p(:,j,i)   !> @todo remove later
+       IF ( intermediate_timestep_count == 2 )  dummy2(:,j,i) = diss_p(:,j,i)
+
+!        if ( i >= pis .and. i <= pie .and. j >= pjs .and. j <= pje ) then        !> @todo remove later
+!           WRITE(9, *) '---'
+!           WRITE(9, *) 'diss:'
+!           WRITE(9, 5555) 'adv   :', dum_adv(pkb:pkt)
+!           WRITE(9, 5555) 'pro   :', dum_pro(pkb:pkt)
+!           WRITE(9, 5555) 'dif   :', dum_dif(pkb:pkt)
+!           WRITE(9, 5555) 'tend  :', tend(pkb:pkt,j,i)
+!           WRITE(9, 5555) 'diss_p:', diss_p(pkb:pkt,j,i)
+!           WRITE(9, 5555) 'diss  :', diss(pkb:pkt,j,i)
+!           WRITE(9, *) '---'
+!           WRITE(9, 5555) 'km    :', km(pkb:pkt,j,i)
+!           flush(9)
+!        endif
+
+    ENDIF   ! dissipation equation
+
+ END SUBROUTINE tcm_prognostic_equations_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Production terms (shear + buoyancy) of the TKE.
+!> Vector-optimized version
+!> @warning The case with constant_flux_layer = F and use_surface_fluxes = T is
+!>          not considered well!
+!> @todo Adjust production term in case of rans_tke_e simulation
+!------------------------------------------------------------------------------!
+ SUBROUTINE production_e( diss_production )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzw, dd2zu, drho_air_zw, q, ql, d_exner, exner
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, constant_flux_layer, neutral,                   &
+               rho_reference, use_single_reference_value, use_surface_fluxes,  &
+               use_top_fluxes
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, dx, ddy, dy
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                surf_usm_v
+
+    IMPLICIT NONE
+
+    LOGICAL :: diss_production
+
+    INTEGER(iwp) ::  i       !< running index x-direction
+    INTEGER(iwp) ::  j       !< running index y-direction
+    INTEGER(iwp) ::  k       !< running index z-direction
+    INTEGER(iwp) ::  l       !< running index for different surface type orientation
+    INTEGER(iwp) ::  m       !< running index surface elements
+    INTEGER(iwp) ::  surf_e  !< end index of surface elements at given i-j position
+    INTEGER(iwp) ::  surf_s  !< start index of surface elements at given i-j position
+    INTEGER(iwp) ::  flag_nr !< number of masking flag
+
+    REAL(wp)     ::  def         !< 
+    REAL(wp)     ::  flag        !< flag to mask topography
+    REAL(wp)     ::  k1          !<
+    REAL(wp)     ::  k2          !<
+    REAL(wp)     ::  km_neutral  !< diffusion coefficient assuming neutral conditions - used to compute shear production at surfaces
+    REAL(wp)     ::  theta       !<
+    REAL(wp)     ::  temp        !<
+    REAL(wp)     ::  sign_dir    !< sign of wall-tke flux, depending on wall orientation 
+    REAL(wp)     ::  usvs        !< momentum flux u"v"
+    REAL(wp)     ::  vsus        !< momentum flux v"u"
+    REAL(wp)     ::  wsus        !< momentum flux w"u"
+    REAL(wp)     ::  wsvs        !< momentum flux w"v"
+
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dudx  !< Gradient of u-component in x-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dudy  !< Gradient of u-component in y-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dudz  !< Gradient of u-component in z-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dvdx  !< Gradient of v-component in x-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dvdy  !< Gradient of v-component in y-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dvdz  !< Gradient of v-component in z-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dwdx  !< Gradient of w-component in x-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dwdy  !< Gradient of w-component in y-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dwdz  !< Gradient of w-component in z-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  tmp_flux  !< temporary flux-array in z-direction
+
+
+
+!
+!-- Calculate TKE production by shear. Calculate gradients at all grid
+!-- points first, gradients at surface-bounded grid points will be
+!-- overwritten further below.
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+
+             dudx(k) =           ( u(k,j,i+1) - u(k,j,i)     ) * ddx
+             dudy(k) = 0.25_wp * ( u(k,j+1,i) + u(k,j+1,i+1) -                 &
+                                   u(k,j-1,i) - u(k,j-1,i+1) ) * ddy
+             dudz(k) = 0.5_wp  * ( u(k+1,j,i) + u(k+1,j,i+1) -                 &
+                                   u(k-1,j,i) - u(k-1,j,i+1) ) * dd2zu(k)
+
+             dvdx(k) = 0.25_wp * ( v(k,j,i+1) + v(k,j+1,i+1) -                 &
+                                   v(k,j,i-1) - v(k,j+1,i-1) ) * ddx
+             dvdy(k) =           ( v(k,j+1,i) - v(k,j,i)     ) * ddy
+             dvdz(k) = 0.5_wp  * ( v(k+1,j,i) + v(k+1,j+1,i) -                 &
+                                     v(k-1,j,i) - v(k-1,j+1,i) ) * dd2zu(k)
+
+             dwdx(k) = 0.25_wp * ( w(k,j,i+1) + w(k-1,j,i+1) -                 &
+                                   w(k,j,i-1) - w(k-1,j,i-1) ) * ddx
+             dwdy(k) = 0.25_wp * ( w(k,j+1,i) + w(k-1,j+1,i) -                 &
+                                   w(k,j-1,i) - w(k-1,j-1,i) ) * ddy
+             dwdz(k) =           ( w(k,j,i)   - w(k-1,j,i)   ) * ddzw(k)
+
+          ENDDO
+
+
+          flag_nr = 29
+
+
+          IF ( constant_flux_layer )  THEN
+!
+
+             flag_nr = 0
+
+!--          Position beneath wall
+!--          (2) - Will allways be executed.
+!--          'bottom and wall: use u_0,v_0 and wall functions'
+!
+!--          Compute gradients at north- and south-facing surfaces.
+!--          First, for default surfaces, then for urban surfaces.
+!--          Note, so far no natural vertical surfaces implemented
+             DO  l = 0, 1
+                surf_s = surf_def_v(l)%start_index(j,i)
+                surf_e = surf_def_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_def_v(l)%k(m)
+                   usvs        = surf_def_v(l)%mom_flux_tke(0,m)
+                   wsvs        = surf_def_v(l)%mom_flux_tke(1,m)
+
+                   km_neutral = kappa * ( usvs**2 + wsvs**2 )**0.25_wp         &
+                                   * 0.5_wp * dy
+!
+!--                -1.0 for right-facing wall, 1.0 for left-facing wall
+                   sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                                     BTEST( wall_flags_0(k,j-1,i), flag_nr ) )
+                   dudy(k) = sign_dir * usvs / ( km_neutral + 1E-10_wp )
+                   dwdy(k) = sign_dir * wsvs / ( km_neutral + 1E-10_wp )
+                ENDDO
+!
+!--             Natural surfaces
+                surf_s = surf_lsm_v(l)%start_index(j,i)
+                surf_e = surf_lsm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_lsm_v(l)%k(m)
+                   usvs        = surf_lsm_v(l)%mom_flux_tke(0,m)
+                   wsvs        = surf_lsm_v(l)%mom_flux_tke(1,m)
+
+                   km_neutral = kappa * ( usvs**2 + wsvs**2 )**0.25_wp         &
+                                   * 0.5_wp * dy
+!
+!--                -1.0 for right-facing wall, 1.0 for left-facing wall
+                   sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                                     BTEST( wall_flags_0(k,j-1,i), flag_nr ) )
+                   dudy(k) = sign_dir * usvs / ( km_neutral + 1E-10_wp )
+                   dwdy(k) = sign_dir * wsvs / ( km_neutral + 1E-10_wp )
+                ENDDO
+!
+!--             Urban surfaces
+                surf_s = surf_usm_v(l)%start_index(j,i)
+                surf_e = surf_usm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k           = surf_usm_v(l)%k(m)
+                   usvs        = surf_usm_v(l)%mom_flux_tke(0,m)
+                   wsvs        = surf_usm_v(l)%mom_flux_tke(1,m)
+
+                   km_neutral = kappa * ( usvs**2 + wsvs**2 )**0.25_wp         &
+                                   * 0.5_wp * dy
+!
+!--                -1.0 for right-facing wall, 1.0 for left-facing wall
+                   sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                                     BTEST( wall_flags_0(k,j-1,i), flag_nr ) )
+                   dudy(k) = sign_dir * usvs / ( km_neutral + 1E-10_wp )
+                   dwdy(k) = sign_dir * wsvs / ( km_neutral + 1E-10_wp )
+                ENDDO
+             ENDDO
+!
+!--          Compute gradients at east- and west-facing walls
+             DO  l = 2, 3
+                surf_s = surf_def_v(l)%start_index(j,i)
+                surf_e = surf_def_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k     = surf_def_v(l)%k(m)
+                   vsus  = surf_def_v(l)%mom_flux_tke(0,m)
+                   wsus  = surf_def_v(l)%mom_flux_tke(1,m)
+
+                   km_neutral = kappa * ( vsus**2 + wsus**2 )**0.25_wp         &
+                                      * 0.5_wp * dx
+!
+!--                -1.0 for right-facing wall, 1.0 for left-facing wall
+                   sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                                     BTEST( wall_flags_0(k,j,i-1), flag_nr ) )
+                   dvdx(k) = sign_dir * vsus / ( km_neutral + 1E-10_wp )
+                   dwdx(k) = sign_dir * wsus / ( km_neutral + 1E-10_wp )
+                ENDDO
+!
+!--             Natural surfaces
+                surf_s = surf_lsm_v(l)%start_index(j,i)
+                surf_e = surf_lsm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k     = surf_lsm_v(l)%k(m)
+                   vsus  = surf_lsm_v(l)%mom_flux_tke(0,m)
+                   wsus  = surf_lsm_v(l)%mom_flux_tke(1,m)
+
+                   km_neutral = kappa * ( vsus**2 + wsus**2 )**0.25_wp         &
+                                      * 0.5_wp * dx
+!
+!--                -1.0 for right-facing wall, 1.0 for left-facing wall
+                   sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                                     BTEST( wall_flags_0(k,j,i-1), flag_nr ) )
+                   dvdx(k) = sign_dir * vsus / ( km_neutral + 1E-10_wp )
+                   dwdx(k) = sign_dir * wsus / ( km_neutral + 1E-10_wp )
+                ENDDO
+!
+!--             Urban surfaces
+                surf_s = surf_usm_v(l)%start_index(j,i)
+                surf_e = surf_usm_v(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k     = surf_usm_v(l)%k(m)
+                   vsus  = surf_usm_v(l)%mom_flux_tke(0,m)
+                   wsus  = surf_usm_v(l)%mom_flux_tke(1,m)
+
+                   km_neutral = kappa * ( vsus**2 + wsus**2 )**0.25_wp         &
+                                      * 0.5_wp * dx
+!
+!--                -1.0 for right-facing wall, 1.0 for left-facing wall
+                   sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                                     BTEST( wall_flags_0(k,j,i-1), flag_nr ) )
+                   dvdx(k) = sign_dir * vsus / ( km_neutral + 1E-10_wp )
+                   dwdx(k) = sign_dir * wsus / ( km_neutral + 1E-10_wp )
+                ENDDO
+             ENDDO
+!
+!--          Compute gradients at upward-facing surfaces
+             surf_s = surf_def_h(0)%start_index(j,i)
+             surf_e = surf_def_h(0)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_def_h(0)%k(m)
+!
+!--             Please note, actually, an interpolation of u_0 and v_0
+!--             onto the grid center would be required. However, this
+!--             would require several data transfers between 2D-grid and
+!--             wall type. The effect of this missing interpolation is
+!--             negligible. (See also production_e_init).
+                dudz(k) = ( u(k+1,j,i) - surf_def_h(0)%u_0(m) ) * dd2zu(k)
+                dvdz(k) = ( v(k+1,j,i) - surf_def_h(0)%v_0(m) ) * dd2zu(k)
+
+             ENDDO
+!
+!--          Natural surfaces
+             surf_s = surf_lsm_h%start_index(j,i)
+             surf_e = surf_lsm_h%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_lsm_h%k(m)
+
+                dudz(k) = ( u(k+1,j,i) - surf_lsm_h%u_0(m) ) * dd2zu(k)
+                dvdz(k) = ( v(k+1,j,i) - surf_lsm_h%v_0(m) ) * dd2zu(k)
+
+             ENDDO
+!
+!--          Urban surfaces
+             surf_s = surf_usm_h%start_index(j,i)
+             surf_e = surf_usm_h%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_usm_h%k(m)
+
+                dudz(k) = ( u(k+1,j,i) - surf_usm_h%u_0(m) ) * dd2zu(k)
+                dvdz(k) = ( v(k+1,j,i) - surf_usm_h%v_0(m) ) * dd2zu(k)
+
+             ENDDO
+!
+!--          Compute gradients at downward-facing walls, only for
+!--          non-natural default surfaces
+             surf_s = surf_def_h(1)%start_index(j,i)
+             surf_e = surf_def_h(1)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_def_h(1)%k(m)
+
+                dudz(k) = ( surf_def_h(1)%u_0(m) - u(k-1,j,i) ) * dd2zu(k)
+                dvdz(k) = ( surf_def_h(1)%v_0(m) - v(k-1,j,i) ) * dd2zu(k)
+
+             ENDDO
+
+
+          ENDIF
+
+
+          DO  k = nzb+1, nzt
+
+             def = 2.0_wp * ( dudx(k)**2 + dvdy(k)**2 + dwdz(k)**2 ) +         &
+                              dudy(k)**2 + dvdx(k)**2 + dwdx(k)**2 +           &
+                              dwdy(k)**2 + dudz(k)**2 + dvdz(k)**2 +           &
+                   2.0_wp * ( dvdx(k)*dudy(k) + dwdx(k)*dudz(k) +              &
+                              dwdy(k)*dvdz(k) )
+
+             IF ( def < 0.0_wp )  def = 0.0_wp
+
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),flag_nr) )
+
+             IF ( .NOT. diss_production )  THEN
+
+!--             Compute temdency for TKE-production from shear
+                tend(k,j,i) = tend(k,j,i) + km(k,j,i) * def * flag
+
+             ELSE
+
+!--             RANS mode: Compute temdency for dissipation-rate-production from shear
+                tend(k,j,i) = tend(k,j,i) + km(k,j,i) * def * flag *           &
+                              diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) * c_1
+
+             ENDIF
+
+          ENDDO
+
+
+       ENDDO
+    ENDDO
+
+!
+!-- If required, calculate TKE production by buoyancy
+    IF ( .NOT. neutral )  THEN
+
+       IF ( .NOT. humidity )  THEN
+
+          IF ( ocean_mode )  THEN
+!
+!--          So far in the ocean no special treatment of density flux
+!--          in the bottom and top surface layer
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+
+                   DO  k = nzb+1, nzt
+                      tmp_flux(k) = kh(k,j,i) * ( prho(k+1,j,i) - prho(k-1,j,i) ) * dd2zu(k)
+                   ENDDO
+!
+!--                Treatment of near-surface grid points, at up- and down-
+!--                ward facing surfaces
+                   IF ( use_surface_fluxes )  THEN
+                      DO  l = 0, 1
+                         surf_s = surf_def_h(l)%start_index(j,i)
+                         surf_e = surf_def_h(l)%end_index(j,i)
+                         DO  m = surf_s, surf_e
+                            k = surf_def_h(l)%k(m)
+                            tmp_flux(k) = drho_air_zw(k-1) * surf_def_h(l)%shf(m)
+                         ENDDO
+                      ENDDO
+                   ENDIF
+
+                   IF ( use_top_fluxes )  THEN
+                      surf_s = surf_def_h(2)%start_index(j,i)
+                      surf_e = surf_def_h(2)%end_index(j,i)
+                      DO  m = surf_s, surf_e
+                         k = surf_def_h(2)%k(m)
+                         tmp_flux(k) = drho_air_zw(k) * surf_def_h(2)%shf(m)
+                      ENDDO
+                   ENDIF
+
+                   IF ( .NOT. diss_production )  THEN
+
+!--                   Compute temdency for TKE-production from shear
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                         tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                       MERGE( rho_reference, prho(k,j,i),       &
+                                              use_single_reference_value ) )
+                      ENDDO
+
+                   ELSE
+
+!--                   RANS mode: Compute temdency for dissipation-rate-production from shear
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                         tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                       MERGE( rho_reference, prho(k,j,i),       &
+                                              use_single_reference_value ) ) *  &
+                                       diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) *  &
+                                       c_3
+                      ENDDO
+
+                   ENDIF
+
+                ENDDO
+             ENDDO
+
+          ELSE ! or IF ( .NOT. ocean_mode )  THEN
+
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+
+                   DO  k = nzb+1, nzt
+                      tmp_flux(k) = -1.0_wp * kh(k,j,i) * ( pt(k+1,j,i) - pt(k-1,j,i) ) * dd2zu(k)
+                   ENDDO
+
+                   IF ( use_surface_fluxes )  THEN
+!
+!--                   Default surfaces, up- and downward-facing
+                      DO  l = 0, 1
+                         surf_s = surf_def_h(l)%start_index(j,i)
+                         surf_e = surf_def_h(l)%end_index(j,i)
+                         DO  m = surf_s, surf_e
+                            k = surf_def_h(l)%k(m)
+                            tmp_flux(k) = drho_air_zw(k-1) * surf_def_h(l)%shf(m)
+                         ENDDO
+                      ENDDO
+!
+!--                   Natural surfaces
+                      surf_s = surf_lsm_h%start_index(j,i)
+                      surf_e = surf_lsm_h%end_index(j,i)
+                      DO  m = surf_s, surf_e
+                         k = surf_lsm_h%k(m)
+                         tmp_flux(k) = drho_air_zw(k-1) * surf_lsm_h%shf(m)
+                      ENDDO
+!
+!--                   Urban surfaces
+                      surf_s = surf_usm_h%start_index(j,i)
+                      surf_e = surf_usm_h%end_index(j,i)
+                      DO  m = surf_s, surf_e
+                         k = surf_usm_h%k(m)
+                         tmp_flux(k) = drho_air_zw(k-1) * surf_usm_h%shf(m)
+                      ENDDO
+                   ENDIF
+
+                   IF ( use_top_fluxes )  THEN
+                      surf_s = surf_def_h(2)%start_index(j,i)
+                      surf_e = surf_def_h(2)%end_index(j,i)
+                      DO  m = surf_s, surf_e
+                         k = surf_def_h(2)%k(m)
+                         tmp_flux(k) = drho_air_zw(k) * surf_def_h(2)%shf(m)
+                      ENDDO
+                   ENDIF
+
+                   IF ( .NOT. diss_production )  THEN
+
+!--                   Compute temdency for TKE-production from shear
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                         tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                       MERGE( pt_reference, pt(k,j,i),          &
+                                              use_single_reference_value ) )
+                      ENDDO
+
+                   ELSE
+
+!--                   RANS mode: Compute temdency for dissipation-rate-production from shear
+                      DO  k = nzb+1, nzt
+                         flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                         tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                       MERGE( pt_reference, pt(k,j,i),          &
+                                              use_single_reference_value ) ) *  &
+                                       diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) *  &
+                                       c_3
+                      ENDDO
+
+                   ENDIF
+
+                ENDDO
+             ENDDO
+
+          ENDIF ! from IF ( .NOT. ocean_mode )
+
+       ELSE ! or IF ( humidity )  THEN
+
+          DO  i = nxl, nxr
+             DO  j = nys, nyn
+
+                DO  k = nzb+1, nzt
+
+                   IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                      tmp_flux(k) = -1.0_wp * kh(k,j,i) *                      &
+                                      ( k1 * ( pt(k+1,j,i) - pt(k-1,j,i) ) +   &
+                                        k2 * ( q(k+1,j,i)  - q(k-1,j,i) )      &
+                                      ) * dd2zu(k)
+                   ELSE IF ( bulk_cloud_model )  THEN
+                      IF ( ql(k,j,i) == 0.0_wp )  THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ELSE
+                         theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                         temp  = theta * exner(k)
+                         k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *                  &
+                                       ( q(k,j,i) - ql(k,j,i) ) *              &
+                              ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /        &
+                              ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *         &
+                              ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                         k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                      ENDIF
+                      tmp_flux(k) = -1.0_wp * kh(k,j,i) *                      &
+                                      ( k1 * ( pt(k+1,j,i) - pt(k-1,j,i) ) +   &
+                                        k2 * ( q(k+1,j,i)  - q(k-1,j,i) )      &
+                                      ) * dd2zu(k)
+                   ELSE IF ( cloud_droplets )  THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                      tmp_flux(k) = -1.0_wp * kh(k,j,i) * &
+                                      ( k1 * ( pt(k+1,j,i) - pt(k-1,j,i) ) +   &
+                                        k2 * ( q(k+1,j,i)  - q(k-1,j,i) ) -    &
+                                        pt(k,j,i) * ( ql(k+1,j,i) -            &
+                                        ql(k-1,j,i) ) ) * dd2zu(k)
+                   ENDIF
+
+                ENDDO
+
+                IF ( use_surface_fluxes )  THEN
+!
+!--                Treat horizontal default surfaces
+                   DO  l = 0, 1
+                      surf_s = surf_def_h(l)%start_index(j,i)
+                      surf_e = surf_def_h(l)%end_index(j,i)
+                      DO  m = surf_s, surf_e
+                         k = surf_def_h(l)%k(m)
+
+                         IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                            k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                            k2 = 0.61_wp * pt(k,j,i)
+                         ELSE IF ( bulk_cloud_model )  THEN
+                            IF ( ql(k,j,i) == 0.0_wp )  THEN
+                               k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                               k2 = 0.61_wp * pt(k,j,i)
+                            ELSE
+                               theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                               temp  = theta * exner(k)
+                               k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *            &
+                                          ( q(k,j,i) - ql(k,j,i) ) *           &
+                                 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /     &
+                                 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *      &
+                                 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                               k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                            ENDIF
+                         ELSE IF ( cloud_droplets )  THEN
+                            k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                            k2 = 0.61_wp * pt(k,j,i)
+                         ENDIF
+
+                         tmp_flux(k) = ( k1 * surf_def_h(l)%shf(m) +           &
+                                         k2 * surf_def_h(l)%qsws(m)            &
+                                       ) * drho_air_zw(k-1)
+                      ENDDO
+                   ENDDO
+!
+!--                Treat horizontal natural surfaces
+                   surf_s = surf_lsm_h%start_index(j,i)
+                   surf_e = surf_lsm_h%end_index(j,i)
+                   DO  m = surf_s, surf_e
+                      k = surf_lsm_h%k(m)
+
+                      IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ELSE IF ( bulk_cloud_model )  THEN
+                         IF ( ql(k,j,i) == 0.0_wp )  THEN
+                            k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                            k2 = 0.61_wp * pt(k,j,i)
+                         ELSE
+                            theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                            temp  = theta * exner(k)
+                            k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *               &
+                                          ( q(k,j,i) - ql(k,j,i) ) *           &
+                                 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /     &
+                                 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *      &
+                                 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                            k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                         ENDIF
+                      ELSE IF ( cloud_droplets )  THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ENDIF
+
+                      tmp_flux(k) = ( k1 * surf_lsm_h%shf(m) +                 &
+                                      k2 * surf_lsm_h%qsws(m)                  &
+                                    ) * drho_air_zw(k-1)
+                   ENDDO
+!
+!--                Treat horizontal urban surfaces
+                   surf_s = surf_usm_h%start_index(j,i)
+                   surf_e = surf_usm_h%end_index(j,i)
+                   DO  m = surf_s, surf_e
+                      k = surf_usm_h%k(m)
+
+                      IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ELSE IF ( bulk_cloud_model )  THEN
+                         IF ( ql(k,j,i) == 0.0_wp )  THEN
+                            k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                            k2 = 0.61_wp * pt(k,j,i)
+                         ELSE
+                            theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                            temp  = theta * exner(k)
+                            k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *               &
+                                          ( q(k,j,i) - ql(k,j,i) ) *           &
+                                 ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /     &
+                                 ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *      &
+                                 ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                            k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                         ENDIF
+                      ELSE IF ( cloud_droplets )  THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ENDIF
+
+                      tmp_flux(k) = ( k1 * surf_usm_h%shf(m) +                 &
+                                      k2 * surf_usm_h%qsws(m)                  &
+                                    ) * drho_air_zw(k-1)
+                   ENDDO
+
+                ENDIF ! from IF ( use_surface_fluxes )  THEN
+
+                IF ( use_top_fluxes )  THEN
+
+                   surf_s = surf_def_h(2)%start_index(j,i)
+                   surf_e = surf_def_h(2)%end_index(j,i)
+                   DO  m = surf_s, surf_e
+                      k = surf_def_h(2)%k(m)
+
+                      IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ELSE IF ( bulk_cloud_model )  THEN
+                         IF ( ql(k,j,i) == 0.0_wp )  THEN
+                            k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                            k2 = 0.61_wp * pt(k,j,i)
+                         ELSE
+                            theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                            temp  = theta * exner(k)
+                            k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *               &
+                                       ( q(k,j,i) - ql(k,j,i) ) *              &
+                              ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /        &
+                              ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *         &
+                              ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                            k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                         ENDIF
+                      ELSE IF ( cloud_droplets )  THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ENDIF
+
+                      tmp_flux(k) = ( k1 * surf_def_h(2)%shf(m) +              &
+                                      k2 * surf_def_h(2)%qsws(m)               &
+                                    ) * drho_air_zw(k)
+
+                   ENDDO
+
+                ENDIF ! from IF ( use_top_fluxes )  THEN
+
+                IF ( .NOT. diss_production )  THEN
+
+!--                Compute temdency for TKE-production from shear
+                   DO  k = nzb+1, nzt
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                      tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                    MERGE( vpt_reference, vpt(k,j,i),          &
+                                           use_single_reference_value ) )
+                   ENDDO
+
+                ELSE
+
+!--                RANS mode: Compute temdency for dissipation-rate-production from shear
+                   DO  k = nzb+1, nzt
+                      flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                      tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g /   &
+                                    MERGE( vpt_reference, vpt(k,j,i),          &
+                                           use_single_reference_value ) ) *    &
+                                    diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) *    &
+                                    c_3
+                   ENDDO
+
+                ENDIF
+
+             ENDDO
+          ENDDO
+
+       ENDIF
+
+    ENDIF
+
+ END SUBROUTINE production_e
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Production terms (shear + buoyancy) of the TKE.
+!> Cache-optimized version
+!> @warning The case with constant_flux_layer = F and use_surface_fluxes = T is
+!>          not considered well!
+!> @todo non-neutral case is not yet considered for RANS mode
+!------------------------------------------------------------------------------!
+ SUBROUTINE production_e_ij( i, j, diss_production )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzw, dd2zu, drho_air_zw, q, ql, d_exner, exner
+
+    USE control_parameters,                                                    &
+        ONLY:  cloud_droplets, constant_flux_layer, neutral,                   &
+               rho_reference, use_single_reference_value, use_surface_fluxes,  &
+               use_top_fluxes
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, dx, ddy, dy
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  bulk_cloud_model
+
+    USE surface_mod,                                                           &
+        ONLY :  surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v, surf_usm_h,    &
+                surf_usm_v
+
+    IMPLICIT NONE
+
+    LOGICAL :: diss_production
+
+    INTEGER(iwp) ::  i       !< running index x-direction
+    INTEGER(iwp) ::  j       !< running index y-direction
+    INTEGER(iwp) ::  k       !< running index z-direction
+    INTEGER(iwp) ::  l       !< running index for different surface type orientation
+    INTEGER(iwp) ::  m       !< running index surface elements
+    INTEGER(iwp) ::  surf_e  !< end index of surface elements at given i-j position
+    INTEGER(iwp) ::  surf_s  !< start index of surface elements at given i-j position
+    INTEGER(iwp) ::  flag_nr !< number of masking flag
+
+    REAL(wp)     ::  def         !<
+    REAL(wp)     ::  flag        !< flag to mask topography
+    REAL(wp)     ::  k1          !<
+    REAL(wp)     ::  k2          !<
+    REAL(wp)     ::  km_neutral  !< diffusion coefficient assuming neutral conditions - used to compute shear production at surfaces
+    REAL(wp)     ::  theta       !<
+    REAL(wp)     ::  temp        !<
+    REAL(wp)     ::  sign_dir    !< sign of wall-tke flux, depending on wall orientation
+    REAL(wp)     ::  usvs        !< momentum flux u"v"
+    REAL(wp)     ::  vsus        !< momentum flux v"u"
+    REAL(wp)     ::  wsus        !< momentum flux w"u"
+    REAL(wp)     ::  wsvs        !< momentum flux w"v"
+
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dudx  !< Gradient of u-component in x-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dudy  !< Gradient of u-component in y-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dudz  !< Gradient of u-component in z-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dvdx  !< Gradient of v-component in x-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dvdy  !< Gradient of v-component in y-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dvdz  !< Gradient of v-component in z-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dwdx  !< Gradient of w-component in x-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dwdy  !< Gradient of w-component in y-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dwdz  !< Gradient of w-component in z-direction
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  tmp_flux  !< temporary flux-array in z-direction
+
+
+
+!
+!-- Calculate TKE production by shear. Calculate gradients at all grid
+!-- points first, gradients at surface-bounded grid points will be
+!-- overwritten further below.
+    DO  k = nzb+1, nzt
+
+       dudx(k) =           ( u(k,j,i+1) - u(k,j,i)     ) * ddx
+       dudy(k) = 0.25_wp * ( u(k,j+1,i) + u(k,j+1,i+1) -                 &
+                             u(k,j-1,i) - u(k,j-1,i+1) ) * ddy
+       dudz(k) = 0.5_wp  * ( u(k+1,j,i) + u(k+1,j,i+1) -                 &
+                             u(k-1,j,i) - u(k-1,j,i+1) ) * dd2zu(k)
+
+       dvdx(k) = 0.25_wp * ( v(k,j,i+1) + v(k,j+1,i+1) -                 &
+                             v(k,j,i-1) - v(k,j+1,i-1) ) * ddx
+       dvdy(k) =           ( v(k,j+1,i) - v(k,j,i)     ) * ddy
+       dvdz(k) = 0.5_wp  * ( v(k+1,j,i) + v(k+1,j+1,i) -                 &
+                               v(k-1,j,i) - v(k-1,j+1,i) ) * dd2zu(k)
+
+       dwdx(k) = 0.25_wp * ( w(k,j,i+1) + w(k-1,j,i+1) -                 &
+                             w(k,j,i-1) - w(k-1,j,i-1) ) * ddx
+       dwdy(k) = 0.25_wp * ( w(k,j+1,i) + w(k-1,j+1,i) -                 &
+                             w(k,j-1,i) - w(k-1,j-1,i) ) * ddy
+       dwdz(k) =           ( w(k,j,i)   - w(k-1,j,i)   ) * ddzw(k)
+
+    ENDDO
+
+    flag_nr = 29
+
+    IF ( constant_flux_layer )  THEN
+
+       flag_nr = 0
+
+!--    Position beneath wall
+!--    (2) - Will allways be executed.
+!--    'bottom and wall: use u_0,v_0 and wall functions'
+!
+!--    Compute gradients at north- and south-facing surfaces.
+!--    First, for default surfaces, then for urban surfaces.
+!--    Note, so far no natural vertical surfaces implemented
+       DO  l = 0, 1
+          surf_s = surf_def_v(l)%start_index(j,i)
+          surf_e = surf_def_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_def_v(l)%k(m)
+             usvs        = surf_def_v(l)%mom_flux_tke(0,m)
+             wsvs        = surf_def_v(l)%mom_flux_tke(1,m)
+
+             km_neutral = kappa * ( usvs**2 + wsvs**2 )**0.25_wp         &
+                             * 0.5_wp * dy
+!
+!--          -1.0 for right-facing wall, 1.0 for left-facing wall
+             sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                               BTEST( wall_flags_0(k,j-1,i), flag_nr ) )
+             dudy(k) = sign_dir * usvs / ( km_neutral + 1E-10_wp )
+             dwdy(k) = sign_dir * wsvs / ( km_neutral + 1E-10_wp )
+          ENDDO
+!
+!--       Natural surfaces
+          surf_s = surf_lsm_v(l)%start_index(j,i)
+          surf_e = surf_lsm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_lsm_v(l)%k(m)
+             usvs        = surf_lsm_v(l)%mom_flux_tke(0,m)
+             wsvs        = surf_lsm_v(l)%mom_flux_tke(1,m)
+
+             km_neutral = kappa * ( usvs**2 + wsvs**2 )**0.25_wp         &
+                             * 0.5_wp * dy
+!
+!--          -1.0 for right-facing wall, 1.0 for left-facing wall
+             sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                               BTEST( wall_flags_0(k,j-1,i), flag_nr ) )
+             dudy(k) = sign_dir * usvs / ( km_neutral + 1E-10_wp )
+             dwdy(k) = sign_dir * wsvs / ( km_neutral + 1E-10_wp )
+          ENDDO
+!
+!--       Urban surfaces
+          surf_s = surf_usm_v(l)%start_index(j,i)
+          surf_e = surf_usm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k           = surf_usm_v(l)%k(m)
+             usvs        = surf_usm_v(l)%mom_flux_tke(0,m)
+             wsvs        = surf_usm_v(l)%mom_flux_tke(1,m)
+
+             km_neutral = kappa * ( usvs**2 + wsvs**2 )**0.25_wp         &
+                             * 0.5_wp * dy
+!
+!--          -1.0 for right-facing wall, 1.0 for left-facing wall
+             sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                               BTEST( wall_flags_0(k,j-1,i), flag_nr ) )
+             dudy(k) = sign_dir * usvs / ( km_neutral + 1E-10_wp )
+             dwdy(k) = sign_dir * wsvs / ( km_neutral + 1E-10_wp )
+          ENDDO
+       ENDDO
+!
+!--          Compute gradients at east- and west-facing walls
+       DO  l = 2, 3
+          surf_s = surf_def_v(l)%start_index(j,i)
+          surf_e = surf_def_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k     = surf_def_v(l)%k(m)
+             vsus  = surf_def_v(l)%mom_flux_tke(0,m)
+             wsus  = surf_def_v(l)%mom_flux_tke(1,m)
+
+             km_neutral = kappa * ( vsus**2 + wsus**2 )**0.25_wp         &
+                                * 0.5_wp * dx
+!
+!--          -1.0 for right-facing wall, 1.0 for left-facing wall
+             sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                               BTEST( wall_flags_0(k,j,i-1), flag_nr ) )
+             dvdx(k) = sign_dir * vsus / ( km_neutral + 1E-10_wp )
+             dwdx(k) = sign_dir * wsus / ( km_neutral + 1E-10_wp )
+          ENDDO
+!
+!--             Natural surfaces
+          surf_s = surf_lsm_v(l)%start_index(j,i)
+          surf_e = surf_lsm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k     = surf_lsm_v(l)%k(m)
+             vsus  = surf_lsm_v(l)%mom_flux_tke(0,m)
+             wsus  = surf_lsm_v(l)%mom_flux_tke(1,m)
+
+             km_neutral = kappa * ( vsus**2 + wsus**2 )**0.25_wp         &
+                                * 0.5_wp * dx
+!
+!--          -1.0 for right-facing wall, 1.0 for left-facing wall
+             sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                               BTEST( wall_flags_0(k,j,i-1), flag_nr ) )
+             dvdx(k) = sign_dir * vsus / ( km_neutral + 1E-10_wp )
+             dwdx(k) = sign_dir * wsus / ( km_neutral + 1E-10_wp )
+          ENDDO
+!
+!--             Urban surfaces
+          surf_s = surf_usm_v(l)%start_index(j,i)
+          surf_e = surf_usm_v(l)%end_index(j,i)
+          DO  m = surf_s, surf_e
+             k     = surf_usm_v(l)%k(m)
+             vsus  = surf_usm_v(l)%mom_flux_tke(0,m)
+             wsus  = surf_usm_v(l)%mom_flux_tke(1,m)
+
+             km_neutral = kappa * ( vsus**2 + wsus**2 )**0.25_wp         &
+                                * 0.5_wp * dx
+!
+!--          -1.0 for right-facing wall, 1.0 for left-facing wall
+             sign_dir = MERGE( 1.0_wp, -1.0_wp,                          &
+                               BTEST( wall_flags_0(k,j,i-1), flag_nr ) )
+             dvdx(k) = sign_dir * vsus / ( km_neutral + 1E-10_wp )
+             dwdx(k) = sign_dir * wsus / ( km_neutral + 1E-10_wp )
+          ENDDO
+       ENDDO
+!
+!--          Compute gradients at upward-facing surfaces
+       surf_s = surf_def_h(0)%start_index(j,i)
+       surf_e = surf_def_h(0)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k = surf_def_h(0)%k(m)
+!
+!--       Please note, actually, an interpolation of u_0 and v_0
+!--       onto the grid center would be required. However, this
+!--       would require several data transfers between 2D-grid and
+!--       wall type. The effect of this missing interpolation is
+!--       negligible. (See also production_e_init).
+          dudz(k) = ( u(k+1,j,i) - surf_def_h(0)%u_0(m) ) * dd2zu(k)
+          dvdz(k) = ( v(k+1,j,i) - surf_def_h(0)%v_0(m) ) * dd2zu(k)
+
+       ENDDO
+!
+!--    Natural surfaces
+       surf_s = surf_lsm_h%start_index(j,i)
+       surf_e = surf_lsm_h%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k = surf_lsm_h%k(m)
+
+          dudz(k) = ( u(k+1,j,i) - surf_lsm_h%u_0(m) ) * dd2zu(k)
+          dvdz(k) = ( v(k+1,j,i) - surf_lsm_h%v_0(m) ) * dd2zu(k)
+
+       ENDDO
+!
+!--    Urban surfaces
+       surf_s = surf_usm_h%start_index(j,i)
+       surf_e = surf_usm_h%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k = surf_usm_h%k(m)
+
+          dudz(k) = ( u(k+1,j,i) - surf_usm_h%u_0(m) ) * dd2zu(k)
+          dvdz(k) = ( v(k+1,j,i) - surf_usm_h%v_0(m) ) * dd2zu(k)
+
+       ENDDO
+!
+!--    Compute gradients at downward-facing walls, only for
+!--    non-natural default surfaces
+       surf_s = surf_def_h(1)%start_index(j,i)
+       surf_e = surf_def_h(1)%end_index(j,i)
+       DO  m = surf_s, surf_e
+          k = surf_def_h(1)%k(m)
+
+          dudz(k) = ( surf_def_h(1)%u_0(m) - u(k-1,j,i) ) * dd2zu(k)
+          dvdz(k) = ( surf_def_h(1)%v_0(m) - v(k-1,j,i) ) * dd2zu(k)
+
+       ENDDO
+
+    ENDIF
+
+    DO  k = nzb+1, nzt
+
+       def = 2.0_wp * ( dudx(k)**2 + dvdy(k)**2 + dwdz(k)**2 ) +         &
+                        dudy(k)**2 + dvdx(k)**2 + dwdx(k)**2 +           &
+                        dwdy(k)**2 + dudz(k)**2 + dvdz(k)**2 +           &
+             2.0_wp * ( dvdx(k)*dudy(k) + dwdx(k)*dudz(k) +              &
+                        dwdy(k)*dvdz(k) )
+
+       IF ( def < 0.0_wp )  def = 0.0_wp
+
+       flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),flag_nr) )
+
+       IF ( .NOT. diss_production )  THEN
+
+!--       Compute temdency for TKE-production from shear
+          tend(k,j,i) = tend(k,j,i) + km(k,j,i) * def * flag
+
+       ELSE
+
+!--       RANS mode: Compute temdency for dissipation-rate-production from shear
+          tend(k,j,i) = tend(k,j,i) + km(k,j,i) * def * flag *           &
+                        diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) * c_1
+
+       ENDIF
+
+    ENDDO
+
+
+!
+!-- If required, calculate TKE production by buoyancy
+    IF ( .NOT. neutral )  THEN
+
+       IF ( .NOT. humidity )  THEN
+
+          IF ( ocean_mode )  THEN
+!
+!--          So far in the ocean no special treatment of density flux
+!--          in the bottom and top surface layer
+
+             DO  k = nzb+1, nzt
+                tmp_flux(k) = kh(k,j,i) * ( prho(k+1,j,i) - prho(k-1,j,i) ) * dd2zu(k)
+             ENDDO
+!
+!--          Treatment of near-surface grid points, at up- and down-
+!--          ward facing surfaces
+             IF ( use_surface_fluxes )  THEN
+                DO  l = 0, 1
+                   surf_s = surf_def_h(l)%start_index(j,i)
+                   surf_e = surf_def_h(l)%end_index(j,i)
+                   DO  m = surf_s, surf_e
+                      k = surf_def_h(l)%k(m)
+                      tmp_flux(k) = drho_air_zw(k-1) * surf_def_h(l)%shf(m)
+                   ENDDO
+                ENDDO
+             ENDIF
+
+             IF ( use_top_fluxes )  THEN
+                surf_s = surf_def_h(2)%start_index(j,i)
+                surf_e = surf_def_h(2)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k = surf_def_h(2)%k(m)
+                   tmp_flux(k) = drho_air_zw(k) * surf_def_h(2)%shf(m)
+                ENDDO
+             ENDIF
+
+             IF ( .NOT. diss_production )  THEN
+
+!--             Compute temdency for TKE-production from shear
+                DO  k = nzb+1, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                   tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                 MERGE( rho_reference, prho(k,j,i),       &
+                                        use_single_reference_value ) )
+                ENDDO
+
+             ELSE
+
+!--             RANS mode: Compute temdency for dissipation-rate-production from shear
+                DO  k = nzb+1, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                   tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                 MERGE( rho_reference, prho(k,j,i),       &
+                                        use_single_reference_value ) ) *  &
+                                 diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) *  &
+                                 c_3
+                ENDDO
+
+             ENDIF
+
+
+          ELSE ! or IF ( .NOT. ocean_mode )  THEN
+
+             DO  k = nzb+1, nzt
+                tmp_flux(k) = -1.0_wp * kh(k,j,i) * ( pt(k+1,j,i) - pt(k-1,j,i) ) * dd2zu(k)
+             ENDDO
+
+             IF ( use_surface_fluxes )  THEN
+!
+!--             Default surfaces, up- and downward-facing
+                DO  l = 0, 1
+                   surf_s = surf_def_h(l)%start_index(j,i)
+                   surf_e = surf_def_h(l)%end_index(j,i)
+                   DO  m = surf_s, surf_e
+                      k = surf_def_h(l)%k(m)
+                      tmp_flux(k) = drho_air_zw(k-1) * surf_def_h(l)%shf(m)
+                   ENDDO
+                ENDDO
+!
+!--             Natural surfaces
+                surf_s = surf_lsm_h%start_index(j,i)
+                surf_e = surf_lsm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k = surf_lsm_h%k(m)
+                   tmp_flux(k) = drho_air_zw(k-1) * surf_lsm_h%shf(m)
+                ENDDO
+!
+!--             Urban surfaces
+                surf_s = surf_usm_h%start_index(j,i)
+                surf_e = surf_usm_h%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k = surf_usm_h%k(m)
+                   tmp_flux(k) = drho_air_zw(k-1) * surf_usm_h%shf(m)
+                ENDDO
+             ENDIF
+
+             IF ( use_top_fluxes )  THEN
+                surf_s = surf_def_h(2)%start_index(j,i)
+                surf_e = surf_def_h(2)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k = surf_def_h(2)%k(m)
+                   tmp_flux(k) = drho_air_zw(k) * surf_def_h(2)%shf(m)
+                ENDDO
+             ENDIF
+
+             IF ( .NOT. diss_production )  THEN
+
+!--             Compute temdency for TKE-production from shear
+                DO  k = nzb+1, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                   tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                 MERGE( pt_reference, pt(k,j,i),          &
+                                        use_single_reference_value ) )
+                ENDDO
+
+             ELSE
+
+!--             RANS mode: Compute temdency for dissipation-rate-production from shear
+                DO  k = nzb+1, nzt
+                   flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                   tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                                 MERGE( pt_reference, pt(k,j,i),          &
+                                        use_single_reference_value ) ) *  &
+                                 diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) *  &
+                                 c_3
+                ENDDO
+
+             ENDIF
+
+          ENDIF ! from IF ( .NOT. ocean_mode )
+
+       ELSE ! or IF ( humidity )  THEN
+
+          DO  k = nzb+1, nzt
+
+             IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                k2 = 0.61_wp * pt(k,j,i)
+                tmp_flux(k) = -1.0_wp * kh(k,j,i) *                      &
+                                ( k1 * ( pt(k+1,j,i) - pt(k-1,j,i) ) +   &
+                                  k2 * ( q(k+1,j,i)  - q(k-1,j,i) )      &
+                                ) * dd2zu(k)
+             ELSE IF ( bulk_cloud_model )  THEN
+                IF ( ql(k,j,i) == 0.0_wp )  THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ELSE
+                   theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                   temp  = theta * exner(k)
+                   k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *                  &
+                                 ( q(k,j,i) - ql(k,j,i) ) *              &
+                        ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /        &
+                        ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *         &
+                        ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                   k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                ENDIF
+                tmp_flux(k) = -1.0_wp * kh(k,j,i) *                      &
+                                ( k1 * ( pt(k+1,j,i) - pt(k-1,j,i) ) +   &
+                                  k2 * ( q(k+1,j,i)  - q(k-1,j,i) )      &
+                                ) * dd2zu(k)
+             ELSE IF ( cloud_droplets )  THEN
+                k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                k2 = 0.61_wp * pt(k,j,i)
+                tmp_flux(k) = -1.0_wp * kh(k,j,i) * &
+                                ( k1 * ( pt(k+1,j,i) - pt(k-1,j,i) ) +   &
+                                  k2 * ( q(k+1,j,i)  - q(k-1,j,i) ) -    &
+                                  pt(k,j,i) * ( ql(k+1,j,i) -            &
+                                  ql(k-1,j,i) ) ) * dd2zu(k)
+             ENDIF
+
+          ENDDO
+
+          IF ( use_surface_fluxes )  THEN
+!
+!--          Treat horizontal default surfaces
+             DO  l = 0, 1
+                surf_s = surf_def_h(l)%start_index(j,i)
+                surf_e = surf_def_h(l)%end_index(j,i)
+                DO  m = surf_s, surf_e
+                   k = surf_def_h(l)%k(m)
+
+                   IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                   ELSE IF ( bulk_cloud_model )  THEN
+                      IF ( ql(k,j,i) == 0.0_wp )  THEN
+                         k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                         k2 = 0.61_wp * pt(k,j,i)
+                      ELSE
+                         theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                         temp  = theta * exner(k)
+                         k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *            &
+                                    ( q(k,j,i) - ql(k,j,i) ) *           &
+                           ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /     &
+                           ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *      &
+                           ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                         k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                      ENDIF
+                   ELSE IF ( cloud_droplets )  THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                   ENDIF
+
+                   tmp_flux(k) = ( k1 * surf_def_h(l)%shf(m) +           &
+                                   k2 * surf_def_h(l)%qsws(m)            &
+                                 ) * drho_air_zw(k-1)
+                ENDDO
+             ENDDO
+!
+!--          Treat horizontal natural surfaces
+             surf_s = surf_lsm_h%start_index(j,i)
+             surf_e = surf_lsm_h%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_lsm_h%k(m)
+
+                IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ELSE IF ( bulk_cloud_model )  THEN
+                   IF ( ql(k,j,i) == 0.0_wp )  THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                   ELSE
+                      theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                      temp  = theta * exner(k)
+                      k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *               &
+                                    ( q(k,j,i) - ql(k,j,i) ) *           &
+                           ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /     &
+                           ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *      &
+                           ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                      k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                   ENDIF
+                ELSE IF ( cloud_droplets )  THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ENDIF
+
+                tmp_flux(k) = ( k1 * surf_lsm_h%shf(m) +                 &
+                                k2 * surf_lsm_h%qsws(m)                  &
+                              ) * drho_air_zw(k-1)
+             ENDDO
+!
+!--          Treat horizontal urban surfaces
+             surf_s = surf_usm_h%start_index(j,i)
+             surf_e = surf_usm_h%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_usm_h%k(m)
+
+                IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ELSE IF ( bulk_cloud_model )  THEN
+                   IF ( ql(k,j,i) == 0.0_wp )  THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                   ELSE
+                      theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                      temp  = theta * exner(k)
+                      k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *               &
+                                    ( q(k,j,i) - ql(k,j,i) ) *           &
+                           ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /     &
+                           ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *      &
+                           ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                      k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                   ENDIF
+                ELSE IF ( cloud_droplets )  THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ENDIF
+
+                tmp_flux(k) = ( k1 * surf_usm_h%shf(m) +                 &
+                                k2 * surf_usm_h%qsws(m)                  &
+                              ) * drho_air_zw(k-1)
+             ENDDO
+
+          ENDIF ! from IF ( use_surface_fluxes )  THEN
+
+          IF ( use_top_fluxes )  THEN
+
+             surf_s = surf_def_h(2)%start_index(j,i)
+             surf_e = surf_def_h(2)%end_index(j,i)
+             DO  m = surf_s, surf_e
+                k = surf_def_h(2)%k(m)
+
+                IF ( .NOT. bulk_cloud_model .AND. .NOT. cloud_droplets ) THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ELSE IF ( bulk_cloud_model )  THEN
+                   IF ( ql(k,j,i) == 0.0_wp )  THEN
+                      k1 = 1.0_wp + 0.61_wp * q(k,j,i)
+                      k2 = 0.61_wp * pt(k,j,i)
+                   ELSE
+                      theta = pt(k,j,i) + d_exner(k) * lv_d_cp * ql(k,j,i)
+                      temp  = theta * exner(k)
+                      k1 = ( 1.0_wp - q(k,j,i) + 1.61_wp *               &
+                                 ( q(k,j,i) - ql(k,j,i) ) *              &
+                        ( 1.0_wp + rd_d_rv * lv_d_rd / temp ) ) /        &
+                        ( 1.0_wp + rd_d_rv * lv_d_rd * lv_d_cp *         &
+                        ( q(k,j,i) - ql(k,j,i) ) / ( temp * temp ) )
+                      k2 = theta * ( lv_d_cp / temp * k1 - 1.0_wp )
+                   ENDIF
+                ELSE IF ( cloud_droplets )  THEN
+                   k1 = 1.0_wp + 0.61_wp * q(k,j,i) - ql(k,j,i)
+                   k2 = 0.61_wp * pt(k,j,i)
+                ENDIF
+
+                tmp_flux(k) = ( k1 * surf_def_h(2)%shf(m) +              &
+                                k2 * surf_def_h(2)%qsws(m)               &
+                              ) * drho_air_zw(k)
+
+             ENDDO
+
+          ENDIF ! from IF ( use_top_fluxes )  THEN
+
+          IF ( .NOT. diss_production )  THEN
+
+!--          Compute temdency for TKE-production from shear
+             DO  k = nzb+1, nzt
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g / &
+                              MERGE( vpt_reference, vpt(k,j,i),          &
+                                     use_single_reference_value ) )
+             ENDDO
+
+          ELSE
+
+!--          RANS mode: Compute temdency for dissipation-rate-production from shear
+             DO  k = nzb+1, nzt
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST(wall_flags_0(k,j,i),0) )
+                tend(k,j,i) = tend(k,j,i) + flag * tmp_flux(k) * ( g /   &
+                              MERGE( vpt_reference, vpt(k,j,i),          &
+                                     use_single_reference_value ) ) *    &
+                              diss(k,j,i)/( e(k,j,i) + 1.0E-20_wp ) *    &
+                              c_3
+             ENDDO
+
+          ENDIF
+
+       ENDIF
+
+    ENDIF
+
+ END SUBROUTINE production_e_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Diffusion and dissipation terms for the TKE.
+!> Vector-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE diffusion_e( var, var_reference )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, ddzw, drho_air, rho_air_zw
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx2, ddy2
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  collision_turbulence
+
+    USE particle_attributes,                                                   &
+        ONLY:  use_sgs_for_particles, wang_kernel
+
+    USE surface_mod,                                                           &
+       ONLY :  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i              !< running index x direction
+    INTEGER(iwp) ::  j              !< running index y direction
+    INTEGER(iwp) ::  k              !< running index z direction
+    INTEGER(iwp) ::  m              !< running index surface elements
+
+    REAL(wp)     ::  flag           !< flag to mask topography
+    REAL(wp)     ::  l              !< mixing length
+    REAL(wp)     ::  ll             !< adjusted l
+    REAL(wp)     ::  var_reference  !< reference temperature
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var  !< temperature
+#else
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  var  !< temperature
+#endif
+    REAL(wp), DIMENSION(nzb+1:nzt,nys:nyn) ::  dissipation  !< TKE dissipation
+
+
+!
+!-- Calculate the tendency terms
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+!
+!--          Predetermine flag to mask topography
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+!
+!--          Calculate dissipation
+             IF ( les_dynamic .OR. les_mw )  THEN
+
+                CALL mixing_length_les( i, j, k, l, ll, var, var_reference )
+
+                dissipation(k,j) = ( 0.19_wp + 0.74_wp * l / ll )              &
+                                   * e(k,j,i) * SQRT( e(k,j,i) ) / l
+
+             ELSEIF ( rans_tke_l )  THEN
+
+                CALL mixing_length_rans( i, j, k, l, ll, var, var_reference )
+
+                dissipation(k,j) = c_0**3 * e(k,j,i) * SQRT( e(k,j,i) ) / ll
+
+                diss(k,j,i) = dissipation(k,j) * flag
+
+             ELSEIF ( rans_tke_e )  THEN
+
+                dissipation(k,j) = diss(k,j,i)
+
+             ENDIF
+
+             tend(k,j,i) = tend(k,j,i) + (                                     &
+                                           (                                   &
+                       ( km(k,j,i)+km(k,j,i+1) ) * ( e(k,j,i+1)-e(k,j,i) )     &
+                     - ( km(k,j,i)+km(k,j,i-1) ) * ( e(k,j,i)-e(k,j,i-1) )     &
+                                           ) * ddx2  * flag                    &
+                                         + (                                   &
+                       ( km(k,j,i)+km(k,j+1,i) ) * ( e(k,j+1,i)-e(k,j,i) )     &
+                     - ( km(k,j,i)+km(k,j-1,i) ) * ( e(k,j,i)-e(k,j-1,i) )     &
+                                           ) * ddy2  * flag                    &
+                                         + (                                   &
+            ( km(k,j,i)+km(k+1,j,i) ) * ( e(k+1,j,i)-e(k,j,i) ) * ddzu(k+1)    &
+                                                          * rho_air_zw(k)      &
+          - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k)      &
+                                                          * rho_air_zw(k-1)    &
+                                           ) * ddzw(k) * drho_air(k)           &
+                                         ) * flag * dsig_e                     &
+                          - dissipation(k,j) * flag
+
+          ENDDO
+       ENDDO
+
+!
+!--    Store dissipation if needed for calculating the sgs particle
+!--    velocities
+       IF ( .NOT. rans_tke_e .AND. ( use_sgs_for_particles  .OR.               &
+            wang_kernel  .OR.  collision_turbulence  ) )  THEN
+          DO  j = nys, nyn
+             DO  k = nzb+1, nzt
+                diss(k,j,i) = dissipation(k,j) * MERGE( 1.0_wp, 0.0_wp,        &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+          ENDDO
+       ENDIF
+
+    ENDDO
+
+!
+!-- Neumann boundary condition for dissipation diss(nzb,:,:) = diss(nzb+1,:,:)
+    IF ( .NOT. rans_tke_e .AND. ( use_sgs_for_particles  .OR.                  &
+         wang_kernel  .OR.  collision_turbulence  ) )  THEN
+!
+!--    Upward facing surfaces
+       DO  m = 1, bc_h(0)%ns
+          i = bc_h(0)%i(m)            
+          j = bc_h(0)%j(m)
+          k = bc_h(0)%k(m)
+          diss(k-1,j,i) = diss(k,j,i)
+       ENDDO
+!
+!--    Downward facing surfaces
+       DO  m = 1, bc_h(1)%ns
+          i = bc_h(1)%i(m)            
+          j = bc_h(1)%j(m)
+          k = bc_h(1)%k(m)
+          diss(k+1,j,i) = diss(k,j,i)
+       ENDDO
+
+    ENDIF
+
+ END SUBROUTINE diffusion_e
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Diffusion and dissipation terms for the TKE.
+!> Cache-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE diffusion_e_ij( i, j, var, var_reference )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, ddzw, drho_air, rho_air_zw
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx2, ddy2
+        
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY:  collision_turbulence
+
+    USE particle_attributes,                                                   &
+        ONLY:  use_sgs_for_particles, wang_kernel
+
+    USE surface_mod,                                                           &
+       ONLY :  bc_h
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i              !< running index x direction
+    INTEGER(iwp) ::  j              !< running index y direction
+    INTEGER(iwp) ::  k              !< running index z direction
+    INTEGER(iwp) ::  m              !< running index surface elements
+    INTEGER(iwp) ::  surf_e         !< End index of surface elements at (j,i)-gridpoint
+    INTEGER(iwp) ::  surf_s         !< Start index of surface elements at (j,i)-gridpoint
+
+    REAL(wp)     ::  flag           !< flag to mask topography
+    REAL(wp)     ::  l              !< mixing length
+    REAL(wp)     ::  ll             !< adjusted l
+    REAL(wp)     ::  var_reference  !< reference temperature
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var  !< temperature
+#else
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  var     !< temperature
+#endif
+    REAL(wp), DIMENSION(nzb+1:nzt) ::  dissipation  !< dissipation of TKE
+
+!
+!-- Calculate the mixing length (for dissipation)
+    DO  k = nzb+1, nzt
+!
+!--    Predetermine flag to mask topography
+       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+!
+!--    Calculate dissipation...
+!--    ...in case of LES
+       IF ( les_dynamic .OR. les_mw )  THEN
+
+          CALL mixing_length_les( i, j, k, l, ll, var, var_reference )
+
+          dissipation(k) = ( 0.19_wp + 0.74_wp * l / ll )                      &
+                           * e(k,j,i) * SQRT( e(k,j,i) ) / l
+
+!
+!--    ...in case of RANS
+       ELSEIF ( rans_tke_l )  THEN
+
+          CALL mixing_length_rans( i, j, k, l, ll, var, var_reference  )
+
+          dissipation(k) = c_0**3 * e(k,j,i) * SQRT( e(k,j,i) ) / ll
+
+          diss(k,j,i) = dissipation(k) * flag
+
+       ELSEIF ( rans_tke_e )  THEN
+
+          dissipation(k) = diss(k,j,i)
+
+       ENDIF
+
+!
+!--    Calculate the tendency term
+       tend(k,j,i) = tend(k,j,i) + (                                           &
+                                      (                                        &
+                      ( km(k,j,i)+km(k,j,i+1) ) * ( e(k,j,i+1)-e(k,j,i) )      &
+                    - ( km(k,j,i)+km(k,j,i-1) ) * ( e(k,j,i)-e(k,j,i-1) )      &
+                                      ) * ddx2                                 &
+                                    + (                                        &
+                      ( km(k,j,i)+km(k,j+1,i) ) * ( e(k,j+1,i)-e(k,j,i) )      &
+                    - ( km(k,j,i)+km(k,j-1,i) ) * ( e(k,j,i)-e(k,j-1,i) )      &
+                                      ) * ddy2                                 &
+                                    + (                                        &
+           ( km(k,j,i)+km(k+1,j,i) ) * ( e(k+1,j,i)-e(k,j,i) ) * ddzu(k+1)     &
+                                                         * rho_air_zw(k)       &
+         - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k)       &
+                                                         * rho_air_zw(k-1)     &
+                                      ) * ddzw(k) * drho_air(k)                &
+                                   ) * flag * dsig_e                           &
+                                 - dissipation(k) * flag
+
+    ENDDO
+
+!
+!-- Store dissipation if needed for calculating the sgs particle velocities
+    IF ( .NOT. rans_tke_e .AND.  ( use_sgs_for_particles  .OR.  wang_kernel    &
+          .OR.  collision_turbulence ) )  THEN
+       DO  k = nzb+1, nzt
+          diss(k,j,i) = dissipation(k) * MERGE( 1.0_wp, 0.0_wp,                &
+                                               BTEST( wall_flags_0(k,j,i), 0 ) )
+       ENDDO
+!
+!--    Neumann boundary condition for dissipation diss(nzb,:,:) = diss(nzb+1,:,:)
+!--    For each surface type determine start and end index (in case of elevated
+!--    topography several up/downward facing surfaces may exist.
+       surf_s = bc_h(0)%start_index(j,i)   
+       surf_e = bc_h(0)%end_index(j,i)   
+       DO  m = surf_s, surf_e
+          k             = bc_h(0)%k(m)
+          diss(k-1,j,i) = diss(k,j,i)
+       ENDDO
+!
+!--    Downward facing surfaces
+       surf_s = bc_h(1)%start_index(j,i)   
+       surf_e = bc_h(1)%end_index(j,i)   
+       DO  m = surf_s, surf_e
+          k             = bc_h(1)%k(m)
+          diss(k+1,j,i) = diss(k,j,i)
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE diffusion_e_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Diffusion term for the TKE dissipation rate
+!> Vector-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE diffusion_diss()
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, ddzw, drho_air, rho_air_zw
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx2, ddy2
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i              !< running index x direction
+    INTEGER(iwp) ::  j              !< running index y direction
+    INTEGER(iwp) ::  k              !< running index z direction
+
+    REAL(wp)     ::  flag           !< flag to mask topography
+
+!
+!-- Calculate the tendency terms
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+
+!
+!--          Predetermine flag to mask topography
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+             tend(k,j,i) = tend(k,j,i) +                                       &
+                         (       (                                             &
+                 ( km(k,j,i)+km(k,j,i+1) ) * ( diss(k,j,i+1)-diss(k,j,i) )     &
+               - ( km(k,j,i)+km(k,j,i-1) ) * ( diss(k,j,i)-diss(k,j,i-1) )     &
+                                 ) * ddx2                                      &
+                               + (                                             &
+                 ( km(k,j,i)+km(k,j+1,i) ) * ( diss(k,j+1,i)-diss(k,j,i) )     &
+               - ( km(k,j,i)+km(k,j-1,i) ) * ( diss(k,j,i)-diss(k,j-1,i) )     &
+                                 ) * ddy2                                      &
+                               + (                                             &
+      ( km(k,j,i)+km(k+1,j,i) ) * ( diss(k+1,j,i)-diss(k,j,i) ) * ddzu(k+1)    &
+                                                    * rho_air_zw(k)            &
+    - ( km(k,j,i)+km(k-1,j,i) ) * ( diss(k,j,i)-diss(k-1,j,i) ) * ddzu(k)      &
+                                                    * rho_air_zw(k-1)          &
+                                 ) * ddzw(k) * drho_air(k)                     &
+                         ) * flag * dsig_diss                                  &
+                         - c_2 * diss(k,j,i)**2                                &
+                               / ( e(k,j,i) + 1.0E-20_wp ) * flag
+
+          ENDDO
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE diffusion_diss
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Diffusion term for the TKE dissipation rate
+!> Cache-optimized version
+!------------------------------------------------------------------------------!
+ SUBROUTINE diffusion_diss_ij( i, j )
+
+    USE arrays_3d,                                                             &
+        ONLY:  ddzu, ddzw, drho_air, rho_air_zw
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx2, ddy2
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i         !< running index x direction
+    INTEGER(iwp) ::  j         !< running index y direction
+    INTEGER(iwp) ::  k         !< running index z direction
+
+    REAL(wp)     ::  flag      !< flag to mask topography
+
+!
+!-- Calculate the mixing length (for dissipation)
+    DO  k = nzb+1, nzt
+
+!
+!--    Predetermine flag to mask topography
+       flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+!
+!--    Calculate the tendency term
+       tend(k,j,i) =  tend(k,j,i) +                                            &
+                   (            (                                              &
+                ( km(k,j,i)+km(k,j,i+1) ) * ( diss(k,j,i+1)-diss(k,j,i) )      &
+              - ( km(k,j,i)+km(k,j,i-1) ) * ( diss(k,j,i)-diss(k,j,i-1) )      &
+                                ) * ddx2                                       &
+                              + (                                              &
+                ( km(k,j,i)+km(k,j+1,i) ) * ( diss(k,j+1,i)-diss(k,j,i) )      &
+              - ( km(k,j,i)+km(k,j-1,i) ) * ( diss(k,j,i)-diss(k,j-1,i) )      &
+                                ) * ddy2                                       &
+                              + (                                              &
+     ( km(k,j,i)+km(k+1,j,i) ) * ( diss(k+1,j,i)-diss(k,j,i) ) * ddzu(k+1)     &
+                                                   * rho_air_zw(k)             &
+   - ( km(k,j,i)+km(k-1,j,i) ) * ( diss(k,j,i)-diss(k-1,j,i) ) * ddzu(k)       &
+                                                   * rho_air_zw(k-1)           &
+                                ) * ddzw(k) * drho_air(k)                      &
+                   ) * flag * dsig_diss                                        &
+                   - c_2 * diss(k,j,i)**2 / ( e(k,j,i) + 1.0E-20_wp ) * flag
+
+    ENDDO
+
+ END SUBROUTINE diffusion_diss_ij
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate mixing length for LES mode.
+!------------------------------------------------------------------------------!
+ SUBROUTINE mixing_length_les( i, j, k, l, ll, var, var_reference )
+
+    USE arrays_3d,                                                             &
+        ONLY:  dd2zu
+
+    USE control_parameters,                                                    &
+        ONLY:  atmos_ocean_sign, use_single_reference_value,                   &
+               wall_adjustment, wall_adjustment_factor
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i   !< loop index
+    INTEGER(iwp) :: j   !< loop index
+    INTEGER(iwp) :: k   !< loop index
+
+    REAL(wp)     :: dvar_dz         !< vertical gradient of var
+    REAL(wp)     :: l               !< mixing length
+    REAL(wp)     :: l_stable        !< mixing length according to stratification
+    REAL(wp)     :: ll              !< adjusted l_grid
+    REAL(wp)     :: var_reference   !< var at reference height
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var  !< temperature
+#else
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  var     !< temperature
+#endif
+
+    dvar_dz = atmos_ocean_sign * ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k)
+    IF ( dvar_dz > 0.0_wp ) THEN
+       IF ( use_single_reference_value )  THEN
+          l_stable = 0.76_wp * SQRT( e(k,j,i) )                                &
+                             / SQRT( g / var_reference * dvar_dz ) + 1E-5_wp
+       ELSE
+          l_stable = 0.76_wp * SQRT( e(k,j,i) )                                &
+                             / SQRT( g / var(k,j,i) * dvar_dz ) + 1E-5_wp
+       ENDIF
+    ELSE
+       l_stable = l_grid(k)
+    ENDIF
+!
+!-- Adjustment of the mixing length
+    IF ( wall_adjustment )  THEN
+       l  = MIN( wall_adjustment_factor * l_wall(k,j,i), l_grid(k), l_stable )
+       ll = MIN( wall_adjustment_factor * l_wall(k,j,i), l_grid(k) )
+    ELSE
+       l  = MIN( l_grid(k), l_stable )
+       ll = l_grid(k)
+    ENDIF
+
+ END SUBROUTINE mixing_length_les
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculate mixing length for RANS mode.
+!------------------------------------------------------------------------------!
+ SUBROUTINE mixing_length_rans( i, j, k, l, l_diss, var, var_reference  )
+
+    USE arrays_3d,                                                             &
+        ONLY:  dd2zu
+
+    USE control_parameters,                                                    &
+        ONLY:  atmos_ocean_sign, use_single_reference_value
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i   !< loop index
+    INTEGER(iwp) :: j   !< loop index
+    INTEGER(iwp) :: k   !< loop index
+
+    REAL(wp)     :: duv2_dz2        !< squared vertical gradient of wind vector
+    REAL(wp)     :: dvar_dz         !< vertical gradient of var
+    REAL(wp)     :: l               !< mixing length
+    REAL(wp)     :: l_diss          !< mixing length for dissipation
+    REAL(wp)     :: rif             !< Richardson flux number
+    REAL(wp)     :: var_reference   !< var at reference height
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var  !< temperature
+#else
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  var     !< temperature
+#endif
+
+    dvar_dz = atmos_ocean_sign * ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k)
+
+    duv2_dz2 =   ( ( u(k+1,j,i) - u(k-1,j,i) ) * dd2zu(k) )**2                 &
+               + ( ( v(k+1,j,i) - v(k-1,j,i) ) * dd2zu(k) )**2                 &
+               + 1E-30_wp
+
+    IF ( use_single_reference_value )  THEN
+       rif = g / var_reference * dvar_dz / duv2_dz2
+    ELSE
+       rif = g / var(k,j,i) * dvar_dz / duv2_dz2
+    ENDIF
+
+    rif = MAX( rif, -5.0_wp )
+    rif = MIN( rif,  1.0_wp )
+
+!
+!-- Calculate diabatic mixing length using Dyer-profile functions
+    IF ( rif >= 0.0_wp )  THEN
+       l      = MIN( l_black(k) / ( 1.0_wp + 5.0_wp * rif ), l_wall(k,j,i) )
+       l_diss = l
+    ELSE
+!
+!--    In case of unstable stratification, use mixing length of neutral case
+!--    for l, but consider profile functions for l_diss
+       l      = l_wall(k,j,i)
+       l_diss = l * SQRT( 1.0_wp - 16.0_wp * rif )
+    ENDIF
+
+ END SUBROUTINE mixing_length_rans
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of the turbulent diffusion coefficients for momentum and heat.
+!> @bug unstable stratification is not properly considered for kh in rans mode.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_diffusivities( var, var_reference )
+
+    USE control_parameters,                                                    &
+        ONLY:  bc_radiation_l, bc_radiation_n, bc_radiation_r, bc_radiation_s, &
+               e_min
+
+    USE surface_layer_fluxes_mod,                                              &
+        ONLY:  phi_m
+
+    USE surface_mod,                                                           &
+        ONLY :  bc_h, surf_def_h, surf_def_v, surf_lsm_h, surf_lsm_v,          &
+                surf_usm_h, surf_usm_v
+
+    INTEGER(iwp) ::  i                   !< loop index
+    INTEGER(iwp) ::  j                   !< loop index
+    INTEGER(iwp) ::  k                   !< loop index
+    INTEGER(iwp) ::  m                   !< loop index
+    INTEGER(iwp) ::  n                   !< loop index
+
+    REAL(wp) ::  var_reference       !< reference temperature
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var  !< temperature
+#else
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  var  !< temperature
+#endif
+
+!
+!-- Introduce an optional minimum tke
+    IF ( e_min > 0.0_wp )  THEN
+       !$OMP PARALLEL DO PRIVATE(i,j,k)
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+                e(k,j,i) = MAX( e(k,j,i), e_min ) *                            &
+                        MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+!
+!-- Call default diffusivities routine. This is always used to calculate kh.
+    CALL tcm_diffusivities_default( var, var_reference )
+!
+!-- Call dynamic subgrid model to calculate km.
+    IF ( les_dynamic )  THEN
+       CALL tcm_diffusivities_dynamic
+    ENDIF
+
+!
+!-- In RANS mode, use MOST to calculate km and kh within the surface layer.
+    IF ( rans_tke_e )  THEN
+!
+!--    Upward facing surfaces
+!--    Default surfaces
+       n = 0
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_def_h(0)%ns
+          i = surf_def_h(0)%i(m)
+          j = surf_def_h(0)%j(m)
+          k = surf_def_h(0)%k(m)
+          km(k,j,i) = kappa * surf_def_h(0)%us(m) * surf_def_h(0)%z_mo(m) /    &
+                      phi_m( surf_def_h(0)%z_mo(m) / surf_def_h(0)%ol(m) )
+          kh(k,j,i) = 1.35_wp * km(k,j,i)
+       ENDDO
+!      
+!--    Natural surfaces
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_lsm_h%ns
+          i = surf_lsm_h%i(m)
+          j = surf_lsm_h%j(m)
+          k = surf_lsm_h%k(m)
+          km(k,j,i) = kappa * surf_lsm_h%us(m) * surf_lsm_h%z_mo(m) /          &
+                      phi_m( surf_lsm_h%z_mo(m) / surf_lsm_h%ol(m) )
+          kh(k,j,i) = 1.35_wp * km(k,j,i)
+       ENDDO
+!      
+!--    Urban surfaces
+       !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+       DO  m = 1, surf_usm_h%ns
+          i = surf_usm_h%i(m)
+          j = surf_usm_h%j(m)
+          k = surf_usm_h%k(m)
+          km(k,j,i) = kappa * surf_usm_h%us(m) * surf_usm_h%z_mo(m) /          &
+                      phi_m( surf_usm_h%z_mo(m) / surf_usm_h%ol(m) )
+          kh(k,j,i) = 1.35_wp * km(k,j,i)
+       ENDDO
+       
+!      
+!--    North-, south-, west and eastward facing surfaces
+!--    Do not consider stratification at these surfaces.
+       DO  n = 0, 3
+!      
+!--       Default surfaces
+          !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+          DO  m = 1, surf_def_v(n)%ns
+             i = surf_def_v(n)%i(m)
+             j = surf_def_v(n)%j(m)
+             k = surf_def_v(n)%k(m)
+             km(k,j,i) = kappa * surf_def_v(n)%us(m) * surf_def_v(n)%z_mo(m)
+             kh(k,j,i) = 1.35_wp * km(k,j,i)
+          ENDDO
+!      
+!--       Natural surfaces
+          !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+          DO  m = 1, surf_lsm_v(n)%ns
+             i = surf_lsm_v(n)%i(m)
+             j = surf_lsm_v(n)%j(m)
+             k = surf_lsm_v(n)%k(m)
+             km(k,j,i) = kappa * surf_lsm_v(n)%us(m) * surf_lsm_v(n)%z_mo(m)
+             kh(k,j,i) = 1.35_wp * km(k,j,i)
+          ENDDO
+!      
+!--       Urban surfaces
+          !$OMP PARALLEL DO PRIVATE(i,j,k,m)
+          DO  m = 1, surf_usm_v(n)%ns
+             i = surf_usm_v(n)%i(m)
+             j = surf_usm_v(n)%j(m)
+             k = surf_usm_v(n)%k(m)
+             km(k,j,i) = kappa * surf_usm_v(n)%us(m) * surf_usm_v(n)%z_mo(m)
+             kh(k,j,i) = 1.35_wp * km(k,j,i)
+          ENDDO
+       ENDDO
+       
+       CALL exchange_horiz( km, nbgp )
+       CALL exchange_horiz( kh, nbgp )
+
+    ENDIF
+!
+!-- Set boundary values (Neumann conditions)
+!-- Downward facing surfaces
+    !$OMP PARALLEL DO PRIVATE(i,j,k)
+    DO  m = 1, bc_h(1)%ns
+       i = bc_h(1)%i(m)
+       j = bc_h(1)%j(m)
+       k = bc_h(1)%k(m)
+       km(k+1,j,i) = km(k,j,i)
+       kh(k+1,j,i) = kh(k,j,i)
+    ENDDO
+!
+!-- Downward facing surfaces
+    !$OMP PARALLEL DO PRIVATE(i,j,k)
+    DO  m = 1, bc_h(0)%ns
+       i = bc_h(0)%i(m)
+       j = bc_h(0)%j(m)
+       k = bc_h(0)%k(m)
+       km(k-1,j,i) = km(k,j,i)
+       kh(k-1,j,i) = kh(k,j,i)
+    ENDDO
+!
+!-- Model top
+    !$OMP PARALLEL DO
+    DO  i = nxlg, nxrg
+       DO  j = nysg, nyng
+          km(nzt+1,j,i) = km(nzt,j,i)
+          kh(nzt+1,j,i) = kh(nzt,j,i)
+       ENDDO
+    ENDDO
+
+!
+!-- Set Neumann boundary conditions at the outflow boundaries in case of
+!-- non-cyclic lateral boundaries
+    IF ( bc_radiation_l )  THEN
+       km(:,:,nxl-1) = km(:,:,nxl)
+       kh(:,:,nxl-1) = kh(:,:,nxl)
+    ENDIF
+    IF ( bc_radiation_r )  THEN
+       km(:,:,nxr+1) = km(:,:,nxr)
+       kh(:,:,nxr+1) = kh(:,:,nxr)
+    ENDIF
+    IF ( bc_radiation_s )  THEN
+       km(:,nys-1,:) = km(:,nys,:)
+       kh(:,nys-1,:) = kh(:,nys,:)
+    ENDIF
+    IF ( bc_radiation_n )  THEN
+       km(:,nyn+1,:) = km(:,nyn,:)
+       kh(:,nyn+1,:) = kh(:,nyn,:)
+    ENDIF
+
+ END SUBROUTINE tcm_diffusivities
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computation of the turbulent diffusion coefficients for momentum and heat 
+!> according to Prandtl-Kolmogorov.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_diffusivities_default( var, var_reference )
+ 
+    USE statistics,                                                            &
+        ONLY :  rmask, sums_l_l
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i                   !< loop index
+    INTEGER(iwp) ::  j                   !< loop index
+    INTEGER(iwp) ::  k                   !< loop index
+!$  INTEGER(iwp) ::  omp_get_thread_num  !< opemmp function to get thread number
+    INTEGER(iwp) ::  sr                  !< statistic region
+    INTEGER(iwp) ::  tn                  !< thread number
+
+    REAL(wp)     ::  flag                !< topography flag
+    REAL(wp)     ::  l                   !< mixing length
+    REAL(wp)     ::  ll                  !< adjusted mixing length
+    REAL(wp)     ::  var_reference       !< reference temperature
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var  !< temperature
+#else
+    REAL(wp), DIMENSION(:,:,:), POINTER ::  var  !< temperature
+#endif
+
+!
+!-- Default thread number in case of one thread
+    tn = 0
+
+!
+!-- Initialization for calculation of the mixing length profile
+    sums_l_l = 0.0_wp
+
+!
+!-- Compute the turbulent diffusion coefficient for momentum
+    !$OMP PARALLEL PRIVATE (i,j,k,l,ll,sr,tn,flag)
+!$  tn = omp_get_thread_num()
+
+    IF ( les_dynamic .OR. les_mw )  THEN
+       !$OMP DO
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+
+!
+!--             Determine the mixing length for LES closure
+                CALL mixing_length_les( i, j, k, l, ll, var, var_reference )
+!
+!--             Compute diffusion coefficients for momentum and heat
+                km(k,j,i) = c_0 * l * SQRT( e(k,j,i) ) * flag
+                kh(k,j,i) = ( 1.0_wp + 2.0_wp * l / ll ) * km(k,j,i) * flag
+!
+!--             Summation for averaged profile (cf. flow_statistics)
+                DO  sr = 0, statistic_regions
+                   sums_l_l(k,sr,tn) = sums_l_l(k,sr,tn) + l * rmask(j,i,sr)   &
+                                                             * flag
+                ENDDO
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSEIF ( rans_tke_l )  THEN
+
+       !$OMP DO
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--             Mixing length for RANS mode with TKE-l closure
+                CALL mixing_length_rans( i, j, k, l, ll, var, var_reference )
+!
+!--             Compute diffusion coefficients for momentum and heat
+                km(k,j,i) = c_0 * l * SQRT( e(k,j,i) ) * flag
+                kh(k,j,i) = km(k,j,i) / prandtl_number * flag
+!
+!--             Summation for averaged profile (cf. flow_statistics)
+                DO  sr = 0, statistic_regions
+                   sums_l_l(k,sr,tn) = sums_l_l(k,sr,tn) + l * rmask(j,i,sr)   &
+                                                             * flag
+                ENDDO
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ELSEIF ( rans_tke_e )  THEN
+
+       !$OMP DO
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb+1, nzt
+
+                flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+!
+!--             Compute diffusion coefficients for momentum and heat
+                km(k,j,i) = c_0**4 * e(k,j,i)**2 / ( diss(k,j,i) + 1.0E-30_wp ) * flag
+                kh(k,j,i) = km(k,j,i) / prandtl_number * flag
+!
+!--             Summation for averaged profile of mixing length (cf. flow_statistics)
+                DO  sr = 0, statistic_regions
+                   sums_l_l(k,sr,tn) = sums_l_l(k,sr,tn) +                     &
+                      c_0**3 * e(k,j,i) * SQRT(e(k,j,i)) /                     &
+                      ( diss(k,j,i) + 1.0E-30_wp ) * rmask(j,i,sr) * flag
+                ENDDO
+
+             ENDDO
+          ENDDO
+       ENDDO
+
+    ENDIF
+
+    sums_l_l(nzt+1,:,tn) = sums_l_l(nzt,:,tn)   ! quasi boundary-condition for
+                                                ! data output
+!$OMP END PARALLEL
+
+ END SUBROUTINE tcm_diffusivities_default
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates the eddy viscosity dynamically using the linear dynamic model 
+!> according to 
+!> Heinz, Stefan. "Realizability of dynamic subgrid-scale stress models via 
+!> stochastic analysis." 
+!> Monte Carlo Methods and Applications 14.4 (2008): 311-329.
+!>
+!> Furthermore dynamic bounds are used to limit the absolute value of c* as 
+!> described in
+!> Mokhtarpoor, Reza, and Stefan Heinz. "Dynamic large eddy simulation: 
+!> Stability via realizability." Physics of Fluids 29.10 (2017): 105104.
+!>
+!> @author Hauke Wurps
+!> @author BjÃ¶rn Maronga
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_diffusivities_dynamic
+        
+    USE arrays_3d,                                                             &
+        ONLY:  ddzw, dzw, dd2zu, w, ug, vg
+    
+    USE grid_variables,                                                        &
+        ONLY : ddx, ddy, dx, dy
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i           !< running index x-direction
+    INTEGER(iwp) ::  j           !< running index y-direction
+    INTEGER(iwp) ::  k           !< running index z-direction
+    INTEGER(iwp) ::  l           !< running index
+    INTEGER(iwp) ::  m           !< running index
+
+    REAL(wp)     ::  dudx        !< Gradient of u-component in x-direction
+    REAL(wp)     ::  dudy        !< Gradient of u-component in y-direction
+    REAL(wp)     ::  dudz        !< Gradient of u-component in z-direction
+    REAL(wp)     ::  dvdx        !< Gradient of v-component in x-direction
+    REAL(wp)     ::  dvdy        !< Gradient of v-component in y-direction
+    REAL(wp)     ::  dvdz        !< Gradient of v-component in z-direction
+    REAL(wp)     ::  dwdx        !< Gradient of w-component in x-direction
+    REAL(wp)     ::  dwdy        !< Gradient of w-component in y-direction
+    REAL(wp)     ::  dwdz        !< Gradient of w-component in z-direction
+
+    REAL(wp)     ::  flag                !< topography flag
+    
+    REAL(wp)     ::  uc(-1:1,-1:1)  !< u on grid center
+    REAL(wp)     ::  vc(-1:1,-1:1)  !< v on grid center
+    REAL(wp)     ::  wc(-1:1,-1:1)  !< w on grid center
+
+    REAL(wp)     ::  ut(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !< test filtered u
+    REAL(wp)     ::  vt(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !< test filtered v
+    REAL(wp)     ::  wt(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !< test filtered w
+
+    REAL(wp)     ::  uct         !< test filtered u on grid center
+    REAL(wp)     ::  vct         !< test filtered v on grid center
+    REAL(wp)     ::  wct         !< test filtered w on grid center
+    REAL(wp)     ::  u2t         !< test filtered u**2 on grid center
+    REAL(wp)     ::  v2t         !< test filtered v**2 on grid center
+    REAL(wp)     ::  w2t         !< test filtered w**2 on grid center
+    REAL(wp)     ::  uvt         !< test filtered u*v on grid center
+    REAL(wp)     ::  uwt         !< test filtered u*w on grid center
+    REAL(wp)     ::  vwt         !< test filtered v*w on grid center
+
+    REAL(wp)     ::  sd11        !< deviatoric shear tensor
+    REAL(wp)     ::  sd22        !< deviatoric shear tensor
+    REAL(wp)     ::  sd33        !<f deviatoric shear tensor
+    REAL(wp)     ::  sd12        !< deviatoric shear tensor
+    REAL(wp)     ::  sd13        !< deviatoric shear tensor
+    REAL(wp)     ::  sd23        !< deviatoric shear tensor
+
+    REAL(wp)     ::  sd2         !< sum: sd_ij*sd_ij
+
+    REAL(wp)     ::  sdt11       !< filtered deviatoric shear tensor
+    REAL(wp)     ::  sdt22       !< filtered deviatoric shear tensor
+    REAL(wp)     ::  sdt33       !< filtered deviatoric shear tensor
+    REAL(wp)     ::  sdt12       !< filtered deviatoric shear tensor
+    REAL(wp)     ::  sdt13       !< filtered deviatoric shear tensor
+    REAL(wp)     ::  sdt23       !< filtered deviatoric shear tensor
+
+    REAL(wp)     ::  sdt2        !< sum: sdt_ij*sdt_ij
+
+    REAL(wp)     ::  ld11        !< deviatoric stress tensor
+    REAL(wp)     ::  ld22        !< deviatoric stress tensor
+    REAL(wp)     ::  ld33        !< deviatoric stress tensor
+    REAL(wp)     ::  ld12        !< deviatoric stress tensor
+    REAL(wp)     ::  ld13        !< deviatoric stress tensor
+    REAL(wp)     ::  ld23        !< deviatoric stress tensor
+
+    REAL(wp)     ::  lnn         !< sum ld_nn
+    REAL(wp)     ::  ldsd        !< sum: ld_ij*sd_ij
+
+    REAL(wp)     ::  delta       !< grid size
+    REAL(wp)     ::  cst         !< c*
+    REAL(wp)     ::  cstnust_t   !< product c*nu*
+    REAL(wp)     ::  cst_max     !< bounds of c*
+
+    REAL(wp), PARAMETER :: fac_cmax = 23.0_wp/(24.0_wp*sqrt(3.0_wp))  !< constant
+
+!
+!-- velocities on grid centers:
+    CALL tcm_box_filter_2d( u, ut )
+    CALL tcm_box_filter_2d( v, vt )
+    CALL tcm_box_filter_2d( w, wt )
+
+    DO  i = nxl, nxr
+       DO  j = nys, nyn
+          DO  k = nzb+1, nzt
+            
+             flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 0 ) )
+             
+!
+!--          Compute the deviatoric shear tensor s_ij on grid centers:
+!--          s_ij =  0.5 * ( du_i/dx_j + du_j/dx_i )
+             dudx  =           ( u(k,j,i+1) - u(k,j,i)     ) * ddx
+             dudy  = 0.25_wp * ( u(k,j+1,i) + u(k,j+1,i+1) - &
+                                 u(k,j-1,i) - u(k,j-1,i+1) ) * ddy
+             dudz  = 0.5_wp  * ( u(k+1,j,i) + u(k+1,j,i+1) - &
+                                 u(k-1,j,i) - u(k-1,j,i+1) ) * dd2zu(k)
+
+             dvdx  = 0.25_wp * ( v(k,j,i+1) + v(k,j+1,i+1) - &
+                                 v(k,j,i-1) - v(k,j+1,i-1) ) * ddx
+             dvdy  =           ( v(k,j+1,i) - v(k,j,i)     ) * ddy
+             dvdz  = 0.5_wp  * ( v(k+1,j,i) + v(k+1,j+1,i) - &
+                                 v(k-1,j,i) - v(k-1,j+1,i) ) * dd2zu(k)
+
+             dwdx  = 0.25_wp * ( w(k,j,i+1) + w(k-1,j,i+1) - &
+                                 w(k,j,i-1) - w(k-1,j,i-1) ) * ddx
+             dwdy  = 0.25_wp * ( w(k,j+1,i) + w(k-1,j+1,i) - &
+                                 w(k,j-1,i) - w(k-1,j-1,i) ) * ddy
+             dwdz  =           ( w(k,j,i)   - w(k-1,j,i)   ) * ddzw(k)
+
+             sd11 = dudx
+             sd22 = dvdy
+             sd33 = dwdz
+             sd12 = 0.5_wp * ( dudy + dvdx )
+             sd13 = 0.5_wp * ( dudz + dwdx )
+             sd23 = 0.5_wp * ( dvdz + dwdy )
+!
+!--          sum: sd_ij*sd_ij
+             sd2 = sd11**2 + sd22**2 + sd33**2                     &
+                   + 2.0_wp * ( sd12**2 + sd13**2 + sd23**2 )
+!
+!--          The filtered velocities are needed to calculate the filtered shear
+!--          tensor: sdt_ij = 0.5 * ( dut_i/dx_j + dut_j/dx_i )
+             dudx  =           ( ut(k,j,i+1) - ut(k,j,i)     ) * ddx
+             dudy  = 0.25_wp * ( ut(k,j+1,i) + ut(k,j+1,i+1) - &
+                                 ut(k,j-1,i) - ut(k,j-1,i+1) ) * ddy
+             dudz  = 0.5_wp  * ( ut(k+1,j,i) + ut(k+1,j,i+1) - &
+                                 ut(k-1,j,i) - ut(k-1,j,i+1) ) * dd2zu(k)
+
+             dvdx  = 0.25_wp * ( vt(k,j,i+1) + vt(k,j+1,i+1) - &
+                                 vt(k,j,i-1) - vt(k,j+1,i-1) ) * ddx
+             dvdy  =           ( vt(k,j+1,i) - vt(k,j,i)     ) * ddy
+             dvdz  = 0.5_wp  * ( vt(k+1,j,i) + vt(k+1,j+1,i) - &
+                                 vt(k-1,j,i) - vt(k-1,j+1,i) ) * dd2zu(k)
+
+             dwdx  = 0.25_wp * ( wt(k,j,i+1) + wt(k-1,j,i+1) - &
+                                 wt(k,j,i-1) - wt(k-1,j,i-1) ) * ddx
+             dwdy  = 0.25_wp * ( wt(k,j+1,i) + wt(k-1,j+1,i) - &
+                                 wt(k,j-1,i) - wt(k-1,j-1,i) ) * ddy
+             dwdz  =           ( wt(k,j,i)   - wt(k-1,j,i)   ) * ddzw(k)
+
+             sdt11 = dudx
+             sdt22 = dvdy
+             sdt33 = dwdz
+             sdt12 = 0.5_wp * ( dudy + dvdx )
+             sdt13 = 0.5_wp * ( dudz + dwdx )
+             sdt23 = 0.5_wp * ( dvdz + dwdy )
+!
+!--          sum: sd_ij*sd_ij
+             sdt2 = sdt11**2 + sdt22**2 + sdt33**2         &
+                   + 2.0_wp * ( sdt12**2 + sdt13**2 + sdt23**2 )
+!
+!--          Need filtered velocities and filtered squared velocities on grid
+!--          centers. Substraction of geostrophic velocity helps to avoid
+!--          numerical errors in the expression <u**2> - <u>*<u>, which can be
+!--          very small (<...> means filtered).
+             DO  l = -1, 1
+                DO  m = -1, 1
+                   uc(l,m) = 0.5_wp * ( u(k,j+l,i+m) + u(k,j+l,i+m+1) ) - ug(k)
+                   vc(l,m) = 0.5_wp * ( v(k,j+l,i+m) + v(k,j+l+1,i+m) ) - vg(k)
+                   wc(l,m) = 0.5_wp * ( w(k-1,j+l,i+m) + w(k,j+l,i+m) )
+                ENDDO
+             ENDDO
+
+             CALL tcm_box_filter_2d( uc, uct )
+             CALL tcm_box_filter_2d( vc, vct )
+             CALL tcm_box_filter_2d( wc, wct )
+             CALL tcm_box_filter_2d( uc**2, u2t )
+             CALL tcm_box_filter_2d( vc**2, v2t )
+             CALL tcm_box_filter_2d( wc**2, w2t )
+             CALL tcm_box_filter_2d( uc*vc, uvt )
+             CALL tcm_box_filter_2d( uc*wc, uwt )
+             CALL tcm_box_filter_2d( vc*wc, vwt )
+
+             ld11 = u2t - uct*uct
+             ld22 = v2t - vct*vct
+             ld33 = w2t - wct*wct
+             ld12 = uvt - uct*vct
+             ld13 = uwt - uct*wct
+             ld23 = vwt - vct*wct
+
+             lnn = ld11 + ld22 + ld33
+!
+!--          Substract trace to get deviatoric resolved stress
+             ld11 = ld11 - lnn / 3.0_wp
+             ld22 = ld22 - lnn / 3.0_wp
+             ld33 = ld33 - lnn / 3.0_wp
+
+             ldsd = ld11 * sdt11 + ld22 * sdt22 + ld33 * sdt33 + &
+                    2.0_wp * ( ld12 * sdt12 + ld13 * sdt13 + ld23 * sdt23 )
+!
+!--          c* nu*^T is SGS viscosity on test filter level:
+             cstnust_t = -ldsd / ( sdt2 + 1.0E-20_wp )
+!
+!--          The model was only tested for an isotropic grid. The following
+!--          expression was a recommendation of Stefan Heinz.
+             delta = MAX( dx, dy, dzw(k) )
+
+             IF ( lnn <= 0.0_wp ) THEN
+                cst = 0.0_wp
+             ELSE
+                cst = cstnust_t /                                              &
+                   ( 4.0_wp * delta * SQRT( lnn / 2.0_wp ) + 1.0E-20_wp )
+             ENDIF
+
+!
+!--          Calculate border according to Mokhtarpoor and Heinz (2017)
+             cst_max = fac_cmax * SQRT( e(k,j,i) ) /                           &
+                       ( delta * SQRT( 2.0_wp * sd2 ) + 1.0E-20_wp )
+             
+             IF ( ABS( cst ) > cst_max )  THEN
+                cst = cst_max * cst / ABS( cst )
+             ENDIF
+
+             km(k,j,i) = cst * delta * SQRT( e(k,j,i) ) * flag
+             
+          ENDDO
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE tcm_diffusivities_dynamic
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine acts as a box filter with filter width 2 * dx.
+!> Output is only one point.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_box_filter_2d_single( var, var_fil )
+ 
+    IMPLICIT NONE
+
+    REAL(wp)     ::  var(-1:1,-1:1)      !< variable to be filtered
+    REAL(wp)     ::  var_fil             !< filtered variable
+!
+!-- It is assumed that a box with a side length of 2 * dx and centered at the 
+!-- variable*s position contains one half of the four closest neigbours and one
+!-- forth of the diagonally closest neighbours.
+    var_fil = 0.25_wp * ( var(0,0) +                                           &
+                      0.5_wp  * ( var(0,1)  + var(1,0)   +                     &
+                                  var(0,-1) + var(-1,0)  ) +                   &
+                      0.25_wp * ( var(1,1)  + var(1,-1)  +                     &
+                                  var(-1,1) + var(-1,-1) ) )
+
+ END SUBROUTINE tcm_box_filter_2d_single
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine acts as a box filter with filter width 2 * dx.
+!> The filtered variable var_fil is on the same grid as var.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_box_filter_2d_array( var, var_fil )
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i    !< running index x-direction
+    INTEGER(iwp) ::  j    !< running index y-direction
+    INTEGER(iwp) ::  k    !< running index z-direction
+
+    REAL(wp)     ::  var(nzb:nzt+1,nysg:nyng,nxlg:nxrg)      !< variable to be filtered
+    REAL(wp)     ::  var_fil(nzb:nzt+1,nysg:nyng,nxlg:nxrg)  !< filtered variable
+!
+!-- It is assumed that a box with a side length of 2 * dx and centered at the 
+!-- variable's position contains one half of the four closest neigbours and one
+!-- forth of the diagonally closest neighbours.
+    DO  i = nxlg+1, nxrg-1
+       DO  j = nysg+1, nyng-1
+          DO  k = nzb, nzt+1
+             var_fil(k,j,i) = 0.25_wp * ( var(k,j,i) +                         &
+                              0.5_wp  * ( var(k,j,i+1)   + var(k,j+1,i)   +    &
+                                          var(k,j,i-1)   + var(k,j-1,i)     ) +&
+                              0.25_wp * ( var(k,j+1,i+1) + var(k,j+1,i-1) +    &
+                                          var(k,j-1,i+1) + var(k,j-1,i-1)   )  )
+          END DO
+       END DO
+    END DO
+
+ END SUBROUTINE tcm_box_filter_2d_array
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels.
+!------------------------------------------------------------------------------!
+ SUBROUTINE tcm_swap_timelevel ( mod_count )
+
+    IMPLICIT NONE
+
+
+#if defined( __nopointer )
+    INTEGER(iwp) ::  i      !< loop index x direction
+    INTEGER(iwp) ::  j      !< loop index y direction
+    INTEGER(iwp) ::  k      !< loop index z direction
+#endif
+    INTEGER, INTENT(IN) ::  mod_count  !< flag defining where pointers point to
+
+#if defined( __nopointer )
+
+    IF ( .NOT. constant_diffusion )  THEN
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb, nzt+1
+                e(k,j,i) = e_p(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+    IF ( rans_tke_e )  THEN
+       DO  i = nxlg, nxrg
+          DO  j = nysg, nyng
+             DO  k = nzb, nzt+1
+                diss(k,j,i) = diss_p(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+    ENDIF
+
+#else
+    
+    SELECT CASE ( mod_count )
+
+       CASE ( 0 )
+
+          IF ( .NOT. constant_diffusion )  THEN
+             e => e_1;    e_p => e_2
+          ENDIF
+
+          IF ( rans_tke_e )  THEN
+             diss => diss_1;    diss_p => diss_2
+          ENDIF
+
+       CASE ( 1 )
+
+          IF ( .NOT. constant_diffusion )  THEN
+             e => e_2;    e_p => e_1
+          ENDIF
+
+          IF ( rans_tke_e )  THEN
+             diss => diss_2;    diss_p => diss_1
+          ENDIF
+
+    END SELECT
+#endif
+
+ END SUBROUTINE tcm_swap_timelevel
+
+
+ END MODULE turbulence_closure_mod
Index: /palm/tags/release-6.0/SOURCE/urban_surface_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/urban_surface_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/urban_surface_mod.f90	(revision 3477)
@@ -0,0 +1,10288 @@
+!> @file urban_surface_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2015-2018 Czech Technical University in Prague
+! Copyright 2015-2018 Institute of Computer Science of the 
+!                     Czech Academy of Sciences, Prague
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add missing PUBLIC variables for new indoor model
+! 
+! 3449 2018-10-29 19:36:56Z suehring
+! Bugfix: Fix average arrays allocations in usm_average_3d_data (J.Resler)
+! Bugfix: Fix reading wall temperatures (J.Resler)
+! Bugfix: Fix treating of outputs for wall temperature and sky view factors (J.Resler)
+!
+! 
+! 3435 2018-10-26 18:25:44Z gronemeier
+! Bugfix: allocate gamma_w_green_sat until nzt_wall+1
+! 
+! 3418 2018-10-24 16:07:39Z kanani
+! (rvtils, srissman)
+! -Updated building databse, two green roof types (ind_green_type_roof)
+! -Latent heat flux for green walls and roofs, new output of latent heatflux
+!  and soil water content of green roof substrate
+! -t_surf changed to t_surf_wall
+! -Added namelist parameter usm_wall_mod for lower wall tendency
+!  of first two wall layers during spinup
+! -Window calculations deactivated during spinup
+! 
+! 3382 2018-10-19 13:10:32Z knoop
+! Bugix: made array declaration Fortran Standard conform
+! 
+! 3378 2018-10-19 12:34:59Z kanani
+! merge from radiation branch (r3362) into trunk
+! (moh.hefny):
+! - check the requested output variables if they are correct
+! - added unscheduled_radiation_calls switch to control force_radiation_call
+! - minor formate changes
+! 
+! 3371 2018-10-18 13:40:12Z knoop
+! Set flag indicating that albedo at urban surfaces is already initialized
+! 
+! 3347 2018-10-15 14:21:08Z suehring
+! Enable USM initialization with default building parameters in case no static
+! input file exist. 
+! 
+! 3343 2018-10-15 10:38:52Z suehring
+! Add output variables usm_rad_pc_inlw, usm_rad_pc_insw*
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3223 2018-08-30 13:48:17Z suehring
+! Bugfix for commit 3222
+! 
+! 3222 2018-08-30 13:35:35Z suehring
+! Introduction of surface array for type and its name
+! 
+! 3203 2018-08-23 10:48:36Z suehring
+! Revise bulk parameter for emissivity at ground-floor level
+! 
+! 3196 2018-08-13 12:26:14Z maronga
+! Added maximum aerodynamic resistance of 300 for horiztonal surfaces.
+! 
+! 3176 2018-07-26 17:12:48Z suehring
+! Bugfix, update virtual potential surface temparture, else heat fluxes on 
+! roofs might become unphysical
+! 
+! 3152 2018-07-19 13:26:52Z suehring
+! Initialize q_surface, which might be used in surface_layer_fluxes
+! 
+! 3151 2018-07-19 08:45:38Z raasch
+! remaining preprocessor define strings __check removed
+! 
+! 3136 2018-07-16 14:48:21Z suehring
+! Limit also roughness length for heat and moisture where necessary
+! 
+! 3123 2018-07-12 16:21:53Z suehring
+! Correct working precision for INTEGER number
+! 
+! 3115 2018-07-10 12:49:26Z suehring
+! Additional building type to represent bridges 
+! 
+! 3091 2018-06-28 16:20:35Z suehring
+! - Limit aerodynamic resistance at vertical walls.
+! - Add check for local roughness length not exceeding surface-layer height and
+!   limit roughness length where necessary.
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! Unused array dxdir was removed, dz was replaced by dzu to consider vertical
+! grid stretching
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message added
+! 
+! 3029 2018-05-23 12:19:17Z raasch
+! bugfix: close unit 151 instead of 90
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Added pc_transpiration_rate
+! 
+! 2977 2018-04-17 10:27:57Z kanani
+! Implement changes from branch radiation (r2948-2971) with minor modifications.
+! (moh.hefny):
+! Extended exn for all model domain height to avoid the need to get nzut.
+! 
+! 2963 2018-04-12 14:47:44Z suehring
+! Introduce index for vegetation/wall, pavement/green-wall and water/window 
+! surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
+! 
+! 2943 2018-04-03 16:17:10Z suehring
+! Calculate exner function at all height levels and remove some un-used
+! variables.
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed urban_surface_par to urban_surface_parameters
+! 
+! 2921 2018-03-22 15:05:23Z Giersch
+! The activation of spinup has been moved to parin
+! 
+! 2920 2018-03-22 11:22:01Z kanani
+! Remove unused pcbl, npcbl from ONLY list
+! moh.hefny:
+! Fixed bugs introduced by new structures and by moving radiation interaction
+! into radiation_model_mod.f90.
+! Bugfix: usm data output 3D didn't respect directions
+! 
+! 2906 2018-03-19 08:56:40Z Giersch
+! Local variable ids has to be initialized with a value of -1 in 
+! usm_average_3d_data
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Calculations of the index range of the subdomain on file which overlaps with
+! the current subdomain are already done in read_restart_data_mod,
+! usm_read/write_restart_data have been renamed to usm_r/wrd_local, variable 
+! named found has been introduced for checking if restart data was found, 
+! reading of restart strings has been moved completely to 
+! read_restart_data_mod, usm_rrd_local is already inside the overlap loop 
+! programmed in read_restart_data_mod, SAVE attribute added where necessary, 
+! deallocation and allocation of some arrays have been changed to take care of 
+! different restart files that can be opened (index i), the marker *** end usm 
+! *** is not necessary anymore, strings and their respective lengths are 
+! written out and read now in case of restart runs to get rid of prescribed 
+! character lengths
+! 
+! 2805 2018-02-14 17:00:09Z suehring
+! Initialization of resistances.
+! 
+! 2797 2018-02-08 13:24:35Z suehring
+! Comment concerning output of ground-heat flux added.
+! 
+! 2766 2018-01-22 17:17:47Z kanani
+! Removed redundant commas, added some blanks
+! 
+! 2765 2018-01-22 11:34:58Z maronga
+! Major bugfix in calculation of f_shf. Adjustment of roughness lengths in
+! building_pars
+! 
+! 2750 2018-01-15 16:26:51Z knoop
+! Move flag plant canopy to modules
+! 
+! 2737 2018-01-11 14:58:11Z kanani
+! Removed unused variables t_surf_whole...
+! 
+! 2735 2018-01-11 12:01:27Z suehring
+! resistances are saved in surface attributes
+! 
+! 2723 2018-01-05 09:27:03Z maronga
+! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs)
+! 
+! 2720 2018-01-02 16:27:15Z kanani
+! Correction of comment
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2705 2017-12-18 11:26:23Z maronga
+! Changes from last commit documented
+! 
+! 2703 2017-12-15 20:12:38Z maronga
+! Workaround for calculation of r_a
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! - Change in file header (GPL part)
+! - Bugfix in calculation of pt_surface and related fluxes. (BM)
+! - Do not write surface temperatures onto pt array as this might cause 
+!   problems with nesting. (MS)
+! - Revised calculation of pt1 (now done in surface_layer_fluxes).
+!   Bugfix, f_shf_window and f_shf_green were not set at vertical surface 
+!   elements. (MS)
+! - merged with branch ebsolver
+!   green building surfaces do not evaporate yet
+!   properties of green wall layers and window layers are taken from wall layers
+!   this input data is missing. (RvT)
+! - Merged with branch radiation (developed by Mohamed Salim)
+! - Revised initialization. (MS)
+! - Rename emiss_surf into emissivity, roughness_wall into z0, albedo_surf into 
+!   albedo. (MS)
+! - Move first call of usm_radiatin from usm_init to init_3d_model
+! - fixed problem with near surface temperature
+! - added near surface temperature t_surf_10cm_h(m), t_surf_10cm_v(l)%t(m)
+! - does not work with temp profile including stability, ol
+!   t_surf_10cm = pt1 now
+! - merged with 2357 bugfix, error message for nopointer version
+! - added indoor model coupling with wall heat flux
+! - added green substrate/ dry vegetation layer for buildings
+! - merged with 2232 new surface-type structure
+! - added transmissivity of window tiles
+! - added MOSAIK tile approach for 3 different surfaces (RvT)
+! 
+! 2583 2017-10-26 13:58:38Z knoop
+! Bugfix: reverted MPI_Win_allocate_cptr introduction in last commit 
+!
+! 2582 2017-10-26 13:19:46Z hellstea
+! Workaround for gnufortran compiler added in usm_calc_svf. CALL MPI_Win_allocate is
+! replaced by CALL MPI_Win_allocate_cptr if defined ( __gnufortran ).
+!
+! 2544 2017-10-13 18:09:32Z maronga
+! Date and time quantities are now read from date_and_time_mod. Solar constant is
+! read from radiation_model_mod
+! 
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny
+! no output of ghost layer data
+! 
+! 2350 2017-08-15 11:48:26Z kanani
+! Bugfix and error message for nopointer version. 
+! Additional "! defined(__nopointer)" as workaround to enable compilation of 
+! nopointer version.
+! 
+! 2318 2017-07-20 17:27:44Z suehring
+! Get topography top index via Function call 
+! 
+! 2317 2017-07-20 17:27:19Z suehring
+! Bugfix: adjust output of shf. Added support for spinups
+! 
+! 2287 2017-06-15 16:46:30Z suehring
+! Bugfix in determination topography-top index
+! 
+! 2269 2017-06-09 11:57:32Z suehring
+! Enable restart runs with different number of PEs
+! Bugfixes nopointer branch
+! 
+! 2258 2017-06-08 07:55:13Z suehring
+! Bugfix, add pre-preprocessor directives to enable non-parrallel mode
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments according to new surface-type structure. Remove usm_wall_heat_flux; 
+! insteat, heat fluxes are directly applied in diffusion_s.
+! 
+! 2213 2017-04-24 15:10:35Z kanani
+! Removal of output quantities usm_lad and usm_canopy_hr
+! 
+! 2209 2017-04-19 09:34:46Z kanani
+! cpp switch __mpi3 removed,
+! minor formatting,
+! small bugfix for division by zero (Krc)
+! 
+! 2113 2017-01-12 13:40:46Z kanani
+! cpp switch __mpi3 added for MPI-3 standard code (Ketelsen)
+! 
+! 2071 2016-11-17 11:22:14Z maronga
+! Small bugfix (Resler)
+! 
+! 2031 2016-10-21 15:11:58Z knoop
+! renamed variable rho to rho_ocean
+! 
+! 2024 2016-10-12 16:42:37Z kanani
+! Bugfixes in deallocation of array plantt and reading of csf/csfsurf,
+! optimization of MPI-RMA operations,
+! declaration of pcbl as integer,
+! renamed usm_radnet -> usm_rad_net, usm_canopy_khf -> usm_canopy_hr,
+! splitted arrays svf -> svf & csf, svfsurf -> svfsurf & csfsurf,
+! use of new control parameter varnamelength,
+! added output variables usm_rad_ressw, usm_rad_reslw,
+! minor formatting changes,
+! minor optimizations.
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Major reformatting according to PALM coding standard (comments, blanks,
+! alphabetical ordering, etc.),
+! removed debug_prints, 
+! removed auxiliary SUBROUTINE get_usm_info, instead, USM flag urban_surface is
+! defined in MODULE control_parameters (modules.f90) to avoid circular 
+! dependencies,
+! renamed canopy_heat_flux to pc_heating_rate, as meaning of quantity changed.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Initial revision
+!
+!
+! Description:
+! ------------
+! 2016/6/9 - Initial version of the USM (Urban Surface Model)
+!            authors: Jaroslav Resler, Pavel Krc
+!                     (Czech Technical University in Prague and Institute of
+!                      Computer Science of the Czech Academy of Sciences, Prague)
+!            with contributions: Michal Belda, Nina Benesova, Ondrej Vlcek
+!            partly inspired by PALM LSM (B. Maronga)
+!            parameterizations of Ra checked with TUF3D (E. S. Krayenhoff)
+!> Module for Urban Surface Model (USM)
+!> The module includes:
+!>    1. radiation model with direct/diffuse radiation, shading, reflections
+!>       and integration with plant canopy
+!>    2. wall and wall surface model
+!>    3. surface layer energy balance
+!>    4. anthropogenic heat (only from transportation so far)
+!>    5. necessary auxiliary subroutines (reading inputs, writing outputs,
+!>       restart simulations, ...)
+!> It also make use of standard radiation and integrates it into
+!> urban surface model.
+!>
+!> Further work:
+!> -------------
+!> 1. Remove global arrays surfouts, surfoutl and only keep track of radiosity
+!>    from surfaces that are visible from local surfaces (i.e. there is a SVF
+!>    where target is local). To do that, radiosity will be exchanged after each
+!>    reflection step using MPI_Alltoall instead of current MPI_Allgather.
+!>
+!> 2. Temporarily large values of surface heat flux can be observed, up to
+!>    1.2 Km/s, which seem to be not realistic.
+!>
+!> @todo Output of _av variables in case of restarts
+!> @todo Revise flux conversion in energy-balance solver
+!> @todo Bugfixing in nopointer branch 
+!> @todo Check optimizations for RMA operations
+!> @todo Alternatives for MPI_WIN_ALLOCATE? (causes problems with openmpi)
+!> @todo Check for load imbalances in CPU measures, e.g. for exchange_horiz_prog
+!>       factor 3 between min and max time
+!> @todo Move setting of flag indoor_model to indoor_model_mod once available
+!> @todo Check divisions in wtend (etc.) calculations for possible division
+!>       by zero, e.g. in case fraq(0,m) + fraq(1,m) = 0?!
+!> @todo Use unit 90 for OPEN/CLOSE of input files (FK)
+!> @todo Move plant canopy stuff into plant canopy code
+!------------------------------------------------------------------------------!
+ MODULE urban_surface_mod
+
+    USE arrays_3d,                                                             &
+#if ! defined( __nopointer )
+        ONLY:  hyp, zu, pt, p, u, v, w, tend, exner, hyrho, prr, q, ql, vpt
+#else
+        ONLY:  hyp,     pt,    u, v, w, tend, exner, hyrho, prr, q, ql, vpt
+#endif
+    USE calc_mean_profile_mod,                                                 &
+        ONLY:  calc_mean_profile
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  c_p, g, kappa, pi, r_d, rho_l, l_v
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_start_time, topography, dt_3d, humidity,               &
+               intermediate_timestep_count, initializing_actions,              &
+               intermediate_timestep_count_max, simulated_time, end_time,      &
+               timestep_scheme, tsc, coupling_char, io_blocks, io_group,       &
+               message_string, time_since_reference_point, surface_pressure,   &
+               pt_surface, large_scale_forcing, lsf_surf, spinup,              &
+               spinup_pt_mean, spinup_time, time_do3d, dt_do3d,                &
+               average_count_3d, varnamelength, urban_surface,                 &
+               plant_canopy, dz
+
+    USE bulk_cloud_model_mod,                                                  &
+        ONLY: bulk_cloud_model, precipitation
+               
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point, log_point_s
+
+    USE date_and_time_mod,                                                     &
+        ONLY:  time_utc_init
+
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy, ddx, ddy, ddx2, ddy2
+
+    USE indices,                                                               &
+        ONLY:  nx, ny, nnx, nny, nnz, nxl, nxlg, nxr, nxrg, nyn, nyng, nys,    &
+               nysg, nzb, nzt, nbgp, wall_flags_0
+
+    USE, INTRINSIC :: iso_c_binding 
+
+    USE kinds
+              
+    USE pegrid
+    
+    USE plant_canopy_model_mod,                                                &
+        ONLY:  pc_heating_rate, pc_transpiration_rate, pc_latent_rate
+    
+    USE radiation_model_mod,                                                   &
+        ONLY:  albedo_type, radiation_interaction, calc_zenith, zenith,        &
+               radiation, rad_sw_in, rad_lw_in, rad_sw_out, rad_lw_out,        &
+               sigma_sb, sun_direction, sun_dir_lat, sun_dir_lon,              &
+               force_radiation_call, surfinsw, surfinlw, surfinswdir,          &
+               surfinswdif, surfoutsw, surfoutlw, surfins,nsvfl, svf, svfsurf, &
+               surfinl, surfinlwdif, rad_sw_in_dir, rad_sw_in_diff,            &
+               rad_lw_in_diff, surfouts, surfoutl, surfoutsl, surfoutll, surf, &
+               surfl, nsurfl, pcbinsw, pcbinlw, pcbinswdir,                    &
+               pcbinswdif, iup_u, inorth_u, isouth_u, ieast_u, iwest_u, iup_l, &
+               inorth_l, isouth_l, ieast_l, iwest_l, id,                       &
+               iz, iy, ix,  nsurf, idsvf, ndsvf,                               &
+               idcsf, ndcsf, kdcsf, pct,                                       &
+               startland, endland, startwall, endwall, skyvf, skyvft, nzub,    &
+               nzut, npcbl, pcbl, unscheduled_radiation_calls
+
+    USE statistics,                                                            &
+        ONLY:  hom, statistic_regions
+
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji, get_topography_top_index,          &
+               ind_pav_green, ind_veg_wall, ind_wat_win, surf_usm_h,           &
+               surf_usm_v, surface_restore_elements
+
+
+    IMPLICIT NONE
+
+    !
+!-- USM model constants
+
+    REAL(wp), PARAMETER ::                     &
+              b_ch               = 6.04_wp,    & ! Clapp & Hornberger exponent
+              lambda_h_green_dry       = 0.19_wp,    & ! heat conductivity for dry soil   
+              lambda_h_green_sm        = 3.44_wp,    & ! heat conductivity of the soil matrix
+              lambda_h_water     = 0.57_wp,    & ! heat conductivity of water
+              psi_sat            = -0.388_wp,  & ! soil matrix potential at saturation
+              rho_c_soil         = 2.19E6_wp,  & ! volumetric heat capacity of soil
+              rho_c_water        = 4.20E6_wp !,  & ! volumetric heat capacity of water
+!               m_max_depth        = 0.0002_wp     ! Maximum capacity of the water reservoir (m)
+
+!
+!-- Soil parameters I           alpha_vg,      l_vg_green,    n_vg, gamma_w_green_sat
+    REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: soil_pars = RESHAPE( (/     &
+                                 3.83_wp,  1.250_wp, 1.38_wp,  6.94E-6_wp, & ! 1
+                                 3.14_wp, -2.342_wp, 1.28_wp,  1.16E-6_wp, & ! 2
+                                 0.83_wp, -0.588_wp, 1.25_wp,  0.26E-6_wp, & ! 3
+                                 3.67_wp, -1.977_wp, 1.10_wp,  2.87E-6_wp, & ! 4
+                                 2.65_wp,  2.500_wp, 1.10_wp,  1.74E-6_wp, & ! 5
+                                 1.30_wp,  0.400_wp, 1.20_wp,  0.93E-6_wp, & ! 6
+                                 0.00_wp,  0.00_wp,  0.00_wp,  0.57E-6_wp  & ! 7
+                                 /), (/ 4, 7 /) )
+
+!
+!-- Soil parameters II              swc_sat,     fc,   wilt,    swc_res  
+    REAL(wp), DIMENSION(0:3,1:7), PARAMETER :: m_soil_pars = RESHAPE( (/ &
+                                 0.403_wp, 0.244_wp, 0.059_wp, 0.025_wp, & ! 1
+                                 0.439_wp, 0.347_wp, 0.151_wp, 0.010_wp, & ! 2
+                                 0.430_wp, 0.383_wp, 0.133_wp, 0.010_wp, & ! 3
+                                 0.520_wp, 0.448_wp, 0.279_wp, 0.010_wp, & ! 4
+                                 0.614_wp, 0.541_wp, 0.335_wp, 0.010_wp, & ! 5
+                                 0.766_wp, 0.663_wp, 0.267_wp, 0.010_wp, & ! 6
+                                 0.472_wp, 0.323_wp, 0.171_wp, 0.000_wp  & ! 7
+                                 /), (/ 4, 7 /) )
+                                
+    !   value 9999999.9_wp -> generic available or user-defined value must be set
+!   otherwise -> no generic variable and user setting is optional
+    REAL(wp) :: alpha_vangenuchten = 9999999.9_wp,      & !< NAMELIST alpha_vg
+                field_capacity = 9999999.9_wp,          & !< NAMELIST fc
+                hydraulic_conductivity = 9999999.9_wp,  & !< NAMELIST gamma_w_green_sat
+                lambda_h_green_sat = 0.0_wp,            & !< heat conductivity for saturated soil
+                l_vangenuchten = 9999999.9_wp,          & !< NAMELIST l_vg
+                n_vangenuchten = 9999999.9_wp,          & !< NAMELIST n_vg
+                residual_moisture = 9999999.9_wp,       & !< NAMELIST m_res
+                saturation_moisture = 9999999.9_wp,     & !< NAMELIST m_sat
+                wilting_point = 9999999.9_wp!,           & !< NAMELIST m_wilt
+    
+
+!-- configuration parameters (they can be setup in PALM config)
+    LOGICAL ::  usm_material_model = .TRUE.        !< flag parameter indicating wheather the  model of heat in materials is used
+    LOGICAL ::  usm_anthropogenic_heat = .FALSE.   !< flag parameter indicating wheather the anthropogenic heat sources (e.g.transportation) are used
+    LOGICAL ::  force_radiation_call_l = .FALSE.   !< flag parameter for unscheduled radiation model calls
+    LOGICAL ::  indoor_model = .FALSE.             !< whether to use the indoor model
+    LOGICAL ::  read_wall_temp_3d = .FALSE.
+    LOGICAL ::  usm_wall_mod = .FALSE.             !< reduces conductivity of the first 2 wall layers by factor 0.1
+
+
+    INTEGER(iwp) ::  building_type = 1               !< default building type (preleminary setting)
+    INTEGER(iwp) ::  land_category = 2               !< default category for land surface
+    INTEGER(iwp) ::  wall_category = 2               !< default category for wall surface over pedestrian zone
+    INTEGER(iwp) ::  pedestrian_category = 2         !< default category for wall surface in pedestrian zone
+    INTEGER(iwp) ::  roof_category = 2               !< default category for root surface
+    REAL(wp)     ::  roughness_concrete = 0.001_wp   !< roughness length of average concrete surface
+!
+!-- Indices of input attributes for (above) ground floor level 
+    INTEGER(iwp) ::  ind_alb_wall_agfl     = 65  !< index in input list for albedo_type of wall above ground floor level
+    INTEGER(iwp) ::  ind_alb_wall_gfl      = 32  !< index in input list for albedo_type of wall ground floor level
+    INTEGER(iwp) ::  ind_alb_wall_r        = 96  !< index in input list for albedo_type of wall roof
+    INTEGER(iwp) ::  ind_alb_green_agfl    = 83  !< index in input list for albedo_type of green above ground floor level
+    INTEGER(iwp) ::  ind_alb_green_gfl     = 50  !< index in input list for albedo_type of green ground floor level
+    INTEGER(iwp) ::  ind_alb_green_r       = 115 !< index in input list for albedo_type of green roof
+    INTEGER(iwp) ::  ind_alb_win_agfl      = 79  !< index in input list for albedo_type of window fraction above ground floor level
+    INTEGER(iwp) ::  ind_alb_win_gfl       = 46  !< index in input list for albedo_type of window fraction ground floor level 
+    INTEGER(iwp) ::  ind_alb_win_r         = 110 !< index in input list for albedo_type of window fraction roof
+    INTEGER(iwp) ::  ind_emis_wall_agfl    = 64  !< index in input list for wall emissivity, above ground floor level
+    INTEGER(iwp) ::  ind_emis_wall_gfl     = 31  !< index in input list for wall emissivity, ground floor level
+    INTEGER(iwp) ::  ind_emis_wall_r       = 95  !< index in input list for wall emissivity, roof
+    INTEGER(iwp) ::  ind_emis_green_agfl   = 82  !< index in input list for green emissivity, above ground floor level
+    INTEGER(iwp) ::  ind_emis_green_gfl    = 49  !< index in input list for green emissivity, ground floor level
+    INTEGER(iwp) ::  ind_emis_green_r      = 114 !< index in input list for green emissivity, roof
+    INTEGER(iwp) ::  ind_emis_win_agfl     = 77  !< index in input list for window emissivity, above ground floor level
+    INTEGER(iwp) ::  ind_emis_win_gfl      = 44  !< index in input list for window emissivity, ground floor level
+    INTEGER(iwp) ::  ind_emis_win_r        = 108 !< index in input list for window emissivity, roof
+    INTEGER(iwp) ::  ind_green_frac_w_agfl = 80  !< index in input list for green fraction on wall, above ground floor level
+    INTEGER(iwp) ::  ind_green_frac_w_gfl  = 47  !< index in input list for green fraction on wall, ground floor level
+    INTEGER(iwp) ::  ind_green_frac_r_agfl = 112 !< index in input list for green fraction on roof, above ground floor level
+    INTEGER(iwp) ::  ind_green_frac_r_gfl  = 111 !< index in input list for green fraction on roof, ground floor level
+    INTEGER(iwp) ::  ind_hc1_agfl          = 58  !< index in input list for heat capacity at first wall layer, above ground floor level
+    INTEGER(iwp) ::  ind_hc1_gfl           = 25  !< index in input list for heat capacity at first wall layer, ground floor level
+    INTEGER(iwp) ::  ind_hc1_wall_r        = 89  !< index in input list for heat capacity at first wall layer, roof
+    INTEGER(iwp) ::  ind_hc1_win_agfl      = 71  !< index in input list for heat capacity at first window layer, above ground floor level
+    INTEGER(iwp) ::  ind_hc1_win_gfl       = 38  !< index in input list for heat capacity at first window layer, ground floor level
+    INTEGER(iwp) ::  ind_hc1_win_r         = 102 !< index in input list for heat capacity at first window layer, roof
+    INTEGER(iwp) ::  ind_hc2_agfl          = 59  !< index in input list for heat capacity at second wall layer, above ground floor level
+    INTEGER(iwp) ::  ind_hc2_gfl           = 26  !< index in input list for heat capacity at second wall layer, ground floor level
+    INTEGER(iwp) ::  ind_hc2_wall_r        = 90  !< index in input list for heat capacity at second wall layer, roof
+    INTEGER(iwp) ::  ind_hc2_win_agfl      = 72  !< index in input list for heat capacity at second window layer, above ground floor level
+    INTEGER(iwp) ::  ind_hc2_win_gfl       = 39  !< index in input list for heat capacity at second window layer, ground floor level
+    INTEGER(iwp) ::  ind_hc2_win_r         = 103 !< index in input list for heat capacity at second window layer, roof
+    INTEGER(iwp) ::  ind_hc3_agfl          = 60  !< index in input list for heat capacity at third wall layer, above ground floor level
+    INTEGER(iwp) ::  ind_hc3_gfl           = 27  !< index in input list for heat capacity at third wall layer, ground floor level
+    INTEGER(iwp) ::  ind_hc3_wall_r        = 91  !< index in input list for heat capacity at third wall layer, roof
+    INTEGER(iwp) ::  ind_hc3_win_agfl      = 73  !< index in input list for heat capacity at third window layer, above ground floor level
+    INTEGER(iwp) ::  ind_hc3_win_gfl       = 40  !< index in input list for heat capacity at third window layer, ground floor level
+    INTEGER(iwp) ::  ind_hc3_win_r         = 104 !< index in input list for heat capacity at third window layer, roof
+    INTEGER(iwp) ::  ind_gflh              = 17  !< index in input list for ground floor level height
+    INTEGER(iwp) ::  ind_lai_r_agfl        = 113 !< index in input list for LAI on roof, above ground floor level
+    INTEGER(iwp) ::  ind_lai_r_gfl         = 113  !< index in input list for LAI on roof, ground floor level
+    INTEGER(iwp) ::  ind_lai_w_agfl        = 81  !< index in input list for LAI on wall, above ground floor level
+    INTEGER(iwp) ::  ind_lai_w_gfl         = 48  !< index in input list for LAI on wall, ground floor level
+    INTEGER(iwp) ::  ind_tc1_agfl          = 61  !< index in input list for thermal conductivity at first wall layer, above ground floor level
+    INTEGER(iwp) ::  ind_tc1_gfl           = 28  !< index in input list for thermal conductivity at first wall layer, ground floor level
+    INTEGER(iwp) ::  ind_tc1_wall_r        = 92  !< index in input list for thermal conductivity at first wall layer, roof
+    INTEGER(iwp) ::  ind_tc1_win_agfl      = 74  !< index in input list for thermal conductivity at first window layer, above ground floor level
+    INTEGER(iwp) ::  ind_tc1_win_gfl       = 41  !< index in input list for thermal conductivity at first window layer, ground floor level
+    INTEGER(iwp) ::  ind_tc1_win_r         = 105 !< index in input list for thermal conductivity at first window layer, roof
+    INTEGER(iwp) ::  ind_tc2_agfl          = 62  !< index in input list for thermal conductivity at second wall layer, above ground floor level
+    INTEGER(iwp) ::  ind_tc2_gfl           = 29  !< index in input list for thermal conductivity at second wall layer, ground floor level
+    INTEGER(iwp) ::  ind_tc2_wall_r        = 93  !< index in input list for thermal conductivity at second wall layer, roof
+    INTEGER(iwp) ::  ind_tc2_win_agfl      = 75  !< index in input list for thermal conductivity at second window layer, above ground floor level
+    INTEGER(iwp) ::  ind_tc2_win_gfl       = 42  !< index in input list for thermal conductivity at second window layer, ground floor level
+    INTEGER(iwp) ::  ind_tc2_win_r         = 106 !< index in input list for thermal conductivity at second window layer, ground floor level
+    INTEGER(iwp) ::  ind_tc3_agfl          = 63  !< index in input list for thermal conductivity at third wall layer, above ground floor level
+    INTEGER(iwp) ::  ind_tc3_gfl           = 30  !< index in input list for thermal conductivity at third wall layer, ground floor level
+    INTEGER(iwp) ::  ind_tc3_wall_r        = 94  !< index in input list for thermal conductivity at third wall layer, roof
+    INTEGER(iwp) ::  ind_tc3_win_agfl      = 76  !< index in input list for thermal conductivity at third window layer, above ground floor level
+    INTEGER(iwp) ::  ind_tc3_win_gfl       = 43  !< index in input list for thermal conductivity at third window layer, ground floor level
+    INTEGER(iwp) ::  ind_tc3_win_r         = 107 !< index in input list for thermal conductivity at third window layer, roof
+    INTEGER(iwp) ::  ind_thick_1_agfl      = 54  !< index for wall layer thickness - 1st layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_1_gfl       = 21  !< index for wall layer thickness - 1st layer ground floor level
+    INTEGER(iwp) ::  ind_thick_1_wall_r    = 85  !< index for wall layer thickness - 1st layer roof
+    INTEGER(iwp) ::  ind_thick_1_win_agfl  = 67  !< index for window layer thickness - 1st layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_1_win_gfl   = 34  !< index for window layer thickness - 1st layer ground floor level
+    INTEGER(iwp) ::  ind_thick_1_win_r     = 98  !< index for window layer thickness - 1st layer roof
+    INTEGER(iwp) ::  ind_thick_2_agfl      = 55  !< index for wall layer thickness - 2nd layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_2_gfl       = 22  !< index for wall layer thickness - 2nd layer ground floor level
+    INTEGER(iwp) ::  ind_thick_2_wall_r    = 86  !< index for wall layer thickness - 2nd layer roof
+    INTEGER(iwp) ::  ind_thick_2_win_agfl  = 68  !< index for window layer thickness - 2nd layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_2_win_gfl   = 35  !< index for window layer thickness - 2nd layer ground floor level
+    INTEGER(iwp) ::  ind_thick_2_win_r     = 99  !< index for window layer thickness - 2nd layer roof
+    INTEGER(iwp) ::  ind_thick_3_agfl      = 56  !< index for wall layer thickness - 3rd layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_3_gfl       = 23  !< index for wall layer thickness - 3rd layer ground floor level
+    INTEGER(iwp) ::  ind_thick_3_wall_r    = 87  !< index for wall layer thickness - 3rd layer roof
+    INTEGER(iwp) ::  ind_thick_3_win_agfl  = 69  !< index for window layer thickness - 3rd layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_3_win_gfl   = 36  !< index for window layer thickness - 3rd layer ground floor level  
+    INTEGER(iwp) ::  ind_thick_3_win_r     = 100 !< index for window layer thickness - 3rd layer roof
+    INTEGER(iwp) ::  ind_thick_4_agfl      = 57  !< index for wall layer thickness - 4th layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_4_gfl       = 24  !< index for wall layer thickness - 4th layer ground floor level
+    INTEGER(iwp) ::  ind_thick_4_wall_r    = 88  !< index for wall layer thickness - 4st layer roof
+    INTEGER(iwp) ::  ind_thick_4_win_agfl  = 70  !< index for window layer thickness - 4th layer above ground floor level
+    INTEGER(iwp) ::  ind_thick_4_win_gfl   = 37  !< index for window layer thickness - 4th layer ground floor level
+    INTEGER(iwp) ::  ind_thick_4_win_r     = 101 !< index for window layer thickness - 4th layer roof
+    INTEGER(iwp) ::  ind_trans_agfl        = 78  !< index in input list for window transmissivity, above ground floor level
+    INTEGER(iwp) ::  ind_trans_gfl         = 45  !< index in input list for window transmissivity, ground floor level
+    INTEGER(iwp) ::  ind_trans_r           = 109 !< index in input list for window transmissivity, roof
+    INTEGER(iwp) ::  ind_wall_frac_agfl    = 53  !< index in input list for wall fraction, above ground floor level
+    INTEGER(iwp) ::  ind_wall_frac_gfl     = 20  !< index in input list for wall fraction, ground floor level
+    INTEGER(iwp) ::  ind_wall_frac_r       = 84  !< index in input list for wall fraction, roof
+    INTEGER(iwp) ::  ind_win_frac_agfl     = 66  !< index in input list for window fraction, above ground floor level
+    INTEGER(iwp) ::  ind_win_frac_gfl      = 33  !< index in input list for window fraction, ground floor level
+    INTEGER(iwp) ::  ind_win_frac_r        = 97  !< index in input list for window fraction, roof
+    INTEGER(iwp) ::  ind_z0_agfl           = 51  !< index in input list for z0, above ground floor level
+    INTEGER(iwp) ::  ind_z0_gfl            = 18  !< index in input list for z0, ground floor level
+    INTEGER(iwp) ::  ind_z0qh_agfl         = 52  !< index in input list for z0h / z0q, above ground floor level
+    INTEGER(iwp) ::  ind_z0qh_gfl          = 19  !< index in input list for z0h / z0q, ground floor level
+    INTEGER(iwp) ::  ind_green_type_roof   = 116 !< index in input list for type of green roof
+
+
+    REAL(wp)  ::  roof_height_limit = 4.0_wp          !< height for distinguish between land surfaces and roofs
+    REAL(wp)  ::  ground_floor_level = 4.0_wp        !< default ground floor level
+
+
+    CHARACTER(37), DIMENSION(0:7), PARAMETER :: building_type_name = (/     &
+                                   'user-defined                         ', & !  0 
+                                   'residential - 1950                   ', & !  1 
+                                   'residential 1951 - 2000              ', & !  2
+                                   'residential 2001 -                   ', & !  3
+                                   'office - 1950                        ', & !  4 
+                                   'office 1951 - 2000                   ', & !  5
+                                   'office 2001 -                        ', & !  6
+                                   'bridges                              '  & !  7
+                                                                     /)
+!
+!-- building parameters, 6 different types
+!-- Parameter for urban surface model
+!-- 0 - heat capacity wall surface, 1 - heat capacity of window surface, 2 - heat capacity of green surface
+!-- 3 - thermal conductivity of wall surface, 4 - thermal conductivity of window surface, 
+!-- 5 - thermal conductivty of green surface, 6 - wall fraction ground plate, 
+!-- 7 - 1st wall layer thickness ground plate, 8 - 2nd wall layer thickness ground plate
+!-- 9 - 3rd wall layer thickness ground plate, 10 - 4th wall layer thickness ground plate,
+!-- 11 - heat capacity 1st/2nd wall layer ground plate, 12 - heat capacity 3rd wall layer ground plate
+!-- 13 - heat capacity 4th wall layer ground plate, 14 - thermal conductivity 1st/2nd wall layer ground plate,
+!-- 15 - thermal conductivity 3rd wall layer ground plate, 16 - thermal conductivity 4th wall layer ground plate
+!-- 17 - ground floor level height, 18 - z0 roughness ground floor level, 19 - z0h/z0g roughness heaat/humidity,
+!-- 20 - wall fraction ground floor level, 21 - 1st wall layer thickness ground floor level, 
+!-- 22 - 2nd wall layer thickness ground floor level, 23 - 3rd wall layer thickness ground floor level,
+!-- 24 - 4th wall layer thickness ground floor level, 25 - heat capacity 1st/2nd wall layer ground floor level,
+!-- 26 - heat capacity 3rd wall layer ground floor level, 27 - heat capacity 4th wall layer ground floor level,
+!-- 28 - thermal conductivity 1st/2nd wall layer ground floor level, 
+!-- 29 - thermal conductivity 3rd wall layer ground floor level, 30 - thermal conductivity 4th wall layer ground floor level
+!-- 31 - wall emissivity ground floor level, 32 - wall albedo ground floor level, 33 - window fraction ground floor level,
+!-- 34 - 1st window layer thickness ground floor level, 35 - 2nd window layer thickness ground floor level,
+!-- 36 - 3rd window layer thickness ground floor level, 37 - 4th window layer thickness ground floor level,
+!-- 38 - heat capacity 1st/2nd window layer ground floor level, 39 - heat capacity 3rd window layer ground floor level,
+!-- 40 - heat capacity 4th window layer ground floor level, 
+!-- 41 - thermal conductivity 1st/2nd window layer ground floor level, 
+!-- 42 - thermal conductivity 3rd window layer ground floor level, 
+!-- 43 - thermal conductivity 4th window layer ground floor level, 44 - window emissivity ground floor level,
+!-- 45 - window transmissivity ground floor level, 46 - window albedo ground floor level,
+!-- 47 - green fraction ground floor level, 48 - LAI on wall ground floor level, 49 - green emissivity ground floor level,
+!-- 50 - green albedo ground floor level, 51 - z0 roughness above ground floor level, 
+!-- 52 - z0h/z0g roughness heat/humidity above ground floor level, 53 - wall fraction above ground floor level
+!-- 54 - 1st wall layer thickness above ground floor level, 55 - 2nd wall layer thickness above ground floor level
+!-- 56 - 3rd wall layer thickness above ground floor level, 57 - 4th wall layer thickness above ground floor level 
+!-- 58 - heat capacity 1st/2nd wall layer above ground floor level,
+!-- 59 - heat capacity 3rd wall layer above ground floor level, 
+!-- 60 - heat capacity 4th wall layer above ground floor level,
+!-- 61 - thermal conductivity 1st/2nd wall layer above ground floor level,
+!-- 62 - thermal conductivity 3rd wall layer above ground floor level,
+!-- 63 - thermal conductivity 4th wall layer above ground floor level,
+!-- 64 - wall emissivity above ground floor level, 65 - wall albedo above ground floor level,
+!-- 66 - window fraction above ground floor level, 67 - 1st window layer thickness above ground floor level,
+!-- 68 - 2nd thickness window layer above ground floor level, 69 - 3rd window layer thickness above ground floor level,
+!-- 70 - 4th window layer thickness above ground floor level, 
+!-- 71 - heat capacity 1st/2nd window layer above ground floor level,
+!-- 72 - heat capacity 3rd window layer above ground floor level,
+!-- 73 - heat capacity 4th window layer above ground floor level, 
+!-- 74 - conductivity 1st/2nd window layer above ground floor level,
+!-- 75 - thermal conductivity 3rd window layer above ground floor level, 
+!-- 76 - thermal conductivity 4th window layer above ground floor level, 77 - window emissivity above ground floor level,
+!-- 78 - window transmissivity above ground floor level, 79 - window albedo above ground floor level,
+!-- 80 - green fraction above ground floor level, 81 - LAI on wall above ground floor level,
+!-- 82 - green emissivity above ground floor level, 83 - green albedo above ground floor level,
+!-- 84 - wall fraction roof, 85 - 1st wall layer thickness roof, 86 - 2nd wall layer thickness roof,
+!-- 87 - 3rd wall layer thickness roof, 88 - 4th wall layer thickness roof,
+!-- 89 - heat capacity 1st/2nd wall layer roof, 90 - heat capacity 3rd wall layer roof,
+!-- 91 - heat capacity 4th wall layer roof, 92 - thermal conductivity 1st/2nd wall layer roof,
+!-- 93 - thermal conductivity 3rd wall layer roof, 94 - thermal conductivity 4th wall layer roof,
+!-- 95 - wall emissivity roof, 96 - wall albedo roof, 97 - window fraction roof,
+!-- 98 - window 1st layer thickness roof, 99 - window 2nd layer thickness roof, 100 - window 3rd layer thickness roof,
+!-- 101 - window 4th layer thickness, 102 - heat capacity 1st/2nd window layer roof, 
+!-- 103 - heat capacity 3rd window layer roof, 104 - heat capacity 4th window layer roof,
+!-- 105 - thermal conductivity 1st/2nd window layer roof, 106 - thermal conductivity 3rd window layer roof,
+!-- 107 - thermal conductivity 4th window layer roof, 108 - window emissivity roof, 109 - window transmissivity roof,
+!-- 110 - window albedo roof, 111 - green fraction roof ground floor level, 
+!-- 112 - green fraction roof above ground floor level, 113 - LAI roof, 114 - green emissivity roof,
+!-- 115 - green albedo roof, 116 - green type roof,
+!-- Parameter for indoor model
+!-- 117 - indoor target summer temperature, 118 - indoor target winter temperature, 
+!-- 119 - shading factor, 120 - g-value windows, 121 - u-value windows, 122 - basical airflow without occupancy of the room,
+!-- 123 - additional airflow depend of occupancy of the room, 124 - heat recovery efficiency,
+!-- 125 - dynamic parameter specific effective surface, 126 - dynamic parameter innner heatstorage,
+!-- 127 - ratio internal surface/floor area, 128 - maximal heating capacity, 129 - maximal cooling capacity,
+!-- 130 - additional internal heat gains dependent on occupancy of the room, 
+!-- 131 - basic internal heat gains without occupancy of the room, 132 - storey height, 133 - ceiling construction height
+
+
+    REAL(wp), DIMENSION(0:133,1:7), PARAMETER :: building_pars = RESHAPE( (/   &
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp,             & !parameter 6-11
+        1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp,           & !parameter 12-17
+        0.01_wp, 0.001_wp, 0.75_wp,                                            & !parameter 18-20
+        0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp,                     & !parameter 21-25
+        1400000.0_wp, 1300000.0_wp, 0.35_wp,                                   & !parameter 26-28                     
+        0.8_wp, 2.1_wp, 0.93_wp,                                               & !parameter 29-31       
+        27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,              & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp,                                    & !parameter 41-44
+        0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                             & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp,                        & !parameter 50-54
+        0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp,                               & !parameter 55-58
+        1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp,                           & !parameter 59-62
+        2.1_wp, 0.93_wp, 27.0_wp, 0.3_wp,                                      & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp,                           & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.005_wp, 0.01_wp, 0.31_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp,       & !parameter 85-90
+        1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp,       & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp,                 & !parameter 103-107
+        0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                     & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp,                         & !parameter 117-121
+        0.1_wp, 0.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp,                   & !parameter 122-127
+        100000.0_wp, 0.0_wp, 3.0_wp, 10.0_wp, 3.0_wp, 0.2_wp,                  & !parameter 128-133- end of type 1
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.42_wp, 2000000.0_wp,             & !parameter 6-11
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp,           & !parameter 12-17
+        0.01_wp, 0.001_wp, 0.78_wp,                                            & !parameter 18-20
+        0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp,                     & !parameter 21-25
+        103000.0_wp, 900000.0_wp, 0.35_wp,                                     & !parameter 26-28                     
+        0.38_wp, 0.04_wp, 0.92_wp,                                             & !parameter 29-31       
+        27.0_wp, 0.22_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,              & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.11_wp, 0.11_wp, 0.11_wp, 0.11_wp,                                    & !parameter 41-44
+        0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                              & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 0.73_wp, 0.005_wp,                       & !parameter 50-54
+        0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp,                               & !parameter 55-58
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp,                            & !parameter 59-62
+        0.04_wp, 0.92_wp, 27.0_wp, 0.27_wp,                                    & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp,                            & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.005_wp, 0.01_wp, 0.5_wp, 0.79_wp, 2000000.0_wp, 103000.0_wp,         & !parameter 85-90
+        900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.93_wp, 27.0_wp, 0.0_wp,      & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp,                 & !parameter 103-107
+        0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                      & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp,                          & !parameter 117-121
+        0.1_wp, 0.5_wp, 0.0_wp, 2.5_wp, 165000.0_wp, 4.5_wp,                   & !parameter 122-127
+        100000.0_wp, 0.0_wp, 4.0_wp, 8.0_wp, 3.0_wp, 0.2_wp,                   & !parameter 128-133- end of type 2
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp,              & !parameter 6-11
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp,          & !parameter 12-17
+        0.01_wp, 0.001_wp, 0.75_wp,                                            & !parameter 18-20
+        0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp,                      & !parameter 21-25
+        103000.0_wp, 900000.0_wp, 0.35_wp,                                     & !parameter 26-28                     
+        0.14_wp, 0.035_wp, 0.92_wp,                                            & !parameter 29-31       
+        27.0_wp, 0.25_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,              & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp,                                     & !parameter 41-44
+        0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                              & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 0.7_wp, 0.005_wp,                        & !parameter 50-54
+        0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp,                                & !parameter 55-58
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp,                            & !parameter 59-62
+        0.035_wp, 0.92_wp, 27.0_wp, 0.3_wp,                                    & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp,                             & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp,         & !parameter 85-90
+        900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.93_wp, 27.0_wp, 0.0_wp,     & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp,                 & !parameter 103-107
+        0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                       & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp,                          & !parameter 117-121
+        0.1_wp, 0.5_wp, 0.8_wp, 2.5_wp, 80000.0_wp, 4.5_wp,                    & !parameter 122-127
+        100000.0_wp, 0.0_wp, 3.0_wp, 8.0_wp, 3.0_wp, 0.2_wp,                   & !parameter 128-133- end of type 3
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp,             & !parameter 6-11
+        1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 4.0_wp,           & !parameter 12-17
+        0.01_wp, 0.001_wp, 0.55_wp,                                            & !parameter 18-20
+        0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp,                     & !parameter 21-25
+        1400000.0_wp, 1300000.0_wp, 0.35_wp,                                   & !parameter 26-28                     
+        0.8_wp, 2.1_wp, 0.93_wp,                                               & !parameter 29-31       
+        27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,              & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp,                                    & !parameter 41-44
+        0.75_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                             & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp,                        & !parameter 50-54
+        0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp,                               & !parameter 55-58
+        1400000.0_wp, 1300000.0_wp, 0.35_wp, 0.8_wp,                           & !parameter 59-62
+        2.1_wp, 0.93_wp, 27.0_wp, 0.5_wp,                                      & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.57_wp, 0.57_wp, 0.57_wp, 0.91_wp, 0.75_wp,                           & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.005_wp, 0.01_wp, 0.39_wp, 0.63_wp, 2200000.0_wp, 1400000.0_wp,       & !parameter 85-90
+        1300000.0_wp, 0.35_wp, 0.8_wp, 2.1_wp, 0.93_wp, 27.0_wp, 0.0_wp,       & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp,                 & !parameter 103-107
+        0.91_wp, 0.75_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                     & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 0.76_wp, 5.0_wp,                         & !parameter 117-121
+        0.1_wp, 1.5_wp, 0.0_wp, 3.5_wp, 370000.0_wp, 4.5_wp,                   & !parameter 122-127
+        100000.0_wp, 0.0_wp, 3.0_wp, 10.0_wp, 3.0_wp, 0.2_wp,                  & !parameter 128-133- end of type 4
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp,             & !parameter 6-11
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 4.0_wp,           & !parameter 12-17
+        0.01_wp, 0.001_wp, 0.55_wp,                                            & !parameter 18-20
+        0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp,                     & !parameter 21-25
+        103000.0_wp, 900000.0_wp, 0.35_wp,                                     & !parameter 26-28                     
+        0.38_wp, 0.04_wp, 0.92_wp,                                             & !parameter 29-31       
+        27.0_wp, 0.45_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,              & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp,                                    & !parameter 41-44
+        0.7_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                              & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 0.5_wp, 0.005_wp,                        & !parameter 50-54
+        0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp,                               & !parameter 55-58
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.38_wp,                            & !parameter 59-62
+        0.04_wp, 0.92_wp, 27.0_wp, 0.5_wp,                                     & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.11_wp, 0.11_wp, 0.11_wp, 0.87_wp, 0.7_wp,                            & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.005_wp, 0.01_wp, 0.31_wp, 0.43_wp, 2000000.0_wp, 103000.0_wp,        & !parameter 85-90
+        900000.0_wp, 0.35_wp, 0.38_wp, 0.04_wp, 0.91_wp, 27.0_wp, 0.0_wp,      & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.11_wp, 0.11_wp, 0.11_wp,                 & !parameter 103-107
+        0.87_wp, 0.7_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                      & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 0.6_wp, 3.0_wp,                          & !parameter 117-121
+        0.1_wp, 1.5_wp, 0.65_wp, 2.5_wp, 165000.0_wp, 4.5_wp,                  & !parameter 122-127
+        100000.0_wp, 0.0_wp, 7.0_wp, 20.0_wp, 3.0_wp, 0.2_wp,                  & !parameter 128-133- end of type 5
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp,              & !parameter 6-11
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 4.0_wp,          & !parameter 12-17
+        0.01_wp, 0.001_wp, 0.475_wp,                                           & !parameter 18-20
+        0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp,                      & !parameter 21-25
+        103000.0_wp, 900000.0_wp, 0.35_wp,                                     & !parameter 26-28                     
+        0.14_wp, 0.035_wp, 0.92_wp,                                            & !parameter 29-31       
+        27.0_wp, 0.525_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,             & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp,                                     & !parameter 41-44
+        0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                              & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 0.425_wp, 0.005_wp,                      & !parameter 50-54
+        0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp,                                & !parameter 55-58
+        103000.0_wp, 900000.0_wp, 0.35_wp, 0.14_wp,                            & !parameter 59-62
+        0.035_wp, 0.92_wp, 27.0_wp, 0.575_wp,                                  & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.037_wp, 0.037_wp, 0.037_wp, 0.8_wp, 0.6_wp,                             & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.005_wp, 0.01_wp, 0.41_wp, 0.7_wp, 2000000.0_wp, 103000.0_wp,         & !parameter 85-90
+        900000.0_wp, 0.35_wp, 0.14_wp, 0.035_wp, 0.91_wp, 27.0_wp, 0.0_wp,     & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.037_wp, 0.037_wp, 0.037_wp,                 & !parameter 103-107
+        0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                       & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 0.5_wp, 0.6_wp,                          & !parameter 117-121
+        0.1_wp, 1.5_wp, 0.9_wp, 2.5_wp, 80000.0_wp, 4.5_wp,                    & !parameter 122-127
+        100000.0_wp, 0.0_wp, 5.0_wp, 15.0_wp, 3.0_wp, 0.2_wp,                  & !parameter 128-133- end of type 6    
+        10.0_wp, 10.0_wp, 20000.0_wp, 23.0_wp, 23.0_wp, 10.0_wp,               & !parameter 0-5
+        1.0_wp, 0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp,           & !parameter 6-11
+        1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 4.0_wp,            & !parameter 12-17
+        0.01_wp, 0.001_wp, 1.0_wp,                                             & !parameter 18-20
+        0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp,                   & !parameter 21-25
+        1848000.0_wp, 1848000.0_wp, 0.7_wp,                                    & !parameter 26-28                     
+        1.0_wp, 1.0_wp, 0.9_wp,                                                & !parameter 29-31       
+        27.0_wp, 0.0_wp, 0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,               & !parameter 32-37
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 38-40
+        0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp,                                     & !parameter 41-44
+        0.6_wp, 27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp,                              & !parameter 45-49
+        5.0_wp, 0.001_wp, 0.0001_wp, 1.0_wp, 0.29_wp,                         & !parameter 50-54
+        0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp,                            & !parameter 55-58
+        1848000.0_wp, 1848000.0_wp, 0.7_wp, 1.0_wp,                            & !parameter 59-62
+        1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp,                                       & !parameter 63-66
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp,                                & !parameter 67-70
+        1736000.0_wp, 1736000.0_wp, 1736000.0_wp,                              & !parameter 71-73
+        0.57_wp, 0.57_wp, 0.57_wp, 0.8_wp, 0.6_wp,                             & !parameter 74-78
+        27.0_wp, 0.0_wp, 1.5_wp, 0.86_wp, 5.0_wp, 1.0_wp,                      & !parameter 79-84
+        0.29_wp, 0.295_wp, 0.695_wp, 0.985_wp, 1950400.0_wp, 1848000.0_wp,     & !parameter 85-90
+        1848000.0_wp, 0.7_wp, 1.0_wp, 1.0_wp, 0.9_wp, 27.0_wp, 0.0_wp,         & !parameter 91-97
+        0.003_wp, 0.006_wp, 0.012_wp, 0.018_wp, 1736000.0_wp,                  & !parameter 98-102 
+        1736000.0_wp, 1736000.0_wp, 0.57_wp, 0.57_wp, 0.57_wp,                 & !parameter 103-107
+        0.8_wp, 0.6_wp, 27.0_wp, 0.0_wp, 0.0_wp, 1.5_wp,                       & !parameter 108-113
+        0.86_wp, 5.0_wp, 0.0_wp,                                              & !parameter 114-116
+        299.15_wp, 293.15_wp, 0.8_wp, 100.0_wp, 100.0_wp,                      & !parameter 117-121
+        20.0_wp, 20.0_wp, 0.0_wp, 1.0_wp, 1.0_wp, 4.5_wp,                      & !parameter 122-127
+        100000.0_wp, 0.0_wp, 0.0_wp, 0.0_wp, 3.0_wp, 0.2_wp                    & !parameter 128-133- end of type 7 (bridge)
+                                                                       /),     &
+                                                               (/134, 7/) )
+
+!
+!-- Type for surface temperatures at vertical walls. Is not necessary for horizontal walls. 
+    TYPE t_surf_vertical
+       REAL(wp), DIMENSION(:), ALLOCATABLE         :: t
+    END TYPE t_surf_vertical
+!
+!-- Type for wall temperatures at vertical walls. Is not necessary for horizontal walls. 
+    TYPE t_wall_vertical
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE       :: t
+    END TYPE t_wall_vertical
+
+    TYPE surf_type_usm
+       REAL(wp), DIMENSION(:),   ALLOCATABLE ::  var_usm_1d !< 1D prognostic variable
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var_usm_2d !< 2D prognostic variable
+    END TYPE surf_type_usm
+    
+#if defined( __nopointer )
+    TYPE(surf_type_usm), TARGET   ::  m_liq_usm_h,        & !< liquid water reservoir (m), horizontal surface elements 
+                                      m_liq_usm_h_p         !< progn. liquid water reservoir (m), horizontal surface elements 
+
+    TYPE(surf_type_usm), DIMENSION(0:3), TARGET   ::  &
+                                      m_liq_usm_v,        & !< liquid water reservoir (m), vertical surface elements 
+                                      m_liq_usm_v_p         !< progn. liquid water reservoir (m), vertical surface elements 
+#else
+    TYPE(surf_type_usm), POINTER  ::  m_liq_usm_h,        & !< liquid water reservoir (m), horizontal surface elements 
+                                      m_liq_usm_h_p         !< progn. liquid water reservoir (m), horizontal surface elements 
+
+    TYPE(surf_type_usm), TARGET   ::  m_liq_usm_h_1,      & !<
+                                      m_liq_usm_h_2         !<
+
+    TYPE(surf_type_usm), DIMENSION(:), POINTER  ::    &
+                                      m_liq_usm_v,        & !< liquid water reservoir (m), vertical surface elements 
+                                      m_liq_usm_v_p         !< progn. liquid water reservoir (m), vertical surface elements 
+
+    TYPE(surf_type_usm), DIMENSION(0:3), TARGET   ::  &
+                                      m_liq_usm_v_1,      & !<
+                                      m_liq_usm_v_2         !<
+#endif
+
+    TYPE(surf_type_usm), TARGET ::  tm_liq_usm_h_m      !< liquid water reservoir tendency (m), horizontal surface elements 
+    TYPE(surf_type_usm), DIMENSION(0:3), TARGET ::  tm_liq_usm_v_m      !< liquid water reservoir tendency (m), vertical surface elements 
+
+
+!-- arrays for time averages
+!-- Attention: the variable rad_net_av is also used in the 3d field variable in radiation_model_mod.f90. It may be better to rename it 
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinsw_av      !< average of sw radiation falling to local surface including radiation from reflections
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlw_av      !< average of lw radiation falling to local surface including radiation from reflections
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinswdir_av   !< average of direct sw radiation falling to local surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinswdif_av   !< average of diffuse sw radiation from sky and model boundary falling to local surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlwdif_av   !< average of diffuse lw radiation from sky and model boundary falling to local surface
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinswref_av   !< average of sw radiation falling to surface from reflections
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinlwref_av   !< average of lw radiation falling to surface from reflections
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutsw_av     !< average of total sw radiation outgoing from nonvirtual surfaces surfaces after all reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfoutlw_av     !< average of total lw radiation outgoing from nonvirtual surfaces surfaces after all reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfins_av       !< average of array of residua of sw radiation absorbed in surface after last reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfinl_av       !< average of array of residua of lw radiation absorbed in surface after last reflection
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinlw_av       !< Average of pcbinlw
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinsw_av       !< Average of pcbinsw
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinswdir_av    !< Average of pcbinswdir
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinswdif_av    !< Average of pcbinswdif
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  pcbinswref_av    !< Average of pcbinswref
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  surfhf_av        !< average of total radiation flux incoming to minus outgoing from local surface  
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wghf_eb_av       !< average of wghf_eb
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wshf_eb_av       !< average of wshf_eb
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  t_wall_av        !< Average of t_wall
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wghf_eb_green_av !< average of wghf_eb_green
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  t_green_av       !< Average of t_green
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  wghf_eb_window_av !< average of wghf_eb_window
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  t_window_av      !< Average of t_window
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  qsws_eb_av       !< average of qsws_eb
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  qsws_veg_eb_av   !< average of qsws_veg_eb
+    REAL(wp), DIMENSION(:), ALLOCATABLE            ::  qsws_liq_eb_av   !< average of qsws_liq_eb
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  swc_av        !< Average of swc
+    
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- anthropogenic heat sources
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE        ::  aheat             !< daily average of anthropogenic heat (W/m2)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          ::  aheatprof         !< diurnal profiles of anthropogenic heat for particular layers
+    INTEGER(iwp)                                   ::  naheatlayers = 1  !< number of layers of anthropogenic heat
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- wall surface model
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- wall surface model constants
+    INTEGER(iwp), PARAMETER                        :: nzb_wall = 0       !< inner side of the wall model (to be switched)
+    INTEGER(iwp), PARAMETER                        :: nzt_wall = 3       !< outer side of the wall model (to be switched)
+    INTEGER(iwp), PARAMETER                        :: nzw = 4            !< number of wall layers (fixed for now)
+
+    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /)
+                                                                         !< normalized soil, wall and roof layer depths (m/m)
+!    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default = (/0.33_wp, 0.66_wp, 1.0_wp /)
+    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default_window = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /)
+!    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default_window = (/0.33_wp, 0.66_wp, 1.0_wp /)
+!    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default_window = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /)
+                                                                         !< normalized window layer depths (m/m)
+!    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default_green = (/0.0242_wp, 0.0969_wp, 0.346_wp, 1.0_wp /)
+                                                                         !< normalized green layer depths (m/m)
+    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default_green = (/0.25_wp, 0.5_wp, 0.75_wp, 1.0_wp /)
+!    REAL(wp), DIMENSION(nzb_wall:nzt_wall)         :: zwn_default_green = (/0.33_wp, 0.66_wp, 1.0_wp /)
+
+
+    REAL(wp)                                       :: wall_inner_temperature = 295.0_wp    !< temperature of the inner wall surface (~22 degrees C) (K)
+    REAL(wp)                                       :: roof_inner_temperature = 295.0_wp    !< temperature of the inner roof surface (~22 degrees C) (K)
+    REAL(wp)                                       :: soil_inner_temperature = 288.0_wp    !< temperature of the deep soil (~15 degrees C) (K)
+    REAL(wp)                                       :: window_inner_temperature = 295.0_wp  !< temperature of the inner window surface (~22 degrees C) (K)
+
+        REAL(wp)                                       ::   m_total = 0.0_wp !< weighted total water content of the soil (m3/m3)
+    INTEGER(iwp)                                   ::   soil_type
+    
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- surface and material model variables for walls, ground, roofs
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: zwn                !< normalized wall layer depths (m)
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: zwn_window         !< normalized window layer depths (m)
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: zwn_green          !< normalized green layer depths (m)
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_wall_h           !< wall surface temperature (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_wall_h_p         !< progn. wall surface temperature (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_window_h    !< window surface temperature (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_window_h_p  !< progn. window surface temperature (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_green_h     !< green surface temperature (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_green_h_p   !< progn. green surface temperature (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_10cm_h      !< near surface temperature (10cm) (K) at horizontal walls
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_10cm_h_p    !< progn. near surface temperature (10cm) (K) at horizontal walls
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_wall_v
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_wall_v_p
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_window_v
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_window_v_p
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_green_v
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_green_v_p
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_10cm_v
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  ::  t_surf_10cm_v_p
+#else
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_wall_h
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_wall_h_p 
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_window_h
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_window_h_p 
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_green_h
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_green_h_p 
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_10cm_h
+    REAL(wp), DIMENSION(:), POINTER                :: t_surf_10cm_h_p
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_wall_h_1
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_wall_h_2
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_window_h_1
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_window_h_2
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_green_h_1
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_green_h_2
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_10cm_h_1
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_10cm_h_2
+
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_wall_v
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_wall_v_p
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_window_v
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_window_v_p
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_green_v
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_green_v_p
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_10cm_v
+    TYPE(t_surf_vertical), DIMENSION(:), POINTER ::  t_surf_10cm_v_p
+
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_wall_v_1
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_wall_v_2
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_window_v_1
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_window_v_2
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_green_v_1
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_green_v_2
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_10cm_v_1
+    TYPE(t_surf_vertical), DIMENSION(0:3), TARGET  :: t_surf_10cm_v_2
+    
+#endif
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_wall_av          !< average of wall surface temperature (K)
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_window_av   !< average of window surface temperature (K)
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_green_av    !< average of green wall surface temperature (K)
+    REAL(wp), DIMENSION(:), ALLOCATABLE, TARGET    :: t_surf_10cm_av    !< average of whole wall surface temperature (K)
+
+!-- Temporal tendencies for time stepping            
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: tt_surface_wall_m       !< surface temperature tendency of wall (K)
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: tt_surface_window_m !< surface temperature tendency of window (K)
+    REAL(wp), DIMENSION(:), ALLOCATABLE            :: tt_surface_green_m !< surface temperature tendency of green wall (K)
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- Energy balance variables
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!-- parameters of the land, roof and wall surfaces
+
+#if defined( __nopointer )
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h             !< Wall temperature (K)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_av          !< Average of t_wall
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_p           !< Prog. wall temperature (K)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h           !< Window temperature (K)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_av        !< Average of t_window
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_p         !< Prog. window temperature (K)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h            !< Green temperature (K)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_av         !< Average of t_green
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_p          !< Prog. green temperature (K)
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: swc_h              !< soil water content green building layer
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: swc_h_av              !< avg of soil water content green building layer
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: swc_h_p              !< Prog. soil water content green building layer
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: swc_sat_h          !< soil water content green building layer at saturation
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: swc_res_h          !< soil water content green building layer residual
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: rootfr_h           !< root fraction green green building layer
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: wilt_h             !< wilting point green building layer
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: fc_h               !< field capacity green building layer
+
+
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v             !< Wall temperature (K)
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_av          !< Average of t_wall
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_p           !< Prog. wall temperature (K)
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v           !< Window temperature (K)
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_av        !< Average of t_window
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_p         !< Prog. window temperature (K)
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v            !< Green temperature (K)
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_av         !< Average of t_green
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_p          !< Prog. green temperature (K)
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: swc_v             !< Wall swc
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: swc_v_av          !< Average of swc
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: swc_v_p           !< Prog. swc
+    
+#else
+    REAL(wp), DIMENSION(:,:), POINTER                :: t_wall_h, t_wall_h_p
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_wall_h_av, t_wall_h_1, t_wall_h_2
+    REAL(wp), DIMENSION(:,:), POINTER                :: t_window_h, t_window_h_p
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_window_h_av, t_window_h_1, t_window_h_2
+    REAL(wp), DIMENSION(:,:), POINTER                :: t_green_h, t_green_h_p
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: t_green_h_av, t_green_h_1, t_green_h_2
+    REAL(wp), DIMENSION(:,:), POINTER                :: swc_h, rootfr_h, wilt_h, fc_h, swc_sat_h, swc_h_p, swc_res_h
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE, TARGET    :: swc_h_1, rootfr_h_1, &
+                                                        wilt_h_1, fc_h_1, swc_sat_h_1, swc_h_2, swc_res_h_1
+    
+
+    TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_wall_v, t_wall_v_p
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_wall_v_av, t_wall_v_1, t_wall_v_2
+    TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_window_v, t_window_v_p
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_window_v_av, t_window_v_1, t_window_v_2
+    TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: t_green_v, t_green_v_p
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: t_green_v_av, t_green_v_1, t_green_v_2
+    TYPE(t_wall_vertical), DIMENSION(:), POINTER   :: swc_v, swc_v_p
+    TYPE(t_wall_vertical), DIMENSION(0:3), TARGET  :: swc_v_av, swc_v_1, swc_v_2
+#endif
+
+!-- Wall temporal tendencies for time stepping
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: tt_wall_m          !< t_wall prognostic array 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: tt_window_m        !< t_window prognostic array 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: tt_green_m         !< t_green prognostic array 
+
+!-- Surface and material parameters classes (surface_type)
+!-- albedo, emissivity, lambda_surf, roughness, thickness, volumetric heat capacity, thermal conductivity
+    INTEGER(iwp)                                   :: n_surface_types      !< number of the wall type categories
+    INTEGER(iwp), PARAMETER                        :: n_surface_params = 9 !< number of parameters for each type of the wall
+    INTEGER(iwp), PARAMETER                        :: ialbedo  = 1         !< albedo of the surface
+    INTEGER(iwp), PARAMETER                        :: iemiss   = 2         !< emissivity of the surface
+    INTEGER(iwp), PARAMETER                        :: ilambdas = 3         !< heat conductivity lambda S between surface and material ( W m-2 K-1 )
+    INTEGER(iwp), PARAMETER                        :: irough   = 4         !< roughness length z0 for movements
+    INTEGER(iwp), PARAMETER                        :: iroughh  = 5         !< roughness length z0h for scalars (heat, humidity,...)
+    INTEGER(iwp), PARAMETER                        :: icsurf   = 6         !< Surface skin layer heat capacity (J m-2 K-1 )
+    INTEGER(iwp), PARAMETER                        :: ithick   = 7         !< thickness of the surface (wall, roof, land)  ( m )
+    INTEGER(iwp), PARAMETER                        :: irhoC    = 8         !< volumetric heat capacity rho*C of the material ( J m-3 K-1 )
+    INTEGER(iwp), PARAMETER                        :: ilambdah = 9         !< thermal conductivity lambda H of the wall (W m-1 K-1 )
+    CHARACTER(12), DIMENSION(:), ALLOCATABLE       :: surface_type_names   !< names of wall types (used only for reports)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE        :: surface_type_codes   !< codes of wall types
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE          :: surface_params       !< parameters of wall types
+
+    
+!-- interfaces of subroutines accessed from outside of this module
+    INTERFACE usm_boundary_condition
+       MODULE PROCEDURE usm_boundary_condition
+    END INTERFACE usm_boundary_condition
+
+    INTERFACE usm_check_data_output
+       MODULE PROCEDURE usm_check_data_output
+    END INTERFACE usm_check_data_output
+    
+    INTERFACE usm_check_parameters
+       MODULE PROCEDURE usm_check_parameters
+    END INTERFACE usm_check_parameters
+    
+    INTERFACE usm_data_output_3d
+       MODULE PROCEDURE usm_data_output_3d
+    END INTERFACE usm_data_output_3d
+    
+    INTERFACE usm_define_netcdf_grid
+       MODULE PROCEDURE usm_define_netcdf_grid
+    END INTERFACE usm_define_netcdf_grid
+
+    INTERFACE usm_init_urban_surface
+       MODULE PROCEDURE usm_init_urban_surface
+    END INTERFACE usm_init_urban_surface
+
+    INTERFACE usm_material_heat_model
+       MODULE PROCEDURE usm_material_heat_model
+    END INTERFACE usm_material_heat_model
+    
+    INTERFACE usm_green_heat_model
+       MODULE PROCEDURE usm_green_heat_model
+    END INTERFACE usm_green_heat_model
+    
+    INTERFACE usm_parin
+       MODULE PROCEDURE usm_parin
+    END INTERFACE usm_parin
+    
+    INTERFACE usm_temperature_near_surface
+       MODULE PROCEDURE usm_temperature_near_surface
+    END INTERFACE usm_temperature_near_surface
+
+    INTERFACE usm_rrd_local 
+       MODULE PROCEDURE usm_rrd_local
+    END INTERFACE usm_rrd_local
+
+    INTERFACE usm_surface_energy_balance
+       MODULE PROCEDURE usm_surface_energy_balance
+    END INTERFACE usm_surface_energy_balance
+    
+    INTERFACE usm_swap_timelevel
+       MODULE PROCEDURE usm_swap_timelevel
+    END INTERFACE usm_swap_timelevel
+        
+    INTERFACE usm_wrd_local
+       MODULE PROCEDURE usm_wrd_local
+    END INTERFACE usm_wrd_local
+
+    INTERFACE usm_allocate_surface
+       MODULE PROCEDURE usm_allocate_surface
+    END INTERFACE usm_allocate_surface
+
+    INTERFACE usm_average_3d_data
+       MODULE PROCEDURE usm_average_3d_data
+    END INTERFACE usm_average_3d_data
+
+    
+    SAVE
+
+    PRIVATE 
+    
+!-- Public functions
+    PUBLIC usm_boundary_condition, usm_check_parameters, usm_init_urban_surface,&
+           usm_rrd_local,                                                      & 
+           usm_surface_energy_balance, usm_material_heat_model,                &
+           usm_swap_timelevel, usm_check_data_output, usm_average_3d_data,     &
+           usm_data_output_3d, usm_define_netcdf_grid, usm_parin,              &
+           usm_wrd_local, usm_allocate_surface
+
+!-- Public parameters, constants and initial values
+    PUBLIC usm_anthropogenic_heat, usm_material_model, usm_wall_mod,           &
+           usm_green_heat_model, usm_temperature_near_surface, building_pars,  &
+           nzt_wall, t_surf_10cm_h, t_surf_10cm_v, t_wall_h, t_wall_v,         &
+           t_window_h, t_window_v, building_type
+
+
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine creates the necessary indices of the urban surfaces
+!> and plant canopy and it allocates the needed arrays for USM
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_allocate_surface
+    
+        IMPLICIT NONE
+       
+        INTEGER(iwp) ::  l
+
+!
+!--     Allocate radiation arrays which are part of the new data type. 
+!--     For horizontal surfaces.
+        ALLOCATE( surf_usm_h%surfhf(1:surf_usm_h%ns)    )
+        ALLOCATE( surf_usm_h%rad_net_l(1:surf_usm_h%ns) )
+!
+!--     For vertical surfaces
+        DO  l = 0, 3
+           ALLOCATE( surf_usm_v(l)%surfhf(1:surf_usm_v(l)%ns)    )
+           ALLOCATE( surf_usm_v(l)%rad_net_l(1:surf_usm_v(l)%ns) )
+        ENDDO
+
+!--     Wall surface model
+!--     allocate arrays for wall surface model and define pointers
+       
+!--     allocate array of wall types and wall parameters
+        ALLOCATE ( surf_usm_h%surface_types(1:surf_usm_h%ns)      )
+        ALLOCATE ( surf_usm_h%building_type(1:surf_usm_h%ns)      )
+        ALLOCATE ( surf_usm_h%building_type_name(1:surf_usm_h%ns) )
+        surf_usm_h%building_type      = 0
+        surf_usm_h%building_type_name = 'none'
+        DO  l = 0, 3
+           ALLOCATE( surf_usm_v(l)%surface_types(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%building_type(1:surf_usm_v(l)%ns)      )
+           ALLOCATE ( surf_usm_v(l)%building_type_name(1:surf_usm_v(l)%ns) )
+           surf_usm_v(l)%building_type      = 0
+           surf_usm_v(l)%building_type_name = 'none'
+        ENDDO
+!
+!--     Allocate albedo_type and albedo. Each surface element
+!--     has 3 values, 0: wall fraction, 1: green fraction, 2: window fraction.
+        ALLOCATE( surf_usm_h%albedo_type(0:2,1:surf_usm_h%ns) )
+        ALLOCATE( surf_usm_h%albedo(0:2,1:surf_usm_h%ns)      )
+        surf_usm_h%albedo_type = albedo_type
+        DO  l = 0, 3
+           ALLOCATE( surf_usm_v(l)%albedo_type(0:2,1:surf_usm_v(l)%ns) )
+           ALLOCATE( surf_usm_v(l)%albedo(0:2,1:surf_usm_v(l)%ns)      )
+           surf_usm_v(l)%albedo_type = albedo_type
+        ENDDO       
+
+
+!
+!--     Allocate indoor target temperature for summer and winter
+        ALLOCATE( surf_usm_h%target_temp_summer(1:surf_usm_h%ns) )
+        ALLOCATE( surf_usm_h%target_temp_winter(1:surf_usm_h%ns) )
+        DO  l = 0, 3
+           ALLOCATE( surf_usm_v(l)%target_temp_summer(1:surf_usm_v(l)%ns) )
+           ALLOCATE( surf_usm_v(l)%target_temp_winter(1:surf_usm_v(l)%ns) )
+        ENDDO   
+!
+!--     Allocate flag indicating ground floor level surface elements
+        ALLOCATE ( surf_usm_h%ground_level(1:surf_usm_h%ns) ) 
+        DO  l = 0, 3
+           ALLOCATE( surf_usm_v(l)%ground_level(1:surf_usm_v(l)%ns) )
+        ENDDO   
+!
+!--      Allocate arrays for relative surface fraction. 
+!--      0 - wall fraction, 1 - green fraction, 2 - window fraction
+         ALLOCATE( surf_usm_h%frac(0:2,1:surf_usm_h%ns) )
+         surf_usm_h%frac = 0.0_wp
+         DO  l = 0, 3
+            ALLOCATE( surf_usm_v(l)%frac(0:2,1:surf_usm_v(l)%ns) )
+            surf_usm_v(l)%frac = 0.0_wp
+         ENDDO
+       
+!--     wall and roof surface parameters. First for horizontal surfaces
+        ALLOCATE ( surf_usm_h%isroof_surf(1:surf_usm_h%ns)        )
+        ALLOCATE ( surf_usm_h%lambda_surf(1:surf_usm_h%ns)        )
+        ALLOCATE ( surf_usm_h%lambda_surf_window(1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%lambda_surf_green(1:surf_usm_h%ns)  )
+        ALLOCATE ( surf_usm_h%c_surface(1:surf_usm_h%ns)          )
+        ALLOCATE ( surf_usm_h%c_surface_window(1:surf_usm_h%ns)   )
+        ALLOCATE ( surf_usm_h%c_surface_green(1:surf_usm_h%ns)    )
+        ALLOCATE ( surf_usm_h%transmissivity(1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%lai(1:surf_usm_h%ns)                )
+        ALLOCATE ( surf_usm_h%emissivity(0:2,1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%r_a(1:surf_usm_h%ns)                )
+        ALLOCATE ( surf_usm_h%r_a_green(1:surf_usm_h%ns)          )
+        ALLOCATE ( surf_usm_h%r_a_window(1:surf_usm_h%ns)         )
+        ALLOCATE ( surf_usm_h%green_type_roof(1:surf_usm_h%ns)    )
+        ALLOCATE ( surf_usm_h%r_s(1:surf_usm_h%ns)                )
+!
+!--     For vertical surfaces.
+        DO  l = 0, 3
+           ALLOCATE ( surf_usm_v(l)%lambda_surf(1:surf_usm_v(l)%ns)     )
+           ALLOCATE ( surf_usm_v(l)%c_surface(1:surf_usm_v(l)%ns)       )
+           ALLOCATE ( surf_usm_v(l)%lambda_surf_window(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%c_surface_window(1:surf_usm_v(l)%ns)   )
+           ALLOCATE ( surf_usm_v(l)%lambda_surf_green(1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%c_surface_green(1:surf_usm_v(l)%ns)    )
+           ALLOCATE ( surf_usm_v(l)%transmissivity(1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%lai(1:surf_usm_v(l)%ns)             )
+           ALLOCATE ( surf_usm_v(l)%emissivity(0:2,1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%r_a(1:surf_usm_v(l)%ns)             )
+           ALLOCATE ( surf_usm_v(l)%r_a_green(1:surf_usm_v(l)%ns)       )
+           ALLOCATE ( surf_usm_v(l)%r_a_window(1:surf_usm_v(l)%ns)      )
+           
+          ALLOCATE ( surf_usm_v(l)%r_s(1:surf_usm_v(l)%ns)                 )
+        ENDDO
+
+!       
+!--     allocate wall and roof material parameters. First for horizontal surfaces
+        ALLOCATE ( surf_usm_h%thickness_wall(1:surf_usm_h%ns)               )
+        ALLOCATE ( surf_usm_h%thickness_window(1:surf_usm_h%ns)                  )
+        ALLOCATE ( surf_usm_h%thickness_green(1:surf_usm_h%ns)                   )
+        ALLOCATE ( surf_usm_h%lambda_h(nzb_wall:nzt_wall,1:surf_usm_h%ns)   )
+        ALLOCATE ( surf_usm_h%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_h%ns)    )
+        ALLOCATE ( surf_usm_h%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_h%ns)  )
+        ALLOCATE ( surf_usm_h%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_h%ns)     )
+
+        ALLOCATE ( surf_usm_h%rho_c_total_green(nzb_wall:nzt_wall,1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%n_vg_green(1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%alpha_vg_green(1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%l_vg_green(1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%gamma_w_green_sat(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%lambda_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%gamma_w_green(nzb_wall:nzt_wall,1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%tswc_h_m(nzb_wall:nzt_wall,1:surf_usm_h%ns)     )
+
+!
+!--     For vertical surfaces.
+        DO  l = 0, 3
+           ALLOCATE ( surf_usm_v(l)%thickness_wall(1:surf_usm_v(l)%ns)               )
+           ALLOCATE ( surf_usm_v(l)%thickness_window(1:surf_usm_v(l)%ns)                  )
+           ALLOCATE ( surf_usm_v(l)%thickness_green(1:surf_usm_v(l)%ns)                   )
+           ALLOCATE ( surf_usm_v(l)%lambda_h(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)   )
+           ALLOCATE ( surf_usm_v(l)%rho_c_wall(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%lambda_h_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%rho_c_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)    )
+           ALLOCATE ( surf_usm_v(l)%lambda_h_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%rho_c_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)     )
+        ENDDO
+
+!
+!--     allocate green wall and roof vegetation and soil parameters. First horizontal surfaces
+        ALLOCATE ( surf_usm_h%g_d(1:surf_usm_h%ns)              )
+        ALLOCATE ( surf_usm_h%c_liq(1:surf_usm_h%ns)            )
+        ALLOCATE ( surf_usm_h%qsws_liq_eb(1:surf_usm_h%ns)         )
+        ALLOCATE ( surf_usm_h%qsws_veg_eb(1:surf_usm_h%ns)         )
+        ALLOCATE ( surf_usm_h%r_canopy(1:surf_usm_h%ns)         )
+        ALLOCATE ( surf_usm_h%r_canopy_min(1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%qsws_eb(1:surf_usm_h%ns)         )
+
+!
+!--     For vertical surfaces.
+        DO  l = 0, 3
+          ALLOCATE ( surf_usm_v(l)%g_d(1:surf_usm_v(l)%ns)              )
+          ALLOCATE ( surf_usm_v(l)%c_liq(1:surf_usm_v(l)%ns)            )
+          ALLOCATE ( surf_usm_v(l)%qsws_liq_eb(1:surf_usm_v(l)%ns)         )
+          ALLOCATE ( surf_usm_v(l)%qsws_veg_eb(1:surf_usm_v(l)%ns)         )
+          ALLOCATE ( surf_usm_v(l)%qsws_eb(1:surf_usm_v(l)%ns)          )
+          ALLOCATE ( surf_usm_v(l)%r_canopy(1:surf_usm_v(l)%ns)         )
+          ALLOCATE ( surf_usm_v(l)%r_canopy_min(1:surf_usm_v(l)%ns)     )
+        ENDDO
+        
+!--     allocate wall and roof layers sizes. For horizontal surfaces.
+        ALLOCATE ( zwn(nzb_wall:nzt_wall) )
+        ALLOCATE ( surf_usm_h%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)     )
+        ALLOCATE ( zwn_window(nzb_wall:nzt_wall) )
+        ALLOCATE ( surf_usm_h%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)     )
+        ALLOCATE ( zwn_green(nzb_wall:nzt_wall) )
+        ALLOCATE ( surf_usm_h%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)      )
+        ALLOCATE ( surf_usm_h%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)    )
+        ALLOCATE ( surf_usm_h%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns)  )
+        ALLOCATE ( surf_usm_h%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%zw(nzb_wall:nzt_wall,1:surf_usm_h%ns)            )
+        ALLOCATE ( surf_usm_h%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)    )
+        ALLOCATE ( surf_usm_h%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns)  )
+        ALLOCATE ( surf_usm_h%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%zw_window(nzb_wall:nzt_wall,1:surf_usm_h%ns)       )
+        ALLOCATE ( surf_usm_h%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)     )
+        ALLOCATE ( surf_usm_h%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns)   )
+        ALLOCATE ( surf_usm_h%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_h%ns)  )
+        ALLOCATE ( surf_usm_h%zw_green(nzb_wall:nzt_wall,1:surf_usm_h%ns)        )
+!
+!--     For vertical surfaces.
+        DO  l = 0, 3
+           ALLOCATE ( surf_usm_v(l)%dz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)     )
+           ALLOCATE ( surf_usm_v(l)%dz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)     )
+           ALLOCATE ( surf_usm_v(l)%dz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)      )
+           ALLOCATE ( surf_usm_v(l)%ddz_wall(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)    )
+           ALLOCATE ( surf_usm_v(l)%dz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%ddz_wall_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%zw(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)            )
+           ALLOCATE ( surf_usm_v(l)%ddz_window(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)    )
+           ALLOCATE ( surf_usm_v(l)%dz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%ddz_window_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%zw_window(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)       )
+           ALLOCATE ( surf_usm_v(l)%ddz_green(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)     )
+           ALLOCATE ( surf_usm_v(l)%dz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)   )
+           ALLOCATE ( surf_usm_v(l)%ddz_green_stag(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)  )
+           ALLOCATE ( surf_usm_v(l)%zw_green(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns)        )
+        ENDDO
+
+!--     allocate wall and roof temperature arrays, for horizontal walls
+#if defined( __nopointer )
+        IF ( .NOT. ALLOCATED( t_surf_wall_h ) )                                     &
+           ALLOCATE ( t_surf_wall_h(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_wall_h_p ) )                                   &
+           ALLOCATE ( t_surf_wall_h_p(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_wall_h ) )                                     &           
+           ALLOCATE ( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( t_wall_h_p ) )                                   &           
+           ALLOCATE ( t_wall_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )  
+        IF ( .NOT. ALLOCATED( t_surf_window_h ) )                              &
+           ALLOCATE ( t_surf_window_h(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_window_h_p ) )                            &
+           ALLOCATE ( t_surf_window_h_p(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_window_h ) )                                   &           
+           ALLOCATE ( t_window_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( t_window_h_p ) )                                 &           
+           ALLOCATE ( t_window_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )  
+        IF ( .NOT. ALLOCATED( t_surf_green_h ) )                               &
+           ALLOCATE ( t_surf_green_h(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_green_h_p ) )                             &
+           ALLOCATE ( t_surf_green_h_p(1:surf_usm_h%ns) )           
+        IF ( .NOT. ALLOCATED( t_green_h ) )                                    &           
+           ALLOCATE ( t_green_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( t_green_h_p ) )                                  &           
+           ALLOCATE ( t_green_h_p(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )  
+        IF ( .NOT. ALLOCATED( t_surf_10cm_h ) )                                &
+           ALLOCATE ( t_surf_10cm_h(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_10cm_h_p ) )                              &
+           ALLOCATE ( t_surf_10cm_h_p(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( swc_h ) )                                    &           
+           ALLOCATE ( swc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( swc_sat_h ) )                                    &           
+           ALLOCATE ( swc_sat_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( swc_res_h ) )                                    &           
+           ALLOCATE ( swc_res_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( rootfr_h ) )                                    &           
+           ALLOCATE ( rootfr_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( wilt_h ) )                                    &           
+           ALLOCATE ( wilt_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( fc_h ) )                                    &           
+           ALLOCATE ( fc_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+
+       IF ( .NOT. ALLOCATED( m_liq_usm_h%var_usm_1d ) )                            &
+          ALLOCATE ( m_liq_usm_h%var_usm_1d(1:surf_usm_h%ns) )
+
+!--    Horizontal surfaces
+       ALLOCATE ( m_liq_usm_h_p%var_usm_1d(1:surf_usm_h%ns)                      )
+!
+!--    Vertical surfaces
+       DO  l = 0, 3
+          ALLOCATE ( m_liq_usm_v_p(l)%var_usm_1d(1:surf_usm_v(l)%ns)                      )
+       ENDDO
+          
+#else
+!
+!--     Allocate if required. Note, in case of restarts, some of these arrays 
+!--     might be already allocated.
+        IF ( .NOT. ALLOCATED( t_surf_wall_h_1 ) )                                   &
+           ALLOCATE ( t_surf_wall_h_1(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_wall_h_2 ) )                                   &
+           ALLOCATE ( t_surf_wall_h_2(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_wall_h_1 ) )                                   &           
+           ALLOCATE ( t_wall_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( t_wall_h_2 ) )                                   &           
+           ALLOCATE ( t_wall_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )          
+        IF ( .NOT. ALLOCATED( t_surf_window_h_1 ) )                            &
+           ALLOCATE ( t_surf_window_h_1(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_window_h_2 ) )                            &
+           ALLOCATE ( t_surf_window_h_2(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_window_h_1 ) )                                 &           
+           ALLOCATE ( t_window_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( t_window_h_2 ) )                                 &           
+           ALLOCATE ( t_window_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )          
+        IF ( .NOT. ALLOCATED( t_surf_green_h_1 ) )                             &
+           ALLOCATE ( t_surf_green_h_1(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_green_h_2 ) )                             &
+           ALLOCATE ( t_surf_green_h_2(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_green_h_1 ) )                                  &           
+           ALLOCATE ( t_green_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( t_green_h_2 ) )                                  &           
+           ALLOCATE ( t_green_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )          
+        IF ( .NOT. ALLOCATED( t_surf_10cm_h_1 ) )                              &
+           ALLOCATE ( t_surf_10cm_h_1(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( t_surf_10cm_h_2 ) )                              &
+           ALLOCATE ( t_surf_10cm_h_2(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( swc_h_1 ) )                                  &           
+           ALLOCATE ( swc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( swc_sat_h_1 ) )                                  &           
+           ALLOCATE ( swc_sat_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( swc_res_h_1 ) )                                  &           
+           ALLOCATE ( swc_res_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( swc_h_2 ) )                                  &           
+           ALLOCATE ( swc_h_2(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( rootfr_h_1 ) )                                  &           
+           ALLOCATE ( rootfr_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( wilt_h_1 ) )                                  &           
+           ALLOCATE ( wilt_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+        IF ( .NOT. ALLOCATED( fc_h_1 ) )                                  &           
+           ALLOCATE ( fc_h_1(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) ) 
+
+        IF ( .NOT. ALLOCATED( m_liq_usm_h_1%var_usm_1d ) )                         &
+           ALLOCATE ( m_liq_usm_h_1%var_usm_1d(1:surf_usm_h%ns) )
+        IF ( .NOT. ALLOCATED( m_liq_usm_h_2%var_usm_1d ) )                         &
+           ALLOCATE ( m_liq_usm_h_2%var_usm_1d(1:surf_usm_h%ns) )
+           
+!           
+!--     initial assignment of the pointers
+        t_wall_h    => t_wall_h_1;    t_wall_h_p    => t_wall_h_2
+        t_window_h    => t_window_h_1;    t_window_h_p    => t_window_h_2
+        t_green_h    => t_green_h_1;    t_green_h_p    => t_green_h_2
+        t_surf_wall_h => t_surf_wall_h_1; t_surf_wall_h_p => t_surf_wall_h_2           
+        t_surf_window_h => t_surf_window_h_1; t_surf_window_h_p => t_surf_window_h_2  
+        t_surf_green_h => t_surf_green_h_1; t_surf_green_h_p => t_surf_green_h_2           
+        t_surf_10cm_h => t_surf_10cm_h_1; t_surf_10cm_h_p => t_surf_10cm_h_2  
+        m_liq_usm_h     => m_liq_usm_h_1;     m_liq_usm_h_p     => m_liq_usm_h_2
+        swc_h       => swc_h_1; swc_h_p     => swc_h_2
+        swc_sat_h    => swc_sat_h_1
+        swc_res_h    => swc_res_h_1
+        rootfr_h       => rootfr_h_1
+        wilt_h       => wilt_h_1
+        fc_h       => fc_h_1
+ 
+#endif
+
+!--     allocate wall and roof temperature arrays, for vertical walls if required
+#if defined( __nopointer )
+        DO  l = 0, 3
+           IF ( .NOT. ALLOCATED( t_surf_wall_v(l)%t ) )                             &
+              ALLOCATE ( t_surf_wall_v(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_wall_v_p(l)%t ) )                           &
+              ALLOCATE ( t_surf_wall_v_p(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_wall_v(l)%t ) )                             &
+              ALLOCATE ( t_wall_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_wall_v_p(l)%t ) )                           &                 
+              ALLOCATE ( t_wall_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_window_v(l)%t ) )                      &
+              ALLOCATE ( t_surf_window_v(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_window_v_p(l)%t ) )                    &
+              ALLOCATE ( t_surf_window_v_p(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_window_v(l)%t ) )                           &
+              ALLOCATE ( t_window_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_window_v_p(l)%t ) )                         &                 
+              ALLOCATE ( t_window_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_green_v(l)%t ) )                            &
+              ALLOCATE ( t_green_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_green_v_p(l)%t ) )                          &                 
+              ALLOCATE ( t_green_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_green_v(l)%t ) )                       &
+              ALLOCATE ( t_surf_green_v(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_green_v_p(l)%t ) )                     &
+              ALLOCATE ( t_surf_green_v_p(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_10cm_v(l)%t ) )                        &
+              ALLOCATE ( t_surf_10cm_v(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_10cm_v_p(l)%t ) )                        &
+              ALLOCATE ( t_surf_10cm_v_p(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( m_liq_usm_v(l)%var_usm_1d ) )                 &
+             ALLOCATE ( m_liq_usm_v(l)%var_usm_1d(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( swc_v(l)%t ) )                             &
+              ALLOCATE ( swc_v(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( swc_v_p(l)%t ) )                           &                 
+              ALLOCATE ( swc_v_p(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+        ENDDO
+#else
+!
+!--     Allocate if required. Note, in case of restarts, some of these arrays 
+!--     might be already allocated.
+        DO  l = 0, 3
+           IF ( .NOT. ALLOCATED( t_surf_wall_v_1(l)%t ) )                           &
+              ALLOCATE ( t_surf_wall_v_1(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_wall_v_2(l)%t ) )                           &
+              ALLOCATE ( t_surf_wall_v_2(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_wall_v_1(l)%t ) )                           &           
+              ALLOCATE ( t_wall_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) 
+           IF ( .NOT. ALLOCATED( t_wall_v_2(l)%t ) )                           &           
+              ALLOCATE ( t_wall_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )  
+           IF ( .NOT. ALLOCATED( t_surf_window_v_1(l)%t ) )                    &
+              ALLOCATE ( t_surf_window_v_1(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_window_v_2(l)%t ) )                    &
+              ALLOCATE ( t_surf_window_v_2(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_window_v_1(l)%t ) )                         &           
+              ALLOCATE ( t_window_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) 
+           IF ( .NOT. ALLOCATED( t_window_v_2(l)%t ) )                         &           
+              ALLOCATE ( t_window_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )  
+           IF ( .NOT. ALLOCATED( t_surf_green_v_1(l)%t ) )                     &
+              ALLOCATE ( t_surf_green_v_1(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_green_v_2(l)%t ) )                     &
+              ALLOCATE ( t_surf_green_v_2(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_green_v_1(l)%t ) )                          &           
+              ALLOCATE ( t_green_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) 
+           IF ( .NOT. ALLOCATED( t_green_v_2(l)%t ) )                          &           
+              ALLOCATE ( t_green_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )  
+           IF ( .NOT. ALLOCATED( t_surf_10cm_v_1(l)%t ) )                     &
+              ALLOCATE ( t_surf_10cm_v_1(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( t_surf_10cm_v_2(l)%t ) )                     &
+              ALLOCATE ( t_surf_10cm_v_2(l)%t(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( m_liq_usm_v_1(l)%var_usm_1d ) )              &
+              ALLOCATE ( m_liq_usm_v_1(l)%var_usm_1d(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( m_liq_usm_v_2(l)%var_usm_1d ) )              &
+              ALLOCATE ( m_liq_usm_v_2(l)%var_usm_1d(1:surf_usm_v(l)%ns) )
+           IF ( .NOT. ALLOCATED( swc_v_1(l)%t ) )                           &           
+              ALLOCATE ( swc_v_1(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) ) 
+           IF ( .NOT. ALLOCATED( swc_v_2(l)%t ) )                           &           
+              ALLOCATE ( swc_v_2(l)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )  
+        ENDDO
+!
+!--     initial assignment of the pointers
+        t_wall_v    => t_wall_v_1;    t_wall_v_p    => t_wall_v_2
+        t_surf_wall_v => t_surf_wall_v_1; t_surf_wall_v_p => t_surf_wall_v_2
+        t_window_v    => t_window_v_1;    t_window_v_p    => t_window_v_2
+        t_green_v    => t_green_v_1;    t_green_v_p    => t_green_v_2
+        t_surf_window_v => t_surf_window_v_1; t_surf_window_v_p => t_surf_window_v_2
+        t_surf_green_v => t_surf_green_v_1; t_surf_green_v_p => t_surf_green_v_2
+        t_surf_10cm_v => t_surf_10cm_v_1; t_surf_10cm_v_p => t_surf_10cm_v_2
+        m_liq_usm_v     => m_liq_usm_v_1;     m_liq_usm_v_p     => m_liq_usm_v_2
+        swc_v    => swc_v_1;    swc_v_p    => swc_v_2
+
+#endif
+!
+!--     Allocate intermediate timestep arrays. For horizontal surfaces.
+        ALLOCATE ( surf_usm_h%tt_surface_wall_m(1:surf_usm_h%ns)                  )
+        ALLOCATE ( surf_usm_h%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%tt_surface_window_m(1:surf_usm_h%ns)             )
+        ALLOCATE ( surf_usm_h%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_h%ns)  )
+        ALLOCATE ( surf_usm_h%tt_surface_green_m(1:surf_usm_h%ns)              )
+
+!
+!--    Allocate intermediate timestep arrays
+!--    Horizontal surfaces
+       ALLOCATE ( tm_liq_usm_h_m%var_usm_1d(1:surf_usm_h%ns)                   )
+!
+!--    Horizontal surfaces
+       DO  l = 0, 3
+          ALLOCATE ( tm_liq_usm_v_m(l)%var_usm_1d(1:surf_usm_v(l)%ns)          )
+       ENDDO 
+        
+!
+!--     Set inital values for prognostic quantities
+        IF ( ALLOCATED( surf_usm_h%tt_surface_wall_m ) )  surf_usm_h%tt_surface_wall_m = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%tt_wall_m    ) )  surf_usm_h%tt_wall_m    = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%tt_surface_window_m ) )  surf_usm_h%tt_surface_window_m = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%tt_window_m    )      )  surf_usm_h%tt_window_m         = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%tt_green_m    )       )  surf_usm_h%tt_green_m          = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%tt_surface_green_m )  )  surf_usm_h%tt_surface_green_m  = 0.0_wp
+!
+!--     Now, for vertical surfaces
+        DO  l = 0, 3
+           ALLOCATE ( surf_usm_v(l)%tt_surface_wall_m(1:surf_usm_v(l)%ns)                  )
+           ALLOCATE ( surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( ALLOCATED( surf_usm_v(l)%tt_surface_wall_m ) )  surf_usm_v(l)%tt_surface_wall_m = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%tt_wall_m    ) )  surf_usm_v(l)%tt_wall_m    = 0.0_wp
+           ALLOCATE ( surf_usm_v(l)%tt_surface_window_m(1:surf_usm_v(l)%ns)             )
+           ALLOCATE ( surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns) )
+           IF ( ALLOCATED( surf_usm_v(l)%tt_surface_window_m ) )  surf_usm_v(l)%tt_surface_window_m = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%tt_window_m  ) )  surf_usm_v(l)%tt_window_m    = 0.0_wp
+           ALLOCATE ( surf_usm_v(l)%tt_surface_green_m(1:surf_usm_v(l)%ns)              )
+           IF ( ALLOCATED( surf_usm_v(l)%tt_surface_green_m ) )  surf_usm_v(l)%tt_surface_green_m = 0.0_wp
+           ALLOCATE ( surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall+1,1:surf_usm_v(l)%ns)  )
+           IF ( ALLOCATED( surf_usm_v(l)%tt_green_m   ) )  surf_usm_v(l)%tt_green_m    = 0.0_wp
+        ENDDO
+
+!--     allocate wall heat flux output array and set initial values. For horizontal surfaces
+!         ALLOCATE ( surf_usm_h%wshf(1:surf_usm_h%ns)    )  !can be removed 
+        ALLOCATE ( surf_usm_h%wshf_eb(1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%wghf_eb(1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%wghf_eb_window(1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%wghf_eb_green(1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%iwghf_eb(1:surf_usm_h%ns) )
+        ALLOCATE ( surf_usm_h%iwghf_eb_window(1:surf_usm_h%ns) )
+        IF ( ALLOCATED( surf_usm_h%wshf    ) )  surf_usm_h%wshf    = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%wshf_eb ) )  surf_usm_h%wshf_eb = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%wghf_eb ) )  surf_usm_h%wghf_eb = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%wghf_eb_window ) )  surf_usm_h%wghf_eb_window = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%wghf_eb_green ) )  surf_usm_h%wghf_eb_green = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%iwghf_eb ) )  surf_usm_h%iwghf_eb = 0.0_wp
+        IF ( ALLOCATED( surf_usm_h%iwghf_eb_window ) )  surf_usm_h%iwghf_eb_window = 0.0_wp
+!
+!--     Now, for vertical surfaces
+        DO  l = 0, 3
+!            ALLOCATE ( surf_usm_v(l)%wshf(1:surf_usm_v(l)%ns)    )    ! can be removed
+           ALLOCATE ( surf_usm_v(l)%wshf_eb(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%wghf_eb(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%wghf_eb_window(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%wghf_eb_green(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%iwghf_eb(1:surf_usm_v(l)%ns) )
+           ALLOCATE ( surf_usm_v(l)%iwghf_eb_window(1:surf_usm_v(l)%ns) )
+           IF ( ALLOCATED( surf_usm_v(l)%wshf    ) )  surf_usm_v(l)%wshf    = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%wshf_eb ) )  surf_usm_v(l)%wshf_eb = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%wghf_eb ) )  surf_usm_v(l)%wghf_eb = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_window ) )  surf_usm_v(l)%wghf_eb_window = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%wghf_eb_green ) )  surf_usm_v(l)%wghf_eb_green = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb ) )  surf_usm_v(l)%iwghf_eb = 0.0_wp
+           IF ( ALLOCATED( surf_usm_v(l)%iwghf_eb_window ) )  surf_usm_v(l)%iwghf_eb_window = 0.0_wp
+        ENDDO
+        
+    END SUBROUTINE usm_allocate_surface
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sum up and time-average urban surface output quantities as well as allocate
+!> the array necessary for storing the average.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_average_3d_data( mode, variable )
+
+        IMPLICIT NONE
+
+        CHARACTER(LEN=*), INTENT(IN) ::  mode
+        CHARACTER(LEN=*), INTENT(IN) :: variable
+  
+        INTEGER(iwp)                                       :: i, j, k, l, m, ids, idsint, iwl, istat
+        CHARACTER(LEN=varnamelength)                       :: var
+        INTEGER(iwp), PARAMETER                            :: nd = 5
+        CHARACTER(LEN=6), DIMENSION(0:nd-1), PARAMETER     :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /)
+        INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER         :: dirint = (/ iup_u, isouth_u, inorth_u, iwest_u, ieast_u /)
+
+!--     find the real name of the variable
+        ids = -1
+        l = -1
+        var = TRIM(variable)
+        DO i = 0, nd-1
+            k = len(TRIM(var))
+            j = len(TRIM(dirname(i)))
+            IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) )  THEN
+                ids = i
+                idsint = dirint(ids)
+                var = var(:k-j)
+                EXIT
+            ENDIF
+        ENDDO
+        l = idsint - 2  ! horisontal direction index - terible hack !
+        IF ( l < 0 .OR. l > 3 ) THEN
+           l = -1
+        END IF
+        IF ( ids == -1 )  THEN
+            var = TRIM(variable)
+        ENDIF
+        IF ( var(1:11) == 'usm_t_wall_'  .AND.  len(TRIM(var)) >= 12 )  THEN
+!--          wall layers
+            READ(var(12:12), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:10)
+            ELSE
+!--             wrong wall layer index
+                RETURN
+            ENDIF
+        ENDIF
+        IF ( var(1:13) == 'usm_t_window_'  .AND.  len(TRIM(var)) >= 14 )  THEN
+!--          wall layers
+            READ(var(14:14), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:12)
+            ELSE
+!--             wrong window layer index
+                RETURN
+            ENDIF
+        ENDIF
+        IF ( var(1:12) == 'usm_t_green_'  .AND.  len(TRIM(var)) >= 13 )  THEN
+!--          wall layers
+            READ(var(13:13), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:11)
+            ELSE
+!--             wrong green layer index
+                RETURN
+            ENDIF
+        ENDIF
+        IF ( var(1:8) == 'usm_swc_'  .AND.  len(TRIM(var)) >= 9 )  THEN
+!--          swc layers
+            READ(var(9:9), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:7)
+            ELSE
+!--             wrong swc layer index
+                RETURN
+            ENDIF
+        ENDIF
+
+        IF ( mode == 'allocate' )  THEN
+           
+           SELECT CASE ( TRIM( var ) )
+                
+                CASE ( 'usm_rad_net' )
+!--                 array of complete radiation balance
+                    IF ( l == -1 ) THEN
+                        IF ( .NOT.  ALLOCATED(surf_usm_h%rad_net_av) )  THEN
+                            ALLOCATE( surf_usm_h%rad_net_av(1:surf_usm_h%ns) )
+                            surf_usm_h%rad_net_av = 0.0_wp
+                        ENDIF
+                    ELSE
+                        IF ( .NOT.  ALLOCATED(surf_usm_v(l)%rad_net_av) )  THEN
+                            ALLOCATE( surf_usm_v(l)%rad_net_av(1:surf_usm_v(l)%ns) )
+                            surf_usm_v(l)%rad_net_av = 0.0_wp
+                        ENDIF
+                    ENDIF
+                    
+                CASE ( 'usm_rad_insw' )
+!--                 array of sw radiation falling to surface after i-th reflection
+                    IF ( .NOT.  ALLOCATED(surfinsw_av) )  THEN
+                        ALLOCATE( surfinsw_av(nsurfl) )
+                        surfinsw_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_inlw' )
+!--                 array of lw radiation falling to surface after i-th reflection
+                    IF ( .NOT.  ALLOCATED(surfinlw_av) )  THEN
+                        ALLOCATE( surfinlw_av(nsurfl) )
+                        surfinlw_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_inswdir' )
+!--                 array of direct sw radiation falling to surface from sun
+                    IF ( .NOT.  ALLOCATED(surfinswdir_av) )  THEN
+                        ALLOCATE( surfinswdir_av(nsurfl) )
+                        surfinswdir_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_inswdif' )
+!--                 array of difusion sw radiation falling to surface from sky and borders of the domain
+                    IF ( .NOT.  ALLOCATED(surfinswdif_av) )  THEN
+                        ALLOCATE( surfinswdif_av(nsurfl) )
+                        surfinswdif_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_inswref' )
+!--                 array of sw radiation falling to surface from reflections
+                    IF ( .NOT.  ALLOCATED(surfinswref_av) )  THEN
+                        ALLOCATE( surfinswref_av(nsurfl) )
+                        surfinswref_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_inlwdif' )
+!--                 array of sw radiation falling to surface after i-th reflection
+                   IF ( .NOT.  ALLOCATED(surfinlwdif_av) )  THEN
+                        ALLOCATE( surfinlwdif_av(nsurfl) )
+                        surfinlwdif_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_inlwref' )
+!--                 array of lw radiation falling to surface from reflections
+                    IF ( .NOT.  ALLOCATED(surfinlwref_av) )  THEN
+                        ALLOCATE( surfinlwref_av(nsurfl) )
+                        surfinlwref_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_outsw' )
+!--                 array of sw radiation emitted from surface after i-th reflection
+                    IF ( .NOT.  ALLOCATED(surfoutsw_av) )  THEN
+                        ALLOCATE( surfoutsw_av(nsurfl) )
+                        surfoutsw_av = 0.0_wp
+                    ENDIF
+
+                CASE ( 'usm_rad_outlw' )
+!--                 array of lw radiation emitted from surface after i-th reflection
+                    IF ( .NOT.  ALLOCATED(surfoutlw_av) )  THEN
+                        ALLOCATE( surfoutlw_av(nsurfl) )
+                        surfoutlw_av = 0.0_wp
+                    ENDIF
+                CASE ( 'usm_rad_ressw' )
+!--                 array of residua of sw radiation absorbed in surface after last reflection
+                    IF ( .NOT.  ALLOCATED(surfins_av) )  THEN
+                        ALLOCATE( surfins_av(nsurfl) )
+                        surfins_av = 0.0_wp
+                    ENDIF
+                                   
+                CASE ( 'usm_rad_reslw' )
+!--                 array of residua of lw radiation absorbed in surface after last reflection
+                    IF ( .NOT.  ALLOCATED(surfinl_av) )  THEN
+                        ALLOCATE( surfinl_av(nsurfl) )
+                        surfinl_av = 0.0_wp
+                    ENDIF
+                                    
+                CASE ( 'usm_rad_pc_inlw' )
+!--                 array of of lw radiation absorbed in plant canopy
+                    IF ( .NOT.  ALLOCATED(pcbinlw_av) )  THEN
+                        ALLOCATE( pcbinlw_av(1:npcbl) )
+                        pcbinlw_av = 0.0_wp
+                    ENDIF
+                                    
+                CASE ( 'usm_rad_pc_insw' )
+!--                 array of of sw radiation absorbed in plant canopy
+                    IF ( .NOT.  ALLOCATED(pcbinsw_av) )  THEN
+                        ALLOCATE( pcbinsw_av(1:npcbl) )
+                        pcbinsw_av = 0.0_wp
+                    ENDIF
+                                    
+                CASE ( 'usm_rad_pc_inswdir' )
+!--                 array of of direct sw radiation absorbed in plant canopy
+                    IF ( .NOT.  ALLOCATED(pcbinswdir_av) )  THEN
+                        ALLOCATE( pcbinswdir_av(1:npcbl) )
+                        pcbinswdir_av = 0.0_wp
+                    ENDIF
+                                    
+                CASE ( 'usm_rad_pc_inswdif' )
+!--                 array of of diffuse sw radiation absorbed in plant canopy
+                    IF ( .NOT.  ALLOCATED(pcbinswdif_av) )  THEN
+                        ALLOCATE( pcbinswdif_av(1:npcbl) )
+                        pcbinswdif_av = 0.0_wp
+                    ENDIF
+                                    
+                CASE ( 'usm_rad_pc_inswref' )
+!--                 array of of reflected sw radiation absorbed in plant canopy
+                    IF ( .NOT.  ALLOCATED(pcbinswref_av) )  THEN
+                        ALLOCATE( pcbinswref_av(1:npcbl) )
+                        pcbinswref_av = 0.0_wp
+                    ENDIF
+                                   
+                CASE ( 'usm_rad_hf' )
+!--                 array of heat flux from radiation for surfaces after i-th reflection
+                    IF ( l == -1 ) THEN
+                        IF ( .NOT.  ALLOCATED(surf_usm_h%surfhf_av) )  THEN
+                           ALLOCATE( surf_usm_h%surfhf_av(1:surf_usm_h%ns) )
+                           surf_usm_h%surfhf_av = 0.0_wp
+                        ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%surfhf_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%surfhf_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%surfhf_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_wshf' )
+!--                 array of sensible heat flux from surfaces
+!--                 land surfaces
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%wshf_eb_av) )  THEN
+                          ALLOCATE( surf_usm_h%wshf_eb_av(1:surf_usm_h%ns) )
+                          surf_usm_h%wshf_eb_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%wshf_eb_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%wshf_eb_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%wshf_eb_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+                    
+                CASE ( 'usm_qsws' )
+!--                 array of latent heat flux from surfaces
+!--                 land surfaces
+                    IF ( l == -1 .AND. .NOT.  ALLOCATED(surf_usm_h%qsws_eb_av) )  THEN
+                        ALLOCATE( surf_usm_h%qsws_eb_av(1:surf_usm_h%ns) )
+                        surf_usm_h%qsws_eb_av = 0.0_wp
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%qsws_eb_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%qsws_eb_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%qsws_eb_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+                    
+                CASE ( 'usm_qsws_veg' )
+!--                 array of latent heat flux from vegetation surfaces
+!--                 land surfaces
+                    IF ( l == -1 .AND. .NOT.  ALLOCATED(surf_usm_h%qsws_veg_eb_av) )  THEN
+                        ALLOCATE( surf_usm_h%qsws_veg_eb_av(1:surf_usm_h%ns) )
+                        surf_usm_h%qsws_veg_eb_av = 0.0_wp
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%qsws_veg_eb_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%qsws_veg_eb_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%qsws_veg_eb_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+                    
+                CASE ( 'usm_qsws_liq' )
+!--                 array of latent heat flux from surfaces with liquid
+!--                 land surfaces
+                    IF ( l == -1 .AND. .NOT.  ALLOCATED(surf_usm_h%qsws_liq_eb_av) )  THEN
+                        ALLOCATE( surf_usm_h%qsws_liq_eb_av(1:surf_usm_h%ns) )
+                        surf_usm_h%qsws_liq_eb_av = 0.0_wp
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%qsws_liq_eb_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%qsws_liq_eb_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%qsws_liq_eb_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+!
+!--             Please note, the following output quantities belongs to the 
+!--             individual tile fractions - ground heat flux at wall-, window-, 
+!--             and green fraction. Aggregated ground-heat flux is treated
+!--             accordingly in average_3d_data, sum_up_3d_data, etc..
+                CASE ( 'usm_wghf' )
+!--                 array of heat flux from ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%wghf_eb_av) )  THEN
+                           ALLOCATE( surf_usm_h%wghf_eb_av(1:surf_usm_h%ns) )
+                           surf_usm_h%wghf_eb_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%wghf_eb_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%wghf_eb_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%wghf_eb_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_wghf_window' )
+!--                 array of heat flux from window ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%wghf_eb_window_av) )  THEN
+                           ALLOCATE( surf_usm_h%wghf_eb_window_av(1:surf_usm_h%ns) )
+                           surf_usm_h%wghf_eb_window_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%wghf_eb_window_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%wghf_eb_window_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%wghf_eb_window_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_wghf_green' )
+!--                 array of heat flux from green ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%wghf_eb_green_av) )  THEN
+                           ALLOCATE( surf_usm_h%wghf_eb_green_av(1:surf_usm_h%ns) )
+                           surf_usm_h%wghf_eb_green_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%wghf_eb_green_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%wghf_eb_green_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%wghf_eb_green_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_iwghf' )
+!--                 array of heat flux from indoor ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%iwghf_eb_av) )  THEN
+                           ALLOCATE( surf_usm_h%iwghf_eb_av(1:surf_usm_h%ns) )
+                           surf_usm_h%iwghf_eb_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%iwghf_eb_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%iwghf_eb_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%iwghf_eb_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_iwghf_window' )
+!--                 array of heat flux from indoor window ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%iwghf_eb_window_av) )  THEN
+                           ALLOCATE( surf_usm_h%iwghf_eb_window_av(1:surf_usm_h%ns) )
+                           surf_usm_h%iwghf_eb_window_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%iwghf_eb_window_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%iwghf_eb_window_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%iwghf_eb_window_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_t_surf_wall' )
+!--                 surface temperature for surfaces
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_surf_wall_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_surf_wall_av(1:surf_usm_h%ns) )
+                           surf_usm_h%t_surf_wall_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_surf_wall_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_surf_wall_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_surf_wall_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_t_surf_window' )
+!--                 surface temperature for window surfaces
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_surf_window_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_surf_window_av(1:surf_usm_h%ns) )
+                           surf_usm_h%t_surf_window_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_surf_window_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_surf_window_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_surf_window_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_green' )
+!--                 surface temperature for green surfaces
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_surf_green_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_surf_green_av(1:surf_usm_h%ns) )
+                           surf_usm_h%t_surf_green_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_surf_green_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_surf_green_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_surf_green_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+                
+                CASE ( 'usm_t_surf_10cm' )
+!--                 near surface temperature for whole surfaces
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_surf_10cm_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_surf_10cm_av(1:surf_usm_h%ns) )
+                           surf_usm_h%t_surf_10cm_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_surf_10cm_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_surf_10cm_av(1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_surf_10cm_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_t_wall' )
+!--                 wall temperature for iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_wall_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+                           surf_usm_h%t_wall_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_wall_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_wall_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_wall_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_t_window' )
+!--                 window temperature for iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_window_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_window_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+                           surf_usm_h%t_window_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_window_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_window_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_window_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+                CASE ( 'usm_t_green' )
+!--                 green temperature for iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       IF ( .NOT.  ALLOCATED(surf_usm_h%t_green_av) )  THEN
+                           ALLOCATE( surf_usm_h%t_green_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+                           surf_usm_h%t_green_av = 0.0_wp
+                       ENDIF
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%t_green_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%t_green_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%t_green_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+                CASE ( 'usm_swc' )
+!--                 soil water content for iwl layer of walls and land
+                    IF ( l == -1 .AND. .NOT.  ALLOCATED(surf_usm_h%swc_av) )  THEN
+                        ALLOCATE( surf_usm_h%swc_av(nzb_wall:nzt_wall,1:surf_usm_h%ns) )
+                        surf_usm_h%swc_av = 0.0_wp
+                    ELSE
+                       IF ( .NOT.  ALLOCATED(surf_usm_v(l)%swc_av) )  THEN
+                           ALLOCATE( surf_usm_v(l)%swc_av(nzb_wall:nzt_wall,1:surf_usm_v(l)%ns) )
+                           surf_usm_v(l)%swc_av = 0.0_wp
+                       ENDIF
+                    ENDIF
+
+               CASE DEFAULT
+                   CONTINUE
+
+           END SELECT
+
+        ELSEIF ( mode == 'sum' )  THEN
+           
+           SELECT CASE ( TRIM( var ) )
+                
+                CASE ( 'usm_rad_net' )
+!--                 array of complete radiation balance
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%rad_net_av(m) =                              &
+                                             surf_usm_h%rad_net_av(m) +           &
+                                             surf_usm_h%rad_net_l(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%rad_net_av(m) =                        &
+                                          surf_usm_v(l)%rad_net_av(m) +        &
+                                          surf_usm_v(l)%rad_net_l(m)
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_rad_insw' )
+!--                 array of sw radiation falling to surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinsw_av(l) = surfinsw_av(l) + surfinsw(l)
+                        ENDIF
+                    ENDDO
+                             
+                CASE ( 'usm_rad_inlw' )
+!--                 array of lw radiation falling to surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinlw_av(l) = surfinlw_av(l) + surfinlw(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inswdir' )
+!--                 array of direct sw radiation falling to surface from sun
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinswdir_av(l) = surfinswdir_av(l) + surfinswdir(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inswdif' )
+!--                 array of difusion sw radiation falling to surface from sky and borders of the domain
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinswdif_av(l) = surfinswdif_av(l) + surfinswdif(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inswref' )
+!--                 array of sw radiation falling to surface from reflections
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinswref_av(l) = surfinswref_av(l) + surfinsw(l) - &
+                                                surfinswdir(l) - surfinswdif(l)
+                        ENDIF
+                    ENDDO
+
+                    
+                CASE ( 'usm_rad_inlwdif' )
+!--                 array of sw radiation falling to surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinlwdif_av(l) = surfinlwdif_av(l) + surfinlwdif(l)
+                        ENDIF
+                    ENDDO
+!                     
+                CASE ( 'usm_rad_inlwref' )
+!--                 array of lw radiation falling to surface from reflections
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinlwref_av(l) = surfinlwref_av(l) + &
+                                                surfinlw(l) - surfinlwdif(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_outsw' )
+!--                 array of sw radiation emitted from surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfoutsw_av(l) = surfoutsw_av(l) + surfoutsw(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_outlw' )
+!--                 array of lw radiation emitted from surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfoutlw_av(l) = surfoutlw_av(l) + surfoutlw(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_ressw' )
+!--                 array of residua of sw radiation absorbed in surface after last reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfins_av(l) = surfins_av(l) + surfins(l)
+                        ENDIF
+                    ENDDO
+                                    
+                CASE ( 'usm_rad_reslw' )
+!--                 array of residua of lw radiation absorbed in surface after last reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinl_av(l) = surfinl_av(l) + surfinl(l)
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_pc_inlw' )
+                    pcbinlw_av(:) = pcbinlw_av(:) + pcbinlw(:)
+                    
+                CASE ( 'usm_rad_pc_insw' )
+                    pcbinsw_av(:) = pcbinsw_av(:) + pcbinsw(:)
+                    
+                CASE ( 'usm_rad_pc_inswdir' )
+                    pcbinswdir_av(:) = pcbinswdir_av(:) + pcbinswdir(:)
+                    
+                CASE ( 'usm_rad_pc_inswdif' )
+                    pcbinswdif_av(:) = pcbinswdif_av(:) + pcbinswdif(:)
+                    
+                CASE ( 'usm_rad_pc_inswref' )
+                    pcbinswref_av(:) = pcbinswref_av(:) + pcbinsw(:)     &
+                                                        - pcbinswdir(:)  &
+                                                        - pcbinswdif(:)
+                    
+                CASE ( 'usm_rad_hf' )
+!--                 array of heat flux from radiation for surfaces after i-th reflection
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%surfhf_av(m) =                               &
+                                             surf_usm_h%surfhf_av(m) +            &
+                                             surf_usm_h%surfhf(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%surfhf_av(m) =                         &
+                                          surf_usm_v(l)%surfhf_av(m) +         &
+                                          surf_usm_v(l)%surfhf(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_wshf' )
+!--                 array of sensible heat flux from surfaces (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wshf_eb_av(m) =                              &
+                                             surf_usm_h%wshf_eb_av(m) +           &
+                                             surf_usm_h%wshf_eb(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wshf_eb_av(m) =                        &
+                                          surf_usm_v(l)%wshf_eb_av(m) +        &
+                                          surf_usm_v(l)%wshf_eb(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_qsws' )
+!--                 array of latent heat flux from surfaces (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%qsws_eb_av(m) =                              &
+                                          surf_usm_h%qsws_eb_av(m) +           &
+                                          surf_usm_h%qsws_eb(m)
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%qsws_eb_av(m) =                        &
+                                          surf_usm_v(l)%qsws_eb_av(m) +        &
+                                          surf_usm_v(l)%qsws_eb(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_qsws_veg' )
+!--                 array of latent heat flux from vegetation surfaces (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%qsws_veg_eb_av(m) =                              &
+                                          surf_usm_h%qsws_veg_eb_av(m) +           &
+                                          surf_usm_h%qsws_veg_eb(m)
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%qsws_veg_eb_av(m) =                        &
+                                          surf_usm_v(l)%qsws_veg_eb_av(m) +        &
+                                          surf_usm_v(l)%qsws_veg_eb(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_qsws_liq' )
+!--                 array of latent heat flux from surfaces with liquid (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%qsws_liq_eb_av(m) =                              &
+                                          surf_usm_h%qsws_liq_eb_av(m) +           &
+                                          surf_usm_h%qsws_liq_eb(m)
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%qsws_liq_eb_av(m) =                        &
+                                          surf_usm_v(l)%qsws_liq_eb_av(m) +        &
+                                          surf_usm_v(l)%qsws_liq_eb(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_wghf' )
+!--                 array of heat flux from ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wghf_eb_av(m) =                              &
+                                             surf_usm_h%wghf_eb_av(m) +           &
+                                             surf_usm_h%wghf_eb(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wghf_eb_av(m) =                        &
+                                          surf_usm_v(l)%wghf_eb_av(m) +        &
+                                          surf_usm_v(l)%wghf_eb(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_wghf_window' )
+!--                 array of heat flux from window ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wghf_eb_window_av(m) =                              &
+                                             surf_usm_h%wghf_eb_window_av(m) +           &
+                                             surf_usm_h%wghf_eb_window(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wghf_eb_window_av(m) =                        &
+                                          surf_usm_v(l)%wghf_eb_window_av(m) +        &
+                                          surf_usm_v(l)%wghf_eb_window(m)
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_wghf_green' )
+!--                 array of heat flux from green ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wghf_eb_green_av(m) =                              &
+                                             surf_usm_h%wghf_eb_green_av(m) +           &
+                                             surf_usm_h%wghf_eb_green(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wghf_eb_green_av(m) =                        &
+                                          surf_usm_v(l)%wghf_eb_green_av(m) +        &
+                                          surf_usm_v(l)%wghf_eb_green(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_iwghf' )
+!--                 array of heat flux from indoor ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%iwghf_eb_av(m) =                              &
+                                             surf_usm_h%iwghf_eb_av(m) +           &
+                                             surf_usm_h%iwghf_eb(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%iwghf_eb_av(m) =                        &
+                                          surf_usm_v(l)%iwghf_eb_av(m) +        &
+                                          surf_usm_v(l)%iwghf_eb(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_iwghf_window' )
+!--                 array of heat flux from indoor window ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%iwghf_eb_window_av(m) =                              &
+                                             surf_usm_h%iwghf_eb_window_av(m) +           &
+                                             surf_usm_h%iwghf_eb_window(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%iwghf_eb_window_av(m) =                        &
+                                          surf_usm_v(l)%iwghf_eb_window_av(m) +        &
+                                          surf_usm_v(l)%iwghf_eb_window(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_wall' )
+!--                 surface temperature for surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%t_surf_wall_av(m) =                               & 
+                                          surf_usm_h%t_surf_wall_av(m) +            &
+                                          t_surf_wall_h(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_wall_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_wall_av(m) +         &
+                                          t_surf_wall_v(l)%t(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_window' )
+!--                 surface temperature for window surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_surf_window_av(m) =                               &
+                                             surf_usm_h%t_surf_window_av(m) +            &
+                                             t_surf_window_h(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_window_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_window_av(m) +         &
+                                          t_surf_window_v(l)%t(m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_green' )
+!--                 surface temperature for green surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_surf_green_av(m) =                               &
+                                             surf_usm_h%t_surf_green_av(m) +            &
+                                             t_surf_green_h(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_green_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_green_av(m) +         &
+                                          t_surf_green_v(l)%t(m)
+                       ENDDO
+                    ENDIF
+                
+                CASE ( 'usm_t_surf_10cm' )
+!--                 near surface temperature for whole surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_surf_10cm_av(m) =                               &
+                                             surf_usm_h%t_surf_10cm_av(m) +            &
+                                             t_surf_10cm_h(m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_10cm_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_10cm_av(m) +         &
+                                          t_surf_10cm_v(l)%t(m)
+                       ENDDO
+                    ENDIF
+
+                    
+                CASE ( 'usm_t_wall' )
+!--                 wall temperature for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_wall_av(iwl,m) =                           &
+                                             surf_usm_h%t_wall_av(iwl,m) +        &
+                                             t_wall_h(iwl,m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_wall_av(iwl,m) =                     &
+                                          surf_usm_v(l)%t_wall_av(iwl,m) +     &
+                                          t_wall_v(l)%t(iwl,m)
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_window' )
+!--                 window temperature for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_window_av(iwl,m) =                           &
+                                             surf_usm_h%t_window_av(iwl,m) +        &
+                                             t_window_h(iwl,m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_window_av(iwl,m) =                     &
+                                          surf_usm_v(l)%t_window_av(iwl,m) +     &
+                                          t_window_v(l)%t(iwl,m)
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_t_green' )
+!--                 green temperature for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_green_av(iwl,m) =                           &
+                                             surf_usm_h%t_green_av(iwl,m) +        &
+                                             t_green_h(iwl,m)
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_green_av(iwl,m) =                     &
+                                          surf_usm_v(l)%t_green_av(iwl,m) +     &
+                                          t_green_v(l)%t(iwl,m)
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_swc' )
+!--                 soil water content for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%swc_av(iwl,m) =                           &
+                                          surf_usm_h%swc_av(iwl,m) +        &
+                                          swc_h(iwl,m)
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%swc_av(iwl,m) =                     &
+                                          surf_usm_v(l)%swc_av(iwl,m) +     &
+                                          swc_v(l)%t(iwl,m)
+                       ENDDO
+                    ENDIF
+
+                CASE DEFAULT
+                    CONTINUE
+
+           END SELECT
+
+        ELSEIF ( mode == 'average' )  THEN
+           
+           SELECT CASE ( TRIM( var ) )
+                
+                CASE ( 'usm_rad_net' )
+!--                 array of complete radiation balance
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%rad_net_av(m) =                              &
+                                             surf_usm_h%rad_net_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%rad_net_av(m) =                        &
+                                          surf_usm_v(l)%rad_net_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_rad_insw' )
+!--                 array of sw radiation falling to surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinsw_av(l) = surfinsw_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                             
+                CASE ( 'usm_rad_inlw' )
+!--                 array of lw radiation falling to surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinlw_av(l) = surfinlw_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inswdir' )
+!--                 array of direct sw radiation falling to surface from sun
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinswdir_av(l) = surfinswdir_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inswdif' )
+!--                 array of difusion sw radiation falling to surface from sky and borders of the domain
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinswdif_av(l) = surfinswdif_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inswref' )
+!--                 array of sw radiation falling to surface from reflections
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinswref_av(l) = surfinswref_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inlwdif' )
+!--                 array of sw radiation falling to surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinlwdif_av(l) = surfinlwdif_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_inlwref' )
+!--                 array of lw radiation falling to surface from reflections
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinlwref_av(l) = surfinlwref_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_outsw' )
+!--                 array of sw radiation emitted from surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfoutsw_av(l) = surfoutsw_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_outlw' )
+!--                 array of lw radiation emitted from surface after i-th reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfoutlw_av(l) = surfoutlw_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_ressw' )
+!--                 array of residua of sw radiation absorbed in surface after last reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfins_av(l) = surfins_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                                    
+                CASE ( 'usm_rad_reslw' )
+!--                 array of residua of lw radiation absorbed in surface after last reflection
+                    DO l = 1, nsurfl
+                        IF ( surfl(id,l) == idsint )  THEN
+                            surfinl_av(l) = surfinl_av(l) / REAL( average_count_3d, kind=wp )
+                        ENDIF
+                    ENDDO
+                    
+                CASE ( 'usm_rad_pc_inlw' )
+                    pcbinlw_av(:) = pcbinlw_av(:) / REAL( average_count_3d, kind=wp )
+                    
+                CASE ( 'usm_rad_pc_insw' )
+                    pcbinsw_av(:) = pcbinsw_av(:) / REAL( average_count_3d, kind=wp )
+                    
+                CASE ( 'usm_rad_pc_inswdir' )
+                    pcbinswdir_av(:) = pcbinswdir_av(:) / REAL( average_count_3d, kind=wp )
+                    
+                CASE ( 'usm_rad_pc_inswdif' )
+                    pcbinswdif_av(:) = pcbinswdif_av(:) / REAL( average_count_3d, kind=wp )
+                    
+                CASE ( 'usm_rad_pc_inswref' )
+                    pcbinswref_av(:) = pcbinswref_av(:) / REAL( average_count_3d, kind=wp )
+                    
+                CASE ( 'usm_rad_hf' )
+!--                 array of heat flux from radiation for surfaces after i-th reflection
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%surfhf_av(m) =                               &
+                                             surf_usm_h%surfhf_av(m) /            &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%surfhf_av(m) =                         &
+                                          surf_usm_v(l)%surfhf_av(m) /         &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_wshf' )
+!--                 array of sensible heat flux from surfaces (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wshf_eb_av(m) =                              &
+                                             surf_usm_h%wshf_eb_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wshf_eb_av(m) =                        &
+                                          surf_usm_v(l)%wshf_eb_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_qsws' )
+!--                 array of latent heat flux from surfaces (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%qsws_eb_av(m) =                              &
+                                          surf_usm_h%qsws_eb_av(m) /           &
+                                          REAL( average_count_3d, kind=wp )
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%qsws_eb_av(m) =                        &
+                                          surf_usm_v(l)%qsws_eb_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_qsws_veg' )
+!--                 array of latent heat flux from vegetation surfaces (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%qsws_veg_eb_av(m) =                              &
+                                          surf_usm_h%qsws_veg_eb_av(m) /           &
+                                          REAL( average_count_3d, kind=wp )
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%qsws_veg_eb_av(m) =                        &
+                                          surf_usm_v(l)%qsws_veg_eb_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_qsws_liq' )
+!--                 array of latent heat flux from surfaces with liquid (land, roof, wall)
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%qsws_liq_eb_av(m) =                              &
+                                          surf_usm_h%qsws_liq_eb_av(m) /           &
+                                          REAL( average_count_3d, kind=wp )
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%qsws_liq_eb_av(m) =                        &
+                                          surf_usm_v(l)%qsws_liq_eb_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_wghf' )
+!--                 array of heat flux from ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wghf_eb_av(m) =                              &
+                                             surf_usm_h%wghf_eb_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wghf_eb_av(m) =                        &
+                                          surf_usm_v(l)%wghf_eb_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_wghf_window' )
+!--                 array of heat flux from window ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wghf_eb_window_av(m) =                              &
+                                             surf_usm_h%wghf_eb_window_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wghf_eb_window_av(m) =                        &
+                                          surf_usm_v(l)%wghf_eb_window_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_wghf_green' )
+!--                 array of heat flux from green ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%wghf_eb_green_av(m) =                              &
+                                             surf_usm_h%wghf_eb_green_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%wghf_eb_green_av(m) =                        &
+                                          surf_usm_v(l)%wghf_eb_green_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_iwghf' )
+!--                 array of heat flux from indoor ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%iwghf_eb_av(m) =                              &
+                                             surf_usm_h%iwghf_eb_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%iwghf_eb_av(m) =                        &
+                                          surf_usm_v(l)%iwghf_eb_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_iwghf_window' )
+!--                 array of heat flux from indoor window ground (wall, roof, land)
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%iwghf_eb_window_av(m) =                              &
+                                             surf_usm_h%iwghf_eb_window_av(m) /           &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%iwghf_eb_window_av(m) =                        &
+                                          surf_usm_v(l)%iwghf_eb_window_av(m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_wall' )
+!--                 surface temperature for surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%t_surf_wall_av(m) =                               & 
+                                          surf_usm_h%t_surf_wall_av(m) /            &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_wall_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_wall_av(m) /         &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_window' )
+!--                 surface temperature for window surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_surf_window_av(m) =                               &
+                                             surf_usm_h%t_surf_window_av(m) /            &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_window_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_window_av(m) /         &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_green' )
+!--                 surface temperature for green surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_surf_green_av(m) =                               &
+                                             surf_usm_h%t_surf_green_av(m) /            &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_green_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_green_av(m) /         &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_surf_10cm' )
+!--                 near surface temperature for whole surfaces
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_surf_10cm_av(m) =                               &
+                                             surf_usm_h%t_surf_10cm_av(m) /            &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_surf_10cm_av(m) =                         &
+                                          surf_usm_v(l)%t_surf_10cm_av(m) /         &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_t_wall' )
+!--                 wall temperature for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_wall_av(iwl,m) =                           &
+                                             surf_usm_h%t_wall_av(iwl,m) /        &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_wall_av(iwl,m) =                     &
+                                          surf_usm_v(l)%t_wall_av(iwl,m) /     &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_t_window' )
+!--                 window temperature for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_window_av(iwl,m) =                           &
+                                             surf_usm_h%t_window_av(iwl,m) /        &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_window_av(iwl,m) =                     &
+                                          surf_usm_v(l)%t_window_av(iwl,m) /     &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+
+                CASE ( 'usm_t_green' )
+!--                 green temperature for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                       DO  m = 1, surf_usm_h%ns
+                          surf_usm_h%t_green_av(iwl,m) =                           &
+                                             surf_usm_h%t_green_av(iwl,m) /        &
+                                             REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%t_green_av(iwl,m) =                     &
+                                          surf_usm_v(l)%t_green_av(iwl,m) /     &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+                    
+                CASE ( 'usm_swc' )
+!--                 soil water content for  iwl layer of walls and land
+                    IF ( l == -1 ) THEN
+                    DO  m = 1, surf_usm_h%ns
+                       surf_usm_h%swc_av(iwl,m) =                           &
+                                          surf_usm_h%swc_av(iwl,m) /        &
+                                          REAL( average_count_3d, kind=wp )
+                    ENDDO
+                    ELSE
+                       DO  m = 1, surf_usm_v(l)%ns
+                          surf_usm_v(l)%swc_av(iwl,m) =                     &
+                                          surf_usm_v(l)%swc_av(iwl,m) /     &
+                                          REAL( average_count_3d, kind=wp )
+                       ENDDO
+                    ENDIF
+
+
+           END SELECT
+
+        ENDIF
+
+    END SUBROUTINE usm_average_3d_data
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Set internal Neumann boundary condition at outer soil grid points 
+!> for temperature and humidity. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE usm_boundary_condition
+ 
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i      !< grid index x-direction
+    INTEGER(iwp) :: ioff   !< offset index x-direction indicating location of soil grid point
+    INTEGER(iwp) :: j      !< grid index y-direction
+    INTEGER(iwp) :: joff   !< offset index x-direction indicating location of soil grid point
+    INTEGER(iwp) :: k      !< grid index z-direction
+    INTEGER(iwp) :: koff   !< offset index x-direction indicating location of soil grid point
+    INTEGER(iwp) :: l      !< running index surface-orientation
+    INTEGER(iwp) :: m      !< running index surface elements
+
+    koff = surf_usm_h%koff
+    DO  m = 1, surf_usm_h%ns
+       i = surf_usm_h%i(m)
+       j = surf_usm_h%j(m)
+       k = surf_usm_h%k(m)
+       pt(k+koff,j,i) = pt(k,j,i)
+    ENDDO
+
+    DO  l = 0, 3
+       ioff = surf_usm_v(l)%ioff
+       joff = surf_usm_v(l)%joff
+       DO  m = 1, surf_usm_v(l)%ns
+          i = surf_usm_v(l)%i(m)
+          j = surf_usm_v(l)%j(m)
+          k = surf_usm_v(l)%k(m)
+          pt(k,j+joff,i+ioff) = pt(k,j,i)
+       ENDDO
+    ENDDO
+
+ END SUBROUTINE usm_boundary_condition
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine checks variables and assigns units.
+!> It is called out from subroutine check_parameters.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_check_data_output( variable, unit )
+
+        IMPLICIT NONE
+
+        CHARACTER(LEN=*),INTENT(IN)    ::  variable   !< 
+        CHARACTER(LEN=*),INTENT(OUT)   ::  unit       !<
+
+        INTEGER(iwp)                                  :: i,j,l        !< index
+        CHARACTER(LEN=2)                              :: ls
+        CHARACTER(LEN=varnamelength)                  :: var          !< TRIM(variable)
+        INTEGER(iwp), PARAMETER                       :: nl1 = 31     !< number of directional usm variables
+        CHARACTER(LEN=varnamelength), DIMENSION(nl1)  :: varlist1 = & !< list of directional usm variables
+                  (/'usm_rad_net                   ', &
+                    'usm_rad_insw                  ', &
+                    'usm_rad_inlw                  ', &
+                    'usm_rad_inswdir               ', &
+                    'usm_rad_inswdif               ', &
+                    'usm_rad_inswref               ', &
+                    'usm_rad_inlwdif               ', &
+                    'usm_wshf                      ', &
+                    'usm_rad_inlwref               ', &
+                    'usm_rad_outsw                 ', &
+                    'usm_rad_outlw                 ', &
+                    'usm_rad_hf                    ', &
+                    'usm_rad_ressw                 ', &
+                    'usm_rad_reslw                 ', &
+                    'usm_wghf                      ', &
+                    'usm_wghf_window               ', &
+                    'usm_wghf_green                ', &
+                    'usm_iwghf                     ', &
+                    'usm_iwghf_window              ', &
+                    'usm_surfz                     ', &
+                    'usm_surfwintrans              ', &
+                    'usm_surfcat                   ', &
+                    'usm_surfalb                   ', &
+                    'usm_surfemis                  ', &
+                    'usm_t_surf_wall               ', &
+                    'usm_t_surf_window             ', &
+                    'usm_t_surf_green              ', &
+                    'usm_t_green                   ', &
+                    'usm_t_surf_10cm               ', &
+                    'usm_skyvf                     ', &
+                    'usm_skyvft                    '/)
+
+        INTEGER(iwp), PARAMETER                       :: nl2 = 7      !< number of other variables
+        CHARACTER(LEN=varnamelength), DIMENSION(nl2)  :: varlist2 = & !< list of other usm variables
+                  (/'usm_svf                       ', &
+                    'usm_dif                       ', &
+                    'usm_rad_pc_inlw               ', &
+                    'usm_rad_pc_insw               ', &
+                    'usm_rad_pc_inswdir            ', &
+                    'usm_rad_pc_inswdif            ', &
+                    'usm_rad_pc_inswref            '/)
+
+        INTEGER(iwp), PARAMETER                       :: nl3 = 3      !< number of directional layer usm variables
+        CHARACTER(LEN=varnamelength), DIMENSION(nl3)  :: varlist3 = & !< list of directional layer usm variables
+                  (/'usm_t_wall                    ', &
+                    'usm_t_window                  ', &
+                    'usm_t_green                   '/)
+
+        INTEGER(iwp), PARAMETER                       :: nd = 5     !< number of directions
+        CHARACTER(LEN=6), DIMENSION(nd), PARAMETER  :: dirname = &  !< direction names
+                  (/'_roof ','_south','_north','_west ','_east '/)
+        LOGICAL                                       :: lfound     !< flag if the variable is found
+
+
+        lfound = .FALSE.
+
+        var = TRIM(variable)
+
+!--     check if variable exists
+!       directional variables
+        DO i = 1, nl1
+           DO j = 1, nd
+              IF ( TRIM(var) == TRIM(varlist1(i))//TRIM(dirname(j)) ) THEN
+                 lfound = .TRUE.
+                 EXIT
+              ENDIF
+              IF ( lfound ) EXIT
+           ENDDO
+        ENDDO
+        IF ( lfound ) GOTO 10
+!       directional layer variables
+        DO i = 1, nl3
+           DO j = 1, nd
+              DO l = nzb_wall, nzt_wall
+                 WRITE(ls,'(A1,I1)') '_',l
+                 IF ( TRIM(var) == TRIM(varlist3(i))//TRIM(ls)//TRIM(dirname(j)) ) THEN
+                    lfound = .TRUE.
+                    EXIT
+                 ENDIF
+              ENDDO
+              IF ( lfound ) EXIT
+           ENDDO
+        ENDDO
+        IF ( lfound ) GOTO 10
+!       other variables
+        DO i = 1, nl2
+           IF ( TRIM(var) == TRIM(varlist2(i)) ) THEN
+              lfound = .TRUE.
+              EXIT
+           ENDIF
+        ENDDO
+        IF ( .NOT.  lfound ) THEN
+           unit = 'illegal'
+           RETURN
+        ENDIF
+10      CONTINUE
+
+        IF ( var(1:12) == 'usm_rad_net_'  .OR.  var(1:13) == 'usm_rad_insw_'  .OR.        &
+             var(1:13) == 'usm_rad_inlw_'  .OR.  var(1:16) == 'usm_rad_inswdir_'  .OR.    &
+             var(1:16) == 'usm_rad_inswdif_'  .OR.  var(1:16) == 'usm_rad_inswref_'  .OR. &
+             var(1:16) == 'usm_rad_inlwdif_'  .OR.  var(1:16) == 'usm_rad_inlwref_'  .OR. &
+             var(1:14) == 'usm_rad_outsw_'  .OR.  var(1:14) == 'usm_rad_outlw_'  .OR.     &
+             var(1:14) == 'usm_rad_ressw_'  .OR.  var(1:14) == 'usm_rad_reslw_'  .OR.     &
+             var(1:11) == 'usm_rad_hf_'  .OR.                                             &
+             var(1:9)  == 'usm_wshf_'  .OR.  var(1:9) == 'usm_wghf_' .OR.                 &
+             var(1:16) == 'usm_wghf_window_' .OR. var(1:15) == 'usm_wghf_green_' .OR.     &
+             var(1:10) == 'usm_iwghf_' .OR. var(1:17) == 'usm_iwghf_window_'    .OR.      &
+             var(1:17) == 'usm_surfwintrans_' .OR.                                        &
+             var(1:9)  == 'usm_qsws_'  .OR.  var(1:13)  == 'usm_qsws_veg_'  .OR.          &
+             var(1:13) == 'usm_qsws_liq_' ) THEN
+            unit = 'W/m2'
+        ELSE IF ( var(1:15) == 'usm_t_surf_wall'   .OR.  var(1:10) == 'usm_t_wall' .OR.   &
+                  var(1:12) == 'usm_t_window' .OR. var(1:17) == 'usm_t_surf_window' .OR.  &
+                  var(1:16) == 'usm_t_surf_green'  .OR.                                   &
+                  var(1:11) == 'usm_t_green' .OR.  var(1:7) == 'usm_swc' .OR.             &
+                  var(1:15) == 'usm_t_surf_10cm' )  THEN
+            unit = 'K'
+        ELSE IF ( var == 'usm_rad_pc_inlw'  .OR.  var == 'usm_rad_pc_insw'  .OR.          &
+                  var == 'usm_rad_pc_inswdir'  .OR.  var == 'usm_rad_pc_inswdif'  .OR.    &
+                  var == 'usm_rad_pc_inswref' )  THEN
+            unit = 'W'
+        ELSE IF ( var(1:9) == 'usm_surfz'  .OR.  var(1:7) == 'usm_svf'  .OR.              & 
+                  var(1:7) == 'usm_dif'  .OR.  var(1:11) == 'usm_surfcat'  .OR.           &
+                  var(1:11) == 'usm_surfalb'  .OR.  var(1:12) == 'usm_surfemis'  .OR.     &
+                  var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' )  THEN
+            unit = '1'
+        ELSE
+            unit = 'illegal'
+        ENDIF
+
+    END SUBROUTINE usm_check_data_output
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters routine for urban surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_check_parameters
+    
+       USE control_parameters,                                                 &
+           ONLY:  bc_pt_b, bc_q_b, constant_flux_layer, large_scale_forcing,   &
+                  lsf_surf, topography
+
+!
+!--    Dirichlet boundary conditions are required as the surface fluxes are
+!--    calculated from the temperature/humidity gradients in the urban surface
+!--    model
+       IF ( bc_pt_b == 'neumann'   .OR.   bc_q_b == 'neumann' )  THEN
+          message_string = 'urban surface model requires setting of '//        &
+                           'bc_pt_b = "dirichlet" and '//                      &
+                           'bc_q_b  = "dirichlet"'
+          CALL message( 'usm_check_parameters', 'PA0590', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF ( .NOT.  constant_flux_layer )  THEN
+          message_string = 'urban surface model requires '//                   &
+                           'constant_flux_layer = .T.'
+          CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 )
+       ENDIF
+
+       IF (  .NOT.  radiation )  THEN
+          message_string = 'urban surface model requires '//                   &
+                           'the radiation model to be switched on'
+          CALL message( 'usm_check_parameters', 'PA0084', 1, 2, 0, 6, 0 )
+       ENDIF
+!        
+!--    Surface forcing has to be disabled for LSF in case of enabled 
+!--    urban surface module
+       IF ( large_scale_forcing )  THEN
+          lsf_surf = .FALSE.
+       ENDIF
+!
+!--    Topography
+       IF ( topography == 'flat' )  THEN
+          message_string = 'topography /= "flat" is required '//               &
+                           'when using the urban surface model'
+          CALL message( 'check_parameters', 'PA0592', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    naheatlayers
+       IF ( naheatlayers > nzt )  THEN
+          message_string = 'number of anthropogenic heat layers '//            &
+                           '"naheatlayers" can not be larger than'//           &
+                           ' number of domain layers "nzt"'
+          CALL message( 'check_parameters', 'PA0593', 1, 2, 0, 6, 0 )
+       ENDIF
+
+    END SUBROUTINE usm_check_parameters
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Output of the 3D-arrays in netCDF and/or AVS format 
+!> for variables of urban_surface model.
+!> It resorts the urban surface module output quantities from surf style
+!> indexing into temporary 3D array with indices (i,j,k).
+!> It is called from subroutine data_output_3d.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+        
+        IMPLICIT NONE
+
+        INTEGER(iwp), INTENT(IN)       ::  av        !< 
+        CHARACTER (len=*), INTENT(IN)  ::  variable  !< 
+        INTEGER(iwp), INTENT(IN)       ::  nzb_do    !< lower limit of the data output (usually 0)
+        INTEGER(iwp), INTENT(IN)       ::  nzt_do    !< vertical upper limit of the data output (usually nz_do3d)
+        LOGICAL, INTENT(OUT)           ::  found     !< 
+        REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf   !< sp - it has to correspond to module data_output_3d
+        REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr)     ::  temp_pf    !< temp array for urban surface output procedure
+        
+        CHARACTER (len=varnamelength)                          :: var, surfid
+        INTEGER(iwp), PARAMETER                                :: nd = 5
+        CHARACTER(len=6), DIMENSION(0:nd-1), PARAMETER         :: dirname = (/ '_roof ', '_south', '_north', '_west ', '_east ' /)
+        INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER             :: dirint =  (/    iup_u, isouth_u, inorth_u,  iwest_u,  ieast_u /)
+        INTEGER(iwp), DIMENSION(0:nd-1), PARAMETER             :: diridx =  (/       -1,        1,        0,        3,        2 /)
+                                                                     !< index for surf_*_v: 0:3 = (North, South, East, West)
+        INTEGER(iwp), DIMENSION(0:nd-1)                        :: dirstart
+        INTEGER(iwp), DIMENSION(0:nd-1)                        :: dirend
+        INTEGER(iwp)                                           :: ids,idsint,idsidx,isurf,isvf,isurfs,isurflt,ipcgb
+        INTEGER(iwp)                                           :: is,js,ks,i,j,k,iwl,istat, l, m
+
+        dirstart = (/ startland, startwall, startwall, startwall, startwall /)
+        dirend = (/ endland, endwall, endwall, endwall, endwall /)
+
+        found = .TRUE.
+        temp_pf = -1._wp
+        
+        ids = -1
+        var = TRIM(variable)
+        DO i = 0, nd-1
+            k = len(TRIM(var))
+            j = len(TRIM(dirname(i)))
+            IF ( TRIM(var(k-j+1:k)) == TRIM(dirname(i)) )  THEN
+                ids = i
+                idsint = dirint(ids)
+                idsidx = diridx(ids)
+                var = var(:k-j)
+                EXIT
+            ENDIF
+        ENDDO
+        IF ( ids == -1 )  THEN
+            var = TRIM(variable)
+        ENDIF
+        IF ( var(1:11) == 'usm_t_wall_'  .AND.  len(TRIM(var)) >= 12 )  THEN
+!--         wall layers
+            READ(var(12:12), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:10)
+            ENDIF
+        ENDIF
+        IF ( var(1:13) == 'usm_t_window_'  .AND.  len(TRIM(var)) >= 14 )  THEN
+!--         window layers
+            READ(var(14:14), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:12)
+            ENDIF
+        ENDIF
+        IF ( var(1:12) == 'usm_t_green_'  .AND.  len(TRIM(var)) >= 13 )  THEN
+!--         green layers
+            READ(var(13:13), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:11)
+            ENDIF
+        ENDIF
+        IF ( var(1:8) == 'usm_swc_'  .AND.  len(TRIM(var)) >= 9 )  THEN
+!--         green layers soil water content
+            READ(var(9:9), '(I1)', iostat=istat ) iwl
+            IF ( istat == 0  .AND.  iwl >= nzb_wall  .AND.  iwl <= nzt_wall )  THEN
+                var = var(1:7)
+            ENDIF
+        ENDIF
+        IF ( (var(1:8) == 'usm_svf_'  .OR.  var(1:8) == 'usm_dif_')  .AND.  len(TRIM(var)) >= 13 )  THEN
+!--         svf values to particular surface
+            surfid = var(9:)
+            i = index(surfid,'_')
+            j = index(surfid(i+1:),'_')
+            READ(surfid(1:i-1),*, iostat=istat ) is
+            IF ( istat == 0 )  THEN
+                READ(surfid(i+1:i+j-1),*, iostat=istat ) js
+            ENDIF
+            IF ( istat == 0 )  THEN
+                READ(surfid(i+j+1:),*, iostat=istat ) ks
+            ENDIF
+            IF ( istat == 0 )  THEN
+                var = var(1:7)
+            ENDIF
+        ENDIF
+        
+        SELECT CASE ( TRIM(var) )
+
+          CASE ( 'usm_surfz' )
+!--           array of surface height (z)
+              IF ( idsint == iup_u )  THEN
+                 DO  m = 1, surf_usm_h%ns
+                    i = surf_usm_h%i(m)
+                    j = surf_usm_h%j(m)
+                    k = surf_usm_h%k(m)
+                    temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) )
+                 ENDDO
+              ELSE
+                 l = idsidx
+                 DO  m = 1, surf_usm_v(l)%ns
+                    i = surf_usm_v(l)%i(m)
+                    j = surf_usm_v(l)%j(m)
+                    k = surf_usm_v(l)%k(m)
+                    temp_pf(0,j,i) = MAX( temp_pf(0,j,i), REAL( k, kind=wp) + 1.0_wp )
+                 ENDDO
+              ENDIF
+
+          CASE ( 'usm_surfcat' )
+!--           surface category
+              IF ( idsint == iup_u )  THEN
+                 DO  m = 1, surf_usm_h%ns
+                    i = surf_usm_h%i(m)
+                    j = surf_usm_h%j(m)
+                    k = surf_usm_h%k(m)
+                    temp_pf(k,j,i) = surf_usm_h%surface_types(m)
+                 ENDDO
+              ELSE
+                 l = idsidx
+                 DO  m = 1, surf_usm_v(l)%ns
+                    i = surf_usm_v(l)%i(m)
+                    j = surf_usm_v(l)%j(m)
+                    k = surf_usm_v(l)%k(m)
+                    temp_pf(k,j,i) = surf_usm_v(l)%surface_types(m)
+                 ENDDO
+              ENDIF
+              
+          CASE ( 'usm_surfalb' )
+!--           surface albedo, weighted average
+              IF ( idsint == iup_u )  THEN
+                 DO  m = 1, surf_usm_h%ns
+                    i = surf_usm_h%i(m)
+                    j = surf_usm_h%j(m)
+                    k = surf_usm_h%k(m)
+                    temp_pf(k,j,i) = surf_usm_h%frac(ind_veg_wall,m)     *     &
+                                     surf_usm_h%albedo(ind_veg_wall,m)  +      &
+                                     surf_usm_h%frac(ind_pav_green,m)    *     &
+                                     surf_usm_h%albedo(ind_pav_green,m) +      &
+                                     surf_usm_h%frac(ind_wat_win,m)      *     &
+                                     surf_usm_h%albedo(ind_wat_win,m)
+                 ENDDO
+              ELSE
+                 l = idsidx
+                 DO  m = 1, surf_usm_v(l)%ns
+                    i = surf_usm_v(l)%i(m)
+                    j = surf_usm_v(l)%j(m)
+                    k = surf_usm_v(l)%k(m)
+                    temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m)     *  &
+                                     surf_usm_v(l)%albedo(ind_veg_wall,m)  +   &
+                                     surf_usm_v(l)%frac(ind_pav_green,m)    *  &
+                                     surf_usm_v(l)%albedo(ind_pav_green,m) +   &
+                                     surf_usm_v(l)%frac(ind_wat_win,m)      *  &
+                                     surf_usm_v(l)%albedo(ind_wat_win,m)
+                 ENDDO
+              ENDIF
+              
+          CASE ( 'usm_surfemis' )
+!--           surface emissivity, weighted average
+              IF ( idsint == iup_u )  THEN
+                 DO  m = 1, surf_usm_h%ns
+                    i = surf_usm_h%i(m)
+                    j = surf_usm_h%j(m)
+                    k = surf_usm_h%k(m)
+                    temp_pf(k,j,i) =  surf_usm_h%frac(ind_veg_wall,m)      *   &
+                                      surf_usm_h%emissivity(ind_veg_wall,m)  + &
+                                      surf_usm_h%frac(ind_pav_green,m)     *   &
+                                      surf_usm_h%emissivity(ind_pav_green,m) + &
+                                      surf_usm_h%frac(ind_wat_win,m)       *   &
+                                      surf_usm_h%emissivity(ind_wat_win,m)
+                 ENDDO
+              ELSE
+                 l = idsidx
+                 DO  m = 1, surf_usm_v(l)%ns
+                    i = surf_usm_v(l)%i(m)
+                    j = surf_usm_v(l)%j(m)
+                    k = surf_usm_v(l)%k(m)
+                    temp_pf(k,j,i) = surf_usm_v(l)%frac(ind_veg_wall,m)       *&
+                                     surf_usm_v(l)%emissivity(ind_veg_wall,m) +&
+                                     surf_usm_v(l)%frac(ind_pav_green,m)      *&
+                                     surf_usm_v(l)%emissivity(ind_pav_green,m)+&
+                                     surf_usm_v(l)%frac(ind_wat_win,m)        *&
+                                     surf_usm_v(l)%emissivity(ind_wat_win,m)
+                 ENDDO
+              ENDIF
+
+          CASE ( 'usm_surfwintrans' )
+!--           transmissivity window tiles
+              IF ( idsint == iup_u )  THEN
+                 DO  m = 1, surf_usm_h%ns
+                    i = surf_usm_h%i(m)
+                    j = surf_usm_h%j(m)
+                    k = surf_usm_h%k(m)
+                    temp_pf(k,j,i) = surf_usm_h%transmissivity(m)
+                 ENDDO
+              ELSE
+                 l = idsidx
+                 DO  m = 1, surf_usm_v(l)%ns
+                    i = surf_usm_v(l)%i(m)
+                    j = surf_usm_v(l)%j(m)
+                    k = surf_usm_v(l)%k(m)
+                    temp_pf(k,j,i) = surf_usm_v(l)%transmissivity(m)
+                 ENDDO
+              ENDIF
+
+          CASE ( 'usm_skyvf' )
+!--           sky view factor
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvf(isurf)
+                 ENDIF
+              ENDDO
+              
+          CASE ( 'usm_skyvft' )
+!--           sky view factor
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == ids )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = skyvft(isurf)
+                 ENDIF
+              ENDDO
+
+!
+!-- Not adjusted so far              
+          CASE ( 'usm_svf', 'usm_dif' )
+!--           shape view factors or iradiance factors to selected surface
+              IF ( TRIM(var)=='usm_svf' )  THEN
+                  k = 1
+              ELSE
+                  k = 2
+              ENDIF
+              DO isvf = 1, nsvfl
+                  isurflt = svfsurf(1, isvf)
+                  isurfs = svfsurf(2, isvf)
+                             
+                  IF ( surf(ix,isurfs) == is  .AND.  surf(iy,isurfs) == js  .AND.       &
+                       surf(iz,isurfs) == ks  .AND.  surf(id,isurfs) == idsint )  THEN
+  !--                 correct source surface
+                      temp_pf(surfl(iz,isurflt),surfl(iy,isurflt),surfl(ix,isurflt)) = svf(k,isvf)
+                  ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_net' )
+!--           array of complete radiation balance
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%rad_net_l(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%rad_net_l(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%rad_net_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%rad_net_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+          CASE ( 'usm_rad_insw' )
+!--           array of sw radiation falling to surface after i-th reflection
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinsw_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_inlw' )
+!--           array of lw radiation falling to surface after i-th reflection
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_inswdir' )
+!--           array of direct sw radiation falling to surface from sun
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdir_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_inswdif' )
+!--           array of difusion sw radiation falling to surface from sky and borders of the domain
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswdif_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_inswref' )
+!--           array of sw radiation falling to surface from reflections
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = &
+                       surfinsw(isurf) - surfinswdir(isurf) - surfinswdif(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinswref_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_inlwdif' )
+!--           array of difusion lw radiation falling to surface from sky and borders of the domain
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwdif_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_inlwref' )
+!--           array of lw radiation falling to surface from reflections
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlw(isurf) - surfinlwdif(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinlwref_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_outsw' )
+!--           array of sw radiation emitted from surface after i-th reflection
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutsw_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_outlw' )
+!--           array of lw radiation emitted from surface after i-th reflection
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfoutlw_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_ressw' )
+!--           average of array of residua of sw radiation absorbed in surface after last reflection
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfins_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_reslw' )
+!--           average of array of residua of lw radiation absorbed in surface after last reflection
+              DO isurf = dirstart(ids), dirend(ids)
+                 IF ( surfl(id,isurf) == idsint )  THEN
+                   IF ( av == 0 )  THEN
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl(isurf)
+                   ELSE
+                     temp_pf(surfl(iz,isurf),surfl(iy,isurf),surfl(ix,isurf)) = surfinl_av(isurf)
+                   ENDIF
+                 ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_pc_inlw' )
+!--           array of lw radiation absorbed by plant canopy
+              DO ipcgb = 1, npcbl
+                  IF ( av == 0 )  THEN
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw(ipcgb)
+                  ELSE
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinlw_av(ipcgb)
+                  ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_pc_insw' )
+!--           array of sw radiation absorbed by plant canopy
+              DO ipcgb = 1, npcbl
+                  IF ( av == 0 )  THEN
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb)
+                  ELSE
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw_av(ipcgb)
+                  ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_pc_inswdir' )
+!--           array of direct sw radiation absorbed by plant canopy
+              DO ipcgb = 1, npcbl
+                  IF ( av == 0 )  THEN
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir(ipcgb)
+                  ELSE
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdir_av(ipcgb)
+                  ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_pc_inswdif' )
+!--           array of diffuse sw radiation absorbed by plant canopy
+              DO ipcgb = 1, npcbl
+                  IF ( av == 0 )  THEN
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif(ipcgb)
+                  ELSE
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswdif_av(ipcgb)
+                  ENDIF
+              ENDDO
+
+          CASE ( 'usm_rad_pc_inswref' )
+!--           array of reflected sw radiation absorbed by plant canopy
+              DO ipcgb = 1, npcbl
+                  IF ( av == 0 )  THEN
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinsw(ipcgb)      &
+                                                                              - pcbinswdir(ipcgb) &
+                                                                              - pcbinswdif(ipcgb)
+                  ELSE
+                      temp_pf(pcbl(iz,ipcgb),pcbl(iy,ipcgb),pcbl(ix,ipcgb)) = pcbinswref_av(ipcgb)
+                  ENDIF
+              ENDDO
+ 
+          CASE ( 'usm_rad_hf' )
+!--           array of heat flux from radiation for surfaces after all reflections
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%surfhf(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%surfhf(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%surfhf_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%surfhf_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+ 
+          CASE ( 'usm_wshf' )
+!--           array of sensible heat flux from surfaces
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wshf_eb(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wshf_eb_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wshf_eb_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+              
+              
+          CASE ( 'usm_qsws' )
+!--           array of latent heat flux from surfaces
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%qsws_eb(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%qsws_eb_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%qsws_eb_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+              
+          CASE ( 'usm_qsws_veg' )
+!--           array of latent heat flux from vegetation surfaces
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%qsws_veg_eb_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%qsws_veg_eb_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+              
+          CASE ( 'usm_qsws_liq' )
+!--           array of latent heat flux from surfaces with liquid
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%qsws_liq_eb_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%qsws_liq_eb_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+
+
+
+          CASE ( 'usm_wghf' )
+!--           array of heat flux from ground (land, wall, roof)
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wghf_eb(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wghf_eb_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+          CASE ( 'usm_wghf_window' )
+!--           array of heat flux from window ground (land, wall, roof)
+
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wghf_eb_window(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wghf_eb_window_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_window_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+          CASE ( 'usm_wghf_green' )
+!--           array of heat flux from green ground (land, wall, roof)
+
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wghf_eb_green(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%wghf_eb_green_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%wghf_eb_green_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+          CASE ( 'usm_iwghf' )
+!--           array of heat flux from indoor ground (land, wall, roof)
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%iwghf_eb(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%iwghf_eb_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+          CASE ( 'usm_iwghf_window' )
+!--           array of heat flux from indoor window ground (land, wall, roof)
+
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%iwghf_eb_window_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%iwghf_eb_window_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+              
+          CASE ( 'usm_t_surf_wall' )
+!--           surface temperature for surfaces
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_surf_wall_h(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_surf_wall_v(l)%t(m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_surf_wall_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_surf_wall_av(m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+              
+          CASE ( 'usm_t_surf_window' )
+!--           surface temperature for window surfaces
+
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_surf_window_h(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_surf_window_v(l)%t(m)
+                    ENDDO
+                 ENDIF
+
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_surf_window_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_surf_window_av(m)
+                    ENDDO
+
+                 ENDIF
+
+              ENDIF
+
+          CASE ( 'usm_t_surf_green' )
+!--           surface temperature for green surfaces
+
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_surf_green_h(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_surf_green_v(l)%t(m)
+                    ENDDO
+                 ENDIF
+
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_surf_green_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_surf_green_av(m)
+                    ENDDO
+
+                 ENDIF
+
+              ENDIF
+
+          CASE ( 'usm_t_surf_10cm' )
+!--           near surface temperature for whole surfaces
+
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_surf_10cm_h(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_surf_10cm_v(l)%t(m)
+                    ENDDO
+                 ENDIF
+
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_surf_10cm_av(m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_surf_10cm_av(m)
+                    ENDDO
+
+                 ENDIF
+
+              ENDIF
+
+              
+          CASE ( 'usm_t_wall' )
+!--           wall temperature for  iwl layer of walls and land
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_wall_h(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_wall_v(l)%t(iwl,m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_wall_av(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_wall_av(iwl,m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+             
+          CASE ( 'usm_t_window' )
+!--           window temperature for iwl layer of walls and land
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_window_h(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_window_v(l)%t(iwl,m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_window_av(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_window_av(iwl,m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+          CASE ( 'usm_t_green' )
+!--           green temperature for  iwl layer of walls and land
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = t_green_h(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = t_green_v(l)%t(iwl,m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%t_green_av(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%t_green_av(iwl,m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+              
+              CASE ( 'usm_swc' )
+!--           soil water content for  iwl layer of walls and land
+              IF ( av == 0 )  THEN
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = swc_h(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = swc_v(l)%t(iwl,m)
+                    ENDDO
+                 ENDIF
+              ELSE
+                 IF ( idsint == iup_u )  THEN
+                    DO  m = 1, surf_usm_h%ns
+                       i = surf_usm_h%i(m)
+                       j = surf_usm_h%j(m)
+                       k = surf_usm_h%k(m)
+                       temp_pf(k,j,i) = surf_usm_h%swc_av(iwl,m)
+                    ENDDO
+                 ELSE
+                    l = idsidx
+                    DO  m = 1, surf_usm_v(l)%ns
+                       i = surf_usm_v(l)%i(m)
+                       j = surf_usm_v(l)%j(m)
+                       k = surf_usm_v(l)%k(m)
+                       temp_pf(k,j,i) = surf_usm_v(l)%swc_av(iwl,m)
+                    ENDDO
+                 ENDIF
+              ENDIF
+
+             
+          CASE DEFAULT
+              found = .FALSE.
+              RETURN
+        END SELECT
+
+!
+!--     Rearrange dimensions for NetCDF output
+!--     FIXME: this may generate FPE overflow upon conversion from DP to SP
+        DO  j = nys, nyn
+            DO  i = nxl, nxr
+                DO  k = nzb_do, nzt_do
+                    local_pf(i,j,k) = temp_pf(k,j,i)
+                ENDDO
+            ENDDO
+        ENDDO
+        
+    END SUBROUTINE usm_data_output_3d
+    
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Soubroutine defines appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z )
+    
+        IMPLICIT NONE
+
+        CHARACTER (len=*), INTENT(IN)  ::  variable    !< 
+        LOGICAL, INTENT(OUT)           ::  found       !< 
+        CHARACTER (len=*), INTENT(OUT) ::  grid_x      !< 
+        CHARACTER (len=*), INTENT(OUT) ::  grid_y      !< 
+        CHARACTER (len=*), INTENT(OUT) ::  grid_z      !< 
+
+        CHARACTER (len=varnamelength)  :: var
+
+        var = TRIM(variable)
+        IF ( var(1:12) == 'usm_rad_net_'  .OR.  var(1:13) == 'usm_rad_insw_'  .OR.          &
+             var(1:13) == 'usm_rad_inlw_'  .OR.  var(1:16) == 'usm_rad_inswdir_'  .OR.      &
+             var(1:16) == 'usm_rad_inswdif_'  .OR.  var(1:16) == 'usm_rad_inswref_'  .OR.   &
+             var(1:16) == 'usm_rad_inlwdif_'  .OR.  var(1:16) == 'usm_rad_inlwref_'  .OR.   &
+             var(1:14) == 'usm_rad_outsw_'  .OR.  var(1:14) == 'usm_rad_outlw_'  .OR.       &
+             var(1:14) == 'usm_rad_ressw_'  .OR.  var(1:14) == 'usm_rad_reslw_'  .OR.       &
+             var(1:11) == 'usm_rad_hf_'  .OR.  var == 'usm_rad_pc_inlw'  .OR.               &
+             var == 'usm_rad_pc_insw'  .OR.  var == 'usm_rad_pc_inswdir'  .OR.              &
+             var == 'usm_rad_pc_inswdif'  .OR.  var == 'usm_rad_pc_inswref'  .OR.           &
+             var(1:9) == 'usm_wshf_'  .OR.  var(1:9) == 'usm_wghf_'  .OR.                   &
+             var(1:16) == 'usm_wghf_window_'  .OR. var(1:15) == 'usm_wghf_green_' .OR.      &
+             var(1:10) == 'usm_iwghf_'  .OR. var(1:17) == 'usm_iwghf_window_' .OR.          &
+             var(1:9) == 'usm_qsws_'  .OR.  var(1:13) == 'usm_qsws_veg_'  .OR.              &
+             var(1:13) == 'usm_qsws_liq_' .OR.                                              &
+             var(1:15) == 'usm_t_surf_wall'  .OR.  var(1:10) == 'usm_t_wall'  .OR.          &
+             var(1:17) == 'usm_t_surf_window'  .OR.  var(1:12) == 'usm_t_window'  .OR.      &
+             var(1:16) == 'usm_t_surf_green'  .OR. var(1:11) == 'usm_t_green' .OR.          &
+             var(1:15) == 'usm_t_surf_10cm' .OR.                                            &
+             var(1:9) == 'usm_surfz'  .OR.  var(1:7) == 'usm_svf'  .OR.                     & 
+             var(1:7) == 'usm_dif'  .OR.  var(1:11) == 'usm_surfcat'  .OR.                  &
+             var(1:11) == 'usm_surfalb'  .OR.  var(1:12) == 'usm_surfemis'  .OR.            &
+             var(1:16) == 'usm_surfwintrans'  .OR. var(1:7) == 'usm_swc' .OR.               &
+             var(1:9) == 'usm_skyvf' .OR. var(1:9) == 'usm_skyvft' ) THEN
+
+            found = .TRUE.
+            grid_x = 'x'
+            grid_y = 'y'
+            grid_z = 'zu'
+        ELSE
+            found  = .FALSE.
+            grid_x = 'none'
+            grid_y = 'none'
+            grid_z = 'none'
+        ENDIF
+
+    END SUBROUTINE usm_define_netcdf_grid
+    
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the wall surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_init_material_model
+
+        IMPLICIT NONE
+
+        INTEGER(iwp) ::  k, l, m            !< running indices
+        
+        CALL location_message( '    initialization of wall surface model', .TRUE. )
+       
+!--     Calculate wall grid spacings. 
+!--     Temperature is defined at the center of the wall layers,
+!--     whereas gradients/fluxes are defined at the edges (_stag)      
+!--     apply for all particular surface grids. First for horizontal surfaces
+        DO  m = 1, surf_usm_h%ns
+
+           surf_usm_h%dz_wall(nzb_wall,m) = surf_usm_h%zw(nzb_wall,m)
+           DO k = nzb_wall+1, nzt_wall
+               surf_usm_h%dz_wall(k,m) = surf_usm_h%zw(k,m) -                  &
+                                         surf_usm_h%zw(k-1,m)
+           ENDDO
+           surf_usm_h%dz_window(nzb_wall,m) = surf_usm_h%zw_window(nzb_wall,m)
+           DO k = nzb_wall+1, nzt_wall
+               surf_usm_h%dz_window(k,m) = surf_usm_h%zw_window(k,m) -         &
+                                         surf_usm_h%zw_window(k-1,m)
+           ENDDO
+!            surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m)
+!            DO k = nzb_wall+1, nzt_wall
+!                surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) -           &
+!                                          surf_usm_h%zw_green(k-1,m)
+!            ENDDO
+           
+           surf_usm_h%dz_wall(nzt_wall+1,m) = surf_usm_h%dz_wall(nzt_wall,m)
+
+           DO k = nzb_wall, nzt_wall-1
+               surf_usm_h%dz_wall_stag(k,m) = 0.5 * (                          &
+                           surf_usm_h%dz_wall(k+1,m) + surf_usm_h%dz_wall(k,m) )
+           ENDDO
+           surf_usm_h%dz_wall_stag(nzt_wall,m) = surf_usm_h%dz_wall(nzt_wall,m)
+           
+           surf_usm_h%dz_window(nzt_wall+1,m) = surf_usm_h%dz_window(nzt_wall,m)
+
+           DO k = nzb_wall, nzt_wall-1
+               surf_usm_h%dz_window_stag(k,m) = 0.5 * (                        &
+                           surf_usm_h%dz_window(k+1,m) + surf_usm_h%dz_window(k,m) )
+           ENDDO
+           surf_usm_h%dz_window_stag(nzt_wall,m) = surf_usm_h%dz_window(nzt_wall,m)
+
+!            surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m)
+! 
+!            DO k = nzb_wall, nzt_wall-1
+!                surf_usm_h%dz_green_stag(k,m) = 0.5 * (                         &
+!                            surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) )
+!            ENDDO
+!            surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m)
+!-------------           
+           IF (surf_usm_h%green_type_roof(m) == 2.0_wp ) then
+             soil_type = 3 !extensiv green roof
+             surf_usm_h%lai(m) = 2.0_wp
+             
+           surf_usm_h%zw_green(nzb_wall,m)         = 0.05_wp
+           surf_usm_h%zw_green(nzb_wall+1,m)       = 0.10_wp
+           surf_usm_h%zw_green(nzb_wall+2,m)       = 0.15_wp
+           surf_usm_h%zw_green(nzb_wall+3,m)       = 0.20_wp
+           ELSE
+             soil_type = 6 !intensiv green roof
+             surf_usm_h%lai(m) = 4.0_wp
+             
+           surf_usm_h%zw_green(nzb_wall,m)         = 0.05_wp
+           surf_usm_h%zw_green(nzb_wall+1,m)       = 0.10_wp
+           surf_usm_h%zw_green(nzb_wall+2,m)       = 0.40_wp
+           surf_usm_h%zw_green(nzb_wall+3,m)       = 0.80_wp
+           ENDIF
+           
+           surf_usm_h%dz_green(nzb_wall,m) = surf_usm_h%zw_green(nzb_wall,m)
+           DO k = nzb_wall+1, nzt_wall
+               surf_usm_h%dz_green(k,m) = surf_usm_h%zw_green(k,m) -           &
+                                         surf_usm_h%zw_green(k-1,m)
+           ENDDO
+           surf_usm_h%dz_green(nzt_wall+1,m) = surf_usm_h%dz_green(nzt_wall,m)
+
+           DO k = nzb_wall, nzt_wall-1
+               surf_usm_h%dz_green_stag(k,m) = 0.5 * (                         &
+                           surf_usm_h%dz_green(k+1,m) + surf_usm_h%dz_green(k,m) )
+           ENDDO
+           surf_usm_h%dz_green_stag(nzt_wall,m) = surf_usm_h%dz_green(nzt_wall,m)
+           
+          IF ( alpha_vangenuchten == 9999999.9_wp )  THEN
+             alpha_vangenuchten = soil_pars(0,soil_type)
+          ENDIF
+
+          IF ( l_vangenuchten == 9999999.9_wp )  THEN
+             l_vangenuchten = soil_pars(1,soil_type)
+          ENDIF
+
+          IF ( n_vangenuchten == 9999999.9_wp )  THEN
+             n_vangenuchten = soil_pars(2,soil_type)            
+          ENDIF
+
+          IF ( hydraulic_conductivity == 9999999.9_wp )  THEN
+             hydraulic_conductivity = soil_pars(3,soil_type)            
+          ENDIF
+
+          IF ( saturation_moisture == 9999999.9_wp )  THEN
+             saturation_moisture = m_soil_pars(0,soil_type)           
+          ENDIF
+
+          IF ( field_capacity == 9999999.9_wp )  THEN
+             field_capacity = m_soil_pars(1,soil_type)           
+          ENDIF
+
+          IF ( wilting_point == 9999999.9_wp )  THEN
+             wilting_point = m_soil_pars(2,soil_type)            
+          ENDIF
+
+          IF ( residual_moisture == 9999999.9_wp )  THEN
+             residual_moisture = m_soil_pars(3,soil_type)       
+          ENDIF
+          
+          DO k = nzb_wall, nzt_wall+1
+             swc_h(k,m) = field_capacity
+             rootfr_h(k,m) = 0.5_wp
+             surf_usm_h%alpha_vg_green(m)      = alpha_vangenuchten
+             surf_usm_h%l_vg_green(m)          = l_vangenuchten
+             surf_usm_h%n_vg_green(m)          = n_vangenuchten 
+             surf_usm_h%gamma_w_green_sat(k,m)   = hydraulic_conductivity
+             swc_sat_h(k,m)                    = saturation_moisture
+             fc_h(k,m)                         = field_capacity
+             wilt_h(k,m)                       = wilting_point
+             swc_res_h(k,m)                    = residual_moisture
+          ENDDO
+!-------------------------------           
+        ENDDO
+        surf_usm_h%ddz_wall        = 1.0_wp / surf_usm_h%dz_wall
+        surf_usm_h%ddz_wall_stag   = 1.0_wp / surf_usm_h%dz_wall_stag
+        surf_usm_h%ddz_window      = 1.0_wp / surf_usm_h%dz_window
+        surf_usm_h%ddz_window_stag = 1.0_wp / surf_usm_h%dz_window_stag
+        surf_usm_h%ddz_green       = 1.0_wp / surf_usm_h%dz_green
+        surf_usm_h%ddz_green_stag  = 1.0_wp / surf_usm_h%dz_green_stag
+!        
+!--     For vertical surfaces
+        DO  l = 0, 3
+           DO  m = 1, surf_usm_v(l)%ns
+              surf_usm_v(l)%dz_wall(nzb_wall,m) = surf_usm_v(l)%zw(nzb_wall,m)
+              DO k = nzb_wall+1, nzt_wall
+                  surf_usm_v(l)%dz_wall(k,m) = surf_usm_v(l)%zw(k,m) -         &
+                                               surf_usm_v(l)%zw(k-1,m)
+              ENDDO
+              surf_usm_v(l)%dz_window(nzb_wall,m) = surf_usm_v(l)%zw_window(nzb_wall,m)
+              DO k = nzb_wall+1, nzt_wall
+                  surf_usm_v(l)%dz_window(k,m) = surf_usm_v(l)%zw_window(k,m) - &
+                                               surf_usm_v(l)%zw_window(k-1,m)
+              ENDDO
+              surf_usm_v(l)%dz_green(nzb_wall,m) = surf_usm_v(l)%zw_green(nzb_wall,m)
+              DO k = nzb_wall+1, nzt_wall
+                  surf_usm_v(l)%dz_green(k,m) = surf_usm_v(l)%zw_green(k,m) - &
+                                               surf_usm_v(l)%zw_green(k-1,m)
+              ENDDO
+           
+              surf_usm_v(l)%dz_wall(nzt_wall+1,m) =                            &
+                                              surf_usm_v(l)%dz_wall(nzt_wall,m)
+
+              DO k = nzb_wall, nzt_wall-1
+                  surf_usm_v(l)%dz_wall_stag(k,m) = 0.5 * (                    &
+                                                surf_usm_v(l)%dz_wall(k+1,m) + &
+                                                surf_usm_v(l)%dz_wall(k,m) )
+              ENDDO
+              surf_usm_v(l)%dz_wall_stag(nzt_wall,m) =                         &
+                                              surf_usm_v(l)%dz_wall(nzt_wall,m)
+              surf_usm_v(l)%dz_window(nzt_wall+1,m) =                            &
+                                              surf_usm_v(l)%dz_window(nzt_wall,m)
+
+              DO k = nzb_wall, nzt_wall-1
+                  surf_usm_v(l)%dz_window_stag(k,m) = 0.5 * (                    &
+                                                surf_usm_v(l)%dz_window(k+1,m) + &
+                                                surf_usm_v(l)%dz_window(k,m) )
+              ENDDO
+              surf_usm_v(l)%dz_window_stag(nzt_wall,m) =                         &
+                                              surf_usm_v(l)%dz_window(nzt_wall,m)
+              surf_usm_v(l)%dz_green(nzt_wall+1,m) =                            &
+                                              surf_usm_v(l)%dz_green(nzt_wall,m)
+
+              DO k = nzb_wall, nzt_wall-1
+                  surf_usm_v(l)%dz_green_stag(k,m) = 0.5 * (                    &
+                                                surf_usm_v(l)%dz_green(k+1,m) + &
+                                                surf_usm_v(l)%dz_green(k,m) )
+              ENDDO
+              surf_usm_v(l)%dz_green_stag(nzt_wall,m) =                         &
+                                              surf_usm_v(l)%dz_green(nzt_wall,m)
+           ENDDO
+           surf_usm_v(l)%ddz_wall        = 1.0_wp / surf_usm_v(l)%dz_wall
+           surf_usm_v(l)%ddz_wall_stag   = 1.0_wp / surf_usm_v(l)%dz_wall_stag
+           surf_usm_v(l)%ddz_window      = 1.0_wp / surf_usm_v(l)%dz_window
+           surf_usm_v(l)%ddz_window_stag = 1.0_wp / surf_usm_v(l)%dz_window_stag
+           surf_usm_v(l)%ddz_green       = 1.0_wp / surf_usm_v(l)%dz_green
+           surf_usm_v(l)%ddz_green_stag  = 1.0_wp / surf_usm_v(l)%dz_green_stag
+        ENDDO      
+
+        
+!     soil_type = 6
+! !--    Initialize standard soil types. It is possible to overwrite each
+! !--    parameter by setting the respecticy NAMELIST variable to a 
+! !--    value /= 9999999.9. 
+!        IF ( soil_type /= 0 )  THEN  
+!  
+!           IF ( alpha_vangenuchten == 9999999.9_wp )  THEN
+!              alpha_vangenuchten = soil_pars(0,soil_type)
+!           ENDIF
+! 
+!           IF ( l_vangenuchten == 9999999.9_wp )  THEN
+!              l_vangenuchten = soil_pars(1,soil_type)
+!           ENDIF
+! 
+!           IF ( n_vangenuchten == 9999999.9_wp )  THEN
+!              n_vangenuchten = soil_pars(2,soil_type)            
+!           ENDIF
+! 
+!           IF ( hydraulic_conductivity == 9999999.9_wp )  THEN
+!              hydraulic_conductivity = soil_pars(3,soil_type)            
+!           ENDIF
+! 
+!           IF ( saturation_moisture == 9999999.9_wp )  THEN
+!              saturation_moisture = m_soil_pars(0,soil_type)           
+!           ENDIF
+! 
+!           IF ( field_capacity == 9999999.9_wp )  THEN
+!              field_capacity = m_soil_pars(1,soil_type)           
+!           ENDIF
+! 
+!           IF ( wilting_point == 9999999.9_wp )  THEN
+!              wilting_point = m_soil_pars(2,soil_type)            
+!           ENDIF
+! 
+!           IF ( residual_moisture == 9999999.9_wp )  THEN
+!              residual_moisture = m_soil_pars(3,soil_type)       
+!           ENDIF
+!           
+!             DO  m = 1, surf_usm_h%ns
+!                DO k = nzb_wall, nzt_wall+1
+!                    swc_h(k,m) = field_capacity
+!                    rootfr_h(k,m) = 0.5_wp
+!                ENDDO
+!             ENDDO
+! ! !
+! ! !--         Vertical surfaces
+! !             DO  l = 0, 3
+! !                DO  m = 1, surf_usm_v(l)%ns
+! !                   DO k = nzb_wall, nzt_wall+1
+! !                      swc_v(l)%t(k,m) = 0.5_wp
+! !                   ENDDO
+! !                ENDDO
+! !             ENDDO
+! 
+!        ENDIF
+! 
+! !
+! !--    Map values to the respective 2D arrays
+!        surf_usm_h%alpha_vg_green      = alpha_vangenuchten
+!        surf_usm_h%l_vg_green          = l_vangenuchten
+!        surf_usm_h%n_vg_green          = n_vangenuchten 
+!        surf_usm_h%gamma_w_green_sat   = hydraulic_conductivity
+!        swc_sat_h         = saturation_moisture
+!        fc_h          = field_capacity
+!        wilt_h        = wilting_point
+!        swc_res_h         = residual_moisture
+! !        r_soil_min    = min_soil_resistance
+        
+        CALL location_message( '    wall structures filed out', .TRUE. )
+
+        CALL location_message( '    initialization of wall surface model finished', .TRUE. )
+
+    END SUBROUTINE usm_init_material_model
+
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the urban surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_init_urban_surface
+
+        USE arrays_3d,                                                         &
+            ONLY:  zw
+
+        USE netcdf_data_input_mod,                                             &
+            ONLY:  building_pars_f, building_type_f, terrain_height_f
+    
+        IMPLICIT NONE
+
+        INTEGER(iwp) ::  i                   !< loop index x-dirction
+        INTEGER(iwp) ::  ind_alb_green       !< index in input list for green albedo
+        INTEGER(iwp) ::  ind_alb_wall        !< index in input list for wall albedo
+        INTEGER(iwp) ::  ind_alb_win         !< index in input list for window albedo
+        INTEGER(iwp) ::  ind_emis_wall       !< index in input list for wall emissivity
+        INTEGER(iwp) ::  ind_emis_green      !< index in input list for green emissivity
+        INTEGER(iwp) ::  ind_emis_win        !< index in input list for window emissivity
+        INTEGER(iwp) ::  ind_green_frac_w    !< index in input list for green fraction on wall
+        INTEGER(iwp) ::  ind_green_frac_r    !< index in input list for green fraction on roof
+        INTEGER(iwp) ::  ind_hc1             !< index in input list for heat capacity at first wall layer
+        INTEGER(iwp) ::  ind_hc1_win         !< index in input list for heat capacity at first window layer
+        INTEGER(iwp) ::  ind_hc2             !< index in input list for heat capacity at second wall layer
+        INTEGER(iwp) ::  ind_hc2_win         !< index in input list for heat capacity at second window layer
+        INTEGER(iwp) ::  ind_hc3             !< index in input list for heat capacity at third wall layer
+        INTEGER(iwp) ::  ind_hc3_win         !< index in input list for heat capacity at third window layer
+        INTEGER(iwp) ::  ind_lai_r           !< index in input list for LAI on roof
+        INTEGER(iwp) ::  ind_lai_w           !< index in input list for LAI on wall
+        INTEGER(iwp) ::  ind_tc1             !< index in input list for thermal conductivity at first wall layer
+        INTEGER(iwp) ::  ind_tc1_win         !< index in input list for thermal conductivity at first window layer
+        INTEGER(iwp) ::  ind_tc2             !< index in input list for thermal conductivity at second wall layer
+        INTEGER(iwp) ::  ind_tc2_win         !< index in input list for thermal conductivity at second window layer
+        INTEGER(iwp) ::  ind_tc3             !< index in input list for thermal conductivity at third wall layer
+        INTEGER(iwp) ::  ind_tc3_win         !< index in input list for thermal conductivity at third window layer
+        INTEGER(iwp) ::  ind_thick_1         !< index in input list for thickness of first wall layer 
+        INTEGER(iwp) ::  ind_thick_1_win     !< index in input list for thickness of first window layer 
+        INTEGER(iwp) ::  ind_thick_2         !< index in input list for thickness of second wall layer 
+        INTEGER(iwp) ::  ind_thick_2_win     !< index in input list for thickness of second window layer
+        INTEGER(iwp) ::  ind_thick_3         !< index in input list for thickness of third wall layer
+        INTEGER(iwp) ::  ind_thick_3_win     !< index in input list for thickness of third window layer
+        INTEGER(iwp) ::  ind_thick_4         !< index in input list for thickness of fourth wall layer
+        INTEGER(iwp) ::  ind_thick_4_win     !< index in input list for thickness of fourth window layer
+        INTEGER(iwp) ::  ind_trans           !< index in input list for window transmissivity
+        INTEGER(iwp) ::  ind_wall_frac       !< index in input list for wall fraction
+        INTEGER(iwp) ::  ind_win_frac        !< index in input list for window fraction
+        INTEGER(iwp) ::  ind_z0              !< index in input list for z0
+        INTEGER(iwp) ::  ind_z0qh            !< index in input list for z0h / z0q
+        INTEGER(iwp) ::  j                   !< loop index y-dirction
+        INTEGER(iwp) ::  k                   !< loop index z-dirction
+        INTEGER(iwp) ::  l                   !< loop index surface orientation
+        INTEGER(iwp) ::  m                   !< loop index surface element
+        INTEGER(iwp) ::  st                  !< dummy  
+
+        REAL(wp)     ::  c, d, tin, twin
+        REAL(wp)     ::  ground_floor_level_l         !< local height of ground floor level
+        REAL(wp)     ::  z_agl                        !< height above ground
+
+!
+!-- NOPOINTER version not implemented yet
+#if defined( __nopointer )
+    message_string = 'The urban surface module only runs with POINTER version'
+    CALL message( 'urban_surface_mod', 'PA0452', 1, 2, 0, 6, 0 )
+#endif
+
+        CALL cpu_log( log_point_s(78), 'usm_init', 'start' )
+!--     surface forcing have to be disabled for LSF 
+!--     in case of enabled urban surface module
+        IF ( large_scale_forcing )  THEN
+            lsf_surf = .FALSE.
+        ENDIF
+
+!
+!--     Flag surface elements belonging to the ground floor level. Therefore, 
+!--     use terrain height array from file, if available. This flag is later used
+!--     to control initialization of surface attributes.
+        surf_usm_h%ground_level = .FALSE. 
+        DO  m = 1, surf_usm_h%ns
+           i = surf_usm_h%i(m)
+           j = surf_usm_h%j(m)
+           k = surf_usm_h%k(m)
+!
+!--        Get local ground level. If no ground level is given in input file,
+!--        use default value.
+           ground_floor_level_l = ground_floor_level
+           IF ( building_pars_f%from_file )  THEN
+              IF ( building_pars_f%pars_xy(ind_gflh,j,i) /=                    &
+                   building_pars_f%fill )  &
+                 ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i)          
+           ENDIF
+!
+!--        Determine height of surface element above ground level
+           IF (  terrain_height_f%from_file )  THEN
+              z_agl = zw(k) - terrain_height_f%var(j,i)
+           ELSE
+              z_agl = zw(k)
+           ENDIF
+!
+!--        Set flag for ground level
+           IF ( z_agl <= ground_floor_level_l )                                &
+              surf_usm_h%ground_level(m) = .TRUE.
+        ENDDO
+
+        DO  l = 0, 3
+           surf_usm_v(l)%ground_level = .FALSE.
+           DO  m = 1, surf_usm_v(l)%ns
+              i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff
+              j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff
+              k = surf_usm_v(l)%k(m)
+!
+!--           Get local ground level. If no ground level is given in input file,
+!--           use default value.
+              ground_floor_level_l = ground_floor_level
+              IF ( building_pars_f%from_file )  THEN
+                 IF ( building_pars_f%pars_xy(ind_gflh,j,i) /=                 &
+                      building_pars_f%fill ) &
+                    ground_floor_level_l = building_pars_f%pars_xy(ind_gflh,j,i)
+              ENDIF
+!
+!--           Determine height of surface element above ground level. Please 
+!--           note, height of surface element is determined with respect to
+!--           its height of the adjoing atmospheric grid point. 
+              IF (  terrain_height_f%from_file )  THEN
+                 z_agl = zw(k) - terrain_height_f%var(j-surf_usm_v(l)%joff,    &
+                                                      i-surf_usm_v(l)%ioff)
+              ELSE
+                 z_agl = zw(k)
+              ENDIF
+!
+!--           Set flag for ground level
+              IF ( z_agl <= ground_floor_level_l )                                &
+                 surf_usm_v(l)%ground_level(m) = .TRUE.
+
+           ENDDO
+        ENDDO
+!
+!--     Initialization of resistances. 
+        DO  m = 1, surf_usm_h%ns
+           surf_usm_h%r_a(m)        = 50.0_wp
+           surf_usm_h%r_a_green(m)  = 50.0_wp
+           surf_usm_h%r_a_window(m) = 50.0_wp
+        ENDDO
+        DO  l = 0, 3
+           DO  m = 1, surf_usm_v(l)%ns
+              surf_usm_v(l)%r_a(m)        = 50.0_wp
+              surf_usm_v(l)%r_a_green(m)  = 50.0_wp
+              surf_usm_v(l)%r_a_window(m) = 50.0_wp
+           ENDDO
+        ENDDO
+        
+!---------------------------------------------------------------------------------------------
+!
+!--    Map values onto horizontal elemements
+       DO  m = 1, surf_usm_h%ns
+             surf_usm_h%r_canopy_min(m)     = 200.0_wp !min_canopy_resistance
+             surf_usm_h%g_d(m)              = 0.0_wp !canopy_resistance_coefficient
+       ENDDO
+!
+!--    Map values onto vertical elements, even though this does not make
+!--    much sense.
+       DO  l = 0, 3
+          DO  m = 1, surf_usm_v(l)%ns
+                surf_usm_v(l)%r_canopy_min(m)     = 200.0_wp !min_canopy_resistance
+                surf_usm_v(l)%g_d(m)              = 0.0_wp !canopy_resistance_coefficient
+          ENDDO
+       ENDDO
+!---------------------------------------------------------------------------------------------
+!
+!
+!--     Initialize urban-type surface attribute. According to initialization in 
+!--     land-surface model, follow a 3-level approach.
+!--     Level 1 - initialization via default attributes 
+        DO  m = 1, surf_usm_h%ns
+!
+!--        Now, all horizontal surfaces are roof surfaces (?)
+           surf_usm_h%isroof_surf(m)   = .TRUE.
+           surf_usm_h%surface_types(m) = roof_category         !< default category for root surface
+!
+!--        In order to distinguish between ground floor level and 
+!--        above-ground-floor level surfaces, set input indices.
+
+           ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, &
+                                     surf_usm_h%ground_level(m) )
+           ind_lai_r        = MERGE( ind_lai_r_gfl,        ind_lai_r_agfl,        &
+                                     surf_usm_h%ground_level(m) )
+           ind_z0           = MERGE( ind_z0_gfl,           ind_z0_agfl,           &
+                                     surf_usm_h%ground_level(m) )
+           ind_z0qh         = MERGE( ind_z0qh_gfl,         ind_z0qh_agfl,         &
+                                     surf_usm_h%ground_level(m) )
+!
+!--        Store building type and its name on each surface element
+           surf_usm_h%building_type(m)      = building_type
+           surf_usm_h%building_type_name(m) = building_type_name(building_type)
+!
+!--        Initialize relatvie wall- (0), green- (1) and window (2) fractions
+           surf_usm_h%frac(ind_veg_wall,m)  = building_pars(ind_wall_frac_r,building_type)   
+           surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,building_type)  
+           surf_usm_h%frac(ind_wat_win,m)   = building_pars(ind_win_frac_r,building_type)  
+           surf_usm_h%lai(m)                = building_pars(ind_lai_r,building_type)  
+
+           surf_usm_h%rho_c_wall(nzb_wall,m)   = building_pars(ind_hc1_wall_r,building_type)  
+           surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,building_type)
+           surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,building_type)
+           surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,building_type)    
+           surf_usm_h%lambda_h(nzb_wall,m)   = building_pars(ind_tc1_wall_r,building_type)  
+           surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,building_type) 
+           surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,building_type)
+           surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,building_type)    
+           surf_usm_h%rho_c_green(nzb_wall,m)   = rho_c_soil !building_pars(ind_hc1_wall_r,building_type)  
+           surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,building_type)
+           surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,building_type)
+           surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,building_type)    
+           surf_usm_h%lambda_h_green(nzb_wall,m)   = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type)  
+           surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,building_type) 
+           surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,building_type)
+           surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,building_type)
+           surf_usm_h%rho_c_window(nzb_wall,m)   = building_pars(ind_hc1_win_r,building_type)  
+           surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,building_type)
+           surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,building_type)
+           surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,building_type)    
+           surf_usm_h%lambda_h_window(nzb_wall,m)   = building_pars(ind_tc1_win_r,building_type)  
+           surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,building_type) 
+           surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,building_type)
+           surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,building_type)    
+
+           surf_usm_h%target_temp_summer(m)  = building_pars(117,building_type)    
+           surf_usm_h%target_temp_winter(m)  = building_pars(118,building_type)    
+!
+!--        emissivity of wall-, green- and window fraction 
+           surf_usm_h%emissivity(ind_veg_wall,m)  = building_pars(ind_emis_wall_r,building_type)
+           surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,building_type)
+           surf_usm_h%emissivity(ind_wat_win,m)   = building_pars(ind_emis_win_r,building_type)
+
+           surf_usm_h%transmissivity(m)      = building_pars(ind_trans_r,building_type)
+
+           surf_usm_h%z0(m)                  = building_pars(ind_z0,building_type)
+           surf_usm_h%z0h(m)                 = building_pars(ind_z0qh,building_type)
+           surf_usm_h%z0q(m)                 = building_pars(ind_z0qh,building_type)
+!
+!--        albedo type for wall fraction, green fraction, window fraction
+           surf_usm_h%albedo_type(ind_veg_wall,m)  = INT( building_pars(ind_alb_wall_r,building_type)  )
+           surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,building_type) )
+           surf_usm_h%albedo_type(ind_wat_win,m)   = INT( building_pars(ind_alb_win_r,building_type)   )
+
+           surf_usm_h%zw(nzb_wall,m)         = building_pars(ind_thick_1_wall_r,building_type)
+           surf_usm_h%zw(nzb_wall+1,m)       = building_pars(ind_thick_2_wall_r,building_type)
+           surf_usm_h%zw(nzb_wall+2,m)       = building_pars(ind_thick_3_wall_r,building_type)
+           surf_usm_h%zw(nzb_wall+3,m)       = building_pars(ind_thick_4_wall_r,building_type)
+           
+           surf_usm_h%zw_green(nzb_wall,m)         = building_pars(ind_thick_1_wall_r,building_type)
+           surf_usm_h%zw_green(nzb_wall+1,m)       = building_pars(ind_thick_2_wall_r,building_type)
+           surf_usm_h%zw_green(nzb_wall+2,m)       = building_pars(ind_thick_3_wall_r,building_type)
+           surf_usm_h%zw_green(nzb_wall+3,m)       = building_pars(ind_thick_4_wall_r,building_type)
+           
+           surf_usm_h%zw_window(nzb_wall,m)         = building_pars(ind_thick_1_win_r,building_type)
+           surf_usm_h%zw_window(nzb_wall+1,m)       = building_pars(ind_thick_2_win_r,building_type)
+           surf_usm_h%zw_window(nzb_wall+2,m)       = building_pars(ind_thick_3_win_r,building_type)
+           surf_usm_h%zw_window(nzb_wall+3,m)       = building_pars(ind_thick_4_win_r,building_type)
+
+           surf_usm_h%c_surface(m)           = building_pars(0,building_type)  
+           surf_usm_h%lambda_surf(m)         = building_pars(3,building_type)  
+           surf_usm_h%c_surface_green(m)     = building_pars(2,building_type)  
+           surf_usm_h%lambda_surf_green(m)   = building_pars(5,building_type)  
+           surf_usm_h%c_surface_window(m)    = building_pars(1,building_type)  
+           surf_usm_h%lambda_surf_window(m)  = building_pars(4,building_type)  
+           
+           surf_usm_h%green_type_roof(m)     = building_pars(ind_green_type_roof,building_type)
+
+        ENDDO
+
+        DO  l = 0, 3
+           DO  m = 1, surf_usm_v(l)%ns
+
+              surf_usm_v(l)%surface_types(m) = wall_category         !< default category for root surface
+!
+!--           In order to distinguish between ground floor level and 
+!--           above-ground-floor level surfaces, set input indices.
+              ind_alb_green    = MERGE( ind_alb_green_gfl,    ind_alb_green_agfl,    &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_alb_wall     = MERGE( ind_alb_wall_gfl,     ind_alb_wall_agfl,     &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_alb_win      = MERGE( ind_alb_win_gfl,      ind_alb_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_wall_frac    = MERGE( ind_wall_frac_gfl,    ind_wall_frac_agfl,    &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_win_frac     = MERGE( ind_win_frac_gfl,     ind_win_frac_agfl,     &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_lai_r        = MERGE( ind_lai_r_gfl,        ind_lai_r_agfl,        &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_lai_w        = MERGE( ind_lai_w_gfl,        ind_lai_w_agfl,        &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc1          = MERGE( ind_hc1_gfl,          ind_hc1_agfl,          &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc1_win      = MERGE( ind_hc1_win_gfl,      ind_hc1_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc2          = MERGE( ind_hc2_gfl,          ind_hc2_agfl,          &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc2_win      = MERGE( ind_hc2_win_gfl,      ind_hc2_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc3          = MERGE( ind_hc3_gfl,          ind_hc3_agfl,          &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_hc3_win      = MERGE( ind_hc3_win_gfl,      ind_hc3_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc1          = MERGE( ind_tc1_gfl,          ind_tc1_agfl,          &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc1_win      = MERGE( ind_tc1_win_gfl,      ind_tc1_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc2          = MERGE( ind_tc2_gfl,          ind_tc2_agfl,          &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc2_win      = MERGE( ind_tc2_win_gfl,      ind_tc2_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc3          = MERGE( ind_tc3_gfl,          ind_tc3_agfl,          &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_tc3_win      = MERGE( ind_tc3_win_gfl,      ind_tc3_win_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_1      = MERGE( ind_thick_1_gfl,      ind_thick_1_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_1_win  = MERGE( ind_thick_1_win_gfl,  ind_thick_1_win_agfl,  &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_2      = MERGE( ind_thick_2_gfl,      ind_thick_2_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_2_win  = MERGE( ind_thick_2_win_gfl,  ind_thick_2_win_agfl,  &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_3      = MERGE( ind_thick_3_gfl,      ind_thick_3_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_3_win  = MERGE( ind_thick_3_win_gfl,  ind_thick_3_win_agfl,  &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_4      = MERGE( ind_thick_4_gfl,      ind_thick_4_agfl,      &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_thick_4_win  = MERGE( ind_thick_4_win_gfl,  ind_thick_4_win_agfl,  &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_emis_wall    = MERGE( ind_emis_wall_gfl,    ind_emis_wall_agfl,    &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_emis_green   = MERGE( ind_emis_green_gfl,   ind_emis_green_agfl,   &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_emis_win     = MERGE( ind_emis_win_gfl,     ind_emis_win_agfl,     &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_trans        = MERGE( ind_trans_gfl,       ind_trans_agfl,         &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_z0           = MERGE( ind_z0_gfl,           ind_z0_agfl,           &
+                                        surf_usm_v(l)%ground_level(m) )
+              ind_z0qh         = MERGE( ind_z0qh_gfl,         ind_z0qh_agfl,         &
+                                        surf_usm_v(l)%ground_level(m) )
+!
+!--           Store building type and its name on each surface element
+              surf_usm_v(l)%building_type(m)      = building_type
+              surf_usm_v(l)%building_type_name(m) = building_type_name(building_type)
+!
+!--           Initialize relatvie wall- (0), green- (1) and window (2) fractions
+              surf_usm_v(l)%frac(ind_veg_wall,m)   = building_pars(ind_wall_frac,building_type)   
+              surf_usm_v(l)%frac(ind_pav_green,m)  = building_pars(ind_green_frac_w,building_type) 
+              surf_usm_v(l)%frac(ind_wat_win,m)    = building_pars(ind_win_frac,building_type)  
+              surf_usm_v(l)%lai(m)                 = building_pars(ind_lai_w,building_type)  
+
+              surf_usm_v(l)%rho_c_wall(nzb_wall,m)   = building_pars(ind_hc1,building_type)  
+              surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,building_type)
+              surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,building_type)
+              surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,building_type)    
+              
+              surf_usm_v(l)%rho_c_green(nzb_wall,m)   = rho_c_soil !building_pars(ind_hc1,building_type)  
+              surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,building_type)
+              surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,building_type)
+              surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,building_type)    
+              
+              surf_usm_v(l)%rho_c_window(nzb_wall,m)   = building_pars(ind_hc1_win,building_type)  
+              surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,building_type)
+              surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,building_type)
+              surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,building_type)    
+
+              surf_usm_v(l)%lambda_h(nzb_wall,m)   = building_pars(ind_tc1,building_type)  
+              surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,building_type) 
+              surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,building_type)
+              surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,building_type)    
+              
+              surf_usm_v(l)%lambda_h_green(nzb_wall,m)   = lambda_h_green_sm !building_pars(ind_tc1,building_type)  
+              surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,building_type) 
+              surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,building_type)
+              surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,building_type)    
+
+              surf_usm_v(l)%lambda_h_window(nzb_wall,m)   = building_pars(ind_tc1_win,building_type)  
+              surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,building_type) 
+              surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,building_type)
+              surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,building_type)    
+
+              surf_usm_v(l)%target_temp_summer(m)  = building_pars(117,building_type)    
+              surf_usm_v(l)%target_temp_winter(m)  = building_pars(118,building_type)    
+!
+!--           emissivity of wall-, green- and window fraction 
+              surf_usm_v(l)%emissivity(ind_veg_wall,m)  = building_pars(ind_emis_wall,building_type)
+              surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,building_type)
+              surf_usm_v(l)%emissivity(ind_wat_win,m)   = building_pars(ind_emis_win,building_type)
+
+              surf_usm_v(l)%transmissivity(m)      = building_pars(ind_trans,building_type)
+
+              surf_usm_v(l)%z0(m)                  = building_pars(ind_z0,building_type)
+              surf_usm_v(l)%z0h(m)                 = building_pars(ind_z0qh,building_type)
+              surf_usm_v(l)%z0q(m)                 = building_pars(ind_z0qh,building_type)
+
+              surf_usm_v(l)%albedo_type(ind_veg_wall,m)  = INT( building_pars(ind_alb_wall,building_type) )
+              surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,building_type) )
+              surf_usm_v(l)%albedo_type(ind_wat_win,m)   = INT( building_pars(ind_alb_win,building_type) )
+
+              surf_usm_v(l)%zw(nzb_wall,m)         = building_pars(ind_thick_1,building_type)
+              surf_usm_v(l)%zw(nzb_wall+1,m)       = building_pars(ind_thick_2,building_type)
+              surf_usm_v(l)%zw(nzb_wall+2,m)       = building_pars(ind_thick_3,building_type)
+              surf_usm_v(l)%zw(nzb_wall+3,m)       = building_pars(ind_thick_4,building_type)
+              
+              surf_usm_v(l)%zw_green(nzb_wall,m)         = building_pars(ind_thick_1,building_type)
+              surf_usm_v(l)%zw_green(nzb_wall+1,m)       = building_pars(ind_thick_2,building_type)
+              surf_usm_v(l)%zw_green(nzb_wall+2,m)       = building_pars(ind_thick_3,building_type)
+              surf_usm_v(l)%zw_green(nzb_wall+3,m)       = building_pars(ind_thick_4,building_type)
+
+              surf_usm_v(l)%zw_window(nzb_wall,m)         = building_pars(ind_thick_1_win,building_type)
+              surf_usm_v(l)%zw_window(nzb_wall+1,m)       = building_pars(ind_thick_2_win,building_type)
+              surf_usm_v(l)%zw_window(nzb_wall+2,m)       = building_pars(ind_thick_3_win,building_type)
+              surf_usm_v(l)%zw_window(nzb_wall+3,m)       = building_pars(ind_thick_4_win,building_type)
+
+              surf_usm_v(l)%c_surface(m)           = building_pars(0,building_type)  
+              surf_usm_v(l)%lambda_surf(m)         = building_pars(3,building_type)
+              surf_usm_v(l)%c_surface_green(m)     = building_pars(2,building_type)  
+              surf_usm_v(l)%lambda_surf_green(m)   = building_pars(5,building_type)
+              surf_usm_v(l)%c_surface_window(m)    = building_pars(1,building_type)  
+              surf_usm_v(l)%lambda_surf_window(m)  = building_pars(4,building_type)
+
+           ENDDO
+        ENDDO
+!
+!--     Level 2 - initialization via building type read from file
+        IF ( building_type_f%from_file )  THEN
+           DO  m = 1, surf_usm_h%ns
+              i = surf_usm_h%i(m)
+              j = surf_usm_h%j(m)
+!
+!--           For the moment, limit building type to 6 (to overcome errors in input file).
+              st = building_type_f%var(j,i)
+              IF ( st /= building_type_f%fill )  THEN
+
+!
+!--              In order to distinguish between ground floor level and 
+!--              above-ground-floor level surfaces, set input indices.
+
+                 ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, &
+                                           surf_usm_h%ground_level(m) )
+                 ind_lai_r        = MERGE( ind_lai_r_gfl,        ind_lai_r_agfl,        &
+                                           surf_usm_h%ground_level(m) )
+                 ind_z0           = MERGE( ind_z0_gfl,           ind_z0_agfl,           &
+                                           surf_usm_h%ground_level(m) )
+                 ind_z0qh         = MERGE( ind_z0qh_gfl,         ind_z0qh_agfl,         &
+                                           surf_usm_h%ground_level(m) )
+!
+!--              Store building type and its name on each surface element
+                 surf_usm_h%building_type(m)      = st
+                 surf_usm_h%building_type_name(m) = building_type_name(st)
+!
+!--              Initialize relatvie wall- (0), green- (1) and window (2) fractions
+                 surf_usm_h%frac(ind_veg_wall,m)  = building_pars(ind_wall_frac_r,st)   
+                 surf_usm_h%frac(ind_pav_green,m) = building_pars(ind_green_frac_r,st)  
+                 surf_usm_h%frac(ind_wat_win,m)   = building_pars(ind_win_frac_r,st)  
+                 surf_usm_h%lai(m)                = building_pars(ind_lai_r,st)  
+
+                 surf_usm_h%rho_c_wall(nzb_wall,m)   = building_pars(ind_hc1_wall_r,st)  
+                 surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1_wall_r,st)
+                 surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2_wall_r,st)
+                 surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3_wall_r,st)    
+                 surf_usm_h%lambda_h(nzb_wall,m)   = building_pars(ind_tc1_wall_r,st)  
+                 surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1_wall_r,st) 
+                 surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2_wall_r,st)
+                 surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3_wall_r,st)    
+                 
+                 surf_usm_h%rho_c_green(nzb_wall,m)   = rho_c_soil !building_pars(ind_hc1_wall_r,st)  
+                 surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1_wall_r,st)
+                 surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2_wall_r,st)
+                 surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3_wall_r,st)    
+                 surf_usm_h%lambda_h_green(nzb_wall,m)   = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st)  
+                 surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1_wall_r,st) 
+                 surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2_wall_r,st)
+                 surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3_wall_r,st)    
+                
+                 surf_usm_h%rho_c_window(nzb_wall,m)   = building_pars(ind_hc1_win_r,st)  
+                 surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win_r,st)
+                 surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win_r,st)
+                 surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win_r,st)    
+                 surf_usm_h%lambda_h_window(nzb_wall,m)   = building_pars(ind_tc1_win_r,st)  
+                 surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win_r,st) 
+                 surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win_r,st)
+                 surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win_r,st)    
+
+                 surf_usm_h%target_temp_summer(m)  = building_pars(117,st)    
+                 surf_usm_h%target_temp_winter(m)  = building_pars(118,st)    
+!
+!--              emissivity of wall-, green- and window fraction 
+                 surf_usm_h%emissivity(ind_veg_wall,m)  = building_pars(ind_emis_wall_r,st)
+                 surf_usm_h%emissivity(ind_pav_green,m) = building_pars(ind_emis_green_r,st)
+                 surf_usm_h%emissivity(ind_wat_win,m)   = building_pars(ind_emis_win_r,st)
+
+                 surf_usm_h%transmissivity(m)      = building_pars(ind_trans_r,st)
+
+                 surf_usm_h%z0(m)                  = building_pars(ind_z0,st)
+                 surf_usm_h%z0h(m)                 = building_pars(ind_z0qh,st)
+                 surf_usm_h%z0q(m)                 = building_pars(ind_z0qh,st)
+!
+!--              albedo type for wall fraction, green fraction, window fraction
+                 surf_usm_h%albedo_type(ind_veg_wall,m)  = INT( building_pars(ind_alb_wall_r,st) )
+                 surf_usm_h%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green_r,st) )
+                 surf_usm_h%albedo_type(ind_wat_win,m)   = INT( building_pars(ind_alb_win_r,st) )
+
+                 surf_usm_h%zw(nzb_wall,m)         = building_pars(ind_thick_1_wall_r,st)
+                 surf_usm_h%zw(nzb_wall+1,m)       = building_pars(ind_thick_2_wall_r,st)
+                 surf_usm_h%zw(nzb_wall+2,m)       = building_pars(ind_thick_3_wall_r,st)
+                 surf_usm_h%zw(nzb_wall+3,m)       = building_pars(ind_thick_4_wall_r,st)
+                 
+                 surf_usm_h%zw_green(nzb_wall,m)         = building_pars(ind_thick_1_wall_r,st)
+                 surf_usm_h%zw_green(nzb_wall+1,m)       = building_pars(ind_thick_2_wall_r,st)
+                 surf_usm_h%zw_green(nzb_wall+2,m)       = building_pars(ind_thick_3_wall_r,st)
+                 surf_usm_h%zw_green(nzb_wall+3,m)       = building_pars(ind_thick_4_wall_r,st)
+
+                 surf_usm_h%zw_window(nzb_wall,m)         = building_pars(ind_thick_1_win_r,st)
+                 surf_usm_h%zw_window(nzb_wall+1,m)       = building_pars(ind_thick_2_win_r,st)
+                 surf_usm_h%zw_window(nzb_wall+2,m)       = building_pars(ind_thick_3_win_r,st)
+                 surf_usm_h%zw_window(nzb_wall+3,m)       = building_pars(ind_thick_4_win_r,st)
+
+                 surf_usm_h%c_surface(m)           = building_pars(0,st)  
+                 surf_usm_h%lambda_surf(m)         = building_pars(3,st)
+                 surf_usm_h%c_surface_green(m)     = building_pars(2,st)  
+                 surf_usm_h%lambda_surf_green(m)   = building_pars(5,st)
+                 surf_usm_h%c_surface_window(m)    = building_pars(1,st)  
+                 surf_usm_h%lambda_surf_window(m)  = building_pars(4,st)
+                 
+                 surf_usm_h%green_type_roof(m)     = building_pars(ind_green_type_roof,st)
+
+              ENDIF
+           ENDDO
+
+           DO  l = 0, 3
+              DO  m = 1, surf_usm_v(l)%ns
+                 i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff
+                 j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff
+!
+!--              For the moment, limit building type to 6 (to overcome errors in input file).
+
+                 st = building_type_f%var(j,i)
+                 IF ( st /= building_type_f%fill )  THEN
+
+!
+!--                 In order to distinguish between ground floor level and 
+!--                 above-ground-floor level surfaces, set input indices.
+                    ind_alb_green    = MERGE( ind_alb_green_gfl,    ind_alb_green_agfl,    &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_alb_wall     = MERGE( ind_alb_wall_gfl,     ind_alb_wall_agfl,     &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_alb_win      = MERGE( ind_alb_win_gfl,      ind_alb_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_wall_frac    = MERGE( ind_wall_frac_gfl,    ind_wall_frac_agfl,    &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_win_frac     = MERGE( ind_win_frac_gfl,     ind_win_frac_agfl,     &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_lai_r        = MERGE( ind_lai_r_gfl,        ind_lai_r_agfl,        &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_lai_w        = MERGE( ind_lai_w_gfl,        ind_lai_w_agfl,        &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_hc1          = MERGE( ind_hc1_gfl,          ind_hc1_agfl,          &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_hc1_win      = MERGE( ind_hc1_win_gfl,      ind_hc1_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_hc2          = MERGE( ind_hc2_gfl,          ind_hc2_agfl,          &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_hc2_win      = MERGE( ind_hc2_win_gfl,      ind_hc2_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_hc3          = MERGE( ind_hc3_gfl,          ind_hc3_agfl,          &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_hc3_win      = MERGE( ind_hc3_win_gfl,      ind_hc3_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_tc1          = MERGE( ind_tc1_gfl,          ind_tc1_agfl,          &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_tc1_win      = MERGE( ind_tc1_win_gfl,      ind_tc1_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_tc2          = MERGE( ind_tc2_gfl,          ind_tc2_agfl,          &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_tc2_win      = MERGE( ind_tc2_win_gfl,      ind_tc2_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_tc3          = MERGE( ind_tc3_gfl,          ind_tc3_agfl,          &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_tc3_win      = MERGE( ind_tc3_win_gfl,      ind_tc3_win_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_1      = MERGE( ind_thick_1_gfl,      ind_thick_1_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_1_win  = MERGE( ind_thick_1_win_gfl,  ind_thick_1_win_agfl,  &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_2      = MERGE( ind_thick_2_gfl,      ind_thick_2_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_2_win  = MERGE( ind_thick_2_win_gfl,  ind_thick_2_win_agfl,  &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_3      = MERGE( ind_thick_3_gfl,      ind_thick_3_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_3_win  = MERGE( ind_thick_3_win_gfl,  ind_thick_3_win_agfl,  &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_4      = MERGE( ind_thick_4_gfl,      ind_thick_4_agfl,      &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_thick_4_win  = MERGE( ind_thick_4_win_gfl,  ind_thick_4_win_agfl,  &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_emis_wall    = MERGE( ind_emis_wall_gfl,    ind_emis_wall_agfl,    &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_emis_green   = MERGE( ind_emis_green_gfl,   ind_emis_green_agfl,   &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_emis_win     = MERGE( ind_emis_win_gfl,     ind_emis_win_agfl,     &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_trans        = MERGE( ind_trans_gfl,       ind_trans_agfl,         &
+                                            surf_usm_v(l)%ground_level(m) )
+                    ind_z0           = MERGE( ind_z0_gfl,           ind_z0_agfl,           &
+                                              surf_usm_v(l)%ground_level(m) )
+                    ind_z0qh         = MERGE( ind_z0qh_gfl,         ind_z0qh_agfl,         &
+                                              surf_usm_v(l)%ground_level(m) )
+!
+!--                 Store building type and its name on each surface element
+                    surf_usm_v(l)%building_type(m)      = st
+                    surf_usm_v(l)%building_type_name(m) = building_type_name(st)
+!
+!--                 Initialize relatvie wall- (0), green- (1) and window (2) fractions
+                    surf_usm_v(l)%frac(ind_veg_wall,m)  = building_pars(ind_wall_frac,st)   
+                    surf_usm_v(l)%frac(ind_pav_green,m) = building_pars(ind_green_frac_w,st)  
+                    surf_usm_v(l)%frac(ind_wat_win,m)   = building_pars(ind_win_frac,st)   
+                    surf_usm_v(l)%lai(m)                = building_pars(ind_lai_w,st)  
+
+                    surf_usm_v(l)%rho_c_wall(nzb_wall,m)   = building_pars(ind_hc1,st)  
+                    surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) = building_pars(ind_hc1,st)
+                    surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) = building_pars(ind_hc2,st)
+                    surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) = building_pars(ind_hc3,st)
+                    
+                    surf_usm_v(l)%rho_c_green(nzb_wall,m)   = rho_c_soil !building_pars(ind_hc1,st)  
+                    surf_usm_v(l)%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars(ind_hc1,st)
+                    surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars(ind_hc2,st)
+                    surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars(ind_hc3,st)
+                    
+                    surf_usm_v(l)%rho_c_window(nzb_wall,m)   = building_pars(ind_hc1_win,st)  
+                    surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars(ind_hc1_win,st)
+                    surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars(ind_hc2_win,st)
+                    surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars(ind_hc3_win,st)
+
+                    surf_usm_v(l)%lambda_h(nzb_wall,m)   = building_pars(ind_tc1,st)  
+                    surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars(ind_tc1,st) 
+                    surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars(ind_tc2,st)
+                    surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars(ind_tc3,st) 
+                    
+                    surf_usm_v(l)%lambda_h_green(nzb_wall,m)   = lambda_h_green_sm !building_pars(ind_tc1,st)  
+                    surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars(ind_tc1,st) 
+                    surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars(ind_tc2,st)
+                    surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars(ind_tc3,st) 
+                    
+                    surf_usm_v(l)%lambda_h_window(nzb_wall,m)   = building_pars(ind_tc1_win,st)  
+                    surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars(ind_tc1_win,st) 
+                    surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars(ind_tc2_win,st)
+                    surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars(ind_tc3_win,st) 
+
+                    surf_usm_v(l)%target_temp_summer(m)  = building_pars(117,st)    
+                    surf_usm_v(l)%target_temp_winter(m)  = building_pars(118,st)    
+!
+!--                 emissivity of wall-, green- and window fraction 
+                    surf_usm_v(l)%emissivity(ind_veg_wall,m)  = building_pars(ind_emis_wall,st)
+                    surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars(ind_emis_green,st)
+                    surf_usm_v(l)%emissivity(ind_wat_win,m)   = building_pars(ind_emis_win,st)
+
+                    surf_usm_v(l)%transmissivity(m)      = building_pars(ind_trans,st)
+
+                    surf_usm_v(l)%z0(m)                  = building_pars(ind_z0,st)
+                    surf_usm_v(l)%z0h(m)                 = building_pars(ind_z0qh,st)
+                    surf_usm_v(l)%z0q(m)                 = building_pars(ind_z0qh,st)
+
+                    surf_usm_v(l)%albedo_type(ind_veg_wall,m)  = INT( building_pars(ind_alb_wall,st) )
+                    surf_usm_v(l)%albedo_type(ind_pav_green,m) = INT( building_pars(ind_alb_green,st) )
+                    surf_usm_v(l)%albedo_type(ind_wat_win,m)   = INT( building_pars(ind_alb_win,st) )
+
+                    surf_usm_v(l)%zw(nzb_wall,m)         = building_pars(ind_thick_1,st)
+                    surf_usm_v(l)%zw(nzb_wall+1,m)       = building_pars(ind_thick_2,st)
+                    surf_usm_v(l)%zw(nzb_wall+2,m)       = building_pars(ind_thick_3,st)
+                    surf_usm_v(l)%zw(nzb_wall+3,m)       = building_pars(ind_thick_4,st)
+                    
+                    surf_usm_v(l)%zw_green(nzb_wall,m)         = building_pars(ind_thick_1,st)
+                    surf_usm_v(l)%zw_green(nzb_wall+1,m)       = building_pars(ind_thick_2,st)
+                    surf_usm_v(l)%zw_green(nzb_wall+2,m)       = building_pars(ind_thick_3,st)
+                    surf_usm_v(l)%zw_green(nzb_wall+3,m)       = building_pars(ind_thick_4,st)
+                    
+                    surf_usm_v(l)%zw_window(nzb_wall,m)         = building_pars(ind_thick_1_win,st)
+                    surf_usm_v(l)%zw_window(nzb_wall+1,m)       = building_pars(ind_thick_2_win,st)
+                    surf_usm_v(l)%zw_window(nzb_wall+2,m)       = building_pars(ind_thick_3_win,st)
+                    surf_usm_v(l)%zw_window(nzb_wall+3,m)       = building_pars(ind_thick_4_win,st)
+
+                    surf_usm_v(l)%c_surface(m)           = building_pars(0,st)  
+                    surf_usm_v(l)%lambda_surf(m)         = building_pars(3,st) 
+                    surf_usm_v(l)%c_surface_green(m)     = building_pars(2,st)  
+                    surf_usm_v(l)%lambda_surf_green(m)   = building_pars(5,st) 
+                    surf_usm_v(l)%c_surface_window(m)    = building_pars(1,st)  
+                    surf_usm_v(l)%lambda_surf_window(m)  = building_pars(4,st) 
+
+
+                 ENDIF
+              ENDDO
+           ENDDO
+        ENDIF 
+        
+!
+!--     Level 3 - initialization via building_pars read from file
+        IF ( building_pars_f%from_file )  THEN
+           DO  m = 1, surf_usm_h%ns
+              i = surf_usm_h%i(m)
+              j = surf_usm_h%j(m)
+
+!
+!--           In order to distinguish between ground floor level and 
+!--           above-ground-floor level surfaces, set input indices.
+              ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, &
+                                        surf_usm_h%ground_level(m) )
+              ind_lai_r        = MERGE( ind_lai_r_gfl,        ind_lai_r_agfl,        &
+                                        surf_usm_h%ground_level(m) )
+              ind_z0           = MERGE( ind_z0_gfl,           ind_z0_agfl,           &
+                                        surf_usm_h%ground_level(m) )
+              ind_z0qh         = MERGE( ind_z0qh_gfl,         ind_z0qh_agfl,         &
+                                        surf_usm_h%ground_level(m) )
+
+!
+!--           Initialize relatvie wall- (0), green- (1) and window (2) fractions
+              IF ( building_pars_f%pars_xy(ind_wall_frac_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%frac(ind_veg_wall,m)  = building_pars_f%pars_xy(ind_wall_frac_r,j,i)   
+              IF ( building_pars_f%pars_xy(ind_green_frac_r,j,i) /= building_pars_f%fill ) & 
+                 surf_usm_h%frac(ind_pav_green,m) = building_pars_f%pars_xy(ind_green_frac_r,j,i) 
+              IF ( building_pars_f%pars_xy(ind_win_frac_r,j,i) /= building_pars_f%fill )     & 
+                 surf_usm_h%frac(ind_wat_win,m)   = building_pars_f%pars_xy(ind_win_frac_r,j,i)
+
+ 
+              IF ( building_pars_f%pars_xy(ind_lai_r,j,i) /= building_pars_f%fill )        &
+                 surf_usm_h%lai(m)             = building_pars_f%pars_xy(ind_lai_r,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill )  THEN 
+                 surf_usm_h%rho_c_wall(nzb_wall,m)   = building_pars_f%pars_xy(ind_hc1_wall_r,j,i)  
+                 surf_usm_h%rho_c_wall(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_wall_r,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%rho_c_wall(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%rho_c_wall(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_hc1_wall_r,j,i) /= building_pars_f%fill )  THEN 
+                 surf_usm_h%rho_c_green(nzb_wall,m)   = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i)  
+                 surf_usm_h%rho_c_green(nzb_wall+1,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc1_wall_r,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_hc2_wall_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_hc3_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_hc1_win_r,j,i) /= building_pars_f%fill )  THEN 
+                 surf_usm_h%rho_c_window(nzb_wall,m)   = building_pars_f%pars_xy(ind_hc1_win_r,j,i)  
+                 surf_usm_h%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win_r,j,i)
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_hc2_win_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_hc3_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win_r,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_h%lambda_h(nzb_wall,m)   = building_pars_f%pars_xy(ind_tc1_wall_r,j,i)         
+                 surf_usm_h%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_wall_r,j,i)        
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_wall_r,j,i)    
+              IF ( building_pars_f%pars_xy(ind_tc1_wall_r,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_h%lambda_h_green(nzb_wall,m)   = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i)         
+                 surf_usm_h%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1_wall_r,j,i)        
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_tc2_wall_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_tc3_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3_wall_r,j,i)    
+              IF ( building_pars_f%pars_xy(ind_tc1_win_r,j,i) /= building_pars_f%fill )  THEN
+                 surf_usm_h%lambda_h_window(nzb_wall,m)   = building_pars_f%pars_xy(ind_tc1_win_r,j,i)         
+                 surf_usm_h%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win_r,j,i)        
+              ENDIF
+              IF ( building_pars_f%pars_xy(ind_tc2_win_r,j,i) /= building_pars_f%fill )    &
+                 surf_usm_h%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_tc3_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win_r,j,i)    
+
+              IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill )         & 
+                 surf_usm_h%target_temp_summer(m)  = building_pars_f%pars_xy(117,j,i)   
+              IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill )         & 
+                 surf_usm_h%target_temp_winter(m)  = building_pars_f%pars_xy(118,j,i)   
+
+              IF ( building_pars_f%pars_xy(ind_emis_wall_r,j,i) /= building_pars_f%fill ) & 
+                 surf_usm_h%emissivity(ind_veg_wall,m)  = building_pars_f%pars_xy(ind_emis_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_emis_green_r,j,i) /= building_pars_f%fill )& 
+                 surf_usm_h%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_emis_win_r,j,i) /= building_pars_f%fill )  & 
+                 surf_usm_h%emissivity(ind_wat_win,m)   = building_pars_f%pars_xy(ind_emis_win_r,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_trans_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%transmissivity(m)      = building_pars_f%pars_xy(ind_trans_r,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%z0(m)                  = building_pars_f%pars_xy(ind_z0,j,i)
+              IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )  & 
+                 surf_usm_h%z0h(m)                 = building_pars_f%pars_xy(ind_z0qh,j,i)
+              IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )  & 
+                 surf_usm_h%z0q(m)                 = building_pars_f%pars_xy(ind_z0qh,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_alb_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%albedo_type(ind_veg_wall,m)  = building_pars_f%pars_xy(ind_alb_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_alb_green_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_alb_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%albedo_type(ind_wat_win,m)   = building_pars_f%pars_xy(ind_alb_win_r,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_1_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_2_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_3_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_4_wall_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_wall_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_1_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_2_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_3_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win_r,j,i)
+              IF ( building_pars_f%pars_xy(ind_thick_4_win_r,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win_r,j,i)
+
+              IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%c_surface(m)           = building_pars_f%pars_xy(0,j,i)
+              IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%lambda_surf(m)         = building_pars_f%pars_xy(3,j,i)
+              IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%c_surface_green(m)           = building_pars_f%pars_xy(2,j,i)
+              IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%lambda_surf_green(m)         = building_pars_f%pars_xy(5,j,i)
+              IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%c_surface_window(m)           = building_pars_f%pars_xy(1,j,i)
+              IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%lambda_surf_window(m)         = building_pars_f%pars_xy(4,j,i)
+
+              IF ( building_pars_f%pars_xy(ind_green_type_roof,j,i) /= building_pars_f%fill )    & 
+                 surf_usm_h%green_type_roof(m)            = building_pars_f%pars_xy(ind_green_type_roof,j,i)
+           ENDDO
+
+
+
+           DO  l = 0, 3
+              DO  m = 1, surf_usm_v(l)%ns
+                 i = surf_usm_v(l)%i(m) + surf_usm_v(l)%ioff
+                 j = surf_usm_v(l)%j(m) + surf_usm_v(l)%joff
+                
+!
+!--              In order to distinguish between ground floor level and 
+!--              above-ground-floor level surfaces, set input indices.
+                 ind_alb_green    = MERGE( ind_alb_green_gfl,    ind_alb_green_agfl,    &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_alb_wall     = MERGE( ind_alb_wall_gfl,     ind_alb_wall_agfl,     &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_alb_win      = MERGE( ind_alb_win_gfl,      ind_alb_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_wall_frac    = MERGE( ind_wall_frac_gfl,    ind_wall_frac_agfl,     &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_win_frac     = MERGE( ind_win_frac_gfl,     ind_win_frac_agfl,     &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_green_frac_w = MERGE( ind_green_frac_w_gfl, ind_green_frac_w_agfl, &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_green_frac_r = MERGE( ind_green_frac_r_gfl, ind_green_frac_r_agfl, &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_lai_r        = MERGE( ind_lai_r_gfl,        ind_lai_r_agfl,        &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_lai_w        = MERGE( ind_lai_w_gfl,        ind_lai_w_agfl,        &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_hc1          = MERGE( ind_hc1_gfl,          ind_hc1_agfl,          &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_hc1_win      = MERGE( ind_hc1_win_gfl,      ind_hc1_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_hc2          = MERGE( ind_hc2_gfl,          ind_hc2_agfl,          &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_hc2_win      = MERGE( ind_hc2_win_gfl,      ind_hc2_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_hc3          = MERGE( ind_hc3_gfl,          ind_hc3_agfl,          &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_hc3_win      = MERGE( ind_hc3_win_gfl,      ind_hc3_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_tc1          = MERGE( ind_tc1_gfl,          ind_tc1_agfl,          &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_tc1_win      = MERGE( ind_tc1_win_gfl,      ind_tc1_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_tc2          = MERGE( ind_tc2_gfl,          ind_tc2_agfl,          &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_tc2_win      = MERGE( ind_tc2_win_gfl,      ind_tc2_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_tc3          = MERGE( ind_tc3_gfl,          ind_tc3_agfl,          &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_tc3_win      = MERGE( ind_tc3_win_gfl,      ind_tc3_win_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_1      = MERGE( ind_thick_1_gfl,      ind_thick_1_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_1_win  = MERGE( ind_thick_1_win_gfl,  ind_thick_1_win_agfl,  &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_2      = MERGE( ind_thick_2_gfl,      ind_thick_2_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_2_win  = MERGE( ind_thick_2_win_gfl,  ind_thick_2_win_agfl,  &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_3      = MERGE( ind_thick_3_gfl,      ind_thick_3_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_3_win  = MERGE( ind_thick_3_win_gfl,  ind_thick_3_win_agfl,  &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_4      = MERGE( ind_thick_4_gfl,      ind_thick_4_agfl,      &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_thick_4_win  = MERGE( ind_thick_4_win_gfl,  ind_thick_4_win_agfl,  &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_emis_wall    = MERGE( ind_emis_wall_gfl,    ind_emis_wall_agfl,    &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_emis_green   = MERGE( ind_emis_green_gfl,   ind_emis_green_agfl,   &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_emis_win     = MERGE( ind_emis_win_gfl,     ind_emis_win_agfl,     &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_trans        = MERGE( ind_trans_gfl,       ind_trans_agfl,         &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_z0           = MERGE( ind_z0_gfl,           ind_z0_agfl,           &
+                                           surf_usm_v(l)%ground_level(m) )
+                 ind_z0qh         = MERGE( ind_z0qh_gfl,         ind_z0qh_agfl,         &
+                                              surf_usm_v(l)%ground_level(m) )
+
+!
+!--              Initialize relatvie wall- (0), green- (1) and window (2) fractions
+                 IF ( building_pars_f%pars_xy(ind_wall_frac,j,i) /=                     &
+                      building_pars_f%fill )                                            &
+                    surf_usm_v(l)%frac(ind_veg_wall,m)  =                               &
+                                      building_pars_f%pars_xy(ind_wall_frac,j,i)   
+                 IF ( building_pars_f%pars_xy(ind_green_frac_w,j,i) /=                  &
+                      building_pars_f%fill )                                            & 
+                    surf_usm_v(l)%frac(ind_pav_green,m) =                               &
+                                      building_pars_f%pars_xy(ind_green_frac_w,j,i) 
+                 IF ( building_pars_f%pars_xy(ind_win_frac,j,i) /=                      &
+                      building_pars_f%fill )                                            & 
+                    surf_usm_v(l)%frac(ind_wat_win,m)   =                               &
+                                      building_pars_f%pars_xy(ind_win_frac,j,i)
+  
+                 IF ( building_pars_f%pars_xy(ind_lai_w,j,i) /= building_pars_f%fill )  & 
+                    surf_usm_v(l)%lai(m) = building_pars_f%pars_xy(ind_lai_w,j,i)
+
+                 IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )    &
+                 THEN 
+                    surf_usm_v(l)%rho_c_wall(nzb_wall,m)   =                            &
+                                                    building_pars_f%pars_xy(ind_hc1,j,i)  
+                    surf_usm_v(l)%rho_c_wall(nzb_wall+1,m) =                            &
+                                                    building_pars_f%pars_xy(ind_hc1,j,i)
+                 ENDIF
+                 IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%rho_c_wall(nzb_wall+2,m) =                            &                            
+                                                    building_pars_f%pars_xy(ind_hc2,j,i)
+                 IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%rho_c_wall(nzb_wall+3,m) =                            &
+                                                    building_pars_f%pars_xy(ind_hc3,j,i)
+                 IF ( building_pars_f%pars_xy(ind_hc1,j,i) /= building_pars_f%fill )  THEN 
+                    surf_usm_v(l)%rho_c_green(nzb_wall,m)   =                           &
+                                                    rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i)  
+                    surf_usm_v(l)%rho_c_green(nzb_wall+1,m) =                           &
+                                                    rho_c_soil !building_pars_f%pars_xy(ind_hc1,j,i)
+                 ENDIF
+                 IF ( building_pars_f%pars_xy(ind_hc2,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%rho_c_green(nzb_wall+2,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc2,j,i)
+                 IF ( building_pars_f%pars_xy(ind_hc3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%rho_c_green(nzb_wall+3,m) = rho_c_soil !building_pars_f%pars_xy(ind_hc3,j,i)    
+                 IF ( building_pars_f%pars_xy(ind_hc1_win,j,i) /= building_pars_f%fill )  THEN 
+                    surf_usm_v(l)%rho_c_window(nzb_wall,m)   = building_pars_f%pars_xy(ind_hc1_win,j,i)  
+                    surf_usm_v(l)%rho_c_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_hc1_win,j,i)
+                 ENDIF
+                 IF ( building_pars_f%pars_xy(ind_hc2_win,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%rho_c_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_hc2_win,j,i)
+                 IF ( building_pars_f%pars_xy(ind_hc3_win,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%rho_c_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_hc3_win,j,i)
+
+                 IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
+                    surf_usm_v(l)%lambda_h(nzb_wall,m)   = building_pars_f%pars_xy(ind_tc1,j,i)         
+                    surf_usm_v(l)%lambda_h(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1,j,i)        
+                 ENDIF
+                 IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%lambda_h(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2,j,i)
+                 IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%lambda_h(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3,j,i)    
+                 IF ( building_pars_f%pars_xy(ind_tc1,j,i) /= building_pars_f%fill )  THEN
+                    surf_usm_v(l)%lambda_h_green(nzb_wall,m)   = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i)         
+                    surf_usm_v(l)%lambda_h_green(nzb_wall+1,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc1,j,i)        
+                 ENDIF
+                 IF ( building_pars_f%pars_xy(ind_tc2,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%lambda_h_green(nzb_wall+2,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc2,j,i)
+                 IF ( building_pars_f%pars_xy(ind_tc3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%lambda_h_green(nzb_wall+3,m) = lambda_h_green_sm !building_pars_f%pars_xy(ind_tc3,j,i)    
+                 IF ( building_pars_f%pars_xy(ind_tc1_win,j,i) /= building_pars_f%fill )  THEN
+                    surf_usm_v(l)%lambda_h_window(nzb_wall,m)   = building_pars_f%pars_xy(ind_tc1_win,j,i)         
+                    surf_usm_v(l)%lambda_h_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_tc1_win,j,i)        
+                 ENDIF
+                 IF ( building_pars_f%pars_xy(ind_tc2_win,j,i) /= building_pars_f%fill )    &
+                    surf_usm_v(l)%lambda_h_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_tc2_win,j,i)
+                 IF ( building_pars_f%pars_xy(ind_tc3_win,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%lambda_h_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_tc3_win,j,i)
+
+                 IF ( building_pars_f%pars_xy(117,j,i) /= building_pars_f%fill )         & 
+                    surf_usm_v(l)%target_temp_summer(m)  = building_pars_f%pars_xy(117,j,i)   
+                 IF ( building_pars_f%pars_xy(118,j,i) /= building_pars_f%fill )         & 
+                    surf_usm_v(l)%target_temp_winter(m)  = building_pars_f%pars_xy(118,j,i)   
+
+                 IF ( building_pars_f%pars_xy(ind_emis_wall,j,i) /= building_pars_f%fill ) & 
+                    surf_usm_v(l)%emissivity(ind_veg_wall,m)  = building_pars_f%pars_xy(ind_emis_wall,j,i)
+                 IF ( building_pars_f%pars_xy(ind_emis_green,j,i) /= building_pars_f%fill )& 
+                    surf_usm_v(l)%emissivity(ind_pav_green,m) = building_pars_f%pars_xy(ind_emis_green,j,i)
+                 IF ( building_pars_f%pars_xy(ind_emis_win,j,i) /= building_pars_f%fill )  & 
+                    surf_usm_v(l)%emissivity(ind_wat_win,m)   = building_pars_f%pars_xy(ind_emis_win,j,i)
+
+                 IF ( building_pars_f%pars_xy(ind_trans,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%transmissivity(m)      = building_pars_f%pars_xy(ind_trans,j,i)
+
+                 IF ( building_pars_f%pars_xy(ind_z0,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%z0(m)                  = building_pars_f%pars_xy(ind_z0,j,i)
+                 IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )  & 
+                    surf_usm_v(l)%z0h(m)                 = building_pars_f%pars_xy(ind_z0qh,j,i)
+                 IF ( building_pars_f%pars_xy(ind_z0qh,j,i) /= building_pars_f%fill )  & 
+                    surf_usm_v(l)%z0q(m)                 = building_pars_f%pars_xy(ind_z0qh,j,i)
+
+                 IF ( building_pars_f%pars_xy(ind_alb_wall,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%albedo_type(ind_veg_wall,m)  = building_pars_f%pars_xy(ind_alb_wall,j,i)
+                 IF ( building_pars_f%pars_xy(ind_alb_green,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%albedo_type(ind_pav_green,m) = building_pars_f%pars_xy(ind_alb_green,j,i)
+                 IF ( building_pars_f%pars_xy(ind_alb_win,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%albedo_type(ind_wat_win,m)   = building_pars_f%pars_xy(ind_alb_win,j,i)
+
+                 IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_1,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_green(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_2,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_green(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_green(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_4,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_green(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_1_win,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_window(nzb_wall,m) = building_pars_f%pars_xy(ind_thick_1_win,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_2_win,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_window(nzb_wall+1,m) = building_pars_f%pars_xy(ind_thick_2_win,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_3_win,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_window(nzb_wall+2,m) = building_pars_f%pars_xy(ind_thick_3_win,j,i)
+                 IF ( building_pars_f%pars_xy(ind_thick_4_win,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%zw_window(nzb_wall+3,m) = building_pars_f%pars_xy(ind_thick_4_win,j,i)
+
+                 IF ( building_pars_f%pars_xy(0,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%c_surface(m)           = building_pars_f%pars_xy(0,j,i)
+                 IF ( building_pars_f%pars_xy(3,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%lambda_surf(m)         = building_pars_f%pars_xy(3,j,i)
+                 IF ( building_pars_f%pars_xy(2,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%c_surface_green(m)     = building_pars_f%pars_xy(2,j,i)
+                 IF ( building_pars_f%pars_xy(5,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%lambda_surf_green(m)   = building_pars_f%pars_xy(5,j,i)
+                 IF ( building_pars_f%pars_xy(1,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%c_surface_window(m)    = building_pars_f%pars_xy(1,j,i)
+                 IF ( building_pars_f%pars_xy(4,j,i) /= building_pars_f%fill )    & 
+                    surf_usm_v(l)%lambda_surf_window(m)  = building_pars_f%pars_xy(4,j,i)
+
+              ENDDO
+           ENDDO
+        ENDIF 
+!       
+!--     Read the surface_types array.
+!--     Please note, here also initialization of surface attributes is done as
+!--     long as _urbsurf and _surfpar files are available. Values from above
+!--     will be overwritten. This might be removed later, but is still in the 
+!--     code to enable compatibility with older model version.
+        CALL usm_read_urban_surface_types()
+        
+!--     init material heat model
+        CALL usm_init_material_model()
+        
+!--     init anthropogenic sources of heat
+        IF ( usm_anthropogenic_heat )  THEN
+!--         init anthropogenic sources of heat (from transportation for now)
+            CALL usm_read_anthropogenic_heat()
+        ENDIF
+
+!
+!--    Check for consistent initialization.
+!--    Check if roughness length for momentum, or heat, exceed surface-layer
+!--    height and decrease local roughness length where necessary. 
+       DO  m = 1, surf_usm_h%ns
+          IF ( surf_usm_h%z0(m) >= surf_usm_h%z_mo(m) )  THEN
+          
+             surf_usm_h%z0(m) = 0.9_wp * surf_usm_h%z_mo(m)
+             
+             WRITE( message_string, * ) 'z0 exceeds surface-layer height ' //  &
+                            'at horizontal urban surface and is ' //           &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_usm_h%i(m), surf_usm_h%j(m)
+             CALL message( 'urban_surface_model_mod', 'PA0503',                &
+                            0, 0, 0, 6, 0 )
+          ENDIF
+          IF ( surf_usm_h%z0h(m) >= surf_usm_h%z_mo(m) )  THEN
+          
+             surf_usm_h%z0h(m) = 0.9_wp * surf_usm_h%z_mo(m)
+             surf_usm_h%z0q(m) = 0.9_wp * surf_usm_h%z_mo(m)
+             
+             WRITE( message_string, * ) 'z0h exceeds surface-layer height ' // &
+                            'at horizontal urban surface and is ' //           &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_usm_h%i(m), surf_usm_h%j(m)
+             CALL message( 'urban_surface_model_mod', 'PA0507',                &
+                            0, 0, 0, 6, 0 )
+          ENDIF          
+       ENDDO
+       
+       DO  l = 0, 3
+          DO  m = 1, surf_usm_v(l)%ns
+             IF ( surf_usm_v(l)%z0(m) >= surf_usm_v(l)%z_mo(m) )  THEN
+          
+                surf_usm_v(l)%z0(m) = 0.9_wp * surf_usm_v(l)%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0 exceeds surface-layer height '//&
+                            'at vertical urban surface and is ' //             &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff,             &
+                            surf_usm_v(l)%j(m)+surf_usm_v(l)%joff
+                CALL message( 'urban_surface_model_mod', 'PA0503',             &
+                            0, 0, 0, 6, 0 )
+             ENDIF
+             IF ( surf_usm_v(l)%z0h(m) >= surf_usm_v(l)%z_mo(m) )  THEN
+          
+                surf_usm_v(l)%z0h(m) = 0.9_wp * surf_usm_v(l)%z_mo(m)
+                surf_usm_v(l)%z0q(m) = 0.9_wp * surf_usm_v(l)%z_mo(m)
+             
+                WRITE( message_string, * ) 'z0h exceeds surface-layer height '//&
+                            'at vertical urban surface and is ' //             &
+                            'decreased appropriately at grid point (i,j) = ',  &
+                            surf_usm_v(l)%i(m)+surf_usm_v(l)%ioff,             &
+                            surf_usm_v(l)%j(m)+surf_usm_v(l)%joff
+                CALL message( 'urban_surface_model_mod', 'PA0507',             &
+                            0, 0, 0, 6, 0 )
+             ENDIF
+          ENDDO
+       ENDDO    
+
+!--     Intitialization of the surface and wall/ground/roof temperature
+
+!--     Initialization for restart runs
+        IF ( TRIM( initializing_actions ) /= 'read_restart_data'  .AND.        &
+             TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
+
+!
+!--         At horizontal surfaces. Please note, t_surf_wall_h is defined on a 
+!--         different data type, but with the same dimension.
+#if ! defined( __nopointer )
+            DO  m = 1, surf_usm_h%ns
+               i = surf_usm_h%i(m)            
+               j = surf_usm_h%j(m)
+               k = surf_usm_h%k(m)
+
+               t_surf_wall_h(m) = pt(k,j,i) * exner(k)
+               t_surf_window_h(m) = pt(k,j,i) * exner(k)
+               t_surf_green_h(m) = pt(k,j,i) * exner(k)
+               surf_usm_h%pt_surface(m) = pt(k,j,i) * exner(k)
+            ENDDO
+!
+!--         At vertical surfaces.
+            DO  l = 0, 3
+               DO  m = 1, surf_usm_v(l)%ns
+                  i = surf_usm_v(l)%i(m)            
+                  j = surf_usm_v(l)%j(m)
+                  k = surf_usm_v(l)%k(m)
+
+                  t_surf_wall_v(l)%t(m) = pt(k,j,i) * exner(k)
+                  t_surf_window_v(l)%t(m) = pt(k,j,i) * exner(k)
+                  t_surf_green_v(l)%t(m) = pt(k,j,i) * exner(k)
+                  surf_usm_v(l)%pt_surface(m) = pt(k,j,i) * exner(k)
+               ENDDO
+            ENDDO
+#endif
+!
+!--         For the sake of correct initialization, set also q_surface. 
+!--         Note, at urban surfaces q_surface is initialized with 0.
+            IF ( humidity )  THEN
+               DO  m = 1, surf_usm_h%ns
+                  surf_usm_h%q_surface(m) = 0.0_wp
+               ENDDO
+               DO  l = 0, 3
+                  DO  m = 1, surf_usm_v(l)%ns
+                     surf_usm_v(l)%q_surface(m) = 0.0_wp
+                  ENDDO
+               ENDDO
+            ENDIF
+      
+!--         initial values for t_wall
+!--         outer value is set to surface temperature
+!--         inner value is set to wall_inner_temperature
+!--         and profile is logaritmic (linear in nz).
+!--         Horizontal surfaces
+            DO  m = 1, surf_usm_h%ns
+!
+!--            Roof
+               IF ( surf_usm_h%isroof_surf(m) )  THEN
+                   tin = roof_inner_temperature
+                   twin = window_inner_temperature
+!
+!--            Normal land surface
+               ELSE 
+                   tin = soil_inner_temperature
+                   twin = window_inner_temperature
+               ENDIF
+
+               DO k = nzb_wall, nzt_wall+1
+                   c = REAL( k - nzb_wall, wp ) /                              &
+                       REAL( nzt_wall + 1 - nzb_wall , wp )
+
+                   t_wall_h(k,m) = ( 1.0_wp - c ) * t_surf_wall_h(m) + c * tin
+                   t_window_h(k,m) = ( 1.0_wp - c ) * t_surf_window_h(m) + c * twin
+                   t_green_h(k,m) = t_surf_wall_h(m)
+                   swc_h(k,m) = 0.5_wp
+                   swc_sat_h(k,m) = 0.95_wp
+                   swc_res_h(k,m) = 0.05_wp
+                   rootfr_h(k,m) = 0.1_wp
+                   wilt_h(k,m) = 0.1_wp
+                   fc_h(k,m) = 0.9_wp
+               ENDDO
+            ENDDO
+!
+!--         Vertical surfaces
+            DO  l = 0, 3
+               DO  m = 1, surf_usm_v(l)%ns
+!
+!--               Inner wall
+                  tin = wall_inner_temperature
+                  twin = window_inner_temperature
+
+                  DO k = nzb_wall, nzt_wall+1
+                     c = REAL( k - nzb_wall, wp ) /                            &
+                         REAL( nzt_wall + 1 - nzb_wall , wp )
+                     t_wall_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_wall_v(l)%t(m) + c * tin
+                     t_window_v(l)%t(k,m) = ( 1.0_wp - c ) * t_surf_window_v(l)%t(m) + c * twin
+                     t_green_v(l)%t(k,m) = t_surf_wall_v(l)%t(m)
+                     swc_v(l)%t(k,m) = 0.5_wp
+                  ENDDO
+               ENDDO
+            ENDDO
+        ENDIF
+
+!--     If specified, replace constant wall temperatures with fully 3D values from file
+        IF ( read_wall_temp_3d )  CALL usm_read_wall_temperature()
+
+!--
+!--     Possibly DO user-defined actions (e.g. define heterogeneous wall surface)
+        CALL user_init_urban_surface
+
+!--     initialize prognostic values for the first timestep
+        t_surf_wall_h_p = t_surf_wall_h
+        t_surf_wall_v_p = t_surf_wall_v
+        t_surf_window_h_p = t_surf_window_h
+        t_surf_window_v_p = t_surf_window_v
+        t_surf_green_h_p = t_surf_green_h
+        t_surf_green_v_p = t_surf_green_v
+        t_surf_10cm_h_p = t_surf_10cm_h
+        t_surf_10cm_v_p = t_surf_10cm_v
+
+        t_wall_h_p = t_wall_h
+        t_wall_v_p = t_wall_v
+        t_window_h_p = t_window_h
+        t_window_v_p = t_window_v
+        t_green_h_p = t_green_h
+        t_green_v_p = t_green_v
+
+!--     Adjust radiative fluxes for urban surface at model start
+        !CALL radiation_interaction
+!--     TODO: interaction should be called once before first output,
+!--     that is not yet possible.
+        
+        m_liq_usm_h_p     = m_liq_usm_h
+        m_liq_usm_v_p     = m_liq_usm_v
+!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+!
+!--    Set initial values for prognostic quantities
+!--    Horizontal surfaces
+       tm_liq_usm_h_m%var_usm_1d  = 0.0_wp
+       surf_usm_h%c_liq = 0.0_wp
+
+       surf_usm_h%qsws_liq_eb  = 0.0_wp
+       surf_usm_h%qsws_veg_eb  = 0.0_wp
+
+!
+!--    Do the same for vertical surfaces
+       DO  l = 0, 3
+          tm_liq_usm_v_m(l)%var_usm_1d  = 0.0_wp
+          surf_usm_v(l)%c_liq = 0.0_wp
+
+          surf_usm_v(l)%qsws_liq_eb  = 0.0_wp
+          surf_usm_v(l)%qsws_veg_eb  = 0.0_wp
+       ENDDO
+
+!
+!--    Set initial values for prognostic soil quantities
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
+          m_liq_usm_h%var_usm_1d  = 0.0_wp
+
+          DO  l = 0, 3
+             m_liq_usm_v(l)%var_usm_1d  = 0.0_wp
+          ENDDO
+       ENDIF
+!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++        
+
+        CALL cpu_log( log_point_s(78), 'usm_init', 'stop' )
+
+    END SUBROUTINE usm_init_urban_surface
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> Wall model as part of the urban surface model. The model predicts wall
+!> temperature.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_material_heat_model( spinup )
+
+
+        IMPLICIT NONE
+
+        INTEGER(iwp) ::  i,j,k,l,kw, m                      !< running indices
+
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wtend, wintend  !< tendency
+        REAL(wp)     :: win_absorp !absorption coefficient from transmissivity
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: wall_mod
+
+        LOGICAL      :: spinup !if true, no calculation of window temperatures
+
+        wall_mod=1.0_wp
+        if (usm_wall_mod .AND. spinup) then
+          do kw=nzb_wall,nzb_wall+1
+            wall_mod(kw)=0.1_wp
+          enddo
+        endif
+
+!
+!--     For horizontal surfaces                                   
+        DO  m = 1, surf_usm_h%ns
+!
+!--        Obtain indices
+           i = surf_usm_h%i(m)            
+           j = surf_usm_h%j(m)
+           k = surf_usm_h%k(m)
+!
+!--        prognostic equation for ground/roof temperature t_wall_h
+           wtend(:) = 0.0_wp
+           wtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzb_wall,m)) *        &
+                                       ( surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall) *        &
+                                         ( t_wall_h(nzb_wall+1,m)                  &
+                                         - t_wall_h(nzb_wall,m) ) *                &
+                                         surf_usm_h%ddz_wall(nzb_wall+1,m)         &
+                                       + surf_usm_h%frac(ind_veg_wall,m)           &
+                                         / (surf_usm_h%frac(ind_veg_wall,m)        &
+                                           + surf_usm_h%frac(ind_pav_green,m) )    &
+                                         * surf_usm_h%wghf_eb(m)                   &
+                                       - surf_usm_h%frac(ind_pav_green,m)          &
+                                          / (surf_usm_h%frac(ind_veg_wall,m)       &
+                                            + surf_usm_h%frac(ind_pav_green,m) )   &
+                                         * ( surf_usm_h%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) &
+                                           * surf_usm_h%ddz_green(nzt_wall,m)      &
+                                           + surf_usm_h%lambda_h(nzb_wall,m) * wall_mod(nzb_wall)        &
+                                           * surf_usm_h%ddz_wall(nzb_wall,m) )     &
+                                         / ( surf_usm_h%ddz_green(nzt_wall,m)      &
+                                           + surf_usm_h%ddz_wall(nzb_wall,m) )     &
+                                         * ( t_wall_h(nzb_wall,m)                  &
+                                           - t_green_h(nzt_wall,m) ) ) *           &
+                                       surf_usm_h%ddz_wall_stag(nzb_wall,m)
+
+           IF ( indoor_model ) then 
+              DO  kw = nzb_wall+1, nzt_wall-1
+                  wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m))              &
+                                 * (   surf_usm_h%lambda_h(kw,m) * wall_mod(kw)                 &
+                                    * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) )       &
+                                    * surf_usm_h%ddz_wall(kw+1,m)                 &
+                                 - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1)                     &
+                                    * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) )       &
+                                    * surf_usm_h%ddz_wall(kw,m)                   &
+                                   ) * surf_usm_h%ddz_wall_stag(kw,m)
+              ENDDO
+              wtend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_wall(nzt_wall,m)) *    &
+                                         ( -surf_usm_h%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1) *     &
+                                           ( t_wall_h(nzt_wall,m)                 &
+                                           - t_wall_h(nzt_wall-1,m) ) *           &
+                                           surf_usm_h%ddz_wall(nzt_wall,m)        &
+                                         + surf_usm_h%iwghf_eb(m) ) *             &
+                                           surf_usm_h%ddz_wall_stag(nzt_wall,m)
+           ELSE
+              DO  kw = nzb_wall+1, nzt_wall
+                  wtend(kw) = (1.0_wp / surf_usm_h%rho_c_wall(kw,m))              &
+                                 * (   surf_usm_h%lambda_h(kw,m)  * wall_mod(kw)                &
+                                    * ( t_wall_h(kw+1,m) - t_wall_h(kw,m) )       &
+                                    * surf_usm_h%ddz_wall(kw+1,m)                 &
+                                 - surf_usm_h%lambda_h(kw-1,m) * wall_mod(kw-1)                   &
+                                    * ( t_wall_h(kw,m) - t_wall_h(kw-1,m) )       &
+                                    * surf_usm_h%ddz_wall(kw,m)                   &
+                                   ) * surf_usm_h%ddz_wall_stag(kw,m)
+              ENDDO
+           ENDIF
+
+           t_wall_h_p(nzb_wall:nzt_wall,m) = t_wall_h(nzb_wall:nzt_wall,m)     &
+                                 + dt_3d * ( tsc(2)                            &
+                                 * wtend(nzb_wall:nzt_wall) + tsc(3)           &
+                                 * surf_usm_h%tt_wall_m(nzb_wall:nzt_wall,m) )   
+
+if (.NOT. spinup) then
+           win_absorp = -log(surf_usm_h%transmissivity(m)) / surf_usm_h%zw_window(nzt_wall,m)
+!--        prognostic equation for ground/roof window temperature t_window_h
+           wintend(:) = 0.0_wp
+           wintend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzb_wall,m)) *   &
+                                      ( surf_usm_h%lambda_h_window(nzb_wall,m) *  &
+                                        ( t_window_h(nzb_wall+1,m)                &
+                                        - t_window_h(nzb_wall,m) ) *              &
+                                        surf_usm_h%ddz_window(nzb_wall+1,m)       &
+                                      + surf_usm_h%wghf_eb_window(m)              &
+                                      + surf_usm_h%rad_sw_in(m)                   &
+                                        * (1.0_wp - exp(-win_absorp               &
+                                        * surf_usm_h%zw_window(nzb_wall,m) ) )    &
+                                      ) * surf_usm_h%ddz_window_stag(nzb_wall,m)
+
+           IF ( indoor_model ) then 
+              DO  kw = nzb_wall+1, nzt_wall-1
+                  wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m))          &
+                                 * (   surf_usm_h%lambda_h_window(kw,m)           &
+                                    * ( t_window_h(kw+1,m) - t_window_h(kw,m) )   &
+                                    * surf_usm_h%ddz_window(kw+1,m)               &
+                                 - surf_usm_h%lambda_h_window(kw-1,m)             &
+                                    * ( t_window_h(kw,m) - t_window_h(kw-1,m) )   &
+                                    * surf_usm_h%ddz_window(kw,m)                 &
+                                 + surf_usm_h%rad_sw_in(m)                        &
+                                    * (exp(-win_absorp                            &
+                                        * surf_usm_h%zw_window(kw-1,m) )          &
+                                        - exp(-win_absorp                         &
+                                        * surf_usm_h%zw_window(kw,m) ) )          &
+                                   ) * surf_usm_h%ddz_window_stag(kw,m)
+
+              ENDDO
+              wintend(nzt_wall) = (1.0_wp / surf_usm_h%rho_c_window(nzt_wall,m)) *       &
+                                         ( -surf_usm_h%lambda_h_window(nzt_wall-1,m) *   &
+                                           ( t_window_h(nzt_wall,m)                      &
+                                           - t_window_h(nzt_wall-1,m) ) *                &
+                                           surf_usm_h%ddz_window(nzt_wall,m)             &
+                                         + surf_usm_h%iwghf_eb_window(m)                 &
+                                         + surf_usm_h%rad_sw_in(m)                       &
+                                           * (exp(-win_absorp                            &
+                                           * surf_usm_h%zw_window(nzt_wall-1,m) )        &
+                                           - exp(-win_absorp                             &
+                                           * surf_usm_h%zw_window(nzt_wall,m) ) )        &
+                                         ) * surf_usm_h%ddz_window_stag(nzt_wall,m)
+           ELSE
+              DO  kw = nzb_wall+1, nzt_wall
+                  wintend(kw) = (1.0_wp / surf_usm_h%rho_c_window(kw,m))          &
+                                 * (   surf_usm_h%lambda_h_window(kw,m)           &
+                                    * ( t_window_h(kw+1,m) - t_window_h(kw,m) )   &
+                                    * surf_usm_h%ddz_window(kw+1,m)               &
+                                 - surf_usm_h%lambda_h_window(kw-1,m)             &
+                                    * ( t_window_h(kw,m) - t_window_h(kw-1,m) )   &
+                                    * surf_usm_h%ddz_window(kw,m)                 &
+                                 + surf_usm_h%rad_sw_in(m)                        &
+                                    * (exp(-win_absorp                            &
+                                        * surf_usm_h%zw_window(kw-1,m) )          &
+                                        - exp(-win_absorp                         &
+                                        * surf_usm_h%zw_window(kw,m) ) )          &
+                                   ) * surf_usm_h%ddz_window_stag(kw,m)
+
+              ENDDO
+           ENDIF
+
+           t_window_h_p(nzb_wall:nzt_wall,m) = t_window_h(nzb_wall:nzt_wall,m)    &
+                                 + dt_3d * ( tsc(2)                               &
+                                 * wintend(nzb_wall:nzt_wall) + tsc(3)            &
+                                 * surf_usm_h%tt_window_m(nzb_wall:nzt_wall,m) )   
+
+endif
+
+!
+!--        calculate t_wall tendencies for the next Runge-Kutta step
+           IF ( timestep_scheme(1:5) == 'runge' )  THEN
+               IF ( intermediate_timestep_count == 1 )  THEN
+                  DO  kw = nzb_wall, nzt_wall
+                     surf_usm_h%tt_wall_m(kw,m) = wtend(kw)
+                  ENDDO
+               ELSEIF ( intermediate_timestep_count <                          &
+                        intermediate_timestep_count_max )  THEN
+                   DO  kw = nzb_wall, nzt_wall
+                      surf_usm_h%tt_wall_m(kw,m) = -9.5625_wp * wtend(kw) +    &
+                                         5.3125_wp * surf_usm_h%tt_wall_m(kw,m)
+                   ENDDO
+               ENDIF
+           ENDIF
+
+if (.NOT. spinup) then
+!--        calculate t_window tendencies for the next Runge-Kutta step
+           IF ( timestep_scheme(1:5) == 'runge' )  THEN
+               IF ( intermediate_timestep_count == 1 )  THEN
+                  DO  kw = nzb_wall, nzt_wall
+                     surf_usm_h%tt_window_m(kw,m) = wintend(kw)
+                  ENDDO
+               ELSEIF ( intermediate_timestep_count <                          &
+                        intermediate_timestep_count_max )  THEN
+                   DO  kw = nzb_wall, nzt_wall
+                      surf_usm_h%tt_window_m(kw,m) = -9.5625_wp * wintend(kw) +    &
+                                         5.3125_wp * surf_usm_h%tt_window_m(kw,m)
+                   ENDDO
+               ENDIF
+           ENDIF
+
+endif
+
+        ENDDO
+
+!
+!--     For vertical surfaces     
+        DO  l = 0, 3                              
+           DO  m = 1, surf_usm_v(l)%ns
+!
+!--           Obtain indices
+              i = surf_usm_v(l)%i(m)            
+              j = surf_usm_v(l)%j(m)
+              k = surf_usm_v(l)%k(m)
+!
+!--           prognostic equation for wall temperature t_wall_v
+              wtend(:) = 0.0_wp
+
+               wtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzb_wall,m)) *    &
+                                       ( surf_usm_v(l)%lambda_h(nzb_wall,m) * wall_mod(nzb_wall)  *      &
+                                         ( t_wall_v(l)%t(nzb_wall+1,m)                &
+                                         - t_wall_v(l)%t(nzb_wall,m) ) *              &
+                                         surf_usm_v(l)%ddz_wall(nzb_wall+1,m)         &
+                                       + surf_usm_v(l)%frac(ind_veg_wall,m)           &
+                                         / (surf_usm_v(l)%frac(ind_veg_wall,m)        &
+                                           + surf_usm_v(l)%frac(ind_pav_green,m) )    &
+                                         * surf_usm_v(l)%wghf_eb(m)                   &
+                                       - surf_usm_v(l)%frac(ind_pav_green,m)          &
+                                         / (surf_usm_v(l)%frac(ind_veg_wall,m)        &
+                                           + surf_usm_v(l)%frac(ind_pav_green,m) )    &
+                                         * ( surf_usm_v(l)%lambda_h_green(nzt_wall,m)* wall_mod(nzt_wall) &
+                                           * surf_usm_v(l)%ddz_green(nzt_wall,m)      &
+                                           + surf_usm_v(l)%lambda_h(nzb_wall,m)* wall_mod(nzb_wall)       &
+                                           * surf_usm_v(l)%ddz_wall(nzb_wall,m) )     &
+                                         / ( surf_usm_v(l)%ddz_green(nzt_wall,m)      &
+                                           + surf_usm_v(l)%ddz_wall(nzb_wall,m) )     &
+                                         * ( t_wall_v(l)%t(nzb_wall,m)                &
+                                           - t_green_v(l)%t(nzt_wall,m) ) ) *         &
+                                         surf_usm_v(l)%ddz_wall_stag(nzb_wall,m)
+
+              IF ( indoor_model ) then 
+                 DO  kw = nzb_wall+1, nzt_wall-1
+                     wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m))        &
+                              * (   surf_usm_v(l)%lambda_h(kw,m)  * wall_mod(kw)                &
+                                 * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )&
+                                 * surf_usm_v(l)%ddz_wall(kw+1,m)                 &
+                              - surf_usm_v(l)%lambda_h(kw-1,m)  * wall_mod(kw-1)                  &
+                                 * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )&
+                                 * surf_usm_v(l)%ddz_wall(kw,m)                   &
+                                 ) * surf_usm_v(l)%ddz_wall_stag(kw,m)
+                 ENDDO
+                 wtend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_wall(nzt_wall,m)) * &
+                                         ( -surf_usm_v(l)%lambda_h(nzt_wall-1,m) * wall_mod(nzt_wall-1)*    &
+                                           ( t_wall_v(l)%t(nzt_wall,m)               &
+                                           - t_wall_v(l)%t(nzt_wall-1,m) ) *         &
+                                           surf_usm_v(l)%ddz_wall(nzt_wall,m)        &
+                                         + surf_usm_v(l)%iwghf_eb(m) ) *             &
+                                           surf_usm_v(l)%ddz_wall_stag(nzt_wall,m)
+              ELSE
+                 DO  kw = nzb_wall+1, nzt_wall
+                     wtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_wall(kw,m))        &
+                              * (   surf_usm_v(l)%lambda_h(kw,m) * wall_mod(kw)                 &
+                                 * ( t_wall_v(l)%t(kw+1,m) - t_wall_v(l)%t(kw,m) )&
+                                 * surf_usm_v(l)%ddz_wall(kw+1,m)                 &
+                              - surf_usm_v(l)%lambda_h(kw-1,m)  * wall_mod(kw-1)                  &
+                                 * ( t_wall_v(l)%t(kw,m) - t_wall_v(l)%t(kw-1,m) )&
+                                 * surf_usm_v(l)%ddz_wall(kw,m)                   &
+                                 ) * surf_usm_v(l)%ddz_wall_stag(kw,m)
+                 ENDDO
+              ENDIF
+
+              t_wall_v_p(l)%t(nzb_wall:nzt_wall,m) =                           &
+                                   t_wall_v(l)%t(nzb_wall:nzt_wall,m)          &
+                                 + dt_3d * ( tsc(2)                            &
+                                 * wtend(nzb_wall:nzt_wall) + tsc(3)           &
+                                 * surf_usm_v(l)%tt_wall_m(nzb_wall:nzt_wall,m) )   
+
+if (.NOT. spinup) then
+              win_absorp = -log(surf_usm_v(l)%transmissivity(m)) / surf_usm_v(l)%zw_window(nzt_wall,m)
+!--           prognostic equation for window temperature t_window_v
+              wintend(:) = 0.0_wp
+              wintend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzb_wall,m)) * &
+                                      ( surf_usm_v(l)%lambda_h_window(nzb_wall,m) *   &
+                                        ( t_window_v(l)%t(nzb_wall+1,m)               &
+                                        - t_window_v(l)%t(nzb_wall,m) ) *             &
+                                        surf_usm_v(l)%ddz_window(nzb_wall+1,m)        &
+                                      + surf_usm_v(l)%wghf_eb_window(m)               &
+                                      + surf_usm_v(l)%rad_sw_in(m)                    &
+                                        * (1.0_wp - exp(-win_absorp                   &
+                                        * surf_usm_v(l)%zw_window(nzb_wall,m) ) )     &
+                                      ) * surf_usm_v(l)%ddz_window_stag(nzb_wall,m)
+
+              IF ( indoor_model ) then 
+                 DO  kw = nzb_wall+1, nzt_wall -1
+                     wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m))         &
+                              * (   surf_usm_v(l)%lambda_h_window(kw,m)                &
+                                 * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) &
+                                 * surf_usm_v(l)%ddz_window(kw+1,m)                    &
+                              - surf_usm_v(l)%lambda_h_window(kw-1,m)                  &
+                                 * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) &
+                                 * surf_usm_v(l)%ddz_window(kw,m)                      &
+                              + surf_usm_v(l)%rad_sw_in(m)                             &
+                                 * (exp(-win_absorp                                    &
+                                    * surf_usm_v(l)%zw_window(kw-1,m)       )          &
+                                        - exp(-win_absorp                              &
+                                        * surf_usm_v(l)%zw_window(kw,m) ) )            &
+                                 ) * surf_usm_v(l)%ddz_window_stag(kw,m)
+                  ENDDO
+                  wintend(nzt_wall) = (1.0_wp / surf_usm_v(l)%rho_c_window(nzt_wall,m)) *  &
+                                          ( -surf_usm_v(l)%lambda_h_window(nzt_wall-1,m) * &
+                                            ( t_window_v(l)%t(nzt_wall,m)                  &
+                                            - t_window_v(l)%t(nzt_wall-1,m) ) *            &
+                                            surf_usm_v(l)%ddz_window(nzt_wall,m)           &
+                                          + surf_usm_v(l)%iwghf_eb_window(m)               &
+                                          + surf_usm_v(l)%rad_sw_in(m)                     &
+                                            * (exp(-win_absorp                             &
+                                          * surf_usm_v(l)%zw_window(nzt_wall-1,m) )        &
+                                        - exp(-win_absorp                                  &
+                                            * surf_usm_v(l)%zw_window(nzt_wall,m) ) )      &
+                                          ) * surf_usm_v(l)%ddz_window_stag(nzt_wall,m)
+              ELSE
+                 DO  kw = nzb_wall+1, nzt_wall
+                     wintend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_window(kw,m))         &
+                              * (   surf_usm_v(l)%lambda_h_window(kw,m)                &
+                                 * ( t_window_v(l)%t(kw+1,m) - t_window_v(l)%t(kw,m) ) &
+                                 * surf_usm_v(l)%ddz_window(kw+1,m)                    &
+                              - surf_usm_v(l)%lambda_h_window(kw-1,m)                  &
+                                 * ( t_window_v(l)%t(kw,m) - t_window_v(l)%t(kw-1,m) ) &
+                                 * surf_usm_v(l)%ddz_window(kw,m)                      &
+                              + surf_usm_v(l)%rad_sw_in(m)                             &
+                                 * (exp(-win_absorp                                    &
+                                    * surf_usm_v(l)%zw_window(kw-1,m)       )          &
+                                        - exp(-win_absorp                              &
+                                        * surf_usm_v(l)%zw_window(kw,m) ) )            &
+                                 ) * surf_usm_v(l)%ddz_window_stag(kw,m)
+                 ENDDO
+              ENDIF
+
+              t_window_v_p(l)%t(nzb_wall:nzt_wall,m) =                           &
+                                   t_window_v(l)%t(nzb_wall:nzt_wall,m)          &
+                                 + dt_3d * ( tsc(2)                              &
+                                 * wintend(nzb_wall:nzt_wall) + tsc(3)           &
+                                 * surf_usm_v(l)%tt_window_m(nzb_wall:nzt_wall,m) )   
+endif
+
+!
+!--           calculate t_wall tendencies for the next Runge-Kutta step
+              IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                  IF ( intermediate_timestep_count == 1 )  THEN
+                     DO  kw = nzb_wall, nzt_wall
+                        surf_usm_v(l)%tt_wall_m(kw,m) = wtend(kw)
+                     ENDDO
+                  ELSEIF ( intermediate_timestep_count <                       &
+                           intermediate_timestep_count_max )  THEN
+                      DO  kw = nzb_wall, nzt_wall
+                         surf_usm_v(l)%tt_wall_m(kw,m) =                       &
+                                     - 9.5625_wp * wtend(kw) +                 &
+                                       5.3125_wp * surf_usm_v(l)%tt_wall_m(kw,m)
+                      ENDDO
+                  ENDIF
+              ENDIF
+
+
+if (.NOT. spinup) then
+!--           calculate t_window tendencies for the next Runge-Kutta step
+              IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                  IF ( intermediate_timestep_count == 1 )  THEN
+                     DO  kw = nzb_wall, nzt_wall
+                        surf_usm_v(l)%tt_window_m(kw,m) = wintend(kw)
+                     ENDDO
+                  ELSEIF ( intermediate_timestep_count <                       &
+                           intermediate_timestep_count_max )  THEN
+                      DO  kw = nzb_wall, nzt_wall
+                         surf_usm_v(l)%tt_window_m(kw,m) =                     &
+                                     - 9.5625_wp * wintend(kw) +               &
+                                       5.3125_wp * surf_usm_v(l)%tt_window_m(kw,m)
+                      ENDDO
+                  ENDIF
+              ENDIF
+endif
+
+           ENDDO
+        ENDDO
+
+    END SUBROUTINE usm_material_heat_model
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> Green and substrate model as part of the urban surface model. The model predicts ground
+!> temperatures.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_green_heat_model
+
+
+        IMPLICIT NONE
+
+        INTEGER(iwp) ::  i,j,k,l,kw, m                      !< running indices
+
+        REAL(wp)     :: ke, lambda_h_green_sat
+        REAL(wp)     :: h_vg !< Van Genuchten coef. h
+        REAL(wp)     :: drho_l_lv
+
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: gtend,tend  !< tendency
+
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall) :: root_extr_green
+
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: lambda_green_temp !< temp. lambda
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall+1) :: gamma_green_temp !< temp. gamma
+
+        LOGICAL :: conserve_water_content = .true.
+
+
+        drho_l_lv = 1.0_wp / (rho_l * l_v)
+
+!
+!--     For horizontal surfaces                                   
+        DO  m = 1, surf_usm_h%ns
+
+if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then
+!
+!--        Obtain indices
+           i = surf_usm_h%i(m)            
+           j = surf_usm_h%j(m)
+           k = surf_usm_h%k(m)
+
+           DO  kw = nzb_wall, nzt_wall
+!
+!--           Calculate volumetric heat capacity of the soil, taking 
+!--           into account water content 
+              surf_usm_h%rho_c_total_green(kw,m) = (surf_usm_h%rho_c_green(kw,m) * (1.0_wp - swc_sat_h(kw,m)) &
+                                   + rho_c_water * swc_h(kw,m))
+   
+!
+!--           Calculate soil heat conductivity at the center of the soil
+!--           layers
+              lambda_h_green_sat = lambda_h_green_sm ** (1.0_wp - swc_sat_h(kw,m)) *    &
+                             lambda_h_water ** swc_h(kw,m)
+   
+              ke = 1.0_wp + LOG10(MAX(0.1_wp,swc_h(kw,m)             &
+                   / swc_sat_h(kw,m)))
+   
+              lambda_green_temp(kw) = ke * (lambda_h_green_sat - lambda_h_green_dry) +    &
+                               lambda_h_green_dry
+
+           ENDDO
+
+
+!
+!--        Calculate soil heat conductivity (lambda_h) at the _stag level 
+!--        using linear interpolation. For pavement surface, the
+!--        true pavement depth is considered
+           DO  kw = nzb_wall, nzt_wall
+             surf_usm_h%lambda_h_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) )  &
+                                   * 0.5_wp
+           ENDDO
+!           surf_usm_h%lambda_h_green(nzt_wall+1,m) = lambda_green_temp(nzt_wall+1)           
+!--------------------------------------------------------------------------
+           
+           t_green_h(nzt_wall+1,m) = t_wall_h(nzb_wall,m)
+!
+!--        prognostic equation for ground/roof temperature t_green_h
+           gtend(:) = 0.0_wp
+           gtend(nzb_wall) = (1.0_wp / surf_usm_h%rho_c_total_green(nzb_wall,m)) *    &
+                                      ( surf_usm_h%lambda_h_green(nzb_wall,m) * &
+                                        ( t_green_h(nzb_wall+1,m)               &
+                                        - t_green_h(nzb_wall,m) ) *             &
+                                        surf_usm_h%ddz_green(nzb_wall+1,m)      &
+                                      + surf_usm_h%wghf_eb_green(m) ) *         &
+                                        surf_usm_h%ddz_green_stag(nzb_wall,m)
+           
+            DO  kw = nzb_wall+1, nzt_wall
+                gtend(kw) = (1.0_wp / surf_usm_h%rho_c_total_green(kw,m))             &
+                               * (   surf_usm_h%lambda_h_green(kw,m)            &
+                                  * ( t_green_h(kw+1,m) - t_green_h(kw,m) )     &
+                                  * surf_usm_h%ddz_green(kw+1,m)                &
+                               - surf_usm_h%lambda_h_green(kw-1,m)              &
+                                  * ( t_green_h(kw,m) - t_green_h(kw-1,m) )     &
+                                  * surf_usm_h%ddz_green(kw,m)                  &
+                                 ) * surf_usm_h%ddz_green_stag(kw,m)
+            ENDDO
+
+           t_green_h_p(nzb_wall:nzt_wall,m) = t_green_h(nzb_wall:nzt_wall,m)    &
+                                 + dt_3d * ( tsc(2)                             &
+                                 * gtend(nzb_wall:nzt_wall) + tsc(3)            &
+                                 * surf_usm_h%tt_green_m(nzb_wall:nzt_wall,m) )   
+
+          
+!
+!--        calculate t_green tendencies for the next Runge-Kutta step
+           IF ( timestep_scheme(1:5) == 'runge' )  THEN
+               IF ( intermediate_timestep_count == 1 )  THEN
+                  DO  kw = nzb_wall, nzt_wall
+                     surf_usm_h%tt_green_m(kw,m) = gtend(kw)
+                  ENDDO
+               ELSEIF ( intermediate_timestep_count <                           &
+                        intermediate_timestep_count_max )  THEN
+                   DO  kw = nzb_wall, nzt_wall
+                      surf_usm_h%tt_green_m(kw,m) = -9.5625_wp * gtend(kw) +    &
+                                         5.3125_wp * surf_usm_h%tt_green_m(kw,m)
+                   ENDDO
+               ENDIF
+           ENDIF
+
+!--------------------------------------------------------------
+                DO  kw = nzb_wall, nzt_wall
+
+!
+!--                Calculate soil diffusivity at the center of the soil layers
+                   lambda_green_temp(kw) = (- b_ch * surf_usm_h%gamma_w_green_sat(kw,m) * psi_sat       &
+                                     / swc_sat_h(kw,m) ) * ( MAX( swc_h(kw,m),    &
+                                     wilt_h(kw,m) ) / swc_sat_h(kw,m) )**(           &
+                                     b_ch + 2.0_wp )
+
+!
+!--                Parametrization of Van Genuchten
+                   IF ( soil_type /= 7 )  THEN
+!
+!--                   Calculate the hydraulic conductivity after Van Genuchten 
+!--                   (1980)
+                      h_vg = ( ( (swc_res_h(kw,m) - swc_sat_h(kw,m)) / ( swc_res_h(kw,m) -    &
+                                 MAX( swc_h(kw,m), wilt_h(kw,m) ) ) )**(      &
+                                 surf_usm_h%n_vg_green(m) / (surf_usm_h%n_vg_green(m) - 1.0_wp ) ) - 1.0_wp  &
+                             )**( 1.0_wp / surf_usm_h%n_vg_green(m) ) / surf_usm_h%alpha_vg_green(m)
+
+
+                      gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( ( (1.0_wp +         &
+                                      ( surf_usm_h%alpha_vg_green(m) * h_vg )**surf_usm_h%n_vg_green(m))**(  &
+                                      1.0_wp - 1.0_wp / surf_usm_h%n_vg_green(m) ) - (        &
+                                      surf_usm_h%alpha_vg_green(m) * h_vg )**( surf_usm_h%n_vg_green(m)      &
+                                      - 1.0_wp) )**2 )                         &
+                                      / ( ( 1.0_wp + ( surf_usm_h%alpha_vg_green(m) * h_vg    &
+                                      )**surf_usm_h%n_vg_green(m) )**( ( 1.0_wp  - 1.0_wp     &
+                                      / surf_usm_h%n_vg_green(m) ) *( surf_usm_h%l_vg_green(m) + 2.0_wp) ) )
+
+!
+!--                Parametrization of Clapp & Hornberger
+                   ELSE
+                      gamma_green_temp(kw) = surf_usm_h%gamma_w_green_sat(kw,m) * ( swc_h(kw,m)       &
+                                      / swc_sat_h(kw,m) )**(2.0_wp * b_ch + 3.0_wp)
+                   ENDIF
+
+                ENDDO
+
+!
+!--             Prognostic equation for soil moisture content. Only performed,
+!--             when humidity is enabled in the atmosphere
+                IF ( humidity )  THEN
+!
+!--                Calculate soil diffusivity (lambda_w) at the _stag level 
+!--                using linear interpolation. To do: replace this with
+!--                ECMWF-IFS Eq. 8.81
+                   DO  kw = nzb_wall, nzt_wall-1
+                     
+                      surf_usm_h%lambda_w_green(kw,m) = ( lambda_green_temp(kw+1) + lambda_green_temp(kw) )  &
+                                        * 0.5_wp
+                      surf_usm_h%gamma_w_green(kw,m)  = ( gamma_green_temp(kw+1) + gamma_green_temp(kw) )    &
+                                        * 0.5_wp
+
+                   ENDDO
+
+!
+!
+!--                In case of a closed bottom (= water content is conserved), 
+!--                set hydraulic conductivity to zero to that no water will be 
+!--                lost in the bottom layer.
+                   IF ( conserve_water_content )  THEN
+                      surf_usm_h%gamma_w_green(kw,m) = 0.0_wp
+                   ELSE
+                      surf_usm_h%gamma_w_green(kw,m) = gamma_green_temp(nzt_wall)
+                   ENDIF     
+
+!--                The root extraction (= root_extr * qsws_veg_eb / (rho_l     
+!--                * l_v)) ensures the mass conservation for water. The         
+!--                transpiration of plants equals the cumulative withdrawals by 
+!--                the roots in the soil. The scheme takes into account the 
+!--                availability of water in the soil layers as well as the root 
+!--                fraction in the respective layer. Layer with moisture below 
+!--                wilting point will not contribute, which reflects the 
+!--                preference of plants to take water from moister layers.
+
+!
+!--                Calculate the root extraction (ECMWF 7.69, the sum of 
+!--                root_extr = 1). The energy balance solver guarantees a 
+!--                positive transpiration, so that there is no need for an 
+!--                additional check.
+                   m_total = 0.0_wp
+                   DO  kw = nzb_wall, nzt_wall
+                       IF ( swc_h(kw,m) > wilt_h(kw,m) )  THEN
+                          m_total = m_total + rootfr_h(kw,m) * swc_h(kw,m)
+                       ENDIF
+                   ENDDO  
+
+                   IF ( m_total > 0.0_wp )  THEN
+                      DO  kw = nzb_wall, nzt_wall
+                         IF ( swc_h(kw,m) > wilt_h(kw,m) )  THEN
+                            root_extr_green(kw) = rootfr_h(kw,m) * swc_h(kw,m)      &
+                                                            / m_total
+                         ELSE
+                            root_extr_green(kw) = 0.0_wp
+                         ENDIF
+                      ENDDO
+                   ENDIF
+
+!
+!--                Prognostic equation for soil water content m_soil.
+                   tend(:) = 0.0_wp
+
+                   tend(nzb_wall) = ( surf_usm_h%lambda_w_green(nzb_wall,m) * (               &
+                            swc_h(nzb_wall+1,m) - swc_h(nzb_wall,m) )    &
+                            * surf_usm_h%ddz_green(nzb_wall+1,m) - surf_usm_h%gamma_w_green(nzb_wall,m) - ( &
+                               root_extr_green(nzb_wall) * surf_usm_h%qsws_veg_eb(m)          &
+!                                + surf_usm_h%qsws_soil_eb_green(m)
+                                  ) * drho_l_lv )             &
+                                 * surf_usm_h%ddz_green_stag(nzb_wall,m)
+
+                   DO  kw = nzb_wall+1, nzt_wall-1
+                      tend(kw) = ( surf_usm_h%lambda_w_green(kw,m) * ( swc_h(kw+1,m)          &
+                                - swc_h(kw,m) ) * surf_usm_h%ddz_green(kw+1,m)              &
+                                - surf_usm_h%gamma_w_green(kw,m)                               &
+                                - surf_usm_h%lambda_w_green(kw-1,m) * (swc_h(kw,m) -         &
+                                swc_h(kw-1,m)) * surf_usm_h%ddz_green(kw,m)                 &
+                                + surf_usm_h%gamma_w_green(kw-1,m) - (root_extr_green(kw)             &
+                                * surf_usm_h%qsws_veg_eb(m) * drho_l_lv)                &
+                                ) * surf_usm_h%ddz_green_stag(kw,m)
+
+                   ENDDO
+                   tend(nzt_wall) = ( - surf_usm_h%gamma_w_green(nzt_wall,m)                  &
+                                           - surf_usm_h%lambda_w_green(nzt_wall-1,m)          &
+                                           * (swc_h(nzt_wall,m)             &
+                                           - swc_h(nzt_wall-1,m))           &
+                                           * surf_usm_h%ddz_green(nzt_wall,m)                &
+                                           + surf_usm_h%gamma_w_green(nzt_wall-1,m) - (       &
+                                             root_extr_green(nzt_wall)               &
+                                           * surf_usm_h%qsws_veg_eb(m) * drho_l_lv  )   &
+                                     ) * surf_usm_h%ddz_green_stag(nzt_wall,m)             
+
+                   swc_h_p(nzb_wall:nzt_wall,m) = swc_h(nzb_wall:nzt_wall,m)&
+                                                   + dt_3d * ( tsc(2) * tend(:)   &
+                                                   + tsc(3) * surf_usm_h%tswc_h_m(:,m) )   
+   
+!
+!--                Account for dry soils (find a better solution here!)
+                   DO  kw = nzb_wall, nzt_wall
+                      IF ( swc_h_p(kw,m) < 0.0_wp )  swc_h_p(kw,m) = 0.0_wp
+                   ENDDO
+
+!
+!--                Calculate m_soil tendencies for the next Runge-Kutta step
+                   IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                      IF ( intermediate_timestep_count == 1 )  THEN
+                         DO  kw = nzb_wall, nzt_wall
+                            surf_usm_h%tswc_h_m(kw,m) = tend(kw)
+                         ENDDO
+                      ELSEIF ( intermediate_timestep_count <                   &
+                               intermediate_timestep_count_max )  THEN
+                         DO  kw = nzb_wall, nzt_wall
+                            surf_usm_h%tswc_h_m(kw,m) = -9.5625_wp * tend(kw) + 5.3125_wp&
+                                     * surf_usm_h%tswc_h_m(kw,m)
+                         ENDDO
+                      ENDIF
+                   ENDIF
+                ENDIF
+!--------------------------------------------------------------
+ENDIF
+           
+        ENDDO
+
+!
+!--     For vertical surfaces     
+        DO  l = 0, 3                              
+           DO  m = 1, surf_usm_v(l)%ns
+
+if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then
+  if (1.gt.2) then
+!
+!--           Obtain indices
+              i = surf_usm_v(l)%i(m)            
+              j = surf_usm_v(l)%j(m)
+              k = surf_usm_v(l)%k(m)
+
+              t_green_v(l)%t(nzt_wall+1,m) = t_wall_v(l)%t(nzb_wall,m)
+!
+!--           prognostic equation for green temperature t_green_v
+              gtend(:) = 0.0_wp
+              gtend(nzb_wall) = (1.0_wp / surf_usm_v(l)%rho_c_green(nzb_wall,m)) * &
+                                      ( surf_usm_v(l)%lambda_h_green(nzb_wall,m) * &
+                                        ( t_green_v(l)%t(nzb_wall+1,m)             &
+                                        - t_green_v(l)%t(nzb_wall,m) ) *           &
+                                        surf_usm_v(l)%ddz_green(nzb_wall+1,m)      &
+                                      + surf_usm_v(l)%wghf_eb(m) ) *               &
+                                        surf_usm_v(l)%ddz_green_stag(nzb_wall,m)
+            
+              DO  kw = nzb_wall+1, nzt_wall
+                 gtend(kw) = (1.0_wp / surf_usm_v(l)%rho_c_green(kw,m))          &
+                           * (   surf_usm_v(l)%lambda_h_green(kw,m)              &
+                             * ( t_green_v(l)%t(kw+1,m) - t_green_v(l)%t(kw,m) ) &
+                             * surf_usm_v(l)%ddz_green(kw+1,m)                   &
+                           - surf_usm_v(l)%lambda_h(kw-1,m)                      &
+                             * ( t_green_v(l)%t(kw,m) - t_green_v(l)%t(kw-1,m) ) &
+                             * surf_usm_v(l)%ddz_green(kw,m) )                   &
+                           * surf_usm_v(l)%ddz_green_stag(kw,m)
+              ENDDO
+
+              t_green_v_p(l)%t(nzb_wall:nzt_wall,m) =                              &
+                                   t_green_v(l)%t(nzb_wall:nzt_wall,m)             &
+                                 + dt_3d * ( tsc(2)                                &
+                                 * gtend(nzb_wall:nzt_wall) + tsc(3)               &
+                                 * surf_usm_v(l)%tt_green_m(nzb_wall:nzt_wall,m) )   
+
+!
+!--           calculate t_green tendencies for the next Runge-Kutta step
+              IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                  IF ( intermediate_timestep_count == 1 )  THEN
+                     DO  kw = nzb_wall, nzt_wall
+                        surf_usm_v(l)%tt_green_m(kw,m) = gtend(kw)
+                     ENDDO
+                  ELSEIF ( intermediate_timestep_count <                           &
+                           intermediate_timestep_count_max )  THEN
+                      DO  kw = nzb_wall, nzt_wall
+                         surf_usm_v(l)%tt_green_m(kw,m) =                          &
+                                     - 9.5625_wp * gtend(kw) +                     &
+                                       5.3125_wp * surf_usm_v(l)%tt_green_m(kw,m)
+                      ENDDO
+                  ENDIF
+              ENDIF
+endif
+
+DO  kw = nzb_wall, nzt_wall+1
+t_green_v(l)%t(kw,m) = t_wall_v(l)%t(nzb_wall,m)
+ENDDO
+              
+ENDIF
+
+           ENDDO
+        ENDDO
+
+    END SUBROUTINE usm_green_heat_model
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &usm_par for urban surface model
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_parin
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< string containing current line of file PARIN
+
+       NAMELIST /urban_surface_par/                                            &
+                           building_type,                                      &
+                           land_category,                                      &
+                           naheatlayers,                                       &
+                           pedestrian_category,                                &
+                           roughness_concrete,                                 &
+                           read_wall_temp_3d,                                  &
+                           roof_category,                                      &
+                           urban_surface,                                      &
+                           usm_anthropogenic_heat,                             &
+                           usm_material_model,                                 &
+                           wall_category,                                      &
+                           indoor_model,                                       &
+                           wall_inner_temperature,                             &
+                           roof_inner_temperature,                             &
+                           soil_inner_temperature,                             &
+                           window_inner_temperature,                           &
+                           usm_wall_mod
+
+       NAMELIST /urban_surface_parameters/                                     &
+                           building_type,                                      &
+                           land_category,                                      &
+                           naheatlayers,                                       &
+                           pedestrian_category,                                &
+                           roughness_concrete,                                 &
+                           read_wall_temp_3d,                                  &
+                           roof_category,                                      &
+                           urban_surface,                                      &
+                           usm_anthropogenic_heat,                             &
+                           usm_material_model,                                 &
+                           wall_category,                                      &
+                           indoor_model,                                       &
+                           wall_inner_temperature,                             &
+                           roof_inner_temperature,                             &
+                           soil_inner_temperature,                             &
+                           window_inner_temperature,                           &
+                           usm_wall_mod
+                           
+                           
+  
+!
+!--    Try to find urban surface model package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&urban_surface_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, urban_surface_parameters, ERR = 10 )
+
+!
+!--    Set flag that indicates that the urban surface model is switched on
+       urban_surface = .TRUE.
+
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'urban_surface_parameters', line )
+!
+!--    Try to find old namelist
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&urban_surface_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, urban_surface_par, ERR = 13, END = 14 )
+
+       message_string = 'namelist urban_surface_par is deprecated and will be ' // &
+                     'removed in near future. Please use namelist ' //   &
+                     'urban_surface_parameters instead'
+       CALL message( 'usm_parin', 'PA0487', 0, 1, 0, 6, 0 )
+
+!
+!--    Set flag that indicates that the urban surface model is switched on
+       urban_surface = .TRUE.
+
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'urban_surface_par', line )
+
+
+ 14    CONTINUE
+
+
+    END SUBROUTINE usm_parin
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculates temperature near surface (10 cm) for indoor model
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_temperature_near_surface
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)                          :: i, j, k, l, m   !< running indices
+
+!        
+!--    First, treat horizontal surface elements
+       DO  m = 1, surf_usm_h%ns
+
+!--       Get indices of respective grid point
+          i = surf_usm_h%i(m)
+          j = surf_usm_h%j(m)
+          k = surf_usm_h%k(m)
+
+          t_surf_10cm_h(m) = surf_usm_h%pt_surface(m) + surf_usm_h%ts(m) / kappa        &
+                             * ( log( 0.1_wp /  surf_usm_h%z0h(m) )              &
+                               - psi_h( 0.1_wp / surf_usm_h%ol(m) )              &
+                               + psi_h( surf_usm_h%z0h(m) / surf_usm_h%ol(m) ) )
+
+       ENDDO
+!
+!--    Now, treat vertical surface elements
+       DO  l = 0, 3
+          DO  m = 1, surf_usm_v(l)%ns
+
+!--          Get indices of respective grid point
+             i = surf_usm_v(l)%i(m)
+             j = surf_usm_v(l)%j(m)
+             k = surf_usm_v(l)%k(m)
+
+             t_surf_10cm_v(l)%t(m) =surf_usm_v(l)%pt_surface(m) + surf_usm_v(l)%ts(m) / kappa &
+                                     * ( log( 0.1_wp / surf_usm_v(l)%z0h(m) )             &
+                                       - psi_h( 0.1_wp / surf_usm_v(l)%ol(m) )            &
+                                       + psi_h( surf_usm_v(l)%z0h(m) / surf_usm_v(l)%ol(m) ) )
+
+          ENDDO
+
+       ENDDO
+
+
+    END SUBROUTINE usm_temperature_near_surface
+
+    
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> This subroutine is part of the urban surface model.
+!> It reads daily heat produced by anthropogenic sources
+!> and the diurnal cycle of the heat.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_read_anthropogenic_heat
+    
+        INTEGER(iwp)                  :: i,j,k,ii
+        REAL(wp)                      :: heat
+
+!--     allocation of array of sources of anthropogenic heat and their diural profile
+        ALLOCATE( aheat(naheatlayers,nys:nyn,nxl:nxr) )
+        ALLOCATE( aheatprof(naheatlayers,0:24) )
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!--     read daily amount of heat and its daily cycle
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        aheat = 0.0_wp
+        DO  ii = 0, io_blocks-1
+            IF ( ii == io_group )  THEN
+
+!--             open anthropogenic heat file 
+                OPEN( 151, file='ANTHROPOGENIC_HEAT'//TRIM(coupling_char), action='read', &
+                           status='old', form='formatted', err=11 )
+                i = 0
+                j = 0
+                DO
+                    READ( 151, *, err=12, end=13 )  i, j, k, heat
+                    IF ( i >= nxl  .AND.  i <= nxr  .AND.  j >= nys  .AND.  j <= nyn )  THEN
+                        IF ( k <= naheatlayers  .AND.  k > get_topography_top_index_ji( j, i, 's' ) )  THEN
+!--                         write heat into the array
+                            aheat(k,j,i) = heat
+                        ENDIF
+                    ENDIF
+                    CYCLE
+ 12                 WRITE(message_string,'(a,2i4)') 'error in file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' after line ',i,j
+                    CALL message( 'usm_read_anthropogenic_heat', 'PA0515', 0, 1, 0, 6, 0 )
+                ENDDO
+ 13             CLOSE(151)
+                CYCLE
+ 11             message_string = 'file ANTHROPOGENIC_HEAT'//TRIM(coupling_char)//' does not exist'
+                CALL message( 'usm_read_anthropogenic_heat', 'PA0516', 1, 2, 0, 6, 0 )
+            ENDIF
+            
+#if defined( __parallel )
+            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+        ENDDO
+        
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!--     read diurnal profiles of heat sources
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        aheatprof = 0.0_wp
+        DO  ii = 0, io_blocks-1
+            IF ( ii == io_group )  THEN
+
+!--             open anthropogenic heat profile file 
+                OPEN( 151, file='ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char), action='read', &
+                           status='old', form='formatted', err=21 )
+                i = 0
+                DO
+                    READ( 151, *, err=22, end=23 )  i, k, heat
+                    IF ( i >= 0  .AND.  i <= 24  .AND.  k <= naheatlayers )  THEN
+!--                     write heat into the array
+                        aheatprof(k,i) = heat
+                    ENDIF
+                    CYCLE
+ 22                 WRITE(message_string,'(a,i4)') 'error in file ANTHROPOGENIC_HEAT_PROFILE'// &
+                                                     TRIM(coupling_char)//' after line ',i
+                    CALL message( 'usm_read_anthropogenic_heat', 'PA0517', 0, 1, 0, 6, 0 )
+                ENDDO
+                aheatprof(:,24) = aheatprof(:,0)
+ 23             CLOSE(151)
+                CYCLE
+ 21             message_string = 'file ANTHROPOGENIC_HEAT_PROFILE'//TRIM(coupling_char)//' does not exist'
+                CALL message( 'usm_read_anthropogenic_heat', 'PA0518', 1, 2, 0, 6, 0 )
+            ENDIF
+            
+#if defined( __parallel )
+            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+        ENDDO
+        
+    END SUBROUTINE usm_read_anthropogenic_heat
+   
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Soubroutine reads t_surf and t_wall data from restart files
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,       &
+                              nxr_on_file, nynf, nync, nyn_on_file, nysf, nysc,&
+                              nys_on_file, found )
+
+
+       USE control_parameters,                                                 &
+           ONLY: length, restart_string
+           
+       IMPLICIT NONE
+
+       INTEGER(iwp)       ::  l                !< index variable for surface type
+       INTEGER(iwp)       ::  i                !< running index over input files
+       INTEGER(iwp)       ::  k                !< running index over previous input files covering current local domain
+       INTEGER(iwp)       ::  ns_h_on_file_usm !< number of horizontal surface elements (urban type) on file
+       INTEGER(iwp)       ::  nxlc             !< index of left boundary on current subdomain
+       INTEGER(iwp)       ::  nxlf             !< index of left boundary on former subdomain 
+       INTEGER(iwp)       ::  nxl_on_file      !< index of left boundary on former local domain 
+       INTEGER(iwp)       ::  nxrc             !< index of right boundary on current subdomain
+       INTEGER(iwp)       ::  nxrf             !< index of right boundary on former subdomain
+       INTEGER(iwp)       ::  nxr_on_file      !< index of right boundary on former local domain 
+       INTEGER(iwp)       ::  nync             !< index of north boundary on current subdomain
+       INTEGER(iwp)       ::  nynf             !< index of north boundary on former subdomain
+       INTEGER(iwp)       ::  nyn_on_file      !< index of north boundary on former local domain 
+       INTEGER(iwp)       ::  nysc             !< index of south boundary on current subdomain 
+       INTEGER(iwp)       ::  nysf             !< index of south boundary on former subdomain
+       INTEGER(iwp)       ::  nys_on_file      !< index of south boundary on former local domain
+       
+       INTEGER(iwp)       ::  ns_v_on_file_usm(0:3) !< number of vertical surface elements (urban type) on file
+       
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  start_index_on_file 
+       INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  end_index_on_file
+
+       LOGICAL, INTENT(OUT)  ::  found 
+       
+       REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE   ::  tmp_surf_wall_h, tmp_surf_window_h, tmp_surf_green_h
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE, SAVE ::  tmp_wall_h, tmp_window_h, tmp_green_h
+       
+       TYPE( t_surf_vertical ), DIMENSION(0:3), SAVE ::  tmp_surf_wall_v, tmp_surf_window_v, tmp_surf_green_v
+       TYPE( t_wall_vertical ), DIMENSION(0:3), SAVE ::  tmp_wall_v, tmp_window_v, tmp_green_v
+
+
+       found = .TRUE.
+
+
+          SELECT CASE ( restart_string(1:length) ) 
+
+             CASE ( 'ns_h_on_file_usm') 
+                IF ( k == 1 )  THEN
+                   READ ( 13 ) ns_h_on_file_usm
+                
+                   IF ( ALLOCATED( tmp_surf_wall_h ) ) DEALLOCATE( tmp_surf_wall_h )
+                   IF ( ALLOCATED( tmp_wall_h ) ) DEALLOCATE( tmp_wall_h ) 
+                   IF ( ALLOCATED( tmp_surf_window_h ) )                       &
+                      DEALLOCATE( tmp_surf_window_h ) 
+                   IF ( ALLOCATED( tmp_window_h) ) DEALLOCATE( tmp_window_h ) 
+                   IF ( ALLOCATED( tmp_surf_green_h) )                         &
+                      DEALLOCATE( tmp_surf_green_h ) 
+                   IF ( ALLOCATED( tmp_green_h) ) DEALLOCATE( tmp_green_h )
+  
+!
+!--                Allocate temporary arrays for reading data on file. Note,
+!--                the size of allocated surface elements do not necessarily
+!--                need  to match the size of present surface elements on 
+!--                current processor, as the number of processors between 
+!--                restarts can change. 
+                   ALLOCATE( tmp_surf_wall_h(1:ns_h_on_file_usm) )
+                   ALLOCATE( tmp_wall_h(nzb_wall:nzt_wall+1,                   &
+                                        1:ns_h_on_file_usm) )
+                   ALLOCATE( tmp_surf_window_h(1:ns_h_on_file_usm) )
+                   ALLOCATE( tmp_window_h(nzb_wall:nzt_wall+1,                 &
+                                          1:ns_h_on_file_usm) )
+                   ALLOCATE( tmp_surf_green_h(1:ns_h_on_file_usm) )
+                   ALLOCATE( tmp_green_h(nzb_wall:nzt_wall+1,                  &
+                                         1:ns_h_on_file_usm) )
+
+                ENDIF
+
+             CASE ( 'ns_v_on_file_usm')
+                IF ( k == 1 )  THEN
+                   READ ( 13 ) ns_v_on_file_usm 
+
+                   DO  l = 0, 3
+                      IF ( ALLOCATED( tmp_surf_wall_v(l)%t ) )                      &
+                         DEALLOCATE( tmp_surf_wall_v(l)%t )
+                      IF ( ALLOCATED( tmp_wall_v(l)%t ) )                      &
+                         DEALLOCATE( tmp_wall_v(l)%t )
+                      IF ( ALLOCATED( tmp_surf_window_v(l)%t ) )               & 
+                         DEALLOCATE( tmp_surf_window_v(l)%t )
+                      IF ( ALLOCATED( tmp_window_v(l)%t ) )                    &
+                         DEALLOCATE( tmp_window_v(l)%t )
+                      IF ( ALLOCATED( tmp_surf_green_v(l)%t ) )                &
+                         DEALLOCATE( tmp_surf_green_v(l)%t )
+                      IF ( ALLOCATED( tmp_green_v(l)%t ) )                     &
+                         DEALLOCATE( tmp_green_v(l)%t )
+                   ENDDO 
+
+!
+!--                Allocate temporary arrays for reading data on file. Note,
+!--                the size of allocated surface elements do not necessarily
+!--                need to match the size of present surface elements on 
+!--                current processor, as the number of processors between 
+!--                restarts can change. 
+                   DO  l = 0, 3
+                      ALLOCATE( tmp_surf_wall_v(l)%t(1:ns_v_on_file_usm(l)) )
+                      ALLOCATE( tmp_wall_v(l)%t(nzb_wall:nzt_wall+1,           &
+                                                1:ns_v_on_file_usm(l) ) )
+                      ALLOCATE( tmp_surf_window_v(l)%t(1:ns_v_on_file_usm(l)) )
+                      ALLOCATE( tmp_window_v(l)%t(nzb_wall:nzt_wall+1,         & 
+                                                  1:ns_v_on_file_usm(l) ) )
+                      ALLOCATE( tmp_surf_green_v(l)%t(1:ns_v_on_file_usm(l)) )
+                      ALLOCATE( tmp_green_v(l)%t(nzb_wall:nzt_wall+1,          &
+                                                 1:ns_v_on_file_usm(l) ) )
+                   ENDDO
+
+                ENDIF    
+          
+             CASE ( 'usm_start_index_h', 'usm_start_index_v'  )   
+                IF ( k == 1 )  THEN
+
+                   IF ( ALLOCATED( start_index_on_file ) )                     &
+                      DEALLOCATE( start_index_on_file )
+
+                   ALLOCATE ( start_index_on_file(nys_on_file:nyn_on_file,     &
+                                                  nxl_on_file:nxr_on_file) )
+
+                   READ ( 13 )  start_index_on_file
+
+                ENDIF
+                
+             CASE ( 'usm_end_index_h', 'usm_end_index_v' )   
+                IF ( k == 1 )  THEN
+
+                   IF ( ALLOCATED( end_index_on_file ) )                       &
+                      DEALLOCATE( end_index_on_file )
+
+                   ALLOCATE ( end_index_on_file(nys_on_file:nyn_on_file,       &
+                                                nxl_on_file:nxr_on_file) )
+
+                   READ ( 13 )  end_index_on_file
+
+                ENDIF
+          
+             CASE ( 't_surf_wall_h' )
+#if defined( __nopointer )                   
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_h ) )                         &
+                      ALLOCATE( t_surf_wall_h(1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_surf_wall_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_h, tmp_surf_wall_h,                  &
+                                        surf_usm_h%start_index,                &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                  
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_h_1 ) )                       &
+                      ALLOCATE( t_surf_wall_h_1(1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_surf_wall_h
+                ENDIF              
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_h_1, tmp_surf_wall_h,      &
+                                        surf_usm_h%start_index,                &
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+
+             CASE ( 't_surf_wall_v(0)' )
+#if defined( __nopointer )            
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v(0)%t ) )                    &
+                      ALLOCATE( t_surf_v(0)%t(1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v(0)%t, tmp_surf_wall_v(0)%t,        &
+                                        surf_usm_v(0)%start_index,             &
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(0)%t ) )                  &
+                      ALLOCATE( t_surf_wall_v_1(0)%t(1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v_1(0)%t, tmp_surf_wall_v(0)%t,      &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+                      
+             CASE ( 't_surf_wall_v(1)' )
+#if defined( __nopointer )        
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v(1)%t ) )                    &
+                      ALLOCATE( t_surf_wall_v(1)%t(1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v(1)%t, tmp_surf_wall_v(1)%t,        &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )                 
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(1)%t ) )                  &
+                      ALLOCATE( t_surf_wall_v_1(1)%t(1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v_1(1)%t, tmp_surf_wall_v(1)%t,      &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+
+             CASE ( 't_surf_wall_v(2)' )
+#if defined( __nopointer )          
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v(2)%t ) )                    &
+                      ALLOCATE( t_surf_wall_v(2)%t(1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v(2)%t, tmp_surf_wall_v(2)%t,        &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(2)%t ) )                  &
+                      ALLOCATE( t_surf_wall_v_1(2)%t(1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v_1(2)%t, tmp_surf_wall_v(2)%t,      &
+                                        surf_usm_v(2)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+                      
+             CASE ( 't_surf_wall_v(3)' )
+#if defined( __nopointer )    
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v(3)%t ) )                    &
+                      ALLOCATE( t_surf_wall_v(3)%t(1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v(3)%t, tmp_surf_wall_v(3)%t,        &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_wall_v_1(3)%t ) )                  &
+                      ALLOCATE( t_surf_wall_v_1(3)%t(1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_surf_wall_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_wall_v_1(3)%t, tmp_surf_wall_v(3)%t,      &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_surf_green_h' )
+#if defined( __nopointer )                   
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_h ) )                   &
+                      ALLOCATE( t_surf_green_h(1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_surf_green_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_h, tmp_surf_green_h,      &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_h_1 ) )                 &
+                      ALLOCATE( t_surf_green_h_1(1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_surf_green_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_h_1, tmp_surf_green_h,    &
+                                        surf_usm_h%start_index,                &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+
+             CASE ( 't_surf_green_v(0)' )
+#if defined( __nopointer )            
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v(0)%t ) )              &
+                      ALLOCATE( t_surf_green_v(0)%t(1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v(0)%t,                   &
+                                        tmp_surf_green_v(0)%t,                 &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(0)%t ) )            &
+                      ALLOCATE( t_surf_green_v_1(0)%t(1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v_1(0)%t,                 &
+                                        tmp_surf_green_v(0)%t,                 &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+                   
+             CASE ( 't_surf_green_v(1)' )
+#if defined( __nopointer )        
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v(1)%t ) )              &
+                      ALLOCATE( t_surf_green_v(1)%t(1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v(1)%t,                   &
+                                        tmp_surf_green_v(1)%t,                 &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )                 
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(1)%t ) )            &
+                      ALLOCATE( t_surf_green_v_1(1)%t(1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v_1(1)%t,                 &
+                                        tmp_surf_green_v(1)%t,                 &
+                                        surf_usm_v(1)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+
+             CASE ( 't_surf_green_v(2)' )
+#if defined( __nopointer )          
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v(2)%t ) )              &
+                      ALLOCATE( t_surf_green_v(2)%t(1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v(2)%t,                   & 
+                                        tmp_surf_green_v(2)%t,                 &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(2)%t ) )            &
+                      ALLOCATE( t_surf_green_v_1(2)%t(1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v_1(2)%t,                 &
+                                        tmp_surf_green_v(2)%t,                 &
+                                        surf_usm_v(2)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+                   
+             CASE ( 't_surf_green_v(3)' )
+#if defined( __nopointer )    
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v(3)%t ) )              &
+                      ALLOCATE( t_surf_green_v(3)%t(1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v(3)%t,                   &
+                                        tmp_surf_green_v(3)%t,                 &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_green_v_1(3)%t ) )            &
+                      ALLOCATE( t_surf_green_v_1(3)%t(1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_surf_green_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_green_v_1(3)%t,                 & 
+                                        tmp_surf_green_v(3)%t,                 &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_surf_window_h' )
+#if defined( __nopointer )                   
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_h ) )                  &
+                      ALLOCATE( t_surf_window_h(1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_surf_window_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_h, tmp_surf_window_h,    &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_h_1 ) )                &
+                      ALLOCATE( t_surf_window_h_1(1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_surf_window_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_h_1,                     &
+                                        tmp_surf_window_h,                     &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+
+             CASE ( 't_surf_window_v(0)' )
+#if defined( __nopointer )            
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v(0)%t ) )             &
+                      ALLOCATE( t_surf_window_v(0)%t(1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v(0)%t,                  &
+                                        tmp_surf_window_v(0)%t,                &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(0)%t ) )           &
+                      ALLOCATE( t_surf_window_v_1(0)%t(1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v_1(0)%t,                &
+                                        tmp_surf_window_v(0)%t,                &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+                   
+             CASE ( 't_surf_window_v(1)' )
+#if defined( __nopointer )        
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v(1)%t ) )             &
+                      ALLOCATE( t_surf_window_v(1)%t(1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v(1)%t,                  & 
+                                        tmp_surf_window_v(1)%t,                &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )                 
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(1)%t ) )           &
+                      ALLOCATE( t_surf_window_v_1(1)%t(1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v_1(1)%t,                &
+                                        tmp_surf_window_v(1)%t,                &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+
+             CASE ( 't_surf_window_v(2)' )
+#if defined( __nopointer )          
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v(2)%t ) )             &
+                      ALLOCATE( t_surf_window_v(2)%t(1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v(2)%t,                  &
+                                        tmp_surf_window_v(2)%t,                &
+                                        surf_usm_v(2)%start_index,             &   
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(2)%t ) )           &
+                      ALLOCATE( t_surf_window_v_1(2)%t(1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v_1(2)%t,                & 
+                                        tmp_surf_window_v(2)%t,                &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+                   
+             CASE ( 't_surf_window_v(3)' )
+#if defined( __nopointer )    
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v(3)%t ) )             &
+                      ALLOCATE( t_surf_window_v(3)%t(1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v(3)%t,                  &
+                                        tmp_surf_window_v(3)%t,                &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else                      
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_surf_window_v_1(3)%t ) )           &
+                      ALLOCATE( t_surf_window_v_1(3)%t(1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_surf_window_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_surf_window_v_1(3)%t,                &  
+                                        tmp_surf_window_v(3)%t,                &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_wall_h' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_h ) )                         &
+                      ALLOCATE( t_wall_h(nzb_wall:nzt_wall+1,1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_wall_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_h, tmp_wall_h,                  &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_h_1 ) )                       &
+                      ALLOCATE( t_wall_h_1(nzb_wall:nzt_wall+1,                &
+                                           1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_wall_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_h_1, tmp_wall_h,                &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_wall_v(0)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v(0)%t ) )                    &
+                      ALLOCATE( t_wall_v(0)%t(nzb_wall:nzt_wall+1,             &
+                                              1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_wall_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v(0)%t, tmp_wall_v(0)%t,        &
+                                        surf_usm_v(0)%start_index,             &    
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v_1(0)%t ) )                  &
+                      ALLOCATE( t_wall_v_1(0)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_wall_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v_1(0)%t, tmp_wall_v(0)%t,      &
+                                        surf_usm_v(0)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_wall_v(1)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v(1)%t ) )                    &
+                      ALLOCATE( t_wall_v(1)%t(nzb_wall:nzt_wall+1,             &
+                                              1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_wall_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v(1)%t, tmp_wall_v(1)%t,        &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file ,                    &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file, nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v_1(1)%t ) )                  &
+                      ALLOCATE( t_wall_v_1(1)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_wall_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v_1(1)%t, tmp_wall_v(1)%t,      &
+                                        surf_usm_v(1)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_wall_v(2)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v(2)%t ) )                    &
+                      ALLOCATE( t_wall_v(2)%t(nzb_wall:nzt_wall+1,             &
+                                              1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_wall_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v(2)%t, tmp_wall_v(2)%t,        &
+                                        surf_usm_v(2)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v_1(2)%t ) )                  &
+                      ALLOCATE( t_wall_v_1(2)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_wall_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v_1(2)%t, tmp_wall_v(2)%t,      &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file ,                    &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_wall_v(3)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v(3)%t ) )                    &
+                      ALLOCATE( t_wall_v(3)%t(nzb_wall:nzt_wall+1,             &
+                                              1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_wall_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v(3)%t, tmp_wall_v(3)%t,        &
+                                        surf_usm_v(3)%start_index,             &   
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_wall_v_1(3)%t ) )                  &
+                      ALLOCATE( t_wall_v_1(3)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_wall_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_wall_v_1(3)%t, tmp_wall_v(3)%t,      &
+                                        surf_usm_v(3)%start_index,             &   
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_green_h' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_h ) )                        &
+                      ALLOCATE( t_green_h(nzb_wall:nzt_wall+1,                 &
+                                          1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_green_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_h, tmp_green_h,                &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_h_1 ) )                      &
+                      ALLOCATE( t_green_h_1(nzb_wall:nzt_wall+1,               &
+                                            1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_green_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_h_1, tmp_green_h,              &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_green_v(0)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v(0)%t ) )                   &
+                      ALLOCATE( t_green_v(0)%t(nzb_wall:nzt_wall+1,            &
+                                               1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_green_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v(0)%t, tmp_green_v(0)%t,      &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v_1(0)%t ) )                 &
+                      ALLOCATE( t_green_v_1(0)%t(nzb_wall:nzt_wall+1,          &
+                                                 1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_green_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v_1(0)%t, tmp_green_v(0)%t,    &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_green_v(1)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v(1)%t ) )                   &
+                      ALLOCATE( t_green_v(1)%t(nzb_wall:nzt_wall+1,            &
+                                               1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_green_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v(1)%t, tmp_green_v(1)%t,      &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file ,                    &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v_1(1)%t ) )                 &
+                      ALLOCATE( t_green_v_1(1)%t(nzb_wall:nzt_wall+1,          &
+                                                 1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_green_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v_1(1)%t, tmp_green_v(1)%t,    &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_green_v(2)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v(2)%t ) )                   &
+                      ALLOCATE( t_green_v(2)%t(nzb_wall:nzt_wall+1,            &
+                                               1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_green_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v(2)%t, tmp_green_v(2)%t,      &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v_1(2)%t ) )                 &
+                      ALLOCATE( t_green_v_1(2)%t(nzb_wall:nzt_wall+1,          &
+                                                 1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_green_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v_1(2)%t, tmp_green_v(2)%t,    &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file ,                    &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_green_v(3)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v(3)%t ) )                   &
+                      ALLOCATE( t_green_v(3)%t(nzb_wall:nzt_wall+1,            &
+                                               1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_green_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v(3)%t, tmp_green_v(3)%t,      &
+                                        surf_usm_v(3)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_green_v_1(3)%t ) )                 &
+                      ALLOCATE( t_green_v_1(3)%t(nzb_wall:nzt_wall+1,          &
+                                                 1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_green_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_green_v_1(3)%t, tmp_green_v(3)%t,    &
+                                        surf_usm_v(3)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_window_h' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_h ) )                       &
+                      ALLOCATE( t_window_h(nzb_wall:nzt_wall+1,                &
+                                           1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_window_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_h, tmp_window_h,              &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_h_1 ) )                     &
+                      ALLOCATE( t_window_h_1(nzb_wall:nzt_wall+1,              &
+                                             1:surf_usm_h%ns) )
+                   READ ( 13 )  tmp_window_h
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_h_1, tmp_window_h,            &
+                                        surf_usm_h%start_index,                & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file, nxr_on_file )
+#endif
+             CASE ( 't_window_v(0)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v(0)%t ) )                  &
+                      ALLOCATE( t_window_v(0)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_window_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v(0)%t, tmp_window_v(0)%t,    &
+                                        surf_usm_v(0)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file, nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v_1(0)%t ) )                &
+                      ALLOCATE( t_window_v_1(0)%t(nzb_wall:nzt_wall+1,         &
+                                                  1:surf_usm_v(0)%ns) )
+                   READ ( 13 )  tmp_window_v(0)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v_1(0)%t,                     & 
+                                        tmp_window_v(0)%t,                     &
+                                        surf_usm_v(0)%start_index,             &
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_window_v(1)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v(1)%t ) )                  &
+                      ALLOCATE( t_window_v(1)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_window_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v(1)%t, tmp_window_v(1)%t,    &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file ,                    &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file, nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v_1(1)%t ) )                &
+                      ALLOCATE( t_window_v_1(1)%t(nzb_wall:nzt_wall+1,         &
+                                                  1:surf_usm_v(1)%ns) )
+                   READ ( 13 )  tmp_window_v(1)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v_1(1)%t,                     & 
+                                        tmp_window_v(1)%t,                     &
+                                        surf_usm_v(1)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_window_v(2)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v(2)%t ) )                  &
+                      ALLOCATE( t_window_v(2)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_window_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v(2)%t, tmp_window_v(2)%t,    &
+                                        surf_usm_v(2)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v_1(2)%t ) )                &
+                      ALLOCATE( t_window_v_1(2)%t(nzb_wall:nzt_wall+1,         &
+                                                  1:surf_usm_v(2)%ns) )
+                   READ ( 13 )  tmp_window_v(2)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v_1(2)%t,                     & 
+                                        tmp_window_v(2)%t,                     &
+                                        surf_usm_v(2)%start_index,             &  
+                                        start_index_on_file,                   &
+                                        end_index_on_file ,                    &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE ( 't_window_v(3)' )
+#if defined( __nopointer )
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v(3)%t ) )                  &
+                      ALLOCATE( t_window_v(3)%t(nzb_wall:nzt_wall+1,           &
+                                                1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_window_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v(3)%t, tmp_window_v(3)%t,    &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#else
+                IF ( k == 1 )  THEN
+                   IF ( .NOT.  ALLOCATED( t_window_v_1(3)%t ) )                &
+                      ALLOCATE( t_window_v_1(3)%t(nzb_wall:nzt_wall+1,1:surf_usm_v(3)%ns) )
+                   READ ( 13 )  tmp_window_v(3)%t
+                ENDIF
+                CALL surface_restore_elements(                                 &
+                                        t_window_v_1(3)%t,                     & 
+                                        tmp_window_v(3)%t,                     &
+                                        surf_usm_v(3)%start_index,             & 
+                                        start_index_on_file,                   &
+                                        end_index_on_file,                     &
+                                        nxlc, nysc,                            &
+                                        nxlf, nxrf, nysf, nynf,                &
+                                        nys_on_file, nyn_on_file,              &
+                                        nxl_on_file,nxr_on_file )
+#endif
+             CASE DEFAULT
+
+                   found = .FALSE.
+
+          END SELECT
+
+       
+    END SUBROUTINE usm_rrd_local
+    
+
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> This subroutine reads walls, roofs and land categories and it parameters
+!> from input files.
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_read_urban_surface_types
+    
+        USE netcdf_data_input_mod,                                             &
+            ONLY:  building_pars_f, building_type_f
+
+        IMPLICIT NONE
+
+        CHARACTER(12)                                         :: wtn
+        INTEGER(iwp)                                          :: wtc
+        REAL(wp), DIMENSION(n_surface_params)                 :: wtp
+        LOGICAL                                               :: ascii_file = .FALSE.
+        INTEGER(iwp), DIMENSION(0:17, nysg:nyng, nxlg:nxrg)   :: usm_par
+        REAL(wp), DIMENSION(1:14, nysg:nyng, nxlg:nxrg)       :: usm_val
+        INTEGER(iwp)                                          :: k, l, d, iw, jw, kw, it, ip, ii, ij, m
+        INTEGER(iwp)                                          :: i, j
+        INTEGER(iwp)                                          :: nz, roof, dirwe, dirsn
+        INTEGER(iwp)                                          :: category
+        INTEGER(iwp)                                          :: weheight1, wecat1, snheight1, sncat1
+        INTEGER(iwp)                                          :: weheight2, wecat2, snheight2, sncat2
+        INTEGER(iwp)                                          :: weheight3, wecat3, snheight3, sncat3
+        REAL(wp)                                              :: height, albedo, thick
+        REAL(wp)                                              :: wealbedo1, wethick1, snalbedo1, snthick1
+        REAL(wp)                                              :: wealbedo2, wethick2, snalbedo2, snthick2
+        REAL(wp)                                              :: wealbedo3, wethick3, snalbedo3, snthick3
+
+!
+!--     If building_pars or building_type are already read from static input 
+!--     file, skip reading ASCII file. 
+        IF ( building_type_f%from_file  .OR.  building_pars_f%from_file )      &
+           RETURN
+!
+!--     Check if ASCII input file exists. If not, return and initialize USM
+!--     with default settings.
+        INQUIRE( FILE = 'SURFACE_PARAMETERS' // coupling_char,                 &
+                 EXIST = ascii_file )
+                 
+        IF ( .NOT. ascii_file )  RETURN
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!--     read categories of walls and their parameters
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        DO  ii = 0, io_blocks-1
+            IF ( ii == io_group )  THEN
+
+!--             open urban surface file 
+                OPEN( 151, file='SURFACE_PARAMETERS'//coupling_char, action='read', &
+                           status='old', form='formatted', err=15 ) 
+!--             first test and get n_surface_types
+                k = 0
+                l = 0
+                DO
+                    l = l+1
+                    READ( 151, *, err=11, end=12 )  wtc, wtp, wtn
+                    k = k+1
+                    CYCLE
+ 11                 CONTINUE
+                ENDDO
+ 12             n_surface_types = k
+                ALLOCATE( surface_type_names(n_surface_types) )
+                ALLOCATE( surface_type_codes(n_surface_types) )
+                ALLOCATE( surface_params(n_surface_params, n_surface_types) )
+!--             real reading
+                rewind( 151 )
+                k = 0
+                DO
+                    READ( 151, *, err=13, end=14 )  wtc, wtp, wtn
+                    k = k+1
+                    surface_type_codes(k) = wtc
+                    surface_params(:,k) = wtp
+                    surface_type_names(k) = wtn
+                    CYCLE
+13                  WRITE(6,'(i3,a,2i5)') myid, 'readparams2 error k=', k
+                    FLUSH(6)
+                    CONTINUE
+                ENDDO
+ 14             CLOSE(151)
+                CYCLE
+ 15             message_string = 'file SURFACE_PARAMETERS'//TRIM(coupling_char)//' does not exist'
+                CALL message( 'usm_read_urban_surface_types', 'PA0513', 1, 2, 0, 6, 0 )
+            ENDIF
+        ENDDO
+    
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!--     read types of surfaces
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+        usm_par = 0
+        DO  ii = 0, io_blocks-1
+            IF ( ii == io_group )  THEN
+
+                !
+!--             open csv urban surface file 
+                OPEN( 151, file='URBAN_SURFACE'//TRIM(coupling_char), action='read', &
+                      status='old', form='formatted', err=23 )
+                
+                l = 0
+                DO
+                    l = l+1
+!--                 i, j, height, nz, roof, dirwe, dirsn, category, soilcat,
+!--                 weheight1, wecat1, snheight1, sncat1, weheight2, wecat2, snheight2, sncat2,
+!--                 weheight3, wecat3, snheight3, sncat3
+                    READ( 151, *, err=21, end=25 )  i, j, height, nz, roof, dirwe, dirsn,            &
+                                            category, albedo, thick,                                 &
+                                            weheight1, wecat1, wealbedo1, wethick1,                  &
+                                            weheight2, wecat2, wealbedo2, wethick2,                  &
+                                            weheight3, wecat3, wealbedo3, wethick3,                  &
+                                            snheight1, sncat1, snalbedo1, snthick1,                  &
+                                            snheight2, sncat2, snalbedo2, snthick2,                  &
+                                            snheight3, sncat3, snalbedo3, snthick3
+
+                    IF ( i >= nxlg  .AND.  i <= nxrg  .AND.  j >= nysg  .AND.  j <= nyng )  THEN
+!--                     write integer variables into array
+                        usm_par(:,j,i) = (/1, nz, roof, dirwe, dirsn, category,                      &
+                                          weheight1, wecat1, weheight2, wecat2, weheight3, wecat3,   &
+                                          snheight1, sncat1, snheight2, sncat2, snheight3, sncat3 /)
+!--                     write real values into array
+                        usm_val(:,j,i) = (/ albedo, thick,                                           &
+                                           wealbedo1, wethick1, wealbedo2, wethick2,                 &
+                                           wealbedo3, wethick3, snalbedo1, snthick1,                 &
+                                           snalbedo2, snthick2, snalbedo3, snthick3 /)
+                    ENDIF
+                    CYCLE
+ 21                 WRITE (message_string, "(A,I5)") 'errors in file URBAN_SURFACE'//TRIM(coupling_char)//' on line ', l
+                    CALL message( 'usm_read_urban_surface_types', 'PA0512', 0, 1, 0, 6, 0 )
+                ENDDO
+          
+ 23             message_string = 'file URBAN_SURFACE'//TRIM(coupling_char)//' does not exist'
+                CALL message( 'usm_read_urban_surface_types', 'PA0514', 1, 2, 0, 6, 0 )
+
+ 25             CLOSE( 151 )
+
+            ENDIF
+#if defined( __parallel )
+            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+        ENDDO
+        
+!
+!--     check completeness and formal correctness of the data
+        DO i = nxlg, nxrg
+            DO j = nysg, nyng
+                IF ( usm_par(0,j,i) /= 0  .AND.  (        &  !< incomplete data,supply default values later
+                     usm_par(1,j,i) < nzb  .OR.           &
+                     usm_par(1,j,i) > nzt  .OR.           &  !< incorrect height (nz < nzb  .OR.  nz > nzt)
+                     usm_par(2,j,i) < 0  .OR.             &
+                     usm_par(2,j,i) > 1  .OR.             &  !< incorrect roof sign
+                     usm_par(3,j,i) < nzb-nzt  .OR.       & 
+                     usm_par(3,j,i) > nzt-nzb  .OR.       &  !< incorrect west-east wall direction sign
+                     usm_par(4,j,i) < nzb-nzt  .OR.       &
+                     usm_par(4,j,i) > nzt-nzb  .OR.       &  !< incorrect south-north wall direction sign
+                     usm_par(6,j,i) < nzb  .OR.           & 
+                     usm_par(6,j,i) > nzt  .OR.           &  !< incorrect pedestrian level height for west-east wall
+                     usm_par(8,j,i) > nzt  .OR.           &
+                     usm_par(10,j,i) > nzt  .OR.          &  !< incorrect wall or roof level height for west-east wall
+                     usm_par(12,j,i) < nzb  .OR.          & 
+                     usm_par(12,j,i) > nzt  .OR.          &  !< incorrect pedestrian level height for south-north wall
+                     usm_par(14,j,i) > nzt  .OR.          &
+                     usm_par(16,j,i) > nzt                &  !< incorrect wall or roof level height for south-north wall
+                    ) )  THEN
+!--                 incorrect input data
+                    WRITE (message_string, "(A,2I5)") 'missing or incorrect data in file URBAN_SURFACE'// &
+                                                       TRIM(coupling_char)//' for i,j=', i,j
+                    CALL message( 'usm_read_urban_surface', 'PA0504', 1, 2, 0, 6, 0 )
+                ENDIF
+                
+            ENDDO
+        ENDDO
+!        
+!--     Assign the surface types to the respective data type. 
+!--     First, for horizontal upward-facing surfaces. 
+!--     Further, set flag indicating that albedo is initialized via ASCII
+!--     format, else it would be overwritten in the radiation model.
+        surf_usm_h%albedo_from_ascii = .TRUE.
+        DO  m = 1, surf_usm_h%ns
+           iw = surf_usm_h%i(m)
+           jw = surf_usm_h%j(m)
+           kw = surf_usm_h%k(m)
+
+           IF ( usm_par(5,jw,iw) == 0 )  THEN
+#if ! defined( __nopointer )
+              IF ( zu(kw) >= roof_height_limit )  THEN
+                 surf_usm_h%isroof_surf(m)   = .TRUE.
+                 surf_usm_h%surface_types(m) = roof_category         !< default category for root surface
+              ELSE
+                 surf_usm_h%isroof_surf(m)   = .FALSE.
+                 surf_usm_h%surface_types(m) = land_category         !< default category for land surface
+              ENDIF
+#endif
+              surf_usm_h%albedo(:,m)    = -1.0_wp
+              surf_usm_h%thickness_wall(m) = -1.0_wp
+              surf_usm_h%thickness_green(m) = -1.0_wp
+              surf_usm_h%thickness_window(m) = -1.0_wp
+           ELSE
+              IF ( usm_par(2,jw,iw)==0 )  THEN
+                 surf_usm_h%isroof_surf(m)    = .FALSE.
+                 surf_usm_h%thickness_wall(m) = -1.0_wp
+                 surf_usm_h%thickness_window(m) = -1.0_wp
+                 surf_usm_h%thickness_green(m)  = -1.0_wp
+              ELSE
+                 surf_usm_h%isroof_surf(m)    = .TRUE.
+                 surf_usm_h%thickness_wall(m) = usm_val(2,jw,iw)
+                 surf_usm_h%thickness_window(m) = usm_val(2,jw,iw)
+                 surf_usm_h%thickness_green(m)  = usm_val(2,jw,iw)
+              ENDIF
+              surf_usm_h%surface_types(m) = usm_par(5,jw,iw)
+              surf_usm_h%albedo(:,m)   = usm_val(1,jw,iw)
+              surf_usm_h%transmissivity(m)    = 0.0_wp
+           ENDIF
+!
+!--        Find the type position
+           it = surf_usm_h%surface_types(m)
+           ip = -99999
+           DO k = 1, n_surface_types
+              IF ( surface_type_codes(k) == it )  THEN
+                 ip = k
+                 EXIT
+              ENDIF
+           ENDDO
+           IF ( ip == -99999 )  THEN
+!--           land/roof category not found
+              WRITE (9,"(A,I5,A,3I5)") 'land/roof category ', it,     &
+                                       ' not found  for i,j,k=', iw,jw,kw
+              FLUSH(9)
+              IF ( surf_usm_h%isroof_surf(m) ) THEN
+                 category = roof_category
+              ELSE
+                 category = land_category
+              ENDIF
+              DO k = 1, n_surface_types
+                 IF ( surface_type_codes(k) == roof_category ) THEN
+                    ip = k
+                    EXIT
+                 ENDIF
+              ENDDO
+              IF ( ip == -99999 )  THEN
+!--              default land/roof category not found
+                 WRITE (9,"(A,I5,A,3I5)") 'Default land/roof category', category, ' not found!'
+                 FLUSH(9)
+                 ip = 1
+              ENDIF
+           ENDIF
+!
+!--        Albedo
+           IF ( surf_usm_h%albedo(ind_veg_wall,m) < 0.0_wp )  THEN
+              surf_usm_h%albedo(:,m) = surface_params(ialbedo,ip)
+           ENDIF
+!--        Albedo type is 0 (custom), others are replaced later
+           surf_usm_h%albedo_type(:,m) = 0
+!--        Transmissivity
+           IF ( surf_usm_h%transmissivity(m) < 0.0_wp )  THEN
+              surf_usm_h%transmissivity(m) = 0.0_wp
+           ENDIF
+!
+!--        emissivity of the wall
+           surf_usm_h%emissivity(:,m) = surface_params(iemiss,ip)
+!            
+!--        heat conductivity Î»S between air and wall ( W mâ2 Kâ1 )
+           surf_usm_h%lambda_surf(m) = surface_params(ilambdas,ip)
+           surf_usm_h%lambda_surf_window(m) = surface_params(ilambdas,ip)
+           surf_usm_h%lambda_surf_green(m)  = surface_params(ilambdas,ip)
+!            
+!--        roughness length for momentum, heat and humidity
+           surf_usm_h%z0(m) = surface_params(irough,ip)
+           surf_usm_h%z0h(m) = surface_params(iroughh,ip)
+           surf_usm_h%z0q(m) = surface_params(iroughh,ip)
+!
+!--        Surface skin layer heat capacity (J mâ2 Kâ1 )
+           surf_usm_h%c_surface(m) = surface_params(icsurf,ip)
+           surf_usm_h%c_surface_window(m) = surface_params(icsurf,ip)
+           surf_usm_h%c_surface_green(m)  = surface_params(icsurf,ip)
+!            
+!--        wall material parameters:
+!--        thickness of the wall (m)
+!--        missing values are replaced by default value for category
+           IF ( surf_usm_h%thickness_wall(m) <= 0.001_wp )  THEN
+                surf_usm_h%thickness_wall(m) = surface_params(ithick,ip)
+           ENDIF
+           IF ( surf_usm_h%thickness_window(m) <= 0.001_wp )  THEN
+                surf_usm_h%thickness_window(m) = surface_params(ithick,ip)
+           ENDIF
+           IF ( surf_usm_h%thickness_green(m) <= 0.001_wp )  THEN
+                surf_usm_h%thickness_green(m) = surface_params(ithick,ip)
+           ENDIF
+!            
+!--        volumetric heat capacity rho*C of the wall ( J mâ3 Kâ1 )
+           surf_usm_h%rho_c_wall(:,m) = surface_params(irhoC,ip)
+           surf_usm_h%rho_c_window(:,m) = surface_params(irhoC,ip)
+           surf_usm_h%rho_c_green(:,m)  = surface_params(irhoC,ip)
+!            
+!--        thermal conductivity Î»H of the wall (W mâ1 Kâ1 )
+           surf_usm_h%lambda_h(:,m) = surface_params(ilambdah,ip)
+           surf_usm_h%lambda_h_window(:,m) = surface_params(ilambdah,ip)
+           surf_usm_h%lambda_h_green(:,m)  = surface_params(ilambdah,ip)
+
+        ENDDO
+!
+!--     For vertical surface elements ( 0 -- northward-facing, 1 -- southward-facing,
+!--     2 -- eastward-facing, 3 -- westward-facing )
+        DO  l = 0, 3
+!
+!--        Set flag indicating that albedo is initialized via ASCII format. 
+!--        Else it would be overwritten in the radiation model.
+           surf_usm_v(l)%albedo_from_ascii = .TRUE.
+           DO  m = 1, surf_usm_v(l)%ns
+              i  = surf_usm_v(l)%i(m)
+              j  = surf_usm_v(l)%j(m)
+              kw = surf_usm_v(l)%k(m)
+              
+              IF ( l == 3 )  THEN ! westward facing
+                 iw = i
+                 jw = j
+                 ii = 6
+                 ij = 3
+              ELSEIF ( l == 2 )  THEN
+                 iw = i-1
+                 jw = j
+                 ii = 6
+                 ij = 3
+              ELSEIF ( l == 1 )  THEN
+                 iw = i
+                 jw = j
+                 ii = 12
+                 ij = 9
+              ELSEIF ( l == 0 )  THEN
+                 iw = i
+                 jw = j-1
+                 ii = 12
+                 ij = 9
+              ENDIF
+
+              IF ( iw < 0 .OR. jw < 0 ) THEN
+!--              wall on west or south border of the domain - assign default category
+                 IF ( kw <= roof_height_limit ) THEN
+                     surf_usm_v(l)%surface_types(m) = wall_category   !< default category for wall surface in wall zone
+                 ELSE
+                     surf_usm_v(l)%surface_types(m) = roof_category   !< default category for wall surface in roof zone
+                 END IF
+                 surf_usm_v(l)%albedo(:,m)    = -1.0_wp
+                 surf_usm_v(l)%thickness_wall(m) = -1.0_wp
+                 surf_usm_v(l)%thickness_window(m)   = -1.0_wp
+                 surf_usm_v(l)%thickness_green(m)    = -1.0_wp
+                 surf_usm_v(l)%transmissivity(m)  = -1.0_wp
+              ELSE IF ( kw <= usm_par(ii,jw,iw) )  THEN
+!--                 pedestrian zone
+                 IF ( usm_par(ii+1,jw,iw) == 0 )  THEN
+                     surf_usm_v(l)%surface_types(m)  = pedestrian_category   !< default category for wall surface in pedestrian zone
+                     surf_usm_v(l)%albedo(:,m)    = -1.0_wp
+                     surf_usm_v(l)%thickness_wall(m) = -1.0_wp
+                     surf_usm_v(l)%thickness_window(m)   = -1.0_wp
+                     surf_usm_v(l)%thickness_green(m)    = -1.0_wp
+                     surf_usm_v(l)%transmissivity(m)  = -1.0_wp
+                 ELSE
+                     surf_usm_v(l)%surface_types(m)  = usm_par(ii+1,jw,iw)
+                     surf_usm_v(l)%albedo(:,m)    = usm_val(ij,jw,iw)
+                     surf_usm_v(l)%thickness_wall(m) = usm_val(ij+1,jw,iw)
+                     surf_usm_v(l)%thickness_window(m)   = usm_val(ij+1,jw,iw)
+                     surf_usm_v(l)%thickness_green(m)    = usm_val(ij+1,jw,iw)
+                     surf_usm_v(l)%transmissivity(m)  = 0.0_wp
+                 ENDIF
+              ELSE IF ( kw <= usm_par(ii+2,jw,iw) )  THEN
+!--              wall zone
+                 IF ( usm_par(ii+3,jw,iw) == 0 )  THEN
+                     surf_usm_v(l)%surface_types(m)  = wall_category         !< default category for wall surface
+                     surf_usm_v(l)%albedo(:,m)    = -1.0_wp
+                     surf_usm_v(l)%thickness_wall(m) = -1.0_wp
+                     surf_usm_v(l)%thickness_window(m)   = -1.0_wp
+                     surf_usm_v(l)%thickness_green(m)    = -1.0_wp
+                     surf_usm_v(l)%transmissivity(m)  = -1.0_wp
+                 ELSE
+                     surf_usm_v(l)%surface_types(m)  = usm_par(ii+3,jw,iw)
+                     surf_usm_v(l)%albedo(:,m)    = usm_val(ij+2,jw,iw)
+                     surf_usm_v(l)%thickness_wall(m) = usm_val(ij+3,jw,iw)
+                     surf_usm_v(l)%thickness_window(m)   = usm_val(ij+3,jw,iw)
+                     surf_usm_v(l)%thickness_green(m)    = usm_val(ij+3,jw,iw)
+                     surf_usm_v(l)%transmissivity(m)  = 0.0_wp
+                 ENDIF
+              ELSE IF ( kw <= usm_par(ii+4,jw,iw) )  THEN
+!--              roof zone
+                 IF ( usm_par(ii+5,jw,iw) == 0 )  THEN
+                     surf_usm_v(l)%surface_types(m)  = roof_category         !< default category for roof surface
+                     surf_usm_v(l)%albedo(:,m)    = -1.0_wp
+                     surf_usm_v(l)%thickness_wall(m) = -1.0_wp
+                     surf_usm_v(l)%thickness_window(m)   = -1.0_wp
+                     surf_usm_v(l)%thickness_green(m)    = -1.0_wp
+                     surf_usm_v(l)%transmissivity(m)  = -1.0_wp
+                 ELSE
+                     surf_usm_v(l)%surface_types(m)  = usm_par(ii+5,jw,iw)
+                     surf_usm_v(l)%albedo(:,m)    = usm_val(ij+4,jw,iw)
+                     surf_usm_v(l)%thickness_wall(m) = usm_val(ij+5,jw,iw)
+                     surf_usm_v(l)%thickness_window(m)   = usm_val(ij+5,jw,iw)
+                     surf_usm_v(l)%thickness_green(m)    = usm_val(ij+5,jw,iw)
+                     surf_usm_v(l)%transmissivity(m)  = 0.0_wp
+                 ENDIF
+              ELSE
+!
+                 WRITE(9,*) 'Problem reading USM data:'
+                 WRITE(9,*) l,i,j,kw,get_topography_top_index_ji( j, i, 's' )
+                 WRITE(9,*) ii,iw,jw,kw,get_topography_top_index_ji( jw, iw, 's' )
+                 WRITE(9,*) usm_par(ii,jw,iw),usm_par(ii+1,jw,iw)
+                 WRITE(9,*) usm_par(ii+2,jw,iw),usm_par(ii+3,jw,iw)
+                 WRITE(9,*) usm_par(ii+4,jw,iw),usm_par(ii+5,jw,iw)
+                 WRITE(9,*) kw,roof_height_limit,wall_category,roof_category
+                 FLUSH(9)
+!--              supply the default category
+                 IF ( kw <= roof_height_limit ) THEN
+                     surf_usm_v(l)%surface_types(m) = wall_category   !< default category for wall surface in wall zone
+                 ELSE
+                     surf_usm_v(l)%surface_types(m) = roof_category   !< default category for wall surface in roof zone
+                 END IF
+                 surf_usm_v(l)%albedo(:,m)    = -1.0_wp
+                 surf_usm_v(l)%thickness_wall(m) = -1.0_wp
+                 surf_usm_v(l)%thickness_window(m) = -1.0_wp
+                 surf_usm_v(l)%thickness_green(m) = -1.0_wp
+                 surf_usm_v(l)%transmissivity(m)  = -1.0_wp
+              ENDIF
+!
+!--           Find the type position
+              it = surf_usm_v(l)%surface_types(m)
+              ip = -99999
+              DO k = 1, n_surface_types
+                 IF ( surface_type_codes(k) == it )  THEN
+                    ip = k
+                    EXIT
+                 ENDIF
+              ENDDO
+              IF ( ip == -99999 )  THEN
+!--              wall category not found
+                 WRITE (9, "(A,I7,A,3I5)") 'wall category ', it,  &
+                                           ' not found  for i,j,k=', iw,jw,kw
+                 FLUSH(9)
+                 category = wall_category 
+                 DO k = 1, n_surface_types
+                    IF ( surface_type_codes(k) == category ) THEN
+                       ip = k
+                       EXIT
+                    ENDIF
+                 ENDDO
+                 IF ( ip == -99999 )  THEN
+!--                 default wall category not found
+                    WRITE (9, "(A,I5,A,3I5)") 'Default wall category', category, ' not found!'
+                    FLUSH(9)
+                    ip = 1
+                 ENDIF
+              ENDIF
+
+!
+!--           Albedo
+              IF ( surf_usm_v(l)%albedo(ind_veg_wall,m) < 0.0_wp )  THEN
+                 surf_usm_v(l)%albedo(:,m) = surface_params(ialbedo,ip)
+              ENDIF
+!--           Albedo type is 0 (custom), others are replaced later
+              surf_usm_v(l)%albedo_type(:,m) = 0
+!--           Transmissivity of the windows
+              IF ( surf_usm_v(l)%transmissivity(m) < 0.0_wp )  THEN
+                 surf_usm_v(l)%transmissivity(m) = 0.0_wp
+              ENDIF
+!
+!--           emissivity of the wall
+              surf_usm_v(l)%emissivity(:,m) = surface_params(iemiss,ip)
+!            
+!--           heat conductivity lambda S between air and wall ( W m-2 K-1 )
+              surf_usm_v(l)%lambda_surf(m) = surface_params(ilambdas,ip)
+              surf_usm_v(l)%lambda_surf_window(m) = surface_params(ilambdas,ip)
+              surf_usm_v(l)%lambda_surf_green(m) = surface_params(ilambdas,ip)
+!            
+!--           roughness length
+              surf_usm_v(l)%z0(m) = surface_params(irough,ip)
+              surf_usm_v(l)%z0h(m) = surface_params(iroughh,ip)
+              surf_usm_v(l)%z0q(m) = surface_params(iroughh,ip)
+!            
+!--           Surface skin layer heat capacity (J m-2 K-1 )
+              surf_usm_v(l)%c_surface(m) = surface_params(icsurf,ip)
+              surf_usm_v(l)%c_surface_window(m) = surface_params(icsurf,ip)
+              surf_usm_v(l)%c_surface_green(m) = surface_params(icsurf,ip)
+!            
+!--           wall material parameters:
+!--           thickness of the wall (m)
+!--           missing values are replaced by default value for category
+              IF ( surf_usm_v(l)%thickness_wall(m) <= 0.001_wp )  THEN
+                   surf_usm_v(l)%thickness_wall(m) = surface_params(ithick,ip)
+              ENDIF
+              IF ( surf_usm_v(l)%thickness_window(m) <= 0.001_wp )  THEN
+                   surf_usm_v(l)%thickness_window(m) = surface_params(ithick,ip)
+              ENDIF
+              IF ( surf_usm_v(l)%thickness_green(m) <= 0.001_wp )  THEN
+                   surf_usm_v(l)%thickness_green(m) = surface_params(ithick,ip)
+              ENDIF
+!
+!--           volumetric heat capacity rho*C of the wall ( J m-3 K-1 )
+              surf_usm_v(l)%rho_c_wall(:,m) = surface_params(irhoC,ip)
+              surf_usm_v(l)%rho_c_window(:,m) = surface_params(irhoC,ip)
+              surf_usm_v(l)%rho_c_green(:,m) = surface_params(irhoC,ip)
+!            
+!--           thermal conductivity lambda H of the wall (W m-1 K-1 )
+              surf_usm_v(l)%lambda_h(:,m) = surface_params(ilambdah,ip)
+              surf_usm_v(l)%lambda_h_window(:,m) = surface_params(ilambdah,ip)
+              surf_usm_v(l)%lambda_h_green(:,m) = surface_params(ilambdah,ip)
+
+           ENDDO
+        ENDDO 
+
+!
+!--     Initialize wall layer thicknesses. Please note, this will be removed
+!--     after migration to Palm input data standard.  
+        DO k = nzb_wall, nzt_wall
+           zwn(k) = zwn_default(k)
+           zwn_green(k) = zwn_default_green(k)
+           zwn_window(k) = zwn_default_window(k)
+        ENDDO
+!
+!--     apply for all particular surface grids. First for horizontal surfaces
+        DO  m = 1, surf_usm_h%ns
+           surf_usm_h%zw(:,m) = zwn(:) * surf_usm_h%thickness_wall(m)
+           surf_usm_h%zw_green(:,m) = zwn_green(:) * surf_usm_h%thickness_green(m)
+           surf_usm_h%zw_window(:,m) = zwn_window(:) * surf_usm_h%thickness_window(m)
+        ENDDO
+        DO  l = 0, 3
+           DO  m = 1, surf_usm_v(l)%ns
+              surf_usm_v(l)%zw(:,m) = zwn(:) * surf_usm_v(l)%thickness_wall(m)
+              surf_usm_v(l)%zw_green(:,m) = zwn_green(:) * surf_usm_v(l)%thickness_green(m)
+              surf_usm_v(l)%zw_window(:,m) = zwn_window(:) * surf_usm_v(l)%thickness_window(m)
+           ENDDO
+        ENDDO
+
+        
+        WRITE(9,*) 'Urban surfaces read'
+        FLUSH(9)
+        
+        CALL location_message( '    types and parameters of urban surfaces read', .TRUE. )
+   
+    END SUBROUTINE usm_read_urban_surface_types
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> This function advances through the list of local surfaces to find given
+!> x, y, d, z coordinates
+!------------------------------------------------------------------------------!
+    PURE FUNCTION find_surface( x, y, z, d ) result(isurfl)
+
+        INTEGER(iwp), INTENT(in)                :: x, y, z, d
+        INTEGER(iwp)                            :: isurfl
+        INTEGER(iwp)                            :: isx, isy, isz
+
+        IF ( d == 0 ) THEN
+           DO  isurfl = 1, surf_usm_h%ns
+              isx = surf_usm_h%i(isurfl)
+              isy = surf_usm_h%j(isurfl)
+              isz = surf_usm_h%k(isurfl)
+              IF ( isx==x .and. isy==y .and. isz==z )  RETURN
+           ENDDO
+        ELSE
+           DO  isurfl = 1, surf_usm_v(d-1)%ns
+              isx = surf_usm_v(d-1)%i(isurfl)
+              isy = surf_usm_v(d-1)%j(isurfl)
+              isz = surf_usm_v(d-1)%k(isurfl)
+              IF ( isx==x .and. isy==y .and. isz==z )  RETURN
+           ENDDO
+        ENDIF
+
+!--     coordinate not found
+        isurfl = -1
+
+    END FUNCTION
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!
+!> This subroutine reads temperatures of respective material layers in walls,
+!> roofs and ground from input files. Data in the input file must be in
+!> standard order, i.e. horizontal surfaces first ordered by x, y and then
+!> vertical surfaces ordered by x, y, direction, z
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_read_wall_temperature
+
+        INTEGER(iwp)                                          :: i, j, k, d, ii, iline
+        INTEGER(iwp)                                          :: isurfl
+        REAL(wp)                                              :: rtsurf
+        REAL(wp), DIMENSION(nzb_wall:nzt_wall+1)              :: rtwall
+
+
+
+
+        DO  ii = 0, io_blocks-1
+            IF ( ii == io_group )  THEN
+
+!--             open wall temperature file
+                OPEN( 152, file='WALL_TEMPERATURE'//coupling_char, action='read', &
+                           status='old', form='formatted', err=15 )
+
+                isurfl = 0
+                iline = 1
+                DO
+                    rtwall = -9999.0_wp  !< for incomplete lines
+                    READ( 152, *, err=13, end=14 )  i, j, k, d, rtsurf, rtwall
+
+                    IF ( nxl <= i .and. i <= nxr .and. &
+                        nys <= j .and. j <= nyn)  THEN  !< local processor
+!--                     identify surface id
+                        isurfl = find_surface( i, j, k, d )
+                        IF ( isurfl == -1 )  THEN
+                            WRITE(message_string, '(a,4i5,a,i5,a)') 'Coordinates (xyzd) ', i, j, k, d, &
+                                ' on line ', iline, &
+                                ' in file WALL_TEMPERATURE are either not present or out of standard order of surfaces.'
+                            CALL message( 'usm_read_wall_temperature', 'PA0521', 1, 2, 0, 6, 0 )
+                        ENDIF
+
+!--                     assign temperatures
+                        IF ( d == 0 ) THEN
+                           t_surf_wall_h(isurfl) = rtsurf
+                           t_wall_h(:,isurfl) = rtwall(:)
+                           t_window_h(:,isurfl) = rtwall(:)
+                           t_green_h(:,isurfl) = rtwall(:)
+                        ELSE
+                           t_surf_wall_v(d-1)%t(isurfl) = rtsurf
+                           t_wall_v(d-1)%t(:,isurfl) = rtwall(:)
+                           t_window_v(d-1)%t(:,isurfl) = rtwall(:)
+                           t_green_v(d-1)%t(:,isurfl) = rtwall(:)
+                        ENDIF
+                    ENDIF
+
+                    iline = iline + 1
+                    CYCLE
+ 13                 WRITE(message_string, '(a,i5,a)') 'Error reading line ', iline, &
+                        ' in file WALL_TEMPERATURE.'
+                    CALL message( 'usm_read_wall_temperature', 'PA0522', 1, 2, 0, 6, 0 )
+                ENDDO
+ 14             CLOSE(152)
+                CYCLE
+ 15             message_string = 'file WALL_TEMPERATURE'//TRIM(coupling_char)//' does not exist'
+                CALL message( 'usm_read_wall_temperature', 'PA0523', 1, 2, 0, 6, 0 )
+            ENDIF
+#if defined( __parallel )
+            CALL MPI_BARRIER( comm2d, ierr )
+#endif
+        ENDDO
+
+        CALL location_message( '    wall layer temperatures read', .TRUE. )
+
+    END SUBROUTINE usm_read_wall_temperature
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Solver for the energy balance at the ground/roof/wall surface.
+!> It follows basic ideas and structure of lsm_energy_balance
+!> with many simplifications and adjustments.
+!> TODO better description
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_surface_energy_balance( spinup )
+
+
+        IMPLICIT NONE
+
+        INTEGER(iwp)                          :: i, j, k, l, d, m   !< running indices
+        
+        INTEGER(iwp) ::  i_off     !< offset to determine index of surface element, seen from atmospheric grid point, for x
+        INTEGER(iwp) ::  j_off     !< offset to determine index of surface element, seen from atmospheric grid point, for y
+        INTEGER(iwp) ::  k_off     !< offset to determine index of surface element, seen from atmospheric grid point, for z
+
+        LOGICAL                               :: spinup             !true during spinup
+        
+        REAL(wp)                              :: u1,v1,w1           !< near wall u,v,w
+        REAL(wp)                              :: stend_wall              !< surface tendency
+        
+        REAL(wp)                              :: stend_window       !< surface tendency
+        REAL(wp)                              :: stend_green        !< surface tendency
+        REAL(wp)                              :: coef_1             !< first coeficient for prognostic equation
+        REAL(wp)                              :: coef_window_1      !< first coeficient for prognostic window equation
+        REAL(wp)                              :: coef_green_1       !< first coeficient for prognostic green wall equation
+        REAL(wp)                              :: coef_2             !< second  coeficient for prognostic equation
+        REAL(wp)                              :: coef_window_2      !< second  coeficient for prognostic window equation
+        REAL(wp)                              :: coef_green_2       !< second  coeficient for prognostic green wall equation
+        REAL(wp)                              :: rho_cp             !< rho_wall_surface * c_p
+        REAL(wp)                              :: f_shf              !< factor for shf_eb
+        REAL(wp)                              :: f_shf_window       !< factor for shf_eb window
+        REAL(wp)                              :: f_shf_green        !< factor for shf_eb green wall
+        REAL(wp)                              :: lambda_surface     !< current value of lambda_surface (heat conductivity between air and wall)
+        REAL(wp)                              :: lambda_surface_window !< current value of lambda_surface (heat conductivity between air and window)
+        REAL(wp)                              :: lambda_surface_green  !< current value of lambda_surface (heat conductivity between air and greeb wall)
+        
+        REAL(wp)                              :: dtime              !< simulated time of day (in UTC)
+        INTEGER(iwp)                          :: dhour              !< simulated hour of day (in UTC)
+        REAL(wp)                              :: acoef              !< actual coefficient of diurnal profile of anthropogenic heat
+        REAL(wp) ::  f1,          & !< resistance correction term 1
+                     f2,          & !< resistance correction term 2
+                     f3,          & !< resistance correction term 3
+                     e,           & !< water vapour pressure
+                     e_s,         & !< water vapour saturation pressure
+                     e_s_dt,      & !< derivate of e_s with respect to T
+                     tend,        & !< tendency
+                     dq_s_dt,     & !< derivate of q_s with respect to T
+                     f_qsws,      & !< factor for qsws
+                     f_qsws_veg,  & !< factor for qsws_veg
+                     f_qsws_liq,  & !< factor for qsws_liq
+                     m_liq_max,   & !< maxmimum value of the liq. water reservoir
+                     qv1,         & !< specific humidity at first grid level
+                     m_max_depth = 0.0002_wp, & ! Maximum capacity of the water reservoir (m)
+                     rho_lv,      &
+                     drho_l_lv,   &
+                     q_s
+
+!
+!--     Index offset of surface element point with respect to adjoining 
+!--     atmospheric grid point 
+        k_off = surf_usm_h%koff
+        j_off = surf_usm_h%joff
+        i_off = surf_usm_h%ioff
+
+!        
+!--     First, treat horizontal surface elements
+        DO  m = 1, surf_usm_h%ns
+!
+!--        Get indices of respective grid point
+           i = surf_usm_h%i(m)
+           j = surf_usm_h%j(m)
+           k = surf_usm_h%k(m)
+!
+!--        TODO - how to calculate lambda_surface for horizontal surfaces
+!--        (lambda_surface is set according to stratification in land surface model)
+!--        MS: ???
+           IF ( surf_usm_h%ol(m) >= 0.0_wp )  THEN
+              lambda_surface = surf_usm_h%lambda_surf(m)
+              lambda_surface_window = surf_usm_h%lambda_surf_window(m)
+              lambda_surface_green = surf_usm_h%lambda_surf_green(m)
+           ELSE
+              lambda_surface = surf_usm_h%lambda_surf(m)
+              lambda_surface_window = surf_usm_h%lambda_surf_window(m)
+              lambda_surface_green = surf_usm_h%lambda_surf_green(m)
+           ENDIF
+#if ! defined( __nopointer )
+!            pt1  = pt(k,j,i)
+           IF ( humidity )  THEN
+              qv1 = q(k,j,i)
+           ELSE
+              qv1 = 0.0_wp
+           ENDIF
+!
+!--        calculate rho * c_p coefficient at surface layer
+           rho_cp  = c_p * hyp(k) / ( r_d * surf_usm_h%pt1(m) * exner(k) )
+
+if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then
+!
+!--         Calculate frequently used parameters
+            rho_lv    = rho_cp / c_p * l_v
+            drho_l_lv = 1.0_wp / (rho_l * l_v)
+endif
+#endif
+!
+!--        Calculate aerodyamic resistance. 
+!--        Calculation for horizontal surfaces follows LSM formulation
+!--        pt, us, ts are not available for the prognostic time step,
+!--        data from the last time step is used here.
+
+!--        Workaround: use single r_a as stability is only treated for the
+!--        average temperature
+           surf_usm_h%r_a(m) = ( surf_usm_h%pt1(m) - surf_usm_h%pt_surface(m) ) /&
+                               ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp )   
+           surf_usm_h%r_a_window(m) = surf_usm_h%r_a(m)
+           surf_usm_h%r_a_green(m)  = surf_usm_h%r_a(m)
+
+!            r_a = ( surf_usm_h%pt1(m) - t_surf_h(m) / exner(k) ) /                              &
+!                  ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp )
+!            r_a_window = ( surf_usm_h%pt1(m) - t_surf_window_h(m) / exner(k) ) /                &
+!                  ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp )
+!            r_a_green = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) /                  &
+!                  ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-20_wp )
+                
+!--        Make sure that the resistance does not drop to zero
+           IF ( surf_usm_h%r_a(m)        < 1.0_wp )                            &
+               surf_usm_h%r_a(m)        = 1.0_wp
+           IF ( surf_usm_h%r_a_green(m)  < 1.0_wp )                            &
+               surf_usm_h%r_a_green(m) = 1.0_wp
+           IF ( surf_usm_h%r_a_window(m) < 1.0_wp )                            &
+               surf_usm_h%r_a_window(m) = 1.0_wp
+              
+!
+!--        Make sure that the resistacne does not exceed a maxmium value in case
+!--        of zero velocities
+           IF ( surf_usm_h%r_a(m)        > 300.0_wp )                          &
+               surf_usm_h%r_a(m)        = 300.0_wp
+           IF ( surf_usm_h%r_a_green(m)  > 300.0_wp )                          &
+               surf_usm_h%r_a_green(m) = 300.0_wp
+           IF ( surf_usm_h%r_a_window(m) > 300.0_wp )                          &
+               surf_usm_h%r_a_window(m) = 300.0_wp                
+                
+                
+!--        factor for shf_eb
+           f_shf  = rho_cp / surf_usm_h%r_a(m)
+           f_shf_window  = rho_cp / surf_usm_h%r_a_window(m)
+           f_shf_green  = rho_cp / surf_usm_h%r_a_green(m)
+        
+!***************************************************************************************
+if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then
+!--    Adapted from LSM:
+!--    Second step: calculate canopy resistance r_canopy
+!--    f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation
+ 
+!--    f1: correction for incoming shortwave radiation (stomata close at 
+!--    night)
+       f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_h%rad_sw_in(m) + 0.05_wp ) / &
+                        (0.81_wp * (0.004_wp * surf_usm_h%rad_sw_in(m)      &
+                         + 1.0_wp)) )
+!
+!--    f2: correction for soil moisture availability to plants (the 
+!--    integrated soil moisture must thus be considered here)
+!--    f2 = 0 for very dry soils
+          m_total = 0.0_wp
+          DO  k = nzb_wall, nzt_wall+1
+              m_total = m_total + rootfr_h(nzb_wall,m)                              &
+                        * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m))
+          ENDDO 
+
+          IF ( m_total > wilt_h(nzb_wall,m)  .AND.  m_total < fc_h(nzb_wall,m) )  THEN
+             f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) )
+          ELSEIF ( m_total >= fc_h(nzb_wall,m) )  THEN
+             f2 = 1.0_wp
+          ELSE
+             f2 = 1.0E-20_wp
+          ENDIF
+
+!
+!--    Calculate water vapour pressure at saturation 
+       e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * ( t_surf_green_h(m) &
+                     - 273.16_wp ) / ( t_surf_green_h(m) - 35.86_wp ) )
+!
+!--    f3: correction for vapour pressure deficit
+       IF ( surf_usm_h%g_d(m) /= 0.0_wp )  THEN
+!
+!--       Calculate vapour pressure
+          e  = qv1 * surface_pressure / ( qv1 + 0.622_wp )
+          f3 = EXP ( - surf_usm_h%g_d(m) * (e_s - e) )
+       ELSE
+          f3 = 1.0_wp
+       ENDIF
+
+!
+!--    Calculate canopy resistance. In case that c_veg is 0 (bare soils),
+!--    this calculation is obsolete, as r_canopy is not used below.
+!--    To do: check for very dry soil -> r_canopy goes to infinity
+       surf_usm_h%r_canopy(m) = surf_usm_h%r_canopy_min(m) /                               &
+                              ( surf_usm_h%lai(m) * f1 * f2 * f3 + 1.0E-20_wp )
+
+!
+!--    Calculate the maximum possible liquid water amount on plants and
+!--    bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is
+!--    assumed, while paved surfaces might hold up 1 mm of water. The 
+!--    liquid water fraction for paved surfaces is calculated after 
+!--    Noilhan & Planton (1989), while the ECMWF formulation is used for
+!--    vegetated surfaces and bare soils.
+       m_liq_max = m_max_depth * ( surf_usm_h%lai(m) )
+       surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 )
+!
+!--    Calculate saturation specific humidity
+       q_s = 0.622_wp * e_s / ( surface_pressure - e_s )
+!
+!--    In case of dewfall, set evapotranspiration to zero
+!--    All super-saturated water is then removed from the air
+       IF ( humidity  .AND.  q_s <= qv1 )  THEN
+          surf_usm_h%r_canopy(m) = 0.0_wp
+       ENDIF
+
+!
+!--    Calculate coefficients for the total evapotranspiration 
+!--    In case of water surface, set vegetation and soil fluxes to zero.
+!--    For pavements, only evaporation of liquid water is possible.
+       f_qsws_veg  = rho_lv *                                &
+                         ( 1.0_wp        - surf_usm_h%c_liq(m)    ) /   &
+                         ( surf_usm_h%r_a_green(m) + surf_usm_h%r_canopy(m) )
+       f_qsws_liq  = rho_lv * surf_usm_h%c_liq(m)   /             &
+                           surf_usm_h%r_a_green(m)
+
+       f_qsws = f_qsws_veg + f_qsws_liq
+!
+!--    Calculate derivative of q_s for Taylor series expansion
+       e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_h(m) - 35.86_wp) -   &
+                        17.269_wp*( t_surf_green_h(m) - 273.16_wp)      &
+                       / ( t_surf_green_h(m) - 35.86_wp)**2 )
+
+       dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt )
+endif
+!***********************************************************************************
+!--        add LW up so that it can be removed in prognostic equation
+           surf_usm_h%rad_net_l(m) = surf_usm_h%rad_sw_in(m)  -                &
+                                     surf_usm_h%rad_sw_out(m) +                &
+                                     surf_usm_h%rad_lw_in(m)  -                &
+                                     surf_usm_h%rad_lw_out(m)
+
+!--        numerator of the prognostic equation
+!--     Todo: Adjust to tile approach. So far, emissivity for wall (element 0)
+!--           is used
+           coef_1 = surf_usm_h%rad_net_l(m) +                                  & 
+                 ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_veg_wall,m) * &
+                                       sigma_sb * t_surf_wall_h(m) ** 4 +           &  
+                                       f_shf * surf_usm_h%pt1(m) +             &
+                                       lambda_surface * t_wall_h(nzb_wall,m)
+if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then
+           coef_window_1 = surf_usm_h%rad_net_l(m) +                           & 
+                   ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_wat_win,m)  &
+                                       * sigma_sb * t_surf_window_h(m) ** 4 +  &  
+                                       f_shf_window * surf_usm_h%pt1(m) +      &
+                                       lambda_surface_window * t_window_h(nzb_wall,m)
+endif                 
+         IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) )  THEN
+                    coef_green_1 = surf_usm_h%rad_net_l(m) +                              & 
+                   ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb * &
+                                       t_surf_green_h(m) ** 4 +                  &  
+                                          f_shf_green * surf_usm_h%pt1(m) + f_qsws * ( qv1 - q_s    &
+                                          + dq_s_dt * t_surf_green_h(m) )        &
+                                          +lambda_surface_green * t_green_h(nzb_wall,m)
+           ELSE
+           coef_green_1 = surf_usm_h%rad_net_l(m) +                            & 
+                 ( 3.0_wp + 1.0_wp ) * surf_usm_h%emissivity(ind_pav_green,m) *&
+                                       sigma_sb * t_surf_green_h(m) ** 4 +     &  
+                                       f_shf_green * surf_usm_h%pt1(m) +       &
+                                       lambda_surface_green * t_green_h(nzb_wall,m)
+          ENDIF
+
+!--        denominator of the prognostic equation
+           coef_2 = 4.0_wp * surf_usm_h%emissivity(ind_veg_wall,m) *           &
+                             sigma_sb * t_surf_wall_h(m) ** 3                       &
+                           + lambda_surface + f_shf / exner(k)
+if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then
+           coef_window_2 = 4.0_wp * surf_usm_h%emissivity(ind_wat_win,m) *     &
+                             sigma_sb * t_surf_window_h(m) ** 3                &
+                           + lambda_surface_window + f_shf_window / exner(k)
+endif
+           IF ( (humidity).and.(surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) )  THEN
+              coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb *    &
+                                t_surf_green_h(m) ** 3 + f_qsws * dq_s_dt        &
+                              + lambda_surface_green + f_shf_green / exner(k)
+           ELSE
+           coef_green_2 = 4.0_wp * surf_usm_h%emissivity(ind_pav_green,m) * sigma_sb *    &
+                             t_surf_green_h(m) ** 3                           &
+                           + lambda_surface_green + f_shf_green / exner(k)
+           ENDIF
+
+!--        implicit solution when the surface layer has no heat capacity,
+!--        otherwise use RK3 scheme.
+           t_surf_wall_h_p(m) = ( coef_1 * dt_3d * tsc(2) +                        &
+                             surf_usm_h%c_surface(m) * t_surf_wall_h(m) ) /        & 
+                           ( surf_usm_h%c_surface(m) + coef_2 * dt_3d * tsc(2) ) 
+if ((.NOT. spinup).AND.(surf_usm_h%frac(ind_wat_win,m).GT.0.0_wp)) then
+           t_surf_window_h_p(m) = ( coef_window_1 * dt_3d * tsc(2) +                        &
+                             surf_usm_h%c_surface_window(m) * t_surf_window_h(m) ) /        & 
+                           ( surf_usm_h%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) )
+endif
+           t_surf_green_h_p(m) = ( coef_green_1 * dt_3d * tsc(2) +                        &
+                             surf_usm_h%c_surface_green(m) * t_surf_green_h(m) ) /        & 
+                           ( surf_usm_h%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) 
+
+!--        add RK3 term
+           t_surf_wall_h_p(m) = t_surf_wall_h_p(m) + dt_3d * tsc(3) *                   &
+                           surf_usm_h%tt_surface_wall_m(m)
+
+           t_surf_window_h_p(m) = t_surf_window_h_p(m) + dt_3d * tsc(3) *     &
+                           surf_usm_h%tt_surface_window_m(m)
+
+           t_surf_green_h_p(m) = t_surf_green_h_p(m) + dt_3d * tsc(3) *       &
+                           surf_usm_h%tt_surface_green_m(m)
+!
+!--        Store surface temperature on pt_surface. Further, in case humidity is used
+!--        store also vpt_surface, which is, due to the lack of moisture on roofs simply
+!--        assumed to be the surface temperature.
+           surf_usm_h%pt_surface(m) = ( surf_usm_h%frac(ind_veg_wall,m) * t_surf_wall_h_p(m)   &
+                               + surf_usm_h%frac(ind_wat_win,m) * t_surf_window_h_p(m)   &
+                               + surf_usm_h%frac(ind_pav_green,m) * t_surf_green_h_p(m) )  &
+                               / exner(k)
+                               
+           IF ( humidity )  surf_usm_h%vpt_surface(m) =                        &
+                                                   surf_usm_h%pt_surface(m)
+
+!--        calculate true tendency
+           stend_wall = ( t_surf_wall_h_p(m) - t_surf_wall_h(m) - dt_3d * tsc(3) *           &
+                     surf_usm_h%tt_surface_wall_m(m)) / ( dt_3d  * tsc(2) )
+           stend_window = ( t_surf_window_h_p(m) - t_surf_window_h(m) - dt_3d * tsc(3) *        &
+                     surf_usm_h%tt_surface_window_m(m)) / ( dt_3d  * tsc(2) )
+           stend_green = ( t_surf_green_h_p(m) - t_surf_green_h(m) - dt_3d * tsc(3) *           &
+                     surf_usm_h%tt_surface_green_m(m)) / ( dt_3d  * tsc(2) )
+
+!--        calculate t_surf tendencies for the next Runge-Kutta step
+           IF ( timestep_scheme(1:5) == 'runge' )  THEN
+              IF ( intermediate_timestep_count == 1 )  THEN
+                 surf_usm_h%tt_surface_wall_m(m) = stend_wall
+                 surf_usm_h%tt_surface_window_m(m) = stend_window
+                 surf_usm_h%tt_surface_green_m(m) = stend_green
+              ELSEIF ( intermediate_timestep_count <                          &
+                        intermediate_timestep_count_max )  THEN
+                 surf_usm_h%tt_surface_wall_m(m) = -9.5625_wp * stend_wall +            &
+                                     5.3125_wp * surf_usm_h%tt_surface_wall_m(m)
+                 surf_usm_h%tt_surface_window_m(m) = -9.5625_wp * stend_window +   &
+                                     5.3125_wp * surf_usm_h%tt_surface_window_m(m)
+                 surf_usm_h%tt_surface_green_m(m) = -9.5625_wp * stend_green +     &
+                                     5.3125_wp * surf_usm_h%tt_surface_green_m(m)
+              ENDIF
+           ENDIF
+
+!--        in case of fast changes in the skin temperature, it is required to
+!--        update the radiative fluxes in order to keep the solution stable
+           IF ( ( ( ABS( t_surf_wall_h_p(m)   - t_surf_wall_h(m) )   > 1.0_wp )   .OR. &
+                (   ABS( t_surf_green_h_p(m)  - t_surf_green_h(m) )  > 1.0_wp )   .OR. &
+                (   ABS( t_surf_window_h_p(m) - t_surf_window_h(m) ) > 1.0_wp ) )      &
+                   .AND.  unscheduled_radiation_calls  )  THEN
+              force_radiation_call_l = .TRUE.
+           ENDIF
+!
+!--        calculate fluxes
+!--        rad_net_l is never used!
+           surf_usm_h%rad_net_l(m) = surf_usm_h%rad_net_l(m) +                           &
+                                     surf_usm_h%frac(ind_veg_wall,m) *                   &
+                                     sigma_sb * surf_usm_h%emissivity(ind_veg_wall,m) *  &
+                                     ( t_surf_wall_h_p(m)**4 - t_surf_wall_h(m)**4 )               &
+                                    + surf_usm_h%frac(ind_wat_win,m) *                   &
+                                     sigma_sb * surf_usm_h%emissivity(ind_wat_win,m) *   &
+                                     ( t_surf_window_h_p(m)**4 - t_surf_window_h(m)**4 ) &
+                                    + surf_usm_h%frac(ind_pav_green,m) *                 &
+                                     sigma_sb * surf_usm_h%emissivity(ind_pav_green,m) * &
+                                     ( t_surf_green_h_p(m)**4 - t_surf_green_h(m)**4 )
+
+           surf_usm_h%wghf_eb(m)   = lambda_surface *                         &
+                                      ( t_surf_wall_h_p(m) - t_wall_h(nzb_wall,m) )
+           surf_usm_h%wghf_eb_green(m)  = lambda_surface_green *                         &
+                                          ( t_surf_green_h_p(m) - t_green_h(nzb_wall,m) )
+           surf_usm_h%wghf_eb_window(m) = lambda_surface_window *                        &
+                                           ( t_surf_window_h_p(m) - t_window_h(nzb_wall,m) )
+
+!
+!--        ground/wall/roof surface heat flux
+           surf_usm_h%wshf_eb(m)   = - f_shf  * ( surf_usm_h%pt1(m) - t_surf_wall_h_p(m) / exner(k) ) *               &
+                                       surf_usm_h%frac(ind_veg_wall,m)         &
+                                     - f_shf_window  * ( surf_usm_h%pt1(m) - t_surf_window_h_p(m) / exner(k) ) * &
+                                       surf_usm_h%frac(ind_wat_win,m)          &
+                                     - f_shf_green  * ( surf_usm_h%pt1(m) - t_surf_green_h_p(m) / exner(k) ) *   &
+                                       surf_usm_h%frac(ind_pav_green,m)
+!           
+!--        store kinematic surface heat fluxes for utilization in other processes
+!--        diffusion_s, surface_layer_fluxes,...
+           surf_usm_h%shf(m) = surf_usm_h%wshf_eb(m) / c_p
+      
+!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+if (surf_usm_h%frac(ind_pav_green,m).gt.0.0_wp) then
+
+! print*, "tsurfroofgreen",m,t_surf_green_h_p(m),i,j,k,surf_usm_h%wghf_eb_green(m),surf_usm_h%rad_net_l(m),&
+!         surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt
+! print*, "B",surf_usm_h%rad_sw_in(m),surf_usm_h%rad_sw_out(m),surf_usm_h%rad_lw_in(m),surf_usm_h%rad_lw_out(m)
+! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k
+! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m)
+if ((t_surf_green_h_p(m).gt.370.0_wp).or.(t_surf_green_h_p(m).lt.250.0_wp)) then
+  print*, t_surf_green_h_p(m),m,i,j,k
+  stop
+endif
+
+       IF ( humidity )  THEN
+          surf_usm_h%qsws_eb(m)  = - f_qsws * ( qv1 - q_s + dq_s_dt                     &
+                          * t_surf_green_h(m) - dq_s_dt *               &
+                            t_surf_green_h_p(m) )
+
+          surf_usm_h%qsws(m) = surf_usm_h%qsws_eb(m) / rho_lv
+
+          surf_usm_h%qsws_veg_eb(m)  = - f_qsws_veg  * ( qv1 - q_s                      &
+                              + dq_s_dt * t_surf_green_h(m) - dq_s_dt   &
+                              * t_surf_green_h_p(m) )
+
+          surf_usm_h%qsws_liq_eb(m)  = - f_qsws_liq  * ( qv1 - q_s                      &
+                              + dq_s_dt * t_surf_green_h(m) - dq_s_dt   &
+                              * t_surf_green_h_p(m) )
+       ENDIF
+
+!
+!--    Calculate the true surface resistance
+       IF ( .NOT.  humidity )  THEN
+          surf_usm_h%r_s(m) = 1.0E10_wp
+       ELSE
+          surf_usm_h%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt                       &
+                          *  t_surf_green_h(m) - dq_s_dt *               &
+                            t_surf_green_h_p(m) ) /                     &
+                            (surf_usm_h%qsws(m) + 1.0E-20)  - surf_usm_h%r_a_green(m)
+       ENDIF
+
+!
+!--    Calculate change in liquid water reservoir due to dew fall or 
+!--    evaporation of liquid water
+       IF ( humidity )  THEN
+!
+!--       If precipitation is activated, add rain water to qsws_liq
+!--       and qsws_soil according the the vegetation coverage.
+!--       precipitation_rate is given in mm.
+          IF ( precipitation )  THEN
+
+!
+!--          Add precipitation to liquid water reservoir, if possible.
+!--          Otherwise, add the water to soil. In case of
+!--          pavements, the exceeding water amount is implicitely removed 
+!--          as runoff as qsws_soil is then not used in the soil model
+             IF ( m_liq_usm_h%var_usm_1d(m) /= m_liq_max )  THEN
+                surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m)                            &
+                                 + surf_usm_h%frac(ind_pav_green,m) * prr(k+k_off,j+j_off,i+i_off)&
+                                 * hyrho(k+k_off)                              &
+                                 * 0.001_wp * rho_l * l_v
+             ENDIF
+
+          ENDIF
+
+!
+!--       If the air is saturated, check the reservoir water level
+          IF ( surf_usm_h%qsws(m) < 0.0_wp )  THEN
+!
+!--          Check if reservoir is full (avoid values > m_liq_max)
+!--          In that case, qsws_liq goes to qsws_soil. In this 
+!--          case qsws_veg is zero anyway (because c_liq = 1),       
+!--          so that tend is zero and no further check is needed
+             IF ( m_liq_usm_h%var_usm_1d(m) == m_liq_max )  THEN
+!                 surf_usm_h%qsws_soil(m) = surf_usm_h%qsws_soil(m) + surf_usm_h%qsws_liq(m)
+
+                surf_usm_h%qsws_liq_eb(m)  = 0.0_wp
+             ENDIF
+
+!
+!--          In case qsws_veg becomes negative (unphysical behavior), 
+!--          let the water enter the liquid water reservoir as dew on the
+!--          plant
+             IF ( surf_usm_h%qsws_veg_eb(m) < 0.0_wp )  THEN
+                surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m)
+                surf_usm_h%qsws_veg_eb(m) = 0.0_wp
+             ENDIF
+          ENDIF                    
+ 
+          surf_usm_h%qsws(m) = surf_usm_h%qsws(m) / l_v
+ 
+          tend = - surf_usm_h%qsws_liq_eb(m) * drho_l_lv
+          m_liq_usm_h_p%var_usm_1d(m) = m_liq_usm_h%var_usm_1d(m) + dt_3d *    &
+                                        ( tsc(2) * tend +                      &
+                                          tsc(3) * tm_liq_usm_h_m%var_usm_1d(m) )
+!
+!--       Check if reservoir is overfull -> reduce to maximum
+!--       (conservation of water is violated here)
+          m_liq_usm_h_p%var_usm_1d(m) = MIN( m_liq_usm_h_p%var_usm_1d(m),m_liq_max )
+
+!
+!--       Check if reservoir is empty (avoid values < 0.0)
+!--       (conservation of water is violated here)
+          m_liq_usm_h_p%var_usm_1d(m) = MAX( m_liq_usm_h_p%var_usm_1d(m), 0.0_wp )
+!
+!--       Calculate m_liq tendencies for the next Runge-Kutta step
+          IF ( timestep_scheme(1:5) == 'runge' )  THEN
+             IF ( intermediate_timestep_count == 1 )  THEN
+                tm_liq_usm_h_m%var_usm_1d(m) = tend
+             ELSEIF ( intermediate_timestep_count <                            &
+                      intermediate_timestep_count_max )  THEN
+                tm_liq_usm_h_m%var_usm_1d(m) = -9.5625_wp * tend +             &
+                                              5.3125_wp * tm_liq_usm_h_m%var_usm_1d(m)
+             ENDIF
+          ENDIF
+
+       ENDIF
+else
+  surf_usm_h%r_s(m) = 1.0E10_wp
+endif
+
+       ENDDO
+!
+!--    Now, treat vertical surface elements
+       DO  l = 0, 3
+          DO  m = 1, surf_usm_v(l)%ns
+!
+!--          Get indices of respective grid point
+             i = surf_usm_v(l)%i(m)
+             j = surf_usm_v(l)%j(m)
+             k = surf_usm_v(l)%k(m)
+
+!
+!--          TODO - how to calculate lambda_surface for horizontal (??? do you mean verical ???) surfaces
+!--          (lambda_surface is set according to stratification in land surface model).
+!--          Please note, for vertical surfaces no ol is defined, since 
+!--          stratification is not considered in this case.
+             lambda_surface = surf_usm_v(l)%lambda_surf(m)
+             lambda_surface_window = surf_usm_v(l)%lambda_surf_window(m)
+             lambda_surface_green = surf_usm_v(l)%lambda_surf_green(m)
+
+#if ! defined( __nopointer )          
+!            pt1  = pt(k,j,i)
+           IF ( humidity )  THEN
+              qv1 = q(k,j,i)
+           ELSE
+              qv1 = 0.0_wp
+           ENDIF
+!
+!--          calculate rho * c_p coefficient at wall layer
+             rho_cp  = c_p * hyp(k) / ( r_d * surf_usm_v(l)%pt1(m) * exner(k) )
+             
+if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then
+!
+!--         Calculate frequently used parameters
+            rho_lv    = rho_cp / c_p * l_v
+            drho_l_lv = 1.0_wp / (rho_l * l_v)
+endif
+#endif
+
+!--          Calculation of r_a for vertical surfaces
+!--
+!--          heat transfer coefficient for forced convection along vertical walls
+!--          follows formulation in TUF3d model (Krayenhoff & Voogt, 2006)
+!--            
+!--          H = httc (Tsfc - Tair)
+!--          httc = rw * (11.8 + 4.2 * Ueff) - 4.0
+!--            
+!--                rw: wall patch roughness relative to 1.0 for concrete
+!--                Ueff: effective wind speed
+!--                - 4.0 is a reduction of Rowley et al (1930) formulation based on
+!--                Cole and Sturrock (1977)
+!--           
+!--                Ucan: Canyon wind speed
+!--                wstar: convective velocity
+!--                Qs: surface heat flux
+!--                zH: height of the convective layer
+!--                wstar = (g/Tcan*Qs*zH)**(1./3.)
+                
+!--          Effective velocity components must always 
+!--          be defined at scalar grid point. The wall normal component is 
+!--          obtained by simple linear interpolation. ( An alternative would
+!--          be an logarithmic interpolation. )
+!--          Parameter roughness_concrete (default value = 0.001) is used
+!--          to calculation of roughness relative to concrete
+             surf_usm_v(l)%r_a(m) = rho_cp / ( surf_usm_v(l)%z0(m) /           &
+                        roughness_concrete * ( 11.8_wp + 4.2_wp *              &
+                        SQRT( MAX( ( ( u(k,j,i) + u(k,j,i+1) ) * 0.5_wp )**2 + &
+                                   ( ( v(k,j,i) + v(k,j+1,i) ) * 0.5_wp )**2 + &
+                                   ( ( w(k,j,i) + w(k-1,j,i) ) * 0.5_wp )**2,  &
+                              0.01_wp ) )                                      &
+                           )  - 4.0_wp  ) 
+!
+!--          Limit aerodynamic resistance
+             IF ( surf_usm_v(l)%r_a(m) < 1.0_wp )  surf_usm_v(l)%r_a(m) = 1.0_wp   
+             
+                           
+             f_shf         = rho_cp / surf_usm_v(l)%r_a(m)
+             f_shf_window  = rho_cp / surf_usm_v(l)%r_a(m)
+             f_shf_green   = rho_cp / surf_usm_v(l)%r_a(m)
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+if (surf_usm_v(l)%frac(1,m).gt.0.0_wp) then
+!--    Adapted from LSM:
+!--    Second step: calculate canopy resistance r_canopy
+!--    f1-f3 here are defined as 1/f1-f3 as in ECMWF documentation
+ 
+!--    f1: correction for incoming shortwave radiation (stomata close at 
+!--    night)
+       f1 = MIN( 1.0_wp, ( 0.004_wp * surf_usm_v(l)%rad_sw_in(m) + 0.05_wp ) / &
+                        (0.81_wp * (0.004_wp * surf_usm_v(l)%rad_sw_in(m)      &
+                         + 1.0_wp)) )
+!
+!--    f2: correction for soil moisture availability to plants (the 
+!--    integrated soil moisture must thus be considered here)
+!--    f2 = 0 for very dry soils
+
+f2=1.0_wp
+!           m_total = 0.0_wp
+!           DO  k = nzb_wall, nzt_wall+1
+!               m_total = m_total + rootfr_h(nzb_wall,m)                              &
+!                         * MAX(swc_h(nzb_wall,m),wilt_h(nzb_wall,m))
+!           ENDDO 
+! 
+!           IF ( m_total > wilt_h(nzb_wall,m)  .AND.  m_total < fc_h(nzb_wall,m) )  THEN
+!              f2 = ( m_total - wilt_h(nzb_wall,m) ) / (fc_h(nzb_wall,m) - wilt_h(nzb_wall,m) )
+!           ELSEIF ( m_total >= fc_h(nzb_wall,m) )  THEN
+!              f2 = 1.0_wp
+!           ELSE
+!              f2 = 1.0E-20_wp
+!           ENDIF
+
+!
+!--    Calculate water vapour pressure at saturation 
+       e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp * (  t_surf_green_v_p(l)%t(m) &
+                     - 273.16_wp ) / (  t_surf_green_v_p(l)%t(m) - 35.86_wp ) )
+!
+!--    f3: correction for vapour pressure deficit
+       IF ( surf_usm_v(l)%g_d(m) /= 0.0_wp )  THEN
+!
+!--       Calculate vapour pressure
+          e  = qv1 * surface_pressure / ( qv1 + 0.622_wp )
+          f3 = EXP ( - surf_usm_v(l)%g_d(m) * (e_s - e) )
+       ELSE
+          f3 = 1.0_wp
+       ENDIF
+!
+!--    Calculate canopy resistance. In case that c_veg is 0 (bare soils),
+!--    this calculation is obsolete, as r_canopy is not used below.
+!--    To do: check for very dry soil -> r_canopy goes to infinity
+       surf_usm_v(l)%r_canopy(m) = surf_usm_v(l)%r_canopy_min(m) /                               &
+                              ( surf_usm_v(l)%lai(m) * f1 * f2 * f3 + 1.0E-20_wp )
+                              
+! !--    Calculate the maximum possible liquid water amount on plants and
+! !--    bare surface. For vegetated surfaces, a maximum depth of 0.2 mm is
+! !--    assumed, while paved surfaces might hold up 1 mm of water. The 
+! !--    liquid water fraction for paved surfaces is calculated after 
+! !--    Noilhan & Planton (1989), while the ECMWF formulation is used for
+! !--    vegetated surfaces and bare soils.
+! ! surf_usm_h%lai(m)=4.0_wp
+!        m_liq_max = m_max_depth * ( surf_usm_h%lai(m) )
+!        surf_usm_h%c_liq(m) = MIN( 1.0_wp, ( m_liq_usm_h%var_usm_1d(m) / m_liq_max )**0.67 )
+!
+!--    Calculate saturation specific humidity
+       q_s = 0.622_wp * e_s / ( surface_pressure - e_s )
+!
+!--    In case of dewfall, set evapotranspiration to zero
+!--    All super-saturated water is then removed from the air
+       IF ( humidity  .AND.  q_s <= qv1 )  THEN
+          surf_usm_v(l)%r_canopy(m) = 0.0_wp
+       ENDIF
+
+!
+!--    Calculate coefficients for the total evapotranspiration 
+!--    In case of water surface, set vegetation and soil fluxes to zero.
+!--    For pavements, only evaporation of liquid water is possible.
+       f_qsws_veg  = rho_lv *                                &
+                         ( 1.0_wp        - 0.0_wp ) / & !surf_usm_h%c_liq(m)    ) /   &
+                         ( surf_usm_v(l)%r_a(m) + surf_usm_v(l)%r_canopy(m) )
+!        f_qsws_liq  = rho_lv * surf_usm_h%c_liq(m)   /             &
+!                            surf_usm_h%r_a_green(m)
+
+       f_qsws = f_qsws_veg! + f_qsws_liq
+!
+!--    Calculate derivative of q_s for Taylor series expansion
+       e_s_dt = e_s * ( 17.269_wp / ( t_surf_green_v_p(l)%t(m) - 35.86_wp) -   &
+                        17.269_wp*( t_surf_green_v_p(l)%t(m) - 273.16_wp)      &
+                       / ( t_surf_green_v_p(l)%t(m) - 35.86_wp)**2 )
+
+       dq_s_dt = 0.622_wp * e_s_dt / ( surface_pressure - e_s_dt )
+endif
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+                
+!--          add LW up so that it can be removed in prognostic equation
+             surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%rad_sw_in(m)  -        &
+                                          surf_usm_v(l)%rad_sw_out(m) +        &
+                                          surf_usm_v(l)%rad_lw_in(m)  -        &
+                                          surf_usm_v(l)%rad_lw_out(m)
+
+!--           numerator of the prognostic equation
+              coef_1 = surf_usm_v(l)%rad_net_l(m) +                            & ! coef +1 corresponds to -lwout included in calculation of radnet_l
+             ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_veg_wall,m) *  &
+                                     sigma_sb *  t_surf_wall_v(l)%t(m) ** 4 +       &  
+                                     f_shf * surf_usm_v(l)%pt1(m) +            &
+                                     lambda_surface * t_wall_v(l)%t(nzb_wall,m)
+if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then
+              coef_window_1 = surf_usm_v(l)%rad_net_l(m) +                     & ! coef +1 corresponds to -lwout included in calculation of radnet_l
+               ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_wat_win,m) * &
+                                     sigma_sb * t_surf_window_v(l)%t(m) ** 4 + &  
+                                     f_shf * surf_usm_v(l)%pt1(m) +            &
+                                     lambda_surface_window * t_window_v(l)%t(nzb_wall,m)
+endif
+           IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) )  THEN
+              coef_green_1 = surf_usm_v(l)%rad_net_l(m) +                      & ! coef +1 corresponds to -lwout included in calculation of radnet_l
+               ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb *  &
+                                     t_surf_green_v(l)%t(m) ** 4 +               &  
+                                     f_shf * surf_usm_v(l)%pt1(m) +     f_qsws * ( qv1 - q_s    &
+                                          + dq_s_dt * t_surf_green_v(l)%t(m) ) +            &
+                                     lambda_surface_green * t_wall_v(l)%t(nzb_wall,m)
+           ELSE
+              coef_green_1 = surf_usm_v(l)%rad_net_l(m) +                        & ! coef +1 corresponds to -lwout included in calculation of radnet_l
+               ( 3.0_wp + 1.0_wp ) * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb *  &
+                                     t_surf_green_v(l)%t(m) ** 4 +               &  
+                                     f_shf * surf_usm_v(l)%pt1(m) +            &
+                                     lambda_surface_green * t_wall_v(l)%t(nzb_wall,m)
+           ENDIF
+                                     
+
+!--           denominator of the prognostic equation
+              coef_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_veg_wall,m) * sigma_sb *           &
+                                t_surf_wall_v(l)%t(m) ** 3                           &
+                              + lambda_surface + f_shf / exner(k)  
+if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then             
+              coef_window_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_wat_win,m) * sigma_sb *           &
+                                t_surf_window_v(l)%t(m) ** 3                         &
+                              + lambda_surface_window + f_shf / exner(k)
+endif
+           IF ( (humidity).and.(surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) )  THEN
+               coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb *     &
+                                t_surf_green_v(l)%t(m) ** 3  + f_qsws * dq_s_dt      &
+                              + lambda_surface_green + f_shf / exner(k)
+           ELSE
+              coef_green_2 = 4.0_wp * surf_usm_v(l)%emissivity(ind_pav_green,m) * sigma_sb *     &
+                                t_surf_green_v(l)%t(m) ** 3                          &
+                              + lambda_surface_green + f_shf / exner(k)
+           ENDIF
+
+!--           implicit solution when the surface layer has no heat capacity,
+!--           otherwise use RK3 scheme.
+              t_surf_wall_v_p(l)%t(m) = ( coef_1 * dt_3d * tsc(2) +                 &
+                             surf_usm_v(l)%c_surface(m) * t_surf_wall_v(l)%t(m) ) / & 
+                           ( surf_usm_v(l)%c_surface(m) + coef_2 * dt_3d * tsc(2) ) 
+if ((.NOT. spinup).AND.(surf_usm_v(l)%frac(ind_wat_win,m).GT.0.0_wp)) then
+              t_surf_window_v_p(l)%t(m) = ( coef_window_1 * dt_3d * tsc(2) +                 &
+                             surf_usm_v(l)%c_surface_window(m) * t_surf_window_v(l)%t(m) ) / & 
+                           ( surf_usm_v(l)%c_surface_window(m) + coef_window_2 * dt_3d * tsc(2) ) 
+endif
+              t_surf_green_v_p(l)%t(m) = ( coef_green_1 * dt_3d * tsc(2) +                 &
+                             surf_usm_v(l)%c_surface_green(m) * t_surf_green_v(l)%t(m) ) / & 
+                           ( surf_usm_v(l)%c_surface_green(m) + coef_green_2 * dt_3d * tsc(2) ) 
+
+!--           add RK3 term
+              t_surf_wall_v_p(l)%t(m) = t_surf_wall_v_p(l)%t(m) + dt_3d * tsc(3) *         &
+                                surf_usm_v(l)%tt_surface_wall_m(m)
+              t_surf_window_v_p(l)%t(m) = t_surf_window_v_p(l)%t(m) + dt_3d * tsc(3) *     &
+                                surf_usm_v(l)%tt_surface_window_m(m)
+              t_surf_green_v_p(l)%t(m) = t_surf_green_v_p(l)%t(m) + dt_3d * tsc(3) *       &
+                                surf_usm_v(l)%tt_surface_green_m(m)
+!
+!--           Store surface temperature. Further, in case humidity is used
+!--           store also vpt_surface, which is, due to the lack of moisture on roofs simply
+!--           assumed to be the surface temperature.     
+              surf_usm_v(l)%pt_surface(m) =  ( surf_usm_v(l)%frac(ind_veg_wall,m) * t_surf_wall_v_p(l)%t(m)  &
+                                      + surf_usm_v(l)%frac(ind_wat_win,m) * t_surf_window_v_p(l)%t(m)  &
+                                      + surf_usm_v(l)%frac(ind_pav_green,m) * t_surf_green_v_p(l)%t(m) ) &
+                                      / exner(k)
+                                      
+              IF ( humidity )  surf_usm_v(l)%vpt_surface(m) =                  &
+                                                    surf_usm_v(l)%pt_surface(m)
+
+!--           calculate true tendency
+              stend_wall = ( t_surf_wall_v_p(l)%t(m) - t_surf_wall_v(l)%t(m) - dt_3d * tsc(3) *&
+                        surf_usm_v(l)%tt_surface_wall_m(m) ) / ( dt_3d  * tsc(2) )
+              stend_window = ( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) - dt_3d * tsc(3) *&
+                        surf_usm_v(l)%tt_surface_window_m(m) ) / ( dt_3d  * tsc(2) )
+              stend_green = ( t_surf_green_v_p(l)%t(m) - t_surf_green_v(l)%t(m) - dt_3d * tsc(3) *   &
+                        surf_usm_v(l)%tt_surface_green_m(m) ) / ( dt_3d  * tsc(2) )
+
+!--           calculate t_surf_* tendencies for the next Runge-Kutta step
+              IF ( timestep_scheme(1:5) == 'runge' )  THEN
+                 IF ( intermediate_timestep_count == 1 )  THEN
+                    surf_usm_v(l)%tt_surface_wall_m(m) = stend_wall
+                    surf_usm_v(l)%tt_surface_window_m(m) = stend_window
+                    surf_usm_v(l)%tt_surface_green_m(m) = stend_green
+                 ELSEIF ( intermediate_timestep_count <                                 &
+                          intermediate_timestep_count_max )  THEN
+                    surf_usm_v(l)%tt_surface_wall_m(m) = -9.5625_wp * stend_wall +      &
+                                     5.3125_wp * surf_usm_v(l)%tt_surface_wall_m(m)
+                    surf_usm_v(l)%tt_surface_green_m(m) = -9.5625_wp * stend_green +    &
+                                     5.3125_wp * surf_usm_v(l)%tt_surface_green_m(m)
+                    surf_usm_v(l)%tt_surface_window_m(m) = -9.5625_wp * stend_window +  &
+                                     5.3125_wp * surf_usm_v(l)%tt_surface_window_m(m)
+                 ENDIF
+              ENDIF
+
+!--           in case of fast changes in the skin temperature, it is required to
+!--           update the radiative fluxes in order to keep the solution stable
+
+              IF ( ( ( ABS( t_surf_wall_v_p(l)%t(m)   - t_surf_wall_v(l)%t(m) )   > 1.0_wp ) .OR. &
+                   (   ABS( t_surf_green_v_p(l)%t(m)  - t_surf_green_v(l)%t(m) )  > 1.0_wp ) .OR. &
+                   (   ABS( t_surf_window_v_p(l)%t(m) - t_surf_window_v(l)%t(m) ) > 1.0_wp ) )    &
+                      .AND.  unscheduled_radiation_calls )  THEN
+                 force_radiation_call_l = .TRUE.
+              ENDIF
+
+!--           calculate fluxes
+!--           prognostic rad_net_l is used just for output!           
+              surf_usm_v(l)%rad_net_l(m) = surf_usm_v(l)%frac(ind_veg_wall,m) *                      &
+                                           ( surf_usm_v(l)%rad_net_l(m) +                            &
+                                           3.0_wp * sigma_sb *                                       &
+                                           t_surf_wall_v(l)%t(m)**4 - 4.0_wp * sigma_sb *                 &
+                                           t_surf_wall_v(l)%t(m)**3 * t_surf_wall_v_p(l)%t(m) )                &
+                                         + surf_usm_v(l)%frac(ind_wat_win,m) *                       &
+                                           ( surf_usm_v(l)%rad_net_l(m) +                            &
+                                           3.0_wp * sigma_sb *                                       &
+                                           t_surf_window_v(l)%t(m)**4 - 4.0_wp * sigma_sb *          &
+                                           t_surf_window_v(l)%t(m)**3 * t_surf_window_v_p(l)%t(m) )  &
+                                         + surf_usm_v(l)%frac(ind_pav_green,m) *                     &
+                                           ( surf_usm_v(l)%rad_net_l(m) +                            &
+                                           3.0_wp * sigma_sb *                                       &
+                                           t_surf_green_v(l)%t(m)**4 - 4.0_wp * sigma_sb *           &
+                                           t_surf_green_v(l)%t(m)**3 * t_surf_green_v_p(l)%t(m) )
+
+              surf_usm_v(l)%wghf_eb_window(m) = lambda_surface_window * &
+                                                ( t_surf_window_v_p(l)%t(m) - t_window_v(l)%t(nzb_wall,m) )
+              surf_usm_v(l)%wghf_eb(m)   = lambda_surface *                    &
+                                     ( t_surf_wall_v_p(l)%t(m) - t_wall_v(l)%t(nzb_wall,m) )
+              surf_usm_v(l)%wghf_eb_green(m)  = lambda_surface_green *  &
+                                                ( t_surf_green_v_p(l)%t(m) - t_green_v(l)%t(nzb_wall,m) )
+
+!--           ground/wall/roof surface heat flux
+              surf_usm_v(l)%wshf_eb(m)   =                                     &
+                 - f_shf  * ( surf_usm_v(l)%pt1(m) -                           &
+                 t_surf_wall_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_veg_wall,m)       &
+                 - f_shf_window  * ( surf_usm_v(l)%pt1(m) -                    &
+                 t_surf_window_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_wat_win,m)&
+                 - f_shf_green  * ( surf_usm_v(l)%pt1(m) -                     &
+                 t_surf_green_v_p(l)%t(m) / exner(k) ) * surf_usm_v(l)%frac(ind_pav_green,m)
+
+!           
+!--           store kinematic surface heat fluxes for utilization in other processes
+!--           diffusion_s, surface_layer_fluxes,...
+              surf_usm_v(l)%shf(m) = surf_usm_v(l)%wshf_eb(m) / c_p
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+if (surf_usm_v(l)%frac(ind_pav_green,m).gt.0.0_wp) then !111
+
+! print*, "tsurfroofgreen",m,t_surf_green_h_p(m),i,j,k,surf_usm_h%wghf_eb_green(m),surf_usm_h%rad_net_l(m),&
+!         surf_usm_h%wshf_eb(m),f_qsws_veg,f_qsws_liq,dq_s_dt
+! print*, "B",surf_usm_h%rad_sw_in(m),surf_usm_h%rad_sw_out(m),surf_usm_h%rad_lw_in(m),surf_usm_h%rad_lw_out(m)
+! print*, "lambdasurface",lambda_surface_green,lambda_surface,i,j,k
+! print*, "fractions",i,j,k,surf_usm_h%frac(0:2,m)
+if ((t_surf_green_v_p(l)%t(m).gt.370.0_wp).or.(t_surf_green_v_p(l)%t(m).lt.250.0_wp)) then
+  print*, t_surf_green_v_p(l)%t(m),m,i,j,k
+  stop
+endif
+
+       IF ( humidity )  THEN
+          surf_usm_v(l)%qsws_eb(m)  = - f_qsws * ( qv1 - q_s + dq_s_dt                     &
+                          * t_surf_green_v(l)%t(m) - dq_s_dt *               &
+                            t_surf_green_v_p(l)%t(m) )
+
+          surf_usm_v(l)%qsws(m) = surf_usm_v(l)%qsws_eb(m) / rho_lv
+
+          surf_usm_v(l)%qsws_veg_eb(m)  = - f_qsws_veg  * ( qv1 - q_s                      &
+                              + dq_s_dt * t_surf_green_v(l)%t(m) - dq_s_dt   &
+                              * t_surf_green_v_p(l)%t(m) )
+
+!           surf_usm_h%qsws_liq_eb(m)  = - f_qsws_liq  * ( qv1 - q_s                      &
+!                               + dq_s_dt * t_surf_green_h(m) - dq_s_dt   &
+!                               * t_surf_green_h_p(m) )
+       ENDIF
+
+!
+!--    Calculate the true surface resistance
+       IF ( .NOT.  humidity )  THEN
+          surf_usm_v(l)%r_s(m) = 1.0E10_wp
+       ELSE
+          surf_usm_v(l)%r_s(m) = - rho_lv * ( qv1 - q_s + dq_s_dt                       &
+                          *  t_surf_green_v(l)%t(m) - dq_s_dt *               &
+                            t_surf_green_v_p(l)%t(m) ) /                     &
+                            (surf_usm_v(l)%qsws(m) + 1.0E-20)  - surf_usm_v(l)%r_a(m)
+       ENDIF
+
+       
+!
+!--    Calculate change in liquid water reservoir due to dew fall or 
+!--    evaporation of liquid water
+       IF ( humidity )  THEN
+!
+!--       If the air is saturated, check the reservoir water level
+          IF ( surf_usm_v(l)%qsws(m) < 0.0_wp )  THEN
+       
+!
+!--          In case qsws_veg becomes negative (unphysical behavior), 
+!--          let the water enter the liquid water reservoir as dew on the
+!--          plant
+             IF ( surf_usm_v(l)%qsws_veg_eb(m) < 0.0_wp )  THEN
+!                 surf_usm_h%qsws_liq_eb(m) = surf_usm_h%qsws_liq_eb(m) + surf_usm_h%qsws_veg_eb(m)
+                surf_usm_v(l)%qsws_veg_eb(m) = 0.0_wp
+             ENDIF
+          ENDIF   
+    ENDIF
+else
+  surf_usm_v(l)%r_s(m) = 1.0E10_wp
+endif !111
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+           ENDDO
+
+        ENDDO
+!
+!--     Add-up anthropogenic heat, for now only at upward-facing surfaces
+        IF ( usm_anthropogenic_heat  .AND.  &
+             intermediate_timestep_count == intermediate_timestep_count_max )  THEN
+!--        application of the additional anthropogenic heat sources
+!--        we considere the traffic for now so all heat is absorbed
+!--        to the first layer, generalization would be worth. 
+            
+!--        calculation of actual profile coefficient
+!--        ??? check time_since_reference_point ???
+           dtime = mod(simulated_time + time_utc_init, 24.0_wp*3600.0_wp)
+           dhour = INT(dtime/3600.0_wp)
+           DO i = nxl, nxr
+              DO j = nys, nyn
+                 DO k = nzub, min(nzut,naheatlayers)
+                    IF ( k > get_topography_top_index_ji( j, i, 's' ) ) THEN
+!--                    increase of pt in box i,j,k in time dt_3d 
+!--                    given to anthropogenic heat aheat*acoef (W*m-2)
+!--                    linear interpolation of coeficient
+                       acoef = (REAL(dhour+1,wp)-dtime/3600.0_wp)*aheatprof(k,dhour) + &
+                               (dtime/3600.0_wp-REAL(dhour,wp))*aheatprof(k,dhour+1)
+                       IF ( aheat(k,j,i) > 0.0_wp )  THEN
+!--                       calculate rho * c_p coefficient at layer k
+                          rho_cp  = c_p * hyp(k) / ( r_d * pt(k+1,j,i) * exner(k) )
+                          pt(k,j,i) = pt(k,j,i) + aheat(k,j,i)*acoef*dt_3d/(exner(k)*rho_cp*dz(1))
+                       ENDIF
+                    ENDIF
+                 ENDDO
+              ENDDO
+           ENDDO
+
+        ENDIF
+        
+!--     pt and shf are defined on nxlg:nxrg,nysg:nyng
+!--     get the borders from neighbours
+#if ! defined( __nopointer )
+        CALL exchange_horiz( pt, nbgp )
+#endif
+
+!--     calculation of force_radiation_call:
+!--     Make logical OR for all processes.
+!--     Force radiation call if at least one processor forces it.
+        IF ( intermediate_timestep_count == intermediate_timestep_count_max-1 )&
+        THEN
+#if defined( __parallel )
+          IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+          CALL MPI_ALLREDUCE( force_radiation_call_l, force_radiation_call,    &
+                              1, MPI_LOGICAL, MPI_LOR, comm2d, ierr )
+#else
+          force_radiation_call = force_radiation_call_l
+#endif
+          force_radiation_call_l = .FALSE.
+       ENDIF
+
+! !
+! !-- Calculate surface specific humidity
+!     IF ( humidity )  THEN
+!        CALL calc_q_surface_usm
+!     ENDIF
+
+
+    CONTAINS
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of specific humidity of the skin layer (surface). It is assumend
+!> that the skin is always saturated.
+!------------------------------------------------------------------------------!
+       SUBROUTINE calc_q_surface_usm
+
+          IMPLICIT NONE
+
+          REAL(wp) :: resistance    !< aerodynamic and soil resistance term
+
+          DO  m = 1, surf_usm_h%ns
+
+             i   = surf_usm_h%i(m)            
+             j   = surf_usm_h%j(m)
+             k   = surf_usm_h%k(m)
+
+!
+!--          Calculate water vapour pressure at saturation
+             e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp *                  &
+                                    ( t_surf_green_h_p(m) - 273.16_wp ) /  &
+                                    ( t_surf_green_h_p(m) - 35.86_wp  )    &
+                                         )
+
+!
+!--          Calculate specific humidity at saturation
+             q_s = 0.622_wp * e_s / ( surface_pressure - e_s )
+
+!              surf_usm_h%r_a_green(m) = ( surf_usm_h%pt1(m) - t_surf_green_h(m) / exner(k) ) /                  &
+!                    ( surf_usm_h%ts(m) * surf_usm_h%us(m) + 1.0E-10_wp )
+!                 
+! !--          make sure that the resistance does not drop to zero
+!              IF ( ABS(surf_usm_h%r_a_green(m)) < 1.0E-10_wp )  surf_usm_h%r_a_green(m) = 1.0E-10_wp
+
+             resistance = surf_usm_h%r_a_green(m) / ( surf_usm_h%r_a_green(m) + surf_usm_h%r_s(m) + 1E-5_wp )
+
+!
+!--          Calculate specific humidity at surface
+             IF ( bulk_cloud_model )  THEN
+                q(k,j,i) = resistance * q_s +                   &
+                                           ( 1.0_wp - resistance ) *              &
+                                           ( q(k,j,i) - ql(k,j,i) )
+             ELSE
+                q(k,j,i) = resistance * q_s +                   &
+                                           ( 1.0_wp - resistance ) *              &
+                                             q(k,j,i)
+             ENDIF
+
+!
+!--          Update virtual potential temperature
+             vpt(k,j,i) = pt(k,j,i) *         &
+                        ( 1.0_wp + 0.61_wp * q(k,j,i) )
+
+          ENDDO
+
+!--       Now, treat vertical surface elements
+          DO  l = 0, 3
+             DO  m = 1, surf_usm_v(l)%ns
+!
+!--             Get indices of respective grid point
+                i = surf_usm_v(l)%i(m)
+                j = surf_usm_v(l)%j(m)
+                k = surf_usm_v(l)%k(m)
+
+!
+!--             Calculate water vapour pressure at saturation
+                e_s = 0.01_wp * 610.78_wp * EXP( 17.269_wp *                       &
+                                       ( t_surf_green_v_p(l)%t(m) - 273.16_wp ) /  &
+                                       ( t_surf_green_v_p(l)%t(m) - 35.86_wp  )    &
+                                            )
+
+!
+!--             Calculate specific humidity at saturation
+                q_s = 0.622_wp * e_s / ( surface_pressure -e_s )
+
+!
+!--             Calculate specific humidity at surface
+                IF ( bulk_cloud_model )  THEN
+                   q(k,j,i) = ( q(k,j,i) - ql(k,j,i) )
+                ELSE
+                   q(k,j,i) = q(k,j,i)
+                ENDIF
+!
+!--             Update virtual potential temperature
+                vpt(k,j,i) = pt(k,j,i) *         &
+                           ( 1.0_wp + 0.61_wp * q(k,j,i) )
+
+             ENDDO
+
+          ENDDO
+
+       END SUBROUTINE calc_q_surface_usm
+       
+    END SUBROUTINE usm_surface_energy_balance
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Swapping of timelevels for t_surf and t_wall
+!> called out from subroutine swap_timelevel
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_swap_timelevel( mod_count )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  mod_count
+      
+#if defined( __nopointer )
+       t_surf_wall_h    = t_surf_wall_h_p
+       t_wall_h    = t_wall_h_p
+       t_surf_wall_v    = t_surf_wall_v_p
+       t_wall_v    = t_wall_v_p
+       t_surf_window_h    = t_surf_window_h_p
+       t_window_h    = t_window_h_p
+       t_surf_window_v    = t_surf_window_v_p
+       t_window_v    = t_window_v_p
+       t_surf_green_h    = t_surf_green_h_p
+       t_surf_green_v    = t_surf_green_v_p
+       t_green_h    = t_green_h_p
+       t_green_v    = t_green_v_p
+#else
+       SELECT CASE ( mod_count )
+          CASE ( 0 )
+!
+!--          Horizontal surfaces
+             t_surf_wall_h  => t_surf_wall_h_1; t_surf_wall_h_p  => t_surf_wall_h_2
+             t_wall_h     => t_wall_h_1;    t_wall_h_p     => t_wall_h_2
+             t_surf_window_h  => t_surf_window_h_1; t_surf_window_h_p  => t_surf_window_h_2
+             t_window_h     => t_window_h_1;    t_window_h_p     => t_window_h_2
+             t_surf_green_h  => t_surf_green_h_1; t_surf_green_h_p  => t_surf_green_h_2
+             t_green_h     => t_green_h_1;    t_green_h_p     => t_green_h_2
+!
+!--          Vertical surfaces
+             t_surf_wall_v  => t_surf_wall_v_1; t_surf_wall_v_p  => t_surf_wall_v_2
+             t_wall_v     => t_wall_v_1;    t_wall_v_p     => t_wall_v_2
+             t_surf_window_v  => t_surf_window_v_1; t_surf_window_v_p  => t_surf_window_v_2
+             t_window_v     => t_window_v_1;    t_window_v_p     => t_window_v_2
+             t_surf_green_v  => t_surf_green_v_1; t_surf_green_v_p  => t_surf_green_v_2
+             t_green_v     => t_green_v_1;    t_green_v_p     => t_green_v_2
+          CASE ( 1 )
+!
+!--          Horizontal surfaces
+             t_surf_wall_h  => t_surf_wall_h_2; t_surf_wall_h_p  => t_surf_wall_h_1
+             t_wall_h     => t_wall_h_2;    t_wall_h_p     => t_wall_h_1
+             t_surf_window_h  => t_surf_window_h_2; t_surf_window_h_p  => t_surf_window_h_1
+             t_window_h     => t_window_h_2;    t_window_h_p     => t_window_h_1
+             t_surf_green_h  => t_surf_green_h_2; t_surf_green_h_p  => t_surf_green_h_1
+             t_green_h     => t_green_h_2;    t_green_h_p     => t_green_h_1
+!
+!--          Vertical surfaces
+             t_surf_wall_v  => t_surf_wall_v_2; t_surf_wall_v_p  => t_surf_wall_v_1
+             t_wall_v     => t_wall_v_2;    t_wall_v_p     => t_wall_v_1
+             t_surf_window_v  => t_surf_window_v_2; t_surf_window_v_p  => t_surf_window_v_1
+             t_window_v     => t_window_v_2;    t_window_v_p     => t_window_v_1
+             t_surf_green_v  => t_surf_green_v_2; t_surf_green_v_p  => t_surf_green_v_1
+             t_green_v     => t_green_v_2;    t_green_v_p     => t_green_v_1
+       END SELECT
+#endif
+        
+    END SUBROUTINE usm_swap_timelevel
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Subroutine writes t_surf and t_wall data into restart files
+!------------------------------------------------------------------------------!
+    SUBROUTINE usm_wrd_local
+
+    
+       IMPLICIT NONE
+       
+       CHARACTER(LEN=1) ::  dum     !< dummy string to create output-variable name  
+       INTEGER(iwp)     ::  l       !< index surface type orientation
+
+       CALL wrd_write_string( 'ns_h_on_file_usm' )
+       WRITE ( 14 )  surf_usm_h%ns
+
+       CALL wrd_write_string( 'ns_v_on_file_usm' )
+       WRITE ( 14 )  surf_usm_v(0:3)%ns
+
+       CALL wrd_write_string( 'usm_start_index_h' )
+       WRITE ( 14 )  surf_usm_h%start_index
+
+       CALL wrd_write_string( 'usm_end_index_h' )
+       WRITE ( 14 )  surf_usm_h%end_index
+
+       CALL wrd_write_string( 't_surf_wall_h' )
+       WRITE ( 14 )  t_surf_wall_h
+
+       CALL wrd_write_string( 't_surf_window_h' )
+       WRITE ( 14 )  t_surf_window_h
+
+       CALL wrd_write_string( 't_surf_green_h' )
+       WRITE ( 14 )  t_surf_green_h
+
+       DO  l = 0, 3
+
+          CALL wrd_write_string( 'usm_start_index_v' )
+          WRITE ( 14 )  surf_usm_v(l)%start_index
+
+          CALL wrd_write_string( 'usm_end_index_v' )
+          WRITE ( 14 )  surf_usm_v(l)%end_index
+
+          WRITE( dum, '(I1)')  l          
+
+          CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' )
+          WRITE ( 14 )  t_surf_wall_v(l)%t
+
+          CALL wrd_write_string( 't_surf_window_v(' // dum // ')' )
+          WRITE ( 14 ) t_surf_window_v(l)%t     
+
+          CALL wrd_write_string( 't_surf_green_v(' // dum // ')' )
+          WRITE ( 14 ) t_surf_green_v(l)%t    
+          
+       ENDDO
+
+       CALL wrd_write_string( 'usm_start_index_h' )
+       WRITE ( 14 )  surf_usm_h%start_index
+
+       CALL wrd_write_string( 'usm_end_index_h' )
+       WRITE ( 14 )  surf_usm_h%end_index
+
+       CALL wrd_write_string( 't_wall_h' )
+       WRITE ( 14 )  t_wall_h
+
+       CALL wrd_write_string( 't_window_h' )
+       WRITE ( 14 )  t_window_h
+
+       CALL wrd_write_string( 't_green_h' )
+       WRITE ( 14 )  t_green_h
+
+       DO  l = 0, 3
+
+          CALL wrd_write_string( 'usm_start_index_v' )
+          WRITE ( 14 )  surf_usm_v(l)%start_index
+
+          CALL wrd_write_string( 'usm_end_index_v' )
+          WRITE ( 14 )  surf_usm_v(l)%end_index
+
+          WRITE( dum, '(I1)')  l     
+
+          CALL wrd_write_string( 't_wall_v(' // dum // ')' )
+          WRITE ( 14 )  t_wall_v(l)%t
+
+          CALL wrd_write_string( 't_window_v(' // dum // ')' )
+          WRITE ( 14 )  t_window_v(l)%t
+
+          CALL wrd_write_string( 't_green_v(' // dum // ')' )
+          WRITE ( 14 )  t_green_v(l)%t
+       
+       ENDDO
+
+       
+    END SUBROUTINE usm_wrd_local
+
+!
+!-- Integrated stability function for heat and moisture
+    FUNCTION psi_h( zeta )
+
+           USE kinds
+
+       IMPLICIT NONE
+
+       REAL(wp)            :: psi_h !< Integrated similarity function result
+       REAL(wp)            :: zeta  !< Stability parameter z/L
+       REAL(wp)            :: x     !< dummy variable
+
+       REAL(wp), PARAMETER :: a = 1.0_wp            !< constant
+       REAL(wp), PARAMETER :: b = 0.66666666666_wp  !< constant
+       REAL(wp), PARAMETER :: c = 5.0_wp            !< constant
+       REAL(wp), PARAMETER :: d = 0.35_wp           !< constant
+       REAL(wp), PARAMETER :: c_d_d = c / d         !< constant
+       REAL(wp), PARAMETER :: bc_d_d = b * c / d    !< constant
+
+
+      IF ( zeta < 0.0_wp )  THEN
+         x = SQRT( 1.0_wp  - 16.0_wp * zeta )
+         psi_h = 2.0_wp * LOG( (1.0_wp + x ) / 2.0_wp )
+      ELSE
+         psi_h = - b * ( zeta - c_d_d ) * EXP( -d * zeta ) - (1.0_wp          &
+                 + 0.66666666666_wp * a * zeta )**1.5_wp - bc_d_d             &
+                 + 1.0_wp
+!
+!--       Old version for stable conditions (only valid for z/L < 0.5)
+!--       psi_h = - 5.0_wp * zeta
+       ENDIF
+
+   END FUNCTION psi_h
+    
+ END MODULE urban_surface_mod
Index: /palm/tags/release-6.0/SOURCE/user_3d_data_averaging.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_3d_data_averaging.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_3d_data_averaging.f90	(revision 3477)
@@ -0,0 +1,157 @@
+!> @file user_3d_data_averaging.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Further allocation checks implemented
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+!
+! 1322 2014-03-20 16:38:49Z raasch
+! REAL functions provided with KIND-attribute
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Sum up and time-average user-defined output quantities as well as allocate
+!> the array necessary for storing the average.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_3d_data_averaging( mode, variable )
+ 
+
+    USE control_parameters
+
+    USE indices
+
+    USE kinds
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode    !< 
+    CHARACTER (LEN=*) :: variable !< 
+
+    INTEGER(iwp) ::  i !< 
+    INTEGER(iwp) ::  j !< 
+    INTEGER(iwp) ::  k !< 
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+!
+!--       Uncomment and extend the following lines, if necessary.
+!--       The arrays for storing the user defined quantities (here u2_av) have
+!--       to be declared and defined by the user!
+!--       Sample for user-defined output:
+!          CASE ( 'u2' )
+!             IF ( .NOT. ALLOCATED( u2_av ) )  THEN
+!                ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!             ENDIF
+!             u2_av = 0.0_wp
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+!
+!--       Uncomment and extend the following lines, if necessary.
+!--       The arrays for storing the user defined quantities (here u2 and
+!--       u2_av) have to be declared and defined by the user!
+!--       Sample for user-defined output:
+!          CASE ( 'u2' )
+!             IF ( ALLOCATED( u2_av ) ) THEN
+!                DO  i = nxlg, nxrg
+!                   DO  j = nysg, nyng
+!                      DO  k = nzb, nzt+1
+!                         u2_av(k,j,i) = u2_av(k,j,i) + u2(k,j,i)
+!                      ENDDO
+!                   ENDDO
+!                ENDDO
+!             ENDIF
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'average' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+!
+!--       Uncomment and extend the following lines, if necessary.
+!--       The arrays for storing the user defined quantities (here u2_av) have
+!--       to be declared and defined by the user!
+!--       Sample for user-defined output:
+!          CASE ( 'u2' )
+!             IF ( ALLOCATED( u2_av ) ) THEN
+!                DO  i = nxlg, nxrg
+!                   DO  j = nysg, nyng
+!                      DO  k = nzb, nzt+1
+!                         u2_av(k,j,i) = u2_av(k,j,i) / REAL( average_count_3d, KIND=wp )
+!                      ENDDO
+!                   ENDDO
+!                ENDDO
+!             ENDIF
+
+       END SELECT
+
+    ENDIF
+
+
+ END SUBROUTINE user_3d_data_averaging
Index: /palm/tags/release-6.0/SOURCE/user_actions.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_actions.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_actions.f90	(revision 3477)
@@ -0,0 +1,266 @@
+!> @file user_actions.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! New CASE statement for scalar tendency
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+!
+! 
+! 1822 2016-04-07 07:49:42Z hoffmann
+! qr/nr-tendency removed.
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1318 2014-03-17 13:35:16Z raasch
+! module interfaces removed
+!
+! 1053 2012-11-13 17:11:03Z hoffmann
+! +qr-tendency, nr-tendency
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Execution of user-defined actions before or after single timesteps
+!------------------------------------------------------------------------------!
+ MODULE user_actions_mod
+ 
+
+    PRIVATE
+    PUBLIC user_actions
+
+    INTERFACE user_actions
+       MODULE PROCEDURE user_actions
+       MODULE PROCEDURE user_actions_ij
+    END INTERFACE user_actions
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE user_actions( location )
+
+       USE control_parameters
+
+       USE cpulog
+
+       USE indices
+
+       USE kinds
+
+       USE pegrid
+
+       USE user
+
+       USE arrays_3d
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  location !< 
+
+       INTEGER(iwp) ::  i !< 
+       INTEGER(iwp) ::  j !< 
+       INTEGER(iwp) ::  k !< 
+
+       CALL cpu_log( log_point(24), 'user_actions', 'start' )
+
+!
+!--    Here the user-defined actions follow
+!--    No calls for single grid points are allowed at locations before and
+!--    after the timestep, since these calls are not within an i,j-loop
+       SELECT CASE ( location )
+
+          CASE ( 'before_timestep' )
+!
+!--          Enter actions to be done before every timestep here
+
+
+          CASE ( 'after_integration' )
+!
+!--          Enter actions to be done after every time integration (before
+!--          data output)
+!--          Sample for user-defined output:
+!             DO  i = nxlg, nxrg
+!                DO  j = nysg, nyng
+!                   DO  k = nzb, nzt
+!                      u2(k,j,i) = u(k,j,i)**2
+!                   ENDDO
+!                ENDDO
+!             ENDDO
+!             DO  i = nxlg, nxr
+!                DO  j = nysg, nyn
+!                   DO  k = nzb, nzt+1
+!                      ustvst(k,j,i) =  &
+!                         ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,0) ) * &
+!                         ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,0) )
+!                   ENDDO
+!                ENDDO
+!             ENDDO
+
+
+          CASE ( 'after_timestep' )
+!
+!--          Enter actions to be done after every timestep here
+
+
+          CASE ( 'u-tendency' )
+!
+!--          Enter actions to be done in the u-tendency term here
+
+
+          CASE ( 'v-tendency' )
+
+
+          CASE ( 'w-tendency' )
+
+
+          CASE ( 'pt-tendency' )
+
+
+          CASE ( 'sa-tendency' )
+
+
+          CASE ( 'e-tendency' )
+
+
+          CASE ( 'q-tendency' )
+          
+          
+          CASE ( 's-tendency' )          
+
+
+          CASE DEFAULT
+             message_string = 'unknown location "' // location // '"'
+             CALL message( 'user_actions', 'UI0001', 1, 2, 0, 6, 0 )
+
+       END SELECT
+
+       CALL cpu_log( log_point(24), 'user_actions', 'stop' )
+
+    END SUBROUTINE user_actions
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE user_actions_ij( i, j, location )
+
+       USE control_parameters
+       USE kinds
+       USE pegrid
+       USE user
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*) ::  location
+
+       INTEGER(iwp) ::  i
+       INTEGER(iwp) ::  idum
+       INTEGER(iwp) ::  j
+
+!
+!--    Here the user-defined actions follow
+       SELECT CASE ( location )
+
+          CASE ( 'u-tendency' )
+!
+!--          Enter actions to be done in the u-tendency term here
+
+
+          CASE ( 'v-tendency' )
+
+
+          CASE ( 'w-tendency' )
+
+
+          CASE ( 'pt-tendency' )
+
+
+          CASE ( 'sa-tendency' )
+
+
+          CASE ( 'e-tendency' )
+
+
+          CASE ( 'q-tendency' )
+          
+          
+          CASE ( 's-tendency' )
+
+
+          CASE ( 'before_timestep', 'after_integration', 'after_timestep' )
+             message_string = 'location "' // location // '" is not ' // &
+                             'allowed to be called with parameters "i" and "j"'
+             CALL message( 'user_actions', 'UI0002', 1, 2, 0, 6, 0 )
+
+
+          CASE DEFAULT
+             message_string = 'unknown location "' // location // '"'
+             CALL message( 'user_actions', 'UI0001', 1, 2, 0, 6, 0 )
+             
+
+       END SELECT
+
+    END SUBROUTINE user_actions_ij
+
+ END MODULE user_actions_mod
Index: /palm/tags/release-6.0/SOURCE/user_additional_routines.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_additional_routines.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_additional_routines.f90	(revision 3477)
@@ -0,0 +1,70 @@
+!> @file user_additional_routines.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Initial version
+!
+! Description:
+! ------------
+!> This file may contain additional user-defined routines.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_dummy
+ 
+
+    USE kinds
+
+    USE user
+
+    IMPLICIT NONE
+
+!
+!-- Here comes the code of the user-defined routine
+
+ END SUBROUTINE user_dummy
+
Index: /palm/tags/release-6.0/SOURCE/user_check_data_output.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_check_data_output.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_check_data_output.f90	(revision 3477)
@@ -0,0 +1,90 @@
+!> @file user_check_data_output.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Set the unit of user defined output quantities. For those variables
+!> not recognized by the user, the parameter unit is set to "illegal", which
+!> tells the calling routine that the output variable is not defined and leads
+!> to a program abort.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_check_data_output( variable, unit )
+ 
+
+    USE kinds
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit     !< 
+    CHARACTER (LEN=*) ::  variable !<
+
+
+    SELECT CASE ( TRIM( variable ) )
+
+!
+!--    Uncomment and extend the following lines, if necessary
+!       CASE ( 'u2' )
+!          unit = 'm2/s2'
+!
+!       CASE ( 'u*v*' )
+!          unit = 'm2/s2'
+!
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+
+ END SUBROUTINE user_check_data_output
+
Index: /palm/tags/release-6.0/SOURCE/user_check_data_output_pr.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_check_data_output_pr.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_check_data_output_pr.f90	(revision 3477)
@@ -0,0 +1,116 @@
+!> @file user_check_data_output_pr.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module name changed + relatec changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Set the unit of user defined profile output quantities. For those variables
+!> not recognized by the user, the parameter unit is set to "illegal", which
+!> tells the calling routine that the output variable is not defined and leads
+!> to a program abort.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_check_data_output_pr( variable, var_count, unit )
+ 
+
+    USE arrays_3d
+
+    USE indices
+
+    USE kinds
+
+    USE netcdf_interface,                                                      &
+        ONLY:  dopr_unit
+
+    USE profil_parameter
+
+    USE statistics
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit     !< 
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  user_pr_index !< 
+    INTEGER(iwp) ::  var_count     !< 
+
+    SELECT CASE ( TRIM( variable ) )
+
+!
+!--    Uncomment and extend the following lines, if necessary.
+!--    Add additional CASE statements depending on the number of quantities
+!--    for which profiles are to be calculated. The respective calculations
+!--    to be performed have to be added in routine user_statistics.
+!--    The quantities are (internally) identified by a user-profile-number
+!--    (see variable "user_pr_index" below). The first user-profile must be assigned
+!--    the number "pr_palm+1", the second one "pr_palm+2", etc. The respective
+!--    user-profile-numbers have also to be used in routine user_statistics!
+!       CASE ( 'u*v*' )                      ! quantity string as given in
+!                                            ! data_output_pr_user
+!          user_pr_index = pr_palm + 1
+!          dopr_index(var_count)  = user_pr_index    ! quantities' user-profile-number
+!          dopr_unit(var_count)   = 'm2/s2'  ! quantity unit
+!          hom(:,2,user_pr_index,:)       = SPREAD( zu, 2, statistic_regions+1 )
+!                                            ! grid on which the quantity is
+!                                            ! defined (use zu or zw)
+
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+
+ END SUBROUTINE user_check_data_output_pr
+
Index: /palm/tags/release-6.0/SOURCE/user_check_parameters.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_check_parameters.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_check_parameters.f90	(revision 3477)
@@ -0,0 +1,74 @@
+!> @file user_check_parameters.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 217 2008-12-09 18:00:48Z letzel
+! Initial version
+!
+! Description:
+! ------------
+!> Check &userpar control parameters and deduce further quantities.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_check_parameters
+ 
+
+    USE control_parameters
+
+    USE kinds
+
+    USE user
+
+    IMPLICIT NONE
+
+!
+!-- Here the user may add code to check the validity of further &userpar 
+!-- control parameters or deduce further quantities.
+
+
+ END SUBROUTINE user_check_parameters
+
Index: /palm/tags/release-6.0/SOURCE/user_data_output_2d.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_data_output_2d.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_data_output_2d.f90	(revision 3477)
@@ -0,0 +1,183 @@
+!> @file user_data_output_2d.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Bugfix: domain bounds of local_pf corrected
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Further allocation checks implemented (averaged data will be assigned to fill
+! values if no allocation happened so far)
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2512 2017-10-04 08:26:59Z raasch
+! ghost layer points removed from output array local_pf
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Example code added for accessing output quantities stored on surface-data
+! types
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Replaced nzb and nzt+1 with the new array bounds nzb_do and nzt_do.
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Resorts the user-defined output quantity with indices (k,j,i) to a
+!> temporary array with indices (i,j,k) and sets the grid on which it is defined.
+!> Allowed values for grid are "zu" and "zw".
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_data_output_2d( av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do )
+ 
+
+    USE indices
+
+    USE kinds
+
+    USE surface_mod
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid     !< 
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av     !< flag to control data output of instantaneous or time-averaged data
+    INTEGER(iwp) ::  i      !< grid index along x-direction
+    INTEGER(iwp) ::  j      !< grid index along y-direction
+    INTEGER(iwp) ::  k      !< grid index along z-direction
+    INTEGER(iwp) ::  m      !< running index surface elements
+    INTEGER(iwp) ::  nzb_do !< lower limit of the domain (usually nzb)
+    INTEGER(iwp) ::  nzt_do !< upper limit of the domain (usually nzt+1)
+
+    LOGICAL      ::  found !< 
+    LOGICAL      ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+
+    found = .TRUE.
+
+    SELECT CASE ( TRIM( variable ) )
+
+!
+!--    Uncomment and extend the following lines, if necessary.
+!--    The arrays for storing the user defined quantities (here u2 and u2_av)
+!--    have to be declared and defined by the user!
+!--    Sample for user-defined output:
+!       CASE ( 'u2_xy', 'u2_xz', 'u2_yz' )
+!          IF ( av == 0 )  THEN
+!             DO  i = nxl, nxr
+!                DO  j = nys, nyn
+!                   DO  k = nzb_do, nzt_do
+!                      local_pf(i,j,k) = u2(k,j,i)
+!                   ENDDO
+!                ENDDO
+!             ENDDO
+!          ELSE
+!             IF ( .NOT. ALLOCATED( u2_av ) ) THEN
+!                ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!                u2_av = REAL( fill_value, KIND = wp )
+!             ENDIF
+!             DO  i = nxl, nxr
+!                DO  j = nys, nyn
+!                   DO  k = nzb_do, nzt_do
+!                      local_pf(i,j,k) = u2_av(k,j,i)
+!                   ENDDO
+!                ENDDO
+!             ENDDO
+!          ENDIF
+!
+!          grid = 'zu'
+!
+!--    In case two-dimensional surface variables are output, the user
+!--    has to access related surface-type. Uncomment and extend following lines
+!--    appropriately (example output of vertical surface momentum flux of u-
+!--    component). Please note, surface elements can be distributed over 
+!--    several data type, depending on their respective surface properties.
+!       CASE ( 'usws_xy' )
+!          IF ( av == 0 )  THEN
+!
+!--           Horizontal default-type surfaces
+!             DO  m = 1, surf_def_h(0)%ns
+!                i = surf_def_h(0)%i(m)
+!                j = surf_def_h(0)%j(m)
+!                local_pf(i,j,1) = surf_def_h(0)%usws(m)
+!             ENDDO
+!
+!--           Horizontal natural-type surfaces
+!             DO  m = 1, surf_lsm_h%ns
+!                i = surf_lsm_h%i(m)
+!                j = surf_lsm_h%j(m)
+!                local_pf(i,j,1) = surf_lsm_h%usws(m)
+!             ENDDO
+!
+!--           Horizontal urban-type surfaces
+!             DO  m = 1, surf_usm_h%ns
+!                i = surf_usm_h%i(m)
+!                j = surf_usm_h%j(m)
+!                local_pf(i,j,1) = surf_usm_h%usws(m)
+!             ENDDO
+!          ENDIF
+!
+!          grid = 'zu'
+!--       
+
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+
+
+ END SUBROUTINE user_data_output_2d
Index: /palm/tags/release-6.0/SOURCE/user_data_output_3d.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_data_output_3d.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_data_output_3d.f90	(revision 3477)
@@ -0,0 +1,138 @@
+!> @file user_data_output_3d.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Further allocation checks implemented (averaged data will be assigned to fill
+! values if no allocation happened so far)
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2512 2017-10-04 08:26:59Z raasch
+! ghost layer points removed from output array local_pf
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Replaced nzb and nzt+1 with the new array bounds nzb_do and nzt_do.
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
+!
+! 1106 2013-03-04 05:31:38Z raasch
+! array_kind renamed precision_kind
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Resorts the user-defined output quantity with indices (k,j,i) to a
+!> temporary array with indices (i,j,k).
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
+ 
+
+    USE indices
+
+    USE kinds
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av    !< 
+    INTEGER(iwp) ::  i     !< 
+    INTEGER(iwp) ::  j     !< 
+    INTEGER(iwp) ::  k     !< 
+    INTEGER(iwp) ::  nzb_do !< lower limit of the data output (usually 0)
+    INTEGER(iwp) ::  nzt_do !< vertical upper limit of the data output (usually nz_do3d)
+
+    LOGICAL      ::  found !< 
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+
+    found = .TRUE.
+
+    SELECT CASE ( TRIM( variable ) )
+
+!
+!--    Uncomment and extend the following lines, if necessary.
+!--    The arrays for storing the user defined quantities (here u2 and u2_av)
+!--    have to be declared and defined by the user!
+!--    Sample for user-defined output:
+!       CASE ( 'u2' )
+!          IF ( av == 0 )  THEN
+!             DO  i = nxl, nxr
+!                DO  j = nys, nyn
+!                   DO  k = nzb_do, nzt_do
+!                      local_pf(i,j,k) = u2(k,j,i)
+!                   ENDDO
+!                ENDDO
+!             ENDDO
+!          ELSE
+!             IF ( .NOT. ALLOCATED( u2_av ) ) THEN
+!                ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!                u2_av = REAL( fill_value, KIND = wp )
+!             ENDIF
+!             DO  i = nxl, nxr
+!                DO  j = nys, nyn
+!                   DO  k = nzb_do, nzt_do
+!                      local_pf(i,j,k) = u2_av(k,j,i)
+!                   ENDDO
+!                ENDDO
+!             ENDDO
+!          ENDIF
+!
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE user_data_output_3d
+
Index: /palm/tags/release-6.0/SOURCE/user_data_output_dvrp.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_data_output_dvrp.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_data_output_dvrp.f90	(revision 3477)
@@ -0,0 +1,120 @@
+!> @file user_data_output_dvrp.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Error messages revised
+! 
+! 2718 2018-01-02 08:49:38Z Giersch
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Execution of user-defined dvrp output
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_data_output_dvrp( output_variable, local_pf )
+ 
+
+    USE control_parameters
+
+    USE dvrp_variables
+
+    USE indices
+
+    USE kinds
+
+    USE pegrid
+
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  output_variable !< 
+
+    INTEGER(iwp) ::  i !< 
+    INTEGER(iwp) ::  j !< 
+    INTEGER(iwp) ::  k !< 
+
+    REAL(wp), DIMENSION(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1,nzb:nz_do3d) :: &
+              local_pf !< 
+
+!
+!-- Here the user-defined DVRP output follows:
+
+!
+!-- Move original array to intermediate array
+    SELECT CASE ( output_variable )
+
+!       CASE ( 'u2', 'u2_xy', 'u2_xz', 'u2_yz'  )
+!!
+!!--       Here the user can add user_defined output quantities. 
+!!--       Uncomment and extend the following lines, if necessary.
+!          DO  i = nxl_dvrp, nxr_dvrp+1
+!             DO  j = nys_dvrp, nyn_dvrp+1
+!                DO  k = nzb, nz_do3d
+!                   local_pf(i,j,k) = u2(k,j,i)
+!                ENDDO
+!             ENDDO
+!          ENDDO
+
+
+       CASE DEFAULT
+!
+!--       The DEFAULT case is reached if output_variable contains a
+!--       wrong character string that is neither recognized in data_output_dvrp
+!--       nor here in user_data_output_dvrp.
+          WRITE( message_string, * ) 'no output possible for: ',               &
+                                     output_variable
+          CALL message( 'user_data_output_dvrp', 'UI0003', 0, 1, 0, 6, 0 )
+          
+
+    END SELECT
+
+
+ END SUBROUTINE user_data_output_dvrp
+
Index: /palm/tags/release-6.0/SOURCE/user_data_output_mask.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_data_output_mask.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_data_output_mask.f90	(revision 3477)
@@ -0,0 +1,179 @@
+!> @file user_data_output_mask.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Add terrain-following output
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Description:
+! ------------
+!> Resorts the user-defined output quantity with indices (k,j,i) to a
+!> temporary array with indices (i,j,k) for masked data output.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_data_output_mask( av, variable, found, local_pf )
+ 
+
+    USE control_parameters
+        
+    USE indices
+    
+    USE kinds
+    
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  variable  !< 
+    CHARACTER (LEN=5) ::  grid      !< flag to distinquish between staggered grids
+
+    INTEGER(iwp) ::  av             !< 
+    INTEGER(iwp) ::  i              !< 
+    INTEGER(iwp) ::  j              !< 
+    INTEGER(iwp) ::  k              !< 
+    INTEGER(iwp) ::  topo_top_ind   !< k index of highest horizontal surface
+
+    LOGICAL ::  found               !< 
+
+    REAL(wp),                                                                  &
+       DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
+          local_pf   !< 
+
+
+    found = .TRUE.
+    grid  = 's'
+
+    SELECT CASE ( TRIM( variable ) )
+
+!--    Uncomment and extend the following lines, if necessary.
+!--    The arrays for storing the user defined quantities (here u2 and u2_av)
+!--    have to be declared and defined by the user!
+!--    Sample for user-defined output:
+!       CASE ( 'u2' )
+!          IF ( av == 0 )  THEN
+!             IF ( .NOT. mask_surface(mid) )  THEN
+!!
+!!--             Default masked output
+!                DO  i = 1, mask_size_l(mid,1)
+!                   DO  j = 1, mask_size_l(mid,2)
+!                      DO  k = 1, mask_size_l(mid,3)
+!                         local_pf(i,j,k) = u2(mask_k(mid,k),                  &
+!                                              mask_j(mid,j),                  &
+!                                              mask_i(mid,i))
+!                      ENDDO
+!                   ENDDO
+!                ENDDO
+!             ELSE
+!!
+!!--             Terrain-following masked output
+!                DO  i = 1, mask_size_l(mid,1)
+!                   DO  j = 1, mask_size_l(mid,2)
+!!
+!!--                   Get k index of highest horizontal surface
+!                      topo_top_ind = get_topography_top_index_ji( &
+!                                        mask_j(mid,j), &
+!                                        mask_i(mid,i), &
+!                                        grid )
+!!
+!!--                   Save output array
+!                      DO  k = 1, mask_size_l(mid,3)
+!                         local_pf(i,j,k) = u2(MIN( topo_top_ind+mask_k(mid,k),&
+!                                                   nzt+1 ),                   &
+!                                              mask_j(mid,j),                  &
+!                                              mask_i(mid,i)                   )
+!                      ENDDO
+!                   ENDDO
+!                ENDDO
+!             ENDIF
+!          ELSE
+!             IF ( .NOT. mask_surface(mid) )  THEN
+!!
+!!--             Default masked output
+!                DO  i = 1, mask_size_l(mid,1)
+!                   DO  j = 1, mask_size_l(mid,2)
+!                      DO  k = 1, mask_size_l(mid,3)
+!                          local_pf(i,j,k) = u2_av(mask_k(mid,k),              &
+!                                                  mask_j(mid,j),              &
+!                                                  mask_i(mid,i) )
+!                       ENDDO
+!                    ENDDO
+!                 ENDDO
+!             ELSE
+!!
+!!--             Terrain-following masked output
+!                DO  i = 1, mask_size_l(mid,1)
+!                   DO  j = 1, mask_size_l(mid,2)
+!!
+!!--                   Get k index of highest horizontal surface
+!                      topo_top_ind = get_topography_top_index_ji( &
+!                                        mask_j(mid,j), &
+!                                        mask_i(mid,i), &
+!                                        grid )
+!!
+!!--                   Save output array
+!                      DO  k = 1, mask_size_l(mid,3)
+!                         local_pf(i,j,k) = u2_av(                             &
+!                                              MIN( topo_top_ind+mask_k(mid,k),&
+!                                                   nzt+1 ),                   &
+!                                              mask_j(mid,j),                  &
+!                                              mask_i(mid,i)                   )
+!                      ENDDO
+!                   ENDDO
+!                ENDDO
+!             ENDIF
+!          ENDIF
+
+       CASE DEFAULT
+          found = .FALSE.
+
+    END SELECT
+
+
+ END SUBROUTINE user_data_output_mask
Index: /palm/tags/release-6.0/SOURCE/user_define_netcdf_grid.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_define_netcdf_grid.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_define_netcdf_grid.f90	(revision 3477)
@@ -0,0 +1,102 @@
+!> @file user_define_netcdf_grid.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2271 2017-06-09 12:34:55Z sward
+! found = .TRUE. added to grid definition in examples to avoid warning message
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Set the grids on which user-defined output quantities are defined.
+!> Allowed values for grid_x are "x" and "xu", for grid_y "y" and "yv", and
+!> for grid_z "zu" and "zw".
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z )
+ 
+
+    USE kinds
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid_x     !< 
+    CHARACTER (LEN=*) ::  grid_y     !< 
+    CHARACTER (LEN=*) ::  grid_z     !< 
+    CHARACTER (LEN=*) ::  variable   !< 
+
+    LOGICAL ::  found   !< 
+
+
+    SELECT CASE ( TRIM( variable ) )
+
+!
+!--    Uncomment and extend the following lines, if necessary
+!       CASE ( 'u2', 'u2_xy', 'u2_xz', 'u2_yz' )
+!          found  = .TRUE.
+!          grid_x = 'xu'
+!          grid_y = 'y'
+!          grid_z = 'zu'
+
+!       CASE ( 'u*v*', 'u*v*_xy', 'u*v*_xz', 'u*v*_yz' )
+!          found  = .TRUE.
+!          grid_x = 'x'
+!          grid_y = 'y'
+!          grid_z = 'zu'
+
+       CASE DEFAULT
+          found  = .FALSE.
+          grid_x = 'none'
+          grid_y = 'none'
+          grid_z = 'none'
+
+    END SELECT
+
+
+ END SUBROUTINE user_define_netcdf_grid
+
Index: /palm/tags/release-6.0/SOURCE/user_dvrp_coltab.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_dvrp_coltab.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_dvrp_coltab.f90	(revision 3477)
@@ -0,0 +1,90 @@
+!> @file user_dvrp_coltab.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Definition of the colour table to be used by the dvrp software.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_dvrp_coltab( mode, variable )
+ 
+    
+    USE control_parameters
+        
+    USE dvrp_variables
+    
+    USE kinds
+    
+    USE pegrid
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode       !< 
+    CHARACTER (LEN=*) ::  variable   !< 
+
+
+!
+!-- Here the user-defined actions follow
+    SELECT CASE ( mode )
+
+       CASE ( 'particles' )
+
+       CASE ( 'slicer' )
+
+       CASE DEFAULT
+          message_string = 'unknown mode "' // mode // '"'
+          CALL message( 'user_dvrp_coltab', 'UI0004', 1, 2, 0, 6, 0 )
+
+
+    END SELECT
+
+ END SUBROUTINE user_dvrp_coltab
+
Index: /palm/tags/release-6.0/SOURCE/user_flight.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_flight.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_flight.f90	(revision 3477)
@@ -0,0 +1,99 @@
+!> @file user_actions.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! Initial revision
+!
+! Description:
+! ------------
+!> Calculation of user-defined output quantity for flight measurements after 
+!> each timestep. 
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_flight( var, id )
+
+    USE control_parameters
+    
+    USE grid_variables
+
+    USE indices
+
+    USE kinds
+
+    USE user
+
+    USE arrays_3d
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< index along x
+    INTEGER(iwp) ::  j  !< index along y
+    INTEGER(iwp) ::  k  !< index along z
+    INTEGER(iwp) ::  id !< variable identifyer, according to the settings in user_init_flight
+        
+    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !< treated variable
+
+!
+!-- Here, the respective variable is calculated. There is no call of 
+!-- exchange_horiz necessary. 
+!-- The variable identifyer (id) must be set according to the settings in 
+!-- user_init_flight.
+!-- Please note, so far, variable must be located at the center of a grid box.
+!     var = 0.0_wp
+
+!     SELECT CASE ( id )
+! 
+!        CASE ( 1 )
+!           DO i = nxl-1, nxr+1
+!              DO j = nys-1, nyn+1
+!                 DO k = nzb, nzt
+!                    var(k,j,i) = ABS( u(k,j,i )
+!                 ENDDO
+!              ENDDO
+!           ENDDO
+!           
+!        CASE ( 2 )
+!           DO i = nxl-1, nxr+1
+!              DO j = nys-1, nyn+1
+!                 DO k = nzb, nzt
+!                    var(k,j,i) = ABS( v(k,j,i) )
+!                 ENDDO
+!              ENDDO
+!           ENDDO
+! 
+!     END SELECT
+
+
+ END SUBROUTINE user_flight
Index: /palm/tags/release-6.0/SOURCE/user_header.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_header.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_header.f90	(revision 3477)
@@ -0,0 +1,108 @@
+!> @file user_header.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1551 2015-03-03 14:18:16Z maronga
+! Typo removed
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 2008-12-09 18:00:48Z letzel
+! +topography_grid_convention
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Print a header with user-defined information.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_header( io )
+ 
+
+    USE kinds
+    
+    USE statistics,                                                            &
+        ONLY:  statistic_regions, region
+        
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i    !< 
+    INTEGER(iwp) ::  io   !< 
+
+!
+!-- If no user-defined variables are read from the namelist-file, no
+!-- information will be printed.
+    IF ( .NOT. user_defined_namelist_found )  THEN
+       WRITE ( io, 100 )
+       RETURN
+    ENDIF
+
+!
+!-- Printing the information.
+    WRITE ( io, 110 )
+
+    IF ( statistic_regions /= 0 )  THEN
+       WRITE ( io, 200 )
+       DO  i = 0, statistic_regions
+          WRITE ( io, 201 )  i, region(i)
+       ENDDO
+    ENDIF
+
+!
+!-- Format-descriptors
+100 FORMAT (//' *** no user-defined variables found'/)
+110 FORMAT (//1X,78('#')                                                       &
+            //' User-defined variables and actions:'/                          &
+              ' -----------------------------------'//)
+200 FORMAT (' Output of profiles and time series for following regions:' /)
+201 FORMAT (4X,'Region ',I1,':   ',A)
+
+
+ END SUBROUTINE user_header
+
Index: /palm/tags/release-6.0/SOURCE/user_init.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init.f90	(revision 3477)
@@ -0,0 +1,105 @@
+!> @file user_init.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1799 2016-04-05 08:35:55Z gronemeier
+! Bugfix: added dots_num to variable list
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module name changed + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Execution of user-defined initializing actions
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init
+ 
+
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+    
+    USE netcdf_interface,                                                      &
+        ONLY: dots_label, dots_unit, dots_num
+    
+    USE pegrid
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=20) :: field_char   !< 
+!
+!-- Here the user-defined initializing actions follow:
+!-- Sample for user-defined output
+!    ALLOCATE( u2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!    ALLOCATE( ustvst(nzb:nzt+1,nysg:nyng,nxlg:nxrg) );  ustvst = 0.0_wp
+
+!-- Sample for user-defined time series
+!-- For each time series quantity you have to give a label and a unit,
+!-- which will be used for the NetCDF file. They must not contain more than
+!-- seven characters. The value of dots_num has to be increased by the
+!-- number of new time series quantities. Its old value has to be store in
+!-- dots_num_palm. See routine user_statistics on how to output calculate
+!-- and output these quantities.
+!    dots_label(dots_num+1) = 'abs_umx'
+!    dots_unit(dots_num+1)  = 'm/s'
+!    dots_label(dots_num+2) = 'abs_vmx'
+!    dots_unit(dots_num+2)  = 'm/s'
+!
+!    dots_num_palm = dots_num
+!    dots_num = dots_num + 2
+
+ END SUBROUTINE user_init
+
Index: /palm/tags/release-6.0/SOURCE/user_init_3d_model.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_3d_model.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_3d_model.f90	(revision 3477)
@@ -0,0 +1,134 @@
+!> @file user_init_3d_model.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2618 2017-11-16 15:37:30Z suehring
+! Provide example for user-defined initialization of surface-related quantities
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! +surface_mod
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! small changes in layout
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Allows the complete initialization of the 3d model.
+!>
+!> @attention The user is responsible to set at least all those quantities which
+!>            are normally set within init_3d_model!
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_3d_model
+ 
+
+    USE arrays_3d
+    
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+
+    USE surface_mod
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  l !< running index surface orientation
+    INTEGER(iwp) ::  m !< running index surface elements
+
+!
+!-- Initialization of surface-related quantities.
+!-- The following example shows required initialization of surface quantitites
+!-- at default-type upward-facing surfaces.  
+!   DO  m = 1, surf_def_h(0)%ns
+!      surf_def_h(0)%ol(m)   = ...    ! Obukhov length
+!      surf_def_h(0)%us(m  ) = ...    ! friction velocity
+!      surf_def_h(0)%usws(m) = ...    ! vertical momentum flux, u-component
+!      surf_def_h(0)%vsws(m) = ...    ! vertical momentum flux, v-component
+!      surf_def_h(0)%z0(m)   = ...    ! roughness length for momentum
+!      IF ( .NOT. neutral )  THEN
+!         surf_def_h(0)%ts(m)   = ... ! scaling parameter
+!         surf_def_h(0)%shf(m)  = ... ! surface sensible heat flux
+!         surf_def_h(0)%z0h(m)  = ... ! roughness length for heat
+!      ENDIF
+!      IF ( humditiy )  THEN
+!         surf_def_h(0)%qs(m)   = ... ! scaling parameter
+!         surf_def_h(0)%qsws(m) = ... ! surface latent heat flux
+!         surf_def_h(0)%z0q(m)  = ... ! roughness length for moisture
+!      ENDIF
+!      IF ( passive_scalar )  THEN
+!         surf_def_h(0)%ss(m)   = ... ! scaling parameter
+!         surf_def_h(0)%ssws(m) = ... ! surface latent heat flux
+!      ENDIF
+!   ENDDO 
+!
+!-- Same for natural and urban type surfaces
+!   DO  m = 1, surf_lsm_h%ns
+!      ...
+!   ENDDO 
+!   DO  m = 1, surf_usm_h%ns
+!      ...
+!   ENDDO
+!
+!-- Also care for vertically aligned surfaces (default-, natural-, and 
+!-- urban-type).
+!   DO  l = 0, 3
+!      DO  m = 1, surf_def_v(l)%ns
+!         ...
+!      ENDDO
+!      DO  m = 1, surf_lsm_v(l)%ns
+!         ...
+!      ENDDO
+!      DO  m = 1, surf_usm_v(l)%ns
+!         ...
+!      ENDDO
+!   ENDDO
+!
+!
+!-- In the following, initialize 3D quantities, e.g. u, v, w, pt, etc..
+
+ END SUBROUTINE user_init_3d_model
+
Index: /palm/tags/release-6.0/SOURCE/user_init_flight.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_flight.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_flight.f90	(revision 3477)
@@ -0,0 +1,104 @@
+!> @file user_init_flight.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! Initial revision
+!
+! Description:
+! ------------
+!> Execution of user-defined initialization for flight measurements.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_flight( init, k, id, label_leg )
+ 
+
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+    
+    USE netcdf_interface,                                                      &
+        ONLY: dofl_label, dofl_unit
+    
+    USE user
+
+    IMPLICIT NONE
+    
+    CHARACTER(LEN=10), OPTIONAL ::  label_leg     !< label of the respective leg
+   
+    INTEGER(iwp), OPTIONAL                ::  id  !< variable index
+    INTEGER(iwp), OPTIONAL, INTENT(INOUT) ::  k   !< index for respective variable and leg
+    
+    LOGICAL ::  init  !< variable to recognize initial call 
+!
+!-- Sample for user-defined flight-time series.
+!-- For each quantity you have to give a label and a unit, which will be used
+!-- for the output into NetCDF file. They must not contain more than
+!-- twenty characters. 
+
+
+    IF ( init )  THEN
+!
+!--    The number of user-defined quantity has to be increased appropriately.
+!--    In the following example, 2 user-defined quantities are added.
+!        num_var_fl_user = num_var_fl_user + 2 
+
+       init = .FALSE.
+    
+    ELSE
+    
+!
+!--    Please add the respective number of new variables as following:
+      
+!        SELECT CASE ( id )
+!        
+!           CASE ( 1 )
+!              dofl_label(k)   = TRIM(label_leg) // '_' // 'abs_u'
+!              dofl_unit(k)    = 'm/s'
+!              k               = k + 1
+!              
+!           CASE ( 2 )
+!     
+!              dofl_label(k)   = TRIM(label_leg) // '_' // 'abs_v'
+!              dofl_unit(k)    = 'm/s'
+!              k               = k + 1
+!              
+!        END SELECT
+
+    ENDIF
+       
+ END SUBROUTINE user_init_flight
+
Index: /palm/tags/release-6.0/SOURCE/user_init_grid.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_grid.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_grid.f90	(revision 3477)
@@ -0,0 +1,139 @@
+!> @file user_init_grid.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! dz was replaced by dz(1)
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Extended argument list (MS)
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! +Generic tunnel added
+! +Example of setting user-defined topography
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1968 2016-07-18 12:01:49Z suehring
+! Change dimensions for nzb_local, which do not longer need to be set on 
+! multigrid ghost points. 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 217 2008-12-09 18:00:48Z letzel
+! +topography_grid_convention
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Execution of user-defined grid initializing actions
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_grid( topo_3d )
+ 
+
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp)                                           ::  k_topo      !< topography top index
+    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo_3d     !< 3D topography field
+
+    REAL(wp) ::  h_topo !< user-defined topography height
+
+!
+!-- Here the user-defined grid initializing actions follow:
+
+!
+!-- Set the index array nzb_local for non-flat topography.
+!-- Here consistency checks concerning domain size and periodicity are necessary
+    SELECT CASE ( TRIM( topography ) )
+
+       CASE ( 'flat', 'single_building', 'single_street_canyon', 'tunnel' )
+!
+!--       Not allowed here since these are the standard cases used in init_grid.
+
+       CASE ( 'user_defined_topography_1' )
+!
+!--       Here the user can define his own topography.
+!--       After definition, please remove the following three lines!
+          message_string = 'topography "' // topography // '" not available yet'
+          CALL message( 'user_init_grid', 'UI0005', 1, 2, 0, 6, 0 )
+!
+!--       The user is allowed to set surface-mounted as well as non-surface
+!--       mounted topography (e.g. overhanging structures). For both, use 
+!--       3D array topo_3d and set bit 0. The convention is: bit is zero inside 
+!--       topography, bit is 1 for atmospheric grid point. 
+!--       The following example shows how to prescribe sine-like topography 
+!--       along x-direction with amplitude of 10 * dz(1) and wavelength 10 * dy.
+!           DO  i = nxlg, nxrg
+!              h_topo = 10.0_wp * dz(1) * (SIN(3.14_wp*0.5_wp)*i*dx / ( 5.0_wp * dy ) )**2
+! 
+!              k_topo = MINLOC( ABS( zw - h_topo ), 1 ) - 1
+! 
+!              topo_3d(k_topo+1:nzt+1,:,i) =                                     &
+!                                          IBSET( topo_3d(k_topo+1:nzt+1,:,i), 0 ) 
+!           ENDDO 
+! 
+!           CALL exchange_horiz_int( topo_3d, nys, nyn, nxl, nxr, nzt, nbgp )
+
+       CASE DEFAULT
+!
+!--       The DEFAULT case is reached if the parameter topography contains a
+!--       wrong character string that is neither recognized in init_grid nor 
+!--       here in user_init_grid.
+          message_string = 'unknown topography "' // topography // '"'
+          CALL message( 'user_init_grid', 'UI0006', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+
+
+
+ END SUBROUTINE user_init_grid
+
Index: /palm/tags/release-6.0/SOURCE/user_init_land_surface.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_land_surface.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_land_surface.f90	(revision 3477)
@@ -0,0 +1,92 @@
+!> @file user_init_land_surface.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Load surface_mod
+! Add simple example how to access surface data type
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1972 2016-07-26 07:52:02Z maronga
+! Update of use statements
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Changed description text
+! 
+! 1496 2014-12-02 17:25:50Z maronga
+! Initial revision
+! 
+! Description:
+! ------------
+!> Execution of user-defined actions to initiate the land surface model
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_land_surface
+ 
+
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+    
+    USE land_surface_model_mod
+
+    USE netcdf_interface,                                                      &
+        ONLY: dots_label, dots_unit, dots_num
+    
+    USE pegrid
+
+    USE surface_mod    
+
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< grid index
+    INTEGER(iwp) ::  j  !< grid index
+    INTEGER(iwp) ::  m  !< running index on 1D wall-type grid
+
+!
+!-- Here the user-defined land surface initialization actions follow.
+!-- Example: set roughness length at natural land-surface
+!     DO  m = 1, surf_lsm_h%ns
+!        surf_lsm_h%z0(m) = 0.1_wp
+!     ENDDO
+
+
+ END SUBROUTINE user_init_land_surface
+
Index: /palm/tags/release-6.0/SOURCE/user_init_plant_canopy.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_plant_canopy.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_plant_canopy.f90	(revision 3477)
@@ -0,0 +1,139 @@
+!> @file user_init_plant_canopy.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1951 2016-06-20 10:05:12Z suehring
+! Bugfix in example initialization
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1484 2014-10-21 10:53:05Z kanani
+! Changes in the course of the canopy-model modularization:
+!   module plant_canopy_model_mod added,
+!   definition of array cdc (canopy drag coefficient) removed, since it is now
+!   defined purely as a single constant value (see module plant_canopy_model)
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Initialisation of the leaf area density array (for scalar grid points) and 
+!> the array of the canopy drag coefficient, if the user has not chosen any 
+!> of the default cases 
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_plant_canopy
+ 
+
+    USE arrays_3d
+    
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+
+    USE plant_canopy_model_mod
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i   !< running index
+    INTEGER(iwp) :: j   !< running index
+
+!
+!-- Here the user-defined grid initializing actions follow:
+
+!
+!-- Set the 3D-array lad_s for user defined canopies
+    SELECT CASE ( TRIM( canopy_mode ) )
+
+       CASE ( 'block' )
+!
+!--       Not allowed here since this is the standard case used in init_3d_model.
+
+       CASE ( 'user_defined_canopy_1' )
+!
+!--       Here the user can define his own forest topography. 
+!--       The following lines contain an example, where the plant canopy extends
+!--       only over the second half of the model domain along x.
+!--       Attention: DO-loops have to include the ghost points (nxlg-nxrg, 
+!--       nysg-nyng), because no exchange of ghost point information is intended,
+!--       in order to minimize communication between CPUs.
+!          DO  i = nxlg, nxrg
+!             IF ( i >= INT( ( nx+1 ) / 2 ) ) THEN
+!                DO  j = nysg, nyng
+!                   lad_s(:,j,i) = lad(:)
+!                ENDDO
+!             ELSE
+!                lad_s(:,:,i) = 0.0_wp
+!             ENDIF
+!          ENDDO 
+!
+!--       After definition, please
+!--       remove the following three lines!
+          message_string = 'canopy_mode "' // canopy_mode // &
+                           '" not available yet'
+          CALL message( 'user_init_plant_canopy', 'UI0007', 0, 1, 0, 6, 0 )
+          
+       CASE DEFAULT
+!
+!--       The DEFAULT case is reached if the parameter canopy_mode contains a
+!--       wrong character string that is neither recognized in init_3d_model nor
+!--       here in user_init_plant_canopy.
+          message_string = 'unknown canopy_mode "' // canopy_mode // '"'
+          CALL message( 'user_init_plant_canopy', 'UI0008', 1, 2, 0, 6, 0 )
+
+    END SELECT
+
+
+ END SUBROUTINE user_init_plant_canopy
+
Index: /palm/tags/release-6.0/SOURCE/user_init_radiation.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_radiation.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_radiation.f90	(revision 3477)
@@ -0,0 +1,73 @@
+!> @file user_init_radiation.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1585 2015-04-30 07:05:52Z maronga
+! Initial revision
+! 
+! Description:
+! ------------
+!> Execution of user-defined actions to initiate the radiation model
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_radiation
+ 
+
+    USE arrays_3d
+    
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+
+    USE radiation_model_mod
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) :: i   !< running index
+    INTEGER(iwp) :: j   !< running index
+
+!
+!-- Here the user-defined radiation initialization actions follow:
+
+
+
+ END SUBROUTINE user_init_radiation
+
Index: /palm/tags/release-6.0/SOURCE/user_init_urban_surface.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_init_urban_surface.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_init_urban_surface.f90	(revision 3477)
@@ -0,0 +1,83 @@
+!> @file user_init_urban_surface.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2015 Czech Technical University in Prague
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!--------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Load surface_mod
+! Add simple example how to access surface data type
+! 
+! 2011 2016-09-19 17:29:57Z kanani
+! Flag urban_surface is now defined in module control_parameters.
+! 
+! 2007 2016-08-24 15:47:17Z kanani
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Execution of user-defined actions to initiate the urban surface model
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_init_urban_surface
+
+    USE arrays_3d
+    
+    USE control_parameters,                                                    &
+        ONLY:  urban_surface
+    
+    USE indices
+    
+    USE kinds
+
+    USE urban_surface_mod
+
+    USE surface_mod    
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  i  !< grid index
+    INTEGER(iwp) ::  j  !< grid index
+    INTEGER(iwp) ::  m  !< running index on 1D wall-type grid
+
+!
+!-- Here the user-defined urban surface initialization actions follow.
+!-- Example: set roughness length at urban surface
+!     DO  m = 1, surf_usm_h%ns
+!        surf_usm_h%z0(m) = 0.1_wp
+!     ENDDO
+
+
+
+ END SUBROUTINE user_init_urban_surface
+
Index: /palm/tags/release-6.0/SOURCE/user_last_actions.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_last_actions.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_last_actions.f90	(revision 3477)
@@ -0,0 +1,76 @@
+!> @file user_last_actions.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Writing of user-defined restart data will be done in an own module called
+! user_write_restart_data_mod 
+! 
+! 2718 2018-01-02 08:49:38Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2298 2017-06-29 09:28:18Z raasch
+! type of write_binary changed from CHARACTER to LOGICAL
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! revision history before 2012 removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Execution of user-defined actions at the end of a job.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_last_actions
+ 
+
+    USE control_parameters
+        
+    USE kinds
+    
+    USE user
+
+    IMPLICIT NONE
+
+!
+!-- Here the user-defined actions at the end of a job might follow.
+
+
+ END SUBROUTINE user_last_actions
+
Index: /palm/tags/release-6.0/SOURCE/user_lpm_advec.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_lpm_advec.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_lpm_advec.f90	(revision 3477)
@@ -0,0 +1,109 @@
+!> @file user_lpm_advec.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2417 2017-09-06 15:22:27Z suehring
+! Particle loops adapted for sub-box structure, i.e. for each sub-box the 
+! particle loop runs from start_index up to end_index instead from 1 to 
+! number_of_particles.
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1416 2014-06-04 16:04:03Z suehring
+! Provide template for new particle structure.
+! Moreover, user_lpm_advec is called for each gridpoint.
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine renamed user_lpm_advec
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Modification of initial particles by the user.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_lpm_advec( ip, jp, kp )
+ 
+
+    USE kinds
+    
+    USE particle_attributes
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  ip   !< index of particle grid box, x-direction
+    INTEGER(iwp) ::  jp   !< index of particle grid box, y-direction
+    INTEGER(iwp) ::  kp   !< index of particle grid box, z-direction
+    INTEGER(iwp) ::  n    !< particle index
+    INTEGER(iwp) ::  nb   !< index of sub-box particles are sorted in
+
+    INTEGER(iwp), DIMENSION(0:7)  ::  start_index !< start particle index for current sub-box
+    INTEGER(iwp), DIMENSION(0:7)  ::  end_index   !< start particle index for current sub-box
+
+!
+!-- Here the user-defined actions follow
+!   number_of_particles = prt_count(kp,jp,ip)
+!   particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+!
+!   start_index = grid_particles(kp,jp,ip)%start_index
+!   end_index   = grid_particles(kp,jp,ip)%end_index
+!
+!   IF ( number_of_particles <= 0 )  CYCLE
+!   DO  n = 1, number_of_particles
+!   DO  nb = 0, 7
+!      DO  n = start_index(nb), end_index(nb)
+!         particles(n)%xxx = 
+!      ENDDO
+!   ENDDO
+
+ END SUBROUTINE user_lpm_advec
+
Index: /palm/tags/release-6.0/SOURCE/user_lpm_init.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_lpm_init.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_lpm_init.f90	(revision 3477)
@@ -0,0 +1,99 @@
+!> @file user_lpm_init.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1416 2014-06-04 16:04:03Z suehring
+! load module indices
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine renamed: user_init_particles -> user_lpm_init
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Modification of initial particles by the user.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_lpm_init
+ 
+    USE indices
+
+    USE kinds
+    
+    USE particle_attributes
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  ip   !<
+    INTEGER(iwp) ::  jp   !< 
+    INTEGER(iwp) ::  kp   !< 
+    INTEGER(iwp) ::  n    !< 
+
+!
+!-- Here the user-defined actions follow
+!     DO  ip = nxl, nxr
+!        DO  jp = nys, nyn
+!           DO  kp = nzb+1, nzt
+!              number_of_particles = prt_count(kp,jp,ip)
+!              particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+!              IF ( number_of_particles <= 0 )  CYCLE
+!              DO  n = 1, number_of_particles
+!
+!              ENDDO
+!           ENDDO
+!        ENDDO
+!     ENDDO
+
+ END SUBROUTINE user_lpm_init
+
Index: /palm/tags/release-6.0/SOURCE/user_lpm_set_attributes.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_lpm_set_attributes.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_lpm_set_attributes.f90	(revision 3477)
@@ -0,0 +1,99 @@
+!> @file user_lpm_set_attributes.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1359 2014-04-11 17:15:14Z hoffmann
+! New particle structure integrated. 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 849 2012-03-15 10:35:09Z raasch
+! routine renamed: user_particle_attributes -> user_lpm_set_attributes
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Define the actual particle attributes (size, colour) by the user.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_lpm_set_attributes
+ 
+
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
+
+    USE kinds
+    
+    USE particle_attributes
+    
+    USE user
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  ip   !<
+    INTEGER(iwp) ::  jp   !< 
+    INTEGER(iwp) ::  kp   !< 
+    INTEGER(iwp) ::  n    !< 
+
+!
+!-- Here the user-defined actions follow
+!     DO  ip = nxl, nxr
+!        DO  jp = nys, nyn
+!           DO  kp = nzb+1, nzt
+!              number_of_particles = prt_count(kp,jp,ip)
+!              particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
+!              IF ( number_of_particles <= 0 )  CYCLE
+!              DO  n = 1, number_of_particles
+!
+!              ENDDO
+!           ENDDO
+!        ENDDO
+!     ENDDO
+    
+
+ END SUBROUTINE user_lpm_set_attributes
+
Index: /palm/tags/release-6.0/SOURCE/user_module.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_module.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_module.f90	(revision 3477)
@@ -0,0 +1,95 @@
+!> @file user_module.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! An example for a user defined global variable has been added (Giersch)
+! 
+! 2718 2018-01-02 08:49:38Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1873 2016-04-18 14:50:06Z maronga
+! Module renamed (removed _mod)
+! 
+! 
+! 1850 2016-04-08 13:29:27Z maronga
+! Module renamed
+! 
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! Revision 1.1  1998/03/24 15:29:04  raasch
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Declaration of user-defined variables. This module may only be used
+!> in the user-defined routines (contained in user_interface.f90).
+!------------------------------------------------------------------------------!
+ MODULE user
+ 
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    INTEGER(iwp) ::  dots_num_palm   !< 
+    INTEGER(iwp) ::  user_idummy     !< 
+    
+    LOGICAL ::  user_defined_namelist_found = .FALSE.   !< 
+    
+    REAL(wp) ::  user_rdummy   !< 
+
+!
+!-- Sample for user-defined output
+!    REAL(wp) :: global_parameter !< user defined global parameter 
+!
+!    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u2       !< user defined array
+!    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u2_av    !< user defined array
+!    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  ustvst   !< user defined array
+
+    SAVE
+
+ END MODULE user
Index: /palm/tags/release-6.0/SOURCE/user_parin.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_parin.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_parin.f90	(revision 3477)
@@ -0,0 +1,216 @@
+!> @file user_parin.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! current revision for user interface has been changed to 3240
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3240 2018-09-12 12:04:40Z Giersch
+! The check that controls the number of user-defined profiles on the restart file
+! with the one given for the current run has been removed.
+! 
+! 3189 2018-08-06 13:18:55Z Giersch
+! Indent revised
+! 
+! 3174 2018-07-26 13:46:50Z Giersch
+! userpar in READ statement has been changed to user_parameters 
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! renamed userpar to user_parameters
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2512 2017-10-04 08:26:59Z raasch
+! current interface revision number number set to r2512
+! 
+! 2298 2017-06-29 09:28:18Z raasch
+! user interface current revision updated
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! required interface revision changed
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! required interface revision changed
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1668 2015-09-23 13:45:36Z raasch
+! current interface revision number number set to r1663
+!
+! 1666 2015-09-23 07:31:10Z raasch
+! interface revision number is set to blank
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 931 2012-06-08 15:09:28Z maronga
+! Re-enabled check for max_pr_user
+!
+! 841 2012-02-28 12:29:49Z maronga
+! Bugfix: disable max_pr_user check during prior namelist file check
+!
+! 217 2008-12-09 18:00:48Z letzel
+! +topography_grid_convention
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Interface to read user-defined namelist-parameters.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_parin
+ 
+
+    USE control_parameters
+    
+    USE kinds
+    
+    USE pegrid
+    
+    USE statistics
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line   !< 
+
+    INTEGER(iwp) ::  i                 !< 
+    INTEGER(iwp) ::  j                 !< 
+
+
+    NAMELIST /userpar/  data_output_pr_user, data_output_user, region,         &
+                        data_output_masks_user
+                        
+                        
+    NAMELIST /user_parameters/  data_output_pr_user, data_output_user, region, &
+                        data_output_masks_user
+
+!
+!-- Set revision number of this default interface version. It will be checked within
+!-- the main program (palm). Please change the revision number in case that the
+!-- current revision does not match with previous revisions (e.g. if routines
+!-- have been added/deleted or if parameter lists in subroutines have been changed).
+    user_interface_current_revision = 'r3240'
+
+!
+!-- Position the namelist-file at the beginning (it was already opened in
+!-- parin), search for user-defined namelist-group ("userpar", but any other
+!-- name can be choosed) and position the file at this line.
+    REWIND ( 11 )
+
+    line = ' '
+    DO WHILE ( INDEX( line, '&user_parameters' ) == 0 )
+       READ ( 11, '(A)', END=12 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, user_parameters, ERR = 10 )
+
+    user_defined_namelist_found = .TRUE.
+
+    GOTO 14
+
+10  BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'user_parameters', line )
+
+12  REWIND ( 11 )
+
+    line = ' ' 
+    DO WHILE ( INDEX( line, '&userpar' ) == 0 )
+       READ ( 11, '(A)', END=14 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, userpar, ERR = 13, END = 14 )
+
+    message_string = 'namelist userpar is deprecated and will be ' //          &
+                     'removed in near future. &Please use namelist ' //        &
+                     'user_parameters instead' 
+    CALL message( 'user_parin', 'PA0487', 0, 1, 0, 6, 0 )
+
+    user_defined_namelist_found = .TRUE.
+
+    GOTO 14
+
+13  BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'userpar', line )
+
+14  CONTINUE
+
+!
+!-- Determine the number of user-defined profiles and append them to the
+!-- standard data output (data_output_pr)
+    IF ( user_defined_namelist_found )  THEN
+       IF ( data_output_pr_user(1) /= ' ' )  THEN
+          i = 1
+          DO WHILE ( data_output_pr(i) /= ' '  .AND.  i <= 100 )
+             i = i + 1
+          ENDDO
+          j = 1
+          DO WHILE ( data_output_pr_user(j) /= ' '  .AND.  j <= 100 )
+             data_output_pr(i) = data_output_pr_user(j)
+             max_pr_user_tmp   = max_pr_user_tmp + 1
+             i = i + 1
+             j = j + 1
+          ENDDO
+       ENDIF
+    ENDIF
+ 
+    RETURN
+
+ END SUBROUTINE user_parin
+
Index: /palm/tags/release-6.0/SOURCE/user_read_restart_data_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_read_restart_data_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_read_restart_data_mod.f90	(revision 3477)
@@ -0,0 +1,165 @@
+!> @file user_read_restart_data_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Reads user specific restart data into binary file(s) for restart runs.
+!------------------------------------------------------------------------------!
+ MODULE user_read_restart_data_mod
+
+
+    USE user
+     
+
+    IMPLICIT NONE
+
+
+    INTERFACE user_rrd_global
+       MODULE PROCEDURE user_rrd_global
+    END INTERFACE user_rrd_global
+
+    INTERFACE user_rrd_local
+       MODULE PROCEDURE user_rrd_local
+    END INTERFACE user_rrd_local
+
+
+    PUBLIC user_rrd_global, user_rrd_local
+
+
+ CONTAINS
+
+
+!-------------
+! Description:
+! ------------
+!> Reading global restart data that has been defined by the user.
+!------------------------------------------------------------------------------!
+    SUBROUTINE user_rrd_global( found )
+
+
+       USE control_parameters,                                                 &
+           ONLY: length, restart_string
+
+
+       IMPLICIT NONE
+
+       LOGICAL, INTENT(OUT)  ::  found 
+
+
+       found = .TRUE.
+
+
+       SELECT CASE ( restart_string(1:length) )
+
+          CASE ( 'global_paramter' )
+!             READ ( 13 )  global_parameter
+
+          CASE DEFAULT
+ 
+             found = .FALSE.
+
+       END SELECT  
+
+
+    END SUBROUTINE user_rrd_global
+
+
+! Description:
+! ------------
+!> Reading processor specific restart data from file(s) that has been defined 
+!> by the user.
+!> Subdomain index limits on file are given by nxl_on_file, etc.
+!> Indices nxlc, etc. indicate the range of gridpoints to be mapped from the
+!> subdomain on file (f) to the subdomain of the current PE (c). They have been
+!> calculated in routine rrd_local.
+!------------------------------------------------------------------------------!
+    SUBROUTINE user_rrd_local( i, k, nxlf, nxlc, nxl_on_file, nxrf, nxrc,      &
+                               nxr_on_file, nynf, nync, nyn_on_file, nysf,     & 
+                               nysc, nys_on_file, tmp_3d, found )
+    
+
+       USE control_parameters
+           
+       USE indices
+       
+       USE kinds
+       
+       USE pegrid
+ 
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i               !< 
+       INTEGER(iwp) ::  k               !< 
+       INTEGER(iwp) ::  nxlc            !< 
+       INTEGER(iwp) ::  nxlf            !< 
+       INTEGER(iwp) ::  nxl_on_file     !< 
+       INTEGER(iwp) ::  nxrc            !< 
+       INTEGER(iwp) ::  nxrf            !< 
+       INTEGER(iwp) ::  nxr_on_file     !< 
+       INTEGER(iwp) ::  nync            !< 
+       INTEGER(iwp) ::  nynf            !< 
+       INTEGER(iwp) ::  nyn_on_file     !< 
+       INTEGER(iwp) ::  nysc            !< 
+       INTEGER(iwp) ::  nysf            !< 
+       INTEGER(iwp) ::  nys_on_file     !< 
+
+       LOGICAL, INTENT(OUT)  ::  found 
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d   !< 
+
+!
+!-- Here the reading of user-defined restart data follows:
+!-- Sample for user-defined output
+
+
+       found = .TRUE.
+
+
+          SELECT CASE ( restart_string(1:length) )
+
+             CASE ( 'u2_av' )
+!                IF ( .NOT. ALLOCATED( u2_av ) ) THEN
+!                     ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!                ENDIF
+!                IF ( k == 1 )  READ ( 13 )  tmp_3d
+!                   u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =         &
+!                      tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp)
+!
+             CASE DEFAULT
+
+                found = .FALSE.
+
+             END SELECT
+
+
+    END SUBROUTINE user_rrd_local
+
+
+ END MODULE user_read_restart_data_mod
Index: /palm/tags/release-6.0/SOURCE/user_spectra.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_spectra.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_spectra.f90	(revision 3477)
@@ -0,0 +1,146 @@
+!> @file user_spectra.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Consider additional spectra for passive scalar
+! 
+! 1833 2016-04-07 14:23:03Z raasch
+! spectrum renamed spectra_mod
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable  
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Calculation of user-defined spectra.
+!> See section 3.5.4 on how to define, calculate, and output user defined
+!> quantities.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_spectra( mode, m, pr )
+ 
+
+    USE arrays_3d
+    
+    USE control_parameters
+    
+    USE indices
+    
+    USE kinds
+    
+    USE spectra_mod
+    
+    USE statistics
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode
+
+    INTEGER(iwp) ::  i    !< 
+    INTEGER(iwp) ::  j    !< 
+    INTEGER(iwp) ::  k    !< 
+    INTEGER(iwp) ::  m    !< 
+    INTEGER(iwp) ::  pr   !< 
+
+
+!
+!-- Sample on how to calculate spectra of user-defined quantities. 
+!-- Each quantity is identified by the corresponding user profile index
+!-- "pr_palm+#" where "#" is an integer starting from 1. These
+!-- user-profile-numbers must also be assigned to the respective strings
+!-- given by data_output_pr_user in routine user_check_data_output_pr.
+    IF ( mode == 'preprocess' )  THEN
+
+       SELECT CASE ( TRIM( data_output_sp(m) ) )
+          
+          CASE ( 'u', 'v', 'w', 'theta', 'q', 's' )
+!--          Not allowed here since these are the standard quantities used in 
+!--          preprocess_spectra.
+       
+!          CASE ( 'u*v*' )
+!             pr = pr_palm+1
+!             d(nzb+1:nzt,nys:nyn,nxl:nxr) = ustvst(nzb+1:nzt,nys:nyn,nxl:nxr)
+       
+          CASE DEFAULT
+             message_string = 'Spectra of ' //                                 &
+                         TRIM( data_output_sp(m) ) // ' can not be calculated'
+             CALL message( 'user_spectra', 'UI0010', 0, 1, 0, 6, 0 )
+            
+       END SELECT
+
+    ELSEIF ( mode == 'data_output' )  THEN
+
+       SELECT CASE ( TRIM( data_output_sp(m) ) )
+
+          CASE ( 'u', 'v', 'w', 'theta', 'q', 's' )
+!--          Not allowed here since these are the standard quantities used in 
+!--          data_output_spectra.
+
+!          CASE ( 'u*v*' )
+!             pr = 6
+
+          CASE DEFAULT
+             message_string = 'Spectra of ' //                                 &
+                              TRIM( data_output_sp(m) ) // ' are not defined'
+             CALL message( 'user_spectra', 'UI0011', 0, 0, 0, 6, 0 )
+             
+          END SELECT
+
+    ENDIF
+
+ END SUBROUTINE user_spectra
+
Index: /palm/tags/release-6.0/SOURCE/user_statistics.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_statistics.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_statistics.f90	(revision 3477)
@@ -0,0 +1,173 @@
+!> @file user_statistics.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2233 2017-05-30 18:08:54Z suehring
+!
+! 2232 2017-05-30 17:47:52Z suehring
+! Ajdustments for new topography masking
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1804 2016-04-05 16:30:18Z maronga
+! Removed code for parameter file check (__check)
+!
+! 1783 2016-03-06 18:36:17Z raasch
+! netcdf module name changed + related changes
+!
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+! 
+! 1353 2014-04-08 15:21:23Z heinze
+! REAL constants provided with KIND-attribute 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! kind-parameters added to all INTEGER and REAL declaration statements, 
+! kinds are defined in new module kinds, 
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements 
+!
+! 1046 2012-11-09 14:38:45Z maronga
+! added preprocessor directive for parameter file check 
+! 
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Calculation of user-defined statistics, i.e. horizontally averaged profiles
+!> and time series.
+!> This routine is called for every statistic region sr defined by the user,
+!> but at least for the region "total domain" (sr=0).
+!> See section 3.5.4 on how to define, calculate, and output user defined
+!> quantities.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_statistics( mode, sr, tn )
+ 
+
+    USE arrays_3d
+    
+    USE indices
+    
+    USE kinds
+    
+    USE netcdf_interface,                                                      &
+        ONLY:  dots_max
+
+    USE pegrid
+    
+    USE statistics
+    
+    USE user
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode   !< 
+
+    INTEGER(iwp) ::  i    !< 
+    INTEGER(iwp) ::  j    !< 
+    INTEGER(iwp) ::  k    !< 
+    INTEGER(iwp) ::  sr   !< 
+    INTEGER(iwp) ::  tn   !< 
+
+    REAL(wp),                                                                  &
+       DIMENSION(dots_num_palm+1:dots_max) ::                                  &
+          ts_value_l   !< 
+
+
+    IF ( mode == 'profiles' )  THEN
+
+!
+!--    Sample on how to calculate horizontally averaged profiles of user-
+!--    defined quantities. Each quantity is identified by the index
+!--    "pr_palm+#" where "#" is an integer starting from 1. These
+!--    user-profile-numbers must also be assigned to the respective strings
+!--    given by data_output_pr_user in routine user_check_data_output_pr.
+!       !$OMP DO
+!       DO  i = nxl, nxr
+!          DO  j = nys, nyn
+!             DO  k = nzb+1, nzt
+!!
+!!--             Sample on how to calculate the profile of the resolved-scale
+!!--             horizontal momentum flux u*v*
+!                sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) +             &
+!                      ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,sr) ) *&
+!                      ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,sr) )  &
+!                                     * rmask(j,i,sr)                          &
+!                                     * MERGE( 1.0_wp, 0.0_wp,                 &
+!                                              BTEST( wall_flags_0(k,j,i), 0 ) )
+!!
+!!--             Further profiles can be defined and calculated by increasing
+!!--             the second index of array sums_l (replace ... appropriately)
+!                sums_l(k,pr_palm+2,tn) = sums_l(k,pr_palm+2,tn) + ...           &
+!                                         * rmask(j,i,sr)
+!             ENDDO
+!          ENDDO
+!       ENDDO
+
+    ELSEIF ( mode == 'time_series' )  THEN
+
+!
+!--    Sample on how to add values for the user-defined time series quantities.
+!--    These have to be defined before in routine user_init. This sample
+!--    creates two time series for the absolut values of the horizontal
+!--    velocities u and v.
+!       ts_value_l = 0.0_wp
+!       ts_value_l(dots_num_palm+1) = ABS( u_max )
+!       ts_value_l(dots_num_palm+2) = ABS( v_max )
+!
+!--     Collect / send values to PE0, because only PE0 outputs the time series.
+!--     CAUTION: Collection is done by taking the sum over all processors.
+!--              You may have to normalize this sum, depending on the quantity
+!--              that you like to calculate. For serial runs, nothing has to be
+!--              done.
+!--     HINT: If the time series value that you are calculating has the same
+!--           value on all PEs, you can omit the MPI_ALLREDUCE call and
+!--           assign ts_value(dots_num_palm+1:,sr) = ts_value_l directly.
+!#if defined( __parallel )
+!       IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )
+!       CALL MPI_ALLREDUCE( ts_value_l(dots_num_palm+1),                         &
+!                           ts_value(dots_num_palm+1,sr),                        &
+!                           dots_max-dots_num_palm, MPI_REAL, MPI_SUM, comm2d,   &
+!                           ierr )
+!#else
+!       ts_value(dots_num_palm+1:,sr) = ts_value_l
+!#endif
+
+    ENDIF
+
+ END SUBROUTINE user_statistics
+
Index: /palm/tags/release-6.0/SOURCE/user_write_restart_data_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/user_write_restart_data_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/user_write_restart_data_mod.f90	(revision 3477)
@@ -0,0 +1,101 @@
+!> @file user_write_restart_data_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> Writes user specific restart data into binary file(s) for restart runs.
+!------------------------------------------------------------------------------!
+ MODULE user_write_restart_data_mod
+
+
+    USE user
+     
+
+    IMPLICIT NONE
+
+
+    INTERFACE user_wrd_global
+       MODULE PROCEDURE user_wrd_global
+    END INTERFACE user_wrd_global
+
+    INTERFACE user_wrd_local
+       MODULE PROCEDURE user_wrd_local
+    END INTERFACE user_wrd_local
+
+
+    PUBLIC user_wrd_global, user_wrd_local
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Writes global and user-defined restart data into binary file(s) for restart
+!> runs.
+!------------------------------------------------------------------------------!
+    SUBROUTINE user_wrd_global  
+
+
+       IMPLICIT NONE
+
+       
+!       CALL wrd_write_string( 'global_parameter' )
+!       WRITE ( 14 )  global_parameter
+
+       
+    END SUBROUTINE user_wrd_global    
+
+
+! Description:
+! ------------
+!> Writes processor specific and user-defined restart data into binary file(s) 
+!> for restart runs.
+!------------------------------------------------------------------------------!
+    SUBROUTINE user_wrd_local
+
+
+       IMPLICIT NONE
+
+
+!
+!-- Here the user-defined actions at the end of a job follow.
+!-- Sample for user-defined output:
+!          IF ( ALLOCATED( u2_av ) )  THEN
+!             CALL wrd_write_string( 'u2_av' )  
+!             WRITE ( 14 )  u2_av
+!          ENDIF
+
+
+
+    END SUBROUTINE user_wrd_local
+
+
+ END MODULE user_write_restart_data_mod
Index: /palm/tags/release-6.0/SOURCE/uv_exposure_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/uv_exposure_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/uv_exposure_model_mod.f90	(revision 3477)
@@ -0,0 +1,798 @@
+!> @file uv_exposure_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Schrempf:
+! Bugfix in rotate 3D-Model human to desired direction
+! Bugfix in interpolate to accurate Solar Azimuth Angle
+! Further changes in variables
+! 
+! 3448 2018-10-29 18:14:31Z kanani
+! Temporary rename of namelist until uv model moves to biometeorology module
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message and small
+! typo bugfix
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3014 2018-05-09 08:42:38Z maronga
+! Bugfix: domain bounds of local_pf corrected
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! Further allocation checks implemented (averaged data will be assigned to fill
+! values if no allocation happened so far) 
+! 
+! 2932 2018-03-26 09:39:22Z maronga
+! renamed uvexposure_par to biometeorology_parameters
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Routine for skipping global restart data has been removed, uvem_last_actions
+! has been renamed to uvem_wrd_global and uvem_read_restart_data has been 
+! renamed to uvem_rrd_global, variable named found has been introduced for 
+! checking if restart data was found, reading of restart strings has been moved
+! completely to read_restart_data_mod, marker *** end new module *** has been
+! removed, strings and their respective lengths are written out and read now 
+! in case of restart runs to get rid of prescribed character lengths, CASE 
+! DEFAULT was added if restart data is read 
+! 
+! 2848 2018-03-05 10:11:18Z Giersch
+! Initial revision
+!
+! 
+!
+! Authors:
+! --------
+! @author Michael Schrempf
+!
+!
+! Description:
+! ------------
+!> Calculation of vitamin-D weighted UV exposure
+!>
+!>
+!> @todo uv_vitd3dose-->new output type necessary (cumulative)
+!> @todo consider upwelling radiation
+!>
+!> @note <Enter notes on the module>
+!>
+!> @bug  <Enter known bugs here>
+!------------------------------------------------------------------------------!
+ MODULE uv_exposure_model_mod
+
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE kinds
+
+    USE date_and_time_mod,                                                     &
+       ONLY:  calc_date_and_time, day_of_year, time_utc
+
+    USE netcdf_data_input_mod,                                                 &
+       ONLY:  netcdf_data_input_uvem, uvem_projarea_f, uvem_radiance_f,        &
+               uvem_irradiance_f, uvem_integration_f, building_obstruction_f 
+
+
+
+    IMPLICIT NONE
+
+
+!
+!-- Declare all global variables within the module (alphabetical order)
+    INTEGER(iwp) ::  ai                      = 0 !< running index
+    INTEGER(iwp) ::  clothing                = 1 !< clothing (0=unclothed, 1=Arms,Hands Face free, 3=Hand, Face free)
+    INTEGER(iwp) ::  obstruction_direct_beam = 0 !< Obstruction information for direct beam    
+    INTEGER(iwp) ::  zi                      = 0 !< running index
+
+    INTEGER(KIND=1), DIMENSION(0:44)  ::  obstruction_temp1 = 0 !< temporary obstruction information
+                                                             !< stored with ibset as logical information 
+    INTEGER(iwp), DIMENSION(0:359) ::  obstruction_temp2 = 0 !< temporary obstruction information restored values
+                                                             !< from logical information, which where stored by ibset  
+    
+    INTEGER(iwp), DIMENSION(0:35,0:9) ::  obstruction = 1 !< final obstruction information array for all
+                                                          !< hemispherical directions
+    
+    LOGICAL ::  consider_obstructions = .TRUE.   !< namelist parameter (see documentation)
+    LOGICAL ::  sun_in_south          = .FALSE.  !< namelist parameter (see documentation)
+    LOGICAL ::  turn_to_sun           = .TRUE.   !< namelist parameter (see documentation)
+
+    REAL(wp) ::  diffuse_exposure            =   0.0_wp !< calculated exposure by diffuse radiation
+    REAL(wp) ::  direct_exposure             =   0.0_wp !< calculated exposure by direct beam   
+    REAL(wp) ::  orientation_angle           =   0.0_wp !< orientation of front/face of the human model    
+    REAL(wp) ::  projection_area_direct_beam =   0.0_wp !< projection area for  by direct beam
+    REAL(wp) ::  saa                         = 180.0_wp !< solar azimuth angle
+    REAL(wp) ::  startpos_human              =   0.0_wp !< start position in azimuth direction for the
+                                                        !< interpolation of the projection area              
+    REAL(wp) ::  startpos_saa_float          =   0.0_wp !< start position in azimuth direction for the
+                                                        !< interpolation of the radiance field             
+    REAL(wp) ::  sza                         =  20.0_wp !< solar zenith angle
+    REAL(wp) ::  xfactor                     =   0.0_wp !< relative x-position used for interpolation
+    REAL(wp) ::  yfactor                     =   0.0_wp !< relative y-position used for interpolation
+    
+    REAL(wp), DIMENSION(0:2)  ::  irradiance =   0.0_wp !< iradiance values extracted from irradiance lookup table    
+    REAL(wp), DIMENSION(0:2,0:90) ::  irradiance_lookup_table = 0.0_wp !< irradiance lookup table contains values
+                                                                       !< for direct, diffuse and global component
+
+    REAL(wp), DIMENSION(0:35,0:9) ::  integration_array            = 0.0_wp
+    REAL(wp), DIMENSION(0:35,0:9) ::  projection_area              = 0.0_wp
+    REAL(wp), DIMENSION(0:35,0:9) ::  projection_area_lookup_table = 0.0_wp
+    REAL(wp), DIMENSION(0:71,0:9) ::  projection_area_direct_temp  = 0.0_wp
+    REAL(wp), DIMENSION(0:71,0:9) ::  projection_area_temp         = 0.0_wp
+    REAL(wp), DIMENSION(0:35,0:9) ::  radiance_array               = 0.0_wp
+    REAL(wp), DIMENSION(0:71,0:9) ::  radiance_array_temp          = 0.0_wp
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vitd3_exposure
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vitd3_exposure_av
+
+    REAL(wp), DIMENSION(0:35,0:9,0:90) ::  radiance_lookup_table = 0.0_wp
+
+
+    SAVE
+
+    PRIVATE
+
+    
+!
+!-- Add INTERFACES that must be available to other modules (alphabetical order)
+    PUBLIC uvem_3d_data_averaging, uvem_calc_exposure, uvem_check_data_output, &
+           uvem_data_output_2d, uvem_define_netcdf_grid, uvem_init,            &
+           uvem_init_arrays, uvem_parin
+
+!
+!-- Add VARIABLES that must be available to other modules (alphabetical order)
+!     PUBLIC 
+
+!
+!-- Add PROGNOSTIC QUANTITIES that must be available to other modules (alphabetical order)
+!-- PUBLIC ...
+
+
+!
+!-- Default procedures for all new modules (not all are necessarily required, 
+!-- alphabetical order is not essential)
+
+!
+!-- PALM interfaces:
+!-- Data output checks for 2D/3D data to be done in check_parameters
+    INTERFACE uvem_check_data_output
+       MODULE PROCEDURE uvem_check_data_output
+    END INTERFACE uvem_check_data_output
+! 
+!
+!-- Averaging of 3D data for output
+    INTERFACE uvem_3d_data_averaging
+       MODULE PROCEDURE uvem_3d_data_averaging
+    END INTERFACE uvem_3d_data_averaging
+! 
+!
+!-- Data output of 2D quantities
+    INTERFACE uvem_data_output_2d
+       MODULE PROCEDURE uvem_data_output_2d
+    END INTERFACE uvem_data_output_2d
+! 
+!
+! !-- Definition of data output quantities
+    INTERFACE uvem_define_netcdf_grid
+       MODULE PROCEDURE uvem_define_netcdf_grid
+    END INTERFACE uvem_define_netcdf_grid
+!  
+!
+!-- Initialization actions  
+    INTERFACE uvem_init
+       MODULE PROCEDURE uvem_init
+    END INTERFACE uvem_init
+! 
+!
+! !-- Initialization of arrays
+    INTERFACE uvem_init_arrays
+       MODULE PROCEDURE uvem_init_arrays
+    END INTERFACE uvem_init_arrays
+!     
+!
+! !-- Reading of NAMELIST parameters
+    INTERFACE uvem_parin
+       MODULE PROCEDURE uvem_parin
+    END INTERFACE uvem_parin
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check data output for new module.
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_check_data_output( var, unit, i, ilen, k )
+ 
+    USE control_parameters,                                                    &
+        ONLY:  data_output, message_string, uv_exposure
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  unit     !< string for unit of output quantity
+    CHARACTER (LEN=*) ::  var      !< string for output quantity
+
+    INTEGER(iwp) ::  i      !<
+    INTEGER(iwp) ::  ilen   !<   
+    INTEGER(iwp) ::  k      !<
+
+    SELECT CASE ( TRIM( var ) )
+
+
+       CASE ( 'uvem_vitd3*' )
+          IF (  .NOT.  uv_exposure )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                      'res a namelist &uvexposure_par'
+             CALL message( 'uvem_check_data_output', 'UV0001', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
+             message_string = 'illegal value for data_output: "' //            &
+                              TRIM( var ) // '" & only 2d-horizontal ' //      &
+                              'cross sections are allowed for this value'
+             CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'IU/s'
+
+       CASE ( 'uvem_vitd3dose*' )
+          IF (  .NOT.  uv_exposure )  THEN
+             message_string = 'output of "' // TRIM( var ) // '" requi' //  &
+                      'res  a namelist &uvexposure_par'
+             CALL message( 'uvem_check_data_output', 'UV0001', 1, 2, 0, 6, 0 )
+          ENDIF
+          IF ( k == 0  .OR.  data_output(i)(ilen-2:ilen) /= '_xy' )  THEN
+             message_string = 'illegal value for data_output: "' //            &
+                              TRIM( var ) // '" & only 2d-horizontal ' //      &
+                              'cross sections are allowed for this value'
+             CALL message( 'check_parameters', 'PA0111', 1, 2, 0, 6, 0 )
+          ENDIF
+          unit = 'IU/av-h'
+             
+       CASE DEFAULT
+          unit = 'illegal'
+
+    END SELECT
+
+ END SUBROUTINE uvem_check_data_output
+
+
+!-----------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining 2D output variables
+!-----------------------------------------------------------------------------!
+ SUBROUTINE uvem_data_output_2d( av, variable, found, grid, local_pf, two_d,   &
+                                 nzb_do, nzt_do )
+ 
+    USE indices
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  grid     !< 
+    CHARACTER (LEN=*) ::  variable !< 
+
+    INTEGER(iwp) ::  av      !< 
+    INTEGER(iwp) ::  i       !< running index 
+    INTEGER(iwp) ::  j       !< running index
+    INTEGER(iwp) ::  nzb_do  !< 
+    INTEGER(iwp) ::  nzt_do  !< 
+
+    LOGICAL      ::  found !< 
+    LOGICAL      ::  two_d !< flag parameter that indicates 2D variables (horizontal cross sections)
+
+    REAL(wp) ::  fill_value = -999.0_wp    !< value for the _FillValue attribute
+
+    REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) ::  local_pf !< 
+
+
+    found = .TRUE.
+
+    SELECT CASE ( TRIM( variable ) )
+!
+!--    Before data is transfered to local_pf, transfer is it 2D dummy variable and exchange ghost points therein. 
+!--    However, at this point this is only required for instantaneous arrays, time-averaged quantities are already exchanged. 
+       CASE ( 'uvem_vitd3*_xy' )        ! 2d-array
+          IF ( av == 0 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = vitd3_exposure(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE ( 'uvem_vitd3dose*_xy' )        ! 2d-array
+          IF ( .NOT. ALLOCATED( vitd3_exposure_av ) ) THEN
+             ALLOCATE( vitd3_exposure_av(nysg:nyng,nxlg:nxrg) )
+             vitd3_exposure_av = REAL( fill_value, KIND = wp )
+          ENDIF
+          IF ( av == 1 )  THEN
+             DO  i = nxl, nxr
+                DO  j = nys, nyn
+                   local_pf(i,j,nzb+1) = vitd3_exposure_av(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+
+          two_d = .TRUE.
+          grid = 'zu1'
+
+       CASE DEFAULT
+          found = .FALSE.
+          grid  = 'none'
+
+    END SELECT
+ 
+ END SUBROUTINE uvem_data_output_2d
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine defining appropriate grid for netcdf variables.
+!> It is called out from subroutine netcdf.
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_define_netcdf_grid( var, found, grid_x, grid_y, grid_z )
+    
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT(IN)  ::  var         !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_x      !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_y      !< 
+    CHARACTER (LEN=*), INTENT(OUT) ::  grid_z      !< 
+
+    LOGICAL, INTENT(OUT)           ::  found       !<
+
+    found  = .TRUE.
+
+!
+!-- Check for the grid
+    SELECT CASE ( TRIM( var ) )
+
+       CASE ( 'uvem_vitd3*_xy', 'uvem_vitd3dose*_xy' )
+          grid_x = 'x'
+          grid_y = 'y'
+          grid_z = 'zu1'
+
+       CASE DEFAULT
+          found  = .FALSE.
+          grid_x = 'none'
+          grid_y = 'none'
+          grid_z = 'none'
+
+    END SELECT
+
+ END SUBROUTINE uvem_define_netcdf_grid
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &uvexposure_par for UV exposure model
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_parin
+
+    USE control_parameters,                                                   &
+        ONLY:  uv_exposure
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=80) ::  line  !< dummy string for current line in parameter file 
+    
+    NAMELIST /biometeorology_parameters_uv/  clothing,                            &
+                                             consider_obstructions,               &
+                                             orientation_angle,                   &
+                                             sun_in_south,                        &
+                                             turn_to_sun
+    
+!    line = ' '  
+!
+!-- Try to find uv exposure model namelist
+    REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&biometeorology_parameters_uv' ) == 0 )
+       READ ( 11, '(A)', END=20 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read user-defined namelist
+    READ ( 11, biometeorology_parameters_uv, ERR = 10, END = 20 )
+
+!
+!-- Set flag that indicates that the uv exposure model is switched on
+    uv_exposure = .TRUE.
+    GOTO 20
+
+ 10 BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'biometeorology_parameters_uv', line )
+
+
+ 20 CONTINUE
+       
+
+ END SUBROUTINE uvem_parin
+
+
+!------------------------------------------------------------------------------!
+!
+! Description:
+! ------------
+!> Subroutine for averaging 3D data
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_3d_data_averaging( mode, variable )
+ 
+
+    USE control_parameters
+
+    USE indices
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*) ::  mode    !< 
+    CHARACTER (LEN=*) :: variable !< 
+
+    INTEGER(iwp) ::  i       !< 
+    INTEGER(iwp) ::  j       !< 
+
+    IF ( mode == 'allocate' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'uvem_vitd3dose*' )
+             IF ( .NOT. ALLOCATED( vitd3_exposure_av ) )  THEN
+                ALLOCATE( vitd3_exposure_av(nysg:nyng,nxlg:nxrg) )
+             ENDIF
+             vitd3_exposure_av = 0.0_wp
+
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+    ELSEIF ( mode == 'sum' )  THEN
+
+       SELECT CASE ( TRIM( variable ) )
+
+          CASE ( 'uvem_vitd3dose*' )
+             IF ( ALLOCATED( vitd3_exposure_av ) ) THEN
+                DO  i = nxlg, nxrg
+                   DO  j = nysg, nyng
+                      vitd3_exposure_av(j,i) = vitd3_exposure_av(j,i) + vitd3_exposure(j,i)
+                   ENDDO
+                ENDDO
+             ENDIF
+
+
+          CASE DEFAULT
+             CONTINUE
+
+       END SELECT
+
+!
+!-- No averaging since we are calculating a dose (only sum is calculated and saved to
+!-- av.nc file)
+!    ELSEIF ( mode == 'average' )  THEN
+
+    ENDIF
+
+ END SUBROUTINE uvem_3d_data_averaging
+
+    
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the new module
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_init
+    
+
+    USE control_parameters,                                                   &
+        ONLY:  initializing_actions
+
+    USE netcdf_data_input_mod,                                                &
+        ONLY:  netcdf_data_input_uvem, uvem_projarea_f, uvem_radiance_f,      &
+               uvem_irradiance_f, uvem_integration_f, building_obstruction_f 
+
+    IMPLICIT NONE
+
+    CALL netcdf_data_input_uvem
+
+ END SUBROUTINE uvem_init
+
+
+!-----------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate new module arrays and define pointers if required
+!-----------------------------------------------------------------------------!
+ SUBROUTINE uvem_init_arrays
+    
+    USE indices,                                                              &
+        ONLY:  nxlg, nxrg, nyng, nysg
+
+
+
+    IMPLICIT NONE
+
+!
+!-- Allocate arrays
+    ALLOCATE ( vitd3_exposure(nysg:nyng,nxlg:nxrg) )
+    ALLOCATE ( vitd3_exposure_av(nysg:nyng,nxlg:nxrg) )
+
+!
+!-- Initialize arrays
+    vitd3_exposure = 0.0_wp
+    vitd3_exposure_av = 0.0_wp
+
+
+ END SUBROUTINE uvem_init_arrays
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Module-specific routine for new module
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_solar_position
+    
+    USE date_and_time_mod,                                                     &
+       ONLY:  calc_date_and_time, day_of_year, time_utc 
+    
+    USE control_parameters,                                                    &
+       ONLY:  latitude, longitude   
+
+    IMPLICIT NONE
+    
+   
+    REAL(wp) ::  alpha       = 0.0_wp   !< solar azimuth angle in radiant    
+    REAL(wp) ::  doy_r       = 0.0_wp   !< real format of day_of_year           
+    REAL(wp) ::  declination = 0.0_wp   !< declination
+    REAL(wp) ::  dtor        = 0.0_wp   !< factor to convert degree to radiant
+    REAL(wp) ::  js          = 0.0_wp   !< parameter for solar position calculation
+    REAL(wp) ::  lat         = 52.39_wp !< latitude
+    REAL(wp) ::  lon         = 9.7_wp   !< longitude        
+    REAL(wp) ::  thetar      = 0.0_wp   !< angle for solar zenith angle calculation
+    REAL(wp) ::  thetasr     = 0.0_wp   !< angle for solar azimuth angle calculation    
+    REAL(wp) ::  zgl         = 0.0_wp   !< calculated exposure by direct beam   
+    REAL(wp) ::  woz         = 0.0_wp   !< calculated exposure by diffuse radiation
+    REAL(wp) ::  wsp         = 0.0_wp   !< calculated exposure by direct beam   
+   
+
+    CALL calc_date_and_time
+    doy_r = real(day_of_year)   
+    dtor = pi / 180.0_wp
+    lat = latitude
+    lon = longitude
+!
+!-- calculation of js :
+    js=  72.0_wp * ( doy_r + ( time_utc / 86400.0_wp ) ) / 73.0_wp 
+!
+!-- calculation of equation of time (zgl):
+    zgl = 0.0066_wp + 7.3525_wp * cos( ( js + 85.9_wp ) * dtor ) + 9.9359_wp *                     &
+    cos( ( 2.0_wp * js + 108.9_wp ) * dtor ) + 0.3387_wp * cos( ( 3 * js + 105.2_wp ) * dtor )
+!
+!-- calculation of apparent solar time woz:
+    woz = ( ( time_utc / 3600.0_wp ) - ( 4.0_wp * ( 15.0_wp - lon ) ) / 60.0_wp ) + ( zgl / 60.0_wp )
+!
+!-- calculation of hour angle (wsp):
+    wsp = ( woz - 12.0_wp ) * 15.0_wp
+!
+!-- calculation of declination:
+    declination = 0.3948_wp - 23.2559_wp * cos( ( js + 9.1_wp ) * dtor ) -                         &
+    0.3915_wp * cos( ( 2.0_wp * js + 5.4_wp ) * dtor ) - 0.1764_wp * cos( ( 3.0_wp * js + 26.0_wp ) * dtor )
+!
+!-- calculation of solar zenith angle
+    thetar  = acos( sin( lat * dtor) * sin( declination * dtor ) + cos( wsp * dtor ) *             &
+    cos( lat * dtor ) * cos( declination * dtor ) )
+    thetasr = asin( sin( lat * dtor) * sin( declination * dtor ) + cos( wsp * dtor ) *             & 
+    cos( lat * dtor ) * cos( declination * dtor ) )
+    sza = thetar / dtor
+!
+!-- calculation of solar azimuth angle
+    IF (woz .LE. 12.0_wp) alpha = pi - acos( (sin(thetasr) * sin(lat * dtor) -                     & 
+    sin( declination * dtor )) / ( cos(thetasr) * cos( lat * dtor ) ) )    
+    IF (woz .GT. 12.0_wp) alpha = pi + acos( (sin(thetasr) * sin(lat * dtor) -                     &
+    sin( declination * dtor )) / ( cos(thetasr) * cos( lat * dtor ) ) )    
+    saa = alpha / dtor
+
+ END SUBROUTINE uvem_solar_position
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Module-specific routine for new module
+!------------------------------------------------------------------------------!
+ SUBROUTINE uvem_calc_exposure
+
+    USE indices,                                                               &
+        ONLY:  nxlg, nxrg, nyng, nysg, nys, nyn, nxl, nxr 
+    
+    
+    IMPLICIT NONE   
+    
+    INTEGER(iwp) ::  i   !< running index
+    INTEGER(iwp) ::  j   !< running index
+    INTEGER(iwp) ::  k   !< running index
+
+    CALL uvem_solar_position
+     
+    IF (sza .GE. 90) THEN
+       vitd3_exposure(:,:) = 0.0_wp
+    ELSE
+       
+       DO  i = 0, 35
+          DO  j = 0, 9
+                projection_area_lookup_table(i,j) = uvem_projarea_f%var(clothing,j,i)
+          ENDDO
+       ENDDO
+       DO  i = 0, 35
+          DO  j = 0, 9
+                integration_array(i,j) = uvem_integration_f%var(j,i)
+          ENDDO
+       ENDDO
+       DO  i = 0, 2
+          DO  j = 0, 90
+                irradiance_lookup_table(i,j) = uvem_irradiance_f%var(j,i)
+          ENDDO
+       ENDDO
+       DO  i = 0, 35
+          DO  j = 0, 9
+             DO  k = 0, 90
+                radiance_lookup_table(i,j,k) = uvem_radiance_f%var(k,j,i)
+             ENDDO
+          ENDDO
+       ENDDO
+        
+        
+        
+!--    rotate 3D-Model human to desired direction  ----------------------------- 
+       projection_area_temp( 0:35,:) = projection_area_lookup_table
+       projection_area_temp(36:71,:) = projection_area_lookup_table               
+       IF ( .NOT. turn_to_sun )  startpos_human = orientation_angle / 10.0_wp
+       IF (       turn_to_sun )  startpos_human = saa / 10.0_wp        
+       DO  ai = 0, 35
+           xfactor = ( startpos_human ) - INT( startpos_human )
+          DO  zi = 0, 9
+              projection_area(ai,zi) = ( projection_area_temp( 36 - INT( startpos_human ) - 1 + ai , zi) * &
+                                       ( xfactor ) ) &
+                                      +( projection_area_temp( 36 - INT( startpos_human ) + ai , zi) * &
+                                        ( 1.0_wp - xfactor ) )
+          ENDDO
+       ENDDO           
+!             
+!           
+!--    interpolate to accurate Solar Zenith Angle  ------------------          
+       DO  ai = 0, 35
+          xfactor = (sza)-INT(sza)
+          DO  zi = 0, 9
+              radiance_array(ai,zi) = ( radiance_lookup_table(ai, zi, INT(sza) ) * ( 1.0_wp - xfactor) ) +&
+              ( radiance_lookup_table(ai,zi,INT(sza) + 1) * xfactor )
+          ENDDO
+       ENDDO
+       Do  ai = 0, 2
+           irradiance(ai) = ( irradiance_lookup_table(ai, INT(sza) ) * ( 1.0_wp - xfactor)) + &
+           (irradiance_lookup_table(ai, INT(sza) + 1) * xfactor )
+       ENDDO   
+!         
+!--    interpolate to accurate Solar Azimuth Angle ------------------
+       IF ( sun_in_south )  THEN
+          startpos_saa_float = 180.0_wp / 10.0_wp
+       ELSE 
+          startpos_saa_float = saa / 10.0_wp
+       ENDIF
+       radiance_array_temp( 0:35,:) = radiance_array
+       radiance_array_temp(36:71,:) = radiance_array
+       xfactor = (startpos_saa_float) - INT(startpos_saa_float)
+              DO  ai = 0, 35
+          DO  zi = 0, 9
+             radiance_array(ai,zi) = ( radiance_array_temp( 36 - INT( startpos_saa_float ) - 1 + ai , zi ) * &
+                                     ( xfactor ) ) &
+                                     + ( radiance_array_temp( 36 - INT( startpos_saa_float ) + ai , zi ) &
+                                     * ( 1.0_wp - xfactor ) )
+          ENDDO
+       ENDDO 
+!        
+!      
+!--    calculate Projectionarea for direct beam -----------------------------'
+       projection_area_direct_temp( 0:35,:) = projection_area
+       projection_area_direct_temp(36:71,:) = projection_area
+       yfactor = ( sza / 10.0_wp ) - INT( sza / 10.0_wp )
+       xfactor = ( startpos_saa_float ) - INT( startpos_saa_float )
+       projection_area_direct_beam = ( projection_area_direct_temp( INT(startpos_saa_float)    ,INT(sza/10.0_wp)  ) *&
+                                     ( 1.0_wp - xfactor ) * ( 1.0_wp - yfactor ) ) + &
+                                     ( projection_area_direct_temp( INT(startpos_saa_float) + 1,INT(sza/10.0_wp)  ) *&
+                                     (          xfactor ) * ( 1.0_wp - yfactor ) ) + &
+                                     ( projection_area_direct_temp( INT(startpos_saa_float)    ,INT(sza/10.0_wp)+1) *&
+                                     ( 1.0_wp - xfactor ) * (          yfactor ) ) + &
+                                     ( projection_area_direct_temp( INT(startpos_saa_float) + 1,INT(sza/10.0_wp)+1) *&
+                                     (          xfactor ) * (          yfactor ) )
+!                                                
+!                                                
+!                                                
+       DO  i = nxl, nxr    !nxlg, nxrg
+          DO  j = nys, nyn    !nysg, nyng 
+!                   
+! !--        extract obstruction from IBSET-Integer_Array ------------------'
+             IF (consider_obstructions ) THEN
+                obstruction_temp1 = building_obstruction_f%var_3d(:,j,i)
+                IF (obstruction_temp1(0) .NE. 9) THEN 
+                   DO  zi = 0, 44 
+                      DO  ai = 0, 7 
+                         IF ( btest( obstruction_temp1(zi), ai ) .EQV. .TRUE.) THEN
+                            obstruction_temp2( ( zi * 8 ) + ai ) = 1
+                         ELSE
+                            obstruction_temp2( ( zi * 8 ) + ai ) = 0
+                         ENDIF
+                      ENDDO
+                   ENDDO        
+                   DO  zi = 0, 9                                          
+                      obstruction(:,zi) = obstruction_temp2( zi * 36 :( zi * 36) + 35 )
+                   ENDDO
+                ELSE 
+                   obstruction(:,:) = 0
+                ENDIF
+             ENDIF
+!              
+! !--        calculated human exposure ------------------'  
+             diffuse_exposure = SUM( radiance_array * projection_area * integration_array * obstruction )      
+         
+             obstruction_direct_beam = obstruction( nint(startpos_saa_float), nint( sza / 10.0_wp ) ) 
+             IF (sza .GE. 89.99_wp) THEN
+                sza = 89.99999_wp
+             ENDIF
+!             
+! !--        calculate direct normal irradiance (direct beam) ------------------'
+             direct_exposure = ( irradiance(1) / cos( pi * sza / 180.0_wp ) ) * &
+             projection_area_direct_beam * obstruction_direct_beam  
+               
+             vitd3_exposure(j,i) = ( diffuse_exposure + direct_exposure ) / 1000.0_wp * 70.97_wp 
+             ! unit = international units vitamin D per second              
+          ENDDO
+       ENDDO
+    ENDIF
+
+ END SUBROUTINE uvem_calc_exposure
+
+ END MODULE uv_exposure_model_mod
Index: /palm/tags/release-6.0/SOURCE/vertical_nesting_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/vertical_nesting_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/vertical_nesting_mod.f90	(revision 3477)
@@ -0,0 +1,4005 @@
+!> @file vertical_nesting_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+! Copyright 2017-2018 Karlsruhe Institute of Technology
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! unused variables removed
+! 
+! 3232 2018-09-07 12:21:44Z raasch
+! references to mrun replaced by palmrun, and updated
+! 
+! 3083 2018-06-19 14:03:12Z gronemeier
+! Error messages revised
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by dz(1), error messages related to vertical grid stretching 
+! have been added
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 3045 2018-05-28 07:55:41Z Giersch
+! Error message revised
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2712 2017-12-20 17:32:50Z kanani
+! Formatting and clean-up (SadiqHuq)
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+! Renamed diffusivities to tcm_diffusivities (TG)
+! 
+! 2516 2017-10-04 11:03:04Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! Remove tabs
+! 
+! 2514 2017-10-04 09:52:37Z suehring
+! Added todo list
+! 
+! 2365 2017-08-21 14:59:59Z kanani
+! Initial revision (SadiqHuq)
+! 
+! 
+! 
+! 
+! Description:
+! ------------
+!> Module for vertical nesting.
+!>
+!> Definition of parameters and variables for vertical nesting
+!> The horizontal extent of the parent (Coarse Grid) and the child (Fine Grid)
+!> have to be identical. The vertical extent of the FG should be smaller than CG.
+!> Only integer nesting ratio supported. Odd nesting ratio preferred
+!> The code follows MPI-1 standards. The available processors are split into
+!> two groups using MPI_COMM_SPLIT. Exchange of data from CG to FG is called
+!> interpolation. FG initialization by interpolation is done once at the start.
+!> FG boundary conditions are set by interpolated at every timestep. 
+!> Exchange of data from CG to FG is called anterpolation, the two-way interaction
+!> occurs at every timestep.
+!> vnest_start_time set in PARIN allows delayed start of the coupling
+!> after spin-up of the CG
+!>
+!> @todo Replace dz(1) appropriatly to account for grid stretching
+!> @todo Ensure that code can be compiled for serial and parallel mode. Please
+!>       check the placement of the directive "__parallel".
+!> @todo Add descriptions for all declared variables/parameters, one declaration
+!>       statement per variable
+!> @todo Add a descriptive header above each subroutine (see land_surface_model)
+!> @todo FORTRAN language statements must not be used as names for variables 
+!>       (e.g. if). Please rename it.
+!> @todo Revise code according to PALM Coding Standard
+!------------------------------------------------------------------------------!
+ MODULE vertical_nesting_mod
+
+    USE kinds
+
+    IMPLICIT NONE
+
+    LOGICAL                                   ::  vnested = .FALSE.            !> set to true if palmrun
+                                                                               !> provides specific information via stdin
+    LOGICAL                                   ::  vnest_init = .FALSE.         !> set to true when FG is initialized
+    REAL(wp)                                  ::  vnest_start_time = 9999999.9 !> simulated time when FG should be 
+                                                                               !> initialized. Should be
+                                                                               !> identical in PARIN & PARIN_N
+
+
+
+    INTEGER(iwp),DIMENSION(3,2)               :: bdims = 0        !> sub-domain grid topology of current PE
+    INTEGER(iwp),DIMENSION(3,2)               :: bdims_rem = 0    !> sub-domain grid topology of partner PE
+    INTEGER(iwp)                              :: cg_nprocs        !> no. of PE in CG. Set by palmrun -Y
+    INTEGER(iwp)                              :: fg_nprocs        !> no. of PE in FG. Set by palmrun -Y
+    INTEGER(iwp)                              :: TYPE_VNEST_BC    !> derived contiguous data type for interpolation
+    INTEGER(iwp)                              :: TYPE_VNEST_ANTER !> derived contiguous data type for anterpolation
+    INTEGER(iwp),DIMENSION(:,:,:),ALLOCATABLE :: c2f_dims_cg      !> One CG PE sends data to multiple FG PEs
+                                                                  !> list of grid-topology of partners
+    INTEGER(iwp),DIMENSION(:,:,:),ALLOCATABLE :: f2c_dims_cg      !> One CG PE receives data from multiple FG PEs
+                                                                  !> list of grid-topology of partners
+    INTEGER(iwp),DIMENSION(:),ALLOCATABLE     :: c2f_dims_fg      !> One FG PE sends data to multiple CG PE
+                                                                  !> list of grid-topology of partner
+    INTEGER(iwp),DIMENSION(:),ALLOCATABLE     :: f2c_dims_fg      !> One FG PE sends data to only one CG PE
+                                                                  !> list of grid-topology of partner
+
+    INTEGER(iwp),DIMENSION(:,:),ALLOCATABLE   :: f_rnk_lst        !> list storing rank of FG PE denoted by pdims
+    INTEGER(iwp),DIMENSION(:,:),ALLOCATABLE   :: c_rnk_lst        !> list storing rank of CG PE denoted by pdims
+    INTEGER(iwp),DIMENSION(3)                 :: cfratio          !> Nesting ratio in x,y and z-directions
+
+    INTEGER(iwp)                              :: nxc              !> no. of CG grid points in x-direction
+    INTEGER(iwp)                              :: nxf              !> no. of FG grid points in x-direction
+    INTEGER(iwp)                              :: nyc              !> no. of CG grid points in y-direction
+    INTEGER(iwp)                              :: nyf              !> no. of FG grid points in y-direction
+    INTEGER(iwp)                              :: nzc              !> no. of CG grid points in z-direction
+    INTEGER(iwp)                              :: nzf              !> no. of FG grid points in z-direction
+    INTEGER(iwp)                              :: ngp_c            !> no. of CG grid points in one vertical level
+    INTEGER(iwp)                              :: ngp_f            !> no. of FG grid points in one vertical level
+
+    INTEGER(iwp)                              :: n_cell_c         !> total no. of CG grid points in a PE
+    INTEGER(iwp),DIMENSION(2)                 :: pdims_partner    !> processor topology of partner PE
+    INTEGER(iwp)                              :: target_idex      !> temporary variable
+    INTEGER(iwp),DIMENSION(2)                 :: offset           !> temporary variable
+    INTEGER(iwp),DIMENSION(2)                 :: map_coord        !> temporary variable
+
+    REAL(wp)                                  :: dxc              !> CG grid pacing in x-direction
+    REAL(wp)                                  :: dyc              !> FG grid pacing in x-direction
+    REAL(wp)                                  :: dxf              !> CG grid pacing in y-direction
+    REAL(wp)                                  :: dyf              !> FG grid pacing in y-direction
+    REAL(wp)                                  :: dzc              !> CG grid pacing in z-direction
+    REAL(wp)                                  :: dzf              !> FG grid pacing in z-direction
+    REAL(wp)                                  :: dtc              !> dt calculated for CG
+    REAL(wp)                                  :: dtf              !> dt calculated for FG
+
+    REAL(wp), DIMENSION(:),    ALLOCATABLE    :: zuc              !> CG vertical u-levels
+    REAL(wp), DIMENSION(:),    ALLOCATABLE    :: zuf              !> FG vertical u-levels
+    REAL(wp), DIMENSION(:),    ALLOCATABLE    :: zwc              !> CG vertical w-levels
+    REAL(wp), DIMENSION(:),    ALLOCATABLE    :: zwf              !> FG vertical w-levels
+    REAL(wp), DIMENSION(:,:,:), POINTER       :: interpol3d       !> pointers to simplify function calls
+    REAL(wp), DIMENSION(:,:,:), POINTER       :: anterpol3d       !> pointers to simplify function calls
+
+
+    REAL(wp),DIMENSION(:,:,:), ALLOCATABLE    :: work3d           !> temporary array for exchange of 3D data
+    REAL(wp),DIMENSION(:,:),   ALLOCATABLE    :: work2dusws       !> temporary array for exchange of 2D data
+    REAL(wp),DIMENSION(:,:),   ALLOCATABLE    :: work2dvsws       !> temporary array for exchange of 2D data
+    REAL(wp),DIMENSION(:,:),   ALLOCATABLE    :: work2dts         !> temporary array for exchange of 2D data
+    REAL(wp),DIMENSION(:,:),   ALLOCATABLE    :: work2dus         !> temporary array for exchange of 2D data
+
+    SAVE
+
+!-- Public functions
+    PUBLIC vnest_init_fine, vnest_boundary_conds, vnest_anterpolate,          &
+           vnest_boundary_conds_khkm, vnest_anterpolate_e,                    &
+           vnest_init_pegrid_rank, vnest_init_pegrid_domain, vnest_init_grid, &
+           vnest_timestep_sync, vnest_deallocate
+
+!-- Public constants and variables
+    PUBLIC vnested, vnest_init, vnest_start_time
+
+    PRIVATE bdims, bdims_rem,                                                 &
+            work3d, work2dusws, work2dvsws, work2dts, work2dus,               &
+            dxc, dyc, dxf, dyf, dzc, dzf, dtc, dtf,                           &
+            zuc, zuf, zwc, zwf, interpol3d, anterpol3d,                       &
+            cg_nprocs, fg_nprocs,                                             &
+            c2f_dims_cg, c2f_dims_fg, f2c_dims_cg, f2c_dims_fg,               &
+            f_rnk_lst, c_rnk_lst, cfratio, pdims_partner,                     &
+            nxc, nxf, nyc, nyf, nzc, nzf,                                     &
+            ngp_c, ngp_f, target_idex, n_cell_c,                              &
+            offset, map_coord, TYPE_VNEST_BC, TYPE_VNEST_ANTER                
+
+    INTERFACE vnest_anterpolate
+       MODULE PROCEDURE vnest_anterpolate
+    END INTERFACE vnest_anterpolate
+
+    INTERFACE vnest_anterpolate_e
+       MODULE PROCEDURE vnest_anterpolate_e
+    END INTERFACE vnest_anterpolate_e
+
+    INTERFACE vnest_boundary_conds
+       MODULE PROCEDURE vnest_boundary_conds
+    END INTERFACE vnest_boundary_conds
+
+    INTERFACE vnest_boundary_conds_khkm
+       MODULE PROCEDURE vnest_boundary_conds_khkm
+    END INTERFACE vnest_boundary_conds_khkm
+
+    INTERFACE vnest_check_parameters
+       MODULE PROCEDURE vnest_check_parameters
+    END INTERFACE vnest_check_parameters
+
+    INTERFACE vnest_deallocate
+       MODULE PROCEDURE vnest_deallocate
+    END INTERFACE vnest_deallocate
+
+    INTERFACE vnest_init_fine
+       MODULE PROCEDURE vnest_init_fine
+    END INTERFACE vnest_init_fine
+
+    INTERFACE vnest_init_grid
+       MODULE PROCEDURE vnest_init_grid
+    END INTERFACE vnest_init_grid
+
+    INTERFACE vnest_init_pegrid_domain
+       MODULE PROCEDURE vnest_init_pegrid_domain
+    END INTERFACE vnest_init_pegrid_domain
+
+    INTERFACE vnest_init_pegrid_rank
+       MODULE PROCEDURE vnest_init_pegrid_rank
+    END INTERFACE vnest_init_pegrid_rank
+
+    INTERFACE vnest_timestep_sync
+       MODULE PROCEDURE vnest_timestep_sync
+    END INTERFACE vnest_timestep_sync
+
+ CONTAINS
+    
+    
+    
+    SUBROUTINE vnest_init_fine
+#if defined( __parallel )
+   
+        !--------------------------------------------------------------------------------!
+        ! Description:
+        ! ------------
+        ! At the specified vnest_start_time initialize the Fine Grid based on the coarse
+        ! grid values
+        !------------------------------------------------------------------------------!
+   
+   
+        USE arrays_3d
+        USE control_parameters
+        USE grid_variables
+        USE indices
+        USE interfaces
+        USE pegrid
+        USE turbulence_closure_mod,                                            &
+            ONLY :  tcm_diffusivities
+        
+   
+        IMPLICIT NONE
+   
+        REAL(wp)                              :: time_since_reference_point_rem
+        INTEGER(iwp)                          :: i
+        INTEGER(iwp)                          :: j
+        INTEGER(iwp)                          :: iif
+        INTEGER(iwp)                          :: jjf
+        INTEGER(iwp)                          :: kkf
+   
+   
+        if (myid ==0 ) print *, ' TIME TO INIT FINE from COARSE', simulated_time
+   
+        !
+        !-- In case of model termination initiated by the remote model
+        !-- (terminate_coupled_remote > 0), initiate termination of the local model.
+        !-- The rest of the coupler must then be skipped because it would cause an MPI
+        !-- intercomminucation hang.
+        !-- If necessary, the coupler will be called at the beginning of the next
+        !-- restart run.
+   
+        IF ( myid == 0) THEN
+            CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,       &
+                target_id, 0,                                                  &
+                terminate_coupled_remote, 1, MPI_INTEGER,                      &
+                target_id, 0,                                                  &
+                comm_inter, status, ierr )
+        ENDIF
+        CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d, &
+            ierr )
+   
+        IF ( terminate_coupled_remote > 0 )  THEN
+            WRITE( message_string, * ) 'remote model "',                       &
+                TRIM( coupling_mode_remote ),                                  &
+                '" terminated',                                                &
+                '&with terminate_coupled_remote = ',                           &
+                terminate_coupled_remote,                                      &
+                '&local model  "', TRIM( coupling_mode ),                      &
+                '" has',                                                       &
+                '&terminate_coupled = ',                                       &
+                terminate_coupled
+            CALL message( 'vnest_init_fine', 'PA0310', 1, 2, 0, 6, 0 )
+            RETURN
+        ENDIF
+   
+   
+        !
+        !-- Exchange the current simulated time between the models,
+        !-- currently just for total_2ding
+        IF ( myid == 0 ) THEN
+   
+            CALL MPI_SEND( time_since_reference_point, 1, MPI_REAL, target_id, &
+                11, comm_inter, ierr )
+            CALL MPI_RECV( time_since_reference_point_rem, 1, MPI_REAL,        &
+                target_id, 11, comm_inter, status, ierr )
+   
+        ENDIF
+   
+        CALL MPI_BCAST( time_since_reference_point_rem, 1, MPI_REAL, 0, comm2d, &
+            ierr )
+   
+   
+        IF ( coupling_mode == 'vnested_crse' )  THEN
+!-- Send data to fine grid for initialization
+   
+            offset(1) = ( pdims_partner(1) / pdims(1) ) * pcoord(1)
+            offset(2) = ( pdims_partner(2) / pdims(2) ) * pcoord(2)
+   
+            do j = 0,   ( pdims_partner(2) / pdims(2) ) - 1
+                do i = 0,   ( pdims_partner(1) / pdims(1) ) - 1
+                    map_coord(1) = i+offset(1)
+                    map_coord(2) = j+offset(2)
+   
+                    target_idex = f_rnk_lst(map_coord(1),map_coord(2)) + numprocs
+   
+                    CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 10, &
+                        comm_inter,status, ierr )
+   
+                    bdims (1,1) = bdims_rem (1,1) / cfratio(1)
+                    bdims (1,2) = bdims_rem (1,2) / cfratio(1)
+                    bdims (2,1) = bdims_rem (2,1) / cfratio(2)
+                    bdims (2,2) = bdims_rem (2,2) / cfratio(2)
+                    bdims (3,1) = bdims_rem (3,1)
+                    bdims (3,2) = bdims_rem (3,2) / cfratio(3)
+   
+   
+                    CALL MPI_SEND( bdims, 6, MPI_INTEGER, target_idex, 9, &
+                        comm_inter, ierr )
+   
+   
+                    n_cell_c = (bdims(1,2)-bdims(1,1)+3) * &
+                        (bdims(2,2)-bdims(2,1)+3) * &
+                        (bdims(3,2)-bdims(3,1)+3)
+   
+                    CALL MPI_SEND( u( bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        101, comm_inter, ierr)
+   
+                    CALL MPI_SEND( v( bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        102, comm_inter, ierr)
+   
+                    CALL MPI_SEND( w( bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        103, comm_inter, ierr)
+   
+                    CALL MPI_SEND( pt(bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        105, comm_inter, ierr)
+   
+            IF ( humidity )  THEN
+                    CALL MPI_SEND( q(bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        116, comm_inter, ierr)
+            ENDIF
+ 
+                     CALL MPI_SEND( e( bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        104, comm_inter, ierr)
+   
+                   CALL MPI_SEND(kh( bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        106, comm_inter, ierr)
+   
+                    CALL MPI_SEND(km( bdims(3,1):bdims(3,2)+2, &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,  &
+                        107, comm_inter, ierr)
+   
+!-- Send Surface fluxes
+            IF ( use_surface_fluxes )  THEN
+   
+                   n_cell_c = (bdims(1,2)-bdims(1,1)+3) * &
+                        (bdims(2,2)-bdims(2,1)+3)
+   
+!
+!--     shf and z0 for CG / FG need to initialized in input file or user_code
+!--     TODO
+!--     initialization of usws, vsws, ts and us not vital to vnest FG
+!--     variables are not compatible with the new surface layer module
+!
+!                 CALL MPI_SEND(surf_def_h(0)%usws( bdims(2,1)-1:bdims(2,2)+1, &
+!                     bdims(1,1)-1:bdims(1,2)+1),&
+!                     n_cell_c, MPI_REAL, target_idex,  &
+!                     110, comm_inter, ierr   )
+!
+!                 CALL MPI_SEND(surf_def_h(0)%vsws( bdims(2,1)-1:bdims(2,2)+1, &
+!                     bdims(1,1)-1:bdims(1,2)+1),&
+!                     n_cell_c, MPI_REAL, target_idex,  &
+!                     111, comm_inter, ierr   )
+!
+!                 CALL MPI_SEND(ts  ( bdims(2,1)-1:bdims(2,2)+1, &
+!                     bdims(1,1)-1:bdims(1,2)+1),&
+!                     n_cell_c, MPI_REAL, target_idex,  &
+!                     112, comm_inter, ierr   )
+!   
+!                 CALL MPI_SEND(us  ( bdims(2,1)-1:bdims(2,2)+1, &
+!                     bdims(1,1)-1:bdims(1,2)+1),&
+!                     n_cell_c, MPI_REAL, target_idex,  &
+!                     113, comm_inter, ierr   )
+!   
+            ENDIF
+   
+   
+   
+   
+                end do
+            end do
+   
+        ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+!-- Receive data from coarse grid for initialization
+   
+            offset(1) = pcoord(1) / ( pdims(1)/pdims_partner(1) )
+            offset(2) = pcoord(2) / ( pdims(2)/pdims_partner(2) )
+            map_coord(1) = offset(1)
+            map_coord(2) = offset(2)
+            target_idex = c_rnk_lst(map_coord(1),map_coord(2))
+   
+            bdims (1,1) = nxl
+            bdims (1,2) = nxr
+            bdims (2,1) = nys
+            bdims (2,2) = nyn
+            bdims (3,1) = nzb
+            bdims (3,2) = nzt
+   
+            CALL MPI_SEND( bdims,       6, MPI_INTEGER, target_idex, 10, &
+                comm_inter, ierr )
+   
+            CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 9, &
+                comm_inter,status, ierr )
+   
+            n_cell_c = (bdims_rem(1,2)-bdims_rem(1,1)+3) * &
+                (bdims_rem(2,2)-bdims_rem(2,1)+3) * &
+                (bdims_rem(3,2)-bdims_rem(3,1)+3)
+   
+            ALLOCATE( work3d ( bdims_rem(3,1)  :bdims_rem(3,2)+2, &
+                bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1))
+   
+   
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 101, &
+                comm_inter,status, ierr )
+            interpol3d => u
+            call interpolate_to_fine_u
+   
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 102, &
+                comm_inter,status, ierr )
+            interpol3d => v
+            call interpolate_to_fine_v
+   
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 103, &
+                comm_inter,status, ierr )
+            interpol3d => w
+            call interpolate_to_fine_w
+   
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 105, &
+                comm_inter,status, ierr )
+            interpol3d => pt
+            call interpolate_to_fine_s
+   
+            IF ( humidity )  THEN
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 116, &
+                comm_inter,status, ierr )
+            interpol3d => q
+            call interpolate_to_fine_s
+            ENDIF
+
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 104, &
+                comm_inter,status, ierr )
+            interpol3d => e
+            call interpolate_to_fine_s
+   
+!-- kh,km no target attribute, use of pointer not possible
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 106, &
+                comm_inter,status, ierr )
+            call interpolate_to_fine_kh
+   
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 107, &
+                comm_inter,status, ierr )
+            call interpolate_to_fine_km
+   
+            DEALLOCATE(   work3d       )
+            NULLIFY   (   interpol3d   )
+   
+!-- Recv Surface Fluxes    
+            IF ( use_surface_fluxes )  THEN
+            n_cell_c = (bdims_rem(1,2)-bdims_rem(1,1)+3) * &
+                (bdims_rem(2,2)-bdims_rem(2,1)+3)
+   
+            ALLOCATE( work2dusws ( bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+            ALLOCATE( work2dvsws ( bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+            ALLOCATE( work2dts   ( bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+            ALLOCATE( work2dus   ( bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+   
+!
+!--     shf and z0 for CG / FG need to initialized in input file or user_code
+!--     TODO
+!--     initialization of usws, vsws, ts and us not vital to vnest FG
+!--     variables are not compatible with the new surface layer module
+! 
+!          CALL MPI_RECV( work2dusws,n_cell_c, MPI_REAL, target_idex, 110, &
+!              comm_inter,status, ierr )
+! 
+!          CALL MPI_RECV( work2dvsws,n_cell_c, MPI_REAL, target_idex, 111, &
+!              comm_inter,status, ierr )
+! 
+!          CALL MPI_RECV( work2dts  ,n_cell_c, MPI_REAL, target_idex, 112, &
+!              comm_inter,status, ierr )
+!   
+!          CALL MPI_RECV( work2dus  ,n_cell_c, MPI_REAL, target_idex, 113, &
+!              comm_inter,status, ierr )
+!   
+!           CALL interpolate_to_fine_flux ( 108 )
+   
+            DEALLOCATE(   work2dusws   )
+            DEALLOCATE(   work2dvsws   )
+            DEALLOCATE(   work2dts     )
+            DEALLOCATE(   work2dus     )
+          ENDIF
+   
+          IF ( .NOT. constant_diffusion ) THEN
+             DO kkf =  bdims(3,1)+1,bdims(3,2)+1
+                 DO jjf =  bdims(2,1),bdims(2,2)
+                     DO iif =  bdims(1,1),bdims(1,2)
+   
+                         IF ( e(kkf,jjf,iif) < 0.0 ) THEN
+                              e(kkf,jjf,iif) = 1E-15_wp
+                         END IF
+   
+                     END DO
+                 END DO
+             END DO
+          ENDIF
+   
+           w(nzt+1,:,:) = w(nzt,:,:)
+          
+           CALL exchange_horiz( u, nbgp )
+           CALL exchange_horiz( v, nbgp )
+           CALL exchange_horiz( w, nbgp )
+           CALL exchange_horiz( pt, nbgp )
+           IF ( .NOT. constant_diffusion )  CALL exchange_horiz( e, nbgp )
+           IF ( humidity )  CALL exchange_horiz( q, nbgp )
+   
+           !
+           !--         Velocity boundary conditions at the bottom boundary
+           IF ( ibc_uv_b == 0 ) THEN
+               u(nzb,:,:) = 0.0_wp
+               v(nzb,:,:) = 0.0_wp
+           ELSE
+               u(nzb,:,:) = u(nzb+1,:,:)
+               v(nzb,:,:) = v(nzb+1,:,:)
+           END IF
+           
+           
+           w(nzb,:,:) = 0.0_wp
+
+!
+!-- Temperature boundary conditions at the bottom boundary
+           IF ( ibc_pt_b /= 0 ) THEN
+               pt(nzb,:,:) = pt(nzb+1,:,:)
+           END IF
+           
+           !
+           !-- Bottom boundary condition for the turbulent kinetic energy
+           !-- Generally a Neumann condition with de/dz=0 is assumed
+           IF ( .NOT. constant_diffusion ) THEN
+               e(nzb,:,:) = e(nzb+1,:,:)
+           END IF
+           
+           !
+           !-- Bottom boundary condition for turbulent diffusion coefficients
+           km(nzb,:,:) = km(nzb+1,:,:)
+           kh(nzb,:,:) = kh(nzb+1,:,:)
+           
+           !diffusivities required
+           IF ( .NOT. humidity ) THEN
+               CALL tcm_diffusivities( pt, pt_reference )
+           ELSE
+               CALL tcm_diffusivities( vpt, pt_reference )
+           ENDIF
+   
+
+!
+!-- Reset Fine Grid top Boundary Condition
+!-- At the top of the FG, the scalars always follow Dirichlet condition
+
+            ibc_pt_t = 0
+
+!-- Initialize old time levels
+            pt_p = pt; u_p = u; v_p = v; w_p = w
+            IF ( .NOT. constant_diffusion ) e_p = e
+            IF ( humidity ) THEN
+               ibc_q_t = 0
+               q_p     = q
+            ENDIF
+   
+        ENDIF
+   
+
+        if (myid==0) print *, '** Fine Initalized ** simulated_time:', simulated_time
+
+    CONTAINS
+   
+       SUBROUTINE interpolate_to_fine_w
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+      
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: nzbottom
+           INTEGER(iwp)                       :: nztop
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: wprs
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: wprf
+      
+      
+           nzbottom = bdims_rem (3,1)
+           nztop  = bdims_rem (3,2)
+      
+           ALLOCATE( wprf(nzbottom:nztop, bdims_rem(2,1)-1: bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( wprs(nzbottom:nztop,nys:nyn,nxl:nxr) )
+      
+      
+           !
+           !-- Initialisation of the velocity component w
+           !
+           !-- Interpolation in x-direction
+           DO k = nzbottom, nztop
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO i = bdims_rem(1,1),bdims_rem(1,2)
+      
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                       DO iif = bottomx, topx
+      
+                           eps    = ( iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc ) / dxc
+                           alpha  = ( ( dxf / dxc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+                      
+                           wprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+      
+                   END DO
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in y-direction (quadratic, Clark and Farley)
+           DO k = nzbottom, nztop
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+                
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+                   DO iif = nxl, nxr
+                       DO jjf = bottomy, topy
+                      
+                           eps    = ( jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc ) / dyc
+                           alpha  = ( ( dyf / dyc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           wprs(k,jjf,iif) = eminus * wprf(k,j-1,iif) &
+                               + edot  * wprf(k,j,iif)   &
+                               + eplus  * wprf(k,j+1,iif)
+      
+                       END DO
+                   END DO
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in z-direction (linear)
+      
+           DO k = nzbottom, nztop-1
+      
+               bottomz = (dzc/dzf) * k
+               topz    = (dzc/dzf) * (k+1) - 1
+      
+               DO jjf = nys, nyn
+                   DO iif = nxl, nxr
+                       DO kkf = bottomz, topz
+      
+                           w(kkf,jjf,iif) = wprs(k,jjf,iif) + ( zwf(kkf) - zwc(k) ) &
+                               * ( wprs(k+1,jjf,iif) - wprs(k,jjf,iif) ) / dzc
+      
+                       END DO
+                   END DO
+               END DO
+      
+           END DO
+      
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+      
+                   w(nzt,jjf,iif) = wprs(nztop,jjf,iif)
+       
+               END DO
+           END DO
+           !
+           !    w(nzb:nzt+1,nys:nyn,nxl:nxr) = 0
+      
+           DEALLOCATE( wprf, wprs )
+      
+       END SUBROUTINE interpolate_to_fine_w
+      
+       SUBROUTINE interpolate_to_fine_u
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+      
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: nzbottom
+           INTEGER(iwp)                       :: nztop
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: uprf
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: uprs
+      
+      
+      
+           nzbottom = bdims_rem (3,1)
+           nztop  = bdims_rem (3,2)
+      
+           ALLOCATE( uprf(nzbottom:nztop+2,nys:nyn,bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+           ALLOCATE( uprs(nzb+1:nzt+1,nys:nyn,bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+      
+           !
+           !-- Initialisation of the velocity component uf
+      
+           !
+           !-- Interpolation in y-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+      
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+                   DO i = bdims_rem(1,1)-1, bdims_rem(1,2)+1
+                       DO jjf = bottomy, topy
+      
+                           eps    = ( jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc ) / dyc
+                           alpha  = ( ( dyf / dyc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           uprf(k,jjf,i) = eminus * work3d(k,j-1,i) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j+1,i)
+      
+                       END DO
+                   END DO
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in z-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom+1, nztop
+      
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO jjf = nys, nyn
+                   DO i = bdims_rem(1,1)-1, bdims_rem(1,2)+1
+                       DO kkf = bottomz, topz
+                      
+                           eps    = ( zuf(kkf) - zuc(k) ) / dzc
+                           alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           uprs(kkf,jjf,i) = eminus * uprf(k-1,jjf,i) &
+                               + edot  * uprf(k,jjf,i)   &
+                               + eplus  * uprf(k+1,jjf,i)
+      
+                       END DO
+                   END DO
+               END DO
+      
+           END DO
+      
+           DO jjf = nys, nyn
+               DO i = bdims_rem(1,1)-1, bdims_rem(1,2)+1
+      
+                   eps    = ( zuf(nzt+1) - zuc(nztop+1) ) / dzc
+                   alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                   uprs(nzt+1,jjf,i)  = eminus * uprf(nztop,jjf,i)   &
+                       + edot  * uprf(nztop+1,jjf,i) &
+                       + eplus  * uprf(nztop+2,jjf,i)
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in x-direction (linear)
+      
+           DO kkf = nzb+1, nzt+1
+               DO jjf = nys, nyn
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                       DO iif = bottomx, topx
+                           u(kkf,jjf,iif)  = uprs(kkf,jjf,i) + ( iif * dxf - i * dxc ) &
+                               * ( uprs(kkf,jjf,i+1) - uprs(kkf,jjf,i) ) / dxc
+                       END DO
+      
+                   END DO
+               END DO
+           END DO
+           !
+           !-- Determination of uf at the bottom boundary
+      
+      
+      
+           DEALLOCATE( uprf, uprs )
+      
+       END SUBROUTINE interpolate_to_fine_u
+      
+      
+       SUBROUTINE interpolate_to_fine_v
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: nzbottom
+           INTEGER(iwp)                       :: nztop
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: vprs  
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: vprf
+          
+      
+           nzbottom = bdims_rem (3,1)
+           nztop  = bdims_rem (3,2)
+      
+           ALLOCATE( vprf(nzbottom:nztop+2,bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( vprs(nzb+1:nzt+1, bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           !
+           !-- Initialisation of the velocity component vf
+      
+           !
+           !-- Interpolation in x-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                       DO iif = bottomx, topx
+      
+                           eps    = ( iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc ) / dxc
+                           alpha  = ( ( dxf / dxc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           vprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+      
+                       END DO
+      
+                   END DO
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in z-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom+1, nztop
+             
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO iif = nxl, nxr
+                       DO kkf = bottomz, topz
+      
+                           eps    = ( zuf(kkf) - zuc(k) ) / dzc
+                           alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           vprs(kkf,j,iif) = eminus * vprf(k-1,j,iif) &
+                               + edot  * vprf(k,j,iif)   &
+                               + eplus  * vprf(k+1,j,iif)
+      
+                       END DO
+                   END DO
+               END DO
+      
+           END DO
+             
+           DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+               DO iif = nxl, nxr
+      
+                   eps    = ( zuf(nzt+1) - zuc(nztop+1) ) / dzc
+                   alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                   vprs(nzt+1,j,iif)  = eminus * vprf(nztop,j,iif)   &
+                       + edot  * vprf(nztop+1,j,iif) &
+                       + eplus  * vprf(nztop+2,j,iif)
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in y-direction (linear)
+      
+           DO kkf = nzb+1, nzt+1
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+      
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+                   DO iif = nxl, nxr
+                       DO jjf = bottomy, topy
+                           v (kkf,jjf,iif) = vprs(kkf,j,iif) + ( jjf * dyf - j * dyc ) &
+                               * ( vprs(kkf,j+1,iif) - vprs(kkf,j,iif) ) / dyc
+                       END DO
+                   END DO
+        
+               END DO
+           END DO
+      
+           !
+           !-- Determination of vf at the bottom boundary
+      
+      
+           DEALLOCATE( vprf, vprs )
+      
+       END SUBROUTINE interpolate_to_fine_v
+      
+      
+       SUBROUTINE interpolate_to_fine_s
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: nzbottom
+           INTEGER(iwp)                       :: nztop
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprs
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprf
+      
+      
+           nzbottom = bdims_rem (3,1)
+           nztop  = bdims_rem (3,2)
+      
+           ALLOCATE( ptprf(nzbottom:nztop+2,bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( ptprs(nzbottom:nztop+2,nys:nyn,nxl:nxr) )
+      
+           !
+           !-- Initialisation of scalar variables
+      
+           !
+           !-- Interpolation in x-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                       DO iif = bottomx, topx
+      
+                           eps    = ( iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc ) / dxc
+                           alpha  = ( ( dxf / dxc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           ptprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+      
+                   END DO
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in y-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+        
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+                   DO iif = nxl, nxr
+                       DO jjf = bottomy, topy
+      
+                           eps    = ( jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc ) / dyc
+                           alpha  = ( ( dyf / dyc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           ptprs(k,jjf,iif) = eminus * ptprf(k,j-1,iif) &
+                               + edot  * ptprf(k,j,iif)   &
+                               + eplus  * ptprf(k,j+1,iif)
+      
+                       END DO
+                   END DO
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in z-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom+1, nztop
+            
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO jjf = nys, nyn
+                   DO iif = nxl, nxr
+                       DO kkf = bottomz, topz
+                       
+                           eps    = ( zuf(kkf) - zuc(k) ) / dzc
+                           alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           interpol3d(kkf,jjf,iif) = eminus * ptprs(k-1,jjf,iif) &
+                               + edot  * ptprs(k,jjf,iif)   &
+                               + eplus  * ptprs(k+1,jjf,iif)
+      
+                       END DO
+                   END DO
+               END DO
+      
+           END DO
+               
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+      
+                   eps    = ( zuf(nzt+1) - zuc(nztop+1) ) / dzc
+                   alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                   interpol3d(nzt+1,jjf,iif) = eminus * ptprs(nztop,jjf,iif)   &
+                       + edot  * ptprs(nztop+1,jjf,iif) &
+                       + eplus  * ptprs(nztop+2,jjf,iif)
+      
+               END DO
+           END DO
+      
+      
+           DEALLOCATE( ptprf, ptprs ) 
+      
+       END SUBROUTINE interpolate_to_fine_s
+      
+      
+       SUBROUTINE interpolate_to_fine_kh
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: nzbottom
+           INTEGER(iwp)                       :: nztop
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprs
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprf
+      
+      
+           nzbottom = bdims_rem (3,1)
+           nztop  = bdims_rem (3,2)
+           !   nztop  = blk_dim_rem (3,2)+1
+      
+      
+           ALLOCATE( ptprf(nzbottom:nztop+2,bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( ptprs(nzbottom:nztop+2,nys:nyn,nxl:nxr) )
+      
+      
+           !
+           !-- Initialisation of scalar variables
+      
+           !
+           !-- Interpolation in x-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                       DO iif = bottomx, topx
+      
+                           eps    = ( iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc ) / dxc
+                           alpha  = ( ( dxf / dxc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           ptprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+      
+                   END DO
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in y-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+        
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+                   DO iif = nxl, nxr
+                       DO jjf = bottomy, topy
+      
+                           eps    = ( jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc ) / dyc
+                           alpha  = ( ( dyf / dyc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           ptprs(k,jjf,iif) = eminus * ptprf(k,j-1,iif) &
+                               + edot  * ptprf(k,j,iif)   &
+                               + eplus  * ptprf(k,j+1,iif)
+      
+                       END DO
+                   END DO
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in z-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom+1, nztop
+            
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO jjf = nys, nyn
+                   DO iif = nxl, nxr
+                       DO kkf = bottomz, topz
+                       
+                           eps    = ( zuf(kkf) - zuc(k) ) / dzc
+                           alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           kh(kkf,jjf,iif) = eminus * ptprs(k-1,jjf,iif) &
+                               + edot  * ptprs(k,jjf,iif)   &
+                               + eplus  * ptprs(k+1,jjf,iif)
+      
+                       END DO
+                   END DO
+               END DO
+      
+           END DO
+               
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+      
+                   eps    = ( zuf(nzt+1) - zuc(nztop+1) ) / dzc
+                   alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                   kh(nzt+1,jjf,iif) = eminus * ptprs(nztop,jjf,iif)   &
+                       + edot  * ptprs(nztop+1,jjf,iif) &
+                       + eplus  * ptprs(nztop+2,jjf,iif)
+      
+               END DO
+           END DO
+      
+      
+           DEALLOCATE( ptprf, ptprs ) 
+      
+       END SUBROUTINE interpolate_to_fine_kh
+      
+       SUBROUTINE interpolate_to_fine_km
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: nzbottom
+           INTEGER(iwp)                       :: nztop
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprs
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprf
+      
+      
+           nzbottom = bdims_rem (3,1)
+           nztop  = bdims_rem (3,2)
+           !   nztop  = blk_dim_rem (3,2)+1
+      
+      
+           ALLOCATE( ptprf(nzbottom:nztop+2,bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( ptprs(nzbottom:nztop+2,nys:nyn,nxl:nxr) )
+      
+      
+           !
+           !-- Initialisation of scalar variables
+      
+           !
+           !-- Interpolation in x-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                       DO iif = bottomx, topx
+      
+                           eps    = ( iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc ) / dxc
+                           alpha  = ( ( dxf / dxc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           ptprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+      
+                   END DO
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in y-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom, nztop+2
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+        
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+                   DO iif = nxl, nxr
+                       DO jjf = bottomy, topy
+      
+                           eps    = ( jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc ) / dyc
+                           alpha  = ( ( dyf / dyc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                           ptprs(k,jjf,iif) = eminus * ptprf(k,j-1,iif) &
+                               + edot  * ptprf(k,j,iif)   &
+                               + eplus  * ptprf(k,j+1,iif)
+      
+                       END DO
+                   END DO
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in z-direction (quadratic, Clark and Farley)
+      
+           DO k = nzbottom+1, nztop
+            
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO jjf = nys, nyn
+                   DO iif = nxl, nxr
+                       DO kkf = bottomz, topz
+                       
+                           eps    = ( zuf(kkf) - zuc(k) ) / dzc
+                           alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           km(kkf,jjf,iif) = eminus * ptprs(k-1,jjf,iif) &
+                               + edot  * ptprs(k,jjf,iif)   &
+                               + eplus  * ptprs(k+1,jjf,iif)
+      
+                       END DO
+                   END DO
+               END DO
+      
+           END DO
+               
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+      
+                   eps    = ( zuf(nzt+1) - zuc(nztop+1) ) / dzc
+                   alpha  = ( ( dzf / dzc )**2.0 - 1.0 ) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                   km(nzt+1,jjf,iif)  = eminus * ptprs(nztop,jjf,iif)   &
+                       + edot  * ptprs(nztop+1,jjf,iif) &
+                       + eplus  * ptprs(nztop+2,jjf,iif)
+      
+               END DO
+           END DO
+      
+      
+           DEALLOCATE( ptprf, ptprs ) 
+      
+       END SUBROUTINE interpolate_to_fine_km
+      
+      
+      
+      
+       SUBROUTINE interpolate_to_fine_flux
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE   :: uswspr
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE   :: vswspr
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE   :: tspr 
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE   :: uspr
+      
+           ALLOCATE( uswspr(bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( vswspr(bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( tspr  (bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( uspr  (bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+      
+           !
+           !-- Initialisation of scalar variables (2D)
+      
+           !
+           !-- Interpolation in x-direction (quadratic, Clark and Farley)
+      
+           DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+               DO i = bdims_rem(1,1), bdims_rem(1,2)
+              
+                   bottomx = (nxf+1)/(nxc+1) * i
+                   topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+      
+                   DO iif = bottomx, topx
+      
+                       eps    = ( iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc ) / dxc
+                       alpha  = ( ( dxf / dxc )**2.0 - 1.0 ) / 24.0
+                       eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                       edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                       eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+      
+                       uswspr(j,iif) = eminus * work2dusws(j,i-1) &
+                           + edot  * work2dusws(j,i)   &
+                           + eplus  * work2dusws(j,i+1)
+      
+                       vswspr(j,iif) = eminus * work2dvsws(j,i-1) &
+                           + edot  * work2dvsws(j,i)   &
+                           + eplus  * work2dvsws(j,i+1)
+      
+                       tspr(j,iif)   = eminus * work2dts(j,i-1) &
+                           + edot  * work2dts(j,i)   &
+                           + eplus  * work2dts(j,i+1)
+      
+                       uspr(j,iif)   = eminus * work2dus(j,i-1) &
+                           + edot  * work2dus(j,i)   &
+                           + eplus  * work2dus(j,i+1)
+      
+                   END DO
+      
+               END DO
+           END DO
+      
+           !
+           !-- Interpolation in y-direction (quadratic, Clark and Farley)
+      
+           DO j = bdims_rem(2,1), bdims_rem(2,2)
+             
+               bottomy = (nyf+1)/(nyc+1) * j
+               topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+      
+               DO iif = nxl, nxr
+                   DO jjf = bottomy, topy
+      
+                       eps    = ( jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc ) / dyc
+                       alpha  = ( ( dyf / dyc )**2.0 - 1.0 ) / 24.0
+                       eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                       edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                       eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+ 
+!!
+!!--   TODO
+!--    variables are not compatible with the new surface layer module
+!   
+!                    surf_def_h(0)%usws(jjf,iif) = eminus * uswspr(j-1,if) &
+!                        + edot  * uswspr(j,iif)   &
+!                        + eplus  * uswspr(j+1,iif)
+!   
+!                    surf_def_h(0)%vsws(jjf,iif) = eminus * vswspr(j-1,if) &
+!                        + edot  * vswspr(j,iif)   &
+!                        + eplus  * vswspr(j+1,iif)
+!   
+!                    ts(jjf,iif)   = eminus * tspr(j-1,if) &
+!                        + edot  * tspr(j,iif)   &
+!                        + eplus  * tspr(j+1,iif)
+!
+!                    us(jjf,iif)   = eminus * uspr(j-1,if) &
+!                        + edot  * uspr(j,iif)   &
+!                        + eplus  * uspr(j+1,iif)
+      
+                   END DO
+               END DO
+      
+           END DO
+      
+      
+           DEALLOCATE( uswspr, vswspr )
+           DEALLOCATE( tspr, uspr )
+      
+      
+       END SUBROUTINE interpolate_to_fine_flux
+   
+   
+#endif       
+    END SUBROUTINE vnest_init_fine
+   
+    SUBROUTINE vnest_boundary_conds
+#if defined( __parallel )
+        !------------------------------------------------------------------------------!
+        ! Description:
+        ! ------------
+        ! Boundary conditions for the prognostic quantities.
+        ! One additional bottom boundary condition is applied for the TKE (=(u*)**2)
+        ! in prandtl_fluxes. The cyclic lateral boundary conditions are implicitly
+        ! handled in routine exchange_horiz. Pressure boundary conditions are
+        ! explicitly set in routines pres, poisfft, poismg and sor.
+        !------------------------------------------------------------------------------!
+    
+        USE arrays_3d
+        USE control_parameters
+        USE grid_variables
+        USE indices
+        USE pegrid
+        
+    
+        IMPLICIT NONE
+    
+        INTEGER(iwp)                          :: i
+        INTEGER(iwp)                          :: j
+        INTEGER(iwp)                          :: iif
+        INTEGER(iwp)                          :: jjf
+    
+    
+        !
+        !-- vnest: top boundary conditions
+    
+        IF ( coupling_mode == 'vnested_crse' )  THEN
+        !-- Send data to fine grid for TOP BC
+    
+            offset(1) = ( pdims_partner(1) / pdims(1) ) * pcoord(1)
+            offset(2) = ( pdims_partner(2) / pdims(2) ) * pcoord(2)
+    
+            do j = 0,   ( pdims_partner(2) / pdims(2) ) - 1
+                do i = 0,   ( pdims_partner(1) / pdims(1) ) - 1
+                    map_coord(1) = i+offset(1)
+                    map_coord(2) = j+offset(2)
+    
+                    target_idex = f_rnk_lst(map_coord(1),map_coord(2)) + numprocs
+      
+                    bdims (1,1) =  c2f_dims_cg (0,map_coord(1),map_coord(2))
+                    bdims (1,2) =  c2f_dims_cg (1,map_coord(1),map_coord(2))
+                    bdims (2,1) =  c2f_dims_cg (2,map_coord(1),map_coord(2))
+                    bdims (2,2) =  c2f_dims_cg (3,map_coord(1),map_coord(2))
+                    bdims (3,1) =  c2f_dims_cg (4,map_coord(1),map_coord(2))
+                    bdims (3,2) =  c2f_dims_cg (5,map_coord(1),map_coord(2))
+  
+                    n_cell_c =      ( (bdims(1,2)-bdims(1,1)) + 3 ) * &
+                        ( (bdims(2,2)-bdims(2,1)) + 3 ) * &
+                        ( (bdims(3,2)-bdims(3,1)) + 1 )
+    
+                    CALL MPI_SEND(u (bdims(3,1), bdims(2,1)-1, bdims(1,1)-1), &
+                        1, TYPE_VNEST_BC, target_idex,    &
+                        201,    comm_inter, ierr)
+    
+                    CALL MPI_SEND(v(bdims(3,1), bdims(2,1)-1, bdims(1,1)-1),&
+                        1, TYPE_VNEST_BC, target_idex,    &
+                        202,    comm_inter, ierr)
+
+                   CALL MPI_SEND(w(bdims(3,1), bdims(2,1)-1, bdims(1,1)-1),&
+                        1, TYPE_VNEST_BC, target_idex,    &
+                        203,    comm_inter, ierr)
+    
+                    CALL MPI_SEND(pt(bdims(3,1), bdims(2,1)-1, bdims(1,1)-1),&
+                        1, TYPE_VNEST_BC, target_idex,    &
+                        205,    comm_inter, ierr)
+    
+                    IF ( humidity )  THEN 
+                    CALL MPI_SEND(q(bdims(3,1), bdims(2,1)-1, bdims(1,1)-1),&
+                        1, TYPE_VNEST_BC, target_idex,    &
+                        209,    comm_inter, ierr)
+                    ENDIF 
+ 
+                end do
+            end do
+    
+        ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+        !-- Receive data from coarse grid for TOP BC
+    
+            offset(1) = pcoord(1) / ( pdims(1)/pdims_partner(1) )
+            offset(2) = pcoord(2) / ( pdims(2)/pdims_partner(2) )
+            map_coord(1) = offset(1)
+            map_coord(2) = offset(2)
+            target_idex = c_rnk_lst(map_coord(1),map_coord(2))
+    
+            bdims_rem (1,1) = c2f_dims_fg(0)
+            bdims_rem (1,2) = c2f_dims_fg(1)
+            bdims_rem (2,1) = c2f_dims_fg(2)
+            bdims_rem (2,2) = c2f_dims_fg(3)
+            bdims_rem (3,1) = c2f_dims_fg(4)
+            bdims_rem (3,2) = c2f_dims_fg(5)
+ 
+            n_cell_c =                                    &
+                ( (bdims_rem(1,2)-bdims_rem(1,1)) + 3 ) * &
+                ( (bdims_rem(2,2)-bdims_rem(2,1)) + 3 ) * &
+                ( (bdims_rem(3,2)-bdims_rem(3,1)) + 1 )
+    
+            ALLOCATE( work3d  (                    &
+                bdims_rem(3,1)  :bdims_rem(3,2)  , &
+                bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1))
+    
+    
+            CALL MPI_RECV( work3d ,n_cell_c, MPI_REAL, target_idex, 201, &
+                comm_inter,status, ierr )
+            interpol3d => u
+            call vnest_set_topbc_u
+    
+            CALL MPI_RECV( work3d ,n_cell_c, MPI_REAL, target_idex, 202, &
+                comm_inter,status, ierr )
+            interpol3d => v
+            call vnest_set_topbc_v
+    
+            CALL MPI_RECV( work3d ,n_cell_c, MPI_REAL, target_idex, 203, &
+                comm_inter,status, ierr )
+            interpol3d => w
+            call vnest_set_topbc_w
+    
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 205, &
+                comm_inter,status, ierr )
+            interpol3d => pt
+            call vnest_set_topbc_s
+    
+            IF ( humidity )  THEN
+               CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 209, &
+                        comm_inter,status, ierr )
+                interpol3d => q
+                call vnest_set_topbc_s
+    
+                CALL exchange_horiz_2d(q (nzt+1,:,:) )
+            ENDIF
+    
+!-- TKE Neumann BC for FG top
+            DO jjf = nys, nyn
+                DO iif = nxl, nxr
+                   e(nzt+1,jjf,iif) = e(nzt,jjf,iif)
+                END DO
+            END DO
+
+!
+!-- w level nzt+1 does not impact results. Only to avoid jumps while
+!-- plotting profiles
+            w(nzt+1,:,:) = w(nzt,:,:)
+
+            CALL exchange_horiz_2d(u (nzt+1,:,:) )
+            CALL exchange_horiz_2d(v (nzt+1,:,:) )
+            CALL exchange_horiz_2d(pt(nzt+1,:,:) )
+            CALL exchange_horiz_2d(e (nzt+1,:,:) )
+            CALL exchange_horiz_2d(w (nzt+1,:,:) )
+            CALL exchange_horiz_2d(w (nzt  ,:,:) )
+    
+            NULLIFY    (   interpol3d  )
+            DEALLOCATE (   work3d      )
+    
+        ENDIF
+    
+    
+    CONTAINS
+    
+       SUBROUTINE vnest_set_topbc_w
+       
+       
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+       
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE :: wprf
+       
+           
+           ALLOCATE( wprf(bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+       
+           !
+           !-- Determination of a boundary condition for the vertical velocity component w:
+           !-- In this case only interpolation in x- and y- direction is necessary, as the
+           !-- boundary w-node of the fine grid coincides with a w-node in the coarse grid.
+           !-- For both interpolations the scheme of Clark and Farley is used.
+       
+           !
+           !-- Interpolation in x-direction
+       
+           DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+       
+               DO i = bdims_rem(1,1), bdims_rem(1,2)
+       
+                   bottomx = (nxf+1)/(nxc+1) * i
+                   topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+       
+                   DO iif = bottomx, topx
+       
+                       eps = (iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc) / dxc
+                       alpha = ( (dxf/dxc)**2.0 - 1.0) / 24.0
+                       eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                       edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                       eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+                       wprf(j,iif) = eminus * work3d(bdims_rem(3,1),j,i-1) &
+                           + edot  * work3d(bdims_rem(3,1),j,i)   &
+                           + eplus  * work3d(bdims_rem(3,1),j,i+1)
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+              
+           !
+           !-- Interpolation in y-direction
+       
+           DO j = bdims_rem(2,1), bdims_rem(2,2)
+       
+               bottomy = (nyf+1)/(nyc+1) * j
+               topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+       
+               DO iif = nxl, nxr
+       
+                   DO jjf = bottomy, topy
+       
+                       eps = (jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc) / dyc
+       
+                       alpha = ( (dyf/dyc)**2.0 - 1.0) / 24.0
+       
+                       eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+       
+                       edot = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                       eplus = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                       w(nzt,jjf,iif) = eminus * wprf(j-1,iif) &
+                           + edot  * wprf(j,iif)   &
+                           + eplus  * wprf(j+1,iif)
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+
+           DEALLOCATE( wprf )
+       
+       END SUBROUTINE vnest_set_topbc_w
+       
+       
+       SUBROUTINE vnest_set_topbc_u
+       
+       
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+       
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: uprf
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE   :: uprs
+       
+           ALLOCATE( uprf(bdims_rem(3,1):bdims_rem(3,2),nys:nyn,bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+           ALLOCATE( uprs(nys:nyn,bdims_rem(1,1)-1:bdims_rem(1,2)+1) )
+       
+       
+           !
+           !-- Interpolation in y-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+       
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+       
+                   DO i = bdims_rem(1,1)-1, bdims_rem(1,2)+1
+                       DO jjf = bottomy, topy
+       
+                           eps = (jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc) / dyc
+                           alpha = ( (dyf/dyc)**2.0 - 1.0) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           uprf(k,jjf,i) = eminus * work3d(k,j-1,i) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j+1,i)
+                       END DO
+                   END DO
+       
+               END DO
+           END DO
+       
+           !
+           !-- Interpolation in z-direction
+       
+           DO jjf = nys, nyn
+               DO i = bdims_rem(1,1)-1, bdims_rem(1,2)+1
+                   eps = ( zuf(nzt+1) - zuc(bdims_rem(3,1)+1) ) / dzc
+                   alpha = ( (dzf/dzc)**2.0 - 1.0) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+                   uprs(jjf,i) = eminus * uprf(bdims_rem(3,1),jjf,i)   &
+                       + edot  * uprf(bdims_rem(3,1)+1,jjf,i) &
+                       + eplus  * uprf(bdims_rem(3,1)+2,jjf,i)
+               END DO
+           END DO
+       
+           !
+           !-- Interpolation in x-direction
+       
+           DO jjf = nys, nyn
+               DO i = bdims_rem(1,1), bdims_rem(1,2)
+       
+                   bottomx = (nxf+1)/(nxc+1) * i
+                   topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+       
+                   DO iif = bottomx, topx
+                       u(nzt+1,jjf,iif) = uprs(jjf,i) + ( iif * dxf - i * dxc ) * ( uprs(jjf,i+1) - uprs(jjf,i) ) / dxc
+                   END DO
+       
+               END DO
+           END DO           
+       
+       
+       
+           DEALLOCATE ( uprf, uprs )
+       
+       END SUBROUTINE vnest_set_topbc_u
+       
+       
+       SUBROUTINE vnest_set_topbc_v
+       
+       
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+       
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: vprf
+           REAL(wp), DIMENSION(:,:), ALLOCATABLE   :: vprs
+         
+           
+       
+           ALLOCATE( vprf(bdims_rem(3,1):bdims_rem(3,2),bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( vprs(bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           !
+           !-- Determination of a boundary condition for the horizontal velocity component v:
+           !-- Interpolation in x- and z-direction is carried out by using the scheme,
+           !-- which was derived by Clark and Farley (1984). In y-direction a
+           !-- linear interpolation is carried out.
+       
+           !
+           !-- Interpolation in x-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+       
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) * (i+1) - 1
+       
+                       DO iif = bottomx, topx
+       
+                           eps = (iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc) / dxc
+                           alpha = ( (dxf/dxc)**2.0 - 1.0) / 24.0
+                           eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+                           vprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+       
+                   END DO
+               END DO
+           END DO
+       
+           !
+           !-- Interpolation in z-direction
+       
+           DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+               DO iif = nxl, nxr
+       
+                   eps = ( zuf(nzt+1) - zuc(bdims_rem(3,1)+1) ) / dzc
+                   alpha = ( (dzf/dzc)**2.0 - 1.0) / 24.0
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+                   vprs(j,iif) = eminus * vprf(bdims_rem(3,1),j,iif)   &
+                       + edot  * vprf(bdims_rem(3,1)+1,j,iif) &
+                       + eplus  * vprf(bdims_rem(3,1)+2,j,iif)
+       
+               END DO
+           END DO
+       
+           !
+           !-- Interpolation in y-direction
+       
+           DO j = bdims_rem(2,1), bdims_rem(2,2)
+               DO iif = nxl, nxr
+       
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+       
+                   DO jjf = bottomy, topy
+       
+                       v(nzt+1,jjf,iif) = vprs(j,iif) + ( jjf * dyf - j * dyc ) * ( vprs(j+1,iif) - vprs(j,iif) ) / dyc
+       
+                   END DO
+               END DO
+           END DO      
+       
+       
+           DEALLOCATE ( vprf, vprs)
+       
+       
+       
+       END SUBROUTINE vnest_set_topbc_v
+       
+       
+       SUBROUTINE vnest_set_topbc_s
+       
+       
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+       
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprf
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprs
+       
+           
+       
+           ALLOCATE( ptprf(bdims_rem(3,1):bdims_rem(3,2),bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( ptprs(bdims_rem(3,1):bdims_rem(3,2),nys:nyn,nxl:nxr) )
+       
+           !
+           !-- Determination of a boundary condition for the potential temperature pt:
+           !-- The scheme derived by Clark and Farley can be used in all three dimensions.
+       
+           !
+           !-- Interpolation in x-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+       
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+       
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+       
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) *(i+1) - 1
+       
+                       DO iif = bottomx, topx
+       
+                           eps = (iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc) / dxc
+       
+                           alpha = ( (dxf/dxc)**2.0 - 1.0) / 24.0
+       
+                           eminus = eps * (eps - 1.0 ) / 2.0 + alpha
+       
+                           edot = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                           eplus = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           ptprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+       
+           !
+           !-- Interpolation in y-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+       
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+       
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+       
+                   DO iif = nxl, nxr
+       
+                       DO jjf = bottomy, topy
+       
+                           eps = (jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc) / dyc
+       
+                           alpha = ( (dyf/dyc)**2.0 - 1.0) / 24.0
+                   
+                           eminus = eps * (eps - 1.0) / 2.0 + alpha
+       
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           ptprs(k,jjf,iif) = eminus * ptprf(k,j-1,iif) &
+                               + edot  * ptprf(k,j,iif)   &
+                               + eplus  * ptprf(k,j+1,iif)
+                       END DO
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+       
+           !
+           !-- Interpolation in z-direction
+       
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+       
+                   eps = ( zuf(nzt+1) - zuc(bdims_rem(3,1)+1) ) / dzc
+       
+                   alpha = ( (dzf/dzc)**2.0 - 1.0) / 24.0
+       
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+       
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                   interpol3d (nzt+1,jjf,iif) = eminus * ptprs(bdims_rem(3,1),jjf,iif)   &
+                       + edot  * ptprs(bdims_rem(3,1)+1,jjf,iif) &
+                       + eplus  * ptprs(bdims_rem(3,1)+2,jjf,iif)
+       
+               END DO
+           END DO          
+           
+           DEALLOCATE ( ptprf, ptprs )
+       
+       
+       
+       END SUBROUTINE vnest_set_topbc_s
+#endif
+    END SUBROUTINE vnest_boundary_conds
+    
+ 
+    SUBROUTINE vnest_boundary_conds_khkm
+#if defined( __parallel )
+    
+        !--------------------------------------------------------------------------------!
+        ! Description:
+        ! ------------
+        ! Boundary conditions for the prognostic quantities.
+        ! One additional bottom boundary condition is applied for the TKE (=(u*)**2)
+        ! in prandtl_fluxes. The cyclic lateral boundary conditions are implicitly
+        ! handled in routine exchange_horiz. Pressure boundary conditions are
+        ! explicitly set in routines pres, poisfft, poismg and sor.
+        !------------------------------------------------------------------------------!
+    
+        USE arrays_3d
+        USE control_parameters
+        USE grid_variables
+        USE indices
+        USE pegrid
+        
+    
+        IMPLICIT NONE
+    
+        INTEGER(iwp)                          :: i
+        INTEGER(iwp)                          :: j
+        INTEGER(iwp)                          :: iif
+        INTEGER(iwp)                          :: jjf
+    
+    
+        IF ( coupling_mode == 'vnested_crse' )  THEN
+        ! Send data to fine grid for TOP BC
+    
+            offset(1) = ( pdims_partner(1) / pdims(1) ) * pcoord(1)
+            offset(2) = ( pdims_partner(2) / pdims(2) ) * pcoord(2)
+    
+            do j = 0,   ( pdims_partner(2) / pdims(2) ) - 1
+                do i = 0,   ( pdims_partner(1) / pdims(1) ) - 1
+                    map_coord(1) = i+offset(1)
+                    map_coord(2) = j+offset(2)
+    
+                    target_idex = f_rnk_lst(map_coord(1),map_coord(2)) + numprocs
+    
+                    CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 10, &
+                        comm_inter,status, ierr )
+    
+                    bdims (1,1) = bdims_rem (1,1) / cfratio(1)
+                    bdims (1,2) = bdims_rem (1,2) / cfratio(1)
+                    bdims (2,1) = bdims_rem (2,1) / cfratio(2)
+                    bdims (2,2) = bdims_rem (2,2) / cfratio(2)
+                    bdims (3,1) = bdims_rem (3,2) / cfratio(3)
+                    bdims (3,2) = bdims     (3,1) + 2
+    
+                    CALL MPI_SEND( bdims,       6, MPI_INTEGER, target_idex, 9, &
+                        comm_inter, ierr )
+    
+    
+                    n_cell_c =      ( (bdims(1,2)-bdims(1,1)) + 3 ) * &
+                        ( (bdims(2,2)-bdims(2,1)) + 3 ) * &
+                        ( (bdims(3,2)-bdims(3,1)) + 1 )
+    
+                    CALL MPI_SEND(kh(bdims(3,1)  :bdims(3,2)  , &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,    &
+                        207, comm_inter, ierr)
+    
+                    CALL MPI_SEND(km(bdims(3,1)  :bdims(3,2)  , &
+                        bdims(2,1)-1:bdims(2,2)+1, &
+                        bdims(1,1)-1:bdims(1,2)+1),&
+                        n_cell_c, MPI_REAL, target_idex,    &
+                        208, comm_inter, ierr)
+    
+    
+    
+                end do
+            end do
+    
+        ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+                      ! Receive data from coarse grid for TOP BC
+    
+            offset(1) = pcoord(1) / ( pdims(1)/pdims_partner(1) )
+            offset(2) = pcoord(2) / ( pdims(2)/pdims_partner(2) )
+            map_coord(1) = offset(1)
+            map_coord(2) = offset(2)
+            target_idex = c_rnk_lst(map_coord(1),map_coord(2))
+    
+            bdims (1,1) = nxl
+            bdims (1,2) = nxr
+            bdims (2,1) = nys
+            bdims (2,2) = nyn
+            bdims (3,1) = nzb
+            bdims (3,2) = nzt
+    
+            CALL MPI_SEND( bdims,       6, MPI_INTEGER, target_idex, 10, &
+                comm_inter, ierr )
+    
+            CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 9, &
+                comm_inter,status, ierr )
+    
+            n_cell_c =       ( (bdims_rem(1,2)-bdims_rem(1,1)) + 3 ) * &
+                ( (bdims_rem(2,2)-bdims_rem(2,1)) + 3 ) * &
+                ( (bdims_rem(3,2)-bdims_rem(3,1)) + 1 )
+    
+            ALLOCATE( work3d  ( bdims_rem(3,1)  :bdims_rem(3,2)  , &
+                bdims_rem(2,1)-1:bdims_rem(2,2)+1, &
+                bdims_rem(1,1)-1:bdims_rem(1,2)+1))
+    
+    
+            CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 207, &
+                comm_inter,status, ierr )
+    
+        ! Neumann BC for FG kh
+        DO jjf = nys, nyn
+            DO iif = nxl, nxr
+               kh(nzt+1,jjf,iif) = kh(nzt,jjf,iif)
+            END DO
+        END DO
+    
+        CALL MPI_RECV( work3d,n_cell_c, MPI_REAL, target_idex, 208, &
+             comm_inter,status, ierr )
+    
+        ! Neumann BC for FG kh
+        DO jjf = nys, nyn
+            DO iif = nxl, nxr
+               km(nzt+1,jjf,iif) = km(nzt,jjf,iif)
+            END DO
+        END DO
+    
+    
+        !
+        !-- The following evaluation can only be performed, if the fine grid is situated below the inversion
+        !!    DO jjf = nys-1, nyn+1
+        !!       DO iif = nxl-1, nxr+1
+        !!
+        !!          km(nzt+1,jjf,iif) = 0.1 * l_grid(nzt+1) * SQRT( e(nzt+1,jjf,iif) )
+        !!          kh(nzt+1,jjf,iif) = 3.0 * km(nzt+1,jjf,iif)
+        !!
+        !!       END DO
+        !!    END DO
+    
+        CALL exchange_horiz_2d(km(nzt+1,:,:) )
+        CALL exchange_horiz_2d(kh(nzt+1,:,:) )
+    
+        DEALLOCATE (   work3d      )
+    
+        ENDIF
+    
+    
+    CONTAINS
+ 
+       SUBROUTINE vnest_set_topbc_kh
+       
+       
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+       
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprf
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprs
+       
+           
+       
+           ALLOCATE( ptprf(bdims_rem(3,1):bdims_rem(3,2),bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( ptprs(bdims_rem(3,1):bdims_rem(3,2),nys:nyn,nxl:nxr) )
+       
+           !
+           !-- Determination of a boundary condition for the potential temperature pt:
+           !-- The scheme derived by Clark and Farley can be used in all three dimensions.
+       
+           !
+           !-- Interpolation in x-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+       
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+       
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+       
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) *(i+1) - 1
+       
+                       DO iif = bottomx, topx
+       
+                           eps = (iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc) / dxc
+       
+                           alpha = ( (dxf/dxc)**2.0 - 1.0) / 24.0
+       
+                           eminus = eps * (eps - 1.0 ) / 2.0 + alpha
+       
+                           edot = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                           eplus = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           ptprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+       
+           !
+           !-- Interpolation in y-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+       
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+       
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+       
+                   DO iif = nxl, nxr
+       
+                       DO jjf = bottomy, topy
+       
+                           eps = (jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc) / dyc
+       
+                           alpha = ( (dyf/dyc)**2.0 - 1.0) / 24.0
+                   
+                           eminus = eps * (eps - 1.0) / 2.0 + alpha
+       
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           ptprs(k,jjf,iif) = eminus * ptprf(k,j-1,iif) &
+                               + edot  * ptprf(k,j,iif)   &
+                               + eplus  * ptprf(k,j+1,iif)
+                       END DO
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+       
+           !
+           !-- Interpolation in z-direction
+       
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+       
+                   eps = ( zuf(nzt+1) - zuc(bdims_rem(3,1)+1) ) / dzc
+       
+                   alpha = ( (dzf/dzc)**2.0 - 1.0) / 24.0
+       
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+       
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                   kh (nzt+1,jjf,iif) = eminus * ptprs(bdims_rem(3,1),jjf,iif)   &
+                       + edot  * ptprs(bdims_rem(3,1)+1,jjf,iif) &
+                       + eplus  * ptprs(bdims_rem(3,1)+2,jjf,iif)
+       
+               END DO
+           END DO          
+           
+           DEALLOCATE ( ptprf, ptprs )
+       
+       
+       
+       END SUBROUTINE vnest_set_topbc_kh
+       
+       SUBROUTINE vnest_set_topbc_km
+       
+       
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+       
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: eps
+           REAL(wp)                           :: alpha
+           REAL(wp)                           :: eminus
+           REAL(wp)                           :: edot
+           REAL(wp)                           :: eplus
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprf
+           REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ptprs
+       
+           
+       
+           ALLOCATE( ptprf(bdims_rem(3,1):bdims_rem(3,2),bdims_rem(2,1)-1:bdims_rem(2,2)+1,nxl:nxr) )
+           ALLOCATE( ptprs(bdims_rem(3,1):bdims_rem(3,2),nys:nyn,nxl:nxr) )
+       
+           !
+           !-- Determination of a boundary condition for the potential temperature pt:
+           !-- The scheme derived by Clark and Farley can be used in all three dimensions.
+       
+           !
+           !-- Interpolation in x-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+       
+               DO j = bdims_rem(2,1)-1, bdims_rem(2,2)+1
+       
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+       
+                       bottomx = (nxf+1)/(nxc+1) * i
+                       topx    = (nxf+1)/(nxc+1) *(i+1) - 1
+       
+                       DO iif = bottomx, topx
+       
+                           eps = (iif * dxf + 0.5 * dxf - i * dxc - 0.5 * dxc) / dxc
+       
+                           alpha = ( (dxf/dxc)**2.0 - 1.0) / 24.0
+       
+                           eminus = eps * (eps - 1.0 ) / 2.0 + alpha
+       
+                           edot = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                           eplus = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           ptprf(k,j,iif) = eminus * work3d(k,j,i-1) &
+                               + edot  * work3d(k,j,i)   &
+                               + eplus  * work3d(k,j,i+1)
+                       END DO
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+       
+           !
+           !-- Interpolation in y-direction
+       
+           DO k = bdims_rem(3,1), bdims_rem(3,2)
+       
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+       
+                   bottomy = (nyf+1)/(nyc+1) * j
+                   topy    = (nyf+1)/(nyc+1) * (j+1) - 1
+       
+                   DO iif = nxl, nxr
+       
+                       DO jjf = bottomy, topy
+       
+                           eps = (jjf * dyf + 0.5 * dyf - j * dyc - 0.5 * dyc) / dyc
+       
+                           alpha = ( (dyf/dyc)**2.0 - 1.0) / 24.0
+                   
+                           eminus = eps * (eps - 1.0) / 2.0 + alpha
+       
+                           edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                           eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                           ptprs(k,jjf,iif) = eminus * ptprf(k,j-1,iif) &
+                               + edot  * ptprf(k,j,iif)   &
+                               + eplus  * ptprf(k,j+1,iif)
+                       END DO
+       
+                   END DO
+       
+               END DO
+       
+           END DO
+       
+           !
+           !-- Interpolation in z-direction
+       
+           DO jjf = nys, nyn
+               DO iif = nxl, nxr
+       
+                   eps = ( zuf(nzt+1) - zuc(bdims_rem(3,1)+1) ) / dzc
+       
+                   alpha = ( (dzf/dzc)**2.0 - 1.0) / 24.0
+       
+                   eminus = eps * ( eps - 1.0 ) / 2.0 + alpha
+       
+                   edot  = ( 1.0 - eps**2.0 ) - 2.0 * alpha
+       
+                   eplus  = eps * ( eps + 1.0 ) / 2.0 + alpha
+       
+                   km (nzt+1,jjf,iif) = eminus * ptprs(bdims_rem(3,1),jjf,iif)   &
+                       + edot  * ptprs(bdims_rem(3,1)+1,jjf,iif) &
+                       + eplus  * ptprs(bdims_rem(3,1)+2,jjf,iif)
+       
+               END DO
+           END DO          
+           
+           DEALLOCATE ( ptprf, ptprs )
+       
+       
+       
+       END SUBROUTINE vnest_set_topbc_km
+    
+ 
+#endif
+    END SUBROUTINE vnest_boundary_conds_khkm
+   
+   
+   
+    SUBROUTINE vnest_anterpolate
+
+#if defined( __parallel )
+   
+        !--------------------------------------------------------------------------------!
+        ! Description:
+        ! ------------
+        ! Anterpolate data from fine grid to coarse grid.
+        !------------------------------------------------------------------------------!
+   
+        USE arrays_3d
+        USE control_parameters
+        USE grid_variables
+        USE indices
+        USE interfaces
+        USE pegrid
+        USE surface_mod,                                                           &
+            ONLY :  bc_h
+        
+   
+        IMPLICIT NONE
+   
+        REAL(wp)                              ::  time_since_reference_point_rem
+        INTEGER(iwp)                          ::  i
+        INTEGER(iwp)                          ::  j
+        INTEGER(iwp)                          ::  k
+        INTEGER(iwp)                          ::  kb !< variable to set respective boundary value, depends on facing. 
+        INTEGER(iwp)                          ::  l  !< running index boundary type, for up- and downward-facing walls
+        INTEGER(iwp)                          ::  m  !< running index surface elements
+   
+   
+   
+        !
+        !-- In case of model termination initiated by the remote model
+        !-- (terminate_coupled_remote > 0), initiate termination of the local model.
+        !-- The rest of the coupler must then be skipped because it would cause an MPI
+        !-- intercomminucation hang.
+        !-- If necessary, the coupler will be called at the beginning of the next
+        !-- restart run.
+   
+        IF ( myid == 0) THEN
+            CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER, &
+                target_id, 0,                             &
+                terminate_coupled_remote, 1, MPI_INTEGER, &
+                target_id, 0,                             &
+                comm_inter, status, ierr )
+        ENDIF
+        CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d, &
+            ierr )
+   
+        IF ( terminate_coupled_remote > 0 )  THEN
+            WRITE( message_string, * ) 'remote model "',                       &
+                TRIM( coupling_mode_remote ),                                  &
+                '" terminated',                                                &
+                '&with terminate_coupled_remote = ',                           &
+                terminate_coupled_remote,                                      &
+                '&local model  "', TRIM( coupling_mode ),                      &
+                '" has',                                                       &
+                '&terminate_coupled = ',                                       &
+                terminate_coupled
+            CALL message( 'vnest_anterpolate', 'PA0310', 1, 2, 0, 6, 0 )
+            RETURN
+        ENDIF
+   
+   
+        !
+        !-- Exchange the current simulated time between the models
+   
+        IF ( myid == 0 ) THEN
+   
+            CALL MPI_SEND( time_since_reference_point, 1, MPI_REAL, target_id, &
+                11, comm_inter, ierr )
+            CALL MPI_RECV( time_since_reference_point_rem, 1, MPI_REAL,        &
+                target_id, 11, comm_inter, status, ierr )
+   
+        ENDIF
+   
+        CALL MPI_BCAST( time_since_reference_point_rem, 1, MPI_REAL, 0, comm2d, &
+            ierr )
+   
+        IF ( coupling_mode == 'vnested_crse' )  THEN
+                      ! Receive data from fine grid for anterpolation
+   
+            offset(1) = ( pdims_partner(1) / pdims(1) ) * pcoord(1)
+            offset(2) = ( pdims_partner(2) / pdims(2) ) * pcoord(2)
+   
+            do j = 0,   ( pdims_partner(2) / pdims(2) ) - 1
+                do i = 0,   ( pdims_partner(1) / pdims(1) ) - 1
+                    map_coord(1) = i+offset(1)
+                    map_coord(2) = j+offset(2)
+   
+                    target_idex = f_rnk_lst(map_coord(1),map_coord(2)) + numprocs
+   
+                    CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 10, &
+                        comm_inter,status, ierr )
+   
+                    bdims (1,1) = bdims_rem (1,1) / cfratio(1)
+                    bdims (1,2) = bdims_rem (1,2) / cfratio(1)
+                    bdims (2,1) = bdims_rem (2,1) / cfratio(2)
+                    bdims (2,2) = bdims_rem (2,2) / cfratio(2)
+                    bdims (3,1) = bdims_rem (3,1)
+                    bdims (3,2) = bdims_rem (3,2) / cfratio(3)
+   
+                    CALL MPI_SEND( bdims, 6, MPI_INTEGER, target_idex, 9, &
+                        comm_inter, ierr )
+   
+                    n_cell_c =                      &
+                        (bdims(1,2)-bdims(1,1)+1) * &
+                        (bdims(2,2)-bdims(2,1)+1) * &
+                        (bdims(3,2)-bdims(3,1)+0)
+   
+                    CALL MPI_RECV( u(            &
+                        bdims(3,1)+1:bdims(3,2), &
+                        bdims(2,1)  :bdims(2,2), &
+                        bdims(1,1)  :bdims(1,2)),&
+                        n_cell_c, MPI_REAL, target_idex, 101, &
+                        comm_inter,status, ierr )
+   
+                    CALL MPI_RECV( v(            &
+                        bdims(3,1)+1:bdims(3,2), &
+                        bdims(2,1)  :bdims(2,2), &
+                        bdims(1,1)  :bdims(1,2)),&
+                        n_cell_c, MPI_REAL, target_idex, 102, &
+                        comm_inter,status, ierr )
+   
+                    CALL MPI_RECV(pt(            &
+                        bdims(3,1)+1:bdims(3,2), &
+                        bdims(2,1)  :bdims(2,2), &
+                        bdims(1,1)  :bdims(1,2)),&
+                        n_cell_c, MPI_REAL, target_idex, 105, &
+                        comm_inter,status, ierr )
+   
+                 IF ( humidity ) THEN
+                    CALL MPI_RECV(q(            &
+                        bdims(3,1)+1:bdims(3,2), &
+                        bdims(2,1)  :bdims(2,2), &
+                        bdims(1,1)  :bdims(1,2)),&
+                        n_cell_c, MPI_REAL, target_idex, 106, &
+                        comm_inter,status, ierr )
+                 ENDIF
+   
+                    CALL MPI_RECV( w(              &
+                        bdims(3,1)  :bdims(3,2)-1, &
+                        bdims(2,1)  :bdims(2,2),   &
+                        bdims(1,1)  :bdims(1,2)),  &
+                        n_cell_c, MPI_REAL, target_idex, 103, &
+                        comm_inter,status, ierr )
+   
+                end do
+            end do
+   
+   
+   
+            !
+            !-- Boundary conditions for the velocity components u and v
+   
+   
+            IF ( ibc_uv_b == 0 ) THEN
+                u(nzb,:,:) = 0.0_wp 
+                v(nzb,:,:) = 0.0_wp 
+            ELSE
+                u(nzb,:,:) = u(nzb+1,:,:)
+                v(nzb,:,:) = v(nzb+1,:,:)
+            END IF
+            !
+            !-- Boundary conditions for the velocity components w
+
+            w(nzb,:,:) = 0.0_wp
+   
+!
+!-- Temperature at bottom boundary.
+!-- Neumann, zero-gradient
+            IF ( ibc_pt_b == 1 )  THEN 
+               DO  l = 0, 1 
+!
+!--       Set kb, for upward-facing surfaces value at topography top (k-1) is set,
+!--       for downward-facing surfaces at topography bottom (k+1). 
+                    kb = MERGE( -1, 1, l == 0 )
+                    DO  m = 1, bc_h(l)%ns
+                       i = bc_h(l)%i(m)     
+                       j = bc_h(l)%j(m)
+                       k = bc_h(l)%k(m)
+                       pt(k+kb,j,i) = pt(k,j,i)
+                    ENDDO
+                 ENDDO
+            ENDIF
+   
+   
+            CALL exchange_horiz( u, nbgp )
+            CALL exchange_horiz( v, nbgp )
+            CALL exchange_horiz( w, nbgp )
+            CALL exchange_horiz( pt, nbgp )
+   
+   
+        ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+                      ! Send data to coarse grid for anterpolation
+   
+            offset(1) = pcoord(1) / ( pdims(1)/pdims_partner(1) )
+            offset(2) = pcoord(2) / ( pdims(2)/pdims_partner(2) )
+            map_coord(1) = offset(1)
+            map_coord(2) = offset(2)
+            target_idex = c_rnk_lst(map_coord(1),map_coord(2))
+   
+!-- Limit anterpolation level to nzt - z nesting ratio (a pseudo-buffer layer)
+            bdims (1,1) = nxl
+            bdims (1,2) = nxr
+            bdims (2,1) = nys
+            bdims (2,2) = nyn
+            bdims (3,1) = nzb
+            bdims (3,2) = nzt-cfratio(3) 
+   
+            CALL MPI_SEND( bdims, 6, MPI_INTEGER, target_idex, 10, &
+                comm_inter, ierr )
+   
+            CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 9, &
+                comm_inter,status, ierr )
+   
+   
+            ALLOCATE( work3d (                   &
+                bdims_rem(3,1)+1:bdims_rem(3,2), &
+                bdims_rem(2,1)  :bdims_rem(2,2), &
+                bdims_rem(1,1)  :bdims_rem(1,2)))
+   
+   
+            anterpol3d => u
+      
+            CALL anterpolate_to_crse_u
+            CALL MPI_SEND( work3d, 1, TYPE_VNEST_ANTER, target_idex,  &
+                101, comm_inter, ierr)
+   
+            anterpol3d => v
+   
+            CALL anterpolate_to_crse_v
+            CALL MPI_SEND( work3d, 1, TYPE_VNEST_ANTER, target_idex,  &
+                102, comm_inter, ierr)
+   
+            anterpol3d => pt
+   
+            CALL anterpolate_to_crse_s
+            CALL MPI_SEND( work3d, 1, TYPE_VNEST_ANTER, target_idex,  &
+                105, comm_inter, ierr)
+   
+   
+          IF ( humidity ) THEN
+   
+            anterpol3d => q
+   
+            CALL anterpolate_to_crse_s
+            CALL MPI_SEND( work3d, 1, TYPE_VNEST_ANTER, target_idex,  &
+                106, comm_inter, ierr)
+          ENDIF
+   
+   
+            DEALLOCATE(   work3d                    )
+            ALLOCATE(   work3d ( bdims_rem(3,1)  :bdims_rem(3,2)-1, &
+                                 bdims_rem(2,1)  :bdims_rem(2,2), &
+                                 bdims_rem(1,1)  :bdims_rem(1,2)))
+            anterpol3d => w
+            CALL anterpolate_to_crse_w
+            CALL MPI_SEND( work3d, 1, TYPE_VNEST_ANTER, target_idex,  &
+                103, comm_inter, ierr)
+   
+            NULLIFY   (   anterpol3d                )
+            DEALLOCATE(   work3d                    )
+   
+        ENDIF
+   
+   
+
+    CONTAINS
+       SUBROUTINE anterpolate_to_crse_u
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: aweight
+      
+           !
+           !-- Anterpolation of the velocity components u
+           !-- only values in yz-planes that coincide in the fine and
+           !-- the coarse grid are considered
+      
+           DO k = bdims_rem(3,1)+1, bdims_rem(3,2)
+      
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO j = bdims_rem(2,1),bdims_rem(2,2)
+       
+                   bottomy = (nyf+1) / (nyc+1) * j
+                   topy    = (nyf+1) / (nyc+1) * (j+1) - 1
+      
+                   DO i = bdims_rem(1,1),bdims_rem(1,2)
+      
+                       iif = (nxf+1) / (nxc+1) * i
+      
+                       aweight   = 0.0
+      
+                       DO kkf = bottomz, topz
+                           DO jjf = bottomy, topy
+      
+                               aweight   = aweight + anterpol3d(kkf,jjf,iif) *        &
+                                   (dzf/dzc) * (dyf/dyc)
+      
+                           END DO
+                       END DO
+      
+                       work3d(k,j,i)   = aweight
+      
+                   END DO
+      
+               END DO
+      
+           END DO
+      
+      
+      
+       END SUBROUTINE anterpolate_to_crse_u
+      
+      
+       SUBROUTINE anterpolate_to_crse_v
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: aweight
+
+           !
+           !-- Anterpolation of the velocity components v
+           !-- only values in xz-planes that coincide in the fine and
+           !-- the coarse grid are considered
+      
+           DO k = bdims_rem(3,1)+1, bdims_rem(3,2)
+      
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+      
+                   jjf = (nyf+1) / (nyc+1) * j
+      
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1) / (nxc+1) * i
+                       topx    = (nxf+1) / (nxc+1) * (i+1) - 1
+      
+                       aweight   = 0.0
+      
+                       DO kkf = bottomz, topz
+                           DO iif = bottomx, topx
+      
+                               aweight   = aweight + anterpol3d(kkf,jjf,iif) *        &
+                                   (dzf/dzc) * (dxf/dxc)
+      
+      
+                           END DO
+                       END DO
+      
+                       work3d(k,j,i)   = aweight
+      
+                   END DO
+               END DO
+           END DO
+      
+      
+      
+       END SUBROUTINE anterpolate_to_crse_v
+      
+      
+       SUBROUTINE anterpolate_to_crse_w
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           REAL(wp)                           :: aweight
+
+           !
+           !-- Anterpolation of the velocity components w
+           !-- only values in xy-planes that coincide in the fine and
+           !-- the coarse grid are considered
+      
+           DO k = bdims_rem(3,1), bdims_rem(3,2)-1
+      
+               kkf = cfratio(3) * k
+      
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+      
+                   bottomy = (nyf+1) / (nyc+1) * j
+                   topy    = (nyf+1) / (nyc+1) * (j+1) - 1
+      
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1) / (nxc+1) * i
+                       topx    = (nxf+1) / (nxc+1) * (i+1) - 1
+      
+                       aweight   = 0.0
+      
+                       DO jjf = bottomy, topy
+                           DO iif = bottomx, topx
+      
+                               aweight   = aweight + anterpol3d (kkf,jjf,iif) *        &
+                                   (dxf/dxc) * (dyf/dyc)
+      
+                           END DO
+                       END DO
+      
+                       work3d(k,j,i)   = aweight
+      
+                   END DO
+      
+               END DO
+      
+           END DO
+      
+      
+       END SUBROUTINE anterpolate_to_crse_w
+      
+      
+       SUBROUTINE anterpolate_to_crse_s
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: aweight
+      
+           !
+           !-- Anterpolation of the potential temperature pt
+           !-- all fine grid values are considered
+      
+           DO k = bdims_rem(3,1)+1, bdims_rem(3,2)
+      
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+      
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+      
+                   bottomy = (nyf+1) / (nyc+1) * j
+                   topy    = (nyf+1) / (nyc+1) * (j+1) - 1
+      
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1) / (nxc+1) * i
+                       topx    = (nxf+1) / (nxc+1) * (i+1) - 1
+      
+                       aweight   = 0.0
+          
+                       DO kkf = bottomz, topz
+                           DO jjf = bottomy, topy
+                               DO iif = bottomx, topx
+      
+                                   aweight   = aweight  + anterpol3d(kkf,jjf,iif) *                  &
+                                       (dzf/dzc) * (dyf/dyc) * (dxf/dxc)
+      
+                               END DO
+                           END DO
+                       END DO
+      
+                       work3d(k,j,i)   = aweight
+      
+                   END DO
+      
+               END DO
+      
+           END DO
+      
+      
+       END SUBROUTINE anterpolate_to_crse_s
+#endif       
+    END SUBROUTINE vnest_anterpolate
+   
+   
+   
+    SUBROUTINE vnest_anterpolate_e
+#if defined( __parallel )
+   
+        !--------------------------------------------------------------------------------!
+        ! Description:
+        ! ------------
+        ! Anterpolate TKE from fine grid to coarse grid.
+        !------------------------------------------------------------------------------!
+   
+        USE arrays_3d
+        USE control_parameters
+        USE grid_variables
+        USE indices
+        USE interfaces
+        USE pegrid
+        
+   
+        IMPLICIT NONE
+   
+        REAL(wp)                              :: time_since_reference_point_rem
+        INTEGER(iwp)                          :: i
+        INTEGER(iwp)                          :: j
+   
+        !
+        !-- In case of model termination initiated by the remote model
+        !-- (terminate_coupled_remote > 0), initiate termination of the local model.
+        !-- The rest of the coupler must then be skipped because it would cause an MPI
+        !-- intercomminucation hang.
+        !-- If necessary, the coupler will be called at the beginning of the next
+        !-- restart run.
+   
+        IF ( myid == 0) THEN
+            CALL MPI_SENDRECV( terminate_coupled,        1, MPI_INTEGER,       &
+                target_id, 0,                                                  &
+                terminate_coupled_remote, 1, MPI_INTEGER,                      &
+                target_id, 0,                                                  &
+                comm_inter, status, ierr )
+        ENDIF
+        CALL MPI_BCAST( terminate_coupled_remote, 1, MPI_INTEGER, 0, comm2d,   &
+            ierr )
+   
+        IF ( terminate_coupled_remote > 0 )  THEN
+            WRITE( message_string, * ) 'remote model "',                       &
+                TRIM( coupling_mode_remote ),                                  &
+                '" terminated',                                                &
+                '&with terminate_coupled_remote = ',                           &
+                terminate_coupled_remote,                                      &
+                '&local model  "', TRIM( coupling_mode ),                      & 
+                '" has',                                                       &
+                '&terminate_coupled = ',                                       &
+                terminate_coupled
+            CALL message( 'vnest_anterpolate_e', 'PA0310', 1, 2, 0, 6, 0 )
+            RETURN
+        ENDIF
+   
+   
+        !
+        !-- Exchange the current simulated time between the models
+        IF ( myid == 0 ) THEN
+   
+            CALL MPI_SEND( time_since_reference_point, 1, MPI_REAL, target_id, &
+                11, comm_inter, ierr )
+            CALL MPI_RECV( time_since_reference_point_rem, 1, MPI_REAL,        &
+                target_id, 11, comm_inter, status, ierr )
+   
+        ENDIF
+   
+        CALL MPI_BCAST( time_since_reference_point_rem, 1, MPI_REAL, 0, comm2d, &
+            ierr )
+   
+        IF ( coupling_mode == 'vnested_crse' )  THEN
+                      ! Receive data from fine grid for anterpolation
+   
+            offset(1) = ( pdims_partner(1) / pdims(1) ) * pcoord(1)
+            offset(2) = ( pdims_partner(2) / pdims(2) ) * pcoord(2)
+   
+            do j = 0,   ( pdims_partner(2) / pdims(2) ) - 1
+                do i = 0,   ( pdims_partner(1) / pdims(1) ) - 1
+                    map_coord(1) = i+offset(1)
+                    map_coord(2) = j+offset(2)
+   
+                    target_idex = f_rnk_lst(map_coord(1),map_coord(2)) + numprocs
+  
+                    bdims (1,1) = f2c_dims_cg (0,map_coord(1),map_coord(2)) 
+                    bdims (1,2) = f2c_dims_cg (1,map_coord(1),map_coord(2)) 
+                    bdims (2,1) = f2c_dims_cg (2,map_coord(1),map_coord(2)) 
+                    bdims (2,2) = f2c_dims_cg (3,map_coord(1),map_coord(2)) 
+                    bdims (3,1) = f2c_dims_cg (4,map_coord(1),map_coord(2))
+                    bdims (3,2) = f2c_dims_cg (5,map_coord(1),map_coord(2)) 
+
+
+                     n_cell_c = (bdims(1,2)-bdims(1,1)+1) * &
+                         (bdims(2,2)-bdims(2,1)+1) * &
+                         (bdims(3,2)-bdims(3,1)+0)
+
+
+                    CALL MPI_RECV( e( bdims(3,1)+1:bdims(3,2), &
+                        bdims(2,1)  :bdims(2,2), &
+                        bdims(1,1)  :bdims(1,2)),&
+                        n_cell_c, MPI_REAL, target_idex, 104, &
+                        comm_inter,status, ierr )
+                end do
+            end do
+   
+   
+            !
+            !-- Boundary conditions
+   
+            IF ( .NOT. constant_diffusion ) THEN
+                e(nzb,:,:)   = e(nzb+1,:,:)
+            END IF
+   
+            IF ( .NOT. constant_diffusion )  CALL exchange_horiz( e, nbgp )
+   
+        ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+                      ! Send data to coarse grid for anterpolation
+   
+            offset(1) = pcoord(1) / ( pdims(1)/pdims_partner(1) )
+            offset(2) = pcoord(2) / ( pdims(2)/pdims_partner(2) )
+            map_coord(1) = offset(1)
+            map_coord(2) = offset(2)
+            target_idex = c_rnk_lst(map_coord(1),map_coord(2))
+
+            bdims_rem (1,1) =  f2c_dims_fg (0)
+            bdims_rem (1,2) =  f2c_dims_fg (1)
+            bdims_rem (2,1) =  f2c_dims_fg (2)
+            bdims_rem (2,2) =  f2c_dims_fg (3)
+            bdims_rem (3,1) =  f2c_dims_fg (4)
+            bdims_rem (3,2) =  f2c_dims_fg (5)
+
+            ALLOCATE( work3d (                   &
+                bdims_rem(3,1)+1:bdims_rem(3,2), &
+                bdims_rem(2,1)  :bdims_rem(2,2), &
+                bdims_rem(1,1)  :bdims_rem(1,2)))
+   
+            anterpol3d => e
+   
+            CALL anterpolate_to_crse_e
+
+            CALL MPI_SEND( work3d, 1, TYPE_VNEST_ANTER, target_idex,  &
+                           104, comm_inter, ierr)
+
+            NULLIFY   (   anterpol3d                )
+            DEALLOCATE(   work3d                    )
+        ENDIF
+   
+   
+    CONTAINS 
+   
+   
+   
+   
+   
+       SUBROUTINE anterpolate_to_crse_e
+      
+      
+           USE arrays_3d
+           USE control_parameters
+           USE grid_variables
+           USE indices
+           USE pegrid
+           
+      
+           IMPLICIT NONE
+
+           INTEGER(iwp)                       :: i
+           INTEGER(iwp)                       :: j
+           INTEGER(iwp)                       :: k
+           INTEGER(iwp)                       :: iif
+           INTEGER(iwp)                       :: jjf
+           INTEGER(iwp)                       :: kkf
+           INTEGER(iwp)                       :: bottomx
+           INTEGER(iwp)                       :: bottomy
+           INTEGER(iwp)                       :: bottomz
+           INTEGER(iwp)                       :: topx
+           INTEGER(iwp)                       :: topy
+           INTEGER(iwp)                       :: topz
+           REAL(wp)                           :: aweight_a
+           REAL(wp)                           :: aweight_b
+           REAL(wp)                           :: aweight_c
+           REAL(wp)                           :: aweight_d
+           REAL(wp)                           :: aweight_e
+           REAL(wp)                           :: energ 
+          
+           DO k = bdims_rem(3,1)+1, bdims_rem(3,2)
+      
+               bottomz = (dzc/dzf) * (k-1) + 1
+               topz    = (dzc/dzf) * k
+             
+               DO j = bdims_rem(2,1), bdims_rem(2,2)
+      
+                   bottomy = (nyf+1) / (nyc+1) * j
+                   topy    = (nyf+1) / (nyc+1) * (j+1) - 1
+      
+                   DO i = bdims_rem(1,1), bdims_rem(1,2)
+      
+                       bottomx = (nxf+1) / (nxc+1) * i
+                       topx    = (nxf+1) / (nxc+1) * (i+1) - 1
+      
+                       aweight_a   = 0.0
+                       aweight_b   = 0.0
+                       aweight_c   = 0.0
+                       aweight_d   = 0.0
+                       aweight_e   = 0.0
+      
+                       DO kkf = bottomz, topz
+                           DO jjf = bottomy, topy
+                               DO iif = bottomx, topx
+      
+                                   aweight_a = aweight_a + anterpol3d(kkf,jjf,iif)  *                     &
+                                       (dzf/dzc) * (dyf/dyc) * (dxf/dxc)
+                              
+      
+                                   energ = ( 0.5 * ( u(kkf,jjf,iif)   + u(kkf,jjf,iif+1) ) )**2.0 +          &
+                                       ( 0.5 * ( v(kkf,jjf,iif)   + v(kkf,jjf+1,iif) ) )**2.0 +              &
+                                       ( 0.5 * ( w(kkf-1,jjf,iif) + w(kkf,jjf,iif) ) )**2.0
+      
+                                   aweight_b   =   aweight_b + energ         *                         &
+                                       (dzf/dzc) * (dyf/dyc) * (dxf/dxc)
+       
+                                   aweight_c   =   aweight_c + 0.5 * ( u(kkf,jjf,iif) + u(kkf,jjf,iif+1) ) * &
+                                       (dzf/dzc) * (dyf/dyc) * (dxf/dxc)
+      
+                                   aweight_d   =   aweight_d + 0.5 * ( v(kkf,jjf,iif) + v(kkf,jjf+1,iif) ) * &
+                                       (dzf/dzc) * (dyf/dyc) * (dxf/dxc)
+       
+                                   aweight_e   =   aweight_e + 0.5 * ( w(kkf-1,jjf,iif) + w(kkf,jjf,iif) ) * &
+                                       (dzf/dzc) * (dyf/dyc) * (dxf/dxc)
+      
+      
+                               END DO
+                           END DO
+                       END DO
+      
+                       work3d(k,j,i)  = aweight_a + 0.5 * ( aweight_b -  &
+                           aweight_c**2.0 -                              &
+                           aweight_d**2.0 -                              &
+                           aweight_e**2.0                 )
+      
+                   END DO
+      
+               END DO
+      
+           END DO
+      
+       
+      
+       END SUBROUTINE anterpolate_to_crse_e
+#endif       
+    END SUBROUTINE vnest_anterpolate_e
+
+    SUBROUTINE vnest_init_pegrid_rank
+#if defined( __parallel )
+! Domain decomposition and exchange of grid variables between coarse and fine
+! Given processor coordinates as index f_rnk_lst(pcoord(1), pcoord(2))
+!   returns the rank. A single coarse block will have to send data to multiple
+!   fine blocks. In the coarse grid the pcoords of the remote block is first found and then using
+!   f_rnk_lst the target_idex is identified.
+! blk_dim stores the index limits of a given block. blk_dim_remote is received
+! from the asscoiated nest partner.
+! cf_ratio(1:3) is the ratio between fine and coarse grid: nxc/nxf, nyc/nyf and
+! ceiling(dxc/dxf) 
+
+
+       USE control_parameters,                                                 &
+           ONLY:  coupling_mode
+
+       USE kinds
+         
+       USE pegrid
+ 
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)                           :: dest_rnk
+       INTEGER(iwp)                           ::  i                        !<
+
+       IF (myid == 0) THEN
+           IF ( coupling_mode == 'vnested_crse') THEN
+               CALL MPI_SEND( pdims, 2, MPI_INTEGER, numprocs, 33, comm_inter, &
+                   ierr )
+               CALL MPI_RECV( pdims_partner, 2, MPI_INTEGER, numprocs, 66,     &
+                   comm_inter, status, ierr )
+           ELSEIF ( coupling_mode == 'vnested_fine') THEN
+               CALL MPI_RECV( pdims_partner, 2, MPI_INTEGER, 0, 33,      &
+                   comm_inter, status, ierr )
+               CALL MPI_SEND( pdims, 2, MPI_INTEGER, 0, 66, comm_inter, &
+                   ierr )
+           ENDIF
+       ENDIF
+
+
+       IF ( coupling_mode == 'vnested_crse') THEN
+           CALL MPI_BCAST( pdims_partner, 2, MPI_INTEGER, 0, comm2d, ierr )
+           ALLOCATE( c_rnk_lst( 0:(pdims(1)-1)    ,0:(pdims(2)-1) )   )
+           ALLOCATE( f_rnk_lst( 0:(pdims_partner(1)-1)  ,0:(pdims_partner(2)-1) ) )
+           do i=0,numprocs-1
+               CALL MPI_CART_COORDS( comm2d, i, ndim, pcoord, ierr )
+               call MPI_Cart_rank(comm2d, pcoord, dest_rnk, ierr)
+               c_rnk_lst(pcoord(1),pcoord(2)) = dest_rnk
+           end do
+       ELSEIF ( coupling_mode == 'vnested_fine') THEN
+           CALL MPI_BCAST( pdims_partner, 2, MPI_INTEGER, 0, comm2d, ierr )
+           ALLOCATE( c_rnk_lst( 0:(pdims_partner(1)-1)  ,0:(pdims_partner(2)-1) ) )
+           ALLOCATE( f_rnk_lst( 0:(pdims(1)-1)    ,0:(pdims(2)-1) )   )
+
+           do i=0,numprocs-1
+               CALL MPI_CART_COORDS( comm2d, i, ndim, pcoord, ierr )
+               call MPI_Cart_rank(comm2d, pcoord, dest_rnk, ierr)
+               f_rnk_lst(pcoord(1),pcoord(2)) = dest_rnk
+           enddo
+       ENDIF
+
+
+       IF ( coupling_mode == 'vnested_crse') THEN
+           if (myid == 0) then
+               CALL MPI_SEND( c_rnk_lst, pdims(1)*pdims(2),     MPI_INTEGER, numprocs, 0, comm_inter, ierr )
+               CALL MPI_RECV( f_rnk_lst, pdims_partner(1)*pdims_partner(2), MPI_INTEGER, numprocs, 4, comm_inter,status, ierr )
+           end if
+           CALL MPI_BCAST( f_rnk_lst, pdims_partner(1)*pdims_partner(2), MPI_INTEGER, 0, comm2d, ierr )
+       ELSEIF ( coupling_mode == 'vnested_fine') THEN
+           if (myid == 0) then
+               CALL MPI_RECV( c_rnk_lst, pdims_partner(1)*pdims_partner(2),  MPI_INTEGER, 0, 0, comm_inter,status, ierr )
+               CALL MPI_SEND( f_rnk_lst, pdims(1)*pdims(2),      MPI_INTEGER, 0, 4, comm_inter, ierr )
+           end if
+           CALL MPI_BCAST( c_rnk_lst, pdims_partner(1)*pdims_partner(2), MPI_INTEGER, 0, comm2d, ierr )
+       ENDIF
+
+       !-- Reason for MPI error unknown; solved if three lines duplicated
+       CALL MPI_CART_COORDS( comm2d, myid, ndim, pcoord, ierr )
+       CALL MPI_CART_SHIFT( comm2d, 0, 1, pleft, pright, ierr )
+       CALL MPI_CART_SHIFT( comm2d, 1, 1, psouth, pnorth, ierr )
+
+
+#endif
+ 
+    END SUBROUTINE vnest_init_pegrid_rank
+
+
+    SUBROUTINE vnest_init_pegrid_domain
+#if defined( __parallel )
+
+       USE control_parameters,                                                 &
+           ONLY:  coupling_mode, coupling_topology, dz,                        &
+                  dz_stretch_level_start, message_string
+
+       USE grid_variables,                                                     &
+           ONLY:  dx, dy
+           
+       USE indices,                                                            &
+           ONLY: nbgp, nx, ny, nz, nxl, nxr, nys, nyn, nzb, nzt
+
+       USE kinds
+         
+       USE pegrid
+       
+       IMPLICIT NONE
+
+       INTEGER(iwp)                           :: i              !<
+       INTEGER(iwp)                           :: j              !<
+       INTEGER(iwp)                           :: tempx
+       INTEGER(iwp)                           :: tempy
+       INTEGER(iwp)                           :: TYPE_INT_YZ
+       INTEGER(iwp)                           :: SIZEOFREAL
+       INTEGER(iwp)                           :: MTV_X
+       INTEGER(iwp)                           :: MTV_Y
+       INTEGER(iwp)                           :: MTV_Z
+       INTEGER(iwp)                           :: MTV_RX
+       INTEGER(iwp)                           :: MTV_RY
+       INTEGER(iwp)                           :: MTV_RZ
+   
+       !
+       !--    Pass the number of grid points of the coarse model to
+       !--    the nested model and vice versa
+       IF ( coupling_mode ==  'vnested_crse' )  THEN
+
+           nxc = nx
+           nyc = ny
+           nzc = nz
+           dxc = dx
+           dyc = dy
+           dzc = dz(1)
+           cg_nprocs = numprocs
+
+           IF ( myid == 0 )  THEN
+
+               CALL MPI_SEND( nxc, 1, MPI_INTEGER  , numprocs, 1,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( nyc, 1, MPI_INTEGER  , numprocs, 2,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( nzc, 1, MPI_INTEGER  , numprocs, 3,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( dxc, 1, MPI_REAL     , numprocs, 4,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( dyc, 1, MPI_REAL     , numprocs, 5,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( dzc, 1, MPI_REAL     , numprocs, 6,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( pdims, 2, MPI_INTEGER, numprocs, 7,  comm_inter, &
+                   ierr )
+               CALL MPI_SEND( cg_nprocs, 1, MPI_INTEGER, numprocs, 8,  comm_inter,  &
+                   ierr )
+               CALL MPI_RECV( nxf, 1, MPI_INTEGER,   numprocs, 21, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( nyf, 1, MPI_INTEGER,   numprocs, 22, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( nzf, 1, MPI_INTEGER,   numprocs, 23, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( dxf, 1, MPI_REAL,      numprocs, 24, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( dyf, 1, MPI_REAL,      numprocs, 25, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( dzf, 1, MPI_REAL,      numprocs, 26, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( pdims_partner, 2, MPI_INTEGER,                   &
+                   numprocs, 27, comm_inter, status, ierr )
+               CALL MPI_RECV( fg_nprocs, 1, MPI_INTEGER,                       &
+                   numprocs, 28, comm_inter, status, ierr )
+           ENDIF
+
+           CALL MPI_BCAST( nxf, 1,   MPI_INTEGER, 0, comm2d, ierr )
+           CALL MPI_BCAST( nyf, 1,   MPI_INTEGER, 0, comm2d, ierr )
+           CALL MPI_BCAST( nzf, 1,   MPI_INTEGER, 0, comm2d, ierr )
+           CALL MPI_BCAST( dxf, 1,   MPI_REAL,    0, comm2d, ierr )
+           CALL MPI_BCAST( dyf, 1,   MPI_REAL,    0, comm2d, ierr )
+           CALL MPI_BCAST( dzf, 1,   MPI_REAL,    0, comm2d, ierr )
+           CALL MPI_BCAST( pdims_partner, 2, MPI_INTEGER, 0, comm2d, ierr )
+           CALL MPI_BCAST( fg_nprocs,  1, MPI_INTEGER, 0, comm2d, ierr )
+           
+!
+!--        Check if stretching is used within the nested domain. ABS(...) is 
+!--        necessary because of the default value of -9999999.9_wp (negative)
+           IF ( ABS( dz_stretch_level_start(1) ) <= (nzf+1)*dzf )  THEN       
+               message_string = 'Stretching in the parent domain is '//        &
+                                'only allowed above the nested domain'
+               CALL message( 'vnest_init_pegrid_domain', 'PA0497', 1, 2, 0, 6, 0 )
+           ENDIF
+
+       ELSEIF ( coupling_mode ==  'vnested_fine' )  THEN
+
+           nxf = nx
+           nyf = ny
+           nzf = nz
+           dxf = dx
+           dyf = dy
+           dzf = dz(1)
+           fg_nprocs = numprocs
+
+           IF ( myid == 0 ) THEN
+
+               CALL MPI_RECV( nxc, 1, MPI_INTEGER, 0, 1, comm_inter, status, &
+                   ierr )
+               CALL MPI_RECV( nyc, 1, MPI_INTEGER, 0, 2, comm_inter, status, &
+                   ierr )
+               CALL MPI_RECV( nzc, 1, MPI_INTEGER, 0, 3, comm_inter, status, &
+                   ierr )
+               CALL MPI_RECV( dxc, 1, MPI_REAL,    0, 4, comm_inter, status, &
+                   ierr )
+               CALL MPI_RECV( dyc, 1, MPI_REAL,    0, 5, comm_inter, status, &
+                   ierr )
+               CALL MPI_RECV( dzc, 1, MPI_REAL,    0, 6, comm_inter, status, &
+                   ierr )
+               CALL MPI_RECV( pdims_partner, 2, MPI_INTEGER, 0, 7, comm_inter, &
+                   status, ierr )
+               CALL MPI_RECV( cg_nprocs,  1, MPI_INTEGER, 0, 8, comm_inter, &
+                   status, ierr )
+               CALL MPI_SEND( nxf, 1, MPI_INTEGER, 0, 21,  comm_inter, ierr )
+               CALL MPI_SEND( nyf, 1, MPI_INTEGER, 0, 22,  comm_inter, ierr )
+               CALL MPI_SEND( nzf, 1, MPI_INTEGER, 0, 23, comm_inter, ierr )
+               CALL MPI_SEND( dxf, 1, MPI_REAL,    0, 24, comm_inter, ierr )
+               CALL MPI_SEND( dyf, 1, MPI_REAL,    0, 25, comm_inter, ierr )
+               CALL MPI_SEND( dzf, 1, MPI_REAL,    0, 26, comm_inter, ierr )
+               CALL MPI_SEND( pdims,2,MPI_INTEGER, 0, 27, comm_inter, ierr )
+               CALL MPI_SEND( fg_nprocs,1,MPI_INTEGER, 0, 28, comm_inter, ierr )
+           ENDIF
+
+           CALL MPI_BCAST( nxc, 1, MPI_INTEGER, 0, comm2d, ierr)
+           CALL MPI_BCAST( nyc, 1, MPI_INTEGER, 0, comm2d, ierr)
+           CALL MPI_BCAST( nzc, 1, MPI_INTEGER, 0, comm2d, ierr)
+           CALL MPI_BCAST( dxc, 1, MPI_REAL,    0, comm2d, ierr)
+           CALL MPI_BCAST( dyc, 1, MPI_REAL,    0, comm2d, ierr)
+           CALL MPI_BCAST( dzc, 1, MPI_REAL,    0, comm2d, ierr)
+           CALL MPI_BCAST( pdims_partner, 2, MPI_INTEGER, 0, comm2d, ierr)
+           CALL MPI_BCAST( cg_nprocs,  1, MPI_INTEGER, 0, comm2d, ierr)
+
+       ENDIF
+       
+       ngp_c = ( nxc+1 + 2 * nbgp ) * ( nyc+1 + 2 * nbgp )
+       ngp_f = ( nxf+1 + 2 * nbgp ) * ( nyf+1 + 2 * nbgp )
+
+       IF ( coupling_mode(1:8) == 'vnested_')  coupling_topology = 1
+
+
+!-- Nesting Ratio: For each coarse grid cell how many fine grid cells exist
+       cfratio(1) = INT ( (nxf+1) / (nxc+1) )
+       cfratio(2) = INT ( (nyf+1) / (nyc+1) )
+       cfratio(3) = CEILING (  dzc    /  dzf  )
+
+!-- target_id is used only for exhange of information like simulated_time
+!-- which are then MPI_BCAST to other processors in the group
+          IF ( myid == 0 )  THEN
+   
+              IF ( TRIM( coupling_mode ) == 'vnested_crse' )  THEN
+                  target_id = numprocs
+              ELSE IF ( TRIM( coupling_mode ) == 'vnested_fine' )  THEN
+                  target_id = 0
+              ENDIF
+   
+          ENDIF
+
+!-- Store partner grid dimenstions and create MPI derived types
+
+         IF ( coupling_mode == 'vnested_crse' )  THEN
+
+            offset(1) = ( pdims_partner(1) / pdims(1) ) * pcoord(1)
+            offset(2) = ( pdims_partner(2) / pdims(2) ) * pcoord(2)
+      
+            tempx =  ( pdims_partner(1) / pdims(1) ) - 1
+            tempy =  ( pdims_partner(2) / pdims(2) ) - 1
+            ALLOCATE( c2f_dims_cg (0:5,offset(1):tempx+offset(1),offset(2):tempy+offset(2) ) )
+            ALLOCATE( f2c_dims_cg (0:5,offset(1):tempx+offset(1),offset(2):tempy+offset(2) ) )
+
+            do j = 0,   ( pdims_partner(2) / pdims(2) ) - 1
+                do i = 0,   ( pdims_partner(1) / pdims(1) ) - 1
+                   map_coord(1) = i+offset(1)
+                   map_coord(2) = j+offset(2)
+      
+                   target_idex = f_rnk_lst(map_coord(1),map_coord(2)) + numprocs
+
+                   CALL MPI_RECV( bdims_rem,   6, MPI_INTEGER, target_idex, 10, &
+                       comm_inter,status, ierr )
+
+!-- Store the CG dimensions that correspond to the FG partner; needed for FG top BC
+!-- One CG can have multiple FG partners. The 3D array is mapped by partner proc co-ord
+                   c2f_dims_cg (0,map_coord(1),map_coord(2)) = bdims_rem (1,1) / cfratio(1)
+                   c2f_dims_cg (1,map_coord(1),map_coord(2)) = bdims_rem (1,2) / cfratio(1)
+                   c2f_dims_cg (2,map_coord(1),map_coord(2)) = bdims_rem (2,1) / cfratio(2)
+                   c2f_dims_cg (3,map_coord(1),map_coord(2)) = bdims_rem (2,2) / cfratio(2)
+                   c2f_dims_cg (4,map_coord(1),map_coord(2)) = bdims_rem (3,2) / cfratio(3)
+                   c2f_dims_cg (5,map_coord(1),map_coord(2)) =(bdims_rem (3,2) / cfratio(3)) + 2
+ 
+!-- Store the CG dimensions that  correspond to the FG partner; needed for anterpolation
+                   f2c_dims_cg (0,map_coord(1),map_coord(2)) = bdims_rem (1,1) / cfratio(1)
+                   f2c_dims_cg (1,map_coord(1),map_coord(2)) = bdims_rem (1,2) / cfratio(1)
+                   f2c_dims_cg (2,map_coord(1),map_coord(2)) = bdims_rem (2,1) / cfratio(2)
+                   f2c_dims_cg (3,map_coord(1),map_coord(2)) = bdims_rem (2,2) / cfratio(2)
+                   f2c_dims_cg (4,map_coord(1),map_coord(2)) = bdims_rem (3,1)
+                   f2c_dims_cg (5,map_coord(1),map_coord(2)) =(bdims_rem (3,2)-cfratio(3))/ cfratio(3)
+   
+                   CALL MPI_SEND( c2f_dims_cg (:,map_coord(1),map_coord(2)), 6, &
+                      MPI_INTEGER, target_idex, 100, comm_inter, ierr )
+      
+                   CALL MPI_SEND( f2c_dims_cg (:,map_coord(1),map_coord(2)), 6, &
+                      MPI_INTEGER, target_idex, 101, comm_inter, ierr )
+      
+                end do
+            end do
+     
+!-- A derived data type to pack 3 Z-levels of CG to set FG top BC
+            MTV_X = ( nxr - nxl + 1 ) + 2*nbgp
+            MTV_Y = ( nyn - nys + 1 ) + 2*nbgp
+            MTV_Z = nzt+1 - nzb +1
+            
+            MTV_RX = ( c2f_dims_cg (1,offset(1),offset(2)) - c2f_dims_cg (0,offset(1),offset(2)) ) +1+2
+            MTV_RY = ( c2f_dims_cg (3,offset(1),offset(2)) - c2f_dims_cg (2,offset(1),offset(2)) ) +1+2
+            MTV_RZ = ( c2f_dims_cg (5,offset(1),offset(2)) - c2f_dims_cg (4,offset(1),offset(2)) ) +1
+            
+            CALL MPI_TYPE_EXTENT(MPI_REAL, SIZEOFREAL, IERR)
+
+            CALL MPI_TYPE_VECTOR ( MTV_RY, MTV_RZ, MTV_Z, MPI_REAL, TYPE_INT_YZ, IERR)
+            CALL MPI_TYPE_HVECTOR( MTV_RX, 1, MTV_Z*MTV_Y*SIZEOFREAL, &
+                                              TYPE_INT_YZ, TYPE_VNEST_BC, IERR)
+            CALL MPI_TYPE_FREE(TYPE_INT_YZ, IERR)
+            CALL MPI_TYPE_COMMIT(TYPE_VNEST_BC, IERR)   
+
+
+         ELSEIF ( coupling_mode == 'vnested_fine' )  THEN
+
+           ALLOCATE( c2f_dims_fg (0:5) )
+           ALLOCATE( f2c_dims_fg (0:5) )
+    
+           offset(1) = pcoord(1) / ( pdims(1)/pdims_partner(1) )
+           offset(2) = pcoord(2) / ( pdims(2)/pdims_partner(2) )
+           map_coord(1) = offset(1)
+           map_coord(2) = offset(2)
+           target_idex = c_rnk_lst(map_coord(1),map_coord(2))
+    
+           bdims (1,1) = nxl
+           bdims (1,2) = nxr
+           bdims (2,1) = nys
+           bdims (2,2) = nyn
+           bdims (3,1) = nzb
+           bdims (3,2) = nzt
+
+           CALL MPI_SEND( bdims,    6, MPI_INTEGER, target_idex, 10, &
+               comm_inter, ierr )
+           
+!-- Store the CG dimensions that correspond to the FG partner; needed for FG top BC
+!-- One FG can have only one CG partner
+           CALL MPI_RECV( c2f_dims_fg,   6, MPI_INTEGER, target_idex, 100, &
+               comm_inter,status, ierr )
+           
+           CALL MPI_RECV( f2c_dims_fg,   6, MPI_INTEGER, target_idex, 101, &
+               comm_inter,status, ierr )
+ 
+!-- Store the CG dimensions that  correspond to the FG partner; needed for anterpolation
+
+           n_cell_c = (f2c_dims_fg(1)-f2c_dims_fg(0)+1) * &
+                      (f2c_dims_fg(3)-f2c_dims_fg(2)+1) * &
+                      (f2c_dims_fg(5)-f2c_dims_fg(4)+0)
+
+           CALL MPI_TYPE_CONTIGUOUS(n_cell_c, MPI_REAL, TYPE_VNEST_ANTER, IERR)
+           CALL MPI_TYPE_COMMIT(TYPE_VNEST_ANTER, ierr) 
+
+        ENDIF
+#endif   
+       END SUBROUTINE vnest_init_pegrid_domain
+
+
+       SUBROUTINE vnest_init_grid
+ 
+#if defined( __parallel )
+          USE arrays_3d,                                                       &
+              ONLY:  zu, zw
+              
+          USE control_parameters,                                              &
+              ONLY:  coupling_mode, message_string, number_stretch_level_start
+             
+          USE indices,                                                         &
+              ONLY:  nzt
+         
+          USE kinds
+          
+          USE pegrid
+
+          IMPLICIT NONE
+      
+!
+!--       Allocate and Exchange zuc and zuf, zwc and zwf
+          IF ( coupling_mode(1:8)  == 'vnested_' )  THEN
+          
+             ALLOCATE( zuc(0:nzc+1), zuf(0:nzf+1) )
+             ALLOCATE( zwc(0:nzc+1), zwf(0:nzf+1) )
+          
+             IF ( coupling_mode ==  'vnested_crse' )  THEN
+                
+                zuc = zu
+                zwc = zw
+                
+                IF ( myid == 0 )  THEN
+          
+                   CALL MPI_SEND( zuc, nzt+2, MPI_REAL, numprocs, 41, comm_inter,  &
+                                  ierr )
+                   CALL MPI_RECV( zuf, nzf+2, MPI_REAL, numprocs, 42, comm_inter,  &
+                                  status, ierr )
+          
+                   CALL MPI_SEND( zwc, nzt+2, MPI_REAL, numprocs, 43, comm_inter,  &
+                                  ierr )
+                   CALL MPI_RECV( zwf, nzf+2, MPI_REAL, numprocs, 44, comm_inter,  &
+                                  status, ierr )
+          
+                ENDIF
+          
+                CALL MPI_BCAST( zuf,nzf+2,MPI_REAL,    0, comm2d, ierr ) 
+                CALL MPI_BCAST( zwf,nzf+2,MPI_REAL,    0, comm2d, ierr ) 
+          
+             ELSEIF ( coupling_mode ==  'vnested_fine' )  THEN
+          
+!
+!--             Check if stretching is used within the nested domain
+                IF ( number_stretch_level_start > 0 )  THEN
+                   message_string = 'Stretching in the nested domain is not '//&
+                           'allowed'
+                   CALL message( 'vnest_init_grid', 'PA0498', 1, 2, 0, 6, 0 )
+                ENDIF
+                
+                zuf = zu
+                zwf = zw
+                
+                IF ( myid == 0 )  THEN
+          
+                   CALL MPI_RECV( zuc,nzc+2, MPI_REAL, 0, 41, comm_inter, status, &
+                                  ierr )
+                   CALL MPI_SEND( zuf,nzt+2, MPI_REAL, 0, 42, comm_inter, ierr )
+          
+                   CALL MPI_RECV( zwc,nzc+2, MPI_REAL, 0, 43, comm_inter, status, &
+                                  ierr )
+                   CALL MPI_SEND( zwf,nzt+2, MPI_REAL, 0, 44, comm_inter, ierr )
+                ENDIF
+          
+                CALL MPI_BCAST( zuc,nzc+2,MPI_REAL,  0, comm2d, ierr ) 
+                CALL MPI_BCAST( zwc,nzc+2,MPI_REAL,  0, comm2d, ierr ) 
+          
+             ENDIF
+          ENDIF
+
+#endif
+       END SUBROUTINE vnest_init_grid
+
+
+       SUBROUTINE vnest_check_parameters
+#if defined( __parallel )
+
+          USE pegrid,                                                                &
+              ONLY:  myid
+
+          IMPLICIT NONE
+
+          IF (myid==0) PRINT*, '*** vnest: check parameters not implemented yet ***'
+      
+#endif
+       END SUBROUTINE vnest_check_parameters
+
+
+       SUBROUTINE vnest_timestep_sync
+
+#if defined( __parallel )
+         USE control_parameters,                                                    &
+             ONLY:  coupling_mode, dt_3d, old_dt
+      
+         USE interfaces
+      
+         USE kinds
+
+         USE pegrid
+
+         IMPLICIT NONE
+
+         IF ( coupling_mode == 'vnested_crse')  THEN
+            dtc = dt_3d
+               if (myid == 0) then
+                   CALL MPI_SEND( dt_3d, 1, MPI_REAL, target_id,                     &
+                        31, comm_inter, ierr )
+                   CALL MPI_RECV( dtf, 1, MPI_REAL,                                  &
+                        target_id, 32, comm_inter, status, ierr )
+
+                endif
+                CALL MPI_BCAST( dtf, 1,   MPI_REAL,    0, comm2d, ierr ) 
+         ELSE
+                dtf = dt_3d
+                if (myid == 0) then
+                   CALL MPI_RECV( dtc, 1, MPI_REAL,                                  &
+                        target_id, 31, comm_inter, status, ierr )
+                   CALL MPI_SEND( dt_3d, 1, MPI_REAL, target_id,                     &
+                        32, comm_inter, ierr )
+
+                endif
+                CALL MPI_BCAST( dtc, 1,   MPI_REAL,    0, comm2d, ierr ) 
+         
+         ENDIF
+!-- Identical timestep for coarse and fine grids
+          dt_3d = MIN( dtc, dtf )
+          !> @fixme setting old_dt might be obsolete at this point
+          !>   Due to changes in timestep routine, setting of old_dt might be
+          !>   not necessary any more at this point. However, could not be
+          !>   tested so far.
+          !>   2018-05-18, gronemeier
+          old_dt = dt_3d
+#endif
+       END SUBROUTINE vnest_timestep_sync
+       
+       SUBROUTINE vnest_deallocate
+#if defined( __parallel )
+          USE control_parameters,                                                    &
+              ONLY:  coupling_mode
+             
+          IMPLICIT NONE
+          
+          IF ( ALLOCATED(c_rnk_lst) ) DEALLOCATE (c_rnk_lst)
+          IF ( ALLOCATED(f_rnk_lst) ) DEALLOCATE (f_rnk_lst)
+          
+          IF ( coupling_mode == 'vnested_crse')  THEN
+             IF ( ALLOCATED (c2f_dims_cg) ) DEALLOCATE (c2f_dims_cg)
+             IF ( ALLOCATED (f2c_dims_cg) ) DEALLOCATE (f2c_dims_cg)
+          ELSEIF( coupling_mode == 'vnested_fine' )  THEN
+             IF ( ALLOCATED (c2f_dims_fg) ) DEALLOCATE (c2f_dims_fg)
+             IF ( ALLOCATED (f2c_dims_fg) ) DEALLOCATE (f2c_dims_fg)
+          ENDIF
+#endif 
+       END SUBROUTINE vnest_deallocate
+
+ END MODULE vertical_nesting_mod
Index: /palm/tags/release-6.0/SOURCE/virtual_flight_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/virtual_flight_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/virtual_flight_mod.f90	(revision 3477)
@@ -0,0 +1,1033 @@
+!> @file virtual_flights_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Renamed output variables
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! IF statement revised to consider new vertical grid stretching
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 2932 2018-03-26 09:39:22Z Giersch
+! renamed flight_par to virtual_flight_parameters
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! variable named found has been introduced for checking if restart data was 
+! found, reading of restart strings has been moved completely to 
+! read_restart_data_mod, virtual_flight_prerun flag has been removed, redundant
+! skipping function has been removed, flight_read/write_restart_data 
+! have been renamed to flight_r/wrd_global, flight_rrd_global is called in 
+! read_restart_data_mod now, marker *** end flight *** was removed, strings and
+! their respective lengths are written out and read now in case of restart runs
+! to get rid of prescribed character lengths, CASE DEFAULT was added if restart
+! data is read
+! 
+! 2872 2018-03-12 10:05:47Z Giersch
+! virutal_flight_prerun flag is used to define if module 
+! related parameters were outputted as restart data
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2576 2017-10-24 13:49:46Z Giersch
+! Definition of a new function called flight_skip_var_list to skip module 
+! parameters during reading restart data
+! 
+! 2563 2017-10-19 15:36:10Z Giersch
+! flight_read_restart_data is called in flight_parin in the case of a restart 
+! run. flight_skip_var_list is not necessary anymore due to marker changes in
+! restart files.
+! 
+! 2271 2017-06-09 12:34:55Z sward
+! Todo added
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1960 2016-07-12 16:34:24Z suehring
+! Separate humidity and passive scalar.
+! Bugfix concerning labeling of timeseries.
+! 
+! 1957 2016-07-07 10:43:48Z suehring
+! Initial revision
+!
+! Description:
+! ------------
+!> Module for virtual flight measurements.
+!> @todo Err msg PA0438: flight can be inside topography -> extra check?
+!--------------------------------------------------------------------------------!
+ MODULE flight_mod
+ 
+    USE control_parameters,                                                    &
+        ONLY:  fl_max, num_leg, num_var_fl, num_var_fl_user, virtual_flight
+ 
+    USE kinds
+
+    CHARACTER(LEN=6), DIMENSION(fl_max) ::  leg_mode = 'cyclic'  !< flight mode through the model domain, either 'cyclic' or 'return' 
+
+    INTEGER(iwp) ::  l           !< index for flight leg
+    INTEGER(iwp) ::  var_index   !< index for measured variable
+
+    LOGICAL, DIMENSION(:), ALLOCATABLE  ::  cyclic_leg !< flag to identify fly mode
+
+    REAL(wp) ::  flight_end = 9999999.9_wp  !< end time of virtual flight
+    REAL(wp) ::  flight_begin = 0.0_wp      !< end time of virtual flight
+
+    REAL(wp), DIMENSION(fl_max) ::  flight_angle = 45.0_wp   !< angle determining the horizontal flight direction
+    REAL(wp), DIMENSION(fl_max) ::  flight_level = 100.0_wp  !< flight level 
+    REAL(wp), DIMENSION(fl_max) ::  max_elev_change = 0.0_wp !< maximum elevation change for the respective flight leg 
+    REAL(wp), DIMENSION(fl_max) ::  rate_of_climb = 0.0_wp   !< rate of climb or descent
+    REAL(wp), DIMENSION(fl_max) ::  speed_agl = 25.0_wp      !< absolute horizontal flight speed above ground level (agl)
+    REAL(wp), DIMENSION(fl_max) ::  x_start = 999999999.0_wp !< start x position 
+    REAL(wp), DIMENSION(fl_max) ::  x_end   = 999999999.0_wp !< end x position
+    REAL(wp), DIMENSION(fl_max) ::  y_start = 999999999.0_wp !< start y position
+    REAL(wp), DIMENSION(fl_max) ::  y_end   = 999999999.0_wp !< end y position
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_agl      !< u-component of flight speed
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  v_agl      !< v-component of flight speed
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  w_agl      !< w-component of flight speed
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  x_pos      !< aircraft x-position 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  y_pos      !< aircraft y-position 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  z_pos      !< aircraft z-position 
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sensor_l !< measured data on local PE
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  sensor   !< measured data
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  var_u  !< dummy array for possibly user-defined quantities
+
+    SAVE
+
+    PRIVATE
+
+    INTERFACE flight_header
+       MODULE PROCEDURE flight_header
+    END INTERFACE flight_header
+    
+    INTERFACE flight_init
+       MODULE PROCEDURE flight_init
+    END INTERFACE flight_init
+
+    INTERFACE flight_init_output
+       MODULE PROCEDURE flight_init_output
+    END INTERFACE flight_init_output
+
+    INTERFACE flight_check_parameters
+       MODULE PROCEDURE flight_check_parameters
+    END INTERFACE flight_check_parameters
+
+    INTERFACE flight_parin
+       MODULE PROCEDURE flight_parin
+    END INTERFACE flight_parin
+
+    INTERFACE interpolate_xyz
+       MODULE PROCEDURE interpolate_xyz
+    END INTERFACE interpolate_xyz
+
+    INTERFACE flight_measurement
+       MODULE PROCEDURE flight_measurement
+    END INTERFACE flight_measurement
+    
+    INTERFACE flight_rrd_global 
+       MODULE PROCEDURE flight_rrd_global
+    END INTERFACE flight_rrd_global
+    
+    INTERFACE flight_wrd_global 
+       MODULE PROCEDURE flight_wrd_global 
+    END INTERFACE flight_wrd_global 
+
+!
+!-- Private interfaces
+    PRIVATE flight_check_parameters, flight_init_output, interpolate_xyz
+!
+!-- Public interfaces
+    PUBLIC flight_init, flight_header, flight_parin, flight_measurement,       &
+           flight_wrd_global, flight_rrd_global                   
+!
+!-- Public variables
+    PUBLIC fl_max, sensor, x_pos, y_pos, z_pos
+
+ CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Header output for flight module.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_header ( io )
+
+    
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(IN) ::  io            !< Unit of the output file
+
+       WRITE ( io, 1  )
+       WRITE ( io, 2  )
+       WRITE ( io, 3  ) num_leg
+       WRITE ( io, 4  ) flight_begin
+       WRITE ( io, 5  ) flight_end
+       
+       DO l=1, num_leg
+          WRITE ( io, 6   ) l
+          WRITE ( io, 7   ) speed_agl(l)
+          WRITE ( io, 8   ) flight_level(l)
+          WRITE ( io, 9   ) max_elev_change(l)
+          WRITE ( io, 10  ) rate_of_climb(l)
+          WRITE ( io, 11  ) leg_mode(l)
+       ENDDO
+
+       
+     1   FORMAT (' Virtual flights:'/                                           &
+               ' ----------------')
+     2   FORMAT ('       Output every timestep')
+     3   FORMAT ('       Number of flight legs:',    I3                )
+     4   FORMAT ('       Begin of measurements:',    F10.1    , ' s'   )
+     5   FORMAT ('       End of measurements:',      F10.1    , ' s'   )
+     6   FORMAT ('       Leg', I3/,                                             &
+                '       ------' )
+     7   FORMAT ('          Flight speed            : ', F5.1, ' m/s' )
+     8   FORMAT ('          Flight level            : ', F5.1, ' m'   )
+     9   FORMAT ('          Maximum elevation change: ', F5.1, ' m/s' )
+     10  FORMAT ('          Rate of climb / descent : ', F5.1, ' m/s' )
+     11  FORMAT ('          Leg mode                : ', A/           )
+ 
+    END SUBROUTINE flight_header 
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads the namelist flight_par.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_parin 
+
+       USE control_parameters,                                                 &
+           ONLY:  message_string
+      
+       IMPLICIT NONE
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file
+
+       NAMELIST /flight_par/  flight_angle, flight_end, flight_begin, leg_mode,&
+                              flight_level, max_elev_change, rate_of_climb,    &
+                              speed_agl, x_end, x_start, y_end, y_start
+  
+
+       NAMELIST /virtual_flight_parameters/                                    &
+                              flight_angle, flight_end, flight_begin, leg_mode,&
+                              flight_level, max_elev_change, rate_of_climb,    &
+                              speed_agl, x_end, x_start, y_end, y_start
+!
+!--    Try to find the namelist flight_par
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&virtual_flight_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read namelist
+       READ ( 11, virtual_flight_parameters, ERR = 10 )
+!
+!--    Set switch that virtual flights shall be carried out
+       virtual_flight = .TRUE.
+
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'virtual_flight_parameters', line )
+!
+!--    Try to find the old namelist
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&flight_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read namelist
+       READ ( 11, flight_par, ERR = 13, END = 14 )
+       
+       message_string = 'namelist flight_par is deprecated and will be ' // &
+                     'removed in near future.& Please use namelist ' //     &
+                     'virtual_flight_parameters instead' 
+       CALL message( 'flight_parin', 'PA0487', 0, 1, 0, 6, 0 )     
+!
+!--    Set switch that virtual flights shall be carried out
+       virtual_flight = .TRUE.
+
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'flight_par', line )
+
+ 14    CONTINUE
+
+    END SUBROUTINE flight_parin
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Inititalization of required arrays, number of legs and flags. Moreover,
+!> initialize flight speed and -direction, as well as start positions.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_init
+ 
+       USE basic_constants_and_equations_mod,                                  &
+           ONLY:  pi
+    
+       USE control_parameters,                                                 &
+           ONLY:  initializing_actions 
+                  
+       USE indices,                                                            &
+           ONLY:  nxlg, nxrg, nysg, nyng, nzb, nzt
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  distance  !< distance between start and end position of a flight leg
+!
+!--    Determine the number of flight legs
+       l = 1
+       DO WHILE ( x_start(l) /= 999999999.0_wp  .AND.  l <= SIZE(x_start) )
+          l       = l + 1
+       ENDDO
+       num_leg = l-1
+!
+!--    Check for proper parameter settings
+       CALL flight_check_parameters
+!
+!--    Allocate and initialize logical array for flight pattern
+       ALLOCATE( cyclic_leg(1:num_leg) )
+!
+!--    Initialize flags for cyclic/return legs
+       DO l = 1, num_leg
+          cyclic_leg(l) = MERGE( .TRUE., .FALSE.,                              &
+                                 TRIM( leg_mode(l) ) == 'cyclic'               &
+                               )
+       ENDDO
+!
+!--    Allocate and initialize arraxs for flight position and speed. In case of 
+!--    restart runs these data are read by the routine read_flight_restart_data
+!--    instead.
+       IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN 
+       
+          ALLOCATE( x_pos(1:num_leg), y_pos(1:num_leg ), z_pos(1:num_leg) )
+!
+!--       Inititalize x-, y-, and z-positions with initial start position          
+          x_pos(1:num_leg) = x_start(1:num_leg)
+          y_pos(1:num_leg) = y_start(1:num_leg)
+          z_pos(1:num_leg) = flight_level(1:num_leg)
+!
+!--       Allocate arrays for flight-speed components
+          ALLOCATE( u_agl(1:num_leg),                                          &
+                    v_agl(1:num_leg),                                          &
+                    w_agl(1:num_leg) )
+!
+!--       Inititalize u-, v- and w-component. 
+          DO  l = 1, num_leg
+!
+!--          In case of return-legs, the flight direction, i.e. the horizontal
+!--          flight-speed components, are derived from the given start/end 
+!--          positions.
+             IF (  .NOT.  cyclic_leg(l) )  THEN
+                distance = SQRT( ( x_end(l) - x_start(l) )**2                  &
+                               + ( y_end(l) - y_start(l) )**2 )
+                u_agl(l) = speed_agl(l) * ( x_end(l) - x_start(l) ) / distance
+                v_agl(l) = speed_agl(l) * ( y_end(l) - y_start(l) ) / distance
+                w_agl(l) = rate_of_climb(l)
+!
+!--          In case of cyclic-legs, flight direction is directly derived from 
+!--          the given flight angle.
+             ELSE
+                u_agl(l) = speed_agl(l) * COS( flight_angle(l) * pi / 180.0_wp )
+                v_agl(l) = speed_agl(l) * SIN( flight_angle(l) * pi / 180.0_wp )
+                w_agl(l) = rate_of_climb(l)
+             ENDIF
+
+          ENDDO
+             
+       ENDIF    
+!
+!--    Initialized data output
+       CALL flight_init_output       
+!
+!--    Allocate array required for user-defined quantities if necessary.
+       IF ( num_var_fl_user  > 0 )                                             &
+          ALLOCATE( var_u(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+!
+!--    Allocate and initialize arrays containing the measured data
+       ALLOCATE( sensor_l(1:num_var_fl,1:num_leg) )
+       ALLOCATE( sensor(1:num_var_fl,1:num_leg)   )
+       sensor_l = 0.0_wp
+       sensor   = 0.0_wp
+
+    END SUBROUTINE flight_init
+    
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of output-variable names and units.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_init_output
+    
+       USE control_parameters,                                                 &
+          ONLY:  cloud_droplets, humidity, neutral, passive_scalar
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY:  bulk_cloud_model
+
+       USE netcdf_interface
+    
+       IMPLICIT NONE
+
+       CHARACTER(LEN=10) ::  label_leg  !< dummy argument to convert integer to string
+       
+       INTEGER(iwp) ::  i               !< loop variable
+       INTEGER(iwp) ::  id_pt           !< identifyer for labeling
+       INTEGER(iwp) ::  id_q            !< identifyer for labeling
+       INTEGER(iwp) ::  id_ql           !< identifyer for labeling
+       INTEGER(iwp) ::  id_s            !< identifyer for labeling        
+       INTEGER(iwp) ::  id_u = 1        !< identifyer for labeling  
+       INTEGER(iwp) ::  id_v = 2        !< identifyer for labeling
+       INTEGER(iwp) ::  id_w = 3        !< identifyer for labeling
+       INTEGER(iwp) ::  k               !< index variable
+       
+       LOGICAL      ::  init = .TRUE.   !< flag to distiquish calls of user_init_flight
+!
+!--    Define output quanities, at least three variables are measured (u,v,w)
+       num_var_fl = 3
+       IF ( .NOT. neutral                     )  THEN
+          num_var_fl = num_var_fl + 1
+          id_pt      = num_var_fl
+       ENDIF
+       IF ( humidity                          )  THEN
+          num_var_fl = num_var_fl + 1
+          id_q       = num_var_fl
+       ENDIF
+       IF ( bulk_cloud_model .OR. cloud_droplets )  THEN
+          num_var_fl = num_var_fl + 1  
+          id_ql      = num_var_fl
+       ENDIF
+       IF ( passive_scalar                    )  THEN
+          num_var_fl = num_var_fl + 1
+          id_s       = num_var_fl
+       ENDIF
+!
+!--    Write output strings for dimensions x, y, z
+       DO l=1, num_leg
+
+          IF ( l < 10                    )  WRITE( label_leg, '(I1)')  l
+          IF ( l >= 10   .AND.  l < 100  )  WRITE( label_leg, '(I2)')  l
+          IF ( l >= 100  .AND.  l < 1000 )  WRITE( label_leg, '(I3)')  l
+
+          dofl_dim_label_x(l)  = 'x_' // TRIM( label_leg )
+          dofl_dim_label_y(l)  = 'y_' // TRIM( label_leg )
+          dofl_dim_label_z(l)  = 'z_' // TRIM( label_leg )
+
+       ENDDO
+       
+!
+!--    Call user routine to initialize further variables
+       CALL user_init_flight( init )
+!
+!--    Write output labels and units for the quanities
+       k = 1
+       DO l=1, num_leg
+       
+          IF ( l < 10                    )  WRITE( label_leg, '(I1)')  l
+          IF ( l >= 10   .AND.  l < 100  )  WRITE( label_leg, '(I2)')  l
+          IF ( l >= 100  .AND.  l < 1000 )  WRITE( label_leg, '(I3)')  l
+          
+          label_leg = 'leg_' // TRIM(label_leg) 
+          DO i=1, num_var_fl
+
+             IF ( i == id_u      )  THEN         
+                dofl_label(k) = TRIM( label_leg ) // '_u'
+                dofl_unit(k)  = 'm/s'
+                k             = k + 1
+             ELSEIF ( i == id_v  )  THEN       
+                dofl_label(k) = TRIM( label_leg ) // '_v'
+                dofl_unit(k)  = 'm/s'
+                k             = k + 1
+             ELSEIF ( i == id_w  )  THEN          
+                dofl_label(k) = TRIM( label_leg ) // '_w'
+                dofl_unit(k)  = 'm/s'
+                k             = k + 1
+             ELSEIF ( i == id_pt )  THEN       
+                dofl_label(k) = TRIM( label_leg ) // '_theta'
+                dofl_unit(k)  = 'K'
+                k             = k + 1
+             ELSEIF ( i == id_q  )  THEN       
+                dofl_label(k) = TRIM( label_leg ) // '_q'
+                dofl_unit(k)  = 'kg/kg'
+                k             = k + 1
+             ELSEIF ( i == id_ql )  THEN       
+                dofl_label(k) = TRIM( label_leg ) // '_ql'
+                dofl_unit(k)  = 'kg/kg'
+                k             = k + 1
+             ELSEIF ( i == id_s  )  THEN                          
+                dofl_label(k) = TRIM( label_leg ) // '_s'
+                dofl_unit(k)  = 'kg/kg'
+                k             = k + 1
+             ENDIF
+          ENDDO
+          
+          DO i=1, num_var_fl_user
+             CALL user_init_flight( init, k, i, label_leg )
+          ENDDO
+          
+       ENDDO 
+!
+!--    Finally, set the total number of flight-output quantities.
+       num_var_fl = num_var_fl + num_var_fl_user
+       
+    END SUBROUTINE flight_init_output
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine calculates the current flight positions and calls the 
+!> respective interpolation routine to measures the data at the current 
+!> flight position.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_measurement
+
+       USE arrays_3d,                                                          &
+           ONLY:  ddzu, ddzw, pt, q, ql, s, u, v, w, zu, zw
+
+       USE control_parameters,                                                 &
+           ONLY:  cloud_droplets, dt_3d, humidity, neutral,                    &
+                  passive_scalar, simulated_time
+                  
+       USE cpulog,                                                             &
+           ONLY:  cpu_log, log_point
+
+       USE grid_variables,                                                     &
+           ONLY:  ddx, ddy, dx, dy
+
+       USE indices,                                                            &
+           ONLY:  nx, nxl, nxr, ny, nys, nyn
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY:  bulk_cloud_model
+
+       USE pegrid
+
+       IMPLICIT NONE
+
+       LOGICAL  ::  on_pe  !< flag to check if current flight position is on current PE
+
+       REAL(wp) ::  x  !< distance between left edge of current grid box and flight position
+       REAL(wp) ::  y  !< distance between south edge of current grid box and flight position
+
+       INTEGER(iwp) ::  i   !< index of current grid box along x
+       INTEGER(iwp) ::  j   !< index of current grid box along y
+       INTEGER(iwp) ::  n   !< loop variable for number of user-defined output quantities
+       
+       CALL cpu_log( log_point(65), 'flight_measurement', 'start' )
+!
+!--    Perform flight measurement if start time is reached.
+       IF ( simulated_time >= flight_begin  .AND.                              &
+            simulated_time <= flight_end )  THEN
+
+          sensor_l = 0.0_wp
+          sensor   = 0.0_wp
+!
+!--       Loop over all flight legs
+          DO l=1, num_leg
+!
+!--          Update location for each leg
+             x_pos(l) = x_pos(l) + u_agl(l) * dt_3d 
+             y_pos(l) = y_pos(l) + v_agl(l) * dt_3d 
+             z_pos(l) = z_pos(l) + w_agl(l) * dt_3d
+!
+!--          Check if location must be modified for return legs.  
+!--          Carry out horizontal reflection if required.
+             IF ( .NOT. cyclic_leg(l) )  THEN
+!
+!--             Outward flight, i.e. from start to end
+                IF ( u_agl(l) >= 0.0_wp  .AND.  x_pos(l) > x_end(l)      )  THEN
+                   x_pos(l) = 2.0_wp * x_end(l)   - x_pos(l)
+                   u_agl(l) = - u_agl(l)
+!
+!--             Return flight, i.e. from end to start
+                ELSEIF ( u_agl(l) < 0.0_wp  .AND.  x_pos(l) < x_start(l) )  THEN 
+                   x_pos(l) = 2.0_wp * x_start(l) - x_pos(l)
+                   u_agl(l) = - u_agl(l)
+                ENDIF
+!
+!--             Outward flight, i.e. from start to end
+                IF ( v_agl(l) >= 0.0_wp  .AND.  y_pos(l) > y_end(l)      )  THEN
+                   y_pos(l) = 2.0_wp * y_end(l)   - y_pos(l)
+                   v_agl(l) = - v_agl(l)
+!
+!--             Return flight, i.e. from end to start                  
+                ELSEIF ( v_agl(l) < 0.0_wp  .AND.  y_pos(l) < y_start(l) )  THEN 
+                   y_pos(l) = 2.0_wp * y_start(l) - y_pos(l)
+                   v_agl(l) = - v_agl(l)
+                ENDIF
+!
+!--          Check if flight position is out of the model domain and apply
+!--          cyclic conditions if required
+             ELSEIF ( cyclic_leg(l) )  THEN
+!
+!--             Check if aircraft leaves the model domain at the right boundary
+                IF ( ( flight_angle(l) >= 0.0_wp     .AND.                     &
+                       flight_angle(l) <= 90.0_wp )  .OR.                      &  
+                     ( flight_angle(l) >= 270.0_wp   .AND.                     &
+                       flight_angle(l) <= 360.0_wp ) )  THEN
+                   IF ( x_pos(l) >= ( nx + 0.5_wp ) * dx )                     &
+                      x_pos(l) = x_pos(l) - ( nx + 1 ) * dx 
+!
+!--             Check if aircraft leaves the model domain at the left boundary
+                ELSEIF ( flight_angle(l) > 90.0_wp  .AND.                      &
+                         flight_angle(l) < 270.0_wp )  THEN
+                   IF ( x_pos(l) < -0.5_wp * dx )                             &
+                      x_pos(l) = ( nx + 1 ) * dx + x_pos(l)  
+                ENDIF 
+!
+!--             Check if aircraft leaves the model domain at the north boundary
+                IF ( flight_angle(l) >= 0.0_wp  .AND.                          &
+                     flight_angle(l) <= 180.0_wp )  THEN
+                   IF ( y_pos(l) >= ( ny + 0.5_wp ) * dy )                     &
+                      y_pos(l) = y_pos(l) - ( ny + 1 ) * dy 
+!
+!--             Check if aircraft leaves the model domain at the south boundary
+                ELSEIF ( flight_angle(l) > 180.0_wp  .AND.                     &
+                         flight_angle(l) < 360.0_wp )  THEN
+                   IF ( y_pos(l) < -0.5_wp * dy )                              &
+                      y_pos(l) = ( ny + 1 ) * dy + y_pos(l) 
+                ENDIF
+                
+             ENDIF
+!
+!--          Check if maximum elevation change is already reached. If required
+!--          reflect vertically.
+             IF ( rate_of_climb(l) /= 0.0_wp )  THEN
+!
+!--             First check if aircraft is too high
+                IF (  w_agl(l) > 0.0_wp  .AND.                                 &
+                      z_pos(l) - flight_level(l) > max_elev_change(l) )  THEN
+                   z_pos(l) = 2.0_wp * ( flight_level(l) + max_elev_change(l) )&
+                              - z_pos(l)
+                   w_agl(l) = - w_agl(l)
+!
+!--             Check if aircraft is too low
+                ELSEIF (  w_agl(l) < 0.0_wp  .AND.  z_pos(l) < flight_level(l) )  THEN
+                   z_pos(l) = 2.0_wp * flight_level(l) - z_pos(l)
+                   w_agl(l) = - w_agl(l)
+                ENDIF
+                
+             ENDIF 
+!
+!--          Determine grid indices for flight position along x- and y-direction.
+!--          Please note, there is a special treatment for the index 
+!--          along z-direction, which is due to vertical grid stretching. 
+             i = ( x_pos(l) + 0.5_wp * dx ) * ddx
+             j = ( y_pos(l) + 0.5_wp * dy ) * ddy
+!
+!--          Check if indices are on current PE
+             on_pe = ( i >= nxl  .AND.  i <= nxr  .AND.                        &
+                       j >= nys  .AND.  j <= nyn )
+
+             IF ( on_pe )  THEN
+
+                var_index = 1
+!
+!--             Recalculate indices, as u is shifted by -0.5*dx.
+                i =   x_pos(l) * ddx
+                j = ( y_pos(l) + 0.5_wp * dy ) * ddy
+!
+!--             Calculate distance from left and south grid-box edges.
+                x  = x_pos(l) - ( 0.5_wp - i ) * dx
+                y  = y_pos(l) - j * dy
+!
+!--             Interpolate u-component onto current flight position.
+                CALL interpolate_xyz( u, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                var_index = var_index + 1
+!
+!--             Recalculate indices, as v is shifted by -0.5*dy.
+                i = ( x_pos(l) + 0.5_wp * dx ) * ddx
+                j =   y_pos(l) * ddy
+
+                x  = x_pos(l) - i * dx
+                y  = y_pos(l) - ( 0.5_wp - j ) * dy
+                CALL interpolate_xyz( v, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                var_index = var_index + 1
+!
+!--             Interpolate w and scalar quantities. Recalculate indices.
+                i  = ( x_pos(l) + 0.5_wp * dx ) * ddx
+                j  = ( y_pos(l) + 0.5_wp * dy ) * ddy
+                x  = x_pos(l) - i * dx
+                y  = y_pos(l) - j * dy
+!
+!--             Interpolate w-velocity component.
+                CALL interpolate_xyz( w, zw, ddzw, 0.0_wp, x, y, var_index, j, i )
+                var_index = var_index + 1
+!
+!--             Potential temerature
+                IF ( .NOT. neutral )  THEN
+                   CALL interpolate_xyz( pt, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                   var_index = var_index + 1
+                ENDIF
+!
+!--             Humidity
+                IF ( humidity )  THEN
+                   CALL interpolate_xyz( q, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                   var_index = var_index + 1
+                ENDIF
+!
+!--             Liquid water content
+                IF ( bulk_cloud_model .OR. cloud_droplets )  THEN
+                   CALL interpolate_xyz( ql, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                   var_index = var_index + 1
+                ENDIF
+!
+!--             Passive scalar
+                IF ( passive_scalar )  THEN
+                   CALL interpolate_xyz( s, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                   var_index = var_index + 1
+                ENDIF
+!
+!--             Treat user-defined variables if required
+                DO n = 1, num_var_fl_user                
+                   CALL user_flight( var_u, n )
+                   CALL interpolate_xyz( var_u, zu, ddzu, 1.0_wp, x, y, var_index, j, i )
+                   var_index = var_index + 1
+                ENDDO
+             ENDIF
+
+          ENDDO
+!
+!--       Write local data on global array.
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE(sensor_l(1,1), sensor(1,1),                       &
+                             num_var_fl*num_leg, MPI_REAL, MPI_SUM,               &
+                             comm2d, ierr )
+#else
+          sensor     = sensor_l
+#endif
+       ENDIF
+       
+       CALL cpu_log( log_point(65), 'flight_measurement', 'stop' )
+
+    END SUBROUTINE flight_measurement
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This subroutine bi-linearly interpolates the respective data onto the current
+!> flight position.
+!------------------------------------------------------------------------------!
+    SUBROUTINE interpolate_xyz( var, z_uw, ddz_uw, fac, x, y, var_ind, j, i )
+
+       USE control_parameters,                                                 &
+           ONLY:  dz, dz_stretch_level_start   
+  
+      USE grid_variables,                                                      &
+          ONLY:  dx, dy
+    
+       USE indices,                                                            &
+           ONLY:  nzb, nzt, nxlg, nxrg, nysg, nyng
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i        !< index along x
+       INTEGER(iwp) ::  j        !< index along y
+       INTEGER(iwp) ::  k        !< index along z
+       INTEGER(iwp) ::  k1       !< dummy variable
+       INTEGER(iwp) ::  var_ind  !< index variable for output quantity
+
+       REAL(wp) ::  aa        !< dummy argument for horizontal interpolation   
+       REAL(wp) ::  bb        !< dummy argument for horizontal interpolation
+       REAL(wp) ::  cc        !< dummy argument for horizontal interpolation
+       REAL(wp) ::  dd        !< dummy argument for horizontal interpolation
+       REAL(wp) ::  gg        !< dummy argument for horizontal interpolation
+       REAL(wp) ::  fac       !< flag to indentify if quantity is on zu or zw level
+       REAL(wp) ::  var_int   !< horizontal interpolated variable at current position
+       REAL(wp) ::  var_int_l !< horizontal interpolated variable at k-level
+       REAL(wp) ::  var_int_u !< horizontal interpolated variable at (k+1)-level
+       REAL(wp) ::  x         !< distance between left edge of current grid box and flight position
+       REAL(wp) ::  y         !< distance between south edge of current grid box and flight position
+
+       REAL(wp), DIMENSION(1:nzt+1)   ::  ddz_uw !< inverse vertical grid spacing
+       REAL(wp), DIMENSION(nzb:nzt+1) ::  z_uw   !< height level
+
+       REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  var !< treted quantity
+!
+!--    Calculate interpolation coefficients
+       aa = x**2          + y**2
+       bb = ( dx - x )**2 + y**2
+       cc = x**2          + ( dy - y )**2
+       dd = ( dx - x )**2 + ( dy - y )**2
+       gg = aa + bb + cc + dd
+!
+!--    Obtain vertical index. Special treatment for grid index along z-direction
+!--    if flight position is above the vertical grid-stretching level.
+!--    fac=1 if variable is on scalar grid level, fac=0 for w-component.
+       IF ( z_pos(l) < dz_stretch_level_start(1) )  THEN
+          k = ( z_pos(l) + fac * 0.5_wp * dz(1) ) / dz(1)
+       ELSE
+!
+!--       Search for k-index
+          DO k1=nzb, nzt
+             IF ( z_pos(l) >= z_uw(k1) .AND. z_pos(l) < z_uw(k1+1) )  THEN
+                k = k1
+                EXIT
+             ENDIF                   
+          ENDDO
+       ENDIF
+!
+!--    (x,y)-interpolation at k-level
+       var_int_l = ( ( gg - aa ) * var(k,j,i)       +                          &
+                     ( gg - bb ) * var(k,j,i+1)     +                          &
+                     ( gg - cc ) * var(k,j+1,i)     +                          &
+                     ( gg - dd ) * var(k,j+1,i+1)                              &
+                   ) / ( 3.0_wp * gg )
+!
+!--    (x,y)-interpolation on (k+1)-level
+       var_int_u = ( ( gg - aa ) * var(k+1,j,i)     +                          &
+                     ( gg - bb ) * var(k+1,j,i+1)   +                          &
+                     ( gg - cc ) * var(k+1,j+1,i)   +                          &
+                     ( gg - dd ) * var(k+1,j+1,i+1)                            &
+                   ) / ( 3.0_wp * gg )
+!
+!--    z-interpolation onto current flight postion
+       var_int = var_int_l                                                     &
+                           + ( z_pos(l) - z_uw(k) ) * ddz_uw(k+1)              &
+                           * (var_int_u - var_int_l )
+!
+!--    Store on local data array
+       sensor_l(var_ind,l) = var_int
+
+    END SUBROUTINE interpolate_xyz
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Perform parameter checks.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_check_parameters
+
+       USE arrays_3d,                                                          &
+           ONLY:  zu
+    
+       USE control_parameters,                                                 &
+           ONLY:  bc_lr_cyc, bc_ns_cyc, message_string
+
+       USE grid_variables,                                                     &
+           ONLY:  dx, dy   
+          
+       USE indices,                                                            &
+           ONLY:  nx, ny, nz
+           
+       USE netcdf_interface,                                                   &
+           ONLY:  netcdf_data_format
+
+       IMPLICIT NONE
+       
+!
+!--    Check if start positions are properly set.
+       DO l=1, num_leg
+          IF ( x_start(l) < 0.0_wp  .OR.  x_start(l) > ( nx + 1 ) * dx )  THEN
+             message_string = 'Start x position is outside the model domain'
+             CALL message( 'flight_check_parameters', 'PA0431', 1, 2, 0, 6, 0 )
+          ENDIF 
+          IF ( y_start(l) < 0.0_wp  .OR.  y_start(l) > ( ny + 1 ) * dy )  THEN
+             message_string = 'Start y position is outside the model domain'
+             CALL message( 'flight_check_parameters', 'PA0432', 1, 2, 0, 6, 0 )
+          ENDIF 
+
+       ENDDO
+!
+!--    Check for leg mode
+       DO l=1, num_leg
+!
+!--       Check if leg mode matches the overall lateral model boundary 
+!--       conditions.
+          IF ( TRIM( leg_mode(l) ) == 'cyclic' )  THEN
+             IF ( .NOT. bc_lr_cyc  .OR.  .NOT. bc_ns_cyc )  THEN
+                message_string = 'Cyclic flight leg does not match ' //        &
+                                 'lateral boundary condition'
+                CALL message( 'flight_check_parameters', 'PA0433', 1, 2, 0, 6, 0 )
+             ENDIF 
+!
+!--       Check if end-positions are inside the model domain in case of 
+!..       return-legs.  
+          ELSEIF ( TRIM( leg_mode(l) ) == 'return' )  THEN
+             IF ( x_end(l) > ( nx + 1 ) * dx  .OR.                             &
+                  y_end(l) > ( ny + 1 ) * dx )  THEN
+                message_string = 'Flight leg or parts of it are outside ' //   &
+                                 'the model domain'
+                CALL message( 'flight_check_parameters', 'PA0434', 1, 2, 0, 6, 0 )
+             ENDIF 
+          ELSE
+             message_string = 'Unknown flight mode'
+             CALL message( 'flight_check_parameters', 'PA0435', 1, 2, 0, 6, 0 )
+          ENDIF
+
+       ENDDO          
+!
+!--    Check if start and end positions are properly set in case of return legs.
+       DO l=1, num_leg
+
+          IF ( x_start(l) > x_end(l) .AND. leg_mode(l) == 'return' )  THEN
+             message_string = 'x_start position must be <= x_end ' //          &
+                              'position for return legs'
+             CALL message( 'flight_check_parameters', 'PA0436', 1, 2, 0, 6, 0 )
+          ENDIF 
+          IF ( y_start(l) > y_end(l) .AND. leg_mode(l) == 'return' )  THEN
+             message_string = 'y_start position must be <= y_end ' //          &
+                              'position for return legs'
+             CALL message( 'flight_check_parameters', 'PA0437', 1, 2, 0, 6, 0 )
+          ENDIF 
+       ENDDO
+!
+!--    Check if given flight object remains inside model domain if a rate of 
+!--    climb / descent is prescribed. 
+       DO l=1, num_leg
+          IF ( flight_level(l) + max_elev_change(l) > zu(nz) .OR.              &
+               flight_level(l) + max_elev_change(l) <= 0.0_wp )  THEN
+             message_string = 'Flight level is outside the model domain '
+             CALL message( 'flight_check_parameters', 'PA0438', 1, 2, 0, 6, 0 )
+          ENDIF 
+       ENDDO       
+!
+!--    Check for appropriate NetCDF format. Definition of more than one 
+!--    unlimited dimension is unfortunately only possible with NetCDF4/HDF5. 
+       IF (  netcdf_data_format <= 2 )  THEN
+          message_string = 'netcdf_data_format must be > 2'
+          CALL message( 'flight_check_parameters', 'PA0439', 1, 2, 0, 6, 0 )
+       ENDIF
+
+
+    END SUBROUTINE flight_check_parameters
+        
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_rrd_global( found )  
+
+
+       USE control_parameters,                                                 &
+           ONLY: length, restart_string
+
+    
+       IMPLICIT NONE
+       
+       LOGICAL, INTENT(OUT)  ::  found 
+
+
+       found = .TRUE.
+
+
+       SELECT CASE ( restart_string(1:length) )
+          
+          CASE ( 'u_agl' )
+             IF ( .NOT. ALLOCATED( u_agl ) )  ALLOCATE( u_agl(1:num_leg) )
+             READ ( 13 )  u_agl   
+          CASE ( 'v_agl' )
+             IF ( .NOT. ALLOCATED( v_agl ) )  ALLOCATE( v_agl(1:num_leg) )
+             READ ( 13 )  v_agl
+          CASE ( 'w_agl' )
+             IF ( .NOT. ALLOCATED( w_agl ) )  ALLOCATE( w_agl(1:num_leg) )
+             READ ( 13 )  w_agl
+          CASE ( 'x_pos' )
+             IF ( .NOT. ALLOCATED( x_pos ) )  ALLOCATE( x_pos(1:num_leg) )
+             READ ( 13 )  x_pos
+          CASE ( 'y_pos' )
+             IF ( .NOT. ALLOCATED( y_pos ) )  ALLOCATE( y_pos(1:num_leg) )
+             READ ( 13 )  y_pos
+          CASE ( 'z_pos' )
+             IF ( .NOT. ALLOCATED( z_pos ) )  ALLOCATE( z_pos(1:num_leg) )
+             READ ( 13 )  z_pos
+
+          CASE DEFAULT
+
+             found = .FALSE.
+          
+       END SELECT
+
+
+    END SUBROUTINE flight_rrd_global  
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data.
+!------------------------------------------------------------------------------!
+    SUBROUTINE flight_wrd_global  
+
+
+       IMPLICIT NONE
+ 
+       CALL wrd_write_string( 'u_agl' )
+       WRITE ( 14 )  u_agl
+
+       CALL wrd_write_string( 'v_agl' )
+
+       WRITE ( 14 )  v_agl
+
+       CALL wrd_write_string( 'w_agl' )
+       WRITE ( 14 )  w_agl
+
+       CALL wrd_write_string( 'x_pos' )
+       WRITE ( 14 )  x_pos
+
+       CALL wrd_write_string( 'y_pos' )
+       WRITE ( 14 )  y_pos
+
+       CALL wrd_write_string( 'z_pos' )
+       WRITE ( 14 )  z_pos
+       
+    END SUBROUTINE flight_wrd_global    
+    
+
+ END MODULE flight_mod
Index: /palm/tags/release-6.0/SOURCE/virtual_measurement_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/virtual_measurement_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/virtual_measurement_mod.f90	(revision 3477)
@@ -0,0 +1,772 @@
+!> @virtual_measurement_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2017 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision
+! 
+! 3472 2018-10-30 20:43:50Z suehring
+!
+! Authors:
+! --------
+! @author Matthias Suehring
+! 
+!
+!
+! Description:
+! ------------
+!> The module acts as an interface between 'real-world' observations and 
+!> model simulations. Virtual measurements will be taken in the model at the
+!> coordinates representative for the 'real-world' measurement positions. 
+!> More precisely, coordinates and measured quanties will be read from a
+!> NetCDF file which contains all required information. In the model, 
+!> the same quantities (as long as all the required components are switched-on)
+!> will be sampled at the respective positions and output into an extra file,
+!> which allows for straight-forward comparison of model results with 
+!> observations. 
+!------------------------------------------------------------------------------!
+ MODULE virtual_measurement_mod
+
+
+    USE arrays_3d,                                                             &
+        ONLY:  q, pt, u, v, w, zu, zw
+
+    USE control_parameters,                                                    &
+        ONLY:  dz, message_string, virtual_measurement
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point
+        
+    USE grid_variables,                                                        &
+        ONLY:  dx, dy
+
+    USE indices,                                                               &
+        ONLY:  nzb, nzt, nxl, nxr, nys, nyn
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    TYPE virt_mea
+    
+       CHARACTER(LEN=100)  ::  feature_type  !< type of the measurement
+       CHARACTER(LEN=100)  ::  site          !< name of the measurement site
+   
+       CHARACTER(LEN=10), DIMENSION(:), ALLOCATABLE ::  measured_vars_name !< name of the measured variables
+    
+       INTEGER(iwp) ::  ns    !< total number of observation points for a site on subdomain, i.e. sum of all trajectories
+       INTEGER(iwp) ::  ntraj !< number of trajectories of a measurement
+       INTEGER(iwp) ::  nvar  !< number of measured variables
+       
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  dim_t !< number observations individual for each trajectory or station that are no _FillValues
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ngp   !< number of grid points where observations for a site took place, 
+                                                         !<individual for each trajectory or station that are no _FillValues
+       
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  i  !< grid index for measurement position in x-direction
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  j  !< grid index for measurement position in y-direction
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k  !< grid index for measurement position in k-direction
+           
+       LOGICAL ::  trajectory         = .FALSE. !< flag indicating that the observation is a mobile observation
+       LOGICAL ::  timseries          = .FALSE. !< flag indicating that the observation is a stationary point measurement
+       LOGICAL ::  timseries_profile  = .FALSE. !< flag indicating that the observation is a stationary profile measurement
+       
+       REAL(wp) ::  fill_eutm                         !< fill value for UTM coordinates in case of missing values
+       REAL(wp) ::  fill_nutm                         !< fill value for UTM coordinates in case of missing values
+       REAL(wp) ::  fill_zag                          !< fill value for heigth coordinates in case of missing values 
+       REAL(wp) ::  fillout = -999.9                  !< fill value for output in case a observation is taken from inside a building 
+       REAL(wp) ::  origin_x_obs                      !< origin of the observation in UTM coordiates in x-direction
+       REAL(wp) ::  origin_y_obs                      !< origin of the observation in UTM coordiates in y-direction
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  xmea   !< measurement x-position in absolute UTM coordinates  
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ymea   !< measurement y-position in absolute UTM coordinates  
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  zmea   !< measurement z-position in height above ground level 
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  measured_vars  !< measured variables 
+       
+    END TYPE virt_mea
+
+    CHARACTER(LEN=5)  ::  char_eutm = "E_UTM"                      !< dimension name for UTM coordinate easting
+    CHARACTER(LEN=11) ::  char_feature = "featureType"             !< attribute name for feature type
+    CHARACTER(LEN=10) ::  char_fillvalue = "_FillValue"            !< variable attribute name for _FillValue 
+    CHARACTER(LEN=18) ::  char_mv = "measured_variables"           !< variable name for the array with the measured variable names
+    CHARACTER(LEN=5)  ::  char_nutm = "N_UTM"                      !< dimension name for UTM coordinate northing
+    CHARACTER(LEN=18) ::  char_numstations = "number_of_stations"  !< attribute name for number of stations
+    CHARACTER(LEN=8)  ::  char_origx = "origin_x"                  !< attribute name for station coordinate in x
+    CHARACTER(LEN=8)  ::  char_origy = "origin_y"                  !< attribute name for station coordinate in y
+    CHARACTER(LEN=4)  ::  char_site = "site"                       !< attribute name for site name
+    CHARACTER(LEN=19) ::  char_zag = "height_above_ground"         !< attribute name for height above ground variable
+    CHARACTER(LEN=10) ::  type_ts   = 'timeSeries'                 !< name of stationary point measurements
+    CHARACTER(LEN=10) ::  type_traj = 'trajectory'                 !< name of line measurements
+    CHARACTER(LEN=17) ::  type_tspr = 'timeSeriesProfile'          !< name of stationary profile measurements
+    
+    CHARACTER(LEN=10), DIMENSION(1:53), PARAMETER ::  list_allowed_variables = & !< variables that can be sampled in PALM
+       (/ 'hfls      ',  & ! surface latent heat flux (W/m2)
+          'hfss      ',  & ! surface sensible heat flux (W/m2)
+          'hur       ',  & ! relative humidity (-)
+          'hus       ',  & ! specific humidity (g/kg)
+          'haa       ',  & ! absolute atmospheric humidity (kg/m3)
+          'mcpm1     ',  & ! mass concentration of PM1 (kg/m3)
+          'mcpm2p5   ',  & ! mass concentration of PM2.5 (kg/m3)
+          'mcpm10    ',  & ! mass concentration of PM10 (kg/m3)
+          'mcpm10    ',  & ! mass concentration of PM10 (kg/m3)
+          'mcco      ',  & ! mass concentration of CO (kg/m3)
+          'mcco2     ',  & ! mass concentration of CO2 (kg/m3)
+          'mcbcda    ',  & ! mass concentration of black carbon paritcles (kg/m3)
+          'ncaa      ',  & ! number concentation of particles (1/m3)
+          'mfco2     ',  & ! mole fraction of CO (mol/mol)
+          'mfco2     ',  & ! mole fraction of CO2 (mol/mol)
+          'mfch4     ',  & ! mole fraction of methane (mol/mol)
+          'mfnh3     ',  & ! mole fraction of amonia (mol/mol)
+          'mfno      ',  & ! mole fraction of nitrogen monoxide (mol/mol)
+          'mfno2     ',  & ! mole fraction of nitrogen dioxide (mol/mol)
+          'mfso2     ',  & ! mole fraction of sulfur dioxide (mol/mol)
+          'mfh20     ',  & ! mole fraction of water (mol/mol)
+          'plev      ',  & ! ? air pressure - hydrostaic + perturbation?
+          'rlds      ',  & ! surface downward longwave flux  (W/m2)
+          'rlus      ',  & ! surface upward longwave flux (W/m2)
+          'rsds      ',  & ! surface downward shortwave flux (W/m2)
+          'rsus      ',  & ! surface upward shortwave flux (W/m2)
+          'ta        ',  & ! air temperature (degree C)
+          't_va      ',  & ! virtual accoustic temperature (K)
+          'theta     ',  & ! potential temperature (K)
+          'tro3      ',  & ! mole fraction of ozone air (mol/mol)
+          'ts        ',  & ! scaling parameter of temperature (K)
+          'wspeed    ',  & ! ? wind speed - horizontal?
+          'wdir      ',  & ! wind direction
+          'us        ',  & ! friction velocity
+          'msoil     ',  & ! ? soil moisture - which depth?  
+          'tsoil     ',  & ! ? soil temperature - which depth?                                                                
+          'u         ',  & ! u-component
+          'ua        ',  & ! eastward wind (is there any difference to u?)
+          'uw        ',  & ! ? vertical momentum flux - total ?
+          'utheta    ',  & ! ? horizontal heat flux - total ? 
+          'uv        ',  & ! upward-northward horizontal momentum flux
+          'v         ',  & ! v-component
+          'va        ',  & ! northward wind (is there any difference to v?)
+          'vw        ',  & ! ? vertical momentum flux - total ?
+          'vtheta    ',  & ! ? horizontal heat flux - total ? 
+          'w         ',  & ! w-component
+          'wtheta    ',  & ! ? vertical heat flux - total ? 
+          'rld       ',  & ! downward longwave radiative flux (W/m2)
+          'rlu       ',  & ! upnward longwave radiative flux (W/m2)
+          'rsd       ',  & ! downward shortwave radiative flux (W/m2)
+          'rsu       ',  & ! upward shortwave radiative flux (W/m2)
+          'rsddif    ',  & ! downward shortwave diffuse radiative flux (W/m2)
+          'rnds      '   & ! surface net downward radiative flux (W/m2)
+       /)
+                                                             
+    INTEGER(iwp) ::  id_vm                           !< NetCDF file id for virtual measurements
+    INTEGER(iwp) ::  nvm = 0                         !< number of virtual measurements
+    INTEGER(iwp) ::  observation_coverage_xy = 0     !< horizontal distance from the measurement point where observations should be taken in the surrounding 
+    INTEGER(iwp) ::  observation_coverage_z  = 0     !< vertical distance from the measurement point where observations should be taken in the surrounding 
+    
+    LOGICAL ::  use_virtual_measurement = .FALSE. !< Namelist parameter
+    LOGICAL ::  global_attribute = .TRUE.         !< flag indicating a global attribute
+    
+    REAL(wp) ::  vm_time_start = 0.0              !< time after virtual measurements should start
+    
+
+    TYPE( virt_mea ), DIMENSION(:), ALLOCATABLE ::  vmea !< virtual measurement data structure
+    
+    
+    INTERFACE vm_check_parameters
+       MODULE PROCEDURE vm_check_parameters
+    END INTERFACE vm_check_parameters
+    
+    INTERFACE vm_init
+       MODULE PROCEDURE vm_init
+    END INTERFACE vm_init
+    
+    INTERFACE vm_parin
+       MODULE PROCEDURE vm_parin
+    END INTERFACE vm_parin
+    
+    INTERFACE vm_sampling
+       MODULE PROCEDURE vm_sampling
+    END INTERFACE vm_sampling
+
+    SAVE
+
+    PRIVATE
+
+!
+!-- Public interfaces
+    PUBLIC  vm_check_parameters, vm_init, vm_parin, vm_sampling
+
+!
+!-- Public variables
+    PUBLIC  vmea, vm_time_start
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check parameters for virtual measurement module
+!------------------------------------------------------------------------------!
+ SUBROUTINE vm_check_parameters
+
+    USE control_parameters,                                                    &
+        ONLY:  message_string, virtual_measurement
+ 
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  input_pids_static
+        
+    IMPLICIT NONE
+    
+!
+!-- In case virtual measurements are taken, a static input file is required.
+!-- This is because UTM coordinates for the PALM domain origin are required
+!-- for correct mapping of the measurements. 
+!-- ToDo: Revise this later and remove this requirement.
+    IF ( virtual_measurement  .AND.  .NOT. input_pids_static )  THEN
+       message_string = 'If virtual measurements are taken a static input ' // &
+                        'file is mandatory.'
+       CALL message( 'vm_check_parameters', 'PA0000', 1, 2, 0, 6, 0 )
+    ENDIF
+ 
+ END SUBROUTINE vm_check_parameters
+ 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read namelist for the virtual measurement module
+!------------------------------------------------------------------------------!
+ SUBROUTINE vm_parin
+ 
+    CHARACTER (LEN=80) ::  line   !< dummy string that contains the current line of the parameter file
+ 
+    NAMELIST /virtual_measurement_parameters/  use_virtual_measurement,        &
+                                               vm_time_start
+
+    line = ' '
+
+!
+!-- Try to find stg package
+    REWIND ( 11 )
+    line = ' '
+    DO WHILE ( INDEX( line, '&virtual_measurement_parameters' ) == 0 )
+       READ ( 11, '(A)', END=20 )  line
+    ENDDO
+    BACKSPACE ( 11 )
+
+!
+!-- Read namelist
+    READ ( 11, virtual_measurement_parameters, ERR = 10, END = 20 )
+
+!
+!-- Set flag that indicates that the virtual measurement module is switched on
+    IF ( use_virtual_measurement )  virtual_measurement = .TRUE.
+    
+    GOTO 20
+
+ 10 BACKSPACE( 11 )
+    READ( 11 , '(A)') line
+    CALL parin_fail_message( 'virtual_measurement_parameters', line )
+
+ 20 CONTINUE
+ 
+ END SUBROUTINE vm_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialize virtual measurements: read coordiante arrays and measured 
+!> variables, set indicies indicating the measurement points, read further
+!> attributes, etc..
+!------------------------------------------------------------------------------!
+ SUBROUTINE vm_init
+
+    USE arrays_3d,                                                             &
+        ONLY:  zu, zw
+ 
+    USE control_parameters,                                                    &
+        ONLY:  message_string
+        
+    USE grid_variables,                                                        &
+        ONLY:  ddx, ddy, dx, dy
+        
+    USE indices,                                                               &
+        ONLY:  nxl, nxr, nyn, nys
+ 
+    USE netcdf_data_input_mod,                                                 &
+        ONLY:  init_model, input_file_vm,                                      &
+               netcdf_data_input_get_dimension_length,                         &
+               netcdf_data_input_att, netcdf_data_input_var
+               
+    USE surface_mod,                                                           &
+        ONLY:  get_topography_top_index_ji
+        
+    IMPLICIT NONE
+    
+    CHARACTER(LEN=5)    ::  dum                !< dummy string indicate station id
+    CHARACTER(LEN=10), DIMENSION(50) ::  measured_variables_file = '' !< array with all measured variables read from NetCDF
+    CHARACTER(LEN=10), DIMENSION(50) ::  measured_variables      = '' !< dummy array with all measured variables that are allowed
+    
+    LOGICAL ::  on_pe !< flag indicating that the respective measurement coordinate is on subdomain
+    
+    INTEGER(iwp) ::  dim_eutm  !< dimension size of UTM easting coordinate
+    INTEGER(iwp) ::  dim_nutm  !< dimension size of UTM northing coordinate
+    INTEGER(iwp) ::  dim_ntime !< dimension size of time coordinate 
+    INTEGER(iwp) ::  dim_zag   !< dimension size of height coordinate
+    INTEGER(iwp) ::  i         !< grid index of virtual observation point in x-direction
+    INTEGER(iwp) ::  icov      !< index range where observations should be taken in x-direction
+    INTEGER(iwp) ::  ii        !< running index over all coordinate points of a measurement
+    INTEGER(iwp) ::  i_prev    !< grid index along x for UTM coordinate at previous observation time step 
+    INTEGER(iwp) ::  is        !< grid index of real observation point of the respective station in x-direction
+    INTEGER(iwp) ::  j         !< grid index of observation point in x-direction
+    INTEGER(iwp) ::  jcov      !< index range where observations should be taken in y-direction
+    INTEGER(iwp) ::  j_prev    !< grid index along y for UTM coordinate at previous observation time step 
+    INTEGER(iwp) ::  js        !< grid index of real observation point of the respective station in y-direction
+    INTEGER(iwp) ::  k         !< grid index of observation point in x-direction
+    INTEGER(iwp) ::  kcov      !< index range where observations should be taken in z-direction
+    INTEGER(iwp) ::  ks        !< grid index of real observation point of the respective station in z-direction
+    INTEGER(iwp) ::  k_prev    !< grid index along z for UTM coordinate at previous observation time step 
+    INTEGER(iwp) ::  ksurf     !< topography top index
+    INTEGER(iwp) ::  l         !< running index over all stations
+    INTEGER(iwp) ::  len_char  !< character length of single measured variables without Null character
+    INTEGER(iwp) ::  ll        !< running index over all measured variables in file
+    INTEGER(iwp) ::  lll       !< running index over all allowed variables
+    INTEGER(iwp) ::  n         !< running index over trajectory coordinates
+    INTEGER(iwp) ::  ns        !< counter variable for number of observation points on subdomain
+    INTEGER(iwp) ::  t         !< running index over number of trajectories
+    
+    REAL(wp)     ::  fill_eutm !< _FillValue for coordinate array E_UTM
+    REAL(wp)     ::  fill_nutm !< _FillValue for coordinate array N_UTM
+    REAL(wp)     ::  fill_zag  !< _FillValue for height coordinate
+    
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  e_utm !< easting UTM coordinate, temporary variable
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  n_utm !< northing UTM coordinate, temporary variable,
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  z_ag  !< height coordinate relative to origin_z, temporary variable
+!
+!-- Obtain number of virtual measurement stations
+    CALL netcdf_data_input_att( nvm, char_numstations, id_vm, input_file_vm,   &
+                                global_attribute, 'open', '' )
+!
+!-- ALLOCATE data structure
+    ALLOCATE( vmea(1:nvm) )
+    
+!    print*, "nvm", nvm
+!
+!-- Read station coordinates and further attributes. 
+!-- Note all coordinates are in UTM coordinates.
+    DO  l = 1, nvm
+!
+!--    Determine suffix which contains the ID
+       IF( l < 10 )  THEN
+          WRITE( dum, '(I1)')  l
+       ELSEIF( l < 100 )  THEN
+          WRITE( dum, '(I2)')  l
+       ELSEIF( l < 1000 )  THEN
+          WRITE( dum, '(I3)')  l
+       ELSEIF( l < 10000 )  THEN
+          WRITE( dum, '(I4)')  l
+       ELSEIF( l < 100000 )  THEN
+          WRITE( dum, '(I5)')  l
+       ENDIF
+       
+       CALL netcdf_data_input_att( vmea(l)%origin_x_obs, char_origx            &
+                                   // TRIM( dum ), id_vm, '', global_attribute,&
+                                   '', '' )
+       CALL netcdf_data_input_att( vmea(l)%origin_y_obs, char_origy            &
+                                   // TRIM( dum ), id_vm, '', global_attribute,&
+                                   '', '' )
+       CALL netcdf_data_input_att( vmea(l)%site,         char_site             &
+                                   // TRIM( dum ), id_vm, '', global_attribute,&
+                                   '', '' )
+       CALL netcdf_data_input_att( vmea(l)%feature_type, char_feature          &
+                                   // TRIM( dum ), id_vm, '', global_attribute,&
+                                   '', '' )
+       
+!
+!---   Set logicals depending on the type of the measurement
+       IF ( INDEX( vmea(l)%feature_type, type_tspr     ) /= 0 )  THEN
+          vmea(l)%timseries_profile = .TRUE.
+       ELSEIF ( INDEX( vmea(l)%feature_type, type_ts   ) /= 0 )  THEN
+          vmea(l)%timseries         = .TRUE.
+       ELSEIF ( INDEX( vmea(l)%feature_type, type_traj ) /= 0 )  THEN
+          vmea(l)%trajectory        = .TRUE.
+       ELSE
+!
+!--       Give error message
+          message_string = 'Attribue featureType = ' //                        &
+                           TRIM( vmea(l)%feature_type ) //                     &
+                           ' is not allowed.' 
+          CALL message( 'vm_init', 'PA0000', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read string with all measured variables at this station
+       measured_variables_file = ''
+       CALL netcdf_data_input_var( measured_variables_file,                    &
+                                   char_mv // TRIM( dum ), id_vm )
+!
+!--    Count the number of measured variables which match with the variables
+!--    which are allowed to be measured in PALM. Please note, for some 
+!--    NetCDF interal reasons characters end with a NULL, i.e. also empty 
+!--    characters contain a NULL. Therefore, check the strings for a Null to 
+!--    get the correct character length in order to compare them with the list
+!--    of allowed variables. 
+       vmea(l)%nvar = 0
+       DO ll = 1, SIZE( measured_variables_file )
+          IF ( measured_variables_file(ll)(1:1) /= CHAR(0)  .AND.              &
+               measured_variables_file(ll)(1:1) /= ' ')  THEN
+!
+!--          Obtain character length of the character
+             len_char = 1
+             DO WHILE ( measured_variables_file(ll)(len_char:len_char) /= CHAR(0)&
+                 .AND.  measured_variables_file(ll)(len_char:len_char) /= ' ' )
+                len_char = len_char + 1
+             ENDDO
+             len_char = len_char - 1
+!
+!--          Now, compare the measured variable with the list of allowed 
+!--          variables. 
+             DO  lll= 1, SIZE( list_allowed_variables )
+                IF ( measured_variables_file(ll)(1:len_char) ==                &
+                     TRIM( list_allowed_variables(lll) ) )  THEN
+                   vmea(l)%nvar = vmea(l)%nvar + 1
+                   measured_variables(vmea(l)%nvar) =                          &
+                                       measured_variables_file(ll)(1:len_char)
+                ENDIF
+             ENDDO
+          ENDIF
+       ENDDO
+!
+!--    Allocate array for the measured variables names for the station l.
+       ALLOCATE( vmea(l)%measured_vars_name(1:vmea(l)%nvar) )
+
+       DO  ll = 1, vmea(l)%nvar
+          vmea(l)%measured_vars_name(ll) = TRIM( measured_variables(ll) )
+       ENDDO
+       
+!        print*, "numvars", vmea(l)%nvar, vmea(l)%measured_vars_name(1:vmea(l)%nvar)
+!
+!--    For the actual measurement ID read the UTM coordinates. Based on these,
+!--    define the index space on each subdomain where measurements should be
+!--    taken. Note, the entire coordinate arrays will not be stored on data
+!--    type as this would exceed memory requirements, particularly for 
+!--    trajectory measurements. If no variable will be virtually measured, 
+!--    skip the reading. 
+       IF ( vmea(l)%nvar > 0 )  THEN
+!
+!--       For stationary measurements UTM coordinates are just one value and 
+!--       its dimension is "station", while for mobile measurements UTM 
+!--       coordinates are arrays. First, inquire dimension length for 
+!--       UTM coordinates.
+          IF ( vmea(l)%trajectory )  THEN
+!
+!--          For non-stationary measurements read the number of trajectories
+             CALL netcdf_data_input_get_dimension_length( id_vm,              &
+                                                          vmea(l)%ntraj,      &
+                                                          "traj" //           &
+                                                          TRIM( dum ) )
+             CALL netcdf_data_input_get_dimension_length( id_vm, dim_ntime,   &
+                                                          "ntime" //          &
+                                                          TRIM( dum ) )
+!
+!--       For stationary measurements the dimension for UTM coordinates is 1
+          ELSE
+             vmea(l)%ntraj  = 1
+             dim_ntime = 1
+          ENDIF
+          
+!
+!-        Allocate array which defines individual time frame for each 
+!--       trajectory or station
+          ALLOCATE( vmea(l)%dim_t(1:vmea(l)%ntraj) )
+          ALLOCATE( vmea(l)%ngp(1:vmea(l)%ntraj)   )
+!
+!--       Allocate temporary arrays for UTM and height coordinates. Note, 
+!--       on file UTM coordinates might be 1D or 2D variables
+          ALLOCATE( e_utm(1:vmea(l)%ntraj,1:dim_ntime) )
+          ALLOCATE( n_utm(1:vmea(l)%ntraj,1:dim_ntime) )
+          ALLOCATE( z_ag(1:vmea(l)%ntraj,1:dim_ntime)  )
+!
+!--       Read _FillValue attributes
+          CALL netcdf_data_input_att( fill_eutm, char_fillvalue,               &
+                                      id_vm, '', .NOT. global_attribute, '',   &
+                                      char_eutm // TRIM( dum ) )
+          CALL netcdf_data_input_att( fill_nutm, char_fillvalue,               &
+                                      id_vm, '', .NOT. global_attribute, '',   &
+                                      char_nutm // TRIM( dum ) )
+          CALL netcdf_data_input_att( fill_zag, char_fillvalue,                &
+                                      id_vm, '', .NOT. global_attribute, '',   &
+                                      char_zag  // TRIM( dum ) )
+!
+!--       Read UTM and height coordinates coordinates for all trajectories and 
+!--       times. 
+          IF ( vmea(l)%trajectory )  THEN
+             CALL netcdf_data_input_var( e_utm, char_eutm // TRIM( dum ), id_vm,  &
+                                         0, dim_ntime-1, 0, vmea(l)%ntraj-1 )
+             CALL netcdf_data_input_var( n_utm, char_nutm // TRIM( dum ), id_vm,  &
+                                         0, dim_ntime-1, 0, vmea(l)%ntraj-1 )
+             CALL netcdf_data_input_var( z_ag, char_zag // TRIM( dum ), id_vm,  &
+                                         0, dim_ntime-1, 0, vmea(l)%ntraj-1 )
+          ELSE
+             CALL netcdf_data_input_var( e_utm(1,:), char_eutm // TRIM( dum ), id_vm )
+             CALL netcdf_data_input_var( n_utm(1,:), char_nutm // TRIM( dum ), id_vm )
+             CALL netcdf_data_input_var( z_ag(1,:),  char_zag  // TRIM( dum ), id_vm )
+          ENDIF
+!
+!--       Based on UTM coordinates, check if the measurement station or parts
+!--       of the trajectory is on subdomain. This case, setup grid index space
+!--       sample these quantities. 
+          ns = 0
+          DO  t = 1, vmea(l)%ntraj
+!
+!--          Determine the individual time coordinate length for each station and
+!--          trajectory. This is required as several stations and trajectories
+!--          are merged into one file but they do not have the same number of
+!--          points in time, hence, missing values may occur and cannot be 
+!--          processed further.
+             vmea(l)%dim_t(t) = 0
+             DO  n = 1, dim_ntime
+                IF ( e_utm(t,n) /= fill_eutm  .AND.                            &
+                     n_utm(t,n) /= fill_nutm  .AND.                            &
+                     z_ag(t,n)  /= fill_zag )  vmea(l)%dim_t(t) = n
+             ENDDO
+!             
+!--          First, compute relative x- and y-coordinates with respect to the 
+!--          lower-left origin of the model domain, which is the difference 
+!--          betwen UTM coordinates.
+!              write(9,*) l, "before Eutm", e_utm(t,1:vmea(l)%dim_t(t)), "orig", init_model%origin_x
+!              write(9,*) l, "before Nutm", n_utm(t,1:vmea(l)%dim_t(t)), "orig", init_model%origin_y
+             
+             e_utm(t,1:vmea(l)%dim_t(t)) = e_utm(t,1:vmea(l)%dim_t(t))         &
+                                         - init_model%origin_x
+             n_utm(t,1:vmea(l)%dim_t(t)) = n_utm(t,1:vmea(l)%dim_t(t))         &
+                                         - init_model%origin_y
+!              write(9,*) l, "Eutm", e_utm(t,1:vmea(l)%dim_t(t)) 
+!              write(9,*) l, "Nutm", n_utm(t,1:vmea(l)%dim_t(t)) 
+!              write(9,*)
+!
+!--          Compute grid indices relative to origin and check if these are
+!--          on the subdomain. Note, virtual measurements will be taken also 
+!--          at grid points surrounding the station, hence, check also for 
+!--          these grid points.
+             vmea(l)%ngp(t) = 0
+             k_prev = -999
+             j_prev = -999
+             i_prev = -999
+             DO  n = 1, vmea(l)%dim_t(t)
+                is = INT( ( e_utm(t,n) + 0.5_wp * dx ) * ddx, KIND = iwp )
+                js = INT( ( n_utm(t,n) + 0.5_wp * dy ) * ddy, KIND = iwp )             
+!
+!--             Is the observation point on subdomain?
+                on_pe = ( is >= nxl  .AND.  is <= nxr  .AND.                   &
+                          js >= nys  .AND.  js <= nyn )
+!
+!--             If the measurement is on subdomain, determine vertical index
+!--             which refers to the observation height above ground level.
+                ks = k_prev
+                IF ( on_pe )  THEN
+!                    write(9,*) " I am onpe" 
+                   ksurf = get_topography_top_index_ji( js, is, 's' )
+                   ks = MINLOC( ABS( zu - zw(ksurf) - z_ag(t,n) ), DIM = 1 ) - 1
+                ENDIF
+!
+!--             Count the number of observation points in index space on 
+!--             subdomain. Only increment if grid indices are different from
+!--             the previous one. 
+                IF ( on_pe  .AND.  is /= i_prev  .AND.  js /= j_prev  .AND.    &
+                                   ks /= k_prev )  THEN
+                   ns             = ns             + 1
+                   vmea(l)%ngp(t) = vmea(l)%ngp(t) + 1
+                ENDIF
+
+!--             Store arrays for next iteration - avoid double counting 
+                i_prev = is
+                j_prev = js
+                k_prev = ks
+             ENDDO
+             
+          ENDDO
+
+!
+!--       Store number of observation points on subdomain and allocate index
+!--       arrays.
+          vmea(l)%ns = ns
+          
+          ALLOCATE( vmea(l)%i(1:vmea(l)%ns) )
+          ALLOCATE( vmea(l)%j(1:vmea(l)%ns) )
+          ALLOCATE( vmea(l)%k(1:vmea(l)%ns) )
+          
+!           print*, "Num ns: ", vmea(l)%ns, "per traj", vmea(l)%ngp(:)
+!
+!--       Repeat the prior loop and save the grid indices relevant for 
+!--       sampling.
+          ns = 0
+          DO  t = 1, vmea(l)%ntraj
+!
+!--          Compute grid indices relative to origin and check if these are
+!--          on the subdomain. Note, virtual measurements will be taken also 
+!--          at grid points surrounding the station, hence, check also for 
+!--          these grid points.
+             k_prev = -999
+             j_prev = -999
+             i_prev = -999
+             DO  n = 1, vmea(l)%dim_t(t)
+                is = INT( ( e_utm(t,n) + 0.5_wp * dx ) * ddx, KIND = iwp )
+                js = INT( ( n_utm(t,n) + 0.5_wp * dy ) * ddy, KIND = iwp )             
+!
+!--             Is the observation point on subdomain?
+                on_pe = ( is >= nxl  .AND.  is <= nxr  .AND.                   &
+                          js >= nys  .AND.  js <= nyn )
+!
+!--             If the measurement is on subdomain, determine vertical index
+!--             which refers to the observation height above ground level.
+                ks = k_prev
+                IF ( on_pe )  THEN
+                   ksurf = get_topography_top_index_ji( js, is, 's' )
+                   ks = MINLOC( ABS( zu - zw(ksurf) - z_ag(t,n) ), DIM = 1 ) - 1
+                ENDIF
+!
+!--             Count the number of observation points in index space on 
+!--             subdomain. Only increment if grid indices are different from
+!--             the previous one. 
+                IF ( on_pe  .AND.  is /= i_prev  .AND.  js /= j_prev  .AND.    &
+                                   ks /= k_prev )  THEN
+                   ns             = ns + 1
+                   vmea(l)%i(ns)  = is
+                   vmea(l)%j(ns)  = js
+                   vmea(l)%k(ns)  = ks
+!                    write(9,*) TRIM( vmea(l)%feature_type), l, "ns", ns, "ijk", vmea(l)%i(ns), vmea(l)%j(ns), vmea(l)%k(ns)
+                ENDIF
+!
+!--             Store arrays for next iteration - avoid double counting 
+                i_prev = is
+                j_prev = js
+                k_prev = ks
+             ENDDO
+             
+          ENDDO
+!
+!--       Allocate array to save the sampled values.
+!--       Todo: Is it better to allocate for all variables at a station
+!--       and store all the values before writing, or sample the variables
+!--       directly in the data output?
+          ALLOCATE( vmea(l)%measured_vars(1:vmea(l)%nvar,1:vmea(l)%ns) )
+!
+!--       Initialize with _FillValue
+          vmea(l)%measured_vars(1:vmea(l)%nvar,1:vmea(l)%ns) = vmea(l)%fillout
+!
+!--       Deallocate temporary coordinate arrays
+          IF ( ALLOCATED( e_utm ) )  DEALLOCATE( e_utm )
+          IF ( ALLOCATED( n_utm ) )  DEALLOCATE( n_utm )
+          IF ( ALLOCATED( z_ag  ) )  DEALLOCATE( z_ag  )
+       ENDIF
+    ENDDO
+    flush(9)
+    
+!
+!-- Close input file for virtual measurements. Therefore, just call 
+!-- the read attribute routine with the "close" option. 
+    CALL netcdf_data_input_att( nvm, char_numstations, id_vm, '',              &
+                                global_attribute, 'close', '' )
+  END SUBROUTINE vm_init
+  
+  
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sampling of the actual quantities along the observation coordinates
+!------------------------------------------------------------------------------!
+  SUBROUTINE vm_sampling
+
+    USE arrays_3d !,                                                             &
+!         ONLY:  pt
+
+    USE surface_mod
+    
+     IMPLICIT NONE
+     
+     CHARACTER(LEN=10) ::  trimvar !< dummy for the measured variable name
+      
+     INTEGER(iwp) ::  l !< 
+     INTEGER(iwp) ::  m !<
+     INTEGER(iwp) ::  var !< 
+     
+     INTEGER(iwp) ::  mm, j, i
+
+!      write(9,*) "sampling"
+!      flush(9)
+!
+!--  Loop over all stations. For each possible variable loop over all 
+!--  observation points
+     DO  l = 1, nvm
+!
+!--     Loop over all measured variables. Please note, for the moment
+!--     the same indices for scalar and velocity components are used.
+!--     ToDo: Revise this later.
+!         DO  m = 1, vmea(l)%ns
+!            j = vmea(l)%j(m)
+!            i = vmea(l)%i(m)
+!            
+!            IF ( i >= nxl  .AND.  i <= nxr  .AND.                               &
+!                 j >= nys  .AND.  j <= nyn )  THEN
+!               IF ( surf_def_h(0)%start_index(j,i) <= &
+!                    surf_def_h(0)%end_index(j,i) )  THEN
+!                 
+!                  write(9,*) "sampled"
+!                  flush(9)
+!                  mm = surf_def_h(0)%end_index(j,i)
+!               
+!                  surf_def_h(0)%pt_surface(mm) = -99.0
+!               ENDIF
+!            ENDIF
+!         ENDDO
+!         DO  var = 1, vmea(l)%nvar
+!            trimvar = TRIM( vmea(l)%measured_vars_name(var) )
+!            
+!            IF ( TRIM( trimvar ) == 'theta' )  THEN           
+!               DO  m = 1, vmea(l)%ns
+!                  vmea(l)%measured_vars(var,m) = pt(vmea(l)%k(m),vmea(l)%j(m),vmea(l)%i(m))
+!               ENDDO
+!            ENDIF           
+!            IF ( TRIM( trimvar ) == 'w' )  THEN           
+!               DO  m = 1, vmea(l)%ns
+!                  vmea(l)%measured_vars(var,m) = w(vmea(l)%k(m),vmea(l)%j(m),vmea(l)%i(m))
+!               ENDDO
+!            ENDIF
+!            IF ( TRIM( trimvar ) == 'v' )  THEN           
+!               DO  m = 1, vmea(l)%ns
+!                  vmea(l)%measured_vars(var,m) = v(vmea(l)%k(m),vmea(l)%j(m),vmea(l)%i(m))
+!               ENDDO
+!            ENDIF
+!            IF ( TRIM( trimvar ) == 'u' )  THEN           
+!               DO  m = 1, vmea(l)%ns
+!                  vmea(l)%measured_vars(var,m) = u(vmea(l)%k(m),vmea(l)%j(m),vmea(l)%i(m))
+!               ENDDO
+!            ENDIF
+!         ENDDO
+
+     ENDDO
+     
+  END SUBROUTINE vm_sampling
+ 
+
+ END MODULE virtual_measurement_mod
Index: /palm/tags/release-6.0/SOURCE/wind_turbine_model_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/wind_turbine_model_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/wind_turbine_model_mod.f90	(revision 3477)
@@ -0,0 +1,2904 @@
+!> @file wind_turbine_model_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 2009-2018 Carl von Ossietzky Universitaet Oldenburg
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Modularization of all bulk cloud physics code components
+! 
+! 3248 2018-09-14 09:42:06Z sward
+! Minor formating changes
+! 
+! 3246 2018-09-13 15:14:50Z sward
+! Added error handling for input namelist via parin_fail_message
+! 
+! 3241 2018-09-12 15:02:00Z raasch
+! unused variables removed
+! 
+! 3182 2018-07-27 13:36:03Z suehring
+! Check for vertical stretching has been revised. 
+! 
+! 3139 2018-07-17 11:30:10Z Giersch
+! Bugfix in calculation of alpha_attack
+! 
+! 3069 2018-06-15 07:56:09Z witha
+! Initialization of some arrays added
+! 
+! 3066 2018-06-12 08:55:55Z Giersch
+! Error message revised
+!
+! 3065 2018-06-12 07:03:02Z Giersch
+! dz was replaced by dz(1), error message concerning grid stretching has been
+! introduced
+! 
+! 3049 2018-05-29 13:52:36Z Giersch
+! Error messages revised
+! 
+! 2932 2018-03-26 09:39:22Z Giersch
+! renamed wind_turbine_par to wind_turbine_parameters
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! variable named found has been introduced for checking if restart data was 
+! found, reading of restart strings has been moved completely to 
+! read_restart_data_mod, wind_turbine_prerun flag has been removed, redundant 
+! skipping function has been removed, wtm_read/write_restart_data have been
+! renamed to wtm_r/wrd_global, wtm_rrd_global is called in 
+! read_restart_data_mod now, marker *** end wtm *** was removed, strings and 
+! their respective lengths are written out and read now in case of restart 
+! runs to get rid of prescribed character lengths, CASE DEFAULT was added if 
+! restart data is read 
+! 
+! 2885 2018-03-14 11:02:46Z Giersch
+! Bugfix in interpolation of lift and drag coefficients on fine grid of radius 
+! segments and angles of attack, speed-up of the initialization of the wind 
+! turbine model 
+! 
+! 2792 2018-02-07 06:45:29Z Giersch
+! omega_rot_l has to be calculated after determining the indices for the hub in
+! case of restart runs
+! 
+! 2776 2018-01-31 10:44:42Z Giersch
+! wind_turbine_prerun flag is used to define if module 
+! related parameters were outputted as restart data
+! 
+! 2718 2018-01-02 08:49:38Z maronga
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2669 2017-12-06 16:03:27Z raasch
+! filename of turbine output changed to WTM_OUTPUT_DATA. File extension now
+! includes the nest domain number. Turbine extension changed to "_T##"
+!
+! 2576 2017-10-24 13:49:46Z Giersch
+! Definition of a new function called wtm_skip_global to skip module 
+! parameters during reading restart data
+! 
+! 2563 2017-10-19 15:36:10Z Giersch
+! Restart runs with wind turbine model are possible now. For this purpose, two 
+! new subroutines wtm_write_restart_data and wtm_read_restart_data had to be 
+! defined
+! 
+! 2553 2017-10-18 08:03:45Z Giersch
+! Bugfix of vertical loop in wtm_tendencies to account for different turbine 
+! heights, bugfix of the interpolation of the u-component concerning the 
+! vertical index and further small adjustments of the programming style 
+! 
+! 2410 2017-09-06 08:16:30Z Giersch
+! Revise error message PA0462
+! 
+! 2349 2017-08-10 15:44:04Z Giersch
+! Add parameter pitch_rate to namelist and revise/add error messages 
+! 
+! 2343 2017-08-08 11:28:43Z Giersch
+! Unit correction in Doxygen comments
+! 
+! 2323 2017-07-26 12:57:38Z Giersch
+! Change unit number of file WTM_DATA from 201 to 90
+!  
+! 2322 2017-07-26 08:30:28Z Giersch
+! Bugfix of error message and assign error numbers
+! 
+! 2257 2017-06-07 14:07:05Z witha
+! Bugfix: turb_cl_tab and turb_cd_tab were set to zero before being allocated
+! 
+! 2233 2017-05-30 18:08:54Z suehring
+! 
+! 2232 2017-05-30 17:47:52Z suehring
+! Adjustments to new topography concept
+! 
+! 2152 2017-02-17 13:27:24Z lvollmer
+! Bugfix in subroutine wtm_read_blade_tables
+! Addition of a tip loss model
+! 
+! 2015 2016-09-28 08:45:18Z lvollmer
+! Bugfix of pitch control
+! 
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1929 2016-06-09 16:25:25Z suehring
+! Bugfix: added preprocessor directives for parallel and serial mode
+! 
+! 1914 2016-05-26 14:44:07Z witha
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> This module calculates the effect of wind turbines on the flow fields. The
+!> initial version contains only the advanced actuator disk with rotation method
+!> (ADM-R).
+!> The wind turbines include the tower effect, can be yawed and tilted.
+!> The wind turbine model includes controllers for rotational speed, pitch and
+!> yaw.
+!> Currently some specifications of the NREL 5 MW reference turbine
+!> are hardcoded whereas most input data comes from separate files (currently
+!> external, planned to be included as namelist which will be read in
+!> automatically).
+!>
+!> @todo Replace dz(1) appropriatly to account for grid stretching
+!> @todo Revise code according to PALM Coding Standard
+!> @todo Implement ADM and ALM turbine models
+!> @todo Generate header information
+!> @todo Implement further parameter checks and error messages
+!> @todo Revise and add code documentation
+!> @todo Output turbine parameters as timeseries
+!> @todo Include additional output variables
+!> @todo Revise smearing the forces for turbines in yaw
+!> @todo Revise nacelle and tower parameterization
+!> @todo Allow different turbine types in one simulation
+!
+!------------------------------------------------------------------------------!
+ MODULE wind_turbine_model_mod
+
+    USE arrays_3d,                                                             &
+        ONLY:  tend, u, v, w, zu, zw
+
+    USE basic_constants_and_equations_mod,                                     &
+        ONLY:  pi
+
+    USE control_parameters,                                                    &
+        ONLY:  coupling_char, dt_3d, dz, message_string, simulated_time,       &
+               wind_turbine, initializing_actions
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE grid_variables,                                                        &
+        ONLY:  ddx, dx, ddy, dy
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nz,   &
+               nzb, nzt, wall_flags_0
+
+    USE kinds
+
+    USE pegrid
+
+
+    IMPLICIT NONE
+
+    PRIVATE
+
+!
+!-- Variables specified in the namelist wind_turbine_par
+
+    INTEGER(iwp) ::  nairfoils = 8   !< number of airfoils of the used turbine model (for ADM-R and ALM)
+    INTEGER(iwp) ::  nturbines = 1   !< number of turbines
+
+    LOGICAL ::  pitch_control = .FALSE.   !< switch for use of pitch controller
+    LOGICAL ::  speed_control = .FALSE.   !< switch for use of speed controller
+    LOGICAL ::  yaw_control   = .FALSE.   !< switch for use of yaw controller
+    LOGICAL ::  tl_cor        = .FALSE.    !< switch for use of tip loss correct.
+
+    REAL(wp) ::  segment_length  = 1.0_wp          !< length of the segments, the rotor area is divided into
+                                                   !< (in tangential direction, as factor of MIN(dx,dy,dz))
+    REAL(wp) ::  segment_width   = 0.5_wp          !< width of the segments, the rotor area is divided into
+                                                   !< (in radial direction, as factor of MIN(dx,dy,dz))
+    REAL(wp) ::  time_turbine_on = 0.0_wp          !< time at which turbines are started
+    REAL(wp) ::  tilt            = 0.0_wp          !< vertical tilt of the rotor [degree] ( positive = backwards )
+
+    REAL(wp), DIMENSION(1:100) ::  dtow             = 0.0_wp  !< tower diameter [m]
+    REAL(wp), DIMENSION(1:100) ::  omega_rot        = 0.9_wp  !< inital or constant rotor speed [rad/s]
+    REAL(wp), DIMENSION(1:100) ::  phi_yaw          = 0.0_wp  !< yaw angle [degree] ( clockwise, 0 = facing west )
+    REAL(wp), DIMENSION(1:100) ::  pitch_add        = 0.0_wp  !< constant pitch angle
+    REAL(wp), DIMENSION(1:100) ::  rcx        = 9999999.9_wp  !< position of hub in x-direction
+    REAL(wp), DIMENSION(1:100) ::  rcy        = 9999999.9_wp  !< position of hub in y-direction
+    REAL(wp), DIMENSION(1:100) ::  rcz        = 9999999.9_wp  !< position of hub in z-direction
+    REAL(wp), DIMENSION(1:100) ::  rnac             = 0.0_wp  !< nacelle diameter [m]
+    REAL(wp), DIMENSION(1:100) ::  rr              = 63.0_wp  !< rotor radius [m]
+    REAL(wp), DIMENSION(1:100) ::  turb_cd_nacelle = 0.85_wp  !< drag coefficient for nacelle
+    REAL(wp), DIMENSION(1:100) ::  turb_cd_tower    = 1.2_wp  !< drag coefficient for tower
+
+!
+!-- Variables specified in the namelist for speed controller
+!-- Default values are from the NREL 5MW research turbine (Jonkman, 2008)
+
+    REAL(wp) ::  rated_power    = 5296610.0_wp    !< rated turbine power [W]
+    REAL(wp) ::  gear_ratio     = 97.0_wp         !< Gear ratio from rotor to generator
+    REAL(wp) ::  inertia_rot    = 34784179.0_wp   !< Inertia of the rotor [kg*m2]
+    REAL(wp) ::  inertia_gen    = 534.116_wp      !< Inertia of the generator [kg*m2]
+    REAL(wp) ::  gen_eff        = 0.944_wp        !< Electric efficiency of the generator
+    REAL(wp) ::  gear_eff       = 1.0_wp          !< Loss between rotor and generator
+    REAL(wp) ::  air_dens       = 1.225_wp        !< Air density to convert to W [kg/m3]
+    REAL(wp) ::  rated_genspeed = 121.6805_wp     !< Rated generator speed [rad/s]
+    REAL(wp) ::  max_torque_gen = 47402.91_wp     !< Maximum of the generator torque [Nm]
+    REAL(wp) ::  slope2         = 2.332287_wp     !< Slope constant for region 2
+    REAL(wp) ::  min_reg2       = 91.21091_wp     !< Lower generator speed boundary of region 2 [rad/s]
+    REAL(wp) ::  min_reg15      = 70.16224_wp     !< Lower generator speed boundary of region 1.5 [rad/s]
+    REAL(wp) ::  max_trq_rate   = 15000.0_wp      !< Max generator torque increase [Nm/s]
+    REAL(wp) ::  pitch_rate     = 8.0_wp          !< Max pitch rate [degree/s]
+
+
+!
+!-- Variables specified in the namelist for yaw control
+
+    REAL(wp) ::  yaw_speed = 0.005236_wp   !< speed of the yaw actuator [rad/s]
+    REAL(wp) ::  max_miss = 0.08726_wp     !< maximum tolerated yaw missalignment [rad]
+    REAL(wp) ::  min_miss = 0.008726_wp    !< minimum yaw missalignment for which the actuator stops [rad]
+
+!
+!-- Set flag for output files TURBINE_PARAMETERS
+    TYPE file_status
+       LOGICAL ::  opened, opened_before
+    END TYPE file_status
+    
+    TYPE(file_status), DIMENSION(500) :: openfile_turb_mod =                   &
+                                         file_status(.FALSE.,.FALSE.)
+
+!
+!-- Variables for initialization of the turbine model
+
+    INTEGER(iwp) ::  inot         !< turbine loop index (turbine id)
+    INTEGER(iwp) ::  nsegs_max    !< maximum number of segments (all turbines, required for allocation of arrays)
+    INTEGER(iwp) ::  nrings_max   !< maximum number of rings (all turbines, required for allocation of arrays)
+    INTEGER(iwp) ::  ring         !< ring loop index (ring number)
+    INTEGER(iwp) ::  upper_end    !<
+
+    INTEGER(iwp), DIMENSION(1) ::  lct   !<
+
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  i_hub     !< index belonging to x-position of the turbine
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  i_smear   !< index defining the area for the smearing of the forces (x-direction)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  j_hub     !< index belonging to y-position of the turbine
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  j_smear   !< index defining the area for the smearing of the forces (y-direction)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k_hub     !< index belonging to hub height
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  k_smear   !< index defining the area for the smearing of the forces (z-direction)
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nrings    !< number of rings per turbine
+    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nsegs_total !< total number of segments per turbine 
+
+    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nsegs   !< number of segments per ring and turbine
+
+!
+!-  parameters for the smearing from the rotor to the cartesian grid   
+    REAL(wp) ::  pol_a            !< parameter for the polynomial smearing fct
+    REAL(wp) ::  pol_b            !< parameter for the polynomial smearing fct
+    REAL(wp) ::  delta_t_factor   !< 
+    REAL(wp) ::  eps_factor       !<  
+    REAL(wp) ::  eps_min          !< 
+    REAL(wp) ::  eps_min2         !< 
+    REAL(wp) ::  sqrt_arg         !< 
+
+!
+!-- Variables for the calculation of lift and drag coefficients
+    REAL(wp), DIMENSION(:), ALLOCATABLE  ::  ard     !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE  ::  crd     !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE  ::  delta_r !< radial segment length
+    REAL(wp), DIMENSION(:), ALLOCATABLE  ::  lrd     !<
+    
+    REAL(wp) ::  accu_cl_cd_tab = 0.1_wp  !< Accuracy of the interpolation of 
+                                          !< the lift and drag coeff [deg] 
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: turb_cd_tab   !< table of the blade drag coefficient
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE :: turb_cl_tab   !< table of the blade lift coefficient
+
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  nac_cd_surf  !< 3d field of the tower drag coefficient 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tow_cd_surf  !< 3d field of the nacelle drag coefficient
+
+!
+!-- Variables for the calculation of the forces
+     
+    REAL(wp) ::  cur_r                       !< 
+    REAL(wp) ::  phi_rotor                   !< 
+    REAL(wp) ::  pre_factor                  !<  
+    REAL(wp) ::  torque_seg                  !< 
+    REAL(wp) ::  u_int_l                     !< 
+    REAL(wp) ::  u_int_u                     !< 
+    REAL(wp) ::  u_rot                       !< 
+    REAL(wp) ::  v_int_l                     !< 
+    REAL(wp) ::  v_int_u                     !< 
+    REAL(wp) ::  w_int_l                     !< 
+    REAL(wp) ::  w_int_u                     !<
+!
+!-  Tendencies from the nacelle and tower thrust
+    REAL(wp) ::  tend_nac_x = 0.0_wp  !< 
+    REAL(wp) ::  tend_tow_x = 0.0_wp  !< 
+    REAL(wp) ::  tend_nac_y = 0.0_wp  !< 
+    REAL(wp) ::  tend_tow_y = 0.0_wp  !<
+
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  alpha_attack !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  chord        !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  phi_rel      !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  torque_total !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  thrust_rotor !<
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  turb_cl      !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  turb_cd      !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  vrel         !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE ::  vtheta       !< 
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rbx, rby, rbz     !< coordinates of the blade elements
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  rotx, roty, rotz  !< normal vectors to the rotor coordinates
+
+!
+!-  Fields for the interpolation of velocities on the rotor grid
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_int       !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_int_1_l   !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_int       !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_int_1_l   !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_int       !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_int_1_l   !< 
+    
+!
+!-  rotor tendencies on the segments 
+    REAL(wp), DIMENSION(:), ALLOCATABLE :: thrust_seg   !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE :: torque_seg_y !< 
+    REAL(wp), DIMENSION(:), ALLOCATABLE :: torque_seg_z !<    
+
+!
+!-  rotor tendencies on the rings
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  thrust_ring       !< 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  torque_ring_y     !< 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  torque_ring_z     !<
+    
+!
+!-  rotor tendencies on rotor grids for all turbines
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  thrust      !<
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  torque_y    !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  torque_z    !< 
+
+!
+!-  rotor tendencies on coordinate grid
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  rot_tend_x  !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  rot_tend_y  !< 
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  rot_tend_z  !< 
+!    
+!-  variables for the rotation of the rotor coordinates        
+    REAL(wp), DIMENSION(1:100,1:3,1:3) ::  rot_coord_trans  !< matrix for rotation of rotor coordinates
+    
+    REAL(wp), DIMENSION(1:3) ::  rot_eigen_rad   !< 
+    REAL(wp), DIMENSION(1:3) ::  rot_eigen_azi   !< 
+    REAL(wp), DIMENSION(1:3) ::  rot_eigen_nor   !< 
+    REAL(wp), DIMENSION(1:3) ::  re              !< 
+    REAL(wp), DIMENSION(1:3) ::  rea             !< 
+    REAL(wp), DIMENSION(1:3) ::  ren             !< 
+    REAL(wp), DIMENSION(1:3) ::  rote            !< 
+    REAL(wp), DIMENSION(1:3) ::  rota            !< 
+    REAL(wp), DIMENSION(1:3) ::  rotn            !< 
+
+!
+!-- Fixed variables for the speed controller
+
+    LOGICAL  ::  start_up = .TRUE.   !< 
+    
+    REAL(wp) ::  Fcorner             !< corner freq for the controller low pass filter
+    REAL(wp) ::  min_reg25           !< min region 2.5
+    REAL(wp) ::  om_rate             !< rotor speed change
+    REAL(wp) ::  slope15             !< slope in region 1.5
+    REAL(wp) ::  slope25             !< slope in region 2.5
+    REAL(wp) ::  trq_rate            !< torque change
+    REAL(wp) ::  vs_sysp             !< 
+    REAL(wp) ::  lp_coeff            !< coeff for the controller low pass filter 
+
+    REAL(wp), DIMENSION(100) :: omega_rot_l = 0.0_wp !< local rot speed [rad/s]
+
+!
+!-- Fixed variables for the yaw controller
+
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  yawdir           !< direction to yaw
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  phi_yaw_l        !< local (cpu) yaw angle
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  wd30_l           !< local (cpu) long running avg of the wd
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  wd2_l            !< local (cpu) short running avg of the wd
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  wdir             !< wind direction at hub
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  u_inflow         !< wind speed at hub
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  wdir_l           !< 
+    REAL(wp), DIMENSION(:)  , ALLOCATABLE ::  u_inflow_l       !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  wd30             !<
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  wd2              !<
+    LOGICAL,  DIMENSION(1:100)            ::  doyaw = .FALSE.  !<
+    INTEGER(iwp)                          ::  WDLON            !<
+    INTEGER(iwp)                          ::  WDSHO            !<
+
+!
+!-- Variables that have to be saved in the binary file for restarts
+    REAL(wp), DIMENSION(1:100) ::  pitch_add_old           = 0.0_wp  !< old constant pitch angle
+    REAL(wp), DIMENSION(1:100) ::  omega_gen               = 0.0_wp  !< curr. generator speed
+    REAL(wp), DIMENSION(1:100) ::  omega_gen_f             = 0.0_wp  !< filtered generator speed
+    REAL(wp), DIMENSION(1:100) ::  omega_gen_old           = 0.0_wp  !< last generator speed
+    REAL(wp), DIMENSION(1:100) ::  omega_gen_f_old         = 0.0_wp  !< last filtered generator speed
+    REAL(wp), DIMENSION(1:100) ::  torque_gen              = 0.0_wp  !< generator torque
+    REAL(wp), DIMENSION(1:100) ::  torque_gen_old          = 0.0_wp  !< last generator torque
+
+
+    SAVE
+
+
+    INTERFACE wtm_parin
+       MODULE PROCEDURE wtm_parin
+    END INTERFACE wtm_parin
+
+    INTERFACE wtm_wrd_global 
+       MODULE PROCEDURE wtm_wrd_global 
+    END INTERFACE wtm_wrd_global
+
+    INTERFACE wtm_rrd_global 
+       MODULE PROCEDURE wtm_rrd_global
+    END INTERFACE wtm_rrd_global 
+    
+    INTERFACE wtm_check_parameters
+       MODULE PROCEDURE wtm_check_parameters
+    END INTERFACE wtm_check_parameters
+        
+    INTERFACE wtm_init_arrays
+       MODULE PROCEDURE wtm_init_arrays
+    END INTERFACE wtm_init_arrays
+
+    INTERFACE wtm_init
+       MODULE PROCEDURE wtm_init
+    END INTERFACE wtm_init
+    
+    INTERFACE wtm_read_blade_tables
+       MODULE PROCEDURE wtm_read_blade_tables
+    END INTERFACE wtm_read_blade_tables
+           
+    INTERFACE wtm_forces
+       MODULE PROCEDURE wtm_forces
+    END INTERFACE wtm_forces
+
+    INTERFACE wtm_yawcontrol
+       MODULE PROCEDURE wtm_yawcontrol
+    END INTERFACE wtm_yawcontrol
+    
+    INTERFACE wtm_rotate_rotor
+       MODULE PROCEDURE wtm_rotate_rotor
+    END INTERFACE wtm_rotate_rotor
+    
+    INTERFACE wtm_speed_control
+       MODULE PROCEDURE wtm_init_speed_control
+       MODULE PROCEDURE wtm_speed_control
+    END INTERFACE wtm_speed_control
+
+    INTERFACE wtm_tendencies
+       MODULE PROCEDURE wtm_tendencies
+       MODULE PROCEDURE wtm_tendencies_ij
+    END INTERFACE wtm_tendencies
+    
+    
+    PUBLIC wtm_check_parameters, wtm_forces, wtm_init, wtm_init_arrays,        &
+           wtm_parin, wtm_wrd_global, wtm_rrd_global, wtm_tendencies
+
+
+ CONTAINS
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Parin for &wind_turbine_par for wind turbine model
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_parin
+
+
+       IMPLICIT NONE
+       
+       INTEGER(iwp) ::  ierrn       !<
+
+       CHARACTER (LEN=80) ::  line  !< dummy string that contains the current line of the parameter file 
+
+       NAMELIST /wind_turbine_par/   air_dens, dtow, gear_eff, gear_ratio,     &
+                                  gen_eff, inertia_gen, inertia_rot, max_miss, &
+                                  max_torque_gen, max_trq_rate, min_miss,      &
+                                  min_reg15, min_reg2, nairfoils, nturbines,   &
+                                  omega_rot, phi_yaw, pitch_add, pitch_control,&
+                                  rated_genspeed, rated_power, rcx, rcy, rcz,  &
+                                  rnac, rr, segment_length, segment_width,     &
+                                  slope2, speed_control, tilt, time_turbine_on,&
+                                  turb_cd_nacelle, turb_cd_tower, pitch_rate,  &
+                                  yaw_control, yaw_speed, tl_cor
+                                  
+       NAMELIST /wind_turbine_parameters/                                      &
+                                  air_dens, dtow, gear_eff, gear_ratio,        &
+                                  gen_eff, inertia_gen, inertia_rot, max_miss, &
+                                  max_torque_gen, max_trq_rate, min_miss,      &
+                                  min_reg15, min_reg2, nairfoils, nturbines,   &
+                                  omega_rot, phi_yaw, pitch_add, pitch_control,&
+                                  rated_genspeed, rated_power, rcx, rcy, rcz,  &
+                                  rnac, rr, segment_length, segment_width,     &
+                                  slope2, speed_control, tilt, time_turbine_on,&
+                                  turb_cd_nacelle, turb_cd_tower, pitch_rate,  &
+                                  yaw_control, yaw_speed, tl_cor
+!
+!--    Try to find wind turbine model package
+       REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&wind_turbine_parameters' ) == 0 )
+          READ ( 11, '(A)', END=12 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, wind_turbine_parameters, ERR = 10 )
+!
+!--    Set flag that indicates that the wind turbine model is switched on
+       wind_turbine = .TRUE.
+       
+       GOTO 14
+
+ 10    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'wind_turbine_parameters', line )
+
+!
+!--    Try to find wind turbine model package
+ 12    REWIND ( 11 )
+       line = ' '
+       DO WHILE ( INDEX( line, '&wind_turbine_par' ) == 0 )
+          READ ( 11, '(A)', END=14 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, wind_turbine_par, ERR = 13, END = 14 )
+      
+       message_string = 'namelist wind_tubrine_par is deprecated and will ' // &
+                        'be removed in near future. &Please use namelist ' //  &
+                        'wind_turbine_parameters instead' 
+       CALL message( 'wtm_parin', 'PA0487', 0, 1, 0, 6, 0 )     
+      
+!
+!--    Set flag that indicates that the wind turbine model is switched on
+       wind_turbine = .TRUE.
+
+       GOTO 14
+
+ 13    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+       CALL parin_fail_message( 'wind_turbine_par', line )
+
+ 14    CONTINUE   ! TBD Change from continue, mit ierrn machen
+
+
+    END SUBROUTINE wtm_parin
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine writes the respective restart data.
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_wrd_global  
+
+
+       IMPLICIT NONE
+
+       
+       CALL wrd_write_string( 'omega_gen' )
+       WRITE ( 14 )  omega_gen
+
+       CALL wrd_write_string( 'omega_gen_f' )
+       WRITE ( 14 )  omega_gen_f
+
+       CALL wrd_write_string( 'omega_gen_f_old' )
+       WRITE ( 14 )  omega_gen_f_old
+
+       CALL wrd_write_string( 'omega_gen_old' )
+       WRITE ( 14 )  omega_gen_old
+
+       CALL wrd_write_string( 'omega_rot' )
+       WRITE ( 14 )  omega_rot
+
+       CALL wrd_write_string( 'phi_yaw' )
+       WRITE ( 14 )  phi_yaw
+
+       CALL wrd_write_string( 'pitch_add' )
+       WRITE ( 14 )  pitch_add
+
+       CALL wrd_write_string( 'pitch_add_old' )
+       WRITE ( 14 )  pitch_add_old
+
+       CALL wrd_write_string( 'torque_gen' )
+       WRITE ( 14 )  torque_gen
+
+       CALL wrd_write_string( 'torque_gen_old' )
+       WRITE ( 14 )  torque_gen_old
+
+       
+    END SUBROUTINE wtm_wrd_global    
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> This routine reads the respective restart data.
+!------------------------------------------------------------------------------!
+ SUBROUTINE wtm_rrd_global( found )
+
+
+    USE control_parameters,                                                    &
+        ONLY: length, restart_string
+
+
+    IMPLICIT NONE
+
+    LOGICAL, INTENT(OUT)  ::  found 
+
+
+    found = .TRUE.
+
+
+    SELECT CASE ( restart_string(1:length) )
+
+       CASE ( 'omega_gen' )
+          READ ( 13 )  omega_gen
+       CASE ( 'omega_gen_f' )
+          READ ( 13 )  omega_gen_f
+       CASE ( 'omega_gen_f_old' )
+          READ ( 13 )  omega_gen_f_old
+       CASE ( 'omega_gen_old' )
+          READ ( 13 )  omega_gen_old
+       CASE ( 'omega_rot' )
+          READ ( 13 )  omega_rot
+       CASE ( 'phi_yaw' )
+          READ ( 13 )  phi_yaw
+       CASE ( 'pitch_add' )
+          READ ( 13 )  pitch_add
+       CASE ( 'pitch_add_old' )
+          READ ( 13 )  pitch_add_old
+       CASE ( 'torque_gen' )
+          READ ( 13 )  torque_gen
+       CASE ( 'torque_gen_old' )
+          READ ( 13 )  torque_gen_old
+
+       CASE DEFAULT
+
+          found = .FALSE.
+
+    END SELECT
+   
+
+ END SUBROUTINE wtm_rrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Check namelist parameter
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_check_parameters
+
+    
+       IMPLICIT NONE
+    
+       IF ( ( .NOT.speed_control ) .AND. pitch_control )  THEN
+          message_string = 'pitch_control = .TRUE. requires '//                &
+                           'speed_control = .TRUE.'
+          CALL message( 'wtm_check_parameters', 'PA0461', 1, 2, 0, 6, 0 )
+       ENDIF
+       
+       IF ( ANY( omega_rot(1:nturbines) < 0.0 ) )  THEN
+          message_string = 'omega_rot < 0.0, Please set omega_rot to '     // &
+                           'a value equal or larger than zero'
+          CALL message( 'wtm_check_parameters', 'PA0462', 1, 2, 0, 6, 0 )
+       ENDIF
+       
+       
+       IF ( ANY( rcx(1:nturbines) == 9999999.9_wp ) .OR.                       &
+            ANY( rcy(1:nturbines) == 9999999.9_wp ) .OR.                       &
+            ANY( rcz(1:nturbines) == 9999999.9_wp ) )  THEN
+          
+          message_string = 'rcx, rcy, rcz '                                 // &
+                           'have to be given for each turbine.'          
+          CALL message( 'wtm_check_parameters', 'PA0463', 1, 2, 0, 6, 0 )          
+          
+       ENDIF
+
+ 
+    END SUBROUTINE wtm_check_parameters 
+    
+                                        
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Allocate wind turbine model arrays
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_init_arrays
+
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  delta_r_factor   !< 
+       REAL(wp) ::  delta_r_init     !< 
+
+!
+!--    To be able to allocate arrays with dimension of rotor rings and segments,
+!--    the maximum possible numbers of rings and segments have to be calculated:
+
+       ALLOCATE( nrings(1:nturbines) )
+       ALLOCATE( delta_r(1:nturbines) )
+
+       nrings(:)  = 0
+       delta_r(:) = 0.0_wp
+
+!
+!--    Thickness (radial) of each ring and length (tangential) of each segment:
+       delta_r_factor = segment_width
+       delta_t_factor = segment_length
+       delta_r_init   = delta_r_factor * MIN( dx, dy, dz(1))
+
+       DO inot = 1, nturbines
+!
+!--       Determine number of rings:
+          nrings(inot) = NINT( rr(inot) / delta_r_init )
+
+          delta_r(inot) = rr(inot) / nrings(inot)
+
+       ENDDO
+
+       nrings_max = MAXVAL(nrings)
+
+       ALLOCATE( nsegs(1:nrings_max,1:nturbines) )
+       ALLOCATE( nsegs_total(1:nturbines) )
+
+       nsegs(:,:)     = 0
+       nsegs_total(:) = 0
+
+
+       DO inot = 1, nturbines
+          DO ring = 1, nrings(inot)
+!
+!--          Determine number of segments for each ring:
+             nsegs(ring,inot) = MAX( 8, CEILING( delta_r_factor * pi *         &
+                                                 ( 2.0_wp * ring - 1.0_wp ) /  &
+                                                 delta_t_factor ) )
+          ENDDO
+!
+!--       Total sum of all rotor segments:
+          nsegs_total(inot) = SUM( nsegs(:,inot) )
+
+       ENDDO
+
+!
+!--    Maximum number of segments per ring:
+       nsegs_max = MAXVAL(nsegs)
+
+!!
+!!--    TODO: Folgendes im Header ausgeben!
+!       IF ( myid == 0 )  THEN
+!          PRINT*, 'nrings(1) = ', nrings(1)
+!          PRINT*, '--------------------------------------------------'
+!          PRINT*, 'nsegs(:,1) = ', nsegs(:,1)
+!          PRINT*, '--------------------------------------------------'
+!          PRINT*, 'nrings_max = ', nrings_max
+!          PRINT*, 'nsegs_max = ', nsegs_max
+!          PRINT*, 'nsegs_total(1) = ', nsegs_total(1)
+!       ENDIF
+
+
+!
+!--    Allocate 1D arrays (dimension = number of turbines)
+       ALLOCATE( i_hub(1:nturbines) )
+       ALLOCATE( i_smear(1:nturbines) )
+       ALLOCATE( j_hub(1:nturbines) )
+       ALLOCATE( j_smear(1:nturbines) )
+       ALLOCATE( k_hub(1:nturbines) )
+       ALLOCATE( k_smear(1:nturbines) )
+       ALLOCATE( torque_total(1:nturbines) )
+       ALLOCATE( thrust_rotor(1:nturbines) )
+
+!
+!--    Allocation of the 1D arrays for yaw control
+       ALLOCATE( yawdir(1:nturbines) )
+       ALLOCATE( u_inflow(1:nturbines) )
+       ALLOCATE( wdir(1:nturbines) )
+       ALLOCATE( u_inflow_l(1:nturbines) )
+       ALLOCATE( wdir_l(1:nturbines) )
+       ALLOCATE( phi_yaw_l(1:nturbines) )
+       
+!
+!--    Allocate 1D arrays (dimension = number of rotor segments)
+       ALLOCATE( alpha_attack(1:nsegs_max) )
+       ALLOCATE( chord(1:nsegs_max) )
+       ALLOCATE( phi_rel(1:nsegs_max) )
+       ALLOCATE( thrust_seg(1:nsegs_max) )
+       ALLOCATE( torque_seg_y(1:nsegs_max) )
+       ALLOCATE( torque_seg_z(1:nsegs_max) )
+       ALLOCATE( turb_cd(1:nsegs_max) )
+       ALLOCATE( turb_cl(1:nsegs_max) )
+       ALLOCATE( vrel(1:nsegs_max) )
+       ALLOCATE( vtheta(1:nsegs_max) )
+
+!
+!--    Allocate 2D arrays (dimension = number of rotor rings and segments)
+       ALLOCATE( rbx(1:nrings_max,1:nsegs_max) )
+       ALLOCATE( rby(1:nrings_max,1:nsegs_max) )
+       ALLOCATE( rbz(1:nrings_max,1:nsegs_max) )
+       ALLOCATE( thrust_ring(1:nrings_max,1:nsegs_max) )
+       ALLOCATE( torque_ring_y(1:nrings_max,1:nsegs_max) )
+       ALLOCATE( torque_ring_z(1:nrings_max,1:nsegs_max) )
+
+!
+!--    Allocate additional 2D arrays
+       ALLOCATE( rotx(1:nturbines,1:3) )
+       ALLOCATE( roty(1:nturbines,1:3) )
+       ALLOCATE( rotz(1:nturbines,1:3) )
+
+!
+!--    Allocate 3D arrays (dimension = number of grid points)
+       ALLOCATE( nac_cd_surf(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( rot_tend_x(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( rot_tend_y(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( rot_tend_z(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( thrust(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( torque_y(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( torque_z(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+       ALLOCATE( tow_cd_surf(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
+
+!
+!--    Allocate additional 3D arrays
+       ALLOCATE( u_int(1:nturbines,1:nrings_max,1:nsegs_max) )
+       ALLOCATE( u_int_1_l(1:nturbines,1:nrings_max,1:nsegs_max) )
+       ALLOCATE( v_int(1:nturbines,1:nrings_max,1:nsegs_max) )
+       ALLOCATE( v_int_1_l(1:nturbines,1:nrings_max,1:nsegs_max) )
+       ALLOCATE( w_int(1:nturbines,1:nrings_max,1:nsegs_max) )
+       ALLOCATE( w_int_1_l(1:nturbines,1:nrings_max,1:nsegs_max) )
+
+!
+!--    All of the arrays are initialized with a value of zero:
+       i_hub(:)                 = 0
+       i_smear(:)               = 0
+       j_hub(:)                 = 0
+       j_smear(:)               = 0
+       k_hub(:)                 = 0
+       k_smear(:)               = 0
+       
+       torque_total(:)          = 0.0_wp
+       thrust_rotor(:)          = 0.0_wp
+
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN
+          omega_gen(:)             = 0.0_wp
+          omega_gen_old(:)         = 0.0_wp
+          omega_gen_f(:)           = 0.0_wp
+          omega_gen_f_old(:)       = 0.0_wp
+          pitch_add_old(:)         = 0.0_wp
+          torque_gen(:)            = 0.0_wp
+          torque_gen_old(:)        = 0.0_wp
+       ENDIF
+
+       yawdir(:)                = 0.0_wp
+       wdir_l(:)                = 0.0_wp
+       wdir(:)                  = 0.0_wp
+       u_inflow(:)              = 0.0_wp
+       u_inflow_l(:)            = 0.0_wp
+       phi_yaw_l(:)             = 0.0_wp
+
+!
+!--    Allocate 1D arrays (dimension = number of rotor segments)
+       alpha_attack(:)          = 0.0_wp
+       chord(:)                 = 0.0_wp
+       phi_rel(:)               = 0.0_wp
+       thrust_seg(:)            = 0.0_wp
+       torque_seg_y(:)          = 0.0_wp
+       torque_seg_z(:)          = 0.0_wp
+       turb_cd(:)               = 0.0_wp
+       turb_cl(:)               = 0.0_wp
+       vrel(:)                  = 0.0_wp
+       vtheta(:)                = 0.0_wp
+
+       rbx(:,:)                 = 0.0_wp
+       rby(:,:)                 = 0.0_wp
+       rbz(:,:)                 = 0.0_wp
+       thrust_ring(:,:)         = 0.0_wp
+       torque_ring_y(:,:)       = 0.0_wp
+       torque_ring_z(:,:)       = 0.0_wp
+
+       rotx(:,:)                = 0.0_wp
+       roty(:,:)                = 0.0_wp
+       rotz(:,:)                = 0.0_wp
+
+       nac_cd_surf(:,:,:)       = 0.0_wp
+       rot_tend_x(:,:,:)        = 0.0_wp
+       rot_tend_y(:,:,:)        = 0.0_wp
+       rot_tend_z(:,:,:)        = 0.0_wp
+       thrust(:,:,:)            = 0.0_wp
+       torque_y(:,:,:)          = 0.0_wp
+       torque_z(:,:,:)          = 0.0_wp
+       tow_cd_surf(:,:,:)       = 0.0_wp
+
+       u_int(:,:,:)             = 0.0_wp
+       u_int_1_l(:,:,:)         = 0.0_wp
+       v_int(:,:,:)             = 0.0_wp
+       v_int_1_l(:,:,:)         = 0.0_wp
+       w_int(:,:,:)             = 0.0_wp
+       w_int_1_l(:,:,:)         = 0.0_wp
+
+
+    END SUBROUTINE wtm_init_arrays
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the wind turbine model
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_init
+
+    
+       USE control_parameters,                                                 &
+           ONLY:  dz_stretch_level_start
+    
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  i  !< running index
+       INTEGER(iwp) ::  j  !< running index
+       INTEGER(iwp) ::  k  !< running index
+       
+!
+!--    Help variables for the smearing function       
+       REAL(wp) ::  eps_kernel       !<       
+       
+!
+!--    Help variables for calculation of the tower drag       
+       INTEGER(iwp) ::  tower_n      !<
+       INTEGER(iwp) ::  tower_s      !<
+!
+!--    Help variables for the calulaction of the nacelle drag
+       INTEGER(iwp) ::  i_ip         !<
+       INTEGER(iwp) ::  i_ipg        !<
+       
+       REAL(wp) ::  yvalue               
+       REAL(wp) ::  dy_int           !< 
+       REAL(wp) ::  dz_int           !<
+       
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE :: circle_points  !<
+              
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: index_nacb       !< 
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: index_nacl       !< 
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: index_nacr       !< 
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: index_nact       !< 
+       
+       ALLOCATE( index_nacb(1:nturbines) )
+       ALLOCATE( index_nacl(1:nturbines) )
+       ALLOCATE( index_nacr(1:nturbines) )
+       ALLOCATE( index_nact(1:nturbines) )
+
+!
+!------------------------------------------------------------------------------!
+!--    Calculation of parameters for the regularization kernel
+!--    (smearing of the forces)
+!------------------------------------------------------------------------------!
+!
+!--    In the following, some of the required parameters for the smearing will
+!--    be calculated:
+
+!--    The kernel is set equal to twice the grid spacing which has turned out to
+!--    be a reasonable value (see e.g. Troldborg et al. (2013), Wind Energy,
+!--    DOI: 10.1002/we.1608):
+       eps_kernel = 2.0_wp * dx
+!
+!--    The zero point (eps_min) of the polynomial function must be the following
+!--    if the integral of the polynomial function (for values < eps_min) shall
+!--    be equal to the integral of the Gaussian function used before:
+       eps_min = ( 105.0_wp / 32.0_wp )**( 1.0_wp / 3.0_wp ) *                 &
+                 pi**( 1.0_wp / 6.0_wp ) * eps_kernel
+!
+!--    Stretching (non-uniform grid spacing) is not considered in the wind 
+!--    turbine model. Therefore, vertical stretching has to be applied above
+!--    the area where the wtm is active. ABS (...) is required because the 
+!--    default value of dz_stretch_level_start is -9999999.9_wp (negative). 
+       IF ( ABS( dz_stretch_level_start(1) ) <= MAXVAL(rcz(1:nturbines)) +     &
+                                                MAXVAL(rr(1:nturbines)) +      &
+                                                eps_min)  THEN
+          WRITE( message_string, * ) 'The lowest level where vertical ',       &
+                                     'stretching is applied &have to be ',     &
+                                     'greater than ',MAXVAL(rcz(1:nturbines)) +&
+                                      MAXVAL(rr(1:nturbines)) + eps_min
+          CALL message( 'wtm_init', 'PA0484', 1, 2, 0, 6, 0 )
+       ENDIF 
+!
+!--    Square of eps_min:
+       eps_min2 = eps_min**2
+!
+!--    Parameters in the polynomial function:
+       pol_a = 1.0_wp / eps_min**4
+       pol_b = 2.0_wp / eps_min**2
+!
+!--    Normalization factor which is the inverse of the integral of the smearing
+!--    function:
+       eps_factor = 105.0_wp / ( 32.0_wp * pi * eps_min**3 )
+       
+!--    Change tilt angle to rad:
+       tilt = tilt * pi / 180.0_wp
+      
+!
+!--    Change yaw angle to rad:
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN
+          phi_yaw(:) = phi_yaw(:) * pi / 180.0_wp
+       ENDIF
+
+
+       DO inot = 1, nturbines
+!
+!--       Rotate the rotor coordinates in case yaw and tilt are defined
+          CALL wtm_rotate_rotor( inot )
+          
+!
+!--       Determine the indices of the hub height
+          i_hub(inot) = INT(   rcx(inot)                 / dx )
+          j_hub(inot) = INT( ( rcy(inot) + 0.5_wp * dy ) / dy )
+          k_hub(inot) = INT( ( rcz(inot) + 0.5_wp * dz(1) ) / dz(1) )
+
+!
+!--       Determining the area to which the smearing of the forces is applied.
+!--       As smearing now is effectively applied only for distances smaller than
+!--       eps_min, the smearing area can be further limited and regarded as a
+!--       function of eps_min:
+          i_smear(inot) = CEILING( ( rr(inot) + eps_min ) / dx )
+          j_smear(inot) = CEILING( ( rr(inot) + eps_min ) / dy )
+          k_smear(inot) = CEILING( ( rr(inot) + eps_min ) / dz(1) )
+       
+       ENDDO
+
+!
+!--    Call the wtm_init_speed_control subroutine and calculate the local 
+!--    omega_rot for the respective processor.
+       IF ( speed_control)  THEN
+       
+          CALL wtm_speed_control
+
+          IF ( TRIM( initializing_actions ) == 'read_restart_data' ) THEN
+
+             DO inot = 1, nturbines
+
+                IF ( nxl > i_hub(inot) ) THEN
+                   torque_gen(inot) = 0.0_wp
+                   omega_gen_f(inot) = 0.0_wp
+                   omega_rot_l(inot) = 0.0_wp
+                ENDIF
+
+                IF ( nxr < i_hub(inot) ) THEN
+                   torque_gen(inot) = 0.0_wp
+                   omega_gen_f(inot) = 0.0_wp
+                   omega_rot_l(inot) = 0.0_wp
+                ENDIF
+
+                IF ( nys > j_hub(inot) ) THEN
+                   torque_gen(inot) = 0.0_wp
+                   omega_gen_f(inot) = 0.0_wp
+                   omega_rot_l(inot) = 0.0_wp
+                ENDIF
+
+                IF ( nyn < j_hub(inot) ) THEN
+                   torque_gen(inot) = 0.0_wp
+                   omega_gen_f(inot) = 0.0_wp
+                   omega_rot_l(inot) = 0.0_wp
+                ENDIF
+
+                IF ( ( nxl <= i_hub(inot) ) .AND. ( nxr >= i_hub(inot) ) ) THEN
+                   IF ( ( nys <= j_hub(inot) ) .AND. ( nyn >= j_hub(inot) ) ) THEN
+
+                      omega_rot_l(inot) = omega_gen(inot) / gear_ratio
+
+                   ENDIF
+                ENDIF
+
+             END DO
+
+          ENDIF
+
+       ENDIF
+
+!
+!------------------------------------------------------------------------------!
+!--    Determine the area within each grid cell that overlaps with the area
+!--    of the nacelle and the tower (needed for calculation of the forces)
+!------------------------------------------------------------------------------!
+!
+!--    Note: so far this is only a 2D version, in that the mean flow is
+!--    perpendicular to the rotor area.
+
+!
+!--    Allocation of the array containing information on the intersection points
+!--    between rotor disk and the numerical grid:
+       upper_end = ( ny + 1 ) * 10000 
+
+       ALLOCATE( circle_points(1:2,1:upper_end) )
+       
+       circle_points(:,:) = 0.0_wp
+
+       
+       DO inot = 1, nturbines                     ! loop over number of turbines
+!
+!--       Determine the grid index (u-grid) that corresponds to the location of
+!--       the rotor center (reduces the amount of calculations in the case that
+!--       the mean flow is perpendicular to the rotor area):
+          i = i_hub(inot)
+
+!
+!--       Determine the left and the right edge of the nacelle (corresponding
+!--       grid point indices):
+          index_nacl(inot) = INT( ( rcy(inot) - rnac(inot) + 0.5_wp * dy ) / dy )
+          index_nacr(inot) = INT( ( rcy(inot) + rnac(inot) + 0.5_wp * dy ) / dy )
+!
+!--       Determine the bottom and the top edge of the nacelle (corresponding
+!--       grid point indices).The grid point index has to be increased by 1, as
+!--       the first level for the u-component (index 0) is situated below the
+!--       surface. All points between z=0 and z=dz/s would already be contained
+!--       in grid box 1.
+          index_nacb(inot) = INT( ( rcz(inot) - rnac(inot) ) / dz(1) ) + 1
+          index_nact(inot) = INT( ( rcz(inot) + rnac(inot) ) / dz(1) ) + 1
+
+!
+!--       Determine the indices of the grid boxes containing the left and 
+!--       the right boundaries of the tower:
+          tower_n = ( rcy(inot) + 0.5_wp * dtow(inot) - 0.5_wp * dy ) / dy
+          tower_s = ( rcy(inot) - 0.5_wp * dtow(inot) - 0.5_wp * dy ) / dy
+
+!
+!--       Determine the fraction of the grid box area overlapping with the tower
+!--       area and multiply it with the drag of the tower:
+          IF ( ( nxlg <= i )  .AND.  ( nxrg >= i ) )  THEN
+
+             DO  j = nys, nyn
+!
+!--             Loop from south to north boundary of tower
+                IF ( ( j >= tower_s )  .AND.  ( j <= tower_n ) )  THEN
+
+                   DO  k = nzb, nzt
+
+                      IF ( k == k_hub(inot) )  THEN
+                         IF ( tower_n - tower_s >= 1 )  THEN
+!
+!--                      leftmost and rightmost grid box:
+                            IF ( j == tower_s )  THEN
+                               tow_cd_surf(k,j,i) = ( rcz(inot) -              &
+                                    ( k_hub(inot) * dz(1) - 0.5_wp * dz(1) ) )*& ! extension in z-direction
+                                  ( ( tower_s + 1.0_wp + 0.5_wp ) * dy    -    &
+                                    ( rcy(inot) - 0.5_wp * dtow(inot) ) ) *    & ! extension in y-direction
+                                  turb_cd_tower(inot)
+                            ELSEIF ( j == tower_n )  THEN
+                               tow_cd_surf(k,j,i) = ( rcz(inot)            -   &
+                                    ( k_hub(inot) * dz(1) - 0.5_wp * dz(1) ) )*& ! extension in z-direction
+                                  ( ( rcy(inot) + 0.5_wp * dtow(inot) )   -    &
+                                    ( tower_n + 0.5_wp ) * dy )           *    & ! extension in y-direction
+                                  turb_cd_tower(inot)
+!
+!--                         grid boxes inbetween
+!--                         (where tow_cd_surf = grid box area):
+                            ELSE
+                               tow_cd_surf(k,j,i) = ( rcz(inot) -              &
+                                    ( k_hub(inot) * dz(1) - 0.5_wp * dz(1) ) )*&
+                                    dy * turb_cd_tower(inot)
+                            ENDIF
+!
+!--                      tower lies completely within one grid box:
+                         ELSE
+                            tow_cd_surf(k,j,i) = ( rcz(inot) - ( k_hub(inot) * &
+                                       dz(1) - 0.5_wp * dz(1) ) ) *            &
+                                       dtow(inot) * turb_cd_tower(inot)
+                         ENDIF
+!
+!--                  In case that k is smaller than k_hub the following actions
+!--                  are carried out:
+                      ELSEIF ( k < k_hub(inot) )  THEN
+                      
+                         IF ( ( tower_n - tower_s ) >= 1 )  THEN
+!
+!--                         leftmost and rightmost grid box:
+                            IF ( j == tower_s )  THEN                         
+                               tow_cd_surf(k,j,i) = dz(1) * (                  &
+                                      ( tower_s + 1 + 0.5_wp ) * dy         -  &
+                                      ( rcy(inot) - 0.5_wp * dtow(inot) )      &
+                                                        ) * turb_cd_tower(inot)
+                            ELSEIF ( j == tower_n )  THEN
+                               tow_cd_surf(k,j,i) = dz(1) * (                  &
+                                      ( rcy(inot) + 0.5_wp * dtow(inot) )   -  &
+                                      ( tower_n + 0.5_wp ) * dy                &
+                                                         ) * turb_cd_tower(inot)
+!
+!--                         grid boxes inbetween
+!--                         (where tow_cd_surf = grid box area):
+                            ELSE
+                               tow_cd_surf(k,j,i) = dz(1) * dy *               &
+                                                    turb_cd_tower(inot)
+                            ENDIF
+!
+!--                         tower lies completely within one grid box:
+                         ELSE
+                            tow_cd_surf(k,j,i) = dz(1) * dtow(inot) *          &
+                                                turb_cd_tower(inot)
+                         ENDIF ! end if larger than grid box
+
+                      ENDIF    ! end if k == k_hub
+
+                   ENDDO       ! end loop over k
+
+                ENDIF          ! end if inside north and south boundary of tower
+
+             ENDDO             ! end loop over j
+
+          ENDIF                ! end if hub inside domain + ghostpoints
+       
+          
+          CALL exchange_horiz( tow_cd_surf, nbgp )
+
+!
+!--       Calculation of the nacelle area
+!--       CAUTION: Currently disabled due to segmentation faults on the FLOW HPC
+!--                cluster (Oldenburg)
+!!
+!!--       Tabulate the points on the circle that are required in the following for
+!!--       the calculation of the Riemann integral (node points; they are called
+!!--       circle_points in the following):
+!
+!          dy_int = dy / 10000.0_wp
+!
+!          DO  i_ip = 1, upper_end
+!             yvalue   = dy_int * ( i_ip - 0.5_wp ) + 0.5_wp * dy           !<--- segmentation fault
+!             sqrt_arg = rnac(inot)**2 - ( yvalue - rcy(inot) )**2          !<--- segmentation fault
+!             IF ( sqrt_arg >= 0.0_wp )  THEN
+!!
+!!--             bottom intersection point
+!                circle_points(1,i_ip) = rcz(inot) - SQRT( sqrt_arg )
+!!
+!!--             top intersection point
+!                circle_points(2,i_ip) = rcz(inot) + SQRT( sqrt_arg )       !<--- segmentation fault
+!             ELSE
+!                circle_points(:,i_ip) = -111111                            !<--- segmentation fault
+!             ENDIF
+!          ENDDO
+!
+!
+!          DO  j = nys, nyn
+!!
+!!--          In case that the grid box is located completely outside the nacelle
+!!--          (y) it can automatically be stated that there is no overlap between
+!!--          the grid box and the nacelle and consequently we can set
+!!--          nac_cd_surf(:,j,i) = 0.0:
+!             IF ( ( j >= index_nacl(inot) )  .AND.  ( j <= index_nacr(inot) ) )  THEN
+!                DO  k = nzb+1, nzt
+!!
+!!--                In case that the grid box is located completely outside the
+!!--                nacelle (z) it can automatically be stated that there is no
+!!--                overlap between the grid box and the nacelle and consequently
+!!--                we can set nac_cd_surf(k,j,i) = 0.0:
+!                   IF ( ( k >= index_nacb(inot) )  .OR.                           &
+!                        ( k <= index_nact(inot) ) )  THEN
+!!
+!!--                   For all other cases Riemann integrals are calculated.
+!!--                   Here, the points on the circle that have been determined
+!!--                   above are used in order to calculate the overlap between the
+!!--                   gridbox and the nacelle area (area approached by 10000
+!!--                   rectangulars dz_int * dy_int):
+!                      DO  i_ipg = 1, 10000
+!                         dz_int = dz
+!                         i_ip = j * 10000 + i_ipg
+!!
+!!--                      Determine the vertical extension dz_int of the circle
+!!--                      within the current grid box:
+!                         IF ( ( circle_points(2,i_ip) < zw(k) ) .AND.          &  !<--- segmentation fault
+!                              ( circle_points(2,i_ip) >= zw(k-1) ) ) THEN
+!                            dz_int = dz_int -                                  &  !<--- segmentation fault
+!                                     ( zw(k) - circle_points(2,i_ip) )
+!                         ENDIF
+!                         IF ( ( circle_points(1,i_ip) <= zw(k) ) .AND.         &  !<--- segmentation fault
+!                              ( circle_points(1,i_ip) > zw(k-1) ) ) THEN
+!                            dz_int = dz_int -                                  &
+!                                     ( circle_points(1,i_ip) - zw(k-1) )
+!                         ENDIF
+!                         IF ( zw(k-1) > circle_points(2,i_ip) ) THEN
+!                            dz_int = 0.0_wp
+!                         ENDIF
+!                         IF ( zw(k) < circle_points(1,i_ip) ) THEN
+!                            dz_int = 0.0_wp                      
+!                         ENDIF 
+!                         IF ( ( nxlg <= i ) .AND. ( nxrg >= i ) ) THEN
+!                            nac_cd_surf(k,j,i) = nac_cd_surf(k,j,i) +        &  !<--- segmentation fault
+!                                                  dy_int * dz_int * turb_cd_nacelle(inot)
+!                         ENDIF   
+!                      ENDDO
+!                   ENDIF
+!                ENDDO
+!             ENDIF
+! 
+!          ENDDO
+!        
+!          CALL exchange_horiz( nac_cd_surf, nbgp )                                !<---  segmentation fault
+
+       ENDDO   ! end of loop over turbines
+
+       tow_cd_surf   = tow_cd_surf   / ( dx * dy * dz(1) )  ! Normalize tower drag
+       nac_cd_surf = nac_cd_surf / ( dx * dy * dz(1) )      ! Normalize nacelle drag
+
+       CALL wtm_read_blade_tables
+ 
+    END SUBROUTINE wtm_init
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Read in layout of the rotor blade , the lift and drag tables
+!> and the distribution of lift and drag tables along the blade
+!------------------------------------------------------------------------------!
+!
+    SUBROUTINE wtm_read_blade_tables
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  ii   !< running index
+       INTEGER(iwp) ::  jj   !< running index
+    
+       INTEGER(iwp) ::  ierrn       !<
+    
+       CHARACTER(200) :: chmess     !< Read in string 
+
+       INTEGER(iwp) ::  dlen        !< no. rows of local table 
+       INTEGER(iwp) ::  dlenbl      !< no. rows of cd, cl table
+       INTEGER(iwp) ::  ialpha      !< table position of current alpha value
+       INTEGER(iwp) ::  iialpha     !< 
+       INTEGER(iwp) ::  iir         !< 
+       INTEGER(iwp) ::  radres      !< radial resolution
+       INTEGER(iwp) ::  t1          !< no. of airfoil
+       INTEGER(iwp) ::  t2          !< no. of airfoil
+       INTEGER(iwp) ::  trow        !< 
+       INTEGER(iwp) ::  dlenbl_int  !< no. rows of interpolated cd, cl tables
+    
+       REAL(wp) :: alpha_attack_i   !<
+       REAL(wp) :: weight_a         !< 
+       REAL(wp) :: weight_b         !< 
+
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ttoint1    !<
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ttoint2    !<
+    
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: turb_cd_sel1   !< 
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: turb_cd_sel2   !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: turb_cl_sel1   !< 
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: turb_cl_sel2   !<
+       REAL(wp), DIMENSION(:), ALLOCATABLE :: read_cl_cd     !< read in var array
+              
+       REAL(wp), DIMENSION(:), ALLOCATABLE    :: alpha_attack_tab   !< 
+       REAL(wp), DIMENSION(:), ALLOCATABLE    :: trad1              !< 
+       REAL(wp), DIMENSION(:), ALLOCATABLE    :: trad2              !<          
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE  :: turb_cd_table      !<
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE  :: turb_cl_table      !<
+                                          
+       ALLOCATE ( read_cl_cd(1:2*nairfoils+1) )
+
+!
+!--    Read in the distribution of lift and drag tables along the blade, the
+!--    layout of the rotor blade and the lift and drag tables:
+
+       OPEN ( 90, FILE='WTM_DATA', STATUS='OLD', FORM='FORMATTED', IOSTAT=ierrn )
+
+       IF ( ierrn /= 0 )  THEN
+          message_string = 'file WTM_DATA does not exist'
+          CALL message( 'wtm_init', 'PA0464', 1, 2, 0, 6, 0 )
+       ENDIF
+!
+!--    Read distribution table:
+
+       dlen = 0
+
+       READ ( 90, '(3/)' )
+
+       rloop3: DO
+          READ ( 90, *, IOSTAT=ierrn ) chmess
+          IF ( ierrn < 0  .OR.  chmess == '#'  .OR.  chmess == '')  EXIT rloop3
+          dlen = dlen + 1
+       ENDDO rloop3
+
+       ALLOCATE( trad1(1:dlen), trad2(1:dlen), ttoint1(1:dlen), ttoint2(1:dlen))
+
+       DO jj = 1,dlen+1
+          BACKSPACE ( 90, IOSTAT=ierrn )
+       ENDDO
+
+       DO jj = 1,dlen
+          READ ( 90, * ) trad1(jj), trad2(jj), ttoint1(jj), ttoint2(jj)
+       ENDDO
+
+!
+!--    Read layout table:
+
+       dlen = 0 
+
+       READ ( 90, '(3/)')
+
+       rloop1: DO
+          READ ( 90, *, IOSTAT=ierrn ) chmess
+          IF ( ierrn < 0  .OR.  chmess == '#'  .OR.  chmess == '')  EXIT rloop1
+          dlen = dlen + 1
+       ENDDO rloop1
+
+       ALLOCATE( lrd(1:dlen), ard(1:dlen), crd(1:dlen) )
+       DO jj = 1, dlen+1
+          BACKSPACE ( 90, IOSTAT=ierrn )
+       ENDDO             
+       DO jj = 1, dlen
+          READ ( 90, * ) lrd(jj), ard(jj), crd(jj) 
+       ENDDO
+
+!
+!--    Read tables (turb_cl(alpha),turb_cd(alpha) for the different profiles:
+
+       dlen = 0
+
+       READ ( 90, '(3/)' )
+
+       rloop2: DO
+          READ ( 90, *, IOSTAT=ierrn ) chmess
+          IF ( ierrn < 0  .OR.  chmess == '#'  .OR.  chmess == '')  EXIT rloop2
+          dlen = dlen + 1
+       ENDDO rloop2 
+
+       ALLOCATE( alpha_attack_tab(1:dlen), turb_cl_table(1:dlen,1:nairfoils),  &
+                 turb_cd_table(1:dlen,1:nairfoils) )
+
+       DO jj = 1,dlen+1
+          BACKSPACE ( 90, IOSTAT=ierrn )
+       ENDDO 
+
+       DO jj = 1,dlen
+          READ ( 90, * ) read_cl_cd
+          alpha_attack_tab(jj) = read_cl_cd(1)
+          DO ii= 1, nairfoils
+             turb_cl_table(jj,ii) = read_cl_cd(ii*2)
+             turb_cd_table(jj,ii) = read_cl_cd(ii*2+1)
+          ENDDO
+
+       ENDDO
+
+       dlenbl = dlen 
+
+       CLOSE ( 90 )
+
+!
+!--    For each possible radial position (resolution: 0.1 m --> 631 values if rr(1)=63m)
+!--    and each possible angle of attack (resolution: 0.1 degrees --> 3601 values!)
+!--    determine the lift and drag coefficient by interpolating between the
+!--    tabulated values of each table (interpolate to current angle of attack)
+!--    and between the tables (interpolate to current radial position):
+
+       ALLOCATE( turb_cl_sel1(1:dlenbl) )  
+       ALLOCATE( turb_cl_sel2(1:dlenbl) )  
+       ALLOCATE( turb_cd_sel1(1:dlenbl) )
+       ALLOCATE( turb_cd_sel2(1:dlenbl) )
+
+       radres     = INT( rr(1) * 10.0_wp ) + 1_iwp
+       dlenbl_int = INT( 360.0_wp / accu_cl_cd_tab ) + 1_iwp
+
+       ALLOCATE( turb_cl_tab(1:dlenbl_int,1:radres) )
+       ALLOCATE( turb_cd_tab(1:dlenbl_int,1:radres) )
+
+       DO iir = 1, radres ! loop over radius
+
+          cur_r = ( iir - 1_iwp ) * 0.1_wp
+!
+!--       Find position in table 1
+          lct = MINLOC( ABS( trad1 - cur_r ) )
+!             lct(1) = lct(1)
+
+          IF ( ( trad1(lct(1)) - cur_r ) .GT. 0.0 )  THEN
+             lct(1) = lct(1) - 1
+          ENDIF
+
+          trow = lct(1)
+!
+!--       Calculate weights for radius interpolation
+          weight_a = ( trad2(trow) - cur_r ) / ( trad2(trow) - trad1(trow) )
+          weight_b = ( cur_r - trad1(trow) ) / ( trad2(trow) - trad1(trow) )
+          t1 = ttoint1(trow)
+          t2 = ttoint2(trow)
+
+          IF ( t1 .EQ. t2 ) THEN  ! if both are the same, the weights are NaN
+             weight_a = 0.5_wp    ! then do interpolate in between same twice
+             weight_b = 0.5_wp    ! using 0.5 as weight
+          ENDIF
+
+          IF ( t1 == 0 .AND. t2 == 0 ) THEN
+             turb_cd_sel1 = 0.0_wp
+             turb_cd_sel2 = 0.0_wp
+             turb_cl_sel1 = 0.0_wp
+             turb_cl_sel2 = 0.0_wp
+
+             turb_cd_tab(1,iir) = 0.0_wp  ! For -180Â° (iialpha=1) the values    
+             turb_cl_tab(1,iir) = 0.0_wp  ! for each radius has to be set
+                                          ! explicitly              
+          ELSE
+             turb_cd_sel1 = turb_cd_table(:,t1)
+             turb_cd_sel2 = turb_cd_table(:,t2)
+             turb_cl_sel1 = turb_cl_table(:,t1)
+             turb_cl_sel2 = turb_cl_table(:,t2)
+!
+!--          For -180Â° (iialpha=1) the values for each radius has to be set 
+!--          explicitly 
+             turb_cd_tab(1,iir) = ( weight_a * turb_cd_table(1,t1) + weight_b  & 
+                                  * turb_cd_table(1,t2) )    
+             turb_cl_tab(1,iir) = ( weight_a * turb_cl_table(1,t1) + weight_b  & 
+                                  * turb_cl_table(1,t2) ) 
+          ENDIF
+
+          DO iialpha = 2, dlenbl_int  ! loop over angles
+             
+             alpha_attack_i = -180.0_wp + REAL( iialpha-1 ) * accu_cl_cd_tab
+             ialpha = 1
+             
+             DO WHILE ( ( alpha_attack_i > alpha_attack_tab(ialpha) ) .AND. (ialpha <= dlen ) )
+                ialpha = ialpha + 1
+             ENDDO
+
+!
+!--          Interpolation of lift and drag coefficiencts on fine grid of radius 
+!--          segments and angles of attack
+
+             turb_cl_tab(iialpha,iir) = ( alpha_attack_tab(ialpha) -           &
+                                          alpha_attack_i ) /                   &
+                                        ( alpha_attack_tab(ialpha) -           &
+                                          alpha_attack_tab(ialpha-1) ) *       &
+                                        ( weight_a * turb_cl_sel1(ialpha-1) +  &
+                                          weight_b * turb_cl_sel2(ialpha-1) ) +&
+                                        ( alpha_attack_i             -         &
+                                          alpha_attack_tab(ialpha-1) ) /       &
+                                        ( alpha_attack_tab(ialpha) -           &
+                                          alpha_attack_tab(ialpha-1) ) *       &
+                                        ( weight_a * turb_cl_sel1(ialpha) +    &
+                                          weight_b * turb_cl_sel2(ialpha) )
+             turb_cd_tab(iialpha,iir) = ( alpha_attack_tab(ialpha) -           &
+                                          alpha_attack_i ) /                   &
+                                        ( alpha_attack_tab(ialpha) -           &
+                                          alpha_attack_tab(ialpha-1) ) *       &
+                                        ( weight_a * turb_cd_sel1(ialpha-1) +  &
+                                          weight_b * turb_cd_sel2(ialpha-1) ) +&
+                                        ( alpha_attack_i             -         &
+                                          alpha_attack_tab(ialpha-1) ) /       &
+                                        ( alpha_attack_tab(ialpha) -           &
+                                          alpha_attack_tab(ialpha-1) ) *       &
+                                        ( weight_a * turb_cd_sel1(ialpha) +    &
+                                          weight_b * turb_cd_sel2(ialpha) )
+            
+          ENDDO   ! end loop over angles of attack
+          
+       ENDDO   ! end loop over radius
+
+
+    END SUBROUTINE wtm_read_blade_tables
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> The projection matrix for the coordinate system of therotor disc in respect
+!> to the yaw and tilt angle of the rotor is calculated
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_rotate_rotor( inot )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) :: inot
+!
+!--    Calculation of the rotation matrix for the application of the tilt to
+!--    the rotors
+       rot_eigen_rad(1) = SIN( phi_yaw(inot) )    ! x-component of the radial eigenvector
+       rot_eigen_rad(2) = COS( phi_yaw(inot) )    ! y-component of the radial eigenvector 
+       rot_eigen_rad(3) = 0.0_wp                  ! z-component of the radial eigenvector
+
+       rot_eigen_azi(1) = 0.0_wp                  ! x-component of the azimuth eigenvector
+       rot_eigen_azi(2) = 0.0_wp                  ! y-component of the azimuth eigenvector
+       rot_eigen_azi(3) = 1.0_wp                  ! z-component of the azimuth eigenvector
+
+       rot_eigen_nor(1) =  COS( phi_yaw(inot) )   ! x-component of the normal eigenvector
+       rot_eigen_nor(2) = -SIN( phi_yaw(inot) )   ! y-component of the normal eigenvector
+       rot_eigen_nor(3) = 0.0_wp                  ! z-component of the normal eigenvector
+    
+!
+!--    Calculation of the coordinate transformation matrix to apply a tilt to
+!--    the rotor. If tilt = 0, rot_coord_trans is a unit matrix.
+
+       rot_coord_trans(inot,1,1) = rot_eigen_rad(1)**2                   *     &
+                                   ( 1.0_wp - COS( tilt ) ) + COS( tilt ) 
+       rot_coord_trans(inot,1,2) = rot_eigen_rad(1) * rot_eigen_rad(2)   *     &
+                                   ( 1.0_wp - COS( tilt ) )              -     &
+                                   rot_eigen_rad(3) * SIN( tilt )
+       rot_coord_trans(inot,1,3) = rot_eigen_rad(1) * rot_eigen_rad(3)   *     &
+                                   ( 1.0_wp - COS( tilt ) )              +     &
+                                   rot_eigen_rad(2) * SIN( tilt )
+       rot_coord_trans(inot,2,1) = rot_eigen_rad(2) * rot_eigen_rad(1)   *     &
+                                   ( 1.0_wp - COS( tilt ) )              +     &
+                                   rot_eigen_rad(3) * SIN( tilt )
+       rot_coord_trans(inot,2,2) = rot_eigen_rad(2)**2                   *     &
+                                   ( 1.0_wp - COS( tilt ) ) + COS( tilt ) 
+       rot_coord_trans(inot,2,3) = rot_eigen_rad(2) * rot_eigen_rad(3)   *     &
+                                   ( 1.0_wp - COS( tilt ) )              -     &
+                                   rot_eigen_rad(1) * SIN( tilt )
+       rot_coord_trans(inot,3,1) = rot_eigen_rad(3) * rot_eigen_rad(1)   *     &
+                                   ( 1.0_wp - COS( tilt ) )              -     &
+                                   rot_eigen_rad(2) * SIN( tilt )
+       rot_coord_trans(inot,3,2) = rot_eigen_rad(3) * rot_eigen_rad(2)   *     &
+                                   ( 1.0_wp - COS( tilt ) )              +     &
+                                   rot_eigen_rad(1) * SIN( tilt )
+       rot_coord_trans(inot,3,3) = rot_eigen_rad(3)**2                   *     &
+                                   ( 1.0_wp - COS( tilt ) ) + COS( tilt )
+
+!
+!--    Vectors for the Transformation of forces from the rotor's spheric
+!--    coordinate system to the cartesian coordinate system
+       rotx(inot,:) = MATMUL( rot_coord_trans(inot,:,:), rot_eigen_nor )
+       roty(inot,:) = MATMUL( rot_coord_trans(inot,:,:), rot_eigen_rad )
+       rotz(inot,:) = MATMUL( rot_coord_trans(inot,:,:), rot_eigen_azi )
+    
+    END SUBROUTINE wtm_rotate_rotor
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Calculation of the forces generated by the wind turbine
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_forces
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=4) ::  turbine_id
+
+       INTEGER(iwp) ::  i, j, k          !< loop indices
+       INTEGER(iwp) ::  inot             !< turbine loop index (turbine id)
+       INTEGER(iwp) ::  iialpha, iir     !<
+       INTEGER(iwp) ::  rseg             !<
+       INTEGER(iwp) ::  ring             !<
+       INTEGER(iwp) ::  ii, jj, kk       !<
+    
+       REAL(wp)     ::  flag               !< flag to mask topography grid points
+       REAL(wp)     ::  sin_rot, cos_rot   !<
+       REAL(wp)     ::  sin_yaw, cos_yaw   !<
+       
+       REAL(wp) ::  aa, bb, cc, dd  !< interpolation distances
+       REAL(wp) ::  gg              !< interpolation volume var  
+       
+       REAL(wp) ::  dist_u_3d, dist_v_3d, dist_w_3d  !< smearing distances
+
+       
+!
+!      Variables for pitch control
+       LOGICAL ::  pitch_sw = .FALSE.
+
+       INTEGER(iwp), DIMENSION(1) ::  lct = 0
+       REAL(wp), DIMENSION(1)     ::  rad_d = 0.0_wp
+       
+       REAL(wp) :: tl_factor !< factor for tip loss correction
+
+
+       CALL cpu_log( log_point_s(61), 'wtm_forces', 'start' )
+
+
+       IF ( simulated_time >= time_turbine_on ) THEN
+
+!
+!--       Set forces to zero for each new time step:
+          thrust(:,:,:)         = 0.0_wp
+          torque_y(:,:,:)       = 0.0_wp
+          torque_z(:,:,:)       = 0.0_wp
+          torque_total(:)       = 0.0_wp
+          rot_tend_x(:,:,:)     = 0.0_wp
+          rot_tend_y(:,:,:)     = 0.0_wp
+          rot_tend_z(:,:,:)     = 0.0_wp
+          thrust_rotor(:)       = 0.0_wp
+!
+!--       Loop over number of turbines:
+          DO inot = 1, nturbines
+
+             cos_yaw = COS(phi_yaw(inot))
+             sin_yaw = SIN(phi_yaw(inot))
+!
+!--          Loop over rings of each turbine:
+             DO ring = 1, nrings(inot)
+
+                thrust_seg(:)   = 0.0_wp
+                torque_seg_y(:) = 0.0_wp
+                torque_seg_z(:) = 0.0_wp
+!
+!--             Determine distance between each ring (center) and the hub:
+                cur_r = (ring - 0.5_wp) * delta_r(inot)
+
+!
+!--             Loop over segments of each ring of each turbine:
+                DO rseg = 1, nsegs(ring,inot)
+!
+!--                !-----------------------------------------------------------!
+!--                !-- Determine coordinates of the ring segments            --!
+!--                !-----------------------------------------------------------!
+!
+!--                Determine angle of ring segment towards zero degree angle of
+!--                rotor system (at zero degree rotor direction vectors aligned
+!--                with y-axis):
+                   phi_rotor = rseg * 2.0_wp * pi / nsegs(ring,inot)
+                   cos_rot   = COS( phi_rotor )
+                   sin_rot   = SIN( phi_rotor )
+
+!--                Now the direction vectors can be determined with respect to
+!--                the yaw and tilt angle:
+                   re(1) = cos_rot * sin_yaw
+                   re(2) = cos_rot * cos_yaw    
+                   re(3) = sin_rot
+
+                   rote = MATMUL( rot_coord_trans(inot,:,:), re )
+!
+!--                Coordinates of the single segments (center points):
+                   rbx(ring,rseg) = rcx(inot) + cur_r * rote(1)
+                   rby(ring,rseg) = rcy(inot) + cur_r * rote(2)
+                   rbz(ring,rseg) = rcz(inot) + cur_r * rote(3)
+
+!--                !-----------------------------------------------------------!
+!--                !-- Interpolation of the velocity components from the     --!
+!--                !-- cartesian grid point to the coordinates of each ring  --!
+!--                !-- segment (follows a method used in the particle model) --!
+!--                !-----------------------------------------------------------!
+
+                   u_int(inot,ring,rseg)     = 0.0_wp
+                   u_int_1_l(inot,ring,rseg) = 0.0_wp
+
+                   v_int(inot,ring,rseg)     = 0.0_wp
+                   v_int_1_l(inot,ring,rseg) = 0.0_wp
+
+                   w_int(inot,ring,rseg)     = 0.0_wp
+                   w_int_1_l(inot,ring,rseg) = 0.0_wp
+
+!
+!--                Interpolation of the u-component:
+
+                   ii =   rbx(ring,rseg) * ddx
+                   jj = ( rby(ring,rseg) - 0.5_wp * dy ) * ddy
+                   kk = ( rbz(ring,rseg) + 0.5_wp * dz(1) ) / dz(1)
+!
+!--                Interpolate only if all required information is available on
+!--                the current PE:
+                   IF ( ( ii >= nxl )  .AND.  ( ii <= nxr ) )  THEN
+                      IF ( ( jj >= nys )  .AND.  ( jj <= nyn ) )  THEN
+
+                         aa = ( ( ii + 1          ) * dx - rbx(ring,rseg) ) *  &
+                              ( ( jj + 1 + 0.5_wp ) * dy - rby(ring,rseg) )
+                         bb = ( rbx(ring,rseg) - ii * dx )                  *  &
+                              ( ( jj + 1 + 0.5_wp ) * dy - rby(ring,rseg) )
+                         cc = ( ( ii+1            ) * dx - rbx(ring,rseg) ) *  &
+                              ( rby(ring,rseg) - ( jj + 0.5_wp ) * dy )
+                         dd = ( rbx(ring,rseg) -              ii * dx )     *  &
+                              ( rby(ring,rseg) - ( jj + 0.5_wp ) * dy ) 
+                         gg = dx * dy
+
+                         u_int_l = ( aa * u(kk,jj,ii)     +                    &
+                                     bb * u(kk,jj,ii+1)   +                    &
+                                     cc * u(kk,jj+1,ii)   +                    &
+                                     dd * u(kk,jj+1,ii+1)                      &
+                                   ) / gg
+
+                         u_int_u = ( aa * u(kk+1,jj,ii)     +                  &
+                                     bb * u(kk+1,jj,ii+1)   +                  &
+                                     cc * u(kk+1,jj+1,ii)   +                  &
+                                     dd * u(kk+1,jj+1,ii+1)                    &
+                                   ) / gg
+
+                         u_int_1_l(inot,ring,rseg) = u_int_l          +        &
+                                     ( rbz(ring,rseg) - zu(kk) ) / dz(1) *     &
+                                     ( u_int_u - u_int_l )
+
+                      ELSE 
+                         u_int_1_l(inot,ring,rseg) = 0.0_wp
+                      ENDIF
+                   ELSE
+                      u_int_1_l(inot,ring,rseg) = 0.0_wp
+                   ENDIF
+
+
+!
+!--                Interpolation of the v-component:
+                   ii = ( rbx(ring,rseg) - 0.5_wp * dx ) * ddx
+                   jj =   rby(ring,rseg)                 * ddy
+                   kk = ( rbz(ring,rseg) + 0.5_wp * dz(1) ) / dz(1) 
+!
+!--                Interpolate only if all required information is available on
+!--                the current PE:
+                   IF ( ( ii >= nxl )  .AND.  ( ii <= nxr ) )  THEN
+                      IF ( ( jj >= nys )  .AND.  ( jj <= nyn ) )  THEN
+
+                         aa = ( ( ii + 1 + 0.5_wp ) * dx - rbx(ring,rseg) ) *  &
+                              ( ( jj + 1 )          * dy - rby(ring,rseg) )
+                         bb = ( rbx(ring,rseg)     - ( ii + 0.5_wp ) * dx ) *  &
+                              ( ( jj + 1 ) * dy          - rby(ring,rseg) )
+                         cc = ( ( ii + 1 + 0.5_wp ) * dx - rbx(ring,rseg) ) *  &
+                              ( rby(ring,rseg)           -        jj * dy )
+                         dd = ( rbx(ring,rseg)     - ( ii + 0.5_wp ) * dx ) *  &
+                              ( rby(ring,rseg)           -        jj * dy )
+                         gg = dx * dy
+
+                         v_int_l = ( aa * v(kk,jj,ii)     +                    &
+                                     bb * v(kk,jj,ii+1)   +                    &
+                                     cc * v(kk,jj+1,ii)   +                    &
+                                     dd * v(kk,jj+1,ii+1)                      &
+                                   ) / gg
+
+                         v_int_u = ( aa * v(kk+1,jj,ii)     +                  &
+                                     bb * v(kk+1,jj,ii+1)   +                  &
+                                     cc * v(kk+1,jj+1,ii)   +                  &
+                                     dd * v(kk+1,jj+1,ii+1)                    &
+                                  ) / gg
+
+                         v_int_1_l(inot,ring,rseg) = v_int_l +                 &
+                                     ( rbz(ring,rseg) - zu(kk) ) / dz(1) *     &
+                                     ( v_int_u - v_int_l )
+
+                      ELSE
+                         v_int_1_l(inot,ring,rseg) = 0.0_wp
+                      ENDIF
+                   ELSE
+                      v_int_1_l(inot,ring,rseg) = 0.0_wp
+                   ENDIF
+
+
+!
+!--                Interpolation of the w-component:
+                   ii = ( rbx(ring,rseg) - 0.5_wp * dx ) * ddx
+                   jj = ( rby(ring,rseg) - 0.5_wp * dy ) * ddy
+                   kk =   rbz(ring,rseg)                 / dz(1)
+!
+!--                Interpolate only if all required information is available on
+!--                the current PE:
+                   IF ( ( ii >= nxl )  .AND.  ( ii <= nxr ) )  THEN
+                      IF ( ( jj >= nys )  .AND.  ( jj <= nyn ) )  THEN
+
+                         aa = ( ( ii + 1 + 0.5_wp ) * dx - rbx(ring,rseg) ) *  &
+                              ( ( jj + 1 + 0.5_wp ) * dy - rby(ring,rseg) )
+                         bb = ( rbx(ring,rseg)     - ( ii + 0.5_wp ) * dx ) *  &
+                              ( ( jj + 1 + 0.5_wp ) * dy - rby(ring,rseg) )
+                         cc = ( ( ii + 1 + 0.5_wp ) * dx - rbx(ring,rseg) ) *  &
+                              ( rby(ring,rseg)     - ( jj + 0.5_wp ) * dy )
+                         dd = ( rbx(ring,rseg)     - ( ii + 0.5_wp ) * dx ) *  &
+                              ( rby(ring,rseg)     - ( jj + 0.5_wp ) * dy )
+                         gg = dx * dy
+
+                         w_int_l = ( aa * w(kk,jj,ii)     +                    &
+                                     bb * w(kk,jj,ii+1)   +                    &
+                                     cc * w(kk,jj+1,ii)   +                    &
+                                     dd * w(kk,jj+1,ii+1)                      &
+                                   ) / gg
+
+                         w_int_u = ( aa * w(kk+1,jj,ii)     +                  &
+                                     bb * w(kk+1,jj,ii+1)   +                  &
+                                     cc * w(kk+1,jj+1,ii)   +                  &
+                                     dd * w(kk+1,jj+1,ii+1)                    &
+                                    ) / gg
+
+                         w_int_1_l(inot,ring,rseg) = w_int_l +                 &
+                                     ( rbz(ring,rseg) - zw(kk) ) / dz(1) *     &
+                                     ( w_int_u - w_int_l )
+                      ELSE
+                         w_int_1_l(inot,ring,rseg) = 0.0_wp
+                      ENDIF
+                   ELSE
+                      w_int_1_l(inot,ring,rseg) = 0.0_wp
+                   ENDIF
+
+                ENDDO
+             ENDDO
+
+          ENDDO
+
+!
+!--       Exchange between PEs (information required on each PE):
+#if defined( __parallel )
+          CALL MPI_ALLREDUCE( u_int_1_l, u_int, nturbines * MAXVAL(nrings) *   &
+                              MAXVAL(nsegs), MPI_REAL, MPI_SUM, comm2d, ierr )
+          CALL MPI_ALLREDUCE( v_int_1_l, v_int, nturbines * MAXVAL(nrings) *   &
+                              MAXVAL(nsegs), MPI_REAL, MPI_SUM, comm2d, ierr )
+          CALL MPI_ALLREDUCE( w_int_1_l, w_int, nturbines * MAXVAL(nrings) *   &
+                              MAXVAL(nsegs), MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+          u_int = u_int_1_l
+          v_int = v_int_1_l
+          w_int = w_int_1_l
+#endif
+
+
+!
+!--       Loop over number of turbines:
+
+          DO inot = 1, nturbines
+pit_loop: DO
+
+             IF ( pitch_sw )  THEN
+                torque_total(inot) = 0.0_wp
+                thrust_rotor(inot) = 0.0_wp
+                pitch_add(inot)    = pitch_add(inot) + 0.25_wp
+!                 IF ( myid == 0 ) PRINT*, 'Pitch', inot, pitch_add(inot)
+             ELSE
+                cos_yaw = COS(phi_yaw(inot))
+                sin_yaw = SIN(phi_yaw(inot))
+                IF ( pitch_control )  THEN
+                   pitch_add(inot) = MAX(pitch_add_old(inot) - pitch_rate *    &
+                                         dt_3d , 0.0_wp )
+                ENDIF
+             ENDIF
+
+!
+!--          Loop over rings of each turbine:
+             DO ring = 1, nrings(inot)
+!
+!--             Determine distance between each ring (center) and the hub:
+                cur_r = (ring - 0.5_wp) * delta_r(inot)
+!
+!--             Loop over segments of each ring of each turbine:
+                DO rseg = 1, nsegs(ring,inot)
+!
+!--                Determine angle of ring segment towards zero degree angle of
+!--                rotor system (at zero degree rotor direction vectors aligned
+!--                with y-axis):
+                   phi_rotor = rseg * 2.0_wp * pi / nsegs(ring,inot)
+                   cos_rot   = COS(phi_rotor)
+                   sin_rot   = SIN(phi_rotor)
+!
+!--                Now the direction vectors can be determined with respect to
+!--                the yaw and tilt angle:
+                   re(1) = cos_rot * sin_yaw
+                   re(2) = cos_rot * cos_yaw
+                   re(3) = sin_rot
+
+!                  The current unit vector in azimuthal direction:                         
+                   rea(1) = - sin_rot * sin_yaw
+                   rea(2) = - sin_rot * cos_yaw
+                   rea(3) =   cos_rot
+
+!
+!--                To respect the yawing angle for the calculations of
+!--                velocities and forces the unit vectors perpendicular to the
+!--                rotor area in direction of the positive yaw angle are defined:
+                   ren(1) =   cos_yaw
+                   ren(2) = - sin_yaw
+                   ren(3) = 0.0_wp
+!
+!--                Multiplication with the coordinate transformation matrix
+!--                gives the final unit vector with consideration of the rotor
+!--                tilt:
+                   rote = MATMUL( rot_coord_trans(inot,:,:), re )
+                   rota = MATMUL( rot_coord_trans(inot,:,:), rea )
+                   rotn = MATMUL( rot_coord_trans(inot,:,:), ren )
+!
+!--                Coordinates of the single segments (center points):
+                   rbx(ring,rseg) = rcx(inot) + cur_r * rote(1)
+
+                   rby(ring,rseg) = rcy(inot) + cur_r * rote(2)
+
+                   rbz(ring,rseg) = rcz(inot) + cur_r * rote(3)
+
+!
+!--                !-----------------------------------------------------------!
+!--                !-- Calculation of various angles and relative velocities --!
+!--                !-----------------------------------------------------------!
+!
+!--                In the following the 3D-velocity field is projected its
+!--                components perpendicular and parallel to the rotor area
+!--                The calculation of forces will be done in the rotor-
+!--                coordinates y' and z.
+!--                The yaw angle will be reintroduced when the force is applied
+!--                on the hydrodynamic equations
+!
+!--                Projection of the xy-velocities relative to the rotor area
+!
+!--                Velocity perpendicular to the rotor area:
+                   u_rot = u_int(inot,ring,rseg)*rotn(1) +                     &
+                   v_int(inot,ring,rseg)*rotn(2) +                             &
+                   w_int(inot,ring,rseg)*rotn(3)
+!
+!--                Projection of the 3D-velocity vector in the azimuthal
+!--                direction:
+                   vtheta(rseg) = rota(1) * u_int(inot,ring,rseg) +            & 
+                                  rota(2) * v_int(inot,ring,rseg) +            &
+                                  rota(3) * w_int(inot,ring,rseg)
+!
+!--                Determination of the angle phi_rel between the rotor plane
+!--                and the direction of the flow relative to the rotor:
+
+                   phi_rel(rseg) = ATAN( u_rot /                               &
+                                         ( omega_rot(inot) * cur_r -           &
+                                           vtheta(rseg) ) )
+
+!
+!--                Interpolation of the local pitch angle from tabulated values
+!--                to the current radial position:
+
+                   lct=minloc(ABS(cur_r-lrd))
+                   rad_d=cur_r-lrd(lct)
+                   
+                   IF (cur_r == 0.0_wp) THEN
+                      alpha_attack(rseg) = 0.0_wp
+                   ELSE IF (cur_r >= lrd(size(ard))) THEN
+                      alpha_attack(rseg) = ( ard(size(ard)) +                  &
+                                             ard(size(ard)-1) ) / 2.0_wp
+                   ELSE 
+                      alpha_attack(rseg) = ( ard(lct(1)) *  &
+                                             ( ( lrd(lct(1)+1) - cur_r ) /     &
+                                               ( lrd(lct(1)+1) - lrd(lct(1)) ) &
+                                             ) ) + ( ard(lct(1)+1) *           &
+                                             ( ( cur_r - lrd(lct(1)) ) /       &
+                                               ( lrd(lct(1)+1) - lrd(lct(1)) ) ) )
+                   ENDIF
+
+!
+!--                In Fortran radian instead of degree is used as unit for all
+!--                angles. Therefore, a transformation from angles given in
+!--                degree to angles given in radian is necessary here:
+                   alpha_attack(rseg) = alpha_attack(rseg) *                   &
+                                        ( (2.0_wp*pi) / 360.0_wp )
+!
+!--                Substraction of the local pitch angle to obtain the local
+!--                angle of attack:
+                   alpha_attack(rseg) = phi_rel(rseg) - alpha_attack(rseg)
+!
+!--                Preliminary transformation back from angles given in radian
+!--                to angles given in degree:
+                   alpha_attack(rseg) = alpha_attack(rseg) *                   &
+                                        ( 360.0_wp / (2.0_wp*pi) )
+!
+!--                Correct with collective pitch angle:
+                   alpha_attack(rseg) = alpha_attack(rseg) - pitch_add(inot)
+
+!
+!--                Determination of the magnitude of the flow velocity relative
+!--                to the rotor:
+                   vrel(rseg) = SQRT( u_rot**2 +                               &
+                                      ( omega_rot(inot) * cur_r -              &
+                                        vtheta(rseg) )**2 )
+
+!
+!--                !-----------------------------------------------------------!
+!--                !-- Interpolation of chord as well as lift and drag       --!
+!--                !-- coefficients from tabulated values                    --!
+!--                !-----------------------------------------------------------!
+
+!
+!--                Interpolation of the chord_length from tabulated values to
+!--                the current radial position:
+
+                   IF (cur_r == 0.0_wp) THEN
+                      chord(rseg) = 0.0_wp
+                   ELSE IF (cur_r >= lrd(size(crd))) THEN
+                      chord(rseg) = (crd(size(crd)) + ard(size(crd)-1)) / 2.0_wp
+                   ELSE 
+                      chord(rseg) = ( crd(lct(1)) *                            &
+                            ( ( lrd(lct(1)+1) - cur_r ) /                      &
+                              ( lrd(lct(1)+1) - lrd(lct(1)) ) ) ) +            &
+                            ( crd(lct(1)+1) *                                  &
+                            ( ( cur_r-lrd(lct(1)) ) /                          &
+                              ( lrd(lct(1)+1) - lrd(lct(1)) ) ) )
+                   ENDIF
+
+!
+!--                Determine index of current angle of attack, needed for
+!--                finding the appropriate interpolated values of the lift and
+!--                drag coefficients (-180.0 degrees = 1, +180.0 degrees = 3601,
+!--                so one index every 0.1 degrees):
+                   iialpha = CEILING( ( alpha_attack(rseg) + 180.0_wp )        &
+                                      * ( 1.0_wp / accu_cl_cd_tab ) ) + 1.0_wp
+!
+!--                Determine index of current radial position, needed for
+!--                finding the appropriate interpolated values of the lift and
+!--                drag coefficients (one index every 0.1 m):
+                   iir = CEILING( cur_r * 10.0_wp )
+!
+!--                Read in interpolated values of the lift and drag coefficients
+!--                for the current radial position and angle of attack:
+                   turb_cl(rseg) = turb_cl_tab(iialpha,iir)
+                   turb_cd(rseg) = turb_cd_tab(iialpha,iir)
+
+!
+!--                Final transformation back from angles given in degree to
+!--                angles given in radian:
+                   alpha_attack(rseg) = alpha_attack(rseg) *                   &
+                                        ( (2.0_wp*pi) / 360.0_wp )
+
+                   IF ( tl_cor )  THEN
+                   
+!--                  Tip loss correction following Schito
+!--                  Schito applies the tip loss correction only to the lift force
+!--                  Therefore, the tip loss correction is only applied to the lift 
+!--                  coefficient and not to the drag coefficient in our case 
+!--                  
+                     tl_factor = ( 2.0 / pi ) *                                &
+                          ACOS( EXP( -1.0 * ( 3.0 * ( rr(inot) - cur_r ) /     &
+                          ( 2.0 * cur_r * abs( sin( phi_rel(rseg) ) ) ) ) ) )
+                          
+                     turb_cl(rseg)  = tl_factor * turb_cl(rseg)                                  
+                                 
+                   ENDIF               
+!
+!--                !-----------------------------------------------------!
+!--                !-- Calculation of the forces                       --!
+!--                !-----------------------------------------------------!
+
+!
+!--                Calculate the pre_factor for the thrust and torque forces:
+
+                   pre_factor = 0.5_wp * (vrel(rseg)**2) * 3.0_wp *  &
+                                chord(rseg) * delta_r(inot) / nsegs(ring,inot)
+
+!
+!--                Calculate the thrust force (x-component of the total force)
+!--                for each ring segment:
+                   thrust_seg(rseg) = pre_factor *                             &
+                                      ( turb_cl(rseg) * COS(phi_rel(rseg)) +   &
+                                        turb_cd(rseg) * SIN(phi_rel(rseg)) )
+
+!
+!--                Determination of the second of the additional forces acting
+!--                on the flow in the azimuthal direction: force vector as basis
+!--                for torque (torque itself would be the vector product of the
+!--                radius vector and the force vector):
+                   torque_seg = pre_factor *                                   &
+                                ( turb_cl(rseg) * SIN(phi_rel(rseg)) -         &
+                                  turb_cd(rseg) * COS(phi_rel(rseg)) )
+!
+!--                Decomposition of the force vector into two parts:
+!--                One acting along the y-direction and one acting along the
+!--                z-direction of the rotor coordinate system:
+
+                   torque_seg_y(rseg) = -torque_seg * sin_rot
+                   torque_seg_z(rseg) =  torque_seg * cos_rot
+
+!
+!--                Add the segment thrust to the thrust of the whole rotor
+                   thrust_rotor(inot) = thrust_rotor(inot) +                   &
+                                        thrust_seg(rseg)                   
+                   
+
+                   torque_total(inot) = torque_total(inot) + (torque_seg * cur_r)
+
+                ENDDO   !-- end of loop over ring segments
+
+!
+!--             Restore the forces into arrays containing all the segments of
+!--             each ring:
+                thrust_ring(ring,:)   = thrust_seg(:)
+                torque_ring_y(ring,:) = torque_seg_y(:)
+                torque_ring_z(ring,:) = torque_seg_z(:)
+
+
+             ENDDO   !-- end of loop over rings
+
+
+             CALL cpu_log( log_point_s(62), 'wtm_controller', 'start' )
+
+             
+             IF ( speed_control )  THEN
+!
+!--             Calculation of the current generator speed for rotor speed control
+             
+!                                     
+!--             The acceleration of the rotor speed is calculated from 
+!--             the force balance of the accelerating torque
+!--             and the torque of the rotating rotor and generator
+                om_rate = ( torque_total(inot) * air_dens * gear_eff -         &
+                            gear_ratio * torque_gen_old(inot) ) /              &
+                          ( inertia_rot +                                      & 
+                            gear_ratio * gear_ratio * inertia_gen ) * dt_3d
+
+!
+!--             The generator speed is given by the product of gear gear_ratio
+!--             and rotor speed
+                omega_gen(inot) = gear_ratio * ( omega_rot(inot) + om_rate )     
+             
+             ENDIF
+             
+             IF ( pitch_control )  THEN
+
+!
+!--             If the current generator speed is above rated, the pitch is not
+!--             saturated and the change from the last time step is within the 
+!--             maximum pitch rate, then the pitch loop is repeated with a pitch
+!--             gain
+                IF ( (  omega_gen(inot)  > rated_genspeed   )  .AND.           &
+                     ( pitch_add(inot) < 25.0_wp ) .AND.                       &
+                     ( pitch_add(inot) < pitch_add_old(inot) +                 & 
+                       pitch_rate * dt_3d  ) ) THEN 
+                   pitch_sw = .TRUE.
+!
+!--                Go back to beginning of pit_loop                   
+                   CYCLE pit_loop
+                ENDIF
+                
+!
+!--             The current pitch is saved for the next time step
+                pitch_add_old(inot) = pitch_add(inot)
+                pitch_sw = .FALSE.
+             ENDIF
+             EXIT pit_loop             
+          ENDDO pit_loop ! Recursive pitch control loop
+
+
+!
+!--          Call the rotor speed controller
+             
+             IF ( speed_control )  THEN
+!
+!--             Find processor at i_hub, j_hub             
+                IF ( ( nxl <= i_hub(inot) )  .AND.  ( nxr >= i_hub(inot) ) )   &
+                   THEN
+                   IF ( ( nys <= j_hub(inot) )  .AND.  ( nyn >= j_hub(inot) ) )&
+                      THEN
+                      CALL wtm_speed_control( inot )
+                   ENDIF
+                ENDIF
+                               
+             ENDIF
+
+
+             CALL cpu_log( log_point_s(62), 'wtm_controller', 'stop' )
+
+             CALL cpu_log( log_point_s(63), 'wtm_smearing', 'start' )
+
+
+!--          !-----------------------------------------------------------------!
+!--          !--                  Regularization kernel                      --!
+!--          !-- Smearing of the forces and interpolation to cartesian grid  --!
+!--          !-----------------------------------------------------------------!
+!
+!--          The aerodynamic blade forces need to be distributed smoothly on
+!--          several mesh points in order to avoid singular behaviour
+!
+!--          Summation over sum of weighted forces. The weighting factor
+!--          (calculated in user_init) includes information on the distance
+!--          between the center of the grid cell and the rotor segment under
+!--          consideration
+!
+!--          To save computing time, apply smearing only for the relevant part
+!--          of the model domain:
+!
+!--
+!--          Calculation of the boundaries:
+             i_smear(inot) = CEILING( ( rr(inot) * ABS( roty(inot,1) ) +       &
+                                        eps_min ) / dx )
+             j_smear(inot) = CEILING( ( rr(inot) * ABS( roty(inot,2) ) +       &
+                                        eps_min ) / dy )
+
+             DO i = MAX( nxl, i_hub(inot) - i_smear(inot) ),                   &
+                    MIN( nxr, i_hub(inot) + i_smear(inot) )
+                DO j = MAX( nys, j_hub(inot) - j_smear(inot) ),                &
+                        MIN( nyn, j_hub(inot) + j_smear(inot) )
+!                    DO k = MAX( nzb_u_inner(j,i)+1, k_hub(inot) - k_smear(inot) ), &
+!                                 k_hub(inot) + k_smear(inot)
+                   DO  k = nzb+1, k_hub(inot) + k_smear(inot)
+                      DO ring = 1, nrings(inot)
+                         DO rseg = 1, nsegs(ring,inot)
+!
+!--                         Predetermine flag to mask topography
+                            flag = MERGE( 1.0_wp, 0.0_wp, BTEST( wall_flags_0(k,j,i), 1 ) )
+      
+!
+!--                         Determine the square of the distance between the
+!--                         current grid point and each rotor area segment:
+                            dist_u_3d = ( i * dx               - rbx(ring,rseg) )**2 + &
+                                        ( j * dy + 0.5_wp * dy - rby(ring,rseg) )**2 + &
+                                        ( k * dz(1) - 0.5_wp * dz(1) - rbz(ring,rseg) )**2
+                            dist_v_3d = ( i * dx + 0.5_wp * dx - rbx(ring,rseg) )**2 + &
+                                        ( j * dy               - rby(ring,rseg) )**2 + &
+                                        ( k * dz(1) - 0.5_wp * dz(1) - rbz(ring,rseg) )**2
+                            dist_w_3d = ( i * dx + 0.5_wp * dx - rbx(ring,rseg) )**2 + &
+                                        ( j * dy + 0.5_wp * dy - rby(ring,rseg) )**2 + &
+                                        ( k * dz(1)               - rbz(ring,rseg) )**2
+
+!
+!--                         3D-smearing of the forces with a polynomial function
+!--                         (much faster than the old Gaussian function), using
+!--                         some parameters that have been calculated in user_init.
+!--                         The function is only similar to Gaussian function for
+!--                         squared distances <= eps_min2:
+                            IF ( dist_u_3d <= eps_min2 ) THEN
+                               thrust(k,j,i) = thrust(k,j,i) +                     &
+                                               thrust_ring(ring,rseg) *            &
+                                               ( ( pol_a * dist_u_3d - pol_b ) *   & 
+                                                dist_u_3d + 1.0_wp ) * eps_factor *&
+                                                                       flag
+                            ENDIF
+                            IF ( dist_v_3d <= eps_min2 ) THEN
+                               torque_y(k,j,i) = torque_y(k,j,i) +                    &
+                                                 torque_ring_y(ring,rseg) *           &
+                                                 ( ( pol_a * dist_v_3d - pol_b ) *    &
+                                                  dist_v_3d + 1.0_wp ) * eps_factor * &
+                                                                         flag
+                            ENDIF
+                            IF ( dist_w_3d <= eps_min2 ) THEN
+                               torque_z(k,j,i) = torque_z(k,j,i) +                    &
+                                                 torque_ring_z(ring,rseg) *           &
+                                                 ( ( pol_a * dist_w_3d - pol_b ) *    &
+                                                  dist_w_3d + 1.0_wp ) * eps_factor * &
+                                                                         flag
+                            ENDIF
+
+                         ENDDO  ! End of loop over rseg
+                      ENDDO     ! End of loop over ring
+              
+!
+!--                   Rotation of force components:
+                      rot_tend_x(k,j,i) = rot_tend_x(k,j,i) + (                &
+                                      thrust(k,j,i)*rotx(inot,1) +             &
+                                      torque_y(k,j,i)*roty(inot,1) +           &
+                                      torque_z(k,j,i)*rotz(inot,1)             &
+                                                              ) * flag
+                                
+                      rot_tend_y(k,j,i) = rot_tend_y(k,j,i) + (                &
+                                      thrust(k,j,i)*rotx(inot,2) +             &
+                                      torque_y(k,j,i)*roty(inot,2) +           &
+                                      torque_z(k,j,i)*rotz(inot,2)             &
+                                                              ) * flag
+                                
+                      rot_tend_z(k,j,i) = rot_tend_z(k,j,i) + (                &
+                                      thrust(k,j,i)*rotx(inot,3) +             &
+                                      torque_y(k,j,i)*roty(inot,3) +           &
+                                      torque_z(k,j,i)*rotz(inot,3)             &
+                                                              ) * flag                    
+
+                   ENDDO        ! End of loop over k
+                ENDDO           ! End of loop over j
+             ENDDO              ! End of loop over i
+
+             CALL cpu_log( log_point_s(63), 'wtm_smearing', 'stop' )          
+                   
+          ENDDO                  !-- end of loop over turbines
+
+                
+          IF ( yaw_control )  THEN
+!
+!--          Allocate arrays for yaw control at first call
+!--          Can't be allocated before dt_3d is set
+             IF ( start_up )  THEN
+                WDLON = NINT( 30.0_wp / dt_3d )  ! 30s running mean array
+                ALLOCATE( wd30(1:nturbines,1:WDLON) )
+                wd30 = 999.0_wp                  ! Set to dummy value
+                ALLOCATE( wd30_l(1:WDLON) )
+                
+                WDSHO = NINT( 2.0_wp / dt_3d )   ! 2s running mean array
+                ALLOCATE( wd2(1:nturbines,1:WDSHO) )
+                wd2 = 999.0_wp                   ! Set to dummy value
+                ALLOCATE( wd2_l(1:WDSHO) )
+                start_up = .FALSE.
+             ENDIF          
+
+!
+!--          Calculate the inflow wind speed 
+!--
+!--          Loop over number of turbines:
+             DO inot = 1, nturbines
+!
+!--             Find processor at i_hub, j_hub             
+                IF ( ( nxl <= i_hub(inot) )  .AND.  ( nxr >= i_hub(inot) ) )   &
+                   THEN
+                   IF ( ( nys <= j_hub(inot) )  .AND.  ( nyn >= j_hub(inot) ) )&
+                      THEN
+
+                      u_inflow_l(inot) = u(k_hub(inot),j_hub(inot),i_hub(inot))
+
+                      wdir_l(inot) = -1.0_wp * ATAN2(                          &
+                         0.5_wp * ( v(k_hub(inot),j_hub(inot),i_hub(inot)+1) + &
+                                    v(k_hub(inot),j_hub(inot),i_hub(inot)) ) , &
+                         0.5_wp * ( u(k_hub(inot),j_hub(inot)+1,i_hub(inot)) + &
+                                    u(k_hub(inot),j_hub(inot),i_hub(inot)) ) )
+
+                      CALL wtm_yawcontrol( inot )
+
+                      phi_yaw_l(inot) = phi_yaw(inot)
+                      
+                   ENDIF
+                ENDIF
+                   
+             ENDDO                                 !-- end of loop over turbines
+
+!
+!--          Transfer of information to the other cpus
+#if defined( __parallel )         
+             CALL MPI_ALLREDUCE( u_inflow_l, u_inflow, nturbines, MPI_REAL,    &
+                                 MPI_SUM, comm2d, ierr )
+             CALL MPI_ALLREDUCE( wdir_l, wdir, nturbines, MPI_REAL, MPI_SUM,   &
+                                 comm2d, ierr )
+             CALL MPI_ALLREDUCE( phi_yaw_l, phi_yaw, nturbines, MPI_REAL,      &
+                                 MPI_SUM, comm2d, ierr )
+#else
+             u_inflow = u_inflow_l
+             wdir     = wdir_l
+             phi_yaw  = phi_yaw_l
+             
+             
+#endif
+             DO inot = 1, nturbines
+!             
+!--             Update rotor orientation                
+                CALL wtm_rotate_rotor( inot )
+
+             ENDDO ! End of loop over turbines
+                           
+          ENDIF  ! end of yaw control 
+          
+          IF ( speed_control )  THEN
+!
+!--          Transfer of information to the other cpus
+!              CALL MPI_ALLREDUCE( omega_gen, omega_gen_old, nturbines,        &
+!                                  MPI_REAL,MPI_SUM, comm2d, ierr )
+#if defined( __parallel )    
+             CALL MPI_ALLREDUCE( torque_gen, torque_gen_old, nturbines,        &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+             CALL MPI_ALLREDUCE( omega_rot_l, omega_rot, nturbines,            &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+             CALL MPI_ALLREDUCE( omega_gen_f, omega_gen_f_old, nturbines,      &
+                                 MPI_REAL, MPI_SUM, comm2d, ierr )
+#else
+             torque_gen_old  = torque_gen
+             omega_rot       = omega_rot_l
+             omega_gen_f_old = omega_gen_f
+#endif
+            
+          ENDIF
+
+          DO inot = 1, nturbines
+
+             IF ( myid == 0 ) THEN
+                IF ( openfile_turb_mod(400+inot)%opened )  THEN
+                   WRITE ( 400+inot, 106 ) simulated_time, omega_rot(inot),    &
+                             omega_gen(inot), torque_gen_old(inot),            &
+                             torque_total(inot), pitch_add(inot),              &
+                             torque_gen_old(inot)*omega_gen(inot)*gen_eff,     &
+                             torque_total(inot)*omega_rot(inot)*air_dens,      &
+                             thrust_rotor(inot),                               & 
+                             wdir(inot)*180.0_wp/pi,                           &
+                             (phi_yaw(inot))*180.0_wp/pi                   
+                             
+                ELSE
+
+                   WRITE ( turbine_id,'(A2,I2.2)')  '_T', inot
+                   OPEN ( 400+inot, FILE=( 'WTM_OUTPUT_DATA' //                &
+                                           TRIM( coupling_char ) //            &
+                                           turbine_id ), FORM='FORMATTED' )
+                   WRITE ( 400+inot, 105 ) inot
+                   WRITE ( 400+inot, 106 ) simulated_time, omega_rot(inot),    &
+                             omega_gen(inot), torque_gen_old(inot),            &
+                             torque_total(inot), pitch_add(inot),              &
+                             torque_gen_old(inot)*omega_gen(inot)*gen_eff,     &
+                             torque_total(inot)*omega_rot(inot)*air_dens,      &
+                             thrust_rotor(inot),                               & 
+                             wdir(inot)*180.0_wp/pi,                           &                   
+                             (phi_yaw(inot))*180.0_wp/pi
+                ENDIF
+             ENDIF
+
+!--          Set open flag
+             openfile_turb_mod(400+inot)%opened = .TRUE.
+          ENDDO                                    !-- end of loop over turbines
+
+       ENDIF
+
+       CALL cpu_log( log_point_s(61), 'wtm_forces', 'stop' )
+       
+!
+!--    Formats
+       105 FORMAT ('Turbine control data for turbine ',I2,1X,':'/ &
+              &'----------------------------------------'/ &
+              &'   Time   RSpeed  GSpeed  ', &
+               'GenTorque  AeroTorque  Pitch  Power(Gen)  Power(Rot)  ',       &
+               'RotThrust  WDirection  YawOrient')
+
+       106 FORMAT (F9.3,2X,F7.3,2X,F7.2,2X,F9.1,3X,F9.1,1X,F6.2,2X,F10.1,2X,   &
+                   F10.1,1X,F9.1,2X,F7.2,1X,F7.2)
+
+
+    END SUBROUTINE wtm_forces
+
+    
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Yaw controller for the wind turbine model
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_yawcontrol( inot )
+    
+       USE kinds
+                
+       IMPLICIT NONE
+      
+       INTEGER(iwp)             :: inot
+       INTEGER(iwp)             :: i_wd_30
+       REAL(wp)                 :: missal
+
+       i_wd_30 = 0_iwp
+
+!  
+!--    The yaw controller computes a 30s running mean of the wind direction.
+!--    If the difference between turbine alignment and wind direction exceeds
+!--    5Â°, the turbine is yawed. The mechanism stops as soon as the 2s-running
+!--    mean of the missalignment is smaller than 0.5Â°.
+!--    Attention: If the timestep during the simulation changes significantly
+!--    the lengths of the running means change and it does not correspond to
+!--    30s/2s anymore.
+!--    ! Needs to be modified for these situations !
+!--    For wind from the east, the averaging of the wind direction could cause
+!--    problems and the yaw controller is probably flawed. -> Routine for
+!--    averaging needs to be improved!
+!
+!--    Check if turbine is not yawing
+       IF ( .NOT. doyaw(inot) )  THEN
+!
+!--       Write current wind direction into array
+          wd30_l    = wd30(inot,:)
+          wd30_l    = CSHIFT( wd30_l, SHIFT=-1 )
+          wd30_l(1) = wdir(inot)
+!
+!--       Check if array is full ( no more dummies )
+          IF ( .NOT. ANY( wd30_l == 999.) ) THEN 
+
+             missal = SUM( wd30_l ) / SIZE( wd30_l ) - phi_yaw(inot)
+!
+!--          Check if turbine is missaligned by more than max_miss
+             IF ( ABS( missal ) > max_miss )  THEN
+!
+!--             Check in which direction to yaw          
+                yawdir(inot) = SIGN( 1.0_wp, missal )
+!
+!--             Start yawing of turbine
+                phi_yaw(inot) = phi_yaw(inot) + yawdir(inot) * yaw_speed * dt_3d
+                doyaw(inot) = .TRUE.
+                wd30_l = 999.  ! fill with dummies again
+             ENDIF
+          ENDIF
+         
+          wd30(inot,:) = wd30_l
+
+!      
+!--    If turbine is already yawing:
+!--    Initialize 2 s running mean and yaw until the missalignment is smaller
+!--    than min_miss
+
+       ELSE
+!
+!--       Initialize 2 s running mean
+          wd2_l = wd2(inot,:)
+          wd2_l = CSHIFT( wd2_l, SHIFT = -1 )
+          wd2_l(1) = wdir(inot)
+!      
+!--       Check if array is full ( no more dummies )
+          IF ( .NOT. ANY( wd2_l == 999.0_wp ) ) THEN
+!
+!--          Calculate missalignment of turbine        
+             missal = SUM( wd2_l - phi_yaw(inot) ) / SIZE( wd2_l )
+!
+!--          Check if missalignment is still larger than 0.5 degree and if the
+!--          yaw direction is still right
+             IF ( ( ABS( missal ) > min_miss )  .AND.                          &
+                  ( yawdir(inot) == SIGN( 1.0_wp, missal ) ) )  THEN
+!
+!--             Continue yawing        
+                phi_yaw(inot) = phi_yaw(inot) + yawdir(inot) * yaw_speed * dt_3d
+             ELSE
+!
+!--             Stop yawing        
+                doyaw(inot) = .FALSE.
+                wd2_l = 999.0_wp ! fill with dummies again
+             ENDIF
+          ELSE
+!
+!--          Continue yawing
+             phi_yaw(inot) = phi_yaw(inot) + yawdir(inot) * yaw_speed * dt_3d
+          ENDIF
+      
+          wd2(inot,:) = wd2_l
+            
+       ENDIF
+     
+    END SUBROUTINE wtm_yawcontrol 
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialization of the speed control
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_init_speed_control
+
+
+       IMPLICIT NONE
+
+!
+!--    If speed control is set, remaining variables and control_parameters for 
+!--    the control algorithm are calculated
+!
+!--    Calculate slope constant for region 15
+       slope15   = ( slope2 * min_reg2 * min_reg2 ) / ( min_reg2 - min_reg15 )
+!
+!--    Calculate upper limit of slipage region
+       vs_sysp   = rated_genspeed / 1.1_wp
+!
+!--    Calculate slope of slipage region
+       slope25   = ( rated_power / rated_genspeed ) /                          &
+                   ( rated_genspeed - vs_sysp )
+!
+!--    Calculate lower limit of slipage region
+       min_reg25 = ( slope25 - SQRT( slope25 * ( slope25 - 4.0_wp *            &
+                                                 slope2 * vs_sysp ) ) ) /      &
+                   ( 2.0_wp * slope2 ) 
+!
+!--    Frequency for the simple low pass filter
+       Fcorner   = 0.25_wp
+! 
+!--    At the first timestep the torque is set to its maximum to prevent
+!--    an overspeeding of the rotor
+       IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN
+          torque_gen_old(:) = max_torque_gen
+       ENDIF  
+     
+    END SUBROUTINE wtm_init_speed_control
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Simple controller for the regulation of the rotor speed
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_speed_control( inot )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp)             :: inot
+       
+         
+
+!
+!--    The controller is based on the fortran script from Jonkman 
+!--    et al. 2009 "Definition of a 5 MW Reference Wind Turbine for
+!--    offshore system developement"
+
+!
+!--    The generator speed is filtered by a low pass filter 
+!--    for the control of the generator torque       
+       lp_coeff = EXP( -2.0_wp * 3.14_wp * dt_3d * Fcorner )
+       omega_gen_f(inot) = ( 1.0_wp - lp_coeff ) * omega_gen(inot) + lp_coeff *&
+                           omega_gen_f_old(inot)
+
+       IF ( omega_gen_f(inot) <= min_reg15 )  THEN
+!                        
+!--       Region 1: Generator torque is set to zero to accelerate the rotor:
+          torque_gen(inot) = 0
+       
+       ELSEIF ( omega_gen_f(inot) <= min_reg2 )  THEN
+!                        
+!--       Region 1.5: Generator torque is increasing linearly with rotor speed:
+          torque_gen(inot) = slope15 * ( omega_gen_f(inot) - min_reg15 )
+                         
+       ELSEIF ( omega_gen_f(inot) <= min_reg25 )  THEN
+!
+!--       Region 2: Generator torque is increased by the square of the generator
+!--                 speed to keep the TSR optimal:
+          torque_gen(inot) = slope2 * omega_gen_f(inot) * omega_gen_f(inot)
+       
+       ELSEIF ( omega_gen_f(inot) < rated_genspeed )  THEN
+!                        
+!--       Region 2.5: Slipage region between 2 and 3:
+          torque_gen(inot) = slope25 * ( omega_gen_f(inot) - vs_sysp )
+       
+       ELSE
+!                        
+!--       Region 3: Generator torque is antiproportional to the rotor speed to
+!--                 keep the power constant:
+          torque_gen(inot) = rated_power / omega_gen_f(inot)
+       
+       ENDIF
+!                        
+!--    Calculate torque rate and confine with a max
+       trq_rate = ( torque_gen(inot) - torque_gen_old(inot) ) / dt_3d
+       trq_rate = MIN( MAX( trq_rate, -1.0_wp * max_trq_rate ), max_trq_rate )
+!                        
+!--    Calculate new gen torque and confine with max torque                         
+       torque_gen(inot) = torque_gen_old(inot) + trq_rate * dt_3d
+       torque_gen(inot) = MIN( torque_gen(inot), max_torque_gen )                                             
+!
+!--    Overwrite values for next timestep                        
+       omega_rot_l(inot) = omega_gen(inot) / gear_ratio
+
+    
+    END SUBROUTINE wtm_speed_control    
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Application of the additional forces generated by the wind turbine on the 
+!> flow components (tendency terms)
+!> Call for all grid points
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_tendencies( component )
+
+    
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  component   !< prognostic variable (u,v,w)
+       INTEGER(iwp) ::  i           !< running index
+       INTEGER(iwp) ::  j           !< running index
+       INTEGER(iwp) ::  k           !< running index
+
+
+       SELECT CASE ( component )
+
+       CASE ( 1 )
+!
+!--       Apply the x-component of the force to the u-component of the flow:
+          IF ( simulated_time >= time_turbine_on )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, MAXVAL(k_hub) + MAXVAL(k_smear)
+!
+!--                   Calculate the thrust generated by the nacelle and the tower
+                      tend_nac_x = 0.5_wp * nac_cd_surf(k,j,i) *               &
+                                      SIGN( u(k,j,i)**2 , u(k,j,i) )     
+                      tend_tow_x   = 0.5_wp * tow_cd_surf(k,j,i) *             &
+                                         SIGN( u(k,j,i)**2 , u(k,j,i) ) 
+                                                
+                      tend(k,j,i) = tend(k,j,i) + ( - rot_tend_x(k,j,i)        &
+                                  - tend_nac_x - tend_tow_x )                  &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 1 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+       CASE ( 2 )
+!
+!--       Apply the y-component of the force to the v-component of the flow:
+          IF ( simulated_time >= time_turbine_on )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb+1, MAXVAL(k_hub) + MAXVAL(k_smear)
+                      tend_nac_y = 0.5_wp * nac_cd_surf(k,j,i) *               &
+                                         SIGN( v(k,j,i)**2 , v(k,j,i) )     
+                      tend_tow_y   = 0.5_wp * tow_cd_surf(k,j,i) *             &
+                                         SIGN( v(k,j,i)**2 , v(k,j,i) )                      
+                      tend(k,j,i) = tend(k,j,i) + ( - rot_tend_y(k,j,i)        &
+                                  - tend_nac_y - tend_tow_y )                  &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+       CASE ( 3 )
+!
+!--       Apply the z-component of the force to the w-component of the flow:
+          IF ( simulated_time >= time_turbine_on )  THEN
+             DO  i = nxlg, nxrg
+                DO  j = nysg, nyng
+                   DO  k = nzb+1,  MAXVAL(k_hub) + MAXVAL(k_smear)
+                      tend(k,j,i) = tend(k,j,i) - rot_tend_z(k,j,i)            &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+                   ENDDO
+                ENDDO
+             ENDDO
+          ENDIF
+
+
+       CASE DEFAULT
+
+          WRITE( message_string, * ) 'unknown prognostic variable: ', component
+          CALL message( 'wtm_tendencies', 'PA04??', 1, 2, 0, 6, 0 ) 
+
+       END SELECT
+
+
+    END SUBROUTINE wtm_tendencies
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Application of the additional forces generated by the wind turbine on the 
+!> flow components (tendency terms)
+!> Call for grid point i,j
+!------------------------------------------------------------------------------!
+    SUBROUTINE wtm_tendencies_ij( i, j, component )
+
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  component   !< prognostic variable (u,v,w)
+       INTEGER(iwp) ::  i           !< running index
+       INTEGER(iwp) ::  j           !< running index
+       INTEGER(iwp) ::  k           !< running index
+
+       SELECT CASE ( component )
+
+       CASE ( 1 )
+!
+!--       Apply the x-component of the force to the u-component of the flow:
+          IF ( simulated_time >= time_turbine_on )  THEN
+             DO  k = nzb+1,  MAXVAL(k_hub) + MAXVAL(k_smear)
+!
+!--             Calculate the thrust generated by the nacelle and the tower 
+                tend_nac_x = 0.5_wp * nac_cd_surf(k,j,i) *                     &
+                                   SIGN( u(k,j,i)**2 , u(k,j,i) )     
+                tend_tow_x   = 0.5_wp * tow_cd_surf(k,j,i) *                   &
+                                   SIGN( u(k,j,i)**2 , u(k,j,i) ) 
+                tend(k,j,i) = tend(k,j,i) + ( - rot_tend_x(k,j,i)              &
+                            - tend_nac_x - tend_tow_x )                        &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                            BTEST( wall_flags_0(k,j,i), 1 ) )
+             ENDDO
+          ENDIF
+
+       CASE ( 2 )
+!
+!--       Apply the y-component of the force to the v-component of the flow:
+          IF ( simulated_time >= time_turbine_on )  THEN
+             DO  k = nzb+1,  MAXVAL(k_hub) + MAXVAL(k_smear)
+                tend_nac_y = 0.5_wp * nac_cd_surf(k,j,i) *                     &
+                                   SIGN( v(k,j,i)**2 , v(k,j,i) )     
+                tend_tow_y   = 0.5_wp * tow_cd_surf(k,j,i) *                   &
+                                   SIGN( v(k,j,i)**2 , v(k,j,i) )                      
+                tend(k,j,i) = tend(k,j,i) + ( - rot_tend_y(k,j,i)              &
+                            - tend_nac_y - tend_tow_y )                        &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 2 ) )
+                ENDDO
+          ENDIF
+
+       CASE ( 3 )
+!
+!--       Apply the z-component of the force to the w-component of the flow:
+          IF ( simulated_time >= time_turbine_on )  THEN
+             DO  k = nzb+1,  MAXVAL(k_hub) + MAXVAL(k_smear)
+                tend(k,j,i) = tend(k,j,i) - rot_tend_z(k,j,i)                  &
+                                      * MERGE( 1.0_wp, 0.0_wp,                 &
+                                               BTEST( wall_flags_0(k,j,i), 3 ) )
+             ENDDO
+          ENDIF
+
+
+       CASE DEFAULT
+
+          WRITE( message_string, * ) 'unknown prognostic variable: ', component
+          CALL message( 'wtm_tendencies', 'PA04??', 1, 2, 0, 6, 0 ) 
+
+       END SELECT
+
+
+    END SUBROUTINE wtm_tendencies_ij
+
+ END MODULE wind_turbine_model_mod
Index: /palm/tags/release-6.0/SOURCE/wrd_write_string.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/wrd_write_string.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/wrd_write_string.f90	(revision 3477)
@@ -0,0 +1,56 @@
+!> @file user_last_actions.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Initial revision
+!
+!
+! Description:
+! ------------
+!> Calculates length of string and write the respective value together with the
+!> string into binary file(s) for restart runs
+!------------------------------------------------------------------------------!
+ 
+ SUBROUTINE wrd_write_string( string )
+
+
+    USE kinds
+
+
+    IMPLICIT NONE
+
+    CHARACTER (LEN=*), INTENT (IN) ::  string  !< for storing strings in case of writing/reading restart data
+
+    INTEGER(iwp) ::  length  !< integer that specifies the length of a string in case of writing/reading restart
+                             !< data
+
+
+    length = LEN_TRIM( string )
+
+    WRITE ( 14 )  length
+    WRITE ( 14 )  string(1:length)
+
+
+ END SUBROUTINE wrd_write_string
Index: /palm/tags/release-6.0/SOURCE/write_restart_data_mod.f90
===================================================================
--- /palm/tags/release-6.0/SOURCE/write_restart_data_mod.f90	(revision 3477)
+++ /palm/tags/release-6.0/SOURCE/write_restart_data_mod.f90	(revision 3477)
@@ -0,0 +1,1291 @@
+!> @file write_restart_data_mod.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Implementation of a new aerosol module salsa.
+! 
+! 3355 2018-10-16 14:03:34Z knoop
+! changes concerning modularization of ocean option
+! 
+! 3274 2018-09-24 15:42:55Z knoop
+! Modularization of all bulk cloud physics code components
+! 
+! 3065 2018-06-12 07:03:02Z Giersch
+! New parameters concerning vertical grid stretching have been added
+! 
+! 3004 2018-04-27 12:33:25Z Giersch
+! precipitation_rate_av removed
+! 
+! 3003 2018-04-23 10:22:58Z Giersch
+! z_i is also written out to use the last known inversion height from the 
+! initial run as the first inversion height which is written into the
+! run control file 
+! 
+! 2956 2018-04-10 11:01:03Z Giersch
+! spectrum_x and spectrum_y have been moved to global data
+! 
+! 2921 2018-03-22 15:05:23Z Giersch
+! spinup_time, day_of_year_init and time_utc_init are also written out now
+! 
+! 2912 2018-03-20 13:00:05Z knoop
+! Added gust module interface calls
+! 
+! 2894 2018-03-15 09:17:58Z Giersch
+! Initial revision 
+!
+!
+! Description:
+! ------------
+!> Writes restart data into binary file(s) for restart runs.
+!------------------------------------------------------------------------------!
+ MODULE write_restart_data_mod
+
+
+    USE control_parameters
+ 
+    USE kinds     
+
+    USE pegrid,                                                                &
+        ONLY:  myid, numprocs
+     
+
+    IMPLICIT NONE
+
+
+    INTERFACE wrd_global
+       MODULE PROCEDURE wrd_global
+    END INTERFACE wrd_global
+
+    INTERFACE wrd_local
+       MODULE PROCEDURE wrd_local
+    END INTERFACE wrd_local
+
+
+    PUBLIC wrd_local, wrd_global
+
+
+ CONTAINS
+
+
+! Description:
+! ------------
+!> Global data of control variables and arrays is written out for 
+!> restarts (binary format).
+!> This information is only written to the file opened by PE0.
+!------------------------------------------------------------------------------!
+    SUBROUTINE wrd_global
+
+
+       USE arrays_3d,                                                          &
+           ONLY:  inflow_damping_factor, mean_inflow_profiles, pt_init,        &
+                  q_init, ref_state, s_init, u_init, ug, v_init, vg
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY:  bulk_cloud_model, bcm_wrd_global
+
+       USE date_and_time_mod,                                                  &
+           ONLY:  day_of_year_init, time_utc_init
+
+       USE flight_mod,                                                         &
+           ONLY:  flight_wrd_global
+
+       USE grid_variables,                                                     &
+           ONLY:  dx, dy
+
+       USE gust_mod,                                                           &
+           ONLY :  gust_module_enabled, gust_wrd_global
+
+       USE indices,                                                            &
+           ONLY:  nx, ny, nz
+
+       USE model_1d_mod,                                                       &
+           ONLY:  damp_level_1d, dt_pr_1d, dt_run_control_1d, end_time_1d
+
+       USE netcdf_interface,                                                   &
+           ONLY:  netcdf_precision, output_for_t0
+
+       USE ocean_mod,                                                          &
+           ONLY:  ocean_wrd_global
+
+       USE particle_attributes,                                                &
+           ONLY:  curvature_solution_effects
+
+       USE pegrid,                                                             &
+           ONLY:  hor_index_bounds, collective_wait                                
+
+       USE radiation_model_mod,                                                &
+           ONLY:  time_radiation
+
+       USE spectra_mod,                                                        &
+           ONLY:  average_count_sp, spectrum_x, spectrum_y
+
+       USE synthetic_turbulence_generator_mod,                                 &
+           ONLY:  stg_wrd_global
+
+       USE statistics,                                                         &
+           ONLY:  statistic_regions, hom, hom_sum, u_max, u_max_ijk, v_max,    &
+                  v_max_ijk, w_max, w_max_ijk, z_i
+
+       USE user_write_restart_data_mod,                                        &
+           ONLY:  user_wrd_global 
+
+       USE vertical_nesting_mod,                                               &
+           ONLY:  vnest_init
+
+       USE wind_turbine_model_mod,                                             &
+           ONLY:  wtm_wrd_global
+     
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=10)  ::  binary_version_global   !<
+
+
+       binary_version_global = '4.7'
+
+       CALL wrd_write_string( 'binary_version_global' )
+       WRITE ( 14 )  binary_version_global
+
+       CALL wrd_write_string( 'numprocs' )
+       WRITE ( 14 )  numprocs
+
+       CALL wrd_write_string( 'hor_index_bounds' ) 
+       WRITE ( 14 )  hor_index_bounds
+
+       CALL wrd_write_string( 'nz' ) 
+       WRITE ( 14 )  nz
+
+       CALL wrd_write_string( 'max_pr_user' ) 
+       WRITE ( 14 )  max_pr_user
+
+       CALL wrd_write_string( 'statistic_regions' ) 
+       WRITE ( 14 )  statistic_regions
+
+!
+!-- Caution: After changes in the following parameter-list, the
+!-- -------  version number stored in the variable binary_version_global has to
+!--          be increased. The same changes must also be done in the parameter-
+!--          list in rrd_global.
+
+       CALL wrd_write_string( 'advected_distance_x' ) 
+       WRITE ( 14 )  advected_distance_x
+
+       CALL wrd_write_string( 'advected_distance_y' ) 
+       WRITE ( 14 )  advected_distance_y
+
+       CALL wrd_write_string( 'alpha_surface' ) 
+       WRITE ( 14 )  alpha_surface 
+
+       CALL wrd_write_string( 'average_count_pr' ) 
+       WRITE ( 14 )  average_count_pr
+
+       CALL wrd_write_string( 'average_count_sp' ) 
+       WRITE ( 14 )  average_count_sp
+
+       CALL wrd_write_string( 'average_count_3d' ) 
+       WRITE ( 14 )  average_count_3d
+
+       CALL wrd_write_string( 'bc_e_b' ) 
+       WRITE ( 14 )  bc_e_b
+
+       CALL wrd_write_string( 'bc_lr' ) 
+       WRITE ( 14 )  bc_lr
+
+       CALL wrd_write_string( 'bc_ns' ) 
+       WRITE ( 14 )  bc_ns
+
+       CALL wrd_write_string( 'bc_p_b' ) 
+       WRITE ( 14 )  bc_p_b
+
+       CALL wrd_write_string( 'bc_p_t' ) 
+       WRITE ( 14 )  bc_p_t
+
+       CALL wrd_write_string( 'bc_pt_b' ) 
+       WRITE ( 14 )  bc_pt_b
+
+       CALL wrd_write_string( 'bc_pt_t' ) 
+       WRITE ( 14 )  bc_pt_t
+
+       CALL wrd_write_string( 'bc_pt_t_val' ) 
+       WRITE ( 14 )  bc_pt_t_val
+
+       CALL wrd_write_string( 'bc_q_b' ) 
+       WRITE ( 14 )  bc_q_b
+
+       CALL wrd_write_string( 'bc_q_t' ) 
+       WRITE ( 14 )  bc_q_t
+
+       CALL wrd_write_string( 'bc_q_t_val' ) 
+       WRITE ( 14 )  bc_q_t_val
+
+       CALL wrd_write_string( 'bc_s_b' ) 
+       WRITE ( 14 )  bc_s_b
+
+       CALL wrd_write_string( 'bc_s_t' ) 
+       WRITE ( 14 )  bc_s_t
+
+       CALL wrd_write_string( 'bc_uv_b' ) 
+       WRITE ( 14 )  bc_uv_b
+
+       CALL wrd_write_string( 'bc_uv_t' ) 
+       WRITE ( 14 )  bc_uv_t
+
+       CALL wrd_write_string( 'building_height' ) 
+       WRITE ( 14 )  building_height
+
+       CALL wrd_write_string( 'building_length_x' ) 
+       WRITE ( 14 )  building_length_x
+
+       CALL wrd_write_string( 'building_length_y' ) 
+       WRITE ( 14 )  building_length_y
+
+       CALL wrd_write_string( 'building_wall_left' ) 
+       WRITE ( 14 )  building_wall_left
+
+       CALL wrd_write_string( 'building_wall_south' ) 
+       WRITE ( 14 )  building_wall_south
+
+       CALL wrd_write_string( 'call_psolver_at_all_substeps' ) 
+       WRITE ( 14 )  call_psolver_at_all_substeps
+
+       CALL wrd_write_string( 'canyon_height' ) 
+       WRITE ( 14 )  canyon_height 
+
+       CALL wrd_write_string( 'canyon_wall_left' ) 
+       WRITE ( 14 )  canyon_wall_left
+
+       CALL wrd_write_string( 'canyon_wall_south' ) 
+       WRITE ( 14 )  canyon_wall_south
+
+       CALL wrd_write_string( 'canyon_width_x' ) 
+       WRITE ( 14 )  canyon_width_x
+
+       CALL wrd_write_string( 'canyon_width_y' ) 
+       WRITE ( 14 )  canyon_width_y
+
+       CALL wrd_write_string( 'cfl_factor' ) 
+       WRITE ( 14 )  cfl_factor
+
+       CALL wrd_write_string( 'cloud_droplets' ) 
+       WRITE ( 14 )  cloud_droplets
+
+       CALL wrd_write_string( 'collective_wait' ) 
+       WRITE ( 14 )  collective_wait
+
+       CALL wrd_write_string( 'conserve_volume_flow' ) 
+       WRITE ( 14 )  conserve_volume_flow
+
+       CALL wrd_write_string( 'conserve_volume_flow_mode' ) 
+       WRITE ( 14 )  conserve_volume_flow_mode
+
+       CALL wrd_write_string( 'constant_flux_layer' ) 
+       WRITE ( 14 )  constant_flux_layer
+
+       CALL wrd_write_string( 'coupling_start_time' ) 
+       WRITE ( 14 )  coupling_start_time
+
+       CALL wrd_write_string( 'current_timestep_number' ) 
+       WRITE ( 14 )  current_timestep_number
+
+       CALL wrd_write_string( 'curvature_solution_effects' ) 
+       WRITE ( 14 )  curvature_solution_effects
+
+       CALL wrd_write_string( 'cycle_mg' ) 
+       WRITE ( 14 )  cycle_mg
+
+       CALL wrd_write_string( 'damp_level_1d' ) 
+       WRITE ( 14 )  damp_level_1d
+
+       CALL wrd_write_string( 'day_of_year_init' ) 
+       WRITE ( 14 )  day_of_year_init
+
+       CALL wrd_write_string( 'dissipation_1d' ) 
+       WRITE ( 14 )  dissipation_1d
+
+       CALL wrd_write_string( 'do2d_xy_time_count' ) 
+       WRITE ( 14 )  do2d_xy_time_count
+
+       CALL wrd_write_string( 'do2d_xz_time_count' ) 
+       WRITE ( 14 )  do2d_xz_time_count
+
+       CALL wrd_write_string( 'do2d_yz_time_count' ) 
+       WRITE ( 14 )  do2d_yz_time_count
+
+       CALL wrd_write_string( 'do3d_time_count' ) 
+       WRITE ( 14 )  do3d_time_count
+
+       CALL wrd_write_string( 'dp_external' ) 
+       WRITE ( 14 )  dp_external
+
+       CALL wrd_write_string( 'dp_level_b' ) 
+       WRITE ( 14 )  dp_level_b
+
+       CALL wrd_write_string( 'dp_smooth' ) 
+       WRITE ( 14 )  dp_smooth
+
+       CALL wrd_write_string( 'dpdxy' ) 
+       WRITE ( 14 )  dpdxy
+
+       CALL wrd_write_string( 'dt_3d' ) 
+       WRITE ( 14 )  dt_3d
+
+       CALL wrd_write_string( 'dt_pr_1d' ) 
+       WRITE ( 14 )  dt_pr_1d
+
+       CALL wrd_write_string( 'dt_run_control_1d' ) 
+       WRITE ( 14 )  dt_run_control_1d
+
+       CALL wrd_write_string( 'dvrp_filecount' ) 
+       WRITE ( 14 )  dvrp_filecount
+
+       CALL wrd_write_string( 'dx' ) 
+       WRITE ( 14 )  dx
+
+       CALL wrd_write_string( 'dy' ) 
+       WRITE ( 14 )  dy
+
+       CALL wrd_write_string( 'dz' ) 
+       WRITE ( 14 )  dz
+       
+       CALL wrd_write_string( 'dz_max' ) 
+       WRITE ( 14 )  dz_max
+
+       CALL wrd_write_string( 'dz_stretch_factor' ) 
+       WRITE ( 14 )  dz_stretch_factor
+       
+       CALL wrd_write_string( 'dz_stretch_factor_array' ) 
+       WRITE ( 14 )  dz_stretch_factor_array
+       
+       CALL wrd_write_string( 'dz_stretch_level' ) 
+       WRITE ( 14 )  dz_stretch_level
+
+       CALL wrd_write_string( 'dz_stretch_level_end' ) 
+       WRITE ( 14 )  dz_stretch_level_end
+       
+       CALL wrd_write_string( 'dz_stretch_level_start' ) 
+       WRITE ( 14 )  dz_stretch_level_start
+       
+       CALL wrd_write_string( 'e_min' ) 
+       WRITE ( 14 )  e_min
+
+       CALL wrd_write_string( 'end_time_1d' ) 
+       WRITE ( 14 )  end_time_1d
+
+       CALL wrd_write_string( 'fft_method' ) 
+       WRITE ( 14 )  fft_method
+
+       CALL wrd_write_string( 'first_call_lpm' ) 
+       WRITE ( 14 )  first_call_lpm
+
+       CALL wrd_write_string( 'galilei_transformation' ) 
+       WRITE ( 14 )  galilei_transformation
+
+       CALL wrd_write_string( 'hom' ) 
+       WRITE ( 14 )  hom
+
+       CALL wrd_write_string( 'hom_sum' ) 
+       WRITE ( 14 )  hom_sum
+
+       CALL wrd_write_string( 'humidity' ) 
+       WRITE ( 14 )  humidity
+
+       IF ( ALLOCATED( inflow_damping_factor ) )  THEN
+          CALL wrd_write_string( 'inflow_damping_factor' ) 
+          WRITE ( 14 )  inflow_damping_factor
+       ENDIF
+
+       CALL wrd_write_string( 'inflow_damping_height' ) 
+       WRITE ( 14 )  inflow_damping_height
+
+       CALL wrd_write_string( 'inflow_damping_width' ) 
+       WRITE ( 14 )  inflow_damping_width
+
+       CALL wrd_write_string( 'inflow_disturbance_begin' ) 
+       WRITE ( 14 )  inflow_disturbance_begin
+
+       CALL wrd_write_string( 'inflow_disturbance_end' ) 
+       WRITE ( 14 )  inflow_disturbance_end
+
+       CALL wrd_write_string( 'km_constant' ) 
+       WRITE ( 14 )  km_constant
+
+       CALL wrd_write_string( 'large_scale_forcing' ) 
+       WRITE ( 14 )  large_scale_forcing
+
+       CALL wrd_write_string( 'large_scale_subsidence' ) 
+       WRITE ( 14 )  large_scale_subsidence
+
+       CALL wrd_write_string( 'latitude' ) 
+       WRITE ( 14 )  latitude
+
+       CALL wrd_write_string( 'longitude' )
+       WRITE ( 14 )  longitude 
+
+       CALL wrd_write_string( 'loop_optimization' ) 
+       WRITE ( 14 )  loop_optimization
+
+       CALL wrd_write_string( 'masking_method' ) 
+       WRITE ( 14 )  masking_method
+
+       IF ( ALLOCATED( mean_inflow_profiles ) )  THEN
+          CALL wrd_write_string( 'mean_inflow_profiles' ) 
+          WRITE ( 14 )  mean_inflow_profiles
+       ENDIF
+
+       CALL wrd_write_string( 'mg_cycles' ) 
+       WRITE ( 14 )  mg_cycles
+
+       CALL wrd_write_string( 'mg_switch_to_pe0_level' ) 
+       WRITE ( 14 )  mg_switch_to_pe0_level
+
+       CALL wrd_write_string( 'mixing_length_1d' ) 
+       WRITE ( 14 )  mixing_length_1d
+
+       CALL wrd_write_string( 'momentum_advec' ) 
+       WRITE ( 14 )  momentum_advec
+
+       CALL wrd_write_string( 'most_method' ) 
+       WRITE ( 14 )  most_method
+
+       CALL wrd_write_string( 'netcdf_precision' ) 
+       WRITE ( 14 )  netcdf_precision
+
+       CALL wrd_write_string( 'neutral' ) 
+       WRITE ( 14 )  neutral
+
+       CALL wrd_write_string( 'ngsrb' ) 
+       WRITE ( 14 )  ngsrb
+
+       CALL wrd_write_string( 'nsor' ) 
+       WRITE ( 14 )  nsor
+
+       CALL wrd_write_string( 'nsor_ini' ) 
+       WRITE ( 14 )  nsor_ini
+
+       CALL wrd_write_string( 'nudging' ) 
+       WRITE ( 14 )  nudging
+
+       CALL wrd_write_string( 'num_leg' ) 
+       WRITE ( 14 )  num_leg
+
+       CALL wrd_write_string( 'nx' ) 
+       WRITE ( 14 )  nx
+
+       CALL wrd_write_string( 'ny' ) 
+       WRITE ( 14 )  ny
+
+       CALL wrd_write_string( 'ocean_mode' ) 
+       WRITE ( 14 )  ocean_mode
+
+       CALL wrd_write_string( 'old_dt' ) 
+       WRITE ( 14 )  old_dt
+
+       CALL wrd_write_string( 'omega' ) 
+       WRITE ( 14 )  omega
+
+       CALL wrd_write_string( 'omega_sor' ) 
+       WRITE ( 14 )  omega_sor
+
+       CALL wrd_write_string( 'output_for_t0' ) 
+       WRITE ( 14 )  output_for_t0
+
+       CALL wrd_write_string( 'passive_scalar' ) 
+       WRITE ( 14 )  passive_scalar
+
+       CALL wrd_write_string( 'prandtl_number' ) 
+       WRITE ( 14 )  prandtl_number
+
+       CALL wrd_write_string( 'psolver' )
+       WRITE ( 14 )  psolver 
+
+       CALL wrd_write_string( 'pt_damping_factor' ) 
+       WRITE ( 14 )  pt_damping_factor
+
+       CALL wrd_write_string( 'pt_damping_width' ) 
+       WRITE ( 14 )  pt_damping_width
+
+       CALL wrd_write_string( 'pt_init' ) 
+       WRITE ( 14 )  pt_init
+
+       CALL wrd_write_string( 'pt_reference' ) 
+       WRITE ( 14 )  pt_reference
+
+       CALL wrd_write_string( 'pt_surface' ) 
+       WRITE ( 14 )  pt_surface
+
+       CALL wrd_write_string( 'pt_surface_initial_change' ) 
+       WRITE ( 14 )  pt_surface_initial_change
+
+       CALL wrd_write_string( 'pt_vertical_gradient' ) 
+       WRITE ( 14 )  pt_vertical_gradient
+
+       CALL wrd_write_string( 'pt_vertical_gradient_level' ) 
+       WRITE ( 14 )  pt_vertical_gradient_level
+
+       CALL wrd_write_string( 'pt_vertical_gradient_level_ind' ) 
+       WRITE ( 14 )  pt_vertical_gradient_level_ind
+
+       CALL wrd_write_string( 'q_init' ) 
+       WRITE ( 14 )  q_init
+
+       CALL wrd_write_string( 'q_surface' ) 
+       WRITE ( 14 )  q_surface
+
+       CALL wrd_write_string( 'q_surface_initial_change' ) 
+       WRITE ( 14 )  q_surface_initial_change
+
+       CALL wrd_write_string( 'q_vertical_gradient' ) 
+       WRITE ( 14 )  q_vertical_gradient
+
+       CALL wrd_write_string( 'q_vertical_gradient_level' ) 
+       WRITE ( 14 )  q_vertical_gradient_level
+
+       CALL wrd_write_string( 'q_vertical_gradient_level_ind' ) 
+       WRITE ( 14 )  q_vertical_gradient_level_ind
+
+       CALL wrd_write_string( 'random_generator' ) 
+       WRITE ( 14 )  random_generator
+
+       CALL wrd_write_string( 'random_heatflux' ) 
+       WRITE ( 14 )  random_heatflux
+
+       CALL wrd_write_string( 'rans_mode' ) 
+       WRITE ( 14 )  rans_mode
+
+       CALL wrd_write_string( 'rayleigh_damping_factor' ) 
+       WRITE ( 14 )  rayleigh_damping_factor
+
+       CALL wrd_write_string( 'rayleigh_damping_height' ) 
+       WRITE ( 14 )  rayleigh_damping_height
+
+       CALL wrd_write_string( 'recycling_width' ) 
+       WRITE ( 14 )  recycling_width
+
+       CALL wrd_write_string( 'recycling_yshift' ) 
+       WRITE ( 14 )  recycling_yshift
+
+       CALL wrd_write_string( 'ref_state' ) 
+       WRITE ( 14 )  ref_state
+
+       CALL wrd_write_string( 'reference_state' ) 
+       WRITE ( 14 )  reference_state
+
+       CALL wrd_write_string( 'residual_limit' ) 
+       WRITE ( 14 )  residual_limit
+
+       CALL wrd_write_string( 'roughness_length' ) 
+       WRITE ( 14 )  roughness_length
+
+       CALL wrd_write_string( 'run_coupled' ) 
+       WRITE ( 14 )  run_coupled
+
+       CALL wrd_write_string( 'runnr' ) 
+       WRITE ( 14 )  runnr
+
+       CALL wrd_write_string( 's_init' ) 
+       WRITE ( 14 )  s_init
+
+       CALL wrd_write_string( 's_surface' ) 
+       WRITE ( 14 )  s_surface
+
+       CALL wrd_write_string( 's_surface_initial_change' ) 
+       WRITE ( 14 )  s_surface_initial_change
+
+       CALL wrd_write_string( 's_vertical_gradient' ) 
+       WRITE ( 14 )  s_vertical_gradient
+
+       CALL wrd_write_string( 's_vertical_gradient_level' ) 
+       WRITE ( 14 )  s_vertical_gradient_level
+
+       CALL wrd_write_string( 's_vertical_gradient_level_ind' ) 
+       WRITE ( 14 )  s_vertical_gradient_level_ind
+
+       CALL wrd_write_string( 'scalar_advec' ) 
+       WRITE ( 14 )  scalar_advec
+
+       CALL wrd_write_string( 'simulated_time' ) 
+       WRITE ( 14 )  simulated_time
+
+       IF ( ALLOCATED( spectrum_x ) )  THEN
+          CALL wrd_write_string( 'spectrum_x' ) 
+          WRITE ( 14 )  spectrum_x
+          CALL wrd_write_string( 'spectrum_y' ) 
+          WRITE ( 14 )  spectrum_y
+       ENDIF
+
+       CALL wrd_write_string( 'spinup_time ' ) 
+       WRITE ( 14 )  spinup_time 
+
+       CALL wrd_write_string( 'surface_heatflux' ) 
+       WRITE ( 14 )  surface_heatflux
+
+       CALL wrd_write_string( 'surface_pressure' ) 
+       WRITE ( 14 )  surface_pressure
+
+       CALL wrd_write_string( 'surface_scalarflux' ) 
+       WRITE ( 14 )  surface_scalarflux
+
+       CALL wrd_write_string( 'surface_waterflux' ) 
+       WRITE ( 14 )  surface_waterflux
+
+       CALL wrd_write_string( 'time_coupling' ) 
+       WRITE ( 14 )  time_coupling
+
+       CALL wrd_write_string( 'time_disturb' ) 
+       WRITE ( 14 )  time_disturb
+
+       CALL wrd_write_string( 'time_do2d_xy' ) 
+       WRITE ( 14 )  time_do2d_xy
+
+       CALL wrd_write_string( 'time_do2d_xz' ) 
+       WRITE ( 14 )  time_do2d_xz
+
+       CALL wrd_write_string( 'time_do2d_yz' ) 
+       WRITE ( 14 )  time_do2d_yz
+
+       CALL wrd_write_string( 'time_do3d' ) 
+       WRITE ( 14 )  time_do3d
+
+       CALL wrd_write_string( 'time_do_av' ) 
+       WRITE ( 14 )  time_do_av
+
+       CALL wrd_write_string( 'time_do_sla' ) 
+       WRITE ( 14 )  time_do_sla
+
+       CALL wrd_write_string( 'time_domask' ) 
+       WRITE ( 14 )  time_domask
+
+       CALL wrd_write_string( 'time_dopr' ) 
+       WRITE ( 14 )  time_dopr
+
+       CALL wrd_write_string( 'time_dopr_av' ) 
+       WRITE ( 14 )  time_dopr_av
+
+       CALL wrd_write_string( 'time_dopr_listing' ) 
+       WRITE ( 14 )  time_dopr_listing
+
+       CALL wrd_write_string( 'time_dopts' ) 
+       WRITE ( 14 )  time_dopts
+
+       CALL wrd_write_string( 'time_dosp' ) 
+       WRITE ( 14 )  time_dosp
+
+       CALL wrd_write_string( 'time_dots' ) 
+       WRITE ( 14 )  time_dots
+
+       CALL wrd_write_string( 'time_dvrp' ) 
+       WRITE ( 14 )  time_dvrp
+
+       CALL wrd_write_string( 'time_radiation' ) 
+       WRITE ( 14 )  time_radiation
+
+       CALL wrd_write_string( 'time_restart' ) 
+       WRITE ( 14 )  time_restart
+
+       CALL wrd_write_string( 'time_run_control' ) 
+       WRITE ( 14 )  time_run_control
+
+       CALL wrd_write_string( 'time_since_reference_point' ) 
+       WRITE ( 14 )  time_since_reference_point
+
+       CALL wrd_write_string( 'time_utc_init' ) 
+       WRITE ( 14 )  time_utc_init
+
+       CALL wrd_write_string( 'timestep_scheme' ) 
+       WRITE ( 14 )  timestep_scheme
+
+       CALL wrd_write_string( 'top_heatflux' ) 
+       WRITE ( 14 )  top_heatflux
+
+       CALL wrd_write_string( 'top_momentumflux_u' ) 
+       WRITE ( 14 )  top_momentumflux_u
+
+       CALL wrd_write_string( 'top_momentumflux_v' ) 
+       WRITE ( 14 )  top_momentumflux_v
+
+       CALL wrd_write_string( 'top_scalarflux' ) 
+       WRITE ( 14 )  top_scalarflux
+
+       CALL wrd_write_string( 'topography' ) 
+       WRITE ( 14 )  topography
+
+       CALL wrd_write_string( 'topography_grid_convention' ) 
+       WRITE ( 14 )  topography_grid_convention
+
+       CALL wrd_write_string( 'tsc' ) 
+       WRITE ( 14 )  tsc
+
+       CALL wrd_write_string( 'tunnel_height' ) 
+       WRITE ( 14 )  tunnel_height
+
+       CALL wrd_write_string( 'tunnel_length' ) 
+       WRITE ( 14 )  tunnel_length
+
+       CALL wrd_write_string( 'tunnel_wall_depth' ) 
+       WRITE ( 14 )  tunnel_wall_depth
+
+       CALL wrd_write_string( 'tunnel_width_x' ) 
+       WRITE ( 14 )  tunnel_width_x
+
+       CALL wrd_write_string( 'tunnel_width_y' ) 
+       WRITE ( 14 )  tunnel_width_y
+
+       CALL wrd_write_string( 'turbulence_closure' ) 
+       WRITE ( 14 )  turbulence_closure
+
+       CALL wrd_write_string( 'turbulent_inflow' ) 
+       WRITE ( 14 )  turbulent_inflow
+
+       CALL wrd_write_string( 'u_bulk' ) 
+       WRITE ( 14 )  u_bulk
+
+       CALL wrd_write_string( 'u_init' ) 
+       WRITE ( 14 )  u_init
+
+       CALL wrd_write_string( 'u_max' ) 
+       WRITE ( 14 )  u_max
+
+       CALL wrd_write_string( 'u_max_ijk' ) 
+       WRITE ( 14 )  u_max_ijk
+
+       CALL wrd_write_string( 'ug' ) 
+       WRITE ( 14 )  ug
+
+       CALL wrd_write_string( 'ug_surface' ) 
+       WRITE ( 14 )  ug_surface
+
+       CALL wrd_write_string( 'ug_vertical_gradient' ) 
+       WRITE ( 14 )  ug_vertical_gradient
+
+       CALL wrd_write_string( 'ug_vertical_gradient_level' ) 
+       WRITE ( 14 )  ug_vertical_gradient_level
+
+       CALL wrd_write_string( 'ug_vertical_gradient_level_ind' ) 
+       WRITE ( 14 )  ug_vertical_gradient_level_ind
+
+       CALL wrd_write_string( 'use_surface_fluxes' ) 
+       WRITE ( 14 )  use_surface_fluxes
+
+       CALL wrd_write_string( 'use_top_fluxes' ) 
+       WRITE ( 14 )  use_top_fluxes
+
+       CALL wrd_write_string( 'use_ug_for_galilei_tr' ) 
+       WRITE ( 14 )  use_ug_for_galilei_tr
+
+       CALL wrd_write_string( 'use_upstream_for_tke' ) 
+       WRITE ( 14 )  use_upstream_for_tke
+
+       CALL wrd_write_string( 'v_bulk' ) 
+       WRITE ( 14 )  v_bulk
+
+       CALL wrd_write_string( 'v_init' ) 
+       WRITE ( 14 )  v_init
+
+       CALL wrd_write_string( 'v_max' ) 
+       WRITE ( 14 )  v_max
+
+       CALL wrd_write_string( 'v_max_ijk' ) 
+       WRITE ( 14 )  v_max_ijk
+
+       CALL wrd_write_string( 'vg' ) 
+       WRITE ( 14 )  vg
+
+       CALL wrd_write_string( 'vg_surface' ) 
+       WRITE ( 14 )  vg_surface
+
+       CALL wrd_write_string( 'vg_vertical_gradient' ) 
+       WRITE ( 14 ) vg_vertical_gradient
+
+       CALL wrd_write_string( 'vg_vertical_gradient_level' ) 
+       WRITE ( 14 )  vg_vertical_gradient_level
+
+       CALL wrd_write_string( 'vg_vertical_gradient_level_ind' ) 
+       WRITE ( 14 )  vg_vertical_gradient_level_ind
+
+       CALL wrd_write_string( 'virtual_flight' ) 
+       WRITE ( 14 )  virtual_flight
+
+       CALL wrd_write_string( 'vnest_init' ) 
+       WRITE ( 14 )  vnest_init
+
+       CALL wrd_write_string( 'volume_flow_area' ) 
+       WRITE ( 14 )  volume_flow_area
+
+       CALL wrd_write_string( 'volume_flow_initial' ) 
+       WRITE ( 14 )  volume_flow_initial
+
+       CALL wrd_write_string( 'subs_vertical_gradient' ) 
+       WRITE ( 14 )  subs_vertical_gradient
+
+       CALL wrd_write_string( 'subs_vertical_gradient_level' ) 
+       WRITE ( 14 )  subs_vertical_gradient_level
+
+       CALL wrd_write_string( 'subs_vertical_gradient_level_i' ) 
+       WRITE ( 14 )  subs_vertical_gradient_level_i
+
+       CALL wrd_write_string( 'w_max' ) 
+       WRITE ( 14 )  w_max
+
+       CALL wrd_write_string( 'w_max_ijk' ) 
+       WRITE ( 14 )  w_max_ijk
+
+       CALL wrd_write_string( 'wall_adjustment' ) 
+       WRITE ( 14 )  wall_adjustment
+
+       CALL wrd_write_string( 'wall_heatflux' ) 
+       WRITE ( 14 )  wall_heatflux
+
+       CALL wrd_write_string( 'wall_humidityflux' ) 
+       WRITE ( 14 )  wall_humidityflux
+
+       CALL wrd_write_string( 'wall_scalarflux' ) 
+       WRITE ( 14 )  wall_scalarflux
+
+       CALL wrd_write_string( 'y_shift' ) 
+       WRITE ( 14 )  y_shift
+
+       CALL wrd_write_string( 'z0h_factor' ) 
+       WRITE ( 14 )  z0h_factor
+
+       CALL wrd_write_string( 'zeta_max' ) 
+       WRITE ( 14 )  zeta_max
+
+       CALL wrd_write_string( 'zeta_min' ) 
+       WRITE ( 14 )  zeta_min
+
+       CALL wrd_write_string( 'z_i' ) 
+       WRITE ( 14 )  z_i
+
+!
+!--    Write restart data of the other modules
+!--    The order of the calls can be different as in read_restart_data_mod where
+!--    the restart data will be read
+       IF ( bulk_cloud_model )     CALL bcm_wrd_global
+       IF ( virtual_flight )       CALL flight_wrd_global
+       IF ( gust_module_enabled )  CALL gust_wrd_global
+       IF ( ocean_mode )           CALL ocean_wrd_global
+       IF ( syn_turb_gen )         CALL stg_wrd_global
+       IF ( wind_turbine )         CALL wtm_wrd_global
+!
+!--    Write restart data of the user-interface
+       CALL user_wrd_global
+
+
+    END SUBROUTINE wrd_global
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Processor specific data of variables and arrays is written out for 
+!> restarts (binary format).
+!> This information is written to the file opened by each PE.
+!------------------------------------------------------------------------------!
+    SUBROUTINE wrd_local
+ 
+
+       USE arrays_3d,                                                          &
+           ONLY:  e, kh, km, p, pt, q, ql, s, u, u_m_l, u_m_n, u_m_r,          &
+                  u_m_s, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, w, w_m_l, w_m_n,  &
+                  w_m_r, w_m_s
+        
+       USE averaging
+
+       USE bulk_cloud_model_mod,                                               &
+           ONLY:  bulk_cloud_model, bcm_wrd_local
+
+       USE chemistry_model_mod,                                                &
+           ONLY:  chem_wrd_local
+
+       USE gust_mod,                                                           &
+           ONLY :  gust_module_enabled, gust_wrd_local
+                
+       USE indices,                                                            &
+           ONLY:  nxl, nxr, nys, nyn, nzb, nzt
+
+       USE land_surface_model_mod,                                             &
+           ONLY:  lsm_wrd_local
+
+       USE ocean_mod,                                                          &
+           ONLY:  ocean_wrd_local
+
+       USE particle_attributes,                                                &
+           ONLY:  iran_part
+
+       USE radiation_model_mod,                                                &
+           ONLY:  radiation, radiation_wrd_local
+    
+       USE random_function_mod,                                                &
+           ONLY:  random_iv, random_iy
+
+       USE random_generator_parallel,                                          &
+           ONLY:  id_random_array, seq_random_array
+              
+       USE salsa_mod,                                                          &
+           ONLY:  salsa, salsa_wrd_local          
+
+       USE surface_mod,                                                        &
+           ONLY :  surface_wrd_local
+
+       USE urban_surface_mod,                                                  &
+           ONLY:  usm_wrd_local    
+
+       USE user_write_restart_data_mod,                                        &
+           ONLY:  user_wrd_local 
+
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=10) ::  binary_version_local   !< 
+
+
+!
+!-- Write arrays.
+       binary_version_local = '4.7'
+
+       CALL wrd_write_string( 'binary_version_local' )
+       WRITE ( 14 )  binary_version_local
+
+       WRITE ( 14 )  numprocs, myid, nxl, nxr, nys, nyn, nzb, nzt
+
+!
+!-- Attention: After changes to the following output commands the version number
+!-- ---------  of the variable binary_version_local must be changed!
+!--            Also, the list of arrays to be read in rrd_local must be
+!--            adjusted accordingly.
+       CALL wrd_write_string( 'e' ) 
+       WRITE ( 14 )  e
+
+       IF ( ALLOCATED( e_av ) )  THEN
+          CALL wrd_write_string( 'e_av' ) 
+          WRITE ( 14 )  e_av
+       ENDIF
+
+       CALL wrd_write_string( 'iran' ) 
+       WRITE ( 14 )  iran, iran_part 
+
+       CALL wrd_write_string( 'kh' ) 
+       WRITE ( 14 )  kh
+  
+
+       IF ( ALLOCATED( kh_av ) )  THEN
+          CALL wrd_write_string( 'kh_av' ) 
+          WRITE ( 14 )  kh_av
+       ENDIF
+
+       CALL wrd_write_string( 'km' ) 
+       WRITE ( 14 )  km
+
+       IF ( ALLOCATED( km_av ) )  THEN
+          CALL wrd_write_string( 'km_av' ) 
+          WRITE ( 14 )  km_av
+       ENDIF
+
+       IF ( ALLOCATED( lpt_av ) )  THEN
+          CALL wrd_write_string( 'lpt_av' ) 
+          WRITE ( 14 )  lpt_av
+       ENDIF
+
+       IF ( ALLOCATED( lwp_av ) )  THEN
+          CALL wrd_write_string( 'lwp_av' ) 
+          WRITE ( 14 )  lwp_av
+       ENDIF
+
+       CALL wrd_write_string( 'p' ) 
+       WRITE ( 14 )  p
+
+       IF ( ALLOCATED( p_av ) )  THEN
+          CALL wrd_write_string( 'p_av' ) 
+          WRITE ( 14 )  p_av
+       ENDIF
+
+       IF ( ALLOCATED( pc_av ) )  THEN
+          CALL wrd_write_string( 'pc_av' ) 
+          WRITE ( 14 )  pc_av
+       ENDIF
+
+       IF ( ALLOCATED( pr_av ) )  THEN
+          CALL wrd_write_string( 'pr_av' ) 
+          WRITE ( 14 )  pr_av
+       ENDIF
+
+       CALL wrd_write_string( 'pt' ) 
+       WRITE ( 14 )  pt
+
+       IF ( ALLOCATED( pt_av ) )  THEN
+          CALL wrd_write_string( 'pt_av' ) 
+          WRITE ( 14 )  pt_av
+       ENDIF
+
+       IF ( humidity )  THEN
+
+          CALL wrd_write_string( 'q' ) 
+          WRITE ( 14 )  q
+
+          IF ( ALLOCATED( q_av ) )  THEN
+             CALL wrd_write_string( 'q_av' ) 
+             WRITE ( 14 )  q_av
+          ENDIF
+
+          IF ( cloud_droplets )  THEN
+
+             CALL wrd_write_string( 'ql' )
+             WRITE ( 14 )  ql
+
+             IF ( ALLOCATED( ql_av ) )  THEN
+                CALL wrd_write_string( 'ql_av' )
+                WRITE ( 14 )  ql_av
+             ENDIF
+
+          ENDIF
+
+          IF ( ALLOCATED( qsws_av ) )  THEN
+             CALL wrd_write_string( 'qsws_av' ) 
+             WRITE ( 14 )  qsws_av
+          ENDIF
+
+       ENDIF
+
+       IF ( passive_scalar )  THEN
+
+          CALL wrd_write_string( 's' ) 
+          WRITE ( 14 )  s
+
+          IF ( ALLOCATED( s_av ) )  THEN
+             CALL wrd_write_string( 's_av' ) 
+             WRITE ( 14 )  s_av
+          ENDIF
+
+          IF ( ALLOCATED( ssws_av ) )  THEN
+             CALL wrd_write_string( 'ssws_av' ) 
+             WRITE ( 14 )  ssws_av
+          ENDIF
+
+       ENDIF
+       
+       IF ( ALLOCATED( ql_c_av ) )  THEN
+          CALL wrd_write_string( 'ql_c_av' ) 
+          WRITE ( 14 )  ql_c_av
+       ENDIF
+
+       IF ( ALLOCATED( ql_v_av ) )  THEN
+          CALL wrd_write_string( 'ql_v_av' ) 
+          WRITE ( 14 )  ql_v_av
+       ENDIF
+
+       IF ( ALLOCATED( ql_vp_av ) )  THEN
+          CALL wrd_write_string( 'ql_vp_av' ) 
+          WRITE ( 14 )  ql_vp_av
+       ENDIF
+
+       IF ( ALLOCATED( qv_av ) )  THEN
+          CALL wrd_write_string( 'qv_av' ) 
+          WRITE ( 14 )  qv_av
+       ENDIF
+
+       CALL wrd_write_string( 'random_iv' ) 
+       WRITE ( 14 )  random_iv
+       WRITE ( 14 )  random_iy
+
+       IF ( ALLOCATED( seq_random_array ) )  THEN
+          CALL wrd_write_string( 'seq_random_array' ) 
+          WRITE ( 14 )  id_random_array
+          WRITE ( 14 )  seq_random_array 
+       ENDIF
+
+       IF ( ALLOCATED( s_av ) )  THEN
+          CALL wrd_write_string( 's_av' ) 
+          WRITE ( 14 )  s_av
+       ENDIF
+
+       IF ( ALLOCATED( shf_av ) )  THEN
+          CALL wrd_write_string( 'shf_av' ) 
+          WRITE ( 14 )  shf_av
+       ENDIF
+
+       IF ( ALLOCATED( ts_av ) )  THEN
+          CALL wrd_write_string( 'ts_av' ) 
+          WRITE ( 14 ) ts_av
+       ENDIF
+
+       CALL wrd_write_string( 'u' ) 
+       WRITE ( 14 )  u
+
+       IF ( ALLOCATED( u_av ) )  THEN
+          CALL wrd_write_string( 'u_av' ) 
+          WRITE ( 14 )  u_av
+       ENDIF
+
+       IF ( ALLOCATED( u_m_l ) )  THEN
+          CALL wrd_write_string( 'u_m_l' ) 
+          WRITE ( 14 )  u_m_l
+       ENDIF
+
+       IF ( ALLOCATED( u_m_n ) )  THEN
+          CALL wrd_write_string( 'u_m_n' ) 
+          WRITE ( 14 )  u_m_n
+       ENDIF
+
+       IF ( ALLOCATED( u_m_r ) )  THEN
+          CALL wrd_write_string( 'u_m_r' ) 
+          WRITE ( 14 )  u_m_r
+       ENDIF
+
+       IF ( ALLOCATED( u_m_s ) )  THEN
+          CALL wrd_write_string( 'u_m_s' ) 
+          WRITE ( 14 )  u_m_s
+       ENDIF
+
+       IF ( ALLOCATED( us_av ) )  THEN
+          CALL wrd_write_string( 'us_av' ) 
+          WRITE ( 14 )  us_av
+       ENDIF
+
+       CALL wrd_write_string( 'v' ) 
+       WRITE ( 14 )  v
+
+       IF ( ALLOCATED( v_av ) )  THEN
+          CALL wrd_write_string( 'v_av' ) 
+          WRITE ( 14 )  v_av
+       ENDIF
+
+       IF ( ALLOCATED( v_m_l  ) )  THEN
+          CALL wrd_write_string( 'v_m_l' ) 
+          WRITE ( 14 )  v_m_l
+       ENDIF
+
+       IF ( ALLOCATED( v_m_n ) )  THEN
+          CALL wrd_write_string( 'v_m_n' ) 
+          WRITE ( 14 )  v_m_n
+       ENDIF
+
+       IF ( ALLOCATED( v_m_r ) )  THEN
+          CALL wrd_write_string( 'v_m_r' ) 
+          WRITE ( 14 )  v_m_r
+       ENDIF
+
+       IF ( ALLOCATED( v_m_s ) )  THEN
+          CALL wrd_write_string( 'v_m_s' ) 
+          WRITE ( 14 )  v_m_s
+       ENDIF
+
+       IF ( humidity )  THEN
+
+          CALL wrd_write_string( 'vpt' ) 
+          WRITE ( 14 )  vpt
+
+          IF ( ALLOCATED( vpt_av ) )  THEN
+             CALL wrd_write_string( 'vpt_av' ) 
+             WRITE ( 14 ) vpt_av
+          ENDIF
+
+       ENDIF
+
+       CALL wrd_write_string( 'w' ) 
+       WRITE ( 14 )  w
+
+       IF ( ALLOCATED( w_av ) )  THEN
+          CALL wrd_write_string( 'w_av' ) 
+          WRITE ( 14 )  w_av
+       ENDIF
+
+       IF ( ALLOCATED( w_m_l ) )  THEN
+          CALL wrd_write_string( 'w_m_l' ) 
+          WRITE ( 14 )  w_m_l
+       ENDIF
+
+       IF ( ALLOCATED( w_m_n ) )  THEN
+          CALL wrd_write_string( 'w_m_n' ) 
+          WRITE ( 14 )  w_m_n
+       ENDIF
+
+       IF ( ALLOCATED( w_m_r ) )  THEN
+          CALL wrd_write_string( 'w_m_r' ) 
+          WRITE ( 14 )  w_m_r
+       ENDIF
+
+       IF ( ALLOCATED( w_m_s ) )  THEN
+          CALL wrd_write_string( 'w_m_s' ) 
+          WRITE ( 14 )  w_m_s
+       ENDIF
+
+       IF ( ALLOCATED( z0_av ) )  THEN
+          CALL wrd_write_string( 'z0_av' ) 
+          WRITE ( 14 )  z0_av
+       ENDIF
+
+       IF ( ALLOCATED( z0h_av ) )  THEN
+          CALL wrd_write_string( 'z0h_av' ) 
+          WRITE ( 14 )  z0h_av
+       ENDIF
+
+       IF ( ALLOCATED( z0q_av ) )  THEN
+          CALL wrd_write_string( 'z0q_av' ) 
+          WRITE ( 14 )  z0q_av
+       ENDIF
+
+       IF ( land_surface  .OR.  urban_surface )  THEN
+
+          IF ( ALLOCATED( ghf_av ) )  THEN
+             CALL wrd_write_string( 'ghf_av' ) 
+             WRITE ( 14 )  ghf_av
+          ENDIF
+
+          IF ( ALLOCATED( r_a_av ) )  THEN
+             CALL wrd_write_string( 'r_a_av' ) 
+             WRITE ( 14 )  r_a_av
+          ENDIF
+
+       ENDIF
+
+       IF ( ALLOCATED( tsurf_av ) )  THEN
+          CALL wrd_write_string( 'tsurf_av' ) 
+          WRITE ( 14 )  tsurf_av
+       ENDIF
+
+!
+!--    Write restart data of other modules
+       IF ( bulk_cloud_model )     CALL bcm_wrd_local
+       IF ( air_chemistry )        CALL chem_wrd_local
+       IF ( gust_module_enabled )  CALL gust_wrd_local
+       IF ( land_surface )         CALL lsm_wrd_local
+       IF ( ocean_mode )           CALL ocean_wrd_local
+       CALL surface_wrd_local
+       IF ( radiation )            CALL radiation_wrd_local
+       IF ( salsa )                CALL salsa_wrd_local
+       IF ( urban_surface )        CALL usm_wrd_local
+
+!
+!--    Write user-defined restart data
+       CALL user_wrd_local
+
+!
+!--    Write end label
+       CALL wrd_write_string( '*** end ***' )
+
+    END SUBROUTINE wrd_local
+
+
+ END MODULE write_restart_data_mod
Index: /palm/tags/release-6.0/TESTS/builds/cray_default/build_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/builds/cray_default/build_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/builds/cray_default/build_config.yml	(revision 3477)
@@ -0,0 +1,47 @@
+---
+# this is a palmtest build configuration file
+
+compiler:
+  id: Cray
+  executable: "{{Cray.executable}}"
+  mpi_wrapper: "{{Cray.mpi_wrapper}}"
+  definitions:
+    - "MPI_REAL=MPI_DOUBLE_PRECISION"
+    - "MPI_2REAL=MPI_2DOUBLE_PRECISION"
+    - "__parallel"
+    - "__netcdf"
+    - "__netcdf4"
+    - "__netcdf4_parallel"
+    - "__fftw"
+    - "__rrtmg"
+  options:
+    default:
+      - "-e Z"
+      - "-em"
+      - "-K trap=fp"
+      - "-O3"
+      - "-hfp3"
+      - "-hdynamic"
+      - "-hnoomp"
+      - "-hnoacc"
+    debug:
+      - "-e Z"
+      - "-eD"
+      - "-em"
+      - "-K trap=fp"
+      - "-O0"
+      - "-g"
+      - "-R b"
+      - "-hnoomp"
+      - "-hnoacc"
+  includes:
+    - "{{Cray.include.netcdf}}"
+    - "{{Cray.include.fftw}}"
+    - "{{Cray.include.rrtmg}}"
+
+linker:
+  options:
+    - "-dynamic"
+    - "{{Cray.lib.netcdf}}"
+    - "{{Cray.lib.fftw}}"
+    - "{{Cray.lib.rrtmg}}"
Index: /palm/tags/release-6.0/TESTS/builds/gfortran_default/build_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/builds/gfortran_default/build_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/builds/gfortran_default/build_config.yml	(revision 3477)
@@ -0,0 +1,44 @@
+---
+# this is a palmtest build configuration file
+
+compiler:
+  id: GNU
+  executable: "{{GNU.executable}}"
+  mpi_wrapper: "{{GNU.mpi_wrapper}}"
+  definitions:
+    - "MPI_REAL=MPI_DOUBLE_PRECISION"
+    - "MPI_2REAL=MPI_2DOUBLE_PRECISION"
+    - "__parallel"
+    - "__netcdf"
+    - "__netcdf4"
+    - "__netcdf4_parallel"
+    - "__fftw"
+    - "__rrtmg"
+    - "__gfortran"
+  options:
+    default:
+      - "-cpp"
+      - "-Ofast"
+      - "-ffree-line-length-none"
+    debug:
+      - "-cpp"
+      - "-O0"
+      - "-Wall"
+      - "-Wextra"
+      - "-pedantic"
+      - "-fcheck=all"
+      - "-fbacktrace"
+      - "-Wno-conversion"
+      - "-Wno-compare-reals"
+      - "-finit-real=nan"
+      - "-ffree-line-length-none"
+  includes:
+    - "{{GNU.include.netcdf}}"
+    - "{{GNU.include.fftw}}"
+    - "{{GNU.include.rrtmg}}"
+
+linker:
+  options:
+    - "{{GNU.lib.netcdf}}"
+    - "{{GNU.lib.fftw}}"
+    - "{{GNU.lib.rrtmg}}"
Index: /palm/tags/release-6.0/TESTS/builds/intel_default/build_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/builds/intel_default/build_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/builds/intel_default/build_config.yml	(revision 3477)
@@ -0,0 +1,59 @@
+---
+# this is a palmtest build configuration file
+
+compiler:
+  id: Intel
+  executable: "{{Intel.executable}}"
+  mpi_wrapper: "{{Intel.mpi_wrapper}}"
+  definitions:
+    - "MPI_REAL=MPI_DOUBLE_PRECISION"
+    - "MPI_2REAL=MPI_2DOUBLE_PRECISION"
+    - "__parallel"
+    - "__netcdf"
+    - "__netcdf4"
+    - "__netcdf4_parallel"
+    - "__fftw"
+    - "__rrtmg"
+    - "__intel_compiler"
+  options:
+    default:
+      - "-cpp"
+      - "-O3"
+      - "-fp-model source"
+      - "-fno-alias"
+      - "-fpe0"
+      - "-ftz"
+      - "-no-prec-div"
+      - "-no-prec-sqrt"
+      - "-ip"
+      - "-nbs"
+      - "-diag-disable 8290,8291"
+    debug:
+      - "-cpp"
+      - "-g"
+      - "-debug"
+      - "-traceback"
+      - "-fpe0"
+      - "-C"
+      - "-check nooutput_conversion"
+      - "-w"
+      - "-xT"
+      - "-O0"
+      - "-ftz"
+      - "-fno-alias"
+      - "-no-prec-div"
+      - "-no-prec-sqrt"
+      - "-ip"
+      - "-nbs"
+      - "-convert little_endian"
+      - "-diag-disable 8290,8291"
+  includes:
+    - "{{Intel.include.netcdf}}"
+    - "{{Intel.include.fftw}}"
+    - "{{Intel.include.rrtmg}}"
+
+linker:
+  options:
+    - "{{Intel.lib.netcdf}}"
+    - "{{Intel.lib.fftw}}"
+    - "{{Intel.lib.rrtmg}}"
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl/INPUT/example_cbl_p3d
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl/INPUT/example_cbl_p3d	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl/INPUT/example_cbl_p3d	(revision 3477)
@@ -0,0 +1,97 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1225.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles', ! initial conditions
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+
+    pt_vertical_gradient       =    0.0,
+                                    1.0, ! piecewise temp gradients
+    pt_vertical_gradient_level =    0.0,
+                                  800.0, ! height level of temp gradients
+
+
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    surface_heatflux           = 0.1, ! sensible heat flux at the bottom surface
+    bc_pt_b                    = 'neumann', ! required with surface_heatflux
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 3600.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 900.0,  ! output interval for general data
+    dt_data_output_av          = 1800.0, ! output interval for averaged data
+    dt_dopr                    = 900.0,  ! output interval for profile data
+
+    data_output                = 'w_xy',
+                                 'w_xz',
+                                 'w_xz_av',
+                                 'theta_xy',
+                                 'theta_xz',
+
+    data_output_pr             = 'wtheta',
+                                 'w"theta"',
+                                 'w*theta*',
+                                 'w*2',
+                                 '#theta',
+                                 'theta*2',
+
+    section_xy                 = 2,
+                                 10, ! grid index for 2D XY cross sections
+    section_xz                 = 20, ! grid index for 2D XZ cross sections
+
+    averaging_interval         = 900.0, ! averaging interval general data
+    dt_averaging_input         = 10.0,  ! averaging general data sampling rate
+
+    averaging_interval_pr      = 600.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl/MONITORING/example_cbl_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl/MONITORING/example_cbl_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl/MONITORING/example_cbl_rc	(revision 3477)
@@ -0,0 +1,486 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3133:31     *    atmosphere - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 18-07-18    Run:       example_cbl_4
+ Time:                 19:19:17    Run-No.:   00
+ Run on host:            p5imuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             3600.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      50.000 m    dy =      50.000 m
+                dz(1) =      50.000 m
+                dz(2) =    1000.000 m
+
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   2862.511 m
+
+ Vertical stretching starts at height:    1225.0 m,
+ Vertical stretching starts at index:           25,
+ Vertical stretching ends at height:   9999999.9 m,
+ Vertical stretching ends at index:             41,
+ Factor used for stretching:                 1.080,
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     20,     42)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)     = pt(1)
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.100000 K m/s
+
+
+    Constant flux layer between bottom surface and first computational u,v-level:
+
+       z_mo =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:     -20.00 <= rif <= 20.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic
+       north/south: cyclic
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   800.0  m
+       Temperature:   300.00  300.00  300.00  K
+       Gradient:      ------    0.00    1.00  K/100m
+       Gridpoint:          0       0      16
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset
+
+
+       Profile: wtheta, w"theta", w*theta*, w*2, theta, theta*2,
+       Output every               900.00 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    2D-Arrays:
+       Output format: netCDF 64bit offset
+
+
+       XY-cross-section  Arrays:  w, theta,
+       Output every               900.00 s
+       Cross sections at k = /2/10/
+       scalar-coordinates:   /75.0/475.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+       XZ-cross-section  Arrays:  w, theta,
+       Output every               900.00 s
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    2D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset
+
+
+       XZ-cross-section  Arrays:  w,
+       Output every              1800.00 s
+       Time averaged over         900.00 s
+       Averaging input every       10.00 s
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.0 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
+    Day of the year at model start :   day_init = 172
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A  -0.2131D -0.2288D  0.1182  0.000  1.38   0.000E+00    800.  0.104E-02  0.103E-02  0.597E-03  0.867E-13    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      1 00:00:20.00  20.0000D  -0.2125  -0.2273   0.1172  0.009  0.69  -0.132E+02    100.  0.103E-02  0.102E-02  0.570E-05  0.411E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      2 00:00:40.00  20.0000D  -0.2117  -0.2252   0.1162  0.009  0.69  -0.133E+02    100.  0.102E-02  0.102E-02  0.935E-05  0.416E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      3 00:01:00.00  20.0000D  -0.2106  -0.2227   0.1152  0.009  0.69  -0.134E+02    100.  0.101E-02  0.101E-02  0.130E-04  0.421E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      4 00:01:20.00  20.0000D  -0.2093  -0.2197   0.1141  0.009  0.69  -0.134E+02    100.  0.100E-02  0.997E-03  0.166E-04  0.424E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      5 00:01:40.00  20.0000D  -0.2077  -0.2164   0.1129  0.009  0.93  -0.134E+02    250.  0.992E-03  0.988E-03  0.203E-04  0.427E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      6 00:02:00.00  20.0000D  -0.2058  -0.2126   0.1117  0.009  0.93  -0.133E+02    250.  0.983E-03  0.979E-03  0.239E-04  0.429E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      7 00:02:20.00  20.0000D  -0.2037  -0.2086   0.1103  0.009  1.22  -0.131E+02    550.  0.974E-03  0.970E-03  0.275E-04  0.431E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      8 00:02:40.00  20.0000D   0.3348D  0.3126D  0.1636  0.011  1.22  -0.105E+02    550.  0.202E-02  0.201E-02  0.601E-03  0.856E-13   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0      9 00:03:00.00  20.0000D   0.3330   0.3039   0.1619  0.011  1.22  -0.105E+02    550.  0.199E-02  0.198E-02  0.374E-04  0.830E-15   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0     10 00:03:20.00  20.0000D   0.3296  -0.2989   0.1601  0.011  1.22  -0.103E+02    550.  0.196E-02  0.195E-02  0.409E-04  0.827E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     11 00:03:40.00  20.0000D   0.3249  -0.2986   0.1580  0.011  1.22  -0.101E+02    550.  0.194E-02  0.193E-02  0.444E-04  0.828E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     12 00:04:00.00  20.0000D   0.3189  -0.2989   0.1558  0.012  1.22  -0.975E+01    550.  0.191E-02  0.190E-02  0.478E-04  0.831E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     13 00:04:20.00  20.0000D   0.3119  -0.3005   0.1535  0.012  1.22  -0.940E+01    550.  0.189E-02  0.188E-02  0.513E-04  0.835E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     14 00:04:40.00  20.0000D   0.3056  -0.3012   0.1512  0.013  1.22  -0.905E+01    550.  0.187E-02  0.185E-02  0.546E-04  0.842E-15   10   3   0    8   0   7    5  36  28    0.000    0.000       0
+  0     15 00:05:00.00  20.0000D   0.4151D -0.3964D -0.1812  0.013  1.22  -0.851E+01    550.  0.292E-02  0.289E-02  0.625E-03  0.860E-13    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     16 00:05:20.00  20.0000D   0.4183  -0.4076  -0.1810  0.014  1.22  -0.811E+01    550.  0.287E-02  0.285E-02  0.640E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     17 00:05:40.00  20.0000D   0.4163  -0.4151  -0.1796  0.015  1.22  -0.773E+01    550.  0.283E-02  0.280E-02  0.672E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     18 00:06:00.00  20.0000D   0.4097  -0.4189  -0.1772  0.015  1.22  -0.735E+01    550.  0.279E-02  0.276E-02  0.703E-04  0.130E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     19 00:06:20.00  20.0000D   0.3992  -0.4192   0.1802  0.016  1.22  -0.698E+01    550.  0.275E-02  0.273E-02  0.734E-04  0.131E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     20 00:06:40.00  20.0000D   0.3855  -0.4165   0.1983  0.017  1.22  -0.656E+01    550.  0.272E-02  0.269E-02  0.765E-04  0.133E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     21 00:07:00.00  20.0000D   0.3695  -0.4109   0.2198  0.018  1.22  -0.616E+01    550.  0.269E-02  0.267E-02  0.795E-04  0.136E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     22 00:07:20.00  20.0000D  -0.3706  -0.4030   0.2474  0.020  1.22  -0.577E+01    550.  0.267E-02  0.265E-02  0.824E-04  0.140E-14    8  13   9    8   3   6    2   6  12    0.000    0.000       0
+  0     23 00:07:40.00  20.0000D  -0.4267D -0.4554D  0.2850  0.021  1.22  -0.539E+01    550.  0.371E-02  0.369E-02  0.653E-03  0.886E-13    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     24 00:08:00.00  20.0000D  -0.4241  -0.4568   0.3233  0.023  1.22  -0.506E+01    550.  0.368E-02  0.366E-02  0.905E-04  0.190E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     25 00:08:20.00  20.0000D  -0.4208  -0.4522   0.3672  0.024  1.22  -0.471E+01    550.  0.367E-02  0.365E-02  0.931E-04  0.196E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     26 00:08:40.00  20.0000D  -0.4174  -0.4421   0.4169  0.026  1.22  -0.440E+01    550.  0.368E-02  0.366E-02  0.957E-04  0.204E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     27 00:09:00.00  20.0000D  -0.4142  -0.4279   0.4727  0.028  1.22  -0.410E+01    550.  0.372E-02  0.370E-02  0.981E-04  0.214E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     28 00:09:20.00  20.0000D  -0.4116  -0.4106   0.5348  0.030  1.18  -0.381E+01    500.  0.380E-02  0.378E-02  0.100E-03  0.227E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     29 00:09:40.00  20.0000D  -0.4107  -0.4087   0.6032  0.032  1.18  -0.355E+01    500.  0.393E-02  0.391E-02  0.103E-03  0.242E-14    5   4   4    5   3  36    2   6  12    0.000    0.000       0
+  0     30 00:10:00.00  20.0000D   0.4798D  0.4695D  0.7094  0.035  1.18  -0.330E+01    500.  0.519E-02  0.516E-02  0.656E-03  0.867E-13    5  14  20    9   7  14    2   6  12    0.000    0.000       0
+  0     31 00:10:20.00  20.0000D   0.4589  -0.4757   0.8018  0.037  1.18  -0.308E+01    500.  0.543E-02  0.540E-02  0.108E-03  0.318E-14    5  14  20    8   2   6    3   6  12    0.000    0.000       0
+  0     32 00:10:40.00  20.0000D   0.4450  -0.4782   0.9236  0.040  1.18  -0.288E+01    500.  0.579E-02  0.576E-02  0.110E-03  0.344E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     33 00:11:00.00  20.0000A   0.4349  -0.4767   1.0530  0.043  1.18  -0.266E+01    500.  0.629E-02  0.626E-02  0.111E-03  0.377E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     34 00:11:20.00  20.0000A  -0.4684  -0.5184   1.1853  0.046  1.18  -0.249E+01    500.  0.699E-02  0.696E-02  0.111E-03  0.416E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     35 00:11:40.00  20.0000A  -0.5110  -0.5803   1.3146  0.049  1.18  -0.233E+01    500.  0.793E-02  0.791E-02  0.112E-03  0.464E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     36 00:12:00.00  20.0000A  -0.5522  -0.6460   1.4351  0.052  1.18  -0.218E+01    500.  0.920E-02  0.917E-02  0.112E-03  0.522E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     37 00:12:20.00  20.0000A   0.6173  -0.7139   1.6132  0.055  1.18  -0.205E+01    500.  0.109E-01  0.108E-01  0.112E-03  0.591E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     38 00:12:40.00  20.0000A   0.6867  -0.7795   1.7863  0.059  1.18  -0.193E+01    500.  0.130E-01  0.130E-01  0.112E-03  0.673E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     39 00:13:00.00  20.0000A   0.7575  -0.8399   1.9135  0.062  1.18  -0.183E+01    500.  0.158E-01  0.158E-01  0.112E-03  0.767E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     40 00:13:20.00  20.0000A   0.8277  -0.8934   2.1012  0.066  1.18  -0.173E+01    500.  0.193E-01  0.193E-01  0.114E-03  0.877E-14    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     41 00:13:40.00  20.0000A   0.8945  -0.9393   2.2220  0.069  1.18  -0.165E+01    500.  0.237E-01  0.236E-01  0.116E-03  0.100E-13    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     42 00:14:00.00  18.9000A   0.9549  -0.9777   2.3774  0.072  1.28  -0.157E+01    650.  0.290E-01  0.290E-01  0.120E-03  0.115E-13    1  35  11    1  29  17    6   6  12    0.000    0.000       0
+  0     43 00:14:18.89  18.4000A   1.0030  -1.0299   2.4491  0.075  1.28  -0.151E+01    650.  0.352E-01  0.351E-01  0.119E-03  0.123E-13    1  35  11    1  28  17    6   6  12    0.000    0.000       0
+  0     44 00:14:37.29  17.7000A   1.0386  -1.1114   2.5494  0.078  1.28  -0.147E+01    650.  0.421E-01  0.421E-01  0.122E-03  0.135E-13    1  35  11    1  28  17    7   6  12    0.000    0.000       0
+  0     45 00:14:55.00  16.2000A   1.0601  -1.1794   2.7727  0.081  1.28  -0.141E+01    650.  0.499E-01  0.498E-01  0.125E-03  0.146E-13    1  35  11    1  28  17    5  24   2    0.000    0.000       0
+  0     46 00:15:11.20  15.4000A   1.0661  -1.2312   2.9236  0.083  1.18  -0.138E+01    500.  0.578E-01  0.578E-01  0.122E-03  0.148E-13    1  35  11    1  28  17    6  24   2    0.000    0.000       0
+  0     47 00:15:26.60  14.3000A  -1.0749  -1.2699   3.1406  0.084  1.28  -0.135E+01    650.  0.662E-01  0.661E-01  0.124E-03  0.155E-13    1  24  19    1  28  17    6  24   2    0.000    0.000       0
+  0     48 00:15:40.89  13.8000A   1.1037  -1.2967   3.2568  0.086  1.28  -0.132E+01    650.  0.746E-01  0.745E-01  0.122E-03  0.156E-13    1  17  38    1  28  17    6  24   2    0.000    0.000       0
+  0     49 00:15:54.69  13.1000A   1.1514  -1.3146   3.4225  0.087  1.28  -0.131E+01    650.  0.832E-01  0.832E-01  0.125E-03  0.163E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     50 00:16:07.79  12.9000A   1.1883  -1.3252   3.4997  0.088  1.29  -0.130E+01    650.  0.919E-01  0.919E-01  0.125E-03  0.167E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     51 00:16:20.69  12.4000A   1.2162  -1.3305   3.6233  0.089  1.29  -0.129E+01    650.  0.101E+00  0.101E+00  0.130E-03  0.175E-13    1  17  38    1  28  17    8  24   2    0.000    0.000       0
+  0     52 00:16:33.09  12.3000A   1.2350  -1.3452   3.6676  0.090  1.29  -0.128E+01    650.  0.110E+00  0.110E+00  0.131E-03  0.179E-13    1  17  38    1  28  18    8  24   2    0.000    0.000       0
+  0     53 00:16:45.39  11.9000A   1.2464  -1.3669   3.7669  0.091  1.29  -0.126E+01    650.  0.119E+00  0.119E+00  0.136E-03  0.188E-13    1  17  38    1  28  18    9  34  13    0.000    0.000       0
+  0     54 00:16:57.29  11.4000A   1.2897  -1.3821   3.9424  0.092  1.29  -0.126E+01    650.  0.128E+00  0.128E+00  0.138E-03  0.191E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     55 00:17:08.69  11.2000A   1.3175  -1.3912   4.0217  0.092  1.29  -0.124E+01    650.  0.136E+00  0.136E+00  0.138E-03  0.192E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     56 00:17:19.89  10.8000A  -1.3130  -1.3950   4.1809  0.093  1.38  -0.123E+01    800.  0.145E+00  0.145E+00  0.141E-03  0.198E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     57 00:17:30.69  10.6000A  -1.3858  -1.3942   4.2493  0.093  1.38  -0.123E+01    800.  0.153E+00  0.153E+00  0.141E-03  0.199E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     58 00:17:41.29  10.4000A  -1.4208  -1.3896   4.3438  0.094  1.38  -0.122E+01    800.  0.162E+00  0.162E+00  0.144E-03  0.204E-13    5  29  17    1  28  18   11  34  13    0.000    0.000       0
+  0     59 00:17:51.69  10.2000A  -1.4345   1.3902   4.4002  0.095  1.38  -0.121E+01    800.  0.170E+00  0.170E+00  0.146E-03  0.208E-13    5  29  17    7  37  19   11  34  13    0.000    0.000       0
+  0     60 00:18:01.89  10.1000A  -1.4414   1.4901   4.4539  0.095  1.38  -0.120E+01    800.  0.177E+00  0.177E+00  0.148E-03  0.212E-13    4  32  19    7  37  19   12  34  13    0.000    0.000       0
+  0     61 00:18:11.99  10.0000A  -1.4695  -1.5076   4.4829  0.096  1.38  -0.120E+01    800.  0.185E+00  0.185E+00  0.151E-03  0.217E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     62 00:18:21.99  10.0000A  -1.4856  -1.6263   4.4854  0.096  1.38  -0.119E+01    800.  0.193E+00  0.192E+00  0.154E-03  0.222E-13    4  32  19    8   7  16   13  34  13    0.000    0.000       0
+  0     63 00:18:31.99  10.0000A  -1.4918  -1.7187   4.4802  0.097  1.38  -0.118E+01    800.  0.200E+00  0.200E+00  0.158E-03  0.229E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     64 00:18:41.99  10.1000A  -1.5052  -1.7636   4.4361  0.097  1.38  -0.116E+01    800.  0.207E+00  0.207E+00  0.163E-03  0.235E-13    4  32  18    8   7  16   14  34  13    0.000    0.000       0
+  0     65 00:18:52.09  10.2000A  -1.5591  -1.7463   4.4065  0.098  1.41  -0.116E+01    850.  0.214E+00  0.214E+00  0.169E-03  0.245E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     66 00:19:02.29  10.3000A  -1.5903  -1.6646   4.3493  0.099  1.41  -0.115E+01    850.  0.221E+00  0.221E+00  0.175E-03  0.253E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     67 00:19:12.59  10.5000A  -1.5979  -1.6322   4.2954  0.099  1.41  -0.115E+01    850.  0.228E+00  0.228E+00  0.180E-03  0.262E-13    4  32  18    9   7  16   15  35  12    0.000    0.000       0
+  0     68 00:19:23.09  10.5000A  -1.5832   1.6962   4.2656  0.100  1.41  -0.114E+01    850.  0.235E+00  0.234E+00  0.188E-03  0.273E-13    4  32  18   12  17  28   15  35  12    0.000    0.000       0
+  0     69 00:19:33.59  10.8000A  -1.5952  -1.7195   4.1677  0.101  1.41  -0.113E+01    850.  0.241E+00  0.241E+00  0.192E-03  0.279E-13    7  12   6    9   7  16   16  35  13    0.000    0.000       0
+  0     70 00:19:44.39  10.7000A  -1.5975  -1.7885   4.1887  0.101  1.41  -0.113E+01    850.  0.247E+00  0.247E+00  0.202E-03  0.293E-13    7  12   6   10   7  17   16  35  13    0.000    0.000       0
+  0     71 00:19:55.09  11.0000A   1.6027  -1.8310   4.1010  0.102  1.41  -0.112E+01    850.  0.253E+00  0.252E+00  0.204E-03  0.295E-13    7   1  37   10   7  17   12  23  18    0.000    0.000       0
+  0     72 00:20:06.09  10.9000A   1.7032  -1.8108   4.1396  0.103  1.41  -0.111E+01    850.  0.258E+00  0.258E+00  0.214E-03  0.308E-13    7  24  30   10   7  17   12  23  18    0.000    0.000       0
+  0     73 00:20:16.99  10.9000A   1.8376   1.7452   4.1413  0.104  1.41  -0.109E+01    850.  0.262E+00  0.262E+00  0.215E-03  0.309E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     74 00:20:27.89  10.7000A   1.9136   1.8271   4.1969  0.105  1.41  -0.107E+01    850.  0.267E+00  0.266E+00  0.219E-03  0.313E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     75 00:20:38.59  10.7000A   1.9332  -1.8931   4.1941  0.106  1.41  -0.106E+01    850.  0.270E+00  0.270E+00  0.218E-03  0.311E-13    7  24  30    9   4   0   13  23  17    0.000    0.000       0
+  0     76 00:20:49.29  10.7000A   1.9366  -1.9949   4.2226  0.107  1.41  -0.105E+01    850.  0.273E+00  0.273E+00  0.220E-03  0.314E-13    7  24  31    9   4   0   13  23  17    0.000    0.000       0
+  0     77 00:21:00.00  10.5000A   2.0189  -2.0694   4.2693  0.108  1.41  -0.104E+01    850.  0.276E+00  0.275E+00  0.223E-03  0.317E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     78 00:21:10.50  10.5000A   2.0530  -2.1078   4.3031  0.109  1.41  -0.103E+01    850.  0.278E+00  0.277E+00  0.221E-03  0.314E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     79 00:21:21.00  10.4000A   2.0502  -2.1052   4.3253  0.110  1.41  -0.102E+01    850.  0.279E+00  0.279E+00  0.223E-03  0.316E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     80 00:21:31.40  10.4000A   2.0227  -2.0595   4.3225  0.111  1.41  -0.101E+01    850.  0.281E+00  0.280E+00  0.222E-03  0.315E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     81 00:21:41.80  10.5000A   1.9814  -1.9732   4.2991  0.112  1.41  -0.100E+01    850.  0.282E+00  0.281E+00  0.224E-03  0.316E-13    7  24  31    9   4   0   15  23  17    0.000    0.000       0
+  0     82 00:21:52.30  10.4000A   1.9340  -1.9475   4.3286  0.113  1.41  -0.982E+00    850.  0.283E+00  0.282E+00  0.227E-03  0.321E-13    7  24  31   10   4   0   15  23  17    0.000    0.000       0
+  0     83 00:22:02.70  10.5000A   1.8924  -2.0069   4.3038  0.114  1.41  -0.972E+00    850.  0.283E+00  0.283E+00  0.226E-03  0.320E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     84 00:22:13.20  10.7000A   1.9415  -2.0355   4.2040  0.115  1.41  -0.961E+00    850.  0.283E+00  0.283E+00  0.229E-03  0.324E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     85 00:22:23.90  10.8000A   1.9325  -2.0217   4.1559  0.116  1.41  -0.952E+00    850.  0.284E+00  0.283E+00  0.234E-03  0.332E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     86 00:22:34.70  11.0000A   1.8907  -1.9607   4.0835  0.117  1.38  -0.945E+00    800.  0.284E+00  0.283E+00  0.237E-03  0.336E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     87 00:22:45.70  11.4000A   1.8309  -1.8652   3.9358  0.118  1.38  -0.942E+00    800.  0.283E+00  0.283E+00  0.242E-03  0.344E-13   14   4   0   10   3   0   16  23  17    0.000    0.000       0
+  0     88 00:22:57.10  12.0000A   1.8977  -1.8027   3.7438  0.119  1.38  -0.929E+00    800.  0.283E+00  0.283E+00  0.252E-03  0.357E-13   15   4   1    7  24   4   16  23  17    0.000    0.000       0
+  0     89 00:23:09.10  12.6000A   1.9544  -1.8206   3.5844  0.119  1.38  -0.923E+00    800.  0.283E+00  0.282E+00  0.265E-03  0.376E-13   15   4   1    8  23   4   17  23  17    0.000    0.000       0
+  0     90 00:23:21.70  12.9000A   1.9261  -1.9283   3.4830  0.120  1.38  -0.920E+00    800.  0.282E+00  0.282E+00  0.278E-03  0.395E-13   15   4   1    8  23   4   16  12  29    0.000    0.000       0
+  0     91 00:23:34.60  13.2000A   1.8512  -2.0241   3.4202  0.121  1.38  -0.928E+00    800.  0.282E+00  0.281E+00  0.284E-03  0.404E-13   15   4   1    8  23   4   11  22  39    0.000    0.000       0
+  0     92 00:23:47.80  13.4000A   1.7632  -2.1053   3.3553  0.121  1.38  -0.909E+00    800.  0.281E+00  0.281E+00  0.290E-03  0.412E-13   15   4   1    8  23   4   12  22  39    0.000    0.000       0
+  0     93 00:24:01.20  13.6000A   1.7138  -2.1674   3.2986  0.122  1.35  -0.903E+00    750.  0.281E+00  0.280E+00  0.293E-03  0.418E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     94 00:24:14.80  13.9000A   1.7170  -2.2027   3.2411  0.122  1.35  -0.901E+00    750.  0.280E+00  0.279E+00  0.296E-03  0.423E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     95 00:24:28.70  14.1000A   1.7197  -2.1983   3.1899  0.123  1.35  -0.896E+00    750.  0.279E+00  0.279E+00  0.301E-03  0.431E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     96 00:24:42.80  14.1000A   1.7153  -2.1719   3.1976  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.303E-03  0.435E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     97 00:24:56.90  13.8000A   1.6963  -2.1325   3.2561  0.123  1.35  -0.890E+00    750.  0.279E+00  0.278E+00  0.302E-03  0.432E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     98 00:25:10.70  13.8000A  -1.7049  -2.1009   3.2710  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.295E-03  0.420E-13    8  25   1    8  23   5   11  23   1    0.000    0.000       0
+  0     99 00:25:24.50  13.8000A   1.7204  -2.1783   3.2616  0.123  1.35  -0.892E+00    750.  0.278E+00  0.278E+00  0.295E-03  0.417E-13   10  26  31    8  23   5   11  23   1    0.000    0.000       0
+  0    100 00:25:38.30  13.8000A   1.7625  -2.1980   3.2579  0.124  1.41  -0.893E+00    850.  0.278E+00  0.278E+00  0.294E-03  0.413E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    101 00:25:52.10  14.0000A   1.7838  -2.1524   3.2052  0.124  1.38  -0.899E+00    800.  0.278E+00  0.277E+00  0.293E-03  0.409E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    102 00:26:06.10  14.1000A   1.7815  -2.0874   3.1853  0.124  1.38  -0.896E+00    800.  0.278E+00  0.277E+00  0.297E-03  0.411E-13   10  26  31    8  22   5   13  23   1    0.000    0.000       0
+  0    103 00:26:20.20  14.4000A  -1.8038  -2.1448   3.1345  0.124  1.38  -0.895E+00    800.  0.277E+00  0.277E+00  0.298E-03  0.410E-13   16  22  38    8  22   5   12  23  19    0.000    0.000       0
+  0    104 00:26:34.60  14.4000A   1.7966  -2.1120   3.1256  0.124  1.38  -0.894E+00    800.  0.277E+00  0.276E+00  0.303E-03  0.414E-13    1  36  26    8  22   5   12  23  19    0.000    0.000       0
+  0    105 00:26:49.00  14.4000A   1.8540  -1.9957   3.1203  0.124  1.38  -0.894E+00    800.  0.276E+00  0.276E+00  0.301E-03  0.410E-13    1  37  26    8  22   5    9  38  26    0.000    0.000       0
+  0    106 00:27:03.40  14.1000A   1.8694   1.8628   3.1953  0.125  1.38  -0.898E+00    800.  0.276E+00  0.275E+00  0.299E-03  0.407E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    107 00:27:17.50  13.8000A   1.8312   1.8697   3.2551  0.125  1.38  -0.900E+00    800.  0.275E+00  0.274E+00  0.292E-03  0.396E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    108 00:27:31.30  13.8000A   1.8481   1.8974   3.2672  0.125  1.38  -0.900E+00    800.  0.274E+00  0.274E+00  0.285E-03  0.386E-13    1  16  38    8  35  23   10  38  26    0.000    0.000       0
+  0    109 00:27:45.10  13.9000A   1.9162   1.9278   3.2486  0.125  1.38  -0.900E+00    800.  0.274E+00  0.273E+00  0.284E-03  0.385E-13    1  16  39    8  35  23   10  38  26    0.000    0.000       0
+  0    110 00:27:59.00  13.9000A   1.9932   1.9444   3.2453  0.126  1.38  -0.902E+00    800.  0.273E+00  0.272E+00  0.285E-03  0.387E-13    1  16  39    8  36  23   11  38  26    0.000    0.000       0
+  0    111 00:28:12.90  13.9000A   2.0637   2.0411   3.2331  0.126  1.38  -0.897E+00    800.  0.272E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    112 00:28:26.80  14.0000A   2.1140   2.0927   3.2228  0.126  1.38  -0.895E+00    800.  0.271E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    113 00:28:40.80  14.0000A   2.1252   2.1098   3.2064  0.126  1.41  -0.895E+00    850.  0.270E+00  0.270E+00  0.287E-03  0.388E-13    1  16  39    9  36  23   13  37  37    0.000    0.000       0
+  0    114 00:28:54.80  14.0000A   2.1629   2.1114   3.2196  0.127  1.41  -0.893E+00    850.  0.269E+00  0.268E+00  0.287E-03  0.388E-13    1  16   0    9  36  23   13  37  37    0.000    0.000       0
+  0    115 00:29:08.80  13.9000A   2.1941   2.1436   3.2459  0.127  1.41  -0.889E+00    850.  0.268E+00  0.267E+00  0.286E-03  0.387E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    116 00:29:22.70  13.9000A   2.1660   2.1317   3.2349  0.127  1.41  -0.888E+00    850.  0.266E+00  0.266E+00  0.284E-03  0.384E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    117 00:29:36.60  14.2000A   2.1114   2.0437   3.1772  0.127  1.38  -0.891E+00    800.  0.265E+00  0.264E+00  0.285E-03  0.383E-13    1  16   1    9  37  23   14  37  37    0.000    0.000       0
+  0    118 00:29:50.80  14.3000A   2.1168   1.8997   3.1409  0.128  1.38  -0.905E+00    800.  0.263E+00  0.262E+00  0.291E-03  0.390E-13    1  16   1    9  37  23   14   9  10    0.000    0.000       0
+  0    119 00:30:05.10  14.4000A   2.0639  -1.9024   3.1211  0.128  1.38  -0.889E+00    800.  0.261E+00  0.260E+00  0.293E-03  0.391E-13    1  16   1   10   6  21   13   6  16    0.000    0.000       0
+  0    120 00:30:19.50  14.1000A   2.0191  -2.0149   3.1855  0.128  1.38  -0.885E+00    800.  0.259E+00  0.258E+00  0.294E-03  0.391E-13    1  17   1   10   6  21    7  25  19    0.000    0.000       0
+  0    121 00:30:33.60  13.8000A  -2.0333  -2.0438   3.2493  0.128  1.38  -0.882E+00    800.  0.257E+00  0.256E+00  0.288E-03  0.381E-13    9  10  18   10   6  21    8  25  19    0.000    0.000       0
+  0    122 00:30:47.40  13.5000A   1.9276  -2.0991   3.3455  0.129  1.38  -0.884E+00    800.  0.254E+00  0.254E+00  0.281E-03  0.371E-13    1  17   1   10   5  21    8  25  19    0.000    0.000       0
+  0    123 00:31:00.90  13.3000A  -1.9161  -2.1236   3.3942  0.129  1.41  -0.879E+00    850.  0.252E+00  0.251E+00  0.275E-03  0.361E-13   10   8  19   10   5  21    9  25  19    0.000    0.000       0
+  0    124 00:31:14.20  13.1000A  -1.9563  -2.0675   3.4440  0.129  1.41  -0.879E+00    850.  0.249E+00  0.249E+00  0.270E-03  0.353E-13   10   9  18   10   5  21    9  25  19    0.000    0.000       0
+  0    125 00:31:27.30  13.1000A  -1.8492  -1.9400   3.4359  0.128  1.41  -0.885E+00    850.  0.247E+00  0.246E+00  0.265E-03  0.345E-13   10   9  18   10   5  21   10  25  19    0.000    0.000       0
+  0    126 00:31:40.40  13.1000A  -1.9169  -1.9001   3.4331  0.128  1.41  -0.884E+00    850.  0.245E+00  0.244E+00  0.264E-03  0.343E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  0    127 00:31:53.50  13.4000A  -1.9327  -1.8837   3.3592  0.128  1.41  -0.890E+00    850.  0.242E+00  0.241E+00  0.263E-03  0.341E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  0    128 00:32:06.90  13.7000A  -1.9667  -1.8724   3.2909  0.128  1.41  -0.894E+00    850.  0.239E+00  0.239E+00  0.268E-03  0.346E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  0    129 00:32:20.60  13.9000A  -2.0586  -1.8788   3.2452  0.127  1.41  -0.899E+00    850.  0.237E+00  0.236E+00  0.273E-03  0.351E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  0    130 00:32:34.50  14.1000A  -2.0979  -1.8873   3.2012  0.127  1.41  -0.902E+00    850.  0.234E+00  0.233E+00  0.275E-03  0.353E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  0    131 00:32:48.60  14.2000A  -2.1232  -1.8963   3.1743  0.127  1.41  -0.904E+00    850.  0.232E+00  0.231E+00  0.278E-03  0.355E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  0    132 00:33:02.80  14.6000A  -2.1511  -1.9032   3.0741  0.126  1.41  -0.904E+00    850.  0.229E+00  0.228E+00  0.278E-03  0.354E-13   13  26  19    1  13  16   10   8  19    0.000    0.000       0
+  0    133 00:33:17.40  14.7000A  -2.2399  -1.9049   3.0632  0.126  1.41  -0.910E+00    850.  0.227E+00  0.226E+00  0.285E-03  0.360E-13   14  26  18    1  13  16   10   8  19    0.000    0.000       0
+  0    134 00:33:32.10  14.7000A  -2.3269  -1.8979   3.0641  0.125  1.41  -0.911E+00    850.  0.225E+00  0.224E+00  0.286E-03  0.359E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  0    135 00:33:46.80  14.6000A  -2.4204  -1.8791   3.0732  0.125  1.41  -0.914E+00    850.  0.223E+00  0.222E+00  0.285E-03  0.355E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  0    136 00:34:01.40  14.9000A  -2.5050  -1.8780   3.0299  0.124  1.38  -0.913E+00    800.  0.221E+00  0.220E+00  0.282E-03  0.349E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  0    137 00:34:16.30  15.2000A  -2.5433  -1.8650   2.9683  0.124  1.38  -0.911E+00    800.  0.219E+00  0.218E+00  0.286E-03  0.353E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  0    138 00:34:31.50  15.3000A  -2.4931  -1.8365   2.9450  0.123  1.38  -0.912E+00    800.  0.218E+00  0.217E+00  0.290E-03  0.357E-13   14  26  18    1  12  16   12   8  19    0.000    0.000       0
+  0    139 00:34:46.80  15.4000A  -2.3625  -1.7932   2.9239  0.122  1.38  -0.922E+00    800.  0.216E+00  0.215E+00  0.292E-03  0.356E-13   14  27  18    1  12  16   12   8  19    0.000    0.000       0
+  0    140 00:35:02.20  15.5000A  -2.3955  -1.7711   2.8952  0.122  1.38  -0.917E+00    800.  0.215E+00  0.214E+00  0.293E-03  0.355E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  0    141 00:35:17.70  15.8000A  -2.4783  -1.7375   2.8481  0.121  1.38  -0.922E+00    800.  0.214E+00  0.213E+00  0.294E-03  0.354E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  0    142 00:35:33.50  15.8000A  -2.4727   1.7971   2.8403  0.121  1.38  -0.929E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.357E-13   15  26  17    8  34  23   14  26  24    0.000    0.000       0
+  0    143 00:35:49.30  15.7000A  -2.3660  -1.7720   2.8642  0.120  1.38  -0.927E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.354E-13   15  26  17    1   8  35    6  38  32    0.000    0.000       0
+  0    144 00:36:05.00  15.3000A  -2.2554  -1.7519   2.9492  0.119  1.38  -0.931E+00    800.  0.212E+00  0.211E+00  0.297E-03  0.349E-13   15  26  16    1   7  34    6  38  32    0.000    0.000       0
+  0    145 00:36:20.30  14.7000A  -2.1060  -1.8205   3.0663  0.119  1.38  -0.940E+00    800.  0.212E+00  0.211E+00  0.290E-03  0.339E-13   15  26  16    1   6  34    7  38  32    0.000    0.000       0
+  0    146 00:36:35.00  14.2000A  -2.0342  -1.8476   3.1662  0.118  1.38  -0.941E+00    800.  0.212E+00  0.211E+00  0.278E-03  0.325E-13   11  11  13    1   6  34    7  38  32    0.000    0.000       0
+  0    147 00:36:49.20  13.9000A  -2.0417  -1.8187   3.2309  0.118  1.38  -0.945E+00    800.  0.211E+00  0.211E+00  0.269E-03  0.313E-13   10  12  14    1   5  34    7  38  32    0.000    0.000       0
+  0    148 00:37:03.10  13.6000A  -2.1224  -1.8939   3.2986  0.117  1.38  -0.950E+00    800.  0.211E+00  0.210E+00  0.264E-03  0.306E-13   10  12  14    1   5  34    8  38  32    0.000    0.000       0
+  0    149 00:37:16.70  13.4000A  -2.1388  -1.8889   3.3525  0.117  1.38  -0.952E+00    800.  0.211E+00  0.210E+00  0.258E-03  0.299E-13   11  12  13    1   5  34    8  38  32    0.000    0.000       0
+  0    150 00:37:30.10  13.4000A  -2.1449  -1.8704   3.3574  0.116  1.38  -0.957E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.294E-13   11  12  13    1   6  35    8  38  32    0.000    0.000       0
+  0    151 00:37:43.50  13.5000A  -2.1129  -1.9084   3.3383  0.116  1.38  -0.961E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    152 00:37:57.00  13.6000A  -2.0518  -1.9761   3.3117  0.116  1.38  -0.963E+00    800.  0.211E+00  0.210E+00  0.257E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    153 00:38:10.60  13.9000A  -1.9674  -1.9342   3.2347  0.115  1.41  -0.967E+00    850.  0.211E+00  0.210E+00  0.259E-03  0.294E-13   13  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    154 00:38:24.50  14.2000A   1.9542  -2.0470   3.1585  0.115  1.41  -0.973E+00    850.  0.211E+00  0.210E+00  0.265E-03  0.298E-13    7  28  21    1   4  35    8  10   7    0.000    0.000       0
+  0    155 00:38:38.70  13.5000A   1.9898  -2.0559   3.3410  0.115  1.41  -0.974E+00    850.  0.211E+00  0.210E+00  0.271E-03  0.303E-13    7  28  22    1   4  35    8   9   7    0.000    0.000       0
+  0    156 00:38:52.20  12.8000A   1.9996  -1.9579   3.5029  0.114  1.41  -0.976E+00    850.  0.211E+00  0.210E+00  0.258E-03  0.288E-13    7  28  22    1   4  35    9   9   7    0.000    0.000       0
+  0    157 00:39:05.00  12.6000A   1.9398  -2.0307   3.5698  0.114  1.41  -0.981E+00    850.  0.211E+00  0.210E+00  0.246E-03  0.273E-13    7  28  22    1   3  35    9   9   7    0.000    0.000       0
+  0    158 00:39:17.60  12.5000A  -1.8941  -2.0019   3.6009  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.243E-03  0.268E-13   14  13  11    1   3  35   10   9   7    0.000    0.000       0
+  0    159 00:39:30.10  12.8000A  -1.8379  -1.8935   3.5261  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.241E-03  0.266E-13    8  13  15    1   3  35   10   8   6    0.000    0.000       0
+  0    160 00:39:42.90  13.0000A  -1.8526   1.8509   3.4685  0.114  1.41  -0.987E+00    850.  0.212E+00  0.211E+00  0.248E-03  0.272E-13    8  13  14   17  15  11   10   8   6    0.000    0.000       0
+  0    161 00:39:55.90  13.1000A  -1.8830   1.9398   3.4337  0.113  1.41  -0.988E+00    850.  0.212E+00  0.211E+00  0.252E-03  0.276E-13    8  13  14   17  15  11   11   8   6    0.000    0.000       0
+  0    162 00:40:09.00  13.1000A  -1.8941   1.9798   3.4235  0.113  1.41  -0.989E+00    850.  0.212E+00  0.211E+00  0.255E-03  0.278E-13    8  13  14   17  15  11   10   9   8    0.000    0.000       0
+  0    163 00:40:22.10  12.9000A  -1.9001   1.9872   3.4874  0.113  1.41  -0.992E+00    850.  0.212E+00  0.211E+00  0.256E-03  0.279E-13    9  13  14   17  16  11   10   9   8    0.000    0.000       0
+  0    164 00:40:35.00  13.0000A  -1.9031   2.1070   3.4497  0.113  1.41  -0.994E+00    850.  0.213E+00  0.211E+00  0.253E-03  0.275E-13    9  13  14   17  16  11   11   9   8    0.000    0.000       0
+  0    165 00:40:48.00  13.3000A  -1.9423   2.1554   3.3887  0.113  1.41  -0.994E+00    850.  0.213E+00  0.212E+00  0.256E-03  0.278E-13   18  13   9   17  16  11   11   9   8    0.000    0.000       0
+  0    166 00:41:01.30  13.5000A  -1.9704   2.1123   3.3329  0.113  1.41  -0.997E+00    850.  0.213E+00  0.212E+00  0.263E-03  0.285E-13   18  13   9   17  16  11   12   8   7    0.000    0.000       0
+  0    167 00:41:14.80  13.7000A  -1.9694   2.1270   3.2763  0.113  1.41  -0.100E+01    850.  0.213E+00  0.212E+00  0.268E-03  0.290E-13   18  14   9   17  17  11   11   8   8    0.000    0.000       0
+  0    168 00:41:28.50  13.6000A  -1.9760   2.1839   3.3015  0.113  1.41  -0.100E+01    850.  0.214E+00  0.212E+00  0.274E-03  0.295E-13   18  14   9   17  17  11   12   8   8    0.000    0.000       0
+  0    169 00:41:42.10  13.5000A   1.9771   2.1764   3.3436  0.113  1.41  -0.101E+01    850.  0.214E+00  0.212E+00  0.273E-03  0.294E-13   12   5  12   18  18   9   12   8   8    0.000    0.000       0
+  0    170 00:41:55.60  13.5000A   1.9792   2.2380   3.3212  0.113  1.38  -0.101E+01    800.  0.214E+00  0.213E+00  0.272E-03  0.293E-13   12   5  12   17  18  10   12   8   8    0.000    0.000       0
+  0    171 00:42:09.10  13.5000A  -1.9920   2.2282   3.3396  0.113  1.38  -0.101E+01    800.  0.215E+00  0.213E+00  0.272E-03  0.293E-13   18  14   8   17  18  10   13   8   8    0.000    0.000       0
+  0    172 00:42:22.60  13.6000A  -1.9824   2.1821   3.3107  0.113  1.38  -0.101E+01    800.  0.215E+00  0.214E+00  0.273E-03  0.294E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  0    173 00:42:36.20  13.9000A  -1.9733   2.2182   3.2283  0.113  1.38  -0.101E+01    800.  0.216E+00  0.214E+00  0.276E-03  0.297E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  0    174 00:42:50.10  14.0000A  -1.9902   2.1923   3.2049  0.113  1.38  -0.101E+01    800.  0.217E+00  0.215E+00  0.282E-03  0.304E-13   18  15   7   17  19  10   14   8   8    0.000    0.000       0
+  0    175 00:43:04.10  14.3000A  -1.9628   2.2236   3.1431  0.113  1.38  -0.101E+01    800.  0.218E+00  0.216E+00  0.284E-03  0.306E-13   18  15   7   17  20   9   14   8   8    0.000    0.000       0
+  0    176 00:43:18.40  14.7000A  -1.9286   2.2221   3.0510  0.114  1.38  -0.100E+01    800.  0.219E+00  0.217E+00  0.290E-03  0.313E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  0    177 00:43:33.10  15.2000A  -1.9659   2.1643   2.9559  0.114  1.38  -0.100E+01    800.  0.220E+00  0.218E+00  0.298E-03  0.321E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  0    178 00:43:48.30  15.4000A  -1.9127   2.1075   2.9237  0.114  1.38  -0.994E+00    800.  0.221E+00  0.219E+00  0.308E-03  0.332E-13   17  14   4   18  18  12   10   9  18    0.000    0.000       0
+  0    179 00:44:03.70  15.0000A  -1.8884   2.1390   3.0072  0.114  1.38  -0.999E+00    800.  0.222E+00  0.221E+00  0.312E-03  0.337E-13   17  15   4   18  19  11   10   9  18    0.000    0.000       0
+  0    180 00:44:18.70  14.6000A  -1.8147   2.1196   3.0730  0.115  1.38  -0.991E+00    800.  0.223E+00  0.222E+00  0.305E-03  0.328E-13   16  15   3   18  19  11   11   9  18    0.000    0.000       0
+  0    181 00:44:33.30  14.5000A  -1.7675   2.1466   3.1106  0.115  1.43  -0.990E+00    900.  0.225E+00  0.223E+00  0.298E-03  0.321E-13   16  15   3   18  17  13   13  11  16    0.000    0.000       0
+  0    182 00:44:47.80  14.1000A   1.7568   2.1526   3.1822  0.115  1.43  -0.993E+00    900.  0.226E+00  0.225E+00  0.297E-03  0.319E-13    9  27  23   18  17  13   13  11  16    0.000    0.000       0
+  0    183 00:45:01.90  13.8000A   1.7835   2.1657   3.2535  0.116  1.43  -0.990E+00    900.  0.228E+00  0.226E+00  0.290E-03  0.312E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  0    184 00:45:15.70  13.5000A   1.7943   2.1918   3.3330  0.116  1.43  -0.991E+00    900.  0.229E+00  0.228E+00  0.284E-03  0.306E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  0    185 00:45:29.20  13.3000A   1.8092   2.2021   3.3948  0.116  1.43  -0.998E+00    900.  0.231E+00  0.230E+00  0.279E-03  0.300E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  0    186 00:45:42.50  13.1000A   1.8565   2.1995   3.4255  0.117  1.43  -0.992E+00    900.  0.233E+00  0.231E+00  0.276E-03  0.297E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  0    187 00:45:55.60  13.0000A   1.8904   2.1843   3.4615  0.117  1.43  -0.988E+00    900.  0.234E+00  0.233E+00  0.273E-03  0.293E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    188 00:46:08.60  12.9000A   1.9081   2.1553   3.4894  0.117  1.43  -0.984E+00    900.  0.236E+00  0.235E+00  0.272E-03  0.292E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    189 00:46:21.50  12.9000A   1.9077   2.1095   3.4835  0.118  1.43  -0.983E+00    900.  0.238E+00  0.236E+00  0.271E-03  0.291E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    190 00:46:34.40  13.0000A   1.8879   2.0648   3.4661  0.118  1.43  -0.983E+00    900.  0.240E+00  0.238E+00  0.272E-03  0.292E-13    9  27  24   18  19  12   16  11  16    0.000    0.000       0
+  0    191 00:46:47.40  13.0000A   1.8974   2.0485   3.4724  0.118  1.43  -0.984E+00    900.  0.241E+00  0.240E+00  0.275E-03  0.295E-13    9  26  25   18  19  12   16  11  16    0.000    0.000       0
+  0    192 00:47:00.40  13.0000A   1.8868   2.0432   3.4549  0.119  1.41  -0.983E+00    850.  0.243E+00  0.242E+00  0.276E-03  0.296E-13    9  26  25    8   4   0   16  11  16    0.000    0.000       0
+  0    193 00:47:13.40  13.2000A   1.8944   2.0245   3.4199  0.119  1.41  -0.979E+00    850.  0.245E+00  0.244E+00  0.277E-03  0.298E-13    9  27  25    8   4   0   16  11  16    0.000    0.000       0
+  0    194 00:47:26.60  13.3000A   1.8837   2.0250   3.3852  0.119  1.41  -0.973E+00    850.  0.247E+00  0.246E+00  0.283E-03  0.305E-13    9  27  25   19  18  13   14  10  17    0.000    0.000       0
+  0    195 00:47:39.90  13.2000A   1.8504   2.0329   3.4017  0.119  1.41  -0.971E+00    850.  0.249E+00  0.247E+00  0.286E-03  0.309E-13    9  27  25   19  18  14   14  10  17    0.000    0.000       0
+  0    196 00:47:53.10  13.2000A   1.8799  -2.0090   3.4180  0.119  1.41  -0.969E+00    850.  0.251E+00  0.249E+00  0.286E-03  0.309E-13    9  27  26   13  38  15   11   9  18    0.000    0.000       0
+  0    197 00:48:06.30  12.9000A  -1.9990  -1.9540   3.4756  0.119  1.41  -0.971E+00    850.  0.253E+00  0.251E+00  0.288E-03  0.312E-13    6   3   1   13  38  15   12   9  18    0.000    0.000       0
+  0    198 00:48:19.20  12.8000A  -2.0710   1.9246   3.5053  0.119  1.41  -0.969E+00    850.  0.255E+00  0.253E+00  0.283E-03  0.308E-13    6   3   1   19  19  13   12   9  18    0.000    0.000       0
+  0    199 00:48:32.00  12.8000A  -2.0835   1.8954   3.5198  0.119  1.41  -0.970E+00    850.  0.256E+00  0.255E+00  0.283E-03  0.309E-13    6   4   0   19  19  13   13   9  18    0.000    0.000       0
+  0    200 00:48:44.80  12.7000A   2.1461   1.8456   3.5374  0.119  1.41  -0.972E+00    850.  0.258E+00  0.257E+00  0.285E-03  0.312E-13    7   2  10   12   4  39   13   9  18    0.000    0.000       0
+  0    201 00:48:57.50  12.7000A   2.1906   1.8531   3.5319  0.119  1.41  -0.972E+00    850.  0.260E+00  0.258E+00  0.285E-03  0.313E-13    7   2  10   12   4  39   14   9  18    0.000    0.000       0
+  0    202 00:49:10.20  12.6000A  -2.2511   1.8608   3.5743  0.119  1.41  -0.975E+00    850.  0.262E+00  0.260E+00  0.286E-03  0.316E-13    7   3   0   12   4  39    9  39   1    0.000    0.000       0
+  0    203 00:49:22.80  12.9000A  -2.3231  -1.9143   3.4963  0.119  1.41  -0.971E+00    850.  0.264E+00  0.262E+00  0.286E-03  0.317E-13    7   3   0    3   8   2   15   9  18    0.000    0.000       0
+  0    204 00:49:35.70  12.9000A  -2.1960  -1.9597   3.4944  0.119  1.41  -0.972E+00    850.  0.266E+00  0.264E+00  0.295E-03  0.328E-13    8   2   0    3   8   2    9   0   0    0.000    0.000       0
+  0    205 00:49:48.60  12.7000A  -2.3746  -2.0424   3.5512  0.119  1.41  -0.977E+00    850.  0.267E+00  0.265E+00  0.296E-03  0.330E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  0    206 00:50:01.30  12.4000A  -2.4137  -2.1028   3.6401  0.118  1.41  -0.979E+00    850.  0.269E+00  0.267E+00  0.293E-03  0.327E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  0    207 00:50:13.70  12.2000A  -2.3703  -2.1193   3.6823  0.118  1.41  -0.975E+00    850.  0.270E+00  0.268E+00  0.288E-03  0.322E-13    8   1   0    3   7   2   10   7  17    0.000    0.000       0
+  0    208 00:50:25.90  12.0000A  -2.4784  -2.0738   3.7509  0.118  1.43  -0.976E+00    900.  0.272E+00  0.270E+00  0.284E-03  0.319E-13    9   1  39    3   7   2   10   7  17    0.000    0.000       0
+  0    209 00:50:37.90  12.0000A  -2.5338  -2.0484   3.7647  0.118  1.43  -0.972E+00    900.  0.273E+00  0.271E+00  0.281E-03  0.316E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  0    210 00:50:49.90  12.1000A  -2.4948  -2.0487   3.7296  0.118  1.43  -0.970E+00    900.  0.274E+00  0.272E+00  0.281E-03  0.317E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  0    211 00:51:02.00  12.1000A  -2.4148  -1.9851   3.7272  0.118  1.43  -0.970E+00    900.  0.275E+00  0.273E+00  0.285E-03  0.321E-13    9   1  39    3   6   2   14   6  18    0.000    0.000       0
+  0    212 00:51:14.09  11.8000A  -2.3625  -2.0341   3.8067  0.118  1.43  -0.972E+00    900.  0.277E+00  0.274E+00  0.285E-03  0.323E-13    9   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    213 00:51:25.90  11.7000A  -2.3582  -2.1289   3.8355  0.118  1.43  -0.979E+00    900.  0.278E+00  0.275E+00  0.279E-03  0.317E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    214 00:51:37.59  11.8000A  -2.3235  -2.1215   3.8110  0.117  1.43  -0.979E+00    900.  0.279E+00  0.276E+00  0.278E-03  0.315E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    215 00:51:49.40  12.0000A  -2.2827  -2.0721   3.7403  0.117  1.43  -0.981E+00    900.  0.280E+00  0.277E+00  0.281E-03  0.319E-13   11   0  38   15  32  38   15   5  18    0.000    0.000       0
+  0    216 00:52:01.40  12.0000A  -2.2481  -2.0085   3.7349  0.117  1.43  -0.979E+00    900.  0.280E+00  0.278E+00  0.287E-03  0.326E-13   11   0  38   15  32  38   16   5  18    0.000    0.000       0
+  0    217 00:52:13.40  12.0000A  -2.2109  -2.0175   3.7380  0.117  1.43  -0.979E+00    900.  0.281E+00  0.279E+00  0.288E-03  0.327E-13   11   0  37   15  32  37   16   5  18    0.000    0.000       0
+  0    218 00:52:25.40  12.2000A  -2.1636  -2.0652   3.6978  0.117  1.43  -0.978E+00    900.  0.282E+00  0.279E+00  0.289E-03  0.328E-13   11   0  37   15  31  37   16   5  18    0.000    0.000       0
+  0    219 00:52:37.59  12.5000A  -2.0832  -2.1463   3.5992  0.117  1.43  -0.979E+00    900.  0.282E+00  0.280E+00  0.294E-03  0.334E-13   12   0  37   15  31  37   16   5  18    0.000    0.000       0
+  0    220 00:52:50.09  13.1000A  -2.0143  -2.1531   3.4456  0.116  1.43  -0.982E+00    900.  0.283E+00  0.280E+00  0.302E-03  0.343E-13   13  23   4   15  31  37   16   5  18    0.000    0.000       0
+  0    221 00:53:03.19  13.6000A  -2.0119  -2.0704   3.3090  0.116  1.43  -0.985E+00    900.  0.283E+00  0.280E+00  0.316E-03  0.359E-13   14  23   3   15  31  37   17   4  18    0.000    0.000       0
+  0    222 00:53:16.79  13.7000A  -1.9914   2.0490   3.2919  0.116  1.43  -0.991E+00    900.  0.283E+00  0.280E+00  0.328E-03  0.371E-13   14  23   3   17  17  10    8   4   4    0.000    0.000       0
+  0    223 00:53:30.49  13.6000A  -1.9520   2.0725   3.3115  0.116  1.43  -0.986E+00    900.  0.283E+00  0.280E+00  0.330E-03  0.373E-13   14  24   3   17  17  10    8  35   5    0.000    0.000       0
+  0    224 00:53:44.09  13.2000A  -1.9920   2.0440   3.4188  0.116  1.43  -0.987E+00    900.  0.283E+00  0.280E+00  0.327E-03  0.369E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  0    225 00:53:57.29  13.1000A  -2.0629   1.9622   3.4411  0.116  1.43  -0.988E+00    900.  0.282E+00  0.280E+00  0.318E-03  0.357E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  0    226 00:54:10.39  13.0000A  -2.0803   1.8350   3.4509  0.115  1.43  -0.998E+00    900.  0.282E+00  0.279E+00  0.315E-03  0.353E-13    9   6   4   17  17  10   10  35   5    0.000    0.000       0
+  0    227 00:54:23.39  13.0000A  -2.1884   1.8751   3.4593  0.115  1.43  -0.995E+00    900.  0.282E+00  0.279E+00  0.313E-03  0.349E-13   10   6   4   13   8   4   10  35   5    0.000    0.000       0
+  0    228 00:54:36.39  13.2000A  -2.2566   1.8853   3.4000  0.115  1.43  -0.101E+01    900.  0.282E+00  0.279E+00  0.313E-03  0.348E-13   10   6   4   13   8   4    9  36   6    0.000    0.000       0
+  0    229 00:54:49.59  12.8000A  -2.2703   1.9733   3.5070  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.317E-03  0.352E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  0    230 00:55:02.39  12.6000A  -2.2365   2.0039   3.5731  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.308E-03  0.341E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  0    231 00:55:14.99  12.5000A  -2.2739   1.9824   3.6114  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.304E-03  0.335E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  0    232 00:55:27.49  12.3000A  -2.2848   1.9265   3.6466  0.115  1.40  -0.996E+00    850.  0.282E+00  0.279E+00  0.303E-03  0.332E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  0    233 00:55:39.79  12.2000A  -2.2837   1.9446   3.6768  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.299E-03  0.327E-13   11   6   3   17  10   6   11  36   6    0.000    0.000       0
+  0    234 00:55:51.99  12.2000A  -2.2567   1.9578   3.6908  0.115  1.40  -0.991E+00    850.  0.281E+00  0.279E+00  0.297E-03  0.325E-13   11   6   3   13   2  38   11  36   6    0.000    0.000       0
+  0    235 00:56:04.19  12.3000A  -2.1681   1.9814   3.6666  0.115  1.40  -0.988E+00    850.  0.281E+00  0.279E+00  0.298E-03  0.325E-13   11   6   3   13   3  37   11  36   6    0.000    0.000       0
+  0    236 00:56:16.49  12.5000A  -2.1850   2.0167   3.5998  0.115  1.40  -0.987E+00    850.  0.281E+00  0.278E+00  0.301E-03  0.327E-13   12   6   3   13   3  37   11  36   6    0.000    0.000       0
+  0    237 00:56:28.99  12.5000A  -2.1850   1.9574   3.5989  0.115  1.40  -0.988E+00    850.  0.281E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   3  37   12  36   7    0.000    0.000       0
+  0    238 00:56:41.49  12.7000A  -2.1469   1.9133   3.5420  0.115  1.40  -0.989E+00    850.  0.280E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   4  37   12  36   7    0.000    0.000       0
+  0    239 00:56:54.19  12.8000A  -2.0696   1.9896   3.5154  0.115  1.38  -0.991E+00    800.  0.280E+00  0.278E+00  0.312E-03  0.339E-13   12   6   3   14   4  37   13  36   7    0.000    0.000       0
+  0    240 00:57:06.99  13.1000A   2.0392   2.0193   3.4428  0.115  1.38  -0.989E+00    800.  0.280E+00  0.277E+00  0.315E-03  0.342E-13   13  37   9   14   4  37   13  36   7    0.000    0.000       0
+  0    241 00:57:20.09  13.0000A   2.1610   1.9691   3.4498  0.115  1.38  -0.988E+00    800.  0.280E+00  0.277E+00  0.323E-03  0.351E-13   13  37   9   14   4  37   14  35   6    0.000    0.000       0
+  0    242 00:57:33.09  13.0000A   2.2481   1.9420   3.4665  0.115  1.38  -0.989E+00    800.  0.279E+00  0.277E+00  0.321E-03  0.350E-13   13  37   9   14   5  37   14  35   6    0.000    0.000       0
+  0    243 00:57:46.09  13.1000A   2.2916   1.9762   3.4415  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.322E-03  0.351E-13   13  37   9   15   5  37   14  35   6    0.000    0.000       0
+  0    244 00:57:59.19  13.0000A   2.2745   2.0195   3.4488  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.324E-03  0.354E-13   13  37   9   15   5  37   15  35   6    0.000    0.000       0
+  0    245 00:58:12.19  13.1000A   2.2969   2.0000   3.4302  0.114  1.46  -0.996E+00    950.  0.279E+00  0.276E+00  0.322E-03  0.352E-13   14  37  10   15   5  37   15  35   6    0.000    0.000       0
+  0    246 00:58:25.29  13.4000A   2.3720   1.9648   3.3704  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.325E-03  0.356E-13   14  37  10   15   6  37   15  35   6    0.000    0.000       0
+  0    247 00:58:38.69  13.4000A   2.3841   1.9398   3.3663  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.332E-03  0.364E-13   14  37  10   16   6  37   11  20  16    0.000    0.000       0
+  0    248 00:58:52.09  13.5000A   2.3124   2.0264   3.3326  0.114  1.38  -0.100E+01    800.  0.279E+00  0.276E+00  0.332E-03  0.365E-13   14  37  10   16   5  36   12  37   6    0.000    0.000       0
+  0    249 00:59:05.59  13.5000A   2.1844   2.0317   3.3251  0.114  1.38  -0.101E+01    800.  0.279E+00  0.276E+00  0.335E-03  0.368E-13   14  37  11   16   6  36   12  37   6    0.000    0.000       0
+  0    250 00:59:19.09  13.5000A   2.1414   2.0776   3.3244  0.114  1.38  -0.101E+01    800.  0.278E+00  0.276E+00  0.335E-03  0.368E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  0    251 00:59:32.59  13.3000A   2.0346   2.0384   3.3709  0.113  1.43  -0.101E+01    900.  0.278E+00  0.276E+00  0.334E-03  0.367E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  0    252 00:59:45.89  13.4000A   2.0144   2.0187   3.3583  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.329E-03  0.360E-13   15  37  12   16   7  36   10  37   5    0.000    0.000       0
+  0    253 00:59:59.29  13.4000A   1.9525   2.0782   3.3571  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.361E-13   16  36  12   17   6  36   11  37   5    0.000    0.000       0
+  0    254 01:00:12.69  13.1000A   1.8769   2.1646   3.4373  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.359E-13   16  36  12   17   7  36    8   9  15    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl/case_config.yml	(revision 3477)
@@ -0,0 +1,23 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+  - cray_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+
+activation_strings:
+  - "d3#"
+  - "restart"
+
+significant_digits_for_netcdf_checks:
+  timeseries: 3
+  profiles: 5
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/INPUT/example_cbl_restart_p3dr
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/INPUT/example_cbl_restart_p3dr	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/INPUT/example_cbl_restart_p3dr	(revision 3477)
@@ -0,0 +1,97 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1225.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'read_restart_data', ! initial conditions
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+
+    pt_vertical_gradient       =    0.0,
+                                    1.0, ! piecewise temp gradients
+    pt_vertical_gradient_level =    0.0,
+                                  800.0, ! height level of temp gradients
+
+
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    surface_heatflux           = 0.1, ! sensible heat flux at the bottom surface
+    bc_pt_b                    = 'neumann', ! required with surface_heatflux
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 2700.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 900.0,  ! output interval for general data
+    dt_data_output_av          = 1800.0, ! output interval for averaged data
+    dt_dopr                    = 900.0,  ! output interval for profile data
+
+    data_output                = 'w_xy',
+                                 'w_xz',
+                                 'w_xz_av',
+                                 'theta_xy',
+                                 'theta_xz',
+
+    data_output_pr             = 'wtheta',
+                                 'w"theta"',
+                                 'w*theta*',
+                                 'w*2',
+                                 '#theta',
+                                 'theta*2',
+
+    section_xy                 = 2,
+                                 10, ! grid index for 2D XY cross sections
+    section_xz                 = 20, ! grid index for 2D XZ cross sections
+
+    averaging_interval         = 900.0, ! averaging interval general data
+    dt_averaging_input         = 10.0,  ! averaging general data sampling rate
+
+    averaging_interval_pr      = 600.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+ 
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/MONITORING/example_cbl_restart_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/MONITORING/example_cbl_restart_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/MONITORING/example_cbl_restart_rc	(revision 3477)
@@ -0,0 +1,73 @@
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  1    119 00:30:05.10  14.4000A   2.0639  -1.9024   3.1211  0.128  1.38  -0.889E+00    800.  0.261E+00  0.260E+00  0.000E+00  0.000E+00    1  16   1   10   6  21   13   6  16    0.000    0.000       0
+  1    120 00:30:19.50  14.1000A   2.0191  -2.0149   3.1855  0.128  1.38  -0.885E+00    800.  0.259E+00  0.258E+00  0.294E-03  0.391E-13    1  17   1   10   6  21    7  25  19    0.000    0.000       0
+  1    121 00:30:33.60  13.8000A  -2.0333  -2.0438   3.2493  0.128  1.38  -0.882E+00    800.  0.257E+00  0.256E+00  0.288E-03  0.381E-13    9  10  18   10   6  21    8  25  19    0.000    0.000       0
+  1    122 00:30:47.40  13.5000A   1.9276  -2.0991   3.3455  0.129  1.38  -0.884E+00    800.  0.254E+00  0.254E+00  0.281E-03  0.371E-13    1  17   1   10   5  21    8  25  19    0.000    0.000       0
+  1    123 00:31:00.90  13.3000A  -1.9161  -2.1236   3.3942  0.129  1.41  -0.879E+00    850.  0.252E+00  0.251E+00  0.275E-03  0.361E-13   10   8  19   10   5  21    9  25  19    0.000    0.000       0
+  1    124 00:31:14.20  13.1000A  -1.9563  -2.0675   3.4440  0.129  1.41  -0.879E+00    850.  0.249E+00  0.249E+00  0.270E-03  0.353E-13   10   9  18   10   5  21    9  25  19    0.000    0.000       0
+  1    125 00:31:27.30  13.1000A  -1.8492  -1.9400   3.4359  0.128  1.41  -0.885E+00    850.  0.247E+00  0.246E+00  0.265E-03  0.345E-13   10   9  18   10   5  21   10  25  19    0.000    0.000       0
+  1    126 00:31:40.40  13.1000A  -1.9169  -1.9001   3.4331  0.128  1.41  -0.884E+00    850.  0.245E+00  0.244E+00  0.264E-03  0.343E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  1    127 00:31:53.50  13.4000A  -1.9327  -1.8837   3.3592  0.128  1.41  -0.890E+00    850.  0.242E+00  0.241E+00  0.263E-03  0.341E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  1    128 00:32:06.90  13.7000A  -1.9667  -1.8724   3.2909  0.128  1.41  -0.894E+00    850.  0.239E+00  0.239E+00  0.268E-03  0.346E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  1    129 00:32:20.60  13.9000A  -2.0586  -1.8788   3.2452  0.127  1.41  -0.899E+00    850.  0.237E+00  0.236E+00  0.273E-03  0.351E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  1    130 00:32:34.50  14.1000A  -2.0979  -1.8873   3.2012  0.127  1.41  -0.902E+00    850.  0.234E+00  0.233E+00  0.275E-03  0.353E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  1    131 00:32:48.60  14.2000A  -2.1232  -1.8963   3.1743  0.127  1.41  -0.904E+00    850.  0.232E+00  0.231E+00  0.278E-03  0.355E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  1    132 00:33:02.80  14.6000A  -2.1511  -1.9032   3.0741  0.126  1.41  -0.904E+00    850.  0.229E+00  0.228E+00  0.278E-03  0.354E-13   13  26  19    1  13  16   10   8  19    0.000    0.000       0
+  1    133 00:33:17.40  14.7000A  -2.2399  -1.9049   3.0632  0.126  1.41  -0.910E+00    850.  0.227E+00  0.226E+00  0.285E-03  0.360E-13   14  26  18    1  13  16   10   8  19    0.000    0.000       0
+  1    134 00:33:32.10  14.7000A  -2.3269  -1.8979   3.0641  0.125  1.41  -0.911E+00    850.  0.225E+00  0.224E+00  0.286E-03  0.359E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  1    135 00:33:46.80  14.6000A  -2.4204  -1.8791   3.0732  0.125  1.41  -0.914E+00    850.  0.223E+00  0.222E+00  0.285E-03  0.355E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  1    136 00:34:01.40  14.9000A  -2.5050  -1.8780   3.0299  0.124  1.38  -0.913E+00    800.  0.221E+00  0.220E+00  0.282E-03  0.349E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  1    137 00:34:16.30  15.2000A  -2.5433  -1.8650   2.9683  0.124  1.38  -0.911E+00    800.  0.219E+00  0.218E+00  0.286E-03  0.353E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  1    138 00:34:31.50  15.3000A  -2.4931  -1.8365   2.9450  0.123  1.38  -0.912E+00    800.  0.218E+00  0.217E+00  0.290E-03  0.357E-13   14  26  18    1  12  16   12   8  19    0.000    0.000       0
+  1    139 00:34:46.80  15.4000A  -2.3625  -1.7932   2.9239  0.122  1.38  -0.922E+00    800.  0.216E+00  0.215E+00  0.292E-03  0.356E-13   14  27  18    1  12  16   12   8  19    0.000    0.000       0
+  1    140 00:35:02.20  15.5000A  -2.3955  -1.7711   2.8952  0.122  1.38  -0.917E+00    800.  0.215E+00  0.214E+00  0.293E-03  0.355E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  1    141 00:35:17.70  15.8000A  -2.4783  -1.7375   2.8481  0.121  1.38  -0.922E+00    800.  0.214E+00  0.213E+00  0.294E-03  0.354E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  1    142 00:35:33.50  15.8000A  -2.4727   1.7971   2.8403  0.121  1.38  -0.929E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.357E-13   15  26  17    8  34  23   14  26  24    0.000    0.000       0
+  1    143 00:35:49.30  15.7000A  -2.3660  -1.7720   2.8642  0.120  1.38  -0.927E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.354E-13   15  26  17    1   8  35    6  38  32    0.000    0.000       0
+  1    144 00:36:05.00  15.3000A  -2.2554  -1.7519   2.9492  0.119  1.38  -0.931E+00    800.  0.212E+00  0.211E+00  0.297E-03  0.349E-13   15  26  16    1   7  34    6  38  32    0.000    0.000       0
+  1    145 00:36:20.30  14.7000A  -2.1060  -1.8205   3.0663  0.119  1.38  -0.940E+00    800.  0.212E+00  0.211E+00  0.290E-03  0.339E-13   15  26  16    1   6  34    7  38  32    0.000    0.000       0
+  1    146 00:36:35.00  14.2000A  -2.0342  -1.8476   3.1662  0.118  1.38  -0.941E+00    800.  0.212E+00  0.211E+00  0.278E-03  0.325E-13   11  11  13    1   6  34    7  38  32    0.000    0.000       0
+  1    147 00:36:49.20  13.9000A  -2.0417  -1.8187   3.2309  0.118  1.38  -0.945E+00    800.  0.211E+00  0.211E+00  0.269E-03  0.313E-13   10  12  14    1   5  34    7  38  32    0.000    0.000       0
+  1    148 00:37:03.10  13.6000A  -2.1224  -1.8939   3.2986  0.117  1.38  -0.950E+00    800.  0.211E+00  0.210E+00  0.264E-03  0.306E-13   10  12  14    1   5  34    8  38  32    0.000    0.000       0
+  1    149 00:37:16.70  13.4000A  -2.1388  -1.8889   3.3525  0.117  1.38  -0.952E+00    800.  0.211E+00  0.210E+00  0.258E-03  0.299E-13   11  12  13    1   5  34    8  38  32    0.000    0.000       0
+  1    150 00:37:30.10  13.4000A  -2.1449  -1.8704   3.3574  0.116  1.38  -0.957E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.294E-13   11  12  13    1   6  35    8  38  32    0.000    0.000       0
+  1    151 00:37:43.50  13.5000A  -2.1129  -1.9084   3.3383  0.116  1.38  -0.961E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  1    152 00:37:57.00  13.6000A  -2.0518  -1.9761   3.3117  0.116  1.38  -0.963E+00    800.  0.211E+00  0.210E+00  0.257E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  1    153 00:38:10.60  13.9000A  -1.9674  -1.9342   3.2347  0.115  1.41  -0.967E+00    850.  0.211E+00  0.210E+00  0.259E-03  0.294E-13   13  12  12    1   5  35    9  38  32    0.000    0.000       0
+  1    154 00:38:24.50  14.2000A   1.9542  -2.0470   3.1585  0.115  1.41  -0.973E+00    850.  0.211E+00  0.210E+00  0.265E-03  0.298E-13    7  28  21    1   4  35    8  10   7    0.000    0.000       0
+  1    155 00:38:38.70  13.5000A   1.9898  -2.0559   3.3410  0.115  1.41  -0.974E+00    850.  0.211E+00  0.210E+00  0.271E-03  0.303E-13    7  28  22    1   4  35    8   9   7    0.000    0.000       0
+  1    156 00:38:52.20  12.8000A   1.9996  -1.9579   3.5029  0.114  1.41  -0.976E+00    850.  0.211E+00  0.210E+00  0.258E-03  0.288E-13    7  28  22    1   4  35    9   9   7    0.000    0.000       0
+  1    157 00:39:05.00  12.6000A   1.9398  -2.0307   3.5698  0.114  1.41  -0.981E+00    850.  0.211E+00  0.210E+00  0.246E-03  0.273E-13    7  28  22    1   3  35    9   9   7    0.000    0.000       0
+  1    158 00:39:17.60  12.5000A  -1.8941  -2.0019   3.6009  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.243E-03  0.268E-13   14  13  11    1   3  35   10   9   7    0.000    0.000       0
+  1    159 00:39:30.10  12.8000A  -1.8379  -1.8935   3.5261  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.241E-03  0.266E-13    8  13  15    1   3  35   10   8   6    0.000    0.000       0
+  1    160 00:39:42.90  13.0000A  -1.8526   1.8509   3.4685  0.114  1.41  -0.987E+00    850.  0.212E+00  0.211E+00  0.248E-03  0.272E-13    8  13  14   17  15  11   10   8   6    0.000    0.000       0
+  1    161 00:39:55.90  13.1000A  -1.8830   1.9398   3.4337  0.113  1.41  -0.988E+00    850.  0.212E+00  0.211E+00  0.252E-03  0.276E-13    8  13  14   17  15  11   11   8   6    0.000    0.000       0
+  1    162 00:40:09.00  13.1000A  -1.8941   1.9798   3.4235  0.113  1.41  -0.989E+00    850.  0.212E+00  0.211E+00  0.255E-03  0.278E-13    8  13  14   17  15  11   10   9   8    0.000    0.000       0
+  1    163 00:40:22.10  12.9000A  -1.9001   1.9872   3.4874  0.113  1.41  -0.992E+00    850.  0.212E+00  0.211E+00  0.256E-03  0.279E-13    9  13  14   17  16  11   10   9   8    0.000    0.000       0
+  1    164 00:40:35.00  13.0000A  -1.9031   2.1070   3.4497  0.113  1.41  -0.994E+00    850.  0.213E+00  0.211E+00  0.253E-03  0.275E-13    9  13  14   17  16  11   11   9   8    0.000    0.000       0
+  1    165 00:40:48.00  13.3000A  -1.9423   2.1554   3.3887  0.113  1.41  -0.994E+00    850.  0.213E+00  0.212E+00  0.256E-03  0.278E-13   18  13   9   17  16  11   11   9   8    0.000    0.000       0
+  1    166 00:41:01.30  13.5000A  -1.9704   2.1123   3.3329  0.113  1.41  -0.997E+00    850.  0.213E+00  0.212E+00  0.263E-03  0.285E-13   18  13   9   17  16  11   12   8   7    0.000    0.000       0
+  1    167 00:41:14.80  13.7000A  -1.9694   2.1270   3.2763  0.113  1.41  -0.100E+01    850.  0.213E+00  0.212E+00  0.268E-03  0.290E-13   18  14   9   17  17  11   11   8   8    0.000    0.000       0
+  1    168 00:41:28.50  13.6000A  -1.9760   2.1839   3.3015  0.113  1.41  -0.100E+01    850.  0.214E+00  0.212E+00  0.274E-03  0.295E-13   18  14   9   17  17  11   12   8   8    0.000    0.000       0
+  1    169 00:41:42.10  13.5000A   1.9771   2.1764   3.3436  0.113  1.41  -0.101E+01    850.  0.214E+00  0.212E+00  0.273E-03  0.294E-13   12   5  12   18  18   9   12   8   8    0.000    0.000       0
+  1    170 00:41:55.60  13.5000A   1.9792   2.2380   3.3212  0.113  1.38  -0.101E+01    800.  0.214E+00  0.213E+00  0.272E-03  0.293E-13   12   5  12   17  18  10   12   8   8    0.000    0.000       0
+  1    171 00:42:09.10  13.5000A  -1.9920   2.2282   3.3396  0.113  1.38  -0.101E+01    800.  0.215E+00  0.213E+00  0.272E-03  0.293E-13   18  14   8   17  18  10   13   8   8    0.000    0.000       0
+  1    172 00:42:22.60  13.6000A  -1.9824   2.1821   3.3107  0.113  1.38  -0.101E+01    800.  0.215E+00  0.214E+00  0.273E-03  0.294E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  1    173 00:42:36.20  13.9000A  -1.9733   2.2182   3.2283  0.113  1.38  -0.101E+01    800.  0.216E+00  0.214E+00  0.276E-03  0.297E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  1    174 00:42:50.10  14.0000A  -1.9902   2.1923   3.2049  0.113  1.38  -0.101E+01    800.  0.217E+00  0.215E+00  0.282E-03  0.304E-13   18  15   7   17  19  10   14   8   8    0.000    0.000       0
+  1    175 00:43:04.10  14.3000A  -1.9628   2.2236   3.1431  0.113  1.38  -0.101E+01    800.  0.218E+00  0.216E+00  0.284E-03  0.306E-13   18  15   7   17  20   9   14   8   8    0.000    0.000       0
+  1    176 00:43:18.40  14.7000A  -1.9286   2.2221   3.0510  0.114  1.38  -0.100E+01    800.  0.219E+00  0.217E+00  0.290E-03  0.313E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  1    177 00:43:33.10  15.2000A  -1.9659   2.1643   2.9559  0.114  1.38  -0.100E+01    800.  0.220E+00  0.218E+00  0.298E-03  0.321E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  1    178 00:43:48.30  15.4000A  -1.9127   2.1075   2.9237  0.114  1.38  -0.994E+00    800.  0.221E+00  0.219E+00  0.308E-03  0.332E-13   17  14   4   18  18  12   10   9  18    0.000    0.000       0
+  1    179 00:44:03.70  15.0000A  -1.8884   2.1390   3.0072  0.114  1.38  -0.999E+00    800.  0.222E+00  0.221E+00  0.312E-03  0.337E-13   17  15   4   18  19  11   10   9  18    0.000    0.000       0
+  1    180 00:44:18.70  14.6000A  -1.8147   2.1196   3.0730  0.115  1.38  -0.991E+00    800.  0.223E+00  0.222E+00  0.305E-03  0.328E-13   16  15   3   18  19  11   11   9  18    0.000    0.000       0
+  1    181 00:44:33.30  14.5000A  -1.7675   2.1466   3.1106  0.115  1.43  -0.990E+00    900.  0.225E+00  0.223E+00  0.298E-03  0.321E-13   16  15   3   18  17  13   13  11  16    0.000    0.000       0
+  1    182 00:44:47.80  14.1000A   1.7568   2.1526   3.1822  0.115  1.43  -0.993E+00    900.  0.226E+00  0.225E+00  0.297E-03  0.319E-13    9  27  23   18  17  13   13  11  16    0.000    0.000       0
+  1    183 00:45:01.90  13.8000A   1.7835   2.1657   3.2535  0.116  1.43  -0.990E+00    900.  0.228E+00  0.226E+00  0.290E-03  0.312E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_restart/case_config.yml	(revision 3477)
@@ -0,0 +1,25 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+  - cray_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+
+activation_strings:
+  - "d3r"
+  - "restart"
+
+use_binary_files_from: example_cbl_short
+
+significant_digits_for_netcdf_checks:
+  timeseries: 3
+  profiles: 5
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/INPUT/example_cbl_restart2_p3dr
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/INPUT/example_cbl_restart2_p3dr	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/INPUT/example_cbl_restart2_p3dr	(revision 3477)
@@ -0,0 +1,97 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1225.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'read_restart_data', ! initial conditions
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+
+    pt_vertical_gradient       =    0.0,
+                                    1.0, ! piecewise temp gradients
+    pt_vertical_gradient_level =    0.0,
+                                  800.0, ! height level of temp gradients
+
+
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    surface_heatflux           = 0.1, ! sensible heat flux at the bottom surface
+    bc_pt_b                    = 'neumann', ! required with surface_heatflux
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 3600.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 900.0,  ! output interval for general data
+    dt_data_output_av          = 1800.0, ! output interval for averaged data
+    dt_dopr                    = 900.0,  ! output interval for profile data
+
+    data_output                = 'w_xy',
+                                 'w_xz',
+                                 'w_xz_av',
+                                 'theta_xy',
+                                 'theta_xz',
+
+    data_output_pr             = 'wtheta',
+                                 'w"theta"',
+                                 'w*theta*',
+                                 'w*2',
+                                 '#theta',
+                                 'theta*2',
+
+    section_xy                 = 2,
+                                 10, ! grid index for 2D XY cross sections
+    section_xz                 = 20, ! grid index for 2D XZ cross sections
+
+    averaging_interval         = 900.0, ! averaging interval general data
+    dt_averaging_input         = 10.0,  ! averaging general data sampling rate
+
+    averaging_interval_pr      = 600.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+ 
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/MONITORING/example_cbl_restart2_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/MONITORING/example_cbl_restart2_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/MONITORING/example_cbl_restart2_rc	(revision 3477)
@@ -0,0 +1,80 @@
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  2    183 00:45:01.90  13.8000A   1.7835   2.1657   3.2535  0.116  1.43  -0.990E+00    900.  0.228E+00  0.226E+00  0.000E+00  0.000E+00    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  2    184 00:45:15.70  13.5000A   1.7943   2.1918   3.3330  0.116  1.43  -0.991E+00    900.  0.229E+00  0.228E+00  0.284E-03  0.306E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  2    185 00:45:29.20  13.3000A   1.8092   2.2021   3.3948  0.116  1.43  -0.998E+00    900.  0.231E+00  0.230E+00  0.279E-03  0.300E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  2    186 00:45:42.50  13.1000A   1.8565   2.1995   3.4255  0.117  1.43  -0.992E+00    900.  0.233E+00  0.231E+00  0.276E-03  0.297E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  2    187 00:45:55.60  13.0000A   1.8904   2.1843   3.4615  0.117  1.43  -0.988E+00    900.  0.234E+00  0.233E+00  0.273E-03  0.293E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  2    188 00:46:08.60  12.9000A   1.9081   2.1553   3.4894  0.117  1.43  -0.984E+00    900.  0.236E+00  0.235E+00  0.272E-03  0.292E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  2    189 00:46:21.50  12.9000A   1.9077   2.1095   3.4835  0.118  1.43  -0.983E+00    900.  0.238E+00  0.236E+00  0.271E-03  0.291E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  2    190 00:46:34.40  13.0000A   1.8879   2.0648   3.4661  0.118  1.43  -0.983E+00    900.  0.240E+00  0.238E+00  0.272E-03  0.292E-13    9  27  24   18  19  12   16  11  16    0.000    0.000       0
+  2    191 00:46:47.40  13.0000A   1.8974   2.0485   3.4724  0.118  1.43  -0.984E+00    900.  0.241E+00  0.240E+00  0.275E-03  0.295E-13    9  26  25   18  19  12   16  11  16    0.000    0.000       0
+  2    192 00:47:00.40  13.0000A   1.8868   2.0432   3.4549  0.119  1.41  -0.983E+00    850.  0.243E+00  0.242E+00  0.276E-03  0.296E-13    9  26  25    8   4   0   16  11  16    0.000    0.000       0
+  2    193 00:47:13.40  13.2000A   1.8944   2.0245   3.4199  0.119  1.41  -0.979E+00    850.  0.245E+00  0.244E+00  0.277E-03  0.298E-13    9  27  25    8   4   0   16  11  16    0.000    0.000       0
+  2    194 00:47:26.60  13.3000A   1.8837   2.0250   3.3852  0.119  1.41  -0.973E+00    850.  0.247E+00  0.246E+00  0.283E-03  0.305E-13    9  27  25   19  18  13   14  10  17    0.000    0.000       0
+  2    195 00:47:39.90  13.2000A   1.8504   2.0329   3.4017  0.119  1.41  -0.971E+00    850.  0.249E+00  0.247E+00  0.286E-03  0.309E-13    9  27  25   19  18  14   14  10  17    0.000    0.000       0
+  2    196 00:47:53.10  13.2000A   1.8799  -2.0090   3.4180  0.119  1.41  -0.969E+00    850.  0.251E+00  0.249E+00  0.286E-03  0.309E-13    9  27  26   13  38  15   11   9  18    0.000    0.000       0
+  2    197 00:48:06.30  12.9000A  -1.9990  -1.9540   3.4756  0.119  1.41  -0.971E+00    850.  0.253E+00  0.251E+00  0.288E-03  0.312E-13    6   3   1   13  38  15   12   9  18    0.000    0.000       0
+  2    198 00:48:19.20  12.8000A  -2.0710   1.9246   3.5053  0.119  1.41  -0.969E+00    850.  0.255E+00  0.253E+00  0.283E-03  0.308E-13    6   3   1   19  19  13   12   9  18    0.000    0.000       0
+  2    199 00:48:32.00  12.8000A  -2.0835   1.8954   3.5198  0.119  1.41  -0.970E+00    850.  0.256E+00  0.255E+00  0.283E-03  0.309E-13    6   4   0   19  19  13   13   9  18    0.000    0.000       0
+  2    200 00:48:44.80  12.7000A   2.1461   1.8456   3.5374  0.119  1.41  -0.972E+00    850.  0.258E+00  0.257E+00  0.285E-03  0.312E-13    7   2  10   12   4  39   13   9  18    0.000    0.000       0
+  2    201 00:48:57.50  12.7000A   2.1906   1.8531   3.5319  0.119  1.41  -0.972E+00    850.  0.260E+00  0.258E+00  0.285E-03  0.313E-13    7   2  10   12   4  39   14   9  18    0.000    0.000       0
+  2    202 00:49:10.20  12.6000A  -2.2511   1.8608   3.5743  0.119  1.41  -0.975E+00    850.  0.262E+00  0.260E+00  0.286E-03  0.316E-13    7   3   0   12   4  39    9  39   1    0.000    0.000       0
+  2    203 00:49:22.80  12.9000A  -2.3231  -1.9143   3.4963  0.119  1.41  -0.971E+00    850.  0.264E+00  0.262E+00  0.286E-03  0.317E-13    7   3   0    3   8   2   15   9  18    0.000    0.000       0
+  2    204 00:49:35.70  12.9000A  -2.1960  -1.9597   3.4944  0.119  1.41  -0.972E+00    850.  0.266E+00  0.264E+00  0.295E-03  0.328E-13    8   2   0    3   8   2    9   0   0    0.000    0.000       0
+  2    205 00:49:48.60  12.7000A  -2.3746  -2.0424   3.5512  0.119  1.41  -0.977E+00    850.  0.267E+00  0.265E+00  0.296E-03  0.330E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  2    206 00:50:01.30  12.4000A  -2.4137  -2.1028   3.6401  0.118  1.41  -0.979E+00    850.  0.269E+00  0.267E+00  0.293E-03  0.327E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  2    207 00:50:13.70  12.2000A  -2.3703  -2.1193   3.6823  0.118  1.41  -0.975E+00    850.  0.270E+00  0.268E+00  0.288E-03  0.322E-13    8   1   0    3   7   2   10   7  17    0.000    0.000       0
+  2    208 00:50:25.90  12.0000A  -2.4784  -2.0738   3.7509  0.118  1.43  -0.976E+00    900.  0.272E+00  0.270E+00  0.284E-03  0.319E-13    9   1  39    3   7   2   10   7  17    0.000    0.000       0
+  2    209 00:50:37.90  12.0000A  -2.5338  -2.0484   3.7647  0.118  1.43  -0.972E+00    900.  0.273E+00  0.271E+00  0.281E-03  0.316E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  2    210 00:50:49.90  12.1000A  -2.4948  -2.0487   3.7296  0.118  1.43  -0.970E+00    900.  0.274E+00  0.272E+00  0.281E-03  0.317E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  2    211 00:51:02.00  12.1000A  -2.4148  -1.9851   3.7272  0.118  1.43  -0.970E+00    900.  0.275E+00  0.273E+00  0.285E-03  0.321E-13    9   1  39    3   6   2   14   6  18    0.000    0.000       0
+  2    212 00:51:14.09  11.8000A  -2.3625  -2.0341   3.8067  0.118  1.43  -0.972E+00    900.  0.277E+00  0.274E+00  0.285E-03  0.323E-13    9   1  38   15  33  38   14   6  18    0.000    0.000       0
+  2    213 00:51:25.90  11.7000A  -2.3582  -2.1289   3.8355  0.118  1.43  -0.979E+00    900.  0.278E+00  0.275E+00  0.279E-03  0.317E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  2    214 00:51:37.59  11.8000A  -2.3235  -2.1215   3.8110  0.117  1.43  -0.979E+00    900.  0.279E+00  0.276E+00  0.278E-03  0.315E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  2    215 00:51:49.40  12.0000A  -2.2827  -2.0721   3.7403  0.117  1.43  -0.981E+00    900.  0.280E+00  0.277E+00  0.281E-03  0.319E-13   11   0  38   15  32  38   15   5  18    0.000    0.000       0
+  2    216 00:52:01.40  12.0000A  -2.2481  -2.0085   3.7349  0.117  1.43  -0.979E+00    900.  0.280E+00  0.278E+00  0.287E-03  0.326E-13   11   0  38   15  32  38   16   5  18    0.000    0.000       0
+  2    217 00:52:13.40  12.0000A  -2.2109  -2.0175   3.7380  0.117  1.43  -0.979E+00    900.  0.281E+00  0.279E+00  0.288E-03  0.327E-13   11   0  37   15  32  37   16   5  18    0.000    0.000       0
+  2    218 00:52:25.40  12.2000A  -2.1636  -2.0652   3.6978  0.117  1.43  -0.978E+00    900.  0.282E+00  0.279E+00  0.289E-03  0.328E-13   11   0  37   15  31  37   16   5  18    0.000    0.000       0
+  2    219 00:52:37.59  12.5000A  -2.0832  -2.1463   3.5992  0.117  1.43  -0.979E+00    900.  0.282E+00  0.280E+00  0.294E-03  0.334E-13   12   0  37   15  31  37   16   5  18    0.000    0.000       0
+  2    220 00:52:50.09  13.1000A  -2.0143  -2.1531   3.4456  0.116  1.43  -0.982E+00    900.  0.283E+00  0.280E+00  0.302E-03  0.343E-13   13  23   4   15  31  37   16   5  18    0.000    0.000       0
+  2    221 00:53:03.19  13.6000A  -2.0119  -2.0704   3.3090  0.116  1.43  -0.985E+00    900.  0.283E+00  0.280E+00  0.316E-03  0.359E-13   14  23   3   15  31  37   17   4  18    0.000    0.000       0
+  2    222 00:53:16.79  13.7000A  -1.9914   2.0490   3.2919  0.116  1.43  -0.991E+00    900.  0.283E+00  0.280E+00  0.328E-03  0.371E-13   14  23   3   17  17  10    8   4   4    0.000    0.000       0
+  2    223 00:53:30.49  13.6000A  -1.9520   2.0725   3.3115  0.116  1.43  -0.986E+00    900.  0.283E+00  0.280E+00  0.330E-03  0.373E-13   14  24   3   17  17  10    8  35   5    0.000    0.000       0
+  2    224 00:53:44.09  13.2000A  -1.9920   2.0440   3.4188  0.116  1.43  -0.987E+00    900.  0.283E+00  0.280E+00  0.327E-03  0.369E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  2    225 00:53:57.29  13.1000A  -2.0629   1.9622   3.4411  0.116  1.43  -0.988E+00    900.  0.282E+00  0.280E+00  0.318E-03  0.357E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  2    226 00:54:10.39  13.0000A  -2.0803   1.8350   3.4509  0.115  1.43  -0.998E+00    900.  0.282E+00  0.279E+00  0.315E-03  0.353E-13    9   6   4   17  17  10   10  35   5    0.000    0.000       0
+  2    227 00:54:23.39  13.0000A  -2.1884   1.8751   3.4593  0.115  1.43  -0.995E+00    900.  0.282E+00  0.279E+00  0.313E-03  0.349E-13   10   6   4   13   8   4   10  35   5    0.000    0.000       0
+  2    228 00:54:36.39  13.2000A  -2.2566   1.8853   3.4000  0.115  1.43  -0.101E+01    900.  0.282E+00  0.279E+00  0.313E-03  0.348E-13   10   6   4   13   8   4    9  36   6    0.000    0.000       0
+  2    229 00:54:49.59  12.8000A  -2.2703   1.9733   3.5070  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.317E-03  0.352E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  2    230 00:55:02.39  12.6000A  -2.2365   2.0039   3.5731  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.308E-03  0.341E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  2    231 00:55:14.99  12.5000A  -2.2739   1.9824   3.6114  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.304E-03  0.335E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  2    232 00:55:27.49  12.3000A  -2.2848   1.9265   3.6466  0.115  1.40  -0.996E+00    850.  0.282E+00  0.279E+00  0.303E-03  0.332E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  2    233 00:55:39.79  12.2000A  -2.2837   1.9446   3.6768  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.299E-03  0.327E-13   11   6   3   17  10   6   11  36   6    0.000    0.000       0
+  2    234 00:55:51.99  12.2000A  -2.2567   1.9578   3.6908  0.115  1.40  -0.991E+00    850.  0.281E+00  0.279E+00  0.297E-03  0.325E-13   11   6   3   13   2  38   11  36   6    0.000    0.000       0
+  2    235 00:56:04.19  12.3000A  -2.1681   1.9814   3.6666  0.115  1.40  -0.988E+00    850.  0.281E+00  0.279E+00  0.298E-03  0.325E-13   11   6   3   13   3  37   11  36   6    0.000    0.000       0
+  2    236 00:56:16.49  12.5000A  -2.1850   2.0167   3.5998  0.115  1.40  -0.987E+00    850.  0.281E+00  0.278E+00  0.301E-03  0.327E-13   12   6   3   13   3  37   11  36   6    0.000    0.000       0
+  2    237 00:56:28.99  12.5000A  -2.1850   1.9574   3.5989  0.115  1.40  -0.988E+00    850.  0.281E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   3  37   12  36   7    0.000    0.000       0
+  2    238 00:56:41.49  12.7000A  -2.1469   1.9133   3.5420  0.115  1.40  -0.989E+00    850.  0.280E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   4  37   12  36   7    0.000    0.000       0
+  2    239 00:56:54.19  12.8000A  -2.0696   1.9896   3.5154  0.115  1.38  -0.991E+00    800.  0.280E+00  0.278E+00  0.312E-03  0.339E-13   12   6   3   14   4  37   13  36   7    0.000    0.000       0
+  2    240 00:57:06.99  13.1000A   2.0392   2.0193   3.4428  0.115  1.38  -0.989E+00    800.  0.280E+00  0.277E+00  0.315E-03  0.342E-13   13  37   9   14   4  37   13  36   7    0.000    0.000       0
+  2    241 00:57:20.09  13.0000A   2.1610   1.9691   3.4498  0.115  1.38  -0.988E+00    800.  0.280E+00  0.277E+00  0.323E-03  0.351E-13   13  37   9   14   4  37   14  35   6    0.000    0.000       0
+  2    242 00:57:33.09  13.0000A   2.2481   1.9420   3.4665  0.115  1.38  -0.989E+00    800.  0.279E+00  0.277E+00  0.321E-03  0.350E-13   13  37   9   14   5  37   14  35   6    0.000    0.000       0
+  2    243 00:57:46.09  13.1000A   2.2916   1.9762   3.4415  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.322E-03  0.351E-13   13  37   9   15   5  37   14  35   6    0.000    0.000       0
+  2    244 00:57:59.19  13.0000A   2.2745   2.0195   3.4488  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.324E-03  0.354E-13   13  37   9   15   5  37   15  35   6    0.000    0.000       0
+  2    245 00:58:12.19  13.1000A   2.2969   2.0000   3.4302  0.114  1.46  -0.996E+00    950.  0.279E+00  0.276E+00  0.322E-03  0.352E-13   14  37  10   15   5  37   15  35   6    0.000    0.000       0
+  2    246 00:58:25.29  13.4000A   2.3720   1.9648   3.3704  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.325E-03  0.356E-13   14  37  10   15   6  37   15  35   6    0.000    0.000       0
+  2    247 00:58:38.69  13.4000A   2.3841   1.9398   3.3663  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.332E-03  0.364E-13   14  37  10   16   6  37   11  20  16    0.000    0.000       0
+  2    248 00:58:52.09  13.5000A   2.3124   2.0264   3.3326  0.114  1.38  -0.100E+01    800.  0.279E+00  0.276E+00  0.332E-03  0.365E-13   14  37  10   16   5  36   12  37   6    0.000    0.000       0
+  2    249 00:59:05.59  13.5000A   2.1844   2.0317   3.3251  0.114  1.38  -0.101E+01    800.  0.279E+00  0.276E+00  0.335E-03  0.368E-13   14  37  11   16   6  36   12  37   6    0.000    0.000       0
+  2    250 00:59:19.09  13.5000A   2.1414   2.0776   3.3244  0.114  1.38  -0.101E+01    800.  0.278E+00  0.276E+00  0.335E-03  0.368E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  2    251 00:59:32.59  13.3000A   2.0346   2.0384   3.3709  0.113  1.43  -0.101E+01    900.  0.278E+00  0.276E+00  0.334E-03  0.367E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  2    252 00:59:45.89  13.4000A   2.0144   2.0187   3.3583  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.329E-03  0.360E-13   15  37  12   16   7  36   10  37   5    0.000    0.000       0
+  2    253 00:59:59.29  13.4000A   1.9525   2.0782   3.3571  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.361E-13   16  36  12   17   6  36   11  37   5    0.000    0.000       0
+  2    254 01:00:12.69  13.1000A   1.8769   2.1646   3.4373  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.359E-13   16  36  12   17   7  36    8   9  15    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_restart2/case_config.yml	(revision 3477)
@@ -0,0 +1,25 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+  - cray_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+
+activation_strings:
+  - "d3r"
+  - "restart"
+
+use_binary_files_from: example_cbl_restart
+
+significant_digits_for_netcdf_checks:
+  timeseries: 3
+  profiles: 5
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_short/INPUT/example_cbl_short_p3d
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_short/INPUT/example_cbl_short_p3d	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_short/INPUT/example_cbl_short_p3d	(revision 3477)
@@ -0,0 +1,94 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1225.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles', ! initial conditions
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+
+    pt_vertical_gradient       =    0.0,
+                                    1.0, ! piecewise temp gradients
+    pt_vertical_gradient_level =    0.0,
+                                  800.0, ! height level of temp gradients
+
+
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    surface_heatflux           = 0.1, ! sensible heat flux at the bottom surface
+    bc_pt_b                    = 'neumann', ! required with surface_heatflux
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 1800.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 900.0,  ! output interval for general data
+    dt_data_output_av          = 1800.0, ! output interval for averaged data
+    dt_dopr                    = 900.0,  ! output interval for profile data
+
+    data_output                = 'w_xy',
+                                 'w_xz',
+                                 'w_xz_av',
+                                 'theta_xy',
+                                 'theta_xz',
+
+    data_output_pr             = 'wtheta', 'w"theta"', 'w*theta*',
+                                 'w*2',
+                                 '#theta', 'theta*2',
+
+    section_xy                 = 2,
+                                 10, ! grid index for 2D XY cross sections
+    section_xz                 = 20, ! grid index for 2D XZ cross sections
+
+    averaging_interval         = 900.0, ! averaging interval general data
+    dt_averaging_input         = 10.0,  ! averaging general data sampling rate
+
+    averaging_interval_pr      = 600.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_short/MONITORING/example_cbl_short_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_short/MONITORING/example_cbl_short_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_short/MONITORING/example_cbl_short_rc	(revision 3477)
@@ -0,0 +1,353 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3319        *    atmosphere - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 10-10-18    Run:       example_cbl_short__gfortran_defaul
+ Time:                 00:06:35    Run-No.:   00
+ Run on host:        gfortran_d
+ Number of PEs:               2    Processor grid (x,y): (   1,   2) calculated
+                                   A 1d-decomposition along y is used
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             1800.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      50.000 m    dy =      50.000 m
+                dz(1) =      50.000 m
+                dz(2) =     999.000 m
+
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   2862.511 m
+
+ Vertical stretching starts at height:    1225.0 m,
+ Vertical stretching starts at index:           25,
+ Vertical stretching ends at height:   9999999.9 m,
+ Vertical stretching ends at index:             41,
+ Factor used for stretching:                 1.080,
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    40,     20,     42)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)     = pt(1)            
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.100000 K m/s
+
+
+    Constant flux layer between bottom surface and first computational u,v-level:
+
+       z_mo =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:     -20.00 <= rif <= 20.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   800.0  m
+       Temperature:   300.00  300.00  300.00  K
+       Gradient:      ------    0.00    1.00  K/100m
+       Gridpoint:          0       0      16
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: wtheta, w"theta", w*theta*, w*2, theta, theta*2,                            
+       Output every               900.00 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    2D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       XY-cross-section  Arrays:  w, theta,                                                               
+       Output every               900.00 s  
+       Cross sections at k = /2/10/
+       scalar-coordinates:   /75.0/475.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+       XZ-cross-section  Arrays:  w, theta,                                                               
+       Output every               900.00 s  
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    2D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset                     
+
+
+       XZ-cross-section  Arrays:  w,                                                                   
+       Output every              1800.00 s  
+       Time averaged over         900.00 s
+       Averaging input every       10.00 s
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.0 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
+
+    Day of the year at model start :   day_init      =       0
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A  -0.2131D -0.2288D  0.1182  0.000  1.38   0.000E+00    800.  0.104E-02  0.103E-02  0.597E-03  0.867E-13    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      1 00:00:20.00  20.0000D  -0.2125  -0.2273   0.1172  0.009  0.69  -0.132E+02    100.  0.103E-02  0.102E-02  0.570E-05  0.411E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      2 00:00:40.00  20.0000D  -0.2117  -0.2252   0.1162  0.009  0.69  -0.133E+02    100.  0.102E-02  0.102E-02  0.935E-05  0.416E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      3 00:01:00.00  20.0000D  -0.2106  -0.2227   0.1152  0.009  0.69  -0.134E+02    100.  0.101E-02  0.101E-02  0.130E-04  0.421E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      4 00:01:20.00  20.0000D  -0.2093  -0.2197   0.1141  0.009  0.69  -0.134E+02    100.  0.100E-02  0.997E-03  0.166E-04  0.424E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      5 00:01:40.00  20.0000D  -0.2077  -0.2164   0.1129  0.009  0.93  -0.134E+02    250.  0.992E-03  0.988E-03  0.203E-04  0.427E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      6 00:02:00.00  20.0000D  -0.2058  -0.2126   0.1117  0.009  0.93  -0.133E+02    250.  0.983E-03  0.979E-03  0.239E-04  0.429E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      7 00:02:20.00  20.0000D  -0.2037  -0.2086   0.1103  0.009  1.22  -0.131E+02    550.  0.974E-03  0.970E-03  0.275E-04  0.431E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      8 00:02:40.00  20.0000D   0.3348D  0.3126D  0.1636  0.011  1.22  -0.105E+02    550.  0.202E-02  0.201E-02  0.601E-03  0.856E-13   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0      9 00:03:00.00  20.0000D   0.3330   0.3039   0.1619  0.011  1.22  -0.105E+02    550.  0.199E-02  0.198E-02  0.374E-04  0.830E-15   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0     10 00:03:20.00  20.0000D   0.3296  -0.2989   0.1601  0.011  1.22  -0.103E+02    550.  0.196E-02  0.195E-02  0.409E-04  0.827E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     11 00:03:40.00  20.0000D   0.3249  -0.2986   0.1580  0.011  1.22  -0.101E+02    550.  0.194E-02  0.193E-02  0.444E-04  0.828E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     12 00:04:00.00  20.0000D   0.3189  -0.2989   0.1558  0.012  1.22  -0.975E+01    550.  0.191E-02  0.190E-02  0.478E-04  0.831E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     13 00:04:20.00  20.0000D   0.3119  -0.3005   0.1535  0.012  1.22  -0.940E+01    550.  0.189E-02  0.188E-02  0.513E-04  0.835E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     14 00:04:40.00  20.0000D   0.3056  -0.3012   0.1512  0.013  1.22  -0.905E+01    550.  0.187E-02  0.185E-02  0.546E-04  0.842E-15   10   3   0    8   0   7    5  36  28    0.000    0.000       0
+  0     15 00:05:00.00  20.0000D   0.4151D -0.3964D -0.1812  0.013  1.22  -0.851E+01    550.  0.292E-02  0.289E-02  0.625E-03  0.860E-13    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     16 00:05:20.00  20.0000D   0.4183  -0.4076  -0.1810  0.014  1.22  -0.811E+01    550.  0.287E-02  0.285E-02  0.640E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     17 00:05:40.00  20.0000D   0.4163  -0.4151  -0.1796  0.015  1.22  -0.773E+01    550.  0.283E-02  0.280E-02  0.672E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     18 00:06:00.00  20.0000D   0.4097  -0.4189  -0.1772  0.015  1.22  -0.735E+01    550.  0.279E-02  0.276E-02  0.703E-04  0.130E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     19 00:06:20.00  20.0000D   0.3992  -0.4192   0.1802  0.016  1.22  -0.698E+01    550.  0.275E-02  0.273E-02  0.734E-04  0.131E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     20 00:06:40.00  20.0000D   0.3855  -0.4165   0.1983  0.017  1.22  -0.656E+01    550.  0.272E-02  0.269E-02  0.765E-04  0.133E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     21 00:07:00.00  20.0000D   0.3695  -0.4109   0.2198  0.018  1.22  -0.616E+01    550.  0.269E-02  0.267E-02  0.795E-04  0.136E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     22 00:07:20.00  20.0000D  -0.3706  -0.4030   0.2474  0.020  1.22  -0.577E+01    550.  0.267E-02  0.265E-02  0.824E-04  0.140E-14    8  13   9    8   3   6    2   6  12    0.000    0.000       0
+  0     23 00:07:40.00  20.0000D  -0.4267D -0.4554D  0.2850  0.021  1.22  -0.539E+01    550.  0.371E-02  0.369E-02  0.653E-03  0.886E-13    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     24 00:08:00.00  20.0000D  -0.4241  -0.4568   0.3233  0.023  1.22  -0.506E+01    550.  0.368E-02  0.366E-02  0.905E-04  0.190E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     25 00:08:20.00  20.0000D  -0.4208  -0.4522   0.3672  0.024  1.22  -0.471E+01    550.  0.367E-02  0.365E-02  0.931E-04  0.196E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     26 00:08:40.00  20.0000D  -0.4174  -0.4421   0.4169  0.026  1.22  -0.440E+01    550.  0.368E-02  0.366E-02  0.957E-04  0.204E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     27 00:09:00.00  20.0000D  -0.4142  -0.4279   0.4727  0.028  1.22  -0.410E+01    550.  0.372E-02  0.370E-02  0.981E-04  0.214E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     28 00:09:20.00  20.0000D  -0.4116  -0.4106   0.5348  0.030  1.18  -0.381E+01    500.  0.380E-02  0.378E-02  0.100E-03  0.227E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     29 00:09:40.00  20.0000D  -0.4107  -0.4087   0.6032  0.032  1.18  -0.355E+01    500.  0.393E-02  0.391E-02  0.103E-03  0.242E-14    5   4   4    5   3  36    2   6  12    0.000    0.000       0
+  0     30 00:10:00.00  20.0000D   0.4798D  0.4695D  0.7094  0.035  1.18  -0.330E+01    500.  0.519E-02  0.516E-02  0.656E-03  0.867E-13    5  14  20    9   7  14    2   6  12    0.000    0.000       0
+  0     31 00:10:20.00  20.0000D   0.4589  -0.4757   0.8018  0.037  1.18  -0.308E+01    500.  0.543E-02  0.540E-02  0.108E-03  0.318E-14    5  14  20    8   2   6    3   6  12    0.000    0.000       0
+  0     32 00:10:40.00  20.0000D   0.4450  -0.4782   0.9236  0.040  1.18  -0.288E+01    500.  0.579E-02  0.576E-02  0.110E-03  0.344E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     33 00:11:00.00  20.0000A   0.4349  -0.4767   1.0530  0.043  1.18  -0.266E+01    500.  0.629E-02  0.626E-02  0.111E-03  0.377E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     34 00:11:20.00  20.0000A  -0.4684  -0.5184   1.1853  0.046  1.18  -0.249E+01    500.  0.699E-02  0.696E-02  0.111E-03  0.416E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     35 00:11:40.00  20.0000A  -0.5110  -0.5803   1.3146  0.049  1.18  -0.233E+01    500.  0.793E-02  0.791E-02  0.112E-03  0.464E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     36 00:12:00.00  20.0000A  -0.5522  -0.6460   1.4351  0.052  1.18  -0.218E+01    500.  0.920E-02  0.917E-02  0.112E-03  0.522E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     37 00:12:20.00  20.0000A   0.6173  -0.7139   1.6132  0.055  1.18  -0.205E+01    500.  0.109E-01  0.108E-01  0.112E-03  0.591E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     38 00:12:40.00  20.0000A   0.6867  -0.7795   1.7863  0.059  1.18  -0.193E+01    500.  0.130E-01  0.130E-01  0.112E-03  0.673E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     39 00:13:00.00  20.0000A   0.7575  -0.8399   1.9135  0.062  1.18  -0.183E+01    500.  0.158E-01  0.158E-01  0.112E-03  0.767E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     40 00:13:20.00  20.0000A   0.8277  -0.8934   2.1012  0.066  1.18  -0.173E+01    500.  0.193E-01  0.193E-01  0.114E-03  0.877E-14    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     41 00:13:40.00  20.0000A   0.8945  -0.9393   2.2220  0.069  1.18  -0.165E+01    500.  0.237E-01  0.236E-01  0.116E-03  0.100E-13    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     42 00:14:00.00  18.9000A   0.9549  -0.9777   2.3774  0.072  1.28  -0.157E+01    650.  0.290E-01  0.290E-01  0.120E-03  0.115E-13    1  35  11    1  29  17    6   6  12    0.000    0.000       0
+  0     43 00:14:18.89  18.4000A   1.0030  -1.0299   2.4491  0.075  1.28  -0.151E+01    650.  0.352E-01  0.351E-01  0.119E-03  0.123E-13    1  35  11    1  28  17    6   6  12    0.000    0.000       0
+  0     44 00:14:37.29  17.7000A   1.0386  -1.1114   2.5494  0.078  1.28  -0.147E+01    650.  0.421E-01  0.421E-01  0.122E-03  0.135E-13    1  35  11    1  28  17    7   6  12    0.000    0.000       0
+  0     45 00:14:55.00  16.2000A   1.0601  -1.1794   2.7727  0.081  1.28  -0.141E+01    650.  0.499E-01  0.498E-01  0.125E-03  0.146E-13    1  35  11    1  28  17    5  24   2    0.000    0.000       0
+  0     46 00:15:11.20  15.4000A   1.0661  -1.2312   2.9236  0.083  1.18  -0.138E+01    500.  0.578E-01  0.578E-01  0.122E-03  0.148E-13    1  35  11    1  28  17    6  24   2    0.000    0.000       0
+  0     47 00:15:26.60  14.3000A  -1.0749  -1.2699   3.1406  0.084  1.28  -0.135E+01    650.  0.662E-01  0.661E-01  0.124E-03  0.155E-13    1  24  19    1  28  17    6  24   2    0.000    0.000       0
+  0     48 00:15:40.89  13.8000A   1.1037  -1.2967   3.2568  0.086  1.28  -0.132E+01    650.  0.746E-01  0.745E-01  0.122E-03  0.156E-13    1  17  38    1  28  17    6  24   2    0.000    0.000       0
+  0     49 00:15:54.69  13.1000A   1.1514  -1.3146   3.4225  0.087  1.28  -0.131E+01    650.  0.832E-01  0.832E-01  0.125E-03  0.163E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     50 00:16:07.79  12.9000A   1.1883  -1.3252   3.4997  0.088  1.29  -0.130E+01    650.  0.919E-01  0.919E-01  0.125E-03  0.167E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     51 00:16:20.69  12.4000A   1.2162  -1.3305   3.6233  0.089  1.29  -0.129E+01    650.  0.101E+00  0.101E+00  0.130E-03  0.175E-13    1  17  38    1  28  17    8  24   2    0.000    0.000       0
+  0     52 00:16:33.09  12.3000A   1.2350  -1.3452   3.6676  0.090  1.29  -0.128E+01    650.  0.110E+00  0.110E+00  0.131E-03  0.179E-13    1  17  38    1  28  18    8  24   2    0.000    0.000       0
+  0     53 00:16:45.39  11.9000A   1.2464  -1.3669   3.7669  0.091  1.29  -0.126E+01    650.  0.119E+00  0.119E+00  0.136E-03  0.188E-13    1  17  38    1  28  18    9  34  13    0.000    0.000       0
+  0     54 00:16:57.29  11.4000A   1.2897  -1.3821   3.9424  0.092  1.29  -0.126E+01    650.  0.128E+00  0.128E+00  0.138E-03  0.191E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     55 00:17:08.69  11.2000A   1.3175  -1.3912   4.0217  0.092  1.29  -0.124E+01    650.  0.136E+00  0.136E+00  0.138E-03  0.192E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     56 00:17:19.89  10.8000A  -1.3130  -1.3950   4.1809  0.093  1.38  -0.123E+01    800.  0.145E+00  0.145E+00  0.141E-03  0.198E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     57 00:17:30.69  10.6000A  -1.3858  -1.3942   4.2493  0.093  1.38  -0.123E+01    800.  0.153E+00  0.153E+00  0.141E-03  0.199E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     58 00:17:41.29  10.4000A  -1.4208  -1.3896   4.3438  0.094  1.38  -0.122E+01    800.  0.162E+00  0.162E+00  0.144E-03  0.204E-13    5  29  17    1  28  18   11  34  13    0.000    0.000       0
+  0     59 00:17:51.69  10.2000A  -1.4345   1.3902   4.4002  0.095  1.38  -0.121E+01    800.  0.170E+00  0.170E+00  0.146E-03  0.208E-13    5  29  17    7  37  19   11  34  13    0.000    0.000       0
+  0     60 00:18:01.89  10.1000A  -1.4414   1.4901   4.4539  0.095  1.38  -0.120E+01    800.  0.177E+00  0.177E+00  0.148E-03  0.212E-13    4  32  19    7  37  19   12  34  13    0.000    0.000       0
+  0     61 00:18:11.99  10.0000A  -1.4695  -1.5076   4.4829  0.096  1.38  -0.120E+01    800.  0.185E+00  0.185E+00  0.151E-03  0.217E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     62 00:18:21.99  10.0000A  -1.4856  -1.6263   4.4854  0.096  1.38  -0.119E+01    800.  0.193E+00  0.192E+00  0.154E-03  0.222E-13    4  32  19    8   7  16   13  34  13    0.000    0.000       0
+  0     63 00:18:31.99  10.0000A  -1.4918  -1.7187   4.4802  0.097  1.38  -0.118E+01    800.  0.200E+00  0.200E+00  0.158E-03  0.229E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     64 00:18:41.99  10.1000A  -1.5052  -1.7636   4.4361  0.097  1.38  -0.116E+01    800.  0.207E+00  0.207E+00  0.163E-03  0.235E-13    4  32  18    8   7  16   14  34  13    0.000    0.000       0
+  0     65 00:18:52.09  10.2000A  -1.5591  -1.7463   4.4065  0.098  1.41  -0.116E+01    850.  0.214E+00  0.214E+00  0.169E-03  0.245E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     66 00:19:02.29  10.3000A  -1.5903  -1.6646   4.3493  0.099  1.41  -0.115E+01    850.  0.221E+00  0.221E+00  0.175E-03  0.253E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     67 00:19:12.59  10.5000A  -1.5979  -1.6322   4.2954  0.099  1.41  -0.115E+01    850.  0.228E+00  0.228E+00  0.180E-03  0.262E-13    4  32  18    9   7  16   15  35  12    0.000    0.000       0
+  0     68 00:19:23.09  10.5000A  -1.5832   1.6962   4.2656  0.100  1.41  -0.114E+01    850.  0.235E+00  0.234E+00  0.188E-03  0.273E-13    4  32  18   12  17  28   15  35  12    0.000    0.000       0
+  0     69 00:19:33.59  10.8000A  -1.5952  -1.7195   4.1677  0.101  1.41  -0.113E+01    850.  0.241E+00  0.241E+00  0.192E-03  0.279E-13    7  12   6    9   7  16   16  35  13    0.000    0.000       0
+  0     70 00:19:44.39  10.7000A  -1.5975  -1.7885   4.1887  0.101  1.41  -0.113E+01    850.  0.247E+00  0.247E+00  0.202E-03  0.293E-13    7  12   6   10   7  17   16  35  13    0.000    0.000       0
+  0     71 00:19:55.09  11.0000A   1.6027  -1.8310   4.1010  0.102  1.41  -0.112E+01    850.  0.253E+00  0.252E+00  0.204E-03  0.295E-13    7   1  37   10   7  17   12  23  18    0.000    0.000       0
+  0     72 00:20:06.09  10.9000A   1.7032  -1.8108   4.1396  0.103  1.41  -0.111E+01    850.  0.258E+00  0.258E+00  0.214E-03  0.308E-13    7  24  30   10   7  17   12  23  18    0.000    0.000       0
+  0     73 00:20:16.99  10.9000A   1.8376   1.7452   4.1413  0.104  1.41  -0.109E+01    850.  0.262E+00  0.262E+00  0.215E-03  0.309E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     74 00:20:27.89  10.7000A   1.9136   1.8271   4.1969  0.105  1.41  -0.107E+01    850.  0.267E+00  0.266E+00  0.219E-03  0.313E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     75 00:20:38.59  10.7000A   1.9332  -1.8931   4.1941  0.106  1.41  -0.106E+01    850.  0.270E+00  0.270E+00  0.218E-03  0.311E-13    7  24  30    9   4   0   13  23  17    0.000    0.000       0
+  0     76 00:20:49.29  10.7000A   1.9366  -1.9949   4.2226  0.107  1.41  -0.105E+01    850.  0.273E+00  0.273E+00  0.220E-03  0.314E-13    7  24  31    9   4   0   13  23  17    0.000    0.000       0
+  0     77 00:21:00.00  10.5000A   2.0189  -2.0694   4.2693  0.108  1.41  -0.104E+01    850.  0.276E+00  0.275E+00  0.223E-03  0.317E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     78 00:21:10.50  10.5000A   2.0530  -2.1078   4.3031  0.109  1.41  -0.103E+01    850.  0.278E+00  0.277E+00  0.221E-03  0.314E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     79 00:21:21.00  10.4000A   2.0502  -2.1052   4.3253  0.110  1.41  -0.102E+01    850.  0.279E+00  0.279E+00  0.223E-03  0.316E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     80 00:21:31.40  10.4000A   2.0227  -2.0595   4.3225  0.111  1.41  -0.101E+01    850.  0.281E+00  0.280E+00  0.222E-03  0.315E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     81 00:21:41.80  10.5000A   1.9814  -1.9732   4.2991  0.112  1.41  -0.100E+01    850.  0.282E+00  0.281E+00  0.224E-03  0.316E-13    7  24  31    9   4   0   15  23  17    0.000    0.000       0
+  0     82 00:21:52.30  10.4000A   1.9340  -1.9475   4.3286  0.113  1.41  -0.982E+00    850.  0.283E+00  0.282E+00  0.227E-03  0.321E-13    7  24  31   10   4   0   15  23  17    0.000    0.000       0
+  0     83 00:22:02.70  10.5000A   1.8924  -2.0069   4.3038  0.114  1.41  -0.972E+00    850.  0.283E+00  0.283E+00  0.226E-03  0.320E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     84 00:22:13.20  10.7000A   1.9415  -2.0355   4.2040  0.115  1.41  -0.961E+00    850.  0.283E+00  0.283E+00  0.229E-03  0.324E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     85 00:22:23.90  10.8000A   1.9325  -2.0217   4.1559  0.116  1.41  -0.952E+00    850.  0.284E+00  0.283E+00  0.234E-03  0.332E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     86 00:22:34.70  11.0000A   1.8907  -1.9607   4.0835  0.117  1.38  -0.945E+00    800.  0.284E+00  0.283E+00  0.237E-03  0.336E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     87 00:22:45.70  11.4000A   1.8309  -1.8652   3.9358  0.118  1.38  -0.942E+00    800.  0.283E+00  0.283E+00  0.242E-03  0.344E-13   14   4   0   10   3   0   16  23  17    0.000    0.000       0
+  0     88 00:22:57.10  12.0000A   1.8977  -1.8027   3.7438  0.119  1.38  -0.929E+00    800.  0.283E+00  0.283E+00  0.252E-03  0.357E-13   15   4   1    7  24   4   16  23  17    0.000    0.000       0
+  0     89 00:23:09.10  12.6000A   1.9544  -1.8206   3.5844  0.119  1.38  -0.923E+00    800.  0.283E+00  0.282E+00  0.265E-03  0.376E-13   15   4   1    8  23   4   17  23  17    0.000    0.000       0
+  0     90 00:23:21.70  12.9000A   1.9261  -1.9283   3.4830  0.120  1.38  -0.920E+00    800.  0.282E+00  0.282E+00  0.278E-03  0.395E-13   15   4   1    8  23   4   16  12  29    0.000    0.000       0
+  0     91 00:23:34.60  13.2000A   1.8512  -2.0241   3.4202  0.121  1.38  -0.928E+00    800.  0.282E+00  0.281E+00  0.284E-03  0.404E-13   15   4   1    8  23   4   11  22  39    0.000    0.000       0
+  0     92 00:23:47.80  13.4000A   1.7632  -2.1053   3.3553  0.121  1.38  -0.909E+00    800.  0.281E+00  0.281E+00  0.290E-03  0.412E-13   15   4   1    8  23   4   12  22  39    0.000    0.000       0
+  0     93 00:24:01.20  13.6000A   1.7138  -2.1674   3.2986  0.122  1.35  -0.903E+00    750.  0.281E+00  0.280E+00  0.293E-03  0.418E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     94 00:24:14.80  13.9000A   1.7170  -2.2027   3.2411  0.122  1.35  -0.901E+00    750.  0.280E+00  0.279E+00  0.296E-03  0.423E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     95 00:24:28.70  14.1000A   1.7197  -2.1983   3.1899  0.123  1.35  -0.896E+00    750.  0.279E+00  0.279E+00  0.301E-03  0.431E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     96 00:24:42.80  14.1000A   1.7153  -2.1719   3.1976  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.303E-03  0.435E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     97 00:24:56.90  13.8000A   1.6963  -2.1325   3.2561  0.123  1.35  -0.890E+00    750.  0.279E+00  0.278E+00  0.302E-03  0.432E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     98 00:25:10.70  13.8000A  -1.7049  -2.1009   3.2710  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.295E-03  0.420E-13    8  25   1    8  23   5   11  23   1    0.000    0.000       0
+  0     99 00:25:24.50  13.8000A   1.7204  -2.1783   3.2616  0.123  1.35  -0.892E+00    750.  0.278E+00  0.278E+00  0.295E-03  0.417E-13   10  26  31    8  23   5   11  23   1    0.000    0.000       0
+  0    100 00:25:38.30  13.8000A   1.7625  -2.1980   3.2579  0.124  1.41  -0.893E+00    850.  0.278E+00  0.278E+00  0.294E-03  0.413E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    101 00:25:52.10  14.0000A   1.7838  -2.1524   3.2052  0.124  1.38  -0.899E+00    800.  0.278E+00  0.277E+00  0.293E-03  0.409E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    102 00:26:06.10  14.1000A   1.7815  -2.0874   3.1853  0.124  1.38  -0.896E+00    800.  0.278E+00  0.277E+00  0.297E-03  0.411E-13   10  26  31    8  22   5   13  23   1    0.000    0.000       0
+  0    103 00:26:20.20  14.4000A  -1.8038  -2.1448   3.1345  0.124  1.38  -0.895E+00    800.  0.277E+00  0.277E+00  0.298E-03  0.410E-13   16  22  38    8  22   5   12  23  19    0.000    0.000       0
+  0    104 00:26:34.60  14.4000A   1.7966  -2.1120   3.1256  0.124  1.38  -0.894E+00    800.  0.277E+00  0.276E+00  0.303E-03  0.414E-13    1  36  26    8  22   5   12  23  19    0.000    0.000       0
+  0    105 00:26:49.00  14.4000A   1.8540  -1.9957   3.1203  0.124  1.38  -0.894E+00    800.  0.276E+00  0.276E+00  0.301E-03  0.410E-13    1  37  26    8  22   5    9  38  26    0.000    0.000       0
+  0    106 00:27:03.40  14.1000A   1.8694   1.8628   3.1953  0.125  1.38  -0.898E+00    800.  0.276E+00  0.275E+00  0.299E-03  0.407E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    107 00:27:17.50  13.8000A   1.8312   1.8697   3.2551  0.125  1.38  -0.900E+00    800.  0.275E+00  0.274E+00  0.292E-03  0.396E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    108 00:27:31.30  13.8000A   1.8481   1.8974   3.2672  0.125  1.38  -0.900E+00    800.  0.274E+00  0.274E+00  0.285E-03  0.386E-13    1  16  38    8  35  23   10  38  26    0.000    0.000       0
+  0    109 00:27:45.10  13.9000A   1.9162   1.9278   3.2486  0.125  1.38  -0.900E+00    800.  0.274E+00  0.273E+00  0.284E-03  0.385E-13    1  16  39    8  35  23   10  38  26    0.000    0.000       0
+  0    110 00:27:59.00  13.9000A   1.9932   1.9444   3.2453  0.126  1.38  -0.902E+00    800.  0.273E+00  0.272E+00  0.285E-03  0.387E-13    1  16  39    8  36  23   11  38  26    0.000    0.000       0
+  0    111 00:28:12.90  13.9000A   2.0637   2.0411   3.2331  0.126  1.38  -0.897E+00    800.  0.272E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    112 00:28:26.80  14.0000A   2.1140   2.0927   3.2228  0.126  1.38  -0.895E+00    800.  0.271E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    113 00:28:40.80  14.0000A   2.1252   2.1098   3.2064  0.126  1.41  -0.895E+00    850.  0.270E+00  0.270E+00  0.287E-03  0.388E-13    1  16  39    9  36  23   13  37  37    0.000    0.000       0
+  0    114 00:28:54.80  14.0000A   2.1629   2.1114   3.2196  0.127  1.41  -0.893E+00    850.  0.269E+00  0.268E+00  0.287E-03  0.388E-13    1  16   0    9  36  23   13  37  37    0.000    0.000       0
+  0    115 00:29:08.80  13.9000A   2.1941   2.1436   3.2459  0.127  1.41  -0.889E+00    850.  0.268E+00  0.267E+00  0.286E-03  0.387E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    116 00:29:22.70  13.9000A   2.1660   2.1317   3.2349  0.127  1.41  -0.888E+00    850.  0.266E+00  0.266E+00  0.284E-03  0.384E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    117 00:29:36.60  14.2000A   2.1114   2.0437   3.1772  0.127  1.38  -0.891E+00    800.  0.265E+00  0.264E+00  0.285E-03  0.383E-13    1  16   1    9  37  23   14  37  37    0.000    0.000       0
+  0    118 00:29:50.80  14.3000A   2.1168   1.8997   3.1409  0.128  1.38  -0.905E+00    800.  0.263E+00  0.262E+00  0.291E-03  0.390E-13    1  16   1    9  37  23   14   9  10    0.000    0.000       0
+  0    119 00:30:05.10  14.4000A   2.0639  -1.9024   3.1211  0.128  1.38  -0.889E+00    800.  0.261E+00  0.260E+00  0.293E-03  0.391E-13    1  16   1   10   6  21   13   6  16    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_short/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_short/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_short/case_config.yml	(revision 3477)
@@ -0,0 +1,23 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+  - cray_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+
+activation_strings:
+  - "d3#"
+  - "restart"
+
+significant_digits_for_netcdf_checks:
+  timeseries: 3
+  profiles: 5
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/INPUT/example_cbl_user_code_p3d
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/INPUT/example_cbl_user_code_p3d	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/INPUT/example_cbl_user_code_p3d	(revision 3477)
@@ -0,0 +1,97 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1225.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles', ! initial conditions
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+
+    pt_vertical_gradient       =    0.0,
+                                    1.0, ! piecewise temp gradients
+    pt_vertical_gradient_level =    0.0,
+                                  800.0, ! height level of temp gradients
+
+
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    surface_heatflux           = 0.1, ! sensible heat flux at the bottom surface
+    bc_pt_b                    = 'neumann', ! required with surface_heatflux
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 3600.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 900.0,  ! output interval for general data
+    dt_data_output_av          = 1800.0, ! output interval for averaged data
+    dt_dopr                    = 900.0,  ! output interval for profile data
+
+    data_output                = 'w_xy',
+                                 'w_xz',
+                                 'w_xz_av',
+                                 'theta_xy',
+                                 'theta_xz',
+
+    data_output_pr             = 'wtheta',
+                                 'w"theta"',
+                                 'w*theta*',
+                                 'w*2',
+                                 '#theta',
+                                 'theta*2',
+
+    section_xy                 = 2,
+                                 10, ! grid index for 2D XY cross sections
+    section_xz                 = 20, ! grid index for 2D XZ cross sections
+
+    averaging_interval         = 900.0, ! averaging interval general data
+    dt_averaging_input         = 10.0,  ! averaging general data sampling rate
+
+    averaging_interval_pr      = 600.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/MONITORING/example_cbl_user_code_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/MONITORING/example_cbl_user_code_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/MONITORING/example_cbl_user_code_rc	(revision 3477)
@@ -0,0 +1,486 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3133:31     *    atmosphere - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 18-07-18    Run:       example_cbl_4
+ Time:                 19:19:17    Run-No.:   00
+ Run on host:            p5imuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             3600.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      50.000 m    dy =      50.000 m
+                dz(1) =      50.000 m
+                dz(2) =    1000.000 m
+
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   2862.511 m
+
+ Vertical stretching starts at height:    1225.0 m,
+ Vertical stretching starts at index:           25,
+ Vertical stretching ends at height:   9999999.9 m,
+ Vertical stretching ends at index:             41,
+ Factor used for stretching:                 1.080,
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     20,     42)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)     = pt(1)
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant heatflux:    0.100000 K m/s
+
+
+    Constant flux layer between bottom surface and first computational u,v-level:
+
+       z_mo =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:     -20.00 <= rif <= 20.00
+
+
+ Lateral boundaries:
+       left/right:  cyclic
+       north/south: cyclic
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   800.0  m
+       Temperature:   300.00  300.00  300.00  K
+       Gradient:      ------    0.00    1.00  K/100m
+       Gridpoint:          0       0      16
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset
+
+
+       Profile: wtheta, w"theta", w*theta*, w*2, theta, theta*2,
+       Output every               900.00 s
+       Time averaged over         600.00 s
+       Averaging input every       10.00 s
+
+    2D-Arrays:
+       Output format: netCDF 64bit offset
+
+
+       XY-cross-section  Arrays:  w, theta,
+       Output every               900.00 s
+       Cross sections at k = /2/10/
+       scalar-coordinates:   /75.0/475.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+       XZ-cross-section  Arrays:  w, theta,
+       Output every               900.00 s
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    2D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset
+
+
+       XZ-cross-section  Arrays:  w,
+       Output every              1800.00 s
+       Time averaged over         900.00 s
+       Averaging input every       10.00 s
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.0 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
+    Day of the year at model start :   day_init = 172
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A  -0.2131D -0.2288D  0.1182  0.000  1.38   0.000E+00    800.  0.104E-02  0.103E-02  0.597E-03  0.867E-13    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      1 00:00:20.00  20.0000D  -0.2125  -0.2273   0.1172  0.009  0.69  -0.132E+02    100.  0.103E-02  0.102E-02  0.570E-05  0.411E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      2 00:00:40.00  20.0000D  -0.2117  -0.2252   0.1162  0.009  0.69  -0.133E+02    100.  0.102E-02  0.102E-02  0.935E-05  0.416E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      3 00:01:00.00  20.0000D  -0.2106  -0.2227   0.1152  0.009  0.69  -0.134E+02    100.  0.101E-02  0.101E-02  0.130E-04  0.421E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      4 00:01:20.00  20.0000D  -0.2093  -0.2197   0.1141  0.009  0.69  -0.134E+02    100.  0.100E-02  0.997E-03  0.166E-04  0.424E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      5 00:01:40.00  20.0000D  -0.2077  -0.2164   0.1129  0.009  0.93  -0.134E+02    250.  0.992E-03  0.988E-03  0.203E-04  0.427E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      6 00:02:00.00  20.0000D  -0.2058  -0.2126   0.1117  0.009  0.93  -0.133E+02    250.  0.983E-03  0.979E-03  0.239E-04  0.429E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      7 00:02:20.00  20.0000D  -0.2037  -0.2086   0.1103  0.009  1.22  -0.131E+02    550.  0.974E-03  0.970E-03  0.275E-04  0.431E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      8 00:02:40.00  20.0000D   0.3348D  0.3126D  0.1636  0.011  1.22  -0.105E+02    550.  0.202E-02  0.201E-02  0.601E-03  0.856E-13   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0      9 00:03:00.00  20.0000D   0.3330   0.3039   0.1619  0.011  1.22  -0.105E+02    550.  0.199E-02  0.198E-02  0.374E-04  0.830E-15   10   3  39   10   8  27    5  36  28    0.000    0.000       0
+  0     10 00:03:20.00  20.0000D   0.3296  -0.2989   0.1601  0.011  1.22  -0.103E+02    550.  0.196E-02  0.195E-02  0.409E-04  0.827E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     11 00:03:40.00  20.0000D   0.3249  -0.2986   0.1580  0.011  1.22  -0.101E+02    550.  0.194E-02  0.193E-02  0.444E-04  0.828E-15   10   3  39    8   4   6    5  36  28    0.000    0.000       0
+  0     12 00:04:00.00  20.0000D   0.3189  -0.2989   0.1558  0.012  1.22  -0.975E+01    550.  0.191E-02  0.190E-02  0.478E-04  0.831E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     13 00:04:20.00  20.0000D   0.3119  -0.3005   0.1535  0.012  1.22  -0.940E+01    550.  0.189E-02  0.188E-02  0.513E-04  0.835E-15   10   3  39    8   0   7    5  36  28    0.000    0.000       0
+  0     14 00:04:40.00  20.0000D   0.3056  -0.3012   0.1512  0.013  1.22  -0.905E+01    550.  0.187E-02  0.185E-02  0.546E-04  0.842E-15   10   3   0    8   0   7    5  36  28    0.000    0.000       0
+  0     15 00:05:00.00  20.0000D   0.4151D -0.3964D -0.1812  0.013  1.22  -0.851E+01    550.  0.292E-02  0.289E-02  0.625E-03  0.860E-13    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     16 00:05:20.00  20.0000D   0.4183  -0.4076  -0.1810  0.014  1.22  -0.811E+01    550.  0.287E-02  0.285E-02  0.640E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     17 00:05:40.00  20.0000D   0.4163  -0.4151  -0.1796  0.015  1.22  -0.773E+01    550.  0.283E-02  0.280E-02  0.672E-04  0.129E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     18 00:06:00.00  20.0000D   0.4097  -0.4189  -0.1772  0.015  1.22  -0.735E+01    550.  0.279E-02  0.276E-02  0.703E-04  0.130E-14    8  17   5    8   3   6    8  19   3    0.000    0.000       0
+  0     19 00:06:20.00  20.0000D   0.3992  -0.4192   0.1802  0.016  1.22  -0.698E+01    550.  0.275E-02  0.273E-02  0.734E-04  0.131E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     20 00:06:40.00  20.0000D   0.3855  -0.4165   0.1983  0.017  1.22  -0.656E+01    550.  0.272E-02  0.269E-02  0.765E-04  0.133E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     21 00:07:00.00  20.0000D   0.3695  -0.4109   0.2198  0.018  1.22  -0.616E+01    550.  0.269E-02  0.267E-02  0.795E-04  0.136E-14    8  17   5    8   3   6    2  36   2    0.000    0.000       0
+  0     22 00:07:20.00  20.0000D  -0.3706  -0.4030   0.2474  0.020  1.22  -0.577E+01    550.  0.267E-02  0.265E-02  0.824E-04  0.140E-14    8  13   9    8   3   6    2   6  12    0.000    0.000       0
+  0     23 00:07:40.00  20.0000D  -0.4267D -0.4554D  0.2850  0.021  1.22  -0.539E+01    550.  0.371E-02  0.369E-02  0.653E-03  0.886E-13    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     24 00:08:00.00  20.0000D  -0.4241  -0.4568   0.3233  0.023  1.22  -0.506E+01    550.  0.368E-02  0.366E-02  0.905E-04  0.190E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     25 00:08:20.00  20.0000D  -0.4208  -0.4522   0.3672  0.024  1.22  -0.471E+01    550.  0.367E-02  0.365E-02  0.931E-04  0.196E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     26 00:08:40.00  20.0000D  -0.4174  -0.4421   0.4169  0.026  1.22  -0.440E+01    550.  0.368E-02  0.366E-02  0.957E-04  0.204E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     27 00:09:00.00  20.0000D  -0.4142  -0.4279   0.4727  0.028  1.22  -0.410E+01    550.  0.372E-02  0.370E-02  0.981E-04  0.214E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     28 00:09:20.00  20.0000D  -0.4116  -0.4106   0.5348  0.030  1.18  -0.381E+01    500.  0.380E-02  0.378E-02  0.100E-03  0.227E-14    4   4   4    8   1   8    2   6  12    0.000    0.000       0
+  0     29 00:09:40.00  20.0000D  -0.4107  -0.4087   0.6032  0.032  1.18  -0.355E+01    500.  0.393E-02  0.391E-02  0.103E-03  0.242E-14    5   4   4    5   3  36    2   6  12    0.000    0.000       0
+  0     30 00:10:00.00  20.0000D   0.4798D  0.4695D  0.7094  0.035  1.18  -0.330E+01    500.  0.519E-02  0.516E-02  0.656E-03  0.867E-13    5  14  20    9   7  14    2   6  12    0.000    0.000       0
+  0     31 00:10:20.00  20.0000D   0.4589  -0.4757   0.8018  0.037  1.18  -0.308E+01    500.  0.543E-02  0.540E-02  0.108E-03  0.318E-14    5  14  20    8   2   6    3   6  12    0.000    0.000       0
+  0     32 00:10:40.00  20.0000D   0.4450  -0.4782   0.9236  0.040  1.18  -0.288E+01    500.  0.579E-02  0.576E-02  0.110E-03  0.344E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     33 00:11:00.00  20.0000A   0.4349  -0.4767   1.0530  0.043  1.18  -0.266E+01    500.  0.629E-02  0.626E-02  0.111E-03  0.377E-14    6  39  30    8   2   6    3   6  12    0.000    0.000       0
+  0     34 00:11:20.00  20.0000A  -0.4684  -0.5184   1.1853  0.046  1.18  -0.249E+01    500.  0.699E-02  0.696E-02  0.111E-03  0.416E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     35 00:11:40.00  20.0000A  -0.5110  -0.5803   1.3146  0.049  1.18  -0.233E+01    500.  0.793E-02  0.791E-02  0.112E-03  0.464E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     36 00:12:00.00  20.0000A  -0.5522  -0.6460   1.4351  0.052  1.18  -0.218E+01    500.  0.920E-02  0.917E-02  0.112E-03  0.522E-14    1   3  23    1  29  17    3   6  12    0.000    0.000       0
+  0     37 00:12:20.00  20.0000A   0.6173  -0.7139   1.6132  0.055  1.18  -0.205E+01    500.  0.109E-01  0.108E-01  0.112E-03  0.591E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     38 00:12:40.00  20.0000A   0.6867  -0.7795   1.7863  0.059  1.18  -0.193E+01    500.  0.130E-01  0.130E-01  0.112E-03  0.673E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     39 00:13:00.00  20.0000A   0.7575  -0.8399   1.9135  0.062  1.18  -0.183E+01    500.  0.158E-01  0.158E-01  0.112E-03  0.767E-14    1  35  11    1  29  17    4   6  12    0.000    0.000       0
+  0     40 00:13:20.00  20.0000A   0.8277  -0.8934   2.1012  0.066  1.18  -0.173E+01    500.  0.193E-01  0.193E-01  0.114E-03  0.877E-14    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     41 00:13:40.00  20.0000A   0.8945  -0.9393   2.2220  0.069  1.18  -0.165E+01    500.  0.237E-01  0.236E-01  0.116E-03  0.100E-13    1  35  11    1  29  17    5   6  12    0.000    0.000       0
+  0     42 00:14:00.00  18.9000A   0.9549  -0.9777   2.3774  0.072  1.28  -0.157E+01    650.  0.290E-01  0.290E-01  0.120E-03  0.115E-13    1  35  11    1  29  17    6   6  12    0.000    0.000       0
+  0     43 00:14:18.89  18.4000A   1.0030  -1.0299   2.4491  0.075  1.28  -0.151E+01    650.  0.352E-01  0.351E-01  0.119E-03  0.123E-13    1  35  11    1  28  17    6   6  12    0.000    0.000       0
+  0     44 00:14:37.29  17.7000A   1.0386  -1.1114   2.5494  0.078  1.28  -0.147E+01    650.  0.421E-01  0.421E-01  0.122E-03  0.135E-13    1  35  11    1  28  17    7   6  12    0.000    0.000       0
+  0     45 00:14:55.00  16.2000A   1.0601  -1.1794   2.7727  0.081  1.28  -0.141E+01    650.  0.499E-01  0.498E-01  0.125E-03  0.146E-13    1  35  11    1  28  17    5  24   2    0.000    0.000       0
+  0     46 00:15:11.20  15.4000A   1.0661  -1.2312   2.9236  0.083  1.18  -0.138E+01    500.  0.578E-01  0.578E-01  0.122E-03  0.148E-13    1  35  11    1  28  17    6  24   2    0.000    0.000       0
+  0     47 00:15:26.60  14.3000A  -1.0749  -1.2699   3.1406  0.084  1.28  -0.135E+01    650.  0.662E-01  0.661E-01  0.124E-03  0.155E-13    1  24  19    1  28  17    6  24   2    0.000    0.000       0
+  0     48 00:15:40.89  13.8000A   1.1037  -1.2967   3.2568  0.086  1.28  -0.132E+01    650.  0.746E-01  0.745E-01  0.122E-03  0.156E-13    1  17  38    1  28  17    6  24   2    0.000    0.000       0
+  0     49 00:15:54.69  13.1000A   1.1514  -1.3146   3.4225  0.087  1.28  -0.131E+01    650.  0.832E-01  0.832E-01  0.125E-03  0.163E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     50 00:16:07.79  12.9000A   1.1883  -1.3252   3.4997  0.088  1.29  -0.130E+01    650.  0.919E-01  0.919E-01  0.125E-03  0.167E-13    1  17  38    1  28  17    7  24   2    0.000    0.000       0
+  0     51 00:16:20.69  12.4000A   1.2162  -1.3305   3.6233  0.089  1.29  -0.129E+01    650.  0.101E+00  0.101E+00  0.130E-03  0.175E-13    1  17  38    1  28  17    8  24   2    0.000    0.000       0
+  0     52 00:16:33.09  12.3000A   1.2350  -1.3452   3.6676  0.090  1.29  -0.128E+01    650.  0.110E+00  0.110E+00  0.131E-03  0.179E-13    1  17  38    1  28  18    8  24   2    0.000    0.000       0
+  0     53 00:16:45.39  11.9000A   1.2464  -1.3669   3.7669  0.091  1.29  -0.126E+01    650.  0.119E+00  0.119E+00  0.136E-03  0.188E-13    1  17  38    1  28  18    9  34  13    0.000    0.000       0
+  0     54 00:16:57.29  11.4000A   1.2897  -1.3821   3.9424  0.092  1.29  -0.126E+01    650.  0.128E+00  0.128E+00  0.138E-03  0.191E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     55 00:17:08.69  11.2000A   1.3175  -1.3912   4.0217  0.092  1.29  -0.124E+01    650.  0.136E+00  0.136E+00  0.138E-03  0.192E-13    5  31  10    1  28  18    9  34  13    0.000    0.000       0
+  0     56 00:17:19.89  10.8000A  -1.3130  -1.3950   4.1809  0.093  1.38  -0.123E+01    800.  0.145E+00  0.145E+00  0.141E-03  0.198E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     57 00:17:30.69  10.6000A  -1.3858  -1.3942   4.2493  0.093  1.38  -0.123E+01    800.  0.153E+00  0.153E+00  0.141E-03  0.199E-13    5  29  17    1  28  18   10  34  13    0.000    0.000       0
+  0     58 00:17:41.29  10.4000A  -1.4208  -1.3896   4.3438  0.094  1.38  -0.122E+01    800.  0.162E+00  0.162E+00  0.144E-03  0.204E-13    5  29  17    1  28  18   11  34  13    0.000    0.000       0
+  0     59 00:17:51.69  10.2000A  -1.4345   1.3902   4.4002  0.095  1.38  -0.121E+01    800.  0.170E+00  0.170E+00  0.146E-03  0.208E-13    5  29  17    7  37  19   11  34  13    0.000    0.000       0
+  0     60 00:18:01.89  10.1000A  -1.4414   1.4901   4.4539  0.095  1.38  -0.120E+01    800.  0.177E+00  0.177E+00  0.148E-03  0.212E-13    4  32  19    7  37  19   12  34  13    0.000    0.000       0
+  0     61 00:18:11.99  10.0000A  -1.4695  -1.5076   4.4829  0.096  1.38  -0.120E+01    800.  0.185E+00  0.185E+00  0.151E-03  0.217E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     62 00:18:21.99  10.0000A  -1.4856  -1.6263   4.4854  0.096  1.38  -0.119E+01    800.  0.193E+00  0.192E+00  0.154E-03  0.222E-13    4  32  19    8   7  16   13  34  13    0.000    0.000       0
+  0     63 00:18:31.99  10.0000A  -1.4918  -1.7187   4.4802  0.097  1.38  -0.118E+01    800.  0.200E+00  0.200E+00  0.158E-03  0.229E-13    4  32  19    8   7  16   12  34  13    0.000    0.000       0
+  0     64 00:18:41.99  10.1000A  -1.5052  -1.7636   4.4361  0.097  1.38  -0.116E+01    800.  0.207E+00  0.207E+00  0.163E-03  0.235E-13    4  32  18    8   7  16   14  34  13    0.000    0.000       0
+  0     65 00:18:52.09  10.2000A  -1.5591  -1.7463   4.4065  0.098  1.41  -0.116E+01    850.  0.214E+00  0.214E+00  0.169E-03  0.245E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     66 00:19:02.29  10.3000A  -1.5903  -1.6646   4.3493  0.099  1.41  -0.115E+01    850.  0.221E+00  0.221E+00  0.175E-03  0.253E-13    4  32  18    8   7  16   13  34  13    0.000    0.000       0
+  0     67 00:19:12.59  10.5000A  -1.5979  -1.6322   4.2954  0.099  1.41  -0.115E+01    850.  0.228E+00  0.228E+00  0.180E-03  0.262E-13    4  32  18    9   7  16   15  35  12    0.000    0.000       0
+  0     68 00:19:23.09  10.5000A  -1.5832   1.6962   4.2656  0.100  1.41  -0.114E+01    850.  0.235E+00  0.234E+00  0.188E-03  0.273E-13    4  32  18   12  17  28   15  35  12    0.000    0.000       0
+  0     69 00:19:33.59  10.8000A  -1.5952  -1.7195   4.1677  0.101  1.41  -0.113E+01    850.  0.241E+00  0.241E+00  0.192E-03  0.279E-13    7  12   6    9   7  16   16  35  13    0.000    0.000       0
+  0     70 00:19:44.39  10.7000A  -1.5975  -1.7885   4.1887  0.101  1.41  -0.113E+01    850.  0.247E+00  0.247E+00  0.202E-03  0.293E-13    7  12   6   10   7  17   16  35  13    0.000    0.000       0
+  0     71 00:19:55.09  11.0000A   1.6027  -1.8310   4.1010  0.102  1.41  -0.112E+01    850.  0.253E+00  0.252E+00  0.204E-03  0.295E-13    7   1  37   10   7  17   12  23  18    0.000    0.000       0
+  0     72 00:20:06.09  10.9000A   1.7032  -1.8108   4.1396  0.103  1.41  -0.111E+01    850.  0.258E+00  0.258E+00  0.214E-03  0.308E-13    7  24  30   10   7  17   12  23  18    0.000    0.000       0
+  0     73 00:20:16.99  10.9000A   1.8376   1.7452   4.1413  0.104  1.41  -0.109E+01    850.  0.262E+00  0.262E+00  0.215E-03  0.309E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     74 00:20:27.89  10.7000A   1.9136   1.8271   4.1969  0.105  1.41  -0.107E+01    850.  0.267E+00  0.266E+00  0.219E-03  0.313E-13    7  24  30   14  18  28   13  23  18    0.000    0.000       0
+  0     75 00:20:38.59  10.7000A   1.9332  -1.8931   4.1941  0.106  1.41  -0.106E+01    850.  0.270E+00  0.270E+00  0.218E-03  0.311E-13    7  24  30    9   4   0   13  23  17    0.000    0.000       0
+  0     76 00:20:49.29  10.7000A   1.9366  -1.9949   4.2226  0.107  1.41  -0.105E+01    850.  0.273E+00  0.273E+00  0.220E-03  0.314E-13    7  24  31    9   4   0   13  23  17    0.000    0.000       0
+  0     77 00:21:00.00  10.5000A   2.0189  -2.0694   4.2693  0.108  1.41  -0.104E+01    850.  0.276E+00  0.275E+00  0.223E-03  0.317E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     78 00:21:10.50  10.5000A   2.0530  -2.1078   4.3031  0.109  1.41  -0.103E+01    850.  0.278E+00  0.277E+00  0.221E-03  0.314E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     79 00:21:21.00  10.4000A   2.0502  -2.1052   4.3253  0.110  1.41  -0.102E+01    850.  0.279E+00  0.279E+00  0.223E-03  0.316E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     80 00:21:31.40  10.4000A   2.0227  -2.0595   4.3225  0.111  1.41  -0.101E+01    850.  0.281E+00  0.280E+00  0.222E-03  0.315E-13    7  24  31    9   4   0   14  23  17    0.000    0.000       0
+  0     81 00:21:41.80  10.5000A   1.9814  -1.9732   4.2991  0.112  1.41  -0.100E+01    850.  0.282E+00  0.281E+00  0.224E-03  0.316E-13    7  24  31    9   4   0   15  23  17    0.000    0.000       0
+  0     82 00:21:52.30  10.4000A   1.9340  -1.9475   4.3286  0.113  1.41  -0.982E+00    850.  0.283E+00  0.282E+00  0.227E-03  0.321E-13    7  24  31   10   4   0   15  23  17    0.000    0.000       0
+  0     83 00:22:02.70  10.5000A   1.8924  -2.0069   4.3038  0.114  1.41  -0.972E+00    850.  0.283E+00  0.283E+00  0.226E-03  0.320E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     84 00:22:13.20  10.7000A   1.9415  -2.0355   4.2040  0.115  1.41  -0.961E+00    850.  0.283E+00  0.283E+00  0.229E-03  0.324E-13   14   4   0   10   4   0   15  23  17    0.000    0.000       0
+  0     85 00:22:23.90  10.8000A   1.9325  -2.0217   4.1559  0.116  1.41  -0.952E+00    850.  0.284E+00  0.283E+00  0.234E-03  0.332E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     86 00:22:34.70  11.0000A   1.8907  -1.9607   4.0835  0.117  1.38  -0.945E+00    800.  0.284E+00  0.283E+00  0.237E-03  0.336E-13   14   4   0   10   4   0   16  23  17    0.000    0.000       0
+  0     87 00:22:45.70  11.4000A   1.8309  -1.8652   3.9358  0.118  1.38  -0.942E+00    800.  0.283E+00  0.283E+00  0.242E-03  0.344E-13   14   4   0   10   3   0   16  23  17    0.000    0.000       0
+  0     88 00:22:57.10  12.0000A   1.8977  -1.8027   3.7438  0.119  1.38  -0.929E+00    800.  0.283E+00  0.283E+00  0.252E-03  0.357E-13   15   4   1    7  24   4   16  23  17    0.000    0.000       0
+  0     89 00:23:09.10  12.6000A   1.9544  -1.8206   3.5844  0.119  1.38  -0.923E+00    800.  0.283E+00  0.282E+00  0.265E-03  0.376E-13   15   4   1    8  23   4   17  23  17    0.000    0.000       0
+  0     90 00:23:21.70  12.9000A   1.9261  -1.9283   3.4830  0.120  1.38  -0.920E+00    800.  0.282E+00  0.282E+00  0.278E-03  0.395E-13   15   4   1    8  23   4   16  12  29    0.000    0.000       0
+  0     91 00:23:34.60  13.2000A   1.8512  -2.0241   3.4202  0.121  1.38  -0.928E+00    800.  0.282E+00  0.281E+00  0.284E-03  0.404E-13   15   4   1    8  23   4   11  22  39    0.000    0.000       0
+  0     92 00:23:47.80  13.4000A   1.7632  -2.1053   3.3553  0.121  1.38  -0.909E+00    800.  0.281E+00  0.281E+00  0.290E-03  0.412E-13   15   4   1    8  23   4   12  22  39    0.000    0.000       0
+  0     93 00:24:01.20  13.6000A   1.7138  -2.1674   3.2986  0.122  1.35  -0.903E+00    750.  0.281E+00  0.280E+00  0.293E-03  0.418E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     94 00:24:14.80  13.9000A   1.7170  -2.2027   3.2411  0.122  1.35  -0.901E+00    750.  0.280E+00  0.279E+00  0.296E-03  0.423E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     95 00:24:28.70  14.1000A   1.7197  -2.1983   3.1899  0.123  1.35  -0.896E+00    750.  0.279E+00  0.279E+00  0.301E-03  0.431E-13    3  22  38    8  23   4   12  22  39    0.000    0.000       0
+  0     96 00:24:42.80  14.1000A   1.7153  -2.1719   3.1976  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.303E-03  0.435E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     97 00:24:56.90  13.8000A   1.6963  -2.1325   3.2561  0.123  1.35  -0.890E+00    750.  0.279E+00  0.278E+00  0.302E-03  0.432E-13    3  22  38    7  23   5   10  23   1    0.000    0.000       0
+  0     98 00:25:10.70  13.8000A  -1.7049  -2.1009   3.2710  0.123  1.35  -0.891E+00    750.  0.279E+00  0.278E+00  0.295E-03  0.420E-13    8  25   1    8  23   5   11  23   1    0.000    0.000       0
+  0     99 00:25:24.50  13.8000A   1.7204  -2.1783   3.2616  0.123  1.35  -0.892E+00    750.  0.278E+00  0.278E+00  0.295E-03  0.417E-13   10  26  31    8  23   5   11  23   1    0.000    0.000       0
+  0    100 00:25:38.30  13.8000A   1.7625  -2.1980   3.2579  0.124  1.41  -0.893E+00    850.  0.278E+00  0.278E+00  0.294E-03  0.413E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    101 00:25:52.10  14.0000A   1.7838  -2.1524   3.2052  0.124  1.38  -0.899E+00    800.  0.278E+00  0.277E+00  0.293E-03  0.409E-13   10  26  31    8  23   5   12  23   1    0.000    0.000       0
+  0    102 00:26:06.10  14.1000A   1.7815  -2.0874   3.1853  0.124  1.38  -0.896E+00    800.  0.278E+00  0.277E+00  0.297E-03  0.411E-13   10  26  31    8  22   5   13  23   1    0.000    0.000       0
+  0    103 00:26:20.20  14.4000A  -1.8038  -2.1448   3.1345  0.124  1.38  -0.895E+00    800.  0.277E+00  0.277E+00  0.298E-03  0.410E-13   16  22  38    8  22   5   12  23  19    0.000    0.000       0
+  0    104 00:26:34.60  14.4000A   1.7966  -2.1120   3.1256  0.124  1.38  -0.894E+00    800.  0.277E+00  0.276E+00  0.303E-03  0.414E-13    1  36  26    8  22   5   12  23  19    0.000    0.000       0
+  0    105 00:26:49.00  14.4000A   1.8540  -1.9957   3.1203  0.124  1.38  -0.894E+00    800.  0.276E+00  0.276E+00  0.301E-03  0.410E-13    1  37  26    8  22   5    9  38  26    0.000    0.000       0
+  0    106 00:27:03.40  14.1000A   1.8694   1.8628   3.1953  0.125  1.38  -0.898E+00    800.  0.276E+00  0.275E+00  0.299E-03  0.407E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    107 00:27:17.50  13.8000A   1.8312   1.8697   3.2551  0.125  1.38  -0.900E+00    800.  0.275E+00  0.274E+00  0.292E-03  0.396E-13    1  37  26    8  35  24   10  38  26    0.000    0.000       0
+  0    108 00:27:31.30  13.8000A   1.8481   1.8974   3.2672  0.125  1.38  -0.900E+00    800.  0.274E+00  0.274E+00  0.285E-03  0.386E-13    1  16  38    8  35  23   10  38  26    0.000    0.000       0
+  0    109 00:27:45.10  13.9000A   1.9162   1.9278   3.2486  0.125  1.38  -0.900E+00    800.  0.274E+00  0.273E+00  0.284E-03  0.385E-13    1  16  39    8  35  23   10  38  26    0.000    0.000       0
+  0    110 00:27:59.00  13.9000A   1.9932   1.9444   3.2453  0.126  1.38  -0.902E+00    800.  0.273E+00  0.272E+00  0.285E-03  0.387E-13    1  16  39    8  36  23   11  38  26    0.000    0.000       0
+  0    111 00:28:12.90  13.9000A   2.0637   2.0411   3.2331  0.126  1.38  -0.897E+00    800.  0.272E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    112 00:28:26.80  14.0000A   2.1140   2.0927   3.2228  0.126  1.38  -0.895E+00    800.  0.271E+00  0.271E+00  0.285E-03  0.386E-13    1  16  39    9  36  24   13  37  36    0.000    0.000       0
+  0    113 00:28:40.80  14.0000A   2.1252   2.1098   3.2064  0.126  1.41  -0.895E+00    850.  0.270E+00  0.270E+00  0.287E-03  0.388E-13    1  16  39    9  36  23   13  37  37    0.000    0.000       0
+  0    114 00:28:54.80  14.0000A   2.1629   2.1114   3.2196  0.127  1.41  -0.893E+00    850.  0.269E+00  0.268E+00  0.287E-03  0.388E-13    1  16   0    9  36  23   13  37  37    0.000    0.000       0
+  0    115 00:29:08.80  13.9000A   2.1941   2.1436   3.2459  0.127  1.41  -0.889E+00    850.  0.268E+00  0.267E+00  0.286E-03  0.387E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    116 00:29:22.70  13.9000A   2.1660   2.1317   3.2349  0.127  1.41  -0.888E+00    850.  0.266E+00  0.266E+00  0.284E-03  0.384E-13    1  16   0    9  37  23   14  37  37    0.000    0.000       0
+  0    117 00:29:36.60  14.2000A   2.1114   2.0437   3.1772  0.127  1.38  -0.891E+00    800.  0.265E+00  0.264E+00  0.285E-03  0.383E-13    1  16   1    9  37  23   14  37  37    0.000    0.000       0
+  0    118 00:29:50.80  14.3000A   2.1168   1.8997   3.1409  0.128  1.38  -0.905E+00    800.  0.263E+00  0.262E+00  0.291E-03  0.390E-13    1  16   1    9  37  23   14   9  10    0.000    0.000       0
+  0    119 00:30:05.10  14.4000A   2.0639  -1.9024   3.1211  0.128  1.38  -0.889E+00    800.  0.261E+00  0.260E+00  0.293E-03  0.391E-13    1  16   1   10   6  21   13   6  16    0.000    0.000       0
+  0    120 00:30:19.50  14.1000A   2.0191  -2.0149   3.1855  0.128  1.38  -0.885E+00    800.  0.259E+00  0.258E+00  0.294E-03  0.391E-13    1  17   1   10   6  21    7  25  19    0.000    0.000       0
+  0    121 00:30:33.60  13.8000A  -2.0333  -2.0438   3.2493  0.128  1.38  -0.882E+00    800.  0.257E+00  0.256E+00  0.288E-03  0.381E-13    9  10  18   10   6  21    8  25  19    0.000    0.000       0
+  0    122 00:30:47.40  13.5000A   1.9276  -2.0991   3.3455  0.129  1.38  -0.884E+00    800.  0.254E+00  0.254E+00  0.281E-03  0.371E-13    1  17   1   10   5  21    8  25  19    0.000    0.000       0
+  0    123 00:31:00.90  13.3000A  -1.9161  -2.1236   3.3942  0.129  1.41  -0.879E+00    850.  0.252E+00  0.251E+00  0.275E-03  0.361E-13   10   8  19   10   5  21    9  25  19    0.000    0.000       0
+  0    124 00:31:14.20  13.1000A  -1.9563  -2.0675   3.4440  0.129  1.41  -0.879E+00    850.  0.249E+00  0.249E+00  0.270E-03  0.353E-13   10   9  18   10   5  21    9  25  19    0.000    0.000       0
+  0    125 00:31:27.30  13.1000A  -1.8492  -1.9400   3.4359  0.128  1.41  -0.885E+00    850.  0.247E+00  0.246E+00  0.265E-03  0.345E-13   10   9  18   10   5  21   10  25  19    0.000    0.000       0
+  0    126 00:31:40.40  13.1000A  -1.9169  -1.9001   3.4331  0.128  1.41  -0.884E+00    850.  0.245E+00  0.244E+00  0.264E-03  0.343E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  0    127 00:31:53.50  13.4000A  -1.9327  -1.8837   3.3592  0.128  1.41  -0.890E+00    850.  0.242E+00  0.241E+00  0.263E-03  0.341E-13   13  26  20    6  12  21   10  25  19    0.000    0.000       0
+  0    128 00:32:06.90  13.7000A  -1.9667  -1.8724   3.2909  0.128  1.41  -0.894E+00    850.  0.239E+00  0.239E+00  0.268E-03  0.346E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  0    129 00:32:20.60  13.9000A  -2.0586  -1.8788   3.2452  0.127  1.41  -0.899E+00    850.  0.237E+00  0.236E+00  0.273E-03  0.351E-13   13  26  19    1  13  16    9   9  19    0.000    0.000       0
+  0    130 00:32:34.50  14.1000A  -2.0979  -1.8873   3.2012  0.127  1.41  -0.902E+00    850.  0.234E+00  0.233E+00  0.275E-03  0.353E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  0    131 00:32:48.60  14.2000A  -2.1232  -1.8963   3.1743  0.127  1.41  -0.904E+00    850.  0.232E+00  0.231E+00  0.278E-03  0.355E-13   13  26  19    1  13  16   10   9  19    0.000    0.000       0
+  0    132 00:33:02.80  14.6000A  -2.1511  -1.9032   3.0741  0.126  1.41  -0.904E+00    850.  0.229E+00  0.228E+00  0.278E-03  0.354E-13   13  26  19    1  13  16   10   8  19    0.000    0.000       0
+  0    133 00:33:17.40  14.7000A  -2.2399  -1.9049   3.0632  0.126  1.41  -0.910E+00    850.  0.227E+00  0.226E+00  0.285E-03  0.360E-13   14  26  18    1  13  16   10   8  19    0.000    0.000       0
+  0    134 00:33:32.10  14.7000A  -2.3269  -1.8979   3.0641  0.125  1.41  -0.911E+00    850.  0.225E+00  0.224E+00  0.286E-03  0.359E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  0    135 00:33:46.80  14.6000A  -2.4204  -1.8791   3.0732  0.125  1.41  -0.914E+00    850.  0.223E+00  0.222E+00  0.285E-03  0.355E-13   14  26  18    1  13  16   11   8  19    0.000    0.000       0
+  0    136 00:34:01.40  14.9000A  -2.5050  -1.8780   3.0299  0.124  1.38  -0.913E+00    800.  0.221E+00  0.220E+00  0.282E-03  0.349E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  0    137 00:34:16.30  15.2000A  -2.5433  -1.8650   2.9683  0.124  1.38  -0.911E+00    800.  0.219E+00  0.218E+00  0.286E-03  0.353E-13   14  26  18    1  12  16   11   8  19    0.000    0.000       0
+  0    138 00:34:31.50  15.3000A  -2.4931  -1.8365   2.9450  0.123  1.38  -0.912E+00    800.  0.218E+00  0.217E+00  0.290E-03  0.357E-13   14  26  18    1  12  16   12   8  19    0.000    0.000       0
+  0    139 00:34:46.80  15.4000A  -2.3625  -1.7932   2.9239  0.122  1.38  -0.922E+00    800.  0.216E+00  0.215E+00  0.292E-03  0.356E-13   14  27  18    1  12  16   12   8  19    0.000    0.000       0
+  0    140 00:35:02.20  15.5000A  -2.3955  -1.7711   2.8952  0.122  1.38  -0.917E+00    800.  0.215E+00  0.214E+00  0.293E-03  0.355E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  0    141 00:35:17.70  15.8000A  -2.4783  -1.7375   2.8481  0.121  1.38  -0.922E+00    800.  0.214E+00  0.213E+00  0.294E-03  0.354E-13   15  26  17    1  11  15   12   8  19    0.000    0.000       0
+  0    142 00:35:33.50  15.8000A  -2.4727   1.7971   2.8403  0.121  1.38  -0.929E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.357E-13   15  26  17    8  34  23   14  26  24    0.000    0.000       0
+  0    143 00:35:49.30  15.7000A  -2.3660  -1.7720   2.8642  0.120  1.38  -0.927E+00    800.  0.213E+00  0.212E+00  0.299E-03  0.354E-13   15  26  17    1   8  35    6  38  32    0.000    0.000       0
+  0    144 00:36:05.00  15.3000A  -2.2554  -1.7519   2.9492  0.119  1.38  -0.931E+00    800.  0.212E+00  0.211E+00  0.297E-03  0.349E-13   15  26  16    1   7  34    6  38  32    0.000    0.000       0
+  0    145 00:36:20.30  14.7000A  -2.1060  -1.8205   3.0663  0.119  1.38  -0.940E+00    800.  0.212E+00  0.211E+00  0.290E-03  0.339E-13   15  26  16    1   6  34    7  38  32    0.000    0.000       0
+  0    146 00:36:35.00  14.2000A  -2.0342  -1.8476   3.1662  0.118  1.38  -0.941E+00    800.  0.212E+00  0.211E+00  0.278E-03  0.325E-13   11  11  13    1   6  34    7  38  32    0.000    0.000       0
+  0    147 00:36:49.20  13.9000A  -2.0417  -1.8187   3.2309  0.118  1.38  -0.945E+00    800.  0.211E+00  0.211E+00  0.269E-03  0.313E-13   10  12  14    1   5  34    7  38  32    0.000    0.000       0
+  0    148 00:37:03.10  13.6000A  -2.1224  -1.8939   3.2986  0.117  1.38  -0.950E+00    800.  0.211E+00  0.210E+00  0.264E-03  0.306E-13   10  12  14    1   5  34    8  38  32    0.000    0.000       0
+  0    149 00:37:16.70  13.4000A  -2.1388  -1.8889   3.3525  0.117  1.38  -0.952E+00    800.  0.211E+00  0.210E+00  0.258E-03  0.299E-13   11  12  13    1   5  34    8  38  32    0.000    0.000       0
+  0    150 00:37:30.10  13.4000A  -2.1449  -1.8704   3.3574  0.116  1.38  -0.957E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.294E-13   11  12  13    1   6  35    8  38  32    0.000    0.000       0
+  0    151 00:37:43.50  13.5000A  -2.1129  -1.9084   3.3383  0.116  1.38  -0.961E+00    800.  0.211E+00  0.210E+00  0.255E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    152 00:37:57.00  13.6000A  -2.0518  -1.9761   3.3117  0.116  1.38  -0.963E+00    800.  0.211E+00  0.210E+00  0.257E-03  0.293E-13   12  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    153 00:38:10.60  13.9000A  -1.9674  -1.9342   3.2347  0.115  1.41  -0.967E+00    850.  0.211E+00  0.210E+00  0.259E-03  0.294E-13   13  12  12    1   5  35    9  38  32    0.000    0.000       0
+  0    154 00:38:24.50  14.2000A   1.9542  -2.0470   3.1585  0.115  1.41  -0.973E+00    850.  0.211E+00  0.210E+00  0.265E-03  0.298E-13    7  28  21    1   4  35    8  10   7    0.000    0.000       0
+  0    155 00:38:38.70  13.5000A   1.9898  -2.0559   3.3410  0.115  1.41  -0.974E+00    850.  0.211E+00  0.210E+00  0.271E-03  0.303E-13    7  28  22    1   4  35    8   9   7    0.000    0.000       0
+  0    156 00:38:52.20  12.8000A   1.9996  -1.9579   3.5029  0.114  1.41  -0.976E+00    850.  0.211E+00  0.210E+00  0.258E-03  0.288E-13    7  28  22    1   4  35    9   9   7    0.000    0.000       0
+  0    157 00:39:05.00  12.6000A   1.9398  -2.0307   3.5698  0.114  1.41  -0.981E+00    850.  0.211E+00  0.210E+00  0.246E-03  0.273E-13    7  28  22    1   3  35    9   9   7    0.000    0.000       0
+  0    158 00:39:17.60  12.5000A  -1.8941  -2.0019   3.6009  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.243E-03  0.268E-13   14  13  11    1   3  35   10   9   7    0.000    0.000       0
+  0    159 00:39:30.10  12.8000A  -1.8379  -1.8935   3.5261  0.114  1.41  -0.982E+00    850.  0.211E+00  0.210E+00  0.241E-03  0.266E-13    8  13  15    1   3  35   10   8   6    0.000    0.000       0
+  0    160 00:39:42.90  13.0000A  -1.8526   1.8509   3.4685  0.114  1.41  -0.987E+00    850.  0.212E+00  0.211E+00  0.248E-03  0.272E-13    8  13  14   17  15  11   10   8   6    0.000    0.000       0
+  0    161 00:39:55.90  13.1000A  -1.8830   1.9398   3.4337  0.113  1.41  -0.988E+00    850.  0.212E+00  0.211E+00  0.252E-03  0.276E-13    8  13  14   17  15  11   11   8   6    0.000    0.000       0
+  0    162 00:40:09.00  13.1000A  -1.8941   1.9798   3.4235  0.113  1.41  -0.989E+00    850.  0.212E+00  0.211E+00  0.255E-03  0.278E-13    8  13  14   17  15  11   10   9   8    0.000    0.000       0
+  0    163 00:40:22.10  12.9000A  -1.9001   1.9872   3.4874  0.113  1.41  -0.992E+00    850.  0.212E+00  0.211E+00  0.256E-03  0.279E-13    9  13  14   17  16  11   10   9   8    0.000    0.000       0
+  0    164 00:40:35.00  13.0000A  -1.9031   2.1070   3.4497  0.113  1.41  -0.994E+00    850.  0.213E+00  0.211E+00  0.253E-03  0.275E-13    9  13  14   17  16  11   11   9   8    0.000    0.000       0
+  0    165 00:40:48.00  13.3000A  -1.9423   2.1554   3.3887  0.113  1.41  -0.994E+00    850.  0.213E+00  0.212E+00  0.256E-03  0.278E-13   18  13   9   17  16  11   11   9   8    0.000    0.000       0
+  0    166 00:41:01.30  13.5000A  -1.9704   2.1123   3.3329  0.113  1.41  -0.997E+00    850.  0.213E+00  0.212E+00  0.263E-03  0.285E-13   18  13   9   17  16  11   12   8   7    0.000    0.000       0
+  0    167 00:41:14.80  13.7000A  -1.9694   2.1270   3.2763  0.113  1.41  -0.100E+01    850.  0.213E+00  0.212E+00  0.268E-03  0.290E-13   18  14   9   17  17  11   11   8   8    0.000    0.000       0
+  0    168 00:41:28.50  13.6000A  -1.9760   2.1839   3.3015  0.113  1.41  -0.100E+01    850.  0.214E+00  0.212E+00  0.274E-03  0.295E-13   18  14   9   17  17  11   12   8   8    0.000    0.000       0
+  0    169 00:41:42.10  13.5000A   1.9771   2.1764   3.3436  0.113  1.41  -0.101E+01    850.  0.214E+00  0.212E+00  0.273E-03  0.294E-13   12   5  12   18  18   9   12   8   8    0.000    0.000       0
+  0    170 00:41:55.60  13.5000A   1.9792   2.2380   3.3212  0.113  1.38  -0.101E+01    800.  0.214E+00  0.213E+00  0.272E-03  0.293E-13   12   5  12   17  18  10   12   8   8    0.000    0.000       0
+  0    171 00:42:09.10  13.5000A  -1.9920   2.2282   3.3396  0.113  1.38  -0.101E+01    800.  0.215E+00  0.213E+00  0.272E-03  0.293E-13   18  14   8   17  18  10   13   8   8    0.000    0.000       0
+  0    172 00:42:22.60  13.6000A  -1.9824   2.1821   3.3107  0.113  1.38  -0.101E+01    800.  0.215E+00  0.214E+00  0.273E-03  0.294E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  0    173 00:42:36.20  13.9000A  -1.9733   2.2182   3.2283  0.113  1.38  -0.101E+01    800.  0.216E+00  0.214E+00  0.276E-03  0.297E-13   18  14   7   18  19   8   13   8   8    0.000    0.000       0
+  0    174 00:42:50.10  14.0000A  -1.9902   2.1923   3.2049  0.113  1.38  -0.101E+01    800.  0.217E+00  0.215E+00  0.282E-03  0.304E-13   18  15   7   17  19  10   14   8   8    0.000    0.000       0
+  0    175 00:43:04.10  14.3000A  -1.9628   2.2236   3.1431  0.113  1.38  -0.101E+01    800.  0.218E+00  0.216E+00  0.284E-03  0.306E-13   18  15   7   17  20   9   14   8   8    0.000    0.000       0
+  0    176 00:43:18.40  14.7000A  -1.9286   2.2221   3.0510  0.114  1.38  -0.100E+01    800.  0.219E+00  0.217E+00  0.290E-03  0.313E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  0    177 00:43:33.10  15.2000A  -1.9659   2.1643   2.9559  0.114  1.38  -0.100E+01    800.  0.220E+00  0.218E+00  0.298E-03  0.321E-13   17  14   4   17  20   9   14   8   8    0.000    0.000       0
+  0    178 00:43:48.30  15.4000A  -1.9127   2.1075   2.9237  0.114  1.38  -0.994E+00    800.  0.221E+00  0.219E+00  0.308E-03  0.332E-13   17  14   4   18  18  12   10   9  18    0.000    0.000       0
+  0    179 00:44:03.70  15.0000A  -1.8884   2.1390   3.0072  0.114  1.38  -0.999E+00    800.  0.222E+00  0.221E+00  0.312E-03  0.337E-13   17  15   4   18  19  11   10   9  18    0.000    0.000       0
+  0    180 00:44:18.70  14.6000A  -1.8147   2.1196   3.0730  0.115  1.38  -0.991E+00    800.  0.223E+00  0.222E+00  0.305E-03  0.328E-13   16  15   3   18  19  11   11   9  18    0.000    0.000       0
+  0    181 00:44:33.30  14.5000A  -1.7675   2.1466   3.1106  0.115  1.43  -0.990E+00    900.  0.225E+00  0.223E+00  0.298E-03  0.321E-13   16  15   3   18  17  13   13  11  16    0.000    0.000       0
+  0    182 00:44:47.80  14.1000A   1.7568   2.1526   3.1822  0.115  1.43  -0.993E+00    900.  0.226E+00  0.225E+00  0.297E-03  0.319E-13    9  27  23   18  17  13   13  11  16    0.000    0.000       0
+  0    183 00:45:01.90  13.8000A   1.7835   2.1657   3.2535  0.116  1.43  -0.990E+00    900.  0.228E+00  0.226E+00  0.290E-03  0.312E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  0    184 00:45:15.70  13.5000A   1.7943   2.1918   3.3330  0.116  1.43  -0.991E+00    900.  0.229E+00  0.228E+00  0.284E-03  0.306E-13    9  27  23   18  18  13   14  11  16    0.000    0.000       0
+  0    185 00:45:29.20  13.3000A   1.8092   2.2021   3.3948  0.116  1.43  -0.998E+00    900.  0.231E+00  0.230E+00  0.279E-03  0.300E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  0    186 00:45:42.50  13.1000A   1.8565   2.1995   3.4255  0.117  1.43  -0.992E+00    900.  0.233E+00  0.231E+00  0.276E-03  0.297E-13    9  27  24   18  18  13   14  11  16    0.000    0.000       0
+  0    187 00:45:55.60  13.0000A   1.8904   2.1843   3.4615  0.117  1.43  -0.988E+00    900.  0.234E+00  0.233E+00  0.273E-03  0.293E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    188 00:46:08.60  12.9000A   1.9081   2.1553   3.4894  0.117  1.43  -0.984E+00    900.  0.236E+00  0.235E+00  0.272E-03  0.292E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    189 00:46:21.50  12.9000A   1.9077   2.1095   3.4835  0.118  1.43  -0.983E+00    900.  0.238E+00  0.236E+00  0.271E-03  0.291E-13    9  27  24   18  18  13   15  11  16    0.000    0.000       0
+  0    190 00:46:34.40  13.0000A   1.8879   2.0648   3.4661  0.118  1.43  -0.983E+00    900.  0.240E+00  0.238E+00  0.272E-03  0.292E-13    9  27  24   18  19  12   16  11  16    0.000    0.000       0
+  0    191 00:46:47.40  13.0000A   1.8974   2.0485   3.4724  0.118  1.43  -0.984E+00    900.  0.241E+00  0.240E+00  0.275E-03  0.295E-13    9  26  25   18  19  12   16  11  16    0.000    0.000       0
+  0    192 00:47:00.40  13.0000A   1.8868   2.0432   3.4549  0.119  1.41  -0.983E+00    850.  0.243E+00  0.242E+00  0.276E-03  0.296E-13    9  26  25    8   4   0   16  11  16    0.000    0.000       0
+  0    193 00:47:13.40  13.2000A   1.8944   2.0245   3.4199  0.119  1.41  -0.979E+00    850.  0.245E+00  0.244E+00  0.277E-03  0.298E-13    9  27  25    8   4   0   16  11  16    0.000    0.000       0
+  0    194 00:47:26.60  13.3000A   1.8837   2.0250   3.3852  0.119  1.41  -0.973E+00    850.  0.247E+00  0.246E+00  0.283E-03  0.305E-13    9  27  25   19  18  13   14  10  17    0.000    0.000       0
+  0    195 00:47:39.90  13.2000A   1.8504   2.0329   3.4017  0.119  1.41  -0.971E+00    850.  0.249E+00  0.247E+00  0.286E-03  0.309E-13    9  27  25   19  18  14   14  10  17    0.000    0.000       0
+  0    196 00:47:53.10  13.2000A   1.8799  -2.0090   3.4180  0.119  1.41  -0.969E+00    850.  0.251E+00  0.249E+00  0.286E-03  0.309E-13    9  27  26   13  38  15   11   9  18    0.000    0.000       0
+  0    197 00:48:06.30  12.9000A  -1.9990  -1.9540   3.4756  0.119  1.41  -0.971E+00    850.  0.253E+00  0.251E+00  0.288E-03  0.312E-13    6   3   1   13  38  15   12   9  18    0.000    0.000       0
+  0    198 00:48:19.20  12.8000A  -2.0710   1.9246   3.5053  0.119  1.41  -0.969E+00    850.  0.255E+00  0.253E+00  0.283E-03  0.308E-13    6   3   1   19  19  13   12   9  18    0.000    0.000       0
+  0    199 00:48:32.00  12.8000A  -2.0835   1.8954   3.5198  0.119  1.41  -0.970E+00    850.  0.256E+00  0.255E+00  0.283E-03  0.309E-13    6   4   0   19  19  13   13   9  18    0.000    0.000       0
+  0    200 00:48:44.80  12.7000A   2.1461   1.8456   3.5374  0.119  1.41  -0.972E+00    850.  0.258E+00  0.257E+00  0.285E-03  0.312E-13    7   2  10   12   4  39   13   9  18    0.000    0.000       0
+  0    201 00:48:57.50  12.7000A   2.1906   1.8531   3.5319  0.119  1.41  -0.972E+00    850.  0.260E+00  0.258E+00  0.285E-03  0.313E-13    7   2  10   12   4  39   14   9  18    0.000    0.000       0
+  0    202 00:49:10.20  12.6000A  -2.2511   1.8608   3.5743  0.119  1.41  -0.975E+00    850.  0.262E+00  0.260E+00  0.286E-03  0.316E-13    7   3   0   12   4  39    9  39   1    0.000    0.000       0
+  0    203 00:49:22.80  12.9000A  -2.3231  -1.9143   3.4963  0.119  1.41  -0.971E+00    850.  0.264E+00  0.262E+00  0.286E-03  0.317E-13    7   3   0    3   8   2   15   9  18    0.000    0.000       0
+  0    204 00:49:35.70  12.9000A  -2.1960  -1.9597   3.4944  0.119  1.41  -0.972E+00    850.  0.266E+00  0.264E+00  0.295E-03  0.328E-13    8   2   0    3   8   2    9   0   0    0.000    0.000       0
+  0    205 00:49:48.60  12.7000A  -2.3746  -2.0424   3.5512  0.119  1.41  -0.977E+00    850.  0.267E+00  0.265E+00  0.296E-03  0.330E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  0    206 00:50:01.30  12.4000A  -2.4137  -2.1028   3.6401  0.118  1.41  -0.979E+00    850.  0.269E+00  0.267E+00  0.293E-03  0.327E-13    8   1   0    3   7   2    9   7  17    0.000    0.000       0
+  0    207 00:50:13.70  12.2000A  -2.3703  -2.1193   3.6823  0.118  1.41  -0.975E+00    850.  0.270E+00  0.268E+00  0.288E-03  0.322E-13    8   1   0    3   7   2   10   7  17    0.000    0.000       0
+  0    208 00:50:25.90  12.0000A  -2.4784  -2.0738   3.7509  0.118  1.43  -0.976E+00    900.  0.272E+00  0.270E+00  0.284E-03  0.319E-13    9   1  39    3   7   2   10   7  17    0.000    0.000       0
+  0    209 00:50:37.90  12.0000A  -2.5338  -2.0484   3.7647  0.118  1.43  -0.972E+00    900.  0.273E+00  0.271E+00  0.281E-03  0.316E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  0    210 00:50:49.90  12.1000A  -2.4948  -2.0487   3.7296  0.118  1.43  -0.970E+00    900.  0.274E+00  0.272E+00  0.281E-03  0.317E-13    9   1  39    3   6   2   10   7  17    0.000    0.000       0
+  0    211 00:51:02.00  12.1000A  -2.4148  -1.9851   3.7272  0.118  1.43  -0.970E+00    900.  0.275E+00  0.273E+00  0.285E-03  0.321E-13    9   1  39    3   6   2   14   6  18    0.000    0.000       0
+  0    212 00:51:14.09  11.8000A  -2.3625  -2.0341   3.8067  0.118  1.43  -0.972E+00    900.  0.277E+00  0.274E+00  0.285E-03  0.323E-13    9   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    213 00:51:25.90  11.7000A  -2.3582  -2.1289   3.8355  0.118  1.43  -0.979E+00    900.  0.278E+00  0.275E+00  0.279E-03  0.317E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    214 00:51:37.59  11.8000A  -2.3235  -2.1215   3.8110  0.117  1.43  -0.979E+00    900.  0.279E+00  0.276E+00  0.278E-03  0.315E-13   10   1  38   15  33  38   14   6  18    0.000    0.000       0
+  0    215 00:51:49.40  12.0000A  -2.2827  -2.0721   3.7403  0.117  1.43  -0.981E+00    900.  0.280E+00  0.277E+00  0.281E-03  0.319E-13   11   0  38   15  32  38   15   5  18    0.000    0.000       0
+  0    216 00:52:01.40  12.0000A  -2.2481  -2.0085   3.7349  0.117  1.43  -0.979E+00    900.  0.280E+00  0.278E+00  0.287E-03  0.326E-13   11   0  38   15  32  38   16   5  18    0.000    0.000       0
+  0    217 00:52:13.40  12.0000A  -2.2109  -2.0175   3.7380  0.117  1.43  -0.979E+00    900.  0.281E+00  0.279E+00  0.288E-03  0.327E-13   11   0  37   15  32  37   16   5  18    0.000    0.000       0
+  0    218 00:52:25.40  12.2000A  -2.1636  -2.0652   3.6978  0.117  1.43  -0.978E+00    900.  0.282E+00  0.279E+00  0.289E-03  0.328E-13   11   0  37   15  31  37   16   5  18    0.000    0.000       0
+  0    219 00:52:37.59  12.5000A  -2.0832  -2.1463   3.5992  0.117  1.43  -0.979E+00    900.  0.282E+00  0.280E+00  0.294E-03  0.334E-13   12   0  37   15  31  37   16   5  18    0.000    0.000       0
+  0    220 00:52:50.09  13.1000A  -2.0143  -2.1531   3.4456  0.116  1.43  -0.982E+00    900.  0.283E+00  0.280E+00  0.302E-03  0.343E-13   13  23   4   15  31  37   16   5  18    0.000    0.000       0
+  0    221 00:53:03.19  13.6000A  -2.0119  -2.0704   3.3090  0.116  1.43  -0.985E+00    900.  0.283E+00  0.280E+00  0.316E-03  0.359E-13   14  23   3   15  31  37   17   4  18    0.000    0.000       0
+  0    222 00:53:16.79  13.7000A  -1.9914   2.0490   3.2919  0.116  1.43  -0.991E+00    900.  0.283E+00  0.280E+00  0.328E-03  0.371E-13   14  23   3   17  17  10    8   4   4    0.000    0.000       0
+  0    223 00:53:30.49  13.6000A  -1.9520   2.0725   3.3115  0.116  1.43  -0.986E+00    900.  0.283E+00  0.280E+00  0.330E-03  0.373E-13   14  24   3   17  17  10    8  35   5    0.000    0.000       0
+  0    224 00:53:44.09  13.2000A  -1.9920   2.0440   3.4188  0.116  1.43  -0.987E+00    900.  0.283E+00  0.280E+00  0.327E-03  0.369E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  0    225 00:53:57.29  13.1000A  -2.0629   1.9622   3.4411  0.116  1.43  -0.988E+00    900.  0.282E+00  0.280E+00  0.318E-03  0.357E-13    9   6   4   17  17  10    9  35   5    0.000    0.000       0
+  0    226 00:54:10.39  13.0000A  -2.0803   1.8350   3.4509  0.115  1.43  -0.998E+00    900.  0.282E+00  0.279E+00  0.315E-03  0.353E-13    9   6   4   17  17  10   10  35   5    0.000    0.000       0
+  0    227 00:54:23.39  13.0000A  -2.1884   1.8751   3.4593  0.115  1.43  -0.995E+00    900.  0.282E+00  0.279E+00  0.313E-03  0.349E-13   10   6   4   13   8   4   10  35   5    0.000    0.000       0
+  0    228 00:54:36.39  13.2000A  -2.2566   1.8853   3.4000  0.115  1.43  -0.101E+01    900.  0.282E+00  0.279E+00  0.313E-03  0.348E-13   10   6   4   13   8   4    9  36   6    0.000    0.000       0
+  0    229 00:54:49.59  12.8000A  -2.2703   1.9733   3.5070  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.317E-03  0.352E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  0    230 00:55:02.39  12.6000A  -2.2365   2.0039   3.5731  0.115  1.40  -0.997E+00    850.  0.282E+00  0.279E+00  0.308E-03  0.341E-13   10   6   4   14   9   5   10  36   6    0.000    0.000       0
+  0    231 00:55:14.99  12.5000A  -2.2739   1.9824   3.6114  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.304E-03  0.335E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  0    232 00:55:27.49  12.3000A  -2.2848   1.9265   3.6466  0.115  1.40  -0.996E+00    850.  0.282E+00  0.279E+00  0.303E-03  0.332E-13   11   6   4   14   9   5   11  36   6    0.000    0.000       0
+  0    233 00:55:39.79  12.2000A  -2.2837   1.9446   3.6768  0.115  1.40  -0.995E+00    850.  0.282E+00  0.279E+00  0.299E-03  0.327E-13   11   6   3   17  10   6   11  36   6    0.000    0.000       0
+  0    234 00:55:51.99  12.2000A  -2.2567   1.9578   3.6908  0.115  1.40  -0.991E+00    850.  0.281E+00  0.279E+00  0.297E-03  0.325E-13   11   6   3   13   2  38   11  36   6    0.000    0.000       0
+  0    235 00:56:04.19  12.3000A  -2.1681   1.9814   3.6666  0.115  1.40  -0.988E+00    850.  0.281E+00  0.279E+00  0.298E-03  0.325E-13   11   6   3   13   3  37   11  36   6    0.000    0.000       0
+  0    236 00:56:16.49  12.5000A  -2.1850   2.0167   3.5998  0.115  1.40  -0.987E+00    850.  0.281E+00  0.278E+00  0.301E-03  0.327E-13   12   6   3   13   3  37   11  36   6    0.000    0.000       0
+  0    237 00:56:28.99  12.5000A  -2.1850   1.9574   3.5989  0.115  1.40  -0.988E+00    850.  0.281E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   3  37   12  36   7    0.000    0.000       0
+  0    238 00:56:41.49  12.7000A  -2.1469   1.9133   3.5420  0.115  1.40  -0.989E+00    850.  0.280E+00  0.278E+00  0.306E-03  0.333E-13   12   6   3   13   4  37   12  36   7    0.000    0.000       0
+  0    239 00:56:54.19  12.8000A  -2.0696   1.9896   3.5154  0.115  1.38  -0.991E+00    800.  0.280E+00  0.278E+00  0.312E-03  0.339E-13   12   6   3   14   4  37   13  36   7    0.000    0.000       0
+  0    240 00:57:06.99  13.1000A   2.0392   2.0193   3.4428  0.115  1.38  -0.989E+00    800.  0.280E+00  0.277E+00  0.315E-03  0.342E-13   13  37   9   14   4  37   13  36   7    0.000    0.000       0
+  0    241 00:57:20.09  13.0000A   2.1610   1.9691   3.4498  0.115  1.38  -0.988E+00    800.  0.280E+00  0.277E+00  0.323E-03  0.351E-13   13  37   9   14   4  37   14  35   6    0.000    0.000       0
+  0    242 00:57:33.09  13.0000A   2.2481   1.9420   3.4665  0.115  1.38  -0.989E+00    800.  0.279E+00  0.277E+00  0.321E-03  0.350E-13   13  37   9   14   5  37   14  35   6    0.000    0.000       0
+  0    243 00:57:46.09  13.1000A   2.2916   1.9762   3.4415  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.322E-03  0.351E-13   13  37   9   15   5  37   14  35   6    0.000    0.000       0
+  0    244 00:57:59.19  13.0000A   2.2745   2.0195   3.4488  0.115  1.40  -0.993E+00    850.  0.279E+00  0.277E+00  0.324E-03  0.354E-13   13  37   9   15   5  37   15  35   6    0.000    0.000       0
+  0    245 00:58:12.19  13.1000A   2.2969   2.0000   3.4302  0.114  1.46  -0.996E+00    950.  0.279E+00  0.276E+00  0.322E-03  0.352E-13   14  37  10   15   5  37   15  35   6    0.000    0.000       0
+  0    246 00:58:25.29  13.4000A   2.3720   1.9648   3.3704  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.325E-03  0.356E-13   14  37  10   15   6  37   15  35   6    0.000    0.000       0
+  0    247 00:58:38.69  13.4000A   2.3841   1.9398   3.3663  0.114  1.38  -0.997E+00    800.  0.279E+00  0.276E+00  0.332E-03  0.364E-13   14  37  10   16   6  37   11  20  16    0.000    0.000       0
+  0    248 00:58:52.09  13.5000A   2.3124   2.0264   3.3326  0.114  1.38  -0.100E+01    800.  0.279E+00  0.276E+00  0.332E-03  0.365E-13   14  37  10   16   5  36   12  37   6    0.000    0.000       0
+  0    249 00:59:05.59  13.5000A   2.1844   2.0317   3.3251  0.114  1.38  -0.101E+01    800.  0.279E+00  0.276E+00  0.335E-03  0.368E-13   14  37  11   16   6  36   12  37   6    0.000    0.000       0
+  0    250 00:59:19.09  13.5000A   2.1414   2.0776   3.3244  0.114  1.38  -0.101E+01    800.  0.278E+00  0.276E+00  0.335E-03  0.368E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  0    251 00:59:32.59  13.3000A   2.0346   2.0384   3.3709  0.113  1.43  -0.101E+01    900.  0.278E+00  0.276E+00  0.334E-03  0.367E-13   16  36  11   16   6  36   10  37   5    0.000    0.000       0
+  0    252 00:59:45.89  13.4000A   2.0144   2.0187   3.3583  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.329E-03  0.360E-13   15  37  12   16   7  36   10  37   5    0.000    0.000       0
+  0    253 00:59:59.29  13.4000A   1.9525   2.0782   3.3571  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.361E-13   16  36  12   17   6  36   11  37   5    0.000    0.000       0
+  0    254 01:00:12.69  13.1000A   1.8769   2.1646   3.4373  0.113  1.43  -0.102E+01    900.  0.278E+00  0.276E+00  0.331E-03  0.359E-13   16  36  12   17   7  36    8   9  15    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/USER_CODE/user_last_actions.f90
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/USER_CODE/user_last_actions.f90	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/USER_CODE/user_last_actions.f90	(revision 3477)
@@ -0,0 +1,76 @@
+!> @file user_last_actions.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id: user_last_actions.f90 2894 2018-03-15 09:17:58Z Giersch $
+! Writing of user-defined restart data will be done in an own module called
+! user_write_restart_data_mod 
+! 
+! 2718 2018-01-02 08:49:38Z suehring
+! Corrected "Former revisions" section
+! 
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 2298 2017-06-29 09:28:18Z raasch
+! type of write_binary changed from CHARACTER to LOGICAL
+! 
+! 2101 2017-01-05 16:42:31Z suehring
+!
+! 2000 2016-08-20 18:09:15Z knoop
+! Forced header and separation lines into 80 columns
+! 
+! 1682 2015-10-07 23:56:08Z knoop
+! Code annotations made doxygen readable 
+!
+! 1320 2014-03-20 08:40:49Z raasch
+! revision history before 2012 removed
+!
+! 1036 2012-10-22 13:43:42Z raasch
+! code put under GPL (PALM 3.9)
+!
+! 211 2008-11-11 04:46:24Z raasch
+! Former file user_interface.f90 split into one file per subroutine
+!
+! Description:
+! ------------
+!> Execution of user-defined actions at the end of a job.
+!------------------------------------------------------------------------------!
+ SUBROUTINE user_last_actions
+ 
+
+    USE control_parameters
+        
+    USE kinds
+    
+    USE user
+
+    IMPLICIT NONE
+
+!
+!-- Here the user-defined actions at the end of a job might follow.
+
+
+ END SUBROUTINE user_last_actions
+
Index: /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/example_cbl_user_code/case_config.yml	(revision 3477)
@@ -0,0 +1,23 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+  - cray_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+
+activation_strings:
+  - "d3#"
+  - "restart"
+
+significant_digits_for_netcdf_checks:
+  timeseries: 3
+  profiles: 5
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/test_oceanml/INPUT/test_oceanml_p3d
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/test_oceanml/INPUT/test_oceanml_p3d	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/test_oceanml/INPUT/test_oceanml_p3d	(revision 3477)
@@ -0,0 +1,95 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 63, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 63, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 64, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 1.25, ! Size of single gridbox in x-direction
+    dy                         = 1.25, ! Size of single gridbox in y-direction
+    dz                         = 1.25, ! Size of single gridbox in z-direction
+!
+!-- initialization
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles', ! initial conditions
+
+    latitude                   = 55.6,
+
+    ug_surface                 = 0.0, ! u-comp of geostrophic wind at surface
+    vg_surface                 = 0.0, ! v-comp of geostrophic wind at surface
+
+    pt_surface                 = 300.0, ! initial surface potential temp
+!
+!-- boundary conditions
+!-------------------------------------------------------------------------------
+    bc_uv_b                    = 'neumann',
+    bc_uv_t                    = 'neumann',
+    bc_pt_b                    = 'neumann',
+    bc_pt_t                    = 'neumann',
+    bc_p_b                     = 'neumann',
+    bc_p_t                     = 'neumann',
+    bc_s_b                     = 'initial_gradient',
+    bc_s_t                     = 'neumann',
+
+    use_top_fluxes             = .T.,
+    use_surface_fluxes         = .F.,
+    constant_flux_layer        = .F.,
+
+    top_momentumflux_u         = -0.0001,
+    top_momentumflux_v         = 0.0,
+
+    top_heatflux               = 0.0,
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+    momentum_advec             = 'pw-scheme', ! use Piacsek and Williams scheme
+    scalar_advec               = 'pw-scheme', ! use Piacsek and Williams scheme
+
+/ ! end of initialization parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 300.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE.,  ! randomly perturbate horiz. velocity
+    dt_disturb                 = 60.0,    ! interval for random perturbations
+    disturbance_energy_limit   = 1.0e-4,  ! upper limit for perturbation energy
+    disturbance_amplitude      = 0.25e-1, ! maximum perturbation amplitude
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    dt_run_control             = 0.0,    ! output interval for run control
+
+    data_output_pr             = 'e',
+                                 'e*',
+                                 '#theta',
+
+/ ! end of runtime parameter namelist
+
+!-------------------------------------------------------------------------------
+!-- OCEAN PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/oceanpar
+!-------------------------------------------------------------------------------
+&ocean_parameters
+!
+!-- top boundary condition for salinity
+    bc_sa_t                    = 'neumann',
+
+!   zero salinityflux at ocean surface
+    top_salinityflux           = 0.0,
+
+/ ! end of ocean parameters
+  ! WARNING: do not remove this blank line from the end of this file
Index: /palm/tags/release-6.0/TESTS/cases/test_oceanml/MONITORING/test_oceanml_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/test_oceanml/MONITORING/test_oceanml_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/test_oceanml/MONITORING/test_oceanml_rc	(revision 3477)
@@ -0,0 +1,212 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3291M       *    ocean - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 01-10-18    Run:       test_oceanml
+ Time:                 04:15:16    Run-No.:   00
+ Run on host:              imuk
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Scalar advection via Piascek-Williams-Scheme (Form C3) or Upstream
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:              300.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =       1.250 m    dy =       1.250 m
+                dz(1) =       1.250 m
+
+ Domain size:       x =     80.000 m     y =     80.000 m  z(u) =    -80.000 m
+
+
+
+ Number of gridpoints (x,y,z):  (0:  63, 0:  63, 0:  65)
+ Subdomain size (x,y,z):        (    32,     32,     66)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0      65
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0      65
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = uv(1)                 | pt(0)     = pt(1)
+ T. bound.: p(nzt+1) = p(nzt) | uv(nzt+1) = uv(nzt)               | pt(nzt+1) = pt(nzt)
+
+                     e
+
+ B. bound.: e(0)     = e(1)
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)
+
+                     sa
+
+ B. bound.: sa(0)    = sa(1)
+ T. bound.: sa(nzt+1) = sa(nzt)
+
+ Top surface fluxes are used in diffusion terms at k=nzt
+       Predefined constant momentumflux:  u: -0.000100 m**2/s**2
+                                          v:  0.000000 m**2/s**2
+       Predefined constant heatflux:    0.000000 K m/s
+       Predefined constant salinityflux:    0.000000 psu m/s
+
+
+ Lateral boundaries:
+       left/right:  cyclic
+       north/south: cyclic
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0  m
+       Temperature:   300.00  300.00  K
+       Gradient:      ------    0.00  K/100m
+       Gridpoint:          0      65
+
+    Characteristic levels of the initial salinity profile:
+
+       Height:        0.0     0.0  m
+       Salinity:    35.00   35.00  psu
+       Gradient:   ------    0.00  psu/100m
+       Gridpoint:       0      65
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+
+
+ Data output:
+ -----------
+
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset
+
+
+       Profile: e, e*, theta,
+       Output every             ******** s
+       Time averaged over           0.00 s
+       Averaging input every        0.00 s
+
+    Time series:
+       Output format: netCDF 64bit offset
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.6 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000120 1/s
+                            f*     =  0.000082 1/s
+
+    Day of the year at model start :   day_init      =     172
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :    60.00 s
+    Disturbance amplitude           :     0.03 m/s
+    Lower disturbance level         :   -28.12 m (GP   42)
+    Upper disturbance level         :    -4.38 m (GP   61)
+    Disturbances cease as soon as the disturbance energy exceeds 0.000 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00  20.0000A   0.0228D  0.0228D  0.0124  0.000  0.00   0.000E+00      0.  0.122E-04  0.122E-04  0.270E-02  0.387E-12   53   1   6   58  26  28   47   9   8    0.000    0.000       0
+  0      1 00:00:20.00  20.0000A   0.0233  -0.0219  -0.0126  0.000  0.00   0.000E+00      0.  0.123E-04  0.122E-04  0.442E-04  0.609E-14   53   1   6   60  21  57   47  45  36    0.000    0.000       0
+  0      2 00:00:40.00  20.0000A   0.0234  -0.0224  -0.0131  0.000  0.00   0.000E+00      0.  0.123E-04  0.122E-04  0.441E-04  0.607E-14   53   1   6   57  54  38   47  45  36    0.000    0.000       0
+  0      3 00:01:00.00  20.0000A  -0.0340D  0.0331D -0.0184  0.000  0.00   0.000E+00      0.  0.248E-04  0.244E-04  0.271E-02  0.388E-12   60  53  41   58  27  28   50  31  19    0.000    0.000       0
+  0      4 00:01:20.00  20.0000A  -0.0329   0.0325  -0.0188  0.000  0.00   0.000E+00      0.  0.249E-04  0.242E-04  0.885E-04  0.122E-13   60  53  41   58  27  28   50  31  19    0.000    0.000       0
+  0      5 00:01:40.00  20.0000A   0.0315  -0.0323  -0.0188  0.000  0.00   0.000E+00      0.  0.250E-04  0.240E-04  0.879E-04  0.121E-13   49  55  35   57   1  26   50  31  19    0.000    0.000       0
+  0      6 00:02:00.00  20.0000A   0.0435D -0.0470D -0.0219  0.000  0.00   0.000E+00      0.  0.375E-04  0.360E-04  0.272E-02  0.390E-12   56  24  27   57   0  26   54  50  12    0.000    0.000       0
+  0      7 00:02:20.00  20.0000A   0.0445  -0.0456  -0.0217  0.000  0.00   0.000E+00      0.  0.374E-04  0.354E-04  0.129E-03  0.177E-13   56  24  28   57   0  26   47  26  27    0.000    0.000       0
+  0      8 00:02:40.00  20.0000A   0.0473   0.0449  -0.0218  0.000  0.00   0.000E+00      0.  0.372E-04  0.346E-04  0.127E-03  0.174E-13   56  24  28   53  53  45   47  26  27    0.000    0.000       0
+  0      9 00:03:00.00  20.0000A   0.0528D -0.0504D -0.0250  0.000  0.00   0.000E+00      0.  0.495E-04  0.463E-04  0.271E-02  0.388E-12   56  24  28   43  11  40   56  43  19    0.000    0.000       0
+  0     10 00:03:20.00  20.0000A   0.0542   0.0496  -0.0253  0.000  0.00   0.000E+00      0.  0.489E-04  0.449E-04  0.165E-03  0.223E-13   60  48   2   57   8  30   56  43  19    0.000    0.000       0
+  0     11 00:03:40.00  20.0000A   0.0528  -0.0523  -0.0253  0.000  0.00   0.000E+00      0.  0.481E-04  0.433E-04  0.160E-03  0.215E-13   60  48   3   43  10  40   55  51  57    0.000    0.000       0
+  0     12 00:04:00.00  19.6000A   0.0504D -0.0575D -0.0298  0.000  0.00   0.000E+00      0.  0.595E-04  0.539E-04  0.273E-02  0.393E-12   43  42  39   57  27  20   58  20  59    0.000    0.000       0
+  0     13 00:04:19.60  19.9000A   0.0544  -0.0566  -0.0284  0.000  0.00   0.000E+00      0.  0.581E-04  0.515E-04  0.186E-03  0.249E-13   43  42  39   57  26  20   58  20  59    0.000    0.000       0
+  0     14 00:04:39.50  19.7000A   0.0520  -0.0572  -0.0274  0.000  0.00   0.000E+00      0.  0.565E-04  0.489E-04  0.181E-03  0.241E-13   43  42  39   57  26  20   57  20  59    0.000    0.000       0
+  0     15 00:04:59.19  20.0000A  -0.0511  -0.0511  -0.0284  0.000  0.00   0.000E+00      0.  0.549E-04  0.462E-04  0.171E-03  0.226E-13   53  33   8   59  60  21   54  50  57    0.000    0.000       0
+  0     16 00:05:19.19  19.9000A   0.0559D -0.0566D -0.0341  0.000  0.00   0.000E+00      0.  0.655E-04  0.556E-04  0.272E-02  0.391E-12   58  23  33   48   9   0   54  50  57    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/test_oceanml/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/test_oceanml/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/test_oceanml/case_config.yml	(revision 3477)
@@ -0,0 +1,23 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+  - 32
+
+activation_strings:
+  - "d3#"
+  - "restart"
+
+significant_digits_for_netcdf_checks:
+  timeseries: 5
+  profiles: 6
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/urban_environment/INPUT/urban_environment_p3d
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/urban_environment/INPUT/urban_environment_p3d	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/urban_environment/INPUT/urban_environment_p3d	(revision 3477)
@@ -0,0 +1,226 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+ &initialization_parameters
+
+!
+!-- Grid
+!------------------------------------------------------------------------------
+    nx                   = 19,
+    ny                   = 19,
+    nz                   = 60,
+
+    dx                   = 2.0,
+    dy                   = 2.0,
+    dz                   = 2.0,
+
+!
+!-- Numerics
+!------------------------------------------------------------------------------
+    fft_method           = 'fftw',
+
+!
+!-- Mode
+!------------------------------------------------------------------------------     
+    humidity             = .T.,
+    q_surface            = 0.001,
+
+!
+!-- Initialization
+!------------------------------------------------------------------------------
+    initializing_actions = 'inifor',   !'set_constant_profiles', or 'inifor',
+
+    pt_surface           = 277.15,
+    ug_surface           = 1.0,
+    vg_surface           = 0.0,
+
+    day_of_year_init     = 65,             ! march 06, to avoid extreme temperatures
+    time_utc_init        = 36000.0,        ! (0.0 s = 00 UTC midnight),
+
+!
+!-- Wall/soil spinup
+!------------------------------------------------------------------------------    
+    spinup_time         = 1200.0,
+    spinup_pt_mean      = 284.15,
+    spinup_pt_amplitude = 10.0,             ! give a dirunal cycle from 6 - 16 Â°C
+    dt_spinup           = 120.0,
+    data_output_during_spinup = .F.,
+
+!
+!-- Topography
+!------------------------------------------------------------------------------    
+    topography           = 'read_from_file',
+
+!
+!-- Physics
+!------------------------------------------------------------------------------
+    longitude            = 13.4,
+    latitude             = 52.5,
+
+ / ! end of inipar namelist
+
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+ &runtime_parameters
+
+!
+!-- Run steering
+!------------------------------------------------------------------------------
+    end_time              = 70.0,
+    create_disturbances   = .T.,
+
+!
+!-- Run-control/timeseries output settings
+!------------------------------------------------------------------------------
+    dt_run_control        =  0.0,
+    dt_dots               =  10.0,
+
+!
+!-- Profile output settings
+!------------------------------------------------------------------------------
+    skip_time_dopr        =  0.0,
+    dt_dopr               = 60.0,
+    averaging_interval_pr = 60.0,
+    dt_averaging_input_pr =  0.0,
+
+    data_output_pr        = '#u',  'u*2',  'wu',  'w*u*',  'w"u"',
+                            '#v',  'v*2',  'wv',  'w*v*',  'w"v"',
+                            'w',   'w*2',
+                            '#theta', 'theta*2', 'wtheta', 'w*theta*', 'w"theta"',
+                            '#q',  'q*2',
+                            'e', 'e*', '#km', '#l',
+                            '#t_soil', '#m_soil', 'rad_lw_in', 'rad_lw_out',
+!
+!-- 2D/3D output settings
+!------------------------------------------------------------------------------
+    do3d_at_begin      = .T., 
+    do2d_at_begin      = .T.,
+
+    dt_data_output     = 60.0, 
+    dt_data_output_av  = 60.0,
+    averaging_interval = 60.0,
+    dt_averaging_input =  0.0,
+
+    section_xy         = 0,
+
+    data_output = 'u',  'u_av',
+                  'v',  'v_av',
+                  'w',  'w_av',
+                  'theta', 'theta_av',
+                  'q',  'q_av',
+                  'e',  'e_av',
+                  'p',  'p_av',
+                  'm_soil', 'm_soil_av',
+                  't_soil', 't_soil_av',
+                  'shf*_xy', 'shf*_xy_av',
+                  'ghf*_xy', 'ghf*_xy_av',
+                  'us*_xy', 'z0*_xy',
+                  't*_xy', 'ol*_xy',
+                  'm_liq*_xy',
+                  'r_s*_xy', 'r_a*_xy',
+                  'rad_net*_xy', 'rad_lw_in*_xy', 'rad_lw_out*_xy', 'rad_sw_in*_xy', 'rad_sw_out*_xy',
+                  'qsws*_xy', 'qsws*_xy_av',
+                  'tsurf*_xy', 'tsurf*_xy_av',
+                  'pcm_lad', 'pcm_heatrate',
+                  'kc_PM10', 'kc_PM25', 'kc_PM10_av', 'kc_PM25_av',
+
+
+
+ / ! end of d3par namelist
+
+
+!-------------------------------------------------------------------------------
+!-- RADIATION MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/radpar
+!-------------------------------------------------------------------------------
+  &radiation_parameters
+
+     radiation_scheme =  'rrtmg',    !'clear-sky' or 'rrtmg',
+     albedo_type = 5,
+     constant_albedo = .F.,
+
+     dt_radiation = 60.0,
+
+     surface_reflections = .T.,
+     nrefsteps = 3,
+
+     rad_angular_discretization = .F.,
+     raytrace_mpi_rma = .F.,
+
+  /
+
+
+!-------------------------------------------------------------------------------
+!-- LAND SURFACE MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/lsmpar
+!------------------------------------------------------------------------------- 
+ &land_surface_parameters 
+
+    constant_roughness     = .T.,
+    aero_resist_kray       = .T.,
+
+    vegetation_type        = 2,
+    soil_type              = 3,
+    conserve_water_content = .T.,
+
+    root_fraction          = 0.49, 0.26, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0,
+    soil_temperature       = 277.15, 277.0, 277.0, 277.0, 277.0, 277.0, 277.0, 277.0, 
+    soil_moisture          = 0.30,   0.30,  0.30,  0.30,  0.30, 0.30,  0.30,  0.30,
+    deep_soil_temperature  = 277.0,
+    
+ / ! end of lsm_par namelist
+
+
+!-------------------------------------------------------------------------------
+!-- URBAN SURFACE MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/usmpar
+!-------------------------------------------------------------------------------
+ &urban_surface_parameters
+
+    usm_material_model     = .T.,
+    usm_wall_mod = .T.,
+
+ / ! end of urban_surface_par namelist
+ 
+
+!-------------------------------------------------------------------------------
+!-- PLANT CANOPY MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/canpar
+!-------------------------------------------------------------------------------
+ &plant_canopy_parameters
+ 
+    canopy_mode       = 'read_from_file_3d',
+    canopy_drag_coeff = 0.3,
+      
+ / ! end of canopy_par namelist
+ 
+
+!-------------------------------------------------------------------------------
+!-- CHEMISTRY MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/chempar
+!-------------------------------------------------------------------------------
+ &chemistry_parameters
+
+    chem_gasphase_on           = .F.,
+    
+    do_emis                    = .T.,
+    mode_emis                  = 'PARAMETERIZED',
+    surface_csflux_name        = 'PM10','PM25',  !"cs" stands for chemical species
+    surface_csflux             = 0.75, 0.375,    !surface emission of PM10, PM25 (arbitrary units)
+    cs_name                    = 'PM10','PM25',
+    cs_surface                 = 2.0, 1.0,       !surface concentration of PM10, PM25 (arbitrary units)
+    bc_cs_b                    = 'neumann',
+    bc_cs_t                    = 'neumann',
+    
+!-- for emission depending on street type in static driver
+    emiss_factor_main = 1.667, 1.667,   !emiss_factor_main*surface_csflux for emission on main streets
+    emiss_factor_side = 0.334, 0.334,   !emiss_factor_side*surface_csflux for emission on side streets
+    main_street_id = 12,          !id is for identifying main/side streets (see chem_emissions in chemistry_model_mod.f90)
+    side_street_id =  8,
+    max_street_id = 19,
+
+ / ! end of chemistry_par namelist
Index: /palm/tags/release-6.0/TESTS/cases/urban_environment/MONITORING/urban_environment_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/urban_environment/MONITORING/urban_environment_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/urban_environment/MONITORING/urban_environment_rc	(revision 3477)
@@ -0,0 +1,439 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3448M       *    atmosphere - run initialized with COSMO data
+ ******************************    --------------------------------------------
+
+ Date:                 29-10-18    Run:       urban_environment                 
+ Time:                 20:15:36    Run-No.:   00
+ Run on host:        lcmuk_para
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using fftw routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> Additional prognostic equation for the specific humidity
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             1270.000 s
+ Coupling start time:  1200.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =       2.000 m    dy =       2.000 m
+                dz(1) =       2.000 m
+
+ Domain size:       x =     40.000 m     y =     40.000 m  z(u) =    121.000 m
+
+
+
+ Number of gridpoints (x,y,z):  (0:  19, 0:  19, 0:  61)
+ Subdomain size (x,y,z):        (    10,     10,     62)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            1.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: read_from_file                          
+ Topography grid definition convention:
+ cell center (scalar grid points)
+
+
+
+ Land surface model information:
+ ------------------------------
+
+    --> Soil bottom is closed (water content is conserved, default)
+    --> Land surface type  : read from file
+    --> Soil porosity type : read from file
+
+    Initial soil temperature and moisture profile:
+
+       Height:              -0.01      -0.02      -0.05      -0.10      -0.20      -0.40      -0.80      -2.  m
+       Temperature:        277.15     277.00     277.00     277.00     277.00     277.00     277.00     277.  K
+       Moisture:             0.30       0.30       0.30       0.30       0.30       0.30       0.30       0.  m**3/m**3
+       Root fraction:        0.49       0.26       0.25       0.00       0.00       0.00       0.00       0.  
+       Grid point:              0          1          2          3          4          5          6
+
+
+ Vegetation canopy (drag) model:
+ ------------------------------
+
+ Canopy mode: read_from_file_3d             
+ Canopy height:  10.00m (   5 grid points)
+ Leaf drag coefficient:   0.30
+
+ Predefined constant heatflux at the top of the vegetation:   0.00 K m/s
+
+ Characteristic levels of the leaf area density:
+
+ Height:                 0.0     0.0  m
+ Leaf area density:    0.0000    0.00  m**2/m**3
+ Gradient:            ------    0.00  m**2/m**4
+ Gridpoint:                0       0
+
+
+ Radiation model information:
+ ----------------------------
+
+    --> RRTMG scheme is used
+
+    Albedo is set individually for each xy-location, according to given surface type.
+    Timestep: dt_radiation =  60.00  s
+
+
+ Chemistry model information:
+ ----------------------------
+
+    --> Chemical reactions are turned off
+    --> Time-step for chemical species:   0.00 s
+    --> Emission mode = PARAMETERIZED 
+    --> Photolysis scheme used =  simple 
+
+    Chemical species for surface emission flux: PM10, PM25,                         
+
+    Chemical species for initial surface and profile emissions: PM10, PM25,         
+    --> Chemical species, variable:            2
+    --> Chemical species, fixed   :            0
+    --> Total number of reactions :            2
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)     = from soil model  
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+                     q
+
+ B. bound.: q(0)     = from soil model                                                           
+ T. bound.: q(nzt+1) = q(nzt) + dq/dz                                                            
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+
+
+    Constant flux layer between bottom surface and first computational u,v-level:
+
+       z_mo =   1.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:     -20.00 <= rif <= 20.00
+       Predefined surface temperature
+       Predefined surface humidity
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0  m
+       Temperature:   277.15  277.12  K
+       Gradient:      ------    0.00  K/100m
+       Gridpoint:          0       0
+
+    Characteristic levels of the initial humidity profile:
+
+       Height:           0.0       0.0  m
+       Humidity:     0.1E-02   0.7E-02  kg/kg
+       Gradient:    --------   0.0E+00  (kg/kg)/100m
+       Gridpoint:          0         0
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+       Time averaged over          60.00 s
+       Averaging input every        0.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over          60.00 s
+       Averaging input every        0.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: u, u*2, wu, w*u*, w"u", v, v*2, wv, w*v*, w"v", w, w*2,      
+
+              : theta, theta*2, wtheta, w*theta*, w"theta", q, q*2,          
+
+              : e, e*, km, l, t_soil, m_soil, rad_lw_in, rad_lw_out,         
+
+              :                                                              
+       Output every                60.00 s
+       Time averaged over          60.00 s
+       Averaging input every        0.00 s
+
+    2D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       XY-cross-section  Arrays:  shf*, ghf*, us*, z0*, t*, ol*, m_liq*, r_s*, r_a*, rad_net*, rad_lw_i
+       Output every                60.00 s  and at the start
+       Cross sections at k = /0/
+       scalar-coordinates:   /0.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    2D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset                     
+
+
+       XY-cross-section  Arrays:  shf*, ghf*, qsws*, tsurf*,                                           
+       Output every                60.00 s  and at the start
+       Time averaged over          60.00 s
+       Averaging input every        0.00 s
+       Cross sections at k = /0/
+       scalar-coordinates:   /0.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    3D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       Arrays:  u, v, w, theta, q, e, p, m_soil, t_soil, pcm_lad, pcm_heatrate, kc_PM
+       Output every                60.00 s  and at the start
+       Upper output limit at      121.00 m  (GP   61)
+
+
+       Number of output time levels allowed: unlimited
+
+
+    3D-Arrays(time-averaged):
+       Output format: netCDF 64bit offset                     
+
+
+       Arrays:  u, v, w, theta, q, e, p, m_soil, t_soil, kc_PM10, kc_PM25,           
+       Output every                60.00 s  and at the start
+       Time averaged over          60.00 s
+       Averaging input every        0.00 s
+       Upper output limit at      121.00 m  (GP   61)
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                10.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 52.5 degr
+    Geograph. longitude :   longitude = 13.3 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000116 1/s
+                            f*     =  0.000089 1/s
+
+    Day of the year at model start :   day_init      =      65
+    UTC time at model start        :   time_utc_init = 36000.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+    Humidity is considered, bu no condensation
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   ****** s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :     5.00 m (GP    3)
+    Upper disturbance level         :    39.00 m (GP   20)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Spinup control output:
+--------------------------------
+
+ITER.  HH:MM:SS    DT   PT(z_MO)
+--------------------------------
+    1  00:02:00  120.00   288.14
+    2  00:04:00  120.00   288.17
+    3  00:06:00  120.00   288.21
+    4  00:08:00  120.00   288.24
+    5  00:10:00  120.00   288.27
+    6  00:12:00  120.00   288.30
+    7  00:14:00  120.00   288.33
+    8  00:16:00  120.00   288.35
+    9  00:18:00  120.00   288.38
+   10  00:20:00  120.00   288.41
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   0.7580A  -2.3731D -1.1942D  0.4177  0.071  0.00  -0.361E+00     16.  0.137E+01  0.743E-02  0.234E-01  0.446E-02   60  17  18   19   0  14   20  18   0    0.000    0.000       0
+  0      1 00:00:00.75   0.7580A  -2.3732  -1.5382   0.7410  0.086  0.33  -0.108E+01      2.  0.137E+01  0.116E-01  0.269E-02  0.892E-03   60  18  15   16  15   0   20  18   0    0.000    0.000       0
+  0      2 00:00:01.51   0.7580A  -2.3733  -1.6029   0.8137  0.085  0.00  -0.108E+01      2.  0.137E+01  0.125E-01  0.953E-03  0.351E-03   60  17  14   16  15   0   20  17   0    0.000    0.000       0
+  0      3 00:00:02.27   0.7580A  -2.3733  -1.5857   0.8394  0.085  0.00  -0.110E+01      4.  0.137E+01  0.129E-01  0.819E-03  0.240E-03   60  17  13   17  15   0   20  17   0    0.000    0.000       0
+  0      4 00:00:03.03   0.7580A  -2.3734  -1.5379   0.8469  0.084  0.14  -0.111E+01     12.  0.137E+01  0.132E-01  0.781E-03  0.213E-03   60  17  13   17  15   0   20  17   0    0.000    0.000       0
+  0      5 00:00:03.79   0.7580A  -2.3735  -1.5016   0.8454  0.083  0.22  -0.112E+01     18.  0.137E+01  0.134E-01  0.773E-03  0.205E-03   60  17  12   17  14   0   20  17   0    0.000    0.000       0
+  0      6 00:00:04.54   0.7580A  -2.3736  -1.4555   0.8403  0.082  0.24  -0.112E+01     18.  0.137E+01  0.137E-01  0.769E-03  0.202E-03   60  17  11   17  14   0   20  17   0    0.000    0.000       0
+  0      7 00:00:05.30   0.7580A  -2.3736  -1.4258   0.8339  0.082  0.25  -0.112E+01     18.  0.137E+01  0.140E-01  0.767E-03  0.200E-03   60  16  10   11  14   0   20  17   0    0.000    0.000       0
+  0      8 00:00:06.06   0.7580A  -2.3737  -1.3954   0.8272  0.081  0.26  -0.112E+01     18.  0.137E+01  0.143E-01  0.768E-03  0.199E-03   60  16  10   11  14   0   20  17   0    0.000    0.000       0
+  0      9 00:00:06.82   0.7580A  -2.3738  -1.3671   0.8203  0.081  0.26  -0.112E+01     18.  0.137E+01  0.147E-01  0.769E-03  0.198E-03   60  16   9   11  14   0   20  17   0    0.000    0.000       0
+  0     10 00:00:07.58   0.7580A  -2.3739  -1.3438   0.8139  0.080  0.27  -0.111E+01     18.  0.137E+01  0.150E-01  0.771E-03  0.198E-03   60  15   8   11  14   0   20  17   0    0.000    0.000       0
+  0     11 00:00:08.33   0.7580A  -2.3740  -1.3267   0.8083  0.080  0.28  -0.111E+01     18.  0.137E+01  0.154E-01  0.775E-03  0.198E-03   60  15   7   16  14   0   20  17   0    0.000    0.000       0
+  0     12 00:00:09.09   0.7580A  -2.3740  -1.3246   0.8042  0.079  0.28  -0.111E+01     18.  0.136E+01  0.158E-01  0.780E-03  0.198E-03   60  15   6   16  14   0   20  17   0    0.000    0.000       0
+  0     13 00:00:09.85   0.7580A  -2.3741  -1.3195   0.8018  0.079  0.29  -0.111E+01     18.  0.136E+01  0.162E-01  0.786E-03  0.197E-03   60  14   6   16  14   0   20  17   0    0.000    0.000       0
+  0     14 00:00:10.61   0.7580A  -2.3742  -1.3110   0.8363  0.078  0.29  -0.110E+01     18.  0.136E+01  0.166E-01  0.791E-03  0.197E-03   60  14   5   16  14   0   11  14  18    0.000    0.000       0
+  0     15 00:00:11.37   0.7580A  -2.3743  -1.2989   0.8855  0.078  0.37  -0.110E+01     28.  0.136E+01  0.170E-01  0.796E-03  0.197E-03   60  13   4   16  14   0   11  14  18    0.000    0.000       0
+  0     16 00:00:12.12   0.7580A  -2.3743  -1.2833   0.9238  0.078  0.38  -0.110E+01     28.  0.136E+01  0.175E-01  0.799E-03  0.196E-03   60  13   3   16  14   0   11  14  18    0.000    0.000       0
+  0     17 00:00:12.88   0.7580A  -2.3744  -1.2642   0.9550  0.077  0.45  -0.110E+01     40.  0.136E+01  0.180E-01  0.802E-03  0.195E-03   60  12   2   16  14   0   11  14  18    0.000    0.000       0
+  0     18 00:00:13.64   0.7580A  -2.3745  -1.2461   0.9857  0.077  0.46  -0.109E+01     40.  0.136E+01  0.185E-01  0.807E-03  0.194E-03   60  12   1   11  14   0   10  14  18    0.000    0.000       0
+  0     19 00:00:14.40   0.7580A  -2.3746  -1.2422   1.0288  0.077  0.47  -0.109E+01     40.  0.136E+01  0.190E-01  0.812E-03  0.193E-03   60  12   1   11  14   0   10  14  18    0.000    0.000       0
+  0     20 00:00:15.16   0.7580A  -2.3746  -1.2391   1.0686  0.077  0.48  -0.109E+01     40.  0.136E+01  0.195E-01  0.816E-03  0.191E-03   60  12   0   11  14   0   10  14  18    0.000    0.000       0
+  0     21 00:00:15.91   0.7580A  -2.3747  -1.2365   1.1034  0.076  0.49  -0.109E+01     40.  0.136E+01  0.200E-01  0.820E-03  0.190E-03   60  11  19   11  14   0   10  14  18    0.000    0.000       0
+  0     22 00:00:16.67   0.7580A  -2.3748  -1.2343   1.1367  0.076  0.51  -0.108E+01     40.  0.136E+01  0.206E-01  0.825E-03  0.188E-03   60  11  18   11  14   0   12  14  17    0.000    0.000       0
+  0     23 00:00:17.43   0.7580A  -2.3749  -1.2322   1.1787  0.076  0.52  -0.108E+01     40.  0.136E+01  0.212E-01  0.830E-03  0.187E-03   60  10  17   11  14   0   12  14  17    0.000    0.000       0
+  0     24 00:00:18.19   0.7580A  -2.3749  -1.2303   1.2094  0.076  0.53  -0.108E+01     40.  0.136E+01  0.217E-01  0.835E-03  0.186E-03   60  10  16   11  14   0   11  14  18    0.000    0.000       0
+  0     25 00:00:18.95   0.7580A  -2.3750  -1.2285   1.2417  0.076  0.54  -0.108E+01     40.  0.136E+01  0.224E-01  0.841E-03  0.185E-03   60  10  16   11  14   0   11  14  18    0.000    0.000       0
+  0     26 00:00:19.70   0.7580A  -2.3751  -1.2271   1.2664  0.075  0.55  -0.107E+01     40.  0.136E+01  0.230E-01  0.847E-03  0.184E-03   60  10  15   11  14   0   11  14  18    0.000    0.000       0
+  0     27 00:00:20.46   0.7580A  -2.3752  -1.2259   1.2926  0.075  0.56  -0.107E+01     40.  0.136E+01  0.236E-01  0.854E-03  0.183E-03   60   9  14   11  14   0   13  14  17    0.000    0.000       0
+  0     28 00:00:21.22   0.7580A  -2.3753  -1.2246   1.3071  0.075  0.56  -0.107E+01     40.  0.136E+01  0.243E-01  0.862E-03  0.183E-03   60   9  13   11  14   0   13  14  17    0.000    0.000       0
+  0     29 00:00:21.98   0.7580A  -2.3753  -1.2229   1.3222  0.075  0.56  -0.107E+01     40.  0.136E+01  0.250E-01  0.871E-03  0.183E-03   60   9  13   11  14   0   14  14  17    0.000    0.000       0
+  0     30 00:00:22.74   0.7580A  -2.3754  -1.2206   1.4032  0.075  0.57  -0.107E+01     40.  0.136E+01  0.257E-01  0.882E-03  0.183E-03   60   8  11   11  14   0    6  14  15    0.000    0.000       0
+  0     31 00:00:23.49   0.7580A  -2.3755  -1.2172   1.4746  0.074  0.57  -0.107E+01     40.  0.136E+01  0.264E-01  0.892E-03  0.183E-03   60   8  11   11  14   0    6  14  15    0.000    0.000       0
+  0     32 00:00:24.25   0.7580A  -2.3756  -1.2124   1.5624  0.074  0.57  -0.107E+01     40.  0.136E+01  0.271E-01  0.904E-03  0.184E-03   60   8  10   11  14   0    7  14  15    0.000    0.000       0
+  0     33 00:00:25.01   0.7580A  -2.3756  -1.2058   1.6345  0.074  0.58  -0.107E+01     40.  0.136E+01  0.279E-01  0.915E-03  0.185E-03   60   7   9   11  14   0    7  14  15    0.000    0.000       0
+  0     34 00:00:25.77   0.7580A  -2.3757  -1.1972   1.7258  0.074  0.58  -0.107E+01     40.  0.136E+01  0.287E-01  0.925E-03  0.186E-03   60   7   8   11  14   0    8  14  15    0.000    0.000       0
+  0     35 00:00:26.53   0.7580A  -2.3758  -1.1860   1.7935  0.074  0.58  -0.107E+01     40.  0.136E+01  0.295E-01  0.937E-03  0.187E-03   60   7   7   11  14   0    9  14  15    0.000    0.000       0
+  0     36 00:00:27.28   0.7580A  -2.3759  -1.1720   1.8888  0.074  0.61  -0.107E+01     44.  0.136E+01  0.303E-01  0.951E-03  0.189E-03   60   6   6   11  14   0    9  14  15    0.000    0.000       0
+  0     37 00:00:28.04   0.7580A  -2.3759  -1.1675   1.9682  0.073  0.61  -0.107E+01     44.  0.136E+01  0.312E-01  0.965E-03  0.190E-03   60   6   5   12  14   0   10  14  15    0.000    0.000       0
+  0     38 00:00:28.80   0.7580A  -2.3760  -1.1630   2.0314  0.073  0.62  -0.107E+01     46.  0.136E+01  0.321E-01  0.982E-03  0.192E-03   60   6   5   12  14   0   10  14  15    0.000    0.000       0
+  0     39 00:00:29.56   0.7580A  -2.3761  -1.1572   2.1114  0.073  0.63  -0.107E+01     46.  0.136E+01  0.330E-01  0.998E-03  0.194E-03   60   6   4   12  14   0   11  14  15    0.000    0.000       0
+  0     40 00:00:30.32   0.7580A  -2.3762  -1.1498   2.1334  0.073  0.62  -0.107E+01     46.  0.136E+01  0.339E-01  0.102E-02  0.195E-03   60   5   3   12  14   0   11  14  15    0.000    0.000       0
+  0     41 00:00:31.07   0.7580A  -2.3762  -1.1406   2.1907  0.073  0.62  -0.107E+01     46.  0.136E+01  0.349E-01  0.104E-02  0.196E-03   60   5   2   12  14   0   12  14  15    0.000    0.000       0
+  0     42 00:00:31.83   0.7570A  -2.3763  -1.1298   2.1834  0.073  0.62  -0.106E+01     46.  0.136E+01  0.359E-01  0.106E-02  0.198E-03   60   4   1   12  14   0   12  14  15    0.000    0.000       0
+  0     43 00:00:32.59   0.7570A  -2.3764  -1.1178   2.1983  0.073  0.63  -0.106E+01     48.  0.136E+01  0.369E-01  0.108E-02  0.199E-03   60   4   0   12  14   0   13  14  15    0.000    0.000       0
+  0     44 00:00:33.35   0.7570A  -2.3765  -1.1055   2.1793  0.073  0.63  -0.106E+01     48.  0.136E+01  0.379E-01  0.110E-02  0.200E-03   60   4  19   14  14   0   13  14  15    0.000    0.000       0
+  0     45 00:00:34.10   0.7570A  -2.3765  -1.1160   2.1784  0.073  0.62  -0.106E+01     48.  0.137E+01  0.390E-01  0.113E-02  0.202E-03   60   4  19   14  14   0   16  14  16    0.000    0.000       0
+  0     46 00:00:34.86   0.7570A  -2.3766  -1.1264   2.1885  0.073  0.62  -0.106E+01     48.  0.137E+01  0.401E-01  0.115E-02  0.203E-03   60   3  17   14  14   0   16  14  16    0.000    0.000       0
+  0     47 00:00:35.62   0.7570A  -2.3767  -1.1353   2.1889  0.072  0.62  -0.106E+01     48.  0.137E+01  0.411E-01  0.117E-02  0.203E-03   60   3  17   14  14   0   17  14  16    0.000    0.000       0
+  0     48 00:00:36.37   0.7570A  -2.3768  -1.1419   2.2142  0.072  0.62  -0.106E+01     50.  0.137E+01  0.422E-01  0.120E-02  0.203E-03   60   3  16   14  14   0   20  14  17    0.000    0.000       0
+  0     49 00:00:37.13   0.7570A  -2.3768  -1.1459   2.2101  0.072  0.62  -0.106E+01     50.  0.137E+01  0.433E-01  0.122E-02  0.203E-03   60   2  15   14  14   0   20  14  17    0.000    0.000       0
+  0     50 00:00:37.89   0.7570A  -2.3769  -1.1473   2.1891  0.072  0.62  -0.106E+01     50.  0.137E+01  0.444E-01  0.125E-02  0.202E-03   60   2  14   14  14   0   18  14  16    0.000    0.000       0
+  0     51 00:00:38.64   0.7570A  -2.3770  -1.1467   2.1666  0.072  0.62  -0.106E+01     50.  0.137E+01  0.455E-01  0.127E-02  0.202E-03   60   2  13   14  14   0   18  14  16    0.000    0.000       0
+  0     52 00:00:39.40   0.7570A  -2.3771  -1.1443   2.1360  0.072  0.63  -0.106E+01     52.  0.137E+01  0.466E-01  0.130E-02  0.202E-03   60   1  12   14  14   0   18  14  16    0.000    0.000       0
+  0     53 00:00:40.16   0.7570A  -2.3771  -1.1623   2.1140  0.072  0.63  -0.106E+01     52.  0.137E+01  0.476E-01  0.132E-02  0.202E-03   60   1  11   22  14  13   20  14  16    0.000    0.000       0
+  0     54 00:00:40.92   0.7570A  -2.3772  -1.2374   2.1096  0.072  0.63  -0.107E+01     52.  0.137E+01  0.487E-01  0.134E-02  0.203E-03   60   1  11   22  14  13   20  14  16    0.000    0.000       0
+  0     55 00:00:41.67   0.7570A  -2.3773  -1.2997   2.0905  0.072  0.64  -0.107E+01     52.  0.137E+01  0.497E-01  0.136E-02  0.203E-03   60   1  10   22  14  13   20  14  16    0.000    0.000       0
+  0     56 00:00:42.43   0.7570A  -2.3774  -1.3365   2.0920  0.072  0.64  -0.107E+01     52.  0.137E+01  0.507E-01  0.138E-02  0.203E-03   60   0   9   22  14  13   22  13  16    0.000    0.000       0
+  0     57 00:00:43.19   0.7570A  -2.3774  -1.3596   2.1035  0.072  0.65  -0.107E+01     54.  0.137E+01  0.518E-01  0.139E-02  0.204E-03   60   0   8    8  14   5   23  13  16    0.000    0.000       0
+  0     58 00:00:43.94   0.7570A  -2.3775  -1.3962   2.0921  0.072  0.65  -0.108E+01     54.  0.137E+01  0.527E-01  0.141E-02  0.204E-03   60   0   7    8  14   5   23  13  16    0.000    0.000       0
+  0     59 00:00:44.70   0.7570A  -2.3776  -1.4256   2.0198  0.072  0.66  -0.108E+01     54.  0.137E+01  0.537E-01  0.142E-02  0.205E-03   60  19   6    8  14   5   23  13  16    0.000    0.000       0
+  0     60 00:00:45.46   0.7570A  -2.3777  -1.4515   1.8968  0.072  0.66  -0.109E+01     54.  0.137E+01  0.547E-01  0.144E-02  0.206E-03   60  19   6    8  14   5   21  14  16    0.000    0.000       0
+  0     61 00:00:46.21   0.7570A  -2.3777  -1.4755   1.8570  0.072  0.68  -0.108E+01     56.  0.137E+01  0.556E-01  0.146E-02  0.207E-03   60  19   5    8  14   5   21  14  16    0.000    0.000       0
+  0     62 00:00:46.97   0.7570A  -2.3778  -1.4970   1.8597  0.072  0.68  -0.108E+01     56.  0.137E+01  0.565E-01  0.149E-02  0.208E-03   60  19   4    8  14   5   19  14  17    0.000    0.000       0
+  0     63 00:00:47.73   0.7570A  -2.3779  -1.5145   1.8675  0.072  0.69  -0.108E+01     56.  0.137E+01  0.575E-01  0.151E-02  0.208E-03   60  18   3    8  14   5   19  14  17    0.000    0.000       0
+  0     64 00:00:48.49   0.7570A  -2.3780  -1.5269   1.8729  0.072  0.69  -0.107E+01     56.  0.137E+01  0.584E-01  0.153E-02  0.209E-03   60  18   2    8  14   5   19  14  17    0.000    0.000       0
+  0     65 00:00:49.24   0.7570A  -2.3780  -1.5331   1.8803  0.072  0.70  -0.107E+01     56.  0.137E+01  0.592E-01  0.155E-02  0.210E-03   60  18   2    8  14   5   19  14  17    0.000    0.000       0
+  0     66 00:00:50.00   0.7570A  -2.3781  -1.5332   1.8901  0.072  0.71  -0.107E+01     58.  0.137E+01  0.601E-01  0.158E-02  0.210E-03   60  17   0    8  14   5   19  14  17    0.000    0.000       0
+  0     67 00:00:50.76   0.7570A  -2.3782  -1.5267   1.8994  0.072  0.72  -0.106E+01     58.  0.137E+01  0.610E-01  0.160E-02  0.210E-03   60  17   0    8  14   5   19  14  17    0.000    0.000       0
+  0     68 00:00:51.51   0.7570A  -2.3783  -1.5128   1.9059  0.072  0.73  -0.106E+01     58.  0.137E+01  0.618E-01  0.162E-02  0.211E-03   60  17  19    8  14   5   19  14  17    0.000    0.000       0
+  0     69 00:00:52.27   0.7570A  -2.3783  -1.5285   1.9086  0.072  0.73  -0.106E+01     58.  0.137E+01  0.627E-01  0.165E-02  0.211E-03   60  16  17   23  12  10   19  14  17    0.000    0.000       0
+  0     70 00:00:53.03   0.7570A  -2.3784  -1.5324   1.9091  0.072  0.74  -0.105E+01     58.  0.137E+01  0.635E-01  0.167E-02  0.212E-03   60  16  17   23  12  10   19  14  17    0.000    0.000       0
+  0     71 00:00:53.78   0.7570A  -2.3785  -1.5209   1.9111  0.072  0.75  -0.105E+01     60.  0.137E+01  0.643E-01  0.169E-02  0.212E-03   60  16  16   23  12  10   19  14  17    0.000    0.000       0
+  0     72 00:00:54.54   0.7570A  -2.3786  -1.5281   1.9285  0.072  0.76  -0.105E+01     60.  0.137E+01  0.651E-01  0.171E-02  0.213E-03   60  15  14   23  11   9   17  14  17    0.000    0.000       0
+  0     73 00:00:55.30   0.7570A  -2.3786  -1.5237   1.9667  0.072  0.76  -0.105E+01     60.  0.137E+01  0.659E-01  0.173E-02  0.214E-03   60  15  14   23  11   9   17  14  17    0.000    0.000       0
+  0     74 00:00:56.06   0.7570A  -2.3787  -1.5023   1.9915  0.072  0.77  -0.104E+01     60.  0.137E+01  0.667E-01  0.175E-02  0.214E-03   60  15  13   23  12   9   18  14  17    0.000    0.000       0
+  0     75 00:00:56.81   0.7570A  -2.3788  -1.4950   2.0234  0.072  0.77  -0.104E+01     60.  0.137E+01  0.675E-01  0.177E-02  0.215E-03   60  14  11   23  12   9   18  14  17    0.000    0.000       0
+  0     76 00:00:57.57   0.7570A  -2.3789  -1.4977   2.0370  0.072  0.78  -0.104E+01     60.  0.137E+01  0.682E-01  0.180E-02  0.217E-03   60  14  11   23  11   8   18  14  17    0.000    0.000       0
+  0     77 00:00:58.33   0.7570A  -2.3789  -1.4828   2.0548  0.072  0.78  -0.104E+01     60.  0.137E+01  0.690E-01  0.182E-02  0.218E-03   60  14  10   23  11   8   19  14  17    0.000    0.000       0
+  0     78 00:00:59.08   0.7570A  -2.3790  -1.4494   2.0570  0.072  0.79  -0.103E+01     60.  0.137E+01  0.697E-01  0.185E-02  0.219E-03   60  13   9   23  10   7   19  14  17    0.000    0.000       0
+  0     79 00:00:59.84   0.7570A  -2.3791  -1.4404   2.0315  0.072  0.79  -0.103E+01     60.  0.137E+01  0.705E-01  0.187E-02  0.219E-03   60  13   8   23  11   7   19  14  17    0.000    0.000       0
+  0     80 00:01:00.60   0.7570A  -2.3792  -1.4277   1.9922  0.072  0.81  -0.103E+01     62.  0.137E+01  0.712E-01  0.190E-02  0.220E-03   60  13   7   23  10   6   20  14  17    0.000    0.000       0
+  0     81 00:01:01.35   0.7570A  -2.3792  -1.4445   1.9523  0.072  0.81  -0.102E+01     62.  0.137E+01  0.719E-01  0.192E-02  0.221E-03   60  13   7   23  10   6   20  14  17    0.000    0.000       0
+  0     82 00:01:02.11   0.7570A  -2.3793  -1.4372   1.9055  0.072  0.81  -0.102E+01     62.  0.137E+01  0.726E-01  0.195E-02  0.222E-03   60  13   6   23  10   6   22  13  16    0.000    0.000       0
+  0     83 00:01:02.87   0.7560A  -2.3794  -1.4125   1.9619  0.072  0.82  -0.103E+01     62.  0.137E+01  0.733E-01  0.197E-02  0.223E-03   60  12   5   11  12   4   22  13  16    0.000    0.000       0
+  0     84 00:01:03.62   0.7560A  -2.3795  -1.4072   1.9975  0.072  0.82  -0.102E+01     62.  0.137E+01  0.739E-01  0.199E-02  0.224E-03   60  12   4   11  12   4   23  13  16    0.000    0.000       0
+  0     85 00:01:04.38   0.7560A  -2.3795  -1.4225   1.9909  0.073  0.82  -0.102E+01     62.  0.137E+01  0.746E-01  0.201E-02  0.225E-03   60  12   4    8  13   5   23  13  16    0.000    0.000       0
+  0     86 00:01:05.14   0.7560A  -2.3796  -1.4420   1.9955  0.073  0.83  -0.102E+01     62.  0.137E+01  0.752E-01  0.203E-02  0.227E-03   60  11   2    8  13   5   16  14  14    0.000    0.000       0
+  0     87 00:01:05.89   0.7560A  -2.3797  -1.4597   1.9970  0.073  0.83  -0.102E+01     62.  0.137E+01  0.758E-01  0.204E-02  0.229E-03   60  11   2    8  13   5   16  14  14    0.000    0.000       0
+  0     88 00:01:06.65   0.7560A  -2.3798  -1.4756   2.0149  0.073  0.83  -0.102E+01     62.  0.137E+01  0.763E-01  0.206E-02  0.231E-03   60  11   1    8  13   5   17  14  14    0.000    0.000       0
+  0     89 00:01:07.40   0.7560A  -2.3798  -1.4897   2.0161  0.073  0.84  -0.102E+01     62.  0.137E+01  0.769E-01  0.208E-02  0.233E-03   60  11   1    8  13   5   17  14  14    0.000    0.000       0
+  0     90 00:01:08.16   0.7560A  -2.3799  -1.5019   2.0432  0.073  0.84  -0.102E+01     62.  0.137E+01  0.774E-01  0.210E-02  0.235E-03   60  10  19    8  13   5   18  14  14    0.000    0.000       0
+  0     91 00:01:08.92   0.7560A  -2.3800  -1.5120   2.0499  0.073  0.84  -0.102E+01     62.  0.137E+01  0.780E-01  0.212E-02  0.238E-03   60  10  18    8  13   5   18  14  14    0.000    0.000       0
+  0     92 00:01:09.67   0.7560A  -2.3800  -1.5201   1.9605  0.073  0.84  -0.102E+01     62.  0.137E+01  0.785E-01  0.214E-02  0.240E-03   60  10  18    8  13   5   19  14  14    0.000    0.000       0
+  0     93 00:01:10.43   0.7560A  -2.3801  -1.5261   1.9734  0.073  0.85  -0.101E+01     62.  0.137E+01  0.789E-01  0.216E-02  0.243E-03   60   9  16    8  13   5   19  14  14    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/urban_environment/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/urban_environment/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/urban_environment/case_config.yml	(revision 3477)
@@ -0,0 +1,20 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+
+activation_strings:
+  - "d3#"
+  - "restart"
+
+significant_digits_for_netcdf_checks:
+  timeseries: 6
+  profiles: 6
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/INPUT/urban_environment_restart_p3dr
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/INPUT/urban_environment_restart_p3dr	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/INPUT/urban_environment_restart_p3dr	(revision 3477)
@@ -0,0 +1,226 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+ &initialization_parameters
+
+!
+!-- Grid
+!------------------------------------------------------------------------------
+    nx                   = 19,
+    ny                   = 19,
+    nz                   = 60,
+
+    dx                   = 2.0,
+    dy                   = 2.0,
+    dz                   = 2.0,
+
+!
+!-- Numerics
+!------------------------------------------------------------------------------
+    fft_method           = 'fftw',
+
+!
+!-- Mode
+!------------------------------------------------------------------------------     
+    humidity             = .T.,
+    q_surface            = 0.001,
+
+!
+!-- Initialization
+!------------------------------------------------------------------------------
+    initializing_actions = 'read_restart_data',
+
+    pt_surface           = 277.15,
+    ug_surface           = 1.0,
+    vg_surface           = 0.0,
+
+    day_of_year_init     = 65,             ! march 06, to avoid extreme temperatures
+    time_utc_init        = 36000.0,        ! (0.0 s = 00 UTC midnight),
+
+!
+!-- Wall/soil spinup
+!------------------------------------------------------------------------------    
+    spinup_time         = 1200.0,
+    spinup_pt_mean      = 284.15,
+    spinup_pt_amplitude = 10.0,             ! give a dirunal cycle from 6 - 16 Â°C
+    dt_spinup           = 120.0,
+    data_output_during_spinup = .F.,
+
+!
+!-- Topography
+!------------------------------------------------------------------------------    
+    topography           = 'read_from_file',
+
+!
+!-- Physics
+!------------------------------------------------------------------------------
+    longitude            = 13.4,
+    latitude             = 52.5,
+
+ / ! end of inipar namelist
+
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+ &runtime_parameters
+
+!
+!-- Run steering
+!------------------------------------------------------------------------------
+    end_time              = 140.0,
+    create_disturbances   = .T.,
+
+!
+!-- Run-control/timeseries output settings
+!------------------------------------------------------------------------------
+    dt_run_control        =  0.0,
+    dt_dots               =  10.0,
+
+!
+!-- Profile output settings
+!------------------------------------------------------------------------------
+    skip_time_dopr        =  0.0,
+    dt_dopr               = 60.0,
+    averaging_interval_pr = 60.0,
+    dt_averaging_input_pr =  0.0,
+
+    data_output_pr        = '#u',  'u*2',  'wu',  'w*u*',  'w"u"',
+                            '#v',  'v*2',  'wv',  'w*v*',  'w"v"',
+                            'w',   'w*2',
+                            '#theta', 'theta*2', 'wtheta', 'w*theta*', 'w"theta"',
+                            '#q',  'q*2',
+                            'e', 'e*', '#km', '#l',
+                            '#t_soil', '#m_soil', 'rad_lw_in', 'rad_lw_out',
+!
+!-- 2D/3D output settings
+!------------------------------------------------------------------------------
+    do3d_at_begin      = .T., 
+    do2d_at_begin      = .T.,
+
+    dt_data_output     = 60.0, 
+    dt_data_output_av  = 60.0,
+    averaging_interval = 60.0,
+    dt_averaging_input =  0.0,
+
+    section_xy         = 0,
+
+    data_output = 'u',  'u_av',
+                  'v',  'v_av',
+                  'w',  'w_av',
+                  'theta', 'theta_av',
+                  'q',  'q_av',
+                  'e',  'e_av',
+                  'p',  'p_av',
+                  'm_soil', 'm_soil_av',
+                  't_soil', 't_soil_av',
+                  'shf*_xy', 'shf*_xy_av',
+                  'ghf*_xy', 'ghf*_xy_av',
+                  'us*_xy', 'z0*_xy',
+                  't*_xy', 'ol*_xy',
+                  'm_liq*_xy',
+                  'r_s*_xy', 'r_a*_xy',
+                  'rad_net*_xy', 'rad_lw_in*_xy', 'rad_lw_out*_xy', 'rad_sw_in*_xy', 'rad_sw_out*_xy',
+                  'qsws*_xy', 'qsws*_xy_av',
+                  'tsurf*_xy', 'tsurf*_xy_av',
+                  'pcm_lad', 'pcm_heatrate',
+                  'kc_PM10', 'kc_PM25', 'kc_PM10_av', 'kc_PM25_av',
+
+
+
+ / ! end of d3par namelist
+
+
+!-------------------------------------------------------------------------------
+!-- RADIATION MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/radpar
+!-------------------------------------------------------------------------------
+  &radiation_parameters
+
+     radiation_scheme =  'rrtmg',    !'clear-sky' or 'rrtmg',
+     albedo_type = 5,
+     constant_albedo = .F.,
+
+     dt_radiation = 60.0,
+
+     surface_reflections = .T.,
+     nrefsteps = 3,
+
+     rad_angular_discretization = .F.,
+     raytrace_mpi_rma = .F.,
+
+  /
+
+
+!-------------------------------------------------------------------------------
+!-- LAND SURFACE MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/lsmpar
+!------------------------------------------------------------------------------- 
+ &land_surface_parameters 
+
+    constant_roughness     = .T.,
+    aero_resist_kray       = .T.,
+
+    vegetation_type        = 2,
+    soil_type              = 3,
+    conserve_water_content = .T.,
+
+    root_fraction          = 0.49, 0.26, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0,
+    soil_temperature       = 277.15, 277.0, 277.0, 277.0, 277.0, 277.0, 277.0, 277.0, 
+    soil_moisture          = 0.30,   0.30,  0.30,  0.30,  0.30, 0.30,  0.30,  0.30,
+    deep_soil_temperature  = 277.0,
+    
+ / ! end of lsm_par namelist
+
+
+!-------------------------------------------------------------------------------
+!-- URBAN SURFACE MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/usmpar
+!-------------------------------------------------------------------------------
+ &urban_surface_parameters
+
+    usm_material_model     = .T.,
+    usm_wall_mod = .T.,
+
+ / ! end of urban_surface_par namelist
+ 
+
+!-------------------------------------------------------------------------------
+!-- PLANT CANOPY MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/canpar
+!-------------------------------------------------------------------------------
+ &plant_canopy_parameters
+ 
+    canopy_mode       = 'read_from_file_3d',
+    canopy_drag_coeff = 0.3,
+      
+ / ! end of canopy_par namelist
+ 
+
+!-------------------------------------------------------------------------------
+!-- CHEMISTRY MODEL PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/chempar
+!-------------------------------------------------------------------------------
+ &chemistry_parameters
+
+    chem_gasphase_on           = .F.,
+    
+    do_emis                    = .T.,
+    mode_emis                  = 'PARAMETERIZED',
+    surface_csflux_name        = 'PM10','PM25',  !"cs" stands for chemical species
+    surface_csflux             = 0.75, 0.375,    !surface emission of PM10, PM25 (arbitrary units)
+    cs_name                    = 'PM10','PM25',
+    cs_surface                 = 2.0, 1.0,       !surface concentration of PM10, PM25 (arbitrary units)
+    bc_cs_b                    = 'neumann',
+    bc_cs_t                    = 'neumann',
+    
+!-- for emission depending on street type in static driver
+    emiss_factor_main = 1.667, 1.667,   !emiss_factor_main*surface_csflux for emission on main streets
+    emiss_factor_side = 0.334, 0.334,   !emiss_factor_side*surface_csflux for emission on side streets
+    main_street_id = 12,          !id is for identifying main/side streets (see chem_emissions in chemistry_model_mod.f90)
+    side_street_id =  8,
+    max_street_id = 19,
+
+ / ! end of chemistry_par namelist
Index: /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/MONITORING/urban_environment_restart_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/MONITORING/urban_environment_restart_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/MONITORING/urban_environment_restart_rc	(revision 3477)
@@ -0,0 +1,100 @@
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  1     93 00:01:10.43   0.7560A  -2.3801  -1.5261   1.9734  0.073  0.09  -0.101E+01     62.  0.137E+01  0.789E-01  0.000E+00  0.000E+00   60   9  16    8  13   5   19  14  14    0.000    0.000       0
+  1     94 00:01:11.18   0.7560A  -2.3802  -1.5300   1.8775  0.073  0.85  -0.101E+01     62.  0.137E+01  0.794E-01  0.218E-02  0.245E-03   60   9  16    8  13   5   19  14  14    0.000    0.000       0
+  1     95 00:01:11.94   0.7560A  -2.3803  -1.5320   1.7916  0.073  0.86  -0.101E+01     64.  0.136E+01  0.799E-01  0.220E-02  0.247E-03   60   9  15    8  13   5   20  14  14    0.000    0.000       0
+  1     96 00:01:12.70   0.7560A  -2.3803  -1.5320   1.7005  0.073  0.86  -0.101E+01     64.  0.136E+01  0.803E-01  0.222E-02  0.248E-03   60   8  13    8  13   5   14  14  13    0.000    0.000       0
+  1     97 00:01:13.45   0.7560A  -2.3804  -1.5302   1.6938  0.073  0.87  -0.101E+01     64.  0.136E+01  0.807E-01  0.224E-02  0.249E-03   60   8  13    8  13   5   15  14  13    0.000    0.000       0
+  1     98 00:01:14.21   0.7560A  -2.3805  -1.5272   1.6685  0.073  0.87  -0.101E+01     64.  0.136E+01  0.811E-01  0.226E-02  0.251E-03   60   8  12    8  13   5   19  14  13    0.000    0.000       0
+  1     99 00:01:14.96   0.7560A  -2.3806  -1.5231   1.6484  0.073  0.87  -0.101E+01     64.  0.136E+01  0.815E-01  0.228E-02  0.252E-03   60   8  12    8  13   5   19  14  13    0.000    0.000       0
+  1    100 00:01:15.72   0.7560A  -2.3806  -1.5181   1.6316  0.073  0.87  -0.101E+01     64.  0.136E+01  0.819E-01  0.229E-02  0.252E-03   60   7  10    8  13   5    7  14   3    0.000    0.000       0
+  1    101 00:01:16.48   0.7560A  -2.3807  -1.5125   1.6332  0.073  0.87  -0.101E+01     64.  0.136E+01  0.822E-01  0.231E-02  0.252E-03   60   7   9    8  13   5    7  14   3    0.000    0.000       0
+  1    102 00:01:17.23   0.7560A  -2.3808  -1.5063   1.6342  0.073  0.87  -0.101E+01     64.  0.136E+01  0.826E-01  0.233E-02  0.252E-03   60   7   9    8  13   5    7  14   3    0.000    0.000       0
+  1    103 00:01:17.99   0.7560A  -2.3808  -1.5115   1.6345  0.073  0.87  -0.101E+01     64.  0.136E+01  0.829E-01  0.235E-02  0.252E-03   60   6   7    7  13   5    7  14   3    0.000    0.000       0
+  1    104 00:01:18.74   0.7560A  -2.3809  -1.5189   1.6340  0.073  0.78  -0.101E+01     48.  0.136E+01  0.832E-01  0.237E-02  0.251E-03   60   6   7    7  13   5    7  14   3    0.000    0.000       0
+  1    105 00:01:19.50   0.7560A  -2.3810  -1.5219   1.6381  0.073  0.78  -0.100E+01     48.  0.136E+01  0.835E-01  0.239E-02  0.249E-03   60   6   6    7  13   5   14  14  18    0.000    0.000       0
+  1    106 00:01:20.26   0.7560A  -2.3811  -1.5207   1.6497  0.073  0.78  -0.100E+01     48.  0.136E+01  0.837E-01  0.241E-02  0.247E-03   60   5   4    7  13   5   14  14  18    0.000    0.000       0
+  1    107 00:01:21.01   0.7560A  -2.3811  -1.5156   1.6583  0.073  0.77  -0.100E+01     48.  0.136E+01  0.840E-01  0.243E-02  0.245E-03   60   5   4    7  13   5   14  14  18    0.000    0.000       0
+  1    108 00:01:21.77   0.7560A  -2.3812  -1.5071   1.6642  0.073  0.76  -0.100E+01     46.  0.136E+01  0.842E-01  0.245E-02  0.242E-03   60   5   3    7  13   5   14  14  18    0.000    0.000       0
+  1    109 00:01:22.52   0.7560A  -2.3813  -1.5018   1.6676  0.073  0.76  -0.100E+01     46.  0.136E+01  0.844E-01  0.247E-02  0.239E-03   60   4   1   13  13   0   14  14  18    0.000    0.000       0
+  1    110 00:01:23.28   0.7560A  -2.3814  -1.4993   1.6690  0.073  0.75  -0.100E+01     46.  0.136E+01  0.846E-01  0.249E-02  0.236E-03   60   4   0   13  13   0   15  14  18    0.000    0.000       0
+  1    111 00:01:24.04   0.7560A  -2.3814  -1.4928   1.6874  0.073  0.75  -0.101E+01     46.  0.136E+01  0.848E-01  0.251E-02  0.233E-03   60   3  19   13  13   0   16  14  17    0.000    0.000       0
+  1    112 00:01:24.79   0.7560A  -2.3815  -1.4843   1.7107  0.073  0.77  -0.101E+01     50.  0.135E+01  0.850E-01  0.252E-02  0.230E-03   60   3  18   13  13   0   16  14  17    0.000    0.000       0
+  1    113 00:01:25.55   0.7560A  -2.3816  -1.4754   1.7311  0.073  0.77  -0.101E+01     52.  0.135E+01  0.851E-01  0.254E-02  0.227E-03   60   3  17   13  13   0   16  14  17    0.000    0.000       0
+  1    114 00:01:26.30   0.7560A  -2.3817  -1.4669   1.7503  0.073  0.77  -0.101E+01     52.  0.135E+01  0.853E-01  0.255E-02  0.224E-03   60   2  16   13  13   0   17  14  17    0.000    0.000       0
+  1    115 00:01:27.06   0.7560A  -2.3817  -1.4690   1.7722  0.073  0.77  -0.101E+01     52.  0.135E+01  0.854E-01  0.256E-02  0.221E-03   60   2  15   12  12   0   17  14  17    0.000    0.000       0
+  1    116 00:01:27.82   0.7560A  -2.3818  -1.4712   1.7916  0.073  0.76  -0.102E+01     52.  0.135E+01  0.856E-01  0.256E-02  0.218E-03   60   2  14   12  12   0   17  14  17    0.000    0.000       0
+  1    117 00:01:28.57   0.7560A  -2.3819  -1.4685   1.8139  0.073  0.76  -0.102E+01     52.  0.135E+01  0.857E-01  0.257E-02  0.215E-03   60   1  13   12  12   0   18  14  17    0.000    0.000       0
+  1    118 00:01:29.33   0.7560A  -2.3820  -1.4625   1.8333  0.073  0.75  -0.102E+01     52.  0.135E+01  0.858E-01  0.257E-02  0.213E-03   60   1  12   12  12   0   18  14  17    0.000    0.000       0
+  1    119 00:01:30.08   0.7560A  -2.3821  -1.4548   1.8501  0.073  0.75  -0.102E+01     52.  0.135E+01  0.859E-01  0.258E-02  0.211E-03   60   1  12   12  12   0   18  14  17    0.000    0.000       0
+  1    120 00:01:30.84   0.7560A  -2.3821  -1.4461   1.8641  0.073  0.74  -0.102E+01     52.  0.135E+01  0.860E-01  0.258E-02  0.209E-03   60   1  11   12  12   0   18  14  17    0.000    0.000       0
+  1    121 00:01:31.60   0.7560A  -2.3822  -1.4366   1.8753  0.073  0.74  -0.102E+01     52.  0.135E+01  0.860E-01  0.258E-02  0.207E-03   60   0  10   12  12   0   18  14  17    0.000    0.000       0
+  1    122 00:01:32.35   0.7560A  -2.3823  -1.4260   1.8837  0.073  0.73  -0.104E+01     52.  0.135E+01  0.861E-01  0.259E-02  0.205E-03   60   0   9   12  12   0   18  14  17    0.000    0.000       0
+  1    123 00:01:33.11   0.7560A  -2.3824  -1.4140   1.8943  0.073  0.73  -0.104E+01     52.  0.135E+01  0.862E-01  0.260E-02  0.204E-03   60   0   9   12  12   0   19  14  17    0.000    0.000       0
+  1    124 00:01:33.86   0.7560A  -2.3824  -1.4007   1.9063  0.073  0.72  -0.103E+01     52.  0.135E+01  0.862E-01  0.260E-02  0.202E-03   60   0   8   15  13   0   19  14  17    0.000    0.000       0
+  1    125 00:01:34.62   0.7560A  -2.3825  -1.4006   1.9161  0.073  0.72  -0.103E+01     52.  0.135E+01  0.862E-01  0.260E-02  0.201E-03   60  19   7   15  13   0   19  14  17    0.000    0.000       0
+  1    126 00:01:35.38   0.7550A  -2.3826  -1.3994   1.9239  0.073  0.71  -0.103E+01     52.  0.134E+01  0.862E-01  0.261E-02  0.200E-03   60  19   6   15  13   0   19  14  17    0.000    0.000       0
+  1    127 00:01:36.13   0.7550A  -2.3827  -1.3969   1.9298  0.073  0.72  -0.102E+01     54.  0.134E+01  0.862E-01  0.261E-02  0.199E-03   60  19   6   15  13   0   19  14  17    0.000    0.000       0
+  1    128 00:01:36.89   0.7550A  -2.3827  -1.3930   1.9337  0.073  0.72  -0.102E+01     54.  0.134E+01  0.862E-01  0.262E-02  0.197E-03   60  19   6   15  13   0   19  14  17    0.000    0.000       0
+  1    129 00:01:37.64   0.7550A  -2.3828  -1.3875   1.9351  0.073  0.72  -0.101E+01     54.  0.134E+01  0.861E-01  0.262E-02  0.196E-03   60  19   5   15  13   0   19  14  17    0.000    0.000       0
+  1    130 00:01:38.40   0.7550A  -2.3829  -1.3798   1.9398  0.073  0.71  -0.101E+01     54.  0.134E+01  0.861E-01  0.263E-02  0.195E-03   60  18   4   15  13   0   20  14  16    0.000    0.000       0
+  1    131 00:01:39.15   0.7550A  -2.3829  -1.3727   1.9581  0.073  0.71  -0.101E+01     54.  0.134E+01  0.860E-01  0.263E-02  0.194E-03   60  18   3   16  12   0   20  14  16    0.000    0.000       0
+  1    132 00:01:39.91   0.7550A  -2.3830  -1.3741   1.9733  0.074  0.71  -0.100E+01     54.  0.134E+01  0.858E-01  0.263E-02  0.193E-03   60  18   3   16  12   0   20  14  16    0.000    0.000       0
+  1    133 00:01:40.66   0.7550A  -2.3831  -1.3720   1.9969  0.074  0.71  -0.100E+01     54.  0.134E+01  0.857E-01  0.263E-02  0.192E-03   60  18   3   16  12   0   22  14  16    0.000    0.000       0
+  1    134 00:01:41.42   0.7550A  -2.3831  -1.3642   2.0263  0.074  0.71  -0.999E+00     54.  0.134E+01  0.856E-01  0.263E-02  0.191E-03   60  18   2   16  12   0   22  14  16    0.000    0.000       0
+  1    135 00:01:42.17   0.7550A  -2.3832  -1.3542   2.0499  0.074  0.71  -0.994E+00     54.  0.134E+01  0.854E-01  0.263E-02  0.190E-03   60  18   2   17  12   0   22  14  16    0.000    0.000       0
+  1    136 00:01:42.93   0.7550A  -2.3833  -1.3461   2.0661  0.074  0.71  -0.989E+00     54.  0.134E+01  0.852E-01  0.262E-02  0.190E-03   60  17   0   17  12   0   22  14  16    0.000    0.000       0
+  1    137 00:01:43.68   0.7550A  -2.3834  -1.3453   2.0742  0.074  0.71  -0.987E+00     54.  0.134E+01  0.850E-01  0.262E-02  0.189E-03   60  17   0   18  10  19   22  14  16    0.000    0.000       0
+  1    138 00:01:44.44   0.7550A  -2.3834  -1.3633   2.0734  0.075  0.72  -0.989E+00     54.  0.134E+01  0.847E-01  0.262E-02  0.189E-03   60   5   4   18  10  19   22  14  16    0.000    0.000       0
+  1    139 00:01:45.19   0.7550A  -2.3835  -1.3715   2.0642  0.075  0.73  -0.996E+00     56.  0.133E+01  0.845E-01  0.261E-02  0.188E-03   60   5   3   18  10  19   22  14  16    0.000    0.000       0
+  1    140 00:01:45.95   0.7550A  -2.3836  -1.3685   2.0470  0.075  0.73  -0.100E+01     56.  0.133E+01  0.842E-01  0.261E-02  0.188E-03   60   5   3   18  10  19   22  14  16    0.000    0.000       0
+  1    141 00:01:46.70   0.7550A  -2.3836  -1.3628   2.0231  0.075  0.73  -0.984E+00     56.  0.133E+01  0.839E-01  0.260E-02  0.188E-03   60   5   3   17   9  19   22  14  16    0.000    0.000       0
+  1    142 00:01:47.46   0.7550A  -2.3837  -1.3481   1.9952  0.075  0.73  -0.974E+00     56.  0.133E+01  0.836E-01  0.260E-02  0.189E-03   60   4   1   17   9  19   22  14  16    0.000    0.000       0
+  1    143 00:01:48.21   0.7550A  -2.3838  -1.3145   1.9654  0.075  0.73  -0.970E+00     56.  0.133E+01  0.833E-01  0.260E-02  0.190E-03   60   4   1   17   9  19   22  14  16    0.000    0.000       0
+  1    144 00:01:48.97   0.7550A  -2.3839  -1.2749   1.9358  0.075  0.74  -0.968E+00     56.  0.133E+01  0.829E-01  0.259E-02  0.192E-03   60   4   1   17   8  18   22  14  16    0.000    0.000       0
+  1    145 00:01:49.72   0.7550A  -2.3839  -1.2782   1.9151  0.075  0.74  -0.968E+00     56.  0.133E+01  0.826E-01  0.259E-02  0.194E-03   60   4   1   17   8  18   20  14  16    0.000    0.000       0
+  1    146 00:01:50.48   0.7550A  -2.3840  -1.2657   1.8973  0.075  0.74  -0.970E+00     56.  0.133E+01  0.822E-01  0.258E-02  0.195E-03   60   4   0   17   8  18   20  14  16    0.000    0.000       0
+  1    147 00:01:51.23   0.7550A  -2.3841  -1.2373   1.8782  0.075  0.74  -0.972E+00     56.  0.133E+01  0.818E-01  0.258E-02  0.197E-03   60   4   0   17   8  18   20  14  16    0.000    0.000       0
+  1    148 00:01:51.99   0.7550A  -2.3842  -1.2352   1.8575  0.075  0.74  -0.976E+00     56.  0.133E+01  0.814E-01  0.256E-02  0.198E-03   60   4   0   18  14   0   20  14  16    0.000    0.000       0
+  1    149 00:01:52.74   0.7550A  -2.3842  -1.2426   1.8352  0.075  0.74  -0.980E+00     56.  0.132E+01  0.810E-01  0.255E-02  0.199E-03   60   3  18   18  14   0   20  14  16    0.000    0.000       0
+  1    150 00:01:53.50   0.7550A  -2.3843  -1.2463   1.8107  0.075  0.74  -0.984E+00     56.  0.132E+01  0.806E-01  0.254E-02  0.200E-03   60   3  18   18  14   0   20  14  16    0.000    0.000       0
+  1    151 00:01:54.25   0.7550A  -2.3844  -1.2453   1.7839  0.074  0.75  -0.987E+00     58.  0.132E+01  0.802E-01  0.253E-02  0.200E-03   60   3  18   18  14   0   20  14  16    0.000    0.000       0
+  1    152 00:01:55.01   0.7550A  -2.3845  -1.2494   1.7547  0.074  0.75  -0.992E+00     58.  0.132E+01  0.798E-01  0.251E-02  0.199E-03   60   3  18   17  14   0   20  14  16    0.000    0.000       0
+  1    153 00:01:55.76   0.7550A  -2.3846  -1.2523   1.7235  0.074  0.75  -0.100E+01     58.  0.132E+01  0.794E-01  0.250E-02  0.199E-03   60   3  17   17  14   0   20  14  16    0.000    0.000       0
+  1    154 00:01:56.52   0.7550A  -2.3846  -1.2479   1.6903  0.073  0.74  -0.105E+01     58.  0.132E+01  0.790E-01  0.250E-02  0.198E-03   60   3  17   15  12   4   20  14  16    0.000    0.000       0
+  1    155 00:01:57.27   0.7550A  -2.3847  -1.2462   1.6556  0.073  0.74  -0.104E+01     58.  0.132E+01  0.787E-01  0.249E-02  0.197E-03   60   9  17   15  12   4   20  14  16    0.000    0.000       0
+  1    156 00:01:58.03   0.7550A  -2.3848  -1.2408   1.6196  0.073  0.74  -0.104E+01     58.  0.132E+01  0.783E-01  0.248E-02  0.196E-03   60   9  17   14  10   4   20  14  16    0.000    0.000       0
+  1    157 00:01:58.78   0.7550A  -2.3849  -1.2635   1.5819  0.072  0.74  -0.111E+01     58.  0.132E+01  0.780E-01  0.247E-02  0.196E-03   60   9  16   15  11   4   20  14  16    0.000    0.000       0
+  1    158 00:01:59.54   0.7550A  -2.3849  -1.2827   1.5433  0.072  0.74  -0.102E+01     58.  0.132E+01  0.776E-01  0.247E-02  0.195E-03   60   9  16   14  10   4   22  14  16    0.000    0.000       0
+  1    159 00:02:00.29   0.7550A  -2.3850  -1.2973   1.5082  0.072  0.74  -0.102E+01     58.  0.132E+01  0.773E-01  0.246E-02  0.195E-03   60   9  15   14  10   4   21  14  16    0.000    0.000       0
+  1    160 00:02:01.05   0.7550A  -2.3851  -1.3035   1.5344  0.071  0.74  -0.101E+01     58.  0.131E+01  0.770E-01  0.246E-02  0.194E-03   60   8  14   14  10   4    6  14   2    0.000    0.000       0
+  1    161 00:02:01.80   0.7550A  -2.3852  -1.2995   1.5661  0.071  0.75  -0.101E+01     60.  0.131E+01  0.767E-01  0.245E-02  0.194E-03   60   8  13   14  10   4    7  14   2    0.000    0.000       0
+  1    162 00:02:02.56   0.7550A  -2.3853  -1.2959   1.6162  0.071  0.75  -0.101E+01     60.  0.131E+01  0.764E-01  0.245E-02  0.193E-03   60   8  13   14   9   4    7  14   2    0.000    0.000       0
+  1    163 00:02:03.31   0.7550A  -2.3853  -1.3113   1.6575  0.070  0.75  -0.101E+01     60.  0.131E+01  0.761E-01  0.244E-02  0.192E-03   60   8  12   14   9   4    7  14   2    0.000    0.000       0
+  1    164 00:02:04.07   0.7550A  -2.3854  -1.3115   1.6885  0.070  0.68  -0.102E+01     46.  0.131E+01  0.758E-01  0.242E-02  0.191E-03   60   7  11   14   9   4    7  14   2    0.000    0.000       0
+  1    165 00:02:04.82   0.7550A  -2.3855  -1.3016   1.7097  0.070  0.69  -0.103E+01     46.  0.131E+01  0.756E-01  0.241E-02  0.191E-03   60   7  11   15  10   4    7  14   2    0.000    0.000       0
+  1    166 00:02:05.58   0.7550A  -2.3856  -1.2824   1.7295  0.069  0.69  -0.107E+01     46.  0.131E+01  0.754E-01  0.240E-02  0.191E-03   60   7  10   15  10   4    8  14   2    0.000    0.000       0
+  1    167 00:02:06.33   0.7550A  -2.3856  -1.2684   1.7661  0.069  0.70  -0.104E+01     46.  0.131E+01  0.751E-01  0.239E-02  0.191E-03   60   7  10    8  14   5    8  14   2    0.000    0.000       0
+  1    168 00:02:07.09   0.7540A  -2.3857  -1.3015   1.7909  0.069  0.70  -0.102E+01     46.  0.131E+01  0.749E-01  0.238E-02  0.191E-03   60   7   9    8  14   5    8  14   2    0.000    0.000       0
+  1    169 00:02:07.84   0.7540A  -2.3858  -1.3252   1.8063  0.068  0.71  -0.102E+01     46.  0.131E+01  0.747E-01  0.236E-02  0.192E-03   60   7   9    8  14   5    8  14   2    0.000    0.000       0
+  1    170 00:02:08.59   0.7540A  -2.3858  -1.3400   1.8150  0.068  0.71  -0.101E+01     46.  0.131E+01  0.746E-01  0.234E-02  0.193E-03   60   6   8    8  14   5    8  14   2    0.000    0.000       0
+  1    171 00:02:09.35   0.7540A  -2.3859  -1.3469   1.8187  0.068  0.71  -0.101E+01     46.  0.131E+01  0.744E-01  0.232E-02  0.194E-03   60   6   7    8  14   5    8  14   2    0.000    0.000       0
+  1    172 00:02:10.10   0.7540A  -2.3860  -1.3476   1.8180  0.068  0.72  -0.101E+01     46.  0.131E+01  0.742E-01  0.230E-02  0.196E-03   60   6   7    8  14   5    8  14   2    0.000    0.000       0
+  1    173 00:02:10.86   0.7540A  -2.3861  -1.3440   1.8130  0.068  0.72  -0.101E+01     46.  0.130E+01  0.741E-01  0.229E-02  0.197E-03   60   6   7    8  14   5    8  14   2    0.000    0.000       0
+  1    174 00:02:11.61   0.7540A  -2.3861  -1.3381   1.8036  0.068  0.72  -0.101E+01     46.  0.130E+01  0.740E-01  0.227E-02  0.198E-03   60   6   6    8  14   5    8  14   2    0.000    0.000       0
+  1    175 00:02:12.36   0.7540A  -2.3862  -1.3321   1.7997  0.068  0.72  -0.101E+01     46.  0.130E+01  0.738E-01  0.225E-02  0.199E-03   60   6   6    8  14   5   12  14  17    0.000    0.000       0
+  1    176 00:02:13.12   0.7540A  -2.3863  -1.3283   1.8253  0.068  0.72  -0.102E+01     46.  0.130E+01  0.737E-01  0.224E-02  0.199E-03   60   5   5    8  14   5   12  14  17    0.000    0.000       0
+  1    177 00:02:13.87   0.7540A  -2.3863  -1.3551   1.8597  0.068  0.73  -0.103E+01     46.  0.130E+01  0.736E-01  0.223E-02  0.199E-03   60   5   4   13  11   4   13  14  17    0.000    0.000       0
+  1    178 00:02:14.63   0.7540A  -2.3864  -1.3705   1.8771  0.068  0.74  -0.103E+01     48.  0.130E+01  0.736E-01  0.221E-02  0.199E-03   60   5   4   13  11   4   13  14  17    0.000    0.000       0
+  1    179 00:02:15.38   0.7540A  -2.3865  -1.3545   1.9080  0.068  0.74  -0.101E+01     48.  0.130E+01  0.735E-01  0.220E-02  0.199E-03   60   5   4   13  11   4   14  14  17    0.000    0.000       0
+  1    180 00:02:16.13   0.7540A  -2.3865  -1.3690   1.9433  0.068  0.74  -0.101E+01     48.  0.130E+01  0.735E-01  0.219E-02  0.198E-03   60   5   4    8  14   5   13  14  16    0.000    0.000       0
+  1    181 00:02:16.89   0.7540A  -2.3866  -1.3922   1.9860  0.068  0.74  -0.999E+00     48.  0.130E+01  0.734E-01  0.217E-02  0.197E-03   60   5   3    8  14   5   14  14  16    0.000    0.000       0
+  1    182 00:02:17.64   0.7540A  -2.3867  -1.4187   2.0186  0.069  0.75  -0.993E+00     48.  0.130E+01  0.734E-01  0.216E-02  0.196E-03   60   5   3    7  14   5   15  14  16    0.000    0.000       0
+  1    183 00:02:18.40   0.7540A  -2.3868  -1.4489   2.0535  0.069  0.75  -0.989E+00     48.  0.130E+01  0.734E-01  0.215E-02  0.195E-03   60  12   3    7  14   5   15  14  16    0.000    0.000       0
+  1    184 00:02:19.15   0.7540A  -2.3868  -1.4716   2.0831  0.069  0.75  -0.986E+00     48.  0.130E+01  0.735E-01  0.215E-02  0.195E-03   60  11   2    7  14   5   16  14  16    0.000    0.000       0
+  1    185 00:02:19.90   0.7540A  -2.3869  -1.4855   2.0896  0.069  0.75  -0.984E+00     48.  0.130E+01  0.735E-01  0.215E-02  0.195E-03   60  11   2    7  14   5   16  14  16    0.000    0.000       0
+  1    186 00:02:20.66   0.7540A  -2.3870  -1.4913   2.1242  0.069  0.77  -0.983E+00     50.  0.130E+01  0.735E-01  0.215E-02  0.195E-03   60  11   1    7  14   5   17  14  16    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/urban_environment_restart/case_config.yml	(revision 3477)
@@ -0,0 +1,22 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+  - intel_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+
+activation_strings:
+  - "d3r"
+  - "restart"
+
+use_binary_files_from: urban_environment
+
+significant_digits_for_netcdf_checks:
+  timeseries: 6
+  profiles: 6
+  other: 8
Index: /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/INPUT/warm_air_bubble_with_bcm_p3d
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/INPUT/warm_air_bubble_with_bcm_p3d	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/INPUT/warm_air_bubble_with_bcm_p3d	(revision 3477)
@@ -0,0 +1,116 @@
+!-------------------------------------------------------------------------------
+!-- INITIALIZATION PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/inipar
+!-------------------------------------------------------------------------------
+&initialization_parameters
+!
+!-- grid parameters
+!-------------------------------------------------------------------------------
+    nx                         = 39, ! Number of gridboxes in x-direction (nx+1)
+    ny                         = 39, ! Number of gridboxes in y-direction (ny+1)
+    nz                         = 40, ! Number of gridboxes in z-direction (nz)
+
+    dx                         = 50.0, ! Size of single gridbox in x-direction
+    dy                         = 50.0, ! Size of single gridbox in y-direction
+    dz                         = 50.0, ! Size of single gridbox in z-direction
+
+    dz_stretch_level           = 1000.0, ! Height (in m) where stretching starts
+    dz_stretch_factor          = 1.08,   ! dz(k+1) = dz(k) * dz_stretch_factor
+
+!
+!-- initialization and vertical profiles
+!-------------------------------------------------------------------------------
+    initializing_actions       = 'set_constant_profiles initialize_bubble',
+                                         ! initial conditions (with warm air bubble)
+
+    ug_surface                 = 0.0,    ! u-comp of geostrophic wind at surface
+    surface_pressure           = 1015.4, ! surface pressure
+
+    pt_surface                 = 297.9,            ! temperature at surface
+    pt_vertical_gradient       = 0.0, 0.585,       ! vertical gradient of temperature
+    pt_vertical_gradient_level = 0.0, 740.0,       ! height level of temp gradients
+
+    q_surface                  = 0.016,                         ! mixing ratio at surface
+    q_vertical_gradient        = -2.97E-4, -4.52E-4, -8.1E-5,   ! gradient for mix. ratio
+    q_vertical_gradient_level  = 0.0, 740.0, 3260.0,            ! height lev. for gradients
+
+    humidity                   = .TRUE.,     ! prog. equation for total water mixing ratio
+
+!
+!-- numerics
+!-------------------------------------------------------------------------------
+    fft_method                 = 'temperton-algorithm',   ! build-in fft method
+
+/ ! end of initialization parameter namelist
+
+
+!-------------------------------------------------------------------------------
+!-- RUNTIME PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/d3par
+!-------------------------------------------------------------------------------
+&runtime_parameters
+!
+!-- run steering
+!-------------------------------------------------------------------------------
+    end_time                   = 1200.0, ! simulation time of the 3D model
+
+    create_disturbances        = .TRUE., ! randomly perturbate horiz. velocity
+    dt_disturb                 = 150.0,  ! interval for random perturbations
+    disturbance_energy_limit   = 0.01,   ! upper limit for perturbation energy
+
+    data_output_2d_on_each_pe  = .FALSE., ! don't do 2D output on each MPI rank
+
+!
+!-- data output
+!-------------------------------------------------------------------------------
+    netcdf_data_format         = 2, ! use NetCDF3
+    dt_run_control             = 0.0,    ! output interval for run control
+    dt_data_output             = 400.0,  ! output interval for general data
+    dt_dopr                    = 400.0,  ! output interval for profile data
+
+    data_output                = 'w_xy',
+                                 'w_xz',
+                                 'theta_xy',
+                                 'theta_xz',
+                                 'ql_yz',
+                                 'qr_yz',
+                                 'nr_yz',
+                                 'w_yz',
+                                 'u_yz',
+                                 'v_yz',
+
+    data_output_pr             = 'u',
+                                 'v',
+                                 'ql',
+                                 '#theta',
+                                 'w"theta"',
+                                 'w*theta*',
+                                 'wtheta',
+                                 'w*2',
+
+    section_xy                 = 2, 10,  ! grid index for 2D XY cross sections
+    section_xz                 = 20,     ! grid index for 2D XZ cross sections
+    section_yz                 = -1, 10, ! grid index for 2D YZ cross sections
+
+    averaging_interval_pr      = 100.0, ! averaging interval profile data
+    dt_averaging_input_pr      = 10.0,  ! averaging profile data sampling rate
+
+/ ! end of runtime parameter namelist
+
+
+!-------------------------------------------------------------------------------
+!-- BULK CLOUD PARAMETER NAMELIST
+!   Documentation: https://palm.muk.uni-hannover.de/trac/wiki/doc/app/bcmpar
+!-------------------------------------------------------------------------------
+&bulk_cloud_parameters
+
+    bulk_cloud_model          = .TRUE.,           ! enable bulk cloud model
+    cloud_scheme              = 'seifert_beheng', ! two-moment liquid water microphysics
+                                                  ! including autoconversion,
+                                                  ! accretion, sedimentation, precipitation
+    collision_turbulence              = .TRUE.,   ! parametize turbulence effects for collision
+    cloud_water_sedimentation         = .TRUE.,   ! enable cloud water sedimentation
+
+    call_microphysics_at_all_substeps = .TRUE.,   ! microphysics every timestep
+
+/ ! end of bulk cloud parameter namelist
Index: /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/MONITORING/warm_air_bubble_with_bcm_rc
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/MONITORING/warm_air_bubble_with_bcm_rc	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/MONITORING/warm_air_bubble_with_bcm_rc	(revision 3477)
@@ -0,0 +1,410 @@
+
+ ******************************    --------------------------------------------
+ * PALM 5.0  Rev: 3447        *    atmosphere - run without 1D - prerun
+ ******************************    --------------------------------------------
+
+ Date:                 29-10-18    Run:       warm_air_bubble_with_bcm__gfortran
+ Time:                 17:37:46    Run-No.:   00
+ Run on host:        gfortran_d
+ Number of PEs:               4    Processor grid (x,y): (   2,   2) calculated
+ ------------------------------------------------------------------------------
+
+ Numerical Schemes:
+ -----------------
+
+ --> Use the Moeng_Wyngaard turbulence closure (LES mode).
+ --> Use the boussinesq approximation for the model equations.
+ --> Solve perturbation pressure via FFT using temperton-algorithm routines
+     perturbation pressure is calculated at every Runge-Kutta step
+ --> Momentum advection via Wicker-Skamarock-Scheme 5th order
+ --> Scalar advection via Wicker-Skamarock-Scheme 5th order
+ --> Loop optimization method: cache
+ --> Time differencing scheme: runge-kutta-3       
+ --> Additional prognostic equation for the total water content
+ --> Additional prognostic equation for a passive scalar
+ ------------------------------------------------------------------------------
+
+
+ Run time and time step information:
+ ----------------------------------
+
+ Timestep:             variable     maximum value: 20.000 s    CFL-factor: 0.90
+ Start time:              0.000 s
+ End time:             1200.000 s
+
+
+ Computational grid and domain size:
+ ----------------------------------
+
+ Grid length:      dx =      50.000 m    dy =      50.000 m
+                dz(1) =      50.000 m
+                dz(2) =     999.000 m
+
+ Domain size:       x =   2000.000 m     y =   2000.000 m  z(u) =   3697.838 m
+
+ Vertical stretching starts at height:     975.0 m,
+ Vertical stretching starts at index:           20,
+ Vertical stretching ends at height:   9999999.9 m,
+ Vertical stretching ends at index:             41,
+ Factor used for stretching:                 1.080,
+
+ Number of gridpoints (x,y,z):  (0:  39, 0:  39, 0:  41)
+ Subdomain size (x,y,z):        (    20,     20,     42)
+
+
+    Characteristic levels of the geo. wind component ug:
+
+       Height:         0.0     0.0  m
+       ug:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+    Characteristic levels of the geo. wind component vg:
+
+       Height:         0.0     0.0  m
+       vg:            0.00    0.00  m/s
+       Gradient:    ------    0.00  1/100s
+       Gridpoint:        0       0
+
+
+ Topography information:
+ ----------------------
+
+ Topography: flat                                    
+
+
+ Boundary conditions:
+ -------------------
+
+                     p                    uv                                  pt
+
+ B. bound.: p(0)     = p(1)   | uv(0)     = -uv(1)                | pt(0)     = pt_surface       
+ T. bound.: p(nzt+1) = 0      | uv(nzt+1) = ug(nzt+1), vg(nzt+1)  | pt(nzt+1) = pt(nzt) + dpt/dz_
+
+                     e
+
+ B. bound.: e(0)     = e(1)                                                                      
+ T. bound.: e(nzt+1) = e(nzt) = e(nzt-1)                                                         
+
+                     q
+
+ B. bound.: q(0)     = q_surface                                                                 
+ T. bound.: q(nzt+1) = q(nzt) + dq/dz                                                            
+
+                     s
+
+ B. bound.: s(0)      = s(1)                                                                     
+ T. bound.: s(nzt+1) = s(nzt) + ds/dz                                                            
+
+ Bottom surface fluxes are used in diffusion terms at k=1
+       Predefined constant scalar flux:  0.200E-02 kg/(m**2 s)
+
+
+    Constant flux layer between bottom surface and first computational u,v-level:
+
+       z_mo =  25.00 m   z0 = 0.1000 m   z0h = 0.10000 m   kappa = 0.40
+       Rif value range:     -20.00 <= rif <= 20.00
+       Predefined surface temperature
+       Predefined surface humidity
+
+
+ Lateral boundaries:
+       left/right:  cyclic              
+       north/south: cyclic              
+
+
+ Initial profiles:
+ ----------------
+
+    Characteristic levels of the initial temperature profile:
+
+       Height:           0.0     0.0   740.0  m
+       Temperature:   297.90  297.90  297.90  K
+       Gradient:      ------    0.00    0.58  K/100m
+       Gridpoint:          0       0      15
+
+    Characteristic levels of the initial humidity profile:
+
+       Height:           0.0       0.0     740.0    3260.0  m
+       Humidity:     0.2E-01   0.2E-01   0.1E-01   0.3E-02  kg/kg
+       Gradient:    --------  -0.3E-03  -0.5E-03  -0.8E-04  (kg/kg)/100m
+       Gridpoint:          0         0        15        39
+
+    Characteristic levels of the initial scalar profile:
+
+       Height:                       0.0       0.0  m
+       Scalar concentration:     0.8E-03   0.8E-03  kg/m**3
+       Gradient:                --------   0.0E+00  (kg/m**3)/100m
+       Gridpoint:                      0         0
+
+
+ List output:
+ -----------
+
+    1D-Profiles:
+       Output every             9999999.90 s
+       Time averaged over         100.00 s
+       Averaging input every       10.00 s
+
+
+ Data output:
+ -----------
+
+       Time averaged over         100.00 s
+       Averaging input every       10.00 s
+
+    1D-Profiles:
+       Output format: netCDF 64bit offset                     
+
+
+       Profile: u, v, w, ql, theta, w"theta", w*theta*, wtheta, w*2,         
+
+              : theta*2,                                                     
+       Output every               400.00 s
+       Time averaged over         100.00 s
+       Averaging input every       10.00 s
+
+    2D-Arrays:
+       Output format: netCDF 64bit offset                     
+
+
+       XY-cross-section  Arrays:  w, theta,                                                            
+       Output every               400.00 s  
+       Cross sections at k = /2/10/
+       scalar-coordinates:   /75.0/475.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+       XZ-cross-section  Arrays:  w, theta,                                                            
+       Output every               400.00 s  
+       Cross sections at j = /20/
+       scalar-coordinates:   /1000.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+       YZ-cross-section  Arrays:  ql, qr, nr, w, u, v, s,                                              
+       Output every               400.00 s  
+       Cross sections at i = /-1/10/
+       scalar-coordinates:   /-50.0/500.0/ m
+
+
+       Number of output time levels allowed: unlimited
+
+
+    Time series:
+       Output format: netCDF 64bit offset                     
+
+       Output every                 0.00 s
+
+ ------------------------------------------------------------------------------
+
+
+ Physical quantities:
+ -------------------
+
+    Geograph. latitude  :   latitude  = 55.0 degr
+    Geograph. longitude :   longitude =  0.0 degr
+    Angular velocity    :   omega  = 0.729E-04 rad/s
+    Coriolis parameter  :   f      =  0.000119 1/s
+                            f*     =  0.000084 1/s
+
+    Day of the year at model start :   day_init      =       0
+    UTC time at model start        :   time_utc_init = 43200.0 s
+
+    Gravity             :   g      =  9.8 m/s**2
+
+    Reference state used in buoyancy terms: initial_profile
+
+
+ Bulk cloud module information:
+ ------------------------------------------
+
+--> Bulk scheme with liquid water potential temperature and
+    total water content is used.
+--> Condensation is parameterized via 0% - or 100% scheme.
+--> Precipitation parameterization via Seifert-Beheng-Scheme
+--> Cloud water sedimentation parameterization via Stokes law
+--> Turbulence effects on precipitation process
+--> Ventilation effects on evaporation of rain drops
+--> Slope limiter used for sedimentation process
+--> Essential parameters:
+       Surface pressure             :   p_0   = 1015.40 hPa
+       Gas constant                 :   R     = 287.0 J/(kg K)
+       Density of air               :   rho_0 =  1.182 kg/m**3
+       Specific heat cap.           :   c_p   = 1005.0 J/(kg K)
+       Vapourization heat           :   L_v   =  0.25E+07 J/kg
+       Droplet density              :   N_c   =   70.0 1/cm**3
+       Sedimentation Courant number :   C_s   =  2.0
+
+
+ Cloud physics quantities / methods:
+ ----------------------------------
+
+
+
+ LES / Turbulence quantities:
+ ---------------------------
+
+    Mixing length is limited to 1.80 * z
+
+
+ Actions during the simulation:
+ -----------------------------
+
+    Disturbance impulse (u,v) every :   150.00 s
+    Disturbance amplitude           :     0.25 m/s
+    Lower disturbance level         :   125.00 m (GP    3)
+    Upper disturbance level         :   625.00 m (GP   13)
+    Disturbances cease as soon as the disturbance energy exceeds 0.010 m**2/s**2
+    Random number generator used    : random-parallel
+
+
+
+ *** no user-defined variables found
+
+ ------------------------------------------------------------------------------
+
+
+
+Run-control output:
+------------------
+
+RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD     DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MGCYC
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+  0      0 00:00:00.00   9.3300A  -0.2131D -0.2288D  0.1182  0.000  0.00   0.000E+00     50.  0.104E-02  0.103E-02  0.602E-03  0.874E-13    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      1 00:00:09.33   9.3300A  -0.2129  -0.2321   0.1220  0.001  0.00   0.135E-02      0.  0.106E-02  0.105E-02  0.595E-05  0.393E-15    7   7  11   11   7  19    5  26   7    0.000    0.000       0
+  0      2 00:00:18.66   9.3300A  -0.2127  -0.2362   0.1309  0.001  0.00   0.899E-03      0.  0.113E-02  0.113E-02  0.132E-04  0.779E-15    7   7  11   11   7  19    8  18  17    0.000    0.000       0
+  0      3 00:00:27.99   9.3300A  -0.2126  -0.2400   0.1466  0.001  0.00   0.616E-03      0.  0.127E-02  0.126E-02  0.132E-04  0.781E-15    7   7  11   11   7  19    8  18  17    0.000    0.000       0
+  0      4 00:00:37.32   9.3300A  -0.2124  -0.2438   0.1625  0.002  0.00   0.542E-03      0.  0.146E-02  0.145E-02  0.132E-04  0.785E-15    7   7  11   11   7  19    8  18  17    0.000    0.000       0
+  0      5 00:00:46.64   9.3300A  -0.2122  -0.2474   0.1815  0.002  0.00   0.554E-03      0.  0.171E-02  0.171E-02  0.132E-04  0.790E-15    7   7  11   11   7  19    4  18  38    0.000    0.000       0
+  0      6 00:00:55.97   9.3300A  -0.2120  -0.2508   0.2021  0.003  0.00   0.557E-03      0.  0.202E-02  0.202E-02  0.132E-04  0.796E-15    7   7  11   11   7  19    4  18  38    0.000    0.000       0
+  0      7 00:01:05.31   9.3300A  -0.2118   0.2635   0.2228  0.003  0.00   0.590E-03      0.  0.240E-02  0.239E-02  0.133E-04  0.803E-15    7   7  11    1  14   1    4  18  38    0.000    0.000       0
+  0      8 00:01:14.64   9.3300A  -0.2115   0.2998   0.2437  0.004  0.00   0.646E-03      0.  0.284E-02  0.283E-02  0.133E-04  0.813E-15    7   7  11    1  14   1    4  19  38    0.000    0.000       0
+  0      9 00:01:23.96   9.3300A  -0.2111   0.3362   0.2694  0.004  0.00   0.715E-03      0.  0.334E-02  0.333E-02  0.133E-04  0.823E-15    7   7  11    1  14   1    6  20  19    0.000    0.000       0
+  0     10 00:01:33.29   9.3300A  -0.2106   0.3725   0.2969  0.005  0.00   0.793E-03      0.  0.391E-02  0.390E-02  0.134E-04  0.836E-15    7   7  11    1  14   1    6  20  19    0.000    0.000       0
+  0     11 00:01:42.62   9.3300A  -0.2099   0.4089   0.3251  0.006  0.00   0.877E-03      0.  0.455E-02  0.454E-02  0.135E-04  0.850E-15    7   7  11    1  14   1    6  20  19    0.000    0.000       0
+  0     12 00:01:51.95   9.3300A  -0.2092   0.4453   0.3539  0.007  0.00   0.966E-03      0.  0.525E-02  0.525E-02  0.135E-04  0.866E-15    7   7  11    1  14   1    6  20  19    0.000    0.000       0
+  0     13 00:02:01.28   9.3300A  -0.2083   0.4817   0.3835  0.008  0.00   0.106E-02      0.  0.604E-02  0.603E-02  0.136E-04  0.884E-15    7   7  11    1  14   1    6  20  19    0.000    0.000       0
+  0     14 00:02:10.62   9.3300A  -0.2072   0.5180   0.4137  0.009  0.00   0.115E-02      0.  0.690E-02  0.689E-02  0.137E-04  0.904E-15    7   7  11    1  14   1    6  20  19    0.000    0.000       0
+  0     15 00:02:19.95   9.3300A  -0.2059  -0.5542   0.4446  0.010  0.00   0.125E-02      0.  0.784E-02  0.784E-02  0.138E-04  0.927E-15    7   7  11    1  27   3    6  20  19    0.000    0.000       0
+  0     16 00:02:29.28   9.3300A  -0.2043  -0.5909   0.4761  0.011  0.00   0.134E-02      0.  0.887E-02  0.886E-02  0.139E-04  0.952E-15    7   7  11    1  27   2    6  20  19    0.000    0.000       0
+  0     17 00:02:38.61   9.3300A   0.3315D -0.6385D  0.5737  0.013  0.00   0.143E-02      0.  0.111E-01  0.111E-01  0.594E-03  0.863E-13   10   3  39    1  27   3    5  21  11    0.000    0.000       0
+  0     18 00:02:47.94   9.3300A   0.3303  -0.6742   0.6046  0.014  0.00   0.152E-02      0.  0.123E-01  0.123E-01  0.148E-04  0.110E-14   10   3  39    1  27   3    5  21  11    0.000    0.000       0
+  0     19 00:02:57.27   9.3300A   0.3286  -0.7096   0.6351  0.016  0.00   0.162E-02      0.  0.136E-01  0.136E-01  0.149E-04  0.113E-14   10   3  39    1  27   3    5  21  11    0.000    0.000       0
+  0     20 00:03:06.60   9.3300A   0.3266  -0.7455   0.6652  0.017  0.00   0.171E-02      0.  0.150E-01  0.150E-01  0.151E-04  0.116E-14   10   3  39    1  28  18    5  21  11    0.000    0.000       0
+  0     21 00:03:15.93   9.3300A   0.3241  -0.7810   0.6949  0.019  0.00   0.180E-02      0.  0.165E-01  0.165E-01  0.153E-04  0.120E-14   10   3  39    1  27   2    5  21  11    0.000    0.000       0
+  0     22 00:03:25.26   9.3300A   0.3212  -0.8181   0.7239  0.020  0.00   0.188E-02      0.  0.182E-01  0.181E-01  0.155E-04  0.124E-14   10   3  39    1  27  18    5  21  11    0.000    0.000       0
+  0     23 00:03:34.59   9.3300A   0.3179  -0.8575   0.7522  0.022  0.00   0.196E-02      0.  0.199E-01  0.199E-01  0.158E-04  0.128E-14   10   3  39    1  27  18    5  21  11    0.000    0.000       0
+  0     24 00:03:43.92   9.3300A   0.3143  -0.8965   0.7800  0.024  0.00   0.203E-02      0.  0.218E-01  0.218E-01  0.161E-04  0.134E-14   10   3  39    1  27  18    6  20  19    0.000    0.000       0
+  0     25 00:03:53.25   9.3300A   0.3103  -0.9349   0.8134  0.026  0.00   0.209E-02      0.  0.238E-01  0.238E-01  0.164E-04  0.139E-14   10   3  39    1  27  18    6  20  19    0.000    0.000       0
+  0     26 00:04:02.58   9.3300A   0.3061  -0.9726   0.8508  0.028  0.00   0.214E-02      0.  0.260E-01  0.259E-01  0.168E-04  0.145E-14   10   3  39    1  27  18    6  20  11    0.000    0.000       0
+  0     27 00:04:11.91   9.3300A   0.3016  -1.0094   0.8974  0.029  0.00   0.219E-02      0.  0.283E-01  0.283E-01  0.172E-04  0.152E-14   10   3  39    1  27  18    6  21  11    0.000    0.000       0
+  0     28 00:04:21.24   9.3300A   0.2968  -1.0450   0.9444  0.031  0.00   0.223E-02      0.  0.307E-01  0.307E-01  0.177E-04  0.160E-14   10   3  39    1  27  18    6  21  11    0.000    0.000       0
+  0     29 00:04:30.57   9.3300A   0.2917  -1.0805   0.9891  0.033  0.00   0.226E-02      0.  0.334E-01  0.334E-01  0.182E-04  0.168E-14   10   3  39    1  27  17    6  21  11    0.000    0.000       0
+  0     30 00:04:39.90   9.3300A  -0.2907  -1.1154   1.0313  0.035  0.00   0.228E-02      0.  0.362E-01  0.362E-01  0.187E-04  0.177E-14    9   4  18    1  27  17    6  21  11    0.000    0.000       0
+  0     31 00:04:49.23   9.3300A  -0.2895  -1.1489   1.0709  0.037  0.00   0.230E-02      0.  0.393E-01  0.392E-01  0.193E-04  0.186E-14    9   4  18    1  27  17    6  21  11    0.000    0.000       0
+  0     32 00:04:58.56   9.3300A  -0.2876  -1.1810   1.1081  0.039  0.00   0.231E-02      0.  0.425E-01  0.425E-01  0.200E-04  0.196E-14    9   4  18    1  27  17    6  21  11    0.000    0.000       0
+  0     33 00:05:07.89   9.3300A  -0.2851  -1.2123   1.1615  0.040  0.00   0.232E-02      0.  0.459E-01  0.459E-01  0.206E-04  0.207E-14    9   4  18    1  26  18    6  20   3    0.000    0.000       0
+  0     34 00:05:17.22   9.3300A  -0.2817  -1.2467   1.2153  0.042  0.00   0.231E-02      0.  0.496E-01  0.496E-01  0.214E-04  0.219E-14    9   4  18    1  26  17    6  20   3    0.000    0.000       0
+  0     35 00:05:26.55   9.3300A  -0.2775  -1.2804   1.2675  0.044  0.00   0.231E-02      0.  0.536E-01  0.535E-01  0.221E-04  0.231E-14    9   4  18    1  26  17    6  20   3    0.000    0.000       0
+  0     36 00:05:35.88   9.3300A  -0.2723  -1.3124   1.3181  0.046  0.00   0.230E-02      0.  0.577E-01  0.577E-01  0.230E-04  0.244E-14    9   4  18    1  26  17    6  20   3    0.000    0.000       0
+  0     37 00:05:45.21   9.3300A  -0.2661  -1.3427   1.3681  0.047  0.00   0.229E-02      0.  0.622E-01  0.622E-01  0.239E-04  0.258E-14    9   4  18    1  26  17    6  20  15    0.000    0.000       0
+  0     38 00:05:54.54   9.3300A  -0.2587  -1.3711   1.4267  0.049  0.00   0.227E-02      0.  0.669E-01  0.669E-01  0.248E-04  0.272E-14    9   4  18    1  26  17    6  20  13    0.000    0.000       0
+  0     39 00:06:03.87   9.3300A  -0.2502  -1.3976   1.4841  0.051  0.00   0.223E-02      0.  0.720E-01  0.720E-01  0.258E-04  0.288E-14    9   4  18    1  26  17    6  20  13    0.000    0.000       0
+  0     40 00:06:13.19   9.3300A   0.2459   1.4251   1.5386  0.052  0.00   0.219E-02      0.  0.773E-01  0.773E-01  0.268E-04  0.304E-14    9   3  39    1  15  28    6  20  13    0.000    0.000       0
+  0     41 00:06:22.52   9.3300A  -0.2510   1.4532   1.5989  0.054  0.00   0.215E-02      0.  0.830E-01  0.830E-01  0.279E-04  0.321E-14   11  22   1    1  15  28    6  20   7    0.000    0.000       0
+  0     42 00:06:31.85   9.3300A  -0.2622  -1.4828   1.6718  0.056  0.00   0.210E-02      0.  0.890E-01  0.890E-01  0.291E-04  0.339E-14   11  22   1    1  26  26    6  20   7    0.000    0.000       0
+  0     43 00:06:41.18   9.3300A  -0.2673  -1.5114   1.7381  0.057  0.00   0.205E-02      0.  0.954E-01  0.954E-01  0.303E-04  0.358E-14   11  22   1    1  26  26    6  20   7    0.000    0.000       0
+  0     44 00:06:50.51   9.3300A  -0.2641  -1.5383   1.7992  0.058  0.00   0.200E-02      0.  0.102E+00  0.102E+00  0.316E-04  0.378E-14   11  22   1    1  26  26    6  20   7    0.000    0.000       0
+  0     45 00:06:59.84   9.3300A  -0.2702  -1.5632   1.8644  0.060  0.00   0.195E-02      0.  0.109E+00  0.109E+00  0.330E-04  0.399E-14   12  22   1    1  26  26    6  20   5    0.000    0.000       0
+  0     46 00:07:09.17   9.3300A  -0.2912  -1.5857   1.9380  0.061  0.00   0.190E-02      0.  0.117E+00  0.117E+00  0.344E-04  0.421E-14   12  22   1    1  26  26    6  20  20    0.000    0.000       0
+  0     47 00:07:18.50   9.3300A  -0.3035   1.6113   2.0122  0.062  0.00   0.185E-02      0.  0.125E+00  0.125E+00  0.359E-04  0.444E-14   12  22   1    1  14  33    6  20  20    0.000    0.000       0
+  0     48 00:07:27.83   9.3300A  -0.3042   1.6368   2.0851  0.064  0.00   0.180E-02      0.  0.133E+00  0.133E+00  0.374E-04  0.469E-14   12  22   1    1  14  33    6  20  19    0.000    0.000       0
+  0     49 00:07:37.16   9.3300A  -0.3178   1.6594   2.1608  0.065  0.00   0.175E-02      0.  0.142E+00  0.142E+00  0.391E-04  0.494E-14   12  23   1    1  14  33    6  20  19    0.000    0.000       0
+  0     50 00:07:46.49   9.3300A  -0.3181   1.6812   2.2449  0.066  0.00   0.170E-02      0.  0.151E+00  0.151E+00  0.409E-04  0.520E-14   12  23   1    1  15  33    7  20  20    0.000    0.000       0
+  0     51 00:07:55.82   9.3300A   0.3227   1.7035   2.3292  0.067  0.00   0.165E-02      0.  0.161E+00  0.161E+00  0.427E-04  0.548E-14   12  17  38    1  15  33    7  20  20    0.000    0.000       0
+  0     52 00:08:05.15   9.3300A   0.3362   1.7227   2.4194  0.068  0.00   0.160E-02      0.  0.171E+00  0.171E+00  0.446E-04  0.576E-14   12  17  38    1  15  33    7  20  24    0.000    0.000       0
+  0     53 00:08:14.48   9.3300A   0.3245   1.7384   2.5090  0.069  0.00   0.156E-02      0.  0.182E+00  0.182E+00  0.467E-04  0.606E-14   12  17  38    1  15  33    7  20  24    0.000    0.000       0
+  0     54 00:08:23.81   9.3300A   0.3470   1.7543   2.6011  0.070  0.00   0.152E-02      0.  0.193E+00  0.193E+00  0.488E-04  0.637E-14   12  16  38    1  15  17    7  20  19    0.000    0.000       0
+  0     55 00:08:33.14   9.3300A   0.3469   1.7725   2.6978  0.071  0.00   0.147E-02      0.  0.205E+00  0.204E+00  0.510E-04  0.669E-14   12  16  38    1  15  17    7  20  28    0.000    0.000       0
+  0     56 00:08:42.47   9.3300A   0.3528   1.7880   2.7912  0.071  0.00   0.143E-02      0.  0.217E+00  0.217E+00  0.534E-04  0.701E-14   13  17  38    1  15  17    7  20  27    0.000    0.000       0
+  0     57 00:08:51.80   9.3300A   0.3726   1.8005   2.8814  0.072  0.00   0.139E-02      0.  0.229E+00  0.229E+00  0.559E-04  0.735E-14   13  16  38    1  15  17    7  20  27    0.000    0.000       0
+  0     58 00:09:01.13   9.3300A   0.4129   1.8099   2.9661  0.073  0.00   0.136E-02      0.  0.242E+00  0.242E+00  0.585E-04  0.770E-14   13  16  38    1  15  17    7  20  27    0.000    0.000       0
+  0     59 00:09:10.46   9.3300A   0.4214   1.8162   3.0658  0.073  0.00   0.132E-02      0.  0.255E+00  0.255E+00  0.611E-04  0.806E-14   13  16  38    1  15  17    8  20  27    0.000    0.000       0
+  0     60 00:09:19.79   9.3300A  -0.4190  -1.8216   3.1611  0.074  0.00   0.129E-02      0.  0.269E+00  0.269E+00  0.638E-04  0.843E-14   13  16   3    1  27   9    8  20  27    0.000    0.000       0
+  0     61 00:09:29.12   9.3300A   0.4565  -1.8325   3.2541  0.075  0.00   0.125E-02      0.  0.283E+00  0.283E+00  0.665E-04  0.880E-14   13  15  38    1  27   9    8  20  26    0.000    0.000       0
+  0     62 00:09:38.46   9.3300A   0.4686  -1.8404   3.3368  0.075  0.00   0.122E-02      0.  0.298E+00  0.298E+00  0.693E-04  0.919E-14   13  15  38    1  27   9    8  20  26    0.000    0.000       0
+  0     63 00:09:47.79   9.3300A  -0.4989   1.8560   3.4090  0.075  0.00   0.119E-02      0.  0.313E+00  0.313E+00  0.722E-04  0.960E-14   17  19  25   15  27  32    8  20  26    0.000    0.000       0
+  0     64 00:09:57.12   9.3300A   0.5280   1.8975   3.4958  0.076  0.00   0.117E-02      0.  0.329E+00  0.329E+00  0.753E-04  0.100E-13   15  19  25   15  27  32    9  20  26    0.000    0.000       0
+  0     65 00:10:06.45   9.3300A   0.5893  -1.9818   3.5752  0.076  0.00   0.114E-02      0.  0.345E+00  0.345E+00  0.786E-04  0.105E-13   15  18  25   16  14   1    9  20  26    0.000    0.000       0
+  0     66 00:10:15.78   9.3300A  -0.6300  -2.0295   3.6433  0.076  0.00   0.111E-02      0.  0.362E+00  0.362E+00  0.819E-04  0.110E-13   18  19  25   16  14   1    9  20  26    0.000    0.000       0
+  0     67 00:10:25.11   9.3300A  -0.7243   2.0691   3.7013  0.076  0.00   0.108E-02      0.  0.379E+00  0.379E+00  0.853E-04  0.114E-13   18  19  25   15  28  32    9  20  26    0.000    0.000       0
+  0     68 00:10:34.44   9.3300A  -0.7791   2.1211   3.7607  0.077  0.00   0.106E-02      0.  0.397E+00  0.397E+00  0.888E-04  0.119E-13   18  18  25   16  27   7   10  20  26    0.000    0.000       0
+  0     69 00:10:43.77   9.3300A   0.8319   2.1565   3.8227  0.077  0.00   0.104E-02      0.  0.416E+00  0.416E+00  0.924E-04  0.125E-13   16  18  25   16  27   7   10  20  26    0.000    0.000       0
+  0     70 00:10:53.10   9.3300A   0.8993   2.1567   3.8803  0.077  0.00   0.102E-02      0.  0.436E+00  0.436E+00  0.962E-04  0.130E-13   16  18  25   16  28  33   10  20  27    0.000    0.000       0
+  0     71 00:11:02.43   9.3300A  -0.9883   2.2131   3.9336  0.077  0.00   0.996E-03      0.  0.456E+00  0.456E+00  0.100E-03  0.135E-13   19  19  25   16  28   7   10  20  27    0.000    0.000       0
+  0     72 00:11:11.76   9.3300A  -1.0754   2.2413   3.9787  0.077  0.00   0.973E-03      0.  0.476E+00  0.476E+00  0.104E-03  0.141E-13   19  18  25   16  28   7   10  20  12    0.000    0.000       0
+  0     73 00:11:21.09   9.3300A  -1.1211   2.2267   4.0289  0.077  0.00   0.952E-03      0.  0.497E+00  0.497E+00  0.108E-03  0.146E-13   19  17  25   16  28   8   10  20  12    0.000    0.000       0
+  0     74 00:11:30.42   9.3300A  -1.1399   2.2251   4.0855  0.077  0.00   0.933E-03      0.  0.518E+00  0.518E+00  0.113E-03  0.152E-13   19  17  25   17  28   7   11  20  12    0.000    0.000       0
+  0     75 00:11:39.75   9.3300A  -1.2637   2.2921   4.1403  0.076  0.00   0.915E-03      0.  0.540E+00  0.540E+00  0.117E-03  0.158E-13   20  19  25   17  28   7   11  20  12    0.000    0.000       0
+  0     76 00:11:49.08   9.3300A  -1.3590   2.2716   4.1876  0.076  0.00   0.898E-03      0.  0.561E+00  0.561E+00  0.122E-03  0.165E-13   20  18  25   17  28   7   11  20  12    0.000    0.000       0
+  0     77 00:11:58.41   9.3300A   1.4099  -2.2133   4.2264  0.076  0.00   0.882E-03      0.  0.583E+00  0.583E+00  0.127E-03  0.171E-13   17  19  24   16  13   9   11  20  12    0.000    0.000       0
+  0     78 00:12:07.74   9.3300A   1.4474  -2.2065   4.2626  0.076  0.00   0.866E-03      0.  0.604E+00  0.604E+00  0.133E-03  0.178E-13   17  22  24   16  13   9   12  20  12    0.000    0.000       0
+  0     79 00:12:17.07   9.3300A   1.5750   2.2539   4.3005  0.075  0.00   0.852E-03      0.  0.625E+00  0.624E+00  0.138E-03  0.185E-13   18  20  24   18  28   6   12  20  12    0.000    0.000       0
+  0     80 00:12:26.40   9.3300A   1.7695  -2.2371   4.3598  0.075  0.00   0.841E-03      0.  0.645E+00  0.644E+00  0.144E-03  0.192E-13   18  20  24   19  15   0   18  20  25    0.000    0.000       0
+  0     81 00:12:35.73   9.3300A   1.8694  -2.2893   4.5033  0.074  0.00   0.860E-03      0.  0.664E+00  0.664E+00  0.149E-03  0.198E-13   18  21  24   19  14   0   19  20  25    0.000    0.000       0
+  0     82 00:12:45.06   9.3300A   1.9269  -2.3759   4.6856  0.074  0.00   0.817E-03      0.  0.682E+00  0.682E+00  0.155E-03  0.205E-13   18  21  24   19  14   0   19  20  25    0.000    0.000       0
+  0     83 00:12:54.39   9.3100A   2.0064  -2.3640   4.8343  0.073  0.00   0.802E-03      0.  0.698E+00  0.698E+00  0.160E-03  0.211E-13   18  22  24   19  14   0   19  20  25    0.000    0.000       0
+  0     84 00:13:03.70   9.1200A   2.0816  -2.3834   4.9351  0.073  0.00   0.795E-03      0.  0.713E+00  0.713E+00  0.164E-03  0.217E-13   19  20  24   20  14   0   19  20  25    0.000    0.000       0
+  0     85 00:13:12.82   9.0300A   2.1733  -2.5009   4.9836  0.072  0.00   0.811E-03      0.  0.727E+00  0.726E+00  0.165E-03  0.218E-13   19  21  24   20  14   0   20  20  25    0.000    0.000       0
+  0     86 00:13:21.85   8.8800A   2.2666  -2.5280   5.0669  0.072  0.00   0.851E-03      0.  0.738E+00  0.738E+00  0.168E-03  0.221E-13   19  21  24   20  14   0   20  20  25    0.000    0.000       0
+  0     87 00:13:30.73   8.7400A  -2.2556   2.5637   5.2414  0.071  0.00   0.917E-03      0.  0.747E+00  0.747E+00  0.168E-03  0.222E-13   20  23  30   18  24  21   22  20  12    0.000    0.000       0
+  0     88 00:13:39.47   8.5800A   2.2885  -2.5565   5.3957  0.070  0.00   0.960E-03      0.  0.754E+00  0.754E+00  0.169E-03  0.223E-13   19  18  25   20  13   0   22  20  12    0.000    0.000       0
+  0     89 00:13:48.05   8.4900A   2.4507  -2.5592   5.4612  0.070  0.00   0.109E-02      0.  0.759E+00  0.759E+00  0.168E-03  0.222E-13   20  19  25   20  13   0   21  20  26    0.000    0.000       0
+  0     90 00:13:56.54   8.4700A   2.5261  -2.5931   5.6493  0.069  0.00   0.992E-03      0.  0.763E+00  0.762E+00  0.168E-03  0.223E-13   20  19  25   21  14   0   21  20  26    0.000    0.000       0
+  0     91 00:14:05.01   8.4000A   2.5418   2.5811   5.7842  0.068  0.00   0.965E-03      0.  0.764E+00  0.764E+00  0.170E-03  0.226E-13   20  21  25   19  24  21   21  20  26    0.000    0.000       0
+  0     92 00:14:13.41   8.3100A   2.5587   2.6301   5.8488  0.067  0.00   0.955E-03      0.  0.763E+00  0.763E+00  0.170E-03  0.226E-13   20  22  25   19  24  21   21  20  26    0.000    0.000       0
+  0     93 00:14:21.72   8.3300A   2.6085  -2.6281   6.0300  0.067  0.00   0.949E-03      0.  0.761E+00  0.761E+00  0.170E-03  0.226E-13   20  22  25   21  13   0   22  20  26    0.000    0.000       0
+  0     94 00:14:30.05   8.4000A   2.6249  -2.6246   6.1168  0.066  0.00   0.947E-03      0.  0.757E+00  0.757E+00  0.172E-03  0.229E-13   21  21  25   21  13   0   22  20  26    0.000    0.000       0
+  0     95 00:14:38.45   8.3500A   2.6465  -2.6730   6.1402  0.065  0.00   0.951E-03      0.  0.751E+00  0.751E+00  0.175E-03  0.233E-13   21  21  25   22  14   0   23  20  26    0.000    0.000       0
+  0     96 00:14:46.80   8.3500A  -2.6707  -2.7012   6.2125  0.064  0.00   0.965E-03      0.  0.744E+00  0.743E+00  0.175E-03  0.234E-13   20  19  22   22  14   0   23  20  26    0.000    0.000       0
+  0     97 00:14:55.15   8.4000A  -2.6138  -2.6737   6.2290  0.063  0.00   0.978E-03      0.  0.734E+00  0.734E+00  0.176E-03  0.235E-13   20  19  22   22  15   3   23  20  27    0.000    0.000       0
+  0     98 00:15:03.55   8.3500A  -2.6267  -2.8077   6.3160  0.062  0.00   0.959E-03      0.  0.724E+00  0.723E+00  0.177E-03  0.238E-13   21  20  22   22  15   3   24  20  26    0.000    0.000       0
+  0     99 00:15:11.90   8.3500A  -2.7053  -2.8322   6.2624  0.061  0.00   0.934E-03      0.  0.712E+00  0.711E+00  0.177E-03  0.238E-13   21  20  22   22  15   3   24  20  26    0.000    0.000       0
+  0    100 00:15:20.25   8.4200A  -2.8498  -2.8672   6.2829  0.061  0.00   0.923E-03      0.  0.698E+00  0.698E+00  0.177E-03  0.239E-13   24  21  28   23  16   3   25  20  26    0.000    0.000       0
+  0    101 00:15:28.67   8.4400A  -2.9217  -2.8468   6.3362  0.060  0.00   0.913E-03      0.  0.684E+00  0.684E+00  0.179E-03  0.242E-13   24  22  28   23  16   3   25  21  26    0.000    0.000       0
+  0    102 00:15:37.11   8.3900A  -2.9885  -2.9620   6.2081  0.059  0.00   0.910E-03      0.  0.669E+00  0.668E+00  0.179E-03  0.243E-13   24  22  28   23  15   3   25  21  26    0.000    0.000       0
+  0    103 00:15:45.50   8.3500A  -2.8689  -2.9829   5.9579  0.058  0.00   0.909E-03      0.  0.652E+00  0.652E+00  0.177E-03  0.241E-13   24  22  28   23  15   3   26  20  26    0.000    0.000       0
+  0    104 00:15:53.85   8.3400A  -2.9053  -2.9626   5.9920  0.057  0.00   0.911E-03      0.  0.636E+00  0.635E+00  0.177E-03  0.240E-13   24  23  28   24  16   3   26  21  26    0.000    0.000       0
+  0    105 00:16:02.19   8.3100A  -2.8817  -2.9769   6.0374  0.056  0.00   0.923E-03      0.  0.618E+00  0.618E+00  0.176E-03  0.239E-13   24  23  28   25  16  11   23  20  19    0.000    0.000       0
+  0    106 00:16:10.50   8.2800A  -2.8857  -3.0047   6.1145  0.056  0.00   0.966E-03      0.  0.601E+00  0.601E+00  0.176E-03  0.238E-13   25  22  27   25  16  11   24  20  19    0.000    0.000       0
+  0    107 00:16:18.78   8.2800A  -2.8965   2.9885   6.1912  0.055  0.00   0.136E-02      0.  0.584E+00  0.583E+00  0.175E-03  0.237E-13   25  22  27   25  26  11   24  20  19    0.000    0.000       0
+  0    108 00:16:27.06   8.3200A  -2.8603   2.8534   6.1958  0.054  0.00   0.933E-03      0.  0.566E+00  0.566E+00  0.175E-03  0.236E-13   25  22  27   25  26  11   24  20  19    0.000    0.000       0
+  0    109 00:16:35.38   8.3900A  -2.8889  -2.8880   6.1591  0.053  0.00   0.892E-03      0.  0.549E+00  0.548E+00  0.176E-03  0.237E-13   25  23  27   25  15  11   24  20  19    0.000    0.000       0
+  0    110 00:16:43.77   8.4800A  -2.9502  -2.8553   6.2583  0.053  0.00   0.889E-03      0.  0.532E+00  0.531E+00  0.177E-03  0.238E-13   25  23  27   25  15  11   25  20  19    0.000    0.000       0
+  0    111 00:16:52.25   8.5900A  -2.9810   2.7511   6.2308  0.052  0.00   0.851E-03      0.  0.515E+00  0.515E+00  0.179E-03  0.241E-13   25  23  27   25  27  11   25  20  19    0.000    0.000       0
+  0    112 00:17:00.84   8.7200A  -2.9806   2.7041   6.1032  0.052  0.00   0.835E-03      0.  0.499E+00  0.498E+00  0.181E-03  0.243E-13   25  23  27   26  26  11   25  20  19    0.000    0.000       0
+  0    113 00:17:09.56   8.8500A  -2.9435   2.7247   6.1171  0.051  0.00   0.823E-03      0.  0.483E+00  0.483E+00  0.184E-03  0.247E-13   25  23  27   26  26  11   26  20  19    0.000    0.000       0
+  0    114 00:17:18.41   9.0200A  -2.8647   2.6736   6.0821  0.050  0.00   0.812E-03      0.  0.468E+00  0.467E+00  0.187E-03  0.252E-13   25  23  27   26  26  11   26  20  19    0.000    0.000       0
+  0    115 00:17:27.43   9.1600A  -2.8257  -2.7162   6.0652  0.050  0.00   0.802E-03      0.  0.454E+00  0.453E+00  0.191E-03  0.257E-13   25  24  26   25  16  25   26  20   6    0.000    0.000       0
+  0    116 00:17:36.59   9.3300A  -2.8878  -2.7208   6.1682  0.049  0.00   0.792E-03      0.  0.440E+00  0.440E+00  0.195E-03  0.262E-13   25  24  26   25  16  25   26  20   6    0.000    0.000       0
+  0    117 00:17:45.92   9.3300A  -2.9249  -2.6815   6.2085  0.049  0.00   0.781E-03      0.  0.428E+00  0.428E+00  0.199E-03  0.267E-13   25  24  26   25  16  25   26  20   6    0.000    0.000       0
+  0    118 00:17:55.25   9.3300A  -2.9399  -2.6362   6.2028  0.048  0.00   0.773E-03      0.  0.418E+00  0.417E+00  0.200E-03  0.268E-13   25  24  26   25  16  25   26  20   6    0.000    0.000       0
+  0    119 00:18:04.58   9.3300A  -2.9379  -2.5995   6.3793  0.048  0.00   0.767E-03      0.  0.409E+00  0.408E+00  0.201E-03  0.270E-13   25  24  26   25  16  25   27  20   6    0.000    0.000       0
+  0    120 00:18:13.91   9.3300A  -2.9346  -2.5661   6.5828  0.048  0.00   0.764E-03      0.  0.401E+00  0.400E+00  0.202E-03  0.272E-13   26  23  26   25  16  25   27  20   6    0.000    0.000       0
+  0    121 00:18:23.24   9.3300A  -2.9681   2.5551   6.5854  0.047  0.00   0.770E-03      0.  0.395E+00  0.394E+00  0.203E-03  0.274E-13   26  23  26   26  24  31   27  20   6    0.000    0.000       0
+  0    122 00:18:32.57   9.3300A  -2.9840   2.5435   6.3646  0.047  0.00   0.771E-03      0.  0.390E+00  0.389E+00  0.205E-03  0.276E-13   26  23  26   26  24  31   27  20   6    0.000    0.000       0
+  0    123 00:18:41.90   9.3300D  -2.9818  -2.4313   6.3548  0.047  0.00   0.739E-03      0.  0.387E+00  0.386E+00  0.206E-03  0.279E-13   26  23  26   24  15  25   27  20   5    0.000    0.000       0
+  0    124 00:18:51.23   9.3300D  -3.0504  -2.3850   6.2504  0.046  0.00   0.708E-03      0.  0.385E+00  0.384E+00  0.208E-03  0.282E-13   27  19   9   26  19   7   27  20   5    0.000    0.000       0
+  0    125 00:19:00.56   9.3300D  -3.0651  -2.4094   6.2253  0.046  0.00   0.687E-03      0.  0.384E+00  0.384E+00  0.211E-03  0.285E-13   27  21   7   29  17   3   27  20   3    0.000    0.000       0
+  0    126 00:19:09.89   9.3300D  -3.1505  -2.4851   6.1767  0.046  0.00   0.699E-03      0.  0.385E+00  0.384E+00  0.213E-03  0.288E-13   27  21   7   29  17   3   27  20   3    0.000    0.000       0
+  0    127 00:19:19.22   9.3300D  -3.1199  -2.4543   6.1263  0.045  0.00   0.641E-03      0.  0.387E+00  0.386E+00  0.215E-03  0.290E-13   27  21   7   29  17   3   28  20  37    0.000    0.000       0
+  0    128 00:19:28.54   9.3300D  -3.0232   2.4946   6.1576  0.045  0.00   0.622E-03      0.  0.390E+00  0.389E+00  0.217E-03  0.292E-13   27  21   7   23  19  19   28  20  37    0.000    0.000       0
+  0    129 00:19:37.87   9.3300D  -3.0408   2.5484   6.1471  0.045  0.00   0.605E-03      0.  0.393E+00  0.392E+00  0.219E-03  0.294E-13   28  20   7   23  19  19   28  20   3    0.000    0.000       0
+  0    130 00:19:47.20   9.3300D  -3.2495   2.5611   6.2465  0.045  0.00   0.584E-03      0.  0.397E+00  0.396E+00  0.221E-03  0.295E-13   28  20   7   23  19  19   28  20   3    0.000    0.000       0
+  0    131 00:19:56.53   9.3300D  -3.3370   2.5373   6.1600  0.045  0.00   0.570E-03      0.  0.402E+00  0.401E+00  0.223E-03  0.297E-13   28  20   7   23  19  19   28  20   3    0.000    0.000       0
+  0    132 00:20:05.86   9.3300D  -3.3653   2.5049   5.9509  0.045  0.00   0.551E-03      0.  0.407E+00  0.406E+00  0.225E-03  0.299E-13   28  20   6   22  19   9   28  20   3    0.000    0.000       0
Index: /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/case_config.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/case_config.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/cases/warm_air_bubble_with_bcm/case_config.yml	(revision 3477)
@@ -0,0 +1,20 @@
+---
+# this is a palmtest job configuration file
+
+allowed_builds:
+  - gfortran_default
+
+allowed_number_of_cores:
+  - 1
+  - 2
+  - 4
+  - 8
+  - 16
+
+activation_strings:
+  - "d3#"
+
+significant_digits_for_netcdf_checks:
+  timeseries: 3
+  profiles: 5
+  other: 8
Index: /palm/tags/release-6.0/TESTS/palmtest.yml
===================================================================
--- /palm/tags/release-6.0/TESTS/palmtest.yml	(revision 3477)
+++ /palm/tags/release-6.0/TESTS/palmtest.yml	(revision 3477)
@@ -0,0 +1,42 @@
+---
+# this is a palmtest environments file
+
+palm_config_template:
+
+environments:
+
+  GNU:
+    executable: gfortran
+    mpi_wrapper: mpif90
+    include:
+      netcdf: "-I /path/to/netcdf/gnu/include/"
+      fftw: "-I /path/to/fftw/gnu/include/"
+      rrtmg: "-I /path/to/rrtmg/gnu/include"
+    lib:
+      netcdf: "/path/to/netcdf/gnu/lib/libnetcdff.so"
+      fftw: "/path/to/fftw/gnu/lib/libfftw3.so"
+      rrtmg: "/path/to/rrtmg/gnu/lib/librrtmg.so"
+
+  Intel:
+    executable: ifort
+    mpi_wrapper: mpif90
+    include:
+      netcdf: "-I /path/to/netcdf/intel/include/"
+      fftw: "-I /path/to/fftw/intel/include/"
+      rrtmg: "-I /path/to/rrtmg/intel/include"
+    lib:
+      netcdf: "/path/to/netcdf/intel/lib/libnetcdff.so"
+      fftw: "/path/to/fftw/intel/lib/libfftw3.so"
+      rrtmg: "/path/to/rrtmg/intel/lib/librrtmg.so"
+
+  Cray:
+    executable: crayftn
+    mpi_wrapper: mpif90
+    include:
+      netcdf: "-I /path/to/netcdf/cray/include/"
+      fftw: "-I /path/to/fftw/cray/include/"
+      rrtmg: "-I /path/to/rrtmg/cray/include"
+    lib:
+      netcdf: "/path/to/netcdf/cray/lib/libnetcdff.so"
+      fftw: "/path/to/fftw/cray/lib/libfftw3.so"
+      rrtmg: "/path/to/rrtmg/cray/lib/librrtmg.so"
Index: /palm/tags/release-6.0/UTIL/Makefile
===================================================================
--- /palm/tags/release-6.0/UTIL/Makefile	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/Makefile	(revision 3477)
@@ -0,0 +1,80 @@
+#--------------------------------------------------------------------------------#
+# This file is part of PALM.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2014  Leibniz Universitaet Hannover
+#--------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+#
+# Former revisions:
+# -----------------
+# $Id$
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# utility programs are created separately for each block in the configuration
+# file,
+# compare_palm_logs added
+# added PROG3 in 'all:' statement (line 39, bugfix)
+#
+# Initial revision somewhere in 2003/04
+#
+# Description:
+# ------------
+# Makefile for generating the utility programs needed by mrun and palm
+#--------------------------------------------------------------------------------#
+
+PROG1 =  ../SCRIPTS/combine_plot_fields$(BLOCK).x
+PROG2 =  ../SCRIPTS/compare_palm_logs$(BLOCK).x
+PROG3 =  ../SCRIPTS/interpret_config$(BLOCK).x
+
+OBJS1 =  combine_plot_fields.o
+OBJS2 =  compare_palm_logs.o
+OBJS3 =  interpret_config.o
+
+CC = cc
+CFLAGS = -O
+
+F90 = mpif90
+F90_SER = gfortran
+COPT = -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf
+F90FLAGS = -fcheck=all -fdefault-real-8 -fconvert=little-endian
+LDFLAGS  = -fcheck=all -fdefault-real-8 -fconvert=little-endian
+
+PKG_CONFIG      := PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config
+NETCDF_F90FLAGS != $(PKG_CONFIG) --cflags netcdf-fortran
+NETCDF_LDFLAGS  != $(PKG_CONFIG) --libs netcdf-fortran
+F90FLAGS        += $(NETCDF_F90FLAGS)
+LDFLAGS         += $(NETCDF_LDFLAGS)
+
+.SUFFIXES: $(SUFFIXES) .f90
+
+
+all: $(PROG1) $(PROG2) $(PROG3)
+
+$(PROG1): $(OBJS1)
+	$(F90_SER) -o $(PROG1) $(OBJS1) $(LDFLAGS)
+
+$(PROG2): $(OBJS2)
+	$(F90_SER) -o $(PROG2) $(OBJS2) $(LDFLAGS)
+
+$(PROG3): $(OBJS3)
+	$(F90_SER) -o $(PROG3) $(OBJS3) $(LDFLAGS)
+
+.f90.o:
+	$(F90_SER) $(F90FLAGS) $(COPT) -c $<
+
+
Index: /palm/tags/release-6.0/UTIL/Makefile_utilities
===================================================================
--- /palm/tags/release-6.0/UTIL/Makefile_utilities	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/Makefile_utilities	(revision 3477)
@@ -0,0 +1,87 @@
+#------------------------------------------------------------------------------#
+# This file is part of the PALM model system.
+#
+# PALM is free software: you can redistribute it and/or modify it under the terms
+# of the GNU General Public License as published by the Free Software Foundation,
+# either version 3 of the License, or (at your option) any later version.
+#
+# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# PALM. If not, see <http://www.gnu.org/licenses/>.
+#
+# Copyright 1997-2018  Leibniz Universitaet Hannover
+#------------------------------------------------------------------------------#
+#
+# Current revisions:
+# -----------------
+# 
+# 
+# Former revisions:
+# -----------------
+# $Id$
+# Added make directive for agent_preprocessing tool
+# 
+# 2718 2018-01-02 08:49:38Z maronga
+# Corrected "Former revisions" section
+# 
+# 2696 2017-12-14 17:12:51Z kanani
+# Change in file header (GPL part)
+#
+# 2380 2017-09-01 08:33:46Z raasch
+# file renamed to Makefile_utilities
+# executables are created in current working directory
+# interpret_config removed
+#
+# 1046 2012-11-09 14:38:45Z maronga
+# code put under GPL (PALM 3.9)
+#
+# utility programs are created separately for each block in the configuration
+# file,
+# compare_palm_logs added
+# added PROG3 in 'all:' statement (line 39, bugfix)
+#
+# Initial revision somewhere in 2003/04
+#
+# Description:
+# ------------
+# Makefile for generating the utility programs required by mrun and palm
+#------------------------------------------------------------------------------#
+
+PROG1 =  combine_plot_fields.x
+PROG2 =  compare_palm_logs.x
+PROG3 =  agent_preprocessing
+
+OBJS1 =  combine_plot_fields.o
+OBJS2 =  compare_palm_logs.o
+OBJS3 =  agent_preprocessing.o
+
+CC = cc
+CFLAGS = -O
+
+F90 =
+F90_SER =
+COPT =
+F90FLAGS =
+LDFLAGS =
+
+.SUFFIXES: $(SUFFIXES) .f90
+
+
+all: $(PROG1) $(PROG2) $(PROG3)
+
+$(PROG1): $(OBJS1)
+	$(F90_SER) -o $(PROG1) $(OBJS1) $(LDFLAGS)
+
+$(PROG2): $(OBJS2)
+	$(F90_SER) -o $(PROG2) $(OBJS2) $(LDFLAGS)
+
+$(PROG3): $(OBJS3)
+	$(F90_SER) -o $(PROG3) $(OBJS3) $(LDFLAGS)
+
+.f90.o:
+	$(F90_SER) $(F90FLAGS) $(COPT) -c $<
+
+
Index: /palm/tags/release-6.0/UTIL/agent_preprocessing/README
===================================================================
--- /palm/tags/release-6.0/UTIL/agent_preprocessing/README	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/agent_preprocessing/README	(revision 3477)
@@ -0,0 +1,137 @@
+Author: Simon Ward, IMUK, Date: 2018-03-23
+
+AN UPDATE WILL FOLLOW SOON
+
+This document serves as a preliminary documentation for the MultiAgentSystem 
+(MAS). For any questions, please do not hesitate to contact me at 
+ward@muk.uni-hannover.de
+
+Find the description of some test setups at the bottom of this document.
+
+The MAS is a tool implemented in PALM that serves the purpose of simulating the
+movement of pedestrians through an (urban) environment. The encompasses
+
+  1. The navigation of agents through static obstacles towards their respective
+     targets,
+  2. the interaction of agents with static obstacles to avoid collision and
+  3. the interaction of agents with each other, i.e. to anticipate potential 
+     collisions and avoiding them. 
+
+For (1), a navigation mesh (NavMesh) is used. It consists of a set of meshpoints
+that agents can walk towards on the way to their ultimate goal. These meshpoints
+also contain information about all other meshpoints they are connected to. 
+E.g., no connection will be made between to points, if the direct line between
+them crosses through a building. 
+The points in the NavMesh consist of the convex corners of the simplified
+polygons (see parameter tolerance_dp for more information) that describe the
+PALM building topography.
+
+The NavMesh is created during a preprocessing step which currently has to be
+executed manually. For this, FORTRAN program nav_mesh.f90 has to be compiled
+(preferably ifort, if gfortran has to be used, comment lines 1327 and 1399-1411)
+and run from the INPUT folder of the current simulation. So:
+ifort nav_mesh.f90
+./a.out 
+This will create a binary file named <run_identifier>_nav in the INPUT folder, 
+that will in turn be read by PALM during the run. It contains all necessary 
+NavMesh information. Each agent uses this information to find the shortes way throug the NavMesh to her target, using the A* (A-Star) algorithm. Her path then consists of a number of intermittent targets that she will walk toward on the way to her final goal, each time walking towards the next intermittent target once the current one is reached.
+
+The nav_mesh.f90 program *DOES NOT* support NetCDF building data!
+It only reads ASCII files in the format (X,nx*(F5.1)), e.g.:
+  0.0  0.0  0.0  0.0
+  8.0  8.0  8.0  8.0
+ 17.2 17.2 17.2 17.2
+ 20.0 20.0 20.0 20.0
+Support for other formats will follow shortly. If you wish to modify the format
+manually, take a look at line 366 of nav_mesh.f90.
+
+To use the nav_mesh program, a NAMELIST prepro_par has to be added to the
+<run_identifier>_p3d file.
+It MUST contain the following variables and they MUST be the same as in the
+inipar namelist:
+nx, ny, dx, dy
+It CAN, additionally, contain the following variables:
+
+Name          Type Dim Default    Description
+--------------------------------------------------------------------------------
+tolerance_dp     R   5    2.99    
+                          1.99    
+                          1.41    
+                          0.7     
+                          0.35   A polygon structure is used to store buildinginformation. Each building initially consists of all inner and outer corner of the original PALM gridded building topography. The Douglas-Peucker-algorithm is used to simplify the polygons. A line segment between to vertices of the polygon is used to approximate a segment of the polygon. If the maximum distance of any vertex between the two is smaller than tolerance_dp, the segment is  accepted. If not, the segment is split in two at that vertex, leaving two line segements that recursively go through the same  procedure.  If the algorithm using tolerance_dp(0) leaves a polygon with less than 4 vertices, it is reverted to its original state and the process starts again with tolerance_dp(1) and so on. 
+--------------------------------------------------------------------------------                                
+corner_offset    R   1    0.5     To avoid the collision of agents with corners of buildings, the navigation points are shifted outward from the corners by this distance in meters.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+PLEASE NOTE: To enable PALM to read the <run_identifier>_nav file, please add
+             the following lines to your .palm.iofiles in the appropriate places
+             and place your .palm.iofiles in your current_version folder:
+#-------------------------------------------------------------------------------------------
+# List of input-files
+#-------------------------------------------------------------------------------------------
+...
+...
+NAVIGATION_DATA          inopt:tr   d3#:d3r  $base_data/$jobname/INPUT          _nav*
+...
+
+ALSO:        Add the following for propper copying of netcdf output:
+#-------------------------------------------------------------------------------------------
+# List of output-files
+#-------------------------------------------------------------------------------------------
+...
+...
+DATA_AGT_NETCDF            out:tr   *         $base_data/$jobname/OUTPUT         _agt       nc
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+For (2) and (3), a Social Forces aproach based on the ideas of Helbig (1995) and
+using the concept of a power law by Karamouzas (2014) for pedestrian
+interactions is used. The idea is that ostacles will exert a repulsive force on
+pedestrians. The sum of these forces added to the attractive force toward the
+target determines the acceleration of each pedestrian.
+
+To steer the MAS in PALM, use the following parameters in the 
+NAMELIST agents_par:
+
+Name                          Type Dim   Default    Description
+--------------------------------------------------------------------------------
+a_rand_target                    L 100         .F.  If .T., each agent in that group will have a random target just outside the model domain.
+adx                              R 100   9999999.9  Distance along x between agents within an agent source (in m). 
+ady                              R 100   9999999.9  Distance along y between agents within an agent source (in m). 
+agent_maximum_age                R 100   9999999.9  If agent is older than this value, it will be deleted
+alloc_factor_mas                 R   1        20.0  Factor (in percent) describing the memory allocated additionally to the memory needed for initial agents at a given grid cell.
+asl                              R 100   9999999.9  Left edge of a agent source (in m). NOTE: Agent sources are defined as point sources in an area. asl, asn, asr, ass, describe the edge of this source. adx and ady describe the distance betwee two sources starting at the left south edge. To randomize the starting positions within a threshold, see random_start_position_agents.
+asn                              R 100   9999999.9  North edge of a agent source (in m). 
+asr                              R 100   9999999.9  Right edge of a agent source (in m). 
+ass                              R 100   9999999.9  South edge of a agent source (in m). 
+at_x                             R 100   9999999.9  x-coordinate of agent group target (in m). NOTE: this is superseeded if a_rand_target == .T. for that group
+at_y                             R 100   9999999.9  y-coordinate of agent group target (in m).
+bc_mas_lr                        C  15    'absorb'  Boundary condition for agents along x. Default is recommended. 'cyclic' is also possible.
+bc_mas_ns                        C  15    'absorb'  Boundary condition for agents along y. Default is recommended. 'cyclic' is also possible.
+deallocate_memory_mas            L   1         .T.  Parameter to enable deallocation of unused memory. If the number of agents in a grid box exceeds the allocated memory, new memory is allocated. However, in case the number of agents per grid box in only temporarily high, most of the memory remains unused. If deallocate_memory = .T., the allocated memory used for agents will be dynamically adjusted with respect to the current number of agents every step_dealloc_mas's timestep. 
+dist_to_int_target               R   1        0.4  Distance to the current intermittent target at which the agent will count this target as reached an will begin walking towards the next one. 
+dt_agent                         R   1      0.016  Agent timestep. The default value is recommended, as this is about the time scale at which humans perceive and react to their environment. No guaratees can be given that agent behavior remains realistic at larger timesteps. This has no effect on the PALM timestep, as the agent model will be called multiple times during each model timestep.
+dt_doats                         R   1  9999999.9  Output timestep for timeseries. So far, no timeseries functionality.
+dt_arel                          R   1  9999999.9  Time interval (in s) that defines the release of new agents starting at multi_agent_system_start for each agent group in the source areas defined by asl, asn, asr and ass. 
+dt_write_agent_data              R   1  9999999.9  Time interval (in s) at which agent data is output. By default, agent data is output to one NetCDF file with two unlimited dimensions (time and agent number). This (requires netcdf_data_format = 3 or 5) This data includes an ID, position, speed, group and others. Before each output, all agents from all PEs are gathered into one array and then written to the NetCDF file without beeing sorted before. The reason being, that some agents might be deleted during the simulation, while others are created after the simulation start. The slots for these agents would thus have to be filled with placeholders, increasing the already high memory usage. If an individual based agent analysis is wished during postprocessing, the sorting by id will have to be done manually. This state is not very desirable, please contact me with any suggenstions that would improve it.
+end_time_arel                    R   1  9999999.9  Time at which release of agents will stop.
+max_dist_from_path               R   1        0.3  If an agents deviates further than this value from her currently calculated path, a new path will be calculated.
+min_nr_agent                     R   1          2  Minimum number of agents for which memory is allocated at every grid cell.
+multi_agent_system_start         R   1  9999999.9  Time (in s) at which agent release starts.
+number_of_agent_groups           I   1          1  Number of agent groups.
+radius_agent                     R   1        0.3  For collision calculation purposes, agents are assumed to occupy a circular area with a radius of radius_agent.
+random_start_position_agents     L   1        .T.  By default, a small random fluctuation is added to the starting postion of each agent (as defined by adx, ady, asl, asn, asr and ass). Turn this off by setting this parameter to .F.
+read_agents_from_restartfile     L   1        .F.  Restart functionality not implemented so far.
+repuls_agent                     R   1        1.5  Defines the strength of the repulsive force two already colliding agents exert on each other. May be removed going forward.
+repuls_wall                      R   1       10.0  Defines the strength of the repulsive force a wall in proximity to an agent exerts on that agent. Value taken from Helbig (1995).
+scan_radius_agent                R   1        3.0  Radius in which each agent scans for other agents that she could potentially collide with. NOTE: Due to the ghost layers between PEs only consisting of 3 grid cells, this value should be smaller than 3*MIN(dx,dy) it can be larger, but then, the scan radius will be smaller at subdomain boundaries than in the rest of the domain. ALSO NOTE: The agent model can get very computationally expensive due to the small timestep in combination with the interaction between agents. A smaller value here will increase performance at the cost of realistic collision avoidance.
+step_dealloc_mas                 I   1        100  Number of timesteps after which agent memory is deallocated.
+tau_accel_agent                  R   1        0.5  Relaxation time for the agent to accelerate to her desired velocity.
+
+################################################################################
+Currently, three test setups are provided under EXAMPLES/agents.
+(1) canyon : A simple street canyon with two groups of agents moving in opposite directions along the canyon. Demonstrates collision avoidance.
+
+(2) nav_test: A simple generic building setup with two agent groups with intersecting paths. Demonstrates collision avoidance, repellance by buildings and pathfinding.
+
+(3) urban_test: A sample urban test case with a 200 m * 300 m test area in Berlin and 9 agent groups with variing targets. Primarily demonstrates pathfinding in complex areas. Simulation setup tested for 20*10 cores
Index: /palm/tags/release-6.0/UTIL/agent_preprocessing/agent_preprocessing.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/agent_preprocessing/agent_preprocessing.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/agent_preprocessing/agent_preprocessing.f90	(revision 3477)
@@ -0,0 +1,2868 @@
+!> @agent_preprocessing.f90
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018 Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! ------------------
+! 
+! 
+! Former revisions:
+! -----------------!
+! $Id$
+! Changed getcwd to GET_ENVIRONMENT_VARIABLE and changed X to 1X in format
+! statements to have code conform to fortran 2008 standard
+! 
+! 3259 2018-09-18 09:53:18Z sward
+! Removed unused variables and fixed real to real comparisons
+! 
+! 3216 2018-08-29 10:22:12Z sward
+! Bubfix for gfortran: reordering of type definitions
+! 
+! 3210 2018-08-28 07:31:13Z sward
+! Bugfix: changed intrinsic SIZEOF to STORAGE_SIZE
+! 
+! 3208 2018-08-27 13:10:50Z sward
+! Renamed nav_mesh to agent_preprocessing, adapted terminal output
+! 
+! 3198 2018-08-15 09:23:10Z sward
+! Reduced tolerance_dp to 3 entries, fixed its initialization
+! 
+! 3168 2018-07-25 06:40:29Z sward
+! Updated NetCDF ororgraphy and building input
+! 
+! Initial revision
+! 
+!
+! Description:
+! ------------
+!> Reads topography and building data and converts this information into a
+!> navigation mesh (NavMesh, a visibility graph). This mesh is necessary for
+!> the use of the Multi Agent System in PALM for the agents to navigate in
+!> complex (urban) terrain.
+!------------------------------------------------------------------------------!
+
+ MODULE kinds
+
+    IMPLICIT NONE
+
+!
+!-- Floating point kinds
+    INTEGER, PARAMETER ::  sp = 4           !< single precision (32 bit)
+    INTEGER, PARAMETER ::  dp = 8           !< double precision (64 bit)
+
+!
+!-- Integer kinds
+    INTEGER, PARAMETER ::  isp = SELECTED_INT_KIND(  9 )   !< single precision (32 bit)
+    INTEGER, PARAMETER ::  idp = SELECTED_INT_KIND( 14 )   !< double precision (64 bit)
+
+!
+!-- Set kinds to be used as defaults
+    INTEGER, PARAMETER ::   wp =  dp          !< default real kind
+    INTEGER, PARAMETER ::  iwp = isp          !< default integer kind
+
+    SAVE
+
+ END MODULE kinds
+
+ MODULE variables
+
+    USE kinds
+
+    CHARACTER(LEN=3)  ::  char_lod  = 'lod'         !< name of level-of-detail attribute in NetCDF file
+    CHARACTER(LEN=10) ::  char_fill = '_FillValue'  !< name of fill value attribute in NetCDF file
+    CHARACTER(LEN=128) ::  runname                  !< Run name
+
+    LOGICAL ::  internal_buildings = .FALSE.  !< Flag that indicates whether buildings within closed courtyards should be deleted
+    LOGICAL ::  flag_2d            = .FALSE.  !< Flag that indicates that 2d buildings will be used in all cases
+
+    INTEGER(iwp) ::  i                          !< Index along x
+    INTEGER(iwp) ::  j                          !< Index along y
+    INTEGER(iwp) ::  nx = 99999                 !< Number of grid points in x-direction
+    INTEGER(iwp) ::  ny = 99999                 !< Number of grid points in x-direction
+    INTEGER(iwp) ::  nov                        !< Number of vertices
+    INTEGER(iwp) ::  polygon_counter            !< Iterator for the number of building polygons
+    INTEGER(iwp) ::  number_of_connections = 0  !< Counter for number of connections in mesh
+    INTEGER(iwp) ::  i_cn                       !< Min number of corners left in polygons after Douglas Poiker algorithm
+    INTEGER(iwp) ::  i_sc                       !< Cycle number for Douglas-Peucker algorithm
+    INTEGER(iwp) ::  nc_stat                    !< return value of nf90 function call
+    INTEGER(iwp) ::  vertex_counter             !< Counter: total number of vertices
+
+    INTEGER, DIMENSION(:,:), ALLOCATABLE ::  wall_flags_0  !< Bit-array containing surface information
+    INTEGER, DIMENSION(:,:), ALLOCATABLE ::  polygon_id    !< Identifies each grid point as part of exactly one building
+
+    REAL(wp)    ::  ddx              !< inverse of dx
+    REAL(wp)    ::  ddy              !< inverse of dy
+    REAL(wp)    ::  dx = 99999.9_wp  !< grid spacing in x-direction
+    REAL(wp)    ::  dy = 99999.9_wp  !< grid spacing in x-direction
+    REAL(wp)    ::  dz = 99999.9_wp  !< grid spacing in x-direction
+    REAL(wp)    ::  finish           !< variable for CPU time measurement
+    REAL(wp)    ::  start            !< variable for CPU time measurement
+
+    REAL(wp), DIMENSION(0:2) ::  tolerance_dp = 999999.0_wp  !< tolerance in Douglas-Peucker algorithm
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  obstacle_height  !< height of obstacles
+
+!
+!-- Define data structure where the dimension and type of the input depends 
+!-- on the given level of detail. 
+!-- For buildings, the input is either 2D float, or 3d byte. 
+       TYPE build_in
+          INTEGER(iwp)    ::  lod = 1                                  !< level of detail                  
+          INTEGER(KIND=1) ::  fill2 = -127                             !< fill value for lod = 2
+          INTEGER(iwp)    ::  nz                                       !< number of vertical layers in file
+          INTEGER(KIND=1), DIMENSION(:,:,:), ALLOCATABLE ::  var_3d    !< 3d variable (lod = 2)
+          REAL(wp), DIMENSION(:), ALLOCATABLE ::  z                    !< vertical coordinate for 3D building, used for consistency check
+          LOGICAL ::  from_file = .FALSE.                              !< flag indicating whether an input variable is available and read from file or default values are used  
+          REAL(wp)                              ::  fill1 = -9999.9_wp !< fill values for lod = 1
+          REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var_2d             !< 2d variable (lod = 1)
+       END TYPE build_in
+
+!
+!-- Topography grid point
+    TYPE  grid_point
+        LOGICAL      ::  checked     !< Flag to indicate whether this grid point has been evaluated already
+        INTEGER(iwp) ::  i           !< x-index
+        INTEGER(iwp) ::  j           !< y-index
+        INTEGER(iwp) ::  polygon_id  !< ID of the polygon this grid point belongs to
+    END TYPE grid_point
+
+!
+!-- Node in the visibility graph navigation mesh
+    TYPE  mesh_point
+        INTEGER(iwp)                            ::  polygon_id          !< Polygon the point belongs to
+        INTEGER(iwp)                            ::  vertex_id           !< Vertex in the polygon
+        INTEGER(iwp)                            ::  noc                 !< number of connections
+        INTEGER(iwp)                            ::  origin_id           !< ID of previous mesh point on path (A*)
+        REAL(wp)                                ::  cost_so_far         !< Cost to reach this mesh point (A*)
+        REAL(wp)                                ::  x                   !< x-coordinate
+        REAL(wp)                                ::  y                   !< y-coordinate
+        REAL(wp)                                ::  x_s                 !< corner shifted outward from building by 1m (x)
+        REAL(wp)                                ::  y_s                 !< corner shifted outward from building by 1m (y)
+        INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  connected_vertices  !< Index of connected vertices
+        REAL(wp), DIMENSION(:), ALLOCATABLE     ::  distance_to_vertex  !< Distance to each vertex
+    END TYPE mesh_point
+
+!
+!-- Vertex of a polygon
+    TYPE  vertex_type
+        LOGICAL               ::  delete  !< Flag to mark vertex for deletion
+        REAL(wp)              ::  x       !< x-coordinate
+        REAL(wp)              ::  y       !< y-coordinate
+    END TYPE vertex_type
+
+!
+!-- Polygon containing a number of vertices
+    TYPE  polygon_type
+        INTEGER(iwp)                                 ::  nov       !< Number of vertices in this polygon
+        TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  vertices  !< Array of vertices
+    END TYPE polygon_type
+
+!
+!-- Define data type to read 2D real variables
+    TYPE real_2d
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used  
+       REAL(wp) ::  fill = -9999.9_wp                !< fill value
+       REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  var !< respective variable
+    END TYPE real_2d
+
+!
+!-- Define data type to read 2D real variables
+    TYPE real_3d
+       LOGICAL ::  from_file = .FALSE.  !< flag indicating whether an input variable is available and read from file or default values are used  
+       INTEGER(iwp) ::  nz   !< number of grid points along vertical dimension
+       REAL(wp) ::  fill = -9999.9_wp                  !< fill value
+       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  var !< respective variable
+    END TYPE real_3d
+
+    TYPE(grid_point), DIMENSION(:,:), ALLOCATABLE ::  grid  !< 2d Topography grid
+
+    TYPE(mesh_point), DIMENSION(:), ALLOCATABLE, TARGET ::  mesh  !< Navigation mesh
+
+    TYPE(real_2d) ::  terrain_height_f       !< input variable for terrain height
+
+    TYPE(vertex_type) ::  dummy_vertex  !< placeholder vertex used for data copying
+    TYPE(vertex_type) ::  null_vertex   !< placeholder vertex used for initialisation
+
+    TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  dummy_v_list  !< Dummy for reallocation of polygon array
+
+    TYPE(polygon_type), POINTER ::  polygon  !< Current polygon
+
+    TYPE(polygon_type), DIMENSION(:), ALLOCATABLE, TARGET ::  polygons  !< Building polygons
+
+    TYPE(build_in) ::  buildings_f  !< input variable for buildings
+
+
+ END MODULE variables
+ 
+ MODULE data_input
+
+    USE kinds
+    USE variables
+
+#if defined ( __netcdf )
+    USE NETCDF
+#endif
+
+    INTERFACE get_variable
+       MODULE PROCEDURE get_variable_1d_int
+       MODULE PROCEDURE get_variable_1d_real
+       MODULE PROCEDURE get_variable_2d_int8
+       MODULE PROCEDURE get_variable_2d_int32
+       MODULE PROCEDURE get_variable_2d_real
+       MODULE PROCEDURE get_variable_3d_int8
+       MODULE PROCEDURE get_variable_3d_real
+       MODULE PROCEDURE get_variable_4d_real
+    END INTERFACE get_variable
+
+    INTERFACE get_attribute
+       MODULE PROCEDURE get_attribute_real
+       MODULE PROCEDURE get_attribute_int8
+       MODULE PROCEDURE get_attribute_int32
+       MODULE PROCEDURE get_attribute_string
+    END INTERFACE get_attribute
+    
+    CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads orography and building information.
+!------------------------------------------------------------------------------!
+    SUBROUTINE netcdf_data_input_topo ( input_trunk )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  input_trunk       !< run path
+       CHARACTER(LEN=200) ::  input_filename  !< filename
+
+       CHARACTER(LEN=100), DIMENSION(:), ALLOCATABLE ::  var_names  !< variable names in static input file
+
+
+       INTEGER(iwp) ::  i            !< running index along x-direction
+       INTEGER(iwp) ::  k_head       !< minimum k index for agents to walk underneath overhanging buildings
+       INTEGER(iwp) ::  id_topo      !< NetCDF id of topograhy input file
+       INTEGER(iwp) ::  j            !< running index along y-direction
+       INTEGER(iwp) ::  num_vars     !< number of variables in netcdf input file
+
+       LOGICAL ::  netcdf_flag = .FALSE.     !< indicates whether netcdf file is used for input
+       LOGICAL ::  lod_flag = .FALSE.        !< true if 3d building data is used
+       LOGICAL ::  topo_file_flag = .FALSE.  !< true if 3d building data is used
+
+       WRITE(*,'((1X,A,/))') 'Looking for topography/building information'
+       INQUIRE( FILE = TRIM( input_trunk )//'_static', EXIST = netcdf_flag )
+
+       IF ( netcdf_flag ) THEN
+          input_filename = TRIM( input_trunk )//'_static'
+          WRITE(*,'(2(3X,A,/))') 'Topography/building data will be used from', & 
+          TRIM( input_trunk )//'_static'
+       ELSE
+          WRITE(*,'(2(3X,A,/))') 'No static driver was found.',                &
+                      'Trying to read building data from _topo file.'
+          input_filename = TRIM( input_trunk )//'_topo'
+          INQUIRE( FILE = TRIM( input_filename ), EXIST = topo_file_flag )
+          IF ( .NOT. topo_file_flag ) THEN
+             WRITE(*,'(6(3X,A,/))')                                            &
+                 'No ASCII topography file was found in INPUT directory.',     &
+                 'Make sure you provided building data in the form of either', &
+                 '   (A) a static driver (<runname>_static) or',               &
+                 '   (B) an ASCII topography file (<runname>_topo).',          &
+                 NEW_LINE('A')//'Aborting nav_mesh program...'
+             STOP
+          ENDIF
+          WRITE(*,'(2(3X,A,/))') 'Topography/building data will be used from', & 
+          TRIM( input_trunk )//'_topo'
+       ENDIF
+
+!
+!--    Input via palm-input data standard 
+       IF ( netcdf_flag )  THEN
+#if defined ( __netcdf )
+!
+!--       Open file in read-only mode
+          CALL open_read_file( TRIM(input_filename) , id_topo )
+
+!
+!--       At first, inquire all variable names. 
+!--       This will be used to check whether an input variable exist or not. 
+          nc_stat = NF90_INQUIRE( id_topo, NVARIABLES = num_vars )
+          CALL handle_error( 'inquire_num_variables', 534 )
+!
+!--       Allocate memory to store variable names and inquire them.
+          ALLOCATE( var_names(1:num_vars) )
+          CALL inquire_variable_names( id_topo, var_names )
+!
+!--       Terrain height. First, get variable-related _FillValue attribute
+          IF ( check_existence( var_names, 'zt' ) )  THEN
+             terrain_height_f%from_file = .TRUE. 
+             CALL get_attribute( id_topo, char_fill,                           &
+                                 terrain_height_f%fill,                        &
+                                 .FALSE., 'zt' ) 
+!
+!--          PE-wise reading of 2D terrain height.
+             ALLOCATE ( terrain_height_f%var(0:ny,0:nx)  )
+             DO  i = 0, nx
+                CALL get_variable( id_topo, 'zt',                    &
+                                   i, terrain_height_f%var(:,i) )  
+             ENDDO
+          ELSE
+             terrain_height_f%from_file = .FALSE. 
+          ENDIF
+
+!
+!--       Read building height. First, read its _FillValue attribute, 
+!--       as well as lod attribute
+          buildings_f%from_file = .FALSE.
+          IF ( check_existence( var_names, 'buildings_2d' ) )  THEN
+             buildings_f%from_file = .TRUE. 
+             CALL get_attribute( id_topo, char_lod, buildings_f%lod,           &
+                                 .FALSE., 'buildings_2d' )
+
+             CALL get_attribute( id_topo, char_fill,                           &
+                                 buildings_f%fill1,                            &
+                                 .FALSE., 'buildings_2d' )
+
+!
+!--             Read 2D topography
+             IF ( buildings_f%lod == 1 )  THEN
+                ALLOCATE ( buildings_f%var_2d(0:ny,0:nx) )
+                DO  i = 0, nx
+                   CALL get_variable( id_topo, 'buildings_2d',                 &
+                                      i, buildings_f%var_2d(:,i) ) 
+                ENDDO
+             ELSE 
+                WRITE(*,'(A)') 'NetCDF attribute lod ' //                      &
+                                 '(level of detail) is not set properly.'
+             ENDIF
+          ENDIF
+!
+!--       If available, also read 3D building information. If both are
+!--       available, use 3D information. Do this only if the flag that indicates
+!--       that 2d buildings shall be used no matter what is false.
+          IF ( check_existence( var_names, 'buildings_3d' )                    &
+               .AND. .NOT. flag_2d )                                           &
+          THEN
+             lod_flag = .TRUE.
+             buildings_f%from_file = .TRUE. 
+             CALL get_attribute( id_topo, char_lod, buildings_f%lod,           &
+                                 .FALSE., 'buildings_3d' )     
+
+             CALL get_attribute( id_topo, char_fill,                           &
+                                 buildings_f%fill2,                            &
+                                 .FALSE., 'buildings_3d' )
+
+             CALL get_dimension_length( id_topo, buildings_f%nz, 'z' )
+
+             IF ( buildings_f%lod == 2 )  THEN
+                ALLOCATE( buildings_f%z(0:buildings_f%nz-1) )
+                CALL get_variable( id_topo, 'z', buildings_f%z )
+
+                ALLOCATE( buildings_f%var_3d(0:buildings_f%nz-1,               &
+                                             0:ny,0:nx) )
+                buildings_f%var_3d = 0
+!
+!--                Read data PE-wise. Read yz-slices.
+                DO  i = 0, nx
+                   DO  j = 0, ny
+                      CALL get_variable( id_topo, 'buildings_3d',              &
+                                         i, j,                                 &
+                                         buildings_f%var_3d(:,j,i) )
+                   ENDDO
+                ENDDO
+             ELSE 
+                WRITE(*,'(A)') 'NetCDF attribute lod ' //                      &
+                                 '(level of detail) is not set properly.'
+             ENDIF
+          ENDIF
+
+!
+!--       Close topography input file
+          CALL close_input_file( id_topo )
+#endif
+!
+!--    ASCII input
+       ELSE
+
+          OPEN( 90, FILE= input_filename,                                      &
+                STATUS='OLD', FORM='FORMATTED' )
+!
+!--             Read data from nyn to nys and nxl to nxr. Therefore, skip 
+!--             column until nxl-1 is reached
+          ALLOCATE ( buildings_f%var_2d(0:ny,0:nx) )
+          DO  j = ny, 0, -1
+             READ( 90, *, ERR=11, END=11 )                                     &
+                             ( buildings_f%var_2d(j,i), i = 0, nx )
+          ENDDO
+
+          GOTO 12
+
+11             WRITE(*,'(2A)') 'errors in file ',input_filename
+
+12             CLOSE( 90 )
+          buildings_f%from_file = .TRUE.
+
+       ENDIF
+!
+!--    In case no terrain height is provided by static input file, allocate 
+!--    array nevertheless and set terrain height to 0, which simplifies 
+!--    topography initialization.
+       IF ( .NOT. terrain_height_f%from_file )  THEN
+          ALLOCATE ( terrain_height_f%var(0:ny,0:nx) )
+          terrain_height_f%var = 0.0_wp
+       ENDIF
+
+!
+!--    Transfer read data to uniform format: For agents the only relevant 
+!--    information is whether they can walk or not at ground level.
+       k_head = CEILING(2./dz)
+       IF ( buildings_f%from_file ) THEN
+          IF ( lod_flag ) THEN
+             obstacle_height(0:nx,0:ny) = 1.
+             DO j = 0, ny
+                DO i = 0, nx
+!
+!--                For this purpose, an overhanging structure that an angent
+!--                can walk beneath (e.g. a doorway) is not considered an
+!--                obstacle.
+                   IF ( ALL( buildings_f%var_3d(0:k_head,j,i) == 0 ) ) THEN
+                      obstacle_height(i,j) = 0.
+                   ENDIF
+                ENDDO
+             ENDDO
+          ELSE
+             DO j = 0, ny
+                DO i = 0, nx
+                   obstacle_height(i,j) = buildings_f%var_2d(j,i)
+                ENDDO
+             ENDDO
+          ENDIF
+       ELSE
+          WRITE(*,*) 'No building data was read from file. There will be no' //&
+                     'navigation data available to agents.'
+       ENDIF
+       
+    END SUBROUTINE netcdf_data_input_topo
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Checks if a given variables is on file
+!------------------------------------------------------------------------------!
+    FUNCTION check_existence( vars_in_file, var_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*) ::  var_name                   !< variable to be checked
+       CHARACTER(LEN=*), DIMENSION(:) ::  vars_in_file !< list of variables in file
+
+       INTEGER(iwp) ::  i                              !< loop variable
+
+       LOGICAL ::  check_existence                     !< flag indicating whether a variable exist or not - actual return value
+
+       i = 1
+       check_existence = .FALSE.
+       DO  WHILE ( i <= SIZE( vars_in_file ) )
+          check_existence = TRIM( vars_in_file(i) ) == TRIM( var_name )  .OR.  &
+                            check_existence
+          i = i + 1
+       ENDDO
+
+       RETURN
+
+    END FUNCTION check_existence
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Closes an existing netCDF file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE close_input_file( id )
+#if defined( __netcdf )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp), INTENT(INOUT)        ::  id        !< file id
+
+       nc_stat = NF90_CLOSE( id )
+       CALL handle_error( 'close', 537 )
+#endif
+    END SUBROUTINE close_input_file
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Opens an existing netCDF file for reading only and returns its id.
+!------------------------------------------------------------------------------!
+    SUBROUTINE open_read_file( filename, id )
+#if defined( __netcdf )
+
+       IMPLICIT NONE
+
+       CHARACTER (LEN=*), INTENT(IN) ::  filename  !< filename
+       INTEGER(iwp), INTENT(INOUT)   ::  id        !< file id
+
+       nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id )
+
+       CALL handle_error( 'open_read_file', 536 )
+
+#endif
+    END SUBROUTINE open_read_file
+
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Get dimension array for a given dimension
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_dimension_length( id, dim_len, variable_name )
+#if defined( __netcdf )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name    !< dimension name 
+       CHARACTER(LEN=100)          ::  dum              !< dummy variable to receive return character
+
+       INTEGER(iwp)                ::  dim_len          !< dimension size
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_dim           !< dimension id
+
+!
+!--    First, inquire dimension ID
+       nc_stat = NF90_INQ_DIMID( id, TRIM( variable_name ), id_dim )
+       CALL handle_error( 'get_dimension_length', 526 )
+!
+!--    Inquire dimension length
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim, dum, LEN = dim_len )
+       CALL handle_error( 'get_dimension_length', 526 ) 
+
+#endif
+    END SUBROUTINE get_dimension_length
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 1D integer variable from file. 
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_variable_1d_int( id, variable_name, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name    !< variable name 
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< dimension id
+
+       INTEGER(iwp), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    First, inquire variable ID
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+       CALL handle_error( 'get_variable_1d_int', 527 )
+!
+!--    Inquire dimension length
+       nc_stat = NF90_GET_VAR( id, id_var, var )
+       CALL handle_error( 'get_variable_1d_int', 527 ) 
+
+#endif
+    END SUBROUTINE get_variable_1d_int
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 1D float variable from file. 
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_variable_1d_real( id, variable_name, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  variable_name    !< variable name 
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< dimension id
+
+       REAL(wp), DIMENSION(:), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    First, inquire variable ID
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+       CALL handle_error( 'get_variable_1d_real', 527 )
+!
+!--    Inquire dimension length
+       nc_stat = NF90_GET_VAR( id, id_var, var )
+       CALL handle_error( 'get_variable_1d_real', 527 ) 
+
+#endif
+    END SUBROUTINE get_variable_1d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 2D REAL variable from a file. Reading is done processor-wise, 
+!> i.e. each core reads its own domain in slices along x. 
+!------------------------------------------------------------------------------! 
+    SUBROUTINE get_variable_2d_real( id, variable_name, i, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp), INTENT(IN)      ::  i               !< index along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+
+       REAL(wp), DIMENSION(0:ny), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, var(0:ny),                          &
+                               start = (/ i+1, 1 /),                           &
+                               count = (/ 1, ny + 1 /) )
+
+       CALL handle_error( 'get_variable_2d_real', 528 )
+#endif
+    END SUBROUTINE get_variable_2d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 2D 32-bit INTEGER variable from file. Reading is done processor-wise, 
+!> i.e. each core reads its own domain in slices along x. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_2d_int32( id, variable_name, i, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp), INTENT(IN)      ::  i               !< index along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp), DIMENSION(0:ny), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, var(0:ny),                          &
+                               start = (/ i+1, 1 /),                           &
+                               count = (/ 1, ny + 1 /) )
+
+       CALL handle_error( 'get_variable_2d_int32', 529 )
+#endif
+    END SUBROUTINE get_variable_2d_int32
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 2D 8-bit INTEGER variable from file. Reading is done processor-wise, 
+!> i.e. each core reads its own domain in slices along x. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_2d_int8( id, variable_name, i, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp), INTENT(IN)      ::  i               !< index along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(KIND=1), DIMENSION(0:ny), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, var(0:ny),                          &
+                               start = (/ i+1, 1 /),                           &
+                               count = (/ 1, ny + 1 /) )
+
+       CALL handle_error( 'get_variable_2d_int8', 530 )
+#endif
+    END SUBROUTINE get_variable_2d_int8
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 3D 8-bit INTEGER variable from file.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_3d_int8( id, variable_name, i, j, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp), INTENT(IN)      ::  i               !< index along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp), INTENT(IN)      ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  n_file          !< number of data-points along 3rd dimension
+
+       INTEGER(iwp), DIMENSION(1:3)  ::  id_dim
+
+       INTEGER( KIND = 1 ), DIMENSION(0:buildings_f%nz-1), INTENT(INOUT) ::  var  !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Get length of first dimension, required for the count parameter.
+!--    Therefore, first inquired dimension ids
+       nc_stat = NF90_INQUIRE_VARIABLE( id, id_var, DIMIDS = id_dim )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim(3), LEN = n_file )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, var,                                &
+                               start = (/ i+1, j+1, 1 /),                      &
+                               count = (/ 1, 1, n_file /) )
+
+       CALL handle_error( 'get_variable_3d_int8', 531 )
+#endif
+    END SUBROUTINE get_variable_3d_int8
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 3D float variable from file.  
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_3d_real( id, variable_name, i, j, var )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp), INTENT(IN)      ::  i               !< index along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp), INTENT(IN)      ::  j               !< index along y direction
+       INTEGER(iwp)                  ::  n3              !< number of data-points along 3rd dimension
+
+       INTEGER(iwp), DIMENSION(3)    ::  id_dim
+
+       REAL(wp), DIMENSION(:), INTENT(INOUT) ::  var     !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Get length of first dimension, required for the count parameter.
+!--    Therefore, first inquired dimension ids
+       nc_stat = NF90_INQUIRE_VARIABLE( id, id_var, DIMIDS = id_dim )
+       nc_stat = NF90_INQUIRE_DIMENSION( id, id_dim(3), LEN = n3 )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, var,                                &
+                               start = (/ i+1, j+1, 1 /),                      &
+                               count = (/ 1, 1, n3 /) )
+
+       CALL handle_error( 'get_variable_3d_real', 532 )
+#endif
+    END SUBROUTINE get_variable_3d_real
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads a 4D float variable from file. Note, in constrast to 3D versions, 
+!> dimensions are already inquired and passed so that they are known here.
+!------------------------------------------------------------------------------!
+    SUBROUTINE get_variable_4d_real( id, variable_name, i, j, var, n3, n4 )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)              ::  variable_name   !< variable name
+
+       INTEGER(iwp), INTENT(IN)      ::  i               !< index along x direction
+       INTEGER(iwp), INTENT(IN)      ::  id              !< file id
+       INTEGER(iwp)                  ::  id_var          !< variable id
+       INTEGER(iwp), INTENT(IN)      ::  j               !< index along y direction
+       INTEGER(iwp), INTENT(IN)      ::  n3              !< number of data-points along 3rd dimension
+       INTEGER(iwp), INTENT(IN)      ::  n4              !< number of data-points along 4th dimension
+
+       REAL(wp), DIMENSION(:,:), INTENT(INOUT) ::  var     !< variable to be read
+#if defined( __netcdf )
+
+!
+!--    Inquire variable id
+       nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+!
+!--    Get variable
+       nc_stat = NF90_GET_VAR( id, id_var, var,                                &
+                               start = (/ i+1, j+1, 1, 1 /),                   &
+                               count = (/ 1, 1, n3, n4 /) )
+
+       CALL handle_error( 'get_variable_4d_real', 533 )
+#endif
+    END SUBROUTINE get_variable_4d_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Prints out a text message corresponding to the current status.
+!------------------------------------------------------------------------------!
+    SUBROUTINE handle_error( routine_name, errno )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=6) ::  message_identifier
+       CHARACTER(LEN=*) ::  routine_name
+       CHARACTER(LEN=100) ::  message_string
+
+       INTEGER(iwp) ::  errno
+#if defined( __netcdf )
+
+       IF ( nc_stat /= NF90_NOERR )  THEN
+
+          WRITE( message_identifier, '(''NC'',I4.4)' )  errno
+          
+          message_string = TRIM( NF90_STRERROR( nc_stat ) )
+
+          WRITE(*,*) routine_name,'  ', message_identifier,'  ', TRIM(message_string)
+          WRITE(*,*) 'Aborting NavMesh-tool'
+
+       ENDIF
+
+#endif
+    END SUBROUTINE handle_error
+
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Inquires the variable names belonging to a file. 
+!------------------------------------------------------------------------------!
+    SUBROUTINE inquire_variable_names( id, var_names )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*), DIMENSION(:), INTENT(INOUT) ::  var_names   !< return variable - variable names
+       INTEGER(iwp)                                  ::  i           !< loop variable
+       INTEGER(iwp), INTENT(IN)                      ::  id          !< file id
+       INTEGER(iwp)                                  ::  num_vars    !< number of variables (unused return parameter)
+       INTEGER(iwp), DIMENSION(:), ALLOCATABLE       ::  varids      !< dummy array to strore variable ids temporarily
+#if defined( __netcdf )
+
+       ALLOCATE( varids(1:SIZE(var_names)) )
+       nc_stat = NF90_INQ_VARIDS( id, NVARS = num_vars, VARIDS = varids )
+       CALL handle_error( 'inquire_variable_names', 535 )
+
+       DO  i = 1, SIZE(var_names)
+          nc_stat = NF90_INQUIRE_VARIABLE( id, varids(i), NAME = var_names(i) )
+          CALL handle_error( 'inquire_variable_names', 535 )
+       ENDDO
+
+       DEALLOCATE( varids )
+#endif
+    END SUBROUTINE inquire_variable_names
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type INTEGER (32-bit)
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_int32( id, attribute_name, value, global,        &
+                                     variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL  ::  variable_name    !< variable name 
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+       INTEGER(iwp), INTENT(INOUT) ::  value            !< read value
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+#if defined( __netcdf )
+
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int32 global', 522 )
+!
+!--    Read attributes referring to a single variable. Therefore, first inquire 
+!--    variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_int32', 522 )
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int32', 522 )       
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_int32
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type INTEGER (8-bit)
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_int8( id, attribute_name, value, global,         &
+                                    variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL  ::  variable_name    !< variable name 
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+       INTEGER(KIND=1), INTENT(INOUT) ::  value         !< read value
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+#if defined( __netcdf )
+
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int8 global', 523 )
+!
+!--    Read attributes referring to a single variable. Therefore, first inquire 
+!--    variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_int8', 523 )
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_int8', 523 )       
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_int8
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type REAL
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_real( id, attribute_name, value, global,         &
+                                    variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)            ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL  ::  variable_name    !< variable name 
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+
+       REAL(wp), INTENT(INOUT)     ::  value            !< read value
+#if defined( __netcdf )
+
+
+!
+!-- Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_real global', 524 )
+!
+!-- Read attributes referring to a single variable. Therefore, first inquire 
+!-- variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_real', 524 )
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_real', 524 )       
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_real
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reads global or variable-related attributes of type CHARACTER
+!> Remark: reading attributes of type NF_STRING return an error code 56 -
+!> Attempt to convert between text & numbers.
+!------------------------------------------------------------------------------!
+     SUBROUTINE get_attribute_string( id, attribute_name, value, global,       &
+                                      variable_name )
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=*)                ::  attribute_name   !< attribute name
+       CHARACTER(LEN=*), OPTIONAL      ::  variable_name    !< variable name 
+       CHARACTER(LEN=*), INTENT(INOUT) ::  value            !< read value
+
+       INTEGER(iwp), INTENT(IN)    ::  id               !< file id
+       INTEGER(iwp)                ::  id_var           !< variable id
+
+       LOGICAL, INTENT(IN) ::  global                   !< flag indicating global attribute
+#if defined( __netcdf )
+
+!
+!--    Read global attribute
+       IF ( global )  THEN
+          nc_stat = NF90_GET_ATT( id, NF90_GLOBAL, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_string global', 525 )
+!
+!--    Read attributes referring to a single variable. Therefore, first inquire 
+!--    variable id
+       ELSE
+          nc_stat = NF90_INQ_VARID( id, TRIM( variable_name ), id_var )
+          CALL handle_error( 'get_attribute_string', 525 )
+
+          nc_stat = NF90_GET_ATT( id, id_var, TRIM( attribute_name ), value )
+          CALL handle_error( 'get_attribute_string',525 )
+       ENDIF
+#endif
+    END SUBROUTINE get_attribute_string
+
+ END MODULE
+
+ MODULE mod_functions
+
+    USE kinds
+
+    PRIVATE
+    PUBLIC dist_point_to_edge, intersect, is_left, is_right
+
+    CONTAINS
+
+!
+!-- Calculates distance of point P to edge (A,B). If A = B, calculates
+!-- point-to-point distance from A/B to P
+    FUNCTION dist_point_to_edge ( a_x, a_y, b_x, b_y, p_x, p_y )
+
+       IMPLICIT NONE
+
+       REAL(wp)  :: ab_x                !< x-coordinate of vector from A to B
+       REAL(wp)  :: ab_y                !< y-coordinate of vector from A to B
+       REAL(wp)  :: ab_d                !< inverse length of vector from A to B
+       REAL(wp)  :: ab_u_x              !< x-coordinate of vector with direction of ab and length 1
+       REAL(wp)  :: ab_u_y              !< y-coordinate of vector with direction of ab and length 1
+       REAL(wp)  :: ba_x                !< x-coordinate of vector from B to A
+       REAL(wp)  :: ba_y                !< y-coordinate of vector from B to A
+       REAL(wp)  :: ap_x                !< x-coordinate of vector from A to P
+       REAL(wp)  :: ap_y                !< y-coordinate of vector from A to P
+       REAL(wp)  :: bp_x                !< x-coordinate of vector from B to P
+       REAL(wp)  :: bp_y                !< y-coordinate of vector from B to P
+       REAL(wp)  :: a_x                 !< x-coordinate of point A of edge
+       REAL(wp)  :: a_y                 !< y-coordinate of point A of edge
+       REAL(wp)  :: b_x                 !< x-coordinate of point B of edge
+       REAL(wp)  :: b_y                 !< y-coordinate of point B of edge
+       REAL(wp)  :: p_x                 !< x-coordinate of point P
+       REAL(wp)  :: p_y                 !< y-coordinate of point P
+       REAL(wp)  :: dist_x              !< x-coordinate of point P
+       REAL(wp)  :: dist_y              !< y-coordinate of point P
+       REAL(wp)  :: dist_point_to_edge  !< y-coordinate of point P
+
+       ab_x = - a_x + b_x
+       ab_y = - a_y + b_y
+       ba_x = - b_x + a_x 
+       ba_y = - b_y + a_y 
+       ap_x = - a_x + p_x
+       ap_y = - a_y + p_y
+       bp_x = - b_x + p_x
+       bp_y = - b_y + p_y
+
+       IF ( ab_x * ap_x + ab_y * ap_y <= 0. ) THEN
+          dist_point_to_edge = SQRT((a_x - p_x)**2 + (a_y - p_y)**2)
+       ELSEIF ( ba_x * bp_x + ba_y * bp_y <= 0. ) THEN
+          dist_point_to_edge = SQRT((b_x - p_x)**2 + (b_y - p_y)**2)
+       ELSE
+          ab_d = 1./SQRT((ab_x)**2+(ab_y)**2)
+          ab_u_x = ab_x*ab_d
+          ab_u_y = ab_y*ab_d
+          dist_x = ap_x - (ap_x*ab_u_x+ap_y*ab_u_y)*ab_u_x
+          dist_y = ap_y - (ap_x*ab_u_x+ap_y*ab_u_y)*ab_u_y
+          dist_point_to_edge = SQRT( dist_x**2 + dist_y**2 )
+       ENDIF
+
+       RETURN
+
+    END FUNCTION dist_point_to_edge
+
+!
+!-- Returns true if the line segments AB and PQ share an intersection
+    FUNCTION intersect ( ax, ay, bx, by, px, py, qx, qy )
+
+       IMPLICIT NONE
+
+       LOGICAL  :: intersect !< return value; TRUE if intersection was found
+       LOGICAL  :: la        !< T if a is left of PQ
+       LOGICAL  :: lb        !< T if b is left of PQ
+       LOGICAL  :: lp        !< T if p is left of AB
+       LOGICAL  :: lq        !< T if q is left of AB
+       LOGICAL  :: poss      !< flag that indicates if an intersection is still possible
+       LOGICAL  :: ra        !< T if a is right of PQ
+       LOGICAL  :: rb        !< T if b is right of PQ
+       LOGICAL  :: rp        !< T if p is right of AB
+       LOGICAL  :: rq        !< T if q is right of AB
+
+       REAL(wp)  :: ax     !< x-coordinate of point A
+       REAL(wp)  :: ay     !< y-coordinate of point A
+       REAL(wp)  :: bx     !< x-coordinate of point B
+       REAL(wp)  :: by     !< y-coordinate of point B
+       REAL(wp)  :: px     !< x-coordinate of point P
+       REAL(wp)  :: py     !< y-coordinate of point P
+       REAL(wp)  :: qx     !< x-coordinate of point Q
+       REAL(wp)  :: qy     !< y-coordinate of point Q
+
+       intersect = .FALSE.
+       poss      = .FALSE.
+!
+!--    Intersection is possible only if P and Q are on opposing sides of AB
+       lp = is_left(ax,ay,bx,by,px,py)
+       rq = is_right(ax,ay,bx,by,qx,qy)
+       IF ( lp .AND. rq ) poss = .TRUE.
+       IF ( .NOT. poss ) THEN
+          lq = is_left(ax,ay,bx,by,qx,qy)
+          rp = is_right(ax,ay,bx,by,px,py)
+          IF ( lq .AND. rp ) poss = .TRUE.
+       ENDIF
+!
+!--    Intersection occurs only if above test (poss) was true AND
+!--    A and B are on opposing sides of PQ
+       IF ( poss ) THEN
+          la = is_left(px,py,qx,qy,ax,ay)
+          rb = is_right(px,py,qx,qy,bx,by)
+          IF ( la .AND. rb ) intersect = .TRUE.
+          IF ( .NOT. intersect ) THEN
+             lb = is_left(px,py,qx,qy,bx,by)
+             ra = is_right(px,py,qx,qy,ax,ay)
+             IF ( lb .AND. ra ) intersect = .TRUE.
+          ENDIF
+       ENDIF
+
+       RETURN
+
+    END FUNCTION intersect 
+
+!
+!-- Calculates if point P is left of the infinite
+!-- line that contains A and B (direction: A to B) 
+!-- Concept: 2D rotation of two vectors
+    FUNCTION is_left ( ax, ay, bx, by, px, py )
+
+       IMPLICIT NONE
+
+       LOGICAL  :: is_left !< return value; TRUE if P is left of AB
+
+       REAL(wp)  :: ax     !< x-coordinate of point A
+       REAL(wp)  :: ay     !< y-coordinate of point A
+       REAL(wp)  :: bx     !< x-coordinate of point B
+       REAL(wp)  :: by     !< y-coordinate of point B
+       REAL(wp)  :: px     !< x-coordinate of point P
+       REAL(wp)  :: py     !< y-coordinate of point P
+!
+!--    2D-rotation
+       is_left = (bx-ax)*(py-ay)-(px-ax)*(by-ay) > 0
+!
+!--    False if the point is on the line (or very close)
+       IF ( (ABS(ax-px) < .001 .AND. ABS(ay-py) < .001) .OR.                  &
+            (ABS(bx-px) < .001 .AND. ABS(by-py) < .001) )                     &
+       THEN
+          is_left = .FALSE.
+       ENDIF
+
+       RETURN
+
+    END FUNCTION is_left 
+
+!
+!-- Calculates if point P is right of the infinite
+!-- line that contains A and B (direction: A to B) 
+!-- Concept: 2D rotation of two vectors
+    FUNCTION is_right ( ax, ay, bx, by, px, py )
+
+       IMPLICIT NONE
+
+       LOGICAL  :: is_right !< return value; TRUE if P is right of AB
+
+       REAL(wp), INTENT(IN)  :: ax     !< x-coordinate of point A
+       REAL(wp), INTENT(IN)  :: ay     !< y-coordinate of point A
+       REAL(wp), INTENT(IN)  :: bx     !< x-coordinate of point B
+       REAL(wp), INTENT(IN)  :: by     !< y-coordinate of point B
+       REAL(wp), INTENT(IN)  :: px     !< x-coordinate of point P
+       REAL(wp), INTENT(IN)  :: py     !< y-coordinate of point P
+
+!
+!--    2D-rotation
+       is_right = (bx-ax)*(py-ay)-(px-ax)*(by-ay) < 0
+!
+!--    False if the point is on the line (or very close)
+       IF ( (ABS(ax-px) < .001 .AND. ABS(ay-py) < .001) .OR.                  &
+            (ABS(bx-px) < .001 .AND. ABS(by-py) < .001) )                     &
+       THEN
+          is_right = .FALSE.
+       ENDIF
+
+       RETURN
+
+    END FUNCTION is_right 
+
+ END MODULE mod_functions
+ 
+ MODULE polygon_creation
+
+    USE kinds
+
+    USE mod_functions
+
+    USE variables
+
+    USE data_input
+
+    CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initialisation, allocation, and reading of some input
+!------------------------------------------------------------------------------!
+    SUBROUTINE init
+
+       IMPLICIT NONE
+
+       CHARACTER(LEN=255) ::  dirname      !< dummy to read current working directory
+       CHARACTER(LEN=255) ::  rundir       !< base run directory
+       CHARACTER(LEN=255) ::  input_trunk  !< base filename for run including path
+       CHARACTER(LEN=80) ::  line          !< string to identify namelist
+       CHARACTER(LEN=80) ::  line_dum      !< line dummy for error output
+
+       CHARACTER(LEN=2),DIMENSION(1:5) ::  run_pars  !< parameters from other namelist
+
+       INTEGER(iwp) ::  ie            !< end index (string manipulation)
+       INTEGER(iwp) ::  is            !< start index (string manipulation)
+       INTEGER(iwp) ::  line_counter  !< line on which reading error occured
+
+       LOGICAL ::  p3d_flag = .FALSE.  !< indicates whether p3d file was found
+
+       NAMELIST /prepro_par/  flag_2d, internal_buildings, tolerance_dp
+
+       WRITE(*,'(1X,A)')                                                        &
+                 "o----------------------------------------------o",           &
+                 "| o------------------------------------------o |",           &
+                 "| |         __   ____  ____       ____       | |",           &
+                 "| |        / _\ (  _ \(_  _) ___ (  _ \      | |",           &
+                 "| |       /    \ ) __/  )(  (___) ) __/      | |",           &
+                 "| |       \_/\_/(__)   (__)      (__)        | |",           &
+                 "| |                                          | |",           &
+                 "| |    Agent Preprocessing Tool for PALM     | |",           &
+                 "| o------------------------------------------o |",           &
+                 "o----------------------------------------------o"
+
+!
+!--    Identify run name and Input files
+       CALL GET_ENVIRONMENT_VARIABLE('PWD', dirname)
+       ie = INDEX(dirname, '/', BACK=.TRUE.)
+       is = INDEX(dirname(1:ie-1), '/', BACK=.TRUE.)
+       IF ( TRIM(ADJUSTL(dirname(ie+1:))) /= 'INPUT' ) THEN
+          WRITE(*,'(3X,A)') 'NavMesh was called from',                         &
+                            ' ', TRIM(ADJUSTL(dirname)), ' ',                  &
+                            'and is now aborting. Please call this tool',      &
+                            'from the INPUT-folder of your job directory.'
+          STOP
+       ENDIF
+       runname = TRIM(ADJUSTL(dirname(is+1:ie-1)))
+       rundir  = TRIM(ADJUSTL(dirname(1:ie)))
+       input_trunk = TRIM(rundir)//'INPUT/'//TRIM(runname)
+
+!
+!--    Check for parameter file
+       INQUIRE( FILE = TRIM( input_trunk )//'_p3d', EXIST = p3d_flag )
+       IF ( .NOT. p3d_flag ) THEN
+          WRITE(*,'(3(3X,A,/))') 'No _p3d file was found. Aborting.',          &
+                                 'I was looking for the file',                 &
+                                 TRIM( input_trunk )//'_p3d'
+          STOP
+       ELSE
+          WRITE(*,'(2(3X,A,/))') 'The following input file will be used:',     & 
+                                  TRIM( input_trunk )//'_p3d'
+       ENDIF
+
+!
+!--    Read run parameters from run parameter file (_p3d), though not from
+!--    namelist.
+       run_pars = (/'dx','dy','dz','nx','ny'/)
+       OPEN ( 11, FILE=TRIM(input_trunk)//'_p3d', FORM='FORMATTED',    &
+                     STATUS='OLD' )
+       DO i = 1, SIZE(run_pars)
+          REWIND ( 11 )
+          line = ' '
+          DO   WHILE ( INDEX( line, run_pars(i) ) == 0 )
+             READ ( 11, '(A)', END=10 )  line
+             IF ( INDEX(line, '!') /= 0 ) THEN
+                IF ( INDEX(line, run_pars(i)) > INDEX(line, '!' ) ) THEN
+                   line = ' '
+                   CYCLE
+                ENDIF
+             ENDIF
+          ENDDO
+          line = TRIM(ADJUSTL(line(INDEX(line,'=')+1:INDEX(line,',')-1)))
+          SELECT CASE (i)
+             CASE(1)
+                READ(line,*) dx
+             CASE(2) 
+                READ(line,*) dy
+             CASE(3) 
+                READ(line,*) dz
+             CASE(4) 
+                READ(line,*) nx
+             CASE(5) 
+                READ(line,*) ny
+             CASE DEFAULT
+          END SELECT
+       ENDDO
+10     CONTINUE
+
+!
+!--    Try to find prepro package
+       REWIND ( 11 )
+       line = ' '
+       DO   WHILE ( INDEX( line, '&prepro_par' ) == 0 )
+          READ ( 11, '(A)', END=40 )  line
+       ENDDO
+       BACKSPACE ( 11 )
+
+!
+!--    Read user-defined namelist
+       READ ( 11, prepro_par, ERR = 20, END = 40 )
+       GOTO 40
+
+ 20    BACKSPACE( 11 )
+       READ( 11 , '(A)') line
+
+       line_dum = ' '
+       line_counter = 0
+
+       REWIND( 11 )
+       DO WHILE ( INDEX( line_dum, TRIM(line) ) == 0 )
+          READ ( 11, '(A)', END=30 )  line_dum
+          line_counter = line_counter + 1
+       ENDDO
+
+ 30    WRITE( *, '(A,/,A,I3,A,/,A)' ) 'Error(s) in NAMELIST prepro_par.',      &
+                                      'Reading fails on line ', line_counter,  &
+                                      ' at ', TRIM(ADJUSTL(line))
+       STOP
+
+ 40    CONTINUE
+       CLOSE( 11 )
+
+!
+!--    If tolerance_dp was not set, put in default values
+       DO i = 0, 2
+          IF ( tolerance_dp(i) > 999998.0_wp ) THEN
+             tolerance_dp(i) = SQRT(dx*dy)*1.41/(2**i)
+          ELSE
+             tolerance_dp(i) = tolerance_dp(i)*SQRT(dx*dy)
+          ENDIF
+       ENDDO
+
+!
+!--    Allocate arrays
+       ALLOCATE(obstacle_height(-3:nx+3,-3:ny+3), polygon_id(-3:nx+3,-3:ny+3), &
+                wall_flags_0(-3:nx+3,-3:ny+3), grid(-3:nx+3,-3:ny+3))
+!
+!--    Set null_vertex
+       CALL set_vertex(null_vertex,0.0_wp,0.0_wp)
+!
+!--    Some initializations
+       ddx = 1./dx
+       ddy = 1./dy
+
+       polygon_id                = 0
+       obstacle_height           = 0.
+
+       grid%checked              = .FALSE.
+       grid(-3:-1,:)%checked     = .TRUE.
+       grid(nx+1:nx+3,:)%checked = .TRUE.
+       grid(:,-3:-1)%checked     = .TRUE.
+       grid(:,ny+1:ny+3)%checked = .TRUE.
+       grid%polygon_id           = 0
+!
+!--    Open files and topography/building data
+       CALL netcdf_data_input_topo ( TRIM(input_trunk) )
+
+    END SUBROUTINE init
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Identifies all grid boxes that belong to a building and assigns a building
+!> number to each grid box.
+!> Method: Scans each grid point. If a grid point was not previously checked
+!>         and contains a building, it is added to a new polygon and marked as
+!>         checked. Then, all its neighbors that also contain a building are
+!>         added to the same polygon and marked as checked. All neighbors of
+!>         neighbors are subsequently found, added and checked until none are
+!>         left. Then, the initial scan continues, skipping already checked
+!>         grid points. Once a grid point with a new building is found, the
+!>         polygon_id increases and the grid point and all others that belong
+!>         to the same building are added as described above.
+!> NOTE:   This procedure will identify grid points that are only connected
+!>         diagonally (share only one point with each other) as connected and
+!>         have them belonging to the same building. This is necessary, as an
+!>         agent will not be able to traverse between these grid points and the
+!>         navigation mesh will therefore have to make him circumvent this
+!>         point.
+!------------------------------------------------------------------------------!
+    SUBROUTINE identify_polygons
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  ii    !< local counter
+       INTEGER(iwp) ::  il    !< local counter
+       INTEGER(iwp) ::  jj    !< local counter
+       INTEGER(iwp) ::  jl    !< local counter
+       INTEGER(iwp) ::  gpil  !< number of grid points in list
+       INTEGER(iwp) ::  gpta  !< number of grid points to add to grid_list
+
+       TYPE(grid_point), DIMENSION(1:7) ::  add_to_grid_list !< grid points to be added to the list
+
+       TYPE(grid_point), DIMENSION(:), ALLOCATABLE ::  dummy_grid_list !< dummy for reallocation of grid_list
+       TYPE(grid_point), DIMENSION(:), ALLOCATABLE ::  grid_list       !< list of grid points that belong to the current building but whose neighbors have not been checked yet
+
+!
+!--    Initialize wall_flags array: 1 where no buildings, 0 where buildings
+       wall_flags_0 = 1
+       DO i = 0, nx
+          DO j = 0, ny
+             IF ( obstacle_height(i,j) > 0 ) THEN
+                wall_flags_0(i,j) = 0
+             ENDIF
+          ENDDO
+       ENDDO
+       DEALLOCATE(obstacle_height)
+       polygon_counter = 0
+       gpil = 0
+       gpta = 0
+       ALLOCATE(grid_list(1:100))
+!
+!--    Declare all grid points that contain no buildings as already checked.
+!--    This way, these points will be skipped in the following calculation and
+!--    will have polygon_id = 0
+       DO i = 0, nx
+          DO j = 0, ny
+             IF ( BTEST( wall_flags_0(i,j), 0 ) ) THEN
+                grid(i,j)%checked = .TRUE.
+             ENDIF
+          ENDDO
+       ENDDO
+!
+!--    Check all grid points and process them
+       DO i = 0, nx
+          DO j = 0, ny
+!
+!--          If the current grid point has not been checked, mark it as checked.
+!--          As it is the first point belonging to a new building, increase the
+!--          polygon_id counter and associate the grid point with that id.
+             IF ( .NOT. grid(i,j)%checked ) THEN
+                polygon_counter = polygon_counter + 1
+                grid(i,j)%polygon_id = polygon_counter
+                grid(i,j)%checked = .TRUE.
+!
+!--             Check if any neighbors of the found grid point are part of a 
+!--             building too. If so, add them to the list of grid points
+!--             that have to be checked and associate them with the same polygon
+                gpta = 0
+                DO ii = i-1, i+1
+                   DO jj = j-1, j+1
+                      IF ( ii == i .AND. jj == j ) CYCLE
+                      IF ( .NOT. grid(ii,jj)%checked ) THEN
+                         gpta = gpta + 1
+                         add_to_grid_list(gpta)%i = ii
+                         add_to_grid_list(gpta)%j = jj
+                      ENDIF
+                   ENDDO
+                ENDDO
+
+!
+!--             Change size of grid_list if it becomes too small
+                IF ( gpil + gpta > SIZE(grid_list) ) THEN
+                   ALLOCATE(dummy_grid_list(1:gpil))
+                   dummy_grid_list = grid_list(1:gpil)
+                   DEALLOCATE(grid_list)
+                   ALLOCATE(grid_list(1:2*(gpil+gpta)))
+                   grid_list(1:gpil) = dummy_grid_list(1:gpil)
+                   DEALLOCATE(dummy_grid_list)
+                ENDIF
+!
+!--             If there are grid points to add to grid_list, add them
+                IF ( gpta > 0 ) THEN
+                   grid_list(gpil+1:gpil+gpta) = add_to_grid_list(1:gpta)
+                   gpil = gpil + gpta
+                ENDIF
+!
+!--             Handle all grid points in grid_list until there are none left
+                DO WHILE (gpil>0)
+                   il = grid_list(gpil)%i
+                   jl = grid_list(gpil)%j
+                   grid(il,jl)%polygon_id = polygon_counter
+                   grid(il,jl)%checked = .TRUE.
+!
+!--                this grid point in the list is processed, so the number of
+!--                grid points in the list can be reduced by one
+                   gpil = gpil - 1
+                   gpta = 0
+!
+!--                For the current grid point, check if any unchecked
+!--                neighboring grid points also contain a building. All such
+!--                grid points are added to the list of grid points to be
+!--                handled in this loop
+                   DO ii = il-1, il+1
+                      DO jj = jl-1, jl+1
+                         IF ( jj == jl .AND. ii == il ) CYCLE
+                         IF ( .NOT. grid(ii,jj)%checked )                      &
+                         THEN
+                            gpta = gpta + 1
+                            add_to_grid_list(gpta)%i = ii
+                            add_to_grid_list(gpta)%j = jj
+                         ENDIF
+                      ENDDO
+                   ENDDO
+!
+!--                Change size of grid list if it becomes too small
+                   IF ( gpil + gpta > SIZE(grid_list) ) THEN
+                      ALLOCATE(dummy_grid_list(1:gpil))
+                      dummy_grid_list = grid_list(1:gpil)
+                      DEALLOCATE(grid_list)
+                      ALLOCATE(grid_list(1:2*(gpil+gpta)))
+                      grid_list(1:gpil) = dummy_grid_list(1:gpil)
+                      DEALLOCATE(dummy_grid_list)
+                   ENDIF
+!
+!--                If there are grid points to add to list, add them
+                   IF ( gpta > 0 ) THEN
+                      grid_list(gpil+1:gpil+gpta) = add_to_grid_list(1:gpta)
+                      gpil = gpil + gpta
+                   ENDIF
+                ENDDO
+             ENDIF
+          ENDDO
+       ENDDO
+       DEALLOCATE(grid_list)
+!
+!--    Set size of polygon array and initialize
+       ALLOCATE(polygons(1:polygon_counter))
+       polygons%nov = 0
+
+    END SUBROUTINE identify_polygons
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Identifies the corners of the PALM building topography and adds them to
+!> a specific polygon for each building as vertices. This converts the gridded
+!> building data into one polygon per building that contains the coordinates of
+!> each inner and outer corner of that building as vertices.
+!> A grid point contains an outer corner if it's part of a building and exactly
+!>   one of its horizontal and one of its vertical neighbors is also part of a
+!>   building (4 cases).
+!> A grid point contains an inner corner if it's not part of a building and
+!>   exactly one of its horizontal, one of its diagonal and one of its vertical
+!>   neighbors are each part of a building and in turn neighbors
+!>   to each other (4 cases).
+!------------------------------------------------------------------------------!
+    SUBROUTINE identify_corners
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  p_id  !< current polygon_id
+!
+!--    For all grid points, check whether it contains one or more corners
+       DO i = 0, nx
+          DO j = 0, ny
+!
+!--          First, check if grid contains topography and has a corner.
+             IF ( .NOT. BTEST( wall_flags_0(i,j), 0 ) ) THEN
+!
+!--             Corner at south left edge of grid cell
+                IF ( BTEST( wall_flags_0(i-1,j), 0 ) .AND.                     &
+                     BTEST( wall_flags_0(i,j-1), 0 ))                          &
+                THEN
+                   p_id = grid(i,j)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, i*dx, j*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--             Corner at north left edge of grid cell
+                IF ( BTEST( wall_flags_0(i-1,j), 0 ) .AND.                     &
+                     BTEST( wall_flags_0(i,j+1), 0 ))                          &
+                THEN
+                   p_id = grid(i,j)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, i*dx, (j+1)*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--             Corner at north right edge of grid cell
+                IF ( BTEST( wall_flags_0(i+1,j), 0 ) .AND.                     &
+                     BTEST( wall_flags_0(i,j+1), 0 ))                          &
+                THEN
+                   p_id = grid(i,j)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, (i+1)*dx, (j+1)*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--             Corner at south right edge of grid cell
+                IF ( BTEST( wall_flags_0(i+1,j), 0 ) .AND.                     &
+                     BTEST( wall_flags_0(i,j-1), 0 ))                          &
+                THEN
+                   p_id = grid(i,j)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, (i+1)*dx, j*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--          Second, check if grid contains no topography and has a corner.
+             ELSE
+!
+!--             Corner at south left edge of grid cell
+                IF ( .NOT. BTEST( wall_flags_0(i-1,j), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i,j-1), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i-1,j-1), 0 ) )                 &
+                THEN
+                   p_id = grid(i-1,j-1)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, i*dx, j*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--             Corner at north left edge of grid cell
+                IF ( .NOT. BTEST( wall_flags_0(i-1,j), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i,j+1), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i-1,j+1), 0 ) )                 &
+                THEN
+                   p_id = grid(i-1,j+1)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, i*dx, (j+1)*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--             Corner at north right edge of grid cell
+                IF ( .NOT. BTEST( wall_flags_0(i+1,j), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i,j+1), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i+1,j+1), 0 ) )                 &
+                THEN
+                   p_id = grid(i+1,j+1)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, (i+1)*dx, (j+1)*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+!
+!--             Corner at south right edge of grid cell
+                IF ( .NOT. BTEST( wall_flags_0(i+1,j), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i,j-1), 0 ) .AND.               &
+                     .NOT. BTEST( wall_flags_0(i+1,j-1), 0 ) )                 &
+                THEN
+                   p_id = grid(i+1,j-1)%polygon_id
+                   polygons(p_id)%nov = polygons(p_id)%nov + 1
+                   nov = polygons(p_id)%nov
+                   CALL set_vertex(dummy_vertex, (i+1)*dx, j*dy)
+                   CALL add_vertex_to_polygon(dummy_vertex, p_id, nov)
+                ENDIF
+             ENDIF
+          ENDDO
+       ENDDO
+
+    END SUBROUTINE identify_corners
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializes a vertex
+!------------------------------------------------------------------------------!
+    SUBROUTINE set_vertex (in_vertex, x, y)
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  x  !< x-coordinate of vertex position
+       REAL(wp) ::  y  !< y-coordinate of vertex position
+
+       TYPE(vertex_type) ::  in_vertex  !< vertex to be set
+
+       in_vertex%delete             = .FALSE.
+       in_vertex%x                  = x
+       in_vertex%y                  = y
+
+    END SUBROUTINE set_vertex
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Adds an existing vertex to the polygon with ID p_id at position in_nov
+!------------------------------------------------------------------------------!
+    SUBROUTINE add_vertex_to_polygon ( in_vertex, p_id, in_nov)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  in_nov  !< counter of vertex being added to polygon
+       INTEGER(iwp) ::  p_id    !< polygon ID
+       INTEGER(iwp) ::  sop     !< size of vertices array
+
+       TYPE(vertex_type) ::  in_vertex  !< vertex to be added
+
+       TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  dummy_v_list  !< for reallocation
+
+       polygon => polygons(p_id)
+!
+!--    Allocate and initialize the vertex array of the polygon, if necessary
+       IF ( .NOT. ALLOCATED(polygon%vertices) ) THEN
+          ALLOCATE(polygon%vertices(1:100))
+          polygon%vertices = null_vertex
+       ENDIF
+!
+!--    Adjust size of polygon, if necessary
+       sop = SIZE(polygon%vertices)
+       IF ( in_nov > sop ) THEN
+          ALLOCATE(dummy_v_list(1:sop))
+          dummy_v_list(1:sop) = polygon%vertices(1:sop)
+          DEALLOCATE(polygon%vertices)
+          ALLOCATE(polygon%vertices(1:2*sop))
+          polygon%vertices = null_vertex
+          polygon%vertices(1:sop) = dummy_v_list(1:sop)
+          DEALLOCATE(dummy_v_list)
+       ENDIF
+       polygon%vertices(in_nov) = in_vertex
+    END SUBROUTINE add_vertex_to_polygon
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Sorts the vertices of a polygon in a counter-clockwise fashion. During this
+!> process, all vertices that are not part of the hull of the building
+!> (inner courtyards) are deleted.
+!------------------------------------------------------------------------------!
+    SUBROUTINE sort_polygon(i_p)
+
+       IMPLICIT NONE
+
+       LOGICAL :: starting_vertex_found
+
+       INTEGER(iwp) ::  counter       !< counter for potential starting vertices
+       INTEGER(iwp) ::  id_neighbor   !< final ID of neighboring vertex
+       INTEGER(iwp) ::  id_neighbor1  !< ID of first potential neighbor
+       INTEGER(iwp) ::  id_neighbor2  !< ID of second potential neighbor
+       INTEGER(iwp) ::  il            !< local counter
+       INTEGER(iwp) ::  i_p           !< index of the current polygon
+       INTEGER(iwp) ::  noc           !< number of candidates
+       INTEGER(iwp) ::  nosv          !< number of sorted vertices
+       INTEGER(iwp) ::  xe            !< x-end-index for building search
+       INTEGER(iwp) ::  xs            !< x-start-index for building search
+       INTEGER(iwp) ::  ye            !< y-end-index for building search
+       INTEGER(iwp) ::  ys            !< y-start-index for building search
+
+       INTEGER, DIMENSION(:), ALLOCATABLE ::  candidate_id  !< ID of the potential neighbors stored in 'candidates'
+       INTEGER, DIMENSION(:), ALLOCATABLE ::  dummy_id_arr  !< used for resizing
+
+       REAL(wp) ::  dist  !< distance of one vertex to its neighbor
+       REAL(wp) ::  m_x   !< min/max x-value of polygon used for starting vertex
+       REAL(wp) ::  m_y   !< min/max y-value of polygon used for starting vertex
+
+       TYPE(vertex_type) ::  current_v     !< current vertex
+       TYPE(vertex_type) ::  dummy_vertex  !< dummy vertex for reordering
+
+       TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  candidates        !< potential neighbors of the current vertex 
+       TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  dummy_vertex_arr  !< used for resizing
+       TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  sorted_p          !< vertices that have been sorted
+
+       starting_vertex_found = .FALSE.
+       ALLOCATE(sorted_p(1:nov))
+       sorted_p(1:nov) = polygon%vertices(1:nov)
+!
+!--    Identify a vertex that is certainly a part of the outer hull of the 
+!--    current polygon: Get rightmost border of polygon (or if that 
+!--    coincides with model border, leftmost) border. Then of those points,
+!--    get northmost (or if that coincides with model domain border, southmost).
+!--    This identifies exactly one point that is then set to the first index.
+       counter = 0
+       IF ( MAXVAL(sorted_p%x) < nx*dx ) THEN
+          m_x = MAXVAL(sorted_p%x)
+       ELSE
+          m_x = MINVAL(sorted_p%x)
+       ENDIF
+       DO il = 1, nov
+          IF ( ABS( sorted_p(il)%x - m_x ) < .01 * dx ) THEN
+             counter = counter + 1
+             dummy_vertex = sorted_p(il)
+             sorted_p(il) = sorted_p(counter)
+             sorted_p(counter) = dummy_vertex
+          ENDIF
+       ENDDO
+       IF ( MAXVAL(sorted_p(1:counter)%y) < ny*dy ) THEN
+          m_y = MAXVAL(sorted_p(1:counter)%y)
+       ELSE
+          m_y = MINVAL(sorted_p(1:counter)%y)
+       ENDIF
+       DO il = 1, counter
+          IF ( ABS(sorted_p(il)%y - m_y) < .01 * dy ) THEN
+             dummy_vertex = sorted_p(il)
+             sorted_p(il) = sorted_p(1)
+             sorted_p(1) = dummy_vertex
+             starting_vertex_found = .TRUE.
+             EXIT
+          ENDIF
+       ENDDO
+!
+!--    If no starting vertex was found for the current polygon, it will be
+!--    deleted and an error message thrown
+       IF ( .NOT. starting_vertex_found ) THEN
+          WRITE(*,'(A,/,A,1X,I6,/,A)')                                          &
+                     'An error occured during polygon sorting:',               &
+                     'no starting vertex could be found for polygon',          &
+                     i_p, 'This polygon contains the following vertices (x/y)'
+          DO il = 1, nov
+             WRITE(*,'(4X,F8.1,1X,F8.1)')                                       &
+                         polygon%vertices(il)%x, polygon%vertices(il)%x
+          ENDDO
+          WRITE(*,'(A,/,A)')                                                   &
+                     'This polygon will be skipped during sorting and deleted',&
+                     'For details on the procedure, see SUBROUTINE sort_polygon.'
+          polygon%vertices%delete = .TRUE.
+          polygons(i_p)%nov = 0
+          CALL delete_empty_polygons
+!
+!--    Find the unique neighbor of the current vertex. For this, first
+!--    determine all possible candidates. Of those, keep only the ones that
+!--    are connected to the current vertex along a building edge (the polygon
+!--    is sorted counter-clockwise. Therefore, the building is always on the 
+!--    left-hand side of the connecting line from the current vertex to its
+!--    potential neighbor). This leaves a maximum of two possible neighbors.
+!--    This is only the case if the current vertex is the point that diagonally
+!--    connects two parts of the same building. In that case, the vertex that
+!--    lies to the right of the connecting line between the previous and
+!--    current vertex is the neighbor.
+       ELSE
+          DO nosv = 1, nov
+             current_v = sorted_p(nosv)
+             noc = 0
+             ALLOCATE(candidates(1:100), candidate_id(1:100))
+!
+!--          Find all candidates that could be neighbors of current vertex:
+!--          these are those vertices that share the same x- or y-coordinate
+!--          with the current vertex, as the vertices are all inner and outer
+!--          corners of the gridded building data
+             IF ( nosv < nov ) THEN
+                DO il = nosv+1, nov
+                   IF ( ABS( current_v%x - sorted_p(il)%x ) < .01 * dx .OR.    &
+                        ABS( current_v%y - sorted_p(il)%y ) < .01 * dy )       &
+                   THEN
+!
+!--                   If necessary, resize arrays for candidates
+                      IF ( noc >= SIZE(candidates) ) THEN
+                         ALLOCATE(dummy_vertex_arr(1:noc), dummy_id_arr(1:noc))
+                         dummy_vertex_arr(1:noc) = candidates(1:noc)
+                         dummy_id_arr(1:noc)   = candidate_id(1:noc)
+                         DEALLOCATE(candidates, candidate_id)
+                         ALLOCATE(candidates(1:2*noc), candidate_id(1:2*noc))
+                         candidates(1:noc)   = dummy_vertex_arr(1:noc)
+                         candidate_id(1:noc) = dummy_id_arr(1:noc)
+                         DEALLOCATE(dummy_vertex_arr, dummy_id_arr)
+                      ENDIF
+                      noc               = noc +1
+                      candidates(noc)   = sorted_p(il)
+                      candidate_id(noc) = il
+                   ENDIF
+                ENDDO
+             ENDIF
+!
+!--          Check which one of the candidates is the neighbor of the current
+!--          vertex. This is done by several tests that would exclude the
+!--          candidate from being the neighbor. Each successful test will
+!--          therefore result in a cycle to the next candidate. Only if all
+!--          all tests fail, is the candidate one of a maximum of two possible
+!--          neighbors.
+             id_neighbor  = -999
+             id_neighbor1 = -999
+             id_neighbor2 = -999
+             DO il = 1, noc
+!
+!--             Exclude the possibility of a vertex with the same coordinates
+!--             being chosen as the neighbor. (dist < .9*dx)
+!--             NOTE: this could happen, if part of a building is only connected
+!--                   to the rest of the building diagonally. In that case, the
+!--                   same point is added to the polygon twice. This is necessary
+!--                   and not redundant! Two such points can never be neighbors.
+!--                   Example: the north right corner of grid point i,j
+!--                        AND the south left corner of grid point i+1,j+1.
+!--                   See SUBROUTINE identify_corners for the identification
+!--                   method.
+!--             Also, exclude a connection back to the coordinates of the 
+!--             previous vertex.
+                dist = SQRT( (candidates(il)%x - current_v%x)**2 +             &
+                                     (candidates(il)%y - current_v%y)**2 )
+                IF ( nosv > 1 ) THEN
+                   IF ( dist < .9 * dx .OR.                                    &
+                        ( ( ABS( sorted_p(nosv-1)%x                            &
+                        - candidates(il)%x ) < .01 * dx ) .AND.                &
+                          ( ABS( sorted_p(nosv-1)%y                            &
+                        - candidates(il)%y ) < .01 * dy ) ) )                  &
+                   THEN
+                      CYCLE
+                   ENDIF
+                ENDIF
+!
+!--             Check if there is a building all along only the left-hand side
+!--             of the connecting line from current vertex to potential neighbor
+!--             (4 cases)
+!--             First: for vertical connection
+                IF ( ABS( candidates(il)%x - current_v%x ) < .01 * dx ) THEN
+                   xs = NINT(current_v%x*ddx)-1
+                   xe = xs + 1
+ !
+!--                Case 1: ys < ye, edge from south to north, building must be
+!--                        exclusively in all grid cells left of the edge
+                   IF ( current_v%y < candidates(il)%y ) THEN
+                      ys = NINT(current_v%y*ddy)
+                      ye = NINT(candidates(il)%y*ddy)-1
+                      IF ( .NOT.( ALL( .NOT. BTEST( wall_flags_0(xs,ys:ye), 0))&
+                           .AND.( ALL( BTEST( wall_flags_0(xe,ys:ye), 0 ) ) )))&
+                      THEN
+                         CYCLE
+                      ENDIF
+ !
+!--                Case 2: ys > ye, edge from north to south, building must be
+!--                        exclusively in all grid cells right of the edge
+                   ELSEIF ( current_v%y > candidates(il)%y ) THEN
+                      ys = NINT(current_v%y*ddy)-1
+                      ye = NINT(candidates(il)%y*ddy)
+                      IF ( .NOT.( ALL( .NOT. BTEST( wall_flags_0(xe,ye:ys), 0))&
+                           .AND.( ALL( BTEST( wall_flags_0(xs,ye:ys), 0 ) ) )))&
+                      THEN
+                         CYCLE
+                      ENDIF
+                   ENDIF
+!
+!--             Horizontal connection
+                ELSEIF ( ABS( candidates(il)%y - current_v%y ) < .01 * dy ) THEN
+
+                   ys = NINT(current_v%y*ddy)-1
+                   ye = ys + 1
+!
+!--                Case 3: xs > xe, edge from right to left, building must be
+!--                        exclusively in all grid cells south of the edge
+                   IF ( current_v%x > candidates(il)%x ) THEN
+                      xs = NINT(current_v%x*ddx)-1
+                      xe = NINT(candidates(il)%x*ddx)
+                      IF ( .NOT.( ALL( .NOT. BTEST( wall_flags_0(xe:xs,ys), 0))&
+                           .AND.( ALL( BTEST( wall_flags_0(xe:xs,ye), 0 ) ) )))&
+                      THEN
+                         CYCLE
+                      ENDIF
+!
+!--                Case 4: xs < xe, edge from left to right, building must be
+!--                        exclusively in all grid cells north of the edge
+                   ELSEIF ( current_v%x < candidates(il)%x ) THEN
+                      xs = NINT(current_v%x*ddx)
+                      xe = NINT(candidates(il)%x*ddx)-1
+                      IF ( .NOT.( ALL( .NOT. BTEST( wall_flags_0(xs:xe,ye), 0))&
+                           .AND.( ALL( BTEST( wall_flags_0(xs:xe,ys), 0 ) ) )))&
+                      THEN
+                         CYCLE
+                      ENDIF
+                   ENDIF
+                ENDIF
+!
+!--             After the tests, only two potential neighbors are possible. The
+!--             one found first will get id_neighbor1, the possible 2nd one will
+!--             get id_neighbor2
+                IF ( id_neighbor1 ==  -999 ) THEN
+                   id_neighbor1 = candidate_id(il)
+                ELSEIF ( id_neighbor1 /=  -999 .AND.                           &
+                       ( ( ABS( sorted_p(id_neighbor1)%x - candidates(il)%x )  &
+                                > .01 * dx ) .OR.                              &
+                         ( ABS( sorted_p(id_neighbor1)%y - candidates(il)%y )  &
+                                > .01 * dy ) ) )                               &
+                THEN
+                   id_neighbor2 = candidate_id(il)
+                ENDIF
+             ENDDO
+!
+!--          If two potential neighbors were found, determine the one that is on 
+!--          the right hand side of the line connecting the current and previous 
+!--          vertex. It is the real neighbor.
+             IF ( id_neighbor2 /= -999 .AND. nosv > 1 ) THEN
+                IF ( is_right(sorted_p(nosv-1)%x,sorted_p(nosv-1)%y,           &
+                           current_v%x,current_v%y,                            &
+                           sorted_p(id_neighbor1)%x,sorted_p(id_neighbor1)%y) )&
+                THEN
+                   id_neighbor = id_neighbor1
+                ELSEIF ( is_right(sorted_p(nosv-1)%x,sorted_p(nosv-1)%y,       &
+                           current_v%x,current_v%y,                            &
+                           sorted_p(id_neighbor2)%x,sorted_p(id_neighbor2)%y) )&
+                THEN
+                   id_neighbor = id_neighbor2
+                ENDIF
+             ELSE
+                id_neighbor = id_neighbor1
+             ENDIF
+!
+!--          Put the found neighbor at next index in sorted array and move the
+!--          unsorted vertices back one index. This way, only yet unsorted
+!--          vertices are eligible to be candidates during the next iteration.
+             IF (id_neighbor /= nosv + 1 .AND. id_neighbor /= -999) THEN
+                dummy_vertex = sorted_p(id_neighbor)
+                sorted_p(nosv+2:id_neighbor) = sorted_p(nosv+1:id_neighbor-1)
+                sorted_p(nosv+1) = dummy_vertex
+!
+!--          If no neighbor was found, sorting is done for this polygon
+             ELSEIF ( id_neighbor == -999 ) THEN
+                DEALLOCATE(candidates,candidate_id)
+                EXIT
+             ENDIF
+             DEALLOCATE(candidates,candidate_id)
+          ENDDO
+!
+!--       Sorting is done. Reduce size (which means get rid of vertices
+!--       that are not part of the outer hull of the building: holes)
+!--       of sorted polygon and put it back in polygon%vertices.
+!--       Also add first vertex to the end of polygon and last vertex 
+!--       before the beginning of polygon.
+          DEALLOCATE(polygon%vertices)
+          ALLOCATE(polygon%vertices(0:nosv+1))
+          polygon%vertices(1:nosv) = sorted_p(1:nosv)
+          polygon%vertices(0) = sorted_p(nosv)
+          polygon%vertices(nosv+1) = sorted_p(1)
+          polygons(i_p)%nov = nosv
+          nov = polygons(i_p)%nov
+          DEALLOCATE(sorted_p)
+       ENDIF
+
+    END SUBROUTINE sort_polygon
+
+!------------------------------------------------------------------------------! 
+! Description:
+! ------------
+!> Reduces the number of vertices in a polygon using the 
+!> Douglas-Poiker-Algorithm (1973)
+!------------------------------------------------------------------------------! 
+    RECURSIVE SUBROUTINE simplify_polygon( id_s, id_e, tol )
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  max_dist_ind  !< Index of vertex with maximum distance
+       INTEGER(iwp) ::  il            !< counter
+       INTEGER(iwp) ::  id_s          !< End index in polygon
+       INTEGER(iwp) ::  id_e          !< End index in polygon
+
+       REAL(wp) ::  max_dist  !< Maximum distance from line
+       REAL(wp) ::  dum_dist  !< Distance from line: dummy
+       REAL(wp) ::  tol       !< factor that determines how far a vertex can be from the polygon approximation so that the approximation is still accepted
+
+       max_dist = 0.
+       max_dist_ind = -999999
+!
+!--    Find vertex with max distance to id_s and id_e
+       DO il = id_s + 1, id_e -1
+          dum_dist = dist_point_to_edge(polygon%vertices(id_s)%x,         &
+                                        polygon%vertices(id_s)%y,         &
+                                        polygon%vertices(id_e)%x,         &
+                                        polygon%vertices(id_e)%y,         &
+                                        polygon%vertices(il)%x,           &
+                                        polygon%vertices(il)%y)
+          IF ( dum_dist > max_dist ) THEN
+             max_dist     = dum_dist
+             max_dist_ind = il
+          ENDIF
+       ENDDO
+
+       IF ( max_dist > tol ) THEN
+          CALL simplify_polygon( id_s, max_dist_ind, tol )
+          CALL simplify_polygon( max_dist_ind, id_e, tol )
+       ELSE
+          polygon%vertices(id_s+1:id_e-1)%delete = .TRUE.
+       ENDIF
+
+    END SUBROUTINE simplify_polygon
+
+!------------------------------------------------------------------------------! 
+! Description:
+! ------------
+!> Checks if a vertex of a polygon is inside another polygon and if so, deletes
+!> it. The check is done using the crossing number algorithm. If a straight
+!> ray starting at a point crosses the borders of one polygon an odd
+!> number of times, the point is inside that polygon.
+!> This algorithm detects buildings that are completely surrounded by
+!> another building. They can be deleted since they can never be navigated.
+!> TODO: Maybe add a flag to turn this off and on as it might not be needed.
+!>       also, if the domain has buildings at all boundary points, there would
+!>       only be one giant building and everything in it deleted. So nothing
+!>       could be navigated. relevant?!
+!------------------------------------------------------------------------------! 
+    SUBROUTINE inside_other_polygon( i_p )
+
+       IMPLICIT NONE
+
+       LOGICAL ::  exit_flag  !< flag to exit loops if an odd crossing number was found for any of a polygons vertices
+
+       INTEGER(iwp) ::  cn         !< number of crossings
+       INTEGER(iwp) ::  i_p        !< index of current polygon
+       INTEGER(iwp) ::  il         !< index of tested polygon
+       INTEGER(iwp) ::  nov_test   !< no. of vertices of test-polygon
+       INTEGER(iwp) ::  ref_vert   !< vertex currently being tested if it is inside another polygon
+       INTEGER(iwp) ::  test_edge  !< index of edge being tested
+
+       REAL(wp) ::  px  !< x-coord of the point at the crossing of the ray and the vertex
+       REAL(wp) ::  xe  !< x-coordinate of end point of edge
+       REAL(wp) ::  xr  !< x-coordinate of reference point
+       REAL(wp) ::  xs  !< x-coordinate of start point of edge
+       REAL(wp) ::  ye  !< y-coordinate of end point of edge
+       REAL(wp) ::  yr  !< y-coordinate of reference point
+       REAL(wp) ::  ys  !< y-coordinate of start point of edge
+
+       TYPE(polygon_type), POINTER ::  test_pol  !< Polygon to be tested
+
+       exit_flag = .FALSE.
+!
+!--    Loop over all polygons other than the one being tested
+       DO il = 1, polygon_counter
+          IF ( il == i_p ) CYCLE
+          test_pol => polygons(il)
+          nov_test = polygons(il)%nov
+!
+!--       Inclusion test is done for every vertex of the polygon
+          DO ref_vert = 1, nov
+             cn = 0
+             xr = polygon%vertices(ref_vert)%x
+             yr = polygon%vertices(ref_vert)%y
+!
+!--          All edges of the every polygon il is tested for ray crossing
+             DO test_edge = 1, nov_test
+
+!--             It is tested wether the current edge crosses a ray that extends
+!--             from the current point to the right indefinitely.
+!--             Check if start point of edge is lower than end point. If they
+!--             are the same, ignore, since horizontal edges are excluded
+                IF ( test_pol%vertices(test_edge)%y <                          &
+                     test_pol%vertices(test_edge+1)%y )                        &
+                THEN
+                   xs = test_pol%vertices(test_edge)%x
+                   xe = test_pol%vertices(test_edge+1)%x
+                   ys = test_pol%vertices(test_edge)%y
+                   ye = test_pol%vertices(test_edge+1)%y
+                ELSEIF ( test_pol%vertices(test_edge)%y >                      &
+                         test_pol%vertices(test_edge+1)%y )                    &
+                THEN
+                   xs = test_pol%vertices(test_edge+1)%x
+                   xe = test_pol%vertices(test_edge)%x
+                   ys = test_pol%vertices(test_edge+1)%y
+                   ye = test_pol%vertices(test_edge)%y
+                ELSE
+                   CYCLE
+                ENDIF
+!
+!--             Only such edges where the starting point of the edge is south of
+!--             (or equal to) the reference point and the end point is north of
+!--             it are relevant. Note: an edge includes its southern endpoint
+!--             and excludes its northern endpoint.
+                IF ( .NOT. (ys <= yr .AND. ye > yr )) CYCLE
+!
+!--             Only edges that are crossed on the right side of the reference 
+!--             point are relevant, those on the left are ignored
+                IF ( xs <= xr .AND. xe <= xr ) CYCLE
+                IF ( ( xs <= xr .AND. xe >= xr ) .OR.                          &
+                     ( xs >= xr .AND. xe <= xr ) )                             &
+                THEN
+                   px = xe - (xe-xs)*(ye-yr)/(ye-ys)
+                   IF ( px <= xr ) CYCLE
+                ENDIF
+!
+!--             If none of the previous if clauses were true, a crossing with 
+!--             an eligible edge was found and the count increases
+                cn = cn + 1
+             ENDDO
+!
+!--          If the number of crossings is odd, the point is inside another 
+!--          polyon. The polygon associated with the point will be deleted
+             IF (  MOD(cn, 2) /= 0 ) THEN
+                exit_flag = .TRUE.
+                EXIT
+             ENDIF
+          ENDDO
+          IF ( exit_flag ) EXIT
+       ENDDO
+       IF ( exit_flag ) polygon%vertices%delete = .TRUE.
+
+    END SUBROUTINE inside_other_polygon
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Deletes thoses vertices that are marked for deletion (%delete flag) and
+!> resizes the polygon
+!------------------------------------------------------------------------------!
+    SUBROUTINE delete_extra_vertices (i_p)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  il        !< local counter
+       INTEGER(iwp) ::  vcounter  !< vertex counter
+       INTEGER(iwp) ::  i_p       !< polygon ID
+
+       TYPE(vertex_type), DIMENSION(:), ALLOCATABLE ::  dummy_pol !< Temporarily stores non-deleted vertices
+
+       ALLOCATE(dummy_pol(1:nov))
+       vcounter = 0
+!
+!--    Check all vertices and only keep those not marked for deletion
+       DO il = 1, nov
+          IF ( .NOT. polygon%vertices(il)%delete ) THEN
+             vcounter = vcounter + 1
+             dummy_pol(vcounter) = polygon%vertices(il)
+          ENDIF
+       ENDDO
+!
+!--    Set new number of vertices in the polygon
+       nov = vcounter
+       polygons(i_p)%nov = nov
+!
+!--    Resize
+       DEALLOCATE(polygon%vertices)
+       ALLOCATE(polygon%vertices(0:nov+1))
+       polygon%vertices(1:nov) = dummy_pol(1:nov)
+       polygon%vertices(0) = polygon%vertices(nov)
+       polygon%vertices(nov+1) = polygon%vertices(1)
+       DEALLOCATE(dummy_pol)
+
+    END SUBROUTINE delete_extra_vertices
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Deletes polygons that contain no vertices (happens for those polygons that
+!> were entirely encompassed by another polygon)
+!------------------------------------------------------------------------------!
+    SUBROUTINE delete_empty_polygons
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  il  !< local counter
+       INTEGER(iwp) ::  pc  !< number of nonempty polygons
+       INTEGER(iwp) ::  sv  !< size of vertex array
+
+       TYPE(polygon_type), DIMENSION(:), ALLOCATABLE ::  dummy_polygons  !< temporarily stores non-deletd polygons
+
+       pc = 0
+       sv = 0
+       ALLOCATE( dummy_polygons(1:polygon_counter) )
+!
+!--    Keep only those polygons that contain any vertices, skip the rest
+       DO il = 1, polygon_counter
+          IF ( polygons(il)%nov > 0 ) THEN
+             pc = pc + 1
+             sv = SIZE(polygons(il)%vertices)
+             ALLOCATE(dummy_polygons(pc)%vertices(0:sv-1))
+             dummy_polygons(pc) = polygons(il)
+          ENDIF
+       ENDDO
+       polygon_counter = pc
+!
+!--    Resize polygon array
+       DEALLOCATE(polygons)
+       ALLOCATE(polygons(1:polygon_counter))
+       DO il = 1, polygon_counter
+!
+!--       give each %vertices array the correct size and information
+          sv = SIZE(dummy_polygons(il)%vertices)
+          polygons(il)%nov = sv - 2
+          ALLOCATE(polygons(il)%vertices(0:sv-1))
+          polygons(il) = dummy_polygons(il)
+       ENDDO
+       DEALLOCATE(dummy_polygons)
+
+    END SUBROUTINE delete_empty_polygons
+
+ END MODULE polygon_creation 
+
+ MODULE mesh_creation
+
+    USE kinds
+
+    USE mod_functions
+
+    USE variables
+
+    CONTAINS
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Creates the navigation mesh:
+!>      1) Finds eligible vertices (those that are locally convex)
+!>      2) Adds them to the mesh
+!>      3) Adds connections between mesh points if they are in line of sight
+!>         of each other and the connecting line does not point into either of
+!>         the originating polygons (this is known as a visibility graph)
+!------------------------------------------------------------------------------!
+    SUBROUTINE create_nav_mesh
+
+       IMPLICIT NONE
+
+       LOGICAL ::  add                 !< flag for second cycle of add loop
+       LOGICAL ::  intersection_found  !< flag to indicate a found intersection
+
+       INTEGER(iwp) ::  cmp    !< counter: current mesh point
+       INTEGER(iwp) ::  il     !< local counter
+       INTEGER(iwp) ::  jl     !< local counter
+       INTEGER(iwp) ::  pid    !< polygon id of current mesh point
+       INTEGER(iwp) ::  pid_t  !< polygon id of tested mesh point
+       INTEGER(iwp) ::  pl     !< polygon counter
+       INTEGER(iwp) ::  vid    !< vertex id of current mesh point
+       INTEGER(iwp) ::  vid_t  !< vertex id of tested mesh point
+       INTEGER(iwp) ::  vl     !< vertex counter
+
+       REAL(wp) ::  v1x           !< x-coordinate of test vertex 1 for intersection test
+       REAL(wp) ::  v1y           !< y-coordinate of test vertex 1 for intersection test
+       REAL(wp) ::  v2x           !< x-coordinate of test vertex 2 for intersection test
+       REAL(wp) ::  v2y           !< y-coordinate of test vertex 2 for intersection test
+       REAL(wp) ::  x             !< x-coordinate of current mesh point
+       REAL(wp) ::  x_t           !< x-coordinate of tested mesh point
+       REAL(wp) ::  y             !< y-coordinate of current mesh point
+       REAL(wp) ::  y_t           !< y-coordinate of tested mesh point
+       REAL(wp) ::  corner_x      !< x-coordinate of shifted corner
+       REAL(wp) ::  corner_x_e    !< x-coordinate of end of corner gate
+       REAL(wp) ::  corner_y      !< y-coordinate of shifted corner
+       REAL(wp) ::  corner_y_e    !< y-coordinate of end of corner gate
+       REAL(wp) ::  t_start       !< CPU measure: start
+       REAL(wp) ::  t_inter       !< CPU measure: output test time
+       REAL(wp) ::  t_inter1      !< CPU measure: output test time
+       REAL(wp) ::  t_end         !< CPU measure: end
+       REAL(wp) ::  t_left        !< CPU measure: estimate for time left
+       REAL(wp) ::  t_done        !< CPU measure: elapsed time
+       REAL(wp) ::  percent_done  !< CPU measure: proportion of mesh points checked
+
+!
+!--    Add all convex vertices to the mesh.
+!--    DO loop will be executed twice. Once to count the mesh points to be
+!--    added and allocate the mesh point array, the second time (add == .TRUE.)
+!--    to fill the mesh point array.
+       WRITE(*,'(1X,A)') 'Adding polygon vertices to mesh ...'
+       add = .FALSE.
+       DO
+          cmp = 0
+          DO il = 1, polygon_counter
+             polygon => polygons(il)
+             nov = polygons(il)%nov
+             DO jl = 1, nov
+!
+!--             In a polygon that is sorted counter-clockwise, if the next vertex
+!--             is left of the line connecting the previous and the current vertex,
+!--             the current vertex is locally convex.
+                IF ( is_left(polygon%vertices(jl-1)%x,polygon%vertices(jl-1)%y,   &
+                             polygon%vertices(jl)%x,polygon%vertices(jl)%y,       &
+                             polygon%vertices(jl+1)%x,polygon%vertices(jl+1)%y) ) &
+                THEN
+
+                   corner_x = polygon%vertices(jl)%x
+                   corner_y = polygon%vertices(jl)%y
+!
+!--                Create end point for corner navigation
+                   IF ( add ) THEN
+                      CALL shift_corner_outward(                               &
+                            polygon%vertices(jl-1)%x, polygon%vertices(jl-1)%y,&
+                            polygon%vertices(jl+1)%x, polygon%vertices(jl+1)%y,&
+                            polygon%vertices(jl)%x,   polygon%vertices(jl)%y,  &
+                            corner_x_e, corner_y_e, 1._wp )
+                   ENDIF
+!
+!--                Disregard corners outside of the domain
+                   IF ( corner_x<=(nx+1)*dx .AND. corner_x>=0 .AND.            &
+                        corner_y<=(ny+1)*dy .AND. corner_y>=0)                 &
+                   THEN
+                      cmp = cmp + 1
+                      IF ( add ) THEN
+                         CALL set_mesh_point( mesh(cmp), il, jl,               &
+                                                      corner_x, corner_y,      &
+                                                      corner_x_e, corner_y_e )
+                      ENDIF
+                   ENDIF
+                ENDIF
+             ENDDO
+          ENDDO
+          IF ( add ) EXIT
+          add = .TRUE.
+          ALLOCATE( mesh(1:cmp) )
+       ENDDO
+       WRITE(*,'(6X,A,1X,I10,1X,A,/)')  'Done. Added',cmp,'vertices to mesh.'
+       WRITE(*,'(1X,A)') 'Establishing connections in mesh ...'
+!
+!--    CPU measurement
+       CALL CPU_TIME(t_start)
+       CALL CPU_TIME(t_inter)
+       DO il = 1, cmp
+!--       Output status of processing
+          CALL CPU_TIME(t_inter1)
+          IF ( t_inter1 - t_inter > 4. ) THEN
+             t_done       = (t_inter1-t_start)/60.
+             percent_done = REAL(il)/cmp*100.
+             t_left       = t_done/percent_done*(100-percent_done)
+             WRITE(*,'(3X,2(A,I8),A,F6.2,2(A,F7.1),A,I10)')                    &
+                   'Mesh point ',il,' of '                ,cmp,                &
+                   ': '                                   ,percent_done,       &
+                   ' % || elapsed time : '                ,t_done,             &
+                   ' min || ETA: '                        ,t_left,             &
+                   ' min || number of connections found: ',number_of_connections
+             CALL CPU_TIME(t_inter)
+          ENDIF
+          x = mesh(il)%x
+          y = mesh(il)%y
+          pid = mesh(il)%polygon_id
+          vid = mesh(il)%vertex_id
+          DO jl = 1, cmp
+!
+!--          No mesh point can be connected to itself
+             IF ( il == jl ) CYCLE
+             x_t = mesh(jl)%x
+             y_t = mesh(jl)%y
+             pid_t = mesh(jl)%polygon_id
+             vid_t = mesh(jl)%vertex_id
+!
+!--          Cycle, if a connection had already been established
+             IF ( ANY(mesh(jl)%connected_vertices == il) ) CYCLE
+!
+!--          If the distance between two nodes is larger than 600 m,
+!--          no connection will be made since there will typically no be such
+!--          long, straight ways in a city that a pedestrian will walk
+             IF ( SQRT((x_t-x)**2 +(y_t-y)**2) > 400. ) CYCLE
+!
+!--          If the connecting line between two mesh points points into either
+!--          or both of the corresponding polygons, no connection will be 
+!--          established between the two points. This is the case if the 
+!--          previous (next) vertex of the polygon is right of the connecting
+!--          line and the next (previous) vertex of the polygon is left of the
+!--          connecting line. This is checked for both polygons.
+             IF ( ((is_left(x_t,y_t,x,y,polygons(pid)%vertices(vid-1)%x,       &
+                                       polygons(pid)%vertices(vid-1)%y)        &
+                  .AND. is_right(x_t,y_t,x,y,polygons(pid)%vertices(vid+1)%x,  &
+                                       polygons(pid)%vertices(vid+1)%y) )      &
+                  .OR. (is_right(x_t,y_t,x,y,polygons(pid)%vertices(vid-1)%x,  &
+                                       polygons(pid)%vertices(vid-1)%y)        &
+                  .AND. is_left(x_t,y_t,x,y,polygons(pid)%vertices(vid+1)%x,   &
+                                       polygons(pid)%vertices(vid+1)%y)) )     &
+                  .OR. ((is_left(x,y,x_t,y_t,polygons(pid_t)%vertices(vid_t-1)%x, &
+                                       polygons(pid_t)%vertices(vid_t-1)%y)        &
+                  .AND. is_right(x,y,x_t,y_t,polygons(pid_t)%vertices(vid_t+1)%x,  &
+                                       polygons(pid_t)%vertices(vid_t+1)%y) )      &
+                  .OR. (is_right(x,y,x_t,y_t,polygons(pid_t)%vertices(vid_t-1)%x,  &
+                                       polygons(pid_t)%vertices(vid_t-1)%y)        &
+                  .AND. is_left(x,y,x_t,y_t,polygons(pid_t)%vertices(vid_t+1)%x,   &
+                                       polygons(pid_t)%vertices(vid_t+1)%y)) ) )   &
+             THEN
+                CYCLE
+             ENDIF
+!
+!--          For each edge of each polygon, check if it intersects with the 
+!--          potential connection. If so, no connection can be made
+!--          THIS IS THE BOTTLENECK OF THE PROGRAM
+             intersection_found = .FALSE.
+             DO pl = pid, polygon_counter
+                DO vl = 1, polygons(pl)%nov
+                   v1x = polygons(pl)%vertices(vl)%x
+                   v1y = polygons(pl)%vertices(vl)%y
+                   v2x = polygons(pl)%vertices(vl+1)%x
+                   v2y = polygons(pl)%vertices(vl+1)%y
+                   intersection_found = intersect(x,y,x_t,y_t,v1x,v1y,v2x,v2y)
+                   IF ( intersection_found ) EXIT
+                ENDDO
+                IF ( intersection_found ) EXIT
+             ENDDO
+             IF ( intersection_found ) CYCLE
+             DO pl = pid, 1, -1
+                IF ( pl == pid ) CYCLE
+                DO vl = 1, polygons(pl)%nov
+                   v1x = polygons(pl)%vertices(vl)%x
+                   v1y = polygons(pl)%vertices(vl)%y
+                   v2x = polygons(pl)%vertices(vl+1)%x
+                   v2y = polygons(pl)%vertices(vl+1)%y
+                   intersection_found = intersect(x,y,x_t,y_t,v1x,v1y,v2x,v2y)
+                   IF ( intersection_found ) EXIT
+                ENDDO
+                IF ( intersection_found ) EXIT
+             ENDDO
+             IF ( intersection_found ) CYCLE
+!
+!--       If neither of the above two test was true, a connection will be
+!--       established between the two mesh points.
+          number_of_connections = number_of_connections + 1
+          CALL add_connection(mesh(il),jl, mesh(jl))
+          CALL add_connection(mesh(jl),il, mesh(il))
+          ENDDO
+       ENDDO
+!
+!--    Adapt connected_vertices arrays
+       DO il = 1, cmp
+          CALL reduce_connections(mesh(il))
+       ENDDO
+       CALL CPU_TIME(t_end)
+!
+!--    Output to terminal
+       WRITE(*,'(6X,A,I10,A)') 'Done. Established ',number_of_connections,     &
+                               ' connections in mesh'
+       WRITE(*,'(6X,A,F10.1,A)') 'Time needed for calculation: ',              &
+                                 t_end-t_start,' seconds'
+
+    END SUBROUTINE create_nav_mesh
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Initializes a point of the navigation mesh
+!------------------------------------------------------------------------------!
+    SUBROUTINE set_mesh_point (in_mp,pid,vid,x,y,x_s,y_s)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  pid  !< polygon ID
+       INTEGER(iwp) ::  vid  !< vertex ID
+
+       REAL(wp) ::  x    !< x-value of mesh point for path calculation
+       REAL(wp) ::  x_s  !< x-value shifted outward from corner
+       REAL(wp) ::  y    !< y-value of mesh point for path calculation
+       REAL(wp) ::  y_s  !< y-value shifted outward from corner
+
+       TYPE(mesh_point) ::  in_mp  !< mesh point to be created
+
+       in_mp%origin_id          = -1
+       in_mp%polygon_id         = pid
+       in_mp%vertex_id          = vid
+       in_mp%cost_so_far        = 1.d12
+       in_mp%x                  = x
+       in_mp%y                  = y
+       in_mp%x_s                = x_s
+       in_mp%y_s                = y_s
+       in_mp%noc                = 0
+
+       ALLOCATE(in_mp%connected_vertices(1:100),                               &
+                in_mp%distance_to_vertex(1:100))
+
+       in_mp%connected_vertices = -999
+       in_mp%distance_to_vertex = -999.
+
+    END SUBROUTINE set_mesh_point
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Shifts a corner (middle one of three consecutive points a, b and p) outward
+!> by a given length along the angle bisector. Stores the result to res_x/res_y
+!------------------------------------------------------------------------------!
+    SUBROUTINE shift_corner_outward ( a_x, a_y, b_x, b_y, p_x, p_y, res_x,     &
+                                      res_y, shift )
+
+       IMPLICIT NONE
+
+       REAL(wp) ::  a_x     !< x-value of point A
+       REAL(wp) ::  a_y     !< y-value of point A
+       REAL(wp) ::  abs_ap  !< distance from A to P
+       REAL(wp) ::  abs_bp  !< distance from B to P
+       REAL(wp) ::  abs_co  !< length of angle bisector
+       REAL(wp) ::  b_x     !< x-value of point B
+       REAL(wp) ::  b_y     !< y-value of point B
+       REAL(wp) ::  eap_x   !< x-value of unit vector from A to P
+       REAL(wp) ::  eap_y   !< y-value of unit vector from A to P
+       REAL(wp) ::  ebp_x   !< x-value of unit vector from B to P
+       REAL(wp) ::  ebp_y   !< y-value of unit vector from B to P
+       REAL(wp) ::  p_x     !< x-value of point P
+       REAL(wp) ::  p_y     !< y-value of point P
+       REAL(wp) ::  res_x   !< x-value of result
+       REAL(wp) ::  res_y   !< y-value of result
+       REAL(wp) ::  shift   !< distance of shift in meters
+
+!
+!--    Get unit vector from previous to current vertex
+       eap_x  = p_x - a_x
+       eap_y  = p_y - a_y
+       abs_ap = SQRT(eap_x**2+eap_y**2)
+       eap_x  = eap_x/abs_ap
+       eap_y  = eap_y/abs_ap
+!
+!--    Get unit vector from next to current vertex
+       ebp_x  = p_x - b_x
+       ebp_y  = p_y - b_y
+       abs_bp = SQRT(ebp_x**2+ebp_y**2)
+       ebp_x  = ebp_x/abs_bp
+       ebp_y  = ebp_y/abs_bp
+!
+!--    Add previous two vectors to get angle bisector of corner.
+!--    Then, set its length to shift and add to original vertex
+!--    vector to shift it outward
+       res_x   = eap_x + ebp_x
+       res_y   = eap_y + ebp_y
+       abs_co  = SQRT(res_x**2+res_y**2)
+       res_x   = shift*res_x/abs_co + p_x
+       res_y   = shift*res_y/abs_co + p_y
+
+    END SUBROUTINE shift_corner_outward
+
+!------------------------------------------------------------------------------! 
+! Description:
+! ------------
+!> Adds a connection between two points of the navigation mesh 
+!> (one-way: in_mp1 to in_mp2)
+!------------------------------------------------------------------------------! 
+    SUBROUTINE add_connection (in_mp1,id2,in_mp2)
+
+       IMPLICIT NONE
+
+       LOGICAL ::  connection_established  !< Flag to indicate if connection has already been established
+
+       INTEGER(iwp) ::  id2  !< ID of in_mp2
+       INTEGER(iwp) ::  il   !< local counter
+       INTEGER(iwp) ::  noc1 !< number of connections in in_mp1
+
+       INTEGER, DIMENSION(:), ALLOCATABLE ::  dum_cv !< dummy array for connected_vertices
+
+       REAL(wp) ::  dist  !< Distance between the two points
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dum_dtv
+
+       TYPE(mesh_point) ::  in_mp1  !< mesh point that gets a new connection
+       TYPE(mesh_point) ::  in_mp2  !< mesh point in_mp1 will be connected to
+
+       connection_established = .FALSE.
+!
+!--    Check if connection has already been established
+       noc1 = SIZE(in_mp1%connected_vertices)
+       DO il = 1, in_mp1%noc
+          IF ( in_mp1%connected_vertices(il) == id2 ) THEN
+             connection_established = .TRUE.
+             EXIT
+          ENDIF
+       ENDDO
+
+       IF ( .NOT. connection_established ) THEN
+!
+!--       Resize arrays, if necessary
+          IF ( in_mp1%noc >= noc1 ) THEN
+             ALLOCATE( dum_cv(1:noc1),dum_dtv(1:noc1) )
+             dum_cv  = in_mp1%connected_vertices
+             dum_dtv = in_mp1%distance_to_vertex
+             DEALLOCATE( in_mp1%connected_vertices, in_mp1%distance_to_vertex )
+             ALLOCATE( in_mp1%connected_vertices(1:2*noc1),                    &
+                       in_mp1%distance_to_vertex(1:2*noc1) )
+             in_mp1%connected_vertices         = -999
+             in_mp1%distance_to_vertex         = -999.
+             in_mp1%connected_vertices(1:noc1) = dum_cv
+             in_mp1%distance_to_vertex(1:noc1) = dum_dtv
+          ENDIF
+
+!
+!--    Add connection
+          in_mp1%noc = in_mp1%noc+1
+          dist = SQRT( (in_mp1%x - in_mp2%x)**2 + (in_mp1%y - in_mp2%y)**2 )
+          in_mp1%connected_vertices(in_mp1%noc) = id2
+          in_mp1%distance_to_vertex(in_mp1%noc) = dist
+       ENDIF
+
+    END SUBROUTINE add_connection
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Reduces the size of connection array to the amount of actual connections
+!> after all connetions were added
+!------------------------------------------------------------------------------!
+    SUBROUTINE reduce_connections (in_mp)
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  noc !< Number of connections
+
+       INTEGER, DIMENSION(:), ALLOCATABLE ::  dum_cv !< dummy: connected_vertices
+
+       REAL(wp), DIMENSION(:), ALLOCATABLE ::  dum_dtv !< dummy: distance_to_vertex
+
+       TYPE(mesh_point) ::  in_mp !< Input mesh point
+
+       noc = in_mp%noc
+       ALLOCATE( dum_cv(1:noc),dum_dtv(1:noc) )
+       dum_cv  = in_mp%connected_vertices(1:noc)
+       dum_dtv = in_mp%distance_to_vertex(1:noc)
+       DEALLOCATE( in_mp%connected_vertices, in_mp%distance_to_vertex )
+       ALLOCATE( in_mp%connected_vertices(1:noc),                              &
+                 in_mp%distance_to_vertex(1:noc) )
+       in_mp%connected_vertices(1:noc) = dum_cv(1:noc)
+       in_mp%distance_to_vertex(1:noc) = dum_dtv(1:noc)
+
+    END SUBROUTINE reduce_connections
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Writes all NavMesh information into binary file and building data to ASCII
+!------------------------------------------------------------------------------!
+    SUBROUTINE bin_out_mesh
+
+       IMPLICIT NONE
+
+       INTEGER(iwp) ::  il           !< local counter
+       INTEGER(iwp) ::  jl           !< local counter
+       INTEGER(iwp) ::  size_of_mesh !< size of mesh
+       INTEGER(iwp) ::  size_of_pols !< size of polygon
+
+       WRITE(*,'(1X,A)') 'Writing binary output data ...'
+
+       OPEN ( 14, FILE= TRIM(runname)//'_nav', FORM='UNFORMATTED', STATUS='replace' )
+!
+!--    Output of mesh data
+       size_of_mesh = SIZE(mesh)
+       WRITE(14) size_of_mesh
+       DO il = 1, size_of_mesh
+          WRITE(14) mesh(il)%polygon_id, mesh(il)%vertex_id, mesh(il)%noc,     &
+                    mesh(il)%origin_id, mesh(il)%cost_so_far, mesh(il)%x,      &
+                    mesh(il)%y, mesh(il)%x_s, mesh(il)%y_s
+          DO jl = 1, mesh(il)%noc
+             WRITE(14) mesh(il)%connected_vertices(jl),                        &
+                       mesh(il)%distance_to_vertex(jl)
+          ENDDO
+       ENDDO
+!
+!--    Output of building polygon data
+       size_of_pols = SIZE(polygons)
+       WRITE(14) size_of_pols
+       DO il = 1, size_of_pols
+          WRITE(14) polygons(il)%nov
+          DO jl = 0, polygons(il)%nov+1
+             WRITE(14) polygons(il)%vertices(jl)%delete,                       &
+                       polygons(il)%vertices(jl)%x, polygons(il)%vertices(jl)%y
+          ENDDO
+       ENDDO
+       CLOSE(14)
+!
+!--    Output building data to ASCII file
+       OPEN(UNIT=7,FILE='topo.txt',STATUS='replace',ACTION='write')
+       DO i = 1, polygon_counter
+       IF (polygons(i)%nov == 0) CYCLE
+          DO j = 1, polygons(i)%nov
+             WRITE(7,150) i,j,polygons(i)%vertices(j)%x,                       &
+                              polygons(i)%vertices(j)%y
+          ENDDO
+       ENDDO
+       CLOSE(7)
+
+       WRITE(*,'(6X,A)')  'Done, tool terminating.', '  ',                     &
+                          'Before starting your PALM run, please check the',   &
+                          'ASCII file topo.txt to see if you are satisfied',   &
+                          'with the polygon representation of the building',   &
+                          'data. If not, consider adjusting the parameter',    &
+                          'tolerance_dp accordingly.', '  ', 'Bye, Bye!', ' '
+       CALL CPU_TIME(finish)
+       WRITE(*,'(1X,A,F10.4,A)') 'Total runtime: ', finish-start, ' seconds'
+
+       150 FORMAT (2(I7,1X),2(F9.2,1X) )
+
+    END SUBROUTINE bin_out_mesh
+
+ END MODULE mesh_creation
+
+ PROGRAM nav_mesh
+
+    USE mesh_creation
+    USE polygon_creation
+    USE variables
+    IMPLICIT NONE
+
+
+!
+!-- Start CPU mesurement
+    CALL CPU_TIME(start)
+!
+!-- Initialization
+    CALL init
+
+    WRITE(*,*) "Converting building data to polygons ..."
+!
+!-- Convert gridded building data to polygons
+    CALL identify_polygons
+!
+!-- Find corners in topography and add them to polygons
+    CALL identify_corners
+!
+!-- Sort polygons counter-clockwise, then simplify them
+    DO i = 1, polygon_counter
+       polygon => polygons(i)
+       nov = polygons(i)%nov
+       CALL sort_polygon(i)
+!
+!--    Simplify each polygon using douglas-peucker algorithm. If the number
+!--    of vertices would fall below 4 due to this procedure, the tolerance
+!--    for the algorithm is reduced and it is run again. 
+       DO i_sc = 0, 2
+          CALL simplify_polygon(1,nov+1,tolerance_dp(i_sc))
+          i_cn = 0
+          DO j = 1, nov
+             IF ( .NOT. polygon%vertices(j)%delete ) i_cn = i_cn + 1
+          ENDDO
+          IF ( i_cn > 3 ) THEN
+             EXIT
+          ELSE
+             polygon%vertices(:)%delete = .FALSE.
+          ENDIF
+       ENDDO
+       CALL delete_extra_vertices(i)
+    ENDDO
+!
+!-- Remove buildings that are surrounded by another building
+    IF ( .NOT. internal_buildings ) THEN
+       DO i = 1, polygon_counter
+          polygon => polygons(i)
+          nov = polygons(i)%nov
+          CALL inside_other_polygon(i)
+       ENDDO
+    ENDIF
+!
+!-- Delete vertices that are marked for deletion
+    DO i = 1, polygon_counter
+       polygon => polygons(i)
+       nov = polygons(i)%nov
+       CALL delete_extra_vertices(i)
+    ENDDO
+!
+!-- Count number of vertices
+    vertex_counter = 0
+    DO i = 1, polygon_counter
+       polygon => polygons(i)
+       nov = polygons(i)%nov
+       vertex_counter = vertex_counter + nov
+    ENDDO
+!
+!-- Delete polygons with no vertices
+    CALL delete_empty_polygons
+    WRITE(*,'(2(6X,A,I10,1X,A,/))')                                             &
+                  'Done. Created a total of', polygon_counter, 'polygon(s)',   &
+                  '         with a total of', vertex_counter, 'vertices'
+!
+!-- Crate Navigation mesh from polygon data
+    CALL create_nav_mesh
+!
+!-- Binary mesh output
+    CALL bin_out_mesh
+
+ END PROGRAM nav_mesh
Index: /palm/tags/release-6.0/UTIL/analyze_particle_data.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/analyze_particle_data.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/analyze_particle_data.f90	(revision 3477)
@@ -0,0 +1,277 @@
+ PROGRAM analyze_particle_data
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018  Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 1310 2014-03-14 08:01:56Z raasch
+! update of GPL copyright
+!
+! 1046 2012-11-09 14:38:45Z maronga
+! code put under GPL (PALM 3.9)
+!
+! Description:
+! ------------
+! This routine reads the particle data files generated by PALM
+! and does some statistical analysis on these data.
+!------------------------------------------------------------------------------!
+
+    IMPLICIT NONE
+
+!
+!-- Variable definitions
+    CHARACTER (LEN=5)  ::  id_char
+    CHARACTER (LEN=80) ::  run_description_header
+
+    INTEGER, PARAMETER ::  spk = SELECTED_REAL_KIND( 6 )
+
+    INTEGER ::  class, danz = 0, i, id, maximum_number_of_particles, n,   &
+                number_of_intervalls, number_of_particles,                &
+                number_of_vertical_levels, timelevel = 1, vertical_level, &
+                total_number_of_particles
+
+    INTEGER, DIMENSION(:), ALLOCATABLE ::  class_table
+    
+    LOGICAL ::  found
+
+    REAL    ::  class_width, hdistance, km, km_x, km_y, particle_age, sigma, &
+                sigma_local, sigma_local_x, sigma_local_y, sigma_x, sigma_y, &
+                simulated_time, vertical_resolution
+    REAL, DIMENSION(:,:), ALLOCATABLE ::  diffusivities
+
+    TYPE particle_type
+       SEQUENCE
+       INTEGER ::  color, tailpoints
+       REAL    ::  age, origin_x, origin_y, origin_z, size, speed_x, speed_y, &
+                   speed_z, x, y, z
+    END TYPE particle_type
+
+    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  particles
+
+
+!
+!-- Check, if file from PE0 exists and terminate program if it doesn't.
+    WRITE (id_char,'(''_'',I4.4)')  danz
+    INQUIRE ( FILE=id_char, EXIST=found )
+!
+!-- Find out the number of files (equal to the number of PEs which
+!-- have been used in PALM) and open them
+    DO  WHILE ( found )
+
+       OPEN ( danz+110, FILE=id_char, FORM='UNFORMATTED' )
+       danz = danz + 1
+       WRITE (id_char,'(''_'',I4.4)')  danz
+       INQUIRE ( FILE=id_char, EXIST=found )
+
+    ENDDO
+!
+!-- Info-output
+    PRINT*, ''
+    PRINT*, '*** analyze_particle_data ***'
+    IF ( danz /= 0 )  THEN
+       PRINT*, '*** ', danz, ' file(s) found'
+    ELSE
+       PRINT*, '+++ file _0000 not found'
+       PRINT*, '    program terminated'
+       STOP
+    ENDIF
+
+!
+!-- Loop over all timelevels of output 
+    DO
+       total_number_of_particles = 0
+       sigma   = 0.0
+       sigma_x = 0.0
+       sigma_y = 0.0
+!
+!--    Loop over all files (reading data of the subdomains)
+       DO  id = 0, danz-1
+!
+!--       Read file header
+          IF ( timelevel == 1 )  THEN
+             READ ( id+110 )  run_description_header
+!
+!--          Print header information
+             IF ( id == 0 )  THEN
+                PRINT*, '*** run: ', run_description_header
+                PRINT*, ' '
+                PRINT*, '--> enter class width in m:'
+                READ*, class_width
+                PRINT*, '--> enter number of class intervalls:'
+                READ*, number_of_intervalls
+                PRINT*, '--> enter vertical resolution in m:'
+                READ*, vertical_resolution
+                PRINT*, '--> enter number of vertical levels:'
+                READ*, number_of_vertical_levels
+!
+!--             Allocate table space
+                ALLOCATE( class_table( 0:number_of_intervalls ) )
+                class_table = 0
+                ALLOCATE( diffusivities(0:number_of_vertical_levels,5) )
+                diffusivities = 0.0
+             ENDIF
+          ENDIF
+!
+!--       Read time information and indices
+          READ ( id+110, END=10 )  simulated_time, maximum_number_of_particles,&
+                                   number_of_particles
+!
+!--       Print timelevel and number of particles
+          IF ( id == 0 )  THEN
+             PRINT*, ' '
+             PRINT*, '*** time: ', simulated_time
+          ENDIF
+          PRINT*, 'PE', id, ': ', number_of_particles, ' particles'
+!
+!--       Allocate array and read particle data
+          ALLOCATE( particles(maximum_number_of_particles) )
+          READ ( id+110 )  particles
+!
+!--       Analyze the particle data
+          DO  n = 1, number_of_particles
+!
+!--          Calculate horizontal distance from of particle from its origin
+             hdistance = SQRT( ( particles(n)%x - particles(n)%origin_x )**2 + &
+                               ( particles(n)%y - particles(n)%origin_y )**2 )
+             class = hdistance / class_width
+             sigma_local   = hdistance**2
+             sigma_local_x = ( particles(n)%x - particles(n)%origin_x )**2
+             sigma_local_y = ( particles(n)%y - particles(n)%origin_y )**2
+
+             vertical_level = particles(n)%origin_z / vertical_resolution
+             IF ( vertical_level > number_of_vertical_levels )  THEN
+                vertical_level = number_of_vertical_levels
+             ENDIF
+
+             IF ( class > number_of_intervalls )  THEN
+                class = number_of_intervalls
+!                PRINT*, 'x =',particles(n)%x,' y =',particles(n)%y
+!                PRINT*, 'xo=',particles(n)%origin_x,' yo=',particles(n)%origin_y
+             ENDIF
+
+             class_table(class) = class_table(class) + 1
+
+             diffusivities(vertical_level,1) = diffusivities(vertical_level,1) +&
+                                               sigma_local
+             diffusivities(vertical_level,2) = diffusivities(vertical_level,2) +&
+                                               sigma_local_x
+             diffusivities(vertical_level,3) = diffusivities(vertical_level,3) +&
+                                               sigma_local_y
+             diffusivities(vertical_level,4) = diffusivities(vertical_level,4) +&
+                                               1.0
+
+             vertical_level = particles(n)%z / vertical_resolution
+             IF ( vertical_level > number_of_vertical_levels )  THEN
+                vertical_level = number_of_vertical_levels
+             ENDIF
+             diffusivities(vertical_level,5) = diffusivities(vertical_level,5) +&
+                                               1.0
+
+!
+!--          Summation for variances
+             sigma = sigma + sigma_local
+             sigma_x = sigma_x + sigma_local_x
+             sigma_y = sigma_y + sigma_local_y
+             total_number_of_particles = total_number_of_particles + 1
+
+          ENDDO
+!
+!--       Store the particle age (it is provided that all particles have the
+!--       same age)
+          particle_age = particles(1)%age
+
+!
+!--       Deallocate particle array before data from next file are read
+          DEALLOCATE( particles )
+
+       ENDDO  ! next file
+!
+!--    Print statistics
+       PRINT*, ' '
+       PRINT*, '*** statistics for t = ', simulated_time
+       DO  n = 0, number_of_intervalls-1
+          WRITE ( *, 1 ) n*class_width, (n+1)*class_width, class_table(n)
+   1      FORMAT (F6.1,' - ',F6.1, ' m   n = ',I7)
+       ENDDO
+       WRITE ( *, 2 )  (number_of_intervalls+1)*class_width, &
+                       class_table(number_of_intervalls)
+   2   FORMAT (6X,' > ',F6.1,' m   n = ',I7)
+
+       sigma   = SQRT( sigma   / REAL( total_number_of_particles ) )
+       km      = sigma**2 / ( 2.0 * particle_age )
+       sigma_x = SQRT( sigma_x / REAL( total_number_of_particles ) )
+       km_x    = sigma_x**2 / ( 2.0 * particle_age )
+       sigma_y = SQRT( sigma_y / REAL( total_number_of_particles ) )
+       km_y    = sigma_y**2 / ( 2.0 * particle_age )
+       PRINT*, ' '
+       WRITE ( *, 3 )  sigma, km, sigma_x, km_x, sigma_y, km_y
+   3   FORMAT ('sigma   = ',F6.1,' m   Km   = ',F5.1,' m**2/s'/ &
+               'sigma_x = ',F6.1,' m   Km_x = ',F5.1,' m**2/s'/ &
+               'sigma_y = ',F6.1,' m   Km_y = ',F5.1,' m**2/s')
+
+       PRINT*, ' '
+       PRINT*, 'Height dependence of diffusivities:'
+       DO  i = 0, number_of_vertical_levels-1
+          IF ( diffusivities(i,4) == 0.0 )  diffusivities(i,4) = 1.0E-20
+          WRITE ( *, 4 )  i*vertical_resolution, (i+1.0)*vertical_resolution,&
+                          ( diffusivities(i,1) / diffusivities(i,4) ) / &
+                                     ( 2.0 * particle_age ),            &
+                          ( diffusivities(i,2) / diffusivities(i,4) ) / &
+                                     ( 2.0 * particle_age ),            &
+                          ( diffusivities(i,3) / diffusivities(i,4) ) / &
+                                     ( 2.0 * particle_age ),            &
+                          diffusivities(i,4), diffusivities(i,5)
+   4      FORMAT (F6.1,'-',F6.1,' m  Km=',F5.1,' Km_x=',F5.1, &
+                  ' Km_y=',F5.1,' n_o=',F7.0,' n=',F7.0)
+       ENDDO
+       IF ( diffusivities(number_of_vertical_levels,4) == 0.0 )  THEN
+          diffusivities(number_of_vertical_levels,4) = 1.0E-20
+       ENDIF
+          i = number_of_vertical_levels
+          WRITE ( *, 5 )  i*vertical_resolution,                        &
+                          ( diffusivities(i,1) / diffusivities(i,4) ) / &
+                                     ( 2.0 * particle_age ),            &
+                          ( diffusivities(i,2) / diffusivities(i,4) ) / &
+                                     ( 2.0 * particle_age ),            &
+                          ( diffusivities(i,3) / diffusivities(i,4) ) / &
+                                     ( 2.0 * particle_age ),            &
+                          diffusivities(i,4), diffusivities(i,5)
+   5   FORMAT (F6.1,'-...... m  Km=',F5.1,' Km_x=',F5.1, &
+                  ' Km_y=',F5.1,' n_o=',F7.0,' n=',F7.0)
+
+!
+!--    Initialize class table for next timelevel
+       class_table   =   0
+       diffusivities = 0.0
+       timelevel = timelevel + 1
+       
+    ENDDO  ! next timelevel
+
+10  PRINT*, '*** EOF reached on file PARTICLE_DATA/_0000'
+
+ END PROGRAM analyze_particle_data
Index: /palm/tags/release-6.0/UTIL/analyze_particle_netcdf_data.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/analyze_particle_netcdf_data.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/analyze_particle_netcdf_data.f90	(revision 3477)
@@ -0,0 +1,283 @@
+ PROGRAM analyze_particle_netcdf_data
+
+!------------------------------------------------------------------------------!
+! This file is part of the PALM model system.
+!
+! PALM is free software: you can redistribute it and/or modify it under the
+! terms of the GNU General Public License as published by the Free Software
+! Foundation, either version 3 of the License, or (at your option) any later
+! version.
+!
+! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
+! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along with
+! PALM. If not, see <http://www.gnu.org/licenses/>.
+!
+! Copyright 1997-2018  Leibniz Universitaet Hannover
+!------------------------------------------------------------------------------!
+!
+! Current revisions:
+! -----------------
+! 
+! 
+! Former revisions:
+! -----------------
+! $Id$
+! Corrected "Former revisions" section
+!
+! 2696 2017-12-14 17:12:51Z kanani
+! Change in file header (GPL part)
+!
+! 1310 2014-03-14 08:01:56Z raasch
+! update of GPL copyright
+!
+! 1046 2012-11-09 14:38:45Z maronga
+! code put under GPL (PALM 3.9)
+!
+! Initial revision 12/07/05
+!
+!
+! Description:
+! ------------
+! This is an EXAMPLE routine how to read NetCDF particle data output by PALM.
+! As an example, the mean heigth and radius of all particles are calculated
+! and output for each output time available on the file
+!
+! 
+! Any additonal analyzation requested has to be added by the user by following
+! the steps given in this example!
+!
+!
+!
+! This routine must be compiled with:
+! decalpha:
+!    f95 -fast -r8 -I/usr/local/netcdf-3.5.1/include
+!    -L/usr/local/netcdf-3.5.1/lib -lnetcdf
+! IBM-Regatta:
+!    xlf95 -qsuffix=cpp=f90 -qrealsize=8 -q64 -qmaxmem=-1 -Q
+!    -I /aws/dataformats/netcdf-3.5.0/netcdf-64-32-3.5.0/include_F90_64
+!    -L/aws/dataformats/netcdf-3.5.0/netcdf-64-32-3.5.0/lib -lnetcdf -O3
+! IBM-Regatta KISTI:
+!    xlf95 -qsuffix=cpp=f90 -qrealsize=8 -q64 -qmaxmem=-1 -Q
+!    -I /applic/netcdf64/src/f90
+!    -L/applic/lib/NETCDF64 -lnetcdf -O3
+! IMUK:
+!    ifort analyze_particle_netcdf_data
+!    -I /muksoft/packages/netcdf/linux/include -axW -r8 -nbs -Vaxlib
+!    -L /muksoft/packages/netcdf/linux/lib -lnetcdf
+! NEC-SX6:
+!    sxf90 analyze_particle_netcdf_data.f90 
+!    -I /pool/SX-6/netcdf/netcdf-3.6.0-p1/include  -C hopt -Wf '-A idbl4'
+!    -D__netcdf -L/pool/SX-6/netcdf/netcdf-3.6.0-p1/lib -lnetcdf
+!------------------------------------------------------------------------------!
+
+    USE netcdf
+
+    IMPLICIT NONE
+
+!
+!-- Local variables
+    CHARACTER (LEN=7)    ::  id_char
+    CHARACTER (LEN=2000) ::  string
+
+
+    INTEGER ::  f, fn, i, id_dim_time, id_var_rnop, id_var_r, id_var_time, &
+                id_var_x, id_var_y, id_var_z, n, nc_stat, ntl, start
+
+    INTEGER, DIMENSION(1000) ::  id_set
+    INTEGER, DIMENSION(1)    ::  id_dim_time_old
+
+    INTEGER, DIMENSION(:), ALLOCATABLE   ::  total_nop
+    INTEGER, DIMENSION(:,:), ALLOCATABLE ::  nop
+
+    LOGICAL ::  found
+
+    REAL ::  mean_r, mean_z
+    REAL, DIMENSION(:), ALLOCATABLE ::  prt_r, prt_x, prt_y, prt_z, tl
+
+!
+!-- Check, if file from PE0 exists. If it does not exist, PALM did not
+!-- create any output for this cross-section.
+    fn = 0
+    WRITE (id_char,'(''_'',I4.4)')  fn
+    INQUIRE ( FILE=id_char, EXIST=found )
+
+!
+!-- Find out the number of files (equal to the number of PEs which
+!-- have been used in PALM) and open them
+    IF ( .NOT. found )  THEN
+       PRINT*, '+++ no file _0000 found in current working directory'
+       STOP
+    ENDIF
+
+    DO  WHILE ( found )
+
+!
+!--    Open NetCDF dataset
+       nc_stat = NF90_OPEN( id_char, NF90_NOWRITE, id_set(fn) )
+       IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 1 )
+       fn = fn + 1
+       WRITE (id_char,'(''_'',I4.4)')  fn
+       INQUIRE ( FILE=id_char, EXIST=found )
+
+    ENDDO
+    fn = fn - 1
+
+    PRINT*, '*** ', fn+1, ' files found'
+
+!
+!-- Get the run description header and print it out
+    string = ' '
+    nc_stat = NF90_GET_ATT( id_set(0), NF90_GLOBAL, 'title', string )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 2 )
+    PRINT*, '*** run: ', TRIM( string )
+
+!
+!-- Get the available time levels
+    nc_stat = NF90_INQ_VARID( id_set(0), 'time', id_var_time )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 3 )
+
+    nc_stat = NF90_INQUIRE_VARIABLE( id_set(0), id_var_time, &
+                                     dimids = id_dim_time_old )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 4 )
+    id_dim_time = id_dim_time_old(1)
+
+    nc_stat = NF90_INQUIRE_DIMENSION( id_set(0), id_dim_time, len = ntl )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 5 )
+    ALLOCATE( tl(1:ntl) )
+    print*, 'ntl=',ntl
+
+    nc_stat = NF90_GET_VAR( id_set(0), id_var_time, tl )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 6 )
+
+    DO  n = 1, ntl
+       print*, '*** time_level(', n, ') =', tl(n)
+    ENDDO
+
+!
+!-- Get the number of particles used
+    nc_stat = NF90_INQ_VARID( id_set(0), 'real_num_of_prt', id_var_rnop )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 7 )
+
+    ALLOCATE( nop(1:ntl,0:fn), total_nop(1:ntl) )
+
+    DO  f = 0, fn
+
+       nc_stat = NF90_GET_VAR( id_set(f), id_var_rnop, nop(1:ntl,f) )
+       IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 8 )
+
+    ENDDO
+
+    total_nop = 0
+    DO  n = 1, ntl
+
+       DO  f = 0, fn
+          total_nop(n) = total_nop(n) + nop(n,f)
+       ENDDO
+
+       PRINT*, '*** time = ', tl(n), ' total # of particles: ', total_nop(n)
+
+    ENDDO
+
+!
+!-- Get the particle x and y coordinates
+    nc_stat = NF90_INQ_VARID( id_set(0), 'pt_x', id_var_x )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 9 )
+
+    nc_stat = NF90_INQ_VARID( id_set(0), 'pt_y', id_var_y )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 10 )
+
+    nc_stat = NF90_INQ_VARID( id_set(0), 'pt_z', id_var_z )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 11 )
+
+    nc_stat = NF90_INQ_VARID( id_set(0), 'pt_radius', id_var_r )
+    IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 12 )
+
+    PRINT*, ' '
+!
+!-- Loop over all timelevels
+    DO  n = 1, ntl
+
+       ALLOCATE( prt_x(total_nop(n)), prt_y(total_nop(n)), &
+                 prt_z(total_nop(n)), prt_r(total_nop(n)) )
+
+       start = 1
+
+!
+!--    Read the data from the files (one file per processor)
+       DO  f = 0, fn
+
+          nc_stat = NF90_GET_VAR( id_set(f), id_var_x,           &
+                                  prt_x(start:start+nop(n,f)-1), &
+                                  start = (/ 1, n /),            &
+                                  count = (/ nop(n,f), 1 /) )
+          IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 13 )
+
+          nc_stat = NF90_GET_VAR( id_set(f), id_var_y,           &
+                                  prt_y(start:start+nop(n,f)-1), &
+                                  start = (/ 1, n /),            &
+                                  count = (/ nop(n,f), 1 /) )
+          IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 14 )
+
+          nc_stat = NF90_GET_VAR( id_set(f), id_var_z,           &
+                                  prt_z(start:start+nop(n,f)-1), &
+                                  start = (/ 1, n /),            &
+                                  count = (/ nop(n,f), 1 /) )
+          IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 15 )
+
+          nc_stat = NF90_GET_VAR( id_set(f), id_var_r,           &
+                                  prt_r(start:start+nop(n,f)-1), &
+                                  start = (/ 1, n /),            &
+                                  count = (/ nop(n,f), 1 /) )
+          IF ( nc_stat /= NF90_NOERR )  CALL handle_netcdf_error( nc_stat, 16 )
+
+          start = start + nop(n,f)
+
+       ENDDO
+
+       mean_z = 0.0
+       mean_r = 0.0
+       DO  i = 1, total_nop(n)
+          mean_z = mean_z + prt_z(i)
+          mean_r = mean_r + prt_r(i)
+       ENDDO
+       mean_z = mean_z / total_nop(n)
+       mean_r = mean_r / total_nop(n)
+
+       PRINT*, '*** time = ', tl(n), ' mean height = ', mean_z, &
+                                     ' mean radius = ', mean_r
+
+!
+!--    prt_x, prt_y, prt_z, and prt_r contain the particle coordinates and
+!--    radii, respectively. Please output these data or carry out the
+!--    requested analyzing in this program before you deallocate the arrays.
+
+       DEALLOCATE( prt_x, prt_y, prt_z, prt_r )
+
+    ENDDO
+
+
+ END PROGRAM analyze_particle_netcdf_data
+
+
+
+ SUBROUTINE handle_netcdf_error( nc_stat, position )
+!
+!-- Prints out a text message corresponding to the current NetCDF status
+
+    USE netcdf
+
+    IMPLICIT NONE
+
+    INTEGER, INTENT(IN) ::  nc_stat, position
+
+    IF ( nc_stat /= NF90_NOERR )  THEN
+       PRINT*, '+++ analyze_particle_netcdf_data'
+       PRINT*, '    netcdf error: ', TRIM( nf90_strerror( nc_stat ) )
+       PRINT*, '    position = ', position
+       STOP
+    ENDIF
+
+ END SUBROUTINE handle_netcdf_error
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/Makefile
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/Makefile	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/Makefile	(revision 3477)
@@ -0,0 +1,48 @@
+########################################################################################
+#
+#  KPP - The Kinetic PreProcessor
+#        Builds simulation code for chemical kinetic systems
+#
+#  Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu
+#  Copyright (C) 1997-2004 Adrian Sandu
+#
+#  KPP is free software; you can redistribute it and/or modify it under the
+#  terms of the GNU General Public License as published by the Free Software
+#  Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the
+#  License, or (at your option) any later version.
+#
+#  KPP is distributed in the hope that it will be useful, but WITHOUT ANY
+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+#  details.
+#
+#  You should have received a copy of the GNU General Public License along
+##  with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or
+#  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+#  Boston, MA  02111-1307,  USA.
+#
+#  Adrian Sandu
+#  Computer Science Department
+#  Virginia Polytechnic Institute and State University
+#  Blacksburg, VA 24060
+#  E-mail: sandu@cs.vt.edu
+#
+#######################################################################################
+
+include Makefile.defs
+
+all: setup kpp
+
+setup:
+	@./cflags.guess $(CC)
+
+kpp:
+	@cd src;make;cd ..
+
+clean:
+	@cd src;make clean;cd ..
+	@rm -f *~ */*~
+
+distclean: clean
+	@cd src;make maintainer-clean;cd ..
+	@rm -f bin/kpp
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/Makefile.defs
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/Makefile.defs	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/Makefile.defs	(revision 3477)
@@ -0,0 +1,70 @@
+# -*- sh -*-
+##############################################################################
+#
+#  KPP - The Kinetic PreProcessor
+#        Builds simulation code for chemical kinetic systems
+#
+#  Copyright (C) 1995-1997 Valeriu Damian and Adrian Sandu
+#  Copyright (C) 1997-2005 Adrian Sandu
+#
+#  KPP is free software; you can redistribute it and/or modify it under the
+#  terms of the GNU General Public License as published by the Free Software
+#  Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the
+#  License, or (at your option) any later version.
+#
+#  KPP is distributed in the hope that it will be useful, but WITHOUT ANY
+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+#  details.
+#
+#  You should have received a copy of the GNU General Public License along
+##  with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or
+#  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+#  Boston, MA  02111-1307,  USA.
+#
+#  Adrian Sandu
+#  Computer Science Department
+#  Virginia Polytechnic Institute and State University
+#  Blacksburg, VA 24060
+#  E-mail: sandu@cs.vt.edu
+#
+##############################################################################
+
+# In order to compile KPP you have to provide the following information:
+
+# 1. The name of the compiler you want to use. Normaly this 
+#    is either GNU C compiler (gcc) or the native compiler (cc)
+#    You can use the complete pathname if the compiler is not in $PATH 
+#    Note that for SUN machines is better to use gcc.
+#    For GNU C compiler use:
+#      CC=gcc
+#    For the native compiler use:
+#      CC=cc
+
+CC=cc 
+
+# 2. The name of your lexical analizer. KPP requires FLEX to be used.
+#    FLEX is a public domain lexical analizer and you can download it from
+#    http://www.gnu.org/software/flex/ or any other mirror site. If flex
+#    directory is not included in your path use the complete pathname.
+
+FLEX=flex
+
+# 3. The complete pathname of the FLEX library (libfl.a).
+#    On many systems this is either: 
+#    /usr/lib, /usr/lib64, /usr/local/util/lib/flex
+
+FLEX_LIB_DIR=/usr/lib64
+
+# 4. Platform independent C compiler flags. By default "-O" is used which 
+#    turns on optimization. If you are experiencing problems you may try 
+#    "-g" to include debuging informations.
+
+CC_FLAGS= -g -Wall
+
+# 5. Path to include additional directories
+#    Typically: /usr/include on Linux
+#               /usr/include/sys on Mac OS X
+INCLUDE_DIR = /usr/include
+
+##############################################################################
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/cflags
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/cflags	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/cflags	(revision 3477)
@@ -0,0 +1,1 @@
+ 
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/cflags.guess
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/cflags.guess	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/cflags.guess	(revision 3477)
@@ -0,0 +1,39 @@
+#!/bin/sh
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+CC=cc
+if [ x$1 != x ]; then CC=$1; fi
+
+exec 5>./cflags
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}:${CC}" in
+
+    *:HP-UX:*:*:cc*) # For HP-UX workstations
+        echo " -Aa -D_HPUX_SOURCE " 1>&5; exit 0 ;;
+
+    *:AIX:*:*:cc*) # For machines running AIX
+        echo " -Aa " 1>&5; exit 0 ;;
+
+    *:IRIX:*:*:cc*) # For machines running IRIX
+        echo " " 1>&5; exit 0 ;;
+
+    *:IRIX64:*:*:cc*) # For machines running IRIX64 
+        echo " " 1>&5; exit 0 ;;
+
+    *:Linux:*:*:cc*) # For Linux machines
+        echo " " 1>&5; exit 0 ;;
+
+    *:SunOS:*:*:cc*) # For SUN machines
+        echo " Please use gcc compiler on SUN machines."; exit 1 ;;
+
+    *:*:*:*:gcc*) # this is the default case, for gcc
+        echo " " 1>&5; exit 0 ;;
+
+    *:*:*:*:*) # this is the default case
+        echo " " 1>&5; exit 0 ;;
+esac
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/exact.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/exact.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/exact.c	(revision 3477)
@@ -0,0 +1,56 @@
+void main()
+{
+KPP_REAL dval[NSPEC];
+FILE * fp;
+int i;
+ 
+/* ---- TIME VARIABLES ------------------ */
+
+  RTOLS = 1e-6;
+  TSTART = 3600*12;
+  TEND = TSTART + 3600*24*5;
+  DT = 3600.;
+  TEMP = 236.21;
+
+  Initialize();
+      
+  for( i = 0; i < NVAR; i++ ) {
+    RTOL[i] = RTOLS;
+    ATOL[i] = 1;
+  }
+  STEPMIN = 0.01;
+  STEPMAX = 900;
+      
+/* ********** TIME LOOP **************************** */
+
+  InitSaveData();
+
+  printf("\n%7s %7s   ", "done[%]", "Time[h]");
+  for( i = 0; i < NMONITOR; i++ )  
+    printf( "%8s  ", SPC_NAMES[MONITOR[i]] );
+  for( i = 0; i < NMASS; i++ )  
+    printf( "(%6s)  ", SMASS[i] );
+  
+  TIME = TSTART;
+  while (TIME <= TEND) {
+    GetMass( C, dval );
+    printf("\n%6.1f%% %7.2f   ", (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600 );
+    for( i = 0; i < NMONITOR; i++ ) 
+      printf( "%8.2e  ", C[ MONITOR[i] ]/CFACTOR );
+    for( i = 0; i < NMASS; i++ ) 
+      printf( "%8.2e  ", dval[i]/CFACTOR );
+    
+    SaveData();
+
+    Update_SUN(); 
+    Update_RCONST();
+
+    INTEGRATE( DT );
+  }
+
+/* *********** END TIME LOOP *********************** */
+
+  printf("\n");
+  CloseSaveData();
+  GenerateMatlab("");
+}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/exact.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/exact.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/exact.f	(revision 3477)
@@ -0,0 +1,67 @@
+      PROGRAM driver
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+      KPP_REAL DVAL(NSPEC)
+      INTEGER i
+  
+C ---- TIME VARIABLES ------------------      
+
+      TSTART = 0
+      TEND = TSTART + 600
+      DT = 60.
+      TEMP = 298
+
+      STEPMIN = 0.01
+      STEPMAX = 900
+
+      RTOLS = 1e-8
+      do i=1,NVAR
+        RTOL(i) = RTOLS
+        ATOL(i) = 1e-3
+      end do
+     
+      CALL Initialize()
+
+C ********** TIME LOOP *************************
+
+      CALL InitSaveData()
+
+      write(6,990) (SPC_NAMES[MONITOR(i)], i=1,NMONITOR), 
+     *             (SMASS(i), i=1,NMASS )
+990   FORMAT('done[%] Time[h] ',20(4X,A6))
+
+      TIME = TSTART
+      do while (TIME .lt. TEND)
+
+        CALL GetMass( C, DVAL )
+        write(6,991) (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600.,
+     *               (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),
+     *               (DVAL(i)/CFACTOR, i=1,NMASS)
+991   FORMAT(F6.1,'% ',F7.2,3X,20(E10.4,2X))
+
+        CALL SaveData()
+
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+
+        CALL INTEGRATE( TIME, TIME+DT )
+
+      end do
+
+      CALL GetMass( C, DVAL )
+      write(6,991) (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600.,
+     *               (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),
+     *               (DVAL(i)/CFACTOR, i=1,NMASS)
+
+      CALL SaveData()
+
+C *********** END TIME LOOP ********
+
+      CALL CloseSaveData()
+      CALL GenerateMatlab(' ')
+
+      STOP
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.c	(revision 3477)
@@ -0,0 +1,63 @@
+int  InitSaveData();
+void Initialize();
+int  SaveData();
+int  CloseSaveData();
+int  GenerateMatlab( char * prefix );
+void GetMass( double CL[], double Mass[] );
+void INTEGRATE( double TIN, double TOUT );
+
+int main()
+{
+KPP_REAL dval[NSPEC];
+int i;
+ 
+/* ---- TIME VARIABLES ------------------ */
+
+  RTOLS = 1e-3;
+  TSTART = 3600*12;
+  TEND = TSTART + 3600*24*5;
+  DT = 3600.;
+  TEMP = 236.21;
+
+  Initialize();
+      
+  for( i = 0; i < NVAR; i++ ) {
+    RTOL[i] = RTOLS;
+    ATOL[i] = 1.0;
+  }
+  STEPMIN = 0.01;
+  STEPMAX = 900;
+      
+/* ********** TIME LOOP **************************** */
+
+  InitSaveData();
+
+  printf("\n%7s %7s   ", "done[%]", "Time[h]");
+  for( i = 0; i < NMONITOR; i++ )  
+    printf( "%8s  ", SPC_NAMES[MONITOR[i]] );
+  for( i = 0; i < NMASS; i++ )  
+    printf( "(%6s)  ", SMASS[i] );
+  
+  TIME = TSTART;
+  while (TIME <= TEND) {
+    GetMass( C, dval );
+    printf("\n%6.1f%% %7.2f   ", (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600 );
+    for( i = 0; i < NMONITOR; i++ ) 
+      printf( "%9.3e  ", C[ MONITOR[i] ]/CFACTOR );
+    for( i = 0; i < NMASS; i++ ) 
+      printf( "%9.3e  ", dval[i]/CFACTOR );
+    
+    SaveData();
+
+    INTEGRATE( TIME , TIME+DT );
+    TIME += DT;
+  }
+
+/* *********** END TIME LOOP *********************** */
+
+  printf("\n");
+  CloseSaveData();
+
+    return 0; /*didnt return anything initially */
+
+}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.f	(revision 3477)
@@ -0,0 +1,72 @@
+      PROGRAM driver
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+      KPP_REAL DVAL(NSPEC)
+      INTEGER i
+  
+C ---- TIME VARIABLES ------------------      
+
+      TSTART = 0
+      TEND = TSTART + 600
+      DT = 60.
+      TEMP = 298
+
+      STEPMIN = 0.01
+      STEPMAX = 900
+
+      RTOLS = 1e-3
+      DO i=1,NVAR
+        RTOL(i) = RTOLS
+        ATOL(i) = 1
+      END DO
+     
+      CALL Initialize()
+
+C ********** TIME LOOP *************************
+
+      CALL InitSaveData()
+
+      WRITE(6,990) (SPC_NAMES(MONITOR(i)), i=1,NMONITOR), 
+     *             (SMASS(i), i=1,NMASS )
+990   FORMAT('Done[%] Time[h] ',20(4X,A6))
+
+      TIME = TSTART
+      DO WHILE (TIME .lt. TEND)
+
+        CALL GetMass( C, DVAL )
+        WRITE(6,991) (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600.,
+     *               (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),
+     *               (DVAL(i)/CFACTOR, i=1,NMASS)
+991   FORMAT(F6.1,'% ',F7.2,3X,20(E10.4,2X))
+
+        CALL SaveData()
+
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+
+        CALL INTEGRATE( TIME, TIME+DT )
+
+      END DO
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600.,
+     *               (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),
+     *               (DVAL(i)/CFACTOR, i=1,NMASS)
+
+      CALL SaveData()
+
+C *********** END TIME LOOP ********
+
+      CALL CloseSaveData()
+
+      open(75, file='reference.data')
+      do i=1,KPP_NVAR
+        write(75,75) VAR(i)
+      end do
+75    FORMAT(100(E24.14,1X))      
+
+      STOP
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.f90	(revision 3477)
@@ -0,0 +1,54 @@
+PROGRAM KPP_ROOT_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC)
+      KPP_REAL :: RSTATE(20)
+      INTEGER :: i
+  
+!~~~> Initialization 
+
+      STEPMIN = 0.0d0
+      STEPMAX = 0.0d0
+
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+     
+      CALL Initialize()
+      CALL InitSaveData()
+
+!~~~> Time loop
+      T = TSTART
+kron: DO WHILE (T < TEND)
+
+        TIME = T
+        CALL GetMass( C, DVAL )
+        WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,       &
+                   ( TRIM(SPC_NAMES(MONITOR(i))),           &
+                     C(MONITOR(i))/CFACTOR, i=1,NMONITOR )
+        CALL SaveData()
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+
+        CALL INTEGRATE( TIN = T, TOUT = T+DT, RSTATUS_U = RSTATE, &
+        ICNTRL_U = (/ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /) )
+        T = RSTATE(1)
+
+      END DO kron
+!~~~> End Time loop
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,     &
+               ( TRIM(SPC_NAMES(MONITOR(i))),           &
+                 C(MONITOR(i))/CFACTOR, i=1,NMONITOR ) 
+      TIME = T
+      CALL SaveData()
+      CALL CloseSaveData()
+
+991   FORMAT(F6.1,'%. T=',E9.3,2X,200(A,'=',E11.4,'; '))
+
+END PROGRAM KPP_ROOT_Driver
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.m
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.m	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general.m	(revision 3477)
@@ -0,0 +1,83 @@
+
+  TSTART = 0;
+  TEND = TSTART + 600;
+  DT = 60.;
+  TEMP = 298;
+
+  RTOLS = 1.0e-6;
+  ATOLS = 1.0e-3;
+     
+  KPP_ROOT_Initialize;
+  
+  Options = odeset('AbsTol',ATOLS,'RelTol',RTOLS,'Jacobian',@KPP_ROOT_Jac_Chem);
+
+% ********** TIME LOOP *************************
+
+  C(1:KPP_NVAR) = VAR(1:KPP_NVAR); 
+  C((KPP_NVAR+1):KPP_NSPEC) = FIX(1:KPP_NFIX);
+  DVAL = KPP_ROOT_GetMass( C );
+  if ( ~isempty(SMASS) )
+     fprintf('Initial Mass = %10.4e\n', DVAL(1:NMASS)/CFACTOR);
+  end   
+  
+%  KPP_ROOT_InitializeSaveData;
+
+%  disp(['Done[%] Time[h] ',SPC_NAMES(MONITOR(1:NMONITOR))])
+
+  TIME = TSTART;
+  
+  Tspan = linspace( TSTART, TEND, 100 );
+
+  [T, Y] = ode15s(@KPP_ROOT_Fun_Chem, Tspan, VAR, Options);
+
+  VAR(1:KPP_NVAR) = Y(length(T),1:KPP_NVAR)';
+  Y = [Y, ones(length(T),1)*FIX(:)'];
+  
+  C(1:KPP_NVAR) = VAR(1:KPP_NVAR); 
+  C((NVAR+1):NSPEC) = FIX(1:NFIX);
+  DVAL = KPP_ROOT_GetMass( C );
+	
+  fprintf('done %6.1f,  %7.2h hours', (TIME-TSTART)/(TEND-TSTART), TIME/3600.);
+  disp( Y(:,MONITOR(1:NMONITOR))/CFACTOR );
+  if ( ~isempty(SMASS) )
+    fprintf('Final Mass = %10.4e\n', DVAL(1:NMASS)/CFACTOR);
+  end
+  
+  for i = 1:NMONITOR
+    figure; plot( (T)/3600, Y(:,MONITOR(i))/CFACTOR );
+    title( SPC_NAMES( MONITOR(i),:) ,'FontSize',12); 
+    set(gca,'XLim',[TSTART,TEND]/3600,'FontSize',12);
+    xlabel('Time [ h ]','FontSize',12);
+    ylabel('Concentration','FontSize',12);
+  end  
+
+%   KPP_ROOT_FUNC_SaveData;
+%   KPP_ROOT_FUNC_CloseSaveData;
+
+return
+
+
+%  function P = KPP_ROOT_Fun_Chem(T, Y) 
+%       
+%    global TIME FIX RCONST  
+%   
+%    Told = TIME;
+%    TIME = T;
+%    KPP_ROOT_Update_SUN;
+%    KPP_ROOT_Update_RCONST;
+%    P = KPP_ROOT_Fun( Y, FIX, RCONST );
+%    TIME = Told;
+%  return
+%  
+%   
+%  function J =  KPP_ROOT_Jac_Chem(T, Y)   
+%    
+%    global TIME FIX RCONST ; 
+%    
+%    Told = TIME;
+%    TIME = T;
+%    KPP_ROOT_Update_SUN;
+%    KPP_ROOT_Update_RCONST;
+%    J = KPP_ROOT_Jac_SP( Y, FIX, RCONST );
+%    TIME = Told
+%  return              
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_adj.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_adj.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_adj.c	(revision 3477)
@@ -0,0 +1,148 @@
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Driver for the Adjoint (ADJ) model
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+int  InitSaveData();
+void Initialize();
+int  SaveData();
+int  CloseSaveData();
+int  GenerateMatlab( char * prefix );
+void GetMass( KPP_REAL CL[], KPP_REAL Mass[] );
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] );
+
+int main() {
+
+  KPP_REAL T, DVAL[NSPEC];
+  int i, j, ind_1 = ind_O1D, ind_2 = ind_O3;
+
+  /*~~>  NADJ = Number of functionals for which sensitivities are computed
+     Note: the setting below is for sensitivities of all final concentrations;
+     the setting may have to be changed for other applications */
+  int NADJ = NVAR;
+  KPP_REAL Y_adj[NADJ][NVAR], ATOL_adj[NADJ][NVAR], RTOL_adj[NADJ][NVAR];
+
+/*~~>  Control (in) and status (out) arguments for the integration */
+  KPP_REAL RCNTRL[20], RSTATUS[20];
+  int ICNTRL[20], ISTATUS[20];
+  
+  STEPMIN = (double)0.0;
+  STEPMAX = (double)0.0;
+
+/*~~~> Tolerances for calculating concentrations */       
+  for( i=0; i<NVAR; i++) {
+    RTOL[i] = 1.0e-4;
+    ATOL[i] = 1.0e-3;
+  }
+      
+/*~~~> Tolerances for calculating adjoints 
+       are used for controlling adjoint truncation error
+       and for solving the linear adjoint equations by iterations  
+       Note: Adjoints typically span many orders of magnitude
+       and a careful tuning of ATOL_adj may be necessary */    
+  for(i=0; i<NADJ; i++) {
+    for(j=0; j<NVAR; j++) {
+      RTOL_adj[i][j] = 1.0e-4;
+      ATOL_adj[i][j] = 1.0e-10;
+    }
+  }
+     
+  Initialize();
+      
+/*~~~>  The adjoint values at the final time */
+  for(i=0; i<NADJ; i++) {
+    for(j=0; j<NVAR; j++)
+      Y_adj[i][j] = (double)0.0;
+  }
+  for(j=0; j<NADJ; j++)
+    Y_adj[j][j] = (double)1.0;
+
+/*~~~> Default control options */
+  for(i=0; i<20; i++) {
+    ICNTRL[i] = 0;
+    RCNTRL[i] = (double)0.0;
+    ISTATUS[i] = 0;
+    RSTATUS[i] = (double)0.0;
+  }     
+
+/*~~~> Begin time loop */
+
+  TIME = TSTART;
+  InitSaveData();
+
+  T = TSTART;
+
+  GetMass( C, DVAL );
+  printf("\n%6.1f%% %7.2f   ", (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600 );
+  for( i = 0; i < NMONITOR; i++ ) 
+    printf( "%9.3e  ", C[ MONITOR[i] ]/CFACTOR );
+  for( i = 0; i < NMASS; i++ ) 
+    printf( "%9.3e  ", DVAL[i]/CFACTOR );
+
+  TIME = T;
+  SaveData();
+
+  INTEGRATE_ADJ( NADJ, VAR, Y_adj, T, TEND, ATOL_adj, RTOL_adj, ICNTRL, 
+		 RCNTRL, ISTATUS, RSTATUS );
+
+  GetMass( C, DVAL );
+
+  printf("\n%6.1f%% %7.2f   ", (TEND-TSTART)/(TEND-TSTART)*100, TIME/3600 );
+  for( i = 0; i < NMONITOR; i++ ) 
+    printf( "%9.3e  ", C[ MONITOR[i] ]/CFACTOR );
+  for( i = 0; i < NMASS; i++ ) 
+    printf( "%9.3e   ", DVAL[i]/CFACTOR );
+
+  TIME = T;
+  SaveData();
+
+/*~~~> End time loop ~~~~~~~~~~*/
+
+  printf( "\n\n****************************************************\n" );
+  printf( " Concentrations and Sensitivities at final time\n" );
+  printf( " were written in the file KPP_ROOT_ADJ_results.m\n");
+  printf( "****************************************************\n");
+
+  FILE *out;
+  out = fopen("KPP_ROOT_ADJ_results.m", "w");
+  if(out == NULL) {
+    printf("Unable to open file KPP_ROOT_ADJ_results.m\n");
+    exit(1);
+  }
+
+  for(j=0; j<NADJ; j++) {
+    for(i=0; i<NVAR; i++)
+      fprintf( out, "%7.6e   ", Y_adj[j][i] );
+    fprintf( out, "\n" );
+  }
+
+  fclose(out);
+
+  printf( "\nADJ: d[%s](tf)/d[%s](t0) = %7.6e\n", SPC_NAMES[ind_1], 
+	  SPC_NAMES[ind_1], Y_adj[ind_1][ind_1] );
+  printf( "ADJ: d[%s](tf)/d[%s](t0) = %7.6e\n", SPC_NAMES[ind_2], 
+	  SPC_NAMES[ind_2], Y_adj[ind_2][ind_2] );
+  printf( "ADJ: d[%s](tf)/d[%s](t0) = %7.6e\n", SPC_NAMES[ind_2], 
+	  SPC_NAMES[ind_1], Y_adj[ind_2][ind_1] );
+  printf( "ADJ: d[%s](tf)/d[%s](t0) =  %7.6e\n\n", SPC_NAMES[ind_1], 
+	  SPC_NAMES[ind_2], Y_adj[ind_1][ind_2] );
+
+  CloseSaveData();
+ 
+/*~~~> The entire matrix of sensitivities */
+  printf("   ");
+  for(i=0; i<NVAR; i++)
+    printf( "%15s", SPC_NAMES[i] );
+  printf("\n");
+  for(j=0; j<NVAR; j++) {
+    printf("%5s = ", SPC_NAMES[j]);
+    for(i=0; i<NADJ; i++)
+      printf( " %7.6e   ",  Y_adj[i][j] );
+    printf("\n");
+  }
+
+  return 0;
+}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_adj.f90	(revision 3477)
@@ -0,0 +1,122 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Driver for the Adjoint (ADJ) model
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PROGRAM KPP_ROOT_ADJ_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC)
+      INTEGER :: i, j, ind_1 = 1, ind_2 = 2
+      ! INTEGER :: ind_1 = ind_NO2, ind_2 = ind_O3
+
+!~~>  NADJ = Number of functionals for which sensitivities are computed
+!     Note: the setting below is for sensitivities of all final concentrations;
+!           the setting may have to be changed for other applications
+      INTEGER, PARAMETER :: NADJ = NVAR
+      KPP_REAL, DIMENSION(NVAR,NADJ) :: Y_adj, ATOL_adj, RTOL_adj
+
+!~~>  Control (in) and status (out) arguments for the integration
+      KPP_REAL, DIMENSION(20) :: RCNTRL, RSTATUS
+      INTEGER,       DIMENSION(20) :: ICNTRL, ISTATUS
+  
+      STEPMIN = 0.0d0
+      STEPMAX = 0.0d0
+
+!~~~> Tolerances for calculating concentrations       
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+      
+!~~~> Tolerances for calculating adjoints 
+!     are used for controlling adjoint truncation error
+!     and for solving the linear adjoint equations by iterations  
+!     Note: Adjoints typically span many orders of magnitude
+!           and a careful tuning of ATOL_adj may be necessary     
+      DO j=1,NADJ
+        DO i=1,NVAR
+          RTOL_adj(i,j) = 1.0d-4
+          ATOL_adj(i,j) = 1.0d-10
+        END DO
+      END DO
+     
+      CALL Initialize()
+      
+!~~~>  The adjoint values at the final time
+      Y_adj(1:NVAR,1:NADJ) = 0.0d0
+      DO j=1,NADJ
+        Y_adj(j,j) = 1.0d0
+      END DO
+
+!~~~> Default control options
+      ICNTRL(1:20) = 0
+      RCNTRL(1:20) = 0.0d0       
+
+!~~~> Begin time loop
+
+      TIME = TSTART
+      CALL InitSaveData()
+
+      T = TSTART
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,        &
+                  (TRIM(SPC_NAMES(MONITOR(i))),            &
+                    C(MONITOR(i))/CFACTOR, i=1,NMONITOR),  &
+                  (TRIM(SMASS(i)),DVAL(i)/CFACTOR, i=1,NMASS)
+
+      TIME = T
+      CALL SaveData()
+
+      CALL INTEGRATE_ADJ( NADJ, VAR, Y_adj, T, TEND,       &
+                          ATOL_adj, RTOL_adj,              &
+                          ICNTRL, RCNTRL, ISTATUS, RSTATUS )
+
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (TEND-TSTART)/(TEND-TSTART)*100, TEND,  &
+                  (TRIM(SPC_NAMES(MONITOR(i))),            &
+                    C(MONITOR(i))/CFACTOR, i=1,NMONITOR),  &
+                  (TRIM(SMASS(i)),DVAL(i)/CFACTOR, i=1,NMASS)
+
+      TIME = T
+      CALL SaveData()
+
+!~~~> End time loop ~~~~~~~~~~
+
+      OPEN(20, FILE='KPP_ROOT_ADJ_results.m')
+      WRITE(6,*) '**************************************************'
+      WRITE(6,*) ' Concentrations and Sensitivities at final time '
+      WRITE(6,*) ' were written in the file KPP_ROOT_ADJ_results.m'
+      WRITE(6,*) '**************************************************'
+      DO j=1,NADJ
+        WRITE(20,993) ( Y_adj(i,j), i=1,NVAR )          
+      END DO
+
+      WRITE(6,995) TRIM(SPC_NAMES(ind_1)),TRIM(SPC_NAMES(ind_1)), &
+                   Y_adj(ind_1,1)
+      WRITE(6,995) TRIM(SPC_NAMES(ind_2)),TRIM(SPC_NAMES(ind_2)), &
+                   Y_adj(ind_2,2)
+      WRITE(6,995) TRIM(SPC_NAMES(ind_2)),TRIM(SPC_NAMES(ind_1)), &
+                   Y_adj(ind_1,2)
+      WRITE(6,995) TRIM(SPC_NAMES(ind_1)),TRIM(SPC_NAMES(ind_2)), &
+                   Y_adj(ind_2,1)
+
+      CALL CloseSaveData()
+      
+ 991  FORMAT(F6.1,'%. T=',E10.3,3X,20(A,'=',E10.4,';',1X))
+ 993  FORMAT(1000(E24.16,2X))
+ 995  FORMAT('ADJ: d[',A,'](tf)/d[',A,'](t0)=',E14.7)
+ 
+      !~~~> The entire matrix of sensitivities
+      WRITE(6,996) ( 'd ',TRIM(SPC_NAMES(i)), i=1,NVAR ) 
+      DO j=1,NADJ
+        WRITE(6,997) TRIM(SPC_NAMES(j)),( Y_adj(j,i), i=1,NVAR )          
+      END DO
+ 996  FORMAT(12X,100('  ',A2,A6,4X))
+ 997  FORMAT('d/d',A6,' = ',100(E12.5,2X))
+
+END PROGRAM KPP_ROOT_ADJ_Driver
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_complete.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_complete.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_complete.f90	(revision 3477)
@@ -0,0 +1,114 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Driver for the tangent linear model
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PROGRAM KPP_ROOT_ADJ_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC)
+      INTEGER :: i, j, ind_1 = ind_NO2, ind_2 = ind_O3
+
+! ---  Number of functional for which sensitivities are computed
+! ---  Note: this value is set for sensitivities w.r.t. all initial values
+! ---       it may have to be changed for other applications
+      INTEGER NADJ
+      PARAMETER (NADJ = 2)
+      KPP_REAL  Y_ADJ(NVAR,NADJ)
+      REAL(kind=dble_p)  R1(NVAR), R2(NVAR), V1, V2
+  
+! ---- TIME VARIABLES ------------------      
+
+      STEPMIN = 0.0d0
+      STEPMAX = 0.0d0
+
+      CALL SRAND(89)
+      RTOLS = 1.0d-3
+      DO i=1,NVAR
+        RTOL(i) = RTOLS
+        ATOL(i) = 1.0d-2
+        R1(i) = 10*(RAND()-0.5d0)
+        R2(i) = 10*(RAND()-0.5d0)
+      END DO
+     
+      CALL Initialize()
+! ---  Note: the initial values below are adjoint values at the final time
+     Y_ADJ(1:NVAR,1) = R1(1:NVAR)
+     Y_ADJ(1:NVAR,2) = R2(1:NVAR)
+
+! ********** T LOOP *************************
+
+      CALL InitSaveData()
+
+      WRITE(6,990) (SPC_NAMES(MONITOR(i)), i=1,NMONITOR)
+990   FORMAT('DOne[%] Time[h] ',20(4X,A12))
+
+      T = TSTART
+
+        CALL GetMass( C, DVAL )
+        WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T/3600.,   &
+                    (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),  &
+                   (DVAL(i)/CFACTOR, i=1,NMASS)
+991     FORMAT(F6.1,'% ',F7.2,3X,20(E10.4,2X))
+
+        CALL SaveData()
+
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+
+        CALL INTEGRATE_ADJ( NADJ, Y_ADJ, T, TEND )
+
+      V1 = 0.0d0
+      V2 = 0.0d0
+      DO i=1,NVAR
+        V1 = V1 + Y_ADJ(i,1)*R2(i)
+        V2 = V2 + Y_ADJ(i,2)*R1(i)
+      END DO
+
+      PRINT*,'**************************************************'
+      WRITE(6,887) V1
+      WRITE(6,888) V2
+      WRITE(6,889) ABS(V1-V2)/MAX(ABS(V1),ABS(V2))
+887   FORMAT('u.M''*M''.v = ',E24.14 )
+888   FORMAT('v.M''*M''.u = ',E24.14 )
+889   FORMAT('RelativeErr=',E10.3 )
+      PRINT*,'**************************************************'
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T/3600.,    &
+                    (C(MONITOR(i))/CFACTOR, i=1,NMONITOR), &
+                    (DVAL(i)/CFACTOR, i=1,NMASS)
+
+      CALL SaveData()
+
+! *********** END TIME LOOP ********
+      OPEN(20, FILE='KPP_ROOT_ADJ_results.m')
+      WRITE(6,*) '**************************************************'
+      WRITE(6,*) ' Concentrations and Sensitivities at final time '
+      WRITE(6,*) ' were written in the file KPP_ROOT_ADJ_results.m'
+      WRITE(6,*) '**************************************************'
+      DO j=1,NADJ
+        WRITE(20,993) ( Y_ADJ(i,j), i=1,NVAR )          
+      END DO
+ 993  FORMAT(1000(E24.16,2X))
+
+      PRINT*,'ADJ: d[',TRIM(SPC_NAMES(ind_1)),'](tf) / d[', &
+            TRIM(SPC_NAMES(ind_1)),'](t0)=', Y_ADJ(ind_1,1)
+      PRINT*,'ADJ: d[',TRIM(SPC_NAMES(ind_2)),'](tf) / d[', &
+            TRIM(SPC_NAMES(ind_2)),'](t0)=', Y_ADJ(ind_2,2)
+      PRINT*,'ADJ: d[',TRIM(SPC_NAMES(ind_1)),'](tf) / d[', &
+            TRIM(SPC_NAMES(ind_2)),'](t0)=', Y_ADJ(ind_1,2)
+      PRINT*,'ADJ: d[',TRIM(SPC_NAMES(ind_2)),'](tf) / d[', &
+            TRIM(SPC_NAMES(ind_1)),'](t0)=', Y_ADJ(ind_2,1)
+
+      PRINT*,'TLM: d[NO2](tf) / d[NO2](t0)=  1.714961808143527E-002'
+      PRINT*,'TLM: d[ O3](tf) / d[ O3](t0)= -4.447774183920545E-003'
+      PRINT*,'TLM: d[NO2](tf) / d[ O3](t0)=  0.897512294491540'
+      PRINT*,'TLM: d[ O3](tf) / d[NO2](t0)= -5.543729901774693E-005'
+ 
+
+      CALL CloseSaveData()
+
+END PROGRAM KPP_ROOT_ADJ_Driver
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_ddm_ic.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_ddm_ic.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_ddm_ic.f	(revision 3477)
@@ -0,0 +1,117 @@
+C --- Driver for computing sensitivity coefficients w.r.t. all initial values
+      PROGRAM driver
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C ---  Number of sensitivity coefficients to compute
+C ---  Note: this value is set for sensitivities w.r.t. all initial values
+C ---       it may have to be changed for other applications
+      INTEGER NSENSIT
+      PARAMETER (NSENSIT = NVAR)
+      
+      KPP_REAL  DVAL(NSPEC)
+      KPP_REAL  Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER i
+
+C --- The type of sensitivity coefficients to compute
+C --- DDMTYPE = 0 : sensitivities w.r.t. initial values
+C --- DDMTYPE = 1 : sensitivities w.r.t. parameters
+      DDMTYPE = 0
+   
+C ---- TIME VARIABLES ------------------      
+
+      TSTART = 0
+      TEND = TSTART + 600
+      DT = 60.
+      TEMP = 298
+
+      STEPMIN = 0.01
+      STEPMAX = 900
+
+      PRINT*,'Please provide: RTOL = , ATOL = '
+      READ*,RTOLS, ATOLS
+      do i=1,NVAR
+        RTOL(i) = RTOLS
+        ATOL(i) = ATOLS
+      end do
+    
+C ********** TIME LOOP *************************
+
+      CALL Initialize()
+
+C -- Initialize Concentrations and Sensitivities
+      DO i=1,NVAR
+         Y(i) = VAR(i)
+      END DO
+	
+C ---  Note: the initial values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+      DO j=1,NSENSIT
+        DO i=1,NVAR
+	   Y(i+NVAR*j) = 0.0D0
+	END DO
+	Y(j+NVAR*j) = 1.0D0
+      END DO
+
+      CALL InitSaveData()
+
+      WRITE(6,990) (SPC_NAMES(MONITOR(i)), i=1,NMONITOR), 
+     *             (SMASS(i), i=1,NMASS )
+990   FORMAT('done[%] Time[h] ',20(4X,A6))
+
+      TIME = TSTART
+      DO WHILE (TIME .lt. TEND)
+
+        CALL GetMass( C, DVAL )
+        WRITE(6,991) (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600.,
+     *               (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),
+     *               (DVAL(i)/CFACTOR, i=1,NMASS)
+991   FORMAT(F6.1,'% ',F7.2,3X,20(E10.4,2X))
+
+        CALL SaveData()
+
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+	
+        CALL INTEGRATE( NSENSIT, Y, TIME, TIME+DT )
+
+        DO i=1,NVAR
+           VAR(i) = Y(i)
+        END DO
+	
+      END DO
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (TIME-TSTART)/(TEND-TSTART)*100, TIME/3600.,
+     *               (C(MONITOR(i))/CFACTOR, i=1,NMONITOR),
+     *               (DVAL(i)/CFACTOR, i=1,NMASS)
+
+C      DO i=1,NSENSIT
+C        WRITE(6,992) i, ( Y(NVAR*i+j), j=1,NVAR )          
+C      END DO
+C 992  FORMAT('SEN(',I3,') = ',1000(E10.4,2X))
+
+      CALL SaveData()
+
+C *********** END TIME LOOP ********
+      OPEN(20, FILE='KPP_ROOT_results.m')
+      WRITE(6,*) '**************************************************'
+      WRITE(6,*) '* Concentrations and Sensitivities at final time *'
+      WRITE(6,*) '*  were written in the file KPP_ROOT_results.m  *'
+      WRITE(6,*) '**************************************************'
+      DO i=0,NSENSIT
+        WRITE(20,993) ( Y(NVAR*i+j), j=1,NVAR )          
+      END DO
+ 993  FORMAT(1000(E24.16,2X))
+
+      CALL CloseSaveData()
+
+      STOP
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_hsv.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_hsv.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_hsv.f90	(revision 3477)
@@ -0,0 +1,299 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Driver to test Hessian Singular Vectors
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PROGRAM KPP_ROOT_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC), DV(NVAR)
+      KPP_REAL :: Hs(NVAR,NVAR), SOA(NVAR)
+      INTEGER :: i, j, ind_1 = 1, ind_2 = 2, ind_COST
+      LOGICAL :: LHessian
+      INTEGER, PARAMETER :: NSOA = 1
+      KPP_REAL :: Y_tlm(NVAR,NSOA)
+      KPP_REAL :: Y_adj(NVAR,1)
+      KPP_REAL :: Y_soa(NVAR,NSOA)
+ 
+      integer          lwork, n
+      parameter        (n = NVAR)
+      
+      ! Number of desired eigenvectors
+      INTEGER, PARAMETER :: NEIG = 4
+      double complex   zwork(2000), alpha(NEIG), beta(NEIG), &
+                       eivec(n,NEIG), tmp(n), residu(n)
+
+      integer          kmax, jmax, jmin, maxstep, method, m, l, maxnmv,  &
+                       order, testspace
+      double precision tol, lock, dznrm2
+      logical          wanted
+      double complex   target
+      real             elapse
+      real             etime, tarray(2)
+
+      target = (0.0,0.0)
+      tol = 1.d-9
+      kmax = NEIG           ! Number of wanted solutions
+      jmin = 10; jmax = 20  ! min/max size of search space
+      
+      maxstep = 30  ! Max number of Jacobi-Davidson iterations
+      lock = 1.d-9
+!...     order =  0: nearest to target
+!...     order = -1: smallest real part
+!...     order =  1: largest real part
+!...     order = -2: smallest complex part
+!...     order =  2: largest complex part
+      order = 1
+
+      method = 2  ! 1=gmres(m), 2=cgstab(l)
+      m = 30      ! for gmres(m):
+      l = 2       ! for cgstab(l):
+
+      maxnmv = 20 !...     maximum number of matvecs in cgstab or gmres
+      
+      testspace = 3
+!...     Testspace 1: w = "Standard Petrov" * v (Section 3.1.1)
+!...     Testspace 2: w = "Standard 'variable' Petrov" * v (Section 3.1.2)
+!...     Testspace 3: w = "Harmonic Petrov" * v (Section 3.5.1)
+
+      if ( method .eq. 1 ) then
+         lwork =  4 +  m  + 5*jmax + 3*kmax
+      else
+         lwork = 10 + 6*l + 5*jmax + 3*kmax
+      end if
+      wanted = .true.
+
+      call jdqz(alpha, beta, eivec, wanted, n, target, tol, &
+          kmax, jmax, jmin, &
+          method, m, l, maxnmv, maxstep, &
+          lock, order, testspace, zwork, lwork )
+
+      elapse = etime( tarray )
+
+      print*,'Number of converged eigenvalues = ',kmax
+      
+!...     Compute the norms of the residuals:
+      do j = 1, kmax
+         call amul  ( n, eivec(1,j), residu )
+         call zscal ( n, beta(j), residu, 1)
+         call bmul  ( n, eivec(1,j), tmp )
+         call zaxpy( n, -alpha(j), tmp, 1, residu, 1 )
+         print '("lambda(",i2,"): (",1p,e11.4,",",e11.4, &
+             " )")', j,alpha(j)/beta(j)
+         print '(a30,d13.6)', '||beta Ax - alpha Bx||:', &
+               dznrm2( n, residu, 1 )
+      end do
+      write(*,10) tarray(1), elapse
+
+   10 format(1x,'END JDQZ AFTER ',f6.2,' SEC. CPU-TIME AND ', f6.2, &
+            ' SEC. ELAPSED TIME' )
+
+      open(120,file='KPP_ROOT_vec.m')
+      do i=1,NVAR
+        write(120,120) (eivec(i,j), j=1,NEIG)
+      end do
+      close(120)	
+
+      open(120,file='KPP_ROOT_val.m')
+      do i=1,NEIG
+        write(120,120) ALPHA(i), BETA(i), ALPHA(i)/BETA(i)
+      end do
+      close(120)	
+      
+120   format(10000(E14.7,1X))
+
+END PROGRAM KPP_ROOT_Driver
+
+
+!==========================================================================
+!     Dummy preconditioner subroutine
+!==========================================================================
+      subroutine PRECON( neq, q )
+!...............................................
+!...     Subroutine to compute q = K^-1 q
+!...............................................
+      integer        neq, i
+      double complex q(neq)
+      end subroutine PRECON
+
+
+!==========================================================================
+!     matrix vector multiplication subroutine
+!
+!
+!     Compute the matrix vector multiplication y<---A*x
+!     where A = adjoint(Model)*tlm(Model)
+!
+!     Note: we multiply the real and imaginaray parts separately
+!           x = (xr,xi)
+!           y = (yr,yi)
+!           We run the code twice such that:
+!           yr <-- A*xr and yi <-- A*xi
+!
+!==========================================================================
+      subroutine AMUL (n, u, v)
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+      integer           n, j
+      Double Complex u(n), v(n)
+      Double precision xr(n), yr(n),  xi(n), yi(n), three, two 
+      parameter         (three = 3.0D+0, two = 2.0D+0)
+      INTEGER, PARAMETER :: NSOA = 1
+      KPP_REAL :: Y_tlm(NVAR,NSOA)
+      KPP_REAL :: Y_adj(NVAR,1)
+      KPP_REAL :: Y_soa(NVAR,NSOA)
+      integer, save :: indexA = 0
+      
+      indexA = indexA + 1
+      print*,'AMUL #',indexA
+
+! Real and imaginary parts of complex inputs
+      xr(1:n) = DBLE( u(1:n) )
+      xi(1:n) = DIMAG( u(1:n) )
+
+
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+!~~~>  The cost function is 0.5*VAR(ind_COST, tF)**2
+      ind_COST = ind_O3
+
+! First do a FWD and a TLM integration
+      CALL Initialize()
+      Y_tlm(1:NVAR,1) = xr(1:NVAR)
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+
+! Set Lambda(t_final) = Y_tlm(t_final) and do backward integration
+      CALL Initialize()
+      Y_adj(1:NVAR,1) = Y_tlm(1:NVAR)
+      Y_tlm(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      yr(1:NVAR) = Y_adj(1:NVAR)
+
+! First do a FWD and a TLM integration
+      CALL Initialize()
+      Y_tlm(1:NVAR,1) = xi(1:NVAR)
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+
+! Set Lambda(t_final) = Y_tlm(t_final) and do backward integration
+      CALL Initialize()
+      Y_adj(1:NVAR,1) = Y_tlm(1:NVAR)
+      Y_tlm(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      yi(1:NVAR) = Y_adj(1:NVAR)
+
+! Convert double outputs to complex
+      DO i=1,n
+        v(i) = DCMPLX( yr(i), yi(i) )
+      END DO	
+
+
+      print*,'   (END AMUL #',indexA,')'
+      
+      end  subroutine AMUL
+
+!==========================================================================
+!     matrix vector multiplication subroutine
+!
+!     Compute the matrix vector multiplication y<---B*x
+!     where B = Hessian, and y = SOA
+!
+!     Note: we multiply the real and imaginaray parts separately
+!           x = (xr,xi)
+!           y = (yr,yi)
+!           We run the code twice such that:
+!           yr <-- B*xr and yi <-- B*xi
+!==========================================================================
+
+      subroutine BMUL (n, u, v)
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+      integer           n, j
+      Double Complex u(n), v(n)
+      Double precision xr(n), yr(n), xi(n), yi(n)
+      INTEGER, PARAMETER :: NSOA = 1
+      KPP_REAL :: Y_tlm(NVAR,NSOA)
+      KPP_REAL :: Y_adj(NVAR,1)
+      KPP_REAL :: Y_soa(NVAR,NSOA)
+      KPP_REAL :: Final(NVAR), FinalTlm(NVAR)
+      integer, save :: indexB = 0
+      
+      indexB = indexB + 1
+      print*,'BMUL #',indexB
+
+! Real and imaginary parts of complex inputs
+      xr(1:n) = DBLE( u(1:n) )
+      xi(1:n) = DIMAG( u(1:n) )
+
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+!~~~>  The cost function is 0.5*VAR(ind_COST, tF)**2
+      ind_COST = ind_O3
+
+! Forward & TLM integration
+      CALL Initialize()
+      Y_tlm(1:NVAR,1) = xr
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      Final(1:NVAR)    = VAR(1:NVAR)			    
+      FinalTlm(1:NVAR) = Y_tlm(1:NVAR)			    
+			    
+! Adjoint and SOA integration, real part
+      CALL Initialize()
+      Y_adj(1:NVAR,1) = 0.0d0; Y_adj(ind_COST,1) = Final(ind_COST)
+      Y_soa(1:NVAR,1) = 0.0d0; Y_soa(ind_COST,1) = FinalTlm(ind_COST)
+      Y_tlm(1:NVAR,1) = xr
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+			    
+      yr(1:NVAR) = Y_soa(1:NVAR,1)			    
+
+
+! Forward & TLM integration
+      CALL Initialize()
+      Y_tlm(1:NVAR,1) = xi
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      Final(1:NVAR)    = VAR(1:NVAR)			    
+      FinalTlm(1:NVAR) = Y_tlm(1:NVAR)			    
+
+! Adjoint and SOA integration, imaginary part
+      CALL Initialize()
+      Y_adj(1:NVAR,1) = 0.0d0; Y_adj(ind_COST,1) = Final(ind_COST)
+      Y_soa(1:NVAR,1) = 0.0d0; Y_soa(ind_COST,1) = FinalTlm(ind_COST)
+      Y_tlm(1:NVAR,1) = xi
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+			    
+      yi(1:NVAR) = Y_soa(1:NVAR,1)			    
+
+! Convert double outputs to complex
+      DO i=1,n
+        v(i) = DCMPLX( yr(i), yi(i) )
+      END DO	
+
+
+      print*,'   (END BMUL #',indexB,')'
+      
+      end subroutine BMUL 
+! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_soa.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_soa.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_soa.f90	(revision 3477)
@@ -0,0 +1,116 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Driver for the Second Order Adjoint (SOA) model
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PROGRAM KPP_ROOT_SOA_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC)
+      INTEGER :: i, j, ind_1 = 1, ind_2 = 2
+      ! INTEGER :: ind_1 = ind_NO2, ind_2 = ind_O3
+ 
+!~~~>  Number of second order adjoints
+!      i.e., number of vectors U_i s.t. SOA_i = Hess*U_i
+!      1 <= i <= NSOA
+
+      INTEGER, PARAMETER :: NSOA = 2
+
+      KPP_REAL :: Y_tlm(NVAR,NSOA)
+      KPP_REAL :: Y_adj(NVAR)
+      KPP_REAL :: Y_soa(NVAR,NSOA)
+  
+      STEPMIN = 0.0d0
+      STEPMAX = 0.0d0
+
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+     
+      CALL Initialize()
+!~~~>  Tangent linear variable values at the initial time
+      Y_tlm(1:NVAR,1:NSOA) = 0.0d0
+      Y_tlm(ind_1,1) = 1.0d0
+      Y_tlm(ind_2,2) = 1.0d0
+!~~~>  Adjoint values at the final time
+      Y_adj(1:NVAR) = 0.0d0
+      Y_adj(ind_1)  = 1.0d0
+!~~~>  2nd order adjoint values at the final time      
+      Y_soa(1:NVAR,1:NSOA) = 0.0d0
+      Y_soa(ind_1,1) = 1.0d0
+      Y_soa(ind_2,2) = 1.0d0
+
+!~~~~~~~~~~~ Time LOOP ~~~~~~~~~~~~~
+
+      CALL InitSaveData()
+
+      T = TSTART
+
+        CALL GetMass( C, DVAL )
+        WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,      &
+                    (TRIM(SPC_NAMES(MONITOR(i))),          &
+                      C(MONITOR(i))/CFACTOR, i=1,NMONITOR),&
+                    (TRIM(SMASS(i)),DVAL(i)/CFACTOR, i=1,NMASS)
+
+        CALL SaveData()
+
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+
+        CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, T, TEND, &
+                            ATOL, RTOL)
+
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,        &
+                    (TRIM(SPC_NAMES(MONITOR(i))),          &
+                      C(MONITOR(i))/CFACTOR, i=1,NMONITOR),&
+                    (TRIM(SMASS(i)),DVAL(i)/CFACTOR, i=1,NMASS)
+
+      CALL SaveData()
+
+!~~~~~~~~~~~ END Time LOOP ~~~~~~~~~~~~~
+
+      WRITE(6,*) '**************************************************'
+      WRITE(6,*) ' Results were written in the files'
+      WRITE(6,*) ' KPP_ROOT_[TLM|ADJ|SOA].m'
+      WRITE(6,*) '**************************************************'
+      
+      PRINT 995,TRIM(SPC_NAMES(ind_1)),       &
+            TRIM(SPC_NAMES(ind_1)),           &
+            Y_tlm(ind_1,1), Y_adj(ind_1)
+      PRINT 995,TRIM(SPC_NAMES(ind_1)),       &
+            TRIM(SPC_NAMES(ind_2)),           &
+            Y_tlm(ind_1,2), Y_adj(ind_2)
+
+      DO j=1,NSOA
+         PRINT 997, j,(TRIM(SPC_NAMES(i)),Y_soa(i,j),i=1,NVAR)
+      END DO
+      
+      OPEN(53,FILE='KPP_ROOT_TLM.m')
+      DO j=1, NSOA
+         WRITE(53,993) (Y_tlm(i,j),i=1,NVAR)
+      END DO
+      CLOSE(53)
+      
+      OPEN(54,FILE='KPP_ROOT_ADJ.m')
+      WRITE(54,993) (Y_adj(i),i=1,NVAR)
+      CLOSE(54)
+      
+      OPEN(55,FILE='KPP_ROOT_SOA.m')
+      DO j=1, NSOA
+         WRITE(55,993) (Y_soa(i,j),i=1,NVAR)
+      END DO
+      CLOSE(55)
+      
+ 991  FORMAT(F6.1,'%. T=',E10.3,3X,20(A,'=',E10.4,';',1X))
+ 993  FORMAT(1000(E24.16,2X))
+ 995  FORMAT('d[',A,'](tf)/d[',A,'](t0). TLM=',E14.7,'  ADJ=',E14.7)
+ 997  FORMAT('2nd ADJ (',I3,'): ',200(A,'=',E10.3,'; '))
+
+      CALL CloseSaveData()
+
+END PROGRAM KPP_ROOT_SOA_Driver
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_soa_check.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_soa_check.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_soa_check.f90	(revision 3477)
@@ -0,0 +1,231 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Driver to test the Second Order Adjoint (SOA) model
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PROGRAM KPP_ROOT_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC), DV(NVAR)
+      KPP_REAL :: ADJ1(NVAR), ADJ2(NVAR)
+      KPP_REAL :: FinalRef(NVAR), FinalRef_tlm(NVAR)
+      KPP_REAL :: FinalPert(NVAR), FinalPert_tlm(NVAR)
+      KPP_REAL :: Hs(NVAR,NVAR), AdjTlm(NVAR,NVAR), SOA(NVAR)
+      INTEGER :: i, j, ind_1 = 1, ind_2 = 2, ind_COST
+      LOGICAL :: LHessian, LAdjTlm
+ 
+!~~~>  Number of second order adjoints
+!      i.e., number of vectors U_i s.t. Sigma_i = Hess*U_i
+!      1 <= i <= NSOA
+
+      INTEGER, PARAMETER :: NSOA = 1
+
+      KPP_REAL :: Y_tlm(NVAR,NSOA)
+      KPP_REAL :: Y_adj(NVAR,1)
+      KPP_REAL :: Y_soa(NVAR,NSOA)
+  
+      STEPMIN = 0.0d0
+      STEPMAX = 0.0d0
+
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+     
+     
+!~~~>  The cost function is 0.5*VAR(ind_COST, tF)**2
+      ind_COST = ind_O3
+     
+     
+!~~~>  Compute the full Hessian NVARxNVAR (or not)
+      LHessian = .TRUE.
+     
+     
+!~~~>  Compute the full Adjoint*Tlm NVARxNVAR (or not)
+      LAdjTlm = .TRUE.
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~
+      PRINT*,'FIRST RUN, Reference'
+      CALL Initialize()
+      DV = 0.0d0
+      DV(ind_NO2) =  0.02*VAR(ind_NO2)
+      DV(ind_NO)  =  0.04*VAR(ind_NO)
+!      DV(ind_PAN) = -0.2*VAR(ind_PAN)
+!      DV(ind_O3)  =  0.1*VAR(ind_O3)
+!      DO i=1,NVAR
+!        DV(i) = rand()*VAR(i)
+!      END DO	
+      Y_tlm(1:NVAR,1) = DV
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1:NSOA) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      FinalRef     = VAR
+      FinalRef_tlm(1:NVAR) = Y_tlm(1:NVAR,1)
+!~~~~~~~~~~~~~~~~~~~~~~~~   
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~
+      PRINT*,'FIRST RUN, Perturbed'
+      CALL Initialize()
+      VAR = VAR + DV
+      Y_tlm(1:NVAR,1) = DV
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_soa(1:NVAR,1:NSOA) = 0.0d0
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      FinalPert     = VAR
+      FinalPert_tlm(1:NVAR) = Y_tlm(1:NVAR,1)
+!~~~~~~~~~~~~~~~~~~~~~~~~
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~
+      PRINT*,'PERTURBED RUN'
+      CALL Initialize()
+      VAR = VAR + DV
+      Y_tlm(1:NVAR,1) = DV
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_adj(ind_COST,1) = FinalPert(ind_COST)
+      Y_soa(1:NVAR,1) = 0.0d0
+      Y_soa(ind_COST,1) = FinalPert_tlm(ind_COST)
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      F2 = VAR(ind_COST)**2/2
+      ADJ2 = Y_adj(:,1)
+      PRINT*,'PERTURBED FUN = ',F2
+!~~~~~~~~~~~~~~~~~~~~~~~~      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~
+      PRINT*,'REFERENCE RUN'
+      CALL Initialize()
+      Y_tlm(1:NVAR,1) = DV
+      Y_adj(1:NVAR,1) = 0.0d0
+      Y_adj(ind_COST,1) = FinalRef(ind_COST)
+      Y_soa(1:NVAR,1) = 0.0d0
+      Y_soa(ind_COST,1) = FinalRef_tlm(ind_COST)
+      CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+      F1 = VAR(ind_COST)**2/2
+      ADJ1 = Y_adj(:,1)
+      SOA  = Y_soa(:,1)
+      PRINT*,'REFERENCE FUN = ',F1
+!~~~~~~~~~~~~~~~~~~~~~~~~   
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (LHessian) THEN
+      DO i = 1,NVAR
+        PRINT*,'.... FULL HESSIAN column ',i,' of ',NVAR
+        CALL Initialize()
+        Y_tlm(1:NVAR,1) = 0.0d0
+        Y_tlm(i,1)      = 1.0d0
+        Y_adj(1:NVAR,1) = 0.0d0
+        Y_adj(ind_COST,1) = FinalRef(ind_COST)
+        Y_soa(1:NVAR,1) = 0.0d0
+        Y_soa(ind_COST,1) = FinalRef_tlm(ind_COST)
+        CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+        CALL Initialize()
+        Y_soa(1:NVAR,1) = 0.0d0
+        Y_soa(ind_COST,1) = Y_tlm(ind_COST,1)
+        Y_tlm(1:NVAR,1) = 0.0d0
+        Y_tlm(i,1)      = 1.0d0
+        Y_adj(1:NVAR,1) = 0.0d0
+        Y_adj(ind_COST,1) = FinalRef(ind_COST)
+        CALL INTEGRATE_soa(Nsoa, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+	Hs(1:NVAR,i) = Y_soa(1:NVAR,1)
+      END DO
+      ! Write Hessian in file
+      OPEN(150,FILE='KPP_ROOT_Hess.m')
+      DO i=1,NVAR
+        WRITE(150,224) (Hs(i,j),j=1,NVAR)
+      END DO  
+      CLOSE(150)      
+      END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (LAdjTlm) THEN
+      DO i = 1,NVAR
+        PRINT*,'.... FULL ADJ*TLM column ',i,' of ',NVAR
+        CALL Initialize()
+        Y_tlm(1:NVAR,1) = 0.0d0
+        Y_tlm(i,1)      = 1.0d0
+        Y_adj(1:NVAR,1) = 0.0d0
+        Y_adj(ind_COST,1) = FinalRef(ind_COST)
+        Y_soa(1:NVAR,1) = 0.0d0
+        Y_soa(ind_COST,1) = FinalRef_tlm(ind_COST)
+        CALL INTEGRATE_SOA( NSOA, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+        CALL Initialize()
+        Y_adj(1:NVAR,1) = Y_tlm(1:NVAR)
+        Y_soa(1:NVAR,1) = 0.0d0
+        Y_tlm(1:NVAR,1) = 0.0d0
+        CALL INTEGRATE_soa(Nsoa, VAR, Y_tlm, Y_adj, Y_soa, TSTART, TEND, &
+                            ATOL, RTOL)
+	AdjTlm(1:NVAR,i) = Y_adj(1:NVAR,1)
+      END DO
+      ! Write Hessian in file
+      OPEN(150,FILE='KPP_ROOT_AdjTlm.m')
+      DO i=1,NVAR
+        WRITE(150,224) (AdjTlm(i,j),j=1,NVAR)
+      END DO  
+      CLOSE(150)      
+      END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~
+
+      WRITE(6,*) 'FD versus SOA:'      
+      DO i=1,NVAR
+        WRITE(6,222) ADJ2(i)-ADJ1(i), SOA(i),           &
+	  ABS(ADJ2(i)-ADJ1(i)-SOA(i))/                  &
+          MAX(ABS(ADJ2(i)-ADJ1(i)),ABS(SOA(i)),1.d-16), &
+	  TRIM(SPC_NAMES(i))
+      END DO  
+222   FORMAT('FD=',E12.5,'   soa=',E12.5,'  Diff=',E12.5,'  (',A,')')      
+
+      WRITE(6,FMT="(A14,1X,E14.7)") 'F2-F1 = ',F2-F1
+      WRITE(6,FMT="(A14,1X,E14.7)") 'First = ',DOT_PRODUCT(ADJ1,DV)      
+      WRITE(6,FMT="(A14,1X,E14.7)") 'F2-F1-First = ',F2-F1-DOT_PRODUCT(ADJ1,DV)      
+      WRITE(6,FMT="(A14,1X,E14.7)") 'Second = ',DOT_PRODUCT(SOA,DV)/2      
+
+      IF (LHessian) THEN
+      WRITE(6,*) 'The Hessian:'      
+      DO i=1,NVAR
+        WRITE(6,223) (Hs(i,j),j=1,NVAR)
+      END DO  
+223   FORMAT(100(E12.5,1X))
+      END IF
+
+
+      OPEN(150,FILE='KPP_ROOT_Cost.m')
+      WRITE(150,FMT="(A14,1X,E14.7)") 'F2-F1 = ',F2-F1
+      WRITE(150,FMT="(A14,1X,E14.7)") 'First = ',DOT_PRODUCT(ADJ1,DV)      
+      WRITE(150,FMT="(A14,1X,E14.7)") 'F2-F1-First = ',F2-F1-DOT_PRODUCT(ADJ1,DV)      
+      WRITE(150,FMT="(A14,1X,E14.7)") 'Second = ',DOT_PRODUCT(SOA,DV)/2      
+      CLOSE(150)      
+
+      OPEN(150,FILE='KPP_ROOT_FD.m')
+      DO i=1,NVAR
+        WRITE(150,224) ADJ2(i)-ADJ1(i), SOA(i),        &
+	  ABS(ADJ2(i)-ADJ1(i)-SOA(i))/                 &
+          MAX(ABS(ADJ2(i)-ADJ1(i)),ABS(SOA(i)),1.d-16)
+      END DO  
+      CLOSE(150)      
+
+      OPEN(150,FILE='KPP_ROOT_Sol.m')
+      DO i=1,NVAR
+        WRITE(150,224) FinalRef(i)
+      END DO  
+      CLOSE(150)      
+
+      OPEN(150,FILE='KPP_ROOT_Adj.m')
+      DO i=1,NVAR
+        WRITE(150,224) ADJ1(i)
+      END DO  
+      CLOSE(150)      
+
+224   FORMAT(10000(E24.14,1X))      
+
+
+END PROGRAM KPP_ROOT_Driver
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_stochastic.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_stochastic.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_stochastic.c	(revision 3477)
@@ -0,0 +1,64 @@
+int InitSaveData();
+int SaveData();
+int CloseSaveData();
+int GenerateMatlab( char * prefix );
+void GetMass( double CL[], double Mass[] );
+void INTEGRATE( double TIN, double TOUT );
+void Gillespie(int Nssa, double Volume, double* T, int NmlcV[], int NmlcF[]);
+void Update_RCONST();
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+int main()
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+/*~~~> Output results file */
+  FILE* fpDat;
+/*~~~> No of molecules */
+  int NmlcV[NVAR], NmlcF[NFIX];
+/*~~~> No of reaction events per output step */
+  int Nevents;
+/*~~~> Local variables */
+  int i;
+  double T;
+
+  Initialize();  
+      
+  fpDat = fopen("KPP_ROOT_stochastic.dat", "w");
+
+  /* Translate initial values from conc. to molecules */
+  /* Volume = 100.0; */
+  Nevents = 20;
+  for( i = 0; i < NVAR; i++ ) 
+    NmlcV[i] = (int)(Volume*VAR[i]);
+  for( i = 0; i < NFIX; i++ ) 
+    NmlcF[i] = (int)(Volume*FIX[i]);
+  
+/*~~~> Begin Time Loop ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+  T = TSTART;
+  while (T <= TEND) {
+    printf("\n%6.1f%% %10.4f   ", (T-TSTART)/(TEND-TSTART)*100, T );
+    for( i = 0; i < NVAR; i++ ) 
+      printf( "%s=%d  ", SPC_NAMES[i], NmlcV[i] );
+
+    fprintf(fpDat,"\n%g ", T );
+    for( i = 0; i < NVAR; i++ ) 
+        fprintf(fpDat,"%d  ", NmlcV[i]);
+   
+    Gillespie( Nevents, Volume, &T , NmlcV, NmlcF );
+    
+  }  /* while (T <= TEND) */  
+/*~~~> End Time Loop ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  fprintf(fpDat,"\n%g ", T );
+  for( i = 0; i < NVAR; i++ ) 
+      fprintf(fpDat,"%d  ", NmlcV[i]);
+  fprintf(fpDat,"\n");
+  fclose(fpDat);
+  
+  printf("\n");
+
+  return 0;
+
+}
+/*~~~> End of MAIN function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_stochastic.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_stochastic.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_stochastic.f90	(revision 3477)
@@ -0,0 +1,63 @@
+PROGRAM KPP_ROOT_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+  IMPLICIT NONE
+      
+!~~~> No. of Stochastic events per simulation snaphot      
+      INTEGER :: Nevents
+!~~~> No. of Stochastic tau-steps simulation snaphot      
+      INTEGER :: Nsteps
+!~~~> No. of Molecules      
+      INTEGER :: NmlcV(NVAR), NmlcF(NFIX)
+!~~~> Random numbers     
+      REAL :: r1, r2
+!~~~> Local variables     
+      INTEGER :: i
+      KPP_REAL :: T, Tau, SCT(NREACT)
+
+!~~~~> Initialize and prescribe volume and no. of events
+      CALL Initialize()
+      Volume  = 1000.0d0
+      Nevents = 5000
+      Nsteps = 10
+      Tau = (TEND-TSTART)/100.0
+!~~~~~~~~~~~~~~~~     
+      
+!~~~> Translate initial values from conc. to NmlcVules
+      NmlcV(1:NVAR) = INT(Volume*VAR(1:NVAR))
+      NmlcF(1:NFIX) = INT(Volume*FIX(1:NFIX))
+!~~~> Compute the stochastic reaction rates 
+      CALL Update_RCONST()
+      CALL StochasticRates( RCONST, Volume, SCT )   
+
+!~~~> Save initial data
+      OPEN(10, file='KPP_ROOT_stochastic.dat')
+      WRITE(10,992) T, (NmlcV(i),i=1,NVAR)
+            
+!~~~> TIME loop starts
+      T = TSTART
+kron: DO WHILE (T < TEND)
+
+        WRITE(6,991) T,(SPC_NAMES(i),NmlcV(i), i=1,NVAR)
+
+!~~~> Choose here one of the following time-stepping routines
+        CALL Gillespie(Nevents, T, SCT, NmlcV, NmlcF)
+!        CALL TauLeap(Nsteps, Tau, T, SCT, NmlcV, NmlcF)
+        
+        WRITE(10,992) T, (NmlcV(i),i=1,NVAR)
+        
+      END DO kron
+!~~~> TIME loop ends
+
+      WRITE(6,991) T,(SPC_NAMES(i), NmlcV(i), i=1,NVAR)
+
+      CLOSE(10)
+      
+991   FORMAT('T=',F12.3,20(A,'=',I5,'; '))
+992   FORMAT(E24.14,200(1X,I12))
+
+
+END PROGRAM KPP_ROOT_Driver
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/general_tlm.f90	(revision 3477)
@@ -0,0 +1,132 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Driver for the tangent linear model (TLM)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+PROGRAM KPP_ROOT_TLM_Driver
+
+  USE KPP_ROOT_Model
+  USE KPP_ROOT_Initialize, ONLY: Initialize
+
+      KPP_REAL :: T, DVAL(NSPEC)
+      INTEGER :: i, j, ind_1 = 1, ind_2 = 2
+      ! INTEGER :: ind_1 = ind_NO2, ind_2 = ind_O3
+
+!~~~>  NTLM = Number of sensitivity coefficients to compute
+!      Note: this value is set for sensitivities w.r.t. all initial values
+!            the setting may have to be changed for other applications
+      INTEGER, PARAMETER :: NTLM = NVAR
+      KPP_REAL, DIMENSION(NVAR,NTLM) ::  Y_tlm, ATOL_tlm, RTOL_tlm
+
+  
+!~~~>  Control (in) and status (out) vectors for the integrator
+      INTEGER,  DIMENSION(20) :: ICNTRL, ISTATUS
+      KPP_REAL, DIMENSION(20) :: RCNTRL, RSTATUS
+
+      STEPMIN = 0.0d0
+      STEPMAX = 0.0d0
+
+!~~~> Tolerances for calculating concentrations       
+      DO i=1,NVAR
+        RTOL(i) = 1.0d-4
+        ATOL(i) = 1.0d-3
+      END DO
+      
+!~~~> Tolerances for calculating sensitivities 
+!     are used for controlling sensitivity truncation error
+!     and for solving the linear sensitivity equations by iterations  
+!     Note: Sensitivities typically span many orders of magnitude
+!           and a careful tuning of ATOL_tlm may be necessary     
+      DO j=1,NTLM
+        DO i=1,NVAR
+          RTOL_tlm(i,j) = 1.0d-4
+          ATOL_tlm(i,j) = 1.0d-3
+        END DO
+      END DO
+     
+      CALL Initialize()
+!~~~> Note: the initial values below are for sensitivities 
+!           w.r.t. initial values;
+!           they may have to be changed for other applications
+      Y_tlm(1:NVAR,1:NTLM) = 0.0d0
+      DO j=1,NTLM
+        Y_tlm(j,j) = 1.0d0
+      END DO
+
+!~~~> Default control options
+      ICNTRL(1:20) = 0
+      RCNTRL(1:20) = 0.0d0       
+
+!~~~> Begin time loop
+
+      CALL InitSaveData()
+
+      T = TSTART
+      
+kron: DO WHILE (T < TEND)
+       
+        TIME = T
+        CALL GetMass( C, DVAL )
+        WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,      &
+                    (TRIM(SPC_NAMES(MONITOR(i))),          &
+                      C(MONITOR(i))/CFACTOR, i=1,NMONITOR),&
+                    (TRIM(SMASS(i)),DVAL(i)/CFACTOR, i=1,NMASS)
+
+        CALL SaveData()
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+
+        CALL INTEGRATE_TLM( NTLM, VAR, Y_tlm, T, T+DT,     &
+                            ATOL_tlm, RTOL_tlm,            &
+                            ICNTRL, RCNTRL, ISTATUS, RSTATUS )
+
+        T = T+DT
+
+      END DO kron
+
+      CALL GetMass( C, DVAL )
+      WRITE(6,991) (T-TSTART)/(TEND-TSTART)*100, T,        &
+                  (TRIM(SPC_NAMES(MONITOR(i))),            &
+                    C(MONITOR(i))/CFACTOR, i=1,NMONITOR),  &
+                  (TRIM(SMASS(i)),DVAL(i)/CFACTOR, i=1,NMASS)
+
+      CALL SaveData()
+
+!~~~> End time loop ~~~~~~~~~~
+
+      OPEN(20, FILE='KPP_ROOT_TLM_results.m')
+      WRITE(6,*) '**************************************************'
+      WRITE(6,*) ' Concentrations and Sensitivities at final time '
+      WRITE(6,*) ' were written in the file KPP_ROOT_TLM_results.m'
+      WRITE(6,*) '**************************************************'
+      DO j=1,NTLM
+        WRITE(20,993) ( Y_tlm(i,j), i=1,NVAR )          
+      END DO
+
+      CALL CloseSaveData()
+
+      WRITE(6,995) TRIM(SPC_NAMES(ind_1)),TRIM(SPC_NAMES(ind_1)), &
+                   Y_tlm(ind_1,1)
+      WRITE(6,995) TRIM(SPC_NAMES(ind_2)),TRIM(SPC_NAMES(ind_2)), &
+                   Y_tlm(ind_2,2)
+      WRITE(6,995) TRIM(SPC_NAMES(ind_1)),TRIM(SPC_NAMES(ind_2)), &
+                   Y_tlm(ind_2,1)
+      WRITE(6,995) TRIM(SPC_NAMES(ind_2)),TRIM(SPC_NAMES(ind_1)), &
+                   Y_tlm(ind_1,2)
+                  
+                 
+ 991  FORMAT(F6.1,'%. T=',E10.3,3X,20(A,'=',E10.4,';',1X))
+ 993  FORMAT(1000(E24.16,2X))
+ 995  FORMAT('TLM: d[',A,'](tf)/d[',A,'](t0)=',E14.7)
+ 
+ 
+      !~~~> The entire matrix of sensitivities
+      WRITE(6,996) ( 'd ',TRIM(SPC_NAMES(i)), i=1,NVAR ) 
+      DO j=1,NTLM
+        WRITE(6,997) TRIM(SPC_NAMES(j)),( Y_tlm(i,j), i=1,NVAR )          
+      END DO
+ 996  FORMAT(12X,100('  ',A2,A6,4X))
+ 997  FORMAT('d/d',A6,' = ',100(E12.5,2X))
+ 
+
+END PROGRAM KPP_ROOT_TLM_Driver
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/main.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/main.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/main.c	(revision 3477)
@@ -0,0 +1,52 @@
+void INTEGRATE( double TIN, double TOUT );
+
+void main()
+{
+KPP_REAL rtols;
+KPP_REAL Tstart, Tend, DT;
+FILE * fp;
+int i;
+ 
+/* ---- TIME VARIABLES ------------------ */
+
+  rtols = 1e-3;
+  for( i = 0; i < NVAR; i++ ) {
+    RTOL[i] = rtols;
+    ATOL[i] = 1E-18;
+  }
+     
+  Initialize();
+      
+  fp = fopen("Extrapd.m", "w");
+  fprintf( fp, "ed=[\n");
+       
+  Tstart = 3600*12;
+  Tend = Tstart + 3600*24*5;
+  STEPMIN = 0.001;
+  STEPMAX = 900;
+  DT = 3600.;
+  TEMP = 236.21;
+      
+/* -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP --- */
+/* ********** TIME LOOP **************************** */
+
+  TIME = Tstart;
+  while (TIME <= Tend) {
+
+    printf("\nMonitor: ");
+    for( i = 0; i < NMONITOR; i++ ) 
+      printf( "%12.8g  ", C[ MONITOR[i] ]/CFACTOR );
+
+    fprintf( fp, "\n%6.1f ", (TIME-Tstart)/3600.0 );
+    for( i = 0; i < NLOOKAT; i++ ) 
+      fprintf( fp, "%24.16e ", C[ LOOKAT[i] ]/CFACTOR );
+
+    INTEGRATE( DT );
+  }
+
+/* *********** END TIME LOOP *********************** */
+
+  fprintf(fp, "\n];");
+  fclose( fp );
+  printf("\n");
+}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/main.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/main.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/drv/main.f	(revision 3477)
@@ -0,0 +1,53 @@
+      PROGRAM driver
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+      INTEGER i
+  
+C ---- TIME VARIABLES ------------------      
+
+      RTOLS = 1e-3
+      do i=1,NVAR
+        RTOL(i) = RTOLS
+        ATOL(i) = 1E-18
+      end do
+     
+      CALL Initialize()
+      
+      open(10, file='Extrapd.m')
+      write(10,*) 'ed=['
+       
+      TSTART = 3600*12
+      TEND = TSTART + 3600*24*5
+      STEPMIN = 0.01
+      STEPMAX = 900
+      DT = 3600.
+      TEMP = 236.21
+      
+C -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP ---
+C ********** TIME LOOP *************************
+      TIME = TSTART
+      do while (TIME .le. TEND)
+
+        write(6,991) (C(MONITOR(i))/CFACTOR, i=1,NMONITOR)
+
+        write(10,992) (TIME-TSTART)/3600.D0, 
+     *                (C(LOOKAT(i))/CFACTOR, i=1,NLOOKAT)
+
+        call Update_SUN() 
+        call Update_RCONST()
+
+        call INTEGRATE( TIME, TIME+DT )
+
+      end do
+C *********** END TIME LOOP ********
+
+      write(10,*) '];'
+      close(10)
+      STOP
+
+991   FORMAT('Monitor:',10(1X,E12.6))
+992   FORMAT(F6.1,100(1X,D24.16))
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm.kpp	(revision 3477)
@@ -0,0 +1,22511 @@
+{********************************************************************* ;
+* A citation to the MCM website and the relevant mechanism          * ;
+* construction protocols should be given in any publication using   * ;
+* information obtained from this source, using the following or     * ;
+* comparable wording:                                               * ;
+* The chemical mechanistic information was taken from the Master    * ;
+* Chemical Mechanism, MCM v3.2 (ref), via website:                  * ;
+* http://mcm.leeds.ac.uk/MCM.                                       * ;
+* The reference should be: (Jenkin et al., Atmos. Environ., 31, 81, * ;
+* 1997; Saunders et al., Atmos. Chem. Phys., 3, 161, 2003), for     * ;
+* non aromatic schemes; and (Jenkin et al., Atmos. Chem. Phys., 3,  * ;
+* 181, 2003; Bloss et al., Atmos. Chem. Phys., 5, 641, 2005), for   * ;
+* aromatic schemes.                  * ;
+********************************************************************* ;}
+#INLINE F90_GLOBAL 
+ REAL(dp)::M, N2, O2, RO2, H2O 
+ #ENDINLINE {above lines go into MODULE KPP_ROOT_Global}
+#INCLUDE atoms 
+#DEFVAR
+C918NO3 = IGNORE ;
+C134CO = IGNORE ;
+NBUTACET = IGNORE ;
+C124O2 = IGNORE ;
+PROL1MPAN = IGNORE ;
+BCCOOH = IGNORE ;
+IPRHOCO2H = IGNORE ;
+TM124NO2O = IGNORE ;
+C3EODBCO2H = IGNORE ;
+DMEBPOXMUC = IGNORE ;
+DNMXYOLOOH = IGNORE ;
+C4ME2OHNO3 = IGNORE ;
+C920CO3 = IGNORE ;
+MIPKAO = IGNORE ;
+BUT2OLAO = IGNORE ;
+C623O = IGNORE ;
+M3BU2OLOOH = IGNORE ;
+METLBIPRO2 = IGNORE ;
+PXYCATECH = IGNORE ;
+M3HEXBNO3 = IGNORE ;
+C124OH = IGNORE ;
+PRCOOMCHO = IGNORE ;
+PTLQONE = IGNORE ;
+TM123MUCO = IGNORE ;
+C137CO = IGNORE ;
+NO2 = IGNORE ;
+NO3 = IGNORE ;
+MBOAOOH = IGNORE ;
+C4M2NO33O = IGNORE ;
+EPXDLCO2H = IGNORE ;
+BOXCOCOMO = IGNORE ;
+ME3BU2OLO = IGNORE ;
+CLOHCO3H = IGNORE ;
+BOXCOCOME = IGNORE ;
+MALDIAL = IGNORE ;
+C6PAN21 = IGNORE ;
+DEMPHOLOOH = IGNORE ;
+C6PAN23 = IGNORE ;
+C6PAN22 = IGNORE ;
+HO13C5O2 = IGNORE ;
+EBZMUCOOH = IGNORE ;
+NMETOL1O2 = IGNORE ;
+DMKOHOOH = IGNORE ;
+C9M2CO6O2 = IGNORE ;
+IPBZBPR2OH = IGNORE ;
+MPRK = IGNORE ;
+NOA = IGNORE ;
+BIACETOOH = IGNORE ;
+HEPTOH = IGNORE ;
+C6CO4MEDB = IGNORE ;
+ACBUONEAO = IGNORE ;
+PEBQONE = IGNORE ;
+C42OH = IGNORE ;
+O1D = IGNORE ;
+C63NO3 = IGNORE ;
+TBOCOCH2O = IGNORE ;
+NPETOLO2 = IGNORE ;
+NPTLQO = IGNORE ;
+C514OH = IGNORE ;
+C620O2 = IGNORE ;
+ACETC2CO2H = IGNORE ;
+C917NO3 = IGNORE ;
+METHACETO2 = IGNORE ;
+C44O = IGNORE ;
+C620OH = IGNORE ;
+C711O2 = IGNORE ;
+CNO3OCL = IGNORE ;
+NEBNZOLOOH = IGNORE ;
+C514O2 = IGNORE ;
+NPETOLOH = IGNORE ;
+C731OOH = IGNORE ;
+IC3H7O = IGNORE ;
+HO2C54O = IGNORE ;
+C42O2 = IGNORE ;
+NC524OOH = IGNORE ;
+C51NO324CO = IGNORE ;
+C62NO335CO = IGNORE ;
+C1011O = IGNORE ;
+C925OOH = IGNORE ;
+H14CO23C4 = IGNORE ;
+C624CO = IGNORE ;
+T124CAT1O2 = IGNORE ;
+CO24M3C5 = IGNORE ;
+H3C2C4CO2H = IGNORE ;
+CO2C4CHO = IGNORE ;
+MIBKBOOH = IGNORE ;
+NPETLQO2 = IGNORE ;
+C6H5OOH = IGNORE ;
+C3MDIALO = IGNORE ;
+HEPTO2 = IGNORE ;
+PXYMUCNO3 = IGNORE ;
+H13C43CO3 = IGNORE ;
+CHOC4PAN = IGNORE ;
+C624NO3 = IGNORE ;
+CO25C74OOH = IGNORE ;
+C514O = IGNORE ;
+C1010OOH = IGNORE ;
+DIIPRETOH = IGNORE ;
+ME2BUOLO = IGNORE ;
+C4MCODBCO2 = IGNORE ;
+C4MCODBCO3 = IGNORE ;
+C46PAN = IGNORE ;
+TMB2FUOOH = IGNORE ;
+MIBKHO4O = IGNORE ;
+CL2OHCH2O = IGNORE ;
+H3C25CCO3H = IGNORE ;
+ETBEAOH = IGNORE ;
+C126NO3 = IGNORE ;
+ETBEAO2 = IGNORE ;
+HM22C4O = IGNORE ;
+C823OOH = IGNORE ;
+C616O2 = IGNORE ;
+C88OOH = IGNORE ;
+C1013CO2H = IGNORE ;
+DIIPRETO2 = IGNORE ;
+M2BKAOOH = IGNORE ;
+MMALANHY = IGNORE ;
+C312COCO3H = IGNORE ;
+MEK2OO = IGNORE ;
+C7EDCOOH = IGNORE ;
+NMXYQO2 = IGNORE ;
+PXYL1O2 = IGNORE ;
+C827OOH = IGNORE ;
+NDNPBZLOOH = IGNORE ;
+CO23C5 = IGNORE ;
+CO23C6 = IGNORE ;
+TOL1O = IGNORE ;
+CH3SOO2 = IGNORE ;
+IPROPOLPER = IGNORE ;
+NDNPETLOOH = IGNORE ;
+C61O = IGNORE ;
+C3NO3COOOH = IGNORE ;
+C1312O = IGNORE ;
+PROL1MCO3 = IGNORE ;
+CH3CHOHCHO = IGNORE ;
+C78O = IGNORE ;
+MNO3COC4O = IGNORE ;
+ISOPDO2 = IGNORE ;
+MACRNB = IGNORE ;
+COHM2CO3H = IGNORE ;
+TL4OHNO2O2 = IGNORE ;
+PHIC3O = IGNORE ;
+OTNCATECO = IGNORE ;
+OTNCATECH = IGNORE ;
+DM124O = IGNORE ;
+PTCATEC1O = IGNORE ;
+DMMBO2 = IGNORE ;
+MTBKNO3 = IGNORE ;
+NISOPNO3 = IGNORE ;
+HNC524CO = IGNORE ;
+C720O = IGNORE ;
+C139NO3 = IGNORE ;
+H3M3C5CHO = IGNORE ;
+C5ONO34OOH = IGNORE ;
+IPECO = IGNORE ;
+IPROACET = IGNORE ;
+HODMSO2 = IGNORE ;
+NMXYOL1O2 = IGNORE ;
+METLOBPROH = IGNORE ;
+DMMBOH = IGNORE ;
+NPHENOOH = IGNORE ;
+SBUACONEO = IGNORE ;
+HO1C3O2 = IGNORE ;
+C57NO3 = IGNORE ;
+C1313NO3 = IGNORE ;
+HEXBOH = IGNORE ;
+M3HEXAO2 = IGNORE ;
+ETOHOCHO = IGNORE ;
+C51CO2H = IGNORE ;
+C117NO3 = IGNORE ;
+C112O = IGNORE ;
+BCALBCO = IGNORE ;
+IPBZMUCOH = IGNORE ;
+C9M2CO6OH = IGNORE ;
+H3M3C5NO3 = IGNORE ;
+C152OOH = IGNORE ;
+CO235C6CHO = IGNORE ;
+NPHENO = IGNORE ;
+C3PAN2 = IGNORE ;
+C3PAN1 = IGNORE ;
+IPBZMUCO2 = IGNORE ;
+NBUTOLBO = IGNORE ;
+HO13C3CO3H = IGNORE ;
+PE1ENEBO2 = IGNORE ;
+C82OOH = IGNORE ;
+HEXBO2 = IGNORE ;
+M3HEXAOH = IGNORE ;
+C716OOH = IGNORE ;
+HMVKBO = IGNORE ;
+C83COOHOOH = IGNORE ;
+CH3NO3 = IGNORE ;
+EPXMC4DIAL = IGNORE ;
+MTBEBOH = IGNORE ;
+HMVKANO3 = IGNORE ;
+CO2OH3MPAN = IGNORE ;
+NC4IPDCO2 = IGNORE ;
+HOACETETO2 = IGNORE ;
+C151OH = IGNORE ;
+C151O2 = IGNORE ;
+ISOPCO2 = IGNORE ;
+NC4OHCO3 = IGNORE ;
+C629OOH = IGNORE ;
+BPINBO2 = IGNORE ;
+MIBKCOOHO2 = IGNORE ;
+H2M2C4CO2H = IGNORE ;
+C134O = IGNORE ;
+C817CO3 = IGNORE ;
+MTBEBO2 = IGNORE ;
+C917O = IGNORE ;
+ACPRONEOH = IGNORE ;
+DMC = IGNORE ;
+C920CO3H = IGNORE ;
+LIMCOH = IGNORE ;
+IPRBQONE = IGNORE ;
+MO2EOLB2OH = IGNORE ;
+C7M3CO = IGNORE ;
+DMM = IGNORE ;
+DMS = IGNORE ;
+C6PAN20 = IGNORE ;
+C71O2 = IGNORE ;
+PXYFUOOH = IGNORE ;
+C735OOA = IGNORE ;
+MO2EOLBO = IGNORE ;
+C735OOH = IGNORE ;
+ACPRONEO2 = IGNORE ;
+CATEC1O = IGNORE ;
+LIMCO2 = IGNORE ;
+C8M2CO6OH = IGNORE ;
+TM123BO = IGNORE ;
+PETCATECH = IGNORE ;
+CO25C6CO2H = IGNORE ;
+NDNT124LO = IGNORE ;
+PETLMUCO2H = IGNORE ;
+C88PAN = IGNORE ;
+BIACETO = IGNORE ;
+ACEC2CHO = IGNORE ;
+C822PAN = IGNORE ;
+C89NO3 = IGNORE ;
+C720OH = IGNORE ;
+C121OOH = IGNORE ;
+BCALBOOH = IGNORE ;
+C5MDICARB = IGNORE ;
+C720O2 = IGNORE ;
+MCATECHOL = IGNORE ;
+C1011CO3H = IGNORE ;
+C617PAN = IGNORE ;
+PENT1ENE = IGNORE ;
+LIMALACO = IGNORE ;
+C8M2CO6O2 = IGNORE ;
+MOCOCH2OOH = IGNORE ;
+HO1C5OOH = IGNORE ;
+NC623O = IGNORE ;
+LIMBOOH = IGNORE ;
+CH3SCH2O = IGNORE ;
+CHOC4CO3H = IGNORE ;
+C733OOH = IGNORE ;
+C78O2 = IGNORE ;
+C815CO2OOH = IGNORE ;
+MC3CODBCO3 = IGNORE ;
+MC3CODBCO2 = IGNORE ;
+H2M3C4O = IGNORE ;
+C42O = IGNORE ;
+C918CO3H = IGNORE ;
+DM23BU2ENE = IGNORE ;
+MET1O2 = IGNORE ;
+ETBEANO3 = IGNORE ;
+HO2C6OOH = IGNORE ;
+C78OH = IGNORE ;
+NOPINCO = IGNORE ;
+DNPHEN = IGNORE ;
+TM135BPNO3 = IGNORE ;
+MIBKAOH3CO = IGNORE ;
+MXYBIPERO = IGNORE ;
+HO3C6O = IGNORE ;
+M33C4O2 = IGNORE ;
+MPRBNO3O2 = IGNORE ;
+C84O2 = IGNORE ;
+PECO = IGNORE ;
+DMKOHO = IGNORE ;
+EOX2ETCHO = IGNORE ;
+C617CO2H = IGNORE ;
+CHCL2OOH = IGNORE ;
+NDNCRESO2 = IGNORE ;
+PXYLO = IGNORE ;
+METACETNO3 = IGNORE ;
+PXYMUCO = IGNORE ;
+DNPXYOL = IGNORE ;
+TM124MUO2H = IGNORE ;
+C5OCO3M = IGNORE ;
+PXY1OOH = IGNORE ;
+CH3COCO3H = IGNORE ;
+C9DCCO = IGNORE ;
+C816O = IGNORE ;
+C512O = IGNORE ;
+C522CO3 = IGNORE ;
+MIBKOHAOOH = IGNORE ;
+C510OH = IGNORE ;
+NEOPNO3 = IGNORE ;
+EBFUOOH = IGNORE ;
+C41CO3H = IGNORE ;
+OXYOLO2 = IGNORE ;
+T123NCATO = IGNORE ;
+C1310O = IGNORE ;
+CO1H63O = IGNORE ;
+NCRESO = IGNORE ;
+CHCL3OOH = IGNORE ;
+BUTAL2NO3 = IGNORE ;
+EOX2OLBNO3 = IGNORE ;
+C6H5C2CO3H = IGNORE ;
+HOC2H4CO3H = IGNORE ;
+NC3OOA = IGNORE ;
+BCLKET = IGNORE ;
+C89CO2 = IGNORE ;
+C89CO3 = IGNORE ;
+C1013O2 = IGNORE ;
+C726CO3OH = IGNORE ;
+M33C3CO2H = IGNORE ;
+CCLOHCH2O2 = IGNORE ;
+TMBO2 = IGNORE ;
+DNPHENO = IGNORE ;
+C6DCRBBOOH = IGNORE ;
+M2BUOL2OH = IGNORE ;
+C63O = IGNORE ;
+C1210OOH = IGNORE ;
+NPXYOLO = IGNORE ;
+ACCOMECO3 = IGNORE ;
+C4CO2DCO3H = IGNORE ;
+DIME35EB = IGNORE ;
+MBOOOA = IGNORE ;
+BOX2COMOOH = IGNORE ;
+C919OH = IGNORE ;
+NISOPO = IGNORE ;
+PTNCATECH = IGNORE ;
+PTNCATECO = IGNORE ;
+M2BUOL2O2 = IGNORE ;
+CO3H4CO3 = IGNORE ;
+DMMBNO3 = IGNORE ;
+C84O = IGNORE ;
+MTCATEC1O = IGNORE ;
+C7M2CO5O2 = IGNORE ;
+H3C2C4PAN = IGNORE ;
+C4MALOHOOH = IGNORE ;
+C1211CO3 = IGNORE ;
+C515O2 = IGNORE ;
+MVKOHBOOH = IGNORE ;
+C1213OOH = IGNORE ;
+CO24C6O2 = IGNORE ;
+C9M2CO6OOH = IGNORE ;
+C7CO3OHOOH = IGNORE ;
+C722O = IGNORE ;
+HM33C4O = IGNORE ;
+CH3SOO2NO2 = IGNORE ;
+HEXCNO3 = IGNORE ;
+NBUACETAO2 = IGNORE ;
+CNO3CLOOH = IGNORE ;
+DNCRESO2 = IGNORE ;
+HO2C5O = IGNORE ;
+C5MCO2OHO2 = IGNORE ;
+C4MCODBPAN = IGNORE ;
+NO3CH2PAN = IGNORE ;
+BCBNO3 = IGNORE ;
+C4DBMECO3 = IGNORE ;
+C7M2CO5OH = IGNORE ;
+H3M3C6NO3 = IGNORE ;
+C5DICARBO2 = IGNORE ;
+BOX2PROL = IGNORE ;
+C5COCHOO = IGNORE ;
+C524CO = IGNORE ;
+BRETPAN = IGNORE ;
+C6CODIAL = IGNORE ;
+MXYFUOH = IGNORE ;
+CL2OHPAN = IGNORE ;
+PROPALO2 = IGNORE ;
+HO3C106NO3 = IGNORE ;
+DNIPBNZLO2 = IGNORE ;
+M2C43CO2H = IGNORE ;
+C8BCO = IGNORE ;
+MXYFUO2 = IGNORE ;
+TM123BP2OH = IGNORE ;
+C65NO3CO3H = IGNORE ;
+C89O = IGNORE ;
+HO3C86NO3 = IGNORE ;
+NTMB2FUO = IGNORE ;
+H13M3C5O2 = IGNORE ;
+C915O = IGNORE ;
+C830O2 = IGNORE ;
+INAHPCO3 = IGNORE ;
+IPBZMUCO3H = IGNORE ;
+CO3C75O = IGNORE ;
+C43NO3CO3H = IGNORE ;
+HO2MC5NO3 = IGNORE ;
+DETLMUOOH = IGNORE ;
+C6H5C2OH = IGNORE ;
+C4M2NO32O2 = IGNORE ;
+H13M3C5O = IGNORE ;
+NPEBQOOH = IGNORE ;
+ETBEACHO = IGNORE ;
+H2M4C65O = IGNORE ;
+PETLMUCCO3 = IGNORE ;
+C4MNO32OOH = IGNORE ;
+C5CO234O2 = IGNORE ;
+C830OH = IGNORE ;
+HO3C126NO3 = IGNORE ;
+C624CHO = IGNORE ;
+C136O = IGNORE ;
+M22C3CO3 = IGNORE ;
+PXYLOOH = IGNORE ;
+TM124QOOH = IGNORE ;
+IPNNCATOOH = IGNORE ;
+C5DICARBO = IGNORE ;
+HO2NO2 = IGNORE ;
+C96NO3 = IGNORE ;
+TM123O = IGNORE ;
+TM123B = IGNORE ;
+C1312OOH = IGNORE ;
+PHAN = IGNORE ;
+COO2C4OOH = IGNORE ;
+C916NO3 = IGNORE ;
+EBENZOLOH = IGNORE ;
+EBENZOLO2 = IGNORE ;
+IBUTALCO2 = IGNORE ;
+MC5CO2OHO = IGNORE ;
+C928NO3 = IGNORE ;
+IPBZMUCO = IGNORE ;
+HO3C116OOH = IGNORE ;
+HO5C6OOH = IGNORE ;
+DNEBNZLO2 = IGNORE ;
+C3H7CHO = IGNORE ;
+INANCO3H = IGNORE ;
+CO2HOC61O2 = IGNORE ;
+EBENZOLOOH = IGNORE ;
+NBPINAO2 = IGNORE ;
+C71OOH = IGNORE ;
+M3PECO = IGNORE ;
+INANCOCO3 = IGNORE ;
+C919O2 = IGNORE ;
+NEOP = IGNORE ;
+ME3BUOLNO3 = IGNORE ;
+HM23C4OOH = IGNORE ;
+DNPETOLO2 = IGNORE ;
+NC6PAN1 = IGNORE ;
+INANPAN = IGNORE ;
+C823PAN = IGNORE ;
+C830NO3 = IGNORE ;
+ISOPDNO3 = IGNORE ;
+NMBOAO = IGNORE ;
+MTBEACHOHO = IGNORE ;
+C624PAN = IGNORE ;
+C8CO2DBAL = IGNORE ;
+TLFUOOH = IGNORE ;
+C9DCOOH = IGNORE ;
+INB1NBCO3H = IGNORE ;
+HO3C4O = IGNORE ;
+PET1OHNO2 = IGNORE ;
+IPRBQO2 = IGNORE ;
+MMALNACO3 = IGNORE ;
+MXYBPER2OH = IGNORE ;
+C827CO2H = IGNORE ;
+HC4ACHO = IGNORE ;
+IC4H10 = IGNORE ;
+PE1ENEAO2 = IGNORE ;
+EMPONO2OOH = IGNORE ;
+CO36C8 = IGNORE ;
+A2PANO = IGNORE ;
+TM123BPOOH = IGNORE ;
+TM124OLOOH = IGNORE ;
+H3M3C5OOH = IGNORE ;
+EBZMUCCO2H = IGNORE ;
+NOPINAO = IGNORE ;
+NLIMALO = IGNORE ;
+MXYQOOH = IGNORE ;
+HMVKAO2 = IGNORE ;
+NC4H10 = IGNORE ;
+PEAO = IGNORE ;
+HO36C11 = IGNORE ;
+HO36C10 = IGNORE ;
+C826CO3OH = IGNORE ;
+MALDALCO3H = IGNORE ;
+CO234C6 = IGNORE ;
+C1213OH = IGNORE ;
+OXYQO2 = IGNORE ;
+DNCRESO = IGNORE ;
+NC623OOH = IGNORE ;
+IC7DCPAN = IGNORE ;
+MC6OTKETO2 = IGNORE ;
+C7MJPCO3H = IGNORE ;
+C1213O2 = IGNORE ;
+OXYQOH = IGNORE ;
+C826CO3O2 = IGNORE ;
+C133CO = IGNORE ;
+INB1NBCHO = IGNORE ;
+ACCOCOETO2 = IGNORE ;
+C510O = IGNORE ;
+C3COCPAN = IGNORE ;
+PBFUONE = IGNORE ;
+H134M3C5 = IGNORE ;
+C95O2 = IGNORE ;
+VINCL = IGNORE ;
+ETHFORMNO3 = IGNORE ;
+C623NO3 = IGNORE ;
+LMKOOA = IGNORE ;
+LMKOOB = IGNORE ;
+HEX1ENE = IGNORE ;
+IPRACBOOH = IGNORE ;
+BUTALAOOH = IGNORE ;
+BCLKCO = IGNORE ;
+NOAOOA = IGNORE ;
+H1MC5O = IGNORE ;
+CATECOOA = IGNORE ;
+CHOOMPAN = IGNORE ;
+C7BDCO = IGNORE ;
+C818OOH = IGNORE ;
+HO2M2C4O = IGNORE ;
+PC3ODBCO2H = IGNORE ;
+MBOOO = IGNORE ;
+C6COOHCO3H = IGNORE ;
+C6O132OH = IGNORE ;
+IPROC21NO3 = IGNORE ;
+NPETLQOOH = IGNORE ;
+C57O2 = IGNORE ;
+HOHOC4DIAL = IGNORE ;
+TLEMUCOOH = IGNORE ;
+C4DBMECO3H = IGNORE ;
+H2M2C65OOH = IGNORE ;
+NC61CO3 = IGNORE ;
+DNOXYOLOOH = IGNORE ;
+OCCOHCO = IGNORE ;
+HO2C3CO3H = IGNORE ;
+LMLKBOOH = IGNORE ;
+C57OH = IGNORE ;
+MNNCATECO = IGNORE ;
+DMPHGLYOX = IGNORE ;
+HO3C5NO3 = IGNORE ;
+C6CO243OH = IGNORE ;
+MO2EOLBNO3 = IGNORE ;
+NBCALOH = IGNORE ;
+PXY1O2 = IGNORE ;
+C7DCOH = IGNORE ;
+IPBZBPROOH = IGNORE ;
+C4NO3PAN = IGNORE ;
+C4DBM2CO3H = IGNORE ;
+PNNCATECO2 = IGNORE ;
+IPROPOLPAN = IGNORE ;
+HYETHO2H = IGNORE ;
+C7DCO2 = IGNORE ;
+NAPINBOOH = IGNORE ;
+EOX2EOL = IGNORE ;
+NBCALO2 = IGNORE ;
+A2PANOO = IGNORE ;
+ACCOETOOH = IGNORE ;
+C717OOH = IGNORE ;
+MXYLNO3 = IGNORE ;
+HMACR = IGNORE ;
+HM23C4O2 = IGNORE ;
+C5PAN18 = IGNORE ;
+CHOC3DIOL = IGNORE ;
+DE35TO = IGNORE ;
+MCATECOOA = IGNORE ;
+C826OH = IGNORE ;
+C7DDCOOH = IGNORE ;
+BCLKCCO = IGNORE ;
+CO3C4CO2H = IGNORE ;
+COO2C4CO3H = IGNORE ;
+PEBQCO = IGNORE ;
+NMETLQO = IGNORE ;
+C6H5C2H4O2 = IGNORE ;
+C116O = IGNORE ;
+C6COALCO2H = IGNORE ;
+HM22CO3H = IGNORE ;
+CO3C5CO2H = IGNORE ;
+H2M3C4CO3 = IGNORE ;
+C23O3MCHO = IGNORE ;
+NDNOETLOOH = IGNORE ;
+C616OH = IGNORE ;
+C826O2 = IGNORE ;
+C6H5CH2PAN = IGNORE ;
+DE35TOOH = IGNORE ;
+NBUACBOH = IGNORE ;
+HM23C4OH = IGNORE ;
+OXYMUCOOH = IGNORE ;
+C62NO33CO = IGNORE ;
+LIMBCO = IGNORE ;
+MTBEAALOOH = IGNORE ;
+NC71O2 = IGNORE ;
+EOCOCH2O2 = IGNORE ;
+METLMUCCO3 = IGNORE ;
+C728NO3 = IGNORE ;
+C43OHCOCHO = IGNORE ;
+IPBZMUCCO = IGNORE ;
+C736OOH = IGNORE ;
+C8CO2DCO3H = IGNORE ;
+MCOCOMOXO2 = IGNORE ;
+MEKCOOH = IGNORE ;
+CL12CO3 = IGNORE ;
+NPBFUO = IGNORE ;
+HM22C3CO2H = IGNORE ;
+C2CL32OH = IGNORE ;
+NOPINAO2 = IGNORE ;
+H13M3C5 = IGNORE ;
+CH3SCHO = IGNORE ;
+BUT2OLO2 = IGNORE ;
+CL2OHCH2O2 = IGNORE ;
+TCE2OH = IGNORE ;
+COO2C4CO3 = IGNORE ;
+TM123OLOH = IGNORE ;
+BOX2EOHAO2 = IGNORE ;
+C4OCCOHOOH = IGNORE ;
+M2PEBOOH = IGNORE ;
+C5CODBCO3H = IGNORE ;
+MSIA = IGNORE ;
+IBUTOLBO = IGNORE ;
+HMVKBCO3 = IGNORE ;
+PCATECHOL = IGNORE ;
+LIMBO = IGNORE ;
+HO4CO7C9 = IGNORE ;
+TM123OLO2 = IGNORE ;
+HEX2ONCOOH = IGNORE ;
+BUT2OLOH = IGNORE ;
+DETLMUPAN = IGNORE ;
+CL2OHCH2OH = IGNORE ;
+NOPINAOH = IGNORE ;
+IPBENZOLOH = IGNORE ;
+MC7CO2O = IGNORE ;
+EPXMDLPAN = IGNORE ;
+LIMALAOH = IGNORE ;
+C87PAN = IGNORE ;
+MC4CONO3O2 = IGNORE ;
+H2M4C65O2 = IGNORE ;
+C62CPAN = IGNORE ;
+ME3BU2OLO2 = IGNORE ;
+SBUACETBO2 = IGNORE ;
+M3PEAO = IGNORE ;
+HC3CCO3 = IGNORE ;
+NBCKO2 = IGNORE ;
+CO1C6NO3 = IGNORE ;
+NDNT124LO2 = IGNORE ;
+LIMALAO2 = IGNORE ;
+IPBENZOLO2 = IGNORE ;
+C5CONO3OOH = IGNORE ;
+HOIPRCO2H = IGNORE ;
+ETBEBNO3 = IGNORE ;
+M2CO5C6 = IGNORE ;
+IBUTOLBNO3 = IGNORE ;
+MACO3 = IGNORE ;
+MEBFUOH = IGNORE ;
+METLBIPNO3 = IGNORE ;
+ACBUONBOH = IGNORE ;
+C57NO3PAN = IGNORE ;
+MEBFUO2 = IGNORE ;
+NOPINOO = IGNORE ;
+NMXYOLOOH = IGNORE ;
+H2M3C4O2 = IGNORE ;
+NC3CO3 = IGNORE ;
+HM2C43O = IGNORE ;
+C23O3EHO = IGNORE ;
+CO25C73OOH = IGNORE ;
+NEBFUONE = IGNORE ;
+HM22C3OH = IGNORE ;
+CLCOCLO = IGNORE ;
+C7DDCO2 = IGNORE ;
+INB1NBPAN = IGNORE ;
+C619OH = IGNORE ;
+PECO2 = IGNORE ;
+NO = IGNORE ;
+NA = IGNORE ;
+CO24C63OOH = IGNORE ;
+HC3CO3H = IGNORE ;
+HO2C54CO3 = IGNORE ;
+TBUTCHO = IGNORE ;
+MTBEBPAN = IGNORE ;
+MVKOOH = IGNORE ;
+COHCCLOOH = IGNORE ;
+MVKOOA = IGNORE ;
+DMEOBPROH = IGNORE ;
+C81O2 = IGNORE ;
+CLCOCH2O = IGNORE ;
+PXYOLO = IGNORE ;
+C1213O = IGNORE ;
+M3PEAOH = IGNORE ;
+NOPINBCO = IGNORE ;
+PECOH = IGNORE ;
+EOX2EOLAO2 = IGNORE ;
+CH3OCH2NO3 = IGNORE ;
+C7DDCOH = IGNORE ;
+HM22C3O2 = IGNORE ;
+C812O = IGNORE ;
+C2CL3OHOOH = IGNORE ;
+PROPOLNO3 = IGNORE ;
+NPRACAOOH = IGNORE ;
+BUTDBOH = IGNORE ;
+BCAOH = IGNORE ;
+BCAOO = IGNORE ;
+C1013CO = IGNORE ;
+HO5C5CHO = IGNORE ;
+CLCOCCL2O = IGNORE ;
+TM123BCO3 = IGNORE ;
+OXYQONE = IGNORE ;
+BCAO2 = IGNORE ;
+BCLKAO = IGNORE ;
+MMALNAPAN = IGNORE ;
+C144O = IGNORE ;
+C511O2 = IGNORE ;
+DNOXYOLO2 = IGNORE ;
+ISOPBO = IGNORE ;
+C6OTKETCO = IGNORE ;
+C522PAN = IGNORE ;
+MALANHY = IGNORE ;
+C6DICARB = IGNORE ;
+C131CO3 = IGNORE ;
+TBUTOLO = IGNORE ;
+ETHENO3O = IGNORE ;
+MO2EOL = IGNORE ;
+NDNMETOLO = IGNORE ;
+IPBFUOH = IGNORE ;
+SC4H9NO3 = IGNORE ;
+ACECOCOCH3 = IGNORE ;
+C9DC = IGNORE ;
+CL2OHCO3H = IGNORE ;
+IPBFUO2 = IGNORE ;
+NTMB1FUO = IGNORE ;
+PXYFUO = IGNORE ;
+C627OOH = IGNORE ;
+T124CAT1O = IGNORE ;
+C4COMOHCO3 = IGNORE ;
+C72NO3 = IGNORE ;
+NEBNZOLO2 = IGNORE ;
+C123CO = IGNORE ;
+CH3BR = IGNORE ;
+ETOC2O = IGNORE ;
+VGLYOX = IGNORE ;
+HEX2ONBNO3 = IGNORE ;
+CRESO = IGNORE ;
+C5COCHOO2 = IGNORE ;
+HO2C43CO3H = IGNORE ;
+IBUTOLBO2H = IGNORE ;
+C1H4C5PAN = IGNORE ;
+BZEMUCO = IGNORE ;
+HO2C4OH = IGNORE ;
+C42NO33OOH = IGNORE ;
+PETLMUCO = IGNORE ;
+IEB1OOH = IGNORE ;
+CCLOHCO3 = IGNORE ;
+M2BU2OLNO3 = IGNORE ;
+NEBNZOLOH = IGNORE ;
+ETOLOH = IGNORE ;
+MIBKBO = IGNORE ;
+INAOOH = IGNORE ;
+TM124OL = IGNORE ;
+NDNPXYOLO2 = IGNORE ;
+H2M2C3CHO = IGNORE ;
+LMKANO3 = IGNORE ;
+C517CO3 = IGNORE ;
+BOXPROLBO2 = IGNORE ;
+C103OH = IGNORE ;
+C114O = IGNORE ;
+HOCH2COCHO = IGNORE ;
+CH3COCH3 = IGNORE ;
+HC3CHO = IGNORE ;
+C6NO3CO5O2 = IGNORE ;
+COO2C4PAN = IGNORE ;
+C6NO3CO5OH = IGNORE ;
+C103O2 = IGNORE ;
+PETLMUCOOH = IGNORE ;
+HMVKBOOH = IGNORE ;
+NBCKO = IGNORE ;
+MC5DICARB = IGNORE ;
+HO1C6OOH = IGNORE ;
+TM124O2 = IGNORE ;
+HO2M2C4OOH = IGNORE ;
+PRNO3CO3H = IGNORE ;
+CO235C6O = IGNORE ;
+TC4H9O2 = IGNORE ;
+C127O2 = IGNORE ;
+NDNPETOLO = IGNORE ;
+METHTOL = IGNORE ;
+C1311OOH = IGNORE ;
+C511PAN = IGNORE ;
+CHOC2H4OOH = IGNORE ;
+PRNOCOMOOH = IGNORE ;
+HEPTO = IGNORE ;
+C5DICAROOH = IGNORE ;
+ENNCATECO = IGNORE ;
+TBUTOLO2 = IGNORE ;
+C127OH = IGNORE ;
+C3M3CHONO3 = IGNORE ;
+HO2CO4C5O2 = IGNORE ;
+C145OOH = IGNORE ;
+C918OOH = IGNORE ;
+PXYMUCO2 = IGNORE ;
+DIBRETO = IGNORE ;
+ENCATECH = IGNORE ;
+MVKOHAO = IGNORE ;
+ACCOETO2 = IGNORE ;
+C3ME3PAN = IGNORE ;
+BPINAOOH = IGNORE ;
+EBZMUCNO3 = IGNORE ;
+T124NCTOOH = IGNORE ;
+PBZOBPEROH = IGNORE ;
+MC5COOHOOH = IGNORE ;
+C923CO3 = IGNORE ;
+MMALNACO3H = IGNORE ;
+C727PAN = IGNORE ;
+DNIPBNZOL = IGNORE ;
+NTMB2FUO2 = IGNORE ;
+DETLBIPNO3 = IGNORE ;
+DMMBO = IGNORE ;
+PXYMUCOH = IGNORE ;
+HEPTNO3 = IGNORE ;
+C92OOH = IGNORE ;
+BOXPROOOH = IGNORE ;
+C6NO324CO = IGNORE ;
+TM124MUCCO = IGNORE ;
+SBUACEONE = IGNORE ;
+DIBRET = IGNORE ;
+HEX3ONDOH = IGNORE ;
+MXYMUCO = IGNORE ;
+NIPBFUO = IGNORE ;
+C1310O2 = IGNORE ;
+C928CO3H = IGNORE ;
+CH3S = IGNORE ;
+ACBUONBOOH = IGNORE ;
+C828PAN = IGNORE ;
+CH3O = IGNORE ;
+C4ME2NO3O2 = IGNORE ;
+C830CO = IGNORE ;
+ME2BUT1ENE = IGNORE ;
+CO23C4CO3H = IGNORE ;
+PCATEC1O = IGNORE ;
+HEX3ONDO2 = IGNORE ;
+MACRNOO = IGNORE ;
+C5NO3OAOOH = IGNORE ;
+C4M3NO31O2 = IGNORE ;
+C734OH = IGNORE ;
+CH2BROH = IGNORE ;
+OCTO = IGNORE ;
+C7M15CO2O2 = IGNORE ;
+BOXMOOH = IGNORE ;
+HMVKNO3 = IGNORE ;
+PHCOMEO2 = IGNORE ;
+PHGLYOX = IGNORE ;
+ACETETCHO = IGNORE ;
+PHENOH = IGNORE ;
+PHENOL = IGNORE ;
+MXY1O2 = IGNORE ;
+NEBNZ1OOH = IGNORE ;
+MGLYOO = IGNORE ;
+PHENO2 = IGNORE ;
+INB1NACO2H = IGNORE ;
+C141CO = IGNORE ;
+NPRACAOH = IGNORE ;
+MGLYOX = IGNORE ;
+CL12PRCHO = IGNORE ;
+MVKOHAO2 = IGNORE ;
+C7M15CO2OH = IGNORE ;
+CH2BRO2 = IGNORE ;
+C734O2 = IGNORE ;
+ISOPDO = IGNORE ;
+PXYQOOH = IGNORE ;
+C810O = IGNORE ;
+C118OH = IGNORE ;
+C626PAN = IGNORE ;
+EBZOBPEROH = IGNORE ;
+IEACO3 = IGNORE ;
+IPBZOLOOH = IGNORE ;
+C6M5CO2OH = IGNORE ;
+C2CL3OHAO = IGNORE ;
+C128O = IGNORE ;
+C823NO3 = IGNORE ;
+C1213CO = IGNORE ;
+NT123L1O2 = IGNORE ;
+H3M3C4CO3H = IGNORE ;
+NTM124LOOH = IGNORE ;
+C615O2 = IGNORE ;
+C65OH4NO3 = IGNORE ;
+C6CO2OHOOH = IGNORE ;
+OXYQCO = IGNORE ;
+HO13C5NO3 = IGNORE ;
+C6M5CO2O2 = IGNORE ;
+DIETETNO3 = IGNORE ;
+NC4CO3H = IGNORE ;
+HO14MC5 = IGNORE ;
+C8BCCO = IGNORE ;
+C1311NO3 = IGNORE ;
+C133OH = IGNORE ;
+C118O2 = IGNORE ;
+C53O2 = IGNORE ;
+INB1CO = IGNORE ;
+C137PAN = IGNORE ;
+GAOOB = IGNORE ;
+GAOOA = IGNORE ;
+CHOOMCO3 = IGNORE ;
+HO1CO3C5 = IGNORE ;
+C53NO32O = IGNORE ;
+C923OH = IGNORE ;
+C624CO3 = IGNORE ;
+CL12CO3H = IGNORE ;
+EPXMKTPAN = IGNORE ;
+CLCOCH2OOH = IGNORE ;
+MALDIALOOH = IGNORE ;
+C923O2 = IGNORE ;
+C6CO34O2 = IGNORE ;
+C146O = IGNORE ;
+BOX2EOHAO = IGNORE ;
+DMEBMUCO = IGNORE ;
+C7CODBPAN = IGNORE ;
+PXNNCATCO = IGNORE ;
+C927O = IGNORE ;
+C3EDIALOOH = IGNORE ;
+MACROHOOH = IGNORE ;
+C88CO = IGNORE ;
+TC4H9NO3 = IGNORE ;
+TM135O = IGNORE ;
+C816OOH = IGNORE ;
+TM135B = IGNORE ;
+M2HEXAO2 = IGNORE ;
+MTCATEC1O2 = IGNORE ;
+DETLBIPRO2 = IGNORE ;
+MXYCATECH = IGNORE ;
+INB1HPCO3 = IGNORE ;
+DDECNO3 = IGNORE ;
+MIBKHO4OOH = IGNORE ;
+MET1OHNO2 = IGNORE ;
+M2HEXAOH = IGNORE ;
+NISOPOOH = IGNORE ;
+C54OOH = IGNORE ;
+HIEB2OOH = IGNORE ;
+C87CO3 = IGNORE ;
+C815CO2O = IGNORE ;
+HO3C3CO3 = IGNORE ;
+LIMCOOH = IGNORE ;
+CO2HO3C6 = IGNORE ;
+C3MNO3CO2H = IGNORE ;
+C5MCO2OHO = IGNORE ;
+C7DDCCO3 = IGNORE ;
+C7DDCCO2 = IGNORE ;
+HM33C3OOH = IGNORE ;
+NTLFUO = IGNORE ;
+CCL3CH2O = IGNORE ;
+C1210O = IGNORE ;
+CCLNO3COH = IGNORE ;
+HEX2ONAO = IGNORE ;
+DM124O2 = IGNORE ;
+C5CO234 = IGNORE ;
+COCL2 = IGNORE ;
+HOCH2CH2O = IGNORE ;
+NIPBZOLOOH = IGNORE ;
+C42AOH = IGNORE ;
+CH3CH2CL = IGNORE ;
+HOC3H6OH = IGNORE ;
+EPXC4DIAL = IGNORE ;
+NOPINDOOH = IGNORE ;
+PXYBPER2OH = IGNORE ;
+CHCL3OH = IGNORE ;
+C5TRONCO3H = IGNORE ;
+BPINCOH = IGNORE ;
+OTCATECOOA = IGNORE ;
+MXYBPEROOH = IGNORE ;
+MTBEAOH = IGNORE ;
+ACCOMECO3H = IGNORE ;
+HO2MC5O2 = IGNORE ;
+NC71O = IGNORE ;
+NMXYOLO2 = IGNORE ;
+C729CO3 = IGNORE ;
+PGLOOB = IGNORE ;
+PGLOOA = IGNORE ;
+TM123MUCCO = IGNORE ;
+NMXYOLOH = IGNORE ;
+MXYLCO3H = IGNORE ;
+CH2CLCOCH3 = IGNORE ;
+CO2C4DIAL = IGNORE ;
+NCRES1O2 = IGNORE ;
+C812OOH = IGNORE ;
+C5CO23O = IGNORE ;
+UDECO = IGNORE ;
+BPINCO2 = IGNORE ;
+C726CO5O = IGNORE ;
+MTBEAO2 = IGNORE ;
+OXYLOOH = IGNORE ;
+MPAN = IGNORE ;
+CHCL3O2 = IGNORE ;
+HMVKAOOH = IGNORE ;
+MMCF = IGNORE ;
+BOXPOLBOOH = IGNORE ;
+HO2M2C5O2 = IGNORE ;
+BUTDAOH = IGNORE ;
+PXYLCO2H = IGNORE ;
+OXYLPAN = IGNORE ;
+OXYOLOH = IGNORE ;
+CHOC4CO3 = IGNORE ;
+LIMBOO = IGNORE ;
+O3 = IGNORE ;
+NC730O2 = IGNORE ;
+BCLKCOOH = IGNORE ;
+IPROMCCO3H = IGNORE ;
+C62CO3H = IGNORE ;
+TOLUENE = IGNORE ;
+CHCL2CO3H = IGNORE ;
+BOXPRONBO = IGNORE ;
+LMLKAOOH = IGNORE ;
+LIMBO2 = IGNORE ;
+OH = IGNORE ;
+BOXCOOLOOH = IGNORE ;
+NPBNZOLOOH = IGNORE ;
+BUTDAO2 = IGNORE ;
+ECO3CO3H = IGNORE ;
+HO2M2C5OH = IGNORE ;
+NOETOL1O = IGNORE ;
+C6DCARBPAN = IGNORE ;
+TLCOBIPEOH = IGNORE ;
+MIBKOH34 = IGNORE ;
+DMMALYOOH = IGNORE ;
+C915OH = IGNORE ;
+DM123OOH = IGNORE ;
+MTNCATECO2 = IGNORE ;
+NBCOOH = IGNORE ;
+C915O2 = IGNORE ;
+HO2M2C5NO3 = IGNORE ;
+HO6C7O = IGNORE ;
+IPRACBCHO = IGNORE ;
+SBUACANO3 = IGNORE ;
+ETOC2OOH = IGNORE ;
+C4DBM2CO3 = IGNORE ;
+TMBOH = IGNORE ;
+HM33C3CHO = IGNORE ;
+CHOCOCH2O2 = IGNORE ;
+MXYBIPENO3 = IGNORE ;
+ACR = IGNORE ;
+C520OOH = IGNORE ;
+HOC2H4CO3 = IGNORE ;
+ACEC2H4OOH = IGNORE ;
+C520OOA = IGNORE ;
+HO2C6NO3 = IGNORE ;
+MOCOCH2O2 = IGNORE ;
+BUTDBO = IGNORE ;
+CYHXONAOOH = IGNORE ;
+C517PAN = IGNORE ;
+EOX2EOLAO = IGNORE ;
+OXNNCATCO2 = IGNORE ;
+IPBZMUCCO3 = IGNORE ;
+T124NNCTO = IGNORE ;
+C614OOH = IGNORE ;
+LIMALAO = IGNORE ;
+ACBUONEAO2 = IGNORE ;
+IPROCHO = IGNORE ;
+M22C43NO3 = IGNORE ;
+MEK = IGNORE ;
+C612OOH = IGNORE ;
+CO13C4CHO = IGNORE ;
+H1C23C4O = IGNORE ;
+C85O2 = IGNORE ;
+T123NNCOOH = IGNORE ;
+C610OOH = IGNORE ;
+C102O2 = IGNORE ;
+PEBQO = IGNORE ;
+C6H13CO3 = IGNORE ;
+CH3CCH3OO = IGNORE ;
+INAHCO3H = IGNORE ;
+C4NO3COO2 = IGNORE ;
+CO24C53OOH = IGNORE ;
+NISOPO2 = IGNORE ;
+NMETOLO = IGNORE ;
+METCATECH = IGNORE ;
+MXYBIPERO2 = IGNORE ;
+C4M2ALOHO = IGNORE ;
+CO3C54CO3H = IGNORE ;
+NPETOLOOH = IGNORE ;
+C4OCCOHCO = IGNORE ;
+H2M2C4CO3 = IGNORE ;
+CO13C3CO2H = IGNORE ;
+NORPINIC = IGNORE ;
+EPXMDLCO2H = IGNORE ;
+C126O = IGNORE ;
+OXY1O = IGNORE ;
+ETBECCHO = IGNORE ;
+PEAOH = IGNORE ;
+NDNPHENO = IGNORE ;
+DETLMUOH = IGNORE ;
+EOX2OLBOOH = IGNORE ;
+NBUTDAO2 = IGNORE ;
+NBUTDAOH = IGNORE ;
+NPBFUONE = IGNORE ;
+CO3C54CHO = IGNORE ;
+NT123L1O = IGNORE ;
+ETOLO2 = IGNORE ;
+C73OOH = IGNORE ;
+C5NO3CO4O = IGNORE ;
+NC101O2 = IGNORE ;
+PEAOOH = IGNORE ;
+C125OOH = IGNORE ;
+C712O = IGNORE ;
+H1MC5OOH = IGNORE ;
+ISOPCOOH = IGNORE ;
+PRCOFORMO2 = IGNORE ;
+TM135OLOOH = IGNORE ;
+C6OTKETOH = IGNORE ;
+H2M4C65NO3 = IGNORE ;
+DMEPHOH = IGNORE ;
+C4MCO2O2 = IGNORE ;
+MXYL1O = IGNORE ;
+H2M3C4CO2H = IGNORE ;
+M3PEBNO3 = IGNORE ;
+HO2C4OOH = IGNORE ;
+C4MCO2OH = IGNORE ;
+C727CO3H = IGNORE ;
+EBZMUCO = IGNORE ;
+T123NNCTO2 = IGNORE ;
+PRONO3BO = IGNORE ;
+OTNCATCOOH = IGNORE ;
+C6OTKETO2 = IGNORE ;
+C925O = IGNORE ;
+INCOOH = IGNORE ;
+ISOPBOOH = IGNORE ;
+NDNCRESO = IGNORE ;
+NC730OH = IGNORE ;
+NOAOO = IGNORE ;
+C6DICAROOH = IGNORE ;
+IPMALANHY = IGNORE ;
+DNMETOLO2 = IGNORE ;
+IC7DCCO3H = IGNORE ;
+IPRACBO = IGNORE ;
+IPBFUCO = IGNORE ;
+CO2HOC61O = IGNORE ;
+MEMOXYCO3H = IGNORE ;
+METOLO2 = IGNORE ;
+METOLOH = IGNORE ;
+HO2C5OOH = IGNORE ;
+C33CO = IGNORE ;
+PRCOOMCO3H = IGNORE ;
+BCAL = IGNORE ;
+C1213NO3 = IGNORE ;
+M2C43CHO = IGNORE ;
+M3C4CO3 = IGNORE ;
+BRETO3 = IGNORE ;
+C61OOH = IGNORE ;
+C64NO3 = IGNORE ;
+C4NO3CO2H = IGNORE ;
+C5CO2DBPAN = IGNORE ;
+ETHFORM = IGNORE ;
+C131PAN = IGNORE ;
+DECO = IGNORE ;
+M2BKBOH = IGNORE ;
+NNCATECO2 = IGNORE ;
+MBOBOOH = IGNORE ;
+C827CHO = IGNORE ;
+HOCOC4DIAL = IGNORE ;
+C1212O = IGNORE ;
+C123OH = IGNORE ;
+C515CO3 = IGNORE ;
+C1313OH = IGNORE ;
+BOXPRONBO2 = IGNORE ;
+ETBE = IGNORE ;
+OXYLCO2H = IGNORE ;
+C67CO3 = IGNORE ;
+EPXALMKT = IGNORE ;
+TMBCHO = IGNORE ;
+BOXPRONBOH = IGNORE ;
+HO13C4OOH = IGNORE ;
+C1313O2 = IGNORE ;
+C123O2 = IGNORE ;
+EBZMUCCO3 = IGNORE ;
+C519CO3 = IGNORE ;
+M2BKBO2 = IGNORE ;
+PXYL1O = IGNORE ;
+C7MCO2DBAL = IGNORE ;
+CH3CCL2OOH = IGNORE ;
+PHC3OH = IGNORE ;
+NC4H9O = IGNORE ;
+NBCO2 = IGNORE ;
+OTNNCATOOH = IGNORE ;
+CO2C3CO3 = IGNORE ;
+TM124MUNO3 = IGNORE ;
+MIBKHO4CHO = IGNORE ;
+IECCO3H = IGNORE ;
+PXYMUCCO3 = IGNORE ;
+HM22CHO = IGNORE ;
+BOXPRONE = IGNORE ;
+HEX2ONCO = IGNORE ;
+UDECOH = IGNORE ;
+DETLPOXMUC = IGNORE ;
+MTNNCATOOH = IGNORE ;
+CYHXOLANO3 = IGNORE ;
+C5DIALOOH = IGNORE ;
+HO3C96OOH = IGNORE ;
+OETLMUCO = IGNORE ;
+NOETLQO2 = IGNORE ;
+EPXKTMCO3H = IGNORE ;
+PHC3O2 = IGNORE ;
+HCHO = IGNORE ;
+HO36C9 = IGNORE ;
+HO36C8 = IGNORE ;
+C102OOH = IGNORE ;
+C718OH = IGNORE ;
+PHCOMEO = IGNORE ;
+C6H5C2NO3 = IGNORE ;
+NPHENOH = IGNORE ;
+T124NCATO2 = IGNORE ;
+C613O2 = IGNORE ;
+PRONOCOMO = IGNORE ;
+C831O = IGNORE ;
+CH2CLOH = IGNORE ;
+NLMKAO = IGNORE ;
+CLOHPAN = IGNORE ;
+C6H13CO2H = IGNORE ;
+CHOC3COCO3 = IGNORE ;
+MACROHNO3 = IGNORE ;
+CO234C65O = IGNORE ;
+C1312NO3 = IGNORE ;
+OXYMUCCO3 = IGNORE ;
+C8CO4DB = IGNORE ;
+C102O = IGNORE ;
+NPHENO2 = IGNORE ;
+C6CONO34O = IGNORE ;
+NORLIMO = IGNORE ;
+HO5C6O2 = IGNORE ;
+CO1M22CO3 = IGNORE ;
+NBZFUO2 = IGNORE ;
+PHCOETOH = IGNORE ;
+C520O2 = IGNORE ;
+C57NO3CO3H = IGNORE ;
+C719NO3 = IGNORE ;
+C77CO = IGNORE ;
+MGLOO = IGNORE ;
+C823OH = IGNORE ;
+TCEOHOOH = IGNORE ;
+NC4H9OOH = IGNORE ;
+C817CO3H = IGNORE ;
+H13C43CO3H = IGNORE ;
+C823O2 = IGNORE ;
+NBUACAOH = IGNORE ;
+NDNOXYOLO2 = IGNORE ;
+C62NO33O = IGNORE ;
+C109O = IGNORE ;
+PHC3O = IGNORE ;
+C6CO2OHPAN = IGNORE ;
+MACRNBCO3H = IGNORE ;
+EMPOHNO2O2 = IGNORE ;
+PHCOETO2 = IGNORE ;
+NPHEN1OOH = IGNORE ;
+C811NO3 = IGNORE ;
+C2H5CHO = IGNORE ;
+INDHCO3H = IGNORE ;
+CH2OHCL2O2H = IGNORE ;
+C2CL3OHBO2 = IGNORE ;
+HIEB2O2 = IGNORE ;
+NC728O = IGNORE ;
+TM124MUCOH = IGNORE ;
+MTCTEC1OOH = IGNORE ;
+C137OH = IGNORE ;
+C137O2 = IGNORE ;
+TM124MUCO2 = IGNORE ;
+TM124MUCO3 = IGNORE ;
+C3MDIALOOH = IGNORE ;
+MXYLO = IGNORE ;
+CO2MC5OH = IGNORE ;
+DDECO = IGNORE ;
+C6CO3HO4 = IGNORE ;
+CH3COCCLO = IGNORE ;
+C151NO3 = IGNORE ;
+C73O2 = IGNORE ;
+C816CO3H = IGNORE ;
+C8CO2DBCO3 = IGNORE ;
+ETOMEOOH = IGNORE ;
+PRCOOMOOH = IGNORE ;
+C816PAN = IGNORE ;
+NPBFUOOH = IGNORE ;
+C732O = IGNORE ;
+PTCTEC1OOH = IGNORE ;
+NDNPHENOOH = IGNORE ;
+TL4OHNO2O = IGNORE ;
+C517CO2H = IGNORE ;
+PXYMUCCO3H = IGNORE ;
+MECOFORMO2 = IGNORE ;
+NOETOL1OOH = IGNORE ;
+HO2C54NO3 = IGNORE ;
+MACRNCO3 = IGNORE ;
+NPXYOL1O2 = IGNORE ;
+C62O2 = IGNORE ;
+IC4H9O = IGNORE ;
+BZEMUCNO3 = IGNORE ;
+PXYBIPERO = IGNORE ;
+C3H6 = IGNORE ;
+ACEETOHO2 = IGNORE ;
+OXYBPER2OH = IGNORE ;
+HO7C8OOH = IGNORE ;
+C118CO = IGNORE ;
+C3H8 = IGNORE ;
+BCKOOA = IGNORE ;
+BCKOOB = IGNORE ;
+C6135COOOH = IGNORE ;
+NPRACCOH = IGNORE ;
+MEBFUONE = IGNORE ;
+C124O = IGNORE ;
+BOXCOEOLO = IGNORE ;
+HO1C4O = IGNORE ;
+MPRKNO3 = IGNORE ;
+NBUTOLANO3 = IGNORE ;
+OETLMUCOOH = IGNORE ;
+HO5C5CO3H = IGNORE ;
+ETHFORMOOH = IGNORE ;
+EBENZO = IGNORE ;
+MOXYCOCHO = IGNORE ;
+TM135MUO3H = IGNORE ;
+C714O = IGNORE ;
+NLIMO2 = IGNORE ;
+ACCOC3H6O = IGNORE ;
+MXOHNO2OOH = IGNORE ;
+C817CO = IGNORE ;
+CCLCONO3 = IGNORE ;
+C56O2 = IGNORE ;
+H2C3OCOH = IGNORE ;
+M3HEXBOH = IGNORE ;
+M3HEXBO2 = IGNORE ;
+METLMUCO3H = IGNORE ;
+ACOMCOMOOH = IGNORE ;
+CHOC3COO2 = IGNORE ;
+TM124BCHO = IGNORE ;
+HO3C96O2 = IGNORE ;
+HO3C3CO3H = IGNORE ;
+C56OH = IGNORE ;
+DETLOBPROH = IGNORE ;
+M2PROPAL2O = IGNORE ;
+NC4EDCO2H = IGNORE ;
+MBOACO = IGNORE ;
+C6CYTONO = IGNORE ;
+BOXCOCHOO2 = IGNORE ;
+C142O = IGNORE ;
+MXYQO = IGNORE ;
+MIBKAOHAO2 = IGNORE ;
+HMVKBCO2H = IGNORE ;
+PXYLPAN = IGNORE ;
+C51NO32OOH = IGNORE ;
+DIET35TOL = IGNORE ;
+C86O2 = IGNORE ;
+MBOBCO = IGNORE ;
+C8CO2OHPAN = IGNORE ;
+CHOC2PAN = IGNORE ;
+PBZBPERNO3 = IGNORE ;
+DM35EBOH = IGNORE ;
+C53OH = IGNORE ;
+HCOCOHCO3H = IGNORE ;
+BOXPOLAOOH = IGNORE ;
+NBUTDBO2 = IGNORE ;
+NIPRBQOOH = IGNORE ;
+C5CO2DCO3H = IGNORE ;
+HO34CO6C8 = IGNORE ;
+OXYMUCCO = IGNORE ;
+NTMB2FUOOH = IGNORE ;
+DNOETOLO2 = IGNORE ;
+M3CO5C6 = IGNORE ;
+C9PAN1 = IGNORE ;
+NC4CO2H = IGNORE ;
+C9PAN2 = IGNORE ;
+MXCATEC1O = IGNORE ;
+C6OH5OOH = IGNORE ;
+PNNCATECO = IGNORE ;
+OXYEPOXMUC = IGNORE ;
+DNPBNZLO = IGNORE ;
+BOXCOCOMO2 = IGNORE ;
+CYC613DION = IGNORE ;
+TM123MUCO2 = IGNORE ;
+HOCO3C5OOH = IGNORE ;
+C4CODIAL = IGNORE ;
+IC3H7NO3 = IGNORE ;
+NDNMXYLOOH = IGNORE ;
+INCNCO3H = IGNORE ;
+C7MCO3OHO = IGNORE ;
+T123CTCOOA = IGNORE ;
+TM123MUCOH = IGNORE ;
+C5NO3O4OOH = IGNORE ;
+BCSOZO = IGNORE ;
+H2C3OCOOH = IGNORE ;
+HEX3ONCO = IGNORE ;
+C615O = IGNORE ;
+CO356C10 = IGNORE ;
+CO356C11 = IGNORE ;
+CO356C12 = IGNORE ;
+TDICLETH = IGNORE ;
+MC6OTRIKET = IGNORE ;
+CHOMOHPAN = IGNORE ;
+CLCOCCL2O2 = IGNORE ;
+EGLYOOD = IGNORE ;
+BCALCOOH = IGNORE ;
+C6NO3CO5O = IGNORE ;
+METLMUCO2H = IGNORE ;
+BCALBO2 = IGNORE ;
+HOCO3C4OOH = IGNORE ;
+C92O = IGNORE ;
+MVKOHAOH = IGNORE ;
+C7CO2OCO3H = IGNORE ;
+C4M2ALOHNO3 = IGNORE ;
+C732PAN = IGNORE ;
+CO2C4GLYOX = IGNORE ;
+DIEK = IGNORE ;
+BCALBOH = IGNORE ;
+ETBECOOH = IGNORE ;
+BCALBOC = IGNORE ;
+TM135BP2OH = IGNORE ;
+MXYOHNO2O = IGNORE ;
+INANCO3 = IGNORE ;
+C106OH = IGNORE ;
+C813O2 = IGNORE ;
+MXYMUCCO = IGNORE ;
+CO25C73O = IGNORE ;
+HM2C43CO3 = IGNORE ;
+C126CO3 = IGNORE ;
+EIPK = IGNORE ;
+MACR = IGNORE ;
+PRCATC1OOH = IGNORE ;
+MACRNCO3H = IGNORE ;
+CCL3CH2OOH = IGNORE ;
+NC2OOA = IGNORE ;
+IBUTOL = IGNORE ;
+NBUACETBO = IGNORE ;
+BCOOA = IGNORE ;
+BCOOB = IGNORE ;
+C106O2 = IGNORE ;
+CO3C4NO3 = IGNORE ;
+CH3CHCLOH = IGNORE ;
+C617OOH = IGNORE ;
+CLCOCLMEO2 = IGNORE ;
+HO1MC5OOH = IGNORE ;
+HO13C4O = IGNORE ;
+MO2EOLBO2 = IGNORE ;
+IPROPOL = IGNORE ;
+C715CO2O = IGNORE ;
+MET1OOH = IGNORE ;
+M2BUOL2O = IGNORE ;
+MEKAOOH = IGNORE ;
+C1010NO3 = IGNORE ;
+NOPINANO3 = IGNORE ;
+HONO = IGNORE ;
+C1012NO3 = IGNORE ;
+HO3C76O = IGNORE ;
+HOEMPHNO2 = IGNORE ;
+DNCRESOOH = IGNORE ;
+APINBOOH = IGNORE ;
+C133OOH = IGNORE ;
+OETLMUCNO3 = IGNORE ;
+C42CO3H = IGNORE ;
+C2OHOCOOH = IGNORE ;
+TMBPAN = IGNORE ;
+C58NO3 = IGNORE ;
+BCALOOH = IGNORE ;
+BUT2CO2H = IGNORE ;
+BCALOOA = IGNORE ;
+C1010O2 = IGNORE ;
+C126PAN = IGNORE ;
+C810OOH = IGNORE ;
+C622OH = IGNORE ;
+C6COCHOPAN = IGNORE ;
+CONM2CO3H = IGNORE ;
+NC4H9CHOOA = IGNORE ;
+C3COCCO3H = IGNORE ;
+HOCH2CHO = IGNORE ;
+C1010OH = IGNORE ;
+IEB1O2 = IGNORE ;
+HO24C5O2 = IGNORE ;
+C1H4C5CO2H = IGNORE ;
+ETHACETO2 = IGNORE ;
+IEPOXC = IGNORE ;
+IEPOXB = IGNORE ;
+IEPOXA = IGNORE ;
+APINCOOH = IGNORE ;
+IPRACOOH = IGNORE ;
+CO2N3CO3 = IGNORE ;
+C713OH = IGNORE ;
+C512OH = IGNORE ;
+C7M15CO2O = IGNORE ;
+IPRACBPAN = IGNORE ;
+MACO2H = IGNORE ;
+C122O = IGNORE ;
+NC91CO3 = IGNORE ;
+M2PEBO = IGNORE ;
+CO123C5CHO = IGNORE ;
+C730O = IGNORE ;
+HO2C4CO2H = IGNORE ;
+TMB1FUOOH = IGNORE ;
+IPRCHOO = IGNORE ;
+C512CO2H = IGNORE ;
+CH2OHCL2O2 = IGNORE ;
+CO23C54O = IGNORE ;
+HM2C43NO3 = IGNORE ;
+INB1NACHO = IGNORE ;
+M33C4O = IGNORE ;
+ETHACETOH = IGNORE ;
+PRCOOETOH = IGNORE ;
+ISOPANO3 = IGNORE ;
+PBZQO2 = IGNORE ;
+BOXPROLAO = IGNORE ;
+EPXDLPAN = IGNORE ;
+C921O = IGNORE ;
+PBNZOHNO2 = IGNORE ;
+C23O3MCOOH = IGNORE ;
+C923PAN = IGNORE ;
+C64OH5O = IGNORE ;
+C88CO2H = IGNORE ;
+CCL3CO3 = IGNORE ;
+C6OTRIKET = IGNORE ;
+C928CO3 = IGNORE ;
+HO3C86O = IGNORE ;
+HM33C3CO2H = IGNORE ;
+HO1C6O = IGNORE ;
+NOXYOL1OOH = IGNORE ;
+NPTLQO2 = IGNORE ;
+NC4H9CHOO = IGNORE ;
+NDEMPHOLO = IGNORE ;
+OXYBIPERO2 = IGNORE ;
+NPXYOLOOH = IGNORE ;
+PHCOOH = IGNORE ;
+C112OOH = IGNORE ;
+C5NO3COAO2 = IGNORE ;
+THEX2ENE = IGNORE ;
+C6DCARBBO = IGNORE ;
+H1C23C4PAN = IGNORE ;
+NBUACBNO3 = IGNORE ;
+IBUTALOH = IGNORE ;
+IPBZMUCPAN = IGNORE ;
+CH3CO3H = IGNORE ;
+PBZQOH = IGNORE ;
+INANO3 = IGNORE ;
+C610OH = IGNORE ;
+M23C43O = IGNORE ;
+DMEBMUCO3 = IGNORE ;
+DMEBMUCO2 = IGNORE ;
+APINBOO = IGNORE ;
+M2BU2OLOOH = IGNORE ;
+CO235C6O2 = IGNORE ;
+ETOLOOH = IGNORE ;
+IPBENZO = IGNORE ;
+NDNEBZLOOH = IGNORE ;
+TM135OBPOH = IGNORE ;
+M2HEXBOOH = IGNORE ;
+LMKBCO = IGNORE ;
+NC4CHO = IGNORE ;
+APINBO2 = IGNORE ;
+C521O = IGNORE ;
+C7CO2M5O2 = IGNORE ;
+MPRNO3CO2H = IGNORE ;
+C4OHCHO = IGNORE ;
+C610O2 = IGNORE ;
+C141NO3 = IGNORE ;
+T123CATECH = IGNORE ;
+PEN2ONE1O = IGNORE ;
+APINANO3 = IGNORE ;
+C515CO = IGNORE ;
+HMACRO2 = IGNORE ;
+IPCATECHOL = IGNORE ;
+PRCOFORM = IGNORE ;
+LMLKACO = IGNORE ;
+EBENZOL = IGNORE ;
+C811PAN = IGNORE ;
+ALLYLOH = IGNORE ;
+C87OOH = IGNORE ;
+C729PAN = IGNORE ;
+C141CO3H = IGNORE ;
+NLMKAO2 = IGNORE ;
+C926O2 = IGNORE ;
+CHCL2CHOH = IGNORE ;
+OETLMUCO2H = IGNORE ;
+EBENZO2 = IGNORE ;
+PCATEC1OOH = IGNORE ;
+C127NO3 = IGNORE ;
+C4NO32M1O = IGNORE ;
+IPROPOLO2H = IGNORE ;
+ETOC2O2 = IGNORE ;
+EPXEKTCO3 = IGNORE ;
+HMACROH = IGNORE ;
+EIPKBO = IGNORE ;
+NC8H18 = IGNORE ;
+H1C23C4CHO = IGNORE ;
+LMKAOOH = IGNORE ;
+C929O2 = IGNORE ;
+C6H5CH2CHO = IGNORE ;
+PROPGLY = IGNORE ;
+CO2C54CO3 = IGNORE ;
+C6H5C2H4O = IGNORE ;
+IEC2OOH = IGNORE ;
+TM135BZOL = IGNORE ;
+OXYLOH = IGNORE ;
+OXYLOL = IGNORE ;
+SBUACAOH = IGNORE ;
+C524OH = IGNORE ;
+OXYFUONE = IGNORE ;
+CO23C4CO3 = IGNORE ;
+C524O2 = IGNORE ;
+SC4H9O = IGNORE ;
+OXYLO2 = IGNORE ;
+CCL2OHCOCL = IGNORE ;
+C72O = IGNORE ;
+C621OOH = IGNORE ;
+TM124BO2 = IGNORE ;
+CO1M22CO2H = IGNORE ;
+LMKBOOH = IGNORE ;
+C96OOH = IGNORE ;
+HOCHOCOOH = IGNORE ;
+PETLMUCPAN = IGNORE ;
+HEX3ONAO = IGNORE ;
+C617O = IGNORE ;
+CHOC3COOOH = IGNORE ;
+C52OH3OOH = IGNORE ;
+MMALNBCO2H = IGNORE ;
+C94O = IGNORE ;
+NMBOBCO = IGNORE ;
+C56NO3 = IGNORE ;
+DNOETOLOOH = IGNORE ;
+MACROHO = IGNORE ;
+EBZBPERNO3 = IGNORE ;
+C620OOH = IGNORE ;
+NBUTOLBOOH = IGNORE ;
+MIPKBOOH = IGNORE ;
+C624CO3H = IGNORE ;
+C97OOH = IGNORE ;
+PBZQOOH = IGNORE ;
+NPPRBQO = IGNORE ;
+CH3COCH2O2 = IGNORE ;
+DM124OOH = IGNORE ;
+ISOPAOH = IGNORE ;
+C5DCO2CO3H = IGNORE ;
+PAN = IGNORE ;
+C77OH = IGNORE ;
+OXNCATECH = IGNORE ;
+OXNCATECO = IGNORE ;
+C8CO2OHCO3 = IGNORE ;
+DETLMUO3H = IGNORE ;
+C77O2 = IGNORE ;
+EBZMUCCO = IGNORE ;
+MPRKBOOH = IGNORE ;
+BCKSOZ = IGNORE ;
+PCATECOOA = IGNORE ;
+LIMAO2 = IGNORE ;
+CCL3CH2OH = IGNORE ;
+M22C4OOH = IGNORE ;
+NPETLQO = IGNORE ;
+EPXMEDLPAN = IGNORE ;
+HMACO3 = IGNORE ;
+C42OOH = IGNORE ;
+CH3CHOHCO3 = IGNORE ;
+CO3C85OOH = IGNORE ;
+ETBEBOH = IGNORE ;
+C520OH = IGNORE ;
+MEMOXYCHO = IGNORE ;
+HO24C4CHO = IGNORE ;
+HOC3H6CO3H = IGNORE ;
+NIPBFUONE = IGNORE ;
+OCTOOH = IGNORE ;
+C6DIALO = IGNORE ;
+MACRNOOA = IGNORE ;
+MCOOTBOOH = IGNORE ;
+LIMAOH = IGNORE ;
+CCL3CH2O2 = IGNORE ;
+EBZPOXMUC = IGNORE ;
+TM123OBPOH = IGNORE ;
+MIBKAOHBO = IGNORE ;
+CO3C4CHO = IGNORE ;
+C52OH = IGNORE ;
+DIETETHER = IGNORE ;
+C43NO3PAN = IGNORE ;
+NOPINCOH = IGNORE ;
+C829O2 = IGNORE ;
+BUT2OLOOH = IGNORE ;
+C74O = IGNORE ;
+IPROACETO = IGNORE ;
+NOPINCO2 = IGNORE ;
+C829OH = IGNORE ;
+C42MNO3OOH = IGNORE ;
+C52O2 = IGNORE ;
+C722O2 = IGNORE ;
+HC4ACO2H = IGNORE ;
+DICLETO2H = IGNORE ;
+C55O = IGNORE ;
+C7CDCCO2H = IGNORE ;
+C818O = IGNORE ;
+DNOXYOLO = IGNORE ;
+H2M2C65O2 = IGNORE ;
+CO2C3CO3H = IGNORE ;
+DMKCOOH = IGNORE ;
+NC12H26 = IGNORE ;
+M33C4NO3 = IGNORE ;
+C65OH4OOH = IGNORE ;
+C4OH2CO3 = IGNORE ;
+ACETC2H4O2 = IGNORE ;
+DDECOOH = IGNORE ;
+M2PEDO = IGNORE ;
+HOCH2CO3H = IGNORE ;
+C6EO2OHPAN = IGNORE ;
+PR2O2HNO3 = IGNORE ;
+TLEMUCCO3H = IGNORE ;
+SBUACCOOH = IGNORE ;
+ME3BUOLO2 = IGNORE ;
+C6COCHOO = IGNORE ;
+CH3COCH2O = IGNORE ;
+MXYQOH = IGNORE ;
+HEX2ONBO2 = IGNORE ;
+C6H5CH2O = IGNORE ;
+LMKAO = IGNORE ;
+C87CO3H = IGNORE ;
+C84OH = IGNORE ;
+HO4C5CO3H = IGNORE ;
+MXYQO2 = IGNORE ;
+MTBEAALNO3 = IGNORE ;
+PHCOME = IGNORE ;
+PMALNHY2OH = IGNORE ;
+C732NO3 = IGNORE ;
+C1011OH = IGNORE ;
+HO2C4CO3 = IGNORE ;
+NOXYOLO2 = IGNORE ;
+C6DCARBBO2 = IGNORE ;
+METLBPROOH = IGNORE ;
+MPRKAO = IGNORE ;
+ETBEBO = IGNORE ;
+HO1CO24C5 = IGNORE ;
+HO1CO24C6 = IGNORE ;
+EIPEO = IGNORE ;
+PETOH = IGNORE ;
+C5O5OHCO3H = IGNORE ;
+H3M3C5CO2H = IGNORE ;
+NOXYOLOH = IGNORE ;
+C1011O2 = IGNORE ;
+HC4CCO3H = IGNORE ;
+EIPKBNO3 = IGNORE ;
+C5DICARB = IGNORE ;
+M23C4 = IGNORE ;
+INB2O = IGNORE ;
+PXYLOH = IGNORE ;
+C3EDIALO2 = IGNORE ;
+PXYLOL = IGNORE ;
+BCSOZOOH = IGNORE ;
+NC730O = IGNORE ;
+NT124L1O = IGNORE ;
+HMACROOH = IGNORE ;
+PE2ENEBO2 = IGNORE ;
+OXYLNO3 = IGNORE ;
+DM124OHNO2 = IGNORE ;
+M2PEDNO3 = IGNORE ;
+HO4C5CO3 = IGNORE ;
+C3H7CHOOB = IGNORE ;
+C3H7CHOOA = IGNORE ;
+CO3C5CO3 = IGNORE ;
+BCSOZ = IGNORE ;
+ACEBUTBONE = IGNORE ;
+C7MCO3OHO2 = IGNORE ;
+C3EDIALOH = IGNORE ;
+PXYLO2 = IGNORE ;
+CO245C7 = IGNORE ;
+PTLQCO = IGNORE ;
+BOXPOLBNO3 = IGNORE ;
+CO2H3CO3 = IGNORE ;
+NPBNZOLO = IGNORE ;
+CHOC4O = IGNORE ;
+MTBKOH = IGNORE ;
+NBUTDBNO3 = IGNORE ;
+PNCATECO = IGNORE ;
+PNCATECH = IGNORE ;
+C4MCONO3OH = IGNORE ;
+C1013OH = IGNORE ;
+C5H11CHO = IGNORE ;
+C7DICARB = IGNORE ;
+C5DBECO3 = IGNORE ;
+C108OOH = IGNORE ;
+NMXYOL1OOH = IGNORE ;
+CLGLYOX = IGNORE ;
+TMB2FUOH = IGNORE ;
+PRONEMOOOH = IGNORE ;
+DIBRETO2H = IGNORE ;
+TM123O2 = IGNORE ;
+OETLQONE = IGNORE ;
+C4MCONO3O2 = IGNORE ;
+C4PAN10 = IGNORE ;
+C62NO33O2 = IGNORE ;
+C524OOH = IGNORE ;
+C4H9CO3 = IGNORE ;
+C611O = IGNORE ;
+MTBKO2 = IGNORE ;
+C67OOH = IGNORE ;
+SBUACONEO2 = IGNORE ;
+HCC7CO = IGNORE ;
+PRONEMOX = IGNORE ;
+C2H5MECOO = IGNORE ;
+C61CO3H = IGNORE ;
+C23O3ECO3H = IGNORE ;
+TMBNO3 = IGNORE ;
+PEBQO2 = IGNORE ;
+BCCNO3 = IGNORE ;
+NPETOL1O = IGNORE ;
+C77OOH = IGNORE ;
+NC101O = IGNORE ;
+C96O = IGNORE ;
+HO3C5CO2H = IGNORE ;
+C4OH2CO3H = IGNORE ;
+PPRBQONE = IGNORE ;
+BUTALO = IGNORE ;
+MIBK = IGNORE ;
+PEBQOH = IGNORE ;
+CCL2CH2 = IGNORE ;
+ACO3B = IGNORE ;
+INAHCO3 = IGNORE ;
+NBUTOL = IGNORE ;
+C137OOH = IGNORE ;
+C525OOH = IGNORE ;
+C4CHOAO2 = IGNORE ;
+C137CO2H = IGNORE ;
+MTNNCATCO2 = IGNORE ;
+HO2C6O2 = IGNORE ;
+NC71CO = IGNORE ;
+CHOC4OHO = IGNORE ;
+C4ME2OHO2 = IGNORE ;
+C3DIOLOOH = IGNORE ;
+C45IC5CHO = IGNORE ;
+TM124OXMUC = IGNORE ;
+HCOCH2CHO = IGNORE ;
+PBENZOL = IGNORE ;
+NLIMALOH = IGNORE ;
+C614NO3 = IGNORE ;
+C74OOH = IGNORE ;
+HEX3ONBOOH = IGNORE ;
+CNO3CLO = IGNORE ;
+BOXEOHBNO3 = IGNORE ;
+TLBIPERO = IGNORE ;
+M2HEX = IGNORE ;
+MPRANO3O2 = IGNORE ;
+C518CO3H = IGNORE ;
+PRNFORMOOH = IGNORE ;
+HM22C3CHO = IGNORE ;
+OXNCATCOOH = IGNORE ;
+ACBUONEBO2 = IGNORE ;
+CYC6DIONE = IGNORE ;
+ACEC2H4NO3 = IGNORE ;
+CYC6DIONO = IGNORE ;
+C4ALDB = IGNORE ;
+NTMB1FUO2 = IGNORE ;
+HO13C3CHO = IGNORE ;
+C85CO3H = IGNORE ;
+BPINBOOH = IGNORE ;
+MXNCATCOOH = IGNORE ;
+C58NO3CO3 = IGNORE ;
+C811OH = IGNORE ;
+C101O2 = IGNORE ;
+ETHACETOOH = IGNORE ;
+HM22C3NO3 = IGNORE ;
+C7DCO = IGNORE ;
+HO12C5 = IGNORE ;
+NCRESO2 = IGNORE ;
+C6CO134PAN = IGNORE ;
+PE2ENEANO3 = IGNORE ;
+METLQOH = IGNORE ;
+MCATEC1O = IGNORE ;
+PXYOLOH = IGNORE ;
+CO2C54CO2H = IGNORE ;
+METLQO2 = IGNORE ;
+PETOLOOH = IGNORE ;
+TC4H9O = IGNORE ;
+H3C25CCO2H = IGNORE ;
+H3C25C6OOH = IGNORE ;
+NCRESOH = IGNORE ;
+OETHTOL = IGNORE ;
+C829NO3 = IGNORE ;
+C811O2 = IGNORE ;
+HNMVKO = IGNORE ;
+OTNCATECO2 = IGNORE ;
+MMF = IGNORE ;
+C610NO3 = IGNORE ;
+NORPINAL = IGNORE ;
+C6H5CH2NO3 = IGNORE ;
+CLETO2H = IGNORE ;
+C95OOH = IGNORE ;
+H3C25C6PAN = IGNORE ;
+DNEBNZLO = IGNORE ;
+PETOLO = IGNORE ;
+C23O3CCO2H = IGNORE ;
+PEANO3 = IGNORE ;
+HYPROPO2H = IGNORE ;
+METLMUCNO3 = IGNORE ;
+C9M3CO = IGNORE ;
+T124CATECH = IGNORE ;
+NDMMALYOOH = IGNORE ;
+INCNCHO = IGNORE ;
+C7MCO2OOH = IGNORE ;
+C57O = IGNORE ;
+H3M2C4CO3H = IGNORE ;
+OXYBIPENO3 = IGNORE ;
+DMEBMUOOH = IGNORE ;
+NC61CO3H = IGNORE ;
+C517OOH = IGNORE ;
+CHOBR = IGNORE ;
+MTNNCATCO = IGNORE ;
+C89PAN = IGNORE ;
+C52NO31OOH = IGNORE ;
+NT124L1OOH = IGNORE ;
+CHOC4DOLO = IGNORE ;
+C134OOH = IGNORE ;
+C734O = IGNORE ;
+C2H5O = IGNORE ;
+APINOOB = IGNORE ;
+APINOOA = IGNORE ;
+C3M3OH2CO3 = IGNORE ;
+NDNMXYOLO = IGNORE ;
+C113OOH = IGNORE ;
+HO7CO10C12 = IGNORE ;
+DNPHENOOH = IGNORE ;
+ECO4 = IGNORE ;
+C62CO3 = IGNORE ;
+H2M4C65OOH = IGNORE ;
+C518CO3 = IGNORE ;
+NBUACAOOH = IGNORE ;
+C148O = IGNORE ;
+C103OOH = IGNORE ;
+ME3BUT1ENE = IGNORE ;
+H13CO2CO3H = IGNORE ;
+IPRCHO = IGNORE ;
+CO24C6O = IGNORE ;
+DNMETOLOOH = IGNORE ;
+C65NO36O2 = IGNORE ;
+PHCHOO = IGNORE ;
+IECCHO = IGNORE ;
+M3PEAOOH = IGNORE ;
+M3PEBOOH = IGNORE ;
+MC3CODBPAN = IGNORE ;
+IPROMC2NO3 = IGNORE ;
+OETLBPR2OH = IGNORE ;
+OETLBIPNO3 = IGNORE ;
+C5O45OHCO3 = IGNORE ;
+HO3C5CHO = IGNORE ;
+PROL11MO2 = IGNORE ;
+MALANHYO2 = IGNORE ;
+DMEPHOLOOH = IGNORE ;
+NDMMALYO2 = IGNORE ;
+NPBFUO2 = IGNORE ;
+LMKBO2 = IGNORE ;
+CO25C6O2 = IGNORE ;
+HO13C4NO3 = IGNORE ;
+C4DBDIKET = IGNORE ;
+APINBCO = IGNORE ;
+TLFUONE = IGNORE ;
+C64OH5OOH = IGNORE ;
+C617CHO = IGNORE ;
+C136NO3 = IGNORE ;
+MMALNHYOOH = IGNORE ;
+NC4H9O2 = IGNORE ;
+CO25C6OH = IGNORE ;
+LMKBOO = IGNORE ;
+CO234C6OOH = IGNORE ;
+C3DBCO3H = IGNORE ;
+C7BDICARB = IGNORE ;
+PETLBIPNO3 = IGNORE ;
+C525O = IGNORE ;
+MTBKOOH = IGNORE ;
+C52OH1OOH = IGNORE ;
+HO24C5OOH = IGNORE ;
+HO3C96NO3 = IGNORE ;
+GAOO = IGNORE ;
+BOXCOCHOO = IGNORE ;
+PXYLCO3H = IGNORE ;
+BUT2OLNO3 = IGNORE ;
+T124CT1OOH = IGNORE ;
+M3C4CO3H = IGNORE ;
+C628O = IGNORE ;
+C51O2 = IGNORE ;
+IECPAN = IGNORE ;
+HIEB1O = IGNORE ;
+INB1HPCO3H = IGNORE ;
+BPINENE = IGNORE ;
+C107OOH = IGNORE ;
+C51OH = IGNORE ;
+LMLKBO = IGNORE ;
+CH2CLO2 = IGNORE ;
+C142OH = IGNORE ;
+MMALNBPAN = IGNORE ;
+PBFUO = IGNORE ;
+C3ME3CHO = IGNORE ;
+MXYFUOOH = IGNORE ;
+CHOC2CO2H = IGNORE ;
+MEKCO = IGNORE ;
+C618CO3H = IGNORE ;
+C613O = IGNORE ;
+C612O2 = IGNORE ;
+EMALANHYO = IGNORE ;
+PHENOOH = IGNORE ;
+CHCL2CL2O = IGNORE ;
+NPETOLO = IGNORE ;
+ETOMECO2H = IGNORE ;
+C5124COCO3 = IGNORE ;
+BCBO = IGNORE ;
+COHM2CO3 = IGNORE ;
+CH3CHCLOOH = IGNORE ;
+C4M22CONO3 = IGNORE ;
+LIMKET = IGNORE ;
+HO2C43CHO = IGNORE ;
+METOH = IGNORE ;
+HNO3 = IGNORE ;
+PETLPOXMUC = IGNORE ;
+C53NO32CO = IGNORE ;
+C514NO3 = IGNORE ;
+PPEN = IGNORE ;
+C612OH = IGNORE ;
+C6H5C2OOH = IGNORE ;
+C76O = IGNORE ;
+MO2EOLANO3 = IGNORE ;
+DMPHOHNO2 = IGNORE ;
+EOCOCHO = IGNORE ;
+IPEBOH = IGNORE ;
+OETOLOOH = IGNORE ;
+ACCOPRONE = IGNORE ;
+C523OH = IGNORE ;
+CHCL2CL2O2 = IGNORE ;
+M2PECOH = IGNORE ;
+H13M3CO4C5 = IGNORE ;
+NC826O = IGNORE ;
+COHM2PAN = IGNORE ;
+CO45C5CHO = IGNORE ;
+CHOOCH2O2 = IGNORE ;
+C98O = IGNORE ;
+C7BDCO2 = IGNORE ;
+C64OH5NO3 = IGNORE ;
+C7BDCOH = IGNORE ;
+NMBOBO2 = IGNORE ;
+CHOOCH2OH = IGNORE ;
+CH3COCCLO2 = IGNORE ;
+CHCL2CH2O2 = IGNORE ;
+IBUTDIAL = IGNORE ;
+PBZBIPERO = IGNORE ;
+M2PECO2 = IGNORE ;
+CHCL2CL2OH = IGNORE ;
+C729CO3H = IGNORE ;
+IPEBO2 = IGNORE ;
+PRPAL2CO3H = IGNORE ;
+ETACETOH = IGNORE ;
+C1310CO = IGNORE ;
+LIMALNO3 = IGNORE ;
+UDECOOH = IGNORE ;
+CO356OCO = IGNORE ;
+C84OOH = IGNORE ;
+HO2M2C4O2 = IGNORE ;
+NC4H9NO3 = IGNORE ;
+CH3CCH3OOA = IGNORE ;
+NMXYOL1O = IGNORE ;
+NC102O2 = IGNORE ;
+ACCOMCOMO = IGNORE ;
+CL12PRBO = IGNORE ;
+IPBFUONE = IGNORE ;
+NAPINAOOH = IGNORE ;
+C101O = IGNORE ;
+NLIMO = IGNORE ;
+LIMALO2 = IGNORE ;
+C72OH = IGNORE ;
+METACETO2H = IGNORE ;
+DM123O2 = IGNORE ;
+COCCOHNO3 = IGNORE ;
+CH3CCL2OH = IGNORE ;
+HCOCH2OOH = IGNORE ;
+MCOCOMOOOH = IGNORE ;
+C63NO32CO = IGNORE ;
+C720OOH = IGNORE ;
+C7M6CO2OOH = IGNORE ;
+C7M6CO2OH = IGNORE ;
+NBZFUONE = IGNORE ;
+DMCO = IGNORE ;
+C7M6CO2O2 = IGNORE ;
+ETOMENO3 = IGNORE ;
+NIPBNZOLO2 = IGNORE ;
+BUT2CHO = IGNORE ;
+HO2C3CHO = IGNORE ;
+CH3CCL2O2 = IGNORE ;
+NOPINOOA = IGNORE ;
+C43NO34OOH = IGNORE ;
+EPXM2DCO3H = IGNORE ;
+C72O2 = IGNORE ;
+COCCOHCO = IGNORE ;
+IP3ODBCO2H = IGNORE ;
+C23O3ECHO = IGNORE ;
+LIMALOH = IGNORE ;
+C7CO3OHO = IGNORE ;
+PE1ENEAO = IGNORE ;
+BUFORMO = IGNORE ;
+NDMMALYO = IGNORE ;
+C23O3CCHO = IGNORE ;
+INDHPCHO = IGNORE ;
+DMMALYOH = IGNORE ;
+C734CO = IGNORE ;
+HO1MC5O = IGNORE ;
+TM123BNO3 = IGNORE ;
+MBOBO = IGNORE ;
+DMMALYO = IGNORE ;
+C23O3MOH = IGNORE ;
+C65NO36CO3 = IGNORE ;
+C78OOH = IGNORE ;
+C4M2NO3OOH = IGNORE ;
+C721OOH = IGNORE ;
+PBZMUCCO2H = IGNORE ;
+INCNPAN = IGNORE ;
+C4CO2O2 = IGNORE ;
+HO3C4CHO = IGNORE ;
+IPEAOOH = IGNORE ;
+NBUTOLAOOH = IGNORE ;
+OETLQO = IGNORE ;
+OETLPOXMUC = IGNORE ;
+DMMALYO2 = IGNORE ;
+C5124COPAN = IGNORE ;
+HOC6H4NO2 = IGNORE ;
+C4CO2DBCO3 = IGNORE ;
+C66NO35O2 = IGNORE ;
+DECOOH = IGNORE ;
+C51O = IGNORE ;
+MBOANO3 = IGNORE ;
+MNCATECH = IGNORE ;
+C8BCOH = IGNORE ;
+MNCATECO = IGNORE ;
+INB1OH = IGNORE ;
+IPRCOMO = IGNORE ;
+MO2EOLAO2 = IGNORE ;
+NC5MDCO2H = IGNORE ;
+EBZBIPERO2 = IGNORE ;
+C116CHO = IGNORE ;
+PEAO2 = IGNORE ;
+NOPINCNO3 = IGNORE ;
+MPRKAOOH = IGNORE ;
+C8CO3OHO2 = IGNORE ;
+CO2M33CO3H = IGNORE ;
+CHOC2CO3 = IGNORE ;
+HO3C6OOH = IGNORE ;
+INB1O2 = IGNORE ;
+C1011OOH = IGNORE ;
+DMCOOH = IGNORE ;
+C8BCO2 = IGNORE ;
+HO1CO34C5 = IGNORE ;
+HO3C106O = IGNORE ;
+LIMCNO3 = IGNORE ;
+DNMETOL = IGNORE ;
+NMGLYOX = IGNORE ;
+HM22C3OOH = IGNORE ;
+STYRENO = IGNORE ;
+STYRENE = IGNORE ;
+BRETO3H = IGNORE ;
+CO25C6CO3H = IGNORE ;
+C87OH = IGNORE ;
+C823O = IGNORE ;
+IPROMCCHO = IGNORE ;
+CH3SO = IGNORE ;
+CO23C54OOH = IGNORE ;
+C46CO3H = IGNORE ;
+C87O2 = IGNORE ;
+BUTONENO3 = IGNORE ;
+C5CO2OHCO3 = IGNORE ;
+PERPINONIC = IGNORE ;
+NC4DCO2 = IGNORE ;
+C830CO3H = IGNORE ;
+ECATEC1O2 = IGNORE ;
+CHOCOCH2O = IGNORE ;
+C88OH = IGNORE ;
+C108O2 = IGNORE ;
+C519O2 = IGNORE ;
+H2C3OCO2 = IGNORE ;
+BRETAL = IGNORE ;
+HEXBO = IGNORE ;
+CHCL3O = IGNORE ;
+C68NO3 = IGNORE ;
+C108OH = IGNORE ;
+BZBIPER2OH = IGNORE ;
+C88O2 = IGNORE ;
+ETBEACO3H = IGNORE ;
+C6CO3HO14 = IGNORE ;
+HMPAN = IGNORE ;
+C7EDCO = IGNORE ;
+OETLMUCO2 = IGNORE ;
+HO1CO3CHO = IGNORE ;
+H2C3OCNO3 = IGNORE ;
+H13M3C5NO3 = IGNORE ;
+C4CONO3OOH = IGNORE ;
+C6O4KETOOH = IGNORE ;
+ACEBUTONE = IGNORE ;
+C147OOH = IGNORE ;
+DIIPRETNO3 = IGNORE ;
+C131CO2H = IGNORE ;
+C645OH = IGNORE ;
+NMXYFUO = IGNORE ;
+CY6DIONOOH = IGNORE ;
+MTBEBOOH = IGNORE ;
+NC4IPDCO2H = IGNORE ;
+MIBKHO4O2 = IGNORE ;
+H3NCO2CHO = IGNORE ;
+C7DDCCO3H = IGNORE ;
+MEKAO = IGNORE ;
+C828O = IGNORE ;
+C7ADCCO2 = IGNORE ;
+C7ADCCO3 = IGNORE ;
+C6H5O2 = IGNORE ;
+EBFUCO = IGNORE ;
+INCCO = IGNORE ;
+PEBNO3 = IGNORE ;
+C923O = IGNORE ;
+MC7CO2OOH = IGNORE ;
+C512CO3 = IGNORE ;
+C4ME2OHO = IGNORE ;
+PRONFORM = IGNORE ;
+LIMALBOOH = IGNORE ;
+DMEBPR2OH = IGNORE ;
+CH3OCH3 = IGNORE ;
+NDNPETOLO2 = IGNORE ;
+H3M3C6O2 = IGNORE ;
+HEX3ONCOOH = IGNORE ;
+MIPKAOOH = IGNORE ;
+C7CO3OHO2 = IGNORE ;
+C1211OOH = IGNORE ;
+NAPINAO = IGNORE ;
+C812O2 = IGNORE ;
+MIBKAOOH = IGNORE ;
+EMPHPAN = IGNORE ;
+OXYOLOOH = IGNORE ;
+C4M2ALOHO2 = IGNORE ;
+M3BUTAL2O = IGNORE ;
+DETLBPROOH = IGNORE ;
+NMXYOLO = IGNORE ;
+H25M2C6 = IGNORE ;
+C812OH = IGNORE ;
+OXYLAL = IGNORE ;
+C105O2 = IGNORE ;
+C5CO23O2 = IGNORE ;
+C718CO2H = IGNORE ;
+HOC4H8OH = IGNORE ;
+OXCATEC1O2 = IGNORE ;
+NBPINBO2 = IGNORE ;
+BOX2OHAOOH = IGNORE ;
+IPCATC1OOH = IGNORE ;
+C515PAN = IGNORE ;
+SA = IGNORE ;
+CH3OCHO = IGNORE ;
+C6DIAL = IGNORE ;
+C6NO3COOOH = IGNORE ;
+C6EO2OHCO3 = IGNORE ;
+DNT123LOOH = IGNORE ;
+PXNCATECO2 = IGNORE ;
+EIPEOH = IGNORE ;
+M2PEDOOH = IGNORE ;
+PRNO3PAN = IGNORE ;
+C6O4KETO = IGNORE ;
+C129OH = IGNORE ;
+C4ME2OHOOH = IGNORE ;
+MIPKBOH = IGNORE ;
+C4MCONO3O = IGNORE ;
+NC4MDCO2 = IGNORE ;
+INCO = IGNORE ;
+H25M3C6 = IGNORE ;
+MIPKBO2 = IGNORE ;
+ME3BUOLOOH = IGNORE ;
+MTCATECOOA = IGNORE ;
+EPXKTMCO2H = IGNORE ;
+HO3C96O = IGNORE ;
+C152O = IGNORE ;
+EIPEO2 = IGNORE ;
+CH3O2NO2 = IGNORE ;
+C136OOH = IGNORE ;
+C88CO3 = IGNORE ;
+C823CO3 = IGNORE ;
+NMBOBOOH = IGNORE ;
+C103O = IGNORE ;
+DIEKAOH = IGNORE ;
+C66NO35OH = IGNORE ;
+HOC2H4CHO = IGNORE ;
+PHIC3OH = IGNORE ;
+HEXAOH = IGNORE ;
+PHCOMEOOH = IGNORE ;
+C141CO2H = IGNORE ;
+C4DBMEPAN = IGNORE ;
+DNMXYOL = IGNORE ;
+SBUACETAO = IGNORE ;
+C3ME3CO2H = IGNORE ;
+HEXAO2 = IGNORE ;
+PHIC3O2 = IGNORE ;
+C61CO3 = IGNORE ;
+PXNCATCOOH = IGNORE ;
+HOIPRCO3 = IGNORE ;
+PE1ENEBNO3 = IGNORE ;
+DIEKAO2 = IGNORE ;
+APINBNO3 = IGNORE ;
+OETLBIPRO2 = IGNORE ;
+HCOOH = IGNORE ;
+C58NO3PAN = IGNORE ;
+BZFUONE = IGNORE ;
+NMEBFUO = IGNORE ;
+C5CO23CHO = IGNORE ;
+C4CHOAOOH = IGNORE ;
+C4ME3HO12 = IGNORE ;
+BPINBO = IGNORE ;
+HO3C126O = IGNORE ;
+C718NO3 = IGNORE ;
+C810NO3 = IGNORE ;
+C710O2 = IGNORE ;
+HOCH2CO3 = IGNORE ;
+C917OOH = IGNORE ;
+CH2OOG = IGNORE ;
+CH2OOF = IGNORE ;
+CH2OOE = IGNORE ;
+CH2OOD = IGNORE ;
+CH2OOC = IGNORE ;
+CH2OOB = IGNORE ;
+CH2OOA = IGNORE ;
+CO3H4CO3H = IGNORE ;
+C63OOH = IGNORE ;
+C4NO3CHO = IGNORE ;
+SO2 = IGNORE ;
+PETLBIPRO = IGNORE ;
+BUT2OLO = IGNORE ;
+NMETOL1O = IGNORE ;
+C511OOH = IGNORE ;
+MC4CODBCO2 = IGNORE ;
+MC4CODBCO3 = IGNORE ;
+PRCOOMO = IGNORE ;
+ETOMEO = IGNORE ;
+CLOHCO2H = IGNORE ;
+NBUACBOOH = IGNORE ;
+PXYMUCOOH = IGNORE ;
+MPRBNO3O = IGNORE ;
+C53O = IGNORE ;
+C828CO3 = IGNORE ;
+MEKAO2 = IGNORE ;
+IPNNCATCO2 = IGNORE ;
+PE2ONE1OOH = IGNORE ;
+MC7CO2O2 = IGNORE ;
+METLBIPRO = IGNORE ;
+C68O = IGNORE ;
+ACETMECO3H = IGNORE ;
+MC7CO2OH = IGNORE ;
+LIMALAOOH = IGNORE ;
+MEKAOH = IGNORE ;
+C65OOH = IGNORE ;
+C7DCOOH = IGNORE ;
+PROL1MCHO = IGNORE ;
+C4MCO2O = IGNORE ;
+H1CO23CHO = IGNORE ;
+NMXYFUOOH = IGNORE ;
+DMSO2 = IGNORE ;
+HEX3ONE = IGNORE ;
+C929O = IGNORE ;
+HOC4CHOO = IGNORE ;
+C126OOH = IGNORE ;
+MPHCOMEOOH = IGNORE ;
+C82O = IGNORE ;
+C617OH = IGNORE ;
+DIEKAO = IGNORE ;
+NLIMOOH = IGNORE ;
+CH3CCL2O = IGNORE ;
+C821O = IGNORE ;
+C522CO2H = IGNORE ;
+C7DCCO3H = IGNORE ;
+CHCL2CHCL2 = IGNORE ;
+HOCH2CH2O2 = IGNORE ;
+NSTYRENEO = IGNORE ;
+CO12C4CHO = IGNORE ;
+IEAPAN = IGNORE ;
+C617O2 = IGNORE ;
+DETLMUCO = IGNORE ;
+BUTALNO3 = IGNORE ;
+DE35TNO3 = IGNORE ;
+C729O = IGNORE ;
+ME3BUOL = IGNORE ;
+COC4NO3OOH = IGNORE ;
+NCATECHOL = IGNORE ;
+ETBEAPAN = IGNORE ;
+C622CO3 = IGNORE ;
+MACROHO2 = IGNORE ;
+C629OOA = IGNORE ;
+C127OOH = IGNORE ;
+ETOLNO3 = IGNORE ;
+NPXYQOOH = IGNORE ;
+H1C23C4CO3 = IGNORE ;
+C823CO3H = IGNORE ;
+ETACETNO3 = IGNORE ;
+C711OOH = IGNORE ;
+INB1NO3 = IGNORE ;
+BUTALAO2 = IGNORE ;
+CH3CO2H = IGNORE ;
+CL2OHCHO = IGNORE ;
+EMPHCOMOOH = IGNORE ;
+C3COCCHO = IGNORE ;
+APINAOOH = IGNORE ;
+IPMLNHYOOH = IGNORE ;
+CO25C6 = IGNORE ;
+CO25C7 = IGNORE ;
+C928O2 = IGNORE ;
+C4CHOBNO3 = IGNORE ;
+C715OOH = IGNORE ;
+C5DBCOCO2H = IGNORE ;
+HO3C4O2 = IGNORE ;
+C6CO3OH5O = IGNORE ;
+NMETOL1OOH = IGNORE ;
+C3DIALO2 = IGNORE ;
+EPXEKTCO2H = IGNORE ;
+EMPHOOH = IGNORE ;
+ACETMEPAN = IGNORE ;
+CPENT2ENE = IGNORE ;
+NORLIMOOH = IGNORE ;
+DNOETOLO = IGNORE ;
+MCOOTBO = IGNORE ;
+NOPINBOOH = IGNORE ;
+NDNT123OOH = IGNORE ;
+C928OH = IGNORE ;
+HO3C4OOH = IGNORE ;
+C114OOH = IGNORE ;
+C519OOH = IGNORE ;
+BOX2E2OH = IGNORE ;
+NBUTOLBNO3 = IGNORE ;
+ECO3CO3 = IGNORE ;
+INB2O2 = IGNORE ;
+BCALCCO = IGNORE ;
+TM123OLO = IGNORE ;
+C624O = IGNORE ;
+C6O4KETO2 = IGNORE ;
+PBENZOOH = IGNORE ;
+CH3COCL = IGNORE ;
+NIPRBQO2 = IGNORE ;
+M2BUOL2NO3 = IGNORE ;
+DNT124LOOH = IGNORE ;
+DIETETOH = IGNORE ;
+PINONIC = IGNORE ;
+C1211CO2H = IGNORE ;
+C2OHOCO2H = IGNORE ;
+C85OOH = IGNORE ;
+ISOPBOH = IGNORE ;
+C135O2 = IGNORE ;
+HOBUT2CO2H = IGNORE ;
+CCL3CO3H = IGNORE ;
+BCALCO = IGNORE ;
+C69OOH = IGNORE ;
+ISOPBO2 = IGNORE ;
+C6COCHOO2 = IGNORE ;
+BOXPR2OH = IGNORE ;
+C6TRONOHO = IGNORE ;
+C126OOA = IGNORE ;
+M3HEXBO = IGNORE ;
+DIIPRETO = IGNORE ;
+PHPTN = IGNORE ;
+PRONFORMO = IGNORE ;
+MCOOTBNO3 = IGNORE ;
+PBZMUCO2 = IGNORE ;
+C5134CO2OH = IGNORE ;
+CHCL2CO3 = IGNORE ;
+C4CONO3O = IGNORE ;
+H3M3C6O = IGNORE ;
+C519O = IGNORE ;
+OCTNO3 = IGNORE ;
+INAO = IGNORE ;
+C76O2 = IGNORE ;
+NC524O = IGNORE ;
+TMBCO2H = IGNORE ;
+C151O = IGNORE ;
+DMEBMUO3H = IGNORE ;
+CH2CL3O = IGNORE ;
+NCATECO2 = IGNORE ;
+M2PEANO3 = IGNORE ;
+EOX2OLAOOH = IGNORE ;
+M22C4NO3 = IGNORE ;
+C51OH2CO = IGNORE ;
+INAHPCO3H = IGNORE ;
+PBZMUCOH = IGNORE ;
+C105O = IGNORE ;
+CHCL2CH2O = IGNORE ;
+C721CO3 = IGNORE ;
+IPRMEETO2 = IGNORE ;
+IPBENZOOH = IGNORE ;
+HYPROPO2 = IGNORE ;
+MVKO2 = IGNORE ;
+PHCOCOME = IGNORE ;
+EBZBPER2OH = IGNORE ;
+OXYMUCCO3H = IGNORE ;
+C5CO234OOH = IGNORE ;
+MVKOH = IGNORE ;
+C89OOH = IGNORE ;
+ACETC2CO3 = IGNORE ;
+MVKOO = IGNORE ;
+C8DBCO2PAN = IGNORE ;
+C721O2 = IGNORE ;
+NNCATECO = IGNORE ;
+NC3CO2H = IGNORE ;
+NCRESOOH = IGNORE ;
+IPRMEETOH = IGNORE ;
+NMETOLOH = IGNORE ;
+CH3COPAN = IGNORE ;
+TM135BPOOH = IGNORE ;
+C619OOH = IGNORE ;
+C519CO2H = IGNORE ;
+TBOCOCH2O2 = IGNORE ;
+TBOCOCH2OH = IGNORE ;
+NC72OOH = IGNORE ;
+PTCATEC1O2 = IGNORE ;
+OXYMUCO = IGNORE ;
+NDEMPLOOH = IGNORE ;
+C622CO3H = IGNORE ;
+BOXCOALOOH = IGNORE ;
+HO25C7 = IGNORE ;
+HO25C6 = IGNORE ;
+DMEBIPRO = IGNORE ;
+C5124COO = IGNORE ;
+NMETOLO2 = IGNORE ;
+HO2C54O2 = IGNORE ;
+PROL11MOOH = IGNORE ;
+BZOBIPEROH = IGNORE ;
+NO3CH2CO2H = IGNORE ;
+C51NO32O = IGNORE ;
+HOC3H6CHO = IGNORE ;
+C618CO3 = IGNORE ;
+NIPRBQO = IGNORE ;
+ACCOCOMEO2 = IGNORE ;
+NMEBFUO2 = IGNORE ;
+C42CHO = IGNORE ;
+CLCO2H = IGNORE ;
+H2M5C65OOH = IGNORE ;
+C4M3NO32O = IGNORE ;
+HOC4CHOOOH = IGNORE ;
+MALDIALO2 = IGNORE ;
+HEX3ONDNO3 = IGNORE ;
+M2HEXBO = IGNORE ;
+BOXMCO2H = IGNORE ;
+MTBEAO = IGNORE ;
+C1012OH = IGNORE ;
+C69OH = IGNORE ;
+MXYEPOXMUC = IGNORE ;
+CO235C6CO3 = IGNORE ;
+PHCOET = IGNORE ;
+BCKBO = IGNORE ;
+OETOLO2 = IGNORE ;
+NC7H16 = IGNORE ;
+C145O2 = IGNORE ;
+CH2CLCH2OH = IGNORE ;
+C827O = IGNORE ;
+NOXYOLO = IGNORE ;
+EOX2COMEOH = IGNORE ;
+CH2CLCH2O2 = IGNORE ;
+C145OH = IGNORE ;
+EPXMEDCO3H = IGNORE ;
+C106NO3 = IGNORE ;
+OETOLOH = IGNORE ;
+C41OH = IGNORE ;
+NPROACEBO = IGNORE ;
+MBOAO2 = IGNORE ;
+C732OOH = IGNORE ;
+C1012O2 = IGNORE ;
+C69O2 = IGNORE ;
+C615CO2O = IGNORE ;
+C615CO2H = IGNORE ;
+CO1C6O = IGNORE ;
+C5CO234O = IGNORE ;
+ECATECHOL = IGNORE ;
+C7ADCOOH = IGNORE ;
+C924OOH = IGNORE ;
+PRONFORMO2 = IGNORE ;
+IC4H9NO3 = IGNORE ;
+C131O = IGNORE ;
+C8CO3OHO = IGNORE ;
+NBUACCNO3 = IGNORE ;
+PROPACID = IGNORE ;
+IBUTOLBO2 = IGNORE ;
+PINALO = IGNORE ;
+NC1313O = IGNORE ;
+C1210NO3 = IGNORE ;
+C5EDBPAN = IGNORE ;
+DMMBOOH = IGNORE ;
+HO5C6CO3H = IGNORE ;
+METACETHO = IGNORE ;
+MXYMUCCO2H = IGNORE ;
+C524NO3 = IGNORE ;
+C14O3PCHO = IGNORE ;
+C67NO3 = IGNORE ;
+PETHTOL = IGNORE ;
+M3PECNO3 = IGNORE ;
+MC6CO2O = IGNORE ;
+CO2C5OH = IGNORE ;
+C7M2CO5O = IGNORE ;
+MTBEALCO2H = IGNORE ;
+C3MCOCO2H = IGNORE ;
+C65OH4O = IGNORE ;
+C5CO23OOH = IGNORE ;
+NONO2 = IGNORE ;
+NONOH = IGNORE ;
+C23C54CHO = IGNORE ;
+CO2M33CHO = IGNORE ;
+H3M3C4CO3 = IGNORE ;
+ETBEBO2 = IGNORE ;
+TM123BPRO2 = IGNORE ;
+NBUTDBOOH = IGNORE ;
+C92O2 = IGNORE ;
+C822CO2H = IGNORE ;
+C924CO = IGNORE ;
+C619O = IGNORE ;
+OXYMUCO2 = IGNORE ;
+C716O2 = IGNORE ;
+BUOHFORM = IGNORE ;
+TM135MUPAN = IGNORE ;
+INCOH = IGNORE ;
+PRCOOPROL = IGNORE ;
+INCO2 = IGNORE ;
+NOXYQOOH = IGNORE ;
+C716OH = IGNORE ;
+TM124O = IGNORE ;
+C4MCO2OOH = IGNORE ;
+OXYMUCOH = IGNORE ;
+C626O = IGNORE ;
+TM124B = IGNORE ;
+C121O2 = IGNORE ;
+METLQONE = IGNORE ;
+MXYOLO = IGNORE ;
+OXYL1OOH = IGNORE ;
+TM124MUCO = IGNORE ;
+H3M3C6OOH = IGNORE ;
+C619CO = IGNORE ;
+TMBOOH = IGNORE ;
+HO3C126OOH = IGNORE ;
+BCKBNO3 = IGNORE ;
+C4NO32MOOH = IGNORE ;
+BPINANO3 = IGNORE ;
+C626CO2H = IGNORE ;
+EGLYOOB = IGNORE ;
+BUTDCOOH = IGNORE ;
+T124NCATO = IGNORE ;
+M22C43OH = IGNORE ;
+M22C43O2 = IGNORE ;
+NC3H7OOH = IGNORE ;
+BCALAO = IGNORE ;
+M2BKAO = IGNORE ;
+DETLMUNO3 = IGNORE ;
+ACROO = IGNORE ;
+DNOETOL = IGNORE ;
+PINALNO3 = IGNORE ;
+PE2ENEBNO3 = IGNORE ;
+DIEKAOOH = IGNORE ;
+C3M3OHCO3H = IGNORE ;
+C136CO3H = IGNORE ;
+C7CO2DBPAN = IGNORE ;
+IEB1O = IGNORE ;
+ETOMEOH = IGNORE ;
+CO1M22PAN = IGNORE ;
+PETLQOOH = IGNORE ;
+C42CHO2O = IGNORE ;
+C23O3MCPAN = IGNORE ;
+TLEMUCO = IGNORE ;
+PRCOOMO2 = IGNORE ;
+C511CO3 = IGNORE ;
+T123CAT1O2 = IGNORE ;
+METHCOACET = IGNORE ;
+PXYLNO3 = IGNORE ;
+CL12PRAOOH = IGNORE ;
+KLIMONIC = IGNORE ;
+TLEMUCCO3 = IGNORE ;
+MC6CO2OOH = IGNORE ;
+C107O = IGNORE ;
+MALDIALO = IGNORE ;
+C830OOH = IGNORE ;
+NT124L1O2 = IGNORE ;
+DNT124LO = IGNORE ;
+C143OOH = IGNORE ;
+M2BUOL2OOH = IGNORE ;
+TM124OOH = IGNORE ;
+MXYMUCO2 = IGNORE ;
+HO2C54CO2H = IGNORE ;
+C58NO3CO2H = IGNORE ;
+MXYMUCOH = IGNORE ;
+C7DCCO2 = IGNORE ;
+C7DCCO3 = IGNORE ;
+C116CO = IGNORE ;
+C821O2 = IGNORE ;
+C6H5O = IGNORE ;
+C512OOH = IGNORE ;
+HCOC5 = IGNORE ;
+C113NO3 = IGNORE ;
+MBKCOOHOOH = IGNORE ;
+PHIC3OOH = IGNORE ;
+C7EDCO2 = IGNORE ;
+EPXMKTCO2H = IGNORE ;
+PBFUO2 = IGNORE ;
+BCKBO2 = IGNORE ;
+C4MOHOCO3 = IGNORE ;
+TLFUO2 = IGNORE ;
+C139OH = IGNORE ;
+H2MC5NO3 = IGNORE ;
+IPEANO3 = IGNORE ;
+OCCOHCOH = IGNORE ;
+NDNIPBZLO2 = IGNORE ;
+NDNMXYOLO2 = IGNORE ;
+OCCOHCO2 = IGNORE ;
+C59O2 = IGNORE ;
+TLFUOH = IGNORE ;
+C139O2 = IGNORE ;
+C112O2 = IGNORE ;
+NMXYFUO2 = IGNORE ;
+MTBEACHOO = IGNORE ;
+CHCL2PAN = IGNORE ;
+C23O3MCO3H = IGNORE ;
+BCKBOO = IGNORE ;
+C7EDCOH = IGNORE ;
+HPNC524CO = IGNORE ;
+PBFUOH = IGNORE ;
+ACCOMECHO = IGNORE ;
+COO2C3CO3 = IGNORE ;
+OXYLO = IGNORE ;
+HMVKBO2 = IGNORE ;
+IPRACBCO2H = IGNORE ;
+BIACET = IGNORE ;
+DMEBMUPAN = IGNORE ;
+APINAO2 = IGNORE ;
+HCOCO3H = IGNORE ;
+NOXYOLOOH = IGNORE ;
+OXYBPEROOH = IGNORE ;
+C3ME3CHOO2 = IGNORE ;
+C7MOCOCO3H = IGNORE ;
+DETLBIPRO = IGNORE ;
+C64O = IGNORE ;
+M33C3CHO = IGNORE ;
+NOETOL1O2 = IGNORE ;
+PRONOCOMO2 = IGNORE ;
+LIMONONIC = IGNORE ;
+C65NO36OOH = IGNORE ;
+NBPINBO = IGNORE ;
+NC91CO3H = IGNORE ;
+C4MOHOCO3H = IGNORE ;
+ENCATECOOH = IGNORE ;
+EOX2EOLBO = IGNORE ;
+C5CO34CO3 = IGNORE ;
+PBZQCO = IGNORE ;
+C86O = IGNORE ;
+PRCOOPRONE = IGNORE ;
+NONO = IGNORE ;
+CH3OOH = IGNORE ;
+CH3SCH2OOH = IGNORE ;
+H2MC5O = IGNORE ;
+CH2CLO = IGNORE ;
+CO3C85O = IGNORE ;
+CH2CL2 = IGNORE ;
+PHENO = IGNORE ;
+IPRACBNO3 = IGNORE ;
+C2H6 = IGNORE ;
+C2H4 = IGNORE ;
+C2H2 = IGNORE ;
+C6CO2M2OH = IGNORE ;
+CO13C4OH = IGNORE ;
+HM33C3O = IGNORE ;
+MPRBNO3CO3 = IGNORE ;
+C626CHO = IGNORE ;
+OXYMUCPAN = IGNORE ;
+C728OH = IGNORE ;
+C712OOH = IGNORE ;
+INANCO = IGNORE ;
+NC728O2 = IGNORE ;
+CH3COCLOOH = IGNORE ;
+C4NO3COOOH = IGNORE ;
+C133O = IGNORE ;
+CBUT2ENE = IGNORE ;
+DNOXYOL = IGNORE ;
+C65NO3PAN = IGNORE ;
+NDNOETOLO2 = IGNORE ;
+COO2C3CO3H = IGNORE ;
+HM2C43CO3H = IGNORE ;
+CO1H63OOH = IGNORE ;
+NC728OH = IGNORE ;
+HO3C5OOH = IGNORE ;
+C728O2 = IGNORE ;
+HO14CO2C4 = IGNORE ;
+MO2EOLAOOH = IGNORE ;
+HO2C54OOH = IGNORE ;
+C41NO3 = IGNORE ;
+PPN = IGNORE ;
+PXYLAL = IGNORE ;
+CO1C6O2 = IGNORE ;
+HEX3ONDOOH = IGNORE ;
+C727O2 = IGNORE ;
+IPBENZO2 = IGNORE ;
+C915OOH = IGNORE ;
+TBUT2ENE = IGNORE ;
+CO36C9 = IGNORE ;
+CO1C6OH = IGNORE ;
+IPBENZOL = IGNORE ;
+MALANHYO = IGNORE ;
+CHOOMCO3H = IGNORE ;
+TM124BCO2H = IGNORE ;
+DNT124LO2 = IGNORE ;
+MO2EOLBOOH = IGNORE ;
+NDNIPBLOOH = IGNORE ;
+H2M5C65NO3 = IGNORE ;
+NPBNZ1O = IGNORE ;
+PBENZOLOH = IGNORE ;
+PETOLOH = IGNORE ;
+NEBFUO = IGNORE ;
+NC4DCO2H = IGNORE ;
+BR = IGNORE ;
+PETLMUCO3H = IGNORE ;
+C116CO2H = IGNORE ;
+C42NO33O = IGNORE ;
+C914OOH = IGNORE ;
+LMLKAO2 = IGNORE ;
+APINCO = IGNORE ;
+LMLKAOH = IGNORE ;
+CHOC4OHOOH = IGNORE ;
+IPRBQOH = IGNORE ;
+CH3SO2OOH = IGNORE ;
+EPXMALKT = IGNORE ;
+C620O = IGNORE ;
+MNO3COC4O2 = IGNORE ;
+IPEAO2 = IGNORE ;
+PBENZOLO2 = IGNORE ;
+APINENE = IGNORE ;
+CHEXO2 = IGNORE ;
+C6PAN18 = IGNORE ;
+C6PAN19 = IGNORE ;
+HEXBOOH = IGNORE ;
+C6PAN10 = IGNORE ;
+C6PAN11 = IGNORE ;
+C6PAN12 = IGNORE ;
+C6PAN13 = IGNORE ;
+C6PAN14 = IGNORE ;
+C6PAN15 = IGNORE ;
+C6PAN16 = IGNORE ;
+C6PAN17 = IGNORE ;
+C916O2 = IGNORE ;
+PGLYOX = IGNORE ;
+C6H5CH2OH = IGNORE ;
+C23O3EOH = IGNORE ;
+ACCOCOMEO = IGNORE ;
+C23O3EO2 = IGNORE ;
+M2BKBOOH = IGNORE ;
+C6H5CH2O2 = IGNORE ;
+C916OH = IGNORE ;
+C4M2NO32O = IGNORE ;
+HM33C4OOH = IGNORE ;
+C919OOH = IGNORE ;
+EPXDLCO3H = IGNORE ;
+LIMALOOH = IGNORE ;
+NC2OO = IGNORE ;
+LIMALOOA = IGNORE ;
+OXYQO = IGNORE ;
+NLIMALOOH = IGNORE ;
+IC4H9O2 = IGNORE ;
+PBZMUCCO = IGNORE ;
+C914CO = IGNORE ;
+CHOOCHO = IGNORE ;
+C515O = IGNORE ;
+TM124MUPAN = IGNORE ;
+NEBNZOLO = IGNORE ;
+C813OH = IGNORE ;
+C918CO3 = IGNORE ;
+DM35EBO2 = IGNORE ;
+ACBUONEBO = IGNORE ;
+PEBQOOH = IGNORE ;
+NEOPO = IGNORE ;
+C131OOH = IGNORE ;
+HOCO4C5OOH = IGNORE ;
+PR2OHMOX = IGNORE ;
+PETLBPROOH = IGNORE ;
+C53NO32OOH = IGNORE ;
+IPECNO3 = IGNORE ;
+HO36C12 = IGNORE ;
+C66CO = IGNORE ;
+ACETC2H4O = IGNORE ;
+C8OHCO2PAN = IGNORE ;
+CCLNO3CO = IGNORE ;
+OXYLCO3 = IGNORE ;
+C6HOCOOOH = IGNORE ;
+HO2C54CHO = IGNORE ;
+CO2C4CO2H = IGNORE ;
+NDNT124OOH = IGNORE ;
+C618OOH = IGNORE ;
+OETLBPROOH = IGNORE ;
+MSA = IGNORE ;
+CO2C4CO3 = IGNORE ;
+CO3C75O2 = IGNORE ;
+CHOOCH2NO3 = IGNORE ;
+C818OH = IGNORE ;
+C720NO3 = IGNORE ;
+NPEBQO = IGNORE ;
+C1012O = IGNORE ;
+C818O2 = IGNORE ;
+H3C2C4CO3H = IGNORE ;
+C4COMOHOOH = IGNORE ;
+TM123BOOH = IGNORE ;
+C4CODBCO3H = IGNORE ;
+IPMLNHY2OH = IGNORE ;
+ECO3PAN = IGNORE ;
+IPROACETO2 = IGNORE ;
+C61CO = IGNORE ;
+C6M5CO2OOH = IGNORE ;
+BCLKBOH = IGNORE ;
+NC826OH = IGNORE ;
+C128OH = IGNORE ;
+HEX3ONANO3 = IGNORE ;
+BCLKBOC = IGNORE ;
+M23C4O2 = IGNORE ;
+CHOPRNO3 = IGNORE ;
+C1011NO3 = IGNORE ;
+HM22COCHO = IGNORE ;
+PENTACID = IGNORE ;
+MACROH = IGNORE ;
+MACROO = IGNORE ;
+ETHO2HNO3 = IGNORE ;
+HM33C4OH = IGNORE ;
+CH2OHCCLOH = IGNORE ;
+C732CO3 = IGNORE ;
+CH2OHCCLO2 = IGNORE ;
+NBZQO2 = IGNORE ;
+HM33C4O2 = IGNORE ;
+MACRO2 = IGNORE ;
+C2H5CHOO = IGNORE ;
+BOX2COMOH = IGNORE ;
+NPETOL1O2 = IGNORE ;
+MXYOBPEROH = IGNORE ;
+IPNCATECO2 = IGNORE ;
+DECNO3 = IGNORE ;
+M23C4OH = IGNORE ;
+C4ECO2O = IGNORE ;
+C128O2 = IGNORE ;
+C822OOH = IGNORE ;
+BCLKBO2 = IGNORE ;
+IPEBO = IGNORE ;
+TOL1OHNO2 = IGNORE ;
+EOX2ETB2OH = IGNORE ;
+HO2C6O = IGNORE ;
+CH3OCH2OOH = IGNORE ;
+C731CO3H = IGNORE ;
+MPRANO3OOH = IGNORE ;
+C59O = IGNORE ;
+NBZQO = IGNORE ;
+C65O2 = IGNORE ;
+CO2H3MCO3H = IGNORE ;
+MECOACETO = IGNORE ;
+HOIBUTCHO = IGNORE ;
+PEBO2 = IGNORE ;
+PEBOH = IGNORE ;
+NTM123OLO = IGNORE ;
+C65OH = IGNORE ;
+C14O3IPCHO = IGNORE ;
+DNEBNZLOOH = IGNORE ;
+CCL3PAN = IGNORE ;
+C61NO3 = IGNORE ;
+HOCO3C54O2 = IGNORE ;
+NBUTDAO = IGNORE ;
+MXNNCATCO2 = IGNORE ;
+CLCOCLOOH = IGNORE ;
+C1311O = IGNORE ;
+C1012CO = IGNORE ;
+C6COCHOCO3 = IGNORE ;
+NC91PAN = IGNORE ;
+C3EDIALO = IGNORE ;
+PTLQO = IGNORE ;
+C89CO3H = IGNORE ;
+CCL2CL2OOH = IGNORE ;
+HMVKAO = IGNORE ;
+IPBZBIPRO2 = IGNORE ;
+C927OOH = IGNORE ;
+CL12PAN = IGNORE ;
+OET1O2 = IGNORE ;
+HO24C4CO3H = IGNORE ;
+C510O2 = IGNORE ;
+C151OOH = IGNORE ;
+C715O2 = IGNORE ;
+C67OH = IGNORE ;
+C7ADICARB = IGNORE ;
+HM22C4NO3 = IGNORE ;
+MTBEBNO3 = IGNORE ;
+PXCATECOOA = IGNORE ;
+C1014O2 = IGNORE ;
+HC3CO3 = IGNORE ;
+C2CL2OHO2 = IGNORE ;
+HO124C5 = IGNORE ;
+C4OCCOHCOH = IGNORE ;
+C135O = IGNORE ;
+C1011CO = IGNORE ;
+MO2EOLA2OH = IGNORE ;
+C96OH = IGNORE ;
+C5NO3CO4O2 = IGNORE ;
+C96O2 = IGNORE ;
+C5NO3CO4OH = IGNORE ;
+CO2M3C4CO3 = IGNORE ;
+PECOOH = IGNORE ;
+C4NO3OCO = IGNORE ;
+C51CO3H = IGNORE ;
+C4OCCOHCO2 = IGNORE ;
+DEC3ONE = IGNORE ;
+C113O = IGNORE ;
+NPXYFUO2 = IGNORE ;
+MC3ODBCO3H = IGNORE ;
+CH3CHCLO = IGNORE ;
+LIMALBCO = IGNORE ;
+TM124OLO2 = IGNORE ;
+C918PAN = IGNORE ;
+HO3C126O2 = IGNORE ;
+PTLQOH = IGNORE ;
+C4CHOBO2 = IGNORE ;
+C821OOH = IGNORE ;
+C622OOH = IGNORE ;
+C4CO2O = IGNORE ;
+C1210PAN = IGNORE ;
+M22C3CHO = IGNORE ;
+HO2C5O2 = IGNORE ;
+C6NO3CO4OH = IGNORE ;
+HO2C5OH = IGNORE ;
+ECATEC1O = IGNORE ;
+CHEXNO3 = IGNORE ;
+CO25C6O = IGNORE ;
+C923OOH = IGNORE ;
+HEX2ONBOOH = IGNORE ;
+PEBOOH = IGNORE ;
+PTLQO2 = IGNORE ;
+HO2CO4C5 = IGNORE ;
+TM124OLOH = IGNORE ;
+C137NO3 = IGNORE ;
+CLETO3 = IGNORE ;
+HO1C6NO3 = IGNORE ;
+C1011CO2H = IGNORE ;
+C924OH = IGNORE ;
+C830PAN = IGNORE ;
+C920PAN = IGNORE ;
+NMBOBO = IGNORE ;
+PR2OHMOOOH = IGNORE ;
+C53OH2OOH = IGNORE ;
+PROH2MOX = IGNORE ;
+C622O = IGNORE ;
+APINAO = IGNORE ;
+C924O2 = IGNORE ;
+DMPHO2 = IGNORE ;
+C126OH = IGNORE ;
+IPRHOCO3H = IGNORE ;
+DIEKBOOH = IGNORE ;
+C619O2 = IGNORE ;
+CL12PRCOH = IGNORE ;
+PBZMUCO = IGNORE ;
+NOPINBO = IGNORE ;
+TM124BPAN = IGNORE ;
+C817NO3 = IGNORE ;
+SBUACCOH = IGNORE ;
+NONNO3 = IGNORE ;
+C5DBECO3H = IGNORE ;
+C64NO335CO = IGNORE ;
+PTLQOOH = IGNORE ;
+EMALANHYO2 = IGNORE ;
+HO3C116O = IGNORE ;
+CL12PRCO2 = IGNORE ;
+C6CO2OHCO3 = IGNORE ;
+C6M5CO2O = IGNORE ;
+TM123BCO2H = IGNORE ;
+HOACETEOOH = IGNORE ;
+C7ODLBCO3H = IGNORE ;
+C83OOH = IGNORE ;
+C4MOHOPAN = IGNORE ;
+M2PE = IGNORE ;
+C51NO3 = IGNORE ;
+C628OOH = IGNORE ;
+C628OOA = IGNORE ;
+EBENZOLO = IGNORE ;
+CH3COCO2H = IGNORE ;
+C142OOH = IGNORE ;
+ENCATECO2 = IGNORE ;
+C6CYTONOOH = IGNORE ;
+C6125CO = IGNORE ;
+BZFUOH = IGNORE ;
+C513O = IGNORE ;
+NC3CHO = IGNORE ;
+PXYBIPENO3 = IGNORE ;
+BZFUO2 = IGNORE ;
+CH3CO3 = IGNORE ;
+DIEKBO2 = IGNORE ;
+PMALANHYO2 = IGNORE ;
+C813NO3 = IGNORE ;
+CO356C9 = IGNORE ;
+ACETC2CO3H = IGNORE ;
+HO3CO6C7 = IGNORE ;
+C1014OOH = IGNORE ;
+TM124BNO3 = IGNORE ;
+CHEX = IGNORE ;
+HO3CO6C8 = IGNORE ;
+HOC2H4CO2H = IGNORE ;
+C116O2 = IGNORE ;
+PE2ENEAO = IGNORE ;
+BUTDCO2 = IGNORE ;
+C1013CO3H = IGNORE ;
+C2CL2OHOOH = IGNORE ;
+BZFUONOOA = IGNORE ;
+C729OOH = IGNORE ;
+CCLNO3COOH = IGNORE ;
+PXYOLOOH = IGNORE ;
+PR2OHMOXO2 = IGNORE ;
+PXYL1OOH = IGNORE ;
+HC4CCHO = IGNORE ;
+MMFNO3 = IGNORE ;
+C718OOH = IGNORE ;
+CHOOCH2O = IGNORE ;
+C75O2 = IGNORE ;
+OTCTEC1OOH = IGNORE ;
+C1010O = IGNORE ;
+C5H11CO3H = IGNORE ;
+MXY1O = IGNORE ;
+C116OH = IGNORE ;
+C54CO3 = IGNORE ;
+C617CO3H = IGNORE ;
+NIPBNZ1OOH = IGNORE ;
+C122OOH = IGNORE ;
+TMB1FUO = IGNORE ;
+HC4CCO3 = IGNORE ;
+HOACETETO = IGNORE ;
+C622O2 = IGNORE ;
+PHCOETO = IGNORE ;
+C630O = IGNORE ;
+BOXPROANO3 = IGNORE ;
+COHM2CO2H = IGNORE ;
+C816CO3 = IGNORE ;
+M2PEAO2 = IGNORE ;
+C6CO3MOH = IGNORE ;
+M2PEAOH = IGNORE ;
+IPBNZOHNO2 = IGNORE ;
+C4CHOBO = IGNORE ;
+C41CO2H = IGNORE ;
+DMMAOOH = IGNORE ;
+TMB2FUONE = IGNORE ;
+BCKBCO = IGNORE ;
+C7EDCCO = IGNORE ;
+C123OOH = IGNORE ;
+EPXKTMCO3 = IGNORE ;
+ME2BUT2ENE = IGNORE ;
+C132O2 = IGNORE ;
+C3DBPAN = IGNORE ;
+MIBK3COO = IGNORE ;
+HO2C4O = IGNORE ;
+MIBK3CO = IGNORE ;
+BUTALO2H = IGNORE ;
+C3DIOLO2 = IGNORE ;
+DMEBIPRO2 = IGNORE ;
+TMBO = IGNORE ;
+C137CO3 = IGNORE ;
+M33C3CO3H = IGNORE ;
+CO = IGNORE ;
+CL = IGNORE ;
+M2PEAOOH = IGNORE ;
+C512PAN = IGNORE ;
+C1313O = IGNORE ;
+C132OH = IGNORE ;
+NPROPOL = IGNORE ;
+M2C43CO3H = IGNORE ;
+C517CHO = IGNORE ;
+HO6C7O2 = IGNORE ;
+NPXYQO = IGNORE ;
+C65NO3CO2H = IGNORE ;
+MCOCOMOX = IGNORE ;
+C109CO = IGNORE ;
+C6CONO3OOH = IGNORE ;
+METLMUCO = IGNORE ;
+CATEC1O2 = IGNORE ;
+ACCOCOC2H5 = IGNORE ;
+C823CO = IGNORE ;
+C2H5NO3 = IGNORE ;
+C729CHO = IGNORE ;
+C721O = IGNORE ;
+HO2MC5O = IGNORE ;
+IPRGLYOX = IGNORE ;
+CO24C6 = IGNORE ;
+CO24C5 = IGNORE ;
+NOPINBNO3 = IGNORE ;
+HO3C5O2 = IGNORE ;
+NOXYOL1O = IGNORE ;
+C7DDCPAN = IGNORE ;
+IBUDIALPAN = IGNORE ;
+M2HEXBO2 = IGNORE ;
+H2M2C4CO3H = IGNORE ;
+NBUTOLAO2 = IGNORE ;
+C4NO32M2O2 = IGNORE ;
+C916O = IGNORE ;
+INAHPCHO = IGNORE ;
+C137O = IGNORE ;
+C829O = IGNORE ;
+NBUTOLAOH = IGNORE ;
+M2PECNO3 = IGNORE ;
+M2HEXBOH = IGNORE ;
+MACROOH = IGNORE ;
+C716O = IGNORE ;
+C111O = IGNORE ;
+TC4H9OOH = IGNORE ;
+C4MDIAL = IGNORE ;
+PR1O2HNO3 = IGNORE ;
+ETBEACO3 = IGNORE ;
+PGLYOXOH = IGNORE ;
+C4CHOBOOH = IGNORE ;
+TLEMUCO2 = IGNORE ;
+PXYFUONE = IGNORE ;
+PNCATECOOH = IGNORE ;
+BCKAO = IGNORE ;
+CO24C53O2 = IGNORE ;
+NDNPHENO2 = IGNORE ;
+C5MEJPAN = IGNORE ;
+NDMEPHOLOH = IGNORE ;
+NMETOLOOH = IGNORE ;
+PTCATECOOA = IGNORE ;
+CO25C6CHO = IGNORE ;
+C6DICARBO = IGNORE ;
+C43NO3CO2H = IGNORE ;
+HM33C3NO3 = IGNORE ;
+NDMEPHOLO2 = IGNORE ;
+TLEMUCOH = IGNORE ;
+C7DDICARB = IGNORE ;
+IPBZOBPROH = IGNORE ;
+MOCOCH2O = IGNORE ;
+HEXANO3 = IGNORE ;
+C614CO = IGNORE ;
+NC11H24 = IGNORE ;
+C625OH = IGNORE ;
+TM124OLO = IGNORE ;
+IPRFORMO = IGNORE ;
+ETHACET = IGNORE ;
+DICLETOH = IGNORE ;
+M33C3CO3 = IGNORE ;
+ENNCATECO2 = IGNORE ;
+DICLETO2 = IGNORE ;
+M2BKANO3 = IGNORE ;
+IPNCATCOOH = IGNORE ;
+INAHPCO2H = IGNORE ;
+NDNPBNZLO = IGNORE ;
+TM124QONE = IGNORE ;
+C625O2 = IGNORE ;
+C811OOH = IGNORE ;
+C622PAN = IGNORE ;
+C826CO3O = IGNORE ;
+M3PE = IGNORE ;
+CH3CCH3OOC = IGNORE ;
+CH3CCH3OOB = IGNORE ;
+M2HEXANO3 = IGNORE ;
+CH2CLCOOH = IGNORE ;
+BCLKAOOH = IGNORE ;
+HO3C86O2 = IGNORE ;
+TM123OLOOH = IGNORE ;
+C6H13CHO = IGNORE ;
+C41O = IGNORE ;
+CHOMOHCO3H = IGNORE ;
+T123CT1OOH = IGNORE ;
+MXYQONE = IGNORE ;
+OETLQOH = IGNORE ;
+HO2 = IGNORE ;
+C3H7CO3 = IGNORE ;
+ME2BUOLOOH = IGNORE ;
+OETLQO2 = IGNORE ;
+INANCO2H = IGNORE ;
+CO24M3C5OH = IGNORE ;
+HO6CO9C11 = IGNORE ;
+MBOCOCO = IGNORE ;
+IPRMEETO = IGNORE ;
+ME3BUOLO = IGNORE ;
+ISOPDOH = IGNORE ;
+HO2M2C4OH = IGNORE ;
+EOX2MECO3 = IGNORE ;
+PECNO3 = IGNORE ;
+C1212OOH = IGNORE ;
+C4PAN1 = IGNORE ;
+C4PAN2 = IGNORE ;
+C4PAN3 = IGNORE ;
+C4PAN4 = IGNORE ;
+C4PAN5 = IGNORE ;
+C4PAN6 = IGNORE ;
+C4PAN7 = IGNORE ;
+C4PAN8 = IGNORE ;
+C4PAN9 = IGNORE ;
+C914OH = IGNORE ;
+ETOC2NO3 = IGNORE ;
+HO2M2C5OOH = IGNORE ;
+EIPKAOOH = IGNORE ;
+C512O2 = IGNORE ;
+PROPALOOH = IGNORE ;
+C511O = IGNORE ;
+C1310OH = IGNORE ;
+CHOC3COO = IGNORE ;
+HMGLOOA = IGNORE ;
+C817O = IGNORE ;
+C713O2 = IGNORE ;
+INB1NBCO2H = IGNORE ;
+MXYFUO = IGNORE ;
+HO3C5O = IGNORE ;
+C2CL3HOOOH = IGNORE ;
+NOPINAOOH = IGNORE ;
+CO23C65O2 = IGNORE ;
+C5COO2NO2 = IGNORE ;
+C914O2 = IGNORE ;
+C1214O = IGNORE ;
+NAPINAO2 = IGNORE ;
+C921OOH = IGNORE ;
+BCLKBO = IGNORE ;
+CO356OCOOH = IGNORE ;
+C61OH = IGNORE ;
+C734OOH = IGNORE ;
+MMALANHYO2 = IGNORE ;
+NORLIMO2 = IGNORE ;
+C6H5C2CO2H = IGNORE ;
+HO2M2C5O = IGNORE ;
+H2O2 = IGNORE ;
+C614CO23OH = IGNORE ;
+NTM124QO2 = IGNORE ;
+C63NO32O2 = IGNORE ;
+PRONO3AO2 = IGNORE ;
+C10PAN1 = IGNORE ;
+C10PAN2 = IGNORE ;
+C23O3MO = IGNORE ;
+PEBO = IGNORE ;
+H13C43CHO = IGNORE ;
+ACPRONEOOH = IGNORE ;
+C3DIALO = IGNORE ;
+TLBIPERNO3 = IGNORE ;
+MCOCOMOXO = IGNORE ;
+C61O2 = IGNORE ;
+CYHXDIOLA = IGNORE ;
+ETOMEPAN = IGNORE ;
+HEX3ONBO2 = IGNORE ;
+TMB1FUOH = IGNORE ;
+HO5C5CO3 = IGNORE ;
+CO25C73O2 = IGNORE ;
+MXYMUCNO3 = IGNORE ;
+C630OOH = IGNORE ;
+HO3C3CHO = IGNORE ;
+CH3SO2O2 = IGNORE ;
+NNCATECOOH = IGNORE ;
+METLPOXMUC = IGNORE ;
+HO1C3OOH = IGNORE ;
+C818CO = IGNORE ;
+MXNNCATOOH = IGNORE ;
+C1310OOH = IGNORE ;
+EBFUONE = IGNORE ;
+TM123BCHO = IGNORE ;
+MACRNCO2H = IGNORE ;
+CO25C73OH = IGNORE ;
+HO14M3C5 = IGNORE ;
+TMB1FUO2 = IGNORE ;
+EPXMDLCO3 = IGNORE ;
+C128CO = IGNORE ;
+CH2OHCL2O = IGNORE ;
+NDNCRESOOH = IGNORE ;
+MIBKAO = IGNORE ;
+C732O2 = IGNORE ;
+OETOH = IGNORE ;
+C144O2 = IGNORE ;
+H3C25C6OH = IGNORE ;
+H3C25C6O2 = IGNORE ;
+IPRFORMNO3 = IGNORE ;
+M3C4CHO = IGNORE ;
+C732OH = IGNORE ;
+CO3H4CHO = IGNORE ;
+C6COHOCHO = IGNORE ;
+C5EDBCO3 = IGNORE ;
+NAOO = IGNORE ;
+C62O = IGNORE ;
+C4DBM2PAN = IGNORE ;
+CH3CLCOCL = IGNORE ;
+CYHEXOL = IGNORE ;
+HM33C3O2 = IGNORE ;
+TLBIPEROOH = IGNORE ;
+CO3C5CO3H = IGNORE ;
+ISOPBNO3 = IGNORE ;
+C93NO3 = IGNORE ;
+MMFO = IGNORE ;
+NBUTOLAO = IGNORE ;
+NOXYFUO = IGNORE ;
+C825CO = IGNORE ;
+C1215O = IGNORE ;
+NC524NO3 = IGNORE ;
+CONM2CO3 = IGNORE ;
+IC4H9OOH = IGNORE ;
+BZBIPERNO3 = IGNORE ;
+C23O3MCO3 = IGNORE ;
+NC102OOH = IGNORE ;
+H3M3C5CO3 = IGNORE ;
+CCL3O = IGNORE ;
+MEKCOH = IGNORE ;
+EOCOCH2O = IGNORE ;
+TM124BP2OH = IGNORE ;
+CHCL2COCL = IGNORE ;
+C139O = IGNORE ;
+NOPINDCO = IGNORE ;
+C2H5OOH = IGNORE ;
+C5M2OHOCO3 = IGNORE ;
+HM22C3CO3H = IGNORE ;
+TBUTOL = IGNORE ;
+C87CO = IGNORE ;
+C88O = IGNORE ;
+NDNOXYLOOH = IGNORE ;
+C518PAN = IGNORE ;
+H3M3C5O2 = IGNORE ;
+C824CO = IGNORE ;
+DMEBMUOH = IGNORE ;
+MEKCO2 = IGNORE ;
+C117O = IGNORE ;
+C923CO3H = IGNORE ;
+IPRMETOOH = IGNORE ;
+NOETOLO2 = IGNORE ;
+MO2EOLAO = IGNORE ;
+C717O2 = IGNORE ;
+C521O2 = IGNORE ;
+PXYFUOH = IGNORE ;
+DNPXYOLO = IGNORE ;
+INDOH = IGNORE ;
+INDO2 = IGNORE ;
+C914O = IGNORE ;
+HO3C106O2 = IGNORE ;
+ALCOMOXOOH = IGNORE ;
+PXYFUO2 = IGNORE ;
+IPBZMUCO2H = IGNORE ;
+C4COMOHPAN = IGNORE ;
+PTNNCATCO2 = IGNORE ;
+NDNEBNZLO = IGNORE ;
+IPRACBCO3 = IGNORE ;
+IPEBNO3 = IGNORE ;
+C91O2 = IGNORE ;
+NOETOLOH = IGNORE ;
+IBUTOLCO = IGNORE ;
+ACPRONEO = IGNORE ;
+M3PEBO = IGNORE ;
+CYHXOLAOOH = IGNORE ;
+H2M2CO5C6 = IGNORE ;
+CYHEXONE = IGNORE ;
+C4COMOH3O2 = IGNORE ;
+M23C43NO3 = IGNORE ;
+MXYLCO3 = IGNORE ;
+MXYOLOOH = IGNORE ;
+C4COMOH3OH = IGNORE ;
+C826OOH = IGNORE ;
+TM124MUOOH = IGNORE ;
+BZEMUCOOH = IGNORE ;
+TM124OHNO2 = IGNORE ;
+ETBECNO3 = IGNORE ;
+SBUACBNO3 = IGNORE ;
+C5CODBCO2H = IGNORE ;
+C6OH5NO3 = IGNORE ;
+T123NCATEC = IGNORE ;
+PCATEC1O2 = IGNORE ;
+H2M5C65O = IGNORE ;
+COO2C4CHO = IGNORE ;
+C8M2CO6O = IGNORE ;
+PRCOOMCO3 = IGNORE ;
+EBZMUCCO3H = IGNORE ;
+EBFUO2 = IGNORE ;
+EBFUOH = IGNORE ;
+TM124BPNO3 = IGNORE ;
+IBUTOLCO2H = IGNORE ;
+NPPRBQO2 = IGNORE ;
+C718CO3 = IGNORE ;
+MMCFNO3 = IGNORE ;
+MTBEALCO3H = IGNORE ;
+CO3C54CO3 = IGNORE ;
+HOPINONIC = IGNORE ;
+HC4ACO3 = IGNORE ;
+PXYQO = IGNORE ;
+APINBOH = IGNORE ;
+PBZMUCPAN = IGNORE ;
+METLMUCOOH = IGNORE ;
+C5CO14O2 = IGNORE ;
+BZFUCO = IGNORE ;
+C822OH = IGNORE ;
+HOBUT2CHO = IGNORE ;
+C822O2 = IGNORE ;
+C719OOH = IGNORE ;
+NPROACECO2 = IGNORE ;
+C5DBEPAN = IGNORE ;
+C5CO14OH = IGNORE ;
+M3HEXANO3 = IGNORE ;
+INB1NBCO3 = IGNORE ;
+C730OOH = IGNORE ;
+TLBIPERO2 = IGNORE ;
+C7CO4EDB = IGNORE ;
+PBZMUCCO3 = IGNORE ;
+IPGLOOB = IGNORE ;
+C521OH = IGNORE ;
+IBUDIALCO3 = IGNORE ;
+TM124BCO3 = IGNORE ;
+CO24C53O = IGNORE ;
+BCKAO2 = IGNORE ;
+NMETLQO2 = IGNORE ;
+ACROOA = IGNORE ;
+C8CO2DBPAN = IGNORE ;
+IPMALNHYO2 = IGNORE ;
+C726CO5OOH = IGNORE ;
+C136OH = IGNORE ;
+IBUTACID = IGNORE ;
+PXNCATECO = IGNORE ;
+PXNCATECH = IGNORE ;
+C66NO35CO = IGNORE ;
+TLEPOXMUC = IGNORE ;
+C113OH = IGNORE ;
+C113O2 = IGNORE ;
+NEBFUOOH = IGNORE ;
+C1014O = IGNORE ;
+H2M3C4OOH = IGNORE ;
+C136O2 = IGNORE ;
+C1210CO3H = IGNORE ;
+LIMALO = IGNORE ;
+H2MC5OOH = IGNORE ;
+MALDALCO2H = IGNORE ;
+BCKAOO = IGNORE ;
+PBENZO = IGNORE ;
+BCKAOH = IGNORE ;
+NPXYFUOOH = IGNORE ;
+CHOCOMOXO = IGNORE ;
+HC3CO2H = IGNORE ;
+C515CO3H = IGNORE ;
+IPROMC2O2 = IGNORE ;
+MIBKHO14 = IGNORE ;
+C152O2 = IGNORE ;
+LIMANO3 = IGNORE ;
+C827CO3H = IGNORE ;
+HO2C3CO2H = IGNORE ;
+MXYLAL = IGNORE ;
+CLCOCH2O2 = IGNORE ;
+C58O2 = IGNORE ;
+PBFUOOH = IGNORE ;
+C6MOCOCO3H = IGNORE ;
+C58OH = IGNORE ;
+IC5H12 = IGNORE ;
+BCLKBOOH = IGNORE ;
+C727CO3 = IGNORE ;
+DNT124BOL = IGNORE ;
+BOXPROBOOH = IGNORE ;
+C152OH = IGNORE ;
+IPROMC2OH = IGNORE ;
+C810OH = IGNORE ;
+M2C43CO3 = IGNORE ;
+INDHCO3 = IGNORE ;
+OTCATEC1O = IGNORE ;
+COO2C4O = IGNORE ;
+M22C4OH = IGNORE ;
+C6DIALOOH = IGNORE ;
+OXYFUO2 = IGNORE ;
+C6CO34HO1 = IGNORE ;
+NTM135OLO2 = IGNORE ;
+C615CO2O2 = IGNORE ;
+METLMUCPAN = IGNORE ;
+C615CO2OH = IGNORE ;
+NTM135OLOH = IGNORE ;
+OXYFUOH = IGNORE ;
+M22C4O2 = IGNORE ;
+PBZBPER2OH = IGNORE ;
+TBUACCO3 = IGNORE ;
+C6COALCO3H = IGNORE ;
+HM22CO2H = IGNORE ;
+IC4CHOAOOH = IGNORE ;
+C4COMEOH = IGNORE ;
+METLMUCCO = IGNORE ;
+C65NO36O = IGNORE ;
+M3HEXBOOH = IGNORE ;
+C59OOH = IGNORE ;
+HNMVKOH = IGNORE ;
+MIBKOHBOOH = IGNORE ;
+BOX2MO = IGNORE ;
+IC7DCOOH = IGNORE ;
+METHACETO = IGNORE ;
+HNMVKO2 = IGNORE ;
+H1MC5O2 = IGNORE ;
+C126CHO = IGNORE ;
+C628O2 = IGNORE ;
+HO2CO35C7 = IGNORE ;
+C3M3OH2PAN = IGNORE ;
+H2M2C3CO3 = IGNORE ;
+PNCATECO2 = IGNORE ;
+MEPROPENE = IGNORE ;
+DNMXYOLO2 = IGNORE ;
+LIMBNO3 = IGNORE ;
+MNNCATCOOH = IGNORE ;
+HO13C4OH = IGNORE ;
+HO13C4O2 = IGNORE ;
+C3NO3COO2 = IGNORE ;
+C5CO243OH = IGNORE ;
+C615CO2OOH = IGNORE ;
+C628OH = IGNORE ;
+C7DDCO = IGNORE ;
+NC3H7O2 = IGNORE ;
+CO3C4CO3H = IGNORE ;
+C115O = IGNORE ;
+MOXY2CHO = IGNORE ;
+NCATECOOH = IGNORE ;
+MMALNACO2H = IGNORE ;
+BOXPOLANO3 = IGNORE ;
+C3MDIALO2 = IGNORE ;
+C6OH5O = IGNORE ;
+CONO3C6OOH = IGNORE ;
+LIMCO = IGNORE ;
+C621O2 = IGNORE ;
+PETLMUCNO3 = IGNORE ;
+CO1M22CHO = IGNORE ;
+OCT3ONE = IGNORE ;
+C915NO3 = IGNORE ;
+MVKOHBO = IGNORE ;
+C61CPAN = IGNORE ;
+CHCLOHCO = IGNORE ;
+IPGLYOXOH = IGNORE ;
+HO2C5NO3 = IGNORE ;
+MIBKCOOHO = IGNORE ;
+C7MOHCOCO3 = IGNORE ;
+C63NO32OOH = IGNORE ;
+C3MDIALOH = IGNORE ;
+METHACET = IGNORE ;
+C624OOH = IGNORE ;
+TM135BPRO2 = IGNORE ;
+HM33C4NO3 = IGNORE ;
+NC3OO = IGNORE ;
+CHOCOHCO = IGNORE ;
+C919NO3 = IGNORE ;
+EBNZOHNO2 = IGNORE ;
+HO6C7OOH = IGNORE ;
+IC7DCOH = IGNORE ;
+C917O2 = IGNORE ;
+C926OH = IGNORE ;
+MBOAOH = IGNORE ;
+C4ME2NO3O = IGNORE ;
+C148OOH = IGNORE ;
+NDNIPBZLO = IGNORE ;
+MPHCOME = IGNORE ;
+IC7DCO2 = IGNORE ;
+METLQO = IGNORE ;
+C917OH = IGNORE ;
+NTLFUO2 = IGNORE ;
+TLBIPER2OH = IGNORE ;
+ACCOMCOMO2 = IGNORE ;
+HYPERACET = IGNORE ;
+C5MO132OH = IGNORE ;
+MIPK = IGNORE ;
+C930OH = IGNORE ;
+BCALO2 = IGNORE ;
+INB1NACO3H = IGNORE ;
+IEACO3H = IGNORE ;
+DEMPHOH = IGNORE ;
+BCALCO2 = IGNORE ;
+MEMOXYPAN = IGNORE ;
+C918O2 = IGNORE ;
+C717OH = IGNORE ;
+MALNHYOHCO = IGNORE ;
+C131NO3 = IGNORE ;
+C41O2 = IGNORE ;
+BOX2MO2 = IGNORE ;
+BUTDAO = IGNORE ;
+C918OH = IGNORE ;
+BCALCOH = IGNORE ;
+HCL = IGNORE ;
+IC3H7O2 = IGNORE ;
+HC3CCHO = IGNORE ;
+CHOC2H4O = IGNORE ;
+CO25C74O2 = IGNORE ;
+C920OOH = IGNORE ;
+C930O2 = IGNORE ;
+BCALOH = IGNORE ;
+C928CO2H = IGNORE ;
+PXNNCATOOH = IGNORE ;
+BCALOO = IGNORE ;
+C1214O2 = IGNORE ;
+NMXYQOOH = IGNORE ;
+CO2N3CHO = IGNORE ;
+C107OH = IGNORE ;
+MXCTEC1OOH = IGNORE ;
+CO35C5CHO = IGNORE ;
+OET1OOH = IGNORE ;
+MC6CO2OH = IGNORE ;
+C813O = IGNORE ;
+NLMKAOOH = IGNORE ;
+C711O = IGNORE ;
+OETLQCO = IGNORE ;
+C3M2COCO2H = IGNORE ;
+MC6CO2O2 = IGNORE ;
+BCLKACO = IGNORE ;
+HOIPRCO3H = IGNORE ;
+C721CO3H = IGNORE ;
+BOXEOHANO3 = IGNORE ;
+C731CO3 = IGNORE ;
+C731CO2 = IGNORE ;
+C6135COO = IGNORE ;
+C107O2 = IGNORE ;
+C1214OH = IGNORE ;
+C626NO3 = IGNORE ;
+C144OOH = IGNORE ;
+CO356OCO2 = IGNORE ;
+HM22C3O = IGNORE ;
+PRONO3AO = IGNORE ;
+CH2BROOH = IGNORE ;
+HO3C86OOH = IGNORE ;
+C145O = IGNORE ;
+C66O = IGNORE ;
+BOX2EOHBO = IGNORE ;
+ACETC2PAN = IGNORE ;
+C4MCNO3OOH = IGNORE ;
+C926O = IGNORE ;
+BUTDBNO3 = IGNORE ;
+IPRHOCO3 = IGNORE ;
+TMB2FUO = IGNORE ;
+C6H5CO3 = IGNORE ;
+INB2OOH = IGNORE ;
+DMSO = IGNORE ;
+C824OOH = IGNORE ;
+HO1MC5NO3 = IGNORE ;
+HEXCOH = IGNORE ;
+C1313OOH = IGNORE ;
+MTBEBCO3 = IGNORE ;
+INB1HPCHO = IGNORE ;
+CO3C4NO3O = IGNORE ;
+CO2N3PAN = IGNORE ;
+C2H5CHOOB = IGNORE ;
+TM135OXMUC = IGNORE ;
+H1C23C4O2 = IGNORE ;
+C2H5CHOOA = IGNORE ;
+C76OOH = IGNORE ;
+BUTAL2O = IGNORE ;
+C52NO33O = IGNORE ;
+HCOCH2O2 = IGNORE ;
+T123NNCTO = IGNORE ;
+CH3CCL3 = IGNORE ;
+IEB2O2 = IGNORE ;
+HO1MC5O2 = IGNORE ;
+CL12CO2H = IGNORE ;
+HO2C4CO3H = IGNORE ;
+HEXCO2 = IGNORE ;
+C3DIALOOH = IGNORE ;
+PHCHOOA = IGNORE ;
+CATECHOL = IGNORE ;
+C4M2AL2OH = IGNORE ;
+C712OH = IGNORE ;
+HO8C9CO3H = IGNORE ;
+C3MNO3CO3H = IGNORE ;
+CYHEXOLAO2 = IGNORE ;
+NBCKOOH = IGNORE ;
+IPRBQO = IGNORE ;
+DMEBPROOH = IGNORE ;
+CO24C6OOH = IGNORE ;
+C712O2 = IGNORE ;
+DIBRETO2 = IGNORE ;
+C96CO3 = IGNORE ;
+H3C25C6CO3 = IGNORE ;
+APINCNO3 = IGNORE ;
+IPRACNO3 = IGNORE ;
+MXYLCO2H = IGNORE ;
+EIPKAO2 = IGNORE ;
+ALC4DOLOOH = IGNORE ;
+C727O = IGNORE ;
+BZEMUCCO2H = IGNORE ;
+CO2HOC6OOH = IGNORE ;
+NOXYQO2 = IGNORE ;
+CO2OH3MCO3 = IGNORE ;
+C98OOH = IGNORE ;
+C827CO3 = IGNORE ;
+C43NO34O = IGNORE ;
+C730OH = IGNORE ;
+OCCOHCOOH = IGNORE ;
+DMEBIPNO3 = IGNORE ;
+C6OH5O2 = IGNORE ;
+MVKOHAOOH = IGNORE ;
+CLCOCLO2 = IGNORE ;
+BOXFORMO2 = IGNORE ;
+C730O2 = IGNORE ;
+C1211O = IGNORE ;
+CH3CL = IGNORE ;
+EIPKAOH = IGNORE ;
+C94OOH = IGNORE ;
+CH3COCO3 = IGNORE ;
+APINCOH = IGNORE ;
+PPRBQO = IGNORE ;
+H3C25C6O = IGNORE ;
+C611OH = IGNORE ;
+C23C54CO3H = IGNORE ;
+IEC1O = IGNORE ;
+C824O2 = IGNORE ;
+NOXYOL1O2 = IGNORE ;
+NC623O2 = IGNORE ;
+TM123BO2 = IGNORE ;
+TM123BOL = IGNORE ;
+TM123BOH = IGNORE ;
+NC623OH = IGNORE ;
+C824OH = IGNORE ;
+CH2CLCH2CL = IGNORE ;
+C46CO3 = IGNORE ;
+EPXM2DLCO3 = IGNORE ;
+C611O2 = IGNORE ;
+BZEMUCCO3 = IGNORE ;
+C23O3CHO = IGNORE ;
+APINCO2 = IGNORE ;
+OCATEC1OOH = IGNORE ;
+HO7C8O2 = IGNORE ;
+HO1C5NO3 = IGNORE ;
+PBENZOLO = IGNORE ;
+OETLBIPRO = IGNORE ;
+CO3C85O2 = IGNORE ;
+LIMAL = IGNORE ;
+NTM123OLO2 = IGNORE ;
+LIMAO = IGNORE ;
+IPCATECOOA = IGNORE ;
+PRCOFORMO = IGNORE ;
+NOPINDO2 = IGNORE ;
+PROL11MO = IGNORE ;
+C927OH = IGNORE ;
+ETBEAOOH = IGNORE ;
+CHCL2COOH = IGNORE ;
+TM123BPAN = IGNORE ;
+NOPINDOH = IGNORE ;
+C918O = IGNORE ;
+C618O2 = IGNORE ;
+HO8C9O = IGNORE ;
+MCOOTBO2 = IGNORE ;
+CL12PROP = IGNORE ;
+NTM123OLOH = IGNORE ;
+C8BCOOH = IGNORE ;
+HO13C3CO3 = IGNORE ;
+MIBKAO2 = IGNORE ;
+CO1H63OH = IGNORE ;
+CO2N3CO3H = IGNORE ;
+MECOACEOOH = IGNORE ;
+CL12PRBOH = IGNORE ;
+C7BDCOOH = IGNORE ;
+C5OH2CO4O = IGNORE ;
+LIMALBO = IGNORE ;
+PBZMUCNO3 = IGNORE ;
+SBUACBOH = IGNORE ;
+C56OOH = IGNORE ;
+C630O2 = IGNORE ;
+MXYLPAN = IGNORE ;
+TCE = IGNORE ;
+IPNCATECO = IGNORE ;
+IPNCATECH = IGNORE ;
+C630OH = IGNORE ;
+C55OOH = IGNORE ;
+C929OH = IGNORE ;
+C525O2 = IGNORE ;
+HCOCOHCO3 = IGNORE ;
+NC101OOH = IGNORE ;
+CL12PRBO2 = IGNORE ;
+NONOOH = IGNORE ;
+M22C43O = IGNORE ;
+MIBKAOH = IGNORE ;
+CO1H63O2 = IGNORE ;
+C817OOH = IGNORE ;
+PTNCATECO2 = IGNORE ;
+C813OOH = IGNORE ;
+HO8C9O2 = IGNORE ;
+C66NO35OOH = IGNORE ;
+IC3H7OOH = IGNORE ;
+SBUTACET = IGNORE ;
+C3H7CHOO = IGNORE ;
+C53NO324CO = IGNORE ;
+MTBEACHOO2 = IGNORE ;
+DM35EBOOH = IGNORE ;
+ISOPCO = IGNORE ;
+BUTDCO = IGNORE ;
+MPHCOMEO = IGNORE ;
+C51OOH = IGNORE ;
+PBENZOLOOH = IGNORE ;
+EBENZ = IGNORE ;
+C87CO2H = IGNORE ;
+EMPHCOME = IGNORE ;
+C117O2 = IGNORE ;
+EMPHCOMO = IGNORE ;
+MALANHYOOH = IGNORE ;
+HMACO2H = IGNORE ;
+MEKBOOH = IGNORE ;
+NTM124QO = IGNORE ;
+PETLQOH = IGNORE ;
+C811CO3H = IGNORE ;
+DNPXYOLOOH = IGNORE ;
+LIMOOB = IGNORE ;
+LIMOOA = IGNORE ;
+C713O = IGNORE ;
+MTBEAOOH = IGNORE ;
+NTM124QOOH = IGNORE ;
+PETLQO2 = IGNORE ;
+C514CO23OH = IGNORE ;
+C74O2 = IGNORE ;
+INAHCO2H = IGNORE ;
+PXYBIPERO2 = IGNORE ;
+OXCATECOOA = IGNORE ;
+C117OH = IGNORE ;
+H2M3C4CO3H = IGNORE ;
+NC4EDCO2 = IGNORE ;
+C919O = IGNORE ;
+C1013O = IGNORE ;
+PRONOCOPO2 = IGNORE ;
+BCBOOA = IGNORE ;
+C147O = IGNORE ;
+NDNPXYOLO = IGNORE ;
+BCBOOH = IGNORE ;
+CO346C8 = IGNORE ;
+C7CO2DBCO3 = IGNORE ;
+STYRENO2 = IGNORE ;
+C5DBCO2CO3 = IGNORE ;
+C924O = IGNORE ;
+PXYQONE = IGNORE ;
+C811O = IGNORE ;
+C816CO = IGNORE ;
+MPRBNO3OOH = IGNORE ;
+C2CL3OHBO = IGNORE ;
+C129O = IGNORE ;
+NTM124OLOH = IGNORE ;
+IC7DICARB = IGNORE ;
+PRONEMOXO2 = IGNORE ;
+PBFUCO = IGNORE ;
+C4NO3CO3H = IGNORE ;
+C5CONO34O2 = IGNORE ;
+C6PRCO4DB = IGNORE ;
+C23O3ECPAN = IGNORE ;
+BCAOOH = IGNORE ;
+NPBNZOLO2 = IGNORE ;
+NPBNZOLOH = IGNORE ;
+C113CO = IGNORE ;
+O = IGNORE ;
+OXCATEC1O = IGNORE ;
+C627PAN = IGNORE ;
+PHCOCOCO = IGNORE ;
+RGDCO2H = IGNORE ;
+C6PAN5 = IGNORE ;
+CHOMOHCO3 = IGNORE ;
+PRONEMOXOH = IGNORE ;
+C5OHCO4OOH = IGNORE ;
+HCOCH2CO2H = IGNORE ;
+NTM124OLO2 = IGNORE ;
+MXCATECOOA = IGNORE ;
+IC7DCCO2 = IGNORE ;
+IC7DCCO3 = IGNORE ;
+C7ADCCO3H = IGNORE ;
+NTM135OLO = IGNORE ;
+MMALNHY2OH = IGNORE ;
+TM124MUO3H = IGNORE ;
+C616OOH = IGNORE ;
+M33C4OOH = IGNORE ;
+HEPT3ONE = IGNORE ;
+C52NO31O = IGNORE ;
+PHC3OOH = IGNORE ;
+GLYPAN = IGNORE ;
+NPHEN1O = IGNORE ;
+IC7DCCO2H = IGNORE ;
+C143CO = IGNORE ;
+ACBUONAOH = IGNORE ;
+C79O = IGNORE ;
+PMALANHYO = IGNORE ;
+PHCOETOOH = IGNORE ;
+METLMUCOH = IGNORE ;
+C89O2 = IGNORE ;
+CO2C54CHO = IGNORE ;
+PROL1MCO3H = IGNORE ;
+C4NO32M1O2 = IGNORE ;
+CO3C75OOH = IGNORE ;
+C147OH = IGNORE ;
+C147O2 = IGNORE ;
+C519CHO = IGNORE ;
+OXNNCATOOH = IGNORE ;
+C89OH = IGNORE ;
+MC52CO2OH = IGNORE ;
+DNCRES = IGNORE ;
+METLMUCO2 = IGNORE ;
+EMPHCO3 = IGNORE ;
+MMALANHYO = IGNORE ;
+HEX2ONBO = IGNORE ;
+C6H13CO3H = IGNORE ;
+H2M3C4CHO = IGNORE ;
+HM22CO3 = IGNORE ;
+C930OOH = IGNORE ;
+NC72O = IGNORE ;
+C721PAN = IGNORE ;
+OETLMUCPAN = IGNORE ;
+TM124BPRO = IGNORE ;
+ISOPDOOH = IGNORE ;
+C6CO34 = IGNORE ;
+MTBEBCO3H = IGNORE ;
+TM124BO = IGNORE ;
+C6134CO2OH = IGNORE ;
+IC4CHOAO2 = IGNORE ;
+INDOOH = IGNORE ;
+CL12PRCOOH = IGNORE ;
+C108O = IGNORE ;
+M22C4 = IGNORE ;
+HO6C7CO3 = IGNORE ;
+DNIPBNZLO = IGNORE ;
+CHCLOOA = IGNORE ;
+CO24C63O = IGNORE ;
+C6IPRCO4DB = IGNORE ;
+H3M3C5CO3H = IGNORE ;
+PXNNCATCO2 = IGNORE ;
+C7MJPCO3 = IGNORE ;
+BUTDAOOH = IGNORE ;
+OXYCATECH = IGNORE ;
+C131CO = IGNORE ;
+C727CO = IGNORE ;
+C830O = IGNORE ;
+BCSOZNO3 = IGNORE ;
+C66OOH = IGNORE ;
+CO235C6 = IGNORE ;
+CO235C7 = IGNORE ;
+PHXN = IGNORE ;
+ACETMECO3 = IGNORE ;
+C1211NO3 = IGNORE ;
+EIPKBOH = IGNORE ;
+C1210OH = IGNORE ;
+MPHGLYOX = IGNORE ;
+C7EDICARB = IGNORE ;
+DMMAO = IGNORE ;
+C1210O2 = IGNORE ;
+EIPKBO2 = IGNORE ;
+NBPINBOOH = IGNORE ;
+DFC = IGNORE ;
+SC4H9O2 = IGNORE ;
+PXYL = IGNORE ;
+MACRNBPAN = IGNORE ;
+M2HEXAOOH = IGNORE ;
+T123NCATO2 = IGNORE ;
+INANCOCHO = IGNORE ;
+INAOH = IGNORE ;
+PXYLCO3 = IGNORE ;
+C94O2 = IGNORE ;
+IBUTOLOHC = IGNORE ;
+IBUTOLOHB = IGNORE ;
+ISOPAO = IGNORE ;
+C3MCODBCO3 = IGNORE ;
+C718O2 = IGNORE ;
+UDECO2 = IGNORE ;
+STYRENOOH = IGNORE ;
+IEB2OOH = IGNORE ;
+MGLYOOB = IGNORE ;
+MGLYOOA = IGNORE ;
+C6CO4M2DB = IGNORE ;
+MXY1OOH = IGNORE ;
+CH3CHOO = IGNORE ;
+C94OH = IGNORE ;
+INAO2 = IGNORE ;
+C77NO3 = IGNORE ;
+INCNCO3 = IGNORE ;
+C656OH = IGNORE ;
+C66OH = IGNORE ;
+BPINBNO3 = IGNORE ;
+C6145COO2 = IGNORE ;
+C5PAN9 = IGNORE ;
+C5PAN8 = IGNORE ;
+C5PAN5 = IGNORE ;
+C5PAN4 = IGNORE ;
+C5PAN7 = IGNORE ;
+C5PAN6 = IGNORE ;
+C5PAN1 = IGNORE ;
+C5PAN3 = IGNORE ;
+C5PAN2 = IGNORE ;
+C828CO3H = IGNORE ;
+C715O = IGNORE ;
+C5CO3OH = IGNORE ;
+NBCO = IGNORE ;
+BCLKAO2 = IGNORE ;
+BCLKAOH = IGNORE ;
+C4OHCO3H = IGNORE ;
+TLEMUCNO3 = IGNORE ;
+C626CO3H = IGNORE ;
+OTNNCATCO2 = IGNORE ;
+C718O = IGNORE ;
+TLFUONOOA = IGNORE ;
+CCLNO3O2 = IGNORE ;
+C733O = IGNORE ;
+C825OOH = IGNORE ;
+PXYMUCCO2H = IGNORE ;
+C43NO34O2 = IGNORE ;
+C5CONO34O = IGNORE ;
+C66O2 = IGNORE ;
+HEX3ONCO2 = IGNORE ;
+IPMALANHYO = IGNORE ;
+NCRES1O = IGNORE ;
+TM123OXMUC = IGNORE ;
+C1310NO3 = IGNORE ;
+C141O = IGNORE ;
+C101OOH = IGNORE ;
+IBUTALBO = IGNORE ;
+C829OOH = IGNORE ;
+HO1C3NO3 = IGNORE ;
+PETLBPR2OH = IGNORE ;
+C922O = IGNORE ;
+BOXCHO = IGNORE ;
+MXYMUCOOH = IGNORE ;
+C127O = IGNORE ;
+NC91CHO = IGNORE ;
+C3NO3COO = IGNORE ;
+HO1C5O = IGNORE ;
+HC23C4CO3H = IGNORE ;
+C717NO3 = IGNORE ;
+NPXYQO2 = IGNORE ;
+HEX3ONCOH = IGNORE ;
+C23O3EO = IGNORE ;
+HO6C7CO3H = IGNORE ;
+C733O2 = IGNORE ;
+M3PEAO2 = IGNORE ;
+C827OH = IGNORE ;
+DMCO2 = IGNORE ;
+CH2OHCCLO = IGNORE ;
+C1013PAN = IGNORE ;
+BCLKBCO = IGNORE ;
+C921O2 = IGNORE ;
+NPRACBOOH = IGNORE ;
+DNPETOLOOH = IGNORE ;
+TM124BOH = IGNORE ;
+C7CO2OHCO3 = IGNORE ;
+HMACO3H = IGNORE ;
+IBUTALO2H = IGNORE ;
+DMCOH = IGNORE ;
+C733OH = IGNORE ;
+C827O2 = IGNORE ;
+T124NNCOOH = IGNORE ;
+BCKSZOO = IGNORE ;
+BZEMUCO2 = IGNORE ;
+PINALOH = IGNORE ;
+DM35EBNO3 = IGNORE ;
+MACRNBCO3 = IGNORE ;
+TCEOHO2 = IGNORE ;
+HMGLOO = IGNORE ;
+EOX2EOLBO2 = IGNORE ;
+INCGLYOX = IGNORE ;
+NPRACCOOH = IGNORE ;
+IBUALANO3 = IGNORE ;
+ACETOL = IGNORE ;
+EMPHO = IGNORE ;
+PINALO2 = IGNORE ;
+NPHEN1O2 = IGNORE ;
+C828O2 = IGNORE ;
+BZEMUCOH = IGNORE ;
+MEMOXYCO2H = IGNORE ;
+C93OOH = IGNORE ;
+C3H5CO2H = IGNORE ;
+BOX2EOHBO2 = IGNORE ;
+DMSO2O = IGNORE ;
+IPROMC2OOH = IGNORE ;
+H13CO2CHO = IGNORE ;
+IC7DCO = IGNORE ;
+C51NO32CO = IGNORE ;
+ETHFORMO = IGNORE ;
+C614O = IGNORE ;
+MET1O = IGNORE ;
+BZEMUCPAN = IGNORE ;
+CH3OCH2O = IGNORE ;
+M2PEBNO3 = IGNORE ;
+C831CO = IGNORE ;
+COO2C3PAN = IGNORE ;
+GLYOO = IGNORE ;
+C103NO3 = IGNORE ;
+CCLOHCHO = IGNORE ;
+GLYOX = IGNORE ;
+OXYLCO3H = IGNORE ;
+INCNCO2H = IGNORE ;
+NIPBNZOLOH = IGNORE ;
+C53OOH = IGNORE ;
+LIMALBOH = IGNORE ;
+CH2OO = IGNORE ;
+MXYOHNO2O2 = IGNORE ;
+IPROMC2O = IGNORE ;
+NEBNZ1O = IGNORE ;
+CYHXOLACO = IGNORE ;
+CO235C5CHO = IGNORE ;
+NPPRBQOOH = IGNORE ;
+PHCOCOCO2 = IGNORE ;
+BZFUO = IGNORE ;
+NPRACCNO3 = IGNORE ;
+HO7C8CO3 = IGNORE ;
+C1H4C5CO3 = IGNORE ;
+C5OH2CO4O2 = IGNORE ;
+LIMALBO2 = IGNORE ;
+CL1GLYOX = IGNORE ;
+HCOCH2O = IGNORE ;
+PERIBUACID = IGNORE ;
+ME2BUOLNO3 = IGNORE ;
+C625OOH = IGNORE ;
+OETLMUCOH = IGNORE ;
+MACRNBCO2H = IGNORE ;
+NDMEPLOOH = IGNORE ;
+C5CO14OOH = IGNORE ;
+INAHPPAN = IGNORE ;
+CO36C11 = IGNORE ;
+C91O = IGNORE ;
+C5EDBCO3H = IGNORE ;
+HO24C5NO3 = IGNORE ;
+HMVKBCHO = IGNORE ;
+HO134C5 = IGNORE ;
+PETLQO = IGNORE ;
+M3PEBO2 = IGNORE ;
+OXYL = IGNORE ;
+MMCFOOH = IGNORE ;
+MVKNO3 = IGNORE ;
+MBO = IGNORE ;
+HCOCH2CO3 = IGNORE ;
+BOXCOEOLO2 = IGNORE ;
+OXY1OHNO2 = IGNORE ;
+C6CO34OOH = IGNORE ;
+NDNT123LO2 = IGNORE ;
+SO3 = IGNORE ;
+PR2OHMOXO = IGNORE ;
+C1210CO2H = IGNORE ;
+C57NO3CO2H = IGNORE ;
+EOX2OLANO3 = IGNORE ;
+M3PEBOH = IGNORE ;
+BUT1ENE = IGNORE ;
+C731NO3 = IGNORE ;
+EIPKAO = IGNORE ;
+HO24C4CO3 = IGNORE ;
+IPECOH = IGNORE ;
+TM123MUNO3 = IGNORE ;
+NDEMPHOLOH = IGNORE ;
+C732CO3H = IGNORE ;
+BIACETO2 = IGNORE ;
+M2PEDOH = IGNORE ;
+C52NO33OOH = IGNORE ;
+CYHEXOLAO = IGNORE ;
+PERBUACID = IGNORE ;
+NC1313OOH = IGNORE ;
+BCBOO = IGNORE ;
+C82O2 = IGNORE ;
+C2H5CO3 = IGNORE ;
+C8PAN1 = IGNORE ;
+METOLOOH = IGNORE ;
+C726CO5O2 = IGNORE ;
+BCBO2 = IGNORE ;
+IPBZBPRNO3 = IGNORE ;
+DNPBNZLOOH = IGNORE ;
+C1215OOH = IGNORE ;
+M2PEDO2 = IGNORE ;
+BIACETOH = IGNORE ;
+IPECO2 = IGNORE ;
+NDEMPHOLO2 = IGNORE ;
+C5CO24O = IGNORE ;
+DMSO2OOH = IGNORE ;
+M2PEAO = IGNORE ;
+ME2BU2OLO = IGNORE ;
+CO2C3PAN = IGNORE ;
+CHCL3 = IGNORE ;
+PRNO3CO2H = IGNORE ;
+TMB1FUONE = IGNORE ;
+C512CO3H = IGNORE ;
+NIPBNZOLO = IGNORE ;
+DMPHCOMO2 = IGNORE ;
+CO3C4CO3 = IGNORE ;
+EPXDLCO3 = IGNORE ;
+IEACHO = IGNORE ;
+TM135MUO2H = IGNORE ;
+NPROACEBO2 = IGNORE ;
+C827PAN = IGNORE ;
+INB1NACO3 = IGNORE ;
+TM123BCO3H = IGNORE ;
+DMPHCOMOH = IGNORE ;
+C6145COOOH = IGNORE ;
+BUT2CO3H = IGNORE ;
+MIBK3COO2 = IGNORE ;
+SC4H9OOH = IGNORE ;
+C731O = IGNORE ;
+MMALNBCO3 = IGNORE ;
+ETBECCO3 = IGNORE ;
+HOCH2COCO2H = IGNORE ;
+C1312CO = IGNORE ;
+N2O5 = IGNORE ;
+TCEOHO = IGNORE ;
+C143O = IGNORE ;
+HO14C6 = IGNORE ;
+C717O = IGNORE ;
+C820OOH = IGNORE ;
+MTNCATCOOH = IGNORE ;
+CY6COCOOOH = IGNORE ;
+C5DIALCO = IGNORE ;
+C514OOH = IGNORE ;
+LIMAOOH = IGNORE ;
+C5MEJCO3 = IGNORE ;
+MEBFUOOH = IGNORE ;
+TBUTCO3 = IGNORE ;
+T123NCTOOH = IGNORE ;
+C125O = IGNORE ;
+C817O2 = IGNORE ;
+M22C4O = IGNORE ;
+BOXPROLAO2 = IGNORE ;
+MPRNO3CO3H = IGNORE ;
+C515OOH = IGNORE ;
+HOIPRGLYOX = IGNORE ;
+PTNNCATCO = IGNORE ;
+C520O = IGNORE ;
+C6MOHCOCO3 = IGNORE ;
+IPRCO3 = IGNORE ;
+DNT123BOL = IGNORE ;
+C928OOH = IGNORE ;
+C615OOH = IGNORE ;
+MTBEAALCO3 = IGNORE ;
+C920O = IGNORE ;
+C517O = IGNORE ;
+NBCALO = IGNORE ;
+BCALAOOH = IGNORE ;
+MACRNPAN = IGNORE ;
+HO3C4CO3H = IGNORE ;
+EPXEALKT = IGNORE ;
+C88CO3H = IGNORE ;
+HM33C3CO3H = IGNORE ;
+C817OH = IGNORE ;
+C42NO33O2 = IGNORE ;
+C126O2 = IGNORE ;
+TBUACET = IGNORE ;
+NOETLQOOH = IGNORE ;
+C617CO3 = IGNORE ;
+C143O2 = IGNORE ;
+OETCATECH = IGNORE ;
+MNNCATECO2 = IGNORE ;
+C6MOHCOPAN = IGNORE ;
+IBUTOLCNO3 = IGNORE ;
+C146CO = IGNORE ;
+ETHGLY = IGNORE ;
+HO3C6NO3 = IGNORE ;
+C1014OH = IGNORE ;
+NC9H20 = IGNORE ;
+M23C4NO3 = IGNORE ;
+C67O2 = IGNORE ;
+HMVKBCO3H = IGNORE ;
+MMCFO = IGNORE ;
+C143OH = IGNORE ;
+NIPBNZ1O2 = IGNORE ;
+NSTYRENOOH = IGNORE ;
+C817PAN = IGNORE ;
+HO1CO3C4O = IGNORE ;
+C521OOH = IGNORE ;
+NC826O2 = IGNORE ;
+C126OO = IGNORE ;
+C141PAN = IGNORE ;
+CHOC3COPAN = IGNORE ;
+CO3C4NO3O2 = IGNORE ;
+IBUTOLCO2 = IGNORE ;
+DMSO2OH = IGNORE ;
+NAOOA = IGNORE ;
+C629O2 = IGNORE ;
+IPRACBOH = IGNORE ;
+HEX3ONBO = IGNORE ;
+PBZBIPERO2 = IGNORE ;
+C147CO = IGNORE ;
+EMPHCOMO2 = IGNORE ;
+C616O = IGNORE ;
+EMPHCOMOH = IGNORE ;
+C136PAN = IGNORE ;
+IPRACBO2 = IGNORE ;
+C611OOH = IGNORE ;
+DMSO2O2 = IGNORE ;
+C629OH = IGNORE ;
+NC3H7O = IGNORE ;
+BENZENE = IGNORE ;
+EMPHCO3H = IGNORE ;
+CO3C4NO3OH = IGNORE ;
+MACROOA = IGNORE ;
+TM135OLOH = IGNORE ;
+HEPTOOH = IGNORE ;
+ETOMEO2 = IGNORE ;
+CL12PRBOOH = IGNORE ;
+BOXPRONOH = IGNORE ;
+C109O2 = IGNORE ;
+TBUTOLOOH = IGNORE ;
+H2M5C65O2 = IGNORE ;
+C626O2 = IGNORE ;
+C126CO2H = IGNORE ;
+PBZQONE = IGNORE ;
+C5M2OHCO3H = IGNORE ;
+EBZMUCPAN = IGNORE ;
+BUFORMOOH = IGNORE ;
+PERPENACID = IGNORE ;
+ACETCOC3H7 = IGNORE ;
+BENZAL = IGNORE ;
+C51OH2OOH = IGNORE ;
+ISOPCNO3 = IGNORE ;
+C109OH = IGNORE ;
+C44O2 = IGNORE ;
+M3CO25C6 = IGNORE ;
+C135OOH = IGNORE ;
+C735OH = IGNORE ;
+INB1OOH = IGNORE ;
+DETLMUO2H = IGNORE ;
+H2MC5O2 = IGNORE ;
+TLEMUCCO = IGNORE ;
+ETHACETO = IGNORE ;
+C811CO3 = IGNORE ;
+NBUACETCO = IGNORE ;
+C98OH = IGNORE ;
+C828OOH = IGNORE ;
+HO1CO4C6 = IGNORE ;
+IPROC21OH = IGNORE ;
+C1211CO = IGNORE ;
+C513OOH = IGNORE ;
+IPROC21O2 = IGNORE ;
+MMALNBCO3H = IGNORE ;
+SBUACBOOH = IGNORE ;
+DNPXYOLO2 = IGNORE ;
+C98O2 = IGNORE ;
+INCNO3 = IGNORE ;
+NC102O = IGNORE ;
+C93O = IGNORE ;
+H13M3C5OOH = IGNORE ;
+PRONOCOPO = IGNORE ;
+C32OH13CO = IGNORE ;
+C735O2 = IGNORE ;
+BOX2OHBOOH = IGNORE ;
+NC826OOH = IGNORE ;
+CH3C2H2O2 = IGNORE ;
+OETOLO = IGNORE ;
+C6H5CO3H = IGNORE ;
+CLETAL = IGNORE ;
+NIPBFUOOH = IGNORE ;
+PMALANHY = IGNORE ;
+HO13C5OOH = IGNORE ;
+DIETETOOH = IGNORE ;
+C614OH = IGNORE ;
+CH4 = IGNORE ;
+HMGLYOO = IGNORE ;
+NC4CO3 = IGNORE ;
+C54CO = IGNORE ;
+C614O2 = IGNORE ;
+EBZBPEROOH = IGNORE ;
+OXYL1O2 = IGNORE ;
+MIPKBNO3 = IGNORE ;
+EMALNHYOOH = IGNORE ;
+PRONO3BO2 = IGNORE ;
+ECOCO2H = IGNORE ;
+ACCOC3H6O2 = IGNORE ;
+HIEPOXB = IGNORE ;
+PNNCATCOOH = IGNORE ;
+C86OOH = IGNORE ;
+CONM2CO2H = IGNORE ;
+BU1ENO3OOH = IGNORE ;
+C1215OH = IGNORE ;
+C141CO3 = IGNORE ;
+PBZPOXMUC = IGNORE ;
+C57OOH = IGNORE ;
+MXNCATECH = IGNORE ;
+MXNCATECO = IGNORE ;
+ISOPAOOH = IGNORE ;
+BCKANO3 = IGNORE ;
+CO25C74OH = IGNORE ;
+C52NO33O2 = IGNORE ;
+CH2CLCOCL = IGNORE ;
+C1H4C5CO3H = IGNORE ;
+M2BKAOH = IGNORE ;
+M2BKAO2 = IGNORE ;
+C736O = IGNORE ;
+C81OOH = IGNORE ;
+A2PAN = IGNORE ;
+CHEXO = IGNORE ;
+HO13C5O = IGNORE ;
+IPEBOOH = IGNORE ;
+EMPOHNO2O = IGNORE ;
+C922O2 = IGNORE ;
+C1215O2 = IGNORE ;
+DM35EBO = IGNORE ;
+MVKOHBO2 = IGNORE ;
+C106OOH = IGNORE ;
+IEC1OOH = IGNORE ;
+H14M4C6 = IGNORE ;
+CL12PRAO2 = IGNORE ;
+C52NO31CO = IGNORE ;
+HMVKNGLYOX = IGNORE ;
+M2PECO = IGNORE ;
+C54NO3 = IGNORE ;
+MIPKAOH = IGNORE ;
+CHOC4DOLO2 = IGNORE ;
+HOCH2CO2H = IGNORE ;
+TLEMUCCO2H = IGNORE ;
+INDHPCO3 = IGNORE ;
+C23O3CCO3 = IGNORE ;
+HC3CCO3H = IGNORE ;
+M2BK = IGNORE ;
+TLFUONOO = IGNORE ;
+BUTDBOOH = IGNORE ;
+C116NO3 = IGNORE ;
+MIPKAO2 = IGNORE ;
+C626OOH = IGNORE ;
+HO14CO3C5 = IGNORE ;
+CL12PRAOH = IGNORE ;
+CCLOHCOOH = IGNORE ;
+C6CONO34OH = IGNORE ;
+CCL3CHO = IGNORE ;
+BOXMCO3 = IGNORE ;
+EPXKTMPAN = IGNORE ;
+C128NO3 = IGNORE ;
+BUOX2ETOH = IGNORE ;
+INDHPPAN = IGNORE ;
+C23O3CPAN = IGNORE ;
+C518CHO = IGNORE ;
+NEBFUO2 = IGNORE ;
+DNPETOL = IGNORE ;
+NDNEBNZLO2 = IGNORE ;
+ACCOETO = IGNORE ;
+C719O = IGNORE ;
+PPRBQCO = IGNORE ;
+C54O = IGNORE ;
+HO2C4O2 = IGNORE ;
+C62CHO = IGNORE ;
+MACO3H = IGNORE ;
+C6CONO34O2 = IGNORE ;
+C123O = IGNORE ;
+METLBPR2OH = IGNORE ;
+C4M3NO32O2 = IGNORE ;
+C114O2 = IGNORE ;
+HYPROPO = IGNORE ;
+CHCL2OH = IGNORE ;
+C731OH = IGNORE ;
+HC4CCO2H = IGNORE ;
+HO2C4CHO = IGNORE ;
+BOXPROLBO = IGNORE ;
+CHCL2O2 = IGNORE ;
+C114OH = IGNORE ;
+MALDIALCO2 = IGNORE ;
+MALDIALCO3 = IGNORE ;
+C7OHCO2PAN = IGNORE ;
+C733CO = IGNORE ;
+NPROACEAO2 = IGNORE ;
+NTMB1FUOOH = IGNORE ;
+C4NO32M2O = IGNORE ;
+OETLMUCO3H = IGNORE ;
+CO23C4NO3 = IGNORE ;
+HOBUT2CO3 = IGNORE ;
+TM135MUCO2 = IGNORE ;
+TM135MUCO3 = IGNORE ;
+LIMONIC = IGNORE ;
+DNPETOLO = IGNORE ;
+OET1O = IGNORE ;
+ETBEAO = IGNORE ;
+C44OOH = IGNORE ;
+METOLO = IGNORE ;
+DMPHOOH = IGNORE ;
+CO1H63NO3 = IGNORE ;
+CO2C54O2 = IGNORE ;
+BZEMUCCO = IGNORE ;
+DIETETO2 = IGNORE ;
+C52OOH = IGNORE ;
+C73O = IGNORE ;
+C825O2 = IGNORE ;
+C134O2 = IGNORE ;
+IEC1O2 = IGNORE ;
+C65OH4O2 = IGNORE ;
+CO1M22CO3H = IGNORE ;
+ALCOCH2OOH = IGNORE ;
+SBUACAOOH = IGNORE ;
+NO3CH2CO3 = IGNORE ;
+C610O = IGNORE ;
+MVKOHANO3 = IGNORE ;
+C51NO32O2 = IGNORE ;
+NC72O2 = IGNORE ;
+M3HEX = IGNORE ;
+NSTYRENO2 = IGNORE ;
+MECOFORMO = IGNORE ;
+C825OH = IGNORE ;
+C134OH = IGNORE ;
+MEK2OOC = IGNORE ;
+MEK2OOA = IGNORE ;
+C5CO14CO2 = IGNORE ;
+C8BCNO3 = IGNORE ;
+MXYOLO2 = IGNORE ;
+DMK2OH = IGNORE ;
+M22C43OOH = IGNORE ;
+C85CO3 = IGNORE ;
+C624CO2H = IGNORE ;
+C7PAN3 = IGNORE ;
+C7PAN2 = IGNORE ;
+C7PAN1 = IGNORE ;
+OTNNCATCO = IGNORE ;
+ACEETOHO = IGNORE ;
+HOIBUTCO3 = IGNORE ;
+H3M2C4CO3 = IGNORE ;
+CYHXONANO3 = IGNORE ;
+DNPBNZOL = IGNORE ;
+C4COMOH3O = IGNORE ;
+ACCOCOMOOH = IGNORE ;
+MXYOLOH = IGNORE ;
+TM123OHNO2 = IGNORE ;
+NPXYOL1O = IGNORE ;
+OXYFUOOH = IGNORE ;
+H1C23C4OOH = IGNORE ;
+H3C2C4CO3 = IGNORE ;
+MTBE = IGNORE ;
+OXNCATECO2 = IGNORE ;
+C511CO3H = IGNORE ;
+MTBK = IGNORE ;
+ACLOOA = IGNORE ;
+NBUACETAO = IGNORE ;
+INANCHO = IGNORE ;
+PROL2FORM = IGNORE ;
+MIBKAOHBO2 = IGNORE ;
+ETBECCO3H = IGNORE ;
+C4CO2OOH = IGNORE ;
+PBZMUCOOH = IGNORE ;
+PET1OOH = IGNORE ;
+C95O = IGNORE ;
+EPXM2C4DAL = IGNORE ;
+C312COPAN = IGNORE ;
+C6CO3OH5O2 = IGNORE ;
+HOC3H6CO2H = IGNORE ;
+M3BU2OLNO3 = IGNORE ;
+C7OHCO2CO3 = IGNORE ;
+C721CHO = IGNORE ;
+CHOCOMOXO2 = IGNORE ;
+NC4OO = IGNORE ;
+MC4CODBPAN = IGNORE ;
+HM33C3CO3 = IGNORE ;
+OETLMUCCO3 = IGNORE ;
+CHOC4OOH = IGNORE ;
+DIIPRETHER = IGNORE ;
+ACO3 = IGNORE ;
+PBN = IGNORE ;
+C5CO2OHPAN = IGNORE ;
+H2 = IGNORE ;
+CO25C74O = IGNORE ;
+H1MC5NO3 = IGNORE ;
+C613OOH = IGNORE ;
+C7CO2DCO3H = IGNORE ;
+ECATEC1OOH = IGNORE ;
+LMLKBOH = IGNORE ;
+C627OH = IGNORE ;
+C7ADCOH = IGNORE ;
+ECATECOOA = IGNORE ;
+EGLYOO = IGNORE ;
+HO2C4NO3 = IGNORE ;
+C54CO3H = IGNORE ;
+HC4ACO3H = IGNORE ;
+PIPN = IGNORE ;
+EGLYOX = IGNORE ;
+NC524O2 = IGNORE ;
+BOXMOH = IGNORE ;
+PET1O2 = IGNORE ;
+MBOBO2 = IGNORE ;
+C7ADCO2 = IGNORE ;
+HM22C4OOH = IGNORE ;
+LMLKBO2 = IGNORE ;
+PINIC = IGNORE ;
+C627O2 = IGNORE ;
+C735O = IGNORE ;
+C517O2 = IGNORE ;
+MTNCATECO = IGNORE ;
+MTNCATECH = IGNORE ;
+C64OOH = IGNORE ;
+NBCALOOH = IGNORE ;
+TBUTCO3H = IGNORE ;
+CNO3CLOH = IGNORE ;
+NAPINBO2 = IGNORE ;
+CNO3CLO2 = IGNORE ;
+CLETO3H = IGNORE ;
+H2M2C4CHO = IGNORE ;
+INDHPCO3H = IGNORE ;
+C23O3CCO3H = IGNORE ;
+HOCO3C54O = IGNORE ;
+NBPINAOOH = IGNORE ;
+C517OH = IGNORE ;
+C5DIALO = IGNORE ;
+HO1C3O = IGNORE ;
+C513CO = IGNORE ;
+NORLIMAL = IGNORE ;
+UDECNO3 = IGNORE ;
+C5DIALO2 = IGNORE ;
+C1312OH = IGNORE ;
+C3MCODBPAN = IGNORE ;
+OCTOH = IGNORE ;
+C6TONOHOOH = IGNORE ;
+NBUACETCO2 = IGNORE ;
+HM2C43O2 = IGNORE ;
+C122O2 = IGNORE ;
+OCTO2 = IGNORE ;
+C126CO3H = IGNORE ;
+CCL3OOH = IGNORE ;
+MBOBNO3 = IGNORE ;
+C819O = IGNORE ;
+BCANO3 = IGNORE ;
+C1312O2 = IGNORE ;
+MTBEAALPAN = IGNORE ;
+C5DIALOH = IGNORE ;
+C8M3CO = IGNORE ;
+C121O = IGNORE ;
+C6DCRBBOH = IGNORE ;
+HEXAO = IGNORE ;
+C63O2 = IGNORE ;
+C312COCO3 = IGNORE ;
+BPINCOOH = IGNORE ;
+PHC3NO3 = IGNORE ;
+BU1ENO3O2 = IGNORE ;
+NC5H12 = IGNORE ;
+C524O = IGNORE ;
+C9M2CO6O = IGNORE ;
+C3COCCO3 = IGNORE ;
+C7CO2M5O = IGNORE ;
+CO2H3CO3H = IGNORE ;
+C7ADCO = IGNORE ;
+C63OH = IGNORE ;
+HO24C5 = IGNORE ;
+C75OOH = IGNORE ;
+MXYMUCCO3 = IGNORE ;
+C129CO = IGNORE ;
+LMKBO = IGNORE ;
+C23C54CO3 = IGNORE ;
+C53NO32O2 = IGNORE ;
+C126CO = IGNORE ;
+C67CHO = IGNORE ;
+INANCOCO2H = IGNORE ;
+MXYFUONE = IGNORE ;
+MPRBNO3PAN = IGNORE ;
+C515CHO = IGNORE ;
+BOXOHETOH = IGNORE ;
+MC6OTKTOOH = IGNORE ;
+C146OH = IGNORE ;
+CHOC2CO3H = IGNORE ;
+C4M3NO3ONE = IGNORE ;
+C146O2 = IGNORE ;
+PEN2ONE1O2 = IGNORE ;
+NC101CO = IGNORE ;
+NC4OHCPAN = IGNORE ;
+TMBCO3 = IGNORE ;
+ETBECO = IGNORE ;
+TM124BPRO2 = IGNORE ;
+MXYL1OOH = IGNORE ;
+BCBOCOO = IGNORE ;
+EMPHO2 = IGNORE ;
+C68OH = IGNORE ;
+OXYQOOH = IGNORE ;
+C4CONO3O2 = IGNORE ;
+CRESOOH = IGNORE ;
+OETLQOOH = IGNORE ;
+C831NO3 = IGNORE ;
+C71O = IGNORE ;
+HOC4CHOO2 = IGNORE ;
+C8OHCO2CO3 = IGNORE ;
+INB1O = IGNORE ;
+CO3C5CHO = IGNORE ;
+HO3C76OOH = IGNORE ;
+C629O = IGNORE ;
+C68O2 = IGNORE ;
+C132OOH = IGNORE ;
+C6CO3OHOOH = IGNORE ;
+HIEB1O2 = IGNORE ;
+HO3C5CO3H = IGNORE ;
+PPRBQOOH = IGNORE ;
+C8DBCO2CO3 = IGNORE ;
+NPETOL1OOH = IGNORE ;
+ACO2H = IGNORE ;
+C5H11CO3 = IGNORE ;
+BUTDANO3 = IGNORE ;
+NPROACET = IGNORE ;
+C137CO3H = IGNORE ;
+C6H5CH2CO3 = IGNORE ;
+NBUACCOOH = IGNORE ;
+C6TRONOHO2 = IGNORE ;
+IPRCHOOA = IGNORE ;
+C618CO2H = IGNORE ;
+C612O = IGNORE ;
+CO24C63O2 = IGNORE ;
+NC4MDCO2H = IGNORE ;
+C79OOH = IGNORE ;
+NDNT123LO = IGNORE ;
+BCCO = IGNORE ;
+MC5CO2OHO2 = IGNORE ;
+ETBECO2 = IGNORE ;
+IPBFUOOH = IGNORE ;
+C518CO2H = IGNORE ;
+C2CL2OH2 = IGNORE ;
+HM23C4O = IGNORE ;
+NBUTDAOOH = IGNORE ;
+HM2C43CHO = IGNORE ;
+NOETLQO = IGNORE ;
+MACRO = IGNORE ;
+ACCOPROOH = IGNORE ;
+C111OOH = IGNORE ;
+PRONEMOXO = IGNORE ;
+C23O3ECO2H = IGNORE ;
+M3PECOOH = IGNORE ;
+C2CL2OHO = IGNORE ;
+ETBECOH = IGNORE ;
+C104OOH = IGNORE ;
+C97O = IGNORE ;
+CO2C54CO3H = IGNORE ;
+NC728OOH = IGNORE ;
+C93O2 = IGNORE ;
+C235C6CO3H = IGNORE ;
+HO1C4NO3 = IGNORE ;
+C5COCHOOOH = IGNORE ;
+NEOPO2 = IGNORE ;
+CH3SOO = IGNORE ;
+C719O2 = IGNORE ;
+C9DCO2 = IGNORE ;
+NPRACBOH = IGNORE ;
+HO1C4O2 = IGNORE ;
+EPXM2DCO2H = IGNORE ;
+C615PAN = IGNORE ;
+C1211O2 = IGNORE ;
+C830CO3 = IGNORE ;
+C23O3ECO3 = IGNORE ;
+C1211OH = IGNORE ;
+OXYBIPERO = IGNORE ;
+C9DCOH = IGNORE ;
+C719OH = IGNORE ;
+C8236CO = IGNORE ;
+BUT2CO3 = IGNORE ;
+CH3SO2 = IGNORE ;
+CH3SO3 = IGNORE ;
+NEOPOH = IGNORE ;
+C918CHO = IGNORE ;
+MEMOXYCO3 = IGNORE ;
+C105OOH = IGNORE ;
+HO5CO8C10 = IGNORE ;
+C93OH = IGNORE ;
+CY6DIONOH = IGNORE ;
+C6CO4DB = IGNORE ;
+MALANHY2OH = IGNORE ;
+C55O2 = IGNORE ;
+NOETOLO = IGNORE ;
+C1215CO = IGNORE ;
+ACCOMEPAN = IGNORE ;
+C4ME22OH = IGNORE ;
+HO3C4NO3 = IGNORE ;
+CH3OCH2O2 = IGNORE ;
+CY6TRIONO2 = IGNORE ;
+CH3OCH2OH = IGNORE ;
+C517CO3H = IGNORE ;
+M33C4OH = IGNORE ;
+H3C25C5CHO = IGNORE ;
+INB1HPPAN = IGNORE ;
+BCKBOOH = IGNORE ;
+CY6DIONO2 = IGNORE ;
+BOXCOEOL = IGNORE ;
+MC6OTKETOH = IGNORE ;
+PBZBPEROOH = IGNORE ;
+M23C43O2 = IGNORE ;
+HSO3 = IGNORE ;
+PXYMUCCO = IGNORE ;
+ME2BUOLO2 = IGNORE ;
+DMKOHO2 = IGNORE ;
+NTM135LOOH = IGNORE ;
+ENCATECO = IGNORE ;
+DNEBNZOL = IGNORE ;
+M23C43OH = IGNORE ;
+DEMPHSMS1O = IGNORE ;
+C52NO31O2 = IGNORE ;
+MBOAO = IGNORE ;
+BPINAO = IGNORE ;
+MXCATEC1O2 = IGNORE ;
+PBZMUCCO3H = IGNORE ;
+C7MO3OHOOH = IGNORE ;
+C4NO3M2OOH = IGNORE ;
+BZFUONOO = IGNORE ;
+NEOPOOH = IGNORE ;
+MTBKO = IGNORE ;
+TM135MUOOH = IGNORE ;
+C116CO3 = IGNORE ;
+C920O2 = IGNORE ;
+C512NO3 = IGNORE ;
+C8OHO2CO3H = IGNORE ;
+TM124NO2O2 = IGNORE ;
+PPRBQO2 = IGNORE ;
+C5PAN19 = IGNORE ;
+MTBEACHO13 = IGNORE ;
+C5PAN11 = IGNORE ;
+C5PAN10 = IGNORE ;
+C5PAN13 = IGNORE ;
+C5PAN12 = IGNORE ;
+C5PAN15 = IGNORE ;
+C5PAN14 = IGNORE ;
+C5PAN17 = IGNORE ;
+C5PAN16 = IGNORE ;
+C820O2 = IGNORE ;
+PPRBQOH = IGNORE ;
+C7DCPAN = IGNORE ;
+BOXPRONEAO = IGNORE ;
+HO3C5CO3 = IGNORE ;
+HO3C3PAN = IGNORE ;
+HO12CO3C4 = IGNORE ;
+C3MNO3PAN = IGNORE ;
+CHOCL = IGNORE ;
+C826CO3OOH = IGNORE ;
+HEXCO = IGNORE ;
+H13CO2CO3 = IGNORE ;
+HO13M2C4 = IGNORE ;
+PHIC3NO3 = IGNORE ;
+EOX2ETA2OH = IGNORE ;
+CHCL2O = IGNORE ;
+PMALNHYOOH = IGNORE ;
+HEX2ONANO3 = IGNORE ;
+NPRACBNO3 = IGNORE ;
+C622CHO = IGNORE ;
+BUTDBO2 = IGNORE ;
+C4ECO2O2 = IGNORE ;
+MPRBNO3CHO = IGNORE ;
+C4OHCO3 = IGNORE ;
+BCKET = IGNORE ;
+C111O2 = IGNORE ;
+BRETO2H = IGNORE ;
+DMMALANHY = IGNORE ;
+KLIMONONIC = IGNORE ;
+MECOACETO2 = IGNORE ;
+IPGLOO = IGNORE ;
+C142NO3 = IGNORE ;
+TBUACCO = IGNORE ;
+CH2CL3O2 = IGNORE ;
+MXYLO2 = IGNORE ;
+NIPBNZ1O = IGNORE ;
+NT123L1OOH = IGNORE ;
+MXYLOH = IGNORE ;
+MXYLOL = IGNORE ;
+CHCLOO = IGNORE ;
+TM123BPRO = IGNORE ;
+CH2CL3OH = IGNORE ;
+C830CO2H = IGNORE ;
+HO3C6O2 = IGNORE ;
+IPBZMUCOOH = IGNORE ;
+C58NO3CO3H = IGNORE ;
+NC524OH = IGNORE ;
+C5COOHCO3H = IGNORE ;
+C128OOH = IGNORE ;
+C1013OOH = IGNORE ;
+CH3OH = IGNORE ;
+IPECOOH = IGNORE ;
+C1014NO3 = IGNORE ;
+DEMPHOLO2 = IGNORE ;
+C722OOH = IGNORE ;
+INB1NAPAN = IGNORE ;
+C77O = IGNORE ;
+MIBKBOH = IGNORE ;
+HOIBUTCO3H = IGNORE ;
+MIBKBO2 = IGNORE ;
+TMB2FUO2 = IGNORE ;
+C413COOOH = IGNORE ;
+MCATEC1O2 = IGNORE ;
+DEMPHOLOH = IGNORE ;
+NC10H22 = IGNORE ;
+CH3O2 = IGNORE ;
+CLCOCLMEO = IGNORE ;
+HIEB2O = IGNORE ;
+NBZFUO = IGNORE ;
+C1012OOH = IGNORE ;
+C712NO3 = IGNORE ;
+MIBKAOHNO3 = IGNORE ;
+NBZQOOH = IGNORE ;
+DMCNO3 = IGNORE ;
+M3HEXAO = IGNORE ;
+C718CO3H = IGNORE ;
+MEKANO3 = IGNORE ;
+NMVK = IGNORE ;
+EPXM2DLPAN = IGNORE ;
+C729CO2H = IGNORE ;
+HEX3ONDO = IGNORE ;
+MEKBO = IGNORE ;
+CH3SOOOH = IGNORE ;
+BCALO = IGNORE ;
+BCAO = IGNORE ;
+ETOMECO3H = IGNORE ;
+C8M2CO6OOH = IGNORE ;
+NPBNZ1O2 = IGNORE ;
+C729O2 = IGNORE ;
+NPBNZ1OOH = IGNORE ;
+EPXMEC4DAL = IGNORE ;
+CL12PRCO = IGNORE ;
+C715CO2O2 = IGNORE ;
+PXCATEC1O2 = IGNORE ;
+M3PECO2 = IGNORE ;
+C148CO = IGNORE ;
+HO5C6O = IGNORE ;
+C623OH = IGNORE ;
+EPXMKTCO3 = IGNORE ;
+IPRBQCO = IGNORE ;
+PRPAL2CO2H = IGNORE ;
+HNMVKOOH = IGNORE ;
+BCALNO3 = IGNORE ;
+C41OOH = IGNORE ;
+MACRNO3 = IGNORE ;
+C623O2 = IGNORE ;
+C133NO3 = IGNORE ;
+HM22C3CO3 = IGNORE ;
+PRNO3CO3 = IGNORE ;
+MNCATECO2 = IGNORE ;
+M3PECOH = IGNORE ;
+C715CO2OH = IGNORE ;
+PXCATEC1O = IGNORE ;
+C6CO134OOH = IGNORE ;
+NBUTOLBO2 = IGNORE ;
+HO3C116O2 = IGNORE ;
+C3ME3CO3H = IGNORE ;
+C6DIALO2 = IGNORE ;
+C1215NO3 = IGNORE ;
+HM2C43OOH = IGNORE ;
+NOPINONE = IGNORE ;
+T124NCATEC = IGNORE ;
+INAHPAN = IGNORE ;
+C825O = IGNORE ;
+HCOCOHPAN = IGNORE ;
+ETHFORMO2 = IGNORE ;
+C83O2 = IGNORE ;
+C6COCHOOOH = IGNORE ;
+C513OH = IGNORE ;
+ETHFORMOH = IGNORE ;
+C513O2 = IGNORE ;
+TBUACPAN = IGNORE ;
+C7236CO = IGNORE ;
+PXYEPOXMUC = IGNORE ;
+C6DIALOH = IGNORE ;
+C630CO = IGNORE ;
+INDO = IGNORE ;
+TM123MUOOH = IGNORE ;
+DMEPHOLO2 = IGNORE ;
+VINOH = IGNORE ;
+C5DBCO2PAN = IGNORE ;
+ETHOX = IGNORE ;
+ACCOCOETO = IGNORE ;
+MIPKBO = IGNORE ;
+LMLKBCO = IGNORE ;
+C7CO2M5OH = IGNORE ;
+TBUACCO3H = IGNORE ;
+MMCFO2 = IGNORE ;
+OTCATEC1O2 = IGNORE ;
+COO2C4O2 = IGNORE ;
+BCCO2 = IGNORE ;
+C4OCCOHNO3 = IGNORE ;
+BCCOH = IGNORE ;
+MMCFOH = IGNORE ;
+TM135BPRO = IGNORE ;
+C4ME3HO23 = IGNORE ;
+HOIPRCHO = IGNORE ;
+PROL11MNO3 = IGNORE ;
+HEXBNO3 = IGNORE ;
+DMEPHOLOH = IGNORE ;
+BOXPRONAO2 = IGNORE ;
+CO23C65OOH = IGNORE ;
+NC4OOA = IGNORE ;
+NBZFUOOH = IGNORE ;
+C141OOH = IGNORE ;
+C69O = IGNORE ;
+C141OOA = IGNORE ;
+HO2CO3C4O = IGNORE ;
+CO2M33CO2H = IGNORE ;
+C109OOH = IGNORE ;
+DICLETO = IGNORE ;
+C4M3NO31O = IGNORE ;
+M2HEXBNO3 = IGNORE ;
+C63NO32O = IGNORE ;
+C7OHO2CO3H = IGNORE ;
+BCALAO2 = IGNORE ;
+CH3SO4NO2 = IGNORE ;
+BCALAOH = IGNORE ;
+NC4PDCO2H = IGNORE ;
+C146OOH = IGNORE ;
+PE1ENEBO = IGNORE ;
+DNT123LO = IGNORE ;
+NC3H7NO3 = IGNORE ;
+BPINCO = IGNORE ;
+C4M2NO3ONE = IGNORE ;
+ME3CO2BUOL = IGNORE ;
+MXYL1O2 = IGNORE ;
+CL2OHOOH = IGNORE ;
+C816O2 = IGNORE ;
+PTNCATCOOH = IGNORE ;
+C46CO2H = IGNORE ;
+C728O = IGNORE ;
+C139OOH = IGNORE ;
+C8DCO2CO3H = IGNORE ;
+MXYLOOH = IGNORE ;
+C819O2 = IGNORE ;
+C732CO = IGNORE ;
+C519PAN = IGNORE ;
+CHOOCH2OOH = IGNORE ;
+H2M3CO4CHO = IGNORE ;
+ACRPAN = IGNORE ;
+C52O = IGNORE ;
+PXYMUCPAN = IGNORE ;
+C626CO3 = IGNORE ;
+TM124BPOOH = IGNORE ;
+EPXMDLCO3H = IGNORE ;
+C3M3CHOOOH = IGNORE ;
+C43NO3CO3 = IGNORE ;
+LMKBNO3 = IGNORE ;
+C142O2 = IGNORE ;
+DNT123LO2 = IGNORE ;
+IPROMCCO3 = IGNORE ;
+C129O2 = IGNORE ;
+C6CYTONO2 = IGNORE ;
+BCLKCOH = IGNORE ;
+CHOC4O2 = IGNORE ;
+ISOPAO2 = IGNORE ;
+MPRANO3O = IGNORE ;
+C64OH = IGNORE ;
+TLOBIPEROH = IGNORE ;
+C67CO3H = IGNORE ;
+C4CO2DBPAN = IGNORE ;
+C64O2 = IGNORE ;
+C56O = IGNORE ;
+C928O = IGNORE ;
+TM124QO = IGNORE ;
+PERPROACID = IGNORE ;
+DMEPH1O = IGNORE ;
+C24O3CCO2H = IGNORE ;
+NEBNZ1O2 = IGNORE ;
+IPROC21O = IGNORE ;
+C83O = IGNORE ;
+HEX3ONAOOH = IGNORE ;
+PXYOLO2 = IGNORE ;
+C136CO2 = IGNORE ;
+C136CO3 = IGNORE ;
+BCLKCO2 = IGNORE ;
+C822O = IGNORE ;
+T123CAT1O = IGNORE ;
+DIEKBO = IGNORE ;
+C131CO3H = IGNORE ;
+IPRACOH = IGNORE ;
+ACO3H = IGNORE ;
+C143NO3 = IGNORE ;
+C916OOH = IGNORE ;
+CO4DBC8 = IGNORE ;
+CO4DBC9 = IGNORE ;
+LMLKAO = IGNORE ;
+C82NO3 = IGNORE ;
+C152NO3 = IGNORE ;
+TM124QOH = IGNORE ;
+M23C4OOH = IGNORE ;
+MVKO = IGNORE ;
+TM124QO2 = IGNORE ;
+C3ME3CO3 = IGNORE ;
+CHOC4OHO2 = IGNORE ;
+CO2M3C4CHO = IGNORE ;
+PROPALO = IGNORE ;
+ETHENO3O2 = IGNORE ;
+C625O = IGNORE ;
+LIMONENE = IGNORE ;
+EBZMUCOH = IGNORE ;
+CYC6DIONO2 = IGNORE ;
+C714OH = IGNORE ;
+MIBKAOHAO = IGNORE ;
+C75O = IGNORE ;
+C7MOHCOPAN = IGNORE ;
+BU1ENO3O = IGNORE ;
+NCRES1OOH = IGNORE ;
+H2M3CO5C6 = IGNORE ;
+TM135MUNO3 = IGNORE ;
+NMBOAOOH = IGNORE ;
+C6OTKETOOH = IGNORE ;
+TBUTOLNO3 = IGNORE ;
+C927NO3 = IGNORE ;
+C7CO4DB = IGNORE ;
+HO3CO46C8 = IGNORE ;
+C714O2 = IGNORE ;
+NOETOLOOH = IGNORE ;
+IPBZPOXMUC = IGNORE ;
+C930NO3 = IGNORE ;
+EBZMUCO2 = IGNORE ;
+BOX2ECHO = IGNORE ;
+EPXEKTCO3H = IGNORE ;
+MTBEACHO = IGNORE ;
+IPBENZ = IGNORE ;
+CO23C4CHO = IGNORE ;
+BUTACID = IGNORE ;
+NPTLQOOH = IGNORE ;
+C736OH = IGNORE ;
+BCALBO = IGNORE ;
+HO7C8O = IGNORE ;
+C97OH = IGNORE ;
+C4CONO3CO = IGNORE ;
+PINALOOH = IGNORE ;
+NC1313OH = IGNORE ;
+PET1O = IGNORE ;
+HO7C8CO3H = IGNORE ;
+C7DDCCO2H = IGNORE ;
+CO2H3CHO = IGNORE ;
+NC1313O2 = IGNORE ;
+NDNMETLOOH = IGNORE ;
+TM135MUCO = IGNORE ;
+C97O2 = IGNORE ;
+INANCOPAN = IGNORE ;
+IPRFORMOOH = IGNORE ;
+CH3SO2CHO = IGNORE ;
+C736O2 = IGNORE ;
+TM123OOH = IGNORE ;
+C131OH = IGNORE ;
+TMBCO3H = IGNORE ;
+C6145COO = IGNORE ;
+CLETPAN = IGNORE ;
+CL12PRAO = IGNORE ;
+C923NO3 = IGNORE ;
+CHCL2CHO = IGNORE ;
+CO2C54O = IGNORE ;
+DNC524CO = IGNORE ;
+PE2ENEBO = IGNORE ;
+NOPINBOH = IGNORE ;
+CHEXOOH = IGNORE ;
+C104O = IGNORE ;
+ETHOXOOH = IGNORE ;
+NOPINBO2 = IGNORE ;
+UDEC3ONE = IGNORE ;
+C4MNO31OOH = IGNORE ;
+C622NO3 = IGNORE ;
+CHCL2CH3 = IGNORE ;
+NDNMETOLO2 = IGNORE ;
+NAPINBO = IGNORE ;
+C715CO2OOH = IGNORE ;
+C131O2 = IGNORE ;
+PXY1O = IGNORE ;
+NIPBFUO2 = IGNORE ;
+BCSOZOH = IGNORE ;
+BOCOCH2OOH = IGNORE ;
+C124OOH = IGNORE ;
+EPXMEDLCO3 = IGNORE ;
+BOXCOCHO = IGNORE ;
+DIEKBNO3 = IGNORE ;
+IPCATEC1O = IGNORE ;
+C713OOH = IGNORE ;
+C79O2 = IGNORE ;
+PHCOMEOH = IGNORE ;
+HMGLYOOA = IGNORE ;
+BZFUOOH = IGNORE ;
+PR2OHMONO3 = IGNORE ;
+CH2OHCOCL = IGNORE ;
+C925O2 = IGNORE ;
+C129OOH = IGNORE ;
+ETHOHNO3 = IGNORE ;
+BCKAOOH = IGNORE ;
+C730NO3 = IGNORE ;
+C929CO = IGNORE ;
+C93CO = IGNORE ;
+BCSOZO2 = IGNORE ;
+MXNCATECO2 = IGNORE ;
+IPEAOH = IGNORE ;
+CO234C65O2 = IGNORE ;
+PBZQO = IGNORE ;
+C3MNO3CHO = IGNORE ;
+CO23C65O = IGNORE ;
+HEX2ONAO2 = IGNORE ;
+C731PAN = IGNORE ;
+BZEPOXMUC = IGNORE ;
+DMPHCOMOOH = IGNORE ;
+EMALANHY = IGNORE ;
+C116OOH = IGNORE ;
+IPBENZOLO = IGNORE ;
+C6CO34O = IGNORE ;
+HO1C6O2 = IGNORE ;
+HO3C4CO3 = IGNORE ;
+HO14CO2C5 = IGNORE ;
+HO2C43CO2H = IGNORE ;
+CO3H4PAN = IGNORE ;
+EIPKBOOH = IGNORE ;
+NLIMALO2 = IGNORE ;
+CHCL2CO2H = IGNORE ;
+HO8C9CO3 = IGNORE ;
+COO2C3CHO = IGNORE ;
+C98NO3 = IGNORE ;
+M2HEXAO = IGNORE ;
+C115OOH = IGNORE ;
+EMPHGLYOX = IGNORE ;
+PBENZO2 = IGNORE ;
+C1011PAN = IGNORE ;
+C133O2 = IGNORE ;
+EMALNHY2OH = IGNORE ;
+CH2BRO = IGNORE ;
+C42CO3 = IGNORE ;
+BZBIPERO = IGNORE ;
+HNBIACET = IGNORE ;
+IPBFUO = IGNORE ;
+C522CO3H = IGNORE ;
+C7DCCO2H = IGNORE ;
+HO13CO4C5 = IGNORE ;
+MXYMUCPAN = IGNORE ;
+NPROACEAO = IGNORE ;
+C7CO2DBAL = IGNORE ;
+HEXAOOH = IGNORE ;
+MMFOOH = IGNORE ;
+PETLMUCCO = IGNORE ;
+C115O2 = IGNORE ;
+CATEC1OOH = IGNORE ;
+C815CO2OH = IGNORE ;
+TOL4OHNO2 = IGNORE ;
+NO3CH2CO3H = IGNORE ;
+ACBUOAOOH = IGNORE ;
+C815CO2O2 = IGNORE ;
+NOXYFUOOH = IGNORE ;
+C819OOH = IGNORE ;
+HMACRO = IGNORE ;
+C64OH5O2 = IGNORE ;
+C729NO3 = IGNORE ;
+CCLOHCOCL = IGNORE ;
+C3M3OH2CHO = IGNORE ;
+CH2CLCHCL2 = IGNORE ;
+NDMEPHOLO = IGNORE ;
+MMFO2 = IGNORE ;
+TPENT2ENE = IGNORE ;
+MIBK3COOOH = IGNORE ;
+NCATECO = IGNORE ;
+EPXEKTPAN = IGNORE ;
+DMMANO3 = IGNORE ;
+C118O = IGNORE ;
+C123NO3 = IGNORE ;
+C103CO = IGNORE ;
+C7ADCPAN = IGNORE ;
+PETOLO2 = IGNORE ;
+PHCOCOCOOH = IGNORE ;
+ACEETOHOOH = IGNORE ;
+ETOLO = IGNORE ;
+BPINAO2 = IGNORE ;
+M2PEBO2 = IGNORE ;
+MXYMUCCO3H = IGNORE ;
+C4OHPAN = IGNORE ;
+DDEC3ONE = IGNORE ;
+NTM123LOOH = IGNORE ;
+HO3C76O2 = IGNORE ;
+C108NO3 = IGNORE ;
+M2PEBOH = IGNORE ;
+BPINAOH = IGNORE ;
+HEXCOOH = IGNORE ;
+EIPEOOH = IGNORE ;
+NDNOXYOLO = IGNORE ;
+C615OH = IGNORE ;
+M22C3CO3H = IGNORE ;
+GLYOOB = IGNORE ;
+GLYOOC = IGNORE ;
+GLYOOA = IGNORE ;
+C81O = IGNORE ;
+MTBEBCHO = IGNORE ;
+C820O = IGNORE ;
+MMFOH = IGNORE ;
+CDICLETH = IGNORE ;
+C6ETCO4DB = IGNORE ;
+CYHXONAO2 = IGNORE ;
+DMPHO = IGNORE ;
+TBUACOH = IGNORE ;
+C6CO3HO25 = IGNORE ;
+CH3SCH2O2 = IGNORE ;
+MC4CONO3O = IGNORE ;
+DDECO2 = IGNORE ;
+HO3C106OOH = IGNORE ;
+C1013CO3 = IGNORE ;
+C66NO35O = IGNORE ;
+C615CO3H = IGNORE ;
+C5NO3COAO = IGNORE ;
+DNMXYOLO = IGNORE ;
+PRCOOMPAN = IGNORE ;
+DNIPBZLOOH = IGNORE ;
+DDECOH = IGNORE ;
+CH2CLCH2O = IGNORE ;
+CH3SCH2OH = IGNORE ;
+C52NO3 = IGNORE ;
+TRICLETH = IGNORE ;
+ACETCOC2H5 = IGNORE ;
+MOXCOCH2OH = IGNORE ;
+CYHXONAOH = IGNORE ;
+CO25C6CO3 = IGNORE ;
+C831O2 = IGNORE ;
+C627O = IGNORE ;
+M23C4O = IGNORE ;
+CY6DIONO = IGNORE ;
+DE35TOH = IGNORE ;
+TLFUO = IGNORE ;
+NON3ONE = IGNORE ;
+NTM124OLO = IGNORE ;
+C7ECO4DB = IGNORE ;
+DIETETO = IGNORE ;
+C4M2NO33O2 = IGNORE ;
+C5DBCOCO3H = IGNORE ;
+HO2MC5OOH = IGNORE ;
+H3M3C4CHO = IGNORE ;
+C1214OOH = IGNORE ;
+HMVKBPAN = IGNORE ;
+HCOCH2CO3H = IGNORE ;
+NDNOETOLO = IGNORE ;
+DE35TO2 = IGNORE ;
+C831OH = IGNORE ;
+HO2CO4CHO = IGNORE ;
+HOBUT2CO3H = IGNORE ;
+HO3C116NO3 = IGNORE ;
+EBZBIPERO = IGNORE ;
+C118OOH = IGNORE ;
+C141OO = IGNORE ;
+C141OH = IGNORE ;
+NOPINDO = IGNORE ;
+C822CO3H = IGNORE ;
+C4H6 = IGNORE ;
+C810O2 = IGNORE ;
+C141O2 = IGNORE ;
+C710O = IGNORE ;
+IBUTALBO2 = IGNORE ;
+C618O = IGNORE ;
+DIBRETOH = IGNORE ;
+CHOC2H4O2 = IGNORE ;
+BUTALO2 = IGNORE ;
+CO235C6OOH = IGNORE ;
+DMEBMUO2H = IGNORE ;
+C5MEJCO3H = IGNORE ;
+CO14O3CO2H = IGNORE ;
+HM23C4NO3 = IGNORE ;
+C148OH = IGNORE ;
+C106O = IGNORE ;
+COCCOHCOOH = IGNORE ;
+H2M3C4NO3 = IGNORE ;
+CLCOCLMOOH = IGNORE ;
+CO24C4CHO = IGNORE ;
+HO2CO4C5O = IGNORE ;
+MXY1OHNO2 = IGNORE ;
+C148O2 = IGNORE ;
+C1211CO3H = IGNORE ;
+C5M2OHOPAN = IGNORE ;
+C4H9CHO = IGNORE ;
+HEX2ONE = IGNORE ;
+INAHCHO = IGNORE ;
+IPROPOLO = IGNORE ;
+C6H5CH2OOH = IGNORE ;
+C118NO3 = IGNORE ;
+C624OH = IGNORE ;
+IPCATEC1O2 = IGNORE ;
+OXYMUCCO2H = IGNORE ;
+SBUACETBO = IGNORE ;
+PRCOFOROOH = IGNORE ;
+HM22C4O2 = IGNORE ;
+C615CO = IGNORE ;
+C6HO1CO3O = IGNORE ;
+OETLMUCCO = IGNORE ;
+C58OOH = IGNORE ;
+DNPBNZLO2 = IGNORE ;
+NC3CO3H = IGNORE ;
+TM123BPNO3 = IGNORE ;
+TM135OLO = IGNORE ;
+INB1GLYOX = IGNORE ;
+NBPINAO = IGNORE ;
+IPRFORMO2 = IGNORE ;
+C517NO3 = IGNORE ;
+IPRFORMOH = IGNORE ;
+C6HO1CO3O2 = IGNORE ;
+C928PAN = IGNORE ;
+C926OOH = IGNORE ;
+CH3CHO = IGNORE ;
+DMEBMUNO3 = IGNORE ;
+C511CHO = IGNORE ;
+NMXYQO = IGNORE ;
+DMEPHOLO = IGNORE ;
+C7CO2M5OOH = IGNORE ;
+C9DCNO3 = IGNORE ;
+C624O2 = IGNORE ;
+PINAL = IGNORE ;
+C1212NO3 = IGNORE ;
+C922OOH = IGNORE ;
+EOCOCH2OOH = IGNORE ;
+PGLOO = IGNORE ;
+C6PAN2 = IGNORE ;
+C6PAN3 = IGNORE ;
+C6PAN1 = IGNORE ;
+C6PAN6 = IGNORE ;
+C6PAN7 = IGNORE ;
+C6PAN4 = IGNORE ;
+C622CO2H = IGNORE ;
+C1212OH = IGNORE ;
+C6PAN8 = IGNORE ;
+C6PAN9 = IGNORE ;
+PROLNO3 = IGNORE ;
+BUT2OL = IGNORE ;
+C6EO2HCO3H = IGNORE ;
+NDNPBNZLO2 = IGNORE ;
+C4NO3CO3 = IGNORE ;
+C54CHO = IGNORE ;
+MGLOOA = IGNORE ;
+MGLOOB = IGNORE ;
+MGLOOC = IGNORE ;
+C1212O2 = IGNORE ;
+C5COHOCO3H = IGNORE ;
+NPXYFUO = IGNORE ;
+MVK = IGNORE ;
+ACLOO = IGNORE ;
+NMEBFUOOH = IGNORE ;
+NBUACANO3 = IGNORE ;
+HO2C54CO3H = IGNORE ;
+HEX2ONAOOH = IGNORE ;
+C61CHO = IGNORE ;
+LMKAO2 = IGNORE ;
+C927O2 = IGNORE ;
+NPXYOL1OOH = IGNORE ;
+C8O2OHCO3H = IGNORE ;
+C65O = IGNORE ;
+HO13C5 = IGNORE ;
+C3DIOLO = IGNORE ;
+C3MCODBCO2 = IGNORE ;
+H2M2C3CO3H = IGNORE ;
+IPROMCPAN = IGNORE ;
+C91OOH = IGNORE ;
+MTBEBO = IGNORE ;
+NBUACETBO2 = IGNORE ;
+C1311OH = IGNORE ;
+M3PEANO3 = IGNORE ;
+BOXMCO3H = IGNORE ;
+BOXOHPROL = IGNORE ;
+C1311O2 = IGNORE ;
+INANCOCO3H = IGNORE ;
+BCALACO = IGNORE ;
+C4CHO2O = IGNORE ;
+C125O2 = IGNORE ;
+COCCOH2CO2 = IGNORE ;
+EPXMKTCO3H = IGNORE ;
+C615CO3 = IGNORE ;
+C2H5MECOOA = IGNORE ;
+ACBUONANO3 = IGNORE ;
+C623OOH = IGNORE ;
+C519CO3H = IGNORE ;
+H2M2C65O = IGNORE ;
+LMKAOH = IGNORE ;
+EPXMEDCO2H = IGNORE ;
+CH3CHOOA = IGNORE ;
+CH3CHOOC = IGNORE ;
+CH3CHOOB = IGNORE ;
+DETLBPR2OH = IGNORE ;
+NPROACECO = IGNORE ;
+CO36C10 = IGNORE ;
+HCOCO3 = IGNORE ;
+CO36C12 = IGNORE ;
+H2M2C65NO3 = IGNORE ;
+IPBZBIPRO = IGNORE ;
+HO8C9OOH = IGNORE ;
+BPINCNO3 = IGNORE ;
+IPROC21OOH = IGNORE ;
+IPRACBCO3H = IGNORE ;
+HCOCO2H = IGNORE ;
+PBENZ = IGNORE ;
+DETLMUCO2 = IGNORE ;
+DETLMUCO3 = IGNORE ;
+NPXYOLOH = IGNORE ;
+CH3CHCLO2 = IGNORE ;
+HEX3ONAO2 = IGNORE ;
+HIEB1OOH = IGNORE ;
+C822CO2 = IGNORE ;
+C822CO3 = IGNORE ;
+TM135OLO2 = IGNORE ;
+BCARY = IGNORE ;
+METACETOH = IGNORE ;
+CLCOCL2OOH = IGNORE ;
+C6OTKETO = IGNORE ;
+CONM2CHO = IGNORE ;
+M3CO245C6 = IGNORE ;
+C929OOH = IGNORE ;
+C87O = IGNORE ;
+HEX3ONAOH = IGNORE ;
+IECCO3 = IGNORE ;
+C826O = IGNORE ;
+BZEMUCCO3H = IGNORE ;
+CY6TRION = IGNORE ;
+NPXYOLO2 = IGNORE ;
+HO3C76NO3 = IGNORE ;
+OXYMUCNO3 = IGNORE ;
+CHOOMCO2H = IGNORE ;
+OXNNCATCO = IGNORE ;
+NDNPXYLOOH = IGNORE ;
+C7CO2OHPAN = IGNORE ;
+DMMAOH = IGNORE ;
+C731O2 = IGNORE ;
+ETHOXO2 = IGNORE ;
+HO5C6CO3 = IGNORE ;
+C62OOH = IGNORE ;
+LMLKET = IGNORE ;
+PTNNCATOOH = IGNORE ;
+PXY1OHNO2 = IGNORE ;
+TL4ONO2OOH = IGNORE ;
+NBUACCOH = IGNORE ;
+DMMAO2 = IGNORE ;
+C23O3ECOOH = IGNORE ;
+PBZN = IGNORE ;
+NC4PDCO2 = IGNORE ;
+C831OOH = IGNORE ;
+MCATEC1OOH = IGNORE ;
+APINBO = IGNORE ;
+OET1OHNO2 = IGNORE ;
+BZBIPEROOH = IGNORE ;
+NCO23CHO = IGNORE ;
+OXYOLO = IGNORE ;
+C621O = IGNORE ;
+PETLBIPRO2 = IGNORE ;
+METLQOOH = IGNORE ;
+CO2C3CHO = IGNORE ;
+MPRKAO2 = IGNORE ;
+CH2CL3OOH = IGNORE ;
+C510OOH = IGNORE ;
+MPRKAOH = IGNORE ;
+NC6H14 = IGNORE ;
+C5H8 = IGNORE ;
+C728OOH = IGNORE ;
+MC6OTKETO = IGNORE ;
+IPNNCATCO = IGNORE ;
+INB1HPCO2H = IGNORE ;
+C1014CO = IGNORE ;
+ACCOCOEOOH = IGNORE ;
+IPROPOLO2 = IGNORE ;
+CONM2PAN = IGNORE ;
+CO2M3C5OH = IGNORE ;
+IPRBQOOH = IGNORE ;
+CH2CLOOH = IGNORE ;
+T124NNCTO2 = IGNORE ;
+ACEPROPONE = IGNORE ;
+DECOH = IGNORE ;
+CO23C54O2 = IGNORE ;
+C736CO = IGNORE ;
+C3MNO3CO3 = IGNORE ;
+PE2ENEAO2 = IGNORE ;
+M2BKBO = IGNORE ;
+C5124COOOH = IGNORE ;
+MNCATECOOH = IGNORE ;
+DEMPHOLO = IGNORE ;
+C57NO3CO3 = IGNORE ;
+C822NO3 = IGNORE ;
+C116CO3H = IGNORE ;
+TM135MUOH = IGNORE ;
+DECO2 = IGNORE ;
+NOXYFUO2 = IGNORE ;
+MEKBO2 = IGNORE ;
+HO2C43CO3 = IGNORE ;
+TM124NOOH = IGNORE ;
+M2PECOOH = IGNORE ;
+CRESOH = IGNORE ;
+MTBEANO3 = IGNORE ;
+CRESOL = IGNORE ;
+HO1C5O2 = IGNORE ;
+C7M2CO5OOH = IGNORE ;
+C7CODBCO3 = IGNORE ;
+MXYL = IGNORE ;
+TM124BOOH = IGNORE ;
+CO2HO4C6 = IGNORE ;
+MPHCOMEOH = IGNORE ;
+C710OOH = IGNORE ;
+C4NO3M1OOH = IGNORE ;
+C78CO = IGNORE ;
+MPHCOMEO2 = IGNORE ;
+CO2C43CHO = IGNORE ;
+MECOFOROOH = IGNORE ;
+MTBEBCO2H = IGNORE ;
+C4ECO2OOH = IGNORE ;
+EBFUO = IGNORE ;
+CRESO2 = IGNORE ;
+C7M6CO2O = IGNORE ;
+HO1C4OOH = IGNORE ;
+C41CO3 = IGNORE ;
+H2C3OCO = IGNORE ;
+C54O2 = IGNORE ;
+C826NO3 = IGNORE ;
+C14O3ECHO = IGNORE ;
+TLEMUCPAN = IGNORE ;
+C618PAN = IGNORE ;
+NO3CH2CHO = IGNORE ;
+C117OOH = IGNORE ;
+M23C43OOH = IGNORE ;
+C718PAN = IGNORE ;
+NOPINCOOH = IGNORE ;
+CO2C4CO3H = IGNORE ;
+C930O = IGNORE ;
+C5124COO2 = IGNORE ;
+HO2C3CO3 = IGNORE ;
+ETBEBOOH = IGNORE ;
+EBENZOOH = IGNORE ;
+C136CO2H = IGNORE ;
+C54OH = IGNORE ;
+C88CHO = IGNORE ;
+IEB2O = IGNORE ;
+DNMETOLO = IGNORE ;
+NMETLQOOH = IGNORE ;
+PETLQONE = IGNORE ;
+H3M3C5O = IGNORE ;
+DNPHENO2 = IGNORE ;
+NC71OOH = IGNORE ;
+DMPHCOMO = IGNORE ;
+C65NO36CHO = IGNORE ;
+CO14O3CHO = IGNORE ;
+DMPHCOME = IGNORE ;
+C3ME3CHOO = IGNORE ;
+HO24C5O = IGNORE ;
+C23O3MCO2H = IGNORE ;
+OXYFUO = IGNORE ;
+CO1C6OOH = IGNORE ;
+CCOCOCOH = IGNORE ;
+C714OOH = IGNORE ;
+C727OOH = IGNORE ;
+C7MJPPAN = IGNORE ;
+C52NO33CO = IGNORE ;
+ME2BU2OLO2 = IGNORE ;
+BZBIPERO2 = IGNORE ;
+C6CO134 = IGNORE ;
+MXNNCATCO = IGNORE ;
+C2H5O2 = IGNORE ;
+C5O45OHPAN = IGNORE ;
+C67O = IGNORE ;
+T124CTCOOA = IGNORE ;
+NBUTDBO = IGNORE ;
+INDHCHO = IGNORE ;
+C68OOH = IGNORE ;
+C23O3MO2 = IGNORE ;
+M3HEXAOOH = IGNORE ;
+C828CHO = IGNORE ;
+C9DCO = IGNORE ;
+IBUTALBO2H = IGNORE ;
+C2CL3OHAO2 = IGNORE ;
+PXYQO2 = IGNORE ;
+PXYQOH = IGNORE ;
+HEX2ONCO2 = IGNORE ;
+NMBOAO2 = IGNORE ;
+NOXYQO = IGNORE ;
+NPRACANO3 = IGNORE ;
+C2H5OH = IGNORE ;
+CHEX2ENE = IGNORE ;
+C4OH2CPAN = IGNORE ;
+HOC3H6CO3 = IGNORE ;
+C116PAN = IGNORE ;
+H2M4CO5C6 = IGNORE ;
+C8BC = IGNORE ;
+PETLMUCOH = IGNORE ;
+CO25C6OOH = IGNORE ;
+PETLMUCO2 = IGNORE ;
+C1011CO3 = IGNORE ;
+DIIPRETOOH = IGNORE ;
+H13CO2C3 = IGNORE ;
+IPEAO = IGNORE ;
+C731CO2H = IGNORE ;
+C1211PAN = IGNORE ;
+C5CO2DBCO3 = IGNORE ;
+BCBCO = IGNORE ;
+NC4OHCO3H = IGNORE ;
+C58O = IGNORE ;
+HO2CO5C7 = IGNORE ;
+HO2CO5C6 = IGNORE ;
+BOXMPAN = IGNORE ;
+ETOHCO2M = IGNORE ;
+HO1CO3C4O2 = IGNORE ;
+IPBZMUCNO3 = IGNORE ;
+C824O = IGNORE ;
+C1210CO3 = IGNORE ;
+C1210CO2 = IGNORE ;
+INDHPAN = IGNORE ;
+PE1ENEANO3 = IGNORE ;
+NPEBQO2 = IGNORE ;
+C6CO23HO5 = IGNORE ;
+HM2C43CO2H = IGNORE ;
+MC3ODBCO2H = IGNORE ;
+MALDIALPAN = IGNORE ;
+C89CO2H = IGNORE ;
+C6DICARBO2 = IGNORE ;
+CL2OHCO3 = IGNORE ;
+C3DBCO3 = IGNORE ;
+C72OOH = IGNORE ;
+CO23C3CHO = IGNORE ;
+ETBECPAN = IGNORE ;
+PRNOCOPOOH = IGNORE ;
+NTLFUOOH = IGNORE ;
+C62NO33OOH = IGNORE ;
+C85O = IGNORE ;
+ENNCATCOOH = IGNORE ;
+PXYBPEROOH = IGNORE ;
+HO2M2C4NO3 = IGNORE ;
+SBUACETAO2 = IGNORE ;
+C7ADCCO2H = IGNORE ;
+TM124BCO3H = IGNORE ;
+CO24M3CHO = IGNORE ;
+CYHXONAO = IGNORE ;
+CCL3O2 = IGNORE ;
+TBOCOCHO = IGNORE ;
+C104OH = IGNORE ;
+C104O2 = IGNORE ;
+MEBFUO = IGNORE ;
+MIBKANO3 = IGNORE ;
+CCL3OH = IGNORE ;
+CO2M33CO3 = IGNORE ;
+C132O = IGNORE ;
+C1013NO3 = IGNORE ;
+NC730OOH = IGNORE ;
+{ Peroxy radicals. }
+{ WARNING: The following species do not have SMILES strings in the database. 
+          If any of these are peroxy radicals the RO2 sum will be wrong. 
+    }
+#INLINE F90_RCONST 
+ USE constants
+ !end of USE statements 
+ !
+ ! start of executable statements
+ RO2 = & 
+ C(ind_HOCH2CH2O2) + C(ind_HO1C3O2) + C(ind_HYPROPO2) + C(ind_IPROPOLO2) + & 
+   C(ind_NBUTOLAO2) + C(ind_NBUTOLBO2) + C(ind_BUT2OLO2) + &  
+   C(ind_IBUTOLBO2) + C(ind_IBUTOLCO2) + C(ind_TBUTOLO2) + C(ind_HO3C5O2) &  
+   + C(ind_PE2ENEBO2) + C(ind_HM2C43O2) + C(ind_M2BUOL2O2) + &  
+   C(ind_HM33C3O2) + C(ind_ME3BUOLO2) + C(ind_HO2M2C4O2) + &  
+   C(ind_ME2BU2OLO2) + C(ind_PROL11MO2) + C(ind_H2M3C4O2) + &  
+   C(ind_ME2BUOLO2) + C(ind_CYHEXOLAO2) + C(ind_MIBKAOHAO2) + &  
+   C(ind_MIBKAOHBO2) + C(ind_MIBKHO4O2) + C(ind_CH3CO3) + C(ind_NMBOAO2) &  
+   + C(ind_NMBOBO2) + C(ind_MBOAO2) + C(ind_MBOBO2) + C(ind_CH3O2) + &  
+   C(ind_HCOCH2O2) + C(ind_C2H5CO3) + C(ind_C2H5O2) + C(ind_C3H7CO3) + &  
+   C(ind_BUTALO2) + C(ind_NC3H7O2) + C(ind_IPRCO3) + C(ind_IBUTALBO2) + &  
+   C(ind_IBUTALCO2) + C(ind_IC3H7O2) + C(ind_C4H9CO3) + C(ind_C4CHOBO2) + &  
+   C(ind_NC4H9O2) + C(ind_ACO3) + C(ind_ACO3B) + C(ind_OCCOHCO2) + &  
+   C(ind_CH3C2H2O2) + C(ind_MACO3) + C(ind_MACRO2) + C(ind_MACROHO2) + &  
+   C(ind_C3DBCO3) + C(ind_C4CONO3O2) + C(ind_C4NO3COO2) + &  
+   C(ind_C4OCCOHCO2) + C(ind_COCCOH2CO2) + C(ind_SC4H9O2) + &  
+   C(ind_IC4H9O2) + C(ind_TC4H9O2) + C(ind_PEAO2) + C(ind_PEBO2) + &  
+   C(ind_PECO2) + C(ind_IPEAO2) + C(ind_IPEBO2) + C(ind_IPECO2) + &  
+   C(ind_NEOPO2) + C(ind_HEXAO2) + C(ind_HEXBO2) + C(ind_HEXCO2) + &  
+   C(ind_M2PEAO2) + C(ind_M2PEBO2) + C(ind_M2PECO2) + C(ind_M2PEDO2) + &  
+   C(ind_M3PEAO2) + C(ind_M3PEBO2) + C(ind_M3PECO2) + C(ind_M22C43O2) + &  
+   C(ind_M22C4O2) + C(ind_M33C4O2) + C(ind_M23C43O2) + C(ind_M23C4O2) + &  
+   C(ind_HEPTO2) + C(ind_M2HEXAO2) + C(ind_M2HEXBO2) + C(ind_M3HEXAO2) + &  
+   C(ind_M3HEXBO2) + C(ind_OCTO2) + C(ind_NONO2) + C(ind_DECO2) + &  
+   C(ind_UDECO2) + C(ind_DDECO2) + C(ind_CHEXO2) + C(ind_ETHENO3O2) + &  
+   C(ind_PRONO3AO2) + C(ind_PRONO3BO2) + C(ind_BU1ENO3O2) + &  
+   C(ind_C43NO34O2) + C(ind_HO3C4O2) + C(ind_C42NO33O2) + &  
+   C(ind_MPRANO3O2) + C(ind_MPRBNO3O2) + C(ind_C51NO32O2) + &  
+   C(ind_C52NO31O2) + C(ind_PE1ENEAO2) + C(ind_PE1ENEBO2) + &  
+   C(ind_C52NO33O2) + C(ind_C53NO32O2) + C(ind_PE2ENEAO2) + &  
+   C(ind_C4NO32M1O2) + C(ind_C4NO32M2O2) + C(ind_C4M3NO31O2) + &  
+   C(ind_C4M3NO32O2) + C(ind_IPRCHOOA) + C(ind_ME3BU2OLO2) + &  
+   C(ind_C4M2NO32O2) + C(ind_C4M2NO33O2) + C(ind_C65NO36O2) + &  
+   C(ind_C66NO35O2) + C(ind_C6OH5O2) + C(ind_HO5C6O2) + C(ind_C62NO33O2) &  
+   + C(ind_C63NO32O2) + C(ind_C64OH5O2) + C(ind_C65OH4O2) + &  
+   C(ind_C4ME2NO3O2) + C(ind_C4ME2OHO2) + C(ind_BZBIPERO2) + &  
+   C(ind_C6H5CH2O2) + C(ind_TLBIPERO2) + C(ind_OXYLO2) + &  
+   C(ind_OXYBIPERO2) + C(ind_MXYLO2) + C(ind_MXYBIPERO2) + C(ind_PXYLO2) &  
+   + C(ind_PXYBIPERO2) + C(ind_C6H5C2H4O2) + C(ind_EBZBIPERO2) + &  
+   C(ind_PHC3O2) + C(ind_PBZBIPERO2) + C(ind_PHIC3O2) + C(ind_IPBZBIPRO2) &  
+   + C(ind_TM123BO2) + C(ind_TM123BPRO2) + C(ind_TM124BO2) + &  
+   C(ind_TM124BPRO2) + C(ind_TMBO2) + C(ind_TM135BPRO2) + C(ind_ETOLO2) + &  
+   C(ind_OETLBIPRO2) + C(ind_METLBIPRO2) + C(ind_PETLBIPRO2) + &  
+   C(ind_DM35EBO2) + C(ind_DMEBIPRO2) + C(ind_DE35TO2) + &  
+   C(ind_DETLBIPRO2) + C(ind_NSTYRENO2) + C(ind_STYRENO2) + &  
+   C(ind_C6H5CO3) + C(ind_C6H5O2) + C(ind_CH2CLO2) + C(ind_CHCL2O2) + &  
+   C(ind_CCL3O2) + C(ind_CCL3CH2O2) + C(ind_TCEOHO2) + C(ind_C2CL3OHAO2) &  
+   + C(ind_C2CL3OHBO2) + C(ind_C2CL2OHO2) + C(ind_DICLETO2) + &  
+   C(ind_CH2OHCL2O2) + C(ind_CL2OHCH2O2) + C(ind_CL12PRAO2) + &  
+   C(ind_CL12PRBO2) + C(ind_CL12PRCO2) + C(ind_CH3CCL2O2) + &  
+   C(ind_CHCL2CH2O2) + C(ind_CH2CLCH2O2) + C(ind_CH3CHCLO2) + &  
+   C(ind_CHCL2CL2O2) + C(ind_CH2CL3O2) + C(ind_CHCL3O2) + C(ind_CCLNO3O2) &  
+   + C(ind_CNO3CLO2) + C(ind_CCLOHCH2O2) + C(ind_CH2OHCCLO2) + &  
+   C(ind_NBUTDAO2) + C(ind_NBUTDBO2) + C(ind_BUTDAO2) + C(ind_BUTDBO2) + &  
+   C(ind_BUTDCO2) + C(ind_NISOPO2) + C(ind_ISOPAO2) + C(ind_ISOPBO2) + &  
+   C(ind_ISOPCO2) + C(ind_ISOPDO2) + C(ind_CHOOCH2O2) + C(ind_METHACETO2) &  
+   + C(ind_MOCOCH2O2) + C(ind_ACETC2H4O2) + C(ind_EOCOCH2O2) + &  
+   C(ind_ETHACETO2) + C(ind_NPROACEAO2) + C(ind_NPROACEBO2) + &  
+   C(ind_NPROACECO2) + C(ind_IPRACBO2) + C(ind_IPROACETO2) + &  
+   C(ind_NBUACETAO2) + C(ind_NBUACETBO2) + C(ind_NBUACETCO2) + &  
+   C(ind_SBUACETAO2) + C(ind_SBUACETBO2) + C(ind_MCOOTBO2) + &  
+   C(ind_TBOCOCH2O2) + C(ind_CH3OCH2O2) + C(ind_DIETETO2) + &  
+   C(ind_ETOC2O2) + C(ind_MTBEAO2) + C(ind_MTBEBO2) + C(ind_DIIPRETO2) + &  
+   C(ind_IPROMC2O2) + C(ind_ETBEAO2) + C(ind_ETBEBO2) + C(ind_ETBECO2) + &  
+   C(ind_MO2EOLAO2) + C(ind_MO2EOLBO2) + C(ind_EOX2EOLAO2) + &  
+   C(ind_EOX2EOLBO2) + C(ind_PR2OHMOXO2) + C(ind_H2C3OCO2) + &  
+   C(ind_BOX2EOHAO2) + C(ind_BOX2EOHBO2) + C(ind_BOXPROLAO2) + &  
+   C(ind_BOXPROLBO2) + C(ind_CH2BRO2) + C(ind_DIBRETO2) + &  
+   C(ind_CH3COCH2O2) + C(ind_MEKAO2) + C(ind_MEKBO2) + C(ind_MEKCO2) + &  
+   C(ind_CO2C54O2) + C(ind_MPRKAO2) + C(ind_DIEKAO2) + C(ind_DIEKBO2) + &  
+   C(ind_MIPKAO2) + C(ind_MIPKBO2) + C(ind_HEX2ONAO2) + C(ind_HEX2ONBO2) &  
+   + C(ind_HEX2ONCO2) + C(ind_HEX3ONAO2) + C(ind_HEX3ONBO2) + &  
+   C(ind_HEX3ONCO2) + C(ind_HEX3ONDO2) + C(ind_MIBKAO2) + C(ind_MIBKBO2) &  
+   + C(ind_MTBKO2) + C(ind_CYHXONAO2) + C(ind_NAPINAO2) + C(ind_NAPINBO2) &  
+   + C(ind_APINAO2) + C(ind_APINBO2) + C(ind_APINCO2) + C(ind_NBPINAO2) + &  
+   C(ind_NBPINBO2) + C(ind_BPINAO2) + C(ind_BPINBO2) + C(ind_BPINCO2) + &  
+   C(ind_NLIMO2) + C(ind_LIMAO2) + C(ind_LIMBO2) + C(ind_LIMCO2) + &  
+   C(ind_NBCO2) + C(ind_BCAO2) + C(ind_BCBO2) + C(ind_BCCO2) + &  
+   C(ind_DMMAO2) + C(ind_DMMBO2) + C(ind_DMCO2) + C(ind_CH3SCH2O2) + &  
+   C(ind_HODMSO2) + C(ind_ETHOXO2) + C(ind_BUT2CO3) + C(ind_C3ME3CO3) + &  
+   C(ind_C3ME3CHOO2) + C(ind_HOCH2CO3) + C(ind_CH3CHOHCO3) + &  
+   C(ind_IPRHOCO3) + C(ind_HCOCO3) + C(ind_IPRCHOO) + C(ind_BZEMUCCO3) + &  
+   C(ind_BZEMUCO2) + C(ind_C5DIALO2) + C(ind_NPHENO2) + C(ind_PHENO2) + &  
+   C(ind_CRESO2) + C(ind_NCRESO2) + C(ind_TLEMUCCO3) + C(ind_TLEMUCO2) + &  
+   C(ind_C615CO2O2) + C(ind_OXYMUCCO3) + C(ind_OXYMUCO2) + &  
+   C(ind_MC6CO2O2) + C(ind_NOXYOLO2) + C(ind_OXYOLO2) + C(ind_MXYMUCCO3) &  
+   + C(ind_MXYMUCO2) + C(ind_C726CO5O2) + C(ind_MXYOLO2) + &  
+   C(ind_NMXYOLO2) + C(ind_PXYMUCCO3) + C(ind_PXYMUCO2) + &  
+   C(ind_C6M5CO2O2) + C(ind_NPXYOLO2) + C(ind_PXYOLO2) + C(ind_EBENZOLO2) &  
+   + C(ind_NEBNZOLO2) + C(ind_EBZMUCCO3) + C(ind_EBZMUCO2) + &  
+   C(ind_C715CO2O2) + C(ind_NPBNZOLO2) + C(ind_PBENZOLO2) + &  
+   C(ind_PBZMUCCO3) + C(ind_PBZMUCO2) + C(ind_C815CO2O2) + &  
+   C(ind_IPBENZOLO2) + C(ind_NIPBNZOLO2) + C(ind_IPBZMUCCO3) + &  
+   C(ind_IPGLOOB) + C(ind_IPBZMUCO2) + C(ind_C7M15CO2O2) + &  
+   C(ind_NTM123OLO2) + C(ind_TM123OLO2) + C(ind_TM123MUCO2) + &  
+   C(ind_NTM124OLO2) + C(ind_TM124OLO2) + C(ind_TM124MUCO3) + &  
+   C(ind_TM124MUCO2) + C(ind_C7CO2M5O2) + C(ind_NTM135OLO2) + &  
+   C(ind_TM135OLO2) + C(ind_TM135MUCO3) + C(ind_TM135MUCO2) + &  
+   C(ind_C7M2CO5O2) + C(ind_OETLMUCCO3) + C(ind_OETLMUCO2) + &  
+   C(ind_MC7CO2O2) + C(ind_NOETOLO2) + C(ind_OETOLO2) + C(ind_METLMUCCO3) &  
+   + C(ind_METLMUCO2) + C(ind_C826CO3O2) + C(ind_METOLO2) + &  
+   C(ind_NMETOLO2) + C(ind_PETLMUCCO3) + C(ind_PETLMUCO2) + &  
+   C(ind_C7M6CO2O2) + C(ind_NPETOLO2) + C(ind_PETOLO2) + C(ind_DMEBMUCO3) &  
+   + C(ind_DMEBMUCO2) + C(ind_C8M2CO6O2) + C(ind_NDMEPHOLO2) + &  
+   C(ind_DMEPHOLO2) + C(ind_NDEMPHOLO2) + C(ind_DEMPHOLO2) + &  
+   C(ind_DETLMUCO3) + C(ind_DETLMUCO2) + C(ind_C9M2CO6O2) + &  
+   C(ind_HMVKAO2) + C(ind_HMVKBO2) + C(ind_MVKO2) + C(ind_MEMOXYCO3) + &  
+   C(ind_EOX2MECO3) + C(ind_ETOMEO2) + C(ind_PRONEMOXO2) + C(ind_BOXMCO3) &  
+   + C(ind_BOX2MO2) + C(ind_BOXPRONAO2) + C(ind_BOXPRONBO2) + &  
+   C(ind_C107O2) + C(ind_C109O2) + C(ind_C96O2) + C(ind_NOPINAO2) + &  
+   C(ind_NOPINBO2) + C(ind_NOPINCO2) + C(ind_NOPINDO2) + C(ind_LIMALAO2) &  
+   + C(ind_LIMALBO2) + C(ind_C923O2) + C(ind_BCALAO2) + C(ind_BCALBO2) + &  
+   C(ind_C136O2) + C(ind_BCALCO2) + C(ind_C141O2) + C(ind_HOC2H4CO3) + &  
+   C(ind_HOIPRCO3) + C(ind_HO13C5O2) + C(ind_HO3C4CO3) + C(ind_C54O2) + &  
+   C(ind_H2M2C3CO3) + C(ind_PROL1MCO3) + C(ind_C56O2) + C(ind_HO2C43CO3) &  
+   + C(ind_MIBKCOOHO2) + C(ind_NC4OHCO3) + C(ind_C4OH2CO3) + &  
+   C(ind_CO2C3CO3) + C(ind_HO2C3CO3) + C(ind_IBUDIALCO3) + &  
+   C(ind_PROPALO2) + C(ind_CO3C4CO3) + C(ind_HO1C4O2) + C(ind_A2PANOO) + &  
+   C(ind_HCOCOHCO3) + C(ind_CHOMOHCO3) + C(ind_CO2H3CO3) + C(ind_HO1C5O2) &  
+   + C(ind_HO2C5O2) + C(ind_C52O2) + C(ind_TBUTCO3) + C(ind_HO1C6O2) + &  
+   C(ind_C5H11CO3) + C(ind_HO2C6O2) + C(ind_HO3C6O2) + C(ind_HO1MC5O2) + &  
+   C(ind_C54CO3) + C(ind_HO2MC5O2) + C(ind_EIPKAO2) + C(ind_EIPKBO2) + &  
+   C(ind_HO2M2C5O2) + C(ind_H1MC5O2) + C(ind_M3C4CO3) + C(ind_H2MC5O2) + &  
+   C(ind_M2BKAO2) + C(ind_M2BKBO2) + C(ind_HM33C4O2) + C(ind_M22C3CO3) + &  
+   C(ind_HM22C4O2) + C(ind_M33C3CO3) + C(ind_HM23C4O2) + C(ind_M2C43CO3) &  
+   + C(ind_HO3C76O2) + C(ind_CO3C75O2) + C(ind_H2M5C65O2) + C(ind_C75O2) &  
+   + C(ind_H2M2C65O2) + C(ind_H2M4C65O2) + C(ind_C710O2) + &  
+   C(ind_H3M3C6O2) + C(ind_HO3C86O2) + C(ind_CO3C85O2) + C(ind_HO3C96O2) &  
+   + C(ind_C91O2) + C(ind_HO3C106O2) + C(ind_C101O2) + C(ind_HO3C116O2) + &  
+   C(ind_C111O2) + C(ind_HO3C126O2) + C(ind_C121O2) + C(ind_CO1C6O2) + &  
+   C(ind_NO3CH2CO3) + C(ind_PRNO3CO3) + C(ind_CO3C4NO3O2) + &  
+   C(ind_HO3C3CO3) + C(ind_MPRBNO3CO3) + C(ind_C5NO3COAO2) + &  
+   C(ind_C4NO3CO3) + C(ind_C5OH2CO4O2) + C(ind_C4OHCO3) + &  
+   C(ind_C5NO3CO4O2) + C(ind_C5CONO34O2) + C(ind_C43NO3CO3) + &  
+   C(ind_C4MCONO3O2) + C(ind_C3MNO3CO3) + C(ind_C3M3OH2CO3) + &  
+   C(ind_MC4CONO3O2) + C(ind_C65NO36CO3) + C(ind_MNO3COC4O2) + &  
+   C(ind_C4COMOH3O2) + C(ind_HO5C5CO3) + C(ind_C6NO3CO5O2) + &  
+   C(ind_C6CONO34O2) + C(ind_MALDIALCO3) + C(ind_EPXDLCO3) + &  
+   C(ind_C3DIALO2) + C(ind_MALDIALO2) + C(ind_OXYL1O2) + C(ind_C5CO14O2) &  
+   + C(ind_OXYLCO3) + C(ind_EPXM2DLCO3) + C(ind_C4MCO2O2) + &  
+   C(ind_DM123O2) + C(ind_MXYLCO3) + C(ind_MXYL1O2) + C(ind_C3MCODBCO3) + &  
+   C(ind_EPXMDLCO3) + C(ind_C3MDIALO2) + C(ind_MXY1O2) + C(ind_PXYLCO3) + &  
+   C(ind_PXYL1O2) + C(ind_PXY1O2) + C(ind_C6H5CH2CO3) + C(ind_EBENZO2) + &  
+   C(ind_C6DCARBBO2) + C(ind_PHCOETO2) + C(ind_PBENZO2) + C(ind_C7DCCO3) &  
+   + C(ind_IPBENZO2) + C(ind_IC7DCCO3) + C(ind_IPGLOO) + C(ind_TM123BCO3) &  
+   + C(ind_TM123O2) + C(ind_EPXKTMCO3) + C(ind_C4CO2O2) + &  
+   C(ind_TM124BCO3) + C(ind_DM124O2) + C(ind_TM124O2) + C(ind_TMBCO3) + &  
+   C(ind_DMPHO2) + C(ind_C4MCODBCO3) + C(ind_EPXMKTCO3) + &  
+   C(ind_CO24C53O2) + C(ind_MPHCOMEO2) + C(ind_EPXMEDLCO3) + &  
+   C(ind_C4ECO2O2) + C(ind_OET1O2) + C(ind_MET1O2) + C(ind_PET1O2) + &  
+   C(ind_DMPHCOMO2) + C(ind_EMPHCOMO2) + C(ind_EMPHCO3) + &  
+   C(ind_C7CODBCO3) + C(ind_EPXEKTCO3) + C(ind_C3EDIALO2) + &  
+   C(ind_CO24C63O2) + C(ind_CCL3CO3) + C(ind_CLETO3) + C(ind_CL2OHCO3) + &  
+   C(ind_CL12CO3) + C(ind_CLCOCLMEO2) + C(ind_CHCL2CO3) + &  
+   C(ind_CLCOCH2O2) + C(ind_CLCOCLO2) + C(ind_CCLOHCO3) + C(ind_HNMVKO2) &  
+   + C(ind_NC3CO3) + C(ind_C42O2) + C(ind_HC3CO3) + C(ind_C41O2) + &  
+   C(ind_MVKOHAO2) + C(ind_MVKOHBO2) + C(ind_HC3CCO3) + C(ind_INCO2) + &  
+   C(ind_NC4CO3) + C(ind_C510O2) + C(ind_INAO2) + C(ind_C524O2) + &  
+   C(ind_HC4ACO3) + C(ind_C58O2) + C(ind_INB1O2) + C(ind_INB2O2) + &  
+   C(ind_HC4CCO3) + C(ind_C57O2) + C(ind_INDO2) + C(ind_C59O2) + &  
+   C(ind_CHOCOMOXO2) + C(ind_ACETMECO3) + C(ind_HOACETETO2) + &  
+   C(ind_MECOACETO2) + C(ind_ACPRONEO2) + C(ind_ACCOETO2) + &  
+   C(ind_ACETC2CO3) + C(ind_IPRACBCO3) + C(ind_ACBUONEAO2) + &  
+   C(ind_ACBUONEBO2) + C(ind_ACCOC3H6O2) + C(ind_SBUACONEO2) + &  
+   C(ind_TBUACCO3) + C(ind_MTBEACHOO2) + C(ind_MTBEBCO3) + &  
+   C(ind_IPROC21O2) + C(ind_IPROMCCO3) + C(ind_EIPEO2) + C(ind_ETBEACO3) &  
+   + C(ind_ETBECCO3) + C(ind_BOXCOEOLO2) + C(ind_BRETO3) + &  
+   C(ind_HO1CO3C4O2) + C(ind_BIACETO2) + C(ind_HO2CO4C5O2) + &  
+   C(ind_CO23C54O2) + C(ind_HOCO3C54O2) + C(ind_C53O2) + C(ind_C41CO3) + &  
+   C(ind_CO2HOC61O2) + C(ind_CO24C6O2) + C(ind_CO25C6O2) + C(ind_HO2C4O2) &  
+   + C(ind_C61O2) + C(ind_CO23C65O2) + C(ind_C6CO3OH5O2) + &  
+   C(ind_C6CO34O2) + C(ind_C6HO1CO3O2) + C(ind_C3COCCO3) + &  
+   C(ind_PEN2ONE1O2) + C(ind_MIBK3COO2) + C(ind_C612O2) + &  
+   C(ind_CO2M33CO3) + C(ind_C6COCHOO2) + C(ind_CY6DIONO2) + &  
+   C(ind_NC101O2) + C(ind_C96CO3) + C(ind_C720O2) + C(ind_NC91CO3) + &  
+   C(ind_C8BCO2) + C(ind_C918CO3) + C(ind_C923CO3) + C(ind_C141CO3) + &  
+   C(ind_NBCALO2) + C(ind_BCALO2) + C(ind_BCSOZO2) + C(ind_C151O2) + &  
+   C(ind_C152O2) + C(ind_MMFO2) + C(ind_MMCFO2) + C(ind_DMSO2O2) + &  
+   C(ind_CHOC4CO3) + C(ind_C6DIALO2) + C(ind_CHOC4O2) + C(ind_CYC6DIONO2) &  
+   + C(ind_NBZFUO2) + C(ind_BZFUO2) + C(ind_CATEC1O2) + C(ind_MCATEC1O2) &  
+   + C(ind_MC3CODBCO3) + C(ind_C4M2ALOHO2) + C(ind_C5DICARBO2) + &  
+   C(ind_NTLFUO2) + C(ind_TLFUO2) + C(ind_MC4CODBCO3) + C(ind_MC5CO2OHO2) &  
+   + C(ind_NOXYFUO2) + C(ind_C6OTKETO2) + C(ind_OXYFUO2) + &  
+   C(ind_OXCATEC1O2) + C(ind_C5MCO2OHO2) + C(ind_NMXYFUO2) + &  
+   C(ind_C23O3MO2) + C(ind_MXYFUO2) + C(ind_NPXYFUO2) + C(ind_MCOCOMOXO2) &  
+   + C(ind_PXYFUO2) + C(ind_MXCATEC1O2) + C(ind_DMKOHO2) + &  
+   C(ind_PXCATEC1O2) + C(ind_ECATEC1O2) + C(ind_C6DICARBO2) + &  
+   C(ind_NEBFUO2) + C(ind_BUTALAO2) + C(ind_EBFUO2) + C(ind_C7CO3OHO2) + &  
+   C(ind_PCATEC1O2) + C(ind_C7DCO2) + C(ind_NPBFUO2) + C(ind_C4CHOAO2) + &  
+   C(ind_PBFUO2) + C(ind_C8CO3OHO2) + C(ind_PHCOMEO2) + C(ind_IPCATEC1O2) &  
+   + C(ind_IC7DCO2) + C(ind_NIPBFUO2) + C(ind_IC4CHOAO2) + C(ind_IPBFUO2) &  
+   + C(ind_C7MCO3OHO2) + C(ind_T123CAT1O2) + C(ind_C7ADCCO3) + &  
+   C(ind_C7ADCO2) + C(ind_NTMB1FUO2) + C(ind_TMB1FUO2) + C(ind_NTMB2FUO2) &  
+   + C(ind_MC6OTKETO2) + C(ind_TMB2FUO2) + C(ind_C7BDCO2) + &  
+   C(ind_T124CAT1O2) + C(ind_OTCATEC1O2) + C(ind_MTCATEC1O2) + &  
+   C(ind_C7EDCO2) + C(ind_PTCATEC1O2) + C(ind_C7DDCCO3) + C(ind_C7DDCO2) &  
+   + C(ind_NMEBFUO2) + C(ind_C23O3EO2) + C(ind_MEBFUO2) + C(ind_EMPHO2) + &  
+   C(ind_CH3COCCLO2) + C(ind_CLCOCCL2O2) + C(ind_IEB1O2) + C(ind_IEB2O2) &  
+   + C(ind_MACRNCO3) + C(ind_IEC1O2) + C(ind_ETHFORMO2) + &  
+   C(ind_IPRMEETO2) + C(ind_CHOOMCO3) + C(ind_PRONFORMO2) + &  
+   C(ind_PRCOOMCO3) + C(ind_PRCOOMO2) + C(ind_BOXCOCHOO2) + &  
+   C(ind_BOXFORMO2) + C(ind_PRONOCOPO2) + C(ind_BOXCOCOMO2) + &  
+   C(ind_PINALO2) + C(ind_C108O2) + C(ind_C89CO3) + C(ind_C920CO3) + &  
+   C(ind_C920O2) + C(ind_C97O2) + C(ind_C85CO3) + C(ind_C85O2) + &  
+   C(ind_C719O2) + C(ind_C918O2) + C(ind_C9DCO2) + C(ind_C915O2) + &  
+   C(ind_C917O2) + C(ind_NLIMALO2) + C(ind_LIMALO2) + C(ind_C729CO3) + &  
+   C(ind_C822CO3) + C(ind_C924O2) + C(ind_C816CO3) + C(ind_NORLIMO2) + &  
+   C(ind_C816O2) + C(ind_NLMKAO2) + C(ind_LMKAO2) + C(ind_LMKBO2) + &  
+   C(ind_C146O2) + C(ind_C131CO3) + C(ind_BCLKAO2) + C(ind_BCLKBO2) + &  
+   C(ind_BCLKCO2) + C(ind_C131O2) + C(ind_C147O2) + C(ind_C126CO3) + &  
+   C(ind_C136CO3) + C(ind_C148O2) + C(ind_C1311O2) + C(ind_NC1313O2) + &  
+   C(ind_C1313O2) + C(ind_C126O2) + C(ind_C144O2) + C(ind_C142O2) + &  
+   C(ind_NBCKO2) + C(ind_BCKAO2) + C(ind_BCKBO2) + C(ind_CH3SOO) + &  
+   C(ind_H13C43CO3) + C(ind_C42CO3) + C(ind_HOC3H6CO3) + C(ind_C3DIOLO2) &  
+   + C(ind_C51O2) + C(ind_HO2C4CO3) + C(ind_HOIBUTCO3) + C(ind_C63O2) + &  
+   C(ind_HO3C5CO3) + C(ind_C64O2) + C(ind_HO2C54O2) + C(ind_HO2C54CO3) + &  
+   C(ind_C66O2) + C(ind_CO3C54CO3) + C(ind_H2M2C4CO3) + C(ind_C67O2) + &  
+   C(ind_C610O2) + C(ind_H2M3C4CO3) + C(ind_C68O2) + C(ind_C69O2) + &  
+   C(ind_C611O2) + C(ind_HM33C3CO3) + C(ind_HM22C3O2) + C(ind_HM22C3CO3) &  
+   + C(ind_HM2C43CO3) + C(ind_C71O2) + C(ind_C76O2) + C(ind_C77O2) + &  
+   C(ind_C78O2) + C(ind_C711O2) + C(ind_H3M3C5O2) + C(ind_H3M3C5CO3) + &  
+   C(ind_C82O2) + C(ind_C81O2) + C(ind_C93O2) + C(ind_C92O2) + &  
+   C(ind_HO6C7O2) + C(ind_C103O2) + C(ind_C102O2) + C(ind_HO7C8O2) + &  
+   C(ind_C113O2) + C(ind_C112O2) + C(ind_HO8C9O2) + C(ind_C123O2) + &  
+   C(ind_C122O2) + C(ind_CO1H63O2) + C(ind_C3NO3COO2) + C(ind_NPHEN1O2) + &  
+   C(ind_NNCATECO2) + C(ind_NCATECO2) + C(ind_NBZQO2) + C(ind_PBZQO2) + &  
+   C(ind_NPTLQO2) + C(ind_PTLQO2) + C(ind_NCRES1O2) + C(ind_MNNCATECO2) + &  
+   C(ind_MNCATECO2) + C(ind_NOXYOL1O2) + C(ind_NOXYQO2) + C(ind_OXYQO2) + &  
+   C(ind_OXNNCATCO2) + C(ind_OXNCATECO2) + C(ind_NMXYOL1O2) + &  
+   C(ind_NMXYQO2) + C(ind_MXYQO2) + C(ind_MXNNCATCO2) + C(ind_MXNCATECO2) &  
+   + C(ind_NPXYOL1O2) + C(ind_NPXYQO2) + C(ind_PXYQO2) + &  
+   C(ind_PXNNCATCO2) + C(ind_PXNCATECO2) + C(ind_NEBNZ1O2) + &  
+   C(ind_NPEBQO2) + C(ind_PEBQO2) + C(ind_ENNCATECO2) + C(ind_ENCATECO2) &  
+   + C(ind_CO3H4CO3) + C(ind_PHCOCOCO2) + C(ind_NPBNZ1O2) + &  
+   C(ind_NPPRBQO2) + C(ind_PPRBQO2) + C(ind_PNNCATECO2) + &  
+   C(ind_PNCATECO2) + C(ind_C5O45OHCO3) + C(ind_NIPBNZ1O2) + &  
+   C(ind_NIPRBQO2) + C(ind_IPRBQO2) + C(ind_IPNNCATCO2) + &  
+   C(ind_IPNCATECO2) + C(ind_C4MOHOCO3) + C(ind_NT123L1O2) + &  
+   C(ind_T123NNCTO2) + C(ind_T123NCATO2) + C(ind_NT124L1O2) + &  
+   C(ind_NTM124QO2) + C(ind_TM124QO2) + C(ind_T124NNCTO2) + &  
+   C(ind_T124NCATO2) + C(ind_C5CO234O2) + C(ind_NOETOL1O2) + &  
+   C(ind_NOETLQO2) + C(ind_OETLQO2) + C(ind_OTNNCATCO2) + &  
+   C(ind_OTNCATECO2) + C(ind_NMETOL1O2) + C(ind_NMETLQO2) + &  
+   C(ind_METLQO2) + C(ind_MTNNCATCO2) + C(ind_MTNCATECO2) + &  
+   C(ind_NPETOL1O2) + C(ind_NPETLQO2) + C(ind_PETLQO2) + &  
+   C(ind_PTNNCATCO2) + C(ind_PTNCATECO2) + C(ind_CO234C65O2) + &  
+   C(ind_H13CO2CO3) + C(ind_IEACO3) + C(ind_NC524O2) + C(ind_C525O2) + &  
+   C(ind_C58NO3CO3) + C(ind_CONM2CO3) + C(ind_IECCO3) + C(ind_CO2N3CO3) + &  
+   C(ind_ACCOCOMEO2) + C(ind_ACEETOHO2) + C(ind_ACCOMCOMO2) + &  
+   C(ind_ACCOCOETO2) + C(ind_MTBEAALCO3) + C(ind_C62O2) + C(ind_HO13C4O2) &  
+   + C(ind_HM22CO3) + C(ind_C6COCHOCO3) + C(ind_C5COCHOO2) + &  
+   C(ind_CHOC2H4O2) + C(ind_HCOCH2CO3) + C(ind_CY6TRIONO2) + &  
+   C(ind_C6CYTONO2) + C(ind_NC102O2) + C(ind_C512CO3) + C(ind_C89O2) + &  
+   C(ind_C926O2) + C(ind_C817CO3) + C(ind_C817O2) + C(ind_NC826O2) + &  
+   C(ind_C826O2) + C(ind_C729O2) + C(ind_LMLKAO2) + C(ind_LMLKBO2) + &  
+   C(ind_C116CO3) + C(ind_C116O2) + C(ind_C129O2) + C(ind_C1210O2) + &  
+   C(ind_CH3SOO2) + C(ind_C1H4C5CO3) + C(ind_CHOC4OHO2) + &  
+   C(ind_HOC4CHOO2) + C(ind_C6145COO2) + C(ind_CO2C4CO3) + &  
+   C(ind_HOBUT2CO3) + C(ind_CO3C5CO3) + C(ind_CO2C54CO3) + C(ind_C65O2) + &  
+   C(ind_CO2M3C4CO3) + C(ind_C72O2) + C(ind_CO25C73O2) + C(ind_CO25C74O2) &  
+   + C(ind_C712O2) + C(ind_C713O2) + C(ind_C714O2) + C(ind_C84O2) + &  
+   C(ind_C94O2) + C(ind_C104O2) + C(ind_C114O2) + C(ind_C6H13CO3) + &  
+   C(ind_C124O2) + C(ind_MALANHYO2) + C(ind_NDNPHENO2) + C(ind_DNPHENO2) &  
+   + C(ind_NDNCRESO2) + C(ind_DNCRESO2) + C(ind_C6O4KETO2) + &  
+   C(ind_NDNOXYOLO2) + C(ind_DNOXYOLO2) + C(ind_MMALANHYO2) + &  
+   C(ind_NDNMXYOLO2) + C(ind_DNMXYOLO2) + C(ind_TL4OHNO2O2) + &  
+   C(ind_NDNPXYOLO2) + C(ind_DNPXYOLO2) + C(ind_NDNEBNZLO2) + &  
+   C(ind_DNEBNZLO2) + C(ind_NDNPBNZLO2) + C(ind_DNPBNZLO2) + &  
+   C(ind_C61CO3) + C(ind_NDNIPBZLO2) + C(ind_DNIPBNZLO2) + C(ind_C62CO3) &  
+   + C(ind_NDNT123LO2) + C(ind_DNT123LO2) + C(ind_TM124NO2O2) + &  
+   C(ind_NDNT124LO2) + C(ind_DNT124LO2) + C(ind_MXYOHNO2O2) + &  
+   C(ind_NDNOETOLO2) + C(ind_DNOETOLO2) + C(ind_NDNMETOLO2) + &  
+   C(ind_DNMETOLO2) + C(ind_NDNPETOLO2) + C(ind_DNPETOLO2) + &  
+   C(ind_CO356OCO2) + C(ind_INCNCO3) + C(ind_MACRNBCO3) + C(ind_INAHPCO3) &  
+   + C(ind_INANCO3) + C(ind_INAHCO3) + C(ind_HIEB1O2) + C(ind_HIEB2O2) + &  
+   C(ind_HMACO3) + C(ind_HMACRO2) + C(ind_INB1HPCO3) + C(ind_INB1NACO3) + &  
+   C(ind_INB1NBCO3) + C(ind_C57NO3CO3) + C(ind_INDHPCO3) + C(ind_INDHCO3) &  
+   + C(ind_ACCOMECO3) + C(ind_IPRFORMO2) + C(ind_PRCOFORMO2) + &  
+   C(ind_PRONOCOMO2) + C(ind_CO23C4CO3) + C(ind_C5CO34CO3) + &  
+   C(ind_C106O2) + C(ind_C717O2) + C(ind_C811CO3) + C(ind_C921O2) + &  
+   C(ind_C98O2) + C(ind_C86O2) + C(ind_C919O2) + C(ind_C914O2) + &  
+   C(ind_C916O2) + C(ind_C88CO3) + C(ind_C88O2) + C(ind_C512O2) + &  
+   C(ind_C619O2) + C(ind_C626CO3) + C(ind_C626O2) + C(ind_C735O2) + &  
+   C(ind_C822O2) + C(ind_C823CO3) + C(ind_C925O2) + C(ind_C622CO3) + &  
+   C(ind_C1011CO3) + C(ind_C1210CO3) + C(ind_C132O2) + C(ind_C137CO3) + &  
+   C(ind_C1013CO3) + C(ind_C1312O2) + C(ind_C127O2) + C(ind_C143O2) + &  
+   C(ind_CH3SO2O2) + C(ind_HO24C5O2) + C(ind_C55O2) + C(ind_C67CO3) + &  
+   C(ind_H3M2C4CO3) + C(ind_C79O2) + C(ind_H3M3C4CO3) + C(ind_H13M3C5O2) &  
+   + C(ind_HO4C5CO3) + C(ind_HO5C6CO3) + C(ind_HO6C7CO3) + &  
+   C(ind_HO7C8CO3) + C(ind_HO8C9CO3) + C(ind_C5CO2OHCO3) + &  
+   C(ind_C6CO2OHCO3) + C(ind_CH3COCO3) + C(ind_C5M2OHOCO3) + &  
+   C(ind_C4COMOHCO3) + C(ind_C23O3MCO3) + C(ind_C23O3CCO3) + &  
+   C(ind_C7CO2OHCO3) + C(ind_C6MOHCOCO3) + C(ind_C7OHCO2CO3) + &  
+   C(ind_ECO3CO3) + C(ind_C8OHCO2CO3) + C(ind_C8CO2OHCO3) + &  
+   C(ind_NDMMALYO2) + C(ind_DMMALYO2) + C(ind_C7MOHCOCO3) + &  
+   C(ind_C5MEJCO3) + C(ind_C6EO2OHCO3) + C(ind_C7MJPCO3) + &  
+   C(ind_C23O3ECO3) + C(ind_EMPOHNO2O2) + C(ind_INANCOCO3) + &  
+   C(ind_MMALNACO3) + C(ind_MMALNBCO3) + C(ind_HO13C3CO3) + &  
+   C(ind_C5CO23O2) + C(ind_CHOC2CO3) + C(ind_CHOC3COCO3) + &  
+   C(ind_C5124COCO3) + C(ind_CO235C6CO3) + C(ind_NC71O2) + C(ind_C811O2) &  
+   + C(ind_CHOC3COO2) + C(ind_H3C25C6CO3) + C(ind_H3C25C6O2) + &  
+   C(ind_C810O2) + C(ind_C818O2) + C(ind_C727CO3) + C(ind_NC728O2) + &  
+   C(ind_C728O2) + C(ind_C622O2) + C(ind_C823O2) + C(ind_C819O2) + &  
+   C(ind_C731CO3) + C(ind_C1011O2) + C(ind_C137O2) + C(ind_C1013O2) + &  
+   C(ind_C1010O2) + C(ind_C117O2) + C(ind_C830CO3) + C(ind_C145O2) + &  
+   C(ind_C927O2) + C(ind_C1214O2) + C(ind_CHOC4DOLO2) + C(ind_C6TRONOHO2) &  
+   + C(ind_C23C54CO3) + C(ind_C73O2) + C(ind_C74O2) + C(ind_C715O2) + &  
+   C(ind_C83O2) + C(ind_C95O2) + C(ind_C105O2) + C(ind_C115O2) + &  
+   C(ind_C125O2) + C(ind_C4CO2DBCO3) + C(ind_C5CO2DBCO3) + &  
+   C(ind_C4DBM2CO3) + C(ind_C5DBCO2CO3) + C(ind_C7CO2DBCO3) + &  
+   C(ind_C8CO2DBCO3) + C(ind_C8DBCO2CO3) + C(ind_C4DBMECO3) + &  
+   C(ind_C5DBECO3) + C(ind_C5EDBCO3) + C(ind_MECOFORMO2) + &  
+   C(ind_C5124COO2) + C(ind_CO235C6O2) + C(ind_C716O2) + C(ind_C922O2) + &  
+   C(ind_C614O2) + C(ind_C511O2) + C(ind_C620O2) + C(ind_C87CO3) + &  
+   C(ind_C616O2) + C(ind_C718CO3) + C(ind_C513O2) + C(ind_CO25C6CO3) + &  
+   C(ind_C727O2) + C(ind_C511CO3) + C(ind_C517CO3) + C(ind_C517O2) + &  
+   C(ind_C628O2) + C(ind_C824O2) + C(ind_C133O2) + C(ind_C830O2) + &  
+   C(ind_C128O2) + C(ind_HO24C4CO3) + C(ind_C613O2) + C(ind_CO2OH3MCO3) + &  
+   C(ind_COHM2CO3) + C(ind_C812O2) + C(ind_C721CO3) + C(ind_C721O2) + &  
+   C(ind_H3C2C4CO3) + C(ind_C87O2) + C(ind_C718O2) + C(ind_C514O2) + &  
+   C(ind_C820O2) + C(ind_C518CO3) + C(ind_NC623O2) + C(ind_C623O2) + &  
+   C(ind_C825O2) + C(ind_C731O2) + C(ind_C732CO3) + C(ind_C1012O2) + &  
+   C(ind_C1211O2) + C(ind_C139O2) + C(ind_C1014O2) + C(ind_C736O2) + &  
+   C(ind_C118O2) + C(ind_C928CO3) + C(ind_C630O2) + C(ind_C1215O2) + &  
+   C(ind_EMALANHYO2) + C(ind_PMALANHYO2) + C(ind_IPMALNHYO2) + &  
+   C(ind_C312COCO3) + C(ind_CHOCOCH2O2) + C(ind_NC72O2) + C(ind_C621O2) + &  
+   C(ind_C515CO3) + C(ind_C515O2) + C(ind_C821O2) + C(ind_HMVKBCO3) + &  
+   C(ind_C520O2) + C(ind_C624CO3) + C(ind_C732O2) + C(ind_C829O2) + &  
+   C(ind_C134O2) + C(ind_C827CO3) + C(ind_C522CO3) + C(ind_C831O2) + &  
+   C(ind_C928O2) + C(ind_C46CO3) + C(ind_C930O2) + C(ind_C813O2) + &  
+   C(ind_C722O2) + C(ind_C615CO3) + C(ind_C617CO3) + C(ind_C618CO3) + &  
+   C(ind_C617O2) + C(ind_C618O2) + C(ind_NC730O2) + C(ind_C730O2) + &  
+   C(ind_C624O2) + C(ind_C733O2) + C(ind_C1212O2) + C(ind_C1310O2) + &  
+   C(ind_NC61CO3) + C(ind_C615O2) + C(ind_C519CO3) + C(ind_C629O2) + &  
+   C(ind_C734O2) + C(ind_C521O2) + C(ind_C135O2) + C(ind_COO2C4CO3) + &  
+   C(ind_COO2C4O2) + C(ind_C929O2) + C(ind_C44O2) + C(ind_H1C23C4CO3) + &  
+   C(ind_H1C23C4O2) + C(ind_CO1M22CO3) + C(ind_C519O2) + C(ind_C625O2) + &  
+   C(ind_C1213O2) + C(ind_COO2C3CO3) + C(ind_C828CO3) + C(ind_C828O2 ) 
+KRO2NO = 2.7D-12*EXP(360/TEMP)
+KRO2HO2 = 2.91D-13*EXP(1300/TEMP)
+KAPHO2 = 5.2D-13*EXP(980/TEMP)
+KAPNO = 7.5D-12*EXP(290/TEMP)
+KRO2NO3 = 2.3D-12
+KNO3AL = 1.4D-12*EXP(-1860/TEMP)
+KDEC = 1.00D+06
+KROPRIM = 2.50D-14*EXP(-300/TEMP)
+KROSEC = 2.50D-14*EXP(-300/TEMP)
+KCH3O2 = 1.03D-13*EXP(365/TEMP)
+K298CH3O2 = 3.5D-13
+KMT18 = 9.5D-39*O2*EXP(5270/TEMP)/(1+7.5D-29*O2*EXP(5610/TEMP))
+CALL mcm_constants(time, temp, M, N2, O2, RO2, H2O) 
+ #ENDINLINE 
+{above lines go into the SUBROUTINES UPDATE_RCONST and UPDATE_PHOTO}
+#EQUATIONS
+{1.} 	 O = O3 : 	5.6D-34*N2*(TEMP/300)**-2.6*O2+6.0D-34*O2*(TEMP/300)**-2.6*O2 	;
+{2.} 	 O + O3 = : 	8.0D-12*EXP(-2060/TEMP) 	;
+{3.} 	 O + NO = NO2 : 	KMT01 	;
+{4.} 	 O + NO2 = NO : 	5.5D-12*EXP(188/TEMP) 	;
+{5.} 	 O + NO2 = NO3 : 	KMT02 	;
+{6.} 	 O1D = O : 	3.2D-11*EXP(67/TEMP)*O2+2.0D-11*EXP(130/TEMP)*N2 	;
+{7.} 	 NO + O3 = NO2 : 	1.4D-12*EXP(-1310/TEMP) 	;
+{8.} 	 NO2 + O3 = NO3 : 	1.4D-13*EXP(-2470/TEMP) 	;
+{9.} 	 NO + NO = NO2 + NO2 : 	3.3D-39*EXP(530/TEMP)*O2 	;
+{10.} 	 NO + NO3 = NO2 + NO2 : 	1.8D-11*EXP(110/TEMP) 	;
+{11.} 	 NO2 + NO3 = NO + NO2 : 	4.50D-14*EXP(-1260/TEMP) 	;
+{12.} 	 NO2 + NO3 = N2O5 : 	KMT03 	;
+{13.} 	 O1D = OH + OH : 	2.14D-10*H2O 	;
+{14.} 	 OH + O3 = HO2 : 	1.70D-12*EXP(-940/TEMP) 	;
+{15.} 	 OH + H2 = HO2 : 	7.7D-12*EXP(-2100/TEMP) 	;
+{16.} 	 OH + CO = HO2 : 	KMT05 	;
+{17.} 	 OH + H2O2 = HO2 : 	2.9D-12*EXP(-160/TEMP) 	;
+{18.} 	 HO2 + O3 = OH : 	2.03D-16*(TEMP/300)**4.57*EXP(693/TEMP) 	;
+{19.} 	 OH + HO2 = : 	4.8D-11*EXP(250/TEMP) 	;
+{20.} 	 HO2 + HO2 = H2O2 : 	2.20D-13*KMT06*EXP(600/TEMP)+1.90D-33*M*KMT06*EXP(980/TEMP) 	;
+{21.} 	 OH + NO = HONO : 	KMT07 	;
+{22.} 	 OH + NO2 = HNO3 : 	KMT08 	;
+{23.} 	 OH + NO3 = HO2 + NO2 : 	2.0D-11 	;
+{24.} 	 HO2 + NO = OH + NO2 : 	3.45D-12*EXP(270/TEMP) 	;
+{25.} 	 HO2 + NO2 = HO2NO2 : 	KMT09 	;
+{26.} 	 OH + HO2NO2 = NO2 : 	3.2D-13*EXP(690/TEMP)*1.0 	;
+{27.} 	 HO2 + NO3 = OH + NO2 : 	4.0D-12 	;
+{28.} 	 OH + HONO = NO2 : 	2.5D-12*EXP(260/TEMP) 	;
+{29.} 	 OH + HNO3 = NO3 : 	KMT11 	;
+{30.} 	 O + SO2 = SO3 : 	4.0D-32*EXP(-1000/TEMP)*M 	;
+{31.} 	 OH + SO2 = HSO3 : 	KMT12 	;
+{32.} 	 HSO3 = HO2 + SO3 : 	1.3D-12*EXP(-330/TEMP)*O2 	;
+{33.} 	 HNO3 = NA : 	6.00D-06 	;
+{34.} 	 N2O5 = NA + NA : 	4.00D-04 	;
+{35.} 	 SO3 = SA : 	1.20D-15*H2O 	;
+{36.} 	 O3 = O1D : 	J(1) 	;
+{37.} 	 O3 = O : 	J(2) 	;
+{38.} 	 H2O2 = OH + OH : 	J(3) 	;
+{39.} 	 NO2 = NO + O : 	J(4) 	;
+{40.} 	 NO3 = NO : 	J(5) 	;
+{41.} 	 NO3 = NO2 + O : 	J(6) 	;
+{42.} 	 HONO = OH + NO : 	J(7) 	;
+{43.} 	 HNO3 = OH + NO2 : 	J(8) 	;
+{44.} 	 N2O5 = NO2 + NO3 : 	KMT04 	;
+{45.} 	 HO2NO2 = HO2 + NO2 : 	KMT10 	;
+{46.} 	 CH3OH + OH = HO2 + HCHO : 	2.85D-12*EXP(-345/TEMP) 	;
+{47.} 	 C2H5OH + OH = C2H5O : 	3.0D-12*EXP(20/TEMP)*0.05 	;
+{48.} 	 C2H5OH + OH = CH3CHO + HO2 : 	3.0D-12*EXP(20/TEMP)*0.9 	;
+{49.} 	 C2H5OH + OH = HOCH2CH2O2 : 	3.0D-12*EXP(20/TEMP)*0.05 	;
+{50.} 	 NPROPOL + OH = C2H5CHO + HO2 : 	4.6D-12*EXP(70/TEMP)*0.494 	;
+{51.} 	 NPROPOL + OH = HO1C3O2 : 	4.6D-12*EXP(70/TEMP)*0.063 	;
+{52.} 	 NPROPOL + OH = HYPROPO2 : 	4.6D-12*EXP(70/TEMP)*0.443 	;
+{53.} 	 IPROPOL + OH = CH3COCH3 + HO2 : 	2.6D-12*EXP(200/TEMP)*0.861 	;
+{54.} 	 IPROPOL + OH = IPROPOLO2 : 	2.6D-12*EXP(200/TEMP)*0.139 	;
+{55.} 	 NBUTOL + OH = C3H7CHO + HO2 : 	5.3D-12*EXP(140/TEMP)*0.358 	;
+{56.} 	 NBUTOL + OH = NBUTOLAO2 : 	5.3D-12*EXP(140/TEMP)*0.321 	;
+{57.} 	 NBUTOL + OH = NBUTOLBO2 : 	5.3D-12*EXP(140/TEMP)*0.321 	;
+{58.} 	 BUT2OL + OH = BUT2OLO2 : 	8.7D-12*0.361 	;
+{59.} 	 BUT2OL + OH = MEK + HO2 : 	8.7D-12*0.639 	;
+{60.} 	 IBUTOL + OH = IBUTOLBO2 : 	2.73D-12*EXP(352/TEMP)*0.558 	;
+{61.} 	 IBUTOL + OH = IBUTOLCO2 : 	2.73D-12*EXP(352/TEMP)*0.090 	;
+{62.} 	 IBUTOL + OH = IPRCHO + HO2 : 	2.73D-12*EXP(352/TEMP)*0.352 	;
+{63.} 	 OH + TBUTOL = TBUTOLO2 : 	1.6D-12*EXP(-121/TEMP)*0.888 	;
+{64.} 	 OH + TBUTOL = TC4H9O : 	1.6D-12*EXP(-121/TEMP)*0.112 	;
+{65.} 	 OH + PECOH = DIEK + HO2 : 	1.22D-11*0.436 	;
+{66.} 	 OH + PECOH = HO3C5O2 : 	1.22D-11*0.070 	;
+{67.} 	 OH + PECOH = PE2ENEBO2 : 	1.22D-11*0.493 	;
+{68.} 	 OH + IPEAOH = BUT2CHO + HO2 : 	1.12D-11*0.288 	;
+{69.} 	 OH + IPEAOH = HM2C43O2 : 	1.12D-11*0.258 	;
+{70.} 	 OH + IPEAOH = M2BUOL2O2 : 	1.12D-11*0.454 	;
+{71.} 	 ME3BUOL + OH = C3ME3CHO + HO2 : 	1.31D-11*0.288 	;
+{72.} 	 ME3BUOL + OH = HM33C3O2 : 	1.31D-11*0.454 	;
+{73.} 	 ME3BUOL + OH = ME3BUOLO2 : 	1.31D-11*0.258 	;
+{74.} 	 OH + IPECOH = HO2M2C4O2 : 	3.85D-12*0.100 	;
+{75.} 	 OH + IPECOH = ME2BU2OLO2 : 	3.85D-12*0.701 	;
+{76.} 	 OH + IPECOH = PROL11MO2 : 	3.85D-12*0.199 	;
+{77.} 	 OH + IPEBOH = H2M3C4O2 : 	1.24D-11*0.074 	;
+{78.} 	 OH + IPEBOH = ME2BUOLO2 : 	1.24D-11*0.463 	;
+{79.} 	 OH + IPEBOH = MIPK + HO2 : 	1.24D-11*0.463 	;
+{80.} 	 CYHEXOL + OH = CYHEXOLAO2 : 	1.77D-11*0.739 	;
+{81.} 	 CYHEXOL + OH = CYHEXONE + HO2 : 	1.77D-11*0.261 	;
+{82.} 	 MIBKAOH + OH = MIBKAOHAO2 : 	2.88D-12*0.693 	;
+{83.} 	 MIBKAOH + OH = MIBKAOHBO2 : 	2.88D-12*0.270 	;
+{84.} 	 MIBKAOH + OH = MIBKHO4O2 : 	2.88D-12*0.037 	;
+{85.} 	 MIBKAOH = TBUTOLO2 + CH3CO3 : 	J(22) 	;
+{86.} 	 ETHGLY + OH = HOCH2CHO + HO2 : 	1.45D-11 	;
+{87.} 	 PROPGLY + OH = ACETOL + HO2 : 	1.20D-11*0.613 	;
+{88.} 	 PROPGLY + OH = CH3CHOHCHO + HO2 : 	1.20D-11*0.387 	;
+{89.} 	 MBO + NO3 = NMBOAO2 : 	4.6D-14*EXP(-400/TEMP)*0.65 	;
+{90.} 	 MBO + NO3 = NMBOBO2 : 	4.6D-14*EXP(-400/TEMP)*0.35 	;
+{91.} 	 MBO + O3 = HCHO + MBOOOA : 	1.0D-17*0.3 	;
+{92.} 	 MBO + O3 = IBUTALOH + CH2OOB : 	1.0D-17*0.7 	;
+{93.} 	 MBO + OH = MBOAO2 : 	8.1D-12*EXP(610/TEMP)*0.67 	;
+{94.} 	 MBO + OH = MBOBO2 : 	8.1D-12*EXP(610/TEMP)*0.33 	;
+{95.} 	 HCHO = CO + HO2 + HO2 : 	J(11) 	;
+{96.} 	 HCHO = H2 + CO : 	J(12) 	;
+{97.} 	 NO3 + HCHO = HNO3 + CO + HO2 : 	5.5D-16 	;
+{98.} 	 OH + HCHO = HO2 + CO : 	5.4D-12*EXP(135/TEMP) 	;
+{99.} 	 CH3CHO = CH3O2 + HO2 + CO : 	J(13) 	;
+{100.} 	 NO3 + CH3CHO = HNO3 + CH3CO3 : 	1.4D-12*EXP(-1860/TEMP) 	;
+{101.} 	 OH + CH3CHO = CH3CO3 : 	4.7D-12*EXP(345/TEMP)*0.95 	;
+{102.} 	 OH + CH3CHO = HCOCH2O2 : 	4.7D-12*EXP(345/TEMP)*0.05 	;
+{103.} 	 C2H5CHO + NO3 = C2H5CO3 + HNO3 : 	3.24D-12*EXP(1860/TEMP) 	;
+{104.} 	 C2H5CHO + OH = C2H5CO3 : 	4.9D-12*EXP(405/TEMP) 	;
+{105.} 	 C2H5CHO = C2H5O2 + HO2 + CO : 	J(14) 	;
+{106.} 	 C3H7CHO + NO3 = HNO3 + C3H7CO3 : 	1.7D-12*EXP(-1500/TEMP) 	;
+{107.} 	 C3H7CHO + OH = BUTALO2 : 	6.0D-12*EXP(410/TEMP)*0.151 	;
+{108.} 	 C3H7CHO + OH = C3H7CO3 : 	6.0D-12*EXP(410/TEMP)*0.849 	;
+{109.} 	 C3H7CHO = CH3CHO + C2H4 : 	J(16) 	;
+{110.} 	 C3H7CHO = NC3H7O2 + CO + HO2 : 	J(15) 	;
+{111.} 	 IPRCHO + NO3 = HNO3 + IPRCO3 : 	1.67D-12*EXP(-1460/TEMP) 	;
+{112.} 	 IPRCHO + OH = IBUTALBO2 : 	6.8D-12*EXP(410/TEMP)*0.054 	;
+{113.} 	 IPRCHO + OH = IBUTALCO2 : 	6.8D-12*EXP(410/TEMP)*0.059 	;
+{114.} 	 IPRCHO + OH = IPRCO3 : 	6.8D-12*EXP(410/TEMP)*0.887 	;
+{115.} 	 IPRCHO = IC3H7O2 + HO2 + CO : 	J(17) 	;
+{116.} 	 C4H9CHO + NO3 = C4H9CO3 + HNO3 : 	KNO3AL*5.5 	;
+{117.} 	 C4H9CHO + OH = C4CHOBO2 : 	6.34D-12*EXP(448/TEMP)*0.19 	;
+{118.} 	 C4H9CHO + OH = C4H9CO3 : 	6.34D-12*EXP(448/TEMP)*0.81 	;
+{119.} 	 C4H9CHO = NC4H9O2 + HO2 + CO : 	J(15) 	;
+{120.} 	 ACR + NO3 = ACO3 + HNO3 : 	1.72D-13*EXP(-1190/TEMP) 	;
+{121.} 	 ACR + OH = ACO3 : 	0.68*2.00E-11 	;
+{122.} 	 ACR + OH = ACO3B : 	0.255*2.00E-11 	;
+{123.} 	 ACR + OH = OCCOHCO2 : 	0.065*2.00E-11 	;
+{124.} 	 ACR = ACO3 : 	0.3*J(18) 	;
+{125.} 	 ACR = C2H4 + CO : 	0.4*J(18) 	;
+{126.} 	 ACR = HCHO + HO2 + CO : 	0.3*J(18) 	;
+{127.} 	 O3 + ACR = CH2OOB + GLYOX : 	0.5*2.9E-19 	;
+{128.} 	 O3 + ACR = GLYOOB + HCHO : 	0.5*2.9E-19 	;
+{129.} 	 MACR = CH3C2H2O2 + CO + HO2 : 	J(18) 	;
+{130.} 	 MACR = MACO3 + HO2 : 	J(19) 	;
+{131.} 	 NO3 + MACR = MACO3 + HNO3 : 	3.4D-15 	;
+{132.} 	 O3 + MACR = HCHO + MGLYOOB : 	1.4D-15*EXP(-2100/TEMP)*0.12 	;
+{133.} 	 O3 + MACR = MGLYOX + CH2OOG : 	1.4D-15*EXP(-2100/TEMP)*0.88 	;
+{134.} 	 OH + MACR = MACO3 : 	8.0D-12*EXP(380/TEMP)*0.45 	;
+{135.} 	 OH + MACR = MACRO2 : 	8.0D-12*EXP(380/TEMP)*0.47 	;
+{136.} 	 OH + MACR = MACROHO2 : 	8.0D-12*EXP(380/TEMP)*0.08 	;
+{137.} 	 C4ALDB + NO3 = C3DBCO3 + HNO3 : 	6D-15*0.65 	;
+{138.} 	 C4ALDB + NO3 = C4CONO3O2 : 	6D-15*0.175 	;
+{139.} 	 C4ALDB + NO3 = C4NO3COO2 : 	6D-15*0.175 	;
+{140.} 	 C4ALDB + O3 = CH3CHO + GLYOOB : 	1.58E-18*0.5 	;
+{141.} 	 C4ALDB + O3 = GLYOX + CH3CHOOB : 	1.58E-18*0.5 	;
+{142.} 	 C4ALDB + OH = C3DBCO3 : 	0.5*3.4E-11 	;
+{143.} 	 C4ALDB + OH = C4OCCOHCO2 : 	0.25*3.4E-11 	;
+{144.} 	 C4ALDB + OH = COCCOH2CO2 : 	0.25*3.4E-11 	;
+{145.} 	 C4ALDB = CH3CHO + CO + HO2 + CO + HO2 : 	J(18)*1.44 	;
+{146.} 	 CL + CH4 = CH3O2 : 	6.6D-12*EXP(-1240/TEMP) 	;
+{147.} 	 OH + CH4 = CH3O2 : 	1.85D-12*EXP(-1690/TEMP) 	;
+{148.} 	 CL + C2H6 = C2H5O2 : 	8.3D-11*EXP(-100/TEMP) 	;
+{149.} 	 OH + C2H6 = C2H5O2 : 	6.9D-12*EXP(-1000/TEMP) 	;
+{150.} 	 CL + C3H8 = IC3H7O2 : 	1.4D-10*0.43*EXP(75/TEMP) 	;
+{151.} 	 CL + C3H8 = NC3H7O2 : 	1.4D-10*0.59*EXP(-90/TEMP) 	;
+{152.} 	 OH + C3H8 = IC3H7O2 : 	7.6D-12*EXP(-585/TEMP)*0.736 	;
+{153.} 	 OH + C3H8 = NC3H7O2 : 	7.6D-12*EXP(-585/TEMP)*0.264 	;
+{154.} 	 CL + NC4H10 = NC4H9O2 : 	2.05D-10*0.44*EXP(-120/TEMP) 	;
+{155.} 	 CL + NC4H10 = SC4H9O2 : 	2.05D-10*0.59*EXP(55/TEMP) 	;
+{156.} 	 OH + NC4H10 = NC4H9O2 : 	9.8D-12*EXP(-425/TEMP)*0.127 	;
+{157.} 	 OH + NC4H10 = SC4H9O2 : 	9.8D-12*EXP(-425/TEMP)*0.873 	;
+{158.} 	 CL + IC4H10 = IC4H9O2 : 	1.43D-10*0.564 	;
+{159.} 	 CL + IC4H10 = TC4H9O2 : 	1.43D-10*0.436 	;
+{160.} 	 OH + IC4H10 = IC4H9O2 : 	1.16D-17*TEMP**2*EXP(225/TEMP)*0.206 	;
+{161.} 	 OH + IC4H10 = TC4H9O2 : 	1.16D-17*TEMP**2*EXP(225/TEMP)*0.794 	;
+{162.} 	 CL + NC5H12 = PEAO2 : 	2.80D-10*0.222 	;
+{163.} 	 CL + NC5H12 = PEBO2 : 	2.80D-10*0.558 	;
+{164.} 	 CL + NC5H12 = PECO2 : 	2.80D-10*0.220 	;
+{165.} 	 OH + NC5H12 = PEAO2 : 	2.44D-17*TEMP**2*EXP(183/TEMP)*0.083 	;
+{166.} 	 OH + NC5H12 = PEBO2 : 	2.44D-17*TEMP**2*EXP(183/TEMP)*0.568 	;
+{167.} 	 OH + NC5H12 = PECO2 : 	2.44D-17*TEMP**2*EXP(183/TEMP)*0.349 	;
+{168.} 	 CL + IC5H12 = IPEAO2 : 	2.20D-10*0.408 	;
+{169.} 	 CL + IC5H12 = IPEBO2 : 	2.20D-10*0.342 	;
+{170.} 	 CL + IC5H12 = IPECO2 : 	2.20D-10*0.250 	;
+{171.} 	 OH + IC5H12 = IPEAO2 : 	3.70D-12*0.087 	;
+{172.} 	 OH + IC5H12 = IPEBO2 : 	3.70D-12*0.297 	;
+{173.} 	 OH + IC5H12 = IPECO2 : 	3.70D-12*0.616 	;
+{174.} 	 CL + NEOP = NEOPO2 : 	1.11D-10 	;
+{175.} 	 OH + NEOP = NEOPO2 : 	1.80D-17*TEMP**2*EXP(-189/TEMP) 	;
+{176.} 	 CL + NC6H14 = HEXAO2 : 	3.40D-10*0.182 	;
+{177.} 	 CL + NC6H14 = HEXBO2 : 	3.40D-10*0.457 	;
+{178.} 	 CL + NC6H14 = HEXCO2 : 	3.40D-10*0.361 	;
+{179.} 	 OH + NC6H14 = HEXAO2 : 	1.53D-17*TEMP**2*EXP(414/TEMP)*0.061 	;
+{180.} 	 OH + NC6H14 = HEXBO2 : 	1.53D-17*TEMP**2*EXP(414/TEMP)*0.421 	;
+{181.} 	 OH + NC6H14 = HEXCO2 : 	1.53D-17*TEMP**2*EXP(414/TEMP)*0.518 	;
+{182.} 	 CL + M2PE = M2PEAO2 : 	2.90D-10*0.321 	;
+{183.} 	 CL + M2PE = M2PEBO2 : 	2.90D-10*0.269 	;
+{184.} 	 CL + M2PE = M2PECO2 : 	2.90D-10*0.213 	;
+{185.} 	 CL + M2PE = M2PEDO2 : 	2.90D-10*0.197 	;
+{186.} 	 OH + M2PE = M2PEAO2 : 	5.30D-12*0.063 	;
+{187.} 	 OH + M2PE = M2PEBO2 : 	5.30D-12*0.218 	;
+{188.} 	 OH + M2PE = M2PECO2 : 	5.30D-12*0.267 	;
+{189.} 	 OH + M2PE = M2PEDO2 : 	5.30D-12*0.452 	;
+{190.} 	 CL + M3PE = M3PEAO2 : 	2.80D-10*0.317 	;
+{191.} 	 CL + M3PE = M3PEBO2 : 	2.80D-10*0.530 	;
+{192.} 	 CL + M3PE = M3PECO2 : 	2.80D-10*0.153 	;
+{193.} 	 OH + M3PE = M3PEAO2 : 	5.40D-12*0.060 	;
+{194.} 	 OH + M3PE = M3PEBO2 : 	5.40D-12*0.413 	;
+{195.} 	 OH + M3PE = M3PECO2 : 	5.40D-12*0.527 	;
+{196.} 	 CL + M22C4 = M22C43O2 : 	1.71D-10*0.461 	;
+{197.} 	 CL + M22C4 = M22C4O2 : 	1.71D-10*0.154 	;
+{198.} 	 CL + M22C4 = M33C4O2 : 	1.71D-10*0.386 	;
+{199.} 	 OH + M22C4 = M22C43O2 : 	3.22D-11*EXP(-781/TEMP)*0.632 	;
+{200.} 	 OH + M22C4 = M22C4O2 : 	3.22D-11*EXP(-781/TEMP)*0.092 	;
+{201.} 	 OH + M22C4 = M33C4O2 : 	3.22D-11*EXP(-781/TEMP)*0.276 	;
+{202.} 	 CL + M23C4 = M23C43O2 : 	2.30D-10*0.478 	;
+{203.} 	 CL + M23C4 = M23C4O2 : 	2.30D-10*0.522 	;
+{204.} 	 OH + M23C4 = M23C43O2 : 	1.24D-17*TEMP**2*EXP(494/TEMP)*0.877 	;
+{205.} 	 OH + M23C4 = M23C4O2 : 	1.24D-17*TEMP**2*EXP(494/TEMP)*0.123 	;
+{206.} 	 CL + NC7H16 = HEPTO2 : 	3.90D-10 	;
+{207.} 	 OH + NC7H16 = HEPTO2 : 	1.59D-17*TEMP**2*EXP(478/TEMP) 	;
+{208.} 	 CL + M2HEX = M2HEXAO2 : 	3.50D-10*0.779 	;
+{209.} 	 CL + M2HEX = M2HEXBO2 : 	3.50D-10*0.221 	;
+{210.} 	 OH + M2HEX = M2HEXAO2 : 	6.86D-12*0.625 	;
+{211.} 	 OH + M2HEX = M2HEXBO2 : 	6.86D-12*0.375 	;
+{212.} 	 CL + M3HEX = M3HEXAO2 : 	3.11D-10*0.793 	;
+{213.} 	 CL + M3HEX = M3HEXBO2 : 	3.11D-10*0.207 	;
+{214.} 	 OH + M3HEX = M3HEXAO2 : 	7.15D-12*0.558 	;
+{215.} 	 OH + M3HEX = M3HEXBO2 : 	7.15D-12*0.442 	;
+{216.} 	 CL + NC8H18 = OCTO2 : 	4.60D-10 	;
+{217.} 	 OH + NC8H18 = OCTO2 : 	2.76D-17*TEMP**2*EXP(378/TEMP) 	;
+{218.} 	 CL + NC9H20 = NONO2 : 	4.80D-10 	;
+{219.} 	 OH + NC9H20 = NONO2 : 	2.51D-17*TEMP**2*EXP(447/TEMP) 	;
+{220.} 	 CL + NC10H22 = DECO2 : 	5.55D-10 	;
+{221.} 	 OH + NC10H22 = DECO2 : 	3.13D-17*TEMP**2*EXP(416/TEMP) 	;
+{222.} 	 CL + NC11H24 = UDECO2 : 	6.17D-10 	;
+{223.} 	 OH + NC11H24 = UDECO2 : 	1.29D-11 	;
+{224.} 	 CL + NC12H26 = DDECO2 : 	6.74D-10 	;
+{225.} 	 OH + NC12H26 = DDECO2 : 	1.39D-11 	;
+{226.} 	 CL + CHEX = CHEXO2 : 	3.50D-10 	;
+{227.} 	 OH + CHEX = CHEXO2 : 	2.88D-17*TEMP**2*EXP(309/TEMP) 	;
+{228.} 	 C2H4 + NO3 = ETHENO3O2 : 	3.3D-12*EXP(-2880/TEMP) 	;
+{229.} 	 C2H4 + O3 = HCHO + CH2OOA : 	9.1D-15*EXP(-2580/TEMP) 	;
+{230.} 	 C2H4 + OH = HOCH2CH2O2 : 	KMT15 	;
+{231.} 	 NO3 + C3H6 = PRONO3AO2 : 	4.6D-13*EXP(-1155/TEMP)*0.35 	;
+{232.} 	 NO3 + C3H6 = PRONO3BO2 : 	4.6D-13*EXP(-1155/TEMP)*0.65 	;
+{233.} 	 O3 + C3H6 = CH2OOB + CH3CHO : 	5.5D-15*EXP(-1880/TEMP)*0.5 	;
+{234.} 	 O3 + C3H6 = CH3CHOOA + HCHO : 	5.5D-15*EXP(-1880/TEMP)*0.5 	;
+{235.} 	 OH + C3H6 = HYPROPO2 : 	KMT16*0.87 	;
+{236.} 	 OH + C3H6 = IPROPOLO2 : 	KMT16*0.13 	;
+{237.} 	 BUT1ENE + NO3 = BU1ENO3O2 : 	3.2D-13*EXP(-950/TEMP)*0.65 	;
+{238.} 	 BUT1ENE + NO3 = C43NO34O2 : 	3.2D-13*EXP(-950/TEMP)*0.35 	;
+{239.} 	 BUT1ENE + O3 = C2H5CHOOA + HCHO : 	3.55D-15*EXP(-1745/TEMP)*0.5 	;
+{240.} 	 BUT1ENE + O3 = CH2OOB + C2H5CHO : 	3.55D-15*EXP(-1745/TEMP)*0.5 	;
+{241.} 	 BUT1ENE + OH = HO3C4O2 : 	6.6D-12*EXP(465/TEMP)*0.13 	;
+{242.} 	 BUT1ENE + OH = NBUTOLAO2 : 	6.6D-12*EXP(465/TEMP)*0.87 	;
+{243.} 	 CBUT2ENE + NO3 = C42NO33O2 : 	3.50D-13 	;
+{244.} 	 CBUT2ENE + O3 = CH3CHO + CH3CHOOB : 	3.22D-15*EXP(-968/TEMP) 	;
+{245.} 	 CBUT2ENE + OH = BUT2OLO2 : 	1.10D-11*EXP(487/TEMP) 	;
+{246.} 	 TBUT2ENE + NO3 = C42NO33O2 : 	3.90D-13 	;
+{247.} 	 TBUT2ENE + O3 = CH3CHO + CH3CHOOB : 	6.64D-15*EXP(-1059/TEMP) 	;
+{248.} 	 TBUT2ENE + OH = BUT2OLO2 : 	1.01D-11*EXP(550/TEMP) 	;
+{249.} 	 MEPROPENE + NO3 = MPRANO3O2 : 	3.4D-13*0.8 	;
+{250.} 	 MEPROPENE + NO3 = MPRBNO3O2 : 	3.4D-13*0.2 	;
+{251.} 	 MEPROPENE + O3 = CH2OOC + CH3COCH3 : 	2.7D-15*EXP(-1630/TEMP)*0.5 	;
+{252.} 	 MEPROPENE + O3 = CH3CCH3OOA + HCHO : 	2.7D-15*EXP(-1630/TEMP)*0.5 	;
+{253.} 	 MEPROPENE + OH = IBUTOLBO2 : 	9.4D-12*EXP(505/TEMP)*0.924 	;
+{254.} 	 MEPROPENE + OH = TBUTOLO2 : 	9.4D-12*EXP(505/TEMP)*0.076 	;
+{255.} 	 PENT1ENE + NO3 = C51NO32O2 : 	1.20D-14*0.65 	;
+{256.} 	 PENT1ENE + NO3 = C52NO31O2 : 	1.20D-14*0.35 	;
+{257.} 	 PENT1ENE + O3 = C3H7CHOOA + HCHO : 	1.00D-17*0.5 	;
+{258.} 	 PENT1ENE + O3 = CH2OOB + C3H7CHO : 	1.00D-17*0.5 	;
+{259.} 	 PENT1ENE + OH = PE1ENEAO2 : 	5.86D-12*EXP(500/TEMP)*0.87 	;
+{260.} 	 PENT1ENE + OH = PE1ENEBO2 : 	5.86D-12*EXP(500/TEMP)*0.13 	;
+{261.} 	 CPENT2ENE + NO3 = C52NO33O2 : 	3.70D-13*0.5 	;
+{262.} 	 CPENT2ENE + NO3 = C53NO32O2 : 	3.70D-13*0.5 	;
+{263.} 	 CPENT2ENE + O3 = C2H5CHOOB + CH3CHO : 	1.60D-16*0.5 	;
+{264.} 	 CPENT2ENE + O3 = CH3CHOOB + C2H5CHO : 	1.60D-16*0.5 	;
+{265.} 	 CPENT2ENE + OH = PE2ENEAO2 : 	6.54D-11*0.5 	;
+{266.} 	 CPENT2ENE + OH = PE2ENEBO2 : 	6.54D-11*0.5 	;
+{267.} 	 TPENT2ENE + NO3 = C52NO33O2 : 	3.70D-13*0.5 	;
+{268.} 	 TPENT2ENE + NO3 = C53NO32O2 : 	3.70D-13*0.5 	;
+{269.} 	 TPENT2ENE + O3 = C2H5CHOOB + CH3CHO : 	1.60D-16*0.5 	;
+{270.} 	 TPENT2ENE + O3 = CH3CHOOB + C2H5CHO : 	1.60D-16*0.5 	;
+{271.} 	 TPENT2ENE + OH = PE2ENEAO2 : 	6.69D-11*0.5 	;
+{272.} 	 TPENT2ENE + OH = PE2ENEBO2 : 	6.69D-11*0.5 	;
+{273.} 	 ME2BUT1ENE + NO3 = C4NO32M1O2 : 	3.30D-13*0.2 	;
+{274.} 	 ME2BUT1ENE + NO3 = C4NO32M2O2 : 	3.30D-13*0.8 	;
+{275.} 	 ME2BUT1ENE + O3 = C2H5MECOOA + HCHO : 	1.60D-17*0.5 	;
+{276.} 	 ME2BUT1ENE + O3 = CH2OOC + MEK : 	1.60D-17*0.5 	;
+{277.} 	 ME2BUT1ENE + OH = M2BUOL2O2 : 	6.07D-11*0.924 	;
+{278.} 	 ME2BUT1ENE + OH = PROL11MO2 : 	6.07D-11*0.076 	;
+{279.} 	 ME3BUT1ENE + NO3 = C4M3NO31O2 : 	1.20D-14*0.65 	;
+{280.} 	 ME3BUT1ENE + NO3 = C4M3NO32O2 : 	1.20D-14*0.35 	;
+{281.} 	 ME3BUT1ENE + O3 = CH2OOB + IPRCHO : 	1.10D-17*0.5 	;
+{282.} 	 ME3BUT1ENE + O3 = IPRCHOOA + HCHO : 	1.10D-17*0.5 	;
+{283.} 	 ME3BUT1ENE + OH = ME3BU2OLO2 : 	5.32D-12*EXP(533/TEMP)*0.130 	;
+{284.} 	 ME3BUT1ENE + OH = ME3BUOLO2 : 	5.32D-12*EXP(533/TEMP)*0.870 	;
+{285.} 	 ME2BUT2ENE + NO3 = C4M2NO32O2 : 	9.37D-12*0.35 	;
+{286.} 	 ME2BUT2ENE + NO3 = C4M2NO33O2 : 	9.37D-12*0.65 	;
+{287.} 	 ME2BUT2ENE + O3 = CH3CHO + CH3CCH3OOB : 	6.51D-15*EXP(-829/TEMP)*0.50 	;
+{288.} 	 ME2BUT2ENE + O3 = CH3COCH3 + CH3CHOOC : 	6.51D-15*EXP(-829/TEMP)*0.50 	;
+{289.} 	 ME2BUT2ENE + OH = ME2BU2OLO2 : 	1.92D-11*EXP(450/TEMP)*0.353 	;
+{290.} 	 ME2BUT2ENE + OH = ME2BUOLO2 : 	1.92D-11*EXP(450/TEMP)*0.647 	;
+{291.} 	 HEX1ENE + NO3 = C65NO36O2 : 	1.20D-14*0.35 	;
+{292.} 	 HEX1ENE + NO3 = C66NO35O2 : 	1.20D-14*0.65 	;
+{293.} 	 HEX1ENE + O3 = C4H9CHO + CH2OOB : 	1.10D-17*0.5 	;
+{294.} 	 HEX1ENE + O3 = HCHO + NC4H9CHOOA : 	1.10D-17*0.5 	;
+{295.} 	 HEX1ENE + OH = C6OH5O2 : 	3.70D-11*0.870 	;
+{296.} 	 HEX1ENE + OH = HO5C6O2 : 	3.70D-11*0.130 	;
+{297.} 	 CHEX2ENE + NO3 = C62NO33O2 : 	3.70D-13*0.5 	;
+{298.} 	 CHEX2ENE + NO3 = C63NO32O2 : 	3.70D-13*0.5 	;
+{299.} 	 CHEX2ENE + O3 = C3H7CHO + CH3CHOOB : 	1.60D-16*0.5 	;
+{300.} 	 CHEX2ENE + O3 = CH3CHO + C3H7CHOOB : 	1.60D-16*0.5 	;
+{301.} 	 CHEX2ENE + OH = C64OH5O2 : 	6.00D-11*0.5 	;
+{302.} 	 CHEX2ENE + OH = C65OH4O2 : 	6.00D-11*0.5 	;
+{303.} 	 THEX2ENE + NO3 = C62NO33O2 : 	3.70D-13*0.5 	;
+{304.} 	 THEX2ENE + NO3 = C63NO32O2 : 	3.70D-13*0.5 	;
+{305.} 	 THEX2ENE + O3 = C3H7CHO + CH3CHOOB : 	1.60D-16*0.5 	;
+{306.} 	 THEX2ENE + O3 = CH3CHO + C3H7CHOOB : 	1.60D-16*0.5 	;
+{307.} 	 THEX2ENE + OH = C64OH5O2 : 	6.00D-11*0.5 	;
+{308.} 	 THEX2ENE + OH = C65OH4O2 : 	6.00D-11*0.5 	;
+{309.} 	 DM23BU2ENE + NO3 = C4ME2NO3O2 : 	5.72D-11 	;
+{310.} 	 DM23BU2ENE + O3 = CH3CCH3OOC + CH3COCH3 : 	3.03D-15*EXP(-294/TEMP) 	;
+{311.} 	 DM23BU2ENE + OH = C4ME2OHO2 : 	1.10D-10 	;
+{312.} 	 C2H2 + OH = GLYOX + OH : 	KMT17*0.636 	;
+{313.} 	 C2H2 + OH = HCOOH + CO + HO2 : 	KMT17*0.364 	;
+{314.} 	 BENZENE + OH = BZBIPERO2 : 	2.3D-12*EXP(-190/TEMP)*0.352 	;
+{315.} 	 BENZENE + OH = BZEPOXMUC + HO2 : 	2.3D-12*EXP(-190/TEMP)*0.118 	;
+{316.} 	 BENZENE + OH = PHENOL + HO2 : 	2.3D-12*EXP(-190/TEMP)*0.53 	;
+{317.} 	 TOLUENE + OH = C6H5CH2O2 : 	1.8D-12*EXP(340/TEMP)*0.07 	;
+{318.} 	 TOLUENE + OH = CRESOL + HO2 : 	1.8D-12*EXP(340/TEMP)*0.18 	;
+{319.} 	 TOLUENE + OH = TLBIPERO2 : 	1.8D-12*EXP(340/TEMP)*0.65 	;
+{320.} 	 TOLUENE + OH = TLEPOXMUC + HO2 : 	1.8D-12*EXP(340/TEMP)*0.10 	;
+{321.} 	 OXYL + NO3 = OXYLO2 + HNO3 : 	4.10D-16 	;
+{322.} 	 OXYL + OH = OXYBIPERO2 : 	1.36D-11*0.55 	;
+{323.} 	 OXYL + OH = OXYEPOXMUC + HO2 : 	1.36D-11*0.24 	;
+{324.} 	 OXYL + OH = OXYLO2 : 	1.36D-11*0.05 	;
+{325.} 	 OXYL + OH = OXYLOL + HO2 : 	1.36D-11*0.16 	;
+{326.} 	 MXYL + NO3 = MXYLO2 + HNO3 : 	2.60D-16 	;
+{327.} 	 MXYL + OH = MXYBIPERO2 : 	2.31D-11*0.50 	;
+{328.} 	 MXYL + OH = MXYEPOXMUC + HO2 : 	2.31D-11*0.29 	;
+{329.} 	 MXYL + OH = MXYLO2 : 	2.31D-11*0.04 	;
+{330.} 	 MXYL + OH = MXYLOL + HO2 : 	2.31D-11*0.17 	;
+{331.} 	 PXYL + NO3 = PXYLO2 + HNO3 : 	5.00D-16 	;
+{332.} 	 PXYL + OH = PXYBIPERO2 : 	1.43D-11*0.625 	;
+{333.} 	 PXYL + OH = PXYEPOXMUC + HO2 : 	1.43D-11*0.155 	;
+{334.} 	 PXYL + OH = PXYLO2 : 	1.43D-11*0.10 	;
+{335.} 	 PXYL + OH = PXYLOL + HO2 : 	1.43D-11*0.12 	;
+{336.} 	 EBENZ + NO3 = C6H5C2H4O2 + HNO3 : 	1.20D-16 	;
+{337.} 	 EBENZ + OH = C6H5C2H4O2 : 	7.00D-12*0.07 	;
+{338.} 	 EBENZ + OH = EBENZOL + HO2 : 	7.00D-12*0.18 	;
+{339.} 	 EBENZ + OH = EBZBIPERO2 : 	7.00D-12*0.65 	;
+{340.} 	 EBENZ + OH = EBZPOXMUC + HO2 : 	7.00D-12*0.10 	;
+{341.} 	 PBENZ + NO3 = PHC3O2 + HNO3 : 	1.40D-16 	;
+{342.} 	 PBENZ + OH = PBENZOL + HO2 : 	5.80D-12*0.18 	;
+{343.} 	 PBENZ + OH = PBZBIPERO2 : 	5.80D-12*0.65 	;
+{344.} 	 PBENZ + OH = PBZPOXMUC + HO2 : 	5.80D-12*0.10 	;
+{345.} 	 PBENZ + OH = PHC3O2 : 	5.80D-12*0.07 	;
+{346.} 	 IPBENZ + NO3 = PHIC3O2 + HNO3 : 	1.40D-16 	;
+{347.} 	 IPBENZ + OH = IPBENZOL + HO2 : 	6.30D-12*0.18 	;
+{348.} 	 IPBENZ + OH = IPBZBIPRO2 : 	6.30D-12*0.65 	;
+{349.} 	 IPBENZ + OH = IPBZPOXMUC + HO2 : 	6.30D-12*0.10 	;
+{350.} 	 IPBENZ + OH = PHIC3O2 : 	6.30D-12*0.07 	;
+{351.} 	 TM123B + NO3 = TM123BO2 + HNO3 : 	1.90D-15 	;
+{352.} 	 TM123B + OH = TM123BO2 : 	3.27D-11*0.06 	;
+{353.} 	 TM123B + OH = TM123BOL + HO2 : 	3.27D-11*0.03 	;
+{354.} 	 TM123B + OH = TM123BPRO2 : 	3.27D-11*0.70 	;
+{355.} 	 TM123B + OH = TM123OXMUC + HO2 : 	3.27D-11*0.21 	;
+{356.} 	 TM124B + NO3 = TM124BO2 + HNO3 : 	1.80D-15 	;
+{357.} 	 TM124B + OH = TM124BO2 : 	3.25D-11*0.06 	;
+{358.} 	 TM124B + OH = TM124BPRO2 : 	3.25D-11*0.61 	;
+{359.} 	 TM124B + OH = TM124OL + HO2 : 	3.25D-11*0.03 	;
+{360.} 	 TM124B + OH = TM124OXMUC + HO2 : 	3.25D-11*0.30 	;
+{361.} 	 TM135B + NO3 = TMBO2 + HNO3 : 	8.80D-16 	;
+{362.} 	 TM135B + OH = TM135BPRO2 : 	5.67D-11*0.79 	;
+{363.} 	 TM135B + OH = TM135BZOL + HO2 : 	5.67D-11*0.04 	;
+{364.} 	 TM135B + OH = TM135OXMUC + HO2 : 	5.67D-11*0.14 	;
+{365.} 	 TM135B + OH = TMBO2 : 	5.67D-11*0.03 	;
+{366.} 	 OETHTOL + NO3 = ETOLO2 + HNO3 : 	7.10D-16 	;
+{367.} 	 OETHTOL + OH = ETOLO2 : 	1.19D-11*0.05 	;
+{368.} 	 OETHTOL + OH = OETLBIPRO2 : 	1.19D-11*0.55 	;
+{369.} 	 OETHTOL + OH = OETLPOXMUC + HO2 : 	1.19D-11*0.24 	;
+{370.} 	 OETHTOL + OH = OETOH + HO2 : 	1.19D-11*0.16 	;
+{371.} 	 METHTOL + NO3 = ETOLO2 + HNO3 : 	4.50D-16 	;
+{372.} 	 METHTOL + OH = ETOLO2 : 	1.86D-11*0.04 	;
+{373.} 	 METHTOL + OH = METLBIPRO2 : 	1.86D-11*0.50 	;
+{374.} 	 METHTOL + OH = METLPOXMUC + HO2 : 	1.86D-11*0.29 	;
+{375.} 	 METHTOL + OH = METOH + HO2 : 	1.86D-11*0.17 	;
+{376.} 	 PETHTOL + NO3 = ETOLO2 + HNO3 : 	8.60D-16 	;
+{377.} 	 PETHTOL + OH = ETOLO2 : 	1.18D-11*0.10 	;
+{378.} 	 PETHTOL + OH = PETLBIPRO2 : 	1.18D-11*0.625 	;
+{379.} 	 PETHTOL + OH = PETLPOXMUC + HO2 : 	1.18D-11*0.155 	;
+{380.} 	 PETHTOL + OH = PETOH + HO2 : 	1.18D-11*0.12 	;
+{381.} 	 DIME35EB + NO3 = DM35EBO2 + HNO3 : 	1.50D-15 	;
+{382.} 	 DIME35EB + OH = DM35EBO2 : 	5.67D-11*0.03 	;
+{383.} 	 DIME35EB + OH = DMEBIPRO2 : 	5.67D-11*0.79 	;
+{384.} 	 DIME35EB + OH = DMEBPOXMUC + HO2 : 	5.67D-11*0.14 	;
+{385.} 	 DIME35EB + OH = DMEPHOH + HO2 : 	5.67D-11*0.04 	;
+{386.} 	 DIET35TOL + NO3 = DE35TO2 + HNO3 : 	2.60D-15 	;
+{387.} 	 DIET35TOL + OH = DE35TO2 : 	5.67D-11*0.03 	;
+{388.} 	 DIET35TOL + OH = DEMPHOH + HO2 : 	5.67D-11*0.04 	;
+{389.} 	 DIET35TOL + OH = DETLBIPRO2 : 	5.67D-11*0.79 	;
+{390.} 	 DIET35TOL + OH = DETLPOXMUC + HO2 : 	5.67D-11*0.14 	;
+{391.} 	 NO3 + STYRENE = NSTYRENO2 : 	1.50D-12 	;
+{392.} 	 O3 + STYRENE = CH2OOB + BENZAL : 	1.70D-17*0.5 	;
+{393.} 	 O3 + STYRENE = HCHO + PHCHOOA : 	1.70D-17*0.5 	;
+{394.} 	 OH + STYRENE = STYRENO2 : 	5.80D-11 	;
+{395.} 	 BENZAL = HO2 + C6H5CO3 : 	J(19) 	;
+{396.} 	 BENZAL = HO2 + CO + C6H5O2 : 	J(18) 	;
+{397.} 	 NO3 + BENZAL = C6H5CO3 + HNO3 : 	2.40D-15 	;
+{398.} 	 OH + BENZAL = C6H5CO3 : 	5.9D-12*EXP(225/TEMP) 	;
+{399.} 	 CH3CL + OH = CH2CLO2 : 	7.33D-18*TEMP**2*EXP(-809/TEMP) 	;
+{400.} 	 CH2CL2 + OH = CHCL2O2 : 	6.14D-18*TEMP**2*EXP(-389/TEMP) 	;
+{401.} 	 CHCL3 + OH = CCL3O2 : 	1.80D-18*TEMP**2*EXP(-129/TEMP) 	;
+{402.} 	 CH3CCL3 + OH = CCL3CH2O2 : 	2.25D-18*TEMP**2*EXP(-910/TEMP) 	;
+{403.} 	 TCE + OH = TCEOHO2 : 	3.5D-12*EXP(-920/TEMP) 	;
+{404.} 	 TRICLETH + OH = C2CL3OHAO2 : 	3.0D-13*EXP(565/TEMP)*0.50 	;
+{405.} 	 TRICLETH + OH = C2CL3OHBO2 : 	3.0D-13*EXP(565/TEMP)*0.50 	;
+{406.} 	 CDICLETH + OH = C2CL2OHO2 : 	1.94D-12*EXP(90/TEMP) 	;
+{407.} 	 TDICLETH + OH = C2CL2OHO2 : 	1.01D-12*EXP(250/TEMP) 	;
+{408.} 	 CH2CLCH2CL + OH = DICLETO2 : 	8.69D-12*EXP(-1070/TEMP) 	;
+{409.} 	 CCL2CH2 + OH = CH2OHCL2O2 : 	2.00D-12*EXP(506/TEMP)*0.50 	;
+{410.} 	 CCL2CH2 + OH = CL2OHCH2O2 : 	2.00D-12*EXP(506/TEMP)*0.50 	;
+{411.} 	 CL12PROP + OH = CL12PRAO2 : 	4.42D-13*0.11 	;
+{412.} 	 CL12PROP + OH = CL12PRBO2 : 	4.42D-13*0.60 	;
+{413.} 	 CL12PROP + OH = CL12PRCO2 : 	4.42D-13*0.29 	;
+{414.} 	 CHCL2CH3 + OH = CH3CCL2O2 : 	2.0D-12*EXP(-596/TEMP)*0.85 	;
+{415.} 	 CHCL2CH3 + OH = CHCL2CH2O2 : 	2.0D-12*EXP(-596/TEMP)*0.15 	;
+{416.} 	 CH3CH2CL + OH = CH2CLCH2O2 : 	7.78D-18*TEMP**2*EXP(-152/TEMP)*0.87 	;
+{417.} 	 CH3CH2CL + OH = CH3CHCLO2 : 	7.78D-18*TEMP**2*EXP(-152/TEMP)*0.13 	;
+{418.} 	 CHCL2CHCL2 + OH = CHCL2CL2O2 : 	5.13D-13 	;
+{419.} 	 CH2CLCHCL2 + OH = CH2CL3O2 : 	4.44D-18*TEMP**2*EXP(-208/TEMP)*0.5 	;
+{420.} 	 CH2CLCHCL2 + OH = CHCL3O2 : 	4.44D-18*TEMP**2*EXP(-208/TEMP)*0.5 	;
+{421.} 	 VINCL + NO3 = CCLNO3O2 : 	0.35*2.3D-16 	;
+{422.} 	 VINCL + NO3 = CNO3CLO2 : 	0.65*2.3D-16 	;
+{423.} 	 VINCL + O3 = CHOCL + CH2OOB : 	0.76*2.45D-19 	;
+{424.} 	 VINCL + O3 = HCHO + CHCLOOA : 	0.24*2.45D-19 	;
+{425.} 	 VINCL + OH = CCLOHCH2O2 : 	0.5 *8.49D-12 	;
+{426.} 	 VINCL + OH = CH2OHCCLO2 : 	0.5 *8.49D-12 	;
+{427.} 	 NO3 + C4H6 = NBUTDAO2 : 	1.03D-13*0.5 	;
+{428.} 	 NO3 + C4H6 = NBUTDBO2 : 	1.03D-13*0.5 	;
+{429.} 	 O3 + C4H6 = ACR + CH2OOD : 	1.34D-14*EXP(-2283/TEMP)*0.5 	;
+{430.} 	 O3 + C4H6 = HCHO + ACROOA : 	1.34D-14*EXP(-2283/TEMP)*0.5 	;
+{431.} 	 OH + C4H6 = BUTDAO2 : 	1.48D-11*EXP(448/TEMP)*0.217 	;
+{432.} 	 OH + C4H6 = BUTDBO2 : 	1.48D-11*EXP(448/TEMP)*0.649 	;
+{433.} 	 OH + C4H6 = BUTDCO2 : 	1.48D-11*EXP(448/TEMP)*0.134 	;
+{434.} 	 NO3 + C5H8 = NISOPO2 : 	3.15D-12*EXP(-450/TEMP) 	;
+{435.} 	 O3 + C5H8 = CH2OOE + MACR : 	1.03D-14*EXP(-1995/TEMP)*0.3 	;
+{436.} 	 O3 + C5H8 = CH2OOE + MVK : 	1.03D-14*EXP(-1995/TEMP)*0.2 	;
+{437.} 	 O3 + C5H8 = HCHO + MACROOA : 	1.03D-14*EXP(-1995/TEMP)*0.3 	;
+{438.} 	 O3 + C5H8 = HCHO + MVKOOA : 	1.03D-14*EXP(-1995/TEMP)*0.2 	;
+{439.} 	 OH + C5H8 = ISOPAO2 : 	2.7D-11*EXP(390/TEMP)*0.148 	;
+{440.} 	 OH + C5H8 = ISOPBO2 : 	2.7D-11*EXP(390/TEMP)*0.444 	;
+{441.} 	 OH + C5H8 = ISOPCO2 : 	2.7D-11*EXP(390/TEMP)*0.102 	;
+{442.} 	 OH + C5H8 = ISOPDO2 : 	2.7D-11*EXP(390/TEMP)*0.306 	;
+{443.} 	 CH3OCHO + OH = CH3O2 : 	9.39D-13*EXP(-461/TEMP)*0.450 	;
+{444.} 	 CH3OCHO + OH = CHOOCH2O2 : 	9.39D-13*EXP(-461/TEMP)*0.550 	;
+{445.} 	 METHACET + OH = METHACETO2 : 	8.54D-19*TEMP**2*EXP(455/TEMP)*0.685 	;
+{446.} 	 METHACET + OH = MOCOCH2O2 : 	8.54D-19*TEMP**2*EXP(455/TEMP)*0.315 	;
+{447.} 	 ETHACET + OH = ACETC2H4O2 : 	6.92D-19*TEMP**2*EXP(986/TEMP)*0.095 	;
+{448.} 	 ETHACET + OH = EOCOCH2O2 : 	6.92D-19*TEMP**2*EXP(986/TEMP)*0.057 	;
+{449.} 	 ETHACET + OH = ETHACETO2 : 	6.92D-19*TEMP**2*EXP(986/TEMP)*0.848 	;
+{450.} 	 NPROACET + OH = NPROACEAO2 : 	1.39D-18*TEMP**2*EXP(991/TEMP)*0.364 	;
+{451.} 	 NPROACET + OH = NPROACEBO2 : 	1.39D-18*TEMP**2*EXP(991/TEMP)*0.583 	;
+{452.} 	 NPROACET + OH = NPROACECO2 : 	1.39D-18*TEMP**2*EXP(991/TEMP)*0.053 	;
+{453.} 	 IPROACET + OH = IPRACBO2 : 	2.64D-13*EXP(770/TEMP)*0.098 	;
+{454.} 	 IPROACET + OH = IPROACETO2 : 	2.64D-13*EXP(770/TEMP)*0.902 	;
+{455.} 	 NBUTACET + OH = NBUACETAO2 : 	2.48D-18*TEMP**2*EXP(926/TEMP)*0.261 	;
+{456.} 	 NBUTACET + OH = NBUACETBO2 : 	2.48D-18*TEMP**2*EXP(926/TEMP)*0.321 	;
+{457.} 	 NBUTACET + OH = NBUACETCO2 : 	2.48D-18*TEMP**2*EXP(926/TEMP)*0.417 	;
+{458.} 	 SBUTACET + OH = SBUACETAO2 : 	6.66D-13*EXP(640/TEMP)*0.768 	;
+{459.} 	 SBUTACET + OH = SBUACETBO2 : 	6.66D-13*EXP(640/TEMP)*0.232 	;
+{460.} 	 TBUACET + OH = MCOOTBO2 : 	1.88D-12*EXP(-395/TEMP)*0.834 	;
+{461.} 	 TBUACET + OH = TBOCOCH2O2 : 	1.88D-12*EXP(-395/TEMP)*0.166 	;
+{462.} 	 CH3OCH3 + NO3 = HNO3 + CH3OCH2O2 : 	2.60D-16 	;
+{463.} 	 CH3OCH3 + OH = CH3OCH2O2 : 	5.7D-12*EXP(-215/TEMP) 	;
+{464.} 	 DIETETHER + NO3 = DIETETO2 + HNO3 : 	2.80D-15 	;
+{465.} 	 DIETETHER + OH = DIETETO2 : 	8.91D-18*TEMP**2*EXP(837/TEMP)*0.928 	;
+{466.} 	 DIETETHER + OH = ETOC2O2 : 	8.91D-18*TEMP**2*EXP(837/TEMP)*0.072 	;
+{467.} 	 MTBE + NO3 = MTBEAO2 + HNO3 : 	6.40D-16*0.20 	;
+{468.} 	 MTBE + NO3 = MTBEBO2 + HNO3 : 	6.40D-16*0.80 	;
+{469.} 	 MTBE + OH = MTBEAO2 : 	6.54D-18*TEMP**2*EXP(483/TEMP)*0.510 	;
+{470.} 	 MTBE + OH = MTBEBO2 : 	6.54D-18*TEMP**2*EXP(483/TEMP)*0.490 	;
+{471.} 	 DIIPRETHER + NO3 = DIIPRETO2 + HNO3 : 	6.50D-15 	;
+{472.} 	 DIIPRETHER + OH = DIIPRETO2 : 	2.20D-12*EXP(457/TEMP)*0.827 	;
+{473.} 	 DIIPRETHER + OH = IPROMC2O2 : 	2.20D-12*EXP(457/TEMP)*0.173 	;
+{474.} 	 ETBE + NO3 = ETBEAO2 + HNO3 : 	1.91D-15*0.267 	;
+{475.} 	 ETBE + NO3 = ETBEBO2 + HNO3 : 	1.91D-15*0.733 	;
+{476.} 	 ETBE + OH = ETBEAO2 : 	6.82D-18*TEMP**2*EXP(800/TEMP)*0.180 	;
+{477.} 	 ETBE + OH = ETBEBO2 : 	6.82D-18*TEMP**2*EXP(800/TEMP)*0.760 	;
+{478.} 	 ETBE + OH = ETBECO2 : 	6.82D-18*TEMP**2*EXP(800/TEMP)*0.060 	;
+{479.} 	 MO2EOL + NO3 = MO2EOLAO2 + HNO3 : 	1.53D-15*0.915 	;
+{480.} 	 MO2EOL + NO3 = MO2EOLBO2 + HNO3 : 	1.53D-15*0.085 	;
+{481.} 	 MO2EOL + OH = MEMOXYCHO + HO2 : 	4.10D-12*EXP(325/TEMP)*0.358 	;
+{482.} 	 MO2EOL + OH = MO2EOLAO2 : 	4.10D-12*EXP(325/TEMP)*0.533 	;
+{483.} 	 MO2EOL + OH = MO2EOLBO2 : 	4.10D-12*EXP(325/TEMP)*0.109 	;
+{484.} 	 EOX2EOL + NO3 = EOX2EOLAO2 + HNO3 : 	2.80D-15*0.5 	;
+{485.} 	 EOX2EOL + NO3 = EOX2EOLBO2 + HNO3 : 	2.80D-15*0.5 	;
+{486.} 	 EOX2EOL + OH = EOX2EOLAO2 : 	1.80D-11*0.399 	;
+{487.} 	 EOX2EOL + OH = EOX2EOLBO2 : 	1.80D-11*0.333 	;
+{488.} 	 EOX2EOL + OH = EOX2ETCHO + HO2 : 	1.80D-11*0.268 	;
+{489.} 	 PR2OHMOX + NO3 = PR2OHMOXO2 + HNO3 : 	3.76D-15 	;
+{490.} 	 PR2OHMOX + OH = H2C3OCO2 : 	1.59D-11*0.099 	;
+{491.} 	 PR2OHMOX + OH = PR2OHMOXO2 : 	1.59D-11*0.484 	;
+{492.} 	 PR2OHMOX + OH = PRONEMOX + HO2 : 	1.59D-11*0.417 	;
+{493.} 	 BUOX2ETOH + NO3 = BOX2EOHAO2 + HNO3 : 	4.65D-15*0.70 	;
+{494.} 	 BUOX2ETOH + NO3 = BOX2EOHBO2 + HNO3 : 	4.65D-15*0.30 	;
+{495.} 	 BUOX2ETOH + OH = BOX2ECHO + HO2 : 	2.31D-11*0.196 	;
+{496.} 	 BUOX2ETOH + OH = BOX2EOHAO2 : 	2.31D-11*0.513 	;
+{497.} 	 BUOX2ETOH + OH = BOX2EOHBO2 : 	2.31D-11*0.291 	;
+{498.} 	 BOX2PROL + NO3 = BOXPROLAO2 + HNO3 : 	6.5D-15*0.5 	;
+{499.} 	 BOX2PROL + NO3 = BOXPROLBO2 + HNO3 : 	6.5D-15*0.5 	;
+{500.} 	 BOX2PROL + OH = BOXPROLAO2 : 	2.78D-11*0.486 	;
+{501.} 	 BOX2PROL + OH = BOXPROLBO2 : 	2.78D-11*0.276 	;
+{502.} 	 BOX2PROL + OH = BOXPRONE + HO2 : 	2.78D-11*0.238 	;
+{503.} 	 CH3BR + OH = CH2BRO2 : 	7.40D-13*EXP(-875/TEMP) 	;
+{504.} 	 DIBRET + OH = DIBRETO2 : 	1.03D-17*TEMP**2*EXP(-422/TEMP) 	;
+{505.} 	 CH3COCH3 + OH = CH3COCH2O2 : 	8.8D-12*EXP(-1320/TEMP) + 1.7D-14*EXP(423/TEMP) 	;
+{506.} 	 CH3COCH3 = CH3CO3 + CH3O2 : 	J(21) 	;
+{507.} 	 MEK + OH = MEKAO2 : 	1.5D-12*EXP(-90/TEMP)*0.459 	;
+{508.} 	 MEK + OH = MEKBO2 : 	1.5D-12*EXP(-90/TEMP)*0.462 	;
+{509.} 	 MEK + OH = MEKCO2 : 	1.5D-12*EXP(-90/TEMP)*0.079 	;
+{510.} 	 MEK = CH3CO3 + C2H5O2 : 	J(22) 	;
+{511.} 	 MPRK + OH = CO2C54O2 : 	4.90D-12*0.818 	;
+{512.} 	 MPRK + OH = MPRKAO2 : 	4.90D-12*0.182 	;
+{513.} 	 MPRK = CH3CO3 + NC3H7O2 : 	J(22) 	;
+{514.} 	 DIEK + OH = DIEKAO2 : 	2.00D-12*0.501 	;
+{515.} 	 DIEK + OH = DIEKBO2 : 	2.00D-12*0.499 	;
+{516.} 	 DIEK = C2H5CHO + C2H5O2 : 	J(22) 	;
+{517.} 	 MIPK = CH3CO3 + IC3H7O2 : 	J(22) 	;
+{518.} 	 OH + MIPK = MIPKAO2 : 	2.77D-12*0.523 	;
+{519.} 	 OH + MIPK = MIPKBO2 : 	2.77D-12*0.477 	;
+{520.} 	 HEX2ONE + OH = HEX2ONAO2 : 	9.10D-12*0.715 	;
+{521.} 	 HEX2ONE + OH = HEX2ONBO2 : 	9.10D-12*0.162 	;
+{522.} 	 HEX2ONE + OH = HEX2ONCO2 : 	9.10D-12*0.123 	;
+{523.} 	 HEX2ONE = CH3CO3 + NC4H9O2 : 	J(22) 	;
+{524.} 	 HEX3ONE + OH = HEX3ONAO2 : 	6.90D-12*0.638 	;
+{525.} 	 HEX3ONE + OH = HEX3ONBO2 : 	6.90D-12*0.142 	;
+{526.} 	 HEX3ONE + OH = HEX3ONCO2 : 	6.90D-12*0.110 	;
+{527.} 	 HEX3ONE + OH = HEX3ONDO2 : 	6.90D-12*0.110 	;
+{528.} 	 HEX3ONE = C2H5CO3 + NC3H7O2 : 	J(22) 	;
+{529.} 	 MIBK + OH = MIBKAO2 : 	1.41D-11*0.91 	;
+{530.} 	 MIBK + OH = MIBKBO2 : 	1.41D-11*0.09 	;
+{531.} 	 MIBK = CH3CO3 + IC4H9O2 : 	J(22) 	;
+{532.} 	 MTBK = TC4H9O2 + CH3CO3 : 	J(22) 	;
+{533.} 	 OH + MTBK = MTBKO2 : 	1.21D-12 	;
+{534.} 	 CYHEXONE + OH = CYHXONAO2 : 	5.40D-12 	;
+{535.} 	 CYHEXONE = C2H4 + C3H6 + CO : 	J(22)*0.5 	;
+{536.} 	 CYHEXONE = PENT1ENE + CO : 	J(22)*0.5 	;
+{537.} 	 APINENE + NO3 = NAPINAO2 : 	1.2D-12*EXP(490/TEMP)*0.65 	;
+{538.} 	 APINENE + NO3 = NAPINBO2 : 	1.2D-12*EXP(490/TEMP)*0.35 	;
+{539.} 	 APINENE + O3 = APINOOA : 	6.3D-16*EXP(-580/TEMP)*0.6 	;
+{540.} 	 APINENE + O3 = APINOOB : 	6.3D-16*EXP(-580/TEMP)*0.4 	;
+{541.} 	 APINENE + OH = APINAO2 : 	1.2D-11*EXP(440/TEMP)*0.572 	;
+{542.} 	 APINENE + OH = APINBO2 : 	1.2D-11*EXP(440/TEMP)*0.353 	;
+{543.} 	 APINENE + OH = APINCO2 : 	1.2D-11*EXP(440/TEMP)*0.075 	;
+{544.} 	 BPINENE + NO3 = NBPINAO2 : 	2.51D-12*0.8 	;
+{545.} 	 BPINENE + NO3 = NBPINBO2 : 	2.51D-12*0.2 	;
+{546.} 	 BPINENE + O3 = NOPINONE + CH2OOF : 	1.50D-17*0.4 	;
+{547.} 	 BPINENE + O3 = NOPINOOA + HCHO : 	1.50D-17*0.6 	;
+{548.} 	 BPINENE + OH = BPINAO2 : 	2.38D-11*EXP(357/TEMP)*0.849 	;
+{549.} 	 BPINENE + OH = BPINBO2 : 	2.38D-11*EXP(357/TEMP)*0.076 	;
+{550.} 	 BPINENE + OH = BPINCO2 : 	2.38D-11*EXP(357/TEMP)*0.075 	;
+{551.} 	 LIMONENE + NO3 = NLIMO2 : 	1.22D-11 	;
+{552.} 	 LIMONENE + O3 = LIMOOA : 	2.95D-15*EXP(-783/TEMP)*0.730 	;
+{553.} 	 LIMONENE + O3 = LIMOOB : 	2.95D-15*EXP(-783/TEMP)*0.270 	;
+{554.} 	 LIMONENE + OH = LIMAO2 : 	4.28D-11*EXP(401/TEMP)*0.408 	;
+{555.} 	 LIMONENE + OH = LIMBO2 : 	4.28D-11*EXP(401/TEMP)*0.222 	;
+{556.} 	 LIMONENE + OH = LIMCO2 : 	4.28D-11*EXP(401/TEMP)*0.370 	;
+{557.} 	 BCARY + NO3 = NBCO2 : 	1.90D-11 	;
+{558.} 	 BCARY + O3 = BCAOO : 	1.16D-14*0.435 	;
+{559.} 	 BCARY + O3 = BCBOO : 	1.16D-14*0.435 	;
+{560.} 	 BCARY + O3 = BCOOA : 	1.16D-14*0.100 	;
+{561.} 	 BCARY + O3 = BCOOB : 	1.16D-14*0.030 	;
+{562.} 	 BCARY + OH = BCAO2 : 	1.97D-10*0.408 	;
+{563.} 	 BCARY + OH = BCBO2 : 	1.97D-10*0.222 	;
+{564.} 	 BCARY + OH = BCCO2 : 	1.97D-10*0.370 	;
+{565.} 	 HCOOH + OH = HO2 : 	4.5D-13 	;
+{566.} 	 CH3CO2H + OH = CH3O2 : 	8.00D-13 	;
+{567.} 	 PROPACID + OH = C2H5O2 : 	1.2D-12 	;
+{568.} 	 DMM + NO3 = DMMAO2 + HNO3 : 	2.60D-16 	;
+{569.} 	 DMM + OH = DMMAO2 : 	4.93D-12*0.76 	;
+{570.} 	 DMM + OH = DMMBO2 : 	4.93D-12*0.24 	;
+{571.} 	 DMC + OH = DMCO2 : 	3.20D-13 	;
+{572.} 	 DMS + NO3 = CH3SCH2O2 + HNO3 : 	1.9D-13*EXP(520/TEMP) 	;
+{573.} 	 DMS + OH = CH3SCH2O2 : 	1.12D-11*EXP(-250/TEMP) 	;
+{574.} 	 DMS + OH = HODMSO2 : 	KMT18 	;
+{575.} 	 ETHOX + OH = ETHOXO2 : 	0.95D-13 	;
+{576.} 	 C2H5O = CH3CHO + HO2 : 	2.4D-14*EXP(-325/TEMP)*O2 	;
+{577.} 	 HOCH2CH2O2 + HO2 = HYETHO2H : 	1.53D-13*EXP(1300/TEMP) 	;
+{578.} 	 HOCH2CH2O2 + NO = ETHOHNO3 : 	KRO2NO*0.005 	;
+{579.} 	 HOCH2CH2O2 + NO = HOCH2CH2O + NO2 : 	KRO2NO*0.995 	;
+{580.} 	 HOCH2CH2O2 + NO3 = HOCH2CH2O + NO2 : 	KRO2NO3 	;
+{581.} 	 HOCH2CH2O2 = ETHGLY : 	2*(KCH3O2*7.8D-14*EXP(1000/TEMP))**0.5*RO2*0.2 	;
+{582.} 	 HOCH2CH2O2 = HOCH2CH2O : 	2*(KCH3O2*7.8D-14*EXP(1000/TEMP))**0.5*RO2*0.6 	;
+{583.} 	 HOCH2CH2O2 = HOCH2CHO : 	2*(KCH3O2*7.8D-14*EXP(1000/TEMP))**0.5*RO2*0.2 	;
+{584.} 	 HO1C3O2 + HO2 = HO1C3OOH : 	KRO2HO2*0.520 	;
+{585.} 	 HO1C3O2 + NO = HO1C3NO3 : 	KRO2NO*0.019 	;
+{586.} 	 HO1C3O2 + NO = HO1C3O + NO2 : 	KRO2NO*0.981 	;
+{587.} 	 HO1C3O2 + NO3 = HO1C3O + NO2 : 	KRO2NO3 	;
+{588.} 	 HO1C3O2 = HO1C3O : 	6.00D-13*0.6*RO2 	;
+{589.} 	 HO1C3O2 = HOC2H4CHO : 	6.00D-13*0.2*RO2 	;
+{590.} 	 HO1C3O2 = HOC3H6OH : 	6.00D-13*0.2*RO2 	;
+{591.} 	 HYPROPO2 + HO2 = HYPROPO2H : 	KRO2HO2*0.520 	;
+{592.} 	 HYPROPO2 + NO3 = HYPROPO + NO2 : 	KRO2NO3 	;
+{593.} 	 HYPROPO2 = ACETOL : 	8.80D-13*0.2*RO2 	;
+{594.} 	 HYPROPO2 = HYPROPO : 	8.80D-13*0.6*RO2 	;
+{595.} 	 HYPROPO2 = PROPGLY : 	8.80D-13*0.2*RO2 	;
+{596.} 	 NO + HYPROPO2 = HYPROPO + NO2 : 	KRO2NO*0.977 	;
+{597.} 	 NO + HYPROPO2 = PROPOLNO3 : 	KRO2NO*0.023 	;
+{598.} 	 IPROPOLO2 + HO2 = IPROPOLO2H : 	KRO2HO2*0.520 	;
+{599.} 	 IPROPOLO2 + NO = IPROPOLO + NO2 : 	KRO2NO*0.991 	;
+{600.} 	 IPROPOLO2 + NO = PROLNO3 : 	KRO2NO*0.009 	;
+{601.} 	 IPROPOLO2 + NO3 = IPROPOLO + NO2 : 	KRO2NO3 	;
+{602.} 	 IPROPOLO2 = CH3CHOHCHO : 	2.00D-12*0.2*RO2 	;
+{603.} 	 IPROPOLO2 = IPROPOLO : 	2.00D-12*0.6*RO2 	;
+{604.} 	 IPROPOLO2 = PROPGLY : 	2.00D-12*0.2*RO2 	;
+{605.} 	 NBUTOLAO2 + HO2 = NBUTOLAOOH : 	KRO2HO2*0.625 	;
+{606.} 	 NBUTOLAO2 + NO = NBUTOLANO3 : 	KRO2NO*0.042 	;
+{607.} 	 NBUTOLAO2 + NO = NBUTOLAO + NO2 : 	KRO2NO*0.958 	;
+{608.} 	 NBUTOLAO2 + NO3 = NBUTOLAO + NO2 : 	KRO2NO3 	;
+{609.} 	 NBUTOLAO2 = MEKCOH : 	8.80D-13*0.2*RO2 	;
+{610.} 	 NBUTOLAO2 = NBUTOLAO : 	8.80D-13*0.6*RO2 	;
+{611.} 	 NBUTOLAO2 = NBUTOLAOH : 	8.80D-13*0.2*RO2 	;
+{612.} 	 NBUTOLBO2 + HO2 = NBUTOLBOOH : 	KRO2HO2*0.625 	;
+{613.} 	 NBUTOLBO2 + NO = NBUTOLBNO3 : 	KRO2NO*0.083 	;
+{614.} 	 NBUTOLBO2 + NO = NBUTOLBO + NO2 : 	KRO2NO*0.917 	;
+{615.} 	 NBUTOLBO2 + NO3 = NBUTOLBO + NO2 : 	KRO2NO3 	;
+{616.} 	 NBUTOLBO2 = HO2C4OH : 	8.80D-13*0.2*RO2 	;
+{617.} 	 NBUTOLBO2 = MEKAOH : 	8.80D-13*0.2*RO2 	;
+{618.} 	 NBUTOLBO2 = NBUTOLBO : 	8.80D-13*0.6*RO2 	;
+{619.} 	 BUT2OLO2 + HO2 = BUT2OLOOH : 	KRO2HO2*0.625 	;
+{620.} 	 BUT2OLO2 + NO = BUT2OLAO + NO2 : 	KRO2NO*0.959 	;
+{621.} 	 BUT2OLO2 + NO = BUT2OLNO3 : 	KRO2NO*0.041 	;
+{622.} 	 BUT2OLO2 + NO3 = BUT2OLAO + NO2 : 	KRO2NO3 	;
+{623.} 	 BUT2OLO2 = BUT2OLAO : 	8.80D-13*0.6*RO2 	;
+{624.} 	 BUT2OLO2 = BUT2OLO : 	8.80D-13*0.2*RO2 	;
+{625.} 	 BUT2OLO2 = BUT2OLOH : 	8.80D-13*0.2*RO2 	;
+{626.} 	 IBUTOLBO2 + HO2 = IBUTOLBO2H : 	KRO2HO2*0.625 	;
+{627.} 	 IBUTOLBO2 + NO = IBUTOLBNO3 : 	KRO2NO*0.012 	;
+{628.} 	 IBUTOLBO2 + NO = IBUTOLBO + NO2 : 	KRO2NO*0.988 	;
+{629.} 	 IBUTOLBO2 + NO3 = IBUTOLBO + NO2 : 	KRO2NO3 	;
+{630.} 	 IBUTOLBO2 = IBUTOLBO : 	9.20D-14*0.7*RO2 	;
+{631.} 	 IBUTOLBO2 = IBUTOLOHB : 	9.20D-14*0.3*RO2 	;
+{632.} 	 IBUTOLCO2 + HO2 = IBUTOLCO2H : 	KRO2HO2*0.625 	;
+{633.} 	 IBUTOLCO2 + NO = IBUTOLCNO3 : 	KRO2NO*0.041 	;
+{634.} 	 IBUTOLCO2 + NO = IBUTOLCO + NO2 : 	KRO2NO*0.959 	;
+{635.} 	 IBUTOLCO2 + NO3 = IBUTOLCO + NO2 : 	KRO2NO3 	;
+{636.} 	 IBUTOLCO2 = HOIPRCHO : 	1.30D-12*0.2*RO2 	;
+{637.} 	 IBUTOLCO2 = IBUTOLCO : 	1.30D-12*0.6*RO2 	;
+{638.} 	 IBUTOLCO2 = IBUTOLOHC : 	1.30D-12*0.2*RO2 	;
+{639.} 	 TBUTOLO2 + HO2 = TBUTOLOOH : 	5.60D-14*EXP(1650/TEMP) 	;
+{640.} 	 TBUTOLO2 + NO = TBUTOLNO3 : 	KRO2NO*0.017 	;
+{641.} 	 TBUTOLO2 + NO = TBUTOLO + NO2 : 	KRO2NO*0.983 	;
+{642.} 	 TBUTOLO2 + NO3 = NO2 + TBUTOLO : 	KRO2NO3 	;
+{643.} 	 TBUTOLO2 = IBUTALOH : 	2.00D-13*0.2*RO2 	;
+{644.} 	 TBUTOLO2 = IBUTOLOHB : 	2.00D-13*0.2*RO2 	;
+{645.} 	 TBUTOLO2 = TBUTOLO : 	2.00D-13*0.6*RO2 	;
+{646.} 	 TC4H9O = CH3COCH3 + CH3O2 : 	6.00D+14*EXP(-8153/TEMP) 	;
+{647.} 	 HO3C5O2 + HO2 = HO3C5OOH : 	KRO2HO2*0.706 	;
+{648.} 	 HO3C5O2 + NO = HO3C5NO3 : 	KRO2NO*0.052 	;
+{649.} 	 HO3C5O2 + NO = HO3C5O + NO2 : 	KRO2NO*0.948 	;
+{650.} 	 HO3C5O2 + NO3 = HO3C5O + NO2 : 	KRO2NO3 	;
+{651.} 	 HO3C5O2 = HO13C5 : 	1.30D-12*0.2*RO2 	;
+{652.} 	 HO3C5O2 = HO3C4CHO : 	1.30D-12*0.2*RO2 	;
+{653.} 	 HO3C5O2 = HO3C5O : 	1.30D-12*0.6*RO2 	;
+{654.} 	 PE2ENEBO2 + HO2 = C53OH2OOH : 	KRO2HO2*0.706 	;
+{655.} 	 PE2ENEBO2 + NO = PE2ENEBNO3 : 	KRO2NO*0.064 	;
+{656.} 	 PE2ENEBO2 + NO = PE2ENEBO + NO2 : 	KRO2NO*0.936 	;
+{657.} 	 PE2ENEBO2 + NO3 = PE2ENEBO + NO2 : 	KRO2NO3 	;
+{658.} 	 PE2ENEBO2 = C523OH : 	8.80D-13*0.2*RO2 	;
+{659.} 	 PE2ENEBO2 = MPRKAOH : 	8.80D-13*0.2*RO2 	;
+{660.} 	 PE2ENEBO2 = PE2ENEBO : 	8.80D-13*0.6*RO2 	;
+{661.} 	 BUT2CHO = CH3CHO + C3H6 : 	J(16) 	;
+{662.} 	 BUT2CHO = SC4H9O2 + HO2 + CO : 	J(17) 	;
+{663.} 	 NO3 + BUT2CHO = BUT2CO3 + HNO3 : 	KNO3AL*8.5 	;
+{664.} 	 OH + BUT2CHO = BUT2CO3 : 	2.69D-11 	;
+{665.} 	 HM2C43O2 + HO2 = HM2C43OOH : 	KRO2HO2*0.706 	;
+{666.} 	 HM2C43O2 + NO = HM2C43NO3 : 	KRO2NO*0.129 	;
+{667.} 	 HM2C43O2 + NO = HM2C43O + NO2 : 	KRO2NO*0.871 	;
+{668.} 	 HM2C43O2 + NO3 = HM2C43O + NO2 : 	KRO2NO3 	;
+{669.} 	 HM2C43O2 = HM2C43O : 	1.30D-12*0.6*RO2 	;
+{670.} 	 HM2C43O2 = HO13M2C4 : 	1.30D-12*0.2*RO2 	;
+{671.} 	 HM2C43O2 = MIPKBOH : 	1.30D-12*0.2*RO2 	;
+{672.} 	 M2BUOL2O2 + HO2 = M2BUOL2OOH : 	KRO2HO2*0.706 	;
+{673.} 	 M2BUOL2O2 + NO = M2BUOL2NO3 : 	KRO2NO*0.019 	;
+{674.} 	 M2BUOL2O2 + NO = M2BUOL2O + NO2 : 	KRO2NO*0.981 	;
+{675.} 	 M2BUOL2O2 + NO3 = M2BUOL2O + NO2 : 	KRO2NO3 	;
+{676.} 	 M2BUOL2O2 = M2BUOL2O : 	9.20D-14*0.7*RO2 	;
+{677.} 	 M2BUOL2O2 = M2BUOL2OH : 	9.20D-14*0.3*RO2 	;
+{678.} 	 C3ME3CHO + NO3 = C3ME3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{679.} 	 C3ME3CHO + OH = C3ME3CHOO2 : 	2.95D-11*0.267 	;
+{680.} 	 C3ME3CHO + OH = C3ME3CO3 : 	2.95D-11*0.733 	;
+{681.} 	 HM33C3O2 + HO2 = HM33C3OOH : 	KRO2HO2*0.706 	;
+{682.} 	 HM33C3O2 + NO = HM33C3NO3 : 	KRO2NO*0.039 	;
+{683.} 	 HM33C3O2 + NO = HM33C3O + NO2 : 	KRO2NO*0.961 	;
+{684.} 	 HM33C3O2 + NO3 = HM33C3O + NO2 : 	KRO2NO3 	;
+{685.} 	 HM33C3O2 = HM33C3O : 	6.70D-15*0.7*RO2 	;
+{686.} 	 HM33C3O2 = HO2M2C4OH : 	6.70D-15*0.3*RO2 	;
+{687.} 	 ME3BUOLO2 + HO2 = ME3BUOLOOH : 	KRO2HO2*0.706 	;
+{688.} 	 ME3BUOLO2 + NO = ME3BUOLNO3 : 	KRO2NO*0.064 	;
+{689.} 	 ME3BUOLO2 + NO = ME3BUOLO + NO2 : 	KRO2NO*0.936 	;
+{690.} 	 ME3BUOLO2 + NO3 = ME3BUOLO + NO2 : 	KRO2NO3 	;
+{691.} 	 ME3BUOLO2 = C4ME3HO12 : 	8.80D-13*0.2*RO2 	;
+{692.} 	 ME3BUOLO2 = ME3BUOLO : 	8.80D-13*0.6*RO2 	;
+{693.} 	 ME3BUOLO2 = ME3CO2BUOL : 	8.80D-13*0.2*RO2 	;
+{694.} 	 HO2M2C4O2 + HO2 = HO2M2C4OOH : 	KRO2HO2*0.706 	;
+{695.} 	 HO2M2C4O2 + NO = HO2M2C4NO3 : 	KRO2NO*0.052 	;
+{696.} 	 HO2M2C4O2 + NO = HO2M2C4O + NO2 : 	KRO2NO*0.948 	;
+{697.} 	 HO2M2C4O2 + NO3 = HO2M2C4O + NO2 : 	KRO2NO3 	;
+{698.} 	 HO2M2C4O2 = H2M2C3CHO : 	1.30D-12*0.2*RO2 	;
+{699.} 	 HO2M2C4O2 = HO2M2C4O : 	1.30D-12*0.6*RO2 	;
+{700.} 	 HO2M2C4O2 = HO2M2C4OH : 	1.30D-12*0.2*RO2 	;
+{701.} 	 ME2BU2OLO2 + HO2 = M2BU2OLOOH : 	KRO2HO2*0.706 	;
+{702.} 	 ME2BU2OLO2 + NO = M2BU2OLNO3 : 	KRO2NO*0.062 	;
+{703.} 	 ME2BU2OLO2 + NO = ME2BU2OLO + NO2 : 	KRO2NO*0.938 	;
+{704.} 	 ME2BU2OLO2 + NO3 = ME2BU2OLO + NO2 : 	KRO2NO3 	;
+{705.} 	 ME2BU2OLO2 = C4ME3HO23 : 	8.80D-13*0.20*RO2 	;
+{706.} 	 ME2BU2OLO2 = ME2BU2OLO : 	8.80D-13*0.60*RO2 	;
+{707.} 	 ME2BU2OLO2 = MIPKAOH : 	8.80D-13*0.20*RO2 	;
+{708.} 	 PROL11MO2 + HO2 = PROL11MOOH : 	KRO2HO2*0.706 	;
+{709.} 	 PROL11MO2 + NO = PROL11MNO3 : 	KRO2NO*0.024 	;
+{710.} 	 PROL11MO2 + NO = PROL11MO + NO2 : 	KRO2NO*0.976 	;
+{711.} 	 PROL11MO2 + NO3 = PROL11MO + NO2 : 	KRO2NO3 	;
+{712.} 	 PROL11MO2 = M2BUOL2OH : 	2.00D-12*0.2*RO2 	;
+{713.} 	 PROL11MO2 = PROL11MO : 	2.00D-12*0.6*RO2 	;
+{714.} 	 PROL11MO2 = PROL1MCHO : 	2.00D-12*0.2*RO2 	;
+{715.} 	 H2M3C4O2 + HO2 = H2M3C4OOH : 	KRO2HO2*0.706 	;
+{716.} 	 H2M3C4O2 + NO = H2M3C4NO3 : 	KRO2NO*0.033 	;
+{717.} 	 H2M3C4O2 + NO = H2M3C4O + NO2 : 	KRO2NO*0.967 	;
+{718.} 	 H2M3C4O2 + NO3 = H2M3C4O + NO2 : 	KRO2NO3 	;
+{719.} 	 H2M3C4O2 = H2M3C4O : 	1.30D-12*0.6*RO2 	;
+{720.} 	 H2M3C4O2 = HO13M2C4 : 	1.30D-12*0.2*RO2 	;
+{721.} 	 H2M3C4O2 = HO2C43CHO : 	1.30D-12*0.2*RO2 	;
+{722.} 	 ME2BUOLO2 + HO2 = ME2BUOLOOH : 	KRO2HO2*0.706 	;
+{723.} 	 ME2BUOLO2 + NO = ME2BUOLNO3 : 	KRO2NO*0.019 	;
+{724.} 	 ME2BUOLO2 + NO = ME2BUOLO + NO2 : 	KRO2NO*0.981 	;
+{725.} 	 ME2BUOLO2 + NO3 = ME2BUOLO + NO2 : 	KRO2NO3 	;
+{726.} 	 ME2BUOLO2 = C4ME3HO23 : 	9.20D-14*0.3*RO2 	;
+{727.} 	 ME2BUOLO2 = ME2BUOLO : 	9.20D-14*0.7*RO2 	;
+{728.} 	 CYHEXOLAO2 + HO2 = CYHXOLAOOH : 	KRO2HO2*0.770 	;
+{729.} 	 CYHEXOLAO2 + NO = CYHEXOLAO + NO2 : 	KRO2NO*0.938 	;
+{730.} 	 CYHEXOLAO2 + NO = CYHXOLANO3 : 	KRO2NO*0.062 	;
+{731.} 	 CYHEXOLAO2 + NO3 = CYHEXOLAO + NO2 : 	KRO2NO3 	;
+{732.} 	 CYHEXOLAO2 = CYHEXOLAO : 	8.80D-13*0.6*RO2 	;
+{733.} 	 CYHEXOLAO2 = CYHXDIOLA : 	8.80D-13*0.2*RO2 	;
+{734.} 	 CYHEXOLAO2 = CYHXOLACO : 	8.80D-13*0.2*RO2 	;
+{735.} 	 MIBKAOHAO2 + HO2 = MIBKOHAOOH : 	KRO2HO2*0.770 	;
+{736.} 	 MIBKAOHAO2 + NO = MIBKAOHAO + NO2 : 	KRO2NO 	;
+{737.} 	 MIBKAOHAO2 + NO3 = MIBKAOHAO + NO2 : 	KRO2NO3 	;
+{738.} 	 MIBKAOHAO2 = MIBKAOH3CO : 	8.80D-13*0.2*RO2 	;
+{739.} 	 MIBKAOHAO2 = MIBKAOHAO : 	8.80D-13*0.6*RO2 	;
+{740.} 	 MIBKAOHAO2 = MIBKOH34 : 	8.80D-13*0.2*RO2 	;
+{741.} 	 MIBKAOHBO2 + HO2 = MIBKOHBOOH : 	KRO2HO2*0.770 	;
+{742.} 	 MIBKAOHBO2 + NO = MIBKAOHBO + NO2 : 	KRO2NO*0.961 	;
+{743.} 	 MIBKAOHBO2 + NO = MIBKAOHNO3 : 	KRO2NO*0.039 	;
+{744.} 	 MIBKAOHBO2 + NO3 = MIBKAOHBO + NO2 : 	KRO2NO3 	;
+{745.} 	 MIBKAOHBO2 = C64OH : 	2.00D-12*0.2*RO2 	;
+{746.} 	 MIBKAOHBO2 = C65OH : 	2.00D-12*0.2*RO2 	;
+{747.} 	 MIBKAOHBO2 = MIBKAOHBO : 	2.00D-12*0.6*RO2 	;
+{748.} 	 MIBKHO4O2 + HO2 = MIBKHO4OOH : 	KRO2HO2*0.770 	;
+{749.} 	 MIBKHO4O2 + NO = MIBKHO4O + NO2 : 	KRO2NO 	;
+{750.} 	 MIBKHO4O2 + NO3 = MIBKHO4O + NO2 : 	KRO2NO3 	;
+{751.} 	 MIBKHO4O2 = MIBKHO14 : 	2.00D-12*0.2*RO2 	;
+{752.} 	 MIBKHO4O2 = MIBKHO4CHO : 	2.00D-12*0.2*RO2 	;
+{753.} 	 MIBKHO4O2 = MIBKHO4O : 	2.00D-12*0.6*RO2 	;
+{754.} 	 CH3CO3 + HO2 = CH3CO2H + O3 : 	KAPHO2*0.15 	;
+{755.} 	 CH3CO3 + HO2 = CH3CO3H : 	KAPHO2*0.41 	;
+{756.} 	 CH3CO3 + HO2 = CH3O2 + OH : 	KAPHO2*0.44 	;
+{757.} 	 CH3CO3 + NO = NO2 + CH3O2 : 	7.5D-12*EXP(290/TEMP) 	;
+{758.} 	 CH3CO3 + NO2 = PAN : 	KFPAN 	;
+{759.} 	 CH3CO3 + NO3 = NO2 + CH3O2 : 	4.0D-12 	;
+{760.} 	 CH3CO3 = CH3CO2H : 	2*(K298CH3O2*2.9D-12*EXP(500/TEMP))**0.5*RO2*0.3 	;
+{761.} 	 CH3CO3 = CH3O2 : 	2*(K298CH3O2*2.9D-12*EXP(500/TEMP))**0.5*RO2*0.7 	;
+{762.} 	 HOCH2CHO + NO3 = HOCH2CO3 + HNO3 : 	KNO3AL 	;
+{763.} 	 HOCH2CHO + OH = GLYOX + HO2 : 	1.00D-11*0.200 	;
+{764.} 	 HOCH2CHO + OH = HOCH2CO3 : 	1.00D-11*0.800 	;
+{765.} 	 HOCH2CHO = HO2 + HCHO + HO2 + CO : 	J(15) 	;
+{766.} 	 ACETOL + OH = MGLYOX + HO2 : 	1.6D-12*EXP(-305/TEMP) 	;
+{767.} 	 ACETOL = CH3CO3 + HCHO + HO2 : 	J(22) 	;
+{768.} 	 CH3CHOHCHO + NO3 = CH3CHOHCO3 + HNO3 : 	KNO3AL*2.4 	;
+{769.} 	 CH3CHOHCHO + OH = CH3CHOHCO3 : 	1.7D-11 	;
+{770.} 	 CH3CHOHCHO = CH3CHO + HO2 + CO + HO2 : 	J(17) 	;
+{771.} 	 NMBOAO2 + HO2 = NMBOAOOH : 	KRO2HO2*0.706 	;
+{772.} 	 NMBOAO2 + NO = NMBOAO + NO2 : 	KRO2NO 	;
+{773.} 	 NMBOAO2 + NO3 = NMBOAO + NO2 : 	KRO2NO3 	;
+{774.} 	 NMBOAO2 = C4MCONO3OH : 	8.8D-13*RO2*0.2 	;
+{775.} 	 NMBOAO2 = MBOBNO3 : 	8.8D-13*RO2*0.2 	;
+{776.} 	 NMBOAO2 = NMBOAO : 	8.8D-13*RO2*0.6 	;
+{777.} 	 NMBOBO2 + HO2 = NMBOBOOH : 	KRO2HO2*0.706 	;
+{778.} 	 NMBOBO2 + NO = NMBOBO + NO2 : 	KRO2NO 	;
+{779.} 	 NMBOBO2 + NO3 = NMBOBO + NO2 : 	KRO2NO3 	;
+{780.} 	 NMBOBO2 = MBOANO3 : 	1.3D-12*RO2*0.2 	;
+{781.} 	 NMBOBO2 = NMBOBCO : 	1.3D-12*RO2*0.2 	;
+{782.} 	 NMBOBO2 = NMBOBO : 	1.3D-12*RO2*0.6 	;
+{783.} 	 MBOOOA = CH3COCH3 + HO2 + CO + OH : 	KDEC*0.36 	;
+{784.} 	 MBOOOA = CH3COCH3 + HO2 + HO2 : 	KDEC*0.20 	;
+{785.} 	 MBOOOA = IPROPOL : 	KDEC*0.20 	;
+{786.} 	 MBOOOA = MBOOO : 	KDEC*0.24 	;
+{787.} 	 IBUTALOH + OH = IPRHOCO3 : 	1.4D-11 	;
+{788.} 	 IBUTALOH = CH3COCH3 + HO2 + HO2 + CO : 	J(17) 	;
+{789.} 	 CH2OOB = CH2OO : 	KDEC*0.24 	;
+{790.} 	 CH2OOB = CO : 	KDEC*0.40 	;
+{791.} 	 CH2OOB = HO2 + CO + OH : 	KDEC*0.36 	;
+{792.} 	 MBOAO2 + HO2 = MBOAOOH : 	KRO2HO2*0.706 	;
+{793.} 	 MBOAO2 + NO = MBOANO3 : 	KRO2NO*0.064 	;
+{794.} 	 MBOAO2 + NO = MBOAO + NO2 : 	KRO2NO*0.936 	;
+{795.} 	 MBOAO2 + NO3 = MBOAO + NO2 : 	KRO2NO3 	;
+{796.} 	 MBOAO2 = MBOACO : 	8.8D-13*RO2*0.2 	;
+{797.} 	 MBOAO2 = MBOAO : 	8.8D-13*RO2*0.6 	;
+{798.} 	 MBOAO2 = MBOAOH : 	8.8D-13*RO2*0.2 	;
+{799.} 	 MBOBO2 + HO2 = MBOBOOH : 	KRO2HO2*0.706 	;
+{800.} 	 MBOBO2 + NO = MBOBNO3 : 	KRO2NO*0.026 	;
+{801.} 	 MBOBO2 + NO = MBOBO + NO2 : 	KRO2NO*0.974 	;
+{802.} 	 MBOBO2 + NO3 = MBOBO + NO2 : 	KRO2NO3 	;
+{803.} 	 MBOBO2 = MBOAOH : 	2.0D-12*RO2*0.2 	;
+{804.} 	 MBOBO2 = MBOBCO : 	2.0D-12*RO2*0.2 	;
+{805.} 	 MBOBO2 = MBOBO : 	2.0D-12*RO2*0.6 	;
+{806.} 	 CH3O2 + HO2 = CH3OOH : 	3.8D-13*EXP(780/TEMP)*(1-1/(1+498*EXP(-1160/TEMP))) 	;
+{807.} 	 CH3O2 + HO2 = HCHO : 	3.8D-13*EXP(780/TEMP)*(1/(1+498*EXP(-1160/TEMP))) 	;
+{808.} 	 CH3O2 + NO = CH3NO3 : 	2.3D-12*EXP(360/TEMP)*0.001 	;
+{809.} 	 CH3O2 + NO = CH3O + NO2 : 	2.3D-12*EXP(360/TEMP)*0.999 	;
+{810.} 	 CH3O2 + NO2 = CH3O2NO2 : 	KMT13 	;
+{811.} 	 CH3O2 + NO3 = CH3O + NO2 : 	1.2D-12 	;
+{812.} 	 CH3O2 = CH3O : 	2*KCH3O2*RO2*7.18*EXP(-885/TEMP) 	;
+{813.} 	 CH3O2 = CH3OH : 	2*KCH3O2*RO2*0.5*(1-7.18*EXP(-885/TEMP)) 	;
+{814.} 	 CH3O2 = HCHO : 	2*KCH3O2*RO2*0.5*(1-7.18*EXP(-885/TEMP)) 	;
+{815.} 	 HCOCH2O2 + HO2 = HCOCH2OOH : 	KRO2HO2*0.387 	;
+{816.} 	 HCOCH2O2 + NO = NO2 + HCOCH2O : 	KRO2NO 	;
+{817.} 	 HCOCH2O2 + NO3 = HCOCH2O + NO2 : 	KRO2NO3 	;
+{818.} 	 HCOCH2O2 = GLYOX : 	2.00D-12*0.2*RO2 	;
+{819.} 	 HCOCH2O2 = HCOCH2O : 	2.00D-12*0.6*RO2 	;
+{820.} 	 HCOCH2O2 = HOCH2CHO : 	2.00D-12*0.2*RO2 	;
+{821.} 	 C2H5CO3 + HO2 = C2H5O2 + OH : 	KAPHO2*0.44 	;
+{822.} 	 C2H5CO3 + HO2 = PERPROACID : 	KAPHO2*0.41 	;
+{823.} 	 C2H5CO3 + HO2 = PROPACID + O3 : 	KAPHO2*0.15 	;
+{824.} 	 C2H5CO3 + NO = NO2 + C2H5O2 : 	6.7D-12*EXP(340/TEMP) 	;
+{825.} 	 C2H5CO3 + NO2 = PPN : 	KFPAN 	;
+{826.} 	 C2H5CO3 + NO3 = C2H5O2 + NO2 : 	KRO2NO3*1.74 	;
+{827.} 	 C2H5CO3 = C2H5O2 : 	1.00D-11*0.7*RO2 	;
+{828.} 	 C2H5CO3 = PROPACID : 	1.00D-11*0.3*RO2 	;
+{829.} 	 C2H5O2 + HO2 = C2H5OOH : 	4.3D-13*EXP(870/TEMP) 	;
+{830.} 	 C2H5O2 + NO = C2H5NO3 : 	2.55D-12*EXP(380/TEMP)*0.009 	;
+{831.} 	 C2H5O2 + NO = C2H5O + NO2 : 	2.55D-12*EXP(380/TEMP)*0.991 	;
+{832.} 	 C2H5O2 + NO3 = C2H5O + NO2 : 	KRO2NO3 	;
+{833.} 	 C2H5O2 = C2H5O : 	2*(KCH3O2*6.4D-14*(TEMP/300)**0*EXP(0/TEMP))**0.5*RO2*0.6 	;
+{834.} 	 C2H5O2 = C2H5OH : 	2*(KCH3O2*6.4D-14*(TEMP/300)**0*EXP(0/TEMP))**0.5*RO2*0.2 	;
+{835.} 	 C2H5O2 = CH3CHO : 	2*(KCH3O2*6.4D-14*(TEMP/300)**0*EXP(0/TEMP))**0.5*RO2*0.2 	;
+{836.} 	 C3H7CO3 + HO2 = BUTACID + O3 : 	KAPHO2*0.15 	;
+{837.} 	 C3H7CO3 + HO2 = NC3H7O2 + OH : 	KAPHO2*0.44 	;
+{838.} 	 C3H7CO3 + HO2 = PERBUACID : 	KAPHO2*0.41 	;
+{839.} 	 C3H7CO3 + NO = NO2 + NC3H7O2 : 	KAPNO 	;
+{840.} 	 C3H7CO3 + NO2 = PBN : 	KFPAN 	;
+{841.} 	 C3H7CO3 + NO3 = NC3H7O2 + NO2 : 	KRO2NO3*1.74 	;
+{842.} 	 C3H7CO3 = BUTACID : 	1.00D-11*0.3*RO2 	;
+{843.} 	 C3H7CO3 = NC3H7O2 : 	1.00D-11*0.7*RO2 	;
+{844.} 	 BUTALO2 + HO2 = BUTALO2H : 	KRO2HO2*0.625 	;
+{845.} 	 BUTALO2 + NO = BUTALNO3 : 	KRO2NO*0.083 	;
+{846.} 	 BUTALO2 + NO = BUTALO + NO2 : 	KRO2NO*0.917 	;
+{847.} 	 BUTALO2 + NO3 = BUTALO + NO2 : 	KRO2NO3 	;
+{848.} 	 BUTALO2 = BUTALO : 	2.50D-13*0.6*RO2 	;
+{849.} 	 BUTALO2 = CO2C3CHO : 	2.50D-13*0.2*RO2 	;
+{850.} 	 BUTALO2 = HO2C3CHO : 	2.50D-13*0.2*RO2 	;
+{851.} 	 NC3H7O2 + HO2 = NC3H7OOH : 	KRO2HO2*0.520 	;
+{852.} 	 NC3H7O2 + NO = NC3H7NO3 : 	2.9D-12*EXP(350/TEMP)*0.020 	;
+{853.} 	 NC3H7O2 + NO = NC3H7O + NO2 : 	2.9D-12*EXP(350/TEMP)*0.980 	;
+{854.} 	 NC3H7O2 + NO3 = NC3H7O + NO2 : 	KRO2NO3 	;
+{855.} 	 NC3H7O2 = C2H5CHO : 	2*(K298CH3O2*3D-13)**0.5*RO2*0.2 	;
+{856.} 	 NC3H7O2 = NC3H7O : 	2*(K298CH3O2*3D-13)**0.5*RO2*0.6 	;
+{857.} 	 NC3H7O2 = NPROPOL : 	2*(K298CH3O2*3D-13)**0.5*RO2*0.2 	;
+{858.} 	 IPRCO3 + HO2 = IBUTACID + O3 : 	KAPHO2*0.15 	;
+{859.} 	 IPRCO3 + HO2 = IC3H7O2 + OH : 	KAPHO2*0.44 	;
+{860.} 	 IPRCO3 + HO2 = PERIBUACID : 	KAPHO2*0.41 	;
+{861.} 	 IPRCO3 + NO = IC3H7O2 + NO2 : 	KAPNO 	;
+{862.} 	 IPRCO3 + NO2 = PIPN : 	KFPAN 	;
+{863.} 	 IPRCO3 + NO3 = IC3H7O2 + NO2 : 	KRO2NO3*1.74 	;
+{864.} 	 IPRCO3 = IBUTACID : 	1.00D-11*0.3*RO2 	;
+{865.} 	 IPRCO3 = IC3H7O2 : 	1.00D-11*0.7*RO2 	;
+{866.} 	 IBUTALBO2 + HO2 = IBUTALBO2H : 	KRO2HO2*0.625 	;
+{867.} 	 IBUTALBO2 + NO = IBUALANO3 : 	KRO2NO*0.033 	;
+{868.} 	 IBUTALBO2 + NO = IBUTALBO + NO2 : 	KRO2NO*0.967 	;
+{869.} 	 IBUTALBO2 + NO3 = IBUTALBO + NO2 : 	KRO2NO3 	;
+{870.} 	 IBUTALBO2 = HOIPRCHO : 	1.30D-12*0.2*RO2 	;
+{871.} 	 IBUTALBO2 = IBUTALBO : 	1.30D-12*0.6*RO2 	;
+{872.} 	 IBUTALBO2 = IBUTDIAL : 	1.30D-12*0.2*RO2 	;
+{873.} 	 IBUTALCO2 + HO2 = IBUTALO2H : 	KRO2HO2*0.625 	;
+{874.} 	 IBUTALCO2 + NO = M2PROPAL2O + NO2 : 	KRO2NO 	;
+{875.} 	 IBUTALCO2 + NO3 = M2PROPAL2O + NO2 : 	KRO2NO3 	;
+{876.} 	 IBUTALCO2 = IBUTALOH : 	9.20D-14*0.3*RO2 	;
+{877.} 	 IBUTALCO2 = M2PROPAL2O : 	9.20D-14*0.7*RO2 	;
+{878.} 	 IC3H7O2 + HO2 = IC3H7OOH : 	KRO2HO2*0.520 	;
+{879.} 	 IC3H7O2 + NO = IC3H7NO3 : 	2.7D-12*EXP(360/TEMP)*0.042 	;
+{880.} 	 IC3H7O2 + NO = IC3H7O + NO2 : 	2.7D-12*EXP(360/TEMP)*0.958 	;
+{881.} 	 IC3H7O2 + NO3 = IC3H7O + NO2 : 	KRO2NO3 	;
+{882.} 	 IC3H7O2 = CH3COCH3 : 	2*(KCH3O2*1.6D-12*EXP(-2200/TEMP))**0.5*RO2*0.2 	;
+{883.} 	 IC3H7O2 = IC3H7O : 	2*(KCH3O2*1.6D-12*EXP(-2200/TEMP))**0.5*RO2*0.6 	;
+{884.} 	 IC3H7O2 = IPROPOL : 	2*(KCH3O2*1.6D-12*EXP(-2200/TEMP))**0.5*RO2*0.2 	;
+{885.} 	 C4H9CO3 + HO2 = NC4H9O2 + OH : 	KAPHO2*0.44 	;
+{886.} 	 C4H9CO3 + HO2 = PENTACID + O3 : 	KAPHO2*0.15 	;
+{887.} 	 C4H9CO3 + HO2 = PERPENACID : 	KAPHO2*0.41 	;
+{888.} 	 C4H9CO3 + NO = NC4H9O2 + NO2 : 	KAPNO 	;
+{889.} 	 C4H9CO3 + NO2 = PPEN : 	KFPAN 	;
+{890.} 	 C4H9CO3 + NO3 = NC4H9O2 + NO2 : 	KRO2NO3*1.74 	;
+{891.} 	 C4H9CO3 = NC4H9O2 : 	1.00D-11*0.7*RO2 	;
+{892.} 	 C4H9CO3 = PENTACID : 	1.00D-11*0.3*RO2 	;
+{893.} 	 C4CHOBO2 + HO2 = C4CHOBOOH : 	KRO2HO2*0.706 	;
+{894.} 	 C4CHOBO2 + NO = C4CHOBNO3 : 	KRO2NO*0.129 	;
+{895.} 	 C4CHOBO2 + NO = C4CHOBO + NO2 : 	KRO2NO*0.871 	;
+{896.} 	 C4CHOBO2 + NO3 = C4CHOBO + NO2 : 	KRO2NO3 	;
+{897.} 	 C4CHOBO2 = C4CHOBO : 	2.00D-12*0.6*RO2 	;
+{898.} 	 C4CHOBO2 = CO3C4CHO : 	2.00D-12*0.2*RO2 	;
+{899.} 	 C4CHOBO2 = HO3C4CHO : 	2.00D-12*0.2*RO2 	;
+{900.} 	 NC4H9O2 + HO2 = NC4H9OOH : 	KRO2HO2*0.625 	;
+{901.} 	 NC4H9O2 + NO = NC4H9NO3 : 	KRO2NO*0.033 	;
+{902.} 	 NC4H9O2 + NO = NC4H9O + NO2 : 	KRO2NO*0.967 	;
+{903.} 	 NC4H9O2 + NO3 = NC4H9O + NO2 : 	KRO2NO3 	;
+{904.} 	 NC4H9O2 = C3H7CHO : 	1.30D-12*0.2*RO2 	;
+{905.} 	 NC4H9O2 = NBUTOL : 	1.30D-12*0.2*RO2 	;
+{906.} 	 NC4H9O2 = NC4H9O : 	1.30D-12*0.6*RO2 	;
+{907.} 	 ACO3 + HO2 = ACO2H + O3 : 	KAPHO2*0.15 	;
+{908.} 	 ACO3 + HO2 = ACO3H : 	KAPHO2*0.41 	;
+{909.} 	 ACO3 + HO2 = HO2 + CO + HCHO + OH : 	KAPHO2*0.44 	;
+{910.} 	 ACO3 + NO = HO2 + CO + HCHO + NO2 : 	KAPNO 	;
+{911.} 	 ACO3 + NO2 = ACRPAN : 	KFPAN 	;
+{912.} 	 ACO3 + NO3 = HO2 + CO + HCHO + NO2 : 	KRO2NO3*1.74 	;
+{913.} 	 ACO3 = ACO2H : 	1.00D-11*0.3*RO2 	;
+{914.} 	 ACO3 = HO2 + CO + HCHO : 	1.00D-11*0.7*RO2 	;
+{915.} 	 ACO3B + HO2 = HOCHOCOOH : 	KRO2HO2*0.52 	;
+{916.} 	 ACO3B + NO = CHOCOHCO + NO2 : 	KRO2NO 	;
+{917.} 	 ACO3B + NO3 = CHOCOHCO + NO2 : 	KRO2NO3 	;
+{918.} 	 ACO3B = CHOCOHCO : 	8.8D-13*RO2*0.6 	;
+{919.} 	 ACO3B = HOCH2COCHO : 	8.8D-13*RO2*0.2 	;
+{920.} 	 ACO3B = OCCOHCOH : 	8.8D-13*RO2*0.2 	;
+{921.} 	 OCCOHCO2 + HO2 = C32OH13CO + O3 : 	0.4*0.52*KRO2HO2 	;
+{922.} 	 OCCOHCO2 + HO2 = OCCOHCOOH : 	0.6*0.52*KRO2HO2 	;
+{923.} 	 OCCOHCO2 + NO = C42AOH : 	0.05*KRO2NO 	;
+{924.} 	 OCCOHCO2 + NO = OCCOHCO + NO2 : 	0.95*KRO2NO 	;
+{925.} 	 OCCOHCO2 + NO3 = C42AOH + NO2 : 	KRO2NO3 	;
+{926.} 	 OCCOHCO2 = C32OH13CO : 	2.0D-12*RO2*0.2 	;
+{927.} 	 OCCOHCO2 = OCCOHCO : 	2.0D-12*RO2*0.6 	;
+{928.} 	 OCCOHCO2 = OCCOHCOH : 	2.0D-12*RO2*0.2 	;
+{929.} 	 GLYOX = CO + CO + H2 : 	J(31) 	;
+{930.} 	 GLYOX = CO + CO + HO2 + HO2 : 	J(33) 	;
+{931.} 	 GLYOX = HCHO + CO : 	J(32) 	;
+{932.} 	 NO3 + GLYOX = CO + CO + HO2 + HNO3 : 	KNO3AL*0.6 	;
+{933.} 	 NO3 + GLYOX = HCOCO3 + HNO3 : 	KNO3AL*0.4 	;
+{934.} 	 OH + GLYOX = CO + CO + HO2 : 	3.1D-12*EXP(340/TEMP)*0.6 	;
+{935.} 	 OH + GLYOX = HCOCO3 : 	3.1D-12*EXP(340/TEMP)*0.4 	;
+{936.} 	 GLYOOB = GLYOO : 	KDEC*0.24 	;
+{937.} 	 GLYOOB = HCHO : 	KDEC*0.20 	;
+{938.} 	 GLYOOB = HO2 + HO2 + CO : 	KDEC*0.20 	;
+{939.} 	 GLYOOB = OH + CO + CO + HO2 : 	KDEC*0.36 	;
+{940.} 	 CH3C2H2O2 = CH3CO3 + HCHO : 	KDEC*0.35 	;
+{941.} 	 CH3C2H2O2 = HCHO + CH3O2 + CO : 	KDEC*0.65 	;
+{942.} 	 MACO3 + HO2 = CH3C2H2O2 + OH : 	KAPHO2*0.44 	;
+{943.} 	 MACO3 + HO2 = MACO2H + O3 : 	KAPHO2*0.15 	;
+{944.} 	 MACO3 + HO2 = MACO3H : 	KAPHO2*0.41 	;
+{945.} 	 MACO3 + NO = CH3C2H2O2 + NO2 : 	8.70D-12*EXP(290/TEMP) 	;
+{946.} 	 MACO3 + NO2 = MPAN : 	KFPAN 	;
+{947.} 	 MACO3 + NO3 = CH3C2H2O2 + NO2 : 	KRO2NO3*1.74 	;
+{948.} 	 MACO3 = CH3C2H2O2 : 	1.00D-11*0.7*RO2 	;
+{949.} 	 MACO3 = MACO2H : 	1.00D-11*0.3*RO2 	;
+{950.} 	 MGLYOOB = MGLYOO : 	KDEC*0.18 	;
+{951.} 	 MGLYOOB = OH + CO + CH3CO3 : 	KDEC*0.82 	;
+{952.} 	 MGLYOX = CH3CO3 + CO + HO2 : 	J(34) 	;
+{953.} 	 NO3 + MGLYOX = CH3CO3 + CO + HNO3 : 	KNO3AL*2.4 	;
+{954.} 	 OH + MGLYOX = CH3CO3 + CO : 	1.9D-12*EXP(575/TEMP) 	;
+{955.} 	 CH2OOG = CH2OO : 	KDEC*0.37 	;
+{956.} 	 CH2OOG = CO : 	KDEC*0.47 	;
+{957.} 	 CH2OOG = HO2 + CO + OH : 	KDEC*0.16 	;
+{958.} 	 MACRO2 + HO2 = MACROOH : 	KRO2HO2*0.625 	;
+{959.} 	 MACRO2 + NO = MACRO + NO2 : 	KRO2NO 	;
+{960.} 	 MACRO2 + NO3 = MACRO + NO2 : 	KRO2NO3 	;
+{961.} 	 MACRO2 = MACRO : 	9.20D-14*0.7*RO2 	;
+{962.} 	 MACRO2 = MACROH : 	9.20D-14*0.3*RO2 	;
+{963.} 	 MACROHO2 + HO2 = MACROHOOH : 	KRO2HO2*0.625 	;
+{964.} 	 MACROHO2 + NO = MACROHNO3 : 	KRO2NO*0.017 	;
+{965.} 	 MACROHO2 + NO = MACROHO + NO2 : 	KRO2NO*0.983 	;
+{966.} 	 MACROHO2 + NO3 = MACROHO + NO2 : 	KRO2NO3 	;
+{967.} 	 MACROHO2 = C3MDIALOH : 	1.4D-12*0.2*RO2 	;
+{968.} 	 MACROHO2 = MACROH : 	1.4D-12*0.2*RO2 	;
+{969.} 	 MACROHO2 = MACROHO : 	1.4D-12*0.6*RO2 	;
+{970.} 	 C3DBCO3 + HO2 = C3DBCO3H : 	KAPHO2*0.41 	;
+{971.} 	 C3DBCO3 + HO2 = C3H5CO2H + O3 : 	KAPHO2*0.15 	;
+{972.} 	 C3DBCO3 + HO2 = CH3CHO + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{973.} 	 C3DBCO3 + NO = CH3CHO + HO2 + CO + NO2 : 	KAPNO 	;
+{974.} 	 C3DBCO3 + NO2 = C3DBPAN : 	KFPAN 	;
+{975.} 	 C3DBCO3 + NO3 = CH3CHO + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{976.} 	 C3DBCO3 = C3H5CO2H : 	1.00D-11*RO2*0.3 	;
+{977.} 	 C3DBCO3=CH3CHO + HO2 + CO : 	1.00D-11*RO2*0.7 	;
+{978.} 	 C4CONO3O2 + HO2 = C4CONO3OOH : 	KRO2HO2*0.625 	;
+{979.} 	 C4CONO3O2 + NO = C4CONO3O + NO2 : 	KRO2NO 	;
+{980.} 	 C4CONO3O2 + NO3 = C4CONO3O + NO2 : 	KRO2NO3 	;
+{981.} 	 C4CONO3O2 = C4CONO3CO : 	8.80D-13*RO2*0.2 	;
+{982.} 	 C4CONO3O2 = C4CONO3O : 	8.80D-13*RO2*0.6 	;
+{983.} 	 C4CONO3O2 = COCCOHNO3 : 	8.80D-13*RO2*0.2 	;
+{984.} 	 C4NO3COO2 + HO2 = C4NO3COOOH : 	KRO2HO2*0.625 	;
+{985.} 	 C4NO3COO2 + NO = C4NO3OCO + NO2 : 	KRO2NO 	;
+{986.} 	 C4NO3COO2 + NO3 = C4NO3OCO + NO2 : 	KRO2NO3 	;
+{987.} 	 C4NO3COO2 = C4CONO3CO : 	8.80D-13*RO2*0.2 	;
+{988.} 	 C4NO3COO2 = C4NO3OCO : 	8.80D-13*RO2*0.6 	;
+{989.} 	 C4NO3COO2 = C4OCCOHNO3 : 	8.80D-13*RO2*0.2 	;
+{990.} 	 CH3CHOOB = CH3CHOO : 	KDEC*0.18 	;
+{991.} 	 CH3CHOOB = CH3O2 + CO + OH : 	KDEC*0.57 	;
+{992.} 	 CH3CHOOB = CH3O2 + HO2 : 	KDEC*0.125 	;
+{993.} 	 CH3CHOOB = CH4 : 	KDEC*0.125 	;
+{994.} 	 C4OCCOHCO2 + HO2 = C4OCCOHOOH : 	KRO2HO2*0.625 	;
+{995.} 	 C4OCCOHCO2 + NO = C4OCCOHCO + NO2 : 	KRO2NO*0.957 	;
+{996.} 	 C4OCCOHCO2 + NO = C4OCCOHNO3 : 	KRO2NO*0.043 	;
+{997.} 	 C4OCCOHCO2 + NO3 = C4OCCOHCO + NO2 : 	KRO2NO3 	;
+{998.} 	 C4OCCOHCO2 = C4OCCOHCO : 	8.80D-13*RO2*0.60 	;
+{999.} 	 C4OCCOHCO2 = C4OCCOHCOH : 	8.80D-13*RO2*0.20 	;
+{1000.} 	 C4OCCOHCO2 = CO2H3CHO : 	8.80D-13*RO2*0.20 	;
+{1001.} 	 COCCOH2CO2 + HO2 = COCCOHCOOH : 	KRO2HO2*0.625 	;
+{1002.} 	 COCCOH2CO2 + NO = COCCOHCO + NO2 : 	KRO2NO 	;
+{1003.} 	 COCCOH2CO2 + NO3 = COCCOHCO + NO2 : 	KRO2NO3 	;
+{1004.} 	 COCCOH2CO2 = C4OCCOHCOH : 	0.2*8.8E-13*RO2 	;
+{1005.} 	 COCCOH2CO2 = CCOCOCOH : 	0.2*8.8E-13*RO2 	;
+{1006.} 	 COCCOH2CO2 = COCCOHCO : 	0.6*8.8E-13*RO2 	;
+{1007.} 	 SC4H9O2 + HO2 = SC4H9OOH : 	KRO2HO2*0.625 	;
+{1008.} 	 SC4H9O2 + NO = SC4H9NO3 : 	KRO2NO*0.090 	;
+{1009.} 	 SC4H9O2 + NO = SC4H9O + NO2 : 	KRO2NO*0.910 	;
+{1010.} 	 SC4H9O2 + NO3 = SC4H9O + NO2 : 	KRO2NO3 	;
+{1011.} 	 SC4H9O2 = BUT2OL : 	2.50D-13*0.2*RO2 	;
+{1012.} 	 SC4H9O2 = MEK : 	2.50D-13*0.2*RO2 	;
+{1013.} 	 SC4H9O2 = SC4H9O : 	2.50D-13*0.6*RO2 	;
+{1014.} 	 IC4H9O2 + HO2 = IC4H9OOH : 	KRO2HO2*0.625 	;
+{1015.} 	 IC4H9O2 + NO = IC4H9NO3 : 	KRO2NO*0.033 	;
+{1016.} 	 IC4H9O2 + NO = IC4H9O + NO2 : 	KRO2NO*0.967 	;
+{1017.} 	 IC4H9O2 + NO3 = IC4H9O + NO2 : 	KRO2NO3 	;
+{1018.} 	 IC4H9O2 = IBUTOL : 	1.30D-12*0.2*RO2 	;
+{1019.} 	 IC4H9O2 = IC4H9O : 	1.30D-12*0.6*RO2 	;
+{1020.} 	 IC4H9O2 = IPRCHO : 	1.30D-12*0.2*RO2 	;
+{1021.} 	 TC4H9O2 + HO2 = TC4H9OOH : 	KRO2HO2*0.625 	;
+{1022.} 	 TC4H9O2 + NO = TC4H9NO3 : 	KRO2NO*0.025 	;
+{1023.} 	 TC4H9O2 + NO = TC4H9O + NO2 : 	KRO2NO*0.975 	;
+{1024.} 	 TC4H9O2 + NO3 = TC4H9O + NO2 : 	KRO2NO3 	;
+{1025.} 	 TC4H9O2 = TBUTOL : 	6.70D-15*0.3*RO2 	;
+{1026.} 	 TC4H9O2 = TC4H9O : 	6.70D-15*0.7*RO2 	;
+{1027.} 	 PEAO2 + HO2 = PEAOOH : 	KRO2HO2*0.706 	;
+{1028.} 	 PEAO2 + NO = PEANO3 : 	KRO2NO*0.052 	;
+{1029.} 	 PEAO2 + NO = PEAO + NO2 : 	KRO2NO*0.948 	;
+{1030.} 	 PEAO2 + NO3 = PEAO + NO2 : 	KRO2NO3 	;
+{1031.} 	 PEAO2 = C4H9CHO : 	1.30D-12*0.2*RO2 	;
+{1032.} 	 PEAO2 = PEAO : 	1.30D-12*0.6*RO2 	;
+{1033.} 	 PEAO2 = PEAOH : 	1.30D-12*0.2*RO2 	;
+{1034.} 	 PEBO2 + HO2 = PEBOOH : 	KRO2HO2*0.706 	;
+{1035.} 	 PEBO2 + NO = PEBNO3 : 	KRO2NO*0.129 	;
+{1036.} 	 PEBO2 + NO = PEBO + NO2 : 	KRO2NO*0.871 	;
+{1037.} 	 PEBO2 + NO3 = PEBO + NO2 : 	KRO2NO3 	;
+{1038.} 	 PEBO2 = MPRK : 	2.50D-13*0.2*RO2 	;
+{1039.} 	 PEBO2 = PEBO : 	2.50D-13*0.6*RO2 	;
+{1040.} 	 PEBO2 = PEBOH : 	2.50D-13*0.2*RO2 	;
+{1041.} 	 PECO2 + HO2 = PECOOH : 	KRO2HO2*0.706 	;
+{1042.} 	 PECO2 + NO = PECNO3 : 	KRO2NO*0.131 	;
+{1043.} 	 PECO2 + NO = PECO + NO2 : 	KRO2NO*0.869 	;
+{1044.} 	 PECO2 + NO3 = PECO + NO2 : 	KRO2NO3 	;
+{1045.} 	 PECO2 = DIEK : 	2.50D-13*0.2*RO2 	;
+{1046.} 	 PECO2 = PECO : 	2.50D-13*0.6*RO2 	;
+{1047.} 	 PECO2 = PECOH : 	2.50D-13*0.2*RO2 	;
+{1048.} 	 IPEAO2 + HO2 = IPEAOOH : 	KRO2HO2*0.706 	;
+{1049.} 	 IPEAO2 + NO = IPEANO3 : 	KRO2NO*0.052 	;
+{1050.} 	 IPEAO2 + NO = IPEAO + NO2 : 	KRO2NO*0.948 	;
+{1051.} 	 IPEAO2 + NO3 = IPEAO + NO2 : 	KRO2NO3 	;
+{1052.} 	 IPEAO2 = BUT2CHO : 	1.30D-12*0.2*RO2 	;
+{1053.} 	 IPEAO2 = IPEAO : 	1.30D-12*0.6*RO2 	;
+{1054.} 	 IPEAO2 = IPEAOH : 	1.30D-12*0.2*RO2 	;
+{1055.} 	 IPEBO2 + HO2 = IPEBOOH : 	KRO2HO2*0.706 	;
+{1056.} 	 IPEBO2 + NO = IPEBNO3 : 	KRO2NO*0.141 	;
+{1057.} 	 IPEBO2 + NO = IPEBO + NO2 : 	KRO2NO*0.859 	;
+{1058.} 	 IPEBO2 + NO3 = IPEBO + NO2 : 	KRO2NO3 	;
+{1059.} 	 IPEBO2 = IPEBO : 	2.50D-13*0.6*RO2 	;
+{1060.} 	 IPEBO2 = IPEBOH : 	2.50D-13*0.2*RO2 	;
+{1061.} 	 IPEBO2 = MIPK : 	2.50D-13*0.2*RO2 	;
+{1062.} 	 IPECO2 + HO2 = IPECOOH : 	KRO2HO2*0.706 	;
+{1063.} 	 IPECO2 + NO = IPECNO3 : 	KRO2NO*0.047 	;
+{1064.} 	 IPECO2 + NO = IPECO + NO2 : 	KRO2NO*0.953 	;
+{1065.} 	 IPECO2 + NO3 = IPECO + NO2 : 	KRO2NO3 	;
+{1066.} 	 IPECO2 = IPECO : 	6.70D-15*0.7*RO2 	;
+{1067.} 	 IPECO2 = IPECOH : 	6.70D-15*0.3*RO2 	;
+{1068.} 	 NEOPO2 + HO2 = NEOPOOH : 	1.43D-13*EXP(1380/TEMP) 	;
+{1069.} 	 NEOPO2 + NO = NEOPNO3 : 	KRO2NO*0.051 	;
+{1070.} 	 NEOPO2 + NO = NEOPO + NO2 : 	KRO2NO*0.949 	;
+{1071.} 	 NEOPO2 + NO3 = NEOPO + NO2 : 	KRO2NO3 	;
+{1072.} 	 NEOPO2 = IPECO : 	1.3D-12*0.6*RO2 	;
+{1073.} 	 NEOPO2 = NEOPOH : 	1.3D-12*0.2*RO2 	;
+{1074.} 	 NEOPO2 = TBUTCHO : 	1.3D-12*0.2*RO2 	;
+{1075.} 	 HEXAO2 + HO2 = HEXAOOH : 	KRO2HO2*0.770 	;
+{1076.} 	 HEXAO2 + NO = HEXANO3 : 	KRO2NO*0.078 	;
+{1077.} 	 HEXAO2 + NO = HEXAO + NO2 : 	KRO2NO*0.922 	;
+{1078.} 	 HEXAO2 + NO3 = HEXAO + NO2 : 	KRO2NO3 	;
+{1079.} 	 HEXAO2 = C5H11CHO : 	1.30D-12*0.2*RO2 	;
+{1080.} 	 HEXAO2 = HEXAO : 	1.30D-12*0.6*RO2 	;
+{1081.} 	 HEXAO2 = HEXAOH : 	1.30D-12*0.2*RO2 	;
+{1082.} 	 HEXBO2 + HO2 = HEXBOOH : 	KRO2HO2*0.770 	;
+{1083.} 	 HEXBO2 + NO = HEXBNO3 : 	KRO2NO*0.209 	;
+{1084.} 	 HEXBO2 + NO = HEXBO + NO2 : 	KRO2NO*0.791 	;
+{1085.} 	 HEXBO2 + NO3 = HEXBO + NO2 : 	KRO2NO3 	;
+{1086.} 	 HEXBO2 = HEX2ONE : 	2.50D-13*0.2*RO2 	;
+{1087.} 	 HEXBO2 = HEXBO : 	2.50D-13*0.6*RO2 	;
+{1088.} 	 HEXBO2 = HEXBOH : 	2.50D-13*0.2*RO2 	;
+{1089.} 	 HEXCO2 + HO2 = HEXCOOH : 	KRO2HO2*0.770 	;
+{1090.} 	 HEXCO2 + NO = HEXCNO3 : 	KRO2NO*0.230 	;
+{1091.} 	 HEXCO2 + NO = HEXCO + NO2 : 	KRO2NO*0.770 	;
+{1092.} 	 HEXCO2 + NO3 = HEXCO + NO2 : 	KRO2NO3 	;
+{1093.} 	 HEXCO2 = HEX3ONE : 	2.50D-13*0.2*RO2 	;
+{1094.} 	 HEXCO2 = HEXCO : 	2.50D-13*0.6*RO2 	;
+{1095.} 	 HEXCO2 = HEXCOH : 	2.50D-13*0.2*RO2 	;
+{1096.} 	 M2PEAO2 + HO2 = M2PEAOOH : 	KRO2HO2*0.770 	;
+{1097.} 	 M2PEAO2 + NO = M2PEANO3 : 	KRO2NO*0.078 	;
+{1098.} 	 M2PEAO2 + NO = M2PEAO + NO2 : 	KRO2NO*0.922 	;
+{1099.} 	 M2PEAO2 + NO3 = M2PEAO + NO2 : 	KRO2NO3 	;
+{1100.} 	 M2PEAO2 = C54CHO : 	1.30D-12*0.2*RO2 	;
+{1101.} 	 M2PEAO2 = M2PEAO : 	1.30D-12*0.6*RO2 	;
+{1102.} 	 M2PEAO2 = M2PEAOH : 	1.30D-12*0.2*RO2 	;
+{1103.} 	 M2PEBO2 + HO2 = M2PEBOOH : 	KRO2HO2*0.770 	;
+{1104.} 	 M2PEBO2 + NO = M2PEBNO3 : 	KRO2NO*0.190 	;
+{1105.} 	 M2PEBO2 + NO = M2PEBO + NO2 : 	KRO2NO*0.810 	;
+{1106.} 	 M2PEBO2 + NO3 = M2PEBO + NO2 : 	KRO2NO3 	;
+{1107.} 	 M2PEBO2 = M2PEBO : 	2.50D-13*0.6*RO2 	;
+{1108.} 	 M2PEBO2 = M2PEBOH : 	2.50D-13*0.2*RO2 	;
+{1109.} 	 M2PEBO2 = MIBK : 	2.50D-13*0.2*RO2 	;
+{1110.} 	 M2PECO2 + HO2 = M2PECOOH : 	KRO2HO2*0.770 	;
+{1111.} 	 M2PECO2 + NO = M2PECNO3 : 	KRO2NO*0.190 	;
+{1112.} 	 M2PECO2 + NO = M2PECO + NO2 : 	KRO2NO*0.810 	;
+{1113.} 	 M2PECO2 + NO3 = M2PECO + NO2 : 	KRO2NO3 	;
+{1114.} 	 M2PECO2 = EIPK : 	2.50D-13*0.2*RO2 	;
+{1115.} 	 M2PECO2 = M2PECO : 	2.50D-13*0.6*RO2 	;
+{1116.} 	 M2PECO2 = M2PECOH : 	2.50D-13*0.2*RO2 	;
+{1117.} 	 M2PEDO2 + HO2 = M2PEDOOH : 	KRO2HO2*0.770 	;
+{1118.} 	 M2PEDO2 + NO = M2PEDNO3 : 	KRO2NO*0.031 	;
+{1119.} 	 M2PEDO2 + NO = M2PEDO + NO2 : 	KRO2NO*0.969 	;
+{1120.} 	 M2PEDO2 + NO3 = M2PEDO + NO2 : 	KRO2NO3 	;
+{1121.} 	 M2PEDO2 = M2PEDO : 	6.70D-15*0.7*RO2 	;
+{1122.} 	 M2PEDO2 = M2PEDOH : 	6.70D-15*0.3*RO2 	;
+{1123.} 	 M3PEAO2 + HO2 = M3PEAOOH : 	KRO2HO2*0.770 	;
+{1124.} 	 M3PEAO2 + NO = M3PEANO3 : 	KRO2NO*0.078 	;
+{1125.} 	 M3PEAO2 + NO = M3PEAO + NO2 : 	KRO2NO*0.922 	;
+{1126.} 	 M3PEAO2 + NO3 = M3PEAO + NO2 : 	KRO2NO3 	;
+{1127.} 	 M3PEAO2 = M3C4CHO : 	1.30D-12*0.2*RO2 	;
+{1128.} 	 M3PEAO2 = M3PEAO : 	1.30D-12*0.6*RO2 	;
+{1129.} 	 M3PEAO2 = M3PEAOH : 	1.30D-12*0.2*RO2 	;
+{1130.} 	 M3PEBO2 + HO2 = M3PEBOOH : 	KRO2HO2*0.770 	;
+{1131.} 	 M3PEBO2 + NO = M3PEBNO3 : 	KRO2NO*0.178 	;
+{1132.} 	 M3PEBO2 + NO = M3PEBO + NO2 : 	KRO2NO*0.822 	;
+{1133.} 	 M3PEBO2 + NO3 = M3PEBO + NO2 : 	KRO2NO3 	;
+{1134.} 	 M3PEBO2 = M2BK : 	2.50D-13*0.2*RO2 	;
+{1135.} 	 M3PEBO2 = M3PEBO : 	2.50D-13*0.6*RO2 	;
+{1136.} 	 M3PEBO2 = M3PEBOH : 	2.50D-13*0.2*RO2 	;
+{1137.} 	 M3PECO2 + HO2 = M3PECOOH : 	KRO2HO2*0.770 	;
+{1138.} 	 M3PECO2 + NO = M3PECNO3 : 	KRO2NO*0.059 	;
+{1139.} 	 M3PECO2 + NO = M3PECO + NO2 : 	KRO2NO*0.941 	;
+{1140.} 	 M3PECO2 + NO3 = M3PECO + NO2 : 	KRO2NO3 	;
+{1141.} 	 M3PECO2 = M3PECO : 	6.70D-15*0.7*RO2 	;
+{1142.} 	 M3PECO2 = M3PECOH : 	6.70D-15*0.3*RO2 	;
+{1143.} 	 M22C43O2 + HO2 = M22C43OOH : 	KRO2HO2*0.770 	;
+{1144.} 	 M22C43O2 + NO = M22C43NO3 : 	KRO2NO*0.195 	;
+{1145.} 	 M22C43O2 + NO = M22C43O + NO2 : 	KRO2NO*0.805 	;
+{1146.} 	 M22C43O2 + NO3 = M22C43O + NO2 : 	KRO2NO3 	;
+{1147.} 	 M22C43O2 = M22C43O : 	2.50D-13*0.6*RO2 	;
+{1148.} 	 M22C43O2 = M22C43OH : 	2.50D-13*0.2*RO2 	;
+{1149.} 	 M22C43O2 = MTBK : 	2.50D-13*0.2*RO2 	;
+{1150.} 	 M22C4O2 + HO2 = M22C4OOH : 	KRO2HO2*0.770 	;
+{1151.} 	 M22C4O2 + NO = M22C4NO3 : 	KRO2NO*0.078 	;
+{1152.} 	 M22C4O2 + NO = M22C4O + NO2 : 	KRO2NO*0.922 	;
+{1153.} 	 M22C4O2 + NO3 = M22C4O + NO2 : 	KRO2NO3 	;
+{1154.} 	 M22C4O2 = M22C3CHO : 	1.30D-12*0.2*RO2 	;
+{1155.} 	 M22C4O2 = M22C4O : 	1.30D-12*0.6*RO2 	;
+{1156.} 	 M22C4O2 = M22C4OH : 	1.30D-12*0.2*RO2 	;
+{1157.} 	 M33C4O2 + HO2 = M33C4OOH : 	KRO2HO2*0.770 	;
+{1158.} 	 M33C4O2 + NO = M33C4NO3 : 	KRO2NO*0.078 	;
+{1159.} 	 M33C4O2 + NO = M33C4O + NO2 : 	KRO2NO*0.922 	;
+{1160.} 	 M33C4O2 + NO3 = M33C4O + NO2 : 	KRO2NO3 	;
+{1161.} 	 M33C4O2 = M33C3CHO : 	1.30D-12*0.2*RO2 	;
+{1162.} 	 M33C4O2 = M33C4O : 	1.30D-12*0.6*RO2 	;
+{1163.} 	 M33C4O2 = M33C4OH : 	1.30D-12*0.2*RO2 	;
+{1164.} 	 M23C43O2 + HO2 = M23C43OOH : 	KRO2HO2*0.770 	;
+{1165.} 	 M23C43O2 + NO = M23C43NO3 : 	KRO2NO*0.059 	;
+{1166.} 	 M23C43O2 + NO = M23C43O + NO2 : 	KRO2NO*0.941 	;
+{1167.} 	 M23C43O2 + NO3 = M23C43O + NO2 : 	KRO2NO3 	;
+{1168.} 	 M23C43O2 = M23C43O : 	6.70D-15*0.7*RO2 	;
+{1169.} 	 M23C43O2 = M23C43OH : 	6.70D-15*0.3*RO2 	;
+{1170.} 	 M23C4O2 + HO2 = M23C4OOH : 	KRO2HO2*0.770 	;
+{1171.} 	 M23C4O2 + NO = M23C4NO3 : 	KRO2NO*0.078 	;
+{1172.} 	 M23C4O2 + NO = M23C4O + NO2 : 	KRO2NO*0.922 	;
+{1173.} 	 M23C4O2 + NO3 = M23C4O + NO2 : 	KRO2NO3 	;
+{1174.} 	 M23C4O2 = M23C4O : 	1.30D-12*0.6*RO2 	;
+{1175.} 	 M23C4O2 = M23C4OH : 	1.30D-12*0.2*RO2 	;
+{1176.} 	 M23C4O2 = M2C43CHO : 	1.30D-12*0.2*RO2 	;
+{1177.} 	 HEPTO2 + HO2 = HEPTOOH : 	KRO2HO2*0.820 	;
+{1178.} 	 HEPTO2 + NO = HEPTNO3 : 	KRO2NO*0.278 	;
+{1179.} 	 HEPTO2 + NO = HEPTO + NO2 : 	KRO2NO*0.722 	;
+{1180.} 	 HEPTO2 + NO3 = HEPTO + NO2 : 	KRO2NO3 	;
+{1181.} 	 HEPTO2 = HEPT3ONE : 	2.50D-13*0.2*RO2 	;
+{1182.} 	 HEPTO2 = HEPTO : 	2.50D-13*0.6*RO2 	;
+{1183.} 	 HEPTO2 = HEPTOH : 	2.50D-13*0.2*RO2 	;
+{1184.} 	 M2HEXAO2 + HO2 = M2HEXAOOH : 	KRO2HO2*0.820 	;
+{1185.} 	 M2HEXAO2 + NO = M2HEXANO3 : 	KRO2NO*0.278 	;
+{1186.} 	 M2HEXAO2 + NO = M2HEXAO + NO2 : 	KRO2NO*0.722 	;
+{1187.} 	 M2HEXAO2 + NO3 = M2HEXAO + NO2 : 	KRO2NO3 	;
+{1188.} 	 M2HEXAO2 = M2CO5C6 : 	2.50D-13*0.2*RO2 	;
+{1189.} 	 M2HEXAO2 = M2HEXAO : 	2.50D-13*0.6*RO2 	;
+{1190.} 	 M2HEXAO2 = M2HEXAOH : 	2.50D-13*0.2*RO2 	;
+{1191.} 	 M2HEXBO2 + HO2 = M2HEXBOOH : 	KRO2HO2*0.820 	;
+{1192.} 	 M2HEXBO2 + NO = M2HEXBNO3 : 	KRO2NO*0.083 	;
+{1193.} 	 M2HEXBO2 + NO = M2HEXBO + NO2 : 	KRO2NO*0.917 	;
+{1194.} 	 M2HEXBO2 + NO3 = M2HEXBO + NO2 : 	KRO2NO3 	;
+{1195.} 	 M2HEXBO2 = M2HEXBO : 	6.70D-15*0.7*RO2 	;
+{1196.} 	 M2HEXBO2 = M2HEXBOH : 	6.70D-15*0.3*RO2 	;
+{1197.} 	 M3HEXAO2 + HO2 = M3HEXAOOH : 	KRO2HO2*0.820 	;
+{1198.} 	 M3HEXAO2 + NO = M3HEXANO3 : 	KRO2NO*0.278 	;
+{1199.} 	 M3HEXAO2 + NO = M3HEXAO + NO2 : 	KRO2NO*0.722 	;
+{1200.} 	 M3HEXAO2 + NO3 = M3HEXAO + NO2 : 	KRO2NO3 	;
+{1201.} 	 M3HEXAO2 = M3CO5C6 : 	2.50D-13*0.2*RO2 	;
+{1202.} 	 M3HEXAO2 = M3HEXAO : 	2.50D-13*0.6*RO2 	;
+{1203.} 	 M3HEXAO2 = M3HEXAOH : 	2.50D-13*0.2*RO2 	;
+{1204.} 	 M3HEXBO2 + HO2 = M3HEXBOOH : 	KRO2HO2*0.820 	;
+{1205.} 	 M3HEXBO2 + NO = M3HEXBNO3 : 	KRO2NO*0.083 	;
+{1206.} 	 M3HEXBO2 + NO = M3HEXBO + NO2 : 	KRO2NO*0.917 	;
+{1207.} 	 M3HEXBO2 + NO3 = M3HEXBO + NO2 : 	KRO2NO3 	;
+{1208.} 	 M3HEXBO2 = M3HEXBO : 	6.70D-15*0.7*RO2 	;
+{1209.} 	 M3HEXBO2 = M3HEXBOH : 	6.70D-15*0.3*RO2 	;
+{1210.} 	 OCTO2 + HO2 = OCTOOH : 	KRO2HO2*0.859 	;
+{1211.} 	 OCTO2 + NO = OCTNO3 : 	KRO2NO*0.346 	;
+{1212.} 	 OCTO2 + NO = OCTO + NO2 : 	KRO2NO*0.654 	;
+{1213.} 	 OCTO2 + NO3 = OCTO + NO2 : 	KRO2NO3 	;
+{1214.} 	 OCTO2 = OCT3ONE : 	2.50D-13*0.2*RO2 	;
+{1215.} 	 OCTO2 = OCTO : 	2.50D-13*0.6*RO2 	;
+{1216.} 	 OCTO2 = OCTOH : 	2.50D-13*0.2*RO2 	;
+{1217.} 	 NONO2 + HO2 = NONOOH : 	KRO2HO2*0.890 	;
+{1218.} 	 NONO2 + NO = NONNO3 : 	KRO2NO*0.393 	;
+{1219.} 	 NONO2 + NO = NONO + NO2 : 	KRO2NO*0.607 	;
+{1220.} 	 NONO2 + NO3 = NONO + NO2 : 	KRO2NO3 	;
+{1221.} 	 NONO2 = NON3ONE : 	2.50D-13*0.2*RO2 	;
+{1222.} 	 NONO2 = NONO : 	2.50D-13*0.6*RO2 	;
+{1223.} 	 NONO2 = NONOH : 	2.50D-13*0.2*RO2 	;
+{1224.} 	 DECO2 + HO2 = DECOOH : 	KRO2HO2*0.914 	;
+{1225.} 	 DECO2 + NO = DECNO3 : 	KRO2NO*0.417 	;
+{1226.} 	 DECO2 + NO = DECO + NO2 : 	KRO2NO*0.583 	;
+{1227.} 	 DECO2 + NO3 = DECO + NO2 : 	KRO2NO3 	;
+{1228.} 	 DECO2 = DEC3ONE : 	2.50D-13*0.2*RO2 	;
+{1229.} 	 DECO2 = DECO : 	2.50D-13*0.6*RO2 	;
+{1230.} 	 DECO2 = DECOH : 	2.50D-13*0.2*RO2 	;
+{1231.} 	 UDECO2 + HO2 = UDECOOH : 	KRO2HO2*0.932 	;
+{1232.} 	 UDECO2 + NO = UDECNO3 : 	KRO2NO*0.431 	;
+{1233.} 	 UDECO2 + NO = UDECO + NO2 : 	KRO2NO*0.569 	;
+{1234.} 	 UDECO2 + NO3 = UDECO + NO2 : 	KRO2NO3 	;
+{1235.} 	 UDECO2 = UDEC3ONE : 	2.50D-13*0.2*RO2 	;
+{1236.} 	 UDECO2 = UDECO : 	2.50D-13*0.6*RO2 	;
+{1237.} 	 UDECO2 = UDECOH : 	2.50D-13*0.2*RO2 	;
+{1238.} 	 DDECO2 + HO2 = DDECOOH : 	KRO2HO2*0.947 	;
+{1239.} 	 DDECO2 + NO = DDECNO3 : 	KRO2NO*0.440 	;
+{1240.} 	 DDECO2 + NO = DDECO + NO2 : 	KRO2NO*0.560 	;
+{1241.} 	 DDECO2 + NO3 = DDECO + NO2 : 	KRO2NO3 	;
+{1242.} 	 DDECO2 = DDEC3ONE : 	2.50D-13*0.2*RO2 	;
+{1243.} 	 DDECO2 = DDECO : 	2.50D-13*0.6*RO2 	;
+{1244.} 	 DDECO2 = DDECOH : 	2.50D-13*0.2*RO2 	;
+{1245.} 	 CHEXO2 + HO2 = CHEXOOH : 	KRO2HO2*0.770 	;
+{1246.} 	 CHEXO2 + NO = CHEXNO3 : 	KRO2NO*0.078 	;
+{1247.} 	 CHEXO2 + NO = CHEXO + NO2 : 	KRO2NO*0.922 	;
+{1248.} 	 CHEXO2 + NO3 = CHEXO + NO2 : 	KRO2NO3 	;
+{1249.} 	 CHEXO2 = CHEXO : 	2.50D-13*0.6*RO2 	;
+{1250.} 	 CHEXO2 = CYHEXOL : 	2.50D-13*0.2*RO2 	;
+{1251.} 	 CHEXO2 = CYHEXONE : 	2.50D-13*0.2*RO2 	;
+{1252.} 	 ETHENO3O2 + HO2 = ETHO2HNO3 : 	KRO2HO2*0.387 	;
+{1253.} 	 ETHENO3O2 + NO = ETHENO3O + NO2 : 	KRO2NO 	;
+{1254.} 	 ETHENO3O2 + NO3 = ETHENO3O + NO2 : 	KRO2NO3 	;
+{1255.} 	 ETHENO3O2 = ETHENO3O : 	6.00D-13*0.6*RO2 	;
+{1256.} 	 ETHENO3O2 = ETHOHNO3 : 	6.00D-13*0.2*RO2 	;
+{1257.} 	 ETHENO3O2 = NO3CH2CHO : 	6.00D-13*0.2*RO2 	;
+{1258.} 	 CH2OOA = CH2OO : 	KDEC*0.37 	;
+{1259.} 	 CH2OOA = CO : 	KDEC*0.50 	;
+{1260.} 	 CH2OOA = HO2 + CO + OH : 	KDEC*0.13 	;
+{1261.} 	 PRONO3AO2 + HO2 = PR1O2HNO3 : 	KRO2HO2*0.520 	;
+{1262.} 	 PRONO3AO2 + NO = PRONO3AO + NO2 : 	KRO2NO 	;
+{1263.} 	 PRONO3AO2 + NO3 = PRONO3AO + NO2 : 	KRO2NO3 	;
+{1264.} 	 PRONO3AO2 = CHOPRNO3 : 	6.00D-13*0.2*RO2 	;
+{1265.} 	 PRONO3AO2 = PRONO3AO : 	6.00D-13*0.6*RO2 	;
+{1266.} 	 PRONO3AO2 = PROPOLNO3 : 	6.00D-13*0.2*RO2 	;
+{1267.} 	 PRONO3BO2 + HO2 = PR2O2HNO3 : 	KRO2HO2*0.520 	;
+{1268.} 	 PRONO3BO2 + NO = PRONO3BO + NO2 : 	KRO2NO 	;
+{1269.} 	 PRONO3BO2 + NO3 = PRONO3BO + NO2 : 	KRO2NO3 	;
+{1270.} 	 PRONO3BO2 = NOA : 	4.00D-14*0.2*RO2 	;
+{1271.} 	 PRONO3BO2 = PROLNO3 : 	4.00D-14*0.2*RO2 	;
+{1272.} 	 PRONO3BO2 = PRONO3BO : 	4.00D-14*0.6*RO2 	;
+{1273.} 	 CH3CHOOA = CH3CHOO : 	KDEC*0.24 	;
+{1274.} 	 CH3CHOOA = CH3O2 + CO + OH : 	KDEC*0.36 	;
+{1275.} 	 CH3CHOOA = CH3O2 + HO2 : 	KDEC*0.20 	;
+{1276.} 	 CH3CHOOA = CH4 : 	KDEC*0.20 	;
+{1277.} 	 BU1ENO3O2 + HO2 = BU1ENO3OOH : 	KRO2HO2*0.625 	;
+{1278.} 	 BU1ENO3O2 + NO = BU1ENO3O + NO2 : 	KRO2NO 	;
+{1279.} 	 BU1ENO3O2 + NO3 = BU1ENO3O + NO2 : 	KRO2NO3 	;
+{1280.} 	 BU1ENO3O2 = BU1ENO3O : 	2.50D-13*0.6*RO2 	;
+{1281.} 	 BU1ENO3O2 = CO3C4NO3 : 	2.50D-13*0.2*RO2 	;
+{1282.} 	 BU1ENO3O2 = HO3C4NO3 : 	2.50D-13*0.2*RO2 	;
+{1283.} 	 C43NO34O2 + HO2 = C43NO34OOH : 	KRO2HO2*0.625 	;
+{1284.} 	 C43NO34O2 + NO = C43NO34O + NO2 : 	KRO2NO 	;
+{1285.} 	 C43NO34O2 + NO3 = C43NO34O + NO2 : 	KRO2NO3 	;
+{1286.} 	 C43NO34O2 = BUTAL2NO3 : 	2.00D-12*0.2*RO2 	;
+{1287.} 	 C43NO34O2 = C43NO34O : 	2.00D-12*0.6*RO2 	;
+{1288.} 	 C43NO34O2 = NBUTOLANO3 : 	2.00D-12*0.2*RO2 	;
+{1289.} 	 C2H5CHOOA = C2H5CHOO : 	KDEC*0.24 	;
+{1290.} 	 C2H5CHOOA = C2H5O2 + CO + OH : 	KDEC*0.36 	;
+{1291.} 	 C2H5CHOOA = C2H5O2 + HO2 : 	KDEC*0.20 	;
+{1292.} 	 C2H5CHOOA = C2H6 : 	KDEC*0.20 	;
+{1293.} 	 HO3C4O2 + HO2 = HO3C4OOH : 	KRO2HO2*0.625 	;
+{1294.} 	 HO3C4O2 + NO = HO3C4NO3 : 	KRO2NO*0.017 	;
+{1295.} 	 HO3C4O2 + NO = HO3C4O + NO2 : 	KRO2NO*0.983 	;
+{1296.} 	 HO3C4O2 + NO3 = HO3C4O + NO2 : 	KRO2NO3 	;
+{1297.} 	 HO3C4O2 = HO3C3CHO : 	2.00D-12*0.2*RO2 	;
+{1298.} 	 HO3C4O2 = HO3C4O : 	2.00D-12*0.6*RO2 	;
+{1299.} 	 HO3C4O2 = NBUTOLAOH : 	2.00D-12*0.2*RO2 	;
+{1300.} 	 C42NO33O2 + HO2 = C42NO33OOH : 	KRO2HO2*0.625 	;
+{1301.} 	 C42NO33O2 + NO = C42NO33O + NO2 : 	KRO2NO 	;
+{1302.} 	 C42NO33O2 + NO3 = C42NO33O + NO2 : 	KRO2NO3 	;
+{1303.} 	 C42NO33O2 = BUT2OLNO3 : 	2.50D-13*0.2*RO2 	;
+{1304.} 	 C42NO33O2 = BUTONENO3 : 	2.50D-13*0.2*RO2 	;
+{1305.} 	 C42NO33O2 = C42NO33O : 	2.50D-13*0.6*RO2 	;
+{1306.} 	 MPRANO3O2 + HO2 = MPRANO3OOH : 	KRO2HO2*0.625 	;
+{1307.} 	 MPRANO3O2 + NO = MPRANO3O + NO2 : 	KRO2NO 	;
+{1308.} 	 MPRANO3O2 + NO3 = MPRANO3O + NO2 : 	KRO2NO3 	;
+{1309.} 	 MPRANO3O2 = MPRANO3O : 	6.70D-15*0.7*RO2 	;
+{1310.} 	 MPRANO3O2 = TBUTOLNO3 : 	6.70D-15*0.3*RO2 	;
+{1311.} 	 MPRBNO3O2 + HO2 = MPRBNO3OOH : 	KRO2HO2*0.625 	;
+{1312.} 	 MPRBNO3O2 + NO = MPRBNO3O + NO2 : 	KRO2NO 	;
+{1313.} 	 MPRBNO3O2 + NO3 = MPRBNO3O + NO2 : 	KRO2NO3 	;
+{1314.} 	 MPRBNO3O2 = IBUTOLBNO3 : 	1.30D-12*0.2*RO2 	;
+{1315.} 	 MPRBNO3O2 = MPRBNO3CHO : 	1.30D-12*0.2*RO2 	;
+{1316.} 	 MPRBNO3O2 = MPRBNO3O : 	1.30D-12*0.6*RO2 	;
+{1317.} 	 CH2OOC = CH2OO : 	KDEC*0.18 	;
+{1318.} 	 CH2OOC = HO2 + CO + OH : 	KDEC*0.82 	;
+{1319.} 	 CH3CCH3OOA = CH3CCH3OO : 	KDEC*0.18 	;
+{1320.} 	 CH3CCH3OOA = CH3COCH2O2 + OH : 	KDEC*0.82 	;
+{1321.} 	 C51NO32O2 + HO2 = C51NO32OOH : 	KRO2HO2*0.706 	;
+{1322.} 	 C51NO32O2 + NO = C51NO32O + NO2 : 	KRO2NO 	;
+{1323.} 	 C51NO32O2 + NO3 = C51NO32O + NO2 : 	KRO2NO3 	;
+{1324.} 	 C51NO32O2 = C51NO32CO : 	2.50D-13*0.2*RO2 	;
+{1325.} 	 C51NO32O2 = C51NO32O : 	2.50D-13*0.6*RO2 	;
+{1326.} 	 C51NO32O2 = PE1ENEBNO3 : 	2.50D-13*0.2*RO2 	;
+{1327.} 	 C52NO31O2 + HO2 = C52NO31OOH : 	KRO2HO2*0.706 	;
+{1328.} 	 C52NO31O2 + NO = C52NO31O + NO2 : 	KRO2NO 	;
+{1329.} 	 C52NO31O2 + NO3 = C52NO31O + NO2 : 	KRO2NO3 	;
+{1330.} 	 C52NO31O2 = C52NO31CO : 	1.30D-12*0.2*RO2 	;
+{1331.} 	 C52NO31O2 = C52NO31O : 	1.30D-12*0.6*RO2 	;
+{1332.} 	 C52NO31O2 = PE1ENEANO3 : 	1.30D-12*0.2*RO2 	;
+{1333.} 	 C3H7CHOOA = C3H7CHOO : 	KDEC*0.24 	;
+{1334.} 	 C3H7CHOOA = C3H8 : 	KDEC*0.20 	;
+{1335.} 	 C3H7CHOOA = NC3H7O2 + CO + OH : 	KDEC*0.36 	;
+{1336.} 	 C3H7CHOOA = NC3H7O2 + HO2 : 	KDEC*0.20 	;
+{1337.} 	 PE1ENEAO2 + HO2 = C51OH2OOH : 	KRO2HO2*0.706 	;
+{1338.} 	 PE1ENEAO2 + NO = PE1ENEANO3 : 	KRO2NO*0.064 	;
+{1339.} 	 PE1ENEAO2 + NO = PE1ENEAO + NO2 : 	KRO2NO*0.936 	;
+{1340.} 	 PE1ENEAO2 + NO3 = PE1ENEAO + NO2 : 	KRO2NO3 	;
+{1341.} 	 PE1ENEAO2 = C51OH2CO : 	8.80D-13*0.2*RO2 	;
+{1342.} 	 PE1ENEAO2 = HO12C5 : 	8.80D-13*0.2*RO2 	;
+{1343.} 	 PE1ENEAO2 = PE1ENEAO : 	8.80D-13*0.6*RO2 	;
+{1344.} 	 PE1ENEBO2 + HO2 = C52OH1OOH : 	KRO2HO2*0.706 	;
+{1345.} 	 PE1ENEBO2 + NO = PE1ENEBNO3 : 	KRO2NO*0.026 	;
+{1346.} 	 PE1ENEBO2 + NO = PE1ENEBO + NO2 : 	KRO2NO*0.974 	;
+{1347.} 	 PE1ENEBO2 + NO3 = PE1ENEBO + NO2 : 	KRO2NO3 	;
+{1348.} 	 PE1ENEBO2 = C4OHCHO : 	2.00D-12*0.2*RO2 	;
+{1349.} 	 PE1ENEBO2 = HO12C5 : 	2.00D-12*0.2*RO2 	;
+{1350.} 	 PE1ENEBO2 = PE1ENEBO : 	2.00D-12*0.6*RO2 	;
+{1351.} 	 C52NO33O2 + HO2 = C52NO33OOH : 	KRO2HO2*0.706 	;
+{1352.} 	 C52NO33O2 + NO = C52NO33O + NO2 : 	KRO2NO 	;
+{1353.} 	 C52NO33O2 + NO3 = C52NO33O + NO2 : 	KRO2NO3 	;
+{1354.} 	 C52NO33O2 = C52NO33CO : 	2.50D-13*0.2*RO2 	;
+{1355.} 	 C52NO33O2 = C52NO33O : 	2.50D-13*0.6*RO2 	;
+{1356.} 	 C52NO33O2 = PE2ENEBNO3 : 	2.50D-13*0.2*RO2 	;
+{1357.} 	 C53NO32O2 + HO2 = C53NO32OOH : 	KRO2HO2*0.706 	;
+{1358.} 	 C53NO32O2 + NO = C53NO32O + NO2 : 	KRO2NO 	;
+{1359.} 	 C53NO32O2 + NO3 = C53NO32O + NO2 : 	KRO2NO3 	;
+{1360.} 	 C53NO32O2 = C53NO32CO : 	2.50D-13*0.2*RO2 	;
+{1361.} 	 C53NO32O2 = C53NO32O : 	2.50D-13*0.6*RO2 	;
+{1362.} 	 C53NO32O2 = PE2ENEANO3 : 	2.50D-13*0.2*RO2 	;
+{1363.} 	 C2H5CHOOB = C2H5CHOO : 	KDEC*0.18 	;
+{1364.} 	 C2H5CHOOB = C2H5O2 + CO + OH : 	KDEC*0.57 	;
+{1365.} 	 C2H5CHOOB = C2H5O2 + HO2 : 	KDEC*0.125 	;
+{1366.} 	 C2H5CHOOB = C2H6 : 	KDEC*0.125 	;
+{1367.} 	 PE2ENEAO2 + HO2 = C52OH3OOH : 	KRO2HO2*0.706 	;
+{1368.} 	 PE2ENEAO2 + NO = PE2ENEANO3 : 	KRO2NO*0.064 	;
+{1369.} 	 PE2ENEAO2 + NO = PE2ENEAO + NO2 : 	KRO2NO*0.936 	;
+{1370.} 	 PE2ENEAO2 + NO3 = PE2ENEAO + NO2 : 	KRO2NO3 	;
+{1371.} 	 PE2ENEAO2 = C523OH : 	8.80D-13*0.2*RO2 	;
+{1372.} 	 PE2ENEAO2 = DIEKAOH : 	8.80D-13*0.2*RO2 	;
+{1373.} 	 PE2ENEAO2 = PE2ENEAO : 	8.80D-13*0.6*RO2 	;
+{1374.} 	 C4NO32M1O2 + HO2 = C4NO3M1OOH : 	KRO2HO2*0.706 	;
+{1375.} 	 C4NO32M1O2 + NO = C4NO32M1O + NO2 : 	KRO2NO 	;
+{1376.} 	 C4NO32M1O2 + NO3 = C4NO32M1O + NO2 : 	KRO2NO3 	;
+{1377.} 	 C4NO32M1O2 = C4NO32M1O : 	1.30D-12*0.6*RO2 	;
+{1378.} 	 C4NO32M1O2 = C4NO3CHO : 	1.30D-12*0.2*RO2 	;
+{1379.} 	 C4NO32M1O2 = M2BUOL2NO3 : 	1.30D-12*0.2*RO2 	;
+{1380.} 	 C4NO32M2O2 + HO2 = C4NO32MOOH : 	KRO2HO2*0.706 	;
+{1381.} 	 C4NO32M2O2 + NO = C4NO32M2O + NO2 : 	KRO2NO 	;
+{1382.} 	 C4NO32M2O2 + NO3 = C4NO32M2O + NO2 : 	KRO2NO3 	;
+{1383.} 	 C4NO32M2O2 = C4NO32M2O : 	6.70D-15*0.7*RO2 	;
+{1384.} 	 C4NO32M2O2 = PROL11MNO3 : 	6.70D-15*0.3*RO2 	;
+{1385.} 	 C2H5MECOOA = C2H5MECOO : 	KDEC*0.18 	;
+{1386.} 	 C2H5MECOOA = MEKBO2 + OH : 	KDEC*0.82 	;
+{1387.} 	 C4M3NO31O2 + HO2 = C4MNO31OOH : 	KRO2HO2*0.706 	;
+{1388.} 	 C4M3NO31O2 + NO = C4M3NO31O + NO2 : 	KRO2NO 	;
+{1389.} 	 C4M3NO31O2 + NO3 = C4M3NO31O + NO2 : 	KRO2NO3 	;
+{1390.} 	 C4M3NO31O2 = C4M3NO31O : 	9.20D-14*0.6*RO2 	;
+{1391.} 	 C4M3NO31O2 = C4M3NO3ONE : 	9.20D-14*0.2*RO2 	;
+{1392.} 	 C4M3NO31O2 = M3BU2OLNO3 : 	9.20D-14*0.2*RO2 	;
+{1393.} 	 C4M3NO32O2 + HO2 = C4MNO32OOH : 	KRO2HO2*0.706 	;
+{1394.} 	 C4M3NO32O2 + NO = C4M3NO32O + NO2 : 	KRO2NO 	;
+{1395.} 	 C4M3NO32O2 + NO3 = C4M3NO32O + NO2 : 	KRO2NO3 	;
+{1396.} 	 C4M3NO32O2 = C3MNO3CHO : 	2.00D-12*0.2*RO2 	;
+{1397.} 	 C4M3NO32O2 = C4M3NO32O : 	2.00D-12*0.6*RO2 	;
+{1398.} 	 C4M3NO32O2 = ME3BUOLNO3 : 	2.00D-12*0.2*RO2 	;
+{1399.} 	 IPRCHOOA = C3H8 : 	KDEC*0.20 	;
+{1400.} 	 IPRCHOOA = IC3H7O2 + CO + OH : 	KDEC*0.36 	;
+{1401.} 	 IPRCHOOA = IC3H7O2 + HO2 : 	KDEC*0.20 	;
+{1402.} 	 IPRCHOOA = IPRCHOO : 	KDEC*0.24 	;
+{1403.} 	 ME3BU2OLO2 + HO2 = M3BU2OLOOH : 	KRO2HO2*0.706 	;
+{1404.} 	 ME3BU2OLO2 + NO = M3BU2OLNO3 : 	KRO2NO*0.026 	;
+{1405.} 	 ME3BU2OLO2 + NO = ME3BU2OLO + NO2 : 	KRO2NO*0.974 	;
+{1406.} 	 ME3BU2OLO2 + NO3 = ME3BU2OLO + NO2 : 	KRO2NO3 	;
+{1407.} 	 ME3BU2OLO2 = C3M3OH2CHO : 	2.00D-12*0.2*RO2 	;
+{1408.} 	 ME3BU2OLO2 = C4ME3HO12 : 	2.00D-12*0.2*RO2 	;
+{1409.} 	 ME3BU2OLO2 = ME3BU2OLO : 	2.00D-12*0.6*RO2 	;
+{1410.} 	 C4M2NO32O2 + HO2 = C4NO3M2OOH : 	KRO2HO2*0.706 	;
+{1411.} 	 C4M2NO32O2 + NO = C4M2NO32O + NO2 : 	KRO2NO 	;
+{1412.} 	 C4M2NO32O2 + NO3 = C4M2NO32O + NO2 : 	KRO2NO3 	;
+{1413.} 	 C4M2NO32O2 = C4M2NO32O : 	8.80D-13*0.6*RO2 	;
+{1414.} 	 C4M2NO32O2 = C4M2NO3ONE : 	8.80D-13*0.2*RO2 	;
+{1415.} 	 C4M2NO32O2 = ME2BUOLNO3 : 	8.80D-13*0.2*RO2 	;
+{1416.} 	 C4M2NO33O2 + HO2 = C4M2NO3OOH : 	KRO2HO2*0.706 	;
+{1417.} 	 C4M2NO33O2 + NO = C4M2NO33O + NO2 : 	KRO2NO 	;
+{1418.} 	 C4M2NO33O2 + NO3 = C4M2NO33O + NO2 : 	KRO2NO3 	;
+{1419.} 	 C4M2NO33O2 = C4M2NO33O : 	6.70D-15*0.7*RO2 	;
+{1420.} 	 C4M2NO33O2 = M2BU2OLNO3 : 	6.70D-15*0.3*RO2 	;
+{1421.} 	 CH3CCH3OOB = CH3CCH3OO : 	KDEC*0.11 	;
+{1422.} 	 CH3CCH3OOB = CH3COCH2O2 + OH : 	KDEC*0.89 	;
+{1423.} 	 CH3CHOOC = CH3CHOO : 	KDEC*0.11 	;
+{1424.} 	 CH3CHOOC = CH3O2 + CO + OH : 	KDEC*0.89 	;
+{1425.} 	 C65NO36O2 + HO2 = C65NO36OOH : 	KRO2HO2*0.770 	;
+{1426.} 	 C65NO36O2 + NO = C65NO36O + NO2 : 	KRO2NO 	;
+{1427.} 	 C65NO36O2 + NO3 = C65NO36O + NO2 : 	KRO2NO3 	;
+{1428.} 	 C65NO36O2 = C65NO36CHO : 	2.00D-12*0.2*RO2 	;
+{1429.} 	 C65NO36O2 = C65NO36O : 	2.00D-12*0.6*RO2 	;
+{1430.} 	 C65NO36O2 = C6OH5NO3 : 	2.00D-12*0.2*RO2 	;
+{1431.} 	 C66NO35O2 + HO2 = C66NO35OOH : 	KRO2HO2*0.770 	;
+{1432.} 	 C66NO35O2 + NO = C66NO35O + NO2 : 	KRO2NO 	;
+{1433.} 	 C66NO35O2 + NO3 = C66NO35O + NO2 : 	KRO2NO3 	;
+{1434.} 	 C66NO35O2 = C66NO35CO : 	8.80D-13*0.2*RO2 	;
+{1435.} 	 C66NO35O2 = C66NO35O : 	8.80D-13*0.6*RO2 	;
+{1436.} 	 C66NO35O2 = C66NO35OH : 	8.80D-13*0.2*RO2 	;
+{1437.} 	 NC4H9CHOOA = NC4H10 : 	KDEC*0.20 	;
+{1438.} 	 NC4H9CHOOA = NC4H9CHOO : 	KDEC*0.24 	;
+{1439.} 	 NC4H9CHOOA = NC4H9O2 + CO + OH : 	KDEC*0.36 	;
+{1440.} 	 NC4H9CHOOA = NC4H9O2 + HO2 : 	KDEC*0.20 	;
+{1441.} 	 C6OH5O2 + HO2 = C6OH5OOH : 	KRO2HO2*0.770 	;
+{1442.} 	 C6OH5O2 + NO = C6OH5NO3 : 	KRO2NO*0.097 	;
+{1443.} 	 C6OH5O2 + NO = C6OH5O + NO2 : 	KRO2NO*0.903 	;
+{1444.} 	 C6OH5O2 + NO3 = C6OH5O + NO2 : 	KRO2NO3 	;
+{1445.} 	 C6OH5O2 = C4COMEOH : 	8.80D-13*0.2*RO2 	;
+{1446.} 	 C6OH5O2 = C656OH : 	8.80D-13*0.2*RO2 	;
+{1447.} 	 C6OH5O2 = C6OH5O : 	8.80D-13*0.6*RO2 	;
+{1448.} 	 HO5C6O2 + HO2 = HO5C6OOH : 	KRO2HO2*0.770 	;
+{1449.} 	 HO5C6O2 + NO = C66NO35OH : 	KRO2NO*0.039 	;
+{1450.} 	 HO5C6O2 + NO = HO5C6O + NO2 : 	KRO2NO*0.961 	;
+{1451.} 	 HO5C6O2 + NO3 = HO5C6O + NO2 : 	KRO2NO3 	;
+{1452.} 	 HO5C6O2 = C656OH : 	2.00D-12*0.2*RO2 	;
+{1453.} 	 HO5C6O2 = HO5C5CHO : 	2.00D-12*0.2*RO2 	;
+{1454.} 	 HO5C6O2 = HO5C6O : 	2.00D-12*0.6*RO2 	;
+{1455.} 	 C62NO33O2 + HO2 = C62NO33OOH : 	KRO2HO2*0.770 	;
+{1456.} 	 C62NO33O2 + NO = C62NO33O + NO2 : 	KRO2NO 	;
+{1457.} 	 C62NO33O2 + NO3 = C62NO33O + NO2 : 	KRO2NO3 	;
+{1458.} 	 C62NO33O2 = C62NO33CO : 	8.80D-13*0.2*RO2 	;
+{1459.} 	 C62NO33O2 = C62NO33O : 	8.80D-13*0.6*RO2 	;
+{1460.} 	 C62NO33O2 = C64OH5NO3 : 	8.80D-13*0.2*RO2 	;
+{1461.} 	 C63NO32O2 + HO2 = C63NO32OOH : 	KRO2HO2*0.770 	;
+{1462.} 	 C63NO32O2 + NO = C63NO32O + NO2 : 	KRO2NO 	;
+{1463.} 	 C63NO32O2 + NO3 = C63NO32O + NO2 : 	KRO2NO3 	;
+{1464.} 	 C63NO32O2 = C63NO32CO : 	8.80D-13*0.2*RO2 	;
+{1465.} 	 C63NO32O2 = C63NO32O : 	8.80D-13*0.6*RO2 	;
+{1466.} 	 C63NO32O2 = C65OH4NO3 : 	8.80D-13*0.2*RO2 	;
+{1467.} 	 C3H7CHOOB = C3H7CHOO : 	KDEC*0.18 	;
+{1468.} 	 C3H7CHOOB = C3H8 : 	KDEC*0.125 	;
+{1469.} 	 C3H7CHOOB = NC3H7O2 + CO + OH : 	KDEC*0.57 	;
+{1470.} 	 C3H7CHOOB = NC3H7O2 + HO2 : 	KDEC*0.125 	;
+{1471.} 	 C64OH5O2 + HO2 = C64OH5OOH : 	KRO2HO2*0.770 	;
+{1472.} 	 C64OH5O2 + NO = C64OH5NO3 : 	KRO2NO*0.097 	;
+{1473.} 	 C64OH5O2 + NO = C64OH5O + NO2 : 	KRO2NO*0.903 	;
+{1474.} 	 C64OH5O2 + NO3 = C64OH5O + NO2 : 	KRO2NO3 	;
+{1475.} 	 C64OH5O2 = C645OH : 	8.80D-13*0.2*RO2 	;
+{1476.} 	 C64OH5O2 = C64OH5O : 	8.80D-13*0.6*RO2 	;
+{1477.} 	 C64OH5O2 = CO2HO3C6 : 	8.80D-13*0.2*RO2 	;
+{1478.} 	 C65OH4O2 + HO2 = C65OH4OOH : 	KRO2HO2*0.770 	;
+{1479.} 	 C65OH4O2 + NO = C65OH4NO3 : 	KRO2NO*0.097 	;
+{1480.} 	 C65OH4O2 + NO = C65OH4O + NO2 : 	KRO2NO*0.903 	;
+{1481.} 	 C65OH4O2 + NO3 = C65OH4O + NO2 : 	KRO2NO3 	;
+{1482.} 	 C65OH4O2 = C645OH : 	8.80D-13*0.2*RO2 	;
+{1483.} 	 C65OH4O2 = C65OH4O : 	8.80D-13*0.6*RO2 	;
+{1484.} 	 C65OH4O2 = HEX3ONCOH : 	8.80D-13*0.2*RO2 	;
+{1485.} 	 C4ME2NO3O2 + HO2 = C42MNO3OOH : 	KRO2HO2*0.770 	;
+{1486.} 	 C4ME2NO3O2 + NO = C4ME2NO3O + NO2 : 	KRO2NO 	;
+{1487.} 	 C4ME2NO3O2 + NO3 = C4ME2NO3O + NO2 : 	KRO2NO3 	;
+{1488.} 	 C4ME2NO3O2 = C4ME2NO3O : 	9.20D-14*RO2*0.70 	;
+{1489.} 	 C4ME2NO3O2 = C4ME2OHNO3 : 	9.20D-14*RO2*0.30 	;
+{1490.} 	 CH3CCH3OOC = CH3COCH2O2 + OH : 	KDEC 	;
+{1491.} 	 C4ME2OHO2 + HO2 = C4ME2OHOOH : 	KRO2HO2*0.770 	;
+{1492.} 	 C4ME2OHO2 + NO = C4ME2OHNO3 : 	KRO2NO*0.031 	;
+{1493.} 	 C4ME2OHO2 + NO = C4ME2OHO + NO2 : 	KRO2NO*0.969 	;
+{1494.} 	 C4ME2OHO2 + NO3 = C4ME2OHO + NO2 : 	KRO2NO3 	;
+{1495.} 	 C4ME2OHO2 = C4ME22OH : 	9.20D-14*RO2*0.30 	;
+{1496.} 	 C4ME2OHO2 = C4ME2OHO : 	9.20D-14*RO2*0.70 	;
+{1497.} 	 BZBIPERO2 + HO2 = BZBIPEROOH : 	KRO2HO2*0.770 	;
+{1498.} 	 BZBIPERO2 + NO = BZBIPERNO3 : 	KRO2NO*0.082 	;
+{1499.} 	 BZBIPERO2 + NO = NO2 + BZBIPERO : 	KRO2NO*0.918 	;
+{1500.} 	 BZBIPERO2 + NO3 = NO2 + BZBIPERO : 	KRO2NO3 	;
+{1501.} 	 BZBIPERO2 = BZBIPER2OH : 	8.80D-13*RO2*0.2 	;
+{1502.} 	 BZBIPERO2 = BZBIPERO : 	8.80D-13*RO2*0.6 	;
+{1503.} 	 BZBIPERO2 = BZOBIPEROH : 	8.80D-13*RO2*0.2 	;
+{1504.} 	 BZEPOXMUC + NO3 = BZEMUCCO3 + HNO3 : 	2*KNO3AL*2.75 	;
+{1505.} 	 BZEPOXMUC + O3 = EPXC4DIAL + GLYOOA : 	2.00D-18 	;
+{1506.} 	 BZEPOXMUC + OH = BZEMUCCO3 : 	6.08D-11*0.31 	;
+{1507.} 	 BZEPOXMUC + OH = BZEMUCO2 : 	6.08D-11*0.69 	;
+{1508.} 	 BZEPOXMUC = C5DIALO2 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1509.} 	 BZEPOXMUC = MALDIAL + HO2 + CO + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1510.} 	 PHENOL + NO3 = C6H5O + HNO3 : 	3.8D-12*0.742 	;
+{1511.} 	 PHENOL + NO3 = NPHENO2 : 	3.8D-12*0.258 	;
+{1512.} 	 PHENOL + OH = C6H5O : 	4.7D-13*EXP(1220/TEMP)*0.06 	;
+{1513.} 	 PHENOL + OH = CATECHOL + HO2 : 	4.7D-13*EXP(1220/TEMP)*0.8 	;
+{1514.} 	 PHENOL + OH = PHENO2 : 	4.7D-13*EXP(1220/TEMP)*0.14 	;
+{1515.} 	 C6H5CH2O2 + HO2 = C6H5CH2OOH : 	1.5D-13*EXP(1310/TEMP) 	;
+{1516.} 	 C6H5CH2O2 + NO = C6H5CH2NO3 : 	KRO2NO*0.105 	;
+{1517.} 	 C6H5CH2O2 + NO = C6H5CH2O + NO2 : 	KRO2NO*0.895 	;
+{1518.} 	 C6H5CH2O2 + NO3 = C6H5CH2O + NO2 : 	KRO2NO3 	;
+{1519.} 	 C6H5CH2O2 = BENZAL : 	2*(KCH3O2*2.4D-14*EXP(1620/TEMP))**0.5*RO2*0.2 	;
+{1520.} 	 C6H5CH2O2 = C6H5CH2O : 	2*(KCH3O2*2.4D-14*EXP(1620/TEMP))**0.5*RO2*0.6 	;
+{1521.} 	 C6H5CH2O2 = C6H5CH2OH : 	2*(KCH3O2*2.4D-14*EXP(1620/TEMP))**0.5*RO2*0.2 	;
+{1522.} 	 CRESOL + NO3 = CRESO2 + HNO3 : 	1.4D-11*0.103 	;
+{1523.} 	 CRESOL + NO3 = NCRESO2 : 	1.4D-11*0.506 	;
+{1524.} 	 CRESOL + NO3 = TOL1O + HNO3 : 	1.4D-11*0.391 	;
+{1525.} 	 CRESOL + OH = CRESO2 : 	4.65D-11*0.200 	;
+{1526.} 	 CRESOL + OH = MCATECHOL + HO2 : 	4.65D-11*0.727 	;
+{1527.} 	 CRESOL + OH = TOL1O : 	4.65D-11*0.073 	;
+{1528.} 	 TLBIPERO2 + HO2 = TLBIPEROOH : 	KRO2HO2*0.820 	;
+{1529.} 	 TLBIPERO2 + NO = NO2 + TLBIPERO : 	KRO2NO*0.889 	;
+{1530.} 	 TLBIPERO2 + NO = TLBIPERNO3 : 	KRO2NO*0.111 	;
+{1531.} 	 TLBIPERO2 + NO3 = NO2 + TLBIPERO : 	KRO2NO3 	;
+{1532.} 	 TLBIPERO2 = TLBIPER2OH : 	8.80D-13*RO2*0.20 	;
+{1533.} 	 TLBIPERO2 = TLBIPERO : 	8.80D-13*RO2*0.60 	;
+{1534.} 	 TLBIPERO2 = TLOBIPEROH : 	8.80D-13*RO2*0.20 	;
+{1535.} 	 TLEPOXMUC + NO3 = TLEMUCCO3 + HNO3 : 	KNO3AL*2.75 	;
+{1536.} 	 TLEPOXMUC + O3 = EPXC4DIAL + MGLOOB : 	5.00D-18 	;
+{1537.} 	 TLEPOXMUC + OH = TLEMUCCO3 : 	7.99D-11*0.31 	;
+{1538.} 	 TLEPOXMUC + OH = TLEMUCO2 : 	7.99D-11*0.69 	;
+{1539.} 	 TLEPOXMUC = C615CO2O2 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1540.} 	 TLEPOXMUC = EPXC4DIAL + CH3CO3 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1541.} 	 OXYLO2 + HO2 = OXYLOOH : 	KRO2HO2*0.859 	;
+{1542.} 	 OXYLO2 + NO = OXYLNO3 : 	KRO2NO*0.105 	;
+{1543.} 	 OXYLO2 + NO = OXYLO + NO2 : 	KRO2NO*0.895 	;
+{1544.} 	 OXYLO2 + NO3 = OXYLO + NO2 : 	KRO2NO3 	;
+{1545.} 	 OXYLO2 = OXYLAL : 	1.30D-12*0.20*RO2 	;
+{1546.} 	 OXYLO2 = OXYLO : 	1.30D-12*0.60*RO2 	;
+{1547.} 	 OXYLO2 = OXYLOH : 	1.30D-12*0.20*RO2 	;
+{1548.} 	 OXYBIPERO2 + HO2 = OXYBPEROOH : 	KRO2HO2*0.859 	;
+{1549.} 	 OXYBIPERO2 + NO = OXYBIPENO3 : 	KRO2NO*0.138 	;
+{1550.} 	 OXYBIPERO2 + NO = OXYBIPERO + NO2 : 	KRO2NO*0.862 	;
+{1551.} 	 OXYBIPERO2 + NO3 = OXYBIPERO + NO2 : 	KRO2NO3 	;
+{1552.} 	 OXYBIPERO2 = OXYBIPERO : 	9.20D-14*RO2*0.70 	;
+{1553.} 	 OXYBIPERO2 = OXYBPER2OH : 	9.20D-14*RO2*0.30 	;
+{1554.} 	 OXYEPOXMUC + NO3 = OXYMUCCO3 + HNO3 : 	2*KNO3AL*4.25 	;
+{1555.} 	 OXYEPOXMUC + O3 = EPXM2C4DAL + GLYOOA : 	2.00D-18 	;
+{1556.} 	 OXYEPOXMUC + OH = OXYMUCCO3 : 	5.99D-11*0.632 	;
+{1557.} 	 OXYEPOXMUC + OH = OXYMUCO2 : 	5.99D-11*0.368 	;
+{1558.} 	 OXYEPOXMUC = EPXM2C4DAL + HO2 + CO + HO2 + CO : 	J(4)*0.05*0.5 	;
+{1559.} 	 OXYEPOXMUC = MC6CO2O2 + HO2 + CO : 	J(4)*0.05*0.5 	;
+{1560.} 	 OXYLOL + NO3 = NOXYOLO2 : 	3.20D-11*0.51 	;
+{1561.} 	 OXYLOL + NO3 = OXY1O + HNO3 : 	3.20D-11*0.39 	;
+{1562.} 	 OXYLOL + NO3 = OXYOLO2 + HNO3 : 	3.20D-11*0.10 	;
+{1563.} 	 OXYLOL + OH = OXY1O : 	8.00D-11*0.07 	;
+{1564.} 	 OXYLOL + OH = OXYCATECH + HO2 : 	8.00D-11*0.73 	;
+{1565.} 	 OXYLOL + OH = OXYOLO2 : 	8.00D-11*0.20 	;
+{1566.} 	 MXYLO2 + HO2 = MXYLOOH : 	KRO2HO2*0.859 	;
+{1567.} 	 MXYLO2 + NO = MXYLNO3 : 	KRO2NO*0.105 	;
+{1568.} 	 MXYLO2 + NO = MXYLO + NO2 : 	KRO2NO*0.895 	;
+{1569.} 	 MXYLO2 + NO3 = MXYLO + NO2 : 	KRO2NO3 	;
+{1570.} 	 MXYLO2 = MXYLAL : 	1.30D-12*0.20*RO2 	;
+{1571.} 	 MXYLO2 = MXYLO : 	1.30D-12*0.60*RO2 	;
+{1572.} 	 MXYLO2 = MXYLOH : 	1.30D-12*0.20*RO2 	;
+{1573.} 	 MXYBIPERO2 + HO2 = MXYBPEROOH : 	KRO2HO2*0.859 	;
+{1574.} 	 MXYBIPERO2 + NO = MXYBIPENO3 : 	KRO2NO*0.138 	;
+{1575.} 	 MXYBIPERO2 + NO = MXYBIPERO + NO2 : 	KRO2NO*0.862 	;
+{1576.} 	 MXYBIPERO2 + NO3 = MXYBIPERO + NO2 : 	KRO2NO3 	;
+{1577.} 	 MXYBIPERO2 = MXYBIPERO : 	8.80D-13*RO2*0.6 	;
+{1578.} 	 MXYBIPERO2 = MXYBPER2OH : 	8.80D-13*RO2*0.2 	;
+{1579.} 	 MXYBIPERO2 = MXYOBPEROH : 	8.80D-13*RO2*0.2 	;
+{1580.} 	 MXYEPOXMUC + NO3 = MXYMUCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1581.} 	 MXYEPOXMUC + O3 = EPXMC4DIAL + MGLOOB : 	2.00D-18 	;
+{1582.} 	 MXYEPOXMUC + OH = MXYMUCCO3 : 	8.02D-11*0.26 	;
+{1583.} 	 MXYEPOXMUC + OH = MXYMUCO2 : 	8.02D-11*0.74 	;
+{1584.} 	 MXYEPOXMUC = C726CO5O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1585.} 	 MXYEPOXMUC = EPXMC4DIAL + CH3CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1586.} 	 MXYLOL + NO3 = MXY1O + HNO3 : 	4.50D-11*0.39 	;
+{1587.} 	 MXYLOL + NO3 = MXYOLO2 + HNO3 : 	4.50D-11*0.10 	;
+{1588.} 	 MXYLOL + NO3 = NMXYOLO2 : 	4.50D-11*0.51 	;
+{1589.} 	 MXYLOL + OH = MXY1O : 	9.10D-11*0.07 	;
+{1590.} 	 MXYLOL + OH = MXYCATECH + HO2 : 	9.10D-11*0.42 	;
+{1591.} 	 MXYLOL + OH = MXYOLO2 : 	9.10D-11*0.51 	;
+{1592.} 	 PXYLO2 + HO2 = PXYLOOH : 	KRO2HO2*0.820 	;
+{1593.} 	 PXYLO2 + NO = PXYLNO3 : 	KRO2NO*0.105 	;
+{1594.} 	 PXYLO2 + NO = PXYLO + NO2 : 	KRO2NO*0.895 	;
+{1595.} 	 PXYLO2 + NO3 = PXYLO + NO2 : 	KRO2NO3 	;
+{1596.} 	 PXYLO2 = PXYLAL : 	1.30D-12*0.20*RO2 	;
+{1597.} 	 PXYLO2 = PXYLO : 	1.30D-12*0.60*RO2 	;
+{1598.} 	 PXYLO2 = PXYLOH : 	1.30D-12*0.20*RO2 	;
+{1599.} 	 PXYBIPERO2 + HO2 = PXYBPEROOH : 	KRO2HO2*0.859 	;
+{1600.} 	 PXYBIPERO2 + NO = PXYBIPENO3 : 	KRO2NO*0.138 	;
+{1601.} 	 PXYBIPERO2 + NO = PXYBIPERO + NO2 : 	KRO2NO*0.862 	;
+{1602.} 	 PXYBIPERO2 + NO3 = PXYBIPERO + NO2 : 	KRO2NO3 	;
+{1603.} 	 PXYBIPERO2 = PXYBIPERO : 	9.20D-14*RO2*0.70 	;
+{1604.} 	 PXYBIPERO2 = PXYBPER2OH : 	9.20D-14*RO2*0.30 	;
+{1605.} 	 PXYEPOXMUC + NO3 = PXYMUCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1606.} 	 PXYEPOXMUC + O3 = EPXMC4DIAL + MGLOOB : 	5.00D-18 	;
+{1607.} 	 PXYEPOXMUC + OH = PXYMUCCO3 : 	7.88D-11*0.26 	;
+{1608.} 	 PXYEPOXMUC + OH = PXYMUCO2 : 	7.88D-11*0.74 	;
+{1609.} 	 PXYEPOXMUC = C6M5CO2O2 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1610.} 	 PXYEPOXMUC = EPXMC4DIAL + CH3CO3 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1611.} 	 PXYLOL + NO3 = NPXYOLO2 : 	3.48D-11*0.51 	;
+{1612.} 	 PXYLOL + NO3 = PXY1O + HNO3 : 	3.48D-11*0.39 	;
+{1613.} 	 PXYLOL + NO3 = PXYOLO2 + HNO3 : 	3.48D-11*0.10 	;
+{1614.} 	 PXYLOL + OH = PXY1O : 	8.00D-11*0.07 	;
+{1615.} 	 PXYLOL + OH = PXYCATECH + HO2 : 	8.00D-11*0.73 	;
+{1616.} 	 PXYLOL + OH = PXYOLO2 : 	8.00D-11*0.2 	;
+{1617.} 	 C6H5C2H4O2 + HO2 = C6H5C2OOH : 	KRO2HO2*0.859 	;
+{1618.} 	 C6H5C2H4O2 + NO = C6H5C2H4O + NO2 : 	KRO2NO*0.900 	;
+{1619.} 	 C6H5C2H4O2 + NO = C6H5C2NO3 : 	KRO2NO*0.100 	;
+{1620.} 	 C6H5C2H4O2 + NO3 = C6H5C2H4O + NO2 : 	KRO2NO3 	;
+{1621.} 	 C6H5C2H4O2 = C6H5C2H4O : 	1.30D-12*0.60*RO2 	;
+{1622.} 	 C6H5C2H4O2 = C6H5C2OH : 	1.30D-12*0.20*RO2 	;
+{1623.} 	 C6H5C2H4O2 = C6H5CH2CHO : 	1.30D-12*0.20*RO2 	;
+{1624.} 	 EBENZOL + NO3 = EBENZO + HNO3 : 	1.25D-11*0.391 	;
+{1625.} 	 EBENZOL + NO3 = EBENZOLO2 + HNO3 : 	1.25D-11*0.103 	;
+{1626.} 	 EBENZOL + NO3 = NEBNZOLO2 : 	1.25D-11*0.506 	;
+{1627.} 	 EBENZOL + OH = EBENZO : 	5.10D-11*0.073 	;
+{1628.} 	 EBENZOL + OH = EBENZOLO2 : 	5.10D-11*0.200 	;
+{1629.} 	 EBENZOL + OH = ECATECHOL + HO2 : 	5.10D-11*0.727 	;
+{1630.} 	 EBZBIPERO2 + HO2 = EBZBPEROOH : 	KRO2HO2*0.859 	;
+{1631.} 	 EBZBIPERO2 + NO = EBZBIPERO + NO2 : 	KRO2NO*0.90 	;
+{1632.} 	 EBZBIPERO2 + NO = EBZBPERNO3 : 	KRO2NO*0.10 	;
+{1633.} 	 EBZBIPERO2 + NO3 = EBZBIPERO + NO2 : 	KRO2NO3 	;
+{1634.} 	 EBZBIPERO2 = EBZBIPERO : 	8.80D-13*RO2*0.60 	;
+{1635.} 	 EBZBIPERO2 = EBZBPER2OH : 	8.80D-13*RO2*0.20 	;
+{1636.} 	 EBZBIPERO2 = EBZOBPEROH : 	8.80D-13*RO2*0.20 	;
+{1637.} 	 EBZPOXMUC + NO3 = EBZMUCCO3 + HNO3 : 	KNO3AL*2.75 	;
+{1638.} 	 EBZPOXMUC + O3 = EPXC4DIAL + EGLYOOB : 	5.00D-18 	;
+{1639.} 	 EBZPOXMUC + OH = EBZMUCCO3 : 	8.10D-11*0.26 	;
+{1640.} 	 EBZPOXMUC + OH = EBZMUCO2 : 	8.10D-11*0.76 	;
+{1641.} 	 EBZPOXMUC = C715CO2O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1642.} 	 EBZPOXMUC = EPXC4DIAL + C2H5CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1643.} 	 PHC3O2 + HO2 = PHC3OOH : 	KRO2HO2*0.890 	;
+{1644.} 	 PHC3O2 + NO = PHC3NO3 : 	KRO2NO*0.393 	;
+{1645.} 	 PHC3O2 + NO = PHC3O + NO2 : 	KRO2NO*0.607 	;
+{1646.} 	 PHC3O2 + NO3 = PHC3O + NO2 : 	KRO2NO3 	;
+{1647.} 	 PHC3O2 = PHC3O : 	2.50D-13*RO2*0.6 	;
+{1648.} 	 PHC3O2 = PHC3OH : 	2.50D-13*RO2*0.2 	;
+{1649.} 	 PHC3O2 = PHCOET : 	2.50D-13*RO2*0.2 	;
+{1650.} 	 PBENZOL + NO3 = NPBNZOLO2 : 	1.25D-11*0.506 	;
+{1651.} 	 PBENZOL + NO3 = PBENZO + HNO3 : 	1.25D-11*0.391 	;
+{1652.} 	 PBENZOL + NO3 = PBENZOLO2 + HNO3 : 	1.25D-11*0.103 	;
+{1653.} 	 PBENZOL + OH = PBENZO : 	5.10D-11*0.073 	;
+{1654.} 	 PBENZOL + OH = PBENZOLO2 : 	5.10D-11*0.200 	;
+{1655.} 	 PBENZOL + OH = PCATECHOL + HO2 : 	5.10D-11*0.727 	;
+{1656.} 	 PBZBIPERO2 + HO2 = PBZBPEROOH : 	KRO2HO2*0.890 	;
+{1657.} 	 PBZBIPERO2 + NO = PBZBIPERO + NO2 : 	KRO2NO*0.90 	;
+{1658.} 	 PBZBIPERO2 + NO = PBZBPERNO3 : 	KRO2NO*0.10 	;
+{1659.} 	 PBZBIPERO2 + NO3 = PBZBIPERO + NO2 : 	KRO2NO3 	;
+{1660.} 	 PBZBIPERO2 = PBZBIPERO : 	8.80D-13*RO2*0.60 	;
+{1661.} 	 PBZBIPERO2 = PBZBPER2OH : 	8.80D-13*RO2*0.20 	;
+{1662.} 	 PBZBIPERO2 = PBZOBPEROH : 	8.80D-13*RO2*0.20 	;
+{1663.} 	 PBZPOXMUC + NO3 = PBZMUCCO3 + HNO3 : 	KNO3AL*2.75 	;
+{1664.} 	 PBZPOXMUC + O3 = EPXC4DIAL + PGLOOA : 	5.00D-18 	;
+{1665.} 	 PBZPOXMUC + OH = PBZMUCCO3 : 	8.45D-11*0.74 	;
+{1666.} 	 PBZPOXMUC + OH = PBZMUCO2 : 	8.45D-11*0.26 	;
+{1667.} 	 PBZPOXMUC = C815CO2O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1668.} 	 PBZPOXMUC = EPXC4DIAL + C3H7CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1669.} 	 PHIC3O2 + HO2 = PHIC3OOH : 	KRO2HO2*0.890 	;
+{1670.} 	 PHIC3O2 + NO = PHIC3NO3 : 	KRO2NO*0.118 	;
+{1671.} 	 PHIC3O2 + NO = PHIC3O + NO2 : 	KRO2NO*0.882 	;
+{1672.} 	 PHIC3O2 + NO3 = PHIC3O + NO2 : 	KRO2NO3 	;
+{1673.} 	 PHIC3O2 = PHIC3O : 	6.70D-15*RO2*0.7 	;
+{1674.} 	 PHIC3O2 = PHIC3OH : 	6.70D-15*RO2*0.3 	;
+{1675.} 	 IPBENZOL + NO3 = IPBENZO + HNO3 : 	1.25D-11*0.391 	;
+{1676.} 	 IPBENZOL + NO3 = IPBENZOLO2 + HNO3 : 	1.25D-11*0.103 	;
+{1677.} 	 IPBENZOL + NO3 = NIPBNZOLO2 : 	1.25D-11*0.506 	;
+{1678.} 	 IPBENZOL + OH = IPBENZO : 	5.10D-11*0.073 	;
+{1679.} 	 IPBENZOL + OH = IPBENZOLO2 : 	5.10D-11*0.200 	;
+{1680.} 	 IPBENZOL + OH = IPCATECHOL + HO2 : 	5.10D-11*0.727 	;
+{1681.} 	 IPBZBIPRO2 + HO2 = IPBZBPROOH : 	KRO2HO2*0.890 	;
+{1682.} 	 IPBZBIPRO2 + NO = IPBZBIPRO + NO2 : 	KRO2NO*0.90 	;
+{1683.} 	 IPBZBIPRO2 + NO = IPBZBPRNO3 : 	KRO2NO*0.10 	;
+{1684.} 	 IPBZBIPRO2 + NO3 = IPBZBIPRO + NO2 : 	KRO2NO3 	;
+{1685.} 	 IPBZBIPRO2 = IPBZBIPRO : 	8.80D-13*RO2*0.60 	;
+{1686.} 	 IPBZBIPRO2 = IPBZBPR2OH : 	8.80D-13*RO2*0.20 	;
+{1687.} 	 IPBZBIPRO2 = IPBZOBPROH : 	8.80D-13*RO2*0.20 	;
+{1688.} 	 IPBZPOXMUC + NO3 = IPBZMUCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1689.} 	 IPBZPOXMUC + O3 = EPXC4DIAL + IPGLOOB : 	5.00D-18 	;
+{1690.} 	 IPBZPOXMUC + OH = IPBZMUCCO3 : 	8.23D-11*0.26 	;
+{1691.} 	 IPBZPOXMUC + OH = IPBZMUCO2 : 	8.23D-11*0.74 	;
+{1692.} 	 IPBZPOXMUC = C7M15CO2O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1693.} 	 IPBZPOXMUC = EPXC4DIAL + IPRCO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1694.} 	 TM123BO2 + HO2 = TM123BOOH : 	KRO2HO2*0.890 	;
+{1695.} 	 TM123BO2 + NO = TM123BNO3 : 	KRO2NO*0.157 	;
+{1696.} 	 TM123BO2 + NO = TM123BO + NO2 : 	KRO2NO*0.843 	;
+{1697.} 	 TM123BO2 + NO3 = TM123BO + NO2 : 	KRO2NO3 	;
+{1698.} 	 TM123BO2 = TM123BCHO : 	1.30D-12*RO2*0.20 	;
+{1699.} 	 TM123BO2 = TM123BO : 	1.30D-12*RO2*0.60 	;
+{1700.} 	 TM123BO2 = TM123BOH : 	1.30D-12*RO2*0.20 	;
+{1701.} 	 TM123BOL + NO3 = NTM123OLO2 : 	3.20D-11*0.51 	;
+{1702.} 	 TM123BOL + NO3 = TM123O + HNO3 : 	3.20D-11*0.39 	;
+{1703.} 	 TM123BOL + NO3 = TM123OLO2 + HNO3 : 	3.20D-11*0.10 	;
+{1704.} 	 TM123BOL + OH = T123CATECH + HO2 : 	8.20D-11*0.73 	;
+{1705.} 	 TM123BOL + OH = TM123O : 	8.20D-11*0.07 	;
+{1706.} 	 TM123BOL + OH = TM123OLO2 : 	8.20D-11*0.20 	;
+{1707.} 	 TM123BPRO2 + HO2 = TM123BPOOH : 	KRO2HO2*0.890 	;
+{1708.} 	 TM123BPRO2 + NO = TM123BPNO3 : 	KRO2NO*0.157 	;
+{1709.} 	 TM123BPRO2 + NO = TM123BPRO + NO2 : 	KRO2NO*0.843 	;
+{1710.} 	 TM123BPRO2 + NO3 = TM123BPRO + NO2 : 	KRO2NO3 	;
+{1711.} 	 TM123BPRO2 = TM123BP2OH : 	8.80D-13*RO2*0.20 	;
+{1712.} 	 TM123BPRO2 = TM123BPRO : 	8.80D-13*RO2*0.60 	;
+{1713.} 	 TM123BPRO2 = TM123OBPOH : 	8.80D-13*RO2*0.20 	;
+{1714.} 	 TM123OXMUC + O3 = EPXALMKT + MGLOOB : 	5.00D-18 	;
+{1715.} 	 TM123OXMUC + OH = TM123MUCO2 : 	5.96D-11 	;
+{1716.} 	 TM123OXMUC = C726CO5O2 + CH3CO3 : 	J(22) 	;
+{1717.} 	 TM123OXMUC = EPXALMKT + HO2 + CO + CH3CO3 : 	J(24) 	;
+{1718.} 	 TM124BO2 + HO2 = TM124BOOH : 	KRO2HO2*0.890 	;
+{1719.} 	 TM124BO2 + NO = TM124BNO3 : 	KRO2NO*0.157 	;
+{1720.} 	 TM124BO2 + NO = TM124BO + NO2 : 	KRO2NO*0.843 	;
+{1721.} 	 TM124BO2 + NO3 = TM124BO + NO2 : 	KRO2NO3 	;
+{1722.} 	 TM124BO2 = TM124BCHO : 	1.30D-12*RO2*0.20 	;
+{1723.} 	 TM124BO2 = TM124BO : 	1.30D-12*RO2*0.60 	;
+{1724.} 	 TM124BO2 = TM124BOH : 	1.30D-12*RO2*0.20 	;
+{1725.} 	 TM124BPRO2 + HO2 = TM124BPOOH : 	KRO2HO2*0.890 	;
+{1726.} 	 TM124BPRO2 + NO = TM124BPNO3 : 	KRO2NO*0.157 	;
+{1727.} 	 TM124BPRO2 + NO = TM124BPRO + NO2 : 	KRO2NO*0.843 	;
+{1728.} 	 TM124BPRO2 + NO3 = TM124BPRO + NO2 : 	KRO2NO3 	;
+{1729.} 	 TM124BPRO2 = TM124BP2OH : 	9.20D-14*RO2*0.30 	;
+{1730.} 	 TM124BPRO2 = TM124BPRO : 	9.20D-14*RO2*0.70 	;
+{1731.} 	 TM124OL + NO3 = NTM124OLO2 : 	3.20D-11*0.51 	;
+{1732.} 	 TM124OL + NO3 = TM124O + HNO3 : 	3.20D-11*0.39 	;
+{1733.} 	 TM124OL + NO3 = TM124OLO2 + HNO3 : 	3.20D-11*0.10 	;
+{1734.} 	 TM124OL + OH = T124CATECH + HO2 : 	8.20D-11*0.26 	;
+{1735.} 	 TM124OL + OH = TM124O : 	8.20D-11*0.07 	;
+{1736.} 	 TM124OL + OH = TM124OLO2 : 	8.20D-11*0.67 	;
+{1737.} 	 TM124OXMUC + NO3 = TM124MUCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1738.} 	 TM124OXMUC + O3 = EPXM2C4DAL + MGLOOB : 	5.00D-18 	;
+{1739.} 	 TM124OXMUC + OH = TM124MUCO2 : 	7.91D-11*0.736 	;
+{1740.} 	 TM124OXMUC + OH = TM124MUCO3 : 	7.91D-11*0.264 	;
+{1741.} 	 TM124OXMUC = C7CO2M5O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1742.} 	 TM124OXMUC = EPXM2C4DAL + CH3CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1743.} 	 TMBO2 + HO2 = TMBOOH : 	KRO2HO2*0.890 	;
+{1744.} 	 TMBO2 + NO = TMBNO3 : 	KRO2NO*0.105 	;
+{1745.} 	 TMBO2 + NO = TMBO + NO2 : 	KRO2NO*0.895 	;
+{1746.} 	 TMBO2 + NO3 = TMBO + NO2 : 	KRO2NO3 	;
+{1747.} 	 TMBO2 = TMBCHO : 	1.30D-12*0.20*RO2 	;
+{1748.} 	 TMBO2 = TMBO : 	1.30D-12*0.60*RO2 	;
+{1749.} 	 TMBO2 = TMBOH : 	1.30D-12*0.20*RO2 	;
+{1750.} 	 TM135BPRO2 + HO2 = TM135BPOOH : 	KRO2HO2*0.890 	;
+{1751.} 	 TM135BPRO2 + NO = TM135BPNO3 : 	KRO2NO*0.157 	;
+{1752.} 	 TM135BPRO2 + NO = TM135BPRO + NO2 : 	KRO2NO*0.843 	;
+{1753.} 	 TM135BPRO2 + NO3 = TM135BPRO + NO2 : 	KRO2NO3 	;
+{1754.} 	 TM135BPRO2 = TM135BP2OH : 	8.80D-13*RO2*0.2 	;
+{1755.} 	 TM135BPRO2 = TM135BPRO : 	8.80D-13*RO2*0.6 	;
+{1756.} 	 TM135BPRO2 = TM135OBPOH : 	8.80D-13*RO2*0.2 	;
+{1757.} 	 TM135BZOL + NO3 = NTM135OLO2 : 	1.30D-11*0.787 	;
+{1758.} 	 TM135BZOL + NO3 = TM135O + HNO3 : 	1.30D-11*0.213 	;
+{1759.} 	 TM135BZOL + OH = TM135O : 	8.20D-11*0.054 	;
+{1760.} 	 TM135BZOL + OH = TM135OLO2 : 	8.20D-11*0.946 	;
+{1761.} 	 TM135OXMUC + NO3 = TM135MUCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1762.} 	 TM135OXMUC + O3 = EPXMALKT + MGLOOC : 	1.25D-17 	;
+{1763.} 	 TM135OXMUC + OH = TM135MUCO2 : 	1.01D-10*0.79 	;
+{1764.} 	 TM135OXMUC + OH = TM135MUCO3 : 	1.01D-10*0.21 	;
+{1765.} 	 TM135OXMUC = C7M2CO5O2 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1766.} 	 TM135OXMUC = EPXMALKT + CH3CO3 + HO2 + CO : 	J(4)*0.1*0.5 	;
+{1767.} 	 ETOLO2 + HO2 = ETOLOOH : 	KRO2HO2*0.890 	;
+{1768.} 	 ETOLO2 + NO = ETOLNO3 : 	KRO2NO*0.393 	;
+{1769.} 	 ETOLO2 + NO = ETOLO + NO2 : 	KRO2NO*0.607 	;
+{1770.} 	 ETOLO2 + NO3 = ETOLO + NO2 : 	KRO2NO3 	;
+{1771.} 	 ETOLO2 = ETOLO : 	2.50D-13*RO2*0.6 	;
+{1772.} 	 ETOLO2 = ETOLOH : 	2.50D-13*RO2*0.2 	;
+{1773.} 	 ETOLO2 = MPHCOME : 	2.50D-13*RO2*0.2 	;
+{1774.} 	 OETLBIPRO2 + HO2 = OETLBPROOH : 	KRO2HO2*0.890 	;
+{1775.} 	 OETLBIPRO2 + NO = OETLBIPNO3 : 	KRO2NO*0.157 	;
+{1776.} 	 OETLBIPRO2 + NO = OETLBIPRO + NO2 : 	KRO2NO*0.843 	;
+{1777.} 	 OETLBIPRO2 + NO3 = OETLBIPRO + NO2 : 	KRO2NO3 	;
+{1778.} 	 OETLBIPRO2 = OETLBIPRO : 	9.20D-14*RO2*0.70 	;
+{1779.} 	 OETLBIPRO2 = OETLBPR2OH : 	9.20D-14*RO2*0.30 	;
+{1780.} 	 OETLPOXMUC + NO3 = OETLMUCCO3 + HNO3 : 	2*KNO3AL*4.25 	;
+{1781.} 	 OETLPOXMUC + O3 = EPXMEC4DAL + GLYOOA : 	2.00D-18 	;
+{1782.} 	 OETLPOXMUC + OH = OETLMUCCO3 : 	6.32D-11*0.49 	;
+{1783.} 	 OETLPOXMUC + OH = OETLMUCO2 : 	6.32D-11*0.51 	;
+{1784.} 	 OETLPOXMUC = EPXMEC4DAL + HO2 + CO + HO2 + CO : 	J(4)*0.05*0.5 	;
+{1785.} 	 OETLPOXMUC = MC7CO2O2 + HO2 + CO : 	J(4)*0.05*0.5 	;
+{1786.} 	 OETOH + NO3 = NOETOLO2 : 	3.20D-11*0.51 	;
+{1787.} 	 OETOH + NO3 = OET1O + HNO3 : 	3.20D-11*0.39 	;
+{1788.} 	 OETOH + NO3 = OETOLO2 + HNO3 : 	3.20D-11*0.10 	;
+{1789.} 	 OETOH + OH = OET1O : 	8.20D-11*0.07 	;
+{1790.} 	 OETOH + OH = OETCATECH + HO2 : 	8.20D-11*0.73 	;
+{1791.} 	 OETOH + OH = OETOLO2 : 	8.20D-11*0.20 	;
+{1792.} 	 METLBIPRO2 + HO2 = METLBPROOH : 	KRO2HO2*0.890 	;
+{1793.} 	 METLBIPRO2 + NO = METLBIPNO3 : 	KRO2NO*0.157 	;
+{1794.} 	 METLBIPRO2 + NO = METLBIPRO + NO2 : 	KRO2NO*0.843 	;
+{1795.} 	 METLBIPRO2 + NO3 = METLBIPRO + NO2 : 	KRO2NO3 	;
+{1796.} 	 METLBIPRO2 = METLBIPRO : 	8.80D-13*RO2*0.6 	;
+{1797.} 	 METLBIPRO2 = METLBPR2OH : 	8.80D-13*RO2*0.2 	;
+{1798.} 	 METLBIPRO2 = METLOBPROH : 	8.80D-13*RO2*0.2 	;
+{1799.} 	 METLPOXMUC + NO3 = METLMUCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1800.} 	 METLPOXMUC + O3 = EPXMC4DIAL + EGLYOOB : 	5.00D-18 	;
+{1801.} 	 METLPOXMUC + OH = METLMUCCO3 : 	8.13D-11*0.26 	;
+{1802.} 	 METLPOXMUC + OH = METLMUCO2 : 	8.13D-11*0.74 	;
+{1803.} 	 METLPOXMUC = C826CO3O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1804.} 	 METLPOXMUC = EPXMC4DIAL + C2H5CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1805.} 	 METOH + NO3 = MET1O + HNO3 : 	4.50D-11*0.39 	;
+{1806.} 	 METOH + NO3 = METOLO2 + HNO3 : 	4.50D-11*0.10 	;
+{1807.} 	 METOH + NO3 = NMETOLO2 : 	4.50D-11*0.51 	;
+{1808.} 	 METOH + OH = MET1O : 	8.20D-11*0.07 	;
+{1809.} 	 METOH + OH = METCATECH + HO2 : 	8.20D-11*0.42 	;
+{1810.} 	 METOH + OH = METOLO2 : 	8.20D-11*0.51 	;
+{1811.} 	 PETLBIPRO2 + HO2 = PETLBPROOH : 	KRO2HO2*0.890 	;
+{1812.} 	 PETLBIPRO2 + NO = PETLBIPNO3 : 	KRO2NO*0.157 	;
+{1813.} 	 PETLBIPRO2 + NO = PETLBIPRO + NO2 : 	KRO2NO*0.843 	;
+{1814.} 	 PETLBIPRO2 + NO3 = PETLBIPRO + NO2 : 	KRO2NO3 	;
+{1815.} 	 PETLBIPRO2 = PETLBIPRO : 	9.20D-14*RO2*0.7 	;
+{1816.} 	 PETLBIPRO2 = PETLBPR2OH : 	9.20D-14*RO2*0.3 	;
+{1817.} 	 PETLPOXMUC + NO3 = PETLMUCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1818.} 	 PETLPOXMUC + O3 = EPXMC4DIAL + EGLYOOB : 	5.00D-18 	;
+{1819.} 	 PETLPOXMUC + OH = PETLMUCCO3 : 	8.00D-11*0.26 	;
+{1820.} 	 PETLPOXMUC + OH = PETLMUCO2 : 	8.00D-11*0.74 	;
+{1821.} 	 PETLPOXMUC = C7M6CO2O2 + C2H5CO3 : 	J(4)*0.028*0.5 	;
+{1822.} 	 PETLPOXMUC = EPXMC4DIAL + CH3CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1823.} 	 PETOH + NO3 = NPETOLO2 : 	3.48D-11*0.51 	;
+{1824.} 	 PETOH + NO3 = PET1O + HNO3 : 	3.48D-11*0.39 	;
+{1825.} 	 PETOH + NO3 = PETOLO2 + HNO3 : 	3.48D-11*0.10 	;
+{1826.} 	 PETOH + OH = PET1O : 	8.20D-11*0.07 	;
+{1827.} 	 PETOH + OH = PETCATECH + HO2 : 	8.20D-11*0.73 	;
+{1828.} 	 PETOH + OH = PETOLO2 : 	8.20D-11*0.20 	;
+{1829.} 	 DM35EBO2 + HO2 = DM35EBOOH : 	KRO2HO2*0.914 	;
+{1830.} 	 DM35EBO2 + NO = DM35EBNO3 : 	KRO2NO*0.417 	;
+{1831.} 	 DM35EBO2 + NO = DM35EBO + NO2 : 	KRO2NO*0.583 	;
+{1832.} 	 DM35EBO2 + NO3 = DM35EBO + NO2 : 	KRO2NO3 	;
+{1833.} 	 DM35EBO2 = DM35EBO : 	2.50D-13*RO2*0.6 	;
+{1834.} 	 DM35EBO2 = DM35EBOH : 	2.50D-13*RO2*0.2 	;
+{1835.} 	 DM35EBO2 = DMPHCOME : 	2.50D-13*RO2*0.2 	;
+{1836.} 	 DMEBIPRO2 + HO2 = DMEBPROOH : 	KRO2HO2*0.914 	;
+{1837.} 	 DMEBIPRO2 + NO = DMEBIPNO3 : 	KRO2NO*0.167 	;
+{1838.} 	 DMEBIPRO2 + NO = DMEBIPRO + NO2 : 	KRO2NO*0.833 	;
+{1839.} 	 DMEBIPRO2 + NO3 = DMEBIPRO + NO2 : 	KRO2NO3 	;
+{1840.} 	 DMEBIPRO2 = DMEBIPRO : 	8.80D-13*RO2*0.6 	;
+{1841.} 	 DMEBIPRO2 = DMEBPR2OH : 	8.80D-13*RO2*0.2 	;
+{1842.} 	 DMEBIPRO2 = DMEOBPROH : 	8.80D-13*RO2*0.2 	;
+{1843.} 	 DMEBPOXMUC + NO3 = DMEBMUCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1844.} 	 DMEBPOXMUC + O3 = EPXMALKT + EGLYOOD : 	1.25D-17 	;
+{1845.} 	 DMEBPOXMUC + OH = DMEBMUCO2 : 	1.02D-10*0.79 	;
+{1846.} 	 DMEBPOXMUC + OH = DMEBMUCO3 : 	1.02D-10*0.21 	;
+{1847.} 	 DMEBPOXMUC = C8M2CO6O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1848.} 	 DMEBPOXMUC = EPXMALKT + C2H5CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1849.} 	 DMEPHOH + NO3 = DMEPH1O + HNO3 : 	1.30D-11*0.213 	;
+{1850.} 	 DMEPHOH + NO3 = NDMEPHOLO2 : 	1.30D-11*0.787 	;
+{1851.} 	 DMEPHOH + OH = DMEPH1O : 	8.20D-11*0.054 	;
+{1852.} 	 DMEPHOH + OH = DMEPHOLO2 : 	8.20D-11*0.946 	;
+{1853.} 	 DE35TO2 + HO2 = DE35TOOH : 	KRO2HO2*0.932 	;
+{1854.} 	 DE35TO2 + NO = DE35TNO3 : 	KRO2NO*0.431 	;
+{1855.} 	 DE35TO2 + NO = DE35TO + NO2 : 	KRO2NO*0.569 	;
+{1856.} 	 DE35TO2 + NO3 = DE35TO + NO2 : 	KRO2NO3 	;
+{1857.} 	 DE35TO2 = DE35TO : 	2.50D-13*RO2*0.6 	;
+{1858.} 	 DE35TO2 = DE35TOH : 	2.50D-13*RO2*0.2 	;
+{1859.} 	 DE35TO2 = EMPHCOME : 	2.50D-13*RO2*0.2 	;
+{1860.} 	 DEMPHOH + NO3 = DEMPHSMS1O + HNO3 : 	1.30D-11*0.213 	;
+{1861.} 	 DEMPHOH + NO3 = NDEMPHOLO2 : 	1.30D-11*0.787 	;
+{1862.} 	 DEMPHOH + OH = DEMPHOLO2 : 	8.20D-11*0.946 	;
+{1863.} 	 DEMPHOH + OH = DEMPHSMS1O : 	8.20D-11*0.054 	;
+{1864.} 	 DETLBIPRO2 + HO2 = DETLBPROOH : 	KRO2HO2*0.932 	;
+{1865.} 	 DETLBIPRO2 + NO = DETLBIPNO3 : 	KRO2NO*0.172 	;
+{1866.} 	 DETLBIPRO2 + NO = DETLBIPRO + NO2 : 	KRO2NO*0.828 	;
+{1867.} 	 DETLBIPRO2 + NO3 = DETLBIPRO + NO2 : 	KRO2NO3 	;
+{1868.} 	 DETLBIPRO2 = DETLBIPRO : 	8.80D-13*RO2*0.6 	;
+{1869.} 	 DETLBIPRO2 = DETLBPR2OH : 	8.80D-13*RO2*0.2 	;
+{1870.} 	 DETLBIPRO2 = DETLOBPROH : 	8.80D-13*RO2*0.2 	;
+{1871.} 	 DETLPOXMUC + NO3 = DETLMUCO3 + HNO3 : 	KNO3AL*4.25 	;
+{1872.} 	 DETLPOXMUC + O3 = EPXEALKT + EGLYOOD : 	1.25D-17 	;
+{1873.} 	 DETLPOXMUC + OH = DETLMUCO2 : 	1.05D-10*0.79 	;
+{1874.} 	 DETLPOXMUC + OH = DETLMUCO3 : 	1.05D-10*0.21 	;
+{1875.} 	 DETLPOXMUC = C9M2CO6O2 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1876.} 	 DETLPOXMUC = EPXEALKT + C2H5CO3 + HO2 + CO : 	J(4)*0.028*0.5 	;
+{1877.} 	 NSTYRENO2 + HO2 = NSTYRENOOH : 	KRO2HO2*0.859 	;
+{1878.} 	 NSTYRENO2 + NO = NO2 + NSTYRENEO : 	KRO2NO 	;
+{1879.} 	 NSTYRENO2 + NO3 = NO2 + NSTYRENEO : 	KRO2NO3 	;
+{1880.} 	 NSTYRENO2 = NSTYRENEO : 	2.50D-13*RO2 	;
+{1881.} 	 PHCHOOA = BENZENE : 	KDEC*0.20 	;
+{1882.} 	 PHCHOOA = C6H5O2 + CO + OH : 	KDEC*0.36 	;
+{1883.} 	 PHCHOOA = C6H5O2 + HO2 : 	KDEC*0.20 	;
+{1884.} 	 PHCHOOA = PHCHOO : 	KDEC*0.24 	;
+{1885.} 	 STYRENO2 + HO2 = STYRENOOH : 	KRO2HO2*0.859 	;
+{1886.} 	 STYRENO2 + NO = NO2 + STYRENO : 	KRO2NO 	;
+{1887.} 	 STYRENO2 + NO3 = NO2 + STYRENO : 	KRO2NO3 	;
+{1888.} 	 STYRENO2 = STYRENO : 	2.50D-13*RO2 	;
+{1889.} 	 C6H5CO3 + HO2 = C6H5CO3H : 	KAPHO2*0.41 	;
+{1890.} 	 C6H5CO3 + HO2 = C6H5O2 + OH : 	KAPHO2*0.44 	;
+{1891.} 	 C6H5CO3 + HO2 = PHCOOH + O3 : 	KAPHO2*0.15 	;
+{1892.} 	 C6H5CO3 + NO = C6H5O2 + NO2 : 	KAPNO 	;
+{1893.} 	 C6H5CO3 + NO2 = PBZN : 	KFPAN 	;
+{1894.} 	 C6H5CO3 + NO3 = C6H5O2 + NO2 : 	KRO2NO3*1.74 	;
+{1895.} 	 C6H5CO3 = C6H5O2 : 	1.00D-11*RO2*0.7 	;
+{1896.} 	 C6H5CO3 = PHCOOH : 	1.00D-11*RO2*0.3 	;
+{1897.} 	 C6H5O2 + HO2 = C6H5OOH : 	KRO2HO2*0.770 	;
+{1898.} 	 C6H5O2 + NO = C6H5O + NO2 : 	KRO2NO 	;
+{1899.} 	 C6H5O2 + NO3 = C6H5O + NO2 : 	KRO2NO3 	;
+{1900.} 	 C6H5O2 = C6H5O : 	2.50D-13*RO2 	;
+{1901.} 	 CH2CLO2 + HO2 = CH2CLOOH : 	3.2D-13*EXP(820/TEMP)*0.3 	;
+{1902.} 	 CH2CLO2 + HO2 = CHOCL : 	3.2D-13*EXP(820/TEMP)*0.7 	;
+{1903.} 	 CH2CLO2 + NO = CH2CLO + NO2 : 	KRO2NO*1.5 	;
+{1904.} 	 CH2CLO2 + NO3 = CH2CLO + NO2 : 	KRO2NO3 	;
+{1905.} 	 CH2CLO2 = CH2CLO : 	2*(KCH3O2*1.9D-13*EXP(870/TEMP))**0.5*RO2*0.6 	;
+{1906.} 	 CH2CLO2 = CH2CLOH : 	2*(KCH3O2*1.9D-13*EXP(870/TEMP))**0.5*RO2*0.2 	;
+{1907.} 	 CH2CLO2 = CHOCL : 	2*(KCH3O2*1.9D-13*EXP(870/TEMP))**0.5*RO2*0.2 	;
+{1908.} 	 CHCL2O2 + HO2 = CHCL2OOH : 	5.6D-13*EXP(700/TEMP) 	;
+{1909.} 	 CHCL2O2 + NO = CHCL2O + NO2 : 	KRO2NO*1.5 	;
+{1910.} 	 CHCL2O2 + NO3 = CHCL2O + NO2 : 	KRO2NO3 	;
+{1911.} 	 CHCL2O2 = CHCL2O : 	2.00D-12*0.6*RO2 	;
+{1912.} 	 CHCL2O2 = CHCL2OH : 	2.00D-12*0.2*RO2 	;
+{1913.} 	 CHCL2O2 = COCL2 : 	2.00D-12*0.2*RO2 	;
+{1914.} 	 CCL3O2 + HO2 = CCL3OOH : 	4.7D-13*EXP(710/TEMP) 	;
+{1915.} 	 CCL3O2 + NO = CCL3O + NO2 : 	KRO2NO*1.8 	;
+{1916.} 	 CCL3O2 + NO3 = CCL3O + NO2 : 	KRO2NO3 	;
+{1917.} 	 CCL3O2 = CCL3O : 	2*(KCH3O2*3.3D-13*EXP(740/TEMP))**0.5*RO2*0.7 	;
+{1918.} 	 CCL3O2 = CCL3OH : 	2*(KCH3O2*3.3D-13*EXP(740/TEMP))**0.5*RO2*0.3 	;
+{1919.} 	 CCL3CH2O2 + HO2 = CCL3CH2OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1920.} 	 CCL3CH2O2 + NO = CCL3CH2O + NO2 : 	KRO2NO*1.5 	;
+{1921.} 	 CCL3CH2O2 + NO3 = CCL3CH2O + NO2 : 	KRO2NO3 	;
+{1922.} 	 CCL3CH2O2 = CCL3CH2O : 	2.00D-12*0.6*RO2 	;
+{1923.} 	 CCL3CH2O2 = CCL3CH2OH : 	2.00D-12*0.2*RO2 	;
+{1924.} 	 CCL3CH2O2 = CCL3CHO : 	2.00D-12*0.2*RO2 	;
+{1925.} 	 TCEOHO2 + HO2 = TCEOHOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1926.} 	 TCEOHO2 + NO = TCEOHO + NO2 : 	KRO2NO*1.5 	;
+{1927.} 	 TCEOHO2 + NO3 = TCEOHO + NO2 : 	KRO2NO3 	;
+{1928.} 	 TCEOHO2 = TCE2OH : 	9.20D-14*0.3*RO2 	;
+{1929.} 	 TCEOHO2 = TCEOHO : 	9.20D-14*0.7*RO2 	;
+{1930.} 	 C2CL3OHAO2 + HO2 = C2CL3OHOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1931.} 	 C2CL3OHAO2 + NO = C2CL3OHAO + NO2 : 	KRO2NO*1.5 	;
+{1932.} 	 C2CL3OHAO2 + NO3 = C2CL3OHAO + NO2 : 	KRO2NO3 	;
+{1933.} 	 C2CL3OHAO2 = C2CL32OH : 	9.20D-14*0.3*RO2 	;
+{1934.} 	 C2CL3OHAO2 = C2CL3OHAO : 	9.20D-14*0.7*RO2 	;
+{1935.} 	 C2CL3OHBO2 + HO2 = C2CL3HOOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1936.} 	 C2CL3OHBO2 + NO = C2CL3OHBO + NO2 : 	KRO2NO*1.5 	;
+{1937.} 	 C2CL3OHBO2 + NO3 = C2CL3OHBO + NO2 : 	KRO2NO3 	;
+{1938.} 	 C2CL3OHBO2 = C2CL32OH : 	8.80D-13*0.2*RO2 	;
+{1939.} 	 C2CL3OHBO2 = C2CL3OHBO : 	8.80D-13*0.6*RO2 	;
+{1940.} 	 C2CL3OHBO2 = CCL2OHCOCL : 	8.80D-13*0.2*RO2 	;
+{1941.} 	 C2CL2OHO2 + HO2 = C2CL2OHOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1942.} 	 C2CL2OHO2 + NO = C2CL2OHO + NO2 : 	KRO2NO*1.5 	;
+{1943.} 	 C2CL2OHO2 + NO3 = C2CL2OHO + NO2 : 	KRO2NO3 	;
+{1944.} 	 C2CL2OHO2 = C2CL2OH2 : 	8.80D-13*0.2*RO2 	;
+{1945.} 	 C2CL2OHO2 = C2CL2OHO : 	8.80D-13*0.6*RO2 	;
+{1946.} 	 C2CL2OHO2 = CCLOHCOCL : 	8.80D-13*0.2*RO2 	;
+{1947.} 	 DICLETO2 + HO2 = DICLETO2H : 	3.30D-13*EXP(820/TEMP) 	;
+{1948.} 	 DICLETO2 + NO = DICLETO + NO2 : 	KRO2NO*1.5 	;
+{1949.} 	 DICLETO2 + NO3 = DICLETO + NO2 : 	KRO2NO3 	;
+{1950.} 	 DICLETO2 = CLETAL : 	8.80D-13*0.2*RO2 	;
+{1951.} 	 DICLETO2 = DICLETO : 	8.80D-13*0.6*RO2 	;
+{1952.} 	 DICLETO2 = DICLETOH : 	8.80D-13*0.2*RO2 	;
+{1953.} 	 CH2OHCL2O2 + HO2 = CH2OHCL2O2H : 	KRO2HO2 	;
+{1954.} 	 CH2OHCL2O2 + NO = CH2OHCL2O + NO2 : 	KRO2NO*1.5 	;
+{1955.} 	 CH2OHCL2O2 + NO3 = CH2OHCL2O + NO2 : 	KRO2NO3 	;
+{1956.} 	 CH2OHCL2O2 = CH2OHCL2O : 	8.80D-13*0.7*RO2 	;
+{1957.} 	 CH2OHCL2O2 = CL2OHCH2OH : 	8.80D-13*0.3*RO2 	;
+{1958.} 	 CL2OHCH2O2 + HO2 = CL2OHOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1959.} 	 CL2OHCH2O2 + NO = CL2OHCH2O + NO2 : 	KRO2NO*1.2 	;
+{1960.} 	 CL2OHCH2O2 + NO3 = CL2OHCH2O + NO2 : 	KRO2NO3 	;
+{1961.} 	 CL2OHCH2O2 = CL2OHCH2O : 	2.00D-12*0.60*RO2 	;
+{1962.} 	 CL2OHCH2O2 = CL2OHCH2OH : 	2.00D-12*0.20*RO2 	;
+{1963.} 	 CL2OHCH2O2 = CL2OHCHO : 	2.00D-12*0.20*RO2 	;
+{1964.} 	 CL12PRAO2 + HO2 = CL12PRAOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1965.} 	 CL12PRAO2 + NO = CL12PRAO + NO2 : 	KRO2NO 	;
+{1966.} 	 CL12PRAO2 + NO3 = CL12PRAO + NO2 : 	KRO2NO3 	;
+{1967.} 	 CL12PRAO2 = CL12PRAO : 	2.00D-12*0.60*RO2 	;
+{1968.} 	 CL12PRAO2 = CL12PRAOH : 	2.00D-12*0.20*RO2 	;
+{1969.} 	 CL12PRAO2 = CL12PRCHO : 	2.00D-12*0.20*RO2 	;
+{1970.} 	 CL12PRBO2 + HO2 = CL12PRBOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1971.} 	 CL12PRBO2 + NO = CL12PRBO + NO2 : 	KRO2NO 	;
+{1972.} 	 CL12PRBO2 + NO3 = CL12PRBO + NO2 : 	KRO2NO3 	;
+{1973.} 	 CL12PRBO2 = CL12PRBO : 	9.20D-13*0.70*RO2 	;
+{1974.} 	 CL12PRBO2 = CL12PRBOH : 	9.20D-13*0.30*RO2 	;
+{1975.} 	 CL12PRCO2 + HO2 = CL12PRCOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1976.} 	 CL12PRCO2 + NO = CL12PRCO + NO2 : 	KRO2NO 	;
+{1977.} 	 CL12PRCO2 + NO3 = CL12PRCO + NO2 : 	KRO2NO3 	;
+{1978.} 	 CL12PRCO2 = CH3CLCOCL : 	8.80D-13*0.20*RO2 	;
+{1979.} 	 CL12PRCO2 = CL12PRCO : 	8.80D-13*0.60*RO2 	;
+{1980.} 	 CL12PRCO2 = CL12PRCOH : 	8.80D-13*0.20*RO2 	;
+{1981.} 	 CH3CCL2O2 + HO2 = CH3CCL2OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1982.} 	 CH3CCL2O2 + NO = CH3CCL2O + NO2 : 	KRO2NO*1.5 	;
+{1983.} 	 CH3CCL2O2 + NO3 = CH3CCL2O + NO2 : 	KRO2NO3 	;
+{1984.} 	 CH3CCL2O2 = CH3CCL2O : 	9.20D-14*0.70*RO2 	;
+{1985.} 	 CH3CCL2O2 = CH3CCL2OH : 	9.20D-14*0.30*RO2 	;
+{1986.} 	 CHCL2CH2O2 + HO2 = CHCL2COOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1987.} 	 CHCL2CH2O2 + NO = CHCL2CH2O + NO2 : 	KRO2NO*1.2 	;
+{1988.} 	 CHCL2CH2O2 + NO3 = CHCL2CH2O + NO2 : 	KRO2NO3 	;
+{1989.} 	 CHCL2CH2O2 = CHCL2CH2O : 	2.00D-12*0.60*RO2 	;
+{1990.} 	 CHCL2CH2O2 = CHCL2CHO : 	2.00D-12*0.20*RO2 	;
+{1991.} 	 CHCL2CH2O2 = CHCL2CHOH : 	2.00D-12*0.20*RO2 	;
+{1992.} 	 CH2CLCH2O2 + HO2 = CH2CLCOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1993.} 	 CH2CLCH2O2 + NO = CH2CLCH2O + NO2 : 	KRO2NO*1.2 	;
+{1994.} 	 CH2CLCH2O2 + NO3 = CH2CLCH2O + NO2 : 	KRO2NO3 	;
+{1995.} 	 CH2CLCH2O2 = CH2CLCH2O : 	2*(KCH3O2*4.2D-14*EXP(1300/TEMP))**0.5*RO2*0.6 	;
+{1996.} 	 CH2CLCH2O2 = CH2CLCH2OH : 	2*(KCH3O2*4.2D-14*EXP(1300/TEMP))**0.5*RO2*0.2 	;
+{1997.} 	 CH2CLCH2O2 = CLETAL : 	2*(KCH3O2*4.2D-14*EXP(1300/TEMP))**0.5*RO2*0.2 	;
+{1998.} 	 CH3CHCLO2 + HO2 = CH3CHCLOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{1999.} 	 CH3CHCLO2 + NO = CH3CHCLO + NO2 : 	KRO2NO*1.5 	;
+{2000.} 	 CH3CHCLO2 + NO3 = CH3CHCLO + NO2 : 	KRO2NO3 	;
+{2001.} 	 CH3CHCLO2 = CH3CHCLO : 	2*(K298CH3O2*5D-12)**0.5*RO2*0.60 	;
+{2002.} 	 CH3CHCLO2 = CH3CHCLOH : 	2*(K298CH3O2*5D-12)**0.5*RO2*0.20 	;
+{2003.} 	 CH3CHCLO2 = CH3COCL : 	2*(K298CH3O2*5D-12)**0.5*RO2*0.20 	;
+{2004.} 	 CHCL2CL2O2 + HO2 = CCL2CL2OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{2005.} 	 CHCL2CL2O2 + NO = CHCL2CL2O + NO2 : 	KRO2NO*1.5 	;
+{2006.} 	 CHCL2CL2O2 + NO3 = CHCL2CL2O + NO2 : 	KRO2NO3 	;
+{2007.} 	 CHCL2CL2O2 = CHCL2CL2O : 	9.20D-14*0.70*RO2 	;
+{2008.} 	 CHCL2CL2O2 = CHCL2CL2OH : 	9.20D-14*0.30*RO2 	;
+{2009.} 	 CH2CL3O2 + HO2 = CH2CL3OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{2010.} 	 CH2CL3O2 + NO = CH2CL3O + NO2 : 	KRO2NO*1.5 	;
+{2011.} 	 CH2CL3O2 + NO3 = CH2CL3O + NO2 : 	KRO2NO3 	;
+{2012.} 	 CH2CL3O2 = CH2CL3O : 	9.20D-14*0.60*RO2 	;
+{2013.} 	 CH2CL3O2 = CH2CL3OH : 	9.20D-14*0.20*RO2 	;
+{2014.} 	 CH2CL3O2 = CH2CLCOCL : 	9.20D-14*0.20*RO2 	;
+{2015.} 	 CHCL3O2 + HO2 = CHCL3OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{2016.} 	 CHCL3O2 + NO = CHCL3O + NO2 : 	KRO2NO*1.5 	;
+{2017.} 	 CHCL3O2 + NO3 = CHCL3O + NO2 : 	KRO2NO3 	;
+{2018.} 	 CHCL3O2 = CHCL2CHO : 	2.00D-12*0.20*RO2 	;
+{2019.} 	 CHCL3O2 = CHCL3O : 	2.00D-12*0.60*RO2 	;
+{2020.} 	 CHCL3O2 = CHCL3OH : 	2.00D-12*0.20*RO2 	;
+{2021.} 	 CCLNO3O2 + HO2 = CCLNO3COOH + OH : 	KRO2HO2*0.387 	;
+{2022.} 	 CCLNO3O2 + NO = CCLNO3CO + NO2 : 	KRO2NO*1.6 	;
+{2023.} 	 CCLNO3O2 + NO3 = CCLNO3CO + NO2 : 	KRO2NO3 	;
+{2024.} 	 CCLNO3O2 = CCLCONO3 : 	0.2*2E-12*RO2 	;
+{2025.} 	 CCLNO3O2 = CCLNO3CO : 	0.6*2E-12*RO2 	;
+{2026.} 	 CCLNO3O2 = CCLNO3COH : 	0.2*2E-12*RO2 	;
+{2027.} 	 CNO3CLO2 + HO2 = CNO3CLOOH + OH : 	3.30D-13*EXP(820/TEMP) 	;
+{2028.} 	 CNO3CLO2 + NO = CNO3CLO + NO2 : 	KRO2NO*2.2 	;
+{2029.} 	 CNO3CLO2 + NO3 = CNO3CLO + NO2 : 	KRO2NO3 	;
+{2030.} 	 CNO3CLO2 = CNO3CLO : 	0.6*2E-12*RO2 	;
+{2031.} 	 CNO3CLO2 = CNO3CLOH : 	0.2*2E-12*RO2 	;
+{2032.} 	 CNO3CLO2 = CNO3OCL : 	0.2*2E-12*RO2 	;
+{2033.} 	 CHOCL + NO3 = CO + CL + HNO3 : 	KNO3AL 	;
+{2034.} 	 CHOCL + OH = CO + CL : 	6.12D-12 	;
+{2035.} 	 CHOCL = HO2 + CO + CL : 	J(11) 	;
+{2036.} 	 CHCLOOA = CHCLOO : 	KDEC*0.25 	;
+{2037.} 	 CHCLOOA = HCL : 	KDEC*0.5*0.395 	;
+{2038.} 	 CHCLOOA = HO2 + CL : 	KDEC*0.5*0.395 	;
+{2039.} 	 CHCLOOA = OH + CO + CL : 	KDEC*0.355 	;
+{2040.} 	 CCLOHCH2O2 + HO2 = CCLOHCOOH : 	KRO2HO2*0.387 	;
+{2041.} 	 CCLOHCH2O2 + NO = CHCLOHCO + NO2 : 	KRO2NO*1.6 	;
+{2042.} 	 CCLOHCH2O2 + NO3 = CHCLOHCO + NO2 : 	KRO2NO3 	;
+{2043.} 	 CCLOHCH2O2 = CCLOHCHO : 	0.2*2.0D-12*RO2 	;
+{2044.} 	 CCLOHCH2O2 = CH2OHCCLOH : 	0.2*2.0D-12*RO2 	;
+{2045.} 	 CCLOHCH2O2 = CHCLOHCO : 	0.6*2.0D-12*RO2 	;
+{2046.} 	 CH2OHCCLO2 + HO2 = COHCCLOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{2047.} 	 CH2OHCCLO2 + NO = CH2OHCCLO + NO2 : 	KRO2NO*2.2 	;
+{2048.} 	 CH2OHCCLO2 + NO3 = CH2OHCCLO + NO2 : 	KRO2NO3 	;
+{2049.} 	 CH2OHCCLO2 = CH2OHCCLO : 	0.6*8.8D-13*RO2 	;
+{2050.} 	 CH2OHCCLO2 = CH2OHCCLOH : 	0.2*8.8D-13*RO2 	;
+{2051.} 	 CH2OHCCLO2 = CH2OHCOCL : 	0.2*8.8D-13*RO2 	;
+{2052.} 	 NBUTDAO2 + HO2 = NBUTDAOOH : 	KRO2HO2*0.625 	;
+{2053.} 	 NBUTDAO2 + NO = NBUTDAO + NO2 : 	KRO2NO 	;
+{2054.} 	 NBUTDAO2 + NO3 = NBUTDAO + NO2 : 	KRO2NO3 	;
+{2055.} 	 NBUTDAO2 = NBUTDAO : 	2.50D-13*0.6*RO2 	;
+{2056.} 	 NBUTDAO2 = NBUTDAOH : 	2.50D-13*0.2*RO2 	;
+{2057.} 	 NBUTDAO2 = NMVK : 	2.50D-13*0.2*RO2 	;
+{2058.} 	 NBUTDBO2 + HO2 = NBUTDBOOH : 	KRO2HO2*0.625 	;
+{2059.} 	 NBUTDBO2 + NO = NBUTDBNO3 : 	KRO2NO*0.033 	;
+{2060.} 	 NBUTDBO2 + NO = NBUTDBO + NO2 : 	KRO2NO*0.967 	;
+{2061.} 	 NBUTDBO2 + NO3 = NBUTDBO + NO2 : 	KRO2NO3 	;
+{2062.} 	 NBUTDBO2 = BUTDANO3 : 	1.30D-12*0.2*RO2 	;
+{2063.} 	 NBUTDBO2 = NBUTDBO : 	1.30D-12*0.6*RO2 	;
+{2064.} 	 NBUTDBO2 = NC3CHO : 	1.30D-12*0.2*RO2 	;
+{2065.} 	 CH2OOD = CH2OO : 	KDEC*0.24 	;
+{2066.} 	 CH2OOD = CO : 	KDEC*0.68 	;
+{2067.} 	 CH2OOD = HO2 + CO + OH : 	KDEC*0.08 	;
+{2068.} 	 ACROOA = ACROO : 	KDEC*0.24 	;
+{2069.} 	 ACROOA = C2H4 : 	KDEC*0.34 	;
+{2070.} 	 ACROOA = HO2 + CO + HCHO + CO + OH : 	KDEC*0.08 	;
+{2071.} 	 ACROOA = HO2 + CO + HCHO + HO2 : 	KDEC*0.34 	;
+{2072.} 	 BUTDAO2 + HO2 = BUTDAOOH : 	KRO2HO2*0.625 	;
+{2073.} 	 BUTDAO2 + NO = BUTDANO3 : 	KRO2NO*0.053 	;
+{2074.} 	 BUTDAO2 + NO = BUTDAO + NO2 : 	KRO2NO*0.947 	;
+{2075.} 	 BUTDAO2 + NO3 = BUTDAO + NO2 : 	KRO2NO3 	;
+{2076.} 	 BUTDAO2 = BUTDAO : 	2.00D-12*0.8*RO2 	;
+{2077.} 	 BUTDAO2 = BUTDAOH : 	2.00D-12*0.1*RO2 	;
+{2078.} 	 BUTDAO2 = HC3CHO : 	2.00D-12*0.1*RO2 	;
+{2079.} 	 BUTDBO2 + HO2 = BUTDBOOH : 	KRO2HO2*0.625 	;
+{2080.} 	 BUTDBO2 + NO = BUTDBNO3 : 	KRO2NO*0.071 	;
+{2081.} 	 BUTDBO2 + NO = BUTDBO + NO2 : 	KRO2NO*0.929 	;
+{2082.} 	 BUTDBO2 + NO3 = BUTDBO + NO2 : 	KRO2NO3 	;
+{2083.} 	 BUTDBO2 = BUTDBO : 	2.90D-12*0.8*RO2 	;
+{2084.} 	 BUTDBO2 = BUTDBOH : 	2.90D-12*0.1*RO2 	;
+{2085.} 	 BUTDBO2 = MVKOH : 	2.90D-12*0.1*RO2 	;
+{2086.} 	 BUTDCO2 + HO2 = BUTDCOOH : 	KRO2HO2*0.625 	;
+{2087.} 	 BUTDCO2 + NO = BUTDCO + NO2 : 	KRO2NO*0.947 	;
+{2088.} 	 BUTDCO2 + NO = NBUTDAOH : 	KRO2NO*0.053 	;
+{2089.} 	 BUTDCO2 + NO3 = BUTDCO + NO2 : 	KRO2NO3 	;
+{2090.} 	 BUTDCO2 = BUTDBOH : 	2.65D-12*0.1*RO2 	;
+{2091.} 	 BUTDCO2 = BUTDCO : 	2.65D-12*0.8*RO2 	;
+{2092.} 	 BUTDCO2 = HC3CCHO : 	2.65D-12*0.1*RO2 	;
+{2093.} 	 NISOPO2 + HO2 = NISOPOOH : 	KRO2HO2*0.706 	;
+{2094.} 	 NISOPO2 + NO = NISOPNO3 : 	KRO2NO*0.052 	;
+{2095.} 	 NISOPO2 + NO = NISOPO + NO2 : 	KRO2NO*0.948 	;
+{2096.} 	 NISOPO2 + NO3 = NISOPO + NO2 : 	KRO2NO3 	;
+{2097.} 	 NISOPO2 = ISOPCNO3 : 	1.30D-12*0.2*RO2 	;
+{2098.} 	 NISOPO2 = NC4CHO : 	1.30D-12*0.2*RO2 	;
+{2099.} 	 NISOPO2 = NISOPO : 	1.30D-12*0.6*RO2 	;
+{2100.} 	 CH2OOE = CH2OO : 	KDEC*0.22 	;
+{2101.} 	 CH2OOE = CO : 	KDEC*0.51 	;
+{2102.} 	 CH2OOE = HO2 + CO + OH : 	KDEC*0.27 	;
+{2103.} 	 MVK = C3H6 + CO : 	J(23) 	;
+{2104.} 	 MVK = CH3CO3 + HCHO + CO + HO2 : 	J(24) 	;
+{2105.} 	 O3 + MVK = MGLOOA + HCHO : 	8.5D-16*EXP(-1520/TEMP)*0.5 	;
+{2106.} 	 O3 + MVK = MGLYOX + CH2OOB : 	8.5D-16*EXP(-1520/TEMP)*0.5 	;
+{2107.} 	 OH + MVK = HMVKAO2 : 	2.6D-12*EXP(610/TEMP)*0.3 	;
+{2108.} 	 OH + MVK = HMVKBO2 : 	2.6D-12*EXP(610/TEMP)*0.7 	;
+{2109.} 	 MACROOA = C3H6 : 	KDEC*0.255 	;
+{2110.} 	 MACROOA = CH3CO3 + HCHO + HO2 : 	KDEC*0.255 	;
+{2111.} 	 MACROOA = MACROO : 	KDEC*0.22 	;
+{2112.} 	 MACROOA = OH + CO + CH3CO3 + HCHO : 	KDEC*0.27 	;
+{2113.} 	 MVKOOA = C3H6 : 	KDEC*0.255 	;
+{2114.} 	 MVKOOA = CH3O2 + HCHO + CO + HO2 : 	KDEC*0.255 	;
+{2115.} 	 MVKOOA = MVKOO : 	KDEC*0.22 	;
+{2116.} 	 MVKOOA = OH + MVKO2 : 	KDEC*0.27 	;
+{2117.} 	 ISOPAO2 + HO2 = ISOPAOOH : 	KRO2HO2*0.706 	;
+{2118.} 	 ISOPAO2 + NO = ISOPANO3 : 	KRO2NO*0.100 	;
+{2119.} 	 ISOPAO2 + NO = ISOPAO + NO2 : 	KRO2NO*0.900 	;
+{2120.} 	 ISOPAO2 + NO3 = ISOPAO + NO2 : 	KRO2NO3 	;
+{2121.} 	 ISOPAO2 = HC4ACHO : 	2.40D-12*0.1*RO2 	;
+{2122.} 	 ISOPAO2 = ISOPAO : 	2.40D-12*0.8*RO2 	;
+{2123.} 	 ISOPAO2 = ISOPAOH : 	2.40D-12*0.1*RO2 	;
+{2124.} 	 ISOPBO2 + HO2 = ISOPBOOH : 	KRO2HO2*0.706 	;
+{2125.} 	 ISOPBO2 + NO = ISOPBNO3 : 	KRO2NO*0.066 	;
+{2126.} 	 ISOPBO2 + NO = ISOPBO + NO2 : 	KRO2NO*0.934 	;
+{2127.} 	 ISOPBO2 + NO3 = ISOPBO + NO2 : 	KRO2NO3 	;
+{2128.} 	 ISOPBO2 = ISOPBO : 	8.00D-13*0.8*RO2 	;
+{2129.} 	 ISOPBO2 = ISOPBOH : 	8.00D-13*0.2*RO2 	;
+{2130.} 	 ISOPCO2 + HO2 = ISOPCOOH : 	KRO2HO2*0.706 	;
+{2131.} 	 ISOPCO2 + NO = ISOPCNO3 : 	KRO2NO*0.100 	;
+{2132.} 	 ISOPCO2 + NO = ISOPCO + NO2 : 	KRO2NO*0.900 	;
+{2133.} 	 ISOPCO2 + NO3 = ISOPCO + NO2 : 	KRO2NO3 	;
+{2134.} 	 ISOPCO2 = HC4CCHO : 	2.00D-12*0.1*RO2 	;
+{2135.} 	 ISOPCO2 = ISOPAOH : 	2.00D-12*0.1*RO2 	;
+{2136.} 	 ISOPCO2 = ISOPCO : 	2.00D-12*0.8*RO2 	;
+{2137.} 	 ISOPDO2 + HO2 = ISOPDOOH : 	KRO2HO2*0.706 	;
+{2138.} 	 ISOPDO2 + NO = ISOPDNO3 : 	KRO2NO*0.134 	;
+{2139.} 	 ISOPDO2 + NO = ISOPDO + NO2 : 	KRO2NO*0.866 	;
+{2140.} 	 ISOPDO2 + NO3 = ISOPDO + NO2 : 	KRO2NO3 	;
+{2141.} 	 ISOPDO2 = HCOC5 : 	2.90D-12*0.1*RO2 	;
+{2142.} 	 ISOPDO2 = ISOPDO : 	2.90D-12*0.8*RO2 	;
+{2143.} 	 ISOPDO2 = ISOPDOH : 	2.90D-12*0.1*RO2 	;
+{2144.} 	 CHOOCH2O2 + HO2 = CHOOCH2OOH : 	KRO2HO2*0.387 	;
+{2145.} 	 CHOOCH2O2 + NO = CHOOCH2NO3 : 	KRO2NO*0.009 	;
+{2146.} 	 CHOOCH2O2 + NO = NO2 + CHOOCH2O : 	KRO2NO*0.991 	;
+{2147.} 	 CHOOCH2O2 + NO3 = CHOOCH2O + NO2 : 	KRO2NO3 	;
+{2148.} 	 CHOOCH2O2 = CHOOCH2O : 	2.00D-12*0.6*RO2 	;
+{2149.} 	 CHOOCH2O2 = CHOOCH2OH : 	2.00D-12*0.2*RO2 	;
+{2150.} 	 CHOOCH2O2 = CHOOCHO : 	2.00D-12*0.2*RO2 	;
+{2151.} 	 METHACETO2 + HO2 = METACETHO : 	KRO2HO2*0.520*0.4 	;
+{2152.} 	 METHACETO2 + HO2 = METACETO2H : 	KRO2HO2*0.520*0.6 	;
+{2153.} 	 METHACETO2 + NO = METACETNO3 : 	KRO2NO*0.019 	;
+{2154.} 	 METHACETO2 + NO = METHACETO + NO2 : 	KRO2NO*0.981 	;
+{2155.} 	 METHACETO2 + NO3 = METHACETO + NO2 : 	KRO2NO3 	;
+{2156.} 	 METHACETO2 = METACETHO : 	2.00D-12*0.2*RO2 	;
+{2157.} 	 METHACETO2 = METACETOH : 	2.00D-12*0.2*RO2 	;
+{2158.} 	 METHACETO2 = METHACETO : 	2.00D-12*0.6*RO2 	;
+{2159.} 	 MOCOCH2O2 + HO2 = MOCOCH2OOH : 	KRO2HO2*0.520 	;
+{2160.} 	 MOCOCH2O2 + NO = MOCOCH2O + NO2 : 	KRO2NO 	;
+{2161.} 	 MOCOCH2O2 + NO3 = MOCOCH2O + NO2 : 	KRO2NO3 	;
+{2162.} 	 MOCOCH2O2 = MOCOCH2O : 	2.00D-12*0.6*RO2 	;
+{2163.} 	 MOCOCH2O2 = MOXCOCH2OH : 	2.00D-12*0.2*RO2 	;
+{2164.} 	 MOCOCH2O2 = MOXYCOCHO : 	2.00D-12*0.2*RO2 	;
+{2165.} 	 ACETC2H4O2 + HO2 = ACEC2H4OOH : 	KRO2HO2*0.625 	;
+{2166.} 	 ACETC2H4O2 + NO = ACEC2H4NO3 : 	KRO2NO*0.033 	;
+{2167.} 	 ACETC2H4O2 + NO = ACETC2H4O + NO2 : 	KRO2NO*0.967 	;
+{2168.} 	 ACETC2H4O2 + NO3 = ACETC2H4O + NO2 : 	KRO2NO3 	;
+{2169.} 	 ACETC2H4O2 = ACETC2H4O : 	1.30D-12*0.6*RO2 	;
+{2170.} 	 ACETC2H4O2 = ACETETCHO : 	1.30D-12*0.2*RO2 	;
+{2171.} 	 ACETC2H4O2 = ETACETOH : 	1.30D-12*0.2*RO2 	;
+{2172.} 	 EOCOCH2O2 + HO2 = EOCOCH2OOH : 	KRO2HO2*0.625 	;
+{2173.} 	 EOCOCH2O2 + NO = EOCOCH2O + NO2 : 	KRO2NO 	;
+{2174.} 	 EOCOCH2O2 + NO3 = EOCOCH2O + NO2 : 	KRO2NO3 	;
+{2175.} 	 EOCOCH2O2 = EOCOCH2O : 	2.00D-12*0.60*RO2 	;
+{2176.} 	 EOCOCH2O2 = EOCOCHO : 	2.00D-12*0.20*RO2 	;
+{2177.} 	 EOCOCH2O2 = EOX2COMEOH : 	2.00D-12*0.20*RO2 	;
+{2178.} 	 ETHACETO2 + HO2 = ETHACETOOH : 	KRO2HO2*0.625*0.6 	;
+{2179.} 	 ETHACETO2 + HO2 = METHCOACET : 	KRO2HO2*0.625*0.4 	;
+{2180.} 	 ETHACETO2 + NO = ETACETNO3 : 	KRO2NO*0.083 	;
+{2181.} 	 ETHACETO2 + NO = ETHACETO + NO2 : 	KRO2NO*0.917 	;
+{2182.} 	 ETHACETO2 + NO3 = ETHACETO + NO2 : 	KRO2NO3 	;
+{2183.} 	 ETHACETO2 = ETHACETO : 	2.00D-12*0.6*RO2 	;
+{2184.} 	 ETHACETO2 = ETHACETOH : 	2.00D-12*0.2*RO2 	;
+{2185.} 	 ETHACETO2 = METHCOACET : 	2.00D-12*0.2*RO2 	;
+{2186.} 	 NPROACEAO2 + HO2 = NPRACAOOH : 	KRO2HO2*0.706 	;
+{2187.} 	 NPROACEAO2 + NO = NPRACANO3 : 	KRO2NO*0.129 	;
+{2188.} 	 NPROACEAO2 + NO = NPROACEAO + NO2 : 	KRO2NO*0.871 	;
+{2189.} 	 NPROACEAO2 + NO3 = NPROACEAO + NO2 : 	KRO2NO3 	;
+{2190.} 	 NPROACEAO2 = ACEPROPONE : 	2.50D-13*0.2*RO2 	;
+{2191.} 	 NPROACEAO2 = NPRACAOH : 	2.50D-13*0.2*RO2 	;
+{2192.} 	 NPROACEAO2 = NPROACEAO : 	2.50D-13*0.6*RO2 	;
+{2193.} 	 NPROACEBO2 + HO2 = NPRACBOOH : 	KRO2HO2*0.706 	;
+{2194.} 	 NPROACEBO2 + NO = NPRACBNO3 : 	KRO2NO*0.129 	;
+{2195.} 	 NPROACEBO2 + NO = NPROACEBO + NO2 : 	KRO2NO*0.871 	;
+{2196.} 	 NPROACEBO2 + NO3 = NPROACEBO + NO2 : 	KRO2NO3 	;
+{2197.} 	 NPROACEBO2 = ACETCOC2H5 : 	8.80D-13*0.2*RO2 	;
+{2198.} 	 NPROACEBO2 = NPRACBOH : 	8.80D-13*0.2*RO2 	;
+{2199.} 	 NPROACEBO2 = NPROACEBO : 	8.80D-13*0.6*RO2 	;
+{2200.} 	 NPROACECO2 + HO2 = NPRACCOOH : 	KRO2HO2*0.706 	;
+{2201.} 	 NPROACECO2 + NO = NPRACCNO3 : 	KRO2NO*0.052 	;
+{2202.} 	 NPROACECO2 + NO = NPROACECO + NO2 : 	KRO2NO*0.948 	;
+{2203.} 	 NPROACECO2 + NO3 = NPROACECO + NO2 : 	KRO2NO3 	;
+{2204.} 	 NPROACECO2 = ACEC2CHO : 	1.30D-12*0.2*RO2 	;
+{2205.} 	 NPROACECO2 = NPRACCOH : 	1.30D-12*0.2*RO2 	;
+{2206.} 	 NPROACECO2 = NPROACECO : 	1.30D-12*0.6*RO2 	;
+{2207.} 	 IPRACBO2 + HO2 = IPRACBOOH : 	KRO2HO2*0.706 	;
+{2208.} 	 IPRACBO2 + NO = IPRACBNO3 : 	KRO2NO*0.052 	;
+{2209.} 	 IPRACBO2 + NO = IPRACBO + NO2 : 	KRO2NO*0.948 	;
+{2210.} 	 IPRACBO2 + NO3 = IPRACBO + NO2 : 	KRO2NO3 	;
+{2211.} 	 IPRACBO2 = IPRACBCHO : 	1.30D-12*0.2*RO2 	;
+{2212.} 	 IPRACBO2 = IPRACBO : 	1.30D-12*0.6*RO2 	;
+{2213.} 	 IPRACBO2 = IPRACBOH : 	1.30D-12*0.2*RO2 	;
+{2214.} 	 IPROACETO2 + HO2 = IPRACOOH : 	KRO2HO2*0.706 	;
+{2215.} 	 IPROACETO2 + NO = IPRACNO3 : 	KRO2NO*0.039 	;
+{2216.} 	 IPROACETO2 + NO = IPROACETO + NO2 : 	KRO2NO*0.961 	;
+{2217.} 	 IPROACETO2 + NO3 = IPROACETO + NO2 : 	KRO2NO3 	;
+{2218.} 	 IPROACETO2 = IPRACOH : 	2.00D-12*0.3*RO2 	;
+{2219.} 	 IPROACETO2 = IPROACETO : 	2.00D-12*0.7*RO2 	;
+{2220.} 	 NBUACETAO2 + HO2 = NBUACAOOH : 	KRO2HO2*0.770 	;
+{2221.} 	 NBUACETAO2 + NO = NBUACANO3 : 	KRO2NO*0.195 	;
+{2222.} 	 NBUACETAO2 + NO = NBUACETAO + NO2 : 	KRO2NO*0.805 	;
+{2223.} 	 NBUACETAO2 + NO3 = NBUACETAO + NO2 : 	KRO2NO3 	;
+{2224.} 	 NBUACETAO2 = ACEBUTONE : 	2.50D-13*0.2*RO2 	;
+{2225.} 	 NBUACETAO2 = NBUACAOH : 	2.50D-13*0.2*RO2 	;
+{2226.} 	 NBUACETAO2 = NBUACETAO : 	2.50D-13*0.6*RO2 	;
+{2227.} 	 NBUACETBO2 + HO2 = NBUACBOOH : 	KRO2HO2*0.770 	;
+{2228.} 	 NBUACETBO2 + NO = NBUACBNO3 : 	KRO2NO*0.195 	;
+{2229.} 	 NBUACETBO2 + NO = NBUACETBO + NO2 : 	KRO2NO*0.805 	;
+{2230.} 	 NBUACETBO2 + NO3 = NBUACETBO + NO2 : 	KRO2NO3 	;
+{2231.} 	 NBUACETBO2 = ACEBUTBONE : 	2.50D-13*0.2*RO2 	;
+{2232.} 	 NBUACETBO2 = NBUACBOH : 	2.50D-13*0.2*RO2 	;
+{2233.} 	 NBUACETBO2 = NBUACETBO : 	2.50D-13*0.6*RO2 	;
+{2234.} 	 NBUACETCO2 + HO2 = NBUACCOOH : 	KRO2HO2*0.770 	;
+{2235.} 	 NBUACETCO2 + NO = NBUACCNO3 : 	KRO2NO*0.195 	;
+{2236.} 	 NBUACETCO2 + NO = NBUACETCO + NO2 : 	KRO2NO*0.805 	;
+{2237.} 	 NBUACETCO2 + NO3 = NBUACETCO + NO2 : 	KRO2NO3 	;
+{2238.} 	 NBUACETCO2 = ACETCOC3H7 : 	8.80D-13*0.2*RO2 	;
+{2239.} 	 NBUACETCO2 = NBUACCOH : 	8.80D-13*0.2*RO2 	;
+{2240.} 	 NBUACETCO2 = NBUACETCO : 	8.80D-13*0.6*RO2 	;
+{2241.} 	 SBUACETAO2 + HO2 = SBUACAOOH : 	KRO2HO2*0.770 	;
+{2242.} 	 SBUACETAO2 + NO = SBUACANO3 : 	KRO2NO*0.058 	;
+{2243.} 	 SBUACETAO2 + NO = SBUACETAO + NO2 : 	KRO2NO*0.942 	;
+{2244.} 	 SBUACETAO2 + NO3 = SBUACETAO + NO2 : 	KRO2NO3 	;
+{2245.} 	 SBUACETAO2 = SBUACAOH : 	9.20D-14*0.3*RO2 	;
+{2246.} 	 SBUACETAO2 = SBUACETAO : 	9.20D-14*0.7*RO2 	;
+{2247.} 	 SBUACETBO2 + HO2 = SBUACBOOH : 	KRO2HO2*0.770 	;
+{2248.} 	 SBUACETBO2 + NO = SBUACBNO3 : 	KRO2NO*0.195 	;
+{2249.} 	 SBUACETBO2 + NO = SBUACETBO + NO2 : 	KRO2NO*0.805 	;
+{2250.} 	 SBUACETBO2 + NO3 = SBUACETBO + NO2 : 	KRO2NO3 	;
+{2251.} 	 SBUACETBO2 = SBUACBOH : 	2.50D-13*0.2*RO2 	;
+{2252.} 	 SBUACETBO2 = SBUACEONE : 	2.50D-13*0.2*RO2 	;
+{2253.} 	 SBUACETBO2 = SBUACETBO : 	2.50D-13*0.6*RO2 	;
+{2254.} 	 MCOOTBO2 + HO2 = MCOOTBOOH : 	KRO2HO2*0.770 	;
+{2255.} 	 MCOOTBO2 + NO = MCOOTBNO3 : 	KRO2NO*0.078 	;
+{2256.} 	 MCOOTBO2 + NO = MCOOTBO + NO2 : 	KRO2NO*0.922 	;
+{2257.} 	 MCOOTBO2 + NO3 = MCOOTBO + NO2 : 	KRO2NO3 	;
+{2258.} 	 MCOOTBO2 = MCOOTBO : 	1.30D-12*0.6*RO2 	;
+{2259.} 	 MCOOTBO2 = TBUACCO : 	1.30D-12*0.2*RO2 	;
+{2260.} 	 MCOOTBO2 = TBUACOH : 	1.30D-12*0.2*RO2 	;
+{2261.} 	 TBOCOCH2O2 + HO2 = BOCOCH2OOH : 	KRO2HO2*0.770 	;
+{2262.} 	 TBOCOCH2O2 + NO = TBOCOCH2O + NO2 : 	KRO2NO 	;
+{2263.} 	 TBOCOCH2O2 + NO3 = TBOCOCH2O + NO2 : 	KRO2NO3 	;
+{2264.} 	 TBOCOCH2O2 = TBOCOCH2O : 	2.00D-12*0.60*RO2 	;
+{2265.} 	 TBOCOCH2O2 = TBOCOCH2OH : 	2.00D-12*0.20*RO2 	;
+{2266.} 	 TBOCOCH2O2 = TBOCOCHO : 	2.00D-12*0.20*RO2 	;
+{2267.} 	 CH3OCH2O2 + HO2 = CH3OCH2OOH : 	KRO2HO2*0.387*0.6 	;
+{2268.} 	 CH3OCH2O2 + HO2 = CH3OCHO : 	KRO2HO2*0.387*0.4 	;
+{2269.} 	 CH3OCH2O2 + NO = CH3OCH2NO3 : 	KRO2NO*0.009 	;
+{2270.} 	 CH3OCH2O2 + NO = CH3OCH2O + NO2 : 	KRO2NO*0.991 	;
+{2271.} 	 CH3OCH2O2 + NO3 = CH3OCH2O + NO2 : 	KRO2NO3 	;
+{2272.} 	 CH3OCH2O2 = CH3OCH2O : 	2*(K298CH3O2*2.1D-12)**0.5*RO2*0.6 	;
+{2273.} 	 CH3OCH2O2 = CH3OCH2OH : 	2*(K298CH3O2*2.1D-12)**0.5*RO2*0.2 	;
+{2274.} 	 CH3OCH2O2 = CH3OCHO : 	2*(K298CH3O2*2.1D-12)**0.5*RO2*0.2 	;
+{2275.} 	 DIETETO2 + HO2 = DIETETOOH : 	KRO2HO2*0.625*0.6 	;
+{2276.} 	 DIETETO2 + HO2 = ETHACET : 	KRO2HO2*0.625*0.4 	;
+{2277.} 	 DIETETO2 + NO = DIETETNO3 : 	KRO2NO*0.083 	;
+{2278.} 	 DIETETO2 + NO = DIETETO + NO2 : 	KRO2NO*0.917 	;
+{2279.} 	 DIETETO2 + NO3 = DIETETO + NO2 : 	KRO2NO3 	;
+{2280.} 	 DIETETO2 = DIETETO : 	8.80D-13*0.6*RO2 	;
+{2281.} 	 DIETETO2 = DIETETOH : 	8.80D-13*0.2*RO2 	;
+{2282.} 	 DIETETO2 = ETHACET : 	8.80D-13*0.2*RO2 	;
+{2283.} 	 ETOC2O2 + HO2 = ETOC2OOH : 	KRO2HO2*0.625 	;
+{2284.} 	 ETOC2O2 + NO = ETOC2NO3 : 	KRO2NO*0.033 	;
+{2285.} 	 ETOC2O2 + NO = ETOC2O + NO2 : 	KRO2NO*0.967 	;
+{2286.} 	 ETOC2O2 + NO3 = ETOC2O + NO2 : 	KRO2NO3 	;
+{2287.} 	 ETOC2O2 = EOX2EOL : 	2.00D-12*0.2*RO2 	;
+{2288.} 	 ETOC2O2 = EOX2ETCHO : 	2.00D-12*0.2*RO2 	;
+{2289.} 	 ETOC2O2 = ETOC2O : 	2.00D-12*0.6*RO2 	;
+{2290.} 	 MTBEAO2 + HO2 = MTBEACHO : 	KRO2HO2*0.706*0.4 	;
+{2291.} 	 MTBEAO2 + HO2 = MTBEAOOH : 	KRO2HO2*0.706*0.6 	;
+{2292.} 	 MTBEAO2 + NO = MTBEANO3 : 	KRO2NO*0.052 	;
+{2293.} 	 MTBEAO2 + NO = MTBEAO + NO2 : 	KRO2NO*0.948 	;
+{2294.} 	 MTBEAO2 + NO3 = MTBEAO + NO2 : 	KRO2NO3 	;
+{2295.} 	 MTBEAO2 = MTBEACHO : 	2.00D-12*0.2*RO2 	;
+{2296.} 	 MTBEAO2 = MTBEAO : 	2.00D-12*0.6*RO2 	;
+{2297.} 	 MTBEAO2 = MTBEAOH : 	2.00D-12*0.2*RO2 	;
+{2298.} 	 MTBEBO2 + HO2 = MTBEBOOH : 	KRO2HO2*0.706 	;
+{2299.} 	 MTBEBO2 + NO = MTBEBNO3 : 	KRO2NO*0.052 	;
+{2300.} 	 MTBEBO2 + NO = MTBEBO + NO2 : 	KRO2NO*0.948 	;
+{2301.} 	 MTBEBO2 + NO3 = MTBEBO + NO2 : 	KRO2NO3 	;
+{2302.} 	 MTBEBO2 = MTBEBCHO : 	1.30D-12*0.2*RO2 	;
+{2303.} 	 MTBEBO2 = MTBEBO : 	1.30D-12*0.6*RO2 	;
+{2304.} 	 MTBEBO2 = MTBEBOH : 	1.30D-12*0.2*RO2 	;
+{2305.} 	 DIIPRETO2 + HO2 = DIIPRETOOH : 	KRO2HO2*0.770 	;
+{2306.} 	 DIIPRETO2 + NO = DIIPRETNO3 : 	KRO2NO*0.059 	;
+{2307.} 	 DIIPRETO2 + NO = DIIPRETO + NO2 : 	KRO2NO*0.941 	;
+{2308.} 	 DIIPRETO2 + NO3 = DIIPRETO + NO2 : 	KRO2NO3 	;
+{2309.} 	 DIIPRETO2 = DIIPRETO : 	9.20D-14*0.7*RO2 	;
+{2310.} 	 DIIPRETO2 = DIIPRETOH : 	9.20D-14*0.3*RO2 	;
+{2311.} 	 IPROMC2O2 + HO2 = IPROMC2OOH : 	KRO2HO2*0.770 	;
+{2312.} 	 IPROMC2O2 + NO = IPROMC2NO3 : 	KRO2NO*0.078 	;
+{2313.} 	 IPROMC2O2 + NO = IPROMC2O + NO2 : 	KRO2NO*0.922 	;
+{2314.} 	 IPROMC2O2 + NO3 = IPROMC2O + NO2 : 	KRO2NO3 	;
+{2315.} 	 IPROMC2O2 = IPROMC2O : 	2.00D-12*0.6*RO2 	;
+{2316.} 	 IPROMC2O2 = IPROMC2OH : 	2.00D-12*0.2*RO2 	;
+{2317.} 	 IPROMC2O2 = IPROMCCHO : 	2.00D-12*0.2*RO2 	;
+{2318.} 	 ETBEAO2 + HO2 = ETBEAOOH : 	KRO2HO2*0.770 	;
+{2319.} 	 ETBEAO2 + NO = ETBEANO3 : 	KRO2NO*0.078 	;
+{2320.} 	 ETBEAO2 + NO = ETBEAO + NO2 : 	KRO2NO*0.922 	;
+{2321.} 	 ETBEAO2 + NO3 = ETBEAO + NO2 : 	KRO2NO3 	;
+{2322.} 	 ETBEAO2 = ETBEACHO : 	1.30D-12*0.2*RO2 	;
+{2323.} 	 ETBEAO2 = ETBEAO : 	1.30D-12*0.6*RO2 	;
+{2324.} 	 ETBEAO2 = ETBEAOH : 	1.30D-12*0.2*RO2 	;
+{2325.} 	 ETBEBO2 + HO2 = ETBEBOOH : 	KRO2HO2*0.770 	;
+{2326.} 	 ETBEBO2 + NO = ETBEBNO3 : 	KRO2NO*0.195 	;
+{2327.} 	 ETBEBO2 + NO = ETBEBO + NO2 : 	KRO2NO*0.805 	;
+{2328.} 	 ETBEBO2 + NO3 = ETBEBO + NO2 : 	KRO2NO3 	;
+{2329.} 	 ETBEBO2 = ETBEBO : 	2.00D-12*0.6*RO2 	;
+{2330.} 	 ETBEBO2 = ETBEBOH : 	2.00D-12*0.2*RO2 	;
+{2331.} 	 ETBEBO2 = TBUACET : 	2.00D-12*0.2*RO2 	;
+{2332.} 	 ETBECO2 + HO2 = ETBECOOH : 	KRO2HO2*0.770 	;
+{2333.} 	 ETBECO2 + NO = ETBECNO3 : 	KRO2NO*0.078 	;
+{2334.} 	 ETBECO2 + NO = ETBECO + NO2 : 	KRO2NO*0.922 	;
+{2335.} 	 ETBECO2 + NO3 = ETBECO + NO2 : 	KRO2NO3 	;
+{2336.} 	 ETBECO2 = ETBECCHO : 	2.00D-12*0.2*RO2 	;
+{2337.} 	 ETBECO2 = ETBECO : 	2.00D-12*0.6*RO2 	;
+{2338.} 	 ETBECO2 = ETBECOH : 	2.00D-12*0.2*RO2 	;
+{2339.} 	 MO2EOLAO2 + HO2 = MO2EOLAOOH : 	KRO2HO2*0.520*0.6 	;
+{2340.} 	 MO2EOLAO2 + HO2 = MOXCOCH2OH : 	KRO2HO2*0.520*0.4 	;
+{2341.} 	 MO2EOLAO2 + NO = MO2EOLANO3 : 	KRO2NO*0.023 	;
+{2342.} 	 MO2EOLAO2 + NO = MO2EOLAO + NO2 : 	KRO2NO*0.977 	;
+{2343.} 	 MO2EOLAO2 + NO3 = MO2EOLAO + NO2 : 	KRO2NO3 	;
+{2344.} 	 MO2EOLAO2 = MO2EOLA2OH : 	8.80D-13*0.2*RO2 	;
+{2345.} 	 MO2EOLAO2 = MO2EOLAO : 	8.80D-13*0.6*RO2 	;
+{2346.} 	 MO2EOLAO2 = MOXCOCH2OH : 	8.80D-13*0.2*RO2 	;
+{2347.} 	 MO2EOLBO2 + HO2 = ETOHOCHO : 	KRO2HO2*0.520*0.4 	;
+{2348.} 	 MO2EOLBO2 + HO2 = MO2EOLBOOH : 	KRO2HO2*0.520*0.6 	;
+{2349.} 	 MO2EOLBO2 + NO = MO2EOLBNO3 : 	KRO2NO*0.019 	;
+{2350.} 	 MO2EOLBO2 + NO = MO2EOLBO + NO2 : 	KRO2NO*0.981 	;
+{2351.} 	 MO2EOLBO2 + NO3 = MO2EOLBO + NO2 : 	KRO2NO3 	;
+{2352.} 	 MO2EOLBO2 = ETOHOCHO : 	8.80D-13*0.2*RO2 	;
+{2353.} 	 MO2EOLBO2 = MO2EOLB2OH : 	8.80D-13*0.2*RO2 	;
+{2354.} 	 MO2EOLBO2 = MO2EOLBO : 	8.80D-13*0.6*RO2 	;
+{2355.} 	 MEMOXYCHO + NO3 = HNO3 + MEMOXYCO3 : 	KNO3AL*2.4 	;
+{2356.} 	 MEMOXYCHO + OH = MEMOXYCO3 : 	2.56D-11 	;
+{2357.} 	 MEMOXYCHO = HO2 + CO + CH3OCH2O2 : 	J(15) 	;
+{2358.} 	 EOX2EOLAO2 + HO2 = EOX2COMEOH : 	KRO2HO2*0.625*0.4 	;
+{2359.} 	 EOX2EOLAO2 + HO2 = EOX2OLAOOH : 	KRO2HO2*0.625*0.6 	;
+{2360.} 	 EOX2EOLAO2 + NO = EOX2EOLAO + NO2 : 	KRO2NO*0.959 	;
+{2361.} 	 EOX2EOLAO2 + NO = EOX2OLANO3 : 	KRO2NO*0.041 	;
+{2362.} 	 EOX2EOLAO2 + NO3 = EOX2EOLAO + NO2 : 	KRO2NO3 	;
+{2363.} 	 EOX2EOLAO2 = EOX2COMEOH : 	8.80D-13*0.2*RO2 	;
+{2364.} 	 EOX2EOLAO2 = EOX2EOLAO : 	8.80D-13*0.6*RO2 	;
+{2365.} 	 EOX2EOLAO2 = EOX2ETA2OH : 	8.80D-13*0.2*RO2 	;
+{2366.} 	 EOX2EOLBO2 + HO2 = EOX2OLBOOH : 	KRO2HO2*0.625*0.6 	;
+{2367.} 	 EOX2EOLBO2 + HO2 = ETACETOH : 	KRO2HO2*0.625*0.4 	;
+{2368.} 	 EOX2EOLBO2 + NO = EOX2EOLBO + NO2 : 	KRO2NO*0.917 	;
+{2369.} 	 EOX2EOLBO2 + NO = EOX2OLBNO3 : 	KRO2NO*0.083 	;
+{2370.} 	 EOX2EOLBO2 + NO3 = EOX2EOLBO + NO2 : 	KRO2NO3 	;
+{2371.} 	 EOX2EOLBO2 = EOX2EOLBO : 	8.80D-13*0.6*RO2 	;
+{2372.} 	 EOX2EOLBO2 = EOX2ETB2OH : 	8.80D-13*0.2*RO2 	;
+{2373.} 	 EOX2EOLBO2 = ETACETOH : 	8.80D-13*0.2*RO2 	;
+{2374.} 	 EOX2ETCHO + NO3 = HNO3 + EOX2MECO3 : 	KNO3AL*4.0 	;
+{2375.} 	 EOX2ETCHO + OH = EOX2MECO3 : 	3.00D-11 	;
+{2376.} 	 EOX2ETCHO = HO2 + CO + ETOMEO2 : 	J(15) 	;
+{2377.} 	 PR2OHMOXO2 + HO2 = ETOHCO2M : 	KRO2HO2*0.625*0.4 	;
+{2378.} 	 PR2OHMOXO2 + HO2 = PR2OHMOOOH : 	KRO2HO2*0.625*0.6 	;
+{2379.} 	 PR2OHMOXO2 + NO = PR2OHMONO3 : 	KRO2NO*0.041 	;
+{2380.} 	 PR2OHMOXO2 + NO = PR2OHMOXO + NO2 : 	KRO2NO*0.959 	;
+{2381.} 	 PR2OHMOXO2 + NO3 = PR2OHMOXO + NO2 : 	KRO2NO3 	;
+{2382.} 	 PR2OHMOXO2 = ETOHCO2M : 	8.80D-13*0.2*RO2 	;
+{2383.} 	 PR2OHMOXO2 = PR2OHMOXO : 	8.80D-13*0.6*RO2 	;
+{2384.} 	 PR2OHMOXO2 = PROH2MOX : 	8.80D-13*0.2*RO2 	;
+{2385.} 	 H2C3OCO2 + HO2 = H2C3OCOOH : 	KRO2HO2*0.625*0.60 	;
+{2386.} 	 H2C3OCO2 + HO2 = PROL2FORM : 	KRO2HO2*0.625*0.40 	;
+{2387.} 	 H2C3OCO2 + NO = H2C3OCNO3 : 	KRO2NO*0.033 	;
+{2388.} 	 H2C3OCO2 + NO = H2C3OCO + NO2 : 	KRO2NO*0.967 	;
+{2389.} 	 H2C3OCO2 + NO3 = H2C3OCO + NO2 : 	KRO2NO3 	;
+{2390.} 	 H2C3OCO2 = H2C3OCO : 	2.00D-12*0.6*RO2 	;
+{2391.} 	 H2C3OCO2 = H2C3OCOH : 	2.00D-12*0.2*RO2 	;
+{2392.} 	 H2C3OCO2 = PROL2FORM : 	2.00D-12*0.2*RO2 	;
+{2393.} 	 PRONEMOX + OH = PRONEMOXO2 : 	4.87D-12 	;
+{2394.} 	 PRONEMOX = CH3CO3 + CH3OCH2O2 : 	J(22) 	;
+{2395.} 	 BOX2EOHAO2 + HO2 = BOX2OHAOOH : 	KRO2HO2*0.770*0.6 	;
+{2396.} 	 BOX2EOHAO2 + HO2 = PRCOOETOH : 	KRO2HO2*0.770*0.4 	;
+{2397.} 	 BOX2EOHAO2 + NO = BOX2EOHAO + NO2 : 	KRO2NO*0.805 	;
+{2398.} 	 BOX2EOHAO2 + NO = BOXEOHANO3 : 	KRO2NO*0.195 	;
+{2399.} 	 BOX2EOHAO2 + NO3 = BOX2EOHAO + NO2 : 	KRO2NO3 	;
+{2400.} 	 BOX2EOHAO2 = BOX2EOHAO : 	8.80D-13*0.6*RO2 	;
+{2401.} 	 BOX2EOHAO2 = BOXOHETOH : 	8.80D-13*0.2*RO2 	;
+{2402.} 	 BOX2EOHAO2 = PRCOOETOH : 	8.80D-13*0.2*RO2 	;
+{2403.} 	 BOX2EOHBO2 + HO2 = BOX2COMOH : 	KRO2HO2*0.770*0.4 	;
+{2404.} 	 BOX2EOHBO2 + HO2 = BOX2OHBOOH : 	KRO2HO2*0.770*0.6 	;
+{2405.} 	 BOX2EOHBO2 + NO = BOX2EOHBO + NO2 : 	KRO2NO*0.903 	;
+{2406.} 	 BOX2EOHBO2 + NO = BOXEOHBNO3 : 	KRO2NO*0.097 	;
+{2407.} 	 BOX2EOHBO2 + NO3 = BOX2EOHBO + NO2 : 	KRO2NO3 	;
+{2408.} 	 BOX2EOHBO2 = BOX2COMOH : 	8.80D-13*0.2*RO2 	;
+{2409.} 	 BOX2EOHBO2 = BOX2E2OH : 	8.80D-13*0.2*RO2 	;
+{2410.} 	 BOX2EOHBO2 = BOX2EOHBO : 	8.80D-13*0.6*RO2 	;
+{2411.} 	 BOX2ECHO + NO3 = BOXMCO3 + HNO3 : 	KNO3AL*5.5 	;
+{2412.} 	 BOX2ECHO + OH = BOXMCO3 : 	3.39D-11 	;
+{2413.} 	 BOX2ECHO = HO2 + CO + BOX2MO2 : 	J(15) 	;
+{2414.} 	 BOXPROLAO2 + HO2 = BOXPOLAOOH : 	KRO2HO2*0.820*0.6 	;
+{2415.} 	 BOXPROLAO2 + HO2 = PRCOOPROL : 	KRO2HO2*0.820*0.4 	;
+{2416.} 	 BOXPROLAO2 + NO = BOXPOLANO3 : 	KRO2NO*0.278 	;
+{2417.} 	 BOXPROLAO2 + NO = BOXPROLAO + NO2 : 	KRO2NO*0.722 	;
+{2418.} 	 BOXPROLAO2 + NO3 = BOXPROLAO + NO2 : 	KRO2NO3 	;
+{2419.} 	 BOXPROLAO2 = BOXOHPROL : 	8.80D-13*0.2*RO2 	;
+{2420.} 	 BOXPROLAO2 = BOXPROLAO : 	8.80D-13*0.6*RO2 	;
+{2421.} 	 BOXPROLAO2 = PRCOOPROL : 	8.80D-13*0.2*RO2 	;
+{2422.} 	 BOXPROLBO2 + HO2 = BOXCOEOL : 	KRO2HO2*0.820*0.4 	;
+{2423.} 	 BOXPROLBO2 + HO2 = BOXPOLBOOH : 	KRO2HO2*0.820*0.6 	;
+{2424.} 	 BOXPROLBO2 + NO = BOXPOLBNO3 : 	KRO2NO*0.139 	;
+{2425.} 	 BOXPROLBO2 + NO = BOXPROLBO + NO2 : 	KRO2NO*0.861 	;
+{2426.} 	 BOXPROLBO2 + NO3 = BOXPROLBO + NO2 : 	KRO2NO3 	;
+{2427.} 	 BOXPROLBO2 = BOXCOEOL : 	8.80D-13*0.2*RO2 	;
+{2428.} 	 BOXPROLBO2 = BOXPR2OH : 	8.80D-13*0.2*RO2 	;
+{2429.} 	 BOXPROLBO2 = BOXPROLBO : 	8.80D-13*0.6*RO2 	;
+{2430.} 	 BOXPRONE + OH = BOXPRONAO2 : 	1.32D-11*0.63 	;
+{2431.} 	 BOXPRONE + OH = BOXPRONBO2 : 	1.32D-11*0.37 	;
+{2432.} 	 BOXPRONE = CH3CO3 + BOX2MO2 : 	J(22) 	;
+{2433.} 	 CH2BRO2 + HO2 = CH2BROOH : 	4.28D-13*EXP(820/TEMP) 	;
+{2434.} 	 CH2BRO2 + NO = CH2BRO + NO2 : 	KRO2NO*1.5 	;
+{2435.} 	 CH2BRO2 + NO3 = CH2BRO + NO2 : 	KRO2NO3 	;
+{2436.} 	 CH2BRO2 = CH2BRO : 	2.00D-12*0.60*RO2 	;
+{2437.} 	 CH2BRO2 = CH2BROH : 	2.00D-12*0.20*RO2 	;
+{2438.} 	 CH2BRO2 = CHOBR : 	2.00D-12*0.20*RO2 	;
+{2439.} 	 DIBRETO2 + HO2 = DIBRETO2H : 	3.30D-13*EXP(820/TEMP) 	;
+{2440.} 	 DIBRETO2 + NO = DIBRETO + NO2 : 	KRO2NO*1.5 	;
+{2441.} 	 DIBRETO2 + NO3 = DIBRETO + NO2 : 	KRO2NO3 	;
+{2442.} 	 DIBRETO2 = BRETAL : 	8.80D-13*0.2*RO2 	;
+{2443.} 	 DIBRETO2 = DIBRETOH : 	8.80D-13*0.6*RO2+8.80D-13*0.2*RO2 	;
+{2444.} 	 CH3COCH2O2 + HO2 = CH3COCH2O + OH : 	1.36D-13*EXP(1250/TEMP)*0.15 	;
+{2445.} 	 CH3COCH2O2 + HO2 = HYPERACET : 	1.36D-13*EXP(1250/TEMP)*0.85 	;
+{2446.} 	 CH3COCH2O2 + NO = CH3COCH2O + NO2 : 	KRO2NO 	;
+{2447.} 	 CH3COCH2O2 + NO3 = CH3COCH2O + NO2 : 	KRO2NO3 	;
+{2448.} 	 CH3COCH2O2 = ACETOL : 	2*(K298CH3O2*8.0D-12)**0.5*RO2*0.2 	;
+{2449.} 	 CH3COCH2O2 = CH3COCH2O : 	2*(K298CH3O2*8.0D-12)**0.5*RO2*0.6 	;
+{2450.} 	 CH3COCH2O2 = MGLYOX : 	2*(K298CH3O2*8.0D-12)**0.5*RO2*0.2 	;
+{2451.} 	 MEKAO2 + HO2 = MEKAOOH : 	KRO2HO2*0.625 	;
+{2452.} 	 MEKAO2 + NO = MEKANO3 : 	KRO2NO*0.033 	;
+{2453.} 	 MEKAO2 + NO = MEKAO + NO2 : 	KRO2NO*0.967 	;
+{2454.} 	 MEKAO2 + NO3 = MEKAO + NO2 : 	KRO2NO3 	;
+{2455.} 	 MEKAO2 = CO2C3CHO : 	2.00D-12*0.2*RO2 	;
+{2456.} 	 MEKAO2 = MEKAO : 	2.00D-12*0.6*RO2 	;
+{2457.} 	 MEKAO2 = MEKAOH : 	2.00D-12*0.2*RO2 	;
+{2458.} 	 MEKBO2 + HO2 = MEKBOOH : 	KRO2HO2*0.625 	;
+{2459.} 	 MEKBO2 + NO = MEKBO + NO2 : 	KRO2NO 	;
+{2460.} 	 MEKBO2 + NO3 = MEKBO + NO2 : 	KRO2NO3 	;
+{2461.} 	 MEKBO2 = BIACET : 	8.80D-13*0.2*RO2 	;
+{2462.} 	 MEKBO2 = BUT2OLO : 	8.80D-13*0.2*RO2 	;
+{2463.} 	 MEKBO2 = MEKBO : 	8.80D-13*0.6*RO2 	;
+{2464.} 	 MEKCO2 + HO2 = MEKCOOH : 	KRO2HO2*0.625 	;
+{2465.} 	 MEKCO2 + NO = MEKCO + NO2 : 	KRO2NO 	;
+{2466.} 	 MEKCO2 + NO3 = MEKCO + NO2 : 	KRO2NO3 	;
+{2467.} 	 MEKCO2 = EGLYOX : 	2.00D-12*0.2*RO2 	;
+{2468.} 	 MEKCO2 = MEKCO : 	2.00D-12*0.6*RO2 	;
+{2469.} 	 MEKCO2 = MEKCOH : 	2.00D-12*0.2*RO2 	;
+{2470.} 	 CO2C54O2 + HO2 = MPRKBOOH : 	KRO2HO2*0.706 	;
+{2471.} 	 CO2C54O2 + NO = CO2C54O + NO2 : 	KRO2NO*0.871 	;
+{2472.} 	 CO2C54O2 + NO = MPRKNO3 : 	KRO2NO*0.129 	;
+{2473.} 	 CO2C54O2 + NO3 = CO2C54O + NO2 : 	KRO2NO3 	;
+{2474.} 	 CO2C54O2 = CO24C5 : 	8.80D-13*0.2*RO2 	;
+{2475.} 	 CO2C54O2 = CO2C54O : 	8.80D-13*0.6*RO2 	;
+{2476.} 	 CO2C54O2 = HO2CO4C5 : 	8.80D-13*0.2*RO2 	;
+{2477.} 	 MPRKAO2 + HO2 = MPRKAOOH : 	KRO2HO2*0.706 	;
+{2478.} 	 MPRKAO2 + NO = MPRKAO + NO2 : 	KRO2NO 	;
+{2479.} 	 MPRKAO2 + NO3 = MPRKAO + NO2 : 	KRO2NO3 	;
+{2480.} 	 MPRKAO2 = CO23C5 : 	8.80D-13*0.2*RO2 	;
+{2481.} 	 MPRKAO2 = MPRKAO : 	8.80D-13*0.6*RO2 	;
+{2482.} 	 MPRKAO2 = MPRKAOH : 	8.80D-13*0.2*RO2 	;
+{2483.} 	 DIEKAO2 + HO2 = DIEKAOOH : 	KRO2HO2*0.706 	;
+{2484.} 	 DIEKAO2 + NO = DIEKAO + NO2 : 	KRO2NO 	;
+{2485.} 	 DIEKAO2 + NO3 = DIEKAO + NO2 : 	KRO2NO3 	;
+{2486.} 	 DIEKAO2 = CO23C5 : 	8.80D-13*0.2*RO2 	;
+{2487.} 	 DIEKAO2 = DIEKAO : 	8.80D-13*0.6*RO2 	;
+{2488.} 	 DIEKAO2 = DIEKAOH : 	8.80D-13*0.2*RO2 	;
+{2489.} 	 DIEKBO2 + HO2 = DIEKBOOH : 	KRO2HO2*0.706 	;
+{2490.} 	 DIEKBO2 + NO = DIEKBNO3 : 	KRO2NO*0.052 	;
+{2491.} 	 DIEKBO2 + NO = DIEKBO + NO2 : 	KRO2NO*0.948 	;
+{2492.} 	 DIEKBO2 + NO3 = DIEKBO + NO2 : 	KRO2NO3 	;
+{2493.} 	 DIEKBO2 = CO3C4CHO : 	2.00D-12*0.2*RO2 	;
+{2494.} 	 DIEKBO2 = DIEKBO : 	2.00D-12*0.6*RO2 	;
+{2495.} 	 DIEKBO2 = HO1CO3C5 : 	2.00D-12*0.2*RO2 	;
+{2496.} 	 MIPKAO2 + HO2 = MIPKAOOH : 	KRO2HO2*0.706 	;
+{2497.} 	 MIPKAO2 + NO = MIPKAO + NO2 : 	KRO2NO 	;
+{2498.} 	 MIPKAO2 + NO3 = MIPKAO + NO2 : 	KRO2NO3 	;
+{2499.} 	 MIPKAO2 = MIPKAO : 	9.20D-14*0.7*RO2 	;
+{2500.} 	 MIPKAO2 = MIPKAOH : 	9.20D-14*0.3*RO2 	;
+{2501.} 	 MIPKBO2 + HO2 = MIPKBOOH : 	KRO2HO2*0.706 	;
+{2502.} 	 MIPKBO2 + NO = MIPKBNO3 : 	KRO2NO*0.052 	;
+{2503.} 	 MIPKBO2 + NO = MIPKBO + NO2 : 	KRO2NO*0.948 	;
+{2504.} 	 MIPKBO2 + NO3 = MIPKBO + NO2 : 	KRO2NO3 	;
+{2505.} 	 MIPKBO2 = CO2C43CHO : 	1.30D-12*0.2*RO2 	;
+{2506.} 	 MIPKBO2 = MIPKBO : 	1.30D-12*0.6*RO2 	;
+{2507.} 	 MIPKBO2 = MIPKBOH : 	1.30D-12*0.2*RO2 	;
+{2508.} 	 HEX2ONAO2 + HO2 = HEX2ONAOOH : 	KRO2HO2*0.770 	;
+{2509.} 	 HEX2ONAO2 + NO = HEX2ONANO3 : 	KRO2NO*0.195 	;
+{2510.} 	 HEX2ONAO2 + NO = HEX2ONAO + NO2 : 	KRO2NO*0.805 	;
+{2511.} 	 HEX2ONAO2 + NO3 = HEX2ONAO + NO2 : 	KRO2NO3 	;
+{2512.} 	 HEX2ONAO2 = CO24C6 : 	8.80D-13*0.2*RO2 	;
+{2513.} 	 HEX2ONAO2 = CO2HO4C6 : 	8.80D-13*0.2*RO2 	;
+{2514.} 	 HEX2ONAO2 = HEX2ONAO : 	8.80D-13*0.6*RO2 	;
+{2515.} 	 HEX2ONBO2 + HO2 = HEX2ONBOOH : 	KRO2HO2*0.770 	;
+{2516.} 	 HEX2ONBO2 + NO = HEX2ONBNO3 : 	KRO2NO*0.195 	;
+{2517.} 	 HEX2ONBO2 + NO = HEX2ONBO + NO2 : 	KRO2NO*0.805 	;
+{2518.} 	 HEX2ONBO2 + NO3 = HEX2ONBO + NO2 : 	KRO2NO3 	;
+{2519.} 	 HEX2ONBO2 = CO25C6 : 	2.50D-13*0.2*RO2 	;
+{2520.} 	 HEX2ONBO2 = HEX2ONBO : 	2.50D-13*0.6*RO2 	;
+{2521.} 	 HEX2ONBO2 = HO2CO5C6 : 	2.50D-13*0.2*RO2 	;
+{2522.} 	 HEX2ONCO2 + HO2 = HEX2ONCOOH : 	KRO2HO2*0.770 	;
+{2523.} 	 HEX2ONCO2 + NO = HEX2ONCO + NO2 : 	KRO2NO 	;
+{2524.} 	 HEX2ONCO2 + NO3 = HEX2ONCO + NO2 : 	KRO2NO3 	;
+{2525.} 	 HEX2ONCO2 = CO23C6 : 	8.80D-13*0.2*RO2 	;
+{2526.} 	 HEX2ONCO2 = CO2HO3C6 : 	8.80D-13*0.2*RO2 	;
+{2527.} 	 HEX2ONCO2 = HEX2ONCO : 	8.80D-13*0.6*RO2 	;
+{2528.} 	 HEX3ONAO2 + HO2 = HEX3ONAOOH : 	KRO2HO2*0.770 	;
+{2529.} 	 HEX3ONAO2 + NO = HEX3ONANO3 : 	KRO2NO*0.195 	;
+{2530.} 	 HEX3ONAO2 + NO = HEX3ONAO + NO2 : 	KRO2NO*0.805 	;
+{2531.} 	 HEX3ONAO2 + NO3 = HEX3ONAO + NO2 : 	KRO2NO3 	;
+{2532.} 	 HEX3ONAO2 = CO24C6 : 	2.50D-13*0.2*RO2 	;
+{2533.} 	 HEX3ONAO2 = HEX3ONAO : 	2.50D-13*0.6*RO2 	;
+{2534.} 	 HEX3ONAO2 = HEX3ONAOH : 	2.50D-13*0.2*RO2 	;
+{2535.} 	 HEX3ONBO2 + HO2 = HEX3ONBOOH : 	KRO2HO2*0.770 	;
+{2536.} 	 HEX3ONBO2 + NO = HEX3ONBO + NO2 : 	KRO2NO 	;
+{2537.} 	 HEX3ONBO2 + NO3 = HEX3ONBO + NO2 : 	KRO2NO3 	;
+{2538.} 	 HEX3ONBO2 = C6CO34 : 	2.50D-13*0.2*RO2 	;
+{2539.} 	 HEX3ONBO2 = C6CO3HO4 : 	2.50D-13*0.2*RO2 	;
+{2540.} 	 HEX3ONBO2 = HEX3ONBO : 	2.50D-13*0.6*RO2 	;
+{2541.} 	 HEX3ONCO2 + HO2 = HEX3ONCOOH : 	KRO2HO2*0.770 	;
+{2542.} 	 HEX3ONCO2 + NO = HEX3ONCO + NO2 : 	KRO2NO 	;
+{2543.} 	 HEX3ONCO2 + NO3 = HEX3ONCO + NO2 : 	KRO2NO3 	;
+{2544.} 	 HEX3ONCO2 = CO23C6 : 	2.50D-13*0.2*RO2 	;
+{2545.} 	 HEX3ONCO2 = HEX3ONCO : 	2.50D-13*0.6*RO2 	;
+{2546.} 	 HEX3ONCO2 = HEX3ONCOH : 	2.50D-13*0.2*RO2 	;
+{2547.} 	 HEX3ONDO2 + HO2 = HEX3ONDOOH : 	KRO2HO2*0.770 	;
+{2548.} 	 HEX3ONDO2 + NO = HEX3ONDNO3 : 	KRO2NO*0.078 	;
+{2549.} 	 HEX3ONDO2 + NO = HEX3ONDO + NO2 : 	KRO2NO*0.922 	;
+{2550.} 	 HEX3ONDO2 + NO3 = HEX3ONDO + NO2 : 	KRO2NO3 	;
+{2551.} 	 HEX3ONDO2 = C3COCCHO : 	2.50D-13*0.2*RO2 	;
+{2552.} 	 HEX3ONDO2 = HEX3ONDO : 	2.50D-13*0.6*RO2 	;
+{2553.} 	 HEX3ONDO2 = HEX3ONDOH : 	2.50D-13*0.2*RO2 	;
+{2554.} 	 MIBKAO2 + HO2 = MIBKAOOH : 	KRO2HO2*0.770 	;
+{2555.} 	 MIBKAO2 + NO = MIBKANO3 : 	KRO2NO*0.058 	;
+{2556.} 	 MIBKAO2 + NO = MIBKAO + NO2 : 	KRO2NO*0.942 	;
+{2557.} 	 MIBKAO2 + NO3 = MIBKAO + NO2 : 	KRO2NO3 	;
+{2558.} 	 MIBKAO2 = MIBKAO : 	6.70D-15*0.7*RO2 	;
+{2559.} 	 MIBKAO2 = MIBKAOH : 	6.70D-15*0.3*RO2 	;
+{2560.} 	 MIBKBO2 + HO2 = MIBKBOOH : 	KRO2HO2*0.770 	;
+{2561.} 	 MIBKBO2 + NO = MIBKBO + NO2 : 	KRO2NO 	;
+{2562.} 	 MIBKBO2 + NO3 = MIBKBO + NO2 : 	KRO2NO3 	;
+{2563.} 	 MIBKBO2 = MIBK3CO : 	8.80D-13*0.2*RO2 	;
+{2564.} 	 MIBKBO2 = MIBKBO : 	8.80D-13*0.6*RO2 	;
+{2565.} 	 MIBKBO2 = MIBKBOH : 	8.80D-13*0.2*RO2 	;
+{2566.} 	 MTBKO2 + HO2 = MTBKOOH : 	KRO2HO2*0.770 	;
+{2567.} 	 MTBKO2 + NO = MTBKNO3 : 	KRO2NO*0.078 	;
+{2568.} 	 MTBKO2 + NO = MTBKO + NO2 : 	KRO2NO*0.922 	;
+{2569.} 	 MTBKO2 + NO3 = MTBKO + NO2 : 	KRO2NO3 	;
+{2570.} 	 MTBKO2 = CO2M33CHO : 	1.30D-12*0.2*RO2 	;
+{2571.} 	 MTBKO2 = MTBKO : 	1.30D-12*0.6*RO2 	;
+{2572.} 	 MTBKO2 = MTBKOH : 	1.30D-12*0.2*RO2 	;
+{2573.} 	 CYHXONAO2 + HO2 = CYHXONAOOH : 	KRO2HO2*0.770 	;
+{2574.} 	 CYHXONAO2 + NO = CYHXONANO3 : 	KRO2NO*0.068 	;
+{2575.} 	 CYHXONAO2 + NO = CYHXONAO + NO2 : 	KRO2NO*0.932 	;
+{2576.} 	 CYHXONAO2 + NO3 = CYHXONAO + NO2 : 	KRO2NO3 	;
+{2577.} 	 CYHXONAO2 = CYC613DION : 	2.50D-13*0.2*RO2 	;
+{2578.} 	 CYHXONAO2 = CYHXONAO : 	2.50D-13*0.6*RO2 	;
+{2579.} 	 CYHXONAO2 = CYHXONAOH : 	2.50D-13*0.2*RO2 	;
+{2580.} 	 NAPINAO2 + HO2 = NAPINAOOH : 	KRO2HO2*0.914 	;
+{2581.} 	 NAPINAO2 + NO = NAPINAO + NO2 : 	KRO2NO 	;
+{2582.} 	 NAPINAO2 + NO3 = NAPINAO + NO2 : 	KRO2NO3 	;
+{2583.} 	 NAPINAO2 = APINBNO3 : 	6.70D-15*0.1*RO2 	;
+{2584.} 	 NAPINAO2 = NAPINAO : 	6.70D-15*0.9*RO2 	;
+{2585.} 	 NAPINBO2 + HO2 = NAPINBOOH : 	KRO2HO2*0.914 	;
+{2586.} 	 NAPINBO2 + NO = NAPINBO + NO2 : 	KRO2NO 	;
+{2587.} 	 NAPINBO2 + NO3 = NAPINBO + NO2 : 	KRO2NO3 	;
+{2588.} 	 NAPINBO2 = APINANO3 : 	2.50D-13*0.1*RO2 	;
+{2589.} 	 NAPINBO2 = NAPINBO : 	2.50D-13*0.8*RO2 	;
+{2590.} 	 NAPINBO2 = NC101CO : 	2.50D-13*0.1*RO2 	;
+{2591.} 	 APINOOA = C107O2 + OH : 	KDEC*0.55 	;
+{2592.} 	 APINOOA = C109O2 + OH : 	KDEC*0.45 	;
+{2593.} 	 APINOOB = APINBOO : 	KDEC*0.50 	;
+{2594.} 	 APINOOB = C96O2 + OH + CO : 	KDEC*0.50 	;
+{2595.} 	 APINAO2 + HO2 = APINAOOH : 	KRO2HO2*0.914 	;
+{2596.} 	 APINAO2 + NO = APINANO3 : 	KRO2NO*0.230 	;
+{2597.} 	 APINAO2 + NO = APINAO + NO2 : 	KRO2NO*0.770 	;
+{2598.} 	 APINAO2 + NO3 = APINAO + NO2 : 	KRO2NO3 	;
+{2599.} 	 APINAO2 = APINAO : 	9.20D-14*RO2*0.7 	;
+{2600.} 	 APINAO2 = APINBOH : 	9.20D-14*RO2*0.3 	;
+{2601.} 	 APINBO2 + HO2 = APINBOOH : 	KRO2HO2*0.914 	;
+{2602.} 	 APINBO2 + NO = APINBNO3 : 	KRO2NO*0.230 	;
+{2603.} 	 APINBO2 + NO = APINBO + NO2 : 	KRO2NO*0.770 	;
+{2604.} 	 APINBO2 + NO3 = APINBO + NO2 : 	KRO2NO3 	;
+{2605.} 	 APINBO2 = APINBCO : 	8.80D-13*RO2*0.2 	;
+{2606.} 	 APINBO2 = APINBO : 	8.80D-13*RO2*0.6 	;
+{2607.} 	 APINBO2 = APINBOH : 	8.80D-13*RO2*0.2 	;
+{2608.} 	 APINCO2 + HO2 = APINCOOH : 	KRO2HO2*0.914 	;
+{2609.} 	 APINCO2 + NO = APINCNO3 : 	KRO2NO*0.125 	;
+{2610.} 	 APINCO2 + NO = APINCO + NO2 : 	KRO2NO*0.875 	;
+{2611.} 	 APINCO2 + NO3 = APINCO + NO2 : 	KRO2NO3 	;
+{2612.} 	 APINCO2 = APINCO : 	6.70D-15*RO2*0.7 	;
+{2613.} 	 APINCO2 = APINCOH : 	6.70D-15*RO2*0.3 	;
+{2614.} 	 NBPINAO2 + HO2 = NBPINAOOH : 	KRO2HO2*0.914 	;
+{2615.} 	 NBPINAO2 + NO = NBPINAO + NO2 : 	KRO2NO 	;
+{2616.} 	 NBPINAO2 + NO3 = NBPINAO + NO2 : 	KRO2NO3 	;
+{2617.} 	 NBPINAO2 = BPINBNO3 : 	9.20D-14*RO2*0.3 	;
+{2618.} 	 NBPINAO2 = NBPINAO : 	9.20D-14*RO2*0.7 	;
+{2619.} 	 NBPINBO2 + HO2 = NBPINBOOH : 	KRO2HO2*0.914 	;
+{2620.} 	 NBPINBO2 + NO = NBPINBO + NO2 : 	KRO2NO 	;
+{2621.} 	 NBPINBO2 + NO3 = NBPINBO + NO2 : 	KRO2NO3 	;
+{2622.} 	 NBPINBO2 = BPINANO3 : 	2.00D-12*RO2*0.2 	;
+{2623.} 	 NBPINBO2 = NBPINBO : 	2.00D-12*RO2*0.6 	;
+{2624.} 	 NBPINBO2 = NC91CHO : 	2.00D-12*RO2*0.6 	;
+{2625.} 	 NOPINONE + OH = NOPINAO2 : 	1.55D-11*0.535 	;
+{2626.} 	 NOPINONE + OH = NOPINBO2 : 	1.55D-11*0.199 	;
+{2627.} 	 NOPINONE + OH = NOPINCO2 : 	1.55D-11*0.130 	;
+{2628.} 	 NOPINONE + OH = NOPINDO2 : 	1.55D-11*0.136 	;
+{2629.} 	 CH2OOF = CH2OO : 	KDEC*0.370 	;
+{2630.} 	 CH2OOF = CO : 	KDEC*0.500 	;
+{2631.} 	 CH2OOF = HO2 + CO + OH : 	KDEC*0.130 	;
+{2632.} 	 NOPINOOA = C8BC : 	KDEC*0.330 	;
+{2633.} 	 NOPINOOA = NOPINDO2 + OH : 	KDEC*0.500 	;
+{2634.} 	 NOPINOOA = NOPINOO : 	KDEC*0.170 	;
+{2635.} 	 BPINAO2 + HO2 = BPINAOOH : 	KRO2HO2*0.914 	;
+{2636.} 	 BPINAO2 + NO = BPINANO3 : 	KRO2NO*0.240 	;
+{2637.} 	 BPINAO2 + NO = BPINAO + NO2 : 	KRO2NO*0.760 	;
+{2638.} 	 BPINAO2 + NO3 = BPINAO + NO2 : 	KRO2NO3 	;
+{2639.} 	 BPINAO2 = BPINAO : 	9.20D-14*RO2*0.7 	;
+{2640.} 	 BPINAO2 = BPINAOH : 	9.20D-14*RO2*0.3 	;
+{2641.} 	 BPINBO2 + HO2 = BPINBOOH : 	KRO2HO2*0.914 	;
+{2642.} 	 BPINBO2 + NO = BPINBNO3 : 	KRO2NO*0.240 	;
+{2643.} 	 BPINBO2 + NO = BPINBO + NO2 : 	KRO2NO*0.760 	;
+{2644.} 	 BPINBO2 + NO3 = BPINBO + NO2 : 	KRO2NO3 	;
+{2645.} 	 BPINBO2 = BPINAOH : 	2.00D-12*RO2*0.2 	;
+{2646.} 	 BPINBO2 = BPINBO : 	2.00D-12*RO2*0.6 	;
+{2647.} 	 BPINBO2 = C918CHO : 	2.00D-12*RO2*0.2 	;
+{2648.} 	 BPINCO2 + HO2 = BPINCOOH : 	KRO2HO2*0.914 	;
+{2649.} 	 BPINCO2 + NO = BPINCNO3 : 	KRO2NO*0.125 	;
+{2650.} 	 BPINCO2 + NO = BPINCO + NO2 : 	KRO2NO*0.875 	;
+{2651.} 	 BPINCO2 + NO3 = BPINCO + NO2 : 	KRO2NO3 	;
+{2652.} 	 BPINCO2 = BPINCO : 	6.70D-15*RO2*0.7 	;
+{2653.} 	 BPINCO2 = BPINCOH : 	6.70D-15*RO2*0.3 	;
+{2654.} 	 NLIMO2 + HO2 = NLIMOOH : 	KRO2HO2*0.914 	;
+{2655.} 	 NLIMO2 + NO = NLIMO + NO2 : 	KRO2NO 	;
+{2656.} 	 NLIMO2 + NO3 = NLIMO + NO2 : 	KRO2NO3 	;
+{2657.} 	 NLIMO2 = LIMBNO3 : 	9.20D-14*RO2*0.3 	;
+{2658.} 	 NLIMO2 = NLIMO : 	9.20D-14*RO2*0.7 	;
+{2659.} 	 LIMOOA = LIMALAO2 + OH : 	KDEC*0.5 	;
+{2660.} 	 LIMOOA = LIMALBO2 + OH : 	KDEC*0.5 	;
+{2661.} 	 LIMOOB = C923O2 + CO + OH : 	KDEC*0.5 	;
+{2662.} 	 LIMOOB = LIMBOO : 	KDEC*0.5 	;
+{2663.} 	 LIMAO2 + HO2 = LIMAOOH : 	KRO2HO2*0.914 	;
+{2664.} 	 LIMAO2 + NO = LIMANO3 : 	KRO2NO*0.228 	;
+{2665.} 	 LIMAO2 + NO = LIMAO + NO2 : 	KRO2NO*0.772 	;
+{2666.} 	 LIMAO2 + NO3 = LIMAO + NO2 : 	KRO2NO3 	;
+{2667.} 	 LIMAO2 = LIMAO : 	9.20D-14*RO2*0.7 	;
+{2668.} 	 LIMAO2 = LIMAOH : 	9.20D-14*RO2*0.3 	;
+{2669.} 	 LIMBO2 + HO2 = LIMBOOH : 	KRO2HO2*0.914 	;
+{2670.} 	 LIMBO2 + NO = LIMBNO3 : 	KRO2NO*0.228 	;
+{2671.} 	 LIMBO2 + NO = LIMBO + NO2 : 	KRO2NO*0.772 	;
+{2672.} 	 LIMBO2 + NO3 = LIMBO + NO2 : 	KRO2NO3 	;
+{2673.} 	 LIMBO2 = LIMAOH : 	8.80D-13*RO2*0.2 	;
+{2674.} 	 LIMBO2 = LIMBCO : 	8.80D-13*RO2*0.2 	;
+{2675.} 	 LIMBO2 = LIMBO : 	8.80D-13*RO2*0.6 	;
+{2676.} 	 LIMCO2 + HO2 = LIMCOOH : 	KRO2HO2*0.914 	;
+{2677.} 	 LIMCO2 + NO = LIMCNO3 : 	KRO2NO*0.228 	;
+{2678.} 	 LIMCO2 + NO = LIMCO + NO2 : 	KRO2NO*0.772 	;
+{2679.} 	 LIMCO2 + NO3 = LIMCO + NO2 : 	KRO2NO3 	;
+{2680.} 	 LIMCO2 = LIMCO : 	9.20D-14*RO2*0.7 	;
+{2681.} 	 LIMCO2 = LIMCOH : 	9.20D-14*RO2*0.3 	;
+{2682.} 	 NBCO2 + HO2 = NBCOOH : 	KRO2HO2*0.975 	;
+{2683.} 	 NBCO2 + NO = NBCO + NO2 : 	KRO2NO 	;
+{2684.} 	 NBCO2 + NO3 = NBCO + NO2 : 	KRO2NO3 	;
+{2685.} 	 NBCO2 = BCBNO3 : 	9.20D-14*RO2*0.3 	;
+{2686.} 	 NBCO2 = NBCO : 	9.20D-14*RO2*0.7 	;
+{2687.} 	 BCAOO + CO = BCAL : 	1.20D-15 	;
+{2688.} 	 BCAOO + NO = BCAL + NO2 : 	1.00D-14 	;
+{2689.} 	 BCAOO + NO2 = BCAL + NO3 : 	1.00D-15 	;
+{2690.} 	 BCAOO + SO2 = BCAL + SO3 : 	7.00D-14 	;
+{2691.} 	 BCAOO = BCAL + H2O2 : 	2.00D-16*H2O 	;
+{2692.} 	 BCAOO = BCSOZ : 	8.00D+01 	;
+{2693.} 	 BCBOO + CO = BCAL : 	1.20D-15 	;
+{2694.} 	 BCBOO + NO = BCAL + NO2 : 	1.00D-14 	;
+{2695.} 	 BCBOO + NO2 = BCAL + NO3 : 	1.00D-15 	;
+{2696.} 	 BCBOO + SO2 = BCAL + SO3 : 	7.00D-14 	;
+{2697.} 	 BCBOO = BCSOZ : 	1.20D+02 	;
+{2698.} 	 BCBOO = C141CO2H : 	2.00D-16*H2O 	;
+{2699.} 	 BCOOA = BCALAO2 + OH : 	KDEC*0.13 	;
+{2700.} 	 BCOOA = BCALBO2 + OH : 	KDEC*0.67 	;
+{2701.} 	 BCOOA = BCALBOC : 	KDEC*0.15 	;
+{2702.} 	 BCOOA = C136O2 + CH3O2 : 	KDEC*0.05 	;
+{2703.} 	 BCOOB = BCALCO2 + OH : 	KDEC*0.66 	;
+{2704.} 	 BCOOB = C141CO2H : 	KDEC*0.17 	;
+{2705.} 	 BCOOB = C141O2 + HO2 : 	KDEC*0.17 	;
+{2706.} 	 BCAO2 + HO2 = BCAOOH : 	KRO2HO2*0.975 	;
+{2707.} 	 BCAO2 + NO = BCANO3 : 	KRO2NO*0.247 	;
+{2708.} 	 BCAO2 + NO = BCAO + NO2 : 	KRO2NO*0.753 	;
+{2709.} 	 BCAO2 + NO3 = BCAO + NO2 : 	KRO2NO3 	;
+{2710.} 	 BCAO2 = BCAO : 	9.20D-14*RO2*0.7 	;
+{2711.} 	 BCAO2 = BCAOH : 	9.20D-14*RO2*0.3 	;
+{2712.} 	 BCBO2 + HO2 = BCBOOH : 	KRO2HO2*0.975 	;
+{2713.} 	 BCBO2 + NO = BCBNO3 : 	KRO2NO*0.247 	;
+{2714.} 	 BCBO2 + NO = BCBO + NO2 : 	KRO2NO*0.753 	;
+{2715.} 	 BCBO2 + NO3 = BCBO + NO2 : 	KRO2NO3 	;
+{2716.} 	 BCBO2 = BCAOH : 	8.80D-13*RO2*0.2 	;
+{2717.} 	 BCBO2 = BCBCO : 	8.80D-13*RO2*0.2 	;
+{2718.} 	 BCBO2 = BCBO : 	8.80D-13*RO2*0.6 	;
+{2719.} 	 BCCO2 + HO2 = BCCOOH : 	KRO2HO2*0.975 	;
+{2720.} 	 BCCO2 + NO = BCCNO3 : 	KRO2NO*0.247 	;
+{2721.} 	 BCCO2 + NO = BCCO + NO2 : 	KRO2NO*0.753 	;
+{2722.} 	 BCCO2 + NO3 = BCCO + NO2 : 	KRO2NO3 	;
+{2723.} 	 BCCO2 = BCCO : 	9.20D-14*RO2*0.7 	;
+{2724.} 	 BCCO2 = BCCOH : 	9.20D-14*RO2*0.3 	;
+{2725.} 	 DMMAO2 + HO2 = DMMAOOH : 	KRO2HO2*0.520 	;
+{2726.} 	 DMMAO2 + NO = DMMANO3 : 	KRO2NO*0.017 	;
+{2727.} 	 DMMAO2 + NO = DMMAO + NO2 : 	KRO2NO*0.983 	;
+{2728.} 	 DMMAO2 + NO3 = DMMAO + NO2 : 	KRO2NO3 	;
+{2729.} 	 DMMAO2 = DMMAO : 	2.00D-12*RO2*0.6 	;
+{2730.} 	 DMMAO2 = DMMAOH : 	2.00D-12*RO2*0.2 	;
+{2731.} 	 DMMAO2 = MMF : 	2.00D-12*RO2*0.2 	;
+{2732.} 	 DMMBO2 + HO2 = DMMBOOH : 	KRO2HO2*0.520 	;
+{2733.} 	 DMMBO2 + NO = DMMBNO3 : 	KRO2NO*0.042 	;
+{2734.} 	 DMMBO2 + NO = DMMBO + NO2 : 	KRO2NO*0.958 	;
+{2735.} 	 DMMBO2 + NO3 = DMMBO + NO2 : 	KRO2NO3 	;
+{2736.} 	 DMMBO2 = DMC : 	8.80D-13*RO2*0.2 	;
+{2737.} 	 DMMBO2 = DMMBO : 	8.80D-13*RO2*0.6 	;
+{2738.} 	 DMMBO2 = DMMBOH : 	8.80D-13*RO2*0.2 	;
+{2739.} 	 DMCO2 + HO2 = DMCOOH : 	KRO2HO2*0.520 	;
+{2740.} 	 DMCO2 + NO = DMCNO3 : 	KRO2NO*0.017 	;
+{2741.} 	 DMCO2 + NO = DMCO + NO2 : 	KRO2NO*0.983 	;
+{2742.} 	 DMCO2 + NO3 = DMCO + NO2 : 	KRO2NO3 	;
+{2743.} 	 DMCO2 = DMCO : 	2.00D-12*RO2*0.6 	;
+{2744.} 	 DMCO2 = DMCOH : 	2.00D-12*RO2*0.2 	;
+{2745.} 	 DMCO2 = MMCF : 	2.00D-12*RO2*0.2 	;
+{2746.} 	 CH3SCH2O2 + HO2 = CH3SCH2OOH : 	KRO2HO2*0.387*0.6 	;
+{2747.} 	 CH3SCH2O2 + HO2 = CH3SCHO : 	KRO2HO2*0.387*0.4 	;
+{2748.} 	 CH3SCH2O2 + NO = CH3SCH2O + NO2 : 	4.9D-12*EXP(260/TEMP) 	;
+{2749.} 	 CH3SCH2O2 + NO3 = CH3SCH2O + NO2 : 	KRO2NO3 	;
+{2750.} 	 CH3SCH2O2 = CH3SCH2O : 	2*(K298CH3O2*1.0D-11)**0.5*RO2*0.8 	;
+{2751.} 	 CH3SCH2O2 = CH3SCH2OH : 	2*(K298CH3O2*1.0D-11)**0.5*RO2*0.1 	;
+{2752.} 	 CH3SCH2O2 = CH3SCHO : 	2*(K298CH3O2*1.0D-11)**0.5*RO2*0.1 	;
+{2753.} 	 HODMSO2 + NO = DMSO2 + HO2 + NO2 : 	KRO2NO 	;
+{2754.} 	 HODMSO2 = DMSO + HO2 : 	3.10D+00 	;
+{2755.} 	 ETHOXO2 + HO2 = ETHOXOOH : 	KRO2HO2*0.387 	;
+{2756.} 	 ETHOXO2 + NO = CHOOCH2O2 + NO2 : 	KRONO 	;
+{2757.} 	 ETHOXO2 + NO3 = CHOOCH2O2 + NO2 : 	KRO2NO3 	;
+{2758.} 	 ETHOXO2 = CHOOCH2O2 : 	8.8D-13*RO2 	;
+{2759.} 	 HYETHO2H + OH = HOCH2CH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2760.} 	 HYETHO2H + OH = HOCH2CHO + OH : 	1.38D-11 	;
+{2761.} 	 HYETHO2H = HOCH2CH2O + OH : 	J(41) 	;
+{2762.} 	 ETHOHNO3 + OH = HOCH2CHO + NO2 : 	8.40D-13 	;
+{2763.} 	 HOCH2CH2O = HO2 + HCHO + HCHO : 	9.50D+13*EXP(-5988/TEMP) 	;
+{2764.} 	 HOCH2CH2O = HO2 + HOCH2CHO : 	KROPRIM*O2 	;
+{2765.} 	 HO1C3OOH = HO1C3O + OH : 	J(41) 	;
+{2766.} 	 OH + HO1C3OOH = HO1C3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2767.} 	 OH + HO1C3OOH = HOC2H4CHO + OH : 	1.52D-11 	;
+{2768.} 	 HO1C3NO3 = HO1C3O + NO2 : 	J(53) 	;
+{2769.} 	 OH + HO1C3NO3 = HOC2H4CHO + NO2 : 	4.44D-12 	;
+{2770.} 	 HO1C3O = HOC2H4CHO + HO2 : 	KROPRIM*O2 	;
+{2771.} 	 HOC2H4CHO = HOCH2CH2O2 + HO2 + CO : 	J(15) 	;
+{2772.} 	 NO3 + HOC2H4CHO = HOC2H4CO3 + HNO3 : 	KNO3AL*2.4 	;
+{2773.} 	 OH + HOC2H4CHO = HOC2H4CO3 : 	3.06D-11 	;
+{2774.} 	 OH + HOC3H6OH = HOC2H4CHO + HO2 : 	9.73D-12 	;
+{2775.} 	 HYPROPO2H + OH = ACETOL + OH : 	2.44D-11 	;
+{2776.} 	 HYPROPO2H + OH = HYPROPO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2777.} 	 HYPROPO2H = HYPROPO + OH : 	J(41) 	;
+{2778.} 	 HYPROPO = CH3CHO + HCHO + HO2 : 	2.00D+14*EXP(-6410/TEMP) 	;
+{2779.} 	 PROPOLNO3 + OH = ACETOL + NO2 : 	9.16D-13 	;
+{2780.} 	 IPROPOLO2H + OH = CH3CHOHCHO + OH : 	1.83D-11 	;
+{2781.} 	 IPROPOLO2H + OH = IPROPOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2782.} 	 IPROPOLO2H = IPROPOLO + OH : 	J(41) 	;
+{2783.} 	 IPROPOLO = CH3CHO + HCHO + HO2 : 	2.00D+14*EXP(-5505/TEMP) 	;
+{2784.} 	 PROLNO3 + OH = CH3CHOHCHO + NO2 : 	1.71D-12 	;
+{2785.} 	 NBUTOLAOOH + OH = MEKCOH + OH : 	3.01D-11 	;
+{2786.} 	 NBUTOLAOOH + OH = NBUTOLAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2787.} 	 NBUTOLAOOH = NBUTOLAO + OH : 	J(41) 	;
+{2788.} 	 NBUTOLANO3 + OH = MEKCOH + NO2 : 	1.27D-12 	;
+{2789.} 	 NBUTOLAO = C2H5CHO + HCHO + HO2 : 	2.00D+14*EXP(-6354/TEMP) 	;
+{2790.} 	 MEKCOH + OH = EGLYOX + HO2 : 	3.44D-12 	;
+{2791.} 	 MEKCOH = C2H5CO3 + HCHO + HO2 : 	J(22) 	;
+{2792.} 	 NBUTOLAOH + OH = MEKCOH + HO2 : 	1.59D-11 	;
+{2793.} 	 NBUTOLBOOH + OH = MEKAOH + OH : 	2.58D-11 	;
+{2794.} 	 NBUTOLBOOH + OH = NBUTOLBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2795.} 	 NBUTOLBOOH = NBUTOLBO + OH : 	J(41) 	;
+{2796.} 	 NBUTOLBNO3 + OH = MEKAOH + NO2 : 	4.51D-12 	;
+{2797.} 	 NBUTOLBNO3 = NBUTOLBO + NO2 : 	J(54) 	;
+{2798.} 	 NBUTOLBO = CH3CHO + HOCH2CH2O2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{2799.} 	 NBUTOLBO = MEKAOH + HO2 : 	KROSEC*O2 	;
+{2800.} 	 OH + HO2C4OH = MEKAOH + HO2 : 	1.42D-11 	;
+{2801.} 	 MEKAOH + OH = CO2C3CHO + HO2 : 	1.35D-11 	;
+{2802.} 	 MEKAOH = HOCH2CH2O2 + CH3CO3 : 	J(22) 	;
+{2803.} 	 BUT2OLOOH + OH = BUT2OLO + OH : 	2.89D-11 	;
+{2804.} 	 BUT2OLOOH + OH = BUT2OLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2805.} 	 BUT2OLOOH = BUT2OLAO + OH : 	J(41) 	;
+{2806.} 	 BUT2OLAO = CH3CHO + CH3CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{2807.} 	 BUT2OLNO3 + OH = BUT2OLO + NO2 : 	1.79D-12 	;
+{2808.} 	 BUT2OLO + OH = BIACET + HO2 : 	5.86D-12 	;
+{2809.} 	 BUT2OLO = CH3CO3 + CH3CHO + HO2 : 	J(22) 	;
+{2810.} 	 BUT2OLOH + OH = BUT2OLO + HO2 : 	1.73D-11 	;
+{2811.} 	 IBUTOLBO2H + OH = IBUTOLBO2 : 	8.10D-12 	;
+{2812.} 	 IBUTOLBO2H = IBUTOLBO + OH : 	J(41) 	;
+{2813.} 	 IBUTOLBNO3 + OH = CH3COCH3 + HCHO + NO2 : 	8.48D-13 	;
+{2814.} 	 IBUTOLBO = CH3COCH3 + HCHO + HO2 : 	2.00D+14*EXP(-5902/TEMP) 	;
+{2815.} 	 IBUTOLOHB + OH = IBUTALOH + HO2 : 	4.64D-12 	;
+{2816.} 	 IBUTOLCO2H + OH = HOIPRCHO + OH : 	1.69D-11 	;
+{2817.} 	 IBUTOLCO2H + OH = IBUTOLCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2818.} 	 IBUTOLCO2H = IBUTOLCO + OH : 	J(41) 	;
+{2819.} 	 IBUTOLCNO3 + OH = HOIPRCHO + NO2 : 	4.85D-12 	;
+{2820.} 	 IBUTOLCNO3 = IBUTOLCO + NO2 : 	J(53) 	;
+{2821.} 	 IBUTOLCO = HOIPRCHO + HO2 : 	KROPRIM*O2 	;
+{2822.} 	 HOIPRCHO = HYPROPO2 + CO + HO2 : 	J(17) 	;
+{2823.} 	 NO3 + HOIPRCHO = HOIPRCO3 + HNO3 : 	KNO3AL*4.0 	;
+{2824.} 	 OH + HOIPRCHO = HOIPRCO3 : 	3.60D-11 	;
+{2825.} 	 IBUTOLOHC + OH = HOIPRCHO : 	1.14D-11 	;
+{2826.} 	 TBUTOLOOH + OH = IBUTALOH + OH : 	9.98D-12 	;
+{2827.} 	 TBUTOLOOH + OH = TBUTOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2828.} 	 TBUTOLOOH = TBUTOLO + OH : 	J(41) 	;
+{2829.} 	 TBUTOLNO3 + OH = IBUTALOH + NO2 : 	5.21D-13 	;
+{2830.} 	 TBUTOLO = CH3COCH3 + HCHO + HO2 : 	2.00D+14*EXP(-4909/TEMP) 	;
+{2831.} 	 HO3C5OOH = HO3C5O + OH : 	J(41) 	;
+{2832.} 	 OH + HO3C5OOH = HO3C4CHO + OH : 	2.28D-11 	;
+{2833.} 	 OH + HO3C5OOH = HO3C5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2834.} 	 HO3C5NO3 = HO3C5O + NO2 : 	J(53) 	;
+{2835.} 	 OH + HO3C5NO3 = HO3C4CHO + NO2 : 	1.20D-11 	;
+{2836.} 	 HO3C5O = HO13C5O2 : 	2.03D+11*EXP(-3430/TEMP) 	;
+{2837.} 	 OH + HO13C5 = HO1CO3C5 + HO2 : 	1.61D-11 	;
+{2838.} 	 HO3C4CHO = HO3C4O2 + HO2 + CO : 	J(15) 	;
+{2839.} 	 NO3 + HO3C4CHO = HO3C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{2840.} 	 OH + HO3C4CHO = CO3C4CHO + HO2 : 	5.56D-11*0.611 	;
+{2841.} 	 OH + HO3C4CHO = HO3C4CO3 : 	5.56D-11*0.389 	;
+{2842.} 	 C53OH2OOH + OH = MPRKAOH + OH : 	3.19D-11 	;
+{2843.} 	 C53OH2OOH + OH = PE2ENEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2844.} 	 C53OH2OOH = PE2ENEBO + OH : 	J(41) 	;
+{2845.} 	 PE2ENEBNO3 + OH = MPRKAOH + NO2 : 	3.25D-12 	;
+{2846.} 	 PE2ENEBO = CH3CHO + C2H5CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{2847.} 	 C523OH + OH = DIEKAOH + HO2 : 	2.14D-11 	;
+{2848.} 	 MPRKAOH + OH = CO23C5 + HO2 : 	1.00D-11 	;
+{2849.} 	 MPRKAOH = C2H5CHO + CH3CO3 + HO2 : 	J(22) 	;
+{2850.} 	 BUT2CO3 + HO2 = BUT2CO2H + O3 : 	KAPHO2*0.15 	;
+{2851.} 	 BUT2CO3 + HO2 = BUT2CO3H : 	KAPHO2*0.41 	;
+{2852.} 	 BUT2CO3 + HO2 = SC4H9O2 + OH : 	KAPHO2*0.44 	;
+{2853.} 	 BUT2CO3 + NO = SC4H9O2 + NO2 : 	KAPNO 	;
+{2854.} 	 BUT2CO3 + NO2 = C5PAN4 : 	KFPAN 	;
+{2855.} 	 BUT2CO3 + NO3 = SC4H9O2 + NO2 : 	KRO2NO3*1.74 	;
+{2856.} 	 BUT2CO3 = BUT2CO2H : 	1.00D-11*0.3*RO2 	;
+{2857.} 	 BUT2CO3 = SC4H9O2 : 	1.00D-11*0.7*RO2 	;
+{2858.} 	 HM2C43OOH = HM2C43O + OH : 	J(41) 	;
+{2859.} 	 OH + HM2C43OOH = MIPKBOH + OH : 	3.11D-11 	;
+{2860.} 	 HM2C43NO3 = HM2C43O + NO2 : 	J(54) 	;
+{2861.} 	 OH + HM2C43NO3 = MIPKBOH + NO2 : 	4.93D-12 	;
+{2862.} 	 HM2C43O = MIPKBOH + HO2 : 	KROSEC*O2 	;
+{2863.} 	 OH + HO13M2C4 = MIPKBOH + HO2 : 	1.59D-11 	;
+{2864.} 	 MIPKBOH = CH3CO3 + HYPROPO2 : 	J(22) 	;
+{2865.} 	 OH + MIPKBOH = CO2C43CHO + HO2 : 	1.51D-11 	;
+{2866.} 	 M2BUOL2OOH + OH = M2BUOL2O2 : 	9.24D-12 	;
+{2867.} 	 M2BUOL2OOH = M2BUOL2O + OH : 	J(41) 	;
+{2868.} 	 M2BUOL2NO3 + OH = ACETOL + CH3CHO + NO2 : 	1.18D-12 	;
+{2869.} 	 M2BUOL2O = MEK + HCHO + HO2 : 	2.00D+14*EXP(-5902/TEMP) 	;
+{2870.} 	 M2BUOL2OH + OH = PROL1MCHO + HO2 : 	5.78D-12 	;
+{2871.} 	 C3ME3CO3 + HO2 = C3ME3CO2H + O3 : 	KAPHO2*0.15 	;
+{2872.} 	 C3ME3CO3 + HO2 = C3ME3CO3H : 	KAPHO2*0.41 	;
+{2873.} 	 C3ME3CO3 + HO2 = IC4H9O2 + OH : 	KAPHO2*0.44 	;
+{2874.} 	 C3ME3CO3 + NO = IC4H9O2 + NO2 : 	KAPNO 	;
+{2875.} 	 C3ME3CO3 + NO2 = C3ME3PAN : 	KFPAN 	;
+{2876.} 	 C3ME3CO3 + NO3 = IC4H9O2 + NO2 : 	KRO2NO3*1.74 	;
+{2877.} 	 C3ME3CO3 = C3ME3CO2H : 	1.00D-11*0.3*RO2 	;
+{2878.} 	 C3ME3CO3 = IC4H9O2 : 	1.00D-11*0.7*RO2 	;
+{2879.} 	 C3ME3CHOO2 + HO2 = C3M3CHOOOH : 	KRO2HO2*0.706 	;
+{2880.} 	 C3ME3CHOO2 + NO = C3M3CHONO3 : 	KRO2NO*0.039 	;
+{2881.} 	 C3ME3CHOO2 + NO = C3ME3CHOO + NO2 : 	KRO2NO*0.961 	;
+{2882.} 	 C3ME3CHOO2 + NO3 = C3ME3CHOO + NO2 : 	KRO2NO3 	;
+{2883.} 	 C3ME3CHOO2 = C3ME3CHOO : 	6.70D-15*0.7*RO2 	;
+{2884.} 	 C3ME3CHOO2 = H2M2C3CHO : 	6.70D-15*0.3*RO2 	;
+{2885.} 	 HM33C3OOH = HM33C3O + OH : 	J(41) 	;
+{2886.} 	 OH + HM33C3OOH = HM33C3O2 : 	9.51D-12 	;
+{2887.} 	 HM33C3NO3 = HM33C3O + NO2 : 	J(55) 	;
+{2888.} 	 OH + HM33C3NO3 = CH3COCH3 + HOCH2CHO + NO2 : 	4.45D-12 	;
+{2889.} 	 HM33C3O = CH3COCH3 + HOCH2CH2O2 : 	2.70D+14*EXP(-6542/TEMP) 	;
+{2890.} 	 OH + HO2M2C4OH = H2M2C3CHO + HO2 : 	5.91D-12 	;
+{2891.} 	 ME3BUOLOOH + OH = ME3BUOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2892.} 	 ME3BUOLOOH + OH = ME3CO2BUOL + OH : 	3.15D-11 	;
+{2893.} 	 ME3BUOLOOH = ME3BUOLO + OH : 	J(41) 	;
+{2894.} 	 ME3BUOLNO3 + OH = ME3CO2BUOL + NO2 : 	1.63D-12 	;
+{2895.} 	 ME3BUOLO = IPRCHO + HCHO + HO2 : 	KDEC 	;
+{2896.} 	 C4ME3HO12 + OH = ME3CO2BUOL + HO2 : 	1.73D-11 	;
+{2897.} 	 ME3CO2BUOL + OH = IPRGLYOX + HO2 : 	5.11D-12 	;
+{2898.} 	 ME3CO2BUOL = HOCH2CO3 + IC3H7O2 : 	J(22) 	;
+{2899.} 	 HO2M2C4OOH = HO2M2C4O + OH : 	J(41) 	;
+{2900.} 	 OH + HO2M2C4OOH = H2M2C3CHO + OH : 	1.15D-11 	;
+{2901.} 	 OH + HO2M2C4OOH = HO2M2C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2902.} 	 HO2M2C4NO3 = HO2M2C4O + NO2 : 	J(53) 	;
+{2903.} 	 OH + HO2M2C4NO3 = H2M2C3CHO + NO2 : 	7.50D-13 	;
+{2904.} 	 HO2M2C4O = C54O2 : 	6.10D+11*EXP(-4240/TEMP) 	;
+{2905.} 	 HO2M2C4O = H2M2C3CHO + HO2 : 	KROPRIM*O2 	;
+{2906.} 	 H2M2C3CHO = TBUTOLO2 + HO2 + CO : 	J(15) 	;
+{2907.} 	 NO3 + H2M2C3CHO = H2M2C3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{2908.} 	 OH + H2M2C3CHO = H2M2C3CO3 : 	2.21D-11 	;
+{2909.} 	 M2BU2OLOOH + OH = ME2BU2OLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2910.} 	 M2BU2OLOOH + OH = MIPKAOH + OH : 	2.07D-11 	;
+{2911.} 	 M2BU2OLOOH = ME2BU2OLO + OH : 	J(41) 	;
+{2912.} 	 M2BU2OLNO3 + OH = MIPKAOH + NO2 : 	5.97D-13 	;
+{2913.} 	 ME2BU2OLO = CH3COCH3 + CH3CHO + HO2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{2914.} 	 ME2BU2OLO = MIPKAOH + HO2 : 	KROSEC*O2 	;
+{2915.} 	 C4ME3HO23 + OH = MIPKAOH + HO2 : 	8.63D-12 	;
+{2916.} 	 OH + MIPKAOH = MIPKAO : 	1.38D-12 	;
+{2917.} 	 PROL11MOOH + OH = PROL11MO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2918.} 	 PROL11MOOH + OH = PROL1MCHO + OH : 	1.13D-11 	;
+{2919.} 	 PROL11MOOH = PROL11MO + OH : 	J(41) 	;
+{2920.} 	 PROL11MNO3 + OH = PROL1MCHO + NO2 : 	1.67D-12 	;
+{2921.} 	 PROL11MO = MEK + HCHO + HO2 : 	2.00D+14*EXP(-4909/TEMP) 	;
+{2922.} 	 PROL1MCHO + NO3 = PROL1MCO3 + HNO3 : 	KNO3AL*8.5 	;
+{2923.} 	 PROL1MCHO + OH = PROL1MCO3 : 	2.52D-11 	;
+{2924.} 	 PROL1MCHO = MEK + HO2 + HO2 + CO : 	J(17) 	;
+{2925.} 	 H2M3C4OOH = H2M3C4O + OH : 	J(41) 	;
+{2926.} 	 OH + H2M3C4OOH = H2M3C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2927.} 	 OH + H2M3C4OOH = HO2C43CHO + OH : 	2.14D-11 	;
+{2928.} 	 H2M3C4NO3 = H2M3C4O + NO2 : 	J(53) 	;
+{2929.} 	 OH + H2M3C4NO3 = HO2C43CHO + NO2 : 	9.35D-12 	;
+{2930.} 	 H2M3C4O = C56O2 : 	2.03D+11*EXP(-4240/TEMP) 	;
+{2931.} 	 H2M3C4O = HO2C43CHO + HO2 : 	KROPRIM*O2 	;
+{2932.} 	 HO2C43CHO = BUT2OLO2 + HO2 + CO : 	J(17) 	;
+{2933.} 	 NO3 + HO2C43CHO = HO2C43CO3 + HNO3 : 	KNO3AL*8.5 	;
+{2934.} 	 OH + HO2C43CHO = CO2C43CHO + HO2 : 	4.99D-11*0.561 	;
+{2935.} 	 OH + HO2C43CHO = HO2C43CO3 : 	4.99D-11*0.439 	;
+{2936.} 	 ME2BUOLOOH + OH = ME2BUOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2937.} 	 ME2BUOLOOH + OH = MIPKAOOH + HO2 : 	8.85D-12 	;
+{2938.} 	 ME2BUOLOOH = ME2BUOLO + OH : 	J(41) 	;
+{2939.} 	 ME2BUOLNO3 + OH = CH3CHO + CH3COCH3 + NO2 : 	1.72D-12 	;
+{2940.} 	 ME2BUOLO = CH3COCH3 + CH3CHO + HO2 : 	KDEC 	;
+{2941.} 	 CYHXOLAOOH + OH = CYHEXOLAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2942.} 	 CYHXOLAOOH + OH = CYHXOLACO + OH : 	4.07D-11 	;
+{2943.} 	 CYHXOLAOOH = CYHEXOLAO + OH : 	J(41) 	;
+{2944.} 	 CYHEXOLAO = C6DIAL + HO2 : 	KDEC 	;
+{2945.} 	 CYHXOLANO3 + OH = CYHXOLACO + NO2 : 	6.08D-12 	;
+{2946.} 	 CYHXDIOLA + OH = CYHXOLACO + HO2 : 	2.65D-11 	;
+{2947.} 	 CYHXOLACO + OH = CYC6DIONE + HO2 : 	1.76D-11 	;
+{2948.} 	 CYHXOLACO = C2H4 + CO + ALLYLOH : 	J(22) 	;
+{2949.} 	 MIBKOHAOOH + OH = MIBKAOH3CO + OH : 	1.56D-11 	;
+{2950.} 	 MIBKOHAOOH + OH = MIBKAOHAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2951.} 	 MIBKOHAOOH = IBUTALOH + CH3CO3 + OH : 	J(22) 	;
+{2952.} 	 MIBKOHAOOH = MIBKAOHAO + OH : 	J(41) 	;
+{2953.} 	 MIBKAOHAO = MGLYOX + CH3COCH3 + HO2 : 	KDEC 	;
+{2954.} 	 MIBKAOH3CO + OH = MIBKCOOHO2 : 	1.30D-12 	;
+{2955.} 	 MIBKAOH3CO = IPRHOCO3 + CH3CO3 : 	J(35) 	;
+{2956.} 	 MIBKOH34 + OH = MIBKAOH3CO + HO2 : 	6.98D-12 	;
+{2957.} 	 MIBKOH34 = IBUTALOH + CH3CO3 + HO2 : 	J(22) 	;
+{2958.} 	 MIBKOHBOOH + OH = C65OH + OH : 	1.08D-11 	;
+{2959.} 	 MIBKOHBOOH + OH = MIBKAOHBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2960.} 	 MIBKOHBOOH = MIBKAOHBO + OH : 	J(41)+J(22) 	;
+{2961.} 	 MIBKAOHBO = CO24C5 + HCHO + HO2 : 	KDEC 	;
+{2962.} 	 MIBKAOHNO3 + OH = C65OH + NO2 : 	1.18D-12 	;
+{2963.} 	 C64OH = C64O + HO2 : 	J(22) 	;
+{2964.} 	 OH + C64OH = C65OH + HO2 : 	5.43D-12 	;
+{2965.} 	 C65OH = CO24C5 + HO2 + HO2 + CO : 	J(17) 	;
+{2966.} 	 OH + C65OH = C65O : 	2.43D-11 	;
+{2967.} 	 MIBKHO4OOH + OH = MIBKHO4O2 : 	1.31D-11 	;
+{2968.} 	 MIBKHO4OOH = MIBKHO4O + OH : 	J(41) 	;
+{2969.} 	 MIBKHO4OOH = TBUTOLO2 + HCHO + CO + OH : 	J(22) 	;
+{2970.} 	 MIBKHO4O = H2M2C3CO3 + HCHO : 	KDEC 	;
+{2971.} 	 MIBKHO14 + OH = MIBKHO4CHO + HO2 : 	3.44D-12 	;
+{2972.} 	 MIBKHO14 = TBUTOLO2 + HOCH2CO3 : 	J(22) 	;
+{2973.} 	 MIBKHO4CHO + NO3 = TBUTOLO2 + CO + CO + HNO3 : 	KNO3AL*8.5 	;
+{2974.} 	 MIBKHO4CHO + OH = TBUTOLO2 + CO + CO : 	1.34D-11 	;
+{2975.} 	 MIBKHO4CHO = H2M2C3CO3 + HO2 + CO : 	J(34) 	;
+{2976.} 	 CH3CO3H + OH = CH3CO3 : 	3.70D-12 	;
+{2977.} 	 CH3CO3H = CH3O2 + OH : 	J(41) 	;
+{2978.} 	 PAN + OH = HCHO + CO + NO2 : 	3D-14 	;
+{2979.} 	 PAN = CH3CO3 + NO2 : 	KBPAN 	;
+{2980.} 	 HOCH2CO3 + HO2 = HO2 + HCHO + OH : 	KAPHO2*0.44 	;
+{2981.} 	 HOCH2CO3 + HO2 = HOCH2CO2H + O3 : 	KAPHO2*0.15 	;
+{2982.} 	 HOCH2CO3 + HO2 = HOCH2CO3H : 	KAPHO2*0.41 	;
+{2983.} 	 HOCH2CO3 + NO = NO2 + HO2 + HCHO : 	KAPNO 	;
+{2984.} 	 HOCH2CO3 + NO2 = PHAN : 	KFPAN 	;
+{2985.} 	 HOCH2CO3 + NO3 = NO2 + HO2 + HCHO : 	KRO2NO3*1.74 	;
+{2986.} 	 HOCH2CO3 = HCHO + HO2 : 	1.00D-11*0.7*RO2 	;
+{2987.} 	 HOCH2CO3 = HOCH2CO2H : 	1.00D-11*0.3*RO2 	;
+{2988.} 	 CH3CHOHCO3 + HO2 = CH3CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{2989.} 	 CH3CHOHCO3 + HO2 = IPROPOLPER : 	KAPHO2*0.56 	;
+{2990.} 	 CH3CHOHCO3 + NO = CH3CHO + HO2 + NO2 : 	KAPNO 	;
+{2991.} 	 CH3CHOHCO3 + NO2 = IPROPOLPAN : 	KFPAN 	;
+{2992.} 	 CH3CHOHCO3 + NO3 = CH3CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{2993.} 	 CH3CHOHCO3 = CH3CHO + HO2 : 	1.00D-11*RO2 	;
+{2994.} 	 NMBOAOOH + OH = C4MCONO3OH + OH : 	4.89D-12 	;
+{2995.} 	 NMBOAOOH + OH = NMBOAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{2996.} 	 NMBOAOOH = NMBOAO + OH : 	J(41) 	;
+{2997.} 	 NMBOAO = NO3CH2CHO + CH3COCH3 + HO2 : 	KDEC 	;
+{2998.} 	 C4MCONO3OH + OH = C4MCONO3O : 	1.23D-12 	;
+{2999.} 	 MBOBNO3 + OH = MBOBCO + NO2 : 	2.69D-12 	;
+{3000.} 	 NMBOBOOH + OH = NMBOBCO + OH : 	2.52D-12 	;
+{3001.} 	 NMBOBOOH + OH = NMBOBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3002.} 	 NMBOBOOH = NMBOBO + OH : 	J(41) 	;
+{3003.} 	 NMBOBO = IBUTALOH + HCHO + NO2 : 	KDEC 	;
+{3004.} 	 MBOANO3 + OH = MBOACO + NO2 : 	1.75D-12 	;
+{3005.} 	 NMBOBCO + OH = NC4OHCO3 : 	4.26D-12 	;
+{3006.} 	 MBOOO + CO = IBUTALOH : 	1.20D-15 	;
+{3007.} 	 MBOOO + NO = IBUTALOH + NO2 : 	1.00D-14 	;
+{3008.} 	 MBOOO + NO2 = IBUTALOH + NO3 : 	1.00D-15 	;
+{3009.} 	 MBOOO + SO2 = IBUTALOH + SO3 : 	7.00D-14 	;
+{3010.} 	 MBOOO = IBUTALOH + H2O2 : 	6.00D-18*H2O 	;
+{3011.} 	 MBOOO = IPRHOCO2H : 	1.00D-17*H2O 	;
+{3012.} 	 IPRHOCO3 + HO2 = CH3COCH3 + HO2 + OH : 	KAPHO2*0.44 	;
+{3013.} 	 IPRHOCO3 + HO2 = IPRHOCO2H + O3 : 	KAPHO2*0.15 	;
+{3014.} 	 IPRHOCO3 + HO2 = IPRHOCO3H : 	KAPHO2*0.41 	;
+{3015.} 	 IPRHOCO3 + NO = CH3COCH3 + HO2 + NO2 : 	KAPNO 	;
+{3016.} 	 IPRHOCO3 + NO2 = C4PAN5 : 	KFPAN 	;
+{3017.} 	 IPRHOCO3 + NO3 = CH3COCH3 + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{3018.} 	 IPRHOCO3 = CH3COCH3 + HO2 : 	1.00D-11*RO2*0.7 	;
+{3019.} 	 IPRHOCO3 = IPRHOCO2H : 	1.00D-11*RO2*0.3 	;
+{3020.} 	 CH2OO + CO = HCHO : 	1.20D-15 	;
+{3021.} 	 CH2OO + NO = HCHO + NO2 : 	1.00D-14 	;
+{3022.} 	 CH2OO + NO2 = HCHO + NO3 : 	1.00D-15 	;
+{3023.} 	 CH2OO + SO2 = HCHO + SO3 : 	7.00D-14 	;
+{3024.} 	 CH2OO = HCHO + H2O2 : 	6.00D-18*H2O 	;
+{3025.} 	 CH2OO = HCOOH : 	1.00D-17*H2O 	;
+{3026.} 	 MBOAOOH + OH = MBOACO + OH : 	2.93D-11 	;
+{3027.} 	 MBOAOOH + OH = MBOAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3028.} 	 MBOAOOH = MBOAO + OH : 	J(41) 	;
+{3029.} 	 MBOAO = HOCH2CHO + CH3COCH3 + HO2 : 	KDEC 	;
+{3030.} 	 MBOACO + OH = MBOCOCO + HO2 : 	3.79D-12 	;
+{3031.} 	 MBOACO = HCHO + HO2 + IPRHOCO3 : 	J(22) 	;
+{3032.} 	 MBOAOH + OH = MBOACO + HO2 : 	1.51D-11 	;
+{3033.} 	 MBOBOOH + OH = MBOBCO + OH : 	2.05D-12 	;
+{3034.} 	 MBOBOOH + OH = MBOBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3035.} 	 MBOBOOH = MBOBO + OH : 	J(41) 	;
+{3036.} 	 MBOBO = IBUTALOH + HCHO + HO2 : 	KDEC 	;
+{3037.} 	 MBOBCO + OH = C4OH2CO3 : 	2.75D-11 	;
+{3038.} 	 MBOBCO = CO + HO2 + HO2 + IBUTALOH : 	J(17) 	;
+{3039.} 	 CH3OOH = CH3O + OH : 	J(41) 	;
+{3040.} 	 OH + CH3OOH = CH3O2 : 	5.3D-12*EXP(190/TEMP)*0.6 	;
+{3041.} 	 OH + CH3OOH = HCHO + OH : 	5.3D-12*EXP(190/TEMP)*0.4 	;
+{3042.} 	 CH3NO3 = CH3O + NO2 : 	J(51) 	;
+{3043.} 	 OH + CH3NO3 = HCHO + NO2 : 	4.0D-13*EXP(-845/TEMP) 	;
+{3044.} 	 CH3O = HCHO + HO2 : 	7.2D-14*EXP(-1080/TEMP)*O2 	;
+{3045.} 	 CH3O2NO2 = CH3O2 + NO2 : 	KMT14 	;
+{3046.} 	 HCOCH2OOH + OH = GLYOX + OH : 	2.91D-11 	;
+{3047.} 	 HCOCH2OOH + OH = HCOCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3048.} 	 HCOCH2OOH = HCOCH2O + OH : 	J(41) 	;
+{3049.} 	 HCOCH2OOH = HO2 + CO + HCHO + OH : 	J(15) 	;
+{3050.} 	 HCOCH2O = HCHO + CO + HO2 : 	KDEC 	;
+{3051.} 	 PERPROACID + OH = C2H5CO3 : 	4.42D-12 	;
+{3052.} 	 PERPROACID = C2H5O2 + OH : 	J(41) 	;
+{3053.} 	 PPN + OH = CH3CHO + CO + NO2 : 	1.27D-12 	;
+{3054.} 	 PPN = C2H5CO3 + NO2 : 	1.7D-3*EXP(-11280/TEMP) 	;
+{3055.} 	 C2H5OOH = C2H5O + OH : 	J(41) 	;
+{3056.} 	 OH + C2H5OOH = C2H5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3057.} 	 OH + C2H5OOH = CH3CHO + OH : 	8.01D-12 	;
+{3058.} 	 C2H5NO3 = C2H5O + NO2 : 	J(52) 	;
+{3059.} 	 OH + C2H5NO3 = CH3CHO + NO2 : 	6.7D-13*EXP(-395/TEMP) 	;
+{3060.} 	 BUTACID + OH = NC3H7O2 : 	1.8D-12 	;
+{3061.} 	 PERBUACID + OH = C3H7CO3 : 	8.29D-12 	;
+{3062.} 	 PERBUACID = NC3H7O2 + OH : 	J(41) 	;
+{3063.} 	 PBN + OH = C2H5CHO + CO + NO2 : 	4.70D-12 	;
+{3064.} 	 PBN = C3H7CO3 + NO2 : 	KBPAN 	;
+{3065.} 	 BUTALO2H + OH = BUTALO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3066.} 	 BUTALO2H + OH = CO2C3CHO + OH : 	1.27D-10 	;
+{3067.} 	 BUTALO2H = BUTALO + OH : 	J(41) 	;
+{3068.} 	 BUTALO2H = HO2 + CO + IC3H7O2 : 	J(15) 	;
+{3069.} 	 BUTALNO3 + OH = CO2C3CHO + NO2 : 	2.25D-11 	;
+{3070.} 	 BUTALNO3 = NO2 + BUTALO : 	J(54)+J(15) 	;
+{3071.} 	 BUTALO = CH3CHO + HCOCH2O2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{3072.} 	 BUTALO = CO2C3CHO + HO2 : 	KROSEC*O2 	;
+{3073.} 	 CO2C3CHO + NO3 = CO2C3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{3074.} 	 CO2C3CHO + OH = CO2C3CO3 : 	7.15D-11 	;
+{3075.} 	 CO2C3CHO = CH3COCH2O2 + HCHO : 	J(15) 	;
+{3076.} 	 HO2C3CHO = HO2 + CO + IPROPOLO2 : 	J(15) 	;
+{3077.} 	 NO3 + HO2C3CHO = HO2C3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{3078.} 	 OH + HO2C3CHO = CO2C3CHO + HO2 : 	4.88D-11*0.561 	;
+{3079.} 	 OH + HO2C3CHO = HO2C3CO3 : 	4.88D-11*0.439 	;
+{3080.} 	 NC3H7OOH = NC3H7O + OH : 	J(41) 	;
+{3081.} 	 OH + NC3H7OOH = C2H5CHO + OH : 	1.10D-11 	;
+{3082.} 	 OH + NC3H7OOH = NC3H7O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3083.} 	 NC3H7NO3 = NC3H7O + NO2 : 	J(53) 	;
+{3084.} 	 OH + NC3H7NO3 = C2H5CHO + NO2 : 	5.8D-13 	;
+{3085.} 	 NC3H7O = C2H5CHO + HO2 : 	2.6D-14*EXP(-255/TEMP)*O2 	;
+{3086.} 	 IBUTACID + OH = IC3H7O2 : 	2.00D-12 	;
+{3087.} 	 PERIBUACID + OH = IPRCO3 : 	6.26D-12 	;
+{3088.} 	 PERIBUACID = IC3H7O2 + OH : 	J(41) 	;
+{3089.} 	 PIPN + OH = CH3COCH3 + CO + NO2 : 	2.66D-12 	;
+{3090.} 	 PIPN = IPRCO3 + NO2 : 	KBPAN 	;
+{3091.} 	 IBUTALBO2H + OH = IBUTALBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3092.} 	 IBUTALBO2H + OH = IBUTDIAL + OH : 	7.11D-11 	;
+{3093.} 	 IBUTALBO2H = IBUTALBO + OH : 	J(41)+J(17) 	;
+{3094.} 	 IBUALANO3 + OH = IBUTDIAL + NO2 : 	2.25D-11 	;
+{3095.} 	 IBUALANO3 = IBUTALBO + NO2 : 	J(53)+J(17) 	;
+{3096.} 	 IBUTALBO = IBUTDIAL + HO2 : 	KROPRIM*O2 	;
+{3097.} 	 IBUTDIAL + NO3 = IBUDIALCO3 + HNO3 : 	2*KNO3AL*4.0 	;
+{3098.} 	 IBUTDIAL + OH = IBUDIALCO3 : 	1.44D-10 	;
+{3099.} 	 IBUTDIAL = PROPALO2 + HO2 + CO : 	J(17)*2.0 	;
+{3100.} 	 IBUTALO2H + OH = IBUTALCO2 : 	2.57D-11 	;
+{3101.} 	 IBUTALO2H = CH3COCH3 + OH + HO2 + CO : 	J(17) 	;
+{3102.} 	 IBUTALO2H = M2PROPAL2O + OH : 	J(41) 	;
+{3103.} 	 M2PROPAL2O = CH3COCH3 + HO2 + CO : 	KDEC 	;
+{3104.} 	 IC3H7OOH = IC3H7O + OH : 	J(41) 	;
+{3105.} 	 OH + IC3H7OOH = CH3COCH3 + OH : 	1.66D-11 	;
+{3106.} 	 OH + IC3H7OOH = IC3H7O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3107.} 	 IC3H7NO3 = IC3H7O + NO2 : 	J(54) 	;
+{3108.} 	 OH + IC3H7NO3 = CH3COCH3 + NO2 : 	6.2D-13*EXP(-230/TEMP) 	;
+{3109.} 	 IC3H7O = CH3COCH3 + HO2 : 	1.5D-14*EXP(-230/TEMP)*O2 	;
+{3110.} 	 PENTACID + OH = NC4H9O2 : 	6.88D-12 	;
+{3111.} 	 PERPENACID + OH = C4H9CO3 : 	1.04D-11 	;
+{3112.} 	 PERPENACID = NC4H9O2 + OH : 	J(41) 	;
+{3113.} 	 PPEN + OH = C3H7CHO + CO + NO2 : 	6.85D-12 	;
+{3114.} 	 PPEN = C4H9CO3 + NO2 : 	KBPAN 	;
+{3115.} 	 C4CHOBOOH + OH = C4CHOBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3116.} 	 C4CHOBOOH + OH = CO3C4CHO + OH : 	1.57D-10 	;
+{3117.} 	 C4CHOBOOH = C4CHOBO + OH : 	J(41)+J(15) 	;
+{3118.} 	 C4CHOBNO3 + OH = CO3C4CHO + NO2 : 	2.33D-11 	;
+{3119.} 	 C4CHOBNO3 = C4CHOBO + NO2 : 	J(54)+J(15) 	;
+{3120.} 	 C4CHOBO = CO3C4CHO + HO2 : 	KROPRIM*O2 	;
+{3121.} 	 CO3C4CHO = MEKCO2 + HO2 + CO : 	J(15) 	;
+{3122.} 	 NO3 + CO3C4CHO = CO3C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{3123.} 	 OH + CO3C4CHO = CO3C4CO3 : 	6.76D-11 	;
+{3124.} 	 NC4H9OOH = NC4H9O + OH : 	J(41) 	;
+{3125.} 	 OH + NC4H9OOH = C3H7CHO + OH : 	1.24D-11 	;
+{3126.} 	 OH + NC4H9OOH = NC4H9O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3127.} 	 NC4H9NO3 = NC4H9O + NO2 : 	J(53) 	;
+{3128.} 	 OH + NC4H9NO3 = C3H7CHO + NO2 : 	1.6D-12 	;
+{3129.} 	 NC4H9O = C3H7CHO + HO2 : 	8.9D-14*EXP(-550/TEMP)*O2 	;
+{3130.} 	 NC4H9O = HO1C4O2 : 	4.6D10*EXP(-3570/TEMP) 	;
+{3131.} 	 OH + ACO2H = HO2 + CO + HCHO : 	8.66D-12 	;
+{3132.} 	 ACO3H = HO2 + CO + HCHO + OH : 	J(41) 	;
+{3133.} 	 OH + ACO3H = ACO3 : 	1.22D-11 	;
+{3134.} 	 ACRPAN = ACO3 + NO2 : 	KBPAN 	;
+{3135.} 	 OH + ACRPAN = HOCH2CHO + CO + NO2 : 	8.63D-12 	;
+{3136.} 	 HOCHOCOOH + OH = HOCH2COCHO + OH : 	4.77D-11 	;
+{3137.} 	 HOCHOCOOH = CHOCOHCO + OH : 	J(41) 	;
+{3138.} 	 CHOCOHCO = HOCH2CHO + HO2 + CO : 	KDEC 	;
+{3139.} 	 HOCH2COCHO = HOCH2CO3 + CO + HO2 : 	J(34) 	;
+{3140.} 	 NO3 + HOCH2COCHO = HOCH2CO3 + CO + HNO3 : 	KNO3AL*2.4 	;
+{3141.} 	 OH + HOCH2COCHO = HOCH2CO3 + CO : 	1.44D-11 	;
+{3142.} 	 OCCOHCOH + OH = A2PANOO : 	6.22D-11 	;
+{3143.} 	 C32OH13CO + OH = HCOCOHCO3 : 	1.36D-10 	;
+{3144.} 	 C32OH13CO = GLYOX + HO2 + HO2 + CO : 	J(15)*2 	;
+{3145.} 	 OCCOHCOOH + OH = OCCOHCO2 : 	9.258E-11 	;
+{3146.} 	 OCCOHCOOH = OCCOHCO + OH : 	J(41) 	;
+{3147.} 	 C42AOH = HO2 + CO + HO2 + NO3CH2CHO : 	J(15) 	;
+{3148.} 	 OH + C42AOH = NMGLYOX + HO2 : 	2.92D-11 	;
+{3149.} 	 OCCOHCO = HCHO + GLYOX + HO2 : 	KDEC 	;
+{3150.} 	 HCOCO3 + HO2 = HCOCO2H + O3 : 	KAPHO2*0.15 	;
+{3151.} 	 HCOCO3 + HO2 = HCOCO3H : 	KAPHO2*0.41 	;
+{3152.} 	 HCOCO3 + HO2 = HO2 + CO + OH : 	KAPHO2*0.44 	;
+{3153.} 	 HCOCO3 + NO = HO2 + CO + NO2 : 	KAPNO 	;
+{3154.} 	 HCOCO3 + NO2 = GLYPAN : 	KFPAN 	;
+{3155.} 	 HCOCO3 + NO3 = HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{3156.} 	 HCOCO3 = CO + HO2 : 	1.00D-11*0.7*RO2 	;
+{3157.} 	 HCOCO3 = HCOCO2H : 	1.00D-11*0.3*RO2 	;
+{3158.} 	 GLYOO + CO = GLYOX : 	1.2D-15 	;
+{3159.} 	 GLYOO + NO = GLYOX + NO2 : 	1.0D-14 	;
+{3160.} 	 GLYOO + NO2 = GLYOX + NO3 : 	1.0D-15 	;
+{3161.} 	 GLYOO + SO2 = GLYOX + SO3 : 	7.0D-14 	;
+{3162.} 	 GLYOO = GLYOX + H2O2 : 	6.0D-18*H2O 	;
+{3163.} 	 GLYOO = HCOCO2H : 	1.0D-17*H2O 	;
+{3164.} 	 OH + MACO2H = CH3C2H2O2 : 	1.51D-11 	;
+{3165.} 	 MACO3H = CH3C2H2O2 + OH : 	J(41) 	;
+{3166.} 	 OH + MACO3H = MACO3 : 	1.661D-11 	;
+{3167.} 	 MPAN = MACO3 + NO2 : 	1.6D+16*EXP(-13500/TEMP) 	;
+{3168.} 	 O3 + MPAN = HCHO + CH3CO3 + NO3 : 	8.2D-18 	;
+{3169.} 	 OH + MPAN = ACETOL + CO + NO2 : 	2.9D-11 	;
+{3170.} 	 MGLYOO + CO = MGLYOX : 	1.2D-15 	;
+{3171.} 	 MGLYOO + NO = MGLYOX + NO2 : 	1.0D-14 	;
+{3172.} 	 MGLYOO + NO2 = MGLYOX + NO3 : 	1.0D-15 	;
+{3173.} 	 MGLYOO + SO2 = MGLYOX + SO3 : 	7.0D-14 	;
+{3174.} 	 MGLYOO = MGLYOX + H2O2 : 	6.0D-18*H2O 	;
+{3175.} 	 MACROOH = ACETOL + CO + HO2 + OH : 	J(17) 	;
+{3176.} 	 MACROOH = MACRO + OH : 	J(41) 	;
+{3177.} 	 OH + MACROOH = ACETOL + CO + OH : 	3.77D-11 	;
+{3178.} 	 MACRO = ACETOL + CO + HO2 : 	KDEC 	;
+{3179.} 	 MACROH = ACETOL + CO + HO2 + HO2 : 	J(17) 	;
+{3180.} 	 OH + MACROH = C3MDIALOH + HO2 : 	3.42D-11 	;
+{3181.} 	 MACROHOOH + OH = C3MDIALOH + OH : 	5.55D-11 	;
+{3182.} 	 MACROHOOH = IBUTALOH + CO + HO2  + OH : 	J(17) 	;
+{3183.} 	 MACROHOOH = MACROHO + OH : 	J(41) 	;
+{3184.} 	 MACROHNO3 + OH = NOA + CO + HO2 : 	2.18D-11 	;
+{3185.} 	 MACROHNO3 = MACROHO + NO2 : 	J(55) 	;
+{3186.} 	 MACROHNO3 = NOA + HO2 + CO + HO2 : 	J(17) 	;
+{3187.} 	 MACROHO = MGLYOX + HCHO + HO2 : 	KDEC 	;
+{3188.} 	 C3MDIALOH + OH = CHOMOHCO3 : 	1.32D-10 	;
+{3189.} 	 C3MDIALOH = MGLYOX + HO2 + CO + HO2 : 	J(17)*2 	;
+{3190.} 	 C3DBCO3H + OH = C3DBCO3 : 	1.97D-11 	;
+{3191.} 	 C3DBCO3H = CH3CHO + HO2 + CO + OH : 	J(41) 	;
+{3192.} 	 C3H5CO2H + OH = CH3CHO + HO2 + CO : 	6.48D-11 	;
+{3193.} 	 C3DBPAN + OH = CH3CHO + CO + CO + NO2 : 	1.65D-11 	;
+{3194.} 	 C3DBPAN = C3DBCO3 + NO2 : 	KBPAN 	;
+{3195.} 	 C4CONO3OOH + NO3 = C4CONO3O2 + HNO3 : 	KNO3AL*4.0 	;
+{3196.} 	 C4CONO3OOH + OH = C4CONO3O2 : 	3.45D-12 	;
+{3197.} 	 C4CONO3OOH = C4CONO3O + OH : 	J(17)+J(41) 	;
+{3198.} 	 C4CONO3O = CH3CHO + GLYOX + NO2 : 	KDEC 	;
+{3199.} 	 C4CONO3CO + NO3 = C4CONO3O2 + HNO3 : 	KNO3AL*4.0 	;
+{3200.} 	 C4CONO3CO + OH = C4CONO3O2 : 	4.27D-12 	;
+{3201.} 	 C4CONO3CO =  C4CONO3O2 + CO + HO2 : 	J(34) 	;
+{3202.} 	 C4CONO3CO = C4CO2O + NO2 : 	J(55) 	;
+{3203.} 	 COCCOHNO3 + OH = CCOCOCOH + NO2 : 	5.51D-12 	;
+{3204.} 	 COCCOHNO3 = CO + HO2 + NO2 + CH3CHOHCHO : 	J(17)+J(55) 	;
+{3205.} 	 C4NO3COOOH + NO3 = CH3CHO + GLYOX + HNO3 + NO2 + OH : 	KNO3AL*4.0 	;
+{3206.} 	 C4NO3COOOH + OH = C4NO3COO2 : 	2.74D-11 	;
+{3207.} 	 C4NO3COOOH = C4CONO3O + OH : 	J(17)+J(41) 	;
+{3208.} 	 C4NO3OCO = CH3CHO + GLYOX + NO2 : 	KDEC 	;
+{3209.} 	 C4OCCOHNO3 + OH = CO2H3CHO+ NO2 : 	4.55D-11 	;
+{3210.} 	 C4OCCOHNO3 = CHOPRNO3 + HO2 + CO : 	J(17) 	;
+{3211.} 	 CH3CHOO + CO = CH3CHO : 	1.20D-15 	;
+{3212.} 	 CH3CHOO + NO = CH3CHO + NO2 : 	1.00D-14 	;
+{3213.} 	 CH3CHOO + NO2 = CH3CHO + NO3 : 	1.00D-15 	;
+{3214.} 	 CH3CHOO + SO2 = CH3CHO + SO3 : 	7.00D-14 	;
+{3215.} 	 CH3CHOO = CH3CHO + H2O2 : 	6.00D-18*H2O 	;
+{3216.} 	 CH3CHOO = CH3CO2H : 	1.00D-17*H2O 	;
+{3217.} 	 C4OCCOHOOH + OH = CO2H3CHO + OH : 	9.53D-11 	;
+{3218.} 	 C4OCCOHOOH = C4OCCOHCO + OH : 	J(41)+J(17) 	;
+{3219.} 	 C4OCCOHCO = CH3CHO + GLYOX + HO2 : 	KDEC 	;
+{3220.} 	 C4OCCOHCOH + OH = CO2H3CHO + HO2 : 	7.01D-11 	;
+{3221.} 	 C4OCCOHCOH = CH3CHOHCHO + CO + HO2 + HO2 : 	J(17) 	;
+{3222.} 	 CO2H3CHO = MGLYOX + CO + HO2 + HO2 : 	J(15) 	;
+{3223.} 	 NO3 + CO2H3CHO = CO2H3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{3224.} 	 OH + CO2H3CHO = CO2H3CO3 : 	2.45D-11 	;
+{3225.} 	 COCCOHCOOH + OH = CCOCOCOH + OH : 	6.35D-11 	;
+{3226.} 	 COCCOHCOOH = CO + HO2 + OH + CH3CHOHCHO : 	J(17) 	;
+{3227.} 	 COCCOHCOOH = COCCOHCO + OH : 	J(41) 	;
+{3228.} 	 COCCOHCO = CO + HO2 + CH3CHOHCHO : 	KDEC 	;
+{3229.} 	 CCOCOCOH + OH = CH3CHOHCO3 + CO : 	5.39D-11 	;
+{3230.} 	 CCOCOCOH = CH3CHOHCO3 + CO + HO2 : 	J(34) 	;
+{3231.} 	 OH + SC4H9OOH = MEK + OH : 	2.15D-11 	;
+{3232.} 	 OH + SC4H9OOH = SC4H9O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3233.} 	 SC4H9OOH = SC4H9O + OH : 	J(41) 	;
+{3234.} 	 OH + SC4H9NO3 = MEK + NO2 : 	8.6D-13 	;
+{3235.} 	 SC4H9NO3 = SC4H9O + NO2 : 	J(54) 	;
+{3236.} 	 SC4H9O = CH3CHO + C2H5O2 : 	5.6D12*EXP(-5780/TEMP) 	;
+{3237.} 	 SC4H9O = MEK + HO2 : 	1.5D-14*EXP(-200/TEMP)*O2 	;
+{3238.} 	 IC4H9OOH = IC4H9O + OH : 	J(41) 	;
+{3239.} 	 OH + IC4H9OOH = IC4H9O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3240.} 	 OH + IC4H9OOH = IPRCHO + OH : 	1.24D-11 	;
+{3241.} 	 IC4H9NO3 = IC4H9O + NO2 : 	J(53) 	;
+{3242.} 	 OH + IC4H9NO3 = IPRCHO + NO2 : 	7.69D-13 	;
+{3243.} 	 IC4H9O = IPRCHO + HO2 : 	KROPRIM*O2 	;
+{3244.} 	 OH + TC4H9OOH = TC4H9O2 : 	2.17D-12*EXP(190/TEMP) 	;
+{3245.} 	 TC4H9OOH = TC4H9O + OH : 	J(41) 	;
+{3246.} 	 OH + TC4H9NO3 = CH3COCH3 + HCHO + NO2 : 	8.16D-14 	;
+{3247.} 	 TC4H9NO3 = TC4H9O + NO2 : 	J(55) 	;
+{3248.} 	 OH + PEAOOH = C4H9CHO + OH : 	1.41D-11 	;
+{3249.} 	 OH + PEAOOH = PEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3250.} 	 PEAOOH = PEAO + OH : 	J(41) 	;
+{3251.} 	 OH + PEANO3 = C4H9CHO + NO2 : 	3.00D-12 	;
+{3252.} 	 PEANO3 = PEAO + NO2 : 	J(53) 	;
+{3253.} 	 PEAO = HO1C5O2 : 	2.03D+11*EXP(-3430/TEMP) 	;
+{3254.} 	 OH + PEAOH = C4H9CHO + HO2 : 	8.57D-12 	;
+{3255.} 	 OH + PEBOOH = MPRK + OH : 	2.30D-11 	;
+{3256.} 	 OH + PEBOOH = PEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3257.} 	 PEBOOH = PEBO + OH : 	J(41) 	;
+{3258.} 	 OH + PEBNO3 = MPRK + NO2 : 	1.85D-12 	;
+{3259.} 	 PEBNO3 = PEBO + NO2 : 	J(54) 	;
+{3260.} 	 PEBO = HO2C5O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{3261.} 	 PEBO = MPRK + HO2 : 	KROSEC*O2 	;
+{3262.} 	 OH + PEBOH = MPRK + HO2 : 	1.14D-11 	;
+{3263.} 	 OH + PECOOH = DIEK + OH : 	2.73D-11 	;
+{3264.} 	 PECOOH = PECO + OH : 	J(41) 	;
+{3265.} 	 OH + PECNO3 = DIEK + NO2 : 	1.12D-12 	;
+{3266.} 	 PECNO3 = PECO + NO2 : 	J(54) 	;
+{3267.} 	 PECO = C2H5O2 + C2H5CHO : 	4.00D+14*EXP(-6990/TEMP) 	;
+{3268.} 	 PECO = DIEK + HO2 : 	KROSEC*O2 	;
+{3269.} 	 IPEAOOH = IPEAO + OH : 	J(41) 	;
+{3270.} 	 OH + IPEAOOH = BUT2CHO + OH : 	1.41D-11 	;
+{3271.} 	 OH + IPEAOOH = IPEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3272.} 	 IPEANO3 = IPEAO + NO2 : 	J(53) 	;
+{3273.} 	 OH + IPEANO3 = BUT2CHO + NO2 : 	2.01D-12 	;
+{3274.} 	 IPEAO = BUT2CHO + HO2 : 	KROPRIM*O2 	;
+{3275.} 	 IPEAO = C52O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{3276.} 	 IPEBOOH = IPEBO + OH : 	J(41) 	;
+{3277.} 	 OH + IPEBOOH = IPEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3278.} 	 OH + IPEBOOH = MIPK + OH : 	2.29D-11 	;
+{3279.} 	 IPEBNO3 = IPEBO + NO2 : 	J(54) 	;
+{3280.} 	 OH + IPEBNO3 = MIPK + NO2 : 	1.82D-12 	;
+{3281.} 	 IPEBO = CH3CHO + IC3H7O2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{3282.} 	 IPEBO = MIPK + HO2 : 	KROSEC*O2 	;
+{3283.} 	 IPECOOH = IPECO + OH : 	J(41) 	;
+{3284.} 	 OH + IPECOOH = IPECO2 : 	5.25D-12 	;
+{3285.} 	 IPECNO3 = IPECO + NO2 : 	J(55) 	;
+{3286.} 	 OH + IPECNO3 = CH3COCH3 + CH3CHO + NO2 : 	4.08D-13 	;
+{3287.} 	 IPECO = CH3COCH3 + C2H5O2 : 	2.00D+14*EXP(-6995/TEMP) 	;
+{3288.} 	 NEOPOOH = NEOPO + OH : 	J(41) 	;
+{3289.} 	 OH + NEOPOOH = NEOPO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3290.} 	 OH + NEOPOOH = TBUTCHO + OH : 	1.02D-11 	;
+{3291.} 	 NEOPNO3 = NEOPO + NO2 : 	J(53) 	;
+{3292.} 	 OH + NEOPNO3 = TBUTCHO + NO2 : 	8.50D-13 	;
+{3293.} 	 NEOPO = TC4H9O2 + HCHO : 	2.00D+14*EXP(-5505/TEMP) 	;
+{3294.} 	 OH + NEOPOH = TBUTCHO + HO2 : 	4.66D-12 	;
+{3295.} 	 NO3 + TBUTCHO = TBUTCO3 + HNO3 : 	KNO3AL*8.5 	;
+{3296.} 	 OH + TBUTCHO = TBUTCO3 : 	6.82D-12*EXP(405/TEMP) 	;
+{3297.} 	 TBUTCHO = TC4H9O2 + CO + HO2 : 	J(17) 	;
+{3298.} 	 HEXAOOH = HEXAO + OH : 	J(41) 	;
+{3299.} 	 OH + HEXAOOH = C5H11CHO + OH : 	1.52D-11 	;
+{3300.} 	 OH + HEXAOOH = HEXAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3301.} 	 HEXANO3 = HEXAO + NO2 : 	J(53) 	;
+{3302.} 	 OH + HEXANO3 = C5H11CHO + NO2 : 	4.68D-12 	;
+{3303.} 	 HEXAO = HO1C6O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3304.} 	 C5H11CHO = CH3CHO + BUT1ENE : 	J(16) 	;
+{3305.} 	 C5H11CHO = PEAO2 + HO2 + CO : 	J(15) 	;
+{3306.} 	 NO3 + C5H11CHO = C5H11CO3 + HNO3 : 	KNO3AL*5.5 	;
+{3307.} 	 OH + C5H11CHO = C5H11CO3 : 	2.88D-11 	;
+{3308.} 	 OH + HEXAOH = C5H11CHO + HO2 : 	9.72D-12 	;
+{3309.} 	 HEXBOOH = HEXBO + OH : 	J(41) 	;
+{3310.} 	 OH + HEXBOOH = HEX2ONE + OH : 	2.80D-11 	;
+{3311.} 	 OH + HEXBOOH = HEXBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3312.} 	 HEXBNO3 = HEXBO + NO2 : 	J(54) 	;
+{3313.} 	 OH + HEXBNO3 = HEX2ONE + NO2 : 	3.17D-12 	;
+{3314.} 	 HEXBO = HO2C6O2 : 	2.03D+11*EXP(-3430/TEMP) 	;
+{3315.} 	 OH + HEXBOH = HEX2ONE + HO2 : 	1.28D-11 	;
+{3316.} 	 HEXCOOH = HEXCO + OH : 	J(41) 	;
+{3317.} 	 OH + HEXCOOH = HEX3ONE + OH : 	3.23D-11 	;
+{3318.} 	 HEXCNO3 = HEXCO + NO2 : 	J(54) 	;
+{3319.} 	 OH + HEXCNO3 = HEX3ONE + NO2 : 	2.70D-12 	;
+{3320.} 	 HEXCO = HEX3ONE + HO2 : 	KROSEC*O2 	;
+{3321.} 	 HEXCO = HO3C6O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{3322.} 	 OH + HEXCOH = HEX3ONE + HO2 : 	1.45D-11 	;
+{3323.} 	 M2PEAOOH = M2PEAO + OH : 	J(41) 	;
+{3324.} 	 OH + M2PEAOOH = C54CHO + OH : 	1.79D-11 	;
+{3325.} 	 OH + M2PEAOOH = M2PEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3326.} 	 M2PEANO3 = M2PEAO + NO2 : 	J(53) 	;
+{3327.} 	 OH + M2PEANO3 = C54CHO + NO2 : 	3.53D-12 	;
+{3328.} 	 M2PEAO = HO1MC5O2 : 	2.03D+11*EXP(-3430/TEMP) 	;
+{3329.} 	 C54CHO = PEBO2 + HO2 + CO : 	J(17) 	;
+{3330.} 	 NO3 + C54CHO = C54CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3331.} 	 OH + C54CHO = C54CO3 : 	2.89D-11 	;
+{3332.} 	 OH + M2PEAOH = C54CHO + HO2 : 	8.83D-12 	;
+{3333.} 	 M2PEBOOH = M2PEBO + OH : 	J(41) 	;
+{3334.} 	 OH + M2PEBOOH = M2PEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3335.} 	 OH + M2PEBOOH = MIBK + OH : 	2.44D-11 	;
+{3336.} 	 M2PEBNO3 = M2PEBO + NO2 : 	J(54) 	;
+{3337.} 	 OH + M2PEBNO3 = MIBK + NO2 : 	3.07D-12 	;
+{3338.} 	 M2PEBO = HO2MC5O2 : 	6.10D+11*EXP(-4240/TEMP) 	;
+{3339.} 	 M2PEBO = MIBK + HO2 : 	KROSEC*O2 	;
+{3340.} 	 OH + M2PEBOH = MIBK + HO2 : 	1.28D-11 	;
+{3341.} 	 M2PECOOH = M2PECO + OH : 	J(41) 	;
+{3342.} 	 OH + M2PECOOH = EIPK + OH : 	2.87D-11 	;
+{3343.} 	 OH + M2PECOOH = M2PECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3344.} 	 M2PECNO3 = M2PECO + NO2 : 	J(54) 	;
+{3345.} 	 OH + M2PECNO3 = EIPK + NO2 : 	3.02D-12 	;
+{3346.} 	 M2PECO = C2H5O2 + IPRCHO : 	2.00D+14*EXP(-6975/TEMP) 	;
+{3347.} 	 M2PECO = EIPK + HO2 : 	KROSEC*O2 	;
+{3348.} 	 M2PECO = IC3H7O2 + C2H5CHO : 	2.00D+14*EXP(-6773/TEMP) 	;
+{3349.} 	 EIPK = C2H5CO3 + IC3H7O2 : 	J(22) 	;
+{3350.} 	 EIPK = C2H5O2 + IPRCO3 : 	J(22) 	;
+{3351.} 	 OH + EIPK = EIPKAO2 : 	3.75D-12*0.578 	;
+{3352.} 	 OH + EIPK = EIPKBO2 : 	3.75D-12*0.422 	;
+{3353.} 	 OH + M2PECOH = EIPK + HO2 : 	1.44D-11 	;
+{3354.} 	 M2PEDOOH = M2PEDO + OH : 	J(41) 	;
+{3355.} 	 OH + M2PEDOOH = M2PEDO2 : 	6.66D-12 	;
+{3356.} 	 M2PEDNO3 = M2PEDO + NO2 : 	J(55) 	;
+{3357.} 	 OH + M2PEDNO3 = CH3COCH3 + C2H5CHO + NO2 : 	1.72D-12 	;
+{3358.} 	 M2PEDO = CH3COCH3 + NC3H7O2 : 	2.70D+14*EXP(-6542/TEMP) 	;
+{3359.} 	 M2PEDO = HO2M2C5O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{3360.} 	 OH + M2PEDOH = M2PEDO : 	3.20D-12 	;
+{3361.} 	 M3PEAOOH = M3PEAO + OH : 	J(41) 	;
+{3362.} 	 OH + M3PEAOOH = M3C4CHO + OH : 	1.57D-11 	;
+{3363.} 	 OH + M3PEAOOH = M3PEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3364.} 	 M3PEANO3 = M3PEAO + NO2 : 	J(53) 	;
+{3365.} 	 OH + M3PEANO3 = M3C4CHO + NO2 : 	4.96D-12 	;
+{3366.} 	 M3PEAO = H1MC5O2 : 	2.03D+11*EXP(-3430/TEMP) 	;
+{3367.} 	 M3C4CHO = IPEAO2 + HO2 + CO : 	J(15) 	;
+{3368.} 	 NO3 + M3C4CHO = M3C4CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3369.} 	 OH + M3C4CHO = M3C4CO3 : 	3.27D-11 	;
+{3370.} 	 OH + M3PEAOH = M3C4CHO + HO2 : 	1.03D-11 	;
+{3371.} 	 M3PEBOOH = M3PEBO + OH : 	J(41) 	;
+{3372.} 	 OH + M3PEBOOH = M2BK + OH : 	2.46D-11 	;
+{3373.} 	 OH + M3PEBOOH = M3PEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3374.} 	 M3PEBNO3 = M3PEBO + NO2 : 	J(54) 	;
+{3375.} 	 OH + M3PEBNO3 = M2BK + NO2 : 	3.02D-12 	;
+{3376.} 	 M3PEBO = H2MC5O2 : 	2.03D+11*EXP(-4240/TEMP) 	;
+{3377.} 	 M3PEBO = M2BK + HO2 : 	KROSEC*O2 	;
+{3378.} 	 M2BK = CH3CO3 + SC4H9O2 : 	J(22) 	;
+{3379.} 	 OH + M2BK = M2BKAO2 : 	6.23D-12*0.671 	;
+{3380.} 	 OH + M2BK = M2BKBO2 : 	6.23D-12*0.329 	;
+{3381.} 	 OH + M3PEBOH = M2BK + HO2 : 	1.31D-11 	;
+{3382.} 	 M3PECOOH = M3PECO + OH : 	J(41) 	;
+{3383.} 	 OH + M3PECOOH = M3PECO2 : 	6.40D-12 	;
+{3384.} 	 M3PECNO3 = M3PECO + NO2 : 	J(55) 	;
+{3385.} 	 OH + M3PECNO3 = CH3CHO + MEK + NO2 : 	7.35D-13 	;
+{3386.} 	 M3PECO = C2H5O2 + MEK : 	2.70D+14*EXP(-7196/TEMP)*2.0 	;
+{3387.} 	 OH + M3PECOH = M3PECO : 	2.94D-12 	;
+{3388.} 	 M22C43OOH = M22C43O + OH : 	J(41) 	;
+{3389.} 	 OH + M22C43OOH = M22C43O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3390.} 	 OH + M22C43OOH = MTBK + OH : 	9.51D-12 	;
+{3391.} 	 M22C43NO3 = M22C43O + NO2 : 	J(54) 	;
+{3392.} 	 OH + M22C43NO3 = MTBK + NO2 : 	6.24D-13 	;
+{3393.} 	 M22C43O = MTBK + HO2 : 	KROSEC*O2 	;
+{3394.} 	 M22C43O = TC4H9O2 + CH3CHO : 	2.70D+14*EXP(-6643/TEMP) 	;
+{3395.} 	 OH + M22C43OH = MTBK + HO2 : 	9.16D-12 	;
+{3396.} 	 M22C4OOH = M22C4O + OH : 	J(41) 	;
+{3397.} 	 OH + M22C4OOH = M22C3CHO + OH : 	1.16D-11 	;
+{3398.} 	 OH + M22C4OOH = M22C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3399.} 	 M22C4NO3 = M22C4O + NO2 : 	J(53) 	;
+{3400.} 	 OH + M22C4NO3 = M22C3CHO + NO2 : 	7.78D-13 	;
+{3401.} 	 M22C4O = HM33C4O2 : 	9.14D+11*EXP(-4240/TEMP) 	;
+{3402.} 	 M22C3CHO = NEOPO2 + HO2 + CO : 	J(15) 	;
+{3403.} 	 NO3 + M22C3CHO = M22C3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3404.} 	 OH + M22C3CHO = M22C3CO3 : 	2.21D-11 	;
+{3405.} 	 OH + M22C4OH = M22C3CHO + HO2 : 	6.08D-12 	;
+{3406.} 	 M33C4OOH = M33C4O + OH : 	J(41) 	;
+{3407.} 	 OH + M33C4OOH = M33C3CHO + OH : 	1.13D-11 	;
+{3408.} 	 OH + M33C4OOH = M33C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3409.} 	 M33C4NO3 = M33C4O + NO2 : 	J(53) 	;
+{3410.} 	 OH + M33C4NO3 = M33C3CHO + NO2 : 	1.96D-12 	;
+{3411.} 	 M33C4O = HM22C4O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{3412.} 	 M33C4O = M33C3CHO + HO2 : 	KROPRIM*O2 	;
+{3413.} 	 M33C3CHO = IPECO2 + HO2 + CO : 	J(17) 	;
+{3414.} 	 NO3 + M33C3CHO = M33C3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3415.} 	 OH + M33C3CHO = M33C3CO3 : 	2.56D-11 	;
+{3416.} 	 OH + M33C4OH = M33C3CHO + HO2 : 	5.81D-12 	;
+{3417.} 	 M23C43OOH = M23C43O + OH : 	J(41) 	;
+{3418.} 	 OH + M23C43OOH = M23C43O2 : 	6.66D-12 	;
+{3419.} 	 M23C43NO3 = M23C43O + NO2 : 	J(55) 	;
+{3420.} 	 OH + M23C43NO3 = CH3COCH3 + CH3COCH3 + NO2 : 	7.77D-13 	;
+{3421.} 	 M23C43O = IC3H7O2 + CH3COCH3 : 	2.70D+14*EXP(-6391/TEMP) 	;
+{3422.} 	 OH + M23C43OH = M23C43O : 	3.20D-12 	;
+{3423.} 	 M23C4OOH = M23C4O + OH : 	J(41) 	;
+{3424.} 	 OH + M23C4OOH = M23C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3425.} 	 OH + M23C4OOH = M2C43CHO + OH : 	1.55D-11 	;
+{3426.} 	 M23C4NO3 = M23C4O + NO2 : 	J(53) 	;
+{3427.} 	 OH + M23C4NO3 = M2C43CHO + NO2 : 	3.41D-12 	;
+{3428.} 	 M23C4O = HM23C4O2 : 	6.10D+11*EXP(-4240/TEMP) 	;
+{3429.} 	 M23C4O = M2C43CHO + HO2 : 	KROPRIM*O2 	;
+{3430.} 	 OH + M23C4OH = M2C43CHO + HO2 : 	1.05D-11 	;
+{3431.} 	 M2C43CHO = IPEBO2 + HO2 + CO : 	J(17) 	;
+{3432.} 	 NO3 + M2C43CHO = M2C43CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3433.} 	 OH + M2C43CHO = M2C43CO3 : 	3.01D-11 	;
+{3434.} 	 HEPTOOH = HEPTO + OH : 	J(41) 	;
+{3435.} 	 OH + HEPTOOH = HEPT3ONE + OH : 	3.37D-11 	;
+{3436.} 	 HEPTNO3 = HEPTO + NO2 : 	J(54) 	;
+{3437.} 	 OH + HEPTNO3 = HEPT3ONE + NO2 : 	3.69D-12 	;
+{3438.} 	 HEPTO = HO3C76O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3439.} 	 HEPT3ONE = C2H5CO3 + NC4H9O2 : 	J(22) 	;
+{3440.} 	 OH + HEPT3ONE = CO3C75O2 : 	7.89D-12 	;
+{3441.} 	 OH + HEPTOH = HEPT3ONE + HO2 : 	1.59D-11 	;
+{3442.} 	 M2HEXAOOH = M2HEXAO + OH : 	J(41) 	;
+{3443.} 	 OH + M2HEXAOOH = M2CO5C6 + OH : 	2.94D-11 	;
+{3444.} 	 M2HEXANO3 = M2HEXAO + NO2 : 	J(54) 	;
+{3445.} 	 OH + M2HEXANO3 = M2CO5C6 + NO2 : 	4.49D-12 	;
+{3446.} 	 M2HEXAO = H2M5C65O2 : 	1.02D+11*EXP(-2945/TEMP) 	;
+{3447.} 	 M2CO5C6 = CH3CO3 + IPEAO2 : 	J(22) 	;
+{3448.} 	 OH + M2CO5C6 = C75O2 : 	8.16D-12 	;
+{3449.} 	 OH + M2HEXAOH = M2CO5C6 + HO2 : 	1.42D-11 	;
+{3450.} 	 M2HEXBOOH = M2HEXBO + OH : 	J(41) 	;
+{3451.} 	 OH + M2HEXBOOH = M2HEXBO2 : 	8.08D-12 	;
+{3452.} 	 M2HEXBNO3 = M2HEXBO + NO2 : 	J(55) 	;
+{3453.} 	 OH + M2HEXBNO3 = CH3COCH3 + NO2 + C3H7CHO : 	3.01D-12 	;
+{3454.} 	 M2HEXBO = H2M2C65O2 : 	2.03D+11*EXP(-3430/TEMP) 	;
+{3455.} 	 OH + M2HEXBOH = M2HEXBO : 	4.62D-12 	;
+{3456.} 	 M3HEXAOOH = M3HEXAO + OH : 	J(41) 	;
+{3457.} 	 OH + M3HEXAOOH = M3CO5C6 + OH : 	2.96D-11 	;
+{3458.} 	 M3HEXANO3 = M3HEXAO + NO2 : 	J(54) 	;
+{3459.} 	 OH + M3HEXANO3 = M3CO5C6 + NO2 : 	4.60D-12 	;
+{3460.} 	 M3HEXAO = H2M4C65O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3461.} 	 M3CO5C6 = CH3CO3 + IPEAO2 : 	J(22) 	;
+{3462.} 	 OH + M3CO5C6 = C710O2 : 	1.18D-11 	;
+{3463.} 	 OH + M3HEXAOH = M3CO5C6 + HO2 : 	1.45D-11 	;
+{3464.} 	 M3HEXBOOH = M3HEXBO + OH : 	J(41) 	;
+{3465.} 	 OH + M3HEXBOOH = M3HEXBO2 : 	7.81D-12 	;
+{3466.} 	 M3HEXBNO3 = M3HEXBO + NO2 : 	J(55) 	;
+{3467.} 	 OH + M3HEXBNO3 = MEK + C2H5CHO + NO2 : 	1.93D-12 	;
+{3468.} 	 M3HEXBO = H3M3C6O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{3469.} 	 OH + M3HEXBOH = M3HEXBO : 	4.35D-12 	;
+{3470.} 	 OCTOOH = OCTO + OH : 	J(41) 	;
+{3471.} 	 OH + OCTOOH = OCT3ONE + OH : 	3.51D-11 	;
+{3472.} 	 OCTNO3 = OCTO + NO2 : 	J(54) 	;
+{3473.} 	 OH + OCTNO3 = OCT3ONE + NO2 : 	3.88D-12 	;
+{3474.} 	 OCTO = HO3C86O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3475.} 	 OCT3ONE = C2H5CO3 + PEAO2 : 	J(22) 	;
+{3476.} 	 OH + OCT3ONE = CO3C85O2 : 	9.30D-12 	;
+{3477.} 	 OH + OCTOH = OCT3ONE + HO2 : 	1.73D-11 	;
+{3478.} 	 NONOOH = NONO + OH : 	J(41) 	;
+{3479.} 	 OH + NONOOH = NON3ONE + OH : 	3.65D-11 	;
+{3480.} 	 NONNO3 = NONO + NO2 : 	J(54) 	;
+{3481.} 	 OH + NONNO3 = NON3ONE + NO2 : 	6.26D-12 	;
+{3482.} 	 NONO = HO3C96O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3483.} 	 NON3ONE = C2H5CO3 + HEXAO2 : 	J(22) 	;
+{3484.} 	 OH + NON3ONE = C91O2 : 	1.07D-11 	;
+{3485.} 	 OH + NONOH = NON3ONE + HO2 : 	1.87D-11 	;
+{3486.} 	 DECOOH = DECO + OH : 	J(41) 	;
+{3487.} 	 OH + DECOOH = DEC3ONE + OH : 	3.79D-11 	;
+{3488.} 	 DECNO3 = DECO + NO2 : 	J(54) 	;
+{3489.} 	 OH + DECNO3 = DEC3ONE + NO2 : 	7.67D-12 	;
+{3490.} 	 DECO = HO3C106O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3491.} 	 DEC3ONE = C2H5CO3 + HEPTO2 : 	J(22) 	;
+{3492.} 	 OH + DEC3ONE = C101O2 : 	1.21D-11 	;
+{3493.} 	 OH + DECOH = DEC3ONE + HO2 : 	2.01D-11 	;
+{3494.} 	 OH + UDECOOH = UDEC3ONE + OH : 	3.93D-11 	;
+{3495.} 	 UDECOOH = UDECO + OH : 	J(41) 	;
+{3496.} 	 OH + UDECNO3 = UDEC3ONE + NO2 : 	9.08D-12 	;
+{3497.} 	 UDECNO3 = UDECO + NO2 : 	J(54) 	;
+{3498.} 	 UDECO = HO3C116O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3499.} 	 OH + UDEC3ONE = C111O2 : 	1.35D-11 	;
+{3500.} 	 UDEC3ONE = C2H5CO3 + OCTO2 : 	J(22) 	;
+{3501.} 	 OH + UDECOH = UDEC3ONE + HO2 : 	2.15D-11 	;
+{3502.} 	 DDECOOH = DDECO + OH : 	J(41) 	;
+{3503.} 	 OH + DDECOOH = DDEC3ONE + OH : 	4.07D-11 	;
+{3504.} 	 DDECNO3 = DDECO + NO2 : 	J(54) 	;
+{3505.} 	 OH + DDECNO3 = DDEC3ONE + NO2 : 	1.05D-11 	;
+{3506.} 	 DDECO = HO3C126O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{3507.} 	 DDEC3ONE = C2H5CO3 + NONO2 : 	J(22) 	;
+{3508.} 	 OH + DDEC3ONE = C121O2 : 	1.49D-11 	;
+{3509.} 	 OH + DDECOH = DDEC3ONE + HO2 : 	2.29D-11 	;
+{3510.} 	 CHEXOOH = CHEXO + OH : 	J(41) 	;
+{3511.} 	 OH + CHEXOOH = CYHEXONE + OH : 	3.53D-11 	;
+{3512.} 	 CHEXNO3 = CHEXO + NO2 : 	J(54) 	;
+{3513.} 	 OH + CHEXNO3 = CYHEXONE + NO2 : 	3.30D-12 	;
+{3514.} 	 CHEXO = CO1C6O2 : 	3.80D+13*EXP(-6026/TEMP) 	;
+{3515.} 	 CHEXO = CYHEXONE + HO2 : 	KROSEC*O2 	;
+{3516.} 	 ETHO2HNO3 + OH = ETHENO3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3517.} 	 ETHO2HNO3 + OH = NO3CH2CHO + OH : 	1.62D-12 	;
+{3518.} 	 ETHO2HNO3 = ETHENO3O + OH : 	J(41) 	;
+{3519.} 	 ETHENO3O = NO2 + HCHO + HCHO : 	7.00D+03 	;
+{3520.} 	 ETHENO3O = NO3CH2CHO + HO2 : 	KROPRIM*O2 	;
+{3521.} 	 NO3CH2CHO + NO3 = NO3CH2CO3 + HNO3 : 	KNO3AL 	;
+{3522.} 	 NO3CH2CHO + OH = NO3CH2CO3 : 	3.40D-12 	;
+{3523.} 	 NO3CH2CHO = HO2 + CO + HCHO + NO2 : 	J(57) 	;
+{3524.} 	 NO3CH2CHO = NO2 + HCOCH2O : 	J(56) 	;
+{3525.} 	 PR1O2HNO3 + OH = CHOPRNO3 + OH : 	1.69D-12 	;
+{3526.} 	 PR1O2HNO3 + OH = PRONO3AO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3527.} 	 PR1O2HNO3 = PRONO3AO + OH : 	J(41) 	;
+{3528.} 	 PRONO3AO = CHOPRNO3 + HO2 : 	KROPRIM*O2 	;
+{3529.} 	 PRONO3AO = HCHO + CH3CHO + NO2 : 	7.00D+03 	;
+{3530.} 	 CHOPRNO3 + NO3 = PRNO3CO3 + HNO3 : 	KNO3AL*2.4 	;
+{3531.} 	 CHOPRNO3 + OH = PRNO3CO3 : 	3.55D-12 	;
+{3532.} 	 CHOPRNO3 = HO2 + CO + CH3CHO + NO2 : 	J(57) 	;
+{3533.} 	 CHOPRNO3 = PROPALO + NO2 : 	J(56) 	;
+{3534.} 	 PR2O2HNO3 + OH = NOA + OH : 	3.47D-12 	;
+{3535.} 	 PR2O2HNO3 + OH = PRONO3BO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3536.} 	 PR2O2HNO3 = PRONO3BO + OH : 	J(41) 	;
+{3537.} 	 PRONO3BO = CH3CHO + HCHO + NO2 : 	7.00D+03 	;
+{3538.} 	 PRONO3BO = NOA + HO2 : 	KROSEC*O2 	;
+{3539.} 	 NOA + OH = MGLYOX + NO2 : 	1D-12 	;
+{3540.} 	 NOA = CH3CO3 + HCHO + NO2 : 	J(57) 	;
+{3541.} 	 NOA = CH3COCH2O + NO2 : 	J(56) 	;
+{3542.} 	 BU1ENO3OOH + OH = BU1ENO3O2 : 	8.97D-12 	;
+{3543.} 	 BU1ENO3OOH = BU1ENO3O + OH : 	J(41) 	;
+{3544.} 	 BU1ENO3O = C2H5CHO + HCHO + NO2 : 	7.00D+03 	;
+{3545.} 	 BU1ENO3O = CO3C4NO3 + HO2 : 	KROSEC*O2 	;
+{3546.} 	 CO3C4NO3 + OH = CO3C4NO3O2 : 	8.2D-13 	;
+{3547.} 	 CO3C4NO3 = C2H5CO3 + HCHO + NO2 : 	J(57) 	;
+{3548.} 	 CO3C4NO3 = MEKCO + NO2 : 	J(56) 	;
+{3549.} 	 HO3C4NO3 + OH = HO3C3CHO + NO2 : 	3.03D-12 	;
+{3550.} 	 C43NO34OOH + OH = C43NO34O2 : 	5.64D-12 	;
+{3551.} 	 C43NO34OOH = C43NO34O + OH : 	J(41) 	;
+{3552.} 	 C43NO34O = BUTAL2NO3 + HO2 : 	KROPRIM*O2 	;
+{3553.} 	 C43NO34O = C2H5CHO + HCHO + NO2 : 	7.00D+03 	;
+{3554.} 	 BUTAL2NO3 + OH = EGLYOX + NO2 : 	4.44D-12 	;
+{3555.} 	 BUTAL2NO3 = BUTAL2O + NO2 : 	J(54) 	;
+{3556.} 	 BUTAL2NO3 = C2H5CHO + HO2 + CO + NO2 : 	J(17) 	;
+{3557.} 	 C2H5CHOO + CO = C2H5CHO : 	1.20D-15 	;
+{3558.} 	 C2H5CHOO + NO = C2H5CHO + NO2 : 	1.00D-14 	;
+{3559.} 	 C2H5CHOO + NO2 = C2H5CHO + NO3 : 	1.00D-15 	;
+{3560.} 	 C2H5CHOO + SO2 = C2H5CHO + SO3 : 	7.00D-14 	;
+{3561.} 	 C2H5CHOO = C2H5CHO + H2O2 : 	6.00D-18*H2O 	;
+{3562.} 	 C2H5CHOO = PROPACID : 	1.00D-17*H2O 	;
+{3563.} 	 HO3C4OOH + OH = HO3C3CHO + OH : 	2.14D-11 	;
+{3564.} 	 HO3C4OOH + OH = HO3C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3565.} 	 HO3C4OOH = HO3C4O + OH : 	J(41) 	;
+{3566.} 	 HO3C4O = C2H5CHO + HCHO + HO2 : 	2.00D+14*EXP(-5538/TEMP) 	;
+{3567.} 	 HO3C3CHO + NO3 = HO3C3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{3568.} 	 HO3C3CHO + OH = HO3C3CO3 : 	3.08D-11 	;
+{3569.} 	 HO3C3CHO = C2H5CHO + HCHO + HO2 : 	J(15) 	;
+{3570.} 	 C42NO33OOH + OH = BUTONENO3 + OH : 	7.15D-12 	;
+{3571.} 	 C42NO33OOH = C42NO33O + OH : 	J(41) 	;
+{3572.} 	 C42NO33O = BUTONENO3 + HO2 : 	KROSEC*O2 	;
+{3573.} 	 C42NO33O = CH3CHO + CH3CHO + NO2 : 	4.00D+04 	;
+{3574.} 	 BUTONENO3 + OH = BIACET + NO2 : 	1.2D-12 	;
+{3575.} 	 BUTONENO3 = CH3CHO + CH3CO3 + NO2 : 	J(57) 	;
+{3576.} 	 BUTONENO3 = MEKBO + NO2 : 	J(56) 	;
+{3577.} 	 MPRANO3OOH + OH = MPRANO3O2 : 	3.98D-12 	;
+{3578.} 	 MPRANO3OOH = MPRANO3O + OH : 	J(41) 	;
+{3579.} 	 MPRANO3O = CH3COCH3 + HCHO + NO2 : 	KDEC 	;
+{3580.} 	 MPRBNO3OOH + OH = MPRBNO3O2 : 	5.22D-12 	;
+{3581.} 	 MPRBNO3OOH = MPRBNO3O + OH : 	J(41) 	;
+{3582.} 	 MPRBNO3O = CH3COCH3 + HCHO + NO2 : 	7.00D+03 	;
+{3583.} 	 MPRBNO3O = MPRBNO3CHO + HO2 : 	KROPRIM*O2 	;
+{3584.} 	 MPRBNO3CHO + NO3 = MPRBNO3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{3585.} 	 MPRBNO3CHO + OH = MPRBNO3CO3 : 	3.61D-12 	;
+{3586.} 	 MPRBNO3CHO = CH3COCH3 + NO2 + HO2 + CO : 	J(15) 	;
+{3587.} 	 MPRBNO3CHO = M2PROPAL2O + NO2 : 	J(56) 	;
+{3588.} 	 CH3CCH3OO + CO = CH3COCH3 : 	1.20D-15 	;
+{3589.} 	 CH3CCH3OO + NO = CH3COCH3 + NO2 : 	1.00D-14 	;
+{3590.} 	 CH3CCH3OO + NO2 = CH3COCH3 + NO3 : 	1.00D-15 	;
+{3591.} 	 CH3CCH3OO + SO2 = CH3COCH3 + SO3 : 	7.00D-14 	;
+{3592.} 	 CH3CCH3OO = CH3COCH3 + H2O2 : 	6.00D-18*H2O 	;
+{3593.} 	 C51NO32OOH + OH = C51NO32CO + OH : 	1.06D-11 	;
+{3594.} 	 C51NO32OOH + OH = C51NO32O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3595.} 	 C51NO32OOH = C51NO32O + OH : 	J(41) 	;
+{3596.} 	 C51NO32O = C3H7CHO + HCHO + NO2 : 	7.00D+03 	;
+{3597.} 	 C51NO32O = C51NO32CO + HO2 : 	KROSEC*O2 	;
+{3598.} 	 C51NO32CO + OH = C5NO3COAO2 : 	4.70D-12 	;
+{3599.} 	 C51NO32CO = C3H7CO3 + HCHO + NO2 : 	J(57) 	;
+{3600.} 	 C51NO32CO = PEN2ONE1O + NO2 : 	J(56) 	;
+{3601.} 	 PE1ENEBNO3 + OH = C4OHCHO + NO2 : 	3.43D-12 	;
+{3602.} 	 C52NO31OOH + OH = C52NO31CO + OH : 	3.23D-12 	;
+{3603.} 	 C52NO31OOH + OH = C52NO31O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3604.} 	 C52NO31OOH = C52NO31O + OH : 	J(41) 	;
+{3605.} 	 C52NO31O = C3H7CHO + HCHO + NO2 : 	7.00D+03 	;
+{3606.} 	 C52NO31O = C52NO31CO + HO2 : 	KROPRIM*O2 	;
+{3607.} 	 C52NO31CO + NO3 = C4NO3CO3 + HNO3 : 	KNO3AL*5.5 	;
+{3608.} 	 C52NO31CO + OH = C4NO3CO3 : 	5.77D-12 	;
+{3609.} 	 C52NO31CO = C3H7CHO + CO + HO2 + NO2 : 	J(57) 	;
+{3610.} 	 C52NO31CO = C4CHO2O + NO2 : 	J(56) 	;
+{3611.} 	 PE1ENEANO3 + OH = C51OH2CO + NO2 : 	2.46D-12 	;
+{3612.} 	 C3H7CHOO + CO = C3H7CHO : 	1.20D-15 	;
+{3613.} 	 C3H7CHOO + NO = C3H7CHO + NO2 : 	1.00D-14 	;
+{3614.} 	 C3H7CHOO + NO2 = C3H7CHO + NO3 : 	1.00D-15 	;
+{3615.} 	 C3H7CHOO + SO2 = C3H7CHO + SO3 : 	7.00D-14 	;
+{3616.} 	 C3H7CHOO = BUTACID : 	1.00D-17*H2O 	;
+{3617.} 	 C3H7CHOO = C3H7CHO + H2O2 : 	6.00D-18*H2O 	;
+{3618.} 	 C51OH2OOH + OH = C51OH2CO + OH : 	3.15D-11 	;
+{3619.} 	 C51OH2OOH + OH = PE1ENEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3620.} 	 C51OH2OOH = PE1ENEAO + OH : 	J(41) 	;
+{3621.} 	 PE1ENEAO = C3H7CHO + HCHO + HO2 : 	2.00D+14*EXP(-6382/TEMP) 	;
+{3622.} 	 C51OH2CO + OH = C5OH2CO4O2 : 	7.26D-12 	;
+{3623.} 	 C51OH2CO = HOCH2CO3 + NC3H7O2 : 	J(22) 	;
+{3624.} 	 HO12C5 + OH = C51OH2CO + HO2 : 	1.73D-11 	;
+{3625.} 	 C52OH1OOH + OH = C4OHCHO + OH : 	2.16D-11 	;
+{3626.} 	 C52OH1OOH + OH = PE1ENEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3627.} 	 C52OH1OOH = PE1ENEBO + OH : 	J(41) 	;
+{3628.} 	 PE1ENEBO = C3H7CHO + HCHO + HO2 : 	2.00D+14*EXP(-5489/TEMP) 	;
+{3629.} 	 C4OHCHO + NO3 = C4OHCO3 + HNO3 : 	KNO3AL*5.5 	;
+{3630.} 	 C4OHCHO + OH = C4OHCO3 : 	3.30D-11 	;
+{3631.} 	 C4OHCHO = C3H7CHO + CO + HO2 + HO2 : 	J(15) 	;
+{3632.} 	 C52NO33OOH + OH = C52NO33CO + OH : 	5.45D-12 	;
+{3633.} 	 C52NO33OOH + OH = C52NO33O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3634.} 	 C52NO33OOH = C52NO33O + OH : 	J(41) 	;
+{3635.} 	 C52NO33O = C2H5CHO + CH3CHO + NO2 : 	4.00D+04 	;
+{3636.} 	 C52NO33O = C52NO33CO + HO2 : 	KROSEC*O2 	;
+{3637.} 	 C52NO33CO + OH = C5NO3CO4O2 : 	1.41D-12 	;
+{3638.} 	 C52NO33CO = C2H5CO3 + CH3CHO + NO2 : 	J(57) 	;
+{3639.} 	 C52NO33CO = DIEKAO + NO2 : 	J(56) 	;
+{3640.} 	 C53NO32OOH + OH = C53NO32CO + OH : 	3.90D-12 	;
+{3641.} 	 C53NO32OOH + OH = C53NO32O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3642.} 	 C53NO32OOH = C53NO32O + OH : 	J(41) 	;
+{3643.} 	 C53NO32O = C53NO32CO + HO2 : 	KROSEC*O2 	;
+{3644.} 	 C53NO32O = CH3CHO + C2H5CHO + NO2 : 	4.00D+04 	;
+{3645.} 	 C53NO32CO + OH = C5CONO34O2 : 	1.16D-12 	;
+{3646.} 	 C53NO32CO = CH3CO3 + C2H5CHO + NO2 : 	J(57) 	;
+{3647.} 	 C53NO32CO = MPRKAO + NO2 : 	J(56) 	;
+{3648.} 	 PE2ENEANO3 + OH = DIEKAOH + NO2 : 	2.14D-12 	;
+{3649.} 	 C52OH3OOH + OH = DIEKAOH + OH : 	3.56D-11 	;
+{3650.} 	 C52OH3OOH + OH = PE2ENEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3651.} 	 C52OH3OOH = PE2ENEAO + OH : 	J(41) 	;
+{3652.} 	 PE2ENEAO = C2H5CHO + CH3CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{3653.} 	 DIEKAOH + OH = CO23C5 : 	1.02D-11 	;
+{3654.} 	 DIEKAOH = CH3CHO + C2H5CO3 : 	J(22) 	;
+{3655.} 	 C4NO3M1OOH + OH = C4NO32M1O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3656.} 	 C4NO3M1OOH + OH = C4NO3CHO + OH : 	1.95D-12 	;
+{3657.} 	 C4NO3M1OOH = C4NO32M1O + OH : 	J(41) 	;
+{3658.} 	 C4NO32M1O = C4NO3CHO + HO2 : 	KROPRIM*O2 	;
+{3659.} 	 C4NO32M1O = MEK + HCHO + NO2 : 	7.00D+03 	;
+{3660.} 	 C4NO3CHO + NO3 = C43NO3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3661.} 	 C4NO3CHO + OH = C43NO3CO3 : 	4.48D-12 	;
+{3662.} 	 C4NO3CHO = C42CHO2O + NO2 : 	J(56) 	;
+{3663.} 	 C4NO3CHO = MEK + NO2 + HO2 + CO : 	J(15) 	;
+{3664.} 	 C4NO32MOOH + OH = C4NO32M2O2 : 	5.13D-12 	;
+{3665.} 	 C4NO32MOOH = C4NO32M2O + OH : 	J(41) 	;
+{3666.} 	 C4NO32M2O = MEK + HCHO + NO2 : 	KDEC 	;
+{3667.} 	 C2H5MECOO + CO = MEK : 	1.20D-15 	;
+{3668.} 	 C2H5MECOO + NO = MEK + NO2 : 	1.00D-14 	;
+{3669.} 	 C2H5MECOO + NO2 = MEK + NO3 : 	1.00D-15 	;
+{3670.} 	 C2H5MECOO + SO2 = MEK + SO3 : 	7.00D-14 	;
+{3671.} 	 C2H5MECOO = MEK + H2O2 : 	6.00D-18*H2O 	;
+{3672.} 	 C4MNO31OOH + OH = C4M3NO31O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3673.} 	 C4MNO31OOH + OH = C4M3NO3ONE + OH : 	6.78D-12 	;
+{3674.} 	 C4MNO31OOH = C4M3NO31O + OH : 	J(41) 	;
+{3675.} 	 C4M3NO31O = C4M3NO3ONE + HO2 : 	KROSEC*O2 	;
+{3676.} 	 C4M3NO31O = IPRCHO + HCHO + NO2 : 	7.00D+03 	;
+{3677.} 	 C4M3NO3ONE + OH = C4MCONO3O2 : 	1.73D-12 	;
+{3678.} 	 C4M3NO3ONE = IPRCO3 + HCHO + NO2 : 	J(57) 	;
+{3679.} 	 C4M3NO3ONE = IPRCOMO + NO2 : 	J(56) 	;
+{3680.} 	 M3BU2OLNO3 + OH = C3M3OH2CHO + NO2 : 	4.58D-12 	;
+{3681.} 	 M3BU2OLNO3 = ME3BU2OLO + NO2 : 	J(53) 	;
+{3682.} 	 C4MNO32OOH + OH = C3MNO3CHO + OH : 	2.41D-12 	;
+{3683.} 	 C4MNO32OOH + OH = C4M3NO32O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3684.} 	 C4MNO32OOH = C4M3NO32O + OH : 	J(41) 	;
+{3685.} 	 C4M3NO32O = C3MNO3CHO + HO2 : 	KROPRIM*O2 	;
+{3686.} 	 C4M3NO32O = IPRCHO + HCHO + NO2 : 	7.00D+03 	;
+{3687.} 	 C3MNO3CHO + NO3 = C3MNO3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3688.} 	 C3MNO3CHO + OH = C3MNO3CO3 : 	5.49D-12 	;
+{3689.} 	 C3MNO3CHO = IPRCHO + HO2 + CO + NO2 : 	J(57) 	;
+{3690.} 	 C3MNO3CHO = M3BUTAL2O + NO2 : 	J(56) 	;
+{3691.} 	 IPRCHOO + CO = IPRCHO : 	1.20D-15 	;
+{3692.} 	 IPRCHOO + NO = IPRCHO + NO2 : 	1.00D-14 	;
+{3693.} 	 IPRCHOO + NO2 = IPRCHO + NO3 : 	1.00D-15 	;
+{3694.} 	 IPRCHOO + SO2 = IPRCHO + SO3 : 	7.00D-14 	;
+{3695.} 	 IPRCHOO = IBUTACID : 	1.00D-17*H2O 	;
+{3696.} 	 IPRCHOO = IPRCHO + H2O2 : 	6.00D-18*H2O 	;
+{3697.} 	 M3BU2OLOOH + OH = C3M3OH2CHO + OH : 	2.28D-11 	;
+{3698.} 	 M3BU2OLOOH + OH = ME3BU2OLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3699.} 	 M3BU2OLOOH = ME3BU2OLO + OH : 	J(41) 	;
+{3700.} 	 ME3BU2OLO = IPRCHO + HCHO + HO2 : 	KDEC 	;
+{3701.} 	 C3M3OH2CHO + NO3 = C3M3OH2CO3 + HNO3 : 	KNO3AL*8.5 	;
+{3702.} 	 C3M3OH2CHO + OH = C3M3OH2CO3 : 	3.51D-11 	;
+{3703.} 	 C3M3OH2CHO = IPRCHO + HO2 + CO : 	J(17) 	;
+{3704.} 	 C4NO3M2OOH + OH = C4M2NO32O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3705.} 	 C4NO3M2OOH + OH = C4M2NO3ONE + OH : 	7.08D-12 	;
+{3706.} 	 C4NO3M2OOH = C4M2NO32O + OH : 	J(41) 	;
+{3707.} 	 C4M2NO32O = C4M2NO3ONE + HO2 : 	KROSEC*O2 	;
+{3708.} 	 C4M2NO32O = CH3COCH3 + CH3CHO + NO2 : 	4.00D+04 	;
+{3709.} 	 C4M2NO3ONE + OH = MC4CONO3O2 : 	3.41D-13 	;
+{3710.} 	 C4M2NO3ONE = CH3CO3 + CH3COCH3 + NO2 : 	J(57) 	;
+{3711.} 	 C4M2NO3ONE = MIPKAO + NO2 : 	J(56) 	;
+{3712.} 	 C4M2NO3OOH + OH = C4M2NO33O2 : 	4.06D-12 	;
+{3713.} 	 C4M2NO3OOH = C4M2NO33O + OH : 	J(41) 	;
+{3714.} 	 C4M2NO33O = CH3CHO + CH3COCH3 + NO2 : 	KDEC 	;
+{3715.} 	 C65NO36OOH + OH = C65NO36CHO + OH : 	4.65D-12 	;
+{3716.} 	 C65NO36OOH + OH = C65NO36O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3717.} 	 C65NO36O = C4H9CHO + HCHO + NO2 : 	7.00D+03 	;
+{3718.} 	 C65NO36O = C65NO36CHO + HO2 : 	KROPRIM*O2 	;
+{3719.} 	 C65NO36CHO + NO3 = C65NO36CO3 + HNO3 : 	KNO3AL*5.5 	;
+{3720.} 	 C65NO36CHO + OH = C65NO36CO3 : 	7.19D-12 	;
+{3721.} 	 C65NO36CHO = C4H9CHO + HO2 + CO + NO2 : 	J(56) 	;
+{3722.} 	 C65NO36CHO = HO2 + CO + C4H9CHO + NO2 : 	J(15) 	;
+{3723.} 	 C6OH5NO3 + OH = C4COMEOH + NO2 : 	3.87D-12 	;
+{3724.} 	 C66NO35OOH + OH = C66NO35CO + OH : 	8.20D-12 	;
+{3725.} 	 C66NO35OOH + OH = C66NO35O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3726.} 	 C66NO35OOH = C66NO35O + OH : 	J(41) 	;
+{3727.} 	 C66NO35O = C4H9CHO + HCHO + NO2 : 	7.00D+03 	;
+{3728.} 	 C66NO35O = C66NO35CO + HO2 : 	KROSEC*O2 	;
+{3729.} 	 C66NO35CO + OH = MNO3COC4O2 : 	6.69D-12 	;
+{3730.} 	 C66NO35CO = C4H9CO3 + HCHO + NO2 : 	J(56)+J(57) 	;
+{3731.} 	 OH + C66NO35OH = HO5C5CHO + NO2 : 	6.00D-12 	;
+{3732.} 	 NC4H9CHOO + CO = C4H9CHO : 	1.20D-15 	;
+{3733.} 	 NC4H9CHOO + NO = C4H9CHO + NO2 : 	1.00D-14 	;
+{3734.} 	 NC4H9CHOO + NO2 = C4H9CHO + NO3 : 	1.00D-15 	;
+{3735.} 	 NC4H9CHOO + SO2 = C4H9CHO + SO3 : 	7.00D-14 	;
+{3736.} 	 NC4H9CHOO = C4H9CHO + H2O2 : 	6.00D-18*H2O 	;
+{3737.} 	 NC4H9CHOO = PENTACID : 	1.00D-17*H2O 	;
+{3738.} 	 C6OH5OOH + OH = C4COMEOH + OH : 	3.30D-11 	;
+{3739.} 	 C6OH5OOH + OH = C6OH5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3740.} 	 C6OH5OOH = C6OH5O + OH : 	J(41) 	;
+{3741.} 	 C6OH5O = C4H9CHO + HCHO + HO2 : 	KDEC 	;
+{3742.} 	 C4COMEOH + OH = C4COMOH3O2 : 	8.09D-12 	;
+{3743.} 	 C4COMEOH = HOCH2CO3 + NC4H9O2 : 	J(22) 	;
+{3744.} 	 C656OH + OH = C4COMEOH + HO2 : 	1.86D-11 	;
+{3745.} 	 HO5C6OOH = HO5C6O + OH : 	J(41) 	;
+{3746.} 	 OH + HO5C6OOH = HO5C5CHO + OH : 	2.42D-11 	;
+{3747.} 	 OH + HO5C6OOH = HO5C6O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3748.} 	 HO5C6O = HCHO + C4H9CHO + HO2 : 	KDEC 	;
+{3749.} 	 HO5C5CHO = HO2 + CO + C4H9CHO + HO2 : 	J(15) 	;
+{3750.} 	 NO3 + HO5C5CHO = HO5C5CO3 + HNO3 : 	KNO3AL*5.5 	;
+{3751.} 	 OH + HO5C5CHO = HO5C5CO3 : 	3.44D-11 	;
+{3752.} 	 C62NO33OOH + OH = C62NO33CO + OH : 	7.24D-12 	;
+{3753.} 	 C62NO33OOH + OH = C62NO33O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3754.} 	 C62NO33OOH = C62NO33O + OH : 	J(41) 	;
+{3755.} 	 C62NO33O = C3H7CHO + CH3CHO + NO2 : 	4.00D+04 	;
+{3756.} 	 C62NO33O = C62NO33CO + HO2 : 	KROSEC*O2 	;
+{3757.} 	 C62NO33CO + OH = C6NO3CO5O2 : 	4.85D-12 	;
+{3758.} 	 C62NO33CO = CH3CHO + C3H7CO3 + NO2 : 	J(57) 	;
+{3759.} 	 C62NO33CO = HEX3ONCO + NO2 : 	J(56) 	;
+{3760.} 	 C64OH5NO3 + OH = CO2HO3C6 + NO2 : 	2.06D-12 	;
+{3761.} 	 C63NO32OOH + OH = C63NO32CO + OH : 	5.09D-12 	;
+{3762.} 	 C63NO32OOH + OH = C63NO32O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3763.} 	 C63NO32OOH = C63NO32O + OH : 	J(41) 	;
+{3764.} 	 C63NO32O = C3H7CHO + CH3CHO + NO2 : 	4.00D+04 	;
+{3765.} 	 C63NO32O = C63NO32CO + HO2 : 	KROSEC*O2 	;
+{3766.} 	 C63NO32CO + OH = C6CONO34O2 : 	2.49D-12 	;
+{3767.} 	 C63NO32CO = C3H7CHO + CH3CO3 + NO2 : 	J(57) 	;
+{3768.} 	 C63NO32CO = HEX2ONCO + NO2 : 	J(56) 	;
+{3769.} 	 C65OH4NO3 + OH = HEX3ONCOH + NO2 : 	3.33D-12 	;
+{3770.} 	 C64OH5OOH + OH = C64OH5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3771.} 	 C64OH5OOH + OH = CO2HO3C6 + OH : 	3.34D-11 	;
+{3772.} 	 C64OH5OOH = C64OH5O + OH : 	J(41) 	;
+{3773.} 	 C64OH5O = CH3CHO + C3H7CHO + HO2 : 	KDEC 	;
+{3774.} 	 C645OH + OH = HEX3ONCOH + HO2 : 	2.18D-11 	;
+{3775.} 	 CO2HO3C6 + OH = CO23C6 : 	1.23D-11 	;
+{3776.} 	 CO2HO3C6 = CH3CO3 + C3H7CHO : 	J(22) 	;
+{3777.} 	 C65OH4OOH + OH = C65OH4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{3778.} 	 C65OH4OOH + OH = HEX3ONCOH + OH : 	3.60D-11 	;
+{3779.} 	 C65OH4OOH = C65OH4O + OH : 	J(41) 	;
+{3780.} 	 C65OH4O = C3H7CHO + CH3CHO + HO2 : 	KDEC 	;
+{3781.} 	 HEX3ONCOH + OH = CO23C6 + HO2 : 	1.01D-11 	;
+{3782.} 	 HEX3ONCOH = C3H7CO3 + CH3CHO + HO2 : 	J(22) 	;
+{3783.} 	 C42MNO3OOH + OH = C4ME2NO3O2 : 	4.34D-12 	;
+{3784.} 	 C42MNO3OOH = C4ME2NO3O + OH : 	J(41) 	;
+{3785.} 	 C4ME2NO3O = CH3COCH3 + CH3COCH3 + NO2 : 	KDEC 	;
+{3786.} 	 C4ME2OHNO3 + OH = C4ME2OHO + NO2 : 	8.89D-13 	;
+{3787.} 	 C4ME2OHOOH + OH = C4ME2OHO2 : 	4.40D-12 	;
+{3788.} 	 C4ME2OHOOH = C4ME2OHO + OH : 	J(41) 	;
+{3789.} 	 C4ME2OHO = CH3COCH3 + CH3COCH3 + HO2 : 	KDEC 	;
+{3790.} 	 C4ME22OH + OH = C4ME2OHO : 	9.49D-13 	;
+{3791.} 	 BZBIPEROOH + OH = BZOBIPEROH + OH : 	9.77D-11 	;
+{3792.} 	 BZBIPEROOH = BZBIPERO + OH : 	J(41) 	;
+{3793.} 	 BZBIPERNO3 + OH = BZOBIPEROH + NO2 : 	7.30D-11 	;
+{3794.} 	 BZBIPERNO3 = BZBIPERO + NO2 : 	J(54) 	;
+{3795.} 	 BZBIPERO = GLYOX + BZFUONE + HO2 : 	KDEC*0.50 	;
+{3796.} 	 BZBIPERO = GLYOX + MALDIAL + HO2 : 	KDEC*0.50 	;
+{3797.} 	 BZBIPER2OH + OH = BZOBIPEROH + HO2 : 	1.21D-10 	;
+{3798.} 	 BZOBIPEROH + OH = MALDIALCO3 + GLYOX : 	8.16D-11 	;
+{3799.} 	 BZOBIPEROH = MALDIALCO3 + GLYOX + HO2 : 	J(22) 	;
+{3800.} 	 BZEMUCCO3 + HO2 = BZEMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{3801.} 	 BZEMUCCO3 + HO2 = BZEMUCCO3H : 	KAPHO2*0.41 	;
+{3802.} 	 BZEMUCCO3 + HO2 = C5DIALO2 + OH : 	KAPHO2*0.44 	;
+{3803.} 	 BZEMUCCO3 + NO = C5DIALO2 + NO2 : 	KAPNO 	;
+{3804.} 	 BZEMUCCO3 + NO2 = BZEMUCPAN : 	KFPAN 	;
+{3805.} 	 BZEMUCCO3 + NO3 = C5DIALO2 + NO2 : 	KRO2NO3*1.74 	;
+{3806.} 	 BZEMUCCO3 = BZEMUCCO2H : 	1.00D-11*RO2*0.3 	;
+{3807.} 	 BZEMUCCO3 = C5DIALO2 : 	1.00D-11*RO2*0.7 	;
+{3808.} 	 EPXC4DIAL + NO3 = EPXDLCO3 + HNO3 : 	2*KNO3AL*4.0 	;
+{3809.} 	 EPXC4DIAL + OH = EPXDLCO3 : 	4.32D-11 	;
+{3810.} 	 EPXC4DIAL = C3DIALO2 + CO + HO2 : 	J(17)*2 	;
+{3811.} 	 GLYOOA = GLYOO : 	KDEC*0.18 	;
+{3812.} 	 GLYOOA = HCHO : 	KDEC*0.125 	;
+{3813.} 	 GLYOOA = HO2 + HO2 + CO : 	KDEC*0.125 	;
+{3814.} 	 GLYOOA = OH + HO2 + CO + CO : 	KDEC*0.57 	;
+{3815.} 	 BZEMUCO2 + HO2 = BZEMUCOOH : 	KRO2HO2*0.77 	;
+{3816.} 	 BZEMUCO2 + NO = BZEMUCNO3 : 	KRO2NO*0.105 	;
+{3817.} 	 BZEMUCO2 + NO = BZEMUCO + NO2 : 	KRO2NO*0.895 	;
+{3818.} 	 BZEMUCO2 + NO3 = BZEMUCO + NO2 : 	KRO2NO3 	;
+{3819.} 	 BZEMUCO2 = BZEMUCCO : 	8.80D-13*0.2*RO2 	;
+{3820.} 	 BZEMUCO2 = BZEMUCO : 	8.80D-13*0.6*RO2 	;
+{3821.} 	 BZEMUCO2 = BZEMUCOH : 	8.80D-13*0.2*RO2 	;
+{3822.} 	 C5DIALO2 + HO2 = C5DIALOOH : 	KRO2HO2*0.706 	;
+{3823.} 	 C5DIALO2 + NO = C5DIALO + NO2 : 	KRO2NO 	;
+{3824.} 	 C5DIALO2 + NO3 = C5DIALO + NO2 : 	KRO2NO3 	;
+{3825.} 	 C5DIALO2 = C5DIALCO : 	8.80D-13*RO2*0.2 	;
+{3826.} 	 C5DIALO2 = C5DIALO : 	8.80D-13*RO2*0.6 	;
+{3827.} 	 C5DIALO2 = C5DIALOH : 	8.80D-13*RO2*0.2 	;
+{3828.} 	 MALDIAL + NO3 = MALDIALCO3 + HNO3 : 	2*KNO3AL*2.0 	;
+{3829.} 	 MALDIAL + O3 = GLYOX + GLYOOA : 	2.00D-18 	;
+{3830.} 	 MALDIAL + OH = MALDIALCO3 : 	5.20D-11*0.83 	;
+{3831.} 	 MALDIAL + OH = MALDIALO2 : 	5.20D-11*0.17 	;
+{3832.} 	 MALDIAL = BZFUONE : 	J(4)*0.14*0.4 	;
+{3833.} 	 MALDIAL = MALDIALCO3 + HO2 : 	J(4)*0.14*0.6 	;
+{3834.} 	 C6H5O + NO2 = HOC6H4NO2 : 	2.08D-12 	;
+{3835.} 	 C6H5O + O3 = C6H5O2 : 	2.86D-13 	;
+{3836.} 	 NPHENO2 + HO2 = NPHENOOH : 	KRO2HO2*0.770 	;
+{3837.} 	 NPHENO2 + NO = NPHENO + NO2 : 	KRO2NO 	;
+{3838.} 	 NPHENO2 + NO3 = NPHENO + NO2 : 	KRO2NO3 	;
+{3839.} 	 NPHENO2 = NPHENO : 	8.00D-13*RO2*0.7 	;
+{3840.} 	 NPHENO2 = NPHENOH : 	8.00D-13*RO2*0.3 	;
+{3841.} 	 CATECHOL + NO3 = CATEC1O + HNO3 : 	9.9D-11 	;
+{3842.} 	 CATECHOL + O3 = CATECOOA : 	9.2D-18 	;
+{3843.} 	 CATECHOL + OH = CATEC1O : 	1.0D-10 	;
+{3844.} 	 PHENO2 + HO2 = PHENOOH : 	KRO2HO2*0.770 	;
+{3845.} 	 PHENO2 + NO = PHENO + NO2 : 	KRO2NO 	;
+{3846.} 	 PHENO2 + NO3 = PHENO + NO2 : 	KRO2NO3 	;
+{3847.} 	 PHENO2 = PHENO : 	8.00D-13*RO2*0.7 	;
+{3848.} 	 PHENO2 = PHENOH : 	8.00D-13*RO2*0.3 	;
+{3849.} 	 C6H5CH2OOH + OH = BENZAL + OH : 	2.05D-11 	;
+{3850.} 	 C6H5CH2OOH = C6H5CH2O + OH : 	J(41) 	;
+{3851.} 	 C6H5CH2NO3 + OH = BENZAL + NO2 : 	6.03D-12 	;
+{3852.} 	 C6H5CH2NO3 = C6H5CH2O + NO2 : 	J(53) 	;
+{3853.} 	 C6H5CH2O = BENZAL + HO2 : 	KROPRIM*O2 	;
+{3854.} 	 C6H5CH2OH + OH = BENZAL + HO2 : 	2.7D-11 	;
+{3855.} 	 CRESO2 + HO2 = CRESOOH : 	KRO2HO2*0.820 	;
+{3856.} 	 CRESO2 + NO = CRESO + NO2 : 	KRO2NO 	;
+{3857.} 	 CRESO2 + NO3 = CRESO + NO2 : 	KRO2NO3 	;
+{3858.} 	 CRESO2 = CRESO : 	8.00D-13*RO2*0.70 	;
+{3859.} 	 CRESO2 = CRESOH : 	8.00D-13*RO2*0.30 	;
+{3860.} 	 NCRESO2 + HO2 = NCRESOOH : 	KRO2HO2*0.820 	;
+{3861.} 	 NCRESO2 + NO = NCRESO + NO2 : 	KRO2NO 	;
+{3862.} 	 NCRESO2 + NO3 = NCRESO + NO2 : 	KRO2NO3 	;
+{3863.} 	 NCRESO2 = NCRESO : 	8.00D-13*RO2*0.70 	;
+{3864.} 	 NCRESO2 = NCRESOH : 	8.00D-13*RO2*0.30 	;
+{3865.} 	 TOL1O + NO2 = TOL1OHNO2 : 	2.08D-12 	;
+{3866.} 	 TOL1O + O3 = OXYL1O2 : 	2.86D-13 	;
+{3867.} 	 MCATECHOL + NO3 = MCATEC1O + HNO3 : 	1.7D-10*1.0 	;
+{3868.} 	 MCATECHOL + O3 = MCATECOOA : 	2.8D-17 	;
+{3869.} 	 MCATECHOL + OH = MCATEC1O : 	2.0D-10*1.0 	;
+{3870.} 	 TLBIPEROOH + OH = TLOBIPEROH + OH : 	9.64D-11 	;
+{3871.} 	 TLBIPEROOH = TLBIPERO + OH : 	J(41) 	;
+{3872.} 	 TLBIPERO = GLYOX + C4MDIAL + HO2 : 	KDEC*0.2 	;
+{3873.} 	 TLBIPERO = GLYOX + C5DICARB + HO2 : 	KDEC*0.2 	;
+{3874.} 	 TLBIPERO = GLYOX + TLFUONE + HO2 : 	KDEC*0.2 	;
+{3875.} 	 TLBIPERO = MGLYOX + BZFUONE + HO2 : 	KDEC*0.2 	;
+{3876.} 	 TLBIPERO = MGLYOX + MALDIAL + HO2 : 	KDEC*0.2 	;
+{3877.} 	 TLBIPERNO3 + OH = TLOBIPEROH + NO2 : 	7.16D-11 	;
+{3878.} 	 TLBIPERNO3 = TLBIPERO + NO2 : 	J(54) 	;
+{3879.} 	 TLBIPER2OH + OH = TLOBIPEROH + HO2 : 	1.20D-10 	;
+{3880.} 	 TLOBIPEROH + OH = C5CO14O2 + GLYOX : 	7.99D-11 	;
+{3881.} 	 TLOBIPEROH = C5CO14O2 + GLYOX + HO2 : 	J(22) 	;
+{3882.} 	 TLEMUCCO3 + HO2 = C615CO2O2 + OH : 	KAPHO2*0.44 	;
+{3883.} 	 TLEMUCCO3 + HO2 = TLEMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{3884.} 	 TLEMUCCO3 + HO2 = TLEMUCCO3H : 	KAPHO2*0.41 	;
+{3885.} 	 TLEMUCCO3 + NO = C615CO2O2 + NO2 : 	KAPNO 	;
+{3886.} 	 TLEMUCCO3 + NO2 = TLEMUCPAN : 	KFPAN 	;
+{3887.} 	 TLEMUCCO3 + NO3 = C615CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{3888.} 	 TLEMUCCO3 = C615CO2O2 : 	1.00D-11*RO2*0.7 	;
+{3889.} 	 TLEMUCCO3 = TLEMUCCO2H : 	1.00D-11*RO2*0.3 	;
+{3890.} 	 MGLOOB = CH3CHO : 	KDEC*0.125 	;
+{3891.} 	 MGLOOB = CH3CO3 + CO + OH : 	KDEC*0.57 	;
+{3892.} 	 MGLOOB = CH3CO3 + HO2 : 	KDEC*0.125 	;
+{3893.} 	 MGLOOB = MGLOO : 	KDEC*0.18 	;
+{3894.} 	 TLEMUCO2 + HO2 = TLEMUCOOH : 	KRO2HO2*0.820 	;
+{3895.} 	 TLEMUCO2 + NO = TLEMUCNO3 : 	KRO2NO*0.105 	;
+{3896.} 	 TLEMUCO2 + NO = TLEMUCO + NO2 : 	KRO2NO*0.895 	;
+{3897.} 	 TLEMUCO2 + NO3 = TLEMUCO + NO2 : 	KRO2NO3 	;
+{3898.} 	 TLEMUCO2 = TLEMUCCO : 	8.80D-13*RO2*0.20 	;
+{3899.} 	 TLEMUCO2 = TLEMUCO : 	8.80D-13*RO2*0.60 	;
+{3900.} 	 TLEMUCO2 = TLEMUCOH : 	8.80D-13*RO2*0.20 	;
+{3901.} 	 C615CO2O2 + HO2 = C615CO2OOH : 	KRO2HO2*0.770 	;
+{3902.} 	 C615CO2O2 + NO = C615CO2O + NO2 : 	KRO2NO 	;
+{3903.} 	 C615CO2O2 + NO3 = C615CO2O + NO2 : 	KRO2NO3 	;
+{3904.} 	 C615CO2O2 = C6125CO : 	8.80D-13*RO2*0.2 	;
+{3905.} 	 C615CO2O2 = C615CO2O : 	8.80D-13*RO2*0.6 	;
+{3906.} 	 C615CO2O2 = C615CO2OH : 	8.80D-13*RO2*0.2 	;
+{3907.} 	 OXYLOOH + OH = OXYLAL + OH : 	2.75D-11 	;
+{3908.} 	 OXYLOOH = OXYLO + OH : 	J(41) 	;
+{3909.} 	 OXYLNO3 + OH = OXYLAL + NO2 : 	1.31D-11 	;
+{3910.} 	 OXYLNO3 = OXYLO + NO2 : 	J(53) 	;
+{3911.} 	 OXYLO = OXYLAL + HO2 : 	KROPRIM*O2 	;
+{3912.} 	 OXYLAL + NO3 = OXYLCO3 + HNO3 : 	KNO3AL 	;
+{3913.} 	 OXYLAL + OH = OXYLCO3 : 	1.29D-11 	;
+{3914.} 	 OXYLAL = OXYL1O2 + HO2 + CO : 	J(19) 	;
+{3915.} 	 OXYLAL = OXYLCO3 + HO2 : 	J(18) 	;
+{3916.} 	 OXYLOH + OH = OXYLAL + HO2 : 	1.60D-11 	;
+{3917.} 	 OXYBPEROOH + OH = OXYBIPERO2 : 	7.62D-11 	;
+{3918.} 	 OXYBPEROOH = OXYBIPERO + OH : 	J(41) 	;
+{3919.} 	 OXYBIPENO3 + OH = TLCOBIPEOH + CH3O2 + NO2 : 	7.28D-11 	;
+{3920.} 	 OXYBIPENO3 = OXYBIPERO + NO2 : 	J(55) 	;
+{3921.} 	 OXYBIPERO = BZFUONE + BIACET + HO2 : 	KDEC*0.175 	;
+{3922.} 	 OXYBIPERO = C5DICARB + MGLYOX + HO2 : 	KDEC*0.245 	;
+{3923.} 	 OXYBIPERO = MALDIAL + BIACET + HO2 : 	KDEC*0.175 	;
+{3924.} 	 OXYBIPERO = MC5DICARB + GLYOX + HO2 : 	KDEC*0.08 	;
+{3925.} 	 OXYBIPERO = OXYFUONE + GLYOX + HO2 : 	KDEC*0.08 	;
+{3926.} 	 OXYBIPERO = TLFUONE + MGLYOX + HO2 : 	KDEC*0.245 	;
+{3927.} 	 OXYBPER2OH + OH = OXYBIPERO : 	1.11D-10 	;
+{3928.} 	 OXYMUCCO3 + HO2 = MC6CO2O2 + OH : 	KAPHO2*0.44 	;
+{3929.} 	 OXYMUCCO3 + HO2 = OXYMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{3930.} 	 OXYMUCCO3 + HO2 = OXYMUCCO3H : 	KAPHO2*0.41 	;
+{3931.} 	 OXYMUCCO3 + NO = MC6CO2O2 + NO2 : 	KAPNO 	;
+{3932.} 	 OXYMUCCO3 + NO2 = OXYMUCPAN : 	KFPAN 	;
+{3933.} 	 OXYMUCCO3 + NO3 = MC6CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{3934.} 	 OXYMUCCO3 = MC6CO2O2 : 	1.00D-11*RO2*0.70 	;
+{3935.} 	 OXYMUCCO3 = OXYMUCCO2H : 	1.00D-11*RO2*0.30 	;
+{3936.} 	 EPXM2C4DAL + NO3 = EPXM2DLCO3 + HNO3 : 	2*KNO3AL*8.5 	;
+{3937.} 	 EPXM2C4DAL + OH = EPXM2DLCO3 : 	4.24D-11 	;
+{3938.} 	 EPXM2C4DAL = C4MCO2O2 + HO2 + CO : 	J(17)*2 	;
+{3939.} 	 OXYMUCO2 + HO2 = OXYMUCOOH : 	KRO2HO2*0.859 	;
+{3940.} 	 OXYMUCO2 + NO = OXYMUCNO3 : 	KRO2NO*0.173 	;
+{3941.} 	 OXYMUCO2 + NO = OXYMUCO + NO2 : 	KRO2NO*0.827 	;
+{3942.} 	 OXYMUCO2 + NO3 = OXYMUCO + NO2 : 	KRO2NO3 	;
+{3943.} 	 OXYMUCO2 = OXYMUCCO : 	8.80D-12*RO2*0.20 	;
+{3944.} 	 OXYMUCO2 = OXYMUCO : 	8.80D-12*RO2*0.60 	;
+{3945.} 	 OXYMUCO2 = OXYMUCOH : 	8.80D-12*RO2*0.20 	;
+{3946.} 	 MC6CO2O2 + HO2 = MC6CO2OOH : 	KRO2HO2*0.820 	;
+{3947.} 	 MC6CO2O2 + NO = MC6CO2O + NO2 : 	KRO2NO 	;
+{3948.} 	 MC6CO2O2 + NO3 = MC6CO2O + NO2 : 	KRO2NO3 	;
+{3949.} 	 MC6CO2O2 = MC6CO2O : 	9.20D-14*RO2*0.70 	;
+{3950.} 	 MC6CO2O2 = MC6CO2OH : 	9.20D-14*RO2*0.30 	;
+{3951.} 	 NOXYOLO2 + HO2 = NOXYOLOOH : 	KRO2HO2*0.859 	;
+{3952.} 	 NOXYOLO2 + NO = NOXYOLO + NO2 : 	KRO2NO 	;
+{3953.} 	 NOXYOLO2 + NO3 = NOXYOLO + NO2 : 	KRO2NO3 	;
+{3954.} 	 NOXYOLO2 = NOXYOLO : 	8.00D-13*RO2*0.70 	;
+{3955.} 	 NOXYOLO2 = NOXYOLOH : 	8.00D-13*RO2*0.30 	;
+{3956.} 	 OXY1O + NO2 = OXY1OHNO2 : 	2.08D-12 	;
+{3957.} 	 OXY1O + O3 = DM123O2 : 	2.86D-13 	;
+{3958.} 	 OXYOLO2 + HO2 = OXYOLOOH : 	KRO2HO2*0.859 	;
+{3959.} 	 OXYOLO2 + NO = OXYOLO + NO2 : 	KRO2NO 	;
+{3960.} 	 OXYOLO2 + NO3 = OXYOLO + NO2 : 	KRO2NO3 	;
+{3961.} 	 OXYOLO2 = OXYOLO : 	8.00D-13*RO2*0.70 	;
+{3962.} 	 OXYOLO2 = OXYOLOH : 	8.00D-13*RO2*0.30 	;
+{3963.} 	 OXYCATECH + NO3 = OXCATEC1O + HNO3 : 	2.01D-10 	;
+{3964.} 	 OXYCATECH + O3 = OXCATECOOA : 	2.81D-17 	;
+{3965.} 	 OXYCATECH + OH = OXCATEC1O : 	2.05D-10 	;
+{3966.} 	 MXYLOOH + OH = MXYLAL + OH : 	2.05D-11 	;
+{3967.} 	 MXYLOOH = MXYLO + OH : 	J(41) 	;
+{3968.} 	 MXYLNO3 + OH = MXYLAL + NO2 : 	6.03D-12 	;
+{3969.} 	 MXYLNO3 = MXYLO + NO2 : 	J(53) 	;
+{3970.} 	 MXYLO = MXYLAL + HO2 : 	KROPRIM*O2 	;
+{3971.} 	 MXYLAL + NO3 = MXYLCO3 + HNO3 : 	KNO3AL 	;
+{3972.} 	 MXYLAL + OH = MXYLCO3 : 	1.29D-11 	;
+{3973.} 	 MXYLAL = MXYL1O2 + HO2 + CO : 	J(19) 	;
+{3974.} 	 MXYLAL = MXYLCO3 + HO2 : 	J(18) 	;
+{3975.} 	 MXYLOH + OH = MXYLAL + HO2 : 	8.93D-12 	;
+{3976.} 	 MXYBPEROOH + OH = MXYOBPEROH + OH : 	1.17D-10 	;
+{3977.} 	 MXYBPEROOH = MXYBIPERO + OH : 	J(41) 	;
+{3978.} 	 MXYBIPENO3 + OH = MXYOBPEROH + NO2 : 	7.15D-11 	;
+{3979.} 	 MXYBIPENO3 = MXYBIPERO + NO2 : 	J(54) 	;
+{3980.} 	 MXYBIPERO = GLYOX + C5MDICARB + HO2 : 	KDEC*0.11 	;
+{3981.} 	 MXYBIPERO = GLYOX + MXYFUONE + HO2 : 	KDEC*0.11 	;
+{3982.} 	 MXYBIPERO = MGLYOX + C4MDIAL + HO2 : 	KDEC*0.26 	;
+{3983.} 	 MXYBIPERO = MGLYOX + C5DICARB + HO2 : 	KDEC*0.26 	;
+{3984.} 	 MXYBIPERO = MGLYOX + PXYFUONE + HO2 : 	KDEC*0.26 	;
+{3985.} 	 MXYBPER2OH + OH = MXYOBPEROH + HO2 : 	2.50D-10 	;
+{3986.} 	 MXYOBPEROH + OH = C3MCODBCO3 + MGLYOX : 	7.93D-11*0.5 	;
+{3987.} 	 MXYOBPEROH + OH = C5CO14O2 + MGLYOX : 	7.93D-11*0.5 	;
+{3988.} 	 MXYOBPEROH = C3MCODBCO3 + MGLYOX + HO2 : 	J(22)*0.5 	;
+{3989.} 	 MXYOBPEROH = C5CO14O2 + MGLYOX + HO2 : 	J(22)*0.5 	;
+{3990.} 	 MXYMUCCO3 + HO2 = C726CO5O2 + OH : 	KAPHO2*0.44 	;
+{3991.} 	 MXYMUCCO3 + HO2 = MXYMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{3992.} 	 MXYMUCCO3 + HO2 = MXYMUCCO3H : 	KAPHO2*0.41 	;
+{3993.} 	 MXYMUCCO3 + NO = C726CO5O2 + NO2 : 	KAPNO 	;
+{3994.} 	 MXYMUCCO3 + NO2 = MXYMUCPAN : 	KFPAN 	;
+{3995.} 	 MXYMUCCO3 + NO3 = C726CO5O2 + NO2 : 	KRO2NO3*1.74 	;
+{3996.} 	 MXYMUCCO3 = C726CO5O2 : 	1.00D-11*RO2*0.70 	;
+{3997.} 	 MXYMUCCO3 = MXYMUCCO2H : 	1.00D-11*RO2*0.30 	;
+{3998.} 	 EPXMC4DIAL + NO3 = EPXMDLCO3 + HNO3 : 	2*KNO3AL*8.5 	;
+{3999.} 	 EPXMC4DIAL + OH = EPXMDLCO3 : 	4.28D-11 	;
+{4000.} 	 EPXMC4DIAL = C3MDIALO2 + CO + HO2 : 	J(17)*2 	;
+{4001.} 	 MXYMUCO2 + HO2 = MXYMUCOOH : 	KRO2HO2*0.859 	;
+{4002.} 	 MXYMUCO2 + NO = MXYMUCNO3 : 	KRO2NO*0.173 	;
+{4003.} 	 MXYMUCO2 + NO = MXYMUCO + NO2 : 	KRO2NO*0.827 	;
+{4004.} 	 MXYMUCO2 + NO3 = MXYMUCO + NO2 : 	KRO2NO3 	;
+{4005.} 	 MXYMUCO2 = MXYMUCCO : 	8.80D-13*RO2*0.2 	;
+{4006.} 	 MXYMUCO2 = MXYMUCO : 	8.80D-13*RO2*0.6 	;
+{4007.} 	 MXYMUCO2 = MXYMUCOH : 	8.80D-13*RO2*0.2 	;
+{4008.} 	 C726CO5O2 + HO2 = C726CO5OOH : 	KRO2HO2*0.820 	;
+{4009.} 	 C726CO5O2 + NO = C726CO5O + NO2 : 	KRO2NO 	;
+{4010.} 	 C726CO5O2 + NO3 = C726CO5O + NO2 : 	KRO2NO3 	;
+{4011.} 	 C726CO5O2 = C7236CO : 	8.80D-13*RO2*0.2 	;
+{4012.} 	 C726CO5O2 = C726CO3OH : 	8.80D-13*RO2*0.2 	;
+{4013.} 	 C726CO5O2 = C726CO5O : 	8.80D-13*RO2*0.6 	;
+{4014.} 	 MXY1O + NO2 = MXY1OHNO2 : 	2.08D-12 	;
+{4015.} 	 MXY1O + O3 = MXY1O2 : 	2.86D-13 	;
+{4016.} 	 MXYOLO2 + HO2 = MXYOLOOH : 	KRO2HO2*0.859 	;
+{4017.} 	 MXYOLO2 + NO = MXYOLO + NO2 : 	KRO2NO 	;
+{4018.} 	 MXYOLO2 + NO3 = MXYOLO + NO2 : 	KRO2NO3 	;
+{4019.} 	 MXYOLO2 = MXYOLO : 	8.00D-13*RO2*0.70 	;
+{4020.} 	 MXYOLO2 = MXYOLOH : 	8.00D-13*RO2*0.30 	;
+{4021.} 	 NMXYOLO2 + HO2 = NMXYOLOOH : 	KRO2HO2*0.859 	;
+{4022.} 	 NMXYOLO2 + NO = NMXYOLO + NO2 : 	KRO2NO 	;
+{4023.} 	 NMXYOLO2 + NO3 = NMXYOLO + NO2 : 	KRO2NO3 	;
+{4024.} 	 NMXYOLO2 = NMXYOLO : 	8.00D-13*RO2*0.70 	;
+{4025.} 	 NMXYOLO2 = NMXYOLOH : 	8.00D-13*RO2*0.30 	;
+{4026.} 	 MXYCATECH + NO3 = MXCATEC1O + HNO3 : 	2.01D-10 	;
+{4027.} 	 MXYCATECH + O3 = MXCATECOOA : 	2.81D-17 	;
+{4028.} 	 MXYCATECH + OH = MXCATEC1O : 	2.05D-10 	;
+{4029.} 	 PXYLOOH + OH = PXYLAL + OH : 	2.05D-11 	;
+{4030.} 	 PXYLOOH = PXYLO + OH : 	J(41) 	;
+{4031.} 	 PXYLNO3 + OH = PXYLAL + NO2 : 	6.03D-12 	;
+{4032.} 	 PXYLNO3 = PXYLO + NO2 : 	J(53) 	;
+{4033.} 	 PXYLO = PXYLAL + HO2 : 	KROPRIM*O2 	;
+{4034.} 	 PXYLAL + NO3 = PXYLCO3 + HNO3 : 	KNO3AL 	;
+{4035.} 	 PXYLAL + OH = PXYLCO3 : 	1.29D-11 	;
+{4036.} 	 PXYLAL = PXYL1O2 + HO2 + CO : 	J(19) 	;
+{4037.} 	 PXYLAL = PXYLCO3 + HO2 : 	J(18) 	;
+{4038.} 	 PXYLOH + OH = PXYLAL + HO2 : 	8.93D-12 	;
+{4039.} 	 PXYBPEROOH + OH = PXYBIPERO2 : 	7.65D-11 	;
+{4040.} 	 PXYBPEROOH = PXYBIPERO + OH : 	J(41) 	;
+{4041.} 	 PXYBIPENO3 + OH = CH3O2 + TLOBIPEROH + NO2 : 	7.16D-11 	;
+{4042.} 	 PXYBIPENO3 = PXYBIPERO + NO2 : 	J(55) 	;
+{4043.} 	 PXYBIPERO = C4DBDIKET + GLYOX + HO2 : 	KDEC*0.64 	;
+{4044.} 	 PXYBIPERO = C4MDIAL + MGLYOX + HO2 : 	KDEC*0.18 	;
+{4045.} 	 PXYBIPERO = PXYFUONE + MGLYOX + HO2 : 	KDEC*0.18 	;
+{4046.} 	 PXYBPER2OH + OH = PXYBIPERO : 	1.12D-10 	;
+{4047.} 	 PXYMUCCO3 + HO2 = C6M5CO2O2 + OH : 	KAPHO2*0.44 	;
+{4048.} 	 PXYMUCCO3 + HO2 = PXYMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{4049.} 	 PXYMUCCO3 + HO2 = PXYMUCCO3H : 	KAPHO2*0.41 	;
+{4050.} 	 PXYMUCCO3 + NO = C6M5CO2O2 + NO2 : 	KAPNO 	;
+{4051.} 	 PXYMUCCO3 + NO2 = PXYMUCPAN : 	KFPAN 	;
+{4052.} 	 PXYMUCCO3 + NO3 = C6M5CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{4053.} 	 PXYMUCCO3 = C6M5CO2O2 : 	1.00D-11*RO2*0.70 	;
+{4054.} 	 PXYMUCCO3 = PXYMUCCO2H : 	1.00D-11*RO2*0.30 	;
+{4055.} 	 PXYMUCO2 + HO2 = PXYMUCOOH : 	KRO2HO2*0.859 	;
+{4056.} 	 PXYMUCO2 + NO = PXYMUCNO3 : 	KRO2NO*0.173 	;
+{4057.} 	 PXYMUCO2 + NO = PXYMUCO + NO2 : 	KRO2NO*0.827 	;
+{4058.} 	 PXYMUCO2 + NO3 = PXYMUCO + NO2 : 	KRO2NO3 	;
+{4059.} 	 PXYMUCO2 = PXYMUCCO : 	8.80D-12*RO2*0.2 	;
+{4060.} 	 PXYMUCO2 = PXYMUCO : 	8.80D-12*RO2*0.6 	;
+{4061.} 	 PXYMUCO2 = PXYMUCOH : 	8.80D-12*RO2*0.2 	;
+{4062.} 	 C6M5CO2O2 + HO2 = C6M5CO2OOH : 	KRO2HO2*0.820 	;
+{4063.} 	 C6M5CO2O2 + NO = C6M5CO2O + NO2 : 	KRO2NO 	;
+{4064.} 	 C6M5CO2O2 + NO3 = C6M5CO2O + NO2 : 	KRO2NO3 	;
+{4065.} 	 C6M5CO2O2 = C6M5CO2O : 	9.20D-14*RO2*0.70 	;
+{4066.} 	 C6M5CO2O2 = C6M5CO2OH : 	9.20D-14*RO2*0.30 	;
+{4067.} 	 NPXYOLO2 + HO2 = NPXYOLOOH : 	KRO2HO2*0.859 	;
+{4068.} 	 NPXYOLO2 + NO = NPXYOLO + NO2 : 	KRO2NO 	;
+{4069.} 	 NPXYOLO2 + NO3 = NPXYOLO + NO2 : 	KRO2NO3 	;
+{4070.} 	 NPXYOLO2 = NPXYOLO : 	8.00D-13*RO2*0.70 	;
+{4071.} 	 NPXYOLO2 = NPXYOLOH : 	8.00D-13*RO2*0.30 	;
+{4072.} 	 PXY1O + NO2 = PXY1OHNO2 : 	2.08D-12 	;
+{4073.} 	 PXY1O + O3 = PXY1O2 : 	2.86D-13 	;
+{4074.} 	 PXYOLO2 + HO2 = PXYOLOOH : 	KRO2HO2*0.859 	;
+{4075.} 	 PXYOLO2 + NO = PXYOLO + NO2 : 	KRO2NO 	;
+{4076.} 	 PXYOLO2 + NO3 = PXYOLO + NO2 : 	KRO2NO3 	;
+{4077.} 	 PXYOLO2 = PXYOLO : 	8.00D-13*RO2*0.70 	;
+{4078.} 	 PXYOLO2 = PXYOLOH : 	8.00D-13*RO2*0.30 	;
+{4079.} 	 PXYCATECH + NO3 = PXCATEC1O + HNO3 : 	2.01D-10 	;
+{4080.} 	 PXYCATECH + O3 = PXCATECOOA : 	2.81D-17 	;
+{4081.} 	 PXYCATECH + OH = PXCATEC1O : 	2.05D-10 	;
+{4082.} 	 C6H5C2OOH + OH = C6H5CH2CHO + OH : 	2.17D-11 	;
+{4083.} 	 C6H5C2OOH = C6H5C2H4O + OH : 	J(41) 	;
+{4084.} 	 C6H5C2H4O = C6H5CH2CHO + HO2 : 	KROPRIM*O2 	;
+{4085.} 	 C6H5C2NO3 + OH = C6H5CH2CHO + NO2 : 	7.18D-12 	;
+{4086.} 	 C6H5C2NO3 = C6H5C2H4O + NO2 : 	J(53) 	;
+{4087.} 	 C6H5C2OH + OH = C6H5CH2CHO + HO2 : 	1.01D-11 	;
+{4088.} 	 C6H5CH2CHO + NO3 = C6H5CH2CO3 + HNO3 : 	KNO3AL 	;
+{4089.} 	 C6H5CH2CHO + OH = C6H5CH2CO3 : 	2.08D-11 	;
+{4090.} 	 C6H5CH2CHO = C6H5CH2O2 + HO2 + CO : 	J(17) 	;
+{4091.} 	 EBENZO + NO2 = EBNZOHNO2 : 	2.08D-12 	;
+{4092.} 	 EBENZO + O3 = EBENZO2 : 	2.86D-13 	;
+{4093.} 	 EBENZOLO2 + HO2 = EBENZOLOOH : 	KRO2HO2*0.859 	;
+{4094.} 	 EBENZOLO2 + NO = EBENZOLO + NO2 : 	KRO2NO 	;
+{4095.} 	 EBENZOLO2 + NO3 = EBENZOLO + NO2 : 	KRO2NO3 	;
+{4096.} 	 EBENZOLO2 = EBENZOLO : 	8.00D-13*RO2*0.70 	;
+{4097.} 	 EBENZOLO2 = EBENZOLOH : 	8.00D-13*RO2*0.30 	;
+{4098.} 	 NEBNZOLO2 + HO2 = NEBNZOLOOH : 	KRO2HO2*0.859 	;
+{4099.} 	 NEBNZOLO2 + NO = NEBNZOLO + NO2 : 	KRO2NO 	;
+{4100.} 	 NEBNZOLO2 + NO3 = NEBNZOLO + NO2 : 	KRO2NO3 	;
+{4101.} 	 NEBNZOLO2 = NEBNZOLO : 	8.00D-13*RO2*0.70 	;
+{4102.} 	 NEBNZOLO2 = NEBNZOLOH : 	8.00D-13*RO2*0.30 	;
+{4103.} 	 ECATECHOL + NO3 = ECATEC1O + HNO3 : 	2.01D-10*1.0 	;
+{4104.} 	 ECATECHOL + O3 = ECATECOOA : 	2.81D-17 	;
+{4105.} 	 ECATECHOL + OH = ECATEC1O : 	2.05D-10*1.0 	;
+{4106.} 	 EBZBPEROOH + OH = EBZOBPEROH + OH : 	9.75D-11 	;
+{4107.} 	 EBZBPEROOH = EBZBIPERO + OH : 	J(41) 	;
+{4108.} 	 EBZBIPERO = BZFUONE + EGLYOX + HO2 : 	KDEC*0.2 	;
+{4109.} 	 EBZBIPERO = C6DICARB + GLYOX + HO2 : 	KDEC*0.3 	;
+{4110.} 	 EBZBIPERO = EBFUONE + GLYOX + HO2 : 	KDEC*0.3 	;
+{4111.} 	 EBZBIPERO = MALDIAL + EGLYOX + HO2 : 	KDEC*0.2 	;
+{4112.} 	 EBZBPERNO3 + OH = EBZOBPEROH + NO2 : 	7.28D-11 	;
+{4113.} 	 EBZBPERNO3 = EBZBIPERO + NO2 : 	J(54) 	;
+{4114.} 	 EBZBPER2OH + OH = EBZOBPEROH + HO2 : 	1.21D-10 	;
+{4115.} 	 EBZOBPEROH + OH = C6DCARBBO2 + GLYOX : 	8.11D-11 	;
+{4116.} 	 EBZOBPEROH = C6DCARBBO2 + GLYOX + HO2 : 	J(22) 	;
+{4117.} 	 EBZMUCCO3 + HO2 = C715CO2O2 + OH : 	KAPHO2*0.44 	;
+{4118.} 	 EBZMUCCO3 + HO2 = EBZMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{4119.} 	 EBZMUCCO3 + HO2 = EBZMUCCO3H : 	KAPHO2*0.41 	;
+{4120.} 	 EBZMUCCO3 + NO = C715CO2O2 + NO2 : 	KAPNO 	;
+{4121.} 	 EBZMUCCO3 + NO2 = EBZMUCPAN : 	KFPAN 	;
+{4122.} 	 EBZMUCCO3 + NO3 = C715CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{4123.} 	 EBZMUCCO3 = C715CO2O2 : 	1.00D-11*RO2*0.70 	;
+{4124.} 	 EBZMUCCO3 = EBZMUCCO2H : 	1.00D-11*RO2*0.30 	;
+{4125.} 	 EGLYOOB = C2H5CHO : 	KDEC*0.125 	;
+{4126.} 	 EGLYOOB = C2H5CO3 + CO + OH : 	KDEC*0.57 	;
+{4127.} 	 EGLYOOB = C2H5CO3 + HO2 : 	KDEC*0.125 	;
+{4128.} 	 EGLYOOB = EGLYOO : 	KDEC*0.18 	;
+{4129.} 	 EBZMUCO2 + HO2 = EBZMUCOOH : 	KRO2HO2*0.859 	;
+{4130.} 	 EBZMUCO2 + NO = EBZMUCNO3 : 	KRO2NO*0.173 	;
+{4131.} 	 EBZMUCO2 + NO = EBZMUCO + NO2 : 	KRO2NO*0.827 	;
+{4132.} 	 EBZMUCO2 + NO3 = EBZMUCO + NO2 : 	KRO2NO3 	;
+{4133.} 	 EBZMUCO2 = EBZMUCCO : 	8.80D-13*RO2*0.20 	;
+{4134.} 	 EBZMUCO2 = EBZMUCO : 	8.80D-13*RO2*0.60 	;
+{4135.} 	 EBZMUCO2 = EBZMUCOH : 	8.80D-13*RO2*0.20 	;
+{4136.} 	 C715CO2O2 + HO2 = C715CO2OOH : 	KRO2HO2*0.820 	;
+{4137.} 	 C715CO2O2 + NO = C715CO2O + NO2 : 	KRO2NO 	;
+{4138.} 	 C715CO2O2 + NO3 = C715CO2O + NO2 : 	KRO2NO3 	;
+{4139.} 	 C715CO2O2 = C715CO2O : 	8.80D-13*RO2*0.60 	;
+{4140.} 	 C715CO2O2 = C715CO2OH : 	8.80D-13*RO2*0.20 	;
+{4141.} 	 C715CO2O2 = C7CO2DBAL : 	8.80D-13*RO2*0.20 	;
+{4142.} 	 PHC3OOH + OH = PHCOET + OH : 	2.05D-11 	;
+{4143.} 	 PHC3OOH = PHC3O + OH : 	J(41) 	;
+{4144.} 	 PHC3NO3 + OH = PHCOET + NO2 : 	6.03D-12 	;
+{4145.} 	 PHC3NO3 = PHC3O + NO2 : 	J(54) 	;
+{4146.} 	 PHC3O = PHCOET + HO2 : 	KROSEC*O2 	;
+{4147.} 	 PHC3OH + OH = PHCOET + HO2 : 	8.93D-12 	;
+{4148.} 	 PHCOET + OH = PHCOETO2 : 	6.00D-12 	;
+{4149.} 	 PHCOET = C6H5CO3 + C2H5O2 : 	J(22) 	;
+{4150.} 	 NPBNZOLO2 + HO2 = NPBNZOLOOH : 	KRO2HO2*0.90 	;
+{4151.} 	 NPBNZOLO2 + NO = NPBNZOLO + NO2 : 	KRO2NO 	;
+{4152.} 	 NPBNZOLO2 + NO3 = NPBNZOLO + NO2 : 	KRO2NO3 	;
+{4153.} 	 NPBNZOLO2 = NPBNZOLO : 	8.00D-13*RO2*0.70 	;
+{4154.} 	 NPBNZOLO2 = NPBNZOLOH : 	8.00D-13*RO2*0.30 	;
+{4155.} 	 PBENZO + NO2 = PBNZOHNO2 : 	2.08D-12 	;
+{4156.} 	 PBENZO + O3 = PBENZO2 : 	2.86D-13 	;
+{4157.} 	 PBENZOLO2 + HO2 = PBENZOLOOH : 	KRO2HO2*0.90 	;
+{4158.} 	 PBENZOLO2 + NO = PBENZOLO + NO2 : 	KRO2NO 	;
+{4159.} 	 PBENZOLO2 + NO3 = PBENZOLO + NO2 : 	KRO2NO3 	;
+{4160.} 	 PBENZOLO2 = PBENZOLO : 	8.00D-13*RO2*0.70 	;
+{4161.} 	 PBENZOLO2 = PBENZOLOH : 	8.00D-13*RO2*0.30 	;
+{4162.} 	 PCATECHOL + NO3 = PCATEC1O + HNO3 : 	2.01D-10*1.0 	;
+{4163.} 	 PCATECHOL + O3 = PCATECOOA : 	2.81D-17 	;
+{4164.} 	 PCATECHOL + OH = PCATEC1O : 	2.05D-10*1.0 	;
+{4165.} 	 PBZBPEROOH + OH = PBZOBPEROH + OH : 	9.90D-11 	;
+{4166.} 	 PBZBPEROOH = PBZBIPERO + OH : 	J(41) 	;
+{4167.} 	 PBZBIPERO = BZFUONE + PGLYOX + HO2 : 	KDEC*0.2 	;
+{4168.} 	 PBZBIPERO = C7DICARB + GLYOX + HO2 : 	KDEC*0.3 	;
+{4169.} 	 PBZBIPERO = MALDIAL + PGLYOX + HO2 : 	KDEC*0.2 	;
+{4170.} 	 PBZBIPERO = PBFUONE + GLYOX + HO2 : 	KDEC*0.3 	;
+{4171.} 	 PBZBPERNO3 + OH = PBZOBPEROH + NO2 : 	7.42D-11 	;
+{4172.} 	 PBZBPERNO3 = PBZBIPERO + NO2 : 	J(54) 	;
+{4173.} 	 PBZBPER2OH + OH = PBZOBPEROH + HO2 : 	1.22D-10 	;
+{4174.} 	 PBZOBPEROH + OH = C7DCCO3 + GLYOX : 	8.25D-11 	;
+{4175.} 	 PBZOBPEROH = C7DCCO3 + GLYOX + HO2 : 	J(22) 	;
+{4176.} 	 PBZMUCCO3 + HO2 = C815CO2O2 + OH : 	KAPHO2*0.44 	;
+{4177.} 	 PBZMUCCO3 + HO2 = PBZMUCCO2H + O3 : 	KAPHO2*0.15 	;
+{4178.} 	 PBZMUCCO3 + HO2 = PBZMUCCO3H : 	KAPHO2*0.41 	;
+{4179.} 	 PBZMUCCO3 + NO = C815CO2O2 + NO2 : 	KAPNO 	;
+{4180.} 	 PBZMUCCO3 + NO2 = PBZMUCPAN : 	KFPAN 	;
+{4181.} 	 PBZMUCCO3 + NO3 = C815CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{4182.} 	 PBZMUCCO3 = C815CO2O2 : 	1.00D-11*RO2*0.70 	;
+{4183.} 	 PBZMUCCO3 = PBZMUCCO2H : 	1.00D-11*RO2*0.30 	;
+{4184.} 	 PGLOOA = C3H7CHO : 	KDEC*0.34 	;
+{4185.} 	 PGLOOA = C3H7CO3 + CO + OH : 	KDEC*0.08 	;
+{4186.} 	 PGLOOA = C3H7CO3 + HO2 : 	KDEC*0.34 	;
+{4187.} 	 PGLOOA = PGLOO : 	KDEC*0.24 	;
+{4188.} 	 PBZMUCO2 + HO2 = PBZMUCOOH : 	KRO2HO2*0.890 	;
+{4189.} 	 PBZMUCO2 + NO = PBZMUCNO3 : 	KRO2NO*0.197 	;
+{4190.} 	 PBZMUCO2 + NO = PBZMUCO + NO2 : 	KRO2NO*0.803 	;
+{4191.} 	 PBZMUCO2 + NO3 = PBZMUCO + NO2 : 	KRO2NO3 	;
+{4192.} 	 PBZMUCO2 = PBZMUCCO : 	8.80D-13*RO2*0.20 	;
+{4193.} 	 PBZMUCO2 = PBZMUCO : 	8.80D-13*RO2*0.60 	;
+{4194.} 	 PBZMUCO2 = PBZMUCOH : 	8.80D-13*RO2*0.20 	;
+{4195.} 	 C815CO2O2 + HO2 = C815CO2OOH : 	KRO2HO2*0.859 	;
+{4196.} 	 C815CO2O2 + NO = C815CO2O + NO2 : 	KRO2NO 	;
+{4197.} 	 C815CO2O2 + NO3 = C815CO2O + NO2 : 	KRO2NO3 	;
+{4198.} 	 C815CO2O2 = C815CO2O : 	8.80D-13*RO2*0.60 	;
+{4199.} 	 C815CO2O2 = C815CO2OH : 	8.80D-13*RO2*0.20 	;
+{4200.} 	 C815CO2O2 = C8CO2DBAL : 	8.80D-13*RO2*0.20 	;
+{4201.} 	 PHIC3OOH + OH = PHIC3O2 : 	2.05D-11 	;
+{4202.} 	 PHIC3OOH = PHIC3O + OH : 	J(41) 	;
+{4203.} 	 PHIC3NO3 + OH = PHCOME + HCHO + NO2 : 	6.03D-12 	;
+{4204.} 	 PHIC3NO3 = PHIC3O + NO2 : 	J(55) 	;
+{4205.} 	 PHIC3O = PHCOME + CH3O2 : 	KDEC 	;
+{4206.} 	 PHIC3OH + OH = PHIC3O : 	8.93D-12 	;
+{4207.} 	 IPBENZO + NO2 = IPBNZOHNO2 : 	2.08D-12 	;
+{4208.} 	 IPBENZO + O3 = IPBENZO2 : 	2.86D-13 	;
+{4209.} 	 IPBENZOLO2 + HO2 = IPBZOLOOH : 	KRO2HO2*0.90 	;
+{4210.} 	 IPBENZOLO2 + NO = IPBENZOLO + NO2 : 	KRO2NO 	;
+{4211.} 	 IPBENZOLO2 + NO3 = IPBENZOLO + NO2 : 	KRO2NO3 	;
+{4212.} 	 IPBENZOLO2 = IPBENZOLO : 	8.00D-13*RO2*0.70 	;
+{4213.} 	 IPBENZOLO2 = IPBENZOLOH : 	8.00D-13*RO2*0.30 	;
+{4214.} 	 NIPBNZOLO2 + HO2 = NIPBZOLOOH : 	KRO2HO2*0.90 	;
+{4215.} 	 NIPBNZOLO2 + NO = NIPBNZOLO + NO2 : 	KRO2NO 	;
+{4216.} 	 NIPBNZOLO2 + NO3 = NIPBNZOLO + NO2 : 	KRO2NO3 	;
+{4217.} 	 NIPBNZOLO2 = NIPBNZOLO : 	8.00D-13*RO2*0.70 	;
+{4218.} 	 NIPBNZOLO2 = NIPBNZOLOH : 	8.00D-13*RO2*0.30 	;
+{4219.} 	 IPCATECHOL + NO3 = IPCATEC1O + HNO3 : 	2.01D-10*1.0 	;
+{4220.} 	 IPCATECHOL + O3 = IPCATECOOA : 	2.81D-17 	;
+{4221.} 	 IPCATECHOL + OH = IPCATEC1O : 	2.05D-10*1.0 	;
+{4222.} 	 IPBZBPROOH + OH = IPBZOBPROH + OH : 	9.90D-11 	;
+{4223.} 	 IPBZBPROOH = IPBZBIPRO + OH : 	J(41) 	;
+{4224.} 	 IPBZBIPRO = BZFUONE + IPRGLYOX + HO2 : 	KDEC*0.2 	;
+{4225.} 	 IPBZBIPRO = IC7DICARB + GLYOX + HO2 : 	KDEC*0.3 	;
+{4226.} 	 IPBZBIPRO = IPBFUONE + GLYOX + HO2 : 	KDEC*0.3 	;
+{4227.} 	 IPBZBIPRO = MALDIAL + IPRGLYOX + HO2 : 	KDEC*0.2 	;
+{4228.} 	 IPBZBPRNO3 + OH = IPBZOBPROH + NO2 : 	7.42D-11 	;
+{4229.} 	 IPBZBPRNO3 = IPBZBIPRO + NO2 : 	J(54) 	;
+{4230.} 	 IPBZBPR2OH + OH = IPBZOBPROH + HO2 : 	1.22D-10 	;
+{4231.} 	 IPBZOBPROH + OH = IC7DCCO3 + GLYOX : 	8.25D-11 	;
+{4232.} 	 IPBZOBPROH = IC7DCCO3 + GLYOX + HO2 : 	J(22) 	;
+{4233.} 	 IPBZMUCCO3 + HO2 = C7M15CO2O2 + OH : 	KAPHO2*0.44 	;
+{4234.} 	 IPBZMUCCO3 + HO2 = IPBZMUCO2H + O3 : 	KAPHO2*0.15 	;
+{4235.} 	 IPBZMUCCO3 + HO2 = IPBZMUCO3H : 	KAPHO2*0.41 	;
+{4236.} 	 IPBZMUCCO3 + NO = C7M15CO2O2 + NO2 : 	KAPNO 	;
+{4237.} 	 IPBZMUCCO3 + NO2 = IPBZMUCPAN : 	KFPAN 	;
+{4238.} 	 IPBZMUCCO3 + NO3 = C7M15CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{4239.} 	 IPBZMUCCO3 = C7M15CO2O2 : 	1.00D-11*RO2*0.70 	;
+{4240.} 	 IPBZMUCCO3 = IPBZMUCO2H : 	1.00D-11*RO2*0.30 	;
+{4241.} 	 IPGLOOB = IPGLOO : 	KDEC*0.18 	;
+{4242.} 	 IPGLOOB = IPRCHO : 	KDEC*0.125 	;
+{4243.} 	 IPGLOOB = IPRCO3 + CO + OH : 	KDEC*0.57 	;
+{4244.} 	 IPGLOOB = IPRCO3 + HO2 : 	KDEC*0.125 	;
+{4245.} 	 IPBZMUCO2 + HO2 = IPBZMUCOOH : 	KRO2HO2*0.890 	;
+{4246.} 	 IPBZMUCO2 + NO = IPBZMUCNO3 : 	KRO2NO*0.197 	;
+{4247.} 	 IPBZMUCO2 + NO = IPBZMUCO + NO2 : 	KRO2NO*0.803 	;
+{4248.} 	 IPBZMUCO2 + NO3 = IPBZMUCO + NO2 : 	KRO2NO3 	;
+{4249.} 	 IPBZMUCO2 = IPBZMUCCO : 	8.80D-13*RO2*0.20 	;
+{4250.} 	 IPBZMUCO2 = IPBZMUCO : 	8.80D-13*RO2*0.60 	;
+{4251.} 	 IPBZMUCO2 = IPBZMUCOH : 	8.80D-13*RO2*0.20 	;
+{4252.} 	 C7M15CO2O2 + HO2 = C7MCO2OOH : 	KRO2HO2*0.859 	;
+{4253.} 	 C7M15CO2O2 + NO = C7M15CO2O + NO2 : 	KRO2NO 	;
+{4254.} 	 C7M15CO2O2 + NO3 = C7M15CO2O + NO2 : 	KRO2NO3 	;
+{4255.} 	 C7M15CO2O2 = C7M15CO2O : 	8.80D-13*RO2*0.60 	;
+{4256.} 	 C7M15CO2O2 = C7M15CO2OH : 	8.80D-13*RO2*0.20 	;
+{4257.} 	 C7M15CO2O2 = C7MCO2DBAL : 	8.80D-13*RO2*0.20 	;
+{4258.} 	 TM123BOOH + OH = TM123BCHO + OH : 	1.17D-11 	;
+{4259.} 	 TM123BOOH = TM123BO + OH : 	J(41) 	;
+{4260.} 	 TM123BNO3 + OH = TM123BCHO + NO2 : 	6.03D-12 	;
+{4261.} 	 TM123BNO3 = TM123BO + NO2 : 	J(53) 	;
+{4262.} 	 TM123BO = TM123BCHO + HO2 : 	KROPRIM*O2 	;
+{4263.} 	 TM123BCHO + NO3 = TM123BCO3 + NO2 : 	KNO3AL 	;
+{4264.} 	 TM123BCHO + OH = TM123BCO3 : 	1.29D-11 	;
+{4265.} 	 TM123BCHO = DM123O2 + HO2 + CO : 	J(19) 	;
+{4266.} 	 TM123BCHO = TM123BCO3 + HO2 : 	J(18) 	;
+{4267.} 	 TM123BOH + OH = TM123BCHO + HO2 : 	3.68D-12 	;
+{4268.} 	 NTM123OLO2 + HO2 = NTM123LOOH : 	KRO2HO2*0.90 	;
+{4269.} 	 NTM123OLO2 + NO = NTM123OLO + NO2 : 	KRO2NO 	;
+{4270.} 	 NTM123OLO2 + NO3 = NTM123OLO + NO2 : 	KRO2NO3 	;
+{4271.} 	 NTM123OLO2 = NTM123OLO : 	8.00D-13*RO2*0.70 	;
+{4272.} 	 NTM123OLO2 = NTM123OLOH : 	8.00D-13*RO2*0.30 	;
+{4273.} 	 TM123O + NO2 = TM123OHNO2 : 	2.08D-12 	;
+{4274.} 	 TM123O + O3 = TM123O2 : 	2.86D-13 	;
+{4275.} 	 TM123OLO2 + HO2 = TM123OLOOH : 	KRO2HO2*0.90 	;
+{4276.} 	 TM123OLO2 + NO = TM123OLO + NO2 : 	KRO2NO 	;
+{4277.} 	 TM123OLO2 + NO3 = TM123OLO + NO2 : 	KRO2NO3 	;
+{4278.} 	 TM123OLO2 = TM123OLO : 	8.00D-13*RO2*0.70 	;
+{4279.} 	 TM123OLO2 = TM123OLOH : 	8.00D-13*RO2*0.30 	;
+{4280.} 	 T123CATECH + NO3 = T123CAT1O + HNO3 : 	2.01D-10 	;
+{4281.} 	 T123CATECH + O3 = T123CTCOOA : 	2.81D-17 	;
+{4282.} 	 T123CATECH + OH = T123CAT1O : 	2.05D-10 	;
+{4283.} 	 TM123BPOOH + OH = TM123OBPOH + OH : 	8.83D-11 	;
+{4284.} 	 TM123BPOOH = TM123BPRO + OH : 	J(41) 	;
+{4285.} 	 TM123BPNO3 + OH = TM123OBPOH + NO2 : 	6.51D-11 	;
+{4286.} 	 TM123BPNO3 = TM123BPRO + NO2 : 	J(54) 	;
+{4287.} 	 TM123BPRO = C5DICARB + BIACET + HO2 : 	KDEC*0.32 	;
+{4288.} 	 TM123BPRO = C7ADICARB + GLYOX + HO2 : 	KDEC*0.05 	;
+{4289.} 	 TM123BPRO = MC5DICARB + MGLYOX + HO2 : 	KDEC*0.13 	;
+{4290.} 	 TM123BPRO = TLFUONE + BIACET + HO2 : 	KDEC*0.32 	;
+{4291.} 	 TM123BPRO = TMB1FUONE + MGLYOX + HO2 : 	KDEC*0.13 	;
+{4292.} 	 TM123BPRO = TMB2FUONE + GLYOX + HO2 : 	KDEC*0.05 	;
+{4293.} 	 TM123BP2OH + OH = TM123OBPOH + HO2 : 	1.12D-10 	;
+{4294.} 	 TM123OBPOH + OH = C5CO14O2 + BIACET : 	5.86D-11 	;
+{4295.} 	 TM123OBPOH = C5CO14O2 + BIACET + HO2 : 	J(22) 	;
+{4296.} 	 EPXALMKT + NO3 = EPXKTMCO3 + HNO3 : 	KNO3AL*8.5 	;
+{4297.} 	 EPXALMKT + OH = EPXKTMCO3 : 	2.22D-11 	;
+{4298.} 	 EPXALMKT = C4CO2O2 + CH3CO3 : 	J(22) 	;
+{4299.} 	 EPXALMKT = C4MCO2O2 + HO2 + CO : 	J(17) 	;
+{4300.} 	 TM123MUCO2 + HO2 = TM123MUOOH : 	KRO2HO2*0.890 	;
+{4301.} 	 TM123MUCO2 + NO = TM123MUCO + NO2 : 	KRO2NO*0.941 	;
+{4302.} 	 TM123MUCO2 + NO = TM123MUNO3 : 	KRO2NO*0.059 	;
+{4303.} 	 TM123MUCO2 + NO3 = TM123MUCO + NO2 : 	KRO2NO3 	;
+{4304.} 	 TM123MUCO2 = TM123MUCCO : 	8.80D-13*RO2*0.20 	;
+{4305.} 	 TM123MUCO2 = TM123MUCO : 	8.80D-13*RO2*0.60 	;
+{4306.} 	 TM123MUCO2 = TM123MUCOH : 	8.80D-13*RO2*0.20 	;
+{4307.} 	 TM124BOOH + OH = TM124BCHO + OH : 	1.17D-11 	;
+{4308.} 	 TM124BOOH = TM124BO + OH : 	J(41) 	;
+{4309.} 	 TM124BNO3 + OH = TM124BCHO + NO2 : 	6.03D-12 	;
+{4310.} 	 TM124BNO3 = TM124BO + NO2 : 	J(53) 	;
+{4311.} 	 TM124BO = TM124BCHO + HO2 : 	KROPRIM*O2 	;
+{4312.} 	 TM124BCHO + NO3 = TM124BCO3 + HNO3 : 	KNO3AL 	;
+{4313.} 	 TM124BCHO + OH = TM124BCO3 : 	1.29D-11 	;
+{4314.} 	 TM124BCHO = DM124O2 + HO2 + CO : 	J(19) 	;
+{4315.} 	 TM124BCHO = TM124BCO3 + HO2 : 	J(18) 	;
+{4316.} 	 TM124BOH + OH = TM124BCHO + HO2 : 	3.68D-12 	;
+{4317.} 	 TM124BPOOH + OH = TM124BPRO2 : 	7.48D-11 	;
+{4318.} 	 TM124BPOOH = TM124BPRO + OH : 	J(41) 	;
+{4319.} 	 TM124BPNO3 + OH = CH3O2 + MXYOBPEROH + NO2 : 	7.14D-11 	;
+{4320.} 	 TM124BPNO3 = TM124BPRO + NO2 : 	J(55) 	;
+{4321.} 	 TM124BPRO = C4DBDIKET + MGLYOX + HO2 : 	KDEC*0.292 	;
+{4322.} 	 TM124BPRO = C4MDIAL + BIACET + HO2 : 	KDEC*0.084 	;
+{4323.} 	 TM124BPRO = C7BDICARB + GLYOX + HO2 : 	KDEC*0.118 	;
+{4324.} 	 TM124BPRO = MC5DICARB + MGLYOX + HO2 : 	KDEC*0.211 	;
+{4325.} 	 TM124BPRO = PXYFUONE + BIACET + HO2 : 	KDEC*0.084 	;
+{4326.} 	 TM124BPRO = TMB1FUONE + MGLYOX + HO2 : 	KDEC*0.211 	;
+{4327.} 	 TM124BP2OH + OH = TM124BPRO : 	1.10D-10 	;
+{4328.} 	 NTM124OLO2 + HO2 = NTM124LOOH : 	KRO2HO2*0.90 	;
+{4329.} 	 NTM124OLO2 + NO = NTM124OLO + NO2 : 	KRO2NO 	;
+{4330.} 	 NTM124OLO2 + NO3 = NTM124OLO + NO2 : 	KRO2NO3 	;
+{4331.} 	 NTM124OLO2 = NTM124OLO : 	8.00D-13*RO2*0.70 	;
+{4332.} 	 NTM124OLO2 = NTM124OLOH : 	8.00D-13*RO2*0.30 	;
+{4333.} 	 TM124O + NO2 = TM124OHNO2 : 	2.08D-12 	;
+{4334.} 	 TM124O + O3 = TM124O2 : 	2.86D-13 	;
+{4335.} 	 TM124OLO2 + HO2 = TM124OLOOH : 	KRO2HO2*0.90 	;
+{4336.} 	 TM124OLO2 + NO = TM124OLO + NO2 : 	KRO2NO 	;
+{4337.} 	 TM124OLO2 + NO3 = TM124OLO + NO2 : 	KRO2NO3 	;
+{4338.} 	 TM124OLO2 = TM124OLO : 	8.00D-13*RO2*0.70 	;
+{4339.} 	 TM124OLO2 = TM124OLOH : 	8.00D-13*RO2*0.30 	;
+{4340.} 	 T124CATECH + NO3 = T124CAT1O + HNO3 : 	2.01D-10 	;
+{4341.} 	 T124CATECH + O3 = T124CTCOOA : 	2.81D-17 	;
+{4342.} 	 T124CATECH + OH = T124CAT1O : 	2.05D-10 	;
+{4343.} 	 TM124MUCO3 + HO2 = C7CO2M5O2 + OH : 	KAPHO2*0.44 	;
+{4344.} 	 TM124MUCO3 + HO2 = TM124MUO2H + O3 : 	KAPHO2*0.15 	;
+{4345.} 	 TM124MUCO3 + HO2 = TM124MUO3H : 	KAPHO2*0.41 	;
+{4346.} 	 TM124MUCO3 + NO = C7CO2M5O2 + NO2 : 	KAPNO 	;
+{4347.} 	 TM124MUCO3 + NO2 = TM124MUPAN : 	KFPAN 	;
+{4348.} 	 TM124MUCO3 + NO3 = C7CO2M5O2 + NO2 : 	KRO2NO3*1.74 	;
+{4349.} 	 TM124MUCO3 = C7CO2M5O2 : 	1.00D-11*RO2*0.70 	;
+{4350.} 	 TM124MUCO3 = TM124MUO2H : 	1.00D-11*RO2*0.30 	;
+{4351.} 	 TM124MUCO2 + HO2 = TM124MUOOH : 	KRO2HO2*0.890 	;
+{4352.} 	 TM124MUCO2 + NO = TM124MUCO + NO2 : 	KRO2NO*0.941 	;
+{4353.} 	 TM124MUCO2 + NO = TM124MUNO3 : 	KRO2NO*0.059 	;
+{4354.} 	 TM124MUCO2 + NO3 = TM124MUCO + NO2 : 	KRO2NO3 	;
+{4355.} 	 TM124MUCO2 = TM124MUCCO : 	8.80D-13*RO2*0.20 	;
+{4356.} 	 TM124MUCO2 = TM124MUCO : 	8.80D-13*RO2*0.60 	;
+{4357.} 	 TM124MUCO2 = TM124MUCOH : 	8.80D-13*RO2*0.20 	;
+{4358.} 	 C7CO2M5O2 + HO2 = C7CO2M5OOH : 	KRO2HO2*0.859 	;
+{4359.} 	 C7CO2M5O2 + NO = C7CO2M5O + NO2 : 	KRO2NO 	;
+{4360.} 	 C7CO2M5O2 + NO3 = C7CO2M5O + NO2 : 	KRO2NO3 	;
+{4361.} 	 C7CO2M5O2 = C7CO2M5O : 	9.20D-14*RO2*0.70 	;
+{4362.} 	 C7CO2M5O2 = C7CO2M5OH : 	9.20D-14*RO2*0.30 	;
+{4363.} 	 TMBOOH + OH = TMBCHO + OH : 	2.05D-11 	;
+{4364.} 	 TMBOOH = TMBO + OH : 	J(41) 	;
+{4365.} 	 TMBNO3 + OH = TMBCHO + NO2 : 	6.03D-12 	;
+{4366.} 	 TMBNO3 = TMBO + NO2 : 	J(53) 	;
+{4367.} 	 TMBO = TMBCHO + HO2 : 	KROPRIM*O2 	;
+{4368.} 	 TMBCHO + NO3 = TMBCO3 + HNO3 : 	KNO3AL 	;
+{4369.} 	 TMBCHO + OH = TMBCO3 : 	1.29D-11 	;
+{4370.} 	 TMBCHO = DMPHO2 + HO2 + CO : 	J(19) 	;
+{4371.} 	 TMBCHO = TMBCO3 + HO2 : 	J(18) 	;
+{4372.} 	 TMBOH + OH = TMBCHO + HO2 : 	8.93D-12 	;
+{4373.} 	 TM135BPOOH + OH = TM135OBPOH + OH : 	1.28D-10 	;
+{4374.} 	 TM135BPOOH = TM135BPRO + OH : 	J(41) 	;
+{4375.} 	 TM135BPNO3 + OH = TM135OBPOH + NO2 : 	9.45D-11 	;
+{4376.} 	 TM135BPNO3 = TM135BPRO + NO2 : 	J(54) 	;
+{4377.} 	 TM135BPRO = MGLYOX + C5MDICARB + HO2 : 	KDEC*0.50 	;
+{4378.} 	 TM135BPRO = MGLYOX + MXYFUONE + HO2 : 	KDEC*0.50 	;
+{4379.} 	 TM135BP2OH + OH = TM135OBPOH + HO2 : 	1.55D-10 	;
+{4380.} 	 TM135OBPOH + OH = C4MCODBCO3 + MGLYOX : 	1.00D-10 	;
+{4381.} 	 TM135OBPOH = C4MCODBCO3 + MGLYOX + HO2 : 	J(22) 	;
+{4382.} 	 NTM135OLO2 + HO2 = NTM135LOOH : 	KRO2HO2*0.890 	;
+{4383.} 	 NTM135OLO2 + NO = NTM135OLO + NO2 : 	KRO2NO 	;
+{4384.} 	 NTM135OLO2 + NO3 = NTM135OLO + NO2 : 	KRO2NO3 	;
+{4385.} 	 NTM135OLO2 = NTM135OLO : 	8.00D-13*RO2*0.70 	;
+{4386.} 	 NTM135OLO2 = NTM135OLOH : 	8.00D-13*RO2*0.30 	;
+{4387.} 	 TM135O + HO2 = TM135BZOL : 	1.00D-13 	;
+{4388.} 	 TM135OLO2 + HO2 = TM135OLOOH : 	KRO2HO2*0.890 	;
+{4389.} 	 TM135OLO2 + NO = TM135OLO + NO2 : 	KRO2NO 	;
+{4390.} 	 TM135OLO2 + NO3 = TM135OLO + NO2 : 	KRO2NO3 	;
+{4391.} 	 TM135OLO2 = TM135OLO : 	8.00D-13*RO2*0.70 	;
+{4392.} 	 TM135OLO2 = TM135OLOH : 	8.00D-13*RO2*0.30 	;
+{4393.} 	 TM135MUCO3 + HO2 = C7M2CO5O2 + OH : 	KAPHO2*0.44 	;
+{4394.} 	 TM135MUCO3 + HO2 = TM135MUO2H + O3 : 	KAPHO2*0.15 	;
+{4395.} 	 TM135MUCO3 + HO2 = TM135MUO3H : 	KAPHO2*0.41 	;
+{4396.} 	 TM135MUCO3 + NO = C7M2CO5O2 + NO2 : 	KAPNO 	;
+{4397.} 	 TM135MUCO3 + NO2 = TM135MUPAN : 	KFPAN 	;
+{4398.} 	 TM135MUCO3 + NO3 = C7M2CO5O2 + NO2 : 	KRO2NO3*1.74 	;
+{4399.} 	 TM135MUCO3 = C7M2CO5O2 : 	1.00D-11*RO2*0.70 	;
+{4400.} 	 TM135MUCO3 = TM135MUO2H : 	1.00D-11*RO2*0.30 	;
+{4401.} 	 EPXMALKT + NO3 = EPXMKTCO3 + HNO3 : 	KNO3AL*8.5 	;
+{4402.} 	 EPXMALKT + OH = EPXMKTCO3 : 	2.22D-11 	;
+{4403.} 	 EPXMALKT = C3MDIALO2 + CH3CO3 : 	J(22) 	;
+{4404.} 	 EPXMALKT = CO24C53O2 + HO2 + CO : 	J(17) 	;
+{4405.} 	 MGLOOC = CH3CO3 + CO + OH : 	KDEC*0.89 	;
+{4406.} 	 MGLOOC = MGLOO : 	KDEC*0.11 	;
+{4407.} 	 TM135MUCO2 + HO2 = TM135MUOOH : 	KRO2HO2*0.890 	;
+{4408.} 	 TM135MUCO2 + NO = TM135MUCO + NO2 : 	KRO2NO*0.941 	;
+{4409.} 	 TM135MUCO2 + NO = TM135MUNO3 : 	KRO2NO*0.059 	;
+{4410.} 	 TM135MUCO2 + NO3 = TM135MUCO + NO2 : 	KRO2NO3 	;
+{4411.} 	 TM135MUCO2 = TM135MUCO : 	9.20D-14*RO2*0.70 	;
+{4412.} 	 TM135MUCO2 = TM135MUOH : 	9.20D-14*RO2*0.30 	;
+{4413.} 	 C7M2CO5O2 + HO2 = C7M2CO5OOH : 	KRO2HO2*0.859 	;
+{4414.} 	 C7M2CO5O2 + NO = C7M2CO5O + NO2 : 	KRO2NO 	;
+{4415.} 	 C7M2CO5O2 + NO3 = C7M2CO5O + NO2 : 	KRO2NO3 	;
+{4416.} 	 C7M2CO5O2 = C7M2CO5O : 	8.80D-11*RO2*0.60 	;
+{4417.} 	 C7M2CO5O2 = C7M2CO5OH : 	8.80D-11*RO2*0.20 	;
+{4418.} 	 C7M2CO5O2 = C7M3CO : 	8.80D-11*RO2*0.20 	;
+{4419.} 	 ETOLOOH + OH = MPHCOME + OH : 	2.05D-11 	;
+{4420.} 	 ETOLOOH = ETOLO + OH : 	J(41) 	;
+{4421.} 	 ETOLNO3 + OH = MPHCOME + NO2 : 	6.03D-12 	;
+{4422.} 	 ETOLNO3 = ETOLO + NO2 : 	J(54) 	;
+{4423.} 	 ETOLO = MPHCOME + HO2 : 	KROSEC*O2 	;
+{4424.} 	 ETOLOH + OH = MPHCOME + HO2 : 	8.93D-12 	;
+{4425.} 	 MPHCOME + OH = MPHCOMEO2 : 	6.00D-12 	;
+{4426.} 	 MPHCOME = OXYLCO3 + CH3O2 : 	J(22) 	;
+{4427.} 	 OETLBPROOH + OH = OETLBIPRO2 : 	7.73D-11 	;
+{4428.} 	 OETLBPROOH = OETLBIPRO + OH : 	J(41) 	;
+{4429.} 	 OETLBIPNO3 + OH = TLCOBIPEOH + C2H5O2 + NO2 : 	7.31D-11 	;
+{4430.} 	 OETLBIPNO3 = OETLBIPRO + NO2 : 	J(55) 	;
+{4431.} 	 OETLBIPRO = BZFUONE + CO23C5 + HO2 : 	KDEC*0.167 	;
+{4432.} 	 OETLBIPRO = C5DICARB + EGLYOX + HO2 : 	KDEC*0.166 	;
+{4433.} 	 OETLBIPRO = C6DICARB + MGLYOX + HO2 : 	KDEC*0.167 	;
+{4434.} 	 OETLBIPRO = EBFUONE + MGLYOX + HO2 : 	KDEC*0.166 	;
+{4435.} 	 OETLBIPRO = MALDIAL + CO23C5 + HO2 : 	KDEC*0.167 	;
+{4436.} 	 OETLBIPRO = TLFUONE + EGLYOX + HO2 : 	KDEC*0.167 	;
+{4437.} 	 OETLBPR2OH + OH = OETLBIPRO : 	1.12D-10 	;
+{4438.} 	 OETLMUCCO3 + HO2 = MC7CO2O2 + OH : 	KAPHO2*0.44 	;
+{4439.} 	 OETLMUCCO3 + HO2 = OETLMUCO2H + O3 : 	KAPHO2*0.15 	;
+{4440.} 	 OETLMUCCO3 + HO2 = OETLMUCO3H : 	KAPHO2*0.41 	;
+{4441.} 	 OETLMUCCO3 + NO = MC7CO2O2 + NO2 : 	KAPNO 	;
+{4442.} 	 OETLMUCCO3 + NO2 = OETLMUCPAN : 	KFPAN 	;
+{4443.} 	 OETLMUCCO3 + NO3 = MC7CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{4444.} 	 OETLMUCCO3 = MC7CO2O2 : 	1.00D-11*RO2*0.70 	;
+{4445.} 	 OETLMUCCO3 = OETLMUCO2H : 	1.00D-11*RO2*0.30 	;
+{4446.} 	 EPXMEC4DAL + NO3 = EPXMEDLCO3 + HNO3 : 	2*KNO3AL*8.5 	;
+{4447.} 	 EPXMEC4DAL + OH = EPXMEDLCO3 : 	4.57D-11 	;
+{4448.} 	 EPXMEC4DAL = C4ECO2O2 + HO2 + CO : 	J(17)*2 	;
+{4449.} 	 OETLMUCO2 + HO2 = OETLMUCOOH : 	KRO2HO2*0.890 	;
+{4450.} 	 OETLMUCO2 + NO = OETLMUCNO3 : 	KRO2NO*0.196 	;
+{4451.} 	 OETLMUCO2 + NO = OETLMUCO + NO2 : 	KRO2NO*0.804 	;
+{4452.} 	 OETLMUCO2 + NO3 = OETLMUCO + NO2 : 	KRO2NO3 	;
+{4453.} 	 OETLMUCO2 = OETLMUCCO : 	8.80D-12*RO2*0.20 	;
+{4454.} 	 OETLMUCO2 = OETLMUCO : 	8.80D-12*RO2*0.60 	;
+{4455.} 	 OETLMUCO2 = OETLMUCOH : 	8.80D-12*RO2*0.20 	;
+{4456.} 	 MC7CO2O2 + HO2 = MC7CO2OOH : 	KRO2HO2*0.859 	;
+{4457.} 	 MC7CO2O2 + NO = MC7CO2O + NO2 : 	KRO2NO 	;
+{4458.} 	 MC7CO2O2 + NO3 = MC7CO2O + NO2 : 	KRO2NO3 	;
+{4459.} 	 MC7CO2O2 = MC7CO2O : 	9.20D-14*RO2*0.70 	;
+{4460.} 	 MC7CO2O2 = MC7CO2OH : 	9.20D-14*RO2*0.30 	;
+{4461.} 	 NOETOLO2 + HO2 = NOETOLOOH : 	KRO2HO2*0.90 	;
+{4462.} 	 NOETOLO2 + NO = NOETOLO + NO2 : 	KRO2NO 	;
+{4463.} 	 NOETOLO2 + NO3 = NOETOLO + NO2 : 	KRO2NO3 	;
+{4464.} 	 NOETOLO2 = NOETOLO : 	8.00D-13*RO2*0.70 	;
+{4465.} 	 NOETOLO2 = NOETOLOH : 	8.00D-13*RO2*0.30 	;
+{4466.} 	 OET1O + NO2 = OET1OHNO2 : 	2.08D-12 	;
+{4467.} 	 OET1O + O3 = OET1O2 : 	2.86D-13 	;
+{4468.} 	 OETOLO2 + HO2 = OETOLOOH : 	KRO2HO2*0.90 	;
+{4469.} 	 OETOLO2 + NO = OETOLO + NO2 : 	KRO2NO 	;
+{4470.} 	 OETOLO2 + NO3 = OETOLO + NO2 : 	KRO2NO3 	;
+{4471.} 	 OETOLO2 = OETOLO : 	8.00D-13*RO2*0.70 	;
+{4472.} 	 OETOLO2 = OETOLOH : 	8.00D-13*RO2*0.30 	;
+{4473.} 	 OETCATECH + NO3 = OTCATEC1O + HNO3 : 	2.01D-10 	;
+{4474.} 	 OETCATECH + O3 = OTCATECOOA : 	2.81D-17 	;
+{4475.} 	 OETCATECH + OH = OTCATEC1O : 	2.05D-10 	;
+{4476.} 	 METLBPROOH + OH = METLBIPRO2 : 	9.58D-11 	;
+{4477.} 	 METLBPROOH = METLBIPRO + OH : 	J(41) 	;
+{4478.} 	 METLBIPNO3 + OH = METLOBPROH + NO2 : 	7.27D-11 	;
+{4479.} 	 METLBIPNO3 = METLBIPRO + NO2 : 	J(55) 	;
+{4480.} 	 METLBIPRO = C4MDIAL + EGLYOX + HO2 : 	KDEC*0.167 	;
+{4481.} 	 METLBIPRO = C5DICARB + EGLYOX + HO2 : 	KDEC*0.166 	;
+{4482.} 	 METLBIPRO = C6DICARB + MGLYOX + HO2 : 	KDEC*0.25 	;
+{4483.} 	 METLBIPRO = EBFUONE + MGLYOX + HO2 : 	KDEC*0.25 	;
+{4484.} 	 METLBIPRO = TLFUONE + EGLYOX + HO2 : 	KDEC*0.167 	;
+{4485.} 	 METLBPR2OH + OH = METLBIPRO : 	1.19D-10 	;
+{4486.} 	 METLOBPROH + OH = C5CO14O2 + EGLYOX : 	8.27D-11 	;
+{4487.} 	 METLOBPROH = C5CO14O2 + EGLYOX + HO2 : 	J(22) 	;
+{4488.} 	 METLMUCCO3 + HO2 = C826CO3O2 + OH : 	KAPHO2*0.44 	;
+{4489.} 	 METLMUCCO3 + HO2 = METLMUCO2H + O3 : 	KAPHO2*0.15 	;
+{4490.} 	 METLMUCCO3 + HO2 = METLMUCO3H : 	KAPHO2*0.41 	;
+{4491.} 	 METLMUCCO3 + NO2 = C826CO3O2 + NO2 : 	KAPNO 	;
+{4492.} 	 METLMUCCO3 + NO2 = METLMUCPAN : 	KFPAN 	;
+{4493.} 	 METLMUCCO3 + NO3 = C826CO3O2 + NO2 : 	KRO2NO3*1.74 	;
+{4494.} 	 METLMUCCO3 = C826CO3O2 : 	1.00D-11*RO2*0.70 	;
+{4495.} 	 METLMUCCO3 = METLMUCO2H : 	1.00D-11*RO2*0.30 	;
+{4496.} 	 METLMUCO2 + HO2 = METLMUCOOH : 	KRO2HO2*0.890 	;
+{4497.} 	 METLMUCO2 + NO = METLMUCNO3 : 	KRO2NO*0.196 	;
+{4498.} 	 METLMUCO2 + NO = METLMUCO + NO2 : 	KRO2NO*0.804 	;
+{4499.} 	 METLMUCO2 + NO3 = METLMUCO + NO2 : 	KRO2NO3 	;
+{4500.} 	 METLMUCO2 = METLMUCCO : 	8.80D-12*RO2*0.20 	;
+{4501.} 	 METLMUCO2 = METLMUCO : 	8.80D-12*RO2*0.60 	;
+{4502.} 	 METLMUCO2 = METLMUCOH : 	8.80D-12*RO2*0.20 	;
+{4503.} 	 C826CO3O2 + HO2 = C826CO3OOH : 	KRO2HO2*0.859 	;
+{4504.} 	 C826CO3O2 + NO = C826CO3O + NO2 : 	KRO2NO 	;
+{4505.} 	 C826CO3O2 + NO3 = C826CO3O + NO2 : 	KRO2NO3 	;
+{4506.} 	 C826CO3O2 = C8236CO : 	8.80D-12*RO2*0.20 	;
+{4507.} 	 C826CO3O2 = C826CO3O : 	8.80D-12*RO2*0.60 	;
+{4508.} 	 C826CO3O2 = C826CO3OH : 	8.80D-12*RO2*0.20 	;
+{4509.} 	 MET1O + NO2 = MET1OHNO2 : 	2.08D-12 	;
+{4510.} 	 MET1O + O3 = MET1O2 : 	2.86D-13 	;
+{4511.} 	 METOLO2 + HO2 = METOLOOH : 	KRO2HO2*0.90 	;
+{4512.} 	 METOLO2 + NO = METOLO + NO2 : 	KRO2NO 	;
+{4513.} 	 METOLO2 + NO3 = METOLO + NO2 : 	KRO2NO3 	;
+{4514.} 	 METOLO2 = METOLO : 	8.00D-13*RO2*0.70 	;
+{4515.} 	 METOLO2 = METOLOH : 	8.00D-13*RO2*0.30 	;
+{4516.} 	 NMETOLO2 + HO2 = NMETOLOOH : 	KRO2HO2*0.90 	;
+{4517.} 	 NMETOLO2 + NO = NMETOLO + NO2 : 	KRO2NO 	;
+{4518.} 	 NMETOLO2 + NO3 = NMETOLO + NO2 : 	KRO2NO3 	;
+{4519.} 	 NMETOLO2 = NMETOLO : 	8.00D-13*RO2*0.70 	;
+{4520.} 	 NMETOLO2 = NMETOLOH : 	8.00D-13*RO2*0.30 	;
+{4521.} 	 METCATECH + NO3 = MTCATEC1O + HNO3 : 	2.01D-10 	;
+{4522.} 	 METCATECH + O3 = MTCATECOOA : 	2.81D-17 	;
+{4523.} 	 METCATECH + OH = MTCATEC1O : 	2.05D-10 	;
+{4524.} 	 PETLBPROOH + OH = PETLBIPRO2 : 	7.77D-11 	;
+{4525.} 	 PETLBPROOH = PETLBIPRO + OH : 	J(41) 	;
+{4526.} 	 PETLBIPNO3 + OH = PETLBIPRO + NO2 : 	7.27D-11 	;
+{4527.} 	 PETLBIPNO3 = PETLBIPRO + NO2 : 	J(55) 	;
+{4528.} 	 PETLBIPRO = C4MDIAL + EGLYOX + HO2 : 	KDEC*0.18 	;
+{4529.} 	 PETLBIPRO = C7EDICARB + GLYOX + HO2 : 	KDEC*0.64 	;
+{4530.} 	 PETLBIPRO = EBFUONE + MGLYOX + HO2 : 	KDEC*0.09 	;
+{4531.} 	 PETLBIPRO = TLFUONE + EGLYOX + HO2 : 	KDEC*0.09 	;
+{4532.} 	 PETLBPR2OH + OH = PETLBIPRO : 	1.13D-10 	;
+{4533.} 	 PETLMUCCO3 + HO2 = C7M6CO2O2 + OH : 	KAPHO2*0.44 	;
+{4534.} 	 PETLMUCCO3 + HO2 = PETLMUCO2H + O3 : 	KAPHO2*0.15 	;
+{4535.} 	 PETLMUCCO3 + HO2 = PETLMUCO3H : 	KAPHO2*0.41 	;
+{4536.} 	 PETLMUCCO3 + NO = C7M6CO2O2 + NO2 : 	KAPNO 	;
+{4537.} 	 PETLMUCCO3 + NO2 = PETLMUCPAN : 	KFPAN 	;
+{4538.} 	 PETLMUCCO3 + NO3 = C7M6CO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{4539.} 	 PETLMUCCO3 = C7M6CO2O2 : 	1.00D-11*RO2*0.70 	;
+{4540.} 	 PETLMUCCO3 = PETLMUCO2H : 	1.00D-11*RO2*0.30 	;
+{4541.} 	 PETLMUCO2 + HO2 = PETLMUCOOH : 	KRO2HO2*0.890 	;
+{4542.} 	 PETLMUCO2 + NO = PETLMUCNO3 : 	KRO2NO*0.173 	;
+{4543.} 	 PETLMUCO2 + NO = PETLMUCO + NO2 : 	KRO2NO*0.827 	;
+{4544.} 	 PETLMUCO2 + NO3 = PETLMUCO + NO2 : 	KRO2NO3 	;
+{4545.} 	 PETLMUCO2 = PETLMUCCO : 	8.80D-12*RO2*0.2 	;
+{4546.} 	 PETLMUCO2 = PETLMUCO : 	8.80D-12*RO2*0.6 	;
+{4547.} 	 PETLMUCO2 = PETLMUCOH : 	8.80D-12*RO2*0.2 	;
+{4548.} 	 C7M6CO2O2 + HO2 = C7M6CO2OOH : 	KRO2HO2*0.859 	;
+{4549.} 	 C7M6CO2O2 + NO = C7M6CO2O + NO2 : 	KRO2NO 	;
+{4550.} 	 C7M6CO2O2 + NO3 = C7M6CO2O + NO2 : 	KRO2NO3 	;
+{4551.} 	 C7M6CO2O2 = C7M6CO2O : 	9.20D-14*RO2*0.70 	;
+{4552.} 	 C7M6CO2O2 = C7M6CO2OH : 	9.20D-14*RO2*0.30 	;
+{4553.} 	 NPETOLO2 + HO2 = NPETOLOOH : 	KRO2HO2*0.90 	;
+{4554.} 	 NPETOLO2 + NO = NPETOLO + NO2 : 	KRO2NO 	;
+{4555.} 	 NPETOLO2 + NO3 = NPETOLO + NO2 : 	KRO2NO3 	;
+{4556.} 	 NPETOLO2 = NPETOLO : 	8.00D-13*RO2*0.70 	;
+{4557.} 	 NPETOLO2 = NPETOLOH : 	8.00D-13*RO2*0.30 	;
+{4558.} 	 PET1O + NO2 = PET1OHNO2 : 	2.08D-12 	;
+{4559.} 	 PET1O + O3 = PET1O2 : 	2.86D-13 	;
+{4560.} 	 PETOLO2 + HO2 = PETOLOOH : 	KRO2HO2*0.90 	;
+{4561.} 	 PETOLO2 + NO = PETOLO + NO2 : 	KRO2NO 	;
+{4562.} 	 PETOLO2 + NO3 = PETOLO + NO2 : 	KRO2NO3 	;
+{4563.} 	 PETOLO2 = PETOLO : 	8.00D-13*RO2*0.70 	;
+{4564.} 	 PETOLO2 = PETOLOH : 	8.00D-13*RO2*0.30 	;
+{4565.} 	 PETCATECH + NO3 = PTCATEC1O + HNO3 : 	2.01D-10 	;
+{4566.} 	 PETCATECH + O3 = PTCATECOOA : 	2.81D-17 	;
+{4567.} 	 PETCATECH + OH = PTCATEC1O : 	2.05D-10 	;
+{4568.} 	 DM35EBOOH + OH = DMPHCOME + OH : 	2.05D-11 	;
+{4569.} 	 DM35EBOOH = DM35EBO + OH : 	J(41) 	;
+{4570.} 	 DM35EBNO3 + OH = DMPHCOME + NO2 : 	6.03D-12 	;
+{4571.} 	 DM35EBNO3 = DM35EBO + NO2 : 	J(54) 	;
+{4572.} 	 DM35EBO = DMPHCOME + HO2 : 	KROSEC*O2 	;
+{4573.} 	 DM35EBOH + OH = DMPHCOME + HO2 : 	8.93D-12 	;
+{4574.} 	 DMPHCOME + OH = DMPHCOMO2 : 	6.00D-12 	;
+{4575.} 	 DMPHCOME = TMBCO3 + CH3O2 : 	J(22) 	;
+{4576.} 	 DMEBPROOH + OH = DMEBIPRO2 : 	1.19D-10 	;
+{4577.} 	 DMEBPROOH = DMEBIPRO + OH : 	J(41) 	;
+{4578.} 	 DMEBIPNO3 + OH = DMEBIPRO + NO2 : 	9.57D-11 	;
+{4579.} 	 DMEBIPNO3 = DMEBIPRO + NO2 : 	J(54) 	;
+{4580.} 	 DMEBIPRO = C5MDICARB + EGLYOX + HO2 : 	KDEC*0.25 	;
+{4581.} 	 DMEBIPRO = C7DDICARB + MGLYOX + HO2 : 	KDEC*0.25 	;
+{4582.} 	 DMEBIPRO = MEBFUONE + MGLYOX + HO2 : 	KDEC*0.25 	;
+{4583.} 	 DMEBIPRO = MXYFUONE + EGLYOX + HO2 : 	KDEC*0.25 	;
+{4584.} 	 DMEBPR2OH + OH = DMEBIPRO : 	1.56D-10 	;
+{4585.} 	 DMEOBPROH + OH = C4MCODBCO3 + EGLYOX : 	1.01D-10 	;
+{4586.} 	 DMEOBPROH = C4MCODBCO3 + EGLYOX + HO2 : 	J(22) 	;
+{4587.} 	 DMEBMUCO3 + HO2 = C8M2CO6O2 + OH : 	KAPHO2*0.44 	;
+{4588.} 	 DMEBMUCO3 + HO2 = DMEBMUO2H + O3 : 	KAPHO2*0.15 	;
+{4589.} 	 DMEBMUCO3 + HO2 = DMEBMUO3H : 	KAPHO2*0.41 	;
+{4590.} 	 DMEBMUCO3 + NO = C8M2CO6O2 + NO2 : 	KAPNO 	;
+{4591.} 	 DMEBMUCO3 + NO2 = DMEBMUPAN : 	KFPAN 	;
+{4592.} 	 DMEBMUCO3 + NO3 = C8M2CO6O2 + NO2 : 	KRO2NO3*1.74 	;
+{4593.} 	 DMEBMUCO3 = C8M2CO6O2 : 	1.00D-11*RO2*0.70 	;
+{4594.} 	 DMEBMUCO3 = DMEBMUO2H : 	1.00D-11*RO2*0.30 	;
+{4595.} 	 EGLYOOD = C2H5CO3 + CO + OH : 	KDEC*0.89 	;
+{4596.} 	 EGLYOOD = EGLYOO : 	KDEC*0.11 	;
+{4597.} 	 DMEBMUCO2 + HO2 = DMEBMUOOH : 	KRO2HO2*0.914 	;
+{4598.} 	 DMEBMUCO2 + NO = DMEBMUCO + NO2 : 	KRO2NO*0.937 	;
+{4599.} 	 DMEBMUCO2 + NO = DMEBMUNO3 : 	KRO2NO*0.063 	;
+{4600.} 	 DMEBMUCO2 + NO3 = DMEBMUCO + NO2 : 	KRO2NO3 	;
+{4601.} 	 DMEBMUCO2 = DMEBMUCO : 	9.20D-14*RO2*0.70 	;
+{4602.} 	 DMEBMUCO2 = DMEBMUOH : 	9.20D-14*RO2*0.30 	;
+{4603.} 	 C8M2CO6O2 + HO2 = C8M2CO6OOH : 	KRO2HO2*0.890 	;
+{4604.} 	 C8M2CO6O2 + NO = C8M2CO6O + NO2 : 	KRO2NO 	;
+{4605.} 	 C8M2CO6O2 + NO3 = C8M2CO6O + NO2 : 	KRO2NO3 	;
+{4606.} 	 C8M2CO6O2 = C8M2CO6O : 	8.80D-11*RO2*0.60 	;
+{4607.} 	 C8M2CO6O2 = C8M2CO6OH : 	8.80D-11*RO2*0.20 	;
+{4608.} 	 C8M2CO6O2 = C8M3CO : 	8.80D-11*RO2*0.20 	;
+{4609.} 	 DMEPH1O + HO2 = DMEPHOH : 	1.00D-13 	;
+{4610.} 	 NDMEPHOLO2 + HO2 = NDMEPLOOH : 	KRO2HO2*0.914 	;
+{4611.} 	 NDMEPHOLO2 + NO = NDMEPHOLO + NO2 : 	KRO2NO 	;
+{4612.} 	 NDMEPHOLO2 + NO3 = NDMEPHOLO + NO2 : 	KRO2NO3 	;
+{4613.} 	 NDMEPHOLO2 = NDMEPHOLO : 	8.00D-13*RO2*0.70 	;
+{4614.} 	 NDMEPHOLO2 = NDMEPHOLOH : 	8.00D-13*RO2*0.30 	;
+{4615.} 	 DMEPHOLO2 + HO2 = DMEPHOLOOH : 	KRO2HO2*0.914 	;
+{4616.} 	 DMEPHOLO2 + NO = DMEPHOLO + NO2 : 	KRO2NO 	;
+{4617.} 	 DMEPHOLO2 + NO3 = DMEPHOLO + NO2 : 	KRO2NO3 	;
+{4618.} 	 DMEPHOLO2 = DMEPHOLO : 	8.00D-13*RO2*0.70 	;
+{4619.} 	 DMEPHOLO2 = DMEPHOLOH : 	8.00D-13*RO2*0.30 	;
+{4620.} 	 DE35TOOH + OH = EMPHCOME + OH : 	2.05D-11 	;
+{4621.} 	 DE35TOOH = DE35TO + OH : 	J(41) 	;
+{4622.} 	 DE35TNO3 + OH = EMPHCOME + NO2 : 	6.03D-12 	;
+{4623.} 	 DE35TNO3 = DE35TO + NO2 : 	J(54) 	;
+{4624.} 	 DE35TO = EMPHCOME + HO2 : 	KROSEC*O2 	;
+{4625.} 	 DE35TOH + OH = EMPHCOME + HO2 : 	8.93D-12 	;
+{4626.} 	 EMPHCOME + OH = EMPHCOMO2 : 	6.00D-12 	;
+{4627.} 	 EMPHCOME = EMPHCO3 + CH3O2 : 	J(22) 	;
+{4628.} 	 DEMPHSMS1O + HO2 = DEMPHOH : 	1.00D-13 	;
+{4629.} 	 NDEMPHOLO2 + HO2 = NDEMPLOOH : 	KRO2HO2*0.932 	;
+{4630.} 	 NDEMPHOLO2 + NO = NDEMPHOLO + NO2 : 	KRO2NO 	;
+{4631.} 	 NDEMPHOLO2 + NO3 = NDEMPHOLO + NO2 : 	KRO2NO3 	;
+{4632.} 	 NDEMPHOLO2 = NDEMPHOLO : 	8.00D-13*RO2*0.70 	;
+{4633.} 	 NDEMPHOLO2 = NDEMPHOLOH : 	8.00D-13*RO2*0.30 	;
+{4634.} 	 DEMPHOLO2 + HO2 = DEMPHOLOOH : 	KRO2HO2*0.932 	;
+{4635.} 	 DEMPHOLO2 + NO = DEMPHOLO + NO2 : 	KRO2NO 	;
+{4636.} 	 DEMPHOLO2 + NO3 = DEMPHOLO + NO2 : 	KRO2NO3 	;
+{4637.} 	 DEMPHOLO2 = DEMPHOLO : 	8.00D-13*RO2*0.70 	;
+{4638.} 	 DEMPHOLO2 = DEMPHOLOH : 	8.00D-13*RO2*0.30 	;
+{4639.} 	 DETLBPROOH + OH = DETLBIPRO2 : 	1.20D-10 	;
+{4640.} 	 DETLBPROOH = DETLBIPRO + OH : 	J(41) 	;
+{4641.} 	 DETLBIPNO3 + OH = DETLBIPRO + NO2 : 	9.67D-11 	;
+{4642.} 	 DETLBIPNO3 = DETLBIPRO + NO2 : 	J(54) 	;
+{4643.} 	 DETLBIPRO = C7DDICARB + EGLYOX + HO2 : 	KDEC*0.50 	;
+{4644.} 	 DETLBIPRO = MEBFUONE + EGLYOX + HO2 : 	KDEC*0.50 	;
+{4645.} 	 DETLBPR2OH + OH = DETLBIPRO : 	1.57D-10 	;
+{4646.} 	 DETLOBPROH + OH = C7CODBCO3 + MGLYOX : 	1.03D-10 	;
+{4647.} 	 DETLOBPROH = C7CODBCO3 + MGLYOX + HO2 : 	J(22) 	;
+{4648.} 	 DETLMUCO3 + HO2 = C9M2CO6O2 + OH : 	KAPHO2*0.44 	;
+{4649.} 	 DETLMUCO3 + HO2 = DETLMUO2H + O3 : 	KAPHO2*0.15 	;
+{4650.} 	 DETLMUCO3 + HO2 = DETLMUO3H : 	KAPHO2*0.41 	;
+{4651.} 	 DETLMUCO3 + NO = C9M2CO6O2 + NO2 : 	KAPNO 	;
+{4652.} 	 DETLMUCO3 + NO2 = DETLMUPAN : 	KFPAN 	;
+{4653.} 	 DETLMUCO3 + NO3 = C9M2CO6O2 + NO2 : 	KRO2NO3*1.74 	;
+{4654.} 	 DETLMUCO3 = C9M2CO6O2 : 	1.00D-11*RO2*0.70 	;
+{4655.} 	 DETLMUCO3 = DETLMUO2H : 	1.00D-11*RO2*0.30 	;
+{4656.} 	 EPXEALKT + NO3 = EPXEKTCO3 + HNO3 : 	KNO3AL*8.5 	;
+{4657.} 	 EPXEALKT + OH = EPXEKTCO3 : 	2.55D-11 	;
+{4658.} 	 EPXEALKT = C3EDIALO2 + CH3CO3 : 	J(22) 	;
+{4659.} 	 EPXEALKT = CO24C63O2 + HO2 + CO : 	J(17) 	;
+{4660.} 	 DETLMUCO2 + HO2 = DETLMUOOH : 	KRO2HO2*0.932 	;
+{4661.} 	 DETLMUCO2 + NO = DETLMUCO + NO2 : 	KRO2NO*0.934 	;
+{4662.} 	 DETLMUCO2 + NO = DETLMUNO3 : 	KRO2NO*0.066 	;
+{4663.} 	 DETLMUCO2 + NO3 = DETLMUCO + NO2 : 	KRO2NO3 	;
+{4664.} 	 DETLMUCO2 = DETLMUCO : 	9.20D-14*RO2*0.70 	;
+{4665.} 	 DETLMUCO2 = DETLMUOH : 	9.20D-14*RO2*0.30 	;
+{4666.} 	 C9M2CO6O2 + HO2 = C9M2CO6OOH : 	KRO2HO2*0.914 	;
+{4667.} 	 C9M2CO6O2 + NO = C9M2CO6O + NO2 : 	KRO2NO 	;
+{4668.} 	 C9M2CO6O2 + NO3 = C9M2CO6O + NO2 : 	KRO2NO3 	;
+{4669.} 	 C9M2CO6O2 = C9M2CO6O : 	8.80D-11*RO2*0.60 	;
+{4670.} 	 C9M2CO6O2 = C9M2CO6OH : 	8.80D-11*RO2*0.20 	;
+{4671.} 	 C9M2CO6O2 = C9M3CO : 	8.80D-11*RO2*0.20 	;
+{4672.} 	 OH + NSTYRENOOH = NSTYRENO2 : 	6.16D-11 	;
+{4673.} 	 NSTYRENEO = NO2 + HCHO + BENZAL : 	KDEC 	;
+{4674.} 	 PHCHOO + CO = BENZAL : 	1.20D-15 	;
+{4675.} 	 PHCHOO + NO = BENZAL + NO2 : 	1.00D-14 	;
+{4676.} 	 PHCHOO + NO2 = BENZAL + NO3 : 	1.00D-15 	;
+{4677.} 	 PHCHOO + SO2 = BENZAL + SO3 : 	7.00D-14 	;
+{4678.} 	 PHCHOO = BENZAL + H2O2 : 	6.00D-18*H2O 	;
+{4679.} 	 PHCHOO = PHCOOH : 	1.00D-17*H2O 	;
+{4680.} 	 OH + STYRENOOH = STYRENO2 : 	6.16D-11 	;
+{4681.} 	 STYRENOOH = STYRENO + OH : 	J(41) 	;
+{4682.} 	 STYRENO = HO2 + HCHO + BENZAL : 	KDEC 	;
+{4683.} 	 C6H5CO3H + OH = C6H5CO3 : 	4.66D-12 	;
+{4684.} 	 C6H5CO3H = C6H5O2 + OH : 	J(41) 	;
+{4685.} 	 PHCOOH + OH = C6H5O2 : 	1.10D-12 	;
+{4686.} 	 PBZN + OH = C6H5OOH + CO + NO2 : 	1.06D-12 	;
+{4687.} 	 PBZN = C6H5CO3 + NO2 : 	KBPAN*0.67 	;
+{4688.} 	 C6H5OOH + OH = C6H5O2 : 	3.60D-12 	;
+{4689.} 	 C6H5OOH = C6H5O + OH : 	J(41) 	;
+{4690.} 	 CH2CLOOH + OH = CH2CLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4691.} 	 CH2CLOOH + OH = CHOCL + OH : 	4.14D-12 	;
+{4692.} 	 CH2CLOOH = CH2CLO + OH : 	J(41) 	;
+{4693.} 	 CH2CLO = CHOCL + HO2 : 	KROPRIM*O2 	;
+{4694.} 	 CH2CLOH + OH = CHOCL + HO2 : 	1.08D-12 	;
+{4695.} 	 CHCL2OOH + OH = CHCL2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4696.} 	 CHCL2OOH + OH = COCL2 + OH : 	3.44D-12 	;
+{4697.} 	 CHCL2OOH = CHCL2O + OH : 	J(41) 	;
+{4698.} 	 CHCL2O = CHOCL + CL : 	KDEC 	;
+{4699.} 	 CHCL2OH + OH = COCL2 + HO2 : 	9.34D-13 	;
+{4700.} 	 COCL2 = CO + CL + CL : 	J(15) 	;
+{4701.} 	 CCL3OOH + OH = CCL3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4702.} 	 CCL3OOH = CCL3O + OH : 	J(41) 	;
+{4703.} 	 CCL3O = COCL2 + CL : 	KDEC 	;
+{4704.} 	 CCL3OH + OH = CCL3O : 	3.60D-14 	;
+{4705.} 	 CCL3CH2OOH + OH = CCL3CH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4706.} 	 CCL3CH2OOH + OH = CCL3CHO + OH : 	9.80D-13 	;
+{4707.} 	 CCL3CH2OOH = CCL3CH2O + OH : 	J(41) 	;
+{4708.} 	 CCL3CH2O = CCL3CHO + HO2 : 	KROPRIM*O2 	;
+{4709.} 	 CCL3CH2OH + OH = CCL3CHO + HO2 : 	2.56D-12 	;
+{4710.} 	 CCL3CHO + NO3 = CCL3CO3 + HNO3 : 	KNO3AL 	;
+{4711.} 	 CCL3CHO + OH = CCL3CO3 : 	1.45D-12 	;
+{4712.} 	 CCL3CHO = CCL3O2 + HO2 + CO : 	J(11) 	;
+{4713.} 	 TCEOHOOH + OH = TCEOHO2 : 	3.63D-12 	;
+{4714.} 	 TCEOHOOH = TCEOHO + OH : 	J(41) 	;
+{4715.} 	 TCEOHO = COCL2 + COCL2 + HO2 : 	KDEC 	;
+{4716.} 	 TCE2OH + OH = TCEOHO : 	7.18D-14 	;
+{4717.} 	 C2CL3OHOOH + OH = C2CL3OHAO2 : 	3.84D-12 	;
+{4718.} 	 C2CL3OHOOH = C2CL3OHAO + OH : 	J(41) 	;
+{4719.} 	 C2CL3OHAO = COCL2 + CHOCL + HO2 : 	KDEC 	;
+{4720.} 	 C2CL32OH + OH = CCL2OHCOCL + HO2 : 	2.85D-13 	;
+{4721.} 	 C2CL3HOOOH + OH = C2CL3OHBO2 : 	4.44D-12 	;
+{4722.} 	 C2CL3HOOOH = C2CL3OHBO + OH : 	J(41) 	;
+{4723.} 	 C2CL3OHBO = COCL2 + CHOCL + HO2 : 	KDEC 	;
+{4724.} 	 CCL2OHCOCL + OH = COCL2 + CO + CL : 	3.59D-14 	;
+{4725.} 	 CCL2OHCOCL = COCL2 + CO + CL + HO2 : 	J(15) 	;
+{4726.} 	 C2CL2OHOOH + OH = C2CL2OHO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4727.} 	 C2CL2OHOOH + OH = CCLOHCOCL + OH : 	6.54D-12 	;
+{4728.} 	 C2CL2OHOOH = C2CL2OHO + OH : 	J(41) 	;
+{4729.} 	 C2CL2OHO = CHOCL + CHOCL + HO2 : 	KDEC 	;
+{4730.} 	 C2CL2OH2 + OH = CCLOHCOCL + HO2 : 	2.77D-12 	;
+{4731.} 	 CCLOHCOCL + OH = CLGLYOX + HO2 : 	1.84D-12 	;
+{4732.} 	 CCLOHCOCL = CHOCL + CHOCL + HO2 : 	J(15) 	;
+{4733.} 	 DICLETO2H + OH = DICLETO2 : 	1.16D-11 	;
+{4734.} 	 DICLETO2H = DICLETO + OH : 	J(41) 	;
+{4735.} 	 DICLETO = CLETAL + CL : 	KDEC 	;
+{4736.} 	 CLETAL + NO3 = CLETO3 + HNO3 : 	KNO3AL 	;
+{4737.} 	 CLETAL + OH = CLETO3 : 	2.09D-11 	;
+{4738.} 	 CLETAL = CH2CLO2 + HO2 + CO : 	J(11) 	;
+{4739.} 	 DICLETOH + OH = DICLETO : 	3.75D-12 	;
+{4740.} 	 CH2OHCL2O2H + OH = CH2OHCL2O2 : 	4.91D-12 	;
+{4741.} 	 CH2OHCL2O2H = CH2OHCL2O + OH : 	J(41) 	;
+{4742.} 	 CH2OHCL2O = COCL2 + HCHO + HO2 : 	KDEC 	;
+{4743.} 	 CL2OHCH2OH + OH = CH2OHCL2O : 	1.46D-12 	;
+{4744.} 	 CL2OHCH2OH + OH = CL2OHCHO + HO2 : 	1.10D-12 	;
+{4745.} 	 CL2OHOOH + OH = CL2OHCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4746.} 	 CL2OHOOH + OH = CL2OHCHO + OH : 	6.55D-12 	;
+{4747.} 	 CL2OHOOH = CL2OHCH2O + OH : 	J(41) 	;
+{4748.} 	 CL2OHCH2O = HCHO + COCL2 + HO2 : 	KDEC 	;
+{4749.} 	 CL2OHCHO + NO3 = CL2OHCO3 + HNO3 : 	KNO3AL 	;
+{4750.} 	 CL2OHCHO + OH = CL2OHCO3 : 	6.18D-12 	;
+{4751.} 	 CL2OHCHO = COCL2 + HO2 + HO2 + CO : 	J(17) 	;
+{4752.} 	 CL12PRAOOH + OH = CL12PRAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4753.} 	 CL12PRAOOH + OH = CL12PRCHO + OH : 	6.87D-12 	;
+{4754.} 	 CL12PRAOOH = CL12PRAO + OH : 	J(41) 	;
+{4755.} 	 CL12PRAO = CL12PRCHO + HO2 : 	KROPRIM*O2 	;
+{4756.} 	 CL12PRAOH + OH = CL12PRCHO + HO2 : 	1.10D-12 	;
+{4757.} 	 CL12PRCHO + NO3 = CL12CO3 + HNO3 : 	KNO3AL*2.4 	;
+{4758.} 	 CL12PRCHO + OH = CL12CO3 : 	7.63D-12 	;
+{4759.} 	 CL12PRCHO = DICLETO2 + HO2 + CO : 	J(17) 	;
+{4760.} 	 CL12PRBOOH + OH = CL12PRBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4761.} 	 CL12PRBOOH = CL12PRBO + OH : 	J(41) 	;
+{4762.} 	 CL12PRBO = CH2CLCOCH3 + CL : 	KDEC 	;
+{4763.} 	 CL12PRBOH + OH = CL12PRBO : 	7.44D-13 	;
+{4764.} 	 CL12PRCOOH + OH = CH3CLCOCL + OH : 	6.08D-12 	;
+{4765.} 	 CL12PRCOOH + OH = CL12PRCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4766.} 	 CL12PRCOOH = CL12PRCO + OH : 	J(41) 	;
+{4767.} 	 CL12PRCO = CH3CLCOCL + HO2 : 	KROSEC*O2 	;
+{4768.} 	 CH3CLCOCL + OH = CLCOCLMEO2 : 	1.08D-12 	;
+{4769.} 	 CH3CLCOCL = CH3CHCLO2 + CO + CL : 	J(22) 	;
+{4770.} 	 CL12PRCOH + OH = CH3CLCOCL + HO2 : 	1.10D-12 	;
+{4771.} 	 CH3CCL2OOH + OH = CH3CCL2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4772.} 	 CH3CCL2OOH = CH3CCL2O + OH : 	J(41) 	;
+{4773.} 	 CH3CCL2O = CH3COCL + CL : 	KDEC 	;
+{4774.} 	 CH3CCL2OH + OH = CH3CCL2O : 	3.07D-13 	;
+{4775.} 	 CHCL2COOH + OH = CHCL2CH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4776.} 	 CHCL2COOH + OH = CHCL2CHO + OH : 	9.64D-12 	;
+{4777.} 	 CHCL2COOH = CHCL2CH2O + OH : 	J(41) 	;
+{4778.} 	 CHCL2CH2O = CHCL2CHO + HO2 : 	KROPRIM*O2 	;
+{4779.} 	 CHCL2CHO + NO3 = CHCL2CO3 + HNO3 : 	KNO3AL 	;
+{4780.} 	 CHCL2CHO + OH = CHCL2CO3 : 	3.09D-11 	;
+{4781.} 	 CHCL2CHO = CHCL2O2 + HO2 + CO : 	J(17) 	;
+{4782.} 	 CHCL2CHOH + OH = CHCL2CHO + HO2 : 	1.10D-12 	;
+{4783.} 	 CH2CLCOOH + OH = CH2CLCH2O2 : 	1.9D-12*EXP(190/TEMP) 	;
+{4784.} 	 CH2CLCOOH + OH = CLETAL + OH : 	1.37D-11 	;
+{4785.} 	 CH2CLCOOH = CH2CLCH2O + OH : 	J(41) 	;
+{4786.} 	 CH2CLCH2O = CLETAL + HO2 : 	KROPRIM*O2 	;
+{4787.} 	 CH2CLCH2OH + OH = CLETAL + HO2 : 	4.60D-12 	;
+{4788.} 	 CH3CHCLOOH + OH = CH3CHCLO2 : 	1.9D-12*EXP(190/TEMP) 	;
+{4789.} 	 CH3CHCLOOH + OH = CH3COCL + OH : 	9.95D-12 	;
+{4790.} 	 CH3CHCLOOH = CH3CHCLO + OH : 	J(41) 	;
+{4791.} 	 CH3CHCLO = CH3CHO + CL : 	KDEC 	;
+{4792.} 	 CH3CHCLOH + OH = CH3COCL + HO2 : 	2.77D-12 	;
+{4793.} 	 CH3COCL + OH = CLCOCH2O2 : 	3.88D-14 	;
+{4794.} 	 CH3COCL = CH3CO3 + CL : 	J(22) 	;
+{4795.} 	 CCL2CL2OOH + OH = CHCL2CL2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4796.} 	 CCL2CL2OOH = CHCL2CL2O + OH : 	J(41) 	;
+{4797.} 	 CHCL2CL2O = CHCL2COCL + CL : 	KDEC 	;
+{4798.} 	 CHCL2CL2OH + OH = CHCL2CL2O : 	4.85D-13 	;
+{4799.} 	 CH2CL3OOH + OH = CH2CL3O2 : 	4.03D-12 	;
+{4800.} 	 CH2CL3OOH = CH2CL3O + OH : 	J(41) 	;
+{4801.} 	 CH2CL3O = CH2CLCOCL + CL : 	KDEC 	;
+{4802.} 	 CH2CL3OH + OH = CH2CL3O : 	5.77D-13 	;
+{4803.} 	 CH2CLCOCL + OH = CLCOCLO2 : 	6.26D-14 	;
+{4804.} 	 CH2CLCOCL = CH2CLO2 + CO + CL : 	J(22) 	;
+{4805.} 	 CHCL3OOH + OH = CHCL2CHO + OH : 	1.16D-11 	;
+{4806.} 	 CHCL3OOH + OH = CHCL3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4807.} 	 CHCL3OOH = CHCL3O + OH : 	J(41) 	;
+{4808.} 	 CHCL3O = CHCL2CHO + CL : 	KDEC 	;
+{4809.} 	 CHCL3OH + OH = CHCL3O : 	3.66D-12 	;
+{4810.} 	 CCLNO3COOH + OH = CCLNO3O2 : 	7.22D-12 	;
+{4811.} 	 CCLNO3COOH = CCLNO3CO + OH : 	J(41) 	;
+{4812.} 	 CCLNO3CO = CCLCONO3 + HO2 : 	KROPRIM*O2 	;
+{4813.} 	 CCLNO3CO = HCHO +CHOCL + NO2 : 	7.00D-03 	;
+{4814.} 	 CCLCONO3 + OH = CO + CHOCL + NO2 : 	7.33D-12 	;
+{4815.} 	 CCLCONO3 = CHOCL + CO + HO2 + NO2 : 	J(56)+J(57) 	;
+{4816.} 	 CCLCONO3 = HO2 +CO +  CHOCL + NO2 : 	J(15) 	;
+{4817.} 	 CCLNO3COH + OH = CCLCONO3 + HO2 : 	1.88D-12 	;
+{4818.} 	 CNO3CLOOH + OH = CNO3CLO2 : 	5.20D-12 	;
+{4819.} 	 CNO3CLOOH = CNO3CLO + OH : 	J(41) 	;
+{4820.} 	 CNO3CLO = CNO3OCL + HO2 : 	KROSEC*O2 	;
+{4821.} 	 CNO3CLO = NO2 + HCHO + CHOCL : 	7.00D-03 	;
+{4822.} 	 CNO3CLOH + OH = CCLOHCHO + NO2 : 	1.03D-12 	;
+{4823.} 	 CNO3OCL + OH = CL1GLYOX + NO2 : 	3.91D-13 	;
+{4824.} 	 CNO3OCL = CHCLOHCO + NO2 : 	J(56) 	;
+{4825.} 	 CNO3OCL = HCHO + CO + CL + NO2 : 	J(57) 	;
+{4826.} 	 CNO3OCL = HCHO + NO2 + CO + CL : 	J(15) 	;
+{4827.} 	 CHCLOO + CO = CHOCL : 	1.2D-15 	;
+{4828.} 	 CHCLOO + NO = CHOCL + NO2 : 	1.0D-14 	;
+{4829.} 	 CHCLOO + NO2 = CHOCL + NO3 : 	1.0D-15 	;
+{4830.} 	 CHCLOO + SO2 = CHOCL + SO3 : 	7.0D-14 	;
+{4831.} 	 CHCLOO = CHOCL + H2O2 : 	6D-18*H2O 	;
+{4832.} 	 CHCLOO = CLCO2H : 	1D-17*H2O 	;
+{4833.} 	 CCLOHCOOH + OH = CCLOHCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4834.} 	 CCLOHCOOH + OH = CCLOHCHO + OH : 	6.05D-12 	;
+{4835.} 	 CCLOHCOOH = CHCLOHCO + OH : 	J(41) 	;
+{4836.} 	 CHCLOHCO = HCHO + CHOCL + HO2 : 	KDEC 	;
+{4837.} 	 CCLOHCHO + NO3 = CCLOHCO3 + HNO3 : 	KNO3AL 	;
+{4838.} 	 CCLOHCHO + OH = CCLOHCO3 : 	8.80D-12 	;
+{4839.} 	 CCLOHCHO = CHCLOHCO + OH : 	J(15) 	;
+{4840.} 	 CH2OHCCLOH + OH = CCLOHCHO + HO2 : 	4.63D-12 	;
+{4841.} 	 COHCCLOOH + OH = CH2OHCCLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{4842.} 	 COHCCLOOH + OH = CH2OHCOCL + OH : 	8.90D-12 	;
+{4843.} 	 COHCCLOOH = CH2OHCCLO + OH : 	J(41) 	;
+{4844.} 	 CH2OHCCLO = HCHO + CHOCL + HO2 : 	KDEC 	;
+{4845.} 	 CH2OHCOCL + OH = CL1GLYOX + HO2 : 	2.86D-12 	;
+{4846.} 	 CH2OHCOCL = HCHO + HO2 + CL + CO : 	J (15) 	;
+{4847.} 	 NBUTDAOOH = NBUTDAO + OH : 	J(41) 	;
+{4848.} 	 OH + NBUTDAOOH = NMVK + OH : 	4.87D-11 	;
+{4849.} 	 NBUTDAO = NMVK + HO2 : 	KROSEC*O2 	;
+{4850.} 	 OH + NBUTDAOH = HC3CCHO + NO2 : 	3.71D-11 	;
+{4851.} 	 NMVK = NO3CH2CO3 + HO2 + CO + HCHO : 	J(24) 	;
+{4852.} 	 OH + NMVK = HNMVKO2 : 	2.08D-11 	;
+{4853.} 	 NBUTDBOOH = NBUTDBO + OH : 	J(41) 	;
+{4854.} 	 OH + NBUTDBOOH = NC3CHO + OH : 	7.78D-11 	;
+{4855.} 	 NBUTDBNO3 = NBUTDBO + NO2 : 	J(53)*2.0 	;
+{4856.} 	 OH + NBUTDBNO3 = NC3CHO + NO2 : 	6.04D-11 	;
+{4857.} 	 NBUTDBO = NC3CHO + HO2 : 	KROPRIM*O2 	;
+{4858.} 	 BUTDANO3 = BUTDAO + NO2 : 	J(53) 	;
+{4859.} 	 OH + BUTDANO3 = HC3CHO + NO2 : 	6.39D-11 	;
+{4860.} 	 NC3CHO = CO + CO + HO2 + HO2 + NO3CH2CHO : 	J(15) 	;
+{4861.} 	 NO3 + NC3CHO = NC3CO3 + HNO3 : 	KNO3AL*2.0 	;
+{4862.} 	 O3 + NC3CHO = GLYOX + NAOOA : 	9.60D-18*0.5 	;
+{4863.} 	 O3 + NC3CHO = NO3CH2CHO + GLYOOA : 	9.60D-18*0.5 	;
+{4864.} 	 OH + NC3CHO = C42O2 : 	3.52D-11*0.43 	;
+{4865.} 	 OH + NC3CHO = NC3CO3 : 	3.52D-11*0.57 	;
+{4866.} 	 ACROO + CO = ACR : 	1.20D-15 	;
+{4867.} 	 ACROO + NO = ACR + NO2 : 	1.00D-14 	;
+{4868.} 	 ACROO + NO2 = ACR + NO3 : 	1.00D-15 	;
+{4869.} 	 ACROO + SO2 = ACR + SO3 : 	7.00D-14 	;
+{4870.} 	 ACROO = ACO2H : 	1.00D-17*H2O 	;
+{4871.} 	 ACROO = ACR + H2O2 : 	6.00D-18*H2O 	;
+{4872.} 	 BUTDAOOH = BUTDAO + OH : 	J(41) 	;
+{4873.} 	 OH + BUTDAOOH = HC3CHO + OH : 	8.14D-11 	;
+{4874.} 	 BUTDAO = HC3CHO + HO2 : 	8.40D+10*EXP(-3523/TEMP) 	;
+{4875.} 	 OH + BUTDAOH = HC3CHO + HO2 : 	7.10D-11 	;
+{4876.} 	 HC3CHO = HC3CO3 + HO2 : 	J(19) 	;
+{4877.} 	 HC3CHO = HOCH2CHO + HO2 + CO + HO2 + CO : 	J(18) 	;
+{4878.} 	 NO3 + HC3CHO = HC3CO3 + HNO3 : 	KNO3AL*2.4 	;
+{4879.} 	 O3 + HC3CHO = GLYOX + GAOOA : 	9.60D-18*0.5 	;
+{4880.} 	 O3 + HC3CHO = HOCH2CHO + GLYOOA : 	9.60D-18*0.5 	;
+{4881.} 	 OH + HC3CHO = C41O2 : 	3.87D-11*0.43 	;
+{4882.} 	 OH + HC3CHO = HC3CO3 : 	3.87D-11*0.57 	;
+{4883.} 	 BUTDBOOH = BUTDBO + OH : 	J(41) 	;
+{4884.} 	 OH + BUTDBOOH = MVKOH + OH : 	8.14D-11 	;
+{4885.} 	 OH + BUTDBNO3 = MVKOH + NO2 : 	3.59D-11 	;
+{4886.} 	 BUTDBO = ACR + HCHO + HO2 : 	KDEC 	;
+{4887.} 	 OH + BUTDBOH = MVKOH + HO2 : 	4.86D-11 	;
+{4888.} 	 MVKOH + O3 = HMGLOOA + HCHO : 	7.51D-16*EXP(-1521/TEMP)*0.5 	;
+{4889.} 	 MVKOH + O3 = HOCH2COCHO + CH2OOB : 	7.51D-16*EXP(-1521/TEMP)*0.5 	;
+{4890.} 	 MVKOH + OH = MVKOHAO2 : 	4.60D-12*EXP(452/TEMP)*0.3 	;
+{4891.} 	 MVKOH + OH = MVKOHBO2 : 	4.60D-12*EXP(452/TEMP)*0.7 	;
+{4892.} 	 MVKOH = ALLYLOH + CO : 	J(23) 	;
+{4893.} 	 MVKOH = HCHO + HO2 + HOCH2CO3 + CO : 	J(24) 	;
+{4894.} 	 BUTDCOOH = BUTDCO + OH : 	J(41) 	;
+{4895.} 	 OH + BUTDCOOH = HC3CCHO + OH : 	6.25D-11 	;
+{4896.} 	 BUTDCO = ACR + HCHO + HO2 : 	KDEC 	;
+{4897.} 	 HC3CCHO = ACR + CO + HO2 + HO2 : 	J(15) 	;
+{4898.} 	 NO3 + HC3CCHO = HC3CCO3 + HNO3 : 	KNO3AL*4.0 	;
+{4899.} 	 OH + HC3CCHO = HC3CCO3 : 	6.14D-11 	;
+{4900.} 	 NISOPOOH = NISOPO + OH : 	J(41) 	;
+{4901.} 	 OH + NISOPOOH = NC4CHO + OH : 	1.03D-10 	;
+{4902.} 	 NISOPNO3 = NISOPO + NO2 : 	J(53)*2.0 	;
+{4903.} 	 OH + NISOPNO3 = NC4CHO + NO2 : 	8.55D-11 	;
+{4904.} 	 NISOPO = NC4CHO + HO2 : 	KROPRIM*O2 	;
+{4905.} 	 ISOPCNO3 = ISOPCO + NO2 : 	J(53) 	;
+{4906.} 	 O3 + ISOPCNO3 = GAOOB + NOA : 	5.30D-17*0.5 	;
+{4907.} 	 O3 + ISOPCNO3 = HOCH2CHO + NC3OOA : 	5.30D-17*0.5 	;
+{4908.} 	 OH + ISOPCNO3 = INCO2 : 	6.93D-11 	;
+{4909.} 	 NC4CHO = NOA + CO + CO + HO2 + HO2 : 	J(18) 	;
+{4910.} 	 NO3 + NC4CHO = NC4CO3 + HNO3 : 	KNO3AL*4.25 	;
+{4911.} 	 O3 + NC4CHO = NOA + GLYOOC : 	2.40D-17*0.5 	;
+{4912.} 	 O3 + NC4CHO = NOAOOA + GLYOX : 	2.40D-17*0.5 	;
+{4913.} 	 OH + NC4CHO = C510O2 : 	4.16D-11*0.52 	;
+{4914.} 	 OH + NC4CHO = NC4CO3 : 	4.16D-11*0.48 	;
+{4915.} 	 MGLOOA = CH3CHO : 	KDEC*0.20 	;
+{4916.} 	 MGLOOA = CH3CO3 + HCHO + HO2 : 	KDEC*0.20 	;
+{4917.} 	 MGLOOA = MGLOO : 	KDEC*0.24 	;
+{4918.} 	 MGLOOA = OH + CO + CH3CO3 : 	KDEC*0.36 	;
+{4919.} 	 HMVKAO2 + HO2 = HMVKAOOH : 	KRO2HO2*0.625 	;
+{4920.} 	 HMVKAO2 + NO = HMVKANO3 : 	KRO2NO*0.017 	;
+{4921.} 	 HMVKAO2 + NO = HMVKAO + NO2 : 	KRO2NO*0.983 	;
+{4922.} 	 HMVKAO2 + NO3 = HMVKAO + NO2 : 	KRO2NO3 	;
+{4923.} 	 HMVKAO2 = CO2H3CHO : 	2.00D-12*0.2*RO2 	;
+{4924.} 	 HMVKAO2 = HMVKAO : 	2.00D-12*0.6*RO2 	;
+{4925.} 	 HMVKAO2 = HO12CO3C4 : 	2.00D-12*0.2*RO2 	;
+{4926.} 	 HMVKBO2 + HO2 = HMVKBOOH : 	KRO2HO2*0.625 	;
+{4927.} 	 HMVKBO2 + NO = HMVKBO + NO2 : 	KRO2NO 	;
+{4928.} 	 HMVKBO2 + NO3 = HMVKBO + NO2 : 	KRO2NO3 	;
+{4929.} 	 HMVKBO2 = BIACETOH : 	8.80D-13*0.2*RO2 	;
+{4930.} 	 HMVKBO2 = HMVKBO : 	8.80D-13*0.6*RO2 	;
+{4931.} 	 HMVKBO2 = HO12CO3C4 : 	8.80D-13*0.2*RO2 	;
+{4932.} 	 MACROO + CO = MACR : 	1.2D-15 	;
+{4933.} 	 MACROO + NO = MACR + NO2 : 	1.0D-14 	;
+{4934.} 	 MACROO + NO2 = MACR + NO3 : 	1.0D-15 	;
+{4935.} 	 MACROO + SO2 = MACR + SO3 : 	7.0D-14 	;
+{4936.} 	 MACROO = MACO2H : 	1.0D-17*H2O 	;
+{4937.} 	 MACROO = MACR + H2O2 : 	6.0D-18*H2O 	;
+{4938.} 	 MVKOO + CO = MVK : 	1.2D-15 	;
+{4939.} 	 MVKOO + NO = MVK + NO2 : 	1.0D-14 	;
+{4940.} 	 MVKOO + NO2 = MVK + NO3 : 	1.0D-15 	;
+{4941.} 	 MVKOO + SO2 = MVK + SO3 : 	7.0D-14 	;
+{4942.} 	 MVKOO = MVK + H2O2 : 	6.0D-18*H2O 	;
+{4943.} 	 MVKO2 + HO2 = MVKOOH : 	KRO2HO2*0.625 	;
+{4944.} 	 MVKO2 + NO = MVKO + NO2 : 	KRO2NO 	;
+{4945.} 	 MVKO2 + NO3 = MVKO + NO2 : 	KRO2NO3 	;
+{4946.} 	 MVKO2 = MVKO : 	2.00D-12*0.6*RO2 	;
+{4947.} 	 MVKO2 = MVKOH : 	2.00D-12*0.2*RO2 	;
+{4948.} 	 MVKO2 = VGLYOX : 	2.00D-12*0.2*RO2 	;
+{4949.} 	 ISOPAOOH = ISOPAO + OH : 	J(41) 	;
+{4950.} 	 OH + ISOPAOOH = HC4ACHO + OH : 	1.54D-10*0.05 	;
+{4951.} 	 OH + ISOPAOOH = IEPOXA + OH : 	1.54D-10*0.93 	;
+{4952.} 	 OH + ISOPAOOH = ISOPAO2 : 	1.54D-10*0.02 	;
+{4953.} 	 ISOPANO3 = ISOPAO + NO2 : 	J(53) 	;
+{4954.} 	 O3 + ISOPANO3 = ACETOL + NC2OOA : 	5.30D-17*0.5 	;
+{4955.} 	 O3 + ISOPANO3 = ACLOOA + NO3CH2CHO : 	5.30D-17*0.5 	;
+{4956.} 	 OH + ISOPANO3 = INAO2 : 	6.93D-11 	;
+{4957.} 	 ISOPAO = C524O2 : 	KDEC*0.25 	;
+{4958.} 	 ISOPAO = HC4CCHO + HO2 : 	KDEC*0.75 	;
+{4959.} 	 HC4ACHO = ACETOL + HO2 + HO2 + CO + CO : 	J(18) 	;
+{4960.} 	 HC4ACHO = HC4ACO3 + HO2 : 	J(19) 	;
+{4961.} 	 NO3 + HC4ACHO = HC4ACO3 + HNO3 : 	KNO3AL*4.25 	;
+{4962.} 	 O3 + HC4ACHO = ACETOL + GLYOOC : 	2.40D-17*0.5 	;
+{4963.} 	 O3 + HC4ACHO = ACLOOA + GLYOX : 	2.40D-17*0.5 	;
+{4964.} 	 OH + HC4ACHO = C58O2 : 	4.52D-11*0.52 	;
+{4965.} 	 OH + HC4ACHO = HC4ACO3 : 	4.52D-11*0.48 	;
+{4966.} 	 OH + ISOPAOH = HC4ACHO + HO2 : 	9.30D-11*0.5 	;
+{4967.} 	 OH + ISOPAOH = HC4CCHO + HO2 : 	9.30D-11*0.5 	;
+{4968.} 	 ISOPBOOH = ISOPBO + OH : 	J(41) 	;
+{4969.} 	 OH + ISOPBOOH = IEPOXB + OH : 	5.00D-11*0.92 	;
+{4970.} 	 OH + ISOPBOOH = ISOPBO2 : 	5.00D-11*0.08 	;
+{4971.} 	 ISOPBNO3 = ISOPBO + NO2 : 	J(55) 	;
+{4972.} 	 O3 + ISOPBNO3 = HCHO + MACRNOOA : 	1.06D-16*0.50 	;
+{4973.} 	 O3 + ISOPBNO3 = MACRNO3 + CH2OOB : 	1.06D-16*0.50 	;
+{4974.} 	 OH + ISOPBNO3 = INB1O2 : 	1.36D-11*0.72 	;
+{4975.} 	 OH + ISOPBNO3 = INB2O2 : 	1.36D-11*0.28 	;
+{4976.} 	 ISOPBO = MVK + HCHO + HO2 : 	KDEC 	;
+{4977.} 	 OH + ISOPBOH = ISOPBO : 	3.85D-11 	;
+{4978.} 	 ISOPCOOH = ISOPCO + OH : 	J(41) 	;
+{4979.} 	 OH + ISOPCOOH = HC4CCHO + OH : 	1.54D-10*0.05 	;
+{4980.} 	 OH + ISOPCOOH = IEPOXC + OH : 	1.54D-10*0.93 	;
+{4981.} 	 OH + ISOPCOOH = ISOPCO2 : 	1.54D-10*0.02 	;
+{4982.} 	 ISOPCO = HC4ACHO + HO2 : 	KDEC*0.75 	;
+{4983.} 	 ISOPCO = HC4CCHO + HO2 : 	KDEC*0.25 	;
+{4984.} 	 HC4CCHO = CH3CO3 + HO2 + CO + HOCH2CHO : 	J(18) 	;
+{4985.} 	 HC4CCHO = HC4CCO3 + HO2 : 	J(19) 	;
+{4986.} 	 NO3 + HC4CCHO = HC4CCO3 + HNO3 : 	KNO3AL*4.25 	;
+{4987.} 	 O3 + HC4CCHO = MGLYOOA + HOCH2CHO : 	2.40D-17*0.5 	;
+{4988.} 	 O3 + HC4CCHO = MGLYOX + GAOOB : 	2.40D-17*0.5 	;
+{4989.} 	 OH + HC4CCHO = C57O2 : 	4.52D-11*0.52 	;
+{4990.} 	 OH + HC4CCHO = HC4CCO3 : 	4.52D-11*0.48 	;
+{4991.} 	 ISOPDOOH = ISOPDO + OH : 	J(41) 	;
+{4992.} 	 OH + ISOPDOOH = HCOC5 + OH : 	1.15D-10*0.22 	;
+{4993.} 	 OH + ISOPDOOH = IEPOXB + OH : 	1.15D-10*0.75 	;
+{4994.} 	 OH + ISOPDOOH = ISOPDO2 : 	1.15D-10*0.03 	;
+{4995.} 	 ISOPDNO3 = ISOPDO + NO2 : 	J(54) 	;
+{4996.} 	 O3 + ISOPDNO3 = CH2OOC + MVKNO3 : 	1.06D-16*0.50 	;
+{4997.} 	 O3 + ISOPDNO3 = HCHO + NC4OOA : 	1.06D-16*0.50 	;
+{4998.} 	 OH + ISOPDNO3 = INDO2 : 	2.54D-11 	;
+{4999.} 	 ISOPDO = MACR + HCHO + HO2 : 	KDEC 	;
+{5000.} 	 HCOC5 = CH3CO3 + HCHO + HOCH2CO3 : 	J(24) 	;
+{5001.} 	 OH + HCOC5 = C59O2 : 	3.81D-11 	;
+{5002.} 	 OH + ISOPDOH = HCOC5 + HO2 : 	7.38D-11 	;
+{5003.} 	 CHOOCH2OOH + OH = CHOOCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5004.} 	 CHOOCH2OOH + OH = CHOOCHO + OH : 	1.63D-11 	;
+{5005.} 	 CHOOCH2OOH = CHOOCH2O + OH : 	J(41) 	;
+{5006.} 	 CHOOCH2NO3 + OH = CHOOCHO + NO2 : 	2.26D-13 	;
+{5007.} 	 CHOOCH2NO3 = CHOOCH2O + NO2 : 	J(53) 	;
+{5008.} 	 CHOOCH2O = CHOOCHO + HO2 : 	KROPRIM*O2 	;
+{5009.} 	 CHOOCH2O = HCOOH + HO2 + CO : 	2.00D+14*EXP(-6850/TEMP) 	;
+{5010.} 	 CHOOCH2OH + OH = CHOOCHO + HO2 : 	4.31D-12 	;
+{5011.} 	 CHOOCHO + OH = HO2 + CO : 	1.80D-13 	;
+{5012.} 	 METACETHO + OH = CH3CO3 : 	9.82D-11 	;
+{5013.} 	 METACETO2H + OH = METACETHO + OH : 	6.65D-11 	;
+{5014.} 	 METACETO2H + OH = METHACETO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5015.} 	 METACETO2H = METHACETO + OH : 	J(41) 	;
+{5016.} 	 METACETNO3 + OH = METACETHO + NO2 : 	2.26D-13 	;
+{5017.} 	 METACETNO3 = METHACETO + NO2 : 	J(53) 	;
+{5018.} 	 METHACETO = HCHO + CH3O2 : 	KDEC 	;
+{5019.} 	 METACETOH + OH = METACETHO + HO2 : 	1.74D-11 	;
+{5020.} 	 MOCOCH2OOH + OH = MOCOCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5021.} 	 MOCOCH2OOH + OH = MOXYCOCHO + OH : 	9.22D-12 	;
+{5022.} 	 MOCOCH2OOH = MOCOCH2O + OH : 	J(41) 	;
+{5023.} 	 MOCOCH2O = CH3O2 : 	KDEC 	;
+{5024.} 	 MOXCOCH2OH + OH = MOXYCOCHO + HO2 : 	2.52D-13 	;
+{5025.} 	 MOXYCOCHO + OH = CHOCOMOXO2 : 	2.16D-13 	;
+{5026.} 	 MOXYCOCHO = HO2 + CO + CH3O2 : 	J(34) 	;
+{5027.} 	 ACEC2H4OOH + OH = ACETC2H4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5028.} 	 ACEC2H4OOH + OH = ACETETCHO + OH : 	1.57D-11 	;
+{5029.} 	 ACEC2H4OOH = ACETC2H4O + OH : 	J(41) 	;
+{5030.} 	 ACEC2H4NO3 + OH = ACETETCHO + NO2 : 	5.72D-13 	;
+{5031.} 	 ACEC2H4NO3 = ACETC2H4O + NO2 : 	J(53) 	;
+{5032.} 	 ACETC2H4O = ACETETCHO + HO2 : 	KROPRIM*O2 	;
+{5033.} 	 ACETETCHO + NO3 = HNO3 + ACETMECO3 : 	KNO3AL*4.0 	;
+{5034.} 	 ACETETCHO + OH = ACETMECO3 : 	2.18D-11 	;
+{5035.} 	 ACETETCHO = HO2 + CO + METHACETO2 : 	J(15) 	;
+{5036.} 	 ETACETOH + OH = ACETETCHO + HO2 : 	5.34D-12 	;
+{5037.} 	 EOCOCH2OOH + OH = EOCOCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5038.} 	 EOCOCH2OOH + OH = EOCOCHO + OH : 	1.07D-11 	;
+{5039.} 	 EOCOCH2OOH = EOCOCH2O + OH : 	J(41) 	;
+{5040.} 	 EOCOCH2O = C2H5O2 : 	KDEC 	;
+{5041.} 	 EOCOCHO + NO3 = C2H5O2 + CO + HNO3 : 	KNO3AL*4.0 	;
+{5042.} 	 EOCOCHO + OH = C2H5O2 + CO : 	1.42D-11 	;
+{5043.} 	 EOCOCHO = C2H5O2 + CO + HO2 : 	J(34) 	;
+{5044.} 	 EOX2COMEOH + OH = HOACETETO2 : 	1.48D-12 	;
+{5045.} 	 ETHACETOOH + OH = ETHACETO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5046.} 	 ETHACETOOH + OH = METHCOACET + OH : 	3.59D-11 	;
+{5047.} 	 ETHACETOOH = ETHACETO + OH : 	J(41) 	;
+{5048.} 	 METHCOACET + OH = MECOACETO2 : 	1.00D-14 	;
+{5049.} 	 ETACETNO3 + OH = METHCOACET + NO2 : 	5.37D-13 	;
+{5050.} 	 ETACETNO3 = ETHACETO + NO2 : 	J(54) 	;
+{5051.} 	 ETHACETO = CH3CHO + CH3O2 : 	KDEC 	;
+{5052.} 	 ETHACETOH + OH = METHCOACET + HO2 : 	9.55D-12 	;
+{5053.} 	 NPRACAOOH + OH = ACEPROPONE + OH : 	3.75D-11 	;
+{5054.} 	 NPRACAOOH + OH = NPROACEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5055.} 	 NPRACAOOH = NPROACEAO + OH : 	J(41) 	;
+{5056.} 	 NPRACANO3 + OH = ACEPROPONE + NO2 : 	2.00D-12 	;
+{5057.} 	 NPRACANO3 = NPROACEAO + NO2 : 	J(54) 	;
+{5058.} 	 NPROACEAO = ACEPROPONE + HO2 : 	KROSEC*O2 	;
+{5059.} 	 NPROACEAO = METHACETO2 + CH3CHO : 	2.70D+14*EXP(-7398/TEMP) 	;
+{5060.} 	 ACEPROPONE + OH = ACPRONEO2 : 	1.06D-12 	;
+{5061.} 	 ACEPROPONE = METHACETO2 + CH3CO3 : 	J(22) 	;
+{5062.} 	 NPRACAOH + OH = ACEPROPONE + HO2 : 	9.87D-12 	;
+{5063.} 	 NPRACBOOH + OH = NPROACEBO2 : 	5.09D-11 	;
+{5064.} 	 NPRACBOOH = NPROACEBO + OH : 	J(41) 	;
+{5065.} 	 NPRACBNO3 + OH = ACETCOC2H5 + NO2 : 	3.03D-12 	;
+{5066.} 	 NPRACBNO3 = NPROACEBO + NO2 : 	J(54) 	;
+{5067.} 	 NPROACEBO = C2H5CHO + CH3O2 : 	KDEC 	;
+{5068.} 	 ACETCOC2H5 + OH = ACCOETO2 : 	1.86D-13 	;
+{5069.} 	 NPRACBOH + OH = ACETCOC2H5 + HO2 : 	1.33D-11 	;
+{5070.} 	 NPRACCOOH + OH = NPROACECO2 : 	2.07D-11 	;
+{5071.} 	 NPRACCOOH = NPROACECO + OH : 	J(41) 	;
+{5072.} 	 NPRACCNO3 + OH = ACEC2CHO + NO2 : 	2.14D-12 	;
+{5073.} 	 NPRACCNO3 = NPROACECO + NO2 : 	J(53) 	;
+{5074.} 	 NPROACECO = ACEC2CHO + HO2 : 	KROPRIM*O2 	;
+{5075.} 	 ACEC2CHO + NO3 = ACETC2CO3 + HNO3 : 	KNO3AL*5.5 	;
+{5076.} 	 ACEC2CHO + OH = ACETC2CO3 : 	2.72D-11 	;
+{5077.} 	 ACEC2CHO = ACETC2H4O2 + HO2 + CO : 	J(15) 	;
+{5078.} 	 NPRACCOH + OH = ACEC2CHO + HO2 : 	6.73D-12 	;
+{5079.} 	 IPRACBOOH + OH = IPRACBCHO + OH : 	1.78D-11 	;
+{5080.} 	 IPRACBOOH + OH = IPRACBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5081.} 	 IPRACBOOH = IPRACBO + OH : 	J(41) 	;
+{5082.} 	 IPRACBNO3 + OH = IPRACBCHO + NO2 : 	1.21D-12 	;
+{5083.} 	 IPRACBNO3 = IPRACBO + NO2 : 	J(53) 	;
+{5084.} 	 IPRACBO = IPRACBCHO + HO2 : 	KROPRIM*O2 	;
+{5085.} 	 IPRACBCHO + NO3 = IPRACBCO3 + HNO3 : 	KNO3AL*8.5 	;
+{5086.} 	 IPRACBCHO + OH = IPRACBCO3 : 	2.35D-11 	;
+{5087.} 	 IPRACBCHO = ETHACETO2 + HO2 + CO : 	J(17) 	;
+{5088.} 	 IPRACBOH + OH = IPRACBCHO + HO2 : 	7.44D-12 	;
+{5089.} 	 IPRACOOH + OH = IPROACETO2 : 	3.96D-12 	;
+{5090.} 	 IPRACOOH = IPROACETO + OH : 	J(41) 	;
+{5091.} 	 IPRACNO3 + OH = CH3COCH3 + HCHO + NO2 : 	8.64D-14 	;
+{5092.} 	 IPRACNO3 = IPROACETO + NO2 : 	J(55) 	;
+{5093.} 	 IPROACETO = CH3COCH3 + CH3O2 : 	KDEC 	;
+{5094.} 	 IPRACOH + OH = IPROACETO : 	4.07D-13 	;
+{5095.} 	 NBUACAOOH + OH = ACEBUTONE + OH : 	3.39D-11 	;
+{5096.} 	 NBUACAOOH + OH = NBUACETAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5097.} 	 NBUACAOOH = NBUACETAO + OH : 	J(41) 	;
+{5098.} 	 NBUACANO3 + OH = ACEBUTONE + NO2 : 	2.41D-12 	;
+{5099.} 	 NBUACANO3 = NBUACETAO + NO2 : 	J(54) 	;
+{5100.} 	 NBUACETAO = ACEBUTONE + HO2 : 	KROSEC*O2 	;
+{5101.} 	 NBUACETAO = ACETC2H4O2 + CH3CHO : 	2.70D+14*EXP(-7398/TEMP) 	;
+{5102.} 	 ACEBUTONE + OH = ACBUONEAO2 : 	2.55D-12 	;
+{5103.} 	 ACEBUTONE = ACETC2H4O2 + CH3CO3 : 	J(22) 	;
+{5104.} 	 NBUACAOH + OH = ACEBUTONE + HO2 : 	1.13D-11 	;
+{5105.} 	 NBUACBOOH + OH = ACEBUTBONE + OH : 	4.25D-11 	;
+{5106.} 	 NBUACBOOH + OH = NBUACETBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5107.} 	 NBUACBOOH = NBUACETBO + OH : 	J(41) 	;
+{5108.} 	 NBUACBNO3 + OH = ACEBUTBONE + NO2 : 	1.36D-12 	;
+{5109.} 	 NBUACBNO3 = NBUACETBO + NO2 : 	J(54) 	;
+{5110.} 	 NBUACETBO = ACEBUTBONE + HO2 : 	KROSEC*O2 	;
+{5111.} 	 NBUACETBO = METHACETO2 + C2H5CHO : 	2.70D+14*EXP(-7398/TEMP) 	;
+{5112.} 	 ACEBUTBONE + OH = ACBUONEBO2 : 	2.23D-12 	;
+{5113.} 	 ACEBUTBONE = METHACETO2 + C2H5CO3 : 	J(22) 	;
+{5114.} 	 NBUACBOH + OH = ACEBUTBONE + HO2 : 	1.33D-11 	;
+{5115.} 	 NBUACCOOH + OH = ACETCOC3H7 + OH : 	4.87D-11 	;
+{5116.} 	 NBUACCOOH + OH = NBUACETCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5117.} 	 NBUACCOOH = NBUACETCO + OH : 	J(41) 	;
+{5118.} 	 NBUACCNO3 + OH = ACETCOC3H7 + NO2 : 	2.23D-12 	;
+{5119.} 	 NBUACCNO3 = NBUACETCO + NO2 : 	J(54) 	;
+{5120.} 	 NBUACETCO = C3H7CHO + CH3O2 : 	KDEC 	;
+{5121.} 	 ACETCOC3H7 + OH = ACCOC3H6O2 : 	3.88D-12 	;
+{5122.} 	 NBUACCOH + OH = ACETCOC3H7 + HO2 : 	1.47D-11 	;
+{5123.} 	 SBUACAOOH + OH = SBUACETAO2 : 	5.04D-12 	;
+{5124.} 	 SBUACAOOH = SBUACETAO + OH : 	J(41) 	;
+{5125.} 	 SBUACANO3 + OH = METHCOACET + CH3CHO + NO2 : 	4.80D-13 	;
+{5126.} 	 SBUACANO3 = SBUACETAO + NO2 : 	J(55) 	;
+{5127.} 	 SBUACETAO = MEK + CH3O2 : 	KDEC 	;
+{5128.} 	 SBUACAOH + OH = SBUACETAO : 	1.49D-12 	;
+{5129.} 	 SBUACBOOH + OH = SBUACEONE + OH : 	3.46D-11 	;
+{5130.} 	 SBUACBOOH + OH = SBUACETBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5131.} 	 SBUACBOOH = SBUACETBO + OH : 	J(41) 	;
+{5132.} 	 SBUACBNO3 + OH = SBUACEONE + NO2 : 	4.00D-12 	;
+{5133.} 	 SBUACBNO3 = SBUACETBO + NO2 : 	J(54) 	;
+{5134.} 	 SBUACETBO = ETHACETO2 + CH3CHO : 	2.70D+14*EXP(-7197/TEMP) 	;
+{5135.} 	 SBUACETBO = SBUACEONE + HO2 : 	KROSEC*O2 	;
+{5136.} 	 SBUACBOH + OH = SBUACEONE + HO2 : 	1.20D-11 	;
+{5137.} 	 SBUACEONE + OH = SBUACONEO2 : 	2.83D-12 	;
+{5138.} 	 SBUACEONE = ETHACETO2 + CH3CO3 : 	J(22) 	;
+{5139.} 	 MCOOTBOOH + OH = MCOOTBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5140.} 	 MCOOTBOOH + OH = TBUACCO + OH : 	1.45D-11 	;
+{5141.} 	 MCOOTBOOH = MCOOTBO + OH : 	J(41) 	;
+{5142.} 	 MCOOTBNO3 + OH = TBUACCO + NO2 : 	5.66D-13 	;
+{5143.} 	 MCOOTBNO3 = MCOOTBO + NO2 : 	J(53) 	;
+{5144.} 	 MCOOTBO = IPROACETO2 + HCHO : 	KDEC 	;
+{5145.} 	 TBUACCO + NO3 = TBUACCO3 + HNO3 : 	KNO3AL*8.5 	;
+{5146.} 	 TBUACCO + OH = TBUACCO3 : 	2.24D-11 	;
+{5147.} 	 TBUACCO = HO2 + CO + IPROACETO2 : 	J(15) 	;
+{5148.} 	 TBUACOH + OH = TBUACCO + HO2 : 	4.08D-12 	;
+{5149.} 	 BOCOCH2OOH + OH = TBOCOCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5150.} 	 BOCOCH2OOH + OH = TBOCOCHO + OH : 	9.49D-12 	;
+{5151.} 	 BOCOCH2OOH = TBOCOCH2O + OH : 	J(41) 	;
+{5152.} 	 TBOCOCH2O = TC4H9O2 : 	KDEC 	;
+{5153.} 	 TBOCOCH2OH + OH = TBOCOCHO + HO2 : 	3.06D-12 	;
+{5154.} 	 TBOCOCHO + NO3 = TC4H9O2 + CO + HNO3 : 	KNO3AL*8.5 	;
+{5155.} 	 TBOCOCHO + OH = TC4H9O2 + CO : 	1.30D-11 	;
+{5156.} 	 TBOCOCHO = TC4H9O2 + CO + HO2 : 	J(34) 	;
+{5157.} 	 CH3OCH2OOH + OH = CH3OCHO + OH : 	7.10D-11 	;
+{5158.} 	 CH3OCH2OOH = CH3OCH2O + OH : 	J(41) 	;
+{5159.} 	 CH3OCH2NO3 + OH = CH3OCHO + NO2 : 	1.80D-12 	;
+{5160.} 	 CH3OCH2NO3 = CH3OCH2O + NO2 : 	J(53) 	;
+{5161.} 	 CH3OCH2O = CH3OCHO + HO2 : 	KROPRIM*O2 	;
+{5162.} 	 CH3OCH2OH + OH = CH3OCHO + HO2 : 	1.83D-11 	;
+{5163.} 	 DIETETOOH + OH = ETHACET + OH : 	1.54D-10 	;
+{5164.} 	 DIETETOOH = DIETETO + OH : 	J(41) 	;
+{5165.} 	 DIETETNO3 + OH = ETHACET + NO2 : 	7.74D-12 	;
+{5166.} 	 DIETETNO3 = DIETETO + NO2 : 	J(54) 	;
+{5167.} 	 DIETETO = ETHFORM + CH3O2 : 	KDEC 	;
+{5168.} 	 DIETETOH + OH = ETHACET + HO2 : 	6.35D-11 	;
+{5169.} 	 ETOC2OOH + OH = EOX2ETCHO + OH : 	3.48D-11 	;
+{5170.} 	 ETOC2OOH = ETOC2O + OH : 	J(41) 	;
+{5171.} 	 ETOC2NO3 + OH = EOX2ETCHO + NO2 : 	8.20D-12 	;
+{5172.} 	 ETOC2NO3 = ETOC2O + NO2 : 	J(53) 	;
+{5173.} 	 ETOC2O = ETOMEO2 + HCHO : 	KDEC 	;
+{5174.} 	 MTBEACHO + OH = MTBEACHOO2 : 	3.35D-12*EXP(-449/TEMP)*0.879 	;
+{5175.} 	 MTBEACHO + OH = TC4H9O2 : 	3.35D-12*EXP(-449/TEMP)*0.121 	;
+{5176.} 	 MTBEAOOH + OH = MTBEACHO + OH : 	6.71D-11 	;
+{5177.} 	 MTBEAOOH + OH = MTBEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5178.} 	 MTBEAOOH = MTBEAO + OH : 	J(41) 	;
+{5179.} 	 MTBEANO3 + OH = MTBEACHO + NO2 : 	1.48D-12 	;
+{5180.} 	 MTBEANO3 = MTBEAO + NO2 : 	J(53) 	;
+{5181.} 	 MTBEAO = MTBEACHO + HO2 : 	KROPRIM*O2 	;
+{5182.} 	 MTBEAOH + OH = MTBEACHO + HO2 : 	1.80D-11 	;
+{5183.} 	 MTBEBOOH + OH = MTBEBCHO + OH : 	1.54D-11 	;
+{5184.} 	 MTBEBOOH + OH = MTBEBO2 + OH : 	1.90D-12*EXP(190/TEMP) 	;
+{5185.} 	 MTBEBOOH = MTBEBO + OH : 	J(41) 	;
+{5186.} 	 MTBEBNO3 + OH = MTBEBCHO + NO2 : 	1.45D-12 	;
+{5187.} 	 MTBEBNO3 = MTBEBO + NO2 : 	J(53) 	;
+{5188.} 	 MTBEBO = MTBEBCHO + HO2 : 	KROPRIM*O2 	;
+{5189.} 	 MTBEBCHO + NO3 = MTBEBCO3 + HNO3 : 	KNO3AL*8.5 	;
+{5190.} 	 MTBEBCHO + OH = MTBEBCO3 : 	2.29D-11 	;
+{5191.} 	 MTBEBOH + OH = MTBEBCHO + HO2 : 	4.97D-12 	;
+{5192.} 	 DIIPRETOOH + OH = DIIPRETO2 : 	1.55D-11 	;
+{5193.} 	 DIIPRETOOH = DIIPRETO + OH : 	J(41) 	;
+{5194.} 	 DIIPRETNO3 + OH = IPROACET + HCHO + NO2 : 	1.17D-11 	;
+{5195.} 	 DIIPRETNO3 = DIIPRETO + NO2 : 	J(55) 	;
+{5196.} 	 DIIPRETO = IPROACET + CH3O2 : 	KDEC 	;
+{5197.} 	 DIIPRETOH + OH = DIIPRETO : 	1.19D-11 	;
+{5198.} 	 IPROMC2OOH + OH = IPROMCCHO + OH : 	4.43D-11 	;
+{5199.} 	 IPROMC2OOH = IPROMC2O + OH : 	J(41) 	;
+{5200.} 	 IPROMC2NO3 + OH = IPROMCCHO + NO2 : 	1.02D-11 	;
+{5201.} 	 IPROMC2NO3 = IPROMC2O + NO2 : 	J(53) 	;
+{5202.} 	 IPROMC2O = IPROC21O2 + HCHO : 	KDEC 	;
+{5203.} 	 IPROMC2OH + OH = IPROMCCHO + HO2 : 	2.98D-11 	;
+{5204.} 	 IPROMCCHO + NO3 = IPROMCCO3 + HNO3 : 	KNO3AL*8.5 	;
+{5205.} 	 IPROMCCHO + OH = IPROMCCO3 : 	3.91D-11 	;
+{5206.} 	 IPROMCCHO = IPROC21O2 + CO + HO2 : 	J(17) 	;
+{5207.} 	 ETBEAOOH + OH = ETBEACHO + OH : 	1.98D-11 	;
+{5208.} 	 ETBEAOOH + OH = ETBEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5209.} 	 ETBEAOOH = ETBEAO + OH : 	J(41) 	;
+{5210.} 	 ETBEANO3 + OH = ETBEACHO + NO2 : 	5.86D-12 	;
+{5211.} 	 ETBEANO3 = ETBEAO + NO2 : 	J(53) 	;
+{5212.} 	 ETBEAO = EIPEO2 + HCHO : 	2.70D+14*EXP(-8153/TEMP) 	;
+{5213.} 	 ETBEAO = ETBEACHO + HO2 : 	KROPRIM*O2 	;
+{5214.} 	 ETBEACHO + NO3 = ETBEACO3 + HNO3 : 	KNO3AL*8.5 	;
+{5215.} 	 ETBEACHO + OH = ETBEACO3 : 	2.74D-11 	;
+{5216.} 	 ETBEACHO = EIPEO2 + HO2 + CO : 	J(17) 	;
+{5217.} 	 ETBEAOH + OH = ETBEACHO + HO2 : 	9.38D-12 	;
+{5218.} 	 ETBEBOOH + OH = ETBEBO2 : 	1.90D-14*EXP(190/TEMP) 	;
+{5219.} 	 ETBEBOOH + OH = TBUACET + OH : 	7.40D-13 	;
+{5220.} 	 ETBEBOOH = ETBEBO + OH : 	J(41) 	;
+{5221.} 	 ETBEBNO3 + OH = TBUACET + NO2 : 	6.00D-13 	;
+{5222.} 	 ETBEBNO3 = ETBEBO + NO2 : 	J(54) 	;
+{5223.} 	 ETBEBO = MTBEACHO + CH3O2 : 	KDEC 	;
+{5224.} 	 ETBEBOH + OH = TBUACET + HO2 : 	3.88D-11 	;
+{5225.} 	 ETBECOOH + OH = ETBECCHO + OH : 	2.96D-11 	;
+{5226.} 	 ETBECOOH = ETBECO + OH : 	J(41) 	;
+{5227.} 	 ETBECNO3 + OH = ETBECCHO + NO2 : 	3.06D-12 	;
+{5228.} 	 ETBECNO3 = ETBECO + NO2 : 	J(53) 	;
+{5229.} 	 ETBECO = HCHO + MTBEAO2 : 	KDEC 	;
+{5230.} 	 ETBECCHO + NO3 = ETBECCO3 + HNO3 : 	KNO3AL*8.5 	;
+{5231.} 	 ETBECCHO + OH = ETBECCO3 : 	2.81D-11 	;
+{5232.} 	 ETBECCHO = MTBEAO2 + CO + HO2 : 	J(15) 	;
+{5233.} 	 ETBECOH + OH = ETBECCHO + HO2 : 	1.53D-11 	;
+{5234.} 	 MO2EOLAOOH + OH = MOXCOCH2OH + OH : 	1.96D-10 	;
+{5235.} 	 MO2EOLAOOH = MO2EOLAO + HO2 : 	J(41) 	;
+{5236.} 	 MO2EOLANO3 + OH = MOXCOCH2OH + NO2 : 	4.32D-12 	;
+{5237.} 	 MO2EOLAO = CH3OCHO + HCHO + HO2 : 	KDEC 	;
+{5238.} 	 MO2EOLA2OH + OH = MOXCOCH2OH + HO2 : 	5.36D-11 	;
+{5239.} 	 ETOHOCHO + OH = MOXY2CHO + HO2 : 	5.34D-12 	;
+{5240.} 	 MO2EOLBOOH + OH = ETOHOCHO + OH : 	7.68D-11 	;
+{5241.} 	 MO2EOLBOOH = MO2EOLBO + OH : 	J(41) 	;
+{5242.} 	 MO2EOLBNO3 + OH = MO2EOLBO + NO2 : 	1.12D-11 	;
+{5243.} 	 MO2EOLBNO3 = MO2EOLBO + NO2 : 	J(53) 	;
+{5244.} 	 MO2EOLBO = ETOHOCHO + HO2 : 	KDEC 	;
+{5245.} 	 MO2EOLB2OH + OH = ETOHOCHO + HO2 : 	2.77D-11 	;
+{5246.} 	 MEMOXYCO3 + HO2 = CH3OCH2O2 + OH : 	KAPHO2*0.44 	;
+{5247.} 	 MEMOXYCO3 + HO2 = MEMOXYCO2H + O3 : 	KAPHO2*0.15 	;
+{5248.} 	 MEMOXYCO3 + HO2 = MEMOXYCO3H : 	KAPHO2*0.41 	;
+{5249.} 	 MEMOXYCO3 + NO = CH3OCH2O2 + NO2 : 	KAPNO 	;
+{5250.} 	 MEMOXYCO3 + NO2 = MEMOXYPAN : 	KFPAN 	;
+{5251.} 	 MEMOXYCO3 + NO3 = CH3OCH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{5252.} 	 MEMOXYCO3 = CH3OCH2O2 : 	1.00D-11*0.7*RO2 	;
+{5253.} 	 MEMOXYCO3 = MEMOXYCO2H : 	1.00D-11*0.3*RO2 	;
+{5254.} 	 EOX2OLAOOH + OH = EOX2COMEOH + HO2 : 	2.00D-10 	;
+{5255.} 	 EOX2OLAOOH = EOX2EOLAO + OH : 	J(41) 	;
+{5256.} 	 EOX2EOLAO = ETHFORM + HCHO + HO2 : 	KDEC 	;
+{5257.} 	 EOX2OLANO3 + OH = EOX2COMEOH + NO2 : 	8.78D-12 	;
+{5258.} 	 EOX2OLANO3 = EOX2EOLAO + NO2 : 	J(54) 	;
+{5259.} 	 EOX2ETA2OH + OH = EOX2COMEOH + HO2 : 	5.80D-11 	;
+{5260.} 	 EOX2OLBOOH + OH = ETACETOH + OH : 	1.59D-10 	;
+{5261.} 	 EOX2OLBOOH = EOX2EOLBO + OH : 	J(41) 	;
+{5262.} 	 EOX2EOLBO = ETOHOCHO + CH3O2 : 	KDEC 	;
+{5263.} 	 EOX2OLBNO3 + OH = ETACETOH + NO2 : 	1.24D-11 	;
+{5264.} 	 EOX2OLBNO3 = EOX2EOLBO + NO2 : 	J(54) 	;
+{5265.} 	 EOX2ETB2OH + OH = ETACETOH + HO2 : 	4.85D-11 	;
+{5266.} 	 EOX2MECO3 + HO2 = ETOMECO2H + O3 : 	KAPHO2*0.15 	;
+{5267.} 	 EOX2MECO3 + HO2 = ETOMECO3H : 	KAPHO2*0.41 	;
+{5268.} 	 EOX2MECO3 + HO2 = ETOMEO2 + OH : 	KAPHO2*0.44 	;
+{5269.} 	 EOX2MECO3 + NO = ETOMEO2 + NO2 : 	KAPNO 	;
+{5270.} 	 EOX2MECO3 + NO2 = ETOMEPAN : 	KFPAN 	;
+{5271.} 	 EOX2MECO3 + NO3 = ETOMEO2 + NO2 : 	KRO2NO3*1.74 	;
+{5272.} 	 EOX2MECO3 = ETOMECO2H : 	1.00D-11*0.3*RO2 	;
+{5273.} 	 EOX2MECO3 = ETOMEO2 : 	1.00D-11*0.7*RO2 	;
+{5274.} 	 ETOMEO2 + HO2 = ETHFORM : 	KRO2HO2*0.520*0.4 	;
+{5275.} 	 ETOMEO2 + HO2 = ETOMEOOH : 	KRO2HO2*0.520*0.6 	;
+{5276.} 	 ETOMEO2 + NO = ETOMENO3 : 	KRO2NO*0.019 	;
+{5277.} 	 ETOMEO2 + NO = ETOMEO + NO2 : 	KRO2NO*0.981 	;
+{5278.} 	 ETOMEO2 + NO3 = ETOMEO + NO2 : 	KRO2NO3 	;
+{5279.} 	 ETOMEO2 = ETHFORM : 	2.00D-12*0.2*RO2 	;
+{5280.} 	 ETOMEO2 = ETOMEO : 	2.00D-12*0.6*RO2 	;
+{5281.} 	 ETOMEO2 = ETOMEOH : 	2.00D-12*0.2*RO2 	;
+{5282.} 	 ETOHCO2M + OH = MCOCOMOX + HO2 : 	8.86D-12 	;
+{5283.} 	 PR2OHMOOOH + OH = ETOHCO2M + HO2 : 	2.00D-10 	;
+{5284.} 	 PR2OHMOOOH = PR2OHMOXO + OH : 	J(41) 	;
+{5285.} 	 PR2OHMONO3 + OH = ETOHCO2M + NO2 : 	5.56D-12 	;
+{5286.} 	 PR2OHMOXO = CH3OCHO + CH3CHO + HO2 : 	KDEC 	;
+{5287.} 	 PROH2MOX + OH = ETOHCO2M + HO2 : 	5.82D-11 	;
+{5288.} 	 H2C3OCOOH + OH = PROL2FORM + OH : 	1.16D-10 	;
+{5289.} 	 H2C3OCOOH = H2C3OCO + OH : 	J(41) 	;
+{5290.} 	 PROL2FORM + OH = PRONFORM + HO2 : 	9.87D-12 	;
+{5291.} 	 H2C3OCNO3 + OH = PROL2FORM + NO2 : 	1.47D-11 	;
+{5292.} 	 H2C3OCNO3 = H2C3OCO + NO2 : 	J(53) 	;
+{5293.} 	 H2C3OCO = PROL2FORM + HO2 : 	KROPRIM*O2 	;
+{5294.} 	 H2C3OCOH + OH = PROL2FORM + HO2 : 	4.19D-11 	;
+{5295.} 	 PRONEMOXO2 + HO2 = MCOCOMOX : 	KRO2HO2*0.625*0.4 	;
+{5296.} 	 PRONEMOXO2 + HO2 = PRONEMOOOH : 	KRO2HO2*0.625*0.6 	;
+{5297.} 	 PRONEMOXO2 + NO = PRONEMOXO + NO2 : 	KRO2NO 	;
+{5298.} 	 PRONEMOXO2 + NO3 = PRONEMOXO + NO2 : 	KRO2NO3 	;
+{5299.} 	 PRONEMOXO2 = MCOCOMOX : 	8.80D-13*0.2*RO2 	;
+{5300.} 	 PRONEMOXO2 = PRONEMOXO : 	8.80D-13*0.6*RO2 	;
+{5301.} 	 PRONEMOXO2 = PRONEMOXOH : 	8.80D-13*0.2*RO2 	;
+{5302.} 	 BOX2OHAOOH + OH = PRCOOETOH + HO2 : 	2.04D-10 	;
+{5303.} 	 BOX2OHAOOH = BOX2EOHAO + OH : 	J(41) 	;
+{5304.} 	 PRCOOETOH + OH = PRCOOMCHO + HO2 : 	9.16D-12 	;
+{5305.} 	 BOX2EOHAO = ETOHOCHO + NC3H7O2 : 	KDEC 	;
+{5306.} 	 BOXEOHANO3 + OH = PRCOOETOH + NO2 : 	1.45D-11 	;
+{5307.} 	 BOXEOHANO3 = BOX2EOHAO + NO2 : 	J(54) 	;
+{5308.} 	 BOXOHETOH + OH = PRCOOETOH + HO2 : 	6.20D-11 	;
+{5309.} 	 BOX2COMOH + OH = BOXCOCHO + HO2 : 	4.31D-12 	;
+{5310.} 	 BOX2OHBOOH + OH = BOX2COMOH + OH : 	2.04D-10 	;
+{5311.} 	 BOX2OHBOOH = BOX2EOHBO + OH : 	J(41) 	;
+{5312.} 	 BOX2EOHBO = BOXCHO + HCHO + HO2 : 	KDEC 	;
+{5313.} 	 BOXEOHBNO3 + OH = BOX2COMOH + NO2 : 	1.27D-11 	;
+{5314.} 	 BOXEOHBNO3 = BOX2EOHBO + NO2 : 	J(54) 	;
+{5315.} 	 BOX2E2OH + OH = BOX2COMOH + HO2 : 	6.20D-11 	;
+{5316.} 	 BOXMCO3 + HO2 = BOX2MO2 + OH : 	KAPHO2*0.44 	;
+{5317.} 	 BOXMCO3 + HO2 = BOXMCO2H + O3 : 	KAPHO2*0.15 	;
+{5318.} 	 BOXMCO3 + HO2 = BOXMCO3H : 	KAPHO2*0.41 	;
+{5319.} 	 BOXMCO3 + NO = BOX2MO2 + NO2 : 	KAPNO 	;
+{5320.} 	 BOXMCO3 + NO2 = BOXMPAN : 	KFPAN 	;
+{5321.} 	 BOXMCO3 + NO3 = BOX2MO2 + NO2 : 	KRO2NO3*1.74 	;
+{5322.} 	 BOXMCO3 = BOX2MO2 : 	1.00D-11*0.7*RO2 	;
+{5323.} 	 BOXMCO3 = BOXMCO2H : 	1.00D-11*0.3*RO2 	;
+{5324.} 	 BOX2MO2 + HO2 = BOXMOOH : 	KRO2HO2*0.706 	;
+{5325.} 	 BOX2MO2 + NO = BOX2MO + NO2 : 	KRO2NO 	;
+{5326.} 	 BOX2MO2 + NO3 = BOX2MO + NO2 : 	KRO2NO3 	;
+{5327.} 	 BOX2MO2 = BOX2MO : 	2.00D-12*0.6*RO2 	;
+{5328.} 	 BOX2MO2 = BOXCHO : 	2.00D-12*0.2*RO2 	;
+{5329.} 	 BOX2MO2 = BOXMOH : 	2.00D-12*0.2*RO2 	;
+{5330.} 	 BOXPOLAOOH + OH = PRCOOPROL + OH : 	2.08D-10 	;
+{5331.} 	 BOXPOLAOOH = BOXPROLAO + OH : 	J(41) 	;
+{5332.} 	 PRCOOPROL + OH = PRCOOPRONE + HO2 : 	1.37D-11 	;
+{5333.} 	 BOXPOLANO3 + OH = PRCOOPROL + NO2 : 	1.90D-11 	;
+{5334.} 	 BOXPOLANO3 = BOXPROLAO + NO2 : 	J(54) 	;
+{5335.} 	 BOXPROLAO = PROL2FORM + NC3H7O2 : 	KDEC 	;
+{5336.} 	 BOXOHPROL + OH = PRCOOPROL + HO2 : 	6.65D-11 	;
+{5337.} 	 BOXCOEOL + OH = BOXCOEOLO2 : 	4.95D-12 	;
+{5338.} 	 BOXPOLBOOH + OH = BOXCOEOL + OH : 	2.08D-10 	;
+{5339.} 	 BOXPOLBOOH = BOXPROLBO + OH : 	J(41) 	;
+{5340.} 	 BOXPOLBNO3 + OH = BOXCOEOL + NO2 : 	1.39D-11 	;
+{5341.} 	 BOXPROLBO = BOXCHO + CH3CHO + HO2 : 	KDEC 	;
+{5342.} 	 BOXPR2OH + OH = BOXCOEOL + HO2 : 	6.65D-11 	;
+{5343.} 	 BOXPRONAO2 + HO2 = BOXPROOOH : 	KRO2HO2*0.820*0.6 	;
+{5344.} 	 BOXPRONAO2 + HO2 = PRCOOPRONE : 	KRO2HO2*0.820*0.4 	;
+{5345.} 	 BOXPRONAO2 + NO = BOXPROANO3 : 	KRO2NO*0.278 	;
+{5346.} 	 BOXPRONAO2 + NO = BOXPRONEAO + NO2 : 	KRO2NO*0.722 	;
+{5347.} 	 BOXPRONAO2 + NO3 = BOXPRONEAO + NO2 : 	KRO2NO3 	;
+{5348.} 	 BOXPRONAO2 = BOXPRONEAO : 	8.80D-13*0.6*RO2 	;
+{5349.} 	 BOXPRONAO2 = BOXPRONOH : 	8.80D-13*0.2*RO2 	;
+{5350.} 	 BOXPRONAO2 = PRCOOPRONE : 	8.80D-13*0.2*RO2 	;
+{5351.} 	 BOXPRONBO2 + HO2 = BOXCOCOME : 	KRO2HO2*0.820*0.4 	;
+{5352.} 	 BOXPRONBO2 + HO2 = BOXPROBOOH : 	KRO2HO2*0.820*0.6 	;
+{5353.} 	 BOXPRONBO2 + NO = BOXPRONBO + NO2 : 	KRO2NO 	;
+{5354.} 	 BOXPRONBO2 + NO3 = BOXPRONBO + NO2 : 	KRO2NO3 	;
+{5355.} 	 BOXPRONBO2 = BOXCOCOME : 	8.80D-13*0.2*RO2 	;
+{5356.} 	 BOXPRONBO2 = BOXPRONBO : 	8.80D-13*0.6*RO2 	;
+{5357.} 	 BOXPRONBO2 = BOXPRONBOH : 	8.80D-13*0.2*RO2 	;
+{5358.} 	 CH2BROOH + OH = CH2BRO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5359.} 	 CH2BROOH + OH = CHOBR + OH : 	5.79D-12 	;
+{5360.} 	 CH2BROOH = CH2BRO + OH : 	J(41) 	;
+{5361.} 	 CH2BRO = CHOBR + HO2 : 	KROPRIM*O2 	;
+{5362.} 	 CH2BROH + OH = CHOBR + HO2 : 	1.06D-12 	;
+{5363.} 	 CHOBR + NO3 = CO + BR + HNO3 : 	KNO3AL 	;
+{5364.} 	 CHOBR + OH = CO + BR : 	1.16D-12 	;
+{5365.} 	 CHOBR = HO2 + CO + BR : 	J(11) 	;
+{5366.} 	 DIBRETO2H + OH = DIBRETO2 : 	9.52D-12 	;
+{5367.} 	 DIBRETO2H = DIBRETO + OH : 	J(41) 	;
+{5368.} 	 DIBRETO = BRETAL + BR : 	KDEC 	;
+{5369.} 	 BRETAL + NO3 = BRETO3 + HNO3 : 	KNO3AL 	;
+{5370.} 	 BRETAL + OH = BRETO3 : 	2.05D-12 	;
+{5371.} 	 BRETAL = CH2BRO2 + HO2 + CO : 	J(11) 	;
+{5372.} 	 DIBRETOH + OH = DIBRETO : 	2.80D-12 	;
+{5373.} 	 CH3COCH2O = CH3CO3 + HCHO : 	KDEC 	;
+{5374.} 	 HYPERACET + OH = CH3COCH2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5375.} 	 HYPERACET + OH = MGLYOX + OH : 	8.39D-12 	;
+{5376.} 	 HYPERACET = CH3CO3 + HCHO + OH : 	J(22) 	;
+{5377.} 	 HYPERACET = CH3COCH2O + OH : 	J(41) 	;
+{5378.} 	 MEKAOOH + OH = CO2C3CHO + OH : 	4.88D-11 	;
+{5379.} 	 MEKAOOH + OH = MEKAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5380.} 	 MEKAOOH = MEKAO + OH : 	J(41)+J(22) 	;
+{5381.} 	 MEKANO3 + OH = CO2C3CHO + NO2 : 	9.64D-13 	;
+{5382.} 	 MEKANO3 = MEKAO + NO2 : 	J(53)+J(22) 	;
+{5383.} 	 MEKAO = CO2C3CHO + HO2 : 	KROPRIM*O2 	;
+{5384.} 	 MEKAO = HO1CO3C4O2 : 	1.30D+11*EXP(-4127/TEMP) 	;
+{5385.} 	 MEKBOOH + OH = BIACET + OH : 	1.88D-11 	;
+{5386.} 	 MEKBOOH + OH = MEKBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5387.} 	 MEKBOOH = CH3CO3 + CH3CHO + OH : 	J(22) 	;
+{5388.} 	 MEKBOOH = MEKBO + OH : 	J(41) 	;
+{5389.} 	 MEKBO = CH3CHO + CH3CO3 : 	KDEC 	;
+{5390.} 	 BIACET = CH3CO3 + CH3CO3 : 	J(35) 	;
+{5391.} 	 OH + BIACET = BIACETO2 : 	1.40D-18*TEMP**2*EXP(194/TEMP) 	;
+{5392.} 	 MEKCOOH + OH = EGLYOX + OH : 	9.55D-12 	;
+{5393.} 	 MEKCOOH + OH = MEKCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5394.} 	 MEKCOOH = C2H5CO3 + HCHO + OH : 	J(22) 	;
+{5395.} 	 MEKCOOH = MEKCO + OH : 	J(41) 	;
+{5396.} 	 MEKCO = C2H5CO3 + HCHO : 	KDEC 	;
+{5397.} 	 EGLYOX = C2H5CO3 + CO + HO2 : 	J(34) 	;
+{5398.} 	 NO3 + EGLYOX = C2H5CO3 + CO + HNO3 : 	KNO3AL*4.0 	;
+{5399.} 	 OH + EGLYOX = C2H5CO3 + CO : 	1.39D-11 	;
+{5400.} 	 MPRKBOOH + OH = CO24C5 + OH : 	1.06D-10 	;
+{5401.} 	 MPRKBOOH + OH = CO2C54O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5402.} 	 MPRKBOOH = CO2C54O + OH : 	J(41) 	;
+{5403.} 	 MPRKBOOH = IC3H7O2 + CH3CO3 : 	J(22) 	;
+{5404.} 	 CO2C54O = HO2CO4C5O2 : 	1.30D+11*EXP(-4127/TEMP) 	;
+{5405.} 	 MPRKNO3 + OH = CO24C5 + NO2 : 	1.79D-12 	;
+{5406.} 	 MPRKNO3 = CO2C54O + NO2 : 	J(54)+J(22) 	;
+{5407.} 	 CO24C5 + OH = CO24C53O2 : 	7.02D-13 	;
+{5408.} 	 CO24C5 = CH3COCH2O2 + CH3CO3 : 	J(22) 	;
+{5409.} 	 HO2CO4C5 + OH = CO24C5 + HO2 : 	2.99D-11 	;
+{5410.} 	 HO2CO4C5 = IPROPOLO2 + CH3CO3 : 	J(22) 	;
+{5411.} 	 MPRKAOOH + OH = CO23C5 + OH : 	1.06D-10 	;
+{5412.} 	 MPRKAOOH + OH = MPRKAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5413.} 	 MPRKAOOH = C2H5CHO + CH3CO3 + OH : 	J(22) 	;
+{5414.} 	 MPRKAOOH = MPRKAO + OH : 	J(41) 	;
+{5415.} 	 MPRKAO = C2H5CHO + CH3CO3 : 	KDEC 	;
+{5416.} 	 CO23C5 + OH = CO23C54O2 : 	1.38D-12 	;
+{5417.} 	 CO23C5 = CH3CO3 + C2H5CO3 : 	J(35) 	;
+{5418.} 	 DIEKAOOH + OH = CO23C5 + OH : 	2.00D-11 	;
+{5419.} 	 DIEKAOOH + OH = DIEKAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5420.} 	 DIEKAOOH = CH3CHO + C2H5CO3 + OH : 	J(22) 	;
+{5421.} 	 DIEKAOOH = DIEKAO + OH : 	J(41) 	;
+{5422.} 	 DIEKAO = CH3CHO + C2H5CO3 : 	KDEC 	;
+{5423.} 	 DIEKBOOH + OH = CO3C4CHO + OH : 	5.36D-11 	;
+{5424.} 	 DIEKBOOH + OH = DIEKBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5425.} 	 DIEKBOOH = DIEKBO + OH : 	J(41)+J(22) 	;
+{5426.} 	 DIEKBNO3 + OH = CO3C4CHO + NO2 : 	2.13D-12 	;
+{5427.} 	 DIEKBNO3 = DIEKBO + NO2 : 	J(22)+J(53) 	;
+{5428.} 	 DIEKBO = HOCO3C54O2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{5429.} 	 HO1CO3C5 + OH = CO3C4CHO + HO2 : 	1.46D-11 	;
+{5430.} 	 HO1CO3C5 = C2H5CO3 + HOCH2CH2O2 : 	J(22) 	;
+{5431.} 	 MIPKAOOH = MIPKAO + OH : 	J(41)+J(22) 	;
+{5432.} 	 OH + MIPKAOOH = MIPKAO2 : 	4.98D-12 	;
+{5433.} 	 MIPKAO = CH3COCH3 + CH3CO3 : 	KDEC 	;
+{5434.} 	 MIPKBOOH = MIPKBO + OH : 	J(41)+J(22) 	;
+{5435.} 	 OH + MIPKBOOH = CO2C43CHO + OH : 	5.41D-11 	;
+{5436.} 	 MIPKBNO3 = MIPKBO + NO2 : 	J(53)+J(22) 	;
+{5437.} 	 OH + MIPKBNO3 = CO2C43CHO + NO2 : 	1.71D-12 	;
+{5438.} 	 MIPKBO = C53O2 : 	1.30D+11*EXP(-4127/TEMP) 	;
+{5439.} 	 MIPKBO = CO2C43CHO + HO2 : 	KROPRIM*O2 	;
+{5440.} 	 CO2C43CHO = MEKBO2 + HO2 + CO : 	J(17) 	;
+{5441.} 	 NO3 + CO2C43CHO = C41CO3 + HNO3 : 	KNO3AL*8.5 	;
+{5442.} 	 OH + CO2C43CHO = C41CO3 : 	2.26D-11 	;
+{5443.} 	 HEX2ONAOOH + OH = CO24C6 + OH : 	1.37D-10 	;
+{5444.} 	 HEX2ONAOOH + OH = HEX2ONAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5445.} 	 HEX2ONAOOH = HEX2ONAO + OH : 	J(22)+J(41) 	;
+{5446.} 	 HEX2ONANO3 + OH = CO24C6 + NO2 : 	2.61D-12 	;
+{5447.} 	 HEX2ONANO3 = HEX2ONAO + NO2 : 	J(22)+J(54) 	;
+{5448.} 	 HEX2ONAO = CO2HOC61O2 : 	1.30D+11*EXP(-4127/TEMP) 	;
+{5449.} 	 CO24C6 + OH = CO24C6O2 : 	1.86D-12 	;
+{5450.} 	 CO24C6 = CH3CO3 + MEKCO2 : 	J(22) 	;
+{5451.} 	 CO24C6 = CH3COCH2O2 + C2H5CO3 : 	J(22) 	;
+{5452.} 	 CO2HO4C6 + OH = CO24C6 + HO2 : 	3.75D-11 	;
+{5453.} 	 CO2HO4C6 = CH3CO3 + HO3C4O2 : 	J(22) 	;
+{5454.} 	 HEX2ONBOOH + OH = CO25C6 + OH : 	3.66D-11 	;
+{5455.} 	 HEX2ONBOOH + OH = HEX2ONBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5456.} 	 HEX2ONBOOH = HEX2ONBO + OH : 	J(22)+J(41) 	;
+{5457.} 	 HEX2ONBNO3 + OH = CO25C6 + NO2 : 	2.51D-12 	;
+{5458.} 	 HEX2ONBNO3 = HEX2ONBO + NO2 : 	J(22)+J(54) 	;
+{5459.} 	 HEX2ONBO = CH3CHO + MEKAO2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{5460.} 	 HEX2ONBO = CO25C6 + HO2 : 	KROSEC*O2 	;
+{5461.} 	 CO25C6 = CH3CO3 + MEKAO2 : 	J(22)*2 	;
+{5462.} 	 OH + CO25C6 = CO25C6O2 : 	5.67D-12 	;
+{5463.} 	 HO2CO5C6 = CH3CO3 + HO2C4O2 : 	J(22) 	;
+{5464.} 	 OH + HO2CO5C6 = C61O2 : 	1.39D-11*0.349 	;
+{5465.} 	 OH + HO2CO5C6 = CO25C6 + HO2 : 	1.39D-11*0.651 	;
+{5466.} 	 HEX2ONCOOH + OH = CO23C6 + OH : 	2.94D-11 	;
+{5467.} 	 HEX2ONCOOH + OH = HEX2ONCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5468.} 	 HEX2ONCOOH = CH3CO3 + C3H7CHO + OH : 	J(22) 	;
+{5469.} 	 HEX2ONCOOH = HEX2ONCO + OH : 	J(41) 	;
+{5470.} 	 HEX2ONCO = C3H7CHO + CH3CO3 : 	KDEC 	;
+{5471.} 	 CO23C6 + OH = CO23C65O2 : 	4.81D-12 	;
+{5472.} 	 CO23C6 = CH3CO3 + C3H7CO3 : 	J(35) 	;
+{5473.} 	 HEX3ONAOOH + OH = CO24C6 + OH : 	1.07D-10 	;
+{5474.} 	 HEX3ONAOOH + OH = HEX3ONAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5475.} 	 HEX3ONAOOH = HEX3ONAO + OH : 	J(41) 	;
+{5476.} 	 HEX3ONAOOH = IC3H7O2 + C2H5CO3 : 	J(22) 	;
+{5477.} 	 HEX3ONANO3 + OH = CO24C6 + NO2 : 	2.96D-12 	;
+{5478.} 	 HEX3ONANO3 = HEX3ONAO + NO2 : 	J(53)+J(22) 	;
+{5479.} 	 HEX3ONAO = C6CO3OH5O2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{5480.} 	 HEX3ONAOH + OH = CO24C6 + HO2 : 	2.97D-11 	;
+{5481.} 	 HEX3ONAOH = IPROPOLO2 + C2H5CO3 : 	J(22) 	;
+{5482.} 	 HEX3ONBOOH + OH = C6CO34 + OH : 	2.84D-11 	;
+{5483.} 	 HEX3ONBOOH + OH = HEX3ONBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5484.} 	 HEX3ONBOOH = C2H5CHO + C2H5CO3 + OH : 	J(22) 	;
+{5485.} 	 HEX3ONBOOH = HEX3ONBO + OH : 	J(41) 	;
+{5486.} 	 HEX3ONBO = C2H5CHO + C2H5CO3 : 	KDEC 	;
+{5487.} 	 C6CO34 + OH = C6CO34O2 : 	2.54D-12 	;
+{5488.} 	 C6CO34 = C2H5CO3 + C2H5CO3 : 	J(35) 	;
+{5489.} 	 C6CO3HO4 + OH = C6CO34 + HO2 : 	1.13D-11 	;
+{5490.} 	 C6CO3HO4 = C2H5CO3 + C2H5CHO + HO2 : 	J(22) 	;
+{5491.} 	 HEX3ONCOOH + OH = CO23C6 + OH : 	2.34D-11 	;
+{5492.} 	 HEX3ONCOOH + OH = HEX3ONCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5493.} 	 HEX3ONCOOH = CH3CHO + C3H7CO3 + OH : 	J(22) 	;
+{5494.} 	 HEX3ONCOOH = HEX3ONCO + OH : 	J(41) 	;
+{5495.} 	 HEX3ONCO = CH3CHO + C3H7CO3 : 	KDEC 	;
+{5496.} 	 HEX3ONDOOH + OH = C3COCCHO + OH : 	5.34D-11 	;
+{5497.} 	 HEX3ONDOOH + OH = HEX3ONDO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5498.} 	 HEX3ONDOOH = HEX3ONDO + OH : 	J(41)+J(22) 	;
+{5499.} 	 HEX3ONDNO3 + OH = C3COCCHO + NO2 : 	3.40D-12 	;
+{5500.} 	 HEX3ONDNO3 = HEX3ONDO + NO2 : 	J(53)+J(22) 	;
+{5501.} 	 HEX3ONDO = C6HO1CO3O2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{5502.} 	 C3COCCHO + NO3 = C3COCCO3 + HNO3 : 	KNO3AL*5.5 	;
+{5503.} 	 C3COCCHO + OH = C3COCCO3 : 	7.61D-11 	;
+{5504.} 	 C3COCCHO = C3H7CO3 + HCOCH2O2 : 	J(22) 	;
+{5505.} 	 C3COCCHO = PEN2ONE1O2 + CO + HO2 : 	J(15) 	;
+{5506.} 	 HEX3ONDOH + OH = C3COCCHO + HO2 : 	1.81D-11 	;
+{5507.} 	 HEX3ONDOH = HOC2H4CO3 + NC3H7O2 : 	J(22) 	;
+{5508.} 	 MIBKAOOH + OH = MIBKAO2 : 	4.89D-12 	;
+{5509.} 	 MIBKAOOH = MIBKAO + OH : 	J(41)+J(22) 	;
+{5510.} 	 MIBKANO3 + OH = MGLYOX + CH3COCH3 + NO2 : 	3.86D-13 	;
+{5511.} 	 MIBKANO3 = MIBKAO + NO2 : 	J(55)+J(22) 	;
+{5512.} 	 MIBKAO = CH3COCH3 + CH3COCH2O2 : 	2.70D+14*EXP(-6543/TEMP) 	;
+{5513.} 	 MIBKAO = MIBKHO4O2 : 	1.30D+11*EXP(-4127/TEMP) 	;
+{5514.} 	 MIBKBOOH + OH = MIBK3CO + OH : 	3.18D-11 	;
+{5515.} 	 MIBKBOOH + OH = MIBKBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5516.} 	 MIBKBOOH = IPRCHO + CH3CO3 + OH : 	J(22) 	;
+{5517.} 	 MIBKBOOH = MIBKBO + OH : 	J(41) 	;
+{5518.} 	 MIBKBO = CH3CO3 + IPRCHO : 	KDEC 	;
+{5519.} 	 MIBK3CO + OH = MIBK3COO2 : 	2.77D-12 	;
+{5520.} 	 MIBK3CO = IPRCO3 + CH3CO3 : 	J(35) 	;
+{5521.} 	 MIBKBOH + OH = MIBK3CO + HO2 : 	1.45D-11 	;
+{5522.} 	 MIBKBOH = IPRCHO + CH3CO3 + HO2 : 	J(22) 	;
+{5523.} 	 MTBKOOH = MTBKO + OH : 	J(41)+J(22) 	;
+{5524.} 	 OH + MTBKOOH = CO2M33CHO + OH : 	5.29D-11 	;
+{5525.} 	 MTBKNO3 = MTBKO + NO2 : 	J(53)+J(22) 	;
+{5526.} 	 OH + MTBKNO3 = CO2M33CHO + NO2 : 	1.57D-12 	;
+{5527.} 	 MTBKO = C612O2 : 	1.30D+11*EXP(-4127/TEMP) 	;
+{5528.} 	 MTBKO = CO2M33CHO + HO2 : 	KROPRIM*O2 	;
+{5529.} 	 CO2M33CHO = MIPKBO2 + HO2 + CO : 	J(17) 	;
+{5530.} 	 NO3 + CO2M33CHO = CO2M33CO3 + HNO3 : 	KNO3AL*8.5 	;
+{5531.} 	 OH + CO2M33CHO = CO2M33CO3 : 	7.22D-11 	;
+{5532.} 	 MTBKOH = MTBKO + HO2 : 	J(22) 	;
+{5533.} 	 OH + MTBKOH = CO2M33CHO + HO2 : 	1.39D-11 	;
+{5534.} 	 CYHXONAOOH + OH = CYC613DION + OH : 	1.43D-10 	;
+{5535.} 	 CYHXONAOOH = CYHXONAO + OH : 	J(41)+J(22) 	;
+{5536.} 	 CYHXONANO3 + OH = CYC613DION + NO2 : 	6.28D-12 	;
+{5537.} 	 CYHXONANO3 = CYHXONAO + NO2 : 	J(54) 	;
+{5538.} 	 CYHXONAO = C6COCHOO2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{5539.} 	 CYHXONAO = CYC613DION + HO2 : 	KROSEC*O2 	;
+{5540.} 	 CYC613DION + OH = CY6DIONO2 : 	1.83D-11 	;
+{5541.} 	 CYC613DION = ACR + CO + C2H4 : 	J(22)*2 	;
+{5542.} 	 CYHXONAOH + OH = CYC613DION + HO2 : 	4.31D-11 	;
+{5543.} 	 CYHXONAOH = C3H6 + VINOH + OH : 	J(22) 	;
+{5544.} 	 NAPINAOOH + OH = NAPINAO2 : 	6.87D-12 	;
+{5545.} 	 NAPINAOOH = NAPINAO + OH : 	J(41) 	;
+{5546.} 	 NAPINAO = PINAL + NO2 : 	KDEC 	;
+{5547.} 	 APINBNO3 + OH = APINBCO + NO2 : 	3.64D-12 	;
+{5548.} 	 NAPINBOOH + OH = NAPINBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5549.} 	 NAPINBOOH + OH = NC101CO + OH : 	1.23D-11 	;
+{5550.} 	 NAPINBOOH = NAPINBO + OH : 	J(41) 	;
+{5551.} 	 NAPINBO = NC101CO + HO2 : 	KROSEC*O2 	;
+{5552.} 	 NAPINBO = PINAL + NO2 : 	4.00D+05 	;
+{5553.} 	 APINANO3 + OH = PINAL + NO2 : 	5.50D-12 	;
+{5554.} 	 NC101CO + OH = NC101O2 : 	5.55D-12 	;
+{5555.} 	 NC101CO = C96CO3 + NO2 : 	J(55) 	;
+{5556.} 	 C107O2 + HO2 = C107OOH : 	KRO2HO2*0.914 	;
+{5557.} 	 C107O2 + NO = C107O + NO2 : 	KRO2NO 	;
+{5558.} 	 C107O2 + NO3 = C107O + NO2 : 	KRO2NO3 	;
+{5559.} 	 C107O2 = C107O : 	9.20D-14*0.7*RO2 	;
+{5560.} 	 C107O2 = C107OH : 	9.20D-14*0.3*RO2 	;
+{5561.} 	 C109O2 + HO2 = C109OOH : 	KRO2HO2*0.914 	;
+{5562.} 	 C109O2 + NO = C109O + NO2 : 	KRO2NO 	;
+{5563.} 	 C109O2 + NO3 = C109O + NO2 : 	KRO2NO3 	;
+{5564.} 	 C109O2 = C109CO : 	2.00D-12*RO2*0.05 	;
+{5565.} 	 C109O2 = C109O : 	2.00D-12*RO2*0.90 	;
+{5566.} 	 C109O2 = C109OH : 	2.00D-12*RO2*0.05 	;
+{5567.} 	 APINBOO + CO = PINAL : 	1.20D-15 	;
+{5568.} 	 APINBOO + NO = PINAL + NO2 : 	1.00D-14 	;
+{5569.} 	 APINBOO + NO2 = PINAL + NO3 : 	1.00D-15 	;
+{5570.} 	 APINBOO + SO2 = PINAL + SO3 : 	7.00D-14 	;
+{5571.} 	 APINBOO = PINAL + H2O2 : 	1.40D-17*H2O 	;
+{5572.} 	 APINBOO = PINONIC : 	2.00D-18*H2O 	;
+{5573.} 	 C96O2 + HO2 = C96OOH : 	KRO2HO2*0.890 	;
+{5574.} 	 C96O2 + NO = C96NO3 : 	KRO2NO*0.157 	;
+{5575.} 	 C96O2 + NO = C96O + NO2 : 	KRO2NO*0.843 	;
+{5576.} 	 C96O2 + NO3 = C96O + NO2 : 	KRO2NO3 	;
+{5577.} 	 C96O2 = C96O : 	1.30D-12*0.6*RO2 	;
+{5578.} 	 C96O2 = C96OH : 	1.30D-12*0.2*RO2 	;
+{5579.} 	 C96O2 = NORPINAL : 	1.30D-12*0.2*RO2 	;
+{5580.} 	 APINAOOH + OH = APINAO2 : 	1.83D-11 	;
+{5581.} 	 APINAOOH = APINAO + OH : 	J(41) 	;
+{5582.} 	 APINAO = PINAL + HO2 : 	KDEC 	;
+{5583.} 	 APINBOH + OH = APINBCO + HO2 : 	1.49D-11 	;
+{5584.} 	 APINBOOH + OH = APINBCO + OH : 	3.28D-11 	;
+{5585.} 	 APINBOOH = APINBO + OH : 	J(41) 	;
+{5586.} 	 APINBO = PINAL + HO2 : 	KDEC 	;
+{5587.} 	 APINBCO + OH = C96CO3 : 	8.18D-12 	;
+{5588.} 	 APINCOOH + OH = APINCO2 : 	1.03D-10 	;
+{5589.} 	 APINCOOH = APINCO + OH : 	J(41) 	;
+{5590.} 	 APINCNO3 + OH = CH3COCH3 + HCC7CO + NO2 : 	9.87D-11 	;
+{5591.} 	 APINCNO3 = APINCO + NO2 : 	J(55) 	;
+{5592.} 	 APINCO = CH3COCH3 + C720O2 : 	KDEC 	;
+{5593.} 	 APINCOH + OH = APINCO : 	9.91D-11 	;
+{5594.} 	 NBPINAOOH + OH = NBPINAO2 : 	9.58D-12 	;
+{5595.} 	 NBPINAOOH = NBPINAO + OH : 	J(41) 	;
+{5596.} 	 NBPINAO = NOPINONE + HCHO + NO2 : 	KDEC 	;
+{5597.} 	 BPINBNO3 + OH = C918CHO + NO2 : 	6.12D-12 	;
+{5598.} 	 NBPINBOOH + OH = NC91CHO + OH : 	9.08D-12 	;
+{5599.} 	 NBPINBOOH = NBPINBO + OH : 	J(41) 	;
+{5600.} 	 NBPINBO = NOPINONE + HCHO + NO2 : 	7.00D+03 	;
+{5601.} 	 BPINANO3 + OH = NOPINONE + HCHO + NO2 : 	4.70D-12 	;
+{5602.} 	 NC91CHO + NO3 = NC91CO3 + HNO3 : 	KNO3AL*8.5 	;
+{5603.} 	 NC91CHO + OH = NC91CO3 : 	8.63D-12 	;
+{5604.} 	 NC91CHO = NOPINONE + CO + HO2 + NO2 : 	J(15) 	;
+{5605.} 	 NOPINAO2 + HO2 = NOPINAOOH : 	KRO2HO2*0.890 	;
+{5606.} 	 NOPINAO2 + NO = NOPINANO3 : 	KRO2NO*0.157 	;
+{5607.} 	 NOPINAO2 + NO = NOPINAO + NO2 : 	KRO2NO*0.843 	;
+{5608.} 	 NOPINAO2 + NO3 = NOPINAO + NO2 : 	KRO2NO3 	;
+{5609.} 	 NOPINAO2 = C9DC : 	2.50D-13*RO2*0.2 	;
+{5610.} 	 NOPINAO2 = NOPINAO : 	2.50D-13*RO2*0.6 	;
+{5611.} 	 NOPINAO2 = NOPINAOH : 	2.50D-13*RO2*0.2 	;
+{5612.} 	 NOPINBO2 + HO2 = NOPINBOOH : 	KRO2HO2*0.890 	;
+{5613.} 	 NOPINBO2 + NO = NOPINBNO3 : 	KRO2NO*0.157 	;
+{5614.} 	 NOPINBO2 + NO = NOPINBO + NO2 : 	KRO2NO*0.843 	;
+{5615.} 	 NOPINBO2 + NO3 = NOPINBO + NO2 : 	KRO2NO3 	;
+{5616.} 	 NOPINBO2 = NOPINBCO : 	2.50D-13*RO2*0.2 	;
+{5617.} 	 NOPINBO2 = NOPINBO : 	2.50D-13*RO2*0.6 	;
+{5618.} 	 NOPINBO2 = NOPINBOH : 	2.50D-13*RO2*0.2 	;
+{5619.} 	 NOPINCO2 + HO2 = NOPINCOOH : 	KRO2HO2*0.890 	;
+{5620.} 	 NOPINCO2 + NO = NOPINCNO3 : 	KRO2NO*0.118 	;
+{5621.} 	 NOPINCO2 + NO = NOPINCO + NO2 : 	KRO2NO*0.882 	;
+{5622.} 	 NOPINCO2 + NO3 = NOPINCO + NO2 : 	KRO2NO3 	;
+{5623.} 	 NOPINCO2 = NOPINCO : 	6.70D-15*RO2*0.7 	;
+{5624.} 	 NOPINCO2 = NOPINCOH : 	6.70D-15*RO2*0.3 	;
+{5625.} 	 NOPINDO2 + HO2 = NOPINDOOH : 	KRO2HO2*0.890 	;
+{5626.} 	 NOPINDO2 + NO = NOPINDO + NO2 : 	KRO2NO 	;
+{5627.} 	 NOPINDO2 + NO3 = NOPINDO + NO2 : 	KRO2NO3 	;
+{5628.} 	 NOPINDO2 = NOPINDCO : 	2.00D-12*RO2*0.05 	;
+{5629.} 	 NOPINDO2 = NOPINDO : 	2.00D-12*RO2*0.9 	;
+{5630.} 	 NOPINDO2 = NOPINDOH : 	2.00D-12*RO2*0.05 	;
+{5631.} 	 C8BC + OH = C8BCO2 : 	3.04D-12 	;
+{5632.} 	 NOPINOO + CO = NOPINONE : 	1.20D-15 	;
+{5633.} 	 NOPINOO + NO = NOPINONE + NO2 : 	1.00D-14 	;
+{5634.} 	 NOPINOO + NO2 = NOPINONE + NO3 : 	1.00D-15 	;
+{5635.} 	 NOPINOO + SO2 = NOPINONE + SO3 : 	7.00D-14 	;
+{5636.} 	 NOPINOO = NOPINONE + H2O2 : 	6.00D-18*H2O 	;
+{5637.} 	 BPINAOOH + OH = BPINAO2 : 	1.33D-11 	;
+{5638.} 	 BPINAOOH = BPINAO + OH : 	J(41) 	;
+{5639.} 	 BPINAO = NOPINONE + HCHO + HO2 : 	KDEC 	;
+{5640.} 	 BPINAOH + OH = C918CHO + HO2 : 	9.88D-12 	;
+{5641.} 	 BPINBOOH + OH = C918CHO + OH : 	1.90D-11 	;
+{5642.} 	 BPINBOOH = BPINBO + OH : 	J(41) 	;
+{5643.} 	 BPINBO = NOPINONE + HCHO + HO2 : 	KDEC 	;
+{5644.} 	 C918CHO + NO3 = C918CO3 + HNO3 : 	KNO3AL*8.5 	;
+{5645.} 	 C918CHO + OH = C918CO3 : 	3.17D-11 	;
+{5646.} 	 C918CHO = NOPINONE + CO + HO2 + HO2 : 	J(17) 	;
+{5647.} 	 BPINCOOH + OH = BPINCO2 : 	9.72D-11 	;
+{5648.} 	 BPINCOOH = BPINCO + OH : 	J(41) 	;
+{5649.} 	 BPINCNO3 + OH = HCC7CO + CH3COCH3 + NO2 : 	9.38D-11 	;
+{5650.} 	 BPINCNO3 = BPINCO + NO2 : 	J(55) 	;
+{5651.} 	 BPINCO = C720O2 + CH3COCH3 : 	KDEC 	;
+{5652.} 	 BPINCOH + OH = BPINCO : 	9.37D-11 	;
+{5653.} 	 NLIMOOH + OH = NLIMO2 : 	4.28D-11 	;
+{5654.} 	 NLIMOOH = NLIMO + OH : 	J(41) 	;
+{5655.} 	 NLIMO = LIMAL + NO2 : 	KDEC 	;
+{5656.} 	 LIMBNO3 + OH = LIMBCO + NO2 : 	5.91D-11 	;
+{5657.} 	 LIMALAO2 + HO2 = LIMALAOOH : 	KRO2HO2*0.914 	;
+{5658.} 	 LIMALAO2 + NO = LIMALAO + NO2 : 	KRO2NO 	;
+{5659.} 	 LIMALAO2 + NO3 = LIMALAO + NO2 : 	KRO2NO3 	;
+{5660.} 	 LIMALAO2 = LIMALACO : 	8.80D-13*RO2*0.2 	;
+{5661.} 	 LIMALAO2 = LIMALAO : 	8.80D-13*RO2*0.6 	;
+{5662.} 	 LIMALAO2 = LIMALAOH : 	8.80D-13*RO2*0.2 	;
+{5663.} 	 LIMALBO2 + HO2 = LIMALBOOH : 	KRO2HO2*0.914 	;
+{5664.} 	 LIMALBO2 + NO = LIMALBO + NO2 : 	KRO2NO 	;
+{5665.} 	 LIMALBO2 + NO3 = LIMALBO + NO2 : 	KRO2NO3 	;
+{5666.} 	 LIMALBO2 = LIMALBCO : 	8.80D-13*RO2*0.05 	;
+{5667.} 	 LIMALBO2 = LIMALBO : 	8.80D-13*RO2*0.9 	;
+{5668.} 	 LIMALBO2 = LIMALBOH : 	8.80D-13*RO2*0.05 	;
+{5669.} 	 C923O2 + HO2 = C923OOH : 	KRO2HO2*0.890 	;
+{5670.} 	 C923O2 + NO = C923NO3 : 	KRO2NO*0.157 	;
+{5671.} 	 C923O2 + NO = C923O + NO2 : 	KRO2NO*0.843 	;
+{5672.} 	 C923O2 + NO3 = C923O + NO2 : 	KRO2NO3 	;
+{5673.} 	 C923O2 = C923O : 	1.32D-12*RO2*0.6 	;
+{5674.} 	 C923O2 = C923OH : 	1.32D-12*RO2*0.2 	;
+{5675.} 	 C923O2 = NORLIMAL : 	1.32D-12*RO2*0.2 	;
+{5676.} 	 LIMBOO + CO = LIMAL : 	1.20D-15 	;
+{5677.} 	 LIMBOO + NO = LIMAL + NO2 : 	1.00D-14 	;
+{5678.} 	 LIMBOO + NO2 = LIMAL + NO3 : 	1.00D-15 	;
+{5679.} 	 LIMBOO + SO2 = LIMAL + SO3 : 	7.00D-14 	;
+{5680.} 	 LIMBOO = LIMAL + H2O2 : 	1.40D-17*H2O 	;
+{5681.} 	 LIMBOO = LIMONONIC : 	2.00D-18*H2O 	;
+{5682.} 	 LIMAOOH + OH = LIMAO2 : 	7.36D-11 	;
+{5683.} 	 LIMAOOH = LIMAO + OH : 	J(41) 	;
+{5684.} 	 LIMANO3 + OH = LIMAL + NO2 : 	6.20D-11 	;
+{5685.} 	 LIMAO = LIMAL + HO2 : 	KDEC 	;
+{5686.} 	 LIMAOH + OH = LIMBCO + HO2 : 	7.02D-11 	;
+{5687.} 	 LIMBOOH + OH = LIMBCO + OH : 	1.04D-10 	;
+{5688.} 	 LIMBOOH = LIMBO + OH : 	J(41) 	;
+{5689.} 	 LIMBO = LIMAL + HO2 : 	KDEC 	;
+{5690.} 	 LIMBCO + OH = C923CO3 : 	6.70D-11 	;
+{5691.} 	 LIMCOOH + OH = LIMCO2 : 	1.03D-10 	;
+{5692.} 	 LIMCOOH = LIMCO + OH : 	J(41) 	;
+{5693.} 	 LIMCNO3 + OH = LIMKET + HCHO + NO2 : 	9.31D-11 	;
+{5694.} 	 LIMCO = LIMKET + HCHO + HO2 : 	KDEC 	;
+{5695.} 	 LIMCOH + OH = LIMKET + HCHO + HO2 : 	9.94D-11 	;
+{5696.} 	 NBCOOH + OH = NBCO2 : 	6.25D-11 	;
+{5697.} 	 NBCOOH = NBCO + OH : 	J(41) 	;
+{5698.} 	 NBCO = BCAL + NO2 : 	KDEC 	;
+{5699.} 	 BCBNO3 + OH = BCBCO + NO2 : 	5.91D-11 	;
+{5700.} 	 BCAL + NO3 = C141CO3 + HNO3 : 	KNO3AL*8.5 	;
+{5701.} 	 BCAL + NO3 = NBCALO2 : 	3.30D-13 	;
+{5702.} 	 BCAL + O3 = BCALOOA + HCHO : 	1.10D-16*0.670 	;
+{5703.} 	 BCAL + O3 = BCLKET + CH2OOF : 	1.10D-16*0.330 	;
+{5704.} 	 BCAL + OH = BCALAO2 : 	8.55D-11*0.012 	;
+{5705.} 	 BCAL + OH = BCALBO2 : 	8.55D-11*0.001 	;
+{5706.} 	 BCAL + OH = BCALCO2 : 	8.55D-11*0.012 	;
+{5707.} 	 BCAL + OH = BCALO2 : 	8.55D-11*0.695 	;
+{5708.} 	 BCAL + OH = C141CO3 : 	8.55D-11*0.281 	;
+{5709.} 	 BCAL = C141O2 + CO + HO2 : 	J(15) 	;
+{5710.} 	 BCSOZ + O3 = BCKSOZ + CH2OOF : 	1.10D-16*0.4 	;
+{5711.} 	 BCSOZ + O3 = BCKSZOO + HCHO : 	1.10D-16*0.6 	;
+{5712.} 	 BCSOZ + OH = BCSOZO2 : 	7.29D-11 	;
+{5713.} 	 C141CO2H + O3 = C131CO2H + CH2OOF : 	1.10D-16*0.330 	;
+{5714.} 	 C141CO2H + O3 = C141OOA + HCHO : 	1.10D-16*0.670 	;
+{5715.} 	 C141CO2H + OH = C151O2 : 	6.98D-11 	;
+{5716.} 	 BCALAO2 + HO2 = BCALAOOH : 	KRO2HO2*0.975 	;
+{5717.} 	 BCALAO2 + NO = BCALAO + NO2 : 	KRO2NO 	;
+{5718.} 	 BCALAO2 + NO3 = BCALAO + NO2 : 	KRO2NO3 	;
+{5719.} 	 BCALAO2 = BCALACO : 	2.00D-12*RO2*0.2 	;
+{5720.} 	 BCALAO2 = BCALAO : 	2.00D-12*RO2*0.6 	;
+{5721.} 	 BCALAO2 = BCALAOH : 	2.00D-12*RO2*0.2 	;
+{5722.} 	 BCALBO2 + HO2 = BCALBOOH : 	KRO2HO2*0.975 	;
+{5723.} 	 BCALBO2 + NO = BCALBO + NO2 : 	KRO2NO 	;
+{5724.} 	 BCALBO2 + NO3 = BCALBO + NO2 : 	KRO2NO3 	;
+{5725.} 	 BCALBO2 = BCALBCO : 	2.00D-12*RO2*0.2 	;
+{5726.} 	 BCALBO2 = BCALBO : 	2.00D-12*RO2*0.6 	;
+{5727.} 	 BCALBO2 = BCALBOH : 	2.00D-12*RO2*0.2 	;
+{5728.} 	 BCALBOC + O3 = BCBOOA + HCHO : 	1.10D-16*0.670 	;
+{5729.} 	 BCALBOC + O3 = BCLKBOC + CH2OOF : 	1.10D-16*0.330 	;
+{5730.} 	 BCALBOC + OH = C152O2 : 	6.98D-11 	;
+{5731.} 	 C136O2 + HO2 = C136OOH : 	KRO2HO2*0.959 	;
+{5732.} 	 C136O2 + NO = C136NO3 : 	KRO2NO*0.178 	;
+{5733.} 	 C136O2 + NO = C136O + NO2 : 	KRO2NO*0.822 	;
+{5734.} 	 C136O2 + NO3 = C136O + NO2 : 	KRO2NO3 	;
+{5735.} 	 C136O2 = C126CHO : 	1.30D-12*RO2*0.2 	;
+{5736.} 	 C136O2 = C136O : 	1.30D-12*RO2*0.6 	;
+{5737.} 	 C136O2 = C136OH : 	1.30D-12*RO2*0.2 	;
+{5738.} 	 BCALCO2 + HO2 = BCALCOOH : 	KRO2HO2*0.975 	;
+{5739.} 	 BCALCO2 + NO = BCALCO + NO2 : 	KRO2NO 	;
+{5740.} 	 BCALCO2 + NO3 = BCALCO + NO2 : 	KRO2NO3 	;
+{5741.} 	 BCALCO2 = BCALCCO : 	2.00D-12*RO2*0.2 	;
+{5742.} 	 BCALCO2 = BCALCO : 	2.00D-12*RO2*0.6 	;
+{5743.} 	 BCALCO2 = BCALCOH : 	2.00D-12*RO2*0.2 	;
+{5744.} 	 C141O2 + HO2 = C141OOH : 	KRO2HO2*0.968 	;
+{5745.} 	 C141O2 + NO = C141NO3 : 	KRO2NO*0.180 	;
+{5746.} 	 C141O2 + NO = C141O + NO2 : 	KRO2NO*0.820 	;
+{5747.} 	 C141O2 + NO3 = C141O + NO2 : 	KRO2NO3 	;
+{5748.} 	 C141O2 = C141CO : 	1.32D-12*RO2*0.2 	;
+{5749.} 	 C141O2 = C141O : 	1.32D-12*RO2*0.6 	;
+{5750.} 	 C141O2 = C141OH : 	1.32D-12*RO2*0.2 	;
+{5751.} 	 BCAOOH + OH = BCAO2 : 	7.36D-11 	;
+{5752.} 	 BCAOOH = BCAO + OH : 	J(41) 	;
+{5753.} 	 BCANO3 + OH = BCAL + NO2 : 	6.20D-11 	;
+{5754.} 	 BCAO = BCAL + HO2 : 	KDEC 	;
+{5755.} 	 BCAOH + OH = BCBCO + HO2 : 	7.02D-11 	;
+{5756.} 	 BCBOOH + OH = BCBCO + OH : 	1.04D-10 	;
+{5757.} 	 BCBOOH = BCBO + OH : 	J(41) 	;
+{5758.} 	 BCBO = BCAL + HO2 : 	KDEC 	;
+{5759.} 	 BCBCO + OH = C141CO3 : 	6.70D-11 	;
+{5760.} 	 BCCOOH + OH = BCCO2 : 	1.03D-10 	;
+{5761.} 	 BCCOOH = BCCO + OH : 	J(41) 	;
+{5762.} 	 BCCNO3 + OH = BCKET + HCHO + NO2 : 	9.31D-11 	;
+{5763.} 	 BCCO = BCKET + HCHO + HO2 : 	KDEC 	;
+{5764.} 	 BCCOH + OH = BCKET + HCHO + HO2 : 	9.94D-11 	;
+{5765.} 	 DMMAOOH + OH = MMF + OH : 	1.09D-10 	;
+{5766.} 	 DMMAOOH = DMMAO + OH : 	J(41) 	;
+{5767.} 	 DMMANO3 + OH = MMF + NO2 : 	3.60D-12 	;
+{5768.} 	 DMMANO3 = DMMAO + NO2 : 	J(53) 	;
+{5769.} 	 DMMAO = MMF + HO2 : 	KROPRIM*O2 	;
+{5770.} 	 DMMAOH + OH = MMF + HO2 : 	3.08D-11 	;
+{5771.} 	 MMF + OH = MMFO2 : 	3.29D-12 	;
+{5772.} 	 DMMBOOH + OH = DMC + OH : 	4.29D-11 	;
+{5773.} 	 DMMBOOH = DMMBO + OH : 	J(41) 	;
+{5774.} 	 DMMBNO3 + OH = DMC + NO2 : 	4.13D-12 	;
+{5775.} 	 DMMBNO3 = DMMBO + NO2 : 	J(54) 	;
+{5776.} 	 DMMBO = DMC + HO2 : 	KROSEC*O2 	;
+{5777.} 	 DMMBOH + OH = DMC + HO2 : 	1.37D-11 	;
+{5778.} 	 DMCOOH + OH = DMCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{5779.} 	 DMCOOH + OH = MMCF + OH : 	1.96D-11 	;
+{5780.} 	 DMCOOH = DMCO + OH : 	J(41) 	;
+{5781.} 	 DMCNO3 + OH = MMCF + NO2 : 	2.20D-13 	;
+{5782.} 	 DMCNO3 = DMCO + NO2 : 	J(53) 	;
+{5783.} 	 DMCO = HCHO + CH3O : 	2.70D+14*EXP(-6765/TEMP) 	;
+{5784.} 	 DMCO = MMCF + HO2 : 	KROPRIM*O2 	;
+{5785.} 	 DMCOH + OH = MMCF + HO2 : 	5.53D-12 	;
+{5786.} 	 MMCF + OH = MMCFO2 : 	2.50D-13 	;
+{5787.} 	 CH3SCH2OOH + OH = CH3SCHO + OH : 	7.03D-11 	;
+{5788.} 	 CH3SCH2OOH = CH3SCH2O + OH : 	J(41) 	;
+{5789.} 	 CH3SCHO + OH = CH3S + CO : 	1.11D-11 	;
+{5790.} 	 CH3SCHO = CH3S + CO + HO2 : 	J(15) 	;
+{5791.} 	 CH3SCH2O = CH3S + HCHO : 	KDEC 	;
+{5792.} 	 CH3SCH2OH + OH = CH3SCHO + HO2 : 	2.78D-11 	;
+{5793.} 	 DMSO2 + OH = DMSO2O2 : 	4.40D-14 	;
+{5794.} 	 DMSO + OH = MSIA + CH3O2 : 	6.10D-12*EXP(800/TEMP) 	;
+{5795.} 	 ETHOXOOH + OH = ETHOXO2 : 	7.15D-12 	;
+{5796.} 	 ETHOXOOH = CHOOCH2O2 + OH : 	J(41) 	;
+{5797.} 	 HOC2H4CO3 + HO2 = HOC2H4CO2H + O3 : 	KAPHO2*0.15 	;
+{5798.} 	 HOC2H4CO3 + HO2 = HOC2H4CO3H : 	KAPHO2*0.41 	;
+{5799.} 	 HOC2H4CO3 + HO2 = HOCH2CH2O2 + OH : 	KAPHO2*0.44 	;
+{5800.} 	 HOC2H4CO3 + NO = HOCH2CH2O2 + NO2 : 	KAPNO 	;
+{5801.} 	 HOC2H4CO3 + NO2 = C3PAN1 : 	KFPAN 	;
+{5802.} 	 HOC2H4CO3 + NO3 = HOCH2CH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{5803.} 	 HOC2H4CO3 = HOC2H4CO2H : 	1.00D-11*0.3*RO2 	;
+{5804.} 	 HOC2H4CO3 = HOCH2CH2O2 : 	1.00D-11*0.7*RO2 	;
+{5805.} 	 HOIPRCO3 + HO2 = HOIPRCO2H + O3 : 	KAPHO2*0.15 	;
+{5806.} 	 HOIPRCO3 + HO2 = HOIPRCO3H : 	KAPHO2*0.41 	;
+{5807.} 	 HOIPRCO3 + HO2 = HYPROPO2 + OH : 	KAPHO2*0.44 	;
+{5808.} 	 HOIPRCO3 + NO = HYPROPO2 + NO2 : 	KAPNO 	;
+{5809.} 	 HOIPRCO3 + NO2 = C4PAN4 : 	KFPAN 	;
+{5810.} 	 HOIPRCO3 + NO3 = HYPROPO2 + NO2 : 	KRO2NO3*1.74 	;
+{5811.} 	 HOIPRCO3 = HOIPRCO2H : 	1.00D-11*0.3*RO2 	;
+{5812.} 	 HOIPRCO3 = HYPROPO2 : 	1.00D-11*0.7*RO2 	;
+{5813.} 	 HO13C5O2 + HO2 = HO13C5OOH : 	KRO2HO2*0.706 	;
+{5814.} 	 HO13C5O2 + NO = HO13C5NO3 : 	KRO2NO*0.026 	;
+{5815.} 	 HO13C5O2 + NO = HO13C5O + NO2 : 	KRO2NO*0.974 	;
+{5816.} 	 HO13C5O2 + NO3 = HO13C5O + NO2 : 	KRO2NO3 	;
+{5817.} 	 HO13C5O2 = HO134C5 : 	8.40D-13*0.2*RO2 	;
+{5818.} 	 HO13C5O2 = HO13C5O : 	8.40D-13*0.6*RO2 	;
+{5819.} 	 HO13C5O2 = HO13CO4C5 : 	8.40D-13*0.2*RO2 	;
+{5820.} 	 HO3C4CO3 + HO2 = HO3C4CO3H : 	KAPHO2*0.56 	;
+{5821.} 	 HO3C4CO3 + HO2 = HO3C4O2 + OH : 	KAPHO2*0.44 	;
+{5822.} 	 HO3C4CO3 + NO = HO3C4O2 + NO2 : 	KAPNO 	;
+{5823.} 	 HO3C4CO3 + NO2 = C5PAN8 : 	KFPAN 	;
+{5824.} 	 HO3C4CO3 + NO3 = HO3C4O2 + NO2 : 	KRO2NO3*1.74 	;
+{5825.} 	 HO3C4CO3 = HO3C4O2 : 	1.00D-11*RO2 	;
+{5826.} 	 OH + BUT2CO2H = SC4H9O2 : 	6.26D-12 	;
+{5827.} 	 BUT2CO3H = SC4H9O2 + OH : 	J(41) 	;
+{5828.} 	 OH + BUT2CO3H = BUT2CO3 : 	9.72D-12 	;
+{5829.} 	 C5PAN4 = BUT2CO3 + NO2 : 	KBPAN 	;
+{5830.} 	 OH + C5PAN4 = MEK + CO + NO2 : 	2.20D-12 	;
+{5831.} 	 C3ME3CO2H + OH = IC4H9O2 : 	8.88D-12 	;
+{5832.} 	 C3ME3CO3H + OH = C3ME3CO3 : 	1.23D-11 	;
+{5833.} 	 C3ME3CO3H = IC4H9O2 + OH : 	J(41) 	;
+{5834.} 	 C3ME3PAN + OH = IPRCHO + CO + NO2 : 	3.07D-12 	;
+{5835.} 	 C3ME3PAN = C3ME3CO3 + NO2 : 	KBPAN 	;
+{5836.} 	 C3M3CHOOOH + OH = C3ME3CHOO2 : 	2.56D-11 	;
+{5837.} 	 C3M3CHOOOH = C3ME3CHOO + OH : 	J(41)+J(17) 	;
+{5838.} 	 C3M3CHONO3 + OH = GLYOX + CH3COCH3 + NO2 : 	2.10D-11 	;
+{5839.} 	 C3M3CHONO3 = C3ME3CHOO + NO2 : 	J(55) 	;
+{5840.} 	 C3M3CHONO3 = MPRBNO3O2 + CO + HO2 : 	J(17) 	;
+{5841.} 	 C3ME3CHOO = HCOCH2O2 + CH3COCH3 : 	KDEC 	;
+{5842.} 	 IPRGLYOX + NO3 = IPRCO3 + CO + HNO3 : 	KNO3AL*8.5 	;
+{5843.} 	 IPRGLYOX + OH = IPRCO3 + CO : 	1.52D-11 	;
+{5844.} 	 IPRGLYOX = IPRCO3 + HO2 + CO : 	J(34) 	;
+{5845.} 	 C54O2 + HO2 = C54OOH : 	KRO2HO2*0.706 	;
+{5846.} 	 C54O2 + NO = C54NO3 : 	KRO2NO*0.010 	;
+{5847.} 	 C54O2 + NO = C54O + NO2 : 	KRO2NO*0.990 	;
+{5848.} 	 C54O2 + NO3 = C54O + NO2 : 	KRO2NO3 	;
+{5849.} 	 C54O2 = C54O : 	2.00D-12*0.6*RO2 	;
+{5850.} 	 C54O2 = C54OH : 	2.00D-12*0.2*RO2 	;
+{5851.} 	 C54O2 = H13C43CHO : 	2.00D-12*0.2*RO2 	;
+{5852.} 	 H2M2C3CO3 + HO2 = H2M2C3CO3H : 	KAPHO2*0.56 	;
+{5853.} 	 H2M2C3CO3 + HO2 = TBUTOLO2 + OH : 	KAPHO2*0.44 	;
+{5854.} 	 H2M2C3CO3 + NO = TBUTOLO2 + NO2 : 	KAPNO 	;
+{5855.} 	 H2M2C3CO3 + NO2 = C5PAN11 : 	KFPAN 	;
+{5856.} 	 H2M2C3CO3 + NO3 = TBUTOLO2 + NO2 : 	KRO2NO3*1.74 	;
+{5857.} 	 H2M2C3CO3 = TBUTOLO2 : 	1.00D-11*RO2 	;
+{5858.} 	 PROL1MCO3 + HO2 = MEK + HO2 + OH : 	KAPHO2*0.44 	;
+{5859.} 	 PROL1MCO3 + HO2 = PROL1MCO3H : 	KAPHO2*0.56 	;
+{5860.} 	 PROL1MCO3 + NO = MEK + HO2 + NO2 : 	KAPNO 	;
+{5861.} 	 PROL1MCO3 + NO2 = PROL1MPAN : 	KFPAN 	;
+{5862.} 	 PROL1MCO3 + NO3 = MEK + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{5863.} 	 PROL1MCO3 = MEK + HO2 : 	1.00D-11*RO2 	;
+{5864.} 	 C56O2 + HO2 = C56OOH : 	KRO2HO2*0.706 	;
+{5865.} 	 C56O2 + NO = C56NO3 : 	KRO2NO*0.010 	;
+{5866.} 	 C56O2 + NO = C56O + NO2 : 	KRO2NO*0.990 	;
+{5867.} 	 C56O2 + NO3 = C56O + NO2 : 	KRO2NO3 	;
+{5868.} 	 C56O2 = C42CHO : 	2.00D-12*0.2*RO2 	;
+{5869.} 	 C56O2 = C56O : 	2.00D-12*0.6*RO2 	;
+{5870.} 	 C56O2 = C56OH : 	2.00D-12*0.2*RO2 	;
+{5871.} 	 HO2C43CO3 + HO2 = BUT2OLO2 + OH : 	KAPHO2*0.44 	;
+{5872.} 	 HO2C43CO3 + HO2 = HO2C43CO2H + O3 : 	KAPHO2*0.15 	;
+{5873.} 	 HO2C43CO3 + HO2 = HO2C43CO3H : 	KAPHO2*0.41 	;
+{5874.} 	 HO2C43CO3 + NO = BUT2OLO2 + NO2 : 	KAPNO 	;
+{5875.} 	 HO2C43CO3 + NO2 = C5PAN14 : 	KFPAN 	;
+{5876.} 	 HO2C43CO3 + NO3 = BUT2OLO2 + NO2 : 	KRO2NO3*1.74 	;
+{5877.} 	 HO2C43CO3 = BUT2OLO2 : 	1.00D-11*0.7*RO2 	;
+{5878.} 	 HO2C43CO3 = HO2C43CO2H : 	1.00D-11*0.3*RO2 	;
+{5879.} 	 C6DIAL + NO3 = CHOC4CO3 + HNO3 : 	2*KNO3AL*5.5 	;
+{5880.} 	 C6DIAL + OH = C6DIALO2 : 	5.22D-11*0.178 	;
+{5881.} 	 C6DIAL + OH = CHOC4CO3 : 	5.22D-11*0.822 	;
+{5882.} 	 C6DIAL = CHOC4O2 + HO2 + CO : 	J(15) 	;
+{5883.} 	 CYC6DIONE + OH = CYC6DIONO2 : 	1.07D-11 	;
+{5884.} 	 CYC6DIONE = C4H6 + CO + CO : 	J(22) 	;
+{5885.} 	 OH + ALLYLOH = ACR + HO2 : 	2.59D-11 	;
+{5886.} 	 MIBKCOOHO2 + HO2 = MBKCOOHOOH : 	KRO2HO2*0.770 	;
+{5887.} 	 MIBKCOOHO2 + NO = MIBKCOOHO + NO2 : 	KRO2NO 	;
+{5888.} 	 MIBKCOOHO2 + NO3 = MIBKCOOHO + NO2 : 	KRO2NO3 	;
+{5889.} 	 MIBKCOOHO2 = MIBKCOOHO : 	2.00D-12*RO2 	;
+{5890.} 	 C64O = HCHO + HO2 + CO24C5 : 	2.00D+14*EXP(-5902/TEMP) 	;
+{5891.} 	 C65O = CO24C5 + CO + HO2 : 	KDEC 	;
+{5892.} 	 HOCH2CO2H + OH = HCHO + HO2 : 	2.73D-12 	;
+{5893.} 	 HOCH2CO3H + OH = HOCH2CO3 : 	6.19D-12 	;
+{5894.} 	 HOCH2CO3H = HCHO + HO2 + OH : 	J(41) 	;
+{5895.} 	 PHAN + OH = HCHO + CO + NO2 : 	1.12D-12 	;
+{5896.} 	 PHAN = HOCH2CO3 + NO2 : 	KBPAN 	;
+{5897.} 	 IPROPOLPER + OH = CH3CHOHCO3 : 	9.34D-12 	;
+{5898.} 	 IPROPOLPER = CH3CHO + HO2 + OH : 	J(41) 	;
+{5899.} 	 IPROPOLPAN + OH = CH3CHO + CO + NO2 : 	2.34D-12 	;
+{5900.} 	 IPROPOLPAN = CH3CHOHCO3 + NO2 : 	KBPAN 	;
+{5901.} 	 C4MCONO3O = CH3COCH3 + NO3CH2CO3 : 	KDEC 	;
+{5902.} 	 NC4OHCO3 + HO2 = IBUTALOH + NO2 + OH : 	KAPHO2*0.44 	;
+{5903.} 	 NC4OHCO3 + HO2 = NC4OHCO3H : 	KAPHO2*0.56 	;
+{5904.} 	 NC4OHCO3 + NO = IBUTALOH + NO2 + NO2 : 	KAPNO 	;
+{5905.} 	 NC4OHCO3 + NO2 = NC4OHCPAN : 	KFPAN 	;
+{5906.} 	 NC4OHCO3 + NO3 = IBUTALOH + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{5907.} 	 NC4OHCO3 = IBUTALOH + NO2 : 	1.00D-11*RO2 	;
+{5908.} 	 IPRHOCO2H + OH = CH3COCH3 + HO2 : 	1.72D-12 	;
+{5909.} 	 IPRHOCO3H = CH3COCH3 + HO2 + OH : 	J(41) 	;
+{5910.} 	 OH + IPRHOCO3H = IPRHOCO3 : 	4.80D-12 	;
+{5911.} 	 C4PAN5 = IPRHOCO3 + NO2 : 	KBPAN 	;
+{5912.} 	 OH + C4PAN5 = CH3COCH3 + CO + NO2 : 	4.75D-13 	;
+{5913.} 	 MBOCOCO + OH = CO + IPRHOCO3 : 	1.38D-11 	;
+{5914.} 	 MBOCOCO = CO + HO2 + IPRHOCO3 : 	J(34) 	;
+{5915.} 	 C4OH2CO3 + HO2 = C4OH2CO3H : 	KAPHO2*0.56 	;
+{5916.} 	 C4OH2CO3 + HO2 = IBUTALOH + HO2 + OH : 	KAPHO2*0.44 	;
+{5917.} 	 C4OH2CO3 + NO = IBUTALOH + HO2 + NO2 : 	KAPNO 	;
+{5918.} 	 C4OH2CO3 + NO2 = C4OH2CPAN : 	KFPAN 	;
+{5919.} 	 C4OH2CO3 + NO3 = IBUTALOH + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{5920.} 	 C4OH2CO3 = IBUTALOH + HO2 : 	1.00D-11*RO2 	;
+{5921.} 	 CO2C3CO3 + HO2 = CH3COCH2O2 + OH : 	KAPHO2*0.44 	;
+{5922.} 	 CO2C3CO3 + HO2 = CO2C3CO3H : 	KAPHO2*0.56 	;
+{5923.} 	 CO2C3CO3 + NO = CH3COCH2O2 + NO2 : 	KAPNO 	;
+{5924.} 	 CO2C3CO3 + NO2 = CO2C3PAN : 	KFPAN 	;
+{5925.} 	 CO2C3CO3 + NO3 = CH3COCH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{5926.} 	 CO2C3CO3 = CH3COCH2O2 : 	1.00D-11*RO2 	;
+{5927.} 	 HO2C3CO3 + HO2 = HO2C3CO2H + O3 : 	KAPHO2*0.15 	;
+{5928.} 	 HO2C3CO3 + HO2 = HO2C3CO3H : 	KAPHO2*0.41 	;
+{5929.} 	 HO2C3CO3 + HO2 = IPROPOLO2 + OH : 	KAPHO2*0.44 	;
+{5930.} 	 HO2C3CO3 + NO = IPROPOLO2 + NO2 : 	KAPNO 	;
+{5931.} 	 HO2C3CO3 + NO2 = C4PAN3 : 	KFPAN 	;
+{5932.} 	 HO2C3CO3 + NO3 = IPROPOLO2 + NO2 : 	KRO2NO3*1.74 	;
+{5933.} 	 HO2C3CO3 = HO2C3CO3H : 	1.00D-11*0.3*RO2 	;
+{5934.} 	 HO2C3CO3 = IPROPOLO2 : 	1.00D-11*0.7*RO2 	;
+{5935.} 	 IBUDIALCO3 + HO2 = PROPALO2 + OH : 	KAPHO2*0.44 	;
+{5936.} 	 IBUDIALCO3 + HO2 = PRPAL2CO2H + O3 : 	KAPHO2*0.15 	;
+{5937.} 	 IBUDIALCO3 + HO2 = PRPAL2CO3H : 	KAPHO2*0.41 	;
+{5938.} 	 IBUDIALCO3 + NO = PROPALO2 + NO2 : 	KAPNO 	;
+{5939.} 	 IBUDIALCO3 + NO2 = IBUDIALPAN : 	KFPAN 	;
+{5940.} 	 IBUDIALCO3 + NO3 = PROPALO2 + NO2 : 	KRO2NO3*1.74 	;
+{5941.} 	 IBUDIALCO3 = PROPALO2 : 	1.00D-11*0.7*RO2 	;
+{5942.} 	 IBUDIALCO3 = PRPAL2CO2H : 	1.00D-11*0.3*RO2 	;
+{5943.} 	 PROPALO2 + HO2 = PROPALOOH : 	KRO2HO2*0.520 	;
+{5944.} 	 PROPALO2 + NO = PROPALO + NO2 : 	KRO2NO 	;
+{5945.} 	 PROPALO2 + NO3 = PROPALO + NO2 : 	KRO2NO3 	;
+{5946.} 	 PROPALO2 = CH3CHOHCHO : 	2.00D-12*0.2*RO2 	;
+{5947.} 	 PROPALO2 = MGLYOX : 	2.00D-12*0.2*RO2 	;
+{5948.} 	 PROPALO2 = PROPALO : 	2.00D-12*0.6*RO2 	;
+{5949.} 	 CO3C4CO3 + HO2 = CO3C4CO2H + O3 : 	KAPHO2*0.15 	;
+{5950.} 	 CO3C4CO3 + HO2 = CO3C4CO3H : 	KAPHO2*0.41 	;
+{5951.} 	 CO3C4CO3 + HO2 = MEKCO2 + OH : 	KAPHO2*0.44 	;
+{5952.} 	 CO3C4CO3 + NO = MEKCO2 + NO2 : 	KAPNO 	;
+{5953.} 	 CO3C4CO3 + NO2 = C5PAN16 : 	KFPAN 	;
+{5954.} 	 CO3C4CO3 + NO3 = MEKCO2 + NO2 : 	KRO2NO3*1.74 	;
+{5955.} 	 CO3C4CO3 = CO3C4CO2H : 	1.00D-11*0.3*RO2 	;
+{5956.} 	 CO3C4CO3 = MEKCO2 : 	1.00D-11*0.7*RO2 	;
+{5957.} 	 HO1C4O2 + HO2 = HO1C4OOH : 	KRO2HO2*0.625 	;
+{5958.} 	 HO1C4O2 + NO = HO1C4NO3 : 	KRO2NO*0.013 	;
+{5959.} 	 HO1C4O2 + NO = HO1C4O + NO2 : 	KRO2NO*0.987 	;
+{5960.} 	 HO1C4O2 + NO3 = HO1C4O + NO2 : 	KRO2NO3 	;
+{5961.} 	 HO1C4O2 = HO1C4O : 	1.30D-12*0.6*RO2 	;
+{5962.} 	 HO1C4O2 = HOC3H6CHO : 	1.30D-12*0.2*RO2 	;
+{5963.} 	 HO1C4O2 = HOC4H8OH : 	1.30D-12*0.2*RO2 	;
+{5964.} 	 A2PANOO + HO2 = A2PANO + OH : 	KAPHO2*0.44 	;
+{5965.} 	 A2PANOO + HO2 = C2OHOCO2H + O3 : 	KAPHO2*0.15 	;
+{5966.} 	 A2PANOO + HO2 = C2OHOCOOH : 	KAPHO2*0.41 	;
+{5967.} 	 A2PANOO + NO = A2PANO + NO2 : 	KAPNO 	;
+{5968.} 	 A2PANOO + NO2 = A2PAN : 	KFPAN 	;
+{5969.} 	 A2PANOO + NO3 =  A2PANO + NO2 : 	KRO2NO3*1.74 	;
+{5970.} 	 A2PANOO = A2PANO : 	1.00E-11*0.7*RO2 	;
+{5971.} 	 A2PANOO = C2OHOCO2H : 	1.00E-11*0.3*RO2 	;
+{5972.} 	 HCOCOHCO3 + HO2 = GLYOX + HO2 + OH : 	KAPHO2*0.44 	;
+{5973.} 	 HCOCOHCO3 + HO2 = HCOCOHCO3H : 	KAPHO2*0.56 	;
+{5974.} 	 HCOCOHCO3 + NO = GLYOX + HO2 + NO2 : 	KAPNO 	;
+{5975.} 	 HCOCOHCO3 + NO2 = HCOCOHPAN : 	KFPAN 	;
+{5976.} 	 HCOCOHCO3 + NO3 = GLYOX + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{5977.} 	 HCOCOHCO3 = GLYOX + HO2 : 	1.00D-11*RO2 	;
+{5978.} 	 NMGLYOX = NO2 + HCHO + CO + CO + HO2 : 	J(53) 	;
+{5979.} 	 NMGLYOX = NO3CH2CO3 + CO + HO2 : 	J(34) 	;
+{5980.} 	 NO3 + NMGLYOX = NO3CH2CO3 + CO + HNO3 : 	KNO3AL*2.4 	;
+{5981.} 	 OH + NMGLYOX = NO3CH2CO3 + CO : 	1.24D-11 	;
+{5982.} 	 HCOCO2H = HO2 + HO2 + CO : 	J(34) 	;
+{5983.} 	 OH + HCOCO2H = CO + HO2 : 	1.23D-11 	;
+{5984.} 	 HCOCO3H = HO2 + CO + OH : 	J(41)+J(15) 	;
+{5985.} 	 OH + HCOCO3H = HCOCO3 : 	1.58D-11 	;
+{5986.} 	 GLYPAN = HCOCO3 + NO2 : 	KBPAN 	;
+{5987.} 	 OH + GLYPAN = CO + CO + NO2 : 	1.22D-11 	;
+{5988.} 	 CHOMOHCO3 + HO2 = CHOMOHCO3H : 	KAPHO2*0.56 	;
+{5989.} 	 CHOMOHCO3 + HO2 = MGLYOX + HO2 + OH : 	KAPHO2*0.44 	;
+{5990.} 	 CHOMOHCO3 + NO = MGLYOX + NO2 + HO2 : 	KAPNO 	;
+{5991.} 	 CHOMOHCO3 + NO2 = CHOMOHPAN : 	KFPAN 	;
+{5992.} 	 CHOMOHCO3 + NO3 = MGLYOX + NO2 + HO2 : 	KRO2NO3*1.74 	;
+{5993.} 	 CHOMOHCO3 = MGLYOX + HO2 : 	1.00D-11*RO2 	;
+{5994.} 	 C4CO2O = GLYOX + CH3CO3 : 	KDEC*0.5 	;
+{5995.} 	 C4CO2O = MGLYOX + HO2 + CO : 	KDEC*0.5 	;
+{5996.} 	 CO2H3CO3 + HO2 = CO2H3CO3H : 	KAPHO2*0.56 	;
+{5997.} 	 CO2H3CO3 + HO2 = MGLYOX + HO2 + OH : 	KAPHO2*0.44 	;
+{5998.} 	 CO2H3CO3 + NO = MGLYOX + HO2 + NO2 : 	KAPNO 	;
+{5999.} 	 CO2H3CO3 + NO2 = C4PAN6 : 	KFPAN 	;
+{6000.} 	 CO2H3CO3 + NO3 = MGLYOX + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{6001.} 	 CO2H3CO3 = MGLYOX + HO2 : 	1.00D-11*RO2 	;
+{6002.} 	 HO1C5O2 + HO2 = HO1C5OOH : 	KRO2HO2*0.706 	;
+{6003.} 	 HO1C5O2 + NO = HO1C5NO3 : 	KRO2NO*0.052 	;
+{6004.} 	 HO1C5O2 + NO = HO1C5O + NO2 : 	KRO2NO*0.948 	;
+{6005.} 	 HO1C5O2 + NO3 = HO1C5O + NO2 : 	KRO2NO3 	;
+{6006.} 	 HO1C5O2 = CO2C5OH : 	2.50D-13*0.2*RO2 	;
+{6007.} 	 HO1C5O2 = HO1C5O : 	2.50D-13*0.6*RO2 	;
+{6008.} 	 HO1C5O2 = HO2C5OH : 	2.50D-13*0.2*RO2 	;
+{6009.} 	 HO2C5O2 + HO2 = HO2C5OOH : 	KRO2HO2*0.706 	;
+{6010.} 	 HO2C5O2 + NO = HO2C5NO3 : 	KRO2NO*0.021 	;
+{6011.} 	 HO2C5O2 + NO = HO2C5O + NO2 : 	KRO2NO*0.979 	;
+{6012.} 	 HO2C5O2 + NO3 = HO2C5O + NO2 : 	KRO2NO3 	;
+{6013.} 	 HO2C5O2 = HO2C4CHO : 	1.30D-12*0.2*RO2 	;
+{6014.} 	 HO2C5O2 = HO2C5O : 	1.30D-12*0.6*RO2 	;
+{6015.} 	 HO2C5O2 = HO2C5OH : 	1.30D-12*0.2*RO2 	;
+{6016.} 	 C52O2 + HO2 = C52OOH : 	KRO2HO2*0.706 	;
+{6017.} 	 C52O2 + NO = C52NO3 : 	KRO2NO*0.021 	;
+{6018.} 	 C52O2 + NO = C52O + NO2 : 	KRO2NO*0.979 	;
+{6019.} 	 C52O2 + NO3 = C52O + NO2 : 	KRO2NO3 	;
+{6020.} 	 C52O2 = C52O : 	1.30D-12*0.6*RO2 	;
+{6021.} 	 C52O2 = C52OH : 	1.30D-12*0.2*RO2 	;
+{6022.} 	 C52O2 = HOIBUTCHO : 	1.30D-12*0.2*RO2 	;
+{6023.} 	 TBUTCO3 + HO2 = TBUTCO3H : 	KAPHO2*0.56 	;
+{6024.} 	 TBUTCO3 + HO2 = TC4H9O2 + OH : 	KAPHO2*0.44 	;
+{6025.} 	 TBUTCO3 + NO = TC4H9O2 + NO2 : 	KAPNO 	;
+{6026.} 	 TBUTCO3 + NO2 = C5PAN6 : 	KFPAN 	;
+{6027.} 	 TBUTCO3 + NO3 = TC4H9O2 + NO2 : 	KRO2NO3*1.74 	;
+{6028.} 	 TBUTCO3 = TC4H9O2 : 	1.00D-11*RO2 	;
+{6029.} 	 HO1C6O2 + HO2 = HO1C6OOH : 	KRO2HO2*0.770 	;
+{6030.} 	 HO1C6O2 + NO = HO1C6NO3 : 	KRO2NO*0.078 	;
+{6031.} 	 HO1C6O2 + NO = HO1C6O + NO2 : 	KRO2NO*0.922 	;
+{6032.} 	 HO1C6O2 + NO3 = HO1C6O + NO2 : 	KRO2NO3 	;
+{6033.} 	 HO1C6O2 = HO14C6 : 	2.50D-13*0.2*RO2 	;
+{6034.} 	 HO1C6O2 = HO1C6O : 	2.50D-13*0.6*RO2 	;
+{6035.} 	 HO1C6O2 = HO1CO4C6 : 	2.50D-13*0.2*RO2 	;
+{6036.} 	 C5H11CO3 + HO2 = C5H11CO3H : 	KAPHO2*0.56 	;
+{6037.} 	 C5H11CO3 + HO2 = PEAO2 + OH : 	KAPHO2*0.44 	;
+{6038.} 	 C5H11CO3 + NO = PEAO2 + NO2 : 	KAPNO 	;
+{6039.} 	 C5H11CO3 + NO2 = PHXN : 	KFPAN 	;
+{6040.} 	 C5H11CO3 + NO3 = PEAO2 + NO2 : 	KRO2NO3*1.74 	;
+{6041.} 	 C5H11CO3 = PEAO2 : 	1.00D-11*RO2 	;
+{6042.} 	 HO2C6O2 + HO2 = HO2C6OOH : 	KRO2HO2*0.770 	;
+{6043.} 	 HO2C6O2 + NO = HO2C6NO3 : 	KRO2NO*0.078 	;
+{6044.} 	 HO2C6O2 + NO = HO2C6O + NO2 : 	KRO2NO*0.922 	;
+{6045.} 	 HO2C6O2 + NO3 = HO2C6O + NO2 : 	KRO2NO3 	;
+{6046.} 	 HO2C6O2 = HO25C6 : 	2.50D-13*0.2*RO2 	;
+{6047.} 	 HO2C6O2 = HO2C6O : 	2.50D-13*0.6*RO2 	;
+{6048.} 	 HO2C6O2 = HO2CO5C6 : 	2.50D-13*0.2*RO2 	;
+{6049.} 	 HO3C6O2 + HO2 = HO3C6OOH : 	KRO2HO2*0.770 	;
+{6050.} 	 HO3C6O2 + NO = HO3C6NO3 : 	KRO2NO*0.031 	;
+{6051.} 	 HO3C6O2 + NO = HO3C6O + NO2 : 	KRO2NO*0.969 	;
+{6052.} 	 HO3C6O2 + NO3 = HO3C6O + NO2 : 	KRO2NO3 	;
+{6053.} 	 HO3C6O2 = HO14C6 : 	1.30D-12*0.2*RO2 	;
+{6054.} 	 HO3C6O2 = HO3C5CHO : 	1.30D-12*0.2*RO2 	;
+{6055.} 	 HO3C6O2 = HO3C6O : 	1.30D-12*0.6*RO2 	;
+{6056.} 	 HO1MC5O2 + HO2 = HO1MC5OOH : 	KRO2HO2*0.770 	;
+{6057.} 	 HO1MC5O2 + NO = HO1MC5NO3 : 	KRO2NO*0.078 	;
+{6058.} 	 HO1MC5O2 + NO = HO1MC5O + NO2 : 	KRO2NO*0.922 	;
+{6059.} 	 HO1MC5O2 + NO3 = HO1MC5O + NO2 : 	KRO2NO3 	;
+{6060.} 	 HO1MC5O2 = CO2MC5OH : 	2.50D-13*0.2*RO2 	;
+{6061.} 	 HO1MC5O2 = HO14MC5 : 	2.50D-13*0.2*RO2 	;
+{6062.} 	 HO1MC5O2 = HO1MC5O : 	2.50D-13*0.6*RO2 	;
+{6063.} 	 C54CO3 + HO2 = C54CO3H : 	KAPHO2*0.56 	;
+{6064.} 	 C54CO3 + HO2 = PEBO2 + OH : 	KAPHO2*0.44 	;
+{6065.} 	 C54CO3 + NO = PEBO2 + NO2 : 	KAPNO 	;
+{6066.} 	 C54CO3 + NO2 = C6PAN3 : 	KFPAN 	;
+{6067.} 	 C54CO3 + NO3 = PEBO2 + NO2 : 	KRO2NO3*1.74 	;
+{6068.} 	 C54CO3 = PEBO2 : 	1.00D-11*RO2 	;
+{6069.} 	 HO2MC5O2 + HO2 = HO2MC5OOH : 	KRO2HO2*0.770 	;
+{6070.} 	 HO2MC5O2 + NO = HO2MC5NO3 : 	KRO2NO*0.031 	;
+{6071.} 	 HO2MC5O2 + NO = HO2MC5O + NO2 : 	KRO2NO*0.969 	;
+{6072.} 	 HO2MC5O2 + NO3 = HO2MC5O + NO2 : 	KRO2NO3 	;
+{6073.} 	 HO2MC5O2 = HO14MC5 : 	1.30D-12*0.2*RO2 	;
+{6074.} 	 HO2MC5O2 = HO2C54CHO : 	1.30D-12*0.2*RO2 	;
+{6075.} 	 HO2MC5O2 = HO2MC5O : 	1.30D-12*0.6*RO2 	;
+{6076.} 	 EIPKAO2 + HO2 = EIPKAOOH : 	KRO2HO2*0.770 	;
+{6077.} 	 EIPKAO2 + NO = EIPKAO + NO2 : 	KRO2NO 	;
+{6078.} 	 EIPKAO2 + NO3 = EIPKAO + NO2 : 	KRO2NO3 	;
+{6079.} 	 EIPKAO2 = EIPKAO : 	9.20D-14*0.7*RO2 	;
+{6080.} 	 EIPKAO2 = EIPKAOH : 	9.20D-14*0.3*RO2 	;
+{6081.} 	 EIPKBO2 + HO2 = EIPKBOOH : 	KRO2HO2*0.770 	;
+{6082.} 	 EIPKBO2 + NO = EIPKBNO3 : 	KRO2NO*0.078 	;
+{6083.} 	 EIPKBO2 + NO = EIPKBO + NO2 : 	KRO2NO*0.922 	;
+{6084.} 	 EIPKBO2 + NO3 = EIPKBO + NO2 : 	KRO2NO3 	;
+{6085.} 	 EIPKBO2 = CO3C54CHO : 	1.30D-12*0.2*RO2 	;
+{6086.} 	 EIPKBO2 = EIPKBO : 	1.30D-12*0.6*RO2 	;
+{6087.} 	 EIPKBO2 = EIPKBOH : 	1.30D-12*0.2*RO2 	;
+{6088.} 	 HO2M2C5O2 + HO2 = HO2M2C5OOH : 	KRO2HO2*0.770 	;
+{6089.} 	 HO2M2C5O2 + NO = HO2M2C5NO3 : 	KRO2NO*0.031 	;
+{6090.} 	 HO2M2C5O2 + NO = HO2M2C5O + NO2 : 	KRO2NO*0.969 	;
+{6091.} 	 HO2M2C5O2 + NO3 = HO2M2C5O + NO2 : 	KRO2NO3 	;
+{6092.} 	 HO2M2C5O2 = H2M2C4CHO : 	1.30D-12*0.2*RO2 	;
+{6093.} 	 HO2M2C5O2 = HO2M2C5O : 	1.30D-12*0.6*RO2 	;
+{6094.} 	 HO2M2C5O2 = HO2M2C5OH : 	1.30D-12*0.2*RO2 	;
+{6095.} 	 H1MC5O2 + HO2 = H1MC5OOH : 	KRO2HO2*0.770 	;
+{6096.} 	 H1MC5O2 + NO = H1MC5NO3 : 	KRO2NO*0.078 	;
+{6097.} 	 H1MC5O2 + NO = H1MC5O + NO2 : 	KRO2NO*0.922 	;
+{6098.} 	 H1MC5O2 + NO3 = H1MC5O + NO2 : 	KRO2NO3 	;
+{6099.} 	 H1MC5O2 = CO2M3C5OH : 	2.50D-13*0.2*RO2 	;
+{6100.} 	 H1MC5O2 = H1MC5O : 	2.50D-13*0.6*RO2 	;
+{6101.} 	 H1MC5O2 = HO14M3C5 : 	2.50D-13*0.2*RO2 	;
+{6102.} 	 M3C4CO3 + HO2 = IPEAO2 + OH : 	KAPHO2*0.44 	;
+{6103.} 	 M3C4CO3 + HO2 = M3C4CO3H : 	KAPHO2*0.56 	;
+{6104.} 	 M3C4CO3 + NO = IPEAO2 + NO2 : 	KAPNO 	;
+{6105.} 	 M3C4CO3 + NO2 = C6PAN10 : 	KFPAN 	;
+{6106.} 	 M3C4CO3 + NO3 = IPEAO2 + NO2 : 	KRO2NO3*1.74 	;
+{6107.} 	 M3C4CO3 = IPEAO2 : 	1.00D-11*RO2 	;
+{6108.} 	 H2MC5O2 + HO2 = H2MC5OOH : 	KRO2HO2*0.770 	;
+{6109.} 	 H2MC5O2 + NO = H2MC5NO3 : 	KRO2NO*0.031 	;
+{6110.} 	 H2MC5O2 + NO = H2MC5O + NO2 : 	KRO2NO*0.969 	;
+{6111.} 	 H2MC5O2 + NO3 = H2MC5O + NO2 : 	KRO2NO3 	;
+{6112.} 	 H2MC5O2 = H2M3C4CHO : 	1.30D-12*0.2*RO2 	;
+{6113.} 	 H2MC5O2 = H2MC5O : 	1.30D-12*0.6*RO2 	;
+{6114.} 	 H2MC5O2 = HO14M3C5 : 	1.30D-12*0.2*RO2 	;
+{6115.} 	 M2BKAO2 + HO2 = M2BKAOOH : 	KRO2HO2*0.770 	;
+{6116.} 	 M2BKAO2 + NO = M2BKANO3 : 	KRO2NO*0.195 	;
+{6117.} 	 M2BKAO2 + NO = M2BKAO + NO2 : 	KRO2NO*0.805 	;
+{6118.} 	 M2BKAO2 + NO3 = M2BKAO + NO2 : 	KRO2NO3 	;
+{6119.} 	 M2BKAO2 = CO24M3C5 : 	2.50D-13*0.2*RO2 	;
+{6120.} 	 M2BKAO2 = M2BKAO : 	2.50D-13*0.6*RO2 	;
+{6121.} 	 M2BKAO2 = M2BKAOH : 	2.50D-13*0.2*RO2 	;
+{6122.} 	 M2BKBO2 + HO2 = M2BKBOOH : 	KRO2HO2*0.770 	;
+{6123.} 	 M2BKBO2 + NO = M2BKBO + NO2 : 	KRO2NO 	;
+{6124.} 	 M2BKBO2 + NO3 = M2BKBO + NO2 : 	KRO2NO3 	;
+{6125.} 	 M2BKBO2 = M2BKBO : 	9.20D-14*0.7*RO2 	;
+{6126.} 	 M2BKBO2 = M2BKBOH : 	9.20D-14*0.3*RO2 	;
+{6127.} 	 HM33C4O2 + HO2 = HM33C4OOH : 	KRO2HO2*0.770 	;
+{6128.} 	 HM33C4O2 + NO = HM33C4NO3 : 	KRO2NO*0.031 	;
+{6129.} 	 HM33C4O2 + NO = HM33C4O + NO2 : 	KRO2NO*0.969 	;
+{6130.} 	 HM33C4O2 + NO3 = HM33C4O + NO2 : 	KRO2NO3 	;
+{6131.} 	 HM33C4O2 = HM33C3CHO : 	1.30D-12*0.2*RO2 	;
+{6132.} 	 HM33C4O2 = HM33C4O : 	1.30D-12*0.6*RO2 	;
+{6133.} 	 HM33C4O2 = HM33C4OH : 	1.30D-12*0.2*RO2 	;
+{6134.} 	 M22C3CO3 + HO2 = M22C3CO3H : 	KAPHO2*0.56 	;
+{6135.} 	 M22C3CO3 + HO2 = NEOPO2 + OH : 	KAPHO2*0.44 	;
+{6136.} 	 M22C3CO3 + NO = NEOPO2 + NO2 : 	KAPNO 	;
+{6137.} 	 M22C3CO3 + NO2 = C6PAN17 : 	KFPAN 	;
+{6138.} 	 M22C3CO3 + NO3 = NEOPO2 + NO2 : 	KRO2NO3*1.74 	;
+{6139.} 	 M22C3CO3 = NEOPO2 : 	1.00D-11*RO2 	;
+{6140.} 	 HM22C4O2 + HO2 = HM22C4OOH : 	KRO2HO2*0.770 	;
+{6141.} 	 HM22C4O2 + NO = HM22C4NO3 : 	KRO2NO*0.031 	;
+{6142.} 	 HM22C4O2 + NO = HM22C4O + NO2 : 	KRO2NO*0.969 	;
+{6143.} 	 HM22C4O2 + NO3 = HM22C4O + NO2 : 	KRO2NO3 	;
+{6144.} 	 HM22C4O2 = HM22C3CHO : 	1.30D-12*0.2*RO2 	;
+{6145.} 	 HM22C4O2 = HM22C4O : 	1.30D-12*0.6*RO2 	;
+{6146.} 	 HM22C4O2 = HM33C4OH : 	1.30D-12*0.2*RO2 	;
+{6147.} 	 M33C3CO3 + HO2 = IPECO2 + OH : 	KAPHO2*0.44 	;
+{6148.} 	 M33C3CO3 + HO2 = M33C3CO2H + O3 : 	KAPHO2*0.15 	;
+{6149.} 	 M33C3CO3 + HO2 = M33C3CO3H : 	KAPHO2*0.41 	;
+{6150.} 	 M33C3CO3 + NO = IPECO2 + NO2 : 	KAPNO 	;
+{6151.} 	 M33C3CO3 + NO2 = C6PAN15 : 	KFPAN 	;
+{6152.} 	 M33C3CO3 + NO3 = IPECO2 + NO2 : 	KRO2NO3*1.74 	;
+{6153.} 	 M33C3CO3 = IPECO2 : 	1.00D-11*0.7*RO2 	;
+{6154.} 	 M33C3CO3 = M33C3CO2H : 	1.00D-11*0.3*RO2 	;
+{6155.} 	 HM23C4O2 + HO2 = HM23C4OOH : 	KRO2HO2*0.770 	;
+{6156.} 	 HM23C4O2 + NO = HM23C4NO3 : 	KRO2NO*0.031 	;
+{6157.} 	 HM23C4O2 + NO = HM23C4O + NO2 : 	KRO2NO*0.969 	;
+{6158.} 	 HM23C4O2 + NO3 = HM23C4O + NO2 : 	KRO2NO3 	;
+{6159.} 	 HM23C4O2 = HM23C4O : 	1.30D-12*0.6*RO2 	;
+{6160.} 	 HM23C4O2 = HM23C4OH : 	1.30D-12*0.2*RO2 	;
+{6161.} 	 HM23C4O2 = HM2C43CHO : 	1.30D-12*0.2*RO2 	;
+{6162.} 	 M2C43CO3 + HO2 = IPEBO2 + OH : 	KAPHO2*0.44 	;
+{6163.} 	 M2C43CO3 + HO2 = M2C43CO2H + O3 : 	KAPHO2*0.15 	;
+{6164.} 	 M2C43CO3 + HO2 = M2C43CO3H : 	KAPHO2*0.41 	;
+{6165.} 	 M2C43CO3 + NO = IPEBO2 + NO2 : 	KAPNO 	;
+{6166.} 	 M2C43CO3 + NO2 = C6PAN18 : 	KFPAN 	;
+{6167.} 	 M2C43CO3 + NO3 = IPEBO2 + NO2 : 	KRO2NO3*1.74 	;
+{6168.} 	 M2C43CO3 = IPEBO2 : 	1.00D-11*0.7*RO2 	;
+{6169.} 	 M2C43CO3 = M2C43CO2H : 	1.00D-11*0.3*RO2 	;
+{6170.} 	 HO3C76O2 + HO2 = HO3C76OOH : 	KRO2HO2*0.820 	;
+{6171.} 	 HO3C76O2 + NO = HO3C76NO3 : 	KRO2NO*0.111 	;
+{6172.} 	 HO3C76O2 + NO = HO3C76O + NO2 : 	KRO2NO*0.889 	;
+{6173.} 	 HO3C76O2 + NO3 = HO3C76O + NO2 : 	KRO2NO3 	;
+{6174.} 	 HO3C76O2 = HO25C7 : 	2.50D-13*0.2*RO2 	;
+{6175.} 	 HO3C76O2 = HO3C76O : 	2.50D-13*0.6*RO2 	;
+{6176.} 	 HO3C76O2 = HO3CO6C7 : 	2.50D-13*0.2*RO2 	;
+{6177.} 	 CO3C75O2 + HO2 = CO3C75OOH : 	KRO2HO2*0.820 	;
+{6178.} 	 CO3C75O2 + NO = CO3C75O + NO2 : 	KRO2NO 	;
+{6179.} 	 CO3C75O2 + NO3 = CO3C75O + NO2 : 	KRO2NO3 	;
+{6180.} 	 CO3C75O2 = CO3C75O : 	2.50D-13*RO2 	;
+{6181.} 	 H2M5C65O2 + HO2 = H2M5C65OOH : 	KRO2HO2*0.820 	;
+{6182.} 	 H2M5C65O2 + NO = H2M5C65NO3 : 	KRO2NO*0.033 	;
+{6183.} 	 H2M5C65O2 + NO = H2M5C65O + NO2 : 	KRO2NO*0.967 	;
+{6184.} 	 H2M5C65O2 + NO3 = H2M5C65O + NO2 : 	KRO2NO3 	;
+{6185.} 	 H2M5C65O2 = H25M2C6 : 	6.70D-15*0.3*RO2 	;
+{6186.} 	 H2M5C65O2 = H2M5C65O : 	6.70D-15*0.7*RO2 	;
+{6187.} 	 C75O2 + HO2 = C75OOH : 	KRO2HO2*0.820 	;
+{6188.} 	 C75O2 + NO = C75O + NO2 : 	KRO2NO 	;
+{6189.} 	 C75O2 + NO3 = C75O + NO2 : 	KRO2NO3 	;
+{6190.} 	 C75O2 = C75O : 	8.80D-13*RO2 	;
+{6191.} 	 H2M2C65O2 + HO2 = H2M2C65OOH : 	KRO2HO2*0.820 	;
+{6192.} 	 H2M2C65O2 + NO = H2M2C65NO3 : 	KRO2NO*0.111 	;
+{6193.} 	 H2M2C65O2 + NO = H2M2C65O + NO2 : 	KRO2NO*0.889 	;
+{6194.} 	 H2M2C65O2 + NO3 = H2M2C65O + NO2 : 	KRO2NO3 	;
+{6195.} 	 H2M2C65O2 = H25M2C6 : 	2.50D-13*0.2*RO2 	;
+{6196.} 	 H2M2C65O2 = H2M2C65O : 	2.50D-13*0.6*RO2 	;
+{6197.} 	 H2M2C65O2 = H2M2CO5C6 : 	2.50D-13*0.2*RO2 	;
+{6198.} 	 H2M4C65O2 + HO2 = H2M4C65OOH : 	KRO2HO2*0.820 	;
+{6199.} 	 H2M4C65O2 + NO = H2M4C65NO3 : 	KRO2NO*0.111 	;
+{6200.} 	 H2M4C65O2 + NO = H2M4C65O + NO2 : 	KRO2NO*0.889 	;
+{6201.} 	 H2M4C65O2 + NO3 = H2M4C65O + NO2 : 	KRO2NO3 	;
+{6202.} 	 H2M4C65O2 = H25M3C6 : 	2.50D-13*0.2*RO2 	;
+{6203.} 	 H2M4C65O2 = H2M4C65O : 	2.50D-13*0.6*RO2 	;
+{6204.} 	 H2M4C65O2 = H2M4CO5C6 : 	2.50D-13*0.2*RO2 	;
+{6205.} 	 C710O2 + HO2 = C710OOH : 	KRO2HO2*0.820 	;
+{6206.} 	 C710O2 + NO = C710O + NO2 : 	KRO2NO 	;
+{6207.} 	 C710O2 + NO3 = C710O + NO2 : 	KRO2NO3 	;
+{6208.} 	 C710O2 = C710O : 	6.70D-15*RO2 	;
+{6209.} 	 H3M3C6O2 + HO2 = H3M3C6OOH : 	KRO2HO2*0.820 	;
+{6210.} 	 H3M3C6O2 + NO = H3M3C6NO3 : 	KRO2NO*0.044 	;
+{6211.} 	 H3M3C6O2 + NO = H3M3C6O + NO2 : 	KRO2NO*0.956 	;
+{6212.} 	 H3M3C6O2 + NO3 = H3M3C6O + NO2 : 	KRO2NO3 	;
+{6213.} 	 H3M3C6O2 = H14M4C6 : 	1.30D-12*0.2*RO2 	;
+{6214.} 	 H3M3C6O2 = H3M3C5CHO : 	1.30D-12*0.2*RO2 	;
+{6215.} 	 H3M3C6O2 = H3M3C6O : 	1.30D-12*0.6*RO2 	;
+{6216.} 	 HO3C86O2 + HO2 = HO3C86OOH : 	KRO2HO2*0.859 	;
+{6217.} 	 HO3C86O2 + NO = HO3C86NO3 : 	KRO2NO*0.138 	;
+{6218.} 	 HO3C86O2 + NO = HO3C86O + NO2 : 	KRO2NO*0.862 	;
+{6219.} 	 HO3C86O2 + NO3 = HO3C86O + NO2 : 	KRO2NO3 	;
+{6220.} 	 HO3C86O2 = HO36C8 : 	2.50D-13*0.2*RO2 	;
+{6221.} 	 HO3C86O2 = HO3C86O : 	2.50D-13*0.6*RO2 	;
+{6222.} 	 HO3C86O2 = HO3CO6C8 : 	2.50D-13*0.2*RO2 	;
+{6223.} 	 CO3C85O2 + HO2 = CO3C85OOH : 	KRO2HO2*0.859 	;
+{6224.} 	 CO3C85O2 + NO = CO3C85O + NO2 : 	KRO2NO 	;
+{6225.} 	 CO3C85O2 + NO3 = CO3C85O + NO2 : 	KRO2NO3 	;
+{6226.} 	 CO3C85O2 = CO3C85O : 	2.50D-13*RO2 	;
+{6227.} 	 HO3C96O2 + HO2 = HO3C96OOH : 	KRO2HO2*0.890 	;
+{6228.} 	 HO3C96O2 + NO = HO3C96NO3 : 	KRO2NO*0.157 	;
+{6229.} 	 HO3C96O2 + NO = HO3C96O + NO2 : 	KRO2NO*0.843 	;
+{6230.} 	 HO3C96O2 + NO3 = HO3C96O + NO2 : 	KRO2NO3 	;
+{6231.} 	 HO3C96O2 = HO36C9 : 	2.50D-13*0.2*RO2 	;
+{6232.} 	 HO3C96O2 = HO3C96O : 	2.50D-13*0.6*RO2 	;
+{6233.} 	 HO3C96O2 = HO4CO7C9 : 	2.50D-13*0.2*RO2 	;
+{6234.} 	 C91O2 + HO2 = C91OOH : 	KRO2HO2*0.890 	;
+{6235.} 	 C91O2 + NO = C91O + NO2 : 	KRO2NO 	;
+{6236.} 	 C91O2 + NO3 = C91O + NO2 : 	KRO2NO3 	;
+{6237.} 	 C91O2 = C91O : 	2.50D-13*RO2 	;
+{6238.} 	 HO3C106O2 + HO2 = HO3C106OOH : 	KRO2HO2*0.914 	;
+{6239.} 	 HO3C106O2 + NO = HO3C106NO3 : 	KRO2NO*0.167 	;
+{6240.} 	 HO3C106O2 + NO = HO3C106O + NO2 : 	KRO2NO*0.833 	;
+{6241.} 	 HO3C106O2 + NO3 = HO3C106O + NO2 : 	KRO2NO3 	;
+{6242.} 	 HO3C106O2 = HO36C10 : 	2.50D-13*0.2*RO2 	;
+{6243.} 	 HO3C106O2 = HO3C106O : 	2.50D-13*0.6*RO2 	;
+{6244.} 	 HO3C106O2 = HO5CO8C10 : 	2.50D-13*0.2*RO2 	;
+{6245.} 	 C101O2 + HO2 = C101OOH : 	KRO2HO2*0.914 	;
+{6246.} 	 C101O2 + NO = C101O + NO2 : 	KRO2NO 	;
+{6247.} 	 C101O2 + NO3 = C101O + NO2 : 	KRO2NO3 	;
+{6248.} 	 C101O2 = C101O : 	2.50D-13*RO2 	;
+{6249.} 	 HO3C116O2 + HO2 = HO3C116OOH : 	KRO2HO2*0.932 	;
+{6250.} 	 HO3C116O2 + NO = HO3C116NO3 : 	KRO2NO*0.172 	;
+{6251.} 	 HO3C116O2 + NO = HO3C116O + NO2 : 	KRO2NO*0.828 	;
+{6252.} 	 HO3C116O2 + NO3 = HO3C116O + NO2 : 	KRO2NO3 	;
+{6253.} 	 HO3C116O2 = HO36C11 : 	2.50D-13*0.2*RO2 	;
+{6254.} 	 HO3C116O2 = HO3C116O : 	2.50D-13*0.6*RO2 	;
+{6255.} 	 HO3C116O2 = HO6CO9C11 : 	2.50D-13*0.2*RO2 	;
+{6256.} 	 C111O2 + HO2 = C111OOH : 	KRO2HO2*0.932 	;
+{6257.} 	 C111O2 + NO = C111O + NO2 : 	KRO2NO 	;
+{6258.} 	 C111O2 + NO3 = C111O + NO2 : 	KRO2NO3 	;
+{6259.} 	 C111O2 = C111O : 	2.50D-13*RO2 	;
+{6260.} 	 HO3C126O2 + HO2 = HO3C126OOH : 	KRO2HO2*0.947 	;
+{6261.} 	 HO3C126O2 + NO = HO3C126NO3 : 	KRO2NO*0.176 	;
+{6262.} 	 HO3C126O2 + NO = HO3C126O + NO2 : 	KRO2NO*0.824 	;
+{6263.} 	 HO3C126O2 + NO3 = HO3C126O + NO2 : 	KRO2NO3 	;
+{6264.} 	 HO3C126O2 = HO36C12 : 	2.50D-13*0.2*RO2 	;
+{6265.} 	 HO3C126O2 = HO3C126O : 	2.50D-13*0.6*RO2 	;
+{6266.} 	 HO3C126O2 = HO7CO10C12 : 	2.50D-13*0.2*RO2 	;
+{6267.} 	 C121O2 + HO2 = C121OOH : 	KRO2HO2*0.947 	;
+{6268.} 	 C121O2 + NO = C121O + NO2 : 	KRO2NO 	;
+{6269.} 	 C121O2 + NO3 = C121O + NO2 : 	KRO2NO3 	;
+{6270.} 	 C121O2 = C121O : 	2.50D-13*RO2 	;
+{6271.} 	 CO1C6O2 + HO2 = CO1C6OOH : 	KRO2HO2*0.770 	;
+{6272.} 	 CO1C6O2 + NO = CO1C6NO3 : 	KRO2NO*0.078 	;
+{6273.} 	 CO1C6O2 + NO = CO1C6O + NO2 : 	KRO2NO*0.922 	;
+{6274.} 	 CO1C6O2 + NO3 = CO1C6O + NO2 : 	KRO2NO3 	;
+{6275.} 	 CO1C6O2 = C6DIAL : 	1.30D-12*RO2*0.2 	;
+{6276.} 	 CO1C6O2 = CO1C6O : 	1.30D-12*RO2*0.6 	;
+{6277.} 	 CO1C6O2 = CO1C6OH : 	1.30D-12*RO2*0.2 	;
+{6278.} 	 NO3CH2CO3 + HO2 = HCHO + NO2 + OH : 	KAPHO2*0.44 	;
+{6279.} 	 NO3CH2CO3 + HO2 = NO3CH2CO2H + O3 : 	KAPHO2*0.15 	;
+{6280.} 	 NO3CH2CO3 + HO2 = NO3CH2CO3H : 	KAPHO2*0.41 	;
+{6281.} 	 NO3CH2CO3 + NO = HCHO + NO2 + NO2 : 	KAPNO 	;
+{6282.} 	 NO3CH2CO3 + NO2 = NO3CH2PAN : 	KFPAN 	;
+{6283.} 	 NO3CH2CO3 + NO3 = HCHO + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{6284.} 	 NO3CH2CO3 = HCHO + NO2 : 	1.00D-11*0.7*RO2 	;
+{6285.} 	 NO3CH2CO3 = NO3CH2CO2H : 	1.00D-11*0.3*RO2 	;
+{6286.} 	 PRNO3CO3 + HO2 = CH3CHO + NO2 + OH : 	KAPHO2*0.44 	;
+{6287.} 	 PRNO3CO3 + HO2 = PRNO3CO2H + O3 : 	KAPHO2*0.15 	;
+{6288.} 	 PRNO3CO3 + HO2 = PRNO3CO3H : 	KAPHO2*0.41 	;
+{6289.} 	 PRNO3CO3 + NO = CH3CHO + NO2 + NO2 : 	KAPNO 	;
+{6290.} 	 PRNO3CO3 + NO2 = PRNO3PAN : 	KFPAN 	;
+{6291.} 	 PRNO3CO3 + NO3 = CH3CHO + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{6292.} 	 PRNO3CO3 = CH3CHO + NO2 : 	1.00D-11*0.7*RO2 	;
+{6293.} 	 PRNO3CO3 = PRNO3CO2H : 	1.00D-11*0.3*RO2 	;
+{6294.} 	 PROPALO = CH3CHO + HO2 + CO : 	KDEC 	;
+{6295.} 	 CO3C4NO3O2 + HO2 = COC4NO3OOH : 	KRO2HO2*0.625 	;
+{6296.} 	 CO3C4NO3O2 + NO = CO3C4NO3O + NO2 : 	KRO2NO 	;
+{6297.} 	 CO3C4NO3O2 + NO3 = CO3C4NO3O + NO2 : 	KRO2NO3 	;
+{6298.} 	 CO3C4NO3O2 = CO23C4NO3 : 	2.50D-13*0.2*RO2 	;
+{6299.} 	 CO3C4NO3O2 = CO3C4NO3O : 	2.50D-13*0.6*RO2 	;
+{6300.} 	 CO3C4NO3O2 = CO3C4NO3OH : 	2.50D-13*0.2*RO2 	;
+{6301.} 	 BUTAL2O = C2H5CHO + HO2 + CO : 	KDEC 	;
+{6302.} 	 HO3C3CO3 + HO2 = C2H5CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{6303.} 	 HO3C3CO3 + HO2 = HO3C3CO3H : 	KAPHO2*0.56 	;
+{6304.} 	 HO3C3CO3 + NO = C2H5CHO + HO2 + NO2 : 	KAPNO 	;
+{6305.} 	 HO3C3CO3 + NO2 = HO3C3PAN : 	KFPAN 	;
+{6306.} 	 HO3C3CO3 + NO3 = C2H5CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{6307.} 	 HO3C3CO3 = C2H5CHO + HO2 : 	1.00D-11*RO2 	;
+{6308.} 	 MPRBNO3CO3 + HO2 = CH3COCH3 + NO2 + OH : 	KAPHO2*0.44 	;
+{6309.} 	 MPRBNO3CO3 + HO2 = MPRNO3CO2H + O3 : 	KAPHO2*0.15 	;
+{6310.} 	 MPRBNO3CO3 + HO2 = MPRNO3CO3H : 	KAPHO2*0.41 	;
+{6311.} 	 MPRBNO3CO3 + NO = CH3COCH3 + NO2 + NO2 : 	KAPNO 	;
+{6312.} 	 MPRBNO3CO3 + NO2 = MPRBNO3PAN : 	KFPAN 	;
+{6313.} 	 MPRBNO3CO3 + NO3 = CH3COCH3 + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{6314.} 	 MPRBNO3CO3 = CH3COCH3 + NO2 : 	1.00D-11*0.7*RO2 	;
+{6315.} 	 MPRBNO3CO3 = MPRNO3CO2H : 	1.00D-11*0.3*RO2 	;
+{6316.} 	 C5NO3COAO2 + HO2 = C5NO3OAOOH : 	KRO2HO2*0.706 	;
+{6317.} 	 C5NO3COAO2 + NO = C5NO3COAO + NO2 : 	KRO2NO 	;
+{6318.} 	 C5NO3COAO2 + NO3 = C5NO3COAO + NO2 : 	KRO2NO3 	;
+{6319.} 	 C5NO3COAO2 = C51NO324CO : 	8.80D-13*0.2*RO2 	;
+{6320.} 	 C5NO3COAO2 = C5NO3CO4OH : 	8.80D-13*0.2*RO2 	;
+{6321.} 	 C5NO3COAO2 = C5NO3COAO : 	8.80D-13*0.6*RO2 	;
+{6322.} 	 PEN2ONE1O = C3H7CO3 + HCHO : 	KDEC 	;
+{6323.} 	 C4NO3CO3 + HO2 = C3H7CHO + NO2 + OH : 	KAPHO2*0.44 	;
+{6324.} 	 C4NO3CO3 + HO2 = C4NO3CO2H + O3 : 	KAPHO2*0.15 	;
+{6325.} 	 C4NO3CO3 + HO2 = C4NO3CO3H : 	KAPHO2*0.41 	;
+{6326.} 	 C4NO3CO3 + NO = C3H7CHO + NO2 + NO2 : 	KAPNO 	;
+{6327.} 	 C4NO3CO3 + NO2 = C4NO3PAN : 	KFPAN 	;
+{6328.} 	 C4NO3CO3 + NO3 = C3H7CHO + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{6329.} 	 C4NO3CO3 = C3H7CHO + NO2 : 	1.00D-11*0.7*RO2 	;
+{6330.} 	 C4NO3CO3 = C4NO3CO2H : 	1.00D-11*0.3*RO2 	;
+{6331.} 	 C4CHO2O = C3H7CHO + HO2 + CO : 	KDEC 	;
+{6332.} 	 C5OH2CO4O2 + HO2 = C5OHCO4OOH : 	KRO2HO2*0.706 	;
+{6333.} 	 C5OH2CO4O2 + NO = C5OH2CO4O + NO2 : 	KRO2NO 	;
+{6334.} 	 C5OH2CO4O2 + NO3 = C5OH2CO4O + NO2 : 	KRO2NO3 	;
+{6335.} 	 C5OH2CO4O2 = C5OH2CO4O : 	8.80D-13*RO2 	;
+{6336.} 	 C4OHCO3 + HO2 = C3H7CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{6337.} 	 C4OHCO3 + HO2 = C4OHCO3H : 	KAPHO2*0.56 	;
+{6338.} 	 C4OHCO3 + NO = C3H7CHO + HO2 + NO2 : 	KAPNO 	;
+{6339.} 	 C4OHCO3 + NO2 = C4OHPAN : 	KFPAN 	;
+{6340.} 	 C4OHCO3 + NO3 = C3H7CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{6341.} 	 C4OHCO3 = C3H7CHO + HO2 : 	1.00D-11*RO2 	;
+{6342.} 	 C5NO3CO4O2 + HO2 = C5NO3O4OOH : 	KRO2HO2*0.706 	;
+{6343.} 	 C5NO3CO4O2 + NO = C5NO3CO4O + NO2 : 	KRO2NO 	;
+{6344.} 	 C5NO3CO4O2 + NO3 = C5NO3CO4O + NO2 : 	KRO2NO3 	;
+{6345.} 	 C5NO3CO4O2 = C5NO3CO4O : 	8.80D-13*RO2 	;
+{6346.} 	 C5CONO34O2 + HO2 = C5ONO34OOH : 	KRO2HO2*0.706 	;
+{6347.} 	 C5CONO34O2 + NO = C5CONO34O + NO2 : 	KRO2NO 	;
+{6348.} 	 C5CONO34O2 + NO3 = C5CONO34O + NO2 : 	KRO2NO3 	;
+{6349.} 	 C5CONO34O2 = C5CONO34O : 	8.80D-13*RO2 	;
+{6350.} 	 C43NO3CO3 + HO2 = C43NO3CO2H + O3 : 	KAPHO2*0.15 	;
+{6351.} 	 C43NO3CO3 + HO2 = C43NO3CO3H : 	KAPHO2*0.41 	;
+{6352.} 	 C43NO3CO3 + HO2 = MEK + NO2 + OH : 	KAPHO2*0.44 	;
+{6353.} 	 C43NO3CO3 + NO = MEK + NO2 + NO2 : 	KAPNO 	;
+{6354.} 	 C43NO3CO3 + NO2 = C43NO3PAN : 	KFPAN 	;
+{6355.} 	 C43NO3CO3 + NO3 = MEK + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{6356.} 	 C43NO3CO3 = C43NO3CO2H : 	1.00D-11*0.3*RO2 	;
+{6357.} 	 C43NO3CO3 = MEK + NO2 : 	1.00D-11*0.7*RO2 	;
+{6358.} 	 C42CHO2O = MEK + HO2 + CO : 	KDEC 	;
+{6359.} 	 C4MCONO3O2 + HO2 = C5CONO3OOH : 	KRO2HO2*0.706 	;
+{6360.} 	 C4MCONO3O2 + NO = C4MCONO3O + NO2 : 	KRO2NO 	;
+{6361.} 	 C4MCONO3O2 + NO3 = C4MCONO3O + NO2 : 	KRO2NO3 	;
+{6362.} 	 C4MCONO3O2 = C4MCONO3O : 	9.20D-14*0.7*RO2 	;
+{6363.} 	 C4MCONO3O2 = C4MCONO3OH : 	9.20D-14*0.3*RO2 	;
+{6364.} 	 IPRCOMO = HCHO + IPRCO3 : 	KDEC 	;
+{6365.} 	 C3MNO3CO3 + HO2 = C3MNO3CO2H + O3 : 	KAPHO2*0.15 	;
+{6366.} 	 C3MNO3CO3 + HO2 = C3MNO3CO3H : 	KAPHO2*0.41 	;
+{6367.} 	 C3MNO3CO3 + HO2 = IPRCHO + NO2 + OH : 	KAPHO2*0.44 	;
+{6368.} 	 C3MNO3CO3 + NO = IPRCHO + NO2 + NO2 : 	KAPNO 	;
+{6369.} 	 C3MNO3CO3 + NO2 = C3MNO3PAN : 	KFPAN 	;
+{6370.} 	 C3MNO3CO3 + NO3 = IPRCHO + NO2 : 	KRO2NO3*1.74 	;
+{6371.} 	 C3MNO3CO3 = C3MNO3CO2H : 	1.00D-11*0.3*RO2 	;
+{6372.} 	 C3MNO3CO3 = IPRCHO + NO2 : 	1.00D-11*0.7*RO2 	;
+{6373.} 	 M3BUTAL2O = IPRCHO + HO2 + CO : 	KDEC 	;
+{6374.} 	 C3M3OH2CO3 + HO2 = C3M3OHCO3H : 	KAPHO2*0.56 	;
+{6375.} 	 C3M3OH2CO3 + HO2 = IPRCHO + HO2 + OH : 	KAPHO2*0.44 	;
+{6376.} 	 C3M3OH2CO3 + NO = IPRCHO + HO2 + NO2 : 	KAPNO 	;
+{6377.} 	 C3M3OH2CO3 + NO2 = C3M3OH2PAN : 	KFPAN 	;
+{6378.} 	 C3M3OH2CO3 + NO3 = IPRCHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{6379.} 	 C3M3OH2CO3 = IPRCHO + HO2 : 	1.00D-11*RO2 	;
+{6380.} 	 MC4CONO3O2 + HO2 = C4MCNO3OOH : 	KRO2HO2*0.706 	;
+{6381.} 	 MC4CONO3O2 + NO = MC4CONO3O + NO2 : 	KRO2NO 	;
+{6382.} 	 MC4CONO3O2 + NO3 = MC4CONO3O + NO2 : 	KRO2NO3 	;
+{6383.} 	 MC4CONO3O2 = MC4CONO3O : 	2.00D-12*RO2 	;
+{6384.} 	 C65NO36CO3 + HO2 = C4H9CHO + NO2 + OH : 	KAPHO2*0.44 	;
+{6385.} 	 C65NO36CO3 + HO2 = C65NO3CO2H + O3 : 	KAPHO2*0.15 	;
+{6386.} 	 C65NO36CO3 + HO2 = C65NO3CO3H : 	KAPHO2*0.41 	;
+{6387.} 	 C65NO36CO3 + NO = C4H9CHO + NO2 + NO2 : 	KAPNO 	;
+{6388.} 	 C65NO36CO3 + NO2 = C65NO3PAN : 	KFPAN 	;
+{6389.} 	 C65NO36CO3 + NO3 = C4H9CHO + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{6390.} 	 C65NO36CO3 = C4H9CHO + NO2 : 	1.00D-11*0.7*RO2 	;
+{6391.} 	 C65NO36CO3 = C65NO3CO2H : 	1.00D-11*0.3*RO2 	;
+{6392.} 	 MNO3COC4O2 + HO2 = C6NO3COOOH : 	KRO2HO2*0.770 	;
+{6393.} 	 MNO3COC4O2 + NO = MNO3COC4O + NO2 : 	KRO2NO 	;
+{6394.} 	 MNO3COC4O2 + NO3 = MNO3COC4O + NO2 : 	KRO2NO3 	;
+{6395.} 	 MNO3COC4O2 = C6NO324CO : 	2.50D-13*0.2*RO2 	;
+{6396.} 	 MNO3COC4O2 = C6NO3CO4OH : 	2.50D-13*0.2*RO2 	;
+{6397.} 	 MNO3COC4O2 = MNO3COC4O : 	2.50D-13*0.6*RO2 	;
+{6398.} 	 C4COMOH3O2 + HO2 = C4COMOHOOH : 	KRO2HO2*0.770 	;
+{6399.} 	 C4COMOH3O2 + NO = C4COMOH3O + NO2 : 	KRO2NO 	;
+{6400.} 	 C4COMOH3O2 + NO3 = C4COMOH3O + NO2 : 	KRO2NO3 	;
+{6401.} 	 C4COMOH3O2 = C4COMOH3O : 	2.50D-13*0.6*RO2 	;
+{6402.} 	 C4COMOH3O2 = C4COMOH3OH : 	2.50D-13*0.2*RO2 	;
+{6403.} 	 C4COMOH3O2 = HO1CO24C6 : 	2.50D-13*0.2*RO2 	;
+{6404.} 	 HO5C5CO3 + HO2 = C4H9CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{6405.} 	 HO5C5CO3 + HO2 = HO5C5CO3H : 	KAPHO2*0.56 	;
+{6406.} 	 HO5C5CO3 + NO = C4H9CHO + HO2 + NO2 : 	KAPNO 	;
+{6407.} 	 HO5C5CO3 + NO2 = C6PAN23 : 	KFPAN 	;
+{6408.} 	 HO5C5CO3 + NO3 = C4H9CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{6409.} 	 HO5C5CO3 = C4H9CHO + HO2 : 	1.00D-11*RO2 	;
+{6410.} 	 C6NO3CO5O2 + HO2 = C6CONO3OOH : 	KRO2HO2*0.770 	;
+{6411.} 	 C6NO3CO5O2 + NO = C6NO3CO5O + NO2 : 	KRO2NO 	;
+{6412.} 	 C6NO3CO5O2 + NO3 = C6NO3CO5O + NO2 : 	KRO2NO3 	;
+{6413.} 	 C6NO3CO5O2 = C62NO335CO : 	2.50D-13*0.2*RO2 	;
+{6414.} 	 C6NO3CO5O2 = C6NO3CO5O : 	2.50D-13*0.6*RO2 	;
+{6415.} 	 C6NO3CO5O2 = C6NO3CO5OH : 	2.50D-13*0.2*RO2 	;
+{6416.} 	 C6CONO34O2 + HO2 = CONO3C6OOH : 	KRO2HO2*0.770 	;
+{6417.} 	 C6CONO34O2 + NO = C6CONO34O + NO2 : 	KRO2NO 	;
+{6418.} 	 C6CONO34O2 + NO3 = C6CONO34O + NO2 : 	KRO2NO3 	;
+{6419.} 	 C6CONO34O2 = C64NO335CO : 	8.80D-13*0.2*RO2 	;
+{6420.} 	 C6CONO34O2 = C6CONO34O : 	8.80D-13*0.6*RO2 	;
+{6421.} 	 C6CONO34O2 = C6CONO34OH : 	8.80D-13*0.2*RO2 	;
+{6422.} 	 BZFUONE + NO3 = NBZFUO2 : 	3.00D-13 	;
+{6423.} 	 BZFUONE + O3 = BZFUONOOA : 	2.20D-19 	;
+{6424.} 	 BZFUONE + OH = BZFUO2 : 	4.45D-11 	;
+{6425.} 	 MALDIALCO3 + HO2 = MALDALCO2H + O3 : 	KAPHO2*0.15 	;
+{6426.} 	 MALDIALCO3 + HO2 = MALDALCO3H : 	KAPHO2*0.41 	;
+{6427.} 	 MALDIALCO3 + HO2 = MALDIALCO2 + OH : 	KAPHO2*0.44 	;
+{6428.} 	 MALDIALCO3 + NO = MALDIALCO2 + NO2 : 	KAPNO 	;
+{6429.} 	 MALDIALCO3 + NO2 = MALDIALPAN : 	KFPAN 	;
+{6430.} 	 MALDIALCO3 + NO3 = MALDIALCO2 + NO2 : 	KRO2NO3*1.74 	;
+{6431.} 	 MALDIALCO3 = MALDALCO2H : 	1.00D-11*0.30*RO2 	;
+{6432.} 	 MALDIALCO3 = MALDIALCO2 : 	1.00D-11*0.70*RO2 	;
+{6433.} 	 BZEMUCCO2H + OH = C5DIALO2 : 	4.06D-11 	;
+{6434.} 	 BZEMUCCO2H = C5DIALO2 + HO2 : 	J(18)+J(19) 	;
+{6435.} 	 BZEMUCCO3H + OH = BZEMUCCO3 : 	4.37D-11 	;
+{6436.} 	 BZEMUCCO3H = C5DIALO2 + OH : 	J(41)+J(18)+J(19) 	;
+{6437.} 	 BZEMUCPAN + OH = MALDIAL + CO + NO2 : 	4.05D-11 	;
+{6438.} 	 BZEMUCPAN = BZEMUCCO3 + NO2 : 	KBPAN 	;
+{6439.} 	 EPXDLCO3 + HO2 = C3DIALO2 + OH : 	KAPHO2*0.44 	;
+{6440.} 	 EPXDLCO3 + HO2 = EPXDLCO2H + O3 : 	KAPHO2*0.15 	;
+{6441.} 	 EPXDLCO3 + HO2 = EPXDLCO3H : 	KAPHO2*0.41 	;
+{6442.} 	 EPXDLCO3 + NO = C3DIALO2 + NO2 : 	KAPNO 	;
+{6443.} 	 EPXDLCO3 + NO2 = EPXDLPAN : 	KFPAN 	;
+{6444.} 	 EPXDLCO3 + NO3 = C3DIALO2 + NO2 : 	KRO2NO3*1.74 	;
+{6445.} 	 EPXDLCO3 = C3DIALO2 : 	1.00D-11*RO2*0.7 	;
+{6446.} 	 EPXDLCO3 = EPXDLCO2H : 	1.00D-11*RO2*0.3 	;
+{6447.} 	 C3DIALO2 + HO2 = C3DIALOOH : 	KRO2HO2*0.520 	;
+{6448.} 	 C3DIALO2 + NO = C3DIALO + NO2 : 	KRO2NO 	;
+{6449.} 	 C3DIALO2 + NO3 = C3DIALO + NO2 : 	KRO2NO3 	;
+{6450.} 	 C3DIALO2 = C32OH13CO : 	8.80D-13*RO2*0.2 	;
+{6451.} 	 C3DIALO2 = C33CO : 	8.80D-13*RO2*0.2 	;
+{6452.} 	 C3DIALO2 = C3DIALO : 	8.80D-13*RO2*0.6 	;
+{6453.} 	 BZEMUCOOH + OH = BZEMUCCO + OH : 	1.31D-10 	;
+{6454.} 	 BZEMUCOOH = BZEMUCO + OH : 	J(41)+J(15)*2 	;
+{6455.} 	 BZEMUCNO3 + OH = BZEMUCCO + NO2 : 	4.38D-11 	;
+{6456.} 	 BZEMUCNO3 = EPXC4DIAL + NO2 + GLYOX + HO2 : 	J(17) 	;
+{6457.} 	 BZEMUCO = C3DIALO2 + C32OH13CO : 	KDEC*0.5 	;
+{6458.} 	 BZEMUCO = EPXC4DIAL + GLYOX + HO2 : 	KDEC*0.5 	;
+{6459.} 	 BZEMUCCO + OH = EPXDLCO3 + GLYOX : 	9.20D-11 	;
+{6460.} 	 BZEMUCCO = HCOCOHCO3 + C3DIALO2 : 	J(15)*2+J(22) 	;
+{6461.} 	 BZEMUCOH + OH = BZEMUCCO + HO2 : 	8.23D-11 	;
+{6462.} 	 BZEMUCOH = BZEMUCO + HO2 : 	J(15)*2 	;
+{6463.} 	 C5DIALOOH + OH = C5DIALCO + OH : 	7.52D-11 	;
+{6464.} 	 C5DIALOOH = C5DIALO + OH : 	J(41) 	;
+{6465.} 	 C5DIALOOH = MALDIAL + CO + HO2 + OH : 	J(18)+J(19) 	;
+{6466.} 	 C5DIALO = MALDIAL + CO + HO2 : 	KDEC 	;
+{6467.} 	 C5DIALCO + OH = MALDIALCO3 + CO : 	4.90D-11 	;
+{6468.} 	 C5DIALCO = MALDIALCO3 + CO + HO2 : 	J(34)+J(18)+J(19) 	;
+{6469.} 	 C5DIALOH + OH = C5DIALCO + HO2 : 	7.75D-11 	;
+{6470.} 	 C5DIALOH = MALDIAL + CO + HO2 + HO2 : 	J(18)+J(19) 	;
+{6471.} 	 MALDIALO2 + HO2 = MALDIALOOH : 	KRO2HO2*0.625 	;
+{6472.} 	 MALDIALO2 + NO = MALDIALO + NO2 : 	KRO2NO 	;
+{6473.} 	 MALDIALO2 + NO3 = MALDIALO + NO2 : 	KRO2NO3 	;
+{6474.} 	 MALDIALO2 = HOCOC4DIAL : 	8.80D-13*0.20*RO2 	;
+{6475.} 	 MALDIALO2 = HOHOC4DIAL : 	8.80D-13*0.20*RO2 	;
+{6476.} 	 MALDIALO2 = MALDIALO : 	8.80D-13*0.60*RO2 	;
+{6477.} 	 HOC6H4NO2 + NO3 = NPHEN1O + HNO3 : 	9.00D-14 	;
+{6478.} 	 HOC6H4NO2 + OH = NPHEN1O : 	9.00D-13 	;
+{6479.} 	 NPHENOOH + OH = NPHENO2 : 	1.07D-10 	;
+{6480.} 	 NPHENOOH = MALDALCO2H + GLYOX + OH + NO2 : 	J(54) 	;
+{6481.} 	 NPHENOOH = NPHENO + OH : 	J(41) 	;
+{6482.} 	 NPHENO = MALDALCO2H + GLYOX + NO2 : 	KDEC 	;
+{6483.} 	 NPHENOH + OH = NPHENO : 	1.04D-10 	;
+{6484.} 	 NPHENOH = MALDALCO2H + GLYOX + HO2 + NO2 : 	J(54) 	;
+{6485.} 	 CATEC1O + NO2 = NCATECHOL : 	2.08D-12 	;
+{6486.} 	 CATEC1O + O3 = CATEC1O2 : 	2.86D-13 	;
+{6487.} 	 CATECOOA = MALDALCO2H + HCOCO2H + HO2 + OH : 	KDEC 	;
+{6488.} 	 PHENOOH + OH = PHENO2 : 	1.16D-10 	;
+{6489.} 	 PHENOOH = PHENO + OH : 	J(41) 	;
+{6490.} 	 PHENO = MALDALCO2H + GLYOX + HO2 : 	KDEC*0.71 	;
+{6491.} 	 PHENO = PBZQONE + HO2 : 	KDEC*0.29 	;
+{6492.} 	 PHENOH + OH = PHENO : 	1.13D-10 	;
+{6493.} 	 CRESOOH + OH = CRESO2 : 	1.15D-10 	;
+{6494.} 	 CRESOOH = CRESO + OH : 	J(41) 	;
+{6495.} 	 CRESO = C5CO14OH + GLYOX + HO2 : 	KDEC*0.68 	;
+{6496.} 	 CRESO = PTLQONE + HO2 : 	KDEC*0.32 	;
+{6497.} 	 CRESOH + OH = CRESO : 	1.11D-10 	;
+{6498.} 	 NCRESOOH + OH = NCRESO2 : 	1.07D-10 	;
+{6499.} 	 NCRESOOH = CRESO + OH + NO2 : 	J(54) 	;
+{6500.} 	 NCRESOOH = NCRESO + OH : 	J(41) 	;
+{6501.} 	 NCRESO = C5CO14OH + GLYOX + NO2 : 	KDEC 	;
+{6502.} 	 NCRESOH + OH = NCRESO : 	1.04D-10 	;
+{6503.} 	 NCRESOH = CRESO + HO2 + NO2 : 	J(54) 	;
+{6504.} 	 TOL1OHNO2 + NO3 = NCRES1O + HNO3 : 	3.13D-13*1.0 	;
+{6505.} 	 TOL1OHNO2 + OH = NCRES1O : 	2.8D-12 	;
+{6506.} 	 OXYL1O2 + HO2 = OXYL1OOH : 	KRO2HO2*0.820 	;
+{6507.} 	 OXYL1O2 + NO = TOL1O + NO2 : 	KRO2NO 	;
+{6508.} 	 OXYL1O2 + NO3 = TOL1O + NO2 : 	KRO2NO3 	;
+{6509.} 	 OXYL1O2 = TOL1O : 	2.50D-13*RO2 	;
+{6510.} 	 MCATEC1O + NO2 = MNCATECH : 	2.08D-12 	;
+{6511.} 	 MCATEC1O + O3 = MCATEC1O2 : 	2.86D-13 	;
+{6512.} 	 MCATECOOA = MC3ODBCO2H + HCOCO2H + HO2 + OH : 	KDEC*1.0 	;
+{6513.} 	 C4MDIAL + NO3 = C3MCODBCO3 + HNO3 : 	KNO3AL*4.25 	;
+{6514.} 	 C4MDIAL + NO3 = MC3CODBCO3 + HNO3 : 	KNO3AL*4.25 	;
+{6515.} 	 C4MDIAL + O3 = MGLYOOA + GLYOX : 	5.00D-18*0.50 	;
+{6516.} 	 C4MDIAL + O3 = MGLYOX + GLYOOC : 	5.00D-18*0.50 	;
+{6517.} 	 C4MDIAL + OH = C3MCODBCO3 : 	4.41D-11*0.385 	;
+{6518.} 	 C4MDIAL + OH = C4M2ALOHO2 : 	4.41D-11*0.23 	;
+{6519.} 	 C4MDIAL + OH = MC3CODBCO3 : 	4.41D-11*0.385 	;
+{6520.} 	 C4MDIAL = C3MCODBCO3 + HO2 + CO : 	J(4)*0.2*0.3 	;
+{6521.} 	 C4MDIAL = MC3CODBCO3 + HO2 + CO : 	J(4)*0.2*0.3 	;
+{6522.} 	 C4MDIAL = PXYFUONE : 	J(4)*0.2*0.4 	;
+{6523.} 	 C5DICARB + NO3 = C5CO14O2 + HNO3 : 	KNO3AL*2.75 	;
+{6524.} 	 C5DICARB + O3 = GLYOX + MGLOOB : 	2.00D-18*0.5 	;
+{6525.} 	 C5DICARB + O3 = MGLYOX + GLYOOA : 	2.00D-18*0.5 	;
+{6526.} 	 C5DICARB + OH = C5CO14O2 : 	6.2D-11*0.48 	;
+{6527.} 	 C5DICARB + OH = C5DICARBO2 : 	6.2D-11*0.52 	;
+{6528.} 	 C5DICARB = C5CO14O2 + HO2 : 	J(4)*0.2*0.6 	;
+{6529.} 	 C5DICARB = TLFUONE : 	J(4)*0.2*0.4 	;
+{6530.} 	 TLFUONE + NO3 = NTLFUO2 : 	1.00D-12 	;
+{6531.} 	 TLFUONE + O3 = TLFUONOOA : 	8.00D-19 	;
+{6532.} 	 TLFUONE + OH = TLFUO2 : 	6.90D-11 	;
+{6533.} 	 C5CO14O2 + HO2 = C5CO14CO2 + OH : 	KAPHO2*0.44 	;
+{6534.} 	 C5CO14O2 + HO2 = C5CO14OH + O3 : 	KAPHO2*0.15 	;
+{6535.} 	 C5CO14O2 + HO2 = C5CO14OOH : 	KAPHO2*0.41 	;
+{6536.} 	 C5CO14O2 + NO = C5CO14CO2 + NO2 : 	KAPNO 	;
+{6537.} 	 C5CO14O2 + NO2 = C5COO2NO2 : 	KFPAN 	;
+{6538.} 	 C5CO14O2 + NO3 = C5CO14CO2 + NO2 : 	KRO2NO3*1.74 	;
+{6539.} 	 C5CO14O2 = C5CO14CO2 : 	1.00D-11*0.70*RO2 	;
+{6540.} 	 C5CO14O2 = C5CO14OH : 	1.00D-11*0.30*RO2 	;
+{6541.} 	 TLEMUCCO2H + OH = C615CO2O2 : 	5.98D-11 	;
+{6542.} 	 TLEMUCCO2H = C615CO2O2 + HO2 : 	J(18)+J(19) 	;
+{6543.} 	 TLEMUCCO3H + OH = TLEMUCCO3 : 	6.29D-11 	;
+{6544.} 	 TLEMUCCO3H = C615CO2O2 + OH : 	J(41)+J(18)+J(19) 	;
+{6545.} 	 TLEMUCPAN + OH = C5DICARB + CO + NO2 : 	5.96D-11 	;
+{6546.} 	 TLEMUCPAN = TLEMUCCO3 + NO2 : 	KBPAN 	;
+{6547.} 	 MGLOO + CO = MGLYOX : 	1.2D-15 	;
+{6548.} 	 MGLOO + NO = MGLYOX + NO2 : 	1.0D-14 	;
+{6549.} 	 MGLOO + NO2 = MGLYOX + NO3 : 	1.0D-15 	;
+{6550.} 	 MGLOO + SO2 = MGLYOX + SO3 : 	7.0D-14 	;
+{6551.} 	 MGLOO = CH3COCO2H : 	1.0D-17*H2O 	;
+{6552.} 	 MGLOO = MGLYOX + H2O2 : 	6.0D-18*H2O 	;
+{6553.} 	 TLEMUCOOH + OH = TLEMUCCO + OH : 	7.04D-11 	;
+{6554.} 	 TLEMUCOOH = TLEMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{6555.} 	 TLEMUCNO3 + OH = TLEMUCCO + NO2 : 	3.06D-11 	;
+{6556.} 	 TLEMUCNO3 = EPXC4DIAL + NO2 + CH3CO3 + CO + HO2 : 	J(17)+J(22) 	;
+{6557.} 	 TLEMUCO = C3DIALO2 + CO2H3CHO : 	KDEC*0.50 	;
+{6558.} 	 TLEMUCO = EPXC4DIAL + MGLYOX + HO2 : 	KDEC*0.50 	;
+{6559.} 	 TLEMUCCO + OH = CH3CO3 + EPXC4DIAL + CO : 	4.06D-11 	;
+{6560.} 	 TLEMUCCO = CH3CO3 + EPXC4DIAL + CO + HO2 : 	J(17)+J(35) 	;
+{6561.} 	 TLEMUCOH + OH = TLEMUCCO + HO2 : 	6.17D-11 	;
+{6562.} 	 TLEMUCOH = TLEMUCO + HO2 : 	J(17)+J(22) 	;
+{6563.} 	 C615CO2OOH + OH = C6125CO + OH : 	9.42D-11 	;
+{6564.} 	 C615CO2OOH = C5DICARB + CO + HO2 + OH : 	J(23)+J(24) 	;
+{6565.} 	 C615CO2OOH = C615CO2O + OH : 	J(41) 	;
+{6566.} 	 C615CO2O = C5DICARB + CO + HO2 : 	KDEC 	;
+{6567.} 	 C6125CO + OH = C5CO14O2 + CO : 	6.45D-11 	;
+{6568.} 	 C6125CO = C5CO14O2 + CO + HO2 : 	J(34)+J(23)+J(24) 	;
+{6569.} 	 C615CO2OH + OH = C6125CO + HO2 : 	1.18D-10 	;
+{6570.} 	 C615CO2OH = C5DICARB + CO + HO2 + HO2 : 	J(23)+J(24) 	;
+{6571.} 	 OXYLCO3 + HO2 = OXYL1O2 + OH : 	KAPHO2*0.44 	;
+{6572.} 	 OXYLCO3 + HO2 = OXYLCO2H + O3 : 	KAPHO2*0.15 	;
+{6573.} 	 OXYLCO3 + HO2 = OXYLCO3H : 	KAPHO2*0.41 	;
+{6574.} 	 OXYLCO3 + NO = OXYL1O2 + NO2 : 	KAPNO 	;
+{6575.} 	 OXYLCO3 + NO2 = OXYLPAN : 	KFPAN 	;
+{6576.} 	 OXYLCO3 + NO3 = OXYL1O2 + NO2 : 	KRO2NO3*1.74 	;
+{6577.} 	 OXYLCO3 = OXYL1O2 : 	1.00D-11*0.70*RO2 	;
+{6578.} 	 OXYLCO3 = OXYLCO2H : 	1.00D-11*0.30*RO2 	;
+{6579.} 	 TLCOBIPEOH + OH = MALDIALCO3 + MGLYOX : 	8.06D-11 	;
+{6580.} 	 TLCOBIPEOH = MALDIALCO3 + MGLYOX + HO2 : 	J(22) 	;
+{6581.} 	 MC5DICARB + NO3 = MC4CODBCO3 + HNO3 : 	KNO3AL*4.25 	;
+{6582.} 	 MC5DICARB + O3 = BIACET + GLYOOC : 	5.00D-18*0.5 	;
+{6583.} 	 MC5DICARB + O3 = GLYOX + MEK2OOA : 	5.00D-18*0.5 	;
+{6584.} 	 MC5DICARB + OH = MC4CODBCO3 : 	7.10D-11*0.28 	;
+{6585.} 	 MC5DICARB + OH = MC5CO2OHO2 : 	7.10D-11*0.72 	;
+{6586.} 	 MC5DICARB = MC4CODBCO3 + HO2 : 	J(4)*0.2*0.6 	;
+{6587.} 	 MC5DICARB = TMB1FUONE : 	J(4)*0.2*0.4 	;
+{6588.} 	 OXYFUONE + NO3 = NOXYFUO2 : 	1.00D-12 	;
+{6589.} 	 OXYFUONE + O3 = C6OTKETO2 + OH : 	1.40D-18 	;
+{6590.} 	 OXYFUONE + OH = OXYFUO2 : 	3.01D-11 	;
+{6591.} 	 OXYMUCCO2H + OH = MC6CO2O2 : 	3.98D-11 	;
+{6592.} 	 OXYMUCCO2H = MC6CO2O2 + HO2 : 	J(19)+J(18) 	;
+{6593.} 	 OXYMUCCO3H + OH = OXYMUCCO3 : 	4.28D-11 	;
+{6594.} 	 OXYMUCCO3H = MC6CO2O2 + OH : 	J(41)+J(18)+J(19) 	;
+{6595.} 	 OXYMUCPAN + OH = C5DICARB + CH3O2 + CO + NO2 : 	3.96D-11 	;
+{6596.} 	 OXYMUCPAN = OXYMUCCO3 + NO2 : 	KBPAN 	;
+{6597.} 	 EPXM2DLCO3 + HO2 = C4MCO2O2 + OH : 	KAPHO2*0.44 	;
+{6598.} 	 EPXM2DLCO3 + HO2 = EPXM2DCO2H + O3 : 	KAPHO2*0.15 	;
+{6599.} 	 EPXM2DLCO3 + HO2 = EPXM2DCO3H : 	KAPHO2*0.41 	;
+{6600.} 	 EPXM2DLCO3 + NO = C4MCO2O2 + NO2 : 	KAPNO 	;
+{6601.} 	 EPXM2DLCO3 + NO2 = EPXM2DLPAN : 	KFPAN 	;
+{6602.} 	 EPXM2DLCO3 + NO3 = C4MCO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{6603.} 	 EPXM2DLCO3 = C4MCO2O2 : 	1.00D-11*RO2*0.70 	;
+{6604.} 	 EPXM2DLCO3 = EPXM2DCO2H : 	1.00D-11*RO2*0.30 	;
+{6605.} 	 C4MCO2O2 + HO2 = C4MCO2OOH : 	KRO2HO2*0.706 	;
+{6606.} 	 C4MCO2O2 + NO = C4MCO2O + NO2 : 	KRO2NO 	;
+{6607.} 	 C4MCO2O2 + NO3 = C4MCO2O + NO2 : 	KRO2NO3 	;
+{6608.} 	 C4MCO2O2 = C4MCO2O : 	9.20D-14*RO2 	;
+{6609.} 	 OXYMUCOOH + OH = OXYMUCCO + OH : 	9.33D-11 	;
+{6610.} 	 OXYMUCOOH = OXYMUCO + OH : 	J(41)+J(17)*2 	;
+{6611.} 	 OXYMUCNO3 + OH = OXYMUCCO + NO2 : 	3.27D-11 	;
+{6612.} 	 OXYMUCNO3 = EPXM2C4DAL + NO2 + HO2 + CO + HO2 + CO : 	J(17)*2 	;
+{6613.} 	 OXYMUCO = C4MCO2O2 + C32OH13CO : 	KDEC*0.5 	;
+{6614.} 	 OXYMUCO = EPXM2C4DAL + GLYOX + HO2 : 	KDEC*0.5 	;
+{6615.} 	 OXYMUCCO + OH = EPXM2C4DAL + HO2 + CO : 	4.84D-11 	;
+{6616.} 	 OXYMUCCO = EPXM2C4DAL + HO2 + CO + CO + HO2 : 	J(17)+J(34) 	;
+{6617.} 	 OXYMUCOH + OH = OXYMUCCO + HO2 : 	8.11D-11 	;
+{6618.} 	 OXYMUCOH = OXYMUCO + HO2 : 	J(17)*2 	;
+{6619.} 	 MC6CO2OOH + OH = MC6CO2O2 : 	4.28D-11 	;
+{6620.} 	 MC6CO2OOH = C4MCO2OOH + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{6621.} 	 MC6CO2OOH = CH3CO3 + C5DICARB + OH : 	J(22) 	;
+{6622.} 	 MC6CO2OOH = MC6CO2O + OH : 	J(41) 	;
+{6623.} 	 MC6CO2O = C5DICARB + CH3CO3 : 	KDEC 	;
+{6624.} 	 MC6CO2OH + OH = C5DICARB + CH3CO3 : 	5.24D-11 	;
+{6625.} 	 MC6CO2OH = C4MCO2OH + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{6626.} 	 MC6CO2OH = C5DICARB + CH3CO3 + HO2 : 	J(22) 	;
+{6627.} 	 NOXYOLOOH + OH = NOXYOLO2 : 	1.43D-10 	;
+{6628.} 	 NOXYOLOOH = NOXYOLO + OH : 	J(41) 	;
+{6629.} 	 NOXYOLOOH = OXYOLO + OH + NO2 : 	J(54) 	;
+{6630.} 	 NOXYOLO = C5DBCOCO2H + GLYOX + NO2 : 	KDEC 	;
+{6631.} 	 NOXYOLOH + OH = NOXYOLO : 	1.40D-10 	;
+{6632.} 	 NOXYOLOH = OXYOLO + HO2 + NO2 : 	J(54) 	;
+{6633.} 	 OXY1OHNO2 + NO3 = NOXYOL1O + HNO3 : 	3.13D-13 	;
+{6634.} 	 OXY1OHNO2 + OH = NOXYOL1O : 	1.53D-12 	;
+{6635.} 	 DM123O2 + HO2 = DM123OOH : 	KRO2HO2*0.859 	;
+{6636.} 	 DM123O2 + NO = OXY1O + NO2 : 	KRO2NO 	;
+{6637.} 	 DM123O2 + NO3 = OXY1O + NO2 : 	KRO2NO3 	;
+{6638.} 	 DM123O2 = OXY1O : 	2.50D-13*RO2 	;
+{6639.} 	 OXYOLOOH + OH = OXYOLO2 : 	1.51D-10 	;
+{6640.} 	 OXYOLOOH = OXYOLO + OH : 	J(41) 	;
+{6641.} 	 OXYOLO = C5DBCOCO2H + GLYOX + HO2 : 	KDEC*0.52 	;
+{6642.} 	 OXYOLO = OXYQONE + HO2 : 	KDEC*0.48 	;
+{6643.} 	 OXYOLOH + OH = OXYOLO : 	1.48D-10 	;
+{6644.} 	 OXCATEC1O + NO2 = OXNCATECH : 	2.08D-12 	;
+{6645.} 	 OXCATEC1O + O3 = OXCATEC1O2 : 	2.86D-13 	;
+{6646.} 	 OXCATECOOA = C5CO14OH + CH3COCO2H + HO2 + OH : 	KDEC 	;
+{6647.} 	 MXYLCO3 + HO2 = MXYL1O2 + OH : 	KAPHO2*0.44 	;
+{6648.} 	 MXYLCO3 + HO2 = MXYLCO2H + O3 : 	KAPHO2*0.15 	;
+{6649.} 	 MXYLCO3 + HO2 = MXYLCO3H : 	KAPHO2*0.41 	;
+{6650.} 	 MXYLCO3 + NO = MXYL1O2 + NO2 : 	KAPNO 	;
+{6651.} 	 MXYLCO3 + NO2 = MXYLPAN : 	KFPAN 	;
+{6652.} 	 MXYLCO3 + NO3 = MXYL1O2 + NO2 : 	KRO2NO3*1.74 	;
+{6653.} 	 MXYLCO3 = MXYL1O2 : 	1.00D-11*0.70*RO2 	;
+{6654.} 	 MXYLCO3 = MXYLCO2H : 	1.00D-11*0.30*RO2 	;
+{6655.} 	 MXYL1O2 + HO2 = MXYL1OOH : 	KRO2HO2*0.820 	;
+{6656.} 	 MXYL1O2 + NO = MXYL1O + NO2 : 	KRO2NO 	;
+{6657.} 	 MXYL1O2 + NO3 = MXYL1O + NO2 : 	KRO2NO3 	;
+{6658.} 	 MXYL1O2 = MXYL1O : 	2.50D-13*RO2 	;
+{6659.} 	 C5MDICARB + NO3 = C4MCODBCO3 + HNO3 : 	KNO3AL*4.25 	;
+{6660.} 	 C5MDICARB + O3 = MGLOOC + MGLYOX : 	2.0D-18*0.5 	;
+{6661.} 	 C5MDICARB + O3 = MGLYOOA + MGLYOX : 	2.0D-18*0.5 	;
+{6662.} 	 C5MDICARB + OH = C4MCODBCO3 : 	7.00D-11*0.5 	;
+{6663.} 	 C5MDICARB + OH = C5MCO2OHO2 : 	7.00D-11*0.5 	;
+{6664.} 	 C5MDICARB = C4MCODBCO3 + HO2 : 	J(4)*0.2*0.6 	;
+{6665.} 	 C5MDICARB = MXYFUONE : 	J(4)*0.2*0.4 	;
+{6666.} 	 MXYFUONE + NO3 = NMXYFUO2 : 	1.00D-12 	;
+{6667.} 	 MXYFUONE + O3 = OH + CO + C23O3MO2 : 	8.00D-19 	;
+{6668.} 	 MXYFUONE + OH = MXYFUO2 : 	2.67D-11 	;
+{6669.} 	 PXYFUONE + NO3 = NPXYFUO2 : 	1.00D-12 	;
+{6670.} 	 PXYFUONE + O3 = OH + CO + MCOCOMOXO2 : 	8.00D-19 	;
+{6671.} 	 PXYFUONE + OH = PXYFUO2 : 	2.42D-11 	;
+{6672.} 	 C3MCODBCO3 + HO2 = C3MCODBCO2 + OH : 	KAPHO2*0.44 	;
+{6673.} 	 C3MCODBCO3 + HO2 = C4CODBCO3H : 	KAPHO2*0.56 	;
+{6674.} 	 C3MCODBCO3 + NO = C3MCODBCO2 + NO2 : 	KAPNO 	;
+{6675.} 	 C3MCODBCO3 + NO2 = C3MCODBPAN : 	KFPAN 	;
+{6676.} 	 C3MCODBCO3 + NO3 = NO2 + C3MCODBCO2 : 	KRO2NO3*1.74 	;
+{6677.} 	 C3MCODBCO3 = C3MCODBCO2 : 	1.00D-11*RO2 	;
+{6678.} 	 MXYMUCCO2H + OH = C726CO5O2 : 	6.00D-11 	;
+{6679.} 	 MXYMUCCO2H = C726CO5O2 + HO2 : 	J(23)+J(24) 	;
+{6680.} 	 MXYMUCCO3H + OH = MXYMUCCO3 : 	6.31D-11 	;
+{6681.} 	 MXYMUCCO3H = C726CO5O2 + OH : 	J(41)+J(23)+J(24) 	;
+{6682.} 	 MXYMUCPAN + OH = C5DICARB + CH3O2 + CO + NO2 : 	5.99D-11 	;
+{6683.} 	 MXYMUCPAN = MXYMUCCO3 + NO2 : 	KBPAN 	;
+{6684.} 	 EPXMDLCO3 + HO2 = C3MDIALO2 + OH : 	KAPHO2*0.44 	;
+{6685.} 	 EPXMDLCO3 + HO2 = EPXMDLCO2H + O3 : 	KAPHO2*0.15 	;
+{6686.} 	 EPXMDLCO3 + HO2 = EPXMDLCO3H : 	KAPHO2*0.41 	;
+{6687.} 	 EPXMDLCO3 + NO = C3MDIALO2 + NO2 : 	KAPNO 	;
+{6688.} 	 EPXMDLCO3 + NO2 = EPXMDLPAN : 	KFPAN 	;
+{6689.} 	 EPXMDLCO3 + NO3 = C3MDIALO2 + NO2 : 	KRO2NO3*1.74 	;
+{6690.} 	 EPXMDLCO3 = C3MDIALO2 : 	1.00D-11*RO2*0.70 	;
+{6691.} 	 EPXMDLCO3 = EPXMDLCO2H : 	1.00D-11*RO2*0.30 	;
+{6692.} 	 C3MDIALO2 + HO2 = C3MDIALOOH : 	KRO2HO2*0.625 	;
+{6693.} 	 C3MDIALO2 + NO = C3MDIALO + NO2 : 	KRO2NO 	;
+{6694.} 	 C3MDIALO2 + NO3 = C3MDIALO + NO2 : 	KRO2NO3 	;
+{6695.} 	 C3MDIALO2 = C3MDIALO : 	9.20D-14*RO2*0.7 	;
+{6696.} 	 C3MDIALO2 = C3MDIALOH : 	9.20D-14*RO2*0.3 	;
+{6697.} 	 MXYMUCOOH + OH = MXYMUCCO + OH : 	7.41D-11 	;
+{6698.} 	 MXYMUCOOH = MXYMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{6699.} 	 MXYMUCNO3 + OH = MXYMUCCO + NO2 : 	3.08D-11 	;
+{6700.} 	 MXYMUCNO3 = EPXMC4DIAL + NO2 + CH3CO3 + CO + HO2 : 	J(17)+J(22) 	;
+{6701.} 	 MXYMUCO = CO2H3CHO + C3MDIALO2 : 	KDEC*0.5 	;
+{6702.} 	 MXYMUCO = EPXMC4DIAL + MGLYOX + HO2 : 	KDEC*0.5 	;
+{6703.} 	 MXYMUCCO + OH = EPXMC4DIAL + CH3CO3 + CO : 	4.08D-11 	;
+{6704.} 	 MXYMUCCO = CH3CO3 + EPXMC4DIAL + CO + HO2 : 	J(17)+J(35) 	;
+{6705.} 	 MXYMUCOH + OH = MXYMUCCO + HO2 : 	6.20D-11 	;
+{6706.} 	 MXYMUCOH = MXYMUCO + HO2 : 	J(17)+J(22) 	;
+{6707.} 	 C726CO5OOH + OH = C7236CO + OH : 	7.36D-11 	;
+{6708.} 	 C726CO5OOH = C726CO5O + OH : 	J(41)+J(23)+J(24) 	;
+{6709.} 	 C726CO5O = C5DICARB + CH3CO3 : 	KDEC 	;
+{6710.} 	 C7236CO + OH = C5CO14O2 + CH3CO3 : 	5.22D-11 	;
+{6711.} 	 C7236CO = C5CO14O2 + CH3CO3 : 	J(35)+J(23)+J(24) 	;
+{6712.} 	 C726CO3OH + OH = C7236CO + HO2 : 	9.76D-11 	;
+{6713.} 	 C726CO3OH = CH3CO3 + C5DICARB + HO2 : 	J(23)+J(24) 	;
+{6714.} 	 MXY1OHNO2 + NO3 = NMXYOL1O + HNO3 : 	3.13D-13 	;
+{6715.} 	 MXY1OHNO2 + OH = NMXYOL1O : 	1.53D-12 	;
+{6716.} 	 MXY1O2 + HO2 = MXY1OOH : 	KRO2HO2*0.859 	;
+{6717.} 	 MXY1O2 + NO = MXY1O + NO2 : 	KRO2NO 	;
+{6718.} 	 MXY1O2 + NO3 = MXY1O + NO2 : 	KRO2NO3 	;
+{6719.} 	 MXY1O2 = MXY1O : 	2.50D-13*RO2 	;
+{6720.} 	 MXYOLOOH + OH = MXYOLO2 : 	1.13D-10 	;
+{6721.} 	 MXYOLOOH = MXYOLO + OH : 	J(41) 	;
+{6722.} 	 MXYOLO = C5CO14OH + MGLYOX + HO2 : 	KDEC*0.85 	;
+{6723.} 	 MXYOLO = MXYQONE + HO2 : 	KDEC*0.15 	;
+{6724.} 	 MXYOLOH + OH = MXYOLO : 	1.10D-10 	;
+{6725.} 	 NMXYOLOOH + OH = NMXYOLO2 : 	1.07D-10 	;
+{6726.} 	 NMXYOLOOH = MXYOLO + OH + NO2 : 	J(54) 	;
+{6727.} 	 NMXYOLOOH = NMXYOLO + OH : 	J(41) 	;
+{6728.} 	 NMXYOLO = C5CO14OH + MGLYOX + NO2 : 	KDEC 	;
+{6729.} 	 NMXYOLOH + OH = NMXYOLO : 	1.03D-10 	;
+{6730.} 	 NMXYOLOH = MXYOLO + HO2 + NO2 : 	J(54) 	;
+{6731.} 	 MXCATEC1O + NO2 = MXNCATECH : 	2.08D-12 	;
+{6732.} 	 MXCATEC1O + O3 = MXCATEC1O2 : 	2.86D-13 	;
+{6733.} 	 MXCATECOOA = C3MCOCO2H + CH3COCO2H + HO2 + OH : 	KDEC 	;
+{6734.} 	 PXYLCO3 + HO2 = PXYL1O2 + OH : 	KAPHO2*0.44 	;
+{6735.} 	 PXYLCO3 + HO2 = PXYLCO2H + O3 : 	KAPHO2*0.15 	;
+{6736.} 	 PXYLCO3 + HO2 = PXYLCO3H : 	KAPHO2*0.41 	;
+{6737.} 	 PXYLCO3 + NO = PXYL1O2 + NO2 : 	KAPNO 	;
+{6738.} 	 PXYLCO3 + NO2 = PXYLPAN : 	KFPAN 	;
+{6739.} 	 PXYLCO3 + NO3 = PXYL1O2 + NO2 : 	KRO2NO3*1.74 	;
+{6740.} 	 PXYLCO3 = PXYL1O2 : 	1.00D-11*0.70*RO2 	;
+{6741.} 	 PXYLCO3 = PXYLCO2H : 	1.00D-11*0.30*RO2 	;
+{6742.} 	 PXYL1O2 + HO2 = PXYL1OOH : 	KRO2HO2*0.820 	;
+{6743.} 	 PXYL1O2 + NO = PXYL1O + NO2 : 	KRO2NO 	;
+{6744.} 	 PXYL1O2 + NO3 = PXYL1O + NO2 : 	KRO2NO3 	;
+{6745.} 	 PXYL1O2 = PXYL1O : 	2.50D-13*RO2 	;
+{6746.} 	 C4DBDIKET + O3 = MGLOOB + MGLYOX : 	5.00D-18 	;
+{6747.} 	 C4DBDIKET + OH = DMKOHO2 : 	4.90D-11 	;
+{6748.} 	 C4DBDIKET = MGLYOX + CH3CO3 + HO2 + CO : 	J(4)*0.0057 	;
+{6749.} 	 PXYMUCCO2H + OH = C6M5CO2O2 : 	5.87D-11 	;
+{6750.} 	 PXYMUCCO2H = C6M5CO2O2 + HO2 : 	J(23)+J(24) 	;
+{6751.} 	 PXYMUCCO3H + OH = PXYMUCCO3 : 	6.18D-11 	;
+{6752.} 	 PXYMUCCO3H = C6M5CO2O2 + OH : 	J(41)+J(23)+J(24) 	;
+{6753.} 	 PXYMUCPAN + OH = C4DBDIKET + CO + NO2 : 	5.85D-11 	;
+{6754.} 	 PXYMUCPAN = PXYMUCCO3 + NO2 : 	KBPAN 	;
+{6755.} 	 PXYMUCOOH + OH = PXYMUCCO + OH : 	7.26D-11 	;
+{6756.} 	 PXYMUCOOH = PXYMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{6757.} 	 PXYMUCNO3 + OH = PXYMUCCO + NO2 : 	2.92D-11 	;
+{6758.} 	 PXYMUCNO3 = EPXMC4DIAL + NO2 + CH3CO3 + CO + HO2 : 	J(17)+J(22) 	;
+{6759.} 	 PXYMUCO = CO2H3CHO + C4CO2O2 : 	KDEC*0.5 	;
+{6760.} 	 PXYMUCO = EPXMC4DIAL + MGLYOX + HO2 : 	KDEC*0.5 	;
+{6761.} 	 PXYMUCCO + OH = EPXMC4DIAL + CH3CO3 + CO : 	3.58D-11 	;
+{6762.} 	 PXYMUCCO = EPXMC4DIAL + CH3CO3 + HO2 + CO : 	J(17)+J(35) 	;
+{6763.} 	 PXYMUCOH + OH = PXYMUCCO + HO2 : 	6.03D-11 	;
+{6764.} 	 PXYMUCOH = PXYMUCO + HO2 : 	J(17)+J(22) 	;
+{6765.} 	 C6M5CO2OOH + OH = C6M5CO2O2 : 	8.25D-11 	;
+{6766.} 	 C6M5CO2OOH = C3MDIALOOH + CH3CO3 + HO2 + CO : 	J(23)+J(24) 	;
+{6767.} 	 C6M5CO2OOH = C6M5CO2O + OH : 	J(41) 	;
+{6768.} 	 C6M5CO2OOH = HO2 + CO + C4DBDIKET + OH : 	J(17) 	;
+{6769.} 	 C6M5CO2O = C4DBDIKET + CO + HO2 : 	KDEC 	;
+{6770.} 	 C6M5CO2OH + OH = C6M5CO2O : 	1.14D-10 	;
+{6771.} 	 C6M5CO2OH = C3MDIALOH + CH3CO3 + HO2 + CO : 	J(23)+J(24) 	;
+{6772.} 	 C6M5CO2OH = HO2 + CO + C4DBDIKET + HO2 : 	J(17) 	;
+{6773.} 	 NPXYOLOOH + OH = NPXYOLO2 : 	1.43D-10 	;
+{6774.} 	 NPXYOLOOH = NPXYOLO + OH : 	J(41) 	;
+{6775.} 	 NPXYOLOOH = PXYOLO + OH + NO2 : 	J(54) 	;
+{6776.} 	 NPXYOLO = C3MCOCO2H + MGLYOX + NO2 : 	KDEC 	;
+{6777.} 	 NPXYOLOH + OH = NPXYOLO : 	1.40D-10 	;
+{6778.} 	 NPXYOLOH = PXYOLO + HO2 + NO2 : 	J(54) 	;
+{6779.} 	 PXY1OHNO2 + NO3 = NPXYOL1O + HNO3 : 	3.13D-13 	;
+{6780.} 	 PXY1OHNO2 + OH = NPXYOL1O : 	1.53D-12 	;
+{6781.} 	 PXY1O2 + HO2 = PXY1OOH : 	KRO2HO2*0.859 	;
+{6782.} 	 PXY1O2 + NO = PXY1O + NO2 : 	KRO2NO 	;
+{6783.} 	 PXY1O2 + NO3 = PXY1O + NO2 : 	KRO2NO3 	;
+{6784.} 	 PXY1O2 = PXY1O : 	2.50D-13*RO2 	;
+{6785.} 	 PXYOLOOH + OH = PXYOLO2 : 	1.51D-10 	;
+{6786.} 	 PXYOLOOH = PXYOLO + OH : 	J(41) 	;
+{6787.} 	 PXYOLO = C3MCOCO2H + MGLYOX + HO2 : 	KDEC*0.68 	;
+{6788.} 	 PXYOLO = PXYQONE + HO2 : 	KDEC*0.32 	;
+{6789.} 	 PXYOLOH + OH = PXYOLO : 	1.48D-10 	;
+{6790.} 	 PXCATEC1O + NO2 = PXNCATECH : 	2.08D-12 	;
+{6791.} 	 PXCATEC1O + O3 = PXCATEC1O2 : 	2.86D-13 	;
+{6792.} 	 PXCATECOOA = MC3ODBCO2H + CH3COCO2H + HO2 + OH : 	KDEC 	;
+{6793.} 	 C6H5CH2CO3 + HO2 = C6H5C2CO2H + O3 : 	KAPHO2*0.15 	;
+{6794.} 	 C6H5CH2CO3 + HO2 = C6H5C2CO3H : 	KAPHO2*0.41 	;
+{6795.} 	 C6H5CH2CO3 + HO2 = C6H5CH2O2 + OH : 	KAPHO2*0.44 	;
+{6796.} 	 C6H5CH2CO3 + NO = C6H5CH2O2 + NO2 : 	KAPNO 	;
+{6797.} 	 C6H5CH2CO3 + NO2 = C6H5CH2PAN : 	KFPAN 	;
+{6798.} 	 C6H5CH2CO3 + NO3 = C6H5CH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{6799.} 	 C6H5CH2CO3 = C6H5C2CO2H : 	1.00D-11*0.30*RO2 	;
+{6800.} 	 C6H5CH2CO3 = C6H5CH2O2 : 	1.00D-11*0.70*RO2 	;
+{6801.} 	 EBNZOHNO2 + NO3 = NEBNZ1O + HNO3 : 	3.13D-13*1.0 	;
+{6802.} 	 EBNZOHNO2 + OH = NEBNZ1O : 	1.53D-12 	;
+{6803.} 	 EBENZO2 + HO2 = EBENZOOH : 	KRO2HO2*0.859 	;
+{6804.} 	 EBENZO2 + NO = EBENZO + NO2 : 	KRO2NO 	;
+{6805.} 	 EBENZO2 + NO3 = EBENZO + NO2 : 	KRO2NO3 	;
+{6806.} 	 EBENZO2 = EBENZO : 	2.50D-13*RO2 	;
+{6807.} 	 EBENZOLOOH + OH = EBENZOLO2 : 	1.15D-10 	;
+{6808.} 	 EBENZOLOOH = EBENZOLO + OH : 	J(41) 	;
+{6809.} 	 EBENZOLO = C6DCRBBOH + GLYOX + HO2 : 	KDEC*0.68 	;
+{6810.} 	 EBENZOLO = PEBQONE + HO2 : 	KDEC*0.32 	;
+{6811.} 	 EBENZOLOH + OH = EBENZOLO : 	1.11D-10 	;
+{6812.} 	 NEBNZOLOOH + OH = NEBNZOLO2 : 	1.07D-10 	;
+{6813.} 	 NEBNZOLOOH = EBENZOLO + OH + NO2 : 	J(54) 	;
+{6814.} 	 NEBNZOLOOH = NEBNZOLO + OH : 	J(41) 	;
+{6815.} 	 NEBNZOLO = C6DCRBBOH + GLYOX + NO2 : 	KDEC 	;
+{6816.} 	 NEBNZOLOH + OH = NEBNZOLO : 	1.04D-10 	;
+{6817.} 	 NEBNZOLOH = EBENZOLO + HO2 + NO2 : 	J(54) 	;
+{6818.} 	 ECATEC1O + NO2 = ENCATECH : 	2.08D-12 	;
+{6819.} 	 ECATEC1O + O3 = ECATEC1O2 : 	2.86D-13 	;
+{6820.} 	 ECATECOOA = RGDCO2H + HCOCO2H + HO2 + OH : 	KDEC*1.0 	;
+{6821.} 	 C6DICARB + NO3 = C6DCARBBO2 + HNO3 : 	KNO3AL*2.75 	;
+{6822.} 	 C6DICARB + O3 = EGLYOX + GLYOOA : 	2.00D-18*0.5 	;
+{6823.} 	 C6DICARB + O3 = GLYOX + EGLYOOB : 	2.00D-18*0.5 	;
+{6824.} 	 C6DICARB + OH = C6DCARBBO2 : 	5.58D-11*0.5 	;
+{6825.} 	 C6DICARB + OH = C6DICARBO2 : 	5.58D-11*0.5 	;
+{6826.} 	 C6DICARB = C6DCARBBO2 + HO2 + CO : 	J(4)*0.2*0.6 	;
+{6827.} 	 C6DICARB = EBFUONE : 	J(4)*0.2*0.4 	;
+{6828.} 	 EBFUONE + NO3 = NEBFUO2 : 	1.00D-12 	;
+{6829.} 	 EBFUONE + O3 = CO + BUTALAO2 + OH : 	8.00D-19 	;
+{6830.} 	 EBFUONE + OH = EBFUO2 : 	2.29D-11 	;
+{6831.} 	 C6DCARBBO2 + HO2 = C6DCARBBO + OH : 	KAPHO2*0.44 	;
+{6832.} 	 C6DCARBBO2 + HO2 = C6DCRBBOH + O3 : 	KAPHO2*0.15 	;
+{6833.} 	 C6DCARBBO2 + HO2 = C6DCRBBOOH : 	KAPHO2*0.41 	;
+{6834.} 	 C6DCARBBO2 + NO = C6DCARBBO + NO2 : 	KAPNO 	;
+{6835.} 	 C6DCARBBO2 + NO2 = C6DCARBPAN : 	KFPAN 	;
+{6836.} 	 C6DCARBBO2 + NO3 = C6DCARBBO + NO2 : 	KRO2NO3*1.74 	;
+{6837.} 	 C6DCARBBO2 = C6DCARBBO : 	1.00D-11*0.70*RO2 	;
+{6838.} 	 C6DCARBBO2 = C6DCRBBOH : 	1.00D-11*0.30*RO2 	;
+{6839.} 	 EBZMUCCO2H + OH = C715CO2O2 : 	6.09D-11 	;
+{6840.} 	 EBZMUCCO2H = C715CO2O2 + HO2 : 	J(23)+J(24) 	;
+{6841.} 	 EBZMUCCO3H + OH = EBZMUCCO3 : 	6.40D-11 	;
+{6842.} 	 EBZMUCCO3H = C715CO2O2 + OH : 	J(41)+J(23)+J(24) 	;
+{6843.} 	 EBZMUCPAN + OH = C6DICARB + CO + NO2 : 	6.08D-11 	;
+{6844.} 	 EBZMUCPAN = EBZMUCCO3 + NO2 : 	KBPAN 	;
+{6845.} 	 EGLYOO + CO = EGLYOX : 	1.20D-15 	;
+{6846.} 	 EGLYOO + NO = EGLYOX + NO2 : 	1.00D-14 	;
+{6847.} 	 EGLYOO + NO2 = EGLYOX + NO3 : 	1.00D-15 	;
+{6848.} 	 EGLYOO + SO2 = EGLYOX + SO3 : 	7.00D-14 	;
+{6849.} 	 EGLYOO = ECOCO2H : 	1.00D-17*H2O 	;
+{6850.} 	 EGLYOO = EGLYOX + H2O2 : 	6.00D-18*H2O 	;
+{6851.} 	 EBZMUCOOH + OH = EBZMUCCO + OH : 	7.51D-11 	;
+{6852.} 	 EBZMUCOOH = EBZMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{6853.} 	 EBZMUCNO3 + OH = EBZMUCCO + NO2 : 	3.17D-11 	;
+{6854.} 	 EBZMUCNO3 = EPXC4DIAL + NO2 + C2H5CO3 + CO + HO2 : 	J(17)+J(22) 	;
+{6855.} 	 EBZMUCO = CO3H4CHO + C3DIALO2 : 	KDEC*0.5 	;
+{6856.} 	 EBZMUCO = EPXC4DIAL + EGLYOX + HO2 : 	KDEC*0.5 	;
+{6857.} 	 EBZMUCCO + OH = C2H5CO3 + EPXC4DIAL + CO : 	4.25D-11 	;
+{6858.} 	 EBZMUCCO = C2H5CO3 + EPXC4DIAL + CO + HO2 : 	J(17)+J(35) 	;
+{6859.} 	 EBZMUCOH + OH = EBZMUCCO + HO2 : 	6.29D-11 	;
+{6860.} 	 EBZMUCOH = EBZMUCO + HO2 : 	J(17)+J(22) 	;
+{6861.} 	 C715CO2OOH + OH = C7CO2DBAL + OH : 	9.53D-11 	;
+{6862.} 	 C715CO2OOH = C6DICARB + CO + HO2 + OH : 	J(17)+J(23) 	;
+{6863.} 	 C715CO2OOH = C715CO2O + OH : 	J(41)+J(24) 	;
+{6864.} 	 C715CO2O = C6DICARB + CO + HO2 : 	KDEC 	;
+{6865.} 	 C715CO2OH + OH = C7CO2DBAL + HO2 : 	1.19D-11 	;
+{6866.} 	 C715CO2OH = C6DICARB + CO + HO2 + HO2 : 	J(17)+J(23)+J(24) 	;
+{6867.} 	 C7CO2DBAL + OH = C7CO3OHO2 : 	6.78D-11 	;
+{6868.} 	 C7CO2DBAL = C6DCARBBO2 + HO2 + CO : 	J(34) 	;
+{6869.} 	 PHCOETO2 + HO2 = PHCOETOOH : 	KRO2HO2*0.890 	;
+{6870.} 	 PHCOETO2 + NO = PHCOETO + NO2 : 	KRO2NO 	;
+{6871.} 	 PHCOETO2 + NO3 = PHCOETO + NO2 : 	KRO2NO3 	;
+{6872.} 	 PHCOETO2 = PHCOCOME : 	8.80D-13*RO2*0.2 	;
+{6873.} 	 PHCOETO2 = PHCOETO : 	8.80D-13*RO2*0.6 	;
+{6874.} 	 PHCOETO2 = PHCOETOH : 	8.80D-13*RO2*0.2 	;
+{6875.} 	 NPBNZOLOOH + OH = NPBNZOLO2 : 	1.07D-10 	;
+{6876.} 	 NPBNZOLOOH = NPBNZOLO + OH : 	J(41) 	;
+{6877.} 	 NPBNZOLOOH = PBENZOLO + OH + NO2 : 	J(54) 	;
+{6878.} 	 NPBNZOLO = C7DCCO2H + GLYOX + NO2 : 	KDEC 	;
+{6879.} 	 NPBNZOLOH + OH = NPBNZOLO : 	1.04D-10 	;
+{6880.} 	 NPBNZOLOH = PBENZOLO + HO2 + NO2 : 	J(54) 	;
+{6881.} 	 PBNZOHNO2 + NO3 = NPBNZ1O + HNO3 : 	3.13D-13*1.0 	;
+{6882.} 	 PBNZOHNO2 + OH = NPBNZ1O : 	1.53D-12 	;
+{6883.} 	 PBENZO2 + HO2 = PBENZOOH : 	KRO2HO2*0.90 	;
+{6884.} 	 PBENZO2 + NO = PBENZO + NO2 : 	KRO2NO 	;
+{6885.} 	 PBENZO2 + NO3 = PBENZO + NO2 : 	KRO2NO3 	;
+{6886.} 	 PBENZO2 = PBENZO : 	2.50D-13*RO2 	;
+{6887.} 	 PBENZOLOOH + OH = PBENZOLO2 : 	1.15D-10 	;
+{6888.} 	 PBENZOLOOH = PBENZOLO + OH : 	J(41) 	;
+{6889.} 	 PBENZOLO = C7DCCO2H + GLYOX + HO2 : 	KDEC*0.68 	;
+{6890.} 	 PBENZOLO = PPRBQONE + HO2 : 	KDEC*0.32 	;
+{6891.} 	 PBENZOLOH + OH = PBENZOLO : 	1.11D-10 	;
+{6892.} 	 PCATEC1O + NO2 = PNCATECH : 	2.08D-12 	;
+{6893.} 	 PCATEC1O + O3 = PCATEC1O2 : 	2.86D-13 	;
+{6894.} 	 PCATECOOA = PC3ODBCO2H + HCOCO2H + HO2 + OH : 	KDEC*1.0 	;
+{6895.} 	 PGLYOX + NO3 = C3H7CO3 + CO + HNO3 : 	KNO3AL*5.5 	;
+{6896.} 	 PGLYOX + OH = C3H7CO3 + CO : 	1.67D-11 	;
+{6897.} 	 PGLYOX = C3H7CO3 + HO2 + CO : 	J(34) 	;
+{6898.} 	 C7DICARB + NO3 = C7DCCO3 + HNO3 : 	KNO3AL*2.75 	;
+{6899.} 	 C7DICARB + O3 = PGLOOB + GLYOX : 	2.00D-18*0.5 	;
+{6900.} 	 C7DICARB + O3 = PGLYOX + GLYOOA : 	2.00D-18*0.5 	;
+{6901.} 	 C7DICARB + OH = C7DCCO3 : 	5.58D-11*0.50 	;
+{6902.} 	 C7DICARB + OH = C7DCO2 : 	5.58D-11*0.50 	;
+{6903.} 	 C7DICARB = C7DCCO3 + HO2 : 	J(4)*0.2*0.6 	;
+{6904.} 	 C7DICARB = PBFUONE : 	J(4)*0.2*0.4 	;
+{6905.} 	 PBFUONE + NO3 = NPBFUO2 : 	1.00D-12 	;
+{6906.} 	 PBFUONE + O3 = CO + C4CHOAO2 + OH : 	8.00D-19 	;
+{6907.} 	 PBFUONE + OH = PBFUO2 : 	2.43D-11 	;
+{6908.} 	 C7DCCO3 + HO2 = C7DCCO2 + OH : 	KAPHO2*0.44 	;
+{6909.} 	 C7DCCO3 + HO2 = C7DCCO2H + O3 : 	KAPHO2*0.15 	;
+{6910.} 	 C7DCCO3 + HO2 = C7DCCO3H : 	KAPHO2*0.41 	;
+{6911.} 	 C7DCCO3 + NO = C7DCCO2 + NO2 : 	KAPNO 	;
+{6912.} 	 C7DCCO3 + NO2 = C7DCPAN : 	KFPAN 	;
+{6913.} 	 C7DCCO3 + NO3 = C7DCCO2 + NO2 : 	KRO2NO3*1.74 	;
+{6914.} 	 C7DCCO3 = C7DCCO2 : 	1.00D-11*RO2*0.7 	;
+{6915.} 	 C7DCCO3 = C7DCCO2H : 	1.00D-11*RO2*0.3 	;
+{6916.} 	 PBZMUCCO2H + OH = C815CO2O2 : 	6.44D-11 	;
+{6917.} 	 PBZMUCCO2H = C815CO2O2 + HO2 : 	J(23)+J(24) 	;
+{6918.} 	 PBZMUCCO3H + OH = PBZMUCCO3 : 	6.74D-11 	;
+{6919.} 	 PBZMUCCO3H = C815CO2O2 + OH : 	J(41)+J(23)+J(24) 	;
+{6920.} 	 PBZMUCPAN + OH = C7DICARB + CO + NO2 : 	6.42D-11 	;
+{6921.} 	 PBZMUCPAN = PBZMUCCO3 + NO2 : 	KBPAN 	;
+{6922.} 	 PGLOO + CO = PGLYOX : 	1.20D-15 	;
+{6923.} 	 PGLOO + NO = PGLYOX + NO2 : 	1.00D-14 	;
+{6924.} 	 PGLOO + NO2 = PGLYOX + NO3 : 	1.00D-15 	;
+{6925.} 	 PGLOO + SO2 = PGLYOX + SO3 : 	7.00D-14 	;
+{6926.} 	 PGLOO = PGLYOX + H2O2 : 	6.00D-18*H2O 	;
+{6927.} 	 PGLOO = PGLYOXOH : 	1.00D-17*H2O 	;
+{6928.} 	 PBZMUCOOH + OH = PBZMUCCO + OH : 	7.85D-11 	;
+{6929.} 	 PBZMUCOOH = PBZMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{6930.} 	 PBZMUCNO3 + OH = PBZMUCCO + NO2 : 	3.51D-11 	;
+{6931.} 	 PBZMUCNO3 = EPXC4DIAL + NO2 + C3H7CO3 + CO + HO2 : 	J(17)+J(22) 	;
+{6932.} 	 PBZMUCO = C6O132OH + C3DIALO2 : 	KDEC*0.5 	;
+{6933.} 	 PBZMUCO = EPXC4DIAL + PGLYOX + HO2 : 	KDEC*0.5 	;
+{6934.} 	 PBZMUCCO + OH = C3H7CO3 + EPXC4DIAL + CO : 	4.61D-11 	;
+{6935.} 	 PBZMUCCO = C3H7CO3 + EPXC4DIAL + CO + HO2 : 	J(17)+J(35) 	;
+{6936.} 	 PBZMUCOH + OH = PBZMUCCO + HO2 : 	6.63D-11 	;
+{6937.} 	 PBZMUCOH = PBZMUCO + HO2 : 	J(17)+J(22) 	;
+{6938.} 	 C815CO2OOH + OH = C8CO2DBAL + OH : 	9.87D-11 	;
+{6939.} 	 C815CO2OOH = C7DICARB + CO + HO2 + OH : 	J(17)+J(23) 	;
+{6940.} 	 C815CO2OOH = C815CO2O + OH : 	J(41)+J(24) 	;
+{6941.} 	 C815CO2O = C7DICARB + CO + HO2 : 	KDEC 	;
+{6942.} 	 C815CO2OH + OH = C8CO2DBAL + HO2 : 	1.23D-10 	;
+{6943.} 	 C815CO2OH = C7DICARB + CO + HO2 + HO2 : 	J(17)+J(23)+J(24) 	;
+{6944.} 	 C8CO2DBAL + OH = C8CO3OHO2 : 	6.91D-11 	;
+{6945.} 	 C8CO2DBAL = C7DCCO3 + HO2 + CO : 	J(34) 	;
+{6946.} 	 PHCOME + OH = PHCOMEO2 : 	6.00D-12 	;
+{6947.} 	 PHCOME = C6H5CO3 + CH3O2 : 	J(22) 	;
+{6948.} 	 IPBNZOHNO2 + NO3 = NIPBNZ1O + HNO3 : 	3.13D-13*1.0 	;
+{6949.} 	 IPBNZOHNO2 + OH = NIPBNZ1O : 	1.53D-12 	;
+{6950.} 	 IPBENZO2 + HO2 = IPBENZOOH : 	KRO2HO2*0.90 	;
+{6951.} 	 IPBENZO2 + NO = IPBENZO + NO2 : 	KRO2NO 	;
+{6952.} 	 IPBENZO2 + NO3 = IPBENZO + NO2 : 	KRO2NO3 	;
+{6953.} 	 IPBENZO2 = IPBENZO : 	2.50D-13*RO2 	;
+{6954.} 	 IPBZOLOOH + OH = IPBENZOLO2 : 	1.15D-10 	;
+{6955.} 	 IPBZOLOOH = IPBENZOLO + OH : 	J(41) 	;
+{6956.} 	 IPBENZOLO = IC7DCCO2H + GLYOX + HO2 : 	KDEC*0.68 	;
+{6957.} 	 IPBENZOLO = IPRBQONE + HO2 : 	KDEC*0.32 	;
+{6958.} 	 IPBENZOLOH + OH = IPBENZOLO : 	1.11D-10 	;
+{6959.} 	 NIPBZOLOOH + OH = NIPBNZOLO2 : 	1.07D-10 	;
+{6960.} 	 NIPBZOLOOH = IPBENZOLO + OH + NO2 : 	J(54) 	;
+{6961.} 	 NIPBZOLOOH = NIPBNZOLO + OH : 	J(41) 	;
+{6962.} 	 NIPBNZOLO = IC7DCCO2H + GLYOX + NO2 : 	KDEC 	;
+{6963.} 	 NIPBNZOLOH + OH = NIPBNZOLO : 	1.04D-10 	;
+{6964.} 	 NIPBNZOLOH = IPBENZOLO + HO2 + NO2 : 	J(54) 	;
+{6965.} 	 IPCATEC1O + NO2 = IPNCATECH : 	2.08D-12 	;
+{6966.} 	 IPCATEC1O + O3 = IPCATEC1O2 : 	2.86D-13 	;
+{6967.} 	 IPCATECOOA = IP3ODBCO2H + HCOCO2H + HO2 + OH : 	KDEC*1.0 	;
+{6968.} 	 IC7DICARB + NO3 = IC7DCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{6969.} 	 IC7DICARB + O3 = IPGLOOB + GLYOX : 	2.00D-18*0.5 	;
+{6970.} 	 IC7DICARB + O3 = IPRGLYOX + GLYOOA : 	2.00D-18*0.5 	;
+{6971.} 	 IC7DICARB + OH = IC7DCCO3 : 	5.58D-11*0.50 	;
+{6972.} 	 IC7DICARB + OH = IC7DCO2 : 	5.58D-11*0.50 	;
+{6973.} 	 IC7DICARB = IC7DCCO3 + HO2 : 	J(4)*0.2*0.6 	;
+{6974.} 	 IC7DICARB = IPBFUONE : 	J(4)*0.2*0.4 	;
+{6975.} 	 IC7DICARB = IPRCO3 + GLYOX + HO2 + CO : 	J(4)*0.05*0.34 	;
+{6976.} 	 IPBFUONE + NO3 = NIPBFUO2 : 	1.00D-12 	;
+{6977.} 	 IPBFUONE + O3 = CO + IC4CHOAO2 + OH : 	8.00D-19 	;
+{6978.} 	 IPBFUONE + OH = IPBFUO2 : 	2.43D-11 	;
+{6979.} 	 IC7DCCO3 + HO2 = IC7DCCO2 + OH : 	KAPHO2*0.44 	;
+{6980.} 	 IC7DCCO3 + HO2 = IC7DCCO2H + O3 : 	KAPHO2*0.15 	;
+{6981.} 	 IC7DCCO3 + HO2 = IC7DCCO3H : 	KAPHO2*0.41 	;
+{6982.} 	 IC7DCCO3 + NO = IC7DCCO2 + NO2 : 	KAPNO 	;
+{6983.} 	 IC7DCCO3 + NO2 = IC7DCPAN : 	KFPAN 	;
+{6984.} 	 IC7DCCO3 + NO3 = IC7DCCO2 + NO2 : 	KRO2NO3*1.74 	;
+{6985.} 	 IC7DCCO3 = IC7DCCO2 : 	1.00D-11*RO2*0.7 	;
+{6986.} 	 IC7DCCO3 = IC7DCCO2H : 	1.00D-11*RO2*0.3 	;
+{6987.} 	 IPBZMUCO2H + OH = C7M15CO2O2 : 	6.22D-11 	;
+{6988.} 	 IPBZMUCO2H = C7M15CO2O2 + HO2 : 	J(23)+J(24) 	;
+{6989.} 	 IPBZMUCO3H + OH = IPBZMUCCO3 : 	6.53D-11 	;
+{6990.} 	 IPBZMUCO3H = C7M15CO2O2 + OH : 	J(41)+J(23)+J(24) 	;
+{6991.} 	 IPBZMUCPAN + OH = IC7DICARB + CO + NO2 : 	6.21D-11 	;
+{6992.} 	 IPBZMUCPAN = IPBZMUCCO3 + NO2 : 	KBPAN 	;
+{6993.} 	 IPGLOO + CO = IPRGLYOX : 	1.20D-15 	;
+{6994.} 	 IPGLOO + NO = IPRGLYOX + NO2 : 	1.00D-14 	;
+{6995.} 	 IPGLOO + NO2 = IPRGLYOX + NO3 : 	1.00D-15 	;
+{6996.} 	 IPGLOO + SO2 = IPRGLYOX + SO3 : 	7.00D-14 	;
+{6997.} 	 IPGLOO = IPGLYOXOH : 	1.00D-17*H2O 	;
+{6998.} 	 IPGLOO = IPRGLYOX + H2O2 : 	6.00D-18*H2O 	;
+{6999.} 	 IPBZMUCOOH + OH = IPBZMUCCO + OH : 	7.64D-11 	;
+{7000.} 	 IPBZMUCOOH = IPBZMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7001.} 	 IPBZMUCNO3 + OH = IPBZMUCCO + NO2 : 	3.30D-11 	;
+{7002.} 	 IPBZMUCNO3 = EPXC4DIAL + NO2 + IPRCO3 + CO + HO2 : 	J(17)+J(22) 	;
+{7003.} 	 IPBZMUCO = C5MO132OH + C3DIALO2 : 	KDEC*0.5 	;
+{7004.} 	 IPBZMUCO = EPXC4DIAL + IPRGLYOX + HO2 : 	KDEC*0.5 	;
+{7005.} 	 IPBZMUCCO + OH = IPRCO3 + EPXC4DIAL + CO : 	4.47D-11 	;
+{7006.} 	 IPBZMUCCO = IPRCO3 + EPXC4DIAL + CO + HO2 : 	J(17)+J(35) 	;
+{7007.} 	 IPBZMUCOH + OH = IPBZMUCCO + HO2 : 	6.42D-11 	;
+{7008.} 	 IPBZMUCOH = IPBZMUCO + HO2 : 	J(17)+J(22) 	;
+{7009.} 	 C7MCO2OOH + OH = C7MCO2DBAL + OH : 	9.66D-11 	;
+{7010.} 	 C7MCO2OOH = C7M15CO2O + OH : 	J(41)+J(24) 	;
+{7011.} 	 C7MCO2OOH = IC7DICARB + CO + HO2 + OH : 	J(17)+J(23) 	;
+{7012.} 	 C7M15CO2O = IC7DICARB + CO + HO2 : 	KDEC 	;
+{7013.} 	 C7M15CO2OH + OH = C7MCO2DBAL + HO2 : 	1.21D-10 	;
+{7014.} 	 C7M15CO2OH = IC7DICARB + CO + HO2 + HO2 : 	J(17)+J(23)+J(24) 	;
+{7015.} 	 C7MCO2DBAL + OH = C7MCO3OHO2 : 	6.70D-11 	;
+{7016.} 	 C7MCO2DBAL = IC7DCCO3 + HO2 + CO : 	J(34) 	;
+{7017.} 	 TM123BCO3 + HO2 = DM123O2 + OH : 	KAPHO2*0.44 	;
+{7018.} 	 TM123BCO3 + HO2 = TM123BCO2H + O3 : 	KAPHO2*0.15 	;
+{7019.} 	 TM123BCO3 + HO2 = TM123BCO3H : 	KAPHO2*0.41 	;
+{7020.} 	 TM123BCO3 + NO = DM123O2 + NO2 : 	KAPNO 	;
+{7021.} 	 TM123BCO3 + NO2 = TM123BPAN : 	KFPAN 	;
+{7022.} 	 TM123BCO3 + NO3 = DM123O2 + NO2 : 	KRO2NO3*1.74 	;
+{7023.} 	 TM123BCO3 = DM123O2 : 	1.00D-11*RO2*0.70 	;
+{7024.} 	 TM123BCO3 = TM123BCO2H : 	1.00D-11*RO2*0.30 	;
+{7025.} 	 NTM123LOOH + OH = NTM123OLO2 : 	1.85D-10 	;
+{7026.} 	 NTM123LOOH = NTM123OLO + OH : 	J(41) 	;
+{7027.} 	 NTM123LOOH = TM123OLO + OH + NO2 : 	J(54) 	;
+{7028.} 	 NTM123OLO = C7ADCCO2H + GLYOX + NO2 : 	KDEC 	;
+{7029.} 	 NTM123OLOH + OH = NTM123OLO : 	1.81D-10 	;
+{7030.} 	 NTM123OLOH = TM123OLO + HO2 + NO2 : 	J(54) 	;
+{7031.} 	 TM123OHNO2 + NO3 = NT123L1O + HNO3 : 	3.13D-13 	;
+{7032.} 	 TM123OHNO2 + OH = NT123L1O : 	1.53D-12 	;
+{7033.} 	 TM123O2 + HO2 = TM123OOH : 	KRO2HO2*0.90 	;
+{7034.} 	 TM123O2 + NO = TM123O + NO2 : 	KRO2NO 	;
+{7035.} 	 TM123O2 + NO3 = TM123O + NO2 : 	KRO2NO3 	;
+{7036.} 	 TM123O2 = TM123O : 	2.50D-13*RO2 	;
+{7037.} 	 TM123OLOOH + OH = TM123OLO2 : 	1.89D-10 	;
+{7038.} 	 TM123OLOOH = TM123OLO + OH : 	J(41) 	;
+{7039.} 	 TM123OLO = C7ADCCO2H + GLYOX + HO2 : 	KDEC 	;
+{7040.} 	 TM123OLOH + OH = TM123OLO : 	1.85D-10 	;
+{7041.} 	 T123CAT1O + NO2 = T123NCATEC : 	2.08D-12 	;
+{7042.} 	 T123CAT1O + O3 = T123CAT1O2 : 	2.86D-13 	;
+{7043.} 	 T123CTCOOA = C5DBCOCO2H + CH3COCO2H + HO2 + OH : 	KDEC 	;
+{7044.} 	 C7ADICARB + NO3 = C7ADCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{7045.} 	 C7ADICARB + OH = C7ADCCO3 : 	5.58D-11*0.50 	;
+{7046.} 	 C7ADICARB + OH = C7ADCO2 : 	5.58D-11*0.50 	;
+{7047.} 	 C7ADICARB = C7ADCCO3 + HO2 : 	J(4)*0.2*0.6 	;
+{7048.} 	 C7ADICARB = TMB2FUONE : 	J(4)*0.2*0.4 	;
+{7049.} 	 TMB1FUONE + NO3 = NTMB1FUO2 : 	1.00D-12 	;
+{7050.} 	 TMB1FUONE + O3 = C5OCO3M : 	8.00D-17 	;
+{7051.} 	 TMB1FUONE + OH = TMB1FUO2 : 	2.66D-11 	;
+{7052.} 	 TMB2FUONE + NO3 = NTMB2FUO2 : 	1.00D-12 	;
+{7053.} 	 TMB2FUONE + O3 = MC6OTKETO2 + OH : 	1.40D-18 	;
+{7054.} 	 TMB2FUONE + OH = TMB2FUO2 : 	3.26D-11 	;
+{7055.} 	 EPXKTMCO3 + HO2 = C4MCO2O2 + OH : 	KAPHO2*0.44 	;
+{7056.} 	 EPXKTMCO3 + HO2 = EPXKTMCO2H + O3 : 	KAPHO2*0.15 	;
+{7057.} 	 EPXKTMCO3 + HO2 = EPXKTMCO3H : 	KAPHO2*0.41 	;
+{7058.} 	 EPXKTMCO3 + NO = C4MCO2O2 + NO2 : 	KAPNO 	;
+{7059.} 	 EPXKTMCO3 + NO2 = EPXKTMPAN : 	KFPAN 	;
+{7060.} 	 EPXKTMCO3 + NO3 = C4MCO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{7061.} 	 EPXKTMCO3 = C4MCO2O2 : 	1.00D-11*RO2*0.70 	;
+{7062.} 	 EPXKTMCO3 = EPXKTMCO2H : 	1.00D-11*RO2*0.30 	;
+{7063.} 	 C4CO2O2 + HO2 = C4CO2OOH : 	KRO2HO2*0.625 	;
+{7064.} 	 C4CO2O2 + NO = C4CO2O + NO2 : 	KRO2NO 	;
+{7065.} 	 C4CO2O2 + NO3 = C4CO2O + NO2 : 	KRO2NO3 	;
+{7066.} 	 C4CO2O2 = C4CO2O : 	8.80D-12*RO2 	;
+{7067.} 	 TM123MUOOH + OH = TM123MUCCO + OH : 	9.05D-11 	;
+{7068.} 	 TM123MUOOH = TM123MUCO + OH : 	J(41)+J(22)*2 	;
+{7069.} 	 TM123MUCO = C4MCO2O2 + CO2H3CHO : 	KDEC*0.5 	;
+{7070.} 	 TM123MUCO = EPXALMKT + MGLYOX + HO2 : 	KDEC*0.5 	;
+{7071.} 	 TM123MUNO3 + OH = TM123MUCCO + NO2 : 	2.88D-12 	;
+{7072.} 	 TM123MUNO3 = EPXALMKT + NO2 + MGLYOX + HO2 : 	J(22)*2 	;
+{7073.} 	 TM123MUCCO + OH = EPXKTMCO3 + MGLYOX : 	5.65D-12 	;
+{7074.} 	 TM123MUCCO = C4MCO2O2 + CO2H3CO3 : 	J(22) 	;
+{7075.} 	 TM123MUCCO = EPXKTMCO3 + MGLYOX + HO2 : 	J(22)*2 	;
+{7076.} 	 TM123MUCOH + OH = TM123MUCCO + HO2 : 	4.14D-11 	;
+{7077.} 	 TM123MUCOH = TM123MUCO + HO2 : 	J(22)*2 	;
+{7078.} 	 TM124BCO3 + HO2 = DM124O2 + OH : 	KAPHO2*0.44 	;
+{7079.} 	 TM124BCO3 + HO2 = TM124BCO2H + O3 : 	KAPHO2*0.15 	;
+{7080.} 	 TM124BCO3 + HO2 = TM124BCO3H : 	KAPHO2*0.41 	;
+{7081.} 	 TM124BCO3 + NO = DM124O2 + NO2 : 	KAPNO 	;
+{7082.} 	 TM124BCO3 + NO2 = TM124BPAN : 	KFPAN 	;
+{7083.} 	 TM124BCO3 + NO3 = DM124O2 + NO2 : 	KRO2NO3*1.74 	;
+{7084.} 	 TM124BCO3 = DM124O2 : 	1.00D-11*RO2*0.70 	;
+{7085.} 	 TM124BCO3 = TM124BCO2H : 	1.00D-11*RO2*0.30 	;
+{7086.} 	 DM124O2 + HO2 = DM124OOH : 	KRO2HO2*0.859 	;
+{7087.} 	 DM124O2 + NO = DM124O + NO2 : 	KRO2NO 	;
+{7088.} 	 DM124O2 + NO3 = DM124O2 + NO2 : 	KRO2NO3 	;
+{7089.} 	 DM124O2 = DM124O : 	2.50D-13*RO2 	;
+{7090.} 	 C7BDICARB + O3 = BIACET + MGLOOC : 	1.25D-17*0.5 	;
+{7091.} 	 C7BDICARB + O3 = MEK2OOC + MGLYOX : 	1.25D-17*0.5 	;
+{7092.} 	 C7BDICARB + OH = C7BDCO2 : 	6.90D-11 	;
+{7093.} 	 C7BDICARB = CH3CO3 + BIACET + HO2 + CO : 	J(4)*0.0057*0.5 	;
+{7094.} 	 C7BDICARB = CH3CO3 + CH3CO3 + MGLYOX : 	J(4)*0.0057*0.5 	;
+{7095.} 	 NTM124LOOH + OH = NTM124OLO2 : 	1.43D-10 	;
+{7096.} 	 NTM124LOOH = NTM124OLO + OH : 	J(41) 	;
+{7097.} 	 NTM124LOOH = TM124OLO + OH + NO2 : 	J(54) 	;
+{7098.} 	 NTM124OLO = C3M2COCO2H + MGLYOX + NO2 : 	KDEC 	;
+{7099.} 	 NTM124OLOH + OH = NTM124OLO : 	1.40D-10 	;
+{7100.} 	 NTM124OLOH = TM124OLO + HO2 + NO2 : 	J(54) 	;
+{7101.} 	 TM124OHNO2 + NO3 = NT124L1O + HNO3 : 	3.13D-13 	;
+{7102.} 	 TM124OHNO2 + OH = NT124L1O : 	1.53D-12 	;
+{7103.} 	 TM124O2 + HO2 = TM124OOH : 	KRO2HO2*0.90 	;
+{7104.} 	 TM124O2 + NO = TM124O + NO2 : 	KRO2NO 	;
+{7105.} 	 TM124O2 + NO3 = TM124O + NO2 : 	KRO2NO3 	;
+{7106.} 	 TM124O2 = TM124O : 	2.50D-13*RO2 	;
+{7107.} 	 TM124OLOOH + OH = TM124OLO2 : 	1.51D-10 	;
+{7108.} 	 TM124OLOOH = TM124OLO + OH : 	J(41) 	;
+{7109.} 	 TM124OLO = C3M2COCO2H + MGLYOX + HO2 : 	KDEC*0.78 	;
+{7110.} 	 TM124OLO = TM124QONE + HO2 : 	KDEC*0.22 	;
+{7111.} 	 TM124OLOH + OH = TM124OLO : 	1.48D-10 	;
+{7112.} 	 T124CAT1O + NO2 = T124NCATEC : 	2.08D-12 	;
+{7113.} 	 T124CAT1O + O3 = T124CAT1O2 : 	2.86D-13 	;
+{7114.} 	 T124CTCOOA = C5CODBCO2H + CH3COCO2H + HO2 + OH : 	KDEC 	;
+{7115.} 	 TM124MUO2H + OH = C7CO2M5O2 : 	5.89D-11 	;
+{7116.} 	 TM124MUO2H = EPXM2DCO2H + HO2 + CO + CH3CO3 : 	J(23)+J(24) 	;
+{7117.} 	 TM124MUO3H + OH = TM124MUCO3 : 	6.20D-11 	;
+{7118.} 	 TM124MUO3H = C7CO2M5O2 + OH : 	J(41) 	;
+{7119.} 	 TM124MUO3H = EPXM2DCO3H + CH3CO3 + HO2 + CO : 	J(23)+J(24) 	;
+{7120.} 	 TM124MUPAN + OH = C4DBDIKET + CH3O2 + CO + NO2 : 	5.88D-11 	;
+{7121.} 	 TM124MUPAN = TM124MUCO3 + NO2 : 	KBPAN 	;
+{7122.} 	 TM124MUOOH + OH = TM124MUCCO + OH : 	1.10D-10 	;
+{7123.} 	 TM124MUOOH = TM124MUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7124.} 	 TM124MUCO = C4MCO2O2 + CO2H3CHO : 	KDEC*0.5 	;
+{7125.} 	 TM124MUCO = EPXM2C4DAL + MGLYOX + HO2 : 	KDEC*0.5 	;
+{7126.} 	 TM124MUNO3 + OH = TM124MUCCO + NO2 : 	2.33D-11 	;
+{7127.} 	 TM124MUNO3 = EPXM2C4DAL + NO2 + HO2 + MGLYOX : 	J(17)+J(22) 	;
+{7128.} 	 TM124MUCCO + OH = EPXM2DLCO3 + MGLYOX : 	2.58D-11 	;
+{7129.} 	 TM124MUCCO = CO2H3CO3 + C4MCO2O2 : 	J(17)+J(22)*2 	;
+{7130.} 	 TM124MUCOH + OH = TM124MUCCO + HO2 : 	6.06D-11 	;
+{7131.} 	 TM124MUCOH = TM124MUCO + HO2 : 	J(17)+J(22) 	;
+{7132.} 	 C7CO2M5OOH + OH = C7CO2M5O2 : 	6.19D-11 	;
+{7133.} 	 C7CO2M5OOH = C4MCO2OOH + HO2 + CO + CH3CO3 : 	J(24) 	;
+{7134.} 	 C7CO2M5OOH = C7CO2M5O + OH : 	J(41) 	;
+{7135.} 	 C7CO2M5OOH = CH3CO3 + C4DBDIKET + OH : 	J(22) 	;
+{7136.} 	 C7CO2M5O = C4DBDIKET + CH3CO3 : 	KDEC 	;
+{7137.} 	 C7CO2M5OH + OH = C7CO2M5O : 	9.30D-11 	;
+{7138.} 	 C7CO2M5OH = C4MCO2OH + HO2 + CO + CH3CO3 : 	J(24) 	;
+{7139.} 	 C7CO2M5OH = CH3CO3 + C4DBDIKET + HO2 : 	J(22) 	;
+{7140.} 	 TMBCO3 + HO2 = DMPHO2 + OH : 	KAPHO2*0.44 	;
+{7141.} 	 TMBCO3 + HO2 = TMBCO2H + O3 : 	KAPHO2*0.15 	;
+{7142.} 	 TMBCO3 + HO2 = TMBCO3H : 	KAPHO2*0.41 	;
+{7143.} 	 TMBCO3 + NO = DMPHO2 + NO2 : 	KAPNO 	;
+{7144.} 	 TMBCO3 + NO2 = TMBPAN : 	KFPAN 	;
+{7145.} 	 TMBCO3 + NO3 = DMPHO2 + NO2 : 	KRO2NO3*1.74 	;
+{7146.} 	 TMBCO3 = DMPHO2 : 	1.00D-11*0.70*RO2 	;
+{7147.} 	 TMBCO3 = TMBCO2H : 	1.00D-11*0.30*RO2 	;
+{7148.} 	 DMPHO2 + HO2 = DMPHOOH : 	KRO2HO2*0.890 	;
+{7149.} 	 DMPHO2 + NO = DMPHO + NO2 : 	KRO2NO 	;
+{7150.} 	 DMPHO2 + NO3 = DMPHO + NO2 : 	KRO2NO3 	;
+{7151.} 	 DMPHO2 = DMPHO : 	2.50D-13*RO2 	;
+{7152.} 	 C4MCODBCO3 + HO2 = C4MCODBCO2 + OH : 	KAPHO2*0.44 	;
+{7153.} 	 C4MCODBCO3 + HO2 = C5CODBCO3H : 	KAPHO2*0.56 	;
+{7154.} 	 C4MCODBCO3 + NO = NO2 + C4MCODBCO2 : 	KAPNO 	;
+{7155.} 	 C4MCODBCO3 + NO2 = C4MCODBPAN : 	KFPAN 	;
+{7156.} 	 C4MCODBCO3 + NO3 = C4MCODBCO2 + NO2 : 	KRO2NO3*1.74 	;
+{7157.} 	 C4MCODBCO3 = C4MCODBCO2 : 	1.00D-11*0.70*RO2 	;
+{7158.} 	 C4MCODBCO3 = C5CODBCO2H : 	1.00D-11*0.30*RO2 	;
+{7159.} 	 NTM135LOOH + OH = NTM135OLO2 : 	1.44D-10 	;
+{7160.} 	 NTM135LOOH = NTM135OLO + OH : 	J(41) 	;
+{7161.} 	 NTM135LOOH = TM135OLO + OH + NO2 : 	J(54) 	;
+{7162.} 	 NTM135OLO = C5CODBCO2H + MGLYOX + NO2 : 	KDEC 	;
+{7163.} 	 NTM135OLOH + OH = NTM135OLO : 	1.40D-10 	;
+{7164.} 	 NTM135OLOH = TM135OLO + HO2 + NO2 : 	J(54) 	;
+{7165.} 	 TM135OLOOH + OH = TM135OLO2 : 	1.50D-10 	;
+{7166.} 	 TM135OLOOH = TM135OLO + OH : 	J(41) 	;
+{7167.} 	 TM135OLO = C5CODBCO2H + MGLYOX + HO2 : 	KDEC 	;
+{7168.} 	 TM135OLOH + OH = TM135OLO : 	1.47D-10 	;
+{7169.} 	 TM135MUO2H + OH = C7M2CO5O2 : 	8.08D-11 	;
+{7170.} 	 TM135MUO2H = C7M2CO5O2 + HO2 : 	J(23)+J(24) 	;
+{7171.} 	 TM135MUO3H + OH = TM135MUCO3 : 	8.38D-11 	;
+{7172.} 	 TM135MUO3H = C7M2CO5O2 + OH : 	J(41)+J(23)+J(24) 	;
+{7173.} 	 TM135MUPAN + OH = C5MDICARB + CH3O2 + CO + NO2 : 	8.06D-11 	;
+{7174.} 	 TM135MUPAN = TM135MUCO3 + NO2 : 	KBPAN 	;
+{7175.} 	 EPXMKTCO3 + HO2 = CO24C53O2 + OH : 	KAPHO2*0.44 	;
+{7176.} 	 EPXMKTCO3 + HO2 = EPXMKTCO2H + O3 : 	KAPHO2*0.15 	;
+{7177.} 	 EPXMKTCO3 + HO2 = EPXMKTCO3H : 	KAPHO2*0.41 	;
+{7178.} 	 EPXMKTCO3 + NO = CO24C53O2 + NO2 : 	KAPNO 	;
+{7179.} 	 EPXMKTCO3 + NO2 = EPXMKTPAN : 	KFPAN 	;
+{7180.} 	 EPXMKTCO3 + NO3 = CO24C53O2 + NO2 : 	KRO2NO3*1.74 	;
+{7181.} 	 EPXMKTCO3 = CO24C53O2 : 	1.00D-11*RO2*0.70 	;
+{7182.} 	 EPXMKTCO3 = EPXMKTCO2H : 	1.00D-11*RO2*0.30 	;
+{7183.} 	 CO24C53O2 + HO2 = CO24C53OOH : 	KRO2HO2*0.706 	;
+{7184.} 	 CO24C53O2 + NO = CO24C53O + NO2 : 	KRO2NO 	;
+{7185.} 	 CO24C53O2 + NO3 = CO24C53O + NO2 : 	KRO2NO3 	;
+{7186.} 	 CO24C53O2 = CO24C53O : 	8.80D-13*RO2 	;
+{7187.} 	 TM135MUOOH + OH = TM135MUCO2 : 	3.30D-11 	;
+{7188.} 	 TM135MUOOH = TM135MUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7189.} 	 TM135MUCO = C3MDIALO2 + C5CO243OH : 	KDEC*0.5 	;
+{7190.} 	 TM135MUCO = EPXMALKT + MGLYOX + HO2 : 	KDEC*0.5 	;
+{7191.} 	 TM135MUNO3 + OH = C3MDIALO2 + C5CO243OH + NO2 : 	2.31D-11 	;
+{7192.} 	 TM135MUNO3 = EPXMALKT + HO2 + MGLYOX + NO2 : 	J(17)+J(22) 	;
+{7193.} 	 TM135MUOH + OH = TM135MUCO : 	2.96D-11 	;
+{7194.} 	 TM135MUOH = TM135MUCO + HO2 : 	J(17)+J(22) 	;
+{7195.} 	 C7M2CO5OOH + OH = C7M3CO + OH : 	9.44D-11 	;
+{7196.} 	 C7M2CO5OOH = C5MDICARB + CH3CO3 + OH : 	J(22) 	;
+{7197.} 	 C7M2CO5OOH = C7M2CO5O + OH : 	J(41) 	;
+{7198.} 	 C7M2CO5OOH = CO24C53OOH + CH3CO3 + HO2 + CO : 	J(23) 	;
+{7199.} 	 C7M2CO5O = C5MDICARB + CH3CO3 : 	KDEC 	;
+{7200.} 	 C7M2CO5OH + OH = C7M3CO + HO2 : 	1.31D-10 	;
+{7201.} 	 C7M2CO5OH = C5MDICARB + HO2 + CH3CO3 : 	J(23)+J(22) 	;
+{7202.} 	 C7M3CO + OH = CH3CO3 + C4MCODBCO3 : 	7.10D-11 	;
+{7203.} 	 C7M3CO = C5CO234 + CH3CO3 + HO2 + CO : 	J(23) 	;
+{7204.} 	 C7M3CO = CH3CO3 + C4MCODBCO3 : 	J(35) 	;
+{7205.} 	 MPHCOMEO2 + HO2 = MPHCOMEOOH : 	KRO2HO2*0.890 	;
+{7206.} 	 MPHCOMEO2 + NO = MPHCOMEO + NO2 : 	KRO2NO 	;
+{7207.} 	 MPHCOMEO2 + NO3 = MPHCOMEO + NO2 : 	KRO2NO3 	;
+{7208.} 	 MPHCOMEO2 = MPHCOMEO : 	8.80D-13*RO2*0.6 	;
+{7209.} 	 MPHCOMEO2 = MPHCOMEOH : 	8.80D-13*RO2*0.2 	;
+{7210.} 	 MPHCOMEO2 = MPHGLYOX : 	8.80D-13*RO2*0.2 	;
+{7211.} 	 OETLMUCO2H + OH = MC7CO2O2 : 	4.31D-11 	;
+{7212.} 	 OETLMUCO2H = MC7CO2O2 + HO2 : 	J(18)+J(19) 	;
+{7213.} 	 OETLMUCO3H + OH = OETLMUCCO3 : 	4.61D-11 	;
+{7214.} 	 OETLMUCO3H = MC7CO2O2 + OH : 	J(41)+J(18)+J(19) 	;
+{7215.} 	 OETLMUCPAN + OH = C5DICARB + C2H5CHO + NO2 : 	4.29D-11 	;
+{7216.} 	 OETLMUCPAN = OETLMUCCO3 + NO2 : 	KBPAN 	;
+{7217.} 	 EPXMEDLCO3 + HO2 = C4ECO2O2 + OH : 	KAPHO2*0.44 	;
+{7218.} 	 EPXMEDLCO3 + HO2 = EPXMEDCO2H + O3 : 	KAPHO2*0.15 	;
+{7219.} 	 EPXMEDLCO3 + HO2 = EPXMEDCO3H : 	KAPHO2*0.41 	;
+{7220.} 	 EPXMEDLCO3 + NO = C4ECO2O2 + NO2 : 	KAPNO 	;
+{7221.} 	 EPXMEDLCO3 + NO2 = EPXMEDLPAN : 	KFPAN 	;
+{7222.} 	 EPXMEDLCO3 + NO3 = C4ECO2O2 + NO2 : 	KRO2NO3*1.74 	;
+{7223.} 	 EPXMEDLCO3 = C4ECO2O2 : 	1.00D-11*RO2*0.70 	;
+{7224.} 	 EPXMEDLCO3 = EPXMEDCO2H : 	1.00D-11*RO2*0.30 	;
+{7225.} 	 C4ECO2O2 + HO2 = C4ECO2OOH : 	KRO2HO2*0.770 	;
+{7226.} 	 C4ECO2O2 + NO = C4ECO2O + NO2 : 	KRO2NO 	;
+{7227.} 	 C4ECO2O2 + NO3 = C4ECO2O + NO2 : 	KRO2NO3 	;
+{7228.} 	 C4ECO2O2 = C4ECO2O : 	9.20D-14*RO2 	;
+{7229.} 	 OETLMUCOOH + OH = OETLMUCCO + OH : 	9.66D-11 	;
+{7230.} 	 OETLMUCOOH = OETLMUCO + OH : 	J(41)+J(17)*2 	;
+{7231.} 	 OETLMUCNO3 + OH = OETLMUCCO + NO2 : 	3.59D-11 	;
+{7232.} 	 OETLMUCNO3 = EPXMEC4DAL + NO2 + HO2 + CO + HO2 : 	J(17)*2 	;
+{7233.} 	 OETLMUCO = C4ECO2O2 + C32OH13CO : 	KDEC*0.5 	;
+{7234.} 	 OETLMUCO = EPXMEC4DAL + GLYOX + HO2 : 	KDEC*0.5 	;
+{7235.} 	 OETLMUCCO + OH = EPXMEC4DAL + HO2 + CO : 	5.17D-11 	;
+{7236.} 	 OETLMUCCO = EPXMEC4DAL + HO2 + CO + CO + HO2 : 	J(17)+J(34) 	;
+{7237.} 	 OETLMUCOH + OH = OETLMUCCO + HO2 : 	8.44D-11 	;
+{7238.} 	 OETLMUCOH = OETLMUCO + HO2 : 	J(17)*2 	;
+{7239.} 	 MC7CO2OOH + OH = MC7CO2O2 : 	4.39D-11 	;
+{7240.} 	 MC7CO2OOH = C5DICARB + C2H5CO3 + OH : 	J(22) 	;
+{7241.} 	 MC7CO2OOH = MC7CO2O + OH : 	J(41)+J(18)+J(19) 	;
+{7242.} 	 MC7CO2O = C5DICARB + C2H5CO3 : 	KDEC 	;
+{7243.} 	 MC7CO2OH + OH = C5DICARB + C2H5CO3 : 	5.35D-11 	;
+{7244.} 	 MC7CO2OH = C5DICARB + C2H5CO3 + HO2 : 	J(22) 	;
+{7245.} 	 MC7CO2OH = MC7CO2O + HO2 : 	J(18)+J(19) 	;
+{7246.} 	 NOETOLOOH + OH = NOETOLO2 : 	1.82D-10 	;
+{7247.} 	 NOETOLOOH = NOETOLO + OH : 	J(41) 	;
+{7248.} 	 NOETOLOOH = OETOLO + OH + NO2 : 	J(54) 	;
+{7249.} 	 NOETOLO = C7CDCCO2H + GLYOX + NO2 : 	KDEC 	;
+{7250.} 	 NOETOLOH + OH = NOETOLO : 	1.79D-10 	;
+{7251.} 	 NOETOLOH = OETOLO + HO2 + NO2 : 	J(54) 	;
+{7252.} 	 OET1OHNO2 + NO3 = NOETOL1O + HNO3 : 	3.13D-13 	;
+{7253.} 	 OET1OHNO2 + OH = NOETOL1O : 	1.53D-12 	;
+{7254.} 	 OET1O2 + HO2 = OET1OOH : 	KRO2HO2*0.90 	;
+{7255.} 	 OET1O2 + NO = OET1O + NO2 : 	KRO2NO 	;
+{7256.} 	 OET1O2 + NO3 = OET1O + NO2 : 	KRO2NO3 	;
+{7257.} 	 OET1O2 = OET1O : 	2.50D-13*RO2 	;
+{7258.} 	 OETOLOOH + OH = OETOLO2 : 	1.51D-10 	;
+{7259.} 	 OETOLOOH = OETOLO + OH : 	J(41) 	;
+{7260.} 	 OETOLO = C7CDCCO2H + GLYOX + HO2 : 	KDEC*0.52 	;
+{7261.} 	 OETOLO = OETLQONE + HO2 : 	KDEC*0.48 	;
+{7262.} 	 OETOLOH + OH = OETOLO : 	1.48D-10 	;
+{7263.} 	 OTCATEC1O + NO2 = OTNCATECH : 	2.08D-12 	;
+{7264.} 	 OTCATEC1O + O3 = OTCATEC1O2 : 	2.86D-13 	;
+{7265.} 	 OTCATECOOA = C5CO14OH + ECOCO2H + HO2 + OH : 	KDEC 	;
+{7266.} 	 METLMUCO2H + OH = C826CO3O2 : 	6.12D-11 	;
+{7267.} 	 METLMUCO2H = C826CO3O2 + HO2 : 	J(23)+J(24) 	;
+{7268.} 	 METLMUCO3H + OH = METLMUCCO3 : 	6.42D-11 	;
+{7269.} 	 METLMUCO3H = C826CO3O2 + OH : 	J(41)+J(23)+J(24) 	;
+{7270.} 	 METLMUCPAN + OH = C6DICARB + CH3CHO + NO2 : 	6.10D-11 	;
+{7271.} 	 METLMUCPAN = METLMUCCO3 + NO2 : 	KBPAN 	;
+{7272.} 	 METLMUCOOH + OH = METLMUCCO + OH : 	7.53D-11 	;
+{7273.} 	 METLMUCOOH = METLMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7274.} 	 METLMUCNO3 + OH = METLMUCCO + NO2 : 	3.19D-11 	;
+{7275.} 	 METLMUCNO3 = EPXMC4DIAL + NO2 + C2H5CO3 + HO2 : 	J(17)+J(22) 	;
+{7276.} 	 METLMUCO = C3MDIALO2 + CO3H4CHO : 	KDEC*0.5 	;
+{7277.} 	 METLMUCO = EPXMC4DIAL + EGLYOX + HO2 : 	KDEC*0.5 	;
+{7278.} 	 METLMUCCO + OH = EPXMC4DIAL + CO + C2H5CO3 : 	4.27D-11 	;
+{7279.} 	 METLMUCCO = EPXMC4DIAL + HO2 + CO + C2H5CO3 : 	J(17)+J(35) 	;
+{7280.} 	 METLMUCOH + OH = METLMUCCO + HO2 : 	6.31D-11 	;
+{7281.} 	 METLMUCOH = METLMUCO + HO2 : 	J(17)+J(22) 	;
+{7282.} 	 C826CO3OOH + OH = C826CO3O2 : 	7.47D-11 	;
+{7283.} 	 C826CO3OOH = C6DICARB + CH3CO3 + OH : 	J(22) 	;
+{7284.} 	 C826CO3OOH = C826CO3O + OH : 	J(41)+J(23)*2 	;
+{7285.} 	 C826CO3O = C6DICARB + CH3CO3 : 	KDEC 	;
+{7286.} 	 C8236CO + OH = C6DCARBBO2 + CH3CO3 : 	5.33D-11 	;
+{7287.} 	 C8236CO = C6DCARBBO2 + CH3CO3 : 	J(34) 	;
+{7288.} 	 C8236CO = CO23C3CHO + C2H5CO3 + HO2 + CO : 	J(23)*2 	;
+{7289.} 	 C826CO3OH + OH = C6DICARB + CH3CO3 : 	9.87D-11 	;
+{7290.} 	 C826CO3OH = C6DICARB + CH3CO3 + HO2 : 	J(22) 	;
+{7291.} 	 C826CO3OH = C826CO3O + HO2 : 	J(23)*2 	;
+{7292.} 	 MET1OHNO2 + NO3 = NMETOL1O + HNO3 : 	3.13D-13 	;
+{7293.} 	 MET1OHNO2 + OH = NMETOL1O : 	1.53D-12 	;
+{7294.} 	 MET1O2 + HO2 = MET1OOH : 	KRO2HO2*0.90 	;
+{7295.} 	 MET1O2 + NO = MET1O + NO2 : 	KRO2NO 	;
+{7296.} 	 MET1O2 + NO3 = MET1O + NO2 : 	KRO2NO3 	;
+{7297.} 	 MET1O2 = MET1O : 	2.50D-13*RO2 	;
+{7298.} 	 METOLOOH + OH = METOLO2 : 	1.14D-10 	;
+{7299.} 	 METOLOOH = METOLO + OH : 	J(41) 	;
+{7300.} 	 METOLO = C6DCRBBOH + MGLYOX + HO2 : 	KDEC*0.85 	;
+{7301.} 	 METOLO = METLQONE + HO2 : 	KDEC*0.15 	;
+{7302.} 	 METOLOH + OH = METOLO : 	1.11D-10 	;
+{7303.} 	 NMETOLOOH + OH = NMETOLO2 : 	1.08D-10 	;
+{7304.} 	 NMETOLOOH = METOLO + OH + NO2 : 	J(54) 	;
+{7305.} 	 NMETOLOOH = NMETOLO + OH : 	J(41) 	;
+{7306.} 	 NMETOLO = C6DCRBBOH + MGLYOX + NO2 : 	KDEC 	;
+{7307.} 	 NMETOLOH + OH = NMETOLO : 	1.05D-10 	;
+{7308.} 	 NMETOLOH = METOLO + HO2 + NO2 : 	J(54) 	;
+{7309.} 	 MTCATEC1O + NO2 = MTNCATECH : 	2.08D-12 	;
+{7310.} 	 MTCATEC1O + O3 = MTCATEC1O2 : 	2.86D-13 	;
+{7311.} 	 MTCATECOOA = C3MCOCO2H + ECOCO2H + HO2 + OH : 	KDEC 	;
+{7312.} 	 C7EDICARB + O3 = EGLYOOB + MGLYOX : 	5.00D-18*0.5 	;
+{7313.} 	 C7EDICARB + O3 = EGLYOX + MGLOOB : 	5.00D-18*0.5 	;
+{7314.} 	 C7EDICARB + OH = C7EDCO2 : 	6.90D-11 	;
+{7315.} 	 C7EDICARB = C2H5CO3 + MGLYOX + HO2 + CO : 	J(4)*0.0057*0.5 	;
+{7316.} 	 C7EDICARB = EGLYOX + CH3CO3 + HO2 + CO : 	J(4)*0.0057*0.5 	;
+{7317.} 	 PETLMUCO2H + OH = C7M6CO2O2 : 	5.98D-11 	;
+{7318.} 	 PETLMUCO2H = C7M6CO2O2 + HO2 : 	J(23)+J(24) 	;
+{7319.} 	 PETLMUCO3H + OH = PETLMUCCO3 : 	6.29D-11 	;
+{7320.} 	 PETLMUCO3H = C7M6CO2O2 + OH : 	J(41)+J(23)+J(24) 	;
+{7321.} 	 PETLMUCPAN + OH = C7EDICARB + CO + NO2 : 	5.97D-11 	;
+{7322.} 	 PETLMUCPAN = PETLMUCCO3 + NO2 : 	KBPAN 	;
+{7323.} 	 PETLMUCOOH + OH = PETLMUCCO + OH : 	7.37D-11 	;
+{7324.} 	 PETLMUCOOH = PETLMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7325.} 	 PETLMUCNO3 + OH = PETLMUCCO + NO2 : 	3.03D-11 	;
+{7326.} 	 PETLMUCNO3 = EPXMC4DIAL + NO2 + C2H5CO3 + HO2 : 	J(17)+J(22) 	;
+{7327.} 	 PETLMUCO = CO3H4CHO + C4CO2O2 : 	KDEC*0.5 	;
+{7328.} 	 PETLMUCO = EPXMC4DIAL + EGLYOX + HO2 : 	KDEC*0.5 	;
+{7329.} 	 PETLMUCCO + OH = EPXMC4DIAL + CO + C2H5CO3 : 	3.77D-11 	;
+{7330.} 	 PETLMUCCO = EPXMC4DIAL + HO2 + CO + C2H5CO3 : 	J(17)+J(35) 	;
+{7331.} 	 PETLMUCOH + OH = PETLMUCCO + HO2 : 	6.15D-11 	;
+{7332.} 	 PETLMUCOH = PETLMUCO + HO2 : 	J(17)+J(22) 	;
+{7333.} 	 C7M6CO2OOH + OH = C7M6CO2O2 : 	8.36D-11 	;
+{7334.} 	 C7M6CO2OOH = C3MDIALOOH + C2H5CO3 + HO2 + CO : 	J(23)*2 	;
+{7335.} 	 C7M6CO2OOH = C7EDICARB + HO2 + CO + OH : 	J(17) 	;
+{7336.} 	 C7M6CO2OOH = C7M6CO2O + OH : 	J(41) 	;
+{7337.} 	 C7M6CO2O = C7EDICARB + HO2 + CO : 	KDEC 	;
+{7338.} 	 C7M6CO2OH + OH = C7EDICARB + HO2 + CO : 	1.15D-10 	;
+{7339.} 	 C7M6CO2OH = C3MDIALOH + C2H5CO3 + HO2 + CO : 	J(23)*2 	;
+{7340.} 	 C7M6CO2OH = C7EDICARB + HO2 + CO + HO2 : 	J(17) 	;
+{7341.} 	 NPETOLOOH + OH = NPETOLO2 : 	1.43D-10 	;
+{7342.} 	 NPETOLOOH = NPETOLO + OH : 	J(41) 	;
+{7343.} 	 NPETOLOOH = PETOLO + OH + NO2 : 	J(54) 	;
+{7344.} 	 NPETOLO = C3MCOCO2H + EGLYOX + NO2 : 	KDEC 	;
+{7345.} 	 NPETOLOH + OH = NPETOLO : 	1.40D-10 	;
+{7346.} 	 NPETOLOH = PETOLO + HO2 + NO2 : 	J(54) 	;
+{7347.} 	 PET1OHNO2 + NO3 = NPETOL1O + HNO3 : 	3.13D-13 	;
+{7348.} 	 PET1OHNO2 + OH = NPETOL1O : 	1.53D-12 	;
+{7349.} 	 PET1O2 + HO2 = PET1OOH : 	KRO2HO2*0.90 	;
+{7350.} 	 PET1O2 + NO = PET1O + NO2 : 	KRO2NO 	;
+{7351.} 	 PET1O2 + NO3 = PET1O + NO2 : 	KRO2NO3 	;
+{7352.} 	 PET1O2 = PET1O : 	2.50D-13*RO2 	;
+{7353.} 	 PETOLOOH + OH = PETOLO2 : 	1.51D-10 	;
+{7354.} 	 PETOLOOH = PETOLO + OH : 	J(41) 	;
+{7355.} 	 PETOLO = C3MCOCO2H + EGLYOX + HO2 : 	KDEC*0.68 	;
+{7356.} 	 PETOLO = PETLQONE + HO2 : 	KDEC*0.32 	;
+{7357.} 	 PETOLOH + OH = PETOLO : 	1.48D-10 	;
+{7358.} 	 PTCATEC1O + NO2 = PTNCATECH : 	2.08D-12 	;
+{7359.} 	 PTCATEC1O + O3 = PTCATEC1O2 : 	2.86D-13 	;
+{7360.} 	 PTCATECOOA = MC3ODBCO2H + ECOCO2H + HO2 + OH : 	KDEC 	;
+{7361.} 	 DMPHCOMO2 + HO2 = DMPHCOMOOH : 	KRO2HO2*0.914 	;
+{7362.} 	 DMPHCOMO2 + NO = DMPHCOMO + NO2 : 	KRO2NO 	;
+{7363.} 	 DMPHCOMO2 + NO3 = DMPHCOMO + NO2 : 	KRO2NO3 	;
+{7364.} 	 DMPHCOMO2 = DMPHCOMO : 	8.80D-13*RO2*0.6 	;
+{7365.} 	 DMPHCOMO2 = DMPHCOMOH : 	8.80D-13*RO2*0.2 	;
+{7366.} 	 DMPHCOMO2 = DMPHGLYOX : 	8.80D-13*RO2*0.2 	;
+{7367.} 	 C7DDICARB + NO3 = C7DDCCO3 + HNO3 : 	KNO3AL*4.25 	;
+{7368.} 	 C7DDICARB + O3 = EGLYOOD + MGLYOX : 	5.00D-18*0.5 	;
+{7369.} 	 C7DDICARB + O3 = EGLYOX + MGLYOOA : 	5.00D-18*0.5 	;
+{7370.} 	 C7DDICARB + OH = C7DDCCO3 : 	5.58D-11*0.50 	;
+{7371.} 	 C7DDICARB + OH = C7DDCO2 : 	5.58D-11*0.50 	;
+{7372.} 	 C7DDICARB = C7DDCCO3 + HO2 : 	J(4)*0.2*0.6 	;
+{7373.} 	 C7DDICARB = MEBFUONE : 	J(4)*0.2*0.4 	;
+{7374.} 	 MEBFUONE + NO3 = NMEBFUO2 : 	1.00D-12 	;
+{7375.} 	 MEBFUONE + O3 = CO + C23O3EO2 + OH : 	8.00D-19 	;
+{7376.} 	 MEBFUONE + OH = MEBFUO2 : 	2.89D-11 	;
+{7377.} 	 DMEBMUO2H + OH = C8M2CO6O2 : 	8.19D-11 	;
+{7378.} 	 DMEBMUO2H = C8M2CO6O2 + HO2 : 	J(23)+J(24) 	;
+{7379.} 	 DMEBMUO3H + OH = DMEBMUCO3 : 	8.50D-11 	;
+{7380.} 	 DMEBMUO3H = C8M2CO6O2 + OH : 	J(41)+J(23)+J(24) 	;
+{7381.} 	 DMEBMUPAN + OH = C7DDICARB + CH3CHO + NO2 : 	8.17D-11 	;
+{7382.} 	 DMEBMUPAN = DMEBMUCO3 + NO2 : 	KBPAN 	;
+{7383.} 	 DMEBMUOOH + OH = DMEBMUCO2 : 	3.41D-11 	;
+{7384.} 	 DMEBMUOOH = DMEBMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7385.} 	 DMEBMUCO = C3MDIALO2 + C6CO243OH : 	KDEC*0.5 	;
+{7386.} 	 DMEBMUCO = EPXMALKT + EGLYOX + HO2 : 	KDEC*0.5 	;
+{7387.} 	 DMEBMUNO3 + OH = C3MDIALO2 + C6CO243OH + NO2 : 	2.42D-11 	;
+{7388.} 	 DMEBMUNO3 = EPXMALKT + EGLYOX + HO2 + NO2 : 	J(17)+J(22) 	;
+{7389.} 	 DMEBMUOH + OH = DMEBMUCO : 	3.07D-11 	;
+{7390.} 	 DMEBMUOH = DMEBMUCO + HO2 : 	J(17)+J(22) 	;
+{7391.} 	 C8M2CO6OOH + OH = C8M3CO + OH : 	9.55D-11 	;
+{7392.} 	 C8M2CO6OOH = C7DDICARB + CH3CO3 + OH : 	J(22) 	;
+{7393.} 	 C8M2CO6OOH = C8M2CO6O + OH : 	J(41) 	;
+{7394.} 	 C8M2CO6OOH = CO24C53OOH + C2H5CO3 + HO2 + CO : 	J(23) 	;
+{7395.} 	 C8M2CO6O = C7DDICARB + CH3CO3 : 	KDEC 	;
+{7396.} 	 C8M2CO6OH + OH = C8M3CO + HO2 : 	1.32D-10 	;
+{7397.} 	 C8M2CO6OH = C7DDICARB + HO2 + CH3CO3 : 	J(23)+J(22) 	;
+{7398.} 	 C8M3CO + OH = EGLYOX + C5CO234 + HO2 : 	7.21D-11 	;
+{7399.} 	 C8M3CO = C5CO234 + C2H5CO3 + HO2 + CO : 	J(35)+J(23) 	;
+{7400.} 	 NDMEPLOOH + OH = NDMEPHOLO2 : 	1.45D-10 	;
+{7401.} 	 NDMEPLOOH = DMEPHOLO + OH + NO2 : 	J(54) 	;
+{7402.} 	 NDMEPLOOH = NDMEPHOLO + OH : 	J(41) 	;
+{7403.} 	 NDMEPHOLO = C5CODBCO2H + EGLYOX + NO2 : 	KDEC 	;
+{7404.} 	 NDMEPHOLOH + OH = NDMEPHOLO : 	1.41D-10 	;
+{7405.} 	 NDMEPHOLOH = DMEPHOLO + HO2 + NO2 : 	J(54) 	;
+{7406.} 	 DMEPHOLOOH + OH = DMEPHOLO2 : 	1.51D-10 	;
+{7407.} 	 DMEPHOLOOH = DMEPHOLO + OH : 	J(41) 	;
+{7408.} 	 DMEPHOLO = C5CODBCO2H + EGLYOX + HO2 : 	KDEC 	;
+{7409.} 	 DMEPHOLOH + OH = DMEPHOLO : 	1.48D-10 	;
+{7410.} 	 EMPHCOMO2 + HO2 = EMPHCOMOOH : 	KRO2HO2*0.932 	;
+{7411.} 	 EMPHCOMO2 + NO = EMPHCOMO + NO2 : 	KRO2NO 	;
+{7412.} 	 EMPHCOMO2 + NO3 = EMPHCOMO + NO2 : 	KRO2NO3 	;
+{7413.} 	 EMPHCOMO2 = EMPHCOMO : 	8.80D-13*RO2*0.6 	;
+{7414.} 	 EMPHCOMO2 = EMPHCOMOH : 	8.80D-13*RO2*0.2 	;
+{7415.} 	 EMPHCOMO2 = EMPHGLYOX : 	8.80D-13*RO2*0.2 	;
+{7416.} 	 EMPHCO3 + HO2 = EMPHCO3H : 	KAPHO2*0.56 	;
+{7417.} 	 EMPHCO3 + HO2 = EMPHO2 + OH : 	KAPHO2*0.44 	;
+{7418.} 	 EMPHCO3 + NO = EMPHO2 + NO2 : 	KAPNO 	;
+{7419.} 	 EMPHCO3 + NO2 = EMPHPAN : 	KFPAN 	;
+{7420.} 	 EMPHCO3 + NO3 = EMPHO2 + NO2 : 	KRO2NO3*1.74 	;
+{7421.} 	 EMPHCO3 = EMPHO2 : 	1.00D-11*RO2 	;
+{7422.} 	 NDEMPLOOH + OH = NDEMPHOLO2 : 	1.46D-10 	;
+{7423.} 	 NDEMPLOOH = DEMPHOLO + OH + NO2 : 	J(54) 	;
+{7424.} 	 NDEMPLOOH = NDEMPHOLO + OH : 	J(41) 	;
+{7425.} 	 NDEMPHOLO = C7DDCCO2H + EGLYOX + NO2 : 	KDEC 	;
+{7426.} 	 NDEMPHOLOH + OH = NDEMPHOLO : 	1.43D-10 	;
+{7427.} 	 NDEMPHOLOH = DEMPHOLO + HO2 + NO2 : 	J(54) 	;
+{7428.} 	 DEMPHOLOOH + OH = DEMPHOLO2 : 	1.52D-10 	;
+{7429.} 	 DEMPHOLOOH = DEMPHOLO + OH : 	J(41) 	;
+{7430.} 	 DEMPHOLO = C7DDCCO2H + EGLYOX + HO2 : 	KDEC 	;
+{7431.} 	 DEMPHOLOH + OH = DEMPHOLO : 	1.49D-10 	;
+{7432.} 	 C7CODBCO3 + HO2 = C7ODLBCO3H : 	KAPHO2*0.56 	;
+{7433.} 	 C7CODBCO3 + HO2 = EGLYOX + C2H5CO3 + OH : 	KAPHO2*0.44 	;
+{7434.} 	 C7CODBCO3 + NO = EGLYOX + C2H5CO3 + NO2 : 	KAPNO 	;
+{7435.} 	 C7CODBCO3 + NO2 = C7CODBPAN : 	KFPAN 	;
+{7436.} 	 C7CODBCO3 + NO3 = EGLYOX + C2H5CO3 + NO2 : 	KRO2NO3*1.74 	;
+{7437.} 	 C7CODBCO3 = EGLYOX + C2H5CO3 : 	1.00D-11*RO2 	;
+{7438.} 	 DETLMUO2H + OH = C9M2CO6O2 : 	8.52D-11 	;
+{7439.} 	 DETLMUO2H = C9M2CO6O2 + HO2 : 	J(23)+J(24) 	;
+{7440.} 	 DETLMUO3H + OH = DETLMUCO3 : 	8.83D-11 	;
+{7441.} 	 DETLMUO3H = C9M2CO6O2 + OH : 	J(41)+J(23)+J(24) 	;
+{7442.} 	 DETLMUPAN + OH = C7DDICARB + C2H5CHO + NO2 : 	8.50D-11 	;
+{7443.} 	 DETLMUPAN = DETLMUCO3 + NO2 : 	KBPAN 	;
+{7444.} 	 EPXEKTCO3 + HO2 = CO24C63O2 + OH : 	KAPHO2*0.44 	;
+{7445.} 	 EPXEKTCO3 + HO2 = EPXEKTCO2H + O3 : 	KAPHO2*0.15 	;
+{7446.} 	 EPXEKTCO3 + HO2 = EPXEKTCO3H : 	KAPHO2*0.41 	;
+{7447.} 	 EPXEKTCO3 + NO = CO24C63O2 + NO2 : 	KAPNO 	;
+{7448.} 	 EPXEKTCO3 + NO2 = EPXEKTPAN : 	KFPAN 	;
+{7449.} 	 EPXEKTCO3 + NO3 = CO24C63O2 + NO2 : 	KRO2NO3*1.74 	;
+{7450.} 	 EPXEKTCO3 = CO24C63O2 : 	1.00D-11*RO2*0.70 	;
+{7451.} 	 EPXEKTCO3 = EPXEKTCO2H : 	1.00D-11*RO2*0.30 	;
+{7452.} 	 C3EDIALO2 + HO2 = C3EDIALOOH : 	KRO2HO2*0.706 	;
+{7453.} 	 C3EDIALO2 + NO = C3EDIALO + NO2 : 	KRO2NO 	;
+{7454.} 	 C3EDIALO2 + NO3 = C3EDIALO + NO2 : 	KRO2NO3 	;
+{7455.} 	 C3EDIALO2 = C3EDIALO : 	9.20D-14*RO2*0.7 	;
+{7456.} 	 C3EDIALO2 = C3EDIALOH : 	9.20D-14*RO2*0.3 	;
+{7457.} 	 CO24C63O2 + HO2 = CO24C63OOH : 	KRO2HO2*0.770 	;
+{7458.} 	 CO24C63O2 + NO = CO24C63O + NO2 : 	KRO2NO 	;
+{7459.} 	 CO24C63O2 + NO3 = CO24C63O + NO2 : 	KRO2NO3 	;
+{7460.} 	 CO24C63O2 = C6CO243OH : 	8.80D-13*RO2*0.20 	;
+{7461.} 	 CO24C63O2 = CO234C6 : 	8.80D-13*RO2*0.20 	;
+{7462.} 	 CO24C63O2 = CO24C63O : 	8.80D-13*RO2*0.60 	;
+{7463.} 	 DETLMUOOH + OH = DETLMUCO2 : 	3.74D-11 	;
+{7464.} 	 DETLMUOOH = DETLMUCO + OH : 	J(41)+J(17)+J(22) 	;
+{7465.} 	 DETLMUCO = C3EDIALO2 + C6CO243OH : 	KDEC*0.5 	;
+{7466.} 	 DETLMUCO = EPXEALKT + EGLYOX + HO2 : 	KDEC*0.5 	;
+{7467.} 	 DETLMUNO3 + OH = C3EDIALO2 + C6CO243OH + NO2 : 	2.75D-11 	;
+{7468.} 	 DETLMUNO3 = EPXEALKT + EGLYOX + HO2 + NO2 : 	J(17)+J(22) 	;
+{7469.} 	 DETLMUOH + OH = DETLMUCO : 	3.40D-11 	;
+{7470.} 	 DETLMUOH = DETLMUCO + HO2 : 	J(17)+J(22) 	;
+{7471.} 	 C9M2CO6OOH + OH = C9M3CO + OH : 	9.66D-11 	;
+{7472.} 	 C9M2CO6OOH = C7DDICARB + C2H5CO3 + OH : 	J(22) 	;
+{7473.} 	 C9M2CO6OOH = C9M2CO6O + OH : 	J(41)+J(23) 	;
+{7474.} 	 C9M2CO6O = C7DDICARB + C2H5CO3 : 	KDEC 	;
+{7475.} 	 C9M2CO6OH + OH = C9M3CO + HO2 : 	1.33D-10 	;
+{7476.} 	 C9M2CO6OH = C7DDICARB + HO2 + C2H5CO3 : 	J(23)+J(22) 	;
+{7477.} 	 C9M3CO + OH = EGLYOX + CO234C6 + HO2 : 	7.40D-11 	;
+{7478.} 	 C9M3CO = CO234C6 + C2H5CO3 + HO2 + CO : 	J(35)+J(23) 	;
+{7479.} 	 CCL3CO3 + HO2 = CCL3CO3H : 	KAPHO2*0.56 	;
+{7480.} 	 CCL3CO3 + HO2 = CCL3O2 + OH : 	KAPHO2*0.44 	;
+{7481.} 	 CCL3CO3 + NO = CCL3O2 + NO2 : 	KAPNO 	;
+{7482.} 	 CCL3CO3 + NO2 = CCL3PAN : 	KFPAN 	;
+{7483.} 	 CCL3CO3 + NO3 = CCL3O2 + NO2 : 	KRO2NO3*1.74 	;
+{7484.} 	 CCL3CO3 = CCL3O2 : 	1.00D-11*RO2 	;
+{7485.} 	 CLGLYOX = CO + CO + CL + CL : 	J(15)*2 	;
+{7486.} 	 CLETO3 + HO2 = CH2CLO2 + OH : 	KAPHO2*0.44 	;
+{7487.} 	 CLETO3 + HO2 = CLETO2H + O3 : 	KAPHO2*0.15 	;
+{7488.} 	 CLETO3 + HO2 = CLETO3H : 	KAPHO2*0.41 	;
+{7489.} 	 CLETO3 + NO = CH2CLO2 + NO2 : 	KAPNO 	;
+{7490.} 	 CLETO3 + NO2 = CLETPAN : 	KFPAN 	;
+{7491.} 	 CLETO3 + NO3 = CH2CLO2 + NO2 : 	KRO2NO3*1.74 	;
+{7492.} 	 CLETO3 = CH2CLO2 : 	1.00D-11*0.70*RO2 	;
+{7493.} 	 CLETO3 = CLETO2H : 	1.00D-11*0.30*RO2 	;
+{7494.} 	 CL2OHCO3 + HO2 = CL2OHCO3H : 	KAPHO2*0.56 	;
+{7495.} 	 CL2OHCO3 + HO2 = COCL2 + HO2 + OH : 	KAPHO2*0.44 	;
+{7496.} 	 CL2OHCO3 + NO = COCL2 + HO2 + NO2 : 	KAPNO 	;
+{7497.} 	 CL2OHCO3 + NO2 = CL2OHPAN : 	KFPAN 	;
+{7498.} 	 CL2OHCO3 + NO3 = COCL2 + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{7499.} 	 CL2OHCO3 = COCL2 + HO2 : 	1.00D-11*0.70*RO2 	;
+{7500.} 	 CL12CO3 + HO2 = CL12CO2H + O3 : 	KAPHO2*0.15 	;
+{7501.} 	 CL12CO3 + HO2 = CL12CO3H : 	KAPHO2*0.41 	;
+{7502.} 	 CL12CO3 + HO2 = DICLETO2 + OH : 	KAPHO2*0.44 	;
+{7503.} 	 CL12CO3 + NO = DICLETO2 + NO2 : 	KAPNO 	;
+{7504.} 	 CL12CO3 + NO2 = CL12PAN : 	KFPAN 	;
+{7505.} 	 CL12CO3 + NO3 = DICLETO2 + NO2 : 	KRO2NO3*1.74 	;
+{7506.} 	 CL12CO3 = CL12CO2H : 	1.00D-11*0.30*RO2 	;
+{7507.} 	 CL12CO3 = DICLETO2 : 	1.00D-11*0.70*RO2 	;
+{7508.} 	 CH2CLCOCH3 + OH = CH3COCCLO2 : 	3.682D-13 	;
+{7509.} 	 CH2CLCOCH3 = CH3O2 + CLETO3 : 	J(22) 	;
+{7510.} 	 CLCOCLMEO2 + HO2 = CLCOCLMOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{7511.} 	 CLCOCLMEO2 + NO = CLCOCLMEO + NO2 : 	KRO2NO 	;
+{7512.} 	 CLCOCLMEO2 + NO3 = CLCOCLMEO + NO2 : 	KRO2NO3 	;
+{7513.} 	 CLCOCLMEO2 = CLCOCLMEO : 	9.20D-14*RO2 	;
+{7514.} 	 CHCL2CO3 + HO2 = CHCL2CO2H + O3 : 	KAPHO2*0.15 	;
+{7515.} 	 CHCL2CO3 + HO2 = CHCL2CO3H : 	KAPHO2*0.41 	;
+{7516.} 	 CHCL2CO3 + HO2 = CHCL2O2 + OH : 	KAPHO2*0.44 	;
+{7517.} 	 CHCL2CO3 + NO = CHCL2O2 + NO2 : 	KAPNO 	;
+{7518.} 	 CHCL2CO3 + NO2 = CHCL2PAN : 	KFPAN 	;
+{7519.} 	 CHCL2CO3 + NO3 = CHCL2O2 + NO2 : 	KRO2NO3*1.74 	;
+{7520.} 	 CHCL2CO3 = CHCL2CO2H : 	1.00D-11*0.30*RO2 	;
+{7521.} 	 CHCL2CO3 = CHCL2O2 : 	1.00D-11*0.70*RO2 	;
+{7522.} 	 CLCOCH2O2 + HO2 = CLCOCH2OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{7523.} 	 CLCOCH2O2 + NO = CLCOCH2O + NO2 : 	KRO2NO*1.2 	;
+{7524.} 	 CLCOCH2O2 + NO3 = CLCOCH2O + NO2 : 	KRO2NO3 	;
+{7525.} 	 CLCOCH2O2 = CLCOCH2O : 	2.00D-12*RO2 	;
+{7526.} 	 CHCL2COCL + OH = CLCOCCL2O2 : 	5.529D-12 	;
+{7527.} 	 CHCL2COCL = CHCL2O2 + CO + CL : 	J(22) 	;
+{7528.} 	 CLCOCLO2 + HO2 = CLCOCLOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{7529.} 	 CLCOCLO2 + NO = CLCOCLO + NO2 : 	KRO2NO*1.5 	;
+{7530.} 	 CLCOCLO2 + NO3 = CLCOCLO + NO2 : 	KRO2NO3 	;
+{7531.} 	 CLCOCLO2 = CCLOHCOCL : 	8.80D-13*0.20*RO2 	;
+{7532.} 	 CLCOCLO2 = CLCOCLO : 	8.80D-13*0.60*RO2 	;
+{7533.} 	 CLCOCLO2 = CLGLYOX : 	8.80D-13*0.20*RO2 	;
+{7534.} 	 CL1GLYOX + NO3 = CO + CO + CL + HNO3 : 	KNO3AL 	;
+{7535.} 	 CL1GLYOX + OH = CO + CO + CL : 	1.40D-11 	;
+{7536.} 	 CL1GLYOX = CO + CO + HO2 + CL : 	J(34) 	;
+{7537.} 	 CLCO2H + OH = CL : 	5.2D-13 	;
+{7538.} 	 CCLOHCO3 + HO2 = CHOCL + HO2 + OH : 	KAPHO2*0.44 	;
+{7539.} 	 CCLOHCO3 + HO2 = CLOHCO2H + O3 : 	KAPHO2*0.15 	;
+{7540.} 	 CCLOHCO3 + HO2 = CLOHCO3H : 	KAPHO2*0.41 	;
+{7541.} 	 CCLOHCO3 + NO = CHOCL + HO2 + NO2 : 	KAPNO 	;
+{7542.} 	 CCLOHCO3 + NO2 = CLOHPAN : 	KFPAN 	;
+{7543.} 	 CCLOHCO3 + NO3 = CHOCL + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{7544.} 	 CCLOHCO3 = CHOCL + HO2 : 	0.7*5.0E-12*RO2 	;
+{7545.} 	 CCLOHCO3 = CLOHCO2H : 	0.3*5.0E-12*RO2 	;
+{7546.} 	 HNMVKO2 + HO2 = HNMVKOOH : 	KRO2HO2*0.625 	;
+{7547.} 	 HNMVKO2 + NO = HNMVKO + NO2 : 	KRO2NO 	;
+{7548.} 	 HNMVKO2 + NO3 = HNMVKO + NO2 : 	KRO2NO3 	;
+{7549.} 	 HNMVKO2 = HNBIACET : 	8.80D-13*0.2*RO2 	;
+{7550.} 	 HNMVKO2 = HNMVKO : 	8.80D-13*0.6*RO2 	;
+{7551.} 	 HNMVKO2 = HNMVKOH : 	8.80D-13*0.2*RO2 	;
+{7552.} 	 NC3CO3 + HO2 = NC3CO2H + O3 : 	KAPHO2*0.15 	;
+{7553.} 	 NC3CO3 + HO2 = NC3CO3H : 	KAPHO2*0.41 	;
+{7554.} 	 NC3CO3 + HO2 = NO3CH2CHO + CO + HO2 + OH : 	KAPHO2*0.44 	;
+{7555.} 	 NC3CO3 + NO = NO3CH2CHO + CO + HO2 + NO2 : 	KAPNO 	;
+{7556.} 	 NC3CO3 + NO2 = C4PAN9 : 	KFPAN 	;
+{7557.} 	 NC3CO3 + NO3 = NO3CH2CHO + CO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{7558.} 	 NC3CO3 = NC3CO2H : 	1.00D-11*0.3*RO2 	;
+{7559.} 	 NC3CO3 = NO3CH2CHO + HO2 + CO : 	1.00D-11*0.7*RO2 	;
+{7560.} 	 NAOOA = CH3NO3 : 	KDEC*0.125 	;
+{7561.} 	 NAOOA = HO2 + NO2 + HCHO : 	KDEC*0.125 	;
+{7562.} 	 NAOOA = NAOO : 	KDEC*0.18 	;
+{7563.} 	 NAOOA = OH + NO2 + CO + HCHO : 	KDEC*0.57 	;
+{7564.} 	 C42O2 + HO2 = C42OOH : 	KRO2HO2*0.625 	;
+{7565.} 	 C42O2 + NO = C42O + NO2 : 	KRO2NO 	;
+{7566.} 	 C42O2 + NO3 = C42O + NO2 : 	KRO2NO3 	;
+{7567.} 	 C42O2 = C42O : 	8.80D-13*0.6*RO2 	;
+{7568.} 	 C42O2 = C42OH : 	8.80D-13*0.2*RO2 	;
+{7569.} 	 C42O2 = H3NCO2CHO : 	8.80D-13*0.2*RO2 	;
+{7570.} 	 HC3CO3 + HO2 = HC3CO2H + O3 : 	KAPHO2*0.15 	;
+{7571.} 	 HC3CO3 + HO2 = HC3CO3H : 	KAPHO2*0.41 	;
+{7572.} 	 HC3CO3 + HO2 = HO2 + CO + HOCH2CHO + OH : 	KAPHO2*0.44 	;
+{7573.} 	 HC3CO3 + NO = HO2 + CO + HOCH2CHO + NO2 : 	KAPNO 	;
+{7574.} 	 HC3CO3 + NO2 = C4PAN7 : 	KFPAN 	;
+{7575.} 	 HC3CO3 + NO3 = HO2 + CO + HOCH2CHO + NO2 : 	KRO2NO3*1.74 	;
+{7576.} 	 HC3CO3 = HC3CO2H : 	1.00D-11*0.3*RO2 	;
+{7577.} 	 HC3CO3 = HO2 + CO + HOCH2CHO : 	1.00D-11*0.7*RO2 	;
+{7578.} 	 GAOOA = CH3OH : 	KDEC*0.125 	;
+{7579.} 	 GAOOA = GAOO : 	KDEC*0.18 	;
+{7580.} 	 GAOOA = HO2 + HO2 + HCHO : 	KDEC*0.125 	;
+{7581.} 	 GAOOA = OH + HO2 + CO + HCHO : 	KDEC*0.57 	;
+{7582.} 	 C41O2 + HO2 = C41OOH : 	KRO2HO2*0.625 	;
+{7583.} 	 C41O2 + NO = C41NO3 : 	KRO2NO*0.021 	;
+{7584.} 	 C41O2 + NO = C41O + NO2 : 	KRO2NO*0.979 	;
+{7585.} 	 C41O2 + NO3 = C41O + NO2 : 	KRO2NO3 	;
+{7586.} 	 C41O2 = C41O : 	8.80D-13*0.6*RO2 	;
+{7587.} 	 C41O2 = C41OH : 	8.80D-13*0.2*RO2 	;
+{7588.} 	 C41O2 = H13CO2CHO : 	8.80D-13*0.2*RO2 	;
+{7589.} 	 HMGLOOA = HMGLOO : 	KDEC*0.24 	;
+{7590.} 	 HMGLOOA = HOCH2CHO : 	KDEC*0.20 	;
+{7591.} 	 HMGLOOA = HOCH2CO3 + HO2 : 	KDEC*0.20 	;
+{7592.} 	 HMGLOOA = OH + CO + HOCH2CO3 : 	KDEC*0.36 	;
+{7593.} 	 MVKOHAO2 + HO2 = MVKOHAOOH : 	KRO2HO2*0.625 	;
+{7594.} 	 MVKOHAO2 + NO = MVKOHANO3 : 	KRO2NO*0.017 	;
+{7595.} 	 MVKOHAO2 + NO = MVKOHAO + NO2 : 	KRO2NO*0.983 	;
+{7596.} 	 MVKOHAO2 + NO3 = MVKOHAO + NO2 : 	KRO2NO3 	;
+{7597.} 	 MVKOHAO2 = H13CO2CHO : 	2.00D-12*RO2*0.2 	;
+{7598.} 	 MVKOHAO2 = MVKOHAO : 	2.00D-12*RO2*0.6 	;
+{7599.} 	 MVKOHAO2 = MVKOHAOH : 	2.00D-12*RO2*0.2 	;
+{7600.} 	 MVKOHBO2 + HO2 = MVKOHBOOH : 	KRO2HO2*0.625 	;
+{7601.} 	 MVKOHBO2 + NO = MVKOHBO + NO2 : 	KRO2NO 	;
+{7602.} 	 MVKOHBO2 + NO3 = MVKOHBO + NO2 : 	KRO2NO3 	;
+{7603.} 	 MVKOHBO2 = H14CO23C4 : 	8.80D-13*RO2*0.2 	;
+{7604.} 	 MVKOHBO2 = MVKOHAOH : 	8.80D-13*RO2*0.2 	;
+{7605.} 	 MVKOHBO2 = MVKOHBO : 	8.80D-13*RO2*0.6 	;
+{7606.} 	 HC3CCO3 + HO2 = ACR + HO2 + OH : 	KAPHO2*0.44 	;
+{7607.} 	 HC3CCO3 + HO2 = HC3CCO3H : 	KAPHO2*0.56 	;
+{7608.} 	 HC3CCO3 + NO = ACR + HO2 + NO2 : 	KAPNO 	;
+{7609.} 	 HC3CCO3 + NO2 = C4PAN8 : 	KFPAN 	;
+{7610.} 	 HC3CCO3 + NO3 = ACR + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{7611.} 	 HC3CCO3 = ACR + HO2 : 	1.00D-11*RO2 	;
+{7612.} 	 GAOOB = GAOO : 	KDEC*0.11 	;
+{7613.} 	 GAOOB = OH + HO2 + CO + HCHO : 	KDEC*0.89 	;
+{7614.} 	 NC3OOA = NC3OO : 	KDEC*0.11 	;
+{7615.} 	 NC3OOA = OH + NO2 + MGLYOX : 	KDEC*0.89 	;
+{7616.} 	 INCO2 + HO2 = INCOOH : 	KRO2HO2*0.706 	;
+{7617.} 	 INCO2 + NO = INCNO3 : 	KRO2NO*0.145 	;
+{7618.} 	 INCO2 + NO = INCO + NO2 : 	KRO2NO*0.855 	;
+{7619.} 	 INCO2 + NO3 = INCO + NO2 : 	KRO2NO3 	;
+{7620.} 	 INCO2 = INCCO : 	2.90D-12*0.1*RO2 	;
+{7621.} 	 INCO2 = INCO : 	2.90D-12*0.8*RO2 	;
+{7622.} 	 INCO2 = INCOH : 	2.90D-12*0.1*RO2 	;
+{7623.} 	 NC4CO3 + HO2 = NC4CO2H + O3 : 	KAPHO2*0.15 	;
+{7624.} 	 NC4CO3 + HO2 = NC4CO3H : 	KAPHO2*0.41 	;
+{7625.} 	 NC4CO3 + HO2 = NOA + CO + HO2 + OH : 	KAPHO2*0.44 	;
+{7626.} 	 NC4CO3 + NO = NOA + CO + HO2 + NO2 : 	KAPNO 	;
+{7627.} 	 NC4CO3 + NO2 = C5PAN18 : 	KFPAN 	;
+{7628.} 	 NC4CO3 + NO3 = NOA + CO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{7629.} 	 NC4CO3 = NC4CO2H : 	1.00D-11*0.3*RO2 	;
+{7630.} 	 NC4CO3 = NOA + HO2 + CO : 	1.00D-11*0.7*RO2 	;
+{7631.} 	 GLYOOC = GLYOO : 	KDEC*0.11 	;
+{7632.} 	 GLYOOC = OH + HO2 + CO + CO : 	KDEC*0.89 	;
+{7633.} 	 NOAOOA = NOAOO : 	KDEC*0.11 	;
+{7634.} 	 NOAOOA = OH + NO2 + MGLYOX : 	KDEC*0.89 	;
+{7635.} 	 C510O2 + HO2 = C510OOH : 	KRO2HO2*0.706 	;
+{7636.} 	 C510O2 + NO = C510O + NO2 : 	KRO2NO 	;
+{7637.} 	 C510O2 + NO3 = C510O + NO2 : 	KRO2NO3 	;
+{7638.} 	 C510O2 = C510O : 	9.20D-14*0.7*RO2 	;
+{7639.} 	 C510O2 = C510OH : 	9.20D-14*0.3*RO2 	;
+{7640.} 	 HMVKAOOH = HMVKAO + OH : 	J(41) 	;
+{7641.} 	 OH + HMVKAOOH = CO2H3CHO + OH : 	5.77D-11 	;
+{7642.} 	 OH + HMVKANO3 = CO2H3CHO + NO2 : 	2.23D-12 	;
+{7643.} 	 HMVKAO = MGLYOX + HCHO + HO2 : 	KDEC 	;
+{7644.} 	 HO12CO3C4 = CH3CO3 + HOCH2CHO + HO2 : 	J(22) 	;
+{7645.} 	 OH + HO12CO3C4 = BIACETOH + HO2 : 	1.88D-11 	;
+{7646.} 	 HMVKBOOH = HMVKBO + OH : 	J(41) 	;
+{7647.} 	 OH + HMVKBOOH = BIACETOH + OH : 	3.95D-11 	;
+{7648.} 	 HMVKBO = CH3CO3 + HOCH2CHO : 	KDEC 	;
+{7649.} 	 BIACETOH = CH3CO3 + HOCH2CO3 : 	J(35) 	;
+{7650.} 	 OH + BIACETOH = CO23C3CHO + HO2 : 	2.69D-12 	;
+{7651.} 	 MVKOOH = HCHO + OH + ACO3 : 	J(24) 	;
+{7652.} 	 MVKOOH = MVKO + OH : 	J(41) 	;
+{7653.} 	 OH + MVKOOH = MVKO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{7654.} 	 OH + MVKOOH = VGLYOX + OH : 	2.55D-11 	;
+{7655.} 	 MVKO = HCHO + ACO3 : 	KDEC 	;
+{7656.} 	 NO3 + VGLYOX = CO + ACO3 + HNO3 : 	KNO3AL*2.0 	;
+{7657.} 	 OH + VGLYOX = CO + ACO3 : 	2.95D-11 	;
+{7658.} 	 VGLYOX = HO2 + CO + ACO3 : 	J(34) 	;
+{7659.} 	 OH + IEPOXA = IEACHO + HO2 : 	5.23D-12 	;
+{7660.} 	 NC2OOA = NC2OO : 	KDEC*0.11 	;
+{7661.} 	 NC2OOA = OH + NO2 + GLYOX : 	KDEC*0.89 	;
+{7662.} 	 ACLOOA = ACLOO : 	KDEC*0.11 	;
+{7663.} 	 ACLOOA = OH + HO2 + MGLYOX : 	KDEC*0.89 	;
+{7664.} 	 INAO2 + HO2 = INAOOH : 	KRO2HO2*0.706 	;
+{7665.} 	 INAO2 + NO = INANO3 : 	KRO2NO*0.072 	;
+{7666.} 	 INAO2 + NO = INAO + NO2 : 	KRO2NO*0.928 	;
+{7667.} 	 INAO2 + NO3 = INAO + NO2 : 	KRO2NO3 	;
+{7668.} 	 INAO2 = INAO : 	8.00D-13*0.8*RO2 	;
+{7669.} 	 INAO2 = INAOH : 	8.00D-13*0.2*RO2 	;
+{7670.} 	 C524O2 + HO2 = C524OOH : 	KRO2HO2*0.706 	;
+{7671.} 	 C524O2 + NO = C524NO3 : 	KRO2NO*0.134 	;
+{7672.} 	 C524O2 + NO = C524O + NO2 : 	KRO2NO*0.866 	;
+{7673.} 	 C524O2 + NO3 = C524O + NO2 : 	KRO2NO3 	;
+{7674.} 	 C524O2 = C524CO : 	2.90D-12*RO2*0.1 	;
+{7675.} 	 C524O2 = C524O : 	2.90D-12*RO2*0.8 	;
+{7676.} 	 C524O2 = C524OH : 	2.90D-12*RO2*0.1 	;
+{7677.} 	 HC4ACO3 + HO2 = ACETOL + CO + HO2 + OH : 	KAPHO2*0.44 	;
+{7678.} 	 HC4ACO3 + HO2 = HC4ACO2H + O3 : 	KAPHO2*0.15 	;
+{7679.} 	 HC4ACO3 + HO2 = HC4ACO3H : 	KAPHO2*0.41 	;
+{7680.} 	 HC4ACO3 + NO = ACETOL + CO + HO2 + NO2 : 	KAPNO 	;
+{7681.} 	 HC4ACO3 + NO2 = C5PAN17 : 	KFPAN 	;
+{7682.} 	 HC4ACO3 + NO3 = ACETOL + CO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{7683.} 	 HC4ACO3 = ACETOL + HO2 + CO : 	1.00D-11*0.7*RO2 	;
+{7684.} 	 HC4ACO3 = HC4ACO2H : 	1.00D-11*0.3*RO2 	;
+{7685.} 	 C58O2 + HO2 = C58OOH : 	KRO2HO2*0.706 	;
+{7686.} 	 C58O2 + NO = C58NO3 : 	KRO2NO*0.019 	;
+{7687.} 	 C58O2 + NO = C58O + NO2 : 	KRO2NO*0.981 	;
+{7688.} 	 C58O2 + NO3 = C58O + NO2 : 	KRO2NO3 	;
+{7689.} 	 C58O2 = C58O : 	9.20D-14*0.7*RO2 	;
+{7690.} 	 C58O2 = C58OH : 	9.20D-14*0.3*RO2 	;
+{7691.} 	 OH + IEPOXB = IEB1O2 : 	9.05D-12*0.5 	;
+{7692.} 	 OH + IEPOXB = IEB2O2 : 	9.05D-12*0.5 	;
+{7693.} 	 MACRNOOA = ACETOL + NO2 + CO + OH : 	KDEC*0.36 	;
+{7694.} 	 MACRNOOA = ACETOL + NO2 + HO2 : 	KDEC*0.20 	;
+{7695.} 	 MACRNOOA = MACRNOO : 	KDEC*0.24 	;
+{7696.} 	 MACRNOOA = PROPOLNO3 : 	KDEC*0.20 	;
+{7697.} 	 MACRNO3 + OH = CONM2CHO + HO2 : 	4.34D-12*0.16 	;
+{7698.} 	 MACRNO3 + OH = MACRNCO3 : 	4.34D-12*0.84 	;
+{7699.} 	 MACRNO3 = ACETOL + NO2 + CO + HO2 : 	J(17) 	;
+{7700.} 	 INB1O2 + HO2 = INB1OOH : 	KRO2HO2*0.706 	;
+{7701.} 	 INB1O2 + NO = INB1NO3 : 	KRO2NO*0.145 	;
+{7702.} 	 INB1O2 + NO = INB1O + NO2 : 	KRO2NO*0.855 	;
+{7703.} 	 INB1O2 + NO3 = INB1O + NO2 : 	KRO2NO3 	;
+{7704.} 	 INB1O2 = INB1CO : 	2.90D-12*0.1*RO2 	;
+{7705.} 	 INB1O2 = INB1O : 	2.90D-12*0.8*RO2 	;
+{7706.} 	 INB1O2 = INB1OH : 	2.90D-12*0.1*RO2 	;
+{7707.} 	 INB2O2 + HO2 = INB2OOH : 	KRO2HO2*0.706 	;
+{7708.} 	 INB2O2 + NO = INANO3 : 	KRO2NO*0.064 	;
+{7709.} 	 INB2O2 + NO = INB2O + NO2 : 	KRO2NO*0.936 	;
+{7710.} 	 INB2O2 = C58NO3 : 	8.80D-13*0.2*RO2 	;
+{7711.} 	 INB2O2 = INB1OH : 	8.80D-13*0.2*RO2 	;
+{7712.} 	 INB2O2 = INB2O : 	8.80D-13*0.6*RO2 	;
+{7713.} 	 OH + IEPOXC = IEC1O2 : 	1.50D-11*0.719 	;
+{7714.} 	 OH + IEPOXC = IECCHO + HO2 : 	1.50D-11*0.281 	;
+{7715.} 	 HC4CCO3 + HO2 = CH3CO3 + HOCH2CHO + OH : 	KAPHO2*0.44 	;
+{7716.} 	 HC4CCO3 + HO2 = HC4CCO2H + O3 : 	KAPHO2*0.15 	;
+{7717.} 	 HC4CCO3 + HO2 = HC4CCO3H : 	KAPHO2*0.41 	;
+{7718.} 	 HC4CCO3 + NO = CH3CO3 + HOCH2CHO + NO2 : 	KAPNO 	;
+{7719.} 	 HC4CCO3 + NO2 = C5PAN19 : 	KFPAN 	;
+{7720.} 	 HC4CCO3 + NO3 = CH3CO3 + HOCH2CHO + NO2 : 	KRO2NO3*1.74 	;
+{7721.} 	 HC4CCO3 = CH3CO3 + HOCH2CHO : 	1.00D-11*0.7*RO2 	;
+{7722.} 	 HC4CCO3 = HC4CCO2H : 	1.00D-11*0.3*RO2 	;
+{7723.} 	 MGLYOOA = MGLYOO : 	KDEC*0.11 	;
+{7724.} 	 MGLYOOA = OH + CO + CH3CO3 : 	KDEC*0.89 	;
+{7725.} 	 C57O2 + HO2 = C57OOH : 	KRO2HO2*0.706 	;
+{7726.} 	 C57O2 + NO = C57O + NO2 : 	KRO2NO 	;
+{7727.} 	 C57O2 + NO3 = C57O + NO2 : 	KRO2NO3 	;
+{7728.} 	 C57O2 = C57O : 	9.20D-14*0.7*RO2 	;
+{7729.} 	 C57O2 = C57OH : 	9.20D-14*0.3*RO2 	;
+{7730.} 	 MVKNO3 + OH = BIACETOH + NO2 : 	1.33D-12*0.33 	;
+{7731.} 	 MVKNO3 + OH = CO2N3CHO + HO2 : 	1.33D-12*0.67 	;
+{7732.} 	 MVKNO3 = CH3CO3 + HOCH2CHO + NO2 : 	J(56)+J(57) 	;
+{7733.} 	 NC4OOA = NC4OO : 	KDEC*0.18 	;
+{7734.} 	 NC4OOA = OH + NO2 + BIACETOH : 	KDEC*0.82 	;
+{7735.} 	 INDO2 + HO2 = INDOOH : 	KRO2HO2*0.706 	;
+{7736.} 	 INDO2 + NO = INB1NO3 : 	KRO2NO*0.072 	;
+{7737.} 	 INDO2 + NO = INDO + NO2 : 	KRO2NO*0.928 	;
+{7738.} 	 INDO2 + NO3 = INDO + NO2 : 	KRO2NO3 	;
+{7739.} 	 INDO2 = INDO : 	8.00D-13*0.8*RO2 	;
+{7740.} 	 INDO2 = INDOH : 	8.00D-13*0.2*RO2 	;
+{7741.} 	 C59O2 + HO2 = C59OOH : 	KRO2HO2*0.706 	;
+{7742.} 	 C59O2 + NO = C59O + NO2 : 	KRO2NO 	;
+{7743.} 	 C59O2 + NO3 = C59O + NO2 : 	KRO2NO3 	;
+{7744.} 	 C59O2 = C59O : 	9.20D-14*RO2 	;
+{7745.} 	 CHOCOMOXO2 + HO2 = ALCOMOXOOH : 	KRO2HO2*0.520 	;
+{7746.} 	 CHOCOMOXO2 + NO = CHOCOMOXO + NO2 : 	KRO2NO 	;
+{7747.} 	 CHOCOMOXO2 + NO3 = CHOCOMOXO + NO2 : 	KRO2NO3 	;
+{7748.} 	 CHOCOMOXO2 = CHOCOMOXO : 	2.00D-12*RO2 	;
+{7749.} 	 ACETMECO3 + HO2 = ACETMECO3H : 	KAPHO2*0.56 	;
+{7750.} 	 ACETMECO3 + HO2 = METHACETO2 + OH : 	KAPHO2*0.44 	;
+{7751.} 	 ACETMECO3 + NO = METHACETO2 + NO2 : 	KAPNO 	;
+{7752.} 	 ACETMECO3 + NO2 = ACETMEPAN : 	KFPAN 	;
+{7753.} 	 ACETMECO3 + NO3 = METHACETO2 + NO2 : 	KRO2NO3*1.74 	;
+{7754.} 	 ACETMECO3 = METHACETO2 : 	1.00D-11*RO2 	;
+{7755.} 	 HOACETETO2 + HO2 = HOACETEOOH : 	KRO2HO2*0.625 	;
+{7756.} 	 HOACETETO2 + NO = HOACETETO + NO2 : 	KRO2NO 	;
+{7757.} 	 HOACETETO2 + NO3 = HOACETETO + NO2 : 	KRO2NO3 	;
+{7758.} 	 HOACETETO2 = HOACETETO : 	8.80D-13*RO2 	;
+{7759.} 	 MECOACETO2 + HO2 = MECOACEOOH : 	KRO2HO2*0.625 	;
+{7760.} 	 MECOACETO2 + NO = MECOACETO + NO2 : 	KRO2NO 	;
+{7761.} 	 MECOACETO2 + NO3 = MECOACETO + NO2 : 	KRO2NO3 	;
+{7762.} 	 MECOACETO2 = MECOACETO : 	2.00D-12*RO2 	;
+{7763.} 	 ACPRONEO2 + HO2 = ACPRONEOOH : 	KRO2HO2*0.706 	;
+{7764.} 	 ACPRONEO2 + NO = ACPRONEO + NO2 : 	KRO2NO 	;
+{7765.} 	 ACPRONEO2 + NO3 = ACPRONEO + NO2 : 	KRO2NO3 	;
+{7766.} 	 ACPRONEO2 = ACECOCOCH3 : 	8.80D-13*0.2*RO2 	;
+{7767.} 	 ACPRONEO2 = ACPRONEO : 	8.80D-13*0.6*RO2 	;
+{7768.} 	 ACPRONEO2 = ACPRONEOH : 	8.80D-13*0.2*RO2 	;
+{7769.} 	 ACCOETO2 + HO2 = ACCOETOOH : 	KRO2HO2*0.706 	;
+{7770.} 	 ACCOETO2 + NO = ACCOETO + NO2 : 	KRO2NO 	;
+{7771.} 	 ACCOETO2 + NO3 = ACCOETO + NO2 : 	KRO2NO3 	;
+{7772.} 	 ACCOETO2 = ACCOETO : 	1.30D-12*RO2 	;
+{7773.} 	 ACETC2CO3 + HO2 = ACETC2CO2H + O3 : 	KAPHO2*0.15 	;
+{7774.} 	 ACETC2CO3 + HO2 = ACETC2CO3H : 	KAPHO2*0.41 	;
+{7775.} 	 ACETC2CO3 + HO2 = ACETC2H4O2 + OH : 	KAPHO2*0.44 	;
+{7776.} 	 ACETC2CO3 + NO = ACETC2H4O2 + NO2 : 	KAPNO 	;
+{7777.} 	 ACETC2CO3 + NO2 = ACETC2PAN : 	KFPAN 	;
+{7778.} 	 ACETC2CO3 + NO3 = ACETC2H4O2 + NO2 : 	KRO2NO3*1.74 	;
+{7779.} 	 ACETC2CO3 = ACETC2CO2H : 	1.00D-11*0.3*RO2 	;
+{7780.} 	 ACETC2CO3 = ACETC2H4O2 : 	1.00D-11*0.7*RO2 	;
+{7781.} 	 IPRACBCO3 + HO2 = ETHACETO2 + OH : 	KAPHO2*0.44 	;
+{7782.} 	 IPRACBCO3 + HO2 = IPRACBCO2H + O3 : 	KAPHO2*0.15 	;
+{7783.} 	 IPRACBCO3 + HO2 = IPRACBCO3H : 	KAPHO2*0.41 	;
+{7784.} 	 IPRACBCO3 + NO = ETHACETO2 + NO2 : 	KAPNO 	;
+{7785.} 	 IPRACBCO3 + NO2 = IPRACBPAN : 	KFPAN 	;
+{7786.} 	 IPRACBCO3 + NO3 = ETHACETO2 + NO2 : 	KRO2NO3*1.74 	;
+{7787.} 	 IPRACBCO3 = ETHACETO2 : 	1.00D-11*0.7*RO2 	;
+{7788.} 	 IPRACBCO3 = IPRACBCO2H : 	1.00D-11*0.3*RO2 	;
+{7789.} 	 ACBUONEAO2 + HO2 = ACBUOAOOH : 	KRO2HO2*0.770 	;
+{7790.} 	 ACBUONEAO2 + NO = ACBUONANO3 : 	KRO2NO*0.195 	;
+{7791.} 	 ACBUONEAO2 + NO = ACBUONEAO + NO2 : 	KRO2NO*0.805 	;
+{7792.} 	 ACBUONEAO2 + NO3 = ACBUONEAO + NO2 : 	KRO2NO3 	;
+{7793.} 	 ACBUONEAO2 = ACBUONAOH : 	8.80D-13*0.2*RO2 	;
+{7794.} 	 ACBUONEAO2 = ACBUONEAO : 	8.80D-13*0.6*RO2 	;
+{7795.} 	 ACBUONEAO2 = ACCOPRONE : 	8.80D-13*0.2*RO2 	;
+{7796.} 	 ACBUONEBO2 + HO2 = ACBUONBOOH : 	KRO2HO2*0.770 	;
+{7797.} 	 ACBUONEBO2 + NO = ACBUONEBO + NO2 : 	KRO2NO 	;
+{7798.} 	 ACBUONEBO2 + NO3 = ACBUONEBO + NO2 : 	KRO2NO3 	;
+{7799.} 	 ACBUONEBO2 = ACBUONBOH : 	2.00D-12*0.2*RO2 	;
+{7800.} 	 ACBUONEBO2 = ACBUONEBO : 	2.00D-12*0.6*RO2 	;
+{7801.} 	 ACBUONEBO2 = ACCOCOC2H5 : 	2.00D-12*0.2*RO2 	;
+{7802.} 	 ACCOC3H6O2 + HO2 = ACCOPROOH : 	KRO2HO2*0.770 	;
+{7803.} 	 ACCOC3H6O2 + NO = ACCOC3H6O + NO2 : 	KRO2NO 	;
+{7804.} 	 ACCOC3H6O2 + NO3 = ACCOC3H6O + NO2 : 	KRO2NO3 	;
+{7805.} 	 ACCOC3H6O2 = ACCOC3H6O : 	2.50D-13*RO2 	;
+{7806.} 	 SBUACONEO2 + HO2 = SBUACCOOH : 	KRO2HO2*0.770 	;
+{7807.} 	 SBUACONEO2 + NO = SBUACONEO + NO2 : 	KRO2NO 	;
+{7808.} 	 SBUACONEO2 + NO3 = SBUACONEO + NO2 : 	KRO2NO3 	;
+{7809.} 	 SBUACONEO2 = SBUACCOH : 	9.20D-14*0.3*RO2 	;
+{7810.} 	 SBUACONEO2 = SBUACONEO : 	9.20D-14*0.7*RO2 	;
+{7811.} 	 TBUACCO3 + HO2 = IPROACETO2 + OH : 	KAPHO2*0.44 	;
+{7812.} 	 TBUACCO3 + HO2 = TBUACCO3H : 	KAPHO2*0.56 	;
+{7813.} 	 TBUACCO3 + NO = IPROACETO2 + NO2 : 	KAPNO 	;
+{7814.} 	 TBUACCO3 + NO2 = TBUACPAN : 	KFPAN 	;
+{7815.} 	 TBUACCO3 + NO3 = IPROACETO2 + NO2 : 	KRO2NO3*1.74 	;
+{7816.} 	 TBUACCO3 = IPROACETO2 : 	1.00D-11*RO2 	;
+{7817.} 	 ETHFORM + OH = C2H5O2 : 	5.97D-13*EXP(134/TEMP)*0.096 	;
+{7818.} 	 ETHFORM + OH = ETHFORMO2 : 	5.97D-13*EXP(134/TEMP)*0.904 	;
+{7819.} 	 MTBEACHOO2 + HO2 = MTBEAALOOH : 	KRO2HO2*0.706 	;
+{7820.} 	 MTBEACHOO2 + NO = MTBEAALNO3 : 	KRO2NO*0.052 	;
+{7821.} 	 MTBEACHOO2 + NO = MTBEACHOO + NO2 : 	KRO2NO*0.948 	;
+{7822.} 	 MTBEACHOO2 + NO3 = MTBEACHOO + NO2 : 	KRO2NO3 	;
+{7823.} 	 MTBEACHOO2 = MTBEACHO13 : 	2.00D-12*0.2*RO2 	;
+{7824.} 	 MTBEACHOO2 = MTBEACHOHO : 	2.00D-12*0.2*RO2 	;
+{7825.} 	 MTBEACHOO2 = MTBEACHOO : 	2.00D-12*0.6*RO2 	;
+{7826.} 	 MTBEBCO3 + HO2 = IPRMEETO2 + OH : 	KAPHO2*0.44 	;
+{7827.} 	 MTBEBCO3 + HO2 = MTBEBCO2H + O3 : 	KAPHO2*0.15 	;
+{7828.} 	 MTBEBCO3 + HO2 = MTBEBCO3H : 	KAPHO2*0.41 	;
+{7829.} 	 MTBEBCO3 + NO = IPRMEETO2 + NO2 : 	KAPNO 	;
+{7830.} 	 MTBEBCO3 + NO2 = MTBEBPAN : 	KFPAN 	;
+{7831.} 	 MTBEBCO3 + NO3 = IPRMEETO2 + NO2 : 	KRO2NO3*1.74 	;
+{7832.} 	 MTBEBCO3 = IPRMEETO2 : 	1.00D-11*0.7*RO2 	;
+{7833.} 	 MTBEBCO3 = MTBEBCO2H : 	1.00D-11*0.3*RO2 	;
+{7834.} 	 IPROC21O2 + HO2 = IPROC21OOH : 	KRO2HO2*0.706 	;
+{7835.} 	 IPROC21O2 + NO = IPROC21NO3 : 	KRO2NO*0.129 	;
+{7836.} 	 IPROC21O2 + NO = IPROC21O + NO2 : 	KRO2NO*0.871 	;
+{7837.} 	 IPROC21O2 + NO3 = IPROC21O + NO2 : 	KRO2NO3 	;
+{7838.} 	 IPROC21O2 = IPROACET : 	8.80D-13*0.2*RO2 	;
+{7839.} 	 IPROC21O2 = IPROC21O : 	8.80D-13*0.6*RO2 	;
+{7840.} 	 IPROC21O2 = IPROC21OH : 	8.80D-13*0.2*RO2 	;
+{7841.} 	 IPROMCCO3 + HO2 = IPROC21O2 + OH : 	KAPHO2*0.44 	;
+{7842.} 	 IPROMCCO3 + HO2 = IPROMCCO3H : 	KAPHO2*0.56 	;
+{7843.} 	 IPROMCCO3 + NO = IPROC21O2 + NO2 : 	KAPNO 	;
+{7844.} 	 IPROMCCO3 + NO2 = IPROMCPAN : 	KFPAN 	;
+{7845.} 	 IPROMCCO3 + NO3 = IPROC21O2 + NO2 : 	KRO2NO3*1.74 	;
+{7846.} 	 IPROMCCO3 = IPROC21O2 : 	1.00D-11*RO2 	;
+{7847.} 	 EIPEO2 + HO2 = EIPEOOH : 	KRO2HO2*0.706 	;
+{7848.} 	 EIPEO2 + NO = EIPEO + NO2 : 	KRO2NO 	;
+{7849.} 	 EIPEO2 + NO3 = EIPEO + NO2 : 	KRO2NO3 	;
+{7850.} 	 EIPEO2 = EIPEO : 	9.20D-14*0.7*RO2 	;
+{7851.} 	 EIPEO2 = EIPEOH : 	9.20D-14*0.3*RO2 	;
+{7852.} 	 ETBEACO3 + HO2 = EIPEO2 + OH : 	KAPHO2*0.44 	;
+{7853.} 	 ETBEACO3 + HO2 = ETBEACO3H : 	KAPHO2*0.56 	;
+{7854.} 	 ETBEACO3 + NO = EIPEO2 + NO2 : 	KAPNO 	;
+{7855.} 	 ETBEACO3 + NO2 = ETBEAPAN : 	KFPAN 	;
+{7856.} 	 ETBEACO3 + NO3 = EIPEO2 + NO2 : 	KRO2NO3*1.74 	;
+{7857.} 	 ETBEACO3 = EIPEO2 : 	1.00D-11*RO2 	;
+{7858.} 	 ETBECCO3 + HO2 = ETBECCO3H : 	KAPHO2*0.56 	;
+{7859.} 	 ETBECCO3 + HO2 = MTBEAO2 + OH : 	KAPHO2*0.44 	;
+{7860.} 	 ETBECCO3 + NO = MTBEAO2 + NO2 : 	KAPNO 	;
+{7861.} 	 ETBECCO3 + NO2 = ETBECPAN : 	KFPAN 	;
+{7862.} 	 ETBECCO3 + NO3 = MTBEAO2 + NO2 : 	KRO2NO3*1.74 	;
+{7863.} 	 ETBECCO3 = MTBEAO2 : 	1.00D-11*RO2 	;
+{7864.} 	 MOXY2CHO + NO3 = CHOOMCO3 + HNO3 : 	KNO3AL*2.4 	;
+{7865.} 	 MOXY2CHO + OH = CHOOMCO3 : 	2.10D-11 	;
+{7866.} 	 MOXY2CHO = CHOOCH2O2 + HO2 + CO : 	J(15) 	;
+{7867.} 	 MEMOXYCO2H + OH = CH3OCH2O2 : 	4.79D-12 	;
+{7868.} 	 MEMOXYCO3H + OH = MEMOXYCO3 : 	8.35D-12 	;
+{7869.} 	 MEMOXYCO3H = CH3OCH2O2 + OH : 	J(41) 	;
+{7870.} 	 MEMOXYPAN + OH = CH3OCHO + CO + NO2 : 	4.76D-12 	;
+{7871.} 	 MEMOXYPAN = MEMOXYCO3 + NO2 : 	KBPAN 	;
+{7872.} 	 ETOMECO2H + OH = ETOMEO2 : 	9.22D-12 	;
+{7873.} 	 ETOMECO3H + OH = EOX2MECO3 : 	1.28D-11 	;
+{7874.} 	 ETOMECO3H = ETOMEO2 + OH : 	J(41) 	;
+{7875.} 	 ETOMEPAN + OH = ETHFORM + CO + NO2 : 	9.18D-12 	;
+{7876.} 	 ETOMEPAN = EOX2MECO3 + NO2 : 	KBPAN 	;
+{7877.} 	 ETOMEOOH + OH = ETHFORM + OH : 	7.54D-11 	;
+{7878.} 	 ETOMEOOH = ETOMEO + OH : 	J(41) 	;
+{7879.} 	 ETOMENO3 + OH = ETHFORM + NO2 : 	6.22D-12 	;
+{7880.} 	 ETOMENO3 = ETOMEO + NO2 : 	J(53) 	;
+{7881.} 	 ETOMEO = HO2 + ETHFORM : 	KROPRIM*O2 	;
+{7882.} 	 ETOMEOH + OH = ETHFORM + HO2 : 	2.27D-11 	;
+{7883.} 	 MCOCOMOX + OH = MCOCOMOXO2 : 	3.25D-13 	;
+{7884.} 	 MCOCOMOX = CH3CO3 + CH3O2 : 	J(22) 	;
+{7885.} 	 PRONFORM + OH = PRONFORMO2 : 	1.06D-12 	;
+{7886.} 	 PRONFORM = CHOOCH2O2 + CH3CO3 : 	J(22) 	;
+{7887.} 	 PRONEMOOOH + OH = MCOCOMOX + OH : 	1.15D-10 	;
+{7888.} 	 PRONEMOOOH = CH3CO3 + CH3OCHO + OH : 	J(22) 	;
+{7889.} 	 PRONEMOOOH = PRONEMOXO + OH : 	J(41) 	;
+{7890.} 	 PRONEMOXO = CH3OCHO + CH3CO3 : 	KDEC 	;
+{7891.} 	 PRONEMOXOH + OH = MCOCOMOX + HO2 : 	2.98D-11 	;
+{7892.} 	 PRONEMOXOH = CH3CO3 + CH3OCHO + HO2 : 	J(22) 	;
+{7893.} 	 PRCOOMCHO + NO3 = PRCOOMCO3 + HNO3 : 	KNO3AL*5.5 	;
+{7894.} 	 PRCOOMCHO + OH = PRCOOMCO3 : 	2.56D-11 	;
+{7895.} 	 PRCOOMCHO = PRCOOMO2 + HO2 + CO : 	J(15) 	;
+{7896.} 	 BOXCOCHO + OH = BOXCOCHOO2 : 	4.28D-12 	;
+{7897.} 	 BOXCOCHO = HO2 + CO + NC4H9O2 : 	J(34) 	;
+{7898.} 	 BOXCHO + OH = BOXFORMO2 : 	3.12D-12 	;
+{7899.} 	 BOXMCO2H + OH = BOX2MO2 : 	1.32D-11 	;
+{7900.} 	 BOXMCO3H + OH = BOXMCO3 : 	1.67D-11 	;
+{7901.} 	 BOXMCO3H = BOX2MO2 + OH : 	J(41) 	;
+{7902.} 	 BOXMPAN + OH = BOXCHO + CO + NO2 : 	1.32D-11 	;
+{7903.} 	 BOXMPAN = BOXMCO3 + NO2 : 	KBPAN 	;
+{7904.} 	 BOXMOOH + OH = BOXCHO + OH : 	7.93D-11 	;
+{7905.} 	 BOXMOOH = BOX2MO + OH : 	J(41) 	;
+{7906.} 	 BOX2MO = BOXCHO + HO2 : 	KDEC 	;
+{7907.} 	 BOXMOH + OH = BOXCHO + HO2 : 	1.96D-11 	;
+{7908.} 	 PRCOOPRONE + OH = PRONOCOPO2 : 	4.94D-12 	;
+{7909.} 	 PRCOOPRONE = PRCOOMO2 + CH3CO3 : 	J(22) 	;
+{7910.} 	 BOXCOEOLO2 + HO2 = BOXCOOLOOH : 	KRO2HO2*0.820 	;
+{7911.} 	 BOXCOEOLO2 + NO = BOXCOEOLO + NO2 : 	KRO2NO 	;
+{7912.} 	 BOXCOEOLO2 + NO3 = BOXCOEOLO + NO2 : 	KRO2NO3 	;
+{7913.} 	 BOXCOEOLO2 = BOXCOEOLO : 	8.80D-13*RO2 	;
+{7914.} 	 BOXPROOOH + OH = BOXPRONAO2 : 	1.97D-10 	;
+{7915.} 	 BOXPROOOH = BOXPRONEAO + OH : 	J(41)+J(22)*2 	;
+{7916.} 	 BOXPROANO3 + OH = PRCOOPRONE + NO2 : 	8.17D-12 	;
+{7917.} 	 BOXPROANO3 = BOXPRONEAO + NO2 : 	J(54)+J(22) 	;
+{7918.} 	 BOXPRONEAO = PRONFORM + NC3H7O2 : 	KDEC 	;
+{7919.} 	 BOXPRONOH + OH = PRCOOPRONE + HO2 : 	5.57D-11 	;
+{7920.} 	 BOXCOCOME + OH = BOXCOCOMO2 : 	4.39D-12 	;
+{7921.} 	 BOXPROBOOH + OH = BOXPRONBO2 : 	1.19D-10 	;
+{7922.} 	 BOXPROBOOH = BOXCHO + CH3CO3 + OH : 	J(22) 	;
+{7923.} 	 BOXPROBOOH = BOXPRONBO + OH : 	J(41) 	;
+{7924.} 	 BOXPRONBO = BOXCHO + CH3CO3 : 	KDEC 	;
+{7925.} 	 BOXPRONBOH + OH = BOXCOCOME + HO2 : 	3.82D-11 	;
+{7926.} 	 BOXPRONBOH = BOXCHO + CH3CO3 + HO2 : 	J(22) 	;
+{7927.} 	 BRETO3 + HO2 = BRETO2H + O3 : 	KAPHO2*0.15 	;
+{7928.} 	 BRETO3 + HO2 = BRETO3H : 	KAPHO2*0.41 	;
+{7929.} 	 BRETO3 + HO2 = CH2BRO2 + OH : 	KAPHO2*0.44 	;
+{7930.} 	 BRETO3 + NO = CH2BRO2 + NO2 : 	KAPNO 	;
+{7931.} 	 BRETO3 + NO2 = BRETPAN : 	KFPAN 	;
+{7932.} 	 BRETO3 + NO3 = CH2BRO2 + NO2 : 	KRO2NO3*1.74 	;
+{7933.} 	 BRETO3 = BRETO2H : 	1.00D-11*0.30*RO2 	;
+{7934.} 	 BRETO3 = CH2BRO2 : 	1.00D-11*0.70*RO2 	;
+{7935.} 	 HO1CO3C4O2 + HO2 = HOCO3C4OOH : 	KRO2HO2*0.625 	;
+{7936.} 	 HO1CO3C4O2 + NO = HO1CO3C4O + NO2 : 	KRO2NO 	;
+{7937.} 	 HO1CO3C4O2 + NO3 = HO1CO3C4O + NO2 : 	KRO2NO3 	;
+{7938.} 	 HO1CO3C4O2 = HO14CO2C4 : 	2.00D-12*0.2*RO2 	;
+{7939.} 	 HO1CO3C4O2 = HO1CO3C4O : 	2.00D-12*0.6*RO2 	;
+{7940.} 	 HO1CO3C4O2 = HO1CO3CHO : 	2.00D-12*0.2*RO2 	;
+{7941.} 	 BIACETO2 + HO2 = BIACETOOH : 	KRO2HO2*0.625 	;
+{7942.} 	 BIACETO2 + NO = BIACETO + NO2 : 	KRO2NO 	;
+{7943.} 	 BIACETO2 + NO3 = BIACETO + NO2 : 	KRO2NO3 	;
+{7944.} 	 BIACETO2 = BIACETO : 	2.00D-12*0.6*RO2 	;
+{7945.} 	 BIACETO2 = BIACETOH : 	2.00D-12*0.2*RO2 	;
+{7946.} 	 BIACETO2 = CO23C3CHO : 	2.00D-12*0.2*RO2 	;
+{7947.} 	 HO2CO4C5O2 + HO2 = HOCO4C5OOH : 	KRO2HO2*0.706 	;
+{7948.} 	 HO2CO4C5O2 + NO = HO2CO4C5O + NO2 : 	KRO2NO 	;
+{7949.} 	 HO2CO4C5O2 + NO3 = HO2CO4C5O + NO2 : 	KRO2NO3 	;
+{7950.} 	 HO2CO4C5O2 = HO14CO2C5 : 	2.00D-12*0.2*RO2 	;
+{7951.} 	 HO2CO4C5O2 = HO2CO4C5O : 	2.00D-12*0.6*RO2 	;
+{7952.} 	 HO2CO4C5O2 = HO2CO4CHO : 	2.00D-12*0.2*RO2 	;
+{7953.} 	 CO23C54O2 + HO2 = CO23C54OOH : 	KRO2HO2*0.706 	;
+{7954.} 	 CO23C54O2 + NO = CO23C54O + NO2 : 	KRO2NO 	;
+{7955.} 	 CO23C54O2 + NO3 = CO23C54O + NO2 : 	KRO2NO3 	;
+{7956.} 	 CO23C54O2 = CO23C54O : 	8.80D-13*RO2 	;
+{7957.} 	 HOCO3C54O2 + HO2 = HOCO3C5OOH : 	KRO2HO2*0.706 	;
+{7958.} 	 HOCO3C54O2 + NO = HOCO3C54O + NO2 : 	KRO2NO 	;
+{7959.} 	 HOCO3C54O2 + NO3 = HOCO3C54O + NO2 : 	KRO2NO3 	;
+{7960.} 	 HOCO3C54O2 = HO14CO3C5 : 	8.80D-13*0.2*RO2 	;
+{7961.} 	 HOCO3C54O2 = HO1CO34C5 : 	8.80D-13*0.2*RO2 	;
+{7962.} 	 HOCO3C54O2 = HOCO3C54O : 	8.80D-13*0.6*RO2 	;
+{7963.} 	 C53O2 + HO2 = C53OOH : 	KRO2HO2*0.706 	;
+{7964.} 	 C53O2 + NO = C53O + NO2 : 	KRO2NO 	;
+{7965.} 	 C53O2 + NO3 = C53O + NO2 : 	KRO2NO3 	;
+{7966.} 	 C53O2 = C53O : 	2.00D-12*0.6*RO2 	;
+{7967.} 	 C53O2 = C53OH : 	2.00D-12*0.2*RO2 	;
+{7968.} 	 C53O2 = HOIPRGLYOX : 	2.00D-12*0.2*RO2 	;
+{7969.} 	 C41CO3 + HO2 = C41CO2H + O3 : 	KAPHO2*0.15 	;
+{7970.} 	 C41CO3 + HO2 = C41CO3H : 	KAPHO2*0.41 	;
+{7971.} 	 C41CO3 + HO2 = MEKBO2 + OH : 	KAPHO2*0.44 	;
+{7972.} 	 C41CO3 + NO = MEKBO2 + NO2 : 	KAPNO 	;
+{7973.} 	 C41CO3 + NO2 = C5PAN7 : 	KFPAN 	;
+{7974.} 	 C41CO3 + NO3 = MEKBO2 + NO2 : 	KRO2NO3*1.74 	;
+{7975.} 	 C41CO3 = C41CO2H : 	1.00D-11*0.3*RO2 	;
+{7976.} 	 C41CO3 = MEKBO2 : 	1.00D-11*0.7*RO2 	;
+{7977.} 	 CO2HOC61O2 + HO2 = CO2HOC6OOH : 	KRO2HO2*0.770 	;
+{7978.} 	 CO2HOC61O2 + NO = CO2HOC61O + NO2 : 	KRO2NO 	;
+{7979.} 	 CO2HOC61O2 + NO3 = CO2HOC61O + NO2 : 	KRO2NO3 	;
+{7980.} 	 CO2HOC61O2 = CO2HOC61O : 	2.00D-12*RO2 	;
+{7981.} 	 CO24C6O2 + HO2 = CO24C6OOH : 	KRO2HO2*0.770 	;
+{7982.} 	 CO24C6O2 + NO = CO24C6O + NO2 : 	KRO2NO 	;
+{7983.} 	 CO24C6O2 + NO3 = CO24C6O + NO2 : 	KRO2NO3 	;
+{7984.} 	 CO24C6O2 = CO24C6O : 	8.80D-13*RO2 	;
+{7985.} 	 CO25C6O2 + HO2 = CO25C6OOH : 	KRO2HO2*0.770 	;
+{7986.} 	 CO25C6O2 + NO = CO25C6O + NO2 : 	KRO2NO 	;
+{7987.} 	 CO25C6O2 + NO3 = CO25C6O + NO2 : 	KRO2NO3 	;
+{7988.} 	 CO25C6O2 = CO235C6 : 	8.40D-13*0.2*RO2 	;
+{7989.} 	 CO25C6O2 = CO25C6O : 	8.40D-13*0.6*RO2 	;
+{7990.} 	 CO25C6O2 = CO25C6OH : 	8.40D-13*0.2*RO2 	;
+{7991.} 	 HO2C4O2 + HO2 = HO2C4OOH : 	KRO2HO2*0.625 	;
+{7992.} 	 HO2C4O2 + NO = HO2C4NO3 : 	KRO2NO*0.033 	;
+{7993.} 	 HO2C4O2 + NO = HO2C4O + NO2 : 	KRO2NO*0.967 	;
+{7994.} 	 HO2C4O2 + NO3 = HO2C4O + NO2 : 	KRO2NO3 	;
+{7995.} 	 HO2C4O2 = HO2C3CHO : 	1.30D-12*0.2*RO2 	;
+{7996.} 	 HO2C4O2 = HO2C4O : 	1.30D-12*0.6*RO2 	;
+{7997.} 	 HO2C4O2 = HO2C4OH : 	1.30D-12*0.2*RO2 	;
+{7998.} 	 C61O2 + HO2 = C61OOH : 	KRO2HO2*0.770 	;
+{7999.} 	 C61O2 + NO = C61NO3 : 	KRO2NO*0.098 	;
+{8000.} 	 C61O2 + NO = C61O + NO2 : 	KRO2NO*0.902 	;
+{8001.} 	 C61O2 + NO3 = C61O + NO2 : 	KRO2NO3 	;
+{8002.} 	 C61O2 = C61CO : 	8.40D-13*0.2*RO2 	;
+{8003.} 	 C61O2 = C61O : 	8.40D-13*0.6*RO2 	;
+{8004.} 	 C61O2 = C61OH : 	8.40D-13*0.2*RO2 	;
+{8005.} 	 CO23C65O2 + HO2 = CO23C65OOH : 	KRO2HO2*0.770 	;
+{8006.} 	 CO23C65O2 + NO = CO23C65O + NO2 : 	KRO2NO 	;
+{8007.} 	 CO23C65O2 + NO3 = CO23C65O + NO2 : 	KRO2NO3 	;
+{8008.} 	 CO23C65O2 = CO23C65O : 	8.80D-13*RO2 	;
+{8009.} 	 C6CO3OH5O2 + HO2 = C6CO3OHOOH : 	KRO2HO2*0.770 	;
+{8010.} 	 C6CO3OH5O2 + NO = C6CO3OH5O + NO2 : 	KRO2NO 	;
+{8011.} 	 C6CO3OH5O2 + NO3 = C6CO3OH5O + NO2 : 	KRO2NO3 	;
+{8012.} 	 C6CO3OH5O2 = C6CO23HO5 : 	8.80D-13*0.2*RO2 	;
+{8013.} 	 C6CO3OH5O2 = C6CO3HO25 : 	8.80D-13*0.2*RO2 	;
+{8014.} 	 C6CO3OH5O2 = C6CO3OH5O : 	8.80D-13*0.6*RO2 	;
+{8015.} 	 C6CO34O2 + HO2 = C6CO34OOH : 	KRO2HO2*0.770 	;
+{8016.} 	 C6CO34O2 + NO = C6CO34O + NO2 : 	KRO2NO 	;
+{8017.} 	 C6CO34O2 + NO3 = C6CO34O + NO2 : 	KRO2NO3 	;
+{8018.} 	 C6CO34O2 = C6CO34O : 	8.80D-13*RO2 	;
+{8019.} 	 C6HO1CO3O2 + HO2 = C6HOCOOOH : 	KRO2HO2*0.770 	;
+{8020.} 	 C6HO1CO3O2 + NO = C6HO1CO3O + NO2 : 	KRO2NO 	;
+{8021.} 	 C6HO1CO3O2 + NO3 = C6HO1CO3O + NO2 : 	KRO2NO3 	;
+{8022.} 	 C6HO1CO3O2 = C6CO34HO1 : 	8.80D-13*0.2*RO2 	;
+{8023.} 	 C6HO1CO3O2 = C6CO3HO14 : 	8.80D-13*0.2*RO2 	;
+{8024.} 	 C6HO1CO3O2 = C6HO1CO3O : 	8.80D-13*0.6*RO2 	;
+{8025.} 	 C3COCCO3 + HO2 = C3COCCO3H : 	KAPHO2*0.56 	;
+{8026.} 	 C3COCCO3 + HO2 = PEN2ONE1O2 + OH : 	KAPHO2*0.44 	;
+{8027.} 	 C3COCCO3 + NO = PEN2ONE1O2 + NO2 : 	KAPNO 	;
+{8028.} 	 C3COCCO3 + NO2 = C3COCPAN : 	KFPAN 	;
+{8029.} 	 C3COCCO3 + NO3 = PEN2ONE1O2 + NO2 : 	KRO2NO3*1.74 	;
+{8030.} 	 C3COCCO3 = PEN2ONE1O2 : 	1.00D-11*RO2 	;
+{8031.} 	 PEN2ONE1O2 + HO2 = PE2ONE1OOH : 	KRO2HO2*0.706 	;
+{8032.} 	 PEN2ONE1O2 + NO = PEN2ONE1O + NO2 : 	KRO2NO 	;
+{8033.} 	 PEN2ONE1O2 + NO3 = PEN2ONE1O + NO2 : 	KRO2NO3 	;
+{8034.} 	 PEN2ONE1O2 = PEN2ONE1O : 	2.00D-12*RO2 	;
+{8035.} 	 MIBK3COO2 + HO2 = MIBK3COOOH : 	KRO2HO2*0.770 	;
+{8036.} 	 MIBK3COO2 + NO = MIBK3COO + NO2 : 	KRO2NO 	;
+{8037.} 	 MIBK3COO2 + NO3 = MIBK3COO + NO2 : 	KRO2NO3 	;
+{8038.} 	 MIBK3COO2 = MIBK3COO : 	2.00D-12*RO2 	;
+{8039.} 	 C612O2 + HO2 = C612OOH : 	KRO2HO2*0.770 	;
+{8040.} 	 C612O2 + NO = C612O + NO2 : 	KRO2NO 	;
+{8041.} 	 C612O2 + NO3 = C612O + NO2 : 	KRO2NO3 	;
+{8042.} 	 C612O2 = C612O : 	2.00D-12*0.6*RO2 	;
+{8043.} 	 C612O2 = C612OH : 	2.00D-12*0.2*RO2 	;
+{8044.} 	 C612O2 = HM22COCHO : 	2.00D-12*0.2*RO2 	;
+{8045.} 	 CO2M33CO3 + HO2 = CO2M33CO2H + O3 : 	KAPHO2*0.15 	;
+{8046.} 	 CO2M33CO3 + HO2 = CO2M33CO3H : 	KAPHO2*0.41 	;
+{8047.} 	 CO2M33CO3 + HO2 = MIPKAO2 + OH : 	KAPHO2*0.44 	;
+{8048.} 	 CO2M33CO3 + NO = MIPKAO2 + NO2 : 	KAPNO 	;
+{8049.} 	 CO2M33CO3 + NO2 = C6PAN16 : 	KFPAN 	;
+{8050.} 	 CO2M33CO3 + NO3 = MIPKAO2 + NO2 : 	KRO2NO3*1.74 	;
+{8051.} 	 CO2M33CO3 = CO2M33CO2H : 	1.00D-11*0.3*RO2 	;
+{8052.} 	 CO2M33CO3 = MIPKAO2 : 	1.00D-11*0.7*RO2 	;
+{8053.} 	 C6COCHOO2 + HO2 = C6COCHOOOH : 	KRO2HO2*0.770 	;
+{8054.} 	 C6COCHOO2 + NO = C6COCHOO + NO2 : 	KRO2NO 	;
+{8055.} 	 C6COCHOO2 + NO3 = C6COCHOO + NO2 : 	KRO2NO3 	;
+{8056.} 	 C6COCHOO2 = C6COCHOO : 	1.30D-12*0.6*RO2 	;
+{8057.} 	 C6COCHOO2 = C6CODIAL : 	1.30D-12*0.2*RO2 	;
+{8058.} 	 C6COCHOO2 = C6COHOCHO : 	1.30D-12*0.2*RO2 	;
+{8059.} 	 CY6DIONO2 + HO2 = CY6COCOOOH : 	KRO2HO2*0.770 	;
+{8060.} 	 CY6DIONO2 + NO = CY6DIONO + NO2 : 	KRO2NO 	;
+{8061.} 	 CY6DIONO2 + NO3 = CY6DIONO + NO2 : 	KRO2NO3 	;
+{8062.} 	 CY6DIONO2 = CY6DIONO : 	2.50D-13*0.6*RO2 	;
+{8063.} 	 CY6DIONO2 = CY6DIONOH : 	2.50D-13*0.2*RO2 	;
+{8064.} 	 CY6DIONO2 = CY6TRION : 	2.50D-13*0.2*RO2 	;
+{8065.} 	 VINOH + OH = HOCH2CHO + HO2 : 	9.00D-12 	;
+{8066.} 	 PINAL + NO3 = C96CO3 + HNO3 : 	2.0D-14 	;
+{8067.} 	 PINAL + OH = C96CO3 : 	5.2D-12*EXP(600/TEMP)*0.772 	;
+{8068.} 	 PINAL + OH = PINALO2 : 	5.2D-12*EXP(600/TEMP)*0.228 	;
+{8069.} 	 PINAL = C96O2 + CO + HO2 : 	J(15) 	;
+{8070.} 	 NC101O2 + HO2 = NC101OOH : 	KRO2HO2*0.914 	;
+{8071.} 	 NC101O2 + NO = NC101O + NO2 : 	KRO2NO 	;
+{8072.} 	 NC101O2 + NO3 = NC101O + NO2 : 	KRO2NO3 	;
+{8073.} 	 NC101O2 = NC101O : 	6.70D-15*RO2 	;
+{8074.} 	 C96CO3 + HO2 = C96O2 + OH : 	KAPHO2*0.44 	;
+{8075.} 	 C96CO3 + HO2 = PERPINONIC : 	KAPHO2*0.41 	;
+{8076.} 	 C96CO3 + HO2 = PINONIC + O3 : 	KAPHO2*0.15 	;
+{8077.} 	 C96CO3 + NO = C96O2 + NO2 : 	KAPNO 	;
+{8078.} 	 C96CO3 + NO2 = C10PAN2 : 	KFPAN 	;
+{8079.} 	 C96CO3 + NO3 = C96O2 + NO2 : 	KRO2NO3*1.74 	;
+{8080.} 	 C96CO3 = C96O2 : 	1.00D-11*0.7*RO2 	;
+{8081.} 	 C96CO3 = PINONIC : 	1.00D-11*0.3*RO2 	;
+{8082.} 	 C107OOH + OH = C107O2 : 	3.01D-11 	;
+{8083.} 	 C107OOH = C107O + OH : 	J(41)+J(15) 	;
+{8084.} 	 C107O = C108O2 : 	KDEC 	;
+{8085.} 	 C107OH + OH = C107O : 	2.66D-11 	;
+{8086.} 	 C107OH = C107O + HO2 : 	J(15) 	;
+{8087.} 	 C109OOH + OH = C109CO + OH : 	5.47D-11 	;
+{8088.} 	 C109OOH = C109O + OH : 	J(41)+J(15) 	;
+{8089.} 	 C109OOH = C89CO3 + HCHO + OH : 	J(22) 	;
+{8090.} 	 C109O = C89CO3 + HCHO : 	KDEC*0.80 	;
+{8091.} 	 C109O = C920CO3 : 	KDEC*0.20 	;
+{8092.} 	 C109CO + OH = C89CO3 + CO : 	5.47D-11 	;
+{8093.} 	 C109CO = C89CO3 + CO + HO2 : 	J(34)+J(15) 	;
+{8094.} 	 C109OH + OH = C109CO + HO2 : 	4.45D-11 	;
+{8095.} 	 C109OH = C89CO3 + HCHO + HO2 : 	J(22) 	;
+{8096.} 	 C109OH = C920O2 + CO + HO2 : 	J(15) 	;
+{8097.} 	 PINONIC + OH = C96O2 : 	6.65D-12 	;
+{8098.} 	 PINONIC = C96O2 + HO2 : 	J(22) 	;
+{8099.} 	 C96OOH + OH = C96O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8100.} 	 C96OOH + OH = NORPINAL + OH : 	1.30D-11 	;
+{8101.} 	 C96OOH = C96O + OH : 	J(41)+J(22) 	;
+{8102.} 	 C96NO3 + OH = NORPINAL + NO2 : 	2.88D-12 	;
+{8103.} 	 C96NO3 = C96O + NO2 : 	J(53)+J(22) 	;
+{8104.} 	 C96O = C97O2 : 	4.20D+10*EXP(-3523/TEMP) 	;
+{8105.} 	 C96OH + OH = NORPINAL + HO2 : 	7.67D-12 	;
+{8106.} 	 C96OH = C96O + HO2 : 	J(22) 	;
+{8107.} 	 NORPINAL + NO3 = C85CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8108.} 	 NORPINAL + OH = C85CO3 : 	2.64D-11 	;
+{8109.} 	 NORPINAL = C85O2 + CO + HO2 : 	J(15) 	;
+{8110.} 	 HCC7CO + OH = C719O2 : 	1.19D-10 	;
+{8111.} 	 C720O2 + HO2 = C720OOH : 	KRO2HO2*0.820 	;
+{8112.} 	 C720O2 + NO = C720NO3 : 	KRO2NO*0.278 	;
+{8113.} 	 C720O2 + NO = C720O + NO2 : 	KRO2NO*0.722 	;
+{8114.} 	 C720O2 + NO3 = C720O + NO2 : 	KRO2NO3 	;
+{8115.} 	 C720O2 = C720O : 	2.50D-13*RO2*0.6 	;
+{8116.} 	 C720O2 = C720OH : 	2.50D-13*RO2*0.2 	;
+{8117.} 	 C720O2 = HCC7CO : 	2.50D-13*RO2*0.2 	;
+{8118.} 	 NC91CO3 + HO2 = NC91CO3H : 	KAPHO2*0.56 	;
+{8119.} 	 NC91CO3 + HO2 = NOPINONE + NO2 + OH : 	KAPHO2*0.44 	;
+{8120.} 	 NC91CO3 + NO = NOPINONE + NO2 + NO2 : 	KAPNO 	;
+{8121.} 	 NC91CO3 + NO2 = NC91PAN : 	KFPAN 	;
+{8122.} 	 NC91CO3 + NO3 = NOPINONE + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{8123.} 	 NC91CO3 = NOPINONE + NO2 : 	1.00D-11*RO2 	;
+{8124.} 	 NOPINAOOH + OH = C9DC + OH : 	8.59D-11 	;
+{8125.} 	 NOPINAOOH = NOPINAO + OH : 	J(41) 	;
+{8126.} 	 NOPINANO3 + OH = C9DC + NO2 : 	3.24D-12 	;
+{8127.} 	 NOPINANO3 = NOPINAO + NO2 : 	J(54) 	;
+{8128.} 	 NOPINAO = C918O2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{8129.} 	 NOPINAO = C9DC + HO2 : 	KROSEC*O2 	;
+{8130.} 	 C9DC + OH = C9DCO2 : 	6.07D-12 	;
+{8131.} 	 NOPINAOH + OH = C9DC + HO2 : 	3.68D-11 	;
+{8132.} 	 NOPINBOOH + OH = NOPINBCO + OH : 	3.44D-11 	;
+{8133.} 	 NOPINBOOH = NOPINBO + OH : 	J(41) 	;
+{8134.} 	 NOPINBNO3 + OH = NOPINBCO + NO2 : 	6.05D-12 	;
+{8135.} 	 NOPINBNO3 = NOPINBO + NO2 : 	J(54) 	;
+{8136.} 	 NOPINBO = C915O2 : 	KDEC 	;
+{8137.} 	 NOPINBCO + OH = C915O2 : 	1.64D-11 	;
+{8138.} 	 NOPINBOH + OH = NOPINBCO + HO2 : 	1.81D-11 	;
+{8139.} 	 NOPINCOOH + OH = NOPINCO2 : 	1.11D-11 	;
+{8140.} 	 NOPINCOOH = NOPINCO + OH : 	J(41) 	;
+{8141.} 	 NOPINCNO3 + OH = CH3COCH3 + C619CO + NO2 : 	6.37D-12 	;
+{8142.} 	 NOPINCNO3 = NOPINCO + NO2 : 	J(55) 	;
+{8143.} 	 NOPINCO = C917O2 : 	KDEC 	;
+{8144.} 	 NOPINCOH + OH = NOPINCO : 	7.69D-12 	;
+{8145.} 	 NOPINDOOH + OH = NOPINDCO + OH : 	2.63D-11 	;
+{8146.} 	 NOPINDOOH = NOPINDO + OH : 	J(41) 	;
+{8147.} 	 NOPINDO = C89CO3 : 	KDEC 	;
+{8148.} 	 NOPINDCO + OH = C89CO3 : 	3.07D-12 	;
+{8149.} 	 NOPINDOH + OH = NOPINDCO + HO2 : 	1.41D-11 	;
+{8150.} 	 C8BCO2 + HO2 = C8BCOOH : 	KRO2HO2*0.859 	;
+{8151.} 	 C8BCO2 + NO = C8BCNO3 : 	KRO2NO*0.138 	;
+{8152.} 	 C8BCO2 + NO = C8BCO + NO2 : 	KRO2NO*0.862 	;
+{8153.} 	 C8BCO2 + NO3 = C8BCO + NO2 : 	KRO2NO3 	;
+{8154.} 	 C8BCO2 = C8BCCO : 	2.50D-13*RO2*0.2 	;
+{8155.} 	 C8BCO2 = C8BCO : 	2.50D-13*RO2*0.6 	;
+{8156.} 	 C8BCO2 = C8BCOH : 	2.50D-13*RO2*0.2 	;
+{8157.} 	 C918CO3 + HO2 = C918CO3H : 	KAPHO2*0.56 	;
+{8158.} 	 C918CO3 + HO2 = NOPINONE + HO2 + OH : 	KAPHO2*0.44 	;
+{8159.} 	 C918CO3 + NO = NOPINONE + HO2 + NO2 : 	KAPNO 	;
+{8160.} 	 C918CO3 + NO2 = C918PAN : 	KFPAN 	;
+{8161.} 	 C918CO3 + NO3 = NOPINONE + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{8162.} 	 C918CO3 = NOPINONE + HO2 : 	1.00D-11*RO2 	;
+{8163.} 	 LIMAL + NO3 = C923CO3 + HNO3 : 	2.60D-13*0.092 	;
+{8164.} 	 LIMAL + NO3 = NLIMALO2 : 	2.60D-13*0.988 	;
+{8165.} 	 LIMAL + O3 = LIMALOOA + HCHO : 	8.30D-18*0.670 	;
+{8166.} 	 LIMAL + O3 = LMLKET + CH2OOF : 	8.30D-18*0.330 	;
+{8167.} 	 LIMAL + OH = C923CO3 : 	1.10D-10*0.288 	;
+{8168.} 	 LIMAL + OH = LIMALO2 : 	1.10D-10*0.712 	;
+{8169.} 	 LIMAL = C923O2 + CO + HO2 : 	J(15) 	;
+{8170.} 	 LIMALAOOH + OH = LIMALACO + OH : 	1.06D-10 	;
+{8171.} 	 LIMALAOOH = C729CHO + OH + CH3CO3 : 	J(22) 	;
+{8172.} 	 LIMALAOOH = LIMALAO + OH : 	J(41) 	;
+{8173.} 	 LIMALAO = C729CHO + CH3CO3 : 	KDEC 	;
+{8174.} 	 LIMALACO + OH = C729CHO + CH3CO3 : 	8.34D-11 	;
+{8175.} 	 LIMALACO = C729CO3 + CH3CO3 : 	J(35) 	;
+{8176.} 	 LIMALAOH + OH = LIMALACO + HO2 : 	9.34D-11 	;
+{8177.} 	 LIMALAOH = C729CHO + HO2 + CH3CO3 : 	J(22) 	;
+{8178.} 	 LIMALBOOH + OH = LIMALBCO + OH : 	9.73D-11 	;
+{8179.} 	 LIMALBOOH = C822CO3 + HCHO + OH : 	J(22) 	;
+{8180.} 	 LIMALBOOH = LIMALBO + OH : 	J(41) 	;
+{8181.} 	 LIMALBO = C822CO3 + HCHO : 	KDEC 	;
+{8182.} 	 LIMALBCO + OH = C822CO3 + CO : 	1.01D-10 	;
+{8183.} 	 LIMALBCO = C822CO3 + CO + HO2 : 	J(34) 	;
+{8184.} 	 LIMALBOH + OH = LIMALBCO + HO2 : 	9.04D-11 	;
+{8185.} 	 LIMALBOH = C822CO3 + HCHO + HO2 : 	J(22) 	;
+{8186.} 	 C923OOH + OH = NORLIMAL + OH : 	7.39D-11 	;
+{8187.} 	 C923OOH = C923O + OH : 	J(41) 	;
+{8188.} 	 C923NO3 + OH = NORLIMAL + NO2 : 	5.82D-11 	;
+{8189.} 	 C923NO3 = C923O + NO2 : 	J(53) 	;
+{8190.} 	 C923O = C924O2 : 	KDEC 	;
+{8191.} 	 C923OH + OH = NORLIMAL + HO2 : 	6.91D-11 	;
+{8192.} 	 NORLIMAL + OH = C816CO3 : 	8.00D-11*0.288 	;
+{8193.} 	 NORLIMAL + OH = NORLIMO2 : 	8.00D-11*0.712 	;
+{8194.} 	 NORLIMAL = C816O2 + CO + HO2 : 	J(15) 	;
+{8195.} 	 LIMONONIC + OH = C923O2 : 	6.98D-11 	;
+{8196.} 	 C923CO3 + HO2 = C923CO3H : 	KAPHO2*0.41 	;
+{8197.} 	 C923CO3 + HO2 = C923O2 + OH : 	KAPHO2*0.44 	;
+{8198.} 	 C923CO3 + HO2 = LIMONONIC + O3 : 	KAPHO2*0.15 	;
+{8199.} 	 C923CO3 + NO = C923O2 + NO2 : 	KAPNO 	;
+{8200.} 	 C923CO3 + NO2 = C923PAN : 	KFPAN 	;
+{8201.} 	 C923CO3 + NO3 = C923O2 + NO2 : 	KRO2NO3*1.74 	;
+{8202.} 	 C923CO3 = C923O2 : 	1.00D-11*RO2*0.7 	;
+{8203.} 	 C923CO3 = LIMONONIC : 	1.00D-11*RO2*0.3 	;
+{8204.} 	 LIMKET + NO3 = NLMKAO2 : 	9.40D-12 	;
+{8205.} 	 LIMKET + O3 = LMKOOA : 	1.50D-16*0.730 	;
+{8206.} 	 LIMKET + O3 = LMKOOB : 	1.50D-16*0.270 	;
+{8207.} 	 LIMKET + OH = LMKAO2 : 	9.97D-11*0.647 	;
+{8208.} 	 LIMKET + OH = LMKBO2 : 	9.97D-11*0.353 	;
+{8209.} 	 C141CO3 + HO2 = C141CO2H + O3 : 	KAPHO2*0.15 	;
+{8210.} 	 C141CO3 + HO2 = C141CO3H : 	KAPHO2*0.41 	;
+{8211.} 	 C141CO3 + HO2 = C141O2 + OH : 	KAPHO2*0.44 	;
+{8212.} 	 C141CO3 + NO = C141O2 + NO2 : 	KAPNO 	;
+{8213.} 	 C141CO3 + NO2 = C141PAN : 	KFPAN 	;
+{8214.} 	 C141CO3 + NO3 = C141O2 + NO2 : 	KRO2NO3*1.74 	;
+{8215.} 	 C141CO3 = C141CO2H : 	1.00D-11*RO2*0.3 	;
+{8216.} 	 C141CO3 = C141O2 : 	1.00D-11*RO2*0.7 	;
+{8217.} 	 NBCALO2 + HO2 = NBCALOOH : 	KRO2HO2*0.975 	;
+{8218.} 	 NBCALO2 + NO = NBCALO + NO2 : 	KRO2NO 	;
+{8219.} 	 NBCALO2 + NO3 = NBCALO + NO2 : 	KRO2NO3 	;
+{8220.} 	 NBCALO2 = NBCALO : 	9.20D-14*RO2*0.7 	;
+{8221.} 	 NBCALO2 = NBCALOH : 	9.20D-14*RO2*0.3 	;
+{8222.} 	 BCALOOA = BCALOO : 	KDEC*0.5 	;
+{8223.} 	 BCALOOA = C146O2 + OH : 	KDEC*0.5 	;
+{8224.} 	 BCLKET + NO3 = C131CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8225.} 	 BCLKET + OH = BCLKAO2 : 	3.79D-11*0.032 	;
+{8226.} 	 BCLKET + OH = BCLKBO2 : 	3.79D-11*0.004 	;
+{8227.} 	 BCLKET + OH = BCLKCO2 : 	3.79D-11*0.100 	;
+{8228.} 	 BCLKET + OH = C131CO3 : 	3.79D-11*0.764 	;
+{8229.} 	 BCLKET + OH = C146O2 : 	3.79D-11*0.100 	;
+{8230.} 	 BCLKET = C131O2 + CO + HO2 : 	J(15) 	;
+{8231.} 	 BCALO2 + HO2 = BCALOOH : 	KRO2HO2*0.975 	;
+{8232.} 	 BCALO2 + NO = BCALNO3 : 	KRO2NO*0.068 	;
+{8233.} 	 BCALO2 + NO = BCALO + NO2 : 	KRO2NO*0.932 	;
+{8234.} 	 BCALO2 + NO3 = BCALO + NO2 : 	KRO2NO3 	;
+{8235.} 	 BCALO2 = BCALO : 	9.20D-14*RO2*0.7 	;
+{8236.} 	 BCALO2 = BCALOH : 	9.20D-14*RO2*0.3 	;
+{8237.} 	 BCKSOZ + OH = C131O2 : 	3.65D-11 	;
+{8238.} 	 BCKSZOO + CO = BCKSOZ : 	1.20D-15 	;
+{8239.} 	 BCKSZOO + NO = BCKSOZ + NO2 : 	1.00D-14 	;
+{8240.} 	 BCKSZOO + NO2 = BCKSOZ + NO3 : 	1.00D-15 	;
+{8241.} 	 BCKSZOO + SO2 = BCKSOZ + SO3 : 	7.00D-14 	;
+{8242.} 	 BCKSZOO = BCKSOZ + H2O2 : 	1.40D-17*H2O 	;
+{8243.} 	 BCSOZO2 + HO2 = BCSOZOOH : 	KRO2HO2*0.975 	;
+{8244.} 	 BCSOZO2 + NO = BCSOZNO3 : 	KRO2NO*0.247 	;
+{8245.} 	 BCSOZO2 + NO = BCSOZO : 	KRO2NO*0.753 	;
+{8246.} 	 BCSOZO2 + NO3 = BCSOZO : 	KRO2NO3 	;
+{8247.} 	 BCSOZO2 = BCSOZO : 	9.20D-14*RO2*0.7 	;
+{8248.} 	 BCSOZO2 = BCSOZOH : 	9.20D-14*RO2*0.3 	;
+{8249.} 	 C131CO2H + OH = C147O2 : 	1.21D-11 	;
+{8250.} 	 C141OOA = C141OO : 	KDEC*0.5 	;
+{8251.} 	 C141OOA = C147O2 + OH : 	KDEC*0.5 	;
+{8252.} 	 C151O2 + HO2 = C151OOH : 	KRO2HO2*0.975 	;
+{8253.} 	 C151O2 + NO = C151NO3 : 	KRO2NO*0.136 	;
+{8254.} 	 C151O2 + NO = C151O + NO2 : 	KRO2NO*0.864 	;
+{8255.} 	 C151O2 + NO3 = C151O + NO2 : 	KRO2NO3 	;
+{8256.} 	 C151O2 = C151O : 	9.20D-14*RO2*0.7 	;
+{8257.} 	 C151O2 = C151OH : 	9.20D-14*RO2*0.3 	;
+{8258.} 	 BCALAOOH + OH = BCALACO + OH : 	1.06D-10 	;
+{8259.} 	 BCALAOOH = BCALAO + OH : 	J(41) 	;
+{8260.} 	 BCALAOOH = C126CHO + OH + CH3CO3 : 	J(22) 	;
+{8261.} 	 BCALAO = C126CHO + CH3CO3 : 	KDEC 	;
+{8262.} 	 BCALACO + OH = C126CHO + CH3CO3 : 	8.34D-11 	;
+{8263.} 	 BCALACO = C126CO3 + CH3CO3 : 	J(35) 	;
+{8264.} 	 BCALAOH + OH = BCALACO + HO2 : 	9.34D-11 	;
+{8265.} 	 BCALAOH = C126CHO + CH3CO3 + HO2 : 	J(22) 	;
+{8266.} 	 BCALBOOH + OH = BCALBCO + OH : 	9.73D-11 	;
+{8267.} 	 BCALBOOH = BCALBO + OH : 	J(41) 	;
+{8268.} 	 BCALBOOH = C136CO3 + HCHO + OH : 	J(22) 	;
+{8269.} 	 BCALBO = C136CO3 + HCHO : 	KDEC 	;
+{8270.} 	 BCALBCO + OH = C136CO3 + CO : 	1.01D-10 	;
+{8271.} 	 BCALBCO = C136CO3 + CO + HO2 : 	J(34) 	;
+{8272.} 	 BCALBOH + OH = BCALBCO + HO2 : 	9.04D-11 	;
+{8273.} 	 BCALBOH = C136CO3 + HCHO + HO2 : 	J(22) 	;
+{8274.} 	 BCBOOA = BCBOCOO : 	KDEC*0.5 	;
+{8275.} 	 BCBOOA = C148O2 + OH : 	KDEC*0.5 	;
+{8276.} 	 BCLKBOC + OH = C148O2 : 	3.78D-11 	;
+{8277.} 	 C152O2 + HO2 = C152OOH : 	KRO2HO2*0.975 	;
+{8278.} 	 C152O2 + NO = C152NO3 : 	KRO2NO*0.136 	;
+{8279.} 	 C152O2 + NO = C152O + NO2 : 	KRO2NO*0.864 	;
+{8280.} 	 C152O2 + NO3 = C152O + NO2 : 	KRO2NO3 	;
+{8281.} 	 C152O2 = C152O : 	9.20D-14*RO2*0.7 	;
+{8282.} 	 C152O2 = C152OH : 	9.20D-14*RO2*0.3 	;
+{8283.} 	 C136OOH + OH = C126CHO + OH : 	9.71D-11 	;
+{8284.} 	 C136OOH = C136O + OH : 	J(41) 	;
+{8285.} 	 C136NO3 + OH = C126CHO + NO2 : 	8.31D-11 	;
+{8286.} 	 C136NO3 = C136O + NO2 : 	J(53) 	;
+{8287.} 	 C136O = C1311O2 : 	KDEC 	;
+{8288.} 	 C126CHO + NO3 = C126CO3 + HNO3 : 	KNO3AL*17 	;
+{8289.} 	 C126CHO + NO3 = NC1313O2 : 	3.30D-13 	;
+{8290.} 	 C126CHO + O3 = C116CHO + CH2OOF : 	1.10D-16*0.330 	;
+{8291.} 	 C126CHO + O3 = C126OOA + HCHO : 	1.10D-16*0.670 	;
+{8292.} 	 C126CHO + OH = C126CO3 : 	1.10D-10*0.447 	;
+{8293.} 	 C126CHO + OH = C1313O2 : 	1.10D-10*0.553 	;
+{8294.} 	 C126CHO = C126O2 + CO + HO2 : 	J(15)*2 	;
+{8295.} 	 C136OH + OH = C126CHO + HO2 : 	8.80D-11 	;
+{8296.} 	 BCALCOOH + OH = BCALCCO + OH : 	1.02D-10 	;
+{8297.} 	 BCALCOOH = BCALCO + OH : 	J(41) 	;
+{8298.} 	 BCALCOOH = C141CO + OH + CO + HO2 : 	J(15) 	;
+{8299.} 	 BCALCO = C141CO + CO + HO2 : 	KDEC 	;
+{8300.} 	 BCALCCO + OH = C144O2 + CO : 	7.59D-11 	;
+{8301.} 	 BCALCCO = C144O2 + CO + HO2 : 	J(34) 	;
+{8302.} 	 BCALCOH + OH = BCALCCO + HO2 : 	9.02D-11 	;
+{8303.} 	 BCALCOH = C141CO + HO2 + CO + HO2 : 	J(15) 	;
+{8304.} 	 C141OOH + OH = C141CO + OH : 	7.39D-11 	;
+{8305.} 	 C141OOH = C141O + OH : 	J(41) 	;
+{8306.} 	 C141NO3 + OH = C141CO + NO2 : 	5.82D-11 	;
+{8307.} 	 C141NO3 = C141O + NO2 : 	J(53) 	;
+{8308.} 	 C141O = C142O2 : 	KDEC 	;
+{8309.} 	 C141CO + OH = C144O2 : 	8.00D-11 	;
+{8310.} 	 C141CO = C144O + HO2 : 	J(15) 	;
+{8311.} 	 C141OH + OH = C141CO + HO2 : 	6.91D-11 	;
+{8312.} 	 BCKET + NO3 = NBCKO2 : 	9.40D-12 	;
+{8313.} 	 BCKET + O3 = BCKAOO : 	1.16D-14*0.435 	;
+{8314.} 	 BCKET + O3 = BCKBOO : 	1.16D-14*0.435 	;
+{8315.} 	 BCKET + O3 = BCKOOA : 	1.16D-14*0.100 	;
+{8316.} 	 BCKET + O3 = BCKOOB : 	1.16D-14*0.030 	;
+{8317.} 	 BCKET + OH = BCKAO2 : 	9.95D-11*0.647 	;
+{8318.} 	 BCKET + OH = BCKBO2 : 	9.95D-11*0.353 	;
+{8319.} 	 MMFO2 + HO2 = MMFOOH : 	KRO2HO2*0.520 	;
+{8320.} 	 MMFO2 + NO = MMFNO3 : 	KRO2NO*0.042 	;
+{8321.} 	 MMFO2 + NO = MMFO + NO2 : 	KRO2NO*0.958 	;
+{8322.} 	 MMFO2 + NO3 = MMFO + NO2 : 	KRO2NO3 	;
+{8323.} 	 MMFO2 = MMCF : 	8.80D-13*RO2*0.2 	;
+{8324.} 	 MMFO2 = MMFO : 	8.80D-13*RO2*0.6 	;
+{8325.} 	 MMFO2 = MMFOH : 	8.80D-13*RO2*0.2 	;
+{8326.} 	 MMCFO2 + HO2 = MMCFOOH : 	KRO2HO2*0.520 	;
+{8327.} 	 MMCFO2 + NO = MMCFNO3 : 	KRO2NO*0.017 	;
+{8328.} 	 MMCFO2 + NO = MMCFO + NO2 : 	KRO2NO*0.983 	;
+{8329.} 	 MMCFO2 + NO3 = MMCFO + NO2 : 	KRO2NO3 	;
+{8330.} 	 MMCFO2 = DFC : 	2.00D-12*RO2*0.2 	;
+{8331.} 	 MMCFO2 = MMCFO : 	2.00D-12*RO2*0.6 	;
+{8332.} 	 MMCFO2 = MMCFOH : 	2.00D-12*RO2*0.2 	;
+{8333.} 	 CH3S + NO2 = CH3SO + NO : 	6.00D-11*EXP(240/TEMP) 	;
+{8334.} 	 CH3S + O3 = CH3SO : 	1.15D-12*EXP(430/TEMP) 	;
+{8335.} 	 CH3S = CH3SOO : 	1.20D-16*EXP(1580/TEMP)*O2 	;
+{8336.} 	 DMSO2O2 + HO2 = DMSO2OOH : 	KRO2HO2*0.387 	;
+{8337.} 	 DMSO2O2 + NO = DMSO2O + NO2 : 	KRO2NO 	;
+{8338.} 	 DMSO2O2 + NO3 = DMSO2O + NO2 : 	KRO2NO3 	;
+{8339.} 	 DMSO2O2 = CH3SO2CHO : 	2.00D-12*RO2*0.2 	;
+{8340.} 	 DMSO2O2 = DMSO2O : 	2.00D-12*RO2*0.6 	;
+{8341.} 	 DMSO2O2 = DMSO2OH : 	2.00D-12*RO2*0.2 	;
+{8342.} 	 MSIA + OH = CH3O2 + SO2 : 	9.00D-11 	;
+{8343.} 	 OH + HOC2H4CO2H = HOCH2CH2O2 : 	1.39D-11 	;
+{8344.} 	 HOC2H4CO3H = HOCH2CH2O2 + OH : 	J(41) 	;
+{8345.} 	 OH + HOC2H4CO3H = HOC2H4CO3 : 	1.73D-11 	;
+{8346.} 	 C3PAN1 = HOC2H4CO3 + NO2 : 	KBPAN 	;
+{8347.} 	 OH + C3PAN1 = HOCH2CHO + CO + NO2 : 	4.51D-12 	;
+{8348.} 	 OH + HOIPRCO2H = HYPROPO2 : 	1.46D-11 	;
+{8349.} 	 HOIPRCO3H = HYPROPO2 + OH : 	J(41) 	;
+{8350.} 	 OH + HOIPRCO3H = HOIPRCO3 : 	1.82D-11 	;
+{8351.} 	 C4PAN4 = HOIPRCO3 + NO2 : 	KBPAN 	;
+{8352.} 	 OH + C4PAN4 = ACETOL + CO + NO2 : 	1.45D-11 	;
+{8353.} 	 HO13C5OOH = HO13C5O + OH : 	J(41) 	;
+{8354.} 	 OH + HO13C5OOH = HO13CO4C5 + OH : 	3.98D-11 	;
+{8355.} 	 HO13C5NO3 = HO13C5O + NO2 : 	J(53) 	;
+{8356.} 	 OH + HO13C5NO3 = HO13CO4C5 + NO2 : 	7.51D-12 	;
+{8357.} 	 HO13C5O = HOC2H4CHO + CH3CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{8358.} 	 OH + HO134C5 = HO13CO4C5 + HO2 : 	2.46D-11 	;
+{8359.} 	 HO13CO4C5 = CH3CO3 + HOC2H4CHO + HO2 : 	J(22) 	;
+{8360.} 	 OH + HO13CO4C5 = HO1CO34C5 + HO2 : 	1.51D-11 	;
+{8361.} 	 HO3C4CO3H = HO3C4O2 + OH : 	J(41) 	;
+{8362.} 	 OH + HO3C4CO3H = HO3C4CO3 : 	3.84D-11 	;
+{8363.} 	 C5PAN8 = HO3C4CO3 + NO2 : 	KBPAN 	;
+{8364.} 	 OH + C5PAN8 = HO3C3CHO + CO + NO2 : 	1.20D-11 	;
+{8365.} 	 C54OOH = C54O + OH : 	J(41) 	;
+{8366.} 	 OH + C54OOH = C54O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8367.} 	 OH + C54OOH = H13C43CHO + OH : 	1.54D-11 	;
+{8368.} 	 OH + C54NO3 = H13C43CHO + NO2 : 	5.93D-12 	;
+{8369.} 	 C54O = CO2C5OH + HO2 : 	2.00D+14*EXP(-4909/TEMP) 	;
+{8370.} 	 OH + C54OH = H13C43CHO + HO2 : 	9.90D-12 	;
+{8371.} 	 H13C43CHO = MEKAOH + HO2 + HO2 + CO : 	J(17) 	;
+{8372.} 	 NO3 + H13C43CHO = H13C43CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8373.} 	 OH + H13C43CHO = H13C43CO3 : 	3.00D-11 	;
+{8374.} 	 H2M2C3CO3H = TBUTOLO2 + OH : 	J(41) 	;
+{8375.} 	 OH + H2M2C3CO3H = H2M2C3CO3 : 	4.83D-12 	;
+{8376.} 	 C5PAN11 = H2M2C3CO3 + NO2 : 	KBPAN 	;
+{8377.} 	 OH + C5PAN11 = IBUTALOH + CO + NO2 : 	1.23D-12 	;
+{8378.} 	 PROL1MCO3H + OH = PROL1MCO3 : 	8.08D-12 	;
+{8379.} 	 PROL1MCO3H = MEK + HO2 + OH : 	J(41) 	;
+{8380.} 	 PROL1MPAN + OH = MEK + CO + NO2 : 	1.62D-12 	;
+{8381.} 	 PROL1MPAN = PROL1MCO3 + NO2 : 	KBPAN 	;
+{8382.} 	 C56OOH = C56O + OH : 	J(41) 	;
+{8383.} 	 OH + C56OOH = C42CHO + OH : 	2.72D-11 	;
+{8384.} 	 OH + C56OOH = C56O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8385.} 	 OH + C56NO3 = C42CHO + NO2 : 	5.22D-12 	;
+{8386.} 	 C56O = HOIPRCHO + HCHO + HO2 : 	2.00D+14*EXP(-5489/TEMP) 	;
+{8387.} 	 C42CHO = HOIPRCHO + HO2 + HO2 + CO : 	J(15) 	;
+{8388.} 	 NO3 + C42CHO = C42CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8389.} 	 OH + C42CHO = C42CO3 : 	4.08D-11 	;
+{8390.} 	 OH + C56OH = C42CHO + HO2 : 	2.17D-11 	;
+{8391.} 	 OH + HO2C43CO2H = BUT2OLO2 : 	2.93D-11 	;
+{8392.} 	 HO2C43CO3H = BUT2OLO2 + OH : 	J(41) 	;
+{8393.} 	 OH + HO2C43CO3H = HO2C43CO3 : 	3.27D-11 	;
+{8394.} 	 C5PAN14 = HO2C43CO3 + NO2 : 	KBPAN 	;
+{8395.} 	 OH + C5PAN14 = BUT2OLO + CO + NO2 : 	9.54D-12 	;
+{8396.} 	 CHOC4CO3 + HO2 = CHOC4CO3H : 	KAPHO2*0.56 	;
+{8397.} 	 CHOC4CO3 + HO2 = CHOC4O2 + OH : 	KAPHO2*0.44 	;
+{8398.} 	 CHOC4CO3 + NO = CHOC4O2 + NO2 : 	KAPNO 	;
+{8399.} 	 CHOC4CO3 + NO2 = CHOC4PAN : 	KFPAN 	;
+{8400.} 	 CHOC4CO3 + NO3 = CHOC4O2 + NO2 : 	KRO2NO3 	;
+{8401.} 	 CHOC4CO3 = CHOC4O2 : 	1.00D-11*RO2 	;
+{8402.} 	 C6DIALO2 + HO2 = C6DIALOOH : 	KRO2HO2*0.770 	;
+{8403.} 	 C6DIALO2 + NO = C6DIALO + NO2 : 	KRO2NO 	;
+{8404.} 	 C6DIALO2 + NO3 = C6DIALO + NO2 : 	KRO2NO3 	;
+{8405.} 	 C6DIALO2 = C6CODIAL : 	2.50D-13*0.2*RO2 	;
+{8406.} 	 C6DIALO2 = C6DIALO : 	2.50D-13*0.6*RO2 	;
+{8407.} 	 C6DIALO2 = C6DIALOH : 	2.50D-13*0.2*RO2 	;
+{8408.} 	 CHOC4O2 + HO2 = CHOC4OOH : 	KRO2HO2*0.706 	;
+{8409.} 	 CHOC4O2 + NO = CHOC4O + NO2 : 	KRO2NO 	;
+{8410.} 	 CHOC4O2 + NO3 = CHOC4O + NO2 : 	KRO2NO3 	;
+{8411.} 	 CHOC4O2 = CHOC4O : 	1.30D-12*RO2 	;
+{8412.} 	 CYC6DIONO2 + HO2 = CY6DIONOOH : 	KRO2HO2*0.770 	;
+{8413.} 	 CYC6DIONO2 + NO = CYC6DIONO + NO2 : 	KRO2NO 	;
+{8414.} 	 CYC6DIONO2 + NO3 = CYC6DIONO + NO2 : 	KRO2NO3 	;
+{8415.} 	 CYC6DIONO2 = CYC6DIONO : 	2.50D-13*RO2 	;
+{8416.} 	 MBKCOOHOOH + OH = MIBKCOOHO2 : 	3.50D-11 	;
+{8417.} 	 MBKCOOHOOH = MIBKCOOHO + OH : 	J(41)+J(35) 	;
+{8418.} 	 MIBKCOOHO = C5CO234 + HCHO + HO2 : 	KDEC 	;
+{8419.} 	 NC4OHCO3H + OH = NC4OHCO3 : 	4.50D-12 	;
+{8420.} 	 NC4OHCO3H = IBUTALOH + NO2 + OH : 	J(41) 	;
+{8421.} 	 NC4OHCPAN + OH = IBUTALOH + CO + NO2 + NO2 : 	1.27D-12 	;
+{8422.} 	 NC4OHCPAN = NC4OHCO3 + NO2 : 	KBPAN 	;
+{8423.} 	 C4OH2CO3H + OH = C4OH2CO3 : 	1.05D-11 	;
+{8424.} 	 C4OH2CO3H = IBUTALOH + HO2 + OH : 	J(41) 	;
+{8425.} 	 C4OH2CPAN + OH = IBUTALOH + CO + NO2 : 	7.24D-12 	;
+{8426.} 	 C4OH2CPAN = C4OH2CO3 + NO2 : 	KBPAN 	;
+{8427.} 	 CO2C3CO3H + OH = CO2C3CO3 : 	4.18D-12 	;
+{8428.} 	 CO2C3CO3H = CH3COCH2O2 + OH : 	J(41)+J(22) 	;
+{8429.} 	 CO2C3PAN + OH = MGLYOX + CO + NO2 : 	5.93D-13 	;
+{8430.} 	 CO2C3PAN = CO2C3CO3 + NO2 : 	KBPAN 	;
+{8431.} 	 OH + HO2C3CO2H = IPROPOLO2 : 	2.78D-11 	;
+{8432.} 	 HO2C3CO3H = IPROPOLO2 + OH : 	J(41) 	;
+{8433.} 	 OH + HO2C3CO3H = HO2C3CO3 : 	3.12D-11 	;
+{8434.} 	 C4PAN3 = HO2C3CO3 + NO2 : 	KBPAN 	;
+{8435.} 	 OH + C4PAN3 = CH3CHOHCHO + CO + NO2 : 	9.00D-12 	;
+{8436.} 	 PRPAL2CO2H + OH = PROPALO2 : 	7.29D-11 	;
+{8437.} 	 PRPAL2CO2H = PROPALO2 + HO2 : 	J(17) 	;
+{8438.} 	 PRPAL2CO3H + OH = IBUDIALCO3 : 	7.65D-11 	;
+{8439.} 	 PRPAL2CO3H = PROPALO2 + OH : 	J(41)+J(17) 	;
+{8440.} 	 IBUDIALPAN + OH = MGLYOX + CO + NO2 : 	7.29D-11 	;
+{8441.} 	 IBUDIALPAN = IBUDIALCO3 + NO2 : 	KBPAN 	;
+{8442.} 	 PROPALOOH + OH = MGLYOX + OH : 	4.31D-11 	;
+{8443.} 	 PROPALOOH = HO2 + CO + CH3CHO + OH : 	J(15) 	;
+{8444.} 	 PROPALOOH = PROPALO + OH : 	J(41) 	;
+{8445.} 	 CO3C4CO2H = MEKCO2 + HO2 : 	J(22) 	;
+{8446.} 	 OH + CO3C4CO2H = MEKCO2 : 	1.90D-12 	;
+{8447.} 	 CO3C4CO3H = MEKCO2 + OH : 	J(41)+J(22) 	;
+{8448.} 	 OH + CO3C4CO3H = CO3C4CO3 : 	5.36D-12 	;
+{8449.} 	 C5PAN16 = CO3C4CO3 + NO2 : 	KBPAN 	;
+{8450.} 	 OH + C5PAN16 = EGLYOX + CO + NO2 : 	1.44D-12 	;
+{8451.} 	 HO1C4OOH = HO1C4O + OH : 	J(41) 	;
+{8452.} 	 OH + HO1C4OOH = HO1C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8453.} 	 OH + HO1C4OOH = HOC3H6CHO + OH : 	1.66D-11 	;
+{8454.} 	 HO1C4NO3 = HO1C4O + NO2 : 	J(53) 	;
+{8455.} 	 OH + HO1C4NO3 = HOC3H6CHO + NO2 : 	5.85D-12 	;
+{8456.} 	 HO1C4O = HOC3H6CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8457.} 	 HOC3H6CHO = HO1C3O2 + HO2 + CO : 	J(15) 	;
+{8458.} 	 NO3 + HOC3H6CHO = HOC3H6CO3 + HNO3 : 	KNO3AL*4.0 	;
+{8459.} 	 OH + HOC3H6CHO = HOC3H6CO3 : 	2.64D-11 	;
+{8460.} 	 OH + HOC4H8OH = HOC3H6CHO + HO2 : 	1.11D-11 	;
+{8461.} 	 A2PANO = HOCH2CHO + HO2 : 	KDEC 	;
+{8462.} 	 C2OHOCO2H + OH = C3DIOLO2 : 	1.867E-11 	;
+{8463.} 	 C2OHOCOOH + OH = A2PANOO : 	1.513E-11 	;
+{8464.} 	 C2OHOCOOH = C3DIOLO2 : 	J(41) 	;
+{8465.} 	 A2PAN + OH = HOCH2CHO + CO + NO2 : 	1.865E-11 	;
+{8466.} 	 A2PAN = A2PANOO + NO2 : 	KBPAN 	;
+{8467.} 	 HCOCOHCO3H + OH = HCOCOHCO3 : 	7.33D-11 	;
+{8468.} 	 HCOCOHCO3H = GLYOX + HO2 + OH : 	J(41) 	;
+{8469.} 	 HCOCOHPAN + OH = GLYOX + CO + NO2 : 	6.97D-11 	;
+{8470.} 	 HCOCOHPAN = HCOCOHCO3 + NO2 : 	KBPAN 	;
+{8471.} 	 CHOMOHCO3H + OH = CHOMOHCO3 : 	6.99D-11 	;
+{8472.} 	 CHOMOHCO3H = MGLYOX + OH + HO2 : 	J(41)+J(17) 	;
+{8473.} 	 CHOMOHPAN + OH = MGLYOX + CO + NO2 : 	6.64D-11 	;
+{8474.} 	 CHOMOHPAN = CHOMOHCO3 + NO2 : 	KBPAN 	;
+{8475.} 	 CO2H3CO3H = CH3CO3 + HO2 + HCOCO3H : 	J(22) 	;
+{8476.} 	 CO2H3CO3H = MGLYOX + HO2 + OH : 	J(41) 	;
+{8477.} 	 OH + CO2H3CO3H = CO2H3CO3 : 	7.34D-12 	;
+{8478.} 	 C4PAN6 = CO2H3CO3 + NO2 : 	KBPAN 	;
+{8479.} 	 OH + C4PAN6 = MGLYOX + CO + NO2 : 	3.74D-12 	;
+{8480.} 	 HO1C5OOH = HO1C5O + OH : 	J(41) 	;
+{8481.} 	 OH + HO1C5OOH = CO2C5OH + OH : 	3.08D-11 	;
+{8482.} 	 HO1C5NO3 = HO1C5O + NO2 : 	J(53) 	;
+{8483.} 	 OH + HO1C5NO3 = CO2C5OH + NO2 : 	5.93D-12 	;
+{8484.} 	 HO1C5O = HO2C4CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8485.} 	 CO2C5OH = CH3CO3 + HO1C3O2 : 	J(22) 	;
+{8486.} 	 OH + CO2C5OH = C51O2 : 	9.70D-12*0.517 	;
+{8487.} 	 OH + CO2C5OH = CO2C4CHO + HO2 : 	9.60D-12*0.483 	;
+{8488.} 	 OH + HO2C5OH = CO2C5OH + HO2 : 	1.54D-11 	;
+{8489.} 	 HO2C5OOH = HO2C5O + OH : 	J(41) 	;
+{8490.} 	 OH + HO2C5OOH = HO2C4CHO + OH : 	2.09D-11 	;
+{8491.} 	 OH + HO2C5OOH = HO2C5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8492.} 	 HO2C5NO3 = HO2C5O + NO2 : 	J(54) 	;
+{8493.} 	 OH + HO2C5NO3 = HO2C4CHO + NO2 : 	1.03D-11 	;
+{8494.} 	 HO2C5O = CO2C5OH + HO2 : 	4.37D+11*EXP(-2945/TEMP) 	;
+{8495.} 	 HO2C4CHO = HO2C4O2 + HO2 + CO : 	J(15) 	;
+{8496.} 	 NO3 + HO2C4CHO = HO2C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{8497.} 	 OH + HO2C4CHO = HO2C4CO3 : 	3.09D-11 	;
+{8498.} 	 C52OOH = C52O + OH : 	J(41) 	;
+{8499.} 	 OH + C52OOH = C52O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8500.} 	 OH + C52OOH = HOIBUTCHO + OH : 	1.81D-11 	;
+{8501.} 	 C52NO3 = C52O + NO2 : 	J(53) 	;
+{8502.} 	 OH + C52NO3 = HOIBUTCHO + NO2 : 	6.00D-12 	;
+{8503.} 	 C52O = HOBUT2CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8504.} 	 OH + C52OH = HOBUT2CHO + HO2 : 	1.26D-11*0.5 	;
+{8505.} 	 OH + C52OH = HOIBUTCHO + HO2 : 	1.26D-11*0.5 	;
+{8506.} 	 HOIBUTCHO = IBUTOLCO2 + HO2 + CO : 	J(15) 	;
+{8507.} 	 NO3 + HOIBUTCHO = HOIBUTCO3 + HNO3 : 	KNO3AL*8.5 	;
+{8508.} 	 OH + HOIBUTCHO = HOIBUTCO3 : 	3.51D-11 	;
+{8509.} 	 OH + TBUTCO3H = TBUTCO3 : 	5.19D-12 	;
+{8510.} 	 TBUTCO3H = TC4H9O2 + OH : 	J(41) 	;
+{8511.} 	 C5PAN6 = TBUTCO3 + NO2 : 	KBPAN 	;
+{8512.} 	 OH + C5PAN6 = CH3COCH3 + HCHO + CO + NO2 : 	5.02D-13 	;
+{8513.} 	 HO1C6OOH = HO1C6O + OH : 	J(41) 	;
+{8514.} 	 OH + HO1C6OOH = HO1CO4C6 + OH : 	3.68D-11 	;
+{8515.} 	 HO1C6NO3 = HO1C6O + NO2 : 	J(54) 	;
+{8516.} 	 OH + HO1C6NO3 = HO1CO4C6 + NO2 : 	6.28D-12 	;
+{8517.} 	 HO1C6O = HO3C5CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8518.} 	 OH + HO14C6 = HO1CO4C6 + HO2 : 	1.87D-11 	;
+{8519.} 	 HO1CO4C6 = C2H5CO3 + HO1C3O2 : 	J(22)*0.5 	;
+{8520.} 	 HO1CO4C6 = C2H5O2 + HOC3H6CO3 : 	J(22)*0.5 	;
+{8521.} 	 OH + HO1CO4C6 = C63O2 : 	1.07D-11*0.527 	;
+{8522.} 	 OH + HO1CO4C6 = CO3C5CHO + HO2 : 	1.07D-11*0.473 	;
+{8523.} 	 C5H11CO3H = PEAO2 + OH : 	J(41) 	;
+{8524.} 	 OH + C5H11CO3H = C5H11CO3 : 	1.16D-11 	;
+{8525.} 	 OH + PHXN = C4H9CHO + CO + NO2 : 	5.00D-12 	;
+{8526.} 	 PHXN = C5H11CO3 + NO2 : 	KBPAN 	;
+{8527.} 	 HO2C6OOH = HO2C6O + OH : 	J(41) 	;
+{8528.} 	 OH + HO2C6OOH = HO2CO5C6 + OH : 	3.53D-11 	;
+{8529.} 	 HO2C6NO3 = HO2C6O + NO2 : 	J(54) 	;
+{8530.} 	 OH + HO2C6NO3 = HO2CO5C6 + NO2 : 	1.03D-11 	;
+{8531.} 	 HO2C6O = HO2CO5C6 + HO2 : 	4.37D+11*EXP(-2945/TEMP) 	;
+{8532.} 	 OH + HO25C6 = HO2CO5C6 + HO2 : 	2.01D-11 	;
+{8533.} 	 HO3C6OOH = HO3C6O + OH : 	J(41) 	;
+{8534.} 	 OH + HO3C6OOH = HO3C5CHO + OH : 	2.42D-11 	;
+{8535.} 	 OH + HO3C6OOH = HO3C6O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8536.} 	 HO3C6NO3 = HO3C6O + NO2 : 	J(54) 	;
+{8537.} 	 OH + HO3C6NO3 = HO3C5CHO + NO2 : 	1.34D-11 	;
+{8538.} 	 HO3C6O = HO1CO4C6 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8539.} 	 HO3C5CHO = HO3C5O2 + HO2 + CO : 	J(15) 	;
+{8540.} 	 NO3 + HO3C5CHO = HO3C5CO3 + HNO3 : 	KNO3AL*5.5 	;
+{8541.} 	 OH + HO3C5CHO = CO3C5CHO + HO2 : 	3.78D-11*0.331 	;
+{8542.} 	 OH + HO3C5CHO = HO3C5CO3 : 	3.78D-11*0.669 	;
+{8543.} 	 HO1MC5OOH = HO1MC5O + OH : 	J(41) 	;
+{8544.} 	 OH + HO1MC5OOH = CO2MC5OH + OH : 	3.23D-11 	;
+{8545.} 	 HO1MC5NO3 = HO1MC5O + NO2 : 	J(54) 	;
+{8546.} 	 OH + HO1MC5NO3 = CO2MC5OH + NO2 : 	7.62D-12 	;
+{8547.} 	 HO1MC5O = HO2C54CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8548.} 	 CO2MC5OH = CH3CO3 + IBUTOLCO2 : 	J(22) 	;
+{8549.} 	 OH + CO2MC5OH = C64O2 : 	1.46D-11*0.698 	;
+{8550.} 	 OH + CO2MC5OH = CO2C54CHO + HO2 : 	1.46D-11*0.302 	;
+{8551.} 	 OH + HO14MC5 = CO2MC5OH : 	1.72D-11 	;
+{8552.} 	 C54CO3H = PEBO2 + OH : 	J(41) 	;
+{8553.} 	 OH + C54CO3H = C54CO3 : 	1.21D-11 	;
+{8554.} 	 C6PAN3 = C54CO3 + NO2 : 	KBPAN 	;
+{8555.} 	 OH + C6PAN3 = MPRK + CO + NO2 : 	3.61D-12 	;
+{8556.} 	 HO2MC5OOH = HO2MC5O + OH : 	J(41) 	;
+{8557.} 	 OH + HO2MC5OOH = HO2C54CHO + OH : 	2.28D-11 	;
+{8558.} 	 OH + HO2MC5OOH = HO2MC5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8559.} 	 HO2MC5NO3 = HO2MC5O + NO2 : 	J(53) 	;
+{8560.} 	 OH + HO2MC5NO3 = HO2C54CHO + NO2 : 	1.06D-11 	;
+{8561.} 	 HO2MC5O = CO2MC5OH + HO2 : 	4.37D+11*EXP(-2945/TEMP) 	;
+{8562.} 	 HO2C54CHO = HO2C54O2 + HO2 + CO : 	J(17) 	;
+{8563.} 	 NO3 + HO2C54CHO = HO2C54CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8564.} 	 OH + HO2C54CHO = CO2C54CHO + HO2 : 	3.61D-11*0.287 	;
+{8565.} 	 OH + HO2C54CHO = HO2C54CO3 : 	3.61D-11*0.713 	;
+{8566.} 	 EIPKAOOH = C2H5CO3 + CH3COCH3 + OH : 	J(22) 	;
+{8567.} 	 EIPKAOOH = EIPKAO + OH : 	J(41) 	;
+{8568.} 	 OH + EIPKAOOH = EIPKAO2 : 	5.89D-12 	;
+{8569.} 	 EIPKAO = CH3COCH3 + C2H5CO3 : 	KDEC 	;
+{8570.} 	 EIPKAOH = C2H5CO3 + CH3COCH3 + HO2 : 	J(22) 	;
+{8571.} 	 OH + EIPKAOH = EIPKAO : 	2.43D-12 	;
+{8572.} 	 EIPKBOOH = EIPKBO + OH : 	J(41)+J(22) 	;
+{8573.} 	 OH + EIPKBOOH = CO3C54CHO + OH : 	3.77D-11 	;
+{8574.} 	 EIPKBNO3 = EIPKBO + NO2 : 	J(53)+J(22) 	;
+{8575.} 	 OH + EIPKBNO3 = CO3C54CHO + NO2 : 	2.20D-12 	;
+{8576.} 	 EIPKBO = C66O2 : 	1.15D+11*EXP(-3430/TEMP) 	;
+{8577.} 	 CO3C54CHO = DIEKAO2 + HO2 + CO : 	J(17) 	;
+{8578.} 	 NO3 + CO3C54CHO = CO3C54CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8579.} 	 OH + CO3C54CHO = CO3C54CO3 : 	6.87D-11 	;
+{8580.} 	 EIPKBOH = C2H5CO3 + HYPROPO2 : 	J(22) 	;
+{8581.} 	 OH + EIPKBOH = CO3C54CHO + HO2 : 	1.64D-11 	;
+{8582.} 	 HO2M2C5OOH = HO2M2C5O + OH : 	J(41) 	;
+{8583.} 	 OH + HO2M2C5OOH = H2M2C4CHO + OH : 	1.30D-11 	;
+{8584.} 	 OH + HO2M2C5OOH = HO2M2C5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8585.} 	 HO2M2C5NO3 = HO2M2C5O + NO2 : 	J(53) 	;
+{8586.} 	 OH + HO2M2C5NO3 = H2M2C4CHO + NO2 : 	2.16D-12 	;
+{8587.} 	 HO2M2C5O = H2M2C4CHO + HO2 : 	KROPRIM*O2 	;
+{8588.} 	 H2M2C4CHO = HO2M2C4O2 + HO2 + CO : 	J(15) 	;
+{8589.} 	 NO3 + H2M2C4CHO = H2M2C4CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8590.} 	 OH + H2M2C4CHO = C67O2 : 	2.66D-11*0.177 	;
+{8591.} 	 OH + H2M2C4CHO = H2M2C4CO3 : 	2.66D-11*0.823 	;
+{8592.} 	 OH + HO2M2C5OH = H2M2C4CHO + HO2 : 	7.46D-12 	;
+{8593.} 	 H1MC5OOH = H1MC5O + OH : 	J(41) 	;
+{8594.} 	 OH + H1MC5OOH = CO2M3C5OH + OH : 	3.23D-11 	;
+{8595.} 	 H1MC5NO3 = H1MC5O + NO2 : 	J(54) 	;
+{8596.} 	 OH + H1MC5NO3 = CO2M3C5OH + NO2 : 	6.34D-12 	;
+{8597.} 	 H1MC5O = H2M3C4CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8598.} 	 CO2M3C5OH = CH3CO3 + NBUTOLBO2 : 	J(22) 	;
+{8599.} 	 OH + CO2M3C5OH = C610O2 : 	1.11D-11*0.527 	;
+{8600.} 	 OH + CO2M3C5OH = CO2M3C4CHO + HO2 : 	1.11D-11*0.473 	;
+{8601.} 	 OH + HO14M3C5 = CO2M3C5OH : 	1.73D-11 	;
+{8602.} 	 M3C4CO3H = IPEAO2 + OH : 	J(41) 	;
+{8603.} 	 OH + M3C4CO3H = M3C4CO3 : 	1.55D-11 	;
+{8604.} 	 C6PAN10 = M3C4CO3 + NO2 : 	KBPAN 	;
+{8605.} 	 OH + C6PAN10 = BUT2CHO + CO + NO2 : 	5.03D-12 	;
+{8606.} 	 H2MC5OOH = H2MC5O + OH : 	J(41) 	;
+{8607.} 	 OH + H2MC5OOH = H2M3C4CHO + OH : 	2.28D-11 	;
+{8608.} 	 OH + H2MC5OOH = H2MC5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8609.} 	 H2MC5NO3 = H2MC5O + NO2 : 	J(54) 	;
+{8610.} 	 OH + H2MC5NO3 = H2M3C4CHO + NO2 : 	1.20D-11 	;
+{8611.} 	 H2MC5O = CO2M3C5OH + HO2 : 	4.37D+11*EXP(-2945/TEMP) 	;
+{8612.} 	 H2M3C4CHO = H2M3C4O2 + HO2 + CO : 	J(15) 	;
+{8613.} 	 NO3 + H2M3C4CHO = H2M3C4CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8614.} 	 OH + H2M3C4CHO = C68O2 : 	3.98D-11*0.287 	;
+{8615.} 	 OH + H2M3C4CHO = H2M3C4CO3 : 	3.98D-11*0.713 	;
+{8616.} 	 M2BKAOOH = M2BKAO + OH : 	J(41)+J(22) 	;
+{8617.} 	 OH + M2BKAOOH = CO24M3C5 + OH : 	6.97D-11 	;
+{8618.} 	 M2BKANO3 = M2BKAO + NO2 : 	J(54)+J(22) 	;
+{8619.} 	 OH + M2BKANO3 = CO24M3C5 + NO2 : 	1.25D-12 	;
+{8620.} 	 M2BKAO = C69O2 : 	1.72D+11*EXP(-4240/TEMP) 	;
+{8621.} 	 M2BKAO = CO24M3C5 + HO2 : 	KROSEC*O2 	;
+{8622.} 	 CO24M3C5 = MEKBO2 + CH3CO3 : 	J(22) 	;
+{8623.} 	 OH + CO24M3C5 = C611O2 : 	1.83D-12 	;
+{8624.} 	 OH + M2BKAOH = CO24M3C5 + HO2 : 	2.92D-11 	;
+{8625.} 	 M2BKBOOH = M2BKBO + OH : 	J(41)+J(22) 	;
+{8626.} 	 OH + M2BKBOOH = M2BKBO2 : 	8.04D-12 	;
+{8627.} 	 M2BKBO = CH3CO3 + MEK : 	KDEC 	;
+{8628.} 	 M2BKBOH = CH3CO3 + MEK + HO2 : 	J(22) 	;
+{8629.} 	 OH + M2BKBOH = M2BKBO : 	4.58D-12 	;
+{8630.} 	 HM33C4OOH = HM33C4O + OH : 	J(41) 	;
+{8631.} 	 OH + HM33C4OOH = HM33C3CHO + OH : 	1.56D-11 	;
+{8632.} 	 OH + HM33C4OOH = HM33C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8633.} 	 HM33C4NO3 = HM33C4O + NO2 : 	J(53) 	;
+{8634.} 	 OH + HM33C4NO3 = HM33C3CHO + NO2 : 	5.95D-12 	;
+{8635.} 	 HM33C4O = HM22C3CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8636.} 	 HM33C3CHO = HM33C3O2 + HO2 + CO : 	J(17) 	;
+{8637.} 	 NO3 + HM33C3CHO = HM33C3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8638.} 	 OH + HM33C3CHO = HM33C3CO3 : 	2.96D-11 	;
+{8639.} 	 OH + HM33C4OH = HM22C3CHO + HO2 : 	1.01D-11*0.5 	;
+{8640.} 	 OH + HM33C4OH = HM33C3CHO + HO2 : 	1.01D-11*0.5 	;
+{8641.} 	 M22C3CO3H = NEOPO2 + OH : 	J(41) 	;
+{8642.} 	 OH + M22C3CO3H = M22C3CO3 : 	4.96D-12 	;
+{8643.} 	 C6PAN17 = M22C3CO3 + NO2 : 	KBPAN 	;
+{8644.} 	 OH + C6PAN17 = TBUTCHO + CO + NO2 : 	8.46D-13 	;
+{8645.} 	 HM22C4OOH = HM22C4O + OH : 	J(41) 	;
+{8646.} 	 OH + HM22C4OOH = HM22C3CHO + OH : 	1.56D-11 	;
+{8647.} 	 OH + HM22C4OOH = HM22C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8648.} 	 HM22C4NO3 = HM22C4O + NO2 : 	J(53) 	;
+{8649.} 	 OH + HM22C4NO3 = HM22C3CHO + NO2 : 	4.77D-12 	;
+{8650.} 	 HM22C4O = HM33C3CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8651.} 	 HM22C3CHO = HM22C3O2 + HO2 + CO : 	J(15) 	;
+{8652.} 	 NO3 + HM22C3CHO = HM22C3CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8653.} 	 OH + HM22C3CHO = HM22C3CO3 : 	2.60D-11 	;
+{8654.} 	 OH + M33C3CO2H = IPECO2 : 	4.87D-12 	;
+{8655.} 	 M33C3CO3H = IPECO2 + OH : 	J(41) 	;
+{8656.} 	 OH + M33C3CO3H = M33C3CO3 : 	8.47D-12 	;
+{8657.} 	 C6PAN15 = M33C3CO3 + NO2 : 	KBPAN 	;
+{8658.} 	 OH + C6PAN15 = MEK + HCHO + CO + NO2 : 	1.65D-12 	;
+{8659.} 	 HM23C4OOH = HM23C4O + OH : 	J(41) 	;
+{8660.} 	 OH + HM23C4OOH = HM23C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8661.} 	 OH + HM23C4OOH = HM2C43CHO + OH : 	1.95D-11 	;
+{8662.} 	 HM23C4NO3 = HM23C4O + NO2 : 	J(53) 	;
+{8663.} 	 OH + HM23C4NO3 = HM2C43CHO + NO2 : 	7.40D-12 	;
+{8664.} 	 HM23C4O = HM2C43CHO + HO2 : 	8.74D+11*EXP(-3430/TEMP) 	;
+{8665.} 	 OH + HM23C4OH = HM2C43CHO + HO2 : 	1.45D-11 	;
+{8666.} 	 HM2C43CHO = HM2C43O2 + HO2 + CO : 	J(17) 	;
+{8667.} 	 NO3 + HM2C43CHO = HM2C43CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8668.} 	 OH + HM2C43CHO = HM2C43CO3 : 	3.40D-11 	;
+{8669.} 	 OH + M2C43CO2H = IPEBO2 : 	9.48D-12 	;
+{8670.} 	 M2C43CO3H = IPEBO2 + OH : 	J(41) 	;
+{8671.} 	 OH + M2C43CO3H = M2C43CO3 : 	1.29D-11 	;
+{8672.} 	 C6PAN18 = M2C43CO3 + NO2 : 	KBPAN 	;
+{8673.} 	 OH + C6PAN18 = MIPK + CO + NO2 : 	3.60D-12 	;
+{8674.} 	 HO3C76OOH = HO3C76O + OH : 	J(41) 	;
+{8675.} 	 OH + HO3C76OOH = HO3CO6C7 + OH : 	3.84D-11 	;
+{8676.} 	 HO3C76NO3 = HO3C76O + NO2 : 	J(54) 	;
+{8677.} 	 OH + HO3C76NO3 = HO3CO6C7 + NO2 : 	1.23D-11 	;
+{8678.} 	 HO3C76O = HO2CO5C7 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8679.} 	 OH + HO25C7 = HO2CO5C7 + HO2 : 	2.32D-11 	;
+{8680.} 	 HO3CO6C7 = HO3C5O2 + CH3CO3 : 	J(22) 	;
+{8681.} 	 OH + HO3CO6C7 = CO25C7 + HO2 : 	1.72D-11 	;
+{8682.} 	 CO3C75OOH = CO3C75O + OH : 	J(41)+J(22) 	;
+{8683.} 	 OH + CO3C75OOH = CO3C75O2 : 	1.42D-10 	;
+{8684.} 	 CO3C75O = C71O2 : 	1.45D+11*EXP(-3430/TEMP) 	;
+{8685.} 	 H2M5C65OOH = H2M5C65O + OH : 	J(41) 	;
+{8686.} 	 OH + H2M5C65OOH = H2M5C65O2 : 	1.54D-11 	;
+{8687.} 	 H2M5C65NO3 = H2M5C65O + NO2 : 	J(55) 	;
+{8688.} 	 OH + H2M5C65NO3 = CH3COCH3 + NO2 + HO2C3CHO : 	1.04D-11 	;
+{8689.} 	 H2M5C65O = H2M2CO5C6 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8690.} 	 OH + H25M2C6 = H2M2CO5C6 + HO2 : 	1.20D-11 	;
+{8691.} 	 C75OOH = C75O + OH : 	J(41)+J(22) 	;
+{8692.} 	 OH + C75OOH = C75O2 : 	8.55D-11 	;
+{8693.} 	 C75O = C76O2 : 	1.72D+11*EXP(-4240/TEMP) 	;
+{8694.} 	 H2M2C65OOH = H2M2C65O + OH : 	J(41) 	;
+{8695.} 	 OH + H2M2C65OOH = H2M2CO5C6 + OH : 	2.71D-11 	;
+{8696.} 	 H2M2C65NO3 = H2M2C65O + NO2 : 	J(54) 	;
+{8697.} 	 OH + H2M2C65NO3 = H2M2CO5C6 + NO2 : 	2.24D-12 	;
+{8698.} 	 H2M2C65O = H2M2CO5C6 + HO2 : 	KROSEC*O2 	;
+{8699.} 	 H2M2C65O = IPEAO2 + CH3CHO : 	2.70D+14*EXP(-7398/TEMP) 	;
+{8700.} 	 H2M2CO5C6 = CH3CO3 + HO2M2C4O2 : 	J(22) 	;
+{8701.} 	 OH + H2M2CO5C6 = C77O2 : 	5.92D-12*0.834 	;
+{8702.} 	 OH + H2M2CO5C6 = C78O2 : 	5.92D-12*0.166 	;
+{8703.} 	 H2M4C65OOH = H2M4C65O + OH : 	J(41) 	;
+{8704.} 	 OH + H2M4C65OOH = H2M4CO5C6 + OH : 	3.70D-11 	;
+{8705.} 	 H2M4C65NO3 = H2M4C65O + NO2 : 	J(54) 	;
+{8706.} 	 OH + H2M4C65NO3 = H2M4CO5C6 + NO2 : 	1.08D-11 	;
+{8707.} 	 H2M4C65O = H2M3CO5C6 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8708.} 	 OH + H25M3C6 = H2M3CO5C6 + HO2 : 	2.18D-11*0.500 	;
+{8709.} 	 OH + H25M3C6 = H2M4CO5C6 + HO2 : 	2.18D-11*0.500 	;
+{8710.} 	 H2M4CO5C6 + OH = M3CO25C6 + HO2 : 	1.56D-11 	;
+{8711.} 	 H2M4CO5C6 = HO2C54O2 + CH3CO3 : 	J(22) 	;
+{8712.} 	 C710OOH = C710O + OH : 	J(41)+J(22) 	;
+{8713.} 	 OH + C710OOH = C710O2 : 	6.05D-12 	;
+{8714.} 	 C710O = C711O2 : 	1.72D+11*EXP(-4240/TEMP) 	;
+{8715.} 	 OH + H3M3C6OOH = H3M3C5CHO + OH : 	1.38D-11 	;
+{8716.} 	 OH + H3M3C6OOH = H3M3C6O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8717.} 	 H3M3C6NO3 = H3M3C6O + NO2 : 	J(53) 	;
+{8718.} 	 OH + H3M3C6NO3 = H3M3C5CHO + NO2 : 	3.31D-12 	;
+{8719.} 	 H3M3C6O = H3M3C5CHO + HO2 : 	KROPRIM*O2 	;
+{8720.} 	 OH + H14M4C6 = H3M3C5CHO + HO2 : 	8.35D-12 	;
+{8721.} 	 H3M3C5CHO = H3M3C5O2 + HO2 + CO : 	J(15) 	;
+{8722.} 	 NO3 + H3M3C5CHO = H3M3C5CO3 + HNO3 : 	KNO3AL*8.5 	;
+{8723.} 	 OH + H3M3C5CHO = H3M3C5CO3 : 	2.77D-11 	;
+{8724.} 	 HO3C86OOH = HO3C86O + OH : 	J(41) 	;
+{8725.} 	 OH + HO3C86OOH = HO3CO6C8 + OH : 	4.41D-11 	;
+{8726.} 	 HO3C86NO3 = HO3C86O + NO2 : 	J(54) 	;
+{8727.} 	 OH + HO3C86NO3 = HO3CO6C8 + NO2 : 	1.38D-11 	;
+{8728.} 	 HO3C86O = HO3CO6C8 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8729.} 	 OH + HO36C8 = HO3CO6C8 + HO2 : 	2.63D-11 	;
+{8730.} 	 HO3CO6C8 = C2H5CO3 + HO3C5O2 : 	J(22) 	;
+{8731.} 	 OH + HO3CO6C8 = C82O2 : 	1.85D-11*0.304 	;
+{8732.} 	 OH + HO3CO6C8 = CO36C8 + HO2 : 	1.85D-11*0.696 	;
+{8733.} 	 CO3C85OOH = CO3C85O + OH : 	J(41)+J(22) 	;
+{8734.} 	 OH + CO3C85OOH = CO3C85O2 : 	8.66D-11 	;
+{8735.} 	 CO3C85O = C81O2 : 	1.15D+11*EXP(-3430/TEMP) 	;
+{8736.} 	 HO3C96OOH = HO3C96O + OH : 	J(41) 	;
+{8737.} 	 OH + HO3C96OOH = HO4CO7C9 + OH : 	4.55D-11 	;
+{8738.} 	 HO3C96NO3 = HO3C96O + NO2 : 	J(54) 	;
+{8739.} 	 OH + HO3C96NO3 = HO4CO7C9 + NO2 : 	1.50D-11 	;
+{8740.} 	 HO3C96O = HO4CO7C9 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8741.} 	 OH + HO36C9 = HO4CO7C9 + HO2 : 	2.43D-11 	;
+{8742.} 	 HO4CO7C9 = C2H5CO3 + HO5C6O2 : 	J(22) 	;
+{8743.} 	 OH + HO4CO7C9 = C93O2 : 	1.99D-11*0.304 	;
+{8744.} 	 OH + HO4CO7C9 = CO36C9 + HO2 : 	1.99D-11*0.696 	;
+{8745.} 	 C91OOH = C91O + OH : 	J(41)+J(22) 	;
+{8746.} 	 OH + C91OOH = C91O2 : 	8.80D-11 	;
+{8747.} 	 C91O = C92O2 : 	1.15D+11*EXP(-3430/TEMP) 	;
+{8748.} 	 HO3C106OOH = HO3C106O + OH : 	J(41) 	;
+{8749.} 	 OH + HO3C106OOH = HO5CO8C10 + OH : 	4.69D-11 	;
+{8750.} 	 HO3C106NO3 = HO3C106O + NO2 : 	J(54) 	;
+{8751.} 	 OH + HO3C106NO3 = HO5CO8C10 + NO2 : 	1.64D-11 	;
+{8752.} 	 HO3C106O = HO5CO8C10 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8753.} 	 OH + HO36C10 = HO5CO8C10 + HO2 : 	2.57D-11 	;
+{8754.} 	 HO5CO8C10 = C2H5CO3 + HO6C7O2 : 	J(22) 	;
+{8755.} 	 OH + HO5CO8C10 = C103O2 : 	2.13D-11*0.304 	;
+{8756.} 	 OH + HO5CO8C10 = CO36C10 + HO2 : 	2.13D-11*0.696 	;
+{8757.} 	 C101OOH = C101O + OH : 	J(41)+J(22) 	;
+{8758.} 	 OH + C101OOH = C101O2 : 	8.94D-11 	;
+{8759.} 	 C101O = C102O2 : 	1.15D+11*EXP(-3430/TEMP) 	;
+{8760.} 	 HO3C116OOH = HO3C116O + OH : 	J(41) 	;
+{8761.} 	 OH + HO3C116OOH = HO6CO9C11 + OH : 	4.83D-11 	;
+{8762.} 	 HO3C116NO3 = HO3C116O + NO2 : 	J(54) 	;
+{8763.} 	 OH + HO3C116NO3 = HO6CO9C11 + NO2 : 	1.78D-11 	;
+{8764.} 	 HO3C116O = HO6CO9C11 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8765.} 	 OH + HO36C11 = HO6CO9C11 + HO2 : 	2.71D-11 	;
+{8766.} 	 HO6CO9C11 = C2H5CO3 + HO7C8O2 : 	J(22) 	;
+{8767.} 	 OH + HO6CO9C11 = C113O2 : 	2.27D-11*0.304 	;
+{8768.} 	 OH + HO6CO9C11 = CO36C11 + HO2 : 	2.27D-11*0.696 	;
+{8769.} 	 C111OOH = C111O + OH : 	J(41)+J(22) 	;
+{8770.} 	 OH + C111OOH = C111O2 : 	9.08D-11 	;
+{8771.} 	 C111O = C112O2 : 	1.15D+11*EXP(-3430/TEMP) 	;
+{8772.} 	 HO3C126OOH = HO3C126O + OH : 	J(41) 	;
+{8773.} 	 OH + HO3C126OOH = HO7CO10C12 + OH : 	4.97D-11 	;
+{8774.} 	 HO3C126NO3 = HO3C126O + NO2 : 	J(54) 	;
+{8775.} 	 OH + HO3C126NO3 = HO7CO10C12 + NO2 : 	1.92D-11 	;
+{8776.} 	 HO3C126O = HO7CO10C12 + HO2 : 	5.55D+11*EXP(-2945/TEMP) 	;
+{8777.} 	 OH + HO36C12 = HO7CO10C12 + HO2 : 	2.85D-11 	;
+{8778.} 	 HO7CO10C12 = C2H5CO3 + HO8C9O2 : 	J(22) 	;
+{8779.} 	 OH + HO7CO10C12 = C123O2 : 	2.41D-11*0.304 	;
+{8780.} 	 OH + HO7CO10C12 = CO36C12 + HO2 : 	2.41D-11*0.696 	;
+{8781.} 	 C121OOH = C121O + OH : 	J(41)+J(22) 	;
+{8782.} 	 OH + C121OOH = C121O2 : 	9.10D-11 	;
+{8783.} 	 C121O = C122O2 : 	1.15D+11*EXP(-3430/TEMP) 	;
+{8784.} 	 CO1C6OOH + OH = C6DIAL + OH : 	4.22D-11 	;
+{8785.} 	 CO1C6OOH = CO1C6O + OH : 	J(41)+J(15) 	;
+{8786.} 	 CO1C6NO3 + OH = C6DIAL + NO2 : 	2.82D-11 	;
+{8787.} 	 CO1C6NO3 = CO1C6O + NO2 : 	J(15)+J(53) 	;
+{8788.} 	 CO1C6O = CO1H63O2 : 	KDEC 	;
+{8789.} 	 CO1C6OH + OH = C6DIAL + HO2 : 	3.31D-11 	;
+{8790.} 	 NO3CH2CO2H + OH = HCHO + NO2 : 	1.68D-13 	;
+{8791.} 	 NO3CH2CO3H + OH = NO3CH2CO3 : 	3.63D-12 	;
+{8792.} 	 NO3CH2CO3H = HCHO + NO2 + OH : 	J(41) 	;
+{8793.} 	 NO3CH2PAN + OH = HCHO + CO + NO2 + NO2 : 	1.12D-14 	;
+{8794.} 	 NO3CH2PAN = NO3CH2CO3 + NO2 : 	KBPAN 	;
+{8795.} 	 PRNO3CO2H + OH = CH3CHO + NO2 : 	3.14D-13 	;
+{8796.} 	 PRNO3CO3H + OH = PRNO3CO3 : 	3.77D-12 	;
+{8797.} 	 PRNO3CO3H = CH3CHO + NO2 + OH : 	J(41) 	;
+{8798.} 	 PRNO3PAN + OH = CH3CHO + CO + NO2 + NO2 : 	1.43D-13 	;
+{8799.} 	 PRNO3PAN = PRNO3CO3 + NO2 : 	KBPAN 	;
+{8800.} 	 COC4NO3OOH + OH = CO3C4NO3O2 : 	1.64D-11 	;
+{8801.} 	 COC4NO3OOH = CO3C4NO3O + OH : 	J(41)+J(53) 	;
+{8802.} 	 CO3C4NO3O = NO3CH2CO3 + CH3CHO : 	KDEC 	;
+{8803.} 	 CO23C4NO3 + OH = CO23C3CHO + NO2 : 	1.30D-13 	;
+{8804.} 	 CO23C4NO3 = BIACETO + NO2 : 	J(56) 	;
+{8805.} 	 CO23C4NO3 = HCHO + CH3CO3 + NO2 + CO : 	J(57) 	;
+{8806.} 	 CO23C4NO3 = NO3CH2CO3 + CH3CO3 : 	J(35) 	;
+{8807.} 	 CO3C4NO3OH + OH = CO23C4NO3 + HO2 : 	5.65D-12 	;
+{8808.} 	 CO3C4NO3OH = CH3CHOHCO3 + HCHO + NO2 : 	J(57) 	;
+{8809.} 	 CO3C4NO3OH = HO2CO3C4O + NO2 : 	J(56) 	;
+{8810.} 	 HO3C3CO3H + OH = HO3C3CO3 : 	1.38D-11 	;
+{8811.} 	 HO3C3CO3H = C2H5CHO + HO2 + OH : 	J(41) 	;
+{8812.} 	 HO3C3PAN + OH = C2H5CHO + CO + NO2 : 	3.82D-12 	;
+{8813.} 	 HO3C3PAN = HO3C3CO3 + NO2 : 	KBPAN 	;
+{8814.} 	 MPRNO3CO2H + OH = CH3COCH3 + NO2 : 	3.79D-13 	;
+{8815.} 	 MPRNO3CO3H + OH = MPRBNO3CO3 : 	4.08D-12 	;
+{8816.} 	 MPRNO3CO3H = CH3COCH3 + NO2 + OH : 	J(41) 	;
+{8817.} 	 MPRBNO3PAN + OH = CH3COCH3 + CO + NO2 + NO2 : 	5.44D-14 	;
+{8818.} 	 MPRBNO3PAN = MPRBNO3CO3 + NO2 : 	KBPAN 	;
+{8819.} 	 C5NO3OAOOH + OH = C5NO3COAO2 : 	6.82D-11 	;
+{8820.} 	 C5NO3OAOOH = C5NO3COAO + OH : 	J(41)+J(56)+J(57) 	;
+{8821.} 	 C5NO3COAO = HO2CO4CHO + NO2 : 	2.74D+09*EXP(-3430/TEMP) 	;
+{8822.} 	 C51NO324CO + OH = CO24C4CHO + NO2 : 	6.55D-13 	;
+{8823.} 	 C51NO324CO = C5CO24O + NO2 : 	J(56) 	;
+{8824.} 	 C51NO324CO = CH3CO3 + C3NO3COO2 : 	J(22) 	;
+{8825.} 	 C51NO324CO = HCHO + CO2C3CO3 + NO2 : 	J(57) 	;
+{8826.} 	 C5NO3CO4OH + OH = C51NO324CO + HO2 : 	2.77D-11 	;
+{8827.} 	 C5NO3CO4OH = HO2CO4C5O + NO2 : 	J(56) 	;
+{8828.} 	 C5NO3CO4OH = IPROPOLO2 + HCHO + CO + NO2 : 	J(57) 	;
+{8829.} 	 C4NO3CO2H + OH = C3H7CHO + NO2 : 	2.65D-12 	;
+{8830.} 	 C4NO3CO3H + OH = C4NO3CO3 : 	6.11D-12 	;
+{8831.} 	 C4NO3CO3H = C3H7CHO + NO2 + OH : 	J(41) 	;
+{8832.} 	 C4NO3PAN + OH = C3H7CHO + CO + NO2 + NO2 : 	1.57D-12 	;
+{8833.} 	 C4NO3PAN = C4NO3CO3 + NO2 : 	KBPAN 	;
+{8834.} 	 C5OHCO4OOH + OH = C5OH2CO4O2 : 	7.08D-11 	;
+{8835.} 	 C5OHCO4OOH = C5OH2CO4O + OH : 	J(41) 	;
+{8836.} 	 C5OHCO4OOH = IC3H7O2 + HOCH2CO3 : 	J(22) 	;
+{8837.} 	 C5OH2CO4O = HO1CO24C5 + HO2 : 	KROSEC*O2 	;
+{8838.} 	 C4OHCO3H + OH = C4OHCO3 : 	1.58D-11 	;
+{8839.} 	 C4OHCO3H = C3H7CHO + HO2 + OH : 	J(41) 	;
+{8840.} 	 C4OHPAN + OH = C3H7CHO + CO + NO2 : 	5.37D-12 	;
+{8841.} 	 C4OHPAN = C4OHCO3 + NO2 : 	KBPAN 	;
+{8842.} 	 C5NO3O4OOH + OH = C5NO3CO4O2 : 	1.62D-11 	;
+{8843.} 	 C5NO3O4OOH = C5NO3CO4O + OH : 	J(41)+J(56) 	;
+{8844.} 	 C5NO3O4OOH = CH3CHO + CH3CHO + CO + NO2 + OH : 	J(57) 	;
+{8845.} 	 C5NO3CO4O = CH3CHO + CH3CHO + NO2 + CO : 	KDEC 	;
+{8846.} 	 C5ONO34OOH + OH = C5CONO34O2 : 	8.92D-12 	;
+{8847.} 	 C5ONO34OOH = C5CONO34O + OH : 	J(41)+J(22) 	;
+{8848.} 	 C5CONO34O = C53NO324CO + HO2 : 	KROSEC*O2 	;
+{8849.} 	 C5CONO34O = CH3CHO + MGLYOX + NO2 : 	4.00D+04 	;
+{8850.} 	 C43NO3CO2H + OH = MEK + NO2 : 	1.25D-12 	;
+{8851.} 	 C43NO3CO3H + OH = C43NO3CO3 : 	4.71D-12 	;
+{8852.} 	 C43NO3CO3H = MEK + NO2 + OH : 	J(41) 	;
+{8853.} 	 C43NO3PAN + OH = MEK + CO + NO2 + NO2 : 	3.81D-13 	;
+{8854.} 	 C43NO3PAN = C43NO3CO3 + NO2 : 	KBPAN 	;
+{8855.} 	 C5CONO3OOH + OH = C4MCONO3O2 : 	4.69D-12 	;
+{8856.} 	 C5CONO3OOH = C4MCONO3O + OH : 	J(41) 	;
+{8857.} 	 C3MNO3CO2H + OH = IPRCHO + NO2 : 	2.25D-12 	;
+{8858.} 	 C3MNO3CO3H + OH = C3MNO3CO3 : 	5.71D-12 	;
+{8859.} 	 C3MNO3CO3H = IPRCHO + NO2 + OH : 	J(41)+J(54) 	;
+{8860.} 	 C3MNO3PAN + OH = IPRCHO + CO + NO2 + NO2 : 	7.51D-13 	;
+{8861.} 	 C3MNO3PAN = C3MNO3CO3 + NO2 : 	KBPAN 	;
+{8862.} 	 C3M3OHCO3H + OH = C3M3OH2CO3 : 	1.79D-11 	;
+{8863.} 	 C3M3OHCO3H = IPRCHO + HO2 + OH : 	J(41) 	;
+{8864.} 	 C3M3OH2PAN + OH = IPRCHO + CO + NO2 : 	2.84D-12 	;
+{8865.} 	 C3M3OH2PAN = C3M3OH2CO3 + NO2 : 	KBPAN 	;
+{8866.} 	 C4MCNO3OOH + OH = C4M22CONO3 + OH : 	7.13D-12 	;
+{8867.} 	 C4MCNO3OOH + OH = MC4CONO3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8868.} 	 C4MCNO3OOH = MC4CONO3O + OH : 	J(41) 	;
+{8869.} 	 MC4CONO3O = BIACET + HCHO + NO2 : 	4.00D+04 	;
+{8870.} 	 MC4CONO3O = C4M22CONO3 + HO2 : 	KROPRIM*O2 	;
+{8871.} 	 C65NO3CO2H + OH = C4H9CHO + NO2 : 	3.95D-12 	;
+{8872.} 	 C65NO3CO3H + OH = C65NO36CO3 : 	7.41D-12 	;
+{8873.} 	 C65NO3CO3H = C4H9CHO + NO2 + OH : 	J(41) 	;
+{8874.} 	 C65NO3PAN + OH = C4H9CHO + CO + NO2 + NO2 : 	2.99D-12 	;
+{8875.} 	 C65NO3PAN = C65NO36CO3 + NO2 : 	KBPAN 	;
+{8876.} 	 C6NO3COOOH + OH = MNO3COC4O2 : 	8.27D-11 	;
+{8877.} 	 C6NO3COOOH = MNO3COC4O + OH : 	J(41)+J(56)+J(57) 	;
+{8878.} 	 MNO3COC4O = C43OHCOCHO + NO2 : 	8.40D+10*EXP(-3523/TEMP) 	;
+{8879.} 	 C6NO324CO + OH = CO3C4CO3 + HCHO + NO2 : 	1.78D-12 	;
+{8880.} 	 C6NO324CO = C3NO3COO2 + C2H5CO3 : 	J(22) 	;
+{8881.} 	 C6NO324CO = CO3C4CO3 + HCHO + NO2 : 	J(56)+J(57) 	;
+{8882.} 	 C6NO3CO4OH + OH = C6NO324CO + HO2 : 	3.36D-11 	;
+{8883.} 	 C6NO3CO4OH = CO2HOC61O + NO2 : 	J(56) 	;
+{8884.} 	 C6NO3CO4OH = HO3C4CO3 + HCHO + NO2 : 	J(57) 	;
+{8885.} 	 C4COMOHOOH + OH = HO1CO24C6 + OH : 	8.65D-11 	;
+{8886.} 	 C4COMOHOOH = C4COMOH3O + OH : 	J(41)+J(22) 	;
+{8887.} 	 C4COMOH3O = C43OHCOCHO + HO2 : 	8.40D+10*EXP(-3523/TEMP) 	;
+{8888.} 	 C4COMOH3OH + OH = HO1CO24C6 + HO2 : 	3.75D-11 	;
+{8889.} 	 C4COMOH3OH = HO3C4O2 + HOCH2CO3 : 	J(22) 	;
+{8890.} 	 HO1CO24C6 = HOCH2CO3 + MEKCO2 : 	J(22)*2 	;
+{8891.} 	 OH + HO1CO24C6 = CO35C5CHO + HO2 : 	4.35D-12 	;
+{8892.} 	 HO5C5CO3H = C4H9CHO + HO2 + OH : 	J(41) 	;
+{8893.} 	 OH + HO5C5CO3H = HO5C5CO3 : 	1.72D-11 	;
+{8894.} 	 C6PAN23 = HO5C5CO3 + NO2 : 	KBPAN 	;
+{8895.} 	 OH + C6PAN23 = C4H9CHO + CO + NO2 : 	6.79D-12 	;
+{8896.} 	 C6CONO3OOH + OH = C62NO335CO + OH : 	6.84D-11 	;
+{8897.} 	 C6CONO3OOH = C6NO3CO5O + OH : 	J(41)+J(56)+J(57) 	;
+{8898.} 	 C6NO3CO5O = C6CO23HO5 + NO2 : 	4.20D+10*EXP(-1962/TEMP) 	;
+{8899.} 	 C62NO335CO + OH = CO235C6 + NO2 : 	8.05D-13 	;
+{8900.} 	 C62NO335CO = CH3CHO + CO2C3CO3 + NO2 : 	J(56)+J(57)+J(22) 	;
+{8901.} 	 C6NO3CO5OH + OH = C62NO335CO + HO2 : 	2.78D-11 	;
+{8902.} 	 C6NO3CO5OH = C6CO3OH5O + NO2 : 	J(56) 	;
+{8903.} 	 C6NO3CO5OH = HO2C3CO3 + CH3CHO + NO2 : 	J(57) 	;
+{8904.} 	 CONO3C6OOH + OH = C64NO335CO + OH : 	1.91D-11 	;
+{8905.} 	 CONO3C6OOH + OH = C6CONO34O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8906.} 	 CONO3C6OOH = C6CONO34O + OH : 	J(41)+J(56)+J(57) 	;
+{8907.} 	 C6CONO34O = C2H5CHO + MGLYOX + NO2 : 	4.00D+04 	;
+{8908.} 	 C6CONO34O = C64NO335CO + HO2 : 	KROSEC*O2 	;
+{8909.} 	 C64NO335CO + OH = CO234C6 + NO2 : 	1.38D-12 	;
+{8910.} 	 C64NO335CO = C2H5CO3 + MGLYOX + NO2 : 	J(56)+J(57) 	;
+{8911.} 	 C64NO335CO = EGLYOX + CH3CO3 + NO2 : 	J(57) 	;
+{8912.} 	 C6CONO34OH + OH = C64NO335CO + HO2 : 	8.98D-12 	;
+{8913.} 	 C6CONO34OH = HO3C3CHO + CH3CO3 + NO2 : 	J(22) 	;
+{8914.} 	 NBZFUO2 + HO2 = NBZFUOOH : 	KRO2HO2*0.625 	;
+{8915.} 	 NBZFUO2 + NO = NBZFUO + NO2 : 	KRO2NO 	;
+{8916.} 	 NBZFUO2 + NO3 = NBZFUO + NO2 : 	KRO2NO3 	;
+{8917.} 	 NBZFUO2 = NBZFUO : 	8.80D-13*RO2 	;
+{8918.} 	 BZFUONOOA = BZFUONOO : 	KDEC*0.5 	;
+{8919.} 	 BZFUONOOA = CO + HCOCH2O2 + OH : 	KDEC*0.5 	;
+{8920.} 	 BZFUO2 + HO2 = BZFUOOH : 	KRO2HO2*0.706 	;
+{8921.} 	 BZFUO2 + NO = BZFUO + NO2 : 	KRO2NO 	;
+{8922.} 	 BZFUO2 + NO3 = BZFUO + NO2 : 	KRO2NO3 	;
+{8923.} 	 BZFUO2 = BZFUCO : 	8.80D-13*RO2*0.2 	;
+{8924.} 	 BZFUO2 = BZFUO : 	8.80D-13*RO2*0.6 	;
+{8925.} 	 BZFUO2 = BZFUOH : 	8.80D-13*RO2*0.2 	;
+{8926.} 	 MALDALCO2H + OH = MALDIALCO2 : 	3.70D-11 	;
+{8927.} 	 MALDALCO2H = HCOCO2H + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{8928.} 	 MALDALCO3H + OH = MALDIALCO3 : 	4.00D-11 	;
+{8929.} 	 MALDALCO3H = HCOCO3H + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{8930.} 	 MALDALCO3H = MALDIALCO2 + OH : 	J(41) 	;
+{8931.} 	 MALDIALCO2 = GLYOX + HO2 + CO : 	KDEC*0.40 	;
+{8932.} 	 MALDIALCO2 = MALANHY + HO2 : 	KDEC*0.60 	;
+{8933.} 	 MALDIALPAN + OH = GLYOX + CO + CO + NO2 : 	3.70D-11 	;
+{8934.} 	 MALDIALPAN = MALDIALCO3 + NO2 : 	KBPAN 	;
+{8935.} 	 EPXDLCO2H + OH = C3DIALO2 : 	2.31D-11 	;
+{8936.} 	 EPXDLCO2H = C3DIALO2 + HO2 : 	J(17) 	;
+{8937.} 	 EPXDLCO3H + OH = EPXDLCO3 : 	2.62D-11 	;
+{8938.} 	 EPXDLCO3H = C3DIALO2 + OH : 	J(41)+J(17) 	;
+{8939.} 	 EPXDLPAN + OH = C33CO + CO + NO2 : 	2.29D-11 	;
+{8940.} 	 EPXDLPAN = EPXDLCO3 + NO2 : 	KBPAN 	;
+{8941.} 	 C3DIALOOH + OH = C33CO + OH : 	1.44D-10 	;
+{8942.} 	 C3DIALOOH = C3DIALO + OH : 	J(41) 	;
+{8943.} 	 C3DIALOOH = GLYOX + CO + HO2 + OH : 	J(15)*2 	;
+{8944.} 	 C3DIALO = GLYOX + CO + HO2 : 	KDEC 	;
+{8945.} 	 C33CO + OH = CO + CO + CO + HO2 : 	5.77D-11 	;
+{8946.} 	 C33CO = CO + HO2 + CO + CO + HO2 : 	J(15)*2 	;
+{8947.} 	 MALDIALOOH + OH = HOCOC4DIAL + OH : 	1.22D-10 	;
+{8948.} 	 MALDIALOOH + OH = MALDIALO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{8949.} 	 MALDIALOOH = C32OH13CO + CO + OH + HO2 : 	J(15)*2 	;
+{8950.} 	 MALDIALOOH = MALDIALO + OH : 	J(41) 	;
+{8951.} 	 MALDIALO = GLYOX + GLYOX + HO2 : 	KDEC 	;
+{8952.} 	 HOCOC4DIAL + OH = CO2C4DIAL + HO2 : 	3.67D-11 	;
+{8953.} 	 HOCOC4DIAL = HCOCOHCO3 + HO2 + CO : 	J(34)+J(15) 	;
+{8954.} 	 HOHOC4DIAL + OH = HOCOC4DIAL + HO2 : 	8.13D-11 	;
+{8955.} 	 HOHOC4DIAL = C32OH13CO + HO2 + HO2 + CO : 	J(15)*2 	;
+{8956.} 	 NPHEN1O + NO2 = DNPHEN : 	2.08D-12 	;
+{8957.} 	 NPHEN1O + O3 = NPHEN1O2 : 	2.86D-13 	;
+{8958.} 	 NCATECHOL + NO3 = NNCATECO2 : 	2.60D-12 	;
+{8959.} 	 NCATECHOL + OH = NCATECO2 : 	3.47D-12 	;
+{8960.} 	 CATEC1O2 + HO2 = CATEC1OOH : 	KRO2HO2*0.770 	;
+{8961.} 	 CATEC1O2 + NO = CATEC1O + NO2 : 	KRO2NO 	;
+{8962.} 	 CATEC1O2 + NO3 = CATEC1O + NO2 : 	KRO2NO3 	;
+{8963.} 	 CATEC1O2 = CATEC1O : 	8.80D-13*RO2 	;
+{8964.} 	 PBZQONE + NO3 = NBZQO2 : 	3.00D-13 	;
+{8965.} 	 PBZQONE + OH = PBZQO2 : 	4.6D-12 	;
+{8966.} 	 C5CO14OH + OH = C5CO14CO2 : 	5.44D-11 	;
+{8967.} 	 C5CO14OH = CH3CO3 + HCOCO2H + HO2 + CO : 	J(23)+J(24) 	;
+{8968.} 	 PTLQONE + NO3 = NPTLQO2 : 	1.00D-12 	;
+{8969.} 	 PTLQONE + OH = PTLQO2 : 	2.3D-11 	;
+{8970.} 	 NCRES1O + NO2 = DNCRES : 	2.08D-12 	;
+{8971.} 	 NCRES1O + O3 = NCRES1O2 : 	2.86D-13 	;
+{8972.} 	 OXYL1OOH + OH = OXYL1O2 : 	4.65D-11 	;
+{8973.} 	 OXYL1OOH = TOL1O + OH : 	J(41) 	;
+{8974.} 	 MNCATECH + NO3 = MNNCATECO2 : 	5.03D-12 	;
+{8975.} 	 MNCATECH + OH = MNCATECO2 : 	6.83D-12 	;
+{8976.} 	 MCATEC1O2 + HO2 = MCATEC1OOH : 	KRO2HO2*0.820 	;
+{8977.} 	 MCATEC1O2 + NO = MCATEC1O + NO2 : 	KRO2NO 	;
+{8978.} 	 MCATEC1O2 + NO3 = MCATEC1O + NO2 : 	KRO2NO3 	;
+{8979.} 	 MCATEC1O2 = MCATEC1O : 	8.80D-13*RO2 	;
+{8980.} 	 MC3ODBCO2H + OH = MC3CODBCO2 : 	4.38D-11 	;
+{8981.} 	 MC3ODBCO2H = CH3COCO2H + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{8982.} 	 MC3CODBCO3 + HO2 = MC3CODBCO2 + OH : 	KAPHO2*0.44 	;
+{8983.} 	 MC3CODBCO3 + HO2 = MC3ODBCO2H + O3 : 	KAPHO2*0.15 	;
+{8984.} 	 MC3CODBCO3 + HO2 = MC3ODBCO3H : 	KAPHO2*0.41 	;
+{8985.} 	 MC3CODBCO3 + NO = MC3CODBCO2 + NO2 : 	KAPNO 	;
+{8986.} 	 MC3CODBCO3 + NO2 = MC3CODBPAN : 	KFPAN 	;
+{8987.} 	 MC3CODBCO3 + NO3 = MC3CODBCO2 + NO2 : 	KRO2NO3*1.74 	;
+{8988.} 	 MC3CODBCO3 = MC3CODBCO2 : 	1.00D-11*0.70*RO2 	;
+{8989.} 	 MC3CODBCO3 = MC3ODBCO2H : 	1.00D-11*0.30*RO2 	;
+{8990.} 	 C4M2ALOHO2 + HO2 = C4MALOHOOH : 	KRO2HO2*0.706 	;
+{8991.} 	 C4M2ALOHO2 + NO = C4M2ALOHO + NO2 : 	KRO2NO 	;
+{8992.} 	 C4M2ALOHO2 + NO3 = C4M2ALOHO + NO2 : 	KRO2NO3 	;
+{8993.} 	 C4M2ALOHO2 = C4M2AL2OH : 	9.20D-14*RO2*0.30 	;
+{8994.} 	 C4M2ALOHO2 = C4M2ALOHO : 	9.20D-14*RO2*0.70 	;
+{8995.} 	 C5DICARBO2 + HO2 = C5DICAROOH : 	KRO2HO2*0.706 	;
+{8996.} 	 C5DICARBO2 + NO = C5DICARBO + NO2 : 	KRO2NO 	;
+{8997.} 	 C5DICARBO2 + NO3 = C5DICARBO + NO2 : 	KRO2NO3 	;
+{8998.} 	 C5DICARBO2 = C5134CO2OH : 	1.40D-12*0.20*RO2 	;
+{8999.} 	 C5DICARBO2 = C514CO23OH : 	1.40D-12*0.20*RO2 	;
+{9000.} 	 C5DICARBO2 = C5DICARBO : 	1.40D-12*0.60*RO2 	;
+{9001.} 	 NTLFUO2 + HO2 = NTLFUOOH : 	KRO2HO2*0.706 	;
+{9002.} 	 NTLFUO2 + NO = NTLFUO + NO2 : 	KRO2NO 	;
+{9003.} 	 NTLFUO2 + NO3 = NTLFUO + NO2 : 	KRO2NO3 	;
+{9004.} 	 NTLFUO2 = NTLFUO : 	9.20D-14*RO2 	;
+{9005.} 	 TLFUONOOA = CO + OH + MECOACETO2 : 	KDEC*0.5 	;
+{9006.} 	 TLFUONOOA = TLFUONOO : 	KDEC*0.5 	;
+{9007.} 	 TLFUO2 + HO2 = TLFUOOH : 	KRO2HO2*0.706 	;
+{9008.} 	 TLFUO2 + NO = TLFUO + NO2 : 	KRO2NO 	;
+{9009.} 	 TLFUO2 + NO3 = TLFUO + NO2 : 	KRO2NO3 	;
+{9010.} 	 TLFUO2 = TLFUO : 	9.20D-14*RO2*0.7 	;
+{9011.} 	 TLFUO2 = TLFUOH : 	9.20D-14*RO2*0.3 	;
+{9012.} 	 C5CO14CO2 = MALANHY + CH3O2 : 	KDEC*0.83 	;
+{9013.} 	 C5CO14CO2 = MGLYOX + HO2 + CO : 	KDEC*0.17 	;
+{9014.} 	 C5CO14OOH + OH = C5CO14O2 : 	3.59D-12 	;
+{9015.} 	 C5CO14OOH = C5CO14CO2 + OH : 	J(41) 	;
+{9016.} 	 C5COO2NO2 + OH = MGLYOX + CO + CO + NO2 : 	5.43D-11 	;
+{9017.} 	 C5COO2NO2 = C5CO14O2 + NO2 : 	KBPAN 	;
+{9018.} 	 CH3COCO2H = CH3CO3 + HO2 : 	J(34) 	;
+{9019.} 	 OH + CH3COCO2H = CH3CO3 : 	8.0D-13 	;
+{9020.} 	 OXYLCO2H + OH = OXYL1O2 : 	1.10D-12 	;
+{9021.} 	 OXYLCO3H + OH = OXYLCO3 : 	4.66D-12 	;
+{9022.} 	 OXYLCO3H = OXYL1O2 + OH : 	J(41) 	;
+{9023.} 	 OXYLPAN + OH = OXYL1OOH + CO + NO2 : 	1.06D-12 	;
+{9024.} 	 OXYLPAN = OXYLCO3 + NO2 : 	KBPAN*0.67 	;
+{9025.} 	 MC4CODBCO3 + HO2 = C5DBCOCO2H + O3 : 	KAPHO2*0.15 	;
+{9026.} 	 MC4CODBCO3 + HO2 = C5DBCOCO3H : 	KAPHO2*0.41 	;
+{9027.} 	 MC4CODBCO3 + HO2 = MC4CODBCO2 + OH : 	KAPHO2*0.44 	;
+{9028.} 	 MC4CODBCO3 + NO = MC4CODBCO2 + NO2 : 	KAPNO 	;
+{9029.} 	 MC4CODBCO3 + NO2 = MC4CODBPAN : 	KFPAN 	;
+{9030.} 	 MC4CODBCO3 + NO3 = MC4CODBCO2 + NO2 : 	KRO2NO3*1.74 	;
+{9031.} 	 MC4CODBCO3 = C5DBCOCO2H : 	1.00D-11*0.30*RO2 	;
+{9032.} 	 MC4CODBCO3 = MC4CODBCO2 : 	1.00D-11*0.70*RO2 	;
+{9033.} 	 MEK2OOA = BIACETO2 + OH : 	KDEC*0.27 	;
+{9034.} 	 MEK2OOA = CH3CO3 + CH3O2 : 	KDEC*0.255 	;
+{9035.} 	 MEK2OOA = CH3COCH3 : 	KDEC*0.255 	;
+{9036.} 	 MEK2OOA = MEK2OO : 	KDEC*0.22 	;
+{9037.} 	 MC5CO2OHO2 + HO2 = MC5COOHOOH : 	KRO2HO2*0.770 	;
+{9038.} 	 MC5CO2OHO2 + NO = MC5CO2OHO + NO2 : 	KRO2NO 	;
+{9039.} 	 MC5CO2OHO2 + NO3 = MC5CO2OHO + NO2 : 	KRO2NO3 	;
+{9040.} 	 MC5CO2OHO2 = MC52CO2OH : 	9.20D-14*0.3*RO2 	;
+{9041.} 	 MC5CO2OHO2 = MC5CO2OHO : 	9.20D-14*0.7*RO2 	;
+{9042.} 	 NOXYFUO2 + HO2 = NOXYFUOOH : 	KRO2HO2*0.770 	;
+{9043.} 	 NOXYFUO2 + NO = NOXYFUO + NO2 : 	KRO2NO 	;
+{9044.} 	 NOXYFUO2 + NO3 = NOXYFUO + NO2 : 	KRO2NO3 	;
+{9045.} 	 NOXYFUO2 = NOXYFUO : 	9.20D-14*RO2 	;
+{9046.} 	 C6OTKETO2 + HO2 = C6OTKETOOH : 	KRO2HO2*0.770 	;
+{9047.} 	 C6OTKETO2 + NO = C6OTKETO + NO2 : 	KRO2NO 	;
+{9048.} 	 C6OTKETO2 + NO3 = C6OTKETO + NO2 : 	KRO2NO3*1.74 	;
+{9049.} 	 C6OTKETO2 = C6OTKETCO : 	8.80D-13*RO2*0.2 	;
+{9050.} 	 C6OTKETO2 = C6OTKETO : 	8.80D-13*RO2*0.6 	;
+{9051.} 	 C6OTKETO2 = C6OTKETOH : 	8.80D-13*RO2*0.2 	;
+{9052.} 	 OXYFUO2 + HO2 = OXYFUOOH : 	KRO2HO2*0.770 	;
+{9053.} 	 OXYFUO2 + NO = OXYFUO + NO2 : 	KRO2NO 	;
+{9054.} 	 OXYFUO2 + NO3 = OXYFUO + NO2 : 	KRO2NO3 	;
+{9055.} 	 OXYFUO2 = OXYFUO : 	9.20D-14*RO2*0.70 	;
+{9056.} 	 OXYFUO2 = OXYFUOH : 	9.20D-14*RO2*0.30 	;
+{9057.} 	 EPXM2DCO2H + OH = C4MCO2O2 : 	2.22D-11 	;
+{9058.} 	 EPXM2DCO2H = C4MCO2O2 + HO2 : 	J(17) 	;
+{9059.} 	 EPXM2DCO3H + OH = EPXM2DLCO3 : 	2.53D-11 	;
+{9060.} 	 EPXM2DCO3H = C4MCO2O2 + OH : 	J(41)+J(17) 	;
+{9061.} 	 EPXM2DLPAN + OH = EPXM2DLCO3 + NO2 : 	2.21D-11 	;
+{9062.} 	 EPXM2DLPAN = EPXM2DLCO3 + NO2 : 	KBPAN 	;
+{9063.} 	 C4MCO2OOH + OH = C4MCO2O2 : 	6.97D-11 	;
+{9064.} 	 C4MCO2OOH = BIACET + OH + HO2 + CO : 	J(17) 	;
+{9065.} 	 C4MCO2OOH = C4MCO2O + OH : 	J(41) 	;
+{9066.} 	 C4MCO2OOH = CH3CO3 + MGLYOX + OH : 	J(22) 	;
+{9067.} 	 C4MCO2O = BIACET + HO2 + CO : 	KDEC*0.5 	;
+{9068.} 	 C4MCO2O = MGLYOX + CH3CO3 : 	KDEC*0.5 	;
+{9069.} 	 C4MCO2OH + OH = C4MCO2O : 	6.63D-11 	;
+{9070.} 	 C4MCO2OH = BIACET + HO2 + HO2 + CO : 	J(17) 	;
+{9071.} 	 C4MCO2OH = MGLYOX + HO2 + CH3CO3 : 	J(22) 	;
+{9072.} 	 C5DBCOCO2H + OH = MC4CODBCO2 : 	5.08D-11 	;
+{9073.} 	 C5DBCOCO2H = HCOCO2H + CH3CO3 + CH3CO3 : 	J(24) 	;
+{9074.} 	 NOXYOL1O + NO2 = DNOXYOL : 	2.08D-12 	;
+{9075.} 	 NOXYOL1O + O3 = NOXYOL1O2 : 	2.86D-13 	;
+{9076.} 	 DM123OOH + OH = DM123O2 : 	4.65D-11 	;
+{9077.} 	 DM123OOH = OXY1O + OH : 	J(41) 	;
+{9078.} 	 OXYQONE + NO3 = NOXYQO2 : 	1.00D-12 	;
+{9079.} 	 OXYQONE + OH = OXYQO2 : 	2.35D-10 	;
+{9080.} 	 OXNCATECH + NO3 = OXNNCATCO2 : 	5.03D-12 	;
+{9081.} 	 OXNCATECH + OH = OXNCATECO2 : 	6.83D-12 	;
+{9082.} 	 OXCATEC1O2 + HO2 = OCATEC1OOH : 	KRO2HO2*0.859 	;
+{9083.} 	 OXCATEC1O2 + NO = OXCATEC1O + NO2 : 	KRO2NO 	;
+{9084.} 	 OXCATEC1O2 + NO3 = OXCATEC1O + NO2 : 	KRO2NO3 	;
+{9085.} 	 OXCATEC1O2 = OXCATEC1O : 	8.80D-13*RO2 	;
+{9086.} 	 MXYLCO2H + OH = MXYL1O2 : 	1.10D-12 	;
+{9087.} 	 MXYLCO3H + OH = MXYLCO3 : 	4.66D-12 	;
+{9088.} 	 MXYLCO3H = MXYL1O2 + OH : 	J(41) 	;
+{9089.} 	 MXYLPAN + OH = MXYL1OOH + CO + NO2 : 	1.06D-12 	;
+{9090.} 	 MXYLPAN = MXYLCO3 + NO2 : 	KBPAN*0.67 	;
+{9091.} 	 MXYL1OOH + OH = MXYL1O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9092.} 	 MXYL1OOH = MXYL1O + OH : 	J(41) 	;
+{9093.} 	 MXYL1O + NO2 = TOL1OHNO2 : 	3.90D-13 	;
+{9094.} 	 C5MCO2OHO2 + HO2 = C6CO2OHOOH : 	KRO2HO2*0.770 	;
+{9095.} 	 C5MCO2OHO2 + NO = NO2 + C5MCO2OHO : 	KRO2NO 	;
+{9096.} 	 C5MCO2OHO2 + NO3 = NO2 + C5MCO2OHO : 	KRO2NO3 	;
+{9097.} 	 C5MCO2OHO2 = C5MCO2OHO : 	9.20D-14*0.70*RO2 	;
+{9098.} 	 C5MCO2OHO2 = C6CO2M2OH : 	9.20D-14*0.30*RO2 	;
+{9099.} 	 NMXYFUO2 + HO2 = NMXYFUOOH : 	KRO2HO2*0.770 	;
+{9100.} 	 NMXYFUO2 + NO = NMXYFUO + NO2 : 	KRO2NO 	;
+{9101.} 	 NMXYFUO2 + NO3 = NMXYFUO + NO2 : 	KRO2NO3 	;
+{9102.} 	 NMXYFUO2 = NMXYFUO : 	9.20D-14*RO2 	;
+{9103.} 	 C23O3MO2 + HO2 = C23O3MCOOH : 	KRO2HO2*0.706 	;
+{9104.} 	 C23O3MO2 + NO = C23O3MO + NO2 : 	KRO2NO 	;
+{9105.} 	 C23O3MO2 + NO3 = C23O3MO + NO2 : 	KRO2NO3 	;
+{9106.} 	 C23O3MO2 = ACECOCOCH3 : 	8.80D-13*RO2*0.2 	;
+{9107.} 	 C23O3MO2 = C23O3MO : 	8.80D-13*RO2*0.6 	;
+{9108.} 	 C23O3MO2 = C23O3MOH : 	8.80D-13*RO2*0.2 	;
+{9109.} 	 MXYFUO2 + HO2 = MXYFUOOH : 	KRO2HO2*0.770 	;
+{9110.} 	 MXYFUO2 + NO = MXYFUO + NO2 : 	KRO2NO 	;
+{9111.} 	 MXYFUO2 + NO3 = MXYFUO + NO2 : 	KRO2NO3 	;
+{9112.} 	 MXYFUO2 = MXYFUO : 	9.20D-14*RO2*0.70 	;
+{9113.} 	 MXYFUO2 = MXYFUOH : 	9.20D-14*RO2*0.30 	;
+{9114.} 	 NPXYFUO2 + HO2 = NPXYFUOOH : 	KRO2HO2*0.706 	;
+{9115.} 	 NPXYFUO2 + NO = NPXYFUO + NO2 : 	KRO2NO 	;
+{9116.} 	 NPXYFUO2 + NO3 = NPXYFUO + NO2 : 	KRO2NO3 	;
+{9117.} 	 NPXYFUO2 = NPXYFUO : 	9.20D-14*RO2 	;
+{9118.} 	 MCOCOMOXO2 + HO2 = MCOCOMOOOH : 	KRO2HO2*0.625 	;
+{9119.} 	 MCOCOMOXO2 + NO = MCOCOMOXO + NO2 : 	KRO2NO 	;
+{9120.} 	 MCOCOMOXO2 + NO3 = MCOCOMOXO + NO2 : 	KRO2NO3 	;
+{9121.} 	 MCOCOMOXO2 = MCOCOMOXO : 	2.00D-12*RO2 	;
+{9122.} 	 PXYFUO2 + HO2 = PXYFUOOH : 	KRO2HO2*0.706 	;
+{9123.} 	 PXYFUO2 + NO = PXYFUO + NO2 : 	KRO2NO 	;
+{9124.} 	 PXYFUO2 + NO3 = PXYFUO + NO2 : 	KRO2NO3 	;
+{9125.} 	 PXYFUO2 = PXYFUO : 	9.20D-14*RO2*0.70 	;
+{9126.} 	 PXYFUO2 = PXYFUOH : 	9.20D-14*RO2*0.30 	;
+{9127.} 	 C3MCODBCO2 = MGLYOX + HO2 + CO : 	KDEC*0.35 	;
+{9128.} 	 C3MCODBCO2 = MMALANHY + HO2 : 	KDEC*0.65 	;
+{9129.} 	 C4CODBCO3H + OH = C3MCODBCO3 : 	4.73D-11 	;
+{9130.} 	 C4CODBCO3H = C3MCODBCO2 + OH : 	J(41) 	;
+{9131.} 	 C4CODBCO3H = HCOCO3H + HO2 + CO + CH3CO3 : 	J(18)+J(19) 	;
+{9132.} 	 C3MCODBPAN + OH = MGLYOX + CO + CO + NO2 : 	4.37D-11 	;
+{9133.} 	 C3MCODBPAN = C3MCODBCO3 + NO2 : 	KBPAN 	;
+{9134.} 	 EPXMDLCO2H + OH = C3MDIALO2 : 	2.27D-11 	;
+{9135.} 	 EPXMDLCO2H = C3MDIALO2 + HO2 : 	J(17) 	;
+{9136.} 	 EPXMDLCO3H + OH = EPXMDLCO3 : 	2.57D-11 	;
+{9137.} 	 EPXMDLCO3H = C3MDIALO2 + OH : 	J(41)+J(17) 	;
+{9138.} 	 EPXMDLPAN + OH = MGLYOX + CO + NO2 : 	2.25D-11 	;
+{9139.} 	 EPXMDLPAN = EPXMDLCO3 + NO2 : 	KBPAN 	;
+{9140.} 	 C3MDIALOOH + OH = C3MDIALO2 : 	1.35D-10 	;
+{9141.} 	 C3MDIALOOH = C3MDIALO + OH : 	J(41) 	;
+{9142.} 	 C3MDIALOOH = MGLYOX + OH + HO2 + CO : 	J(17)*2 	;
+{9143.} 	 C3MDIALO = MGLYOX + CO + HO2 : 	KDEC 	;
+{9144.} 	 NMXYOL1O + NO2 = DNMXYOL : 	2.08D-12 	;
+{9145.} 	 NMXYOL1O + O3 = NMXYOL1O2 : 	2.86D-13 	;
+{9146.} 	 MXY1OOH + OH = MXY1O2 : 	4.65D-11 	;
+{9147.} 	 MXY1OOH = MXY1O + OH : 	J(41) 	;
+{9148.} 	 MXYQONE + NO3 = NMXYQO2 : 	1.00D-12 	;
+{9149.} 	 MXYQONE + OH = MXYQO2 : 	2.35D-11 	;
+{9150.} 	 MXNCATECH + NO3 = MXNNCATCO2 : 	5.03D-12 	;
+{9151.} 	 MXNCATECH + OH = MXNCATECO2 : 	6.83D-12 	;
+{9152.} 	 MXCATEC1O2 + HO2 = MXCTEC1OOH : 	KRO2HO2*0.859 	;
+{9153.} 	 MXCATEC1O2 + NO = MXCATEC1O + NO2 : 	KRO2NO 	;
+{9154.} 	 MXCATEC1O2 + NO3 = MXCATEC1O + NO2 : 	KRO2NO3 	;
+{9155.} 	 MXCATEC1O2 = MXCATEC1O : 	8.80D-13*RO2 	;
+{9156.} 	 C3MCOCO2H + OH = MGLYOX + HO2 + CO : 	4.66D-11 	;
+{9157.} 	 C3MCOCO2H = HCOCO2H + HO2 + CO + CH3O2 + CO : 	J(18)+J(19) 	;
+{9158.} 	 PXYLCO2H + OH = PXYL1O2 : 	1.10D-12 	;
+{9159.} 	 PXYLCO3H + OH = PXYLCO3 : 	4.66D-12 	;
+{9160.} 	 PXYLCO3H = PXYL1O2 + OH : 	J(41) 	;
+{9161.} 	 PXYLPAN + OH = PXYL1OOH + CO + NO2 : 	1.06D-12 	;
+{9162.} 	 PXYLPAN = PXYLCO3 + NO2 : 	KBPAN*0.67 	;
+{9163.} 	 PXYL1OOH + OH = PXYL1O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9164.} 	 PXYL1OOH = PXYL1O + OH : 	J(41) 	;
+{9165.} 	 PXYL1O + NO2 = TOL4OHNO2 : 	3.90D-13 	;
+{9166.} 	 DMKOHO2 + HO2 = DMKOHOOH : 	KRO2HO2*0.770 	;
+{9167.} 	 DMKOHO2 + NO = DMKOHO + NO2 : 	KRO2NO 	;
+{9168.} 	 DMKOHO2 + NO3 = DMKOHO + NO2 : 	KRO2NO3 	;
+{9169.} 	 DMKOHO2 = DMK2OH : 	8.80D-13*0.20*RO2 	;
+{9170.} 	 DMKOHO2 = DMKCOOH : 	8.80D-13*0.20*RO2 	;
+{9171.} 	 DMKOHO2 = DMKOHO : 	8.80D-13*0.60*RO2 	;
+{9172.} 	 NPXYOL1O + NO2 = DNPXYOL : 	2.08D-12 	;
+{9173.} 	 NPXYOL1O + O3 = NPXYOL1O2 : 	2.86D-13 	;
+{9174.} 	 PXY1OOH + OH = PXY1O2 : 	4.65D-11 	;
+{9175.} 	 PXY1OOH = PXY1O + OH : 	J(41) 	;
+{9176.} 	 PXYQONE + NO3 = NPXYQO2 : 	1.00D-12 	;
+{9177.} 	 PXYQONE + OH = PXYQO2 : 	2.35D-11 	;
+{9178.} 	 PXNCATECH + NO3 = PXNNCATCO2 : 	5.03D-12 	;
+{9179.} 	 PXNCATECH + OH = PXNCATECO2 : 	6.83D-12 	;
+{9180.} 	 PXCATEC1O2 + HO2 = PCATEC1OOH : 	KRO2HO2*0.859 	;
+{9181.} 	 PXCATEC1O2 + NO = PXCATEC1O + NO2 : 	KRO2NO 	;
+{9182.} 	 PXCATEC1O2 + NO3 = PXCATEC1O + NO2 : 	KRO2NO3 	;
+{9183.} 	 PXCATEC1O2 = PXCATEC1O : 	8.80D-13*RO2 	;
+{9184.} 	 C6H5C2CO2H + OH = C6H5CH2O2 : 	1.10D-12 	;
+{9185.} 	 C6H5C2CO3H + OH = C6H5CH2CO3 : 	4.66D-12 	;
+{9186.} 	 C6H5C2CO3H = C6H5CH2O2 + OH : 	J(41) 	;
+{9187.} 	 C6H5CH2PAN + OH = BENZAL + CO + NO2 : 	1.06D-12 	;
+{9188.} 	 C6H5CH2PAN = C6H5CH2CO3 + NO2 : 	KBPAN*0.67 	;
+{9189.} 	 NEBNZ1O + NO2 = DNEBNZOL : 	2.08D-12 	;
+{9190.} 	 NEBNZ1O + O3 = NEBNZ1O2 : 	2.86D-13 	;
+{9191.} 	 EBENZOOH + OH = EBENZO2 : 	4.65D-11 	;
+{9192.} 	 EBENZOOH = EBENZO + OH : 	J(41) 	;
+{9193.} 	 C6DCRBBOH + OH = C6DCARBBO : 	3.73D-11 	;
+{9194.} 	 C6DCRBBOH = HCOCO2H + C2H5CO3 + HO2 + CO : 	J(24) 	;
+{9195.} 	 PEBQONE + NO3 = NPEBQO2 : 	1.00D-12 	;
+{9196.} 	 PEBQONE + OH = PEBQO2 : 	2.35D-11 	;
+{9197.} 	 ENCATECH + NO3 = ENNCATECO2 : 	5.03D-12 	;
+{9198.} 	 ENCATECH + OH = ENCATECO2 : 	6.83D-12 	;
+{9199.} 	 ECATEC1O2 + HO2 = ECATEC1OOH : 	KRO2HO2*0.859 	;
+{9200.} 	 ECATEC1O2 + NO = ECATEC1O + NO2 : 	KRO2NO 	;
+{9201.} 	 ECATEC1O2 + NO3 = ECATEC1O + NO2 : 	KRO2NO3 	;
+{9202.} 	 ECATEC1O2 = ECATEC1O : 	8.80D-13*RO2 	;
+{9203.} 	 RGDCO2H + OH = C2H5CO3 + GLYOX : 	4.89D-11 	;
+{9204.} 	 RGDCO2H = HO2 + CO + ECOCO2H + HO2 + CO : 	J(24) 	;
+{9205.} 	 C6DICARBO2 + HO2 = C6DICAROOH : 	KRO2HO2*0.770 	;
+{9206.} 	 C6DICARBO2 + NO = C6DICARBO + NO2 : 	KRO2NO 	;
+{9207.} 	 C6DICARBO2 + NO3 = C6DICARBO + NO2 : 	KRO2NO3 	;
+{9208.} 	 C6DICARBO2 = C6134CO2OH : 	8.80D-13*0.20*RO2 	;
+{9209.} 	 C6DICARBO2 = C614CO23OH : 	8.80D-13*0.20*RO2 	;
+{9210.} 	 C6DICARBO2 = C6DICARBO : 	8.80D-13*0.60*RO2 	;
+{9211.} 	 NEBFUO2 + HO2 = NEBFUOOH : 	KRO2HO2*0.770 	;
+{9212.} 	 NEBFUO2 + NO = NEBFUO + NO2 : 	KRO2NO 	;
+{9213.} 	 NEBFUO2 + NO3 = NEBFUO + NO2 : 	KRO2NO3 	;
+{9214.} 	 NEBFUO2 = NEBFUO : 	8.80D-13*RO2 	;
+{9215.} 	 BUTALAO2 + HO2 = BUTALAOOH : 	KRO2HO2*0.625 	;
+{9216.} 	 BUTALAO2 + NO = BUTAL2O + NO2 : 	KRO2NO 	;
+{9217.} 	 BUTALAO2 + NO3 = BUTAL2O + NO2 : 	KRO2NO3 	;
+{9218.} 	 BUTALAO2 = BUTAL2O : 	8.80D-13*0.6*RO2 	;
+{9219.} 	 BUTALAO2 = EGLYOX : 	8.80D-13*0.2*RO2 	;
+{9220.} 	 BUTALAO2 = HO3C3CHO : 	8.80D-13*0.2*RO2 	;
+{9221.} 	 EBFUO2 + HO2 = EBFUOOH : 	KRO2HO2*0.770 	;
+{9222.} 	 EBFUO2 + NO = EBFUO + NO2 : 	KRO2NO 	;
+{9223.} 	 EBFUO2 + NO3 = EBFUO + NO2 : 	KRO2NO3 	;
+{9224.} 	 EBFUO2 = EBFUCO : 	8.80D-13*RO2*0.20 	;
+{9225.} 	 EBFUO2 = EBFUO : 	8.80D-13*RO2*0.60 	;
+{9226.} 	 EBFUO2 = EBFUOH : 	8.80D-13*RO2*0.20 	;
+{9227.} 	 C6DCARBBO = EGLYOX + CO + HO2 : 	KDEC*0.35 	;
+{9228.} 	 C6DCARBBO = MALANHY + C2H5O2 : 	KDEC*0.65 	;
+{9229.} 	 C6DCRBBOOH + OH = C6DCARBBO2 : 	4.09D-11 	;
+{9230.} 	 C6DCRBBOOH = C6DCARBBO + OH : 	J(41) 	;
+{9231.} 	 C6DCRBBOOH = HCOCO3H + HO2 + CO + C2H5CO3 : 	J(24) 	;
+{9232.} 	 C6DCARBPAN + OH = EGLYOX + CO + CO + NO2 : 	3.73D-11 	;
+{9233.} 	 C6DCARBPAN = C6DCARBBO2 + NO2 : 	KBPAN 	;
+{9234.} 	 ECOCO2H + OH = C2H5CO3 : 	2.53D-12 	;
+{9235.} 	 ECOCO2H = C2H5CO3 + HO2 : 	J(34) 	;
+{9236.} 	 CO3H4CHO + OH = CO3H4CO3 : 	7.09D-11 	;
+{9237.} 	 CO3H4CHO = C2H5CO3 + GLYOX + HO2 : 	J(22) 	;
+{9238.} 	 CO3H4CHO = EGLYOX + HO2 + HO2 + CO : 	J(17) 	;
+{9239.} 	 C7CO3OHO2 + HO2 = C7CO3OHOOH : 	KRO2HO2*0.820 	;
+{9240.} 	 C7CO3OHO2 + NO = C7CO3OHO + NO2 : 	KRO2NO 	;
+{9241.} 	 C7CO3OHO2 + NO3 = C7CO3OHO + NO2 : 	KRO2NO3 	;
+{9242.} 	 C7CO3OHO2 = C7CO3OHO : 	8.80D-13*RO2 	;
+{9243.} 	 PHCOETOOH + OH = PHCOCOME + OH : 	5.15D-11 	;
+{9244.} 	 PHCOETOOH = PHCOETO + OH : 	J(41) 	;
+{9245.} 	 PHCOETO = C6H5CO3 + CH3CHO : 	KDEC 	;
+{9246.} 	 PHCOCOME + OH = PHCOCOCO2 : 	6.00D-12 	;
+{9247.} 	 PHCOCOME = C6H5CO3 + CH3CO3 : 	J(35) 	;
+{9248.} 	 PHCOETOH + OH = PHCOCOME + HO2 : 	1.29D-11 	;
+{9249.} 	 C7DCCO2H + OH = C7DCCO2 : 	3.62D-11 	;
+{9250.} 	 C7DCCO2H = PGLYOX + CO + HO2 + HO2 : 	J(15)+J(22) 	;
+{9251.} 	 NPBNZ1O + NO2 = DNPBNZOL : 	2.08D-12 	;
+{9252.} 	 NPBNZ1O + O3 = NPBNZ1O2 : 	2.86D-13 	;
+{9253.} 	 PBENZOOH + OH = PBENZO2 : 	4.65D-11 	;
+{9254.} 	 PBENZOOH = PBENZO + OH : 	J(41) 	;
+{9255.} 	 PPRBQONE + NO3 = NPPRBQO2 : 	1.00D-12 	;
+{9256.} 	 PPRBQONE + OH = PPRBQO2 : 	2.35D-11 	;
+{9257.} 	 PNCATECH + NO3 = PNNCATECO2 : 	5.03D-12 	;
+{9258.} 	 PNCATECH + OH = PNCATECO2 : 	6.83D-12 	;
+{9259.} 	 PCATEC1O2 + HO2 = PRCATC1OOH : 	KRO2HO2*0.90 	;
+{9260.} 	 PCATEC1O2 + NO = PCATEC1O + NO2 : 	KRO2NO 	;
+{9261.} 	 PCATEC1O2 + NO3 = PCATEC1O + NO2 : 	KRO2NO3 	;
+{9262.} 	 PCATEC1O2 = PCATEC1O : 	8.80D-13*RO2 	;
+{9263.} 	 PC3ODBCO2H + OH = GLYOX + C3H7CO3 : 	5.00D-11 	;
+{9264.} 	 PC3ODBCO2H = PGLYOXOH + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{9265.} 	 PGLOOB = C3H7CHO : 	KDEC*0.125 	;
+{9266.} 	 PGLOOB = C3H7CO3 + CO + OH : 	KDEC*0.57 	;
+{9267.} 	 PGLOOB = C3H7CO3 + HO2 : 	KDEC*0.125 	;
+{9268.} 	 PGLOOB = PGLOO : 	KDEC*0.18 	;
+{9269.} 	 C7DCO2 + HO2 = C7DCOOH : 	KRO2HO2*0.820 	;
+{9270.} 	 C7DCO2 + NO = C7DCO + NO2 : 	KRO2NO 	;
+{9271.} 	 C7DCO2 + NO3 = C7DCO + NO2 : 	KRO2NO3 	;
+{9272.} 	 C7DCO2 = C61CHO : 	8.80D-13*RO2*0.2 	;
+{9273.} 	 C7DCO2 = C7DCO : 	8.80D-13*RO2*0.6 	;
+{9274.} 	 C7DCO2 = C7DCOH : 	8.80D-13*RO2*0.2 	;
+{9275.} 	 NPBFUO2 + HO2 = NPBFUOOH : 	KRO2HO2*0.820 	;
+{9276.} 	 NPBFUO2 + NO = NPBFUO + NO2 : 	KRO2NO 	;
+{9277.} 	 NPBFUO2 + NO3 = NPBFUO + NO2 : 	KRO2NO3 	;
+{9278.} 	 NPBFUO2 = NPBFUO : 	8.80D-13*RO2 	;
+{9279.} 	 C4CHOAO2 + HO2 = C4CHOAOOH : 	KRO2HO2*0.706 	;
+{9280.} 	 C4CHOAO2 + NO = C4CHO2O + NO2 : 	KRO2NO 	;
+{9281.} 	 C4CHOAO2 + NO3 = C4CHO2O + NO2 : 	KRO2NO3 	;
+{9282.} 	 C4CHOAO2 = C4CHO2O : 	8.80D-13*0.6*RO2 	;
+{9283.} 	 C4CHOAO2 = C4OHCHO : 	8.80D-13*0.2*RO2 	;
+{9284.} 	 C4CHOAO2 = PGLYOX : 	8.80D-13*0.2*RO2 	;
+{9285.} 	 PBFUO2 + HO2 = PBFUOOH : 	KRO2HO2*0.820 	;
+{9286.} 	 PBFUO2 + NO = PBFUO + NO2 : 	KRO2NO 	;
+{9287.} 	 PBFUO2 + NO3 = PBFUO + NO2 : 	KRO2NO3 	;
+{9288.} 	 PBFUO2 = PBFUCO : 	8.80D-13*RO2*0.20 	;
+{9289.} 	 PBFUO2 = PBFUO : 	8.80D-13*RO2*0.60 	;
+{9290.} 	 PBFUO2 = PBFUOH : 	8.80D-13*RO2*0.20 	;
+{9291.} 	 C7DCCO2 = MALANHY + NC3H7O2 : 	KDEC*0.65 	;
+{9292.} 	 C7DCCO2 = PGLYOX + CO + HO2 : 	KDEC*0.35 	;
+{9293.} 	 C7DCCO3H + OH = C7DCCO3 : 	3.94D-11 	;
+{9294.} 	 C7DCCO3H = C7DCCO2 + OH : 	J(41) 	;
+{9295.} 	 C7DCCO3H = PGLYOX + CO + HO2 + OH : 	J(24) 	;
+{9296.} 	 C7DCPAN + OH = PGLYOX + CO + CO + NO2 : 	3.58D-11 	;
+{9297.} 	 C7DCPAN = C7DCCO3 + NO2 : 	KBPAN 	;
+{9298.} 	 PGLYOXOH + OH = C3H7CO3 : 	5.05D-12 	;
+{9299.} 	 PGLYOXOH = C3H7CO3 + HO2 : 	J(22) 	;
+{9300.} 	 C6O132OH + OH = C5O45OHCO3 : 	7.41D-11 	;
+{9301.} 	 C6O132OH = C3H7CO3 + GLYOX + HO2 : 	J(22) 	;
+{9302.} 	 C6O132OH = PGLYOX + HO2 + HO2 + CO : 	J(17) 	;
+{9303.} 	 C8CO3OHO2 + HO2 = C83COOHOOH : 	KRO2HO2*0.859 	;
+{9304.} 	 C8CO3OHO2 + NO = C8CO3OHO + NO2 : 	KRO2NO 	;
+{9305.} 	 C8CO3OHO2 + NO3 = C8CO3OHO + NO2 : 	KRO2NO3 	;
+{9306.} 	 C8CO3OHO2 = C8CO3OHO : 	8.80D-13*RO2 	;
+{9307.} 	 PHCOMEO2 + HO2 = PHCOMEOOH : 	KRO2HO2*0.859 	;
+{9308.} 	 PHCOMEO2 + NO = PHCOMEO + NO2 : 	KRO2NO 	;
+{9309.} 	 PHCOMEO2 + NO3 = PHCOMEO + NO2 : 	KRO2NO3 	;
+{9310.} 	 PHCOMEO2 = PHCOMEO : 	1.30D-12*RO2*0.6 	;
+{9311.} 	 PHCOMEO2 = PHCOMEOH : 	1.30D-12*RO2*0.2 	;
+{9312.} 	 PHCOMEO2 = PHGLYOX : 	1.30D-12*RO2*0.2 	;
+{9313.} 	 NIPBNZ1O + NO2 = DNIPBNZOL : 	2.08D-12 	;
+{9314.} 	 NIPBNZ1O + O3 = NIPBNZ1O2 : 	2.86D-13 	;
+{9315.} 	 IPBENZOOH + OH = IPBENZO2 : 	4.65D-11 	;
+{9316.} 	 IPBENZOOH = IPBENZO + OH : 	J(41) 	;
+{9317.} 	 IC7DCCO2H + OH = IC7DCCO2 : 	3.42D-11 	;
+{9318.} 	 IC7DCCO2H = IPRGLYOX + CO + HO2 + HO2 : 	J(15)+J(22) 	;
+{9319.} 	 IPRBQONE + NO3 = NIPRBQO2 : 	1.00D-12 	;
+{9320.} 	 IPRBQONE + OH = IPRBQO2 : 	2.35D-11 	;
+{9321.} 	 IPNCATECH + NO3 = IPNNCATCO2 : 	5.03D-12 	;
+{9322.} 	 IPNCATECH + OH = IPNCATECO2 : 	6.83D-12 	;
+{9323.} 	 IPCATEC1O2 + HO2 = IPCATC1OOH : 	KRO2HO2*0.90 	;
+{9324.} 	 IPCATEC1O2 + NO = IPCATEC1O + NO2 : 	KRO2NO 	;
+{9325.} 	 IPCATEC1O2 + NO3 = IPCATEC1O + NO2 : 	KRO2NO3 	;
+{9326.} 	 IPCATEC1O2 = IPCATEC1O : 	8.80D-13*RO2 	;
+{9327.} 	 IP3ODBCO2H + OH = GLYOX + IPRCO3 : 	5.00D-11 	;
+{9328.} 	 IP3ODBCO2H = IPGLYOXOH + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{9329.} 	 IC7DCO2 + HO2 = IC7DCOOH : 	KRO2HO2*0.820 	;
+{9330.} 	 IC7DCO2 + NO = IC7DCO + NO2 : 	KRO2NO 	;
+{9331.} 	 IC7DCO2 + NO3 = IC7DCO + NO2 : 	KRO2NO3 	;
+{9332.} 	 IC7DCO2 = C62CHO : 	8.80D-13*RO2*0.2 	;
+{9333.} 	 IC7DCO2 = IC7DCO : 	8.80D-13*RO2*0.6 	;
+{9334.} 	 IC7DCO2 = IC7DCOH : 	8.80D-13*RO2*0.2 	;
+{9335.} 	 NIPBFUO2 + HO2 = NIPBFUOOH : 	KRO2HO2*0.820 	;
+{9336.} 	 NIPBFUO2 + NO = NIPBFUO + NO2 : 	KRO2NO 	;
+{9337.} 	 NIPBFUO2 + NO3 = NIPBFUO + NO2 : 	KRO2NO3 	;
+{9338.} 	 NIPBFUO2 = NIPBFUO : 	8.80D-13*RO2 	;
+{9339.} 	 IC4CHOAO2 + HO2 = IC4CHOAOOH : 	KRO2HO2*0.706 	;
+{9340.} 	 IC4CHOAO2 + NO = M3BUTAL2O + NO2 : 	KRO2NO 	;
+{9341.} 	 IC4CHOAO2 + NO3 = M3BUTAL2O + NO2 : 	KRO2NO3 	;
+{9342.} 	 IC4CHOAO2 = C3M3OH2CHO : 	8.80D-13*0.2*RO2 	;
+{9343.} 	 IC4CHOAO2 = IPRGLYOX : 	8.80D-13*0.2*RO2 	;
+{9344.} 	 IC4CHOAO2 = M3BUTAL2O : 	8.80D-13*0.6*RO2 	;
+{9345.} 	 IPBFUO2 + HO2 = IPBFUOOH : 	KRO2HO2*0.820 	;
+{9346.} 	 IPBFUO2 + NO = IPBFUO + NO2 : 	KRO2NO 	;
+{9347.} 	 IPBFUO2 + NO3 = IPBFUO + NO2 : 	KRO2NO3 	;
+{9348.} 	 IPBFUO2 = IPBFUCO : 	8.80D-13*RO2*0.20 	;
+{9349.} 	 IPBFUO2 = IPBFUO : 	8.80D-13*RO2*0.60 	;
+{9350.} 	 IPBFUO2 = IPBFUOH : 	8.80D-13*RO2*0.20 	;
+{9351.} 	 IC7DCCO2 = IPRGLYOX + CO + HO2 : 	KDEC*0.35 	;
+{9352.} 	 IC7DCCO2 = MALANHY + IC3H7O2 : 	KDEC*0.65 	;
+{9353.} 	 IC7DCCO3H + OH = IC7DCCO3 : 	3.74D-11 	;
+{9354.} 	 IC7DCCO3H = IC7DCCO2 + OH : 	J(41) 	;
+{9355.} 	 IC7DCCO3H = IPRGLYOX + CO + HO2 + OH : 	J(24) 	;
+{9356.} 	 IC7DCPAN + OH = IPRGLYOX + CO + CO + NO2 : 	3.38D-11 	;
+{9357.} 	 IC7DCPAN = IC7DCCO3 + NO2 : 	KBPAN 	;
+{9358.} 	 IPGLYOXOH + OH = IPRCO3 : 	3.05D-12 	;
+{9359.} 	 IPGLYOXOH = IPRCO3 + HO2 : 	J(22) 	;
+{9360.} 	 C5MO132OH + OH = C4MOHOCO3 : 	7.20D-11 	;
+{9361.} 	 C5MO132OH = IPRCO3 + GLYOX + HO2 : 	J(22) 	;
+{9362.} 	 C5MO132OH = IPRGLYOX + HO2 + HO2 + CO : 	J(17) 	;
+{9363.} 	 C7MCO3OHO2 + HO2 = C7MO3OHOOH : 	KRO2HO2*0.859 	;
+{9364.} 	 C7MCO3OHO2 + NO = C7MCO3OHO + NO2 : 	KRO2NO 	;
+{9365.} 	 C7MCO3OHO2 + NO3 = C7MCO3OHO + NO2 : 	KRO2NO3 	;
+{9366.} 	 C7MCO3OHO2 = C7MCO3OHO : 	8.80D-13*RO2 	;
+{9367.} 	 TM123BCO2H + OH = DM123O2 : 	7.92D-13 	;
+{9368.} 	 TM123BCO3H + OH = TM123BCO3 : 	3.86D-12 	;
+{9369.} 	 TM123BCO3H = DM123O2 + OH : 	J(41) 	;
+{9370.} 	 TM123BPAN + OH = DM123OOH + CO + NO2 : 	1.06D-12 	;
+{9371.} 	 TM123BPAN = TM123BCO3 + NO2 : 	KBPAN 	;
+{9372.} 	 C7ADCCO2H + OH = C7ADCCO2 : 	4.52D-11 	;
+{9373.} 	 C7ADCCO2H = BIACET + CH3CO3 + HO2 : 	J(15)+J(22) 	;
+{9374.} 	 NT123L1O + NO2 = DNT123BOL : 	2.08D-12 	;
+{9375.} 	 NT123L1O + O3 = NT123L1O2 : 	2.86D-13 	;
+{9376.} 	 TM123OOH + OH = TM123O2 : 	4.65D-11 	;
+{9377.} 	 TM123OOH = TM123O + OH : 	J(41) 	;
+{9378.} 	 T123NCATEC + NO3 = T123NNCTO2 : 	5.03D-12 	;
+{9379.} 	 T123NCATEC + OH = T123NCATO2 : 	6.83D-12 	;
+{9380.} 	 T123CAT1O2 + HO2 = T123CT1OOH : 	KRO2HO2*0.90 	;
+{9381.} 	 T123CAT1O2 + NO = T123CAT1O + NO2 : 	KRO2NO 	;
+{9382.} 	 T123CAT1O2 + NO3 = T123CAT1O + NO2 : 	KRO2NO3 	;
+{9383.} 	 T123CAT1O2 = T123CAT1O : 	8.80D-13*RO2 	;
+{9384.} 	 C7ADCCO3 + HO2 = C7ADCCO2 + OH : 	KAPHO2*0.44 	;
+{9385.} 	 C7ADCCO3 + HO2 = C7ADCCO2H + O3 : 	KAPHO2*0.15 	;
+{9386.} 	 C7ADCCO3 + HO2 = C7ADCCO3H : 	KAPHO2*0.41 	;
+{9387.} 	 C7ADCCO3 + NO = C7ADCCO2 + NO2 : 	KAPNO 	;
+{9388.} 	 C7ADCCO3 + NO2 = C7ADCPAN : 	KFPAN 	;
+{9389.} 	 C7ADCCO3 + NO3 = C7ADCCO2 + NO2 : 	KRO2NO3*1.74 	;
+{9390.} 	 C7ADCCO3 = C7ADCCO2 : 	1.00D-11*RO2*0.7 	;
+{9391.} 	 C7ADCCO3 = C7ADCCO2H : 	1.00D-11*RO2*0.3 	;
+{9392.} 	 C7ADCO2 + HO2 = C7ADCOOH : 	KRO2HO2*0.820 	;
+{9393.} 	 C7ADCO2 + NO = C7ADCO + NO2 : 	KRO2NO 	;
+{9394.} 	 C7ADCO2 + NO3 = C7ADCO + NO2 : 	KRO2NO3 	;
+{9395.} 	 C7ADCO2 = C7ADCO : 	9.20D-14*RO2*0.7 	;
+{9396.} 	 C7ADCO2 = C7ADCOH : 	9.20D-14*RO2*0.3 	;
+{9397.} 	 NTMB1FUO2 + HO2 = NTMB1FUOOH : 	KRO2HO2*0.706 	;
+{9398.} 	 NTMB1FUO2 + NO = NTMB1FUO + NO2 : 	KRO2NO 	;
+{9399.} 	 NTMB1FUO2 + NO3 = NTMB1FUO + NO2 : 	KRO2NO3 	;
+{9400.} 	 NTMB1FUO2 = NTMB1FUO : 	9.20D-14*RO2 	;
+{9401.} 	 C5OCO3M + OH = MEKBO2 + CO : 	1.85D-11 	;
+{9402.} 	 C5OCO3M = MEKBO2 + HO2 + CO : 	J(22)+J(34) 	;
+{9403.} 	 TMB1FUO2 + HO2 = TMB1FUOOH : 	KRO2HO2*0.770 	;
+{9404.} 	 TMB1FUO2 + NO = TMB1FUO + NO2 : 	KRO2NO 	;
+{9405.} 	 TMB1FUO2 + NO3 = TMB1FUO + NO2 : 	KRO2NO3 	;
+{9406.} 	 TMB1FUO2 = TMB1FUO : 	9.20D-14*RO2*0.70 	;
+{9407.} 	 TMB1FUO2 = TMB1FUOH : 	9.20D-14*RO2*0.30 	;
+{9408.} 	 NTMB2FUO2 + HO2 = NTMB2FUOOH : 	KRO2HO2*0.770 	;
+{9409.} 	 NTMB2FUO2 + NO = NTMB2FUO + NO2 : 	KRO2NO 	;
+{9410.} 	 NTMB2FUO2 + NO3 = NTMB2FUO + NO2 : 	KRO2NO3 	;
+{9411.} 	 NTMB2FUO2 = NTMB2FUO : 	9.20D-14*RO2 	;
+{9412.} 	 MC6OTKETO2 + HO2 = MC6OTKTOOH : 	KRO2HO2*0.820 	;
+{9413.} 	 MC6OTKETO2 + NO = MC6OTKETO + NO2 : 	KRO2NO 	;
+{9414.} 	 MC6OTKETO2 + NO3 = MC6OTKETO + NO2 : 	KRO2NO3*1.74 	;
+{9415.} 	 MC6OTKETO2 = MC6OTKETO : 	9.20D-14*RO2*0.7 	;
+{9416.} 	 MC6OTKETO2 = MC6OTKETOH : 	9.20D-14*RO2*0.3 	;
+{9417.} 	 TMB2FUO2 + HO2 = TMB2FUOOH : 	KRO2HO2*0.820 	;
+{9418.} 	 TMB2FUO2 + NO = TMB2FUO + NO2 : 	KRO2NO 	;
+{9419.} 	 TMB2FUO2 + NO3 = TMB2FUO + NO2 : 	KRO2NO3 	;
+{9420.} 	 TMB2FUO2 = TMB2FUO : 	9.20D-14*RO2*0.70 	;
+{9421.} 	 TMB2FUO2 = TMB2FUOH : 	9.20D-14*RO2*0.30 	;
+{9422.} 	 EPXKTMCO2H + OH = C4MCO2O2 : 	2.10D-12 	;
+{9423.} 	 EPXKTMCO2H = C4MCO2O2 + HO2 : 	J(22) 	;
+{9424.} 	 EPXKTMCO3H + OH = EPXKTMCO3 : 	5.18D-12 	;
+{9425.} 	 EPXKTMCO3H = C4MCO2O2 + OH : 	J(41)+J(22) 	;
+{9426.} 	 EPXKTMPAN + OH = BIACET + CO + NO2 : 	1.95D-12 	;
+{9427.} 	 EPXKTMPAN = EPXKTMCO3 + NO2 : 	KBPAN 	;
+{9428.} 	 C4CO2OOH + OH = CO23C3CHO + OH : 	7.83D-11 	;
+{9429.} 	 C4CO2OOH = C4CO2O + OH : 	J(41) 	;
+{9430.} 	 C4CO2OOH = CH3CO3 + GLYOX + OH : 	J(22) 	;
+{9431.} 	 C4CO2OOH = HO2 + CO + MGLYOX + OH : 	J(17) 	;
+{9432.} 	 TM124BCO2H + OH = DM124O2 : 	1.10D-12 	;
+{9433.} 	 TM124BCO3H + OH = TM124BCO3 : 	4.66D-12 	;
+{9434.} 	 TM124BCO3H = DM124O2 + OH : 	J(41) 	;
+{9435.} 	 TM124BPAN + OH = DM124OOH + CO + NO2 : 	1.06D-12 	;
+{9436.} 	 TM124BPAN = TM124BCO3 + NO2 : 	KBPAN 	;
+{9437.} 	 DM124OOH + OH = DM124O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9438.} 	 DM124OOH = DM124O + OH : 	J(41) 	;
+{9439.} 	 DM124O + NO2 = DM124OHNO2 : 	3.90D-13 	;
+{9440.} 	 MEK2OOC = BIACETO2 + OH : 	KDEC*0.89 	;
+{9441.} 	 MEK2OOC = MEK2OO : 	KDEC*0.11 	;
+{9442.} 	 C7BDCO2 + HO2 = C7BDCOOH : 	KRO2HO2*0.820 	;
+{9443.} 	 C7BDCO2 + NO = C7BDCO + NO2 : 	KRO2NO 	;
+{9444.} 	 C7BDCO2 + NO3 = C7BDCO + NO2 : 	KRO2NO3 	;
+{9445.} 	 C7BDCO2 = C7BDCO : 	9.20D-14*RO2*0.7 	;
+{9446.} 	 C7BDCO2 = C7BDCOH : 	9.20D-14*RO2*0.3 	;
+{9447.} 	 C3M2COCO2H + OH = MGLYOX + CH3CO3 : 	5.52D-11 	;
+{9448.} 	 C3M2COCO2H = CH3COCO2H + CH3CO3 + HO2 + CO : 	J(18)+J(19) 	;
+{9449.} 	 NT124L1O + NO2 = DNT124BOL : 	2.08D-12 	;
+{9450.} 	 NT124L1O + O3 = NT124L1O2 : 	2.86D-13 	;
+{9451.} 	 TM124OOH + OH = TM124O2 : 	4.65D-11 	;
+{9452.} 	 TM124OOH = TM124O + OH : 	J(41) 	;
+{9453.} 	 TM124QONE + NO3 = NTM124QO2 : 	1.00D-12 	;
+{9454.} 	 TM124QONE + OH = TM124QO2 : 	2.35D-11 	;
+{9455.} 	 T124NCATEC + NO3 = T124NNCTO2 : 	5.03D-12 	;
+{9456.} 	 T124NCATEC + OH = T124NCATO2 : 	6.83D-12 	;
+{9457.} 	 T124CAT1O2 + HO2 = T124CT1OOH : 	KRO2HO2*0.90 	;
+{9458.} 	 T124CAT1O2 + NO = T124CAT1O + NO2 : 	KRO2NO 	;
+{9459.} 	 T124CAT1O2 + NO3 = T124CAT1O + NO2 : 	KRO2NO3 	;
+{9460.} 	 T124CAT1O2 = T124CAT1O : 	8.80D-13*RO2 	;
+{9461.} 	 C5CODBCO2H + OH = C4MCODBCO2 : 	3.54D-11 	;
+{9462.} 	 C5CODBCO2H = CH3COCO2H + CH3CO3 + HO2 + CO : 	J(24) 	;
+{9463.} 	 TMBCO2H + OH = DMPHO2 : 	1.10D-12 	;
+{9464.} 	 TMBCO3H + OH = TMBCO3 : 	4.66D-12 	;
+{9465.} 	 TMBCO3H = DMPHO2 + OH : 	J(41) 	;
+{9466.} 	 TMBPAN + OH = DMPHOOH + CO + NO2 : 	1.06D-12 	;
+{9467.} 	 TMBPAN = TMBCO3 + NO2 : 	KBPAN*0.67 	;
+{9468.} 	 DMPHOOH + OH = DMPHO2 : 	3.60D-12 	;
+{9469.} 	 DMPHOOH = DMPHO + OH : 	J(41) 	;
+{9470.} 	 DMPHO + NO2 = DMPHOHNO2 : 	3.90D-13 	;
+{9471.} 	 C4MCODBCO2 = MGLYOX + CH3CO3 : 	KDEC*0.35 	;
+{9472.} 	 C4MCODBCO2 = MMALANHY + CH3O2 : 	KDEC*0.65 	;
+{9473.} 	 C5CODBCO3H + OH = C4MCODBCO3 : 	3.90D-11 	;
+{9474.} 	 C5CODBCO3H = C4MCODBCO2 + OH : 	J(41) 	;
+{9475.} 	 C5CODBCO3H = OH + MGLYOX + CH3CO3 : 	J(24) 	;
+{9476.} 	 C4MCODBPAN + OH = MGLYOX + HCHO + CO + CO + NO2 : 	3.54D-11 	;
+{9477.} 	 C4MCODBPAN = C4MCODBCO3 + NO2 : 	KBPAN 	;
+{9478.} 	 EPXMKTCO2H + OH = CO24C53O2 : 	2.11D-12 	;
+{9479.} 	 EPXMKTCO2H = CO24C53O2 + HO2 : 	J(22) 	;
+{9480.} 	 EPXMKTCO3H + OH = EPXMKTCO3 : 	5.17D-12 	;
+{9481.} 	 EPXMKTCO3H = CO24C53O2 + OH : 	J(41)+J(22) 	;
+{9482.} 	 EPXMKTPAN + OH = C5CO234 + CO + NO2 : 	1.95D-12 	;
+{9483.} 	 EPXMKTPAN = EPXMKTCO3 + NO2 : 	KBPAN 	;
+{9484.} 	 CO24C53OOH + OH = CO24C53O2 : 	1.75D-11 	;
+{9485.} 	 CO24C53OOH = CO24C53O + OH : 	J(41) 	;
+{9486.} 	 CO24C53OOH = MGLYOX + CH3CO3 + OH : 	J(22) 	;
+{9487.} 	 CO24C53O = MGLYOX + CH3CO3 : 	KDEC 	;
+{9488.} 	 C5CO243OH + OH = C5CO234 + HO2 : 	4.06D-12 	;
+{9489.} 	 C5CO243OH = MGLYOX + CH3CO3 + HO2 : 	J(22)*2 	;
+{9490.} 	 C5CO234 + OH = C5CO234O2 : 	2.04D-13 	;
+{9491.} 	 C5CO234 = CH3CO3 + CH3CO3 + CO : 	J(35) 	;
+{9492.} 	 MPHCOMEOOH + OH = MPHGLYOX + OH : 	2.05D-11 	;
+{9493.} 	 MPHCOMEOOH = MPHCOMEO + OH : 	J(41) 	;
+{9494.} 	 MPHCOMEOOH = OXYLCO3 + HCHO + OH : 	J(22) 	;
+{9495.} 	 MPHCOMEO = OXYLCO3 + HCHO : 	KDEC 	;
+{9496.} 	 MPHCOMEOH + OH = MPHGLYOX + HO2 : 	8.93D-12 	;
+{9497.} 	 MPHCOMEOH = OXYLCO3 + HCHO + HO2 : 	J(22) 	;
+{9498.} 	 MPHGLYOX + OH = OXYLCO3 + CO : 	1.29D-11 	;
+{9499.} 	 MPHGLYOX = OXYLCO3 + HO2 + CO : 	J(34) 	;
+{9500.} 	 EPXMEDCO2H + OH = C4ECO2O2 : 	2.55D-11 	;
+{9501.} 	 EPXMEDCO2H = C4ECO2O2 + HO2 : 	J(17) 	;
+{9502.} 	 EPXMEDCO3H + OH = EPXMEDLCO3 : 	2.85D-11 	;
+{9503.} 	 EPXMEDCO3H = C4ECO2O2 + OH : 	J(41)+J(17) 	;
+{9504.} 	 EPXMEDLPAN + OH = EPXMEDLCO3 + NO2 : 	2.54D-11 	;
+{9505.} 	 EPXMEDLPAN = EPXMEDLCO3 + NO2 : 	KBPAN 	;
+{9506.} 	 C4ECO2OOH + OH = C4ECO2O2 : 	7.30D-11 	;
+{9507.} 	 C4ECO2OOH = C4ECO2O + OH : 	J(41) 	;
+{9508.} 	 C4ECO2OOH = CH3CO3 + EGLYOX + OH : 	J(22) 	;
+{9509.} 	 C4ECO2OOH = CO23C5 + OH + HO2 + CO : 	J(17) 	;
+{9510.} 	 C4ECO2O = CO23C5 + HO2 + CO : 	KDEC*0.5 	;
+{9511.} 	 C4ECO2O = EGLYOX + CH3CO3 : 	KDEC*0.5 	;
+{9512.} 	 C7CDCCO2H + OH = CO23C5 + HO2 + CO : 	4.56D-11 	;
+{9513.} 	 C7CDCCO2H = CO23C5 + HO2 + CO + HO2 : 	J(15)+J(22) 	;
+{9514.} 	 NOETOL1O + NO2 = DNOETOL : 	2.08D-12 	;
+{9515.} 	 NOETOL1O + O3 = NOETOL1O2 : 	2.86D-13 	;
+{9516.} 	 OET1OOH + OH = OET1O2 : 	4.65D-11 	;
+{9517.} 	 OET1OOH = OET1O + OH : 	J(41) 	;
+{9518.} 	 OETLQONE + NO3 = NOETLQO2 : 	1.00D-12 	;
+{9519.} 	 OETLQONE + OH = OETLQO2 : 	2.35D-11 	;
+{9520.} 	 OTNCATECH + NO3 = OTNNCATCO2 : 	5.03D-12 	;
+{9521.} 	 OTNCATECH + OH = OTNCATECO2 : 	6.83D-12 	;
+{9522.} 	 OTCATEC1O2 + HO2 = OTCTEC1OOH : 	KRO2HO2*0.90 	;
+{9523.} 	 OTCATEC1O2 + NO = OTCATEC1O + NO2 : 	KRO2NO 	;
+{9524.} 	 OTCATEC1O2 + NO3 = OTCATEC1O + NO2 : 	KRO2NO3 	;
+{9525.} 	 OTCATEC1O2 = OTCATEC1O : 	8.80D-13*RO2 	;
+{9526.} 	 CO23C3CHO = CH3CO3 + CO + CO + HO2 : 	J(34) 	;
+{9527.} 	 CO23C3CHO = CH3CO3 + HCOCO3 : 	J(35) 	;
+{9528.} 	 NO3 + CO23C3CHO = CH3CO3 + CO + CO + HNO3 : 	KNO3AL*4.0 	;
+{9529.} 	 OH + CO23C3CHO = CH3CO3 + CO + CO : 	1.23D-11 	;
+{9530.} 	 NMETOL1O + NO2 = DNMETOL : 	2.08D-12 	;
+{9531.} 	 NMETOL1O + O3 = NMETOL1O2 : 	2.86D-13 	;
+{9532.} 	 MET1OOH + OH = MET1O2 : 	4.65D-11 	;
+{9533.} 	 MET1OOH = MET1O + OH : 	J(41) 	;
+{9534.} 	 METLQONE + NO3 = NMETLQO2 : 	1.00D-12 	;
+{9535.} 	 METLQONE + OH = METLQO2 : 	2.35D-11 	;
+{9536.} 	 MTNCATECH + NO3 = MTNNCATCO2 : 	5.03D-12 	;
+{9537.} 	 MTNCATECH + OH = MTNCATECO2 : 	6.83D-12 	;
+{9538.} 	 MTCATEC1O2 + HO2 = MTCTEC1OOH : 	KRO2HO2*0.90 	;
+{9539.} 	 MTCATEC1O2 + NO = MTCATEC1O + NO2 : 	KRO2NO 	;
+{9540.} 	 MTCATEC1O2 + NO3 = MTCATEC1O + NO2 : 	KRO2NO3 	;
+{9541.} 	 MTCATEC1O2 = MTCATEC1O : 	8.80D-13*RO2 	;
+{9542.} 	 C7EDCO2 + HO2 = C7EDCOOH : 	KRO2HO2*0.820 	;
+{9543.} 	 C7EDCO2 + NO = C7EDCO + NO2 : 	KRO2NO 	;
+{9544.} 	 C7EDCO2 + NO3 = C7EDCO + NO2 : 	KRO2NO3 	;
+{9545.} 	 C7EDCO2 = C7EDCCO : 	8.80D-13*RO2*0.2 	;
+{9546.} 	 C7EDCO2 = C7EDCO : 	8.80D-13*RO2*0.6 	;
+{9547.} 	 C7EDCO2 = C7EDCOH : 	8.80D-13*RO2*0.2 	;
+{9548.} 	 NPETOL1O + NO2 = DNPETOL : 	2.08D-12 	;
+{9549.} 	 NPETOL1O + O3 = NPETOL1O2 : 	2.86D-13 	;
+{9550.} 	 PET1OOH + OH = PET1O2 : 	4.65D-11 	;
+{9551.} 	 PET1OOH = PET1O + OH : 	J(41) 	;
+{9552.} 	 PETLQONE + NO3 = NPETLQO2 : 	1.00D-12 	;
+{9553.} 	 PETLQONE + OH = PETLQO2 : 	2.35D-11 	;
+{9554.} 	 PTNCATECH + NO3 = PTNNCATCO2 : 	5.03D-12 	;
+{9555.} 	 PTNCATECH + OH = PTNCATECO2 : 	6.83D-12 	;
+{9556.} 	 PTCATEC1O2 + HO2 = PTCTEC1OOH : 	KRO2HO2*0.90 	;
+{9557.} 	 PTCATEC1O2 + NO = PTCATEC1O + NO2 : 	KRO2NO 	;
+{9558.} 	 PTCATEC1O2 + NO3 = PTCATEC1O + NO2 : 	KRO2NO3 	;
+{9559.} 	 PTCATEC1O2 = PTCATEC1O : 	8.80D-13*RO2 	;
+{9560.} 	 DMPHCOMOOH + OH = DMPHGLYOX + OH : 	2.05D-11 	;
+{9561.} 	 DMPHCOMOOH = DMPHCOMO + OH : 	J(41) 	;
+{9562.} 	 DMPHCOMOOH = TMBCO3 + HCHO + OH : 	J(22) 	;
+{9563.} 	 DMPHCOMO = TMBCO3 + HCHO : 	KDEC 	;
+{9564.} 	 DMPHCOMOH + OH = MPHGLYOX + HO2 : 	8.93D-12 	;
+{9565.} 	 DMPHCOMOH = TMBCO3 + HCHO + HO2 : 	J(22) 	;
+{9566.} 	 DMPHGLYOX + OH = TMBCO3 + CO : 	1.29D-11 	;
+{9567.} 	 DMPHGLYOX = TMBCO3 + HO2 + CO : 	J(34) 	;
+{9568.} 	 C7DDCCO3 + HO2 = C7DDCCO2 + OH : 	KAPHO2*0.44 	;
+{9569.} 	 C7DDCCO3 + HO2 = C7DDCCO2H + O3 : 	KAPHO2*0.15 	;
+{9570.} 	 C7DDCCO3 + HO2 = C7DDCCO3H : 	KAPHO2*0.41 	;
+{9571.} 	 C7DDCCO3 + NO = C7DDCCO2 + NO2 : 	KAPNO 	;
+{9572.} 	 C7DDCCO3 + NO2 = C7DDCPAN : 	KFPAN 	;
+{9573.} 	 C7DDCCO3 + NO3 = C7DDCCO2 + NO2 : 	KRO2NO3*1.74 	;
+{9574.} 	 C7DDCCO3 = C7DDCCO2 : 	1.00D-11*RO2*0.7 	;
+{9575.} 	 C7DDCCO3 = C7DDCCO2H : 	1.00D-11*RO2*0.3 	;
+{9576.} 	 C7DDCO2 + HO2 = C7DDCOOH : 	KRO2HO2*0.820 	;
+{9577.} 	 C7DDCO2 + NO = C7DDCO + NO2 : 	KRO2NO 	;
+{9578.} 	 C7DDCO2 + NO3 = C7DDCO + NO2 : 	KRO2NO3 	;
+{9579.} 	 C7DDCO2 = C7DDCO : 	9.20D-14*RO2*0.7 	;
+{9580.} 	 C7DDCO2 = C7DDCOH : 	9.20D-14*RO2*0.3 	;
+{9581.} 	 NMEBFUO2 + HO2 = NMEBFUOOH : 	KRO2HO2*0.820 	;
+{9582.} 	 NMEBFUO2 + NO = NMEBFUO + NO2 : 	KRO2NO 	;
+{9583.} 	 NMEBFUO2 + NO3 = NMEBFUO + NO2 : 	KRO2NO3 	;
+{9584.} 	 NMEBFUO2 = NMEBFUO : 	9.20D-14*RO2 	;
+{9585.} 	 C23O3EO2 + HO2 = C23O3ECOOH : 	KRO2HO2*0.770 	;
+{9586.} 	 C23O3EO2 + NO = C23O3EO + NO2 : 	KRO2NO 	;
+{9587.} 	 C23O3EO2 + NO3 = C23O3EO + NO2 : 	KRO2NO3 	;
+{9588.} 	 C23O3EO2 = C23O3EHO : 	8.80D-13*RO2*0.2 	;
+{9589.} 	 C23O3EO2 = C23O3EO : 	8.80D-13*RO2*0.6 	;
+{9590.} 	 C23O3EO2 = C23O3EOH : 	8.80D-13*RO2*0.2 	;
+{9591.} 	 MEBFUO2 + HO2 = MEBFUOOH : 	KRO2HO2*0.820 	;
+{9592.} 	 MEBFUO2 + NO = MEBFUO + NO2 : 	KRO2NO 	;
+{9593.} 	 MEBFUO2 + NO3 = MEBFUO + NO2 : 	KRO2NO3 	;
+{9594.} 	 MEBFUO2 = MEBFUO : 	9.20D-14*RO2*0.70 	;
+{9595.} 	 MEBFUO2 = MEBFUOH : 	9.20D-14*RO2*0.30 	;
+{9596.} 	 C6CO243OH + OH = CO234C6 + HO2 : 	5.29D-12 	;
+{9597.} 	 C6CO243OH = EGLYOX + CH3CO3 + HO2 : 	J(22) 	;
+{9598.} 	 C6CO243OH = MGLYOX + C2H5CO3 + HO2 : 	J(22) 	;
+{9599.} 	 EMPHCOMOOH + OH = EMPHGLYOX + OH : 	2.05D-11 	;
+{9600.} 	 EMPHCOMOOH = EMPHCO3 + HCHO + OH : 	J(22) 	;
+{9601.} 	 EMPHCOMOOH = EMPHCOMO + OH : 	J(41) 	;
+{9602.} 	 EMPHCOMO = EMPHCO3 + HCHO : 	KDEC 	;
+{9603.} 	 EMPHCOMOH + OH = EMPHGLYOX + HO2 : 	8.93D-12 	;
+{9604.} 	 EMPHCOMOH = EMPHCO3 + HCHO + HO2 : 	J(22) 	;
+{9605.} 	 EMPHGLYOX + OH = EMPHCO3 + CO : 	1.29D-11 	;
+{9606.} 	 EMPHGLYOX = EMPHCO3 + HO2 + CO : 	J(34) 	;
+{9607.} 	 EMPHCO3H + OH = EMPHCO3 : 	4.66D-12 	;
+{9608.} 	 EMPHCO3H = EMPHO2 + OH : 	J(41) 	;
+{9609.} 	 EMPHO2 + HO2 = EMPHOOH : 	KRO2HO2*0.890 	;
+{9610.} 	 EMPHO2 + NO = EMPHO + NO2 : 	KRO2NO 	;
+{9611.} 	 EMPHO2 + NO3 = EMPHO + NO2 : 	KRO2NO3 	;
+{9612.} 	 EMPHO2 = EMPHO : 	2.50D-13*RO2 	;
+{9613.} 	 EMPHPAN + OH = EMPHOOH + CO + NO2 : 	1.06D-12 	;
+{9614.} 	 EMPHPAN = EMPHCO3 + NO2 : 	KBPAN 	;
+{9615.} 	 C7DDCCO2H + OH = C7DDCCO2 : 	4.56D-11 	;
+{9616.} 	 C7DDCCO2H + OH = EGLYOX + CH3CO3 : 	4.56D-11 	;
+{9617.} 	 C7DDCCO2H = CH3COCO2H + CH3CO3 + HO2 + CO : 	J(22) 	;
+{9618.} 	 C7DDCCO2H = EGLYOX + CH3CO3 + HO2 : 	J(15)+J(22) 	;
+{9619.} 	 C7ODLBCO3H + OH = C7CODBCO3 : 	2.64D-11 	;
+{9620.} 	 C7ODLBCO3H = EGLYOX + C2H5CO3 + OH : 	J(41) 	;
+{9621.} 	 C7CODBPAN + OH = EGLYOX + C2H5CHO + NO2 : 	2.32D-11 	;
+{9622.} 	 C7CODBPAN = C7CODBCO3 + NO2 : 	KBPAN 	;
+{9623.} 	 EPXEKTCO2H + OH = CO24C63O2 : 	5.39D-12 	;
+{9624.} 	 EPXEKTCO2H = CO24C63O2 + HO2 : 	J(22) 	;
+{9625.} 	 EPXEKTCO3H + OH = EPXEKTCO3 : 	8.46D-12 	;
+{9626.} 	 EPXEKTCO3H = CO24C63O2 + OH : 	J(41)+J(22) 	;
+{9627.} 	 EPXEKTPAN + OH = CO24C6 + CO + NO2 : 	5.23D-12 	;
+{9628.} 	 EPXEKTPAN = EPXEKTCO3 + NO2 : 	KBPAN 	;
+{9629.} 	 C3EDIALOOH + OH = C3EDIALO2 : 	1.38D-10 	;
+{9630.} 	 C3EDIALOOH = C3EDIALO + OH : 	J(41) 	;
+{9631.} 	 C3EDIALOOH = EGLYOX + OH + HO2 + CO : 	J(17)*2 	;
+{9632.} 	 C3EDIALO = EGLYOX + CO + HO2 : 	KDEC 	;
+{9633.} 	 C3EDIALOH + OH = EGLYOX + HO2 + CO : 	1.35D-10 	;
+{9634.} 	 C3EDIALOH = EGLYOX + HO2 + HO2 + CO : 	J(17)*2 	;
+{9635.} 	 CO24C63OOH + OH = CO234C6 + OH : 	1.41D-11 	;
+{9636.} 	 CO24C63OOH = CO24C63O + OH : 	J(41) 	;
+{9637.} 	 CO24C63OOH = MGLYOX + C2H5CO3 + OH : 	J(22)*2 	;
+{9638.} 	 CO24C63O = MGLYOX + C2H5CO3 : 	KDEC 	;
+{9639.} 	 CO234C6 + OH = CO234C65O2 : 	1.33D-12 	;
+{9640.} 	 CO234C6 = C2H5CO3 + CH3CO3 + CO : 	J(35)*2 	;
+{9641.} 	 CCL3CO3H + OH = CCL3CO3 : 	1.90D-12*EXP(190/TEMP) 	;
+{9642.} 	 CCL3CO3H = CCL3O2 + OH : 	J(41) 	;
+{9643.} 	 CCL3PAN = CCL3CO3 + NO2 : 	KBPAN 	;
+{9644.} 	 CLETO2H + OH = CH2CLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9645.} 	 CLETO3H + OH = CLETO3 : 	4.29D-12 	;
+{9646.} 	 CLETO3H = CH2CLO2 + OH : 	J(41) 	;
+{9647.} 	 CLETPAN + OH = CHOCL + CO + NO2 : 	6.26D-13 	;
+{9648.} 	 CLETPAN = CLETO3 + NO2 : 	KBPAN 	;
+{9649.} 	 CL2OHCO3H + OH = CL2OHCO3 : 	3.59D-12 	;
+{9650.} 	 CL2OHCO3H = COCL2 + HO2 + OH : 	J(41) 	;
+{9651.} 	 CL2OHPAN + OH = CL2OHCO3 + NO2 : 	6.00D-13 	;
+{9652.} 	 CL2OHPAN = CL2OHCO3 + NO2 : 	KBPAN 	;
+{9653.} 	 CL12CO2H + OH = DICLETO2 : 	2.10D-12 	;
+{9654.} 	 CL12CO3H + OH = CL12CO3 : 	5.65D-12 	;
+{9655.} 	 CL12CO3H = DICLETO2 + OH : 	J(41) 	;
+{9656.} 	 CL12PAN + OH = CH2CLCOCL + CO + NO2 : 	2.42D-12 	;
+{9657.} 	 CL12PAN = CL12CO3 + NO2 : 	KBPAN 	;
+{9658.} 	 CH3COCCLO2 + HO2 = CH3COCLOOH : 	3.30D-13*EXP(820/TEMP) 	;
+{9659.} 	 CH3COCCLO2 + NO = CH3COCCLO + NO2 : 	KRO2NO 	;
+{9660.} 	 CH3COCCLO2 + NO3 = CH3COCCLO + NO2 : 	KRO2NO3 	;
+{9661.} 	 CH3COCCLO2 = CH3COCCLO : 	8.80D-13*RO2 	;
+{9662.} 	 CLCOCLMOOH + OH = CLCOCLMEO2 : 	4.12D-12 	;
+{9663.} 	 CLCOCLMOOH = CLCOCLMEO + OH : 	J(41) 	;
+{9664.} 	 CLCOCLMEO = CH3COCL + CO + CL : 	KDEC 	;
+{9665.} 	 CHCL2CO2H + OH = CHCL2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9666.} 	 CHCL2CO3H + OH = CHCL2CO3 : 	3.80D-12 	;
+{9667.} 	 CHCL2CO3H = CHCL2O2 + OH : 	J(41) 	;
+{9668.} 	 CHCL2PAN + OH = COCL2 + CO + NO2 : 	5.70D-13 	;
+{9669.} 	 CHCL2PAN = CHCL2CO3 + NO2 : 	KBPAN 	;
+{9670.} 	 CLCOCH2OOH + OH = CLCOCH2O2 : 	7.25D-12 	;
+{9671.} 	 CLCOCH2OOH = CLCOCH2O + OH : 	J(41) 	;
+{9672.} 	 CLCOCH2O = HCHO + CO + CL : 	KDEC 	;
+{9673.} 	 CLCOCCL2O2 + HO2 = CLCOCL2OOH : 	3.30D-13*EXP(820/TEMP) 	;
+{9674.} 	 CLCOCCL2O2 + NO = CLCOCCL2O + NO2 : 	KRO2NO*1.5 	;
+{9675.} 	 CLCOCCL2O2 + NO3 = CLCOCCL2O + NO2 : 	KRO2NO3 	;
+{9676.} 	 CLCOCCL2O2 = CCL2OHCOCL : 	9.20D-14*0.30*RO2 	;
+{9677.} 	 CLCOCCL2O2 = CLCOCCL2O : 	9.20D-14*0.70*RO2 	;
+{9678.} 	 CLCOCLOOH + OH = CLCOCLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9679.} 	 CLCOCLOOH + OH = CLGLYOX + OH : 	4.00D-12 	;
+{9680.} 	 CLCOCLOOH = CLCOCLO + OH : 	J(41) 	;
+{9681.} 	 CLCOCLO = CHOCL + CO + CL : 	KDEC 	;
+{9682.} 	 CLOHCO2H + OH = CHOCL + HO2 : 	2.57D-12 	;
+{9683.} 	 CLOHCO3H + OH = CCLOHCO3 : 	5.67D-12 	;
+{9684.} 	 CLOHCO3H = CHOCL + HO2+ OH : 	J(41) 	;
+{9685.} 	 CLOHPAN + OH = CHOCL + CO + NO2 : 	2.08D-12 	;
+{9686.} 	 CLOHPAN = CCLOHCO3 + NO2 : 	KBPAN 	;
+{9687.} 	 HNMVKOOH = HNMVKO + OH : 	J(41) 	;
+{9688.} 	 HNMVKOOH = NO3CH2CO3 + HOCH2CHO + OH : 	J(22) 	;
+{9689.} 	 OH + HNMVKOOH = HNBIACET + OH : 	3.96D-11 	;
+{9690.} 	 HNMVKO = NO3CH2CO3 + HOCH2CHO : 	KDEC 	;
+{9691.} 	 HNBIACET = NO3CH2CO3 + HOCH2CO3 : 	J(35) 	;
+{9692.} 	 OH + HNBIACET = NCO23CHO + HO2 : 	2.32D-12 	;
+{9693.} 	 HNMVKOH = NO3CH2CO3 + HOCH2CHO + HO2 : 	J(22) 	;
+{9694.} 	 OH + HNMVKOH = HNBIACET + HO2 : 	1.88D-11 	;
+{9695.} 	 OH + NC3CO2H = NO3CH2CHO + CO + HO2 : 	1.52D-11 	;
+{9696.} 	 NC3CO3H = NO3CH2CHO + CO + HO2 + OH : 	J(41) 	;
+{9697.} 	 OH + NC3CO3H = NC3CO3 : 	1.88D-11 	;
+{9698.} 	 C4PAN9 = NC3CO3 + NO2 : 	KBPAN 	;
+{9699.} 	 OH + C4PAN9 = NO3CH2CHO + CO + CO + NO2 : 	1.52D-11 	;
+{9700.} 	 NAOO + CO = NO3CH2CHO : 	1.2D-15 	;
+{9701.} 	 NAOO + NO = NO3CH2CHO + NO2 : 	1.0D-14 	;
+{9702.} 	 NAOO + NO2 = NO3CH2CHO + NO3 : 	1.0D-15 	;
+{9703.} 	 NAOO + SO2 = NO3CH2CHO + SO3 : 	7.0D-14 	;
+{9704.} 	 NAOO = NO3CH2CHO + H2O2 : 	6.0D-18*H2O 	;
+{9705.} 	 NAOO = NO3CH2CO2H : 	1.0D-17*H2O 	;
+{9706.} 	 C42OOH = C42O + OH : 	J(41) 	;
+{9707.} 	 C42OOH = HO2 + CO + HO2 + NMGLYOX : 	J(15) 	;
+{9708.} 	 OH + C42OOH = H3NCO2CHO + OH : 	6.21D-11 	;
+{9709.} 	 C42O = NO3CH2CHO + GLYOX + HO2 : 	KDEC 	;
+{9710.} 	 C42OH = HO2 + CO + HO2 + C42AOH : 	J(15) 	;
+{9711.} 	 OH + C42OH = H3NCO2CHO + HO2 : 	3.53D-11 	;
+{9712.} 	 H3NCO2CHO = NMGLYOX + CO + HO2 + HO2 : 	J(15) 	;
+{9713.} 	 NO3 + H3NCO2CHO = HNO3 + CO + NMGLYOX + HO2 : 	KNO3AL 	;
+{9714.} 	 OH + H3NCO2CHO = CO + NMGLYOX + HO2 : 	2.46D-11 	;
+{9715.} 	 OH + HC3CO2H = CO + HO2 + HOCH2CHO : 	1.88D-11 	;
+{9716.} 	 HC3CO3H = HOCH2CHO + CO + HO2 + OH : 	J(41) 	;
+{9717.} 	 OH + HC3CO3H = HC3CO3 : 	2.23D-11 	;
+{9718.} 	 C4PAN7 = HC3CO3 + NO2 : 	KBPAN 	;
+{9719.} 	 OH + C4PAN7 = HOCH2CHO + CO + CO + NO2 : 	1.87D-11 	;
+{9720.} 	 GAOO + CO = HOCH2CHO : 	1.2D-15 	;
+{9721.} 	 GAOO + NO = HOCH2CHO + NO2 : 	1.0D-14 	;
+{9722.} 	 GAOO + NO2 = HOCH2CHO + NO3 : 	1.0D-15 	;
+{9723.} 	 GAOO + SO2 = HOCH2CHO + SO3 : 	7.0D-14 	;
+{9724.} 	 GAOO = HOCH2CHO + H2O2 : 	6.0D-18*H2O 	;
+{9725.} 	 GAOO = HOCH2CO2H : 	1.0D-17*H2O 	;
+{9726.} 	 C41OOH = C41O + OH : 	J(41) 	;
+{9727.} 	 OH + C41OOH = H13CO2CHO + OH : 	1.39D-10 	;
+{9728.} 	 OH + C41NO3 = H13CO2CHO + NO2 : 	2.50D-11 	;
+{9729.} 	 C41O = GLYOX + HOCH2CHO + HO2 : 	KDEC 	;
+{9730.} 	 C41OH = HOCH2CHO + GLYOX + HO2 + HO2 : 	J(15) 	;
+{9731.} 	 OH + C41OH = H13CO2CHO + HO2 : 	6.59D-11 	;
+{9732.} 	 H13CO2CHO = HOCH2CHO + CO + HO2 + HO2 : 	J(15) 	;
+{9733.} 	 NO3 + H13CO2CHO = H13CO2CO3 + HNO3 : 	KNO3AL*4.0 	;
+{9734.} 	 OH + H13CO2CHO = H13CO2CO3 : 	2.66D-11 	;
+{9735.} 	 HMGLOO + CO = HOCH2COCHO : 	1.20D-15 	;
+{9736.} 	 HMGLOO + NO = HOCH2COCHO + NO2 : 	1.00D-14 	;
+{9737.} 	 HMGLOO + NO2 = HOCH2COCHO + NO3 : 	1.00D-15 	;
+{9738.} 	 HMGLOO + SO2 = HOCH2COCHO + SO3 : 	7.00D-14 	;
+{9739.} 	 HMGLOO = HOCH2COCHO + H2O2 : 	6.00D-18*H2O 	;
+{9740.} 	 HMGLOO = HOCH2COCO2H : 	1.00D-17*H2O 	;
+{9741.} 	 MVKOHAOOH + OH = H13CO2CHO + OH : 	5.98D-11 	;
+{9742.} 	 MVKOHAOOH = MVKOHAO + OH : 	J(41)+J(22) 	;
+{9743.} 	 MVKOHANO3 + OH = H13CO2CHO + NO2 : 	4.37D-12 	;
+{9744.} 	 MVKOHAO = HOCH2COCHO + HCHO + HO2 : 	KDEC 	;
+{9745.} 	 MVKOHAOH + OH = H13CO2CHO + HO2 : 	2.10D-11 	;
+{9746.} 	 MVKOHAOH = HOCH2CO3 + HOCH2CHO + HO2 : 	J(22) 	;
+{9747.} 	 MVKOHBOOH + OH = H14CO23C4 + OH : 	4.39D-12 	;
+{9748.} 	 MVKOHBOOH = HOCH2CHO + HOCH2CO3 + OH : 	J(22) 	;
+{9749.} 	 MVKOHBOOH = MVKOHBO + OH : 	J(41) 	;
+{9750.} 	 MVKOHBO = HOCH2CHO + HOCH2CO3 : 	KDEC 	;
+{9751.} 	 H14CO23C4 + OH = H1CO23CHO + HO2 : 	4.44D-12 	;
+{9752.} 	 H14CO23C4 = HOCH2CO3 + HOCH2CO3 : 	J(35) 	;
+{9753.} 	 HC3CCO3H = HO2 + ACR + OH : 	J(41) 	;
+{9754.} 	 OH + HC3CCO3H = HC3CCO3 : 	4.42D-11 	;
+{9755.} 	 C4PAN8 = HC3CCO3 + NO2 : 	KBPAN 	;
+{9756.} 	 OH + C4PAN8 = ACR + CO + NO2 : 	4.06D-11 	;
+{9757.} 	 NC3OO + CO = NOA : 	1.2D-15 	;
+{9758.} 	 NC3OO + NO = NOA + NO2 : 	1.0D-14 	;
+{9759.} 	 NC3OO + NO2 = NOA + NO3 : 	1.0D-15 	;
+{9760.} 	 NC3OO + SO2 = NOA + SO3 : 	7.0D-14 	;
+{9761.} 	 NC3OO = NOA + H2O2 : 	6.0D-18*H2O 	;
+{9762.} 	 INCOOH = INCO + OH : 	J(41) 	;
+{9763.} 	 OH + INCOOH = INCCO + OH : 	3.31D-11*0.89 	;
+{9764.} 	 OH + INCOOH = INCO2 : 	3.31D-11*0.11 	;
+{9765.} 	 OH + INCNO3 = INCCO + NO2 : 	1.98D-12*0.445 	;
+{9766.} 	 OH + INCNO3 = INCNCHO + HO2 : 	1.98D-12*0.414 	;
+{9767.} 	 OH + INCNO3 = NOA + HOCH2CHO + NO2 : 	1.98D-12*0.141 	;
+{9768.} 	 INCO = NOA + HO2 + HOCH2CHO : 	KDEC 	;
+{9769.} 	 OH + INCCO = INCGLYOX + HO2 : 	3.30D-12 	;
+{9770.} 	 OH + INCOH = INCCO + HO2 : 	1.53D-11 	;
+{9771.} 	 OH + NC4CO2H = NOA + CO + HO2 : 	2.16D-11 	;
+{9772.} 	 NC4CO3H = NOA + CO + HO2 + OH : 	J(41) 	;
+{9773.} 	 OH + NC4CO3H = NC4CO3 : 	2.52D-11 	;
+{9774.} 	 C5PAN18 = NC4CO3 + NO2 : 	KBPAN 	;
+{9775.} 	 OH + C5PAN18 = NOA + CO + CO + NO2 : 	2.16D-11 	;
+{9776.} 	 NOAOO + CO = NOA : 	1.2D-15 	;
+{9777.} 	 NOAOO + NO = NOA + NO2 : 	1.0D-14 	;
+{9778.} 	 NOAOO + NO2 = NOA + NO3 : 	1.0D-15 	;
+{9779.} 	 NOAOO + SO2 = NOA + SO3 : 	7.0D-14 	;
+{9780.} 	 NOAOO = NOA + H2O2 : 	6.0D-18*H2O 	;
+{9781.} 	 C510OOH = C510O + OH : 	J(41) 	;
+{9782.} 	 OH + C510OOH = C510O2 : 	2.81D-11 	;
+{9783.} 	 C510O = NOA + GLYOX + HO2 : 	KDEC 	;
+{9784.} 	 OH + C510OH = C510O : 	2.69D-11 	;
+{9785.} 	 IEACHO = HMVKBO2 + CO + HO2 : 	J(17) 	;
+{9786.} 	 NO3 + IEACHO = IEACO3 + HNO3 : 	KNO3AL*7.5 	;
+{9787.} 	 OH + IEACHO = IEACO3 : 	2.20D-11 	;
+{9788.} 	 NC2OO + CO = NO3CH2CHO : 	1.2D-15 	;
+{9789.} 	 NC2OO + NO = NO3CH2CHO + NO2 : 	1.0D-14 	;
+{9790.} 	 NC2OO + NO2 = NO3CH2CHO + NO3 : 	1.0D-15 	;
+{9791.} 	 NC2OO + SO2 = NO3CH2CHO + SO3 : 	7.0D-14 	;
+{9792.} 	 NC2OO = NO3CH2CHO + H2O2 : 	6.0D-18*H2O 	;
+{9793.} 	 NC2OO = NO3CH2CO2H : 	1.0D-17*H2O 	;
+{9794.} 	 ACLOO + CO = ACETOL : 	1.2D-15 	;
+{9795.} 	 ACLOO + NO = ACETOL + NO2 : 	1.0D-14 	;
+{9796.} 	 ACLOO + NO2 = ACETOL + NO3 : 	1.0D-15 	;
+{9797.} 	 ACLOO + SO2 = ACETOL + SO3 : 	7.0D-14 	;
+{9798.} 	 ACLOO = ACETOL + H2O2 : 	6.0D-18*H2O 	;
+{9799.} 	 INAOOH = INAO + OH : 	J(41) 	;
+{9800.} 	 OH + INAOOH = INAHPCHO + HO2 : 	1.01D-11*0.65 	;
+{9801.} 	 OH + INAOOH = INAO2 : 	1.01D-11*0.35 	;
+{9802.} 	 OH + INANO3 = ACETOL + NO2 + NO3CH2CHO : 	2.00D-12*0.07 	;
+{9803.} 	 OH + INANO3 = C58NO3 + NO2 : 	2.00D-12*0.39 	;
+{9804.} 	 OH + INANO3 = HCHO + NO2 + HMVKANO3 : 	2.00D-12*0.07 	;
+{9805.} 	 OH + INANO3 = INANCHO + HO2 : 	2.00D-12*0.33 	;
+{9806.} 	 OH + INANO3 = INANCO + HO2 : 	2.00D-12*0.14 	;
+{9807.} 	 INAO = ACETOL + NO3CH2CHO + HO2 : 	KDEC 	;
+{9808.} 	 OH + INAOH = INAHCHO + HO2 : 	6.68D-12 	;
+{9809.} 	 C524OOH + OH = C524CO + OH : 	1.18D-10*0.22 	;
+{9810.} 	 C524OOH + OH = C524O2 : 	1.18D-10*0.03 	;
+{9811.} 	 C524OOH + OH = HIEPOXB + OH : 	1.18D-10*0.75 	;
+{9812.} 	 C524OOH = C524O + OH : 	J(41) 	;
+{9813.} 	 C524NO3 + OH = C524O + NO2 : 	J(54) 	;
+{9814.} 	 C524NO3 + OH = NC524O2 : 	2.94D-11 	;
+{9815.} 	 C524O = HMACR + HCHO + HO2 : 	KDEC 	;
+{9816.} 	 C524CO + OH = C525O2 : 	4.21D-11 	;
+{9817.} 	 C524CO = HOCH2CO3 + HOCH2CO3 + HCHO : 	J(24) 	;
+{9818.} 	 C524OH + OH = C524CO + HO2 : 	7.78D-11 	;
+{9819.} 	 OH + HC4ACO2H = ACETOL + CO + HO2 : 	2.52D-11 	;
+{9820.} 	 HC4ACO3H = ACETOL + CO + HO2 + OH : 	J(41) 	;
+{9821.} 	 OH + HC4ACO3H = HC4ACO3 : 	2.88D-11 	;
+{9822.} 	 C5PAN17 = HC4ACO3 + NO2 : 	KBPAN 	;
+{9823.} 	 OH + C5PAN17 = MACROH + CO + NO2 : 	2.52D-11 	;
+{9824.} 	 C58OOH = C58O + OH : 	J(41) 	;
+{9825.} 	 OH + C58OOH = C58O2 : 	3.16D-11 	;
+{9826.} 	 C58NO3 = HO2 + CO + MACRNO3 + HO2 : 	J(15) 	;
+{9827.} 	 OH + C58NO3 = C58NO3CO3 : 	2.32D-11 	;
+{9828.} 	 C58O = ACETOL + GLYOX + HO2 : 	KDEC 	;
+{9829.} 	 OH + C58OH = C58O : 	3.04D-11 	;
+{9830.} 	 IEB1O2 + HO2 = IEB1OOH : 	KRO2HO2*0.706 	;
+{9831.} 	 IEB1O2 + NO = IEB1O + NO2 : 	KRO2NO 	;
+{9832.} 	 IEB1O2 + NO3 = IEB1O + NO2 : 	KRO2NO3 	;
+{9833.} 	 IEB1O2 = IEB1O : 	9.20D-14*RO2 	;
+{9834.} 	 IEB2O2 + HO2 = IEB2OOH : 	KRO2HO2*0.706 	;
+{9835.} 	 IEB2O2 + NO = IEB2O + NO2 : 	KRO2NO 	;
+{9836.} 	 IEB2O2 + NO3 = IEB2O + NO2 : 	KRO2NO3 	;
+{9837.} 	 IEB2O2 = IEB2O : 	8.80D-13*RO2 	;
+{9838.} 	 MACRNOO + CO = MACRNO3 : 	1.2D-15 	;
+{9839.} 	 MACRNOO + NO = MACRNO3 + NO2 : 	1.0D-14 	;
+{9840.} 	 MACRNOO + NO2 = MACRNO3 + NO3 : 	1.0D-15 	;
+{9841.} 	 MACRNOO + SO2 = MACRNO3 + SO3 : 	7.0D-14 	;
+{9842.} 	 MACRNOO = MACRNCO2H : 	1.0D-17*H2O 	;
+{9843.} 	 MACRNOO = MACRNO3 + H2O2 : 	6.0D-18*H2O 	;
+{9844.} 	 CONM2CHO + OH = CONM2CO3 : 	6.78D-12 	;
+{9845.} 	 CONM2CHO = MGLYOX + NO2 + CO + HO2 : 	J(56)+J(57)*2 	;
+{9846.} 	 MACRNCO3 + HO2 = ACETOL + NO2 + OH : 	KAPHO2*0.44 	;
+{9847.} 	 MACRNCO3 + HO2 = MACRNCO2H + O3 : 	KAPHO2*0.15 	;
+{9848.} 	 MACRNCO3 + HO2 = MACRNCO3H : 	KAPHO2*0.41 	;
+{9849.} 	 MACRNCO3 + NO = ACETOL + NO2 + NO2 : 	KAPNO 	;
+{9850.} 	 MACRNCO3 + NO2 = MACRNPAN : 	KFPAN 	;
+{9851.} 	 MACRNCO3 + NO3 = ACETOL + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{9852.} 	 MACRNCO3 = ACETOL + NO2 : 	1.00D-11*0.7*RO2 	;
+{9853.} 	 MACRNCO3 = MACRNCO2H : 	1.00D-11*0.3*RO2 	;
+{9854.} 	 INB1OOH + OH = INB1CO + OH : 	1.27D-11*0.35 	;
+{9855.} 	 INB1OOH + OH = INB1HPCHO : 	1.27D-11*0.34 	;
+{9856.} 	 INB1OOH + OH = INB1O2 : 	1.27D-11*0.31 	;
+{9857.} 	 INB1OOH = INB1O + OH : 	J(41) 	;
+{9858.} 	 INB1NO3 + OH = INB1NACHO + HO2 : 	1.63D-12*0.50 	;
+{9859.} 	 INB1NO3 + OH = INB1NBCHO + HO2 : 	1.63D-12*0.50 	;
+{9860.} 	 INB1O = HOCH2CHO + ACETOL + NO2 : 	KDEC 	;
+{9861.} 	 INB1CO + OH = INB1GLYOX + HO2 : 	3.27D-12 	;
+{9862.} 	 INB1CO = ACETOL + NO2 + HOCH2CO3 : 	J(56)+J(57) 	;
+{9863.} 	 INB1OH + OH = C58NO3 + HO2 : 	6.65D-12*0.71 	;
+{9864.} 	 INB1OH + OH = INB1CO + HO2 : 	6.65D-12*0.29 	;
+{9865.} 	 INB2OOH + OH = C58NO3 + OH : 	1.59D-11*0.73 	;
+{9866.} 	 INB2OOH + OH = INB2O2 : 	1.59D-11*0.27 	;
+{9867.} 	 INB2OOH = INB2O + OH : 	J(41) 	;
+{9868.} 	 INB2O = C57NO3 + HO2 : 	KDEC 	;
+{9869.} 	 IEC1O2 + HO2 = IEC1OOH : 	KRO2HO2*0.706 	;
+{9870.} 	 IEC1O2 + NO = IEC1O + NO2 : 	KRO2NO 	;
+{9871.} 	 IEC1O2 + NO3 = IEC1O + NO2 : 	KRO2NO3 	;
+{9872.} 	 IEC1O2 = IEC1O : 	9.20D-14*RO2 	;
+{9873.} 	 IECCHO = MACRO2 + HO2 + CO : 	J(15) 	;
+{9874.} 	 NO3 + IECCHO = IECCO3 + HNO3 : 	KNO3AL*7.5 	;
+{9875.} 	 OH + IECCHO = IECCO3 : 	2.76D-11 	;
+{9876.} 	 OH + HC4CCO2H = CH3CO3 + HOCH2CHO : 	2.52D-11 	;
+{9877.} 	 HC4CCO3H = HOCH2CHO + CH3CO3 + OH : 	J(41) 	;
+{9878.} 	 OH + HC4CCO3H = HC4CCO3 : 	2.88D-11 	;
+{9879.} 	 C5PAN19 = HC4CCO3 + NO2 : 	KBPAN 	;
+{9880.} 	 OH + C5PAN19 = HO12CO3C4 + CO + NO2 : 	2.52D-11 	;
+{9881.} 	 C57OOH = C57O + OH : 	J(41) 	;
+{9882.} 	 OH + C57OOH = C57O2 : 	3.16D-11 	;
+{9883.} 	 C57O = MGLYOX + HOCH2CHO + HO2 : 	KDEC 	;
+{9884.} 	 OH + C57OH = C57O : 	3.04D-11 	;
+{9885.} 	 CO2N3CHO + OH = CO2N3CO3 : 	7.20D-12 	;
+{9886.} 	 CO2N3CHO = CO + HO2 + MGLYOX + NO2 : 	J(15) 	;
+{9887.} 	 NC4OO + CO = MVKNO3 : 	1.2D-15 	;
+{9888.} 	 NC4OO + NO = MVKNO3 + NO2 : 	1.0D-14 	;
+{9889.} 	 NC4OO + NO2 = MVKNO3 + NO3 : 	1.0D-15 	;
+{9890.} 	 NC4OO + SO2 = MVKNO3 + SO3 : 	7.0D-14 	;
+{9891.} 	 NC4OO = MVKNO3 + H2O2 : 	6.0D-18*H2O 	;
+{9892.} 	 INDOOH + OH = INDHPCHO + HO2 : 	9.20D-12*0.61 	;
+{9893.} 	 INDOOH + OH = INDO2 : 	9.20D-12*0.39 	;
+{9894.} 	 INDOOH = INDO + OH : 	J(41) 	;
+{9895.} 	 INDO = ACETOL + HOCH2CHO + NO2 : 	1.80D+13*(TEMP/298)**1.7*EXP(-4733/TEMP) 	;
+{9896.} 	 INDO = HCHO + HO2 + MVKNO3 : 	1.80D+13*(TEMP/298)**1.7*EXP(-4079/TEMP) 	;
+{9897.} 	 INDOH + OH = INDHCHO + HO2 : 	5.60D-12 	;
+{9898.} 	 C59OOH = C59O + OH : 	J(41) 	;
+{9899.} 	 C59OOH = HOCH2CO3 + ACETOL + OH : 	J(22) 	;
+{9900.} 	 OH + C59OOH = C59O2 : 	9.70D-12 	;
+{9901.} 	 C59O = ACETOL + HOCH2CO3 : 	KDEC 	;
+{9902.} 	 ALCOMOXOOH + OH = CHOCOMOXO2 : 	1.99D-11 	;
+{9903.} 	 ALCOMOXOOH = CHOCOMOXO + OH : 	J(41) 	;
+{9904.} 	 CHOCOMOXO = HCHO + HO2 + CO : 	KDEC 	;
+{9905.} 	 ACETMECO3H + OH = ACETMECO3 : 	4.55D-12 	;
+{9906.} 	 ACETMECO3H = METHACETO2 + OH : 	J(41) 	;
+{9907.} 	 ACETMEPAN + OH = METACETHO + CO + NO2 : 	9.55D-13 	;
+{9908.} 	 ACETMEPAN = ACETMECO3 + NO2 : 	KBPAN 	;
+{9909.} 	 HOACETEOOH + OH = HOACETETO2 : 	3.95D-11 	;
+{9910.} 	 HOACETEOOH = HOACETETO + OH : 	J(41) 	;
+{9911.} 	 HOACETETO = CH3CHO + HCHO + HO2 : 	KDEC 	;
+{9912.} 	 MECOACEOOH + OH = MECOACETO2 : 	3.59D-12 	;
+{9913.} 	 MECOACEOOH = MECOACETO + OH : 	J(41) 	;
+{9914.} 	 MECOACETO = CH3CO3 + HCHO : 	KDEC 	;
+{9915.} 	 ACPRONEOOH + OH = ACPRONEO2 : 	3.08D-11 	;
+{9916.} 	 ACPRONEOOH = ACPRONEO + OH : 	J(41) 	;
+{9917.} 	 ACPRONEO = METACETHO + CH3CO3 : 	KDEC 	;
+{9918.} 	 ACECOCOCH3 + OH = ACCOCOMEO2 : 	1.09D-13 	;
+{9919.} 	 ACECOCOCH3 = CH3CO3 + CH3CO3 : 	J(22) 	;
+{9920.} 	 ACPRONEOH + OH = ACECOCOCH3 + HO2 : 	2.23D-12 	;
+{9921.} 	 ACCOETOOH + OH = ACCOETO2 : 	5.15D-11 	;
+{9922.} 	 ACCOETOOH = ACCOETO + OH : 	J(41) 	;
+{9923.} 	 ACCOETO = ACCOMECHO + HO2 : 	KROPRIM*O2 	;
+{9924.} 	 ACETC2CO2H + OH = ACETC2H4O2 : 	6.39D-12 	;
+{9925.} 	 ACETC2CO3H + OH = ACETC2CO3 : 	9.94D-12 	;
+{9926.} 	 ACETC2CO3H = ACETC2H4O2 + OH : 	J(41) 	;
+{9927.} 	 ACETC2PAN + OH = ACETETCHO + CO + NO2 : 	5.53D-12 	;
+{9928.} 	 ACETC2PAN = ACETC2CO3 + NO2 : 	KBPAN 	;
+{9929.} 	 IPRACBCO2H + OH = ETHACETO2 : 	2.76D-12 	;
+{9930.} 	 IPRACBCO3H + OH = IPRACBCO3 : 	6.31D-12 	;
+{9931.} 	 IPRACBCO3H = ETHACETO2 + OH : 	J(41) 	;
+{9932.} 	 IPRACBPAN + OH = METHCOACET + CO + NO2 : 	2.72D-12 	;
+{9933.} 	 IPRACBPAN = IPRACBCO3 + NO2 : 	KBPAN 	;
+{9934.} 	 ACBUOAOOH + OH = ACBUONEAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9935.} 	 ACBUOAOOH + OH = ACCOPRONE + OH : 	1.58D-10 	;
+{9936.} 	 ACBUOAOOH = ACBUONEAO + OH : 	J(41)+J(22) 	;
+{9937.} 	 ACBUONANO3 + OH = ACCOPRONE + NO2 : 	2.47D-12 	;
+{9938.} 	 ACBUONANO3 = ACBUONEAO + NO2 : 	J(54) 	;
+{9939.} 	 ACBUONEAO = CO2C3CHO + CH3O2 : 	KDEC 	;
+{9940.} 	 ACBUONAOH + OH = ACCOPRONE + HO2 : 	4.21D-11 	;
+{9941.} 	 ACBUONAOH = ACEETOHO2 + CH3CO3 : 	J(22) 	;
+{9942.} 	 ACCOPRONE + OH = ACCOMCOMO2 : 	1.09D-13 	;
+{9943.} 	 ACCOPRONE = MECOACETO2 + CH3CO3 : 	J(22) 	;
+{9944.} 	 ACBUONBOOH + OH = ACBUONEBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9945.} 	 ACBUONBOOH + OH = ACCOCOC2H5 + OH : 	2.84D-11 	;
+{9946.} 	 ACBUONBOOH = ACBUONEBO + OH : 	J(41) 	;
+{9947.} 	 ACBUONBOOH = METACETHO + C2H5CO3 + OH : 	J(22) 	;
+{9948.} 	 ACBUONEBO = EGLYOX + CH3O2 : 	KDEC 	;
+{9949.} 	 ACBUONBOH + OH = ACCOCOC2H5 + HO2 : 	8.40D-12 	;
+{9950.} 	 ACBUONBOH = METACETHO + C2H5CO3 + HO2 : 	J(22) 	;
+{9951.} 	 ACCOCOC2H5 + OH = ACCOCOETO2 : 	1.27D-12 	;
+{9952.} 	 ACCOCOC2H5 = C2H5CO3 + CH3CO3 : 	J(22) 	;
+{9953.} 	 ACCOPROOH + OH = ACCOC3H6O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9954.} 	 ACCOPROOH + OH = ACCOPRONE + OH : 	1.05D-10 	;
+{9955.} 	 ACCOPROOH = ACCOC3H6O + OH : 	J(41) 	;
+{9956.} 	 ACCOC3H6O = ACCOPRONE + HO2 : 	KROSEC*O2 	;
+{9957.} 	 ACCOC3H6O = MECOACETO2 + CH3CHO : 	2.70D+14*EXP(-6543/TEMP) 	;
+{9958.} 	 SBUACCOOH + OH = SBUACONEO2 : 	4.33D-12 	;
+{9959.} 	 SBUACCOOH = METHCOACET + CH3CO3 + OH : 	J(22) 	;
+{9960.} 	 SBUACCOOH = SBUACONEO + OH : 	J(41) 	;
+{9961.} 	 SBUACONEO = METHCOACET + CH3CO3 : 	KDEC 	;
+{9962.} 	 SBUACCOH + OH = METHCOACET + CH3CO3 : 	7.79D-13 	;
+{9963.} 	 SBUACCOH = METHCOACET + CH3CO3 + HO2 : 	J(22) 	;
+{9964.} 	 TBUACCO3H + OH = TBUACCO3 : 	5.23D-12 	;
+{9965.} 	 TBUACCO3H = IPROACETO2 + OH : 	J(41) 	;
+{9966.} 	 TBUACPAN + OH = METHCOACET + HCHO + CO + NO2 : 	1.63D-12 	;
+{9967.} 	 TBUACPAN = TBUACCO3 + NO2 : 	KBPAN 	;
+{9968.} 	 ETHFORMO2 + HO2 = ETHFORMOOH : 	KRO2HO2*0.520*0.6 	;
+{9969.} 	 ETHFORMO2 + HO2 = METACETHO : 	KRO2HO2*0.520*0.4 	;
+{9970.} 	 ETHFORMO2 + NO = ETHFORMNO3 : 	KRO2NO*0.047 	;
+{9971.} 	 ETHFORMO2 + NO = ETHFORMO + NO2 : 	KRO2NO*0.953 	;
+{9972.} 	 ETHFORMO2 + NO3 = ETHFORMO + NO2 : 	KRO2NO3 	;
+{9973.} 	 ETHFORMO2 = ETHFORMO : 	8.80D-13*0.6*RO2 	;
+{9974.} 	 ETHFORMO2 = ETHFORMOH : 	8.80D-13*0.2*RO2 	;
+{9975.} 	 ETHFORMO2 = METACETHO : 	8.80D-13*0.2*RO2 	;
+{9976.} 	 MTBEAALOOH + OH = MTBEACHO13 + OH : 	1.44D-11 	;
+{9977.} 	 MTBEAALOOH + OH = MTBEACHOO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{9978.} 	 MTBEAALOOH = MTBEACHOO + OH : 	J(41) 	;
+{9979.} 	 MTBEAALNO3 + OH = MTBEACHO13 + NO2 : 	5.67D-13 	;
+{9980.} 	 MTBEAALNO3 = MTBEACHOO + NO2 : 	J(53) 	;
+{9981.} 	 MTBEACHOO = MTBEACHO13 + HO2 : 	KROPRIM*O2 	;
+{9982.} 	 MTBEACHO13 + NO3 = MTBEAALCO3 + HNO3 : 	KNO3AL*8.5 	;
+{9983.} 	 MTBEACHO13 + OH = MTBEAALCO3 : 	2.12D-11 	;
+{9984.} 	 MTBEACHO13 = CH3COCH3 + HCHO + HO2 + CO : 	J(17) 	;
+{9985.} 	 MTBEACHOHO + OH = MTBEACHO13 + HO2 : 	4.08D-13 	;
+{9986.} 	 IPRMEETO2 + HO2 = IPRMETOOH : 	KRO2HO2*0.625 	;
+{9987.} 	 IPRMEETO2 + NO = IPRMEETO + NO2 : 	KRO2NO 	;
+{9988.} 	 IPRMEETO2 + NO3 = IPRMEETO + NO2 : 	KRO2NO3 	;
+{9989.} 	 IPRMEETO2 = IPRMEETO : 	9.20D-14*0.7*RO2 	;
+{9990.} 	 IPRMEETO2 = IPRMEETOH : 	9.20D-14*0.3*RO2 	;
+{9991.} 	 MTBEBCO2H + OH = IPRMEETO2 : 	2.15D-12 	;
+{9992.} 	 MTBEBCO3H + OH = MTBEBCO3 : 	5.74D-12 	;
+{9993.} 	 MTBEBCO3H = IPRMEETO2 + OH : 	J(41) 	;
+{9994.} 	 MTBEBPAN + OH = METHACET + HCHO + CO + NO2 : 	2.15D-12 	;
+{9995.} 	 MTBEBPAN = MTBEBCO3 + NO2 : 	KBPAN 	;
+{9996.} 	 IPROC21OOH + OH = IPROACET + OH : 	2.00D-10 	;
+{9997.} 	 IPROC21OOH = IPROC21O + OH : 	J(41) 	;
+{9998.} 	 IPROC21NO3 + OH = IPROACET + NO2 : 	6.24D-12 	;
+{9999.} 	 IPROC21NO3 = IPROC21O + NO2 : 	J(54) 	;
+{10000.} 	 IPROC21O = IPROCHO + CH3O2 : 	KDEC 	;
+{10001.} 	 IPROC21OH + OH = IPROACET + HO2 : 	6.28D-11 	;
+{10002.} 	 IPROMCCO3H + OH = IPROMCCO3 : 	2.19D-11 	;
+{10003.} 	 IPROMCCO3H = IPROC21O2 + OH : 	J(41) 	;
+{10004.} 	 IPROMCPAN + OH = IPROACET + CO + NO2 : 	1.83D-11 	;
+{10005.} 	 IPROMCPAN = IPROMCCO3 + NO2 : 	KBPAN 	;
+{10006.} 	 EIPEOOH + OH = EIPEO2 : 	9.26D-12 	;
+{10007.} 	 EIPEOOH = EIPEO + OH : 	J(41) 	;
+{10008.} 	 EIPEO = ETHACET + CH3O2 : 	KDEC 	;
+{10009.} 	 EIPEOH + OH = EIPEO : 	5.70D-12 	;
+{10010.} 	 ETBEACO3H + OH = ETBEACO3 : 	6.57D-12 	;
+{10011.} 	 ETBEACO3H = EIPEO2 + OH : 	J(41) 	;
+{10012.} 	 ETBEAPAN + OH = ETHACET + HCHO + CO + NO2 : 	5.57D-12 	;
+{10013.} 	 ETBEAPAN = ETBEACO3 + NO2 : 	KBPAN 	;
+{10014.} 	 ETBECCO3H + OH = ETBECCO3 : 	1.09D-11 	;
+{10015.} 	 ETBECCO3H = MTBEAO2 + OH : 	J(41) 	;
+{10016.} 	 ETBECPAN + OH = MTBEACHO + CO + NO2 : 	7.32D-12 	;
+{10017.} 	 ETBECPAN = ETBECCO3 + NO2 : 	KBPAN 	;
+{10018.} 	 CHOOMCO3 + HO2 = CHOOCH2O2 + OH : 	KAPHO2*0.44 	;
+{10019.} 	 CHOOMCO3 + HO2 = CHOOMCO2H + O3 : 	KAPHO2*0.15 	;
+{10020.} 	 CHOOMCO3 + HO2 = CHOOMCO3H : 	KAPHO2*0.41 	;
+{10021.} 	 CHOOMCO3 + NO = CHOOCH2O2 + NO2 : 	KAPNO 	;
+{10022.} 	 CHOOMCO3 + NO2 = CHOOMPAN : 	KFPAN 	;
+{10023.} 	 CHOOMCO3 + NO3 = CHOOCH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{10024.} 	 CHOOMCO3 = CHOOCH2O2 : 	1.00D-11*0.7*RO2 	;
+{10025.} 	 CHOOMCO3 = CHOOMCO2H : 	1.00D-11*0.3*RO2 	;
+{10026.} 	 PRONFORMO2 + HO2 = PRNFORMOOH : 	KRO2HO2*0.625 	;
+{10027.} 	 PRONFORMO2 + NO = PRONFORMO + NO2 : 	KRO2NO 	;
+{10028.} 	 PRONFORMO2 + NO3 = PRONFORMO + NO2 : 	KRO2NO3 	;
+{10029.} 	 PRONFORMO2 = PRONFORMO : 	8.80D-13*RO2 	;
+{10030.} 	 PRCOOMCO3 + HO2 = PRCOOMCO3H : 	KAPHO2*0.56 	;
+{10031.} 	 PRCOOMCO3 + HO2 = PRCOOMO2 + OH : 	KAPHO2*0.44 	;
+{10032.} 	 PRCOOMCO3 + NO = PRCOOMO2 + NO2 : 	KAPNO 	;
+{10033.} 	 PRCOOMCO3 + NO2 = PRCOOMPAN : 	KFPAN 	;
+{10034.} 	 PRCOOMCO3 + NO3 = PRCOOMO2 + NO2 : 	KRO2NO3*1.74 	;
+{10035.} 	 PRCOOMCO3 = PRCOOMO2 : 	1.00D-11*RO2 	;
+{10036.} 	 PRCOOMO2 + HO2 = PRCOOMOOH : 	KRO2HO2*0.706 	;
+{10037.} 	 PRCOOMO2 + NO = PRCOOMO + NO2 : 	KRO2NO 	;
+{10038.} 	 PRCOOMO2 + NO3 = PRCOOMO + NO2 : 	KRO2NO3 	;
+{10039.} 	 PRCOOMO2 = PRCOOMO : 	2.00D-12*RO2 	;
+{10040.} 	 BOXCOCHOO2 + HO2 = BOXCOALOOH : 	KRO2HO2*0.770 	;
+{10041.} 	 BOXCOCHOO2 + NO = BOXCOCHOO + NO2 : 	KRO2NO 	;
+{10042.} 	 BOXCOCHOO2 + NO3 = BOXCOCHOO + NO2 : 	KRO2NO3 	;
+{10043.} 	 BOXCOCHOO2 = BOXCOCHOO : 	8.80D-13*RO2 	;
+{10044.} 	 BOXFORMO2 + HO2 = BUFORMOOH : 	KRO2HO2*0.625 	;
+{10045.} 	 BOXFORMO2 + NO = BUFORMO + NO2 : 	KRO2NO 	;
+{10046.} 	 BOXFORMO2 + NO3 = BUFORMO + NO2 : 	KRO2NO3 	;
+{10047.} 	 BOXFORMO2 = BUFORMO : 	8.80D-13*0.6*RO2 	;
+{10048.} 	 BOXFORMO2 = BUOHFORM : 	8.80D-13*0.2*RO2 	;
+{10049.} 	 BOXFORMO2 = PRCOFORM : 	8.80D-13*0.2*RO2 	;
+{10050.} 	 PRONOCOPO2 + HO2 = PRNOCOPOOH : 	KRO2HO2*0.820 	;
+{10051.} 	 PRONOCOPO2 + NO = PRONOCOPO + NO2 : 	KRO2NO 	;
+{10052.} 	 PRONOCOPO2 + NO3 = PRONOCOPO + NO2 : 	KRO2NO3 	;
+{10053.} 	 PRONOCOPO2 = PRONOCOPO : 	8.80D-13*RO2 	;
+{10054.} 	 BOXCOOLOOH + OH = BOXCOEOLO2 : 	5.29D-11 	;
+{10055.} 	 BOXCOOLOOH = BOXCOEOLO + OH : 	J(41) 	;
+{10056.} 	 BOXCOEOLO = C3H7CHO + CH3CHO + HO2 : 	KDEC 	;
+{10057.} 	 BOXCOCOMO2 + HO2 = BOX2COMOOH : 	KRO2HO2*0.820 	;
+{10058.} 	 BOXCOCOMO2 + NO = BOXCOCOMO + NO2 : 	KRO2NO 	;
+{10059.} 	 BOXCOCOMO2 + NO3 = BOXCOCOMO + NO2 : 	KRO2NO3 	;
+{10060.} 	 BOXCOCOMO2 = BOXCOCOMO : 	8.80D-13*RO2 	;
+{10061.} 	 BRETO2H + OH = CH2BRO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10062.} 	 BRETO3H + OH = BRETO3 : 	3.79D-12 	;
+{10063.} 	 BRETO3H = CH2BRO2 + OH : 	J(41) 	;
+{10064.} 	 BRETPAN + OH = CHOBR + CO + NO2 : 	5.56D-13 	;
+{10065.} 	 BRETPAN = BRETO3 + NO2 : 	KBPAN 	;
+{10066.} 	 HOCO3C4OOH + OH = HO1CO3C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10067.} 	 HOCO3C4OOH + OH = HO1CO3CHO + OH : 	2.16D-11 	;
+{10068.} 	 HOCO3C4OOH = HO1CO3C4O + OH : 	J(41)+J(22) 	;
+{10069.} 	 HO1CO3C4O = HOC2H4CO3 + HCHO : 	KDEC 	;
+{10070.} 	 HO14CO2C4 + OH = HO1CO3CHO + HO2 : 	1.57D-11 	;
+{10071.} 	 HO14CO2C4 = HOCH2CO3 + HOCH2CH2O2 : 	J(22) 	;
+{10072.} 	 HO1CO3CHO + NO3 = HOC2H4CO3 + CO + HNO3 : 	KNO3AL*4.0 	;
+{10073.} 	 HO1CO3CHO + OH = HOC2H4CO3 + CO : 	2.56D-11 	;
+{10074.} 	 HO1CO3CHO = HOC2H4CO3 + HO2 + CO : 	J(34) 	;
+{10075.} 	 BIACETOOH = BIACETO + OH : 	J(41)+J(35) 	;
+{10076.} 	 OH + BIACETOOH = BIACETO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10077.} 	 OH + BIACETOOH = CO23C3CHO + OH : 	5.99D-12 	;
+{10078.} 	 BIACETO = CH3CO3 + HCHO + CO : 	KDEC 	;
+{10079.} 	 HOCO4C5OOH + OH = HO2CO4C5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10080.} 	 HOCO4C5OOH + OH = HO2CO4CHO + OH : 	3.67D-11 	;
+{10081.} 	 HOCO4C5OOH = HO2CO4C5O + OH : 	J(41)+J(22) 	;
+{10082.} 	 HO2CO4C5O = CO2C3CO3 + HCHO : 	KDEC 	;
+{10083.} 	 HO14CO2C5 + OH = HO1CO24C5 + HO2 : 	3.06D-11 	;
+{10084.} 	 HO14CO2C5 = IPROPOLO2 + HOCH2CO3 : 	J(22) 	;
+{10085.} 	 HO2CO4CHO + OH = CO24C4CHO + HO2 : 	3.02D-11 	;
+{10086.} 	 HO2CO4CHO = HO2C3CO3 + HO2 + CO : 	J(34) 	;
+{10087.} 	 CO23C54OOH + OH = CO23C54O2 : 	2.24D-11 	;
+{10088.} 	 CO23C54OOH = CO23C54O + OH : 	J(41)+J(35) 	;
+{10089.} 	 CO23C54O = CH3CHO + CH3CO3 + CO : 	KDEC 	;
+{10090.} 	 HOCO3C5OOH + OH = HOCO3C54O2 : 	3.57D-11 	;
+{10091.} 	 HOCO3C5OOH = CH3CHO + HOC2H4CO3 + OH : 	J(22) 	;
+{10092.} 	 HOCO3C5OOH = HOCO3C54O + OH : 	J(41) 	;
+{10093.} 	 HOCO3C54O = CH3CHO + HOC2H4CO3 : 	KDEC 	;
+{10094.} 	 HO14CO3C5 + OH = HO1CO34C5 + HO2 : 	1.88D-11 	;
+{10095.} 	 HO14CO3C5 = CH3CHO + HOC2H4CO3 : 	J(22) 	;
+{10096.} 	 HO1CO34C5 = CH3CO3 + HOC2H4CO3 : 	J(35) 	;
+{10097.} 	 OH + HO1CO34C5 = CO23C4CHO + HO2 : 	1.39D-11 	;
+{10098.} 	 C53OOH = C53O + OH : 	J(41) 	;
+{10099.} 	 C53OOH = HCHO + HOIPRCO3 + OH : 	J(22) 	;
+{10100.} 	 OH + C53OOH = C53O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10101.} 	 OH + C53OOH = HOIPRGLYOX + OH : 	3.26D-11 	;
+{10102.} 	 C53O = HCHO + HOIPRCO3 : 	KDEC 	;
+{10103.} 	 C53OH = HCHO + HOIPRCO3 + HO2 : 	J(22) 	;
+{10104.} 	 OH + C53OH = HOIPRGLYOX + HO2 : 	1.72D-11 	;
+{10105.} 	 HOIPRGLYOX = HOIPRCO3 + CO + HO2 : 	J(34) 	;
+{10106.} 	 OH + HOIPRGLYOX = HOIPRCO3 + CO : 	2.72D-11 	;
+{10107.} 	 C41CO2H = CH3CO3 + C2H5O2 : 	J(22) 	;
+{10108.} 	 OH + C41CO2H = MEKBO2 : 	4.00D-12 	;
+{10109.} 	 C41CO3H = CH3CO3 + C2H5CO3 : 	J(22) 	;
+{10110.} 	 C41CO3H = MEKBO2 + OH : 	J(41) 	;
+{10111.} 	 OH + C41CO3H = C41CO3 : 	7.56D-12 	;
+{10112.} 	 C5PAN7 = C41CO3 + NO2 : 	KBPAN 	;
+{10113.} 	 OH + C5PAN7 = BIACET + CO + NO2 : 	3.96D-12 	;
+{10114.} 	 CO2HOC6OOH + OH = CO2HOC61O2 : 	4.93D-11 	;
+{10115.} 	 CO2HOC6OOH = CO2HOC61O + OH : 	J(41)+J(22) 	;
+{10116.} 	 CO2HOC61O = HO3C4CO3 + HCHO : 	KDEC 	;
+{10117.} 	 CO24C6OOH + OH = CO235C6 + OH : 	1.93D-11 	;
+{10118.} 	 CO24C6OOH + OH = CO24C6O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10119.} 	 CO24C6OOH = CH3CHO + CO2C3CO3 : 	J(22) 	;
+{10120.} 	 CO24C6OOH = CO24C6O + OH : 	J(22)+J(41) 	;
+{10121.} 	 CO24C6O = CO2C3CO3 + CH3CHO : 	KDEC 	;
+{10122.} 	 CO25C6OOH = CH3CO3 + CO2C3CHO + OH : 	J(22)*2 	;
+{10123.} 	 CO25C6OOH = CO25C6O + OH : 	J(41) 	;
+{10124.} 	 OH + CO25C6OOH = CO235C6 + OH : 	5.42D-11 	;
+{10125.} 	 CO25C6O = CO2C3CHO + CH3CO3 : 	KDEC 	;
+{10126.} 	 CO235C6 = CH3CO3 + CH3COCH2O2 + CO : 	J(22) 	;
+{10127.} 	 CO235C6 = CH3CO3 + CO2C3CO3 : 	J(35) 	;
+{10128.} 	 OH + CO235C6 = C62O2 : 	7.29D-13 	;
+{10129.} 	 CO25C6OH = CH3CO3 + CO2C3CHO + HO2 : 	J(22)*2 	;
+{10130.} 	 OH + CO25C6OH = CO235C6 + HO2 : 	2.29D-11 	;
+{10131.} 	 HO2C4OOH = HO2C4O + OH : 	J(41) 	;
+{10132.} 	 OH + HO2C4OOH = HO2C3CHO + OH : 	1.97D-11 	;
+{10133.} 	 OH + HO2C4OOH = HO2C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10134.} 	 HO2C4NO3 = HO2C4O + NO2 : 	J(53) 	;
+{10135.} 	 OH + HO2C4NO3 = HO2C3CHO + NO2 : 	8.93D-12 	;
+{10136.} 	 HO2C4O = HO13C4O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{10137.} 	 HO2C4O = HO2C3CHO + HO2 : 	KROPRIM*O2 	;
+{10138.} 	 C61OOH = C61O + OH : 	J(41)+J(22) 	;
+{10139.} 	 OH + C61OOH = C61CO + OH : 	9.12D-11 	;
+{10140.} 	 C61NO3 = C61O + NO2 : 	J(54)+J(22) 	;
+{10141.} 	 OH + C61NO3 = C61CO + NO2 : 	2.04D-12 	;
+{10142.} 	 C61O = CO2C3CHO + CH3CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{10143.} 	 C61CO = CO2C3CO3 + CH3CHO + HO2 : 	J(22)*2 	;
+{10144.} 	 OH + C61CO = CO235C6 + HO2 : 	6.03D-12 	;
+{10145.} 	 C61OH = C61O + HO2 : 	J(22) 	;
+{10146.} 	 OH + C61OH = C61CO + HO2 : 	4.22D-11 	;
+{10147.} 	 CO23C65OOH + OH = CO23C65O2 : 	1.06D-10 	;
+{10148.} 	 CO23C65OOH = CO23C65O + OH : 	J(35)+J(41) 	;
+{10149.} 	 CO23C65O = CH3CHO + BIACETO2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{10150.} 	 CO23C65O = CO235C6 + HO2 : 	KROSEC*O2 	;
+{10151.} 	 C6CO3OHOOH + OH = C6CO23HO5 + OH : 	4.67D-11 	;
+{10152.} 	 C6CO3OHOOH + OH = C6CO3OH5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10153.} 	 C6CO3OHOOH = C6CO3OH5O + OH : 	J(41)+J(22) 	;
+{10154.} 	 C6CO3OH5O = CH3CHO + HO2C3CO3 : 	KDEC 	;
+{10155.} 	 C6CO23HO5 + OH = CO235C6 + HO2 : 	2.86D-11 	;
+{10156.} 	 C6CO23HO5 = HO2C3CO3 + CH3CO3 : 	J(35) 	;
+{10157.} 	 C6CO3HO25 + OH = C61CO + HO2 : 	3.38D-11 	;
+{10158.} 	 C6CO3HO25 = IPROPOLO2 + CH3CHOHCO3 : 	J(22) 	;
+{10159.} 	 C6CO34OOH + OH = C6CO34O2 : 	2.36D-11 	;
+{10160.} 	 C6CO34OOH = C6CO34O + OH : 	J(41)+J(35) 	;
+{10161.} 	 C6CO34O = CH3CHO + C2H5CO3 + CO : 	KDEC 	;
+{10162.} 	 C6HOCOOOH + OH = C6CO34HO1 + OH : 	4.05D-11 	;
+{10163.} 	 C6HOCOOOH + OH = C6HO1CO3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10164.} 	 C6HOCOOOH = C2H5CHO + HOC2H4CO3 + OH : 	J(22) 	;
+{10165.} 	 C6HOCOOOH = C6HO1CO3O + OH : 	J(41) 	;
+{10166.} 	 C6HO1CO3O = C2H5CHO + HOC2H4CO3 : 	KDEC 	;
+{10167.} 	 C6CO34HO1 + OH = C6CO134 + HO2 : 	1.46D-11 	;
+{10168.} 	 C6CO34HO1 = C2H5CO3 + HOC2H4CO3 : 	J(35) 	;
+{10169.} 	 C6CO3HO14 + OH = C6CO34HO1 + HO2 : 	2.34D-11 	;
+{10170.} 	 C6CO3HO14 = C2H5CHO + HOC2H4CO3 + HO2 : 	J(22) 	;
+{10171.} 	 C3COCCO3H + OH = C3COCCO3 : 	8.77D-12 	;
+{10172.} 	 C3COCCO3H = PEN2ONE1O2 + OH : 	J(41) 	;
+{10173.} 	 C3COCPAN + OH = PGLYOX + CO + NO2 : 	5.18D-12 	;
+{10174.} 	 C3COCPAN = C3COCCO3 + NO2 : 	KBPAN 	;
+{10175.} 	 PE2ONE1OOH + OH = PEN2ONE1O2 : 	1.66D-11 	;
+{10176.} 	 PE2ONE1OOH = PEN2ONE1O + OH : 	J(41) 	;
+{10177.} 	 MIBK3COOOH + OH = MIBK3COO2 : 	4.97D-12 	;
+{10178.} 	 MIBK3COOOH = MIBK3COO + OH : 	J(41)+J(34) 	;
+{10179.} 	 MIBK3COO = CH3COCH3 + CH3CO3 + CO : 	KDEC 	;
+{10180.} 	 C612OOH = C612O + OH : 	J(41)+J(22) 	;
+{10181.} 	 OH + C612OOH = C612O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10182.} 	 OH + C612OOH = HM22COCHO + OH : 	2.21D-11 	;
+{10183.} 	 C612O = HM22CO3 + HCHO : 	KDEC 	;
+{10184.} 	 C612OH = C612O + HO2 : 	J(22) 	;
+{10185.} 	 OH + C612OH = HM22COCHO + HO2 : 	1.60D-11 	;
+{10186.} 	 HM22COCHO = HM22CO3 + CO + HO2 : 	J(34) 	;
+{10187.} 	 OH + HM22COCHO = HM22CO3 + CO : 	1.41D-11 	;
+{10188.} 	 OH + CO2M33CO2H = MIPKAO2 : 	1.41D-12 	;
+{10189.} 	 CO2M33CO3H = MIPKAO2 + OH : 	J(41) 	;
+{10190.} 	 OH + CO2M33CO3H = CO2M33CO3 : 	4.98D-12 	;
+{10191.} 	 C6PAN16 = CO2M33CO3 + NO2 : 	KBPAN 	;
+{10192.} 	 OH + C6PAN16 = BIACET + HCHO + CO + NO2 : 	1.38D-12 	;
+{10193.} 	 C6COCHOOOH + OH = C6COCHOO2 : 	9.13D-11 	;
+{10194.} 	 C6COCHOOOH = C6COCHOO + OH : 	J(41)+J(15)+J(22) 	;
+{10195.} 	 C6COCHOO = C6CODIAL + HO2 : 	KROPRIM*O2 	;
+{10196.} 	 C6CODIAL + NO3 = C6COCHOCO3 + HNO3 : 	2*KNO3AL*5.5 	;
+{10197.} 	 C6CODIAL + OH = C6COCHOCO3 : 	9.78D-11 	;
+{10198.} 	 C6CODIAL = C5COCHOO2 + HO2 + CO : 	J(15)*2 	;
+{10199.} 	 C6CODIAL = CHOC2H4O2 + HCOCH2CO3 : 	J(22) 	;
+{10200.} 	 C6COHOCHO + OH = C6CODIAL + HO2 : 	8.07D-11 	;
+{10201.} 	 C6COHOCHO = HCOCH2CO3 + HO1C3O2 : 	J(22)+J(15) 	;
+{10202.} 	 CY6COCOOOH + OH = CY6DIONO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10203.} 	 CY6COCOOOH + OH = CY6TRION + OH : 	4.63D-10 	;
+{10204.} 	 CY6COCOOOH = CY6DIONO + OH : 	J(41) 	;
+{10205.} 	 CY6DIONO = CY6TRION + HO2 : 	KROSEC*O2 	;
+{10206.} 	 CY6DIONO = CY6TRIONO2 : 	2.70D+14*EXP(-7398/TEMP) 	;
+{10207.} 	 CY6DIONOH + OH = CY6TRION + HO2 : 	1.22D-10 	;
+{10208.} 	 CY6DIONOH = ACR + CO + VINOH : 	J(22) 	;
+{10209.} 	 CY6TRION + OH = C6CYTONO2 : 	1.45D-12 	;
+{10210.} 	 CY6TRION = C3H6 + CO + CO + CO : 	J(22)*3 	;
+{10211.} 	 PINALO2 + HO2 = PINALOOH : 	KRO2HO2*0.914 	;
+{10212.} 	 PINALO2 + NO = PINALNO3 : 	KRO2NO*0.050 	;
+{10213.} 	 PINALO2 + NO = PINALO + NO2 : 	KRO2NO*0.950 	;
+{10214.} 	 PINALO2 + NO3 = PINALO + NO2 : 	KRO2NO3 	;
+{10215.} 	 PINALO2 = PINALO : 	6.70D-15*0.7*RO2 	;
+{10216.} 	 PINALO2 = PINALOH : 	6.70D-15*0.3*RO2 	;
+{10217.} 	 NC101OOH + OH = NC101O2 : 	5.94D-12 	;
+{10218.} 	 NC101OOH = NC101O + OH : 	J(41) 	;
+{10219.} 	 NC101O = NC102O2 : 	KDEC 	;
+{10220.} 	 PERPINONIC + OH = C96CO3 : 	9.73D-12 	;
+{10221.} 	 PERPINONIC = C96O2 + OH : 	J(41)+J(22) 	;
+{10222.} 	 C10PAN2 + OH = NORPINAL + CO + NO2 : 	3.66D-12 	;
+{10223.} 	 C10PAN2 = C96CO3 + NO2 : 	KBPAN 	;
+{10224.} 	 C108O2 + HO2 = C108OOH : 	KRO2HO2*0.914 	;
+{10225.} 	 C108O2 + NO = C108NO3 : 	KRO2NO*0.125 	;
+{10226.} 	 C108O2 + NO = C108O + NO2 : 	KRO2NO*0.875 	;
+{10227.} 	 C108O2 + NO3 = C108O + NO2 : 	KRO2NO3 	;
+{10228.} 	 C108O2 = C108O : 	6.70D-15*0.7*RO2 	;
+{10229.} 	 C108O2 = C108OH : 	6.70D-15*0.3*RO2 	;
+{10230.} 	 C89CO3 + HO2 = C89CO2 + OH : 	KAPHO2*0.44 	;
+{10231.} 	 C89CO3 + HO2 = C89CO2H + O3 : 	KAPHO2*0.15 	;
+{10232.} 	 C89CO3 + HO2 = C89CO3H : 	KAPHO2*0.41 	;
+{10233.} 	 C89CO3 + NO = C89CO2 + NO2 : 	KAPNO 	;
+{10234.} 	 C89CO3 + NO2 = C89PAN : 	KFPAN 	;
+{10235.} 	 C89CO3 + NO3 = C89CO2 + NO2 : 	KRO2NO3*1.74 	;
+{10236.} 	 C89CO3 = C89CO2 : 	1.00D-11*RO2*0.7 	;
+{10237.} 	 C89CO3 = C89CO2H : 	1.00D-11*RO2*0.3 	;
+{10238.} 	 C920CO3 + HO2 = C920CO3H : 	KAPHO2*0.41 	;
+{10239.} 	 C920CO3 + HO2 = C920O2 + OH : 	KAPHO2*0.44 	;
+{10240.} 	 C920CO3 + HO2 = HOPINONIC + O3 : 	KAPHO2*0.15 	;
+{10241.} 	 C920CO3 + NO = C920O2 + NO2 : 	KAPNO 	;
+{10242.} 	 C920CO3 + NO2 = C920PAN : 	KFPAN 	;
+{10243.} 	 C920CO3 + NO3 = C920O2 + NO2 : 	KRO2NO3*1.74 	;
+{10244.} 	 C920CO3 = C920O2 : 	1.00D-11*RO2*0.7 	;
+{10245.} 	 C920CO3 = HOPINONIC : 	1.00D-11*RO2*0.3 	;
+{10246.} 	 C920O2 + HO2 = C920OOH : 	KRO2HO2*0.890 	;
+{10247.} 	 C920O2 + NO = C920O + NO2 : 	KRO2NO 	;
+{10248.} 	 C920O2 + NO3 = C920O + NO2 : 	KRO2NO3 	;
+{10249.} 	 C920O2 = C920O : 	1.30D-12*RO2 	;
+{10250.} 	 C97O2 + HO2 = C97OOH : 	KRO2HO2*0.890 	;
+{10251.} 	 C97O2 + NO = C97O + NO2 : 	KRO2NO 	;
+{10252.} 	 C97O2 + NO3 = C97O + NO2 : 	KRO2NO3 	;
+{10253.} 	 C97O2 = C97O : 	6.70D-15*0.7*RO2 	;
+{10254.} 	 C97O2 = C97OH : 	6.70D-15*0.3*RO2 	;
+{10255.} 	 C85CO3 + HO2 = C85CO3H : 	KAPHO2*0.56 	;
+{10256.} 	 C85CO3 + HO2 = C85O2 + OH : 	KAPHO2*0.44 	;
+{10257.} 	 C85CO3 + NO = C85O2 + NO2 : 	KAPNO 	;
+{10258.} 	 C85CO3 + NO2 = C9PAN2 : 	KFPAN 	;
+{10259.} 	 C85CO3 + NO3 = C85O2 + NO2 : 	KRO2NO3*1.74 	;
+{10260.} 	 C85CO3 = C85O2 : 	1.00D-11*RO2 	;
+{10261.} 	 C85O2 + HO2 = C85OOH : 	KRO2HO2*0.859 	;
+{10262.} 	 C85O2 + NO = C85O + NO2 : 	KRO2NO 	;
+{10263.} 	 C85O2 + NO3 = C85O + NO2 : 	KRO2NO3 	;
+{10264.} 	 C85O2 = C85O : 	6.70D-15*RO2 	;
+{10265.} 	 C719O2 + HO2 = C719OOH : 	KRO2HO2*0.820 	;
+{10266.} 	 C719O2 + NO = C719NO3 : 	KRO2NO*0.042 	;
+{10267.} 	 C719O2 + NO = C719O + NO2 : 	KRO2NO*0.958 	;
+{10268.} 	 C719O2 + NO3 = C719O + NO2 : 	KRO2NO3 	;
+{10269.} 	 C719O2 = C719O : 	9.20D-14*RO2*0.7 	;
+{10270.} 	 C719O2 = C719OH : 	9.20D-14*RO2*0.3 	;
+{10271.} 	 C720OOH + OH = HCC7CO + OH : 	1.27D-10 	;
+{10272.} 	 C720OOH = C720O + OH : 	J(41) 	;
+{10273.} 	 C720NO3 + OH = HCC7CO + NO2 : 	9.60D-11 	;
+{10274.} 	 C720NO3 = C720O + NO2 : 	J(54) 	;
+{10275.} 	 C720O = HCC7CO + HO2 : 	KROSEC*O2 	;
+{10276.} 	 C720OH + OH = HCC7CO + HO2 : 	1.09D-10 	;
+{10277.} 	 NC91CO3H + OH = NC91CO3 : 	8.85D-12 	;
+{10278.} 	 NC91CO3H = NOPINONE + NO2 + OH : 	J(41) 	;
+{10279.} 	 NC91PAN + OH = NOPINONE + CO + NO2 + NO2 : 	4.90D-12 	;
+{10280.} 	 NC91PAN = NC91CO3 + NO2 : 	KBPAN 	;
+{10281.} 	 C918O2 + HO2 = C918OOH : 	KRO2HO2*0.890 	;
+{10282.} 	 C918O2 + NO = C918NO3 : 	KRO2NO*0.047 	;
+{10283.} 	 C918O2 + NO = C918O + NO2 : 	KRO2NO*0.953 	;
+{10284.} 	 C918O2 + NO3 = C918O + NO2 : 	KRO2NO3 	;
+{10285.} 	 C918O2 = C918O : 	6.70D-15*RO2*0.7 	;
+{10286.} 	 C918O2 = C918OH : 	6.70D-15*RO2*0.3 	;
+{10287.} 	 C9DCO2 + HO2 = C9DCOOH : 	KRO2HO2*0.890 	;
+{10288.} 	 C9DCO2 + NO = C9DCNO3 : 	KRO2NO*0.157 	;
+{10289.} 	 C9DCO2 + NO = C9DCO + NO2 : 	KRO2NO*0.843 	;
+{10290.} 	 C9DCO2 + NO3 = C9DCO + NO2 : 	KRO2NO3 	;
+{10291.} 	 C9DCO2 = C9DCCO : 	2.50D-13*RO2*0.2 	;
+{10292.} 	 C9DCO2 = C9DCO : 	2.50D-13*RO2*0.6 	;
+{10293.} 	 C9DCO2 = C9DCOH : 	2.50D-13*RO2*0.2 	;
+{10294.} 	 C915O2 + HO2 = C915OOH : 	KRO2HO2*0.890 	;
+{10295.} 	 C915O2 + NO = C915NO3 : 	KRO2NO*0.157 	;
+{10296.} 	 C915O2 + NO = C915O + NO2 : 	KRO2NO*0.843 	;
+{10297.} 	 C915O2 + NO3 = C915O + NO2 : 	KRO2NO3 	;
+{10298.} 	 C915O2 = C88CHO : 	8.80D-13*RO2*0.2 	;
+{10299.} 	 C915O2 = C915O : 	8.80D-13*RO2*0.6 	;
+{10300.} 	 C915O2 = C915OH : 	8.80D-13*RO2*0.2 	;
+{10301.} 	 C619CO + OH = C512CO3 : 	5.99D-12 	;
+{10302.} 	 C917O2 + HO2 = C917OOH : 	KRO2HO2*0.890 	;
+{10303.} 	 C917O2 + NO = C917NO3 : 	KRO2NO*0.118 	;
+{10304.} 	 C917O2 + NO = C917O + NO2 : 	KRO2NO*0.882 	;
+{10305.} 	 C917O2 + NO3 = C917O + NO2 : 	KRO2NO3 	;
+{10306.} 	 C917O2 = C917O : 	6.70D-15*RO2*0.7 	;
+{10307.} 	 C917O2 = C917OH : 	6.70D-15*RO2*0.3 	;
+{10308.} 	 C8BCOOH + OH = C8BCCO + OH : 	1.62D-11 	;
+{10309.} 	 C8BCOOH = C8BCO + OH : 	J(41) 	;
+{10310.} 	 C8BCNO3 + OH = C8BCCO + NO2 : 	1.84D-12 	;
+{10311.} 	 C8BCNO3 = C8BCO + NO2 : 	J(54) 	;
+{10312.} 	 C8BCO = C89O2 : 	KDEC 	;
+{10313.} 	 C8BCCO + OH = C89O2 : 	3.94D-12 	;
+{10314.} 	 C8BCOH + OH = C8BCCO + HO2 : 	6.81D-12 	;
+{10315.} 	 C918CO3H + OH = C918CO3 : 	1.46D-11 	;
+{10316.} 	 C918CO3H = NOPINONE + HO2 + OH : 	J(41) 	;
+{10317.} 	 C918PAN + OH = NOPINONE + CO + NO2 : 	5.71D-12 	;
+{10318.} 	 C918PAN = C918CO3 + NO2 : 	KBPAN 	;
+{10319.} 	 NLIMALO2 + HO2 = NLIMALOOH : 	KRO2HO2*0.914 	;
+{10320.} 	 NLIMALO2 + NO = NLIMALO + NO2 : 	KRO2NO 	;
+{10321.} 	 NLIMALO2 + NO3 = NLIMALO + NO2 : 	KRO2NO3 	;
+{10322.} 	 NLIMALO2 = NLIMALO : 	9.20D-14*RO2*0.7 	;
+{10323.} 	 NLIMALO2 = NLIMALOH : 	9.20D-14*RO2*0.3 	;
+{10324.} 	 LIMALOOA = C926O2 + OH : 	KDEC 	;
+{10325.} 	 LMLKET + NO3 = C817CO3 + HNO3 : 	KNO3AL*8.5 	;
+{10326.} 	 LMLKET + OH = C817CO3 : 	3.60D-11*0.748 	;
+{10327.} 	 LMLKET + OH = C926O2 : 	3.60D-11*0.252 	;
+{10328.} 	 LMLKET = C817O2 + CO + HO2 : 	J(15) 	;
+{10329.} 	 LIMALO2 + HO2 = LIMALOOH : 	KRO2HO2*0.914 	;
+{10330.} 	 LIMALO2 + NO = LIMALNO3 : 	KRO2NO*0.059 	;
+{10331.} 	 LIMALO2 + NO = LIMALO + NO2 : 	KRO2NO*0.941 	;
+{10332.} 	 LIMALO2 + NO3 = LIMALO + NO2 : 	KRO2NO3 	;
+{10333.} 	 LIMALO2 = LIMALO : 	9.20D-14*RO2*0.7 	;
+{10334.} 	 LIMALO2 = LIMALOH : 	9.20D-14*RO2*0.3 	;
+{10335.} 	 C729CHO + NO3 = C729CO3 + HNO3 : 	KNO3AL*17.0 	;
+{10336.} 	 C729CHO + NO3 = NC826O2 : 	3.30D-13 	;
+{10337.} 	 C729CHO + O3 = C626CHO + CH2OOF : 	1.30D-17*0.330 	;
+{10338.} 	 C729CHO + O3 = C735OOA + HCHO : 	1.30D-17*0.670 	;
+{10339.} 	 C729CHO + OH = C729CO3 : 	1.06D-10*0.447 	;
+{10340.} 	 C729CHO + OH = C826O2 : 	1.06D-10*0.553 	;
+{10341.} 	 C729CHO = C729O2 + CO + HO2 : 	J(15)*2 	;
+{10342.} 	 C729CO3 + HO2 = C729CO2H + O3 : 	KAPHO2*0.15 	;
+{10343.} 	 C729CO3 + HO2 = C729CO3H : 	KAPHO2*0.41 	;
+{10344.} 	 C729CO3 + HO2 = C729O2 + OH : 	KAPHO2*0.44 	;
+{10345.} 	 C729CO3 + NO = C729O2 + NO2 : 	KAPNO 	;
+{10346.} 	 C729CO3 + NO2 = C729PAN : 	KFPAN 	;
+{10347.} 	 C729CO3 + NO3 = C729O2 + NO2 : 	KRO2NO3*1.74 	;
+{10348.} 	 C729CO3 = C729CO2H : 	1.00D-11*RO2*0.3 	;
+{10349.} 	 C729CO3 = C729O2 : 	1.00D-11*RO2*0.7 	;
+{10350.} 	 C822CO3 + HO2 = C822CO2 + OH : 	KAPHO2*0.44 	;
+{10351.} 	 C822CO3 + HO2 = C822CO2H + O3 : 	KAPHO2*0.15 	;
+{10352.} 	 C822CO3 + HO2 = C822CO3H : 	KAPHO2*0.41 	;
+{10353.} 	 C822CO3 + NO = C822CO2 + NO2 : 	KAPNO 	;
+{10354.} 	 C822CO3 + NO2 = C822PAN : 	KFPAN 	;
+{10355.} 	 C822CO3 + NO3 = C822CO2 + NO2 : 	KRO2NO3*1.74 	;
+{10356.} 	 C822CO3 = C822CO2 : 	1.00D-11*RO2*0.7 	;
+{10357.} 	 C822CO3 = C822CO2H : 	1.00D-11*RO2*0.3 	;
+{10358.} 	 C924O2 + HO2 = C924OOH : 	KRO2HO2*0.890 	;
+{10359.} 	 C924O2 + NO = C924O + NO2 : 	KRO2NO 	;
+{10360.} 	 C924O2 + NO3 = C924O + NO2 : 	KRO2NO3 	;
+{10361.} 	 C924O2 = C924CO : 	8.80D-13*RO2*0.2 	;
+{10362.} 	 C924O2 = C924O : 	8.80D-13*RO2*0.6 	;
+{10363.} 	 C924O2 = C924OH : 	8.80D-13*RO2*0.2 	;
+{10364.} 	 C816CO3 + HO2 = C816CO3H : 	KAPHO2*0.56 	;
+{10365.} 	 C816CO3 + HO2 = C816O2 + OH : 	KAPHO2*0.44 	;
+{10366.} 	 C816CO3 + NO = C816O2 + NO2 : 	KAPNO 	;
+{10367.} 	 C816CO3 + NO2 = C816PAN : 	KFPAN 	;
+{10368.} 	 C816CO3 + NO3 = C816O2 + NO2 : 	KRO2NO3*1.74 	;
+{10369.} 	 C816CO3 = C816O2 : 	1.00D-11*RO2 	;
+{10370.} 	 NORLIMO2 + HO2 = NORLIMOOH : 	KRO2HO2*0.890 	;
+{10371.} 	 NORLIMO2 + NO = NORLIMO + NO2 : 	KRO2NO 	;
+{10372.} 	 NORLIMO2 + NO3 = NORLIMO + NO2 : 	KRO2NO3 	;
+{10373.} 	 NORLIMO2 = NORLIMO : 	9.20D-14*RO2 	;
+{10374.} 	 C816O2 + HO2 = C816OOH : 	KRO2HO2*0.859 	;
+{10375.} 	 C816O2 + NO = C816O + NO2 : 	KRO2NO 	;
+{10376.} 	 C816O2 + NO3 = C816O + NO2 : 	KRO2NO3 	;
+{10377.} 	 C816O2 = C816O : 	2.50D-13*RO2 	;
+{10378.} 	 C923CO3H + OH = C923CO3 : 	7.29D-11 	;
+{10379.} 	 C923CO3H = C923O2 + OH : 	J(41) 	;
+{10380.} 	 C923PAN + OH = NORLIMAL + CO + NO2 : 	6.93D-11 	;
+{10381.} 	 C923PAN = C923CO3 + NO2 : 	KBPAN 	;
+{10382.} 	 NLMKAO2 + HO2 = NLMKAOOH : 	KRO2HO2*0.914 	;
+{10383.} 	 NLMKAO2 + NO = NLMKAO + NO2 : 	KRO2NO*0.760 	;
+{10384.} 	 NLMKAO2 + NO3 = NLMKAO + NO2 : 	KRO2NO3 	;
+{10385.} 	 NLMKAO2 = LMKBNO3 : 	9.20D-14*RO2*0.3 	;
+{10386.} 	 NLMKAO2 = NLMKAO : 	9.20D-14*RO2*0.7 	;
+{10387.} 	 LMKOOA = LMLKAO2 + OH : 	KDEC*0.5 	;
+{10388.} 	 LMKOOA = LMLKBO2 + OH : 	KDEC*0.5 	;
+{10389.} 	 LMKOOB = C817O2 + CO + OH : 	KDEC*0.5 	;
+{10390.} 	 LMKOOB = LMKBOO : 	KDEC*0.5 	;
+{10391.} 	 LMKAO2 + HO2 = LMKAOOH : 	KRO2HO2*0.914 	;
+{10392.} 	 LMKAO2 + NO = LMKANO3 : 	KRO2NO*0.240 	;
+{10393.} 	 LMKAO2 + NO = LMKAO + NO2 : 	KRO2NO*0.760 	;
+{10394.} 	 LMKAO2 + NO3 = LMKAO + NO2 : 	KRO2NO3 	;
+{10395.} 	 LMKAO2 = LMKAO : 	9.20D-14*RO2*0.7 	;
+{10396.} 	 LMKAO2 = LMKAOH : 	9.20D-14*RO2*0.3 	;
+{10397.} 	 LMKBO2 + HO2 = LMKBOOH : 	KRO2HO2*0.914 	;
+{10398.} 	 LMKBO2 + NO = LMKBNO3 : 	KRO2NO*0.240 	;
+{10399.} 	 LMKBO2 + NO = LMKBO + NO2 : 	KRO2NO*0.760 	;
+{10400.} 	 LMKBO2 + NO3 = LMKBO + NO2 : 	KRO2NO3 	;
+{10401.} 	 LMKBO2 = LMKAOH : 	8.80D-13*RO2*0.2 	;
+{10402.} 	 LMKBO2 = LMKBCO : 	8.80D-13*RO2*0.2 	;
+{10403.} 	 LMKBO2 = LMKBO : 	8.80D-13*RO2*0.6 	;
+{10404.} 	 C141CO3H + OH = C141CO3 : 	7.29D-11 	;
+{10405.} 	 C141CO3H = C141O2 + OH : 	J(41) 	;
+{10406.} 	 C141PAN + OH = C141CO + CO + NO2 : 	6.93D-11 	;
+{10407.} 	 C141PAN = C141CO3 + NO2 : 	KBPAN 	;
+{10408.} 	 NBCALOOH + OH = NBCALO2 : 	4.27D-11 	;
+{10409.} 	 NBCALOOH = NBCALO + OH : 	J(41) 	;
+{10410.} 	 NBCALO = BCLKET + HCHO + NO2 : 	KDEC 	;
+{10411.} 	 NBCALOH + OH = BCLKET + HCHO + NO2 : 	3.93D-11 	;
+{10412.} 	 BCALOO + CO = BCLKET : 	1.20D-15 	;
+{10413.} 	 BCALOO + NO = BCLKET + NO2 : 	1.00D-14 	;
+{10414.} 	 BCALOO + NO2 = BCLKET + NO3 : 	1.00D-15 	;
+{10415.} 	 BCALOO + SO2 = BCLKET + SO3 : 	7.00D-14 	;
+{10416.} 	 BCALOO = BCLKET + H2O2 : 	1.40D-17*H2O 	;
+{10417.} 	 C146O2 + HO2 = C146OOH : 	KRO2HO2*0.968 	;
+{10418.} 	 C146O2 + NO = C146O + NO2 : 	KRO2NO 	;
+{10419.} 	 C146O2 + NO3 = C146O + NO2 : 	KRO2NO3 	;
+{10420.} 	 C146O2 = C146CO : 	8.80D-13*RO2*0.2 	;
+{10421.} 	 C146O2 = C146O : 	8.80D-13*RO2*0.6 	;
+{10422.} 	 C146O2 = C146OH : 	8.80D-13*RO2*0.2 	;
+{10423.} 	 C131CO3 + HO2 = C131CO2H + O3 : 	KAPHO2*0.15 	;
+{10424.} 	 C131CO3 + HO2 = C131CO3H : 	KAPHO2*0.41 	;
+{10425.} 	 C131CO3 + HO2 = C131O2 + OH : 	KAPHO2*0.44 	;
+{10426.} 	 C131CO3 + NO = C131O2 + NO2 : 	KAPNO 	;
+{10427.} 	 C131CO3 + NO2 = C131PAN : 	KFPAN 	;
+{10428.} 	 C131CO3 + NO3 = C131O2 + NO2 : 	KRO2NO3*1.74 	;
+{10429.} 	 C131CO3 = C131CO2H : 	1.00D-11*RO2*0.3 	;
+{10430.} 	 C131CO3 = C131O2 : 	1.00D-11*RO2*0.7 	;
+{10431.} 	 BCLKAO2 + HO2 = BCLKAOOH : 	KRO2HO2*0.975 	;
+{10432.} 	 BCLKAO2 + NO = BCLKAO + NO2 : 	KRO2NO 	;
+{10433.} 	 BCLKAO2 + NO3 = BCLKAO + NO2 : 	KRO2NO3 	;
+{10434.} 	 BCLKAO2 = BCLKACO : 	2.00D-12*RO2*0.2 	;
+{10435.} 	 BCLKAO2 = BCLKAO : 	2.00D-12*RO2*0.6 	;
+{10436.} 	 BCLKAO2 = BCLKAOH : 	2.00D-12*RO2*0.2 	;
+{10437.} 	 BCLKBO2 + HO2 = BCLKBOOH : 	KRO2HO2*0.968 	;
+{10438.} 	 BCLKBO2 + NO = BCLKBO + NO2 : 	KRO2NO 	;
+{10439.} 	 BCLKBO2 + NO3 = BCLKBO + NO2 : 	KRO2NO3 	;
+{10440.} 	 BCLKBO2 = BCLKBCO : 	2.00D-12*RO2*0.2 	;
+{10441.} 	 BCLKBO2 = BCLKBO : 	2.00D-12*RO2*0.6 	;
+{10442.} 	 BCLKBO2 = BCLKBOH : 	2.00D-12*RO2*0.2 	;
+{10443.} 	 BCLKCO2 + HO2 = BCLKCOOH : 	KRO2HO2*0.975 	;
+{10444.} 	 BCLKCO2 + NO = BCLKCO + NO2 : 	KRO2NO 	;
+{10445.} 	 BCLKCO2 + NO3 = BCLKCO + NO2 : 	KRO2NO3 	;
+{10446.} 	 BCLKCO2 = BCLKCCO : 	2.00D-12*RO2*0.2 	;
+{10447.} 	 BCLKCO2 = BCLKCO : 	2.00D-12*RO2*0.6 	;
+{10448.} 	 BCLKCO2 = BCLKCOH : 	2.00D-12*RO2*0.2 	;
+{10449.} 	 C131O2 + HO2 = C131OOH : 	KRO2HO2*0.959 	;
+{10450.} 	 C131O2 + NO = C131NO3 : 	KRO2NO*0.178 	;
+{10451.} 	 C131O2 + NO = C131O + NO2 : 	KRO2NO*0.822 	;
+{10452.} 	 C131O2 + NO3 = C131O + NO2 : 	KRO2NO3 	;
+{10453.} 	 C131O2 = C131CO : 	1.32D-12*RO2*0.2 	;
+{10454.} 	 C131O2 = C131O : 	1.32D-12*RO2*0.6 	;
+{10455.} 	 C131O2 = C131OH : 	1.32D-12*RO2*0.2 	;
+{10456.} 	 BCALOOH + OH = BCALO2 : 	4.65D-11 	;
+{10457.} 	 BCALOOH = BCALO + OH : 	J(41) 	;
+{10458.} 	 BCALNO3 + OH = BCLKET + HCHO + NO2 : 	3.01D-11 	;
+{10459.} 	 BCALO = BCLKET + HCHO + HO2 : 	KDEC 	;
+{10460.} 	 BCALOH + OH = BCLKET + HCHO + HO2 : 	4.31D-11 	;
+{10461.} 	 BCSOZOOH + OH = BCKSOZ + HCHO + OH : 	2.57D-11 	;
+{10462.} 	 BCSOZOOH = BCSOZO + OH : 	J(41) 	;
+{10463.} 	 BCSOZNO3 + OH = BCKSOZ + HCHO + NO2 : 	1.58D-11 	;
+{10464.} 	 BCSOZO = BCKSOZ + HCHO + HO2 : 	KDEC 	;
+{10465.} 	 BCSOZOH + OH = BCKSOZ + HCHO + HO2 : 	2.21D-11 	;
+{10466.} 	 C147O2 + HO2 = C147OOH : 	KRO2HO2*0.968 	;
+{10467.} 	 C147O2 + NO = C147O + NO2 : 	KRO2NO 	;
+{10468.} 	 C147O2 + NO3 = C147O + NO2 : 	KRO2NO3 	;
+{10469.} 	 C147O2 = C147CO : 	8.80D-13*RO2*0.2 	;
+{10470.} 	 C147O2 = C147O : 	8.80D-13*RO2*0.6 	;
+{10471.} 	 C147O2 = C147OH : 	8.80D-13*RO2*0.2 	;
+{10472.} 	 C141OO + CO = C131CO2H : 	1.20D-15 	;
+{10473.} 	 C141OO + NO = C131CO2H + NO2 : 	1.00D-14 	;
+{10474.} 	 C141OO + NO2 = C131CO2H + NO3 : 	1.00D-15 	;
+{10475.} 	 C141OO + SO2 = C131CO2H + SO3 : 	7.00D-14 	;
+{10476.} 	 C141OO = C131CO2H + H2O2 : 	1.40D-17*H2O 	;
+{10477.} 	 C151OOH + OH = C131CO2H + HCHO + OH : 	2.57D-11 	;
+{10478.} 	 C151OOH = C151O + OH : 	J(41) 	;
+{10479.} 	 C151NO3 + OH = C131CO2H + HCHO + NO2 : 	1.58D-11 	;
+{10480.} 	 C151O = HCHO + C131CO2H + HO2 : 	KDEC 	;
+{10481.} 	 C151OH + OH = C131CO2H + HCHO + HO2 : 	2.21D-11 	;
+{10482.} 	 C126CO3 + HO2 = C126CO2H + O3 : 	KAPHO2*0.15 	;
+{10483.} 	 C126CO3 + HO2 = C126CO3H : 	KAPHO2*0.41 	;
+{10484.} 	 C126CO3 + HO2 = C126O2 + OH : 	KAPHO2*0.44 	;
+{10485.} 	 C126CO3 + NO = C126O2 + NO2 : 	KAPNO 	;
+{10486.} 	 C126CO3 + NO2 = C126PAN : 	KFPAN 	;
+{10487.} 	 C126CO3 + NO3 = C126O2 + NO2 : 	KRO2NO3*1.74 	;
+{10488.} 	 C126CO3 = C126CO2H : 	1.00D-11*RO2*0.3 	;
+{10489.} 	 C126CO3 = C126O2 : 	1.00D-11*RO2*0.7 	;
+{10490.} 	 C136CO3 + HO2 = C136CO2 + OH : 	KAPHO2*0.44 	;
+{10491.} 	 C136CO3 + HO2 = C136CO2H + O3 : 	KAPHO2*0.15 	;
+{10492.} 	 C136CO3 + HO2 = C136CO3H : 	KAPHO2*0.41 	;
+{10493.} 	 C136CO3 + NO = C136CO2 + NO2 : 	KAPNO 	;
+{10494.} 	 C136CO3 + NO2 = C136PAN : 	KFPAN 	;
+{10495.} 	 C136CO3 + NO3 = C136CO2 + NO2 : 	KRO2NO3*1.74 	;
+{10496.} 	 C136CO3 = C136CO2 : 	1.00D-11*RO2*0.7 	;
+{10497.} 	 C136CO3 = C136CO2H : 	1.00D-11*RO2*0.3 	;
+{10498.} 	 BCBOCOO + CO = BCLKBOC : 	1.20D-15 	;
+{10499.} 	 BCBOCOO + NO = BCLKBOC + NO2 : 	1.00D-14 	;
+{10500.} 	 BCBOCOO + NO2 = BCLKBOC + NO3 : 	1.00D-15 	;
+{10501.} 	 BCBOCOO + SO2 = BCLKBOC + SO3 : 	7.00D-14 	;
+{10502.} 	 BCBOCOO = BCLKBOC + H2O2 : 	1.40D-17*H2O 	;
+{10503.} 	 C148O2 + HO2 = C148OOH : 	KRO2HO2*0.968 	;
+{10504.} 	 C148O2 + NO = C148O + NO2 : 	KRO2NO 	;
+{10505.} 	 C148O2 + NO3 = C148O + NO2 : 	KRO2NO3 	;
+{10506.} 	 C148O2 = C148CO : 	8.80D-13*RO2*0.2 	;
+{10507.} 	 C148O2 = C148O : 	8.80D-13*RO2*0.6 	;
+{10508.} 	 C148O2 = C148OH : 	8.80D-13*RO2*0.2 	;
+{10509.} 	 C152OOH + OH = BCLKBOC + HCHO + OH : 	2.57D-11 	;
+{10510.} 	 C152OOH = C152O + OH : 	J(41) 	;
+{10511.} 	 C152NO3 + OH = BCLKBOC + HCHO + NO2 : 	1.58D-11 	;
+{10512.} 	 C152O = HCHO + BCLKBOC + HO2 : 	KDEC 	;
+{10513.} 	 C152OH + OH = BCLKBOC + HCHO + HO2 : 	2.21D-11 	;
+{10514.} 	 C1311O2 + HO2 = C1311OOH : 	KRO2HO2*0.959 	;
+{10515.} 	 C1311O2 + NO = C1311NO3 : 	KRO2NO*0.134 	;
+{10516.} 	 C1311O2 + NO = C1311O + NO2 : 	KRO2NO*0.866 	;
+{10517.} 	 C1311O2 + NO3 = C1311O + NO2 : 	KRO2NO3 	;
+{10518.} 	 C1311O2 = C1311O : 	6.70D-15*RO2*0.7 	;
+{10519.} 	 C1311O2 = C1311OH : 	6.70D-15*RO2*0.3 	;
+{10520.} 	 NC1313O2 + HO2 = NC1313OOH : 	KRO2HO2*0.959 	;
+{10521.} 	 NC1313O2 + NO = NC1313O + NO2 : 	KRO2NO 	;
+{10522.} 	 NC1313O2 + NO3 = NC1313O + NO2 : 	KRO2NO3 	;
+{10523.} 	 NC1313O2 = NC1313O : 	9.20D-14*RO2*0.7 	;
+{10524.} 	 NC1313O2 = NC1313OH : 	9.20D-14*RO2*0.3 	;
+{10525.} 	 C116CHO + NO3 = C116CO3 + HNO3 : 	KNO3AL*8.5 	;
+{10526.} 	 C116CHO + OH = C116CO3 : 	5.65D-11 	;
+{10527.} 	 C116CHO = C116O2 + CO + HO2 : 	J(15)*2 	;
+{10528.} 	 C126OOA = C126OO : 	KDEC*0.5 	;
+{10529.} 	 C126OOA = C129O2 + OH : 	KDEC*0.5 	;
+{10530.} 	 C1313O2 + HO2 = C1313OOH : 	KRO2HO2*0.957 	;
+{10531.} 	 C1313O2 + NO = C1313NO3 : 	KRO2NO*0.134 	;
+{10532.} 	 C1313O2 + NO = C1313O + NO2 : 	KRO2NO*0.866 	;
+{10533.} 	 C1313O2 + NO3 = C1313O + NO2 : 	KRO2NO3 	;
+{10534.} 	 C1313O2 = C1313O : 	9.20D-14*RO2*0.7 	;
+{10535.} 	 C1313O2 = C1313OH : 	9.20D-14*RO2*0.3 	;
+{10536.} 	 C126O2 + HO2 = C126OOH : 	KRO2HO2*0.947 	;
+{10537.} 	 C126O2 + NO = C126NO3 : 	KRO2NO*0.176 	;
+{10538.} 	 C126O2 + NO = C126O + NO2 : 	KRO2NO*0.824 	;
+{10539.} 	 C126O2 + NO3 = C126O + NO2 : 	KRO2NO3 	;
+{10540.} 	 C126O2 = C126CO : 	1.32D-12*RO2*0.2 	;
+{10541.} 	 C126O2 = C126O : 	1.32D-12*RO2*0.6 	;
+{10542.} 	 C126O2 = C126OH : 	1.32D-12*RO2*0.2 	;
+{10543.} 	 C144O2 + HO2 = C144OOH : 	KRO2HO2*0.968 	;
+{10544.} 	 C144O2 + NO = C144O + NO2 : 	KRO2NO 	;
+{10545.} 	 C144O2 + NO3 = C144O + NO2 : 	KRO2NO3 	;
+{10546.} 	 C144O2 = C144O : 	9.20D-14*RO2 	;
+{10547.} 	 C142O2 + HO2 = C142OOH : 	KRO2HO2*0.968 	;
+{10548.} 	 C142O2 + NO = C142NO3 : 	KRO2NO*0.054 	;
+{10549.} 	 C142O2 + NO = C142O + NO2 : 	KRO2NO*0.946 	;
+{10550.} 	 C142O2 + NO3 = C142O + NO2 : 	KRO2NO3 	;
+{10551.} 	 C142O2 = C142O : 	6.70D-15*RO2*0.7 	;
+{10552.} 	 C142O2 = C142OH : 	6.70D-15*RO2*0.3 	;
+{10553.} 	 C144O = C131CO + HCHO + HO2 : 	KDEC 	;
+{10554.} 	 NBCKO2 + HO2 = NBCKOOH : 	KRO2HO2*0.968 	;
+{10555.} 	 NBCKO2 + NO = NBCKO + NO2 : 	KRO2NO 	;
+{10556.} 	 NBCKO2 + NO3 = NBCKO + NO2 : 	KRO2NO3 	;
+{10557.} 	 NBCKO2 = BCKBNO3 : 	9.20D-14*RO2*0.3 	;
+{10558.} 	 NBCKO2 = NBCKO : 	9.20D-14*RO2*0.7 	;
+{10559.} 	 BCKAOO + CO = BCLKET : 	1.20D-15 	;
+{10560.} 	 BCKAOO + NO = BCLKET + NO2 : 	1.00D-14 	;
+{10561.} 	 BCKAOO + NO2 = BCLKET + NO3 : 	1.00D-15 	;
+{10562.} 	 BCKAOO + SO2 = BCLKET + SO3 : 	7.00D-14 	;
+{10563.} 	 BCKAOO = BCKSOZ : 	8.00D+01 	;
+{10564.} 	 BCKAOO = BCLKET + H2O2 : 	2.00D-16*H2O 	;
+{10565.} 	 BCKBOO + CO = BCKET : 	1.20D-15 	;
+{10566.} 	 BCKBOO + NO = BCKET + NO2 : 	1.00D-14 	;
+{10567.} 	 BCKBOO + NO2 = BCKET + NO3 : 	1.00D-15 	;
+{10568.} 	 BCKBOO + SO2 = BCKET + SO3 : 	7.00D-14 	;
+{10569.} 	 BCKBOO = BCKSOZ : 	1.20D+02 	;
+{10570.} 	 BCKBOO = C131CO2H : 	2.00D-16*H2O 	;
+{10571.} 	 BCKOOA = BCLKAO2 + OH : 	KDEC*0.13 	;
+{10572.} 	 BCKOOA = BCLKBO2 + OH : 	KDEC*0.67 	;
+{10573.} 	 BCKOOA = BCLKBOC : 	KDEC*0.15 	;
+{10574.} 	 BCKOOA = C1210O2 + CH3O2 : 	KDEC*0.05 	;
+{10575.} 	 BCKOOB = BCLKCO2 + OH : 	KDEC*0.66 	;
+{10576.} 	 BCKOOB = C131CO2H : 	KDEC*0.17 	;
+{10577.} 	 BCKOOB = C131O2 + HO2 : 	KDEC*0.17 	;
+{10578.} 	 BCKAO2 + HO2 = BCKAOOH : 	KRO2HO2*0.968 	;
+{10579.} 	 BCKAO2 + NO = BCKANO3 : 	KRO2NO*0.245 	;
+{10580.} 	 BCKAO2 + NO = BCKAO + NO2 : 	KRO2NO*0.755 	;
+{10581.} 	 BCKAO2 + NO3 = BCKAO + NO2 : 	KRO2NO3 	;
+{10582.} 	 BCKAO2 = BCKAO : 	9.20D-14*RO2*0.7 	;
+{10583.} 	 BCKAO2 = BCKAOH : 	9.20D-14*RO2*0.3 	;
+{10584.} 	 BCKBO2 + HO2 = BCKBOOH : 	KRO2HO2*0.968 	;
+{10585.} 	 BCKBO2 + NO = BCKBNO3 : 	KRO2NO*0.245 	;
+{10586.} 	 BCKBO2 + NO = BCKBO + NO2 : 	KRO2NO*0.755 	;
+{10587.} 	 BCKBO2 + NO3 = BCKBO + NO2 : 	KRO2NO3 	;
+{10588.} 	 BCKBO2 = BCKAOH : 	8.80D-13*RO2*0.2 	;
+{10589.} 	 BCKBO2 = BCKBCO : 	8.80D-13*RO2*0.2 	;
+{10590.} 	 BCKBO2 = BCKBO : 	8.80D-13*RO2*0.6 	;
+{10591.} 	 MMFOOH + OH = MMCF + OH : 	4.09D-11 	;
+{10592.} 	 MMFOOH = MMFO + OH : 	J(41) 	;
+{10593.} 	 MMFNO3 + OH = MMCF + NO2 : 	2.12D-12 	;
+{10594.} 	 MMFNO3 = MMFO + NO2 : 	J(54) 	;
+{10595.} 	 MMFO = MMCF + HO2 : 	KROSEC*O2 	;
+{10596.} 	 MMFOH + OH = MMCF + HO2 : 	1.17D-11 	;
+{10597.} 	 MMCFOOH + OH = DFC + OH : 	1.96D-11 	;
+{10598.} 	 MMCFOOH + OH = MMCFO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10599.} 	 MMCFOOH = MMCFO + OH : 	J(41) 	;
+{10600.} 	 MMCFNO3 + OH = DFC + NO2 : 	1.50D-13 	;
+{10601.} 	 MMCFNO3 = MMCFO + NO2 : 	J(53) 	;
+{10602.} 	 MMCFO = DFC + HO2 : 	KROPRIM*O2 	;
+{10603.} 	 MMCFO = HCHO + HO2 : 	2.70D+14*EXP(-6765/TEMP) 	;
+{10604.} 	 DFC + OH = CO + HO2 : 	1.80D-13 	;
+{10605.} 	 MMCFOH + OH = DFC + HO2 : 	5.47D-12 	;
+{10606.} 	 CH3SO + NO2 = CH3O2 + SO2 + NO : 	1.20D-11*0.25 	;
+{10607.} 	 CH3SO + NO2 = CH3SO2 + NO : 	1.20D-11*0.75 	;
+{10608.} 	 CH3SO + O3 = CH3O2 + SO2 : 	4.00D-13 	;
+{10609.} 	 CH3SO = CH3SOO2 : 	3.12D-16*EXP(1580/TEMP)*O2 	;
+{10610.} 	 CH3SOO + NO = CH3SO + NO2 : 	1.1D-11 	;
+{10611.} 	 CH3SOO + NO2 = CH3SO + NO3 : 	2.2D-11 	;
+{10612.} 	 CH3SOO = CH3S : 	3.50D+10*EXP(-3560/TEMP) 	;
+{10613.} 	 CH3SOO = CH3SO2 : 	8.00D+00 	;
+{10614.} 	 DMSO2OOH + OH = CH3SO2CHO + OH : 	1.26D-12 	;
+{10615.} 	 DMSO2OOH + OH = DMSO2O2 : 	3.60D-12 	;
+{10616.} 	 DMSO2OOH = DMSO2O + OH : 	J(41) 	;
+{10617.} 	 DMSO2O = CH3SO2 + HCHO : 	KDEC 	;
+{10618.} 	 CH3SO2CHO + OH = CH3SO2 + CO : 	1.78D-12 	;
+{10619.} 	 CH3SO2CHO = CH3SO2 + CO + HO2 : 	J(15) 	;
+{10620.} 	 DMSO2OH + OH = CH3SO2CHO + HO2 : 	5.23D-13 	;
+{10621.} 	 DMSO2OH + OH = DMSO2O : 	1.40D-13 	;
+{10622.} 	 H13C43CO3 + HO2 = H13C43CO3H : 	KAPHO2*0.56 	;
+{10623.} 	 H13C43CO3 + HO2 = MEKAOH + HO2 + OH : 	KAPHO2*0.44 	;
+{10624.} 	 H13C43CO3 + NO = MEKAOH + HO2 + NO2 : 	KAPNO 	;
+{10625.} 	 H13C43CO3 + NO2 = C5PAN12 : 	KFPAN 	;
+{10626.} 	 H13C43CO3 + NO3 = MEKAOH + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{10627.} 	 H13C43CO3 = MEKAOH + HO2 : 	1.00D-11*RO2 	;
+{10628.} 	 C42CO3 + HO2 = C42CO3H : 	KAPHO2*0.56 	;
+{10629.} 	 C42CO3 + HO2 = HOIPRCHO + HO2 + OH : 	KAPHO2*0.44 	;
+{10630.} 	 C42CO3 + NO = HOIPRCHO + HO2 + NO2 : 	KAPNO 	;
+{10631.} 	 C42CO3 + NO2 = C5PAN13 : 	KFPAN 	;
+{10632.} 	 C42CO3 + NO3 = HOIPRCHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{10633.} 	 C42CO3 = HOIPRCHO + HO2 : 	1.00D-11*RO2 	;
+{10634.} 	 CHOC4CO3H + OH = CHOC4CO3 : 	3.50D-11 	;
+{10635.} 	 CHOC4CO3H = CHOC4O2 + OH : 	J(41)+J(15) 	;
+{10636.} 	 CHOC4PAN + OH = CO2C4CHO + CO + NO2 : 	2.79D-11 	;
+{10637.} 	 CHOC4PAN = CHOC4CO3 + NO2 : 	KBPAN 	;
+{10638.} 	 C6DIALOOH + OH = C6CODIAL + OH : 	1.29D-10 	;
+{10639.} 	 C6DIALOOH + OH = C6DIALO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{10640.} 	 C6DIALOOH = C6DIALO + OH : 	J(41)+J(15)*2 	;
+{10641.} 	 C6DIALO = C6CODIAL + HO2 : 	KROSEC*O2 	;
+{10642.} 	 C6DIALO = CHOC2H4O2 + HCOCH2CHO : 	2.70D+14*EXP(-7398/TEMP) 	;
+{10643.} 	 C6DIALOH + OH = C1H4C5CO3 : 	8.03D-11*0.560 	;
+{10644.} 	 C6DIALOH + OH = C6CODIAL + HO2 : 	8.03D-11*0.440 	;
+{10645.} 	 C6DIALOH = CHOC4OHO2 + HO2 + CO : 	J(15) 	;
+{10646.} 	 CHOC4OOH + OH = CHOC4O2 : 	4.08D-11 	;
+{10647.} 	 CHOC4OOH = CHOC4O + OH : 	J(41)+J(15) 	;
+{10648.} 	 CHOC4O = HOC4CHOO2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{10649.} 	 CY6DIONOOH + OH = CYC6DIONO2 : 	8.80D-11 	;
+{10650.} 	 CY6DIONOOH = CYC6DIONO + OH : 	J(41)+J(35) 	;
+{10651.} 	 CYC6DIONO = C6145COO2 : 	KDEC 	;
+{10652.} 	 HOC3H6CO3 + HO2 = HO1C3O2 + OH : 	KAPHO2*0.44 	;
+{10653.} 	 HOC3H6CO3 + HO2 = HOC3H6CO2H + O3 : 	KAPHO2*0.15 	;
+{10654.} 	 HOC3H6CO3 + HO2 = HOC3H6CO3H : 	KAPHO2*0.41 	;
+{10655.} 	 HOC3H6CO3 + NO = HO1C3O2 + NO2 : 	KAPNO*4.0 	;
+{10656.} 	 HOC3H6CO3 + NO2 = C4PAN1 : 	KFPAN 	;
+{10657.} 	 HOC3H6CO3 + NO3 = HO1C3O2 + NO2 : 	KRO2NO3*1.74 	;
+{10658.} 	 HOC3H6CO3 = HO1C3O2 : 	1.00D-11*0.7*RO2 	;
+{10659.} 	 HOC3H6CO3 = HOC3H6CO2H : 	1.00D-11*0.3*RO2 	;
+{10660.} 	 C3DIOLO2 + HO2 = C3DIOLOOH : 	KRO2HO2*0.520 	;
+{10661.} 	 C3DIOLO2 + NO = C3DIOLO + NO2 : 	KRO2NO 	;
+{10662.} 	 C3DIOLO2 + NO3 = C3DIOLO + NO2 : 	KRO2NO3 	;
+{10663.} 	 C3DIOLO2 = C3DIOLO : 	2.00D-12*RO2 	;
+{10664.} 	 C51O2 + HO2 = C51OOH : 	KRO2HO2*0.706 	;
+{10665.} 	 C51O2 + NO = C51NO3 : 	KRO2NO*0.065 	;
+{10666.} 	 C51O2 + NO = C51O + NO2 : 	KRO2NO*0.935 	;
+{10667.} 	 C51O2 + NO3 = C51O + NO2 : 	KRO2NO3 	;
+{10668.} 	 C51O2 = C51O : 	8.40D-13*0.6*RO2 	;
+{10669.} 	 C51O2 = C51OH : 	8.40D-13*0.2*RO2 	;
+{10670.} 	 C51O2 = HO1CO24C5 : 	8.40D-13*0.2*RO2 	;
+{10671.} 	 CO2C4CHO = MEKAO2 + HO2 + CO : 	J(15) 	;
+{10672.} 	 NO3 + CO2C4CHO = CO2C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{10673.} 	 OH + CO2C4CHO = CO2C4CO3 : 	2.63D-11 	;
+{10674.} 	 HO2C4CO3 + HO2 = HO2C4CO2H + O3 : 	KAPHO2*0.15 	;
+{10675.} 	 HO2C4CO3 + HO2 = HO2C4CO3H : 	KAPHO2*0.41 	;
+{10676.} 	 HO2C4CO3 + HO2 = HO2C4O2 + OH : 	KAPHO2*0.44 	;
+{10677.} 	 HO2C4CO3 + NO = HO2C4O2 + NO2 : 	KAPNO 	;
+{10678.} 	 HO2C4CO3 + NO2 = C5PAN1 : 	KFPAN 	;
+{10679.} 	 HO2C4CO3 + NO3 = HO2C4O2 + NO2 : 	KRO2NO3*1.74 	;
+{10680.} 	 HO2C4CO3 = HO2C4CO2H : 	1.00D-11*0.3*RO2 	;
+{10681.} 	 HO2C4CO3 = HO2C4O2 : 	1.00D-11*0.7*RO2 	;
+{10682.} 	 HOBUT2CHO = NBUTOLBO2 + HO2 + CO : 	J(17) 	;
+{10683.} 	 NO3 + HOBUT2CHO = HOBUT2CO3 + HNO3 : 	KNO3AL*8.5 	;
+{10684.} 	 OH + HOBUT2CHO = HOBUT2CO3 : 	3.09D-11 	;
+{10685.} 	 HOIBUTCO3 + HO2 = HOIBUTCO3H : 	KAPHO2*0.56 	;
+{10686.} 	 HOIBUTCO3 + HO2 = IBUTOLCO2 + OH : 	KAPHO2*0.44 	;
+{10687.} 	 HOIBUTCO3 + NO = IBUTOLCO2 + NO2 : 	KAPNO 	;
+{10688.} 	 HOIBUTCO3 + NO2 = C5PAN3 : 	KFPAN 	;
+{10689.} 	 HOIBUTCO3 + NO3 = IBUTOLCO2 + NO2 : 	KRO2NO3*1.74 	;
+{10690.} 	 HOIBUTCO3 = SC4H9O2 : 	1.00D-11*RO2 	;
+{10691.} 	 C63O2 + HO2 = C63OOH : 	KRO2HO2*0.770 	;
+{10692.} 	 C63O2 + NO = C63NO3 : 	KRO2NO*0.039 	;
+{10693.} 	 C63O2 + NO = C63O + NO2 : 	KRO2NO*0.961 	;
+{10694.} 	 C63O2 + NO3 = C63O + NO2 : 	KRO2NO3 	;
+{10695.} 	 C63O2 = C63O : 	8.40D-13*0.6*RO2 	;
+{10696.} 	 C63O2 = C63OH : 	8.40D-13*0.2*RO2 	;
+{10697.} 	 C63O2 = HO1CO24C6 : 	8.40D-13*0.2*RO2 	;
+{10698.} 	 CO3C5CHO = DIEKBO2 + HO2 + CO : 	J(15) 	;
+{10699.} 	 NO3 + CO3C5CHO = CO3C5CO3 + HNO3 : 	KNO3AL*5.5 	;
+{10700.} 	 OH + CO3C5CHO = CO3C5CO3 : 	2.75D-11 	;
+{10701.} 	 HO3C5CO3 + HO2 = HO3C5CO2H + O3 : 	KAPHO2*0.15 	;
+{10702.} 	 HO3C5CO3 + HO2 = HO3C5CO3H : 	KAPHO2*0.41 	;
+{10703.} 	 HO3C5CO3 + HO2 = HO3C5O2 + OH : 	KAPHO2*0.44 	;
+{10704.} 	 HO3C5CO3 + NO = HO3C5O2 + NO2 : 	KAPNO 	;
+{10705.} 	 HO3C5CO3 + NO2 = C6PAN1 : 	KFPAN 	;
+{10706.} 	 HO3C5CO3 + NO3 = HO3C5O2 + NO2 : 	KRO2NO3*1.74 	;
+{10707.} 	 HO3C5CO3 = HO3C5CO2H : 	1.00D-11*0.3*RO2 	;
+{10708.} 	 HO3C5CO3 = HO3C5O2 : 	1.00D-11*0.7*RO2 	;
+{10709.} 	 C64O2 + HO2 = C64OOH : 	KRO2HO2*0.770 	;
+{10710.} 	 C64O2 + NO = C64NO3 : 	KRO2NO*0.029 	;
+{10711.} 	 C64O2 + NO = C64O + NO2 : 	KRO2NO*0.971 	;
+{10712.} 	 C64O2 + NO3 = C64O + NO2 : 	KRO2NO3 	;
+{10713.} 	 C64O2 = C64O : 	9.20D-14*0.7*RO2 	;
+{10714.} 	 C64O2 = C64OH : 	9.20D-14*0.3*RO2 	;
+{10715.} 	 CO2C54CHO = CO2C54O2 + HO2 + CO : 	J(17) 	;
+{10716.} 	 NO3 + CO2C54CHO = CO2C54CO3 + HNO3 : 	KNO3AL*8.5 	;
+{10717.} 	 OH + CO2C54CHO = C65O2 : 	2.98D-11*0.215 	;
+{10718.} 	 OH + CO2C54CHO = CO2C54CO3 : 	2.98D-11*0.785 	;
+{10719.} 	 HO2C54O2 + HO2 = HO2C54OOH : 	KRO2HO2*0.706 	;
+{10720.} 	 HO2C54O2 + NO = HO2C54NO3 : 	KRO2NO*0.129 	;
+{10721.} 	 HO2C54O2 + NO = HO2C54O + NO2 : 	KRO2NO*0.971 	;
+{10722.} 	 HO2C54O2 + NO3 = HO2C54O + NO2 : 	KRO2NO3 	;
+{10723.} 	 HO2C54O2 = HO24C5 : 	2.50D-13*0.2*RO2 	;
+{10724.} 	 HO2C54O2 = HO2C54O : 	2.50D-13*0.6*RO2 	;
+{10725.} 	 HO2C54O2 = HO2CO4C5 : 	2.50D-13*0.2*RO2 	;
+{10726.} 	 HO2C54CO3 + HO2 = HO2C54CO2H + O3 : 	KAPHO2*0.15 	;
+{10727.} 	 HO2C54CO3 + HO2 = HO2C54CO3H : 	KAPHO2*0.41 	;
+{10728.} 	 HO2C54CO3 + HO2 = HO2C54O2 + OH : 	KAPHO2*0.44 	;
+{10729.} 	 HO2C54CO3 + NO = HO2C54O2 + NO2 : 	KAPNO 	;
+{10730.} 	 HO2C54CO3 + NO2 = C6PAN4 : 	KFPAN 	;
+{10731.} 	 HO2C54CO3 + NO3 = HO2C54O2 + NO2 : 	KRO2NO3*1.74 	;
+{10732.} 	 HO2C54CO3 = HO2C54CO2H : 	1.00D-11*0.3*RO2 	;
+{10733.} 	 HO2C54CO3 = HO2C54O2 : 	1.00D-11*0.7*RO2 	;
+{10734.} 	 C66O2 + HO2 = C66OOH : 	KRO2HO2*0.770 	;
+{10735.} 	 C66O2 + NO = C66O + NO2 : 	KRO2NO 	;
+{10736.} 	 C66O2 + NO3 = C66O + NO2 : 	KRO2NO3 	;
+{10737.} 	 C66O2 = C66CO : 	8.40D-13*0.2*RO2 	;
+{10738.} 	 C66O2 = C66O : 	8.40D-13*0.6*RO2 	;
+{10739.} 	 C66O2 = C66OH : 	8.40D-13*0.2*RO2 	;
+{10740.} 	 CO3C54CO3 + HO2 = CO3C54CO3H : 	KAPHO2*0.56 	;
+{10741.} 	 CO3C54CO3 + HO2 = DIEKAO2 + OH : 	KAPHO2*0.44 	;
+{10742.} 	 CO3C54CO3 + NO = DIEKAO2 + NO2 : 	KAPNO 	;
+{10743.} 	 CO3C54CO3 + NO2 = C6PAN6 : 	KFPAN 	;
+{10744.} 	 CO3C54CO3 + NO3 = DIEKAO2 + NO2 : 	KRO2NO3*1.74 	;
+{10745.} 	 CO3C54CO3 = DIEKAO2 : 	1.00D-11*RO2 	;
+{10746.} 	 H2M2C4CO3 + HO2 = H2M2C4CO2H + O3 : 	KAPHO2*0.15 	;
+{10747.} 	 H2M2C4CO3 + HO2 = H2M2C4CO3H : 	KAPHO2*0.41 	;
+{10748.} 	 H2M2C4CO3 + HO2 = HO2M2C4O2 + OH : 	KAPHO2*0.44 	;
+{10749.} 	 H2M2C4CO3 + NO = HO2M2C4O2 + NO2 : 	KAPNO 	;
+{10750.} 	 H2M2C4CO3 + NO2 = C6PAN8 : 	KFPAN 	;
+{10751.} 	 H2M2C4CO3 + NO3 = HO2M2C4O2 + NO2 : 	KRO2NO3*1.74 	;
+{10752.} 	 H2M2C4CO3 = H2M2C4CO2H : 	1.00D-11*0.3*RO2 	;
+{10753.} 	 H2M2C4CO3 = HO2M2C4O2 : 	1.00D-11*0.7*RO2 	;
+{10754.} 	 C67O2 + HO2 = C67OOH : 	KRO2HO2*0.770 	;
+{10755.} 	 C67O2 + NO = C67NO3 : 	KRO2NO*0.098 	;
+{10756.} 	 C67O2 + NO = C67O + NO2 : 	KRO2NO*0.902 	;
+{10757.} 	 C67O2 + NO3 = C67O + NO2 : 	KRO2NO3 	;
+{10758.} 	 C67O2 = C67CHO : 	8.40D-13*0.2*RO2 	;
+{10759.} 	 C67O2 = C67O : 	8.40D-13*0.6*RO2 	;
+{10760.} 	 C67O2 = C67OH : 	8.40D-13*0.2*RO2 	;
+{10761.} 	 C610O2 + HO2 = C610OOH : 	KRO2HO2*0.770 	;
+{10762.} 	 C610O2 + NO = C610NO3 : 	KRO2NO*0.098 	;
+{10763.} 	 C610O2 + NO = C610O + NO2 : 	KRO2NO*0.902 	;
+{10764.} 	 C610O2 + NO3 = C610O + NO2 : 	KRO2NO3 	;
+{10765.} 	 C610O2 = C610O : 	8.80D-13*0.6*RO2 	;
+{10766.} 	 C610O2 = C610OH : 	8.80D-13*0.2*RO2 	;
+{10767.} 	 C610O2 = CO24M3C5OH : 	8.80D-13*0.2*RO2 	;
+{10768.} 	 CO2M3C4CHO = MIPKBO2 + HO2 + CO : 	J(15) 	;
+{10769.} 	 NO3 + CO2M3C4CHO = CO2M3C4CO3 + HNO3 : 	KNO3AL*8.5 	;
+{10770.} 	 OH + CO2M3C4CHO = CO2M3C4CO3 : 	2.98D-11 	;
+{10771.} 	 H2M3C4CO3 + HO2 = H2M3C4CO2H + O3 : 	KAPHO2*0.15 	;
+{10772.} 	 H2M3C4CO3 + HO2 = H2M3C4CO3H : 	KAPHO2*0.41 	;
+{10773.} 	 H2M3C4CO3 + HO2 = H2M3C4O2 + OH : 	KAPHO2*0.44 	;
+{10774.} 	 H2M3C4CO3 + NO = H2M3C4O2 + NO2 : 	KAPNO 	;
+{10775.} 	 H2M3C4CO3 + NO2 = C6PAN11 : 	KFPAN 	;
+{10776.} 	 H2M3C4CO3 + NO3 = H2M3C4O2 + NO2 : 	KRO2NO3*1.74 	;
+{10777.} 	 H2M3C4CO3 = H2M3C4CO2H : 	1.00D-11*0.3*RO2 	;
+{10778.} 	 H2M3C4CO3 = H2M3C4O2 : 	1.00D-11*0.7*RO2 	;
+{10779.} 	 C68O2 + HO2 = C68OOH : 	KRO2HO2*0.770 	;
+{10780.} 	 C68O2 + NO = C68NO3 : 	KRO2NO*0.029 	;
+{10781.} 	 C68O2 + NO = C68O + NO2 : 	KRO2NO*0.971 	;
+{10782.} 	 C68O2 + NO3 = C68O + NO2 : 	KRO2NO3 	;
+{10783.} 	 C68O2 = C68O : 	9.20D-14*0.7*RO2 	;
+{10784.} 	 C68O2 = C68OH : 	9.20D-14*0.3*RO2 	;
+{10785.} 	 C69O2 + HO2 = C69OOH : 	KRO2HO2*0.770 	;
+{10786.} 	 C69O2 + NO = C69O + NO2 : 	KRO2NO 	;
+{10787.} 	 C69O2 + NO3 = C69O + NO2 : 	KRO2NO3 	;
+{10788.} 	 C69O2 = C69O : 	2.00D-12*0.6*RO2 	;
+{10789.} 	 C69O2 = C69OH : 	2.00D-12*0.2*RO2 	;
+{10790.} 	 C69O2 = H2M3CO4CHO : 	2.00D-12*0.2*RO2 	;
+{10791.} 	 C611O2 + HO2 = C611OOH : 	KRO2HO2*0.770 	;
+{10792.} 	 C611O2 + NO = C611O + NO2 : 	KRO2NO 	;
+{10793.} 	 C611O2 + NO3 = C611O + NO2 : 	KRO2NO3 	;
+{10794.} 	 C611O2 = C611O : 	9.20D-14*0.7*RO2 	;
+{10795.} 	 C611O2 = C611OH : 	9.20D-14*0.3*RO2 	;
+{10796.} 	 HM33C3CO3 + HO2 = HM33C3CO2H + O3 : 	KAPHO2*0.15 	;
+{10797.} 	 HM33C3CO3 + HO2 = HM33C3CO3H : 	KAPHO2*0.41 	;
+{10798.} 	 HM33C3CO3 + HO2 = HM33C3O2 + OH : 	KAPHO2*0.44 	;
+{10799.} 	 HM33C3CO3 + NO = HM33C3O2 + NO2 : 	KAPNO 	;
+{10800.} 	 HM33C3CO3 + NO2 = C6PAN13 : 	KFPAN 	;
+{10801.} 	 HM33C3CO3 + NO3 = HM33C3O2 + NO2 : 	KRO2NO3*1.74 	;
+{10802.} 	 HM33C3CO3 = HM33C3CO2H : 	1.00D-11*0.3*RO2 	;
+{10803.} 	 HM33C3CO3 = HM33C3O2 : 	1.00D-11*0.7*RO2 	;
+{10804.} 	 HM22C3O2 + HO2 = HM22C3OOH : 	KRO2HO2*0.706 	;
+{10805.} 	 HM22C3O2 + NO = HM22C3NO3 : 	KRO2NO*0.052 	;
+{10806.} 	 HM22C3O2 + NO = HM22C3O + NO2 : 	KRO2NO*0.948 	;
+{10807.} 	 HM22C3O2 + NO3 = HM22C3O + NO2 : 	KRO2NO3 	;
+{10808.} 	 HM22C3O2 = HM22C3O : 	1.30D-12*0.6*RO2 	;
+{10809.} 	 HM22C3O2 = HM22C3OH : 	1.30D-12*0.2*RO2 	;
+{10810.} 	 HM22C3O2 = HM22CHO : 	1.30D-12*0.2*RO2 	;
+{10811.} 	 HM22C3CO3 + HO2 = HM22C3CO2H + O3 : 	KAPHO2*0.15 	;
+{10812.} 	 HM22C3CO3 + HO2 = HM22C3CO3H : 	KAPHO2*0.41 	;
+{10813.} 	 HM22C3CO3 + HO2 = HM22C3O2 + OH : 	KAPHO2*0.44 	;
+{10814.} 	 HM22C3CO3 + NO = HM22C3O2 + NO2 : 	KAPNO 	;
+{10815.} 	 HM22C3CO3 + NO2 = C6PAN14 : 	KFPAN 	;
+{10816.} 	 HM22C3CO3 + NO3 = HM22C3O2 + NO2 : 	KRO2NO3*1.74 	;
+{10817.} 	 HM22C3CO3 = HM22C3CO2H : 	1.00D-11*0.3*RO2 	;
+{10818.} 	 HM22C3CO3 = HM22C3O2 : 	1.00D-11*0.7*RO2 	;
+{10819.} 	 HM2C43CO3 + HO2 = HM2C43CO2H + O3 : 	KAPHO2*0.15 	;
+{10820.} 	 HM2C43CO3 + HO2 = HM2C43CO3H : 	KAPHO2*0.41 	;
+{10821.} 	 HM2C43CO3 + HO2 = HM2C43O2 + OH : 	KAPHO2*0.44 	;
+{10822.} 	 HM2C43CO3 + NO = HM2C43O2 + NO2 : 	KAPNO 	;
+{10823.} 	 HM2C43CO3 + NO2 = C6PAN19 : 	KFPAN 	;
+{10824.} 	 HM2C43CO3 + NO3 = HM2C43O2 + NO2 : 	KRO2NO3*1.74 	;
+{10825.} 	 HM2C43CO3 = HM2C43CO2H : 	1.00D-11*0.3*RO2 	;
+{10826.} 	 HM2C43CO3 = HM2C43O2 : 	1.00D-11*0.7*RO2 	;
+{10827.} 	 HO2CO5C7 = C2H5CO3 + HO2C4O2 : 	J(22) 	;
+{10828.} 	 OH + HO2CO5C7 = C72O2 : 	1.52D-11*0.349 	;
+{10829.} 	 OH + HO2CO5C7 = CO25C7 + HO2 : 	1.52D-11*0.651 	;
+{10830.} 	 CO25C7 = C2H5CO3 + MEKAO2 : 	J(22) 	;
+{10831.} 	 CO25C7 = CH3CO3 + DIEKBO2 : 	J(22) 	;
+{10832.} 	 OH + CO25C7 = CO25C73O2 : 	6.60D-12*0.500 	;
+{10833.} 	 OH + CO25C7 = CO25C74O2 : 	6.60D-12*0.500 	;
+{10834.} 	 C71O2 + HO2 = C71OOH : 	KRO2HO2*0.820 	;
+{10835.} 	 C71O2 + NO = C71O + NO2 : 	KRO2NO 	;
+{10836.} 	 C71O2 + NO3 = C71O + NO2 : 	KRO2NO3 	;
+{10837.} 	 C71O2 = C71O : 	8.80D-13*RO2 	;
+{10838.} 	 C76O2 + HO2 = C76OOH : 	KRO2HO2*0.820 	;
+{10839.} 	 C76O2 + NO = C76O + NO2 : 	KRO2NO 	;
+{10840.} 	 C76O2 + NO3 = C76O + NO2 : 	KRO2NO3 	;
+{10841.} 	 C76O2 = C76O : 	2.00D-12*RO2 	;
+{10842.} 	 C77O2 + HO2 = C77OOH : 	KRO2HO2*0.820 	;
+{10843.} 	 C77O2 + NO = C77NO3 : 	KRO2NO*0.139 	;
+{10844.} 	 C77O2 + NO = C77O + NO2 : 	KRO2NO*0.861 	;
+{10845.} 	 C77O2 + NO3 = C77O + NO2 : 	KRO2NO3 	;
+{10846.} 	 C77O2 = C77CO : 	8.80D-13*0.2*RO2 	;
+{10847.} 	 C77O2 = C77O : 	8.80D-13*0.6*RO2 	;
+{10848.} 	 C77O2 = C77OH : 	8.80D-13*0.2*RO2 	;
+{10849.} 	 C78O2 + HO2 = C78OOH : 	KRO2HO2*0.820 	;
+{10850.} 	 C78O2 + NO = C78O + NO2 : 	KRO2NO 	;
+{10851.} 	 C78O2 + NO3 = C78O + NO2 : 	KRO2NO3 	;
+{10852.} 	 C78O2 = C78CO : 	8.80D-13*0.2*RO2 	;
+{10853.} 	 C78O2 = C78O : 	8.80D-13*0.6*RO2 	;
+{10854.} 	 C78O2 = C78OH : 	8.80D-13*0.2*RO2 	;
+{10855.} 	 H2M3CO5C6 = CH3CO3 + H2M3C4O2 : 	J(22) 	;
+{10856.} 	 OH + H2M3CO5C6 = C712O2 : 	1.91D-11*0.534 	;
+{10857.} 	 OH + H2M3CO5C6 = M3CO25C6 + HO2 : 	1.91D-11*0.466 	;
+{10858.} 	 M3CO25C6 = CH3CO3 + CO2C54O2 : 	J(22) 	;
+{10859.} 	 M3CO25C6 = CH3CO3 + MIPKBO2 : 	J(22) 	;
+{10860.} 	 OH + M3CO25C6 = C713O2 : 	9.14D-12*0.675 	;
+{10861.} 	 OH + M3CO25C6 = C714O2 : 	9.14D-12*0.325 	;
+{10862.} 	 C711O2 + HO2 = C711OOH : 	KRO2HO2*0.820 	;
+{10863.} 	 C711O2 + NO = C711O + NO2 : 	KRO2NO 	;
+{10864.} 	 C711O2 + NO3 = C711O + NO2 : 	KRO2NO3 	;
+{10865.} 	 C711O2 = C711O : 	2.00D-12*RO2 	;
+{10866.} 	 H3M3C5O2 + HO2 = H3M3C5OOH : 	KRO2HO2*0.706 	;
+{10867.} 	 H3M3C5O2 + NO = H3M3C5NO3 : 	KRO2NO*0.052 	;
+{10868.} 	 H3M3C5O2 + NO = H3M3C5O + NO2 : 	KRO2NO*0.948 	;
+{10869.} 	 H3M3C5O2 + NO3 = H3M3C5O + NO2 : 	KRO2NO3 	;
+{10870.} 	 H3M3C5O2 = H13M3C5 : 	1.30D-12*0.2*RO2 	;
+{10871.} 	 H3M3C5O2 = H3M3C4CHO : 	1.30D-12*0.2*RO2 	;
+{10872.} 	 H3M3C5O2 = H3M3C5O : 	1.30D-12*0.6*RO2 	;
+{10873.} 	 H3M3C5CO3 + HO2 = H3M3C5CO2H + O3 : 	KAPHO2*0.15 	;
+{10874.} 	 H3M3C5CO3 + HO2 = H3M3C5CO3H : 	KAPHO2*0.41 	;
+{10875.} 	 H3M3C5CO3 + HO2 = H3M3C5O2 + OH : 	KAPHO2*0.44 	;
+{10876.} 	 H3M3C5CO3 + NO = H3M3C5O2 + NO2 : 	KAPNO 	;
+{10877.} 	 H3M3C5CO3 + NO2 = C7PAN1 : 	KFPAN 	;
+{10878.} 	 H3M3C5CO3 + NO3 = H3M3C5O2 + NO2 : 	KRO2NO3*1.74 	;
+{10879.} 	 H3M3C5CO3 = H3M3C5CO2H : 	1.00D-11*0.3*RO2 	;
+{10880.} 	 H3M3C5CO3 = H3M3C5O2 : 	1.00D-11*0.7*RO2 	;
+{10881.} 	 C82O2 + HO2 = C82OOH : 	KRO2HO2*0.859 	;
+{10882.} 	 C82O2 + NO = C82NO3 : 	KRO2NO*0.173 	;
+{10883.} 	 C82O2 + NO = C82O + NO2 : 	KRO2NO*0.827 	;
+{10884.} 	 C82O2 + NO3 = C82O + NO2 : 	KRO2NO3 	;
+{10885.} 	 C82O2 = C82O : 	8.80D-13*0.6*RO2 	;
+{10886.} 	 C82O2 = HO34CO6C8 : 	8.80D-13*0.2*RO2 	;
+{10887.} 	 C82O2 = HO3CO46C8 : 	8.80D-13*0.2*RO2 	;
+{10888.} 	 CO36C8 = C2H5CO3 + DIEKBO2 : 	J(22)*2 	;
+{10889.} 	 OH + CO36C8 = C84O2 : 	7.93D-12 	;
+{10890.} 	 C81O2 + HO2 = C81OOH : 	KRO2HO2*0.859 	;
+{10891.} 	 C81O2 + NO = C81O + NO2 : 	KRO2NO 	;
+{10892.} 	 C81O2 + NO3 = C81O + NO2 : 	KRO2NO3 	;
+{10893.} 	 C81O2 = C81O : 	8.80D-13*RO2 	;
+{10894.} 	 C93O2 + HO2 = C93OOH : 	KRO2HO2*0.890 	;
+{10895.} 	 C93O2 + NO = C93NO3 : 	KRO2NO*0.197 	;
+{10896.} 	 C93O2 + NO = C93O + NO2 : 	KRO2NO*0.803 	;
+{10897.} 	 C93O2 + NO3 = C93O + NO2 : 	KRO2NO3 	;
+{10898.} 	 C93O2 = C93CO : 	8.80D-13*0.2*RO2 	;
+{10899.} 	 C93O2 = C93O : 	8.80D-13*0.6*RO2 	;
+{10900.} 	 C93O2 = C93OH : 	8.80D-13*0.2*RO2 	;
+{10901.} 	 CO36C9 = C3H7CO3 + DIEKBO2 : 	J(22)*2 	;
+{10902.} 	 OH + CO36C9 = C94O2 : 	1.14D-11 	;
+{10903.} 	 C92O2 + HO2 = C92OOH : 	KRO2HO2*0.890 	;
+{10904.} 	 C92O2 + NO = C92O + NO2 : 	KRO2NO 	;
+{10905.} 	 C92O2 + NO3 = C92O + NO2 : 	KRO2NO3 	;
+{10906.} 	 C92O2 = C92O : 	8.80D-13*RO2 	;
+{10907.} 	 HO6C7O2 + HO2 = HO6C7OOH : 	KRO2HO2*0.820 	;
+{10908.} 	 HO6C7O2 + NO = HO6C7O + NO2 : 	KRO2NO 	;
+{10909.} 	 HO6C7O2 + NO3 = HO6C7O + NO2 : 	KRO2NO3 	;
+{10910.} 	 HO6C7O2 = HO6C7O : 	2.00D-12*RO2 	;
+{10911.} 	 C103O2 + HO2 = C103OOH : 	KRO2HO2*0.914 	;
+{10912.} 	 C103O2 + NO = C103NO3 : 	KRO2NO*0.208 	;
+{10913.} 	 C103O2 + NO = C103O + NO2 : 	KRO2NO*0.792 	;
+{10914.} 	 C103O2 + NO3 = C103O + NO2 : 	KRO2NO3 	;
+{10915.} 	 C103O2 = C103CO : 	8.80D-13*0.2*RO2 	;
+{10916.} 	 C103O2 = C103O : 	8.80D-13*0.6*RO2 	;
+{10917.} 	 C103O2 = C103OH : 	8.80D-13*0.2*RO2 	;
+{10918.} 	 CO36C10 = C4H9CO3 + DIEKBO2 : 	J(22)*2 	;
+{10919.} 	 OH + CO36C10 = C104O2 : 	1.28D-11 	;
+{10920.} 	 C102O2 + HO2 = C102OOH : 	KRO2HO2*0.914 	;
+{10921.} 	 C102O2 + NO = C102O + NO2 : 	KRO2NO 	;
+{10922.} 	 C102O2 + NO3 = C102O + NO2 : 	KRO2NO3 	;
+{10923.} 	 C102O2 = C102O : 	8.80D-13*RO2 	;
+{10924.} 	 HO7C8O2 + HO2 = HO7C8OOH : 	KRO2HO2*0.859 	;
+{10925.} 	 HO7C8O2 + NO = HO7C8O + NO2 : 	KRO2NO 	;
+{10926.} 	 HO7C8O2 + NO3 = HO7C8O + NO2 : 	KRO2NO3 	;
+{10927.} 	 HO7C8O2 = HO7C8O : 	2.00D-12*RO2 	;
+{10928.} 	 C113O2 + HO2 = C113OOH : 	KRO2HO2*0.932 	;
+{10929.} 	 C113O2 + NO = C113NO3 : 	KRO2NO*0.215 	;
+{10930.} 	 C113O2 + NO = C113O + NO2 : 	KRO2NO*0.785 	;
+{10931.} 	 C113O2 + NO3 = C113O + NO2 : 	KRO2NO3 	;
+{10932.} 	 C113O2 = C113CO : 	8.80D-13*0.2*RO2 	;
+{10933.} 	 C113O2 = C113O : 	8.80D-13*0.6*RO2 	;
+{10934.} 	 C113O2 = C113OH : 	8.80D-13*0.2*RO2 	;
+{10935.} 	 CO36C11 = C5H11CO3 + DIEKBO2 : 	J(22)*2 	;
+{10936.} 	 OH + CO36C11 = C114O2 : 	1.42D-11 	;
+{10937.} 	 C112O2 + HO2 = C112OOH : 	KRO2HO2*0.932 	;
+{10938.} 	 C112O2 + NO = C112O + NO2 : 	KRO2NO 	;
+{10939.} 	 C112O2 + NO3 = C112O + NO2 : 	KRO2NO3 	;
+{10940.} 	 C112O2 = C112O : 	8.80D-13*RO2 	;
+{10941.} 	 HO8C9O2 + HO2 = HO8C9OOH : 	KRO2HO2*0.890 	;
+{10942.} 	 HO8C9O2 + NO = HO8C9O + NO2 : 	KRO2NO 	;
+{10943.} 	 HO8C9O2 + NO3 = HO8C9O + NO2 : 	KRO2NO3 	;
+{10944.} 	 HO8C9O2 = HO8C9O : 	2.00D-12*RO2 	;
+{10945.} 	 C123O2 + HO2 = C123OOH : 	KRO2HO2*0.947 	;
+{10946.} 	 C123O2 + NO = C123NO3 : 	KRO2NO*0.220 	;
+{10947.} 	 C123O2 + NO = C123O + NO2 : 	KRO2NO*0.780 	;
+{10948.} 	 C123O2 + NO3 = C123O + NO2 : 	KRO2NO3 	;
+{10949.} 	 C123O2 = C123CO : 	8.80D-13*0.2*RO2 	;
+{10950.} 	 C123O2 = C123O : 	8.80D-13*0.6*RO2 	;
+{10951.} 	 C123O2 = C123OH : 	8.80D-13*0.2*RO2 	;
+{10952.} 	 CO36C12 = C6H13CO3 + DIEKBO2 : 	J(22)*2 	;
+{10953.} 	 OH + CO36C12 = C124O2 : 	1.56D-11 	;
+{10954.} 	 C122O2 + HO2 = C122OOH : 	KRO2HO2*0.947 	;
+{10955.} 	 C122O2 + NO = C122O + NO2 : 	KRO2NO 	;
+{10956.} 	 C122O2 + NO3 = C122O + NO2 : 	KRO2NO3 	;
+{10957.} 	 C122O2 = C122O : 	8.80D-13*RO2 	;
+{10958.} 	 CO1H63O2 + HO2 = CO1H63OOH : 	KRO2HO2*0.770 	;
+{10959.} 	 CO1H63O2 + NO = CO1H63NO3 : 	KRO2NO*0.078 	;
+{10960.} 	 CO1H63O2 + NO = CO1H63O + NO2 : 	KRO2NO*0.922 	;
+{10961.} 	 CO1H63O2 + NO3 = CO1H63O + NO2 : 	KRO2NO3 	;
+{10962.} 	 CO1H63O2 = C6COHOCHO : 	2.50D-13*RO2*0.2 	;
+{10963.} 	 CO1H63O2 = CO1H63O : 	2.50D-13*RO2*0.6 	;
+{10964.} 	 CO1H63O2 = CO1H63OH : 	2.50D-13*RO2*0.2 	;
+{10965.} 	 HO2CO3C4O = HCHO + CH3CHOHCO3 : 	KDEC 	;
+{10966.} 	 CO24C4CHO = CO2C3CO3 + CO + HO2 : 	J(34) 	;
+{10967.} 	 NO3 + CO24C4CHO = CO2C3CO3 + CO + HNO3 : 	KNO3AL*5.5 	;
+{10968.} 	 OH + CO24C4CHO = CO2C3CO3 + CO : 	1.33D-11 	;
+{10969.} 	 C5CO24O = CO2C3CO3 + HCHO : 	KDEC 	;
+{10970.} 	 C3NO3COO2 + HO2 = C3NO3COOOH : 	KRO2HO2*0.520 	;
+{10971.} 	 C3NO3COO2 + NO = C3NO3COO + NO2 : 	KRO2NO 	;
+{10972.} 	 C3NO3COO2 + NO3 = C3NO3COO + NO2 : 	KRO2NO3 	;
+{10973.} 	 C3NO3COO2 = C3NO3COO : 	2.00D-12*RO2 	;
+{10974.} 	 HO1CO24C5 = CH3COCH2O2 + HOCH2CO3 : 	J(22)*2 	;
+{10975.} 	 OH + HO1CO24C5 = CO24C4CHO + HO2 : 	3.22D-12 	;
+{10976.} 	 C53NO324CO + OH = C5CO234 + NO2 : 	2.48D-13 	;
+{10977.} 	 C53NO324CO = CH3CO3 + MGLYOX + NO2 : 	J(57) 	;
+{10978.} 	 C53NO324CO = CO24C53O + NO2 : 	J(56) 	;
+{10979.} 	 C4M22CONO3 + OH = MGLYOX + CH3CO3 + NO2 : 	1.51D-11 	;
+{10980.} 	 C4M22CONO3 = CH3CO3 + MGLYOX + NO2 : 	J(56)+J(57) 	;
+{10981.} 	 C43OHCOCHO + OH = CO35C5CHO + HO2 : 	4.74D-11 	;
+{10982.} 	 C43OHCOCHO = HO3C4CO3 + HO2 + CO : 	J(34) 	;
+{10983.} 	 CO35C5CHO = HO2 + CO + CO + MEKCO2 : 	J(22) 	;
+{10984.} 	 CO35C5CHO = HO2 + CO + CO3C4CO3 : 	J(34) 	;
+{10985.} 	 OH + CO35C5CHO = CO3C4CO3 + CO : 	1.44D-11 	;
+{10986.} 	 NBZFUOOH + OH = NBZFUO2 : 	6.18D-12 	;
+{10987.} 	 NBZFUOOH = NBZFUO + OH : 	J(41) 	;
+{10988.} 	 NBZFUO = CO14O3CHO + NO2 : 	KDEC*0.5 	;
+{10989.} 	 NBZFUO = NBZFUONE + HO2 : 	KDEC*0.5 	;
+{10990.} 	 BZFUONOO + CO = CO14O3CHO : 	1.20D-15 	;
+{10991.} 	 BZFUONOO + NO = CO14O3CHO + NO2 : 	1.00D-14 	;
+{10992.} 	 BZFUONOO + NO2 = CO14O3CHO + NO3 : 	1.00D-15 	;
+{10993.} 	 BZFUONOO + SO2 = CO14O3CHO + SO3 : 	7.00D-14 	;
+{10994.} 	 BZFUONOO = CO14O3CHO + H2O2 : 	6.00D-18*H2O 	;
+{10995.} 	 BZFUONOO = CO14O3CO2H : 	1.00D-17*H2O 	;
+{10996.} 	 BZFUOOH + OH = BZFUO2 : 	3.68D-11 	;
+{10997.} 	 BZFUOOH = BZFUO + OH : 	J(41) 	;
+{10998.} 	 BZFUO = CO14O3CHO + HO2 : 	KDEC 	;
+{10999.} 	 BZFUCO + OH = CO14O3CHO + HO2 : 	1.78D-11 	;
+{11000.} 	 BZFUOH + OH = BZFUCO + HO2 : 	2.78D-11 	;
+{11001.} 	 MALANHY + OH = MALANHYO2 : 	1.4D-12 	;
+{11002.} 	 CO2C4DIAL + OH = CO + CO + CO + CO + HO2 : 	2.45D-11 	;
+{11003.} 	 CO2C4DIAL = CO + CO + HO2 + HO2 + CO + CO : 	J(34)*2 	;
+{11004.} 	 DNPHEN + NO3 = NDNPHENO2 : 	2.25D-15 	;
+{11005.} 	 DNPHEN + OH = DNPHENO2 : 	3.00D-14 	;
+{11006.} 	 NPHEN1O2 + HO2 = NPHEN1OOH : 	KRO2HO2*0.770 	;
+{11007.} 	 NPHEN1O2 + NO = NPHEN1O + NO2 : 	KRO2NO 	;
+{11008.} 	 NPHEN1O2 + NO3 = NPHEN1O + NO2 : 	KRO2NO3 	;
+{11009.} 	 NPHEN1O2 = NPHEN1O : 	2.50D-13*RO2 	;
+{11010.} 	 NNCATECO2 + HO2 = NNCATECOOH : 	KRO2HO2*0.770 	;
+{11011.} 	 NNCATECO2 + NO = NNCATECO + NO2 : 	KRO2NO 	;
+{11012.} 	 NNCATECO2 + NO3 = NNCATECO + NO2 : 	KRO2NO3 	;
+{11013.} 	 NNCATECO2 = NNCATECO : 	8.00D-13*RO2 	;
+{11014.} 	 NCATECO2 + HO2 = NCATECOOH : 	KRO2HO2*0.770 	;
+{11015.} 	 NCATECO2 + NO = NCATECO + NO2 : 	KRO2NO 	;
+{11016.} 	 NCATECO2 + NO3 = NCATECO + NO2 : 	KRO2NO3 	;
+{11017.} 	 NCATECO2 = NCATECO : 	8.00D-13*RO2 	;
+{11018.} 	 CATEC1OOH + OH = CATEC1O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11019.} 	 CATEC1OOH = CATEC1O + OH : 	J(41) 	;
+{11020.} 	 NBZQO2 + HO2 = NBZQOOH : 	KRO2HO2*0.770 	;
+{11021.} 	 NBZQO2 + NO = NBZQO + NO2 : 	KRO2NO 	;
+{11022.} 	 NBZQO2 + NO3 = NBZQO + NO2 : 	KRO2NO3 	;
+{11023.} 	 NBZQO2 = NBZQO : 	8.80D-13*RO2 	;
+{11024.} 	 PBZQO2 + HO2 = PBZQOOH : 	KRO2HO2*0.770 	;
+{11025.} 	 PBZQO2 + NO = PBZQO + NO2 : 	KRO2NO 	;
+{11026.} 	 PBZQO2 + NO3 = PBZQO + NO2 : 	KRO2NO3 	;
+{11027.} 	 PBZQO2 = PBZQCO : 	8.80D-13*RO2*0.2 	;
+{11028.} 	 PBZQO2 = PBZQO : 	8.80D-13*RO2*0.6 	;
+{11029.} 	 PBZQO2 = PBZQOH : 	8.80D-13*RO2*0.2 	;
+{11030.} 	 NPTLQO2 + HO2 = NPTLQOOH : 	KRO2HO2*0.820 	;
+{11031.} 	 NPTLQO2 + NO = NPTLQO + NO2 : 	KRO2NO 	;
+{11032.} 	 NPTLQO2 + NO3 = NPTLQO + NO2 : 	KRO2NO3 	;
+{11033.} 	 NPTLQO2 = NPTLQO : 	8.80D-13*RO2 	;
+{11034.} 	 PTLQO2 + HO2 = PTLQOOH : 	KRO2HO2*0.820 	;
+{11035.} 	 PTLQO2 + NO = PTLQO + NO2 : 	KRO2NO 	;
+{11036.} 	 PTLQO2 + NO3 = PTLQO + NO2 : 	KRO2NO3 	;
+{11037.} 	 PTLQO2 = PTLQCO : 	8.80D-13*RO2*0.2 	;
+{11038.} 	 PTLQO2 = PTLQO : 	8.80D-13*RO2*0.6 	;
+{11039.} 	 PTLQO2 = PTLQOH : 	8.80D-13*RO2*0.2 	;
+{11040.} 	 DNCRES + NO3 = NDNCRESO2 : 	7.83D-15 	;
+{11041.} 	 DNCRES + OH = DNCRESO2 : 	5.10D-14 	;
+{11042.} 	 NCRES1O2 + HO2 = NCRES1OOH : 	KRO2HO2*0.820 	;
+{11043.} 	 NCRES1O2 + NO = NCRES1O + NO2 : 	KRO2NO 	;
+{11044.} 	 NCRES1O2 + NO3 = NCRES1O + NO2 : 	KRO2NO3 	;
+{11045.} 	 NCRES1O2 = NCRES1O : 	2.50D-13*RO2 	;
+{11046.} 	 MNNCATECO2 + HO2 = MNNCATCOOH : 	KRO2HO2*0.820 	;
+{11047.} 	 MNNCATECO2 + NO = MNNCATECO + NO2 : 	KRO2NO 	;
+{11048.} 	 MNNCATECO2 + NO3 = MNNCATECO + NO2 : 	KRO2NO3 	;
+{11049.} 	 MNNCATECO2 = MNNCATECO : 	8.00D-13*RO2 	;
+{11050.} 	 MNCATECO2 + HO2 = MNCATECOOH : 	KRO2HO2*0.820 	;
+{11051.} 	 MNCATECO2 + NO = MNCATECO + NO2 : 	KRO2NO 	;
+{11052.} 	 MNCATECO2 + NO3 = MNCATECO + NO2 : 	KRO2NO3 	;
+{11053.} 	 MNCATECO2 = MNCATECO : 	8.00D-13*RO2 	;
+{11054.} 	 MCATEC1OOH + OH = MCATEC1O2 : 	2.05D-10 	;
+{11055.} 	 MCATEC1OOH = MCATEC1O + OH : 	J(41) 	;
+{11056.} 	 MC3CODBCO2 = GLYOX + CH3O2 + CO : 	KDEC*0.35 	;
+{11057.} 	 MC3CODBCO2 = MMALANHY + HO2 : 	KDEC*0.65 	;
+{11058.} 	 MC3ODBCO3H + OH = MC3CODBCO3 : 	4.73D-11 	;
+{11059.} 	 MC3ODBCO3H = CH3COCO3H + HO2 + CO + HO2 + CO : 	J(18)+J(19) 	;
+{11060.} 	 MC3ODBCO3H = MC3CODBCO2 + OH : 	J(41) 	;
+{11061.} 	 MC3CODBPAN + OH = GLYOX + HCHO + CO + NO2 : 	4.37D-11 	;
+{11062.} 	 MC3CODBPAN = MC3CODBCO3 + NO2 : 	KBPAN 	;
+{11063.} 	 C4MALOHOOH + OH = C4M2ALOHO2 : 	4.58D-11 	;
+{11064.} 	 C4MALOHOOH = C4M2ALOHO + OH : 	J(41) 	;
+{11065.} 	 C4MALOHOOH = CO2H3CHO + HO2 + CO + OH : 	J(17)*2 	;
+{11066.} 	 C4M2ALOHO = GLYOX + MGLYOX + HO2 : 	KDEC 	;
+{11067.} 	 C4M2AL2OH + OH = C4M2ALOHO : 	5.70D-11 	;
+{11068.} 	 C4M2AL2OH = CO2H3CHO + HO2 + CO + HO2 : 	J(17)*2 	;
+{11069.} 	 C5DICAROOH + OH = C5134CO2OH + OH : 	1.21D-10 	;
+{11070.} 	 C5DICAROOH + OH = C5DICARBO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11071.} 	 C5DICAROOH = C5DICARBO + OH : 	J(41)+J(15)+J(22) 	;
+{11072.} 	 C5DICARBO = MGLYOX + GLYOX + HO2 : 	KDEC 	;
+{11073.} 	 C5134CO2OH + OH = C54CO + HO2 : 	7.48D-11 	;
+{11074.} 	 C5134CO2OH = CO23C3CHO + HO2 + CO + HO2 : 	J(15)+J(35) 	;
+{11075.} 	 C514CO23OH + OH = C5134CO2OH + HO2 : 	6.26D-11 	;
+{11076.} 	 C514CO23OH = CO2H3CHO + HO2 + CO + HO2 : 	J(15)+J(22) 	;
+{11077.} 	 NTLFUOOH + OH = NTLFUO2 : 	4.44D-12 	;
+{11078.} 	 NTLFUOOH = NTLFUO + OH : 	J(41) 	;
+{11079.} 	 NTLFUO = ACCOMECHO + NO2 : 	KDEC 	;
+{11080.} 	 TLFUONOO + CO = ACCOMECHO : 	1.20D-15 	;
+{11081.} 	 TLFUONOO + NO = ACCOMECHO + NO2 : 	1.00D-14 	;
+{11082.} 	 TLFUONOO + NO2 = ACCOMECHO + NO3 : 	1.00D-15 	;
+{11083.} 	 TLFUONOO + SO2 = ACCOMECHO + SO3 : 	7.00D-14 	;
+{11084.} 	 TLFUONOO = ACCOMECHO + H2O2 : 	6.00D-18*H2O 	;
+{11085.} 	 TLFUONOO = C24O3CCO2H : 	1.00D-17*H2O 	;
+{11086.} 	 TLFUOOH + OH = TLFUO2 : 	2.53D-11 	;
+{11087.} 	 TLFUOOH = TLFUO + OH : 	J(41) 	;
+{11088.} 	 TLFUO = ACCOMECHO + HO2 : 	KDEC 	;
+{11089.} 	 TLFUOH + OH = TLFUO : 	2.19D-11 	;
+{11090.} 	 C5DBCOCO3H + OH = MC4CODBCO3 : 	5.44D-11 	;
+{11091.} 	 C5DBCOCO3H = HCOCO3H + CH3CO3 + CH3CO3 : 	J(24) 	;
+{11092.} 	 C5DBCOCO3H = MC4CODBCO2 + HO2 : 	J(41) 	;
+{11093.} 	 MC4CODBCO2 = BIACET + HO2 + CO : 	KDEC*0.35 	;
+{11094.} 	 MC4CODBCO2 = MMALANHY + CH3O2 : 	KDEC*0.65 	;
+{11095.} 	 MC4CODBPAN + OH = BIACET + CO + CO + NO2 : 	5.08D-11 	;
+{11096.} 	 MC4CODBPAN = MC4CODBCO3 + NO2 : 	KBPAN 	;
+{11097.} 	 MEK2OO + CO = BIACET : 	1.20D-15 	;
+{11098.} 	 MEK2OO + NO = BIACET + NO2 : 	1.00D-14 	;
+{11099.} 	 MEK2OO + NO2 = BIACET + NO3 : 	1.00D-15 	;
+{11100.} 	 MEK2OO + SO2 = BIACET + SO3 : 	7.00D-14 	;
+{11101.} 	 MEK2OO = BIACET + H2O2 : 	6.00D-18*H2O 	;
+{11102.} 	 MC5COOHOOH + OH = MC5CO2OHO2 : 	3.12D-11 	;
+{11103.} 	 MC5COOHOOH = CO2H3CHO + CH3CO3 + OH : 	J(22)+J(17) 	;
+{11104.} 	 MC5COOHOOH = MC5CO2OHO + OH : 	J(41) 	;
+{11105.} 	 MC5CO2OHO = BIACET + GLYOX + HO2 : 	KDEC 	;
+{11106.} 	 MC52CO2OH + OH = MC5CO2OHO : 	2.77D-11 	;
+{11107.} 	 MC52CO2OH = CO2H3CHO + CH3CO3 + HO2 : 	J(22)+J(17) 	;
+{11108.} 	 NOXYFUOOH + OH = NOXYFUO2 : 	4.95D-12 	;
+{11109.} 	 NOXYFUOOH = NOXYFUO + OH : 	J(41) 	;
+{11110.} 	 NOXYFUO = C6OTRIKET + NO2 : 	KDEC 	;
+{11111.} 	 C6OTKETOOH + OH = C6OTKETCO + OH : 	4.42D-11 	;
+{11112.} 	 C6OTKETOOH + OH = C6OTKETO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11113.} 	 C6OTKETOOH = OH + C6OTKETO : 	J(41) 	;
+{11114.} 	 C6OTKETO = MGLYOX + CH3CO3 : 	KDEC 	;
+{11115.} 	 C6OTKETCO + OH = C6O4KETO2 : 	4.65D-13 	;
+{11116.} 	 C6OTKETCO = CH3CO3 + CO + CH3CO3 : 	J(22) 	;
+{11117.} 	 C6OTKETOH + OH = C6OTKETCO + HO2 : 	1.91D-11 	;
+{11118.} 	 OXYFUOOH + OH = OXYFUO2 : 	7.12D-12 	;
+{11119.} 	 OXYFUOOH = OXYFUO + OH : 	J(41) 	;
+{11120.} 	 OXYFUO = C6OTRIKET + HO2 : 	KDEC 	;
+{11121.} 	 OXYFUOH + OH = OXYFUO : 	3.76D-12 	;
+{11122.} 	 DNOXYOL + NO3 = NDNOXYOLO2 : 	7.83D-15 	;
+{11123.} 	 DNOXYOL + OH = DNOXYOLO2 : 	5.10D-14 	;
+{11124.} 	 NOXYOL1O2 + HO2 = NOXYOL1OOH : 	KRO2HO2*0.859 	;
+{11125.} 	 NOXYOL1O2 + NO = NOXYOL1O + NO2 : 	KRO2NO 	;
+{11126.} 	 NOXYOL1O2 + NO3 = NOXYOL1O + NO2 : 	KRO2NO3 	;
+{11127.} 	 NOXYOL1O2 = NOXYOL1O : 	2.50D-13*RO2 	;
+{11128.} 	 NOXYQO2 + HO2 = NOXYQOOH : 	KRO2HO2*0.859 	;
+{11129.} 	 NOXYQO2 + NO = NOXYQO + NO2 : 	KRO2NO 	;
+{11130.} 	 NOXYQO2 + NO3 = NOXYQO + NO2 : 	KRO2NO3 	;
+{11131.} 	 NOXYQO2 = NOXYQO : 	8.80D-13*RO2 	;
+{11132.} 	 OXYQO2 + HO2 = OXYQOOH : 	KRO2HO2*0.859 	;
+{11133.} 	 OXYQO2 + NO = OXYQO + NO2 : 	KRO2NO 	;
+{11134.} 	 OXYQO2 + NO3 = OXYQO + NO2 : 	KRO2NO3 	;
+{11135.} 	 OXYQO2 = OXYQCO : 	8.80D-13*RO2*0.2 	;
+{11136.} 	 OXYQO2 = OXYQO : 	8.80D-13*RO2*0.6 	;
+{11137.} 	 OXYQO2 = OXYQOH : 	8.80D-13*RO2*0.2 	;
+{11138.} 	 OXNNCATCO2 + HO2 = OXNNCATOOH : 	KRO2HO2*0.859 	;
+{11139.} 	 OXNNCATCO2 + NO = OXNNCATCO + NO2 : 	KRO2NO 	;
+{11140.} 	 OXNNCATCO2 + NO3 = OXNNCATCO + NO2 : 	KRO2NO3 	;
+{11141.} 	 OXNNCATCO2 = OXNNCATCO : 	8.00D-13*RO2 	;
+{11142.} 	 OXNCATECO2 + HO2 = OXNCATCOOH : 	KRO2HO2*0.859 	;
+{11143.} 	 OXNCATECO2 + NO = OXNCATECO + NO2 : 	KRO2NO 	;
+{11144.} 	 OXNCATECO2 + NO3 = OXNCATECO + NO2 : 	KRO2NO3 	;
+{11145.} 	 OXNCATECO2 = OXNCATECO : 	8.00D-13*RO2 	;
+{11146.} 	 OCATEC1OOH + OH = OXCATEC1O2 : 	2.05D-10 	;
+{11147.} 	 OCATEC1OOH = OXCATEC1O + OH : 	J(41) 	;
+{11148.} 	 C6CO2OHOOH + OH = C5MCO2OHO2 : 	4.46D-11 	;
+{11149.} 	 C6CO2OHOOH = C5CO243OH + OH + HO2 + CO : 	J(17) 	;
+{11150.} 	 C6CO2OHOOH = C5MCO2OHO + OH : 	J(41)+J(22) 	;
+{11151.} 	 C5MCO2OHO = MGLYOX + MGLYOX + HO2 : 	KDEC 	;
+{11152.} 	 C6CO2M2OH + OH = C6CO3MOH + HO2 : 	4.13D-11 	;
+{11153.} 	 C6CO2M2OH = C5CO243OH + HO2 + CO + HO2 : 	J(22)+J(17) 	;
+{11154.} 	 NMXYFUOOH + OH = NMXYFUO2 : 	5.80D-12 	;
+{11155.} 	 NMXYFUOOH = NMXYFUO + OH : 	J(41) 	;
+{11156.} 	 NMXYFUO = C23O3MCHO + NO2 : 	KDEC 	;
+{11157.} 	 C23O3MCOOH + OH = ACECOCOCH3 + OH : 	6.01D-11 	;
+{11158.} 	 C23O3MCOOH + OH = C23O3MO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11159.} 	 C23O3MCOOH = C23O3MO + OH : 	J(41) 	;
+{11160.} 	 C23O3MO = CH3CHO + CH3CO3 : 	KDEC 	;
+{11161.} 	 C23O3MOH + OH = ACECOCOCH3 + HO2 : 	2.54D-11 	;
+{11162.} 	 MXYFUOOH + OH = MXYFUO2 : 	3.09D-11 	;
+{11163.} 	 MXYFUOOH = MXYFUO + OH : 	J(41) 	;
+{11164.} 	 MXYFUO = C23O3MCHO + HO2 : 	KDEC 	;
+{11165.} 	 MXYFUOH + OH = MXYFUO : 	2.74D-11 	;
+{11166.} 	 NPXYFUOOH + OH = NPXYFUO2 : 	5.16D-12 	;
+{11167.} 	 NPXYFUOOH = NPXYFUO + OH : 	J(41) 	;
+{11168.} 	 NPXYFUO = C23O3CCHO + NO2 : 	KDEC 	;
+{11169.} 	 MCOCOMOOOH + OH = MCOCOMOXO2 : 	2.00D-11 	;
+{11170.} 	 MCOCOMOOOH = CH3CO3 + HCHO + OH : 	J(22) 	;
+{11171.} 	 MCOCOMOOOH = MCOCOMOXO + OH : 	J(41) 	;
+{11172.} 	 MCOCOMOXO = HCHO + CH3CO3 : 	KDEC 	;
+{11173.} 	 PXYFUOOH + OH = PXYFUO2 : 	2.78D-11 	;
+{11174.} 	 PXYFUOOH = PXYFUO + OH : 	J(41) 	;
+{11175.} 	 PXYFUO = C23O3CCHO + HO2 : 	KDEC 	;
+{11176.} 	 PXYFUOH + OH = PXYFUO : 	2.44D-11 	;
+{11177.} 	 MMALANHY + OH = MMALANHYO2 : 	1.50D-12 	;
+{11178.} 	 DNMXYOL + NO3 = NDNMXYOLO2 : 	7.83D-15 	;
+{11179.} 	 DNMXYOL + OH = DNMXYOLO2 : 	5.10D-14 	;
+{11180.} 	 NMXYOL1O2 + HO2 = NMXYOL1OOH : 	KRO2HO2*0.859 	;
+{11181.} 	 NMXYOL1O2 + NO = NMXYOL1O + NO2 : 	KRO2NO 	;
+{11182.} 	 NMXYOL1O2 + NO3 = NMXYOL1O + NO2 : 	KRO2NO3 	;
+{11183.} 	 NMXYOL1O2 = NMXYOL1O : 	2.50D-13*RO2 	;
+{11184.} 	 NMXYQO2 + HO2 = NMXYQOOH : 	KRO2HO2*0.859 	;
+{11185.} 	 NMXYQO2 + NO = NMXYQO + NO2 : 	KRO2NO 	;
+{11186.} 	 NMXYQO2 + NO3 = NMXYQO + NO2 : 	KRO2NO3 	;
+{11187.} 	 NMXYQO2 = NMXYQO : 	9.20D-14*RO2 	;
+{11188.} 	 MXYQO2 + HO2 = MXYQOOH : 	KRO2HO2*0.859 	;
+{11189.} 	 MXYQO2 + NO = MXYQO + NO2 : 	KRO2NO 	;
+{11190.} 	 MXYQO2 + NO3 = MXYQO + NO2 : 	KRO2NO3 	;
+{11191.} 	 MXYQO2 = MXYQO : 	9.20D-14*RO2*0.7 	;
+{11192.} 	 MXYQO2 = MXYQOH : 	9.20D-14*RO2*0.3 	;
+{11193.} 	 MXNNCATCO2 + HO2 = MXNNCATOOH : 	KRO2HO2*0.859 	;
+{11194.} 	 MXNNCATCO2 + NO = MXNNCATCO + NO2 : 	KRO2NO 	;
+{11195.} 	 MXNNCATCO2 + NO3 = MXNNCATCO + NO2 : 	KRO2NO3 	;
+{11196.} 	 MXNNCATCO2 = MXNNCATCO : 	8.00D-13*RO2 	;
+{11197.} 	 MXNCATECO2 + HO2 = MXNCATCOOH : 	KRO2HO2*0.859 	;
+{11198.} 	 MXNCATECO2 + NO = MXNCATECO + NO2 : 	KRO2NO 	;
+{11199.} 	 MXNCATECO2 + NO3 = MXNCATECO + NO2 : 	KRO2NO3 	;
+{11200.} 	 MXNCATECO2 = MXNCATECO : 	8.00D-13*RO2 	;
+{11201.} 	 MXCTEC1OOH + OH = MXCATEC1O2 : 	2.05D-10 	;
+{11202.} 	 MXCTEC1OOH = MXCATEC1O + OH : 	J(41) 	;
+{11203.} 	 TOL4OHNO2 + OH = TL4OHNO2O2 : 	3.6D-12 	;
+{11204.} 	 DMKOHOOH + OH = DMKCOOH + OH : 	9.75D-11 	;
+{11205.} 	 DMKOHOOH + OH = DMKOHO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11206.} 	 DMKOHOOH = CO2H3CHO + CH3CO3 + OH : 	J(22)*2 	;
+{11207.} 	 DMKOHOOH = DMKOHO + OH : 	J(41) 	;
+{11208.} 	 DMKOHO = CO2H3CHO + CH3CO3 : 	KDEC*0.7 	;
+{11209.} 	 DMKOHO = MGLYOX + MGLYOX + HO2 : 	KDEC*0.3 	;
+{11210.} 	 DMK2OH + OH = DMKCOOH + HO2 : 	4.00D-11 	;
+{11211.} 	 DMK2OH = CO2H3CHO + CH3CO3 + HO2 : 	J(22)*2 	;
+{11212.} 	 DMKCOOH + OH = C62O : 	9.04D-12 	;
+{11213.} 	 DMKCOOH = CO23C3CHO + CH3CO3 + HO2 : 	J(22) 	;
+{11214.} 	 DMKCOOH = CO2H3CO3 + CH3CO3 : 	J(35) 	;
+{11215.} 	 DNPXYOL + NO3 = NDNPXYOLO2 : 	7.83D-15 	;
+{11216.} 	 DNPXYOL + OH = DNPXYOLO2 : 	5.10D-14 	;
+{11217.} 	 NPXYOL1O2 + HO2 = NPXYOL1OOH : 	KRO2HO2*0.859 	;
+{11218.} 	 NPXYOL1O2 + NO = NPXYOL1O + NO2 : 	KRO2NO 	;
+{11219.} 	 NPXYOL1O2 + NO3 = NPXYOL1O + NO2 : 	KRO2NO3 	;
+{11220.} 	 NPXYOL1O2 = NPXYOL1O : 	2.50D-13*RO2 	;
+{11221.} 	 NPXYQO2 + HO2 = NPXYQOOH : 	KRO2HO2*0.859 	;
+{11222.} 	 NPXYQO2 + NO = NPXYQO + NO2 : 	KRO2NO 	;
+{11223.} 	 NPXYQO2 + NO3 = NPXYQO + NO2 : 	KRO2NO3 	;
+{11224.} 	 NPXYQO2 = NPXYQO : 	9.20D-14*RO2 	;
+{11225.} 	 PXYQO2 + HO2 = PXYQOOH : 	KRO2HO2*0.859 	;
+{11226.} 	 PXYQO2 + NO = PXYQO + NO2 : 	KRO2NO 	;
+{11227.} 	 PXYQO2 + NO3 = PXYQO + NO2 : 	KRO2NO3 	;
+{11228.} 	 PXYQO2 = PXYQO : 	9.20D-14*RO2*0.70 	;
+{11229.} 	 PXYQO2 = PXYQOH : 	9.20D-14*RO2*0.30 	;
+{11230.} 	 PXNNCATCO2 + HO2 = PXNNCATOOH : 	KRO2HO2*0.859 	;
+{11231.} 	 PXNNCATCO2 + NO = PXNNCATCO + NO2 : 	KRO2NO 	;
+{11232.} 	 PXNNCATCO2 + NO3 = PXNNCATCO + NO2 : 	KRO2NO3 	;
+{11233.} 	 PXNNCATCO2 = PXNNCATCO : 	8.00D-13*RO2 	;
+{11234.} 	 PXNCATECO2 + HO2 = PXNCATCOOH : 	KRO2HO2*0.859 	;
+{11235.} 	 PXNCATECO2 + NO = PXNCATECO + NO2 : 	KRO2NO 	;
+{11236.} 	 PXNCATECO2 + NO3 = PXNCATECO + NO2 : 	KRO2NO3 	;
+{11237.} 	 PXNCATECO2 = PXNCATECO : 	8.00D-13*RO2 	;
+{11238.} 	 PCATEC1OOH + OH = PXCATEC1O2 : 	2.05D-10 	;
+{11239.} 	 PCATEC1OOH = PXCATEC1O + OH : 	J(41) 	;
+{11240.} 	 DNEBNZOL + NO3 = NDNEBNZLO2 : 	7.83D-15 	;
+{11241.} 	 DNEBNZOL + OH = DNEBNZLO2 : 	5.10D-14 	;
+{11242.} 	 NEBNZ1O2 + HO2 = NEBNZ1OOH : 	KRO2HO2*0.859 	;
+{11243.} 	 NEBNZ1O2 + NO = NEBNZ1O + NO2 : 	KRO2NO 	;
+{11244.} 	 NEBNZ1O2 + NO3 = NEBNZ1O + NO2 : 	KRO2NO3 	;
+{11245.} 	 NEBNZ1O2 = NEBNZ1O : 	2.50D-13*RO2 	;
+{11246.} 	 NPEBQO2 + HO2 = NPEBQOOH : 	KRO2HO2*0.859 	;
+{11247.} 	 NPEBQO2 + NO = NPEBQO + NO2 : 	KRO2NO 	;
+{11248.} 	 NPEBQO2 + NO3 = NPEBQO + NO2 : 	KRO2NO3 	;
+{11249.} 	 NPEBQO2 = NPEBQO : 	8.80D-13*RO2 	;
+{11250.} 	 PEBQO2 + HO2 = PEBQOOH : 	KRO2HO2*0.859 	;
+{11251.} 	 PEBQO2 + NO = PEBQO + NO2 : 	KRO2NO 	;
+{11252.} 	 PEBQO2 + NO3 = PEBQO + NO2 : 	KRO2NO3 	;
+{11253.} 	 PEBQO2 = PEBQCO : 	8.80D-13*RO2*0.20 	;
+{11254.} 	 PEBQO2 = PEBQO : 	8.80D-13*RO2*0.60 	;
+{11255.} 	 PEBQO2 = PEBQOH : 	8.80D-13*RO2*0.20 	;
+{11256.} 	 ENNCATECO2 + HO2 = ENNCATCOOH : 	KRO2HO2*0.859 	;
+{11257.} 	 ENNCATECO2 + NO = ENNCATECO + NO2 : 	KRO2NO 	;
+{11258.} 	 ENNCATECO2 + NO3 = ENNCATECO + NO2 : 	KRO2NO3 	;
+{11259.} 	 ENNCATECO2 = ENNCATECO : 	8.00D-13*RO2 	;
+{11260.} 	 ENCATECO2 + HO2 = ENCATECOOH : 	KRO2HO2*0.859 	;
+{11261.} 	 ENCATECO2 + NO = ENCATECO + NO2 : 	KRO2NO 	;
+{11262.} 	 ENCATECO2 + NO3 = ENCATECO + NO2 : 	KRO2NO3 	;
+{11263.} 	 ENCATECO2 = ENCATECO : 	8.00D-13*RO2 	;
+{11264.} 	 ECATEC1OOH + OH = ECATEC1O2 : 	2.05D-10 	;
+{11265.} 	 ECATEC1OOH = ECATEC1O + OH : 	J(41) 	;
+{11266.} 	 C6DICAROOH + OH = C6DICARBO2 : 	1.16D-10 	;
+{11267.} 	 C6DICAROOH = C32OH13CO + C2H5CO3 + OH : 	J(22) 	;
+{11268.} 	 C6DICAROOH = C6DICARBO + OH : 	J(41)+J(15) 	;
+{11269.} 	 C6DICARBO = EGLYOX + GLYOX + HO2 : 	KDEC 	;
+{11270.} 	 C6134CO2OH + OH = ECO4 + HO2 : 	7.71D-11 	;
+{11271.} 	 C6134CO2OH = HCOCOHCO3 + C2H5CO3 : 	J(35) 	;
+{11272.} 	 C614CO23OH + OH = C6134CO2OH + HO2 : 	6.21D-11 	;
+{11273.} 	 C614CO23OH = C32OH13CO + C2H5CO3 + HO2 : 	J(22) 	;
+{11274.} 	 C614CO23OH = CO3H4CHO + HO2 + CO + HO2 : 	J(15) 	;
+{11275.} 	 NEBFUOOH + OH = NEBFUO2 : 	8.18D-11 	;
+{11276.} 	 NEBFUOOH = NEBFUO + OH : 	J(41) 	;
+{11277.} 	 NEBFUO = C14O3ECHO + NO2 : 	KDEC*0.5 	;
+{11278.} 	 NEBFUO = NEBFUONE + HO2 : 	KDEC*0.5 	;
+{11279.} 	 BUTALAOOH + OH = BUTALAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11280.} 	 BUTALAOOH + OH = EGLYOX + OH : 	3.95D-11 	;
+{11281.} 	 BUTALAOOH = BUTAL2O + OH : 	J(41) 	;
+{11282.} 	 EBFUOOH + OH = EBFUO2 : 	4.23D-11 	;
+{11283.} 	 EBFUOOH = EBFUO + OH : 	J(41) 	;
+{11284.} 	 EBFUO = C14O3ECHO + HO2 : 	KDEC 	;
+{11285.} 	 EBFUCO + OH = C14O3ECHO + HO2 : 	3.24D-11 	;
+{11286.} 	 EBFUOH + OH = EBFUCO + HO2 : 	3.33D-11 	;
+{11287.} 	 CO3H4CO3 + HO2 = CO3H4CO3H : 	KAPHO2*0.56 	;
+{11288.} 	 CO3H4CO3 + HO2 = EGLYOX + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{11289.} 	 CO3H4CO3 + NO = EGLYOX + HO2 + CO + NO2 : 	KAPNO 	;
+{11290.} 	 CO3H4CO3 + NO2 = CO3H4PAN : 	KFPAN 	;
+{11291.} 	 CO3H4CO3 + NO3 = EGLYOX + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{11292.} 	 CO3H4CO3 = EGLYOX + HO2 + CO : 	1.00D-11*RO2 	;
+{11293.} 	 C7CO3OHOOH + OH = C7CO3OHO2 : 	5.73D-11 	;
+{11294.} 	 C7CO3OHOOH = C7CO3OHO + OH : 	J(41)+J(34) 	;
+{11295.} 	 C7CO3OHO = C33CO + EGLYOX + HO2 : 	KDEC 	;
+{11296.} 	 PHCOCOCO2 + HO2 = PHCOCOCOOH : 	KRO2HO2*0.890 	;
+{11297.} 	 PHCOCOCO2 + NO = PHCOCOCO + NO2 : 	KRO2NO 	;
+{11298.} 	 PHCOCOCO2 + NO3 = PHCOCOCO + NO2 : 	KRO2NO3 	;
+{11299.} 	 PHCOCOCO2 = PHCOCOCO : 	2.00D-12*RO2 	;
+{11300.} 	 DNPBNZOL + NO3 = NDNPBNZLO2 : 	7.83D-15 	;
+{11301.} 	 DNPBNZOL + OH = DNPBNZLO2 : 	5.10D-14 	;
+{11302.} 	 NPBNZ1O2 + HO2 = NPBNZ1OOH : 	KRO2HO2*0.90 	;
+{11303.} 	 NPBNZ1O2 + NO = NPBNZ1O + NO2 : 	KRO2NO 	;
+{11304.} 	 NPBNZ1O2 + NO3 = NPBNZ1O + NO2 : 	KRO2NO3 	;
+{11305.} 	 NPBNZ1O2 = NPBNZ1O : 	2.50D-13*RO2 	;
+{11306.} 	 NPPRBQO2 + HO2 = NPPRBQOOH : 	KRO2HO2*0.890 	;
+{11307.} 	 NPPRBQO2 + NO = NPPRBQO + NO2 : 	KRO2NO 	;
+{11308.} 	 NPPRBQO2 + NO3 = NPPRBQO + NO2 : 	KRO2NO3 	;
+{11309.} 	 NPPRBQO2 = NPPRBQO : 	8.80D-13*RO2 	;
+{11310.} 	 PPRBQO2 + HO2 = PPRBQOOH : 	KRO2HO2*0.890 	;
+{11311.} 	 PPRBQO2 + NO = PPRBQO + NO2 : 	KRO2NO 	;
+{11312.} 	 PPRBQO2 + NO3 = PPRBQO + NO2 : 	KRO2NO3 	;
+{11313.} 	 PPRBQO2 = PPRBQCO : 	8.80D-13*RO2*0.20 	;
+{11314.} 	 PPRBQO2 = PPRBQO : 	8.80D-13*RO2*0.60 	;
+{11315.} 	 PPRBQO2 = PPRBQOH : 	8.80D-13*RO2*0.20 	;
+{11316.} 	 PNNCATECO2 + HO2 = PNNCATCOOH : 	KRO2HO2*0.90 	;
+{11317.} 	 PNNCATECO2 + NO = PNNCATECO + NO2 : 	KRO2NO 	;
+{11318.} 	 PNNCATECO2 + NO3 = PNNCATECO + NO2 : 	KRO2NO3 	;
+{11319.} 	 PNNCATECO2 = PNNCATECO : 	8.00D-13*RO2 	;
+{11320.} 	 PNCATECO2 + HO2 = PNCATECOOH : 	KRO2HO2*0.90 	;
+{11321.} 	 PNCATECO2 + NO = PNCATECO + NO2 : 	KRO2NO 	;
+{11322.} 	 PNCATECO2 + NO3 = PNCATECO + NO2 : 	KRO2NO3 	;
+{11323.} 	 PNCATECO2 = PNCATECO : 	8.00D-13*RO2 	;
+{11324.} 	 PRCATC1OOH + OH = PCATEC1O2 : 	2.05D-10 	;
+{11325.} 	 PRCATC1OOH = PCATEC1O + OH : 	J(41) 	;
+{11326.} 	 C7DCOOH + OH = C61CHO + OH : 	6.50D-11 	;
+{11327.} 	 C7DCOOH = C7DCO + OH : 	J(41)+J(15)+J(22) 	;
+{11328.} 	 C7DCO = PGLYOX + GLYOX + HO2 : 	KDEC 	;
+{11329.} 	 C61CHO + NO3 = C61CO3 + HNO3 : 	KNO3AL*5.5 	;
+{11330.} 	 C61CHO + OH = C61CO3 : 	7.09D-11 	;
+{11331.} 	 C61CHO = C3H7CO3 + CO + GLYOX + OH : 	J(22) 	;
+{11332.} 	 C61CHO = C3H7CO3 + HCOCOHCO3 : 	J(35) 	;
+{11333.} 	 C61CHO = CO45C5CHO + HO2 + CO + HO2 : 	J(15) 	;
+{11334.} 	 C7DCOH + OH = C61CHO + HO2 : 	4.43D-11 	;
+{11335.} 	 C7DCOH = C7DCO + HO2 : 	J(15)+J(22) 	;
+{11336.} 	 NPBFUOOH + OH = NPBFUO2 : 	9.59D-11 	;
+{11337.} 	 NPBFUOOH = NPBFUO + OH : 	J(41) 	;
+{11338.} 	 NPBFUO = C14O3PCHO + NO2 : 	KDEC*0.5 	;
+{11339.} 	 NPBFUO = NPBFUONE + HO2 : 	KDEC*0.5 	;
+{11340.} 	 C4CHOAOOH + OH = C4CHOAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11341.} 	 C4CHOAOOH + OH = PGLYOX + OH : 	4.15D-11 	;
+{11342.} 	 C4CHOAOOH = C4CHO2O + OH : 	J(41) 	;
+{11343.} 	 PBFUOOH + OH = PBFUO2 : 	4.38D-11 	;
+{11344.} 	 PBFUOOH = PBFUO + OH : 	J(41) 	;
+{11345.} 	 PBFUO = C14O3PCHO + HO2 : 	KDEC 	;
+{11346.} 	 PBFUCO + OH = C14O3PCHO + HO2 : 	3.39D-11 	;
+{11347.} 	 PBFUOH + OH = PBFUCO + HO2 : 	3.47D-11 	;
+{11348.} 	 C5O45OHCO3 + HO2 = C5O5OHCO3H : 	KAPHO2*0.56 	;
+{11349.} 	 C5O45OHCO3 + HO2 = PGLYOX + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{11350.} 	 C5O45OHCO3 + NO = PGLYOX + HO2 + CO + NO2 : 	KAPNO 	;
+{11351.} 	 C5O45OHCO3 + NO2 = C5O45OHPAN : 	KFPAN 	;
+{11352.} 	 C5O45OHCO3 + NO3 = PGLYOX + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{11353.} 	 C5O45OHCO3 = PGLYOX + HO2 + CO : 	1.00D-11*RO2 	;
+{11354.} 	 C83COOHOOH + OH = C8CO3OHO2 : 	5.73D-11 	;
+{11355.} 	 C83COOHOOH = C8CO3OHO + OH : 	J(41)+J(34) 	;
+{11356.} 	 C8CO3OHO = C33CO + PGLYOX + HO2 : 	KDEC 	;
+{11357.} 	 PHCOMEOOH + OH = PHGLYOX + OH : 	2.05D-11 	;
+{11358.} 	 PHCOMEOOH = PHCOMEO + OH : 	J(41) 	;
+{11359.} 	 PHCOMEO = C6H5CO3 + HCHO : 	KDEC 	;
+{11360.} 	 PHCOMEOH + OH = PHGLYOX + HO2 : 	8.93D-12 	;
+{11361.} 	 PHGLYOX + NO3 = C6H5CO3 + CO + HNO3 : 	KNO3AL 	;
+{11362.} 	 PHGLYOX + OH = C6H5CO3 + CO : 	1.29D-11 	;
+{11363.} 	 PHGLYOX = C6H5CO3 + CO + HO2 : 	J(34) 	;
+{11364.} 	 DNIPBNZOL + NO3 = NDNIPBZLO2 : 	7.83D-15 	;
+{11365.} 	 DNIPBNZOL + OH = DNIPBNZLO2 : 	5.10D-14 	;
+{11366.} 	 NIPBNZ1O2 + HO2 = NIPBNZ1OOH : 	KRO2HO2*0.90 	;
+{11367.} 	 NIPBNZ1O2 + NO = NIPBNZ1O + NO2 : 	KRO2NO 	;
+{11368.} 	 NIPBNZ1O2 + NO3 = NIPBNZ1O + NO2 : 	KRO2NO3 	;
+{11369.} 	 NIPBNZ1O2 = NIPBNZ1O : 	2.50D-13*RO2 	;
+{11370.} 	 NIPRBQO2 + HO2 = NIPRBQOOH : 	KRO2HO2*0.890 	;
+{11371.} 	 NIPRBQO2 + NO = NIPRBQO + NO2 : 	KRO2NO 	;
+{11372.} 	 NIPRBQO2 + NO3 = NIPRBQO + NO2 : 	KRO2NO3 	;
+{11373.} 	 NIPRBQO2 = NIPRBQO : 	8.80D-13*RO2 	;
+{11374.} 	 IPRBQO2 + HO2 = IPRBQOOH : 	KRO2HO2*0.890 	;
+{11375.} 	 IPRBQO2 + NO = IPRBQO + NO2 : 	KRO2NO 	;
+{11376.} 	 IPRBQO2 + NO3 = IPRBQO + NO2 : 	KRO2NO3 	;
+{11377.} 	 IPRBQO2 = IPRBQCO : 	8.80D-13*RO2*0.20 	;
+{11378.} 	 IPRBQO2 = IPRBQO : 	8.80D-13*RO2*0.60 	;
+{11379.} 	 IPRBQO2 = IPRBQOH : 	8.80D-13*RO2*0.20 	;
+{11380.} 	 IPNNCATCO2 + HO2 = IPNNCATOOH : 	KRO2HO2*0.90 	;
+{11381.} 	 IPNNCATCO2 + NO = IPNNCATCO + NO2 : 	KRO2NO 	;
+{11382.} 	 IPNNCATCO2 + NO3 = IPNNCATCO + NO2 : 	KRO2NO3 	;
+{11383.} 	 IPNNCATCO2 = IPNNCATCO : 	8.00D-13*RO2 	;
+{11384.} 	 IPNCATECO2 + HO2 = IPNCATCOOH : 	KRO2HO2*0.90 	;
+{11385.} 	 IPNCATECO2 + NO = IPNCATECO + NO2 : 	KRO2NO 	;
+{11386.} 	 IPNCATECO2 + NO3 = IPNCATECO + NO2 : 	KRO2NO3 	;
+{11387.} 	 IPNCATECO2 = IPNCATECO : 	8.00D-13*RO2 	;
+{11388.} 	 IPCATC1OOH + OH = IPCATEC1O2 : 	2.05D-10 	;
+{11389.} 	 IPCATC1OOH = IPCATEC1O + OH : 	J(41) 	;
+{11390.} 	 IC7DCOOH + OH = C62CHO + OH : 	6.30D-11 	;
+{11391.} 	 IC7DCOOH = IC7DCO + OH : 	J(41)+J(15)+J(22) 	;
+{11392.} 	 IC7DCO = IPRGLYOX + GLYOX + HO2 : 	KDEC 	;
+{11393.} 	 C62CHO + NO3 = C62CO3 + HNO3 : 	KNO3AL*8.5 	;
+{11394.} 	 C62CHO + OH = C62CO3 : 	6.89D-11 	;
+{11395.} 	 C62CHO = C45IC5CHO + HO2 + CO + HO2 : 	J(15) 	;
+{11396.} 	 C62CHO = IPRCO3 + CO + GLYOX + OH : 	J(22) 	;
+{11397.} 	 C62CHO = IPRCO3 + HCOCOHCO3 : 	J(35) 	;
+{11398.} 	 IC7DCOH + OH = C62CHO + HO2 : 	4.23D-11 	;
+{11399.} 	 IC7DCOH = IC7DCO + HO2 : 	J(15)+J(22) 	;
+{11400.} 	 NIPBFUOOH + OH = NIPBFUO2 : 	9.59D-12 	;
+{11401.} 	 NIPBFUOOH = NIPBFUO + OH : 	J(41) 	;
+{11402.} 	 NIPBFUO = C14O3IPCHO + NO2 : 	KDEC*0.5 	;
+{11403.} 	 NIPBFUO = NIPBFUONE + HO2 : 	KDEC*0.5 	;
+{11404.} 	 IC4CHOAOOH + OH = IC4CHOAO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11405.} 	 IC4CHOAOOH + OH = IPRGLYOX + OH : 	4.31D-11 	;
+{11406.} 	 IC4CHOAOOH = M3BUTAL2O + OH : 	J(41) 	;
+{11407.} 	 IPBFUOOH + OH = IPBFUO2 : 	4.37D-11 	;
+{11408.} 	 IPBFUOOH = IPBFUO + OH : 	J(41) 	;
+{11409.} 	 IPBFUO = C14O3IPCHO + HO2 : 	KDEC 	;
+{11410.} 	 IPBFUCO + OH = C14O3IPCHO + HO2 : 	3.38D-11 	;
+{11411.} 	 IPBFUOH + OH = IPBFUCO + HO2 : 	3.47D-11 	;
+{11412.} 	 C4MOHOCO3 + HO2 = C4MOHOCO3H : 	KAPHO2*0.56 	;
+{11413.} 	 C4MOHOCO3 + HO2 = IPRGLYOX + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{11414.} 	 C4MOHOCO3 + NO = IPRGLYOX + HO2 + CO + NO2 : 	KAPNO 	;
+{11415.} 	 C4MOHOCO3 + NO2 = C4MOHOPAN : 	KFPAN 	;
+{11416.} 	 C4MOHOCO3 + NO3 = IPRGLYOX + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{11417.} 	 C4MOHOCO3 = IPRGLYOX + HO2 + CO : 	1.00D-11*RO2 	;
+{11418.} 	 C7MO3OHOOH + OH = C7MCO3OHO2 : 	5.73D-11 	;
+{11419.} 	 C7MO3OHOOH = C7MCO3OHO + OH : 	J(41)+J(34) 	;
+{11420.} 	 C7MCO3OHO = C33CO + IPRGLYOX + HO2 : 	KDEC 	;
+{11421.} 	 C7ADCCO2 = BIACET + CH3CO3 : 	KDEC*0.35 	;
+{11422.} 	 C7ADCCO2 = DMMALANHY + CH3O2 : 	KDEC*0.65 	;
+{11423.} 	 DNT123BOL + NO3 = NDNT123LO2 : 	7.83D-15 	;
+{11424.} 	 DNT123BOL + OH = DNT123LO2 : 	5.10D-14 	;
+{11425.} 	 NT123L1O2 + HO2 = NT123L1OOH : 	KRO2HO2*0.90 	;
+{11426.} 	 NT123L1O2 + NO = NT123L1O + NO2 : 	KRO2NO 	;
+{11427.} 	 NT123L1O2 + NO3 = NT123L1O + NO2 : 	KRO2NO3 	;
+{11428.} 	 NT123L1O2 = NT123L1O : 	2.50D-13*RO2 	;
+{11429.} 	 T123NNCTO2 + HO2 = T123NNCOOH : 	KRO2HO2*0.90 	;
+{11430.} 	 T123NNCTO2 + NO = T123NNCTO + NO2 : 	KRO2NO 	;
+{11431.} 	 T123NNCTO2 + NO3 = T123NNCTO + NO2 : 	KRO2NO3 	;
+{11432.} 	 T123NNCTO2 = T123NNCTO : 	8.00D-13*RO2 	;
+{11433.} 	 T123NCATO2 + HO2 = T123NCTOOH : 	KRO2HO2*0.90 	;
+{11434.} 	 T123NCATO2 + NO = T123NCATO + NO2 : 	KRO2NO 	;
+{11435.} 	 T123NCATO2 + NO3 = T123NCATO + NO2 : 	KRO2NO3 	;
+{11436.} 	 T123NCATO2 = T123NCATO : 	8.00D-13*RO2 	;
+{11437.} 	 T123CT1OOH + OH = T123CAT1O2 : 	2.05D-10 	;
+{11438.} 	 T123CT1OOH = T123CAT1O + OH : 	J(41) 	;
+{11439.} 	 C7ADCCO3H + OH = C7ADCCO3 : 	4.84D-11 	;
+{11440.} 	 C7ADCCO3H = BIACET + CH3CO3 + OH : 	J(24) 	;
+{11441.} 	 C7ADCCO3H = C7ADCCO2 : 	J(41) 	;
+{11442.} 	 C7ADCPAN + OH = BIACET + HCHO + CO + CO + NO2 : 	4.48D-11 	;
+{11443.} 	 C7ADCPAN = C7ADCCO3 + NO2 : 	KBPAN 	;
+{11444.} 	 C7ADCOOH + OH = C7ADCO2 : 	7.40D-11 	;
+{11445.} 	 C7ADCOOH = C7ADCO + OH : 	J(41)+J(15)+J(22) 	;
+{11446.} 	 C7ADCO = BIACET + MGLYOX + HO2 : 	KDEC 	;
+{11447.} 	 C7ADCOH + OH = C7ADCO : 	5.33D-11 	;
+{11448.} 	 C7ADCOH = C7ADCO + HO2 : 	J(15)+J(22) 	;
+{11449.} 	 NTMB1FUOOH + OH = NTMB1FUO2 : 	9.93D-11 	;
+{11450.} 	 NTMB1FUOOH = NTMB1FUO + OH : 	J(41) 	;
+{11451.} 	 NTMB1FUO = C5OCO3M + NO2 : 	KDEC 	;
+{11452.} 	 TMB1FUOOH + OH = TMB1FUO2 : 	1.37D-11 	;
+{11453.} 	 TMB1FUOOH = TMB1FUO + OH : 	J(41) 	;
+{11454.} 	 TMB1FUO = C5OCO3M + HO2 : 	KDEC 	;
+{11455.} 	 TMB1FUOH + OH = TMB1FUO : 	1.02D-11 	;
+{11456.} 	 NTMB2FUOOH + OH = NTMB2FUO2 : 	5.59D-12 	;
+{11457.} 	 NTMB2FUOOH = NTMB2FUO + OH : 	J(41) 	;
+{11458.} 	 NTMB2FUO = MC6OTRIKET + NO2 : 	KDEC 	;
+{11459.} 	 MC6OTKTOOH + OH = MC6OTKETO2 : 	4.46D-12 	;
+{11460.} 	 MC6OTKTOOH = OH + MC6OTKETO : 	J(41) 	;
+{11461.} 	 MC6OTKETO = BIACET + CH3CO3 : 	KDEC 	;
+{11462.} 	 MC6OTKETOH + OH = MC6OTKETO : 	1.01D-12 	;
+{11463.} 	 TMB2FUOOH + OH = TMB2FUO2 : 	1.02D-11 	;
+{11464.} 	 TMB2FUOOH = TMB2FUO + OH : 	J(41) 	;
+{11465.} 	 TMB2FUO = MC6OTRIKET + HO2 : 	KDEC 	;
+{11466.} 	 TMB2FUOH + OH = TMB2FUO : 	6.75D-12 	;
+{11467.} 	 DM124OHNO2 + OH = TM124NO2O2 : 	1.53D-12 	;
+{11468.} 	 C7BDCOOH + OH = C7BDCO2 : 	2.59D-11 	;
+{11469.} 	 C7BDCOOH = C5CO243OH + CH3CO3 + OH : 	J(22)*2 	;
+{11470.} 	 C7BDCOOH = C7BDCO + OH : 	J(41) 	;
+{11471.} 	 C7BDCO = C5CO243OH + CH3CO3 : 	KDEC*0.7 	;
+{11472.} 	 C7BDCO = MGLYOX + BIACET + HO2 : 	KDEC*0.3 	;
+{11473.} 	 C7BDCOH + OH = C7BDCO : 	2.24D-11 	;
+{11474.} 	 C7BDCOH = C5CO243OH + CH3CO3 + HO2 : 	J(22)*2 	;
+{11475.} 	 DNT124BOL + NO3 = NDNT124LO2 : 	7.83D-15 	;
+{11476.} 	 DNT124BOL + OH = DNT124LO2 : 	5.10D-14 	;
+{11477.} 	 NT124L1O2 + HO2 = NT124L1OOH : 	KRO2HO2*0.90 	;
+{11478.} 	 NT124L1O2 + NO = NT124L1O + NO2 : 	KRO2NO 	;
+{11479.} 	 NT124L1O2 + NO3 = NT124L1O + NO2 : 	KRO2NO3 	;
+{11480.} 	 NT124L1O2 = NT124L1O : 	2.50D-13*RO2 	;
+{11481.} 	 NTM124QO2 + HO2 = NTM124QOOH : 	KRO2HO2*0.890 	;
+{11482.} 	 NTM124QO2 + NO = NTM124QO + NO2 : 	KRO2NO 	;
+{11483.} 	 NTM124QO2 + NO3 = NTM124QO + NO2 : 	KRO2NO3 	;
+{11484.} 	 NTM124QO2 = NTM124QO : 	9.20D-14*RO2 	;
+{11485.} 	 TM124QO2 + HO2 = TM124QOOH : 	KRO2HO2*0.890 	;
+{11486.} 	 TM124QO2 + NO = TM124QO + NO2 : 	KRO2NO 	;
+{11487.} 	 TM124QO2 + NO3 = TM124QO + NO2 : 	KRO2NO3 	;
+{11488.} 	 TM124QO2 = TM124QO : 	9.20D-14*RO2*0.70 	;
+{11489.} 	 TM124QO2 = TM124QOH : 	9.20D-14*RO2*0.30 	;
+{11490.} 	 T124NNCTO2 + HO2 = T124NNCOOH : 	KRO2HO2*0.90 	;
+{11491.} 	 T124NNCTO2 + NO = T124NNCTO + NO2 : 	KRO2NO 	;
+{11492.} 	 T124NNCTO2 + NO3 = T124NNCTO + NO2 : 	KRO2NO3 	;
+{11493.} 	 T124NNCTO2 = T124NNCTO : 	8.00D-13*RO2 	;
+{11494.} 	 T124NCATO2 + HO2 = T124NCTOOH : 	KRO2HO2*0.90 	;
+{11495.} 	 T124NCATO2 + NO = T124NCATO + NO2 : 	KRO2NO 	;
+{11496.} 	 T124NCATO2 + NO3 = T124NCATO + NO2 : 	KRO2NO3 	;
+{11497.} 	 T124NCATO2 = T124NCATO : 	8.00D-13*RO2 	;
+{11498.} 	 T124CT1OOH + OH = T124CAT1O2 : 	2.05D-10 	;
+{11499.} 	 T124CT1OOH = T124CAT1O + OH : 	J(41) 	;
+{11500.} 	 DMPHOHNO2 + OH = MXYOHNO2O2 : 	1.53D-12 	;
+{11501.} 	 C5CO234O2 + HO2 = C5CO234OOH : 	KRO2HO2*0.706 	;
+{11502.} 	 C5CO234O2 + NO = C5CO234O + NO2 : 	KRO2NO 	;
+{11503.} 	 C5CO234O2 + NO3 = C5CO234O + NO2 : 	KRO2NO3 	;
+{11504.} 	 C5CO234O2 = C5CO234O : 	2.00D-12*RO2 	;
+{11505.} 	 DNOETOL + NO3 = NDNOETOLO2 : 	7.83D-15 	;
+{11506.} 	 DNOETOL + OH = DNOETOLO2 : 	5.10D-14 	;
+{11507.} 	 NOETOL1O2 + HO2 = NOETOL1OOH : 	KRO2HO2*0.90 	;
+{11508.} 	 NOETOL1O2 + NO = NOETOL1O + NO2 : 	KRO2NO 	;
+{11509.} 	 NOETOL1O2 + NO3 = NOETOL1O + NO2 : 	KRO2NO3 	;
+{11510.} 	 NOETOL1O2 = NOETOL1O : 	2.50D-13*RO2 	;
+{11511.} 	 NOETLQO2 + HO2 = NOETLQOOH : 	KRO2HO2*0.890 	;
+{11512.} 	 NOETLQO2 + NO = NOETLQO + NO2 : 	KRO2NO 	;
+{11513.} 	 NOETLQO2 + NO3 = NOETLQO + NO2 : 	KRO2NO3 	;
+{11514.} 	 NOETLQO2 = NOETLQO : 	8.80D-13*RO2 	;
+{11515.} 	 OETLQO2 + HO2 = OETLQOOH : 	KRO2HO2*0.890 	;
+{11516.} 	 OETLQO2 + NO = OETLQO + NO2 : 	KRO2NO 	;
+{11517.} 	 OETLQO2 + NO3 = OETLQO + NO2 : 	KRO2NO3 	;
+{11518.} 	 OETLQO2 = OETLQCO : 	8.80D-13*RO2*0.2 	;
+{11519.} 	 OETLQO2 = OETLQO : 	8.80D-13*RO2*0.6 	;
+{11520.} 	 OETLQO2 = OETLQOH : 	8.80D-13*RO2*0.2 	;
+{11521.} 	 OTNNCATCO2 + HO2 = OTNNCATOOH : 	KRO2HO2*0.90 	;
+{11522.} 	 OTNNCATCO2 + NO = OTNNCATCO + NO2 : 	KRO2NO 	;
+{11523.} 	 OTNNCATCO2 + NO3 = OTNNCATCO + NO2 : 	KRO2NO3 	;
+{11524.} 	 OTNNCATCO2 = OTNNCATCO : 	8.00D-13*RO2 	;
+{11525.} 	 OTNCATECO2 + HO2 = OTNCATCOOH : 	KRO2HO2*0.90 	;
+{11526.} 	 OTNCATECO2 + NO = OTNCATECO + NO2 : 	KRO2NO 	;
+{11527.} 	 OTNCATECO2 + NO3 = OTNCATECO + NO2 : 	KRO2NO3 	;
+{11528.} 	 OTNCATECO2 = OTNCATECO : 	8.00D-13*RO2 	;
+{11529.} 	 OTCTEC1OOH + OH = OTCATEC1O2 : 	2.05D-10 	;
+{11530.} 	 OTCTEC1OOH = OTCATEC1O + OH : 	J(41) 	;
+{11531.} 	 DNMETOL + NO3 = NDNMETOLO2 : 	7.83D-15 	;
+{11532.} 	 DNMETOL + OH = DNMETOLO2 : 	5.10D-14 	;
+{11533.} 	 NMETOL1O2 + HO2 = NMETOL1OOH : 	KRO2HO2*0.90 	;
+{11534.} 	 NMETOL1O2 + NO = NMETOL1O + NO2 : 	KRO2NO 	;
+{11535.} 	 NMETOL1O2 + NO3 = NMETOL1O + NO2 : 	KRO2NO3 	;
+{11536.} 	 NMETOL1O2 = NMETOL1O : 	2.50D-13*RO2 	;
+{11537.} 	 NMETLQO2 + HO2 = NMETLQOOH : 	KRO2HO2*0.890 	;
+{11538.} 	 NMETLQO2 + NO = NMETLQO + NO2 : 	KRO2NO 	;
+{11539.} 	 NMETLQO2 + NO3 = NMETLQO + NO2 : 	KRO2NO3 	;
+{11540.} 	 NMETLQO2 = NMETLQO : 	9.20D-14*RO2 	;
+{11541.} 	 METLQO2 + HO2 = METLQOOH : 	KRO2HO2*0.890 	;
+{11542.} 	 METLQO2 + NO = METLQO + NO2 : 	KRO2NO 	;
+{11543.} 	 METLQO2 + NO3 = METLQO + NO2 : 	KRO2NO3 	;
+{11544.} 	 METLQO2 = METLQO : 	9.20D-14*RO2*0.7 	;
+{11545.} 	 METLQO2 = METLQOH : 	9.20D-14*RO2*0.3 	;
+{11546.} 	 MTNNCATCO2 + HO2 = MTNNCATOOH : 	KRO2HO2*0.90 	;
+{11547.} 	 MTNNCATCO2 + NO = MTNNCATCO + NO2 : 	KRO2NO 	;
+{11548.} 	 MTNNCATCO2 + NO3 = MTNNCATCO + NO2 : 	KRO2NO3 	;
+{11549.} 	 MTNNCATCO2 = MTNNCATCO : 	8.00D-13*RO2 	;
+{11550.} 	 MTNCATECO2 + HO2 = MTNCATCOOH : 	KRO2HO2*0.90 	;
+{11551.} 	 MTNCATECO2 + NO = MTNCATECO + NO2 : 	KRO2NO 	;
+{11552.} 	 MTNCATECO2 + NO3 = MTNCATECO + NO2 : 	KRO2NO3 	;
+{11553.} 	 MTNCATECO2 = MTNCATECO : 	8.00D-13*RO2 	;
+{11554.} 	 MTCTEC1OOH + OH = MTCATEC1O2 : 	2.05D-10 	;
+{11555.} 	 MTCTEC1OOH = MTCATEC1O + OH : 	J(41) 	;
+{11556.} 	 C7EDCOOH + OH = C7EDCCO + OH : 	2.79D-11 	;
+{11557.} 	 C7EDCOOH = C7EDCO + OH : 	J(41)+J(22)*2 	;
+{11558.} 	 C7EDCO = CO3H4CHO + CH3CO3 : 	KDEC*0.7 	;
+{11559.} 	 C7EDCO = EGLYOX + MGLYOX + HO2 : 	KDEC*0.3 	;
+{11560.} 	 C7EDCCO + OH = MGLYOX + EGLYOX + HO2 : 	5.04D-12 	;
+{11561.} 	 C7EDCCO = EGLYOX + CO + HO2 + CH3CO3 : 	J(22) 	;
+{11562.} 	 C7EDCCO = MGLYOX + CO + HO2 + C2H5CO3 : 	J(22)*2 	;
+{11563.} 	 C7EDCOH + OH = C7EDCCO + HO2 : 	1.80D-11 	;
+{11564.} 	 C7EDCOH = C7EDCO + HO2 : 	J(22)*2 	;
+{11565.} 	 DNPETOL + NO3 = NDNPETOLO2 : 	7.83D-15 	;
+{11566.} 	 DNPETOL + OH = DNPETOLO2 : 	5.10D-14 	;
+{11567.} 	 NPETOL1O2 + HO2 = NPETOL1OOH : 	KRO2HO2*0.90 	;
+{11568.} 	 NPETOL1O2 + NO = NPETOL1O + NO2 : 	KRO2NO 	;
+{11569.} 	 NPETOL1O2 + NO3 = NPETOL1O + NO2 : 	KRO2NO3 	;
+{11570.} 	 NPETOL1O2 = NPETOL1O : 	2.50D-13*RO2 	;
+{11571.} 	 NPETLQO2 + HO2 = NPETLQOOH : 	KRO2HO2*0.890 	;
+{11572.} 	 NPETLQO2 + NO = NPETLQO + NO2 : 	KRO2NO 	;
+{11573.} 	 NPETLQO2 + NO3 = NPETLQO + NO2 : 	KRO2NO3 	;
+{11574.} 	 NPETLQO2 = NPETLQO : 	9.20D-14*RO2 	;
+{11575.} 	 PETLQO2 + HO2 = PETLQOOH : 	KRO2HO2*0.890 	;
+{11576.} 	 PETLQO2 + NO = PETLQO + NO2 : 	KRO2NO 	;
+{11577.} 	 PETLQO2 + NO3 = PETLQO + NO2 : 	KRO2NO3 	;
+{11578.} 	 PETLQO2 = PETLQO : 	9.20D-14*RO2*0.7 	;
+{11579.} 	 PETLQO2 = PETLQOH : 	9.20D-14*RO2*0.3 	;
+{11580.} 	 PTNNCATCO2 + HO2 = PTNNCATOOH : 	KRO2HO2*0.90 	;
+{11581.} 	 PTNNCATCO2 + NO = PTNNCATCO + NO2 : 	KRO2NO 	;
+{11582.} 	 PTNNCATCO2 + NO3 = PTNNCATCO + NO2 : 	KRO2NO3 	;
+{11583.} 	 PTNNCATCO2 = PTNNCATCO : 	8.00D-13*RO2 	;
+{11584.} 	 PTNCATECO2 + HO2 = PTNCATCOOH : 	KRO2HO2*0.90 	;
+{11585.} 	 PTNCATECO2 + NO = PTNCATECO + NO2 : 	KRO2NO 	;
+{11586.} 	 PTNCATECO2 + NO3 = PTNCATECO + NO2 : 	KRO2NO3 	;
+{11587.} 	 PTNCATECO2 = PTNCATECO : 	8.00D-13*RO2 	;
+{11588.} 	 PTCTEC1OOH + OH = PTCATEC1O2 : 	2.05D-10 	;
+{11589.} 	 PTCTEC1OOH = PTCATEC1O + OH : 	J(41) 	;
+{11590.} 	 C7DDCCO2 = EGLYOX + CH3CO3 : 	KDEC*0.65 	;
+{11591.} 	 C7DDCCO2 = MMALANHY + C2H5O2 : 	KDEC*0.35 	;
+{11592.} 	 C7DDCCO3H + OH = C7DDCCO3 : 	4.88D-11 	;
+{11593.} 	 C7DDCCO3H = C7DDCCO2 + OH : 	J(41) 	;
+{11594.} 	 C7DDCCO3H = EGLYOX + CH3CO3 + OH : 	J(24) 	;
+{11595.} 	 C7DDCPAN + OH = EGLYOX + HCHO + CO + CO + NO2 : 	4.48D-11 	;
+{11596.} 	 C7DDCPAN = C7DDCCO3 + NO2 : 	KBPAN 	;
+{11597.} 	 C7DDCOOH + OH = C7DDCO2 : 	7.44D-11 	;
+{11598.} 	 C7DDCOOH = C7DDCO + OH : 	J(41)+J(15)+J(22) 	;
+{11599.} 	 C7DDCO = EGLYOX + MGLYOX + HO2 : 	KDEC 	;
+{11600.} 	 C7DDCOH + OH = C7DDCO : 	5.37D-11 	;
+{11601.} 	 C7DDCOH = C7DDCO + HO2 : 	J(15)+J(22) 	;
+{11602.} 	 NMEBFUOOH + OH = NMEBFUO2 : 	7.15D-12 	;
+{11603.} 	 NMEBFUOOH = NMEBFUO + OH : 	J(41) 	;
+{11604.} 	 NMEBFUO = C23O3ECHO + NO2 : 	KDEC 	;
+{11605.} 	 C23O3ECOOH + OH = C23O3EHO + OH : 	7.32D-11 	;
+{11606.} 	 C23O3ECOOH + OH = C23O3EO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11607.} 	 C23O3ECOOH = C23O3EO + OH : 	J(41) 	;
+{11608.} 	 C23O3EO = C2H5CHO + CH3CO3 : 	KDEC 	;
+{11609.} 	 C23O3EHO + OH = CO356OCO2 : 	1.46D-12 	;
+{11610.} 	 C23O3EHO = CH3CO3 + C2H5CO3 : 	J(22) 	;
+{11611.} 	 C23O3EOH + OH = C23O3EHO + HO2 : 	3.23D-11 	;
+{11612.} 	 MEBFUOOH + OH = MEBFUO2 : 	3.33D-11 	;
+{11613.} 	 MEBFUOOH = MEBFUO + OH : 	J(41) 	;
+{11614.} 	 MEBFUO = C23O3ECHO + HO2 : 	KDEC 	;
+{11615.} 	 MEBFUOH + OH = MEBFUO : 	2.99D-11 	;
+{11616.} 	 EMPHOOH + OH = EMPHO2 : 	3.60D-12 	;
+{11617.} 	 EMPHOOH = EMPHO + OH : 	J(41) 	;
+{11618.} 	 EMPHO + NO2 = HOEMPHNO2 : 	3.90D-13 	;
+{11619.} 	 CO234C65O2 + HO2 = CO234C6OOH : 	KRO2HO2*0.770 	;
+{11620.} 	 CO234C65O2 + NO = CO234C65O + NO2 : 	KRO2NO 	;
+{11621.} 	 CO234C65O2 + NO3 = CO234C65O + NO2 : 	KRO2NO3 	;
+{11622.} 	 CO234C65O2 = CO234C65O : 	8.80D-13*RO2 	;
+{11623.} 	 CH3COCLOOH + OH = CH3COCCLO2 : 	8.34D-12 	;
+{11624.} 	 CH3COCLOOH = CH3COCCLO + OH : 	J(41) 	;
+{11625.} 	 CH3COCCLO = CHOCL + CH3CO3 : 	KDEC 	;
+{11626.} 	 CLCOCL2OOH + OH = CLCOCCL2O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11627.} 	 CLCOCL2OOH = CLCOCCL2O + OH : 	J(41) 	;
+{11628.} 	 CLCOCCL2O = CLGLYOX + CL : 	KDEC 	;
+{11629.} 	 NCO23CHO = NO3CH2CO3 + HO2 + CO + CO : 	J(34) 	;
+{11630.} 	 NO3 + NCO23CHO = CO + CO + NO3CH2CO3 + HNO3 : 	KNO3AL*4.0 	;
+{11631.} 	 OH + NCO23CHO = CO + CO + NO3CH2CO3 : 	1.23D-11 	;
+{11632.} 	 H13CO2CO3 + HO2 = H13CO2CO3H : 	KAPHO2*0.56 	;
+{11633.} 	 H13CO2CO3 + HO2 = HOCH2COCHO + HO2 + OH : 	KAPHO2*0.44 	;
+{11634.} 	 H13CO2CO3 + NO = HOCH2COCHO + HO2 + NO2 : 	KAPNO 	;
+{11635.} 	 H13CO2CO3 + NO2 = C4PAN10 : 	KFPAN 	;
+{11636.} 	 H13CO2CO3 + NO3 = HOCH2COCHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{11637.} 	 H13CO2CO3 = HOCH2COCHO + HO2 : 	1.00D-11*RO2 	;
+{11638.} 	 HOCH2COCO2H + OH = HOCH2CO3 : 	2.89D-12 	;
+{11639.} 	 HOCH2COCO2H = HOCH2CO3 + HO2 : 	J(34) 	;
+{11640.} 	 H1CO23CHO + OH = CO + CO + HOCH2CO3 : 	1.44D-11 	;
+{11641.} 	 H1CO23CHO = CO + CO + HOCH2CO3 + HO2 : 	J(34)+J(35) 	;
+{11642.} 	 INCNCHO + OH = INCGLYOX + NO2 : 	4.52D-12*0.19 	;
+{11643.} 	 INCNCHO + OH = INCNCO3 : 	4.52D-12*0.81 	;
+{11644.} 	 INCNCHO = MACRNB + CO + NO2 + HO2 : 	J(15) 	;
+{11645.} 	 INCGLYOX = MACRNBCO3 + CO + HO2 : 	J(34) 	;
+{11646.} 	 OH + INCGLYOX = MACRNBCO3 + CO : 	1.34D-11 	;
+{11647.} 	 IEACO3 + HO2 = HMVKBO2 + OH : 	KAPHO2*0.44 	;
+{11648.} 	 IEACO3 + HO2 = IEACO3H : 	KAPHO2*0.56 	;
+{11649.} 	 IEACO3 + NO = HMVKBO2 + NO2 : 	KAPNO 	;
+{11650.} 	 IEACO3 + NO2 = IEAPAN : 	KFPAN 	;
+{11651.} 	 IEACO3 + NO3 = HMVKBO2 + NO2 : 	KRO2NO3*1.74 	;
+{11652.} 	 IEACO3 = HMVKBO2 : 	1.00D-11*RO2 	;
+{11653.} 	 INAHPCHO = HMVKANO3 + OH + CO + HO2 : 	J(17)+J(41) 	;
+{11654.} 	 OH + INAHPCHO = INAHPCO3 : 	2.67D-11 	;
+{11655.} 	 INANCHO = HMVKANO3 + NO2 + CO + HO2 : 	J(17) 	;
+{11656.} 	 OH + INANCHO = INANCO3 : 	4.22D-12 	;
+{11657.} 	 INANCO = ACETOL + NO2 + NO3CH2CO3 : 	J(56)+J(57) 	;
+{11658.} 	 OH + INANCO = INANCOCHO + HO2 : 	1.21D-12*0.56 	;
+{11659.} 	 OH + INANCO = INB1GLYOX + NO2 : 	1.21D-12*0.44 	;
+{11660.} 	 INAHCHO = HMVKANO3 + HO2 + CO + HO2 : 	J(17) 	;
+{11661.} 	 OH + INAHCHO = INAHCO3 : 	2.29D-11 	;
+{11662.} 	 HIEPOXB + OH = HIEB1O2 : 	1.31D-11*0.667 	;
+{11663.} 	 HIEPOXB + OH = HIEB2O2 : 	1.31D-11*0.333 	;
+{11664.} 	 NC524O2 + HO2 = NC524OOH : 	KRO2HO2*0.706 	;
+{11665.} 	 NC524O2 + NO = NC524NO3 : 	KRO2NO*0.072 	;
+{11666.} 	 NC524O2 + NO = NC524O + NO2 : 	KRO2NO*0.928 	;
+{11667.} 	 NC524O2 + NO3 = NC524O + NO2 : 	KRO2NO3 	;
+{11668.} 	 NC524O2 = NC524O : 	8.00D-13*RO2*0.8 	;
+{11669.} 	 NC524O2 = NC524OH : 	8.00D-13*RO2*0.2 	;
+{11670.} 	 HMACR + NO3 = HMACO3 + HNO3 : 	3.40D-15 	;
+{11671.} 	 HMACR + O3 = CH2OOA + HOCH2COCHO : 	7.80D-19*0.5 	;
+{11672.} 	 HMACR + O3 = HCHO + HMGLYOOA : 	7.80D-19*0.5 	;
+{11673.} 	 HMACR + OH = HMACO3 : 	4.83D-11*0.376 	;
+{11674.} 	 HMACR + OH = HMACRO2 : 	4.83D-11*0.624 	;
+{11675.} 	 C525O2 + HO2 = C525OOH : 	KRO2HO2*0.706 	;
+{11676.} 	 C525O2 + NO = C525O + NO2 : 	KRO2NO 	;
+{11677.} 	 C525O2 + NO3 = C525O + NO2 : 	KRO2NO3 	;
+{11678.} 	 C525O2 = C525O : 	9.20D-14*RO2 	;
+{11679.} 	 C58NO3CO3 + HO2 = C58NO3CO2H + O3 : 	KAPHO2*0.15 	;
+{11680.} 	 C58NO3CO3 + HO2 = C58NO3CO3H : 	KAPHO2*0.41 	;
+{11681.} 	 C58NO3CO3 + HO2 = MACRNO3 + HO2 + OH : 	KAPHO2*0.44 	;
+{11682.} 	 C58NO3CO3 + NO = MACRNO3 + HO2 + NO2 : 	KAPNO 	;
+{11683.} 	 C58NO3CO3 + NO2 = C58NO3PAN : 	KFPAN 	;
+{11684.} 	 C58NO3CO3 = C58NO3CO2H : 	1.00D-11*0.3*RO2 	;
+{11685.} 	 C58NO3CO3 = MACRNO3 + HO2 : 	1.00D-11*0.7*RO2 	;
+{11686.} 	 IEB1OOH = HO12CO3C4 + OH + CO + HO2 : 	J(17) 	;
+{11687.} 	 IEB1OOH = IEB1O + OH : 	J(41) 	;
+{11688.} 	 OH + IEB1OOH = HO12CO3C4 + OH + CO : 	3.90D-11 	;
+{11689.} 	 IEB1O = MGLYOX + HOCH2CHO + HO2 : 	KDEC 	;
+{11690.} 	 IEB2OOH = IEB2O + OH : 	J(41) 	;
+{11691.} 	 IEB2OOH = MACROH + OH + CO + HO2 : 	J(15) 	;
+{11692.} 	 OH + IEB2OOH = MACROH + OH + CO : 	5.34D-11 	;
+{11693.} 	 IEB2O = GLYOX + ACETOL + HO2 : 	KDEC 	;
+{11694.} 	 MACRNCO2H + OH = ACETOL + NO2 : 	1.34D-12*0.44 	;
+{11695.} 	 MACRNCO2H + OH = CONM2CO2H + HO2 : 	1.34D-12*0.15 	;
+{11696.} 	 CONM2CO3 + HO2 = CONM2CO2H + O3 : 	KAPHO2*0.15 	;
+{11697.} 	 CONM2CO3 + HO2 = CONM2CO3H : 	KAPHO2*0.41 	;
+{11698.} 	 CONM2CO3 + HO2 = MGLYOX + NO2 + OH : 	KAPHO2*0.44 	;
+{11699.} 	 CONM2CO3 + NO = MGLYOX + NO2 + NO2 : 	KAPNO 	;
+{11700.} 	 CONM2CO3 + NO2 = CONM2PAN : 	KFPAN 	;
+{11701.} 	 CONM2CO3 + NO3 = MGLYOX + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{11702.} 	 CONM2CO3 = CONM2CO2H : 	1.00D-11*0.3*RO2 	;
+{11703.} 	 CONM2CO3 = MGLYOX + NO2 : 	1.00D-11*0.7*RO2 	;
+{11704.} 	 MACRNCO3H + OH = CONM2CO3H + HO2 : 	4.42D-12*0.15 	;
+{11705.} 	 MACRNCO3H + OH = MACRNCO3 : 	4.42D-12*0.85 	;
+{11706.} 	 MACRNCO3H = ACETOL + NO2 + OH : 	J(41) 	;
+{11707.} 	 MACRNPAN + OH = CONM2PAN + HO2 : 	8.21D-13 	;
+{11708.} 	 MACRNPAN = MACRNCO3 + NO2 : 	KBPAN 	;
+{11709.} 	 INB1HPCHO = MACRNO3 + OH + CO + HO2 : 	J(15) 	;
+{11710.} 	 OH + INB1HPCHO = INB1HPCO3 : 	2.41D-11 	;
+{11711.} 	 INB1NACHO = MACRNO3 + NO2 + CO + HO2 : 	J(15) 	;
+{11712.} 	 OH + INB1NACHO = INB1NACO3 : 	1.85D-11 	;
+{11713.} 	 INB1NBCHO = MVKNO3 + NO2 + CO + HO2 : 	J(17) 	;
+{11714.} 	 OH + INB1NBCHO = INB1NBCO3 : 	1.85D-11 	;
+{11715.} 	 INB1GLYOX + OH = MACRNCO3 + CO : 	1.35D-11 	;
+{11716.} 	 INB1GLYOX = MACRNCO3 + CO + HO2 : 	J(34) 	;
+{11717.} 	 C57NO3 + OH = C4M2ALOHNO3 + HO2 : 	9.37D-12*0.54 	;
+{11718.} 	 C57NO3 + OH = C57NO3CO3 : 	9.37D-12*0.46 	;
+{11719.} 	 C57NO3 = HO2 + CO + HO12CO3C4 + NO2 : 	J(17) 	;
+{11720.} 	 IEC1OOH = ACETOL + OH + HOCH2CO3 : 	J(22) 	;
+{11721.} 	 IEC1OOH = IEC1O + OH : 	J(41) 	;
+{11722.} 	 OH + IEC1OOH = IEC1O2 : 	3.60D-12 	;
+{11723.} 	 OH + IEC1OOH = IEC2OOH + HO2 : 	1.57D-11 	;
+{11724.} 	 IEC1O = BIACETOH + HCHO + HO2 : 	KDEC 	;
+{11725.} 	 IECCO3 + HO2 = IECCO3H : 	KAPHO2*0.56 	;
+{11726.} 	 IECCO3 + HO2 = MACRO2 + OH : 	KAPHO2*0.44 	;
+{11727.} 	 IECCO3 + NO = MACRO2 + NO2 : 	KAPNO 	;
+{11728.} 	 IECCO3 + NO2 = IECPAN : 	KFPAN 	;
+{11729.} 	 IECCO3 + NO3 = MACRO2 + NO2 : 	KRO2NO3*1.74 	;
+{11730.} 	 IECCO3 = MACRO2 : 	1.00D-11*RO2 	;
+{11731.} 	 CO2N3CO3 + HO2 = CO2N3CO3H : 	KAPHO2*0.56 	;
+{11732.} 	 CO2N3CO3 + HO2 = MGLYOX + NO2 + OH : 	KAPHO2*0.44 	;
+{11733.} 	 CO2N3CO3 + NO = MGLYOX + NO2 + NO2 : 	KAPNO 	;
+{11734.} 	 CO2N3CO3 + NO2 = CO2N3PAN : 	KFPAN 	;
+{11735.} 	 CO2N3CO3 + NO3 = MGLYOX + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{11736.} 	 CO2N3CO3 = MGLYOX + NO2 : 	1.00D-11*RO2 	;
+{11737.} 	 INDHPCHO + OH = INDHPCO3 : 	2.58D-11 	;
+{11738.} 	 INDHPCHO = CO + HO2 + MVKNO3 + OH : 	J(17)+J(41) 	;
+{11739.} 	 INDHCHO + OH = INDHCO3 : 	2.27D-11 	;
+{11740.} 	 INDHCHO = CO + HO2 + MVKNO3 + HO2 : 	J(17) 	;
+{11741.} 	 ACCOCOMEO2 + HO2 = ACCOCOMOOH : 	KRO2HO2*0.706 	;
+{11742.} 	 ACCOCOMEO2 + NO = ACCOCOMEO + NO2 : 	KRO2NO 	;
+{11743.} 	 ACCOCOMEO2 + NO3 = ACCOCOMEO + NO2 : 	KRO2NO3 	;
+{11744.} 	 ACCOCOMEO2 = ACCOCOMEO : 	6.00D-13*RO2 	;
+{11745.} 	 ACCOMECHO + NO3 = ACCOMECO3 + HNO3 : 	KNO3AL*5.5 	;
+{11746.} 	 ACCOMECHO + OH = ACCOMECO3 : 	7.09D-11 	;
+{11747.} 	 ACCOMECHO = MECOACETO2 + HO2 + CO : 	J(15) 	;
+{11748.} 	 ACEETOHO2 + HO2 = ACEETOHOOH : 	KRO2HO2*0.625 	;
+{11749.} 	 ACEETOHO2 + NO = ACEETOHO + NO2 : 	KRO2NO 	;
+{11750.} 	 ACEETOHO2 + NO3 = ACEETOHO + NO2 : 	KRO2NO3 	;
+{11751.} 	 ACEETOHO2 = ACEETOHO : 	2.00D-12*RO2 	;
+{11752.} 	 ACCOMCOMO2 + HO2 = ACOMCOMOOH : 	KRO2HO2*0.770 	;
+{11753.} 	 ACCOMCOMO2 + NO = ACCOMCOMO + NO2 : 	KRO2NO 	;
+{11754.} 	 ACCOMCOMO2 + NO3 = ACCOMCOMO + NO2 : 	KRO2NO3 	;
+{11755.} 	 ACCOMCOMO2 = ACCOMCOMO : 	2.00D-12*RO2 	;
+{11756.} 	 ACCOCOETO2 + HO2 = ACCOCOEOOH : 	KRO2HO2*0.770 	;
+{11757.} 	 ACCOCOETO2 + NO = ACCOCOETO + NO2 : 	KRO2NO 	;
+{11758.} 	 ACCOCOETO2 + NO3 = ACCOCOETO + NO2 : 	KRO2NO3 	;
+{11759.} 	 ACCOCOETO2 = ACCOCOETO : 	8.80D-13*RO2 	;
+{11760.} 	 ETHFORMOOH + OH = ETHFORMO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{11761.} 	 ETHFORMOOH + OH = METACETHO + OH : 	3.59D-11 	;
+{11762.} 	 ETHFORMOOH = ETHFORMO + OH : 	J(41) 	;
+{11763.} 	 ETHFORMNO3 + OH = METACETHO + NO2 : 	5.37D-13 	;
+{11764.} 	 ETHFORMNO3 = ETHFORMO + NO2 : 	J(54) 	;
+{11765.} 	 ETHFORMO = CH3CHO + HO2 : 	KDEC 	;
+{11766.} 	 ETHFORMOH + OH = METACETHO + HO2 : 	9.55D-12 	;
+{11767.} 	 MTBEAALCO3 + HO2 = IPRFORMO2 + OH : 	KAPHO2*0.44 	;
+{11768.} 	 MTBEAALCO3 + HO2 = MTBEALCO2H + O3 : 	KAPHO2*0.15 	;
+{11769.} 	 MTBEAALCO3 + HO2 = MTBEALCO3H : 	KAPHO2*0.41 	;
+{11770.} 	 MTBEAALCO3 + NO = IPRFORMO2 + NO2 : 	KAPNO 	;
+{11771.} 	 MTBEAALCO3 + NO2 = MTBEAALPAN : 	KFPAN 	;
+{11772.} 	 MTBEAALCO3 + NO3 = IPRFORMO2 + NO2 : 	KRO2NO3*1.74 	;
+{11773.} 	 MTBEAALCO3 = IPRFORMO2 : 	1.00D-11*0.7*RO2 	;
+{11774.} 	 MTBEAALCO3 = MTBEALCO2H : 	1.00D-11*0.3*RO2 	;
+{11775.} 	 IPRMETOOH + OH = IPRMEETO2 : 	4.84D-12 	;
+{11776.} 	 IPRMETOOH = IPRMEETO + OH : 	J(41) 	;
+{11777.} 	 IPRMEETO = METHACET + CH3O2 : 	KDEC 	;
+{11778.} 	 IPRMEETOH + OH = IPRMEETO : 	1.29D-12 	;
+{11779.} 	 IPROCHO + OH = IPRFORMO2 : 	3.53D-12 	;
+{11780.} 	 CHOOMCO2H + OH = CHOOCH2O2 : 	9.90D-13 	;
+{11781.} 	 CHOOMCO3H + OH = CHOOMCO3 : 	4.55D-12 	;
+{11782.} 	 CHOOMCO3H = CHOOCH2O2 + OH : 	J(41) 	;
+{11783.} 	 CHOOMPAN + OH = CHOOCHO + CO + NO2 : 	9.55D-13 	;
+{11784.} 	 CHOOMPAN = CHOOMCO3 + NO2 : 	KBPAN 	;
+{11785.} 	 PRNFORMOOH + OH = PRONFORMO2 : 	3.08D-11 	;
+{11786.} 	 PRNFORMOOH = PRONFORMO + OH : 	J(41) 	;
+{11787.} 	 PRONFORMO = MGLYOX + HO2 : 	KDEC 	;
+{11788.} 	 PRCOOMCO3H + OH = PRCOOMCO3 : 	8.41D-12 	;
+{11789.} 	 PRCOOMCO3H = PRCOOMO2 + OH : 	J(41) 	;
+{11790.} 	 PRCOOMPAN + OH = PRCOFORM + CO + NO2 : 	4.82D-12 	;
+{11791.} 	 PRCOOMPAN = PRCOOMCO3 + NO2 : 	KBPAN 	;
+{11792.} 	 PRCOOMOOH + OH = PRCOOMO2 : 	2.38D-11 	;
+{11793.} 	 PRCOOMOOH = PRCOOMO + OH : 	J(41) 	;
+{11794.} 	 PRCOOMO = HCHO + NC3H7O2 : 	KDEC 	;
+{11795.} 	 BOXCOALOOH + OH = BOXCOCHOO2 : 	5.22D-11 	;
+{11796.} 	 BOXCOALOOH = BOXCOCHOO + OH : 	J(41) 	;
+{11797.} 	 BOXCOCHOO = C3H7CHO + HO2 + CO : 	KDEC 	;
+{11798.} 	 BUFORMOOH + OH = PRCOFORM + OH : 	5.22D-11 	;
+{11799.} 	 BUFORMOOH = BUFORMO + OH : 	J(41) 	;
+{11800.} 	 BUFORMO = C3H7CHO + HO2 : 	KDEC 	;
+{11801.} 	 BUOHFORM + OH = PRCOFORM + HO2 : 	1.47D-11 	;
+{11802.} 	 PRCOFORM + OH = PRCOFORMO2 : 	3.88D-12 	;
+{11803.} 	 PRNOCOPOOH + OH = PRONOCOPO2 : 	1.10D-10 	;
+{11804.} 	 PRNOCOPOOH = PRONOCOPO + OH : 	J(41) 	;
+{11805.} 	 PRONOCOPO = PRONOCOMO2 + CH3CHO : 	KDEC 	;
+{11806.} 	 BOX2COMOOH + OH = BOXCOCOMO2 : 	5.24D-11 	;
+{11807.} 	 BOX2COMOOH = BOXCOCOMO + OH : 	J(41) 	;
+{11808.} 	 BOXCOCOMO = C3H7CHO + CH3CO3 : 	KDEC 	;
+{11809.} 	 CO23C4CHO = BIACETO2 + HO2 + CO : 	J(15) 	;
+{11810.} 	 CO23C4CHO = CH3CO3 + HCOCH2CO3 : 	J(35) 	;
+{11811.} 	 NO3 + CO23C4CHO = CO23C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{11812.} 	 OH + CO23C4CHO = CO23C4CO3 : 	6.65D-11 	;
+{11813.} 	 C62O2 + HO2 = C62OOH : 	KRO2HO2*0.770 	;
+{11814.} 	 C62O2 + NO = C62O + NO2 : 	KRO2NO 	;
+{11815.} 	 C62O2 + NO3 = C62O + NO2 : 	KRO2NO3 	;
+{11816.} 	 C62O2 = C62O : 	8.40D-13*RO2 	;
+{11817.} 	 HO13C4O2 + HO2 = HO13C4OOH : 	KRO2HO2*0.625 	;
+{11818.} 	 HO13C4O2 + NO = HO13C4NO3 : 	KRO2NO*0.007 	;
+{11819.} 	 HO13C4O2 + NO = HO13C4O + NO2 : 	KRO2NO*0.993 	;
+{11820.} 	 HO13C4O2 + NO3 = HO13C4O + NO2 : 	KRO2NO3 	;
+{11821.} 	 HO13C4O2 = HO13C3CHO : 	2.00D-12*0.2*RO2 	;
+{11822.} 	 HO13C4O2 = HO13C4O : 	2.00D-12*0.6*RO2 	;
+{11823.} 	 HO13C4O2 = HO13C4OH : 	2.00D-12*0.2*RO2 	;
+{11824.} 	 C6CO134 + OH = C5CO34CO3 : 	7.27D-11 	;
+{11825.} 	 HM22CO3 + HO2 = HM22CO2H + O3 : 	KAPHO2*0.15 	;
+{11826.} 	 HM22CO3 + HO2 = HM22CO3H : 	KAPHO2*0.41 	;
+{11827.} 	 HM22CO3 + HO2 = IBUTOLBO2 + OH : 	KAPHO2*0.44 	;
+{11828.} 	 HM22CO3 + NO = IBUTOLBO2 + NO2 : 	KAPNO 	;
+{11829.} 	 HM22CO3 + NO2 = C5PAN15 : 	KFPAN 	;
+{11830.} 	 HM22CO3 + NO3 = IBUTOLBO2 + NO2 : 	KRO2NO3*1.74 	;
+{11831.} 	 HM22CO3 = HM22CO2H : 	1.00D-11*0.3*RO2 	;
+{11832.} 	 HM22CO3 = IBUTOLBO2 : 	1.00D-11*0.7*RO2 	;
+{11833.} 	 C6COCHOCO3 + HO2 = C5COCHOO2 + OH : 	KAPHO2*0.44 	;
+{11834.} 	 C6COCHOCO3 + HO2 = C6COALCO2H + O3 : 	KAPHO2*0.15 	;
+{11835.} 	 C6COCHOCO3 + HO2 = C6COALCO3H : 	KAPHO2*0.41 	;
+{11836.} 	 C6COCHOCO3 + NO = C5COCHOO2 + NO2 : 	KAPNO 	;
+{11837.} 	 C6COCHOCO3 + NO2 = C6COCHOPAN : 	KFPAN 	;
+{11838.} 	 C6COCHOCO3 + NO3 = C5COCHOO2 + NO2 : 	KRO2NO3*1.74 	;
+{11839.} 	 C6COCHOCO3 = C5COCHOO2 : 	1.00D-11*0.7*RO2 	;
+{11840.} 	 C6COCHOCO3 = C6COALCO2H : 	1.00D-11*0.3*RO2 	;
+{11841.} 	 C5COCHOO2 + HO2 = C5COCHOOOH : 	KRO2HO2*0.706 	;
+{11842.} 	 C5COCHOO2 + NO = C5COCHOO + NO2 : 	KRO2NO 	;
+{11843.} 	 C5COCHOO2 + NO3 = C5COCHOO + NO2 : 	KRO2NO3 	;
+{11844.} 	 C5COCHOO2 = C5COCHOO : 	2.00D-12*RO2 	;
+{11845.} 	 CHOC2H4O2 + HO2 = CHOC2H4OOH : 	KRO2HO2*0.520 	;
+{11846.} 	 CHOC2H4O2 + NO = CHOC2H4O + NO2 : 	KRO2NO 	;
+{11847.} 	 CHOC2H4O2 + NO3 = CHOC2H4O + NO2 : 	KRO2NO3 	;
+{11848.} 	 CHOC2H4O2 = CHOC2H4O : 	6.00D-13*RO2 	;
+{11849.} 	 HCOCH2CO3 + HO2 = HCOCH2CO2H + O3 : 	KAPHO2*0.15 	;
+{11850.} 	 HCOCH2CO3 + HO2 = HCOCH2CO3H : 	KAPHO2*0.41 	;
+{11851.} 	 HCOCH2CO3 + HO2 = HCOCH2O2 + OH : 	KAPHO2*0.44 	;
+{11852.} 	 HCOCH2CO3 + NO = HCOCH2O2 + NO2 : 	KAPNO 	;
+{11853.} 	 HCOCH2CO3 + NO2 = C3PAN2 : 	KFPAN 	;
+{11854.} 	 HCOCH2CO3 + NO3 = HCOCH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{11855.} 	 HCOCH2CO3 = HCOCH2CO2H : 	1.00D-11*0.3*RO2 	;
+{11856.} 	 HCOCH2CO3 = HCOCH2O2 : 	1.00D-11*0.7*RO2 	;
+{11857.} 	 CY6TRIONO2 + HO2 = C6135COOOH : 	KRO2HO2*0.77 	;
+{11858.} 	 CY6TRIONO2 + NO = C6135COO + NO2 : 	KRO2NO 	;
+{11859.} 	 CY6TRIONO2 + NO3 = C6135COO + NO2 : 	KRO2NO3 	;
+{11860.} 	 CY6TRIONO2 = C6135COO : 	2.00D-12*RO2 	;
+{11861.} 	 C6CYTONO2 + HO2 = C6CYTONOOH : 	KRO2HO2*0.770 	;
+{11862.} 	 C6CYTONO2 + NO = C6CYTONO + NO2 : 	KRO2NO 	;
+{11863.} 	 C6CYTONO2 + NO3 = C6CYTONO + NO2 : 	KRO2NO3 	;
+{11864.} 	 C6CYTONO2 = C6CYTONO : 	8.80D-13*RO2 	;
+{11865.} 	 PINALOOH + OH = PINALO2 : 	2.75D-11 	;
+{11866.} 	 PINALOOH = PINALO + OH : 	J(41)+J(15) 	;
+{11867.} 	 PINALNO3 + OH = CO235C6CHO + CH3COCH3 + NO2 : 	2.25D-11 	;
+{11868.} 	 PINALNO3 = PINALO + NO2 : 	J(55)+J(15) 	;
+{11869.} 	 PINALO = C106O2 : 	KDEC 	;
+{11870.} 	 PINALOH + OH = PINALO : 	2.41D-11 	;
+{11871.} 	 PINALOH = PINALO + HO2 : 	J(22) 	;
+{11872.} 	 NC102O2 + HO2 = NC102OOH : 	KRO2HO2*0.914 	;
+{11873.} 	 NC102O2 + NO = NC102O + NO2 : 	KRO2NO 	;
+{11874.} 	 NC102O2 + NO3 = NC102O + NO2 : 	KRO2NO3 	;
+{11875.} 	 NC102O2 = NC102O : 	6.70D-15*RO2 	;
+{11876.} 	 C108OOH + OH = C108O2 : 	6.28D-11 	;
+{11877.} 	 C108OOH = C108O + OH : 	J(41)+J(35) 	;
+{11878.} 	 C108NO3 + OH = CO235C6CHO + CH3COCH3 + NO2 : 	2.85D-11 	;
+{11879.} 	 C108NO3 = C108O + NO2 : 	J(55)+J(35) 	;
+{11880.} 	 C108O = C717O2 + CH3COCH3 : 	KDEC 	;
+{11881.} 	 C108OH + OH = C108O : 	5.93D-11 	;
+{11882.} 	 C108OH = C108O + HO2 : 	J(35) 	;
+{11883.} 	 C89CO2 = C811CO3 : 	KDEC*0.80 	;
+{11884.} 	 C89CO2 = C89O2 : 	KDEC*0.20 	;
+{11885.} 	 C89CO2H + OH = C89CO2 : 	2.69D-11 	;
+{11886.} 	 C89CO2H = C89CO2 + HO2 : 	J(15) 	;
+{11887.} 	 C89CO3H + OH = C89CO3 : 	3.00D-11 	;
+{11888.} 	 C89CO3H = C89CO2 + OH : 	J(41)+J(15) 	;
+{11889.} 	 C89PAN + OH = CH3COCH3 + CO13C4CHO + CO + NO2 : 	2.52D-11 	;
+{11890.} 	 C89PAN = C89CO3 + NO2 : 	KBPAN 	;
+{11891.} 	 C920CO3H + OH = C920CO3 : 	9.16D-12 	;
+{11892.} 	 C920CO3H = C920O2 + OH : 	J(41)+J(22) 	;
+{11893.} 	 HOPINONIC + OH = C920O2 : 	5.70D-12 	;
+{11894.} 	 HOPINONIC = C920O2 + HO2 : 	J(22) 	;
+{11895.} 	 C920PAN + OH = C109OH + CO + NO2 : 	5.56D-12 	;
+{11896.} 	 C920PAN = C920CO3 + NO2 : 	KBPAN 	;
+{11897.} 	 C920OOH + OH = C920O2 : 	2.36D-11 	;
+{11898.} 	 C920OOH = C920O + OH : 	J(41)+J(22) 	;
+{11899.} 	 C920O = C921O2 : 	4.20D+10*EXP(-3523/TEMP) 	;
+{11900.} 	 C97OOH + OH = C97O2 : 	1.05D-11 	;
+{11901.} 	 C97OOH = C97O + OH : 	J(41)+J(22) 	;
+{11902.} 	 C97O = C98O2 : 	KDEC 	;
+{11903.} 	 C97OH + OH = C97O : 	7.20D-12 	;
+{11904.} 	 C97OH = C97O + HO2 : 	J(22) 	;
+{11905.} 	 C85CO3H + OH = C85CO3 : 	1.02D-11 	;
+{11906.} 	 C85CO3H = C85O2 + OH : 	J(41)+J(22) 	;
+{11907.} 	 C9PAN2 + OH = C85OOH + CO + NO2 : 	6.60D-12 	;
+{11908.} 	 C9PAN2 = C85CO3 + NO2 : 	KBPAN 	;
+{11909.} 	 C85OOH + OH = C85O2 : 	1.29D-11 	;
+{11910.} 	 C85OOH = C85O + OH : 	J(41)+J(22) 	;
+{11911.} 	 C85O = C86O2 : 	KDEC 	;
+{11912.} 	 C719OOH + OH = C719O2 : 	7.06D-11 	;
+{11913.} 	 C719OOH = C719O + OH : 	J(41) 	;
+{11914.} 	 C719NO3 + OH = C716OH + NO2 : 	1.26D-11 	;
+{11915.} 	 C719O = C716OH + HO2 : 	KDEC 	;
+{11916.} 	 C719OH + OH = C719O : 	6.72D-11 	;
+{11917.} 	 C918OOH + OH = C918O2 : 	7.91D-11 	;
+{11918.} 	 C918OOH = C918O + OH : 	J(41)+J(15) 	;
+{11919.} 	 C918NO3 + OH = HCOCH2CHO + HCOCH2CHO + CH3COCH3 + NO2 : 	6.79D-11 	;
+{11920.} 	 C918NO3 = C918O + NO2 : 	J(55)+J(15) 	;
+{11921.} 	 C918O = C919O2 : 	KDEC 	;
+{11922.} 	 C918OH + OH = C918O : 	7.16D-11 	;
+{11923.} 	 C918OH = C918O + HO2 : 	J(15) 	;
+{11924.} 	 C9DCOOH + OH = C9DCCO + OH : 	7.50D-11 	;
+{11925.} 	 C9DCOOH = C9DCO + OH : 	J(41) 	;
+{11926.} 	 C9DCNO3 + OH = C9DCCO + NO2 : 	1.58D-12 	;
+{11927.} 	 C9DCNO3 = C9DCO + NO2 : 	J(54) 	;
+{11928.} 	 C9DCO = C914O2 : 	KDEC 	;
+{11929.} 	 C9DCCO + OH = C914O2 : 	1.32D-12 	;
+{11930.} 	 C9DCOH + OH = C9DCCO + HO2 : 	3.11D-11 	;
+{11931.} 	 C915OOH + OH = C88CHO + OH : 	1.01D-10 	;
+{11932.} 	 C915OOH = C915O + OH : 	J(41)+J(15) 	;
+{11933.} 	 C915NO3 + OH = C88CHO + NO2 : 	6.96D-11 	;
+{11934.} 	 C915NO3 = C915O + NO2 : 	J(54)+J(15) 	;
+{11935.} 	 C915O = C88CHO + HO2 : 	KROSEC*O2 	;
+{11936.} 	 C915O = C916O2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{11937.} 	 C88CHO + NO3 = C88CO3 + HNO3 : 	KNO3AL*8.5 	;
+{11938.} 	 C88CHO + OH = C88CO3 : 	7.30D-11 	;
+{11939.} 	 C88CHO = C88O2 + HO2 + CO : 	J(15) 	;
+{11940.} 	 C915OH + OH = C88CHO + HO2 : 	8.33D-11 	;
+{11941.} 	 C512CO3 + HO2 = C512CO2H + O3 : 	KAPHO2*0.15 	;
+{11942.} 	 C512CO3 + HO2 = C512CO3H : 	KAPHO2*0.41 	;
+{11943.} 	 C512CO3 + HO2 = C512O2 + OH : 	KAPHO2*0.44 	;
+{11944.} 	 C512CO3 + NO = C512O2 + NO2 : 	KAPNO 	;
+{11945.} 	 C512CO3 + NO2 = C512PAN : 	KFPAN 	;
+{11946.} 	 C512CO3 + NO3 = C512O2 + NO2 : 	KRO2NO3*1.74 	;
+{11947.} 	 C512CO3 = C512CO2H : 	1.00D-11*RO2*0.3 	;
+{11948.} 	 C512CO3 = C512O2 : 	1.00D-11*RO2*0.7 	;
+{11949.} 	 C917OOH + OH = C917O2 : 	1.91D-11 	;
+{11950.} 	 C917OOH = C917O + OH : 	J(41) 	;
+{11951.} 	 C917NO3 + OH = CH3COCH3 + C619CO + NO2 : 	9.97D-12 	;
+{11952.} 	 C917NO3 = C917O + NO2 : 	J(55) 	;
+{11953.} 	 C917O = C619O2 + CH3COCH3 : 	KDEC 	;
+{11954.} 	 C917OH + OH = C917O : 	1.56D-11 	;
+{11955.} 	 C89O2 + HO2 = C89OOH : 	KRO2HO2*0.859 	;
+{11956.} 	 C89O2 + NO = C89NO3 : 	KRO2NO*0.104 	;
+{11957.} 	 C89O2 + NO = C89O + NO2 : 	KRO2NO*0.896 	;
+{11958.} 	 C89O2 + NO3 = C89O + NO2 : 	KRO2NO3 	;
+{11959.} 	 C89O2 = C89O : 	6.70D-15*RO2*0.7 	;
+{11960.} 	 C89O2 = C89OH : 	6.70D-15*RO2*0.3 	;
+{11961.} 	 NLIMALOOH + OH = NLIMALO2 : 	4.28D-11 	;
+{11962.} 	 NLIMALOOH = NLIMALO + OH : 	J(41) 	;
+{11963.} 	 NLIMALO = LMLKET + HCHO + NO2 : 	KDEC 	;
+{11964.} 	 NLIMALOH + OH = LMLKET + HCHO + NO2 : 	3.93D-11 	;
+{11965.} 	 C926O2 + HO2 = C926OOH : 	KRO2HO2*0.890 	;
+{11966.} 	 C926O2 + NO = C926O + NO2 : 	KRO2NO 	;
+{11967.} 	 C926O2 + NO3 = C926O + NO2 : 	KRO2NO3 	;
+{11968.} 	 C926O2 = C926O : 	9.20D-14*RO2*0.7 	;
+{11969.} 	 C926O2 = C926OH : 	9.20D-14*RO2*0.3 	;
+{11970.} 	 C817CO3 + HO2 = C817CO3H : 	KAPHO2*0.41 	;
+{11971.} 	 C817CO3 + HO2 = C817O2 + OH : 	KAPHO2*0.44 	;
+{11972.} 	 C817CO3 + HO2 = KLIMONONIC + O3 : 	KAPHO2*0.15 	;
+{11973.} 	 C817CO3 + NO = C817O2 + NO2 : 	KAPNO 	;
+{11974.} 	 C817CO3 + NO2 = C817PAN : 	KFPAN 	;
+{11975.} 	 C817CO3 + NO3 = C817O2 + NO2 : 	KRO2NO3*1.74 	;
+{11976.} 	 C817CO3 = C817O2 : 	1.00D-11*RO2*0.7 	;
+{11977.} 	 C817CO3 = KLIMONONIC : 	1.00D-11*RO2*0.3 	;
+{11978.} 	 C817O2 + HO2 = C817OOH : 	KRO2HO2*0.859 	;
+{11979.} 	 C817O2 + NO = C817NO3 : 	KRO2NO*0.138 	;
+{11980.} 	 C817O2 + NO = C817O + NO2 : 	KRO2NO*0.862 	;
+{11981.} 	 C817O2 + NO3 = C817O + NO2 : 	KRO2NO3 	;
+{11982.} 	 C817O2 = C817CO : 	1.30D-12*RO2*0.2 	;
+{11983.} 	 C817O2 = C817O : 	1.30D-12*RO2*0.6 	;
+{11984.} 	 C817O2 = C817OH : 	1.30D-12*RO2*0.2 	;
+{11985.} 	 LIMALOOH + OH = LIMALO2 : 	4.65D-11 	;
+{11986.} 	 LIMALOOH = LIMALO + OH : 	J(41) 	;
+{11987.} 	 LIMALNO3 + OH = LMLKET + HCHO + NO2 : 	3.01D-11 	;
+{11988.} 	 LIMALO = LMLKET + HCHO + HO2 : 	KDEC 	;
+{11989.} 	 LIMALOH + OH = LMLKET + HCHO + HO2 : 	4.31D-11 	;
+{11990.} 	 NC826O2 + HO2 = NC826OOH : 	KRO2HO2*0.859 	;
+{11991.} 	 NC826O2 + NO = NC826O + NO2 : 	KRO2NO 	;
+{11992.} 	 NC826O2 + NO3 = NC826O + NO2 : 	KRO2NO3 	;
+{11993.} 	 NC826O2 = NC826O : 	9.20D-14*RO2*0.7 	;
+{11994.} 	 NC826O2 = NC826OH : 	9.20D-14*RO2*0.3 	;
+{11995.} 	 C626CHO + NO3 = C626CO3 + HNO3 : 	KNO3AL*8.5 	;
+{11996.} 	 C626CHO + OH = C626CO3 : 	5.41D-11 	;
+{11997.} 	 C626CHO = C626O2 + CO + HO2 : 	J(15)*2 	;
+{11998.} 	 C735OOA = C735O2 + OH : 	KDEC 	;
+{11999.} 	 C826O2 + HO2 = C826OOH : 	KRO2HO2*0.859 	;
+{12000.} 	 C826O2 + NO = C826NO3 : 	KRO2NO*0.069 	;
+{12001.} 	 C826O2 + NO = C826O + NO2 : 	KRO2NO*0.931 	;
+{12002.} 	 C826O2 + NO3 = C826O + NO2 : 	KRO2NO3 	;
+{12003.} 	 C826O2 = C826O : 	9.20D-14*RO2*0.7 	;
+{12004.} 	 C826O2 = C826OH : 	9.20D-14*RO2*0.3 	;
+{12005.} 	 C729O2 + HO2 = C729OOH : 	KRO2HO2*0.820 	;
+{12006.} 	 C729O2 + NO = C729NO3 : 	KRO2NO*0.111 	;
+{12007.} 	 C729O2 + NO = C729O + NO2 : 	KRO2NO*0.889 	;
+{12008.} 	 C729O2 + NO3 = C729O + NO2 : 	KRO2NO3 	;
+{12009.} 	 C729O2 = C622CHO : 	1.30D-12*RO2*0.4 	;
+{12010.} 	 C729O2 = C729O : 	1.30D-12*RO2*0.6 	;
+{12011.} 	 C729CO2H + OH = C729O2 : 	8.38D-11 	;
+{12012.} 	 C729CO2H = C729O2 + HO2 : 	J(15) 	;
+{12013.} 	 C729CO3H + OH = C729CO3 : 	8.69D-11 	;
+{12014.} 	 C729CO3H = C729O2 + OH : 	J(41)+J(15) 	;
+{12015.} 	 C729PAN + OH = C622CHO + CO + NO2 : 	8.33D-11 	;
+{12016.} 	 C729PAN = C729CO3 + NO2 : 	KBPAN 	;
+{12017.} 	 C822CO2 = C822O2 : 	KDEC*0.2 	;
+{12018.} 	 C822CO2 = C823CO3 : 	KDEC*0.8 	;
+{12019.} 	 C822CO2H + OH = C822CO2 : 	8.47D-11 	;
+{12020.} 	 C822CO3H + OH = C822CO3 : 	8.82D-11 	;
+{12021.} 	 C822CO3H = C822CO2 + OH : 	J(41) 	;
+{12022.} 	 C822PAN + OH = C729CHO + CO + NO2 : 	8.46D-11 	;
+{12023.} 	 C822PAN = C822CO3 + NO2 : 	KBPAN 	;
+{12024.} 	 C924OOH + OH = C924CO + OH : 	8.69D-11 	;
+{12025.} 	 C924OOH = C924O + OH : 	J(41) 	;
+{12026.} 	 C924O = CH3CO3 + C622CHO : 	KDEC 	;
+{12027.} 	 C924CO + OH = C925O2 : 	6.67D-11 	;
+{12028.} 	 C924CO = C622CO3 + CH3CO3 : 	J(35) 	;
+{12029.} 	 C924OH + OH = C924CO + HO2 : 	7.47D-11 	;
+{12030.} 	 C816CO3H + OH = C816CO3 : 	6.28D-11 	;
+{12031.} 	 C816CO3H = C816O2 + OH : 	J(41) 	;
+{12032.} 	 C816PAN + OH = C816CO + CO + NO2 : 	5.92D-11 	;
+{12033.} 	 C816PAN = C816CO3 + NO2 : 	KBPAN 	;
+{12034.} 	 NORLIMOOH + OH = NORLIMO2 : 	3.64D-11 	;
+{12035.} 	 NORLIMOOH = NORLIMO + OH : 	J(41) 	;
+{12036.} 	 NORLIMO = C817CO + HCHO + HO2 : 	KDEC 	;
+{12037.} 	 C816OOH + OH = C816CO + OH : 	8.06D-11 	;
+{12038.} 	 C816OOH = C816O + OH : 	J(22)+J(41) 	;
+{12039.} 	 C816O =  C816CO + HO2 : 	KROSEC*O2 	;
+{12040.} 	 C816O = MACR + MEKAO2 : 	2.00D+14*EXP(-6824/TEMP) 	;
+{12041.} 	 NLMKAOOH + OH = NLMKAO2 : 	1.01D-11 	;
+{12042.} 	 NLMKAOOH = NLMKAO + OH : 	J(41) 	;
+{12043.} 	 NLMKAO = LMLKET + NO2 : 	KDEC 	;
+{12044.} 	 LMKBNO3 + OH = LMKBCO + NO2 : 	6.30D-12 	;
+{12045.} 	 LMLKAO2 + HO2 = LMLKAOOH : 	KRO2HO2*0.914 	;
+{12046.} 	 LMLKAO2 + NO = LMLKAO + NO2 : 	KRO2NO 	;
+{12047.} 	 LMLKAO2 + NO3 = LMLKAO + NO2 : 	KRO2NO3 	;
+{12048.} 	 LMLKAO2 = LMLKACO : 	8.80D-13*RO2*0.2 	;
+{12049.} 	 LMLKAO2 = LMLKAO2 : 	8.80D-13*RO2*0.6 	;
+{12050.} 	 LMLKAO2 = LMLKAOH : 	8.80D-13*RO2*0.2 	;
+{12051.} 	 LMLKBO2 + HO2 = LMLKBOOH : 	KRO2HO2*0.914 	;
+{12052.} 	 LMLKBO2 + NO = LMLKBO + NO2 : 	KRO2NO 	;
+{12053.} 	 LMLKBO2 + NO3 = LMLKBO + NO2 : 	KRO2NO3 	;
+{12054.} 	 LMLKBO2 = LMLKBCO : 	8.80D-13*RO2*0.05 	;
+{12055.} 	 LMLKBO2 = LMLKBO : 	8.80D-13*RO2*0.9 	;
+{12056.} 	 LMLKBO2 = LMLKBOH : 	8.80D-13*RO2*0.05 	;
+{12057.} 	 LMKBOO + CO = LMLKET : 	1.20D-15 	;
+{12058.} 	 LMKBOO + NO = LMLKET + NO2 : 	1.00D-14 	;
+{12059.} 	 LMKBOO + NO2 = LMLKET + NO3 : 	1.00D-15 	;
+{12060.} 	 LMKBOO + SO2 = LMLKET + SO3 : 	7.00D-14 	;
+{12061.} 	 LMKBOO = KLIMONONIC : 	2.00D-18*H2O 	;
+{12062.} 	 LMKBOO = LMLKET + H2O2 : 	1.40D-17*H2O 	;
+{12063.} 	 LMKAOOH + OH = LMKAO2 : 	2.08D-11 	;
+{12064.} 	 LMKAOOH = LMKAO + OH : 	J(41) 	;
+{12065.} 	 LMKANO3 + OH = LMLKET + NO2 : 	9.20D-12 	;
+{12066.} 	 LMKAO = LMLKET + HO2 : 	KDEC 	;
+{12067.} 	 LMKAOH + OH = LMKBCO + HO2 : 	1.74D-11 	;
+{12068.} 	 LMKBOOH + OH = LMKBCO + OH : 	4.76D-11 	;
+{12069.} 	 LMKBOOH = LMKBO + OH : 	J(41) 	;
+{12070.} 	 LMKBO = LMLKET + HO2 : 	KDEC 	;
+{12071.} 	 LMKBCO + OH = C817CO3 : 	1.60D-11 	;
+{12072.} 	 C146OOH + OH = C146CO + OH : 	5.02D-11 	;
+{12073.} 	 C146OOH = C146O + OH : 	J(41) 	;
+{12074.} 	 C146O = C1011CO3 + HCOCH2CHO : 	KDEC 	;
+{12075.} 	 C146CO + OH = C1011CO3 + HCOCH2CHO : 	3.21D-11 	;
+{12076.} 	 C146CO = C1011CO3 + HCOCH2CO3 : 	J(35) 	;
+{12077.} 	 C146OH + OH = C146CO + HO2 : 	3.96D-11 	;
+{12078.} 	 C131CO3H + OH = C131CO3 : 	1.55D-11 	;
+{12079.} 	 C131CO3H = C131O2 + OH : 	J(41) 	;
+{12080.} 	 C131PAN + OH = C131CO + CO + NO2 : 	1.19D-11 	;
+{12081.} 	 C131PAN = C131CO3 + NO2 : 	KBPAN 	;
+{12082.} 	 BCLKAOOH + OH = BCLKACO + OH : 	1.06D-10 	;
+{12083.} 	 BCLKAOOH = BCLKAO + OH : 	J(41) 	;
+{12084.} 	 BCLKAOOH = C116CHO + OH + CH3CO3 : 	J(22) 	;
+{12085.} 	 BCLKAO = C116CHO + CH3CO3 : 	KDEC 	;
+{12086.} 	 BCLKACO + OH = C116CHO + CH3CO3 : 	8.34D-11 	;
+{12087.} 	 BCLKACO = C116CO3 + CH3CO3 : 	J(35) 	;
+{12088.} 	 BCLKAOH + OH = BCLKACO + HO2 : 	9.34D-11 	;
+{12089.} 	 BCLKAOH = C116CHO + CH3CO3 + HO2 : 	J(22) 	;
+{12090.} 	 BCLKBOOH + OH = BCLKBCO + OH : 	4.73D-11 	;
+{12091.} 	 BCLKBOOH = BCLKBO + OH : 	J(41) 	;
+{12092.} 	 BCLKBOOH = C1210CO3 + HCHO + OH : 	J(22) 	;
+{12093.} 	 BCLKBO = C1210CO3 + HCHO : 	KDEC 	;
+{12094.} 	 BCLKBCO + OH = C1210CO3 + CO : 	5.05D-11 	;
+{12095.} 	 BCLKBCO = C1210CO3 + CO + HO2 : 	J(34) 	;
+{12096.} 	 BCLKBOH + OH = BCLKBCO + HO2 : 	4.04D-11 	;
+{12097.} 	 BCLKBOH = C1210CO3 + HCHO + HO2 : 	J(22) 	;
+{12098.} 	 BCLKCOOH + OH = BCLKCCO + OH : 	5.41D-11 	;
+{12099.} 	 BCLKCOOH = BCLKCO + OH : 	J(41) 	;
+{12100.} 	 BCLKCOOH = C131CO + OH + CO + HO2 : 	J(15) 	;
+{12101.} 	 BCLKCO = C131CO + CO + HO2 : 	KDEC 	;
+{12102.} 	 BCLKCCO + OH = C132O2 + CO : 	2.52D-11 	;
+{12103.} 	 BCLKCCO = C132O2 + CO + HO2 : 	J(34) 	;
+{12104.} 	 BCLKCOH + OH = BCLKCCO + HO2 : 	4.19D-11 	;
+{12105.} 	 BCLKCOH = C131CO + HO2 + CO + HO2 : 	J(15) 	;
+{12106.} 	 C131OOH + OH = C131CO + OH : 	2.06D-11 	;
+{12107.} 	 C131OOH = C131O + OH : 	J(41) 	;
+{12108.} 	 C131NO3 + OH = C131CO + NO2 : 	7.10D-12 	;
+{12109.} 	 C131NO3 = C131O + NO2 : 	J(53) 	;
+{12110.} 	 C131O = C132O2 : 	KDEC 	;
+{12111.} 	 C131CO + OH = C132O2 : 	3.21D-11 	;
+{12112.} 	 C131OH + OH = C131CO + HO2 : 	1.15D-11 	;
+{12113.} 	 C147OOH + OH = C147CO + OH : 	3.41D-11 	;
+{12114.} 	 C147OOH = C147O + OH : 	J(41) 	;
+{12115.} 	 C147O = C1011CO3 + HCOCH2CO2H : 	KDEC 	;
+{12116.} 	 C147CO + OH = C1011CO3 + HCOCH2CO2H : 	1.55D-11 	;
+{12117.} 	 C147OH + OH = C147CO + HO2 : 	2.19D-11 	;
+{12118.} 	 C126CO2H + OH = C126O2 : 	6.98D-11 	;
+{12119.} 	 C126CO3H + OH = C126CO3 : 	7.29D-11 	;
+{12120.} 	 C126CO3H = C126O2 + OH : 	J(41) 	;
+{12121.} 	 C126PAN + OH = C126CO + CO + NO2 : 	6.93D-11 	;
+{12122.} 	 C126PAN = C126CO3 + NO2 : 	KBPAN 	;
+{12123.} 	 C136CO2 = C136O2 : 	KDEC*0.1 	;
+{12124.} 	 C136CO2 = C137CO3 : 	KDEC*0.9 	;
+{12125.} 	 C136CO2H + OH = C136CO2 : 	8.47D-11 	;
+{12126.} 	 C136CO3H + OH = C136CO3 : 	8.82D-11 	;
+{12127.} 	 C136CO3H = C136CO2 + OH : 	J(41) 	;
+{12128.} 	 C136PAN + OH = C126CHO + CO + NO2 : 	8.46D-11 	;
+{12129.} 	 C136PAN = C136CO3 + NO2 : 	KBPAN 	;
+{12130.} 	 C148OOH + OH = C148CO + OH : 	5.01D-11 	;
+{12131.} 	 C148OOH = C148O + OH : 	J(41) 	;
+{12132.} 	 C148O = C1013CO3 + HCOCH2CHO : 	KDEC 	;
+{12133.} 	 C148CO + OH = C1013CO3 + HCOCH2CHO : 	3.20D-11 	;
+{12134.} 	 C148CO = C1013CO3 + HCOCH2CO3 : 	J(35) 	;
+{12135.} 	 C148OH + OH = C148CO + HO2 : 	3.95D-11 	;
+{12136.} 	 C1311OOH + OH = C1312CO + OH : 	8.68D-11 	;
+{12137.} 	 C1311OOH = C1311O + OH : 	J(41) 	;
+{12138.} 	 C1311NO3 + OH = C1312CO + NO2 : 	7.92D-11 	;
+{12139.} 	 C1311NO3 = C1311O + NO2 : 	J(55) 	;
+{12140.} 	 C1311O = C1312O2 : 	KDEC 	;
+{12141.} 	 C1311OH + OH = C1312CO + HO2 : 	8.32D-11 	;
+{12142.} 	 NC1313OOH + OH = NC1313O2 : 	6.26D-11 	;
+{12143.} 	 NC1313OOH = NC1313O + OH : 	J(41) 	;
+{12144.} 	 NC1313O = C116CHO + HCHO + NO2 : 	KDEC 	;
+{12145.} 	 NC1313OH + OH = C116CHO + HCHO + NO2 : 	5.91D-11 	;
+{12146.} 	 C116CO3 + HO2 = C116CO2H + O3 : 	KAPHO2*0.15 	;
+{12147.} 	 C116CO3 + HO2 = C116CO3H : 	KAPHO2*0.41 	;
+{12148.} 	 C116CO3 + HO2 = C116O2 + OH : 	KAPHO2*0.44 	;
+{12149.} 	 C116CO3 + NO = C116O2 + NO2 : 	KAPNO 	;
+{12150.} 	 C116CO3 + NO2 = C116PAN : 	KFPAN 	;
+{12151.} 	 C116CO3 + NO3 = C116O2 + NO2 : 	KRO2NO3*1.74 	;
+{12152.} 	 C116CO3 = C116CO2H : 	1.00D-11*RO2*0.3 	;
+{12153.} 	 C116CO3 = C116O2 : 	1.00D-11*RO2*0.7 	;
+{12154.} 	 C116O2 + HO2 = C116OOH : 	KRO2HO2*0.932 	;
+{12155.} 	 C116O2 + NO = C116NO3 : 	KRO2NO*0.173 	;
+{12156.} 	 C116O2 + NO = C116O + NO2 : 	KRO2NO*0.827 	;
+{12157.} 	 C116O2 + NO3 = C116O + NO2 : 	KRO2NO3 	;
+{12158.} 	 C116O2 = C116CO : 	1.30D-12*RO2*0.2 	;
+{12159.} 	 C116O2 = C116O : 	1.30D-12*RO2*0.6 	;
+{12160.} 	 C116O2 = C116OH : 	1.30D-12*RO2*0.2 	;
+{12161.} 	 C126OO + CO = C116CHO : 	1.20D-15 	;
+{12162.} 	 C126OO + NO = C116CHO + NO2 : 	1.00D-14 	;
+{12163.} 	 C126OO + NO2 = C116CHO + NO3 : 	1.00D-15 	;
+{12164.} 	 C126OO + SO2 = C116CHO + SO3 : 	7.00D-14 	;
+{12165.} 	 C126OO = C116CHO + H2O2 : 	1.40D-17*H2O 	;
+{12166.} 	 C129O2 + HO2 = C129OOH : 	KRO2HO2*0.968 	;
+{12167.} 	 C129O2 + NO = C129O + NO2 : 	KRO2NO 	;
+{12168.} 	 C129O2 + NO3 = C129O + NO2 : 	KRO2NO3 	;
+{12169.} 	 C129O2 = C129CO : 	8.80D-13*RO2*0.2 	;
+{12170.} 	 C129O2 = C129O : 	8.80D-13*RO2*0.6 	;
+{12171.} 	 C129O2 = C129OH : 	8.80D-13*RO2*0.2 	;
+{12172.} 	 C1313OOH + OH = C1313O2 : 	6.64D-11 	;
+{12173.} 	 C1313OOH = C1313O + OH : 	J(41) 	;
+{12174.} 	 C1313NO3 + OH = C116CHO + HCHO + NO2 : 	5.59D-11 	;
+{12175.} 	 C1313O = C116CHO + HCHO + HO2 : 	KDEC 	;
+{12176.} 	 C1313OH + OH = C1313O : 	6.29D-11 	;
+{12177.} 	 C126OOH + OH = C126CO + OH : 	7.39D-11 	;
+{12178.} 	 C126OOH = C126O + OH : 	J(41) 	;
+{12179.} 	 C126NO3 + OH = C126CO + NO2 : 	5.82D-11 	;
+{12180.} 	 C126NO3 = C126O + NO2 : 	J(53) 	;
+{12181.} 	 C126O = C127O2 : 	KDEC 	;
+{12182.} 	 C126CO + OH = C127O2 : 	6.85D-11 	;
+{12183.} 	 C126OH + OH = C126CO + HO2 : 	6.91D-11 	;
+{12184.} 	 C144OOH + OH = C144O2 : 	3.64D-11 	;
+{12185.} 	 C144OOH = C144O + OH : 	J(41) 	;
+{12186.} 	 C142OOH + OH = C142O2 : 	8.69D-11 	;
+{12187.} 	 C142OOH = C142O + OH : 	J(41) 	;
+{12188.} 	 C142NO3 + OH = C143CO + NO2 : 	5.82D-11 	;
+{12189.} 	 C142NO3 = C142O + NO2 : 	J(55) 	;
+{12190.} 	 C142O = C143O2 : 	KDEC 	;
+{12191.} 	 C142OH + OH = C142O : 	7.47D-11 	;
+{12192.} 	 NBCKOOH + OH = NBCKO2 : 	9.73D-12 	;
+{12193.} 	 NBCKOOH = NBCKO + OH : 	J(41) 	;
+{12194.} 	 NBCKO = BCLKET + NO2 : 	KDEC 	;
+{12195.} 	 BCKBNO3 + OH = BCKBCO + NO2 : 	6.30D-12 	;
+{12196.} 	 C1210O2 + HO2 = C1210OOH : 	KRO2HO2*0.947 	;
+{12197.} 	 C1210O2 + NO = C1210NO3 : 	KRO2NO*0.176 	;
+{12198.} 	 C1210O2 + NO = C1210O + NO2 : 	KRO2NO*0.824 	;
+{12199.} 	 C1210O2 + NO3 = C1210O + NO2 : 	KRO2NO3 	;
+{12200.} 	 C1210O2 = C116CHO : 	1.30D-12*RO2*0.2 	;
+{12201.} 	 C1210O2 = C1210O : 	1.30D-12*RO2*0.6 	;
+{12202.} 	 C1210O2 = C1210OH : 	1.30D-12*RO2*0.2 	;
+{12203.} 	 BCKAOOH + OH = BCKAO2 : 	2.08D-11 	;
+{12204.} 	 BCKAOOH = BCKAO + OH : 	J(41) 	;
+{12205.} 	 BCKANO3 + OH = BCLKET + NO2 : 	9.20D-12 	;
+{12206.} 	 BCKAO = BCLKET + HO2 : 	KDEC 	;
+{12207.} 	 BCKAOH + OH = BCKBCO + HO2 : 	1.74D-11 	;
+{12208.} 	 BCKBOOH + OH = BCKBCO + OH : 	4.76D-11 	;
+{12209.} 	 BCKBOOH = BCKBO + OH : 	J(41) 	;
+{12210.} 	 BCKBO = BCLKET + HO2 : 	KDEC 	;
+{12211.} 	 BCKBCO + OH = C131CO3 : 	1.73D-11 	;
+{12212.} 	 CH3SO2 + O3 = CH3SO3 : 	3.00D-13 	;
+{12213.} 	 CH3SO2 = CH3O2 + SO2 : 	5.00D+13*EXP(-9673/TEMP) 	;
+{12214.} 	 CH3SO2 = CH3SO2O2 : 	1.03D-16*EXP(1580/TEMP)*O2 	;
+{12215.} 	 CH3SOO2 + HO2 = CH3SO2 + OH : 	KAPHO2*0.44 	;
+{12216.} 	 CH3SOO2 + HO2 = CH3SOOOH : 	KAPHO2*0.41 	;
+{12217.} 	 CH3SOO2 + HO2 = MSIA + O3 : 	KAPHO2*0.15 	;
+{12218.} 	 CH3SOO2 + NO = CH3SO2 + NO2 : 	1.00D-11 	;
+{12219.} 	 CH3SOO2 + NO2 = CH3SOO2NO2 : 	1.20D-12*(TEMP/300)**-0.9 	;
+{12220.} 	 CH3SOO2 + NO3 = CH3SO2 + NO2 : 	KRO2NO3*1.74 	;
+{12221.} 	 CH3SOO2 = CH3SO : 	9.10D+10*EXP(-3560/TEMP) 	;
+{12222.} 	 CH3SOO2 = CH3SO2 : 	1.00D-11*RO2*0.7 	;
+{12223.} 	 CH3SOO2 = MSIA : 	1.00D-11*RO2*0.3 	;
+{12224.} 	 H13C43CO3H = MEKAOH + HO2 + OH : 	J(41) 	;
+{12225.} 	 OH + H13C43CO3H = H13C43CO3 : 	1.27D-11 	;
+{12226.} 	 C5PAN12 = H13C43CO3 + NO2 : 	KBPAN 	;
+{12227.} 	 OH + C5PAN12 = MEKAOH + CO + NO2 : 	9.14D-12 	;
+{12228.} 	 C42CO3H = HOIPRCHO + HO2 + OH : 	J(41) 	;
+{12229.} 	 OH + C42CO3H = C42CO3 : 	2.36D-11 	;
+{12230.} 	 C5PAN13 = C42CO3 + NO2 : 	KBPAN 	;
+{12231.} 	 OH + C5PAN13 = HOIPRCHO + CO + NO2 : 	9.91D-12 	;
+{12232.} 	 HCOCH2CHO = HCOCH2O2 + HO2 + CO : 	J(15)*2 	;
+{12233.} 	 NO3 + HCOCH2CHO = HCOCH2CO3 + HNO3 : 	2*KNO3AL*2.4 	;
+{12234.} 	 OH + HCOCH2CHO = HCOCH2CO3 : 	4.29D-11 	;
+{12235.} 	 C1H4C5CO3 + HO2 = C1H4C5CO2H : 	KAPHO2*0.15 	;
+{12236.} 	 C1H4C5CO3 + HO2 = C1H4C5CO3H : 	KAPHO2*0.41 	;
+{12237.} 	 C1H4C5CO3 + HO2 = CHOC4OHO2 + OH : 	KAPHO2*0.44 	;
+{12238.} 	 C1H4C5CO3 + NO = CHOC4OHO2 + NO2 : 	KAPNO 	;
+{12239.} 	 C1H4C5CO3 + NO2 = C1H4C5PAN : 	KFPAN 	;
+{12240.} 	 C1H4C5CO3 + NO3 = CHOC4OHO2 + NO2 : 	KRO2NO3*1.74 	;
+{12241.} 	 C1H4C5CO3 = C1H4C5CO2H : 	1.00D-11*RO2*0.3 	;
+{12242.} 	 C1H4C5CO3 = CHOC4OHO2 : 	1.00D-11*RO2*0.7 	;
+{12243.} 	 CHOC4OHO2 + HO2 = CHOC4OHOOH : 	KRO2HO2*0.706 	;
+{12244.} 	 CHOC4OHO2 + NO = CHOC4OHO + NO2 : 	KRO2NO 	;
+{12245.} 	 CHOC4OHO2 + NO3 = CHOC4OHO + NO2 : 	KRO2NO3 	;
+{12246.} 	 CHOC4OHO2 = CHOC4OHO : 	1.30D-12*RO2 	;
+{12247.} 	 HOC4CHOO2 + HO2 = HOC4CHOOOH : 	KRO2HO2*0.706 	;
+{12248.} 	 HOC4CHOO2 + NO = HOC4CHOO + NO2 : 	KRO2NO 	;
+{12249.} 	 HOC4CHOO2 + NO3 = HOC4CHOO + NO2 : 	KRO2NO3 	;
+{12250.} 	 HOC4CHOO2 = HOC4CHOO : 	8.80D-13*RO2 	;
+{12251.} 	 C6145COO2 + HO2 = C6145COOOH : 	KRO2HO2*0.770 	;
+{12252.} 	 C6145COO2 + NO = C6145COO + NO2 : 	KRO2NO 	;
+{12253.} 	 C6145COO2 + NO3 = C6145COO + NO2 : 	KRO2NO3 	;
+{12254.} 	 C6145COO2 = C6145COO : 	2.00D-12*RO2 	;
+{12255.} 	 OH + HOC3H6CO2H = HO1C3O2 : 	9.64D-12 	;
+{12256.} 	 HOC3H6CO3H = HO1C3O2 + OH : 	J(41) 	;
+{12257.} 	 OH + HOC3H6CO3H = HOC3H6CO3 : 	1.31D-11 	;
+{12258.} 	 C4PAN1 = HOC3H6CO3 + NO2 : 	KBPAN 	;
+{12259.} 	 OH + C4PAN1 = HOC2H4CHO + CO + NO2 : 	5.92D-12 	;
+{12260.} 	 C3DIOLOOH + OH = C3DIOLO2 : 	2.78D-11 	;
+{12261.} 	 C3DIOLOOH = C3DIOLO + OH : 	J(41) 	;
+{12262.} 	 C3DIOLO = HOCH2CHO + HCHO + HO2 : 	KDEC 	;
+{12263.} 	 C51OOH = C51O + OH : 	J(41)+J(22) 	;
+{12264.} 	 OH + C51OOH = HO1CO24C5 + OH : 	8.69D-11 	;
+{12265.} 	 C51NO3 = C51O + NO2 : 	J(22) 	;
+{12266.} 	 OH + C51NO3 = HO1CO24C5 + NO2 : 	1.55D-12 	;
+{12267.} 	 C51O = CO2C3CHO + HCHO + HO2 : 	2.00D+14*EXP(-6382/TEMP) 	;
+{12268.} 	 OH + C51OH = HO1CO24C5 + OH : 	3.78D-11 	;
+{12269.} 	 CO2C4CO3 + HO2 = CO2C4CO2H + O3 : 	KAPHO2*0.15 	;
+{12270.} 	 CO2C4CO3 + HO2 = CO2C4CO3H : 	KAPHO2*0.41 	;
+{12271.} 	 CO2C4CO3 + HO2 = MEKAO2 + OH : 	KAPHO2*0.44 	;
+{12272.} 	 CO2C4CO3 + NO = MEKAO2 + NO2 : 	KAPNO 	;
+{12273.} 	 CO2C4CO3 + NO2 = C5PAN2 : 	KFPAN 	;
+{12274.} 	 CO2C4CO3 + NO3 = MEKAO2 + NO2 : 	KRO2NO3*1.74 	;
+{12275.} 	 CO2C4CO3 = CO2C4CO2H : 	1.00D-11*0.3*RO2 	;
+{12276.} 	 CO2C4CO3 = MEKAO2 : 	1.00D-11*0.7*RO2 	;
+{12277.} 	 OH + HO2C4CO2H = HO2C4O2 : 	1.11D-11 	;
+{12278.} 	 HO2C4CO3H = HO2C4O2 + OH : 	J(41) 	;
+{12279.} 	 OH + HO2C4CO3H = HO2C4CO3 : 	1.45D-11 	;
+{12280.} 	 C5PAN1 = HO2C4CO3 + NO2 : 	KBPAN 	;
+{12281.} 	 OH + C5PAN1 = HO2C3CHO + CO + NO2 : 	1.04D-11 	;
+{12282.} 	 HOBUT2CO3 + HO2 = HOBUT2CO2H + O3 : 	KAPHO2*0.15 	;
+{12283.} 	 HOBUT2CO3 + HO2 = HOBUT2CO3H : 	KAPHO2*0.41 	;
+{12284.} 	 HOBUT2CO3 + HO2 = NBUTOLBO2 + OH : 	KAPHO2*0.44 	;
+{12285.} 	 HOBUT2CO3 + NO = NBUTOLBO2 + NO2 : 	KAPNO 	;
+{12286.} 	 HOBUT2CO3 + NO2 = C5PAN5 : 	KFPAN 	;
+{12287.} 	 HOBUT2CO3 + NO3 = NBUTOLBO2 + NO2 : 	KRO2NO3*1.74 	;
+{12288.} 	 HOBUT2CO3 = HOBUT2CO2H : 	1.00D-11*0.3*RO2 	;
+{12289.} 	 HOBUT2CO3 = NBUTOLBO2 : 	1.00D-11*0.7*RO2 	;
+{12290.} 	 HOIBUTCO3H = SC4H9O2 + OH : 	J(41) 	;
+{12291.} 	 OH + HOIBUTCO3H = HOIBUTCO3 : 	1.79D-11 	;
+{12292.} 	 C5PAN3 = HOIBUTCO3 + NO2 : 	KBPAN 	;
+{12293.} 	 OH + C5PAN3 = HOIPRCHO + CO + NO2 : 	7.61D-12 	;
+{12294.} 	 C63OOH = C63O + OH : 	J(41)+J(22) 	;
+{12295.} 	 OH + C63OOH = HO1CO24C6 + OH : 	8.80D-11 	;
+{12296.} 	 C63NO3 = C63O + NO2 : 	J(22) 	;
+{12297.} 	 OH + C63NO3 = HO1CO24C6 + NO2 : 	2.54D-12 	;
+{12298.} 	 C63O = CO3C4CHO + HCHO + HO2 : 	2.00D+14*EXP(-6261/TEMP) 	;
+{12299.} 	 C63OH = C63O + HO2 : 	J(22) 	;
+{12300.} 	 OH + C63OH = HO1CO24C6 + HO2 : 	3.90D-11 	;
+{12301.} 	 CO3C5CO3 + HO2 = CO3C5CO2H + O3 : 	KAPHO2*0.15 	;
+{12302.} 	 CO3C5CO3 + HO2 = CO3C5CO3H : 	KAPHO2*0.41 	;
+{12303.} 	 CO3C5CO3 + HO2 = DIEKBO2 + OH : 	KAPHO2*0.44 	;
+{12304.} 	 CO3C5CO3 + NO = DIEKBO2 + NO2 : 	KAPNO 	;
+{12305.} 	 CO3C5CO3 + NO2 = C6PAN2 : 	KFPAN 	;
+{12306.} 	 CO3C5CO3 + NO3 = DIEKBO2 + NO2 : 	KRO2NO3*1.74 	;
+{12307.} 	 CO3C5CO3 = CO3C5CO2H : 	1.00D-11*0.3*RO2 	;
+{12308.} 	 CO3C5CO3 = DIEKBO2 : 	1.00D-11*0.7*RO2 	;
+{12309.} 	 OH + HO3C5CO2H = HO3C5O2 : 	1.72D-11 	;
+{12310.} 	 HO3C5CO3H = HO3C5O2 + OH : 	J(41) 	;
+{12311.} 	 OH + HO3C5CO3H = HO3C5CO3 : 	2.07D-11 	;
+{12312.} 	 C6PAN1 = HO3C5CO3 + NO2 : 	KBPAN 	;
+{12313.} 	 OH + C6PAN1 = HO3C4CHO + CO + NO2 : 	1.35D-11 	;
+{12314.} 	 C64OOH = C64O + OH : 	J(41)+J(22) 	;
+{12315.} 	 OH + C64OOH = C64O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12316.} 	 OH + C64OOH = C65OOH + HO2 : 	5.29D-12 	;
+{12317.} 	 C64NO3 = C64O + NO2 : 	J(22) 	;
+{12318.} 	 OH + C64NO3 = MGLYOX + ACETOL + NO2 : 	1.06D-12 	;
+{12319.} 	 CO2C54CO3 + HO2 = CO2C54CO2H + O3 : 	KAPHO2*0.15 	;
+{12320.} 	 CO2C54CO3 + HO2 = CO2C54CO3H : 	KAPHO2*0.41 	;
+{12321.} 	 CO2C54CO3 + HO2 = CO2C54O2 + OH : 	KAPHO2*0.44 	;
+{12322.} 	 CO2C54CO3 + NO = CO2C54O2 + NO2 : 	KAPNO 	;
+{12323.} 	 CO2C54CO3 + NO2 = C6PAN5 : 	KFPAN 	;
+{12324.} 	 CO2C54CO3 + NO3 = CO2C54O2 + NO2 : 	KRO2NO3*1.74 	;
+{12325.} 	 CO2C54CO3 = CO2C54CO2H : 	1.00D-11*0.3*RO2 	;
+{12326.} 	 CO2C54CO3 = CO2C54O2 : 	1.00D-11*0.7*RO2 	;
+{12327.} 	 C65O2 + HO2 = C65OOH : 	KRO2HO2*0.770 	;
+{12328.} 	 C65O2 + NO = C65O + NO2 : 	KRO2NO 	;
+{12329.} 	 C65O2 + NO3 = C65O + NO2 : 	KRO2NO3 	;
+{12330.} 	 C65O2 = C65O : 	9.20D-14*0.7*RO2 	;
+{12331.} 	 C65O2 = C65OH : 	9.20D-14*0.3*RO2 	;
+{12332.} 	 HO2C54OOH = HO2C54O + OH : 	J(41) 	;
+{12333.} 	 OH + HO2C54OOH = HO2CO4C5 + OH : 	3.39D-11 	;
+{12334.} 	 HO2C54NO3 = HO2C54O + NO2 : 	J(54) 	;
+{12335.} 	 OH + HO2C54NO3 = HO2CO4C5 + NO2 : 	8.83D-12 	;
+{12336.} 	 HO2C54O = HO24C5O2 : 	3.05D+11*EXP(-4240/TEMP) 	;
+{12337.} 	 HO2C54O = HO2CO4C5 + HO2 : 	KROSEC*O2 	;
+{12338.} 	 OH + HO24C5 = HO2CO4C5 + HO2 : 	1.87D-11 	;
+{12339.} 	 OH + HO2C54CO2H = HO2C54O2 : 	1.52D-11 	;
+{12340.} 	 HO2C54CO3H = HO2C54O2 + OH : 	J(41) 	;
+{12341.} 	 OH + HO2C54CO3H = HO2C54CO3 : 	1.87D-11 	;
+{12342.} 	 C6PAN4 = HO2C54CO3 + NO2 : 	KBPAN 	;
+{12343.} 	 OH + C6PAN4 = HO2CO4C5 + CO + NO2 : 	1.08D-11 	;
+{12344.} 	 C66OOH = C66O + OH : 	J(41) 	;
+{12345.} 	 C66OOH = CH3CHO + HOIPRCO3 + OH : 	J(22) 	;
+{12346.} 	 OH + C66OOH = C66CO + OH : 	2.80D-11 	;
+{12347.} 	 OH + C66OOH = C66O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12348.} 	 C66O = CH3CHO + HOIPRCO3 : 	KDEC 	;
+{12349.} 	 C66CO = IPRCO3 + CH3CO3 : 	J(35) 	;
+{12350.} 	 OH + C66CO = C23C54CHO + HO2 : 	1.53D-11 	;
+{12351.} 	 C66OH = CH3CHO + HOIPRCO3 + HO2 : 	J(22) 	;
+{12352.} 	 OH + C66OH = C66CO + HO2 : 	2.10D-11 	;
+{12353.} 	 CO3C54CO3H = DIEKAO2 + OH : 	J(41)+J(22) 	;
+{12354.} 	 OH + CO3C54CO3H = CO3C54CO3 : 	6.48D-12 	;
+{12355.} 	 C6PAN6 = CO3C54CO3 + NO2 : 	KBPAN 	;
+{12356.} 	 OH + C6PAN6 = CO23C5 + CO + NO2 : 	2.20D-12 	;
+{12357.} 	 OH + H2M2C4CO2H = HO2M2C4O2 : 	5.82D-12 	;
+{12358.} 	 H2M2C4CO3H = HO2M2C4O2 + OH : 	J(41) 	;
+{12359.} 	 OH + H2M2C4CO3H = H2M2C4CO3 : 	9.42D-12 	;
+{12360.} 	 C6PAN8 = H2M2C4CO3 + NO2 : 	KBPAN 	;
+{12361.} 	 OH + C6PAN8 = H2M2C3CHO + CO + NO2 : 	2.09D-12 	;
+{12362.} 	 C67OOH = C67O + OH : 	J(41)+J(15) 	;
+{12363.} 	 OH + C67OOH = C67CHO + OH : 	1.04D-10 	;
+{12364.} 	 C67NO3 = C67O + NO2 : 	J(15) 	;
+{12365.} 	 OH + C67NO3 = C67CHO + NO2 : 	2.17D-11 	;
+{12366.} 	 C67O = CH3COCH3 + HO2 + HCOCH2CHO : 	2.00D+14*EXP(-4909/TEMP) 	;
+{12367.} 	 C67CHO = C55O2 + HO2 + CO : 	J(15) 	;
+{12368.} 	 NO3 + C67CHO = C67CO3 + HNO3 : 	KNO3AL*8.5 	;
+{12369.} 	 OH + C67CHO = C67CO3 : 	6.76D-11 	;
+{12370.} 	 C67OH = C67O + HO2 : 	J(15) 	;
+{12371.} 	 OH + C67OH = C67CHO + HO2 : 	5.50D-11 	;
+{12372.} 	 C610OOH = C610O + OH : 	J(41)+J(22) 	;
+{12373.} 	 OH + C610OOH = CO24M3C5OH + OH : 	8.84D-11 	;
+{12374.} 	 C610NO3 = C610O + NO2 : 	J(22) 	;
+{12375.} 	 OH + C610NO3 = CO24M3C5OH + NO2 : 	2.09D-12 	;
+{12376.} 	 C610O = HCHO + HO2 + CO2C43CHO : 	2.00D+14*EXP(-6382/TEMP) 	;
+{12377.} 	 C610OH = C610O + HO2 : 	J(22) 	;
+{12378.} 	 OH + C610OH = CO24M3C5OH + HO2 : 	3.93D-11 	;
+{12379.} 	 CO24M3C5OH = HOCH2CO3 + MEKBO2 : 	J(22)*2 	;
+{12380.} 	 OH + CO24M3C5OH = CO24M3CHO + HO2 : 	4.32D-12 	;
+{12381.} 	 CO2M3C4CO3 + HO2 = C51CO2H + O3 : 	KAPHO2*0.15 	;
+{12382.} 	 CO2M3C4CO3 + HO2 = C51CO3H : 	KAPHO2*0.41 	;
+{12383.} 	 CO2M3C4CO3 + HO2 = MIPKBO2 + OH : 	KAPHO2*0.44 	;
+{12384.} 	 CO2M3C4CO3 + NO = MIPKBO2 + NO2 : 	KAPNO 	;
+{12385.} 	 CO2M3C4CO3 + NO2 = C6PAN12 : 	KFPAN 	;
+{12386.} 	 CO2M3C4CO3 + NO3 = MIPKBO2 + NO2 : 	KRO2NO3*1.74 	;
+{12387.} 	 CO2M3C4CO3 = C51CO2H : 	1.00D-11*0.3*RO2 	;
+{12388.} 	 CO2M3C4CO3 = MIPKBO2 : 	1.00D-11*0.7*RO2 	;
+{12389.} 	 OH + H2M3C4CO2H = H2M3C4O2 : 	1.90D-11 	;
+{12390.} 	 H2M3C4CO3H = H2M3C4O2 + OH : 	J(41) 	;
+{12391.} 	 OH + H2M3C4CO3H = H2M3C4CO3 : 	2.26D-11 	;
+{12392.} 	 C6PAN11 = H2M3C4CO3 + NO2 : 	KBPAN 	;
+{12393.} 	 OH + C6PAN11 = HO2C43CHO + CO + NO2 : 	1.20D-11 	;
+{12394.} 	 C68OOH = C68O + OH : 	J(41)+J(15) 	;
+{12395.} 	 OH + C68OOH = C68O2 : 	3.40D-11 	;
+{12396.} 	 C68NO3 = C68O + NO2 : 	J(15) 	;
+{12397.} 	 OH + C68NO3 = GLYOX + MEKAOH + NO2 : 	2.26D-11 	;
+{12398.} 	 C68O = CO2C3CHO + CH3CHO + HO2 : 	2.00D+14*EXP(-4909/TEMP) 	;
+{12399.} 	 C68OH = C68O + HO2 : 	J(15) 	;
+{12400.} 	 OH + C68OH = C68O : 	3.06D-11 	;
+{12401.} 	 C69OOH = C69O + OH : 	J(41)+J(22) 	;
+{12402.} 	 OH + C69OOH = H2M3CO4CHO + OH : 	3.86D-11 	;
+{12403.} 	 C69O = HO2C43CO3 + HCHO : 	KDEC 	;
+{12404.} 	 C69OH = C69O + HO2 : 	J(22) 	;
+{12405.} 	 OH + C69OH = CO24M3C5OH + HO2 : 	3.17D-11 	;
+{12406.} 	 H2M3CO4CHO = HO2C43CO3 + HO2 + CO : 	J(34) 	;
+{12407.} 	 OH + H2M3CO4CHO = HO2C43CO3 : 	4.18D-11 	;
+{12408.} 	 C611OOH = C611O + OH : 	J(41) 	;
+{12409.} 	 C611OOH = CH3CO3 + BIACET + OH : 	J(22)*2.0 	;
+{12410.} 	 OH + C611OOH = C611O2 : 	4.33D-12 	;
+{12411.} 	 C611O = CH3CO3 + BIACET : 	KDEC 	;
+{12412.} 	 C611OH = CH3CO3 + BIACET + HO2 : 	J(22)*2.0 	;
+{12413.} 	 OH + C611OH = C611O : 	8.74D-13 	;
+{12414.} 	 OH + HM33C3CO2H = HM33C3O2 : 	9.84D-12 	;
+{12415.} 	 HM33C3CO3H = HM33C3O2 + OH : 	J(41) 	;
+{12416.} 	 OH + HM33C3CO3H = HM33C3CO3 : 	1.33D-11 	;
+{12417.} 	 C6PAN13 = HM33C3CO3 + NO2 : 	KBPAN 	;
+{12418.} 	 OH + C6PAN13 = MEKAOH + HCHO + CO + NO2 : 	5.91D-12 	;
+{12419.} 	 HM22C3OOH = HM22C3O + OH : 	J(41) 	;
+{12420.} 	 OH + HM22C3OOH = HM22C3O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12421.} 	 OH + HM22C3OOH = HM22CHO + OH : 	1.41D-11 	;
+{12422.} 	 HM22C3NO3 = HM22C3O + NO2 : 	J(53) 	;
+{12423.} 	 OH + HM22C3NO3 = HM22CHO + NO2 : 	4.54D-12 	;
+{12424.} 	 HM22C3O = HM22CHO + HO2 : 	KROPRIM*O2 	;
+{12425.} 	 OH + HM22C3OH = HM22CHO + HO2 : 	8.65D-12 	;
+{12426.} 	 HM22CHO = IBUTOLBO2 + HO2 + CO : 	J(17) 	;
+{12427.} 	 NO3 + HM22CHO = HM22CO3 + HNO3 : 	KNO3AL*8.5 	;
+{12428.} 	 OH + HM22CHO = HM22CO3 : 	3.47D-11 	;
+{12429.} 	 OH + HM22C3CO2H = HM22C3O2 : 	5.50D-12 	;
+{12430.} 	 HM22C3CO3H = HM22C3O2 + OH : 	J(41) 	;
+{12431.} 	 OH + HM22C3CO3H = HM22C3CO3 : 	8.96D-12 	;
+{12432.} 	 C6PAN14 = HM22C3CO3 + NO2 : 	KBPAN 	;
+{12433.} 	 OH + C6PAN14 = HM22CHO + CO + NO2 : 	4.67D-12 	;
+{12434.} 	 OH + HM2C43CO2H = HM2C43O2 : 	1.35D-11 	;
+{12435.} 	 HM2C43CO3H = HM2C43O2 + OH : 	J(41) 	;
+{12436.} 	 OH + HM2C43CO3H = HM2C43CO3 : 	1.69D-11 	;
+{12437.} 	 C6PAN19 = HM2C43CO3 + NO2 : 	KBPAN 	;
+{12438.} 	 OH + C6PAN19 = MIPKBOH + CO + NO2 : 	7.60D-12 	;
+{12439.} 	 C72O2 + HO2 = C72OOH : 	KRO2HO2*0.820 	;
+{12440.} 	 C72O2 + NO = C72NO3 : 	KRO2NO*0.139 	;
+{12441.} 	 C72O2 + NO = C72O + NO2 : 	KRO2NO*0.861 	;
+{12442.} 	 C72O2 + NO3 = C72O + NO2 : 	KRO2NO3 	;
+{12443.} 	 C72O2 = C72O : 	8.80D-13*0.6*RO2 	;
+{12444.} 	 C72O2 = C72OH : 	8.80D-13*0.2*RO2 	;
+{12445.} 	 C72O2 = HO2CO35C7 : 	8.80D-13*0.2*RO2 	;
+{12446.} 	 CO25C73O2 + HO2 = CO25C73OOH : 	KRO2HO2*0.820 	;
+{12447.} 	 CO25C73O2 + NO = CO25C73O + NO2 : 	KRO2NO 	;
+{12448.} 	 CO25C73O2 + NO3 = CO25C73O + NO2 : 	KRO2NO3 	;
+{12449.} 	 CO25C73O2 = CO235C7 : 	8.80D-13*0.2*RO2 	;
+{12450.} 	 CO25C73O2 = CO25C73O : 	8.80D-13*0.6*RO2 	;
+{12451.} 	 CO25C73O2 = CO25C73OH : 	8.80D-13*0.2*RO2 	;
+{12452.} 	 CO25C74O2 + HO2 = CO25C74OOH : 	KRO2HO2*0.820 	;
+{12453.} 	 CO25C74O2 + NO = CO25C74O + NO2 : 	KRO2NO 	;
+{12454.} 	 CO25C74O2 + NO3 = CO25C74O + NO2 : 	KRO2NO3 	;
+{12455.} 	 CO25C74O2 = CO245C7 : 	8.80D-13*0.2*RO2 	;
+{12456.} 	 CO25C74O2 = CO25C74O : 	8.80D-13*0.6*RO2 	;
+{12457.} 	 CO25C74O2 = CO25C74OH : 	8.80D-13*0.2*RO2 	;
+{12458.} 	 C71OOH = C71O + OH : 	J(41) 	;
+{12459.} 	 C71OOH = HO3C4CO3 + CH3CHO + OH : 	J(22) 	;
+{12460.} 	 OH + C71OOH = C71O2 : 	5.12D-11 	;
+{12461.} 	 C71O = CH3CHO + HO3C4CO3 : 	KDEC 	;
+{12462.} 	 C76OOH = C76O + OH : 	J(41)+J(22) 	;
+{12463.} 	 OH + C76OOH = C76O2 : 	4.56D-11 	;
+{12464.} 	 C76O = HCHO + H3M2C4CO3 : 	KDEC 	;
+{12465.} 	 C77OOH = C77O + OH : 	J(41)+J(22) 	;
+{12466.} 	 OH + C77OOH = C77CO + OH : 	8.31D-11 	;
+{12467.} 	 C77NO3 = C77O + NO2 : 	J(54)+J(22) 	;
+{12468.} 	 OH + C77NO3 = C77CO + NO2 : 	1.09D-12 	;
+{12469.} 	 C77O = CH3COCH3 + CO2C3CHO + HO2 : 	KDEC 	;
+{12470.} 	 C77CO = IPRHOCO3 + CH3COCH2O2 : 	J(22)*2 	;
+{12471.} 	 OH + C77CO = C79O2 : 	1.83D-12 	;
+{12472.} 	 C77OH = C77O + HO2 : 	J(22) 	;
+{12473.} 	 OH + C77OH = C77CO + HO2 : 	3.40D-11 	;
+{12474.} 	 C78OOH = C78O + OH : 	J(41) 	;
+{12475.} 	 C78OOH = H2M2C3CHO + CH3CO3 + OH : 	J(22) 	;
+{12476.} 	 OH + C78OOH = C78CO + OH : 	2.00D-11 	;
+{12477.} 	 OH + C78OOH = C78O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12478.} 	 C78O = TBUTOLO2 + MGLYOX : 	KDEC 	;
+{12479.} 	 C78CO = H2M2C3CO3 + CH3CO3 : 	J(35) 	;
+{12480.} 	 OH + C78CO = C79O2 : 	1.30D-12 	;
+{12481.} 	 C78OH = H2M2C3CHO + CH3CO3 + HO2 : 	J(22) 	;
+{12482.} 	 OH + C78OH = C78CO + HO2 : 	1.13D-11 	;
+{12483.} 	 C712O2 + HO2 = C712OOH : 	KRO2HO2*0.820 	;
+{12484.} 	 C712O2 + NO = C712NO3 : 	KRO2NO*0.042 	;
+{12485.} 	 C712O2 + NO = C712O + NO2 : 	KRO2NO*0.958 	;
+{12486.} 	 C712O2 + NO3 = C712O + NO2 : 	KRO2NO3 	;
+{12487.} 	 C712O2 = C712O : 	9.20D-14*0.7*RO2 	;
+{12488.} 	 C712O2 = C712OH : 	9.20D-14*0.3*RO2 	;
+{12489.} 	 C713O2 + HO2 = C713OOH : 	KRO2HO2*0.820 	;
+{12490.} 	 C713O2 + NO = C713O + NO2 : 	KRO2NO 	;
+{12491.} 	 C713O2 + NO3 = C713O + NO2 : 	KRO2NO3 	;
+{12492.} 	 C713O2 = C713O : 	9.20D-14*0.7*RO2 	;
+{12493.} 	 C713O2 = C713OH : 	9.20D-14*0.3*RO2 	;
+{12494.} 	 C714O2 + HO2 = C714OOH : 	KRO2HO2*0.820 	;
+{12495.} 	 C714O2 + NO = C714O + NO2 : 	KRO2NO 	;
+{12496.} 	 C714O2 + NO3 = C714O + NO2 : 	KRO2NO3 	;
+{12497.} 	 C714O2 = C714O : 	8.80D-13*0.6*RO2 	;
+{12498.} 	 C714O2 = C714OH : 	8.80D-13*0.2*RO2 	;
+{12499.} 	 C714O2 = M3CO245C6 : 	8.80D-13*0.2*RO2 	;
+{12500.} 	 C711OOH = C711O + OH : 	J(41)+J(22) 	;
+{12501.} 	 OH + C711OOH = C711O2 : 	1.18D-11 	;
+{12502.} 	 C711O = HCHO + H3M3C4CO3 : 	KDEC 	;
+{12503.} 	 H3M3C5OOH = H3M3C5O + OH : 	J(41) 	;
+{12504.} 	 OH + H3M3C5OOH = H3M3C4CHO + OH : 	1.25D-11 	;
+{12505.} 	 OH + H3M3C5OOH = H3M3C5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12506.} 	 H3M3C5NO3 = H3M3C5O + NO2 : 	J(53) 	;
+{12507.} 	 OH + H3M3C5NO3 = H3M3C4CHO + NO2 : 	1.90D-12 	;
+{12508.} 	 H3M3C5O = H13M3C5O2 : 	2.58D+11*EXP(-3430/TEMP) 	;
+{12509.} 	 OH + H13M3C5 = H3M3C4CHO + HO2 : 	7.06D-12 	;
+{12510.} 	 H3M3C4CHO = PROL11MO2 + HO2 + CO : 	J(15) 	;
+{12511.} 	 NO3 + H3M3C4CHO = H3M3C4CO3 + HNO3 : 	KNO3AL*8.5 	;
+{12512.} 	 OH + H3M3C4CHO = H3M3C4CO3 : 	2.31D-11 	;
+{12513.} 	 OH + H3M3C5CO2H = H3M3C5O2 : 	7.08D-12 	;
+{12514.} 	 H3M3C5CO3H = H3M3C5O2 + OH : 	J(41) 	;
+{12515.} 	 OH + H3M3C5CO3H = H3M3C5CO3 : 	1.05D-11 	;
+{12516.} 	 C7PAN1 = H3M3C5CO3 + NO2 : 	KBPAN 	;
+{12517.} 	 OH + C7PAN1 = H3M3C4CHO + CO + NO2 : 	3.38D-12 	;
+{12518.} 	 C82OOH = C82O + OH : 	J(41)+J(22) 	;
+{12519.} 	 OH + C82OOH = HO3CO46C8 + OH : 	9.56D-11 	;
+{12520.} 	 C82NO3 = C82O + NO2 : 	J(22) 	;
+{12521.} 	 OH + C82NO3 = HO3CO46C8 + NO2 : 	5.86D-12 	;
+{12522.} 	 C82O = CO3C4CHO + C2H5CHO + HO2 : 	KDEC 	;
+{12523.} 	 HO34CO6C8 = C82O + HO2 : 	J(22) 	;
+{12524.} 	 OH + HO34CO6C8 = HO3CO46C8 + HO2 : 	4.65D-11 	;
+{12525.} 	 HO3CO46C8 = CO3C4CO3 + C2H5CHO + HO2 : 	J(22)*2 	;
+{12526.} 	 OH + HO3CO46C8 = CO346C8 + HO2 : 	1.20D-11 	;
+{12527.} 	 C84O2 + HO2 = C84OOH : 	KRO2HO2*0.859 	;
+{12528.} 	 C84O2 + NO = C84O + NO2 : 	KRO2NO 	;
+{12529.} 	 C84O2 + NO3 = C84O + NO2 : 	KRO2NO3 	;
+{12530.} 	 C84O2 = C84O : 	8.80D-13*0.6*RO2 	;
+{12531.} 	 C84O2 = C84OH : 	8.80D-13*0.2*RO2 	;
+{12532.} 	 C84O2 = CO346C8 : 	8.80D-13*0.2*RO2 	;
+{12533.} 	 C81OOH = C81O + OH : 	J(41)+J(22) 	;
+{12534.} 	 OH + C81OOH = C81O2 : 	5.27D-11 	;
+{12535.} 	 C81O = CH3CHO + HO4C5CO3 : 	KDEC 	;
+{12536.} 	 C93OOH = C93O + OH : 	J(41)+J(22) 	;
+{12537.} 	 OH + C93OOH = C93CO + OH : 	9.70D-11 	;
+{12538.} 	 C93NO3 = C93O + NO2 : 	J(22) 	;
+{12539.} 	 OH + C93NO3 = C93CO + NO2 : 	7.27D-12 	;
+{12540.} 	 C93O = CO3C4CHO + C3H7CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{12541.} 	 C93CO = CO3C4CO3 + C3H7CHO + HO2 : 	J(22)*2 	;
+{12542.} 	 OH + C93CO = CO356C9 + HO2 : 	1.34D-11 	;
+{12543.} 	 C93OH = C93O + HO2 : 	J(22) 	;
+{12544.} 	 OH + C93OH = C93CO + HO2 : 	4.79D-11 	;
+{12545.} 	 C94O2 + HO2 = C94OOH : 	KRO2HO2*0.890 	;
+{12546.} 	 C94O2 + NO = C94O + NO2 : 	KRO2NO 	;
+{12547.} 	 C94O2 + NO3 = C94O + NO2 : 	KRO2NO3 	;
+{12548.} 	 C94O2 = C94O : 	8.80D-13*0.6*RO2 	;
+{12549.} 	 C94O2 = C94OH : 	8.80D-13*0.2*RO2 	;
+{12550.} 	 C94O2 = CO356C9 : 	8.80D-13*0.2*RO2 	;
+{12551.} 	 C92OOH = C92O + OH : 	J(41)+J(22) 	;
+{12552.} 	 OH + C92OOH = C92O2 : 	5.41D-11 	;
+{12553.} 	 C92O = CH3CHO + HO5C6CO3 : 	KDEC 	;
+{12554.} 	 HO6C7OOH = HO6C7O + OH : 	J(41) 	;
+{12555.} 	 OH + HO6C7OOH = HO6C7O2 : 	2.92D-11 	;
+{12556.} 	 HO6C7O = HCHO + C5H11CHO + HO2 : 	KDEC 	;
+{12557.} 	 C103OOH = C103O + OH : 	J(41)+J(22) 	;
+{12558.} 	 OH + C103OOH = C103CO + OH : 	9.84D-11 	;
+{12559.} 	 C103NO3 = C103O + NO2 : 	J(22) 	;
+{12560.} 	 OH + C103NO3 = C103CO + NO2 : 	8.68D-12 	;
+{12561.} 	 C103O = CO3C4CHO + C4H9CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{12562.} 	 C103CO = CO3C4CO3 + C4H9CHO + HO2 : 	J(22)*2 	;
+{12563.} 	 OH + C103CO = CO356C10 + HO2 : 	1.54D-11 	;
+{12564.} 	 C103OH = C103O + HO2 : 	J(22) 	;
+{12565.} 	 OH + C103OH = C103CO + HO2 : 	4.93D-11 	;
+{12566.} 	 C104O2 + HO2 = C104OOH : 	KRO2HO2*0.914 	;
+{12567.} 	 C104O2 + NO = C104O + NO2 : 	KRO2NO 	;
+{12568.} 	 C104O2 + NO3 = C104O + NO2 : 	KRO2NO3 	;
+{12569.} 	 C104O2 = C104O : 	8.80D-13*0.6*RO2 	;
+{12570.} 	 C104O2 = C104OH : 	8.80D-13*0.2*RO2 	;
+{12571.} 	 C104O2 = CO356C10 : 	8.80D-13*0.2*RO2 	;
+{12572.} 	 C102OOH = C102O + OH : 	J(41)+J(22) 	;
+{12573.} 	 OH + C102OOH = C102O2 : 	5.55D-11 	;
+{12574.} 	 C102O = CH3CHO + HO6C7CO3 : 	KDEC 	;
+{12575.} 	 HO7C8OOH = HO7C8O + OH : 	J(41) 	;
+{12576.} 	 OH + HO7C8OOH = HO7C8O2 : 	3.06D-11 	;
+{12577.} 	 HO7C8O = HCHO + C6H13CHO + HO2 : 	KDEC 	;
+{12578.} 	 C113OOH = C113O + OH : 	J(41)+J(22) 	;
+{12579.} 	 OH + C113OOH = C113CO + OH : 	9.85D-11 	;
+{12580.} 	 C113NO3 = C113O + NO2 : 	J(22) 	;
+{12581.} 	 OH + C113NO3 = C113CO + NO2 : 	1.01D-11 	;
+{12582.} 	 C113O = CO3C4CHO + C5H11CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{12583.} 	 C113CO = CO3C4CO3 + C5H11CHO + HO2 : 	J(22)*2 	;
+{12584.} 	 OH + C113CO = CO356C11 + HO2 : 	1.55D-11 	;
+{12585.} 	 C113OH = C113O + HO2 : 	J(22) 	;
+{12586.} 	 OH + C113OH = C113CO + HO2 : 	4.94D-11 	;
+{12587.} 	 C114O2 + HO2 = C114OOH : 	KRO2HO2*0.932 	;
+{12588.} 	 C114O2 + NO = C114O + NO2 : 	KRO2NO 	;
+{12589.} 	 C114O2 + NO3 = C114O + NO2 : 	KRO2NO3 	;
+{12590.} 	 C114O2 = C114O : 	8.80D-13*0.6*RO2 	;
+{12591.} 	 C114O2 = C114OH : 	8.80D-13*0.2*RO2 	;
+{12592.} 	 C114O2 = CO356C11 : 	8.80D-13*0.2*RO2 	;
+{12593.} 	 C112OOH = C112O + OH : 	J(41)+J(22) 	;
+{12594.} 	 OH + C112OOH = C112O2 : 	5.69D-11 	;
+{12595.} 	 C112O = CH3CHO + HO7C8CO3 : 	KDEC 	;
+{12596.} 	 HO8C9OOH = HO8C9O + OH : 	J(41) 	;
+{12597.} 	 OH + HO8C9OOH = HO8C9O2 : 	3.20D-11 	;
+{12598.} 	 HO8C9O = CH3CHO + C6H13CHO + HO2 : 	KDEC 	;
+{12599.} 	 C123OOH = C123O + OH : 	J(41)+J(22) 	;
+{12600.} 	 OH + C123OOH = C123CO + OH : 	9.99D-11 	;
+{12601.} 	 C123NO3 = C123O + NO2 : 	J(22) 	;
+{12602.} 	 OH + C123NO3 = C123CO + NO2 : 	1.15D-11 	;
+{12603.} 	 C123O = CO3C4CHO + C6H13CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{12604.} 	 C123CO = CO3C4CO3 + C6H13CHO + HO2 : 	J(22)*2 	;
+{12605.} 	 OH + C123CO = CO356C12 + HO2 : 	1.69D-11 	;
+{12606.} 	 C123OH = C123O + HO2 : 	J(22) 	;
+{12607.} 	 OH + C123OH = C123CO + HO2 : 	5.08D-11 	;
+{12608.} 	 C6H13CO3 + HO2 = C6H13CO2H + O3 : 	KAPHO2*0.15 	;
+{12609.} 	 C6H13CO3 + HO2 = C6H13CO3H : 	KAPHO2*0.41 	;
+{12610.} 	 C6H13CO3 + HO2 = HEXAO2 + OH : 	KAPHO2*0.44 	;
+{12611.} 	 C6H13CO3 + NO = HEXAO2 + NO2 : 	KAPNO 	;
+{12612.} 	 C6H13CO3 + NO2 = PHPTN : 	KFPAN 	;
+{12613.} 	 C6H13CO3 + NO3 = HEXAO2 + NO2 : 	KRO2NO3*1.74 	;
+{12614.} 	 C6H13CO3 = C6H13CO2H : 	1.00D-11*0.3*RO2 	;
+{12615.} 	 C6H13CO3 = HEXAO2 : 	1.00D-11*0.7*RO2 	;
+{12616.} 	 C124O2 + HO2 = C124OOH : 	KRO2HO2*0.947 	;
+{12617.} 	 C124O2 + NO = C124O + NO2 : 	KRO2NO 	;
+{12618.} 	 C124O2 + NO3 = C124O + NO2 : 	KRO2NO3 	;
+{12619.} 	 C124O2 = C124O : 	8.80D-13*0.6*RO2 	;
+{12620.} 	 C124O2 = C124OH : 	8.80D-13*0.2*RO2 	;
+{12621.} 	 C124O2 = CO356C12 : 	8.80D-13*0.2*RO2 	;
+{12622.} 	 C122OOH = C122O + OH : 	J(41)+J(22) 	;
+{12623.} 	 OH + C122OOH = C122O2 : 	5.83D-11 	;
+{12624.} 	 C122O = CH3CHO + HO8C9CO3 : 	KDEC 	;
+{12625.} 	 CO1H63OOH + OH = C6COHOCHO + OH : 	4.80D-11 	;
+{12626.} 	 CO1H63OOH = CO1H63O + OH : 	J(41)+J(15) 	;
+{12627.} 	 CO1H63NO3 + OH = C6COHOCHO + NO2 : 	2.71D-11 	;
+{12628.} 	 CO1H63NO3 = CO1H63O + NO2 : 	J(54)+J(15) 	;
+{12629.} 	 CO1H63O = C6DIALOH + HO2 : 	KDEC 	;
+{12630.} 	 CO1H63OH + OH = C6COHOCHO + HO2 : 	3.89D-11 	;
+{12631.} 	 C3NO3COOOH + OH = C3NO3COO2 : 	9.51D-11 	;
+{12632.} 	 C3NO3COOOH = C3NO3COO + OH : 	J(41)+J(56)+J(57) 	;
+{12633.} 	 C3NO3COO = NO3CH2CO3 + HCHO : 	KDEC 	;
+{12634.} 	 CO14O3CHO + NO3 = CO + HCOCH2O2 + HNO3 : 	KNO3AL*8.0 	;
+{12635.} 	 CO14O3CHO + OH = CO + HCOCH2O2 : 	3.44D-11 	;
+{12636.} 	 CO14O3CHO = HO2 + CO + HCOCH2O2 : 	J(34) 	;
+{12637.} 	 NBZFUONE + OH = BZFUCO + NO2 : 	1.16D-12 	;
+{12638.} 	 CO14O3CO2H + OH = HCOCH2O2 : 	2.19D-11 	;
+{12639.} 	 MALANHYO2 + HO2 = MALANHYOOH : 	KRO2HO2*0.625 	;
+{12640.} 	 MALANHYO2 + NO = MALANHYO + NO2 : 	KRO2NO 	;
+{12641.} 	 MALANHYO2 + NO3 = MALANHYO + NO2 : 	KRO2NO3 	;
+{12642.} 	 MALANHYO2 = MALANHY2OH : 	8.80D-13*0.2*RO2 	;
+{12643.} 	 MALANHYO2 = MALANHYO : 	8.80D-13*0.6*RO2 	;
+{12644.} 	 MALANHYO2 = MALNHYOHCO : 	8.80D-13*0.2*RO2 	;
+{12645.} 	 NDNPHENO2 + HO2 = NDNPHENOOH : 	KRO2HO2*0.770 	;
+{12646.} 	 NDNPHENO2 + NO = NDNPHENO + NO2 : 	KRO2NO 	;
+{12647.} 	 NDNPHENO2 + NO3 = NDNPHENO + NO2 : 	KRO2NO3 	;
+{12648.} 	 NDNPHENO2 = NDNPHENO : 	8.00D-13*RO2 	;
+{12649.} 	 DNPHENO2 + HO2 = DNPHENOOH : 	KRO2HO2*0.770 	;
+{12650.} 	 DNPHENO2 + NO = DNPHENO + NO2 : 	KRO2NO 	;
+{12651.} 	 DNPHENO2 + NO3 = DNPHENO + NO2 : 	KRO2NO3 	;
+{12652.} 	 DNPHENO2 = DNPHENO : 	8.00D-13*RO2 	;
+{12653.} 	 NPHEN1OOH + OH = NPHEN1O2 : 	9.00D-13 	;
+{12654.} 	 NPHEN1OOH = NPHEN1O + OH : 	J(41) 	;
+{12655.} 	 NNCATECOOH + OH = NNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12656.} 	 NNCATECOOH = NNCATECO + OH : 	J(41) 	;
+{12657.} 	 NNCATECO = NC4DCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{12658.} 	 NCATECOOH + OH = NCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12659.} 	 NCATECOOH = NCATECO + OH : 	J(41) 	;
+{12660.} 	 NCATECO = NC4DCO2H + HCOCO2H + HO2 : 	KDEC 	;
+{12661.} 	 NBZQOOH + OH = NBZQO2 : 	6.68D-11 	;
+{12662.} 	 NBZQOOH = NBZQO + OH : 	J(41) 	;
+{12663.} 	 NBZQO = C6CO4DB + NO2 : 	KDEC 	;
+{12664.} 	 PBZQOOH + OH = PBZQCO + OH : 	1.23D-10 	;
+{12665.} 	 PBZQOOH = PBZQO + OH : 	J(41) 	;
+{12666.} 	 PBZQO = C5CO2OHCO3 : 	KDEC 	;
+{12667.} 	 PBZQCO + OH = C5CO2OHCO3 : 	6.07D-11 	;
+{12668.} 	 PBZQOH + OH = PBZQCO + HO2 : 	9.18D-11 	;
+{12669.} 	 NPTLQOOH + OH = NPTLQO2 : 	8.56D-11 	;
+{12670.} 	 NPTLQOOH = NPTLQO + OH : 	J(41) 	;
+{12671.} 	 NPTLQO = C7CO4DB + NO2 : 	KDEC 	;
+{12672.} 	 PTLQOOH + OH = PTLQCO + OH : 	1.42D-10 	;
+{12673.} 	 PTLQOOH = PTLQO + OH : 	J(41) 	;
+{12674.} 	 PTLQO = C6CO2OHCO3 : 	KDEC 	;
+{12675.} 	 PTLQCO + OH = C6CO2OHCO3 : 	7.95D-11 	;
+{12676.} 	 PTLQOH + OH = PTLQCO + HO2 : 	1.11D-10 	;
+{12677.} 	 NDNCRESO2 + HO2 = NDNCRESOOH : 	KRO2HO2*0.820 	;
+{12678.} 	 NDNCRESO2 + NO = NDNCRESO + NO2 : 	KRO2NO 	;
+{12679.} 	 NDNCRESO2 + NO3 = NDNCRESO + NO2 : 	KRO2NO3 	;
+{12680.} 	 NDNCRESO2 = NDNCRESO : 	8.00D-13*RO2 	;
+{12681.} 	 DNCRESO2 + HO2 = DNCRESOOH : 	KRO2HO2*0.820 	;
+{12682.} 	 DNCRESO2 + NO = DNCRESO + NO2 : 	KRO2NO 	;
+{12683.} 	 DNCRESO2 + NO3 = DNCRESO + NO2 : 	KRO2NO3 	;
+{12684.} 	 DNCRESO2 = DNCRESO : 	8.00D-13*RO2 	;
+{12685.} 	 NCRES1OOH + OH = NCRES1O2 : 	1.53D-12 	;
+{12686.} 	 NCRES1OOH = NCRES1O + OH : 	J(41) 	;
+{12687.} 	 MNNCATCOOH + OH = MNNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12688.} 	 MNNCATCOOH = MNNCATECO + OH : 	J(41) 	;
+{12689.} 	 MNNCATECO = NC4MDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{12690.} 	 MNCATECOOH + OH = MNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12691.} 	 MNCATECOOH = MNCATECO + OH : 	J(41) 	;
+{12692.} 	 MNCATECO = NC4MDCO2H + HCOCO2H + HO2 : 	KDEC 	;
+{12693.} 	 CH3COCO3H + OH = CH3COCO3 : 	3.69D-12 	;
+{12694.} 	 CH3COCO3H = CH3CO3 + OH : 	J(41)+J(35) 	;
+{12695.} 	 C54CO + NO3 = CO + CO + CO + CH3CO3 + HNO3 : 	KNO3AL*5.5 	;
+{12696.} 	 C54CO + OH = CO + CO + CO + CH3CO3 : 	1.72D-11 	;
+{12697.} 	 C54CO = HO2 + CO + CO + CO + CH3CO3 : 	J(34)+J(35)*2 	;
+{12698.} 	 C24O3CCO2H + OH = MECOACETO2 : 	8.76D-13 	;
+{12699.} 	 C6OTRIKET + OH = C6OTKETO2 : 	2.90D-12 	;
+{12700.} 	 C6OTRIKET = CH3CO3 + CH3COCH2O2 : 	J(22) 	;
+{12701.} 	 C6O4KETO2 + HO2 = C6O4KETOOH : 	KRO2HO2 	;
+{12702.} 	 C6O4KETO2 + NO = C6O4KETO + NO2 : 	KRO2NO 	;
+{12703.} 	 C6O4KETO2 + NO3 = C6O4KETO + NO2 : 	KRO2NO3 	;
+{12704.} 	 C6O4KETO2 = C6O4KETO : 	2.00D-12*RO2 	;
+{12705.} 	 NDNOXYOLO2 + HO2 = NDNOXYLOOH : 	KRO2HO2*0.859 	;
+{12706.} 	 NDNOXYOLO2 + NO = NDNOXYOLO + NO2 : 	KRO2NO 	;
+{12707.} 	 NDNOXYOLO2 + NO3 = NDNOXYOLO + NO2 : 	KRO2NO3 	;
+{12708.} 	 NDNOXYOLO2 = NDNOXYOLO : 	8.00D-13*RO2 	;
+{12709.} 	 DNOXYOLO2 + HO2 = DNOXYOLOOH : 	KRO2HO2*0.859 	;
+{12710.} 	 DNOXYOLO2 + NO = DNOXYOLO + NO2 : 	KRO2NO 	;
+{12711.} 	 DNOXYOLO2 + NO3 = DNOXYOLO + NO2 : 	KRO2NO3 	;
+{12712.} 	 DNOXYOLO2 = DNOXYOLO : 	8.00D-13*RO2 	;
+{12713.} 	 NOXYOL1OOH + OH = NOXYOL1O2 : 	1.53D-12 	;
+{12714.} 	 NOXYOL1OOH = NOXYOL1O + OH : 	J(41) 	;
+{12715.} 	 NOXYQOOH + OH = NOXYQO2 : 	1.05D-10 	;
+{12716.} 	 NOXYQOOH = NOXYQO + OH : 	J(41) 	;
+{12717.} 	 NOXYQO = C6CO4M2DB + NO2 : 	KDEC 	;
+{12718.} 	 OXYQOOH + OH = OXYQCO + OH : 	1.61D-10 	;
+{12719.} 	 OXYQOOH = OXYQO + OH : 	J(41) 	;
+{12720.} 	 OXYQO = C5M2OHOCO3 : 	KDEC 	;
+{12721.} 	 OXYQCO + OH = C5M2OHOCO3 : 	9.85D-11 	;
+{12722.} 	 OXYQOH + OH = OXYQCO + HO2 : 	1.30D-10 	;
+{12723.} 	 OXNNCATOOH + OH = OXNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12724.} 	 OXNNCATOOH = OXNNCATCO + OH : 	J(41) 	;
+{12725.} 	 OXNNCATCO = NC4MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{12726.} 	 OXNCATCOOH + OH = OXNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12727.} 	 OXNCATCOOH = OXNCATECO + OH : 	J(41) 	;
+{12728.} 	 OXNCATECO = NC4MDCO2H + CH3COCO2H + HO2 : 	KDEC 	;
+{12729.} 	 C6CO3MOH + OH = C4COMOHCO3 : 	6.66D-11 	;
+{12730.} 	 C6CO3MOH = CHOMOHCO3 + CH3CO3 : 	J(35) 	;
+{12731.} 	 C23O3MCHO + NO3 = C23O3MCO3 + HNO3 : 	KNO3AL*8.5 	;
+{12732.} 	 C23O3MCHO + OH = C23O3MCO3 : 	2.68D-11 	;
+{12733.} 	 C23O3MCHO = CO + C23O3MO2 + HO2 : 	J(15) 	;
+{12734.} 	 C23O3CCHO + NO3 = C23O3CCO3 + HNO3 : 	KNO3AL*5.5 	;
+{12735.} 	 C23O3CCHO + OH = C23O3CCO3 : 	2.15D-11 	;
+{12736.} 	 C23O3CCHO = CO + MCOCOMOXO2 + HO2 : 	J(15) 	;
+{12737.} 	 MMALANHYO2 + HO2 = MMALNHYOOH : 	KRO2HO2*0.706 	;
+{12738.} 	 MMALANHYO2 + NO = MMALANHYO + NO2 : 	KRO2NO 	;
+{12739.} 	 MMALANHYO2 + NO3 = MMALANHYO + NO2 : 	KRO2NO3 	;
+{12740.} 	 MMALANHYO2 = MMALANHYO : 	9.20D-14*RO2*0.70 	;
+{12741.} 	 MMALANHYO2 = MMALNHY2OH : 	9.20D-14*RO2*0.30 	;
+{12742.} 	 NDNMXYOLO2 + HO2 = NDNMXYLOOH : 	KRO2HO2*0.859 	;
+{12743.} 	 NDNMXYOLO2 + NO = NDNMXYOLO + NO2 : 	KRO2NO 	;
+{12744.} 	 NDNMXYOLO2 + NO3 = NDNMXYOLO + NO2 : 	KRO2NO3 	;
+{12745.} 	 NDNMXYOLO2 = NDNMXYOLO : 	8.00D-13*RO2 	;
+{12746.} 	 DNMXYOLO2 + HO2 = DNMXYOLOOH : 	KRO2HO2*0.859 	;
+{12747.} 	 DNMXYOLO2 + NO = DNMXYOLO + NO2 : 	KRO2NO 	;
+{12748.} 	 DNMXYOLO2 + NO3 = DNMXYOLO + NO2 : 	KRO2NO3 	;
+{12749.} 	 DNMXYOLO2 = DNMXYOLO : 	8.00D-13*RO2 	;
+{12750.} 	 NMXYOL1OOH + OH = NMXYOL1O2 : 	1.53D-12 	;
+{12751.} 	 NMXYOL1OOH = NMXYOL1O + OH : 	J(41) 	;
+{12752.} 	 NMXYQOOH + OH = NMXYQO2 : 	7.54D-11 	;
+{12753.} 	 NMXYQOOH = NMXYQO + OH : 	J(41) 	;
+{12754.} 	 NMXYQO = C8CO4DB + NO2 : 	KDEC 	;
+{12755.} 	 MXYQOOH + OH = MXYQO2 : 	9.48D-11 	;
+{12756.} 	 MXYQOOH = MXYQO + OH : 	J(41) 	;
+{12757.} 	 MXYQO = C7CO2OHCO3 : 	KDEC 	;
+{12758.} 	 MXYQOH + OH = C7CO2OHCO3 : 	9.13D-11 	;
+{12759.} 	 MXNNCATOOH + OH = MXNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12760.} 	 MXNNCATOOH = MXNNCATCO + OH : 	J(41) 	;
+{12761.} 	 MXNNCATCO = NC4MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{12762.} 	 MXNCATCOOH + OH = MXNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12763.} 	 MXNCATCOOH = MXNCATECO + OH : 	J(41) 	;
+{12764.} 	 MXNCATECO = NC4MDCO2H + CH3COCO2H + HO2 : 	KDEC 	;
+{12765.} 	 TL4OHNO2O2 + HO2 = TL4ONO2OOH : 	KRO2HO2*0.820 	;
+{12766.} 	 TL4OHNO2O2 + NO = TL4OHNO2O + NO2 : 	KRO2NO 	;
+{12767.} 	 TL4OHNO2O2 + NO3 = TL4OHNO2O + NO2 : 	KRO2NO3 	;
+{12768.} 	 TL4OHNO2O2 = TL4OHNO2O : 	9.20D-14*RO2 	;
+{12769.} 	 C62O = MGLYOX + CO + CH3CO3 : 	KDEC 	;
+{12770.} 	 NDNPXYOLO2 + HO2 = NDNPXYLOOH : 	KRO2HO2*0.859 	;
+{12771.} 	 NDNPXYOLO2 + NO = NDNPXYOLO + NO2 : 	KRO2NO 	;
+{12772.} 	 NDNPXYOLO2 + NO3 = NDNPXYOLO + NO2 : 	KRO2NO3 	;
+{12773.} 	 NDNPXYOLO2 = NDNPXYOLO : 	8.00D-13*RO2 	;
+{12774.} 	 DNPXYOLO2 + HO2 = DNPXYOLOOH : 	KRO2HO2*0.859 	;
+{12775.} 	 DNPXYOLO2 + NO = DNPXYOLO + NO2 : 	KRO2NO 	;
+{12776.} 	 DNPXYOLO2 + NO3 = DNPXYOLO + NO2 : 	KRO2NO3 	;
+{12777.} 	 DNPXYOLO2 = DNPXYOLO : 	8.00D-13*RO2 	;
+{12778.} 	 NPXYOL1OOH + OH = NPXYOL1O2 : 	1.53D-12 	;
+{12779.} 	 NPXYOL1OOH = NPXYOL1O + OH : 	J(41) 	;
+{12780.} 	 NPXYQOOH + OH = NPXYQO2 : 	7.54D-11 	;
+{12781.} 	 NPXYQOOH = NPXYQO + OH : 	J(41) 	;
+{12782.} 	 NPXYQO = CO4DBC8 + NO2 : 	KDEC 	;
+{12783.} 	 PXYQOOH + OH = PXYQO2 : 	9.48D-11 	;
+{12784.} 	 PXYQOOH = PXYQO + OH : 	J(41) 	;
+{12785.} 	 PXYQO = C6MOHCOCO3 : 	KDEC 	;
+{12786.} 	 PXYQOH + OH = C6MOHCOCO3 : 	9.13D-11 	;
+{12787.} 	 PXNNCATOOH + OH = PXNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12788.} 	 PXNNCATOOH = PXNNCATCO + OH : 	J(41) 	;
+{12789.} 	 PXNNCATCO = NC4MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{12790.} 	 PXNCATCOOH + OH = PXNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12791.} 	 PXNCATCOOH = PXNCATECO + OH : 	J(41) 	;
+{12792.} 	 PXNCATECO = NC4MDCO2H + CH3COCO2H + HO2 : 	KDEC 	;
+{12793.} 	 NDNEBNZLO2 + HO2 = NDNEBZLOOH : 	KRO2HO2*0.859 	;
+{12794.} 	 NDNEBNZLO2 + NO = NDNEBNZLO + NO2 : 	KRO2NO 	;
+{12795.} 	 NDNEBNZLO2 + NO3 = NDNEBNZLO + NO2 : 	KRO2NO3 	;
+{12796.} 	 NDNEBNZLO2 = NDNEBNZLO : 	8.00D-13*RO2 	;
+{12797.} 	 DNEBNZLO2 + HO2 = DNEBNZLOOH : 	KRO2HO2*0.859 	;
+{12798.} 	 DNEBNZLO2 + NO = DNEBNZLO + NO2 : 	KRO2NO 	;
+{12799.} 	 DNEBNZLO2 + NO3 = DNEBNZLO + NO2 : 	KRO2NO3 	;
+{12800.} 	 DNEBNZLO2 = DNEBNZLO : 	8.00D-13*RO2 	;
+{12801.} 	 NEBNZ1OOH + OH = NEBNZ1O2 : 	1.53D-12 	;
+{12802.} 	 NEBNZ1OOH = NEBNZ1O + OH : 	J(41) 	;
+{12803.} 	 NPEBQOOH + OH = NPEBQO2 : 	8.74D-11 	;
+{12804.} 	 NPEBQOOH = NPEBQO + OH : 	J(41) 	;
+{12805.} 	 NPEBQO = C6ETCO4DB + NO2 : 	KDEC 	;
+{12806.} 	 PEBQOOH + OH = PEBQCO + OH : 	1.46D-10 	;
+{12807.} 	 PEBQOOH = PEBQO + OH : 	J(41) 	;
+{12808.} 	 PEBQO = C7OHCO2CO3 : 	KDEC 	;
+{12809.} 	 PEBQCO + OH = C7OHCO2CO3 : 	8.32D-11 	;
+{12810.} 	 PEBQOH + OH = PEBQCO + HO2 : 	1.15D-10 	;
+{12811.} 	 ENNCATCOOH + OH = ENNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12812.} 	 ENNCATCOOH = ENNCATECO + OH : 	J(41) 	;
+{12813.} 	 ENNCATECO = NC4EDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{12814.} 	 ENCATECOOH + OH = ENCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12815.} 	 ENCATECOOH = ENCATECO + OH : 	J(41) 	;
+{12816.} 	 ENCATECO = NC4EDCO2H + HCOCO2H + HO2 : 	KDEC 	;
+{12817.} 	 ECO4 + OH = ECO3CO3 : 	3.14D-11 	;
+{12818.} 	 ECO4 = C2H5CO3 + CO + CO + HO2 + CO : 	J(35) 	;
+{12819.} 	 ECO4 = HCOCO3 + C2H5CO3 + CO : 	J(35)*2 	;
+{12820.} 	 C14O3ECHO + NO3 = CO + BUTALAO2 + HNO3 : 	KNO3AL*8.5 	;
+{12821.} 	 C14O3ECHO + OH = CO + BUTALAO2 : 	4.35D-11 	;
+{12822.} 	 C14O3ECHO = HO2 + CO + BUTALAO2 : 	J(34) 	;
+{12823.} 	 NEBFUONE + OH = EBFUCO + NO2 : 	6.73D-12 	;
+{12824.} 	 CO3H4CO3H + OH = CO3H4CO3 : 	8.68D-12 	;
+{12825.} 	 CO3H4CO3H = C2H5CO3 + HCOCO3H + HO2 : 	J(22) 	;
+{12826.} 	 CO3H4CO3H = EGLYOX + OH + HO2 : 	J(41) 	;
+{12827.} 	 CO3H4PAN + OH = EGLYOX + CO + NO2 : 	2.79D-12 	;
+{12828.} 	 CO3H4PAN = CO3H4CO3 + NO2 : 	KBPAN 	;
+{12829.} 	 PHCOCOCOOH + OH = PHCOCOCO2 : 	4.66D-12 	;
+{12830.} 	 PHCOCOCOOH = PHCOCOCO + OH : 	J(41) 	;
+{12831.} 	 PHCOCOCO = C6H5CO3 + CO + HCHO : 	KDEC 	;
+{12832.} 	 NDNPBNZLO2 + HO2 = NDNPBZLOOH : 	KRO2HO2*0.90 	;
+{12833.} 	 NDNPBNZLO2 + NO = NDNPBNZLO + NO2 : 	KRO2NO 	;
+{12834.} 	 NDNPBNZLO2 + NO3 = NDNPBNZLO + NO2 : 	KRO2NO3 	;
+{12835.} 	 NDNPBNZLO2 = NDNPBNZLO : 	8.00D-13*RO2 	;
+{12836.} 	 DNPBNZLO2 + HO2 = DNPBNZLOOH : 	KRO2HO2*0.90 	;
+{12837.} 	 DNPBNZLO2 + NO = DNPBNZLO + NO2 : 	KRO2NO 	;
+{12838.} 	 DNPBNZLO2 + NO3 = DNPBNZLO + NO2 : 	KRO2NO3 	;
+{12839.} 	 DNPBNZLO2 = DNPBNZLO : 	8.00D-13*RO2 	;
+{12840.} 	 NPBNZ1OOH + OH = NPBNZ1O2 : 	1.53D-12 	;
+{12841.} 	 NPBNZ1OOH = NPBNZ1O + OH : 	J(41) 	;
+{12842.} 	 NPPRBQOOH + OH = NPPRBQO2 : 	8.89D-11 	;
+{12843.} 	 NPPRBQOOH = NPPRBQO + OH : 	J(41) 	;
+{12844.} 	 NPPRBQO = C6PRCO4DB + NO2 : 	KDEC 	;
+{12845.} 	 PPRBQOOH + OH = PPRBQCO + OH : 	1.43D-10 	;
+{12846.} 	 PPRBQOOH = PPRBQO + OH : 	J(41) 	;
+{12847.} 	 PPRBQO = C8OHCO2CO3 : 	KDEC 	;
+{12848.} 	 PPRBQCO + OH = C8OHCO2CO3 : 	8.44D-11 	;
+{12849.} 	 PPRBQOH + OH = PPRBQCO + HO2 : 	1.15D-10 	;
+{12850.} 	 PNNCATCOOH + OH = PNNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12851.} 	 PNNCATCOOH = PNNCATECO + OH : 	J(41) 	;
+{12852.} 	 PNNCATECO = NC4PDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{12853.} 	 PNCATECOOH + OH = PNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12854.} 	 PNCATECOOH = PNCATECO + OH : 	J(41) 	;
+{12855.} 	 PNCATECO = NC4PDCO2H + HCOCO2H + HO2 : 	KDEC 	;
+{12856.} 	 C61CO3 + HO2 = C61CO3H : 	KAPHO2*0.56 	;
+{12857.} 	 C61CO3 + HO2 = CO45C5CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{12858.} 	 C61CO3 + NO = CO45C5CHO + HO2 + NO2 : 	KAPNO 	;
+{12859.} 	 C61CO3 + NO2 = C61CPAN : 	KFPAN 	;
+{12860.} 	 C61CO3 + NO3 = CO45C5CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{12861.} 	 C61CO3 = CO45C5CHO + HO2 : 	1.00D-11*RO2 	;
+{12862.} 	 CO45C5CHO + NO3 = C3H7CO3 + CO + CO + HNO3 : 	KNO3AL*5.5 	;
+{12863.} 	 CO45C5CHO + OH = C3H7CO3 + CO + CO : 	1.67D-11 	;
+{12864.} 	 CO45C5CHO = C3H7CO3 + CO + CO + HO2 : 	J(35)+J(34) 	;
+{12865.} 	 C14O3PCHO + NO3 = CO + C4CHOAO2 + HNO3 : 	KNO3AL*8.5 	;
+{12866.} 	 C14O3PCHO + OH = CO + C4CHOAO2 : 	4.55D-11 	;
+{12867.} 	 C14O3PCHO = HO2 + CO + C4CHOAO2 : 	J(34) 	;
+{12868.} 	 NPBFUONE + OH = PBFUCO + NO2 : 	8.14D-12 	;
+{12869.} 	 C5O5OHCO3H + OH = C5O45OHCO3 : 	1.22D-11 	;
+{12870.} 	 C5O5OHCO3H = C3H7CO3 + HCOCO3H + HO2 : 	J(22) 	;
+{12871.} 	 C5O5OHCO3H = PGLYOX + HO2 + CO : 	J(41) 	;
+{12872.} 	 C5O45OHPAN + OH = PGLYOX + CO + NO2 : 	8.99D-12 	;
+{12873.} 	 C5O45OHPAN = C5O45OHCO3 + NO2 : 	KBPAN 	;
+{12874.} 	 NDNIPBZLO2 + HO2 = NDNIPBLOOH : 	KRO2HO2*0.90 	;
+{12875.} 	 NDNIPBZLO2 + NO = NDNIPBZLO + NO2 : 	KRO2NO 	;
+{12876.} 	 NDNIPBZLO2 + NO3 = NDNIPBZLO + NO2 : 	KRO2NO3 	;
+{12877.} 	 NDNIPBZLO2 = NDNIPBZLO : 	8.00D-13*RO2 	;
+{12878.} 	 DNIPBNZLO2 + HO2 = DNIPBZLOOH : 	KRO2HO2*0.90 	;
+{12879.} 	 DNIPBNZLO2 + NO = DNIPBNZLO + NO2 : 	KRO2NO 	;
+{12880.} 	 DNIPBNZLO2 + NO3 = DNIPBNZLO + NO2 : 	KRO2NO3 	;
+{12881.} 	 DNIPBNZLO2 = DNIPBNZLO : 	8.00D-13*RO2 	;
+{12882.} 	 NIPBNZ1OOH + OH = NIPBNZ1O2 : 	1.53D-12 	;
+{12883.} 	 NIPBNZ1OOH = NIPBNZ1O + OH : 	J(41) 	;
+{12884.} 	 NIPRBQOOH + OH = NIPRBQO2 : 	8.95D-11 	;
+{12885.} 	 NIPRBQOOH = NIPRBQO + OH : 	J(41) 	;
+{12886.} 	 NIPRBQO = C6IPRCO4DB + NO2 : 	KDEC 	;
+{12887.} 	 IPRBQOOH + OH = IPRBQCO + OH : 	1.46D-10 	;
+{12888.} 	 IPRBQOOH = IPRBQO + OH : 	J(41) 	;
+{12889.} 	 IPRBQO = C8OHCO2CO3 : 	KDEC 	;
+{12890.} 	 IPRBQCO + OH = C8CO2OHCO3 : 	8.34D-11 	;
+{12891.} 	 IPRBQOH + OH = IPRBQCO + HO2 : 	1.14D-10 	;
+{12892.} 	 IPNNCATOOH + OH = IPNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12893.} 	 IPNNCATOOH = IPNNCATCO + OH : 	J(41) 	;
+{12894.} 	 IPNNCATCO = NC4IPDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{12895.} 	 IPNCATCOOH + OH = IPNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12896.} 	 IPNCATCOOH = IPNCATECO + OH : 	J(41) 	;
+{12897.} 	 IPNCATECO = NC4IPDCO2H + HCOCO2H + HO2 : 	KDEC 	;
+{12898.} 	 C62CO3 + HO2 = C45IC5CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{12899.} 	 C62CO3 + HO2 = C62CO3H : 	KAPHO2*0.56 	;
+{12900.} 	 C62CO3 + NO = C45IC5CHO + HO2 + NO2 : 	KAPNO 	;
+{12901.} 	 C62CO3 + NO2 = C62CPAN : 	KFPAN 	;
+{12902.} 	 C62CO3 + NO3 = C45IC5CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{12903.} 	 C62CO3 = C45IC5CHO + HO2 : 	1.00D-11*RO2 	;
+{12904.} 	 C45IC5CHO + NO3 = IPRCO3 + CO + CO + HNO3 : 	KNO3AL*8.5 	;
+{12905.} 	 C45IC5CHO + OH = IPRCO3 + CO + CO : 	1.47D-11 	;
+{12906.} 	 C45IC5CHO = IPRCO3 + CO + CO + HO2 : 	J(35)+J(34) 	;
+{12907.} 	 C14O3IPCHO + NO3 = CO + IC4CHOAO2 + HNO3 : 	KNO3AL*8.5 	;
+{12908.} 	 C14O3IPCHO + OH = CO + IC4CHOAO2 : 	4.76D-11 	;
+{12909.} 	 C14O3IPCHO = HO2 + CO + IC4CHOAO2 : 	J(34) 	;
+{12910.} 	 NIPBFUONE + OH = IPBFUCO + NO2 : 	8.13D-12 	;
+{12911.} 	 C4MOHOCO3H + OH = C4MOHOCO3 : 	1.01D-11 	;
+{12912.} 	 C4MOHOCO3H = C3H7CO3 + HCOCO3H + HO2 : 	J(22) 	;
+{12913.} 	 C4MOHOCO3H = IPRGLYOX + HO2 + CO + OH : 	J(41) 	;
+{12914.} 	 C4MOHOPAN + OH = IPRGLYOX + CO + NO2 : 	6.84D-12 	;
+{12915.} 	 C4MOHOPAN = C4MOHOCO3 + NO2 : 	KBPAN 	;
+{12916.} 	 DMMALANHY + NO3 = NDMMALYO2 : 	1.00D-12 	;
+{12917.} 	 DMMALANHY + OH = DMMALYO2 : 	7.42D-12 	;
+{12918.} 	 NDNT123LO2 + HO2 = NDNT123OOH : 	KRO2HO2*0.90 	;
+{12919.} 	 NDNT123LO2 + NO = NDNT123LO + NO2 : 	KRO2NO 	;
+{12920.} 	 NDNT123LO2 + NO3 = NDNT123LO + NO2 : 	KRO2NO3 	;
+{12921.} 	 NDNT123LO2 = NDNT123LO : 	8.00D-13*RO2 	;
+{12922.} 	 DNT123LO2 + HO2 = DNT123LOOH : 	KRO2HO2*0.90 	;
+{12923.} 	 DNT123LO2 + NO = DNT123LO + NO2 : 	KRO2NO 	;
+{12924.} 	 DNT123LO2 + NO3 = DNT123LO + NO2 : 	KRO2NO3 	;
+{12925.} 	 DNT123LO2 = DNT123LO : 	8.00D-13*RO2 	;
+{12926.} 	 NT123L1OOH + OH = NT123L1O2 : 	1.53D-12 	;
+{12927.} 	 NT123L1OOH = NT123L1O + OH : 	J(41) 	;
+{12928.} 	 T123NNCOOH + OH = T123NNCTO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12929.} 	 T123NNCOOH = T123NNCTO + OH : 	J(41) 	;
+{12930.} 	 T123NNCTO = NC5MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{12931.} 	 T123NCTOOH + OH = T123NCATO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12932.} 	 T123NCTOOH = T123NCATO + OH : 	J(41) 	;
+{12933.} 	 T123NCATO = NC5MDCO2H + CH3COCO2H + HO2 : 	KDEC 	;
+{12934.} 	 MC6OTRIKET + OH = MC6OTKETO2 : 	6.20D-12 	;
+{12935.} 	 MC6OTRIKET = CH3CO3 + MEKBO2 : 	J(22) 	;
+{12936.} 	 TM124NO2O2 + HO2 = TM124NOOH : 	KRO2HO2*0.859 	;
+{12937.} 	 TM124NO2O2 + NO = TM124NO2O + NO2 : 	KRO2NO 	;
+{12938.} 	 TM124NO2O2 + NO3 = TM124NO2O + NO2 : 	KRO2NO3 	;
+{12939.} 	 TM124NO2O2 = TM124NO2O : 	9.20D-14*RO2 	;
+{12940.} 	 NDNT124LO2 + HO2 = NDNT124OOH : 	KRO2HO2*0.90 	;
+{12941.} 	 NDNT124LO2 + NO = NDNT124LO + NO2 : 	KRO2NO 	;
+{12942.} 	 NDNT124LO2 + NO3 = NDNT124LO + NO2 : 	KRO2NO3 	;
+{12943.} 	 NDNT124LO2 = NDNT124LO : 	8.00D-13*RO2 	;
+{12944.} 	 DNT124LO2 + HO2 = DNT124LOOH : 	KRO2HO2*0.90 	;
+{12945.} 	 DNT124LO2 + NO = DNT124LO + NO2 : 	KRO2NO 	;
+{12946.} 	 DNT124LO2 + NO3 = DNT124LO + NO2 : 	KRO2NO3 	;
+{12947.} 	 DNT124LO2 = DNT124LO : 	8.00D-13*RO2 	;
+{12948.} 	 NT124L1OOH + OH = NT124L1O2 : 	1.53D-12 	;
+{12949.} 	 NT124L1OOH = NT124L1O + OH : 	J(41) 	;
+{12950.} 	 NTM124QOOH + OH = NTM124QO2 : 	9.43D-11 	;
+{12951.} 	 NTM124QOOH = NTM124QO + OH : 	J(41) 	;
+{12952.} 	 NTM124QO = CO4DBC9 + NO2 : 	KDEC 	;
+{12953.} 	 TM124QOOH + OH = TM124QO2 : 	1.14D-10 	;
+{12954.} 	 TM124QOOH = TM124QO + OH : 	J(41) 	;
+{12955.} 	 TM124QO = C7MOHCOCO3 : 	KDEC 	;
+{12956.} 	 TM124QOH + OH = C7MOHCOCO3 : 	1.10D-10 	;
+{12957.} 	 T124NNCOOH + OH = T124NNCTO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12958.} 	 T124NNCOOH = T124NNCTO + OH : 	J(41) 	;
+{12959.} 	 T124NNCTO = NC5MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{12960.} 	 T124NCTOOH + OH = T124NCATO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12961.} 	 T124NCTOOH = T124NCATO + OH : 	J(41) 	;
+{12962.} 	 T124NCATO = NC5MDCO2H + CH3COCO2H + HO2 : 	KDEC 	;
+{12963.} 	 MXYOHNO2O2 + HO2 = MXOHNO2OOH : 	KRO2HO2*0.859 	;
+{12964.} 	 MXYOHNO2O2 + NO = MXYOHNO2O + NO2 : 	KRO2NO 	;
+{12965.} 	 MXYOHNO2O2 + NO3 = MXYOHNO2O + NO2 : 	KRO2NO3 	;
+{12966.} 	 MXYOHNO2O2 = MXYOHNO2O : 	9.20D-14*RO2 	;
+{12967.} 	 C5CO234OOH + OH = C5CO234O2 : 	9.59D-12 	;
+{12968.} 	 C5CO234OOH = C5CO234O + OH : 	J(41)+J(35) 	;
+{12969.} 	 C5CO234O = CH3CO3 + HCHO + CO + CO : 	KDEC 	;
+{12970.} 	 NDNOETOLO2 + HO2 = NDNOETLOOH : 	KRO2HO2*0.90 	;
+{12971.} 	 NDNOETOLO2 + NO = NDNOETOLO + NO2 : 	KRO2NO 	;
+{12972.} 	 NDNOETOLO2 + NO3 = NDNOETOLO + NO2 : 	KRO2NO3 	;
+{12973.} 	 NDNOETOLO2 = NDNOETOLO : 	8.00D-13*RO2 	;
+{12974.} 	 DNOETOLO2 + HO2 = DNOETOLOOH : 	KRO2HO2*0.90 	;
+{12975.} 	 DNOETOLO2 + NO = DNOETOLO + NO2 : 	KRO2NO 	;
+{12976.} 	 DNOETOLO2 + NO3 = DNOETOLO + NO2 : 	KRO2NO3 	;
+{12977.} 	 DNOETOLO2 = DNOETOLO : 	8.00D-13*RO2 	;
+{12978.} 	 NOETOL1OOH + OH = NOETOL1O2 : 	1.53D-12 	;
+{12979.} 	 NOETOL1OOH = NOETOL1O + OH : 	J(41) 	;
+{12980.} 	 NOETLQOOH + OH = NOETLQO2 : 	1.06D-10 	;
+{12981.} 	 NOETLQOOH = NOETLQO + OH : 	J(41) 	;
+{12982.} 	 NOETLQO = C6CO4MEDB + NO2 : 	KDEC 	;
+{12983.} 	 OETLQOOH + OH = OETLQCO + OH : 	1.63D-10 	;
+{12984.} 	 OETLQOOH = OETLQO + OH : 	J(41) 	;
+{12985.} 	 OETLQO = C5MEJCO3 : 	KDEC 	;
+{12986.} 	 OETLQCO + OH = C5MEJCO3 : 	1.00D-10 	;
+{12987.} 	 OETLQOH + OH = OETLQCO + HO2 : 	1.31D-10 	;
+{12988.} 	 OTNNCATOOH + OH = OTNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12989.} 	 OTNNCATOOH = OTNNCATCO + OH : 	J(41) 	;
+{12990.} 	 OTNNCATCO = NC4MDCO2H + ECOCO2H + NO2 : 	KDEC 	;
+{12991.} 	 OTNCATCOOH + OH = OTNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{12992.} 	 OTNCATCOOH = OTNCATECO + OH : 	J(41) 	;
+{12993.} 	 OTNCATECO = NC4MDCO2H + ECOCO2H + HO2 : 	KDEC 	;
+{12994.} 	 NDNMETOLO2 + HO2 = NDNMETLOOH : 	KRO2HO2*0.90 	;
+{12995.} 	 NDNMETOLO2 + NO = NDNMETOLO + NO2 : 	KRO2NO 	;
+{12996.} 	 NDNMETOLO2 + NO3 = NDNMETOLO + NO2 : 	KRO2NO3 	;
+{12997.} 	 NDNMETOLO2 = NDNMETOLO : 	8.00D-13*RO2 	;
+{12998.} 	 DNMETOLO2 + HO2 = DNMETOLOOH : 	KRO2HO2*0.90 	;
+{12999.} 	 DNMETOLO2 + NO = DNMETOLO + NO2 : 	KRO2NO 	;
+{13000.} 	 DNMETOLO2 + NO3 = DNMETOLO + NO2 : 	KRO2NO3 	;
+{13001.} 	 DNMETOLO2 = DNMETOLO : 	8.00D-13*RO2 	;
+{13002.} 	 NMETOL1OOH + OH = NMETOL1O2 : 	1.53D-12 	;
+{13003.} 	 NMETOL1OOH = NMETOL1O + OH : 	J(41) 	;
+{13004.} 	 NMETLQOOH + OH = NMETLQO2 : 	7.71D-11 	;
+{13005.} 	 NMETLQOOH = NMETLQO + OH : 	J(41) 	;
+{13006.} 	 NMETLQO = C7CO4EDB + NO2 : 	KDEC 	;
+{13007.} 	 METLQOOH + OH = METLQO2 : 	9.65D-11 	;
+{13008.} 	 METLQOOH = METLQO + OH : 	J(41) 	;
+{13009.} 	 METLQO = C6EO2OHCO3 : 	KDEC 	;
+{13010.} 	 METLQOH + OH = C6EO2OHCO3 : 	9.31D-11 	;
+{13011.} 	 MTNNCATOOH + OH = MTNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13012.} 	 MTNNCATOOH = MTNNCATCO + OH : 	J(41) 	;
+{13013.} 	 MTNNCATCO = NC4MDCO2H + ECOCO2H + NO2 : 	KDEC 	;
+{13014.} 	 MTNCATCOOH + OH = MTNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13015.} 	 MTNCATCOOH = MTNCATECO + OH : 	J(41) 	;
+{13016.} 	 MTNCATECO = NC4MDCO2H + ECOCO2H + HO2 : 	KDEC 	;
+{13017.} 	 NDNPETOLO2 + HO2 = NDNPETLOOH : 	KRO2HO2*0.90 	;
+{13018.} 	 NDNPETOLO2 + NO = NDNPETOLO + NO2 : 	KRO2NO 	;
+{13019.} 	 NDNPETOLO2 + NO3 = NDNPETOLO + NO2 : 	KRO2NO3 	;
+{13020.} 	 NDNPETOLO2 = NDNPETOLO : 	8.00D-13*RO2 	;
+{13021.} 	 DNPETOLO2 + HO2 = DNPETOLOOH : 	KRO2HO2*0.90 	;
+{13022.} 	 DNPETOLO2 + NO = DNPETOLO + NO2 : 	KRO2NO 	;
+{13023.} 	 DNPETOLO2 + NO3 = DNPETOLO + NO2 : 	KRO2NO3 	;
+{13024.} 	 DNPETOLO2 = DNPETOLO : 	8.00D-13*RO2 	;
+{13025.} 	 NPETOL1OOH + OH = NPETOL1O2 : 	1.53D-12 	;
+{13026.} 	 NPETOL1OOH = NPETOL1O + OH : 	J(41) 	;
+{13027.} 	 NPETLQOOH + OH = NPETLQO2 : 	7.71D-11 	;
+{13028.} 	 NPETLQOOH = NPETLQO + OH : 	J(41) 	;
+{13029.} 	 NPETLQO = C7ECO4DB + NO2 : 	KDEC 	;
+{13030.} 	 PETLQOOH + OH = PETLQO2 : 	9.81D-11 	;
+{13031.} 	 PETLQOOH = PETLQO + OH : 	J(41) 	;
+{13032.} 	 PETLQO = C7MJPCO3 : 	KDEC 	;
+{13033.} 	 PETLQOH + OH = C7MJPCO3 : 	9.46D-11 	;
+{13034.} 	 PTNNCATOOH + OH = PTNNCATCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13035.} 	 PTNNCATOOH = PTNNCATCO + OH : 	J(41) 	;
+{13036.} 	 PTNNCATCO = NC4MDCO2H + ECOCO2H + NO2 : 	KDEC 	;
+{13037.} 	 PTNCATCOOH + OH = PTNCATECO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13038.} 	 PTNCATCOOH = PTNCATECO + OH : 	J(41) 	;
+{13039.} 	 PTNCATECO = NC4MDCO2H + ECOCO2H + HO2 : 	KDEC 	;
+{13040.} 	 C23O3ECHO + NO3 = C23O3ECO3 + HNO3 : 	KNO3AL*8.5 	;
+{13041.} 	 C23O3ECHO + OH = C23O3ECO3 : 	3.13D-11 	;
+{13042.} 	 C23O3ECHO = CO + C23O3EO2 + HO2 : 	J(15) 	;
+{13043.} 	 CO356OCO2 + HO2 = CO356OCOOH : 	KRO2HO2*0.770 	;
+{13044.} 	 CO356OCO2 + NO = CO356OCO + NO2 : 	KRO2NO 	;
+{13045.} 	 CO356OCO2 + NO3 = CO356OCO + NO2 : 	KRO2NO3 	;
+{13046.} 	 CO356OCO2 = CO356OCO : 	2.00D-12*RO2 	;
+{13047.} 	 HOEMPHNO2 + OH = EMPOHNO2O2 : 	1.53D-12 	;
+{13048.} 	 CO234C6OOH + OH = CO234C65O2 : 	1.65D-11 	;
+{13049.} 	 CO234C6OOH = CO234C65O + OH : 	J(41)+J(35) 	;
+{13050.} 	 CO234C65O = CH3CHO + CH3CO3 + CO + CO : 	KDEC 	;
+{13051.} 	 H13CO2CO3H = HOCH2COCHO + HO2 + OH : 	J(41) 	;
+{13052.} 	 OH + H13CO2CO3H = H13CO2CO3 : 	9.43D-12 	;
+{13053.} 	 C4PAN10 = H13CO2CO3 + NO2 : 	KBPAN 	;
+{13054.} 	 OH + C4PAN10 = HOCH2COCHO + CO + NO2 : 	5.83D-12 	;
+{13055.} 	 INCNCO3 + HO2 = INCNCO2H + O3 : 	KAPHO2*0.15 	;
+{13056.} 	 INCNCO3 + HO2 = INCNCO3H : 	KAPHO2*0.41 	;
+{13057.} 	 INCNCO3 + HO2 = MACRNB + NO2 + OH : 	KAPHO2*0.44 	;
+{13058.} 	 INCNCO3 + NO = MACRNB + NO2 + NO2 : 	KAPNO 	;
+{13059.} 	 INCNCO3 + NO2 = INCNPAN : 	KFPAN 	;
+{13060.} 	 INCNCO3 + NO3 = MACRNB + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{13061.} 	 INCNCO3 = INCNCO2H : 	1.00D-11*0.3*RO2 	;
+{13062.} 	 INCNCO3 = MACRNB + NO2 : 	1.00D-11*0.7*RO2 	;
+{13063.} 	 MACRNB = NOA + HO2 + CO + HO2 : 	J(17) 	;
+{13064.} 	 OH + MACRNB = MACRNBCO3 : 	2.15D-11 	;
+{13065.} 	 MACRNBCO3 + HO2 = MACRNBCO2H + O3 : 	KAPHO2*0.15 	;
+{13066.} 	 MACRNBCO3 + HO2 = MACRNBCO3H : 	KAPHO2*0.41 	;
+{13067.} 	 MACRNBCO3 + HO2 = NOA + HO2 + OH : 	KAPHO2*0.44 	;
+{13068.} 	 MACRNBCO3 + NO = NOA + HO2 + NO2 : 	KAPNO 	;
+{13069.} 	 MACRNBCO3 + NO2 = MACRNBPAN : 	KFPAN 	;
+{13070.} 	 MACRNBCO3 + NO3 = NOA + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{13071.} 	 MACRNBCO3 = MACRNBCO2H : 	1.00D-11*0.3*RO2 	;
+{13072.} 	 MACRNBCO3 = NOA + HO2 : 	1.00D-11*0.7*RO2 	;
+{13073.} 	 IEACO3H = HMVKBO2 + OH : 	J(41) 	;
+{13074.} 	 OH + IEACO3H = IEACO3 : 	4.81D-12 	;
+{13075.} 	 IEAPAN = IEACO3 + NO2 : 	KBPAN 	;
+{13076.} 	 OH + IEAPAN = HMVKBO2 + CO + NO2 : 	1.21D-12 	;
+{13077.} 	 INAHPCO3 + HO2 = HMVKANO3 + OH + OH : 	KAPHO2*0.44 	;
+{13078.} 	 INAHPCO3 + HO2 = INAHPCO2H + O3 : 	KAPHO2*0.15 	;
+{13079.} 	 INAHPCO3 + HO2 = INAHPCO3H : 	KAPHO2*0.41 	;
+{13080.} 	 INAHPCO3 + NO = HMVKANO3 + OH + NO2 : 	KAPNO 	;
+{13081.} 	 INAHPCO3 + NO2 = INAHPPAN : 	KFPAN 	;
+{13082.} 	 INAHPCO3 + NO3 = HMVKANO3 + OH + NO2 : 	KRO2NO3*1.74 	;
+{13083.} 	 INAHPCO3 = HMVKANO3 + OH : 	1.00D-11*0.7*RO2 	;
+{13084.} 	 INAHPCO3 = INAHPCO2H : 	1.00D-11*0.3*RO2 	;
+{13085.} 	 INANCO3 + HO2 = HMVKANO3 + NO2 + OH : 	KAPHO2*0.44 	;
+{13086.} 	 INANCO3 + HO2 = INANCO2H + O3 : 	KAPHO2*0.15 	;
+{13087.} 	 INANCO3 + HO2 = INANCO3H : 	KAPHO2*0.41 	;
+{13088.} 	 INANCO3 + NO = HMVKANO3 + NO2 + NO2 : 	KAPNO 	;
+{13089.} 	 INANCO3 + NO2 = INANPAN : 	KFPAN 	;
+{13090.} 	 INANCO3 + NO3 = HMVKANO3 + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{13091.} 	 INANCO3 = HMVKANO3 + NO2 : 	1.00D-11*0.7*RO2 	;
+{13092.} 	 INANCO3 = INANCO2H : 	1.00D-11*0.3*RO2 	;
+{13093.} 	 OH + INANCOCHO = INANCOCO3 : 	3.79D-12 	;
+{13094.} 	 INAHCO3 + HO2 = HMVKANO3 + HO2 + OH : 	KAPHO2*0.44 	;
+{13095.} 	 INAHCO3 + HO2 = INAHCO2H + O3 : 	KAPHO2*0.15 	;
+{13096.} 	 INAHCO3 + HO2 = INAHCO3H : 	KAPHO2*0.41 	;
+{13097.} 	 INAHCO3 + NO = HMVKANO3 + HO2 + NO2 : 	KAPNO 	;
+{13098.} 	 INAHCO3 + NO2 = INAHPAN : 	KFPAN 	;
+{13099.} 	 INAHCO3 + NO3 = HMVKANO3 + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{13100.} 	 INAHCO3 = HMVKANO3 + HO2 : 	1.00D-11*0.7*RO2 	;
+{13101.} 	 INAHCO3 = INAHCO2H : 	1.00D-11*0.3*RO2 	;
+{13102.} 	 HIEB1O2 + HO2 = HIEB1OOH : 	KRO2HO2*0.706 	;
+{13103.} 	 HIEB1O2 + NO = HIEB1O + NO2 : 	KRO2NO 	;
+{13104.} 	 HIEB1O2 + NO3 = HIEB1O + NO2 : 	KRO2NO3 	;
+{13105.} 	 HIEB1O2 = HIEB1O : 	9.20D-14*RO2 	;
+{13106.} 	 HIEB2O2 + HO2 = HIEB2OOH : 	KRO2HO2*0.706 	;
+{13107.} 	 HIEB2O2 + NO = HIEB2O + NO2 : 	KRO2NO 	;
+{13108.} 	 HIEB2O2 + NO3 = HIEB2O + NO2 : 	KRO2NO3 	;
+{13109.} 	 HIEB2O2 = HIEB2O : 	8.80D-13*RO2 	;
+{13110.} 	 NC524OOH + OH = HPNC524CO + HO2 : 	1.32D-11*0.728 	;
+{13111.} 	 NC524OOH + OH = NC524O2 : 	1.32D-11*0.272 	;
+{13112.} 	 NC524OOH = NC524O + OH : 	J(41) 	;
+{13113.} 	 NC524NO3 + OH = DNC524CO + HO2 : 	2.43D-12 	;
+{13114.} 	 NC524O = HMVKNO3 + HCHO + HO2 : 	1.80D+13*(TEMP/298)**1.7*EXP(-4079/TEMP) 	;
+{13115.} 	 NC524O = HOCH2CHO + NO2 + H13CO2C3 : 	1.80D+13*(TEMP/298)**1.7*EXP(-4733/TEMP) 	;
+{13116.} 	 NC524OH + OH = HNC524CO + HO2 : 	9.60D-12 	;
+{13117.} 	 HMACO3 + HO2 = HMACO2H + O3 : 	KAPHO2*0.15 	;
+{13118.} 	 HMACO3 + HO2 = HMACO3H : 	KAPHO2*0.41 	;
+{13119.} 	 HMACO3 + HO2 = HOCH2CO3 + HCHO + OH : 	KAPHO2*0.44 	;
+{13120.} 	 HMACO3 + NO = HOCH2CO3 + HCHO + NO2 : 	KAPNO 	;
+{13121.} 	 HMACO3 + NO2 = HMPAN : 	KFPAN 	;
+{13122.} 	 HMACO3 + NO3 = HOCH2CO3 + HCHO + NO2 : 	KRO2NO3*1.74 	;
+{13123.} 	 HMACO3 = HMACO2H : 	1.00D-11*RO2*0.3 	;
+{13124.} 	 HMACO3 = HOCH2CO3 + HCHO : 	1.00D-11*RO2*0.7 	;
+{13125.} 	 HMGLYOOA = HMGLYOO : 	KDEC*0.18 	;
+{13126.} 	 HMGLYOOA = HOCH2CO3 + CO + HO2 : 	KDEC*0.82 	;
+{13127.} 	 HMACRO2 + HO2 = HMACROOH : 	KRO2HO2*0.625 	;
+{13128.} 	 HMACRO2 + NO = HMACRO + NO2 : 	KRO2NO 	;
+{13129.} 	 HMACRO2 + NO3 = HMACRO + NO2 : 	KRO2NO3 	;
+{13130.} 	 HMACRO2 = HMACRO : 	9.20D-14*RO2*0.7 	;
+{13131.} 	 HMACRO2 = HMACROH : 	9.20D-14*RO2*0.3 	;
+{13132.} 	 C525OOH + OH = C525O2 : 	1.37D-11 	;
+{13133.} 	 C525OOH = C525O + OH : 	J(41) 	;
+{13134.} 	 C525O = HOCH2CO3 + H13CO2C3 : 	KDEC 	;
+{13135.} 	 OH + C58NO3CO2H = MMALNACO2H + HO2 : 	2.49D-12 	;
+{13136.} 	 C58NO3CO3H = MACRNO3 + HO2 + OH : 	J(41) 	;
+{13137.} 	 OH + C58NO3CO3H = C58NO3CO3 : 	5.57D-12*0.68 	;
+{13138.} 	 OH + C58NO3CO3H = MMALNACO3H + HO2 : 	5.57D-12*0.32 	;
+{13139.} 	 C58NO3PAN = C58NO3CO3 + NO2 : 	KBPAN 	;
+{13140.} 	 OH + C58NO3PAN = MMALNAPAN + HO2 : 	1.97D-12 	;
+{13141.} 	 CONM2CO2H + OH = MGLYOX + NO2 : 	3.70D-12 	;
+{13142.} 	 CONM2CO2H = CO + HO2 + NO2 + CH3COCO2H : 	J(56)+J(57) 	;
+{13143.} 	 CONM2CO3H + OH = CONM2CO3 : 	6.78D-12 	;
+{13144.} 	 CONM2CO3H = CO + HO2 + NO2 + CH3COCO3H : 	J(56)+J(57) 	;
+{13145.} 	 CONM2CO3H = MGLYOX + NO2 + OH : 	J(41) 	;
+{13146.} 	 CONM2PAN + OH = MGLYOX + NO2 + NO3 : 	3.18D-12 	;
+{13147.} 	 CONM2PAN = CO + HO2 + NO2 + CH3COPAN : 	J(56)+J(57) 	;
+{13148.} 	 CONM2PAN = CONM2CO3 + NO2 : 	KBPAN 	;
+{13149.} 	 INB1HPCO3 + HO2 = INB1HPCO2H + O3 : 	KAPHO2*0.15 	;
+{13150.} 	 INB1HPCO3 + HO2 = INB1HPCO3H : 	KAPHO2*0.41 	;
+{13151.} 	 INB1HPCO3 + HO2 = MACRNO3 + OH + OH : 	KAPHO2*0.44 	;
+{13152.} 	 INB1HPCO3 + NO = MACRNO3 + OH + NO2 : 	KAPNO 	;
+{13153.} 	 INB1HPCO3 + NO2 = INB1HPPAN : 	KFPAN 	;
+{13154.} 	 INB1HPCO3 + NO3 = MACRNO3 + OH + NO2 : 	KRO2NO3*1.74 	;
+{13155.} 	 INB1HPCO3 = INB1HPCO2H : 	1.00D-11*0.3*RO2 	;
+{13156.} 	 INB1HPCO3 = MACRNO3 + OH : 	1.00D-11*0.7*RO2 	;
+{13157.} 	 INB1NACO3 + HO2 = INB1NACO2H + O3 : 	KAPHO2*0.15 	;
+{13158.} 	 INB1NACO3 + HO2 = INB1NACO3H : 	KAPHO2*0.41 	;
+{13159.} 	 INB1NACO3 + HO2 = MACRNO3 + NO2 + OH : 	KAPHO2*0.44 	;
+{13160.} 	 INB1NACO3 + NO = MACRNO3 + NO2 + NO2 : 	KAPNO 	;
+{13161.} 	 INB1NACO3 + NO2 = INB1NAPAN : 	KFPAN 	;
+{13162.} 	 INB1NACO3 + NO3 = MACRNO3 + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{13163.} 	 INB1NACO3 = INB1NACO2H : 	1.00D-11*0.3*RO2 	;
+{13164.} 	 INB1NACO3 = MACRNO3 + NO2 : 	1.00D-11*0.7*RO2 	;
+{13165.} 	 INB1NBCO3 + HO2 = INB1NBCO2H + O3 : 	KAPHO2*0.15 	;
+{13166.} 	 INB1NBCO3 + HO2 = INB1NBCO3H : 	KAPHO2*0.41 	;
+{13167.} 	 INB1NBCO3 + HO2 = MVKNO3 + NO2 + OH : 	KAPHO2*0.44 	;
+{13168.} 	 INB1NBCO3 + NO = MVKNO3 + NO2 + NO2 : 	KAPNO 	;
+{13169.} 	 INB1NBCO3 + NO2 = INB1NBPAN : 	KFPAN 	;
+{13170.} 	 INB1NBCO3 + NO3 = MVKNO3 + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{13171.} 	 INB1NBCO3 = INB1NBCO2H : 	1.00D-11*0.3*RO2 	;
+{13172.} 	 INB1NBCO3 = MVKNO3 + NO2 : 	1.00D-11*0.7*RO2 	;
+{13173.} 	 C4M2ALOHNO3 + OH = MMALNACO3 : 	2.53D-11*0.86 	;
+{13174.} 	 C4M2ALOHNO3 + OH = MMALNBCO3 : 	2.53D-11*0.14 	;
+{13175.} 	 C4M2ALOHNO3 = CO2H3CHO + NO2 + CO + HO2 : 	J(17) 	;
+{13176.} 	 C4M2ALOHNO3 = CONM2CHO + HO2 + CO + HO2 : 	J(15) 	;
+{13177.} 	 C57NO3CO3 + HO2 = C57NO3CO2H + O3 : 	KAPHO2*0.15 	;
+{13178.} 	 C57NO3CO3 + HO2 = C57NO3CO3H : 	KAPHO2*0.41 	;
+{13179.} 	 C57NO3CO3 + HO2 = HO12CO3C4 + NO2 + OH : 	KAPHO2*0.44 	;
+{13180.} 	 C57NO3CO3 + NO = HO12CO3C4 + NO2 + NO2 : 	KAPNO 	;
+{13181.} 	 C57NO3CO3 + NO2 = C57NO3PAN : 	KFPAN 	;
+{13182.} 	 C57NO3CO3 + NO3 = HO12CO3C4 + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{13183.} 	 C57NO3CO3 + NO3 = MACRNO3 + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{13184.} 	 C57NO3CO3 = C57NO3CO2H : 	1.00D-11*0.3*RO2 	;
+{13185.} 	 C57NO3CO3 = HO12CO3C4 + NO2 : 	1.00D-11*0.7*RO2 	;
+{13186.} 	 IEC2OOH = BIACETOH + OH + CO + HO2 : 	J(17) 	;
+{13187.} 	 IEC2OOH = MGLYOX + OH + HOCH2CO3 : 	J(22) 	;
+{13188.} 	 OH + IEC2OOH = BIACETOH + OH + CO : 	2.73D-11 	;
+{13189.} 	 IECCO3H = MACRO2 + OH : 	J(41) 	;
+{13190.} 	 OH + IECCO3H = IECCO3 : 	1.04D-11 	;
+{13191.} 	 IECPAN = IECCO3 + NO2 : 	KBPAN 	;
+{13192.} 	 OH + IECPAN = MACRO2 + CO + NO2 : 	6.80D-12 	;
+{13193.} 	 CO2N3CO3H + OH = CO2N3CO3 : 	4.11D-12 	;
+{13194.} 	 CO2N3CO3H = MGLYOX + NO2 + OH : 	J(41) 	;
+{13195.} 	 CO2N3PAN + OH = CO2N3CO3 : 	5.10D-13 	;
+{13196.} 	 CO2N3PAN = CO2N3CO3 + NO2 : 	KBPAN 	;
+{13197.} 	 CO2N3PAN = MGLYOX + NO2 + NO3 : 	J(41) 	;
+{13198.} 	 INDHPCO3 + HO2 = INDHPCO3H : 	KAPHO2*0.56 	;
+{13199.} 	 INDHPCO3 + HO2 = MVKNO3 + OH + OH : 	KAPHO2*0.44 	;
+{13200.} 	 INDHPCO3 + NO = MVKNO3 + OH + NO2 : 	KAPNO 	;
+{13201.} 	 INDHPCO3 + NO2 = INDHPPAN : 	KFPAN 	;
+{13202.} 	 INDHPCO3 + NO3 = MVKNO3 + OH + NO2 : 	KRO2NO3*1.74 	;
+{13203.} 	 INDHPCO3 = MVKNO3 + OH : 	1.00D-11*RO2 	;
+{13204.} 	 INDHCO3 + HO2 = INDHCO3H : 	KAPHO2*0.56 	;
+{13205.} 	 INDHCO3 + HO2 = MVKNO3 + HO2 + OH : 	KAPHO2*0.44 	;
+{13206.} 	 INDHCO3 + NO = MVKNO3 + HO2 + NO2 : 	KAPNO 	;
+{13207.} 	 INDHCO3 + NO2 = INDHPAN : 	KFPAN 	;
+{13208.} 	 INDHCO3 + NO3 = MVKNO3 + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{13209.} 	 INDHCO3 = MVKNO3 + HO2 : 	1.00D-11*RO2 	;
+{13210.} 	 ACCOCOMOOH + OH = ACCOCOMEO2 : 	1.19D-11 	;
+{13211.} 	 ACCOCOMOOH = ACCOCOMEO + OH : 	J(41) 	;
+{13212.} 	 ACCOCOMOOH = CH3CO3 + HCHO + CO + OH : 	J(22) 	;
+{13213.} 	 ACCOCOMEO = CH3CO3 + HCHO + CO : 	KDEC 	;
+{13214.} 	 ACCOMECO3 + HO2 = ACCOMECO3H : 	KAPHO2*0.56 	;
+{13215.} 	 ACCOMECO3 + HO2 = MECOACETO2 + OH : 	KAPHO2*0.44 	;
+{13216.} 	 ACCOMECO3 + NO = MECOACETO2 + NO2 : 	KAPNO 	;
+{13217.} 	 ACCOMECO3 + NO2 = ACCOMEPAN : 	KFPAN 	;
+{13218.} 	 ACCOMECO3 + NO3 = MECOACETO2 + NO2 : 	KRO2NO3*1.74 	;
+{13219.} 	 ACCOMECO3 = MECOACETO2 : 	1.00D-11*RO2 	;
+{13220.} 	 ACEETOHOOH + OH = ACEETOHO2 : 	2.97D-11 	;
+{13221.} 	 ACEETOHOOH = ACEETOHO + OH : 	J(41) 	;
+{13222.} 	 ACEETOHO = METACETHO + HCHO + HO2 : 	KDEC 	;
+{13223.} 	 ACOMCOMOOH + OH = ACCOMCOMO2 : 	1.19D-11 	;
+{13224.} 	 ACOMCOMOOH = ACCOMCOMO + OH : 	J(41)+J(22) 	;
+{13225.} 	 ACCOMCOMO = ACCOMECO3 + HCHO : 	KDEC 	;
+{13226.} 	 ACCOCOEOOH + OH = ACCOCOETO2 : 	2.23D-11 	;
+{13227.} 	 ACCOCOEOOH = ACCOCOETO + OH : 	J(41)+J(22) 	;
+{13228.} 	 ACCOCOETO = CH3CHO + CH3CO3 + CO : 	KDEC 	;
+{13229.} 	 IPRFORMO2 + HO2 = IPRFORMOOH : 	KRO2HO2*0.625 	;
+{13230.} 	 IPRFORMO2 + NO = IPRFORMNO3 : 	KRO2NO*0.025 	;
+{13231.} 	 IPRFORMO2 + NO = IPRFORMO + NO2 : 	KRO2NO*0.975 	;
+{13232.} 	 IPRFORMO2 + NO3 = IPRFORMO + NO2 : 	KRO2NO3 	;
+{13233.} 	 IPRFORMO2 = IPRFORMO : 	9.20D-14*0.7*RO2 	;
+{13234.} 	 IPRFORMO2 = IPRFORMOH : 	9.20D-14*0.3*RO2 	;
+{13235.} 	 MTBEALCO2H + OH = IPRFORMO2 : 	1.31D-12 	;
+{13236.} 	 MTBEALCO3H + OH = MTBEAALCO3 : 	4.86D-12 	;
+{13237.} 	 MTBEALCO3H = IPRFORMO2 + OH : 	J(41) 	;
+{13238.} 	 MTBEAALPAN + OH = METACETHO + HCHO + CO + NO2 : 	3.72D-13 	;
+{13239.} 	 MTBEAALPAN = MTBEAALCO3 + NO2 : 	KBPAN 	;
+{13240.} 	 PRCOFORMO2 + HO2 = PRCOFOROOH : 	KRO2HO2*0.706 	;
+{13241.} 	 PRCOFORMO2 + NO = PRCOFORMO + NO2 : 	KRO2NO 	;
+{13242.} 	 PRCOFORMO2 + NO3 = PRCOFORMO + NO2 : 	KRO2NO3 	;
+{13243.} 	 PRCOFORMO2 = PRCOFORMO : 	8.80D-13*RO2 	;
+{13244.} 	 PRONOCOMO2 + HO2 = PRNOCOMOOH : 	KRO2HO2*0.706 	;
+{13245.} 	 PRONOCOMO2 + NO = PRONOCOMO + NO2 : 	KRO2NO 	;
+{13246.} 	 PRONOCOMO2 + NO3 = PRONOCOMO + NO2 : 	KRO2NO3 	;
+{13247.} 	 PRONOCOMO2 = PRONOCOMO : 	8.80D-13*RO2 	;
+{13248.} 	 CO23C4CO3 + HO2 = BIACETO2 + OH : 	KAPHO2*0.44 	;
+{13249.} 	 CO23C4CO3 + HO2 = CO23C4CO3H : 	KAPHO2*0.56 	;
+{13250.} 	 CO23C4CO3 + NO = BIACETO2 + NO2 : 	KAPNO 	;
+{13251.} 	 CO23C4CO3 + NO2 = C5PAN9 : 	KFPAN 	;
+{13252.} 	 CO23C4CO3 + NO3 = BIACETO2 + NO2 : 	KRO2NO3*1.74 	;
+{13253.} 	 CO23C4CO3 = BIACETO2 : 	1.00D-11*RO2 	;
+{13254.} 	 C62OOH = C62O + OH : 	J(41)+J(22) 	;
+{13255.} 	 C62OOH = CH3CO3 + CO + MGLYOX + OH : 	J(35) 	;
+{13256.} 	 OH + C62OOH = C62O2 : 	1.30D-11 	;
+{13257.} 	 HO13C4OOH = HO13C4O + OH : 	J(41) 	;
+{13258.} 	 OH + HO13C4OOH = HO13C3CHO + OH : 	2.56D-11 	;
+{13259.} 	 OH + HO13C4OOH = HO13C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13260.} 	 OH + HO13C4NO3 = HO13C3CHO + NO2 : 	7.29D-12 	;
+{13261.} 	 HO13C4O = HOC2H4CHO + HCHO + HO2 : 	2.00D+14*EXP(-5538/TEMP) 	;
+{13262.} 	 HO13C3CHO = HOC2H4CHO + CO + HO2 + HO2 : 	J(15) 	;
+{13263.} 	 NO3 + HO13C3CHO = HO13C3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{13264.} 	 OH + HO13C3CHO = HO13C3CO3 : 	3.19D-11 	;
+{13265.} 	 OH + HO13C4OH = HO13C3CHO + HO2 : 	2.01D-11 	;
+{13266.} 	 C5CO34CO3 + HO2 = C5CO23O2 + OH : 	KAPHO2*0.44 	;
+{13267.} 	 C5CO34CO3 + HO2 = C6CO134OOH : 	KAPHO2*0.56 	;
+{13268.} 	 C5CO34CO3 + NO = C5CO23O2 + NO2 : 	KAPNO 	;
+{13269.} 	 C5CO34CO3 + NO2 = C6CO134PAN : 	KFPAN 	;
+{13270.} 	 C5CO34CO3 + NO3 = C5CO23O2 + NO2 : 	KRO2NO3*1.74 	;
+{13271.} 	 C5CO34CO3 = C5CO23O2 : 	1.00D-11*RO2 	;
+{13272.} 	 OH + HM22CO2H = IBUTOLBO2 : 	1.41D-11 	;
+{13273.} 	 HM22CO3H = IBUTOLBO2 + OH : 	J(41) 	;
+{13274.} 	 OH + HM22CO3H = HM22CO3 : 	1.75D-11 	;
+{13275.} 	 C5PAN15 = HM22CO3 + NO2 : 	KBPAN 	;
+{13276.} 	 OH + C5PAN15 = ACETOL + HCHO + CO + NO2 : 	4.50D-12 	;
+{13277.} 	 C6COALCO2H + OH = C5COCHOO2 : 	2.69D-11 	;
+{13278.} 	 C6COALCO2H = C5COCHOO2 + HO2 : 	J(22)+J(15) 	;
+{13279.} 	 C6COALCO3H + OH = C6COCHOCO3 : 	3.05D-11 	;
+{13280.} 	 C6COALCO3H = C5COCHOO2 + OH : 	J(41)+J(22) 	;
+{13281.} 	 C6COCHOPAN + OH = CO13C4CHO + CO + NO2 : 	2.69D-11 	;
+{13282.} 	 C6COCHOPAN = C6COCHOCO3 + NO2 : 	KBPAN 	;
+{13283.} 	 C5COCHOOOH + OH = C5COCHOO2 : 	3.83D-11 	;
+{13284.} 	 C5COCHOOOH = C5COCHOO + OH : 	J(41)+J(22)+J(15) 	;
+{13285.} 	 C5COCHOO = CHOC2CO3 + HCHO : 	KDEC 	;
+{13286.} 	 CHOC2H4OOH + OH = CHOC2H4O2 : 	7.31D-11 	;
+{13287.} 	 CHOC2H4OOH = CHOC2H4O + OH : 	J(41)+J(15) 	;
+{13288.} 	 CHOC2H4O = HCOCH2CHO + HO2 : 	KROPRIM*O2 	;
+{13289.} 	 HCOCH2CO2H = HCOCH2O2 + HO2 : 	J(15) 	;
+{13290.} 	 OH + HCOCH2CO2H = HCOCH2O2 : 	2.14D-11 	;
+{13291.} 	 HCOCH2CO3H = HCOCH2O2 + OH : 	J(41)+J(15) 	;
+{13292.} 	 OH + HCOCH2CO3H = HCOCH2CO3 : 	2.49D-11 	;
+{13293.} 	 C3PAN2 = HCOCH2CO3 + NO2 : 	KBPAN 	;
+{13294.} 	 OH + C3PAN2 = GLYOX + CO + NO2 : 	2.10D-11 	;
+{13295.} 	 C6135COOOH + OH = CY6TRIONO2 : 	8.37D-11 	;
+{13296.} 	 C6135COOOH = C6135COO + OH : 	J(41)+J(22)*2+J(15) 	;
+{13297.} 	 C6135COO = CHOC3COCO3 + HCHO : 	KDEC 	;
+{13298.} 	 C6CYTONOOH + OH = C6CYTONO2 : 	1.83D-11 	;
+{13299.} 	 C6CYTONOOH = C6CYTONO + OH : 	J(41)+J(22) 	;
+{13300.} 	 C6CYTONO = C5124COCO3 : 	KDEC 	;
+{13301.} 	 CO235C6CHO + NO3 = CO235C6CO3 + HNO3 : 	KNO3AL*5.5 	;
+{13302.} 	 CO235C6CHO + OH = CO235C6CO3 : 	6.70D-11 	;
+{13303.} 	 CO235C6CHO = CHOC3COCO3 + CH3CO3 : 	J(35) 	;
+{13304.} 	 C106O2 + HO2 = C106OOH : 	KRO2HO2*0.914 	;
+{13305.} 	 C106O2 + NO = C106NO3 : 	KRO2NO*0.125 	;
+{13306.} 	 C106O2 + NO = C106O + NO2 : 	KRO2NO*0.875 	;
+{13307.} 	 C106O2 + NO3 = C106O + NO2 : 	KRO2NO3 	;
+{13308.} 	 C106O2 = C106O : 	6.70D-15*0.7*RO2 	;
+{13309.} 	 C106O2 = C106OH : 	6.70D-15*0.3*RO2 	;
+{13310.} 	 NC102OOH + OH = NC102O2 : 	8.03D-12 	;
+{13311.} 	 NC102OOH = NC102O + OH : 	J(41) 	;
+{13312.} 	 NC102O = NC71O2 + CH3COCH3 : 	KDEC 	;
+{13313.} 	 C717O2 + HO2 = C717OOH : 	KRO2HO2*0.820 	;
+{13314.} 	 C717O2 + NO = C717NO3 : 	KRO2NO*0.278 	;
+{13315.} 	 C717O2 + NO = C717O + NO2 : 	KRO2NO*0.722 	;
+{13316.} 	 C717O2 + NO3 = C717O + NO2 : 	KRO2NO3 	;
+{13317.} 	 C717O2 = C717O : 	2.50D-13*0.6*RO2 	;
+{13318.} 	 C717O2 = C717OH : 	2.50D-13*0.2*RO2 	;
+{13319.} 	 C717O2 = CO235C6CHO : 	2.50D-13*0.2*RO2 	;
+{13320.} 	 C811CO3 + HO2 = C811CO3H : 	KAPHO2*0.41 	;
+{13321.} 	 C811CO3 + HO2 = C811O2 + OH : 	KAPHO2*0.44 	;
+{13322.} 	 C811CO3 + HO2 = PINIC + O3 : 	KAPHO2*0.15 	;
+{13323.} 	 C811CO3 + NO = C811O2 + NO2 : 	KAPNO 	;
+{13324.} 	 C811CO3 + NO2 = C811PAN : 	KFPAN 	;
+{13325.} 	 C811CO3 + NO3 = C811O2 + NO2 : 	KRO2NO3*1.74 	;
+{13326.} 	 C811CO3 = C811O2 : 	1.00D-11*RO2*0.7 	;
+{13327.} 	 C811CO3 = PINIC : 	1.00D-11*RO2*0.3 	;
+{13328.} 	 CO13C4CHO + NO3 = CHOC3COCO3 + HNO3 : 	2*KNO3AL*5.5 	;
+{13329.} 	 CO13C4CHO + OH = CHOC3COCO3 : 	1.33D-10 	;
+{13330.} 	 CO13C4CHO = CHOC3COO2 + CO + HO2 : 	J(15)*2 	;
+{13331.} 	 C921O2 + HO2 = C921OOH : 	KRO2HO2*0.890 	;
+{13332.} 	 C921O2 + NO = C921O + NO2 : 	KRO2NO 	;
+{13333.} 	 C921O2 + NO3 = C921O + NO2 : 	KRO2NO3 	;
+{13334.} 	 C921O2 = C921O : 	6.70D-15*RO2 	;
+{13335.} 	 C98O2 + HO2 = C98OOH : 	KRO2HO2*0.890 	;
+{13336.} 	 C98O2 + NO = C98NO3 : 	KRO2NO*0.118 	;
+{13337.} 	 C98O2 + NO = C98O + NO2 : 	KRO2NO*0.882 	;
+{13338.} 	 C98O2 + NO3 = C98O + NO2 : 	KRO2NO3 	;
+{13339.} 	 C98O2 = C98O : 	6.70D-15*0.7*RO2 	;
+{13340.} 	 C98O2 = C98OH : 	6.70D-15*0.3*RO2 	;
+{13341.} 	 C86O2 + HO2 = C86OOH : 	KRO2HO2*0.859 	;
+{13342.} 	 C86O2 + NO = C86O + NO2 : 	KRO2NO 	;
+{13343.} 	 C86O2 + NO3 = C86O + NO2 : 	KRO2NO3 	;
+{13344.} 	 C86O2 = C86O : 	6.70D-15*RO2 	;
+{13345.} 	 C716OH + NO3 = H3C25C6CO3 + HNO3 : 	KNO3AL*5.5 	;
+{13346.} 	 C716OH + OH = CO235C6CHO + HO2 : 	8.92D-11*0.232 	;
+{13347.} 	 C716OH + OH = H3C25C6CO3 : 	8.92D-11*0.768 	;
+{13348.} 	 C716OH = H3C25C6O2 + CO + HO2 : 	J(15) 	;
+{13349.} 	 C919O2 + HO2 = C919OOH : 	KRO2HO2*0.890 	;
+{13350.} 	 C919O2 + NO = C919NO3 : 	KRO2NO*0.118 	;
+{13351.} 	 C919O2 + NO = C919O + NO2 : 	KRO2NO*0.882 	;
+{13352.} 	 C919O2 + NO3 = C919O + NO2 : 	KRO2NO3 	;
+{13353.} 	 C919O2 = C919O : 	6.70D-15*RO2*0.7 	;
+{13354.} 	 C919O2 = C919OH : 	6.70D-15*RO2*0.3 	;
+{13355.} 	 C914O2 + HO2 = C914OOH : 	KRO2HO2*0.890 	;
+{13356.} 	 C914O2 + NO = C914O + NO2 : 	KRO2NO 	;
+{13357.} 	 C914O2 + NO3 = C914O + NO2 : 	KRO2NO3 	;
+{13358.} 	 C914O2 = C914CO : 	8.80D-13*RO2*0.2 	;
+{13359.} 	 C914O2 = C914O : 	8.80D-13*RO2*0.6 	;
+{13360.} 	 C914O2 = C914OH : 	8.80D-13*RO2*0.2 	;
+{13361.} 	 C916O2 + HO2 = C916OOH : 	KRO2HO2*0.890 	;
+{13362.} 	 C916O2 + NO = C916NO3 : 	KRO2NO*0.118 	;
+{13363.} 	 C916O2 + NO = C916O + NO2 : 	KRO2NO*0.882 	;
+{13364.} 	 C916O2 + NO3 = C916O + NO2 : 	KRO2NO3 	;
+{13365.} 	 C916O2 = C916O : 	6.70D-15*RO2*0.7 	;
+{13366.} 	 C916O2 = C916OH : 	6.70D-15*RO2*0.3 	;
+{13367.} 	 C88CO3 + HO2 = C88CO2H + O3 : 	KAPHO2*0.15 	;
+{13368.} 	 C88CO3 + HO2 = C88CO3H : 	KAPHO2*0.41 	;
+{13369.} 	 C88CO3 + HO2 = C88O2 + OH : 	KAPHO2*0.44 	;
+{13370.} 	 C88CO3 + NO = C88O2 + NO2 : 	KAPNO 	;
+{13371.} 	 C88CO3 + NO2 = C88PAN : 	KFPAN 	;
+{13372.} 	 C88CO3 + NO3 = C88O2 + NO2 : 	KRO2NO3*1.74 	;
+{13373.} 	 C88CO3 = C88CO2H : 	1.00D-11*0.3*RO2 	;
+{13374.} 	 C88CO3 = C88O2 : 	1.00D-11*0.7*RO2 	;
+{13375.} 	 C88O2 + HO2 = C88OOH : 	KRO2HO2*0.859 	;
+{13376.} 	 C88O2 + NO = C88O + NO2 : 	KRO2NO 	;
+{13377.} 	 C88O2 + NO3 = C88O + NO2 : 	KRO2NO3 	;
+{13378.} 	 C88O2 = C88CO : 	8.80D-13*RO2*0.2 	;
+{13379.} 	 C88O2 = C88O : 	8.80D-13*RO2*0.6 	;
+{13380.} 	 C88O2 = C88OH : 	8.80D-13*RO2*0.2 	;
+{13381.} 	 C512CO2H + OH = C512O2 : 	7.23D-11 	;
+{13382.} 	 C512CO2H = C512O2 + HO2 : 	J(15) 	;
+{13383.} 	 C512CO3H + OH = C512CO3 : 	7.54D-11 	;
+{13384.} 	 C512CO3H = C512O2 + OH : 	J(41)+J(15) 	;
+{13385.} 	 C512O2 + HO2 = C512OOH : 	KRO2HO2*0.706 	;
+{13386.} 	 C512O2 + NO = C512NO3 : 	KRO2NO*0.052 	;
+{13387.} 	 C512O2 + NO = C512O + NO2 : 	KRO2NO*0.948 	;
+{13388.} 	 C512O2 + NO3 = C512O + NO2 : 	KRO2NO3 	;
+{13389.} 	 C512O2 = C512O : 	1.30D-12*RO2*0.6 	;
+{13390.} 	 C512O2 = C512OH : 	1.30D-12*RO2*0.2 	;
+{13391.} 	 C512O2 = CO13C4CHO : 	1.30D-12*RO2*0.2 	;
+{13392.} 	 C512PAN + OH = CO13C4CHO + CO + NO2 : 	6.76D-11 	;
+{13393.} 	 C512PAN = C512CO3 + NO2 : 	KBPAN 	;
+{13394.} 	 C619O2 + HO2 = C619OOH : 	KRO2HO2*0.770 	;
+{13395.} 	 C619O2 + NO = C619O + NO2 : 	KRO2NO 	;
+{13396.} 	 C619O2 + NO3 = C619O + NO2 : 	KRO2NO3 	;
+{13397.} 	 C619O2 = C619CO : 	8.80D-13*RO2*0.2 	;
+{13398.} 	 C619O2 = C619O : 	8.80D-13*RO2*0.6 	;
+{13399.} 	 C619O2 = C619OH : 	8.80D-13*RO2*0.2 	;
+{13400.} 	 C89OOH + OH = C89O2 : 	3.61D-11 	;
+{13401.} 	 C89OOH = C89O + OH : 	J(41)+J(15) 	;
+{13402.} 	 C89NO3 + OH = CH3COCH3 + CO13C4CHO + NO2 : 	2.56D-11 	;
+{13403.} 	 C89NO3 = C89O + NO2 : 	J(55)+J(15) 	;
+{13404.} 	 C89O = C810O2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{13405.} 	 C89OH + OH = C89O : 	2.86D-11 	;
+{13406.} 	 C89OH = C89O + HO2 : 	J(15) 	;
+{13407.} 	 C926OOH + OH = C926O2 : 	3.08D-11 	;
+{13408.} 	 C926OOH = C926O + OH : 	J(41)+J(15)*2 	;
+{13409.} 	 C926O = CH3CO3 + CO25C6CHO : 	KDEC 	;
+{13410.} 	 C926OH + OH = CH3CO3 + CO25C6CHO : 	2.73D-11 	;
+{13411.} 	 C926OH = C926O + HO2 : 	J(15)*2 	;
+{13412.} 	 C817CO3H + OH = C817CO3 : 	2.28D-11 	;
+{13413.} 	 C817CO3H = C817O2 + OH : 	J(22)*2+J(41) 	;
+{13414.} 	 KLIMONONIC + OH = C817O2 : 	1.97D-11 	;
+{13415.} 	 KLIMONONIC = C817O2 + HO2 : 	J(22)*2 	;
+{13416.} 	 C817PAN + OH = C817CO + CO + NO2 : 	1.92D-11 	;
+{13417.} 	 C817PAN = C817CO3 + NO2 : 	KBPAN 	;
+{13418.} 	 C817OOH + OH = C817CO + OH : 	3.21D-11 	;
+{13419.} 	 C817OOH = C817O + OH : 	J(22)*2+J(41) 	;
+{13420.} 	 C817NO3 + OH = C817CO + NO2 : 	1.62D-11 	;
+{13421.} 	 C817NO3 = C817O + NO2 : 	J(22)*2+J(53) 	;
+{13422.} 	 C817O = C818O2 : 	KDEC 	;
+{13423.} 	 C817CO + OH = C727CO3 : 	2.72D-11 	;
+{13424.} 	 C817OH + OH = C817CO + HO2 : 	2.31D-11 	;
+{13425.} 	 C817OH = C818O2 + HO2 : 	J(22)*2 	;
+{13426.} 	 NC826OOH + OH = NC826O2 : 	5.89D-11 	;
+{13427.} 	 NC826OOH = NC826O + OH : 	J(41)+J(15)*2 	;
+{13428.} 	 NC826O = C626CHO + HCHO + NO2 : 	KDEC 	;
+{13429.} 	 NC826OH + OH = NC826O : 	5.54D-11 	;
+{13430.} 	 NC826OH = NC826O + HO2 : 	J(15)*2 	;
+{13431.} 	 C626CO3 + HO2 = C626CO2H + O3 : 	KAPHO2*0.15 	;
+{13432.} 	 C626CO3 + HO2 = C626CO3H : 	KAPHO2*0.41 	;
+{13433.} 	 C626CO3 + HO2 = C626O2 + OH : 	KAPHO2*0.44 	;
+{13434.} 	 C626CO3 + NO = C626O2 + NO2 : 	KAPNO 	;
+{13435.} 	 C626CO3 + NO2 = C626PAN : 	KFPAN 	;
+{13436.} 	 C626CO3 + NO3 = C626O2 + NO2 : 	KRO2NO3*1.74 	;
+{13437.} 	 C626CO3 = C626CO2H : 	1.00D-11*RO2*0.3 	;
+{13438.} 	 C626CO3 = C626O2 : 	1.00D-11*RO2*0.7 	;
+{13439.} 	 C626O2 + HO2 = C626OOH : 	KRO2HO2*0.770 	;
+{13440.} 	 C626O2 + NO = C626NO3 : 	KRO2NO*0.078 	;
+{13441.} 	 C626O2 + NO = C626O + NO2 : 	KRO2NO*0.922 	;
+{13442.} 	 C626O2 + NO3 = C626O + NO2 : 	KRO2NO3 	;
+{13443.} 	 C626O2 = C511CHO : 	1.30D-12*0.2 	;
+{13444.} 	 C626O2 = C517CHO : 	1.30D-12*0.2 	;
+{13445.} 	 C626O2 = C626O : 	1.30D-12*0.6 	;
+{13446.} 	 C735O2 + HO2 = C735OOH : 	KRO2HO2*0.820 	;
+{13447.} 	 C735O2 + NO = C735O + NO2 : 	KRO2NO 	;
+{13448.} 	 C735O2 + NO3 = C735O + NO2 : 	KRO2NO3 	;
+{13449.} 	 C735O2 = C735O : 	9.20D-14*RO2*0.7 	;
+{13450.} 	 C735O2 = C735OH : 	9.20D-14*RO2*0.3 	;
+{13451.} 	 C826OOH + OH = C826O2 : 	6.05D-11 	;
+{13452.} 	 C826OOH = C826O + OH : 	J(41)+J(15)*2 	;
+{13453.} 	 C826NO3 + OH = C626CHO + HCHO + NO2 : 	4.59D-11 	;
+{13454.} 	 C826O = C626CHO + HCHO + HO2 : 	KDEC 	;
+{13455.} 	 C826OH + OH = C826O : 	5.70D-11 	;
+{13456.} 	 C826OH = C826O + HO2 : 	J(15)*2 	;
+{13457.} 	 C729OOH + OH = C622CHO + OH : 	9.57D-11 	;
+{13458.} 	 C729OOH = C729O + OH : 	J(41)+J(15) 	;
+{13459.} 	 C729NO3 + OH = C622CHO + NO2 : 	7.51D-11 	;
+{13460.} 	 C729NO3 = C729O + NO2 : 	J(53) 	;
+{13461.} 	 C729O = C622CO3 : 	KDEC 	;
+{13462.} 	 C622CHO + NO3 = C622CO3 + HNO3 : 	KNO3AL*8.5 	;
+{13463.} 	 C622CHO + NO3 = NC728O2 : 	3.30D-13 	;
+{13464.} 	 C622CHO + O3 = C517CHO + CH2OOF : 	1.30D-17*0.330 	;
+{13465.} 	 C622CHO + O3 = C628OOA + HCHO : 	1.30D-17*0.670 	;
+{13466.} 	 C622CHO + OH = C622CO3 : 	8.67D-11*0.288 	;
+{13467.} 	 C622CHO + OH = C728O2 : 	8.67D-11*0.712 	;
+{13468.} 	 C622CHO = C622O2 + CO + HO2 : 	J(15) 	;
+{13469.} 	 C822O2 + HO2 = C822OOH : 	KRO2HO2*0.859 	;
+{13470.} 	 C822O2 + NO = C822NO3 : 	KRO2NO*0.138 	;
+{13471.} 	 C822O2 + NO = C822O + NO2 : 	KRO2NO*0.862 	;
+{13472.} 	 C822O2 + NO3 = C822O + NO2 : 	KRO2NO3 	;
+{13473.} 	 C822O2 = C729CHO : 	1.30D-12*RO2*0.2 	;
+{13474.} 	 C822O2 = C822O : 	1.30D-12*RO2*0.6 	;
+{13475.} 	 C822O2 = C822OH : 	1.30D-12*RO2*0.2 	;
+{13476.} 	 C823CO3 + HO2 = C823CO3H : 	KAPHO2*0.41 	;
+{13477.} 	 C823CO3 + HO2 = C823O2 + OH : 	KAPHO2*0.44 	;
+{13478.} 	 C823CO3 + HO2 = LIMONIC + O3 : 	KAPHO2*0.15 	;
+{13479.} 	 C823CO3 + NO = C823O2 + NO2 : 	KAPNO 	;
+{13480.} 	 C823CO3 + NO2 = C823PAN : 	KFPAN 	;
+{13481.} 	 C823CO3 + NO3 = C823O2 + NO2 : 	KRO2NO3*1.74 	;
+{13482.} 	 C823CO3 = C823O2 : 	1.00D-11*RO2*0.7 	;
+{13483.} 	 C823CO3 = LIMONIC : 	1.00D-11*RO2*0.3 	;
+{13484.} 	 C925O2 + HO2 = C925OOH : 	KRO2HO2*0.890 	;
+{13485.} 	 C925O2 + NO = C925O + NO2 : 	KRO2NO 	;
+{13486.} 	 C925O2 + NO3 = C925O + NO2 : 	KRO2NO3 	;
+{13487.} 	 C925O2 = C925O : 	9.20D-14*RO2 	;
+{13488.} 	 C622CO3 + HO2 = C622CO2H + O3 : 	KAPHO2*0.15 	;
+{13489.} 	 C622CO3 + HO2 = C622CO3H : 	KAPHO2*0.41 	;
+{13490.} 	 C622CO3 + HO2 = C622O2 + OH : 	KAPHO2*0.44 	;
+{13491.} 	 C622CO3 + NO = C622O2 + NO2 : 	KAPNO 	;
+{13492.} 	 C622CO3 + NO2 = C622PAN : 	KFPAN 	;
+{13493.} 	 C622CO3 + NO3 = C622O2 + NO2 : 	KRO2NO3*1.74 	;
+{13494.} 	 C622CO3 = C622CO2H : 	1.00D-11*RO2*0.3 	;
+{13495.} 	 C622CO3 = C622O2 : 	1.00D-11*RO2*0.7 	;
+{13496.} 	 C816CO + OH = C819O2 : 	5.20D-11 	;
+{13497.} 	 C816CO = MACO3 + MEKAO2 : 	J(18)+J(19) 	;
+{13498.} 	 LMLKAOOH + OH = LMLKACO + OH : 	5.79D-11 	;
+{13499.} 	 LMLKAOOH = C626CHO + OH + CH3CO3 : 	J(22) 	;
+{13500.} 	 LMLKAOOH = LMLKAO + OH : 	J(41) 	;
+{13501.} 	 LMLKAO = C626CHO + CH3CO3 : 	KDEC 	;
+{13502.} 	 LMLKACO + OH = C626CHO + CH3CO3 : 	3.58D-11 	;
+{13503.} 	 LMLKACO = C626CO3 + CH3CO3 : 	J(35) 	;
+{13504.} 	 LMLKAOH + OH = LMLKACO + HO2 : 	4.57D-11 	;
+{13505.} 	 LMLKAOH = C626CHO + HO2 + CH3CO3 : 	J(22) 	;
+{13506.} 	 LMLKBOOH + OH = LMLKBCO + OH : 	4.77D-11 	;
+{13507.} 	 LMLKBOOH = C731CO3 + HCHO + OH : 	J(22) 	;
+{13508.} 	 LMLKBOOH = LMLKBO + OH : 	J(41) 	;
+{13509.} 	 LMLKBO = C731CO3 + HCHO : 	KDEC 	;
+{13510.} 	 LMLKBCO + OH = C731CO3 + CO : 	5.09D-11 	;
+{13511.} 	 LMLKBCO = C731CO3 + CO + HO2 : 	J(34) 	;
+{13512.} 	 LMLKBOH + OH = LMLKBCO + HO2 : 	4.09D-11 	;
+{13513.} 	 LMLKBOH = C731CO3 + HCHO + HO2 : 	J(22) 	;
+{13514.} 	 C1011CO3 + HO2 = C1011CO2H + O3 : 	KAPHO2*0.15 	;
+{13515.} 	 C1011CO3 + HO2 = C1011CO3H : 	KAPHO2*0.41 	;
+{13516.} 	 C1011CO3 + HO2 = C1011O2 + OH : 	KAPHO2*0.44 	;
+{13517.} 	 C1011CO3 + NO = C1011O2 + NO2 : 	KAPNO 	;
+{13518.} 	 C1011CO3 + NO2 = C1011PAN : 	KFPAN 	;
+{13519.} 	 C1011CO3 + NO3 = C1011O2 + NO2 : 	KRO2NO3*1.74 	;
+{13520.} 	 C1011CO3 = C1011CO2H : 	1.00D-11*RO2*0.3 	;
+{13521.} 	 C1011CO3 = C1011O2 : 	1.00D-11*RO2*0.7 	;
+{13522.} 	 C1210CO3 + HO2 = C1210CO2 + OH : 	KAPHO2*0.44 	;
+{13523.} 	 C1210CO3 + HO2 = C1210CO2H + O3 : 	KAPHO2*0.15 	;
+{13524.} 	 C1210CO3 + HO2 = C1210CO3H : 	KAPHO2*0.41 	;
+{13525.} 	 C1210CO3 + NO = C1210CO2 + NO2 : 	KAPNO 	;
+{13526.} 	 C1210CO3 + NO2 = C1210PAN : 	KFPAN 	;
+{13527.} 	 C1210CO3 + NO3 = C1210CO2 + NO2 : 	KRO2NO3*1.74 	;
+{13528.} 	 C1210CO3 = C1210CO2 : 	1.00D-11*RO2*0.7 	;
+{13529.} 	 C1210CO3 = C1210CO2H : 	1.00D-11*RO2*0.3 	;
+{13530.} 	 C132O2 + HO2 = C132OOH : 	KRO2HO2*0.959 	;
+{13531.} 	 C132O2 + NO = C132O + NO2 : 	KRO2NO 	;
+{13532.} 	 C132O2 + NO3 = C132O + NO2 : 	KRO2NO3 	;
+{13533.} 	 C132O2 = C132O : 	6.70D-15*RO2*0.7 	;
+{13534.} 	 C132O2 = C132OH : 	6.70D-15*RO2*0.3 	;
+{13535.} 	 C137CO3 + HO2 = C137CO2H + O3 : 	KAPHO2*0.15 	;
+{13536.} 	 C137CO3 + HO2 = C137CO3H : 	KAPHO2*0.41 	;
+{13537.} 	 C137CO3 + HO2 = C137O2 + OH : 	KAPHO2*0.44 	;
+{13538.} 	 C137CO3 + NO = C137O2 + NO2 : 	KAPNO 	;
+{13539.} 	 C137CO3 + NO2 = C137PAN : 	KFPAN 	;
+{13540.} 	 C137CO3 + NO3 = C137O2 + NO2 : 	KRO2NO3*1.74 	;
+{13541.} 	 C137CO3 = C137CO2H : 	1.00D-11*RO2*0.3 	;
+{13542.} 	 C137CO3 = C137O2 : 	1.00D-11*RO2*0.7 	;
+{13543.} 	 C1013CO3 + HO2 = C1013CO2H + O3 : 	KAPHO2*0.15 	;
+{13544.} 	 C1013CO3 + HO2 = C1013CO3H : 	KAPHO2*0.41 	;
+{13545.} 	 C1013CO3 + HO2 = C1013O2 + OH : 	KAPHO2*0.44 	;
+{13546.} 	 C1013CO3 + NO = C1013O2 + NO2 : 	KAPNO 	;
+{13547.} 	 C1013CO3 + NO2 = C1013PAN : 	KFPAN 	;
+{13548.} 	 C1013CO3 + NO3 = C1013O2 + NO2 : 	KRO2NO3*1.74 	;
+{13549.} 	 C1013CO3 = C1013CO2H : 	1.00D-11*RO2*0.3 	;
+{13550.} 	 C1013CO3 = C1013O2 : 	1.00D-11*RO2*0.7 	;
+{13551.} 	 C1312CO + OH = C1010O2 + HOC2H4CHO : 	8.74D-11 	;
+{13552.} 	 C1312O2 + HO2 = C1312OOH : 	KRO2HO2*0.959 	;
+{13553.} 	 C1312O2 + NO = C1312NO3 : 	KRO2NO*0.178 	;
+{13554.} 	 C1312O2 + NO = C1312O + NO2 : 	KRO2NO*0.822 	;
+{13555.} 	 C1312O2 + NO3 = C1312O + NO2 : 	KRO2NO3 	;
+{13556.} 	 C1312O2 = C1312CO : 	2.50D-13*RO2*0.2 	;
+{13557.} 	 C1312O2 = C1312O : 	2.50D-13*RO2*0.6 	;
+{13558.} 	 C1312O2 = C1312OH : 	2.50D-13*RO2*0.2 	;
+{13559.} 	 C116CO2H + OH = C116O2 : 	3.64D-11 	;
+{13560.} 	 C116CO3H + OH = C116CO3 : 	3.93D-11 	;
+{13561.} 	 C116CO3H = C116O2 + OH : 	J(41) 	;
+{13562.} 	 C116PAN + OH = C116CO + CO + NO2 : 	3.57D-11 	;
+{13563.} 	 C116PAN = C116CO3 + NO2 : 	KBPAN 	;
+{13564.} 	 C116OOH + OH = C116CO + OH : 	4.11D-11 	;
+{13565.} 	 C116OOH = C116O + OH : 	J(41) 	;
+{13566.} 	 C116NO3 + OH = C116CO + NO2 : 	2.76D-11 	;
+{13567.} 	 C116NO3 = C116O + NO2 : 	J(53) 	;
+{13568.} 	 C116O = C117O2 : 	KDEC 	;
+{13569.} 	 C116CO + OH = C117O2 : 	4.83D-11 	;
+{13570.} 	 C116OH + OH = C116CO + HO2 : 	3.21D-11 	;
+{13571.} 	 C129OOH + OH = C129CO + OH : 	7.07D-11 	;
+{13572.} 	 C129OOH = C129O + OH : 	J(41) 	;
+{13573.} 	 C129O = C830CO3 + HCOCH2CHO : 	KDEC 	;
+{13574.} 	 C129CO + OH = C830CO3 + HCOCH2CHO : 	4.99D-11 	;
+{13575.} 	 C129CO = C830CO3 + HCOCH2CO3 : 	J(35) 	;
+{13576.} 	 C129OH + OH = C129CO + HO2 : 	5.85D-11 	;
+{13577.} 	 C127O2 + HO2 = C127OOH : 	KRO2HO2*0.947 	;
+{13578.} 	 C127O2 + NO = C127NO3 : 	KRO2NO*0.132 	;
+{13579.} 	 C127O2 + NO = C127O + NO2 : 	KRO2NO*0.868 	;
+{13580.} 	 C127O2 + NO3 = C127O + NO2 : 	KRO2NO3 	;
+{13581.} 	 C127O2 = C127O : 	6.70D-15*RO2*0.7 	;
+{13582.} 	 C127O2 = C127OH : 	6.70D-15*RO2*0.3 	;
+{13583.} 	 C143CO + OH = C145O2 : 	6.87D-11 	;
+{13584.} 	 C143CO = C927O2 + CO2C4CO3 : 	J(22)*3 	;
+{13585.} 	 C143O2 + HO2 = C143OOH : 	KRO2HO2*0.968 	;
+{13586.} 	 C143O2 + NO = C143NO3 : 	KRO2NO*0.245 	;
+{13587.} 	 C143O2 + NO = C143O + NO2 : 	KRO2NO*0.755 	;
+{13588.} 	 C143O2 + NO3 = C143O + NO2 : 	KRO2NO3 	;
+{13589.} 	 C143O2 = C143CO : 	2.50D-13*RO2*0.2 	;
+{13590.} 	 C143O2 = C143O : 	2.50D-13*RO2*0.6 	;
+{13591.} 	 C143O2 = C143OH : 	2.50D-13*RO2*0.2 	;
+{13592.} 	 C1210OOH + OH = C116CHO + OH : 	4.63D-11 	;
+{13593.} 	 C1210OOH = C1210O + OH : 	J(41) 	;
+{13594.} 	 C1210NO3 + OH = C116CHO + NO2 : 	3.23D-11 	;
+{13595.} 	 C1210NO3 = C1210O + NO2 : 	J(53) 	;
+{13596.} 	 C1210O = C1214O2 : 	KDEC 	;
+{13597.} 	 C1210OH + OH = C116CHO + HO2 : 	3.72D-11 	;
+{13598.} 	 CH3SO3 + HO2 = MSA : 	5.00D-11 	;
+{13599.} 	 CH3SO3 = CH3O2 + SO3 : 	5.00D+13*EXP(-9946/TEMP) 	;
+{13600.} 	 CH3SO2O2 + HO2 = CH3SO2OOH : 	KAPHO2*0.41 	;
+{13601.} 	 CH3SO2O2 + HO2 = CH3SO3 + OH : 	KAPHO2*0.44 	;
+{13602.} 	 CH3SO2O2 + HO2 = MSA + O3 : 	KAPHO2*0.15 	;
+{13603.} 	 CH3SO2O2 + NO = CH3SO3 + NO2 : 	1.00D-11 	;
+{13604.} 	 CH3SO2O2 + NO2 = CH3SO4NO2 : 	1.20D-12*(TEMP/300)**-0.9 	;
+{13605.} 	 CH3SO2O2 + NO3 = CH3SO3 + NO2 : 	KRO2NO3*1.74 	;
+{13606.} 	 CH3SO2O2 = CH3SO2 : 	3.01D+10*EXP(-3560/TEMP) 	;
+{13607.} 	 CH3SO2O2 = CH3SO3 : 	1.00D-11*RO2*0.7 	;
+{13608.} 	 CH3SO2O2 = MSA : 	1.00D-11*RO2*0.3 	;
+{13609.} 	 CH3SOOOH + OH = CH3SOO2 : 	9.00D-11 	;
+{13610.} 	 CH3SOOOH = CH3SO2 + OH : 	J(41) 	;
+{13611.} 	 CH3SOO2NO2 + OH = MSIA + NO2 : 	1.00D-11 	;
+{13612.} 	 CH3SOO2NO2 = CH3SOO2 + NO2 : 	5.40D+16*EXP(-13112/TEMP) 	;
+{13613.} 	 C1H4C5CO2H + OH = C6COALCO2H + HO2 : 	3.77D-11 	;
+{13614.} 	 C1H4C5CO3H + OH = C6COALCO3H + HO2 : 	4.08D-11 	;
+{13615.} 	 C1H4C5CO3H = CHOC4OHO2 + OH : 	J(41)+J(15) 	;
+{13616.} 	 C1H4C5PAN + OH = C6COCHOPAN + HO2 : 	3.72D-11 	;
+{13617.} 	 C1H4C5PAN = C1H4C5CO3 + NO2 : 	KBPAN 	;
+{13618.} 	 CHOC4OHOOH + OH = CHOC4OHO2 : 	4.98D-11 	;
+{13619.} 	 CHOC4OHOOH = CHOC4OHO + OH : 	J(41)+J(15) 	;
+{13620.} 	 CHOC4OHO = CHOC4DOLO2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{13621.} 	 HOC4CHOOOH + OH = HOC4CHOO2 : 	4.58D-11 	;
+{13622.} 	 HOC4CHOOOH = HOC3H6CHO + HO2 + CO + OH : 	J(17) 	;
+{13623.} 	 HOC4CHOOOH = HOC4CHOO + OH : 	J(41) 	;
+{13624.} 	 HOC4CHOO = HOC3H6CHO + HO2 + CO : 	KDEC 	;
+{13625.} 	 C6145COOOH + OH = C6145COO2 : 	3.57D-11 	;
+{13626.} 	 C6145COOOH = C6145COO + OH : 	J(41)+J(15)+J(35) 	;
+{13627.} 	 C6145COO = C6TRONOHO2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{13628.} 	 OH + CO2C4CO2H = MEKAO2 : 	5.71D-12 	;
+{13629.} 	 CO2C4CO3H = MEKAO2 + OH : 	J(41)+J(22) 	;
+{13630.} 	 OH + CO2C4CO3H = CO2C4CO3 : 	9.17D-12 	;
+{13631.} 	 C5PAN2 = CO2C4CO3 + NO2 : 	KBPAN 	;
+{13632.} 	 OH + C5PAN2 = CO2C3CHO + CO + NO2 : 	1.90D-12 	;
+{13633.} 	 OH + HOBUT2CO2H = NBUTOLBO2 : 	1.11D-11 	;
+{13634.} 	 HOBUT2CO3H = NBUTOLBO2 + OH : 	J(41) 	;
+{13635.} 	 OH + HOBUT2CO3H = HOBUT2CO3 : 	1.46D-11 	;
+{13636.} 	 C5PAN5 = HOBUT2CO3 + NO2 : 	KBPAN 	;
+{13637.} 	 OH + C5PAN5 = MEKAOH + CO + NO2 : 	1.55D-11 	;
+{13638.} 	 CO3C5CO2H = DIEKBO2 + HO2 : 	J(22) 	;
+{13639.} 	 OH + CO3C5CO2H = DIEKBO2 : 	6.88D-12 	;
+{13640.} 	 CO3C5CO3H = DIEKBO2 + OH : 	J(41)+J(22) 	;
+{13641.} 	 OH + CO3C5CO3H = CO3C5CO3 : 	1.03D-11 	;
+{13642.} 	 C6PAN2 = CO3C5CO3 + NO2 : 	KBPAN 	;
+{13643.} 	 OH + C6PAN2 = CO3C4CHO + CO + NO2 : 	3.19D-12 	;
+{13644.} 	 C65OOH = C65O + OH : 	J(41) 	;
+{13645.} 	 C65OOH = CO24C5 + OH + HO2 + CO : 	J(17) 	;
+{13646.} 	 OH + C65OOH = C65O2 : 	2.77D-11 	;
+{13647.} 	 OH + CO2C54CO2H = CO2C54O2 : 	9.18D-12 	;
+{13648.} 	 CO2C54CO3H = CO2C54O2 + OH : 	J(41) 	;
+{13649.} 	 OH + CO2C54CO3H = CO2C54CO3 : 	1.26D-11 	;
+{13650.} 	 C6PAN5 = CO2C54CO3 + NO2 : 	KBPAN 	;
+{13651.} 	 OH + C6PAN5 = CO24C5 + CO + NO2 : 	3.24D-12 	;
+{13652.} 	 HO24C5O2 + HO2 = HO24C5OOH : 	KRO2HO2*0.706 	;
+{13653.} 	 HO24C5O2 + NO = HO24C5NO3 : 	KRO2NO*0.010 	;
+{13654.} 	 HO24C5O2 + NO = HO24C5O + NO2 : 	KRO2NO*0.990 	;
+{13655.} 	 HO24C5O2 + NO3 = HO24C5O + NO2 : 	KRO2NO3 	;
+{13656.} 	 HO24C5O2 = HO124C5 : 	2.00D-12*0.2*RO2 	;
+{13657.} 	 HO24C5O2 = HO24C4CHO : 	2.00D-12*0.2*RO2 	;
+{13658.} 	 HO24C5O2 = HO24C5O : 	2.00D-12*0.6*RO2 	;
+{13659.} 	 C23C54CHO = CH3CO3 + IBUDIALCO3 : 	J(35) 	;
+{13660.} 	 NO3 + C23C54CHO = C23C54CO3 + HNO3 : 	KNO3AL*8.5 	;
+{13661.} 	 OH + C23C54CHO = C23C54CO3 : 	6.75D-11 	;
+{13662.} 	 C55O2 + HO2 = C55OOH : 	KRO2HO2*0.706 	;
+{13663.} 	 C55O2 + NO = C55O + NO2 : 	KRO2NO 	;
+{13664.} 	 C55O2 + NO3 = C55O + NO2 : 	KRO2NO3 	;
+{13665.} 	 C55O2 = C55O : 	2.00D-12*RO2 	;
+{13666.} 	 C67CO3 + HO2 = C55O2 + OH : 	KAPHO2*0.44 	;
+{13667.} 	 C67CO3 + HO2 = C67CO3H : 	KAPHO2*0.56 	;
+{13668.} 	 C67CO3 + NO = C55O2 + NO2 : 	KAPNO 	;
+{13669.} 	 C67CO3 + NO2 = C6PAN9 : 	KFPAN 	;
+{13670.} 	 C67CO3 + NO3 = C55O2 + NO2 : 	KRO2NO3*1.74 	;
+{13671.} 	 C67CO3 = C55O2 : 	1.00D-11*RO2 	;
+{13672.} 	 CO24M3CHO = C41CO3 + HO2 + CO : 	J(34) 	;
+{13673.} 	 OH + CO24M3CHO = C41CO3 + CO : 	1.44D-11 	;
+{13674.} 	 OH + C51CO2H = MIPKBO2 : 	9.18D-12 	;
+{13675.} 	 C51CO3H = MIPKBO2 + OH : 	J(41)+J(22) 	;
+{13676.} 	 OH + C51CO3H = CO2M3C4CO3 : 	1.26D-11 	;
+{13677.} 	 C6PAN12 = CO2M3C4CO3 + NO2 : 	KBPAN 	;
+{13678.} 	 OH + C6PAN12 = CO2C43CHO + CO + NO2 : 	3.51D-12 	;
+{13679.} 	 C72OOH = C72O + OH : 	J(41)+J(22) 	;
+{13680.} 	 OH + C72OOH = HO2CO35C7 + OH : 	9.25D-11 	;
+{13681.} 	 C72NO3 = C72O + NO2 : 	J(54)+J(22) 	;
+{13682.} 	 OH + C72NO3 = HO2CO35C7 + NO2 : 	3.41D-12 	;
+{13683.} 	 C72O = CO3C4CHO + CH3CHO + HO2 : 	2.00D+14*EXP(-4714/TEMP) 	;
+{13684.} 	 C72OH = C72O + HO2 : 	J(22) 	;
+{13685.} 	 OH + C72OH = HO2CO35C7 + HO2 : 	4.35D-11 	;
+{13686.} 	 HO2CO35C7 = CO3C4CO3 + CH3CHO + HO2 : 	J(22)*2 	;
+{13687.} 	 OH + HO2CO35C7 = CO235C7 + HO2 : 	5.76D-12 	;
+{13688.} 	 CO25C73OOH = CH3CO3 + CO3C4CHO + OH : 	J(22)*2 	;
+{13689.} 	 CO25C73OOH = CO25C73O + OH : 	J(41) 	;
+{13690.} 	 OH + CO25C73OOH = CO235C7 + OH : 	5.53D-11 	;
+{13691.} 	 CO25C73O = CO3C4CHO + CH3CO3 : 	KDEC 	;
+{13692.} 	 CO235C7 = CH3CO3 + CO3C4CO3 : 	J(35) 	;
+{13693.} 	 OH + CO235C7 = C73O2 : 	1.86D-12 	;
+{13694.} 	 CO25C73OH = CH3CO3 + CO3C4CHO + HO2 : 	J(22)*2 	;
+{13695.} 	 OH + CO25C73OH = CO235C7 + HO2 : 	2.41D-11 	;
+{13696.} 	 CO25C74OOH = C2H5CO3 + CO2C3CHO + OH : 	J(22)*2 	;
+{13697.} 	 CO25C74OOH = CO25C74O + OH : 	J(41) 	;
+{13698.} 	 OH + CO25C74OOH = CO245C7 + OH : 	5.53D-11 	;
+{13699.} 	 CO25C74O = CO2C3CHO + C2H5CO3 : 	KDEC 	;
+{13700.} 	 CO245C7 = C2H5CO3 + CO2C3CO3 : 	J(35) 	;
+{13701.} 	 OH + CO245C7 = C74O2 : 	1.86D-12 	;
+{13702.} 	 CO25C74OH = C2H5CO3 + CO2C3CHO + HO2 : 	J(22)*2 	;
+{13703.} 	 OH + CO25C74OH = CO245C7 + HO2 : 	2.41D-11 	;
+{13704.} 	 H3M2C4CO3 + HO2 = H3M2C4CO3H : 	KAPHO2*0.56 	;
+{13705.} 	 H3M2C4CO3 + HO2 = ME3BU2OLO2 + OH : 	KAPHO2*0.44 	;
+{13706.} 	 H3M2C4CO3 + NO = ME3BU2OLO2 + NO2 : 	KAPNO 	;
+{13707.} 	 H3M2C4CO3 + NO2 = C6PAN20 : 	KFPAN 	;
+{13708.} 	 H3M2C4CO3 + NO3 = ME3BU2OLO2 + NO2 : 	KRO2NO3*1.74 	;
+{13709.} 	 H3M2C4CO3 = ME3BU2OLO2 : 	1.00D-11*RO2 	;
+{13710.} 	 C79O2 + HO2 = C79OOH : 	KRO2HO2*0.820 	;
+{13711.} 	 C79O2 + NO = C79O + NO2 : 	KRO2NO 	;
+{13712.} 	 C79O2 + NO3 = C79O + NO2 : 	KRO2NO3 	;
+{13713.} 	 C79O2 = C79O : 	2.00D-12*RO2 	;
+{13714.} 	 C712OOH = C712O + OH : 	J(41) 	;
+{13715.} 	 C712OOH = CH3COCH2O2 + HO2CO4C5 + OH : 	J(22) 	;
+{13716.} 	 OH + C712OOH = C712O2 : 	1.25D-11 	;
+{13717.} 	 C712NO3 = C712O + NO2 : 	J(22) 	;
+{13718.} 	 OH + C712NO3 = BUT2OLO + MGLYOX + NO2 : 	1.93D-12 	;
+{13719.} 	 C712O = CH3CHO + CO24C5 + HO2 : 	KDEC 	;
+{13720.} 	 C712OH = CH3COCH2O2 + HO2CO4C5 + HO2 : 	J(22) 	;
+{13721.} 	 OH + C712OH = C712O : 	9.07D-12 	;
+{13722.} 	 C713OOH = C713O + OH : 	J(41) 	;
+{13723.} 	 C713OOH = CH3CO3 + CO24C5 + OH : 	J(22)*2 	;
+{13724.} 	 OH + C713OOH = C713O2 : 	7.07D-12 	;
+{13725.} 	 C713O = CH3CO3 + CO24C5 : 	KDEC 	;
+{13726.} 	 C713OH = CH3CO3 + CO24C5 + HO2 : 	J(22)*2 	;
+{13727.} 	 OH + C713OH = C713O : 	3.61D-12 	;
+{13728.} 	 C714OOH = C714O + OH : 	J(41) 	;
+{13729.} 	 C714OOH = CH3CO3 + CO2C43CHO + OH : 	J(22)*2 	;
+{13730.} 	 OH + C714OOH = C714O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13731.} 	 OH + C714OOH = M3CO245C6 + OH : 	5.41D-11 	;
+{13732.} 	 C714O = CH3CO3 + CO2C43CHO : 	KDEC 	;
+{13733.} 	 C714OH = CH3CO3 + CO2C43CHO + HO2 : 	J(22)*2 	;
+{13734.} 	 OH + C714OH = M3CO245C6 + HO2 : 	2.64D-11 	;
+{13735.} 	 M3CO245C6 = CH3CO3 + C41CO3 : 	J(35) 	;
+{13736.} 	 M3CO245C6 = CH3CO3 + CO23C54O2 : 	J(22) 	;
+{13737.} 	 OH + M3CO245C6 = C715O2 : 	1.83D-12 	;
+{13738.} 	 H3M3C4CO3 + HO2 = H3M3C4CO3H : 	KAPHO2*0.56 	;
+{13739.} 	 H3M3C4CO3 + HO2 = PROL11MO2 + OH : 	KAPHO2*0.44 	;
+{13740.} 	 H3M3C4CO3 + NO = PROL11MO2 + NO2 : 	KAPNO 	;
+{13741.} 	 H3M3C4CO3 + NO2 = C6PAN21 : 	KFPAN 	;
+{13742.} 	 H3M3C4CO3 + NO3 = PROL11MO2 + NO2 : 	KRO2NO3*1.74 	;
+{13743.} 	 H3M3C4CO3 = PROL11MO2 : 	1.00D-11*RO2 	;
+{13744.} 	 H13M3C5O2 + HO2 = H13M3C5OOH : 	KRO2HO2*0.706 	;
+{13745.} 	 H13M3C5O2 + NO = H13M3C5NO3 : 	KRO2NO*0.026 	;
+{13746.} 	 H13M3C5O2 + NO = H13M3C5O + NO2 : 	KRO2NO*0.974 	;
+{13747.} 	 H13M3C5O2 + NO3 = H13M3C5O + NO2 : 	KRO2NO3 	;
+{13748.} 	 H13M3C5O2 = H134M3C5 : 	8.80D-13*0.2*RO2 	;
+{13749.} 	 H13M3C5O2 = H13M3C5O : 	8.80D-13*0.6*RO2 	;
+{13750.} 	 H13M3C5O2 = H13M3CO4C5 : 	8.80D-13*0.2*RO2 	;
+{13751.} 	 CO346C8 = C2H5CO3 + CO3C4CO3 : 	J(35)+J(22) 	;
+{13752.} 	 OH + CO346C8 = C83O2 : 	2.99D-12 	;
+{13753.} 	 C84OOH = C2H5CO3 + CO3C4CHO + OH : 	J(22)*2 	;
+{13754.} 	 C84OOH = C84O + OH : 	J(41) 	;
+{13755.} 	 OH + C84OOH = CO346C8 + OH : 	5.65D-11 	;
+{13756.} 	 C84O = CO3C4CHO + C2H5CO3 : 	KDEC 	;
+{13757.} 	 C84OH = C2H5CO3 + CO3C4CHO + HO2 : 	J(22)*2 	;
+{13758.} 	 OH + C84OH = CO346C8 + HO2 : 	2.52D-11 	;
+{13759.} 	 HO4C5CO3 + HO2 = HO4C5CO3H : 	KAPHO2*0.56 	;
+{13760.} 	 HO4C5CO3 + HO2 = PE1ENEBO2 + OH : 	KAPHO2*0.44 	;
+{13761.} 	 HO4C5CO3 + NO = PE1ENEBO2 + NO2 : 	KAPNO 	;
+{13762.} 	 HO4C5CO3 + NO2 = C6PAN22 : 	KFPAN 	;
+{13763.} 	 HO4C5CO3 + NO3 = PE1ENEBO2 + NO2 : 	KRO2NO3*1.74 	;
+{13764.} 	 HO4C5CO3 = PE1ENEBO2 : 	1.00D-11*RO2 	;
+{13765.} 	 CO356C9 = C3H7CO3 + CO3C4CO3 : 	J(35)+J(22) 	;
+{13766.} 	 OH + CO356C9 = C95O2 : 	6.43D-12 	;
+{13767.} 	 C94OOH = C3H7CO3 + CO3C4CHO + OH : 	J(22)*2 	;
+{13768.} 	 C94OOH = C94O + OH : 	J(41) 	;
+{13769.} 	 OH + C94OOH = CO356C9 + OH : 	5.40D-11 	;
+{13770.} 	 C94O = CO3C4CHO + C3H7CO3 : 	KDEC 	;
+{13771.} 	 C94OH = C3H7CO3 + CO3C4CHO + HO2 : 	J(22)*2 	;
+{13772.} 	 OH + C94OH = CO356C9 + HO2 : 	2.28D-11 	;
+{13773.} 	 HO5C6CO3 + HO2 = HO5C6CO3H : 	KAPHO2*0.56 	;
+{13774.} 	 HO5C6CO3 + HO2 = HO5C6O2 + OH : 	KAPHO2*0.44 	;
+{13775.} 	 HO5C6CO3 + NO = HO5C6O2 + NO2 : 	KAPNO 	;
+{13776.} 	 HO5C6CO3 + NO2 = C7PAN2 : 	KFPAN 	;
+{13777.} 	 HO5C6CO3 + NO3 = HO5C6O2 + NO2 : 	KRO2NO3*1.74 	;
+{13778.} 	 HO5C6CO3 = HO5C6O2 : 	1.00D-11*RO2 	;
+{13779.} 	 CO356C10 = C4H9CO3 + CO3C4CO3 : 	J(35)+J(22) 	;
+{13780.} 	 OH + CO356C10 = C105O2 : 	7.84D-12 	;
+{13781.} 	 C104OOH = C104O + OH : 	J(41) 	;
+{13782.} 	 C104OOH = C4H9CO3 + CO3C4CHO + OH : 	J(22)*2 	;
+{13783.} 	 OH + C104OOH = CO356C10 + OH : 	5.54D-11 	;
+{13784.} 	 C104O = CO3C4CHO + C4H9CO3 : 	KDEC 	;
+{13785.} 	 C104OH = C4H9CO3 + CO3C4CHO + HO2 : 	J(22)*2 	;
+{13786.} 	 OH + C104OH = CO356C10 + HO2 : 	2.42D-11 	;
+{13787.} 	 HO6C7CO3 + HO2 = HO6C7CO3H : 	KAPHO2*0.56 	;
+{13788.} 	 HO6C7CO3 + HO2 = HO6C7O2 + OH : 	KAPHO2*0.44 	;
+{13789.} 	 HO6C7CO3 + NO = HO6C7O2 + NO2 : 	KAPNO 	;
+{13790.} 	 HO6C7CO3 + NO2 = C8PAN1 : 	KFPAN 	;
+{13791.} 	 HO6C7CO3 + NO3 = HO6C7O2 + NO2 : 	KRO2NO3*1.74 	;
+{13792.} 	 HO6C7CO3 = HO6C7O2 : 	1.00D-11*RO2 	;
+{13793.} 	 C6H13CHO = HO2 + CO + HEXAO2 : 	J(15) 	;
+{13794.} 	 NO3 + C6H13CHO = C6H13CO3 + HNO3 : 	KNO3AL*5.5 	;
+{13795.} 	 OH + C6H13CHO = C6H13CO3 : 	3.05D-11 	;
+{13796.} 	 CO356C11 = C5H11CO3 + CO3C4CO3 : 	J(35)+J(22) 	;
+{13797.} 	 OH + CO356C11 = C115O2 : 	9.25D-12 	;
+{13798.} 	 C114OOH = C114O + OH : 	J(41) 	;
+{13799.} 	 C114OOH = C5H11CO3 + CO3C4CHO + OH : 	J(22)*2 	;
+{13800.} 	 OH + C114OOH = CO356C11 + OH : 	5.68D-11 	;
+{13801.} 	 C114O = CO3C4CHO + C5H11CO3 : 	KDEC 	;
+{13802.} 	 C114OH = C5H11CO3 + CO3C4CHO + HO2 : 	J(22)*2 	;
+{13803.} 	 OH + C114OH = CO356C11 + HO2 : 	2.56D-11 	;
+{13804.} 	 HO7C8CO3 + HO2 = HO7C8CO3H : 	KAPHO2*0.56 	;
+{13805.} 	 HO7C8CO3 + HO2 = HO7C8O2 + OH : 	KAPHO2*0.44 	;
+{13806.} 	 HO7C8CO3 + NO = HO7C8O2 + NO2 : 	KAPNO 	;
+{13807.} 	 HO7C8CO3 + NO2 = C9PAN1 : 	KFPAN 	;
+{13808.} 	 HO7C8CO3 + NO3 = HO7C8O2 + NO2 : 	KRO2NO3*1.74 	;
+{13809.} 	 HO7C8CO3 = HO7C8O2 : 	1.00D-11*RO2 	;
+{13810.} 	 CO356C12 = C6H13CO3 + CO3C4CO3 : 	J(35)+J(22) 	;
+{13811.} 	 OH + CO356C12 = C125O2 : 	1.07D-11 	;
+{13812.} 	 OH + C6H13CO2H = HEXAO2 : 	9.89D-12 	;
+{13813.} 	 C6H13CO3H = HEXAO2 + OH : 	J(41) 	;
+{13814.} 	 OH + C6H13CO3H = C6H13CO3 : 	1.33D-11 	;
+{13815.} 	 OH + PHPTN = C5H11CHO + CO + NO2 : 	6.16D-12 	;
+{13816.} 	 PHPTN = C6H13CO3 + NO2 : 	KBPAN 	;
+{13817.} 	 C124OOH = C124O + OH : 	J(41) 	;
+{13818.} 	 C124OOH = C6H13CO3 + CO3C4CHO + OH : 	J(22)*2 	;
+{13819.} 	 OH + C124OOH = CO356C12 + OH : 	5.82D-11 	;
+{13820.} 	 C124O = CO3C4CHO + C6H13CO3 : 	KDEC 	;
+{13821.} 	 C124OH = C6H13CO3 + CO3C4CHO + HO2 : 	J(22)*2 	;
+{13822.} 	 OH + C124OH = CO356C12 + HO2 : 	2.70D-11 	;
+{13823.} 	 HO8C9CO3 + HO2 = HO8C9CO3H : 	KAPHO2*0.56 	;
+{13824.} 	 HO8C9CO3 + HO2 = HO8C9O2 + OH : 	KAPHO2*0.44 	;
+{13825.} 	 HO8C9CO3 + NO = HO8C9O2 + NO2 : 	KAPNO 	;
+{13826.} 	 HO8C9CO3 + NO2 = C10PAN1 : 	KFPAN 	;
+{13827.} 	 HO8C9CO3 + NO3 = HO8C9O2 + NO2 : 	KRO2NO3*1.74 	;
+{13828.} 	 HO8C9CO3 = HO8C9O2 : 	1.00D-11*RO2 	;
+{13829.} 	 MALANHYOOH + OH = MALNHYOHCO + OH : 	4.66D-11 	;
+{13830.} 	 MALANHYOOH = MALANHYO + OH : 	J(41) 	;
+{13831.} 	 MALANHYO = HCOCOHCO3 : 	KDEC 	;
+{13832.} 	 MALANHY2OH + OH = MALNHYOHCO + HO2 : 	2.55D-11 	;
+{13833.} 	 MALNHYOHCO + OH = CO + CO + CO + HO2 : 	5.68D-12 	;
+{13834.} 	 NDNPHENOOH + OH = NDNPHENO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13835.} 	 NDNPHENOOH = NDNPHENO + OH : 	J(41) 	;
+{13836.} 	 NDNPHENO = NC4DCO2H + HNO3 + CO + CO + NO2 : 	KDEC 	;
+{13837.} 	 DNPHENOOH + OH = DNPHENO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13838.} 	 DNPHENOOH = DNPHENO + OH : 	J(41) 	;
+{13839.} 	 DNPHENO = NC4DCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{13840.} 	 NC4DCO2H + OH = NC4DCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13841.} 	 C6CO4DB + OH = CO + CO + HO2 + CO + C33CO : 	7.70D-11 	;
+{13842.} 	 C6CO4DB = C4CO2DBCO3 + HO2 + CO : 	J(34)*2 	;
+{13843.} 	 C5CO2OHCO3 + HO2 = C5COOHCO3H : 	KAPHO2*0.56 	;
+{13844.} 	 C5CO2OHCO3 + HO2 = HOCOC4DIAL + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{13845.} 	 C5CO2OHCO3 + NO = HOCOC4DIAL + HO2 + CO + NO2 : 	KAPNO 	;
+{13846.} 	 C5CO2OHCO3 + NO2 = C5CO2OHPAN : 	KFPAN 	;
+{13847.} 	 C5CO2OHCO3 + NO3 = HOCOC4DIAL + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{13848.} 	 C5CO2OHCO3 = HOCOC4DIAL + HO2 + CO : 	1.00D-11*RO2 	;
+{13849.} 	 C7CO4DB + OH = CO + CO + CH3CO3 + C33CO : 	9.58D-11 	;
+{13850.} 	 C7CO4DB = C5CO2DBCO3 + HO2 + CO : 	J(34)*2 	;
+{13851.} 	 C6CO2OHCO3 + HO2 = C5134CO2OH + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{13852.} 	 C6CO2OHCO3 + HO2 = C6COOHCO3H : 	KAPHO2*0.56 	;
+{13853.} 	 C6CO2OHCO3 + NO = C5134CO2OH + HO2 + CO + NO2 : 	KAPNO 	;
+{13854.} 	 C6CO2OHCO3 + NO2 = C6CO2OHPAN : 	KFPAN 	;
+{13855.} 	 C6CO2OHCO3 + NO3 = C5134CO2OH + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{13856.} 	 C6CO2OHCO3 = C5134CO2OH + HO2 + CO : 	1.00D-11*RO2 	;
+{13857.} 	 NDNCRESOOH + OH = NDNCRESO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13858.} 	 NDNCRESOOH = NDNCRESO + OH : 	J(41) 	;
+{13859.} 	 NDNCRESO = NC4MDCO2H + HNO3 + CO + CO + NO2 : 	KDEC 	;
+{13860.} 	 DNCRESOOH + OH = DNCRESO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13861.} 	 DNCRESOOH = DNCRESO + OH : 	J(41) 	;
+{13862.} 	 DNCRESO = NC4MDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{13863.} 	 NC4MDCO2H + OH = NC4MDCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13864.} 	 CH3COCO3 + HO2 = CH3CO3 + OH : 	KAPHO2*0.44 	;
+{13865.} 	 CH3COCO3 + HO2 = CH3COCO3H : 	KAPHO2*0.56 	;
+{13866.} 	 CH3COCO3 + NO = CH3CO3 + NO2 : 	KAPNO 	;
+{13867.} 	 CH3COCO3 + NO2 = CH3COPAN : 	KFPAN 	;
+{13868.} 	 CH3COCO3 + NO3 = CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{13869.} 	 CH3COCO3 = CH3CO3 : 	1.00D-11*RO2 	;
+{13870.} 	 C6O4KETOOH + OH = C6O4KETO2 : 	1.72D-11 	;
+{13871.} 	 C6O4KETOOH = OH + C6O4KETO : 	J(41) 	;
+{13872.} 	 C6O4KETO = HCHO + CO + CO + CH3CO3 : 	KDEC 	;
+{13873.} 	 NDNOXYLOOH + OH = NDNOXYOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13874.} 	 NDNOXYLOOH = NDNOXYOLO + OH : 	J(41) 	;
+{13875.} 	 NDNOXYOLO = NC4MDCO2H + CH3COCO2H + NO2 + HNO3 : 	KDEC 	;
+{13876.} 	 DNOXYOLOOH + OH = DNOXYOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13877.} 	 DNOXYOLOOH = DNOXYOLO + OH : 	J(41) 	;
+{13878.} 	 DNOXYOLO = NC4MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{13879.} 	 C6CO4M2DB + OH = CO23C3CHO + CO + CO + CH3CO3 : 	1.15D-10 	;
+{13880.} 	 C6CO4M2DB = C4DBM2CO3 + HO2 + CO : 	J(34)*2 	;
+{13881.} 	 C5M2OHOCO3 + HO2 = C5134CO2OH + CH3CO3 + OH : 	KAPHO2*0.44 	;
+{13882.} 	 C5M2OHOCO3 + HO2 = C5M2OHCO3H : 	KAPHO2*0.56 	;
+{13883.} 	 C5M2OHOCO3 + NO = C5134CO2OH + CH3CO3 + NO2 : 	KAPNO 	;
+{13884.} 	 C5M2OHOCO3 + NO2 = C5M2OHOPAN : 	KFPAN 	;
+{13885.} 	 C5M2OHOCO3 + NO3 = C5134CO2OH + CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{13886.} 	 C5M2OHOCO3 = C5134CO2OH + CH3CO3 : 	1.00D-11*RO2 	;
+{13887.} 	 C4COMOHCO3 + HO2 = C5CO234 + HO2 + OH : 	KAPHO2*0.44 	;
+{13888.} 	 C4COMOHCO3 + HO2 = C5COHOCO3H : 	KAPHO2*0.56 	;
+{13889.} 	 C4COMOHCO3 + NO = C5CO234 + NO2 + HO2 : 	KAPNO 	;
+{13890.} 	 C4COMOHCO3 + NO2 = C4COMOHPAN : 	KFPAN 	;
+{13891.} 	 C4COMOHCO3 + NO3 = C5CO234 + NO2 + HO2 : 	KRO2NO3*1.74 	;
+{13892.} 	 C4COMOHCO3 = C5CO234 + HO2 : 	1.00D-11*RO2 	;
+{13893.} 	 C23O3MCO3 + HO2 = C23O3MCO2H + O3 : 	KAPHO2*0.15 	;
+{13894.} 	 C23O3MCO3 + HO2 = C23O3MCO3H : 	KAPHO2*0.41 	;
+{13895.} 	 C23O3MCO3 + HO2 = C23O3MO2 + OH : 	KAPHO2*0.44 	;
+{13896.} 	 C23O3MCO3 + NO = C23O3MO2 + NO2 : 	KAPNO 	;
+{13897.} 	 C23O3MCO3 + NO2 = C23O3MCPAN : 	KFPAN 	;
+{13898.} 	 C23O3MCO3 + NO3 = C23O3MO2 + NO2 : 	KRO2NO3*1.74 	;
+{13899.} 	 C23O3MCO3 = C23O3MCO2H : 	1.00D-11*RO2*0.3 	;
+{13900.} 	 C23O3MCO3 = C23O3MO2 : 	1.00D-11*RO2*0.7 	;
+{13901.} 	 C23O3CCO3 + HO2 = C23O3CCO2H + O3 : 	KAPHO2*0.15 	;
+{13902.} 	 C23O3CCO3 + HO2 = C23O3CCO3H : 	KAPHO2*0.41 	;
+{13903.} 	 C23O3CCO3 + HO2 = MCOCOMOXO2 + OH : 	KAPHO2*0.44 	;
+{13904.} 	 C23O3CCO3 + NO = MCOCOMOXO2 + NO2 : 	KAPNO 	;
+{13905.} 	 C23O3CCO3 + NO2 = C23O3CPAN : 	KFPAN 	;
+{13906.} 	 C23O3CCO3 + NO3 = MCOCOMOXO2 + NO2 : 	KRO2NO3*1.74 	;
+{13907.} 	 C23O3CCO3 = C23O3CCO2H : 	1.00D-11*RO2*0.3 	;
+{13908.} 	 C23O3CCO3 = MCOCOMOXO2 : 	1.00D-11*RO2*0.7 	;
+{13909.} 	 MMALNHYOOH + OH = MMALANHYO2 : 	1.69D-11 	;
+{13910.} 	 MMALNHYOOH = MMALANHYO + OH : 	J(41) 	;
+{13911.} 	 MMALANHYO = CO2H3CO3 : 	KDEC 	;
+{13912.} 	 MMALNHY2OH + OH = MMALANHYO : 	1.34D-11 	;
+{13913.} 	 NDNMXYLOOH + OH = NDNMXYOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13914.} 	 NDNMXYLOOH = NDNMXYOLO + OH : 	J(41) 	;
+{13915.} 	 NDNMXYOLO = NC4MDCO2H + CH3COCO2H + NO2 + HNO3 : 	KDEC 	;
+{13916.} 	 DNMXYOLOOH + OH = DNMXYOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13917.} 	 DNMXYOLOOH = DNMXYOLO + OH : 	J(41) 	;
+{13918.} 	 DNMXYOLO = NC4MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{13919.} 	 C8CO4DB + OH = C5CO234 + CO + CO + HO2 + CO : 	7.04D-11 	;
+{13920.} 	 C8CO4DB = C5CO2DBCO3 + CH3CO3 : 	J(34)+J(35) 	;
+{13921.} 	 C7CO2OHCO3 + HO2 = C5CO3OH + CH3CO3 + OH : 	KAPHO2*0.44 	;
+{13922.} 	 C7CO2OHCO3 + HO2 = C7CO2OCO3H : 	KAPHO2*0.56 	;
+{13923.} 	 C7CO2OHCO3 + NO = C5CO3OH + CH3CO3 + NO2 : 	KAPNO 	;
+{13924.} 	 C7CO2OHCO3 + NO2 = C7CO2OHPAN : 	KFPAN 	;
+{13925.} 	 C7CO2OHCO3 + NO3 = C5CO3OH + CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{13926.} 	 C7CO2OHCO3 = C5CO3OH + CH3CO3 : 	1.00D-11*RO2 	;
+{13927.} 	 TL4ONO2OOH + OH = TL4OHNO2O2 : 	1.52D-10 	;
+{13928.} 	 TL4ONO2OOH = TL4OHNO2O + OH : 	J(41) 	;
+{13929.} 	 TL4OHNO2O = CO2H3CHO + HO2 + CO + NO2 + CO : 	KDEC 	;
+{13930.} 	 NDNPXYLOOH + OH = NDNPXYOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13931.} 	 NDNPXYLOOH = NDNPXYOLO + OH : 	J(41) 	;
+{13932.} 	 NDNPXYOLO = NC4MDCO2H + CH3COCO2H + NO2 + HNO3 : 	KDEC 	;
+{13933.} 	 DNPXYOLOOH + OH = DNPXYOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13934.} 	 DNPXYOLOOH = DNPXYOLO + OH : 	J(41) 	;
+{13935.} 	 DNPXYOLO = NC4MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{13936.} 	 CO4DBC8 + OH = CO23C3CHO + CO + CO + CH3CO3 : 	8.35D-11 	;
+{13937.} 	 CO4DBC8 = C5DBCO2CO3 + CH3CO3 : 	J(34)+J(35) 	;
+{13938.} 	 C6MOHCOCO3 + HO2 = C6MOCOCO3H : 	KAPHO2*0.56 	;
+{13939.} 	 C6MOHCOCO3 + HO2 = DMKCOOH + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{13940.} 	 C6MOHCOCO3 + NO = DMKCOOH + HO2 + CO + NO2 : 	KAPNO 	;
+{13941.} 	 C6MOHCOCO3 + NO2 = C6MOHCOPAN : 	KFPAN 	;
+{13942.} 	 C6MOHCOCO3 + NO3 = DMKCOOH + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{13943.} 	 C6MOHCOCO3 = DMKCOOH + HO2 + CO : 	1.0D-11*RO2 	;
+{13944.} 	 NDNEBZLOOH + OH = NDNEBNZLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13945.} 	 NDNEBZLOOH = NDNEBNZLO + OH : 	J(41) 	;
+{13946.} 	 NDNEBNZLO = NC4EDCO2H + HNO3 + CO + CO + NO2 : 	KDEC 	;
+{13947.} 	 DNEBNZLOOH + OH = DNEBNZLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13948.} 	 DNEBNZLOOH = DNEBNZLO + OH : 	J(41) 	;
+{13949.} 	 DNEBNZLO = NC4EDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{13950.} 	 C6ETCO4DB + OH = CO + CO + C2H5CO3 + C33CO : 	9.76D-11 	;
+{13951.} 	 C6ETCO4DB = C7CO2DBCO3 + HO2 + CO : 	J(34)*2 	;
+{13952.} 	 C7OHCO2CO3 + HO2 = C6134CO2OH + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{13953.} 	 C7OHCO2CO3 + HO2 = C7OHO2CO3H : 	KAPHO2*0.56 	;
+{13954.} 	 C7OHCO2CO3 + NO = C6134CO2OH + HO2 + CO + NO2 : 	KAPNO 	;
+{13955.} 	 C7OHCO2CO3 + NO2 = C7OHCO2PAN : 	KFPAN 	;
+{13956.} 	 C7OHCO2CO3 + NO3 = C6134CO2OH + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{13957.} 	 C7OHCO2CO3 = C6134CO2OH + HO2 + CO : 	1.00D-11*RO2 	;
+{13958.} 	 NC4EDCO2H + OH = NC4EDCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13959.} 	 ECO3CO3 + HO2 = C2H5CO3 + CO + CO + OH : 	KAPHO2*0.44 	;
+{13960.} 	 ECO3CO3 + HO2 = ECO3CO3H : 	KAPHO2*0.56 	;
+{13961.} 	 ECO3CO3 + NO = C2H5CO3 + CO + CO + NO2 : 	KAPNO 	;
+{13962.} 	 ECO3CO3 + NO2 = ECO3PAN : 	KFPAN 	;
+{13963.} 	 ECO3CO3 + NO3 = C2H5CO3 + CO + CO + NO2 : 	KRO2NO3*1.74 	;
+{13964.} 	 ECO3CO3 = C2H5CO3 + CO + CO : 	1.00D-11*RO2 	;
+{13965.} 	 NDNPBZLOOH + OH = NDNPBNZLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13966.} 	 NDNPBZLOOH = NDNPBNZLO + OH : 	J(41) 	;
+{13967.} 	 NDNPBNZLO = NC4PDCO2H + HNO3 + CO + CO + NO2 : 	KDEC 	;
+{13968.} 	 DNPBNZLOOH + OH = DNPBNZLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13969.} 	 DNPBNZLOOH = DNPBNZLO + OH : 	J(41) 	;
+{13970.} 	 DNPBNZLO = NC4PDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{13971.} 	 C6PRCO4DB + OH = CO + CO + C3H7CO3 + C33CO : 	9.92D-11 	;
+{13972.} 	 C6PRCO4DB = C8CO2DBCO3 + HO2 + CO : 	J(34)*2 	;
+{13973.} 	 C8OHCO2CO3 + HO2 = C61CHO + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{13974.} 	 C8OHCO2CO3 + HO2 = C8OHO2CO3H : 	KAPHO2*0.56 	;
+{13975.} 	 C8OHCO2CO3 + NO = C61CHO + HO2 + CO + NO2 : 	KAPNO 	;
+{13976.} 	 C8OHCO2CO3 + NO2 = C8OHCO2PAN : 	KFPAN 	;
+{13977.} 	 C8OHCO2CO3 + NO3 = C61CHO + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{13978.} 	 C8OHCO2CO3 = C61CHO + HO2 + CO : 	1.00D-11*RO2 	;
+{13979.} 	 NC4PDCO2H + OH = NC4PDCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13980.} 	 C61CO3H + OH = C61CO3 : 	1.18D-11 	;
+{13981.} 	 C61CO3H = CO45C5CHO + HO2 + OH : 	J(41)+J(35)+J(22) 	;
+{13982.} 	 C61CPAN + OH = CO45C5CHO + CO + NO2 : 	8.21D-12 	;
+{13983.} 	 C61CPAN = C61CO3 + NO2 : 	KBPAN 	;
+{13984.} 	 NDNIPBLOOH + OH = NDNIPBZLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13985.} 	 NDNIPBLOOH = NDNIPBZLO + OH : 	J(41) 	;
+{13986.} 	 NDNIPBZLO = NC4IPDCO2H + HNO3 + CO + CO + NO2 : 	KDEC 	;
+{13987.} 	 DNIPBZLOOH + OH = DNIPBNZLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13988.} 	 DNIPBZLOOH = DNIPBNZLO + OH : 	J(41) 	;
+{13989.} 	 DNIPBNZLO = NC4IPDCO2H + HCOCO2H + NO2 : 	KDEC 	;
+{13990.} 	 C6IPRCO4DB + OH = CO + CO + IPRCO3 + C33CO : 	9.97D-11 	;
+{13991.} 	 C6IPRCO4DB = C8DBCO2CO3 + HO2 + CO : 	J(34)*2 	;
+{13992.} 	 C8CO2OHCO3 + HO2 = C62CHO + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{13993.} 	 C8CO2OHCO3 + HO2 = C8O2OHCO3H : 	KAPHO2*0.56 	;
+{13994.} 	 C8CO2OHCO3 + NO = C62CHO + HO2 + CO + NO2 : 	KAPNO 	;
+{13995.} 	 C8CO2OHCO3 + NO2 = C8CO2OHPAN : 	KFPAN 	;
+{13996.} 	 C8CO2OHCO3 + NO3 = C62CHO + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{13997.} 	 C8CO2OHCO3 = C62CHO + HO2 + CO : 	1.00D-11*RO2 	;
+{13998.} 	 NC4IPDCO2H + OH = NC4IPDCO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{13999.} 	 C62CO3H + OH = C62CO3 : 	9.80D-12 	;
+{14000.} 	 C62CO3H = C45IC5CHO + HO2 + OH : 	J(41)+J(35)+J(22) 	;
+{14001.} 	 C62CPAN + OH = C45IC5CHO + CO + NO2 : 	6.21D-12 	;
+{14002.} 	 C62CPAN = C62CO3 + NO2 : 	KBPAN 	;
+{14003.} 	 NDMMALYO2 + HO2 = NDMMALYOOH : 	KRO2HO2*0.770 	;
+{14004.} 	 NDMMALYO2 + NO = NDMMALYO + NO2 : 	KRO2NO 	;
+{14005.} 	 NDMMALYO2 + NO3 = NDMMALYO + NO2 : 	KRO2NO3 	;
+{14006.} 	 NDMMALYO2 = NDMMALYO : 	9.20D-14*RO2 	;
+{14007.} 	 DMMALYO2 + HO2 = DMMALYOOH : 	KRO2HO2*0.770 	;
+{14008.} 	 DMMALYO2 + NO = DMMALYO + NO2 : 	KRO2NO 	;
+{14009.} 	 DMMALYO2 + NO3 = DMMALYO + NO2 : 	KRO2NO3 	;
+{14010.} 	 DMMALYO2 = DMMALYO : 	9.20D-14*RO2*0.70 	;
+{14011.} 	 DMMALYO2 = DMMALYOH : 	9.20D-14*RO2*0.30 	;
+{14012.} 	 NDNT123OOH + OH = NDNT123LO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14013.} 	 NDNT123OOH = NDNT123LO + OH : 	J(41) 	;
+{14014.} 	 NDNT123LO = NC5MDCO2H + CH3COCO2H + NO2 + HNO3 : 	KDEC 	;
+{14015.} 	 DNT123LOOH + OH = DNT123LO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14016.} 	 DNT123LOOH = DNT123LO + OH : 	J(41) 	;
+{14017.} 	 DNT123LO = NC5MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{14018.} 	 NC5MDCO2H + OH = CO + NO2 + BIACET : 	1.90D-12*EXP(190/TEMP) 	;
+{14019.} 	 TM124NOOH + OH = TM124NO2O2 : 	1.50D-10 	;
+{14020.} 	 TM124NOOH = TM124NO2O + OH : 	J(41) 	;
+{14021.} 	 TM124NO2O = C5DBCOCO2H + CO + HO2 + CO + NO2 : 	KDEC 	;
+{14022.} 	 NDNT124OOH + OH = NDNT124LO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14023.} 	 NDNT124OOH = NDNT124LO + OH : 	J(41) 	;
+{14024.} 	 NDNT124LO = NC5MDCO2H + CH3COCO2H + NO2 + HNO3 : 	KDEC 	;
+{14025.} 	 DNT124LOOH + OH = DNT124LO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14026.} 	 DNT124LOOH = DNT124LO + OH : 	J(41) 	;
+{14027.} 	 DNT124LO = NC5MDCO2H + CH3COCO2H + NO2 : 	KDEC 	;
+{14028.} 	 CO4DBC9 + OH = C5CO234 + CH3CO3 + CO + CO : 	1.03D-10 	;
+{14029.} 	 CO4DBC9 = C4DBM2CO3 + CH3CO3 : 	J(34)+J(35) 	;
+{14030.} 	 C7MOHCOCO3 + HO2 = C7MOCOCO3H : 	KAPHO2*0.56 	;
+{14031.} 	 C7MOHCOCO3 + HO2 = DMKCOOH + CH3CO3 + OH : 	KAPHO2*0.44 	;
+{14032.} 	 C7MOHCOCO3 + NO = DMKCOOH + CH3CO3 + NO2 : 	KAPNO 	;
+{14033.} 	 C7MOHCOCO3 + NO2 = C7MOHCOPAN : 	KFPAN 	;
+{14034.} 	 C7MOHCOCO3 + NO3 = DMKCOOH + CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{14035.} 	 C7MOHCOCO3 = DMKCOOH + CH3CO3 : 	1.00D-11*RO2 	;
+{14036.} 	 MXOHNO2OOH + OH = MXYOHNO2O2 : 	1.50D-10 	;
+{14037.} 	 MXOHNO2OOH = MXYOHNO2O + OH : 	J(41) 	;
+{14038.} 	 MXYOHNO2O = C5CODBCO2H + CO + CO + NO2 : 	KDEC 	;
+{14039.} 	 NDNOETLOOH + OH = NDNOETOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14040.} 	 NDNOETLOOH = NDNOETOLO + OH : 	J(41) 	;
+{14041.} 	 NDNOETOLO = NC4MDCO2H + ECOCO2H + NO2 + HNO3 : 	KDEC 	;
+{14042.} 	 DNOETOLOOH + OH = DNOETOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14043.} 	 DNOETOLOOH = DNOETOLO + OH : 	J(41) 	;
+{14044.} 	 DNOETOLO = NC4MDCO2H + ECOCO2H + NO2 : 	KDEC 	;
+{14045.} 	 C6CO4MEDB + OH = C5CO23CHO + CO + CO + CH3CO3 : 	1.17D-10 	;
+{14046.} 	 C6CO4MEDB = C4DBMECO3 + HO2 + CO : 	J(34)*2 	;
+{14047.} 	 C5MEJCO3 + HO2 = C5MEJCO3H : 	KAPHO2*0.56 	;
+{14048.} 	 C5MEJCO3 + HO2 = C6134CO2OH + CH3CO3 + OH : 	KAPHO2*0.44 	;
+{14049.} 	 C5MEJCO3 + NO = C6134CO2OH + CH3CO3 + NO2 : 	KAPNO 	;
+{14050.} 	 C5MEJCO3 + NO2 = C5MEJPAN : 	KFPAN 	;
+{14051.} 	 C5MEJCO3 + NO3 = C6134CO2OH + CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{14052.} 	 C5MEJCO3 = C6134CO2OH + CH3CO3 : 	1.00D-11*RO2 	;
+{14053.} 	 NDNMETLOOH + OH = NDNMETOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14054.} 	 NDNMETLOOH = NDNMETOLO + OH : 	J(41) 	;
+{14055.} 	 NDNMETOLO = NC4MDCO2H + ECOCO2H + NO2 + HNO3 : 	KDEC 	;
+{14056.} 	 DNMETOLOOH + OH = DNMETOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14057.} 	 DNMETOLOOH = DNMETOLO + OH : 	J(41) 	;
+{14058.} 	 DNMETOLO = NC4MDCO2H + ECOCO2H + NO2 : 	KDEC 	;
+{14059.} 	 C7CO4EDB + OH = C2H5CO3 + CO + CH3CO3 + C33CO : 	8.52D-11 	;
+{14060.} 	 C7CO4EDB = C5DBECO3 + HO2 + CO : 	J(34)+J(35) 	;
+{14061.} 	 C6EO2OHCO3 + HO2 = C5CO3OH + C2H5CO3 + OH : 	KAPHO2*0.44 	;
+{14062.} 	 C6EO2OHCO3 + HO2 = C6EO2HCO3H : 	KAPHO2*0.56 	;
+{14063.} 	 C6EO2OHCO3 + NO = C5CO3OH + C2H5CO3 + NO2 : 	KAPNO 	;
+{14064.} 	 C6EO2OHCO3 + NO2 = C6EO2OHPAN : 	KFPAN 	;
+{14065.} 	 C6EO2OHCO3 + NO3 = C5CO3OH + C2H5CO3 + NO2 : 	KRO2NO3*1.74 	;
+{14066.} 	 C6EO2OHCO3 = C5CO3OH + C2H5CO3 : 	1.00D-11*RO2 	;
+{14067.} 	 NDNPETLOOH + OH = NDNPETOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14068.} 	 NDNPETLOOH = NDNPETOLO + OH : 	J(41) 	;
+{14069.} 	 NDNPETOLO = NC4MDCO2H + ECOCO2H + NO2 + HNO3 : 	KDEC 	;
+{14070.} 	 DNPETOLOOH + OH = DNPETOLO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14071.} 	 DNPETOLOOH = DNPETOLO + OH : 	J(41) 	;
+{14072.} 	 DNPETOLO = NC4MDCO2H + ECOCO2H + NO2 : 	KDEC 	;
+{14073.} 	 C7ECO4DB + OH = C5CO23CHO + CO + CH3CO3 + HO2 + CO : 	8.52D-11 	;
+{14074.} 	 C7ECO4DB = C5EDBCO3 + HO2 + CO : 	J(34)+J(35) 	;
+{14075.} 	 C7MJPCO3 + HO2 = C7EDCCO + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{14076.} 	 C7MJPCO3 + HO2 = C7MJPCO3H : 	KAPHO2*0.56 	;
+{14077.} 	 C7MJPCO3 + NO = C7EDCCO + HO2 + CO + NO2 : 	KAPNO 	;
+{14078.} 	 C7MJPCO3 + NO2 = C7MJPPAN : 	KFPAN 	;
+{14079.} 	 C7MJPCO3 + NO3 = C7EDCCO + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{14080.} 	 C7MJPCO3 = C7EDCCO + HO2 + CO : 	1.00D-11*RO2 	;
+{14081.} 	 C23O3ECO3 + HO2 = C23O3ECO2H + O3 : 	KAPHO2*0.15 	;
+{14082.} 	 C23O3ECO3 + HO2 = C23O3ECO3H : 	KAPHO2*0.41 	;
+{14083.} 	 C23O3ECO3 + HO2 = C23O3EO2 + OH : 	KAPHO2*0.44 	;
+{14084.} 	 C23O3ECO3 + NO = C23O3EO2 + NO2 : 	KAPNO 	;
+{14085.} 	 C23O3ECO3 + NO2 = C23O3ECPAN : 	KFPAN 	;
+{14086.} 	 C23O3ECO3 + NO3 = C23O3EO2 + NO2 : 	KRO2NO3*1.74 	;
+{14087.} 	 C23O3ECO3 = C23O3ECO2H : 	1.00D-11*RO2*0.3 	;
+{14088.} 	 C23O3ECO3 = C23O3EO2 : 	1.00D-11*RO2*0.7 	;
+{14089.} 	 CO356OCOOH + OH = CO356OCO2 : 	1.65D-11 	;
+{14090.} 	 CO356OCOOH = CO356OCO + OH : 	J(41) 	;
+{14091.} 	 CO356OCO = CH3CHO + CO + CH3CO3 : 	KDEC 	;
+{14092.} 	 EMPOHNO2O2 + HO2 = EMPONO2OOH : 	KRO2HO2*0.859 	;
+{14093.} 	 EMPOHNO2O2 + NO = EMPOHNO2O + NO2 : 	KRO2NO 	;
+{14094.} 	 EMPOHNO2O2 + NO3 = EMPOHNO2O + NO2 : 	KRO2NO3 	;
+{14095.} 	 EMPOHNO2O2 = EMPOHNO2O : 	9.20D-14*RO2 	;
+{14096.} 	 OH + INCNCO2H = MACRNB + NO2 : 	1.66D-12 	;
+{14097.} 	 INCNCO3H = MACRNB + NO2 + OH : 	J(41) 	;
+{14098.} 	 OH + INCNCO3H = INCNCO3 : 	4.74D-12 	;
+{14099.} 	 INCNPAN = INCNCO3 + NO2 : 	KBPAN 	;
+{14100.} 	 OH + INCNPAN = MACRNB + NO2 + NO3 : 	1.14D-12 	;
+{14101.} 	 MACRNBCO2H + OH = COHM2CO2H + NO2 : 	1.23D-12*0.32 	;
+{14102.} 	 MACRNBCO2H + OH = NOA + HO2 : 	1.23D-12*0.68 	;
+{14103.} 	 MACRNBCO3H + OH = COHM2CO3H + NO2 : 	4.31D-12*0.09 	;
+{14104.} 	 MACRNBCO3H + OH = MACRNBCO3 : 	4.31D-12*0.91 	;
+{14105.} 	 MACRNBCO3H = NOA + HO2 + OH : 	J(41) 	;
+{14106.} 	 MACRNBPAN + OH = COHM2PAN + NO2 : 	7.10D-13 	;
+{14107.} 	 MACRNBPAN = MACRNBCO3 + NO2 : 	KBPAN 	;
+{14108.} 	 INAHPCO2H = HMVKANO3 + OH + HO2 : 	J(41) 	;
+{14109.} 	 OH + INAHPCO2H = HMVKANO3 + OH : 	6.50D-12 	;
+{14110.} 	 INAHPCO3H = HMVKANO3 + OH + OH : 	J(41)*2 	;
+{14111.} 	 OH + INAHPCO3H = INAHPCO3 : 	9.58D-12 	;
+{14112.} 	 INAHPPAN = HMVKANO3 + OH + NO3 : 	J(41) 	;
+{14113.} 	 INAHPPAN = INAHPCO3 + NO2 : 	KBPAN 	;
+{14114.} 	 OH + INAHPPAN = HMVKANO3 + OH + CO + NO2 : 	5.98D-12 	;
+{14115.} 	 OH + INANCO2H = HMVKANO3 + NO2 : 	1.36D-12 	;
+{14116.} 	 INANCO3H = HMVKANO3 + NO2 + OH : 	J(41) 	;
+{14117.} 	 OH + INANCO3H = INANCO3 : 	4.08D-12 	;
+{14118.} 	 INANPAN = INANCO3 + NO2 : 	KBPAN 	;
+{14119.} 	 OH + INANPAN = HMVKANO3 + NO2 + CO + NO2 : 	4.85D-13 	;
+{14120.} 	 INANCOCO3 + HO2 = INANCOCO2H + O3 : 	KAPHO2*0.15 	;
+{14121.} 	 INANCOCO3 + HO2 = INANCOCO3H : 	KAPHO2*0.41 	;
+{14122.} 	 INANCOCO3 + HO2 = NO2 + CO23C4NO3 + OH : 	KAPHO2*0.44 	;
+{14123.} 	 INANCOCO3 + NO = NO2 + CO23C4NO3 + NO2 : 	KAPNO 	;
+{14124.} 	 INANCOCO3 + NO2 = INANCOPAN : 	KFPAN 	;
+{14125.} 	 INANCOCO3 + NO3 = NO2 + CO23C4NO3 + NO2 : 	KRO2NO3*1.74 	;
+{14126.} 	 INANCOCO3 = INANCOCO2H : 	1.00D-11*0.3*RO2 	;
+{14127.} 	 INANCOCO3 = NO2 + CO23C4NO3 : 	1.00D-11*0.7*RO2 	;
+{14128.} 	 OH + INAHCO2H = HMVKANO3 + HO2 : 	3.04D-12 	;
+{14129.} 	 INAHCO3H = HMVKANO3 + HO2 + OH : 	J(41) 	;
+{14130.} 	 OH + INAHCO3H = INAHCO3 : 	6.12D-12 	;
+{14131.} 	 INAHPAN = INAHPCO3 + NO2 : 	KBPAN 	;
+{14132.} 	 OH + INAHPAN = HMVKANO3 + HO2 + CO + NO2 : 	2.52D-12 	;
+{14133.} 	 HIEB1OOH + OH = MVKOHAOH + CO + OH : 	4.30D-11 	;
+{14134.} 	 HIEB1OOH = HIEB1O + OH : 	J(41) 	;
+{14135.} 	 HIEB1OOH = MVKOHAOH + CO + OH + HO2 : 	J(17) 	;
+{14136.} 	 HIEB1O = HOCH2COCHO + HOCH2CHO + HO2 : 	KDEC 	;
+{14137.} 	 HIEB2OOH + OH = HMACROH + CO + OH : 	5.74D-11 	;
+{14138.} 	 HIEB2OOH = HIEB2O + OH : 	J(41) 	;
+{14139.} 	 HIEB2OOH = HMACROH + CO + OH + HO2 : 	J(15) 	;
+{14140.} 	 HIEB2O = H13CO2C3 + GLYOX + HO2 : 	KDEC 	;
+{14141.} 	 HPNC524CO + OH = HMVKNO3 + CO + OH : 	2.98D-11 	;
+{14142.} 	 HPNC524CO = HMVKNO3 + CO + HO2 + OH : 	J(17) 	;
+{14143.} 	 DNC524CO + OH = HMVKNO3 + CO + NO2 : 	1.93D-11 	;
+{14144.} 	 DNC524CO = HMVKNO3 + CO + HO2 + NO2 : 	J(17) 	;
+{14145.} 	 HMVKNO3 + OH = HMVKNGLYOX + HO2 : 	3.85D-12 	;
+{14146.} 	 HMVKNO3 = HOCH2CHO + NO2 + CO + CO + HO2 : 	J(56)+J(57) 	;
+{14147.} 	 H13CO2C3 + OH = HOCH2COCHO + HO2 : 	5.25D-12 	;
+{14148.} 	 H13CO2C3 = HOCH2CO3 + HCHO + HO2 : 	J(22) 	;
+{14149.} 	 HNC524CO + OH = HMVKNO3 + CO + HO2 : 	2.67D-11 	;
+{14150.} 	 HNC524CO = HMVKNO3 + CO + HO2 + HO2 : 	J(17) 	;
+{14151.} 	 HMACO2H + OH = HOCH2CO3 + HCHO : 	1.84D-11 	;
+{14152.} 	 HMACO3H + OH = HMACO3 : 	1.99D-11 	;
+{14153.} 	 HMACO3H = HOCH2CO3 + HCHO + OH : 	J(41) 	;
+{14154.} 	 HMPAN + OH = H13CO2C3 + HCHO + CO + NO2 : 	2.90D-11 	;
+{14155.} 	 HMPAN = HMACO3 + NO2 : 	KBPAN 	;
+{14156.} 	 HMGLYOO + CO = HOCH2COCHO : 	1.20D-15 	;
+{14157.} 	 HMGLYOO + NO = HOCH2COCHO + NO2 : 	1.00D-14 	;
+{14158.} 	 HMGLYOO + NO2 = HOCH2COCHO + NO3 : 	1.00D-15 	;
+{14159.} 	 HMGLYOO + SO2 = HOCH2COCHO + SO3 : 	7.00D-14 	;
+{14160.} 	 HMGLYOO = HOCH2COCHO + H2O2 : 	6.00D-18*H2O 	;
+{14161.} 	 HMACROOH + OH = HMACRO2 : 	4.17D-11 	;
+{14162.} 	 HMACROOH = H13CO2C3 + CO + HO2 + OH : 	J(17) 	;
+{14163.} 	 HMACROOH = HMACRO + OH : 	J(41) 	;
+{14164.} 	 HMACRO = H13CO2C3 + CO + HO2 : 	KDEC 	;
+{14165.} 	 HMACROH + OH = HMACRO : 	3.82D-11 	;
+{14166.} 	 HMACROH = H13CO2C3 + CO + HO2 + HO2 : 	J(17) 	;
+{14167.} 	 MMALNACO2H + OH = CONM2CHO + HO2 : 	4.93D-12 	;
+{14168.} 	 MMALNACO2H = MGLYOX + NO2 + HCOCO2H : 	J(56)+J(57) 	;
+{14169.} 	 MMALNACO3H + OH = MMALNACO3 : 	8.01D-12 	;
+{14170.} 	 MMALNACO3H = CONM2CHO + HO2 + OH : 	J(41) 	;
+{14171.} 	 MMALNACO3H = MGLYOX + NO2 + HCOCO3H : 	J(56)+J(57) 	;
+{14172.} 	 MMALNAPAN + OH = CONM2CHO + HO2 + NO3 : 	4.41D-12 	;
+{14173.} 	 MMALNAPAN = MGLYOX + NO2 + GLYPAN : 	J(56)+J(57) 	;
+{14174.} 	 MMALNAPAN = MMALNACO3 + NO2 : 	KBPAN 	;
+{14175.} 	 CH3COPAN + OH = HCHO + CO + CO + NO2 : 	1.02D-13 	;
+{14176.} 	 CH3COPAN = CH3COCO3 + NO2 : 	KBPAN 	;
+{14177.} 	 INB1HPCO2H + OH = MACRNO3 + OH : 	7.40D-12 	;
+{14178.} 	 INB1HPCO3H + OH = INB1HPCO3 : 	1.09D-11 	;
+{14179.} 	 INB1HPCO3H = MACRNO3 + OH + OH : 	J(41) 	;
+{14180.} 	 INB1HPPAN + OH = MACRNO3 + CO + OH + NO2 : 	7.26D-12 	;
+{14181.} 	 INB1HPPAN = INB1HPCO3 + NO2 : 	KBPAN 	;
+{14182.} 	 INB1NACO2H + OH = MACRNO3 + NO2 : 	1.72D-12 	;
+{14183.} 	 INB1NACO3H + OH = INB1NACO3 : 	5.18D-12 	;
+{14184.} 	 INB1NACO3H = MACRNO3 + NO2 + OH : 	J(41) 	;
+{14185.} 	 INB1NAPAN + OH = MACRNO3 + CO + NO2 + NO2 : 	1.58D-12 	;
+{14186.} 	 INB1NAPAN = INB1NACO3 + NO2 : 	KBPAN 	;
+{14187.} 	 INB1NBCO2H + OH = MVKNO3 + NO2 : 	1.73D-12 	;
+{14188.} 	 INB1NBCO3H + OH = INB1NBCO3 : 	5.19D-12 	;
+{14189.} 	 INB1NBCO3H = MVKNO3 + NO2 + OH : 	J(41) 	;
+{14190.} 	 INB1NBPAN + OH = MVKNO3 + CO + NO2 + NO2 : 	1.59D-12 	;
+{14191.} 	 INB1NBPAN = INB1NBCO3 + NO2 : 	KBPAN 	;
+{14192.} 	 MMALNACO3 + HO2 = CONM2CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{14193.} 	 MMALNACO3 + HO2 = MMALNACO2H + O3 : 	KAPHO2*0.15 	;
+{14194.} 	 MMALNACO3 + HO2 = MMALNACO3H : 	KAPHO2*0.41 	;
+{14195.} 	 MMALNACO3 + NO = CONM2CHO + HO2 + NO2 : 	KAPNO 	;
+{14196.} 	 MMALNACO3 + NO2 = MMALNAPAN : 	KFPAN 	;
+{14197.} 	 MMALNACO3 + NO3 = CONM2CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{14198.} 	 MMALNACO3 = CONM2CHO + HO2 : 	1.00D-11*0.7*RO2 	;
+{14199.} 	 MMALNACO3 = MMALNACO2H : 	1.00D-11*0.3*RO2 	;
+{14200.} 	 MMALNBCO3 + HO2 = CO2H3CHO + NO2 + OH : 	KAPHO2*0.44 	;
+{14201.} 	 MMALNBCO3 + HO2 = MMALNBCO2H + O3 : 	KAPHO2*0.15 	;
+{14202.} 	 MMALNBCO3 + HO2 = MMALNBCO3H : 	KAPHO2*0.41 	;
+{14203.} 	 MMALNBCO3 + NO = CO2H3CHO + NO2 + NO2 : 	KAPNO 	;
+{14204.} 	 MMALNBCO3 + NO2 = MMALNBPAN : 	KFPAN 	;
+{14205.} 	 MMALNBCO3 + NO3 = CO2H3CHO + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{14206.} 	 MMALNBCO3 = CO2H3CHO + NO2 : 	1.00D-11*0.7*RO2 	;
+{14207.} 	 MMALNBCO3 = MMALNBCO2H : 	1.00D-11*0.3*RO2 	;
+{14208.} 	 C57NO3CO2H + OH = MMALNBCO2H + HO2 : 	6.52D-12 	;
+{14209.} 	 C57NO3CO3H + OH = C57NO3CO3 : 	6.52D-12*0.39 	;
+{14210.} 	 C57NO3CO3H + OH = MMALNBCO3H + HO2 : 	6.52D-12*0.61 	;
+{14211.} 	 C57NO3CO3H = HO12CO3C4 + NO2 + OH : 	J(41) 	;
+{14212.} 	 C57NO3PAN + OH = MMALNBPAN + HO2 : 	6.00D-12 	;
+{14213.} 	 C57NO3PAN = C57NO3CO3 + NO2 : 	KBPAN 	;
+{14214.} 	 INDHPCO3H + OH = INDHPCO3 : 	8.64D-12 	;
+{14215.} 	 INDHPCO3H = MVKNO3 + OH + OH : 	J(41)*2 	;
+{14216.} 	 INDHPPAN + OH = MVKNO3 + NO3 : 	5.04D-12 	;
+{14217.} 	 INDHPPAN = INDHPCO3 + NO2 : 	KBPAN 	;
+{14218.} 	 INDHPPAN = MVKNO3 + OH + NO3 : 	J(41) 	;
+{14219.} 	 INDHCO3H + OH = INDHCO3 : 	5.66D-12 	;
+{14220.} 	 INDHCO3H = MVKNO3 + OH + HO2 : 	J(41) 	;
+{14221.} 	 INDHPAN + OH = MVKNO3 + NO3 : 	1.96D-12 	;
+{14222.} 	 INDHPAN = INDHCO3 + NO2 : 	KBPAN 	;
+{14223.} 	 ACCOMECO3H + OH = ACCOMECO3 : 	3.59D-12 	;
+{14224.} 	 ACCOMECO3H = MECOACETO2 + OH : 	J(41) 	;
+{14225.} 	 ACCOMEPAN + OH = METACETHO + CO + CO + NO2 : 	1.00D-14 	;
+{14226.} 	 ACCOMEPAN = ACCOMECO3 + NO2 : 	KBPAN 	;
+{14227.} 	 IPRFORMOOH + OH = IPRFORMO2 : 	3.96D-12 	;
+{14228.} 	 IPRFORMOOH = IPRFORMO + OH : 	J(41) 	;
+{14229.} 	 IPRFORMNO3 + OH = CH3COCH3 + NO2 : 	1.44D-13 	;
+{14230.} 	 IPRFORMNO3 = IPRFORMO + NO2 : 	J(55) 	;
+{14231.} 	 IPRFORMO = CH3OCH3 + HO2 : 	KDEC 	;
+{14232.} 	 IPRFORMOH + OH = IPRFORMO : 	4.08D-13 	;
+{14233.} 	 PRCOFOROOH + OH = PRCOFORMO2 : 	1.09D-10 	;
+{14234.} 	 PRCOFOROOH = PRCOFORMO + OH : 	J(41) 	;
+{14235.} 	 PRCOFORMO = MECOFORMO2 + CH3CHO : 	KDEC 	;
+{14236.} 	 PRNOCOMOOH + OH = PRONOCOMO2 : 	4.65D-12 	;
+{14237.} 	 PRNOCOMOOH = PRONOCOMO + OH : 	J(41) 	;
+{14238.} 	 PRONOCOMO = HCHO + CH3COCH2O2 : 	KDEC 	;
+{14239.} 	 CO23C4CO3H = BIACETO2 + OH : 	J(41)+J(15) 	;
+{14240.} 	 OH + CO23C4CO3H = CO23C4CO3 : 	4.23D-12 	;
+{14241.} 	 C5PAN9 = CO23C4CO3 + NO2 : 	KBPAN 	;
+{14242.} 	 OH + C5PAN9 = CO23C3CHO + CO + NO2 : 	3.12D-13 	;
+{14243.} 	 HO13C3CO3 + HO2 = HO13C3CO3H : 	KAPHO2*0.56 	;
+{14244.} 	 HO13C3CO3 + HO2 = HOC2H4CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{14245.} 	 HO13C3CO3 + NO = HOC2H4CHO + NO2 + HO2 : 	KAPNO 	;
+{14246.} 	 HO13C3CO3 + NO2 = C4PAN2 : 	KFPAN 	;
+{14247.} 	 HO13C3CO3 + NO3 = HOC2H4CHO + NO2 + HO2 : 	KRO2NO3*1.74 	;
+{14248.} 	 HO13C3CO3 = HOC2H4CHO + HO2 : 	1.00D-11*RO2 	;
+{14249.} 	 C5CO23O2 + HO2 = C5CO23OOH : 	KRO2HO2*0.706 	;
+{14250.} 	 C5CO23O2 + NO = C5CO23O + NO2 : 	KRO2NO 	;
+{14251.} 	 C5CO23O2 + NO3 = C5CO23O + NO2 : 	KRO2NO3 	;
+{14252.} 	 C5CO23O2 = C5CO23O : 	2.00D-12*RO2 	;
+{14253.} 	 C6CO134OOH + OH = C5CO34CO3 : 	5.35D-12 	;
+{14254.} 	 C6CO134OOH = C5CO23O2 + OH : 	J(41) 	;
+{14255.} 	 C6CO134PAN + OH = C5CO23CHO + CO + NO2 : 	1.76D-12 	;
+{14256.} 	 C6CO134PAN = C5CO34CO3 + NO2 : 	KBPAN 	;
+{14257.} 	 CHOC2CO3 + HO2 = CHOC2CO2H + O3 : 	KAPHO2*0.15 	;
+{14258.} 	 CHOC2CO3 + HO2 = CHOC2CO3H : 	KAPHO2*0.41 	;
+{14259.} 	 CHOC2CO3 + HO2 = CHOC2H4O2 + OH : 	KAPHO2*0.44 	;
+{14260.} 	 CHOC2CO3 + NO = CHOC2H4O2 + NO2 : 	KAPNO 	;
+{14261.} 	 CHOC2CO3 + NO2 = CHOC2PAN : 	KFPAN 	;
+{14262.} 	 CHOC2CO3 + NO3 = CHOC2H4O2 + NO2 : 	KRO2NO3*1.74 	;
+{14263.} 	 CHOC2CO3 = CHOC2CO2H : 	1.00D-11*RO2*0.3 	;
+{14264.} 	 CHOC2CO3 = CHOC2H4O2 : 	1.00D-11*RO2*0.7 	;
+{14265.} 	 CHOC3COCO3 + HO2 = CHOC3COO2 + OH : 	KAPHO2*0.44 	;
+{14266.} 	 CHOC3COCO3 + HO2 = CHOC3COOOH : 	KAPHO2*0.56 	;
+{14267.} 	 CHOC3COCO3 + NO = CHOC3COO2 + NO2 : 	KAPNO 	;
+{14268.} 	 CHOC3COCO3 + NO2 = CHOC3COPAN : 	KFPAN 	;
+{14269.} 	 CHOC3COCO3 + NO3 = CHOC3COO2 + NO2 : 	KRO2NO3*1.74 	;
+{14270.} 	 CHOC3COCO3 = CHOC3COO2 : 	1.00D-11*RO2 	;
+{14271.} 	 C5124COCO3 + HO2 = C5124COO2 + OH : 	KAPHO2*0.44 	;
+{14272.} 	 C5124COCO3 + HO2 = C5TRONCO3H : 	KAPHO2*0.56 	;
+{14273.} 	 C5124COCO3 + NO = C5124COO2 + NO2 : 	KAPNO 	;
+{14274.} 	 C5124COCO3 + NO2 = C5124COPAN : 	KFPAN 	;
+{14275.} 	 C5124COCO3 + NO3 = C5124COO2 + NO2 : 	KRO2NO3*1.74 	;
+{14276.} 	 C5124COCO3 = C5124COO2 : 	1.00D-11*RO2 	;
+{14277.} 	 CO235C6CO3 + HO2 = C235C6CO3H : 	KAPHO2*0.56 	;
+{14278.} 	 CO235C6CO3 + HO2 = CO235C6O2 + OH : 	KAPHO2*0.44 	;
+{14279.} 	 CO235C6CO3 + NO = CO235C6O2 + NO2 : 	KAPNO 	;
+{14280.} 	 CO235C6CO3 + NO2 = C7PAN3 : 	KFPAN 	;
+{14281.} 	 CO235C6CO3 + NO3 = CO235C6O2 + NO2 : 	KRO2NO3*1.74 	;
+{14282.} 	 CO235C6CO3 = CO235C6O2 : 	1.00D-11*RO2 	;
+{14283.} 	 C106OOH + OH = C106O2 : 	8.01D-11 	;
+{14284.} 	 C106OOH = C106O + OH : 	J(41)+J(15) 	;
+{14285.} 	 C106NO3 + OH = CO235C6CHO + CH3COCH3 + NO2 : 	7.03D-11 	;
+{14286.} 	 C106NO3 = C106O + NO2 : 	J(55)+J(15) 	;
+{14287.} 	 C106O = C716O2 + CH3COCH3 : 	KDEC 	;
+{14288.} 	 C106OH + OH = C106O : 	7.66D-11 	;
+{14289.} 	 C106OH = C106O + HO2 : 	J(15) 	;
+{14290.} 	 NC71O2 + HO2 = NC71OOH : 	KRO2HO2*0.820 	;
+{14291.} 	 NC71O2 + NO = NC71O + NO2 : 	KRO2NO 	;
+{14292.} 	 NC71O2 + NO3 = NC71O + NO2 : 	KRO2NO3 	;
+{14293.} 	 NC71O2 = NC71O : 	2.50D-13*RO2 	;
+{14294.} 	 C717OOH + OH = CO235C6CHO + OH : 	2.00D-10 	;
+{14295.} 	 C717OOH = C717O + OH : 	J(41)+J(35) 	;
+{14296.} 	 C717NO3 + OH = CO235C6CHO + NO2 : 	2.23D-11 	;
+{14297.} 	 C717NO3 = C717O + NO2 : 	J(54)+J(35) 	;
+{14298.} 	 C717O = CO235C6CHO + HO2 : 	KROSEC*O2 	;
+{14299.} 	 C717OH + OH = CO235C6CHO + HO2 : 	1.26D-10 	;
+{14300.} 	 C717OH = C717O + HO2 : 	J(35) 	;
+{14301.} 	 C811CO3H + OH = C811CO3 : 	1.04D-11 	;
+{14302.} 	 C811CO3H = C811O2 + OH : 	J(41) 	;
+{14303.} 	 C811O2 + HO2 = C811OOH : 	KRO2HO2*0.859 	;
+{14304.} 	 C811O2 + NO = C811NO3 : 	KRO2NO*0.138 	;
+{14305.} 	 C811O2 + NO = C811O + NO2 : 	KRO2NO*0.862 	;
+{14306.} 	 C811O2 + NO3 = C811O + NO2 : 	KRO2NO3 	;
+{14307.} 	 C811O2 = C721CHO : 	1.30D-12*RO2*0.2 	;
+{14308.} 	 C811O2 = C811O : 	1.30D-12*RO2*0.6 	;
+{14309.} 	 C811O2 = C811OH : 	1.30D-12*RO2*0.2 	;
+{14310.} 	 PINIC + OH = C811O2 : 	7.29D-12 	;
+{14311.} 	 C811PAN + OH = C721CHO + CO + NO2 : 	6.77D-12 	;
+{14312.} 	 C811PAN = C811CO3 + NO2 : 	KBPAN 	;
+{14313.} 	 CHOC3COO2 + HO2 = C413COOOH : 	KRO2HO2*0.625 	;
+{14314.} 	 CHOC3COO2 + NO = CHOC3COO + NO2 : 	KRO2NO 	;
+{14315.} 	 CHOC3COO2 + NO3 = CHOC3COO + NO2 : 	KRO2NO3 	;
+{14316.} 	 CHOC3COO2 = CHOC3COO : 	2.00D-12*RO2 	;
+{14317.} 	 C921OOH + OH = C921O2 : 	1.29D-11 	;
+{14318.} 	 C921OOH = C921O + OH : 	J(41)+J(22) 	;
+{14319.} 	 C921O = C922O2 : 	KDEC 	;
+{14320.} 	 C98OOH + OH = C98O2 : 	2.05D-11 	;
+{14321.} 	 C98OOH = C98O + OH : 	J(41)+J(35) 	;
+{14322.} 	 C98NO3 + OH = CH3COCH3 + C614CO + NO2 : 	5.37D-12 	;
+{14323.} 	 C98NO3 = C98O + NO2 : 	J(55)+J(35) 	;
+{14324.} 	 C98O = C614O2 + CH3COCH3 : 	KDEC 	;
+{14325.} 	 C98OH + OH = C98O : 	1.69D-11 	;
+{14326.} 	 C98OH = C98O + HO2 : 	J(35) 	;
+{14327.} 	 C86OOH + OH = C86O2 : 	3.45D-11 	;
+{14328.} 	 C86OOH = C86O + OH : 	J(41)+J(15) 	;
+{14329.} 	 C86O = C511O2 + CH3COCH3 : 	KDEC 	;
+{14330.} 	 H3C25C6CO3 + HO2 = H3C25C6O2 + OH : 	KAPHO2*0.44 	;
+{14331.} 	 H3C25C6CO3 + HO2 = H3C25CCO2H + O3 : 	KAPHO2*0.15 	;
+{14332.} 	 H3C25C6CO3 + HO2 = H3C25CCO3H : 	KAPHO2*0.41 	;
+{14333.} 	 H3C25C6CO3 + NO = H3C25C6O2 + NO2 : 	KAPNO 	;
+{14334.} 	 H3C25C6CO3 + NO2 = H3C25C6PAN : 	KFPAN 	;
+{14335.} 	 H3C25C6CO3 + NO3 = H3C25C6O2 + NO2 : 	KRO2NO3*1.74 	;
+{14336.} 	 H3C25C6CO3 = H3C25C6O2 : 	1.00D-11*RO2*0.7 	;
+{14337.} 	 H3C25C6CO3 = H3C25CCO2H : 	1.00D-11*RO2*0.3 	;
+{14338.} 	 H3C25C6O2 + HO2 = H3C25C6OOH : 	KRO2HO2*0.770 	;
+{14339.} 	 H3C25C6O2 + NO = H3C25C6O + NO2 : 	KRO2NO 	;
+{14340.} 	 H3C25C6O2 + NO3 = H3C25C6O + NO2 : 	KRO2NO3 	;
+{14341.} 	 H3C25C6O2 = H3C25C5CHO : 	2.00D-12*RO2*0.2 	;
+{14342.} 	 H3C25C6O2 = H3C25C6O : 	2.00D-12*RO2*0.6 	;
+{14343.} 	 H3C25C6O2 = H3C25C6OH : 	2.00D-12*RO2*0.2 	;
+{14344.} 	 C919OOH + OH = C919O2 : 	1.01D-10 	;
+{14345.} 	 C919OOH = C919O + OH : 	J(41)+J(15)*2 	;
+{14346.} 	 C919NO3 + OH = HCOCH2CHO + HCOCH2CHO + CH3COCH3 + NO2 : 	9.14D-11 	;
+{14347.} 	 C919NO3 = C919O + NO2 : 	J(55)+J(15)*2 	;
+{14348.} 	 C919O = C620O2 + CH3COCH3 : 	KDEC 	;
+{14349.} 	 C919OH + OH = C919O : 	9.73D-11 	;
+{14350.} 	 C919OH = C919O + HO2 : 	J(15) 	;
+{14351.} 	 C914OOH + OH = C914CO + OH : 	8.67D-11 	;
+{14352.} 	 C914OOH = C914O + OH : 	J(41)+J(15) 	;
+{14353.} 	 C914O = C87CO3 : 	KDEC 	;
+{14354.} 	 C914CO + OH = C87CO3 : 	7.09D-11 	;
+{14355.} 	 C914CO = C87CO3 : 	J(15) 	;
+{14356.} 	 C914OH + OH = C914CO + HO2 : 	7.44D-11 	;
+{14357.} 	 C916OOH + OH = C916O2 : 	9.73D-11 	;
+{14358.} 	 C916OOH = C916O + OH : 	J(41)+J(15)*2 	;
+{14359.} 	 C916NO3 + OH = CH3COCH3 + CO123C5CHO + NO2 : 	9.23D-11 	;
+{14360.} 	 C916NO3 = C916O + NO2 : 	J(54)+J(15)*2 	;
+{14361.} 	 C916O = CH3COCH3 + C616O2 : 	KDEC 	;
+{14362.} 	 C916OH + OH = C916O : 	9.03D-11 	;
+{14363.} 	 C916OH = C916O + HO2 : 	J(15)*2 	;
+{14364.} 	 C88CO2H + OH = C88O2 : 	1.02D-11 	;
+{14365.} 	 C88CO3H + OH = C88CO3 : 	1.37D-11 	;
+{14366.} 	 C88CO3H = C88O2 + OH : 	J(41) 	;
+{14367.} 	 C88PAN + OH = C88CO + CO + NO2 : 	7.50D-12 	;
+{14368.} 	 C88PAN = C88CO3 + NO2 : 	KBPAN 	;
+{14369.} 	 C88OOH + OH = C88CO + OH : 	5.71D-11 	;
+{14370.} 	 C88OOH = C88O + OH : 	J(41) 	;
+{14371.} 	 C88O = C718CO3 : 	KDEC 	;
+{14372.} 	 C88CO + OH = C718CO3 : 	5.80D-12 	;
+{14373.} 	 C88OH + OH = C88CO + HO2 : 	2.58D-11 	;
+{14374.} 	 C512OOH + OH = CO13C4CHO + OH : 	1.01D-10 	;
+{14375.} 	 C512OOH = C512O + OH : 	J(41)+J(15) 	;
+{14376.} 	 C512NO3 + OH = CO13C4CHO + NO2 : 	6.65D-11 	;
+{14377.} 	 C512NO3 = C512O + NO2 : 	J(53)+J(15) 	;
+{14378.} 	 C512O = C513O2 : 	8.40D+10*EXP(-2567/TEMP) 	;
+{14379.} 	 C512O = CO13C3CO2H + HCHO + HO2 : 	KDEC 	;
+{14380.} 	 C512OH + OH = CO13C4CHO + HO2 : 	7.96D-11 	;
+{14381.} 	 C512OH = C512O + HO2 : 	J(15) 	;
+{14382.} 	 C619OOH + OH = C619CO + OH : 	5.95D-11 	;
+{14383.} 	 C619OOH = C619O + OH : 	J(41) 	;
+{14384.} 	 C619O = C512CO3 : 	KDEC 	;
+{14385.} 	 C619OH + OH = C619CO + HO2 : 	2.82D-11 	;
+{14386.} 	 C810O2 + HO2 = C810OOH : 	KRO2HO2*0.914 	;
+{14387.} 	 C810O2 + NO = C810NO3 : 	KRO2NO*0.104 	;
+{14388.} 	 C810O2 + NO = C810O + NO2 : 	KRO2NO*0.896 	;
+{14389.} 	 C810O2 + NO3 = C810O + NO2 : 	KRO2NO3 	;
+{14390.} 	 C810O2 = C810O : 	6.70D-15*RO2*0.7 	;
+{14391.} 	 C810O2 = C810OH : 	6.70D-15*RO2*0.3 	;
+{14392.} 	 CO25C6CHO + NO3 = CO25C6CO3 + HNO3 : 	KNO3AL*5.5 	;
+{14393.} 	 CO25C6CHO + OH = CO25C6CO3 : 	2.69D-11 	;
+{14394.} 	 CO25C6CHO = C627O2 + CO + HO2 : 	J(15) 	;
+{14395.} 	 C818O2 + HO2 = C818OOH : 	KRO2HO2*0.859 	;
+{14396.} 	 C818O2 + NO = C818O + NO2 : 	KRO2NO 	;
+{14397.} 	 C818O2 + NO3 = C818O + NO2 : 	KRO2NO3 	;
+{14398.} 	 C818O2 = C818CO : 	1.30D-12*0.2 	;
+{14399.} 	 C818O2 = C818O : 	1.30D-12*0.6 	;
+{14400.} 	 C818O2 = C818OH : 	1.30D-12*0.2 	;
+{14401.} 	 C727CO3 + HO2 = C727CO3H : 	KAPHO2*0.56 	;
+{14402.} 	 C727CO3 + HO2 = C727O2 + OH : 	KAPHO2*0.44 	;
+{14403.} 	 C727CO3 + NO = C727O2 + NO2 : 	KAPNO 	;
+{14404.} 	 C727CO3 + NO2 = C727PAN : 	KFPAN 	;
+{14405.} 	 C727CO3 + NO3 = C727O2 + NO2 : 	KRO2NO3*1.74 	;
+{14406.} 	 C727CO3 = C727O2 : 	1.00D-11*RO2 	;
+{14407.} 	 C626CO2H + OH = C626O2 : 	3.19D-11 	;
+{14408.} 	 C626CO2H = C626O2 + HO2 : 	J(15) 	;
+{14409.} 	 C626CO3H + OH = C626CO3 : 	3.50D-11 	;
+{14410.} 	 C626CO3H = C626O2 + OH : 	J(41)+J(15) 	;
+{14411.} 	 C626PAN + OH = C517CHO + CO + NO2 : 	3.14D-11 	;
+{14412.} 	 C626PAN = C626CO3 + NO2 : 	KBPAN 	;
+{14413.} 	 C626OOH + OH = C517CHO + OH : 	4.38D-11 	;
+{14414.} 	 C626OOH = C626O + OH : 	J(41)+J(15) 	;
+{14415.} 	 C626NO3 + OH = C517CHO + NO2 : 	2.84D-11 	;
+{14416.} 	 C626NO3 = C626O + NO2 : 	J(53) 	;
+{14417.} 	 C626O = C622CO3 : 	KDEC 	;
+{14418.} 	 C511CHO + OH = C511CO3 : 	5.13D-11 	;
+{14419.} 	 C517CHO + NO3 = C517CO3 + HNO3 : 	KNO3AL*8.5 	;
+{14420.} 	 C517CHO + OH = C517CO3 : 	4.35D-11 	;
+{14421.} 	 C517CHO = C517O2 + CO + HO2 : 	J(15) 	;
+{14422.} 	 C735OOH + OH = C735O2 : 	5.07D-11 	;
+{14423.} 	 C735OOH = C735O + OH : 	J(41) 	;
+{14424.} 	 C735OOH = CO13C4CHO + CH3CO3 + OH : 	J(22)+J(15)*2 	;
+{14425.} 	 C735O = CO13C4CHO + CH3CO3 : 	KDEC 	;
+{14426.} 	 C735OH + OH = C735O : 	4.73D-11 	;
+{14427.} 	 C735OH = CO13C4CHO + CH3CO3 + HO2 : 	J(22)+J(15)*2 	;
+{14428.} 	 NC728O2 + HO2 = NC728OOH : 	KRO2HO2*0.770 	;
+{14429.} 	 NC728O2 + NO = NC728O + NO2 : 	KRO2NO 	;
+{14430.} 	 NC728O2 + NO3 = NC728O + NO2 : 	KRO2NO3 	;
+{14431.} 	 NC728O2 = NC728O : 	9.20D-14*RO2*0.7 	;
+{14432.} 	 NC728O2 = NC728OH : 	9.20D-14*RO2*0.3 	;
+{14433.} 	 C628OOA = C628O2 + OH : 	KDEC 	;
+{14434.} 	 C728O2 + HO2 = C728OOH : 	KRO2HO2*0.770 	;
+{14435.} 	 C728O2 + NO = C728NO3 : 	KRO2NO*0.031 	;
+{14436.} 	 C728O2 + NO = C728O + NO2 : 	KRO2NO*0.969 	;
+{14437.} 	 C728O2 + NO3 = C728O + NO2 : 	KRO2NO3 	;
+{14438.} 	 C728O2 = C728O : 	9.20D-14*RO2*0.7 	;
+{14439.} 	 C728O2 = C728OH : 	9.20D-14*RO2*0.3 	;
+{14440.} 	 C622O2 + HO2 = C622OOH : 	KRO2HO2*0.770 	;
+{14441.} 	 C622O2 + NO = C622NO3 : 	KRO2NO*0.078 	;
+{14442.} 	 C622O2 + NO = C622O + NO2 : 	KRO2NO*0.922 	;
+{14443.} 	 C622O2 + NO3 = C622O + NO2 : 	KRO2NO3 	;
+{14444.} 	 C622O2 = C518CHO : 	1.30D-12*RO2*0.2 	;
+{14445.} 	 C622O2 = C622O : 	1.30D-12*RO2*0.6 	;
+{14446.} 	 C622O2 = C622OH : 	1.30D-12*RO2*0.2 	;
+{14447.} 	 C822OOH + OH = C729CHO + OH : 	9.71D-11 	;
+{14448.} 	 C822OOH = C822O + OH : 	J(41) 	;
+{14449.} 	 C822NO3 + OH = C729CHO + NO2 : 	8.31D-11 	;
+{14450.} 	 C822NO3 = C822O + NO2 : 	J(53) 	;
+{14451.} 	 C822O = C824O2 : 	KDEC 	;
+{14452.} 	 C822OH + OH = C729CHO + HO2 : 	8.80D-11 	;
+{14453.} 	 C823CO3H + OH = C823CO3 : 	6.18D-11 	;
+{14454.} 	 C823CO3H = C823O2 + OH : 	J(41) 	;
+{14455.} 	 C823O2 + HO2 = C823OOH : 	KRO2HO2*0.859 	;
+{14456.} 	 C823O2 + NO = C823NO3 : 	KRO2NO*0.138 	;
+{14457.} 	 C823O2 + NO = C823O + NO2 : 	KRO2NO*0.862 	;
+{14458.} 	 C823O2 + NO3 = C823O + NO2 : 	KRO2NO3 	;
+{14459.} 	 C823O2 = C823CO : 	1.30D-12*RO2*0.2 	;
+{14460.} 	 C823O2 = C823O : 	1.30D-12*RO2*0.6 	;
+{14461.} 	 C823O2 = C823OH : 	1.30D-12*RO2*0.2 	;
+{14462.} 	 LIMONIC + OH = C823O2 : 	5.89D-11 	;
+{14463.} 	 C823PAN + OH = C823CO + CO + NO2 : 	5.82D-11 	;
+{14464.} 	 C823PAN = C823CO3 + NO2 : 	KBPAN 	;
+{14465.} 	 C925OOH + OH = C925O2 : 	2.45D-11 	;
+{14466.} 	 C925OOH = C925O + OH : 	J(41) 	;
+{14467.} 	 C925O = C818CO + HCHO + HO2 : 	KDEC 	;
+{14468.} 	 C622CO2H + OH = C622O2 : 	6.00D-11 	;
+{14469.} 	 C622CO3H + OH = C622CO3 : 	6.31D-11 	;
+{14470.} 	 C622CO3H = C622O2 + OH : 	J(41) 	;
+{14471.} 	 C622PAN + OH = C518CHO + CO + NO2 : 	5.95D-11 	;
+{14472.} 	 C622PAN = C622CO3 + NO2 : 	KBPAN 	;
+{14473.} 	 C819O2 + HO2 = C819OOH : 	KRO2HO2 	;
+{14474.} 	 C819O2 + NO = C819O + NO2 : 	KRO2NO 	;
+{14475.} 	 C819O2 + NO3 = C819O + NO2 : 	KRO2NO3 	;
+{14476.} 	 C819O2 = C819O : 	9.20D-14*RO2 	;
+{14477.} 	 C731CO3 + HO2 = C731CO2 + OH : 	KAPHO2*0.44 	;
+{14478.} 	 C731CO3 + HO2 = C731CO2H + O3 : 	KAPHO2*0.15 	;
+{14479.} 	 C731CO3 + HO2 = C731CO3H : 	KAPHO2*0.41 	;
+{14480.} 	 C731CO3 + NO = C731CO2 + NO2 : 	KAPNO 	;
+{14481.} 	 C731CO3 + NO2 = C731PAN : 	KFPAN 	;
+{14482.} 	 C731CO3 + NO3 = C731CO2 + NO2 : 	KRO2NO3*1.74 	;
+{14483.} 	 C731CO3 = C731CO2 : 	1.00D-11*RO2*0.7 	;
+{14484.} 	 C731CO3 = C731CO2H : 	1.00D-11*RO2*0.3 	;
+{14485.} 	 C1011CO2H + OH = C1011O2 : 	1.14D-11 	;
+{14486.} 	 C1011CO3H + OH = C1011CO3 : 	1.45D-11 	;
+{14487.} 	 C1011CO3H = C1011O2 + OH : 	J(41) 	;
+{14488.} 	 C1011O2 + HO2 = C1011OOH : 	KRO2HO2*0.914 	;
+{14489.} 	 C1011O2 + NO = C1011NO3 : 	KRO2NO*0.228 	;
+{14490.} 	 C1011O2 + NO = C1011O + NO2 : 	KRO2NO*0.772 	;
+{14491.} 	 C1011O2 + NO3 = C1011O + NO2 : 	KRO2NO3 	;
+{14492.} 	 C1011O2 = C1011CO : 	2.50D-13*RO2*0.2 	;
+{14493.} 	 C1011O2 = C1011O : 	2.50D-13*RO2*0.6 	;
+{14494.} 	 C1011O2 = C1011OH : 	2.50D-13*RO2*0.2 	;
+{14495.} 	 C1011PAN + OH = C1011CO + CO + NO2 : 	1.09D-11 	;
+{14496.} 	 C1011PAN = C1011CO3 + NO2 : 	KBPAN 	;
+{14497.} 	 C1210CO2 = C1210O2 : 	KDEC*0.1 	;
+{14498.} 	 C1210CO2 = C1211CO3 : 	KDEC*0.9 	;
+{14499.} 	 C1210CO2H + OH = C1210CO2 : 	3.85D-11 	;
+{14500.} 	 C1210CO3H + OH = C1210CO3 : 	4.14D-11 	;
+{14501.} 	 C1210CO3H = C1210CO2 + OH : 	J(41) 	;
+{14502.} 	 C1210PAN + OH = C116CHO + CO + NO2 : 	3.78D-11 	;
+{14503.} 	 C1210PAN = C1210CO3 + NO2 : 	KBPAN 	;
+{14504.} 	 C132OOH + OH = C132O2 : 	1.90D-11 	;
+{14505.} 	 C132OOH = C132O + OH : 	J(41) 	;
+{14506.} 	 C132O = C133O2 : 	KDEC 	;
+{14507.} 	 C132OH + OH = C132O : 	1.55D-11 	;
+{14508.} 	 C137CO2H + OH = C137O2 : 	5.89D-11 	;
+{14509.} 	 C137CO3H + OH = C137CO3 : 	6.18D-11 	;
+{14510.} 	 C137CO3H = C137O2 + OH : 	J(41) 	;
+{14511.} 	 C137O2 + HO2 = C137OOH : 	KRO2HO2*0.959 	;
+{14512.} 	 C137O2 + NO = C137NO3 : 	KRO2NO*0.178 	;
+{14513.} 	 C137O2 + NO = C137O + NO2 : 	KRO2NO*0.822 	;
+{14514.} 	 C137O2 + NO3 = C137O + NO2 : 	KRO2NO3 	;
+{14515.} 	 C137O2 = C137CO : 	1.30D-12*RO2*0.2 	;
+{14516.} 	 C137O2 = C137O : 	1.30D-12*RO2*0.6 	;
+{14517.} 	 C137O2 = C137OH : 	1.30D-12*RO2*0.2 	;
+{14518.} 	 C137PAN + OH = C137CO + CO + NO2 : 	5.82D-11 	;
+{14519.} 	 C137PAN = C137CO3 + NO2 : 	KBPAN 	;
+{14520.} 	 C1013CO2H + OH = C1013O2 : 	1.13D-11 	;
+{14521.} 	 C1013CO3H + OH = C1013CO3 : 	1.44D-11 	;
+{14522.} 	 C1013CO3H = C1013O2 + OH : 	J(41) 	;
+{14523.} 	 C1013O2 + HO2 = C1013OOH : 	KRO2HO2*0.914 	;
+{14524.} 	 C1013O2 + NO = C1013NO3 : 	KRO2NO*0.228 	;
+{14525.} 	 C1013O2 + NO = C1013O + NO2 : 	KRO2NO*0.772 	;
+{14526.} 	 C1013O2 + NO3 = C1013O + NO2 : 	KRO2NO3 	;
+{14527.} 	 C1013O2 = C1013CO : 	2.50D-13*RO2*0.2 	;
+{14528.} 	 C1013O2 = C1013O : 	2.50D-13*RO2*0.6 	;
+{14529.} 	 C1013O2 = C1013OH : 	2.50D-13*RO2*0.2 	;
+{14530.} 	 C1013PAN + OH = C1013CO + CO + NO2 : 	1.08D-11 	;
+{14531.} 	 C1013PAN = C1013CO3 + NO2 : 	KBPAN 	;
+{14532.} 	 C1010O2 + HO2 = C1010OOH : 	KRO2HO2*0.914 	;
+{14533.} 	 C1010O2 + NO = C1010NO3 : 	KRO2NO*0.125 	;
+{14534.} 	 C1010O2 + NO = C1010O + NO2 : 	KRO2NO*0.875 	;
+{14535.} 	 C1010O2 + NO3 = C1010O + NO2 : 	KRO2NO3 	;
+{14536.} 	 C1010O2 = C1010O : 	6.70D-15*RO2*0.7 	;
+{14537.} 	 C1010O2 = C1010OH : 	6.70D-15*RO2*0.3 	;
+{14538.} 	 C1312OOH + OH = C1312CO + OH : 	1.02D-10 	;
+{14539.} 	 C1312OOH = C1312O + OH : 	J(41) 	;
+{14540.} 	 C1312NO3 + OH = C1312CO + NO2 : 	8.34D-11 	;
+{14541.} 	 C1312NO3 = C1312O + NO2 : 	J(54) 	;
+{14542.} 	 C1312O = C1010O2 + HOC2H4CHO : 	KDEC 	;
+{14543.} 	 C1312OH + OH = C1312CO + HO2 : 	9.34D-11 	;
+{14544.} 	 C117O2 + HO2 = C117OOH : 	KRO2HO2*0.932 	;
+{14545.} 	 C117O2 + NO = C117NO3 : 	KRO2NO*0.129 	;
+{14546.} 	 C117O2 + NO = C117O + NO2 : 	KRO2NO*0.871 	;
+{14547.} 	 C117O2 + NO3 = C117O + NO2 : 	KRO2NO3 	;
+{14548.} 	 C117O2 = C117O : 	9.20D-14*RO2*0.7 	;
+{14549.} 	 C117O2 = C117OH : 	9.20D-14*RO2*0.3 	;
+{14550.} 	 C830CO3 + HO2 = C830CO2H + O3 : 	KAPHO2*0.15 	;
+{14551.} 	 C830CO3 + HO2 = C830CO3H : 	KAPHO2*0.41 	;
+{14552.} 	 C830CO3 + HO2 = C830O2 + OH : 	KAPHO2*0.44 	;
+{14553.} 	 C830CO3 + NO = C830O2 + NO2 : 	KAPNO 	;
+{14554.} 	 C830CO3 + NO2 = C830PAN : 	KFPAN 	;
+{14555.} 	 C830CO3 + NO3 = C830O2 + NO2 : 	KRO2NO3*1.74 	;
+{14556.} 	 C830CO3 = C830CO2H : 	1.00D-11*RO2*0.3 	;
+{14557.} 	 C830CO3 = C830O2 : 	1.00D-11*RO2*0.7 	;
+{14558.} 	 C127OOH + OH = C127O2 : 	8.69D-11 	;
+{14559.} 	 C127OOH = C127O + OH : 	J(41) 	;
+{14560.} 	 C127NO3 + OH = C128CO + NO2 : 	5.82D-11 	;
+{14561.} 	 C127NO3 = C127O + NO2 : 	J(55) 	;
+{14562.} 	 C127O = C128O2 : 	KDEC 	;
+{14563.} 	 C127OH + OH = C127O : 	7.47D-11 	;
+{14564.} 	 C145O2 + HO2 = C145OOH : 	KRO2HO2*0.968 	;
+{14565.} 	 C145O2 + NO = C145O + NO2 : 	KRO2NO 	;
+{14566.} 	 C145O2 + NO3 = C145O + NO2 : 	KRO2NO3 	;
+{14567.} 	 C145O2 = C145O : 	9.20D-14*RO2*0.7 	;
+{14568.} 	 C145O2 = C145OH : 	9.20D-14*RO2*0.3 	;
+{14569.} 	 C927O2 + HO2 = C927OOH : 	KRO2HO2*0.890 	;
+{14570.} 	 C927O2 + NO = C927NO3 : 	KRO2NO*0.118 	;
+{14571.} 	 C927O2 + NO = C927O + NO2 : 	KRO2NO*0.872 	;
+{14572.} 	 C927O2 + NO3 = C927O + NO2 : 	KRO2NO3 	;
+{14573.} 	 C927O2 = C927O : 	6.70D-15*RO2*0.7 	;
+{14574.} 	 C927O2 = C927OH : 	6.70D-15*RO2*0.3 	;
+{14575.} 	 C143OOH + OH = C143CO + OH : 	8.69D-11 	;
+{14576.} 	 C143OOH = C143O + OH : 	J(41) 	;
+{14577.} 	 C143NO3 + OH = C143CO + NO2 : 	5.82D-11 	;
+{14578.} 	 C143NO3 = C143O + NO2 : 	J(54) 	;
+{14579.} 	 C143O = C143CO + HO2 : 	KROSEC*O2 	;
+{14580.} 	 C143O = C927O2 + CO2C4CHO : 	2.70D+14*EXP(-6643/TEMP) 	;
+{14581.} 	 C143OH + OH = C143CO + HO2 : 	7.47D-11 	;
+{14582.} 	 C1214O2 + HO2 = C1214OOH : 	KRO2HO2*0.947 	;
+{14583.} 	 C1214O2 + NO = C1214O + NO2 : 	KRO2NO 	;
+{14584.} 	 C1214O2 + NO3 = C1214O + NO2 : 	KRO2NO3 	;
+{14585.} 	 C1214O2 = C1214O : 	9.20D-14*RO2*0.7 	;
+{14586.} 	 C1214O2 = C1214OH : 	9.20D-14*RO2*0.3 	;
+{14587.} 	 MSA + OH = CH3SO3 : 	2.24D-14 	;
+{14588.} 	 CH3SO2OOH + OH = CH3SO2O2 : 	3.60D-12 	;
+{14589.} 	 CH3SO2OOH = CH3SO3 + OH : 	J(41) 	;
+{14590.} 	 CH3SO4NO2 + OH = CH3SO2O2 + HNO3 : 	3.60D-13 	;
+{14591.} 	 CH3SO4NO2 = CH3SO2O2 + NO2 : 	5.40D+16*EXP(-13112/TEMP) 	;
+{14592.} 	 CHOC4DOLO2 + HO2 = ALC4DOLOOH : 	KRO2HO2*0.706 	;
+{14593.} 	 CHOC4DOLO2 + NO = CHOC4DOLO + NO2 : 	KRO2NO 	;
+{14594.} 	 CHOC4DOLO2 + NO3 = CHOC4DOLO + NO2 : 	KRO2NO3 	;
+{14595.} 	 CHOC4DOLO2 = CHOC4DOLO : 	8.80D-13*RO2 	;
+{14596.} 	 C6TRONOHO2 + HO2 = C6TONOHOOH : 	KRO2HO2*0.770 	;
+{14597.} 	 C6TRONOHO2 + NO = C6TRONOHO + NO2 : 	KRO2NO 	;
+{14598.} 	 C6TRONOHO2 + NO3 = C6TRONOHO + NO2 : 	KRO2NO3 	;
+{14599.} 	 C6TRONOHO2 = C6TRONOHO : 	8.80D-13*RO2 	;
+{14600.} 	 HO24C5OOH = HO24C5O + OH : 	J(41) 	;
+{14601.} 	 OH + HO24C5OOH = HO24C4CHO + OH : 	3.01D-11 	;
+{14602.} 	 OH + HO24C5OOH = HO24C5O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{14603.} 	 OH + HO24C5NO3 = HO24C4CHO + NO2 : 	1.19D-11 	;
+{14604.} 	 HO24C5O = HO2C3CHO + HCHO + HO2 : 	2.00D+14*EXP(-5556/TEMP) 	;
+{14605.} 	 OH + HO124C5 = C51OH + HO2 : 	2.46D-11 	;
+{14606.} 	 HO24C4CHO = HO2C3CHO + HO2 + HO2 + CO : 	J(15) 	;
+{14607.} 	 NO3 + HO24C4CHO = HO24C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{14608.} 	 OH + HO24C4CHO = HO24C4CO3 : 	4.03D-11 	;
+{14609.} 	 C23C54CO3 + HO2 = C23C54CO3H : 	KAPHO2*0.56 	;
+{14610.} 	 C23C54CO3 + HO2 = CO23C54O2 + OH : 	KAPHO2*0.44 	;
+{14611.} 	 C23C54CO3 + NO = CO23C54O2 + NO2 : 	KAPNO 	;
+{14612.} 	 C23C54CO3 + NO2 = C6PAN7 : 	KFPAN 	;
+{14613.} 	 C23C54CO3 + NO3 = CO23C54O2 + NO2 : 	KRO2NO3 	;
+{14614.} 	 C23C54CO3 = CO23C54O2 : 	1.00D-11*RO2 	;
+{14615.} 	 C55OOH = C55O + OH : 	J(41)+J(22) 	;
+{14616.} 	 OH + C55OOH = C55O2 : 	1.32D-11 	;
+{14617.} 	 C55O = HCHO + IPRHOCO3 : 	KDEC 	;
+{14618.} 	 C67CO3H = C55O2 + OH : 	J(41)+J(22) 	;
+{14619.} 	 OH + C67CO3H = C67CO3 : 	5.33D-12 	;
+{14620.} 	 C6PAN9 = C67CO3 + NO2 : 	KBPAN 	;
+{14621.} 	 OH + C6PAN9 = MIBKHO4CHO + CO + NO2 : 	1.41D-12 	;
+{14622.} 	 C73O2 + HO2 = C73OOH : 	KRO2HO2*0.820 	;
+{14623.} 	 C73O2 + NO = C73O + NO2 : 	KRO2NO 	;
+{14624.} 	 C73O2 + NO3 = C73O + NO2 : 	KRO2NO3 	;
+{14625.} 	 C73O2 = C73O : 	8.80D-13*RO2 	;
+{14626.} 	 C74O2 + HO2 = C74OOH : 	KRO2HO2*0.820 	;
+{14627.} 	 C74O2 + NO = C74O + NO2 : 	KRO2NO 	;
+{14628.} 	 C74O2 + NO3 = C74O + NO2 : 	KRO2NO3 	;
+{14629.} 	 C74O2 = C74O : 	8.80D-13*RO2 	;
+{14630.} 	 H3M2C4CO3H = ME3BU2OLO2 + OH : 	J(41) 	;
+{14631.} 	 OH + H3M2C4CO3H = H3M2C4CO3 : 	3.99D-11 	;
+{14632.} 	 C6PAN20 = H3M2C4CO3 + NO2 : 	KBPAN 	;
+{14633.} 	 OH + C6PAN20 = C3M3OH2CHO + CO + NO2 : 	1.35D-11 	;
+{14634.} 	 C79OOH = C79O + OH : 	J(41) 	;
+{14635.} 	 C79OOH = HCHO + CO235C6 + OH : 	J(22)*2 	;
+{14636.} 	 OH + C79OOH = C79O2 : 	3.55D-11 	;
+{14637.} 	 C79O = CO235C6 + HCHO + HO2 : 	2.00D+14*EXP(-5489/TEMP) 	;
+{14638.} 	 C715O2 + HO2 = C715OOH : 	KRO2HO2*0.820 	;
+{14639.} 	 C715O2 + NO = C715O + NO2 : 	KRO2NO 	;
+{14640.} 	 C715O2 + NO3 = C715O + NO2 : 	KRO2NO3 	;
+{14641.} 	 C715O2 = C715O : 	9.20D-14*RO2 	;
+{14642.} 	 H3M3C4CO3H = PROL11MO2 + OH : 	J(41) 	;
+{14643.} 	 OH + H3M3C4CO3H = H3M3C4CO3 : 	6.08D-12 	;
+{14644.} 	 C6PAN21 = H3M3C4CO3 + NO2 : 	KBPAN 	;
+{14645.} 	 OH + C6PAN21 = PROL1MCHO + CO + NO2 : 	1.97D-12 	;
+{14646.} 	 H13M3C5OOH = H13M3C5O + OH : 	J(41) 	;
+{14647.} 	 OH + H13M3C5OOH = H13M3CO4C5 + OH : 	2.97D-11 	;
+{14648.} 	 OH + H13M3C5NO3 = H13M3CO4C5 + NO2 : 	6.00D-12 	;
+{14649.} 	 H13M3C5O = CH3CHO + MEKAOH + HO2 : 	2.00D+14*EXP(-4909/TEMP) 	;
+{14650.} 	 OH + H134M3C5 = H13M3CO4C5 + HO2 : 	1.45D-11 	;
+{14651.} 	 H13M3CO4C5 = CO2C3CHO + CH3CO3 + HO2 : 	J(22) 	;
+{14652.} 	 OH + H13M3CO4C5 = C613O2 : 	9.41D-12 	;
+{14653.} 	 C83O2 + HO2 = C83OOH : 	KRO2HO2*0.859 	;
+{14654.} 	 C83O2 + NO = C83O + NO2 : 	KRO2NO 	;
+{14655.} 	 C83O2 + NO3 = C83O + NO2 : 	KRO2NO3 	;
+{14656.} 	 C83O2 = C83O : 	8.80D-13*RO2 	;
+{14657.} 	 HO4C5CO3H = PE1ENEBO2 + OH : 	J(41) 	;
+{14658.} 	 OH + HO4C5CO3H = HO4C5CO3 : 	3.99D-11 	;
+{14659.} 	 C6PAN22 = HO4C5CO3 + NO2 : 	KBPAN 	;
+{14660.} 	 OH + C6PAN22 = C4OHCHO + CO + NO2 : 	1.33D-11 	;
+{14661.} 	 C95O2 + HO2 = C95OOH : 	KRO2HO2*0.890 	;
+{14662.} 	 C95O2 + NO = C95O + NO2 : 	KRO2NO 	;
+{14663.} 	 C95O2 + NO3 = C95O + NO2 : 	KRO2NO3 	;
+{14664.} 	 C95O2 = C95O : 	8.80D-13*RO2 	;
+{14665.} 	 HO5C6CO3H = HO5C6O2 + OH : 	J(41) 	;
+{14666.} 	 OH + HO5C6CO3H = HO5C6CO3 : 	4.13D-11 	;
+{14667.} 	 C7PAN2 = HO5C6CO3 + NO2 : 	KBPAN 	;
+{14668.} 	 OH + C7PAN2 = HO5C5CHO + CO + NO2 : 	1.49D-11 	;
+{14669.} 	 C105O2 + HO2 = C105OOH : 	KRO2HO2*0.914 	;
+{14670.} 	 C105O2 + NO = C105O + NO2 : 	KRO2NO 	;
+{14671.} 	 C105O2 + NO3 = C105O + NO2 : 	KRO2NO3 	;
+{14672.} 	 C105O2 = C105O : 	8.80D-13*RO2 	;
+{14673.} 	 HO6C7CO3H = HO6C7O2 + OH : 	J(41) 	;
+{14674.} 	 OH + HO6C7CO3H = HO6C7CO3 : 	4.27D-11 	;
+{14675.} 	 C8PAN1 = HO6C7CO3 + NO2 : 	KBPAN 	;
+{14676.} 	 OH + C8PAN1 = HCHO + C5H11CHO + CO + NO2 : 	1.63D-11 	;
+{14677.} 	 C115O2 + HO2 = C115OOH : 	KRO2HO2*0.932 	;
+{14678.} 	 C115O2 + NO = C115O + NO2 : 	KRO2NO 	;
+{14679.} 	 C115O2 + NO3 = C115O + NO2 : 	KRO2NO3 	;
+{14680.} 	 C115O2 = C115O : 	8.80D-13*RO2 	;
+{14681.} 	 HO7C8CO3H = HO7C8O2 + OH : 	J(41) 	;
+{14682.} 	 OH + HO7C8CO3H = HO7C8CO3 : 	4.41D-11 	;
+{14683.} 	 C9PAN1 = HO7C8CO3 + NO2 : 	KBPAN 	;
+{14684.} 	 OH + C9PAN1 = HCHO + C6H13CHO + CO + NO2 : 	1.77D-11 	;
+{14685.} 	 C125O2 + HO2 = C125OOH : 	KRO2HO2*0.947 	;
+{14686.} 	 C125O2 + NO = C125O + NO2 : 	KRO2NO 	;
+{14687.} 	 C125O2 + NO3 = C125O + NO2 : 	KRO2NO3 	;
+{14688.} 	 C125O2 = C125O : 	8.80D-13*RO2 	;
+{14689.} 	 HO8C9CO3H = HO8C9O2 + OH : 	J(41) 	;
+{14690.} 	 OH + HO8C9CO3H = HO8C9CO3 : 	4.55D-11 	;
+{14691.} 	 C10PAN1 = HO8C9CO3 + NO2 : 	KBPAN 	;
+{14692.} 	 OH + C10PAN1 = CH3CHO + C6H13CHO + CO + NO2 : 	1.91D-11 	;
+{14693.} 	 NC4DCO2 = MALANHY + NO2 : 	KDEC 	;
+{14694.} 	 C4CO2DBCO3 + HO2 = C4CO2DCO3H : 	KAPHO2*0.56 	;
+{14695.} 	 C4CO2DBCO3 + HO2 = HO2 + CO + C33CO + OH : 	KAPHO2*0.44 	;
+{14696.} 	 C4CO2DBCO3 + NO = HO2 + CO + C33CO + NO2 : 	KAPNO 	;
+{14697.} 	 C4CO2DBCO3 + NO2 = C4CO2DBPAN : 	KFPAN 	;
+{14698.} 	 C4CO2DBCO3 + NO3 = HO2 + CO + C33CO + NO2 : 	KRO2NO3*1.74 	;
+{14699.} 	 C4CO2DBCO3 = HO2 + CO + C33CO : 	1.00D-11*RO2 	;
+{14700.} 	 C5COOHCO3H + OH = C5CO2OHCO3 : 	8.01D-11 	;
+{14701.} 	 C5COOHCO3H = HOCOC4DIAL + HO2 + CO + OH : 	J(41) 	;
+{14702.} 	 C5CO2OHPAN + OH = HOCOC4DIAL + CO + CO + NO2 : 	7.66D-11 	;
+{14703.} 	 C5CO2OHPAN = C5CO2OHCO3 + NO2 : 	KBPAN 	;
+{14704.} 	 C5CO2DBCO3 + HO2 = C5CO2DCO3H : 	KAPHO2*0.56 	;
+{14705.} 	 C5CO2DBCO3 + HO2 = CH3CO3 + C33CO + OH : 	KAPHO2*0.44 	;
+{14706.} 	 C5CO2DBCO3 + NO = CH3CO3 + C33CO + NO2 : 	KAPNO 	;
+{14707.} 	 C5CO2DBCO3 + NO2 = C5CO2DBPAN : 	KFPAN 	;
+{14708.} 	 C5CO2DBCO3 + NO3 = CH3CO3 + C33CO + NO2 : 	KRO2NO3*1.74 	;
+{14709.} 	 C5CO2DBCO3 = CH3CO3 + C33CO : 	1.00D-11*RO2 	;
+{14710.} 	 C6COOHCO3H + OH = C6CO2OHCO3 : 	9.29D-11 	;
+{14711.} 	 C6COOHCO3H = C5134CO2OH + HO2 + CO + OH : 	J(41) 	;
+{14712.} 	 C6CO2OHPAN + OH = C5134CO2OH + CO + CO + NO2 : 	8.96D-11 	;
+{14713.} 	 C6CO2OHPAN = C6CO2OHCO3 + NO2 : 	KBPAN 	;
+{14714.} 	 NC4MDCO2 = MMALANHY + NO2 : 	KDEC 	;
+{14715.} 	 C4DBM2CO3 + HO2 = C4DBM2CO3H : 	KAPHO2*0.56 	;
+{14716.} 	 C4DBM2CO3 + HO2 = CO23C3CHO + CH3CO3 + OH : 	KAPHO2*0.44 	;
+{14717.} 	 C4DBM2CO3 + NO = CO23C3CHO + CH3CO3 + NO2 : 	KAPNO 	;
+{14718.} 	 C4DBM2CO3 + NO2 = C4DBM2PAN : 	KFPAN 	;
+{14719.} 	 C4DBM2CO3 + NO3 = CO23C3CHO + CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{14720.} 	 C4DBM2CO3 = CO23C3CHO + CH3CO3 : 	1.00D-11*RO2 	;
+{14721.} 	 C5M2OHCO3H + OH = C5M2OHOCO3 : 	9.83D-11 	;
+{14722.} 	 C5M2OHCO3H = C5134CO2OH + CH3CO3 + OH : 	J(41) 	;
+{14723.} 	 C5M2OHOPAN + OH = C5134CO2OH + CH3CO3 + NO2 : 	9.51D-11 	;
+{14724.} 	 C5M2OHOPAN = C5M2OHOCO3 + NO2 : 	KBPAN 	;
+{14725.} 	 C5COHOCO3H + OH = C4COMOHCO3 : 	4.16D-12 	;
+{14726.} 	 C5COHOCO3H = C5CO234 + OH + HO2 : 	J(41)+J(35) 	;
+{14727.} 	 C4COMOHPAN + OH = C5CO234 + CO + NO2 : 	5.66D-13 	;
+{14728.} 	 C4COMOHPAN = C4COMOHCO3 + NO2 : 	KBPAN 	;
+{14729.} 	 C23O3MCO2H + OH = C23O3MO2 : 	6.58D-12 	;
+{14730.} 	 C23O3MCO3H + OH = C23O3MCO3 : 	9.69D-12 	;
+{14731.} 	 C23O3MCO3H = OH + C23O3MO2 : 	J(41) 	;
+{14732.} 	 C23O3MCPAN + OH = CO + ACECOCOCH3 + NO2 : 	6.46D-12 	;
+{14733.} 	 C23O3MCPAN = C23O3MCO3 + NO2 : 	KBPAN 	;
+{14734.} 	 C23O3CCO2H + OH = MCOCOMOXO2 : 	8.76D-13 	;
+{14735.} 	 C23O3CCO3H + OH = C23O3CCO3 : 	4.34D-12 	;
+{14736.} 	 C23O3CCO3H = OH + MCOCOMOXO2 : 	J(41) 	;
+{14737.} 	 C23O3CPAN + OH = CO + C23O3CHO + NO2 : 	7.36D-13 	;
+{14738.} 	 C23O3CPAN = C23O3CCO3 + NO2 : 	KBPAN 	;
+{14739.} 	 C5CO3OH + OH = C54CO + HO2 : 	2.15D-11 	;
+{14740.} 	 C5CO3OH = C33CO + CH3CO3 + HO2 : 	J(22)+J(34) 	;
+{14741.} 	 C7CO2OCO3H + OH = C7CO2OHCO3 : 	2.75D-11 	;
+{14742.} 	 C7CO2OCO3H = C5CO3OH + CH3CO3 + OH : 	J(41) 	;
+{14743.} 	 C7CO2OHPAN + OH = C5CO3OH + CH3CO3 + NO2 : 	2.42D-11 	;
+{14744.} 	 C7CO2OHPAN = C7CO2OHCO3 + NO2 : 	KBPAN 	;
+{14745.} 	 C5DBCO2CO3 + HO2 = C5DCO2CO3H : 	KAPHO2*0.56 	;
+{14746.} 	 C5DBCO2CO3 + HO2 = CO23C3CHO + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{14747.} 	 C5DBCO2CO3 + NO = CO23C3CHO + HO2 + CO + NO2 : 	KAPNO 	;
+{14748.} 	 C5DBCO2CO3 + NO2 = C5DBCO2PAN : 	KFPAN 	;
+{14749.} 	 C5DBCO2CO3 + NO3 = CO23C3CHO + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{14750.} 	 C5DBCO2CO3 = CO23C3CHO + HO2 + CO : 	1.00D-11*RO2 	;
+{14751.} 	 C6MOCOCO3H + OH = C6MOHCOCO3 : 	2.75D-11 	;
+{14752.} 	 C6MOCOCO3H = DMKCOOH + HO2 + CO + OH : 	J(41) 	;
+{14753.} 	 C6MOHCOPAN + OH = DMKCOOH + CO + NO2 : 	2.42D-11 	;
+{14754.} 	 C6MOHCOPAN = C6MOHCOCO3 + NO2 : 	KBPAN 	;
+{14755.} 	 C7CO2DBCO3 + HO2 = C2H5CO3 + C33CO + OH : 	KAPHO2*0.44 	;
+{14756.} 	 C7CO2DBCO3 + HO2 = C7CO2DCO3H : 	KAPHO2*0.56 	;
+{14757.} 	 C7CO2DBCO3 + NO = C2H5CO3 + C33CO + NO2 : 	KAPNO 	;
+{14758.} 	 C7CO2DBCO3 + NO2 = C7CO2DBPAN : 	KFPAN 	;
+{14759.} 	 C7CO2DBCO3 + NO3 = C2H5CO3 + C33CO + NO2 : 	KRO2NO3*1.74 	;
+{14760.} 	 C7CO2DBCO3 = C2H5CO3 + C33CO : 	1.00D-11*RO2 	;
+{14761.} 	 C7OHO2CO3H + OH = C7OHCO2CO3 : 	9.46D-11 	;
+{14762.} 	 C7OHO2CO3H = C6134CO2OH + HO2 + CO + OH : 	J(41)+J(17)+J(22) 	;
+{14763.} 	 C7OHCO2PAN + OH = C6134CO2OH + CO + CO + NO2 : 	9.14D-11 	;
+{14764.} 	 C7OHCO2PAN = C7OHCO2CO3 + NO2 : 	KBPAN 	;
+{14765.} 	 NC4EDCO2 = EMALANHY + NO2 : 	KDEC 	;
+{14766.} 	 ECO3CO3H + OH = ECO3CO3 : 	6.09D-12 	;
+{14767.} 	 ECO3CO3H = C2H5CO3 + CO + CO + OH : 	J(41)+J(35)*2 	;
+{14768.} 	 ECO3PAN + OH = CH3CHO + CO + CO + CO + NO2 : 	2.49D-12 	;
+{14769.} 	 ECO3PAN = ECO3CO3 + NO2 : 	KBPAN 	;
+{14770.} 	 C8CO2DBCO3 + HO2 = C3H7CO3 + C33CO + OH : 	KAPHO2*0.44 	;
+{14771.} 	 C8CO2DBCO3 + HO2 = C8CO2DCO3H : 	KAPHO2*0.56 	;
+{14772.} 	 C8CO2DBCO3 + NO = C3H7CO3 + C33CO + NO2 : 	KAPNO 	;
+{14773.} 	 C8CO2DBCO3 + NO2 = C8CO2DBPAN : 	KFPAN 	;
+{14774.} 	 C8CO2DBCO3 + NO3 = C3H7CO3 + C33CO + NO2 : 	KRO2NO3*1.74 	;
+{14775.} 	 C8CO2DBCO3 = C3H7CO3 + C33CO : 	1.00D-11*RO2 	;
+{14776.} 	 C8OHO2CO3H + OH = C8OHCO2CO3 : 	9.62D-11 	;
+{14777.} 	 C8OHO2CO3H = C61CHO + HO2 + CO + OH : 	J(41)+J(17)+J(22) 	;
+{14778.} 	 C8OHCO2PAN + OH = C61CHO + CO + CO + NO2 : 	9.29D-11 	;
+{14779.} 	 C8OHCO2PAN = C8OHCO2CO3 + NO2 : 	KBPAN 	;
+{14780.} 	 NC4PDCO2 = PMALANHY + NO2 : 	KDEC 	;
+{14781.} 	 C8DBCO2CO3 + HO2 = C8DCO2CO3H : 	KAPHO2*0.56 	;
+{14782.} 	 C8DBCO2CO3 + HO2 = IPRCO3 + C33CO + OH : 	KAPHO2*0.44 	;
+{14783.} 	 C8DBCO2CO3 + NO = IPRCO3 + C33CO + NO2 : 	KAPNO 	;
+{14784.} 	 C8DBCO2CO3 + NO2 = C8DBCO2PAN : 	KFPAN 	;
+{14785.} 	 C8DBCO2CO3 + NO3 = IPRCO3 + C33CO + NO2 : 	KRO2NO3*1.74 	;
+{14786.} 	 C8DBCO2CO3 = IPRCO3 + C33CO : 	1.00D-11*RO2 	;
+{14787.} 	 C8O2OHCO3H + OH = C8CO2OHCO3 : 	9.68D-11 	;
+{14788.} 	 C8O2OHCO3H = C62CHO + HO2 + CO + OH : 	J(41)+J(17)+J(22) 	;
+{14789.} 	 C8CO2OHPAN + OH = C62CHO + CO + CO + NO2 : 	9.35D-11 	;
+{14790.} 	 C8CO2OHPAN = C8CO2OHCO3 + NO2 : 	KBPAN 	;
+{14791.} 	 NC4IPDCO2 = IPMALANHY + NO2 : 	KDEC 	;
+{14792.} 	 NDMMALYOOH + OH = NDMMALYO2 : 	4.60D-12 	;
+{14793.} 	 NDMMALYOOH = NDMMALYO + OH : 	J(41) 	;
+{14794.} 	 NDMMALYO = BIACET + CO + NO2 : 	KDEC 	;
+{14795.} 	 DMMALYOOH + OH = DMMALYO2 : 	4.79D-12 	;
+{14796.} 	 DMMALYOOH = DMMALYO + OH : 	J(41) 	;
+{14797.} 	 DMMALYO = CO2OH3MCO3 : 	KDEC 	;
+{14798.} 	 DMMALYOH + OH = DMMALYO : 	1.34D-12 	;
+{14799.} 	 C7MOCOCO3H + OH = C7MOHCOCO3 : 	3.30D-11 	;
+{14800.} 	 C7MOCOCO3H = DMKCOOH + CH3CO3 + OH : 	J(41) 	;
+{14801.} 	 C7MOHCOPAN + OH = DMKCOOH + CO + NO2 : 	2.97D-11 	;
+{14802.} 	 C7MOHCOPAN = C7MOHCOCO3 + NO2 : 	KBPAN 	;
+{14803.} 	 C5CO23CHO + OH = C2H5CO3 + CO + CO : 	1.48D-11 	;
+{14804.} 	 C5CO23CHO = C2H5CO3 + CO + HO2 + CO : 	J(35) 	;
+{14805.} 	 C5CO23CHO = C2H5O2 + CO + CO + HO2 : 	J(34) 	;
+{14806.} 	 C4DBMECO3 + HO2 = C4DBMECO3H : 	KAPHO2*0.56 	;
+{14807.} 	 C4DBMECO3 + HO2 = C5CO23CHO + CH3CO3 + OH : 	KAPHO2*0.44 	;
+{14808.} 	 C4DBMECO3 + NO = C5CO23CHO + CH3CO3 + NO2 : 	KAPNO 	;
+{14809.} 	 C4DBMECO3 + NO2 = C4DBMEPAN : 	KFPAN 	;
+{14810.} 	 C4DBMECO3 + NO3 = C5CO23CHO + CH3CO3 + NO2 : 	KRO2NO3*1.74 	;
+{14811.} 	 C4DBMECO3 = C5CO23CHO + CH3CO3 : 	1.00D-11*RO2 	;
+{14812.} 	 C5MEJCO3H + OH = C5MEJCO3 : 	1.00D-10 	;
+{14813.} 	 C5MEJCO3H = C6134CO2OH + CH3CO3 + OH : 	J(41) 	;
+{14814.} 	 C5MEJPAN + OH = C6134CO2OH + CH3CHO + NO2 : 	9.68D-11 	;
+{14815.} 	 C5MEJPAN = C5MEJCO3 + NO2 : 	KBPAN 	;
+{14816.} 	 C5DBECO3 + HO2 = C5DBECO3H : 	KAPHO2*0.56 	;
+{14817.} 	 C5DBECO3 + HO2 = CO234C6 + HO2 + CO + OH : 	KAPHO2*0.44 	;
+{14818.} 	 C5DBECO3 + NO = CO234C6 + HO2 + CO + NO2 : 	KAPNO 	;
+{14819.} 	 C5DBECO3 + NO2 = C5DBEPAN : 	KFPAN 	;
+{14820.} 	 C5DBECO3 + NO3 = CO234C6 + HO2 + CO + NO2 : 	KRO2NO3*1.74 	;
+{14821.} 	 C5DBECO3 = CO234C6 + HO2 + CO : 	1.00D-11*RO2 	;
+{14822.} 	 C6EO2HCO3H + OH = C6EO2OHCO3 : 	2.92D-11 	;
+{14823.} 	 C6EO2HCO3H = C5CO3OH + C2H5CO3 + OH : 	J(41) 	;
+{14824.} 	 C6EO2OHPAN + OH = C5CO3OH + C2H5CHO + NO2 : 	2.56D-11 	;
+{14825.} 	 C6EO2OHPAN = C6EO2OHCO3 + NO2 : 	KBPAN 	;
+{14826.} 	 C5EDBCO3 + HO2 = C5EDBCO3H : 	KAPHO2*0.56 	;
+{14827.} 	 C5EDBCO3 + HO2 = CO23C3CHO + C2H5CO3 + OH : 	KAPHO2*0.44 	;
+{14828.} 	 C5EDBCO3 + NO = CO23C3CHO + C2H5CO3 + NO2 : 	KAPNO 	;
+{14829.} 	 C5EDBCO3 + NO2 = C5EDBPAN : 	KFPAN 	;
+{14830.} 	 C5EDBCO3 + NO3 = CO23C3CHO + C2H5CO3 + NO2 : 	KRO2NO3*1.74 	;
+{14831.} 	 C5EDBCO3 = CO23C3CHO + C2H5CO3 : 	1.00D-11*RO2 	;
+{14832.} 	 C7MJPCO3H + OH = C7MJPCO3 : 	2.86D-11 	;
+{14833.} 	 C7MJPCO3H = C7EDCCO + HO2 + CO + OH : 	J(41) 	;
+{14834.} 	 C7MJPPAN + OH = C7EDCCO + CO + NO2 : 	2.54D-11 	;
+{14835.} 	 C7MJPPAN = C7MJPCO3 + NO2 : 	KBPAN 	;
+{14836.} 	 C23O3ECO2H + OH = C23O3EO2 : 	1.11D-11 	;
+{14837.} 	 C23O3ECO3H + OH = C23O3ECO3 : 	1.42D-11 	;
+{14838.} 	 C23O3ECO3H = OH + C23O3EO2 : 	J(41) 	;
+{14839.} 	 C23O3ECPAN + OH = CO + C23O3EHO + NO2 : 	1.10D-11 	;
+{14840.} 	 C23O3ECPAN = C23O3ECO3 + NO2 : 	KBPAN 	;
+{14841.} 	 EMPONO2OOH + OH = EMPOHNO2O2 : 	1.46D-10 	;
+{14842.} 	 EMPONO2OOH = EMPOHNO2O + OH : 	J(41) 	;
+{14843.} 	 EMPOHNO2O = C3EODBCO2H + CH3O2 + CO + NO2 : 	KDEC 	;
+{14844.} 	 COHM2CO2H + OH = GLYOX + HO2 : 	2.16D-11 	;
+{14845.} 	 COHM2CO2H = HCOCO2H + CO + HO2 : 	J(17) 	;
+{14846.} 	 COHM2CO3H + OH = COHM2CO3 : 	2.47D-11 	;
+{14847.} 	 COHM2CO3H = GLYOX + HO2 + OH : 	J(41) 	;
+{14848.} 	 COHM2CO3H = HCOCO3H + CO + HO2 : 	J(17) 	;
+{14849.} 	 COHM2PAN + OH = GLYOX + NO3 : 	2.11D-11 	;
+{14850.} 	 COHM2PAN = COHM2CO3 + NO2 : 	KBPAN 	;
+{14851.} 	 COHM2PAN = GLYPAN + CO + HO2 : 	J(17) 	;
+{14852.} 	 INANCOCO2H = NO3CH2CO3 + CH3COCO2H + NO2 : 	J(56)+J(57) 	;
+{14853.} 	 OH + INANCOCO2H = NO2 + CO23C4NO3 : 	9.35D-13 	;
+{14854.} 	 INANCOCO3H = NO2 + CO23C4NO3 + OH : 	J(41) 	;
+{14855.} 	 INANCOCO3H = NO3CH2CO3 + CH3COCO3H + NO2 : 	J(56)+J(57) 	;
+{14856.} 	 OH + INANCOCO3H = INANCOCO3 : 	4.02D-12 	;
+{14857.} 	 INANCOPAN = INANCOCO3 + NO2 : 	KBPAN 	;
+{14858.} 	 INANCOPAN = NO3CH2CO3 + CH3COPAN + NO2 : 	J(56)+J(57) 	;
+{14859.} 	 OH + INANCOPAN = NO3 + CO23C4NO3 : 	4.15D-13 	;
+{14860.} 	 HMVKNGLYOX + OH = CO + CO + HOCH2CHO + NO2 : 	1.36D-11 	;
+{14861.} 	 HMVKNGLYOX = CO + CO + HOCH2CHO + NO2 + HO2 : 	J(34) 	;
+{14862.} 	 MMALNBCO2H + OH = CO2H3CHO + NO2 : 	2.23D-11 	;
+{14863.} 	 MMALNBCO2H = CONM2CO2H + HO2 + CO + HO2 : 	J(15) 	;
+{14864.} 	 MMALNBCO3H + OH = MMALNBCO3 : 	2.59D-11 	;
+{14865.} 	 MMALNBCO3H = CO2H3CHO + NO2 + OH : 	J(41) 	;
+{14866.} 	 MMALNBCO3H = CONM2CO3H + HO2 + CO + HO2 : 	J(15) 	;
+{14867.} 	 MMALNBPAN + OH = CO2H3CHO + NO2 + NO3 : 	2.18D-11 	;
+{14868.} 	 MMALNBPAN = CONM2PAN + HO2 + CO + HO2 : 	J(15) 	;
+{14869.} 	 MMALNBPAN = MMALNBCO3 + NO2 : 	KBPAN 	;
+{14870.} 	 MECOFORMO2 + HO2 = MECOFOROOH : 	KRO2HO2*0.520 	;
+{14871.} 	 MECOFORMO2 + NO = MECOFORMO + NO2 : 	KRO2NO 	;
+{14872.} 	 MECOFORMO2 + NO3 = MECOFORMO + NO2 : 	KRO2NO3 	;
+{14873.} 	 MECOFORMO2 = MECOFORMO : 	8.80D-13*RO2 	;
+{14874.} 	 HO13C3CO3H = HOC2H4CHO + HO2 + OH : 	J(41) 	;
+{14875.} 	 OH + HO13C3CO3H = HO13C3CO3 : 	1.86D-11 	;
+{14876.} 	 C4PAN2 = HO13C3CO3 + NO2 : 	KBPAN 	;
+{14877.} 	 OH + C4PAN2 = HOC2H4CHO + CO + NO2 : 	8.22D-12 	;
+{14878.} 	 C5CO23OOH + OH = C5CO23O2 : 	1.31D-11 	;
+{14879.} 	 C5CO23OOH = C5CO23O + OH : 	J(41) 	;
+{14880.} 	 C5CO23O = C2H5CO3 + HCHO + CO : 	KDEC 	;
+{14881.} 	 CHOC2CO2H + OH = CHOC2H4O2 : 	2.64D-11 	;
+{14882.} 	 CHOC2CO3H + OH = CHOC2CO3 : 	3.00D-11 	;
+{14883.} 	 CHOC2CO3H = CHOC2H4O2 + OH : 	J(41)+J(15) 	;
+{14884.} 	 CHOC2PAN + OH = HCOCH2CHO + CO + NO2 : 	2.64D-11 	;
+{14885.} 	 CHOC2PAN = CHOC2CO3 + NO2 : 	KBPAN 	;
+{14886.} 	 CHOC3COOOH + OH = CHOC3COCO3 : 	7.55D-11 	;
+{14887.} 	 CHOC3COOOH = CHOC3COO2 + OH : 	J(41)+J(22)+J(15) 	;
+{14888.} 	 CHOC3COPAN + OH = C4CODIAL + CO + NO2 : 	7.19D-11 	;
+{14889.} 	 CHOC3COPAN = CHOC3COCO3 + NO2 : 	KBPAN 	;
+{14890.} 	 C5124COO2 + HO2 = C5124COOOH : 	KRO2HO2*0.706 	;
+{14891.} 	 C5124COO2 + NO = C5124COO + NO2 : 	KRO2NO 	;
+{14892.} 	 C5124COO2 + NO3 = C5124COO + NO2 : 	KRO2NO3 	;
+{14893.} 	 C5124COO2 = C5124COO : 	2.00D-12*RO2 	;
+{14894.} 	 C5TRONCO3H + OH = C5124COCO3 : 	1.68D-11 	;
+{14895.} 	 C5TRONCO3H = C5124COO2 + OH : 	J(41)+J(22)+J(34) 	;
+{14896.} 	 C5124COPAN + OH = C4CODIAL + CO + CO + NO2 : 	1.32D-11 	;
+{14897.} 	 C5124COPAN = C5124COCO3 + NO2 : 	KBPAN 	;
+{14898.} 	 C235C6CO3H + OH = CO235C6CO3 : 	4.75D-12 	;
+{14899.} 	 C235C6CO3H = CO235C6O2 + OH : 	J(41)+J(35) 	;
+{14900.} 	 CO235C6O2 + HO2 = CO235C6OOH : 	KRO2HO2*0.770 	;
+{14901.} 	 CO235C6O2 + NO = CO235C6O + NO2 : 	KRO2NO 	;
+{14902.} 	 CO235C6O2 + NO3 = CO235C6O + NO2 : 	KRO2NO3 	;
+{14903.} 	 CO235C6O2 = CO235C6O : 	2.00D-12*RO2 	;
+{14904.} 	 C7PAN3 + OH = CO235C5CHO + CO + NO2 : 	8.83D-13 	;
+{14905.} 	 C7PAN3 = CO235C6CO3 + NO2 : 	KBPAN 	;
+{14906.} 	 C716O2 + HO2 = C716OOH : 	KRO2HO2*0.820 	;
+{14907.} 	 C716O2 + NO = C716O + NO2 : 	KRO2NO 	;
+{14908.} 	 C716O2 + NO3 = C716O + NO2 : 	KRO2NO3 	;
+{14909.} 	 C716O2 = C716O : 	8.80D-13*0.6*RO2 	;
+{14910.} 	 C716O2 = C716OH : 	8.80D-13*0.2*RO2 	;
+{14911.} 	 C716O2 = CO235C6CHO : 	8.80D-13*0.2*RO2 	;
+{14912.} 	 NC71OOH + OH = NC71O2 : 	3.25D-11 	;
+{14913.} 	 NC71OOH = NC71O + OH : 	J(41) 	;
+{14914.} 	 NC71O = CO235C6CHO + NO2 : 	4.00D+04 	;
+{14915.} 	 NC71O = NC71CO + HO2 : 	KROSEC*O2 	;
+{14916.} 	 C811OOH + OH = C721CHO + OH : 	1.70D-11 	;
+{14917.} 	 C811OOH = C811O + OH : 	J(41) 	;
+{14918.} 	 C811NO3 + OH = C721CHO + NO2 : 	3.29D-12 	;
+{14919.} 	 C811NO3 = C811O + NO2 : 	J(53) 	;
+{14920.} 	 C811O = C812O2 : 	KDEC 	;
+{14921.} 	 C721CHO + NO3 = C721CO3 + HNO3 : 	KNO3AL*8.5 	;
+{14922.} 	 C721CHO + OH = C721CO3 : 	2.63D-11 	;
+{14923.} 	 C721CHO = C721O2 + CO + HO2 : 	J(15) 	;
+{14924.} 	 C811OH + OH = C721CHO + HO2 : 	7.89D-12 	;
+{14925.} 	 C413COOOH + OH = CHOC3COO2 : 	8.33D-11 	;
+{14926.} 	 C413COOOH = CHOC3COO + OH : 	J(41)+J(22)+J(15) 	;
+{14927.} 	 CHOC3COO = HCOCH2CO3 + HCHO : 	KDEC 	;
+{14928.} 	 C922O2 + HO2 = C922OOH : 	KRO2HO2*0.890 	;
+{14929.} 	 C922O2 + NO = C922O + NO2 : 	KRO2NO 	;
+{14930.} 	 C922O2 + NO3 = C922O + NO2 : 	KRO2NO3 	;
+{14931.} 	 C922O2 = C922O : 	6.70D-15*RO2 	;
+{14932.} 	 C614CO + OH = CO235C5CHO + HO2 : 	3.22D-12 	;
+{14933.} 	 C614CO = BIACETO2 + HOCH2CO3 : 	J(22) 	;
+{14934.} 	 C614O2 + HO2 = C614OOH : 	KRO2HO2*0.770 	;
+{14935.} 	 C614O2 + NO = C614NO3 : 	KRO2NO*0.098 	;
+{14936.} 	 C614O2 + NO = C614O + NO2 : 	KRO2NO*0.902 	;
+{14937.} 	 C614O2 + NO3 = C614O + NO2 : 	KRO2NO3 	;
+{14938.} 	 C614O2 = C614CO : 	8.80D-13*0.2*RO2 	;
+{14939.} 	 C614O2 = C614O : 	8.80D-13*0.6*RO2 	;
+{14940.} 	 C614O2 = C614OH : 	8.80D-13*0.2*RO2 	;
+{14941.} 	 C511O2 + HO2 = C511OOH : 	KRO2HO2*0.706 	;
+{14942.} 	 C511O2 + NO = C511O + NO2 : 	KRO2NO 	;
+{14943.} 	 C511O2 + NO3 = C511O + NO2 : 	KRO2NO3 	;
+{14944.} 	 C511O2 = C511O : 	8.80D-13*RO2 	;
+{14945.} 	 H3C25CCO2H + OH = H3C25C6O2 : 	2.39D-11 	;
+{14946.} 	 H3C25CCO2H = H3C25C6O2 + HO2 : 	J(22)*2 	;
+{14947.} 	 H3C25CCO3H + OH = H3C25C6CO3 : 	2.70D-11 	;
+{14948.} 	 H3C25CCO3H = H3C25C6O2 + OH : 	J(41)+J(22)*2 	;
+{14949.} 	 H3C25C6PAN + OH = H3C25C5CHO + CO + NO2 : 	2.29D-11 	;
+{14950.} 	 H3C25C6PAN = H3C25C6CO3 + NO2 : 	KBPAN 	;
+{14951.} 	 H3C25C6OOH + OH = H3C25C5CHO + OH : 	3.23D-11 	;
+{14952.} 	 H3C25C6OOH = H3C25C6O + OH : 	J(41)+J(22)*2 	;
+{14953.} 	 H3C25C6O = H3C2C4CO3 + HCHO : 	KDEC 	;
+{14954.} 	 H3C25C5CHO + OH = H3C2C4CO3 + CO : 	3.55D-11 	;
+{14955.} 	 H3C25C5CHO = H3C2C4CO3 + CO + HO2 : 	J(34) 	;
+{14956.} 	 H3C25C6OH + OH = C614CO + HO2 : 	2.54D-11*0.890 	;
+{14957.} 	 H3C25C6OH + OH = H3C25C5CHO + HO2 : 	2.54D-11*0.110 	;
+{14958.} 	 H3C25C6OH = HMVKAO2 + HOCH2CO3 : 	J(22)*2 	;
+{14959.} 	 C620O2 + HO2 = C620OOH : 	KRO2HO2*0.770 	;
+{14960.} 	 C620O2 + NO = C620O + NO2 : 	KRO2NO 	;
+{14961.} 	 C620O2 + NO3 = C620O + NO2 : 	KRO2NO3 	;
+{14962.} 	 C620O2 = C515CHO : 	8.80D-13*RO2*0.2 	;
+{14963.} 	 C620O2 = C620O : 	8.80D-13*RO2*0.6 	;
+{14964.} 	 C620O2 = C620OH : 	8.80D-13*RO2*0.2 	;
+{14965.} 	 C87CO3 + HO2 = C87CO2H + O3 : 	KAPHO2*0.15 	;
+{14966.} 	 C87CO3 + HO2 = C87CO3H : 	KAPHO2*0.41 	;
+{14967.} 	 C87CO3 + HO2 = C87O2 + OH : 	KAPHO2*0.44 	;
+{14968.} 	 C87CO3 + NO = C87O2 + NO2 : 	KAPNO 	;
+{14969.} 	 C87CO3 + NO2 = C87PAN : 	KFPAN 	;
+{14970.} 	 C87CO3 + NO3 = C87O2 + NO2 : 	KRO2NO3*1.74 	;
+{14971.} 	 C87CO3 = C87CO2H : 	1.00D-11*RO2*0.3 	;
+{14972.} 	 C87CO3 = C87O2 : 	1.00D-11*RO2*0.7 	;
+{14973.} 	 CO123C5CHO + NO3 = CHOC2CO3 + CO + CO + HNO3 : 	2*KNO3AL*5.5 	;
+{14974.} 	 CO123C5CHO + OH = CHOC2CO3 + CO + CO : 	3.89D-11 	;
+{14975.} 	 CO123C5CHO = CHOC2CO3 + HO2 + CO + CO : 	J(34)+J(15)+J(35) 	;
+{14976.} 	 C616O2 + HO2 = C616OOH : 	KRO2HO2*0.770 	;
+{14977.} 	 C616O2 + NO = C616O + NO2 : 	KRO2NO 	;
+{14978.} 	 C616O2 + NO3 = C616O + NO2 : 	KRO2NO3 	;
+{14979.} 	 C616O2 = C616O : 	8.80D-13*RO2*0.6 	;
+{14980.} 	 C616O2 = C616OH : 	8.80D-13*RO2*0.2 	;
+{14981.} 	 C616O2 = CO123C5CHO : 	8.80D-13*RO2*0.2 	;
+{14982.} 	 C718CO3 + HO2 = C718CO2H + O3 : 	KAPHO2*0.15 	;
+{14983.} 	 C718CO3 + HO2 = C718CO3H : 	KAPHO2*0.41 	;
+{14984.} 	 C718CO3 + HO2 = C718O2 + OH : 	KAPHO2*0.44 	;
+{14985.} 	 C718CO3 + NO = C718O2 + NO2 : 	KAPNO 	;
+{14986.} 	 C718CO3 + NO2 = C718PAN : 	KFPAN 	;
+{14987.} 	 C718CO3 + NO3 = C718O2 + NO2 : 	KRO2NO3*1.74 	;
+{14988.} 	 C718CO3 = C718CO2H : 	1.00D-11*0.3*RO2 	;
+{14989.} 	 C718CO3 = C718O2 : 	1.00D-11*0.7*RO2 	;
+{14990.} 	 C513O2 + HO2 = C513OOH : 	KRO2HO2*0.706 	;
+{14991.} 	 C513O2 + NO = C513O + NO2 : 	KRO2NO 	;
+{14992.} 	 C513O2 + NO3 = C513O + NO2 : 	KRO2NO3 	;
+{14993.} 	 C513O2 = C513CO : 	8.80D-13*RO2*0.2 	;
+{14994.} 	 C513O2 = C513O : 	8.80D-13*RO2*0.6 	;
+{14995.} 	 C513O2 = C513OH : 	8.80D-13*RO2*0.2 	;
+{14996.} 	 CO13C3CO2H + OH = HCOCH2CO3 : 	6.69D-11 	;
+{14997.} 	 CO13C3CO2H = HCOCH2CO3 + HO2 : 	J(34)+J(15) 	;
+{14998.} 	 C810OOH + OH = C810O2 : 	8.35D-11 	;
+{14999.} 	 C810OOH = C810O + OH : 	J(41)+J(15) 	;
+{15000.} 	 C810NO3 + OH = CH3COCH3 + CO13C4CHO + NO2 : 	4.96D-11 	;
+{15001.} 	 C810NO3 = C810O + NO2 : 	J(55)+J(15) 	;
+{15002.} 	 C810O = CH3COCH3 + C514O2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{15003.} 	 C810OH + OH = C810O : 	8.00D-11 	;
+{15004.} 	 C810OH = C810O + HO2 : 	J(15) 	;
+{15005.} 	 CO25C6CO3 + HO2 = C627O2 + OH : 	KAPHO2*0.44 	;
+{15006.} 	 CO25C6CO3 + HO2 = CO25C6CO2H + O3 : 	KAPHO2*0.15 	;
+{15007.} 	 CO25C6CO3 + HO2 = CO25C6CO3H : 	KAPHO2*0.41 	;
+{15008.} 	 CO25C6CO3 + NO = C627O2 + NO2 : 	KAPNO 	;
+{15009.} 	 CO25C6CO3 + NO2 = C627PAN : 	KFPAN 	;
+{15010.} 	 CO25C6CO3 + NO3 = C627O2 + NO2 : 	KRO2NO3*1.74 	;
+{15011.} 	 CO25C6CO3 = C627O2 : 	1.00D-11*RO2*0.7 	;
+{15012.} 	 C627O2 + HO2 = C627OOH : 	KRO2HO2*0.770 	;
+{15013.} 	 C627O2 + NO = C627O + NO2 : 	KRO2NO 	;
+{15014.} 	 C627O2 + NO3 = C627O + NO2 : 	KRO2NO3 	;
+{15015.} 	 C627O2 = C627O : 	2.50D-12*RO2*0.6 	;
+{15016.} 	 C627O2 = C627OH : 	2.50D-12*RO2*0.2 	;
+{15017.} 	 C627O2 = CO2C4GLYOX : 	2.50D-12*RO2*0.2 	;
+{15018.} 	 C818OOH + OH = C818CO + OH : 	3.94D-11 	;
+{15019.} 	 C818OOH = C517CHO + CH3CO3 + OH : 	J(22)*2 	;
+{15020.} 	 C818OOH = C818O + OH : 	J(41) 	;
+{15021.} 	 C818O = C517CHO + CH3CO3 : 	KDEC 	;
+{15022.} 	 C818CO + OH = C820O2 : 	1.41D-11 	;
+{15023.} 	 C818OH + OH = C818CO + HO2 : 	2.72D-11 	;
+{15024.} 	 C818OH = C517CHO + CH3CO3 + HO2 : 	J(22)*2 	;
+{15025.} 	 C727CO3H + OH = C727CO3 : 	1.05D-11 	;
+{15026.} 	 C727CO3H = C727O2 + OH : 	J(22)*2+J(41) 	;
+{15027.} 	 C727O2 + HO2 = C727OOH : 	KRO2HO2*0.820 	;
+{15028.} 	 C727O2 + NO = C727O + NO2 : 	KRO2NO 	;
+{15029.} 	 C727O2 + NO3 = C727O + NO2 : 	KRO2NO3 	;
+{15030.} 	 C727O2 = C727O : 	8.80D-13*RO2 	;
+{15031.} 	 C727PAN + OH = C727CO + CO + NO2 : 	6.89D-12 	;
+{15032.} 	 C727PAN = C727CO3 + NO2 : 	KBPAN 	;
+{15033.} 	 C511CO3 + HO2 = C511CO3H : 	KAPHO2*0.56 	;
+{15034.} 	 C511CO3 + HO2 = C511O2 + OH : 	KAPHO2*0.44 	;
+{15035.} 	 C511CO3 + NO = C511O2 + NO2 : 	KAPNO 	;
+{15036.} 	 C511CO3 + NO2 = C511PAN : 	KFPAN 	;
+{15037.} 	 C511CO3 + NO3 = C511O2 + NO2 : 	KRO2NO3*1.74 	;
+{15038.} 	 C511CO3 = C511O2 : 	1.00D-11*RO2 	;
+{15039.} 	 C517CO3 + HO2 = C517CO2H + O3 : 	KAPHO2*0.15 	;
+{15040.} 	 C517CO3 + HO2 = C517CO3H : 	KAPHO2*0.41 	;
+{15041.} 	 C517CO3 + HO2 = C517O2 + OH : 	KAPHO2*0.44 	;
+{15042.} 	 C517CO3 + NO = C517O2 + NO2 : 	KAPNO 	;
+{15043.} 	 C517CO3 + NO2 = C517PAN : 	KFPAN 	;
+{15044.} 	 C517CO3 + NO3 = C517O2 + NO2 : 	KRO2NO3*1.74 	;
+{15045.} 	 C517CO3 = C517CO2H : 	1.00D-11*RO2*0.3 	;
+{15046.} 	 C517CO3 = C517O2 : 	1.00D-11*RO2*0.7 	;
+{15047.} 	 C517O2 + HO2 = C517OOH : 	KRO2HO2*0.706 	;
+{15048.} 	 C517O2 + NO = C517NO3 : 	KRO2NO*0.052 	;
+{15049.} 	 C517O2 + NO = C517O + NO2 : 	KRO2NO*0.948 	;
+{15050.} 	 C517O2 + NO3 = C517O + NO2 : 	KRO2NO3 	;
+{15051.} 	 C517O2 = C517O : 	1.30D-12*RO2*0.6 	;
+{15052.} 	 C517O2 = C517OH : 	1.30D-12*RO2*0.2 	;
+{15053.} 	 C517O2 = HMVKBCHO : 	1.30D-12*RO2*0.2 	;
+{15054.} 	 NC728OOH + OH = NC728O2 : 	3.94D-11 	;
+{15055.} 	 NC728OOH = NC728O + OH : 	J(41) 	;
+{15056.} 	 NC728O = C517CHO + HCHO + NO2 : 	KDEC 	;
+{15057.} 	 NC728OH + OH = C517CHO + HCHO + NO2 : 	3.59D-11 	;
+{15058.} 	 C628O2 + HO2 = C628OOH : 	KRO2HO2*0.770 	;
+{15059.} 	 C628O2 + NO = C628O + NO2 : 	KRO2NO 	;
+{15060.} 	 C628O2 + NO3 = C628O + NO2 : 	KRO2NO3 	;
+{15061.} 	 C628O2 = C628O : 	9.20D-14*RO2*0.7 	;
+{15062.} 	 C628O2 = C628OH : 	9.20D-14*RO2*0.3 	;
+{15063.} 	 C728OOH + OH = C728O2 : 	4.52D-11 	;
+{15064.} 	 C728OOH = C728O + OH : 	J(41) 	;
+{15065.} 	 C728NO3 + OH = C517CHO + HCHO + NO2 : 	3.28D-11 	;
+{15066.} 	 C728O = C517CHO + HCHO + HO2 : 	KDEC 	;
+{15067.} 	 C728OH + OH = C517CHO + HCHO + HO2 : 	4.18D-11 	;
+{15068.} 	 C622OOH + OH = C518CHO + OH : 	7.17D-11 	;
+{15069.} 	 C622OOH = C622O + OH : 	J(41) 	;
+{15070.} 	 C622NO3 + OH = C518CHO + NO2 : 	5.64D-11 	;
+{15071.} 	 C622NO3 = C622O + NO2 : 	J(53) 	;
+{15072.} 	 C622O = C518CHO + HO2 : 	KROPRIM*O2 	;
+{15073.} 	 C518CHO + NO3 = C518CO3 + HNO3 : 	KNO3AL*8.5 	;
+{15074.} 	 C518CHO + NO3 = NC623O2 : 	3.30D-13 	;
+{15075.} 	 C518CHO + O3 = C520OOA + HCHO : 	1.30D-17*0.670 	;
+{15076.} 	 C518CHO + O3 = HMVKBCHO + CH2OOF : 	1.30D-17*0.330 	;
+{15077.} 	 C518CHO + OH = C518CO3 : 	8.70D-11*0.288 	;
+{15078.} 	 C518CHO + OH = C623O2 : 	8.70D-11*0.712 	;
+{15079.} 	 C518CHO = ISOPDO2 + CO + HO2 : 	J(15) 	;
+{15080.} 	 C622OH + OH = C518CHO + HO2 : 	6.29D-11 	;
+{15081.} 	 C824O2 + HO2 = C824OOH : 	KRO2HO2*0.859 	;
+{15082.} 	 C824O2 + NO = C824O + NO2 : 	KRO2NO 	;
+{15083.} 	 C824O2 + NO3 = C824O + NO2 : 	KRO2NO3 	;
+{15084.} 	 C824O2 = C824CO : 	8.80D-12*RO2*0.2 	;
+{15085.} 	 C824O2 = C824O : 	8.80D-12*RO2*0.6 	;
+{15086.} 	 C824O2 = C824OH : 	8.80D-12*RO2*0.2 	;
+{15087.} 	 C823OOH + OH = C823CO + OH : 	7.06D-11 	;
+{15088.} 	 C823OOH = C823O + OH : 	J(41) 	;
+{15089.} 	 C823NO3 + OH = C823CO + NO2 : 	5.53D-11 	;
+{15090.} 	 C823NO3 = C823O + NO2 : 	J(53) 	;
+{15091.} 	 C823O = C825O2 : 	KDEC 	;
+{15092.} 	 C823CO + OH = C825O2 : 	7.70D-11 	;
+{15093.} 	 C823CO = C825O2 + HO2 : 	J(15) 	;
+{15094.} 	 C823OH + OH = C823CO + HO2 : 	6.16D-11 	;
+{15095.} 	 C819OOH + OH = C819O2 : 	1.35D-11 	;
+{15096.} 	 C819OOH = C819O + OH : 	J(22)*2+J(41) 	;
+{15097.} 	 C819O = ACETOL + CO2C4CO3 : 	KDEC 	;
+{15098.} 	 C731CO2 = C731O2 : 	KDEC*0.2 	;
+{15099.} 	 C731CO2 = C732CO3 : 	KDEC*0.8 	;
+{15100.} 	 C731CO2H + OH = C731CO2 : 	3.88D-11 	;
+{15101.} 	 C731CO3H + OH = C731CO3 : 	4.18D-11 	;
+{15102.} 	 C731CO3H = C731CO2 + OH : 	J(41) 	;
+{15103.} 	 C731PAN + OH = C626CHO + CO + NO2 : 	3.82D-11 	;
+{15104.} 	 C731PAN = C731CO3 + NO2 : 	KBPAN 	;
+{15105.} 	 C1011OOH + OH = C1011CO + OH : 	1.41D-11 	;
+{15106.} 	 C1011OOH = C1011O + OH : 	J(41) 	;
+{15107.} 	 C1011NO3 + OH = C1011CO + NO2 : 	6.04D-12 	;
+{15108.} 	 C1011NO3 = C1011O + NO2 : 	J(54) 	;
+{15109.} 	 C1011O = C1012O2 : 	KDEC 	;
+{15110.} 	 C1011CO + OH = C1012O2 : 	7.01D-12 	;
+{15111.} 	 C1011OH + OH = C1011CO + HO2 : 	9.07D-12 	;
+{15112.} 	 C1211CO3 + HO2 = C1211CO2H + O3 : 	KAPHO2*0.15 	;
+{15113.} 	 C1211CO3 + HO2 = C1211CO3H : 	KAPHO2*0.41 	;
+{15114.} 	 C1211CO3 + HO2 = C1211O2 + OH : 	KAPHO2*0.44 	;
+{15115.} 	 C1211CO3 + NO = C1211O2 + NO2 : 	KAPNO 	;
+{15116.} 	 C1211CO3 + NO2 = C1211PAN : 	KFPAN 	;
+{15117.} 	 C1211CO3 + NO3 = C1211O2 + NO2 : 	KRO2NO3*1.74 	;
+{15118.} 	 C1211CO3 = C1211CO2H : 	1.00D-11*RO2*0.3 	;
+{15119.} 	 C1211CO3 = C1211O2 : 	1.00D-11*RO2*0.7 	;
+{15120.} 	 C133O2 + HO2 = C133OOH : 	KRO2HO2*0.959 	;
+{15121.} 	 C133O2 + NO = C133NO3 : 	KRO2NO*0.243 	;
+{15122.} 	 C133O2 + NO = C133O + NO2 : 	KRO2NO*0.757 	;
+{15123.} 	 C133O2 + NO3 = C133O + NO2 : 	KRO2NO3 	;
+{15124.} 	 C133O2 = C133CO : 	2.50D-13*RO2*0.2 	;
+{15125.} 	 C133O2 = C133O : 	2.50D-13*RO2*0.6 	;
+{15126.} 	 C133O2 = C133OH : 	2.50D-13*RO2*0.2 	;
+{15127.} 	 C137OOH + OH = C137CO + OH : 	7.06D-11 	;
+{15128.} 	 C137OOH = C137O + OH : 	J(41) 	;
+{15129.} 	 C137NO3 + OH = C137CO + NO2 : 	5.53D-11 	;
+{15130.} 	 C137NO3 = C137O + NO2 : 	J(53) 	;
+{15131.} 	 C137O = C139O2 : 	KDEC 	;
+{15132.} 	 C137CO + OH = C139O2 : 	7.70D-11 	;
+{15133.} 	 C137CO = C139O2 + HO2 : 	J(15) 	;
+{15134.} 	 C137OH + OH = C137CO + HO2 : 	6.16D-11 	;
+{15135.} 	 C1013OOH + OH = C1013CO + OH : 	1.40D-11 	;
+{15136.} 	 C1013OOH = C1013O + OH : 	J(41) 	;
+{15137.} 	 C1013NO3 + OH = C1013CO + NO2 : 	5.94D-11 	;
+{15138.} 	 C1013NO3 = C1013O + NO2 : 	J(54) 	;
+{15139.} 	 C1013O = C1014O2 : 	KDEC 	;
+{15140.} 	 C1013CO + OH = C1014O2 : 	6.91D-12 	;
+{15141.} 	 C1013OH + OH = C1013CO + HO2 : 	9.00D-12 	;
+{15142.} 	 C1010OOH + OH = C736CO + CH3COCH3 + OH : 	8.18D-11 	;
+{15143.} 	 C1010OOH = C1010O + OH : 	J(41) 	;
+{15144.} 	 C1010NO3 + OH = C736CO + CH3COCH3 + NO2 : 	7.42D-11 	;
+{15145.} 	 C1010NO3 = C1010O + NO2 : 	J(55) 	;
+{15146.} 	 C1010O = C736O2 + CH3COCH3 : 	KDEC 	;
+{15147.} 	 C1010OH + OH = C736CO + CH3COCH3 + HO2 : 	7.82D-11 	;
+{15148.} 	 C117OOH + OH = C117O2 : 	3.51D-11 	;
+{15149.} 	 C117OOH = C117O + OH : 	J(41) 	;
+{15150.} 	 C117NO3 + OH = C118CO + NO2 : 	2.80D-11 	;
+{15151.} 	 C117NO3 = C117O + NO2 : 	J(55) 	;
+{15152.} 	 C117O = C118O2 : 	KDEC 	;
+{15153.} 	 C117OH + OH = C117O : 	3.16D-11 	;
+{15154.} 	 C830CO2H + OH = C830O2 : 	3.14D-11 	;
+{15155.} 	 C830CO3H + OH = C830CO3 : 	3.45D-11 	;
+{15156.} 	 C830CO3H = C830O2 + OH : 	J(41) 	;
+{15157.} 	 C830O2 + HO2 = C830OOH : 	KRO2HO2*0.914 	;
+{15158.} 	 C830O2 + NO = C830NO3 : 	KRO2NO*0.192 	;
+{15159.} 	 C830O2 + NO = C830O + NO2 : 	KRO2NO*0.808 	;
+{15160.} 	 C830O2 + NO3 = C830O + NO2 : 	KRO2NO3 	;
+{15161.} 	 C830O2 = C830CO : 	2.50D-13*RO2*0.2 	;
+{15162.} 	 C830O2 = C830O : 	2.50D-13*RO2*0.6 	;
+{15163.} 	 C830O2 = C830OH : 	2.50D-13*RO2*0.2 	;
+{15164.} 	 C830PAN + OH = C830CO + CO + NO2 : 	3.09D-11 	;
+{15165.} 	 C830PAN = C830CO3 + NO2 : 	KBPAN 	;
+{15166.} 	 C128CO + OH = C927O2 + HCOCH2CHO : 	7.41D-11 	;
+{15167.} 	 C128CO = C927O2 + HCOCH2CO3 : 	J(22) 	;
+{15168.} 	 C128O2 + HO2 = C128OOH : 	KRO2HO2*0.947 	;
+{15169.} 	 C128O2 + NO = C128NO3 : 	KRO2NO*0.245 	;
+{15170.} 	 C128O2 + NO = C128O + NO2 : 	KRO2NO*0.755 	;
+{15171.} 	 C128O2 + NO3 = C128O + NO2 : 	KRO2NO3 	;
+{15172.} 	 C128O2 = C128CO : 	2.50D-13*RO2*0.2 	;
+{15173.} 	 C128O2 = C128O : 	2.50D-13*RO2*0.6 	;
+{15174.} 	 C128O2 = C128OH : 	2.50D-13*RO2*0.2 	;
+{15175.} 	 C145OOH + OH = C145O2 : 	2.72D-11 	;
+{15176.} 	 C145OOH = C145O + OH : 	J(41) 	;
+{15177.} 	 C145O = C928CO3 + HO14CO2C4 : 	KDEC 	;
+{15178.} 	 C145OH + OH = C145O : 	2.37D-11 	;
+{15179.} 	 C927OOH + OH = C927O2 : 	8.69D-11 	;
+{15180.} 	 C927OOH = C927O + OH : 	J(41) 	;
+{15181.} 	 C927NO3 + OH = C630CO + CH3COCH3 + NO2 : 	5.82D-11 	;
+{15182.} 	 C927NO3 = C927O + NO2 : 	J(55) 	;
+{15183.} 	 C927O = C630O2 + CH3COCH3 : 	KDEC 	;
+{15184.} 	 C927OH + OH = C927O : 	7.47D-11 	;
+{15185.} 	 C1214OOH + OH = C1215CO + OH : 	4.59D-11 	;
+{15186.} 	 C1214OOH = C1214O + OH : 	J(41) 	;
+{15187.} 	 C1214O = C1215O2 : 	KDEC 	;
+{15188.} 	 C1214OH + OH = C1215CO + HO2 : 	3.68D-11 	;
+{15189.} 	 ALC4DOLOOH + OH = CHOC4DOLO2 : 	5.84D-11 	;
+{15190.} 	 ALC4DOLOOH = CHOC3DIOL + HO2 + CO + OH : 	J(17) 	;
+{15191.} 	 ALC4DOLOOH = CHOC4DOLO + OH : 	J(41) 	;
+{15192.} 	 CHOC4DOLO = CHOC3DIOL + HO2 + CO : 	KDEC 	;
+{15193.} 	 C6TONOHOOH + OH = C6TRONOHO2 : 	7.37D-11 	;
+{15194.} 	 C6TONOHOOH = C6TRONOHO + OH : 	J(15)+J(35)+J(41) 	;
+{15195.} 	 C6TRONOHO = HCOCH2CHO + HOCH2CO3 + CO : 	KDEC 	;
+{15196.} 	 HO24C4CO3 + HO2 = HO24C4CO3H : 	KAPHO2*0.56 	;
+{15197.} 	 HO24C4CO3 + HO2 = HO2C3CHO + HO2 + OH : 	KAPHO2*0.44 	;
+{15198.} 	 HO24C4CO3 + NO = HO2C3CHO + HO2 + NO2 : 	KAPNO 	;
+{15199.} 	 HO24C4CO3 + NO2 = C5PAN10 : 	KFPAN 	;
+{15200.} 	 HO24C4CO3 + NO3 = HO2C3CHO + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{15201.} 	 HO24C4CO3 = HO2C3CHO + HO2 : 	1.00D-11*RO2 	;
+{15202.} 	 C23C54CO3H = CO23C54O2 + OH : 	J(41) 	;
+{15203.} 	 OH + C23C54CO3H = C23C54CO3 : 	5.32D-12 	;
+{15204.} 	 C6PAN7 = C23C54CO3 + NO2 : 	KBPAN 	;
+{15205.} 	 OH + C6PAN7 = C5CO234 + CO + NO2 : 	1.07D-12 	;
+{15206.} 	 C73OOH = C73O + OH : 	J(41)+J(35) 	;
+{15207.} 	 C73OOH = CO23C4CO3 + CH3CHO + OH : 	J(22) 	;
+{15208.} 	 OH + C73OOH = C73O2 : 	1.70D-11 	;
+{15209.} 	 C73O = CO23C4CO3 + CH3CHO : 	KDEC 	;
+{15210.} 	 C74OOH = C74O + OH : 	J(41) 	;
+{15211.} 	 C74OOH = CH3CHO + OH + CO2C3CO3 + CO : 	J(35) 	;
+{15212.} 	 OH + C74OOH = C74O2 : 	1.70D-11 	;
+{15213.} 	 C74O = CO2C3CO3 + CH3CHO + CO : 	KDEC 	;
+{15214.} 	 C715OOH = C715O + OH : 	J(41) 	;
+{15215.} 	 C715OOH = CH3CO3 + C5CO234 + OH : 	J(22)*2 	;
+{15216.} 	 OH + C715OOH = C715O2 : 	5.46D-12 	;
+{15217.} 	 C715O = CH3CO3 + CO + BIACET : 	KDEC 	;
+{15218.} 	 C613O2 + HO2 = C613OOH : 	KRO2HO2*0.820 	;
+{15219.} 	 C613O2 + NO = C613O + NO2 : 	KRO2NO 	;
+{15220.} 	 C613O2 + NO3 = C613O + NO2 : 	KRO2NO3 	;
+{15221.} 	 C613O2 = C613O : 	8.80D-13*RO2 	;
+{15222.} 	 C83OOH = C83O + OH : 	J(41)+J(22)+J(35) 	;
+{15223.} 	 OH + C83OOH = C83O2 : 	1.52D-11 	;
+{15224.} 	 C83O = EGLYOX + C2H5CO3 + CO : 	KDEC 	;
+{15225.} 	 C95OOH = C95O + OH : 	J(41)+J(22)+J(35) 	;
+{15226.} 	 OH + C95OOH = C95O2 : 	1.87D-11 	;
+{15227.} 	 C95O = EGLYOX + C3H7CO3 + CO : 	KDEC 	;
+{15228.} 	 C105OOH = C105O + OH : 	J(41)+J(22)+J(35) 	;
+{15229.} 	 OH + C105OOH = C105O2 : 	2.01D-11 	;
+{15230.} 	 C105O = EGLYOX + C4H9CO3 + CO : 	KDEC 	;
+{15231.} 	 C115OOH = C115O + OH : 	J(41)+J(22)+J(35) 	;
+{15232.} 	 OH + C115OOH = C115O2 : 	2.15D-11 	;
+{15233.} 	 C115O = EGLYOX + C5H11CO3 + CO : 	KDEC 	;
+{15234.} 	 C125OOH = C125O + OH : 	J(41)+J(22)+J(35) 	;
+{15235.} 	 OH + C125OOH = C125O2 : 	2.29D-11 	;
+{15236.} 	 C125O = EGLYOX + C6H13CO3 + CO : 	KDEC 	;
+{15237.} 	 C4CO2DCO3H + OH = C4CO2DBCO3 : 	3.06D-11 	;
+{15238.} 	 C4CO2DCO3H = HO2 + CO + C33CO + OH : 	J(41)+J(34) 	;
+{15239.} 	 C4CO2DBPAN + OH = C33CO + CO + NO2 : 	2.74D-11 	;
+{15240.} 	 C4CO2DBPAN = C4CO2DBCO3 + NO2 : 	KBPAN 	;
+{15241.} 	 C5CO2DCO3H + OH = C5CO2DBCO3 : 	3.60D-11 	;
+{15242.} 	 C5CO2DCO3H = CH3CO3 + C33CO + OH : 	J(41)+J(34) 	;
+{15243.} 	 C5CO2DBPAN + OH = C33CO + CH3CHO + NO2 : 	3.28D-11 	;
+{15244.} 	 C5CO2DBPAN = C5CO2DBCO3 + NO2 : 	KBPAN 	;
+{15245.} 	 C4DBM2CO3H + OH = C4DBM2CO3 : 	4.15D-11 	;
+{15246.} 	 C4DBM2CO3H = CO23C3CHO + CH3CO3 + OH : 	J(41)+J(34) 	;
+{15247.} 	 C4DBM2PAN + OH = CO23C3CHO + CH3CO3 + NO2 : 	3.82D-11 	;
+{15248.} 	 C4DBM2PAN = C4DBM2CO3 + NO2 : 	KBPAN 	;
+{15249.} 	 C23O3CHO + NO3 = CO + CH3CO3 + HNO3 : 	KNO3AL*4.0 	;
+{15250.} 	 C23O3CHO + OH = CO + CH3CO3 : 	1.27D-11 	;
+{15251.} 	 C23O3CHO = CO + HO2 + CH3CO3 : 	J(22) 	;
+{15252.} 	 C5DCO2CO3H + OH = C5DBCO2CO3 : 	3.60D-11 	;
+{15253.} 	 C5DCO2CO3H = CO23C3CHO + HO2 + CO + OH : 	J(41)+J(34) 	;
+{15254.} 	 C5DBCO2PAN + OH = CO23C3CHO + CO + NO2 : 	3.28D-11 	;
+{15255.} 	 C5DBCO2PAN = C5DBCO2CO3 + NO2 : 	KBPAN 	;
+{15256.} 	 C7CO2DCO3H + OH = C7CO2DBCO3 : 	3.78D-11 	;
+{15257.} 	 C7CO2DCO3H = C2H5CO3 + C33CO + OH : 	J(41)+J(34) 	;
+{15258.} 	 C7CO2DBPAN + OH = C33CO + C2H5CHO + NO2 : 	3.45D-11 	;
+{15259.} 	 C7CO2DBPAN = C7CO2DBCO3 + NO2 : 	KBPAN 	;
+{15260.} 	 EMALANHY + OH = EMALANHYO2 : 	1.50D-12 	;
+{15261.} 	 C8CO2DCO3H + OH = C8CO2DBCO3 : 	3.93D-11 	;
+{15262.} 	 C8CO2DCO3H = C3H7CO3 + C33CO + OH : 	J(41)+J(34) 	;
+{15263.} 	 C8CO2DBPAN + OH = C33CO + C3H7CHO + NO2 : 	3.61D-11 	;
+{15264.} 	 C8CO2DBPAN = C8CO2DBCO3 + NO2 : 	KBPAN 	;
+{15265.} 	 PMALANHY + OH = PMALANHYO2 : 	1.50D-12 	;
+{15266.} 	 C8DCO2CO3H + OH = C8CO2DBCO3 : 	3.99D-11 	;
+{15267.} 	 C8DCO2CO3H = IPRCO3 + C33CO + OH : 	J(41)+J(34) 	;
+{15268.} 	 C8DBCO2PAN + OH = C33CO + IPRCHO + NO2 : 	3.68D-11 	;
+{15269.} 	 C8DBCO2PAN = C8DBCO2CO3 + NO2 : 	KBPAN 	;
+{15270.} 	 IPMALANHY + OH = IPMALNHYO2 : 	1.50D-12 	;
+{15271.} 	 CO2OH3MCO3 + HO2 = BIACET + HO2 + OH : 	KAPHO2*0.44 	;
+{15272.} 	 CO2OH3MCO3 + HO2 = CO2H3MCO3H : 	KAPHO2*0.56 	;
+{15273.} 	 CO2OH3MCO3 + NO = BIACET + HO2 + NO2 : 	KAPNO 	;
+{15274.} 	 CO2OH3MCO3 + NO2 = CO2OH3MPAN : 	KFPAN 	;
+{15275.} 	 CO2OH3MCO3 + NO3 = BIACET + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{15276.} 	 CO2OH3MCO3 = BIACET + HO2 : 	1.00D-11*RO2 	;
+{15277.} 	 C4DBMECO3H + OH = C4DBM2CO3 : 	4.32D-11 	;
+{15278.} 	 C4DBMECO3H = C5CO23CHO + CH3CO3 + OH : 	J(41)+J(34) 	;
+{15279.} 	 C4DBMEPAN + OH = C5CO23CHO + CH3CHO + NO2 : 	4.00D-11 	;
+{15280.} 	 C4DBMEPAN = C4DBMECO3 + NO2 : 	KBPAN 	;
+{15281.} 	 C5DBECO3H + OH = C5DBECO3 : 	2.54D-11 	;
+{15282.} 	 C5DBECO3H = CO234C6 + HO2 + CO + OH : 	J(41) 	;
+{15283.} 	 C5DBEPAN + OH = CO234C6 + CO + NO2 : 	2.22D-11 	;
+{15284.} 	 C5DBEPAN = C5DBECO3 + NO2 : 	KBPAN 	;
+{15285.} 	 C5EDBCO3H + OH = C5EDBCO3 : 	2.54D-11 	;
+{15286.} 	 C5EDBCO3H = CO23C3CHO + C2H5CO3 + OH : 	J(41) 	;
+{15287.} 	 C5EDBPAN + OH = CO23C3CHO + C2H5CHO + NO2 : 	2.22D-11 	;
+{15288.} 	 C5EDBPAN = C5EDBCO3 + NO2 : 	KBPAN 	;
+{15289.} 	 C3EODBCO2H + OH = HO2 + CO + EGLYOX : 	4.89D-11 	;
+{15290.} 	 C3EODBCO2H = HO2 + CO + HCOCO2H + C2H5CO3 : 	J(24) 	;
+{15291.} 	 COHM2CO3 + HO2 = COHM2CO2H + O3 : 	KAPHO2*0.15 	;
+{15292.} 	 COHM2CO3 + HO2 = COHM2CO3H : 	KAPHO2*0.41 	;
+{15293.} 	 COHM2CO3 + HO2 = GLYOX + HO2 + OH : 	KAPHO2*0.44 	;
+{15294.} 	 COHM2CO3 + NO = GLYOX + HO2 + NO2 : 	KAPNO 	;
+{15295.} 	 COHM2CO3 + NO2 = COHM2PAN : 	KFPAN 	;
+{15296.} 	 COHM2CO3 + NO3 = GLYOX + HO2 + NO2 : 	KRO2NO3*1.74 	;
+{15297.} 	 COHM2CO3 = COHM2CO2H : 	1.00D-11*0.3*RO2 	;
+{15298.} 	 COHM2CO3 = GLYOX + HO2 : 	1.00D-11*0.7*RO2 	;
+{15299.} 	 MECOFOROOH + OH = MECOFORMO2 : 	1.90D-12*EXP(190/TEMP) 	;
+{15300.} 	 MECOFOROOH = MECOFORMO + OH : 	J(41) 	;
+{15301.} 	 MECOFORMO = HCHO + CO + HO2 : 	KDEC 	;
+{15302.} 	 C4CODIAL + NO3 = C312COCO3 + HNO3 : 	2*KNO3AL*4.0 	;
+{15303.} 	 C4CODIAL + OH = C312COCO3 : 	3.39D-11 	;
+{15304.} 	 C4CODIAL = CHOCOCH2O2 + HO2 + CO : 	J(15) 	;
+{15305.} 	 C4CODIAL = HCOCH2CO3 + HO2 + CO : 	J(34) 	;
+{15306.} 	 C5124COOOH + OH = C5124COO2 : 	2.46D-11 	;
+{15307.} 	 C5124COOOH = C5124COO + OH : 	J(41)+J(22)+J(34) 	;
+{15308.} 	 C5124COO = C312COCO3 + HCHO : 	KDEC 	;
+{15309.} 	 CO235C6OOH + OH = CO235C6O2 : 	1.01D-11 	;
+{15310.} 	 CO235C6OOH = CO235C6O + OH : 	J(41)+J(35) 	;
+{15311.} 	 CO235C6O = CO23C4CO3 + HCHO : 	KDEC 	;
+{15312.} 	 CO235C5CHO + NO3 = CO23C4CO3 + CO + HNO3 : 	KNO3AL*5.5 	;
+{15313.} 	 CO235C5CHO + OH = CO23C4CO3 + CO : 	1.33D-11 	;
+{15314.} 	 CO235C5CHO = CO23C4CO3 + CO + HO2 : 	J(34) 	;
+{15315.} 	 C716OOH + OH = CO235C6CHO + OH : 	1.20D-10 	;
+{15316.} 	 C716OOH = C716O + OH : 	J(41)+J(15) 	;
+{15317.} 	 C716O = CO13C4CHO + CH3CO3 : 	KDEC 	;
+{15318.} 	 NC71CO + OH = NC72O2 : 	1.25D-12 	;
+{15319.} 	 NC71CO = CO235C6CO3 + NO2 : 	J(55) 	;
+{15320.} 	 C812O2 + HO2 = C812OOH : 	KRO2HO2*0.859 	;
+{15321.} 	 C812O2 + NO = C812O + NO2 : 	KRO2NO 	;
+{15322.} 	 C812O2 + NO3 = C812O + NO2 : 	KRO2NO3 	;
+{15323.} 	 C812O2 = C812O : 	9.20D-14*RO2*0.7 	;
+{15324.} 	 C812O2 = C812OH : 	9.20D-14*RO2*0.3 	;
+{15325.} 	 C721CO3 + HO2 = C721CO3H : 	KAPHO2*0.41 	;
+{15326.} 	 C721CO3 + HO2 = C721O2 + OH : 	KAPHO2*0.44 	;
+{15327.} 	 C721CO3 + HO2 = NORPINIC + O3 : 	KAPHO2*0.15 	;
+{15328.} 	 C721CO3 + NO = C721O2 + NO2 : 	KAPNO 	;
+{15329.} 	 C721CO3 + NO2 = C721PAN : 	KFPAN 	;
+{15330.} 	 C721CO3 + NO3 = C721O2 + NO2 : 	KRO2NO3*1.74 	;
+{15331.} 	 C721CO3 = C721O2 : 	1.00D-11*RO2*0.7 	;
+{15332.} 	 C721CO3 = NORPINIC : 	1.00D-11*RO2*0.3 	;
+{15333.} 	 C721O2 + HO2 = C721OOH : 	KRO2HO2*0.820 	;
+{15334.} 	 C721O2 + NO = C721O + NO2 : 	KRO2NO 	;
+{15335.} 	 C721O2 + NO3 = C721O + NO2 : 	KRO2NO3 	;
+{15336.} 	 C721O2 = C721O : 	1.30D-12*RO2 	;
+{15337.} 	 C922OOH + OH = C922O2 : 	1.51D-11 	;
+{15338.} 	 C922OOH = C922O + OH : 	J(41)+J(22) 	;
+{15339.} 	 C922O = CH3COCH3 + C621O2 : 	KDEC 	;
+{15340.} 	 C614OOH + OH = C614CO + OH : 	8.69D-11 	;
+{15341.} 	 C614OOH = C614O + OH : 	J(41)+J(35) 	;
+{15342.} 	 C614NO3 + OH = C614CO + NO2 : 	71.11D-12 	;
+{15343.} 	 C614NO3 = C614O + NO2 : 	J(35) 	;
+{15344.} 	 C614O = CO23C4CHO + HCHO + HO2 : 	KDEC 	;
+{15345.} 	 C614OH + OH = C614CO + HO2 : 	3.78D-11 	;
+{15346.} 	 C614OH = C614O + HO2 : 	J(35) 	;
+{15347.} 	 C511OOH + OH = C511O2 : 	7.49D-11 	;
+{15348.} 	 C511OOH = C511O + OH : 	J(41)+J(15) 	;
+{15349.} 	 C511O = CH3CO3 + HCOCH2CHO : 	KDEC 	;
+{15350.} 	 H3C2C4CO3 + HO2 = H3C2C4CO2H + O3 : 	KAPHO2*0.15 	;
+{15351.} 	 H3C2C4CO3 + HO2 = H3C2C4CO3H : 	KAPHO2*0.41 	;
+{15352.} 	 H3C2C4CO3 + HO2 = HMVKAO2 + OH : 	KAPHO2*0.44 	;
+{15353.} 	 H3C2C4CO3 + NO = HMVKAO2 + NO2 : 	KAPNO 	;
+{15354.} 	 H3C2C4CO3 + NO2 = H3C2C4PAN : 	KFPAN 	;
+{15355.} 	 H3C2C4CO3 + NO3 = HMVKAO2 + NO2 : 	KRO2NO3*1.74 	;
+{15356.} 	 H3C2C4CO3 = H3C2C4CO2H : 	1.00D-11*RO2*0.3 	;
+{15357.} 	 H3C2C4CO3 = HMVKAO2 : 	1.00D-11*RO2*0.7 	;
+{15358.} 	 C620OOH + OH = C515CHO + OH : 	1.15D-10 	;
+{15359.} 	 C620OOH = C620O + OH : 	J(41)+J(15)*2 	;
+{15360.} 	 C620O = HCOCH2CHO + HCOCH2CO3 : 	KDEC 	;
+{15361.} 	 C515CHO + OH = C515CO3 : 	1.33D-10 	;
+{15362.} 	 C515CHO = C515O2 + HO2 + CO : 	J(15)*2 	;
+{15363.} 	 C515CHO = HCOCH2CO3 + HCOCH2CO3 : 	J(35) 	;
+{15364.} 	 C620OH + OH = C515CHO + HO2 : 	9.44D-11 	;
+{15365.} 	 C620OH = C620O + HO2 : 	J(15)*2 	;
+{15366.} 	 C87CO2H + OH = C87O2 : 	9.19D-11 	;
+{15367.} 	 C87CO2H = C87O2 + HO2 : 	J(15)*2 	;
+{15368.} 	 C87CO3H + OH = C87CO3 : 	9.50D-11 	;
+{15369.} 	 C87CO3H = C87O2 + OH : 	J(41)+J(15)*2 	;
+{15370.} 	 C87O2 + HO2 = C87OOH : 	KRO2HO2*0.859 	;
+{15371.} 	 C87O2 + NO = C87O + NO2 : 	KRO2NO 	;
+{15372.} 	 C87O2 + NO3 = C87O + NO2 : 	KRO2NO3 	;
+{15373.} 	 C87O2 = C87CO : 	2.00D-12*RO2*0.2 	;
+{15374.} 	 C87O2 = C87O : 	2.00D-12*RO2*0.6 	;
+{15375.} 	 C87O2 = C87OH : 	2.00D-12*RO2*0.2 	;
+{15376.} 	 C87PAN + OH = C87CO + CO + NO2 : 	9.11D-11 	;
+{15377.} 	 C87PAN = C87CO3 + NO2 : 	KBPAN 	;
+{15378.} 	 C616OOH + OH = CO123C5CHO + OH : 	1.02D-10 	;
+{15379.} 	 C616OOH = C616O + OH : 	J(41)+J(15)*2 	;
+{15380.} 	 C616O = CHOC2CO3 + GLYOX : 	KDEC*0.5 	;
+{15381.} 	 C616O = CO12C4CHO + HO2 + CO : 	KDEC*0.5 	;
+{15382.} 	 C616OH + OH = CO123C5CHO + HO2 : 	9.27D-11 	;
+{15383.} 	 C616OH = C616O + HO2 : 	J(15)*2 	;
+{15384.} 	 C718CO2H + OH = C718O2 : 	7.21D-11 	;
+{15385.} 	 C718CO2H = C718O2 + HO2 : 	J(15) 	;
+{15386.} 	 C718CO3H + OH = C718CO3 : 	7.52D-11 	;
+{15387.} 	 C718CO3H = C718O2 + OH : 	J(41)+J(15) 	;
+{15388.} 	 C718O2 + HO2 = C718OOH : 	KRO2HO2*0.820 	;
+{15389.} 	 C718O2 + NO = C718NO3 : 	KRO2NO*0.138 	;
+{15390.} 	 C718O2 + NO = C718O + NO2 : 	KRO2NO*0.862 	;
+{15391.} 	 C718O2 + NO3 = C718O + NO2 : 	KRO2NO3 	;
+{15392.} 	 C718O2 = C617CHO : 	1.30D-12*RO2*0.2 	;
+{15393.} 	 C718O2 = C718O : 	1.30D-12*RO2*0.6 	;
+{15394.} 	 C718O2 = C718OH : 	1.30D-12*RO2*0.2 	;
+{15395.} 	 C718PAN + OH = C617CHO + CO + NO2 : 	6.81D-11 	;
+{15396.} 	 C718PAN = C718CO3 + NO2 : 	KBPAN 	;
+{15397.} 	 C513OOH + OH = C513CO + OH : 	9.23D-11 	;
+{15398.} 	 C513OOH = C513O + OH : 	J(41)+J(15) 	;
+{15399.} 	 C513O = GLYOX + HOC2H4CO3 : 	KDEC 	;
+{15400.} 	 C513CO + OH = HOC2H4CO3 + CO + CO : 	2.64D-11 	;
+{15401.} 	 C513CO = HOC2H4CO3 + HO2 + CO + CO : 	J(34)+J(35) 	;
+{15402.} 	 C513OH + OH = C513CO + HO2 : 	8.35D-11 	;
+{15403.} 	 C513OH = C513O + HO2 : 	J(15) 	;
+{15404.} 	 C514O2 + HO2 = C514OOH : 	KRO2HO2*0.706 	;
+{15405.} 	 C514O2 + NO = C514NO3 : 	KRO2NO*0.129 	;
+{15406.} 	 C514O2 + NO = C514O + NO2 : 	KRO2NO*0.871 	;
+{15407.} 	 C514O2 + NO3 = C514O + NO2 : 	KRO2NO3 	;
+{15408.} 	 C514O2 = C514O : 	2.50D-13*RO2*0.6 	;
+{15409.} 	 C514O2 = C514OH : 	2.50D-13*RO2*0.2 	;
+{15410.} 	 C514O2 = CO13C4CHO : 	2.50D-13*RO2*0.2 	;
+{15411.} 	 CO25C6CO2H + OH = C627O2 : 	6.67D-12 	;
+{15412.} 	 CO25C6CO2H = C627O2 + HO2 : 	J(22)*2 	;
+{15413.} 	 CO25C6CO3H + OH = CO25C6CO3 : 	9.75D-11 	;
+{15414.} 	 CO25C6CO3H = C627O2 + OH : 	J(41)+J(22)*2 	;
+{15415.} 	 C627PAN + OH = CO2C4GLYOX + CO + NO2 : 	6.15D-12 	;
+{15416.} 	 C627PAN = CO25C6CO3 + NO2 : 	KBPAN 	;
+{15417.} 	 C627OOH + OH = CO2C4GLYOX + OH : 	1.51D-11 	;
+{15418.} 	 C627OOH = C627O + OH : 	J(41) 	;
+{15419.} 	 C627OOH = CO2C4CO3 + HCHO + OH : 	J(22)*2 	;
+{15420.} 	 C627O = CO2C4CO3 + HCHO : 	KDEC 	;
+{15421.} 	 C627OH + OH = CO2C4GLYOX + HO2 : 	8.25D-12 	;
+{15422.} 	 C627OH = CO2C4CO3 + HCHO + HO2 : 	J(22)*2 	;
+{15423.} 	  CO2C4GLYOX + OH = CO2C4CO3 + CO : 	1.83D-11 	;
+{15424.} 	  CO2C4GLYOX = CO2C4CO3 + CO + HO2 : 	J(34) 	;
+{15425.} 	 C820O2 + HO2 = C820OOH : 	KRO2HO2*0.859 	;
+{15426.} 	 C820O2 + NO = C820O + NO2 : 	KRO2NO 	;
+{15427.} 	 C820O2 + NO3 = C820O + NO2 : 	KRO2NO3 	;
+{15428.} 	 C820O2 = C820O : 	9.20D-14*RO2 	;
+{15429.} 	 C727OOH + OH = C727CO + OH : 	2.42D-11 	;
+{15430.} 	 C727OOH = C727O + OH : 	J(41) 	;
+{15431.} 	 C727O = CH3CO3 + CO2C4CHO : 	KDEC 	;
+{15432.} 	 C727CO + OH = C821O2 : 	5.67D-12 	;
+{15433.} 	 C727CO = CH3CO3 + CO2C4CO3 : 	J(35) 	;
+{15434.} 	 C511CO3H + OH = C511CO3 : 	3.14D-11 	;
+{15435.} 	 C511CO3H = C511O2 + OH : 	J(41)+J(15) 	;
+{15436.} 	 C511PAN + OH = CO23C4CHO + CO + NO2 : 	2.78D-11 	;
+{15437.} 	 C511PAN = C511CO3 + NO2 : 	KBPAN 	;
+{15438.} 	 C517CO2H + OH = C517O2 : 	1.84D-11 	;
+{15439.} 	 C517CO3H + OH = C517CO3 : 	2.15D-11 	;
+{15440.} 	 C517CO3H = C517O2 + OH : 	J(41) 	;
+{15441.} 	 C517PAN + OH = HMVKBCHO + CO + NO2 : 	1.79D-11 	;
+{15442.} 	 C517PAN = C517CO3 + NO2 : 	KBPAN 	;
+{15443.} 	 C517OOH + OH = HMVKBCHO + OH : 	4.93D-11 	;
+{15444.} 	 C517OOH = C517O + OH : 	J(41) 	;
+{15445.} 	 C517NO3 + OH = HMVKBCHO + NO2 : 	1.38D-11 	;
+{15446.} 	 C517NO3 = C517O + NO2 : 	J(53) 	;
+{15447.} 	 C517O = HMVKBCHO + HO2 : 	KROPRIM*O2 	;
+{15448.} 	 C517OH + OH = HMVKBCHO + HO2 : 	2.81D-11 	;
+{15449.} 	 HMVKBCHO + NO3 = HMVKBCO3 + HNO3 : 	KNO3AL*8.5 	;
+{15450.} 	 HMVKBCHO + OH = HMVKBCO3 : 	3.51D-11 	;
+{15451.} 	 HMVKBCHO = HMVKBO2 + CO + HO2 : 	J(15) 	;
+{15452.} 	 C628OOH + OH = C628O2 : 	3.14D-11 	;
+{15453.} 	 C628OOH = C628O + OH : 	J(41) 	;
+{15454.} 	 C628OOH = CO13C4OH + CH3CO3 + OH : 	J(22)+J(15) 	;
+{15455.} 	 C628O = CO13C4OH + CH3CO3 : 	KDEC 	;
+{15456.} 	 C628OH + OH = C628O : 	2.80D-11 	;
+{15457.} 	 C628OH = CO13C4OH + CH3CO3 + HO2 : 	J(22)+J(15) 	;
+{15458.} 	 C518CO3 + HO2 = C518CO2H + O3 : 	KAPHO2*0.15 	;
+{15459.} 	 C518CO3 + HO2 = C518CO3H : 	KAPHO2*0.41 	;
+{15460.} 	 C518CO3 + HO2 = ISOPDO2 + OH : 	KAPHO2*0.44 	;
+{15461.} 	 C518CO3 + NO = ISOPDO2 + NO2 : 	KAPNO 	;
+{15462.} 	 C518CO3 + NO2 = C518PAN : 	KFPAN 	;
+{15463.} 	 C518CO3 + NO3 = ISOPDO2 + NO2 : 	KRO2NO3*1.74 	;
+{15464.} 	 C518CO3 = C518CO2H : 	1.00D-11*RO2*0.3 	;
+{15465.} 	 C518CO3 = ISOPDO2 : 	1.00D-11*RO2*0.7 	;
+{15466.} 	 NC623O2 + HO2 = NC623OOH : 	KRO2HO2*0.770 	;
+{15467.} 	 NC623O2 + NO = NC623O + NO2 : 	KRO2NO 	;
+{15468.} 	 NC623O2 + NO3 = NC623O + NO2 : 	KRO2NO3 	;
+{15469.} 	 NC623O2 = NC623O : 	8.00D-13*RO2*0.7 	;
+{15470.} 	 NC623O2 = NC623OH : 	8.00D-13*RO2*0.3 	;
+{15471.} 	 C520OOA = C520O2 + OH : 	KDEC 	;
+{15472.} 	 C623O2 + HO2 = C623OOH : 	KRO2HO2*0.770 	;
+{15473.} 	 C623O2 + NO = C623NO3 : 	KRO2NO*0.030 	;
+{15474.} 	 C623O2 + NO = C623O + NO2 : 	KRO2NO*0.970 	;
+{15475.} 	 C623O2 + NO3 = C623O + NO2 : 	KRO2NO3 	;
+{15476.} 	 C623O2 = C623O : 	8.00D-13*RO2*0.7 	;
+{15477.} 	 C623O2 = C623OH : 	8.00D-13*RO2*0.3 	;
+{15478.} 	 C824OOH + OH = C824CO + OH : 	1.02D-10 	;
+{15479.} 	 C824OOH = C824O + OH : 	J(41) 	;
+{15480.} 	 C824O = C624CHO + CO + HO2 : 	KDEC 	;
+{15481.} 	 C824CO + OH = C624CO3 + CO : 	7.46D-11 	;
+{15482.} 	 C824CO = C624CO3 + CO + HO2 : 	J(34) 	;
+{15483.} 	 C824OH + OH = C824CO + HO2 : 	9.34D-11 	;
+{15484.} 	 C825O2 + HO2 = C825OOH : 	KRO2HO2*0.859 	;
+{15485.} 	 C825O2 + NO = C825O + NO2 : 	KRO2NO 	;
+{15486.} 	 C825O2 + NO3 = C825O + NO2 : 	KRO2NO3 	;
+{15487.} 	 C825O2 = C825CO : 	8.80D-12*RO2*0.2 	;
+{15488.} 	 C825O2 = C825O : 	8.80D-12*RO2*0.6 	;
+{15489.} 	 C825O2 = C825OH : 	8.80D-12*RO2*0.2 	;
+{15490.} 	 C731O2 + HO2 = C731OOH : 	KRO2HO2*0.859 	;
+{15491.} 	 C731O2 + NO = C731NO3 : 	KRO2NO*0.138 	;
+{15492.} 	 C731O2 + NO = C731O + NO2 : 	KRO2NO*0.862 	;
+{15493.} 	 C731O2 + NO3 = C731O + NO2 : 	KRO2NO3 	;
+{15494.} 	 C731O2 = C626CHO : 	1.30D-12*RO2*0.2 	;
+{15495.} 	 C731O2 = C731O : 	1.30D-12*RO2*0.6 	;
+{15496.} 	 C731O2 = C731OH : 	1.30D-12*RO2*0.2 	;
+{15497.} 	 C732CO3 + HO2 = C732CO3H : 	KAPHO2*0.41 	;
+{15498.} 	 C732CO3 + HO2 = C732O2 + OH : 	KAPHO2*0.44 	;
+{15499.} 	 C732CO3 + HO2 = KLIMONIC + O3 : 	KAPHO2*0.15 	;
+{15500.} 	 C732CO3 + NO = C732O2 + NO2 : 	KAPNO 	;
+{15501.} 	 C732CO3 + NO2 = C732PAN : 	KFPAN 	;
+{15502.} 	 C732CO3 + NO3 = C732O2 + NO2 : 	KRO2NO3*1.74 	;
+{15503.} 	 C732CO3 = C732O2 : 	1.00D-11*RO2*0.7 	;
+{15504.} 	 C732CO3 = KLIMONIC : 	1.00D-11*RO2*0.3 	;
+{15505.} 	 C1012O2 + HO2 = C1012OOH : 	KRO2HO2*0.914 	;
+{15506.} 	 C1012O2 + NO = C1012NO3 : 	KRO2NO*0.228 	;
+{15507.} 	 C1012O2 + NO = C1012O + NO2 : 	KRO2NO*0.772 	;
+{15508.} 	 C1012O2 + NO3 = C1012O + NO2 : 	KRO2NO3 	;
+{15509.} 	 C1012O2 = C1012CO : 	2.50D-13*RO2*0.2 	;
+{15510.} 	 C1012O2 = C1012O : 	2.50D-13*RO2*0.6 	;
+{15511.} 	 C1012O2 = C1012OH : 	2.50D-13*RO2*0.2 	;
+{15512.} 	 C1211CO2H + OH = C1211O2 : 	1.23D-11 	;
+{15513.} 	 C1211CO3H + OH = C1211CO3 : 	1.48D-11 	;
+{15514.} 	 C1211CO3H = C1211O2 + OH : 	J(41) 	;
+{15515.} 	 C1211O2 + HO2 = C1211OOH : 	KRO2HO2*0.947 	;
+{15516.} 	 C1211O2 + NO = C1211NO3 : 	KRO2NO*0.176 	;
+{15517.} 	 C1211O2 + NO = C1211O + NO2 : 	KRO2NO*0.824 	;
+{15518.} 	 C1211O2 + NO3 = C1211O + NO2 : 	KRO2NO3 	;
+{15519.} 	 C1211O2 = C1211CO : 	1.30D-12*RO2*0.2 	;
+{15520.} 	 C1211O2 = C1211O : 	1.30D-12*RO2*0.6 	;
+{15521.} 	 C1211O2 = C1211OH : 	1.30D-12*RO2*0.2 	;
+{15522.} 	 C1211PAN + OH = C1211CO + CO + NO2 : 	1.12D-11 	;
+{15523.} 	 C1211PAN = C1211CO3 + NO2 : 	KBPAN 	;
+{15524.} 	 C133OOH + OH = C133CO + OH : 	4.00D-11 	;
+{15525.} 	 C133OOH = C133O + OH : 	J(41)+J(35) 	;
+{15526.} 	 C133NO3 + OH = C133CO + NO2 : 	8.47D-12 	;
+{15527.} 	 C133NO3 = C133O + NO2 : 	J(54)+J(35) 	;
+{15528.} 	 C133O = C133CO + HO2 : 	KROSEC*O2 	;
+{15529.} 	 C133O = C829O2 + CO2C4CHO : 	2.70D+14*EXP(-6643/TEMP) 	;
+{15530.} 	 C133CO + OH = C134O2 : 	2.08D-11 	;
+{15531.} 	 C133CO = C827CO3 + HOC2H4CO3 : 	J(35) 	;
+{15532.} 	 C133OH + OH = C133CO + HO2 : 	2.22D-11 	;
+{15533.} 	 C133OH = C133O + HO2 : 	J(35) 	;
+{15534.} 	 C139O2 + HO2 = C139OOH : 	KRO2HO2*0.959 	;
+{15535.} 	 C139O2 + NO = C139NO3 : 	KRO2NO*0.134 	;
+{15536.} 	 C139O2 + NO = C139O + NO2 : 	KRO2NO*0.866 	;
+{15537.} 	 C139O2 + NO3 = C139O + NO2 : 	KRO2NO3 	;
+{15538.} 	 C139O2 = C139O : 	6.70D-15*RO2*0.7 	;
+{15539.} 	 C139O2 = C139OH : 	6.70D-15*RO2*0.3 	;
+{15540.} 	 C1014O2 + HO2 = C1014OOH : 	KRO2HO2*0.914 	;
+{15541.} 	 C1014O2 + NO = C1014NO3 : 	KRO2NO*0.228 	;
+{15542.} 	 C1014O2 + NO = C1014O + NO2 : 	KRO2NO*0.772 	;
+{15543.} 	 C1014O2 + NO3 = C1014O + NO2 : 	KRO2NO3 	;
+{15544.} 	 C1014O2 = C1014CO : 	2.50D-13*RO2*0.2 	;
+{15545.} 	 C1014O2 = C1014O : 	2.50D-13*RO2*0.6 	;
+{15546.} 	 C1014O2 = C1014OH : 	2.50D-13*RO2*0.2 	;
+{15547.} 	 C736CO + OH = C522CO3 + CO : 	8.52D-11 	;
+{15548.} 	 C736CO = C522CO3 + CO + HO2 : 	J(34) 	;
+{15549.} 	 C736O2 + HO2 = C736OOH : 	KRO2HO2*0.820 	;
+{15550.} 	 C736O2 + NO = C736O + NO2 : 	KRO2NO 	;
+{15551.} 	 C736O2 + NO3 = C736O + NO2 : 	KRO2NO3 	;
+{15552.} 	 C736O2 = C736CO : 	2.00D-13*RO2*0.2 	;
+{15553.} 	 C736O2 = C736O : 	2.00D-13*RO2*0.6 	;
+{15554.} 	 C736O2 = C736OH : 	2.00D-13*RO2*0.2 	;
+{15555.} 	 C118CO + OH = C829O2 + HCOCH2CHO : 	2.99D-11 	;
+{15556.} 	 C118CO = C829O2 + HCOCH2CO3 : 	J(35) 	;
+{15557.} 	 C118O2 + HO2 = C118OOH : 	KRO2HO2*0.932 	;
+{15558.} 	 C118O2 + NO = C118NO3 : 	KRO2NO*0.235 	;
+{15559.} 	 C118O2 + NO = C118O + NO2 : 	KRO2NO*0.765 	;
+{15560.} 	 C118O2 + NO3 = C118O + NO2 : 	KRO2NO3 	;
+{15561.} 	 C118O2 = C118CO : 	2.50D-13*RO2*0.2 	;
+{15562.} 	 C118O2 = C118O : 	2.50D-13*RO2*0.6 	;
+{15563.} 	 C118O2 = C118OH : 	2.50D-13*RO2*0.2 	;
+{15564.} 	 C830OOH + OH = C830CO + OH : 	3.41D-11 	;
+{15565.} 	 C830OOH = C830O + OH : 	J(41) 	;
+{15566.} 	 C830NO3 + OH = C830CO + NO2 : 	2.60D-11 	;
+{15567.} 	 C830NO3 = C830O + NO2 : 	J(54) 	;
+{15568.} 	 C830O = C831O2 : 	KDEC 	;
+{15569.} 	 C830CO + OH = C831O2 : 	2.70D-11 	;
+{15570.} 	 C830OH + OH = C830CO + HO2 : 	2.91D-11 	;
+{15571.} 	 C128OOH + OH = C128CO + OH : 	8.69D-11 	;
+{15572.} 	 C128OOH = C128O + OH : 	J(41) 	;
+{15573.} 	 C128NO3 + OH = C128CO + NO2 : 	5.82D-11 	;
+{15574.} 	 C128NO3 = C128O + NO2 : 	J(54) 	;
+{15575.} 	 C128O = C927O2 + HCOCH2CHO : 	KDEC 	;
+{15576.} 	 C128OH + OH = C128CO + HO2 : 	7.47D-11 	;
+{15577.} 	 C928CO3 + HO2 = C928CO2H + O3 : 	KAPHO2*0.15 	;
+{15578.} 	 C928CO3 + HO2 = C928CO3H : 	KAPHO2*0.41 	;
+{15579.} 	 C928CO3 + HO2 = C928O2 + OH : 	KAPHO2*0.44 	;
+{15580.} 	 C928CO3 + NO = C928O2 + NO2 : 	KAPNO 	;
+{15581.} 	 C928CO3 + NO2 = C928PAN : 	KFPAN 	;
+{15582.} 	 C928CO3 + NO3 = C928O2 + NO2 : 	KRO2NO3*1.74 	;
+{15583.} 	 C928CO3 = C928CO2H : 	1.00D-11*RO2*0.3 	;
+{15584.} 	 C928CO3 = C928O2 : 	1.00D-11*RO2*0.7 	;
+{15585.} 	 C630CO + OH = C46CO3 + CO : 	8.00D-11 	;
+{15586.} 	 C630CO = C46CO3 + CO + HO2 : 	J(34) 	;
+{15587.} 	 C630O2 + HO2 = C630OOH : 	KRO2HO2*0.770 	;
+{15588.} 	 C630O2 + NO = C630O + NO2 : 	KRO2NO 	;
+{15589.} 	 C630O2 + NO3 = C630O + NO2 : 	KRO2NO3 	;
+{15590.} 	 C630O2 = C630CO : 	2.00D-12*RO2*0.2 	;
+{15591.} 	 C630O2 = C630O : 	2.00D-12*RO2*0.6 	;
+{15592.} 	 C630O2 = C630OH : 	2.00D-12*RO2*0.2 	;
+{15593.} 	 C1215CO + OH = C930O2 + HOC2H4CHO : 	3.43D-11 	;
+{15594.} 	 C1215O2 + HO2 = C1215OOH : 	KRO2HO2*0.947 	;
+{15595.} 	 C1215O2 + NO = C1215NO3 : 	KRO2NO*0.176 	;
+{15596.} 	 C1215O2 + NO = C1215O + NO2 : 	KRO2NO*0.824 	;
+{15597.} 	 C1215O2 + NO3 = C1215O + NO2 : 	KRO2NO3 	;
+{15598.} 	 C1215O2 = C1215CO : 	2.50D-13*RO2*0.2 	;
+{15599.} 	 C1215O2 = C1215O : 	2.50D-13*RO2*0.6 	;
+{15600.} 	 C1215O2 = C1215OH : 	2.50D-13*RO2*0.2 	;
+{15601.} 	 CHOC3DIOL + OH = CO13C4OH + HO2 : 	5.85D-11 	;
+{15602.} 	 CHOC3DIOL = C3DIOLO2 + HO2 + CO : 	J(15) 	;
+{15603.} 	 HO24C4CO3H = HO2C3CHO + HO2 + OH : 	J(41) 	;
+{15604.} 	 OH + HO24C4CO3H = HO24C4CO3 : 	2.31D-11 	;
+{15605.} 	 C5PAN10 = HO24C4CO3 + NO2 : 	KBPAN 	;
+{15606.} 	 OH + C5PAN10 = HO2C3CHO + CO + NO2 : 	1.65D-11 	;
+{15607.} 	 C613OOH = BIACET + HOCH2CHO + OH + HO2 : 	J(22) 	;
+{15608.} 	 C613OOH = C613O + OH : 	J(41) 	;
+{15609.} 	 OH + C613OOH = C613O2 : 	8.65D-11 	;
+{15610.} 	 C613O = HOCH2CHO + BIACET + HO2 : 	2.00D+14*EXP(-4909/TEMP) 	;
+{15611.} 	 EMALANHYO2 + HO2 = EMALNHYOOH : 	KRO2HO2*0.770 	;
+{15612.} 	 EMALANHYO2 + NO = EMALANHYO + NO2 : 	KRO2NO 	;
+{15613.} 	 EMALANHYO2 + NO3 = EMALANHYO + NO2 : 	KRO2NO3 	;
+{15614.} 	 EMALANHYO2 = EMALANHYO : 	9.20D-14*RO2*0.70 	;
+{15615.} 	 EMALANHYO2 = EMALNHY2OH : 	9.20D-14*RO2*0.30 	;
+{15616.} 	 PMALANHYO2 + HO2 = PMALNHYOOH : 	KRO2HO2*0.820 	;
+{15617.} 	 PMALANHYO2 + NO = PMALANHYO + NO2 : 	KRO2NO 	;
+{15618.} 	 PMALANHYO2 + NO3 = PMALANHYO + NO2 : 	KRO2NO3 	;
+{15619.} 	 PMALANHYO2 = PMALANHYO : 	9.20D-14*RO2*0.70 	;
+{15620.} 	 PMALANHYO2 = PMALNHY2OH : 	9.20D-14*RO2*0.30 	;
+{15621.} 	 IPMALNHYO2 + HO2 = IPMLNHYOOH : 	KRO2HO2*0.820 	;
+{15622.} 	 IPMALNHYO2 + NO = IPMALANHYO + NO2 : 	KRO2NO 	;
+{15623.} 	 IPMALNHYO2 + NO3 = IPMALANHYO + NO2 : 	KRO2NO3 	;
+{15624.} 	 IPMALNHYO2 = IPMALANHYO : 	9.20D-14*RO2*0.70 	;
+{15625.} 	 IPMALNHYO2 = IPMLNHY2OH : 	9.20D-14*RO2*0.30 	;
+{15626.} 	 CO2H3MCO3H + OH = CO2OH3MCO3 : 	4.36D-12 	;
+{15627.} 	 CO2H3MCO3H = BIACET + HO2 + OH : 	J(41) 	;
+{15628.} 	 CO2OH3MPAN + OH = BIACET + CO + NO2 : 	1.13D-12 	;
+{15629.} 	 CO2OH3MPAN = CO2OH3MCO3 + NO2 : 	KBPAN 	;
+{15630.} 	 C312COCO3 + HO2 = C312COCO3H : 	KAPHO2*0.56 	;
+{15631.} 	 C312COCO3 + HO2 = CHOCOCH2O2 + OH : 	KAPHO2*0.44 	;
+{15632.} 	 C312COCO3 + NO = CHOCOCH2O2 + NO2 : 	KAPNO 	;
+{15633.} 	 C312COCO3 + NO2 = C312COPAN : 	KFPAN 	;
+{15634.} 	 C312COCO3 + NO3 = CHOCOCH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{15635.} 	 C312COCO3 = CHOCOCH2O2 : 	1.00D-11*RO2 	;
+{15636.} 	 CHOCOCH2O2 + HO2 = ALCOCH2OOH : 	KRO2HO2*0.520 	;
+{15637.} 	 CHOCOCH2O2 + NO = CHOCOCH2O + NO2 : 	KRO2NO 	;
+{15638.} 	 CHOCOCH2O2 + NO3 = CHOCOCH2O + NO2 : 	KRO2NO3 	;
+{15639.} 	 CHOCOCH2O2 = CHOCOCH2O : 	2.00D-12*RO2 	;
+{15640.} 	 NC72O2 + HO2 = NC72OOH : 	KRO2HO2*0.820 	;
+{15641.} 	 NC72O2 + NO = NC72O + NO2 : 	KRO2NO 	;
+{15642.} 	 NC72O2 + NO3 = NC72O + NO2 : 	KRO2NO3 	;
+{15643.} 	 NC72O2 = NC72O : 	8.80D-13*RO2 	;
+{15644.} 	 C812OOH + OH = C812O2 : 	1.09D-11 	;
+{15645.} 	 C812OOH = C812O + OH : 	J(41) 	;
+{15646.} 	 C812O = C813O2 : 	KDEC 	;
+{15647.} 	 C812OH + OH = C812O : 	7.42D-12 	;
+{15648.} 	 C721CO3H + OH = C721CO3 : 	9.65D-12 	;
+{15649.} 	 C721CO3H = C721O2 + OH : 	J(41) 	;
+{15650.} 	 NORPINIC + OH = C721O2 : 	6.57D-12 	;
+{15651.} 	 C721PAN + OH = C721OOH + CO + NO2 : 	2.96D-12 	;
+{15652.} 	 C721PAN = C721CO3 + NO2 : 	KBPAN 	;
+{15653.} 	 C721OOH + OH = C721O2 : 	1.27D-11 	;
+{15654.} 	 C721OOH = C721O + OH : 	J(41) 	;
+{15655.} 	 C721O = C722O2 : 	KDEC 	;
+{15656.} 	 C621O2 + HO2 = C621OOH : 	KRO2HO2*0.770 	;
+{15657.} 	 C621O2 + NO = C621O + NO2 : 	KRO2NO 	;
+{15658.} 	 C621O2 + NO3 = C621O + NO2 : 	KRO2NO3 	;
+{15659.} 	 C621O2 = C621O : 	8.80D-13*RO2 	;
+{15660.} 	 H3C2C4CO2H + OH = HMVKAO2 : 	2.34D-11 	;
+{15661.} 	 H3C2C4CO2H = HMVKAO2 + HO2 : 	J(22) 	;
+{15662.} 	 H3C2C4CO3H + OH = H3C2C4CO3 : 	2.65D-11 	;
+{15663.} 	 H3C2C4CO3H = HMVKAO2 + OH : 	J(41)+J(22) 	;
+{15664.} 	 H3C2C4PAN + OH = CO2H3CHO + CO + NO2 : 	7.60D-12 	;
+{15665.} 	 H3C2C4PAN = H3C2C4CO3 + NO2 : 	KBPAN 	;
+{15666.} 	 C515CO3 + HO2 = C515CO3H : 	KAPHO2*0.56 	;
+{15667.} 	 C515CO3 + HO2 = C515O2 + OH : 	KAPHO2*0.44 	;
+{15668.} 	 C515CO3 + NO = C515O2 + NO2 : 	KAPNO 	;
+{15669.} 	 C515CO3 + NO2 = C515PAN : 	KFPAN 	;
+{15670.} 	 C515CO3 + NO3 = C515O2 + NO2 : 	KRO2NO3*1.74 	;
+{15671.} 	 C515CO3 = C515O2 : 	1.00D-11*RO2 	;
+{15672.} 	 C515O2 + HO2 = C515OOH : 	KRO2HO2*0.706 	;
+{15673.} 	 C515O2 + NO = C515O + NO2 : 	KRO2NO 	;
+{15674.} 	 C515O2 + NO3 = C515O + NO2 : 	KRO2NO3 	;
+{15675.} 	 C515O2 = C515O : 	2.00D-12*RO2 	;
+{15676.} 	 C87OOH + OH = C87CO + OH : 	1.00D-10 	;
+{15677.} 	 C87OOH = C87O + OH : 	J(41) 	;
+{15678.} 	 C87O = C615CO3 + HCHO : 	KDEC 	;
+{15679.} 	 C87CO + OH = C615CO3 + CO : 	1.03D-10 	;
+{15680.} 	 C87CO = C615CO3 + CO + HO2 : 	J(34)+J(15)*2 	;
+{15681.} 	 C87OH + OH = C87CO + HO2 : 	9.34D-11 	;
+{15682.} 	 CO12C4CHO + NO3 = CHOC2CO3 + CO + HNO3 : 	2*KNO3AL*5.5 	;
+{15683.} 	 CO12C4CHO + OH = CHOC2CO3 + CO : 	3.89D-11 	;
+{15684.} 	 CO12C4CHO = CHOC2CO3 + HO2 + CO : 	J(34)+J(15) 	;
+{15685.} 	 C718OOH + OH = C617CHO + OH : 	1.01D-10 	;
+{15686.} 	 C718OOH = C718O + OH : 	J(41)+J(15) 	;
+{15687.} 	 C718NO3 + OH = C617CHO + NO2 : 	6.65D-11 	;
+{15688.} 	 C718NO3 = C718O + NO2 : 	J(53)+J(15) 	;
+{15689.} 	 C718O = C617CHO + HO2 : 	KDEC 	;
+{15690.} 	 C617CHO + NO3 = C617CO3 + HNO3 : 	KNO3AL*8.5 	;
+{15691.} 	 C617CHO + NO3 = C618CO3 + HNO3 : 	KNO3AL*8.5 	;
+{15692.} 	 C617CHO + OH = C617CO3 : 	1.33D-10*0.5 	;
+{15693.} 	 C617CHO + OH = C618CO3 : 	1.33D-10*0.5 	;
+{15694.} 	 C617CHO = C617O2 + HO2 + CO : 	J(15) 	;
+{15695.} 	 C617CHO = C618O2 + HO2 + CO : 	J(15) 	;
+{15696.} 	 C718OH + OH = C617CHO + HO2 : 	7.96D-11 	;
+{15697.} 	 C718OH = C718O + HO2 : 	J(15) 	;
+{15698.} 	 C514OOH + OH = CO13C4CHO + OH : 	1.10D-10 	;
+{15699.} 	 C514OOH = C514O + OH : 	J(41)+J(15)*2 	;
+{15700.} 	 C514NO3 + OH = CO13C4CHO + NO2 : 	4.33D-11 	;
+{15701.} 	 C514NO3 = C514O + NO2 : 	J(54)+J(15)*2 	;
+{15702.} 	 C514O = CO13C4CHO + HO2 : 	1.80D-14*EXP(-260/TEMP)*O2 	;
+{15703.} 	 C514OH + OH = CO13C4CHO + HO2 : 	6.99D-11 	;
+{15704.} 	 C514OH = C514O + HO2 : 	J(15)*2 	;
+{15705.} 	 C820OOH + OH = C820O2 : 	1.76D-11 	;
+{15706.} 	 C820OOH = C820O + OH : 	J(22)+J(35)+J(41) 	;
+{15707.} 	 C820O = CH3CO3 + C614CO : 	KDEC 	;
+{15708.} 	 C821O2 + HO2 = C821OOH : 	KRO2HO2*0.859 	;
+{15709.} 	 C821O2 + NO = C821O + NO2 : 	KRO2NO 	;
+{15710.} 	 C821O2 + NO3 = C821O + NO2 : 	KRO2NO3 	;
+{15711.} 	 C821O2 = C821O : 	8.80D-13*RO2 	;
+{15712.} 	 HMVKBCO3 + HO2 = HMVKBCO2H + O3 : 	KAPHO2*0.15 	;
+{15713.} 	 HMVKBCO3 + HO2 = HMVKBCO3H : 	KAPHO2*0.41 	;
+{15714.} 	 HMVKBCO3 + HO2 = HMVKBO2 + OH : 	KAPHO2*0.44 	;
+{15715.} 	 HMVKBCO3 + NO = HMVKBO2 + NO2 : 	KAPNO 	;
+{15716.} 	 HMVKBCO3 + NO2 = HMVKBPAN : 	KFPAN 	;
+{15717.} 	 HMVKBCO3 + NO3 = HMVKBO2 + NO2 : 	KRO2NO3*1.74 	;
+{15718.} 	 HMVKBCO3 = HMVKBCO2H : 	1.00D-11*RO2*0.3 	;
+{15719.} 	 HMVKBCO3 = HMVKBO2 : 	1.00D-11*RO2*0.7 	;
+{15720.} 	 CO13C4OH + OH = C4CODIAL + HO2 : 	2.39D-11 	;
+{15721.} 	 CO13C4OH = HCOCH2O2 + HOCH2CO3 : 	J(22) 	;
+{15722.} 	 CO13C4OH = MGLYOX + HO2 + HO2 + CO : 	J(15) 	;
+{15723.} 	 C518CO2H + OH = ISOPDO2 : 	5.80D-11 	;
+{15724.} 	 C518CO3H + OH = C518CO3 : 	6.11D-11 	;
+{15725.} 	 C518CO3H = ISOPDO2 + OH : 	J(41) 	;
+{15726.} 	 C518PAN + OH = HCOC5 + CO + NO2 : 	5.75D-11 	;
+{15727.} 	 C518PAN = C518CO3 + NO2 : 	KBPAN 	;
+{15728.} 	 NC623OOH + OH = NC623O2 : 	3.96D-11 	;
+{15729.} 	 NC623OOH = NC623O + OH : 	J(41) 	;
+{15730.} 	 NC623O = HMVKBCHO + HCHO + NO2 : 	KDEC 	;
+{15731.} 	 NC623OH + OH = HMVKBCHO + HCHO + NO2 : 	3.62D-11 	;
+{15732.} 	 C520O2 + HO2 = C520OOH : 	KRO2HO2*0.706 	;
+{15733.} 	 C520O2 + NO = C520O + NO2 : 	KRO2NO 	;
+{15734.} 	 C520O2 + NO3 = C520O + NO2 : 	KRO2NO3 	;
+{15735.} 	 C520O2 = C520O : 	9.20D-14*RO2*0.7 	;
+{15736.} 	 C520O2 = C520OH : 	9.20D-14*RO2*0.3 	;
+{15737.} 	 C623OOH + OH = C623O2 : 	5.26D-11 	;
+{15738.} 	 C623OOH = C623O + OH : 	J(41) 	;
+{15739.} 	 C623NO3 + OH = HMVKBCHO + HCHO + NO2 : 	3.51D-11 	;
+{15740.} 	 C623O = HMVKBCHO + HCHO + HO2 : 	KDEC 	;
+{15741.} 	 C623OH + OH = HMVKBCHO + HCHO + HO2 : 	4.91D-11 	;
+{15742.} 	 C624CHO + NO3 = C624CO3 + HNO3 : 	KNO3AL*8.5 	;
+{15743.} 	 C624CHO + NO3 = NC730O2 : 	3.30D-13 	;
+{15744.} 	 C624CHO + O3 = C519CHO + CH2OOF : 	1.30D-17*0.330 	;
+{15745.} 	 C624CHO + O3 = C629OOA + HCHO : 	1.30D-17*0.670 	;
+{15746.} 	 C624CHO + OH = C624CO3 : 	8.26D-11*0.288 	;
+{15747.} 	 C624CHO + OH = C730O2 : 	8.26D-11*0.712 	;
+{15748.} 	 C624CO3 + HO2 = C624CO2H + O3 : 	KAPHO2*0.15 	;
+{15749.} 	 C624CO3 + HO2 = C624CO3H : 	KAPHO2*0.41 	;
+{15750.} 	 C624CO3 + HO2 = C624O2 + OH : 	KAPHO2*0.44 	;
+{15751.} 	 C624CO3 + NO = C624O2 + NO2 : 	KAPNO 	;
+{15752.} 	 C624CO3 + NO2 = C624PAN : 	KFPAN 	;
+{15753.} 	 C624CO3 + NO3 = C624O2 + NO2 : 	KRO2NO3*1.74 	;
+{15754.} 	 C624CO3 = C624CO2H : 	1.00D-11*RO2*0.3 	;
+{15755.} 	 C624CO3 = C624O2 : 	1.00D-11*RO2*0.7 	;
+{15756.} 	 C825OOH + OH = C825CO + OH : 	7.90D-11 	;
+{15757.} 	 C825OOH = C825O + OH : 	J(41) 	;
+{15758.} 	 C825O = C622CHO + HO2 : 	KDEC 	;
+{15759.} 	 C825CO + OH = C622CO3 : 	6.64D-11 	;
+{15760.} 	 C825CO = C622CO3 + HO2 : 	J(22) 	;
+{15761.} 	 C825OH + OH = C825CO + HO2 : 	6.69D-11 	;
+{15762.} 	 C731OOH + OH = C626CHO + OH : 	4.83D-11 	;
+{15763.} 	 C731OOH = C731O + OH : 	J(41) 	;
+{15764.} 	 C731NO3 + OH = C626CHO + NO2 : 	3.17D-11 	;
+{15765.} 	 C731NO3 = C731O + NO2 : 	J(53) 	;
+{15766.} 	 C731O = C733O2 : 	KDEC 	;
+{15767.} 	 C731OH + OH = C626CHO + HO2 : 	3.92D-11 	;
+{15768.} 	 C732CO3H + OH = C732CO3 : 	2.16D-11 	;
+{15769.} 	 C732CO3H = C732O2 + OH : 	J(41) 	;
+{15770.} 	 C732O2 + HO2 = C732OOH : 	KRO2HO2*0.859 	;
+{15771.} 	 C732O2 + NO = C732NO3 : 	KRO2NO*0.138 	;
+{15772.} 	 C732O2 + NO = C732O + NO2 : 	KRO2NO*0.862 	;
+{15773.} 	 C732O2 + NO3 = C732O + NO2 : 	KRO2NO3 	;
+{15774.} 	 C732O2 = C732CO : 	1.30D-12*RO2*0.2 	;
+{15775.} 	 C732O2 = C732O : 	1.30D-12*RO2*0.6 	;
+{15776.} 	 C732O2 = C732OH : 	1.30D-12*RO2*0.2 	;
+{15777.} 	 KLIMONIC + OH = C732O2 : 	1.85D-11 	;
+{15778.} 	 C732PAN + OH = C732CO + CO + NO2 : 	1.80D-11 	;
+{15779.} 	 C732PAN = C732CO3 + NO2 : 	KBPAN 	;
+{15780.} 	 C1012OOH + OH = C1012CO + OH : 	5.57D-11 	;
+{15781.} 	 C1012OOH = C1012O + OH : 	J(41) 	;
+{15782.} 	 C1012NO3 + OH = C1012CO + NO2 : 	2.38D-11 	;
+{15783.} 	 C1012NO3 = C1012O + NO2 : 	J(54) 	;
+{15784.} 	 C1012O = C1012CO + HO2 : 	KROSEC*O2 	;
+{15785.} 	 C1012O = CO2C4CHO + C3ME3CHOO2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{15786.} 	 C1012CO + OH = C928CO3 : 	2.94D-11 	;
+{15787.} 	 C1012OH + OH = C1012CO + HO2 : 	3.78D-11 	;
+{15788.} 	 C1211OOH + OH = C1211CO + OH : 	2.18D-11 	;
+{15789.} 	 C1211OOH = C1211O + OH : 	J(41) 	;
+{15790.} 	 C1211NO3 + OH = C1211CO + NO2 : 	8.22D-12 	;
+{15791.} 	 C1211NO3 = C1211O + NO2 : 	J(53) 	;
+{15792.} 	 C1211O = C1212O2 : 	KDEC 	;
+{15793.} 	 C1211CO + OH = C1212O2 : 	2.90D-11 	;
+{15794.} 	 C1211CO = C1212O2 + HO2 : 	J(15) 	;
+{15795.} 	 C1211OH + OH = C1211CO + HO2 : 	1.27D-11 	;
+{15796.} 	 C829O2 + HO2 = C829OOH : 	KRO2HO2*0.859 	;
+{15797.} 	 C829O2 + NO = C829NO3 : 	KRO2NO*0.106 	;
+{15798.} 	 C829O2 + NO = C829O + NO2 : 	KRO2NO*0.894 	;
+{15799.} 	 C829O2 + NO3 = C829O + NO2 : 	KRO2NO3 	;
+{15800.} 	 C829O2 = C829O : 	6.70D-15*RO2*0.7 	;
+{15801.} 	 C829O2 = C829OH : 	6.70D-15*RO2*0.3 	;
+{15802.} 	 C134O2 + HO2 = C134OOH : 	KRO2HO2*0.959 	;
+{15803.} 	 C134O2 + NO = C134O + NO2 : 	KRO2NO 	;
+{15804.} 	 C134O2 + NO3 = C134O + NO2 : 	KRO2NO3 	;
+{15805.} 	 C134O2 = C134CO : 	8.80D-13*RO2*0.2 	;
+{15806.} 	 C134O2 = C134O : 	8.80D-13*RO2*0.6 	;
+{15807.} 	 C134O2 = C134OH : 	8.80D-13*RO2*0.2 	;
+{15808.} 	 C827CO3 + HO2 = C827CO2H + O3 : 	KAPHO2*0.15 	;
+{15809.} 	 C827CO3 + HO2 = C827CO3H : 	KAPHO2*0.41 	;
+{15810.} 	 C827CO3 + HO2 = C827O2 + OH : 	KAPHO2*0.44 	;
+{15811.} 	 C827CO3 + NO = C827O2 + NO2 : 	KAPNO 	;
+{15812.} 	 C827CO3 + NO2 = C827PAN : 	KFPAN 	;
+{15813.} 	 C827CO3 + NO3 = C827O2 + NO2 : 	KRO2NO3*1.74 	;
+{15814.} 	 C827CO3 = C827CO2H : 	1.00D-11*RO2*0.3 	;
+{15815.} 	 C827CO3 = C827O2 : 	1.00D-11*RO2*0.7 	;
+{15816.} 	 C139OOH + OH = C139O2 : 	7.90D-11 	;
+{15817.} 	 C139OOH = C139O + OH : 	J(41) 	;
+{15818.} 	 C139NO3 + OH = C1310CO + NO2 : 	5.87D-11 	;
+{15819.} 	 C139NO3 = C139O + NO2 : 	J(55) 	;
+{15820.} 	 C139O = C1310O2 : 	KDEC 	;
+{15821.} 	 C139OH + OH = C139O : 	6.69D-11 	;
+{15822.} 	 C1014OOH + OH = C1014CO + OH : 	5.56D-11 	;
+{15823.} 	 C1014OOH = C1014O + OH : 	J(41) 	;
+{15824.} 	 C1014NO3 + OH = C1014CO + NO2 : 	2.37D-11 	;
+{15825.} 	 C1014NO3 = C1014O + NO2 : 	J(54) 	;
+{15826.} 	 C1014O = C1014CO + HO2 : 	KROSEC*O2 	;
+{15827.} 	 C1014O = COO2C4CHO + C3ME3CHOO2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{15828.} 	 C1014CO + OH = COO2C4CHO + C3ME3CHOO2 : 	2.93D-11 	;
+{15829.} 	 C1014OH + OH = C1014CO + HO2 : 	3.77D-11 	;
+{15830.} 	 C522CO3 + HO2 = C522CO2H + O3 : 	KAPHO2*0.15 	;
+{15831.} 	 C522CO3 + HO2 = C522CO3H : 	KAPHO2*0.41 	;
+{15832.} 	 C522CO3 + HO2 = CHOC2CO3 + HCHO + OH : 	KAPHO2*0.44 	;
+{15833.} 	 C522CO3 + NO = CHOC2CO3 + HCHO + NO2 : 	KAPNO 	;
+{15834.} 	 C522CO3 + NO2 = C522PAN : 	KFPAN 	;
+{15835.} 	 C522CO3 + NO3 = CHOC2CO3 + HCHO + NO2 : 	KRO2NO3*1.74 	;
+{15836.} 	 C522CO3 = C522CO2H : 	1.00D-11*RO2*0.3 	;
+{15837.} 	 C522CO3 = CHOC2CO3 + HCHO : 	1.00D-11*RO2*0.7 	;
+{15838.} 	 C736OOH + OH = C736CO + OH : 	8.38D-11 	;
+{15839.} 	 C736OOH = C736O + OH : 	J(41) 	;
+{15840.} 	 C736O = C522CO3 + HCHO : 	KDEC 	;
+{15841.} 	 C736OH + OH = C736CO + HO2 : 	7.92D-11 	;
+{15842.} 	 C118OOH + OH = C118CO + OH : 	5.61D-11 	;
+{15843.} 	 C118OOH = C118O + OH : 	J(41) 	;
+{15844.} 	 C118NO3 + OH = C118CO + NO2 : 	2.94D-11 	;
+{15845.} 	 C118NO3 = C118O + NO2 : 	J(54) 	;
+{15846.} 	 C118O = C829O2 + HCOCH2CHO : 	KDEC 	;
+{15847.} 	 C118OH + OH = C118CO + HO2 : 	4.17D-11 	;
+{15848.} 	 C831O2 + HO2 = C831OOH : 	KRO2HO2*0.914 	;
+{15849.} 	 C831O2 + NO = C831NO3 : 	KRO2NO*0.192 	;
+{15850.} 	 C831O2 + NO = C831O + NO2 : 	KRO2NO*0.808 	;
+{15851.} 	 C831O2 + NO3 = C831O + NO2 : 	KRO2NO3 	;
+{15852.} 	 C831O2 = C831CO : 	2.50D-13*RO2*0.2 	;
+{15853.} 	 C831O2 = C831O : 	2.50D-13*RO2*0.6 	;
+{15854.} 	 C831O2 = C831OH : 	2.50D-13*RO2*0.2 	;
+{15855.} 	 C928CO2H + OH = C928O2 : 	9.40D-12 	;
+{15856.} 	 C928CO3H + OH = C928CO3 : 	1.29D-11 	;
+{15857.} 	 C928CO3H = C928O2 + OH : 	J(41) 	;
+{15858.} 	 C928O2 + HO2 = C928OOH : 	KRO2HO2*0.890 	;
+{15859.} 	 C928O2 + NO = C928NO3 : 	KRO2NO*0.157 	;
+{15860.} 	 C928O2 + NO = C928O + NO2 : 	KRO2NO*0.843 	;
+{15861.} 	 C928O2 + NO3 = C928O + NO2 : 	KRO2NO3 	;
+{15862.} 	 C928O2 = C827CHO : 	1.32D-12*RO2*0.2 	;
+{15863.} 	 C928O2 = C928O : 	1.32D-12*RO2*0.6 	;
+{15864.} 	 C928O2 = C928OH : 	1.32D-12*RO2*0.2 	;
+{15865.} 	 C928PAN + OH = C827CHO + CO + NO2 : 	9.26D-12 	;
+{15866.} 	 C928PAN = C928CO3 + NO2 : 	KBPAN 	;
+{15867.} 	 C46CO3 + HO2 = C46CO2H + O3 : 	KAPHO2*0.15 	;
+{15868.} 	 C46CO3 + HO2 = C46CO3H : 	KAPHO2*0.41 	;
+{15869.} 	 C46CO3 + HO2 = HOC2H4CO3 + HCHO + OH : 	KAPHO2*0.44 	;
+{15870.} 	 C46CO3 + NO = HOC2H4CO3 + HCHO + NO2 : 	KAPNO 	;
+{15871.} 	 C46CO3 + NO2 = C46PAN : 	KFPAN 	;
+{15872.} 	 C46CO3 + NO3 = HOC2H4CO3 + HCHO + NO2 : 	KRO2NO3*1.74 	;
+{15873.} 	 C46CO3 = C46CO2H : 	1.00D-11*RO2*0.3 	;
+{15874.} 	 C46CO3 = HOC2H4CO3 + HCHO : 	1.00D-11*RO2*0.7 	;
+{15875.} 	 C630OOH + OH = C630CO + OH : 	8.69D-11 	;
+{15876.} 	 C630OOH = C630O + OH : 	J(41) 	;
+{15877.} 	 C630O = C46CO3 + HCHO : 	KDEC 	;
+{15878.} 	 C630OH + OH = C630CO + HO2 : 	7.47D-11 	;
+{15879.} 	 C930O2 + HO2 = C930OOH : 	KRO2HO2*0.890 	;
+{15880.} 	 C930O2 + NO = C930NO3 : 	KRO2NO*0.118 	;
+{15881.} 	 C930O2 + NO = C930O + NO2 : 	KRO2NO*0.882 	;
+{15882.} 	 C930O2 + NO3 = C930O + NO2 : 	KRO2NO3 	;
+{15883.} 	 C930O2 = C930O : 	6.70D-15*RO2*0.7 	;
+{15884.} 	 C930O2 = C930OH : 	6.70D-15*RO2*0.3 	;
+{15885.} 	 C1215OOH + OH = C1215CO + OH : 	6.13D-11 	;
+{15886.} 	 C1215OOH = C1215O + OH : 	J(41) 	;
+{15887.} 	 C1215NO3 + OH = C1215CO + NO2 : 	3.23D-11 	;
+{15888.} 	 C1215NO3 = C1215O + NO2 : 	J(54) 	;
+{15889.} 	 C1215O = C930O2 + HOC2H4CHO : 	KDEC 	;
+{15890.} 	 C1215OH + OH = C1215CO + HO2 : 	4.35D-11 	;
+{15891.} 	 EMALNHYOOH + OH = EMALANHYO2 : 	1.69D-11 	;
+{15892.} 	 EMALNHYOOH = EMALANHYO + OH : 	J(41) 	;
+{15893.} 	 EMALANHYO = CO3H4CO3 : 	KDEC 	;
+{15894.} 	 EMALNHY2OH + OH = EMALANHYO : 	1.34D-11 	;
+{15895.} 	 PMALNHYOOH + OH = PMALANHYO2 : 	1.69D-11 	;
+{15896.} 	 PMALNHYOOH = PMALANHYO + OH : 	J(41) 	;
+{15897.} 	 PMALANHYO = C5O45OHCO3 : 	KDEC 	;
+{15898.} 	 PMALNHY2OH + OH = PMALANHYO : 	1.34D-11 	;
+{15899.} 	 IPMLNHYOOH + OH = IPMALNHYO2 : 	1.69D-11 	;
+{15900.} 	 IPMLNHYOOH = IPMALANHYO + OH : 	J(41) 	;
+{15901.} 	 IPMALANHYO = C4MOHOCO3 : 	KDEC 	;
+{15902.} 	 IPMLNHY2OH + OH = IPMALANHYO : 	1.34D-11 	;
+{15903.} 	 C312COCO3H + OH = C312COCO3 : 	1.63D-11 	;
+{15904.} 	 C312COCO3H = CHOCOCH2O2 + OH : 	J(41)+J(34) 	;
+{15905.} 	 C312COPAN + OH = C33CO + CO + NO2 : 	1.27D-11 	;
+{15906.} 	 C312COPAN = C312COCO3 + NO2 : 	KBPAN 	;
+{15907.} 	 ALCOCH2OOH + OH = CHOCOCH2O2 : 	2.41D-11 	;
+{15908.} 	 ALCOCH2OOH = CHOCOCH2O + OH : 	J(41)+J(34) 	;
+{15909.} 	 CHOCOCH2O = HCHO + HO2 + CO + CO : 	KDEC*0.6 	;
+{15910.} 	 CHOCOCH2O = HCOCO3 + HCHO : 	KDEC*0.4 	;
+{15911.} 	 NC72OOH + OH = NC72O2 : 	1.85D-11 	;
+{15912.} 	 NC72OOH = NC72O + OH : 	J(41) 	;
+{15913.} 	 NC72O = NC61CO3 : 	KDEC 	;
+{15914.} 	 C813O2 + HO2 = C813OOH : 	KRO2HO2*0.859 	;
+{15915.} 	 C813O2 + NO = C813NO3 : 	KRO2NO*0.104 	;
+{15916.} 	 C813O2 + NO = C813O + NO2 : 	KRO2NO*0.896 	;
+{15917.} 	 C813O2 + NO3 = C813O + NO2 : 	KRO2NO3 	;
+{15918.} 	 C813O2 = C813O : 	6.70D-15*RO2*0.7 	;
+{15919.} 	 C813O2 = C813OH : 	6.70D-15*RO2*0.3 	;
+{15920.} 	 C722O2 + HO2 = C722OOH : 	KRO2HO2*0.820 	;
+{15921.} 	 C722O2 + NO = C722O + NO2 : 	KRO2NO 	;
+{15922.} 	 C722O2 + NO3 = C722O + NO2 : 	KRO2NO3 	;
+{15923.} 	 C722O2 = C722O : 	6.70D-15*RO2 	;
+{15924.} 	 C621OOH + OH = C621O2 : 	1.00D-10 	;
+{15925.} 	 C621OOH = C621O + OH : 	J(41)+J(22) 	;
+{15926.} 	 C621O = HCHO + H1C23C4CHO + HO2 : 	KDEC 	;
+{15927.} 	 C515CO3H + OH = C515CO3 : 	7.05D-11 	;
+{15928.} 	 C515CO3H = C515O2 + OH : 	J(41)+J(35) 	;
+{15929.} 	 C515PAN + OH = C515CO + CO + NO2 : 	6.69D-11 	;
+{15930.} 	 C515PAN = C515CO3 + NO2 : 	KBPAN 	;
+{15931.} 	 C515OOH + OH = C515CO + OH : 	7.91D-11 	;
+{15932.} 	 C515OOH = C515O + OH : 	J(41)+J(35) 	;
+{15933.} 	 C515O = HCHO + CO + HCOCH2CO3 : 	KDEC 	;
+{15934.} 	 C615CO3 + HO2 = C615CO2H + O3 : 	KAPHO2*0.15 	;
+{15935.} 	 C615CO3 + HO2 = C615CO3H : 	KAPHO2*0.41 	;
+{15936.} 	 C615CO3 + HO2 = C615O2 + OH : 	KAPHO2*0.44 	;
+{15937.} 	 C615CO3 + NO = C615O2 + NO2 : 	KAPNO 	;
+{15938.} 	 C615CO3 + NO2 = C615PAN : 	KFPAN 	;
+{15939.} 	 C615CO3 + NO3 = C615O2 + NO2 : 	KRO2NO3*1.74 	;
+{15940.} 	 C615CO3 = C615CO2H : 	1.00D-11*RO2*0.3 	;
+{15941.} 	 C615CO3 = C615O2 : 	1.00D-11*RO2*0.7 	;
+{15942.} 	 C617CO3 + HO2 = C617CO2H + O3 : 	KAPHO2*0.15 	;
+{15943.} 	 C617CO3 + HO2 = C617CO3H : 	KAPHO2*0.41 	;
+{15944.} 	 C617CO3 + HO2 = C617O2 + OH : 	KAPHO2*0.44 	;
+{15945.} 	 C617CO3 + NO = C617O2 + NO2 : 	KAPNO 	;
+{15946.} 	 C617CO3 + NO2 = C617PAN : 	KFPAN 	;
+{15947.} 	 C617CO3 + NO3 = C617O2 + NO2 : 	KRO2NO3*1.74 	;
+{15948.} 	 C617CO3 = C617CO2H : 	1.00D-11*RO2*0.3 	;
+{15949.} 	 C617CO3 = C617O2 : 	1.00D-11*RO2*0.7 	;
+{15950.} 	 C618CO3 + HO2 = C618CO2H + O3 : 	KAPHO2*0.15 	;
+{15951.} 	 C618CO3 + HO2 = C618CO3H : 	KAPHO2*0.41 	;
+{15952.} 	 C618CO3 + HO2 = C618O2 + OH : 	KAPHO2*0.44 	;
+{15953.} 	 C618CO3 + NO = C618O2 + NO2 : 	KAPNO 	;
+{15954.} 	 C618CO3 + NO2 = C618PAN : 	KFPAN 	;
+{15955.} 	 C618CO3 + NO3 = C618O2 + NO2 : 	KRO2NO3*1.74 	;
+{15956.} 	 C618CO3 = C618CO2H : 	1.00D-11*RO2*0.3 	;
+{15957.} 	 C618CO3 = C618O2 : 	1.00D-11*RO2*0.7 	;
+{15958.} 	 C617O2 + HO2 = C617OOH : 	KRO2HO2*0.770 	;
+{15959.} 	 C617O2 + NO = C617O + NO2 : 	KRO2NO 	;
+{15960.} 	 C617O2 + NO3 = C617O + NO2 : 	KRO2NO3 	;
+{15961.} 	 C617O2 = C615CO : 	2.00D-12*RO2*0.2 	;
+{15962.} 	 C617O2 = C617O : 	2.00D-12*RO2*0.6 	;
+{15963.} 	 C617O2 = C617OH : 	2.00D-12*RO2*0.2 	;
+{15964.} 	 C618O2 + HO2 = C618OOH : 	KRO2HO2*0.770 	;
+{15965.} 	 C618O2 + NO = C618O + NO2 : 	KRO2NO 	;
+{15966.} 	 C618O2 + NO3 = C618O + NO2 : 	KRO2NO3 	;
+{15967.} 	 C618O2 = C618O : 	9.20D-14*RO2*0.7 	;
+{15968.} 	 C618O2 = C67CHO : 	9.20D-14*RO2*0.3 	;
+{15969.} 	 C821OOH + OH = C821O2 : 	5.42D-11 	;
+{15970.} 	 C821OOH = C821O + OH : 	J(35)+J(41) 	;
+{15971.} 	 C821O = CH3CO3 + CO + CO2C3CHO : 	KDEC 	;
+{15972.} 	 HMVKBCO2H + OH = HMVKBO2 : 	1.48D-11 	;
+{15973.} 	 HMVKBCO3H + OH = HMVKBCO3 : 	1.79D-11 	;
+{15974.} 	 HMVKBCO3H = HMVKBO2 + OH : 	J(41) 	;
+{15975.} 	 HMVKBPAN + OH = BIACETOH + CO + NO2 : 	1.43D-11 	;
+{15976.} 	 HMVKBPAN = HMVKBCO3 + NO2 : 	KBPAN 	;
+{15977.} 	 C520OOH + OH = C520O2 : 	3.74D-11 	;
+{15978.} 	 C520OOH = BIACETOH + CO + HO2 + OH : 	J(15) 	;
+{15979.} 	 C520OOH = C520O + OH : 	J(41) 	;
+{15980.} 	 C520OOH = HOCH2COCHO + CH3CO3 + OH : 	J(22) 	;
+{15981.} 	 C520O = BIACETOH + CO + HO2 : 	KDEC*0.5 	;
+{15982.} 	 C520O = HOCH2COCHO + CH3CO3 : 	KDEC*0.5 	;
+{15983.} 	 C520OH + OH = C520O : 	3.40D-11 	;
+{15984.} 	 C520OH = BIACETOH + CO + HO2 + HO2 : 	J(15) 	;
+{15985.} 	 C520OH = HOCH2COCHO + CH3CO3 + HO2 : 	J(22) 	;
+{15986.} 	 NC730O2 + HO2 = NC730OOH : 	KRO2HO2*0.820 	;
+{15987.} 	 NC730O2 + NO = NC730O + NO2 : 	KRO2NO 	;
+{15988.} 	 NC730O2 + NO3 = NC730O + NO2 : 	KRO2NO3 	;
+{15989.} 	 NC730O2 = NC730O : 	9.20D-14*RO2*0.7 	;
+{15990.} 	 NC730O2 = NC730OH : 	9.20D-14*RO2*0.3 	;
+{15991.} 	 C519CHO + NO3 = C519CO3 + HNO3 : 	KNO3AL*8.5 	;
+{15992.} 	 C519CHO + OH = C519CO3 : 	3.50D-11 	;
+{15993.} 	 C629OOA = C629O2 + OH : 	KDEC 	;
+{15994.} 	 C730O2 + HO2 = C730OOH : 	KRO2HO2*0.820 	;
+{15995.} 	 C730O2 + NO = C730NO3 : 	KRO2NO*0.056 	;
+{15996.} 	 C730O2 + NO = C730O + NO2 : 	KRO2NO*0.944 	;
+{15997.} 	 C730O2 + NO3 = C730O + NO2 : 	KRO2NO3 	;
+{15998.} 	 C730O2 = C730O : 	9.20D-14*RO2*0.7 	;
+{15999.} 	 C730O2 = C730OH : 	9.20D-14*RO2*0.3 	;
+{16000.} 	 C624CO2H + OH = C624O2 : 	5.94D-11 	;
+{16001.} 	 C624CO3H + OH = C624CO3 : 	6.25D-11 	;
+{16002.} 	 C624CO3H = C624O2 + OH : 	J(41) 	;
+{16003.} 	 C624O2 + HO2 = C624OOH : 	KRO2HO2*0.770 	;
+{16004.} 	 C624O2 + NO = C624NO3 : 	KRO2NO*0.209 	;
+{16005.} 	 C624O2 + NO = C624O + NO2 : 	KRO2NO*0.791 	;
+{16006.} 	 C624O2 + NO3 = C624O + NO2 : 	KRO2NO3 	;
+{16007.} 	 C624O2 = C624CO : 	2.50D-13*RO2*0.2 	;
+{16008.} 	 C624O2 = C624O : 	2.50D-13*RO2*0.6 	;
+{16009.} 	 C624O2 = C624OH : 	2.50D-13*RO2*0.2 	;
+{16010.} 	 C624PAN + OH = C624CO + CO + NO2 : 	5.89D-11 	;
+{16011.} 	 C624PAN = C624CO3 + NO2 : 	KBPAN 	;
+{16012.} 	 C733O2 + HO2 = C733OOH : 	KRO2HO2*0.859 	;
+{16013.} 	 C733O2 + NO = C733O + NO2 : 	KRO2NO 	;
+{16014.} 	 C733O2 + NO3 = C733O + NO2 : 	KRO2NO3 	;
+{16015.} 	 C733O2 = C733CO : 	8.80D-12*RO2*0.2 	;
+{16016.} 	 C733O2 = C733O : 	8.80D-12*RO2*0.6 	;
+{16017.} 	 C733O2 = C733OH : 	8.80D-12*RO2*0.2 	;
+{16018.} 	 C732OOH + OH = C732CO + OH : 	4.95D-11 	;
+{16019.} 	 C732OOH = C732O + OH : 	J(41) 	;
+{16020.} 	 C732NO3 + OH = C732CO + NO2 : 	7.97D-12 	;
+{16021.} 	 C732NO3 = C732O + NO2 : 	J(53) 	;
+{16022.} 	 C732O = C734O2 : 	KDEC 	;
+{16023.} 	 C732CO + OH = C734O2 : 	2.81D-11 	;
+{16024.} 	 C732CO = C734O2 + HO2 : 	J(15) 	;
+{16025.} 	 C732OH + OH = C732CO + HO2 : 	2.82D-11 	;
+{16026.} 	 C1212O2 + HO2 = C1212OOH : 	KRO2HO2*0.947 	;
+{16027.} 	 C1212O2 + NO = C1212NO3 : 	KRO2NO*0.132 	;
+{16028.} 	 C1212O2 + NO = C1212O + NO2 : 	KRO2NO*0.868 	;
+{16029.} 	 C1212O2 + NO3 = C1212O + NO2 : 	KRO2NO3 	;
+{16030.} 	 C1212O2 = C1212O : 	9.20D-14*RO2*0.7 	;
+{16031.} 	 C1212O2 = C1212OH : 	9.20D-14*RO2*0.3 	;
+{16032.} 	 C829OOH + OH = C829O2 : 	1.43D-11 	;
+{16033.} 	 C829OOH = C829O + OH : 	J(41)+J(35) 	;
+{16034.} 	 C829NO3 + OH = C513CO + CH3COCH3 + NO2 : 	1.01D-11 	;
+{16035.} 	 C829NO3 = C829O + NO2 : 	J(55)+J(35) 	;
+{16036.} 	 C829O = C521O2 + CH3COCH3 : 	KDEC 	;
+{16037.} 	 C829OH + OH = C829O : 	1.08D-11 	;
+{16038.} 	 C829OH = H2M2C3CO3 + HOC2H4CO3 : 	J(35) 	;
+{16039.} 	 C134OOH + OH = C134CO + OH : 	3.49D-11 	;
+{16040.} 	 C134OOH = C134O + OH : 	J(41)+J(35) 	;
+{16041.} 	 C134O = C827CHO + CO + HOC2H4CO3 : 	KDEC 	;
+{16042.} 	 C134CO + OH = C135O2 : 	1.63D-11 	;
+{16043.} 	 C134CO = C827CO3 + CO + HOC2H4CO3 : 	J(35) 	;
+{16044.} 	 C134OH + OH = C134CO + HO2 : 	2.27D-11 	;
+{16045.} 	 C134OH = C827CHO + HO2 + CO + HOC2H4CO3 : 	J(35) 	;
+{16046.} 	 C827CO2H + OH = C827O2 : 	9.84D-12 	;
+{16047.} 	 C827CO3H + OH = C827CO3 : 	1.32D-11 	;
+{16048.} 	 C827CO3H = C827O2 + OH : 	J(41) 	;
+{16049.} 	 C827O2 + HO2 = C827OOH : 	KRO2HO2*0.859 	;
+{16050.} 	 C827O2 + NO = C827O + NO2 : 	KRO2NO 	;
+{16051.} 	 C827O2 + NO3 = C827O + NO2 : 	KRO2NO3 	;
+{16052.} 	 C827O2 = C827O : 	6.70D-15*RO2*0.7 	;
+{16053.} 	 C827O2 = C827OH : 	6.70D-15*RO2*0.3 	;
+{16054.} 	 C827PAN + OH = CO2C4CHO + CH3COCH3 + NO2 : 	9.60D-12 	;
+{16055.} 	 C827PAN = C827CO3 + NO2 : 	KBPAN 	;
+{16056.} 	 C1310CO + OH = C927O2 + CHOC2CO2H : 	7.74D-11 	;
+{16057.} 	 C1310O2 + HO2 = C1310OOH : 	KRO2HO2*0.959 	;
+{16058.} 	 C1310O2 + NO = C1310NO3 : 	KRO2NO*0.245 	;
+{16059.} 	 C1310O2 + NO = C1310O + NO2 : 	KRO2NO*0.755 	;
+{16060.} 	 C1310O2 + NO3 = C1310O + NO2 : 	KRO2NO3 	;
+{16061.} 	 C1310O2 = C1310CO : 	2.50D-13*RO2*0.2 	;
+{16062.} 	 C1310O2 = C1310O : 	2.50D-13*RO2*0.6 	;
+{16063.} 	 C1310O2 = C1310OH : 	2.50D-13*RO2*0.2 	;
+{16064.} 	 COO2C4CHO + OH = COO2C4CO3 : 	2.43D-11 	;
+{16065.} 	 COO2C4CHO = COO2C4O2 + HO2 + CO : 	J(15) 	;
+{16066.} 	 C522CO2H + OH = CHOC2CO3 + HCHO : 	7.32D-11 	;
+{16067.} 	 C522CO3H + OH = C522CO3 : 	J(41) 	;
+{16068.} 	 C522CO3H = CHOC2CO3 + HCHO + OH : 	7.68D-11 	;
+{16069.} 	 C522PAN + OH = HCOCH2CHO + CO + NO2 : 	7.32D-11 	;
+{16070.} 	 C522PAN = C522CO3 + NO2 : 	KBPAN 	;
+{16071.} 	 C831OOH + OH = C831CO + OH : 	7.57D-11 	;
+{16072.} 	 C831OOH = C831O + OH : 	J(41) 	;
+{16073.} 	 C831NO3 + OH = C831CO + NO2 : 	4.38D-11 	;
+{16074.} 	 C831NO3 = C831O + NO2 : 	J(54) 	;
+{16075.} 	 C831O = C831CO + HO2 : 	KROSEC*O2 	;
+{16076.} 	 C831O = HCOCH2CHO + C3ME3CHOO2 : 	2.70D+14*EXP(-6643/TEMP) 	;
+{16077.} 	 C831CO + OH = HCOCH2CHO + C3ME3CHOO2 : 	4.94D-11 	;
+{16078.} 	 C831OH + OH = C831CO + HO2 : 	5.78D-11 	;
+{16079.} 	 C928OOH + OH = C827CHO + OH : 	1.99D-11 	;
+{16080.} 	 C928OOH = C928O + OH : 	J(41) 	;
+{16081.} 	 C928NO3 + OH = C827CHO + NO2 : 	7.03D-12 	;
+{16082.} 	 C928NO3 = C928O + NO2 : 	J(53) 	;
+{16083.} 	 C928O = C929O2 : 	KDEC 	;
+{16084.} 	 C827CHO + NO3 = C827CO3 + HNO3 : 	KNO3AL*8.5 	;
+{16085.} 	 C827CHO + OH = C827CO3 : 	2.76D-11 	;
+{16086.} 	 C827CHO = C827O2 + CO + HO2 : 	J(15) 	;
+{16087.} 	 C928OH + OH = C827CHO + HO2 : 	1.08D-11 	;
+{16088.} 	 C46CO2H + OH = HOC2H4CO3 + HCHO : 	6.98D-11 	;
+{16089.} 	 C46CO3H + OH = C46CO3 : 	7.29D-11 	;
+{16090.} 	 C46CO3H = HOC2H4CO3 + HCHO + OH : 	J(41) 	;
+{16091.} 	 C46PAN + OH = HOC2H4CHO + HCHO + NO2 : 	6.93D-11 	;
+{16092.} 	 C46PAN = C46CO3 + NO2 : 	KBPAN 	;
+{16093.} 	 C930OOH + OH = CO123C5CHO + CH3COCH3 + OH : 	3.46D-11 	;
+{16094.} 	 C930OOH = C930O + OH : 	J(41) 	;
+{16095.} 	 C930NO3 + OH = CO123C5CHO + CH3COCH3 + NO2 : 	2.76D-11 	;
+{16096.} 	 C930NO3 = C930O + NO2 : 	J(55) 	;
+{16097.} 	 C930O = C6145COO2 + CH3COCH3 : 	KDEC 	;
+{16098.} 	 C930OH + OH = CO123C5CHO + CH3COCH3 + HO2 : 	3.12D-11 	;
+{16099.} 	 NC61CO3 + HO2 = CO235C5CHO + NO2 + OH : 	KAPHO2*0.44 	;
+{16100.} 	 NC61CO3 + HO2 = NC61CO3H : 	KAPHO2*0.56 	;
+{16101.} 	 NC61CO3 + NO = CO235C5CHO + NO2 + NO2 : 	KAPNO 	;
+{16102.} 	 NC61CO3 + NO2 = NC6PAN1 : 	KFPAN 	;
+{16103.} 	 NC61CO3 + NO3 = CO235C5CHO + NO2 + NO2 : 	KRO2NO3*1.74 	;
+{16104.} 	 NC61CO3 = CO235C5CHO + NO2 : 	1.00D-11*RO2 	;
+{16105.} 	 C813OOH + OH = C813O2 : 	1.86D-11 	;
+{16106.} 	 C813OOH = C813O + OH : 	J(41)+J(34) 	;
+{16107.} 	 C813NO3 + OH = CH3COCH3 + CO13C3CO2H + HCHO + NO2 : 	7.82D-12 	;
+{16108.} 	 C813NO3 = C813O + NO2 : 	J(55)+J(34) 	;
+{16109.} 	 C813O = CH3COCH3 + C512O2 : 	KDEC 	;
+{16110.} 	 C813OH + OH = C813O : 	1.75D-11 	;
+{16111.} 	 C813OH = C813O + HO2 : 	J(34) 	;
+{16112.} 	 C722OOH + OH = C722O2 : 	3.31D-11 	;
+{16113.} 	 C722OOH = C722O + OH : 	J(41) 	;
+{16114.} 	 C722O = CH3COCH3 + C44O2 : 	KDEC 	;
+{16115.} 	 H1C23C4CHO + NO3 = H1C23C4CO3 + HNO3 : 	KNO3AL*5.5 	;
+{16116.} 	 H1C23C4CHO + OH = H1C23C4CO3 : 	2.37D-11 	;
+{16117.} 	 H1C23C4CHO = H1C23C4O2 + CO + HO2 : 	J(15) 	;
+{16118.} 	 H1C23C4CHO = HCOCH2CO3 + HOCH2CO3 : 	J(35) 	;
+{16119.} 	 C515CO + OH = CO + CO + HCOCH2CO3 : 	7.90D-11 	;
+{16120.} 	 C515CO = HO2 + CO + CO + HCOCH2CO3 : 	J(34)+J(35) 	;
+{16121.} 	 C615CO2H + OH = C615O2 : 	9.13D-11 	;
+{16122.} 	 C615CO2H = C615O2 + HO2 : 	J(15)*2 	;
+{16123.} 	 C615CO3H + OH = C615CO3 : 	9.44D-11 	;
+{16124.} 	 C615CO3H = C615O2 + OH : 	J(41)+J(15)*2 	;
+{16125.} 	 C615O2 + HO2 = C615OOH : 	KRO2HO2*0.770 	;
+{16126.} 	 C615O2 + NO = C615O + NO2 : 	KRO2NO 	;
+{16127.} 	 C615O2 + NO3 = C615O + NO2 : 	KRO2NO3 	;
+{16128.} 	 C615O2 = C615CO : 	8.80D-13*RO2*0.2 	;
+{16129.} 	 C615O2 = C615O : 	8.80D-13*RO2*0.6 	;
+{16130.} 	 C615O2 = C615OH : 	8.80D-13*RO2*0.2 	;
+{16131.} 	 C615PAN + OH = C615CO + CO + NO2 : 	8.47D-11 	;
+{16132.} 	 C615PAN = C615CO3 + NO2 : 	KBPAN 	;
+{16133.} 	 C617CO2H + OH = C617O2 : 	6.72D-11 	;
+{16134.} 	 C617CO2H = C617O2 + HO2 : 	J(15) 	;
+{16135.} 	 C617CO3H + OH = C617CO3 : 	7.03D-11 	;
+{16136.} 	 C617CO3H = C617O2 + OH : 	J(41)+J(15) 	;
+{16137.} 	 C617PAN + OH = C615CO + CO + NO2 : 	6.74D-11 	;
+{16138.} 	 C617PAN = C617CO3 + NO2 : 	KBPAN 	;
+{16139.} 	 C618CO2H + OH = C618O2 : 	6.72D-11 	;
+{16140.} 	 C618CO2H = C618O2 + HO2 : 	J(15) 	;
+{16141.} 	 C618CO3H + OH = C618CO3 : 	7.03D-11 	;
+{16142.} 	 C618CO3H = C618O2 + OH : 	J(41)+J(15) 	;
+{16143.} 	 C618PAN + OH = CH3COCH3 + HCOCH2CHO + CO + NO2 : 	6.67D-11 	;
+{16144.} 	 C618PAN = C618CO3 + NO2 : 	KBPAN 	;
+{16145.} 	 C617OOH + OH = C615CO + OH : 	7.56D-11 	;
+{16146.} 	 C617OOH = C617O + OH : 	J(41)+J(15) 	;
+{16147.} 	 C617O = CO1M22CO3 + HCHO : 	KDEC 	;
+{16148.} 	 C615CO + OH = CO1M22CO3 + CO : 	7.88D-11 	;
+{16149.} 	 C615CO = CO1M22CO3 + CO + HO2 : 	J(34)+J(15) 	;
+{16150.} 	 C617OH + OH = C615CO + HO2 : 	6.89D-11 	;
+{16151.} 	 C617OH = C617O + HO2 : 	J(15) 	;
+{16152.} 	 C618OOH + OH = C618O2 : 	7.03D-11 	;
+{16153.} 	 C618OOH = C618O + OH : 	J(41)+J(15) 	;
+{16154.} 	 C618O = HCOCH2CO3 + CH3COCH3 : 	KDEC 	;
+{16155.} 	 NC730OOH + OH = NC730O2 : 	3.58D-11 	;
+{16156.} 	 NC730OOH = NC730O + OH : 	J(41) 	;
+{16157.} 	 NC730O = C519CHO + HCHO + NO2 : 	KDEC 	;
+{16158.} 	 NC730OH + OH = C519CHO + HCHO + NO2 : 	3.34D-11 	;
+{16159.} 	 C519CO3 + HO2 = C519CO2H + O3 : 	KAPHO2*0.15 	;
+{16160.} 	 C519CO3 + HO2 = C519CO3H : 	KAPHO2*0.41 	;
+{16161.} 	 C519CO3 + HO2 = C519O2 + OH : 	KAPHO2*0.44 	;
+{16162.} 	 C519CO3 + NO = C519O2 + NO2 : 	KAPNO 	;
+{16163.} 	 C519CO3 + NO2 = C519PAN : 	KFPAN 	;
+{16164.} 	 C519CO3 + NO3 = C519O2 + NO2 : 	KRO2NO3*1.74 	;
+{16165.} 	 C519CO3 = C519CO2H : 	1.00D-11*RO2*0.3 	;
+{16166.} 	 C519CO3 = C519O2 : 	1.00D-11*RO2*0.7 	;
+{16167.} 	 C629O2 + HO2 = C629OOH : 	KRO2HO2*0.770 	;
+{16168.} 	 C629O2 + NO = C629O + NO2 : 	KRO2NO 	;
+{16169.} 	 C629O2 + NO3 = C629O + NO2 : 	KRO2NO3 	;
+{16170.} 	 C629O2 = C629O : 	9.20D-14*RO2*0.7 	;
+{16171.} 	 C629O2 = C629OH : 	9.20D-14*RO2*0.3 	;
+{16172.} 	 C730OOH + OH = C730O2 : 	4.00D-11 	;
+{16173.} 	 C730OOH = C730O + OH : 	J(41) 	;
+{16174.} 	 C730NO3 + OH = C519CHO + HCHO + NO2 : 	3.09D-11 	;
+{16175.} 	 C730O = C519CHO + HCHO + HO2 : 	KDEC 	;
+{16176.} 	 C730OH + OH = C519CHO + HCHO + HO2 : 	3.66D-11 	;
+{16177.} 	 C624OOH + OH = C624CO + OH : 	1.10D-10 	;
+{16178.} 	 C624OOH = C624O + OH : 	J(41) 	;
+{16179.} 	 C624NO3 + OH = C624CO + NO2 : 	2.92D-11 	;
+{16180.} 	 C624NO3 = C624O + NO2 : 	J(54) 	;
+{16181.} 	 C624O = C624CO + HO2 : 	KROSEC*O2 	;
+{16182.} 	 C624O = MACR + HOCH2CH2O2 : 	4.00D+14*EXP(-6990/TEMP) 	;
+{16183.} 	 C624CO + OH = C625O2 : 	6.04D-11 	;
+{16184.} 	 C624CO = MACO3 + HOCH2CH2O2 : 	J(22) 	;
+{16185.} 	 C624OH + OH = C624CO + HO2 : 	9.53D-11 	;
+{16186.} 	 C733OOH + OH = C733CO + OH : 	5.51D-11 	;
+{16187.} 	 C733OOH = C733O + OH : 	J(41) 	;
+{16188.} 	 C733O = C519CHO + CO + HO2 : 	KDEC 	;
+{16189.} 	 C733CO + OH = C519CO3 + CO : 	2.28D-11 	;
+{16190.} 	 C733CO = C519CO3 + CO + HO2 : 	J(34) 	;
+{16191.} 	 C733OH + OH = C733CO + HO2 : 	4.30D-11 	;
+{16192.} 	 C734O2 + HO2 = C734OOH : 	KRO2HO2*0.859 	;
+{16193.} 	 C734O2 + NO = C734O + NO2 : 	KRO2NO 	;
+{16194.} 	 C734O2 + NO3 = C734O + NO2 : 	KRO2NO3 	;
+{16195.} 	 C734O2 = C734CO : 	8.80D-12*RO2*0.2 	;
+{16196.} 	 C734O2 = C734O : 	8.80D-12*RO2*0.6 	;
+{16197.} 	 C734O2 = C734OH : 	8.80D-12*RO2*0.2 	;
+{16198.} 	 C1212OOH + OH = C1212O2 : 	1.57D-11 	;
+{16199.} 	 C1212OOH = C1212O + OH : 	J(41) 	;
+{16200.} 	 C1212NO3 + OH = C1213CO + NO2 : 	8.60D-12 	;
+{16201.} 	 C1212NO3 = C1212O + NO2 : 	J(55) 	;
+{16202.} 	 C1212O = C1213O2 : 	KDEC 	;
+{16203.} 	 C1212OH + OH = C1212O : 	1.23D-11 	;
+{16204.} 	 C521O2 + HO2 = C521OOH : 	KRO2HO2*0.706 	;
+{16205.} 	 C521O2 + NO = C521O + NO2 : 	KRO2NO 	;
+{16206.} 	 C521O2 + NO3 = C521O + NO2 : 	KRO2NO3 	;
+{16207.} 	 C521O2 = C513CO : 	2.00D-12*RO2*0.2 	;
+{16208.} 	 C521O2 = C521O : 	2.00D-12*RO2*0.6 	;
+{16209.} 	 C521O2 = C521OH : 	2.00D-12*RO2*0.2 	;
+{16210.} 	 C135O2 + HO2 = C135OOH : 	KRO2HO2*0.959 	;
+{16211.} 	 C135O2 + NO = C135O + NO2 : 	KRO2NO 	;
+{16212.} 	 C135O2 + NO3 = C135O + NO2 : 	KRO2NO3 	;
+{16213.} 	 C135O2 = C135O : 	8.80D-13*RO2 	;
+{16214.} 	 C827OOH + OH = C827O2 : 	1.05D-11 	;
+{16215.} 	 C827OOH = C827O2 + OH : 	J(41) 	;
+{16216.} 	 C827O = CO2C4CO3 + CH3COCH3 : 	KDEC 	;
+{16217.} 	 C827OH + OH = C827O : 	7.04D-12 	;
+{16218.} 	 C1310OOH + OH = C1310CO + OH : 	7.10D-11 	;
+{16219.} 	 C1310OOH = C1310O + OH : 	J(41) 	;
+{16220.} 	 C1310NO3 + OH = C1310CO + NO2 : 	5.57D-11 	;
+{16221.} 	 C1310NO3 = C1310O + NO2 : 	J(55) 	;
+{16222.} 	 C1310O = C927O2 + CHOC2CO2H : 	KDEC 	;
+{16223.} 	 C1310OH + OH = C1310CO + HO2 : 	6.20D-11 	;
+{16224.} 	 COO2C4CO3 + HO2 = COO2C4CO3H : 	KAPHO2*0.56 	;
+{16225.} 	 COO2C4CO3 + HO2 = COO2C4O2 + OH : 	KAPHO2*0.44 	;
+{16226.} 	 COO2C4CO3 + NO = COO2C4O2 + NO2 : 	KAPNO 	;
+{16227.} 	 COO2C4CO3 + NO2 = COO2C4PAN : 	KFPAN 	;
+{16228.} 	 COO2C4CO3 + NO3 = COO2C4O2 + NO2 : 	KRO2NO3*1.74 	;
+{16229.} 	 COO2C4CO3 = COO2C4O2 : 	1.00D-11*RO2 	;
+{16230.} 	 COO2C4O2 + HO2 = COO2C4OOH : 	KRO2HO2*0.625 	;
+{16231.} 	 COO2C4O2 + NO = COO2C4O + NO2 : 	KRO2NO 	;
+{16232.} 	 COO2C4O2 + NO3 = COO2C4O + NO2 : 	KRO2NO3 	;
+{16233.} 	 COO2C4O2 = COO2C4O : 	2.00D-12*RO2 	;
+{16234.} 	 C929O2 + HO2 = C929OOH : 	KRO2HO2*0.890 	;
+{16235.} 	 C929O2 + NO = C929O + NO2 : 	KRO2NO 	;
+{16236.} 	 C929O2 + NO3 = C929O + NO2 : 	KRO2NO3 	;
+{16237.} 	 C929O2 = C929CO : 	8.80D-13*RO2*0.2 	;
+{16238.} 	 C929O2 = C929O : 	8.80D-13*RO2*0.6 	;
+{16239.} 	 C929O2 = C929OH : 	8.80D-13*RO2*0.2 	;
+{16240.} 	 NC61CO3H + OH = NC61CO3 : 	1.68D-11 	;
+{16241.} 	 NC61CO3H = CO235C5CHO + NO2 + OH : 	J(41) 	;
+{16242.} 	 NC6PAN1 + OH = CO235C5CHO + CO + NO2 + NO2 : 	1.32D-11 	;
+{16243.} 	 NC6PAN1 = NC61CO3 + NO2 : 	KBPAN 	;
+{16244.} 	 C44O2 + HO2 = C44OOH : 	KRO2HO2*0.625 	;
+{16245.} 	 C44O2 + NO = C44O + NO2 : 	KRO2NO 	;
+{16246.} 	 C44O2 + NO3 = C44O + NO2 : 	KRO2NO3 	;
+{16247.} 	 C44O2 = C44O : 	8.80D-13*RO2 	;
+{16248.} 	 H1C23C4CO3 + HO2 = H1C23C4O2 + OH : 	KAPHO2*0.44 	;
+{16249.} 	 H1C23C4CO3 + HO2 = HC23C4CO3H : 	KAPHO2*0.56 	;
+{16250.} 	 H1C23C4CO3 + NO = H1C23C4O2 + NO2 : 	KAPNO 	;
+{16251.} 	 H1C23C4CO3 + NO2 = H1C23C4PAN : 	KFPAN 	;
+{16252.} 	 H1C23C4CO3 + NO3 = H1C23C4O2 + NO2 : 	KRO2NO3*1.74 	;
+{16253.} 	 H1C23C4CO3 = H1C23C4O2 : 	1.00D-11*RO2 	;
+{16254.} 	 H1C23C4O2 + HO2 = H1C23C4OOH : 	KRO2HO2*0.625 	;
+{16255.} 	 H1C23C4O2 + NO = H1C23C4O + NO2 : 	KRO2NO 	;
+{16256.} 	 H1C23C4O2 + NO3 = H1C23C4O + NO2 : 	KRO2NO3 	;
+{16257.} 	 H1C23C4O2 = H1C23C4O : 	2.00D-12*RO2 	;
+{16258.} 	 C615OOH + OH = C615CO + OH : 	9.31D-11 	;
+{16259.} 	 C615OOH = C615O + OH : 	J(41)+J(15)*2 	;
+{16260.} 	 C615O = CO1M22CHO + HO2 + CO : 	KDEC 	;
+{16261.} 	 C615OH + OH = C615CO + HO2 : 	6.15D-11 	;
+{16262.} 	 C615OH = C615O + HO2 : 	J(15)*2 	;
+{16263.} 	 CO1M22CO3 + HO2 = CO1M22CO2H + O3 : 	KAPHO2*0.15 	;
+{16264.} 	 CO1M22CO3 + HO2 = CO1M22CO3H : 	KAPHO2*0.41 	;
+{16265.} 	 CO1M22CO3 + HO2 = IBUTALCO2 + OH : 	KAPHO2*0.44 	;
+{16266.} 	 CO1M22CO3 + NO = IBUTALCO2 + NO2 : 	KAPNO 	;
+{16267.} 	 CO1M22CO3 + NO2 = CO1M22PAN : 	KFPAN 	;
+{16268.} 	 CO1M22CO3 + NO3 = IBUTALCO2 + NO2 : 	KRO2NO3*1.74 	;
+{16269.} 	 CO1M22CO3 = CO1M22CO2H : 	1.00D-11*RO2*0.3 	;
+{16270.} 	 CO1M22CO3 = IBUTALCO2 : 	1.00D-11*RO2*0.7 	;
+{16271.} 	 C519CO2H + OH = C519O2 : 	1.06D-11 	;
+{16272.} 	 C519CO3H + OH = C519CO3 : 	1.37D-11 	;
+{16273.} 	 C519CO3H = C519O2 + OH : 	J(41)+J(22) 	;
+{16274.} 	 C519O2 + HO2 = C519OOH : 	KRO2HO2*0.706 	;
+{16275.} 	 C519O2 + NO = C519O + NO2 : 	KRO2NO 	;
+{16276.} 	 C519O2 + NO3 = C519O + NO2 : 	KRO2NO3 	;
+{16277.} 	 C519O2 = C519O : 	8.80D-13*RO2*0.6 	;
+{16278.} 	 C519O2 = HO13CO4C5 : 	8.80D-13*RO2*0.2 	;
+{16279.} 	 C519O2 = HO1CO34C5 : 	8.80D-13*RO2*0.2 	;
+{16280.} 	 C519PAN + OH = HO1CO34C5 + CO + NO2 : 	1.01D-11 	;
+{16281.} 	 C519PAN = C519CO3 + NO2 : 	KBPAN 	;
+{16282.} 	 C629OOH + OH = C629O2 : 	3.31D-11 	;
+{16283.} 	 C629OOH = C629O + OH : 	J(41) 	;
+{16284.} 	 C629OOH = HO1CO34C5 + CO + HO2 + OH : 	J(15) 	;
+{16285.} 	 C629OOH = HO1CO3CHO + CH3CO3 + OH : 	J(22) 	;
+{16286.} 	 C629O = HO1CO34C5 + CO + HO2 : 	KDEC*0.5 	;
+{16287.} 	 C629O = HO1CO3CHO + CH3CO3 : 	KDEC*0.5 	;
+{16288.} 	 C629OH + OH = C629O : 	2.97D-11 	;
+{16289.} 	 C629OH = HO1CO34C5 + CO + HO2 + HO2 : 	J(15) 	;
+{16290.} 	 C629OH = HO1CO3CHO + CH3CO3 + HO2 : 	J(22) 	;
+{16291.} 	 C625O2 + HO2 = C625OOH : 	KRO2HO2*0.770 	;
+{16292.} 	 C625O2 + NO = C625O + NO2 : 	KRO2NO 	;
+{16293.} 	 C625O2 + NO3 = C625O + NO2 : 	KRO2NO3 	;
+{16294.} 	 C625O2 = C625O : 	9.20D-14*RO2*0.7 	;
+{16295.} 	 C625O2 = C625OH : 	9.20D-14*RO2*0.3 	;
+{16296.} 	 C734OOH + OH = C734CO + OH : 	4.16D-11 	;
+{16297.} 	 C734OOH = C734O + OH : 	J(41) 	;
+{16298.} 	 C734O = C517CHO + HO2 : 	KDEC 	;
+{16299.} 	 C734CO + OH = C517CO3 : 	2.43D-11 	;
+{16300.} 	 C734CO = C517CO3 + HO2 : 	J(22) 	;
+{16301.} 	 C734OH + OH = C734CO + HO2 : 	2.95D-11 	;
+{16302.} 	 C1213CO + OH = C829O2 + CHOC2CO2H : 	7.96D-12 	;
+{16303.} 	 C1213O2 + HO2 = C1213OOH : 	KRO2HO2*0.947 	;
+{16304.} 	 C1213O2 + NO = C1213NO3 : 	KRO2NO*0.240 	;
+{16305.} 	 C1213O2 + NO = C1213O + NO2 : 	KRO2NO*0.760 	;
+{16306.} 	 C1213O2 + NO3 = C1213O + NO2 : 	KRO2NO3 	;
+{16307.} 	 C1213O2 = C1213CO : 	2.50D-13*RO2*0.2 	;
+{16308.} 	 C1213O2 = C1213O : 	2.50D-13*RO2*0.6 	;
+{16309.} 	 C1213O2 = C1213OH : 	2.50D-13*RO2*0.2 	;
+{16310.} 	 C521OOH + OH = C513CO + OH : 	1.45D-11 	;
+{16311.} 	 C521OOH = C521O + OH : 	J(41)+J(35) 	;
+{16312.} 	 C521O = HOC2H4CO3 + CO : 	KDEC 	;
+{16313.} 	 C521OH + OH = C513CO + HO2 : 	7.61D-12 	;
+{16314.} 	 C521OH = HOCH2CO3 + HOC2H4CO3 : 	J(35) 	;
+{16315.} 	 C135OOH + OH = C135O2 : 	3.09D-11 	;
+{16316.} 	 C135OOH = C135O + OH : 	J(41)+J(35) 	;
+{16317.} 	 C135O = HOCH2CHO + CO + CO + C827CO3 : 	KDEC 	;
+{16318.} 	 COO2C4CO3H + OH = COO2C4CO3 : 	7.18D-12 	;
+{16319.} 	 COO2C4CO3H = COO2C4O2 + OH : 	J(41) 	;
+{16320.} 	 COO2C4PAN + OH = COO2C3CHO + CO + NO2 : 	3.58D-12 	;
+{16321.} 	 COO2C4PAN = COO2C4CO3 + NO2 : 	KBPAN 	;
+{16322.} 	 COO2C4OOH + OH = COO2C3CHO + OH : 	1.05D-11 	;
+{16323.} 	 COO2C4OOH + OH = COO2C4O2 : 	1.90D-12*EXP(190/TEMP) 	;
+{16324.} 	 COO2C4OOH = COO2C4O + OH : 	J(41) 	;
+{16325.} 	 COO2C4O = COO2C3CHO + HO2 : 	KROPRIM*O2 	;
+{16326.} 	 C929OOH + OH = C929CO + OH : 	2.65D-11 	;
+{16327.} 	 C929OOH = C929O + OH : 	J(41) 	;
+{16328.} 	 C929O = CO2C3CHO + HM22CO3 : 	KDEC 	;
+{16329.} 	 C929CO + OH = C828CHO + HO2 : 	1.48D-11 	;
+{16330.} 	 C929CO = CO2C3CO3 + HM22CO3 : 	J(35) 	;
+{16331.} 	 C929OH + OH = C929CO + HO2 : 	1.43D-11 	;
+{16332.} 	 C44OOH + OH = C44O2 : 	7.46D-11 	;
+{16333.} 	 C44OOH = C44O + OH : 	J(41) 	;
+{16334.} 	 C44O = HCOCH2CHO + HO2 : 	KDEC 	;
+{16335.} 	 HC23C4CO3H + OH = H1C23C4CO3 : 	6.55D-12 	;
+{16336.} 	 HC23C4CO3H = H1C23C4O2 + OH : 	J(41)+J(35) 	;
+{16337.} 	 H1C23C4PAN + OH = H1CO23CHO + CO + NO2 : 	2.92D-12 	;
+{16338.} 	 H1C23C4PAN = H1C23C4CO3 + NO2 : 	KBPAN 	;
+{16339.} 	 H1C23C4OOH + OH = H1C23C4O2 : 	9.61D-12 	;
+{16340.} 	 H1C23C4OOH = H1C23C4O + OH : 	J(41)+J(35) 	;
+{16341.} 	 H1C23C4O = HCHO + CO + HOCH2CO3 : 	KDEC 	;
+{16342.} 	 CO1M22CHO + NO3 = CO1M22CO3 + HNO3 : 	2*KNO3AL*8.5 	;
+{16343.} 	 CO1M22CHO + OH = CO1M22CO3 : 	1.32D-10 	;
+{16344.} 	 CO1M22CHO = IBUTALCO2 + CO + HO2 : 	J(15)*2 	;
+{16345.} 	 CO1M22CO2H + OH = IBUTALCO2 : 	6.67D-11 	;
+{16346.} 	 CO1M22CO2H = IBUTALCO2 + HO2 : 	J(15) 	;
+{16347.} 	 CO1M22CO3H + OH = CO1M22CO3 : 	6.98D-11 	;
+{16348.} 	 CO1M22CO3H = IBUTALCO2 + OH : 	J(41)+J(15) 	;
+{16349.} 	 CO1M22PAN + OH = CH3COCH3 + CO + NO2 : 	2.11D-11 	;
+{16350.} 	 CO1M22PAN = CO1M22CO3 + NO2 : 	KBPAN 	;
+{16351.} 	 C519OOH + OH = HO1CO34C5 + OH : 	2.74D-11 	;
+{16352.} 	 C519OOH = C519O + OH : 	J(41) 	;
+{16353.} 	 C519OOH = CH3CO3 + HOC2H4CHO + OH : 	J(22) 	;
+{16354.} 	 C519O = CH3CO3 + HOC2H4CHO : 	KDEC 	;
+{16355.} 	 C625OOH + OH = C625O2 : 	3.04D-11 	;
+{16356.} 	 C625OOH = C625O + OH : 	J(41) 	;
+{16357.} 	 C625OOH = HOC2H4CO3 + ACETOL + OH : 	J(22) 	;
+{16358.} 	 C625O = ACETOL + HOC2H4CO3 : 	KDEC 	;
+{16359.} 	 C625OH + OH = HOC2H4CO3 + ACETOL : 	2.70D-11 	;
+{16360.} 	 C625OH = HOC2H4CO3 + ACETOL + HO2 : 	J(22) 	;
+{16361.} 	 C1213OOH + OH = C1213CO + OH : 	3.68D-11 	;
+{16362.} 	 C1213OOH = C1213O + OH : 	J(41) 	;
+{16363.} 	 C1213NO3 + OH = C1213CO + NO2 : 	7.81D-12 	;
+{16364.} 	 C1213NO3 = C1213O + NO2 : 	J(55) 	;
+{16365.} 	 C1213O = C829O2 + CHOC2CO2H : 	KDEC 	;
+{16366.} 	 C1213OH + OH = C1213CO + HO2 : 	1.90D-11 	;
+{16367.} 	 COO2C3CHO + OH = COO2C3CO3 : 	2.13D-11 	;
+{16368.} 	 COO2C3CHO = MOCOCH2O2 + HO2 + CO : 	J(15) 	;
+{16369.} 	 C828CHO + NO3 = C828CO3 + HNO3 : 	KNO3AL*8.5 	;
+{16370.} 	 C828CHO + OH = C828CO3 : 	2.27D-11 	;
+{16371.} 	 C828CHO = C828O2 + CO + HO2 : 	J(15) 	;
+{16372.} 	 COO2C3CO3 + HO2 = COO2C3CO3H : 	KAPHO2*0.56 	;
+{16373.} 	 COO2C3CO3 + HO2 = MOCOCH2O2 + OH : 	KAPHO2*0.44 	;
+{16374.} 	 COO2C3CO3 + NO = MOCOCH2O2 + NO2 : 	KAPNO 	;
+{16375.} 	 COO2C3CO3 + NO2 = COO2C3PAN : 	KFPAN 	;
+{16376.} 	 COO2C3CO3 + NO3 = MOCOCH2O2 + NO2 : 	KRO2NO3*1.74 	;
+{16377.} 	 COO2C3CO3 = MOCOCH2O2 : 	1.00D-11*RO2 	;
+{16378.} 	 C828CO3 + HO2 = C828CO3H : 	KAPHO2*0.56 	;
+{16379.} 	 C828CO3 + HO2 = C828O2 + OH : 	KAPHO2*0.44 	;
+{16380.} 	 C828CO3 + NO = C828O2 + NO2 : 	KAPNO 	;
+{16381.} 	 C828CO3 + NO2 = C828PAN : 	KFPAN 	;
+{16382.} 	 C828CO3 + NO3 = C828O2 + NO2 : 	KRO2NO3*1.74 	;
+{16383.} 	 C828CO3 = C828O2 : 	1.00D-11*RO2 	;
+{16384.} 	 C828O2 + HO2 = C828OOH : 	KRO2HO2*0.859 	;
+{16385.} 	 C828O2 + NO = C828O + NO2 : 	KRO2NO 	;
+{16386.} 	 C828O2 + NO3 = C828O + NO2 : 	KRO2NO3 	;
+{16387.} 	 C828O2 = C828O : 	6.70D-15*RO2 	;
+{16388.} 	 COO2C3CO3H + OH = COO2C3CO3 : 	4.14D-12 	;
+{16389.} 	 COO2C3CO3H = MOCOCH2O2 + OH : 	J(41) 	;
+{16390.} 	 COO2C3PAN + OH = MOXYCOCHO + CO + NO2 : 	5.40D-13 	;
+{16391.} 	 COO2C3PAN = COO2C3CO3 + NO2 : 	KBPAN 	;
+{16392.} 	 C828CO3H + OH = C828CO3 : 	8.26D-12 	;
+{16393.} 	 C828CO3H = C828O2 + OH : 	J(41) 	;
+{16394.} 	 C828PAN + OH = CO24C4CHO + CH3COCH3 + NO2 : 	4.66D-12 	;
+{16395.} 	 C828PAN = C828CO3 + NO2 : 	KBPAN 	;
+{16396.} 	 C828OOH + OH = C828O2 : 	8.26D-12 	;
+{16397.} 	 C828OOH = C828O + OH : 	J(41) 	;
+{16398.} 	 C828O = CO2C3CO3 + CO + CH3COCH3 : 	KDEC 	;
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm_constants.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm_constants.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm_constants.f90	(revision 3477)
@@ -0,0 +1,350 @@
+MODULE constants
+
+  USE model_Precision, ONLY: dp
+  IMPLICIT NONE
+  PRIVATE dp
+
+  INTEGER, PARAMETER :: mnsp=250, mre=2000
+  INTEGER i
+  ! variables for zenith routine which calculates zenith angle
+  REAL(dp) theta, secx, cosx
+  ! generic reaction rate variables
+  REAL(dp) kro2no, kro2ho2, kapho2, kapno, kro2no3, kno3al, kdec, &
+    krosec, kalkoxy, kalkpxy, kroprim
+  ! variables for calculation of kfpan and kbpan
+  REAL(dp) kfpan, kbpan
+  REAL(dp) kc0, kci, krc, fcc, nc, fc
+  REAL(dp) kd0, kdi, krd, fcd, ncd, fd
+  ! variables for calculation of kmt01
+  REAL(dp) kmt01
+  REAL(dp) k10, k1i, kr1, fc1, nc1, f1
+  ! variables for calculation of kmt02
+  REAL(dp) kmt02
+  REAL(dp) k20, k2i, kr2, fc2, nc2, f2
+  ! variables for calculation of kmt03
+  REAL(dp) kmt03
+  REAL(dp) k30, k3i, kr3, fc3, nc3, f3
+  ! variables for calculation of kmt04
+  REAL(dp) kmt04
+  REAL(dp) k40, k4i, kr4, fc4, nc4, f4
+  ! variables for calculation of kmt05
+  REAL(dp) kmt05
+  ! variables for calculation of kmt06
+  REAL(dp) kmt06
+  ! variables for calculation of kmt07
+  REAL(dp) kmt07
+  REAL(dp) k70, k7i, kr7, fc7, nc7, f7
+  ! variables for calculation of kmt08
+  REAL(dp) kmt08
+  REAL(dp) k80, k8i, kr8, fc8, nc8, f8
+  ! variables for calculation of kmt09
+  REAL(dp) kmt09
+  REAL(dp) k90, k9i, kr9, fc9, nc9, f9
+  ! variables for calculation of kmt10
+  REAL(dp) kmt10
+  REAL(dp) k100, k10i, kr10, fc10, nc10, f10
+  ! variables for calculation of kmt11
+  REAL(dp) kmt11
+  REAL(dp) k1,k2,k3,k4
+  ! variables for calculation of kmt12
+  REAL(dp) kmt12
+  REAL(dp) k0, ki, x, ssign,f
+  REAL(dp) k120, k12i, kr12, fc12, nc12, f12
+  ! variables for calculation of kmt13
+  REAL(dp) kmt13
+  REAL(dp) k130, k13i, kr13, nc13, fc13, f13
+  ! variables for calculation of kmt14
+  REAL(dp) kmt14
+  REAL(dp) k140, k14i, kr14, nc14, fc14, f14
+  ! variables for calculation of kmt15
+  REAL(dp) kmt15
+  REAL(dp) k150, k15i, kr15, fc15, nc15, f15
+  ! variables for calculation of kmt16
+  REAL(dp) kmt16
+  REAL(dp) k160, k16i, kr16, nc16, fc16, f16
+  ! variables for calculation of kmt17
+  REAL(dp) kmt17
+  REAL(dp) k170, k17i, kr17, fc17, nc17, f17
+  ! variables for calculation of kmt17
+  REAL(dp) kmt18
+
+  REAL(dp) kch3o2, k298ch3o2
+  
+  REAL(dp) kp_rooh, kp_ho2, kp_n2o5, kp_no3, kp_all
+  
+  INTEGER k
+
+CONTAINS
+
+  !***************************************************************************
+
+  SUBROUTINE mcm_constants(time, temp, M, N2, O2, RO2, H2O)
+    ! calculates rate constants from arrhenius informtion
+    USE model_Global,  ONLY:LAT, LON, JDAY, SZAS, SVJ_TJ, bs,cs,ds, jfactno2, jfacto1d, &
+         DEP_ROOH, DEP_HO2, DEP_N2O5, DEP_NO3, DEP_ALL
+    REAL(dp) time, temp, M, N2, O2, RO2, H2O, THETA, TIME2, LAT2
+    REAL*8 y,dy,x,tmp(19), tmp2(19),b(19),c(19),d(19)
+    integer i,n,jl
+    INTEGER LK
+
+ 
+    ! ************************************************************************
+    ! define generic reaction rates.
+    ! ************************************************************************
+
+    ! constants used in calculation of reaction rates
+    !M  = 2.55E+19
+    N2 = 0.79*M
+    O2 = 0.2095*M
+
+    kp_rooh = DEP_ROOH
+    kp_ho2  = DEP_HO2
+    kp_n2o5 = DEP_N2O5
+    kp_no3  = DEP_NO3
+    kp_all  = DEP_ALL
+
+
+    ! kro2no : ro2      + no      = ro      + no2
+    !        : ro2      + no      = rono2
+    ! mcm v3.2
+    !kro2no    = 2.7d-12*EXP(360.0/temp)
+
+    ! kro2ho2: ro2      + ho2     = rooh    + o2
+    ! mcm protocol v3.2
+    !kro2ho2   = 2.91d-13*EXP(1300.0/temp)
+
+    ! kapho2 : rcoo2    + ho2     = products
+    ! mcm protocol v3.2
+    !kapho2    = 5.20d-13*EXP(980.0/temp)
+
+    ! kapno  : rcoo2    + no      = products
+    ! mcm v3.2
+    !kapno = 7.50d-12*EXP(290.0/temp)
+
+    ! kro2no3: ro2      + no3     = products
+    ! mcm protocol v3.2
+    !kro2no3   = 2.30d-12
+
+    ! kno3al : no3      + rcho    = rcoo2   + hno3
+    ! mcm protocol v3.2
+    !kno3al    = 1.4d-12*EXP(-1860.0/temp)
+
+    ! kdec   : ro                 = products
+    ! mcm protocol v3.2
+    !kdec      = 1.00d+06
+    
+    kalkoxy=6.00d-14*EXP(-550.0/temp)*o2
+    kalkpxy=1.50d-14*EXP(-200.0/temp)*o2
+
+    !kch3o2 = 1.03d-13*EXP(365.0/TEMP)
+    !k298ch3o2 = 3.5d-13
+
+    ! -------------------------------------------------------------------
+    ! complex reactions
+    ! -------------------------------------------------------------------
+
+    ! kfpan kbpan
+    ! formation and decomposition of pan
+    ! iupac 2001 (mcmv3.2)
+    kc0     = 2.70d-28*m*(temp/300.0)**(-7.1)
+    kci     = 1.21d-11*(temp/300.0)**(-0.9)
+    krc     = kc0/kci
+    fcc     = 0.30
+    nc      = 0.75-(1.27*dlog10(fcc))
+    fc      = 10**(dlog10(fcc)/(1+((dlog10(krc))/nc)**2))
+    kfpan   = (kc0*kci)*fc/(kc0+kci)
+
+    kd0     = 4.90d-03*m*EXP(-12100.0/temp)
+    kdi     = 5.40d+16*EXP(-13830.0/temp)
+    krd     = kd0/kdi
+    fcd     = 0.30
+    ncd     = 0.75-(1.27*dlog10(fcd))
+    fd      = 10**(dlog10(fcd)/(1+((dlog10(krd))/ncd)**2))
+    kbpan   = (kd0*kdi)*fd/(kd0+kdi)
+
+    ! kmt01  : o        + no      = no2
+    ! iupac 2001 (mcmv3.2)
+    k10     = 1.00d-31*m*(temp/300.0)**(-1.6)
+
+    k1i     = 3.00d-11*(temp/300.0)**(0.3)
+    kr1     = k10/k1i
+    fc1     = 0.85
+    nc1     = 0.75-(1.27*dlog10(fc1))
+    f1      = 10**(dlog10(fc1)/(1+((dlog10(kr1)/nc1))**2))
+    kmt01   = (k10*k1i)*f1/(k10+k1i)
+
+    ! kmt02  : o        + no2     = no3
+    ! iupac 2001 (mcmv3.2)
+    k20     = 1.30d-31*m*(temp/300.0)**(-1.5)
+    k2i     = 2.30d-11*(temp/300.0)**(0.24)
+    kr2     = k20/k2i
+    fc2     = 0.6
+    nc2     = 0.75-(1.27*dlog10(fc2))
+    f2      = 10**(dlog10(fc2)/(1+((dlog10(kr2)/nc2))**2))
+    kmt02   = (k20*k2i)*f2/(k20+k2i)
+
+    ! kmt03  : no2      + no3     = n2o5
+    ! iupac 2006, mcmv3.2
+    k30     = 3.60d-30*m*(temp/300.0)**(-4.1)
+    k3i     = 1.90d-12*(temp/300.0)**(0.2)
+    kr3     = k30/k3i
+    fc3     = 0.35
+    nc3     = 0.75-(1.27*dlog10(fc3))
+    f3      = 10**(dlog10(fc3)/(1+((dlog10(kr3)/nc3))**2))
+    kmt03   = (k30*k3i)*f3/(k30+k3i)
+
+    ! kmt04  : n2o5               = no2     + no3
+    ! iupac 2006, mcmv3.2
+    k40     = 1.30d-03*m*(temp/300.0)**(-3.5)*EXP(-11000.0/temp)
+    k4i     = 9.70d+14*(temp/300.0)**(0.1)*EXP(-11080.0/temp)
+    kr4     = k40/k4i
+    fc4     = 0.35
+    nc4     = 0.75-(1.27*dlog10(fc4))
+    f4      = 10**(dlog10(fc4)/(1+((dlog10(kr4)/nc4))**2))
+    kmt04   = (k40*k4i)*f4/(k40+k4i)
+
+    ! kmt05  : oh       + co(+o2) = ho2     + co2
+    ! iupac 2006
+    kmt05  = (1 + (m/4.2d19))
+
+    ! kmt06  : ho2      + ho2     = h2o2    + o2
+    ! water enhancement factor
+    ! iupac 1992
+
+    kmt06  = 1 + (1.40d-21*EXP(2200.0/temp)*h2o)
+
+    ! kmt06  = 1 + (2.00d-25*EXP(4670.0/temp)*h2o)
+    ! S+R 2005 values
+
+    ! kmt07  : oh       + no      = hono
+
+    ! iupac 2006, mcmv3.2
+    k70     = 7.40d-31*m*(temp/300.0)**(-2.4)
+    k7i     = 3.30d-11*(temp/300.0)**(-0.3)
+    kr7     = k70/k7i
+    fc7     = EXP(-temp/1420.0)
+    nc7     = 0.75-(1.27*dlog10(fc7))
+    f7      = 10**(dlog10(fc7)/(1+((dlog10(kr7)/nc7))**2))
+    kmt07   = (k70*k7i)*f7/(k70+k7i)
+
+    ! kmt08  : oh       + no2     = hno3
+
+    ! iupac 2006, mcmv3.2
+    k80     = 3.30d-30*m*(temp/300.0)**(-3.0)
+    k8i     = 4.10d-11
+    kr8     = k80/k8i
+    fc8     = 0.4
+    nc8     = 0.75-(1.27*dlog10(fc8))
+    f8      = 10**(dlog10(fc8)/(1+((dlog10(kr8)/nc8))**2))
+    kmt08   = (k80*k8i)*f8/(k80+k8i)
+
+    ! kmt09  : ho2      + no2     = ho2no2
+    ! iupac 1997, mcmv3.2
+
+    k90     = 1.80d-31*m*(temp/300.0)**(-3.2)
+    k9i     = 4.70d-12
+    kr9     = k90/k9i
+    fc9     = 0.6
+    nc9     = 0.75-(1.27*dlog10(fc9))
+    f9      = 10**(dlog10(fc9)/(1+((dlog10(kr9)/nc9))**2))
+    kmt09   = (k90*k9i)*f9/(k90+k9i)
+
+    ! kmt10  : ho2no2             = ho2     + no2
+    ! iupac 1997, mcmv3.2
+
+    k100     = 4.10d-05*m*EXP(-10650.0/temp)
+    k10i     = 4.80d+15*EXP(-11170.0/temp)
+    kr10     = k100/k10i
+    fc10     = 0.6
+    nc10     = 0.75-(1.27*dlog10(fc10))
+    f10      = 10**(dlog10(fc10)/(1+((dlog10(kr10)/nc10))**2))
+    kmt10    = (k100*k10i)*f10/(k100+k10i)
+
+    ! kmt11  : oh       + hno3    = h2o     + no3
+    ! iupac 2006, mcmv3.2
+
+    k1     = 2.40d-14*EXP(460.0/temp)
+    k3     = 6.50d-34*EXP(1335.0/temp)
+    k4     = 2.70d-17*EXP(2199.0/temp)
+    k2     = (k3*m)/(1+(k3*m/k4))
+    kmt11  = k1 + k2
+
+    ! kmt12 iupac 2006, mcmv3.2
+
+    k120 = 4.50d-31*((temp/300.0)**(-3.9))*m
+    k12i = 1.30d-12*((temp/300.0)**(-0.7))
+    kr12 = k120/k12i
+    fc12 = 0.525
+    nc12 = 0.75-(1.27*dlog10(fc12))
+    f12  = 10**(dlog10(fc12)/(1.+((dlog10(kr12)/nc12))**2))
+    kmt12    = (k120*k12i)*f12/(k120+k12i)
+
+    ! kmt13  : ch3o2    + no2     = ch3o2no2
+    ! iupac 2006
+
+    k130     = 2.50d-30*((temp/300.0)**(-5.5))*m
+    k13i     = 1.80d-11
+    kr13     = k130/k13i
+    fc13     = 0.36
+    nc13     = 0.75-(1.27*dlog10(fc13))
+    f13      = 10**(dlog10(fc13)/(1+((dlog10(kr13)/nc13))**2))
+    kmt13    = (k130*k13i)*f13/(k130+k13i)
+
+    ! kmt14  : ch3o2no2           = ch3o2   + no2
+    ! iupac 2006, mcmv3.2
+
+    k140     = 9.00d-05*EXP(-9690.0/temp)*m
+    k14i     = 1.10d+16*EXP(-10560.0/temp)
+    kr14     = k140/k14i
+    fc14     = 0.4
+    nc14     = 0.75-(1.27*dlog10(fc14))
+    f14      = 10**(dlog10(fc14)/(1+((dlog10(kr14)/nc14))**2))
+    kmt14    = (k140*k14i)*f14/(k140+k14i)
+
+    ! kmt15 iupac 2006, mcmv3.2
+
+    k150 = 8.60d-29*((temp/300.0)**(-3.1))*m
+    k15i = 9.00d-12*((temp/300.0)**(-0.85))
+    kr15 = k150/k15i
+    fc15 = 0.48
+    nc15 = 0.75-(1.27*dlog10(fc15))
+    f15  = 10**(dlog10(fc15)/(1+((dlog10(kr15)/nc15))**2))
+    kmt15 = (k150*k15i)*f15/(k150+k15i)
+
+    ! kmt16  :  oh  +  c3h6
+    ! iupac 2006
+
+    k160     = 8.00d-27*((temp/300.0)**(-3.5))*m
+    k16i     = 3.00d-11*((temp/300.0)**(-1.0))
+    kr16     = k160/k16i
+    fc16     = 0.5
+    nc16     = 0.75-(1.27*dlog10(fc16))
+    f16      = 10**(dlog10(fc16)/(1+((dlog10(kr16)/nc16))**2))
+    kmt16    = (k160*k16i)*f16/(k160+k16i)
+
+    ! kmt17 iupac 2006
+
+    k170 = 5.00d-30*((temp/300.0)**(-1.5))*m
+    k17i = 1.00d-12
+    kr17 = k170/k17i
+    fc17 = (0.17*EXP(-51./temp))+EXP(-temp/204.)
+    nc17 = 0.75-(1.27*dlog10(fc17))
+    f17  = 10**(dlog10(fc17)/(1+((dlog10(kr17)/nc17))**2))
+    kmt17 = (k170*k17i)*f17/(k170+k17i)
+
+    ! kmt18 2011 oh + dms
+
+    !kmt18=(9.5d-39*O2*EXP(5270./TEMP))/(1+7.5d-29*O2*exp(5610./TEMP))
+
+    !       mcm v3.2
+
+    !kroprim  = 2.50d-14*EXP(-300.0/temp)
+    !krosec   = 2.50d-14*EXP(-300.0/temp)
+
+  
+  END SUBROUTINE mcm_constants
+
+  !***************************************************************************
+
+      
+END MODULE constants
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm_init_cons.dat
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm_init_cons.dat	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/MCM/mcm_init_cons.dat	(revision 3477)
@@ -0,0 +1,542 @@
+-1
+           JDAY!            LAT!            LON!          PRESS!           TEMP!             O3!             CO!            H2O!             NO!           JO1D!           JNO2!            NO2!           HCHO!           C2H6!           C3H8!         IC4H10!         NC4H10!           C2H4!           C3H6!           C5H8!          CH3OH!         C2H5OH!       CH3COCH3!            MEK!            MVK!           MACR!            PAN!           C2H2!        APINENE!        BPINENE!       LIMONENE!         IC5H12!         NC5H12!          M22C4!           CHEX!          M23C4!           M2PE!           M3PE!         NC6H14!         NC8H18!       TBUT2ENE!        BUT1ENE!      MEPROPENE!       CBUT2ENE!           C4H6!        BENZENE!        TOLUENE!          EBENZ!           MXYL!           PXYL!           OXYL!            NOx!
+              0!              0!              0!              0!              0!              1!              1!              1!              1!              1!              1!              0!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!              1!
+ 2.18571500e+02! 1.56390000e+01! 4.50670000e+00! 4.65180000e+02! 2.63470000e+02! 6.48590000e-08! 8.12880000e-08! 1.71500000e-03! 5.18490000e-11! 8.49870000e-05! 1.17920000e-02! 0.00000000e+00! 2.59409993e-10! 5.78250003e-10! 2.66100007e-11! 2.04999993e-12! 3.34999996e-12! 2.17099984e-11! 1.34700003e-11! 7.59999980e-11! 7.36259997e-10! 0.00000000e+00! 8.05249978e-10! 4.34989988e-10! 2.94974982e-11! 1.32524998e-11! 1.37999986e-10! 7.59499963e-11! 1.64508233e-11! 1.02065622e-11! 2.20254179e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.62999994e-12! 3.90000011e-12! 3.97000011e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.76000054e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18572200e+02! 1.56920000e+01! 4.56430000e+00! 4.65190000e+02! 2.63610000e+02! 7.47060000e-08! 7.68000000e-08! 9.17480000e-04! 2.56790000e-11! 8.40390000e-05! 1.17980000e-02! 0.00000000e+00! 2.10109999e-10! 5.43575684e-10! 2.98058141e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.83480017e-11! 0.00000000e+00! 0.00000000e+00! 6.70200007e-10! 0.00000000e+00! 1.28546991e-11! 5.77529951e-12! 0.00000000e+00! 0.00000000e+00! 1.65206321e-11! 1.02335102e-11! 2.20688780e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18572900e+02! 1.57460000e+01! 4.62290000e+00! 4.65200000e+02! 2.63490000e+02! 7.67710000e-08! 7.21770000e-08! 7.55530000e-04! 6.32130000e-12! 8.32690000e-05! 1.17900000e-02! 6.65490024e-11! 1.77820009e-10! 5.20067878e-10! 2.55773874e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.32919993e-11! 0.00000000e+00! 0.00000000e+00! 7.43559991e-10! 0.00000000e+00! 1.35122694e-11! 6.07072986e-12! 1.29999997e-10! 0.00000000e+00! 1.57756950e-11! 9.94595031e-12! 2.16051031e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.57499994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18573600e+02! 1.58000000e+01! 4.68230000e+00! 4.65270000e+02! 2.63710000e+02! 7.86030000e-08! 7.23600000e-08! 7.06490000e-04! 6.80000000e-12! 8.26770000e-05! 1.17910000e-02! 8.34499969e-11! 1.68109998e-10! 5.20998411e-10! 2.57447674e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20530003e-10! 0.00000000e+00! 0.00000000e+00! 7.08829995e-10! 0.00000000e+00! 2.74088686e-11! 1.23141298e-11! 1.26000002e-10! 0.00000000e+00! 1.77747383e-11! 1.07176178e-11! 2.28496458e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18574300e+02! 1.58560000e+01! 4.74230000e+00! 4.65400000e+02! 2.63550000e+02! 7.90620000e-08! 7.25010000e-08! 9.16960000e-04! 1.38000000e-12! 8.52310000e-05! 1.21830000e-02! 6.75679998e-11! 1.96670000e-10! 5.21715393e-10! 2.58737337e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.03719998e-10! 0.00000000e+00! 0.00000000e+00! 7.68299979e-10! 0.00000000e+00! 8.92583923e-12! 4.01015983e-12! 0.00000000e+00! 0.00000000e+00! 1.72749627e-11! 1.05246957e-11! 2.25385023e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.54259998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18575000e+02! 1.59110000e+01! 4.80290000e+00! 4.65470000e+02! 2.63580000e+02! 7.71510000e-08! 7.73860000e-08! 1.68860000e-03! 1.43000000e-12! 8.32480000e-05! 1.20210000e-02! 1.08989998e-10! 2.36130004e-10! 5.46555468e-10! 3.03417985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.05600001e-10! 0.00000000e+00! 0.00000000e+00! 8.57739990e-10! 0.00000000e+00! 1.68539401e-11! 7.57206017e-12! 2.50999971e-10! 0.00000000e+00! 1.73308555e-11! 1.05462713e-11! 2.25732991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.38510002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18576400e+02! 1.60220000e+01! 4.92380000e+00! 4.65480000e+02! 2.63550000e+02! 6.99150000e-08! 7.72390000e-08! 3.48420000e-03! 1.90020000e-11! 8.55880000e-05! 1.24950000e-02! 1.01040003e-10! 2.15800003e-10! 5.45807954e-10! 3.02073436e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.83330009e-11! 0.00000000e+00! 0.00000000e+00! 8.98000008e-10! 0.00000000e+00! 4.60002316e-13! 2.06667704e-13! 0.00000000e+00! 0.00000000e+00! 1.50336410e-11! 9.65950497e-12! 2.11431237e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18577100e+02! 1.60770000e+01! 4.98390000e+00! 4.65970000e+02! 2.63500000e+02! 6.93960000e-08! 7.71570000e-08! 3.81480000e-03! 2.93170000e-11! 8.20890000e-05! 1.21520000e-02! 3.27769999e-11! 1.77789991e-10! 5.45391010e-10! 3.01323445e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.93999991e-10! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18577800e+02! 1.61250000e+01! 5.04690000e+00! 4.65510000e+02! 2.63640000e+02! 6.82480000e-08! 7.79580000e-08! 4.16610000e-03! 3.15730000e-11! 7.92890000e-05! 1.19160000e-02! 7.61490038e-11! 2.01800007e-10! 5.49464030e-10! 3.08649772e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.14829992e-11! 0.00000000e+00! 0.00000000e+00! 9.08590037e-10! 0.00000000e+00! 1.50371694e-11! 6.75582940e-12! 0.00000000e+00! 0.00000000e+00! 1.60192207e-11! 1.00399558e-11! 2.17567162e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.94480005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18578500e+02! 1.60950000e+01! 5.09800000e+00! 4.65200000e+02! 2.63400000e+02! 6.33670000e-08! 8.05170000e-08! 4.64980000e-03! 3.84970000e-11! 8.72820000e-05! 1.17510000e-02! 4.83869993e-11! 2.17769996e-10! 5.62476510e-10! 3.32055668e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.99790009e-11! 0.00000000e+00! 0.00000000e+00! 9.99110017e-10! 0.00000000e+00! 4.16939365e-11! 1.87320593e-11! 2.37000003e-10! 0.00000000e+00! 1.59745047e-11! 1.00226945e-11! 2.17288756e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18579200e+02! 1.60250000e+01! 5.06380000e+00! 4.65190000e+02! 2.63190000e+02! 6.37190000e-08! 7.98940000e-08! 4.33780000e-03! 3.10550000e-11! 8.40050000e-05! 1.20000000e-02! 4.48139997e-11! 1.87699994e-10! 5.59308599e-10! 3.26357413e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01469999e-10! 0.00000000e+00! 0.00000000e+00! 9.52889989e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.91999980e-10! 0.00000000e+00! 1.72080683e-11! 1.04988726e-11! 2.24968551e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.93620031e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18579900e+02! 1.59640000e+01! 5.00240000e+00! 4.65260000e+02! 2.63060000e+02! 6.49860000e-08! 8.09140000e-08! 4.27220000e-03! 3.91550000e-11! 8.29410000e-05! 1.20210000e-02! 0.00000000e+00! 2.05029993e-10! 5.64495228e-10! 3.35686826e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.40000014e-11! 0.00000000e+00! 0.00000000e+00! 9.72749992e-10! 0.00000000e+00! 1.63874990e-11! 7.36249950e-12! 0.00000000e+00! 0.00000000e+00! 1.66886713e-11! 1.02983759e-11! 2.21734939e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.50000018e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18580600e+02! 1.59040000e+01! 4.93890000e+00! 4.65340000e+02! 2.63010000e+02! 6.43370000e-08! 8.17090000e-08! 4.41410000e-03! 4.71260000e-11! 8.23430000e-05! 1.19860000e-02! 0.00000000e+00! 2.28259994e-10! 5.68537772e-10! 3.42958301e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.68480002e-11! 0.00000000e+00! 0.00000000e+00! 9.99299976e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.16999982e-10! 2.01119460e-12! 1.64760341e-11! 1.02162940e-11! 2.20411120e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18588900e+02! 1.57640000e+01! 4.75830000e+00! 4.65110000e+02! 2.63090000e+02! 6.80920000e-08! 7.66150000e-08! 3.01640000e-03! 2.68940000e-11! 6.96510000e-05! 1.17440000e-02! 0.00000000e+00! 3.28799987e-10! 5.42634937e-10! 2.96366022e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.08479994e-11! 0.00000000e+00! 0.00000000e+00! 8.86780038e-10! 0.00000000e+00! 2.85597882e-11! 1.28312092e-11! 2.86000001e-10! 0.00000000e+00! 1.57030326e-11! 9.91790157e-12! 2.15598650e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18589600e+02! 1.58250000e+01! 4.69450000e+00! 4.65210000e+02! 2.63410000e+02! 7.75700000e-08! 7.09100000e-08! 1.14180000e-03! 1.57610000e-11! 6.94400000e-05! 1.18240000e-02! 3.18740000e-11! 3.12130016e-10! 5.13625198e-10! 2.44185262e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.36039979e-11! 0.00000000e+00! 0.00000000e+00! 7.78669962e-10! 0.00000000e+00! 1.91902796e-11! 8.62171966e-12! 2.86000001e-10! 0.00000000e+00! 1.63795869e-11! 1.01790651e-11! 2.19810697e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18590300e+02! 1.58890000e+01! 4.63730000e+00! 4.65560000e+02! 2.63770000e+02! 7.80180000e-08! 7.18140000e-08! 1.38360000e-03! 2.47000000e-12! 6.63140000e-05! 1.18300000e-02! 9.52720056e-11! 3.49750007e-10! 5.18221965e-10! 2.52453683e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.61489978e-11! 0.00000000e+00! 0.00000000e+00! 8.16640033e-10! 0.00000000e+00! 8.80853984e-12! 3.95745979e-12! 0.00000000e+00! 0.00000000e+00! 1.55633267e-11! 9.86397249e-12! 2.14728912e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18591000e+02! 1.59450000e+01! 4.66660000e+00! 4.65360000e+02! 2.63900000e+02! 7.75390000e-08! 7.27330000e-08! 1.45040000e-03! 6.20000000e-13! 7.04390000e-05! 1.18660000e-02! 1.14830000e-10! 3.36790013e-10! 5.22895061e-10! 2.60859320e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.82919962e-11! 0.00000000e+00! 0.00000000e+00! 7.29059979e-10! 0.00000000e+00! 2.64787497e-11! 1.18962496e-11! 5.89999993e-11! 0.00000000e+00! 1.59243486e-11! 1.00033341e-11! 2.16976506e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.45209999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18591700e+02! 1.59410000e+01! 4.74450000e+00! 4.65360000e+02! 2.63460000e+02! 7.49170000e-08! 7.33770000e-08! 2.00920000e-03! 3.66440000e-12! 7.42090000e-05! 1.18560000e-02! 1.45469997e-10! 3.00920011e-10! 5.26169774e-10! 2.66749661e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.13039991e-11! 0.00000000e+00! 0.00000000e+00! 8.56109961e-10! 0.00000000e+00! 1.35150294e-11! 6.07196975e-12! 3.79999976e-10! 0.00000000e+00! 1.69058240e-11! 1.03822012e-11! 2.23086879e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18592400e+02! 1.59450000e+01! 4.82300000e+00! 4.65490000e+02! 2.63330000e+02! 7.43980000e-08! 7.35570000e-08! 2.32160000e-03! 2.65240000e-12! 7.03550000e-05! 1.16640000e-02! 1.04309998e-10! 2.65920008e-10! 5.27085098e-10! 2.68396035e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.29999986e-11! 0.00000000e+00! 0.00000000e+00! 8.80000017e-10! 0.00000000e+00! 2.27699994e-11! 1.02300000e-11! 0.00000000e+00! 0.00000000e+00! 1.51723963e-11! 9.71306629e-12! 2.12295077e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18593100e+02! 1.59890000e+01! 4.89060000e+00! 4.65330000e+02! 2.63370000e+02! 7.18900000e-08! 7.44840000e-08! 2.89290000e-03! 8.69070000e-12! 6.80030000e-05! 1.17780000e-02! 1.09980004e-10! 2.22690005e-10! 5.31798883e-10! 2.76874842e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.09999975e-11! 0.00000000e+00! 0.00000000e+00! 7.10999981e-10! 0.00000000e+00! 1.72500000e-11! 7.74999943e-12! 1.72999989e-10! 0.00000000e+00! 1.63021697e-11! 1.01491792e-11! 2.19328705e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18593800e+02! 1.60460000e+01! 4.94980000e+00! 4.65350000e+02! 2.63430000e+02! 6.72010000e-08! 7.59220000e-08! 3.83100000e-03! 2.99740000e-11! 6.71140000e-05! 1.18340000e-02! 0.00000000e+00! 1.95179997e-10! 5.39111089e-10! 2.90027499e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.28119987e-11! 0.00000000e+00! 0.00000000e+00! 8.43400016e-10! 0.00000000e+00! 8.05022986e-13! 3.61676997e-13! 3.56999985e-10! 0.00000000e+00! 1.60587325e-11! 1.00552084e-11! 2.17813146e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.62500003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18595100e+02! 1.61580000e+01! 5.07200000e+00! 4.65430000e+02! 2.63550000e+02! 6.00010000e-08! 7.98480000e-08! 4.83350000e-03! 6.56190000e-11! 6.59150000e-05! 1.18100000e-02! 0.00000000e+00! 1.97920000e-10! 5.59074620e-10! 3.25936673e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.60429984e-11! 0.00000000e+00! 0.00000000e+00! 8.86169971e-10! 0.00000000e+00! 1.01298895e-12! 4.55110992e-13! 2.84999996e-10! 0.00000000e+00! 1.52628674e-11! 9.74798974e-12! 2.12858325e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02550000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18595800e+02! 1.62140000e+01! 5.13320000e+00! 4.65440000e+02! 2.63610000e+02! 6.06640000e-08! 7.98160000e-08! 4.86140000e-03! 6.95860000e-11! 6.60800000e-05! 1.19090000e-02! 0.00000000e+00! 2.41440007e-10! 5.78949999e-10! 2.17199991e-11! 0.00000000e+00! 2.51000002e-12! 5.11999991e-12! 2.99999999e-12! 4.01279981e-11! 8.78989992e-10! 0.00000000e+00! 9.93469973e-10! 1.67690001e-10! 0.00000000e+00! 0.00000000e+00! 3.54999974e-10! 7.95899943e-11! 1.53843171e-11! 9.79487151e-12! 2.13614439e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.90999993e-12! 0.00000000e+00! 2.69999995e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.50000020e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18596500e+02! 1.62700000e+01! 5.19430000e+00! 4.65350000e+02! 2.63840000e+02! 6.14600000e-08! 7.86060000e-08! 4.44900000e-03! 4.45970000e-11! 6.70870000e-05! 1.21240000e-02! 0.00000000e+00! 2.72749989e-10! 5.52759116e-10! 3.14576733e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.65000024e-11! 0.00000000e+00! 0.00000000e+00! 9.45750034e-10! 0.00000000e+00! 2.06999990e-11! 9.30000001e-12! 0.00000000e+00! 0.00000000e+00! 1.70603063e-11! 1.04418340e-11! 2.24048627e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18597200e+02! 1.63250000e+01! 5.25470000e+00! 4.65320000e+02! 2.63720000e+02! 6.21530000e-08! 7.86260000e-08! 4.45060000e-03! 4.45350000e-11! 6.67840000e-05! 1.21890000e-02! 0.00000000e+00! 2.57160016e-10! 5.52860813e-10! 3.14759642e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.98040004e-11! 0.00000000e+00! 0.00000000e+00! 9.43090050e-10! 0.00000000e+00! 1.45500300e-12! 6.53696986e-13! 3.43999995e-10! 0.00000000e+00! 1.53746842e-11! 9.79115313e-12! 2.13554469e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.54349992e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18597900e+02! 1.63790000e+01! 5.31430000e+00! 4.65440000e+02! 2.63820000e+02! 6.34650000e-08! 7.79710000e-08! 4.14350000e-03! 3.94280000e-11! 6.56300000e-05! 1.21140000e-02! 0.00000000e+00! 2.09559994e-10! 5.49530144e-10! 3.08768705e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.51060006e-11! 0.00000000e+00! 0.00000000e+00! 9.50299950e-10! 0.00000000e+00! 1.79255100e-11! 8.05349017e-12! 0.00000000e+00! 0.00000000e+00! 1.49377004e-11! 9.62246862e-12! 2.10833954e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.93829987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18598600e+02! 1.64330000e+01! 5.37360000e+00! 4.65560000e+02! 2.63410000e+02! 6.43200000e-08! 7.95000000e-08! 4.48670000e-03! 4.50740000e-11! 6.46320000e-05! 1.20050000e-02! 0.00000000e+00! 1.71300002e-10! 5.57305091e-10! 3.22753664e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.79380041e-11! 0.00000000e+00! 0.00000000e+00! 9.59729962e-10! 0.00000000e+00! 2.11312500e-12! 9.49375019e-13! 4.11000012e-10! 0.00000000e+00! 1.68057495e-11! 1.03435706e-11! 2.22463836e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18599300e+02! 1.64870000e+01! 5.43260000e+00! 4.65280000e+02! 2.63250000e+02! 6.17310000e-08! 8.09820000e-08! 4.72150000e-03! 3.38190000e-11! 6.38530000e-05! 1.19530000e-02! 2.10549998e-11! 1.93210004e-10! 5.64841007e-10! 3.36308793e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.34469968e-11! 0.00000000e+00! 0.00000000e+00! 9.80829973e-10! 0.00000000e+00! 1.23468588e-11! 5.54713957e-12! 2.64999966e-10! 0.00000000e+00! 1.57803024e-11! 9.94772927e-12! 2.16079724e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.52770002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18624300e+02! 1.67140000e+01! 5.60070000e+00! 9.47800000e+02! 3.04890000e+02! 4.00730000e-08! 8.07110000e-08! 2.16910000e-02! 7.93900000e-11! 1.68380000e-05! 6.05380000e-03! 1.59449995e-10! 4.42129999e-10! 5.63462998e-10! 3.33830116e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.00859998e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.99999997e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18625000e+02! 1.66790000e+01! 5.55000000e+00! 9.46450000e+02! 3.04750000e+02! 4.07550000e-08! 8.05420000e-08! 2.17330000e-02! 7.26460000e-11! 1.68880000e-05! 6.07750000e-03! 1.31000003e-10! 4.72660022e-10! 5.62603630e-10! 3.32284339e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.04719999e-09! 0.00000000e+00! 5.25931772e-12! 2.36288203e-12! 1.99999982e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18625700e+02! 1.66420000e+01! 5.50070000e+00! 9.48000000e+02! 3.04880000e+02! 4.11280000e-08! 8.04960000e-08! 2.15430000e-02! 9.13300000e-11! 1.69920000e-05! 6.11880000e-03! 0.00000000e+00! 4.93259988e-10! 5.62369706e-10! 3.31863599e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09999998e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.99999982e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.59570054e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18627100e+02! 1.65510000e+01! 5.41440000e+00! 9.46470000e+02! 3.04820000e+02! 4.10810000e-08! 8.01790000e-08! 2.11080000e-02! 8.86000000e-11! 1.74970000e-05! 6.31250000e-03! 3.27330003e-11! 4.66179984e-10! 5.60757774e-10! 3.28964148e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.34490041e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.89999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.25319997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18627800e+02! 1.65040000e+01! 5.37210000e+00! 9.46970000e+02! 3.04780000e+02! 4.13270000e-08! 8.05820000e-08! 2.11150000e-02! 9.51070000e-11! 1.76670000e-05! 6.40550000e-03! 2.43519996e-11! 4.65079975e-10! 5.62807023e-10! 3.32650192e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07680009e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.89999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.30000002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18628500e+02! 1.64580000e+01! 5.32750000e+00! 9.47400000e+02! 3.04920000e+02! 4.09410000e-08! 8.05820000e-08! 2.08230000e-02! 8.47950000e-11! 1.70980000e-05! 6.26760000e-03! 6.49720000e-11! 4.62299976e-10! 5.62807023e-10! 3.32650192e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.17609993e-11! 0.00000000e+00! 0.00000000e+00! 1.07159992e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20000000e-11! 0.00000000e+00! 1.45409414e-11! 9.46931335e-12! 2.08363830e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.79780000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18629200e+02! 1.64140000e+01! 5.28570000e+00! 9.47180000e+02! 3.04910000e+02! 4.07790000e-08! 8.05590000e-08! 2.10400000e-02! 8.05140000e-11! 1.71250000e-05! 6.36650000e-03! 6.94850011e-11! 4.36329972e-10! 5.62690061e-10! 3.32439840e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07880005e-09! 0.00000000e+00! 4.65749965e-12! 2.09250000e-12! 1.89999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.20000007e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18629900e+02! 1.63680000e+01! 5.24360000e+00! 9.45810000e+02! 3.04980000e+02! 4.06030000e-08! 8.09600000e-08! 2.10910000e-02! 8.46320000e-11! 1.48250000e-05! 5.40990000e-03! 0.00000000e+00! 4.28790004e-10! 5.64729097e-10! 3.36107565e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.02169986e-12! 0.00000000e+00! 0.00000000e+00! 1.02450004e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.42811145e-11! 9.36901598e-12! 2.06746252e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.62830010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18630600e+02! 1.63230000e+01! 5.20190000e+00! 9.45730000e+02! 3.05010000e+02! 3.98140000e-08! 8.08800000e-08! 2.07340000e-02! 7.72470000e-11! 1.50850000e-05! 5.77540000e-03! 0.00000000e+00! 4.21329999e-10! 5.64322311e-10! 3.35375859e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.33330005e-11! 0.00000000e+00! 0.00000000e+00! 1.07819997e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.48849873e-11! 9.60212118e-12! 2.10505762e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.34379998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18631300e+02! 1.62780000e+01! 5.15960000e+00! 9.44520000e+02! 3.04680000e+02! 3.97660000e-08! 8.26230000e-08! 2.24280000e-02! 6.80320000e-11! 1.36330000e-05! 4.73900000e-03! 6.95290006e-11! 4.16670004e-10! 5.73185444e-10! 3.51318211e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06480003e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.39999999e-11! 8.43306848e-12! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.01060002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18632600e+02! 1.61920000e+01! 5.07080000e+00! 9.44710000e+02! 3.03610000e+02! 4.10320000e-08! 8.65900000e-08! 2.44860000e-02! 8.24780000e-11! 1.64260000e-05! 6.31210000e-03! 1.10319996e-10! 4.58799998e-10! 5.93357530e-10! 3.87602381e-11! 1.40695376e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.10640033e-13! 0.00000000e+00! 0.00000000e+00! 1.04819997e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.09999986e-11! 3.63056876e-11! 1.42064581e-11! 9.34019615e-12! 2.06281450e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.41279999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18633300e+02! 1.61500000e+01! 5.02540000e+00! 9.47970000e+02! 3.03670000e+02! 4.09570000e-08! 8.69080000e-08! 2.46440000e-02! 8.35120000e-11! 1.58300000e-05! 6.10990000e-03! 1.34240008e-10! 4.59540017e-10! 5.94974570e-10! 3.90510992e-11! 1.65068176e-12! 0.00000000e+00! 7.00843734e-13! 0.00000000e+00! 2.99999999e-12! 0.00000000e+00! 0.00000000e+00! 1.03450004e-09! 0.00000000e+00! 8.62499959e-13! 3.87499982e-13! 2.09999986e-11! 3.85399941e-11! 1.42804692e-11! 9.36876618e-12! 2.06742228e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.87500006e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18634000e+02! 1.61110000e+01! 4.97940000e+00! 9.46800000e+02! 3.03460000e+02! 4.10470000e-08! 8.68730000e-08! 2.45760000e-02! 7.93000000e-11! 1.56590000e-05! 6.07340000e-03! 1.06040003e-10! 5.10260001e-10! 5.94796545e-10! 3.90190831e-11! 1.62385632e-12! 0.00000000e+00! 5.36063815e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01499997e-09! 0.00000000e+00! 1.55249999e-12! 6.97500000e-13! 2.59999990e-11! 3.82940797e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.30000002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18634700e+02! 1.60720000e+01! 4.93380000e+00! 9.47340000e+02! 3.03380000e+02! 4.09050000e-08! 8.66370000e-08! 2.44420000e-02! 7.89950000e-11! 1.54430000e-05! 6.09850000e-03! 6.30750036e-11! 6.10020034e-10! 5.93596505e-10! 3.88032280e-11! 1.44297649e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.21079995e-11! 0.00000000e+00! 0.00000000e+00! 1.00450004e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.66359131e-11! 1.45512578e-11! 9.47329541e-12! 2.08428084e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.89190024e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18635400e+02! 1.60310000e+01! 4.88930000e+00! 9.45850000e+02! 3.03160000e+02! 4.16030000e-08! 8.73680000e-08! 2.46660000e-02! 9.39430000e-11! 1.53210000e-05! 6.10010000e-03! 7.57379992e-11! 6.03340045e-10! 5.97313643e-10! 3.94718355e-11! 2.00324414e-12! 0.00000000e+00! 2.86652408e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07099996e-09! 0.00000000e+00! 1.22185194e-12! 5.48947986e-13! 2.59999990e-11! 4.17720060e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.32289994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18636100e+02! 1.59890000e+01! 4.84610000e+00! 9.46910000e+02! 3.03010000e+02! 4.20290000e-08! 8.70890000e-08! 2.44620000e-02! 9.54570000e-11! 1.51790000e-05! 6.09260000e-03! 7.99000033e-11! 5.46700019e-10! 5.95894889e-10! 3.92166473e-11! 1.78940738e-12! 0.00000000e+00! 1.55299189e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.52599999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.19999972e-11! 3.98117234e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.73619989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18636800e+02! 1.59460000e+01! 4.80350000e+00! 9.45690000e+02! 3.02980000e+02! 4.19310000e-08! 8.67370000e-08! 2.41530000e-02! 8.50260000e-11! 1.49170000e-05! 6.01600000e-03! 8.42799996e-11! 5.02130004e-10! 5.94105043e-10! 3.88946930e-11! 1.51962058e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.27659992e-12! 0.00000000e+00! 0.00000000e+00! 1.04519993e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.73385281e-11! 1.42589612e-11! 9.36046379e-12! 2.06608324e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.27020008e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18637500e+02! 1.59010000e+01! 4.76310000e+00! 9.46280000e+02! 3.02750000e+02! 4.27830000e-08! 8.66880000e-08! 2.42860000e-02! 1.08560000e-10! 1.46560000e-05! 5.88840000e-03! 3.91799995e-11! 4.89750018e-10! 5.93855853e-10! 3.88498712e-11! 1.48206490e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01719999e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.29999986e-11! 3.69942479e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.64670004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18641700e+02! 1.56960000e+01! 4.72520000e+00! 9.48880000e+02! 3.02790000e+02! 4.20110000e-08! 8.58520000e-08! 2.40990000e-02! 1.35100000e-10! 1.34170000e-05! 5.72660000e-03! 2.82119994e-10! 5.48460000e-10! 5.89604809e-10! 3.80852225e-11! 8.41321099e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02319997e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.90000011e-11! 3.11204118e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18642400e+02! 1.56990000e+01! 4.79480000e+00! 9.47110000e+02! 3.02080000e+02! 4.21910000e-08! 8.71170000e-08! 2.51710000e-02! 1.51540000e-10! 1.35140000e-05! 5.92280000e-03! 3.61439989e-10! 5.67750014e-10! 5.96037275e-10! 3.92422553e-11! 1.81086765e-12! 0.00000000e+00! 1.68481581e-12! 0.00000000e+00! 1.74999999e-12! 0.00000000e+00! 0.00000000e+00! 1.03999998e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.00084549e-11! 1.42433053e-11! 9.35442088e-12! 2.06510867e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.40000007e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18643100e+02! 1.57250000e+01! 4.84780000e+00! 9.49020000e+02! 3.02230000e+02! 4.24830000e-08! 8.77790000e-08! 2.54940000e-02! 1.44510000e-10! 1.28380000e-05! 5.89990000e-03! 3.75450004e-10! 5.63800007e-10! 5.99403582e-10! 3.98477536e-11! 2.31825084e-12! 0.00000000e+00! 4.80151162e-12! 3.08372766e-13! 8.60869969e-12! 0.00000000e+00! 0.00000000e+00! 1.00420006e-09! 0.00000000e+00! 6.54002677e-12! 2.93827289e-12! 5.69999985e-11! 4.46597447e-11! 1.44472203e-11! 9.43313483e-12! 2.07780373e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.03700008e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18643800e+02! 1.57810000e+01! 4.83210000e+00! 9.47720000e+02! 3.02630000e+02! 4.15500000e-08! 8.75010000e-08! 2.44300000e-02! 1.31050000e-10! 1.21780000e-05! 5.78260000e-03! 2.66959982e-10! 5.82379978e-10! 5.77099979e-10! 2.93900008e-11! 3.60999989e-12! 3.90000011e-12! 1.19500000e-11! 2.55772847e-14! 8.56249967e-12! 2.30719999e-09! 0.00000000e+00! 9.76460024e-10! 4.14649981e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.02500011e-11! 1.44458473e-11! 9.43260487e-12! 2.07771821e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.19999972e-12! 0.00000000e+00! 2.36999981e-12! 0.00000000e+00! 0.00000000e+00! 3.27710012e-11! 4.82000030e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18644400e+02! 1.58330000e+01! 4.79870000e+00! 9.48310000e+02! 3.02790000e+02! 4.28360000e-08! 8.70100000e-08! 2.42750000e-02! 1.05530000e-10! 1.18070000e-05! 5.68710000e-03! 2.15880008e-10! 5.79609971e-10! 5.95493210e-10! 3.91443891e-11! 1.72885859e-12! 0.00000000e+00! 1.18105981e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.92040006e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.40000007e-11! 3.92566570e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.19149999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18645100e+02! 1.58860000e+01! 4.76620000e+00! 9.49660000e+02! 3.03010000e+02! 4.23530000e-08! 8.74360000e-08! 2.41940000e-02! 9.87030000e-11! 1.14860000e-05! 5.61100000e-03! 2.96779989e-10! 5.51590051e-10! 5.97659422e-10! 3.95340323e-11! 2.05536196e-12! 0.00000000e+00! 3.18666794e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.65679980e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.59999981e-11! 4.22497870e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.70209992e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18645800e+02! 1.59380000e+01! 4.73100000e+00! 9.51980000e+02! 3.03240000e+02! 4.28280000e-08! 8.76510000e-08! 2.46600000e-02! 9.86510000e-11! 1.15890000e-05! 5.72550000e-03! 1.47570012e-10! 5.09070008e-10! 5.98752659e-10! 3.97306806e-11! 2.22014659e-12! 0.00000000e+00! 4.19888777e-12! 1.78164775e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.00330000e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.37604016e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18646500e+02! 1.59850000e+01! 4.69100000e+00! 9.53570000e+02! 3.03230000e+02! 4.29610000e-08! 8.79800000e-08! 2.49380000e-02! 8.34180000e-11! 1.13920000e-05! 5.63820000e-03! 1.08440000e-10! 5.03339981e-10! 6.00425654e-10! 4.00315996e-11! 2.47230535e-12! 0.00000000e+00! 5.74781975e-12! 5.12840042e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.03519993e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.19999999e-11! 4.60719934e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.99999996e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18656900e+02! 1.58160000e+01! 4.71860000e+00! 9.07610000e+02! 2.98810000e+02! 4.35460000e-08! 8.69090000e-08! 2.41730000e-02! 1.00510000e-10! 1.05540000e-05! 5.60970000e-03! 1.77539997e-10! 0.00000000e+00! 5.60269997e-10! 3.06800002e-11! 2.47000012e-12! 2.04999993e-12! 1.25000002e-11! 2.91000015e-12! 1.90999994e-12! 1.70199999e-09! 0.00000000e+00! 9.94749949e-10! 1.44089990e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.01399988e-11! 1.42480619e-11! 9.35625622e-12! 2.06540462e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.06999998e-12! 0.00000000e+00! 2.61999992e-12! 0.00000000e+00! 0.00000000e+00! 2.60000008e-11! 2.24000007e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18659700e+02! 1.57290000e+01! 4.85990000e+00! 8.74710000e+02! 2.95780000e+02! 4.27690000e-08! 8.70920000e-08! 2.41100000e-02! 1.30440000e-10! 9.77300000e-06! 5.84680000e-03! 2.73880002e-10! 0.00000000e+00! 5.95910155e-10! 3.92193916e-11! 1.79170665e-12! 0.00000000e+00! 1.56711579e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.37679934e-10! 0.00000000e+00! 1.33597799e-12! 6.00221966e-13! 3.99999964e-11! 3.98327968e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.01060010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18660400e+02! 1.57820000e+01! 4.82230000e+00! 8.75020000e+02! 2.96020000e+02! 4.26320000e-08! 8.62140000e-08! 2.37710000e-02! 1.09820000e-10! 9.47150000e-06! 5.70980000e-03! 1.64530001e-10! 0.00000000e+00! 5.42120016e-10! 2.79899992e-11! 1.66999997e-12! 3.02000005e-12! 6.76999993e-12! 3.47999993e-12! 1.67649998e-12! 1.56369995e-09! 0.00000000e+00! 9.81030035e-10! 1.03910006e-10! 9.33500998e-13! 4.19398999e-13! 0.00000000e+00! 7.48099985e-11! 1.42411204e-11! 9.35357694e-12! 2.06497250e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.98999996e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.55880013e-11! 2.11999992e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18661100e+02! 1.58320000e+01! 4.78060000e+00! 8.75070000e+02! 2.95960000e+02! 4.30170000e-08! 8.69510000e-08! 2.41770000e-02! 1.13200000e-10! 9.24640000e-06! 5.65060000e-03! 1.31669994e-10! 0.00000000e+00! 5.42120016e-10! 2.79899992e-11! 1.66999997e-12! 3.02000005e-12! 6.76999993e-12! 3.47999993e-12! 1.60870004e-12! 1.56369995e-09! 0.00000000e+00! 9.92199989e-10! 1.03910006e-10! 0.00000000e+00! 0.00000000e+00! 4.19999972e-11! 7.48099985e-11! 1.42391038e-11! 9.35279805e-12! 2.06484690e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.98999996e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.36959972e-12! 2.11999992e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18661800e+02! 1.58840000e+01! 4.74190000e+00! 8.75110000e+02! 2.96070000e+02! 4.32980000e-08! 8.73880000e-08! 2.42440000e-02! 9.37140000e-11! 8.98190000e-06! 5.57880000e-03! 1.73899992e-10! 4.62829997e-10! 5.97415339e-10! 3.94901264e-11! 2.01857281e-12! 0.00000000e+00! 2.96068378e-12! 0.00000000e+00! 6.74999986e-12! 0.00000000e+00! 0.00000000e+00! 1.07880005e-09! 0.00000000e+00! 6.89999978e-13! 3.09999991e-13! 3.49999994e-11! 4.19125325e-11! 1.43919598e-11! 9.41180380e-12! 2.07436325e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.49999999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18662500e+02! 1.59360000e+01! 4.70300000e+00! 8.75050000e+02! 2.96080000e+02! 4.35150000e-08! 8.73650000e-08! 2.42800000e-02! 9.31500000e-11! 8.79790000e-06! 5.51780000e-03! 1.12449994e-10! 5.11640008e-10! 5.97298377e-10! 3.94690877e-11! 2.00094477e-12! 0.00000000e+00! 2.85239974e-12! 0.00000000e+00! 2.60219988e-11! 0.00000000e+00! 0.00000000e+00! 1.10569998e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.17509291e-11! 1.49649338e-11! 9.63298191e-12! 2.11003489e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.16739994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18663200e+02! 1.59880000e+01! 4.66560000e+00! 8.74980000e+02! 2.96180000e+02! 4.25470000e-08! 8.73700000e-08! 2.41140000e-02! 8.06180000e-11! 8.50090000e-06! 5.14660000e-03! 1.05269994e-10! 6.07490003e-10! 5.97323802e-10! 3.94736639e-11! 2.00477699e-12! 0.00000000e+00! 2.87593994e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.58039981e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.39999981e-11! 4.17860607e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.09789988e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18663900e+02! 1.60420000e+01! 4.62990000e+00! 8.74930000e+02! 2.96560000e+02! 4.28280000e-08! 8.68140000e-08! 2.36250000e-02! 8.16290000e-11! 8.05100000e-06! 4.81670000e-03! 2.00169992e-10! 6.27200014e-10! 5.94496563e-10! 3.89651193e-11! 1.57863642e-12! 0.00000000e+00! 2.58291760e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01499997e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.78795398e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.91059997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18664600e+02! 1.60960000e+01! 4.59420000e+00! 8.74990000e+02! 2.96730000e+02! 4.35150000e-08! 8.62700000e-08! 2.33960000e-02! 8.79830000e-11! 8.59180000e-06! 5.58900000e-03! 8.96579963e-11! 5.94609972e-10! 5.61070024e-10! 2.65499983e-11! 2.83999994e-12! 2.89000009e-12! 7.46999945e-12! 3.90999993e-12! 3.37499993e-11! 1.26919997e-09! 0.00000000e+00! 9.90100002e-10! 6.65600006e-11! 0.00000000e+00! 0.00000000e+00! 3.40000007e-11! 7.62099966e-11! 1.51946927e-11! 9.72167399e-12! 2.12433907e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.97999992e-12! 0.00000000e+00! 2.72000001e-12! 0.00000000e+00! 0.00000000e+00! 2.17920005e-11! 2.11999992e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18668100e+02! 1.62010000e+01! 4.45020000e+00! 8.27050000e+02! 2.92470000e+02! 4.19840000e-08! 8.27980000e-08! 2.16090000e-02! 7.10980000e-11! 9.31040000e-06! 5.77260000e-03! 1.05419999e-10! 4.44839998e-10! 5.74075343e-10! 3.52918840e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.66263961e-12! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18670100e+02! 1.60410000e+01! 4.58220000e+00! 8.27130000e+02! 2.92040000e+02! 4.36820000e-08! 8.64670000e-08! 2.31890000e-02! 9.82210000e-11! 8.53890000e-06! 5.67180000e-03! 3.97780003e-11! 4.11560008e-10! 5.92732030e-10! 3.86477343e-11! 1.31268163e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02900000e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.54414761e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.00000040e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18670800e+02! 1.59880000e+01! 4.62400000e+00! 8.27380000e+02! 2.92060000e+02! 4.30270000e-08! 8.63220000e-08! 2.31170000e-02! 8.81620000e-11! 7.70380000e-06! 4.73490000e-03! 9.15299989e-11! 3.78689996e-10! 5.91994731e-10! 3.85151112e-11! 1.20154787e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01020003e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.19999999e-11! 3.44226869e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.50000019e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18671500e+02! 1.59360000e+01! 4.66560000e+00! 8.27230000e+02! 2.91990000e+02! 4.26250000e-08! 8.63180000e-08! 2.30560000e-02! 8.37100000e-11! 8.25340000e-06! 5.77830000e-03! 6.83519977e-11! 3.52359975e-10! 5.91974414e-10! 3.85114510e-11! 1.19848218e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.03980002e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.19999999e-11! 3.43945809e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.43400005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18672200e+02! 1.58780000e+01! 4.70300000e+00! 8.27150000e+02! 2.92170000e+02! 4.21690000e-08! 8.61360000e-08! 2.26840000e-02! 7.58100000e-11! 7.90420000e-06! 5.59740000e-03! 2.47129990e-11! 3.39540007e-10! 5.53539992e-10! 2.75700001e-11! 1.76999995e-12! 3.24000007e-12! 7.40999970e-12! 1.22000001e-12! 0.00000000e+00! 1.12930010e-09! 0.00000000e+00! 1.07130005e-09! 4.67199994e-11! 0.00000000e+00! 0.00000000e+00! 4.09999985e-11! 6.89899943e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.90999993e-12! 0.00000000e+00! 2.02999987e-12! 0.00000000e+00! 0.00000000e+00! 1.54040010e-11! 2.02000005e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18672900e+02! 1.58180000e+01! 4.73470000e+00! 8.27170000e+02! 2.92170000e+02! 4.21000000e-08! 8.61200000e-08! 2.27290000e-02! 6.71970000e-11! 7.73980000e-06! 5.58040000e-03! 2.53720005e-12! 3.66299990e-10! 5.90967608e-10! 3.83303528e-11! 1.04672705e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.95549976e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.30034090e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.84039987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18681200e+02! 1.53100000e+01! 4.36150000e+00! 9.53580000e+02! 3.02330000e+02! 4.25370000e-08! 8.33340000e-08! 2.24960000e-02! 1.02840000e-10! 4.55450000e-06! 4.29510000e-03! 3.50200008e-10! 5.35030020e-10! 5.76800829e-10! 3.57821342e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.00010000e-09! 0.00000000e+00! 1.75377291e-12! 7.87926961e-13! 3.79999990e-11! 1.34286401e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.75829993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.18681900e+02! 1.52730000e+01! 4.31380000e+00! 9.53770000e+02! 3.02210000e+02! 4.26870000e-08! 8.38150000e-08! 2.26170000e-02! 1.01240000e-10! 4.40260000e-06! 4.20270000e-03! 0.00000000e+00! 5.29330024e-10! 5.79246706e-10! 3.62220844e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.40740041e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.49999994e-11! 1.68082041e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.94040009e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20421500e+02! 1.19040000e+01! 2.61800000e+00! 6.96470000e+02! 2.81410000e+02! 3.08650000e-08! 1.01180000e-07! 1.39180000e-02! 8.45000000e-11! 7.55830000e-05! 1.08610000e-02! 0.00000000e+00! 0.00000000e+00! 6.67547240e-10! 5.21049801e-11! 1.25893133e-11! 1.45038773e-11! 6.78934270e-11! 1.39405397e-11! 2.03999994e-11! 0.00000000e+00! 0.00000000e+00! 9.84260007e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.38816791e-10! 1.47977863e-11! 9.56846061e-12! 2.09962880e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.45709997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20433300e+02! 1.06070000e+01! 2.62170000e+00! 4.45970000e+02! 2.61510000e+02! 4.36620000e-08! 1.06070000e-07! 2.99910000e-03! 3.18280000e-11! 1.33250000e-04! 1.58600000e-02! 6.14200010e-11! 4.62019978e-10! 6.92412738e-10! 5.65776211e-11! 1.63372042e-11! 2.43618719e-11! 9.09155390e-11! 1.89148922e-11! 5.46670001e-11! 0.00000000e+00! 0.00000000e+00! 1.06300002e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.73174516e-10! 1.58165737e-11! 9.96173109e-12! 2.16305533e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.33330021e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20434000e+02! 1.05140000e+01! 2.62230000e+00! 4.46120000e+02! 2.61170000e+02! 4.58320000e-08! 1.02590000e-07! 3.07300000e-03! 3.50500000e-11! 1.32940000e-04! 1.60430000e-02! 0.00000000e+00! 4.53559995e-10! 6.74717060e-10! 5.33946394e-11! 1.36699931e-11! 1.73463674e-11! 7.45317003e-11! 1.53748611e-11! 5.03240019e-11! 0.00000000e+00! 0.00000000e+00! 1.00640007e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.43000001e-10! 1.48723617e-10! 1.56874531e-11! 9.91188815e-12! 2.15501662e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.26469993e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20434700e+02! 1.04200000e+01! 2.62130000e+00! 4.46360000e+02! 2.61350000e+02! 4.44420000e-08! 1.04650000e-07! 3.49640000e-03! 5.56730000e-11! 1.32720000e-04! 1.63680000e-02! 0.00000000e+00! 4.23700020e-10! 6.85192070e-10! 5.52788162e-11! 1.52488595e-11! 2.14992243e-11! 8.42301853e-11! 1.74703967e-11! 6.34170008e-11! 0.00000000e+00! 0.00000000e+00! 1.03340003e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.63197414e-10! 1.60767198e-11! 1.00621516e-11! 2.17925122e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.74720004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20435400e+02! 1.03280000e+01! 2.62120000e+00! 4.46200000e+02! 2.61400000e+02! 4.34920000e-08! 1.05270000e-07! 3.25740000e-03! 5.38900000e-11! 1.29130000e-04! 1.62810000e-02! 0.00000000e+00! 3.92559985e-10! 6.88344770e-10! 5.58459008e-11! 1.57240523e-11! 2.27491134e-11! 8.71491421e-11! 1.81010918e-11! 1.10610000e-10! 0.00000000e+00! 0.00000000e+00! 9.01890007e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.67553624e-10! 1.74798093e-11! 1.06037696e-11! 2.26660305e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.91940014e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20436100e+02! 1.02380000e+01! 2.62160000e+00! 4.46220000e+02! 2.61500000e+02! 4.63030000e-08! 1.04640000e-07! 2.99450000e-03! 4.69900000e-11! 1.28150000e-04! 1.61250000e-02! 0.00000000e+00! 3.72640002e-10! 6.85141222e-10! 5.52696673e-11! 1.52411955e-11! 2.14790651e-11! 8.41831049e-11! 1.74602242e-11! 7.76389994e-11! 0.00000000e+00! 0.00000000e+00! 1.00520003e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.59999985e-10! 1.63127151e-10! 1.64995517e-11! 1.02253726e-11! 2.20557548e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.22219985e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20436800e+02! 1.01500000e+01! 2.62070000e+00! 4.46150000e+02! 2.61700000e+02! 4.64290000e-08! 1.03340000e-07! 2.86580000e-03! 4.90000000e-11! 1.33440000e-04! 1.67560000e-02! 0.00000000e+00! 3.68070019e-10! 6.78530732e-10! 5.40806219e-11! 1.42448232e-11! 1.88583298e-11! 7.80627091e-11! 1.61377977e-11! 7.01429956e-11! 0.00000000e+00! 0.00000000e+00! 1.05249998e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.53993193e-10! 1.62766901e-11! 1.01393434e-11! 2.19170081e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20437500e+02! 1.00630000e+01! 2.62100000e+00! 4.45930000e+02! 2.61930000e+02! 4.64600000e-08! 1.02120000e-07! 2.83920000e-03! 2.87970000e-11! 1.25470000e-04! 1.59180000e-02! 9.11019940e-11! 3.78619996e-10! 6.72327083e-10! 5.29647506e-11! 1.33097665e-11! 1.63988701e-11! 7.23189356e-11! 1.48967540e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02400000e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.45421342e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20440300e+02! 9.71020000e+00! 2.62000000e+00! 4.45980000e+02! 2.62820000e+02! 5.51920000e-08! 9.42670000e-08! 1.76390000e-03! 6.58100000e-11! 1.34860000e-04! 1.69510000e-02! 0.00000000e+00! 3.96430000e-10! 6.32394859e-10! 4.57820067e-11! 7.29091353e-12! 5.67615074e-13! 3.53470135e-11! 6.90829035e-12! 4.35999986e-11! 0.00000000e+00! 0.00000000e+00! 9.78940040e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.02452071e-11! 1.54875435e-11! 9.83471898e-12! 2.14257084e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20290002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20441000e+02! 9.62140000e+00! 2.61930000e+00! 4.46080000e+02! 2.63020000e+02! 5.54400000e-08! 9.40570000e-08! 1.65910000e-03! 6.39870000e-11! 1.32400000e-04! 1.66900000e-02! 0.00000000e+00! 3.83869991e-10! 6.31326935e-10! 4.55899277e-11! 7.12996112e-12! 1.44265622e-13! 3.43583356e-11! 6.69466782e-12! 8.61709940e-11! 0.00000000e+00! 0.00000000e+00! 8.63090044e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.74999987e-10! 8.87697277e-11! 1.67532151e-11! 1.03232917e-11! 2.22136788e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.19429995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20441700e+02! 9.53230000e+00! 2.61990000e+00! 4.46040000e+02! 2.62940000e+02! 5.64390000e-08! 9.53760000e-08! 1.47380000e-03! 5.11740000e-11! 1.30170000e-04! 1.65720000e-02! 2.02950001e-11! 3.67570002e-10! 6.38034070e-10! 4.67963515e-11! 8.14089594e-12! 2.80330381e-12! 4.05681877e-11! 8.03642049e-12! 5.74719994e-11! 0.00000000e+00! 0.00000000e+00! 8.85920004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.80371756e-11! 1.58999688e-11! 9.99392322e-12! 2.16824718e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.79440005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20442400e+02! 9.44310000e+00! 2.61920000e+00! 4.46060000e+02! 2.63010000e+02! 5.76530000e-08! 9.43790000e-08! 1.66750000e-03! 5.13610000e-11! 1.30140000e-04! 1.68330000e-02! 0.00000000e+00! 3.43559986e-10! 6.32964348e-10! 4.58844455e-11! 7.37675459e-12! 7.93401532e-13! 3.58743139e-11! 7.02222265e-12! 4.69440008e-11! 0.00000000e+00! 0.00000000e+00! 8.14500023e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.10321332e-11! 1.55869623e-11! 9.87309626e-12! 2.14876034e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.69440025e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20443100e+02! 9.35390000e+00! 2.61760000e+00! 4.46150000e+02! 2.63260000e+02! 5.56980000e-08! 9.33090000e-08! 1.97980000e-03! 4.33070000e-11! 1.27060000e-04! 1.64180000e-02! 3.41640015e-11! 3.25410004e-10! 6.27523422e-10! 4.49057701e-11! 6.55666407e-12! 0.00000000e+00! 3.08367533e-11! 5.93376476e-12! 6.46109971e-11! 0.00000000e+00! 0.00000000e+00! 9.75109993e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.75999992e-10! 8.35141886e-11! 1.61122192e-11! 1.00758551e-11! 2.18146126e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.13890000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20443800e+02! 9.26460000e+00! 2.61920000e+00! 4.46090000e+02! 2.63450000e+02! 5.60960000e-08! 9.39000000e-08! 1.77960000e-03! 4.50180000e-11! 1.32000000e-04! 1.72060000e-02! 4.74229996e-11! 3.16720011e-10! 6.30528629e-10! 4.54463273e-11! 7.00963029e-12! 0.00000000e+00! 3.36191838e-11! 6.53495964e-12! 4.62289998e-11! 0.00000000e+00! 0.00000000e+00! 9.22739996e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.76666240e-11! 1.55657050e-11! 9.86489102e-12! 2.14743709e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.94290026e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20444400e+02! 9.17540000e+00! 2.61910000e+00! 4.46120000e+02! 2.63630000e+02! 5.74680000e-08! 9.24900000e-08! 1.65320000e-03! 4.90930000e-11! 1.35090000e-04! 1.76320000e-02! 3.59849997e-11! 3.12180004e-10! 6.23358809e-10! 4.41566748e-11! 5.92894961e-12! 0.00000000e+00! 2.69809019e-11! 5.10063736e-12! 4.82290007e-11! 0.00000000e+00! 0.00000000e+00! 8.77570017e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.77597986e-11! 1.56251661e-11! 9.88784402e-12! 2.15113899e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20445800e+02! 8.99700000e+00! 2.61930000e+00! 4.46100000e+02! 2.63490000e+02! 5.67670000e-08! 9.37100000e-08! 1.63720000e-03! 3.37000000e-11! 1.36710000e-04! 1.64590000e-02! 0.00000000e+00! 2.81660001e-10! 6.29562513e-10! 4.52725461e-11! 6.86400633e-12! 0.00000000e+00! 3.27246633e-11! 6.34168195e-12! 5.83329982e-11! 0.00000000e+00! 0.00000000e+00! 8.93000007e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.63316640e-11! 1.59255682e-11! 1.00038042e-11! 2.16984104e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.00000007e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20446500e+02! 8.90760000e+00! 2.61880000e+00! 4.46030000e+02! 2.63540000e+02! 5.63770000e-08! 9.39770000e-08! 1.62840000e-03! 7.19250000e-11! 1.36180000e-04! 1.62230000e-02! 0.00000000e+00! 2.74750001e-10! 6.30920205e-10! 4.55167570e-11! 7.06864602e-12! 0.00000000e+00! 3.39816959e-11! 6.61328804e-12! 1.00670000e-10! 0.00000000e+00! 0.00000000e+00! 8.78999984e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.82076356e-11! 1.71842835e-11! 1.04896916e-11! 2.24820475e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20447200e+02! 8.81820000e+00! 2.61860000e+00! 4.45970000e+02! 2.63470000e+02! 5.68220000e-08! 9.43640000e-08! 1.54350000e-03! 4.95670000e-11! 1.36160000e-04! 1.61260000e-02! 0.00000000e+00! 2.77260020e-10! 6.32888075e-10! 4.58707274e-11! 7.36525858e-12! 7.63162266e-13! 3.58036933e-11! 7.00696359e-12! 1.56669989e-11! 0.00000000e+00! 0.00000000e+00! 9.11330011e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.73999995e-10! 9.09267453e-11! 1.46570707e-11! 9.51414121e-12! 2.09086845e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20447900e+02! 8.72890000e+00! 2.61920000e+00! 4.45990000e+02! 2.63490000e+02! 5.62330000e-08! 9.42880000e-08! 1.67720000e-03! 5.92570000e-11! 1.36450000e-04! 1.60780000e-02! 0.00000000e+00! 2.77510015e-10! 6.32501662e-10! 4.58012135e-11! 7.30700830e-12! 6.09950079e-13! 3.54458858e-11! 6.92965260e-12! 8.50000018e-12! 0.00000000e+00! 0.00000000e+00! 9.32499966e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.03927627e-11! 1.44439885e-11! 9.43188756e-12! 2.07760250e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.49999999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20448600e+02! 8.63970000e+00! 2.61850000e+00! 4.45930000e+02! 2.63560000e+02! 5.70980000e-08! 9.32110000e-08! 1.70680000e-03! 5.47560000e-11! 1.36540000e-04! 1.60410000e-02! 0.00000000e+00! 2.78489981e-10! 6.27025099e-10! 4.48161369e-11! 6.48155314e-12! 0.00000000e+00! 3.03753689e-11! 5.83407454e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.28256283e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20449300e+02! 8.55050000e+00! 2.61850000e+00! 4.45980000e+02! 2.63530000e+02! 5.61300000e-08! 9.50860000e-08! 1.59670000e-03! 4.38480000e-11! 1.35640000e-04! 1.59960000e-02! 4.94440010e-11! 2.74950007e-10! 6.36559472e-10! 4.65311054e-11! 7.91862756e-12! 2.21867815e-12! 3.92028701e-11! 7.74141775e-12! 5.39999989e-11! 0.00000000e+00! 0.00000000e+00! 8.18000001e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.80999993e-10! 9.59996041e-11! 1.57967441e-11! 9.95407576e-12! 2.16182072e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.99999996e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20450000e+02! 8.46120000e+00! 2.61900000e+00! 4.46070000e+02! 2.63840000e+02! 5.67130000e-08! 9.40040000e-08! 1.60500000e-03! 5.09330000e-11! 1.34730000e-04! 1.59330000e-02! 4.38160029e-11! 2.70200001e-10! 6.31057484e-10! 4.55414526e-11! 7.08933953e-12! 3.74202791e-14! 3.41088130e-11! 6.64075392e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.00599983e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.83973381e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.57140002e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20450700e+02! 8.37210000e+00! 2.61820000e+00! 4.46080000e+02! 2.63890000e+02! 5.68380000e-08! 9.40010000e-08! 1.68590000e-03! 4.78280000e-11! 1.34430000e-04! 1.58540000e-02! 5.77849990e-11! 2.66019984e-10! 6.31042218e-10! 4.55387082e-11! 7.08704059e-12! 3.13724266e-14! 3.40946889e-11! 6.63770211e-12! 2.79999999e-11! 0.00000000e+00! 0.00000000e+00! 8.90189977e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.83762646e-11! 1.50237409e-11! 9.65568250e-12! 2.11369602e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.39169995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20451400e+02! 8.28310000e+00! 2.61880000e+00! 4.46120000e+02! 2.63980000e+02! 5.61730000e-08! 9.34500000e-08! 1.70320000e-03! 4.71640000e-11! 1.33580000e-04! 1.58300000e-02! 0.00000000e+00! 2.69519990e-10! 6.28240404e-10! 4.50347364e-11! 6.66473213e-12! 0.00000000e+00! 3.15005799e-11! 6.07719691e-12! 6.53820054e-11! 0.00000000e+00! 0.00000000e+00! 9.07240005e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.88999996e-10! 8.45048753e-11! 1.61351418e-11! 1.00847030e-11! 2.18288842e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20452100e+02! 8.19410000e+00! 2.61870000e+00! 4.46070000e+02! 2.63980000e+02! 5.40080000e-08! 9.28520000e-08! 1.96220000e-03! 4.61300000e-11! 1.32820000e-04! 1.57560000e-02! 2.03819999e-11! 2.67950023e-10! 6.25199559e-10! 4.44877746e-11! 6.20640084e-12! 0.00000000e+00! 2.86851966e-11! 5.46888142e-12! 7.46670017e-11! 0.00000000e+00! 0.00000000e+00! 8.77329986e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.03032502e-11! 1.64111918e-11! 1.01912645e-11! 2.20007432e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.43330001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20452800e+02! 8.10510000e+00! 2.61800000e+00! 4.46040000e+02! 2.63870000e+02! 5.46610000e-08! 9.22860000e-08! 1.96250000e-03! 5.05560000e-11! 1.32930000e-04! 1.56690000e-02! 1.97260003e-11! 2.62970007e-10! 6.22321528e-10! 4.39700845e-11! 5.77259594e-12! 0.00000000e+00! 2.60204688e-11! 4.89311846e-12! 4.29999994e-11! 0.00000000e+00! 0.00000000e+00! 9.10000020e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.63264660e-11! 1.54697054e-11! 9.82783299e-12! 2.14146045e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.66669975e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20453500e+02! 8.01610000e+00! 2.61870000e+00! 4.46190000e+02! 2.63870000e+02! 5.59000000e-08! 9.17050000e-08! 1.81600000e-03! 4.82890000e-11! 1.32890000e-04! 1.56970000e-02! 2.43479993e-11! 2.60999999e-10! 6.19367113e-10! 4.34386693e-11! 5.32729416e-12! 0.00000000e+00! 2.32851204e-11! 4.30209601e-12! 4.86670010e-11! 0.00000000e+00! 0.00000000e+00! 9.44670009e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.22442939e-11! 1.56381887e-11! 9.89287124e-12! 2.15194963e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20000000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20454200e+02! 7.92710000e+00! 2.61830000e+00! 4.46080000e+02! 2.63720000e+02! 5.60820000e-08! 9.09140000e-08! 1.93890000e-03! 4.63970000e-11! 1.33160000e-04! 1.56500000e-02! 3.54249997e-11! 2.63560007e-10! 6.15344886e-10! 4.27151821e-11! 4.72104040e-12! 0.00000000e+00! 1.95610923e-11! 3.49745124e-12! 1.01330000e-10! 0.00000000e+00! 0.00000000e+00! 8.43000003e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.94999988e-10! 6.66866284e-11! 1.72039067e-11! 1.04972671e-11! 2.24942634e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.70000011e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20454900e+02! 7.83790000e+00! 2.61790000e+00! 4.46110000e+02! 2.63650000e+02! 5.62160000e-08! 9.21910000e-08! 1.87160000e-03! 5.33180000e-11! 1.33730000e-04! 1.56360000e-02! 0.00000000e+00! 2.68510020e-10! 6.21838414e-10! 4.38831922e-11! 5.69978439e-12! 0.00000000e+00! 2.55732085e-11! 4.79647962e-12! 3.90000011e-11! 0.00000000e+00! 0.00000000e+00! 9.06769992e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.56589860e-11! 1.53507797e-11! 9.78192614e-12! 2.13405647e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.15709985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20455600e+02! 7.74880000e+00! 2.61860000e+00! 4.46050000e+02! 2.63520000e+02! 5.67460000e-08! 9.32920000e-08! 1.84140000e-03! 7.74920000e-11! 1.33620000e-04! 1.56180000e-02! 0.00000000e+00! 2.78929990e-10! 6.27436991e-10! 4.48902200e-11! 6.54363456e-12! 0.00000000e+00! 3.07567166e-11! 5.91647131e-12! 5.55000004e-11! 0.00000000e+00! 0.00000000e+00! 8.76309969e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.33947425e-11! 1.58413404e-11! 9.97129029e-12! 2.16459732e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.93059995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20456300e+02! 7.65960000e+00! 2.61830000e+00! 4.46050000e+02! 2.63510000e+02! 5.76060000e-08! 9.60290000e-08! 1.36870000e-03! 6.12750000e-11! 1.34340000e-04! 1.56180000e-02! 0.00000000e+00! 3.00429986e-10! 6.41354525e-10! 4.73936203e-11! 8.64138015e-12! 4.11971889e-12! 4.36425132e-11! 8.70068427e-12! 2.42859986e-11! 0.00000000e+00! 0.00000000e+00! 7.37340022e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.10999995e-10! 1.02625235e-10! 1.49133206e-11! 9.61305775e-12! 2.10682166e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.48570001e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20457600e+02! 7.48070000e+00! 2.61860000e+00! 4.46040000e+02! 2.63670000e+02! 5.63760000e-08! 9.79730000e-08! 1.17310000e-03! 5.14070000e-11! 1.33370000e-04! 1.55580000e-02! 0.00000000e+00! 3.37259998e-10! 6.51239729e-10! 4.91716980e-11! 1.01313402e-11! 8.03872593e-12! 5.27948657e-11! 1.06782187e-11! 1.74170001e-11! 0.00000000e+00! 0.00000000e+00! 8.42140024e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.16284010e-10! 1.47090985e-11! 9.53422584e-12! 2.09410735e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.09720001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20458300e+02! 7.39110000e+00! 2.61800000e+00! 4.45980000e+02! 2.63790000e+02! 5.88340000e-08! 9.68410000e-08! 1.12350000e-03! 5.13280000e-11! 1.32320000e-04! 1.54320000e-02! 1.04620002e-11! 3.35929978e-10! 6.45483555e-10! 4.81363144e-11! 9.26373041e-12! 5.75667031e-12! 4.74654066e-11! 9.52669107e-12! 5.61999995e-11! 0.00000000e+00! 0.00000000e+00! 7.65719987e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.02000000e-10! 1.08330442e-10! 1.58621519e-11! 9.97932466e-12! 2.16589299e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.11999991e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20459000e+02! 7.30190000e+00! 2.61780000e+00! 4.45930000e+02! 2.63710000e+02! 6.06970000e-08! 9.54570000e-08! 1.17550000e-03! 4.86150000e-11! 1.31120000e-04! 1.52810000e-02! 2.40639991e-11! 3.24890004e-10! 6.38445963e-10! 4.68704381e-11! 8.20297736e-12! 2.96659572e-12! 4.09495389e-11! 8.11881812e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.86062898e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20459700e+02! 7.21220000e+00! 2.61840000e+00! 4.46000000e+02! 2.63720000e+02! 5.86320000e-08! 9.83720000e-08! 1.23250000e-03! 4.60480000e-11! 1.31900000e-04! 1.53050000e-02! 9.33609960e-12! 3.17250004e-10! 6.53268606e-10! 4.95366421e-11! 1.04371503e-11! 8.84309032e-12! 5.46733596e-11! 1.10841015e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.19087434e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20460400e+02! 7.12290000e+00! 2.61780000e+00! 4.46010000e+02! 2.63650000e+02! 5.95990000e-08! 9.82250000e-08! 1.24520000e-03! 4.62970000e-11! 1.32690000e-04! 1.53020000e-02! 0.00000000e+00! 3.18019999e-10! 6.52521204e-10! 4.94021907e-11! 1.03244826e-11! 8.54674491e-12! 5.39812813e-11! 1.09345658e-11! 2.99999990e-11! 0.00000000e+00! 0.00000000e+00! 7.98330013e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.18054594e-10! 1.50832020e-11! 9.67863636e-12! 2.11739810e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20461100e+02! 7.03350000e+00! 2.61820000e+00! 4.46020000e+02! 2.63460000e+02! 6.09380000e-08! 9.88000000e-08! 1.20140000e-03! 4.79870000e-11! 1.32440000e-04! 1.52760000e-02! 2.01070011e-11! 3.17950000e-10! 6.55445032e-10! 4.99281172e-11! 1.07651865e-11! 9.70591663e-12! 5.66883797e-11! 1.15194842e-11! 1.06289994e-11! 0.00000000e+00! 0.00000000e+00! 8.03289990e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.37000003e-10! 1.22094612e-10! 1.45072860e-11! 9.45632201e-12! 2.08154310e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.12290010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20461800e+02! 6.94420000e+00! 2.61830000e+00! 4.46110000e+02! 2.63230000e+02! 5.55820000e-08! 9.95550000e-08! 1.41820000e-03! 3.09620000e-11! 1.32240000e-04! 1.52350000e-02! 7.55199930e-11! 3.06340009e-10! 6.59284183e-10! 5.06186759e-11! 1.13438486e-11! 1.12279587e-11! 6.02429218e-11! 1.22875078e-11! 4.79170002e-11! 0.00000000e+00! 0.00000000e+00! 8.54580018e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.27399341e-10! 1.56158905e-11! 9.88426268e-12! 2.15056150e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20464600e+02! 6.58730000e+00! 2.61760000e+00! 4.46010000e+02! 2.63090000e+02! 5.17040000e-08! 9.78370000e-08! 1.58350000e-03! 3.37000000e-11! 1.33910000e-04! 1.52890000e-02! 6.37000036e-11! 2.94899993e-10! 6.50548171e-10! 4.90473044e-11! 1.00271041e-11! 7.76455636e-12! 5.21545793e-11! 1.05398728e-11! 1.02779998e-11! 0.00000000e+00! 0.00000000e+00! 9.18420007e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.15328462e-10! 1.44968508e-11! 9.45229311e-12! 2.08089344e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.22220070e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20465300e+02! 6.49820000e+00! 2.61830000e+00! 4.46020000e+02! 2.62670000e+02! 5.33250000e-08! 9.88710000e-08! 1.59470000e-03! 3.45500000e-11! 1.33690000e-04! 1.53150000e-02! 0.00000000e+00! 3.12619985e-10! 6.55806021e-10! 4.99930548e-11! 1.08196030e-11! 9.84904866e-12! 5.70226505e-11! 1.15917094e-11! 4.05589971e-11! 0.00000000e+00! 0.00000000e+00! 8.62119987e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.57999982e-10! 1.22593463e-10! 1.53971315e-11! 9.79981808e-12! 2.13694201e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.90589992e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20466000e+02! 6.40910000e+00! 2.61750000e+00! 4.46110000e+02! 2.62730000e+02! 5.23530000e-08! 9.87640000e-08! 1.64350000e-03! 6.25100000e-11! 1.34220000e-04! 1.52960000e-02! 0.00000000e+00! 3.21480009e-10! 6.55261956e-10! 4.98951887e-11! 1.07375940e-11! 9.63334187e-12! 5.65188937e-11! 1.14828633e-11! 2.03330009e-11! 0.00000000e+00! 0.00000000e+00! 9.03330022e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.21841676e-10! 1.47957948e-11! 9.56769039e-12! 2.09950477e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.10000003e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20466700e+02! 6.32010000e+00! 2.61760000e+00! 4.46120000e+02! 2.63030000e+02! 5.10900000e-08! 9.77740000e-08! 1.60380000e-03! 4.81590000e-11! 1.34260000e-04! 1.52770000e-02! 0.00000000e+00! 3.12359971e-10! 6.50227816e-10! 4.89896838e-11! 9.97881899e-12! 7.63755205e-12! 5.18579762e-11! 1.04757860e-11! 3.13329987e-11! 0.00000000e+00! 0.00000000e+00! 9.13000009e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.14885816e-10! 1.51228335e-11! 9.69393402e-12! 2.11986522e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.49999994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20467400e+02! 6.23130000e+00! 2.61810000e+00! 4.46280000e+02! 2.63180000e+02! 5.16960000e-08! 9.74870000e-08! 1.54560000e-03! 5.22160000e-11! 1.33320000e-04! 1.51700000e-02! 0.00000000e+00! 2.92560004e-10! 6.48768428e-10! 4.87271820e-11! 9.75884998e-12! 7.05897363e-12! 5.05067793e-11! 1.01838347e-11! 1.33330005e-11! 0.00000000e+00! 0.00000000e+00! 9.44999967e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.31999989e-10! 1.12869318e-10! 1.45876783e-11! 9.48735448e-12! 2.08654830e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20468100e+02! 6.14270000e+00! 2.61740000e+00! 4.46190000e+02! 2.63250000e+02! 5.22170000e-08! 9.74980000e-08! 1.52610000e-03! 4.62540000e-11! 1.33400000e-04! 1.51060000e-02! 0.00000000e+00! 2.70609979e-10! 6.48824383e-10! 4.87372399e-11! 9.76728160e-12! 7.08114947e-12! 5.05585677e-11! 1.01950245e-11! 6.86670026e-11! 0.00000000e+00! 0.00000000e+00! 9.39670008e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.12946610e-10! 1.62328068e-11! 1.01224038e-11! 2.18896862e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.33330000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20468800e+02! 6.05440000e+00! 2.61770000e+00! 4.46140000e+02! 2.63110000e+02! 5.19220000e-08! 9.73310000e-08! 1.52790000e-03! 4.47900000e-11! 1.35350000e-04! 1.52010000e-02! 0.00000000e+00! 2.51839993e-10! 6.47975174e-10! 4.85844906e-11! 9.63928590e-12! 6.74448561e-12! 4.97723321e-11! 1.00251448e-11! 2.10000003e-11! 0.00000000e+00! 0.00000000e+00! 8.93669971e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.11773243e-10! 1.48156244e-11! 9.57534572e-12! 2.10073955e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20470100e+02! 5.87840000e+00! 2.61720000e+00! 4.45890000e+02! 2.63460000e+02! 6.08660000e-08! 9.55420000e-08! 9.63500000e-04! 5.11280000e-11! 1.36660000e-04! 1.53290000e-02! 3.62360003e-11! 2.33949998e-10! 6.38878173e-10! 4.69481849e-11! 8.26812490e-12! 3.13795127e-12! 4.13497153e-11! 8.20528367e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.92035135e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20470800e+02! 5.79060000e+00! 2.61760000e+00! 4.46100000e+02! 2.63470000e+02! 6.38790000e-08! 9.17580000e-08! 8.68370000e-04! 4.87480000e-11! 1.37620000e-04! 1.54380000e-02! 9.88000029e-11! 2.29669991e-10! 6.19636675e-10! 4.34871479e-11! 5.36791575e-12! 0.00000000e+00! 2.35346447e-11! 4.35601034e-12! 7.46670017e-11! 0.00000000e+00! 0.00000000e+00! 7.55330021e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.26166766e-11! 1.64111918e-11! 1.01912645e-11! 2.20007432e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.06669994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20471500e+02! 5.70280000e+00! 2.61780000e+00! 4.46080000e+02! 2.63420000e+02! 6.55670000e-08! 9.28230000e-08! 7.55920000e-04! 5.18150000e-11! 1.39100000e-04! 1.55490000e-02! 8.51289941e-11! 2.35999997e-10! 6.25052121e-10! 4.44612507e-11! 6.18417383e-12! 0.00000000e+00! 2.85486634e-11! 5.43938158e-12! 3.19999999e-11! 0.00000000e+00! 0.00000000e+00! 6.72679967e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.67999989e-10! 8.00994965e-11! 1.51426649e-11! 9.70158936e-12! 2.12109982e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.05289995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20472200e+02! 5.61540000e+00! 2.61700000e+00! 4.46090000e+02! 2.63450000e+02! 6.84060000e-08! 8.75910000e-08! 6.76280000e-04! 4.64000000e-11! 1.39040000e-04! 1.55830000e-02! 1.45899987e-10! 2.41839992e-10! 5.98447569e-10! 3.96758008e-11! 2.17416016e-12! 0.00000000e+00! 3.91640800e-12! 1.17129776e-13! 7.06670000e-11! 0.00000000e+00! 0.00000000e+00! 6.89330037e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.33388325e-11! 1.62922679e-11! 1.01453568e-11! 2.19267070e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.70000004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20472900e+02! 5.52820000e+00! 2.61740000e+00! 4.46150000e+02! 2.63430000e+02! 6.88230000e-08! 8.62780000e-08! 6.21840000e-04! 7.58760000e-11! 1.38490000e-04! 1.55810000e-02! 0.00000000e+00! 2.52079996e-10! 5.91771021e-10! 3.84748657e-11! 1.16782452e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.66670000e-11! 0.00000000e+00! 0.00000000e+00! 6.55999977e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.41135384e-11! 1.67679638e-11! 1.03289842e-11! 2.22228590e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06669994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20473600e+02! 5.44140000e+00! 2.61760000e+00! 4.46020000e+02! 2.63320000e+02! 6.87150000e-08! 8.67090000e-08! 6.01840000e-04! 6.78440000e-11! 1.38090000e-04! 1.55480000e-02! 0.00000000e+00! 2.62870004e-10! 5.93962657e-10! 3.88690781e-11! 1.49816010e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.10000012e-11! 0.00000000e+00! 0.00000000e+00! 6.48330001e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.71417966e-11! 1.51129335e-11! 9.69011330e-12! 2.11924887e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.66670060e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20477100e+02! 5.00960000e+00! 2.61730000e+00! 4.46000000e+02! 2.63460000e+02! 6.81790000e-08! 7.85680000e-08! 5.82630000e-04! 2.74510000e-11! 1.34690000e-04! 1.51750000e-02! 1.55130006e-10! 2.42310005e-10! 5.52565937e-10! 3.14229129e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.77780003e-11! 0.00000000e+00! 0.00000000e+00! 7.01940006e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.56117584e-11! 9.88266847e-12! 2.15030424e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20477800e+02! 4.92350000e+00! 2.61720000e+00! 4.46090000e+02! 2.63440000e+02! 7.01620000e-08! 7.96940000e-08! 5.65910000e-04! 3.12900000e-11! 1.32950000e-04! 1.49880000e-02! 1.73050005e-10! 2.22899990e-10! 5.58291580e-10! 3.24528113e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41109997e-11! 0.00000000e+00! 0.00000000e+00! 7.29919958e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.46108091e-11! 9.49628310e-12! 2.08798829e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.88889961e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20478500e+02! 4.83730000e+00! 2.61660000e+00! 4.46190000e+02! 2.63550000e+02! 7.06740000e-08! 8.07850000e-08! 5.79760000e-04! 3.20310000e-11! 1.30110000e-04! 1.46680000e-02! 1.53820012e-10! 2.16020007e-10! 5.63839309e-10! 3.34506936e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.65429978e-11! 0.00000000e+00! 0.00000000e+00! 7.40289996e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.52777322e-11! 9.75372821e-12! 2.12950872e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.88290000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20479200e+02! 4.75110000e+00! 2.61730000e+00! 4.45940000e+02! 2.63590000e+02! 7.07920000e-08! 7.99260000e-08! 5.69700000e-04! 3.31970000e-11! 1.33790000e-04! 1.50590000e-02! 1.35570014e-10! 2.24109994e-10! 5.59471303e-10! 3.26650096e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.83139996e-11! 0.00000000e+00! 0.00000000e+00! 7.02570002e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.47357682e-11! 9.54451969e-12! 2.09576783e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.24289997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20479900e+02! 4.66510000e+00! 2.61700000e+00! 4.46010000e+02! 2.63740000e+02! 6.68040000e-08! 8.71350000e-08! 5.97400000e-04! 3.65030000e-11! 1.35630000e-04! 1.51840000e-02! 1.52910004e-10! 2.40379994e-10! 6.97989999e-10! 5.54300009e-11! 2.19999995e-12! 4.82000030e-12! 1.74100005e-11! 8.68000029e-12! 0.00000000e+00! 1.24830002e-09! 0.00000000e+00! 1.39550005e-09! 1.24009997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.57530003e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.39000009e-12! 0.00000000e+00! 4.61000032e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.30000003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20480600e+02! 4.57900000e+00! 2.61650000e+00! 4.46130000e+02! 2.63700000e+02! 6.91260000e-08! 8.36560000e-08! 6.45830000e-04! 3.70130000e-11! 1.36030000e-04! 1.52080000e-02! 1.68369998e-10! 2.57380006e-10! 6.97989999e-10! 5.54300009e-11! 2.19999995e-12! 4.82000030e-12! 1.74100005e-11! 8.68000029e-12! 0.00000000e+00! 1.24830002e-09! 0.00000000e+00! 1.39550005e-09! 1.24009997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.57530003e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.39000009e-12! 0.00000000e+00! 4.61000032e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.30000003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20481300e+02! 4.49300000e+00! 2.61720000e+00! 4.46050000e+02! 2.63570000e+02! 7.24980000e-08! 7.92710000e-08! 6.05160000e-04! 4.08000000e-11! 1.36280000e-04! 1.52580000e-02! 0.00000000e+00! 2.63430000e-10! 6.76419976e-10! 5.00299975e-11! 3.39000009e-12! 3.89000030e-12! 7.90000010e-12! 4.98999973e-12! 1.05649994e-11! 1.21130006e-09! 0.00000000e+00! 6.46609988e-10! 2.63880001e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.35929989e-10! 1.45053830e-11! 9.45558735e-12! 2.08142479e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.34999996e-12! 0.00000000e+00! 3.97999992e-12! 0.00000000e+00! 0.00000000e+00! 1.66520010e-11! 1.62399989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20484000e+02! 4.14960000e+00! 2.61650000e+00! 4.45840000e+02! 2.63640000e+02! 7.09210000e-08! 8.21450000e-08! 5.88990000e-04! 5.06920000e-11! 1.34330000e-04! 1.50700000e-02! 5.22949999e-12! 1.94609995e-10! 6.74309997e-10! 4.35200001e-11! 3.86999981e-12! 3.69999994e-12! 2.56399988e-11! 1.07999998e-11! 1.64999993e-11! 1.11440004e-08! 0.00000000e+00! 6.62780053e-10! 2.25210006e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.27940006e-10! 1.46818356e-11! 9.52370040e-12! 2.09241010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.65999982e-12! 3.47000011e-12! 4.83000012e-12! 0.00000000e+00! 0.00000000e+00! 1.60280001e-11! 9.72999979e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20484700e+02! 4.06410000e+00! 2.61560000e+00! 4.49060000e+02! 2.63830000e+02! 7.22290000e-08! 7.98000000e-08! 5.97190000e-04! 4.48460000e-11! 1.29870000e-04! 1.50230000e-02! 7.32639990e-11! 2.20079996e-10! 6.74309997e-10! 4.35200001e-11! 3.86999981e-12! 3.69999994e-12! 2.56399988e-11! 1.07999998e-11! 5.16570016e-11! 1.11440004e-08! 0.00000000e+00! 7.35060013e-10! 2.25210006e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.27940006e-10! 1.57270846e-11! 9.92718581e-12! 2.15748409e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.65999982e-12! 3.47000011e-12! 4.83000012e-12! 0.00000000e+00! 0.00000000e+00! 7.28569982e-12! 9.72999979e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20491700e+02! 4.64280000e+00! 2.54710000e+00! 5.94420000e+02! 2.72950000e+02! 4.60720000e-08! 1.43810000e-07! 9.23830000e-03! 2.58750000e-11! 7.64350000e-05! 1.16480000e-02! 1.40000002e-12! 4.19390023e-10! 8.84319507e-10! 9.10965123e-11! 4.52626478e-11! 1.00443827e-10! 2.68595451e-10! 5.73059031e-11! 2.23330000e-11! 0.00000000e+00! 0.00000000e+00! 8.55000015e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.26999994e-10! 4.38340281e-10! 1.48552559e-11! 9.59064512e-12! 2.10320684e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.56669989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20493700e+02! 4.85840000e+00! 2.58500000e+00! 5.94510000e+02! 2.72920000e+02! 4.77030000e-08! 1.56720000e-07! 9.40910000e-03! 5.85280000e-11! 8.49570000e-05! 1.24940000e-02! 0.00000000e+00! 5.10479992e-10! 9.49966439e-10! 1.02904643e-10! 5.51573891e-11! 1.26469737e-10! 3.29375749e-10! 7.04385994e-11! 6.33330020e-12! 0.00000000e+00! 0.00000000e+00! 8.83330020e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.29047472e-10! 1.43795713e-11! 9.40702117e-12! 2.07359199e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.93329987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20494400e+02! 4.93380000e+00! 2.59850000e+00! 5.94600000e+02! 2.73040000e+02! 4.73370000e-08! 1.55520000e-07! 9.33080000e-03! 5.42300000e-11! 8.03450000e-05! 1.21180000e-02! 0.00000000e+00! 4.93689978e-10! 8.70690020e-10! 3.76299998e-11! 5.13999997e-12! 5.34999996e-12! 8.98999972e-12! 5.38000026e-12! 4.45429978e-11! 1.12499998e-09! 0.00000000e+00! 9.39400002e-10! 3.88600020e-11! 0.00000000e+00! 0.00000000e+00! 1.22999999e-10! 2.48299992e-10! 1.55155784e-11! 9.84554105e-12! 2.14431632e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76999994e-12! 0.00000000e+00! 2.72000001e-12! 0.00000000e+00! 0.00000000e+00! 4.35429991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20495100e+02! 5.00880000e+00! 2.61150000e+00! 5.94680000e+02! 2.73230000e+02! 4.61840000e-08! 1.47810000e-07! 9.04620000e-03! 2.67360000e-11! 8.43550000e-05! 1.27540000e-02! 0.00000000e+00! 4.49359994e-10! 8.70690020e-10! 3.76299998e-11! 5.13999997e-12! 5.34999996e-12! 8.98999972e-12! 5.38000026e-12! 1.82500005e-11! 1.12499998e-09! 0.00000000e+00! 8.91750007e-10! 3.88600020e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.48299992e-10! 1.47338652e-11! 9.54378503e-12! 2.09564935e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76999994e-12! 0.00000000e+00! 2.72000001e-12! 0.00000000e+00! 0.00000000e+00! 2.34440002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20495800e+02! 5.08420000e+00! 2.61650000e+00! 5.94670000e+02! 2.73280000e+02! 4.42170000e-08! 1.40930000e-07! 8.95070000e-03! 2.25940000e-11! 9.18950000e-05! 1.40660000e-02! 0.00000000e+00! 4.04160011e-10! 8.69674777e-10! 8.84623208e-11! 4.30553024e-11! 9.46378878e-11! 2.55036409e-10! 5.43762257e-11! 6.13889972e-12! 0.00000000e+00! 0.00000000e+00! 8.35669978e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.18105078e-10! 1.43737912e-11! 9.40479031e-12! 2.07323221e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.36669989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20496500e+02! 5.15960000e+00! 2.61530000e+00! 5.94780000e+02! 2.73260000e+02! 4.39620000e-08! 1.39250000e-07! 8.92810000e-03! 1.31500000e-11! 9.31270000e-05! 1.48230000e-02! 5.50069990e-11! 3.67279984e-10! 8.61131999e-10! 8.69257027e-11! 4.17676796e-11! 9.12510900e-11! 2.47126986e-10! 5.26672421e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.25090005e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.44999998e-10! 4.06301187e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.46570030e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20497900e+02! 5.30880000e+00! 2.61660000e+00! 5.94470000e+02! 2.73140000e+02! 4.69890000e-08! 1.56410000e-07! 9.36700000e-03! 3.47070000e-11! 9.29480000e-05! 1.43350000e-02! 0.00000000e+00! 3.33250011e-10! 9.48390144e-10! 1.02621099e-10! 5.49197909e-11! 1.25844793e-10! 3.27916250e-10! 7.01232544e-11! 1.63609994e-11! 0.00000000e+00! 0.00000000e+00! 9.62669944e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.26869381e-10! 1.46777035e-11! 9.52210619e-12! 2.09215284e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.90279996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20498600e+02! 5.38310000e+00! 2.61650000e+00! 5.94510000e+02! 2.73150000e+02! 4.70870000e-08! 1.56990000e-07! 9.30530000e-03! 3.72430000e-11! 7.50490000e-05! 1.16950000e-02! 0.00000000e+00! 3.32700006e-10! 9.51339452e-10! 1.03151598e-10! 5.53643277e-11! 1.27014052e-10! 3.30646899e-10! 7.07132547e-11! 6.79409957e-12! 0.00000000e+00! 0.00000000e+00! 9.70239999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.27999999e-10! 5.30944511e-10! 1.43932713e-11! 9.41230947e-12! 2.07444496e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01470004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20499300e+02! 5.45710000e+00! 2.61710000e+00! 5.94470000e+02! 2.73150000e+02! 4.66480000e-08! 1.54800000e-07! 9.30200000e-03! 2.74490000e-11! 7.11440000e-05! 1.11230000e-02! 0.00000000e+00! 3.29769989e-10! 9.40203360e-10! 1.01148513e-10! 5.36858266e-11! 1.22599111e-10! 3.20336396e-10! 6.84854812e-11! 2.36669989e-11! 0.00000000e+00! 0.00000000e+00! 9.49999968e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.15557375e-10! 1.48949169e-11! 9.60595405e-12! 2.10567588e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.96669989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20500000e+02! 5.53110000e+00! 2.61630000e+00! 5.94530000e+02! 2.73000000e+02! 4.76530000e-08! 1.57980000e-07! 9.51820000e-03! 3.71070000e-11! 6.77780000e-05! 1.06590000e-02! 0.00000000e+00! 3.33260003e-10! 8.56890003e-10! 3.02399980e-11! 6.19999972e-12! 5.51000001e-12! 1.16200001e-11! 4.55000013e-12! 0.00000000e+00! 9.46730028e-10! 0.00000000e+00! 8.50500004e-10! 6.14700027e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.30750002e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.53999989e-12! 2.03999990e-12! 4.67000006e-12! 0.00000000e+00! 0.00000000e+00! 3.79999990e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20500700e+02! 5.60520000e+00! 2.61680000e+00! 5.94430000e+02! 2.72800000e+02! 4.66310000e-08! 1.55530000e-07! 9.78590000e-03! 3.15000000e-11! 5.67680000e-05! 8.94740000e-03! 0.00000000e+00! 3.40920014e-10! 8.56890003e-10! 3.02399980e-11! 6.19999972e-12! 5.51000001e-12! 1.16200001e-11! 4.55000013e-12! 1.44709999e-11! 9.46730028e-10! 0.00000000e+00! 8.63939975e-10! 6.14700027e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.30750002e-10! 1.46215123e-11! 9.50041521e-12! 2.08865460e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.53999989e-12! 2.03999990e-12! 4.67000006e-12! 0.00000000e+00! 0.00000000e+00! 3.80880015e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20501400e+02! 5.67980000e+00! 2.61700000e+00! 5.94450000e+02! 2.72960000e+02! 4.68190000e-08! 1.54580000e-07! 9.75100000e-03! 4.94960000e-11! 8.21920000e-05! 1.25950000e-02! 0.00000000e+00! 3.70109970e-10! 8.20330026e-10! 2.35799991e-11! 5.35172080e-11! 1.22155605e-10! 9.53999987e-12! 6.82616880e-11! 2.50569999e-11! 6.80509982e-10! 0.00000000e+00! 8.66539951e-10! 1.16949991e-10! 0.00000000e+00! 0.00000000e+00! 1.12000000e-10! 2.08890003e-10! 1.49362432e-11! 9.62190744e-12! 2.10824865e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.40999971e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.65140010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20510400e+02! 4.99200000e+00! 2.61650000e+00! 6.96110000e+02! 2.81650000e+02! 1.09250000e-07! 2.61500000e-07! 4.32120000e-03! 9.56020000e-11! 7.33180000e-05! 1.13350000e-02! 0.00000000e+00! 5.59669977e-10! 1.48276968e-09! 1.98741662e-10! 1.35464959e-10! 3.37700978e-10! 8.22679980e-10! 1.77026047e-10! 2.25560005e-11! 0.00000000e+00! 0.00000000e+00! 1.13919996e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.26524435e-09! 1.48618860e-11! 9.59320384e-12! 2.10361954e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.22779969e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20511100e+02! 4.92370000e+00! 2.61720000e+00! 6.96250000e+02! 2.81430000e+02! 1.13210000e-07! 2.88500000e-07! 5.33010000e-03! 1.21290000e-10! 7.09890000e-05! 1.07840000e-02! 0.00000000e+00! 5.51430013e-10! 1.62006386e-09! 2.23437227e-10! 1.56158850e-10! 3.92131633e-10! 9.49796020e-10! 2.04491785e-10! 5.94290025e-12! 0.00000000e+00! 0.00000000e+00! 1.30969990e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.45494961e-09! 1.43679634e-11! 9.40254125e-12! 2.07286948e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.52570037e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20511800e+02! 4.85530000e+00! 2.61660000e+00! 6.96240000e+02! 2.81380000e+02! 1.11600000e-07! 2.87740000e-07! 5.19870000e-03! 1.20140000e-10! 7.48950000e-05! 1.11570000e-02! 0.00000000e+00! 5.41919953e-10! 1.61619917e-09! 2.22742089e-10! 1.55576357e-10! 3.90599525e-10! 9.46217993e-10! 2.03718695e-10! 4.50000020e-12! 0.00000000e+00! 0.00000000e+00! 1.32369993e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.32999986e-10! 1.44960977e-09! 1.43250654e-11! 9.38598158e-12! 2.07019870e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.11720001e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20512500e+02! 4.78660000e+00! 2.61640000e+00! 6.96170000e+02! 2.81560000e+02! 1.14490000e-07! 2.76900000e-07! 4.34020000e-03! 1.22220000e-10! 7.07590000e-05! 1.06780000e-02! 0.00000000e+00! 5.29919997e-10! 1.56107816e-09! 2.12827284e-10! 1.47268142e-10! 3.68746617e-10! 8.95183205e-10! 1.92691696e-10! 8.76469990e-12! 0.00000000e+00! 0.00000000e+00! 1.21980004e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.37344669e-09! 1.44518581e-11! 9.43492593e-12! 2.07809239e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.51210003e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20513200e+02! 4.71770000e+00! 2.61710000e+00! 6.96090000e+02! 2.81530000e+02! 1.09490000e-07! 2.58130000e-07! 4.01370000e-03! 7.11850000e-11! 6.85380000e-05! 1.04800000e-02! 0.00000000e+00! 5.23259991e-10! 1.27599997e-09! 9.30699962e-11! 4.42999977e-12! 6.67999987e-12! 1.36000005e-11! 5.58000000e-12! 3.16669989e-11! 2.30699992e-09! 0.00000000e+00! 1.09669995e-09! 4.81399989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.69419972e-10! 1.51327631e-11! 9.69776690e-12! 2.12048365e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.44000002e-12! 0.00000000e+00! 2.40000012e-12! 0.00000000e+00! 0.00000000e+00! 8.33330002e-11! 4.48999995e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20513900e+02! 4.64830000e+00! 2.61640000e+00! 6.96320000e+02! 2.81610000e+02! 9.47040000e-08! 2.09600000e-07! 3.66210000e-03! 2.22750000e-11! 6.88220000e-05! 1.05510000e-02! 2.58499999e-10! 5.31109989e-10! 1.21885979e-09! 1.51271329e-10! 9.56867363e-11! 2.33073172e-10! 5.78334769e-10! 1.24230778e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.76330017e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.00588715e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.93329985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20514600e+02! 4.57930000e+00! 2.61650000e+00! 6.96220000e+02! 2.81570000e+02! 1.00720000e-07! 2.32950000e-07! 3.97200000e-03! 9.62670000e-11! 6.37390000e-05! 9.90200000e-03! 0.00000000e+00! 5.46070023e-10! 1.33759370e-09! 1.72628412e-10! 1.13583108e-10! 2.80145601e-10! 6.88266610e-10! 1.47983570e-10! 2.10000003e-11! 0.00000000e+00! 0.00000000e+00! 1.04069997e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.60999969e-10! 1.06464870e-09! 1.48156244e-11! 9.57534572e-12! 2.10073955e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.96669961e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20515300e+02! 4.50990000e+00! 2.61700000e+00! 6.96190000e+02! 2.81660000e+02! 9.52620000e-08! 2.12310000e-07! 3.46300000e-03! 4.76560000e-11! 4.70170000e-05! 7.46000000e-03! 0.00000000e+00! 5.48719958e-10! 1.23263988e-09! 1.53750040e-10! 9.77637832e-11! 2.38536385e-10! 5.91093507e-10! 1.26987532e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02330000e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.19629539e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.29999966e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20521500e+02! 4.91940000e+00! 2.61680000e+00! 8.97450000e+02! 2.89680000e+02! 2.68600000e-08! 9.69440000e-08! 1.98200000e-02! 1.86000000e-11! 4.58080000e-05! 8.97610000e-03! 0.00000000e+00! 2.76279999e-10! 6.46007303e-10! 4.82305203e-11! 9.34267334e-12! 5.96431281e-12! 4.79503312e-11! 9.63146837e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.37999978e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09054141e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.20000015e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20523600e+02! 5.10840000e+00! 2.61700000e+00! 8.97240000e+02! 2.89930000e+02! 2.43070000e-08! 9.76810000e-08! 2.06230000e-02! 1.67640000e-11! 4.06460000e-05! 8.06820000e-03! 1.04740001e-11! 2.57030008e-10! 4.61519989e-10! 1.81200003e-11! 3.03999989e-12! 5.26000033e-12! 1.70099993e-11! 4.63999976e-12! 1.99999999e-12! 6.38819997e-10! 0.00000000e+00! 4.12999995e-10! 3.71099991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09139996e-10! 1.42507377e-11! 9.35728925e-12! 2.06557133e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.06999998e-12! 0.00000000e+00! 2.04999993e-12! 0.00000000e+00! 0.00000000e+00! 3.19999999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20524300e+02! 5.17120000e+00! 2.61680000e+00! 8.97350000e+02! 2.90220000e+02! 2.63880000e-08! 9.78810000e-08! 2.02670000e-02! 2.69050000e-11! 4.43550000e-05! 8.87970000e-03! 0.00000000e+00! 2.53619986e-10! 4.61519989e-10! 1.81200003e-11! 3.03999989e-12! 5.26000033e-12! 1.70099993e-11! 4.63999976e-12! 2.60000008e-11! 6.38819997e-10! 0.00000000e+00! 4.79329965e-10! 3.71099991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09139996e-10! 1.49642798e-11! 9.63272951e-12! 2.10999412e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.06999998e-12! 0.00000000e+00! 2.04999993e-12! 0.00000000e+00! 0.00000000e+00! 4.76669988e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20525000e+02! 5.23390000e+00! 2.61650000e+00! 8.97370000e+02! 2.90160000e+02! 2.47510000e-08! 9.83270000e-08! 2.06740000e-02! 2.58770000e-11! 4.45290000e-05! 8.83320000e-03! 0.00000000e+00! 2.37639991e-10! 6.53039789e-10! 4.94954841e-11! 1.04026596e-11! 8.75237209e-12! 5.44614978e-11! 1.10383256e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.10670006e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.18771257e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.00000007e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20525700e+02! 5.29650000e+00! 2.61720000e+00! 8.97350000e+02! 2.89840000e+02! 2.51190000e-08! 9.74240000e-08! 2.08660000e-02! 2.18130000e-11! 4.06380000e-05! 8.02480000e-03! 0.00000000e+00! 2.30020003e-10! 6.48448073e-10! 4.86695545e-11! 9.71056482e-12! 6.93196932e-12! 5.02101728e-11! 1.01197479e-11! 3.81430026e-11! 0.00000000e+00! 0.00000000e+00! 4.76430007e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.12426672e-10! 1.53253018e-11! 9.77209112e-12! 2.13247024e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.28860004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20527100e+02! 5.42140000e+00! 2.61660000e+00! 8.97360000e+02! 2.89630000e+02! 2.56540000e-08! 9.85150000e-08! 2.12520000e-02! 2.59620000e-11! 4.41440000e-05! 8.74680000e-03! 0.00000000e+00! 2.55339999e-10! 6.53995802e-10! 4.96674368e-11! 1.05467501e-11! 9.13137014e-12! 5.53466023e-11! 1.12295685e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.20420004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20092172e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.29439991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20527800e+02! 5.48380000e+00! 2.61720000e+00! 8.97290000e+02! 2.89700000e+02! 2.47250000e-08! 9.88760000e-08! 2.10860000e-02! 1.02470000e-11! 3.37230000e-05! 6.66560000e-03! 3.79999990e-11! 2.64540001e-10! 6.55831500e-10! 4.99976276e-11! 1.08234359e-11! 9.85912914e-12! 5.70461872e-11! 1.15967947e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.14189988e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.22628602e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.59170002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20528500e+02! 5.54630000e+00! 2.61640000e+00! 8.97240000e+02! 2.89910000e+02! 2.47730000e-08! 9.82750000e-08! 2.12100000e-02! 1.31100000e-11! 3.75760000e-05! 7.57230000e-03! 3.60280000e-11! 2.65980016e-10! 6.52775389e-10! 4.94479215e-11! 1.03628052e-11! 8.64754275e-12! 5.42166832e-11! 1.09854278e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.01510000e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.18405896e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.57429997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20529200e+02! 5.60870000e+00! 2.61700000e+00! 8.97210000e+02! 2.90050000e+02! 2.60570000e-08! 9.86200000e-08! 2.08130000e-02! 2.10260000e-11! 3.99070000e-05! 8.02710000e-03! 0.00000000e+00! 2.65750005e-10! 6.54529708e-10! 4.97634781e-11! 1.06272265e-11! 9.34304543e-12! 5.58409430e-11! 1.13363789e-11! 4.63889994e-12! 0.00000000e+00! 0.00000000e+00! 5.10139986e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20829916e-10! 1.43291949e-11! 9.38757492e-12! 2.07045579e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.71109991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20529900e+02! 5.67120000e+00! 2.61810000e+00! 8.97350000e+02! 2.90100000e+02! 2.76420000e-08! 9.98760000e-08! 2.03160000e-02! 1.83750000e-11! 3.67760000e-05! 7.32400000e-03! 4.80000024e-12! 2.58819993e-10! 6.60916433e-10! 5.09122779e-11! 1.15898749e-11! 1.18750782e-11! 6.17541851e-11! 1.26140452e-11! 6.34289973e-12! 0.00000000e+00! 0.00000000e+00! 5.10909981e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.29654718e-10! 1.43798558e-11! 9.40713132e-12! 2.07360986e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.87709995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20530600e+02! 5.73390000e+00! 2.62000000e+00! 8.97260000e+02! 2.90370000e+02! 2.83820000e-08! 1.00520000e-07! 1.99800000e-02! 4.20970000e-11! 3.98850000e-05! 7.90920000e-03! 0.00000000e+00! 2.48000009e-10! 4.75049999e-10! 1.39599998e-11! 3.26999994e-12! 5.01000023e-12! 1.12799995e-11! 5.48999995e-12! 2.50000003e-11! 5.77239978e-10! 0.00000000e+00! 4.49329990e-10! 3.45200014e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02589999e-10! 1.49345484e-11! 9.62125258e-12! 2.10814317e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.11999991e-12! 0.00000000e+00! 2.36999981e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20531200e+02! 5.79650000e+00! 2.62130000e+00! 8.97330000e+02! 2.90290000e+02! 2.64550000e-08! 9.88220000e-08! 2.05730000e-02! 2.51490000e-11! 4.33970000e-05! 8.64700000e-03! 0.00000000e+00! 0.00000000e+00! 4.75759987e-10! 1.67810002e-11! 4.29179999e-12! 5.57219982e-12! 1.07720005e-11! 3.28510006e-12! 0.00000000e+00! 5.64549962e-10! 0.00000000e+00! 4.82670015e-10! 3.79570021e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06559997e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27159957e-12! 0.00000000e+00! 1.95439997e-12! 0.00000000e+00! 0.00000000e+00! 3.03330000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20531900e+02! 5.85310000e+00! 2.61150000e+00! 8.97960000e+02! 2.90550000e+02! 2.66980000e-08! 9.97250000e-08! 2.01830000e-02! 2.36590000e-11! 4.81090000e-05! 9.23030000e-03! 0.00000000e+00! 0.00000000e+00! 4.76509998e-10! 1.97299989e-11! 5.36000020e-12! 6.16000003e-12! 1.02399998e-11! 9.80000044e-13! 0.00000000e+00! 5.51280022e-10! 0.00000000e+00! 3.91329996e-10! 4.15499996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.10720003e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.42999977e-12! 0.00000000e+00! 1.51999995e-12! 0.00000000e+00! 0.00000000e+00! 3.49999994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20533300e+02! 5.78880000e+00! 2.58980000e+00! 9.31130000e+02! 2.91800000e+02! 2.38410000e-08! 9.67690000e-08! 2.27630000e-02! 8.82290000e-12! 4.57040000e-05! 8.64720000e-03! 5.66069977e-12! 0.00000000e+00! 6.45117404e-10! 4.80704608e-11! 9.20854625e-12! 5.61152166e-12! 4.71264347e-11! 9.45345018e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.74060013e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07824562e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.90559998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20534000e+02! 5.73500000e+00! 2.60970000e+00! 9.48620000e+02! 2.92900000e+02! 2.40250000e-08! 9.67950000e-08! 2.30570000e-02! 1.14550000e-11! 3.90810000e-05! 7.53980000e-03! 3.86800002e-11! 0.00000000e+00! 6.45249632e-10! 4.80942404e-11! 9.22847389e-12! 5.66393677e-12! 4.72488403e-11! 9.47989864e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.63499988e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.08007242e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.70829999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20534700e+02! 5.67930000e+00! 2.61230000e+00! 9.64110000e+02! 2.93750000e+02! 2.52670000e-08! 9.59330000e-08! 2.40600000e-02! 1.73290000e-11! 3.56270000e-05! 6.98650000e-03! 1.26699996e-11! 0.00000000e+00! 6.40866415e-10! 4.73058120e-11! 8.56780272e-12! 3.92618793e-12! 4.31905449e-11! 8.60302888e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.95540017e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01950726e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.47430001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20535400e+02! 5.62430000e+00! 2.61440000e+00! 9.81170000e+02! 2.95100000e+02! 2.52710000e-08! 9.59580000e-08! 2.44320000e-02! 1.03770000e-11! 3.43020000e-05! 6.82270000e-03! 3.81339994e-11! 0.00000000e+00! 6.40993536e-10! 4.73286792e-11! 8.58696361e-12! 3.97658642e-12! 4.33082459e-11! 8.62845993e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.88390015e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02126384e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.78890000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20536100e+02! 5.56910000e+00! 2.61800000e+00! 9.99070000e+02! 2.96570000e+02! 2.55480000e-08! 9.65400000e-08! 2.48090000e-02! 1.70710000e-11! 3.23600000e-05! 6.53550000e-03! 3.44429997e-12! 0.00000000e+00! 6.43953002e-10! 4.78610034e-11! 9.03303127e-12! 5.14986925e-12! 4.60483006e-11! 9.22049936e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.56170018e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06215585e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.88610004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20536800e+02! 5.51450000e+00! 2.62110000e+00! 1.01120000e+03! 2.97660000e+02! 2.57940000e-08! 9.69170000e-08! 2.49640000e-02! 2.52790000e-11! 2.81800000e-05! 5.70610000e-03! 0.00000000e+00! 0.00000000e+00! 6.45869969e-10! 4.82058282e-11! 9.32197982e-12! 5.90988239e-12! 4.78232176e-11! 9.60400249e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.57710001e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.08864431e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.64710083e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20537500e+02! 5.45880000e+00! 2.62250000e+00! 1.01130000e+03! 2.97680000e+02! 2.58010000e-08! 9.65900000e-08! 2.49230000e-02! 4.15930000e-11! 2.77790000e-05! 5.59860000e-03! 0.00000000e+00! 0.00000000e+00! 6.44207188e-10! 4.79067376e-11! 9.07135391e-12! 5.25066709e-12! 4.62837026e-11! 9.27136232e-12! 1.30000004e-11! 0.00000000e+00! 0.00000000e+00! 4.40999987e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06566887e-10! 1.45777782e-11! 9.48353288e-12! 2.08593177e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20539600e+02! 5.28780000e+00! 2.61130000e+00! 1.01160000e+03! 2.97650000e+02! 2.58330000e-08! 9.86590000e-08! 2.51730000e-02! 2.91260000e-11! 3.14590000e-05! 6.40240000e-03! 0.00000000e+00! 0.00000000e+00! 4.06819994e-10! 1.09600003e-11! 1.06571175e-11! 2.52999986e-12! 1.41199994e-11! 2.81999988e-12! 0.00000000e+00! 6.09739981e-10! 0.00000000e+00! 3.38920003e-10! 4.21899980e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.58899973e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.69999994e-12! 0.00000000e+00! 2.10999989e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20540300e+02! 5.23060000e+00! 2.61310000e+00! 1.01130000e+03! 2.97610000e+02! 2.63060000e-08! 9.82900000e-08! 2.51680000e-02! 3.26440000e-11! 3.04730000e-05! 6.11280000e-03! 0.00000000e+00! 0.00000000e+00! 4.06819994e-10! 1.09600003e-11! 1.03743021e-11! 2.52999986e-12! 1.41199994e-11! 2.81999988e-12! 0.00000000e+00! 6.09739981e-10! 0.00000000e+00! 3.46560003e-10! 4.21899980e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.58899973e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.69999994e-12! 0.00000000e+00! 2.10999989e-12! 0.00000000e+00! 0.00000000e+00! 2.77500002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20541000e+02! 5.17340000e+00! 2.61740000e+00! 1.01150000e+03! 2.97620000e+02! 2.58020000e-08! 9.85180000e-08! 2.50780000e-02! 3.22700000e-11! 3.82450000e-05! 7.75940000e-03! 0.00000000e+00! 0.00000000e+00! 4.03170025e-10! 7.84000035e-12! 1.38999999e-12! 2.60999989e-12! 1.32000001e-11! 6.09999985e-12! 0.00000000e+00! 5.30670008e-10! 0.00000000e+00! 3.07999987e-10! 2.59699987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.24700039e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.85999999e-12! 1.54000001e-12! 2.41999996e-12! 0.00000000e+00! 0.00000000e+00! 6.68059982e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20541700e+02! 5.11620000e+00! 2.62120000e+00! 1.01120000e+03! 2.97640000e+02! 2.61120000e-08! 9.86270000e-08! 2.48740000e-02! 3.64670000e-11! 3.78430000e-05! 7.76620000e-03! 0.00000000e+00! 0.00000000e+00! 4.03170025e-10! 7.84000035e-12! 1.38999999e-12! 2.60999989e-12! 1.32000001e-11! 6.09999985e-12! 0.00000000e+00! 5.30670008e-10! 0.00000000e+00! 3.46109974e-10! 2.59699987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.24700039e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.85999999e-12! 1.54000001e-12! 2.41999996e-12! 0.00000000e+00! 0.00000000e+00! 7.85709969e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20542400e+02! 5.05930000e+00! 2.62010000e+00! 1.01120000e+03! 2.97680000e+02! 2.62850000e-08! 9.87100000e-08! 2.47650000e-02! 2.75000000e-11! 3.10860000e-05! 6.40900000e-03! 0.00000000e+00! 0.00000000e+00! 4.05089989e-10! 1.16099994e-11! 2.58999983e-12! 9.52448103e-12! 1.61299984e-11! 3.17000007e-12! 0.00000000e+00! 4.29870001e-10! 0.00000000e+00! 4.27810010e-10! 4.09900031e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.48600018e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.64000019e-12! 0.00000000e+00! 2.61999992e-12! 0.00000000e+00! 0.00000000e+00! 4.44440006e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20543100e+02! 5.00240000e+00! 2.61640000e+00! 1.00960000e+03! 2.97520000e+02! 2.66380000e-08! 9.90470000e-08! 2.52270000e-02! 5.08610000e-11! 3.21150000e-05! 6.62280000e-03! 0.00000000e+00! 0.00000000e+00! 6.56700971e-10! 5.01540337e-11! 1.09544960e-11! 1.02038551e-11! 5.78512585e-11! 1.17707450e-11! 5.23530004e-12! 0.00000000e+00! 0.00000000e+00! 3.68999997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23830057e-10! 1.43469264e-11! 9.39441927e-12! 2.07155976e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.78819997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20543800e+02! 4.95360000e+00! 2.60380000e+00! 9.93270000e+02! 2.96220000e+02! 2.67150000e-08! 9.90130000e-08! 2.47080000e-02! 5.13800000e-11! 3.35330000e-05! 7.05820000e-03! 0.00000000e+00! 0.00000000e+00! 6.56528110e-10! 5.01229371e-11! 1.09284370e-11! 1.01353136e-11! 5.76911852e-11! 1.17361581e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.21670004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23591179e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.66670060e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20545100e+02! 5.03430000e+00! 2.60270000e+00! 9.83090000e+02! 2.95280000e+02! 2.64320000e-08! 9.91160000e-08! 2.48610000e-02! 5.49130000e-11! 3.00940000e-05! 6.51040000e-03! 0.00000000e+00! 0.00000000e+00! 6.57051857e-10! 5.02171429e-11! 1.10073808e-11! 1.03429565e-11! 5.81761098e-11! 1.18409354e-11! 2.19999990e-11! 0.00000000e+00! 0.00000000e+00! 3.02000008e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.24314864e-10! 1.48453558e-11! 9.58682266e-12! 2.10259032e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.76669996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20545800e+02! 5.09480000e+00! 2.61330000e+00! 9.83100000e+02! 2.95300000e+02! 2.59940000e-08! 9.91340000e-08! 2.46990000e-02! 4.66100000e-11! 3.54210000e-05! 7.85660000e-03! 0.00000000e+00! 0.00000000e+00! 6.57143395e-10! 5.02336089e-11! 1.10211770e-11! 1.03792435e-11! 5.82608545e-11! 1.18592462e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.61999986e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.24441332e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.39999999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20546500e+02! 5.15300000e+00! 2.61330000e+00! 9.82530000e+02! 2.95200000e+02! 2.56990000e-08! 9.89430000e-08! 2.47130000e-02! 5.05750000e-11! 3.56770000e-05! 7.79500000e-03! 0.00000000e+00! 0.00000000e+00! 6.56172172e-10! 5.00589119e-11! 1.08747863e-11! 9.99419644e-12! 5.73616259e-11! 1.16649511e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.86999988e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23099350e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.99999998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20547200e+02! 5.21200000e+00! 2.61580000e+00! 9.82310000e+02! 2.95160000e+02! 2.58570000e-08! 9.90650000e-08! 2.47010000e-02! 4.52110000e-11! 2.77320000e-05! 5.93920000e-03! 0.00000000e+00! 0.00000000e+00! 6.56792565e-10! 5.01704962e-11! 1.09682922e-11! 1.02401429e-11! 5.79359997e-11! 1.17890558e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.37560008e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23956539e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.44720016e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20547900e+02! 5.27300000e+00! 2.61690000e+00! 9.82530000e+02! 2.95180000e+02! 2.55790000e-08! 9.89640000e-08! 2.47940000e-02! 5.43510000e-11! 2.67340000e-05! 5.82250000e-03! 0.00000000e+00! 0.00000000e+00! 6.56278920e-10! 5.00781187e-11! 1.08908828e-11! 1.00365324e-11! 5.74604947e-11! 1.16863134e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.56089991e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23246899e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.94290017e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20548600e+02! 5.33540000e+00! 2.61640000e+00! 9.82650000e+02! 2.95240000e+02! 2.57670000e-08! 9.86990000e-08! 2.45780000e-02! 5.26840000e-11! 2.82530000e-05! 6.19520000e-03! 0.00000000e+00! 0.00000000e+00! 6.54931387e-10! 4.98357362e-11! 1.06877753e-11! 9.50230519e-12! 5.62128746e-11! 1.14167426e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.90709992e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.21384985e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.61070002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20549300e+02! 5.39870000e+00! 2.61740000e+00! 9.82860000e+02! 2.95250000e+02! 2.58610000e-08! 9.91560000e-08! 2.48960000e-02! 4.52830000e-11! 2.37430000e-05! 5.18510000e-03! 0.00000000e+00! 0.00000000e+00! 6.57255250e-10! 5.02537317e-11! 1.10380385e-11! 1.04235943e-11! 5.83644313e-11! 1.18816250e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.40629996e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.24595917e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.66569995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20550000e+02! 5.46180000e+00! 2.61680000e+00! 9.82930000e+02! 2.95290000e+02! 2.57220000e-08! 9.88100000e-08! 2.45710000e-02! 2.85120000e-11! 3.02890000e-05! 6.70390000e-03! 0.00000000e+00! 0.00000000e+00! 6.55495824e-10! 4.99372592e-11! 1.07728496e-11! 9.72607585e-12! 5.67354635e-11! 1.15296566e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.11999990e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.22164875e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.15880004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20550700e+02! 5.52500000e+00! 2.61670000e+00! 9.82870000e+02! 2.95280000e+02! 2.55970000e-08! 9.86150000e-08! 2.46090000e-02! 3.17330000e-11! 3.15900000e-05! 6.96660000e-03! 0.00000000e+00! 0.00000000e+00! 6.54504284e-10! 4.97589019e-11! 1.06233945e-11! 9.33296582e-12! 5.58174028e-11! 1.13312927e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.81000009e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20794791e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.16669989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20551400e+02! 5.58840000e+00! 2.61720000e+00! 9.82800000e+02! 2.95250000e+02! 2.52430000e-08! 9.84520000e-08! 2.46770000e-02! 4.21590000e-11! 3.16020000e-05! 6.99230000e-03! 0.00000000e+00! 0.00000000e+00! 6.53675392e-10! 4.96098163e-11! 1.04984649e-11! 9.00436583e-12! 5.50499993e-11! 1.11654817e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.62329972e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.19649526e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.73329986e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20552100e+02! 5.65160000e+00! 2.61640000e+00! 9.82840000e+02! 2.95290000e+02! 2.46350000e-08! 9.78680000e-08! 2.45200000e-02! 4.19950000e-11! 3.28790000e-05! 7.28880000e-03! 0.00000000e+00! 0.00000000e+00! 6.50705823e-10! 4.90756602e-11! 1.00508638e-11! 7.82705151e-12! 5.23005250e-11! 1.05714075e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.97999994e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.15546274e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20552800e+02! 5.71500000e+00! 2.61690000e+00! 9.82830000e+02! 2.95280000e+02! 2.45510000e-08! 9.78240000e-08! 2.47210000e-02! 4.33660000e-11! 3.44300000e-05! 7.56750000e-03! 0.00000000e+00! 0.00000000e+00! 6.50482057e-10! 4.90354146e-11! 1.00171408e-11! 7.73834902e-12! 5.20933713e-11! 1.05266481e-11! 3.99999998e-12! 0.00000000e+00! 0.00000000e+00! 3.72999992e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.15237118e-10! 1.43101997e-11! 9.38024311e-12! 2.06927322e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.16669989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20553500e+02! 5.77850000e+00! 2.61690000e+00! 9.82810000e+02! 2.95250000e+02! 2.66580000e-08! 9.76930000e-08! 2.49200000e-02! 5.32950000e-11! 3.39790000e-05! 7.36830000e-03! 0.00000000e+00! 0.00000000e+00! 6.49815923e-10! 4.89155973e-11! 9.91673670e-12! 7.47425993e-12! 5.14766285e-11! 1.03933884e-11! 2.86290002e-11! 0.00000000e+00! 0.00000000e+00! 3.13339993e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.14316695e-10! 1.50424430e-11! 9.66290156e-12! 2.11486037e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.29139997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20648600e+02! 6.54560000e+00! 2.79390000e+00! 6.69770000e+02! 2.79370000e+02! 8.04130000e-08! 2.10510000e-07! 5.83150000e-03! 1.55080000e-10! 1.38590000e-05! 5.80620000e-03! 0.00000000e+00! 6.37000008e-10! 1.22348709e-09! 1.52103663e-10! 9.63841923e-11! 2.34907677e-10! 5.82619064e-10! 1.25156482e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.08539999e-09! 0.00000000e+00! 1.58699998e-11! 7.12999972e-12! 5.79999972e-11! 9.06982489e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.81670000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20649300e+02! 6.59670000e+00! 2.84730000e+00! 6.69750000e+02! 2.79410000e+02! 7.99890000e-08! 2.10490000e-07! 5.95350000e-03! 1.47480000e-10! 1.33280000e-05! 5.68470000e-03! 0.00000000e+00! 6.32109975e-10! 1.22338528e-09! 1.52085372e-10! 9.63688643e-11! 2.34867376e-10! 5.82524917e-10! 1.25136138e-10! 2.08330003e-11! 0.00000000e+00! 0.00000000e+00! 1.05240006e-09! 0.00000000e+00! 1.73652290e-11! 7.80176965e-12! 5.79999972e-11! 9.06841990e-10! 1.48106596e-11! 9.57342886e-12! 2.10043025e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.74720012e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20650000e+02! 6.64770000e+00! 2.90090000e+00! 6.74280000e+02! 2.79930000e+02! 7.95880000e-08! 2.15250000e-07! 6.22180000e-03! 1.60140000e-10! 1.40360000e-05! 6.02030000e-03! 0.00000000e+00! 6.12070006e-10! 1.24758970e-09! 1.56439098e-10! 1.00017120e-10! 2.44463283e-10! 6.04934991e-10! 1.29978237e-10! 3.79429994e-11! 0.00000000e+00! 0.00000000e+00! 1.15519994e-09! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.80000015e-11! 9.40286293e-10! 1.53193552e-11! 9.76979522e-12! 2.13210005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.22289944e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20659700e+02! 6.50320000e+00! 3.30200000e+00! 9.76680000e+02! 2.95430000e+02! 2.26370000e-08! 1.34220000e-07! 2.60640000e-02! 1.25970000e-10! 4.21360000e-06! 2.11180000e-03! 1.52319990e-09! 7.24380000e-10! 8.35554625e-10! 8.23250218e-11! 3.79124891e-11! 8.11108611e-11! 2.23445748e-10! 4.75504774e-11! 1.88000004e-10! 0.00000000e+00! 0.00000000e+00! 5.67669967e-10! 0.00000000e+00! 6.71597708e-11! 3.01732285e-11! 6.19999954e-11! 3.70959763e-10! 1.97806823e-11! 1.14919489e-11! 2.40984836e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.90000026e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20660400e+02! 6.48690000e+00! 3.26040000e+00! 9.76340000e+02! 2.95520000e+02! 2.26610000e-08! 1.42230000e-07! 2.56130000e-02! 8.88200000e-11! 4.02540000e-06! 2.16380000e-03! 1.12190002e-09! 6.60639987e-10! 6.41940001e-10! 6.72800010e-11! 1.15480001e-10! 2.31609995e-10! 7.53489993e-10! 2.37809994e-10! 2.03000006e-10! 1.08470000e-09! 0.00000000e+00! 6.05999972e-10! 5.95810012e-10! 5.74997688e-11! 2.58332297e-11! 0.00000000e+00! 1.03590003e-09! 2.02266450e-11! 1.16640985e-11! 2.43761244e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.80699994e-11! 6.87900015e-11! 6.27900024e-11! 4.50399995e-11! 3.07499998e-11! 8.76669987e-11! 6.45710041e-10! 1.13769993e-10! 1.48259988e-10! 1.48259988e-10! 1.10000002e-10! 0.00000000e+00!
+ 2.20662500e+02! 6.47720000e+00! 3.07310000e+00! 9.76470000e+02! 2.95290000e+02! 2.35560000e-08! 9.90860000e-08! 2.59230000e-02! 5.33640000e-12! 4.09180000e-06! 2.36620000e-03! 3.26230015e-10! 0.00000000e+00! 4.12170020e-10! 1.52400002e-11! 1.63499995e-11! 1.78500010e-11! 4.04900002e-11! 9.77000078e-12! 1.78890000e-10! 4.48319992e-10! 0.00000000e+00! 4.22339996e-10! 1.51309992e-10! 4.69199983e-12! 2.10799997e-12! 5.89999993e-11! 1.22460000e-10! 1.95098347e-11! 1.13873962e-11! 2.39298616e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.34999996e-12! 2.86999981e-12! 4.55999995e-12! 0.00000000e+00! 0.00000000e+00! 6.33429975e-11! 2.47299993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20663200e+02! 6.49000000e+00! 3.02100000e+00! 9.76450000e+02! 2.95350000e+02! 2.34440000e-08! 1.02730000e-07! 2.58860000e-02! 4.84840000e-11! 3.83200000e-06! 2.28100000e-03! 4.36920000e-10! 0.00000000e+00! 6.75428935e-10! 5.35226898e-11! 1.37772953e-11! 1.76285982e-11! 7.51908258e-11! 1.55172767e-11! 1.86060001e-10! 0.00000000e+00! 0.00000000e+00! 4.45920023e-10! 0.00000000e+00! 2.20413601e-11! 9.90263947e-12! 5.49999976e-11! 1.49707260e-10! 1.97230027e-11! 1.14696837e-11! 2.40625748e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.61389971e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20663900e+02! 6.53960000e+00! 2.98510000e+00! 9.76060000e+02! 2.95470000e+02! 2.22850000e-08! 1.15830000e-07! 2.55430000e-02! 3.05230000e-11! 3.39970000e-06! 2.08810000e-03! 3.26879995e-10! 0.00000000e+00! 4.65940009e-10! 2.35799991e-11! 1.71500002e-11! 2.41200011e-11! 1.22320001e-10! 2.84699989e-11! 2.27719996e-10! 0.00000000e+00! 0.00000000e+00! 4.17750001e-10! 1.36880007e-09! 5.90715879e-11! 2.65394096e-11! 0.00000000e+00! 1.75630011e-10! 2.09615918e-11! 1.19478013e-11! 2.48336803e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.58000001e-12! 7.11000009e-12! 7.91999973e-12! 1.62999995e-12! 1.58000002e-12! 4.28609995e-11! 5.24100000e-11! 1.79200006e-11! 2.89749995e-11! 2.89749995e-11! 1.48499997e-11! 0.00000000e+00!
+ 2.20666700e+02! 6.77900000e+00! 2.91840000e+00! 9.76590000e+02! 2.96730000e+02! 2.66040000e-08! 1.53460000e-07! 2.58890000e-02! 1.05000000e-10! 4.13540000e-06! 2.81070000e-03! 2.75559991e-10! 1.14159993e-09! 7.00719982e-10! 7.20000032e-11! 9.36200006e-11! 2.05380005e-10! 6.43299969e-10! 1.19660004e-10! 6.29219954e-10! 2.59350014e-10! 0.00000000e+00! 9.08830011e-10! 3.00390018e-10! 3.25107302e-10! 1.46062704e-10! 2.39999999e-11! 7.53190010e-10! 3.28985381e-11! 1.65556804e-11! 3.22652495e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.81000005e-12! 3.29399980e-11! 1.81200003e-11! 2.36999981e-12! 1.27799993e-11! 1.22650001e-10! 3.22280008e-10! 7.00100047e-11! 7.74450018e-11! 7.74450018e-11! 6.22299989e-11! 0.00000000e+00!
+ 2.20667400e+02! 6.84230000e+00! 2.93050000e+00! 9.76530000e+02! 2.97110000e+02! 2.87440000e-08! 1.70930000e-07! 2.57170000e-02! 9.86280000e-11! 4.88330000e-06! 3.87870000e-03! 1.98199998e-10! 1.35559997e-09! 7.80820020e-10! 9.91299959e-11! 1.61560001e-10! 3.39329981e-10! 8.36359981e-10! 1.75270007e-10! 7.08669956e-10! 3.56390001e-10! 0.00000000e+00! 1.07330000e-09! 2.88869983e-10! 3.09119980e-10! 1.38879991e-10! 0.00000000e+00! 1.03669995e-09! 3.52606590e-11! 1.74675031e-11! 3.37358336e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.56800007e-11! 5.11800012e-11! 2.97900003e-11! 1.78400003e-11! 6.48999994e-12! 2.45669984e-10! 4.59329991e-10! 9.56600008e-11! 1.00535004e-10! 1.00535004e-10! 8.46600012e-11! 0.00000000e+00!
+ 2.20668100e+02! 6.90090000e+00! 2.95710000e+00! 9.76190000e+02! 2.97200000e+02! 2.85320000e-08! 1.78370000e-07! 2.61830000e-02! 1.00200000e-10! 5.01960000e-06! 3.56210000e-03! 2.67760009e-10! 1.51900004e-09! 8.52349968e-10! 1.10740001e-10! 1.67839992e-10! 3.53400004e-10! 8.68340011e-10! 1.81320001e-10! 6.53670007e-10! 2.21570012e-10! 0.00000000e+00! 1.17900001e-09! 1.56919991e-10! 4.05719985e-10! 1.82279997e-10! 3.90000011e-11! 1.03869990e-09! 3.36254566e-11! 1.68362841e-11! 3.27178111e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.53799994e-11! 5.15500004e-11! 3.19000000e-11! 1.58100009e-11! 8.27000014e-12! 3.14999998e-10! 4.75700035e-10! 1.00559998e-10! 1.02125003e-10! 1.02125003e-10! 8.38499964e-11! 0.00000000e+00!
+ 2.20668800e+02! 6.95790000e+00! 2.98860000e+00! 9.76220000e+02! 2.97310000e+02! 2.86580000e-08! 1.79180000e-07! 2.63740000e-02! 1.18640000e-10! 4.65510000e-06! 3.76790000e-03! 2.29799998e-10! 1.66420000e-09! 9.02319996e-10! 1.03279996e-10! 1.35339989e-10! 2.85989982e-10! 9.69380021e-10! 1.86809998e-10! 7.62090002e-10! 4.16849999e-10! 0.00000000e+00! 1.12599996e-09! 1.47329995e-10! 4.14338092e-10! 1.86151886e-10! 3.29999986e-11! 1.00429998e-09! 3.68488816e-11! 1.80805856e-11! 3.47246121e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.97999992e-12! 4.53600005e-11! 2.76899996e-11! 3.32999990e-12! 9.07999977e-12! 3.31109973e-10! 4.08410000e-10! 8.46099996e-11! 8.33399946e-11! 8.33399946e-11! 6.84400037e-11! 0.00000000e+00!
+ 2.20669400e+02! 7.00480000e+00! 3.03420000e+00! 9.76120000e+02! 2.97420000e+02! 2.95200000e-08! 1.82820000e-07! 2.65170000e-02! 1.37750000e-10! 5.25360000e-06! 4.23480000e-03! 2.46779985e-10! 1.74310000e-09! 9.13349951e-10! 1.12900002e-10! 1.53789995e-10! 3.30980021e-10! 1.00170006e-09! 1.70279998e-10! 7.69059982e-10! 3.80989990e-10! 0.00000000e+00! 1.27559996e-09! 2.20140003e-10! 4.77997475e-10! 2.14752494e-10! 3.29999986e-11! 1.16679999e-09! 3.70561047e-11! 1.81605755e-11! 3.48536235e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.38999964e-12! 4.19400001e-11! 2.45900002e-11! 3.90000011e-12! 5.84999974e-12! 2.70279993e-10! 4.61549993e-10! 9.43700049e-11! 8.70500061e-11! 8.70500061e-11! 7.91699969e-11! 0.00000000e+00!
+ 2.20670100e+02! 7.04290000e+00! 3.08950000e+00! 9.76310000e+02! 2.97490000e+02! 2.95580000e-08! 1.80420000e-07! 2.66410000e-02! 1.39850000e-10! 3.70670000e-06! 2.49360000e-03! 4.50109977e-10! 1.73649994e-09! 9.86340010e-10! 1.19540003e-10! 1.36169992e-10! 2.96329988e-10! 1.04309994e-09! 1.75009993e-10! 6.32140007e-10! 4.37659992e-10! 0.00000000e+00! 1.23630006e-09! 1.87460006e-10! 4.65411903e-10! 2.09098100e-10! 1.79999991e-11! 1.14970000e-09! 3.29853506e-11! 1.65891936e-11! 3.23193000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.48999995e-12! 3.83650021e-11! 2.25499983e-11! 3.90000011e-12! 6.78000017e-12! 2.87739998e-10! 4.35019992e-10! 8.98399966e-11! 8.23249940e-11! 8.23249940e-11! 7.52249998e-11! 0.00000000e+00!
+ 2.20670800e+02! 7.08080000e+00! 3.14510000e+00! 9.76540000e+02! 2.97810000e+02! 2.95360000e-08! 1.94290000e-07! 2.65130000e-02! 1.64730000e-10! 4.17160000e-06! 2.96670000e-03! 4.71410022e-10! 1.71480008e-09! 1.05930009e-09! 1.26169991e-10! 1.18559995e-10! 2.61670019e-10! 1.08440001e-09! 1.79729995e-10! 6.26919960e-10! 4.94329966e-10! 0.00000000e+00! 1.23999999e-09! 1.54789986e-10! 5.32086597e-10! 2.39053388e-10! 1.09999995e-11! 1.13269993e-09! 3.28301587e-11! 1.65292849e-11! 3.22226794e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.58999983e-12! 3.47900007e-11! 2.05099999e-11! 0.00000000e+00! 7.71000017e-12! 3.55390023e-10! 4.08500012e-10! 8.53099952e-11! 7.76050058e-11! 7.76050058e-11! 7.12799958e-11! 0.00000000e+00!
+ 2.20671500e+02! 7.10920000e+00! 3.20340000e+00! 9.76780000e+02! 2.98060000e+02! 2.89860000e-08! 1.88550000e-07! 2.66900000e-02! 1.23440000e-10! 5.29160000e-06! 4.27860000e-03! 1.74169998e-10! 1.74890002e-09! 9.65959979e-10! 1.11089998e-10! 1.03639999e-10! 2.18149998e-10! 7.68869968e-10! 1.18440008e-10! 6.55219989e-10! 6.69130029e-10! 0.00000000e+00! 1.18590004e-09! 2.56209998e-10! 4.81792495e-10! 2.16457491e-10! 0.00000000e+00! 9.26669963e-10! 3.36715378e-11! 1.68540737e-11! 3.27464965e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.51560013e-12! 2.51720016e-11! 1.42310001e-11! 0.00000000e+00! 1.70000006e-12! 2.53859989e-10! 4.28640012e-10! 7.07249953e-11! 5.44649985e-11! 5.44649985e-11! 4.88489978e-11! 0.00000000e+00!
+ 2.20673600e+02! 7.07280000e+00! 3.38860000e+00! 9.76230000e+02! 2.98180000e+02! 3.10830000e-08! 1.77980000e-07! 2.67460000e-02! 2.10070000e-10! 4.21010000e-06! 3.70950000e-03! 3.69309999e-10! 1.98180006e-09! 9.69820002e-10! 1.06589994e-10! 7.47499979e-11! 1.59079999e-10! 8.02359956e-10! 1.29999997e-10! 7.50330020e-10! 1.86100010e-10! 0.00000000e+00! 1.04530007e-09! 2.93869984e-10! 4.64597694e-10! 2.08732295e-10! 0.00000000e+00! 8.26450020e-10! 3.64992446e-11! 1.79456189e-11! 3.45069390e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.49999976e-12! 2.28999996e-11! 1.36000005e-11! 0.00000000e+00! 0.00000000e+00! 2.05330003e-10! 2.30059999e-10! 4.45899984e-11! 2.93699995e-11! 2.93699995e-11! 2.74699985e-11! 0.00000000e+00!
+ 2.20674300e+02! 7.05750000e+00! 3.45180000e+00! 9.76270000e+02! 2.98120000e+02! 2.89610000e-08! 1.70810000e-07! 2.66510000e-02! 1.79800000e-10! 3.94900000e-06! 3.60320000e-03! 2.58859989e-10! 2.26319985e-09! 1.22610000e-09! 1.58759991e-10! 6.76899994e-11! 1.37729994e-10! 9.67329994e-10! 1.59759997e-10! 5.21669985e-10! 1.44169995e-10! 0.00000000e+00! 1.05030007e-09! 7.55800006e-11! 4.13309997e-10! 1.85689991e-10! 0.00000000e+00! 8.39960046e-10! 2.97009813e-11! 1.53213657e-11! 3.02745537e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.83000011e-12! 2.69199992e-11! 1.66799994e-11! 2.16000004e-12! 0.00000000e+00! 2.03999997e-10! 1.97450001e-10! 4.00600005e-11! 2.80599988e-11! 2.80599988e-11! 0.00000000e+00! 0.00000000e+00!
+ 2.20675000e+02! 7.04190000e+00! 3.51490000e+00! 9.75450000e+02! 2.98000000e+02! 3.17450000e-08! 1.79930000e-07! 2.68590000e-02! 2.09450000e-10! 3.18600000e-06! 2.41150000e-03! 8.50620019e-10! 2.71529998e-09! 1.22610000e-09! 1.58759991e-10! 6.76899994e-11! 1.37729994e-10! 9.67329994e-10! 1.59759997e-10! 6.75669964e-10! 1.44169995e-10! 0.00000000e+00! 1.68629999e-09! 7.55800006e-11! 5.86962257e-10! 2.63707695e-10! 0.00000000e+00! 8.39960046e-10! 3.42795375e-11! 1.70887714e-11! 3.31250201e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.83000011e-12! 2.69199992e-11! 1.66799994e-11! 2.16000004e-12! 0.00000000e+00! 3.71670000e-10! 1.97450001e-10! 4.00600005e-11! 2.80599988e-11! 2.80599988e-11! 0.00000000e+00! 0.00000000e+00!
+ 2.20675700e+02! 7.02480000e+00! 3.57790000e+00! 9.76370000e+02! 2.97620000e+02! 3.95210000e-08! 2.59950000e-07! 2.73270000e-02! 2.33800000e-10! 3.06140000e-06! 2.19320000e-03! 1.69809999e-09! 3.14000004e-09! 1.16199994e-09! 2.24570001e-10! 4.97540009e-10! 1.03289999e-09! 1.47219992e-09! 2.75809986e-10! 7.43669959e-10! 1.35379999e-10! 0.00000000e+00! 2.41330000e-09! 1.50989998e-10! 6.23297691e-10! 2.80032303e-10! 6.99999997e-12! 2.09510009e-09! 3.63012398e-11! 1.78691836e-11! 3.43836661e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.13999997e-12! 9.35299962e-11! 5.39900000e-11! 0.00000000e+00! 0.00000000e+00! 6.62330024e-10! 1.40969991e-09! 2.43369991e-10! 2.51039994e-10! 2.51039994e-10! 2.20729990e-10! 0.00000000e+00!
+ 2.20676400e+02! 6.99240000e+00! 3.63200000e+00! 9.76470000e+02! 2.97360000e+02! 4.13900000e-08! 2.92410000e-07! 2.69270000e-02! 3.12480000e-10! 3.06460000e-06! 2.19390000e-03! 2.83849988e-09! 3.24670002e-09! 1.15619991e-09! 2.48810000e-10! 5.44799983e-10! 1.12730003e-09! 1.57780000e-09! 3.07390002e-10! 5.78460002e-10! 1.22680005e-10! 0.00000000e+00! 2.48699994e-09! 4.26600005e-11! 5.66358904e-10! 2.54451099e-10! 0.00000000e+00! 2.37639997e-09! 3.13894015e-11! 1.59731256e-11! 3.13257094e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.16999984e-12! 9.99400007e-11! 5.49799997e-11! 7.05999972e-12! 0.00000000e+00! 6.91189994e-10! 1.52360002e-09! 2.85769991e-10! 3.04195003e-10! 3.04195003e-10! 2.70170025e-10! 0.00000000e+00!
+ 2.20677100e+02! 6.94690000e+00! 3.67300000e+00! 9.76590000e+02! 2.97160000e+02! 4.28700000e-08! 3.12640000e-07! 2.65900000e-02! 3.02810000e-10! 3.19260000e-06! 2.41790000e-03! 3.58379992e-09! 2.87760016e-09! 1.14749998e-09! 3.26410010e-10! 8.73379979e-10! 1.60699998e-09! 1.60909996e-09! 2.62030009e-10! 6.04309991e-10! 1.04070003e-10! 0.00000000e+00! 2.83389978e-09! 4.56699990e-11! 5.85409776e-10! 2.63010197e-10! 0.00000000e+00! 2.61860000e-09! 3.21579430e-11! 1.62697980e-11! 3.18041808e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.84999975e-12! 1.28070013e-10! 6.66100022e-11! 0.00000000e+00! 0.00000000e+00! 8.88030038e-10! 1.78869997e-09! 3.21040000e-10! 3.57005009e-10! 3.57005009e-10! 3.01950021e-10! 0.00000000e+00!
+ 2.20677800e+02! 6.89290000e+00! 3.69990000e+00! 9.76350000e+02! 2.96590000e+02! 3.53580000e-08! 2.89700000e-07! 2.61990000e-02! 2.03220000e-10! 1.57060000e-06! 1.11560000e-03! 3.85709997e-09! 2.18999996e-09! 1.14749998e-09! 3.26410010e-10! 8.73379979e-10! 1.60699998e-09! 1.60909996e-09! 2.62030009e-10! 3.51489976e-10! 1.04070003e-10! 0.00000000e+00! 1.88169991e-09! 4.56699990e-11! 3.48429285e-10! 1.56540697e-10! 0.00000000e+00! 2.61860000e-09! 2.46413827e-11! 1.33682674e-11! 2.71246029e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.84999975e-12! 1.28070013e-10! 6.66100022e-11! 0.00000000e+00! 0.00000000e+00! 4.06140011e-10! 1.78869997e-09! 3.21040000e-10! 3.57005009e-10! 3.57005009e-10! 3.01950021e-10! 0.00000000e+00!
+ 2.20681900e+02! 6.54490000e+00! 3.71030000e+00! 9.76420000e+02! 2.95670000e+02! 2.25670000e-08! 1.11100000e-07! 2.54460000e-02! 1.13410000e-10! 1.99110000e-06! 1.66310000e-03! 2.42420001e-10! 1.18249993e-10! 4.92629992e-10! 7.43579989e-11! 2.11350007e-10! 3.62530006e-10! 1.63660002e-10! 3.33270009e-11! 1.30429986e-10! 0.00000000e+00! 0.00000000e+00! 7.75119968e-10! 3.19710022e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.11070009e-10! 1.80690740e-11! 1.08312369e-11! 2.30328898e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06409994e-11! 3.57490010e-11! 2.63969992e-11! 1.04300006e-11! 3.74469986e-12! 0.00000000e+00! 1.31679986e-10! 2.18220008e-11! 2.34599996e-11! 2.34599996e-11! 2.85400002e-11! 0.00000000e+00!
+ 2.20682600e+02! 6.49300000e+00! 3.68360000e+00! 9.76400000e+02! 2.95460000e+02! 2.17470000e-08! 1.00780000e-07! 2.60460000e-02! 8.26160000e-11! 1.72230000e-06! 1.53300000e-03! 1.73199996e-10! 8.70980024e-11! 4.58249994e-10! 3.84410004e-11! 8.17249948e-11! 1.24989991e-10! 7.66009964e-11! 2.70340000e-11! 1.80719995e-10! 2.75320017e-10! 0.00000000e+00! 7.95439992e-10! 2.43630012e-11! 0.00000000e+00! 0.00000000e+00! 1.09999995e-11! 1.26979996e-10! 1.95642391e-11! 1.14083985e-11! 2.39637338e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.94119979e-12! 1.75450002e-11! 1.24010004e-11! 4.32209997e-12! 2.25239987e-12! 0.00000000e+00! 4.18510018e-11! 6.03450016e-12! 8.84599945e-12! 8.84599945e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.20683300e+02! 6.45730000e+00! 3.63740000e+00! 9.76560000e+02! 2.95350000e+02! 2.20500000e-08! 9.77300000e-08! 2.57990000e-02! 3.42340000e-11! 2.37470000e-06! 2.30560000e-03! 3.58059998e-10! 2.17590002e-10! 4.58750010e-10! 3.39499991e-11! 5.88699992e-11! 8.91799967e-11! 7.43599973e-11! 2.67700011e-11! 7.09999975e-11! 2.75320017e-10! 0.00000000e+00! 5.77999981e-10! 2.49899997e-11! 5.10600000e-11! 2.29399989e-11! 0.00000000e+00! 1.23199992e-10! 1.63021697e-11! 1.01491792e-11! 2.19328705e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.06999998e-12! 1.42100004e-11! 9.78999954e-12! 2.16000004e-12! 2.35999978e-12! 1.27999999e-10! 3.85400011e-11! 5.38000026e-12! 8.27999995e-12! 8.27999995e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.20684000e+02! 6.47170000e+00! 3.58660000e+00! 9.57960000e+02! 2.94220000e+02! 2.16700000e-08! 1.08340000e-07! 2.43350000e-02! 2.75870000e-10! 2.84940000e-06! 3.06010000e-03! 6.95919988e-10! 4.65380012e-10! 4.65309985e-10! 8.54929946e-11! 3.29060001e-10! 5.17969945e-10! 1.04779997e-10! 2.78799987e-11! 2.40289993e-11! 3.03469999e-10! 0.00000000e+00! 5.08510012e-10! 1.49790007e-11! 2.28293391e-11! 1.02566592e-11! 0.00000000e+00! 1.45970000e-10! 1.49056791e-11! 9.61010958e-12! 2.10634600e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.10860017e-12! 6.39430037e-11! 4.64670004e-11! 1.01400000e-11! 3.13000017e-12! 6.39710021e-11! 6.22700017e-11! 1.19309996e-11! 1.28774994e-11! 1.28774994e-11! 8.83340016e-12! 0.00000000e+00!
+ 2.20684700e+02! 6.51050000e+00! 3.53830000e+00! 9.21360000e+02! 2.92460000e+02! 2.56980000e-08! 1.18140000e-07! 2.31940000e-02! 1.40890000e-10! 3.65440000e-06! 4.17320000e-03! 8.59599947e-10! 7.03299974e-10! 4.87540008e-10! 2.73099997e-11! 7.19499946e-11! 1.24940003e-10! 1.76560003e-10! 3.34599987e-11! 1.69720002e-11! 3.17329996e-10! 0.00000000e+00! 6.41749986e-10! 1.90799997e-11! 7.83150003e-11! 3.51849973e-11! 4.99999955e-12! 2.98489983e-10! 1.46958695e-11! 9.52911881e-12! 2.09328388e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.47000011e-12! 1.19599998e-11! 8.23999983e-12! 0.00000000e+00! 3.13000017e-12! 6.99720004e-11! 1.29230002e-10! 2.84500010e-11! 3.35899988e-11! 3.35899988e-11! 2.18799995e-11! 0.00000000e+00!
+ 2.20685400e+02! 6.55340000e+00! 3.49020000e+00! 8.87640000e+02! 2.91130000e+02! 3.07700000e-08! 1.32280000e-07! 2.18920000e-02! 2.45330000e-11! 3.84930000e-06! 4.49190000e-03! 3.03539999e-10! 8.34819991e-10! 8.25689794e-10! 8.05506009e-11! 3.64255986e-11! 7.71999201e-11! 2.14312221e-10! 4.55770109e-11! 5.56469974e-11! 0.00000000e+00! 0.00000000e+00! 7.86440024e-10! 0.00000000e+00! 1.40352896e-10! 6.30571012e-11! 0.00000000e+00! 3.57329139e-10! 1.58457102e-11! 9.97297731e-12! 2.16486933e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.57259997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20686100e+02! 6.59760000e+00! 3.44530000e+00! 8.53700000e+02! 2.89510000e+02! 3.24010000e-08! 1.30620000e-07! 1.92480000e-02! 1.36250000e-11! 4.70660000e-06! 5.29700000e-03! 2.47030008e-10! 8.28659974e-10! 8.17248769e-10! 7.90322807e-11! 3.51533039e-11! 7.38534442e-11! 2.06496945e-10! 4.38883790e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.07000014e-10! 0.00000000e+00! 1.16382293e-10! 5.22876985e-11! 0.00000000e+00! 3.45665774e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02329999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20686800e+02! 6.63890000e+00! 3.40080000e+00! 8.23460000e+02! 2.88910000e+02! 3.43810000e-08! 1.22690000e-07! 1.56010000e-02! 1.20340000e-11! 4.24140000e-06! 4.56090000e-03! 1.72729997e-10! 7.57690022e-10! 6.05539952e-10! 3.28200002e-11! 1.80700004e-11! 3.53599997e-11! 1.10249997e-10! 1.38900003e-11! 2.31999988e-12! 2.19930008e-09! 0.00000000e+00! 6.92000013e-10! 6.48320020e-09! 6.76199999e-11! 3.03800006e-11! 9.99999909e-12! 2.40650000e-10! 1.42602518e-11! 9.36096166e-12! 2.06616356e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.56999998e-12! 0.00000000e+00! 2.92999999e-12! 0.00000000e+00! 3.90999993e-12! 3.06670002e-11! 5.02599976e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20693800e+02! 7.15320000e+00! 2.95590000e+00! 6.96430000e+02! 2.82580000e+02! 6.53220000e-08! 1.50270000e-07! 5.13020000e-03! 3.28620000e-11! 4.40180000e-06! 5.92030000e-03! 0.00000000e+00! 0.00000000e+00! 9.17168397e-10! 9.70051470e-11! 5.02138504e-11! 1.13466861e-10! 2.99009151e-10! 6.38773409e-11! 5.61110013e-12! 0.00000000e+00! 0.00000000e+00! 8.13859979e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.83729057e-10! 1.43580998e-11! 9.39873353e-12! 2.07225539e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.79999990e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20694400e+02! 7.20650000e+00! 2.91140000e+00! 6.96490000e+02! 2.82690000e+02! 6.40220000e-08! 1.32150000e-07! 4.68080000e-03! 1.34610000e-11! 4.51690000e-06! 6.16240000e-03! 1.51490001e-10! 0.00000000e+00! 8.25028768e-10! 8.04316960e-11! 3.63259596e-11! 7.69378519e-11! 2.13700196e-10! 4.54447695e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.57509991e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.56415703e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.39999990e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20695100e+02! 7.26010000e+00! 2.86680000e+00! 6.96680000e+02! 2.82820000e+02! 6.28690000e-08! 1.29050000e-07! 4.82370000e-03! 1.23510000e-11! 4.01190000e-06! 5.66230000e-03! 1.16300004e-10! 0.00000000e+00! 8.09265377e-10! 7.75962766e-11! 3.39499956e-11! 7.06883996e-11! 1.99105385e-10! 4.22912955e-11! 5.33330021e-12! 0.00000000e+00! 0.00000000e+00! 6.90999979e-10! 0.00000000e+00! 8.27999995e-12! 3.72000000e-12! 0.00000000e+00! 3.34634764e-10! 1.43498399e-11! 9.39554511e-12! 2.07174104e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.23330000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20695800e+02! 7.31350000e+00! 2.82200000e+00! 6.96620000e+02! 2.82870000e+02! 6.32900000e-08! 1.31410000e-07! 4.97710000e-03! 1.11000000e-11! 3.79430000e-06! 5.41810000e-03! 1.17899995e-10! 0.00000000e+00! 8.21265889e-10! 7.97548486e-11! 3.57587918e-11! 7.54460452e-11! 2.10216261e-10! 4.46920036e-11! 1.59999999e-11! 0.00000000e+00! 0.00000000e+00! 6.56329990e-10! 0.00000000e+00! 1.08102294e-11! 4.85676993e-12! 0.00000000e+00! 3.51216389e-10! 1.46669708e-11! 9.51796281e-12! 2.09148462e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.99999998e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20696500e+02! 7.36680000e+00! 2.77720000e+00! 6.96640000e+02! 2.82900000e+02! 6.11590000e-08! 1.33320000e-07! 5.39050000e-03! 4.99330000e-11! 3.49520000e-06! 4.91430000e-03! 0.00000000e+00! 2.97999986e-10! 8.30978120e-10! 8.15018331e-11! 3.72226937e-11! 7.92965069e-11! 2.19208540e-10! 4.66349528e-11! 5.33330021e-12! 0.00000000e+00! 0.00000000e+00! 6.59999999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.64636293e-10! 1.43498399e-11! 9.39554511e-12! 2.07174104e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.36669998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20698600e+02! 7.56620000e+00! 2.73830000e+00! 6.96680000e+02! 2.82780000e+02! 5.97860000e-08! 1.28030000e-07! 5.35920000e-03! 1.20360000e-10! 3.46240000e-06! 5.55570000e-03! 0.00000000e+00! 3.11390025e-10! 8.04078693e-10! 7.66633354e-11! 3.31682286e-11! 6.86321347e-11! 1.94303226e-10! 4.12536984e-11! 9.41670006e-12! 0.00000000e+00! 0.00000000e+00! 6.17969953e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.27468108e-10! 1.44712428e-11! 9.44240866e-12! 2.07929941e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01670001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20711800e+02! 8.98560000e+00! 2.64580000e+00! 4.65590000e+02! 2.65440000e+02! 5.76150000e-08! 9.78350000e-08! 1.65710000e-03! 1.42050000e-11! 2.28170000e-06! 4.34120000e-03! 5.42029997e-11! 3.31429995e-10! 6.50538012e-10! 4.90454760e-11! 1.00255707e-11! 7.76052486e-12! 5.21451597e-11! 1.05378380e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.69000022e-10! 0.00000000e+00! 2.06999999e-12! 9.30000001e-13! 6.99999997e-12! 1.15314404e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20712500e+02! 9.06740000e+00! 2.64700000e+00! 4.65510000e+02! 2.65060000e+02! 5.31020000e-08! 9.64370000e-08! 2.17460000e-03! 6.75810000e-12! 1.78970000e-06! 3.07810000e-03! 9.19739979e-11! 3.48670010e-10! 6.43429199e-10! 4.77667975e-11! 8.95408834e-12! 4.94222632e-12! 4.55633760e-11! 9.11572293e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.05491893e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20713200e+02! 9.14860000e+00! 2.64860000e+00! 4.65450000e+02! 2.64510000e+02! 4.83760000e-08! 9.98450000e-08! 2.60410000e-03! 4.16000000e-12! 1.60000000e-06! 2.52560000e-03! 8.31660019e-11! 0.00000000e+00! 6.60758781e-10! 5.08839221e-11! 1.15661153e-11! 1.18125839e-11! 6.16082393e-11! 1.25825106e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.13999987e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.99999953e-12! 1.29436906e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20718800e+02! 9.72200000e+00! 2.85960000e+00! 4.65470000e+02! 2.64530000e+02! 4.45860000e-08! 9.53050000e-08! 3.53410000e-03! 2.69610000e-11! 8.59770000e-07! 1.97920000e-03! 0.00000000e+00! 2.12339993e-10! 6.37673025e-10! 4.67314104e-11! 8.08647854e-12! 2.66017135e-12! 4.02339204e-11! 7.96419528e-12! 2.91669987e-12! 0.00000000e+00! 0.00000000e+00! 9.02109998e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.75383246e-11! 1.42779920e-11! 9.36781035e-12! 2.06726823e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.10830000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20719400e+02! 9.78620000e+00! 2.90660000e+00! 4.65540000e+02! 2.64310000e+02! 4.35020000e-08! 9.58770000e-08! 4.21340000e-03! 2.32340000e-11! 8.97490000e-07! 2.38130000e-03! 0.00000000e+00! 1.78690007e-10! 6.40581643e-10! 4.72545926e-11! 8.52488219e-12! 3.81329473e-12! 4.29268981e-11! 8.54606230e-12! 9.80000022e-12! 0.00000000e+00! 0.00000000e+00! 8.10599976e-10! 0.00000000e+00! 9.71933992e-12! 4.36665981e-12! 0.00000000e+00! 1.01557263e-10! 1.44826390e-11! 9.44680792e-12! 2.08000873e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.98569997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20720100e+02! 9.85060000e+00! 2.95320000e+00! 4.65400000e+02! 2.64260000e+02! 4.46860000e-08! 9.40740000e-08! 3.90000000e-03! 2.28720000e-11! 8.71720000e-07! 2.31570000e-03! 0.00000000e+00! 1.77390005e-10! 6.31413477e-10! 4.56054777e-11! 7.14299063e-12! 1.78536778e-13! 3.44383723e-11! 6.71196128e-12! 3.32220015e-11! 0.00000000e+00! 0.00000000e+00! 9.09499975e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.99999997e-12! 8.88891669e-11! 1.51789952e-11! 9.71561460e-12! 2.12336173e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.47220007e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20720800e+02! 9.91510000e+00! 2.99970000e+00! 4.65460000e+02! 2.64170000e+02! 4.56780000e-08! 8.51320000e-08! 2.99830000e-03! 2.22620000e-11! 7.82370000e-07! 1.76000000e-03! 0.00000000e+00! 2.04789991e-10! 5.85943682e-10! 3.74266763e-11! 2.89484311e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.25000001e-11! 0.00000000e+00! 0.00000000e+00! 9.61939972e-10! 0.00000000e+00! 4.58084091e-12! 2.05805880e-12! 0.00000000e+00! 2.60616043e-11! 1.48602207e-11! 9.59256112e-12! 2.10351580e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20721500e+02! 9.97960000e+00! 3.04600000e+00! 4.65470000e+02! 2.64100000e+02! 4.44870000e-08! 8.00710000e-08! 2.86350000e-03! 2.20250000e-11! 7.79630000e-07! 1.64660000e-03! 0.00000000e+00! 2.30820002e-10! 5.60208602e-10! 3.27976327e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.94599950e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.99999986e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20725000e+02! 1.03040000e+01! 3.27710000e+00! 4.46100000e+02! 2.61860000e+02! 5.04090000e-08! 8.39880000e-08! 3.40000000e-03! 4.11310000e-11! 7.65330000e-07! 3.72020000e-03! 0.00000000e+00! 1.94770006e-10! 5.80126391e-10! 3.63803189e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76669980e-11! 0.00000000e+00! 0.00000000e+00! 8.19359969e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.39999999e-11! 1.80237214e-11! 1.53111499e-11! 9.76662761e-12! 2.13158935e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.21940001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20725700e+02! 1.03710000e+01! 3.32580000e+00! 4.46200000e+02! 2.62130000e+02! 4.93750000e-08! 8.44610000e-08! 3.12240000e-03! 5.12560000e-11! 6.85680000e-07! 2.79390000e-03! 0.00000000e+00! 2.01869993e-10! 5.82531634e-10! 3.68129451e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.81139989e-11! 0.00000000e+00! 0.00000000e+00! 7.30659977e-10! 0.00000000e+00! 5.85513278e-12! 2.63056677e-12! 0.00000000e+00! 2.13470786e-11! 1.56217487e-11! 9.88652389e-12! 2.15092614e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20726400e+02! 1.04380000e+01! 3.37550000e+00! 4.46260000e+02! 2.62640000e+02! 4.71990000e-08! 8.89880000e-08! 2.62950000e-03! 4.58870000e-11! 6.26450000e-07! 2.86190000e-03! 0.00000000e+00! 2.16539994e-10! 6.05551276e-10! 4.09535669e-11! 3.24487681e-12! 0.00000000e+00! 1.04934846e-11! 1.53822788e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.69080022e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.31543247e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.69439980e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20727100e+02! 1.05070000e+01! 3.42370000e+00! 4.46190000e+02! 2.62550000e+02! 4.59100000e-08! 8.96090000e-08! 2.81810000e-03! 3.81250000e-11! 5.75650000e-07! 2.39430000e-03! 0.00000000e+00! 2.07520001e-10! 6.08709028e-10! 4.15215640e-11! 3.72083614e-12! 0.00000000e+00! 1.34171519e-11! 2.16994023e-12! 5.16939998e-11! 0.00000000e+00! 0.00000000e+00! 9.01999975e-10! 0.00000000e+00! 1.22668195e-11! 5.51117962e-12! 1.29999995e-11! 5.75175428e-11! 1.57281844e-11! 9.92760995e-12! 2.15755244e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.75279990e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20727800e+02! 1.05780000e+01! 3.46870000e+00! 4.46120000e+02! 2.62290000e+02! 4.78020000e-08! 8.37640000e-08! 2.68980000e-03! 2.29620000e-11! 4.97290000e-07! 1.90640000e-03! 0.00000000e+00! 1.77539997e-10! 5.78987414e-10! 3.61754376e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.77780000e-14! 0.00000000e+00! 0.00000000e+00! 8.03250022e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.64498710e-11! 1.41921024e-11! 9.33465458e-12! 2.06192095e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.29440000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20728500e+02! 1.06490000e+01! 3.51450000e+00! 4.46160000e+02! 2.62190000e+02! 4.65230000e-08! 8.19110000e-08! 3.11530000e-03! 1.39160000e-11! 4.41290000e-07! 1.50180000e-03! 2.08689988e-12! 1.63199995e-10! 5.69564951e-10! 3.44805920e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.22649997e-11! 0.00000000e+00! 0.00000000e+00! 8.47679982e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.43047097e-12! 1.51505440e-11! 9.70463120e-12! 2.12159040e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.26469989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20729200e+02! 1.07210000e+01! 3.55930000e+00! 4.46240000e+02! 2.62700000e+02! 4.73490000e-08! 8.10910000e-08! 2.26970000e-03! 1.38820000e-11! 4.83330000e-07! 1.29070000e-03! 1.05719999e-11! 1.57480001e-10! 5.65395286e-10! 3.37305739e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.83330000e-11! 0.00000000e+00! 0.00000000e+00! 8.96669961e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.99999997e-12! 0.00000000e+00! 1.53309501e-11! 9.77427080e-12! 2.13282204e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20730600e+02! 1.08690000e+01! 3.63850000e+00! 4.46350000e+02! 2.62910000e+02! 4.52300000e-08! 8.54560000e-08! 2.12680000e-03! 1.02440000e-11! 3.95000000e-07! 1.03390000e-03! 3.03609980e-12! 1.51769999e-10! 5.87591198e-10! 3.77230226e-11! 5.37810844e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.70000003e-11! 0.00000000e+00! 0.00000000e+00! 8.77669992e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.83380663e-11! 1.52913186e-11! 9.75897314e-12! 2.13035475e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20731300e+02! 1.09450000e+01! 3.67320000e+00! 4.46310000e+02! 2.62730000e+02! 4.64160000e-08! 8.17500000e-08! 2.18420000e-03! 6.32130000e-12! 3.84080000e-07! 9.74790000e-04! 4.09749977e-11! 1.56770000e-10! 5.68746272e-10! 3.43333313e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.16669998e-11! 0.00000000e+00! 0.00000000e+00! 8.28000002e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.99999997e-12! 2.29926560e-12! 1.45381467e-11! 9.46823436e-12! 2.08346448e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20731900e+02! 1.10210000e+01! 3.70700000e+00! 4.46300000e+02! 2.62740000e+02! 4.80720000e-08! 8.16870000e-08! 2.82970000e-03! 4.45000000e-12! 3.60610000e-07! 9.04250000e-04! 5.26150026e-11! 1.58259988e-10! 5.68425917e-10! 3.42757073e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.27940002e-11! 0.00000000e+00! 0.00000000e+00! 8.80820028e-10! 0.00000000e+00! 7.71143945e-13! 3.46455991e-13! 0.00000000e+00! 1.85662011e-12! 1.51662710e-11! 9.71070186e-12! 2.12256948e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.85290020e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.20738200e+02! 1.17130000e+01! 3.91920000e+00! 4.46060000e+02! 2.61390000e+02! 4.74480000e-08! 8.46720000e-08! 3.52680000e-03! 1.77660000e-11! 7.87300000e-07! 9.06660000e-04! 0.00000000e+00! 2.54559984e-10! 5.83604554e-10! 3.70059400e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.73090045e-10! 0.00000000e+00! 4.46471375e-12! 2.00588591e-12! 6.19999954e-11! 2.28295872e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06180004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23571500e+02! 1.38420000e+01! 3.80910000e+00! 6.96650000e+02! 2.83480000e+02! 3.32620000e-08! 8.41860000e-08! 1.49820000e-02! 4.19520000e-11! 5.79600000e-05! 9.62900000e-03! 0.00000000e+00! 2.64099992e-10! 5.81133253e-10! 3.65614206e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.27999998e-11! 0.00000000e+00! 0.00000000e+00! 1.06789999e-09! 0.00000000e+00! 3.05442269e-11! 1.37227694e-11! 0.00000000e+00! 1.94148933e-11! 1.45718316e-11! 9.48123698e-12! 2.08556158e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.97780070e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23572200e+02! 1.38580000e+01! 3.87490000e+00! 6.96570000e+02! 2.83610000e+02! 3.30540000e-08! 8.38940000e-08! 1.46440000e-02! 4.36620000e-11! 5.92410000e-05! 1.00910000e-02! 0.00000000e+00! 3.08869985e-10! 5.79648440e-10! 3.62943425e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.67110006e-11! 0.00000000e+00! 0.00000000e+00! 1.05369991e-09! 0.00000000e+00! 2.59136393e-11! 1.16423598e-11! 0.00000000e+00! 1.73632671e-11! 1.46881101e-11! 9.52612295e-12! 2.09280076e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.92669985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23572900e+02! 1.38730000e+01! 3.94090000e+00! 6.98800000e+02! 2.83880000e+02! 3.27000000e-08! 8.35840000e-08! 1.44870000e-02! 3.40410000e-11! 5.72070000e-05! 9.88210000e-03! 0.00000000e+00! 3.56480012e-10! 5.78072090e-10! 3.60107985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.04230002e-09! 0.00000000e+00! 3.16392607e-11! 1.42147396e-11! 1.20000000e-11! 1.51851708e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.49169998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23581300e+02! 1.42260000e+01! 4.42690000e+00! 9.62740000e+02! 2.99380000e+02! 3.83820000e-08! 8.83960000e-08! 2.64310000e-02! 7.72960000e-11! 3.27900000e-05! 7.40930000e-03! 2.45689996e-10! 6.07700001e-10! 6.02540962e-10! 4.04120938e-11! 2.79114427e-12! 0.00000000e+00! 7.70634771e-12! 9.36015913e-13! 7.82770029e-11! 0.00000000e+00! 0.00000000e+00! 1.21699995e-09! 0.00000000e+00! 5.36288687e-11! 2.40941295e-11! 0.00000000e+00! 4.89948603e-11! 1.65185209e-11! 1.02326949e-11! 2.20675648e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.08999997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23581900e+02! 1.42900000e+01! 4.40690000e+00! 9.64270000e+02! 2.99420000e+02! 3.88090000e-08! 8.74840000e-08! 2.58600000e-02! 9.45620000e-11! 3.53130000e-05! 8.12180000e-03! 2.93910007e-10! 6.30159980e-10! 5.97903504e-10! 3.95779347e-11! 2.09215111e-12! 0.00000000e+00! 3.41265167e-12! 8.28403474e-15! 4.86039993e-11! 0.00000000e+00! 0.00000000e+00! 1.12940002e-09! 0.00000000e+00! 5.23102742e-11! 2.35017179e-11! 7.59999980e-11! 4.25870381e-11! 1.56363169e-11! 9.89214786e-12! 2.15183323e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.17289977e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23582600e+02! 1.43530000e+01! 4.38750000e+00! 9.62860000e+02! 2.99400000e+02! 3.87940000e-08! 8.80100000e-08! 2.69500000e-02! 9.57590000e-11! 3.51810000e-05! 8.10600000e-03! 2.84209989e-10! 6.53479992e-10! 6.00578198e-10! 4.00590394e-11! 2.49529867e-12! 0.00000000e+00! 5.88906007e-12! 5.43357514e-13! 6.86379981e-11! 0.00000000e+00! 0.00000000e+00! 1.18760002e-09! 0.00000000e+00! 5.61839394e-11! 2.52420602e-11! 1.03999996e-10! 4.62827797e-11! 1.62319446e-11! 1.01220716e-11! 2.18891502e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.92979979e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23583300e+02! 1.44160000e+01! 4.36800000e+00! 9.62520000e+02! 2.99630000e+02! 3.94690000e-08! 8.77190000e-08! 2.65140000e-02! 9.72950000e-11! 3.44830000e-05! 7.92400000e-03! 2.12349999e-10! 6.83789969e-10! 5.99098438e-10! 3.97928773e-11! 2.27226441e-12! 0.00000000e+00! 4.51903185e-12! 2.47337768e-13! 6.86539992e-11! 0.00000000e+00! 0.00000000e+00! 1.18969989e-09! 0.00000000e+00! 5.05556048e-11! 2.27133885e-11! 0.00000000e+00! 4.42381791e-11! 1.62324199e-11! 1.01222555e-11! 2.18894469e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.42690017e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23584000e+02! 1.44780000e+01! 4.34660000e+00! 9.61320000e+02! 2.99740000e+02! 4.02500000e-08! 8.72390000e-08! 2.57970000e-02! 1.02820000e-10! 3.38270000e-05! 7.90420000e-03! 1.57519997e-10! 7.14179993e-10! 5.96657668e-10! 3.93538431e-11! 1.90437336e-12! 0.00000000e+00! 2.25919175e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.01999992e-10! 4.08656373e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23584700e+02! 1.45400000e+01! 4.32600000e+00! 9.62350000e+02! 3.00000000e+02! 4.05410000e-08! 8.75710000e-08! 2.61160000e-02! 9.86810000e-11! 3.16820000e-05! 7.45400000e-03! 2.58430000e-10! 7.30869976e-10! 5.98345873e-10! 3.96575099e-11! 2.15883127e-12! 0.00000000e+00! 3.82224807e-12! 9.67847764e-14! 5.66469996e-11! 0.00000000e+00! 0.00000000e+00! 1.14889998e-09! 0.00000000e+00! 3.90050076e-11! 1.75239892e-11! 1.06999999e-10! 4.31983095e-11! 1.58754416e-11! 9.98445510e-12! 2.16672028e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.28819992e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23585400e+02! 1.46030000e+01! 4.30580000e+00! 9.62090000e+02! 3.00170000e+02! 4.13660000e-08! 8.65940000e-08! 2.52820000e-02! 1.06130000e-10! 2.82340000e-05! 6.71940000e-03! 1.87770008e-10! 7.59109997e-10! 5.93377847e-10! 3.87638983e-11! 1.41001967e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.94470004e-11! 0.00000000e+00! 0.00000000e+00! 1.06889997e-09! 0.00000000e+00! 3.78471907e-11! 1.70038098e-11! 0.00000000e+00! 3.63337936e-11! 1.50667621e-11! 9.67228988e-12! 2.11637444e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.49789944e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23588200e+02! 1.48530000e+01! 4.22410000e+00! 9.62200000e+02! 3.01120000e+02! 4.31090000e-08! 8.61570000e-08! 2.52110000e-02! 1.28740000e-10! 2.95480000e-05! 7.19100000e-03! 2.10070003e-10! 7.84669996e-10! 5.91155735e-10! 3.83641938e-11! 1.07508522e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.53479989e-11! 0.00000000e+00! 0.00000000e+00! 1.16150001e-09! 0.00000000e+00! 2.65498196e-11! 1.19281798e-11! 0.00000000e+00! 3.32633782e-11! 1.46475852e-11! 9.51048008e-12! 2.09027778e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.21300025e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23588900e+02! 1.49130000e+01! 4.20230000e+00! 9.60030000e+02! 3.01080000e+02! 4.45690000e-08! 8.50580000e-08! 2.44030000e-02! 1.19470000e-10! 2.95990000e-05! 7.24540000e-03! 2.92410013e-10! 7.63929975e-10! 5.85567317e-10! 3.73589944e-11! 2.32767771e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.15999996e-11! 0.00000000e+00! 0.00000000e+00! 1.04599995e-09! 0.00000000e+00! 3.07436403e-11! 1.38123592e-11! 7.40000006e-11! 2.55416712e-11! 1.48334643e-11! 9.58223258e-12! 2.10184994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.69999995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23589600e+02! 1.49730000e+01! 4.18150000e+00! 9.60850000e+02! 3.01210000e+02! 4.49040000e-08! 8.46510000e-08! 2.43380000e-02! 1.18320000e-10! 2.80120000e-05! 6.83600000e-03! 4.20660007e-10! 7.30869976e-10! 5.83497750e-10! 3.69867331e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.29790012e-12! 0.00000000e+00! 0.00000000e+00! 1.11510001e-09! 0.00000000e+00! 2.51925911e-11! 1.13184098e-11! 7.69999967e-11! 2.26820403e-11! 1.44677118e-11! 9.44104517e-12! 2.07907944e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.04469973e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23590300e+02! 1.50340000e+01! 4.16220000e+00! 9.60650000e+02! 3.01270000e+02! 4.69160000e-08! 8.51350000e-08! 2.49390000e-02! 1.37640000e-10! 2.68540000e-05! 6.64840000e-03! 4.48030002e-10! 7.30700001e-10! 5.85958948e-10! 3.74294207e-11! 2.91783660e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.13329987e-11! 0.00000000e+00! 0.00000000e+00! 9.97899985e-10! 0.00000000e+00! 1.79544886e-11! 8.06651013e-12! 6.70000028e-11! 2.60826812e-11! 1.51228335e-11! 9.69393402e-12! 2.11986522e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.10619984e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23591000e+02! 1.50960000e+01! 4.14390000e+00! 9.61720000e+02! 3.01000000e+02! 4.68730000e-08! 8.50340000e-08! 2.57130000e-02! 1.43080000e-10! 2.78060000e-05! 6.95080000e-03! 4.24510010e-10! 7.60249974e-10! 5.85445303e-10! 3.73370432e-11! 2.14373210e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.18719990e-11! 0.00000000e+00! 0.00000000e+00! 1.10999998e-09! 0.00000000e+00! 3.08554189e-11! 1.38625795e-11! 6.70000028e-11! 2.53730457e-11! 1.48415499e-11! 9.58535421e-12! 2.10235353e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.85640000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23591700e+02! 1.51570000e+01! 4.12350000e+00! 9.61500000e+02! 3.01040000e+02! 4.57150000e-08! 8.43330000e-08! 2.41120000e-02! 1.69820000e-10! 2.89940000e-05! 7.27240000e-03! 4.67859973e-10! 7.94110000e-10! 5.81880710e-10! 3.66958720e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.80000015e-11! 2.04477355e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23592400e+02! 1.52180000e+01! 4.10150000e+00! 9.62240000e+02! 3.01220000e+02! 4.61730000e-08! 8.47020000e-08! 2.47940000e-02! 1.53870000e-10! 2.78460000e-05! 6.92540000e-03! 4.92429986e-10! 8.47249992e-10! 5.83757098e-10! 3.70333798e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.99999999e-12! 0.00000000e+00! 0.00000000e+00! 1.00950004e-09! 0.00000000e+00! 2.58749983e-11! 1.16249996e-11! 9.00000005e-11! 2.30403734e-11! 1.42507377e-11! 9.35728925e-12! 2.06557133e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.19999999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23599300e+02! 1.52350000e+01! 3.89300000e+00! 9.61810000e+02! 3.01780000e+02! 4.65330000e-08! 8.35530000e-08! 2.29990000e-02! 1.27360000e-10! 2.43870000e-05! 5.73200000e-03! 4.43209996e-10! 7.63050012e-10! 5.77914494e-10! 3.59824462e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.18300003e-09! 0.00000000e+00! 4.41599986e-11! 1.98399994e-11! 6.80000015e-11! 1.49673607e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.80000008e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23600000e+02! 1.51760000e+01! 3.87860000e+00! 9.62000000e+02! 3.01570000e+02! 4.67040000e-08! 8.33960000e-08! 2.38250000e-02! 1.02800000e-10! 1.85040000e-05! 4.19750000e-03! 3.72810005e-10! 7.37749972e-10! 5.77116133e-10! 3.58388458e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.00000040e-12! 0.00000000e+00! 0.00000000e+00! 1.11099996e-09! 0.00000000e+00! 3.44999983e-12! 1.54999993e-12! 0.00000000e+00! 1.38642596e-11! 1.44588543e-11! 9.43762603e-12! 2.07852797e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.99999999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23600700e+02! 1.51160000e+01! 3.86290000e+00! 9.62940000e+02! 3.01840000e+02! 4.60100000e-08! 8.33220000e-08! 2.32220000e-02! 1.26120000e-10! 1.79440000e-05! 4.04660000e-03! 3.68929998e-10! 7.08799963e-10! 5.76739878e-10! 3.57711603e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.06520001e-12! 0.00000000e+00! 0.00000000e+00! 9.87130044e-10! 0.00000000e+00! 2.75399686e-11! 1.23730288e-11! 7.80000023e-11! 1.33443265e-11! 1.42526772e-11! 9.35803778e-12! 2.06569189e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.64350000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23601400e+02! 1.50560000e+01! 3.84600000e+00! 9.62400000e+02! 3.01990000e+02! 4.54170000e-08! 8.37310000e-08! 2.36100000e-02! 1.28570000e-10! 2.21340000e-05! 5.17810000e-03! 4.51950005e-10! 6.98339997e-10! 5.78819603e-10! 3.61452535e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.99999996e-12! 0.00000000e+00! 0.00000000e+00! 1.07450004e-09! 0.00000000e+00! 3.07049976e-11! 1.37949999e-11! 0.00000000e+00! 1.62180096e-11! 1.44885857e-11! 9.44910296e-12! 2.08037892e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.82499996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23602100e+02! 1.49960000e+01! 3.82680000e+00! 9.63000000e+02! 3.01960000e+02! 4.57770000e-08! 8.42230000e-08! 2.43560000e-02! 1.19060000e-10! 2.33200000e-05! 5.67390000e-03! 3.82120002e-10! 7.11570025e-10! 5.81321435e-10! 3.65952615e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.55320016e-13! 0.00000000e+00! 0.00000000e+00! 1.12130005e-09! 0.00000000e+00! 1.68974088e-11! 7.59158968e-12! 7.09999975e-11! 1.96748607e-11! 1.41988678e-11! 9.33726707e-12! 2.06234214e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.46170002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23602800e+02! 1.49370000e+01! 3.80600000e+00! 9.63090000e+02! 3.01900000e+02! 4.49040000e-08! 8.47440000e-08! 2.37070000e-02! 1.25370000e-10! 2.43120000e-05! 6.03180000e-03! 3.71130016e-10! 7.11409986e-10! 5.83970650e-10! 3.70717936e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.15580001e-09! 0.00000000e+00! 1.53711297e-11! 6.90586997e-12! 9.00000005e-11! 2.33354707e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.02980002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23603500e+02! 1.48770000e+01! 3.78740000e+00! 9.61300000e+02! 3.01560000e+02! 4.40530000e-08! 8.50740000e-08! 2.37090000e-02! 1.24320000e-10! 2.57400000e-05! 6.38470000e-03! 3.92239990e-10! 7.04789949e-10! 5.85648696e-10! 3.73736250e-11! 2.45030829e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.18080001e-09! 0.00000000e+00! 1.67656201e-11! 7.53238010e-12! 0.00000000e+00! 2.56540882e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.59569996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23620800e+02! 1.46430000e+01! 3.28450000e+00! 9.67860000e+02! 3.02070000e+02! 4.49130000e-08! 8.43280000e-08! 2.45820000e-02! 9.89490000e-11! 1.58270000e-05! 4.91820000e-03! 2.62849992e-10! 6.75409950e-10! 5.81855342e-10! 3.66912993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.35109996e-11! 0.00000000e+00! 0.00000000e+00! 1.13630005e-09! 0.00000000e+00! 2.66753997e-11! 1.19845999e-11! 8.90000018e-11! 2.04126039e-11! 1.45929709e-11! 9.48939712e-12! 2.08687755e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.46170011e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23621500e+02! 1.47050000e+01! 3.26280000e+00! 9.66150000e+02! 3.02090000e+02! 4.52100000e-08! 8.39740000e-08! 2.39890000e-02! 9.79080000e-11! 1.45160000e-05! 4.42020000e-03! 2.12460008e-10! 6.53210042e-10! 5.80055226e-10! 3.63675132e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.10830001e-09! 0.00000000e+00! 2.62786477e-11! 1.18063493e-11! 0.00000000e+00! 1.79253574e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27449985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23622200e+02! 1.47660000e+01! 3.24200000e+00! 9.65070000e+02! 3.02100000e+02! 4.56220000e-08! 8.34330000e-08! 2.30830000e-02! 9.95480000e-11! 1.41940000e-05! 4.33420000e-03! 2.05490000e-10! 6.24659990e-10! 5.77304260e-10! 3.58726868e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.50869994e-11! 0.00000000e+00! 0.00000000e+00! 9.94070048e-10! 0.00000000e+00! 2.36552705e-11! 1.06277296e-11! 7.40000006e-11! 1.41242252e-11! 1.46398258e-11! 9.50748421e-12! 2.08979466e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.62169982e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23622900e+02! 1.48290000e+01! 3.22150000e+00! 9.64400000e+02! 3.02140000e+02! 4.50110000e-08! 8.30910000e-08! 2.28890000e-02! 1.08910000e-10! 1.59590000e-05! 5.10770000e-03! 2.61570016e-10! 6.27390029e-10! 5.75565207e-10! 3.55598745e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.89999993e-11! 1.17212923e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23623600e+02! 1.48910000e+01! 3.20090000e+00! 9.65420000e+02! 3.02290000e+02! 4.69760000e-08! 8.29090000e-08! 2.51400000e-02! 1.07890000e-10! 1.67500000e-05! 5.46580000e-03! 2.52870003e-10! 6.42359999e-10! 5.74639780e-10! 3.53934104e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.72140002e-11! 0.00000000e+00! 0.00000000e+00! 1.14440002e-09! 0.00000000e+00! 1.79400002e-11! 8.05999972e-12! 0.00000000e+00! 1.04425392e-11! 1.50003725e-11! 9.64666194e-12! 2.11224111e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.93569993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23624300e+02! 1.49540000e+01! 3.18100000e+00! 9.63960000e+02! 3.02360000e+02! 4.72730000e-08! 8.24710000e-08! 2.40660000e-02! 1.09850000e-10! 1.69690000e-05! 5.59420000e-03! 2.04270004e-10! 6.62019994e-10! 5.72412562e-10! 3.49927934e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.74889998e-11! 0.00000000e+00! 0.00000000e+00! 1.13180010e-09! 0.00000000e+00! 2.30197788e-11! 1.03422193e-11! 6.59999971e-11! 7.36509811e-12! 1.47112392e-11! 9.53505157e-12! 2.09424075e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.33190003e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23625000e+02! 1.50170000e+01! 3.15930000e+00! 9.63300000e+02! 3.02490000e+02! 4.59640000e-08! 8.21130000e-08! 2.39150000e-02! 9.15170000e-11! 1.64980000e-05! 5.38080000e-03! 1.37549999e-10! 6.98030023e-10! 5.70592074e-10! 3.46653470e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.10569998e-09! 0.00000000e+00! 2.09939392e-11! 9.43206017e-12! 5.09999959e-11! 4.84974734e-12! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.45740000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.23629200e+02! 1.53940000e+01! 3.03360000e+00! 9.60690000e+02! 3.02850000e+02! 4.42620000e-08! 7.93940000e-08! 2.34410000e-02! 8.51510000e-11! 8.63040000e-06! 2.97500000e-03! 5.20989973e-10! 7.11479986e-10! 5.56766078e-10! 3.21784162e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07849996e-09! 0.00000000e+00! 2.45957386e-11! 1.10502597e-11! 6.99999989e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27080003e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26262500e+02! 1.15550000e+01! 2.61880000e+00! 9.65570000e+02! 2.97770000e+02! 1.93910000e-08! 1.42800000e-07! 2.81060000e-02! 1.06820000e-11! 2.83540000e-07! 7.99460000e-04! 1.97759989e-10! 6.81460000e-10! 8.79183726e-10! 9.01727165e-11! 4.44885448e-11! 9.84077125e-11! 2.63840394e-10! 5.62784819e-11! 2.72510015e-10! 0.00000000e+00! 0.00000000e+00! 1.11159992e-09! 0.00000000e+00! 1.77067791e-10! 7.95521982e-11! 0.00000000e+00! 4.31243902e-10! 2.22932384e-11! 1.24618415e-11! 2.56627237e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26263200e+02! 1.14920000e+01! 2.61950000e+00! 9.65010000e+02! 2.97590000e+02! 1.82260000e-08! 1.43100000e-07! 2.81760000e-02! 1.66050000e-11! 2.92490000e-07! 8.28230000e-04! 2.57739996e-10! 7.04919956e-10! 1.03019993e-09! 1.15660002e-10! 2.29100003e-11! 3.70099992e-11! 2.00979997e-10! 2.91699997e-11! 3.33670008e-10! 2.77160006e-09! 0.00000000e+00! 1.11869991e-09! 3.49799981e-11! 1.93924488e-10! 8.71254943e-11! 1.70000004e-11! 3.18140014e-10! 2.41115791e-11! 1.31637531e-11! 2.67947661e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.53000007e-12! 4.67999988e-12! 6.18999990e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.91799987e-11! 4.42999977e-12! 2.27500007e-12! 2.27500007e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.26263900e+02! 1.14280000e+01! 2.62160000e+00! 9.65950000e+02! 2.97540000e+02! 1.65450000e-08! 1.44430000e-07! 2.86760000e-02! 4.64920000e-11! 3.03430000e-07! 8.61070000e-04! 4.23670016e-10! 7.23619997e-10! 8.87472151e-10! 9.16635934e-11! 4.57378441e-11! 1.01693709e-10! 2.71514422e-10! 5.79366000e-11! 5.15699983e-10! 0.00000000e+00! 0.00000000e+00! 1.12889997e-09! 0.00000000e+00! 2.23898081e-10! 1.00591896e-10! 0.00000000e+00! 4.42696463e-10! 2.95234913e-11! 1.52528511e-11! 3.01640518e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26264600e+02! 1.13650000e+01! 2.62250000e+00! 9.65820000e+02! 2.97190000e+02! 1.18910000e-08! 1.51600000e-07! 2.95820000e-02! 7.71360000e-11! 3.16990000e-07! 8.99600000e-04! 7.59909968e-10! 7.30669969e-10! 9.23931376e-10! 9.82216322e-11! 5.12332156e-11! 1.16148070e-10! 3.05270781e-10! 6.52302795e-11! 9.47409928e-10! 0.00000000e+00! 0.00000000e+00! 1.18679999e-09! 0.00000000e+00! 3.10838077e-10! 1.39651887e-10! 2.69999995e-11! 4.93073748e-10! 4.23586027e-11! 2.02074399e-11! 3.81547918e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26265300e+02! 1.13020000e+01! 2.62350000e+00! 9.65190000e+02! 2.97290000e+02! 1.25060000e-08! 1.56940000e-07! 2.93670000e-02! 6.58640000e-11! 3.31740000e-07! 9.38340000e-04! 6.65810018e-10! 7.06819991e-10! 9.51085100e-10! 1.03105864e-10! 5.53260077e-11! 1.26913244e-10! 3.30411504e-10! 7.06623995e-11! 9.45139966e-10! 0.00000000e+00! 0.00000000e+00! 1.20749999e-09! 0.00000000e+00! 3.31793371e-10! 1.49066592e-10! 4.09999985e-11! 5.30593236e-10! 4.22911185e-11! 2.01813895e-11! 3.81127768e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26266000e+02! 1.12380000e+01! 2.62400000e+00! 9.66980000e+02! 2.97340000e+02! 1.11970000e-08! 1.64550000e-07! 2.93900000e-02! 7.43050000e-11! 3.35830000e-07! 9.22650000e-04! 6.81940004e-10! 6.51070031e-10! 1.32419997e-09! 1.72469997e-10! 3.81399981e-11! 6.05999972e-11! 5.81200033e-10! 1.34660005e-10! 1.00379993e-09! 1.01230000e-07! 0.00000000e+00! 1.10260001e-09! 2.56580002e-09! 3.11217607e-10! 1.39822404e-10! 4.09999985e-11! 4.55059990e-10! 4.40351297e-11! 2.08546080e-11! 3.91985472e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.60000006e-12! 2.26600006e-11! 1.92299995e-11! 2.41999996e-12! 0.00000000e+00! 0.00000000e+00! 1.35810002e-10! 3.60600022e-11! 5.73199994e-11! 5.73199994e-11! 4.54399990e-11! 0.00000000e+00!
+ 2.26266700e+02! 1.11750000e+01! 2.62240000e+00! 9.68570000e+02! 2.97130000e+02! 1.17020000e-08! 1.63310000e-07! 2.92930000e-02! 5.28570000e-11! 3.43140000e-07! 9.51060000e-04! 6.09920003e-10! 6.12479956e-10! 1.32419997e-09! 1.72469997e-10! 3.81399981e-11! 6.05999972e-11! 5.81200033e-10! 1.34660005e-10! 8.55900018e-10! 1.01230000e-07! 0.00000000e+00! 1.11319998e-09! 2.56580002e-09! 2.75841294e-10! 1.23928687e-10! 2.59999990e-11! 4.55059990e-10! 3.96379353e-11! 1.91572105e-11! 3.64609905e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.60000006e-12! 2.26600006e-11! 1.92299995e-11! 2.41999996e-12! 0.00000000e+00! 0.00000000e+00! 1.35810002e-10! 3.60600022e-11! 5.73199994e-11! 5.73199994e-11! 4.54399990e-11! 0.00000000e+00!
+ 2.26281900e+02! 1.21690000e+01! 2.61720000e+00! 9.65640000e+02! 2.98210000e+02! 1.97530000e-08! 1.50160000e-07! 2.83270000e-02! 1.83790000e-11! 9.28060000e-07! 1.61640000e-03! 2.12039997e-10! 8.31260005e-10! 1.00490005e-09! 1.09829999e-10! 2.06900001e-11! 3.12299978e-11! 1.88940003e-10! 2.76200000e-11! 1.84609994e-10! 1.12090004e-09! 0.00000000e+00! 1.15580001e-09! 1.57659996e-10! 1.72603487e-10! 7.75464970e-11! 1.29999995e-11! 3.12399995e-10! 1.96798931e-11! 1.14530425e-11! 2.40357352e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.81000006e-12! 4.17999966e-12! 3.81999987e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.02099986e-11! 8.46999988e-12! 4.97500001e-12! 4.97500001e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.26282600e+02! 1.22340000e+01! 2.61670000e+00! 9.67410000e+02! 2.98390000e+02! 1.91530000e-08! 1.39930000e-07! 2.80740000e-02! 1.17930000e-11! 1.02550000e-06! 1.89480000e-03! 2.30880010e-10! 8.31439972e-10! 1.00490005e-09! 1.09829999e-10! 2.06900001e-11! 3.12299978e-11! 1.88940003e-10! 2.76200000e-11! 2.76620005e-10! 1.12090004e-09! 0.00000000e+00! 1.14220000e-09! 1.57659996e-10! 2.07158707e-10! 9.30713007e-11! 0.00000000e+00! 3.12399995e-10! 2.24154324e-11! 1.25090103e-11! 2.57387965e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.81000006e-12! 4.17999966e-12! 3.81999987e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.02099986e-11! 8.46999988e-12! 4.97500001e-12! 4.97500001e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.26283300e+02! 1.22990000e+01! 2.61560000e+00! 9.69200000e+02! 2.98290000e+02! 1.94410000e-08! 1.43820000e-07! 2.82310000e-02! 1.84510000e-11! 1.05060000e-06! 1.78740000e-03! 2.47970006e-10! 8.16979984e-10! 8.84370355e-10! 9.11056577e-11! 4.52703118e-11! 1.00463984e-10! 2.68642553e-10! 5.73160790e-11! 2.50510002e-10! 0.00000000e+00! 0.00000000e+00! 1.15349996e-09! 0.00000000e+00! 1.98299099e-10! 8.90909013e-11! 1.70000004e-11! 4.38410558e-10! 2.16391575e-11! 1.22093542e-11! 2.52555130e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26284000e+02! 1.23650000e+01! 2.61530000e+00! 9.68170000e+02! 2.98740000e+02! 2.00310000e-08! 1.48070000e-07! 2.76660000e-02! 2.06570000e-11! 1.08850000e-06! 1.73580000e-03! 1.91610006e-10! 7.81919973e-10! 9.05981512e-10! 9.49929163e-11! 4.85276819e-11! 1.09031770e-10! 2.88651547e-10! 6.16393880e-11! 2.21639998e-10! 0.00000000e+00! 0.00000000e+00! 1.15790000e-09! 0.00000000e+00! 2.07393297e-10! 9.31767025e-11! 0.00000000e+00! 4.68271533e-10! 2.07808284e-11! 1.18780229e-11! 2.47211435e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26284700e+02! 1.24310000e+01! 2.61750000e+00! 9.67890000e+02! 2.99290000e+02! 2.07420000e-08! 1.30410000e-07! 2.66940000e-02! 1.02370000e-11! 1.18400000e-06! 1.92570000e-03! 1.39499995e-10! 7.37080008e-10! 8.16180901e-10! 7.88402052e-11! 3.49923562e-11! 7.34300884e-11! 2.05508263e-10! 4.36747548e-11! 1.58429991e-10! 0.00000000e+00! 0.00000000e+00! 1.13159992e-09! 0.00000000e+00! 1.64095806e-10! 7.37242004e-11! 0.00000000e+00! 3.44190287e-10! 1.89015383e-11! 1.11525841e-11! 2.35511576e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26285400e+02! 1.24970000e+01! 2.61900000e+00! 9.70790000e+02! 2.99800000e+02! 2.02660000e-08! 1.29730000e-07! 2.66590000e-02! 4.70660000e-12! 1.31560000e-06! 2.20230000e-03! 1.71160003e-10! 6.89249990e-10! 8.12723167e-10! 7.82182374e-11! 3.44711759e-11! 7.20592475e-11! 2.02306824e-10! 4.29830234e-11! 1.30519998e-10! 0.00000000e+00! 0.00000000e+00! 1.15929999e-09! 0.00000000e+00! 1.44472198e-10! 6.49078014e-11! 0.00000000e+00! 3.39412498e-10! 1.80717507e-11! 1.08322700e-11! 2.30345569e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26286100e+02! 1.25640000e+01! 2.61740000e+00! 9.72390000e+02! 2.99500000e+02! 1.92440000e-08! 1.27780000e-07! 2.73370000e-02! 2.24230000e-11! 1.42980000e-06! 2.49500000e-03! 2.06110004e-10! 6.74330036e-10! 8.02807432e-10! 7.64346711e-11! 3.29766145e-11! 6.81281420e-11! 1.93126223e-10! 4.09993844e-11! 1.70839995e-10! 0.00000000e+00! 0.00000000e+00! 1.08059994e-09! 0.00000000e+00! 1.46417989e-10! 6.57819979e-11! 5.99999998e-12! 3.25711569e-10! 1.92705001e-11! 1.12950083e-11! 2.37808610e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26288200e+02! 1.27580000e+01! 2.62030000e+00! 9.68200000e+02! 2.99490000e+02! 1.99940000e-08! 1.28390000e-07! 2.70910000e-02! 1.59950000e-11! 1.62360000e-06! 2.45770000e-03! 8.98130043e-11! 6.72739975e-10! 8.05909228e-10! 7.69926067e-11! 3.34441468e-11! 6.93578736e-11! 1.95998107e-10! 4.16199124e-11! 1.31229999e-10! 0.00000000e+00! 0.00000000e+00! 1.28430000e-09! 0.00000000e+00! 1.47611687e-10! 6.63182981e-11! 6.99999997e-12! 3.29997502e-10! 1.80928588e-11! 1.08404188e-11! 2.30476992e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26288900e+02! 1.28210000e+01! 2.61980000e+00! 9.68230000e+02! 2.99540000e+02! 1.96800000e-08! 1.28960000e-07! 2.74670000e-02! 2.90030000e-11! 1.76270000e-06! 2.98430000e-03! 1.79130002e-10! 6.70750011e-10! 9.30650002e-10! 9.70500000e-11! 1.87999998e-11! 2.67999997e-11! 1.38630010e-10! 1.67299993e-11! 1.49700002e-10! 8.21969992e-10! 0.00000000e+00! 1.17159993e-09! 1.53179996e-10! 1.61942987e-10! 7.27569949e-11! 0.00000000e+00! 2.60960004e-10! 1.86419890e-11! 1.10523916e-11! 2.33895681e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.32000009e-12! 3.11999992e-12! 3.06999998e-12! 0.00000000e+00! 7.95000003e-12! 0.00000000e+00! 1.48100004e-11! 3.15000001e-12! 3.08999983e-12! 3.08999983e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.26289600e+02! 1.28850000e+01! 2.62040000e+00! 9.70770000e+02! 2.99170000e+02! 1.88380000e-08! 1.29200000e-07! 2.78070000e-02! 4.14340000e-11! 1.89770000e-06! 3.10910000e-03! 2.19669991e-10! 6.75070000e-10! 8.10028100e-10! 7.77334724e-11! 3.40649592e-11! 7.09907966e-11! 1.99811584e-10! 4.24438817e-11! 1.42380011e-10! 0.00000000e+00! 0.00000000e+00! 1.11970000e-09! 0.00000000e+00! 1.50309598e-10! 6.75303979e-11! 2.29999995e-11! 3.35688671e-10! 1.84243575e-11! 1.09683833e-11! 2.32540792e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26290300e+02! 1.29480000e+01! 2.61890000e+00! 9.68640000e+02! 2.99170000e+02! 1.87050000e-08! 1.30110000e-07! 2.78580000e-02! 4.38340000e-11! 1.98010000e-06! 3.13670000e-03! 3.43869988e-10! 6.92509994e-10! 8.14655399e-10! 7.85658066e-11! 3.47624221e-11! 7.28253083e-11! 2.04095865e-10! 4.33695788e-11! 1.61940003e-10! 0.00000000e+00! 0.00000000e+00! 1.19830001e-09! 0.00000000e+00! 1.32079792e-10! 5.93401994e-11! 2.29999995e-11! 3.42082418e-10! 1.90058941e-11! 1.11928669e-11! 2.36161247e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.26291000e+02! 1.30080000e+01! 2.62350000e+00! 9.66130000e+02! 2.99770000e+02! 2.02810000e-08! 1.26240000e-07! 2.75220000e-02! 2.69000000e-11! 1.93370000e-06! 2.81860000e-03! 2.47949994e-10! 7.28359983e-10! 7.94976585e-10! 7.50261103e-11! 3.17962982e-11! 6.50235837e-11! 1.85875898e-10! 3.94328216e-11! 1.95619992e-10! 0.00000000e+00! 0.00000000e+00! 1.20540000e-09! 0.00000000e+00! 1.45148393e-10! 6.52116000e-11! 0.00000000e+00! 3.14891363e-10! 2.00072302e-11! 1.15794006e-11! 2.42395253e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27270100e+02! 1.01540000e+01!-2.46330000e+00! 3.59360000e+02! 2.50450000e+02! 4.09770000e-08! 1.11690000e-07! 2.78010000e-03! 4.86410000e-10! 8.25850000e-07! 2.18390000e-03! 0.00000000e+00! 6.42379983e-10! 7.20990267e-10! 6.17179502e-11! 2.06445971e-11! 3.56915122e-11! 1.17374499e-10! 2.46318365e-11! 3.83330000e-11! 0.00000000e+00! 0.00000000e+00! 1.01550002e-09! 0.00000000e+00! 3.64037064e-11! 1.63552887e-11! 1.16999993e-10! 2.12661305e-10! 1.53309501e-11! 9.77427080e-12! 2.13282204e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.92039985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27270800e+02! 1.00640000e+01!-2.45590000e+00! 3.59480000e+02! 2.50430000e+02! 4.16290000e-08! 1.11420000e-07! 2.84730000e-03! 3.61910000e-10! 7.62800000e-07! 1.68520000e-03! 0.00000000e+00! 6.32439989e-10! 7.51800011e-10! 6.56299945e-11! 9.55000055e-12! 1.40699995e-11! 5.31699997e-11! 6.78000017e-12! 7.07780015e-11! 3.83390014e-10! 0.00000000e+00! 1.05260001e-09! 4.73799992e-11! 3.53307592e-11! 1.58732385e-11! 2.86999979e-10! 1.58999994e-10! 1.62955691e-11! 1.01466309e-11! 2.19287609e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76999994e-12! 0.00000000e+00! 3.03999989e-12! 0.00000000e+00! 3.32999990e-12! 5.43890002e-11! 8.41000013e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27271500e+02! 9.97520000e+00!-2.44840000e+00! 3.59460000e+02! 2.50540000e+02! 4.12180000e-08! 1.11710000e-07! 2.73590000e-03! 5.25480000e-10! 9.23550000e-07! 3.22260000e-03! 0.00000000e+00! 6.21099949e-10! 7.51800011e-10! 6.56299945e-11! 9.55000055e-12! 1.40699995e-11! 5.31699997e-11! 6.78000017e-12! 4.84070006e-11! 3.83390014e-10! 0.00000000e+00! 1.02919995e-09! 4.73799992e-11! 5.65413584e-11! 2.54026401e-11! 2.86999979e-10! 1.58999994e-10! 1.56304587e-11! 9.88988665e-12! 2.15146841e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76999994e-12! 0.00000000e+00! 3.03999989e-12! 0.00000000e+00! 3.32999990e-12! 3.92589988e-11! 8.41000013e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27272200e+02! 9.88770000e+00!-2.44150000e+00! 3.61140000e+02! 2.50920000e+02! 4.33200000e-08! 1.09810000e-07! 2.72460000e-03! 4.31680000e-10! 1.26780000e-06! 5.21040000e-03! 0.00000000e+00! 5.92490002e-10! 7.11430526e-10! 5.99984090e-11! 1.92036890e-11! 3.19015266e-11! 1.08523461e-10! 2.27194062e-11! 2.55999996e-11! 0.00000000e+00! 0.00000000e+00! 1.05340003e-09! 0.00000000e+00! 2.75999987e-11! 1.23999994e-11! 1.29999997e-10! 1.99452191e-10! 1.49523866e-11! 9.62813856e-12! 2.10925392e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07999998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27277100e+02! 1.02490000e+01!-2.61920000e+00! 3.92390000e+02! 2.54840000e+02! 4.48550000e-08! 1.05830000e-07! 3.80080000e-03! 1.98800000e-10! 8.13940000e-07! 1.89280000e-03! 0.00000000e+00! 7.48159978e-10! 6.91679991e-10! 5.62999994e-11! 7.76999992e-12! 1.12299996e-11! 2.69500013e-11! 4.84999974e-12! 1.22220003e-11! 4.06230022e-10! 0.00000000e+00! 9.33299993e-10! 5.27300009e-11! 1.96905305e-11! 8.84646956e-12! 2.93999991e-10! 1.37580003e-10! 1.45546474e-11! 9.47460339e-12! 2.08449178e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.46000008e-12! 0.00000000e+00! 2.81999988e-12! 0.00000000e+00! 0.00000000e+00! 2.56109994e-11! 5.58000000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27277800e+02! 1.03320000e+01!-2.63250000e+00! 3.92230000e+02! 2.55050000e+02! 4.50830000e-08! 1.05600000e-07! 3.85880000e-03! 1.84220000e-10! 8.25310000e-07! 1.76440000e-03! 0.00000000e+00! 7.48869966e-10! 6.91679991e-10! 5.62999994e-11! 7.76999992e-12! 1.12299996e-11! 2.69500013e-11! 4.84999974e-12! 0.00000000e+00! 4.06230022e-10! 0.00000000e+00! 9.81129955e-10! 5.27300009e-11! 3.37713607e-11! 1.51726392e-11! 5.14999987e-10! 1.37580003e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.46000008e-12! 0.00000000e+00! 2.81999988e-12! 0.00000000e+00! 0.00000000e+00! 4.23699999e-11! 5.58000000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27278500e+02! 1.04140000e+01!-2.64510000e+00! 3.92160000e+02! 2.55090000e+02! 4.52930000e-08! 1.05720000e-07! 3.81150000e-03! 1.69840000e-10! 9.40930000e-07! 1.72850000e-03! 0.00000000e+00! 7.61340047e-10! 6.90632995e-10! 5.62574917e-11! 1.60689500e-11! 2.36562905e-11! 8.92677460e-11! 1.85588524e-11! 5.77780011e-12! 0.00000000e+00! 0.00000000e+00! 1.00510000e-09! 0.00000000e+00! 2.76765885e-11! 1.24344094e-11! 0.00000000e+00! 1.70715359e-10! 1.43630550e-11! 9.40064606e-12! 2.07256400e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.75560001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27279200e+02! 1.04960000e+01!-2.65780000e+00! 3.92100000e+02! 2.55380000e+02! 4.55780000e-08! 1.05350000e-07! 3.74990000e-03! 1.63660000e-10! 9.53870000e-07! 1.74200000e-03! 0.00000000e+00! 7.80509990e-10! 6.88751611e-10! 5.59190715e-11! 1.57853678e-11! 2.29103889e-11! 8.75257783e-11! 1.81824729e-11! 9.94439947e-12! 0.00000000e+00! 0.00000000e+00! 1.00379993e-09! 0.00000000e+00! 1.68918907e-11! 7.58910990e-12! 3.30999977e-10! 1.68115702e-10! 1.44869325e-11! 9.44846458e-12! 2.08027606e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.55190009e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27279900e+02! 1.05780000e+01!-2.67050000e+00! 3.92150000e+02! 2.55680000e+02! 4.54040000e-08! 1.07030000e-07! 3.57520000e-03! 2.48020000e-10! 1.81660000e-06! 2.11910000e-03! 0.00000000e+00! 8.04299960e-10! 6.97294333e-10! 5.74556860e-11! 1.70729871e-11! 2.62971832e-11! 9.54352292e-11! 1.98914513e-11! 1.72000001e-11! 0.00000000e+00! 0.00000000e+00! 9.46200007e-10! 0.00000000e+00! 2.08379997e-11! 9.36199989e-12! 4.95999963e-10! 1.79919579e-10! 1.47026471e-11! 9.53173478e-12! 2.09370576e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.73999998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27280600e+02! 1.06590000e+01!-2.68320000e+00! 3.92160000e+02! 2.55830000e+02! 4.45630000e-08! 1.06010000e-07! 3.50210000e-03! 3.00240000e-10! 1.89780000e-06! 2.36460000e-03! 0.00000000e+00! 7.86770038e-10! 7.06789960e-10! 5.89499977e-11! 7.17999965e-12! 1.22899997e-11! 2.51500001e-11! 3.90999993e-12! 0.00000000e+00! 4.51200022e-10! 0.00000000e+00! 1.04630005e-09! 3.93400000e-11! 1.00049994e-11! 4.49499986e-12! 0.00000000e+00! 1.39639994e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.01000023e-12! 0.00000000e+00! 1.70000006e-12! 0.00000000e+00! 1.34000005e-12! 2.56299999e-11! 8.10999965e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27281200e+02! 1.07410000e+01!-2.69580000e+00! 3.92180000e+02! 2.55720000e+02! 4.52310000e-08! 1.04680000e-07! 3.54340000e-03! 2.89820000e-10! 1.98350000e-06! 2.53950000e-03! 0.00000000e+00! 7.15969950e-10! 7.06789960e-10! 5.89499977e-11! 7.17999965e-12! 1.22899997e-11! 2.51500001e-11! 3.90999993e-12! 2.13150001e-11! 4.51200022e-10! 0.00000000e+00! 1.01020003e-09! 3.93400000e-11! 2.24505275e-11! 1.00864690e-11! 2.86999979e-10! 1.39639994e-10! 1.48249902e-11! 9.57896176e-12! 2.10132259e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.01000023e-12! 0.00000000e+00! 1.70000006e-12! 0.00000000e+00! 1.34000005e-12! 4.63520021e-11! 8.10999965e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27286800e+02! 1.04780000e+01!-2.62090000e+00! 4.27500000e+02! 2.58820000e+02! 5.27970000e-08! 7.79070000e-08! 4.38390000e-03! 3.50570000e-11! 2.34470000e-06! 3.08050000e-03! 0.00000000e+00! 2.55440002e-10! 5.45429979e-10! 3.62599985e-11! 4.76000012e-12! 2.51000002e-12! 5.97999992e-12! 3.34999996e-12! 1.02259997e-11! 4.49519977e-10! 0.00000000e+00! 8.62939997e-10! 5.42400014e-11! 2.62979699e-12! 1.18150303e-12! 2.29000000e-10! 6.17799978e-11! 1.44953043e-11! 9.45169637e-12! 2.08079717e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.98999996e-12! 0.00000000e+00! 2.81999988e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.83000011e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27287500e+02! 1.03960000e+01!-2.62060000e+00! 4.27520000e+02! 2.58850000e+02! 5.84720000e-08! 7.53880000e-08! 2.68130000e-03! 3.66690000e-11! 2.39230000e-06! 2.97400000e-03! 0.00000000e+00! 2.28440003e-10! 5.36395706e-10! 2.85143281e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.59870000e-10! 0.00000000e+00! 1.16147699e-11! 5.21822993e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.43519996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27288200e+02! 1.03140000e+01!-2.62090000e+00! 4.27440000e+02! 2.58900000e+02! 5.50190000e-08! 7.43240000e-08! 3.50190000e-03! 2.63950000e-11! 2.54510000e-06! 3.39290000e-03! 0.00000000e+00! 2.29260000e-10! 5.30985311e-10! 2.75411395e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.68519994e-12! 0.00000000e+00! 0.00000000e+00! 7.50630003e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.66999997e-10! 0.00000000e+00! 1.42413789e-11! 9.35367669e-12! 2.06498863e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27288900e+02! 1.02330000e+01!-2.62110000e+00! 4.27510000e+02! 2.59040000e+02! 4.69160000e-08! 7.58860000e-08! 4.26570000e-03! 2.42110000e-11! 2.93180000e-06! 3.89890000e-03! 0.00000000e+00! 2.27699998e-10! 5.36359956e-10! 4.38599990e-11! 1.01499998e-11! 4.01000023e-12! 5.94999961e-12! 3.24000007e-12! 0.00000000e+00! 2.47679988e-10! 0.00000000e+00! 8.18000001e-10! 3.33899991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.50800031e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.65000001e-12! 0.00000000e+00! 2.82999991e-12! 0.00000000e+00! 0.00000000e+00! 1.99999999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27289600e+02! 1.01530000e+01!-2.62100000e+00! 4.27450000e+02! 2.59280000e+02! 4.64910000e-08! 7.62880000e-08! 4.28830000e-03! 2.61440000e-11! 2.67920000e-06! 3.79890000e-03! 0.00000000e+00! 2.21259996e-10! 5.36359956e-10! 4.38599990e-11! 1.01499998e-11! 4.01000023e-12! 5.94999961e-12! 3.24000007e-12! 2.18700006e-11! 2.47679988e-10! 0.00000000e+00! 8.80309992e-10! 3.33899991e-11! 2.37663600e-12! 1.06776404e-12! 2.19999990e-10! 5.50800031e-11! 1.48414909e-11! 9.58533079e-12! 2.10234972e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.65000001e-12! 0.00000000e+00! 2.82999991e-12! 0.00000000e+00! 0.00000000e+00! 7.22220027e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27290300e+02! 1.00740000e+01!-2.62050000e+00! 4.27420000e+02! 2.59350000e+02! 4.44700000e-08! 7.68010000e-08! 4.30420000e-03! 2.29000000e-11! 2.95390000e-06! 3.09680000e-03! 0.00000000e+00! 2.34749997e-10! 5.43580736e-10! 2.98067265e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.68300017e-11! 0.00000000e+00! 0.00000000e+00! 9.32659949e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09999995e-10! 0.00000000e+00! 1.55835726e-11! 9.87178828e-12! 2.14854939e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27291000e+02! 9.99450000e+00!-2.62010000e+00! 4.27740000e+02! 2.59110000e+02! 4.39340000e-08! 7.60560000e-08! 4.34590000e-03! 3.42710000e-11! 2.96140000e-06! 3.44800000e-03! 0.00000000e+00! 2.69079981e-10! 5.39792488e-10! 2.91253133e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.55299997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.37999986e-10! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.19199997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27297200e+02! 1.04830000e+01!-2.59290000e+00! 5.26710000e+02! 2.67420000e+02! 6.32370000e-08! 7.01190000e-08! 2.17830000e-03! 1.66820000e-11! 3.98610000e-06! 6.19590000e-03! 0.00000000e+00! 1.94179992e-10! 5.30750000e-10! 2.57900003e-11! 1.69000003e-12! 1.59999997e-12! 1.02100004e-11! 5.55000013e-12! 0.00000000e+00! 4.66210015e-10! 0.00000000e+00! 6.66819988e-10! 1.13440000e-10! 0.00000000e+00! 0.00000000e+00! 2.54999993e-10! 5.29900013e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.23000003e-12! 2.26999994e-12! 2.64000020e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.14000020e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27297900e+02! 1.05590000e+01!-2.60340000e+00! 5.26730000e+02! 2.67470000e+02! 6.50730000e-08! 6.83170000e-08! 1.75820000e-03! 1.27250000e-11! 3.83060000e-06! 5.57260000e-03! 0.00000000e+00! 1.94070010e-10! 5.30750000e-10! 2.57900003e-11! 1.69000003e-12! 1.59999997e-12! 1.02100004e-11! 5.55000013e-12! 3.51850005e-13! 4.66210015e-10! 0.00000000e+00! 5.80669957e-10! 1.13440000e-10! 0.00000000e+00! 0.00000000e+00! 1.98999997e-10! 5.29900013e-11! 1.42017370e-11! 9.33837382e-12! 2.06252064e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.23000003e-12! 2.26999994e-12! 2.64000020e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.14000020e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27298600e+02! 1.06350000e+01!-2.61440000e+00! 5.26830000e+02! 2.67280000e+02! 6.21740000e-08! 6.96430000e-08! 3.01080000e-03! 7.15000000e-12! 3.62000000e-06! 3.76990000e-03! 0.00000000e+00! 1.95740008e-10! 5.07182518e-10! 2.32596633e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.12960009e-12! 0.00000000e+00! 0.00000000e+00! 6.48479992e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.42843229e-11! 9.37025370e-12! 2.06766219e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27299300e+02! 1.07110000e+01!-2.62520000e+00! 5.26830000e+02! 2.67240000e+02! 5.99530000e-08! 7.11340000e-08! 3.72940000e-03! 6.51900000e-12! 3.25050000e-06! 3.29800000e-03! 0.00000000e+00! 1.94279995e-10! 5.14764231e-10! 2.46234075e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.07409911e-12! 0.00000000e+00! 0.00000000e+00! 6.72700007e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.98999997e-10! 0.00000000e+00! 1.44610574e-11! 9.43847691e-12! 2.07866519e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.53700012e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27307600e+02! 1.09030000e+01!-1.87390000e+00! 3.75920000e+02! 2.53730000e+02! 4.85420000e-08! 1.05240000e-07! 2.51230000e-03! 2.34430000e-10! 8.93700000e-06! 8.45690000e-03! 0.00000000e+00! 5.32460021e-10! 6.59319987e-10! 5.01799990e-11! 5.97999992e-12! 7.42000038e-12! 1.06699996e-11! 3.41000015e-12! 9.99999996e-12! 4.18689999e-10! 0.00000000e+00! 1.05300002e-09! 4.64999983e-11! 5.52000015e-13! 2.47999998e-13! 0.00000000e+00! 9.85799983e-11! 1.44885857e-11! 9.44910296e-12! 2.08037892e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.23000003e-12! 0.00000000e+00! 3.54999992e-12! 0.00000000e+00! 0.00000000e+00! 5.87999996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27308300e+02! 1.09050000e+01!-1.78620000e+00! 3.75810000e+02! 2.53770000e+02! 4.94630000e-08! 1.05010000e-07! 2.50300000e-03! 2.02150000e-10! 9.26270000e-06! 8.46500000e-03! 0.00000000e+00! 4.74079997e-10! 6.87022661e-10! 5.56080876e-11! 1.55247776e-11! 2.22249667e-11! 8.59250657e-11! 1.78366072e-11! 1.89999995e-11! 0.00000000e+00! 0.00000000e+00! 9.69250014e-10! 0.00000000e+00! 1.03499999e-12! 4.65000000e-13! 1.43999992e-10! 1.65726821e-10! 1.47561633e-11! 9.55239273e-12! 2.09703747e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.25000008e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27309000e+02! 1.09080000e+01!-1.69940000e+00! 3.75880000e+02! 2.53760000e+02! 4.94620000e-08! 1.04460000e-07! 2.52870000e-03! 1.41090000e-10! 9.60570000e-06! 8.47110000e-03! 0.00000000e+00! 3.95339983e-10! 6.84225954e-10! 5.51050351e-11! 1.51032364e-11! 2.11161939e-11! 8.33356648e-11! 1.72771190e-11! 3.81399981e-11! 0.00000000e+00! 0.00000000e+00! 9.91539961e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.61862454e-10! 1.53252116e-11! 9.77205643e-12! 2.13246486e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.81999942e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27309700e+02! 1.09110000e+01!-1.61290000e+00! 3.75880000e+02! 2.53820000e+02! 5.30970000e-08! 9.94370000e-08! 2.54250000e-03! 1.58840000e-10! 9.91460000e-06! 8.62060000e-03! 0.00000000e+00! 3.10790005e-10! 6.58684163e-10! 5.05107449e-11! 1.12534088e-11! 1.09900760e-11! 5.96873800e-11! 1.21674728e-11! 1.26669994e-11! 0.00000000e+00! 0.00000000e+00! 9.99429983e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.46999993e-10! 1.26570254e-10! 1.45678782e-11! 9.47971129e-12! 2.08531543e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.53700054e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27310400e+02! 1.09130000e+01!-1.52670000e+00! 3.75850000e+02! 2.53840000e+02! 5.66860000e-08! 9.09560000e-08! 2.40580000e-03! 1.07290000e-10! 1.04110000e-05! 8.67530000e-03! 0.00000000e+00! 2.29210012e-10! 6.15558549e-10! 4.27535993e-11! 4.75323036e-12! 0.00000000e+00! 1.97588283e-11! 3.54017596e-12! 5.50939979e-12! 0.00000000e+00! 0.00000000e+00! 9.42870004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.11000001e-10! 6.69817257e-11! 1.43550762e-11! 9.39756606e-12! 2.07206700e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23960000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27311100e+02! 1.09160000e+01!-1.44060000e+00! 3.75860000e+02! 2.53530000e+02! 5.85480000e-08! 8.33250000e-08! 2.47060000e-03! 1.05710000e-10! 1.09880000e-05! 8.80680000e-03! 0.00000000e+00! 1.79789988e-10! 5.61259983e-10! 3.67000007e-11! 2.72000001e-12! 2.83999994e-12! 6.94999960e-12! 3.49999999e-12! 2.62000005e-11! 4.41209985e-10! 0.00000000e+00! 8.48000004e-10! 1.63669994e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.31200039e-11! 1.49702247e-11! 9.63502542e-12! 2.11036431e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.89000030e-12! 0.00000000e+00! 3.32999990e-12! 0.00000000e+00! 0.00000000e+00! 2.26000000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27311800e+02! 1.09180000e+01!-1.35450000e+00! 3.75890000e+02! 2.53560000e+02! 5.98440000e-08! 7.84540000e-08! 2.40260000e-03! 1.22220000e-10! 1.12970000e-05! 8.82100000e-03! 0.00000000e+00! 1.70869999e-10! 5.61259983e-10! 3.67000007e-11! 2.72000001e-12! 2.83999994e-12! 6.94999960e-12! 3.49999999e-12! 9.59999983e-13! 4.41209985e-10! 0.00000000e+00! 8.01219979e-10! 1.63669994e-10! 0.00000000e+00! 0.00000000e+00! 2.57999982e-10! 8.31200039e-11! 1.42198180e-11! 9.34535435e-12! 2.06364630e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.89000030e-12! 0.00000000e+00! 3.32999990e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27313900e+02! 1.09250000e+01!-1.09560000e+00! 3.75780000e+02! 2.53760000e+02! 6.02790000e-08! 7.99600000e-08! 2.33360000e-03! 1.28140000e-10! 1.29400000e-05! 9.51810000e-03! 0.00000000e+00! 2.35309994e-10! 5.59644164e-10! 3.26961062e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.63999989e-10! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27314600e+02! 1.09270000e+01!-1.00870000e+00! 3.75710000e+02! 2.53830000e+02! 5.96640000e-08! 8.09970000e-08! 2.32680000e-03! 1.29270000e-10! 1.33590000e-05! 9.70130000e-03! 0.00000000e+00! 2.36440006e-10! 5.64917280e-10! 3.36446010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27315300e+02! 1.09290000e+01!-9.21410000e-01! 3.75750000e+02! 2.53840000e+02! 5.84450000e-08! 8.02310000e-08! 2.31500000e-03! 1.24080000e-10! 1.32940000e-05! 9.37750000e-03! 0.00000000e+00! 2.27159999e-10! 5.61022229e-10! 3.29439774e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.70830008e-11! 0.00000000e+00! 0.00000000e+00! 8.75249984e-10! 0.00000000e+00! 5.92247648e-12! 2.66082273e-12! 8.29999958e-11! 0.00000000e+00! 1.49964780e-11! 9.64515880e-12! 2.11199877e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.28329984e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27316000e+02! 1.09320000e+01!-8.33940000e-01! 3.75720000e+02! 2.53790000e+02! 5.87330000e-08! 8.01230000e-08! 2.33430000e-03! 1.22540000e-10! 1.33170000e-05! 9.10530000e-03! 0.00000000e+00! 2.23050009e-10! 5.60473001e-10! 3.28451953e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.10000012e-11! 0.00000000e+00! 0.00000000e+00! 7.97400035e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.72000006e-10! 0.00000000e+00! 1.51129335e-11! 9.69011330e-12! 2.11924887e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27316700e+02! 1.09340000e+01!-7.46500000e-01! 3.75690000e+02! 2.53710000e+02! 5.95620000e-08! 8.01140000e-08! 2.36490000e-03! 1.17140000e-10! 1.35750000e-05! 9.03730000e-03! 0.00000000e+00! 2.26789990e-10! 5.60427260e-10! 3.28369623e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.33519992e-11! 0.00000000e+00! 0.00000000e+00! 8.06810008e-10! 0.00000000e+00! 5.74997645e-12! 2.58332288e-12! 0.00000000e+00! 0.00000000e+00! 1.48855529e-11! 9.60233889e-12! 2.10509284e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.33330000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27317400e+02! 1.09360000e+01!-6.58930000e-01! 3.75940000e+02! 2.53710000e+02! 5.99650000e-08! 8.00090000e-08! 2.36650000e-03! 1.21120000e-10! 1.39820000e-05! 9.08350000e-03! 0.00000000e+00! 2.36900000e-10! 5.59893298e-10! 3.27409246e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.19299961e-10! 0.00000000e+00! 7.29605959e-12! 3.27793999e-12! 8.39999945e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27318100e+02! 1.09380000e+01!-5.71140000e-01! 3.75830000e+02! 2.53500000e+02! 5.86310000e-08! 7.84370000e-08! 2.39580000e-03! 1.25610000e-10! 1.47880000e-05! 9.43090000e-03! 0.00000000e+00! 2.62000005e-10! 5.51899804e-10! 3.13030955e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.07779991e-11! 0.00000000e+00! 0.00000000e+00! 8.74889994e-10! 0.00000000e+00! 1.14105305e-11! 5.12647000e-12! 2.15000004e-10! 0.00000000e+00! 1.48090255e-11! 9.57279828e-12! 2.10032842e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27319400e+02! 1.09420000e+01!-3.95810000e-01! 3.75930000e+02! 2.53670000e+02! 6.25980000e-08! 7.61430000e-08! 2.40450000e-03! 1.50890000e-10! 1.58330000e-05! 9.61950000e-03! 0.00000000e+00! 2.60999999e-10! 5.40234857e-10! 2.92048885e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.65189988e-11! 0.00000000e+00! 0.00000000e+00! 7.81889997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.89999957e-11! 0.00000000e+00! 1.49797102e-11! 9.63868655e-12! 2.11095481e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.47219997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27320100e+02! 1.09450000e+01!-3.08250000e-01! 3.75730000e+02! 2.53660000e+02! 6.11700000e-08! 7.67690000e-08! 2.13590000e-03! 1.31900000e-10! 1.63150000e-05! 9.58200000e-03! 0.00000000e+00! 2.27929994e-10! 5.43418033e-10! 2.97774583e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.80000008e-11! 0.00000000e+00! 0.00000000e+00! 7.77000020e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.63000011e-10! 0.00000000e+00! 1.47264319e-11! 9.54091667e-12! 2.09518652e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.99999996e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27320800e+02! 1.09470000e+01!-2.20840000e-01! 3.75680000e+02! 2.53540000e+02! 6.32710000e-08! 7.61260000e-08! 1.91960000e-03! 1.31100000e-10! 1.74430000e-05! 9.98490000e-03! 0.00000000e+00! 1.99360001e-10! 5.40148370e-10! 2.91893384e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.84349974e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27321500e+02! 1.09490000e+01!-1.33610000e-01! 3.75660000e+02! 2.53470000e+02! 6.31380000e-08! 7.64890000e-08! 1.86960000e-03! 1.22920000e-10! 1.76130000e-05! 1.00610000e-02! 0.00000000e+00! 1.83949994e-10! 5.41994283e-10! 2.95213576e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.10169978e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.29270000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27326400e+02! 1.09640000e+01! 4.74810000e-01! 4.27470000e+02! 2.59640000e+02! 6.52860000e-08! 7.18880000e-08! 9.44400000e-04! 4.80070000e-11! 2.01820000e-05! 9.88750000e-03! 0.00000000e+00! 1.99670003e-10! 5.18598275e-10! 2.53130537e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.30020036e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.51849972e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27327100e+02! 1.09660000e+01! 5.58280000e-01! 4.27540000e+02! 2.59530000e+02! 6.65110000e-08! 7.25140000e-08! 1.29360000e-03! 4.01610000e-11! 2.15990000e-05! 1.03420000e-02! 0.00000000e+00! 2.32429992e-10! 5.21781507e-10! 2.58856235e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.38710006e-12! 0.00000000e+00! 0.00000000e+00! 6.32060015e-10! 0.00000000e+00! 2.98259377e-12! 1.34000591e-12! 3.91999988e-10! 0.00000000e+00! 1.42919782e-11! 9.37320881e-12! 2.06813872e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27327800e+02! 1.09670000e+01! 6.41180000e-01! 4.27500000e+02! 2.59180000e+02! 5.59160000e-08! 7.50240000e-08! 3.63000000e-03! 5.00260000e-11! 2.21150000e-05! 1.02530000e-02! 0.00000000e+00! 2.87700003e-10! 5.34544742e-10! 2.81813947e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27328500e+02! 1.09690000e+01! 7.23920000e-01! 4.27450000e+02! 2.59400000e+02! 6.15850000e-08! 7.44280000e-08! 2.19440000e-03! 4.51500000e-11! 2.31720000e-05! 1.06330000e-02! 0.00000000e+00! 3.17890020e-10! 5.31514111e-10! 2.76362631e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.89999932e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27329200e+02! 1.09710000e+01! 8.06470000e-01! 4.27470000e+02! 2.59340000e+02! 6.06280000e-08! 7.47170000e-08! 2.54690000e-03! 5.88950000e-11! 2.42210000e-05! 1.08140000e-02! 0.00000000e+00! 2.95750008e-10! 5.32983713e-10! 2.79005985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.13329996e-11! 0.00000000e+00! 0.00000000e+00! 7.90669974e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.82000007e-10! 0.00000000e+00! 1.48255245e-11! 9.57916819e-12! 2.10135572e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.66669998e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27329900e+02! 1.09730000e+01! 8.88920000e-01! 4.27460000e+02! 2.59450000e+02! 5.96060000e-08! 7.50360000e-08! 2.58420000e-03! 5.47570000e-11! 2.48680000e-05! 1.07900000e-02! 0.00000000e+00! 2.71660000e-10! 5.34605749e-10! 2.81923720e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.24939997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.82000007e-10! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.19629982e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27330600e+02! 1.09750000e+01! 9.71420000e-01! 4.27470000e+02! 2.59510000e+02! 6.30350000e-08! 7.45680000e-08! 2.52110000e-03! 5.25150000e-11! 2.58860000e-05! 1.08440000e-02! 0.00000000e+00! 2.73609996e-10! 5.32225986e-10! 2.77643152e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.74069980e-13! 0.00000000e+00! 0.00000000e+00! 7.12630011e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.80999993e-10! 0.00000000e+00! 1.42083446e-11! 9.34092387e-12! 2.06293194e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.05560003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27345100e+02! 1.12760000e+01! 2.34970000e+00! 9.46710000e+02! 2.95460000e+02! 2.59270000e-08! 1.17690000e-07! 2.35070000e-02! 3.35540000e-11! 1.35770000e-05! 5.67680000e-03! 0.00000000e+00! 8.20260027e-10! 7.51500084e-10! 6.72058589e-11! 2.52432363e-11! 4.77872117e-11! 1.45622514e-10! 3.07353379e-11! 1.71880010e-10! 0.00000000e+00! 0.00000000e+00! 1.11510001e-09! 0.00000000e+00! 1.60804495e-10! 7.22455012e-11! 4.09999985e-11! 2.54818028e-10! 1.93014198e-11! 1.13069450e-11! 2.38001095e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20499999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27345800e+02! 1.13270000e+01! 2.39770000e+00! 9.46860000e+02! 2.95650000e+02! 2.68750000e-08! 1.14700000e-07! 2.30270000e-02! 2.43440000e-11! 1.39660000e-05! 5.68370000e-03! 0.00000000e+00! 8.17979962e-10! 7.36296024e-10! 6.44710466e-11! 2.29515816e-11! 4.17595229e-11! 1.31545580e-10! 2.76937587e-11! 8.59069968e-11! 0.00000000e+00! 0.00000000e+00! 1.02010000e-09! 0.00000000e+00! 1.62419092e-10! 7.29709002e-11! 3.29999986e-11! 2.33809916e-10! 1.67453672e-11! 1.03202620e-11! 2.22087921e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.97959962e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27346500e+02! 1.13780000e+01! 2.44660000e+00! 9.47040000e+02! 2.95670000e+02! 2.83020000e-08! 1.12490000e-07! 2.26940000e-02! 2.45980000e-11! 1.40880000e-05! 5.66570000e-03! 0.00000000e+00! 8.22440005e-10! 7.25058236e-10! 6.24496704e-11! 2.12577490e-11! 3.73042708e-11! 1.21140903e-10! 2.54456369e-11! 6.53700011e-11! 0.00000000e+00! 0.00000000e+00! 1.04530007e-09! 0.00000000e+00! 1.68118491e-10! 7.55314977e-11! 0.00000000e+00! 2.18282198e-10! 1.61347845e-11! 1.00845660e-11! 2.18286604e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.74260031e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27347200e+02! 1.14290000e+01! 2.49490000e+00! 9.47390000e+02! 2.95310000e+02! 2.68870000e-08! 1.13120000e-07! 2.33630000e-02! 2.82540000e-11! 1.39040000e-05! 5.51630000e-03! 0.00000000e+00! 8.62459992e-10! 7.28261784e-10! 6.30259039e-11! 2.17406058e-11! 3.85743174e-11! 1.24106947e-10! 2.60865045e-11! 1.82109994e-10! 0.00000000e+00! 0.00000000e+00! 1.02190001e-09! 0.00000000e+00! 1.55891688e-10! 7.00382946e-11! 4.19999972e-11! 2.22708643e-10! 1.96055654e-11! 1.14243510e-11! 2.39894615e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.14440027e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27347900e+02! 1.14740000e+01! 2.54690000e+00! 9.47460000e+02! 2.95000000e+02! 2.51130000e-08! 1.14100000e-07! 2.38830000e-02! 3.14020000e-11! 1.40420000e-05! 5.44240000e-03! 0.00000000e+00! 9.05179987e-10! 7.33245076e-10! 6.39222633e-11! 2.24917186e-11! 4.05499488e-11! 1.28720784e-10! 2.70834084e-11! 2.10959999e-10! 0.00000000e+00! 0.00000000e+00! 9.76089987e-10! 0.00000000e+00! 1.65227401e-10! 7.42325992e-11! 0.00000000e+00! 2.29594246e-10! 2.04633029e-11! 1.17554534e-11! 2.45234614e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.62409935e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27348600e+02! 1.15260000e+01! 2.58880000e+00! 9.47460000e+02! 2.95740000e+02! 2.77010000e-08! 1.15060000e-07! 2.26870000e-02! 2.41790000e-11! 1.41690000e-05! 5.43600000e-03! 0.00000000e+00! 9.13669973e-10! 7.38126671e-10! 6.48003248e-11! 2.32274980e-11! 4.24852653e-11! 1.33240460e-10! 2.80599693e-11! 7.49810006e-11! 0.00000000e+00! 0.00000000e+00! 1.02809994e-09! 0.00000000e+00! 1.53676794e-10! 6.90432017e-11! 3.70000003e-11! 2.36339337e-10! 1.64205281e-11! 1.01948684e-11! 2.20065563e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.77589973e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27349300e+02! 1.15900000e+01! 2.60150000e+00! 9.47120000e+02! 2.96240000e+02! 2.91750000e-08! 1.11740000e-07! 2.17370000e-02! 2.43840000e-11! 1.37670000e-05! 5.22170000e-03! 0.00000000e+00! 9.07520004e-10! 7.21244509e-10! 6.17636844e-11! 2.06829189e-11! 3.57923101e-11! 1.17609894e-10! 2.46826986e-11! 3.87999979e-11! 0.00000000e+00! 0.00000000e+00! 1.13359999e-09! 0.00000000e+00! 1.80504001e-10! 8.10959980e-11! 3.49999994e-11! 2.13012608e-10! 1.53448348e-11! 9.77963023e-12! 2.13368646e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.74000006e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27350000e+02! 1.16570000e+01! 2.60050000e+00! 9.46990000e+02! 2.96450000e+02! 3.02160000e-08! 1.07030000e-07! 2.09440000e-02! 2.27500000e-11! 1.41910000e-05! 5.45950000e-03! 0.00000000e+00! 9.09460007e-10! 6.97294333e-10! 5.74556860e-11! 1.70729871e-11! 2.62971832e-11! 9.54352292e-11! 1.98914513e-11! 2.22220003e-11! 0.00000000e+00! 0.00000000e+00! 1.09030007e-09! 0.00000000e+00! 1.35750605e-10! 6.09894010e-11! 3.49999994e-11! 1.79919579e-10! 1.48519565e-11! 9.58937096e-12! 2.10300128e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.66300011e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27350700e+02! 1.17230000e+01! 2.60290000e+00! 9.47030000e+02! 2.96870000e+02! 3.03970000e-08! 1.05590000e-07! 2.08600000e-02! 2.60730000e-11! 1.44690000e-05! 5.49520000e-03! 0.00000000e+00! 8.99819996e-10! 7.82169995e-10! 7.45699960e-11! 1.41800001e-11! 2.24000003e-11! 1.02139998e-10! 1.08900007e-11! 6.51220007e-12! 6.71570022e-10! 0.00000000e+00! 9.98540028e-10! 1.35049999e-10! 1.48839899e-10! 6.68700997e-11! 3.09999977e-11! 1.89539995e-10! 1.43848891e-11! 9.40907508e-12! 2.07392315e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.09999986e-12! 2.23000004e-12! 2.45000006e-12! 0.00000000e+00! 4.88000005e-12! 6.63170005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27351400e+02! 1.17900000e+01! 2.60420000e+00! 9.47050000e+02! 2.96790000e+02! 3.00730000e-08! 1.07130000e-07! 2.08500000e-02! 2.64590000e-11! 1.48250000e-05! 5.57090000e-03! 0.00000000e+00! 8.74080031e-10! 7.82169995e-10! 7.45699960e-11! 1.41800001e-11! 2.24000003e-11! 1.02139998e-10! 1.08900007e-11! 2.71480009e-11! 6.71570022e-10! 0.00000000e+00! 1.07940001e-09! 1.35049999e-10! 1.37806794e-10! 6.19131968e-11! 3.09999977e-11! 1.89539995e-10! 1.49984105e-11! 9.64590473e-12! 2.11211916e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.09999986e-12! 2.23000004e-12! 2.45000006e-12! 0.00000000e+00! 4.88000005e-12! 6.84069953e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27352100e+02! 1.18570000e+01! 2.60420000e+00! 9.47200000e+02! 2.97060000e+02! 3.08280000e-08! 1.05070000e-07! 2.05850000e-02! 2.96030000e-11! 1.49230000e-05! 5.58460000e-03! 0.00000000e+00! 8.66849981e-10! 6.87327750e-10! 5.56629708e-11! 1.55707652e-11! 2.23459220e-11! 8.62075411e-11! 1.78976417e-11! 2.22219985e-12! 0.00000000e+00! 0.00000000e+00! 1.05450004e-09! 0.00000000e+00! 1.18438495e-10! 5.32114977e-11! 3.09999977e-11! 1.66148387e-10! 1.42573444e-11! 9.35983929e-12! 2.06598263e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.99440012e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27352800e+02! 1.19240000e+01! 2.60540000e+00! 9.47240000e+02! 2.97310000e+02! 3.14970000e-08! 1.02800000e-07! 1.97610000e-02! 3.11260000e-11! 1.49560000e-05! 5.37930000e-03! 0.00000000e+00! 8.68019989e-10! 6.75784928e-10! 5.35867149e-11! 1.38309459e-11! 1.77697163e-11! 7.55203886e-11! 1.55884836e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.04840003e-09! 0.00000000e+00! 9.03899941e-11! 4.06099980e-11! 2.59999990e-11! 1.50199089e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.31999991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27353500e+02! 1.19900000e+01! 2.60570000e+00! 9.47250000e+02! 2.97440000e+02! 3.20000000e-08! 1.01830000e-07! 1.98260000e-02! 3.09660000e-11! 1.49490000e-05! 5.41620000e-03! 0.00000000e+00! 8.02719946e-10! 7.48759998e-10! 6.79800036e-11! 1.30299998e-11! 1.88400007e-11! 7.07300052e-11! 9.11999989e-12! 4.30000003e-12! 6.41609987e-10! 0.00000000e+00! 1.03240005e-09! 1.71729991e-10! 9.84767962e-11! 4.42431994e-11! 2.89999986e-11! 1.61940003e-10! 1.43191197e-11! 9.38368567e-12! 2.06982868e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.69999994e-12! 0.00000000e+00! 2.22000001e-12! 0.00000000e+00! 2.24000007e-12! 4.21109987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27354200e+02! 1.20560000e+01! 2.60590000e+00! 9.48150000e+02! 2.97820000e+02! 3.57070000e-08! 9.91110000e-08! 1.81070000e-02! 2.90230000e-11! 1.30100000e-05! 4.45350000e-03! 0.00000000e+00! 6.56669996e-10! 7.48759998e-10! 6.79800036e-11! 1.30299998e-11! 1.88400007e-11! 7.07300052e-11! 9.11999989e-12! 4.30000003e-12! 6.41609987e-10! 0.00000000e+00! 9.76299930e-10! 1.71729991e-10! 3.32987075e-11! 1.49602900e-11! 2.89999986e-11! 1.61940003e-10! 1.43191197e-11! 9.38368567e-12! 2.06982868e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.69999994e-12! 0.00000000e+00! 2.22000001e-12! 0.00000000e+00! 2.24000007e-12! 2.25189988e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27354900e+02! 1.21240000e+01! 2.60470000e+00! 9.60580000e+02! 2.96470000e+02! 4.14610000e-08! 8.56270000e-08! 1.87530000e-02! 3.07690000e-11! 1.07700000e-05! 3.34100000e-03! 0.00000000e+00! 5.13619980e-10! 5.88460669e-10! 3.78794288e-11! 6.68872130e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.94070003e-11! 0.00000000e+00! 0.00000000e+00! 8.47809989e-10! 0.00000000e+00! 1.94221202e-11! 8.72588026e-12! 0.00000000e+00! 2.95395340e-11! 1.47682630e-11! 9.55706434e-12! 2.09779086e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.25000001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27355600e+02! 1.21920000e+01! 2.60100000e+00! 9.66940000e+02! 2.95530000e+02! 3.22470000e-08! 8.47690000e-08! 2.23430000e-02! 2.81890000e-11! 1.03440000e-05! 3.13490000e-03! 0.00000000e+00! 4.27980013e-10! 5.84097770e-10! 3.70946572e-11! 1.12666241e-14! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.45869997e-10! 0.00000000e+00! 0.00000000e+00! 7.78999976e-10! 0.00000000e+00! 4.84407583e-11! 2.17632405e-11! 2.39999999e-11! 2.35111219e-11! 1.85281200e-11! 1.10084372e-11! 2.33186786e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.57960016e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.27357600e+02! 1.23890000e+01! 2.58810000e+00! 9.67910000e+02! 2.95430000e+02! 2.90230000e-08! 9.10830000e-08! 2.32690000e-02! 4.66640000e-11! 1.29690000e-05! 4.53480000e-03! 0.00000000e+00! 4.09970002e-10! 6.16204310e-10! 4.28697598e-11! 4.85056873e-12! 0.00000000e+00! 2.03567441e-11! 3.66936646e-12! 1.57429986e-10! 0.00000000e+00! 0.00000000e+00! 8.05630007e-10! 0.00000000e+00! 4.33292395e-11! 1.94667598e-11! 2.50000003e-11! 6.78740467e-11! 1.88718069e-11! 1.11411063e-11! 2.35326481e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.14629997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28609700e+02! 1.33710000e+01! 7.04990000e-01! 6.96690000e+02! 2.84280000e+02! 3.24020000e-08! 8.43460000e-08! 1.05870000e-02! 5.34820000e-11! 5.39960000e-05! 1.00510000e-02! 0.00000000e+00! 0.00000000e+00! 5.81946824e-10! 3.67077618e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.99999998e-13! 0.00000000e+00! 0.00000000e+00! 1.07150000e-09! 0.00000000e+00! 1.70774991e-11! 7.67249979e-12! 9.99999909e-12! 2.05390739e-11! 1.42061423e-11! 9.34007472e-12! 2.06279490e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28610400e+02! 1.33630000e+01! 6.25820000e-01! 6.96570000e+02! 2.84310000e+02! 3.31620000e-08! 8.33710000e-08! 1.04110000e-02! 4.83000000e-11! 5.37310000e-05! 1.00090000e-02! 0.00000000e+00! 0.00000000e+00! 5.76989012e-10! 3.58159787e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07959995e-11! 0.00000000e+00! 0.00000000e+00! 9.77409931e-10! 0.00000000e+00! 3.94286708e-13! 1.77143307e-13! 0.00000000e+00! 1.36886058e-11! 1.45122508e-11! 9.45823888e-12! 2.08185240e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.55709984e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28613900e+02! 1.33320000e+01! 2.29430000e-01! 6.96590000e+02! 2.85110000e+02! 3.58910000e-08! 7.82610000e-08! 8.78680000e-03! 4.50250000e-11! 5.17380000e-05! 9.91380000e-03! 0.00000000e+00! 0.00000000e+00! 5.51004797e-10! 3.11421167e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.95820029e-10! 0.00000000e+00! 5.91233356e-12! 2.65626583e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.24309998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28614600e+02! 1.33260000e+01! 1.48520000e-01! 6.96640000e+02! 2.84960000e+02! 3.51880000e-08! 7.93490000e-08! 9.18360000e-03! 2.72330000e-11! 5.19450000e-05! 1.00620000e-02! 0.00000000e+00! 0.00000000e+00! 5.56537205e-10! 3.21372581e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02830000e-09! 0.00000000e+00! 4.53426576e-12! 2.03713392e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28615300e+02! 1.33190000e+01! 6.82490000e-02! 6.96690000e+02! 2.84990000e+02! 3.51750000e-08! 7.89560000e-08! 9.08870000e-03! 4.78980000e-11! 5.00080000e-05! 9.66390000e-03! 0.00000000e+00! 0.00000000e+00! 5.54538859e-10! 3.17777991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.05879929e-12! 0.00000000e+00! 0.00000000e+00! 8.95330032e-10! 0.00000000e+00! 7.90119012e-12! 3.54980997e-12! 2.09999986e-11! 0.00000000e+00! 1.44308723e-11! 9.42682477e-12! 2.07678579e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.59410003e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28616000e+02! 1.33100000e+01!-1.13650000e-02! 6.96770000e+02! 2.85240000e+02! 3.62580000e-08! 7.76420000e-08! 8.52120000e-03! 2.18610000e-11! 4.78560000e-05! 9.30300000e-03! 0.00000000e+00! 0.00000000e+00! 5.47857260e-10! 3.05759480e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.83999993e-10! 0.00000000e+00! 6.89999967e-12! 3.09999986e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.00000007e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28616700e+02! 1.33010000e+01!-9.07240000e-02! 6.96660000e+02! 2.85230000e+02! 3.64830000e-08! 7.79120000e-08! 8.91730000e-03! 1.93920000e-11! 4.93730000e-05! 9.71900000e-03! 0.00000000e+00! 0.00000000e+00! 5.49230161e-10! 3.08229033e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.05430009e-09! 0.00000000e+00! 1.92434089e-11! 8.64558945e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.44440015e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28617400e+02! 1.32900000e+01!-1.70100000e-01! 6.96690000e+02! 2.84740000e+02! 3.57230000e-08! 7.94850000e-08! 1.01050000e-02! 3.07670000e-11! 4.92620000e-05! 9.71830000e-03! 0.00000000e+00! 0.00000000e+00! 5.57228819e-10! 3.22616517e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.46329997e-11! 0.00000000e+00! 0.00000000e+00! 1.01650000e-09! 0.00000000e+00! 3.36830390e-11! 1.51329609e-11! 3.09999977e-11! 0.00000000e+00! 1.46263279e-11! 9.50227484e-12! 2.08895436e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.63270003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28618100e+02! 1.32440000e+01!-2.13840000e-01! 6.96220000e+02! 2.84650000e+02! 3.56200000e-08! 8.16030000e-08! 1.03950000e-02! 3.14560000e-11! 5.11080000e-05! 9.69580000e-03! 0.00000000e+00! 0.00000000e+00! 5.67998759e-10! 3.41988798e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23080008e-12! 0.00000000e+00! 0.00000000e+00! 1.02080000e-09! 0.00000000e+00! 6.76731284e-12! 3.04038695e-12! 0.00000000e+00! 1.26642598e-12! 1.42278689e-11! 9.34846211e-12! 2.06414764e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.61920000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28620800e+02! 1.33340000e+01!-3.56440000e-02! 6.96740000e+02! 2.85340000e+02! 3.64850000e-08! 7.64110000e-08! 8.43150000e-03! 9.33930000e-12! 4.35930000e-05! 8.97370000e-03! 0.00000000e+00! 0.00000000e+00! 5.41597600e-10! 2.94500153e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.64489980e-10! 0.00000000e+00! 7.58999981e-12! 3.40999993e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.83670001e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28622200e+02! 1.33580000e+01!-1.78750000e-01! 6.96550000e+02! 2.84580000e+02! 3.62550000e-08! 8.09460000e-08! 1.15270000e-02! 3.19680000e-13! 4.60800000e-05! 9.68600000e-03! 0.00000000e+00! 0.00000000e+00! 5.64657932e-10! 3.35979543e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.72219971e-10! 0.00000000e+00! 1.63205699e-11! 7.33242980e-12! 3.40000007e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.92859999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28622900e+02! 1.33520000e+01!-2.58460000e-01! 6.96740000e+02! 2.84620000e+02! 3.58510000e-08! 8.23470000e-08! 1.11860000e-02! 1.42310000e-11! 4.57510000e-05! 9.70510000e-03! 0.00000000e+00! 0.00000000e+00! 5.71781955e-10! 3.48793737e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.49630041e-10! 0.00000000e+00! 5.36074787e-12! 2.40845191e-12! 0.00000000e+00! 6.49385927e-12! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.98080004e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28623600e+02! 1.33460000e+01!-3.37200000e-01! 6.96710000e+02! 2.84700000e+02! 3.45530000e-08! 8.10580000e-08! 1.06700000e-02! 2.40930000e-11! 4.55510000e-05! 9.82900000e-03! 0.00000000e+00! 0.00000000e+00! 5.65227476e-10! 3.37003932e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.68059966e-10! 0.00000000e+00! 7.70246974e-12! 3.46053004e-12! 1.29999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.35509997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28625700e+02! 1.33270000e+01!-5.73120000e-01! 6.96470000e+02! 2.85200000e+02! 3.47630000e-08! 7.99080000e-08! 9.52420000e-03! 7.63110000e-12! 4.08010000e-05! 8.95320000e-03! 0.00000000e+00! 0.00000000e+00! 5.59379765e-10! 3.26485436e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.26000032e-12! 0.00000000e+00! 0.00000000e+00! 9.73700010e-10! 0.00000000e+00! 4.70579999e-12! 2.11420009e-12! 0.00000000e+00! 0.00000000e+00! 1.44368536e-11! 9.42913369e-12! 2.07715841e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.40600006e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28626400e+02! 1.33210000e+01!-6.53720000e-01! 6.96490000e+02! 2.85370000e+02! 3.47080000e-08! 8.09430000e-08! 9.75870000e-03! 5.58200000e-12! 3.78940000e-05! 8.16110000e-03! 0.00000000e+00! 0.00000000e+00! 5.64642721e-10! 3.35952065e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02399998e-11! 0.00000000e+00! 0.00000000e+00! 8.81520024e-10! 0.00000000e+00! 6.83099931e-12! 3.06899970e-12! 0.00000000e+00! 0.00000000e+00! 1.44957206e-11! 9.45185770e-12! 2.08082319e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.58000000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28627100e+02! 1.33150000e+01!-7.34260000e-01! 6.96580000e+02! 2.85420000e+02! 3.43120000e-08! 8.21240000e-08! 1.02020000e-02! 1.64840000e-11! 4.16960000e-05! 9.44010000e-03! 0.00000000e+00! 0.00000000e+00! 5.40050005e-10! 3.53900000e-11! 9.22000063e-12! 4.30000003e-12! 7.99000015e-12! 4.84999974e-12! 0.00000000e+00! 1.60169999e-09! 0.00000000e+00! 9.25119981e-10! 6.64199945e-11! 6.54119944e-12! 2.93879981e-12! 9.99999909e-12! 7.31099972e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.48000014e-12! 0.00000000e+00! 4.11000010e-12! 0.00000000e+00! 0.00000000e+00! 1.00200005e-11! 2.95000005e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28627800e+02! 1.33090000e+01!-8.14810000e-01! 6.96580000e+02! 2.85350000e+02! 3.41410000e-08! 8.29850000e-08! 1.04400000e-02! 1.85520000e-11! 3.88710000e-05! 8.91060000e-03! 0.00000000e+00! 0.00000000e+00! 5.40050005e-10! 3.53900000e-11! 9.22000063e-12! 4.30000003e-12! 7.99000015e-12! 4.84999974e-12! 2.06200005e-11! 1.60169999e-09! 0.00000000e+00! 1.08240006e-09! 6.64199945e-11! 3.96059964e-12! 1.77939987e-12! 0.00000000e+00! 7.31099972e-11! 1.48043262e-11! 9.57098463e-12! 2.10003612e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.48000014e-12! 0.00000000e+00! 4.11000010e-12! 0.00000000e+00! 0.00000000e+00! 1.33199996e-11! 2.95000005e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28628500e+02! 1.33020000e+01!-8.95140000e-01! 6.96680000e+02! 2.85370000e+02! 3.47480000e-08! 8.22940000e-08! 1.04790000e-02! 1.82130000e-11! 3.12320000e-05! 6.78500000e-03! 0.00000000e+00! 0.00000000e+00! 5.71512504e-10! 3.48309021e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.53270001e-11! 0.00000000e+00! 0.00000000e+00! 9.94489935e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.12147529e-12! 1.46469607e-11! 9.51023895e-12! 2.09023892e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28629200e+02! 1.32960000e+01!-9.75320000e-01! 6.96720000e+02! 2.85620000e+02! 3.42750000e-08! 8.37230000e-08! 1.06890000e-02! 2.31480000e-11! 2.73760000e-05! 5.88920000e-03! 0.00000000e+00! 0.00000000e+00! 5.78778914e-10! 3.61379364e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.04409992e-09! 0.00000000e+00! 8.44214976e-12! 3.79284971e-12! 1.59999999e-11! 1.61618011e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.40390000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28629900e+02! 1.32900000e+01!-1.05530000e+00! 6.96670000e+02! 2.85520000e+02! 3.44650000e-08! 8.28290000e-08! 1.05850000e-02! 3.13840000e-11! 2.48780000e-05! 5.42740000e-03! 0.00000000e+00! 0.00000000e+00! 5.74232994e-10! 3.53202398e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.57959999e-11! 0.00000000e+00! 0.00000000e+00! 9.94489935e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.20000000e-11! 9.88044889e-12! 1.46609062e-11! 9.51562093e-12! 2.09110698e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.22450009e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28657600e+02! 1.33630000e+01! 8.03290000e-01! 4.85200000e+02! 2.65640000e+02! 4.48480000e-08! 9.35830000e-08! 4.25960000e-03! 4.72700000e-11! 2.93380000e-05! 9.81300000e-03! 0.00000000e+00! 0.00000000e+00! 6.28916752e-10! 4.51563821e-11! 6.76666882e-12! 0.00000000e+00! 3.21267422e-11! 6.21249146e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.40449987e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.17999993e-10! 8.54393431e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.30000001e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28658300e+02! 1.33710000e+01! 7.09860000e-01! 4.93790000e+02! 2.65870000e+02! 4.33220000e-08! 9.48600000e-08! 5.00230000e-03! 4.93460000e-11! 3.05480000e-05! 1.05710000e-02! 0.00000000e+00! 0.00000000e+00! 6.35410224e-10! 4.63243957e-11! 7.74541195e-12! 1.76307341e-12! 3.81388636e-11! 7.51151918e-12! 3.30610019e-11! 0.00000000e+00! 0.00000000e+00! 8.35859992e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.44117076e-11! 1.51742091e-11! 9.71376625e-12! 2.12306370e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.16329991e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28659000e+02! 1.33650000e+01! 6.13660000e-01! 4.96140000e+02! 2.65640000e+02! 3.97650000e-08! 9.77200000e-08! 5.70330000e-03! 5.05100000e-11! 3.02990000e-05! 1.06170000e-02! 0.00000000e+00! 0.00000000e+00! 6.49953258e-10! 4.89402928e-11! 9.93743022e-12! 7.52869034e-12! 5.16037421e-11! 1.04208543e-11! 4.47449994e-11! 0.00000000e+00! 0.00000000e+00! 8.05200018e-10! 0.00000000e+00! 1.10538002e-11! 4.96620019e-12! 2.08999998e-10! 1.14506411e-10! 1.55215840e-11! 9.84785951e-12! 2.14469033e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.63330009e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28659700e+02! 1.33570000e+01! 5.15110000e-01! 4.91310000e+02! 2.65460000e+02! 4.11950000e-08! 9.63710000e-08! 5.08890000e-03! 3.96800000e-11! 3.02550000e-05! 1.05700000e-02! 0.00000000e+00! 0.00000000e+00! 6.43093634e-10! 4.77064291e-11! 8.90350380e-12! 4.80917389e-12! 4.52526523e-11! 9.04858393e-12! 3.87760006e-12! 0.00000000e+00! 0.00000000e+00! 7.09689973e-10! 0.00000000e+00! 5.87203767e-12! 2.63816182e-12! 0.00000000e+00! 1.05028167e-10! 1.43065611e-11! 9.37883885e-12! 2.06904667e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28662500e+02! 1.33260000e+01! 1.39530000e-01! 4.86970000e+02! 2.65730000e+02! 4.34470000e-08! 9.30270000e-08! 4.45550000e-03! 6.41200000e-11! 2.88020000e-05! 1.03930000e-02! 0.00000000e+00! 0.00000000e+00! 6.26089458e-10! 4.46478375e-11! 6.34052793e-12! 0.00000000e+00! 2.95090966e-11! 5.64690048e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.36469949e-10! 0.00000000e+00! 4.33713265e-12! 1.94856696e-12! 2.54999993e-10! 8.15328222e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28663200e+02! 1.33180000e+01! 4.76550000e-02! 4.87050000e+02! 2.65950000e+02! 4.48920000e-08! 9.13940000e-08! 4.28550000e-03! 5.70510000e-11! 2.82310000e-05! 1.03080000e-02! 0.00000000e+00! 0.00000000e+00! 6.17785711e-10! 4.31542163e-11! 5.08893145e-12! 0.00000000e+00! 2.18209322e-11! 3.98573145e-12! 1.45490000e-11! 0.00000000e+00! 0.00000000e+00! 8.56390014e-10! 0.00000000e+00! 1.18921505e-11! 5.34284986e-12! 2.38000009e-10! 7.00591668e-11! 1.46238299e-11! 9.50131033e-12! 2.08879893e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.68630037e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28663900e+02! 1.33110000e+01!-4.44560000e-02! 4.87060000e+02! 2.65890000e+02! 4.53040000e-08! 9.10380000e-08! 4.30000000e-03! 4.55050000e-11! 2.67960000e-05! 9.76140000e-03! 0.00000000e+00! 0.00000000e+00! 6.31450003e-10! 3.31599991e-11! 1.41999997e-12! 4.11000010e-12! 8.60000005e-12! 4.74999987e-12! 2.90000003e-11! 2.48559999e-08! 0.00000000e+00! 9.17080023e-10! 3.38640005e-10! 0.00000000e+00! 0.00000000e+00! 2.38000009e-10! 8.86399981e-11! 1.50534724e-11! 9.66715943e-12! 2.11554697e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.95999986e-12! 2.86999981e-12! 4.67000006e-12! 0.00000000e+00! 0.00000000e+00! 8.45950046e-12! 4.92000017e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28664600e+02! 1.33040000e+01!-1.36070000e-01! 4.86990000e+02! 2.66020000e+02! 4.56790000e-08! 9.07510000e-08! 4.25990000e-03! 3.72300000e-11! 2.62160000e-05! 9.67470000e-03! 0.00000000e+00! 0.00000000e+00! 6.31450003e-10! 3.31599991e-11! 1.41999997e-12! 4.11000010e-12! 8.60000005e-12! 4.74999987e-12! 3.19000000e-11! 2.48559999e-08! 0.00000000e+00! 9.33299993e-10! 3.38640005e-10! 4.30559971e-12! 1.93439991e-12! 0.00000000e+00! 8.86399981e-11! 1.51396916e-11! 9.70044097e-12! 2.12091490e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.95999986e-12! 2.86999981e-12! 4.67000006e-12! 0.00000000e+00! 0.00000000e+00! 3.18600007e-11! 4.92000017e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28665300e+02! 1.32960000e+01!-2.27230000e-01! 4.86960000e+02! 2.66060000e+02! 4.62650000e-08! 9.02140000e-08! 4.31500000e-03! 3.07440000e-11! 2.53460000e-05! 9.32770000e-03! 0.00000000e+00! 0.00000000e+00! 6.11785456e-10! 4.20749269e-11! 4.18453206e-12! 0.00000000e+00! 1.62654907e-11! 2.78537631e-12! 4.09199966e-11! 0.00000000e+00! 0.00000000e+00! 8.27700020e-10! 0.00000000e+00! 1.32617988e-11! 5.95819965e-12! 0.00000000e+00! 6.17683474e-11! 1.54078642e-11! 9.80396059e-12! 2.13761040e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.32000007e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28666000e+02! 1.32890000e+01!-3.19040000e-01! 4.87160000e+02! 2.66180000e+02! 4.58540000e-08! 8.96500000e-08! 4.37780000e-03! 2.79670000e-11! 2.58950000e-05! 9.74150000e-03! 0.00000000e+00! 0.00000000e+00! 6.08917528e-10! 4.15590652e-11! 3.75226022e-12! 0.00000000e+00! 1.36101798e-11! 2.21164753e-12! 5.14199967e-11! 0.00000000e+00! 0.00000000e+00! 9.28719990e-10! 0.00000000e+00! 6.99659991e-12! 3.14340004e-12! 0.00000000e+00! 5.78056145e-11! 1.57200381e-11! 9.92446576e-12! 2.15704538e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28666700e+02! 1.32810000e+01!-4.11100000e-01! 4.87100000e+02! 2.66000000e+02! 4.57810000e-08! 9.09740000e-08! 4.28590000e-03! 3.03100000e-11! 2.59210000e-05! 9.97350000e-03! 0.00000000e+00! 0.00000000e+00! 6.35489994e-10! 3.54700019e-11! 1.79000001e-12! 2.64000020e-12! 5.97999992e-12! 5.23000003e-12! 8.19999992e-13! 7.29469984e-10! 0.00000000e+00! 9.00999997e-10! 2.64500002e-11! 9.88079930e-12! 4.43919988e-12! 0.00000000e+00! 9.33899971e-11! 1.42156564e-11! 9.34374713e-12! 2.06338731e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.85999999e-12! 3.25999991e-12! 3.03999989e-12! 0.00000000e+00! 0.00000000e+00! 9.20000014e-12! 1.38999999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28668800e+02! 1.32580000e+01!-6.85310000e-01! 4.86970000e+02! 2.66110000e+02! 4.42610000e-08! 8.70920000e-08! 4.52750000e-03! 1.95920000e-11! 2.08240000e-05! 7.95790000e-03! 0.00000000e+00! 0.00000000e+00! 6.12809969e-10! 3.67399999e-11! 3.39000009e-12! 2.72000001e-12! 4.90999992e-12! 4.11000010e-12! 1.16120004e-11! 2.34579994e-10! 0.00000000e+00! 9.45429957e-10! 1.91000011e-11! 1.10261991e-11! 4.95379952e-12! 0.00000000e+00! 8.37900027e-11! 1.45365118e-11! 9.46760378e-12! 2.08336282e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.04000011e-12! 0.00000000e+00! 5.40999971e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.79999993e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28669400e+02! 1.32510000e+01!-7.77550000e-01! 4.86930000e+02! 2.65930000e+02! 4.43280000e-08! 8.89010000e-08! 4.55170000e-03! 2.33800000e-11! 1.99180000e-05! 7.70360000e-03! 0.00000000e+00! 0.00000000e+00! 6.12809969e-10! 3.67399999e-11! 3.39000009e-12! 2.72000001e-12! 4.90999992e-12! 4.11000010e-12! 2.42689983e-11! 2.34579994e-10! 0.00000000e+00! 9.47560030e-10! 1.91000011e-11! 1.24199999e-11! 5.58000000e-12! 0.00000000e+00! 8.37900027e-11! 1.49128158e-11! 9.61286346e-12! 2.10679009e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.04000011e-12! 0.00000000e+00! 5.40999971e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.79999993e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28670100e+02! 1.32420000e+01!-8.69730000e-01! 4.87150000e+02! 2.65970000e+02! 4.44080000e-08! 8.83880000e-08! 4.56950000e-03! 3.07260000e-11! 1.77510000e-05! 6.59750000e-03! 0.00000000e+00! 0.00000000e+00! 6.02500327e-10! 4.04047767e-11! 2.78501289e-12! 0.00000000e+00! 7.66868426e-12! 9.27878000e-13! 3.74999988e-12! 0.00000000e+00! 0.00000000e+00! 8.56499982e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.89386517e-11! 1.43027673e-11! 9.37737388e-12! 2.06881040e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.29720002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28670800e+02! 1.32340000e+01!-9.62360000e-01! 4.87020000e+02! 2.65930000e+02! 4.38140000e-08! 8.98870000e-08! 4.45210000e-03! 3.51740000e-11! 1.76020000e-05! 6.66350000e-03! 0.00000000e+00! 0.00000000e+00! 6.10122675e-10! 4.17758363e-11! 3.93390615e-12! 0.00000000e+00! 1.47259756e-11! 2.45273571e-12! 2.99420003e-11! 0.00000000e+00! 0.00000000e+00! 9.36020039e-10! 0.00000000e+00! 6.43556042e-12! 2.89133886e-12! 0.00000000e+00! 5.94708033e-11! 1.50814777e-11! 9.67797110e-12! 2.11729072e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23080008e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28671500e+02! 1.32260000e+01!-1.05530000e+00! 4.86930000e+02! 2.65850000e+02! 4.34950000e-08! 9.10910000e-08! 4.53620000e-03! 4.30700000e-11! 1.91580000e-05! 7.32850000e-03! 0.00000000e+00! 0.00000000e+00! 6.16244999e-10! 4.28770734e-11! 4.85670011e-12! 0.00000000e+00! 2.03944084e-11! 3.67750448e-12! 4.22450009e-12! 0.00000000e+00! 0.00000000e+00! 8.54900040e-10! 0.00000000e+00! 4.82999968e-12! 2.16999986e-12! 0.00000000e+00! 6.79302517e-11! 1.43168741e-11! 9.38281917e-12! 2.06968886e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.51219991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28672200e+02! 1.31970000e+01!-1.13880000e+00! 4.86920000e+02! 2.66060000e+02! 4.39280000e-08! 9.17350000e-08! 4.40110000e-03! 2.91330000e-11! 2.47900000e-05! 9.60470000e-03! 0.00000000e+00! 0.00000000e+00! 6.19519713e-10! 4.34661092e-11! 5.35028749e-12! 0.00000000e+00! 2.34263615e-11! 4.33261326e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.85489959e-10! 0.00000000e+00! 3.97764287e-12! 1.78705694e-12! 0.00000000e+00! 7.24550767e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.23530003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28672900e+02! 1.31220000e+01!-1.15960000e+00! 4.86980000e+02! 2.66040000e+02! 4.42070000e-08! 9.24450000e-08! 4.34590000e-03! 9.44000000e-11! 2.53580000e-05! 9.75190000e-03! 0.00000000e+00! 0.00000000e+00! 6.23129992e-10! 4.41155133e-11! 5.89445983e-12! 0.00000000e+00! 2.67690401e-11! 5.05486104e-12! 2.46000009e-11! 0.00000000e+00! 0.00000000e+00! 8.63200011e-10! 0.00000000e+00! 7.36022961e-12! 3.30676979e-12! 0.00000000e+00! 7.74436210e-11! 1.49226569e-11! 9.61666163e-12! 2.10740279e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28682600e+02! 1.31840000e+01!-2.08580000e-01! 6.98400000e+02! 2.85860000e+02! 4.09180000e-08! 7.85890000e-08! 9.52740000e-03! 6.13210000e-11! 1.17970000e-05! 7.37150000e-03! 0.00000000e+00! 0.00000000e+00! 5.52672685e-10! 3.14421232e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.33330016e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.29999994e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.39410002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28683300e+02! 1.31920000e+01!-1.43360000e-01! 6.98310000e+02! 2.85800000e+02! 4.01880000e-08! 7.84940000e-08! 9.64250000e-03! 5.51970000e-11! 1.06130000e-05! 6.57820000e-03! 0.00000000e+00! 0.00000000e+00! 5.52189627e-10! 3.13552309e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.81219986e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.52650011e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28684000e+02! 1.32010000e+01!-7.79240000e-02! 6.98300000e+02! 2.85690000e+02! 4.04970000e-08! 7.87490000e-08! 9.88890000e-03! 5.23660000e-11! 1.02850000e-05! 6.58190000e-03! 0.00000000e+00! 0.00000000e+00! 5.75950010e-10! 4.34800008e-11! 3.47000011e-12! 7.04000009e-12! 4.88000005e-12! 1.91999997e-12! 0.00000000e+00! 2.49120002e-10! 0.00000000e+00! 9.55139967e-10! 4.50699998e-11! 5.79599953e-13! 2.60399992e-13! 3.70000003e-11! 7.58700047e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.91999996e-12! 0.00000000e+00! 2.45000006e-12! 0.00000000e+00! 0.00000000e+00! 8.35999932e-12! 1.19000003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28684700e+02! 1.32090000e+01!-1.28910000e-02! 6.98540000e+02! 2.85700000e+02! 3.98130000e-08! 7.97370000e-08! 1.00570000e-02! 4.84970000e-11! 1.05530000e-05! 7.08480000e-03! 0.00000000e+00! 0.00000000e+00! 5.75950010e-10! 4.34800008e-11! 3.47000011e-12! 7.04000009e-12! 4.88000005e-12! 1.91999997e-12! 7.09999984e-12! 2.49120002e-10! 0.00000000e+00! 8.18520030e-10! 4.50699998e-11! 3.00839995e-12! 1.35160004e-12! 4.29999994e-11! 7.58700047e-11! 1.44023656e-11! 9.41581969e-12! 2.07501117e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.91999996e-12! 0.00000000e+00! 2.45000006e-12! 0.00000000e+00! 0.00000000e+00! 1.45200007e-11! 1.19000003e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28685400e+02! 1.32180000e+01! 5.25800000e-02! 6.98310000e+02! 2.85670000e+02! 4.03220000e-08! 7.93060000e-08! 1.00700000e-02! 5.09030000e-11! 1.06100000e-05! 7.27610000e-03! 0.00000000e+00! 0.00000000e+00! 5.56318602e-10! 3.20979285e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.60780003e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28687500e+02! 1.32430000e+01! 2.50570000e-01! 6.98420000e+02! 2.85210000e+02! 4.06760000e-08! 7.83450000e-08! 1.03220000e-02! 4.20800000e-11! 1.00080000e-05! 7.34690000e-03! 0.00000000e+00! 0.00000000e+00! 5.88440019e-10! 3.88600020e-11! 2.67000007e-12! 5.28999978e-12! 7.92999954e-12! 4.13000016e-12! 0.00000000e+00! 2.89859997e-10! 0.00000000e+00! 9.03960018e-10! 1.70749997e-10! 1.20411894e-12! 5.40980997e-13! 0.00000000e+00! 7.80800008e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.65999982e-12! 0.00000000e+00! 3.99999998e-12! 0.00000000e+00! 0.00000000e+00! 8.58819960e-12! 0.00000000e+00! 2.77999997e-12! 6.74999986e-12! 6.74999986e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28688200e+02! 1.32520000e+01! 3.17620000e-01! 6.98420000e+02! 2.85030000e+02! 3.97840000e-08! 7.84250000e-08! 1.03270000e-02! 5.18020000e-11! 9.71450000e-06! 7.31400000e-03! 0.00000000e+00! 0.00000000e+00! 5.51838741e-10! 3.12921182e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.02440012e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.29999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28688900e+02! 1.32600000e+01! 3.84400000e-01! 6.98220000e+02! 2.84840000e+02! 3.77650000e-08! 7.89560000e-08! 1.02130000e-02! 4.01970000e-11! 9.40580000e-06! 7.26180000e-03! 0.00000000e+00! 0.00000000e+00! 5.45929968e-10! 2.92600007e-11! 1.83999994e-12! 3.22000000e-12! 6.80000023e-12! 3.77999975e-12! 0.00000000e+00! 1.20849997e-10! 0.00000000e+00! 9.05039987e-10! 1.30910005e-10! 1.04714397e-11! 4.70455966e-12! 0.00000000e+00! 6.03799996e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27000015e-12! 0.00000000e+00! 2.69000013e-12! 0.00000000e+00! 0.00000000e+00! 9.64710083e-12! 0.00000000e+00! 2.91999996e-12! 5.75500021e-12! 5.75500021e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28689600e+02! 1.32690000e+01! 4.50580000e-01! 6.98210000e+02! 2.84470000e+02! 3.31130000e-08! 8.08070000e-08! 1.04300000e-02! 4.03460000e-11! 8.92370000e-06! 7.10350000e-03! 0.00000000e+00! 0.00000000e+00! 5.45929968e-10! 2.92600007e-11! 1.83999994e-12! 3.22000000e-12! 6.80000023e-12! 3.77999975e-12! 1.78779994e-11! 1.20849997e-10! 0.00000000e+00! 9.37879996e-10! 1.30910005e-10! 4.80184772e-12! 2.15735199e-12! 1.09999995e-11! 6.03799996e-11! 1.47228046e-11! 9.53951675e-12! 2.09496084e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27000015e-12! 0.00000000e+00! 2.69000013e-12! 0.00000000e+00! 0.00000000e+00! 1.26530002e-11! 0.00000000e+00! 2.91999996e-12! 5.75500021e-12! 5.75500021e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28690300e+02! 1.32780000e+01! 5.17820000e-01! 6.98230000e+02! 2.84590000e+02! 3.43190000e-08! 8.04160000e-08! 1.03090000e-02! 4.76440000e-11! 8.52860000e-06! 6.94900000e-03! 0.00000000e+00! 0.00000000e+00! 5.61962865e-10! 3.31131893e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.15960030e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28691000e+02! 1.32860000e+01! 5.84330000e-01! 6.98280000e+02! 2.84620000e+02! 3.57180000e-08! 7.93300000e-08! 1.00890000e-02! 4.76570000e-11! 8.25130000e-06! 6.98910000e-03! 0.00000000e+00! 0.00000000e+00! 5.56440616e-10! 3.21198762e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.45159950e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28691700e+02! 1.32940000e+01! 6.50500000e-01! 6.98290000e+02! 2.84580000e+02! 3.56820000e-08! 7.91390000e-08! 1.01640000e-02! 4.39360000e-11! 7.90280000e-06! 6.84830000e-03! 0.00000000e+00! 0.00000000e+00! 5.55469393e-10! 3.19451791e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.34590072e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.70000004e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.10389996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28693100e+02! 1.33110000e+01! 7.83520000e-01! 6.98320000e+02! 2.84200000e+02! 3.38260000e-08! 8.17820000e-08! 1.08330000e-02! 5.21030000e-11! 7.32080000e-06! 6.72980000e-03! 0.00000000e+00! 0.00000000e+00! 5.68908975e-10! 3.43625996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.43690015e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.52410159e-12! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28693800e+02! 1.33200000e+01! 8.50830000e-01! 6.98310000e+02! 2.84470000e+02! 3.41920000e-08! 8.13120000e-08! 1.03580000e-02! 5.28210000e-11! 6.93110000e-06! 6.35750000e-03! 0.00000000e+00! 0.00000000e+00! 5.66519054e-10! 3.39327177e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.03549957e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.59999999e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.42860007e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28694400e+02! 1.33280000e+01! 9.17610000e-01! 6.98090000e+02! 2.84320000e+02! 3.36810000e-08! 8.13670000e-08! 1.03830000e-02! 4.55340000e-11! 6.72140000e-06! 6.39750000e-03! 0.00000000e+00! 0.00000000e+00! 5.66798719e-10! 3.39830213e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.90249985e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.75000029e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28695100e+02! 1.33360000e+01! 9.84730000e-01! 6.98240000e+02! 2.84660000e+02! 3.74260000e-08! 7.97100000e-08! 1.03630000e-02! 4.97380000e-11! 6.46280000e-06! 6.33370000e-03! 0.00000000e+00! 0.00000000e+00! 5.58372903e-10! 3.24674454e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.00500008e-10! 0.00000000e+00! 5.17499997e-13! 2.32500000e-13! 2.50000003e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.62500004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28695800e+02! 1.33450000e+01! 1.05120000e+00! 6.98250000e+02! 2.85150000e+02! 3.99560000e-08! 7.78670000e-08! 1.01130000e-02! 3.84150000e-11! 6.24040000e-06! 6.35990000e-03! 0.00000000e+00! 0.00000000e+00! 5.49001344e-10! 3.07817452e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.63999983e-10! 0.00000000e+00! 2.20799993e-11! 9.91999972e-12! 3.29999986e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.99999999e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28696500e+02! 1.33530000e+01! 1.11800000e+00! 6.98230000e+02! 2.85040000e+02! 4.03450000e-08! 7.76080000e-08! 1.02150000e-02! 4.49830000e-11! 6.02050000e-06! 6.35190000e-03! 0.00000000e+00! 0.00000000e+00! 5.47684342e-10! 3.05448514e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.29999986e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28697200e+02! 1.33600000e+01! 1.18570000e+00! 6.95820000e+02! 2.85050000e+02! 4.04880000e-08! 7.81000000e-08! 1.00050000e-02! 9.00450000e-11! 5.64890000e-06! 6.30580000e-03! 0.00000000e+00! 0.00000000e+00! 5.50186174e-10! 3.09948560e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.53249971e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.69999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.91669986e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28699300e+02! 1.34670000e+01! 1.04550000e+00! 7.18610000e+02! 2.86350000e+02! 3.25790000e-08! 8.09260000e-08! 9.76160000e-03! 1.19990000e-10! 5.05990000e-06! 5.94560000e-03! 0.00000000e+00! 0.00000000e+00! 5.64556291e-10! 3.35796599e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02190001e-09! 0.00000000e+00! 8.51459962e-12! 3.82540007e-12! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.04600001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28700000e+02! 1.34680000e+01! 9.67370000e-01! 7.05060000e+02! 2.85950000e+02! 3.72020000e-08! 7.86770000e-08! 9.39480000e-03! 9.55980000e-11! 5.00580000e-06! 5.88710000e-03! 0.00000000e+00! 0.00000000e+00! 5.53120161e-10! 3.15226109e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.03999990e-12! 0.00000000e+00! 0.00000000e+00! 8.26499980e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.09999977e-11! 0.00000000e+00! 1.42519269e-11! 9.35774895e-12! 2.06564540e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28700700e+02! 1.34640000e+01! 8.89330000e-01! 7.00980000e+02! 2.85880000e+02! 3.98760000e-08! 7.87240000e-08! 9.79500000e-03! 8.93640000e-11! 4.72190000e-06! 5.36720000e-03! 0.00000000e+00! 0.00000000e+00! 5.53359136e-10! 3.15656008e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.94000003e-12! 0.00000000e+00! 0.00000000e+00! 8.76359985e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.09999977e-11! 0.00000000e+00! 1.42489544e-11! 9.35660056e-12! 2.06546013e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28701400e+02! 1.34630000e+01! 8.17510000e-01! 6.98580000e+02! 2.85840000e+02! 4.03540000e-08! 7.88810000e-08! 9.50280000e-03! 8.58640000e-11! 4.26790000e-06! 4.57230000e-03! 0.00000000e+00! 0.00000000e+00! 5.54157442e-10! 3.17092012e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.61619998e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28702100e+02! 1.34620000e+01! 7.47840000e-01! 7.14260000e+02! 2.86260000e+02! 3.77460000e-08! 7.89270000e-08! 9.72930000e-03! 7.94330000e-11! 3.89470000e-06! 4.26850000e-03! 0.00000000e+00! 0.00000000e+00! 5.54391422e-10! 3.17512752e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.53410018e-10! 0.00000000e+00! 3.25286694e-12! 1.46143297e-12! 2.69999995e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.14690002e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28709000e+02! 1.34240000e+01! 4.28740000e-01! 9.05630000e+02! 2.97230000e+02! 3.33860000e-08! 1.03820000e-07! 2.61980000e-02! 1.16660000e-10! 1.91000000e-06! 2.88820000e-03! 0.00000000e+00! 0.00000000e+00! 6.80971557e-10! 5.45196562e-11! 1.46127156e-11! 1.98259846e-11! 8.03225403e-11! 1.66260790e-11! 1.22370003e-10! 0.00000000e+00! 0.00000000e+00! 1.29540001e-09! 0.00000000e+00! 4.86663869e-11! 2.18646091e-11! 0.00000000e+00! 1.57365732e-10! 1.78294445e-11! 1.07387354e-11! 2.28837036e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.57349991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28709700e+02! 1.34280000e+01! 4.85270000e-01! 9.05820000e+02! 2.97290000e+02! 3.18910000e-08! 1.08240000e-07! 2.61450000e-02! 1.17580000e-10! 1.81060000e-06! 2.88480000e-03! 0.00000000e+00! 0.00000000e+00! 7.03447134e-10! 5.85624049e-11! 1.80003790e-11! 2.87364837e-11! 1.01131901e-10! 2.11223244e-11! 9.87649962e-11! 0.00000000e+00! 0.00000000e+00! 1.13590004e-09! 0.00000000e+00! 4.69062011e-11! 2.10738007e-11! 6.09999967e-11! 1.88421181e-10! 1.71276465e-11! 1.04678289e-11! 2.24467875e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.99999980e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28710400e+02! 1.34310000e+01! 5.42060000e-01! 9.05910000e+02! 2.97380000e+02! 3.10740000e-08! 1.06780000e-07! 2.56940000e-02! 1.10590000e-10! 1.75630000e-06! 2.80250000e-03! 0.00000000e+00! 0.00000000e+00! 6.96023073e-10! 5.72270217e-11! 1.68813765e-11! 2.57931974e-11! 9.42582262e-11! 1.96371391e-11! 9.90819995e-11! 0.00000000e+00! 0.00000000e+00! 1.06309994e-09! 0.00000000e+00! 6.49441820e-11! 2.91778199e-11! 4.39999981e-11! 1.78163054e-10! 1.71370713e-11! 1.04714666e-11! 2.24526543e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.67349995e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28711100e+02! 1.34340000e+01! 5.99370000e-01! 9.05900000e+02! 2.97410000e+02! 3.25030000e-08! 1.04720000e-07! 2.50820000e-02! 1.01050000e-10! 1.61120000e-06! 2.86960000e-03! 0.00000000e+00! 0.00000000e+00! 6.85548007e-10! 5.53428414e-11! 1.53025110e-11! 2.16403406e-11! 8.45597481e-11! 1.75416036e-11! 1.74199995e-11! 0.00000000e+00! 0.00000000e+00! 1.15459997e-09! 0.00000000e+00! 5.76425990e-11! 2.58973988e-11! 0.00000000e+00! 1.63689243e-10! 1.47091887e-11! 9.53425967e-12! 2.09411290e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.95200019e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28711800e+02! 1.34370000e+01! 6.56850000e-01! 9.05850000e+02! 2.97330000e+02! 3.42880000e-08! 9.97840000e-08! 2.51590000e-02! 7.80900000e-11! 1.51780000e-06! 2.67920000e-03! 0.00000000e+00! 0.00000000e+00! 6.70849987e-10! 4.82099985e-11! 4.32999990e-12! 8.41999994e-12! 3.75600002e-11! 4.78999999e-12! 3.39199988e-11! 1.55190000e-10! 0.00000000e+00! 1.14069998e-09! 1.19789997e-10! 6.47771975e-11! 2.91027983e-11! 4.19999972e-11! 1.42369991e-10! 1.51997477e-11! 9.72362382e-12! 2.12465358e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.79999981e-12! 0.00000000e+00! 2.72000001e-12! 0.00000000e+00! 0.00000000e+00! 5.25000009e-11! 0.00000000e+00! 2.58000002e-12! 4.28499987e-12! 4.28499987e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28712500e+02! 1.34390000e+01! 7.14330000e-01! 9.05830000e+02! 2.97250000e+02! 3.44010000e-08! 1.01320000e-07! 2.57470000e-02! 7.04710000e-11! 1.40490000e-06! 2.40050000e-03! 0.00000000e+00! 0.00000000e+00! 6.70849987e-10! 4.82099985e-11! 4.32999990e-12! 8.41999994e-12! 3.75600002e-11! 4.78999999e-12! 1.01390001e-10! 1.55190000e-10! 0.00000000e+00! 1.23919996e-09! 1.19789997e-10! 5.83539883e-11! 2.62170095e-11! 3.40000007e-11! 1.42369991e-10! 1.72056900e-11! 1.04979549e-11! 2.24953754e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.79999981e-12! 0.00000000e+00! 2.72000001e-12! 0.00000000e+00! 0.00000000e+00! 3.90610010e-11! 0.00000000e+00! 2.58000002e-12! 4.28499987e-12! 4.28499987e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28713200e+02! 1.34430000e+01! 7.72040000e-01! 9.05730000e+02! 2.97310000e+02! 3.60000000e-08! 9.85970000e-08! 2.58290000e-02! 6.27720000e-11! 1.25920000e-06! 1.88450000e-03! 0.00000000e+00! 0.00000000e+00! 6.54412802e-10! 4.97424393e-11! 1.06095983e-11! 9.29667888e-12! 5.57326581e-11! 1.13129827e-11! 7.40000006e-11! 0.00000000e+00! 0.00000000e+00! 1.26280009e-09! 0.00000000e+00! 8.13785983e-11! 3.65613997e-11! 0.00000000e+00! 1.20668309e-10! 1.63913605e-11! 1.01836092e-11! 2.19883989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.68040016e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28714600e+02! 1.34500000e+01! 8.87350000e-01! 9.06020000e+02! 2.97410000e+02! 3.33280000e-08! 1.03370000e-07! 2.65630000e-02! 5.42670000e-11! 1.21090000e-06! 1.98660000e-03! 0.00000000e+00! 0.00000000e+00! 6.51780019e-10! 4.42700009e-11! 4.18999991e-12! 9.10000027e-12! 2.91499984e-11! 3.47999993e-12! 1.42029999e-10! 1.43770010e-10! 0.00000000e+00! 1.13459997e-09! 1.12029996e-10! 9.66551977e-11! 4.34247985e-11! 0.00000000e+00! 1.36289993e-10! 1.84139527e-11! 1.09643666e-11! 2.32476000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.09000004e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.18679968e-11! 0.00000000e+00! 2.80000003e-12! 5.16499994e-12! 5.16499994e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28715300e+02! 1.34530000e+01! 9.45120000e-01! 9.05890000e+02! 2.97480000e+02! 3.37690000e-08! 1.04000000e-07! 2.68760000e-02! 5.71030000e-11! 1.25750000e-06! 2.19480000e-03! 0.00000000e+00! 0.00000000e+00! 6.81886825e-10! 5.46842953e-11! 1.47506729e-11! 2.01888558e-11! 8.11699805e-11! 1.68091843e-11! 1.77179993e-10! 0.00000000e+00! 0.00000000e+00! 1.25499999e-09! 0.00000000e+00! 9.68138972e-11! 4.34960991e-11! 3.99999964e-11! 1.58630428e-10! 1.94589917e-11! 1.13677713e-11! 2.38982098e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.11980002e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28716000e+02! 1.34560000e+01! 1.00240000e+00! 9.05840000e+02! 2.97560000e+02! 3.46130000e-08! 1.01290000e-07! 2.67080000e-02! 5.23490000e-11! 1.18340000e-06! 2.41230000e-03! 0.00000000e+00! 0.00000000e+00! 6.68106570e-10! 5.22055940e-11! 1.26736208e-11! 1.47256322e-11! 6.84112975e-11! 1.40524372e-11! 1.39240008e-10! 0.00000000e+00! 0.00000000e+00! 1.21599997e-09! 0.00000000e+00! 7.35884964e-11! 3.30614980e-11! 4.39999981e-11! 1.39589659e-10! 1.83310051e-11! 1.09323462e-11! 2.31959590e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.56470026e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.28716700e+02! 1.34590000e+01! 1.05990000e+00! 9.05880000e+02! 2.97670000e+02! 3.46840000e-08! 1.00200000e-07! 2.64080000e-02! 5.72720000e-11! 1.21000000e-06! 2.42680000e-03! 0.00000000e+00! 0.00000000e+00! 6.55049959e-10! 4.67000015e-11! 4.81000005e-12! 7.81999986e-12! 2.92699996e-11! 2.42999999e-12! 5.18370000e-11! 1.02640001e-10! 0.00000000e+00! 1.25680000e-09! 1.09169999e-10! 6.10298062e-11! 2.74191884e-11! 4.39999981e-11! 1.32980002e-10! 1.57324362e-11! 9.92925187e-12! 2.15781733e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76999994e-12! 0.00000000e+00! 3.17000007e-12! 0.00000000e+00! 2.09999986e-12! 5.95710009e-11! 0.00000000e+00! 2.77999997e-12! 4.94500014e-12! 4.94500014e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28717400e+02! 1.34620000e+01! 1.11690000e+00! 9.05770000e+02! 2.97710000e+02! 3.43910000e-08! 1.00810000e-07! 2.67500000e-02! 5.34360000e-11! 1.17740000e-06! 2.41410000e-03! 0.00000000e+00! 0.00000000e+00! 6.55049959e-10! 4.67000015e-11! 4.81000005e-12! 7.81999986e-12! 2.92699996e-11! 2.42999999e-12! 5.49420023e-11! 1.02640001e-10! 0.00000000e+00! 1.34930001e-09! 1.09169999e-10! 6.81243881e-11! 3.06066110e-11! 4.89999985e-11! 1.32980002e-10! 1.58247512e-11! 9.96488655e-12! 2.16356447e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.76999994e-12! 0.00000000e+00! 3.17000007e-12! 0.00000000e+00! 2.09999986e-12! 6.58270036e-11! 0.00000000e+00! 2.77999997e-12! 4.94500014e-12! 4.94500014e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28718100e+02! 1.34640000e+01! 1.17430000e+00! 9.05830000e+02! 2.97780000e+02! 3.39410000e-08! 1.00540000e-07! 2.71340000e-02! 5.07890000e-11! 1.07700000e-06! 2.34630000e-03! 0.00000000e+00! 0.00000000e+00! 6.43789966e-10! 4.20600013e-11! 4.83000012e-12! 6.92000016e-12! 2.94500015e-11! 3.47999993e-12! 5.65309986e-11! 8.99399999e-11! 0.00000000e+00! 1.24019994e-09! 1.03709999e-10! 7.49960996e-11! 3.36938984e-11! 4.89999985e-11! 1.34089989e-10! 1.58719930e-11! 9.98312370e-12! 2.16650569e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.77999975e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23000004e-12! 1.06410006e-10! 4.21999978e-12! 1.65000002e-12! 5.34499962e-12! 5.34499962e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.28718800e+02! 1.34670000e+01! 1.23180000e+00! 9.05910000e+02! 2.97960000e+02! 3.36430000e-08! 1.02050000e-07! 2.67280000e-02! 4.52930000e-11! 1.04430000e-06! 2.29650000e-03! 0.00000000e+00! 0.00000000e+00! 6.57049970e-10! 5.09770004e-11! 4.74779981e-12! 7.02780022e-12! 3.13640017e-11! 5.25439978e-12! 2.59220007e-11! 1.01289997e-10! 0.00000000e+00! 1.15459997e-09! 9.97619973e-11! 6.61047606e-11! 2.96992396e-11! 4.89999985e-11! 1.36160000e-10! 1.49619605e-11! 9.63183439e-12! 2.10984979e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.88220012e-12! 0.00000000e+00! 2.85999978e-12! 0.00000000e+00! 2.84999997e-12! 6.34709993e-11! 4.37220008e-12! 2.97999993e-12! 3.39499999e-12! 3.39499999e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29450000e+02! 1.28580000e+01! 2.53100000e+00! 6.96790000e+02! 2.83250000e+02! 3.18460000e-08! 7.77810000e-08! 7.78020000e-03! 1.32060000e-10! 9.97950000e-05! 1.17970000e-02! 0.00000000e+00! 0.00000000e+00! 5.48564028e-10! 3.07030859e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.38179959e-12! 0.00000000e+00! 0.00000000e+00! 9.97290028e-10! 0.00000000e+00! 1.61839500e-11! 7.27104965e-12! 0.00000000e+00! 0.00000000e+00! 1.44404749e-11! 9.43053188e-12! 2.07738375e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.80359998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29450700e+02! 1.28070000e+01! 2.57460000e+00! 6.96820000e+02! 2.83100000e+02! 3.18930000e-08! 7.77120000e-08! 7.95960000e-03! 7.60570000e-11! 1.04120000e-04! 1.21730000e-02! 0.00000000e+00! 0.00000000e+00! 5.48213142e-10! 3.06399732e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.60979997e-11! 0.00000000e+00! 0.00000000e+00! 1.06109999e-09! 0.00000000e+00! 1.75101305e-11! 7.86687035e-12! 6.99999997e-12! 0.00000000e+00! 1.46698834e-11! 9.51908777e-12! 2.09166608e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.22299991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29451400e+02! 1.27560000e+01! 2.61830000e+00! 6.96790000e+02! 2.83150000e+02! 3.21740000e-08! 7.84580000e-08! 8.02360000e-03! 3.88540000e-11! 9.98340000e-05! 1.16850000e-02! 0.00000000e+00! 0.00000000e+00! 5.52006552e-10! 3.13223024e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.28850004e-11! 0.00000000e+00! 0.00000000e+00! 1.13740006e-09! 0.00000000e+00! 9.08315957e-12! 4.08083983e-12! 6.99999997e-12! 0.00000000e+00! 1.45743591e-11! 9.48221276e-12! 2.08571892e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.22620004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29452100e+02! 1.27050000e+01! 2.66100000e+00! 6.96810000e+02! 2.83140000e+02! 3.17170000e-08! 7.73400000e-08! 7.89220000e-03! 5.97910000e-11! 9.32950000e-05! 1.12110000e-02! 0.00000000e+00! 0.00000000e+00! 5.46321544e-10! 3.02997245e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.74100012e-11! 0.00000000e+00! 0.00000000e+00! 1.02359998e-09! 0.00000000e+00! 1.32569693e-11! 5.95602951e-12! 0.00000000e+00! 0.00000000e+00! 1.61954339e-11! 1.01079778e-11! 2.18664201e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.09840000e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29452800e+02! 1.26430000e+01! 2.66070000e+00! 6.96530000e+02! 2.83140000e+02! 3.13670000e-08! 7.60650000e-08! 7.78250000e-03! 2.99040000e-11! 9.35630000e-05! 1.10270000e-02! 0.00000000e+00! 0.00000000e+00! 5.39838174e-10! 2.91335463e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.24749984e-11! 0.00000000e+00! 0.00000000e+00! 1.06599995e-09! 0.00000000e+00! 8.25722997e-12! 3.70976990e-12! 0.00000000e+00! 0.00000000e+00! 1.51567873e-11! 9.70704073e-12! 2.12197915e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.23279997e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29453500e+02! 1.25780000e+01! 2.62780000e+00! 6.96750000e+02! 2.83060000e+02! 3.12710000e-08! 7.64460000e-08! 8.02040000e-03! 1.71790000e-11! 9.32030000e-05! 1.06360000e-02! 0.00000000e+00! 0.00000000e+00! 5.41775569e-10! 2.94820279e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.47539964e-12! 0.00000000e+00! 0.00000000e+00! 9.84210047e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.44135268e-11! 9.42012874e-12! 2.07570610e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.84100000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29454200e+02! 1.25090000e+01! 2.61510000e+00! 6.98000000e+02! 2.82490000e+02! 3.38890000e-08! 8.43950000e-08! 9.82220000e-03! 2.06650000e-12! 9.32830000e-05! 1.08010000e-02! 0.00000000e+00! 0.00000000e+00! 5.82196069e-10! 3.67525801e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.96720018e-11! 0.00000000e+00! 0.00000000e+00! 1.03959996e-09! 0.00000000e+00! 1.89356707e-11! 8.50733026e-12! 3.99999964e-11! 2.08833541e-11! 1.53707602e-11! 9.78963872e-12! 2.13530044e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.17050006e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29455600e+02! 1.23710000e+01! 2.62490000e+00! 7.44300000e+02! 2.84540000e+02! 3.26530000e-08! 1.00380000e-07! 1.61460000e-02! 1.83030000e-11! 9.33470000e-05! 1.12930000e-02! 0.00000000e+00! 0.00000000e+00! 6.63479272e-10! 5.13732598e-11! 1.19761614e-11! 1.28911170e-11! 6.41270231e-11! 1.31267393e-11! 4.47210012e-11! 0.00000000e+00! 0.00000000e+00! 1.10999998e-09! 0.00000000e+00! 4.59360570e-11! 2.06379393e-11! 0.00000000e+00! 1.33195871e-10! 1.55208710e-11! 9.84758369e-12! 2.14464592e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.38520001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29456300e+02! 1.23030000e+01! 2.63680000e+00! 7.69980000e+02! 2.86610000e+02! 3.25940000e-08! 1.04150000e-07! 1.75590000e-02! 3.05530000e-11! 1.00060000e-04! 1.23430000e-02! 0.00000000e+00! 0.00000000e+00! 6.82649604e-10! 5.48214911e-11! 1.48656400e-11! 2.04912493e-11! 8.18761794e-11! 1.69617705e-11! 3.31640028e-11! 0.00000000e+00! 0.00000000e+00! 1.04169995e-09! 0.00000000e+00! 2.78490894e-11! 1.25119099e-11! 5.09999959e-11! 1.59684363e-10! 1.51772709e-11! 9.71494846e-12! 2.12325435e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.67539982e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29456900e+02! 1.22340000e+01! 2.63390000e+00! 7.97640000e+02! 2.87970000e+02! 3.01980000e-08! 1.06270000e-07! 2.01560000e-02! 3.68400000e-11! 8.43780000e-05! 1.09630000e-02! 0.00000000e+00! 0.00000000e+00! 6.93429758e-10! 5.67605511e-11! 1.64904913e-11! 2.47650615e-11! 9.18571399e-11! 1.91183406e-11! 4.77379976e-11! 0.00000000e+00! 0.00000000e+00! 1.14419996e-09! 0.00000000e+00! 4.09025071e-11! 1.83764896e-11! 5.09999959e-11! 1.74579726e-10! 1.56105684e-11! 9.88220877e-12! 2.15023017e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.65409966e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29491000e+02! 1.13760000e+01! 2.58470000e+00! 5.60090000e+02! 2.73030000e+02! 6.15630000e-08! 7.28480000e-08! 1.40720000e-03! 1.13760000e-11! 1.15260000e-04! 1.36460000e-02! 0.00000000e+00! 2.14500001e-10! 5.23479871e-10! 2.61911170e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.39999999e-11! 0.00000000e+00! 0.00000000e+00! 6.72000011e-10! 0.00000000e+00! 5.72699978e-11! 2.57299997e-11! 1.13999997e-10! 0.00000000e+00! 1.49048170e-11! 9.60977652e-12! 2.10629240e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29491700e+02! 1.14500000e+01! 2.59220000e+00! 5.60040000e+02! 2.72870000e+02! 5.95850000e-08! 7.66230000e-08! 2.59390000e-03! 5.86160000e-11! 1.23990000e-04! 1.45020000e-02! 0.00000000e+00! 2.32000003e-10! 5.42675571e-10! 2.96439193e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.60329985e-11! 0.00000000e+00! 0.00000000e+00! 6.40229980e-10! 0.00000000e+00! 1.89128990e-11! 8.49709973e-12! 0.00000000e+00! 0.00000000e+00! 1.61544944e-11! 1.00921745e-11! 2.18409336e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.11480008e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29492400e+02! 1.15250000e+01! 2.60060000e+00! 5.59960000e+02! 2.72610000e+02! 5.63750000e-08! 7.99350000e-08! 3.36980000e-03! 5.67620000e-11! 1.28580000e-04! 1.49900000e-02! 0.00000000e+00! 2.50999999e-10! 5.59517044e-10! 3.26732391e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.29020006e-11! 0.00000000e+00! 0.00000000e+00! 6.56510013e-10! 0.00000000e+00! 3.95901281e-12! 1.77868690e-12! 9.69999983e-11! 0.00000000e+00! 1.45748639e-11! 9.48240878e-12! 2.08575032e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.48690001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29493100e+02! 1.16010000e+01! 2.60900000e+00! 5.59960000e+02! 2.73120000e+02! 5.98770000e-08! 7.43620000e-08! 6.71060000e-04! 5.29430000e-11! 1.29080000e-04! 1.49710000e-02! 0.00000000e+00! 2.59500005e-10! 5.31178546e-10! 2.75758964e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.61310010e-11! 0.00000000e+00! 0.00000000e+00! 6.22439988e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.14999996e-10! 0.00000000e+00! 1.46708652e-11! 9.51946594e-12! 2.09172714e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.86889976e-13! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29493700e+02! 1.16780000e+01! 2.61570000e+00! 5.59900000e+02! 2.73180000e+02! 6.02180000e-08! 7.45090000e-08! 1.52280000e-03! 4.03260000e-11! 1.26580000e-04! 1.46160000e-02! 0.00000000e+00! 2.59500005e-10! 5.72409953e-10! 2.59200005e-11! 4.04000011e-12! 2.49999999e-12! 1.11000003e-11! 6.40999970e-12! 3.28849968e-11! 5.89219951e-10! 0.00000000e+00! 5.75050008e-10! 1.08709999e-10! 9.94289980e-12! 4.46709987e-12! 0.00000000e+00! 7.07600020e-11! 1.51689772e-11! 9.71174616e-12! 2.12273792e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.13999997e-12! 0.00000000e+00! 2.96000008e-12! 0.00000000e+00! 0.00000000e+00! 2.12459998e-11! 0.00000000e+00! 0.00000000e+00! 4.42500030e-12! 4.42500030e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29496500e+02! 1.19900000e+01! 2.61620000e+00! 5.60070000e+02! 2.73400000e+02! 6.28240000e-08! 7.09060000e-08! 9.16470000e-04! 1.10380000e-11! 1.18880000e-04! 1.36450000e-02! 0.00000000e+00! 2.23499996e-10! 5.43889989e-10! 2.16100002e-11! 0.00000000e+00! 0.00000000e+00! 4.57000019e-12! 3.31999987e-12! 4.15569974e-11! 3.66609992e-10! 0.00000000e+00! 5.20229970e-10! 7.63100000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.95700017e-11! 1.54268022e-11! 9.81127159e-12! 2.13878932e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.19999972e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.89510005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29497200e+02! 1.20670000e+01! 2.61310000e+00! 5.59970000e+02! 2.73410000e+02! 6.28810000e-08! 7.10990000e-08! 9.34420000e-04! 1.09460000e-11! 1.28210000e-04! 1.45630000e-02! 0.00000000e+00! 2.17500004e-10! 5.14586262e-10! 2.45913949e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.14099996e-11! 0.00000000e+00! 0.00000000e+00! 5.65260005e-10! 0.00000000e+00! 6.96761962e-12! 3.13037985e-12! 4.19999972e-11! 0.00000000e+00! 1.51251234e-11! 9.69481873e-12! 2.12000782e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.91310006e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29497900e+02! 1.21430000e+01! 2.60590000e+00! 5.60020000e+02! 2.73130000e+02! 6.09810000e-08! 7.25850000e-08! 1.38020000e-03! 1.06230000e-11! 1.16890000e-04! 1.34750000e-02! 0.00000000e+00! 2.15499993e-10! 5.22142496e-10! 2.59505629e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.52130008e-11! 0.00000000e+00! 0.00000000e+00! 6.72570000e-10! 0.00000000e+00! 1.73065798e-11! 7.77542006e-12! 1.12000000e-10! 0.00000000e+00! 1.58328073e-11! 9.96799778e-12! 2.16406598e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.02950001e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29498600e+02! 1.22190000e+01! 2.59910000e+00! 5.59910000e+02! 2.72690000e+02! 5.76960000e-08! 7.52570000e-08! 2.52730000e-03! 2.25910000e-11! 1.04960000e-04! 1.22420000e-02! 0.00000000e+00! 2.18499996e-10! 5.35729572e-10! 2.83945090e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.02789989e-11! 0.00000000e+00! 0.00000000e+00! 6.51159959e-10! 0.00000000e+00! 3.42736776e-12! 1.53983185e-12! 0.00000000e+00! 0.00000000e+00! 1.53888065e-11! 9.79660537e-12! 2.13642385e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29499300e+02! 1.22940000e+01! 2.59230000e+00! 5.60070000e+02! 2.72500000e+02! 5.62840000e-08! 7.61640000e-08! 3.11890000e-03! 2.87870000e-11! 1.05160000e-04! 1.22250000e-02! 0.00000000e+00! 2.25000005e-10! 5.70069991e-10! 2.69299999e-11! 2.33999994e-12! 3.09999986e-12! 1.15200002e-11! 3.95999986e-12! 2.44750002e-11! 7.84109999e-10! 0.00000000e+00! 5.93919969e-10! 1.56520005e-10! 0.00000000e+00! 0.00000000e+00! 9.29999966e-11! 7.28899996e-11! 1.49189393e-11! 9.61522788e-12! 2.10717138e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.46000008e-12! 0.00000000e+00! 3.89000030e-12! 0.00000000e+00! 0.00000000e+00! 2.96559999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29500000e+02! 1.23700000e+01! 2.58480000e+00! 5.60020000e+02! 2.72910000e+02! 6.16750000e-08! 7.17010000e-08! 7.46040000e-04! 2.89540000e-11! 1.09710000e-04! 1.27320000e-02! 0.00000000e+00! 2.30999997e-10! 5.70069991e-10! 2.69299999e-11! 2.33999994e-12! 3.09999986e-12! 1.15200002e-11! 3.95999986e-12! 4.16669997e-11! 7.84109999e-10! 0.00000000e+00! 5.23170007e-10! 1.56520005e-10! 8.22272979e-12! 3.69426972e-12! 1.03999996e-10! 7.28899996e-11! 1.54300722e-11! 9.81253447e-12! 2.13899315e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.46000008e-12! 0.00000000e+00! 3.89000030e-12! 0.00000000e+00! 0.00000000e+00! 3.66669976e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29500700e+02! 1.24460000e+01! 2.57770000e+00! 5.60010000e+02! 2.72670000e+02! 6.01010000e-08! 7.28190000e-08! 1.24690000e-03! 1.20510000e-11! 1.05790000e-04! 1.23140000e-02! 0.00000000e+00! 2.34999992e-10! 5.23332377e-10! 2.61645931e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.40000007e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29501400e+02! 1.25210000e+01! 2.57630000e+00! 5.63880000e+02! 2.73110000e+02! 6.03010000e-08! 7.29360000e-08! 8.52240000e-04! 1.57570000e-11! 1.04070000e-04! 1.26710000e-02! 0.00000000e+00! 2.33000008e-10! 5.23927346e-10! 2.62716064e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.40000007e-11! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29504200e+02! 1.23270000e+01! 2.61750000e+00! 6.06240000e+02! 2.77010000e+02! 6.24600000e-08! 6.55600000e-08! 2.03330000e-03! 3.35690000e-11! 1.09250000e-04! 1.20940000e-02! 0.00000000e+00! 2.25000005e-10! 4.86420570e-10! 1.95251471e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.12619991e-11! 0.00000000e+00! 0.00000000e+00! 6.78669954e-10! 0.00000000e+00! 3.86855391e-12! 1.73804591e-12! 0.00000000e+00! 0.00000000e+00! 1.48234151e-11! 9.57835287e-12! 2.10122440e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 2.21149991e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29504900e+02! 1.22520000e+01! 2.61720000e+00! 6.06490000e+02! 2.76740000e+02! 6.09110000e-08! 6.58460000e-08! 2.52880000e-03! 2.66610000e-11! 1.04910000e-04! 1.16700000e-02! 0.00000000e+00! 2.20000004e-10! 4.87874907e-10! 1.97867382e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.08840034e-10! 0.00000000e+00! 1.28726396e-11! 5.78335990e-12! 1.00000001e-10! 0.00000000e+00! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.68850001e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29505600e+02! 1.21780000e+01! 2.61580000e+00! 6.06540000e+02! 2.77090000e+02! 6.32710000e-08! 6.39810000e-08! 2.05730000e-03! 1.77310000e-11! 1.02080000e-04! 1.14020000e-02! 0.00000000e+00! 2.18999999e-10! 4.78391438e-10! 1.80809152e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.94920000e-11! 0.00000000e+00! 0.00000000e+00! 5.99700012e-10! 0.00000000e+00! 3.65361907e-12! 1.64148100e-12! 5.39999989e-11! 0.00000000e+00! 1.47707905e-11! 9.55803926e-12! 2.09794820e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.91800045e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29506300e+02! 1.21050000e+01! 2.61700000e+00! 6.06350000e+02! 2.76840000e+02! 6.14240000e-08! 6.57070000e-08! 2.28260000e-03! 6.48200000e-12! 1.04400000e-04! 1.16440000e-02! 0.00000000e+00! 2.24500002e-10! 4.87168084e-10! 1.96596003e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.72459998e-11! 0.00000000e+00! 0.00000000e+00! 6.94510005e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.47040158e-11! 9.53226300e-12! 2.09379094e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29506900e+02! 1.20320000e+01! 2.61610000e+00! 6.06360000e+02! 2.76740000e+02! 6.12860000e-08! 6.61790000e-08! 1.88910000e-03! 5.07920000e-12! 1.08150000e-04! 1.20300000e-02! 0.00000000e+00! 2.22999993e-10! 4.89568219e-10! 2.00913158e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.51250002e-11! 0.00000000e+00! 0.00000000e+00! 6.23419982e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.39999953e-11! 0.00000000e+00! 1.46409551e-11! 9.50792136e-12! 2.08986509e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29507600e+02! 1.19600000e+01! 2.61640000e+00! 6.06360000e+02! 2.77020000e+02! 6.19930000e-08! 6.69010000e-08! 1.54100000e-03! 5.07920000e-12! 1.11430000e-04! 1.24170000e-02! 0.00000000e+00! 2.06499998e-10! 5.22139998e-10! 1.88400007e-11! 0.00000000e+00! 0.00000000e+00! 4.38999965e-12! 4.69999994e-12! 2.71310006e-11! 7.33950012e-10! 0.00000000e+00! 5.45030021e-10! 1.16470000e-10! 0.00000000e+00! 0.00000000e+00! 3.49999994e-11! 4.64700015e-11! 1.49979040e-11! 9.64570958e-12! 2.11208759e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.94000024e-12! 0.00000000e+00! 3.03999989e-12! 0.00000000e+00! 0.00000000e+00! 9.19669983e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29516700e+02! 1.10190000e+01! 2.60450000e+00! 6.07160000e+02! 2.75650000e+02! 4.83110000e-08! 9.51970000e-08! 9.43140000e-03! 1.92410000e-11! 1.35010000e-04! 1.56610000e-02! 0.00000000e+00! 2.83000012e-10! 6.37123854e-10! 4.66326283e-11! 8.00370274e-12! 2.44244859e-12! 3.97254556e-11! 7.85433264e-12! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.74999987e-10! 9.67795011e-11! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29517400e+02! 1.09500000e+01! 2.59740000e+00! 6.26430000e+02! 2.77270000e+02! 4.46490000e-08! 1.00950000e-07! 1.06150000e-02! 3.05980000e-11! 1.30960000e-04! 1.60450000e-02! 0.00000000e+00! 3.24500010e-10! 6.66377675e-10! 5.18946101e-11! 1.24130315e-11! 1.40402091e-11! 6.68105848e-11! 1.37065715e-11! 3.55559982e-12! 0.00000000e+00! 0.00000000e+00! 8.73809969e-10! 0.00000000e+00! 1.78440891e-11! 8.01691005e-12! 1.74999987e-10! 1.37200779e-10! 1.42969872e-11! 9.37514302e-12! 2.06845079e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.30280005e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29522900e+02! 1.14260000e+01! 2.62940000e+00! 7.66710000e+02! 2.86150000e+02! 3.04570000e-08! 1.09180000e-07! 1.81030000e-02! 7.33300000e-11! 1.06170000e-04! 1.52330000e-02! 0.00000000e+00! 4.17999996e-10! 7.08226977e-10! 5.94221825e-11! 1.87208322e-11! 3.06314765e-11! 1.05557424e-10! 2.20785387e-11! 1.48690001e-11! 0.00000000e+00! 0.00000000e+00! 1.05590003e-09! 0.00000000e+00! 4.03028999e-11! 1.81070992e-11! 0.00000000e+00! 1.95025746e-10! 1.46333449e-11! 9.50498274e-12! 2.08939133e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.85899973e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29523600e+02! 1.14920000e+01! 2.62590000e+00! 7.66460000e+02! 2.86550000e+02! 3.03820000e-08! 1.05000000e-07! 1.72800000e-02! 8.13090000e-11! 7.69450000e-05! 1.10730000e-02! 0.00000000e+00! 4.10000006e-10! 6.86971813e-10! 5.55989456e-11! 1.55171136e-11! 2.22048057e-11! 8.58779853e-11! 1.78264330e-11! 2.47870006e-11! 0.00000000e+00! 0.00000000e+00! 1.01420006e-09! 0.00000000e+00! 2.03722490e-11! 9.15274974e-12! 4.79999998e-11! 1.65656558e-10! 1.49282166e-11! 9.61880835e-12! 2.10774904e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.53609989e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29524300e+02! 1.15580000e+01! 2.62120000e+00! 7.66540000e+02! 2.86700000e+02! 3.04240000e-08! 1.03330000e-07! 1.72790000e-02! 6.79420000e-11! 7.41810000e-05! 1.06680000e-02! 0.00000000e+00! 4.02500006e-10! 6.78479939e-10! 5.40714799e-11! 1.42371583e-11! 1.88381689e-11! 7.80156217e-11! 1.61276270e-11! 3.82949991e-11! 0.00000000e+00! 0.00000000e+00! 9.51150048e-10! 0.00000000e+00! 1.67297391e-11! 7.51626018e-12! 0.00000000e+00! 1.53922944e-10! 1.53298207e-11! 9.77383539e-12! 2.13275161e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.55899987e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29525000e+02! 1.16230000e+01! 2.61670000e+00! 7.66470000e+02! 2.86740000e+02! 3.07610000e-08! 1.03960000e-07! 1.74730000e-02! 6.20730000e-11! 7.38540000e-05! 1.07270000e-02! 0.00000000e+00! 4.01500000e-10! 7.40539963e-10! 6.42699990e-11! 8.10000070e-12! 1.26800003e-11! 4.59800011e-11! 5.58000000e-12! 1.94749997e-11! 1.29800004e-09! 0.00000000e+00! 9.93380045e-10! 1.17560003e-10! 3.40473587e-11! 1.52966407e-11! 5.29999968e-11! 1.62460004e-10! 1.47702857e-11! 9.55784410e-12! 2.09791681e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27000015e-12! 0.00000000e+00! 2.91000015e-12! 0.00000000e+00! 3.44000002e-12! 3.99020018e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29525700e+02! 1.16880000e+01! 2.61330000e+00! 7.66290000e+02! 2.86600000e+02! 3.14500000e-08! 1.05620000e-07! 1.74280000e-02! 5.82310000e-11! 8.29090000e-05! 1.19400000e-02! 0.00000000e+00! 4.10499995e-10! 7.40539963e-10! 6.42699990e-11! 8.10000070e-12! 1.26800003e-11! 4.59800011e-11! 5.58000000e-12! 2.16720010e-11! 1.29800004e-09! 0.00000000e+00! 1.01929998e-09! 1.17560003e-10! 6.68506500e-11! 3.00343500e-11! 4.39999981e-11! 1.62460004e-10! 1.48356032e-11! 9.58305831e-12! 2.10198317e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.27000015e-12! 0.00000000e+00! 2.91000015e-12! 0.00000000e+00! 3.44000002e-12! 2.49339993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29526400e+02! 1.17540000e+01! 2.61580000e+00! 7.66310000e+02! 2.86510000e+02! 3.11580000e-08! 1.06630000e-07! 1.73690000e-02! 5.53190000e-11! 8.68770000e-05! 1.23620000e-02! 0.00000000e+00! 4.20999985e-10! 6.95260294e-10! 5.70898259e-11! 1.67664112e-11! 2.54908039e-11! 9.35520272e-11! 1.94845511e-11! 1.69180000e-11! 0.00000000e+00! 0.00000000e+00! 1.00469999e-09! 0.00000000e+00! 4.86505211e-11! 2.18574811e-11! 0.00000000e+00! 1.77109133e-10! 1.46942632e-11! 9.52849865e-12! 2.09318396e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.02459957e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29527100e+02! 1.18210000e+01! 2.61660000e+00! 7.66330000e+02! 2.86400000e+02! 3.06800000e-08! 1.05530000e-07! 1.75240000e-02! 6.75730000e-11! 7.90930000e-05! 1.13390000e-02! 0.00000000e+00! 4.23499985e-10! 6.89666879e-10! 5.60837106e-11! 1.59233269e-11! 2.32732601e-11! 8.83732254e-11! 1.83655764e-11! 8.24999964e-12! 0.00000000e+00! 0.00000000e+00! 1.03010001e-09! 0.00000000e+00! 3.15102285e-11! 1.41567695e-11! 4.39999981e-11! 1.69380399e-10! 1.44365561e-11! 9.42901920e-12! 2.07713985e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.80619944e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29527800e+02! 1.18880000e+01! 2.61840000e+00! 7.66530000e+02! 2.86360000e+02! 3.20380000e-08! 1.09720000e-07! 1.77210000e-02! 6.45970000e-11! 8.18980000e-05! 1.18160000e-02! 0.00000000e+00! 4.21500002e-10! 7.10972892e-10! 5.99160929e-11! 1.91347094e-11! 3.17200918e-11! 1.08099744e-10! 2.26278527e-11! 8.18029932e-12! 0.00000000e+00! 0.00000000e+00! 1.07340004e-09! 0.00000000e+00! 3.64340710e-11! 1.63689305e-11! 6.19999954e-11! 1.98819849e-10! 1.44344849e-11! 9.42821862e-12! 2.07701079e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.87540017e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29534700e+02! 1.25440000e+01! 2.64310000e+00! 7.85980000e+02! 2.88240000e+02! 3.17230000e-08! 1.02440000e-07! 1.75010000e-02! 6.76130000e-11! 7.60980000e-05! 1.12480000e-02! 0.00000000e+00! 5.83499971e-10! 6.73954281e-10! 5.32574401e-11! 1.35550269e-11! 1.70439739e-11! 7.38255013e-11! 1.52222731e-11! 2.40670001e-11! 0.00000000e+00! 0.00000000e+00! 1.00429998e-09! 0.00000000e+00! 5.74997645e-12! 2.58332288e-12! 3.99999964e-11! 1.47669696e-10! 1.49068102e-11! 9.61054500e-12! 2.10641626e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.75330010e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29535400e+02! 1.25090000e+01! 2.67520000e+00! 8.12720000e+02! 2.90320000e+02! 3.09640000e-08! 1.00900000e-07! 1.84810000e-02! 5.87640000e-11! 8.80320000e-05! 1.21620000e-02! 0.00000000e+00! 5.84999993e-10! 6.66123490e-10! 5.18488794e-11! 1.23747098e-11! 1.39394113e-11! 6.65751829e-11! 1.36557094e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.14430010e-09! 0.00000000e+00! 8.93618946e-12! 4.01480975e-12! 3.40000007e-11! 1.36849476e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.61150015e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29536100e+02! 1.24460000e+01! 2.66360000e+00! 8.41610000e+02! 2.92070000e+02! 2.88660000e-08! 1.04280000e-07! 2.19900000e-02! 7.38070000e-11! 7.43420000e-05! 1.06420000e-02! 0.00000000e+00! 5.83499971e-10! 6.83310686e-10! 5.49403960e-11! 1.49652773e-11! 2.07533227e-11! 8.24882176e-11! 1.70940137e-11! 6.42300033e-11! 0.00000000e+00! 0.00000000e+00! 1.11359999e-09! 0.00000000e+00! 3.41267084e-11! 1.53322893e-11! 0.00000000e+00! 1.60597743e-10! 1.61008915e-11! 1.00714827e-11! 2.18075592e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.71969998e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29536800e+02! 1.23850000e+01! 2.65020000e+00! 8.58260000e+02! 2.92890000e+02! 2.62820000e-08! 1.11890000e-07! 2.45530000e-02! 8.99600000e-11! 6.44850000e-05! 9.46920000e-03! 0.00000000e+00! 5.78499970e-10! 7.22007287e-10! 6.19008803e-11! 2.07978860e-11! 3.60947001e-11! 1.18316107e-10! 2.48352849e-11! 5.87700028e-11! 0.00000000e+00! 0.00000000e+00! 1.12040000e-09! 0.00000000e+00! 7.70453978e-11! 3.46145994e-11! 4.50000003e-11! 2.14066528e-10! 1.59385612e-11! 1.00088193e-11! 2.17064994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.24430038e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29537500e+02! 1.23230000e+01! 2.63730000e+00! 8.58210000e+02! 2.92630000e+02! 2.50000000e-08! 1.15040000e-07! 2.57320000e-02! 8.93930000e-11! 7.02240000e-05! 1.03930000e-02! 0.00000000e+00! 5.68500025e-10! 7.38024919e-10! 6.47820270e-11! 2.32121718e-11! 4.24449434e-11! 1.33146300e-10! 2.80396227e-11! 7.30660046e-11! 0.00000000e+00! 0.00000000e+00! 1.16380006e-09! 0.00000000e+00! 8.13509954e-11! 3.65489999e-11! 4.50000003e-11! 2.36198811e-10! 1.63635928e-11! 1.01728894e-11! 2.19711107e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.02459999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29538200e+02! 1.22600000e+01! 2.62410000e+00! 8.58460000e+02! 2.92910000e+02! 2.58390000e-08! 1.11950000e-07! 2.35870000e-02! 1.01880000e-10! 6.99530000e-05! 1.01940000e-02! 0.00000000e+00! 5.58500024e-10! 7.22312377e-10! 6.19557600e-11! 2.08438718e-11! 3.62156589e-11! 1.18598589e-10! 2.48963194e-11! 4.14100004e-11! 0.00000000e+00! 0.00000000e+00! 1.14999998e-09! 0.00000000e+00! 6.16025078e-11! 2.76764896e-11! 4.09999985e-11! 2.14488094e-10! 1.54224324e-11! 9.80958457e-12! 2.13851731e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.77379966e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29538900e+02! 1.21950000e+01! 2.61360000e+00! 8.58430000e+02! 2.92810000e+02! 2.62710000e-08! 1.09980000e-07! 2.37810000e-02! 8.80230000e-11! 7.36920000e-05! 1.07470000e-02! 0.00000000e+00! 5.47999979e-10! 7.12295001e-10! 6.01539027e-11! 1.93339841e-11! 3.22442351e-11! 1.09323821e-10! 2.28923373e-11! 5.30159978e-11! 0.00000000e+00! 0.00000000e+00! 1.13139997e-09! 0.00000000e+00! 5.93965779e-11! 2.66854195e-11! 3.29999986e-11! 2.00646638e-10! 1.57674880e-11! 9.94278358e-12! 2.15999944e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.61969993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29539600e+02! 1.21300000e+01! 2.61590000e+00! 8.58490000e+02! 2.92620000e+02! 2.49500000e-08! 1.15080000e-07! 2.52650000e-02! 8.08140000e-11! 5.93670000e-05! 9.09020000e-03! 0.00000000e+00! 5.37499989e-10! 7.38228312e-10! 6.48186158e-11! 2.32428278e-11! 4.25255803e-11! 1.33334621e-10! 2.80803124e-11! 7.78329970e-11! 0.00000000e+00! 0.00000000e+00! 1.06849996e-09! 0.00000000e+00! 1.53166188e-10! 6.88137949e-11! 3.29999986e-11! 2.36479863e-10! 1.65053197e-11! 1.02275991e-11! 2.20593457e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.07919999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29541700e+02! 1.19350000e+01! 2.61710000e+00! 8.58580000e+02! 2.92830000e+02! 2.57240000e-08! 1.12780000e-07! 2.34730000e-02! 8.69750000e-11! 6.85120000e-05! 1.00300000e-02! 0.00000000e+00! 5.19000010e-10! 7.26532889e-10! 6.27149166e-11! 2.14800174e-11! 3.78888969e-11! 1.22506227e-10! 2.57406388e-11! 1.36559999e-11! 0.00000000e+00! 0.00000000e+00! 1.11319998e-09! 0.00000000e+00! 6.09801307e-11! 2.73968695e-11! 3.59999981e-11! 2.20319776e-10! 1.45972817e-11! 9.49106158e-12! 2.08714591e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.41309938e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29542400e+02! 1.18710000e+01! 2.61630000e+00! 8.58500000e+02! 2.92930000e+02! 2.67470000e-08! 1.11550000e-07! 2.31490000e-02! 7.60650000e-11! 6.72000000e-05! 9.90630000e-03! 0.00000000e+00! 5.24499999e-10! 7.77739984e-10! 6.94600003e-11! 9.39000006e-12! 1.53400001e-11! 4.99099997e-11! 6.28000039e-12! 5.34430000e-11! 3.54239993e-09! 0.00000000e+00! 1.10349996e-09! 1.33580003e-09! 6.89206470e-11! 3.09643491e-11! 4.69999976e-11! 1.89130003e-10! 1.57801845e-11! 9.94768330e-12! 2.16078978e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.04000011e-12! 0.00000000e+00! 3.32999990e-12! 0.00000000e+00! 3.79999981e-12! 6.92789992e-11! 1.13999999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29543100e+02! 1.18070000e+01! 2.61650000e+00! 8.58510000e+02! 2.92480000e+02! 2.58530000e-08! 1.14280000e-07! 2.41330000e-02! 6.61300000e-11! 7.23790000e-05! 1.06020000e-02! 0.00000000e+00! 5.31000022e-10! 7.77739984e-10! 6.94600003e-11! 9.39000006e-12! 1.53400001e-11! 4.99099997e-11! 6.28000039e-12! 1.39339998e-10! 3.54239993e-09! 0.00000000e+00! 1.12300003e-09! 1.33580003e-09! 1.27912195e-10! 5.74678014e-11! 0.00000000e+00! 1.89130003e-10! 1.83339767e-11! 1.09334946e-11! 2.31978117e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.04000011e-12! 0.00000000e+00! 3.32999990e-12! 0.00000000e+00! 3.79999981e-12! 9.14429990e-11! 1.13999999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29543800e+02! 1.17420000e+01! 2.61690000e+00! 8.58410000e+02! 2.92330000e+02! 2.45640000e-08! 1.16360000e-07! 2.52100000e-02! 7.46800000e-11! 5.85140000e-05! 8.69880000e-03! 0.00000000e+00! 5.35499978e-10! 7.44737050e-10! 6.59893737e-11! 2.42238712e-11! 4.51059988e-11! 1.39360870e-10! 2.93823924e-11! 6.03640027e-10! 0.00000000e+00! 0.00000000e+00! 1.13470000e-09! 0.00000000e+00! 1.64399397e-10! 7.38605982e-11! 3.19999999e-11! 2.45473281e-10! 3.21380249e-11! 1.62621080e-11! 3.17917775e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.26890015e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29544400e+02! 1.16760000e+01! 2.61630000e+00! 8.58500000e+02! 2.92450000e+02! 2.57000000e-08! 1.14350000e-07! 2.37690000e-02! 8.99320000e-11! 6.35740000e-05! 9.42200000e-03! 0.00000000e+00! 5.37499989e-10! 7.34516281e-10! 6.41509276e-11! 2.26833274e-11! 4.10539380e-11! 1.29897787e-10! 2.73377206e-11! 3.40619997e-11! 0.00000000e+00! 0.00000000e+00! 1.10840004e-09! 0.00000000e+00! 9.76074013e-11! 4.38526021e-11! 0.00000000e+00! 2.31350786e-10! 1.52039700e-11! 9.72525359e-12! 2.12491639e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.90209982e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29545100e+02! 1.16100000e+01! 2.61870000e+00! 8.58370000e+02! 2.92360000e+02! 2.57950000e-08! 1.14620000e-07! 2.35190000e-02! 7.71150000e-11! 6.21690000e-05! 9.25650000e-03! 0.00000000e+00! 5.37499989e-10! 7.35889238e-10! 6.43978829e-11! 2.28902661e-11! 4.15982422e-11! 1.31168951e-10! 2.76123794e-11! 1.03109995e-11! 0.00000000e+00! 0.00000000e+00! 1.05639997e-09! 0.00000000e+00! 9.21287976e-11! 4.13911995e-11! 4.69999976e-11! 2.33247838e-10! 1.44978309e-11! 9.45267215e-12! 2.08095451e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.33110023e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29545800e+02! 1.15440000e+01! 2.62440000e+00! 8.58360000e+02! 2.92350000e+02! 2.57120000e-08! 1.17120000e-07! 2.36840000e-02! 5.68780000e-11! 6.35570000e-05! 9.44980000e-03! 0.00000000e+00! 5.31500011e-10! 7.48601681e-10! 6.66844982e-11! 2.48063653e-11! 4.66381170e-11! 1.42938952e-10! 3.01555031e-11! 2.72129992e-11! 0.00000000e+00! 0.00000000e+00! 1.02999997e-09! 0.00000000e+00! 1.17072296e-10! 5.25976970e-11! 4.69999976e-11! 2.50813148e-10! 1.50003430e-11! 9.64665067e-12! 2.11223938e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.12300011e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29546500e+02! 1.14790000e+01! 2.63350000e+00! 8.58410000e+02! 2.92760000e+02! 2.66010000e-08! 1.15700000e-07! 2.26870000e-02! 5.76700000e-11! 6.37550000e-05! 9.46090000e-03! 0.00000000e+00! 5.19999988e-10! 7.41380957e-10! 6.53856969e-11! 2.37180206e-11! 4.37754694e-11! 1.36253592e-10! 2.87110075e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.09680010e-09! 0.00000000e+00! 5.35709081e-11! 2.40680895e-11! 0.00000000e+00! 2.40836046e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.35569999e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29549300e+02! 1.12220000e+01! 2.67020000e+00! 8.58440000e+02! 2.92040000e+02! 2.55380000e-08! 1.19490000e-07! 2.36140000e-02! 7.43520000e-11! 7.21340000e-05! 1.10030000e-02! 0.00000000e+00! 5.26500010e-10! 7.60652985e-10! 6.88522225e-11! 2.66228289e-11! 5.14159201e-11! 1.54096902e-10! 3.25663871e-11! 2.68300000e-11! 0.00000000e+00! 0.00000000e+00! 1.07950004e-09! 0.00000000e+00! 3.85958383e-11! 1.73401606e-11! 5.09999959e-11! 2.67465022e-10! 1.49889563e-11! 9.64225488e-12! 2.11153057e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.58720031e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29550000e+02! 1.11580000e+01! 2.68050000e+00! 8.58430000e+02! 2.91880000e+02! 2.53050000e-08! 1.22960000e-07! 2.41110000e-02! 8.78780000e-11! 7.66470000e-05! 1.15930000e-02! 0.00000000e+00! 5.34000011e-10! 7.78297926e-10! 7.20260587e-11! 2.92823751e-11! 5.84112689e-11! 1.70433667e-10! 3.60962440e-11! 6.76829981e-11! 0.00000000e+00! 0.00000000e+00! 1.05059994e-09! 0.00000000e+00! 9.17147955e-11! 4.12051990e-11! 0.00000000e+00! 2.91845659e-10! 1.62035524e-11! 1.01111107e-11! 2.18714734e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.71669967e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29550700e+02! 1.10940000e+01! 2.69400000e+00! 8.58430000e+02! 2.92180000e+02! 2.58120000e-08! 1.23130000e-07! 2.34840000e-02! 8.90430000e-11! 5.77780000e-05! 8.80210000e-03! 0.00000000e+00! 5.33500022e-10! 7.79162346e-10! 7.21815455e-11! 2.94126702e-11! 5.87539808e-11! 1.71234027e-10! 3.62691752e-11! 3.73930019e-11! 0.00000000e+00! 0.00000000e+00! 1.15819998e-09! 0.00000000e+00! 1.04735089e-10! 4.70548982e-11! 5.69999985e-11! 2.93040120e-10! 1.53030037e-11! 9.76348342e-12! 2.13108212e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.18849971e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29551400e+02! 1.10300000e+01! 2.70760000e+00! 8.58510000e+02! 2.91910000e+02! 2.51020000e-08! 1.26360000e-07! 2.46530000e-02! 7.39200000e-11! 6.15780000e-05! 9.44120000e-03! 0.00000000e+00! 5.22999977e-10! 9.34920030e-10! 9.34700026e-11! 1.37799997e-11! 2.21599995e-11! 9.77199988e-11! 1.09799999e-11! 2.27179997e-10! 9.55510004e-10! 0.00000000e+00! 1.02959996e-09! 2.46850013e-10! 2.32902586e-10! 1.04637403e-10! 6.59999971e-11! 2.44439996e-10! 2.09455370e-11! 1.19416048e-11! 2.48236865e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.39999990e-12! 0.00000000e+00! 2.29000000e-12! 0.00000000e+00! 5.34999996e-12! 1.19949994e-10! 2.00100006e-11! 3.20999997e-12! 5.21999978e-12! 5.21999978e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29552100e+02! 1.09660000e+01! 2.72120000e+00! 8.58570000e+02! 2.91860000e+02! 2.51220000e-08! 1.24410000e-07! 2.43780000e-02! 1.04950000e-10! 7.06530000e-05! 1.13280000e-02! 0.00000000e+00! 5.04499997e-10! 9.34920030e-10! 9.34700026e-11! 1.37799997e-11! 2.21599995e-11! 9.77199988e-11! 1.09799999e-11! 2.68790018e-10! 9.55510004e-10! 0.00000000e+00! 1.08769993e-09! 2.46850013e-10! 2.14886692e-10! 9.65432942e-11! 0.00000000e+00! 2.44439996e-10! 2.21826394e-11! 1.24191482e-11! 2.55938673e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.39999990e-12! 0.00000000e+00! 2.29000000e-12! 0.00000000e+00! 5.34999996e-12! 9.58850013e-11! 2.00100006e-11! 3.20999997e-12! 5.21999978e-12! 5.21999978e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29552800e+02! 1.09020000e+01! 2.73450000e+00! 8.58470000e+02! 2.91620000e+02! 2.43760000e-08! 1.23300000e-07! 2.46640000e-02! 9.70230000e-11! 7.54930000e-05! 1.18970000e-02! 0.00000000e+00! 4.86000018e-10! 7.80026765e-10! 7.23370391e-11! 2.95429653e-11! 5.90966928e-11! 1.72034387e-10! 3.64421063e-11! 2.16740001e-10! 0.00000000e+00! 0.00000000e+00! 1.11249998e-09! 0.00000000e+00! 2.10905390e-10! 9.47546000e-11! 4.59999989e-11! 2.94234553e-10! 2.06351464e-11! 1.18217875e-11! 2.46304470e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.05150000e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29553500e+02! 1.08380000e+01! 2.74730000e+00! 8.58460000e+02! 2.92130000e+02! 2.58260000e-08! 1.19920000e-07! 2.33640000e-02! 9.27370000e-11! 6.32060000e-05! 9.87000000e-03! 0.00000000e+00! 4.69499994e-10! 7.62839569e-10! 6.92455190e-11! 2.69523986e-11! 5.22827788e-11! 1.56121352e-10! 3.30038046e-11! 5.80159983e-11! 0.00000000e+00! 0.00000000e+00! 1.03690001e-09! 0.00000000e+00! 8.70848949e-11! 3.91250990e-11! 4.79999998e-11! 2.70486272e-10! 1.59161434e-11! 1.00001656e-11! 2.16925436e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.44100007e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29561100e+02! 1.01590000e+01! 2.61720000e+00! 8.58460000e+02! 2.91880000e+02! 2.58200000e-08! 1.25840000e-07! 2.34620000e-02! 6.85150000e-11! 4.30620000e-05! 7.37460000e-03! 0.00000000e+00! 4.67999972e-10! 7.92942600e-10! 7.46602502e-11! 3.14897240e-11! 6.42172010e-11! 1.83992710e-10! 3.90259249e-11! 1.90669994e-10! 0.00000000e+00! 0.00000000e+00! 1.08869991e-09! 0.00000000e+00! 1.83871196e-10! 8.26088017e-11! 3.49999994e-11! 3.12080889e-10! 1.98600615e-11! 1.15225902e-11! 2.41479042e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.59999996e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29561800e+02! 1.00930000e+01! 2.61730000e+00! 8.58500000e+02! 2.91840000e+02! 2.55430000e-08! 1.27530000e-07! 2.38380000e-02! 6.24260000e-11! 5.15910000e-05! 8.57910000e-03! 0.00000000e+00! 4.77499984e-10! 8.01536171e-10! 7.62060068e-11! 3.27850073e-11! 6.76241632e-11! 1.91949234e-10! 4.07450740e-11! 4.39480008e-10! 0.00000000e+00! 0.00000000e+00! 1.10539999e-09! 0.00000000e+00! 2.49352206e-10! 1.12027797e-10! 3.49999994e-11! 3.23955057e-10! 2.72574029e-11! 1.43780994e-11! 2.87532585e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.14019995e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29562500e+02! 1.00280000e+01! 2.61660000e+00! 8.58430000e+02! 2.91900000e+02! 2.55330000e-08! 1.28540000e-07! 2.35270000e-02! 6.31980000e-11! 6.57620000e-05! 1.07920000e-02! 0.00000000e+00! 4.83500018e-10! 8.06672007e-10! 7.71298095e-11! 3.35591138e-11! 6.96602706e-11! 1.96704306e-10! 4.17724987e-11! 1.48740006e-10! 0.00000000e+00! 0.00000000e+00! 1.15260002e-09! 0.00000000e+00! 2.17398294e-10! 9.76716971e-11! 4.59999989e-11! 3.31051409e-10! 1.86134476e-11! 1.10413753e-11! 2.33717993e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.50490017e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29563200e+02! 9.96230000e+00! 2.61870000e+00! 8.58480000e+02! 2.92160000e+02! 2.65760000e-08! 1.24460000e-07! 2.26510000e-02! 1.01080000e-10! 5.41900000e-05! 9.06790000e-03! 0.00000000e+00! 4.71000017e-10! 7.85925325e-10! 7.33980307e-11! 3.04320354e-11! 6.14351903e-11! 1.77495671e-10! 3.76221172e-11! 2.23279988e-11! 0.00000000e+00! 0.00000000e+00! 1.08169995e-09! 0.00000000e+00! 1.12525197e-10! 5.05547999e-11! 0.00000000e+00! 3.02384867e-10! 1.48551067e-11! 9.59058787e-12! 2.10319748e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.90979990e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29563900e+02! 9.89700000e+00! 2.61800000e+00! 8.58490000e+02! 2.91890000e+02! 2.65410000e-08! 1.24390000e-07! 2.29480000e-02! 8.24420000e-11! 6.50520000e-05! 1.07740000e-02! 0.00000000e+00! 4.48499987e-10! 7.85569387e-10! 7.33340055e-11! 3.03783838e-11! 6.12940740e-11! 1.77166101e-10! 3.75509103e-11! 1.02230002e-10! 0.00000000e+00! 0.00000000e+00! 1.17619992e-09! 0.00000000e+00! 1.35032999e-10! 6.06669992e-11! 3.90000011e-11! 3.01893038e-10! 1.72306631e-11! 1.05075948e-11! 2.25109219e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.94920016e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29564600e+02! 9.83170000e+00! 2.61840000e+00! 8.58470000e+02! 2.91940000e+02! 2.60960000e-08! 1.28110000e-07! 2.29140000e-02! 8.30060000e-11! 7.06840000e-05! 1.15340000e-02! 0.00000000e+00! 4.29000002e-10! 8.04485478e-10! 7.67365060e-11! 3.32295406e-11! 6.87934085e-11! 1.94679869e-10! 4.13350777e-11! 9.79789930e-11! 0.00000000e+00! 0.00000000e+00! 1.07050002e-09! 0.00000000e+00! 1.26097494e-10! 5.66524987e-11! 0.00000000e+00! 3.28030214e-10! 1.71042781e-11! 1.04588083e-11! 2.24322384e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.06559997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29565300e+02! 9.76670000e+00! 2.61680000e+00! 8.58540000e+02! 2.91750000e+02! 2.61230000e-08! 1.28650000e-07! 2.33920000e-02! 7.41350000e-11! 5.92660000e-05! 1.00190000e-02! 0.00000000e+00! 4.29499991e-10! 8.07231393e-10! 7.72304165e-11! 3.36434179e-11! 6.98820168e-11! 1.97222183e-10! 4.18843953e-11! 2.27050004e-10! 0.00000000e+00! 0.00000000e+00! 1.06150000e-09! 0.00000000e+00! 1.58644792e-10! 7.12751941e-11! 5.09999959e-11! 3.31824318e-10! 2.09416737e-11! 1.19401121e-11! 2.48212787e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.33030004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29566000e+02! 9.70190000e+00! 2.61180000e+00! 8.58430000e+02! 2.91640000e+02! 2.57620000e-08! 1.34110000e-07! 2.36240000e-02! 7.60240000e-11! 5.46610000e-05! 9.33340000e-03! 0.00000000e+00! 4.46500004e-10! 1.03200004e-09! 1.17540006e-10! 2.36100011e-11! 3.78100017e-11! 1.84789989e-10! 2.02900006e-11! 4.32890002e-10! 8.02000022e-10! 0.00000000e+00! 1.02630004e-09! 1.13240001e-10! 2.13810289e-10! 9.60596949e-11! 4.29999994e-11! 3.32790018e-10! 2.70614781e-11! 1.43024681e-11! 2.86312796e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.32999990e-12! 3.19000013e-12! 4.11000010e-12! 0.00000000e+00! 8.90999947e-12! 1.24870003e-10! 2.46400001e-11! 4.44000002e-12! 2.45499996e-12! 2.45499996e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29568100e+02! 9.50780000e+00! 2.61690000e+00! 8.58400000e+02! 2.91500000e+02! 2.67370000e-08! 1.32230000e-07! 2.33020000e-02! 5.32400000e-11! 2.65040000e-05! 4.73320000e-03! 0.00000000e+00! 5.54500001e-10! 8.25435553e-10! 8.05048667e-11! 3.63872751e-11! 7.70991188e-11! 2.14076826e-10! 4.55261488e-11! 3.97530009e-10! 0.00000000e+00! 0.00000000e+00! 1.11530007e-09! 0.00000000e+00! 2.90262286e-10! 1.30407699e-10! 4.39999981e-11! 3.56977808e-10! 2.60101923e-11! 1.38966529e-11! 2.79767823e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.66929998e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29568800e+02! 9.44390000e+00! 2.62880000e+00! 8.58460000e+02! 2.91360000e+02! 2.73940000e-08! 1.50390000e-07! 2.37910000e-02! 6.22520000e-11! 6.55370000e-05! 1.14210000e-02! 0.00000000e+00! 6.07499995e-10! 9.17778631e-10! 9.71149064e-11! 5.03058255e-11! 1.13708779e-10! 2.99574088e-10! 6.39994099e-11! 1.16540000e-10! 0.00000000e+00! 0.00000000e+00! 1.07830000e-09! 0.00000000e+00! 2.05413006e-10! 9.22870044e-11! 0.00000000e+00! 4.84572160e-10! 1.76561127e-11! 1.06718263e-11! 2.27757934e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.22079999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29569400e+02! 9.38120000e+00! 2.63020000e+00! 8.58600000e+02! 2.91450000e+02! 2.72280000e-08! 1.50630000e-07! 2.32750000e-02! 7.57760000e-11! 7.52620000e-05! 1.32160000e-02! 0.00000000e+00! 6.62499999e-10! 9.18999044e-10! 9.73344252e-11! 5.04897686e-11! 1.14192607e-10! 3.00704045e-10! 6.42435480e-11! 2.04149989e-10! 0.00000000e+00! 0.00000000e+00! 1.13269993e-09! 0.00000000e+00! 1.92882599e-10! 8.66574035e-11! 7.90000010e-11! 4.86258422e-10! 2.02608329e-11! 1.16772963e-11! 2.43974112e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.25849997e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29570100e+02! 9.37810000e+00! 2.58870000e+00! 8.58330000e+02! 2.91530000e+02! 2.74180000e-08! 1.37520000e-07! 2.31660000e-02! 1.03050000e-10! 6.48140000e-05! 1.23570000e-02! 0.00000000e+00! 7.12999992e-10! 8.52335036e-10! 8.53433574e-11! 4.04417402e-11! 8.77634979e-11! 2.38982140e-10! 5.09074033e-11! 8.92790009e-11! 0.00000000e+00! 0.00000000e+00! 1.16679999e-09! 0.00000000e+00! 1.25600697e-10! 5.64292987e-11! 0.00000000e+00! 3.94145994e-10! 1.68456187e-11! 1.03589611e-11! 2.22712057e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.76230000e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29573600e+02! 9.69160000e+00! 2.60950000e+00! 9.52350000e+02! 2.99260000e+02! 2.26550000e-08! 1.45850000e-07! 2.71720000e-02! 4.83860000e-11! 3.48160000e-05! 7.49380000e-03! 0.00000000e+00! 8.84499973e-10! 8.94692875e-10! 9.29623947e-11! 4.68261853e-11! 1.04556357e-10! 2.78199797e-10! 5.93810973e-11! 1.84200000e-09! 0.00000000e+00! 0.00000000e+00! 1.08200005e-09! 0.00000000e+00! 5.84430004e-10! 2.62569994e-10! 3.49999994e-11! 4.52673593e-10! 6.89555496e-11! 3.04743453e-11! 5.47132235e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.15000003e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29575000e+02! 9.81780000e+00! 2.63170000e+00! 9.52940000e+02! 2.99410000e+02! 2.30470000e-08! 1.53920000e-07! 2.71500000e-02! 5.98230000e-11! 3.43970000e-05! 7.22110000e-03! 0.00000000e+00! 8.36999969e-10! 9.35728606e-10! 1.00343622e-10! 5.30113557e-11! 1.20825086e-10! 3.16193349e-10! 6.75903014e-11! 7.28999971e-10! 0.00000000e+00! 0.00000000e+00! 1.10669995e-09! 0.00000000e+00! 3.65672409e-10! 1.64287597e-10! 5.09999959e-11! 5.09374376e-10! 3.58650852e-11! 1.77008217e-11! 3.41121333e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.46850004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29575700e+02! 9.88000000e+00! 2.64310000e+00! 9.53950000e+02! 2.99360000e+02! 2.22050000e-08! 1.55020000e-07! 2.78950000e-02! 4.71820000e-11! 3.46080000e-05! 7.20500000e-03! 0.00000000e+00! 7.97500010e-10! 9.41322020e-10! 1.01349741e-10! 5.38544417e-11! 1.23042632e-10! 3.21372151e-10! 6.87092744e-11! 7.92609978e-10! 0.00000000e+00! 0.00000000e+00! 1.13830001e-09! 0.00000000e+00! 4.51846477e-10! 2.03003489e-10! 5.89999993e-11! 5.17103083e-10! 3.77562634e-11! 1.84308523e-11! 3.52895213e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.13660005e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29576400e+02! 9.94190000e+00! 2.65340000e+00! 9.54310000e+02! 2.99070000e+02! 2.19440000e-08! 1.51180000e-07! 2.77280000e-02! 6.67120000e-11! 3.76830000e-05! 8.00650000e-03! 0.00000000e+00! 7.67999997e-10! 9.21795695e-10! 9.78374812e-11! 5.09113134e-11! 1.15301373e-10! 3.03293418e-10! 6.48030379e-11! 9.06769992e-10! 0.00000000e+00! 0.00000000e+00! 1.07130005e-09! 0.00000000e+00! 4.58463600e-10! 2.05976389e-10! 0.00000000e+00! 4.90122776e-10! 4.11503435e-11! 1.97410283e-11! 3.74025672e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.31889999e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29577100e+02! 1.00040000e+01! 2.66460000e+00! 9.54490000e+02! 2.99230000e+02! 2.10320000e-08! 1.54020000e-07! 2.85370000e-02! 5.24060000e-11! 3.70400000e-05! 7.88890000e-03! 0.00000000e+00! 7.50999984e-10! 1.20449994e-09! 1.49560003e-10! 2.66399992e-11! 4.71500027e-11! 2.77170009e-10! 3.64300014e-11! 1.23180000e-09! 5.64539970e-10! 0.00000000e+00! 1.12690002e-09! 9.32499980e-11! 4.62093003e-10! 2.07607001e-10! 3.29999986e-11! 3.89349997e-10! 5.08137699e-11! 2.34712874e-11! 4.34187165e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.38000027e-12! 3.76000012e-12! 4.69999994e-12! 0.00000000e+00! 1.00200005e-11! 1.31740008e-10! 3.49799981e-11! 6.55999994e-12! 7.05499981e-12! 7.05499981e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29577800e+02! 1.00650000e+01! 2.67640000e+00! 9.52460000e+02! 2.99350000e+02! 2.11910000e-08! 1.47530000e-07! 2.76040000e-02! 5.64070000e-11! 3.92040000e-05! 8.44750000e-03! 0.00000000e+00! 7.42000017e-10! 1.20449994e-09! 1.49560003e-10! 2.66399992e-11! 4.71500027e-11! 2.77170009e-10! 3.64300014e-11! 9.94900051e-10! 5.64539970e-10! 0.00000000e+00! 1.14109999e-09! 9.32499980e-11! 4.90093188e-10! 2.20186799e-10! 3.29999986e-11! 3.89349997e-10! 4.37705254e-11! 2.07524657e-11! 3.90338144e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 4.38000027e-12! 3.76000012e-12! 4.69999994e-12! 0.00000000e+00! 1.00200005e-11! 1.34070005e-10! 3.49799981e-11! 6.55999994e-12! 7.05499981e-12! 7.05499981e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29578500e+02! 1.01250000e+01! 2.68800000e+00! 9.51520000e+02! 2.99100000e+02! 2.05700000e-08! 1.48230000e-07! 2.79590000e-02! 5.14850000e-11! 3.53570000e-05! 7.60170000e-03! 0.00000000e+00! 7.38499983e-10! 9.06795083e-10! 9.51392645e-11! 4.86503129e-11! 1.09354324e-10! 2.89404833e-10! 6.18021537e-11! 1.18380006e-09! 0.00000000e+00! 0.00000000e+00! 1.09200005e-09! 0.00000000e+00! 5.63902480e-10! 2.53347482e-10! 3.29999986e-11! 4.69395744e-10! 4.93866892e-11! 2.29204086e-11! 4.25302571e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.35360001e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29580600e+02! 1.03080000e+01! 2.72090000e+00! 9.50120000e+02! 2.98830000e+02! 2.10080000e-08! 1.43840000e-07! 2.80630000e-02! 9.88010000e-11! 2.98790000e-05! 6.44530000e-03! 0.00000000e+00! 6.84500012e-10! 8.84472051e-10! 9.11239556e-11! 4.52856398e-11! 1.00504299e-10! 2.68736727e-10! 5.73364203e-11! 1.07080000e-09! 0.00000000e+00! 0.00000000e+00! 1.12380005e-09! 0.00000000e+00! 4.94867980e-10! 2.22332000e-10! 4.50000003e-11! 4.38551057e-10! 4.60270988e-11! 2.16235467e-11! 4.04386871e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.21970004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29581300e+02! 1.03700000e+01! 2.73320000e+00! 9.49360000e+02! 2.97730000e+02! 2.20290000e-08! 1.42500000e-07! 2.71630000e-02! 8.51470000e-11! 3.82440000e-05! 8.54750000e-03! 0.00000000e+00! 6.25999974e-10! 8.77658224e-10! 8.98983249e-11! 4.42586141e-11! 9.78029324e-11! 2.62427968e-10! 5.59733093e-11! 5.32559996e-10! 0.00000000e+00! 0.00000000e+00! 1.13430010e-09! 0.00000000e+00! 3.26142308e-10! 1.46527707e-10! 3.99999964e-11! 4.29136088e-10! 3.00247535e-11! 1.54463456e-11! 3.04761216e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.32699990e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29581900e+02! 1.04320000e+01! 2.73230000e+00! 9.51920000e+02! 2.97040000e+02! 2.42350000e-08! 1.33820000e-07! 2.65650000e-02! 1.09540000e-10! 3.26800000e-05! 7.37710000e-03! 0.00000000e+00! 5.68500025e-10! 1.03249997e-09! 1.16839996e-10! 2.19099999e-11! 3.54399982e-11! 1.69699990e-10! 2.33799993e-11! 2.72149997e-10! 8.40500003e-10! 0.00000000e+00! 1.03849995e-09! 1.02300002e-10! 2.66498712e-10! 1.19731294e-10! 0.00000000e+00! 2.93309987e-10! 2.22825352e-11! 1.24577093e-11! 2.56560589e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.72999982e-12! 2.36999981e-12! 3.35999978e-12! 0.00000000e+00! 5.84999974e-12! 9.14590001e-11! 2.24500002e-11! 5.03000029e-12! 4.69000012e-12! 4.69000012e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29582600e+02! 1.04930000e+01! 2.71510000e+00! 9.51840000e+02! 2.97150000e+02! 2.61800000e-08! 1.29600000e-07! 2.55800000e-02! 9.02560000e-11! 2.59690000e-05! 5.83850000e-03! 0.00000000e+00! 5.27499988e-10! 1.03249997e-09! 1.16839996e-10! 2.19099999e-11! 3.54399982e-11! 1.69699990e-10! 2.33799993e-11! 1.33660000e-10! 8.40500003e-10! 0.00000000e+00! 1.02909992e-09! 1.02300002e-10! 1.54173591e-10! 6.92663982e-11! 4.89999985e-11! 2.93309987e-10! 1.81651066e-11! 1.08683071e-11! 2.30926753e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.72999982e-12! 2.36999981e-12! 3.35999978e-12! 0.00000000e+00! 5.84999974e-12! 8.38690020e-11! 2.24500002e-11! 5.03000029e-12! 4.69000012e-12! 4.69000012e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29583300e+02! 1.05550000e+01! 2.70220000e+00! 9.51970000e+02! 2.97160000e+02! 2.61450000e-08! 1.26070000e-07! 2.56250000e-02! 8.77490000e-11! 2.50600000e-05! 5.37220000e-03! 0.00000000e+00! 5.14999987e-10! 7.94112109e-10! 7.48706236e-11! 3.16660032e-11! 6.46808718e-11! 1.85075552e-10! 3.92598905e-11! 1.40699993e-10! 0.00000000e+00! 0.00000000e+00! 1.09990006e-09! 0.00000000e+00! 1.50875396e-10! 6.77845974e-11! 0.00000000e+00! 3.13696902e-10! 1.83744114e-11! 1.09491027e-11! 2.32229826e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 7.11799994e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29584000e+02! 1.06180000e+01! 2.68980000e+00! 9.51320000e+02! 2.97280000e+02! 2.56690000e-08! 1.24930000e-07! 2.54100000e-02! 5.80700000e-11! 2.72070000e-05! 5.98440000e-03! 0.00000000e+00! 5.32999977e-10! 7.88315246e-10! 7.38279160e-11! 3.07922646e-11! 6.23826893e-11! 1.79708415e-10! 3.81002244e-11! 1.61919991e-10! 0.00000000e+00! 0.00000000e+00! 1.05019993e-09! 0.00000000e+00! 1.91109295e-10! 8.58607005e-11! 2.89999986e-11! 3.05687142e-10! 1.90053008e-11! 1.11926371e-11! 2.36157552e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 5.64920020e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29584700e+02! 1.06810000e+01! 2.67870000e+00! 9.52700000e+02! 2.97490000e+02! 2.31470000e-08! 1.31680000e-07! 2.79010000e-02! 3.71170000e-11! 3.03510000e-05! 6.70020000e-03! 0.00000000e+00! 5.62999980e-10! 8.22638790e-10! 8.00018107e-11! 3.59657339e-11! 7.59903460e-11! 2.11487425e-10! 4.49666623e-11! 8.03880018e-10! 0.00000000e+00! 0.00000000e+00! 1.07119991e-09! 0.00000000e+00! 3.77857773e-10! 1.69762190e-10! 0.00000000e+00! 3.53113427e-10! 3.80913322e-11! 1.85601950e-11! 3.54981218e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.98119965e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29588900e+02! 1.10640000e+01! 2.61870000e+00! 9.55920000e+02! 2.99560000e+02! 2.33860000e-08! 1.29480000e-07! 2.75310000e-02! 4.49750000e-11! 3.43470000e-05! 7.96640000e-03! 0.00000000e+00! 5.43500023e-10! 8.11451906e-10! 7.79895801e-11! 3.42795653e-11! 7.15552617e-11! 2.01129821e-10! 4.27287129e-11! 1.18869992e-09! 0.00000000e+00! 0.00000000e+00! 1.01459996e-09! 0.00000000e+00! 2.84583579e-10! 1.27856392e-10! 0.00000000e+00! 3.37655987e-10! 4.95323678e-11! 2.29766432e-11! 4.26209554e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.09670048e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29589600e+02! 1.11290000e+01! 2.62030000e+00! 9.59410000e+02! 2.99550000e+02! 2.20190000e-08! 1.34630000e-07! 2.92170000e-02! 3.95050000e-11! 3.33920000e-05! 7.82080000e-03! 0.00000000e+00! 5.69500003e-10! 8.37639458e-10! 8.27000274e-11! 3.82267308e-11! 8.19374013e-11! 2.25376023e-10! 4.79675466e-11! 1.22440003e-09! 0.00000000e+00! 0.00000000e+00! 1.14919996e-09! 0.00000000e+00! 3.73690190e-10! 1.67889799e-10! 4.59999989e-11! 3.73840514e-10! 5.05937618e-11! 2.33863606e-11! 4.32817462e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.52080004e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29590300e+02! 1.11940000e+01! 2.62270000e+00! 9.61940000e+02! 3.00020000e+02! 2.12840000e-08! 1.38580000e-07! 3.00910000e-02! 4.21320000e-11! 2.66580000e-05! 6.08840000e-03! 0.00000000e+00! 6.15999973e-10! 8.57725113e-10! 8.63128874e-11! 4.12541702e-11! 8.99004066e-11! 2.43972620e-10! 5.19856866e-11! 1.12440002e-09! 0.00000000e+00! 0.00000000e+00! 1.17429999e-09! 0.00000000e+00! 3.95245781e-10! 1.77574191e-10! 0.00000000e+00! 4.01593675e-10! 4.76206748e-11! 2.22386935e-11! 4.14307928e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.99020033e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29591000e+02! 1.12590000e+01! 2.62410000e+00! 9.62330000e+02! 3.00380000e+02! 2.10690000e-08! 1.41140000e-07! 2.91370000e-02! 4.71030000e-11! 2.17940000e-05! 5.24790000e-03! 0.00000000e+00! 6.59500010e-10! 8.70742589e-10! 8.86543963e-11! 4.32162535e-11! 9.50612436e-11! 2.56025118e-10! 5.45898465e-11! 4.23030000e-10! 0.00000000e+00! 0.00000000e+00! 1.08459997e-09! 0.00000000e+00! 3.49208995e-10! 1.56891000e-10! 5.00000007e-11! 4.19580537e-10! 2.67683289e-11! 1.41893077e-11! 2.84487746e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.35130004e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29591700e+02! 1.13220000e+01! 2.62380000e+00! 9.61840000e+02! 3.00430000e+02! 2.16890000e-08! 1.37800000e-07! 2.88070000e-02! 4.52110000e-11! 2.43160000e-05! 5.88190000e-03! 0.00000000e+00! 6.75000000e-10! 1.03219999e-09! 1.12790000e-10! 2.04599983e-11! 3.01699984e-11! 1.41529996e-10! 1.51799996e-11! 4.87969998e-10! 8.35299996e-10! 0.00000000e+00! 1.13800003e-09! 8.80700027e-11! 3.21360577e-10! 1.44379397e-10! 5.79999972e-11! 2.75500012e-10! 2.86990536e-11! 1.49346022e-11! 2.96507818e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.64000019e-12! 1.72000001e-12! 4.59000025e-12! 0.00000000e+00! 7.21999977e-12! 1.61510000e-10! 2.00400009e-11! 4.40999971e-12! 7.28499986e-12! 7.28499986e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29592400e+02! 1.13850000e+01! 2.62420000e+00! 9.61170000e+02! 3.00310000e+02! 2.13870000e-08! 1.35720000e-07! 2.93350000e-02! 5.59510000e-11! 3.12190000e-05! 7.50780000e-03! 0.00000000e+00! 6.61500021e-10! 1.03219999e-09! 1.12790000e-10! 2.04599983e-11! 3.01699984e-11! 1.41529996e-10! 1.51799996e-11! 4.60280009e-10! 8.35299996e-10! 0.00000000e+00! 1.18490007e-09! 8.80700027e-11! 3.70799086e-10! 1.66590894e-10! 0.00000000e+00! 2.75500012e-10! 2.78758041e-11! 1.46168130e-11! 2.91382543e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.64000019e-12! 1.72000001e-12! 4.59000025e-12! 0.00000000e+00! 7.21999977e-12! 1.15620000e-10! 2.00400009e-11! 4.40999971e-12! 7.28499986e-12! 7.28499986e-12! 0.00000000e+00! 0.00000000e+00!
+ 2.29593100e+02! 1.14480000e+01! 2.62430000e+00! 9.61550000e+02! 3.00290000e+02! 2.19530000e-08! 1.29810000e-07! 2.83860000e-02! 6.39980000e-11! 3.19250000e-05! 7.70830000e-03! 0.00000000e+00! 6.39000020e-10! 8.13129952e-10! 7.82914150e-11! 3.45324880e-11! 7.22205282e-11! 2.02683467e-10! 4.30644027e-11! 4.29540015e-10! 0.00000000e+00! 0.00000000e+00! 1.08130005e-09! 0.00000000e+00! 3.20015098e-10! 1.43774895e-10! 4.29999994e-11! 3.39974604e-10! 2.69618772e-11! 1.42640205e-11! 2.85692702e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 1.33869998e-10! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29593800e+02! 1.15100000e+01! 2.62480000e+00! 9.61230000e+02! 3.00270000e+02! 2.07840000e-08! 1.32300000e-07! 2.98220000e-02! 1.00620000e-10! 3.15090000e-05! 7.68160000e-03! 0.00000000e+00! 6.20499985e-10! 8.25791491e-10! 8.05688918e-11! 3.64409267e-11! 7.72402420e-11! 2.14406382e-10! 4.55973592e-11! 5.88919968e-10! 0.00000000e+00! 0.00000000e+00! 1.08319997e-09! 0.00000000e+00! 4.06644607e-10! 1.82695400e-10! 4.69999976e-11! 3.57469637e-10! 3.17003854e-11! 1.60931702e-11! 3.15193184e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.55569990e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29601400e+02! 1.22230000e+01! 2.62080000e+00! 9.61950000e+02! 3.02020000e+02! 2.15410000e-08! 1.22750000e-07! 2.88290000e-02! 9.97350000e-11! 2.73990000e-05! 7.07270000e-03! 0.00000000e+00! 5.65499980e-10! 7.77230058e-10! 7.18339832e-11! 2.91214240e-11! 5.79879200e-11! 1.69444986e-10! 3.58826233e-11! 4.08260009e-10! 0.00000000e+00! 0.00000000e+00! 1.19330001e-09! 0.00000000e+00! 2.51104804e-10! 1.12815202e-10! 1.79999991e-11! 2.90370172e-10! 2.63292044e-11! 1.40197983e-11! 2.81753908e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.75569964e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29602100e+02! 1.22880000e+01! 2.62100000e+00! 9.62360000e+02! 3.02110000e+02! 2.09460000e-08! 1.24940000e-07! 2.91900000e-02! 1.06960000e-10! 2.52450000e-05! 6.75670000e-03! 0.00000000e+00! 5.77999981e-10! 7.88366150e-10! 7.38370684e-11! 3.07999251e-11! 6.24028468e-11! 1.79755502e-10! 3.81103968e-11! 3.06870002e-10! 0.00000000e+00! 0.00000000e+00! 1.11269993e-09! 0.00000000e+00! 2.17833002e-10! 9.78669992e-11! 1.79999991e-11! 3.05757392e-10! 2.33147911e-11! 1.28561788e-11! 2.62987097e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 9.37539976e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29602800e+02! 1.23530000e+01! 2.62120000e+00! 9.61730000e+02! 3.02120000e+02! 2.14240000e-08! 1.25020000e-07! 2.89290000e-02! 1.08070000e-10! 2.48750000e-05! 6.46780000e-03! 0.00000000e+00! 6.00999972e-10! 7.88772936e-10! 7.39102390e-11! 3.08612406e-11! 6.25641275e-11! 1.80132145e-10! 3.81917761e-11! 1.28720007e-10! 0.00000000e+00! 0.00000000e+00! 1.21630006e-09! 0.00000000e+00! 1.64309705e-10! 7.38202971e-11! 2.59999990e-11! 3.06319498e-10! 1.80182345e-11! 1.08116120e-11! 2.30012398e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 8.06230013e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29603500e+02! 1.24180000e+01! 2.61900000e+00! 9.62940000e+02! 3.02440000e+02! 2.21450000e-08! 1.23740000e-07! 2.85550000e-02! 1.17740000e-10! 2.26070000e-05! 5.91860000e-03! 0.00000000e+00! 6.28499974e-10! 7.82264142e-10! 7.27394880e-11! 2.98801990e-11! 5.99837055e-11! 1.74105910e-10! 3.68896962e-11! 2.05610001e-10! 0.00000000e+00! 0.00000000e+00! 1.23019994e-09! 0.00000000e+00! 1.36751097e-10! 6.14388956e-11! 0.00000000e+00! 2.97326053e-10! 2.03042409e-11! 1.16940528e-11! 2.44244364e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 6.65559968e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
+ 2.29604200e+02! 1.24820000e+01! 2.61700000e+00! 9.61080000e+02! 3.02460000e+02! 2.39180000e-08! 1.21370000e-07! 2.83610000e-02! 1.14580000e-10! 2.20220000e-05! 5.67020000e-03! 0.00000000e+00! 6.59999999e-10! 7.70212782e-10! 7.05717637e-11! 2.80637354e-11! 5.52059058e-11! 1.62947947e-10! 3.44788156e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 3.59999981e-11! 2.80674123e-10! 1.41912766e-11! 9.33433626e-12! 2.06186943e-11! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00! 0.00000000e+00!
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Makefile_saprc_f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Makefile_saprc_f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Makefile_saprc_f90	(revision 3477)
@@ -0,0 +1,178 @@
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# User: Set here the F90 compiler and options
+#       Pedefined compilers: INTEL, PGF, HPUX, LAHEY
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+#COMPILER = G95
+#COMPILER = LAHEY
+COMPILER = INTEL
+#COMPILER = PGF
+#COMPILER = HPUX
+#COMPILER = GFORTRAN
+
+FC_G95     = g95
+FOPT_G95   = -cpp -O -pg -fbounds-check -fimplicit-none  -Wall -ftrace=full
+
+FC_LAHEY   = lf95
+# More aggressive for production runs:
+#FOPT_LAHEY = -Cpp --pca -O
+# More checking for debugging:
+FOPT_LAHEY = -Cpp --chk a,e,s,u --pca --ap -O0 -g --trap --trace --chkglobal
+
+FC_INTEL   = ifort 
+# More aggressive for production runs:
+FOPT_INTEL = -cpp -O -fp-model precise -pc80 -prec_div
+# More checking for debugging:
+#FOPT_INTEL = -cpp -O0 -fp-model strict -implicitnone -ftrapuv \
+#              -debug all -check all -warn all
+
+FC_PGF     = pgf90
+# More aggressive for production runs:
+FOPT_PGF   = -Mpreprocess -O -fast -pc 80 -Kieee
+# More checking for debugging:
+#FOPT_PGF   = -Mpreprocess -O0 -Mbounds -Mchkfpstk -Mchkptr -Mchkstk \
+#             -Ktrap=fp -pc 80 -Kieee
+
+FC_HPUX    = f90
+FOPT_HPUX  = -O -u +Oall +check=on
+
+FC_GFORTRAN     = gfortran
+FOPT_GFORTRAN   = -cpp -O
+
+# define FULL_ALGEBRA for non-sparse integration
+FC   = $(FC_$(COMPILER))
+FOPT = $(FOPT_$(COMPILER)) # -DFULL_ALGEBRA
+
+LIBS =
+#LIBS = -llapack -lblas
+
+# Command to create Matlab mex gateway routines 
+# Note: use $(FC) as the mex Fortran compiler
+MEX  = mex
+
+GENSRC = saprc_f90_Precision.f90  \
+	 saprc_f90_Parameters.f90     \
+	 saprc_f90_Global.f90  
+
+GENOBJ = saprc_f90_Precision.o    \
+	 saprc_f90_Parameters.o       \
+	 saprc_f90_Global.o     
+
+FUNSRC = saprc_f90_Function.f90 
+FUNOBJ = saprc_f90_Function.o 
+
+JACSRC = saprc_f90_JacobianSP.f90  saprc_f90_Jacobian.f90
+JACOBJ = saprc_f90_JacobianSP.o    saprc_f90_Jacobian.o
+
+HESSRC = saprc_f90_HessianSP.f90   saprc_f90_Hessian.f90
+HESOBJ = saprc_f90_HessianSP.o     saprc_f90_Hessian.o
+
+STMSRC = saprc_f90_StoichiomSP.f90 saprc_f90_Stoichiom.f90 
+STMOBJ = saprc_f90_StoichiomSP.o   saprc_f90_Stoichiom.o
+
+UTLSRC = saprc_f90_Rates.f90 saprc_f90_Util.f90 saprc_f90_Monitor.f90
+UTLOBJ = saprc_f90_Rates.o   saprc_f90_Util.o   saprc_f90_Monitor.o
+
+LASRC  = saprc_f90_LinearAlgebra.f90 
+LAOBJ  = saprc_f90_LinearAlgebra.o   
+
+STOCHSRC = saprc_f90_Stochastic.f90 
+STOCHOBJ = saprc_f90_Stochastic.o 
+
+MAINSRC = saprc_f90_Main.f90   saprc_f90_Initialize.f90   saprc_f90_Integrator.f90 saprc_f90_Model.f90
+MAINOBJ = saprc_f90_Main.o     saprc_f90_Initialize.o     saprc_f90_Integrator.o   saprc_f90_Model.o 
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# User: modify the line below to include only the
+#       objects needed by your application
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ALLOBJ = $(GENOBJ) $(FUNOBJ) $(JACOBJ) $(HESOBJ) $(STMOBJ) \
+	 $(UTLOBJ) $(LAOBJ)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# User: modify the line below to include only the
+#       executables needed by your application
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+all:    exe
+
+exe:	$(ALLOBJ) $(MAINOBJ) 
+	$(FC) $(FOPT) $(ALLOBJ) $(MAINOBJ) $(LIBS) -o saprc_f90.exe
+
+stochastic:$(ALLOBJ) $(STOCHOBJ) $(MAINOBJ)
+	$(FC) $(FOPT) $(ALLOBJ) $(STOCHOBJ) $(MAINOBJ) $(LIBS) \
+	-o saprc_f90_stochastic.exe
+
+mex:    $(ALLOBJ)
+	$(MEX) FC#$(FC) -fortran -O saprc_f90_mex_Fun.f90     $(ALLOBJ)
+	$(MEX) FC#$(FC) -fortran -O saprc_f90_mex_Jac_SP.f90  $(ALLOBJ)
+	$(MEX) FC#$(FC) -fortran -O saprc_f90_mex_Hessian.f90 $(ALLOBJ)
+
+clean:
+	rm -f saprc_f90*.o saprc_f90*.mod \
+	saprc_f90*.dat saprc_f90.exe saprc_f90*.mexglx \
+	saprc_f90.map
+
+distclean:
+	rm -f saprc_f90*.o saprc_f90*.mod \
+	saprc_f90*.dat saprc_f90.exe saprc_f90.map \
+	saprc_f90*.f90 saprc_f90_*.mexglx
+
+saprc_f90_Precision.o: saprc_f90_Precision.f90 
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Parameters.o: saprc_f90_Parameters.f90 \
+	            saprc_f90_Precision.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Monitor.o: saprc_f90_Monitor.f90 \
+	             saprc_f90_Precision.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Global.o: saprc_f90_Global.f90 \
+	            saprc_f90_Parameters.o saprc_f90_Precision.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Initialize.o: saprc_f90_Initialize.f90  $(GENOBJ) 
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Function.o: saprc_f90_Function.f90  $(GENOBJ) 
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Stochastic.o: saprc_f90_Stochastic.f90  $(GENOBJ) 
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_JacobianSP.o: saprc_f90_JacobianSP.f90 $(GENOBJ)
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Jacobian.o: saprc_f90_Jacobian.f90  $(GENOBJ) saprc_f90_JacobianSP.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_LinearAlgebra.o: saprc_f90_LinearAlgebra.f90 $(GENOBJ) saprc_f90_JacobianSP.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Rates.o: saprc_f90_Rates.f90  $(GENOBJ) 
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_HessianSP.o: saprc_f90_HessianSP.f90  $(GENOBJ)
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Hessian.o:  saprc_f90_Hessian.f90 $(GENOBJ) saprc_f90_HessianSP.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_StoichiomSP.o: saprc_f90_StoichiomSP.f90 $(GENOBJ)
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Stoichiom.o: saprc_f90_Stoichiom.f90  $(GENOBJ) saprc_f90_StoichiomSP.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Util.o: saprc_f90_Util.f90  $(GENOBJ) saprc_f90_Monitor.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Main.o: saprc_f90_Main.f90  $(ALLOBJ) saprc_f90_Initialize.o saprc_f90_Model.o saprc_f90_Integrator.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Model.o: saprc_f90_Model.f90  $(ALLOBJ) saprc_f90_Integrator.o
+	$(FC) $(FOPT) -c $<
+
+saprc_f90_Integrator.o: saprc_f90_Integrator.f90  $(ALLOBJ)
+	$(FC) $(FOPT) -c $<
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Small.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Small.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Small.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato 
+#INTEGRATOR rosenbrock_soa 
+#LANGUAGE   Fortran90 
+#DRIVER     general_soa_check
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Test.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Test.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/Test.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprcnov 
+#INTEGRATOR rosenbrock_soa 
+#LANGUAGE   Fortran90 
+#DRIVER     general_soa_check
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/aaa.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/aaa.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/aaa.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprcnov 
+#INTEGRATOR rosenbrock_soa 
+#LANGUAGE   Fortran90 
+#DRIVER     general_soa_check
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/box.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/box.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/box.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprc99
+#INTEGRATOR rosenbrock 
+#LANGUAGE   C 
+#DRIVER     general 
+#HESSIAN    off
+#STOICMAT   off
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/cell.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/cell.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/cell.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      cell_cycle 
+#INTEGRATOR gillespie
+#LANGUAGE   Matlab
+#DRIVER     general_stochastic
+#STOCHASTIC on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/dsdrv6.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/dsdrv6.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/dsdrv6.f	(revision 3477)
@@ -0,0 +1,495 @@
+      program dsdrv6 
+c
+c     Program to illustrate the idea of reverse communication
+c     in Cayley mode for a generalized symmetric eigenvalue 
+c     problem.  The following program uses the two LAPACK subroutines 
+c     dgttrf.f and dgttrs.f to factor and solve a tridiagonal system of 
+c     equations.
+c
+c     We implement example six of ex-sym.doc in DOCUMENTS directory
+c
+c\Example-6
+c     ... Suppose we want to solve A*x = lambda*M*x in inverse mode,
+c         where A and M are obtained by the finite element of the
+c         1-dimensional discrete Laplacian
+c                             d^2u / dx^2
+c         on the interval [0,1] with zero Dirichlet boundary condition
+c         using piecewise linear elements.
+c
+c     ... OP = (inv[A-sigma*M])*(A+sigma*M)  and  B = M.
+c
+c     ... Use mode 5 of DSAUPD.
+c
+c\BeginLib
+c
+c\References:
+c  1. R.G. Grimes, J.G. Lewis and H.D. Simon, "A Shifted Block Lanczos 
+c     Algorithm for Solving Sparse Symmetric Generalized Eigenproblems", 
+c     SIAM J. Matr. Anal. Apps.,  January (1993).
+c
+c\Routines called:
+c     dsaupd  ARPACK reverse communication interface routine.
+c     dseupd  ARPACK routine that returns Ritz values and (optionally)
+c             Ritz vectors.
+c     dgttrf  LAPACK tridiagonal factorization routine.
+c     dgttrs  LAPACK tridiagonal solve routine.
+c     daxpy   Level 1 BLAS that computes y <- alpha*x+y.
+c     dcopy   Level 1 BLAS that copies one vector to another.
+c     dscal   Level 1 BLAS that scales a vector by a scalar.
+c     dnrm2   Level 1 BLAS that computes the norm of a vector. 
+c     av      Matrix vector multiplication routine that computes A*x.
+c     mv      Matrix vector multiplication routine that computes M*x.
+c
+c\Author
+c     Danny Sorensen
+c     Richard Lehoucq
+c     Chao Yang
+c     Dept. of Computational &
+c     Applied Mathematics
+c     Rice University 
+c     Houston, Texas 
+c 
+c\SCCS Information: @(#)
+c FILE: sdrv6.F   SID: 2.5   DATE OF SID: 10/17/00   RELEASE: 2
+c
+c\Remarks
+c     1. None
+c
+c\EndLib
+c------------------------------------------------------------------------
+c
+c     %-----------------------------%
+c     | Define leading dimensions   |
+c     | for all arrays.             |
+c     | MAXN:   Maximum dimension   |
+c     |         of the A allowed.   |
+c     | MAXNEV: Maximum NEV allowed |
+c     | MAXNCV: Maximum NCV allowed |
+c     %-----------------------------%
+c
+      integer          maxn, maxnev, maxncv, ldv
+      parameter        (maxn=256, maxnev=10, maxncv=25, 
+     &                 ldv=maxn)
+c
+c     %--------------%
+c     | Local Arrays |
+c     %--------------%
+c
+      Double precision
+     &                 v(ldv,maxncv), workl(maxncv*(maxncv+8)),
+     &                 workd(3*maxn), d(maxncv,2), resid(maxn), 
+     &                 ad(maxn), adl(maxn), adu(maxn), adu2(maxn),
+     &                 temp(maxn), ax(maxn), mx(maxn)
+      logical          select(maxncv)
+      integer          iparam(11), ipntr(11), ipiv(maxn)
+c
+c     %---------------%
+c     | Local Scalars |
+c     %---------------%
+c
+      character        bmat*1, which*2
+      integer          ido, n, nev, ncv, lworkl, info, j, ierr,
+     &                 nconv, maxitr, ishfts, mode
+      logical          rvec
+      Double precision
+     &                 sigma, r1, r2, tol, h
+c
+c     %------------%
+c     | Parameters |
+c     %------------%
+c
+      Double precision
+     &                 zero, one, two, four, six
+      parameter        (zero = 0.0D+0, one = 1.0D+0, 
+     &                  four = 4.0D+0, six = 6.0D+0,
+     &                  two = 2.0D+0 ) 
+c
+c     %-----------------------------%
+c     | BLAS & LAPACK routines used |
+c     %-----------------------------%
+c
+      Double precision
+     &                 dnrm2
+      external         daxpy, dcopy, dscal, dnrm2, dgttrf, dgttrs
+c
+c     %--------------------%
+c     | Intrinsic function |
+c     %--------------------%
+c
+      intrinsic        abs
+c
+c     %-----------------------%
+c     | Executable statements |
+c     %-----------------------%
+c
+c     %--------------------------------------------------%
+c     | The number N is the dimension of the matrix. A   |
+c     | generalized eigenvalue problem is solved (BMAT = |
+c     | 'G'.) NEV is the number of eigenvalues to be     |
+c     | approximated.  Since the Cayley mode is used,    |
+c     | WHICH is set to 'LM'.  The user can modify NEV,  |
+c     | NCV, SIGMA to solve problems of different sizes, |
+c     | and to get different parts of the spectrum.      |
+c     | However, The following conditions must be        |
+c     | satisfied:                                       |
+c     |                 N <= MAXN,                       | 
+c     |               NEV <= MAXNEV,                     |
+c     |           NEV + 1 <= NCV <= MAXNCV               | 
+c     %--------------------------------------------------%
+c
+      n = 100
+      nev = 4
+      ncv = 20
+      if ( n .gt. maxn ) then
+         print *, ' ERROR with _SDRV6: N is greater than MAXN '
+         go to 9000
+      else if ( nev .gt. maxnev ) then
+         print *, ' ERROR with _SDRV6: NEV is greater than MAXNEV '
+         go to 9000
+      else if ( ncv .gt. maxncv ) then
+         print *, ' ERROR with _SDRV6: NCV is greater than MAXNCV '
+         go to 9000
+      end if
+      bmat = 'G'
+      which = 'LM'
+      sigma = 1.5D+2
+c
+c     %--------------------------------------------------%
+c     | The work array WORKL is used in DSAUPD as        |
+c     | workspace.  Its dimension LWORKL is set as       |
+c     | illustrated below.  The parameter TOL determines |
+c     | the stopping criterion.  If TOL<=0, machine      |
+c     | precision is used.  The variable IDO is used for |
+c     | reverse communication and is initially set to 0. |
+c     | Setting INFO=0 indicates that a random vector is |
+c     | generated in DSAUPD to start the Arnoldi         |
+c     | iteration.                                       |
+c     %--------------------------------------------------%
+c
+      lworkl = ncv*(ncv+8)
+      tol = zero
+      ido = 0
+      info = 0
+c
+c     %---------------------------------------------------%
+c     | This program uses exact shifts with respect to    |
+c     | the current Hessenberg matrix (IPARAM(1) = 1).    |
+c     | IPARAM(3) specifies the maximum number of Arnoldi |
+c     | iterations allowed.  Mode 5 specified in the      |
+c     | documentation of DSAUPD is used (IPARAM(7) = 5).  |
+c     | All these options may be changed by the user. For |
+c     | details, see the documentation in DSAUPD.         |
+c     %---------------------------------------------------%
+c
+      ishfts = 1
+      maxitr = 300
+      mode   = 5
+c
+      iparam(1) = ishfts
+      iparam(3) = maxitr 
+      iparam(7) = mode 
+c
+c     %------------------------------------------------------%
+c     | Call LAPACK routine to factor (A-sigma*M).  The      |
+c     | stiffness matrix A is the 1-d discrete Laplacian.    |
+c     | The mass matrix M is the associated mass matrix      |
+c     | arising from using piecewise linear finite elements  |
+c     | on the interval [0, 1].                              |
+c     %------------------------------------------------------%
+c
+      h = one / dble(n+1)
+      r1 = (four / six) * h
+      r2 = (one / six) * h
+      do 20 j=1,n
+         ad(j) = two / h - sigma * r1
+         adl(j) = -one / h - sigma * r2
+ 20   continue 
+      call dcopy (n, adl, 1, adu, 1)
+      call dgttrf (n, adl, ad, adu, adu2, ipiv, ierr)
+      if (ierr .ne. 0) then 
+         print *, ' '
+         print *, ' Error with _gttrf in _SDRV6.'
+         print *, ' '
+         go to 9000
+      end if
+c
+c     %-------------------------------------------%
+c     | M A I N   L O O P (Reverse communication) |
+c     %-------------------------------------------%
+c
+ 10   continue
+c
+c        %---------------------------------------------%
+c        | Repeatedly call the routine DSAUPD and take |
+c        | actions indicated by parameter IDO until    |
+c        | either convergence is indicated or maxitr   |
+c        | has been exceeded.                          |
+c        %---------------------------------------------%
+c
+         call dsaupd ( ido, bmat, n, which, nev, tol, resid, ncv, 
+     &                 v, ldv, iparam, ipntr, workd, workl, lworkl, 
+     &                 info )
+c
+         if (ido .eq. -1) then
+c
+c           %-------------------------------------------------------%
+c           | Perform  y <--- OP*x = (inv[A-SIGMA*M])*(A+SIGMA*M)*x |
+c           | to force starting vector into the range of OP.  The   |
+c           | user should provide his/her matrix vector (A*x, M*x)  |
+c           | multiplication routines and a linear system solver    |
+c           | here.  The matrix vector multiplication routine takes |
+c           | workd(ipntr(1)) as the input vector.  The final       |
+c           | result is returned to workd(ipntr(2)).                | 
+c           %-------------------------------------------------------%
+c
+            call av (n, workd(ipntr(1)), workd(ipntr(2)))
+            call mv (n, workd(ipntr(1)), temp)
+            call daxpy(n, sigma, temp, 1, workd(ipntr(2)), 1) 
+c
+            call dgttrs ('Notranspose', n, 1, adl, ad, adu, adu2, ipiv, 
+     &                workd(ipntr(2)), n, ierr)
+            if (ierr .ne. 0) then 
+               print *, ' '
+               print *, ' Error with _gttrs in _SDRV6.'
+               print *, ' ' 
+               go to 9000
+            end if
+c
+c           %-----------------------------------------%
+c           | L O O P   B A C K to call DSAUPD again. |
+c           %-----------------------------------------%
+c
+            go to 10
+c
+         else if (ido .eq. 1) then
+c
+c           %----------------------------------------------------%
+c           | Perform y <-- OP*x = inv[A-SIGMA*M]*(A+SIGMA*M)*x. |
+c           | M*x has been saved in workd(ipntr(3)).  The user   |
+c           | need the matrix vector multiplication (A*x)        |
+c           | routine and a linear system solver here.  The      |
+c           | matrix vector multiplication routine takes         |
+c           | workd(ipntr(1)) as the input, and the result is    |
+c           | combined with workd(ipntr(3)) to form the input    |
+c           | for the linear system solver.  The final result is |
+c           | returned to workd(ipntr(2)).                       | 
+c           %----------------------------------------------------%
+c
+            call av (n, workd(ipntr(1)), workd(ipntr(2)))
+            call daxpy(n, sigma, workd(ipntr(3)), 1, workd(ipntr(2)), 1)
+            call dgttrs ('Notranspose', n, 1, adl, ad, adu, adu2, ipiv, 
+     &                   workd(ipntr(2)), n, ierr)
+            if (ierr .ne. 0) then 
+               print *, ' ' 
+               print *, ' Error with _gttrs in _SDRV6. '
+               print *, ' '
+               go to 9000
+            end if
+c
+c           %-----------------------------------------%
+c           | L O O P   B A C K to call DSAUPD again. |
+c           %-----------------------------------------%
+c
+            go to 10
+c
+         else if (ido .eq. 2) then
+c
+c           %--------------------------------------------%
+c           |             Perform  y <--- M*x.           |
+c           | Need matrix vector multiplication routine  |
+c           | here that takes workd(ipntr(1)) as input   |
+c           | and returns the result to workd(ipntr(2)). |
+c           %--------------------------------------------%
+c
+            call mv (n, workd(ipntr(1)), workd(ipntr(2)))
+c
+c           %-----------------------------------------%
+c           | L O O P   B A C K to call DSAUPD again. |
+c           %-----------------------------------------%
+c
+            go to 10
+c
+         end if 
+c
+c     %-----------------------------------------%
+c     | Either we have convergence, or there is |
+c     | an error.                               |
+c     %-----------------------------------------%
+c
+      if ( info .lt. 0 ) then
+c
+c        %--------------------------%
+c        | Error message, check the |
+c        | documentation in DSAUPD  |
+c        %--------------------------%
+c
+           print *, ' '
+           print *, ' Error with _saupd, info = ',info
+           print *, ' Check the documentation of _saupd. '
+           print *, ' '
+c
+      else 
+c
+c        %-------------------------------------------%
+c        | No fatal errors occurred.                 |
+c        | Post-Process using DSEUPD.                |
+c        |                                           |
+c        | Computed eigenvalues may be extracted.    |
+c        |                                           |
+c        | Eigenvectors may also be computed now if  |
+c        | desired.  (indicated by rvec = .true.)    |
+c        %-------------------------------------------%
+c
+         rvec = .true.
+c
+         call dseupd ( rvec, 'All', select, d, v, ldv, sigma, 
+     &        bmat, n, which, nev, tol, resid, ncv, v, ldv, 
+     &        iparam, ipntr, workd, workl, lworkl, ierr )
+c
+c        %----------------------------------------------%
+c        | Eigenvalues are returned in the first column |
+c        | of the two dimensional array D and the       |
+c        | corresponding eigenvectors are returned in   |
+c        | the first NEV columns of the two dimensional |
+c        | array V if requested.  Otherwise, an         |
+c        | orthogonal basis for the invariant subspace  |
+c        | corresponding to the eigenvalues in D is     |
+c        | returned in V.                               |
+c        %----------------------------------------------%
+c
+         if ( ierr .ne. 0 ) then 
+c
+c           %------------------------------------%
+c           | Error condition:                   |
+c           | Check the documentation of DSEUPD. |
+c           %------------------------------------%
+c
+            print *, ' '
+            print *, ' Error with _seupd, info = ', ierr
+            print *, ' Check the documentation of _seupd '
+            print *, ' '
+c
+         else
+c
+c           %---------------------------%
+c           | Compute the residual norm |
+c           |                           |
+c           |   ||  A*x - lambda*x ||   |
+c           |                           |
+c           | for the NCONV accurately  |
+c           | computed eigenvalues and  |
+c           | eigenvectors.  (iparam(5) |
+c           | indicates how many are    |
+c           | accurate to the requested |
+c           | tolerance)                |
+c           %---------------------------%
+c  
+            nconv = iparam(5)
+            do 30 j=1, nconv
+               call av(n, v(1,j), ax)
+               call mv(n, v(1,j), mx)
+               call daxpy (n, -d(j,1), mx, 1, ax, 1)
+               d(j,2) = dnrm2(n, ax, 1)
+               d(j,2) = d(j,2) / abs(d(j,1))
+ 30         continue
+c
+            call dmout(6, nconv, 2, d, maxncv, -6,
+     &           'Ritz values and relative residuals')
+c
+         end if
+c
+c        %------------------------------------------%
+c        | Print additional convergence information |
+c        %------------------------------------------%
+c
+         if ( info .eq. 1) then
+            print *, ' '
+            print *, ' Maximum number of iterations reached.'
+            print *, ' '
+         else if ( info .eq. 3) then
+            print *, ' '
+            print *, ' No shifts could be applied during implicit',
+     &               ' Arnoldi update, try increasing NCV.'
+            print *, ' '
+         end if
+c
+         print *, ' '
+         print *, ' _SDRV6 '
+         print *, ' ====== '
+         print *, ' '
+         print *, ' Size of the matrix is', n
+         print *, ' The number of Ritz values requested is', nev
+         print *, ' The number of Arnoldi vectors generated',
+     &            ' (NCV) is ', ncv
+         print *, ' What portion of the spectrum: ', which
+         print *, ' The number of converged Ritz values is ',
+     &              nconv 
+         print *, ' The number of Implicit Arnoldi update',
+     &           ' iterations taken is', iparam(3)
+         print *, ' The number of OP*x is ', iparam(9)
+         print *, ' The convergence criterion is ', tol
+         print *, ' '
+c
+      end if
+c
+c     %---------------------------%
+c     | Done with program dsdrv6. |
+c     %---------------------------%
+c
+ 9000 continue
+c
+      end
+c
+c------------------------------------------------------------------------
+c     Matrix vector subroutine
+c     where the matrix used is the 1 dimensional mass matrix
+c     arising from using the piecewise linear finite element
+c     on the interval [0,1].
+c
+      subroutine mv (n, v, w)
+      integer           n, j
+      Double precision 
+     &                  v(n), w(n), one, four, six, h
+      parameter         (one = 1.0D+0, four = 4.0D+0, 
+     &                   six = 6.0D+0) 
+c
+      w(1) =  four*v(1) + v(2)
+      do 100 j = 2,n-1
+         w(j) = v(j-1) + four*v(j) + v(j+1) 
+  100 continue
+      j = n
+      w(j) = v(j-1) + four*v(j) 
+c
+c     Scale the vector w by h.
+c
+      h = one / (six*dble(n+1))
+      call dscal(n, h, w, 1)
+      return
+      end
+c
+c------------------------------------------------------------------------
+c     Matrix vector subroutine
+c     where the matrix is the stiffness matrix obtained from the 
+c     finite element discretization of the 1-dimensional discrete Laplacian
+c     on the interval [0,1] with zero Dirichlet boundary condition
+c     using piecewise linear elements.
+c
+      subroutine av (n, v, w)
+      integer           n, j
+      Double precision
+     &                  v(n), w(n), one, two, h
+      parameter         (one = 1.0D+0, two = 2.0D+0)
+c
+      w(1) =  two*v(1) - v(2)
+      do 100 j = 2,n-1
+         w(j) = - v(j-1) + two*v(j) - v(j+1) 
+  100 continue
+      j = n
+      w(j) = - v(j-1) + two*v(j)
+c     
+c     Scale the vector w by (1/h).
+c
+      h = one / dble(n+1)
+      call dscal(n, one/h, w, 1) 
+      return
+      end
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/example.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/example.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/example.f	(revision 3477)
@@ -0,0 +1,112 @@
+      program example
+c
+      integer          lwork, n
+      parameter        (n = 100)
+      double complex   zwork(200 000), alpha(20), beta(20), 
+     $                 eivec(n,20), tmp(n), residu(n)
+c
+      integer          kmax, jmax, jmin, maxstep, method, m, l, maxnmv, 
+     $                 order, testspace, j
+      double precision tol, lock, dznrm2
+      logical          wanted
+      double complex   target
+      real             elapse
+      real             etime, tarray(2)
+c
+      target = (31.,0.0)
+      tol = 1.d-9
+      kmax = 5
+      jmax = 20
+      jmin = 10
+      maxstep = 1000
+      lock = 1.d-9
+c...     order =  0: nearest to target
+c...     order = -1: smallest real part
+c...     order =  1: largest real part
+c...     order = -2: smallest complex part
+c...     order =  2: largest complex part
+      order = 0
+c...     method = 1: gmres(m)
+c...     method = 2: cgstab(l)
+      method = 2
+c...     for gmres(m):
+      m = 30
+c...     for cgstab(l):
+      l= 2
+c...     maximum number of matvecs in cgstab or gmres
+      maxnmv = 100
+      testspace = 3
+c...     Testspace 1: w = "Standard Petrov" * v (Section 3.1.1)
+c...     Testspace 2: w = "Standard 'variable' Petrov" * v (Section 3.1.2)
+c...     Testspace 3: w = "Harmonic Petrov" * v (Section 3.5.1)
+c
+      if ( method .eq. 1 ) then
+         lwork =  4 +  m  + 5*jmax + 3*kmax
+      else
+         lwork = 10 + 6*l + 5*jmax + 3*kmax
+      end if
+      wanted = .true.
+c
+      call jdqz(alpha, beta, eivec, wanted, n, target, tol, 
+     $     kmax, jmax, jmin,
+     $     method, m, l, maxnmv, maxstep,
+     $     lock, order, testspace, zwork, lwork )
+c
+      elapse = etime( tarray )
+c
+c...     Compute the norms of the residuals:
+      do j = 1, kmax
+         call amul  ( n, eivec(1,j), residu )
+         call zscal ( n, beta(j), residu, 1)
+         call bmul  ( n, eivec(1,j), tmp )
+         call zaxpy( n, -alpha(j), tmp, 1, residu, 1 )
+         print '("lambda(",i2,"): (",1p,e11.4,",",e11.4,
+     $        " )")', j,alpha(j)/beta(j)
+         print '(a30,d13.6)', '||beta Ax - alpha Bx||:',
+     $          dznrm2( n, residu, 1 )
+      end do
+      write(*,10) tarray(1), elapse
+c
+   10 format(1x,'END JDQZ AFTER ',f6.2,' SEC. CPU-TIME AND ', f6.2,
+     $       ' SEC. ELAPSED TIME' )
+      end
+
+      subroutine PRECON( neq, q )
+c...............................................
+c...     Subroutine to compute q = K^-1 q
+c...............................................
+      integer        neq, i
+      double complex q(neq)
+c
+      do i = 1, neq
+         q(i) = i*q(i)/(i*i-31)
+      end do
+c
+      end
+c
+      subroutine AMUL( neq, q, r )
+c...............................................
+c...     Subroutine to compute r = Aq
+c...............................................
+      integer        neq, i
+      double complex q(neq), r(neq)
+c
+      do i = 1, neq
+	 r(i) = i*q(i)
+      end do
+c
+      end
+c
+      subroutine BMUL( neq, q, r )
+c...............................................
+c...     Subroutine to compute r = Bq
+c...............................................
+      integer        neq, i
+      double complex q(neq), r(neq)
+c
+      do i = 1, neq
+	 r(i) = q(i)/i
+      end do
+c
+      end
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/hsv.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/hsv.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/hsv.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprcnov 
+#INTEGRATOR rosenbrock_soa 
+#LANGUAGE   Fortran90 
+#DRIVER     general_hsv
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/radau90.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/radau90.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/radau90.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprc99
+#INTEGRATOR radau5 
+#LANGUAGE   Fortran90
+#DRIVER     general 
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/readme
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/readme	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/readme	(revision 3477)
@@ -0,0 +1,19 @@
+{To specify a KPP model build a *.kpp file with the following lines:}
+
+{Choose any model defined in $KPP_HOME/models}
+#MODEL small_strato
+
+{Choose any integrator defined in $KPP_HOME/int}
+#INTEGRATOR none 
+
+{Choose the output language in which KPP will generate the model}
+#LANGUAGE [ Fortran77 | Fortran90 | C | Matlab ]
+
+{Choose any driver file defined in $KPP_HOME/drv}
+#DRIVER general
+
+{Hessian}
+#HESSIAN [ ON | OFF ] 
+
+{Stoichiometric matrix}
+#STOICMAT [ ON | OFF ]
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/result.txt
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/result.txt	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/result.txt	(revision 3477)
@@ -0,0 +1,6 @@
+Lsode:
+100.0%. T=0.173E+06  SO2= 0.0000E+00; O3= 0.9870E-01; NO= 0.1680E-06; NO2= 0.6802E-02;
+
+Rosenbrock:
+100.0%. T=0.173E+06  SO2= 0.0000E+00; O3= 0.7276E-01; NO= 0.1574E-06; NO2= 0.6396E-02;
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rk.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rk.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rk.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR runge_kutta
+#LANGUAGE   Fortran90
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rktlm.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rktlm.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rktlm.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR runge_kutta_tlm 
+#LANGUAGE   Fortran90
+#DRIVER     general_tlm
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/ros.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/ros.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/ros.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR rosenbrock
+#LANGUAGE   Fortran90
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rosadj.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rosadj.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rosadj.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR rosenbrock_adj
+#LANGUAGE   Fortran90
+#DRIVER     general_adj
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rosenbrock90.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rosenbrock90.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rosenbrock90.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprc99
+#INTEGRATOR rosenbrock 
+#LANGUAGE   Fortran90 
+#DRIVER     general 
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rostlm.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rostlm.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/rostlm.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR rosenbrock_tlm 
+#LANGUAGE   Fortran90
+#DRIVER     general_tlm
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc2006.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc2006.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc2006.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprcnov 
+#INTEGRATOR rosenbrock
+#LANGUAGE   Fortran90
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_c.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_c.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_c.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprc99
+#INTEGRATOR rosenbrock 
+#LANGUAGE   C 
+#DRIVER     general 
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_f77.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_f77.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_f77.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprc99
+#INTEGRATOR kpp_ros4 
+#LANGUAGE   Fortran77 
+#DRIVER     general 
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_m.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_m.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/saprc_m.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      saprc99
+#INTEGRATOR none 
+#LANGUAGE   Matlab 
+#DRIVER     general 
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sd.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sd.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sd.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR sdirk
+#LANGUAGE   Fortran90
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sdadj.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sdadj.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sdadj.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR sdirk_adj
+#LANGUAGE   Fortran90
+#DRIVER     general_adj
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sdtlm.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sdtlm.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/sdtlm.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR sdirk_tlm
+#LANGUAGE   Fortran90
+#DRIVER     general_tlm
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/shsv.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/shsv.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/shsv.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato 
+#INTEGRATOR rosenbrock_soa 
+#LANGUAGE   Fortran90 
+#DRIVER     general_hsv
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_c.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_c.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_c.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR rosenbrock 
+#LANGUAGE   C
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_f77.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_f77.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_f77.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR rosenbrock 
+#LANGUAGE   Fortran77
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_f90.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_f90.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_f90.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR kpp_lsode 
+#LANGUAGE   Fortran90
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_m.kpp
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_m.kpp	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/examples/small_m.kpp	(revision 3477)
@@ -0,0 +1,6 @@
+#MODEL      small_strato
+#INTEGRATOR none 
+#LANGUAGE   Matlab
+#DRIVER     general
+#HESSIAN    on
+#STOICMAT   on
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/gpl/gpl.txt
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/gpl/gpl.txt	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/gpl/gpl.txt	(revision 3477)
@@ -0,0 +1,317 @@
+******************************************************************************
+
+  KPP - The Kinetic PreProcessor
+        Builds simulation code for chemical kinetic systems
+
+  Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu 
+  Copyright (C) 1997-2005 Adrian Sandu
+
+  KPP is free software; you can redistribute it and/or modify it under the
+  terms of the GNU General Public License as published by the Free
+  Software Foundation (http://www.gnu.org/copyleft/gpl.html); either
+  version 2 of the License, or (at your option) any later version.
+
+  KPP is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+  for more details.
+
+  A copy of the GNU General Public License could be found below;  you
+  could also consult http://www.gnu.org/copyleft/gpl.html or write to the
+  Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 
+  02111-1307,  USA.
+
+  Adrian Sandu
+  Computer Science Department
+  Virginia Polytechnic Institute and State University
+  Blacksburg, VA 24060
+  E-mail: sandu@cs.vt.edu
+
+******************************************************************************
+
+
+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_lsodes.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_lsodes.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_lsodes.def	(revision 3477)
@@ -0,0 +1,19 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN FULL
+#DOUBLE ON 
+#INTFILE atm_lsodes
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=1.D-12
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_lsodes.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_lsodes.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_lsodes.f	(revision 3477)
@@ -0,0 +1,5474 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      PARAMETER ( LRW=20+3*1500+16*NVAR )
+      PARAMETER ( LIW=60 )
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      KPP_REAL RWORK(LRW)
+      INTEGER IWORK(LIW)
+
+      STEPCUT = 0.
+      MAXORD = 5
+      IBEGIN = 1
+      ITOL=4
+
+C ---- NORMAL COMPUTATION ---
+      ITASK=1
+      ISTATE=1
+C ---- USE OPTIONAL INPUT ---
+      IOPT=1
+
+      IWORK(5) = MAXORD    ! MAX ORD
+      IWORK(6) = 20000
+      IWORK(7) = 0
+      RWORK(6) = STEPMAX   ! STEP MAX
+      RWORK(7) = STEPMIN   ! STEP MIN
+      RWORK(5) = STEPMIN   ! INITIAL STEP
+
+C ----- SIGNAL FOR STIFF CASE, FULL JACOBIAN, INTERN (22) or SUPPLIED (21)
+      MF = 121
+
+      CALL atmlsodes (FUNC_CHEM, NVAR, VAR, TIN, TOUT, ITOL, RTOL, ATOL,
+     !            ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW,
+     !            JAC_CHEM, MF)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'LSODES: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+      subroutine atmlsodes (f, neq, y, t, tout, itol, RelTol, AbsTol,
+     1       itask, istate, iopt, rwork, lrw, iwork, liw, jac, mf)
+      external f, jac
+      integer neq, itol, itask, istate, iopt, lrw, iwork, liw, mf
+      KPP_REAL y, t, tout, RelTol, AbsTol, rwork
+      dimension neq(1), y(1), RelTol(1), AbsTol(1),
+     1          rwork(lrw), iwork(liw)
+c-----------------------------------------------------------------------
+c this is the march 30, 1987 version of
+c lsodes.. livermore solver for ordinary differential equations
+c          with general sparse jacobian matrices.
+c this version is in KPP_REAL.
+c
+c lsodes solves the initial value problem for stiff or nonstiff
+c systems of first order ode-s,
+c     dy/dt = f(t,y) ,  or, in component form,
+c     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(neq)) (i = 1,...,neq).
+c lsodes is a variant of the lsode package, and is intended for
+c problems in which the jacobian matrix df/dy has an arbitrary
+c sparse structure (when the problem is stiff).
+c
+c authors..      alan c. hindmarsh,
+c                computing and mathematics research division, l-316
+c                lawrence livermore national laboratory
+c                livermore, ca 94550.
+c
+c and            andrew h. sherman
+c                j. s. nolen and associates
+c                houston, tx 77084
+c-----------------------------------------------------------------------
+c references..
+c 1.  alan c. hindmarsh,  odepack, a systematized collection of ode
+c     solvers, in scientific computing, r. s. stepleman et al. (eds.),
+c     north-holland, amsterdam, 1983, pp. 55-64.
+c
+c 2.  s. c. eisenstat, m. c. gursky, m. h. schultz, and a. h. sherman,
+c     yale sparse matrix package.. i. the symmetric codes,
+c     int. j. num. meth. eng., 18 (1982), pp. 1145-1151.
+c
+c 3.  s. c. eisenstat, m. c. gursky, m. h. schultz, and a. h. sherman,
+c     yale sparse matrix package.. ii. the nonsymmetric codes,
+c     research report no. 114, dept. of computer sciences, yale
+c     university, 1977.
+c-----------------------------------------------------------------------
+c summary of usage.
+c
+c communication between the user and the lsodes package, for normal
+c situations, is summarized here.  this summary describes only a subset
+c of the full set of options available.  see the full description for
+c details, including optional communication, nonstandard options,
+c and instructions for special situations.  see also the example
+c problem (with program and output) following this summary.
+c
+c a. first provide a subroutine of the form..
+c               subroutine f (neq, t, y, ydot)
+c               dimension y(neq), ydot(neq)
+c which supplies the vector function f by loading ydot(i) with f(i).
+c
+c b. next determine (or guess) whether or not the problem is stiff.
+c stiffness occurs when the jacobian matrix df/dy has an eigenvalue
+c whose real part is negative and large in magnitude, compared to the
+c reciprocal of the t span of interest.  if the problem is nonstiff,
+c use a method flag mf = 10.  if it is stiff, there are two standard
+c for the method flag, mf = 121 and mf = 222.  in both cases, lsodes
+c requires the jacobian matrix in some form, and it treats this matrix
+c in general sparse form, with sparsity structure determined internally.
+c (for options where the user supplies the sparsity structure, see
+c the full description of mf below.)
+c
+c c. if the problem is stiff, you are encouraged to supply the jacobian
+c directly (mf = 121), but if this is not feasible, lsodes will
+c compute it internally by difference quotients (mf = 222).
+c if you are supplying the jacobian, provide a subroutine of the form..
+c               subroutine jac (neq, t, y, j, ian, jan, pdj)
+c               dimension y(1), ian(1), jan(1), pdj(1)
+c here neq, t, y, and j are input arguments, and the jac routine is to
+c load the array pdj (of length neq) with the j-th column of df/dy.
+c i.e., load pdj(i) with df(i)/dy(j) for all relevant values of i.
+c the arguments ian and jan should be ignored for normal situations.
+c lsodes will CALL the jac routine with j = 1,2,...,neq.
+c only nonzero elements need be loaded.  usually, a crude approximation
+c to df/dy, possibly with fewer nonzero elements, will suffice.
+c
+c d. write a main program which calls subroutine lsodes once for
+c each point at which answers are desired.  this should also provide
+c for possible use of logical unit 6 for output of error messages
+c by lsodes.  on the first CALL to lsodes, supply arguments as follows..
+c f      = name of subroutine for right-hand side vector f.
+c          this name must be declared external in calling program.
+c neq    = number of first order ode-s.
+c y      = array of initial values, of length neq.
+c t      = the initial value of the independent variable.
+c tout   = first point where output is desired (.ne. t).
+c itol   = 1 or 2 according as AbsTol (below) is a scalar or array.
+c RelTol   = relative tolerance parameter (scalar).
+c AbsTol   = absolute tolerance parameter (scalar or array).
+c          the estimated local error in y(i) will be controlled so as
+c          to be roughly less (in magnitude) than
+c             ewt(i) = RelTol*abs(y(i)) + AbsTol     if itol = 1, or
+c             ewt(i) = RelTol*abs(y(i)) + AbsTol(i)  if itol = 2.
+c          thus the local error test passes if, in each component,
+c          either the absolute error is less than AbsTol (or AbsTol(i)),
+c          or the relative error is less than RelTol.
+c          use RelTol = 0.0 for pure absolute error control, and
+c          use AbsTol = 0.0 (or AbsTol(i) = 0.0) for pure relative error
+c          control.  caution.. actual (global) errors may exceed these
+c          local tolerances, so choose them conservatively.
+c itask  = 1 for normal computation of output values of y at t = tout.
+c istate = integer flag (input and output).  set istate = 1.
+c iopt   = 0 to indicate no optional inputs used.
+c rwork  = real work array of length at least..
+c             20 + 16*neq            for mf = 10,
+c             20 + (2 + 1./lenrat)*nnz + (11 + 9./lenrat)*neq
+c                                    for mf = 121 or 222,
+c          where..
+c          nnz    = the number of nonzero elements in the sparse
+c                   jacobian (if this is unknown, use an estimate), and
+c          lenrat = the real to integer wordlength ratio (usually 1 in
+c                   single precision and 2 in KPP_REAL).
+c          in any case, the required size of rwork cannot generally
+c          be predicted in advance if mf = 121 or 222, and the value
+c          above is a rough estimate of a crude lower bound.  some
+c          experimentation with this size may be necessary.
+c          (when known, the correct required length is an optional
+c          output, available in iwork(17).)
+c lrw    = declared length of rwork (in user-s dimension).
+c iwork  = integer work array of length at least 30.
+c liw    = declared length of iwork (in user-s dimension).
+c jac    = name of subroutine for jacobian matrix (mf = 121).
+c          if used, this name must be declared external in calling
+c          program.  if not used, pass a dummy name.
+c mf     = method flag.  standard values are..
+c          10  for nonstiff (adams) method, no jacobian used.
+c          121 for stiff (bdf) method, user-supplied sparse jacobian.
+c          222 for stiff method, internally generated sparse jacobian.
+c note that the main program must declare arrays y, rwork, iwork,
+c and possibly AbsTol.
+c
+c e. the output from the first CALL (or any call) is..
+c      y = array of computed values of y(t) vector.
+c      t = corresponding value of independent variable (normally tout).
+c istate = 2  if lsodes was successful, negative otherwise.
+c          -1 means excess work done on this CALL (perhaps wrong mf).
+c          -2 means excess accuracy requested (tolerances too small).
+c          -3 means illegal input detected (see printed message).
+c          -4 means repeated error test failures (check all inputs).
+c          -5 means repeated convergence failures (perhaps bad jacobian
+c             supplied or wrong choice of mf or tolerances).
+c          -6 means error weight became zero during problem. (solution
+c             component i vanished, and AbsTol or AbsTol(i) = 0.)
+c          -7 means a fatal error return flag came from the sparse
+c             solver cdrv by way of prjs or slss.  should never happen.
+c          a return with istate = -1, -4, or -5 may result from using
+c          an inappropriate sparsity structure, one that is quite
+c          different from the initial structure.  consider calling
+c          lsodes again with istate = 3 to force the structure to be
+c          reevaluated.  see the full description of istate below.
+c
+c f. to continue the integration after a successful return, simply
+c reset tout and CALL lsodes again.  no other parameters need be reset.
+c
+c-----------------------------------------------------------------------
+c example problem.
+c
+c the following is a simple example problem, with the coding
+c needed for its solution by lsodes.  the problem is from chemical
+c kinetics, and consists of the following 12 rate equations..
+c    dy1/dt  = -rk1*y1
+c    dy2/dt  = rk1*y1 + rk11*rk14*y4 + rk19*rk14*y5
+c                - rk3*y2*y3 - rk15*y2*y12 - rk2*y2
+c    dy3/dt  = rk2*y2 - rk5*y3 - rk3*y2*y3 - rk7*y10*y3
+c                + rk11*rk14*y4 + rk12*rk14*y6
+c    dy4/dt  = rk3*y2*y3 - rk11*rk14*y4 - rk4*y4
+c    dy5/dt  = rk15*y2*y12 - rk19*rk14*y5 - rk16*y5
+c    dy6/dt  = rk7*y10*y3 - rk12*rk14*y6 - rk8*y6
+c    dy7/dt  = rk17*y10*y12 - rk20*rk14*y7 - rk18*y7
+c    dy8/dt  = rk9*y10 - rk13*rk14*y8 - rk10*y8
+c    dy9/dt  = rk4*y4 + rk16*y5 + rk8*y6 + rk18*y7
+c    dy10/dt = rk5*y3 + rk12*rk14*y6 + rk20*rk14*y7
+c                + rk13*rk14*y8 - rk7*y10*y3 - rk17*y10*y12
+c                - rk6*y10 - rk9*y10
+c    dy11/dt = rk10*y8
+c    dy12/dt = rk6*y10 + rk19*rk14*y5 + rk20*rk14*y7
+c                - rk15*y2*y12 - rk17*y10*y12
+c
+c with rk1 = rk5 = 0.1,  rk4 = rk8 = rk16 = rk18 = 2.5,
+c      rk10 = 5.0,  rk2 = rk6 = 10.0,  rk14 = 30.0,
+c      rk3 = rk7 = rk9 = rk11 = rk12 = rk13 = rk19 = rk20 = 50.0,
+c      rk15 = rk17 = 100.0.
+c
+c the t interval is from 0 to 1000, and the initial conditions
+c are y1 = 1, y2 = y3 = ... = y12 = 0.  the problem is stiff.
+c
+c the following coding solves this problem with lsodes, using mf = 121
+c and printing results at t = .1, 1., 10., 100., 1000.  it uses
+c itol = 1 and mixed relative/absolute tolerance controls.
+c during the run and at the end, statistical quantities of interest
+c are printed (see optional outputs in the full description below).
+c
+c     external fex, jex
+c     KPP_REAL AbsTol, RelTol, rwork, t, tout, y
+c     dimension y(12), rwork(500), iwork(30)
+c     data lrw/500/, liw/30/
+c     neq = 12
+c     do 10 i = 1,neq
+c 10    y(i) = 0.0d0
+c     y(1) = 1.0d0
+c     t = 0.0d0
+c     tout = 0.1d0
+c     itol = 1
+c     RelTol = 1.0d-4
+c     AbsTol = 1.0d-6
+c     itask = 1
+c     istate = 1
+c     iopt = 0
+c     mf = 121
+c     do 40 iout = 1,5
+c       CALL lsodes (fex, neq, y, t, tout, itol, RelTol, AbsTol,
+c    1     itask, istate, iopt, rwork, lrw, iwork, liw, jex, mf)
+c       write(6,30)t,iwork(11),rwork(11),(y(i),i=1,neq)
+c 30    format(//7h at t =,e11.3,4x,
+c    1    12h no. steps =,i5,4x,12h last step =,e11.3/
+c    2    13h  y array =  ,4e14.5/13x,4e14.5/13x,4e14.5)
+c       if (istate .lt. 0) go to 80
+c       tout = tout*10.0d0
+c 40    continue
+c     lenrw = iwork(17)
+c     leniw = iwork(18)
+c     nst = iwork(11)
+c     nfe = iwork(12)
+c     nje = iwork(13)
+c     nlu = iwork(21)
+c     nnz = iwork(19)
+c     nnzlu = iwork(25) + iwork(26) + neq
+c     write (6,70) lenrw,leniw,nst,nfe,nje,nlu,nnz,nnzlu
+c 70  format(//22h required rwork size =,i4,15h   iwork size =,i4/
+c    1   12h no. steps =,i4,12h   no. f-s =,i4,12h   no. j-s =,i4,
+c    2   13h   no. lu-s =,i4/23h no. of nonzeros in j =,i5,
+c    3   26h   no. of nonzeros in lu =,i5)
+c     stop
+c 80  write(6,90)istate
+c 90  format(///22h error halt.. istate =,i3)
+c     stop
+c     end
+c
+c     subroutine fex (neq, t, y, ydot)
+c     KPP_REAL t, y, ydot
+c     KPP_REAL rk1, rk2, rk3, rk4, rk5, rk6, rk7, rk8, rk9,
+c    1   rk10, rk11, rk12, rk13, rk14, rk15, rk16, rk17
+c     dimension y(12), ydot(12)
+c     data rk1/0.1d0/, rk2/10.0d0/, rk3/50.0d0/, rk4/2.5d0/, rk5/0.1d0/,
+c    1   rk6/10.0d0/, rk7/50.0d0/, rk8/2.5d0/, rk9/50.0d0/, rk10/5.0d0/,
+c    2   rk11/50.0d0/, rk12/50.0d0/, rk13/50.0d0/, rk14/30.0d0/,
+c    3   rk15/100.0d0/, rk16/2.5d0/, rk17/100.0d0/, rk18/2.5d0/,
+c    4   rk19/50.0d0/, rk20/50.0d0/
+c     ydot(1)  = -rk1*y(1)
+c     ydot(2)  = rk1*y(1) + rk11*rk14*y(4) + rk19*rk14*y(5)
+c    1           - rk3*y(2)*y(3) - rk15*y(2)*y(12) - rk2*y(2)
+c     ydot(3)  = rk2*y(2) - rk5*y(3) - rk3*y(2)*y(3) - rk7*y(10)*y(3)
+c    1           + rk11*rk14*y(4) + rk12*rk14*y(6)
+c     ydot(4)  = rk3*y(2)*y(3) - rk11*rk14*y(4) - rk4*y(4)
+c     ydot(5)  = rk15*y(2)*y(12) - rk19*rk14*y(5) - rk16*y(5)
+c     ydot(6)  = rk7*y(10)*y(3) - rk12*rk14*y(6) - rk8*y(6)
+c     ydot(7)  = rk17*y(10)*y(12) - rk20*rk14*y(7) - rk18*y(7)
+c     ydot(8)  = rk9*y(10) - rk13*rk14*y(8) - rk10*y(8)
+c     ydot(9)  = rk4*y(4) + rk16*y(5) + rk8*y(6) + rk18*y(7)
+c     ydot(10) = rk5*y(3) + rk12*rk14*y(6) + rk20*rk14*y(7)
+c    1           + rk13*rk14*y(8) - rk7*y(10)*y(3) - rk17*y(10)*y(12)
+c    2           - rk6*y(10) - rk9*y(10)
+c     ydot(11) = rk10*y(8)
+c     ydot(12) = rk6*y(10) + rk19*rk14*y(5) + rk20*rk14*y(7)
+c    1           - rk15*y(2)*y(12) - rk17*y(10)*y(12)
+c     return
+c     end
+c
+c     subroutine jex (neq, t, y, j, ia, ja, pdj)
+c     KPP_REAL t, y, pdj
+c     KPP_REAL rk1, rk2, rk3, rk4, rk5, rk6, rk7, rk8, rk9,
+c    1   rk10, rk11, rk12, rk13, rk14, rk15, rk16, rk17
+c     dimension y(1), ia(1), ja(1), pdj(1)
+c     data rk1/0.1d0/, rk2/10.0d0/, rk3/50.0d0/, rk4/2.5d0/, rk5/0.1d0/,
+c    1   rk6/10.0d0/, rk7/50.0d0/, rk8/2.5d0/, rk9/50.0d0/, rk10/5.0d0/,
+c    2   rk11/50.0d0/, rk12/50.0d0/, rk13/50.0d0/, rk14/30.0d0/,
+c    3   rk15/100.0d0/, rk16/2.5d0/, rk17/100.0d0/, rk18/2.5d0/,
+c    4   rk19/50.0d0/, rk20/50.0d0/
+c     go to (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), j
+c 1   pdj(1) = -rk1
+c     pdj(2) = rk1
+c     return
+c 2   pdj(2) = -rk3*y(3) - rk15*y(12) - rk2
+c     pdj(3) = rk2 - rk3*y(3)
+c     pdj(4) = rk3*y(3)
+c     pdj(5) = rk15*y(12)
+c     pdj(12) = -rk15*y(12)
+c     return
+c 3   pdj(2) = -rk3*y(2)
+c     pdj(3) = -rk5 - rk3*y(2) - rk7*y(10)
+c     pdj(4) = rk3*y(2)
+c     pdj(6) = rk7*y(10)
+c     pdj(10) = rk5 - rk7*y(10)
+c     return
+c 4   pdj(2) = rk11*rk14
+c     pdj(3) = rk11*rk14
+c     pdj(4) = -rk11*rk14 - rk4
+c     pdj(9) = rk4
+c     return
+c 5   pdj(2) = rk19*rk14
+c     pdj(5) = -rk19*rk14 - rk16
+c     pdj(9) = rk16
+c     pdj(12) = rk19*rk14
+c     return
+c 6   pdj(3) = rk12*rk14
+c     pdj(6) = -rk12*rk14 - rk8
+c     pdj(9) = rk8
+c     pdj(10) = rk12*rk14
+c     return
+c 7   pdj(7) = -rk20*rk14 - rk18
+c     pdj(9) = rk18
+c     pdj(10) = rk20*rk14
+c     pdj(12) = rk20*rk14
+c     return
+c 8   pdj(8) = -rk13*rk14 - rk10
+c     pdj(10) = rk13*rk14
+c     pdj(11) = rk10
+c 9   return
+c 10  pdj(3) = -rk7*y(3)
+c     pdj(6) = rk7*y(3)
+c     pdj(7) = rk17*y(12)
+c     pdj(8) = rk9
+c     pdj(10) = -rk7*y(3) - rk17*y(12) - rk6 - rk9
+c     pdj(12) = rk6 - rk17*y(12)
+c 11  return
+c 12  pdj(2) = -rk15*y(2)
+c     pdj(5) = rk15*y(2)
+c     pdj(7) = rk17*y(10)
+c     pdj(10) = -rk17*y(10)
+c     pdj(12) = -rk15*y(2) - rk17*y(10)
+c     return
+c     end
+c
+c the output of this program (on a cray-1 in single precision)
+c is as follows..
+c
+c
+c at t =  1.000e-01     no. steps =   12     last step =  1.515e-02
+c  y array =     9.90050e-01   6.28228e-03   3.65313e-03   7.51934e-07
+c                1.12167e-09   1.18458e-09   1.77291e-12   3.26476e-07
+c                5.46720e-08   9.99500e-06   4.48483e-08   2.76398e-06
+c
+c
+c at t =  1.000e+00     no. steps =   33     last step =  7.880e-02
+c  y array =     9.04837e-01   9.13105e-03   8.20622e-02   2.49177e-05
+c                1.85055e-06   1.96797e-06   1.46157e-07   2.39557e-05
+c                3.26306e-05   7.21621e-04   5.06433e-05   3.05010e-03
+c
+c
+c at t =  1.000e+01     no. steps =   48     last step =  1.239e+00
+c  y array =     3.67876e-01   3.68958e-03   3.65133e-01   4.48325e-05
+c                6.10798e-05   4.33148e-05   5.90211e-05   1.18449e-04
+c                3.15235e-03   3.56531e-03   4.15520e-03   2.48741e-01
+c
+c
+c at t =  1.000e+02     no. steps =   91     last step =  3.764e+00
+c  y array =     4.44981e-05   4.42666e-07   4.47273e-04  -3.53257e-11
+c                2.81577e-08  -9.67741e-11   2.77615e-07   1.45322e-07
+c                1.56230e-02   4.37394e-06   1.60104e-02   9.52246e-01
+c
+c
+c at t =  1.000e+03     no. steps =  111     last step =  4.156e+02
+c  y array =    -2.65492e-13   2.60539e-14  -8.59563e-12   6.29355e-14
+c               -1.78066e-13   5.71471e-13  -1.47561e-12   4.58078e-15
+c                1.56314e-02   1.37878e-13   1.60184e-02   9.52719e-01
+c
+c
+c required rwork size = 442   iwork size =  30
+c no. steps = 111   no. f-s = 142   no. j-s =   2   no. lu-s =  20
+c no. of nonzeros in j =   44   no. of nonzeros in lu =   50
+c-----------------------------------------------------------------------
+c full description of user interface to lsodes.
+c
+c the user interface to lsodes consists of the following parts.
+c
+c i.   the CALL sequence to subroutine lsodes, which is a driver
+c      routine for the solver.  this includes descriptions of both
+c      the CALL sequence arguments and of user-supplied routines.
+c      following these descriptions is a description of
+c      optional inputs available through the CALL sequence, and then
+c      a description of optional outputs (in the work arrays).
+c
+c ii.  descriptions of other routines in the lsodes package that may be
+c      (optionally) called by the user.  these provide the ability to
+c      alter error message handling, save and restore the internal
+c      common, and obtain specified derivatives of the solution y(t).
+c
+c iii. descriptions of common blocks to be declared in overlay
+c      or similar environments, or to be saved when doing an interrupt
+c      of the problem and continued solution later.
+c
+c iv.  description of two routines in the lsodes package, either of
+c      which the user may replace with his own version, if desired.
+c      these relate to the measurement of errors.
+c
+c-----------------------------------------------------------------------
+c part i.  CALL sequence.
+c
+c the CALL sequence parameters used for input only are
+c     f, neq, tout, itol, RelTol, AbsTol, itask, iopt, lrw, liw, jac, mf,
+c and those used for both input and output are
+c     y, t, istate.
+c the work arrays rwork and iwork are also used for conditional and
+c optional inputs and optional outputs.  (the term output here refers
+c to the return from subroutine lsodes to the user-s calling program.)
+c
+c the legality of input parameters will be thoroughly checked on the
+c initial CALL for the problem, but not checked thereafter unless a
+c change in input parameters is flagged by istate = 3 on input.
+c
+c the descriptions of the CALL arguments are as follows.
+c
+c f      = the name of the user-supplied subroutine defining the
+c          ode system.  the system must be put in the first-order
+c          form dy/dt = f(t,y), where f is a vector-valued function
+c          of the scalar t and the vector y.  subroutine f is to
+c          compute the function f.  it is to have the form
+c               subroutine f (neq, t, y, ydot)
+c               dimension y(1), ydot(1)
+c          where neq, t, and y are input, and the array ydot = f(t,y)
+c          is output.  y and ydot are arrays of length neq.
+c          (in the dimension statement above, 1 is a dummy
+c          dimension.. it can be replaced by any value.)
+c          subroutine f should not alter y(1),...,y(neq).
+c          f must be declared external in the calling program.
+c
+c          subroutine f may access user-defined quantities in
+c          neq(2),... and/or in y(neq(1)+1),... if neq is an array
+c          (dimensioned in f) and/or y has length exceeding neq(1).
+c          see the descriptions of neq and y below.
+c
+c          if quantities computed in the f routine are needed
+c          externally to lsodes, an extra CALL to f should be made
+c          for this purpose, for consistent and accurate results.
+c          if only the derivative dy/dt is needed, use intdy instead.
+c
+c neq    = the size of the ode system (number of first order
+c          ordinary differential equations).  used only for input.
+c          neq may be decreased, but not increased, during the problem.
+c          if neq is decreased (with istate = 3 on input), the
+c          remaining components of y should be left undisturbed, if
+c          these are to be accessed in f and/or jac.
+c
+c          normally, neq is a scalar, and it is generally referred to
+c          as a scalar in this user interface description.  however,
+c          neq may be an array, with neq(1) set to the system size.
+c          (the lsodes package accesses only neq(1).)  in either case,
+c          this parameter is passed as the neq argument in all calls
+c          to f and jac.  hence, if it is an array, locations
+c          neq(2),... may be used to store other integer data and pass
+c          it to f and/or jac.  subroutines f and/or jac must include
+c          neq in a dimension statement in that case.
+c
+c y      = a real array for the vector of dependent variables, of
+c          length neq or more.  used for both input and output on the
+c          first CALL (istate = 1), and only for output on other calls.
+c          on the first call, y must contain the vector of initial
+c          values.  on output, y contains the computed solution vector,
+c          evaluated at t.  if desired, the y array may be used
+c          for other purposes between calls to the solver.
+c
+c          this array is passed as the y argument in all calls to
+c          f and jac.  hence its length may exceed neq, and locations
+c          y(neq+1),... may be used to store other real data and
+c          pass it to f and/or jac.  (the lsodes package accesses only
+c          y(1),...,y(neq).)
+c
+c t      = the independent variable.  on input, t is used only on the
+c          first call, as the initial point of the integration.
+c          on output, after each call, t is the value at which a
+c          computed solution y is evaluated (usually the same as tout).
+c          on an error return, t is the farthest point reached.
+c
+c tout   = the next value of t at which a computed solution is desired.
+c          used only for input.
+c
+c          when starting the problem (istate = 1), tout may be equal
+c          to t for one call, then should .ne. t for the next call.
+c          for the initial t, an input value of tout .ne. t is used
+c          in order to determine the direction of the integration
+c          (i.e. the algebraic sign of the step sizes) and the rough
+c          scale of the problem.  integration in either direction
+c          (forward or backward in t) is permitted.
+c
+c          if itask = 2 or 5 (one-step modes), tout is ignored after
+c          the first CALL (i.e. the first CALL with tout .ne. t).
+c          otherwise, tout is required on every call.
+c
+c          if itask = 1, 3, or 4, the values of tout need not be
+c          monotone, but a value of tout which backs up is limited
+c          to the current internal t interval, whose endpoints are
+c          tcur - hu and tcur (see optional outputs, below, for
+c          tcur and hu).
+c
+c itol   = an indicator for the type of error control.  see
+c          description below under AbsTol.  used only for input.
+c
+c RelTol   = a relative error tolerance parameter, either a scalar or
+c          an array of length neq.  see description below under AbsTol.
+c          input only.
+c
+c AbsTol   = an absolute error tolerance parameter, either a scalar or
+c          an array of length neq.  input only.
+c
+c             the input parameters itol, RelTol, and AbsTol determine
+c          the error control performed by the solver.  the solver will
+c          control the vector e = (e(i)) of estimated local errors
+c          in y, according to an inequality of the form
+c                      rms-norm of ( e(i)/ewt(i) )   .le.   1,
+c          where       ewt(i) = RelTol(i)*abs(y(i)) + AbsTol(i),
+c          and the rms-norm (root-mean-square norm) here is
+c          rms-norm(v) = sqrt(sum v(i)**2 / neq).  here ewt = (ewt(i))
+c          is a vector of weights which must always be positive, and
+c          the values of RelTol and AbsTol should all be non-negative.
+c          the following table gives the types (scalar/array) of
+c          RelTol and AbsTol, and the corresponding form of ewt(i).
+c
+c             itol    RelTol       AbsTol          ewt(i)
+c              1     scalar     scalar     RelTol*abs(y(i)) + AbsTol
+c              2     scalar     array      RelTol*abs(y(i)) + AbsTol(i)
+c              3     array      scalar     RelTol(i)*abs(y(i)) + AbsTol
+c              4     array      array      RelTol(i)*abs(y(i)) + AbsTol(i)
+c
+c          when either of these parameters is a scalar, it need not
+c          be dimensioned in the user-s calling program.
+c
+c          if none of the above choices (with itol, RelTol, and AbsTol
+c          fixed throughout the problem) is suitable, more general
+c          error controls can be obtained by substituting
+c          user-supplied routines for the setting of ewt and/or for
+c          the norm calculation.  see part iv below.
+c
+c          if global errors are to be estimated by making a repeated
+c          run on the same problem with smaller tolerances, then all
+c          components of RelTol and AbsTol (i.e. of ewt) should be scaled
+c          down uniformly.
+c
+c itask  = an index specifying the task to be performed.
+c          input only.  itask has the following values and meanings.
+c          1  means normal computation of output values of y(t) at
+c             t = tout (by overshooting and interpolating).
+c          2  means take one step only and return.
+c          3  means stop at the first internal mesh point at or
+c             beyond t = tout and return.
+c          4  means normal computation of output values of y(t) at
+c             t = tout but without overshooting t = tcrit.
+c             tcrit must be input as rwork(1).  tcrit may be equal to
+c             or beyond tout, but not behind it in the direction of
+c             integration.  this option is useful if the problem
+c             has a singularity at or beyond t = tcrit.
+c          5  means take one step, without passing tcrit, and return.
+c             tcrit must be input as rwork(1).
+c
+c          note..  if itask = 4 or 5 and the solver reaches tcrit
+c          (within roundoff), it will return t = tcrit (exactly) to
+c          indicate this (unless itask = 4 and tout comes before tcrit,
+c          in which case answers at t = tout are returned first).
+c
+c istate = an index used for input and output to specify the
+c          the state of the calculation.
+c
+c          on input, the values of istate are as follows.
+c          1  means this is the first CALL for the problem
+c             (initializations will be done).  see note below.
+c          2  means this is not the first call, and the calculation
+c             is to continue normally, with no change in any input
+c             parameters except possibly tout and itask.
+c             (if itol, RelTol, and/or AbsTol are changed between calls
+c             with istate = 2, the new values will be used but not
+c             tested for legality.)
+c          3  means this is not the first call, and the
+c             calculation is to continue normally, but with
+c             a change in input parameters other than
+c             tout and itask.  changes are allowed in
+c             neq, itol, RelTol, AbsTol, iopt, lrw, liw, mf,
+c             the conditional inputs ia and ja,
+c             and any of the optional inputs except h0.
+c             in particular, if miter = 1 or 2, a CALL with istate = 3
+c             will cause the sparsity structure of the problem to be
+c             recomputed (or reread from ia and ja if moss = 0).
+c          note..  a preliminary CALL with tout = t is not counted
+c          as a first CALL here, as no initialization or checking of
+c          input is done.  (such a CALL is sometimes useful for the
+c          purpose of outputting the initial conditions.)
+c          thus the first CALL for which tout .ne. t requires
+c          istate = 1 on input.
+c
+c          on output, istate has the following values and meanings.
+c           1  means nothing was done, as tout was equal to t with
+c              istate = 1 on input.  (however, an internal counter was
+c              set to detect and prevent repeated calls of this type.)
+c           2  means the integration was performed successfully.
+c          -1  means an excessive amount of work (more than mxstep
+c              steps) was done on this call, before completing the
+c              requested task, but the integration was otherwise
+c              successful as far as t.  (mxstep is an optional input
+c              and is normally 500.)  to continue, the user may
+c              simply reset istate to a value .gt. 1 and CALL again
+c              (the excess work step counter will be reset to 0).
+c              in addition, the user may increase mxstep to avoid
+c              this error return (see below on optional inputs).
+c          -2  means too much accuracy was requested for the precision
+c              of the machine being used.  this was detected before
+c              completing the requested task, but the integration
+c              was successful as far as t.  to continue, the tolerance
+c              parameters must be reset, and istate must be set
+c              to 3.  the optional output tolsf may be used for this
+c              purpose.  (note.. if this condition is detected before
+c              taking any steps, then an illegal input return
+c              (istate = -3) occurs instead.)
+c          -3  means illegal input was detected, before taking any
+c              integration steps.  see written message for details.
+c              note..  if the solver detects an infinite loop of calls
+c              to the solver with illegal input, it will cause
+c              the run to stop.
+c          -4  means there were repeated error test failures on
+c              one attempted step, before completing the requested
+c              task, but the integration was successful as far as t.
+c              the problem may have a singularity, or the input
+c              may be inappropriate.
+c          -5  means there were repeated convergence test failures on
+c              one attempted step, before completing the requested
+c              task, but the integration was successful as far as t.
+c              this may be caused by an inaccurate jacobian matrix,
+c              if one is being used.
+c          -6  means ewt(i) became zero for some i during the
+c              integration.  pure relative error control (AbsTol(i)=0.0)
+c              was requested on a variable which has now vanished.
+c              the integration was successful as far as t.
+c          -7  means a fatal error return flag came from the sparse
+c              solver cdrv by way of prjs or slss (numerical
+c              factorization or backsolve).  this should never happen.
+c              the integration was successful as far as t.
+c
+c          note.. an error return with istate = -1, -4, or -5 and with
+c          miter = 1 or 2 may mean that the sparsity structure of the
+c          problem has changed significantly since it was last
+c          determined (or input).  in that case, one can attempt to
+c          complete the integration by setting istate = 3 on the next
+c          call, so that a new structure determination is done.
+c
+c          note..  since the normal output value of istate is 2,
+c          it does not need to be reset for normal continuation.
+c          also, since a negative input value of istate will be
+c          regarded as illegal, a negative output value requires the
+c          user to change it, and possibly other inputs, before
+c          calling the solver again.
+c
+c iopt   = an integer flag to specify whether or not any optional
+c          inputs are being used on this call.  input only.
+c          the optional inputs are listed separately below.
+c          iopt = 0 means no optional inputs are being used.
+c                   default values will be used in all cases.
+c          iopt = 1 means one or more optional inputs are being used.
+c
+c rwork  = a work array used for a mixture of real (KPP_REAL)
+c          and integer work space.
+c          the length of rwork (in real words) must be at least
+c             20 + nyh*(maxord + 1) + 3*neq + lwm    where
+c          nyh    = the initial value of neq,
+c          maxord = 12 (if meth = 1) or 5 (if meth = 2) (unless a
+c                   smaller value is given as an optional input),
+c          lwm = 0                                    if miter = 0,
+c          lwm = 2*nnz + 2*neq + (nnz+9*neq)/lenrat   if miter = 1,
+c          lwm = 2*nnz + 2*neq + (nnz+10*neq)/lenrat  if miter = 2,
+c          lwm = neq + 2                              if miter = 3.
+c          in the above formulas,
+c          nnz    = number of nonzero elements in the jacobian matrix.
+c          lenrat = the real to integer wordlength ratio (usually 1 in
+c                   single precision and 2 in KPP_REAL).
+c          (see the mf description for meth and miter.)
+c          thus if maxord has its default value and neq is constant,
+c          the minimum length of rwork is..
+c             20 + 16*neq        for mf = 10,
+c             20 + 16*neq + lwm  for mf = 11, 111, 211, 12, 112, 212,
+c             22 + 17*neq        for mf = 13,
+c             20 +  9*neq        for mf = 20,
+c             20 +  9*neq + lwm  for mf = 21, 121, 221, 22, 122, 222,
+c             22 + 10*neq        for mf = 23.
+c          if miter = 1 or 2, the above formula for lwm is only a
+c          crude lower bound.  the required length of rwork cannot
+c          be readily predicted in general, as it depends on the
+c          sparsity structure of the problem.  some experimentation
+c          may be necessary.
+c
+c          the first 20 words of rwork are reserved for conditional
+c          and optional inputs and optional outputs.
+c
+c          the following word in rwork is a conditional input..
+c            rwork(1) = tcrit = critical value of t which the solver
+c                       is not to overshoot.  required if itask is
+c                       4 or 5, and ignored otherwise.  (see itask.)
+c
+c lrw    = the length of the array rwork, as declared by the user.
+c          (this will be checked by the solver.)
+c
+c iwork  = an integer work array.  the length of iwork must be at least
+c             31 + neq + nnz   if moss = 0 and miter = 1 or 2, or
+c             30               otherwise.
+c          (nnz is the number of nonzero elements in df/dy.)
+c
+c          in lsodes, iwork is used only for conditional and
+c          optional inputs and optional outputs.
+c
+c          the following two blocks of words in iwork are conditional
+c          inputs, required if moss = 0 and miter = 1 or 2, but not
+c          otherwise (see the description of mf for moss).
+c            iwork(30+j) = ia(j)     (j=1,...,neq+1)
+c            iwork(31+neq+k) = ja(k) (k=1,...,nnz)
+c          the two arrays ia and ja describe the sparsity structure
+c          to be assumed for the jacobian matrix.  ja contains the row
+c          indices where nonzero elements occur, reading in columnwise
+c          order, and ia contains the starting locations in ja of the
+c          descriptions of columns 1,...,neq, in that order, with
+c          ia(1) = 1.  thus, for each column index j = 1,...,neq, the
+c          values of the row index i in column j where a nonzero
+c          element may occur are given by
+c            i = ja(k),  where   ia(j) .le. k .lt. ia(j+1).
+c          if nnz is the total number of nonzero locations assumed,
+c          then the length of the ja array is nnz, and ia(neq+1) must
+c          be nnz + 1.  duplicate entries are not allowed.
+c
+c liw    = the length of the array iwork, as declared by the user.
+c          (this will be checked by the solver.)
+c
+c note..  the work arrays must not be altered between calls to lsodes
+c for the same problem, except possibly for the conditional and
+c optional inputs, and except for the last 3*neq words of rwork.
+c the latter space is used for internal scratch space, and so is
+c available for use by the user outside lsodes between calls, if
+c desired (but not for use by f or jac).
+c
+c jac    = name of user-supplied routine (miter = 1 or moss = 1) to
+c          compute the jacobian matrix, df/dy, as a function of
+c          the scalar t and the vector y.  it is to have the form
+c               subroutine jac (neq, t, y, j, ian, jan, pdj)
+c               dimension y(1), ian(1), jan(1), pdj(1)
+c          where neq, t, y, j, ian, and jan are input, and the array
+c          pdj, of length neq, is to be loaded with column j
+c          of the jacobian on output.  thus df(i)/dy(j) is to be
+c          loaded into pdj(i) for all relevant values of i.
+c          here t and y have the same meaning as in subroutine f,
+c          and j is a column index (1 to neq).  ian and jan are
+c          undefined in calls to jac for structure determination
+c          (moss = 1).  otherwise, ian and jan are structure
+c          descriptors, as defined under optional outputs below, and
+c          so can be used to determine the relevant row indices i, if
+c          desired.  (in the dimension statement above, 1 is a
+c          dummy dimension.. it can be replaced by any value.)
+c               jac need not provide df/dy exactly.  a crude
+c          approximation (possibly with greater sparsity) will do.
+c               in any case, pdj is preset to zero by the solver,
+c          so that only the nonzero elements need be loaded by jac.
+c          calls to jac are made with j = 1,...,neq, in that order, and
+c          each such set of calls is preceded by a CALL to f with the
+c          same arguments neq, t, and y.  thus to gain some efficiency,
+c          intermediate quantities shared by both calculations may be
+c          saved in a user common block by f and not recomputed by jac,
+c          if desired.  jac must not alter its input arguments.
+c          jac must be declared external in the calling program.
+c               subroutine jac may access user-defined quantities in
+c          neq(2),... and y(neq(1)+1),... if neq is an array
+c          (dimensioned in jac) and y has length exceeding neq(1).
+c          see the descriptions of neq and y above.
+c
+c mf     = the method flag.  used only for input.
+c          mf has three decimal digits-- moss, meth, miter--
+c             mf = 100*moss + 10*meth + miter.
+c          moss indicates the method to be used to obtain the sparsity
+c          structure of the jacobian matrix if miter = 1 or 2..
+c            moss = 0 means the user has supplied ia and ja
+c                     (see descriptions under iwork above).
+c            moss = 1 means the user has supplied jac (see below)
+c                     and the structure will be obtained from neq
+c                     initial calls to jac.
+c            moss = 2 means the structure will be obtained from neq+1
+c                     initial calls to f.
+c          meth indicates the basic linear multistep method..
+c            meth = 1 means the implicit adams method.
+c            meth = 2 means the method based on backward
+c                     differentiation formulas (bdf-s).
+c          miter indicates the corrector iteration method..
+c            miter = 0 means functional iteration (no jacobian matrix
+c                      is involved).
+c            miter = 1 means chord iteration with a user-supplied
+c                      sparse jacobian, given by subroutine jac.
+c            miter = 2 means chord iteration with an internally
+c                      generated (difference quotient) sparse jacobian
+c                      (using ngp extra calls to f per df/dy value,
+c                      where ngp is an optional output described below.)
+c            miter = 3 means chord iteration with an internally
+c                      generated diagonal jacobian approximation.
+c                      (using 1 extra CALL to f per df/dy evaluation).
+c          if miter = 1 or moss = 1, the user must supply a subroutine
+c          jac (the name is arbitrary) as described above under jac.
+c          otherwise, a dummy argument can be used.
+c
+c          the standard choices for mf are..
+c            mf = 10  for a nonstiff problem,
+c            mf = 21 or 22 for a stiff problem with ia/ja supplied
+c                     (21 if jac is supplied, 22 if not),
+c            mf = 121 for a stiff problem with jac supplied,
+c                     but not ia/ja,
+c            mf = 222 for a stiff problem with neither ia/ja nor
+c                     jac supplied.
+c          the sparseness structure can be changed during the
+c          problem by making a CALL to lsodes with istate = 3.
+c-----------------------------------------------------------------------
+c optional inputs.
+c
+c the following is a list of the optional inputs provided for in the
+c CALL sequence.  (see also part ii.)  for each such input variable,
+c this table lists its name as used in this documentation, its
+c location in the CALL sequence, its meaning, and the default value.
+c the use of any of these inputs requires iopt = 1, and in that
+c case all of these inputs are examined.  a value of zero for any
+c of these optional inputs will cause the default value to be used.
+c thus to use a subset of the optional inputs, simply preload
+c locations 5 to 10 in rwork and iwork to 0.0 and 0 respectively, and
+c then set those of interest to nonzero values.
+c
+c name    location      meaning and default value
+c
+c h0      rwork(5)  the step size to be attempted on the first step.
+c                   the default value is determined by the solver.
+c
+c hmax    rwork(6)  the maximum absolute step size allowed.
+c                   the default value is infinite.
+c
+c hmin    rwork(7)  the minimum absolute step size allowed.
+c                   the default value is 0.  (this lower bound is not
+c                   enforced on the final step before reaching tcrit
+c                   when itask = 4 or 5.)
+c
+c seth    rwork(8)  the element threshhold for sparsity determination
+c                   when moss = 1 or 2.  if the absolute value of
+c                   an estimated jacobian element is .le. seth, it
+c                   will be assumed to be absent in the structure.
+c                   the default value of seth is 0.
+c
+c maxord  iwork(5)  the maximum order to be allowed.  the default
+c                   value is 12 if meth = 1, and 5 if meth = 2.
+c                   if maxord exceeds the default value, it will
+c                   be reduced to the default value.
+c                   if maxord is changed during the problem, it may
+c                   cause the current order to be reduced.
+c
+c mxstep  iwork(6)  maximum number of (internally defined) steps
+c                   allowed during one CALL to the solver.
+c                   the default value is 500.
+c
+c mxhnil  iwork(7)  maximum number of messages printed (per problem)
+c                   warning that t + h = t on a step (h = step size).
+c                   this must be positive to result in a non-default
+c                   value.  the default value is 10.
+c-----------------------------------------------------------------------
+c optional outputs.
+c
+c as optional additional output from lsodes, the variables listed
+c below are quantities related to the performance of lsodes
+c which are available to the user.  these are communicated by way of
+c the work arrays, but also have internal mnemonic names as shown.
+c except where stated otherwise, all of these outputs are defined
+c on any successful return from lsodes, and on any return with
+c istate = -1, -2, -4, -5, or -6.  on an illegal input return
+c (istate = -3), they will be unchanged from their existing values
+c (if any), except possibly for tolsf, lenrw, and leniw.
+c on any error return, outputs relevant to the error will be defined,
+c as noted below.
+c
+c name    location      meaning
+c
+c hu      rwork(11) the step size in t last used (successfully).
+c
+c hcur    rwork(12) the step size to be attempted on the next step.
+c
+c tcur    rwork(13) the current value of the independent variable
+c                   which the solver has actually reached, i.e. the
+c                   current internal mesh point in t.  on output, tcur
+c                   will always be at least as far as the argument
+c                   t, but may be farther (if interpolation was done).
+c
+c tolsf   rwork(14) a tolerance scale factor, greater than 1.0,
+c                   computed when a request for too much accuracy was
+c                   detected (istate = -3 if detected at the start of
+c                   the problem, istate = -2 otherwise).  if itol is
+c                   left unaltered but RelTol and AbsTol are uniformly
+c                   scaled up by a factor of tolsf for the next call,
+c                   then the solver is deemed likely to succeed.
+c                   (the user may also ignore tolsf and alter the
+c                   tolerance parameters in any other way appropriate.)
+c
+c nst     iwork(11) the number of steps taken for the problem so far.
+c
+c nfe     iwork(12) the number of f evaluations for the problem so far,
+c                   excluding those for structure determination
+c                   (moss = 2).
+c
+c nje     iwork(13) the number of jacobian evaluations for the problem
+c                   so far, excluding those for structure determination
+c                   (moss = 1).
+c
+c nqu     iwork(14) the method order last used (successfully).
+c
+c nqcur   iwork(15) the order to be attempted on the next step.
+c
+c imxer   iwork(16) the index of the component of largest magnitude in
+c                   the weighted local error vector ( e(i)/ewt(i) ),
+c                   on an error return with istate = -4 or -5.
+c
+c lenrw   iwork(17) the length of rwork actually required.
+c                   this is defined on normal returns and on an illegal
+c                   input return for insufficient storage.
+c
+c leniw   iwork(18) the length of iwork actually required.
+c                   this is defined on normal returns and on an illegal
+c                   input return for insufficient storage.
+c
+c nnz     iwork(19) the number of nonzero elements in the jacobian
+c                   matrix, including the diagonal (miter = 1 or 2).
+c                   (this may differ from that given by ia(neq+1)-1
+c                   if moss = 0, because of added diagonal entries.)
+c
+c ngp     iwork(20) the number of groups of column indices, used in
+c                   difference quotient jacobian aproximations if
+c                   miter = 2.  this is also the number of extra f
+c                   evaluations needed for each jacobian evaluation.
+c
+c nlu     iwork(21) the number of sparse lu decompositions for the
+c                   problem so far.
+c
+c lyh     iwork(22) the base address in rwork of the history array yh,
+c                   described below in this list.
+c
+c ipian   iwork(23) the base address of the structure descriptor array
+c                   ian, described below in this list.
+c
+c ipjan   iwork(24) the base address of the structure descriptor array
+c                   jan, described below in this list.
+c
+c nzl     iwork(25) the number of nonzero elements in the strict lower
+c                   triangle of the lu factorization used in the chord
+c                   iteration (miter = 1 or 2).
+c
+c nzu     iwork(26) the number of nonzero elements in the strict upper
+c                   triangle of the lu factorization used in the chord
+c                   iteration (miter = 1 or 2).
+c                   the total number of nonzeros in the factorization
+c                   is therefore nzl + nzu + neq.
+c
+c the following four arrays are segments of the rwork array which
+c may also be of interest to the user as optional outputs.
+c for each array, the table below gives its internal name,
+c its base address, and its description.
+c for yh and acor, the base addresses are in rwork (a real array).
+c the integer arrays ian and jan are to be obtained by declaring an
+c integer array iwk and identifying iwk(1) with rwork(21), using either
+c an equivalence statement or a subroutine call.  then the base
+c addresses ipian (of ian) and ipjan (of jan) in iwk are to be obtained
+c as optional outputs iwork(23) and iwork(24), respectively.
+c thus ian(1) is iwk(ipian), etc.
+c
+c name    base address      description
+c
+c ian    ipian (in iwk)  structure descriptor array of size neq + 1.
+c jan    ipjan (in iwk)  structure descriptor array of size nnz.
+c         (see above)    ian and jan together describe the sparsity
+c                        structure of the jacobian matrix, as used by
+c                        lsodes when miter = 1 or 2.
+c                        jan contains the row indices of the nonzero
+c                        locations, reading in columnwise order, and
+c                        ian contains the starting locations in jan of
+c                        the descriptions of columns 1,...,neq, in
+c                        that order, with ian(1) = 1.  thus for each
+c                        j = 1,...,neq, the row indices i of the
+c                        nonzero locations in column j are
+c                        i = jan(k),  ian(j) .le. k .lt. ian(j+1).
+c                        note that ian(neq+1) = nnz + 1.
+c                        (if moss = 0, ian/jan may differ from the
+c                        input ia/ja because of a different ordering
+c                        in each column, and added diagonal entries.)
+c
+c yh      lyh            the nordsieck history array, of size nyh by
+c          (optional     (nqcur + 1), where nyh is the initial value
+c          output)       of neq.  for j = 0,1,...,nqcur, column j+1
+c                        of yh contains hcur**j/factorial(j) times
+c                        the j-th derivative of the interpolating
+c                        polynomial currently representing the solution,
+c                        evaluated at t = tcur.  the base address lyh
+c                        is another optional output, listed above.
+c
+c acor     lenrw-neq+1   array of size neq used for the accumulated
+c                        corrections on each step, scaled on output
+c                        to represent the estimated local error in y
+c                        on the last step.  this is the vector e in
+c                        the description of the error control.  it is
+c                        defined only on a successful return from
+c                        lsodes.
+c
+c-----------------------------------------------------------------------
+c part ii.  other routines callable.
+c
+c the following are optional calls which the user may make to
+c gain additional capabilities in conjunction with lsodes.
+c (the routines xsetun and xsetf are designed to conform to the
+c slatec error handling package.)
+c
+c     form of CALL                  function
+c   CALL xsetun(lun)          set the logical unit number, lun, for
+c                             output of messages from lsodes, if
+c                             the default is not desired.
+c                             the default value of lun is 6.
+c
+c   CALL xsetf(mflag)         set a flag to control the printing of
+c                             messages by lsodes.
+c                             mflag = 0 means do not print. (danger..
+c                             this risks losing valuable information.)
+c                             mflag = 1 means print (the default).
+c
+c                             either of the above calls may be made at
+c                             any time and will take effect immediately.
+c
+c   CALL srcms(rsav,isav,job) saves and restores the contents of
+c                             the internal common blocks used by
+c                             lsodes (see part iii below).
+c                             rsav must be a real array of length 224
+c                             or more, and isav must be an integer
+c                             array of length 75 or more.
+c                             job=1 means save common into rsav/isav.
+c                             job=2 means restore common from rsav/isav.
+c                                srcms is useful if one is
+c                             interrupting a run and restarting
+c                             later, or alternating between two or
+c                             more problems solved with lsodes.
+c
+c   CALL intdy(,,,,,)         provide derivatives of y, of various
+c        (see below)          orders, at a specified point t, if
+c                             desired.  it may be called only after
+c                             a successful return from lsodes.
+c
+c the detailed instructions for using intdy are as follows.
+c the form of the CALL is..
+c
+c   lyh = iwork(22)
+c   CALL intdy (t, k, rwork(lyh), nyh, dky, iflag)
+c
+c the input parameters are..
+c
+c t         = value of independent variable where answers are desired
+c             (normally the same as the t last returned by lsodes).
+c             for valid results, t must lie between tcur - hu and tcur.
+c             (see optional outputs for tcur and hu.)
+c k         = integer order of the derivative desired.  k must satisfy
+c             0 .le. k .le. nqcur, where nqcur is the current order
+c             (see optional outputs).  the capability corresponding
+c             to k = 0, i.e. computing y(t), is already provided
+c             by lsodes directly.  since nqcur .ge. 1, the first
+c             derivative dy/dt is always available with intdy.
+c lyh       = the base address of the history array yh, obtained
+c             as an optional output as shown above.
+c nyh       = column length of yh, equal to the initial value of neq.
+c
+c the output parameters are..
+c
+c dky       = a real array of length neq containing the computed value
+c             of the k-th derivative of y(t).
+c iflag     = integer flag, returned as 0 if k and t were legal,
+c             -1 if k was illegal, and -2 if t was illegal.
+c             on an error return, a message is also written.
+c-----------------------------------------------------------------------
+c part iii.  common blocks.
+c
+c if lsodes is to be used in an overlay situation, the user
+c must declare, in the primary overlay, the variables in..
+c   (1) the CALL sequence to lsodes,
+c   (2) the three internal common blocks
+c         /ls0001/  of length  257  (218 KPP_REAL words
+c                         followed by 39 integer words),
+c         /lss001/  of length  40    ( 6 KPP_REAL words
+c                         followed by 34 integer words),
+c         /eh0001/  of length  2 (integer words).
+c
+c if lsodes is used on a system in which the contents of internal
+c common blocks are not preserved between calls, the user should
+c declare the above three common blocks in his main program to insure
+c that their contents are preserved.
+c
+c if the solution of a given problem by lsodes is to be interrupted
+c and then later continued, such as when restarting an interrupted run
+c or alternating between two or more problems, the user should save,
+c following the return from the last lsodes CALL prior to the
+c interruption, the contents of the CALL sequence variables and the
+c internal common blocks, and later restore these values before the
+c next lsodes CALL for that problem.  to save and restore the common
+c blocks, use subroutine srcms (see part ii above).
+c
+c-----------------------------------------------------------------------
+c part iv.  optionally replaceable solver routines.
+c
+c below are descriptions of two routines in the lsodes package which
+c relate to the measurement of errors.  either routine can be
+c replaced by a user-supplied version, if desired.  however, since such
+c a replacement may have a major impact on performance, it should be
+c done only when absolutely necessary, and only with great caution.
+c (note.. the means by which the package version of a routine is
+c superseded by the user-s version may be system-dependent.)
+c
+c (a) ewset.
+c the following subroutine is called just before each internal
+c integration step, and sets the array of error weights, ewt, as
+c described under itol/RelTol/AbsTol above..
+c     subroutine ewset (neq, itol, RelTol, AbsTol, ycur, ewt)
+c where neq, itol, RelTol, and AbsTol are as in the lsodes CALL sequence,
+c ycur contains the current dependent variable vector, and
+c ewt is the array of weights set by ewset.
+c
+c if the user supplies this subroutine, it must return in ewt(i)
+c (i = 1,...,neq) a positive quantity suitable for comparing errors
+c in y(i) to.  the ewt array returned by ewset is passed to the
+c vnorm routine (see below), and also used by lsodes in the computation
+c of the optional output imxer, the diagonal jacobian approximation,
+c and the increments for difference quotient jacobians.
+c
+c in the user-supplied version of ewset, it may be desirable to use
+c the current values of derivatives of y.  derivatives up to order nq
+c are available from the history array yh, described above under
+c optional outputs.  in ewset, yh is identical to the ycur array,
+c extended to nq + 1 columns with a column length of nyh and scale
+c factors of h**j/factorial(j).  on the first CALL for the problem,
+c given by nst = 0, nq is 1 and h is temporarily set to 1.0.
+c the quantities nq, nyh, h, and nst can be obtained by including
+c in ewset the statements..
+c     KPP_REAL h, rls
+c     common /ls0001/ rls(218),ils(39)
+c     nq = ils(35)
+c     nyh = ils(14)
+c     nst = ils(36)
+c     h = rls(212)
+c thus, for example, the current value of dy/dt can be obtained as
+c ycur(nyh+i)/h  (i=1,...,neq)  (and the division by h is
+c unnecessary when nst = 0).
+c
+c (b) vnorm.
+c the following is a real function routine which computes the weighted
+c root-mean-square norm of a vector v..
+c     d = vnorm (n, v, w)
+c where..
+c   n = the length of the vector,
+c   v = real array of length n containing the vector,
+c   w = real array of length n containing weights,
+c   d = sqrt( (1/n) * sum(v(i)*w(i))**2 ).
+c vnorm is called with n = neq and with w(i) = 1.0/ewt(i), where
+c ewt is as set by subroutine ewset.
+c
+c if the user supplies this function, it should return a non-negative
+c value of vnorm suitable for use in the error control in lsodes.
+c none of the arguments should be altered by vnorm.
+c for example, a user-supplied vnorm routine might..
+c   -substitute a max-norm of (v(i)*w(i)) for the rms-norm, or
+c   -ignore some components of v in the norm, with the effect of
+c    suppressing the error control on those components of y.
+c-----------------------------------------------------------------------
+c-----------------------------------------------------------------------
+c other routines in the lsodes package.
+c
+c in addition to subroutine lsodes, the lsodes package includes the
+c following subroutines and function routines..
+c  iprep    acts as an iterface between lsodes and prep, and also does
+c           adjusting of work space pointers and work arrays.
+c  prep     is called by iprep to compute sparsity and do sparse matrix
+c           preprocessing if miter = 1 or 2.
+c  jgroup   is called by prep to compute groups of jacobian column
+c           indices for use when miter = 2.
+c  adjlr    adjusts the length of required sparse matrix work space.
+c           it is called by prep.
+c  cntnzu   is called by prep and counts the nonzero elements in the
+c           strict upper triangle of j + j-transpose, where j = df/dy.
+c  intdy    computes an interpolated value of the y vector at t = tout.
+c  stode    is the core integrator, which does one step of the
+c           integration and the associated error control.
+c  cfode    sets all method coefficients and test constants.
+c  prjs     computes and preprocesses the jacobian matrix j = df/dy
+c           and the newton iteration matrix p = i - h*l0*j.
+c  slss     manages solution of linear system in chord iteration.
+c  ewset    sets the error weight vector ewt before each step.
+c  vnorm    computes the weighted r.m.s. norm of a vector.
+c  srcms    is a user-callable routine to save and restore
+c           the contents of the internal common blocks.
+c  odrv     constructs a reordering of the rows and columns of
+c           a matrix by the minimum degree algorithm.  odrv is a
+c           driver routine which calls subroutines md, mdi, mdm,
+c           mdp, mdu, and sro.  see ref. 2 for details.  (the odrv
+c           module has been modified since ref. 2, however.)
+c  cdrv     performs reordering, symbolic factorization, numerical
+c           factorization, or linear system solution operations,
+c           depending on a path argument ipath.  cdrv is a
+c           driver routine which calls subroutines nroc, nsfc,
+c           nnfc, nnsc, and nntc.  see ref. 3 for details.
+c           lsodes uses cdrv to solve linear systems in which the
+c           coefficient matrix is  p = i - con*j, where i is the
+c           identity, con is a scalar, and j is an approximation to
+c           the jacobian df/dy.  because cdrv deals with rowwise
+c           sparsity descriptions, cdrv works with p-transpose, not p.
+c  d1mach   computes the unit roundoff in a machine-independent manner.
+c  xerrwv, xsetun, and xsetf   handle the printing of all error
+c           messages and warnings.  xerrwv is machine-dependent.
+c note..  vnorm and d1mach are function routines.
+c all the others are subroutines.
+c
+c the intrinsic and external routines used by lsodes are..
+c dabs, DMAX1, dmin1, dfloat, max0, min0, mod, DSIGN, DSQRT, and write.
+c
+c a block data subprogram is also included with the package,
+c for loading some of the variables in internal common.
+c
+c-----------------------------------------------------------------------
+c the following card is for optimized compilation on lll compilers.
+clll. optimize
+c-----------------------------------------------------------------------
+      external prjs, slss
+      integer illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     1   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns
+      integer icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     1   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, i1, i2, iflag, imax, imul, imxer, ipflag, ipgo, irem,
+     1   j, kgo, lenrat, lenyht, leniw, lenrw, lf0, lia, lja,
+     2   lrtem, lwtem, lyhd, lyhn, mf1, mord, mxhnl0, mxstp0, ncolm
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL con0, conmin, ccmxj, psmall, rbig, seth
+      KPP_REAL AbsToli, ayi, big, ewti, h0, hmax, hmx, rh, RelToli,
+     1   tcrit, tdist, tnext, tol, tolsf, tp, size, sum, w0,
+     2   d1mach, vnorm
+      dimension mord(2)
+      logical ihit
+c-----------------------------------------------------------------------
+c the following two internal common blocks contain
+c (a) variables which are local to any subroutine but whose values must
+c     be preserved between calls to the routine (own variables), and
+c (b) variables which are communicated between subroutines.
+c the structure of each block is as follows..  all real variables are
+c listed first, followed by all integers.  within each type, the
+c variables are grouped with those local to subroutine lsodes first,
+c then those local to subroutine stode or subroutine prjs
+c (no other routines have own variables), and finally those used
+c for communication.  the block ls0001 is declared in subroutines
+c lsodes, iprep, prep, intdy, stode, prjs, and slss.  the block lss001
+c is declared in subroutines lsodes, iprep, prep, prjs, and slss.
+c groups of variables are replaced by dummy arrays in the common
+c declarations in routines where those variables are not used.
+c-----------------------------------------------------------------------
+      common /ls0001/ rowns(209),
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     2   illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     3   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+c
+      common /lss001/ con0, conmin, ccmxj, psmall, rbig, seth,
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c
+      data mord(1),mord(2)/12,5/, mxstp0/500/, mxhnl0/10/
+c-----------------------------------------------------------------------
+c in the data statement below, set lenrat equal to the ratio of
+c the wordlength for a real number to that for an integer.  usually,
+c lenrat = 1 for single precision and 2 for KPP_REAL.  if the
+c true ratio is not an integer, use the next smaller integer (.ge. 1).
+c-----------------------------------------------------------------------
+      data lenrat/2/
+c-----------------------------------------------------------------------
+c block a.
+c this code block is executed on every call.
+c it tests istate and itask for legality and branches appropriately.
+c if istate .gt. 1 but the flag init shows that initialization has
+c not yet been done, an error return occurs.
+c if istate = 1 and tout = t, jump to block g and return immediately.
+c-----------------------------------------------------------------------
+      if (istate .lt. 1 .or. istate .gt. 3) go to 601
+      if (itask .lt. 1 .or. itask .gt. 5) go to 602
+      if (istate .eq. 1) go to 10
+      if (init .eq. 0) go to 603
+      if (istate .eq. 2) go to 200
+      go to 20
+ 10   init = 0
+      if (tout .eq. t) go to 430
+ 20   ntrep = 0
+c-----------------------------------------------------------------------
+c block b.
+c the next code block is executed for the initial CALL (istate = 1),
+c or for a continuation CALL with parameter changes (istate = 3).
+c it contains checking of all inputs and various initializations.
+c if istate = 1, the final setting of work space pointers, the matrix
+c preprocessing, and other initializations are done in block c.
+c
+c first check legality of the non-optional inputs neq, itol, iopt,
+c mf, ml, and mu.
+c-----------------------------------------------------------------------
+      if (neq(1) .le. 0) go to 604
+      if (istate .eq. 1) go to 25
+      if (neq(1) .gt. n) go to 605
+ 25   n = neq(1)
+      if (itol .lt. 1 .or. itol .gt. 4) go to 606
+      if (iopt .lt. 0 .or. iopt .gt. 1) go to 607
+      moss = mf/100
+      mf1 = mf - 100*moss
+      meth = mf1/10
+      miter = mf1 - 10*meth
+      if (moss .lt. 0 .or. moss .gt. 2) go to 608
+      if (meth .lt. 1 .or. meth .gt. 2) go to 608
+      if (miter .lt. 0 .or. miter .gt. 3) go to 608
+      if (miter .eq. 0 .or. miter .eq. 3) moss = 0
+c next process and check the optional inputs. --------------------------
+      if (iopt .eq. 1) go to 40
+      maxord = mord(meth)
+      mxstep = mxstp0
+      mxhnil = mxhnl0
+      if (istate .eq. 1) h0 = 0.0d0
+      hmxi = 0.0d0
+      hmin = 0.0d0
+      seth = 0.0d0
+      go to 60
+ 40   maxord = iwork(5)
+      if (maxord .lt. 0) go to 611
+      if (maxord .eq. 0) maxord = 100
+      maxord = min0(maxord,mord(meth))
+      mxstep = iwork(6)
+      if (mxstep .lt. 0) go to 612
+      if (mxstep .eq. 0) mxstep = mxstp0
+      mxhnil = iwork(7)
+      if (mxhnil .lt. 0) go to 613
+      if (mxhnil .eq. 0) mxhnil = mxhnl0
+      if (istate .ne. 1) go to 50
+      h0 = rwork(5)
+      if ((tout - t)*h0 .lt. 0.0d0) go to 614
+ 50   hmax = rwork(6)
+      if (hmax .lt. 0.0d0) go to 615
+      hmxi = 0.0d0
+      if (hmax .gt. 0.0d0) hmxi = 1.0d0/hmax
+      hmin = rwork(7)
+      if (hmin .lt. 0.0d0) go to 616
+      seth = rwork(8)
+      if (seth .lt. 0.0d0) go to 609
+c check RelTol and AbsTol for legality. ------------------------------------
+ 60   RelToli = RelTol(1)
+      AbsToli = AbsTol(1)
+      do 65 i = 1,n
+        if (itol .ge. 3) RelToli = RelTol(i)
+        if (itol .eq. 2 .or. itol .eq. 4) AbsToli = AbsTol(i)
+        if (RelToli .lt. 0.0d0) go to 619
+        if (AbsToli .lt. 0.0d0) go to 620
+ 65     continue
+c-----------------------------------------------------------------------
+c compute required work array lengths, as far as possible, and test
+c these against lrw and liw.  then set tentative pointers for work
+c arrays.  pointers to rwork/iwork segments are named by prefixing l to
+c the name of the segment.  e.g., the segment yh starts at rwork(lyh).
+c segments of rwork (in order) are denoted  wm, yh, savf, ewt, acor.
+c if miter = 1 or 2, the required length of the matrix work space wm
+c is not yet known, and so a crude minimum value is used for the
+c initial tests of lrw and liw, and yh is temporarily stored as far
+c to the right in rwork as possible, to leave the maximum amount
+c of space for wm for matrix preprocessing.  thus if miter = 1 or 2
+c and moss .ne. 2, some of the segments of rwork are temporarily
+c omitted, as they are not needed in the preprocessing.  these
+c omitted segments are.. acor if istate = 1, ewt and acor if istate = 3
+c and moss = 1, and savf, ewt, and acor if istate = 3 and moss = 0.
+c-----------------------------------------------------------------------
+      lrat = lenrat
+      if (istate .eq. 1) nyh = n
+      lwmin = 0
+      if (miter .eq. 1) lwmin = 4*n + 10*n/lrat
+      if (miter .eq. 2) lwmin = 4*n + 11*n/lrat
+      if (miter .eq. 3) lwmin = n + 2
+      lenyh = (maxord+1)*nyh
+      lrest = lenyh + 3*n
+      lenrw = 20 + lwmin + lrest
+      iwork(17) = lenrw
+      leniw = 30
+      if (moss .eq. 0 .and. miter .ne. 0 .and. miter .ne. 3)
+     1   leniw = leniw + n + 1
+      iwork(18) = leniw
+      if (lenrw .gt. lrw) go to 617
+      if (leniw .gt. liw) go to 618
+      lia = 31
+      if (moss .eq. 0 .and. miter .ne. 0 .and. miter .ne. 3)
+     1   leniw = leniw + iwork(lia+n) - 1
+      iwork(18) = leniw
+      if (leniw .gt. liw) go to 618
+      lja = lia + n + 1
+      lia = min0(lia,liw)
+      lja = min0(lja,liw)
+      lwm = 21
+      if (istate .eq. 1) nq = 1
+      ncolm = min0(nq+1,maxord+2)
+      lenyhm = ncolm*nyh
+      lenyht = lenyh
+      if (miter .eq. 1 .or. miter .eq. 2) lenyht = lenyhm
+      imul = 2
+      if (istate .eq. 3) imul = moss
+      if (moss .eq. 2) imul = 3
+      lrtem = lenyht + imul*n
+      lwtem = lwmin
+      if (miter .eq. 1 .or. miter .eq. 2) lwtem = lrw - 20 - lrtem
+      lenwk = lwtem
+      lyhn = lwm + lwtem
+      lsavf = lyhn + lenyht
+      lewt = lsavf + n
+      lacor = lewt + n
+      istatc = istate
+      if (istate .eq. 1) go to 100
+c-----------------------------------------------------------------------
+c istate = 3.  move yh to its new location.
+c note that only the part of yh needed for the next step, namely
+c min(nq+1,maxord+2) columns, is actually moved.
+c a temporary error weight array ewt is loaded if moss = 2.
+c sparse matrix processing is done in iprep/prep if miter = 1 or 2.
+c if maxord was reduced below nq, then the pointers are finally set
+c so that savf is identical to yh(*,maxord+2).
+c-----------------------------------------------------------------------
+      lyhd = lyh - lyhn
+      imax = lyhn - 1 + lenyhm
+c move yh.  branch for move right, no move, or move left. --------------
+      if (lyhd) 70,80,74
+ 70   do 72 i = lyhn,imax
+        j = imax + lyhn - i
+ 72     rwork(j) = rwork(j+lyhd)
+      go to 80
+ 74   do 76 i = lyhn,imax
+ 76     rwork(i) = rwork(i+lyhd)
+ 80   lyh = lyhn
+      iwork(22) = lyh
+      if (miter .eq. 0 .or. miter .eq. 3) go to 92
+      if (moss .ne. 2) go to 85
+c temporarily load ewt if miter = 1 or 2 and moss = 2. -----------------
+      CALL ewset (n, itol, RelTol, AbsTol, rwork(lyh), rwork(lewt))
+      do 82 i = 1,n
+        if (rwork(i+lewt-1) .le. 0.0d0) go to 621
+ 82     rwork(i+lewt-1) = 1.0d0/rwork(i+lewt-1)
+ 85   continue
+c iprep and prep do sparse matrix preprocessing if miter = 1 or 2. -----
+      lsavf = min0(lsavf,lrw)
+      lewt = min0(lewt,lrw)
+      lacor = min0(lacor,lrw)
+      CALL iprep (neq, y, rwork, iwork(lia), iwork(lja), ipflag, f, jac)
+      lenrw = lwm - 1 + lenwk + lrest
+      iwork(17) = lenrw
+      if (ipflag .ne. -1) iwork(23) = ipian
+      if (ipflag .ne. -1) iwork(24) = ipjan
+      ipgo = -ipflag + 1
+      go to (90, 628, 629, 630, 631, 632, 633), ipgo
+ 90   iwork(22) = lyh
+      if (lenrw .gt. lrw) go to 617
+c set flag to signal parameter changes to stode. -----------------------
+ 92   jstart = -1
+      if (n .eq. nyh) go to 200
+c neq was reduced.  zero part of yh to avoid undefined references. -----
+      i1 = lyh + l*nyh
+      i2 = lyh + (maxord + 1)*nyh - 1
+      if (i1 .gt. i2) go to 200
+      do 95 i = i1,i2
+ 95     rwork(i) = 0.0d0
+      go to 200
+c-----------------------------------------------------------------------
+c block c.
+c the next block is for the initial CALL only (istate = 1).
+c it contains all remaining initializations, the initial CALL to f,
+c the sparse matrix preprocessing (miter = 1 or 2), and the
+c calculation of the initial step size.
+c the error weights in ewt are inverted after being loaded.
+c-----------------------------------------------------------------------
+ 100  continue
+      lyh = lyhn
+      iwork(22) = lyh
+      tn = t
+      nst = 0
+      h = 1.0d0
+      nnz = 0
+      ngp = 0
+      nzl = 0
+      nzu = 0
+c load the initial value vector in yh. ---------------------------------
+      do 105 i = 1,n
+ 105    rwork(i+lyh-1) = y(i)
+c initial CALL to f.  (lf0 points to yh(*,2).) -------------------------
+      lf0 = lyh + nyh
+      CALL f (neq, t, y, rwork(lf0))
+      nfe = 1
+c load and invert the ewt array.  (h is temporarily set to 1.0.) -------
+      CALL ewset (n, itol, RelTol, AbsTol, rwork(lyh), rwork(lewt))
+      do 110 i = 1,n
+        if (rwork(i+lewt-1) .le. 0.0d0) go to 621
+ 110    rwork(i+lewt-1) = 1.0d0/rwork(i+lewt-1)
+      if (miter .eq. 0 .or. miter .eq. 3) go to 120
+c iprep and prep do sparse matrix preprocessing if miter = 1 or 2. -----
+      lacor = min0(lacor,lrw)
+      CALL iprep (neq, y, rwork, iwork(lia), iwork(lja), ipflag, f, jac)
+      lenrw = lwm - 1 + lenwk + lrest
+      iwork(17) = lenrw
+      if (ipflag .ne. -1) iwork(23) = ipian
+      if (ipflag .ne. -1) iwork(24) = ipjan
+      ipgo = -ipflag + 1
+      go to (115, 628, 629, 630, 631, 632, 633), ipgo
+ 115  iwork(22) = lyh
+      if (lenrw .gt. lrw) go to 617
+c check tcrit for legality (itask = 4 or 5). ---------------------------
+ 120  continue
+      if (itask .ne. 4 .and. itask .ne. 5) go to 125
+      tcrit = rwork(1)
+      if ((tcrit - tout)*(tout - t) .lt. 0.0d0) go to 625
+      if (h0 .ne. 0.0d0 .and. (t + h0 - tcrit)*h0 .gt. 0.0d0)
+     1   h0 = tcrit - t
+c initialize all remaining parameters. ---------------------------------
+ 125  uround = d1mach(4)
+      jstart = 0
+      if (miter .ne. 0) rwork(lwm) = DSQRT(uround)
+      msbj = 50
+      nslj = 0
+      ccmxj = 0.2d0
+      psmall = 1000.0d0*uround
+      rbig = 0.01d0/psmall
+      nhnil = 0
+      nje = 0
+      nlu = 0
+      nslast = 0
+      hu = 0.0d0
+      nqu = 0
+      ccmax = 0.3d0
+      maxcor = 3
+      msbp = 20
+      mxncf = 10
+c-----------------------------------------------------------------------
+c the coding below computes the step size, h0, to be attempted on the
+c first step, unless the user has supplied a value for this.
+c first check that tout - t differs significantly from zero.
+c a scalar tolerance quantity tol is computed, as max(RelTol(i))
+c if this is positive, or max(AbsTol(i)/abs(y(i))) otherwise, adjusted
+c so as to be between 100*uround and 1.0e-3.
+c then the computed value h0 is given by..
+c                                      neq
+c   h0**2 = tol / ( w0**-2 + (1/neq) * sum ( f(i)/ywt(i) )**2  )
+c                                       1
+c where   w0     = max ( abs(t), abs(tout) ),
+c         f(i)   = i-th component of initial value of f,
+c         ywt(i) = ewt(i)/tol  (a weight for y(i)).
+c the sign of h0 is inferred from the initial values of tout and t.
+c-----------------------------------------------------------------------
+      lf0 = lyh + nyh
+      if (h0 .ne. 0.0d0) go to 180
+      tdist = dabs(tout - t)
+      w0 = DMAX1(dabs(t),dabs(tout))
+      if (tdist .lt. 2.0d0*uround*w0) go to 622
+      tol = RelTol(1)
+      if (itol .le. 2) go to 140
+      do 130 i = 1,n
+ 130    tol = DMAX1(tol,RelTol(i))
+ 140  if (tol .gt. 0.0d0) go to 160
+      AbsToli = AbsTol(1)
+      do 150 i = 1,n
+        if (itol .eq. 2 .or. itol .eq. 4) AbsToli = AbsTol(i)
+        ayi = dabs(y(i))
+        if (ayi .ne. 0.0d0) tol = DMAX1(tol,AbsToli/ayi)
+ 150    continue
+ 160  tol = DMAX1(tol,100.0d0*uround)
+      tol = dmin1(tol,0.001d0)
+      sum = vnorm (n, rwork(lf0), rwork(lewt))
+      sum = 1.0d0/(tol*w0*w0) + tol*sum**2
+      h0 = 1.0d0/DSQRT(sum)
+      h0 = dmin1(h0,tdist)
+      h0 = DSIGN(h0,tout-t)
+c adjust h0 if necessary to meet hmax bound. ---------------------------
+ 180  rh = dabs(h0)*hmxi
+      if (rh .gt. 1.0d0) h0 = h0/rh
+c load h with h0 and scale yh(*,2) by h0. ------------------------------
+      h = h0
+      do 190 i = 1,n
+ 190    rwork(i+lf0-1) = h0*rwork(i+lf0-1)
+      go to 270
+c-----------------------------------------------------------------------
+c block d.
+c the next code block is for continuation calls only (istate = 2 or 3)
+c and is to check stop conditions before taking a step.
+c-----------------------------------------------------------------------
+ 200  nslast = nst
+      go to (210, 250, 220, 230, 240), itask
+ 210  if ((tn - tout)*h .lt. 0.0d0) go to 250
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      if (iflag .ne. 0) go to 627
+      t = tout
+      go to 420
+ 220  tp = tn - hu*(1.0d0 + 100.0d0*uround)
+      if ((tp - tout)*h .gt. 0.0d0) go to 623
+      if ((tn - tout)*h .lt. 0.0d0) go to 250
+      go to 400
+ 230  tcrit = rwork(1)
+      if ((tn - tcrit)*h .gt. 0.0d0) go to 624
+      if ((tcrit - tout)*h .lt. 0.0d0) go to 625
+      if ((tn - tout)*h .lt. 0.0d0) go to 245
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      if (iflag .ne. 0) go to 627
+      t = tout
+      go to 420
+ 240  tcrit = rwork(1)
+      if ((tn - tcrit)*h .gt. 0.0d0) go to 624
+ 245  hmx = dabs(tn) + dabs(h)
+      ihit = dabs(tn - tcrit) .le. 100.0d0*uround*hmx
+      if (ihit) go to 400
+      tnext = tn + h*(1.0d0 + 4.0d0*uround)
+      if ((tnext - tcrit)*h .le. 0.0d0) go to 250
+      h = (tcrit - tn)*(1.0d0 - 4.0d0*uround)
+      if (istate .eq. 2) jstart = -2
+c-----------------------------------------------------------------------
+c block e.
+c the next block is normally executed for all calls and contains
+c the CALL to the one-step core integrator stode.
+c
+c this is a looping point for the integration steps.
+c
+c first check for too many steps being taken, update ewt (if not at
+c start of problem), check for too much accuracy being requested, and
+c check for h below the roundoff level in t.
+c-----------------------------------------------------------------------
+ 250  continue
+      if ((nst-nslast) .ge. mxstep) go to 500
+      CALL ewset (n, itol, RelTol, AbsTol, rwork(lyh), rwork(lewt))
+      do 260 i = 1,n
+        if (rwork(i+lewt-1) .le. 0.0d0) go to 510
+ 260    rwork(i+lewt-1) = 1.0d0/rwork(i+lewt-1)
+ 270  tolsf = uround*vnorm (n, rwork(lyh), rwork(lewt))
+      if (tolsf .le. 1.0d0) go to 280
+      tolsf = tolsf*2.0d0
+      if (nst .eq. 0) go to 626
+      go to 520
+ 280  if ((tn + h) .ne. tn) go to 290
+      nhnil = nhnil + 1
+      if (nhnil .gt. mxhnil) go to 290
+      CALL xerrwv(50hlsodes-- warning..internal t (=r1) and h (=r2) are,
+     1   50, 101, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h      such that in the machine, t + h = t on the next step  ,
+     1   60, 101, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      (h = step size). solver will continue anyway,
+     1   50, 101, 0, 0, 0, 0, 2, tn, h)
+      if (nhnil .lt. mxhnil) go to 290
+      CALL xerrwv(50hlsodes-- above warning has been issued i1 times.  ,
+     1   50, 102, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      it will not be issued again for this problem,
+     1   50, 102, 0, 1, mxhnil, 0, 0, 0.0d0, 0.0d0)
+ 290  continue
+c-----------------------------------------------------------------------
+c    CALL stode(neq,y,yh,nyh,yh,ewt,savf,acor,wm,wm,f,jac,prjs,slss)
+c-----------------------------------------------------------------------
+      CALL stode (neq, y, rwork(lyh), nyh, rwork(lyh), rwork(lewt),
+     1   rwork(lsavf), rwork(lacor), rwork(lwm), rwork(lwm),
+     2   f, jac, prjs, slss)
+      kgo = 1 - kflag
+      go to (300, 530, 540, 550), kgo
+c-----------------------------------------------------------------------
+c block f.
+c the following block handles the case of a successful return from the
+c core integrator (kflag = 0).  test for stop conditions.
+c-----------------------------------------------------------------------
+ 300  init = 1
+      go to (310, 400, 330, 340, 350), itask
+c itask = 1.  if tout has been reached, interpolate. -------------------
+ 310  if ((tn - tout)*h .lt. 0.0d0) go to 250
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      t = tout
+      go to 420
+c itask = 3.  jump to exit if tout was reached. ------------------------
+ 330  if ((tn - tout)*h .ge. 0.0d0) go to 400
+      go to 250
+c itask = 4.  see if tout or tcrit was reached.  adjust h if necessary.
+ 340  if ((tn - tout)*h .lt. 0.0d0) go to 345
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      t = tout
+      go to 420
+ 345  hmx = dabs(tn) + dabs(h)
+      ihit = dabs(tn - tcrit) .le. 100.0d0*uround*hmx
+      if (ihit) go to 400
+      tnext = tn + h*(1.0d0 + 4.0d0*uround)
+      if ((tnext - tcrit)*h .le. 0.0d0) go to 250
+      h = (tcrit - tn)*(1.0d0 - 4.0d0*uround)
+      jstart = -2
+      go to 250
+c itask = 5.  see if tcrit was reached and jump to exit. ---------------
+ 350  hmx = dabs(tn) + dabs(h)
+      ihit = dabs(tn - tcrit) .le. 100.0d0*uround*hmx
+c-----------------------------------------------------------------------
+c block g.
+c the following block handles all successful returns from lsodes.
+c if itask .ne. 1, y is loaded from yh and t is set accordingly.
+c istate is set to 2, the illegal input counter is zeroed, and the
+c optional outputs are loaded into the work arrays before returning.
+c if istate = 1 and tout = t, there is a return with no action taken,
+c except that if this has happened repeatedly, the run is terminated.
+c-----------------------------------------------------------------------
+ 400  do 410 i = 1,n
+ 410    y(i) = rwork(i+lyh-1)
+      t = tn
+      if (itask .ne. 4 .and. itask .ne. 5) go to 420
+      if (ihit) t = tcrit
+ 420  istate = 2
+      illin = 0
+      rwork(11) = hu
+      rwork(12) = h
+      rwork(13) = tn
+      iwork(11) = nst
+      iwork(12) = nfe
+      iwork(13) = nje
+      iwork(14) = nqu
+      iwork(15) = nq
+      iwork(19) = nnz
+      iwork(20) = ngp
+      iwork(21) = nlu
+      iwork(25) = nzl
+      iwork(26) = nzu
+      return
+c
+ 430  ntrep = ntrep + 1
+      if (ntrep .lt. 5) return
+      CALL xerrwv(
+     1  60hlsodes-- repeated calls with istate = 1 and tout = t (=r1)  ,
+     1   60, 301, 0, 0, 0, 0, 1, t, 0.0d0)
+      go to 800
+c-----------------------------------------------------------------------
+c block h.
+c the following block handles all unsuccessful returns other than
+c those for illegal input.  first the error message routine is called.
+c if there was an error test or convergence test failure, imxer is set.
+c then y is loaded from yh, t is set to tn, and the illegal input
+c counter illin is set to 0.  the optional outputs are loaded into
+c the work arrays before returning.
+c-----------------------------------------------------------------------
+c the maximum number of steps was taken before reaching tout. ----------
+ 500  CALL xerrwv(50hlsodes-- at current t (=r1), mxstep (=i1) steps   ,
+     1   50, 201, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      taken on this CALL before reaching tout     ,
+     1   50, 201, 0, 1, mxstep, 0, 1, tn, 0.0d0)
+      istate = -1
+      go to 580
+c ewt(i) .le. 0.0 for some i (not at start of problem). ----------------
+ 510  ewti = rwork(lewt+i-1)
+      CALL xerrwv(50hlsodes-- at t (=r1), ewt(i1) has become r2 .le. 0.,
+     1   50, 202, 0, 1, i, 0, 2, tn, ewti)
+      istate = -6
+      go to 580
+c too much accuracy requested for machine precision. -------------------
+ 520  CALL xerrwv(50hlsodes-- at t (=r1), too much accuracy requested  ,
+     1   50, 203, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      for precision of machine..  see tolsf (=r2) ,
+     1   50, 203, 0, 0, 0, 0, 2, tn, tolsf)
+      rwork(14) = tolsf
+      istate = -2
+      go to 580
+c kflag = -1.  error test failed repeatedly or with abs(h) = hmin. -----
+ 530  CALL xerrwv(50hlsodes-- at t(=r1) and step size h(=r2), the error,
+     1   50, 204, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      test failed repeatedly or with abs(h) = hmin,
+     1   50, 204, 0, 0, 0, 0, 2, tn, h)
+      istate = -4
+      go to 560
+c kflag = -2.  convergence failed repeatedly or with abs(h) = hmin. ----
+ 540  CALL xerrwv(50hlsodes-- at t (=r1) and step size h (=r2), the    ,
+     1   50, 205, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      corrector convergence failed repeatedly     ,
+     1   50, 205, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(30h      or with abs(h) = hmin   ,
+     1   30, 205, 0, 0, 0, 0, 2, tn, h)
+      istate = -5
+      go to 560
+c kflag = -3.  fatal error flag returned by prjs or slss (cdrv). -------
+ 550  CALL xerrwv(50hlsodes-- at t (=r1) and step size h (=r2), a fatal,
+     1   50, 207, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      error flag was returned by cdrv (by way of  ,
+     1   50, 207, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(30h      subroutine prjs or slss),
+     1   30, 207, 0, 0, 0, 0, 2, tn, h)
+      istate = -7
+      go to 580
+c compute imxer if relevant. -------------------------------------------
+ 560  big = 0.0d0
+      imxer = 1
+      do 570 i = 1,n
+        size = dabs(rwork(i+lacor-1)*rwork(i+lewt-1))
+        if (big .ge. size) go to 570
+        big = size
+        imxer = i
+ 570    continue
+      iwork(16) = imxer
+c set y vector, t, illin, and optional outputs. ------------------------
+ 580  do 590 i = 1,n
+ 590    y(i) = rwork(i+lyh-1)
+      t = tn
+      illin = 0
+      rwork(11) = hu
+      rwork(12) = h
+      rwork(13) = tn
+      iwork(11) = nst
+      iwork(12) = nfe
+      iwork(13) = nje
+      iwork(14) = nqu
+      iwork(15) = nq
+      iwork(19) = nnz
+      iwork(20) = ngp
+      iwork(21) = nlu
+      iwork(25) = nzl
+      iwork(26) = nzu
+      return
+c-----------------------------------------------------------------------
+c block i.
+c the following block handles all error returns due to illegal input
+c (istate = -3), as detected before calling the core integrator.
+c first the error message routine is called.  then if there have been
+c 5 consecutive such returns just before this CALL to the solver,
+c the run is halted.
+c-----------------------------------------------------------------------
+ 601  CALL xerrwv(30hlsodes-- istate (=i1) illegal ,
+     1   30, 1, 0, 1, istate, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 602  CALL xerrwv(30hlsodes-- itask (=i1) illegal  ,
+     1   30, 2, 0, 1, itask, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 603  CALL xerrwv(50hlsodes-- istate .gt. 1 but lsodes not initialized ,
+     1   50, 3, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 604  CALL xerrwv(30hlsodes-- neq (=i1) .lt. 1     ,
+     1   30, 4, 0, 1, neq(1), 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 605  CALL xerrwv(50hlsodes-- istate = 3 and neq increased (i1 to i2)  ,
+     1   50, 5, 0, 2, n, neq(1), 0, 0.0d0, 0.0d0)
+      go to 700
+ 606  CALL xerrwv(30hlsodes-- itol (=i1) illegal   ,
+     1   30, 6, 0, 1, itol, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 607  CALL xerrwv(30hlsodes-- iopt (=i1) illegal   ,
+     1   30, 7, 0, 1, iopt, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 608  CALL xerrwv(30hlsodes-- mf (=i1) illegal     ,
+     1   30, 8, 0, 1, mf, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 609  CALL xerrwv(30hlsodes-- seth (=r1) .lt. 0.0  ,
+     1   30, 9, 0, 0, 0, 0, 1, seth, 0.0d0)
+      go to 700
+ 611  CALL xerrwv(30hlsodes-- maxord (=i1) .lt. 0  ,
+     1   30, 11, 0, 1, maxord, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 612  CALL xerrwv(30hlsodes-- mxstep (=i1) .lt. 0  ,
+     1   30, 12, 0, 1, mxstep, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 613  CALL xerrwv(30hlsodes-- mxhnil (=i1) .lt. 0  ,
+     1   30, 13, 0, 1, mxhnil, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 614  CALL xerrwv(40hlsodes-- tout (=r1) behind t (=r2)      ,
+     1   40, 14, 0, 0, 0, 0, 2, tout, t)
+      CALL xerrwv(50h      integration direction is given by h0 (=r1)  ,
+     1   50, 14, 0, 0, 0, 0, 1, h0, 0.0d0)
+      go to 700
+ 615  CALL xerrwv(30hlsodes-- hmax (=r1) .lt. 0.0  ,
+     1   30, 15, 0, 0, 0, 0, 1, hmax, 0.0d0)
+      go to 700
+ 616  CALL xerrwv(30hlsodes-- hmin (=r1) .lt. 0.0  ,
+     1   30, 16, 0, 0, 0, 0, 1, hmin, 0.0d0)
+      go to 700
+ 617  CALL xerrwv(50hlsodes-- rwork length is insufficient to proceed. ,
+     1   50, 17, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 17, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 618  CALL xerrwv(50hlsodes-- iwork length is insufficient to proceed. ,
+     1   50, 18, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. leniw (=i1), exceeds liw (=i2),
+     1   60, 18, 0, 2, leniw, liw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 619  CALL xerrwv(40hlsodes-- RelTol(i1) is r1 .lt. 0.0        ,
+     1   40, 19, 0, 1, i, 0, 1, RelToli, 0.0d0)
+      go to 700
+ 620  CALL xerrwv(40hlsodes-- AbsTol(i1) is r1 .lt. 0.0        ,
+     1   40, 20, 0, 1, i, 0, 1, AbsToli, 0.0d0)
+      go to 700
+ 621  ewti = rwork(lewt+i-1)
+      CALL xerrwv(40hlsodes-- ewt(i1) is r1 .le. 0.0         ,
+     1   40, 21, 0, 1, i, 0, 1, ewti, 0.0d0)
+      go to 700
+ 622  CALL xerrwv(
+     1  60hlsodes-- tout (=r1) too close to t(=r2) to start integration,
+     1   60, 22, 0, 0, 0, 0, 2, tout, t)
+      go to 700
+ 623  CALL xerrwv(
+     1  60hlsodes-- itask = i1 and tout (=r1) behind tcur - hu (= r2)  ,
+     1   60, 23, 0, 1, itask, 0, 2, tout, tp)
+      go to 700
+ 624  CALL xerrwv(
+     1  60hlsodes-- itask = 4 or 5 and tcrit (=r1) behind tcur (=r2)   ,
+     1   60, 24, 0, 0, 0, 0, 2, tcrit, tn)
+      go to 700
+ 625  CALL xerrwv(
+     1  60hlsodes-- itask = 4 or 5 and tcrit (=r1) behind tout (=r2)   ,
+     1   60, 25, 0, 0, 0, 0, 2, tcrit, tout)
+      go to 700
+ 626  CALL xerrwv(50hlsodes-- at start of problem, too much accuracy   ,
+     1   50, 26, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h      requested for precision of machine..  see tolsf (=r1) ,
+     1   60, 26, 0, 0, 0, 0, 1, tolsf, 0.0d0)
+      rwork(14) = tolsf
+      go to 700
+ 627  CALL xerrwv(50hlsodes-- trouble from intdy. itask = i1, tout = r1,
+     1   50, 27, 0, 1, itask, 0, 1, tout, 0.0d0)
+      go to 700
+ 628  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine prep).   ,
+     1   60, 28, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 28, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 629  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine jgroup). ,
+     1   60, 29, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 29, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 630  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine odrv).   ,
+     1   60, 30, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 30, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 631  CALL xerrwv(
+     1  60hlsodes-- error from odrv in yale sparse matrix package      ,
+     1   60, 31, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      imul = (iys - 1)/n
+      irem = iys - imul*n
+      CALL xerrwv(
+     1  60h      at t (=r1), odrv returned error flag = i1*neq + i2.   ,
+     1   60, 31, 0, 2, imul, irem, 1, tn, 0.0d0)
+      go to 700
+ 632  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine cdrv).   ,
+     1   60, 32, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 32, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 633  CALL xerrwv(
+     1  60hlsodes-- error from cdrv in yale sparse matrix package      ,
+     1   60, 33, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      imul = (iys - 1)/n
+      irem = iys - imul*n
+      CALL xerrwv(
+     1  60h      at t (=r1), cdrv returned error flag = i1*neq + i2.   ,
+     1   60, 33, 0, 2, imul, irem, 1, tn, 0.0d0)
+      if (imul .eq. 2) CALL xerrwv(
+     1  60h        duplicate entry in sparsity structure descriptors   ,
+     1   60, 33, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      if (imul .eq. 3 .or. imul .eq. 6) CALL xerrwv(
+     1  60h        insufficient storage for nsfc (called by cdrv)      ,
+     1   60, 33, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+c
+ 700  if (illin .eq. 5) go to 710
+      illin = illin + 1
+      istate = -3
+      return
+ 710  CALL xerrwv(50hlsodes-- repeated occurrences of illegal input    ,
+     1   50, 302, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+c
+ 800  CALL xerrwv(50hlsodes-- run aborted.. apparent infinite loop     ,
+     1   50, 303, 2, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      return
+c----------------------- end of subroutine lsodes ----------------------
+      end
+      subroutine iprep (neq, y, rwork, ia, ja, ipflag, f, jac)
+clll. optimize
+      external f, jac
+      integer neq, ia, ja, ipflag
+      integer illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     1   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns
+      integer icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     1   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, imax, lewtn, lyhd, lyhn
+      KPP_REAL y, rwork
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL rlss
+      dimension neq(1), y(1), rwork(1), ia(1), ja(1)
+      common /ls0001/ rowns(209),
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     2   illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     3   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ rlss(6),
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c this routine serves as an interface between the driver and
+c subroutine prep.  it is called only if miter is 1 or 2.
+c tasks performed here are..
+c  * CALL prep,
+c  * reset the required wm segment length lenwk,
+c  * move yh back to its final location (following wm in rwork),
+c  * reset pointers for yh, savf, ewt, and acor, and
+c  * move ewt to its new position if istate = 1.
+c ipflag is an output error indication flag.  ipflag = 0 if there was
+c no trouble, and ipflag is the value of the prep error flag ipper
+c if there was trouble in subroutine prep.
+c-----------------------------------------------------------------------
+      ipflag = 0
+c CALL prep to do matrix preprocessing operations. ---------------------
+c      CALL prep (neq, y, rwork(lyh), rwork(lsavf), rwork(lewt),
+c     1   rwork(lacor), ia, ja, rwork(lwm), rwork(lwm), ipflag, f, jac)
+      CALL prep (neq, y, rwork(lyh), rwork(lsavf), rwork(lewt),
+     1   rwork(lacor), ia, ja, rwork(lwm), rwork(lwm), ipflag, f, jac)
+      lenwk = max0(lreq,lwmin)
+      if (ipflag .lt. 0) return
+c if prep was successful, move yh to end of required space for wm. -----
+      lyhn = lwm + lenwk
+      if (lyhn .gt. lyh) return
+      lyhd = lyh - lyhn
+      if (lyhd .eq. 0) go to 20
+      imax = lyhn - 1 + lenyhm
+      do 10 i = lyhn,imax
+ 10     rwork(i) = rwork(i+lyhd)
+      lyh = lyhn
+c reset pointers for savf, ewt, and acor. ------------------------------
+ 20   lsavf = lyh + lenyh
+      lewtn = lsavf + n
+      lacor = lewtn + n
+      if (istatc .eq. 3) go to 40
+c if istate = 1, move ewt (left) to its new position. ------------------
+      if (lewtn .gt. lewt) return
+      do 30 i = 1,n
+ 30     rwork(i+lewtn-1) = rwork(i+lewt-1)
+ 40   lewt = lewtn
+      return
+c----------------------- end of subroutine iprep -----------------------
+      end
+      subroutine slss (wk, iwk, x, tem)
+clll. optimize
+      integer iwk
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i
+      KPP_REAL wk, x, tem
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL rlss
+      KPP_REAL di, hl0, phl0, r
+      dimension wk(*), iwk(*), x(*), tem(*)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ rlss(6),
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c this routine manages the solution of the linear system arising from
+c a chord iteration.  it is called if miter .ne. 0.
+c if miter is 1 or 2, it calls cdrv to accomplish this.
+c if miter = 3 it updates the coefficient h*el0 in the diagonal
+c matrix, and then computes the solution.
+c communication with slss uses the following variables..
+c wk    = real work space containing the inverse diagonal matrix if
+c         miter = 3 and the lu decomposition of the matrix otherwise.
+c         storage of matrix elements starts at wk(3).
+c         wk also contains the following matrix-related data..
+c         wk(1) = sqrt(uround) (not used here),
+c         wk(2) = hl0, the previous value of h*el0, used if miter = 3.
+c iwk   = integer work space for matrix-related data, assumed to
+c         be equivalenced to wk.  in addition, wk(iprsp) and iwk(ipisp)
+c         are assumed to have identical locations.
+c x     = the right-hand side vector on input, and the solution vector
+c         on output, of length n.
+c tem   = vector of work space of length n, not used in this version.
+c iersl = output flag (in common).
+c         iersl = 0  if no trouble occurred.
+c         iersl = -1 if cdrv returned an error flag (miter = 1 or 2).
+c                    this should never occur and is considered fatal.
+c         iersl = 1  if a singular matrix arose with miter = 3.
+c this routine also uses other variables in common.
+c-----------------------------------------------------------------------
+      iersl = 0
+      go to (100, 100, 300), miter
+ 100  CALL cdrv (n,iwk(ipr),iwk(ipc),iwk(ipic),iwk(ipian),iwk(ipjan),
+     1   wk(ipa),x,x,nsp,iwk(ipisp),wk(iprsp),iesp,4,iersl)
+      if (iersl .ne. 0) iersl = -1
+      return
+c
+ 300  phl0 = wk(2)
+      hl0 = h*el0
+      wk(2) = hl0
+      if (hl0 .eq. phl0) go to 330
+      r = hl0/phl0
+      do 320 i = 1,n
+        di = 1.0d0 - r*(1.0d0 - 1.0d0/wk(i+2))
+        if (dabs(di) .eq. 0.0d0) go to 390
+ 320    wk(i+2) = 1.0d0/di
+ 330  do 340 i = 1,n
+ 340    x(i) = wk(i+2)*x(i)
+      return
+ 390  iersl = 1
+      return
+c
+c----------------------- end of subroutine slss ------------------------
+      end
+      subroutine intdy (t, k, yh, nyh, dky, iflag)
+clll. optimize
+      integer k, nyh, iflag
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer i, ic, j, jb, jb2, jj, jj1, jp1
+      KPP_REAL t, yh, dky
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL c, r, s, tp
+      dimension yh(nyh,1), dky(1)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+c-----------------------------------------------------------------------
+c intdy computes interpolated values of the k-th derivative of the
+c dependent variable vector y, and stores it in dky.  this routine
+c is called within the package with k = 0 and t = tout, but may
+c also be called by the user for any k up to the current order.
+c (see detailed instructions in the usage documentation.)
+c-----------------------------------------------------------------------
+c the computed values in dky are gotten by interpolation using the
+c nordsieck history array yh.  this array corresponds uniquely to a
+c vector-valued polynomial of degree nqcur or less, and dky is set
+c to the k-th derivative of this polynomial at t.
+c the formula for dky is..
+c              q
+c  dky(i)  =  sum  c(j,k) * (t - tn)**(j-k) * h**(-j) * yh(i,j+1)
+c             j=k
+c where  c(j,k) = j*(j-1)*...*(j-k+1), q = nqcur, tn = tcur, h = hcur.
+c the quantities  nq = nqcur, l = nq+1, n = neq, tn, and h are
+c communicated by common.  the above sum is done in reverse order.
+c iflag is returned negative if either k or t is out of bounds.
+c-----------------------------------------------------------------------
+      iflag = 0
+      if (k .lt. 0 .or. k .gt. nq) go to 80
+      tp = tn - hu -  100.0d0*uround*(tn + hu)
+      if ((t-tp)*(t-tn) .gt. 0.0d0) go to 90
+c
+      s = (t - tn)/h
+      ic = 1
+      if (k .eq. 0) go to 15
+      jj1 = l - k
+      do 10 jj = jj1,nq
+ 10     ic = ic*jj
+ 15   c = dfloat(ic)
+      do 20 i = 1,n
+ 20     dky(i) = c*yh(i,l)
+      if (k .eq. nq) go to 55
+      jb2 = nq - k
+      do 50 jb = 1,jb2
+        j = nq - jb
+        jp1 = j + 1
+        ic = 1
+        if (k .eq. 0) go to 35
+        jj1 = jp1 - k
+        do 30 jj = jj1,j
+ 30       ic = ic*jj
+ 35     c = dfloat(ic)
+        do 40 i = 1,n
+ 40       dky(i) = c*yh(i,jp1) + s*dky(i)
+ 50     continue
+      if (k .eq. 0) return
+ 55   r = h**(-k)
+      do 60 i = 1,n
+ 60     dky(i) = r*dky(i)
+      return
+c
+ 80   CALL xerrwv(30hintdy--  k (=i1) illegal      ,
+     1   30, 51, 0, 1, k, 0, 0, 0.0d0, 0.0d0)
+      iflag = -1
+      return
+ 90   CALL xerrwv(30hintdy--  t (=r1) illegal      ,
+     1   30, 52, 0, 0, 0, 0, 1, t, 0.0d0)
+      CALL xerrwv(
+     1  60h      t not in interval tcur - hu (= r1) to tcur (=r2)      ,
+     1   60, 52, 0, 0, 0, 0, 2, tp, tn)
+      iflag = -2
+      return
+c----------------------- end of subroutine intdy -----------------------
+      end
+      subroutine prjs (neq,y,yh,nyh,ewt,ftem,savf,wk,iwk,f,jac)
+clll. optimize
+      external f,jac
+      integer neq, nyh, iwk
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, imul, j, jj, jok, jmax, jmin, k, kmax, kmin, ng
+      KPP_REAL JJJ(n,n)
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL con0, conmin, ccmxj, psmall, rbig, seth
+      KPP_REAL con, di, fac, hl0, pij, r, r0, rcon, rcont,
+     1   srur, vnorm
+      dimension neq(*), iwk(*)
+      KPP_REAL y(*), yh(nyh,*), ewt(*), ftem(*), savf(*), wk(*)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ con0, conmin, ccmxj, psmall, rbig, seth,
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c prjs is called to compute and process the matrix
+c p = i - h*el(1)*j , where j is an approximation to the jacobian.
+c j is computed by columns, either by the user-supplied routine jac
+c if miter = 1, or by finite differencing if miter = 2.
+c if miter = 3, a diagonal approximation to j is used.
+c if miter = 1 or 2, and if the existing value of the jacobian
+c (as contained in p) is considered acceptable, then a new value of
+c p is reconstructed from the old value.  in any case, when miter
+c is 1 or 2, the p matrix is subjected to lu decomposition in cdrv.
+c p and its lu decomposition are stored (separately) in wk.
+c
+c in addition to variables described previously, communication
+c with prjs uses the following..
+c y     = array containing predicted values on entry.
+c ftem  = work array of length n (acor in stode).
+c savf  = array containing f evaluated at predicted y.
+c wk    = real work space for matrices.  on output it contains the
+c         inverse diagonal matrix if miter = 3, and p and its sparse
+c         lu decomposition if miter is 1 or 2.
+c         storage of matrix elements starts at wk(3).
+c         wk also contains the following matrix-related data..
+c         wk(1) = sqrt(uround), used in numerical jacobian increments.
+c         wk(2) = h*el0, saved for later use if miter = 3.
+c iwk   = integer work space for matrix-related data, assumed to
+c         be equivalenced to wk.  in addition, wk(iprsp) and iwk(ipisp)
+c         are assumed to have identical locations.
+c el0   = el(1) (input).
+c ierpj = output error flag (in common).
+c       = 0 if no error.
+c       = 1  if zero pivot found in cdrv.
+c       = 2  if a singular matrix arose with miter = 3.
+c       = -1 if insufficient storage for cdrv (should not occur here).
+c       = -2 if other error found in cdrv (should not occur here).
+c jcur  = output flag = 1 to indicate that the jacobian matrix
+c         (or approximation) is now current.
+c this routine also uses other variables in common.
+c-----------------------------------------------------------------------
+      hl0 = h*el0
+      con = -hl0
+      if (miter .eq. 3) go to 300
+c see whether j should be reevaluated (jok = 0) or not (jok = 1). ------
+      jok = 1
+      if (nst .eq. 0 .or. nst .ge. nslj+msbj) jok = 0
+      if (icf .eq. 1 .and. dabs(rc - 1.0d0) .lt. ccmxj) jok = 0
+      if (icf .eq. 2) jok = 0
+      if (jok .eq. 1) go to 250
+c
+c miter = 1 or 2, and the jacobian is to be reevaluated. ---------------
+ 20   jcur = 1
+      nje = nje + 1
+      nslj = nst
+      iplost = 0
+      conmin = dabs(con)
+      go to (100, 200), miter
+c
+c if miter = 1, call jac_chem, multiply by scalar, and add identity. --------
+ 100  continue
+      kmin = iwk(ipian)
+      call jac_chem (neq, tn, y, JJJ, j, iwk(ipian), iwk(ipjan))
+      do 130 j = 1, n
+        kmax = iwk(ipian+j) - 1
+        do 110 i = 1,n
+ 110      ftem(i) = 0.0d0
+C        call jac_chem (neq, tn, y, ftem, j, iwk(ipian), iwk(ipjan))
+        do k=1,n
+          ftem(k) = JJJ(k,j)
+        end do
+        do 120 k = kmin, kmax
+          i = iwk(ibjan+k)
+          wk(iba+k) = ftem(i)*con
+          if (i .eq. j) wk(iba+k) = wk(iba+k) + 1.0d0
+ 120      continue
+        kmin = kmax + 1
+ 130    continue
+      go to 290
+c
+c if miter = 2, make ngp calls to f to approximate j and p. ------------
+ 200  continue
+      fac = vnorm(n, savf, ewt)
+      r0 = 1000.0d0 * dabs(h) * uround * dfloat(n) * fac
+      if (r0 .eq. 0.0d0) r0 = 1.0d0
+      srur = wk(1)
+      jmin = iwk(ipigp)
+      do 240 ng = 1,ngp
+        jmax = iwk(ipigp+ng) - 1
+        do 210 j = jmin,jmax
+          jj = iwk(ibjgp+j)
+          r = DMAX1(srur*dabs(y(jj)),r0/ewt(jj))
+ 210      y(jj) = y(jj) + r
+        CALL f (neq, tn, y, ftem)
+        do 230 j = jmin,jmax
+          jj = iwk(ibjgp+j)
+          y(jj) = yh(jj,1)
+          r = DMAX1(srur*dabs(y(jj)),r0/ewt(jj))
+          fac = -hl0/r
+          kmin =iwk(ibian+jj)
+          kmax =iwk(ibian+jj+1) - 1
+          do 220 k = kmin,kmax
+            i = iwk(ibjan+k)
+            wk(iba+k) = (ftem(i) - savf(i))*fac
+            if (i .eq. jj) wk(iba+k) = wk(iba+k) + 1.0d0
+ 220        continue
+ 230      continue
+        jmin = jmax + 1
+ 240    continue
+      nfe = nfe + ngp
+      go to 290
+c
+c if jok = 1, reconstruct new p from old p. ----------------------------
+ 250  jcur = 0
+      rcon = con/con0
+      rcont = dabs(con)/conmin
+      if (rcont .gt. rbig .and. iplost .eq. 1) go to 20
+      kmin = iwk(ipian)
+      do 275 j = 1,n
+        kmax = iwk(ipian+j) - 1
+        do 270 k = kmin,kmax
+          i = iwk(ibjan+k)
+          pij = wk(iba+k)
+          if (i .ne. j) go to 260
+          pij = pij - 1.0d0
+          if (dabs(pij) .ge. psmall) go to 260
+            iplost = 1
+            conmin = dmin1(dabs(con0),conmin)
+ 260      pij = pij*rcon
+          if (i .eq. j) pij = pij + 1.0d0
+          wk(iba+k) = pij
+ 270      continue
+        kmin = kmax + 1
+ 275    continue
+c
+c do numerical factorization of p matrix. ------------------------------
+ 290  nlu = nlu + 1
+      con0 = con
+      ierpj = 0
+      do 295 i = 1,n
+ 295    ftem(i) = 0.0d0
+      CALL cdrv (n,iwk(ipr),iwk(ipc),iwk(ipic),iwk(ipian),iwk(ipjan),
+     1   wk(ipa),ftem,ftem,nsp,iwk(ipisp),wk(iprsp),iesp,2,iys)
+      if (iys .eq. 0) return
+      imul = (iys - 1)/n
+      ierpj = -2
+      if (imul .eq. 8) ierpj = 1
+      if (imul .eq. 10) ierpj = -1
+      return
+c
+c if miter = 3, construct a diagonal approximation to j and p. ---------
+ 300  continue
+      jcur = 1
+      nje = nje + 1
+      wk(2) = hl0
+      ierpj = 0
+      r = el0*0.1d0
+      do 310 i = 1,n
+ 310    y(i) = y(i) + r*(h*savf(i) - yh(i,2))
+      CALL f (neq, tn, y, wk(3))
+      nfe = nfe + 1
+      do 320 i = 1,n
+        r0 = h*savf(i) - yh(i,2)
+        di = 0.1d0*r0 - h*(wk(i+2) - savf(i))
+        wk(i+2) = 1.0d0
+        if (dabs(r0) .lt. uround/ewt(i)) go to 320
+        if (dabs(di) .eq. 0.0d0) go to 330
+        wk(i+2) = 0.1d0*r0/di
+ 320    continue
+      return
+ 330  ierpj = 2
+      return
+c----------------------- end of subroutine prjs ------------------------
+      end
+      subroutine stode (neq, y, yh, nyh, yh1, ewt, savf, acor,
+     1   wm, iwm, f, jac, pjac, slvs)
+clll. optimize
+      external f, jac, pjac, slvs
+      integer neq, nyh, iwm
+      integer iownd, ialth, ipup, lmax, meo, nqnyh, nslp,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer i, i1, iredo, iret, j, jb, m, ncf, newq
+      KPP_REAL y, yh, yh1, ewt, savf, acor, wm
+      KPP_REAL conit, crate, el, elco, hold, rmax, tesco,
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL dcon, ddn, del, delp, dsm, dup, exdn, exsm, exup,
+     1   r, rh, rhdn, rhsm, rhup, told, vnorm
+      dimension neq(*), y(*), yh(nyh,*), yh1(*), ewt(*), savf(*),
+     1   acor(*), wm(*), iwm(*)
+      common /ls0001/ conit, crate, el(13), elco(13,12),
+     1   hold, rmax, tesco(3,12),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround, iownd(14),
+     3   ialth, ipup, lmax, meo, nqnyh, nslp,
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+c-----------------------------------------------------------------------
+c stode performs one step of the integration of an initial value
+c problem for a system of ordinary differential equations.
+c note.. stode is independent of the value of the iteration method
+c indicator miter, when this is .ne. 0, and hence is independent
+c of the type of chord method used, or the jacobian structure.
+c communication with stode is done with the following variables..
+c
+c neq    = integer array containing problem size in neq(1), and
+c          passed as the neq argument in all calls to f and jac.
+c y      = an array of length .ge. n used as the y argument in
+c          all calls to f and jac.
+c yh     = an nyh by lmax array containing the dependent variables
+c          and their approximate scaled derivatives, where
+c          lmax = maxord + 1.  yh(i,j+1) contains the approximate
+c          j-th derivative of y(i), scaled by h**j/factorial(j)
+c          (j = 0,1,...,nq).  on entry for the first step, the first
+c          two columns of yh must be set from the initial values.
+c nyh    = a constant integer .ge. n, the first dimension of yh.
+c yh1    = a one-dimensional array occupying the same space as yh.
+c ewt    = an array of length n containing multiplicative weights
+c          for local error measurements.  local errors in y(i) are
+c          compared to 1.0/ewt(i) in various error tests.
+c savf   = an array of working storage, of length n.
+c          also used for input of yh(*,maxord+2) when jstart = -1
+c          and maxord .lt. the current order nq.
+c acor   = a work array of length n, used for the accumulated
+c          corrections.  on a successful return, acor(i) contains
+c          the estimated one-step local error in y(i).
+c wm,iwm = real and integer work arrays associated with matrix
+c          operations in chord iteration (miter .ne. 0).
+c pjac   = name of routine to evaluate and preprocess jacobian matrix
+c          and p = i - h*el0*jac, if a chord method is being used.
+c slvs   = name of routine to solve linear system in chord iteration.
+c ccmax  = maximum relative change in h*el0 before pjac is called.
+c h      = the step size to be attempted on the next step.
+c          h is altered by the error control algorithm during the
+c          problem.  h can be either positive or negative, but its
+c          sign must remain constant throughout the problem.
+c hmin   = the minimum absolute value of the step size h to be used.
+c hmxi   = inverse of the maximum absolute value of h to be used.
+c          hmxi = 0.0 is allowed and corresponds to an infinite hmax.
+c          hmin and hmxi may be changed at any time, but will not
+c          take effect until the next change of h is considered.
+c tn     = the independent variable. tn is updated on each step taken.
+c jstart = an integer used for input only, with the following
+c          values and meanings..
+c               0  perform the first step.
+c           .gt.0  take a new step continuing from the last.
+c              -1  take the next step with a new value of h, maxord,
+c                    n, meth, miter, and/or matrix parameters.
+c              -2  take the next step with a new value of h,
+c                    but with other inputs unchanged.
+c          on return, jstart is set to 1 to facilitate continuation.
+c kflag  = a completion code with the following meanings..
+c               0  the step was succesful.
+c              -1  the requested error could not be achieved.
+c              -2  corrector convergence could not be achieved.
+c              -3  fatal error in pjac or slvs.
+c          a return with kflag = -1 or -2 means either
+c          abs(h) = hmin or 10 consecutive failures occurred.
+c          on a return with kflag negative, the values of tn and
+c          the yh array are as of the beginning of the last
+c          step, and h is the last step size attempted.
+c maxord = the maximum order of integration method to be allowed.
+c maxcor = the maximum number of corrector iterations allowed.
+c msbp   = maximum number of steps between pjac calls (miter .gt. 0).
+c mxncf  = maximum number of convergence failures allowed.
+c meth/miter = the method flags.  see description in driver.
+c n      = the number of first-order differential equations.
+c-----------------------------------------------------------------------
+      kflag = 0
+      told = tn
+      ncf = 0
+      ierpj = 0
+      iersl = 0
+      jcur = 0
+      icf = 0
+      delp = 0.0d0
+      if (jstart .gt. 0) go to 200
+      if (jstart .eq. -1) go to 100
+      if (jstart .eq. -2) go to 160
+c-----------------------------------------------------------------------
+c on the first call, the order is set to 1, and other variables are
+c initialized.  rmax is the maximum ratio by which h can be increased
+c in a single step.  it is initially 1.e4 to compensate for the small
+c initial h, but then is normally equal to 10.  if a failure
+c occurs (in corrector convergence or error test), rmax is set at 2
+c for the next increase.
+c-----------------------------------------------------------------------
+      lmax = maxord + 1
+      nq = 1
+      l = 2
+      ialth = 2
+      rmax = 10000.0d0
+      rc = 0.0d0
+      el0 = 1.0d0
+      crate = 0.7d0
+      hold = h
+      meo = meth
+      nslp = 0
+      ipup = miter
+      iret = 3
+      go to 140
+c-----------------------------------------------------------------------
+c the following block handles preliminaries needed when jstart = -1.
+c ipup is set to miter to force a matrix update.
+c if an order increase is about to be considered (ialth = 1),
+c ialth is reset to 2 to postpone consideration one more step.
+c if the caller has changed meth, cfode is called to reset
+c the coefficients of the method.
+c if the caller has changed maxord to a value less than the current
+c order nq, nq is reduced to maxord, and a new h chosen accordingly.
+c if h is to be changed, yh must be rescaled.
+c if h or meth is being changed, ialth is reset to l = nq + 1
+c to prevent further changes in h for that many steps.
+c-----------------------------------------------------------------------
+ 100  ipup = miter
+      lmax = maxord + 1
+      if (ialth .eq. 1) ialth = 2
+      if (meth .eq. meo) go to 110
+      CALL cfode (meth, elco, tesco)
+      meo = meth
+      if (nq .gt. maxord) go to 120
+      ialth = l
+      iret = 1
+      go to 150
+ 110  if (nq .le. maxord) go to 160
+ 120  nq = maxord
+      l = lmax
+      do 125 i = 1,l
+ 125    el(i) = elco(i,nq)
+      nqnyh = nq*nyh
+      rc = rc*el(1)/el0
+      el0 = el(1)
+      conit = 0.5d0/dfloat(nq+2)
+      ddn = vnorm (n, savf, ewt)/tesco(1,l)
+      exdn = 1.0d0/dfloat(l)
+      rhdn = 1.0d0/(1.3d0*ddn**exdn + 0.0000013d0)
+      rh = dmin1(rhdn,1.0d0)
+      iredo = 3
+      if (h .eq. hold) go to 170
+      rh = dmin1(rh,dabs(h/hold))
+      h = hold
+      go to 175
+c-----------------------------------------------------------------------
+c cfode is called to get all the integration coefficients for the
+c current meth.  then the el vector and related constants are reset
+c whenever the order nq is changed, or at the start of the problem.
+c-----------------------------------------------------------------------
+ 140  CALL cfode (meth, elco, tesco)
+ 150  do 155 i = 1,l
+ 155    el(i) = elco(i,nq)
+      nqnyh = nq*nyh
+      rc = rc*el(1)/el0
+      el0 = el(1)
+      conit = 0.5d0/dfloat(nq+2)
+      go to (160, 170, 200), iret
+c-----------------------------------------------------------------------
+c if h is being changed, the h ratio rh is checked against
+c rmax, hmin, and hmxi, and the yh array rescaled.  ialth is set to
+c l = nq + 1 to prevent a change of h for that many steps, unless
+c forced by a convergence or error test failure.
+c-----------------------------------------------------------------------
+ 160  if (h .eq. hold) go to 200
+      rh = h/hold
+      h = hold
+      iredo = 3
+      go to 175
+ 170  rh = DMAX1(rh,hmin/dabs(h))
+ 175  rh = dmin1(rh,rmax)
+      rh = rh/DMAX1(1.0d0,dabs(h)*hmxi*rh)
+      r = 1.0d0
+      do 180 j = 2,l
+        r = r*rh
+        do 180 i = 1,n
+ 180      yh(i,j) = yh(i,j)*r
+      h = h*rh
+      rc = rc*rh
+      ialth = l
+      if (iredo .eq. 0) go to 690
+c-----------------------------------------------------------------------
+c this section computes the predicted values by effectively
+c multiplying the yh array by the pascal triangle matrix.
+c rc is the ratio of new to old values of the coefficient  h*el(1).
+c when rc differs from 1 by more than ccmax, ipup is set to miter
+c to force pjac to be called, if a jacobian is involved.
+c in any case, pjac is called at least every msbp steps.
+c-----------------------------------------------------------------------
+ 200  if (dabs(rc-1.0d0) .gt. ccmax) ipup = miter
+      if (nst .ge. nslp+msbp) ipup = miter
+      tn = tn + h
+      i1 = nqnyh + 1
+      do 215 jb = 1,nq
+        i1 = i1 - nyh
+cdir$ ivdep
+        do 210 i = i1,nqnyh
+ 210      yh1(i) = yh1(i) + yh1(i+nyh)
+ 215    continue
+c-----------------------------------------------------------------------
+c up to maxcor corrector iterations are taken.  a convergence test is
+c made on the r.m.s. norm of each correction, weighted by the error
+c weight vector ewt.  the sum of the corrections is accumulated in the
+c vector acor(i).  the yh array is not altered in the corrector loop.
+c-----------------------------------------------------------------------
+ 220  m = 0
+      do 230 i = 1,n
+ 230    y(i) = yh(i,1)
+      CALL f (neq, tn, y, savf)
+      nfe = nfe + 1
+      if (ipup .le. 0) go to 250
+c-----------------------------------------------------------------------
+c if indicated, the matrix p = i - h*el(1)*j is reevaluated and
+c preprocessed before starting the corrector iteration.  ipup is set
+c to 0 as an indicator that this has been done.
+c-----------------------------------------------------------------------
+      CALL pjac (neq, y, yh, nyh, ewt, acor, savf, wm, iwm, f, jac)
+      ipup = 0
+      rc = 1.0d0
+      nslp = nst
+      crate = 0.7d0
+      if (ierpj .ne. 0) go to 430
+ 250  do 260 i = 1,n
+ 260    acor(i) = 0.0d0
+ 270  if (miter .ne. 0) go to 350
+c-----------------------------------------------------------------------
+c in the case of functional iteration, update y directly from
+c the result of the last function evaluation.
+c-----------------------------------------------------------------------
+      do 290 i = 1,n
+        savf(i) = h*savf(i) - yh(i,2)
+ 290    y(i) = savf(i) - acor(i)
+      del = vnorm (n, y, ewt)
+      do 300 i = 1,n
+        y(i) = yh(i,1) + el(1)*savf(i)
+ 300    acor(i) = savf(i)
+      go to 400
+c-----------------------------------------------------------------------
+c in the case of the chord method, compute the corrector error,
+c and solve the linear system with that as right-hand side and
+c p as coefficient matrix.
+c-----------------------------------------------------------------------
+ 350  do 360 i = 1,n
+ 360    y(i) = h*savf(i) - (yh(i,2) + acor(i))
+      CALL slvs (wm, iwm, y, savf)
+      if (iersl .lt. 0) go to 430
+      if (iersl .gt. 0) go to 410
+      del = vnorm (n, y, ewt)
+      do 380 i = 1,n
+        acor(i) = acor(i) + y(i)
+ 380    y(i) = yh(i,1) + el(1)*acor(i)
+c-----------------------------------------------------------------------
+c test for convergence.  if m.gt.0, an estimate of the convergence
+c rate constant is stored in crate, and this is used in the test.
+c-----------------------------------------------------------------------
+ 400  if (m .ne. 0) crate = DMAX1(0.2d0*crate,del/delp)
+      dcon = del*dmin1(1.0d0,1.5d0*crate)/(tesco(2,nq)*conit)
+      if (dcon .le. 1.0d0) go to 450
+      m = m + 1
+      if (m .eq. maxcor) go to 410
+      if (m .ge. 2 .and. del .gt. 2.0d0*delp) go to 410
+      delp = del
+      CALL f (neq, tn, y, savf)
+      nfe = nfe + 1
+      go to 270
+c-----------------------------------------------------------------------
+c the corrector iteration failed to converge.
+c if miter .ne. 0 and the jacobian is out of date, pjac is called for
+c the next try.  otherwise the yh array is retracted to its values
+c before prediction, and h is reduced, if possible.  if h cannot be
+c reduced or mxncf failures have occurred, exit with kflag = -2.
+c-----------------------------------------------------------------------
+ 410  if (miter .eq. 0 .or. jcur .eq. 1) go to 430
+      icf = 1
+      ipup = miter
+      go to 220
+ 430  icf = 2
+      ncf = ncf + 1
+      rmax = 2.0d0
+      tn = told
+      i1 = nqnyh + 1
+      do 445 jb = 1,nq
+        i1 = i1 - nyh
+cdir$ ivdep
+        do 440 i = i1,nqnyh
+ 440      yh1(i) = yh1(i) - yh1(i+nyh)
+ 445    continue
+      if (ierpj .lt. 0 .or. iersl .lt. 0) go to 680
+      if (dabs(h) .le. hmin*1.00001d0) go to 670
+      if (ncf .eq. mxncf) go to 670
+      rh = 0.25d0
+      ipup = miter
+      iredo = 1
+      go to 170
+c-----------------------------------------------------------------------
+c the corrector has converged.  jcur is set to 0
+c to signal that the jacobian involved may need updating later.
+c the local error test is made and control passes to statement 500
+c if it fails.
+c-----------------------------------------------------------------------
+ 450  jcur = 0
+      if (m .eq. 0) dsm = del/tesco(2,nq)
+      if (m .gt. 0) dsm = vnorm (n, acor, ewt)/tesco(2,nq)
+      if (dsm .gt. 1.0d0) go to 500
+c-----------------------------------------------------------------------
+c after a successful step, update the yh array.
+c consider changing h if ialth = 1.  otherwise decrease ialth by 1.
+c if ialth is then 1 and nq .lt. maxord, then acor is saved for
+c use in a possible order increase on the next step.
+c if a change in h is considered, an increase or decrease in order
+c by one is considered also.  a change in h is made only if it is by a
+c factor of at least 1.1.  if not, ialth is set to 3 to prevent
+c testing for that many steps.
+c-----------------------------------------------------------------------
+      kflag = 0
+      iredo = 0
+      nst = nst + 1
+      hu = h
+      nqu = nq
+      do 470 j = 1,l
+        do 470 i = 1,n
+ 470      yh(i,j) = yh(i,j) + el(j)*acor(i)
+      ialth = ialth - 1
+      if (ialth .eq. 0) go to 520
+      if (ialth .gt. 1) go to 700
+      if (l .eq. lmax) go to 700
+      do 490 i = 1,n
+ 490    yh(i,lmax) = acor(i)
+      go to 700
+c-----------------------------------------------------------------------
+c the error test failed.  kflag keeps track of multiple failures.
+c restore tn and the yh array to their previous values, and prepare
+c to try the step again.  compute the optimum step size for this or
+c one lower order.  after 2 or more failures, h is forced to decrease
+c by a factor of 0.2 or less.
+c-----------------------------------------------------------------------
+ 500  kflag = kflag - 1
+      tn = told
+      i1 = nqnyh + 1
+      do 515 jb = 1,nq
+        i1 = i1 - nyh
+cdir$ ivdep
+        do 510 i = i1,nqnyh
+ 510      yh1(i) = yh1(i) - yh1(i+nyh)
+ 515    continue
+      rmax = 2.0d0
+      if (dabs(h) .le. hmin*1.00001d0) go to 660
+      if (kflag .le. -3) go to 640
+      iredo = 2
+      rhup = 0.0d0
+      go to 540
+c-----------------------------------------------------------------------
+c regardless of the success or failure of the step, factors
+c rhdn, rhsm, and rhup are computed, by which h could be multiplied
+c at order nq - 1, order nq, or order nq + 1, respectively.
+c in the case of failure, rhup = 0.0 to avoid an order increase.
+c the largest of these is determined and the new order chosen
+c accordingly.  if the order is to be increased, we compute one
+c additional scaled derivative.
+c-----------------------------------------------------------------------
+ 520  rhup = 0.0d0
+      if (l .eq. lmax) go to 540
+      do 530 i = 1,n
+ 530    savf(i) = acor(i) - yh(i,lmax)
+      dup = vnorm (n, savf, ewt)/tesco(3,nq)
+      exup = 1.0d0/dfloat(l+1)
+      rhup = 1.0d0/(1.4d0*dup**exup + 0.0000014d0)
+ 540  exsm = 1.0d0/dfloat(l)
+      rhsm = 1.0d0/(1.2d0*dsm**exsm + 0.0000012d0)
+      rhdn = 0.0d0
+      if (nq .eq. 1) go to 560
+      ddn = vnorm (n, yh(1,l), ewt)/tesco(1,nq)
+      exdn = 1.0d0/dfloat(nq)
+      rhdn = 1.0d0/(1.3d0*ddn**exdn + 0.0000013d0)
+ 560  if (rhsm .ge. rhup) go to 570
+      if (rhup .gt. rhdn) go to 590
+      go to 580
+ 570  if (rhsm .lt. rhdn) go to 580
+      newq = nq
+      rh = rhsm
+      go to 620
+ 580  newq = nq - 1
+      rh = rhdn
+      if (kflag .lt. 0 .and. rh .gt. 1.0d0) rh = 1.0d0
+      go to 620
+ 590  newq = l
+      rh = rhup
+      if (rh .lt. 1.1d0) go to 610
+      r = el(l)/dfloat(l)
+      do 600 i = 1,n
+ 600    yh(i,newq+1) = acor(i)*r
+      go to 630
+ 610  ialth = 3
+      go to 700
+ 620  if ((kflag .eq. 0) .and. (rh .lt. 1.1d0)) go to 610
+      if (kflag .le. -2) rh = dmin1(rh,0.2d0)
+c-----------------------------------------------------------------------
+c if there is a change of order, reset nq, l, and the coefficients.
+c in any case h is reset according to rh and the yh array is rescaled.
+c then exit from 690 if the step was ok, or redo the step otherwise.
+c-----------------------------------------------------------------------
+      if (newq .eq. nq) go to 170
+ 630  nq = newq
+      l = nq + 1
+      iret = 2
+      go to 150
+c-----------------------------------------------------------------------
+c control reaches this section if 3 or more failures have occured.
+c if 10 failures have occurred, exit with kflag = -1.
+c it is assumed that the derivatives that have accumulated in the
+c yh array have errors of the wrong order.  hence the first
+c derivative is recomputed, and the order is set to 1.  then
+c h is reduced by a factor of 10, and the step is retried,
+c until it succeeds or h reaches hmin.
+c-----------------------------------------------------------------------
+ 640  if (kflag .eq. -10) go to 660
+      rh = 0.1d0
+      rh = DMAX1(hmin/dabs(h),rh)
+      h = h*rh
+      do 645 i = 1,n
+ 645    y(i) = yh(i,1)
+      CALL f (neq, tn, y, savf)
+      nfe = nfe + 1
+      do 650 i = 1,n
+ 650    yh(i,2) = h*savf(i)
+      ipup = miter
+      ialth = 5
+      if (nq .eq. 1) go to 200
+      nq = 1
+      l = 2
+      iret = 3
+      go to 150
+c-----------------------------------------------------------------------
+c all returns are made through this section.  h is saved in hold
+c to allow the caller to change h on the next step.
+c-----------------------------------------------------------------------
+ 660  kflag = -1
+      go to 720
+ 670  kflag = -2
+      go to 720
+ 680  kflag = -3
+      go to 720
+ 690  rmax = 10.0d0
+ 700  r = 1.0d0/tesco(2,nqu)
+      do 710 i = 1,n
+ 710    acor(i) = acor(i)*r
+ 720  hold = h
+      jstart = 1
+      return
+c----------------------- end of subroutine stode -----------------------
+      end
+      subroutine xerrwv (msg, nmes, nerr, level, ni, i1, i2, nr, r1, r2)
+      integer msg, nmes, nerr, level, ni, i1, i2, nr,
+     1   i, lun, lunit, mesflg, ncpw, nch, nwds
+      KPP_REAL r1, r2
+      dimension msg(nmes)
+c-----------------------------------------------------------------------
+c subroutines xerrwv, xsetf, and xsetun, as given here, constitute
+c a simplified version of the slatec error handling package.
+c written by a. c. hindmarsh at llnl.  version of march 30, 1987.
+c this version is in KPP_REAL.
+c
+c all arguments are input arguments.
+c
+c msg    = the message (hollerith literal or integer array).
+c nmes   = the length of msg (number of characters).
+c nerr   = the error number (not used).
+c level  = the error level..
+c          0 or 1 means recoverable (control returns to caller).
+c          2 means fatal (run is aborted--see note below).
+c ni     = number of integers (0, 1, or 2) to be printed with message.
+c i1,i2  = integers to be printed, depending on ni.
+c nr     = number of reals (0, 1, or 2) to be printed with message.
+c r1,r2  = reals to be printed, depending on nr.
+c
+c note..  this routine is machine-dependent and specialized for use
+c in limited context, in the following ways..
+c 1. the number of hollerith characters stored per word, denoted
+c    by ncpw below, is a data-loaded constant.
+c 2. the value of nmes is assumed to be at most 60.
+c    (multi-line messages are generated by repeated calls.)
+c 3. if level = 2, control passes to the statement   stop
+c    to abort the run.  this statement may be machine-dependent.
+c 4. r1 and r2 are assumed to be in KPP_REAL and are printed
+c    in d21.13 format.
+c 5. the common block /eh0001/ below is data-loaded (a machine-
+c    dependent feature) with default values.
+c    this block is needed for proper retention of parameters used by
+c    this routine which the user can reset by calling xsetf or xsetun.
+c    the variables in this block are as follows..
+c       mesflg = print control flag..
+c                1 means print all messages (the default).
+c                0 means no printing.
+c       lunit  = logical unit number for messages.
+c                the default is 6 (machine-dependent).
+c-----------------------------------------------------------------------
+c the following are instructions for installing this routine
+c in different machine environments.
+c
+c to change the default output unit, change the data statement
+c in the block data subprogram below.
+c
+c for a different number of characters per word, change the
+c data statement setting ncpw below, and format 10.  alternatives for
+c various computers are shown in comment cards.
+c
+c for a different run-abort command, change the statement following
+c statement 100 at the end.
+c-----------------------------------------------------------------------
+      common /eh0001/ mesflg, lunit
+c-----------------------------------------------------------------------
+c the following data-loaded value of ncpw is valid for the cdc-6600
+c and cdc-7600 computers.
+c     data ncpw/10/
+c the following is valid for the cray-1 computer.
+c     data ncpw/8/
+c the following is valid for the burroughs 6700 and 7800 computers.
+c     data ncpw/6/
+c the following is valid for the pdp-10 computer.
+c     data ncpw/5/
+c the following is valid for the vax computer with 4 bytes per integer,
+c and for the ibm-360, ibm-370, ibm-303x, and ibm-43xx computers.
+      data ncpw/4/
+c the following is valid for the pdp-11, or vax with 2-byte integers.
+c     data ncpw/2/
+c-----------------------------------------------------------------------
+      if (mesflg .eq. 0) go to 100
+c get logical unit number. ---------------------------------------------
+      lun = lunit
+c get number of words in message. --------------------------------------
+      nch = min0(nmes,60)
+      nwds = nch/ncpw
+      if (nch .ne. nwds*ncpw) nwds = nwds + 1
+c write the message. ---------------------------------------------------
+      write (lun, 10) (msg(i),i=1,nwds)
+c-----------------------------------------------------------------------
+c the following format statement is to have the form
+c 10  format(1x,mmann)
+c where nn = ncpw and mm is the smallest integer .ge. 60/ncpw.
+c the following is valid for ncpw = 10.
+c 10  format(1x,6a10)
+c the following is valid for ncpw = 8.
+c 10  format(1x,8a8)
+c the following is valid for ncpw = 6.
+c 10  format(1x,10a6)
+c the following is valid for ncpw = 5.
+c 10  format(1x,12a5)
+c the following is valid for ncpw = 4.
+  10  format(1x,15a4)
+c the following is valid for ncpw = 2.
+c 10  format(1x,30a2)
+c-----------------------------------------------------------------------
+      if (ni .eq. 1) write (lun, 20) i1
+ 20   format(6x,23hin above message,  i1 =,i10)
+      if (ni .eq. 2) write (lun, 30) i1,i2
+ 30   format(6x,23hin above message,  i1 =,i10,3x,4hi2 =,i10)
+      if (nr .eq. 1) write (lun, 40) r1
+ 40   format(6x,23hin above message,  r1 =,d21.13)
+      if (nr .eq. 2) write (lun, 50) r1,r2
+ 50   format(6x,15hin above,  r1 =,d21.13,3x,4hr2 =,d21.13)
+c abort the run if level = 2. ------------------------------------------
+ 100  if (level .ne. 2) return
+      stop
+c----------------------- end of subroutine xerrwv ----------------------
+      end
+      KPP_REAL function vnorm (n, v, w)
+clll. optimize
+c-----------------------------------------------------------------------
+c this function routine computes the weighted root-mean-square norm
+c of the vector of length n contained in the array v, with weights
+c contained in the array w of length n..
+c   vnorm = sqrt( (1/n) * sum( v(i)*w(i) )**2 )
+c-----------------------------------------------------------------------
+      integer n,   i
+      KPP_REAL v, w,   sum
+      dimension v(n), w(n)
+      sum = 0.0d0
+      do 10 i = 1,n
+ 10     sum = sum + (v(i)*w(i))**2
+      vnorm = DSQRT(sum/dfloat(n))
+      return
+c----------------------- end of function vnorm -------------------------
+      end
+      subroutine ewset (n, itol, RelTol, AbsTol, ycur, ewt)
+clll. optimize
+c-----------------------------------------------------------------------
+c this subroutine sets the error weight vector ewt according to
+c     ewt(i) = RelTol(i)*abs(ycur(i)) + AbsTol(i),  i = 1,...,n,
+c with the subscript on RelTol and/or AbsTol possibly replaced by 1 above,
+c depending on the value of itol.
+c-----------------------------------------------------------------------
+      integer n, itol
+      integer i
+      KPP_REAL RelTol, AbsTol, ycur, ewt
+      dimension RelTol(1), AbsTol(1), ycur(n), ewt(n)
+c
+      go to (10, 20, 30, 40), itol
+ 10   continue
+      do 15 i = 1,n
+ 15     ewt(i) = RelTol(1)*dabs(ycur(i)) + AbsTol(1)
+      return
+ 20   continue
+      do 25 i = 1,n
+ 25     ewt(i) = RelTol(1)*dabs(ycur(i)) + AbsTol(i)
+      return
+ 30   continue
+      do 35 i = 1,n
+ 35     ewt(i) = RelTol(i)*dabs(ycur(i)) + AbsTol(1)
+      return
+ 40   continue
+      do 45 i = 1,n
+ 45     ewt(i) = RelTol(i)*dabs(ycur(i)) + AbsTol(i)
+      return
+c----------------------- end of subroutine ewset -----------------------
+      end
+      subroutine cfode (meth, elco, tesco)
+clll. optimize
+      integer meth
+      integer i, ib, nq, nqm1, nqp1
+      KPP_REAL elco, tesco
+      KPP_REAL agamq, fnq, fnqm1, pc, pint, ragq,
+     1   rqfac, rq1fac, tsign, xpin
+      dimension elco(13,12), tesco(3,12)
+c-----------------------------------------------------------------------
+c cfode is called by the integrator routine to set coefficients
+c needed there.  the coefficients for the current method, as
+c given by the value of meth, are set for all orders and saved.
+c the maximum order assumed here is 12 if meth = 1 and 5 if meth = 2.
+c (a smaller value of the maximum order is also allowed.)
+c cfode is called once at the beginning of the problem,
+c and is not called again unless and until meth is changed.
+c
+c the elco array contains the basic method coefficients.
+c the coefficients el(i), 1 .le. i .le. nq+1, for the method of
+c order nq are stored in elco(i,nq).  they are given by a genetrating
+c polynomial, i.e.,
+c     l(x) = el(1) + el(2)*x + ... + el(nq+1)*x**nq.
+c for the implicit adams methods, l(x) is given by
+c     dl/dx = (x+1)*(x+2)*...*(x+nq-1)/factorial(nq-1),    l(-1) = 0.
+c for the bdf methods, l(x) is given by
+c     l(x) = (x+1)*(x+2)* ... *(x+nq)/k,
+c where         k = factorial(nq)*(1 + 1/2 + ... + 1/nq).
+c
+c the tesco array contains test constants used for the
+c local error test and the selection of step size and/or order.
+c at order nq, tesco(k,nq) is used for the selection of step
+c size at order nq - 1 if k = 1, at order nq if k = 2, and at order
+c nq + 1 if k = 3.
+c-----------------------------------------------------------------------
+      dimension pc(12)
+c
+      go to (100, 200), meth
+c
+ 100  elco(1,1) = 1.0d0
+      elco(2,1) = 1.0d0
+      tesco(1,1) = 0.0d0
+      tesco(2,1) = 2.0d0
+      tesco(1,2) = 1.0d0
+      tesco(3,12) = 0.0d0
+      pc(1) = 1.0d0
+      rqfac = 1.0d0
+      do 140 nq = 2,12
+c-----------------------------------------------------------------------
+c the pc array will contain the coefficients of the polynomial
+c     p(x) = (x+1)*(x+2)*...*(x+nq-1).
+c initially, p(x) = 1.
+c-----------------------------------------------------------------------
+        rq1fac = rqfac
+        rqfac = rqfac/dfloat(nq)
+        nqm1 = nq - 1
+        fnqm1 = dfloat(nqm1)
+        nqp1 = nq + 1
+c form coefficients of p(x)*(x+nq-1). ----------------------------------
+        pc(nq) = 0.0d0
+        do 110 ib = 1,nqm1
+          i = nqp1 - ib
+ 110      pc(i) = pc(i-1) + fnqm1*pc(i)
+        pc(1) = fnqm1*pc(1)
+c compute integral, -1 to 0, of p(x) and x*p(x). -----------------------
+        pint = pc(1)
+        xpin = pc(1)/2.0d0
+        tsign = 1.0d0
+        do 120 i = 2,nq
+          tsign = -tsign
+          pint = pint + tsign*pc(i)/dfloat(i)
+ 120      xpin = xpin + tsign*pc(i)/dfloat(i+1)
+c store coefficients in elco and tesco. --------------------------------
+        elco(1,nq) = pint*rq1fac
+        elco(2,nq) = 1.0d0
+        do 130 i = 2,nq
+ 130      elco(i+1,nq) = rq1fac*pc(i)/dfloat(i)
+        agamq = rqfac*xpin
+        ragq = 1.0d0/agamq
+        tesco(2,nq) = ragq
+        if (nq .lt. 12) tesco(1,nqp1) = ragq*rqfac/dfloat(nqp1)
+        tesco(3,nqm1) = ragq
+ 140    continue
+      return
+c
+ 200  pc(1) = 1.0d0
+      rq1fac = 1.0d0
+      do 230 nq = 1,5
+c-----------------------------------------------------------------------
+c the pc array will contain the coefficients of the polynomial
+c     p(x) = (x+1)*(x+2)*...*(x+nq).
+c initially, p(x) = 1.
+c-----------------------------------------------------------------------
+        fnq = dfloat(nq)
+        nqp1 = nq + 1
+c form coefficients of p(x)*(x+nq). ------------------------------------
+        pc(nqp1) = 0.0d0
+        do 210 ib = 1,nq
+          i = nq + 2 - ib
+ 210      pc(i) = pc(i-1) + fnq*pc(i)
+        pc(1) = fnq*pc(1)
+c store coefficients in elco and tesco. --------------------------------
+        do 220 i = 1,nqp1
+ 220      elco(i,nq) = pc(i)/pc(2)
+        elco(2,nq) = 1.0d0
+        tesco(1,nq) = rq1fac
+        tesco(2,nq) = dfloat(nqp1)/elco(1,nq)
+        tesco(3,nq) = dfloat(nq+2)/elco(1,nq)
+        rq1fac = rq1fac/fnq
+ 230    continue
+      return
+c----------------------- end of subroutine cfode -----------------------
+      end
+      subroutine cdrv
+     *     (n, r,c,ic, ia,ja,a, b, z, nsp,isp,rsp,esp, path, flag)
+clll. optimize
+c*** subroutine cdrv
+c*** driver for subroutines for solving sparse nonsymmetric systems of
+c       linear equations (compressed pointer storage)
+c
+c
+c    parameters
+c    class abbreviations are--
+c       n - integer variable
+c       f - real variable
+c       v - supplies a value to the driver
+c       r - returns a result from the driver
+c       i - used internally by the driver
+c       a - array
+c
+c class - parameter
+c ------+----------
+c       -
+c         the nonzero entries of the coefficient matrix m are stored
+c    row-by-row in the array a.  to identify the individual nonzero
+c    entries in each row, we need to know in which column each entry
+c    lies.  the column indices which correspond to the nonzero entries
+c    of m are stored in the array ja.  i.e., if  a(k) = m(i,j),  then
+c    ja(k) = j.  in addition, we need to know where each row starts and
+c    how long it is.  the index positions in ja and a where the rows of
+c    m begin are stored in the array ia.  i.e., if m(i,j) is the first
+c    nonzero entry (stored) in the i-th row and a(k) = m(i,j),  then
+c    ia(i) = k.  moreover, the index in ja and a of the first location
+c    following the last element in the last row is stored in ia(n+1).
+c    thus, the number of entries in the i-th row is given by
+c    ia(i+1) - ia(i),  the nonzero entries of the i-th row are stored
+c    consecutively in
+c            a(ia(i)),  a(ia(i)+1),  ..., a(ia(i+1)-1),
+c    and the corresponding column indices are stored consecutively in
+c            ja(ia(i)), ja(ia(i)+1), ..., ja(ia(i+1)-1).
+c    for example, the 5 by 5 matrix
+c                ( 1. 0. 2. 0. 0.)
+c                ( 0. 3. 0. 0. 0.)
+c            m = ( 0. 4. 5. 6. 0.)
+c                ( 0. 0. 0. 7. 0.)
+c                ( 0. 0. 0. 8. 9.)
+c    would be stored as
+c               - 1  2  3  4  5  6  7  8  9
+c            ---+--------------------------
+c            ia - 1  3  4  7  8 10
+c            ja - 1  3  2  2  3  4  4  4  5
+c             a - 1. 2. 3. 4. 5. 6. 7. 8. 9.         .
+c
+c nv    - n     - number of variables/equations.
+c fva   - a     - nonzero entries of the coefficient matrix m, stored
+c       -           by rows.
+c       -           size = number of nonzero entries in m.
+c nva   - ia    - pointers to delimit the rows in a.
+c       -           size = n+1.
+c nva   - ja    - column numbers corresponding to the elements of a.
+c       -           size = size of a.
+c fva   - b     - right-hand side b.  b and z can the same array.
+c       -           size = n.
+c fra   - z     - solution x.  b and z can be the same array.
+c       -           size = n.
+c
+c         the rows and columns of the original matrix m can be
+c    reordered (e.g., to reduce fillin or ensure numerical stability)
+c    before calling the driver.  if no reordering is done, then set
+c    r(i) = c(i) = ic(i) = i  for i=1,...,n.  the solution z is returned
+c    in the original order.
+c         if the columns have been reordered (i.e.,  c(i).ne.i  for some
+c    i), then the driver will CALL a subroutine (nroc) which rearranges
+c    each row of ja and a, leaving the rows in the original order, but
+c    placing the elements of each row in increasing order with respect
+c    to the new ordering.  if  path.ne.1,  then nroc is assumed to have
+c    been called already.
+c
+c nva   - r     - ordering of the rows of m.
+c       -           size = n.
+c nva   - c     - ordering of the columns of m.
+c       -           size = n.
+c nva   - ic    - inverse of the ordering of the columns of m.  i.e.,
+c       -           ic(c(i)) = i  for i=1,...,n.
+c       -           size = n.
+c
+c         the solution of the system of linear equations is divided into
+c    three stages --
+c      nsfc -- the matrix m is processed symbolically to determine where
+c               fillin will occur during the numeric factorization.
+c      nnfc -- the matrix m is factored numerically into the product ldu
+c               of a unit lower triangular matrix l, a diagonal matrix
+c               d, and a unit upper triangular matrix u, and the system
+c               mx = b  is solved.
+c      nnsc -- the linear system  mx = b  is solved using the ldu
+c  or           factorization from nnfc.
+c      nntc -- the transposed linear system  mt x = b  is solved using
+c               the ldu factorization from nnf.
+c    for several systems whose coefficient matrices have the same
+c    nonzero structure, nsfc need be done only once (for the first
+c    system).  then nnfc is done once for each additional system.  for
+c    several systems with the same coefficient matrix, nsfc and nnfc
+c    need be done only once (for the first system).  then nnsc or nntc
+c    is done once for each additional right-hand side.
+c
+c nv    - path  - path specification.  values and their meanings are --
+c       -           1  perform nroc, nsfc, and nnfc.
+c       -           2  perform nnfc only  (nsfc is assumed to have been
+c       -               done in a manner compatible with the storage
+c       -               allocation used in the driver).
+c       -           3  perform nnsc only  (nsfc and nnfc are assumed to
+c       -               have been done in a manner compatible with the
+c       -               storage allocation used in the driver).
+c       -           4  perform nntc only  (nsfc and nnfc are assumed to
+c       -               have been done in a manner compatible with the
+c       -               storage allocation used in the driver).
+c       -           5  perform nroc and nsfc.
+c
+c         various errors are detected by the driver and the individual
+c    subroutines.
+c
+c nr    - flag  - error flag.  values and their meanings are --
+c       -             0     no errors detected
+c       -             n+k   null row in a  --  row = k
+c       -            2n+k   duplicate entry in a  --  row = k
+c       -            3n+k   insufficient storage in nsfc  --  row = k
+c       -            4n+1   insufficient storage in nnfc
+c       -            5n+k   null pivot  --  row = k
+c       -            6n+k   insufficient storage in nsfc  --  row = k
+c       -            7n+1   insufficient storage in nnfc
+c       -            8n+k   zero pivot  --  row = k
+c       -           10n+1   insufficient storage in cdrv
+c       -           11n+1   illegal path specification
+c
+c         working storage is needed for the factored form of the matrix
+c    m plus various temporary vectors.  the arrays isp and rsp should be
+c    equivalenced.  integer storage is allocated from the beginning of
+c    isp and real storage from the end of rsp.
+c
+c nv    - nsp   - declared dimension of rsp.  nsp generally must
+c       -           be larger than  8n+2 + 2k  (where  k = (number of
+c       -           nonzero entries in m)).
+c nvira - isp   - integer working storage divided up into various arrays
+c       -           needed by the subroutines.  isp and rsp should be
+c       -           equivalenced.
+c       -           size = lratio*nsp.
+c fvira - rsp   - real working storage divided up into various arrays
+c       -           needed by the subroutines.  isp and rsp should be
+c       -           equivalenced.
+c       -           size = nsp.
+c nr    - esp   - if sufficient storage was available to perform the
+c       -           symbolic factorization (nsfc), then esp is set to
+c       -           the amount of excess storage provided (negative if
+c       -           insufficient storage was available to perform the
+c       -           numeric factorization (nnfc)).
+c
+c
+c  conversion to KPP_REAL
+c
+c    to convert these routines for KPP_REAL arrays..
+c    (1) use the KPP_REAL declarations in place of the real
+c    declarations in each subprogram, as given in comment cards.
+c    (2) change the data-loaded value of the integer  lratio
+c    in subroutine cdrv, as indicated below.
+c    (3) change e0 to d0 in the constants in statement number 10
+c    in subroutine nnfc and the line following that.
+c
+      integer  r(1), c(1), ic(1),  ia(1), ja(1),  isp(1), esp,  path,
+     *   flag,  d, u, q, row, tmp, ar,  umax
+      KPP_REAL  a(1), b(1), z(1), rsp(1)
+c
+c  set lratio equal to the ratio between the length of floating point
+c  and integer array data.  e. g., lratio = 1 for (real, integer),
+c  lratio = 2 for (KPP_REAL, integer)
+c
+      data lratio/2/
+c
+      if (path.lt.1 .or. 5.lt.path)  go to 111
+c******initialize and divide up temporary storage  *******************
+      il   = 1
+      ijl  = il  + (n+1)
+      iu   = ijl +   n
+      iju  = iu  + (n+1)
+      irl  = iju +   n
+      jrl  = irl +   n
+      jl   = jrl +   n
+c
+c  ******  reorder a if necessary, CALL nsfc if flag is set  ***********
+      if ((path-1) * (path-5) .ne. 0)  go to 5
+        max = (lratio*nsp + 1 - jl) - (n+1) - 5*n
+        jlmax = max/2
+        q     = jl   + jlmax
+        ira   = q    + (n+1)
+        jra   = ira  +   n
+        irac  = jra  +   n
+        iru   = irac +   n
+        jru   = iru  +   n
+        jutmp = jru  +   n
+        jumax = lratio*nsp  + 1 - jutmp
+        esp = max/lratio
+        if (jlmax.le.0 .or. jumax.le.0)  go to 110
+c
+        do 1 i=1,n
+          if (c(i).ne.i)  go to 2
+   1      continue
+        go to 3
+   2    ar = nsp + 1 - n
+        CALL  nroc
+     *     (n, ic, ia,ja,a, isp(il), rsp(ar), isp(iu), flag)
+        if (flag.ne.0)  go to 100
+c
+   3    CALL  nsfc
+     *     (n, r, ic, ia,ja,
+     *      jlmax, isp(il), isp(jl), isp(ijl),
+     *      jumax, isp(iu), isp(jutmp), isp(iju),
+     *      isp(q), isp(ira), isp(jra), isp(irac),
+     *      isp(irl), isp(jrl), isp(iru), isp(jru),  flag)
+        if(flag .ne. 0)  go to 100
+c  ******  move ju next to jl  *****************************************
+        jlmax = isp(ijl+n-1)
+        ju    = jl + jlmax
+        jumax = isp(iju+n-1)
+        if (jumax.le.0)  go to 5
+        do 4 j=1,jumax
+   4      isp(ju+j-1) = isp(jutmp+j-1)
+c
+c  ******  CALL remaining subroutines  *********************************
+   5  jlmax = isp(ijl+n-1)
+      ju    = jl  + jlmax
+      jumax = isp(iju+n-1)
+      l     = (ju + jumax - 2 + lratio)  /  lratio    +    1
+      lmax  = isp(il+n) - 1
+      d     = l   + lmax
+      u     = d   + n
+      row   = nsp + 1 - n
+      tmp   = row - n
+      umax  = tmp - u
+      esp   = umax - (isp(iu+n) - 1)
+c
+      if ((path-1) * (path-2) .ne. 0)  go to 6
+        if (umax.lt.0)  go to 110
+        CALL nnfc
+     *     (n,  r, c, ic,  ia, ja, a, z, b,
+     *      lmax, isp(il), isp(jl), isp(ijl), rsp(l),  rsp(d),
+     *      umax, isp(iu), isp(ju), isp(iju), rsp(u),
+     *      rsp(row), rsp(tmp),  isp(irl), isp(jrl),  flag)
+        if(flag .ne. 0)  go to 100
+c
+   6  if ((path-3) .ne. 0)  go to 7
+        CALL nnsc
+     *     (n,  r, c,  isp(il), isp(jl), isp(ijl), rsp(l),
+     *      rsp(d),    isp(iu), isp(ju), isp(iju), rsp(u),
+     *      z, b,  rsp(tmp))
+c
+   7  if ((path-4) .ne. 0)  go to 8
+        CALL nntc
+     *     (n,  r, c,  isp(il), isp(jl), isp(ijl), rsp(l),
+     *      rsp(d),    isp(iu), isp(ju), isp(iju), rsp(u),
+     *      z, b,  rsp(tmp))
+   8  return
+c
+c ** error.. error detected in nroc, nsfc, nnfc, or nnsc
+ 100  return
+c ** error.. insufficient storage
+ 110  flag = 10*n + 1
+      return
+c ** error.. illegal path specification
+ 111  flag = 11*n + 1
+      return
+      end
+      subroutine prep (neq, y, yh, savf, ewt, ftem, ia, ja,
+     1                     wk, iwk, ipper, f, jac)
+clll. optimize
+      external f,jac
+      integer neq(*), ia(*), ja(*), iwk(*), ipper
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, ibr, ier, ipil, ipiu, iptt1, iptt2, j, jfound, k,
+     1   knew, kmax, kmin, ldif, lenigp, liwk, maxg, np1, nzsut
+      KPP_REAL y(*), yh(*), savf(*), ewt(*), ftem(*), wk(*)
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL con0, conmin, ccmxj, psmall, rbig, seth
+      KPP_REAL dq, dyj, erwt, fac, yj, JJJ(n,n)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ con0, conmin, ccmxj, psmall, rbig, seth,
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c this routine performs preprocessing related to the sparse linear
+c systems that must be solved if miter = 1 or 2.
+c the operations that are performed here are..
+c  * compute sparseness structure of jacobian according to moss,
+c  * compute grouping of column indices (miter = 2),
+c  * compute a new ordering of rows and columns of the matrix,
+c  * reorder ja corresponding to the new ordering,
+c  * perform a symbolic lu factorization of the matrix, and
+c  * set pointers for segments of the iwk/wk array.
+c in addition to variables described previously, prep uses the
+c following for communication..
+c yh     = the history array.  only the first column, containing the
+c          current y vector, is used.  used only if moss .ne. 0.
+c savf   = a work array of length neq, used only if moss .ne. 0.
+c ewt    = array of length neq containing (inverted) error weights.
+c          used only if moss = 2 or if istate = moss = 1.
+c ftem   = a work array of length neq, identical to acor in the driver,
+c          used only if moss = 2.
+c wk     = a real work array of length lenwk, identical to wm in
+c          the driver.
+c iwk    = integer work array, assumed to occupy the same space as wk.
+c lenwk  = the length of the work arrays wk and iwk.
+c istatc = a copy of the driver input argument istate (= 1 on the
+c          first call, = 3 on a continuation call).
+c iys    = flag value from odrv or cdrv.
+c ipper  = output error flag with the following values and meanings..
+c          0  no error.
+c         -1  insufficient storage for internal structure pointers.
+c         -2  insufficient storage for jgroup.
+c         -3  insufficient storage for odrv.
+c         -4  other error flag from odrv (should never occur).
+c         -5  insufficient storage for cdrv.
+c         -6  other error flag from cdrv.
+c-----------------------------------------------------------------------
+      ibian = lrat*2
+      ipian = ibian + 1
+      np1 = n + 1
+      ipjan = ipian + np1
+      ibjan = ipjan - 1
+      liwk = lenwk*lrat
+      if (ipjan+n-1 .gt. liwk) go to 210
+      if (moss .eq. 0) go to 30
+c
+      if (istatc .eq. 3) go to 20
+c istate = 1 and moss .ne. 0.  perturb y for structure determination. --
+      do 10 i = 1,n
+        erwt = 1.0d0/ewt(i)
+        fac = 1.0d0 + 1.0d0/(dfloat(i)+1.0d0)
+        y(i) = y(i) + fac*DSIGN(erwt,y(i))
+ 10     continue
+      go to (70, 100), moss
+c
+ 20   continue
+c istate = 3 and moss .ne. 0.  load y from yh(*,1). --------------------
+      do 25 i = 1,n
+ 25     y(i) = yh(i)
+      go to (70, 100), moss
+c
+c moss = 0.  process user-s ia,ja.  add diagonal entries if necessary. -
+ 30   knew = ipjan
+      kmin = ia(1)
+      iwk(ipian) = 1
+      do 60 j = 1,n
+        jfound = 0
+        kmax = ia(j+1) - 1
+        if (kmin .gt. kmax) go to 45
+        do 40 k = kmin,kmax
+          i = ja(k)
+          if (i .eq. j) jfound = 1
+          if (knew .gt. liwk) go to 210
+          iwk(knew) = i
+          knew = knew + 1
+ 40       continue
+        if (jfound .eq. 1) go to 50
+ 45     if (knew .gt. liwk) go to 210
+        iwk(knew) = j
+        knew = knew + 1
+ 50     iwk(ipian+j) = knew + 1 - ipjan
+        kmin = kmax + 1
+ 60     continue
+      go to 140
+c
+c moss = 1.  compute structure from user-supplied jacobian routine jac.
+ 70   continue
+c a dummy CALL to f allows user to create temporaries for use in jac. --
+      CALL f (neq, tn, y, savf)
+      k = ipjan
+      iwk(ipian) = 1
+      call jac_chem (neq, tn, y, JJJ, j, iwk(ipian), iwk(ipjan))
+      do 90 j = 1,n
+        if (k .gt. liwk) go to 210
+        iwk(k) = j
+        k = k + 1
+        do 75 i = 1,n
+ 75       savf(i) = 0.0d0
+C        call jac_chem (neq, tn, y, j, iwk(ipian), iwk(ipjan), savf)
+        do i=1,n
+           savf(i) = JJJ(i,j)
+        end do
+        do 80 i = 1,n
+          if (dabs(savf(i)) .le. seth) go to 80
+          if (i .eq. j) go to 80
+          if (k .gt. liwk) go to 210
+          iwk(k) = i
+          k = k + 1
+ 80       continue
+        iwk(ipian+j) = k + 1 - ipjan
+ 90     continue
+      go to 140
+c
+c moss = 2.  compute structure from results of n + 1 calls to f. -------
+ 100  k = ipjan
+      iwk(ipian) = 1
+      CALL f (neq, tn, y, savf)
+      do 120 j = 1,n
+        if (k .gt. liwk) go to 210
+        iwk(k) = j
+        k = k + 1
+        yj = y(j)
+        erwt = 1.0d0/ewt(j)
+        dyj = DSIGN(erwt,yj)
+        y(j) = yj + dyj
+        CALL f (neq, tn, y, ftem)
+        y(j) = yj
+        do 110 i = 1,n
+          dq = (ftem(i) - savf(i))/dyj
+          if (dabs(dq) .le. seth) go to 110
+          if (i .eq. j) go to 110
+          if (k .gt. liwk) go to 210
+          iwk(k) = i
+          k = k + 1
+ 110      continue
+        iwk(ipian+j) = k + 1 - ipjan
+ 120    continue
+c
+ 140  continue
+      if (moss .eq. 0 .or. istatc .ne. 1) go to 150
+c if istate = 1 and moss .ne. 0, restore y from yh. --------------------
+      do 145 i = 1,n
+ 145    y(i) = yh(i)
+ 150  nnz = iwk(ipian+n) - 1
+      lenigp = 0
+      ipigp = ipjan + nnz
+      if (miter .ne. 2) go to 160
+c
+c compute grouping of column indices (miter = 2). ----------------------
+      maxg = np1
+      ipjgp = ipjan + nnz
+      ibjgp = ipjgp - 1
+      ipigp = ipjgp + n
+      iptt1 = ipigp + np1
+      iptt2 = iptt1 + n
+      lreq = iptt2 + n - 1
+      if (lreq .gt. liwk) go to 220
+      CALL jgroup (n, iwk(ipian), iwk(ipjan), maxg, ngp, iwk(ipigp),
+     1   iwk(ipjgp), iwk(iptt1), iwk(iptt2), ier)
+      if (ier .ne. 0) go to 220
+      lenigp = ngp + 1
+c
+c compute new ordering of rows/columns of jacobian. --------------------
+ 160  ipr = ipigp + lenigp
+      ipc = ipr
+      ipic = ipc + n
+      ipisp = ipic + n
+      iprsp = (ipisp - 2)/lrat + 2
+      iesp = lenwk + 1 - iprsp
+      if (iesp .lt. 0) go to 230
+      ibr = ipr - 1
+      do 170 i = 1,n
+ 170    iwk(ibr+i) = i
+      nsp = liwk + 1 - ipisp
+      CALL odrv (n, iwk(ipian), iwk(ipjan), wk, iwk(ipr), iwk(ipic),
+     1   nsp, iwk(ipisp), 1, iys)
+      if (iys .eq. 11*n+1) go to 240
+      if (iys .ne. 0) go to 230
+c
+c reorder jan and do symbolic lu factorization of matrix. --------------
+      ipa = lenwk + 1 - nnz
+      nsp = ipa - iprsp
+      lreq = max0(12*n/lrat, 6*n/lrat+2*n+nnz) + 3
+      lreq = lreq + iprsp - 1 + nnz
+      if (lreq .gt. lenwk) go to 250
+      iba = ipa - 1
+      do 180 i = 1,nnz
+ 180    wk(iba+i) = 0.0d0
+      ipisp = lrat*(iprsp - 1) + 1
+      CALL cdrv (n,iwk(ipr),iwk(ipc),iwk(ipic),iwk(ipian),iwk(ipjan),
+     1   wk(ipa),wk(ipa),wk(ipa),nsp,iwk(ipisp),wk(iprsp),iesp,5,iys)
+      lreq = lenwk - iesp
+      if (iys .eq. 10*n+1) go to 250
+      if (iys .ne. 0) go to 260
+      ipil = ipisp
+      ipiu = ipil + 2*n + 1
+      nzu = iwk(ipil+n) - iwk(ipil)
+      nzl = iwk(ipiu+n) - iwk(ipiu)
+      if (lrat .gt. 1) go to 190
+      CALL adjlr (n, iwk(ipisp), ldif)
+      lreq = lreq + ldif
+ 190  continue
+      if (lrat .eq. 2 .and. nnz .eq. n) lreq = lreq + 1
+      nsp = nsp + lreq - lenwk
+      ipa = lreq + 1 - nnz
+      iba = ipa - 1
+      ipper = 0
+      return
+c
+ 210  ipper = -1
+      lreq = 2 + (2*n + 1)/lrat
+      lreq = max0(lenwk+1,lreq)
+      return
+c
+ 220  ipper = -2
+      lreq = (lreq - 1)/lrat + 1
+      return
+c
+ 230  ipper = -3
+      CALL cntnzu (n, iwk(ipian), iwk(ipjan), nzsut)
+      lreq = lenwk - iesp + (3*n + 4*nzsut - 1)/lrat + 1
+      return
+c
+ 240  ipper = -4
+      return
+c
+ 250  ipper = -5
+      return
+c
+ 260  ipper = -6
+      lreq = lenwk
+      return
+c----------------------- end of subroutine prep ------------------------
+      end
+      subroutine cntnzu (n, ia, ja, nzsut)
+      integer n, ia, ja, nzsut
+      dimension ia(1), ja(1)
+c-----------------------------------------------------------------------
+c this routine counts the number of nonzero elements in the strict
+c upper triangle of the matrix m + m(transpose), where the sparsity
+c structure of m is given by pointer arrays ia and ja.
+c this is needed to compute the storage requirements for the
+c sparse matrix reordering operation in odrv.
+c-----------------------------------------------------------------------
+      integer ii, jj, j, jmin, jmax, k, kmin, kmax, num
+c
+      num = 0
+      do 50 ii = 1,n
+        jmin = ia(ii)
+        jmax = ia(ii+1) - 1
+        if (jmin .gt. jmax) go to 50
+        do 40 j = jmin,jmax
+          if (ja(j) - ii) 10, 40, 30
+ 10       jj =ja(j)
+          kmin = ia(jj)
+          kmax = ia(jj+1) - 1
+          if (kmin .gt. kmax) go to 30
+          do 20 k = kmin,kmax
+            if (ja(k) .eq. ii) go to 40
+ 20         continue
+ 30       num = num + 1
+ 40       continue
+ 50     continue
+      nzsut = num
+      return
+c----------------------- end of subroutine cntnzu ----------------------
+      end
+      subroutine nntc
+     *     (n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, z, b, tmp)
+clll. optimize
+c*** subroutine nntc
+c*** numeric solution of the transpose of a sparse nonsymmetric system
+c      of linear equations given lu-factorization (compressed pointer
+c      storage)
+c
+c
+c       input variables..  n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, b
+c       output variables.. z
+c
+c       parameters used internally..
+c fia   - tmp   - temporary vector which gets result of solving ut y = b
+c       -           size = n.
+c
+c  internal variables..
+c    jmin, jmax - indices of the first and last positions in a row of
+c      u or l  to be used.
+c
+      integer r(1), c(1), il(1), jl(1), ijl(1), iu(1), ju(1), iju(1)
+      KPP_REAL l(1), d(1), u(1), b(1), z(1), tmp(1), tmpk,sum
+c
+c  ******  set tmp to reordered b  *************************************
+      do 1 k=1,n
+   1    tmp(k) = b(c(k))
+c  ******  solve  ut y = b  by forward substitution  *******************
+      do 3 k=1,n
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        tmpk = -tmp(k)
+        if (jmin .gt. jmax) go to 3
+        mu = iju(k) - jmin
+        do 2 j=jmin,jmax
+   2      tmp(ju(mu+j)) = tmp(ju(mu+j)) + tmpk * u(j)
+   3    continue
+c  ******  solve  lt x = y  by back substitution  **********************
+      k = n
+      do 6 i=1,n
+        sum = -tmp(k)
+        jmin = il(k)
+        jmax = il(k+1) - 1
+        if (jmin .gt. jmax) go to 5
+        ml = ijl(k) - jmin
+        do 4 j=jmin,jmax
+   4      sum = sum + l(j) * tmp(jl(ml+j))
+   5    tmp(k) = -sum * d(k)
+        z(r(k)) = tmp(k)
+        k = k - 1
+   6    continue
+      return
+      end
+      subroutine nnsc
+     *     (n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, z, b, tmp)
+clll. optimize
+c*** subroutine nnsc
+c*** numerical solution of sparse nonsymmetric system of linear
+c      equations given ldu-factorization (compressed pointer storage)
+c
+c
+c       input variables..  n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, b
+c       output variables.. z
+c
+c       parameters used internally..
+c fia   - tmp   - temporary vector which gets result of solving  ly = b.
+c       -           size = n.
+c
+c  internal variables..
+c    jmin, jmax - indices of the first and last positions in a row of
+c      u or l  to be used.
+c
+      integer r(1), c(1), il(1), jl(1), ijl(1), iu(1), ju(1), iju(1)
+      KPP_REAL  l(1), d(1), u(1), b(1), z(1), tmp(1), tmpk,sum
+c
+c  ******  set tmp to reordered b  *************************************
+      do 1 k=1,n
+   1    tmp(k) = b(r(k))
+c  ******  solve  ly = b  by forward substitution  *********************
+      do 3 k=1,n
+        jmin = il(k)
+        jmax = il(k+1) - 1
+        tmpk = -d(k) * tmp(k)
+        tmp(k) = -tmpk
+        if (jmin .gt. jmax) go to 3
+        ml = ijl(k) - jmin
+        do 2 j=jmin,jmax
+   2      tmp(jl(ml+j)) = tmp(jl(ml+j)) + tmpk * l(j)
+   3    continue
+c  ******  solve  ux = y  by back substitution  ************************
+      k = n
+      do 6 i=1,n
+        sum = -tmp(k)
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        if (jmin .gt. jmax) go to 5
+        mu = iju(k) - jmin
+        do 4 j=jmin,jmax
+   4      sum = sum + u(j) * tmp(ju(mu+j))
+   5    tmp(k) = -sum
+        z(c(k)) = -sum
+        k = k - 1
+   6    continue
+      return
+      end
+      subroutine nroc (n, ic, ia, ja, a, jar, ar, p, flag)
+clll. optimize
+c
+c       ----------------------------------------------------------------
+c
+c               yale sparse matrix package - nonsymmetric codes
+c                    solving the system of equations mx = b
+c
+c    i.   calling sequences
+c         the coefficient matrix can be processed by an ordering routine
+c    (e.g., to reduce fillin or ensure numerical stability) before using
+c    the remaining subroutines.  if no reordering is done, then set
+c    r(i) = c(i) = ic(i) = i  for i=1,...,n.  if an ordering subroutine
+c    is used, then nroc should be used to reorder the coefficient matrix
+c    the calling sequence is --
+c        (       (matrix ordering))
+c        (nroc   (matrix reordering))
+c         nsfc   (symbolic factorization to determine where fillin will
+c                  occur during numeric factorization)
+c         nnfc   (numeric factorization into product ldu of unit lower
+c                  triangular matrix l, diagonal matrix d, and unit
+c                  upper triangular matrix u, and solution of linear
+c                  system)
+c         nnsc   (solution of linear system for additional right-hand
+c                  side using ldu factorization from nnfc)
+c    (if only one system of equations is to be solved, then the
+c    subroutine trk should be used.)
+c
+c    ii.  storage of sparse matrices
+c         the nonzero entries of the coefficient matrix m are stored
+c    row-by-row in the array a.  to identify the individual nonzero
+c    entries in each row, we need to know in which column each entry
+c    lies.  the column indices which correspond to the nonzero entries
+c    of m are stored in the array ja.  i.e., if  a(k) = m(i,j),  then
+c    ja(k) = j.  in addition, we need to know where each row starts and
+c    how long it is.  the index positions in ja and a where the rows of
+c    m begin are stored in the array ia.  i.e., if m(i,j) is the first
+c    (leftmost) entry in the i-th row and  a(k) = m(i,j),  then
+c    ia(i) = k.  moreover, the index in ja and a of the first location
+c    following the last element in the last row is stored in ia(n+1).
+c    thus, the number of entries in the i-th row is given by
+c    ia(i+1) - ia(i),  the nonzero entries of the i-th row are stored
+c    consecutively in
+c            a(ia(i)),  a(ia(i)+1),  ..., a(ia(i+1)-1),
+c    and the corresponding column indices are stored consecutively in
+c            ja(ia(i)), ja(ia(i)+1), ..., ja(ia(i+1)-1).
+c    for example, the 5 by 5 matrix
+c                ( 1. 0. 2. 0. 0.)
+c                ( 0. 3. 0. 0. 0.)
+c            m = ( 0. 4. 5. 6. 0.)
+c                ( 0. 0. 0. 7. 0.)
+c                ( 0. 0. 0. 8. 9.)
+c    would be stored as
+c               - 1  2  3  4  5  6  7  8  9
+c            ---+--------------------------
+c            ia - 1  3  4  7  8 10
+c            ja - 1  3  2  2  3  4  4  4  5
+c             a - 1. 2. 3. 4. 5. 6. 7. 8. 9.         .
+c
+c         the strict upper (lower) triangular portion of the matrix
+c    u (l) is stored in a similar fashion using the arrays  iu, ju, u
+c    (il, jl, l)  except that an additional array iju (ijl) is used to
+c    compress storage of ju (jl) by allowing some sequences of column
+c    (row) indices to used for more than one row (column)  (n.b., l is
+c    stored by columns).  iju(k) (ijl(k)) points to the starting
+c    location in ju (jl) of entries for the kth row (column).
+c    compression in ju (jl) occurs in two ways.  first, if a row
+c    (column) i was merged into the current row (column) k, and the
+c    number of elements merged in from (the tail portion of) row
+c    (column) i is the same as the final length of row (column) k, then
+c    the kth row (column) and the tail of row (column) i are identical
+c    and iju(k) (ijl(k)) points to the start of the tail.  second, if
+c    some tail portion of the (k-1)st row (column) is identical to the
+c    head of the kth row (column), then iju(k) (ijl(k)) points to the
+c    start of that tail portion.  for example, the nonzero structure of
+c    the strict upper triangular part of the matrix
+c            d 0 x x x
+c            0 d 0 x x
+c            0 0 d x 0
+c            0 0 0 d x
+c            0 0 0 0 d
+c    would be represented as
+c                - 1 2 3 4 5 6
+c            ----+------------
+c             iu - 1 4 6 7 8 8
+c             ju - 3 4 5 4
+c            iju - 1 2 4 3           .
+c    the diagonal entries of l and u are assumed to be equal to one and
+c    are not stored.  the array d contains the reciprocals of the
+c    diagonal entries of the matrix d.
+c
+c    iii. additional storage savings
+c         in nsfc, r and ic can be the same array in the calling
+c    sequence if no reordering of the coefficient matrix has been done.
+c         in nnfc, r, c, and ic can all be the same array if no
+c    reordering has been done.  if only the rows have been reordered,
+c    then c and ic can be the same array.  if the row and column
+c    orderings are the same, then r and c can be the same array.  z and
+c    row can be the same array.
+c         in nnsc or nntc, r and c can be the same array if no
+c    reordering has been done or if the row and column orderings are the
+c    same.  z and b can be the same array.  however, then b will be
+c    destroyed.
+c
+c    iv.  parameters
+c         following is a list of parameters to the programs.  names are
+c    uniform among the various subroutines.  class abbreviations are --
+c       n - integer variable
+c       f - real variable
+c       v - supplies a value to a subroutine
+c       r - returns a result from a subroutine
+c       i - used internally by a subroutine
+c       a - array
+c
+c class - parameter
+c ------+----------
+c fva   - a     - nonzero entries of the coefficient matrix m, stored
+c       -           by rows.
+c       -           size = number of nonzero entries in m.
+c fva   - b     - right-hand side b.
+c       -           size = n.
+c nva   - c     - ordering of the columns of m.
+c       -           size = n.
+c fvra  - d     - reciprocals of the diagonal entries of the matrix d.
+c       -           size = n.
+c nr    - flag  - error flag.  values and their meanings are --
+c       -            0     no errors detected
+c       -            n+k   null row in a  --  row = k
+c       -           2n+k   duplicate entry in a  --  row = k
+c       -           3n+k   insufficient storage for jl  --  row = k
+c       -           4n+1   insufficient storage for l
+c       -           5n+k   null pivot  --  row = k
+c       -           6n+k   insufficient storage for ju  --  row = k
+c       -           7n+1   insufficient storage for u
+c       -           8n+k   zero pivot  --  row = k
+c nva   - ia    - pointers to delimit the rows of a.
+c       -           size = n+1.
+c nvra  - ijl   - pointers to the first element in each column in jl,
+c       -           used to compress storage in jl.
+c       -           size = n.
+c nvra  - iju   - pointers to the first element in each row in ju, used
+c       -           to compress storage in ju.
+c       -           size = n.
+c nvra  - il    - pointers to delimit the columns of l.
+c       -           size = n+1.
+c nvra  - iu    - pointers to delimit the rows of u.
+c       -           size = n+1.
+c nva   - ja    - column numbers corresponding to the elements of a.
+c       -           size = size of a.
+c nvra  - jl    - row numbers corresponding to the elements of l.
+c       -           size = jlmax.
+c nv    - jlmax - declared dimension of jl.  jlmax must be larger than
+c       -           the number of nonzeros in the strict lower triangle
+c       -           of m plus fillin minus compression.
+c nvra  - ju    - column numbers corresponding to the elements of u.
+c       -           size = jumax.
+c nv    - jumax - declared dimension of ju.  jumax must be larger than
+c       -           the number of nonzeros in the strict upper triangle
+c       -           of m plus fillin minus compression.
+c fvra  - l     - nonzero entries in the strict lower triangular portion
+c       -           of the matrix l, stored by columns.
+c       -           size = lmax.
+c nv    - lmax  - declared dimension of l.  lmax must be larger than
+c       -           the number of nonzeros in the strict lower triangle
+c       -           of m plus fillin  (il(n+1)-1 after nsfc).
+c nv    - n     - number of variables/equations.
+c nva   - r     - ordering of the rows of m.
+c       -           size = n.
+c fvra  - u     - nonzero entries in the strict upper triangular portion
+c       -           of the matrix u, stored by rows.
+c       -           size = umax.
+c nv    - umax  - declared dimension of u.  umax must be larger than
+c       -           the number of nonzeros in the strict upper triangle
+c       -           of m plus fillin  (iu(n+1)-1 after nsfc).
+c fra   - z     - solution x.
+c       -           size = n.
+c
+c       ----------------------------------------------------------------
+c
+c*** subroutine nroc
+c*** reorders rows of a, leaving row order unchanged
+c
+c
+c       input parameters.. n, ic, ia, ja, a
+c       output parameters.. ja, a, flag
+c
+c       parameters used internally..
+c nia   - p     - at the kth step, p is a linked list of the reordered
+c       -           column indices of the kth row of a.  p(n+1) points
+c       -           to the first entry in the list.
+c       -           size = n+1.
+c nia   - jar   - at the kth step,jar contains the elements of the
+c       -           reordered column indices of a.
+c       -           size = n.
+c fia   - ar    - at the kth step, ar contains the elements of the
+c       -           reordered row of a.
+c       -           size = n.
+c
+      integer  ic(1), ia(1), ja(1), jar(1), p(1), flag
+      KPP_REAL  a(1), ar(1)
+c
+c  ******  for each nonempty row  *******************************
+      do 5 k=1,n
+        jmin = ia(k)
+        jmax = ia(k+1) - 1
+        if(jmin .gt. jmax) go to 5
+        p(n+1) = n + 1
+c  ******  insert each element in the list  *********************
+        do 3 j=jmin,jmax
+          newj = ic(ja(j))
+          i = n + 1
+   1      if(p(i) .ge. newj) go to 2
+            i = p(i)
+            go to 1
+   2      if(p(i) .eq. newj) go to 102
+          p(newj) = p(i)
+          p(i) = newj
+          jar(newj) = ja(j)
+          ar(newj) = a(j)
+   3      continue
+c  ******  replace old row in ja and a  *************************
+        i = n + 1
+        do 4 j=jmin,jmax
+          i = p(i)
+          ja(j) = jar(i)
+   4      a(j) = ar(i)
+   5    continue
+      flag = 0
+      return
+c
+c ** error.. duplicate entry in a
+ 102  flag = n + k
+      return
+      end
+      subroutine adjlr (n, isp, ldif)
+      integer n, isp, ldif
+      dimension isp(1)
+c-----------------------------------------------------------------------
+c this routine computes an adjustment, ldif, to the required
+c integer storage space in iwk (sparse matrix work space).
+c it is called only if the word length ratio is lrat = 1.
+c this is to account for the possibility that the symbolic lu phase
+c may require more storage than the numerical lu and solution phases.
+c-----------------------------------------------------------------------
+      integer ip, jlmax, jumax, lnfc, lsfc, nzlu
+c
+      ip = 2*n + 1
+c get jlmax = ijl(n) and jumax = iju(n) (sizes of jl and ju). ----------
+      jlmax = isp(ip)
+      jumax = isp(ip+ip)
+c nzlu = (size of l) + (size of u) = (il(n+1)-il(1)) + (iu(n+1)-iu(1)).
+      nzlu = isp(n+1) - isp(1) + isp(ip+n+1) - isp(ip+1)
+      lsfc = 12*n + 3 + 2*max0(jlmax,jumax)
+      lnfc = 9*n + 2 + jlmax + jumax + nzlu
+      ldif = max0(0, lsfc - lnfc)
+      return
+c----------------------- end of subroutine adjlr -----------------------
+      end
+      subroutine odrv
+     *     (n, ia,ja,a, p,ip, nsp,isp, path, flag)
+clll. optimize
+c                                                                 5/2/83
+c***********************************************************************
+c  odrv -- driver for sparse matrix reordering routines
+c***********************************************************************
+c
+c  description
+c
+c    odrv finds a minimum degree ordering of the rows and columns
+c    of a matrix m stored in (ia,ja,a) format (see below).  for the
+c    reordered matrix, the work and storage required to perform
+c    gaussian elimination is (usually) significantly less.
+c
+c    note.. odrv and its subordinate routines have been modified to
+c    compute orderings for general matrices, not necessarily having any
+c    symmetry.  the miminum degree ordering is computed for the
+c    structure of the symmetric matrix  m + m-transpose.
+c    modifications to the original odrv module have been made in
+c    the coding in subroutine mdi, and in the initial comments in
+c    subroutines odrv and md.
+c
+c    if only the nonzero entries in the upper triangle of m are being
+c    stored, then odrv symmetrically reorders (ia,ja,a), (optionally)
+c    with the diagonal entries placed first in each row.  this is to
+c    ensure that if m(i,j) will be in the upper triangle of m with
+c    respect to the new ordering, then m(i,j) is stored in row i (and
+c    thus m(j,i) is not stored),  whereas if m(i,j) will be in the
+c    strict lower triangle of m, then m(j,i) is stored in row j (and
+c    thus m(i,j) is not stored).
+c
+c
+c  storage of sparse matrices
+c
+c    the nonzero entries of the matrix m are stored row-by-row in the
+c    array a.  to identify the individual nonzero entries in each row,
+c    we need to know in which column each entry lies.  these column
+c    indices are stored in the array ja.  i.e., if  a(k) = m(i,j),  then
+c    ja(k) = j.  to identify the individual rows, we need to know where
+c    each row starts.  these row pointers are stored in the array ia.
+c    i.e., if m(i,j) is the first nonzero entry (stored) in the i-th row
+c    and  a(k) = m(i,j),  then  ia(i) = k.  moreover, ia(n+1) points to
+c    the first location following the last element in the last row.
+c    thus, the number of entries in the i-th row is  ia(i+1) - ia(i),
+c    the nonzero entries in the i-th row are stored consecutively in
+c
+c            a(ia(i)),  a(ia(i)+1),  ..., a(ia(i+1)-1),
+c
+c    and the corresponding column indices are stored consecutively in
+c
+c            ja(ia(i)), ja(ia(i)+1), ..., ja(ia(i+1)-1).
+c
+c    since the coefficient matrix is symmetric, only the nonzero entries
+c    in the upper triangle need be stored.  for example, the matrix
+c
+c             ( 1  0  2  3  0 )
+c             ( 0  4  0  0  0 )
+c         m = ( 2  0  5  6  0 )
+c             ( 3  0  6  7  8 )
+c             ( 0  0  0  8  9 )
+c
+c    could be stored as
+c
+c            - 1  2  3  4  5  6  7  8  9 10 11 12 13
+c         ---+--------------------------------------
+c         ia - 1  4  5  8 12 14
+c         ja - 1  3  4  2  1  3  4  1  3  4  5  4  5
+c          a - 1  2  3  4  2  5  6  3  6  7  8  8  9
+c
+c    or (symmetrically) as
+c
+c            - 1  2  3  4  5  6  7  8  9
+c         ---+--------------------------
+c         ia - 1  4  5  7  9 10
+c         ja - 1  3  4  2  3  4  4  5  5
+c          a - 1  2  3  4  5  6  7  8  9          .
+c
+c
+c  parameters
+c
+c    n    - order of the matrix
+c
+c    ia   - integer one-dimensional array containing pointers to delimit
+c           rows in ja and a.  dimension = n+1
+c
+c    ja   - integer one-dimensional array containing the column indices
+c           corresponding to the elements of a.  dimension = number of
+c           nonzero entries in (the upper triangle of) m
+c
+c    a    - real one-dimensional array containing the nonzero entries in
+c           (the upper triangle of) m, stored by rows.  dimension =
+c           number of nonzero entries in (the upper triangle of) m
+c
+c    p    - integer one-dimensional array used to return the permutation
+c           of the rows and columns of m corresponding to the minimum
+c           degree ordering.  dimension = n
+c
+c    ip   - integer one-dimensional array used to return the inverse of
+c           the permutation returned in p.  dimension = n
+c
+c    nsp  - declared dimension of the one-dimensional array isp.  nsp
+c           must be at least  3n+4k,  where k is the number of nonzeroes
+c           in the strict upper triangle of m
+c
+c    isp  - integer one-dimensional array used for working storage.
+c           dimension = nsp
+c
+c    path - integer path specification.  values and their meanings are -
+c             1  find minimum degree ordering only
+c             2  find minimum degree ordering and reorder symmetrically
+c                  stored matrix (used when only the nonzero entries in
+c                  the upper triangle of m are being stored)
+c             3  reorder symmetrically stored matrix as specified by
+c                  input permutation (used when an ordering has already
+c                  been determined and only the nonzero entries in the
+c                  upper triangle of m are being stored)
+c             4  same as 2 but put diagonal entries at start of each row
+c             5  same as 3 but put diagonal entries at start of each row
+c
+c    flag - integer error flag.  values and their meanings are -
+c               0    no errors detected
+c              9n+k  insufficient storage in md
+c             10n+1  insufficient storage in odrv
+c             11n+1  illegal path specification
+c
+c
+c  conversion from real to KPP_REAL
+c
+c    change the real declarations in odrv and sro to KPP_REAL
+c    declarations.
+c
+c-----------------------------------------------------------------------
+c
+      integer  ia(1), ja(1),  p(1), ip(1),  isp(1),  path,  flag,
+     *   v, l, head,  tmp, q
+      KPP_REAL  a(1)
+      logical  dflag
+c
+c----initialize error flag and validate path specification
+      flag = 0
+      if (path.lt.1 .or. 5.lt.path)  go to 111
+c
+c----allocate storage and find minimum degree ordering
+      if ((path-1) * (path-2) * (path-4) .ne. 0)  go to 1
+        max = (nsp-n)/2
+        v    = 1
+        l    = v     +  max
+        head = l     +  max
+        next = head  +  n
+        if (max.lt.n)  go to 110
+c
+        CALL  md
+     *     (n, ia,ja, max,isp(v),isp(l), isp(head),p,ip, isp(v), flag)
+        if (flag.ne.0)  go to 100
+c
+c----allocate storage and symmetrically reorder matrix
+   1  if ((path-2) * (path-3) * (path-4) * (path-5) .ne. 0)  go to 2
+        tmp = (nsp+1) -      n
+        q   = tmp     - (ia(n+1)-1)
+        if (q.lt.1)  go to 110
+c
+        dflag = path.eq.4 .or. path.eq.5
+        CALL sro
+     *     (n,  ip,  ia, ja, a,  isp(tmp),  isp(q),  dflag)
+c
+   2  return
+c
+c ** error -- error detected in md
+ 100  return
+c ** error -- insufficient storage
+ 110  flag = 10*n + 1
+      return
+c ** error -- illegal path specified
+ 111  flag = 11*n + 1
+      return
+      end
+      subroutine nnfc
+     *     (n, r,c,ic, ia,ja,a, z, b,
+     *      lmax,il,jl,ijl,l, d, umax,iu,ju,iju,u,
+     *      row, tmp, irl,jrl, flag)
+clll. optimize
+c*** subroutine nnfc
+c*** numerical ldu-factorization of sparse nonsymmetric matrix and
+c      solution of system of linear equations (compressed pointer
+c      storage)
+c
+c
+c       input variables..  n, r, c, ic, ia, ja, a, b,
+c                          il, jl, ijl, lmax, iu, ju, iju, umax
+c       output variables.. z, l, d, u, flag
+c
+c       parameters used internally..
+c nia   - irl,  - vectors used to find the rows of  l.  at the kth step
+c nia   - jrl       of the factorization,  jrl(k)  points to the head
+c       -           of a linked list in  jrl  of column indices j
+c       -           such j .lt. k and  l(k,j)  is nonzero.  zero
+c       -           indicates the end of the list.  irl(j)  (j.lt.k)
+c       -           points to the smallest i such that i .ge. k and
+c       -           l(i,j)  is nonzero.
+c       -           size of each = n.
+c fia   - row   - holds intermediate values in calculation of  u and l.
+c       -           size = n.
+c fia   - tmp   - holds new right-hand side  b*  for solution of the
+c       -           equation ux = b*.
+c       -           size = n.
+c
+c  internal variables..
+c    jmin, jmax - indices of the first and last positions in a row to
+c      be examined.
+c    sum - used in calculating  tmp.
+c
+      integer rk,umax
+      integer  r(1), c(1), ic(1), ia(1), ja(1), il(1), jl(1), ijl(1)
+      integer  iu(1), ju(1), iju(1), irl(1), jrl(1), flag
+      KPP_REAL  a(1), l(1), d(1), u(1), z(1), b(1), row(1)
+      KPP_REAL  tmp(1), lki, sum, dk
+c
+c  ******  initialize pointers and test storage  ***********************
+      if(il(n+1)-1 .gt. lmax) go to 104
+      if(iu(n+1)-1 .gt. umax) go to 107
+      do 1 k=1,n
+        irl(k) = il(k)
+        jrl(k) = 0
+   1    continue
+c
+c  ******  for each row  ***********************************************
+      do 19 k=1,n
+c  ******  reverse jrl and zero row where kth row of l will fill in  ***
+        row(k) = 0
+        i1 = 0
+        if (jrl(k) .eq. 0) go to 3
+        i = jrl(k)
+   2    i2 = jrl(i)
+        jrl(i) = i1
+        i1 = i
+        row(i) = 0
+        i = i2
+        if (i .ne. 0) go to 2
+c  ******  set row to zero where u will fill in  ***********************
+   3    jmin = iju(k)
+        jmax = jmin + iu(k+1) - iu(k) - 1
+        if (jmin .gt. jmax) go to 5
+        do 4 j=jmin,jmax
+   4      row(ju(j)) = 0
+c  ******  place kth row of a in row  **********************************
+   5    rk = r(k)
+        jmin = ia(rk)
+        jmax = ia(rk+1) - 1
+        do 6 j=jmin,jmax
+          row(ic(ja(j))) = a(j)
+   6      continue
+c  ******  initialize sum, and link through jrl  ***********************
+        sum = b(rk)
+        i = i1
+        if (i .eq. 0) go to 10
+c  ******  assign the kth row of l and adjust row, sum  ****************
+   7      lki = -row(i)
+c  ******  if l is not required, then comment out the following line  **
+          l(irl(i)) = -lki
+          sum = sum + lki * tmp(i)
+          jmin = iu(i)
+          jmax = iu(i+1) - 1
+          if (jmin .gt. jmax) go to 9
+          mu = iju(i) - jmin
+          do 8 j=jmin,jmax
+   8        row(ju(mu+j)) = row(ju(mu+j)) + lki * u(j)
+   9      i = jrl(i)
+          if (i .ne. 0) go to 7
+c
+c  ******  assign kth row of u and diagonal d, set tmp(k)  *************
+  10    if (row(k) .eq. 0.0d0) go to 108
+        dk = 1.0d0 / row(k)
+        d(k) = dk
+        tmp(k) = sum * dk
+        if (k .eq. n) go to 19
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        if (jmin .gt. jmax)  go to 12
+        mu = iju(k) - jmin
+        do 11 j=jmin,jmax
+  11      u(j) = row(ju(mu+j)) * dk
+  12    continue
+c
+c  ******  update irl and jrl, keeping jrl in decreasing order  ********
+        i = i1
+        if (i .eq. 0) go to 18
+  14    irl(i) = irl(i) + 1
+        i1 = jrl(i)
+        if (irl(i) .ge. il(i+1)) go to 17
+        ijlb = irl(i) - il(i) + ijl(i)
+        j = jl(ijlb)
+  15    if (i .gt. jrl(j)) go to 16
+          j = jrl(j)
+          go to 15
+  16    jrl(i) = jrl(j)
+        jrl(j) = i
+  17    i = i1
+        if (i .ne. 0) go to 14
+  18    if (irl(k) .ge. il(k+1)) go to 19
+        j = jl(ijl(k))
+        jrl(k) = jrl(j)
+        jrl(j) = k
+  19    continue
+c
+c  ******  solve  ux = tmp  by back substitution  **********************
+      k = n
+      do 22 i=1,n
+        sum =  tmp(k)
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        if (jmin .gt. jmax)  go to 21
+        mu = iju(k) - jmin
+        do 20 j=jmin,jmax
+  20      sum = sum - u(j) * tmp(ju(mu+j))
+  21    tmp(k) =  sum
+        z(c(k)) =  sum
+  22    k = k-1
+      flag = 0
+      return
+c
+c ** error.. insufficient storage for l
+ 104  flag = 4*n + 1
+      return
+c ** error.. insufficient storage for u
+ 107  flag = 7*n + 1
+      return
+c ** error.. zero pivot
+ 108  flag = 8*n + k
+      return
+      end
+      subroutine jgroup (n,ia,ja,maxg,ngrp,igp,jgp,incl,jdone,ier)
+clll. optimize
+      integer n, ia, ja, maxg, ngrp, igp, jgp, incl, jdone, ier
+      dimension ia(1), ja(1), igp(1), jgp(n), incl(n), jdone(n)
+c-----------------------------------------------------------------------
+c this subroutine constructs groupings of the column indices of
+c the jacobian matrix, used in the numerical evaluation of the
+c jacobian by finite differences.
+c
+c input..
+c n      = the order of the matrix.
+c ia,ja  = sparse structure descriptors of the matrix by rows.
+c maxg   = length of available storate in the igp array.
+c
+c output..
+c ngrp   = number of groups.
+c jgp    = array of length n containing the column indices by groups.
+c igp    = pointer array of length ngrp + 1 to the locations in jgp
+c          of the beginning of each group.
+c ier    = error indicator.  ier = 0 if no error occurred, or 1 if
+c          maxg was insufficient.
+c
+c incl and jdone are working arrays of length n.
+c-----------------------------------------------------------------------
+      integer i, j, k, kmin, kmax, ncol, ng
+c
+      ier = 0
+      do 10 j = 1,n
+ 10     jdone(j) = 0
+      ncol = 1
+      do 60 ng = 1,maxg
+        igp(ng) = ncol
+        do 20 i = 1,n
+ 20       incl(i) = 0
+        do 50 j = 1,n
+c reject column j if it is already in a group.--------------------------
+          if (jdone(j) .eq. 1) go to 50
+          kmin = ia(j)
+          kmax = ia(j+1) - 1
+          do 30 k = kmin,kmax
+c reject column j if it overlaps any column already in this group.------
+            i = ja(k)
+            if (incl(i) .eq. 1) go to 50
+ 30         continue
+c accept column j into group ng.----------------------------------------
+          jgp(ncol) = j
+          ncol = ncol + 1
+          jdone(j) = 1
+          do 40 k = kmin,kmax
+            i = ja(k)
+ 40         incl(i) = 1
+ 50       continue
+c stop if this group is empty (grouping is complete).-------------------
+        if (ncol .eq. igp(ng)) go to 70
+ 60     continue
+c error return if not all columns were chosen (maxg too small).---------
+      if (ncol .le. n) go to 80
+      ng = maxg
+ 70   ngrp = ng - 1
+      return
+ 80   ier = 1
+      return
+c----------------------- end of subroutine jgroup ----------------------
+      end
+      subroutine nsfc
+     *      (n, r, ic, ia,ja, jlmax,il,jl,ijl, jumax,iu,ju,iju,
+     *       q, ira,jra, irac, irl,jrl, iru,jru, flag)
+clll. optimize
+c*** subroutine nsfc
+c*** symbolic ldu-factorization of nonsymmetric sparse matrix
+c      (compressed pointer storage)
+c
+c
+c       input variables.. n, r, ic, ia, ja, jlmax, jumax.
+c       output variables.. il, jl, ijl, iu, ju, iju, flag.
+c
+c       parameters used internally..
+c nia   - q     - suppose  m*  is the result of reordering  m.  if
+c       -           processing of the ith row of  m*  (hence the ith
+c       -           row of  u) is being done,  q(j)  is initially
+c       -           nonzero if  m*(i,j) is nonzero (j.ge.i).  since
+c       -           values need not be stored, each entry points to the
+c       -           next nonzero and  q(n+1)  points to the first.  n+1
+c       -           indicates the end of the list.  for example, if n=9
+c       -           and the 5th row of  m*  is
+c       -              0 x x 0 x 0 0 x 0
+c       -           then  q  will initially be
+c       -              a a a a 8 a a 10 5           (a - arbitrary).
+c       -           as the algorithm proceeds, other elements of  q
+c       -           are inserted in the list because of fillin.
+c       -           q  is used in an analogous manner to compute the
+c       -           ith column of  l.
+c       -           size = n+1.
+c nia   - ira,  - vectors used to find the columns of  m.  at the kth
+c nia   - jra,      step of the factorization,  irac(k)  points to the
+c nia   - irac      head of a linked list in  jra  of row indices i
+c       -           such that i .ge. k and  m(i,k)  is nonzero.  zero
+c       -           indicates the end of the list.  ira(i)  (i.ge.k)
+c       -           points to the smallest j such that j .ge. k and
+c       -           m(i,j)  is nonzero.
+c       -           size of each = n.
+c nia   - irl,  - vectors used to find the rows of  l.  at the kth step
+c nia   - jrl       of the factorization,  jrl(k)  points to the head
+c       -           of a linked list in  jrl  of column indices j
+c       -           such j .lt. k and  l(k,j)  is nonzero.  zero
+c       -           indicates the end of the list.  irl(j)  (j.lt.k)
+c       -           points to the smallest i such that i .ge. k and
+c       -           l(i,j)  is nonzero.
+c       -           size of each = n.
+c nia   - iru,  - vectors used in a manner analogous to  irl and jrl
+c nia   - jru       to find the columns of  u.
+c       -           size of each = n.
+c
+c  internal variables..
+c    jlptr - points to the last position used in  jl.
+c    juptr - points to the last position used in  ju.
+c    jmin,jmax - are the indices in  a or u  of the first and last
+c                elements to be examined in a given row.
+c                for example,  jmin=ia(k), jmax=ia(k+1)-1.
+c
+      integer cend, qm, rend, rk, vj
+      integer ia(1), ja(1), ira(1), jra(1), il(1), jl(1), ijl(1)
+      integer iu(1), ju(1), iju(1), irl(1), jrl(1), iru(1), jru(1)
+      integer r(1), ic(1), q(1), irac(1), flag
+c
+c  ******  initialize pointers  ****************************************
+      np1 = n + 1
+      jlmin = 1
+      jlptr = 0
+      il(1) = 1
+      jumin = 1
+      juptr = 0
+      iu(1) = 1
+      do 1 k=1,n
+        irac(k) = 0
+        jra(k) = 0
+        jrl(k) = 0
+   1    jru(k) = 0
+c  ******  initialize column pointers for a  ***************************
+      do 2 k=1,n
+        rk = r(k)
+        iak = ia(rk)
+        if (iak .ge. ia(rk+1))  go to 101
+        jaiak = ic(ja(iak))
+        if (jaiak .gt. k)  go to 105
+        jra(k) = irac(jaiak)
+        irac(jaiak) = k
+   2    ira(k) = iak
+c
+c  ******  for each column of l and row of u  **************************
+      do 41 k=1,n
+c
+c  ******  initialize q for computing kth column of l  *****************
+        q(np1) = np1
+        luk = -1
+c  ******  by filling in kth column of a  ******************************
+        vj = irac(k)
+        if (vj .eq. 0)  go to 5
+   3      qm = np1
+   4      m = qm
+          qm =  q(m)
+          if (qm .lt. vj)  go to 4
+          if (qm .eq. vj)  go to 102
+            luk = luk + 1
+            q(m) = vj
+            q(vj) = qm
+            vj = jra(vj)
+            if (vj .ne. 0)  go to 3
+c  ******  link through jru  *******************************************
+   5    lastid = 0
+        lasti = 0
+        ijl(k) = jlptr
+        i = k
+   6      i = jru(i)
+          if (i .eq. 0)  go to 10
+          qm = np1
+          jmin = irl(i)
+          jmax = ijl(i) + il(i+1) - il(i) - 1
+          long = jmax - jmin
+          if (long .lt. 0)  go to 6
+          jtmp = jl(jmin)
+          if (jtmp .ne. k)  long = long + 1
+          if (jtmp .eq. k)  r(i) = -r(i)
+          if (lastid .ge. long)  go to 7
+            lasti = i
+            lastid = long
+c  ******  and merge the corresponding columns into the kth column  ****
+   7      do 9 j=jmin,jmax
+            vj = jl(j)
+   8        m = qm
+            qm = q(m)
+            if (qm .lt. vj)  go to 8
+            if (qm .eq. vj)  go to 9
+              luk = luk + 1
+              q(m) = vj
+              q(vj) = qm
+              qm = vj
+   9        continue
+            go to 6
+c  ******  lasti is the longest column merged into the kth  ************
+c  ******  see if it equals the entire kth column  *********************
+  10    qm = q(np1)
+        if (qm .ne. k)  go to 105
+        if (luk .eq. 0)  go to 17
+        if (lastid .ne. luk)  go to 11
+c  ******  if so, jl can be compressed  ********************************
+        irll = irl(lasti)
+        ijl(k) = irll + 1
+        if (jl(irll) .ne. k)  ijl(k) = ijl(k) - 1
+        go to 17
+c  ******  if not, see if kth column can overlap the previous one  *****
+  11    if (jlmin .gt. jlptr)  go to 15
+        qm = q(qm)
+        do 12 j=jlmin,jlptr
+          if (jl(j) - qm)  12, 13, 15
+  12      continue
+        go to 15
+  13    ijl(k) = j
+        do 14 i=j,jlptr
+          if (jl(i) .ne. qm)  go to 15
+          qm = q(qm)
+          if (qm .gt. n)  go to 17
+  14      continue
+        jlptr = j - 1
+c  ******  move column indices from q to jl, update vectors  ***********
+  15    jlmin = jlptr + 1
+        ijl(k) = jlmin
+        if (luk .eq. 0)  go to 17
+        jlptr = jlptr + luk
+        if (jlptr .gt. jlmax)  go to 103
+          qm = q(np1)
+          do 16 j=jlmin,jlptr
+            qm = q(qm)
+  16        jl(j) = qm
+  17    irl(k) = ijl(k)
+        il(k+1) = il(k) + luk
+c
+c  ******  initialize q for computing kth row of u  ********************
+        q(np1) = np1
+        luk = -1
+c  ******  by filling in kth row of reordered a  ***********************
+        rk = r(k)
+        jmin = ira(k)
+        jmax = ia(rk+1) - 1
+        if (jmin .gt. jmax)  go to 20
+        do 19 j=jmin,jmax
+          vj = ic(ja(j))
+          qm = np1
+  18      m = qm
+          qm = q(m)
+          if (qm .lt. vj)  go to 18
+          if (qm .eq. vj)  go to 102
+            luk = luk + 1
+            q(m) = vj
+            q(vj) = qm
+  19      continue
+c  ******  link through jrl,  ******************************************
+  20    lastid = 0
+        lasti = 0
+        iju(k) = juptr
+        i = k
+        i1 = jrl(k)
+  21      i = i1
+          if (i .eq. 0)  go to 26
+          i1 = jrl(i)
+          qm = np1
+          jmin = iru(i)
+          jmax = iju(i) + iu(i+1) - iu(i) - 1
+          long = jmax - jmin
+          if (long .lt. 0)  go to 21
+          jtmp = ju(jmin)
+          if (jtmp .eq. k)  go to 22
+c  ******  update irl and jrl, *****************************************
+            long = long + 1
+            cend = ijl(i) + il(i+1) - il(i)
+            irl(i) = irl(i) + 1
+            if (irl(i) .ge. cend)  go to 22
+              j = jl(irl(i))
+              jrl(i) = jrl(j)
+              jrl(j) = i
+  22      if (lastid .ge. long)  go to 23
+            lasti = i
+            lastid = long
+c  ******  and merge the corresponding rows into the kth row  **********
+  23      do 25 j=jmin,jmax
+            vj = ju(j)
+  24        m = qm
+            qm = q(m)
+            if (qm .lt. vj)  go to 24
+            if (qm .eq. vj)  go to 25
+              luk = luk + 1
+              q(m) = vj
+              q(vj) = qm
+              qm = vj
+  25        continue
+          go to 21
+c  ******  update jrl(k) and irl(k)  ***********************************
+  26    if (il(k+1) .le. il(k))  go to 27
+          j = jl(irl(k))
+          jrl(k) = jrl(j)
+          jrl(j) = k
+c  ******  lasti is the longest row merged into the kth  ***************
+c  ******  see if it equals the entire kth row  ************************
+  27    qm = q(np1)
+        if (qm .ne. k)  go to 105
+        if (luk .eq. 0)  go to 34
+        if (lastid .ne. luk)  go to 28
+c  ******  if so, ju can be compressed  ********************************
+        irul = iru(lasti)
+        iju(k) = irul + 1
+        if (ju(irul) .ne. k)  iju(k) = iju(k) - 1
+        go to 34
+c  ******  if not, see if kth row can overlap the previous one  ********
+  28    if (jumin .gt. juptr)  go to 32
+        qm = q(qm)
+        do 29 j=jumin,juptr
+          if (ju(j) - qm)  29, 30, 32
+  29      continue
+        go to 32
+  30    iju(k) = j
+        do 31 i=j,juptr
+          if (ju(i) .ne. qm)  go to 32
+          qm = q(qm)
+          if (qm .gt. n)  go to 34
+  31      continue
+        juptr = j - 1
+c  ******  move row indices from q to ju, update vectors  **************
+  32    jumin = juptr + 1
+        iju(k) = jumin
+        if (luk .eq. 0)  go to 34
+        juptr = juptr + luk
+        if (juptr .gt. jumax)  go to 106
+          qm = q(np1)
+          do 33 j=jumin,juptr
+            qm = q(qm)
+  33        ju(j) = qm
+  34    iru(k) = iju(k)
+        iu(k+1) = iu(k) + luk
+c
+c  ******  update iru, jru  ********************************************
+        i = k
+  35      i1 = jru(i)
+          if (r(i) .lt. 0)  go to 36
+          rend = iju(i) + iu(i+1) - iu(i)
+          if (iru(i) .ge. rend)  go to 37
+            j = ju(iru(i))
+            jru(i) = jru(j)
+            jru(j) = i
+            go to 37
+  36      r(i) = -r(i)
+  37      i = i1
+          if (i .eq. 0)  go to 38
+          iru(i) = iru(i) + 1
+          go to 35
+c
+c  ******  update ira, jra, irac  **************************************
+  38    i = irac(k)
+        if (i .eq. 0)  go to 41
+  39      i1 = jra(i)
+          ira(i) = ira(i) + 1
+          if (ira(i) .ge. ia(r(i)+1))  go to 40
+          irai = ira(i)
+          jairai = ic(ja(irai))
+          if (jairai .gt. i)  go to 40
+          jra(i) = irac(jairai)
+          irac(jairai) = i
+  40      i = i1
+          if (i .ne. 0)  go to 39
+  41    continue
+c
+      ijl(n) = jlptr
+      iju(n) = juptr
+      flag = 0
+      return
+c
+c ** error.. null row in a
+ 101  flag = n + rk
+      return
+c ** error.. duplicate entry in a
+ 102  flag = 2*n + rk
+      return
+c ** error.. insufficient storage for jl
+ 103  flag = 3*n + k
+      return
+c ** error.. null pivot
+ 105  flag = 5*n + k
+      return
+c ** error.. insufficient storage for ju
+ 106  flag = 6*n + k
+      return
+      end
+      subroutine sro
+     *     (n, ip, ia,ja,a, q, r, dflag)
+clll. optimize
+c***********************************************************************
+c  sro -- symmetric reordering of sparse symmetric matrix
+c***********************************************************************
+c
+c  description
+c
+c    the nonzero entries of the matrix m are assumed to be stored
+c    symmetrically in (ia,ja,a) format (i.e., not both m(i,j) and m(j,i)
+c    are stored if i ne j).
+c
+c    sro does not rearrange the order of the rows, but does move
+c    nonzeroes from one row to another to ensure that if m(i,j) will be
+c    in the upper triangle of m with respect to the new ordering, then
+c    m(i,j) is stored in row i (and thus m(j,i) is not stored),  whereas
+c    if m(i,j) will be in the strict lower triangle of m, then m(j,i) is
+c    stored in row j (and thus m(i,j) is not stored).
+c
+c
+c  additional parameters
+c
+c    q     - integer one-dimensional work array.  dimension = n
+c
+c    r     - integer one-dimensional work array.  dimension = number of
+c            nonzero entries in the upper triangle of m
+c
+c    dflag - logical variable.  if dflag = .true., then store nonzero
+c            diagonal elements at the beginning of the row
+c
+c-----------------------------------------------------------------------
+c
+      integer  ip(1),  ia(1), ja(1),  q(1), r(1)
+      KPP_REAL  a(1),  ak
+      logical  dflag
+c
+c
+c--phase 1 -- find row in which to store each nonzero
+c----initialize count of nonzeroes to be stored in each row
+      do 1 i=1,n
+  1     q(i) = 0
+c
+c----for each nonzero element a(j)
+      do 3 i=1,n
+        jmin = ia(i)
+        jmax = ia(i+1) - 1
+        if (jmin.gt.jmax)  go to 3
+        do 2 j=jmin,jmax
+c
+c--------find row (=r(j)) and column (=ja(j)) in which to store a(j) ...
+          k = ja(j)
+          if (ip(k).lt.ip(i))  ja(j) = i
+          if (ip(k).ge.ip(i))  k = i
+          r(j) = k
+c
+c--------... and increment count of nonzeroes (=q(r(j)) in that row
+  2       q(k) = q(k) + 1
+  3     continue
+c
+c
+c--phase 2 -- find new ia and permutation to apply to (ja,a)
+c----determine pointers to delimit rows in permuted (ja,a)
+      do 4 i=1,n
+        ia(i+1) = ia(i) + q(i)
+  4     q(i) = ia(i+1)
+c
+c----determine where each (ja(j),a(j)) is stored in permuted (ja,a)
+c----for each nonzero element (in reverse order)
+      ilast = 0
+      jmin = ia(1)
+      jmax = ia(n+1) - 1
+      j = jmax
+      do 6 jdummy=jmin,jmax
+        i = r(j)
+        if (.not.dflag .or. ja(j).ne.i .or. i.eq.ilast)  go to 5
+c
+c------if dflag, then put diagonal nonzero at beginning of row
+          r(j) = ia(i)
+          ilast = i
+          go to 6
+c
+c------put (off-diagonal) nonzero in last unused location in row
+  5       q(i) = q(i) - 1
+          r(j) = q(i)
+c
+  6     j = j-1
+c
+c
+c--phase 3 -- permute (ja,a) to upper triangular form (wrt new ordering)
+      do 8 j=jmin,jmax
+  7     if (r(j).eq.j)  go to 8
+          k = r(j)
+          r(j) = r(k)
+          r(k) = k
+          jak = ja(k)
+          ja(k) = ja(j)
+          ja(j) = jak
+          ak = a(k)
+          a(k) = a(j)
+          a(j) = ak
+          go to 7
+  8     continue
+c
+      return
+      end
+      subroutine md
+     *     (n, ia,ja, max, v,l, head,last,next, mark, flag)
+clll. optimize
+c***********************************************************************
+c  md -- minimum degree algorithm (based on element model)
+c***********************************************************************
+c
+c  description
+c
+c    md finds a minimum degree ordering of the rows and columns of a
+c    general sparse matrix m stored in (ia,ja,a) format.
+c    when the structure of m is nonsymmetric, the ordering is that
+c    obtained for the symmetric matrix  m + m-transpose.
+c
+c
+c  additional parameters
+c
+c    max  - declared dimension of the one-dimensional arrays v and l.
+c           max must be at least  n+2k,  where k is the number of
+c           nonzeroes in the strict upper triangle of m + m-transpose
+c
+c    v    - integer one-dimensional work array.  dimension = max
+c
+c    l    - integer one-dimensional work array.  dimension = max
+c
+c    head - integer one-dimensional work array.  dimension = n
+c
+c    last - integer one-dimensional array used to return the permutation
+c           of the rows and columns of m corresponding to the minimum
+c           degree ordering.  dimension = n
+c
+c    next - integer one-dimensional array used to return the inverse of
+c           the permutation returned in last.  dimension = n
+c
+c    mark - integer one-dimensional work array (may be the same as v).
+c           dimension = n
+c
+c    flag - integer error flag.  values and their meanings are -
+c             0     no errors detected
+c             9n+k  insufficient storage in md
+c
+c
+c  definitions of internal parameters
+c
+c    ---------+---------------------------------------------------------
+c    v(s)     - value field of list entry
+c    ---------+---------------------------------------------------------
+c    l(s)     - link field of list entry  (0 =) end of list)
+c    ---------+---------------------------------------------------------
+c    l(vi)    - pointer to element list of uneliminated vertex vi
+c    ---------+---------------------------------------------------------
+c    l(ej)    - pointer to boundary list of active element ej
+c    ---------+---------------------------------------------------------
+c    head(d)  - vj =) vj head of d-list d
+c             -  0 =) no vertex in d-list d
+c
+c
+c             -                  vi uneliminated vertex
+c             -          vi in ek           -       vi not in ek
+c    ---------+-----------------------------+---------------------------
+c    next(vi) - undefined but nonnegative   - vj =) vj next in d-list
+c             -                             -  0 =) vi tail of d-list
+c    ---------+-----------------------------+---------------------------
+c    last(vi) - (not set until mdp)         - -d =) vi head of d-list d
+c             --vk =) compute degree        - vj =) vj last in d-list
+c             - ej =) vi prototype of ej    -  0 =) vi not in any d-list
+c             -  0 =) do not compute degree -
+c    ---------+-----------------------------+---------------------------
+c    mark(vi) - mark(vk)                    - nonneg. tag .lt. mark(vk)
+c
+c
+c             -                   vi eliminated vertex
+c             -      ei active element      -           otherwise
+c    ---------+-----------------------------+---------------------------
+c    next(vi) - -j =) vi was j-th vertex    - -j =) vi was j-th vertex
+c             -       to be eliminated      -       to be eliminated
+c    ---------+-----------------------------+---------------------------
+c    last(vi) -  m =) size of ei = m        - undefined
+c    ---------+-----------------------------+---------------------------
+c    mark(vi) - -m =) overlap count of ei   - undefined
+c             -       with ek = m           -
+c             - otherwise nonnegative tag   -
+c             -       .lt. mark(vk)         -
+c
+c-----------------------------------------------------------------------
+c
+      integer  ia(1), ja(1),  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1),  flag,  tag, dmin, vk,ek, tail
+      equivalence  (vk,ek)
+c
+c----initialization
+      tag = 0
+      CALL  mdi
+     *   (n, ia,ja, max,v,l, head,last,next, mark,tag, flag)
+      if (flag.ne.0)  return
+c
+      k = 0
+      dmin = 1
+c
+c----while  k .lt. n  do
+   1  if (k.ge.n)  go to 4
+c
+c------search for vertex of minimum degree
+   2    if (head(dmin).gt.0)  go to 3
+          dmin = dmin + 1
+          go to 2
+c
+c------remove vertex vk of minimum degree from degree list
+   3    vk = head(dmin)
+        head(dmin) = next(vk)
+        if (head(dmin).gt.0)  last(head(dmin)) = -dmin
+c
+c------number vertex vk, adjust tag, and tag vk
+        k = k+1
+        next(vk) = -k
+        last(ek) = dmin - 1
+        tag = tag + last(ek)
+        mark(vk) = tag
+c
+c------form element ek from uneliminated neighbors of vk
+        CALL  mdm
+     *     (vk,tail, v,l, last,next, mark)
+c
+c------purge inactive elements and do mass elimination
+        CALL  mdp
+     *     (k,ek,tail, v,l, head,last,next, mark)
+c
+c------update degrees of uneliminated vertices in ek
+        CALL  mdu
+     *     (ek,dmin, v,l, head,last,next, mark)
+c
+        go to 1
+c
+c----generate inverse permutation from permutation
+   4  do 5 k=1,n
+        next(k) = -next(k)
+   5    last(next(k)) = k
+c
+      return
+      end
+      subroutine mdi
+     *     (n, ia,ja, max,v,l, head,last,next, mark,tag, flag)
+clll. optimize
+c***********************************************************************
+c  mdi -- initialization
+c***********************************************************************
+      integer  ia(1), ja(1),  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1), tag,  flag,  sfs, vi,dvi, vj
+c
+c----initialize degrees, element lists, and degree lists
+      do 1 vi=1,n
+        mark(vi) = 1
+        l(vi) = 0
+   1    head(vi) = 0
+      sfs = n+1
+c
+c----create nonzero structure
+c----for each nonzero entry a(vi,vj)
+      do 6 vi=1,n
+        jmin = ia(vi)
+        jmax = ia(vi+1) - 1
+        if (jmin.gt.jmax)  go to 6
+        do 5 j=jmin,jmax
+          vj = ja(j)
+          if (vj-vi) 2, 5, 4
+c
+c------if a(vi,vj) is in strict lower triangle
+c------check for previous occurrence of a(vj,vi)
+   2      lvk = vi
+          kmax = mark(vi) - 1
+          if (kmax .eq. 0) go to 4
+          do 3 k=1,kmax
+            lvk = l(lvk)
+            if (v(lvk).eq.vj) go to 5
+   3        continue
+c----for unentered entries a(vi,vj)
+   4        if (sfs.ge.max)  go to 101
+c
+c------enter vj in element list for vi
+            mark(vi) = mark(vi) + 1
+            v(sfs) = vj
+            l(sfs) = l(vi)
+            l(vi) = sfs
+            sfs = sfs+1
+c
+c------enter vi in element list for vj
+            mark(vj) = mark(vj) + 1
+            v(sfs) = vi
+            l(sfs) = l(vj)
+            l(vj) = sfs
+            sfs = sfs+1
+   5      continue
+   6    continue
+c
+c----create degree lists and initialize mark vector
+      do 7 vi=1,n
+        dvi = mark(vi)
+        next(vi) = head(dvi)
+        head(dvi) = vi
+        last(vi) = -dvi
+        nextvi = next(vi)
+        if (nextvi.gt.0)  last(nextvi) = vi
+   7    mark(vi) = tag
+c
+      return
+c
+c ** error-  insufficient storage
+ 101  flag = 9*n + vi
+      return
+      end
+      subroutine mdm
+     *     (vk,tail, v,l, last,next, mark)
+clll. optimize
+c***********************************************************************
+c  mdm -- form element from uneliminated neighbors of vk
+c***********************************************************************
+      integer  vk, tail,  v(1), l(1),   last(1), next(1),   mark(1),
+     *   tag, s,ls,vs,es, b,lb,vb, blp,blpmax
+      equivalence  (vs, es)
+c
+c----initialize tag and list of uneliminated neighbors
+      tag = mark(vk)
+      tail = vk
+c
+c----for each vertex/element vs/es in element list of vk
+      ls = l(vk)
+   1  s = ls
+      if (s.eq.0)  go to 5
+        ls = l(s)
+        vs = v(s)
+        if (next(vs).lt.0)  go to 2
+c
+c------if vs is uneliminated vertex, then tag and append to list of
+c------uneliminated neighbors
+          mark(vs) = tag
+          l(tail) = s
+          tail = s
+          go to 4
+c
+c------if es is active element, then ...
+c--------for each vertex vb in boundary list of element es
+   2      lb = l(es)
+          blpmax = last(es)
+          do 3 blp=1,blpmax
+            b = lb
+            lb = l(b)
+            vb = v(b)
+c
+c----------if vb is untagged vertex, then tag and append to list of
+c----------uneliminated neighbors
+            if (mark(vb).ge.tag)  go to 3
+              mark(vb) = tag
+              l(tail) = b
+              tail = b
+   3        continue
+c
+c--------mark es inactive
+          mark(es) = tag
+c
+   4    go to 1
+c
+c----terminate list of uneliminated neighbors
+   5  l(tail) = 0
+c
+      return
+      end
+      subroutine mdp
+     *     (k,ek,tail, v,l, head,last,next, mark)
+clll. optimize
+c***********************************************************************
+c  mdp -- purge inactive elements and do mass elimination
+c***********************************************************************
+      integer  ek, tail,  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1),  tag, free, li,vi,lvi,evi, s,ls,es, ilp,ilpmax
+c
+c----initialize tag
+      tag = mark(ek)
+c
+c----for each vertex vi in ek
+      li = ek
+      ilpmax = last(ek)
+      if (ilpmax.le.0)  go to 12
+      do 11 ilp=1,ilpmax
+        i = li
+        li = l(i)
+        vi = v(li)
+c
+c------remove vi from degree list
+        if (last(vi).eq.0)  go to 3
+          if (last(vi).gt.0)  go to 1
+            head(-last(vi)) = next(vi)
+            go to 2
+   1        next(last(vi)) = next(vi)
+   2      if (next(vi).gt.0)  last(next(vi)) = last(vi)
+c
+c------remove inactive items from element list of vi
+   3    ls = vi
+   4    s = ls
+        ls = l(s)
+        if (ls.eq.0)  go to 6
+          es = v(ls)
+          if (mark(es).lt.tag)  go to 5
+            free = ls
+            l(s) = l(ls)
+            ls = s
+   5      go to 4
+c
+c------if vi is interior vertex, then remove from list and eliminate
+   6    lvi = l(vi)
+        if (lvi.ne.0)  go to 7
+          l(i) = l(li)
+          li = i
+c
+          k = k+1
+          next(vi) = -k
+          last(ek) = last(ek) - 1
+          go to 11
+c
+c------else ...
+c--------classify vertex vi
+   7      if (l(lvi).ne.0)  go to 9
+            evi = v(lvi)
+            if (next(evi).ge.0)  go to 9
+              if (mark(evi).lt.0)  go to 8
+c
+c----------if vi is prototype vertex, then mark as such, initialize
+c----------overlap count for corresponding element, and move vi to end
+c----------of boundary list
+                last(vi) = evi
+                mark(evi) = -1
+                l(tail) = li
+                tail = li
+                l(i) = l(li)
+                li = i
+                go to 10
+c
+c----------else if vi is duplicate vertex, then mark as such and adjust
+c----------overlap count for corresponding element
+   8            last(vi) = 0
+                mark(evi) = mark(evi) - 1
+                go to 10
+c
+c----------else mark vi to compute degree
+   9            last(vi) = -ek
+c
+c--------insert ek in element list of vi
+  10      v(free) = ek
+          l(free) = l(vi)
+          l(vi) = free
+  11    continue
+c
+c----terminate boundary list
+  12  l(tail) = 0
+c
+      return
+      end
+      subroutine mdu
+     *     (ek,dmin, v,l, head,last,next, mark)
+clll. optimize
+c***********************************************************************
+c  mdu -- update degrees of uneliminated vertices in ek
+c***********************************************************************
+      integer  ek, dmin,  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1),  tag, vi,evi,dvi, s,vs,es, b,vb, ilp,ilpmax,
+     *   blp,blpmax
+      equivalence  (vs, es)
+c
+c----initialize tag
+      tag = mark(ek) - last(ek)
+c
+c----for each vertex vi in ek
+      i = ek
+      ilpmax = last(ek)
+      if (ilpmax.le.0)  go to 11
+      do 10 ilp=1,ilpmax
+        i = l(i)
+        vi = v(i)
+        if (last(vi))  1, 10, 8
+c
+c------if vi neither prototype nor duplicate vertex, then merge elements
+c------to compute degree
+   1      tag = tag + 1
+          dvi = last(ek)
+c
+c--------for each vertex/element vs/es in element list of vi
+          s = l(vi)
+   2      s = l(s)
+          if (s.eq.0)  go to 9
+            vs = v(s)
+            if (next(vs).lt.0)  go to 3
+c
+c----------if vs is uneliminated vertex, then tag and adjust degree
+              mark(vs) = tag
+              dvi = dvi + 1
+              go to 5
+c
+c----------if es is active element, then expand
+c------------check for outmatched vertex
+   3          if (mark(es).lt.0)  go to 6
+c
+c------------for each vertex vb in es
+              b = es
+              blpmax = last(es)
+              do 4 blp=1,blpmax
+                b = l(b)
+                vb = v(b)
+c
+c--------------if vb is untagged, then tag and adjust degree
+                if (mark(vb).ge.tag)  go to 4
+                  mark(vb) = tag
+                  dvi = dvi + 1
+   4            continue
+c
+   5        go to 2
+c
+c------else if vi is outmatched vertex, then adjust overlaps but do not
+c------compute degree
+   6      last(vi) = 0
+          mark(es) = mark(es) - 1
+   7      s = l(s)
+          if (s.eq.0)  go to 10
+            es = v(s)
+            if (mark(es).lt.0)  mark(es) = mark(es) - 1
+            go to 7
+c
+c------else if vi is prototype vertex, then calculate degree by
+c------inclusion/exclusion and reset overlap count
+   8      evi = last(vi)
+          dvi = last(ek) + last(evi) + mark(evi)
+          mark(evi) = 0
+c
+c------insert vi in appropriate degree list
+   9    next(vi) = head(dvi)
+        head(dvi) = vi
+        last(vi) = -dvi
+        if (next(vi).gt.0)  last(next(vi)) = vi
+        if (dvi.lt.dmin)  dmin = dvi
+c
+  10    continue
+c
+  11  return
+      end
+      KPP_REAL FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C This routine computes the unit roundoff of the machine.
+C This is defined as the smallest positive machine number
+C u such that  1.0 + u .ne. 1.0
+C
+C Subroutines/functions called by D1MACH.. None
+C-----------------------------------------------------------------------
+      KPP_REAL U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- End of Function D1MACH ------------------------
+      END
+
+        SUBROUTINE FUNC_CHEM (N, T, V, FCT)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), FCT(NVAR)
+	KPP_REAL T,TOLD
+	INTEGER N
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V, FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE JAC_CHEM (N, T, V, JV, j, ian, jan)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), JV(NVAR,NVAR)
+	KPP_REAL T,TOLD
+        INTEGER N, j, ian(1), jan(1), ii, jj
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+
+        DO ii=1,NVAR
+          DO jj=1,NVAR
+              JV(ii,jj) = 0.D0
+          END DO
+        END DO
+        call Jac(V, FIX, RCONST, JV)
+
+        RETURN
+        END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_odessa_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_odessa_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_odessa_ddm.def	(revision 3477)
@@ -0,0 +1,42 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN FULL
+#DOUBLE ON 
+#INTFILE atm_odessa_ddm
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
+#INLINE C_GLOBAL
+extern int Autonomous;
+extern double STEPSTART;
+#ENDINLINE
+
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+
+
+#INLINE C_INIT
+        STEPMIN=0.0001;
+        STEPMAX=3600.0;
+        Autonomous = 0;
+        STEPSTART=STEPMIN;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_odessa_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_odessa_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_odessa_ddm.f	(revision 3477)
@@ -0,0 +1,4398 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      REAL*8 TIN
+C TOUT - End Time
+      REAL*8 TOUT
+C Concentrations and Sensitivities
+      REAL*8 Y(NVAR,NSENSIT+1), PARAMS(NSENSIT)
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+      INTEGER i
+
+      INTEGER LIW, LRW
+C      PARAMETER (LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+C      PARAMETER (LIW = 21 + NVAR + NSENSIT)
+C      REAL*8 RWORK(LRW)
+C      INTEGER IWORK(LIW)
+C Note: the following dynamic allocation is not standard F77 and may not work on
+C       some systems. Declare LRW, LIW parameters as above with some upper bound
+C       used for NSENSIT
+      REAL*8 RWORK(22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+      INTEGER IWORK(21 + NVAR + NSENSIT)
+
+      INTEGER IOPT(3), NEQ(2)
+
+      EXTERNAL FUNC_CHEM,JAC,DFUNC_CHEMDPAR
+
+      MF = 21    ! --- BDF plus user-supplied Jacobian
+
+      LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR
+      LIW = 21 + NVAR + NSENSIT
+
+      NEQ(1) = NVAR ! --- No. of Variables
+      NEQ(2) = NSENSIT ! --- No of parameters
+
+      ITOL=1     ! --- 1=Scalar Tolerances; 4 = VECTOR TOLERANCES
+      ITASK=1    ! --- Normal Output
+      ISTATE=1
+      IOPT(1)=1  ! --- 0= No optional parameters, 1=Optional parameters
+      IOPT(2)=1  ! --- 1=Perform sensitivity analysis; 0 if not
+      IOPT(3)=0  ! --- DFUNC_CHEMDPAR supplied by the user;
+                 ! --- 0 if finite differences are to be used
+C --- Set optional parameters
+      DO 10 i=1,LRW
+        RWORK(i) = 0.0D0
+ 10   CONTINUE
+      DO 20 i=1,LIW
+        IWORK(i) = 0
+ 20   CONTINUE
+
+      RWORK(5) = STEPMIN   ! 	THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+      RWORK(6) = STEPMAX     ! THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+      RWORK(7) = 0.0D0       ! THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+      IWORK(6) = 5000        !  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+
+      CALL ODESSA( FUNC_CHEM,DFUNC_CHEMDPAR,NEQ,Y,PARAMS,TIN,TOUT,
+     &              ITOL,RTOL,ATOL,
+     1              ITASK,ISTATE,IOPT,RWORK,LRW,IWORK,LIW,
+     &              JAC,MF)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'ODESSA: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+
+        SUBROUTINE FUNC_CHEM (N, T, V, PARAMS, FCT)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        DIMENSION V(NVAR), PARAMS(*), FCT(NVAR)
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V,  FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE DFUNC_CHEMDPAR (N, T, V, PARAMS, DFCT, JPAR)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        DIMENSION V(NVAR), PARAMS(*), DFCT(NVAR)
+	INTEGER JPAR, i
+C This setting is required for sensitivities w.r.t. initial conditions
+        DO i=1,NVAR
+	  DFCT(i) = 0.d0
+	END DO
+        RETURN
+        END
+
+        SUBROUTINE JAC (N, T, V, PARAMS, ML, MU, JV, NROWPD)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        REAL*8 V(NVAR), PARAMS(*), JV(NVAR,NVAR)
+	INTEGER ML, MU, NROWPD
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        DO i=1,NVAR
+           DO j=1,NVAR
+              JV(i,j) = 0.D0
+           END DO
+        END DO
+        CALL Jac(V,  FIX, RCONST, JV)
+        RETURN
+        END
+!
+
+C      ALGORITHM 658, COLLECTED ALGORITHMS FROM ACM.
+C      THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+C      VOL. 14, NO. 1, P.61.
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE..  LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS.  SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY DIFFERENTIA
+C     EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS SENSITIVITY ANALYSIS.
+C     SUBMITTED TO ACM TRANS. MATH. SOFTWARE, (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C PROBLEM STATEMENT..
+C
+C THE ODESSA MODIFICATION OF THE LSODE PACKAGE PROVIDES THE OPTION TO
+C CALCULATE FIRST-ORDER SENSITIVITY COEFFICIENTS FOR A SYSTEM OF STIFF
+C OR NON-STIFF EXPLICIT ORDINARY DIFFERENTIAL EQUATIONS OF THE GENERAL
+C FORM :
+C
+C                  DY/DT = F(Y,T;P)     (1)
+C
+C WHERE Y IS AN N-DIMENSIONAL DEPENDENT VARIABLE VECTOR, T IS THE
+C INDEPENDENT INTEGRATION VARIABLE, AND P IS AN NPAR-DIMENSIONAL
+C CONSTANT VECTOR. THE GOVERNING EQUATIONS FOR THE FIRST-ORDER
+C SENSITIVITY COEFFICIENTS ARE GIVEN BY :
+C
+C                  S'(T) = J(T)*S(T) + DF/DP     (2)
+C
+C WHERE
+C
+C                  S(T)  = DY(T)/DP (= SENSITIVITY FUNCTIONS)
+C                  S'(T) = D(DY(T)/DP)/DT
+C                  J(T)  = DF(Y,T;P)/DY(T) (= JACOBIAN MATRIX)
+C AND              DF/DP = DF(Y,T;P)/DP (= INHOMOGENEITY MATRIX)
+C
+C SOLUTION OF EQUATIONS (1) AND (2) PROCEEDS SIMULTANEOUSLY VIA AN
+C EXTENSION OF THE LSODE PACKAGE AS DESCRIBED IN [1].
+C----------------------------------------------------------------------
+C ACKNOWLEDGEMENT : THE FOLLOWING ODESSA PACKAGE DOCUMENTATION IS A
+C                   MODIFICATION OF THE LSODE DOCUMENTATION WHICH
+C                   ACCOMPANIES THE LSODE PACKAGE CODE.
+C----------------------------------------------------------------------
+C SUMMARY OF USAGE.
+C
+C COMMUNICATION BETWEEN THE USER AND THE ODESSA PACKAGE, FOR NORMAL
+C SITUATIONS, IS SUMMARIZED HERE. THIS SUMMARY DESCRIBES ONLY A SUBSET
+C OF THE FULL SET OF OPTIONS AVAILABLE.  SEE THE FULL DESCRIPTION FOR
+C DETAILS, INCLUDING OPTIONAL COMMUNICATION, NONSTANDARD OPTIONS,
+C AND INSTRUCTIONS FOR SPECIAL SITUATIONS.  SEE ALSO THE EXAMPLE
+C PROBLEM (WITH PROGRAM AND OUTPUT) FOLLOWING THIS SUMMARY.
+C
+C A. FIRST PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE F (N, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(N), YDOT(N), PAR(NPAR)
+C WHICH SUPPLIES THE VECTOR FUNCTION F BY LOADING YDOT(I) WITH F(I).
+C N IS THE NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS IN THE
+C ABOVE MODEL. NPAR IS THE NUMBER OF MODEL PARAMETERS FOR WHICH
+C VECTOR SENSITIVITY FUNCTIONS ARE DESIRED. YOU ARE ALSO ENCOURAGED
+C TO PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE DF (N, T, Y, PAR, DFDP, JPAR)
+C              DOUBLE PRECISION T, Y, PAR, DFDP
+C              DIMENSION Y(N), PAR(NPAR), DFDP(N)
+C              GO TO (1,...,NPAR) JPAR
+C         1    DFDP(1) = DF(1)/DP(1)
+C              .
+C              DFDP(I) = DF(I)/DP(1)
+C              .
+C              DFDP(N) = DF(N)/DP(1)
+C              RETURN
+C         2    DFDP(1) = DF(1)/DP(2)
+C              .
+C              DFDP(I) = DF(I)/DP(2)
+C              .
+C              DFDP(N) = DF(N)/DP(2)
+C              RETURN
+C         .    .
+C         .    .
+C              RETURN
+C       NPAR   DFDP(1) = DF(1)/DP(NPAR)
+C              .
+C              DFDP(I) = DF(I)/DP(NPAR)
+C              .
+C              DFDP(N) = DF(N)/DP(NPAR)
+C              RETURN
+C              END
+C ONLY NONZERO ELEMENTS NEED BE LOADED. IF THIS IS NOT FEASIBLE,
+C ODESSA WILL GENERATE THIS MATRIX INTERNALLY BY DIFFERENCE QUOTIENTS.
+C
+C B. NEXT DETERMINE (OR GUESS) WHETHER OR NOT THE PROBLEM IS STIFF.
+C STIFFNESS OCCURS WHEN THE JACOBIAN MATRIX DF/DY HAS AN EIGENVALUE
+C WHOSE REAL PART IS NEGATIVE AND LARGE IN MAGNITUDE, COMPARED TO THE
+C RECIPROCAL OF THE T SPAN OF INTEREST.  IF THE PROBLEM IS NONSTIFF,
+C USE METH = 10.  IF IT IS STIFF, USE METH = 20. THE USER IS REQUIRED
+C TO INPUT THE METHOD FLAG MF = 10*METH + MITER. THERE ARE FOUR
+C STANDARD CHOICES FOR MITER WHEN A SENSITIVITY ANALYSIS IS DESIRED,
+C AND ODESSA REQUIRES THE JACOBIAN MATRIX IN SOME FORM.
+C THIS MATRIX IS REGARDED EITHER AS FULL (MITER = 1 OR 2),
+C OR BANDED (MITER = 4 OR 5). IN THE BANDED CASE, ODESSA REQUIRES TWO
+C HALF-BANDWIDTH PARAMETERS ML AND MU.  THESE ARE, RESPECTIVELY, THE
+C WIDTHS OF THE LOWER AND UPPER PARTS OF THE BAND, EXCLUDING THE MAIN
+C DIAGONAL.  THUS THE BAND CONSISTS OF THE LOCATIONS (I,J) WITH
+C I-ML .LE. J .LE. I+MU, AND THE FULL BANDWIDTH IS ML+MU+1.
+C
+C C. YOU ARE ENCOURAGED TO SUPPLY THE JACOBIAN DIRECTLY (MF = 11, 14,
+C 21, OR 24), BUT IF THIS IS NOT FEASIBLE, ODESSA WILL COMPUTE IT
+C INTERNALLY BY DIFFERENCE QUOTIENTS (MF = 12, 15, 22, OR 25). IF YOU
+C ARE SUPPLYING THE JACOBIAN, PROVIDE A SUBROUTINE OF THE FORM..
+C         SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C         DOUBLE PRECISION T, Y, PAR, PD
+C         DIMENSION Y(N), PD(NROWPD,N), PAR(NPAR)
+C WHICH SUPPLIES DF/DY BY LOADING PD AS FOLLOWS..
+C  FOR A FULL JACOBIAN (MF = 11, OR 21), LOAD PD(I,J) WITH DF(I)/DY(J),
+C  THE PARTIAL DERIVATIVE OF F(I) WITH RESPECT TO Y(J).  (IGNORE THE
+C  ML AND MU ARGUMENTS IN THIS CASE.)
+C  FOR A BANDED JACOBIAN (MF = 14, OR 24), LOAD PD(I-J+MU+1,J) WITH
+C  DF(I)/DY(J), I.E. LOAD THE DIAGONAL LINES OF DF/DY INTO THE ROWS OF
+C  PD FROM THE TOP DOWN.
+C IN EITHER CASE, ONLY NONZERO ELEMENTS NEED BE LOADED.
+C
+C D. WRITE A MAIN PROGRAM WHICH CALLS SUBROUTINE ODESSA ONCE FOR
+C EACH POINT AT WHICH ANSWERS ARE DESIRED.  THIS SHOULD ALSO PROVIDE
+C FOR POSSIBLE USE OF LOGICAL UNIT 6 FOR OUTPUT OF ERROR MESSAGES BY
+C ODESSA.  ON THE FIRST CALL TO ODESSA, SUPPLY ARGUMENTS AS FOLLOWS..
+C F     = NAME OF SUBROUTINE FOR RIGHT-HAND SIDE VECTOR F (MODEL).
+C         THIS NAME MUST BE DECLARED EXTERNAL IN CALLING PROGRAM.
+C DF    = NAME OF SUBROUTINE FOR INHOMOGENEITY MATRIX DF/DP.
+C         IF USED (IDF = 1), THIS NAME MUST BE DECLARED EXTERNAL IN
+C         CALLING PROGRAM. IF NOT USED (IDF = 0), PASS A DUMMY NAME.
+C N     = NUMBER OF FIRST ORDER ODE-S IN MODEL; LOAD INTO NEQ(1).
+C NPAR  = NUMBER OF MODEL PARAMETERS OF INTEREST; LOAD INTO NEQ(2).
+C Y     = AN (N) BY (NPAR+1) REAL ARRAY OF INITIAL VALUES..
+C         Y(I,1) , I = 1,N , CONTAIN THE STATE, OR MODEL, DEPENDENT
+C                            VARIABLES,
+C         Y(I,J) , J = 2,NPAR , CONTAIN THE DEPENDENT SENSITIVITY
+C                               COEFFICIENTS.
+C PAR   = A REAL ARRAY OF LENGTH NPAR CONTAINING MODEL PARAMETERS
+C         OF INTEREST.
+C T     = THE INITIAL VALUE OF THE INDEPENDENT VARIABLE.
+C TOUT  = FIRST POINT WHERE OUTPUT IS DESIRED (.NE. T).
+C ITOL  = 1, 2, 3, OR 4 ACCORDING AS RTOL, ATOL (BELOW) ARE  SCALARS
+C         OR ARRAYS.
+C RTOL  = RELATIVE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C ATOL  = ABSOLUTE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C         THE ESTIMATED LOCAL ERROR IN Y(I,J) WILL BE CONTROLLED SO AS
+C         TO BE ROUGHLY LESS (IN MAGNITUDE) THAN
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL          IF ITOL = 1,
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL(I,J)     IF ITOL = 2,
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL      IF ITOL = 3, OR
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL(I,J) IF ITOL = 4.
+C         THUS THE LOCAL ERROR TEST PASSES IF, IN EACH COMPONENT,
+C         EITHER THE ABSOLUTE ERROR IS LESS THAN ATOL (OR ATOL(I,J)),
+C         OR THE RELATIVE ERROR IS LESS THAN RTOL (OR RTOL(I,J)).
+C         USE RTOL = 0.0 FOR PURE ABSOLUTE ERROR CONTROL, AND
+C         USE ATOL = 0.0 FOR PURE RELATIVE ERROR CONTROL.
+C         CAUTION.. ACTUAL (GLOBAL) ERRORS MAY EXCEED THESE LOCAL
+C         TOLERANCES, SO CHOOSE THEM CONSERVATIVELY.
+C ITASK = 1 FOR NORMAL COMPUTATION OF OUTPUT VALUES OF Y AT T = TOUT.
+C ISTATE = INTEGER FLAG (INPUT AND OUTPUT).  SET ISTATE = 1.
+C IOPT  = 0, TO INDICATE NO OPTIONAL INPUTS FOR INTEGRATION;
+C          LOAD INTO IOPT(1).
+C ISOPT = 1, TO INDICATE SENSITIVITY ANALYSIS, = 0, TO INDICATE
+C          NO SENSITIVITY ANALYSIS; LOAD INTO IOPT(2).
+C IDF   = 1, IF SUBROUTINE DF (ABOVE) IS SUPPLIED BY THE USER,
+C          = 0, OTHERWISE; LOAD INTO IOPT(3).
+C RWORK = REAL WORK ARRAY OF LENGTH AT LEAST..
+C           22 + 16*N + N**2           FOR MF = 11 OR 12,
+C           22 + 17*N + (2*ML + MU)*N  FOR MF = 14 OR 15,
+C           22 +  9*N + N**2           FOR MF = 21 OR 22,
+C           22 + 10*N + (2*ML + MU)*N  FOR MF = 24 OR 25,
+C         IF ISOPT = 0, OR..
+C           22 + 15*(NPAR+1)*N + N**2 + N           FOR MF = 11 OR 12,
+C           24 + 15*(NPAR+1)*N + (2*ML+MU+2)*N + N  FOR MF = 14 OR 15,
+C           22 + 8*(NPAR+1)*N + N**2 + N            FOR MF = 21 OR 22,
+C           24 + 8*(NPAR+1)*N + (2*ML+MU+2)*N + N   FOR MF = 24 OR 25,
+C         IF ISOPT = 1.
+C LRW   = DECLARED LENGTH OF RWORK (IN USER-S DIMENSION STATEMENT).
+C IWORK = INTEGER WORK ARRAY OF LENGTH AT LEAST..
+C          20 + N         IF ISOPT = 0,
+C          21 + N + NPAR  IF ISOPT = 1.
+C        IF MITER = 4 OR 5, INPUT IN IWORK(1),IWORK(2) THE LOWER
+C        AND UPPER HALF-BANDWIDTHS ML,MU (EXCLUDING MAIN DIAGONAL).
+C LIW  = DECLARED LENGTH OF IWORK (IN USER-S DIMENSION STATEMENT).
+C JAC  = NAME OF SUBROUTINE FOR JACOBIAN MATRIX.
+C        IF USED, THIS NAME MUST BE DECLARED EXTERNAL IN CALLING
+C        PROGRAM.  IF NOT USED, PASS A DUMMY NAME.
+C MF   = METHOD FLAG.  STANDARD VALUES FOR ISOPT = 0 ARE..
+C         10 FOR NONSTIFF (ADAMS) METHOD, NO JACOBIAN USED.
+C         21 FOR STIFF (BDF) METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         22 FOR STIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         24 FOR STIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         25 FOR STIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C        IF ISOPT = 1, MF = 10 IS ILLEGAL AND CAN BE REPLACED BY..
+C         11 FOR NONSTIFF METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         12 FOR NONSTIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         14 FOR NONSTIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         15 FOR NONSTIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C NOTE THAT THE MAIN PROGRAM MUST DECLARE ARRAYS Y, RWORK, IWORK, AND
+C POSSIBLY ATOL AND RTOL, AS WELL AS NEQ, IOPT, AND PAR IF ISOPT = 1.
+C
+C E. THE OUTPUT FROM THE FIRST CALL (OR ANY CALL) IS..
+C     Y = ARRAY OF COMPUTED VALUES OF Y(T) VECTOR.
+C     T = CORRESPONDING VALUE OF INDEPENDENT VARIABLE (NORMALLY TOUT).
+C ISTATE = 2  IF ODESSA WAS SUCCESSFUL, NEGATIVE OTHERWISE.
+C         -1 MEANS EXCESS WORK DONE ON THIS CALL (PERHAPS WRONG MF).
+C         -2 MEANS EXCESS ACCURACY REQUESTED (TOLERANCES TOO SMALL).
+C         -3 MEANS ILLEGAL INPUT DETECTED (SEE PRINTED MESSAGE).
+C         -4 MEANS REPEATED ERROR TEST FAILURES (CHECK ALL INPUTS).
+C         -5 MEANS REPEATED CONVERGENCE FAILURES (PERHAPS BAD JACOBIAN
+C            SUPPLIED OR WRONG CHOICE OF MF OR TOLERANCES).
+C         -6 MEANS ERROR WEIGHT BECAME ZERO DURING PROBLEM. (SOLUTION
+C            COMPONENT I,J VANISHED, AND ATOL OR ATOL(I,J) = 0.0)
+C
+C F. TO CONTINUE THE INTEGRATION AFTER A SUCCESSFUL RETURN, SIMPLY
+C RESET TOUT AND CALL ODESSA AGAIN. NO OTHER PARAMETERS NEED BE RESET.
+C----------------------------------------------------------------------
+C EXAMPLE PROBLEM.
+C
+C THE FOLLOWING IS A SIMPLE EXAMPLE PROBLEM, WITH THE CODING
+C NEEDED FOR ITS SOLUTION BY ODESSA.  THE PROBLEM IS FROM CHEMICAL
+C KINETICS, AND CONSISTS OF THE FOLLOWING THREE RATE EQUATIONS..
+C    DY1/DT = -PAR(1)*Y1 + PAR(2)*Y2*Y3 ; PAR(1) = .04, PAR(2) = 1.E4
+C    DY2/DT = PAR(1)*Y1 - PAR(2)*Y2*Y3 - PAR(3)*Y2**2 ; PAR(3) = 3.E7
+C    DY3/DT = PAR(3)*Y2**2
+C ON THE INTERVAL FROM T = 0.0 TO T = 4.E10, WITH INITIAL CONDITIONS
+C Y1 = 1.0, Y2 = Y3 = 0, AND S(I,J) = 0, I = 1,3, J = 1,3.
+C THE PROBLEM IS STIFF.
+C
+C THE FOLLOWING CODING KppSolveS THIS PROBLEM WITH ODESSA, USING
+C MF = 21 AND PRINTING RESULTS AT T = .4, 4., ..., 4.E10.
+C IT USES ITOL = 4 AND ATOL MUCH SMALLER FOR Y2 THAN Y1 OR Y3,
+C BECAUSE Y2 HAS MUCH SMALLER VALUES. LESS STRINGENT TOLERANCES
+C ARE ASSIGNED FOR THE SENSITIVITIES TO ACHIEVE GREATER EFFICIENCY.
+C AT THE END OF THE RUN, STATISTICAL QUANTITIES OF INTEREST ARE
+C PRINTED (SEE OPTIONAL OUTPUTS IN THE FULL DESCRIPTION BELOW).
+C
+C      DOUBLE PRECISION ATOL, RWORK, RTOL, T, TOUT, Y, PAR
+C      EXTERNAL FEX, JEX, DFEX
+C      DIMENSION Y(3,4), PAR(3), ATOL(3,4), RTOL(3,4), RWORK(130),
+C     1  IWORK(27), NEQ(2), IOPT(3)
+C      N = 3
+C      NPAR = 3
+C      NEQ(1) = N
+C      NEQ(2) = NPAR
+C      NSV = NPAR+1
+C      DO 10 I = 1,N
+C      DO 10 J = 1,NSV
+C 10     Y(I,J) = 0.0D0
+C      Y(1,1) = 1.0D0
+C      PAR(1) = 0.04D0
+C      PAR(2) = 1.0D4
+C      PAR(3) = 3.0D7
+C      T = 0.D0
+C      TOUT = .4D0
+C      ITOL = 4
+C      ATOL(1,1) = 1.D-6
+C      ATOL(2,1) = 1.D-10
+C      ATOL(3,1) = 1.D-6
+C      DO 20 I = 1,N
+C        RTOL(I,1) = 1.D-4
+C        DO 15 J = 2,NSV
+C          RTOL(I,J) = 1.D-3
+C 15       ATOL(I,J) = 1.D2 * ATOL(I,1)
+C 20   CONTINUE
+C      ITASK = 1
+C      ISTATE = 1
+C      IOPT(1) = 0
+C      IOPT(2) = 1
+C      IOPT(3) = 1
+C      LRW = 130
+C      LIW = 27
+C      MF = 21
+C      DO 60 IOUT = 1,12
+C        CALL ODESSA(FEX,DFEX,NEQ,Y,PAR,T,TOUT,ITOL,RTOL,ATOL,
+C     1    ITASK,ISTATE, IOPT,RWORK,LRW,IWORK,LIW,JEX,MF)
+C        WRITE(6,30)T,Y(1,1),Y(2,1),Y(3,1)
+C 30     FORMAT(1X,7H AT T =,E12.4,6H   Y =,3E14.6)
+C        DO 50 J = 2,NSV
+C          JPAR = J-1
+C          WRITE(6,40)JPAR,Y(1,J),Y(2,J),Y(3,J)
+C 40       FORMAT(20X,2HS(,I1,3H) =,3E14.6)
+C 50     CONTINUE
+C        IF (ISTATE .LT. 0) GO TO 80
+C 60     TOUT = TOUT*10.D0
+C      WRITE(6,70)IWORK(11),IWORK(12),IWORK(13),IWORK(19)
+C 70   FORMAT(1X,/,12H NO. STEPS =,I4,11H  NO. F-S =,I4,11H  NO. J-S =,
+C     1  I4,12H  NO. DF-S =,I4)
+C      STOP
+C 80   WRITE(6,90)ISTATE
+C 90   FORMAT(///22H ERROR HALT.. ISTATE =,I3)
+C      STOP
+C      END
+C
+C      SUBROUTINE FEX (NEQ, T, Y, PAR, YDOT)
+C      DOUBLE PRECISION T, Y, YDOT, PAR
+C      DIMENSION Y(3), YDOT(3), PAR(3)
+C      YDOT(1) = -PAR(1)*Y(1) + PAR(2)*Y(2)*Y(3)
+C      YDOT(3) = PAR(3)*Y(2)*Y(2)
+C      YDOT(2) = -YDOT(1) - YDOT(3)
+C      RETURN
+C      END
+C
+C      SUBROUTINE JEX (NEQ, T, Y, PAR, ML, MU, PD, NRPD)
+C      DOUBLE PRECISION PD, T, Y, PAR
+C      DIMENSION Y(3), PD(NRPD,3), PAR(3)
+C      PD(1,1) = -PAR(1)
+C      PD(1,2) = PAR(2)*Y(3)
+C      PD(1,3) = PAR(2)*Y(2)
+C      PD(2,1) = PAR(1)
+C      PD(2,3) = -PD(1,3)
+C      PD(3,2) = 2.D0*PAR(3)*Y(2)
+C      PD(2,2) = -PD(1,2) - PD(3,2)
+C      RETURN
+C      END
+C
+C      SUBROUTINE DFEX (NEQ, T, Y, PAR, DFDP, JPAR)
+C      DOUBLE PRECISION T, Y, PAR, DFDP
+C      DIMENSION Y(3), PAR(3), DFDP(3)
+C      GO TO (1,2,3), JPAR
+C  1   DFDP(1) = -Y(1)
+C      DFDP(2) = Y(1)
+C      RETURN
+C  2   DFDP(1) = Y(2)*Y(3)
+C      DFDP(2) = -Y(2)*Y(3)
+C      RETURN
+C  3   DFDP(2) = -Y(2)*Y(2)
+C      DFDP(3) = Y(2)*Y(2)
+C      RETURN
+C      END
+C
+C  THE OUTPUT OF THIS PROGRAM (ON A DATA GENERAL MV-8000 IN
+C  DOUBLE PRECISION IS AS FOLLOWS:
+C
+C AT T =   .4000E+00   Y =   .985173E+00   .338641E-04   .147930E-01
+C                   S(1) =  -.355914E+00   .390261E-03   .355524E+00
+C                   S(2) =   .955150E-07  -.213065E-09  -.953019E-07
+C                   S(3) =  -.158466E-10  -.529012E-12   .163756E-10
+C AT T =   .4000E+01   Y =   .905516E+00   .224044E-04   .944615E-01
+C                   S(1) =  -.187621E+01   .179197E-03   .187603E+01
+C                   S(2) =   .296093E-05  -.583104E-09  -.296034E-05
+C                   S(3) =  -.493267E-09  -.276246E-12   .493544E-09
+C AT T =   .4000E+02   Y =   .715848E+00   .918628E-05   .284143E+00
+C                   S(1) =  -.424730E+01   .459360E-04   .424726E+01
+C                   S(2) =   .137294E-04  -.235815E-09  -.137291E-04
+C                   S(3) =  -.228818E-08  -.113803E-12   .228829E-08
+C AT T =   .4000E+03   Y =   .450526E+00   .322299E-05   .549471E+00
+C                   S(1) =  -.595837E+01   .354310E-05   .595836E+01
+C                   S(2) =   .227380E-04  -.226041E-10  -.227380E-04
+C                   S(3) =  -.378971E-08  -.499501E-13   .378976E-08
+C AT T =   .4000E+04   Y =   .183185E+00   .894131E-06   .816814E+00
+C                   S(1) =  -.475006E+01  -.599504E-05   .475007E+01
+C                   S(2) =   .188089E-04   .231330E-10  -.188089E-04
+C                   S(3) =  -.313478E-08  -.187575E-13   .313480E-08
+C AT T =   .4000E+05   Y =   .389733E-01   .162133E-06   .961027E+00
+C                   S(1) =  -.157477E+01  -.276199E-05   .157477E+01
+C                   S(2) =   .628668E-05   .110026E-10  -.628670E-05
+C                   S(3) =  -.104776E-08  -.453588E-14   .104776E-08
+C AT T =   .4000E+06   Y =   .493609E-02   .198411E-07   .995064E+00
+C                   S(1) =  -.236244E+00  -.458262E-06   .236244E+00
+C                   S(2) =   .944669E-06   .183193E-11  -.944671E-06
+C                   S(3) =  -.157441E-09  -.635990E-15   .157442E-09
+C AT T =   .4000E+07   Y =   .516087E-03   .206540E-08   .999484E+00
+C                   S(1) =  -.256277E-01  -.509808E-07   .256278E-01
+C                   S(2) =   .102506E-06   .203905E-12  -.102506E-06
+C                   S(3) =  -.170825E-10  -.684002E-16   .170826E-10
+C AT T =   .4000E+08   Y =   .519314E-04   .207736E-09   .999948E+00
+C                   S(1) =  -.259316E-02  -.518029E-08   .259316E-02
+C                   S(2) =   .103726E-07   .207209E-13  -.103726E-07
+C                   S(3) =  -.172845E-11  -.691450E-17   .172845E-11
+C AT T =   .4000E+09   Y =   .544710E-05   .217885E-10   .999995E+00
+C                   S(1) =  -.271637E-03  -.541849E-09   .271638E-03
+C                   S(2) =   .108655E-08   .216739E-14  -.108655E-08
+C                   S(3) =  -.180902E-12  -.723615E-18   .180902E-12
+C AT T =   .4000E+10   Y =   .446748E-06   .178699E-11   .100000E+01
+C                   S(1) =  -.322322E-04  -.842541E-10   .322323E-04
+C                   S(2) =   .128929E-09   .337016E-15  -.128929E-09
+C                   S(3) =  -.209715E-13  -.838859E-19   .209715E-13
+C AT T =   .4000E+11   Y =  -.363960E-07  -.145584E-12   .100000E+01
+C                   S(1) =  -.164109E-06  -.429604E-11   .164113E-06
+C                   S(2) =   .656436E-12   .171842E-16  -.656451E-12
+C                   S(3) =  -.689361E-15  -.275745E-20   .689363E-15
+C
+C NO. STEPS = 340  NO. F-S = 412  NO. J-S = 343  NO. DF-S =1023
+C----------------------------------------------------------------------
+C FULL DESCRIPTION OF USER INTERFACE TO ODESSA.
+C
+C THE USER INTERFACE TO ODESSA CONSISTS OF THE FOLLOWING PARTS.
+C
+C I.  THE CALL SEQUENCE TO SUBROUTINE ODESSA, WHICH IS A DRIVER
+C     ROUTINE FOR THE KppSolveR.  THIS INCLUDES DESCRIPTIONS OF BOTH
+C     THE CALL SEQUENCE ARGUMENTS AND OF USER-SUPPLIED ROUTINES.
+C     FOLLOWING THESE DESCRIPTIONS IS A DESCRIPTION OF
+C     OPTIONAL INPUTS AVAILABLE THROUGH THE CALL SEQUENCE, AND THEN
+C     A DESCRIPTION OF OPTIONAL OUTPUTS (IN THE WORK ARRAYS).
+C
+C II.  DESCRIPTIONS OF OTHER ROUTINES IN THE ODESSA PACKAGE THAT MAY
+C     BE (OPTIONALLY) CALLED BY THE USER.  THESE PROVIDE THE ABILITY
+C     TO ALTER ERROR MESSAGE HANDLING, SAVE AND RESTORE THE INTERNAL
+C     COMMON, AND OBTAIN SPECIFIED DERIVATIVES OF THE SOLUTION Y(T).
+C
+C III. DESCRIPTIONS OF COMMON BLOCKS TO BE DECLARED IN OVERLAY
+C     OR SIMILAR ENVIRONMENTS, OR TO BE SAVED WHEN DOING AN INTERRUPT
+C     OF THE PROBLEM AND CONTINUED SOLUTION LATER.
+C
+C IV.  DESCRIPTION OF TWO SUBROUTINES IN THE ODESSA PACKAGE, EITHER OF
+C     WHICH THE USER MAY REPLACE WITH HIS OWN VERSION, IF DESIRED.
+C     THESE RELATE TO THE MEASUREMENT OF ERRORS.
+C
+C V.   GENERAL REMARKS WHICH HIGHLIGHT DIFFERENCES BETWEEN THE LSODE
+C     PACKAGE AND THE ODESSA PACKAGE.
+C----------------------------------------------------------------------
+C PART I.  CALL SEQUENCE.
+C
+C THE CALL SEQUENCE PARAMETERS USED FOR INPUT ONLY ARE..
+C    F, DF, NEQ, PAR, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, LRW, LIW,
+C    JAC, MF,
+C AND THOSE USED FOR BOTH INPUT AND OUTPUT ARE
+C    Y, T, ISTATE.
+C THE WORK ARRAYS RWORK AND IWORK ARE ALSO USED FOR CONDITIONAL AND
+C OPTIONAL INPUTS AND OPTIONAL OUTPUTS.  (THE TERM OUTPUT HERE REFERS
+C TO THE RETURN FROM SUBROUTINE ODESSA TO THE USER-S CALLING PROGRAM.)
+C
+C THE LEGALITY OF INPUT PARAMETERS WILL BE THOROUGHLY CHECKED ON THE
+C INITIAL CALL FOR THE PROBLEM, BUT NOT CHECKED THEREAFTER UNLESS A
+C CHANGE IN INPUT PARAMETERS IS FLAGGED BY ISTATE = 3 ON INPUT.
+C
+C THE DESCRIPTIONS OF THE CALL ARGUMENTS ARE AS FOLLOWS.
+C
+C F     = THE NAME OF THE USER-SUPPLIED SUBROUTINE DEFINING THE
+C         ODE MODEL. THIS SYSTEM MUST BE PUT IN THE FIRST-ORDER
+C         FORM DY/DT = F(Y,T;P), WHERE F IS A VECTOR-VALUED FUNCTION
+C         OF THE SCALAR T AND VECTORS Y, AND PAR.  SUBROUTINE F IS TO
+C         COMPUTE THE FUNCTION F.  IT IS TO HAVE THE FORM..
+C              SUBROUTINE F (NEQ, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(1), PAR(1), YDOT(1)
+C         WHERE NEQ, T, Y, AND PAR ARE INPUT, AND YDOT = F(Y,T;P)
+C         IS OUTPUT.  Y AND YDOT ARE ARRAYS OF LENGTH N (= NEQ(1)).
+C         (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C         F SHOULD NOT ALTER ARRAY Y, OR PAR(1),...,PAR(NPAR).
+C         F MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C
+C         SUBROUTINE F MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN F) AND PAR HAS LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR BELOW.
+C
+C DF    = THE NAME OF THE USER-SUPPLIED ROUTINE (IDF = 1) TO COMPUTE
+C         THE INHOMOGENEITY MATRIX, DF/DP, AS A FUNCTION OF THE SCALAR
+C         T, AND THE VECTORS Y, AND PAR. IT IS TO HAVE THE FORM
+C                SUBROUTINE DF (NEQ, T, Y, PAR, DFDP, JPAR)
+C                DOUBLE PRECISION T, Y, PAR, DFDP
+C                DIMENSION Y(1), PAR(1), DFDP(1)
+C                GO TO (1,2,...,NPAR) JPAR
+C            1   DFDP(1) = DF(1)/DP(1)
+C                .
+C                DFDP(I) = DF(I)/DP(1)
+C                .
+C                DFDP(N) = DF(N)/DP(1)
+C                RETURN
+C            2   DFDP(1) = DF(1)/DP(2)
+C                .
+C                DFDP(I) = DF(I)/DP(2)
+C                .
+C                DFDP(N) = DF(N)/DP(2)
+C                .
+C                RETURN
+C            .   .
+C            .   .
+C          NPAR  DFDP(1) = DF(1)/DP(NPAR)
+C                .
+C                DFDP(I) = DF(I)/DP(NPAR)
+C                .
+C                DFDP(N) = DF(N)/DP(NPAR)
+C                RETURN
+C                END
+C         WHERE NEQ, T, Y, PAR, AND JPAR ARE INPUT AND THE VECTOR
+C         DFDP(*,JPAR) IS TO BE LOADED WITH THE PARTIAL DERIVATIVES
+C         DF(Y,T;PAR)/DP(JPAR) ON OUTPUT. ONLY NONZERO ELEMENTS NEED
+C         BE LOADED.  T, Y, AND PAR HAVE THE SAME MEANING AS IN
+C         SUBROUTINE F. (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE).
+C
+C         DFDP(*,JPAR) IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY
+C         THE NONZERO ELEMENTS NEED BE LOADED BY DF. SUBROUTINE DF
+C         MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM IF USED.
+C         IF IDF = 0 (OR ISOPT = 0), A DUMMY ARGUMENT CAN BE USED.
+C
+C         SUBROUTINE DF MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN DF) AND PAR HAS A LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR (BELOW).
+C
+C NEQ   = THE SIZE OF THE ODE SYSTEM (NUMBER OF FIRST ORDER ORDINARY
+C         DIFFERENTIAL EQUATIONS (N) IN THE MODEL).  USED ONLY FOR
+C         INPUT.  NEQ MAY NOT BE CHANGED DURING THE PROBLEM.
+C
+C         FOR ISOPT = 0, NEQ IS NORMALLY A SCALAR.  HOWEVER, NEQ MAY
+C         BE AN ARRAY, WITH NEQ(1) SET TO THE SYSTEM SIZE (N), IN WHICH
+C         CASE THE ODESSA PACKAGE ACCESSES ONLY NEQ(1). HOWEVER,
+C         THIS PARAMETER IS PASSED AS THE NEQ ARGUMENT IN ALL CALLS
+C         TO F, DF, AND JAC.  HENCE, IF IT IS AN ARRAY, LOCATIONS
+C         NEQ(2),... MAY BE USED TO STORE OTHER INTEGER DATA AND PASS
+C         IT TO F, DF, AND/OR JAC.  FOR ISOPT = 1, NPAR MUST BE LOADED
+C         INTO NEQ(2), AND IS NOT ALLOWED TO CHANGE DURING THE PROBLEM.
+C         IN THESE CASES, SUBROUTINES F, DF, AND/OR JAC MUST INCLUDE
+C         NEQ IN A DIMENSION STATEMENT.
+C
+C Y     = A REAL ARRAY FOR THE VECTOR OF DEPENDENT VARIABLES, OF
+C         DIMENSION (N) BY (NPAR+1).  USED FOR BOTH INPUT AND
+C         OUTPUT ON THE FIRST CALL (ISTATE = 1), AND ONLY FOR
+C         OUTPUT ON OTHER CALLS. ON THE FIRST CALL, Y MUST CONTAIN
+C         THE VECTORS OF INITIAL VALUES.  ON OUTPUT, Y CONTAINS THE
+C         COMPUTED SOLUTION VECTORS, EVALUATED AT T.
+C
+C PAR   = A REAL ARRAY FOR THE VECTOR OF CONSTANT MODEL PARAMETERS
+C         OF INTEREST IN THE SENSITIVITY ANALYSIS, OF LENGTH NPAR
+C         OR MORE. PAR IS PASSED AS AN ARGUMENT IN ALL CALLS TO F,
+C         DF, AND JAC. HENCE LOCATIONS PAR(NPAR+1),... MAY BE USED
+C         TO STORE OTHER REAL DATA AND PASS IT TO F, DF, AND/OR JAC.
+C         LOCATIONS PAR(1),...,PAR(NPAR) ARE USED AS INPUT ONLY,
+C         AND MUST NOT BE CHANGED DURING THE PROBLEM.
+C
+C T     = THE INDEPENDENT VARIABLE.  ON INPUT, T IS USED ONLY ON THE
+C         FIRST CALL, AS THE INITIAL POINT OF THE INTEGRATION.
+C         ON OUTPUT, AFTER EACH CALL, T IS THE VALUE AT WHICH A
+C         COMPUTED SOLUTION Y IS EVALUATED (USUALLY THE SAME AS TOUT).
+C         ON AN ERROR RETURN, T IS THE FARTHEST POINT REACHED.
+C
+C TOUT  = THE NEXT VALUE OF T AT WHICH A COMPUTED SOLUTION IS DESIRED.
+C         USED ONLY FOR INPUT.
+C
+C         WHEN STARTING THE PROBLEM (ISTATE = 1), TOUT MAY BE EQUAL
+C         TO T FOR ONE CALL, THEN SHOULD .NE. T FOR THE NEXT CALL.
+C         FOR THE INITIAL T, AN INPUT VALUE OF TOUT .NE. T IS USED
+C         IN ORDER TO DETERMINE THE DIRECTION OF THE INTEGRATION
+C         (I.E. THE ALGEBRAIC SIGN OF THE STEP SIZES) AND THE ROUGH
+C         SCALE OF THE PROBLEM.  INTEGRATION IN EITHER DIRECTION
+C         (FORWARD OR BACKWARD IN T) IS PERMITTED.
+C
+C         IF ITASK = 2 OR 5 (ONE-STEP MODES), TOUT IS IGNORED AFTER
+C         THE FIRST CALL (I.E. THE FIRST CALL WITH TOUT .NE. T).
+C         OTHERWISE, TOUT IS REQUIRED ON EVERY CALL.
+C
+C         IF ITASK = 1, 3, OR 4, THE VALUES OF TOUT NEED NOT BE
+C         MONOTONE, BUT A VALUE OF TOUT WHICH BACKS UP IS LIMITED
+C         TO THE CURRENT INTERNAL T INTERVAL, WHOSE ENDPOINTS ARE
+C         TCUR - HU AND TCUR (SEE OPTIONAL OUTPUTS, BELOW, FOR
+C         TCUR AND HU).
+C
+C ITOL  = AN INDICATOR FOR THE TYPE OF ERROR CONTROL.  SEE
+C         DESCRIPTION BELOW UNDER ATOL.  USED ONLY FOR INPUT.
+C
+C RTOL  = A RELATIVE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  SEE DESCRIPTION BELOW
+C         UNDER ATOL. INPUT ONLY.
+C
+C ATOL  = AN ABSOLUTE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  INPUT ONLY.
+C
+C            THE INPUT PARAMETERS ITOL, RTOL, AND ATOL DETERMINE
+C         THE ERROR CONTROL PERFORMED BY THE KppSolveR.  THE KppSolveR WILL
+C         CONTROL THE VECTOR E = (E(I,J)) OF ESTIMATED LOCAL ERRORS
+C         IN Y, ACCORDING TO AN INEQUALITY OF THE FORM
+C                   RMS-NORM OF ( E(I,J)/EWT(I,J) )   .LE.   1,
+C         WHERE     EWT(I,J) = RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J),
+C         AND THE RMS-NORM (ROOT-MEAN-SQUARE NORM) HERE IS
+C         RMS-NORM(V) = SQRT ( (1/N) * SUM (V(I,J)**2) ); I =1,...,N.
+C         HERE EWT = (EWT(I,J)) IS A VECTOR OF WEIGHTS WHICH MUST
+C         ALWAYS BE POSITIVE, AND THE VALUES OF RTOL AND ATOL SHOULD
+C         ALL BE NON-NEGATIVE.  THE FOLLOWING TABLE GIVES THE TYPES
+C         (SCALAR/ARRAY) OF RTOL AND ATOL, AND THE CORRESPONDING FORM
+C         OF EWT(I,J).
+C
+C          ITOL   RTOL      ATOL           EWT(I,J)
+C           1    SCALAR    SCALAR   RTOL*ABS(Y(I,J)) + ATOL
+C           2    SCALAR    ARRAY    RTOL*ABS(Y(I,J)) + ATOL(I,J)
+C           3    ARRAY     SCALAR   RTOL(I,J)*ABS(Y(I,J)) + ATOL
+C           4    ARRAY     ARRAY    RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J)
+C
+C         WHEN EITHER OF THESE PARAMETERS IS A SCALAR, IT NEED NOT
+C         BE DIMENSIONED IN THE USER-S CALLING PROGRAM.
+C
+C         THE TOTAL NUMBER OF ERROR TEST FAILURES DUE TO THE SENSITIVITY
+C         ANALYSIS, AND WHICH REQUIRE AN INTEGRATION STEP TO BE
+C         REPEATED, ARE ACCUMULATED IN THE LAST NPAR+1 LOCATIONS OF THE
+C         INTEGER WORK ARRAY IWORK (SEE OPTIONAL OUTPUTS BELOW).
+C         THIS INFORMATION MAY BE OF VALUE IN DETERMINING APPROPRIATE
+C         ERROR TOLERANCES TO BE APPLIED TO THE SENSITIVITY FUNCTIONS.
+C
+C         IF NONE OF THE ABOVE CHOICES (WITH ITOL, RTOL, AND ATOL
+C         FIXED THROUGHOUT THE PROBLEM) IS SUITABLE, MORE GENERAL
+C         ERROR CONTROLS CAN BE OBTAINED BY SUBSTITUTING
+C         USER-SUPPLIED ROUTINES FOR THE SETTING OF EWT AND/OR FOR
+C         THE NORM CALCULATION.  SEE PART IV BELOW.
+C
+C         IF GLOBAL ERRORS ARE TO BE ESTIMATED BY MAKING A REPEATED
+C         RUN ON THE SAME PROBLEM WITH SMALLER TOLERANCES, THEN ALL
+C         COMPONENTS OF RTOL AND ATOL (I.E. OF EWT) SHOULD BE SCALED
+C         DOWN UNIFORMLY.
+C
+C ITASK  = AN INDEX SPECIFYING THE TASK TO BE PERFORMED.
+C         INPUT ONLY.  ITASK HAS THE FOLLOWING VALUES AND MEANINGS.
+C         1  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT (BY OVERSHOOTING AND INTERPOLATING).
+C         2  MEANS TAKE ONE STEP ONLY AND RETURN.
+C         3  MEANS STOP AT THE FIRST INTERNAL MESH POINT AT OR
+C            BEYOND T = TOUT AND RETURN.
+C         4  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT BUT WITHOUT OVERSHOOTING T = TCRIT.
+C            TCRIT MUST BE INPUT AS RWORK(1).  TCRIT MAY BE EQUAL TO
+C            OR BEYOND TOUT, BUT NOT BEHIND IT IN THE DIRECTION OF
+C            INTEGRATION.  THIS OPTION IS USEFUL IF THE PROBLEM
+C            HAS A SINGULARITY AT OR BEYOND T = TCRIT.
+C         5  MEANS TAKE ONE STEP, WITHOUT PASSING TCRIT, AND RETURN.
+C            TCRIT MUST BE INPUT AS RWORK(1).
+C
+C         NOTE..  IF ITASK = 4 OR 5 AND THE KppSolveR REACHES TCRIT
+C         (WITHIN ROUNDOFF), IT WILL RETURN T = TCRIT (EXACTLY) TO
+C         INDICATE THIS (UNLESS ITASK = 4 AND TOUT COMES BEFORE TCRIT,
+C         IN WHICH CASE ANSWERS AT T = TOUT ARE RETURNED FIRST).
+C
+C ISTATE = AN INDEX USED FOR INPUT AND OUTPUT TO SPECIFY THE
+C         THE STATE OF THE CALCULATION.
+C
+C         ON INPUT, THE VALUES OF ISTATE ARE AS FOLLOWS.
+C         1  MEANS THIS IS THE FIRST CALL FOR THE PROBLEM
+C            (INITIALIZATIONS WILL BE DONE).  SEE NOTE BELOW.
+C         2  MEANS THIS IS NOT THE FIRST CALL, AND THE CALCULATION
+C            IS TO CONTINUE NORMALLY, WITH NO CHANGE IN ANY INPUT
+C            PARAMETERS EXCEPT POSSIBLY TOUT AND ITASK.
+C            (IF ITOL, RTOL, AND/OR ATOL ARE CHANGED BETWEEN CALLS
+C            WITH ISTATE = 2, THE NEW VALUES WILL BE USED BUT NOT
+C            TESTED FOR LEGALITY.)
+C         3  MEANS THIS IS NOT THE FIRST CALL, AND THE
+C            CALCULATION IS TO CONTINUE NORMALLY, BUT WITH
+C            A CHANGE IN INPUT PARAMETERS OTHER THAN
+C            TOUT AND ITASK.  CHANGES ARE ALLOWED IN
+C            ITOL, RTOL, ATOL, IOPT, LRW, LIW, MF, ML, MU,
+C            AND ANY OF THE OPTIONAL INPUTS EXCEPT H0.
+C            (SEE IWORK DESCRIPTION FOR ML AND MU.)
+C         NOTE..  A PRELIMINARY CALL WITH TOUT = T IS NOT COUNTED
+C         AS A FIRST CALL HERE, AS NO INITIALIZATION OR CHECKING OF
+C         INPUT IS DONE.  (SUCH A CALL IS SOMETIMES USEFUL FOR THE
+C         PURPOSE OF OUTPUTTING THE INITIAL CONDITIONS.)
+C         THUS THE FIRST CALL FOR WHICH TOUT .NE. T REQUIRES
+C         ISTATE = 1 ON INPUT.
+C
+C         ON OUTPUT, ISTATE HAS THE FOLLOWING VALUES AND MEANINGS.
+C          1  MEANS NOTHING WAS DONE, AS TOUT WAS EQUAL TO T WITH
+C             ISTATE = 1 ON INPUT.  (HOWEVER, AN INTERNAL COUNTER WAS
+C             SET TO DETECT AND PREVENT REPEATED CALLS OF THIS TYPE.)
+C          2  MEANS THE INTEGRATION WAS PERFORMED SUCCESSFULLY.
+C         -1  MEANS AN EXCESSIVE AMOUNT OF WORK (MORE THAN MXSTEP
+C             STEPS) WAS DONE ON THIS CALL, BEFORE COMPLETING THE
+C             REQUESTED TASK, BUT THE INTEGRATION WAS OTHERWISE
+C             SUCCESSFUL AS FAR AS T.  (MXSTEP IS AN OPTIONAL INPUT
+C             AND IS NORMALLY 500.)  TO CONTINUE, THE USER MAY
+C             SIMPLY RESET ISTATE TO A VALUE .GT. 1 AND CALL AGAIN
+C             (THE EXCESS WORK STEP COUNTER WILL BE RESET TO 0).
+C             IN ADDITION, THE USER MAY INCREASE MXSTEP TO AVOID
+C             THIS ERROR RETURN (SEE BELOW ON OPTIONAL INPUTS).
+C         -2  MEANS TOO MUCH ACCURACY WAS REQUESTED FOR THE PRECISION
+C             OF THE MACHINE BEING USED.  THIS WAS DETECTED BEFORE
+C             COMPLETING THE REQUESTED TASK, BUT THE INTEGRATION
+C             WAS SUCCESSFUL AS FAR AS T.  TO CONTINUE, THE TOLERANCE
+C             PARAMETERS MUST BE RESET, AND ISTATE MUST BE SET
+C             TO 3.  THE OPTIONAL OUTPUT TOLSF MAY BE USED FOR THIS
+C             PURPOSE.  (NOTE.. IF THIS CONDITION IS DETECTED BEFORE
+C             TAKING ANY STEPS, THEN AN ILLEGAL INPUT RETURN
+C             (ISTATE = -3) OCCURS INSTEAD.)
+C         -3  MEANS ILLEGAL INPUT WAS DETECTED, BEFORE TAKING ANY
+C             INTEGRATION STEPS.  SEE WRITTEN MESSAGE FOR DETAILS.
+C             NOTE..  IF THE KppSolveR DETECTS AN INFINITE LOOP OF CALLS
+C             TO THE KppSolveR WITH ILLEGAL INPUT, IT WILL CAUSE
+C             THE RUN TO STOP.
+C         -4  MEANS THERE WERE REPEATED ERROR TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THE PROBLEM MAY HAVE A SINGULARITY, OR THE INPUT
+C             MAY BE INAPPROPRIATE.
+C         -5  MEANS THERE WERE REPEATED CONVERGENCE TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THIS MAY BE CAUSED BY AN INACCURATE JACOBIAN MATRIX,
+C             IF ONE IS BEING USED.
+C         -6  MEANS EWT(I,J) BECAME ZERO FOR SOME I,J DURING THE
+C             INTEGRATION.  PURE RELATIVE ERROR CONTROL (ATOL(I,J)=0.0)
+C             WAS REQUESTED ON A VARIABLE WHICH HAS NOW VANISHED.
+C             THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C
+C         NOTE..  SINCE THE NORMAL OUTPUT VALUE OF ISTATE IS 2,
+C         IT DOES NOT NEED TO BE RESET FOR NORMAL CONTINUATION.
+C         ALSO, SINCE A NEGATIVE INPUT VALUE OF ISTATE WILL BE
+C         REGARDED AS ILLEGAL, A NEGATIVE OUTPUT VALUE REQUIRES THE
+C         USER TO CHANGE IT, AND POSSIBLY OTHER INPUTS, BEFORE
+C         CALLING THE KppSolveR AGAIN.
+C
+C IOPT  = AN INTEGER ARRAY FLAG TO SPECIFY WHETHER OR NOT ANY OPTIONAL
+C         INPUTS ARE BEING USED ON THIS CALL.  INPUT ONLY.
+C         THE OPTIONAL INPUTS ARE LISTED SEPARATELY BELOW.
+C         IOPT(1) = 0 MEANS NO OPTIONAL INPUTS FOR THE KppSolveR WILL BE
+C                   USED. DEFAULT VALUES WILL BE USED IN ALL CASES.
+C                 = 1 MEANS ONE OR MORE OPTIONAL INPUTS FOR THE
+C                   KppSolveR ARE BEING USED.
+C                   NOTE : IOPT(1) IS INDEPENDENT OF ISOPT AND IDF.
+C         IOPT(2) = 0 MEANS NO SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                 = 1 MEANS A SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                   NOTE : IOPT(2) IS RENAMED TO ISOPT IN ODESSA.
+C                 = 0 MEANS DF/DP WILL BE CALCULATED BY FINITE
+C                   DIFFERENCE WITHIN ODESSA.
+C         IOPT(3) = 1 MEANS DF/DP WILL BE CALCULATED BY A USER-SUPPLIED
+C                   ROUTINE.
+C                   NOTE : IOPT(3) IS RENAMED TO IDF IN ODESSA.
+C                          IF IDF = 1, THE USER MUST SUPPLY A
+C                          SUBROUTINE DF (THE NAME IS ARBITRARY) AS
+C                          DESCRIBED BELOW UNDER DF. FOR IDF = 0,
+C                          A DUMMY ARGUMENT CAN BE USED.
+C
+C RWORK  = A REAL WORKING ARRAY (DOUBLE PRECISION).
+C         FOR ISOPT = 0, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 3*NEQ + LWM
+C         FOR ISOPT = 1, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 2*NYH + LWM + N
+C         WHERE..
+C         NYH    = THE TOTAL NUMBER OF DEPENDENT VARIABLES;
+C                  (= N IF ISOPT = 0, AND N*(NPAR+1) IF ISOPT = 1).
+C         MAXORD = 12 (IF METH = 1) OR 5 (IF METH = 2) (UNLESS A
+C                  SMALLER VALUE IS GIVEN AS AN OPTIONAL INPUT),
+C         LWM    = 0                  IF MITER = 0,
+C         LWM    = N**2 + 2           IF MITER IS 1 OR 2,
+C         LWM    = N + 2              IF MITER = 3, AND
+C         LWM    = (2*ML+MU+1)*N + 2  IF MITER IS 4 OR 5.
+C         (SEE THE MF DESCRIPTION FOR METH AND MITER.)
+C
+C         THE FIRST 20 WORDS OF RWORK ARE RESERVED FOR CONDITIONAL
+C         AND OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING WORD IN RWORK IS A CONDITIONAL INPUT..
+C           RWORK(1) = TCRIT = CRITICAL VALUE OF T WHICH THE KppSolveR
+C                      IS NOT TO OVERSHOOT.  REQUIRED IF ITASK IS
+C                      4 OR 5, AND IGNORED OTHERWISE.  (SEE ITASK.)
+C
+C LRW   = THE LENGTH OF THE ARRAY RWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C IWORK  = AN INTEGER WORK ARRAY. THE LENGTH MUST BE AT LEAST..
+C            20      IF MITER = 0 OR 3 (MF = 10, 13, 20, 23), OR
+C            20 + N  OTHERWISE (MF = 11, 12, 14, 15, 21, 22, 24, 25).
+C          FOR ISOPT = 0, OR..
+C            21 + N + NPAR
+C          FOR ISOPT = 1.
+C         THE FIRST FEW WORDS OF IWORK ARE USED FOR CONDITIONAL AND
+C         OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING 2 WORDS IN IWORK ARE CONDITIONAL INPUTS..
+C           IWORK(1) = ML     THESE ARE THE LOWER AND UPPER
+C           IWORK(2) = MU     HALF-BANDWIDTHS, RESPECTIVELY, OF THE
+C                      BANDED JACOBIAN, EXCLUDING THE MAIN DIAGONAL.
+C                      THE BAND IS DEFINED BY THE MATRIX LOCATIONS
+C                      (I,J) WITH I-ML .LE. J .LE. I+MU.  ML AND MU
+C                      MUST SATISFY  0 .LE.  ML,MU  .LE. NEQ-1.
+C                      THESE ARE REQUIRED IF MITER IS 4 OR 5, AND
+C                      IGNORED OTHERWISE.  ML AND MU MAY IN FACT BE
+C                      THE BAND PARAMETERS FOR A MATRIX TO WHICH
+C                      DF/DY IS ONLY APPROXIMATELY EQUAL.
+*
+C
+C LIW   = THE LENGTH OF THE ARRAY IWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C NOTE..  THE WORK ARRAYS MUST NOT BE ALTERED BETWEEN CALLS TO ODESSA
+C FOR THE SAME PROBLEM, EXCEPT POSSIBLY FOR THE CONDITIONAL AND
+C OPTIONAL INPUTS, AND EXCEPT FOR THE LAST 2*NYH + N WORDS OF RWORK.
+C THE LATTER SPACE IS USED FOR INTERNAL SCRATCH SPACE, AND SO IS
+C AVAILABLE FOR USE BY THE USER OUTSIDE ODESSA BETWEEN CALLS, IF
+C DESIRED (BUT NOT FOR USE BY F, DF, OR JAC).
+C
+C JAC   = THE NAME OF THE USER-SUPPLIED ROUTINE (MITER = 1 OR 4) TO
+C         COMPUTE THE JACOBIAN MATRIX, DF/DY, AS A FUNCTION OF THE
+C         SCALAR T AND THE VECTORS Y, AND PAR.  IT IS TO HAVE THE FORM
+C              SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C              DOUBLE PRECISION T, Y, PAR, PD
+C              DIMENSION Y(1), PAR(1), PD(NROWPD,1)
+C         WHERE NEQ, T, Y, PAR, ML, MU, AND NROWPD ARE INPUT AND THE
+C         ARRAY PD IS TO BE LOADED WITH PARTIAL DERIVATIVES (ELEMENTS
+C         OF THE JACOBIAN MATRIX) ON OUTPUT.  PD MUST BE GIVEN A FIRST
+C         DIMENSION OF NROWPD.  T, Y, AND PAR HAVE THE SAME MEANING AS
+C         IN SUBROUTINE F.  (IN THE DIMENSION STATEMENT ABOVE, 1 IS A
+C         DUMMY DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C              IN THE FULL MATRIX CASE (MITER = 1), ML AND MU ARE
+C         IGNORED, AND THE JACOBIAN IS TO BE LOADED INTO PD IN
+C         COLUMNWISE MANNER, WITH DF(I)/DY(J) LOADED INTO PD(I,J).
+C              IN THE BAND MATRIX CASE (MITER = 4), THE ELEMENTS
+C         WITHIN THE BAND ARE TO BE LOADED INTO PD IN COLUMNWISE
+C         MANNER, WITH DIAGONAL LINES OF DF/DY LOADED INTO THE ROWS
+C         OF PD.  THUS DF(I)/DY(J) IS TO BE LOADED INTO PD(I-J+MU+1,J).
+C         ML AND MU ARE THE HALF-BANDWIDTH PARAMETERS (SEE IWORK).
+C         THE LOCATIONS IN PD IN THE TWO TRIANGULAR AREAS WHICH
+C         CORRESPOND TO NONEXISTENT MATRIX ELEMENTS CAN BE IGNORED
+C         OR LOADED ARBITRARILY, AS THEY ARE OVERWRITTEN BY ODESSA.
+C              PD IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY THE
+C         NONZERO ELEMENTS NEED BE LOADED BY JAC. EACH CALL TO JAC IS
+C         PRECEDED BY A CALL TO F WITH THE SAME ARGUMENTS NEQ, T, Y,
+C         AND PAR. THUS TO GAIN SOME EFFICIENCY, INTERMEDIATE
+C         QUANTITIES SHARED BY BOTH CALCULATIONS MAY BE SAVED IN A
+C         USER COMMON BLOCK BY F AND NOT RECOMPUTED BY JAC, IF
+C         DESIRED.  ALSO, JAC MAY ALTER THE Y ARRAY, IF DESIRED.
+C         JAC MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C              SUBROUTINE JAC MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),.... SEE THE DESCRIPTIONS OF
+C         NEQ (ABOVE) AND PAR (BELOW).
+C
+C MF    = THE METHOD FLAG.  USED ONLY FOR INPUT.  THE LEGAL VALUES OF
+C         MF ARE 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, AND 25.
+C         MF HAS DECIMAL DIGITS METH AND MITER.. MF = 10*METH + MITER.
+C         METH INDICATES THE BASIC LINEAR MULTISTEP METHOD..
+C           METH = 1 MEANS THE IMPLICIT ADAMS METHOD.
+*
+C           METH = 2 MEANS THE METHOD BASED ON BACKWARD
+C                    DIFFERENTIATION FORMULAS (BDF-S).
+C         MITER INDICATES THE CORRECTOR ITERATION METHOD..
+C           MITER = 0 MEANS FUNCTIONAL ITERATION (NO JACOBIAN MATRIX
+C                     IS INVOLVED).
+C           MITER = 1 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     FULL (NEQ BY NEQ) JACOBIAN.
+C           MITER = 2 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED (DIFFERENCE QUOTIENT) FULL JACOBIAN
+C                     (USING NEQ EXTRA CALLS TO F PER DF/DY VALUE).
+C           MITER = 3 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED DIAGONAL JACOBIAN APPROXIMATION.
+C                     (USING 1 EXTRA CALL TO F PER DF/DY EVALUATION).
+C           MITER = 4 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     BANDED JACOBIAN.
+C           MITER = 5 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED BANDED JACOBIAN (USING ML+MU+1 EXTRA
+C                     CALLS TO F PER DF/DY EVALUATION).
+C         IF MITER = 1 OR 4, THE USER MUST SUPPLY A SUBROUTINE JAC
+C         (THE NAME IS ARBITRARY) AS DESCRIBED ABOVE UNDER JAC.
+C         FOR OTHER VALUES OF MITER, A DUMMY ARGUMENT CAN BE USED.
+C
+C         IF A SENSITIVITY ANLYSIS IS DESIRED (ISOPT = 1), MITER = 0
+C         AND 3 ARE DISALLOWED. IN THESE CASES, THE USER IS RECOMMENDED
+C         TO SUPPLY AN ANALYTICAL JACOBIAN (MITER = 1 OR 4) AND AN
+C         ANALYTICAL INHOMOGENEITY MATRIX (IDF = 1).
+C----------------------------------------------------------------------
+C OPTIONAL INPUTS.
+C
+C THE FOLLOWING IS A LIST OF THE OPTIONAL INPUTS PROVIDED FOR IN THE
+C CALL SEQUENCE.  (SEE ALSO PART II.)  FOR EACH SUCH INPUT VARIABLE,
+C THIS TABLE LISTS ITS NAME AS USED IN THIS DOCUMENTATION, ITS
+C LOCATION IN THE CALL SEQUENCE, ITS MEANING, AND THE DEFAULT VALUE.
+C THE USE OF ANY OF THESE INPUTS REQUIRES IOPT(1) = 1, AND IN THAT
+C CASE ALL OF THESE INPUTS ARE EXAMINED.  A VALUE OF ZERO FOR ANY
+C OF THESE OPTIONAL INPUTS WILL CAUSE THE DEFAULT VALUE TO BE USED.
+C THUS TO USE A SUBSET OF THE OPTIONAL INPUTS, SIMPLY PRELOAD
+C LOCATIONS 5 TO 10 IN RWORK AND IWORK TO 0.0 AND 0 RESPECTIVELY, AND
+C THEN SET THOSE OF INTEREST TO NONZERO VALUES.
+C
+C NAME   LOCATION      MEANING AND DEFAULT VALUE
+C
+C H0     RWORK(5)  THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+C                  THE DEFAULT VALUE IS DETERMINED BY THE KppSolveR.
+C
+C HMAX   RWORK(6)  THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS INFINITE.
+C
+C HMIN   RWORK(7)  THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS 0.  (THIS LOWER BOUND IS NOT
+C                  ENFORCED ON THE FINAL STEP BEFORE REACHING TCRIT
+C                  WHEN ITASK = 4 OR 5.)
+C
+C MAXORD  IWORK(5)  THE MAXIMUM ORDER TO BE ALLOWED.  THE DEFAULT
+C                  VALUE IS 12 IF METH = 1, AND 5 IF METH = 2.
+C                  IF MAXORD EXCEEDS THE DEFAULT VALUE, IT WILL
+C                  BE REDUCED TO THE DEFAULT VALUE.
+C                  IF MAXORD IS CHANGED DURING THE PROBLEM, IT MAY
+C                  CAUSE THE CURRENT ORDER TO BE REDUCED.
+C
+C MXSTEP  IWORK(6)  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+C                  ALLOWED DURING ONE CALL TO THE KppSolveR.
+C                  THE DEFAULT VALUE IS 500.
+C
+C MXHNIL  IWORK(7)  MAXIMUM NUMBER OF MESSAGES PRINTED (PER PROBLEM)
+C                  WARNING THAT T + H = T ON A STEP (H = STEP SIZE).
+C                  THIS MUST BE POSITIVE TO RESULT IN A NON-DEFAULT
+C                  VALUE.  THE DEFAULT VALUE IS 10.
+C----------------------------------------------------------------------
+C OPTIONAL OUTPUTS.
+C
+C AS OPTIONAL ADDITIONAL OUTPUT FROM ODESSA, THE VARIABLES LISTED
+C BELOW ARE QUANTITIES RELATED TO THE PERFORMANCE OF ODESSA
+C WHICH ARE AVAILABLE TO THE USER.  THESE ARE COMMUNICATED BY WAY OF
+C THE WORK ARRAYS, BUT ALSO HAVE INTERNAL MNEMONIC NAMES AS SHOWN.
+C EXCEPT WHERE STATED OTHERWISE, ALL OF THESE OUTPUTS ARE DEFINED
+C ON ANY SUCCESSFUL RETURN FROM ODESSA, AND ON ANY RETURN WITH
+C ISTATE = -1, -2, -4, -5, OR -6.  ON AN ILLEGAL INPUT RETURN
+C (ISTATE = -3), THEY WILL BE UNCHANGED FROM THEIR EXISTING VALUES
+C (IF ANY), EXCEPT POSSIBLY FOR TOLSF, LENRW, AND LENIW.
+C ON ANY ERROR RETURN, OUTPUTS RELEVANT TO THE ERROR WILL BE DEFINED,
+C AS NOTED BELOW.
+C
+C NAME   LOCATION      MEANING
+C
+C HU     RWORK(11) THE STEP SIZE IN T LAST USED (SUCCESSFULLY).
+C
+C HCUR   RWORK(12) THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C TCUR   RWORK(13) THE CURRENT VALUE OF THE INDEPENDENT VARIABLE
+C                  WHICH THE KppSolveR HAS ACTUALLY REACHED, I.E. THE
+C                  CURRENT INTERNAL MESH POINT IN T.  ON OUTPUT, TCUR
+C                  WILL ALWAYS BE AT LEAST AS FAR AS THE ARGUMENT
+C                  T, BUT MAY BE FARTHER (IF INTERPOLATION WAS DONE).
+C
+C TOLSF  RWORK(14) A TOLERANCE SCALE FACTOR, GREATER THAN 1.0,
+C                  COMPUTED WHEN A REQUEST FOR TOO MUCH ACCURACY WAS
+C                  DETECTED (ISTATE = -3 IF DETECTED AT THE START OF
+C                  THE PROBLEM, ISTATE = -2 OTHERWISE).  IF ITOL IS
+C                  LEFT UNALTERED BUT RTOL AND ATOL ARE UNIFORMLY
+C                  SCALED UP BY A FACTOR OF TOLSF FOR THE NEXT CALL,
+C                  THEN THE KppSolveR IS DEEMED LIKELY TO SUCCEED.
+C                  (THE USER MAY ALSO IGNORE TOLSF AND ALTER THE
+C                  TOLERANCE PARAMETERS IN ANY OTHER WAY APPROPRIATE.)
+C
+C NST    IWORK(11) THE NUMBER OF STEPS TAKEN FOR THE PROBLEM SO FAR.
+C
+C NFE    IWORK(12) THE NUMBER OF F EVALUATIONS FOR THE PROBLEM SO FAR.
+C
+C NJE    IWORK(13) THE NUMBER OF JACOBIAN EVALUATIONS (AND OF MATRIX
+C                  LU DECOMPOSITIONS IF ISOPT = 0) FOR THE PROBLEM SO
+C                  FAR. IF ISOPT = 1, THE NUMBER OF LU DECOMPOSITIONS
+C                  IS EQUAL TO NJE - NSPE (SEE BELOW).
+C
+C NQU    IWORK(14) THE METHOD ORDER LAST USED (SUCCESSFULLY).
+C
+C NQCUR  IWORK(15) THE ORDER TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C IMXER  IWORK(16) THE INDEX OF THE COMPONENT OF LARGEST MAGNITUDE IN
+C                  THE WEIGHTED LOCAL ERROR VECTOR (E(I,J)/EWT(I,J)),
+C                  ON AN ERROR RETURN WITH ISTATE = -4 OR -5.
+C
+C LENRW  IWORK(17) THE LENGTH OF RWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C LENIW  IWORK(18) THE LENGTH OF IWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C NDFE   IWORK(19) THE NUMBER OF DF/DP (VECTOR) EVALUATIONS.
+C
+C NSPE   IWORK(20) THE NUMBER OF CALLS TO SUBROUTINE SPRIME. EACH CALL
+C                  TO SPRIME REQUIRES A JACOBIAN EVALUATION, BUT NOT
+C                  AN LU DECOMPOSITION.
+C
+C THE FOLLOWING ARRAYS ARE SEGMENTS OF THE RWORK AND IWORK ARRAYS
+C WHICH MAY ALSO BE OF INTEREST TO THE USER AS OPTIONAL OUTPUTS.
+C FOR EACH ARRAY, THE TABLE BELOW GIVES ITS INTERNAL NAME, ITS BASE
+C ADDRESS IN RWORK OR IWORK, AND ITS DESCRIPTION.
+C
+C NAME   BASE ADDRESS      DESCRIPTION
+C
+C YH     21 IN RWORK    THE NORDSIECK HISTORY ARRAY, OF SIZE NYH BY
+C                       (NQCUR + 1). FOR J = 0,1,...,NQCUR, COLUMN J+1
+C                       OF YH CONTAINS HCUR**J/FACTORIAL(J) TIMES
+C                       THE J-TH DERIVATIVE OF THE INTERPOLATING
+C                       POLYNOMIAL CURRENTLY REPRESENTING THE SOLUTION,
+C                       EVALUATED AT T = TCUR.
+C
+C ACOR    LENRW-NYH+1   ARRAY OF SIZE NYH USED FOR THE ACCUMULATED
+C         IN RWORK      CORRECTIONS ON EACH STEP, SCALED ON OUTPUT
+C                       TO REPRESENT THE ESTIMATED LOCAL ERROR IN Y
+C                       ON THE LAST STEP.  THIS IS THE VECTOR E IN
+C                       THE DESCRIPTION OF THE ERROR CONTROL.
+C                       IT IS DEFINED ONLY ON A SUCCESSFUL RETURN
+C                       FROM ODESSA.
+C NRS     LENIW-NPAR    ARRAY OF SIZE NPAR+1, USED TO STORE THE
+C         IN IWORK      ACCUMULATED NUMBER OF REPEATED STEPS DUE TO
+C                       THE SENSITIVITY ANALYSIS..
+C                         NRS(1) = TOTAL NUMBER OF REPEATED STEPS,
+C                         NRS(2),... = NUMBER OF REPEATED STEPS DUE TO
+C                                      MODEL PARAMETER 1,...
+C
+C----------------------------------------------------------------------
+C PART II.  OTHER ROUTINES CALLABLE.
+C
+C THE FOLLOWING ARE OPTIONAL CALLS WHICH THE USER MAY MAKE TO
+C GAIN ADDITIONAL CAPABILITIES IN CONJUNCTION WITH ODESSA.
+C (THE ROUTINES XSETUN AND XSETF ARE DESIGNED TO CONFORM TO THE
+C SLATEC ERROR HANDLING PACKAGE.)
+C
+C    FORM OF CALL                  FUNCTION
+C  CALL XSETUN(LUN)          SET THE LOGICAL UNIT NUMBER, LUN, FOR
+C                            OUTPUT OF MESSAGES FROM ODESSA, IF
+C                            THE DEFAULT IS NOT DESIRED.
+C                            THE DEFAULT VALUE OF LUN IS 6.
+C
+C  CALL XSETF(MFLAG)         SET A FLAG TO CONTROL THE PRINTING OF
+C                            MESSAGES BY ODESSA..
+C                            MFLAG = 0 MEANS DO NOT PRINT. (DANGER..
+C                            THIS RISKS LOSING VALUABLE INFORMATION.)
+C                            MFLAG = 1 MEANS PRINT (THE DEFAULT).
+C
+C                            EITHER OF THE ABOVE CALLS MAY BE MADE AT
+C                            ANY TIME AND WILL TAKE EFFECT IMMEDIATELY.
+C
+C  CALL SVCOM (RSAV, ISAV)   STORE IN RSAV AND ISAV THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA (SEE PART III BELOW).
+C                            RSAV MUST BE A REAL ARRAY OF LENGTH 222
+C                            OR MORE, AND ISAV MUST BE AN INTEGER
+C                            ARRAY OF LENGTH 54 OR MORE.
+C
+C  CALL RSCOM (RSAV, ISAV)   RESTORE, FROM RSAV AND ISAV, THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA.  PRESUMES A PRIOR CALL TO SVCOM
+C                            WITH THE SAME ARGUMENTS.
+C
+C                            SVCOM AND RSCOM ARE USEFUL IF
+C                            INTERRUPTING A RUN AND RESTARTING
+C                            LATER, OR ALTERNATING BETWEEN TWO OR
+C                            MORE PROBLEMS KppSolveD WITH ODESSA.
+C
+C  CALL INTDY(,,,,,)         PROVIDE DERIVATIVES OF Y, OF VARIOUS
+C       (SEE BELOW)          ORDERS, AT A SPECIFIED POINT T, IF
+C                            DESIRED.  IT MAY BE CALLED ONLY AFTER
+C                            A SUCCESSFUL RETURN FROM ODESSA.
+C
+C THE DETAILED INSTRUCTIONS FOR USING INTDY ARE AS FOLLOWS.
+C THE FORM OF THE CALL IS..
+C
+C  CALL INTDY (T, K, RWORK(21), NYH, DKY, IFLAG)
+C
+C THE INPUT PARAMETERS ARE..
+C
+C T        = VALUE OF INDEPENDENT VARIABLE WHERE ANSWERS ARE DESIRED
+C            (NORMALLY THE SAME AS THE T LAST RETURNED BY ODESSA).
+C            FOR VALID RESULTS, T MUST LIE BETWEEN TCUR - HU AND TCUR.
+C            (SEE OPTIONAL OUTPUTS FOR TCUR AND HU.)
+C K        = INTEGER ORDER OF THE DERIVATIVE DESIRED.  K MUST SATISFY
+C            0 .LE. K .LE. NQCUR, WHERE NQCUR IS THE CURRENT ORDER
+C            (SEE OPTIONAL OUTPUTS).  THE CAPABILITY CORRESPONDING
+C            TO K = 0, I.E. COMPUTING Y(T), IS ALREADY PROVIDED
+C            BY ODESSA DIRECTLY.  SINCE NQCUR .GE. 1, THE FIRST
+C            DERIVATIVE DY/DT IS ALWAYS AVAILABLE WITH INTDY.
+C RWORK(21) = THE BASE ADDRESS OF THE HISTORY ARRAY YH.
+C NYH      = COLUMN LENGTH OF YH, EQUAL TO THE TOTAL NUMBER OF
+C            DEPENDENT VARIABLES. IF ISOPT = 0, NYH = N. IF ISOPT = 1,
+C            NYH = N * (NPAR + 1).
+C
+C THE OUTPUT PARAMETERS ARE..
+C
+C DKY      = A REAL ARRAY OF LENGTH NYH CONTAINING THE COMPUTED VALUE
+C            OF THE K-TH DERIVATIVE OF Y(T).
+C IFLAG    = INTEGER FLAG, RETURNED AS 0 IF K AND T WERE LEGAL,
+C            -1 IF K WAS ILLEGAL, AND -2 IF T WAS ILLEGAL.
+C            ON AN ERROR RETURN, A MESSAGE IS ALSO WRITTEN.
+C----------------------------------------------------------------------
+C PART III.  COMMON BLOCKS.
+C
+C IF ODESSA IS TO BE USED IN AN OVERLAY SITUATION, THE USER
+C MUST DECLARE, IN THE PRIMARY OVERLAY, THE VARIABLES IN..
+C  (1) THE CALL SEQUENCE TO ODESSA,
+C  (2) THE THREE INTERNAL COMMON BLOCKS
+C        /ODE001/  OF LENGTH  258  (219 DOUBLE PRECISION WORDS
+C                        FOLLOWED BY 39 INTEGER WORDS),
+C        /ODE002/  OF LENGTH 14 (3 DOUBLE PRECISION WORDS FOLLOWED
+C                        BY 11 INTEGER WORDS),
+C        /EH0001/  OF LENGTH  2 (INTEGER WORDS).
+C
+C IF ODESSA IS USED ON A SYSTEM IN WHICH THE CONTENTS OF INTERNAL
+C COMMON BLOCKS ARE NOT PRESERVED BETWEEN CALLS, THE USER SHOULD
+C DECLARE THE ABOVE THREE COMMON BLOCKS IN HIS MAIN PROGRAM TO INSURE
+C THAT THEIR CONTENTS ARE PRESERVED.
+C
+C IF THE SOLUTION OF A GIVEN PROBLEM BY ODESSA IS TO BE INTERRUPTED
+C AND THEN LATER CONTINUED, SUCH AS WHEN RESTARTING AN INTERRUPTED RUN
+C OR ALTERNATING BETWEEN TWO OR MORE PROBLEMS, THE USER SHOULD SAVE,
+C FOLLOWING THE RETURN FROM THE LAST ODESSA CALL PRIOR TO THE
+C INTERRUPTION, THE CONTENTS OF THE CALL SEQUENCE VARIABLES AND THE
+C INTERNAL COMMON BLOCKS, AND LATER RESTORE THESE VALUES BEFORE THE
+C NEXT ODESSA CALL FOR THAT PROBLEM.  TO SAVE AND RESTORE THE COMMON
+C BLOCKS, USE SUBROUTINES SVCOM AND RSCOM (SEE PART II ABOVE).
+C
+C----------------------------------------------------------------------
+C PART IV.  OPTIONALLY REPLACEABLE KppSolveR ROUTINES.
+C
+C BELOW ARE DESCRIPTIONS OF TWO ROUTINES IN THE ODESSA PACKAGE WHICH
+C RELATE TO THE MEASUREMENT OF ERRORS.  EITHER ROUTINE CAN BE
+C REPLACED BY A USER-SUPPLIED VERSION, IF DESIRED. HOWEVER, SINCE SUCH
+C A REPLACEMENT MAY HAVE A MAJOR IMPACT ON PERFORMANCE, IT SHOULD BE
+C DONE ONLY WHEN ABSOLUTELY NECESSARY, AND ONLY WITH GREAT CAUTION.
+C (NOTE.. THE MEANS BY WHICH THE PACKAGE VERSION OF A ROUTINE IS
+C SUPERSEDED BY THE USER-S VERSION MAY BE SYSTEM-DEPENDENT.)
+C
+C (A) EWSET.
+C THE FOLLOWING SUBROUTINE IS CALLED JUST BEFORE EACH INTERNAL
+C INTEGRATION STEP, AND SETS THE ARRAY OF ERROR WEIGHTS, EWT, AS
+C DESCRIBED UNDER ITOL/RTOL/ATOL ABOVE..
+C    SUBROUTINE EWSET (NYH, ITOL, RTOL, ATOL, YCUR, EWT)
+C WHERE NEQ, ITOL, RTOL, AND ATOL ARE AS IN THE ODESSA CALL SEQUENCE,
+C YCUR CONTAINS THE CURRENT DEPENDENT VARIABLE VECTOR, AND
+C EWT IS THE ARRAY OF WEIGHTS SET BY EWSET.
+C
+C IF THE USER SUPPLIES THIS SUBROUTINE, IT MUST RETURN IN EWT(I)
+C (I = 1,...,NYH) A POSITIVE QUANTITY SUITABLE FOR COMPARING ERRORS
+C IN Y(I) TO.  THE EWT ARRAY RETURNED BY EWSET IS PASSED TO THE
+C VNORM ROUTINE (SEE BELOW), AND ALSO USED BY ODESSA IN THE COMPUTATION
+C OF THE OPTIONAL OUTPUT IMXER, THE DIAGONAL JACOBIAN APPROXIMATION,
+C AND THE INCREMENTS FOR DIFFERENCE QUOTIENT JACOBIANS.
+C
+C IN THE USER-SUPPLIED VERSION OF EWSET, IT MAY BE DESIRABLE TO USE
+C THE CURRENT VALUES OF DERIVATIVES OF Y.  DERIVATIVES UP TO ORDER NQ
+C ARE AVAILABLE FROM THE HISTORY ARRAY YH, DESCRIBED ABOVE UNDER
+C OPTIONAL OUTPUTS.  IN EWSET, YH IS IDENTICAL TO THE YCUR ARRAY,
+C EXTENDED TO NQ + 1 COLUMNS WITH A COLUMN LENGTH OF NYH AND SCALE
+C FACTORS OF H**J/FACTORIAL(J).  ON THE FIRST CALL FOR THE PROBLEM,
+C GIVEN BY NST = 0, NQ IS 1 AND H IS TEMPORARILY SET TO 1.0.
+C THE QUANTITIES NQ, NYH, H, AND NST CAN BE OBTAINED BY INCLUDING
+C IN EWSET THE STATEMENTS..
+C    DOUBLE PRECISION H, RLS
+C    COMMON /ODE001/ RLS(219),ILS(39)
+C    NQ = ILS(35)
+C    NYH = ILS(14)
+C    NST = ILS(36)
+C    H = RLS(213)
+C THUS, FOR EXAMPLE, THE CURRENT VALUE OF DY/DT CAN BE OBTAINED AS
+C YCUR(NYH+I)/H  (I=1,...,N)  (AND THE DIVISION BY H IS
+C UNNECESSARY WHEN NST = 0).
+C
+C (B) VNORM.
+C THE FOLLOWING IS A REAL FUNCTION ROUTINE WHICH COMPUTES THE WEIGHTED
+C ROOT-MEAN-SQUARE NORM OF A VECTOR V..
+C    D = VNORM (LV, V, W)
+C WHERE..
+C  LV = THE LENGTH OF THE VECTOR,
+C  V = REAL ARRAY OF LENGTH N CONTAINING THE VECTOR,
+C  W = REAL ARRAY OF LENGTH N CONTAINING WEIGHTS,
+C  D = SQRT( (1/N) * SUM(V(I)*W(I))**2 ).
+C VNORM IS CALLED WITH LV = N AND WITH W(I) = 1.0/EWT(I), WHERE
+C EWT IS AS SET BY SUBROUTINE EWSET.
+C
+C IF THE USER SUPPLIES THIS FUNCTION, IT SHOULD RETURN A NON-NEGATIVE
+C VALUE OF VNORM SUITABLE FOR USE IN THE ERROR CONTROL IN ODESSA.
+C NONE OF THE ARGUMENTS SHOULD BE ALTERED BY VNORM.
+C FOR EXAMPLE, A USER-SUPPLIED VNORM ROUTINE MIGHT..
+C  -SUBSTITUTE A MAX-NORM OF (V(I)*W(I)) FOR THE RMS-NORM, OR
+C  -IGNORE SOME COMPONENTS OF V IN THE NORM, WITH THE EFFECT OF
+C   SUPPRESSING THE ERROR CONTROL ON THOSE COMPONENTS OF Y.
+C----------------------------------------------------------------------
+C OTHER ROUTINES IN THE ODESSA PACKAGE.
+C
+C IN ADDITION TO SUBROUTINE ODESSA, THE ODESSA PACKAGE INCLUDES THE
+C FOLLOWING SUBROUTINES AND FUNCTION ROUTINES..
+C  INTDY   COMPUTES AN INTERPOLATED VALUE OF THE Y VECTOR AT T = TOUT.
+C  STODE   IS THE CORE INTEGRATOR, WHICH DOES ONE STEP OF THE
+C          INTEGRATION AND THE ASSOCIATED ERROR CONTROL.
+C  STESA   MANAGES THE SOLUTION OF THE SENSITIVITY FUNCTIONS.
+C  CFODE   SETS ALL METHOD COEFFICIENTS AND TEST CONSTANTS.
+C  PREPJ   COMPUTES AND PREPROCESSES THE JACOBIAN MATRIX J = DF/DY
+C          AND THE NEWTON ITERATION MATRIX P = I - H*L0*J.
+C          IT IS ALSO CALLED BY SPRIME (WITH JOPT = 1) TO JUST
+C          COMPUTE THE JACOBIAN MATRIX.
+C  PREPDF  COMPUTES THE INHOMOGENEITY MATRIX DF/DP.
+C  SPRIME  DEFINES THE SYSTEM OF SENSITIVITY EQUATIONS.
+C  SOLSY   MANAGES SOLUTION OF LINEAR SYSTEM IN CHORD ITERATION.
+C  EWSET   SETS THE ERROR WEIGHT VECTOR EWT BEFORE EACH STEP.
+C  VNORM   COMPUTES THE WEIGHTED R.M.S. NORM OF A VECTOR.
+C  SVCOM AND RSCOM  ARE USER-CALLABLE ROUTINES TO SAVE AND RESTORE,
+C          RESPECTIVELY, THE CONTENTS OF THE INTERNAL COMMON BLOCKS.
+C  DGEFA AND DGESL  ARE ROUTINES FROM LINPACK FOR SOLVING FULL
+C          SYSTEMS OF LINEAR ALGEBRAIC EQUATIONS.
+C  DGBFA AND DGBSL  ARE ROUTINES FROM LINPACK FOR SOLVING BANDED
+C          LINEAR SYSTEMS.
+C  DAXPY, DSCAL, IDAMAX, AND DDOT  ARE BASIC LINEAR ALGEBRA MODULES
+C          (BLAS) USED BY THE ABOVE LINPACK ROUTINES.
+C  D1MACH  COMPUTES THE UNIT ROUNDOFF IN A MACHINE-INDEPENDENT MANNER.
+C  XERR, XSETUN, AND XSETF  HANDLE THE PRINTING OF ALL ERROR
+C          MESSAGES AND WARNINGS.
+C NOTE..  VNORM, IDAMAX, DDOT, AND D1MACH ARE FUNCTION ROUTINES.
+C ALL THE OTHERS ARE SUBROUTINES.
+C
+C THE FORTRAN GENERIC INTRINSIC FUNCTIONS USED BY ODESSA ARE..
+C ABS, MAX, MIN, REAL, MOD, SIGN, SQRT, AND WRITE
+C
+C A BLOCK DATA SUBPROGRAM IS ALSO INCLUDED WITH THE PACKAGE,
+C FOR LOADING SOME OF THE VARIABLES IN INTERNAL COMMON.
+C
+C----------------------------------------------------------------------
+C PART V.  GENERAL REMARKS
+C
+C THIS SECTION HIGHLIGHTS THE BASIC DIFFERENCES BETWEEN THE ORIGINAL
+C LSODE PACKAGE AND THE ODESSA MODIFICATION. THIS IS PROVIDED AS A
+C SERVICE TO EXPERIENCED LSODE USERS TO EXPEDITE FAMILIARIZATION WITH
+C ODESSA.
+C
+C (A). ORIGINAL SUBROUTINES AND FUNCTIONS.
+C
+C      OF THE ORIGINAL 22 SUBROUTINES AND FUNCTIONS USED IN THE LSODE
+C      PACKAGE, ALL ARE USED BY ODESSA, WITH THE FOLLOWING HAVING BEEN
+C      MODIFIED..
+C
+C      LSODE  THE ORIGINAL DRIVER SUBROUTINE FOR THE LSODE PACKAGE IS
+C             EXTENSIVELY MODIFIED AND RENAMED ODESSA, WHICH NOW
+C             CONTAINS A CALL TO SPRIME TO ESTABLISH INITIAL CONDITIONS
+C             FOR THE SENSITIVITY CALCULATIONS.
+C
+C      STODE  THE ONE STEP INTEGRATOR IS SLIGHTLY MODIFIED AND RETAINS
+C             ITS ORIGINAL NAME. IT NOW CONTAINS THE CALL TO STESA,
+C             AND ALSO CALLS SPRIME IF KFLAG .LE. -3.
+C
+C      PREPJ  ALSO NAMED PREPJ IN ODESSA IS SLIGHTLY MODIFIED TO ALLOW
+C             FOR THE CALCULATION OF JACOBIAN WITH NO PREPROCESSING
+C             (JOPT = 1).
+C
+C (B). NEW SUBROUTINES.
+C
+C      IN ADDITION TO THE CHANGES NOTED ABOVE, THREE NEW SUBROUTINES
+C      HAVE BEEN INTRODUCED (SEE STESA, SPRIME, AND PREPDF AS DESCRIBED
+C      IN PART IV. ABOVE).
+C
+C (C). COMMON BLOCKS.
+C
+C      /LS0001/  RETAINS THE SAME LENGTH AND IS RENAMED /ODE001/;
+C                HOWEVER THE REAL ARRAY ROWNS(209) IS SHORTENED TO A
+C                LENGTH OF (173) REAL WORDS, ALLOWING THE REMOVAL OF
+C                TESCO(3,12) WHICH IS NOW PASSED FROM STODE TO STESA.
+C                IN ADDITION, THE INTEGER ARRAY IOWNS(6) IS SHORTENED
+C                TO A LENGTH OF (4) INTEGER WORDS, ALLOWING THE REMOVAL
+C                OF IALTH AND LMAX WHICH ARE NOW PASSED FROM STODE TO
+C                STESA.
+C
+C      /ODE002/  ADDED COMMON BLOCK FOR VARIABLES IMPORTANT TO
+C                SENSITIVITY ANALYSIS (SEE PART III. ABOVE). A BLOCK
+C                DATA PROGRAM IS NOT REQUIRED FOR THIS COMMON BLOCK.
+C
+C      SVCOM,RSCOM  THESE TWO SUBROUTINES ARE MODIFIED TO HANDLE
+C                   COMMON BLOCK /ODE002/ AS WELL.
+C
+C (D). OPTIONAL INPUTS.
+C
+C      THE FULL SET OF OPTIONAL INPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA, WITH THE EXCEPTION THAT THE NUMBER OF ODE'S
+C      IN THE MODEL (NEQ(1)), MAY NOT BE CHANGED DURING THE PROBLEM.
+C      IN ODESSA, NYH NOW REFERS TO THE TOTAL NUMBER OF FIRST-ORDER
+C      ODE'S (MODEL AND SENSITIVITY EQUATIONS) WHICH IS EQUAL TO
+C      NEQ(1) IF ISOPT = 0, OR NEQ(1)*(NEQ(2)+1) IF ISOPT = 1.
+C      NEQ(1), NEQ(2), AND NYH ARE NOT ALLOWED TO CHANGE DURING
+C      THE COURSE OF AN INTEGRATION.
+C
+C (E). OPTIONAL OUTPUTS.
+C
+C      THE FULL SET OF OPTIONAL OUTPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA. IN ADDITION, IWORK(19) AND IWORK(20) ARE
+C      LOADED WITH NDFE AND NSPE, RESPECTIVELY, UPON OUTPUT. THE TOTAL
+C      NUMBER OF LU DECOMPOSITIONS OF THE PROCESSED JACOBIAN IS EQUAL
+C      TO NJE - NSPE.
+C-----------------------------------------------------------------------
+      SUBROUTINE ODESSA (F, DF, NEQ, Y, PAR, T, TOUT, ITOL, RTOL, ATOL,
+     1   ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      LOGICAL IHIT
+      EXTERNAL F, DF, JAC, PREPJ, SOLSY, PREPDF
+      DIMENSION NEQ(*), Y(*), PAR(*), RTOL(*), ATOL(*), IOPT(*),
+     1   RWORK(LRW), IWORK(LIW), MORD(2)
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE.. LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY(T)/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY
+C     DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C     SENSITIVITY ANALYSIS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE.
+C     (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C THE FOLLOWING INTERNAL COMMON BLOCKS CONTAIN
+C (A) VARIABLES WHICH ARE LOCAL TO ANY SUBROUTINE BUT WHOSE VALUES MUST
+C    BE PRESERVED BETWEEN CALLS TO THE ROUTINE (OWN VARIABLES), AND
+C (B) VARIABLES WHICH ARE COMMUNICATED BETWEEN SUBROUTINES.
+C THE STRUCTURE OF THE BLOCKS ARE AS FOLLOWS..  ALL REAL VARIABLES ARE
+C LISTED FIRST, FOLLOWED BY ALL INTEGERS.  WITHIN EACH TYPE, THE
+C VARIABLES ARE GROUPED WITH THOSE LOCAL TO SUBROUTINE ODESSA FIRST,
+C THEN THOSE LOCAL TO SUBROUTINE STODE, AND FINALLY THOSE USED
+C FOR COMMUNICATION.  THE BLOCKS ARE DECLARED IN SUBROUTINES ODESSA
+C INTDY, STODE, STESA, PREPJ, PREPDF, AND SOLSY.  GROUPS OF VARIABLES
+C ARE REPLACED BY DUMMY ARRAYS IN THE COMMON DECLARATIONS IN ROUTINES
+C WHERE THOSE VARIABLES ARE NOT USED.
+C-----------------------------------------------------------------------
+      COMMON /ODE001/ TRET, ROWNS(173),
+     1   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     2   ILLIN, INIT, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     3   MXSTEP, MXHNIL, NHNIL, NTREP, NSLAST, NYH, IOWNS(4),
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   NPAR, LDFDP, LNRS,
+     2   ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0,TWO=2.0D0,FOUR=4.0D0)
+      DATA  MORD(1),MORD(2)/12,5/, MXSTP0/500/, MXHNL0/10/
+C-----------------------------------------------------------------------
+C BLOCK A.
+C THIS CODE BLOCK IS EXECUTED ON EVERY CALL.
+C IT TESTS ISTATE AND ITASK FOR LEGALITY AND BRANCHES APPROPIATELY.
+C IF ISTATE .GT. 1 BUT THE FLAG INIT SHOWS THAT INITIALIZATION HAS
+C NOT YET BEEN DONE, AN ERROR RETURN OCCURS.
+C IF ISTATE = 1 AND TOUT = T, JUMP TO BLOCK G AND RETURN IMMEDIATELY.
+C-----------------------------------------------------------------------
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602
+      IF (ISTATE .EQ. 1) GO TO 10
+      IF (INIT .EQ. 0) GO TO 603
+      IF (ISTATE .EQ. 2) GO TO 200
+      GO TO 20
+ 10   INIT = 0
+      IF (TOUT .EQ. T) GO TO 430
+ 20   NTREP = 0
+C-----------------------------------------------------------------------
+C BLOCK B.
+C THE NEXT CODE BLOCK IS EXECUTED FOR THE INITIAL CALL (ISTATE = 1),
+C OR FOR A CONTINUATION CALL WITH PARAMETER CHANGES (ISTATE = 3).
+C IT CONTAINS CHECKING OF ALL INPUTS AND VARIOUS INITIALIZATIONS.
+C
+C FIRST CHECK LEGALITY OF THE NON-OPTIONAL INPUTS NEQ, ITOL, IOPT,
+C MF, ML, AND MU.
+C-----------------------------------------------------------------------
+      IF (NEQ(1) .LE. 0) GO TO 604
+      IF (ISTATE .EQ. 1) GO TO 25
+      IF (NEQ(1) .NE. N) GO TO 605
+ 25   N = NEQ(1)
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606
+      DO 26 I = 1,3
+ 26     IF (IOPT(I) .LT. 0 .OR. IOPT(I) .GT. 1) GO TO 607
+      ISOPT = IOPT(2)
+      IDF = IOPT(3)
+      NYH = N
+      NSV = 1
+      METH = MF/10
+      MITER = MF - 10*METH
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608
+      IF (MITER .LE. 3) GO TO 30
+      ML = IWORK(1)
+      MU = IWORK(2)
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610
+ 30   IF (ISOPT .EQ. 0) GO TO 32
+C CHECK LEGALITY OF THE NON-OPTIONAL INPUTS ISOPT, NPAR.
+C COMPUTE NUMBER OF SOLUTION VECTORS AND TOTAL NUMBER OF EQUATIONS.
+      IF (NEQ(2) .LE. 0) GO TO 628
+      IF (ISTATE .EQ. 1) GO TO 31
+      IF (NEQ(2) .NE. NPAR) GO TO 629
+ 31   NPAR = NEQ(2)
+      NSV = NPAR + 1
+      NYH = NSV * N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) GO TO 630
+C NEXT PROCESS AND CHECK THE OPTIONAL INPUTS. --------------------------
+ 32   IF (IOPT(1) .EQ. 1) GO TO 40
+      MAXORD = MORD(METH)
+      MXSTEP = MXSTP0
+      MXHNIL = MXHNL0
+      IF (ISTATE .EQ. 1) H0 = ZERO
+      HMXI = ZERO
+      HMIN = ZERO
+      GO TO 60
+ 40   MAXORD = IWORK(5)
+      IF (MAXORD .LT. 0) GO TO 611
+      IF (MAXORD .EQ. 0) MAXORD = 100
+      MAXORD = MIN(MAXORD,MORD(METH))
+      MXSTEP = IWORK(6)
+      IF (MXSTEP .LT. 0) GO TO 612
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0
+      MXHNIL = IWORK(7)
+      IF (MXHNIL .LT. 0) GO TO 613
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0
+      IF (ISTATE .NE. 1) GO TO 50
+      H0 = RWORK(5)
+      IF ((TOUT - T)*H0 .LT. ZERO) GO TO 614
+ 50   HMAX = RWORK(6)
+      IF (HMAX .LT. ZERO) GO TO 615
+      HMXI = ZERO
+      IF (HMAX .GT. ZERO) HMXI = ONE/HMAX
+      HMIN = RWORK(7)
+      IF (HMIN .LT. ZERO) GO TO 616
+C-----------------------------------------------------------------------
+C SET WORK ARRAY POINTERS AND CHECK LENGTHS LRW AND LIW.
+C POINTERS TO SEGMENTS OF RWORK AND IWORK ARE NAMED BY PREFIXING L TO
+C THE NAME OF THE SEGMENT.  E.G., THE SEGMENT YH STARTS AT RWORK(LYH).
+C SEGMENTS OF RWORK (IN ORDER) ARE DENOTED  YH, WM, EWT, SAVF, ACOR.
+C WORK SPACE FOR DFDP IS CONTAINED IN ACOR.
+C-----------------------------------------------------------------------
+ 60   LYH = 21
+      LWM = LYH + (MAXORD + 1)*NYH
+      IF (MITER .EQ. 0) LENWM = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) LENWM = N*N + 2
+      IF (MITER .EQ. 3) LENWM = N + 2
+      IF (MITER .GE. 4) LENWM = (2*ML + MU + 1)*N + 2
+      LEWT = LWM + LENWM
+      LSAVF = LEWT + NYH
+      LACOR = LSAVF + N
+      LDFDP = LACOR + N
+      LENRW = LACOR + NYH - 1
+      IWORK(17) = LENRW
+      LIWM = 1
+      LENIW = 20 + N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 20
+      LNRS = LENIW + LIWM
+      IF (ISOPT .EQ. 1) LENIW = LNRS + NPAR
+      IWORK(18) = LENIW
+      IF (LENRW .GT. LRW) GO TO 617
+      IF (LENIW .GT. LIW) GO TO 618
+C CHECK RTOL AND ATOL FOR LEGALITY. ------------------------------------
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 70 I = 1,NYH
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        IF (RTOLI .LT. ZERO) GO TO 619
+        IF (ATOLI .LT. ZERO) GO TO 620
+ 70     CONTINUE
+      IF (ISTATE .EQ. 1) GO TO 100
+C IF ISTATE = 3, SET FLAG TO SIGNAL PARAMETER CHANGES TO STODE. --------
+      JSTART = -1
+      IF (NQ .LE. MAXORD) GO TO 90
+C MAXORD WAS REDUCED BELOW NQ.  COPY YH(*,MAXORD+2) INTO SAVF. ---------
+      DO 80 I = 1,N
+ 80     RWORK(I+LSAVF-1) = RWORK(I+LWM-1)
+C RELOAD WM(1) = RWORK(LWM), SINCE LWM MAY HAVE CHANGED. ---------------
+ 90   IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      GO TO 200
+C-----------------------------------------------------------------------
+C BLOCK C.
+C THE NEXT BLOCK IS FOR THE INITIAL CALL ONLY (ISTATE = 1).
+C IT CONTAINS ALL REMAINING INITIALIZATIONS, THE INITIAL CALL TO F,
+C THE INITIAL CALL TO SPRIME IF ISOPT = 1,
+C AND THE CALCULATION OF THE INITIAL STEP SIZE.
+C THE ERROR WEIGHTS IN EWT ARE INVERTED AFTER BEING LOADED.
+C-----------------------------------------------------------------------
+ 100  UROUND = D1MACH(4)
+      TN = T
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 105
+      TCRIT = RWORK(1)
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. ZERO) GO TO 625
+      IF (H0 .NE. ZERO .AND. (T + H0 - TCRIT)*H0 .GT. ZERO)
+     1   H0 = TCRIT - T
+ 105  JSTART = 0
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      NHNIL = 0
+      NST = 0
+      NJE = 0
+      NSLAST = 0
+      HU = ZERO
+      NQU = 0
+      CCMAX = 0.3D0
+      MAXCOR = 3
+      IF (ISOPT .EQ. 1) MAXCOR = 4
+      MSBP = 20
+      MXNCF = 10
+C INITIAL CALL TO F.  (LF0 POINTS TO YH(1,2) AND LOADS IN VALUES).
+      LF0 = LYH + NYH
+      CALL F (NEQ, T, Y, PAR, RWORK(LF0))
+      NFE = 1
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      NDFE = 0
+      NSPE = 0
+      IF (ISOPT .EQ. 0) GO TO 114
+C INITIALIZE COUNTS FOR REPEATED STEPS DUE TO SENSITIVITY ANALYSIS.
+      DO 110 J = 1,NSV
+ 110    IWORK(J + LNRS - 1) = 0
+C LOAD THE INITIAL VALUE VECTOR IN YH. ---------------------------------
+ 114  DO 115 I = 1,NYH
+ 115    RWORK(I+LYH-1) = Y(I)
+C LOAD AND INVERT THE EWT ARRAY.  (H IS TEMPORARILY SET TO ONE.) -------
+      NQ = 1
+      H = ONE
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 120 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 621
+ 120    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+      IF (ISOPT .EQ. 0) GO TO 125
+C CALL SPRIME TO LOAD FIRST-ORDER SENSITIVITY DERIVATIVES INTO
+C REMAINING YH(*,2) POSITIONS.
+      CALL SPRIME (NEQ, Y, RWORK(LYH), NYH, N, NSV, RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LF0), RWORK(LACOR),
+     2   RWORK(LDFDP), PAR, F, JAC, DF, PREPJ, PREPDF)
+      IF (IERSP .EQ. -1) GO TO 631
+      IF (IERSP .EQ. -2) GO TO 632
+C-----------------------------------------------------------------------
+C THE CODING BELOW COMPUTES THE STEP SIZE, H0, TO BE ATTEMPTED ON THE
+C FIRST STEP, UNLESS THE USER HAS SUPPLIED A VALUE FOR THIS.
+C FIRST CHECK THAT TOUT - T DIFFERS SIGNIFICANTLY FROM ZERO.
+C A SCALAR TOLERANCE QUANTITY TOL IS COMPUTED, AS MAX(RTOL(I))
+C IF THIS IS POSITIVE, OR MAX(ATOL(I)/ABS(Y(I))) OTHERWISE, ADJUSTED
+C SO AS TO BE BETWEEN 100*UROUND AND 1.0E-3. ONLY THE ORIGINAL
+C SOLUTION VECTOR IS CONSIDERED IN THIS CALCULATION (ISOPT = 0 OR 1).
+C THEN THE COMPUTED VALUE H0 IS GIVEN BY..
+C                                     NEQ
+C  H0**2 = TOL / ( W0**-2 + (1/NEQ) * SUM ( F(I)/YWT(I) )**2  )
+C                                      1
+C WHERE  W0     = MAX ( ABS(T), ABS(TOUT) ),
+C        F(I)   = I-TH COMPONENT OF INITIAL VALUE OF F,
+C        YWT(I) = EWT(I)/TOL  (A WEIGHT FOR Y(I)).
+C THE SIGN OF H0 IS INFERRED FROM THE INITIAL VALUES OF TOUT AND T.
+C-----------------------------------------------------------------------
+ 125  IF (H0 .NE. ZERO) GO TO 180
+      TDIST = ABS(TOUT - T)
+      W0 = MAX(ABS(T),ABS(TOUT))
+      IF (TDIST .LT. TWO*UROUND*W0) GO TO 622
+      TOL = RTOL(1)
+      IF (ITOL .LE. 2) GO TO 140
+      DO 130 I = 1,N
+ 130    TOL = MAX(TOL,RTOL(I))
+ 140   IF (TOL .GT. ZERO) GO TO 160
+      ATOLI = ATOL(1)
+      DO 150 I = 1,N
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        AYI = ABS(Y(I))
+        IF (AYI .NE. ZERO) TOL = MAX(TOL,ATOLI/AYI)
+ 150    CONTINUE
+ 160   TOL = MAX(TOL,100.0D0*UROUND)
+      TOL = MIN(TOL,0.001D0)
+      SUM = VNORM (N, RWORK(LF0), RWORK(LEWT))
+      SUM = ONE/(TOL*W0*W0) + TOL*SUM**2
+      H0 = ONE/SQRT(SUM)
+      H0 = MIN(H0,TDIST)
+      H0 = SIGN(H0,TOUT-T)
+C ADJUST H0 IF NECESSARY TO MEET HMAX BOUND. ---------------------------
+ 180   RH = ABS(H0)*HMXI
+      IF (RH .GT. ONE) H0 = H0/RH
+C LOAD H WITH H0 AND SCALE YH(*,2) BY H0. ------------------------------
+      H = H0
+      DO 190 I = 1,NYH
+ 190    RWORK(I+LF0-1) = H0*RWORK(I+LF0-1)
+      GO TO 270
+C-----------------------------------------------------------------------
+C BLOCK D.
+C THE NEXT CODE BLOCK IS FOR CONTINUATION CALLS ONLY (ISTATE = 2 OR 3)
+C AND IS TO CHECK STOP CONDITIONS BEFORE TAKING A STEP.
+C-----------------------------------------------------------------------
+ 200   NSLAST = NST
+      GO TO (210, 250, 220, 230, 240), ITASK
+ 210   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 220   TP = TN - HU*(ONE + 100.0D0*UROUND)
+      IF ((TP - TOUT)*H .GT. ZERO) GO TO 623
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      GO TO 400
+ 230   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+      IF ((TCRIT - TOUT)*H .LT. ZERO) GO TO 625
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 245
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 240   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+ 245   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      IF (ISTATE .EQ. 2) JSTART = -2
+C-----------------------------------------------------------------------
+C BLOCK E.
+C THE NEXT BLOCK IS NORMALLY EXECUTED FOR ALL CALLS AND CONTAINS
+C THE CALL TO THE ONE-STEP CORE INTEGRATOR STODE.
+C
+C THIS IS A LOOPING POINT FOR THE INTEGRATION STEPS.
+C
+C FIRST CHECK FOR TOO MANY STEPS BEING TAKEN, UPDATE EWT (IF NOT AT
+C START OF PROBLEM), CHECK FOR TOO MUCH ACCURACY BEING REQUESTED, AND
+C CHECK FOR H BELOW THE ROUNDOFF LEVEL IN T.
+C TOLSF IS CALCULATED CONSIDERING ALL SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 250   CONTINUE
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 260 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 510
+ 260    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+ 270   TOLSF = UROUND*VNORM (NYH, RWORK(LYH), RWORK(LEWT))
+      IF (TOLSF .LE. ONE) GO TO 280
+      TOLSF = TOLSF*2.0D0
+      IF (NST .EQ. 0) GO TO 626
+      GO TO 520
+ 280   IF (ADDX(TN,H) .NE. TN) GO TO 290
+      NHNIL = NHNIL + 1
+      IF (NHNIL .GT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - WARNING..INTERNAL T (=R1) AND H (=R2) ARE',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('SUCH THAT IN THE MACHINE, T + H = T ON THE NEXT STEP',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('(H = STEP SIZE). KppSolveR WILL CONTINUE ANYWAY',
+     1   101, 1, 0, 0, 0, 2, TN, H)
+      IF (NHNIL .LT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - ABOVE WARNING HAS BEEN ISSUED I1 TIMES.',
+     1   102, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('IT WILL NOT BE ISSUED AGAIN FOR THIS PROBLEM',
+     1   102, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+ 290   CONTINUE
+C-----------------------------------------------------------------------
+C     CALL STODE(NEQ,Y,YH,NYH,YH,WM,IWM,EWT,SAVF,ACOR,PAR,NRS,
+C    1   F,JAC,DF,PREPJ,PREPDF,SOLSY)
+C-----------------------------------------------------------------------
+      CALL STODE (NEQ, Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LSAVF), RWORK(LACOR),
+     2   PAR, IWORK(LNRS), F, JAC, DF, PREPJ, PREPDF, SOLSY)
+      KGO = 1 - KFLAG
+      GO TO (300, 530, 540, 633), KGO
+C-----------------------------------------------------------------------
+C BLOCK F.
+C THE FOLLOWING BLOCK HANDLES THE CASE OF A SUCCESSFUL RETURN FROM THE
+C CORE INTEGRATOR (KFLAG = 0).  TEST FOR STOP CONDITIONS.
+C-----------------------------------------------------------------------
+ 300   INIT = 1
+      GO TO (310, 400, 330, 340, 350), ITASK
+C ITASK = 1.  IF TOUT HAS BEEN REACHED, INTERPOLATE. -------------------
+ 310   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+C ITASK = 3.  JUMP TO EXIT IF TOUT WAS REACHED. ------------------------
+ 330   IF ((TN - TOUT)*H .GE. ZERO) GO TO 400
+      GO TO 250
+C ITASK = 4.  SEE IF TOUT OR TCRIT WAS REACHED.  ADJUST H IF NECESSARY.
+ 340   IF ((TN - TOUT)*H .LT. ZERO) GO TO 345
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+ 345   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      JSTART = -2
+      GO TO 250
+C ITASK = 5.  SEE IF TCRIT WAS REACHED AND JUMP TO EXIT. ---------------
+ 350   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+C-----------------------------------------------------------------------
+C BLOCK G.
+C THE FOLLOWING BLOCK HANDLES ALL SUCCESSFUL RETURNS FROM ODESSA.
+C IF ITASK .NE. 1, Y IS LOADED FROM YH AND T IS SET ACCORDINGLY.
+C ISTATE IS SET TO 2, THE ILLEGAL INPUT COUNTER IS ZEROED, AND THE
+C OPTIONAL OUTPUTS ARE LOADED INTO THE WORK ARRAYS BEFORE RETURNING.
+C IF ISTATE = 1 AND TOUT = T, THERE IS A RETURN WITH NO ACTION TAKEN,
+C EXCEPT THAT IF THIS HAS HAPPENED REPEATEDLY, THE RUN IS TERMINATED.
+C-----------------------------------------------------------------------
+ 400  DO 410 I = 1,NYH
+ 410    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420
+      IF (IHIT) T = TCRIT
+ 420   ISTATE = 2
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+ 430   NTREP = NTREP + 1
+      IF (NTREP .LT. 5) RETURN
+      CALL XERR ('ODESSA -- REPEATED CALLS WITH ISTATE = 1 AND
+     1TOUT = T (=R1)', 301, 1, 0, 0, 0, 1, T, ZERO)
+      GO TO 800
+C-----------------------------------------------------------------------
+C BLOCK H.
+C THE FOLLOWING BLOCK HANDLES ALL UNSUCCESSFUL RETURNS OTHER THAN
+C THOSE FOR ILLEGAL INPUT.  FIRST THE ERROR MESSAGE ROUTINE IS CALLED.
+C IF THERE WAS AN ERROR TEST OR CONVERGENCE TEST FAILURE, IMXER IS SET.
+C THEN Y IS LOADED FROM YH, T IS SET TO TN, AND THE ILLEGAL INPUT
+C COUNTER ILLIN IS SET TO 0.  THE OPTIONAL OUTPUTS ARE LOADED INTO
+C THE WORK ARRAYS BEFORE RETURNING.
+C-----------------------------------------------------------------------
+C THE MAXIMUM NUMBER OF STEPS WAS TAKEN BEFORE REACHING TOUT. ----------
+ 500  CALL XERR ('ODESSA - AT CURRENT T (=R1), MXSTEP (=I1) STEPS',
+     1   201, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('TAKEN ON THIS CALL BEFORE REACHING TOUT',
+     1   201, 1, 1, MXSTEP, 0, 1, TN, ZERO)
+      ISTATE = -1
+      GO TO 580
+C EWT(I) .LE. 0.0 FOR SOME I (NOT AT START OF PROBLEM). ----------------
+ 510   EWTI = RWORK(LEWT+I-1)
+      CALL XERR ('ODESSA - AT T (=R1), EWT(I1) HAS BECOME R2 .LE. 0.',
+     1   202, 1, 1, I, 0, 2, TN, EWTI)
+      ISTATE = -6
+      GO TO 580
+C TOO MUCH ACCURACY REQUESTED FOR MACHINE PRECISION. -------------------
+ 520  CALL XERR ('ODESSA - AT T (=R1), TOO MUCH ACCURACY REQUESTED',
+     1  203, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('FOR PRECISION OF MACHINE..  SEE TOLSF (=R2)',
+     1  203, 1, 0, 0, 0, 2, TN, TOLSF)
+      RWORK(14) = TOLSF
+      ISTATE = -2
+      GO TO 580
+C KFLAG = -1.  ERROR TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN. -----
+ 530  CALL XERR ('ODESSA - AT T(=R1) AND STEP SIZE H(=R2), THE ERROR',
+     1  204, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN',
+     1  204, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -4
+      GO TO 560
+C KFLAG = -2.  CONVERGENCE FAILED REPEATEDLY OR WITH ABS(H) = HMIN. ----
+ 540  CALL XERR ('ODESSA - AT T (=R1) AND STEP SIZE H (=R2), THE',
+     1  205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('CORRECTOR CONVERGENCE FAILED REPEATEDLY',
+     1   205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('OR WITH ABS(H) = HMIN',
+     1   205, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -5
+C COMPUTE IMXER IF RELEVANT. -------------------------------------------
+ 560   BIG = ZERO
+      IMXER = 1
+      DO 570 I = 1,NYH
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1))
+        IF (BIG .GE. SIZE) GO TO 570
+        BIG = SIZE
+        IMXER = I
+ 570    CONTINUE
+      IWORK(16) = IMXER
+C SET Y VECTOR, T, ILLIN, AND OPTIONAL OUTPUTS. ------------------------
+ 580   DO 590 I = 1,NYH
+ 590    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+C-----------------------------------------------------------------------
+C BLOCK I.
+C THE FOLLOWING BLOCK HANDLES ALL ERROR RETURNS DUE TO ILLEGAL INPUT
+C (ISTATE = -3), AS DETECTED BEFORE CALLING THE CORE INTEGRATOR.
+C FIRST THE ERROR MESSAGE ROUTINE IS CALLED.  THEN IF THERE HAVE BEEN
+C 5 CONSECUTIVE SUCH RETURNS JUST BEFORE THIS CALL TO THE KppSolveR,
+C THE RUN IS HALTED.
+C-----------------------------------------------------------------------
+ 601   CALL XERR ('ODESSA - ISTATE (=I1) ILLEGAL',
+     1  1, 1, 1, ISTATE, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 602   CALL XERR ('ODESSA - ITASK (=I1) ILLEGAL',
+     1  2, 1, 1, ITASK, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 603  CALL XERR ('ODESSA - ISTATE .GT. 1 BUT ODESSA NOT INITIALIZED',
+     1  3, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 604   CALL XERR ('ODESSA - NEQ (=I1) .LT. 1',
+     1  4, 1, 1, NEQ(1), 0, 0, ZERO,ZERO)
+      GO TO 700
+ 605  CALL XERR ('ODESSA - ISTATE = 3 AND NEQ CHANGED.  (I1 TO I2)',
+     1  5, 1, 2, N, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 606   CALL XERR ('ODESSA - ITOL (=I1) ILLEGAL',
+     1  6, 1, 1, ITOL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 607   CALL XERR ('ODESSA - IOPT (=I1) ILLEGAL',
+     1   7, 1, 1, IOPT, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 608   CALL XERR('ODESSA - MF (=I1) ILLEGAL',
+     1   8, 1, 1, MF, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 609  CALL XERR('ODESSA - ML (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   9, 1, 2, ML, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 610  CALL XERR('ODESSA - MU (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   10, 1, 2, MU, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 611   CALL XERR('ODESSA - MAXORD (=I1) .LT. 0',
+     1   11, 1, 1, MAXORD, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 612   CALL XERR('ODESSA - MXSTEP (=I1) .LT. 0',
+     1   12, 1, 1, MXSTEP, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 613   CALL XERR('ODESSA - MXHNIL (=I1) .LT. 0',
+     1   13, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 614   CALL XERR('ODESSA - TOUT (=R1) BEHIND T (=R2)',
+     1   14, 1, 0, 0, 0, 2, TOUT, T)
+      CALL XERR('INTEGRATION DIRECTION IS GIVEN BY H0 (=R1)',
+     1   14, 1, 0, 0, 0, 1, H0, ZERO)
+      GO TO 700
+ 615   CALL XERR('ODESSA - HMAX (=R1) .LT. 0.0',
+     1   15, 1, 0, 0, 0, 1, HMAX, ZERO)
+      GO TO 700
+ 616   CALL XERR('ODESSA - HMIN (=R1) .LT. 0.0',
+     1   16, 1, 0, 0, 0, 1, HMIN, ZERO)
+      GO TO 700
+ 617  CALL XERR('ODESSA - RWORK LENGTH NEEDED, LENRW (=I1), EXCEEDS
+     1 LRW (=I2)', 17, 1, 2, LENRW, LRW, 0, ZERO,ZERO)
+      GO TO 700
+ 618  CALL XERR('ODESSA - IWORK LENGTH NEEDED, LENIW (=I1), EXCEEDS
+     1 LIW (=I2)', 18, 1, 2, LENIW, LIW, 0, ZERO,ZERO)
+      GO TO 700
+ 619   CALL XERR('ODESSA - RTOL(I1) IS R1 .LT. 0.0',
+     1   19, 1, 1, I, 0, 1, RTOLI, ZREO)
+      GO TO 700
+ 620   CALL XERR('ODESSA - ATOL(I1) IS R1 .LT. 0.0',
+     1   20, 1, 1, I, 0, 1, ATOLI, ZERO)
+      GO TO 700
+*
+ 621   EWTI = RWORK(LEWT+I-1)
+      CALL XERR('ODESSA - EWT(I1) IS R1 .LE. 0.0',
+     1   21, 1, 1, I, 0, 1, EWTI, ZERO)
+      GO TO 700
+ 622  CALL XERR('ODESSA - TOUT (=R1) TOO CLOSE TO T(=R2) TO START
+     1 INTEGRATION', 22, 1, 0, 0, 0, 2, TOUT, T)
+      GO TO 700
+ 623  CALL XERR('ODESSA - ITASK = I1 AND TOUT (=R1) BEHIND TCUR - HU
+     1 (= R2)', 23, 1, 1, ITASK, 0, 2, TOUT, TP)
+      GO TO 700
+ 624  CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TCUR
+     1 (=R2)', 24, 1, 0, 0, 0, 2, TCRIT, TN)
+      GO TO 700
+ 625   CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TOUT
+     1 (=R2)', 25, 1, 0, 0, 0, 2, TCRIT, TOUT)
+      GO TO 700
+ 626  CALL XERR('ODESSA - AT START OF PROBLEM, TOO MUCH ACCURACY',
+     1   26, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR('REQUESTED FOR PRECISION OF MACHINE. SEE TOLSF (=R1)',
+     1   26, 1, 0, 0, 0, 1, TOLSF, ZERO)
+      RWORK(14) = TOLSF
+      GO TO 700
+ 627  CALL XERR('ODESSA - TROUBLE FROM INTDY. ITASK = I1, TOUT = R1',
+     1   27, 1, 1, ITASK, 0, 1, TOUT, ZERO)
+      GO TO 700
+C ERROR STATEMENTS ASSOCIATED WITH SENSITIVITY ANALYSIS.
+ 628  CALL XERR('ODESSA - NPAR (=I1) .LT. 1',
+     1   28, 1, 1, NPAR, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 629  CALL XERR('ODESSA - ISTATE = 3 AND NPAR CHANGED (I1 TO I2)',
+     1   29, 1, 2, NP, NPAR, 0, ZERO,ZERO)
+      GO TO 700
+ 630  CALL XERR('ODESSA - MITER (=I1) ILLEGAL',
+     1   30, 1, 1, MITER, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 631  CALL XERR('ODESSA - TROUBLE IN SPRIME (IERPJ)',
+     1   31, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 632  CALL XERR('ODESSA - TROUBLE IN SPRIME (MITER)',
+     1   32, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 633  CALL XERR('ODESSA - FATAL ERROR IN STODE (KFLAG = -3)',
+     1   33, 2, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 801
+C
+ 700   IF (ILLIN .EQ. 5) GO TO 710
+      ILLIN = ILLIN + 1
+      ISTATE = -3
+      RETURN
+ 710  CALL XERR('ODESSA - REPEATED OCCURRENCES OF ILLEGAL INPUT',
+     1   302, 1, 0, 0, 0, 0, ZERO,ZERO)
+C
+ 800  CALL XERR('ODESSA - RUN ABORTED.. APPARENT INFINITE LOOP',
+     1   303, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+ 801  CALL XERR('ODESSA - RUN ABORTED',
+     1   304, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+C-------------------- END OF SUBROUTINE ODESSA -------------------------
+      END
+      DOUBLE PRECISION FUNCTION ADDX(A,B)
+      DOUBLE PRECISION A,B
+C
+C  THIS FUNCTION IS NECESSARY TO FORCE OPTIMIZING COMPILERS TO
+C  EXECUTE AND STORE A SUM, FOR SUCCESSFUL EXECUTION OF THE
+C  TEST A + B = B.
+C
+      ADDX = A + B
+      RETURN
+C-------------------- END OF FUNCTION SUM ------------------------------
+      END
+      SUBROUTINE SPRIME (NEQ, Y, YH, NYH, NROW, NCOL, WM, IWM,
+     1  EWT, SAVF, FTEM, DFDP, PAR, F, JAC, DF, PJAC, PDF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION NEQ(*), Y(*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1  EWT(*), SAVF(*), FTEM(*), DFDP(NROW,*), PAR(*)
+      EXTERNAL F, JAC, DF, PJAC, PDF
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1  RDUM1(37),EL0, H, RDUM2(6),
+     2  IOWND1(14), IOWNS(4),
+     3  IDUM1(3), IERPJ, IDUM2(6),
+     4  MITER, IDUM3(4), N, IDUM4(5)
+      COMMON /ODE002/ RDUM3(3),
+     1  IOWND2(3), IDUM5, NSV, IDUM6, NSPE, IDUM7, IERSP, JOPT, IDUM8
+C-----------------------------------------------------------------------
+C SPRIME IS CALLED BY ODESSA TO INITIALIZE THE YH ARRAY. IT IS ALSO
+C CALLED BY STODE TO REEVALUATE FIRST ORDER DERIVATIVES WHEN KFLAG
+C .LE. -3. SPRIME COMPUTES THE FIRST DERIVATIVES OF THE SENSITIVITY
+C COEFFICIENTS WITH RESPECT TO THE INDEPENDENT VARIABLE T...
+C
+C        SPRIME = D(DY/DP)/DT = JAC*DY/DP + DF/DP
+C                   WHERE JAC = JACOBIAN MATRIX
+C                       DY/DP = SENSITIVITY MATRIX
+C                       DF/DP = INHOMOGENEITY MATRIX
+C THIS ROUTINE USES THE COMMON VARIABLES EL0, H, IERPJ, MITER, N,
+C NSV, NSPE, IERSP, JOPT
+C-----------------------------------------------------------------------
+C CALL PREPJ WITH JOPT = 1.
+C IF MITER = 2 OR 5, EL0 IS TEMPORARILY SET TO -1.0 AND H IS
+C TEMPORARILY SET TO 1.0D0.
+C-----------------------------------------------------------------------
+      NSPE = NSPE + 1
+      JOPT = 1
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 10
+      HTEMP = H
+      ETEMP = EL0
+      H = ONE
+      EL0 = -ONE
+ 10   CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 300
+      JOPT = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 20
+      H = HTEMP
+      EL0 = ETEMP
+C-----------------------------------------------------------------------
+C CALL PREPDF AND LOAD DFDP(*,JPAR).
+C-----------------------------------------------------------------------
+ 20   DO 30 J = 2,NSV
+        JPAR = J - 1
+        CALL PDF (NEQ, Y, WM, SAVF, FTEM, DFDP(1,JPAR), PAR,
+     1     F, DF, JPAR)
+ 30   CONTINUE
+C-----------------------------------------------------------------------
+C COMPUTE JAC*DY/DP AND STORE RESULTS IN YH(*,*,2).
+C-----------------------------------------------------------------------
+      GO TO (40,40,310,100,100) MITER
+C THE JACOBIAN IS FULL.------------------------------------------------
+C FOR EACH ROW OF THE JACOBIAN..
+ 40   DO 70 IROW = 1,N
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+        DO 60 J = 2,NSV
+          SUM = ZERO
+C TAKE THE VECTOR DOT PRODUCT..
+          DO 50 I = 1,N
+            IPD = IROW + N*(I-1) + 2
+            SUM = SUM + WM(IPD)*YH(I,J,1)
+ 50       CONTINUE
+          YH(IROW,J,2) = SUM
+ 60     CONTINUE
+ 70   CONTINUE
+      GO TO 200
+C THE JACOBIAN IS BANDED.-----------------------------------------------
+ 100  ML = IWM(1)
+      MU = IWM(2)
+      ICOUNT = 1
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      NMU = N - MU
+      ML1 = ML + 1
+C FOR EACH ROW OF THE JACOBIAN..
+      DO 160 IROW = 1,N
+        IF (IROW .GT. ML1) GO TO 110
+        IPD = MBAND + IROW + 1
+        IYH = 1
+        LBAND = MU + IROW
+        GO TO 120
+ 110    ICOUNT = ICOUNT + 1
+        IPD = ICOUNT*MEBAND + 2
+        IYH = IYH + 1
+        LBAND = LBAND - 1
+        IF (IROW .LE. NMU) LBAND = MBAND
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+ 120    DO 150 J = 2,NSV
+          SUM = ZERO
+          I1 = IPD
+          I2 = IYH
+C TAKE THE VECTOR DOT PRODUCT.
+          DO 140 I = 1,LBAND
+            SUM = SUM + WM(I1)*YH(I2,J,1)
+            I1 = I1 + MEBAND - 1
+            I2 = I2 + 1
+ 140      CONTINUE
+          YH(IROW,J,2) = SUM
+ 150    CONTINUE
+ 160  CONTINUE
+C-----------------------------------------------------------------------
+C ADD THE INHOMOGENEITY TERM, I.E., ADD DFDP(*,JPAR) TO YH(*,JPAR+1,2).
+C-----------------------------------------------------------------------
+ 200  DO 220 J = 2,NSV
+        JPAR = J - 1
+        DO 210 I = 1,N
+          YH(I,J,2) = YH(I,J,2) + DFDP(I,JPAR)
+ 210    CONTINUE
+ 220  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C ERROR RETURNS.
+C-----------------------------------------------------------------------
+ 300  IERSP = -1
+      RETURN
+ 310  IERSP = -2
+      RETURN
+C------------------------END OF SUBROUTINE SPRIME-----------------------
+      END
+      SUBROUTINE PREPJ (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, F, JAC, JOPT)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), FTEM(*), PAR(*)
+      EXTERNAL F, JAC
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(4), TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(3), IERPJ, IDUM2, JCUR, IDUM3(4),
+     5   MITER, IDUM4(4), N, IDUM5(2), NFE, NJE, IDUM6
+C-----------------------------------------------------------------------
+C PREPJ IS CALLED BY STODE TO COMPUTE AND PROCESS THE MATRIX
+C P = I - H*EL(1)*J , WHERE J IS AN APPROXIMATION TO THE JACOBIAN.
+C IF ISOPT = 1, PREPJ IS ALSO CALLED BY SPRIME WITH JOPT = 1.
+C HERE J IS COMPUTED BY THE USER-SUPPLIED ROUTINE JAC IF
+C MITER = 1 OR 4, OR BY FINITE DIFFERENCING IF MITER = 2, 3, OR 5.
+C IF MITER = 3, A DIAGONAL APPROXIMATION TO J IS USED.
+C J IS STORED IN WM AND REPLACED BY P.  IF MITER .NE. 3, P IS THEN
+C SUBJECTED TO LU DECOMPOSITION (JOPT = 0) IN PREPARATION FOR LATER
+C SOLUTION OF LINEAR SYSTEMS WITH P AS COEFFICIENT MATRIX. THIS IS
+C DONE BY DGEFA IF MITER = 1 OR 2, AND BY DGBFA IF MITER = 4 OR 5.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH PREPJ USES THE FOLLOWING..
+C Y     = ARRAY CONTAINING PREDICTED VALUES ON ENTRY.
+C FTEM  = WORK ARRAY OF LENGTH N (ACOR IN STODE).
+C SAVF  = ARRAY CONTAINING F EVALUATED AT PREDICTED Y.
+C WM    = REAL WORK SPACE FOR MATRICES.  ON OUTPUT IT CONTAINS THE
+C         INVERSE DIAGONAL MATRIX IF MITER = 3 AND THE LU DECOMPOSITION
+C         OF P IF MITER IS 1, 2 , 4, OR 5.
+C         STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C         WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C         WM(1) = SQRT(UROUND), USED IN NUMERICAL JACOBIAN INCREMENTS.
+C         WM(2) = H*EL0, SAVED FOR LATER USE IF MITER = 3.
+C IWM   = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C         IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C         PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C EL0   = EL(1) (INPUT).
+C IERPJ = OUTPUT ERROR FLAG,  = 0 IF NO TROUBLE, .GT. 0 IF
+C         P MATRIX FOUND TO BE SINGULAR.
+C JCUR  = OUTPUT FLAG = 1 TO INDICATE THAT THE JACOBIAN MATRIX
+C         (OR APPROXIMATION) IS NOW CURRENT.
+C JOPT  = INPUT JACOBIAN OPTION, = 1 IF JAC IS DESIRED ONLY.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, UROUND,
+C IERPJ, JCUR, MITER, N, NFE, AND NJE.
+C-----------------------------------------------------------------------
+      NJE = NJE + 1
+      IERPJ = 0
+      JCUR = 1
+      HL0 = H*EL0
+      GO TO (100, 200, 300, 400, 500), MITER
+C IF MITER = 1, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+ 100   LENP = N*N
+      DO 110 I = 1,LENP
+ 110    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, 0, 0, WM(3), N)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 120 I = 1,LENP
+ 120    WM(I+2) = WM(I+2)*CON
+      GO TO 240
+C IF MITER = 2, MAKE N CALLS TO F TO APPROXIMATE J. --------------------
+ 200   FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      SRUR = WM(1)
+      J1 = 2
+      DO 230 J = 1,N
+        YJ = Y(J)
+        R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+        Y(J) = Y(J) + R
+        FAC = -HL0/R
+        CALL F (NEQ, TN, Y, PAR, FTEM)
+        DO 220 I = 1,N
+ 220      WM(I+J1) = (FTEM(I) - SAVF(I))*FAC
+        Y(J) = YJ
+        J1 = J1 + N
+ 230    CONTINUE
+      NFE = NFE + N
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 240   J = 3
+      DO 250 I = 1,N
+        WM(J) = WM(J) + ONE
+ 250    J = J + (N + 1)
+C DO LU DECOMPOSITION ON P. --------------------------------------------
+      CALL DGEFA (WM(3), N, N, IWM(21), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C IF MITER = 3, CONSTRUCT A DIAGONAL APPROXIMATION TO J AND P. ---------
+ 300   WM(2) = HL0
+      R = EL0*0.1D0
+      DO 310 I = 1,N
+ 310    Y(I) = Y(I) + R*(H*SAVF(I) - YH(I,2))
+      CALL F (NEQ, TN, Y, PAR, WM(3))
+      NFE = NFE + 1
+      DO 320 I = 1,N
+        R0 = H*SAVF(I) - YH(I,2)
+        DI = 0.1D0*R0 - H*(WM(I+2) - SAVF(I))
+        WM(I+2) = 1.0D0
+        IF (ABS(R0) .LT. UROUND/EWT(I)) GO TO 320
+        IF (ABS(DI) .EQ. ZERO) GO TO 330
+        WM(I+2) = 0.1D0*R0/DI
+ 320    CONTINUE
+      RETURN
+ 330   IERPJ = 1
+      RETURN
+C IF MITER = 4, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      ML3 = ML + 3
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      LENP = MEBAND*N
+      DO 410 I = 1,LENP
+ 410    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, ML, MU, WM(ML3), MEBAND)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 420 I = 1,LENP
+ 420    WM(I+2) = WM(I+2)*CON
+      GO TO 570
+C IF MITER = 5, MAKE MBAND CALLS TO F TO APPROXIMATE J. ----------------
+ 500   ML = IWM(1)
+      MU = IWM(2)
+      MBAND = ML + MU + 1
+      MBA = MIN(MBAND,N)
+      MEBAND = MBAND + ML
+      MEB1 = MEBAND - 1
+      SRUR = WM(1)
+      FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      DO 560 J = 1,MBA
+        DO 530 I = J,N,MBAND
+          YI = Y(I)
+          R = MAX(SRUR*ABS(YI),R0/EWT(I))
+ 530      Y(I) = Y(I) + R
+        CALL F (NEQ, TN, Y, PAR, FTEM)
+        DO 550 JJ = J,N,MBAND
+          Y(JJ) = YH(JJ,1)
+          YJJ = Y(JJ)
+          R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+          FAC = -HL0/R
+          I1 = MAX(JJ-MU,1)
+          I2 = MIN(JJ+ML,N)
+          II = JJ*MEB1 - ML + 2
+          DO 540 I = I1,I2
+ 540        WM(II+I) = (FTEM(I) - SAVF(I))*FAC
+ 550      CONTINUE
+ 560    CONTINUE
+      NFE = NFE + MBA
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 570   II = MBAND + 2
+      DO 580 I = 1,N
+        WM(II) = WM(II) + ONE
+ 580    II = II + MEBAND
+C DO LU DECOMPOSITION OF P. --------------------------------------------
+      CALL DGBFA (WM(3), MEBAND, N, ML, MU, IWM(21), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C----------------------- END OF SUBROUTINE PREPJ -----------------------
+      END
+      SUBROUTINE PREPDF (NEQ, Y, SRUR, SAVF, FTEM, DFDP, PAR,
+     1   F, DF, JPAR)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, DF
+      DIMENSION NEQ(*), Y(*), SAVF(*), FTEM(*), DFDP(*), PAR(*)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   RDUM1(43), TN, RDUM2,
+     2   IOWND1(14), IOWNS(4),
+     3   IDUM1(10), MITER, IDUM2(4), N, IDUM3(2), NFE, IDUM4(2)
+      COMMON /ODE002/ RDUM3(3),
+     1   IOWND2(3), IDUM5(2), NDFE, IDUM6, IDF, IDUM7(3)
+C-----------------------------------------------------------------------
+C PREPDF IS CALLED BY SPRIME AND STESA TO COMPUTE THE INHOMOGENEITY
+C VECTORS DF(I)/DP(JPAR). HERE DF/DP IS COMPUTED BY THE USER-SUPPLIED
+C ROUTINE DF IF IDF = 1, OR BY FINITE DIFFERENCING IF IDF = 0.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION WITH
+C PREPDF USES THE FOLLOWING..
+C Y     = REAL ARRAY OF LENGTH NYH CONTAINING DEPENDENT VARIABLES.
+C         PREPDF USES ONLY THE FIRST N ENTRIES OF Y(*).
+C SRUR  = SQRT(UROUND) (= WM(1)).
+C SAVF  = REAL ARRAY OF LENGTH N CONTAINING DERIVATIVES DY/DT.
+C FTEM  = REAL ARRAY OF LENGTH N USED TO TEMPORARILY STORE DY/DT FOR
+C         NUMERICAL DIFFERENTIATION.
+C DFDP  = REAL ARRAY OF LENGTH N USED TO STORE DF(I)/DP(JPAR), I = 1,N.
+C PAR   = REAL ARRAY OF LENGTH NPAR CONTAINING EQUATION PARAMETERS
+C         OF INTEREST.
+C JPAR  = INPUT PARAMETER, 2 .LE. JPAR .LE. NSV, DESIGNATING THE
+C         APPROPRIATE SOLUTION VECTOR CORRESPONDING TO PAR(JPAR).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES TN, MITER, N, NFE, NDFE,
+C AND IDF.
+C-----------------------------------------------------------------------
+      NDFE = NDFE + 1
+      IDF1 = IDF + 1
+      GO TO (100, 200), IDF1
+C IDF = 0, CALL F TO APPROXIMATE DFDP. ---------------------------------
+ 100  RPAR = PAR(JPAR)
+      R = MAX(SRUR*ABS(RPAR),SRUR)
+      PAR(JPAR) = RPAR + R
+      FAC = 1.0D0/R
+      CALL F (NEQ, TN, Y, PAR, FTEM)
+      DO 110 I = 1,N
+ 110    DFDP(I) = (FTEM(I) - SAVF(I))*FAC
+      PAR(JPAR) = RPAR
+      NFE = NFE + 1
+      RETURN
+C IDF = 1, CALL USER SUPPLIED DF. --------------------------------------
+ 200  DO 210 I = 1,N
+ 210    DFDP(I) = 0.0D0
+      CALL DF (NEQ, TN, Y, PAR, DFDP, JPAR)
+      RETURN
+C -------------------- END OF SUBROUTINE PREPDF ------------------------
+      END
+      SUBROUTINE INTDY (T, K, YH, NYH, DKY, IFLAG)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION YH(NYH,1), DKY(1)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(38),H, RDUM2(2), HU, RDUM3, TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(8), L, IDUM2,
+     5   IDUM3(5), N, NQ, IDUM4(4)
+C-----------------------------------------------------------------------
+C INTDY COMPUTES INTERPOLATED VALUES OF THE K-TH DERIVATIVE OF THE
+C DEPENDENT VARIABLE VECTOR Y, AND STORES IT IN DKY.  THIS ROUTINE
+C IS CALLED WITHIN THE PACKAGE WITH K = 0 AND T = TOUT, BUT MAY
+C ALSO BE CALLED BY THE USER FOR ANY K UP TO THE CURRENT ORDER.
+C (SEE DETAILED INSTRUCTIONS IN THE USAGE DOCUMENTATION.)
+C-----------------------------------------------------------------------
+C THE COMPUTED VALUES IN DKY ARE GOTTEN BY INTERPOLATION USING THE
+C NORDSIECK HISTORY ARRAY YH.  THIS ARRAY CORRESPONDS UNIQUELY TO A
+C VECTOR-VALUED POLYNOMIAL OF DEGREE NQCUR OR LESS, AND DKY IS SET
+C TO THE K-TH DERIVATIVE OF THIS POLYNOMIAL AT T.
+C THE FORMULA FOR DKY IS..
+C             Q
+C  DKY(I)  =  SUM  C(J,K) * (T - TN)**(J-K) * H**(-J) * YH(I,J+1)
+C            J=K
+C WHERE  C(J,K) = J*(J-1)*...*(J-K+1), Q = NQCUR, TN = TCUR, H = HCUR.
+C THE QUANTITIES  NQ = NQCUR, L = NQ+1, N = NEQ, TN, AND H ARE
+C COMMUNICATED BY COMMON.  THE ABOVE SUM IS DONE IN REVERSE ORDER.
+C IFLAG IS RETURNED NEGATIVE IF EITHER K OR T IS OUT OF BOUNDS.
+C-----------------------------------------------------------------------
+      IFLAG = 0
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
+      TP = TN - HU*(1.0D0 + 100.0D0*UROUND)
+      IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90
+C
+      S = (T - TN)/H
+      IC = 1
+      IF (K .EQ. 0) GO TO 15
+      JJ1 = L - K
+      DO 10 JJ = JJ1,NQ
+ 10     IC = IC*JJ
+ 15   C = REAL(IC)
+      DO 20 I = 1,NYH
+ 20     DKY(I) = C*YH(I,L)
+      IF (K .EQ. NQ) GO TO 55
+      JB2 = NQ - K
+      DO 50 JB = 1,JB2
+        J = NQ - JB
+        JP1 = J + 1
+        IC = 1
+        IF (K .EQ. 0) GO TO 35
+        JJ1 = JP1 - K
+        DO 30 JJ = JJ1,J
+ 30       IC = IC*JJ
+ 35     C = REAL(IC)
+        DO 40 I = 1,NYH
+ 40       DKY(I) = C*YH(I,JP1) + S*DKY(I)
+ 50     CONTINUE
+      IF (K .EQ. 0) RETURN
+ 55   R = H**(-K)
+      DO 60 I = 1,NYH
+ 60     DKY(I) = R*DKY(I)
+      RETURN
+C
+ 80   CALL XERR('INTDY--  K (=I1) ILLEGAL',
+     1  51, 1, 1, K, 0, 0, ZERO,ZERO)
+      IFLAG = -1
+      RETURN
+ 90   CALL XERR ('INTDY--  T (=R1) ILLEGAL',
+     1   52, 1, 0, 0, 0, 1, T, ZERO)
+      CALL XERR('T NOT IN INTERVAL TCUR - HU (= R1) TO TCUR (=R2)',
+     1   52, 1, 0, 0, 0, 2, TP, TN)
+      IFLAG = -2
+      RETURN
+C----------------------- END OF SUBROUTINE INTDY -----------------------
+      END
+      SUBROUTINE STESA (NEQ, Y, NROW, NCOL, YH, WM, IWM, EWT, SAVF,
+     1   ACOR, PAR, NRS, F, JAC, DF, PJAC, PDF, KppSolve)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, KppSolve
+      DIMENSION NEQ(*), Y(NROW,*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1   EWT(NROW,*), SAVF(*), ACOR(NROW,*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   TESCO(3,12), RDUM1, EL0, H, RDUM2(4), TN, RDUM3,
+     2   IOWND1(14), IOWNS(4),
+     3   IALTH, LMAX, IDUM1, IERPJ, IERSL, JCUR, IDUM2, KFLAG, L, IDUM3,
+     4   MITER, IDUM4(4), N, NQ, IDUM5, NFE, IDUM6(2)
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), IDUM7, NSV, IDUM8(2), IDF, IDUM9, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STESA IS CALLED BY STODE TO PERFORM AN EXPLICIT CALCULATION FOR THE
+C FIRST-ORDER SENSITIVITY COEFFICIENTS DY(I)/DP(J), I = 1,N; J = 1,NPAR.
+C
+C IN ADDITION TO THE VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH STESA USES THE FOLLOWING..
+C Y      = AN NROW (=N) BY NCOL (=NSV) REAL ARRAY CONTAINING THE
+C          CORRECTED DEPENDENT VARIABLES ON OUTPUT..
+C                  Y(I,1) , I = 1,N = STATE VARIABLES (INPUT);
+C                  Y(I,J) , I = 1,N , J = 2,NSV ,
+C                           = SENSITIVITY COEFFICIENTS, DY(I)/DP(J).
+C YH     = AN N BY NSV BY LMAX REAL ARRAY CONTAINING THE PREDICTED
+C          DEPENDENT VARIABLES AND THEIR APPROXIMATE SCALED DERIVATIVES.
+C SAVF   = A REAL ARRAY OF LENGTH N USED TO STORE FIRST DERIVATIVES
+C          OF DEPENDENT VARIABLES IF MITER = 2 OR 5.
+C PAR    = A REAL ARRAY OF LENGTH NPAR CONTAINING THE EQUATION
+C          PARAMETERS OF INTEREST.
+C NRS    = AN INTEGER ARRAY OF LENGTH NPAR + 1 CONTAINING THE NUMBER
+C          OF REPEATED STEPS (KFLAGS .LT. 0) DUE TO THE SENSITIVITY
+C          CALCULATIONS..
+C                  NRS(1) = TOTAL NUMBER OF REPEATED STEPS
+C                  NRS(I) , I = 2,NPAR = NUMBER OF REPEATED STEPS DUE
+C                                        TO PARAMETER I.
+C NSV    = NUMBER OF SOLUTION VECTORS = NPAR + 1.
+C KFLAGS = LOCAL ERROR TEST FLAG, = 0 IF TEST PASSES, .LT. 0 IF TEST
+C          FAILS, AND STEP NEEDS TO BE REPEATED. ERROR TEST IS APPLIED
+C          TO EACH SOLUTION VECTOR INDEPENDENTLY.
+C DUPS, DSMS, DDNS = REAL SCALARS USED FOR COMPUTING RHUP, RHSM, RHDN,
+C                    ON RETURN TO STODE (IALTH .EQ. 1).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, IALTH, LMAX,
+C IERPJ, IERSL, JCUR, KFLAG, L, MITER, N, NQ, NFE, AND JOPT.
+C-----------------------------------------------------------------------
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      HL0 = H*EL0
+      EL0I = ONE/EL0
+      TI2 = ONE/TESCO(2,NQ)
+      TI3 = ONE/TESCO(3,NQ)
+C IF MITER = 2 OR 5 (OR IDF = 0), SUPPLY DERIVATIVES AT CORRECTED
+C Y(*,1) VALUES FOR NUMERICAL DIFFERENTIATION IN PJAC AND/OR PDF.
+      IF (MITER .EQ. 2  .OR.  MITER .EQ. 5  .OR.  IDF .EQ. 0)  GO TO 10
+      GO TO 15
+ 10   CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+C IF JCUR = 0, UPDATE THE JACOBIAN MATRIX.
+C IF MITER = 5, LOAD CORRECTED Y(*,1) VALUES INTO Y(*,2).
+ 15   IF (JCUR .EQ. 1) GO TO 30
+      IF (MITER .NE. 5) GO TO 25
+      DO 20 I = 1,N
+ 20     Y(I,2) = Y(I,1)
+ 25   CALL PJAC (NEQ, Y, Y(1,2), N, WM, IWM, EWT, SAVF, ACOR(1,2),
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) RETURN
+C-----------------------------------------------------------------------
+C THIS IS A LOOPING POINT FOR THE SENSITIVITY CALCULATIONS.
+C-----------------------------------------------------------------------
+C FOR EACH PARAMETER PAR(*), A SENSITIVITY SOLUTION VECTOR IS COMPUTED
+C USING THE SAME STEP SIZE (H) AND ORDER (NQ) AS IN STODE.
+C A LOCAL ERROR TEST IS APPLIED INDEPENDENTLY TO EACH SOLUTION VECTOR.
+C-----------------------------------------------------------------------
+ 30   DO 100 J = 2,NSV
+        JPAR = J - 1
+C EVALUATE INHOMOGENEITY TERM, TEMPORARILY LOAD INTO Y(*,JPAR+1). ------
+        CALL PDF(NEQ, Y, WM, SAVF, ACOR(1,J), Y(1,J), PAR,
+     1     F, DF, JPAR)
+C-----------------------------------------------------------------------
+C LOAD RHS OF SENSITIVITY SOLUTION (CORRECTOR) EQUATION..
+C
+C       RHS = DY/DP - EL(1)*H*D(DY/DP)/DT + EL(1)*H*DF/DP
+C
+C-----------------------------------------------------------------------
+        DO 40 I = 1,N
+ 40       Y(I,J) = YH(I,J,1) - EL0*YH(I,J,2) + HL0*Y(I,J)
+C-----------------------------------------------------------------------
+C KppSolve CORRECTOR EQUATION: THE SOLUTIONS ARE LOCATED IN Y(*,JPAR+1).
+C THE EXPLICIT FORMULA IS..
+C
+C       (I - EL(1)*H*JAC) * DY/DP(CORRECTED) = RHS
+C
+C-----------------------------------------------------------------------
+        CALL KppSolve (WM, IWM, Y(1,J), DUM)
+        IF (IERSL .NE. 0) RETURN
+C ESTIMATE LOCAL TRUNCATION ERROR. -------------------------------------
+        DO 50 I = 1,N
+ 50       ACOR(I,J) = (Y(I,J) - YH(I,J,1))*EL0I
+        ERR = VNORM(N, ACOR(1,J), EWT(1,J))*TI2
+        IF (ERR .GT. ONE) GO TO 200
+C-----------------------------------------------------------------------
+C LOCAL ERROR TEST PASSED. SET KFLAGS TO 0 TO INDICATE THIS.
+C IF IALTH = 1, COMPUTE DSMS, DDNS, AND DUPS (IF L .LT. LMAX).
+C-----------------------------------------------------------------------
+        KFLAGS = 0
+        IF (IALTH .GT. 1) GO TO 100
+        IF (L .EQ. LMAX) GO TO 70
+        DO 60 I= 1,N
+ 60       Y(I,J) = ACOR(I,J) - YH(I,J,LMAX)
+        DUPS = MAX(DUPS,VNORM(N,Y(1,J),EWT(1,J))*TI3)
+ 70     DSMS = MAX(DSMS,ERR)
+ 100  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C THIS SECTION IS REACHED IF THE ERROR TOLERANCE FOR SENSITIVITY
+C SOLUTION VECTOR JPAR HAS BEEN VIOLATED. KFLAGS IS MADE NEGATIVE TO
+C INDICATE THIS. IF KFLAGS = -1, SET KFLAG EQUAL TO ZERO SO THAT KFLAG
+C IS SET TO -1 ON RETURN TO STODE BEFORE REPEATING THE STEP.
+C INCREMENT NRS(1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO ALL
+C SENSITIVITY SOLUTION VECTORS) BY ONE.
+C INCREMENT NRS(JPAR+1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO
+C SOLUTION VECTOR JPAR+1) BY ONE.
+C LOAD DSMS FOR RH CALCULATION IN STODE.
+C-----------------------------------------------------------------------
+ 200  KFLAGS = KFLAGS - 1
+      IF (KFLAGS .EQ. -1) KFLAG = 0
+      NRS(1) = NRS(1) + 1
+      NRS(J) = NRS(J) + 1
+      DSMS = ERR
+      RETURN
+C------------------------ END OF SUBROUTINE STESA ----------------------
+      END
+      SUBROUTINE STODE (NEQ, Y, YH, NYH, YH1, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, SLVS
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), YH1(*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), ACOR(*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND,
+     1   CONIT, CRATE, EL(13), ELCO(13,12), HOLD, RMAX,
+     2   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     3   IOWND1(14), IPUP, MEO, NQNYH, NSLP,
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STODE PERFORMS ONE STEP OF THE INTEGRATION OF AN INITIAL VALUE
+C PROBLEM FOR A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS.
+C NOTE.. STODE IS INDEPENDENT OF THE VALUE OF THE ITERATION METHOD
+C INDICATOR MITER, WHEN THIS IS .NE. 0, AND HENCE IS INDEPENDENT
+C OF THE TYPE OF CHORD METHOD USED, OR THE JACOBIAN STRUCTURE.
+C FOR ISOPT = 1, STODE CALLS STESA FOR SENSITIVITY CALCULATIONS.
+C VARIABLES USED FOR COMMUNICATION WITH STESA ARE DESCRIBED IN STESA.
+C COMMUNICATION WITH STODE IS DONE WITH THE FOLLOWING VARIABLES..
+C
+C NEQ   = INTEGER ARRAY CONTAINING PROBLEM SIZE IN NEQ(1), AND
+C         NUMBER OF PARAMETERS TO BE CONSIDERED IN THE SENSITIVITY
+C         ANALYSIS NEQ(2) (FOR ISOPT = 1), AND PASSED AS THE
+C         NEQ ARGUMENT IN ALL CALLS TO F,  JAC, AND DF.
+C Y     = AN ARRAY OF LENGTH .GE. N USED AS THE Y ARGUMENT IN
+C         ALL CALLS TO F, JAC, AND DF.
+C YH    = AN NYH BY LMAX ARRAY CONTAINING THE DEPENDENT VARIABLES
+C         AND THEIR APPROXIMATE SCALED DERIVATIVES, WHERE
+C         LMAX = MAXORD + 1.  YH(I,J+1) CONTAINS THE APPROXIMATE
+C         J-TH DERIVATIVE OF Y(I), SCALED BY H**J/FACTORIAL(J)
+C         (J = 0,1,...,NQ).  ON ENTRY FOR THE FIRST STEP, THE FIRST
+C         TWO COLUMNS OF YH MUST BE SET FROM THE INITIAL VALUES.
+C NYH   = A CONSTANT INTEGER .GE. N, THE FIRST DIMENSION OF YH.
+C         THE TOTAL NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS..
+C         NYH = N, ISOPT = 0,
+C         NYH = N * (NPAR + 1), ISOPT = 1
+C YH1   = A ONE-DIMENSIONAL ARRAY OCCUPYING THE SAME SPACE AS YH.
+C EWT   = AN ARRAY OF LENGTH NYH CONTAINING MULTIPLICATIVE WEIGHTS
+C         FOR LOCAL ERROR MEASUREMENTS.  LOCAL ERRORS IN Y(I) ARE
+C         COMPARED TO 1.0/EWT(I) IN VARIOUS ERROR TESTS.
+C SAVF  = AN ARRAY OF WORKING STORAGE, OF LENGTH N.
+C         ALSO USED FOR INPUT OF YH(*,MAXORD+2) WHEN JSTART = -1
+C         AND MAXORD .LT. THE CURRENT ORDER NQ.
+C ACOR  = A WORK ARRAY OF LENGTH NYH, USED FOR THE ACCUMULATED
+C         CORRECTIONS.  ON A SUCCESSFUL RETURN, ACOR(I) CONTAINS
+C         THE ESTIMATED ONE-STEP LOCAL ERROR IN Y(I).
+C WM,IWM = REAL AND INTEGER WORK ARRAYS ASSOCIATED WITH MATRIX
+C         OPERATIONS IN CHORD ITERATION (MITER .NE. 0).
+C PJAC  = NAME OF ROUTINE TO EVALUATE AND PREPROCESS JACOBIAN MATRIX
+C         AND P = I - H*EL0*JAC, IF A CHORD METHOD IS BEING USED.
+C         IF ISOPT = 1, PJAC CAN BE CALLED TO CALCULATE JAC BY
+C         SETTING JOPT = 1.
+C SLVS  = NAME OF ROUTINE TO KppSolve LINEAR SYSTEM IN CHORD ITERATION.
+C CCMAX  = MAXIMUM RELATIVE CHANGE IN H*EL0 BEFORE PJAC IS CALLED.
+C H     = THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C         H IS ALTERED BY THE ERROR CONTROL ALGORITHM DURING THE
+C         PROBLEM.  H CAN BE EITHER POSITIVE OR NEGATIVE, BUT ITS
+C         SIGN MUST REMAIN CONSTANT THROUGHOUT THE PROBLEM.
+C HMIN  = THE MINIMUM ABSOLUTE VALUE OF THE STEP SIZE H TO BE USED.
+C HMXI  = INVERSE OF THE MAXIMUM ABSOLUTE VALUE OF H TO BE USED.
+C         HMXI = 0.0 IS ALLOWED AND CORRESPONDS TO AN INFINITE HMAX.
+C         HMIN AND HMXI MAY BE CHANGED AT ANY TIME, BUT WILL NOT
+C         TAKE EFFECT UNTIL THE NEXT CHANGE OF H IS CONSIDERED.
+C TN    = THE INDEPENDENT VARIABLE. TN IS UPDATED ON EACH STEP TAKEN.
+C JSTART = AN INTEGER USED FOR INPUT ONLY, WITH THE FOLLOWING
+C         VALUES AND MEANINGS..
+C              0  PERFORM THE FIRST STEP.
+C          .GT.0  TAKE A NEW STEP CONTINUING FROM THE LAST.
+C             -1  TAKE THE NEXT STEP WITH A NEW VALUE OF H, MAXORD,
+C                   N, METH, OR MITER.
+C             -2  TAKE THE NEXT STEP WITH A NEW VALUE OF H,
+C                   BUT WITH OTHER INPUTS UNCHANGED.
+C         ON RETURN, JSTART IS SET TO 1 TO FACILITATE CONTINUATION.
+C KFLAG  = A COMPLETION CODE WITH THE FOLLOWING MEANINGS..
+C              0  THE STEP WAS SUCCESFUL.
+C             -1  THE REQUESTED ERROR COULD NOT BE ACHIEVED.
+C             -2  CORRECTOR CONVERGENCE COULD NOT BE ACHIEVED.
+C             -3  FATAL ERROR IN PJAC, OR SLVS, (OR STESA).
+C         A RETURN WITH KFLAG = -1 OR -2 MEANS EITHER
+C         ABS(H) = HMIN OR 10 CONSECUTIVE FAILURES OCCURRED.
+C         ON A RETURN WITH KFLAG NEGATIVE, THE VALUES OF TN AND
+C         THE YH ARRAY ARE AS OF THE BEGINNING OF THE LAST
+C         STEP, AND H IS THE LAST STEP SIZE ATTEMPTED.
+C MAXORD = THE MAXIMUM ORDER OF INTEGRATION METHOD TO BE ALLOWED.
+C MAXCOR = THE MAXIMUM NUMBER OF CORRECTOR ITERATIONS ALLOWED.
+C          (= 3, IF ISOPT = 0)
+C          (= 4, IF ISOPT = 1)
+C MSBP  = MAXIMUM NUMBER OF STEPS BETWEEN PJAC CALLS (MITER .GT. 0).
+C         IF ISOPT = 1, PJAC IS CALLED AT LEAST ONCE EVERY STEP.
+C MXNCF  = MAXIMUM NUMBER OF CONVERGENCE FAILURES ALLOWED.
+C METH/MITER = THE METHOD FLAGS.  SEE DESCRIPTION IN DRIVER.
+C N     = THE NUMBER OF FIRST-ORDER MODEL DIFFERENTIAL EQUATIONS.
+C-----------------------------------------------------------------------
+      KFLAG = 0
+      KFLAGS = 0
+      TOLD = TN
+      NCF = 0
+      IERPJ = 0
+      IERSL = 0
+      JCUR = 0
+      ICF = 0
+      IF (JSTART .GT. 0) GO TO 200
+      IF (JSTART .EQ. -1) GO TO 100
+      IF (JSTART .EQ. -2) GO TO 160
+C-----------------------------------------------------------------------
+C ON THE FIRST CALL, THE ORDER IS SET TO 1, AND OTHER VARIABLES ARE
+C INITIALIZED.  RMAX IS THE MAXIMUM RATIO BY WHICH H CAN BE INCREASED
+C IN A SINGLE STEP.  IT IS INITIALLY 1.E4 TO COMPENSATE FOR THE SMALL
+C INITIAL H, BUT THEN IS NORMALLY EQUAL TO 10.  IF A FAILURE
+C OCCURS (IN CORRECTOR CONVERGENCE OR ERROR TEST), RMAX IS SET AT 2
+C FOR THE NEXT INCREASE.
+C THESE COMPUTATIONS CONSIDER ONLY THE ORIGINAL SOLUTION VECTOR.
+C THE SENSITIVITY SOLUTION VECTORS ARE CONSIDERED IN STESA (ISOPT = 1).
+C-----------------------------------------------------------------------
+      LMAX = MAXORD + 1
+      NQ = 1
+      L = 2
+      IALTH = 2
+      RMAX = 10000.0D0
+      RC = ZERO
+      EL0 = ONE
+      CRATE = 0.7D0
+      DELP = ZERO
+      HOLD = H
+      MEO = METH
+      NSLP = 0
+      IPUP = MITER
+      IRET = 3
+      GO TO 140
+C-----------------------------------------------------------------------
+C THE FOLLOWING BLOCK HANDLES PRELIMINARIES NEEDED WHEN JSTART = -1.
+C IPUP IS SET TO MITER TO FORCE A MATRIX UPDATE.
+C IF AN ORDER INCREASE IS ABOUT TO BE CONSIDERED (IALTH = 1),
+C IALTH IS RESET TO 2 TO POSTPONE CONSIDERATION ONE MORE STEP.
+C IF THE CALLER HAS CHANGED METH, CFODE IS CALLED TO RESET
+C THE COEFFICIENTS OF THE METHOD.
+C IF THE CALLER HAS CHANGED MAXORD TO A VALUE LESS THAN THE CURRENT
+C ORDER NQ, NQ IS REDUCED TO MAXORD, AND A NEW H CHOSEN ACCORDINGLY.
+C IF H IS TO BE CHANGED, YH MUST BE RESCALED.
+C IF H OR METH IS BEING CHANGED, IALTH IS RESET TO L = NQ + 1
+C TO PREVENT FURTHER CHANGES IN H FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 100   IPUP = MITER
+      LMAX = MAXORD + 1
+      IF (IALTH .EQ. 1) IALTH = 2
+      IF (METH .EQ. MEO) GO TO 110
+      CALL CFODE (METH, ELCO, TESCO)
+      MEO = METH
+      IF (NQ .GT. MAXORD) GO TO 120
+      IALTH = L
+      IRET = 1
+      GO TO 150
+ 110   IF (NQ .LE. MAXORD) GO TO 160
+ 120   NQ = MAXORD
+      L = LMAX
+      DO 125 I = 1,L
+ 125    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      DDN = VNORM (N, SAVF, EWT)/TESCO(1,L)
+      EXDN = ONE/REAL(L)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+      RH = MIN(RHDN,ONE)
+      IREDO = 3
+      IF (H .EQ. HOLD) GO TO 170
+      RH = MIN(RH,ABS(H/HOLD))
+      H = HOLD
+      GO TO 175
+C-----------------------------------------------------------------------
+C CFODE IS CALLED TO GET ALL THE INTEGRATION COEFFICIENTS FOR THE
+C CURRENT METH.  THEN THE EL VECTOR AND RELATED CONSTANTS ARE RESET
+C WHENEVER THE ORDER NQ IS CHANGED, OR AT THE START OF THE PROBLEM.
+C-----------------------------------------------------------------------
+ 140   CALL CFODE (METH, ELCO, TESCO)
+ 150   DO 155 I = 1,L
+ 155    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      GO TO (160, 170, 200), IRET
+C-----------------------------------------------------------------------
+C IF H IS BEING CHANGED, THE H RATIO RH IS CHECKED AGAINST
+C RMAX, HMIN, AND HMXI, AND THE YH ARRAY RESCALED.  IALTH IS SET TO
+C L = NQ + 1 TO PREVENT A CHANGE OF H FOR THAT MANY STEPS, UNLESS
+C FORCED BY A CONVERGENCE OR ERROR TEST FAILURE.
+C-----------------------------------------------------------------------
+ 160  IF (H .EQ. HOLD) GO TO 200
+      RH = H/HOLD
+      H = HOLD
+      IREDO = 3
+      GO TO 175
+ 170   RH = MAX(RH,HMIN/ABS(H))
+ 175   RH = MIN(RH,RMAX)
+      RH = RH/MAX(ONE,ABS(H)*HMXI*RH)
+      R = ONE
+      DO 180 J = 2,L
+        R = R*RH
+        DO 180 I = 1,NYH
+ 180      YH(I,J) = YH(I,J)*R
+      H = H*RH
+      RC = RC*RH
+      IALTH = L
+      IF (IREDO .EQ. 0) GO TO 690
+C-----------------------------------------------------------------------
+C THIS SECTION COMPUTES THE PREDICTED VALUES BY EFFECTIVELY
+C MULTIPLYING THE YH ARRAY BY THE PASCAL TRIANGLE MATRIX.
+C RC IS THE RATIO OF NEW TO OLD VALUES OF THE COEFFICIENT  H*EL(1).
+C WHEN RC DIFFERS FROM 1 BY MORE THAN CCMAX, IPUP IS SET TO MITER
+C TO FORCE PJAC TO BE CALLED, IF A JACOBIAN IS INVOLVED.
+C IN ANY CASE, PJAC IS CALLED AT LEAST EVERY MSBP STEPS FOR ISOPT = 0,
+C AND AT LEAST ONCE EVERY STEP FOR ISOPT = 1.
+C-----------------------------------------------------------------------
+ 200  IF (ABS(RC-ONE) .GT. CCMAX) IPUP = MITER
+      IF (NST .GE. NSLP+MSBP) IPUP = MITER
+      TN = TN + H
+      I1 = NQNYH + 1
+      DO 215 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 210 I = I1,NQNYH
+ 210      YH1(I) = YH1(I) + YH1(I+NYH)
+ 215    CONTINUE
+C-----------------------------------------------------------------------
+C UP TO MAXCOR CORRECTOR ITERATIONS ARE TAKEN.  (= 3, FOR ISOPT = 0;
+C = 4, FOR ISOPT = 1).  A CONVERGENCE TEST IS MADE ON THE R.M.S. NORM
+C OF EACH CORRECTION, WEIGHTED BY THE ERROR WEIGHT VECTOR EWT.  THE SUM
+C OF THE CORRECTIONS IS ACCUMULATED IN THE VECTOR ACOR(I), I = 1,N.
+C (ACOR(I), I = N+1,NYH IS LOADED IN SUBROUTINE STESA (ISOPT = 1).)
+C THE YH ARRAY IS NOT ALTERED IN THE CORRECTOR LOOP.
+C-----------------------------------------------------------------------
+ 220  M = 0
+      DO 230 I = 1,N
+ 230    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (IPUP .LE. 0) GO TO 250
+C-----------------------------------------------------------------------
+C IF INDICATED, THE MATRIX P = I - H*EL(1)*J IS REEVALUATED AND
+C PREPROCESSED BEFORE STARTING THE CORRECTOR ITERATION.  IPUP IS SET
+C TO 0 AS AN INDICATOR THAT THIS HAS BEEN DONE.
+C-----------------------------------------------------------------------
+      IPUP = 0
+      RC = ONE
+      NSLP = NST
+      CRATE = 0.7D0
+      CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, ACOR, PAR,
+     1   F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 430
+ 250   DO 260 I = 1,N
+ 260    ACOR(I) = ZERO
+ 270   IF (MITER .NE. 0) GO TO 350
+C-----------------------------------------------------------------------
+C IN THE CASE OF FUNCTIONAL ITERATION, UPDATE Y DIRECTLY FROM
+C THE RESULT OF THE LAST FUNCTION EVALUATION.
+C (IF ISOPT = 1, FUNCTIONAL ITERATION IS NOT ALLOWED.)
+C-----------------------------------------------------------------------
+      DO 290 I = 1,N
+        SAVF(I) = H*SAVF(I) - YH(I,2)
+ 290    Y(I) = SAVF(I) - ACOR(I)
+      DEL = VNORM (N, Y, EWT)
+      DO 300 I = 1,N
+        Y(I) = YH(I,1) + EL(1)*SAVF(I)
+ 300    ACOR(I) = SAVF(I)
+      GO TO 400
+C-----------------------------------------------------------------------
+C IN THE CASE OF THE CHORD METHOD, COMPUTE THE CORRECTOR ERROR,
+C AND KppSolve THE LINEAR SYSTEM WITH THAT AS RIGHT-HAND SIDE AND
+C P AS COEFFICIENT MATRIX.
+C-----------------------------------------------------------------------
+ 350   DO 360 I = 1,N
+ 360    Y(I) = H*SAVF(I) - (YH(I,2) + ACOR(I))
+      CALL SLVS (WM, IWM, Y, SAVF)
+      IF (IERSL .LT. 0) GO TO 430
+      IF (IERSL .GT. 0) GO TO 410
+      DEL = VNORM (N, Y, EWT)
+      DO 380 I = 1,N
+        ACOR(I) = ACOR(I) + Y(I)
+ 380    Y(I) = YH(I,1) + EL(1)*ACOR(I)
+C-----------------------------------------------------------------------
+C TEST FOR CONVERGENCE.  IF M.GT.0, AN ESTIMATE OF THE CONVERGENCE
+C RATE CONSTANT IS STORED IN CRATE, AND THIS IS USED IN THE TEST.
+C-----------------------------------------------------------------------
+ 400   IF (M .NE. 0) CRATE = MAX(0.2D0*CRATE,DEL/DELP)
+      DCON = DEL*MIN(ONE,1.5D0*CRATE)/(TESCO(2,NQ)*CONIT)
+      IF (DCON .LE. ONE) GO TO 450
+      M = M + 1
+      IF (M .EQ. MAXCOR) GO TO 410
+      IF (M .GE. 2 .AND. DEL .GT. 2.0D0*DELP) GO TO 410
+      DELP = DEL
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      GO TO 270
+C-----------------------------------------------------------------------
+C THE CORRECTOR ITERATION FAILED TO CONVERGE IN MAXCOR TRIES.
+C IF MITER .NE. 0 AND THE JACOBIAN IS OUT OF DATE, PJAC IS CALLED FOR
+C THE NEXT TRY.  OTHERWISE THE YH ARRAY IS RETRACTED TO ITS VALUES
+C BEFORE PREDICTION, AND H IS REDUCED, IF POSSIBLE.  IF H CANNOT BE
+C REDUCED OR MXNCF FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -2.
+C-----------------------------------------------------------------------
+ 410   IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430
+      ICF = 1
+      IPUP = MITER
+      GO TO 220
+ 430   ICF = 2
+      NCF = NCF + 1
+      RMAX = 2.0D0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 445 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 440 I = I1,NQNYH
+ 440      YH1(I) = YH1(I) - YH1(I+NYH)
+ 445    CONTINUE
+      IF (IERPJ .LT. 0 .OR. IERSL .LT. 0) GO TO 680
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 670
+      IF (NCF .EQ. MXNCF) GO TO 670
+      RH = 0.25D0
+      IPUP = MITER
+      IREDO = 1
+      GO TO 170
+C-----------------------------------------------------------------------
+C THE CORRECTOR HAS CONVERGED.
+C THE LOCAL ERROR TEST IS MADE AND CONTROL PASSES TO STATEMENT 500
+C IF IT FAILS. OTHERWISE, STESA IS CALLED (ISOPT = 1) TO PERFORM
+C SENSITIVITY CALCULATIONS AT CURRENT STEP SIZE AND ORDER.
+C-----------------------------------------------------------------------
+ 450   CONTINUE
+      IF (M .EQ. 0) DSM = DEL/TESCO(2,NQ)
+      IF (M .GT. 0) DSM = VNORM (N, ACOR, EWT)/TESCO(2,NQ)
+      IF (DSM .GT. ONE) GO TO 500
+C
+      IF (ISOPT .EQ. 0) GO TO 460
+C-----------------------------------------------------------------------
+C CALL STESA TO PERFORM EXPLICIT SENSITIVITY ANALYSIS.
+C IF THE LOCAL ERROR TEST FAILS (WITHIN STESA) FOR ANY SOLUTION VECTOR,
+C KFLAGS IS SET .LT. 0 AND CONTROL PASSES TO STATEMENT 500 UPON RETURN.
+C IN EITHER CASE, JCUR IS SET TO ZERO TO SIGNAL THAT THE JACOBIAN MAY
+C NEED UPDATING LATER.
+C-----------------------------------------------------------------------
+      CALL STESA (NEQ, Y, N, NSV, YH, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IF (IERPJ .NE. 0 .OR. IERSL .NE. 0) GO TO 680
+      IF (KFLAGS .LT. 0) GO TO 500
+C-----------------------------------------------------------------------
+C AFTER A SUCCESSFUL STEP, UPDATE THE YH ARRAY.
+C CONSIDER CHANGING H IF IALTH = 1.  OTHERWISE DECREASE IALTH BY 1.
+C IF IALTH IS THEN 1 AND NQ .LT. MAXORD, THEN ACOR IS SAVED FOR
+C USE IN A POSSIBLE ORDER INCREASE ON THE NEXT STEP.
+C IF A CHANGE IN H IS CONSIDERED, AN INCREASE OR DECREASE IN ORDER
+C BY ONE IS CONSIDERED ALSO.  A CHANGE IN H IS MADE ONLY IF IT IS BY A
+C FACTOR OF AT LEAST 1.1.  IF NOT, IALTH IS SET TO 3 TO PREVENT
+C TESTING FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 460   JCUR = 0
+      KFLAG = 0
+      IREDO = 0
+      NST = NST + 1
+      HU = H
+      NQU = NQ
+      DO 470 J = 1,L
+        DO 470 I = 1,NYH
+ 470      YH(I,J) = YH(I,J) + EL(J)*ACOR(I)
+      IALTH = IALTH - 1
+      IF (IALTH .EQ. 0) GO TO 520
+      IF (IALTH .GT. 1) GO TO 700
+      IF (L .EQ. LMAX) GO TO 700
+      DO 490 I = 1,NYH
+ 490    YH(I,LMAX) = ACOR(I)
+      GO TO 700
+C-----------------------------------------------------------------------
+C THE ERROR TEST FAILED IN EITHER STODE OR STESA.
+C KFLAG KEEPS TRACK OF MULTIPLE FAILURES.
+C RESTORE TN AND THE YH ARRAY TO THEIR PREVIOUS VALUES, AND PREPARE
+C TO TRY THE STEP AGAIN.  COMPUTE THE OPTIMUM STEP SIZE FOR THIS OR
+C ONE LOWER ORDER.  AFTER 2 OR MORE FAILURES, H IS FORCED TO DECREASE
+C BY A FACTOR OF 0.2 OR LESS.
+C-----------------------------------------------------------------------
+ 500  KFLAG = KFLAG - 1
+      JCUR = 0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 515 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 510 I = I1,NQNYH
+ 510      YH1(I) = YH1(I) - YH1(I+NYH)
+ 515    CONTINUE
+      RMAX = 2.0D0
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 660
+      IF (KFLAG .LE. -3) GO TO 640
+      IREDO = 2
+      RHUP = ZERO
+      GO TO 540
+C-----------------------------------------------------------------------
+*
+C REGARDLESS OF THE SUCCESS OR FAILURE OF THE STEP, FACTORS
+C RHDN, RHSM, AND RHUP ARE COMPUTED, BY WHICH H COULD BE MULTIPLIED
+C AT ORDER NQ - 1, ORDER NQ, OR ORDER NQ + 1, RESPECTIVELY.
+C IN THE CASE OF FAILURE, RHUP = 0.0 TO AVOID AN ORDER INCREASE.
+C THE LARGEST OF THESE IS DETERMINED AND THE NEW ORDER CHOSEN
+C ACCORDINGLY.  IF THE ORDER IS TO BE INCREASED, WE COMPUTE ONE
+C ADDITIONAL SCALED DERIVATIVE.
+C FOR ISOPT = 1, DUPS AND DSMS ARE LOADED WITH THE LARGEST RMS-NORMS
+C OBTAINED BY CONSIDERING SEPARATELY THE SENSITIVITY SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 520   RHUP = ZERO
+      IF (L .EQ. LMAX) GO TO 540
+      DO 530 I = 1,N
+ 530    SAVF(I) = ACOR(I) - YH(I,LMAX)
+      DUP = VNORM (N, SAVF, EWT)/TESCO(3,NQ)
+      DUP = MAX(DUP,DUPS)
+      EXUP = ONE/REAL(L+1)
+      RHUP = ONE/(1.4D0*DUP**EXUP + 0.0000014D0)
+ 540   EXSM = ONE/REAL(L)
+      DSM = MAX(DSM,DSMS)
+      RHSM = ONE/(1.2D0*DSM**EXSM + 0.0000012D0)
+      RHDN = ZERO
+      IF (NQ .EQ. 1) GO TO 560
+      JPOINT = 1
+      DO 550 J = 1,NSV
+        DDN = VNORM (N, YH(JPOINT,L), EWT(JPOINT))/TESCO(1,NQ)
+        DDNS = MAX(DDNS,DDN)
+        JPOINT = JPOINT + N
+ 550  CONTINUE
+      DDN = DDNS
+      DDNS = ZERO
+      EXDN = ONE/REAL(NQ)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+ 560   IF (RHSM .GE. RHUP) GO TO 570
+      IF (RHUP .GT. RHDN) GO TO 590
+      GO TO 580
+ 570   IF (RHSM .LT. RHDN) GO TO 580
+      NEWQ = NQ
+      RH = RHSM
+      GO TO 620
+ 580   NEWQ = NQ - 1
+      RH = RHDN
+      IF (KFLAG .LT. 0 .AND. RH .GT. ONE) RH = ONE
+      GO TO 620
+ 590   NEWQ = L
+      RH = RHUP
+      IF (RH .LT. 1.1D0) GO TO 610
+      R = EL(L)/REAL(L)
+      DO 600 I = 1,NYH
+ 600    YH(I,NEWQ+1) = ACOR(I)*R
+      GO TO 630
+ 610   IALTH = 3
+      GO TO 700
+ 620   IF ((KFLAG .EQ. 0) .AND. (RH .LT. 1.1D0)) GO TO 610
+      IF (KFLAG .LE. -2) RH = MIN(RH,0.2D0)
+C-----------------------------------------------------------------------
+C IF THERE IS A CHANGE OF ORDER, RESET NQ, L, AND THE COEFFICIENTS.
+C IN ANY CASE H IS RESET ACCORDING TO RH AND THE YH ARRAY IS RESCALED.
+C THEN EXIT FROM 690 IF THE STEP WAS OK, OR REDO THE STEP OTHERWISE.
+C-----------------------------------------------------------------------
+      IF (NEWQ .EQ. NQ) GO TO 170
+ 630   NQ = NEWQ
+      L = NQ + 1
+      IRET = 2
+      GO TO 150
+C-----------------------------------------------------------------------
+C CONTROL REACHES THIS SECTION IF 3 OR MORE FAILURES HAVE OCCURED.
+C IF 10 FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -1.
+C IT IS ASSUMED THAT THE DERIVATIVES THAT HAVE ACCUMULATED IN THE
+C YH ARRAY HAVE ERRORS OF THE WRONG ORDER.  HENCE THE FIRST
+C DERIVATIVE IS RECOMPUTED, AND THE ORDER IS SET TO 1.  THEN
+C H IS REDUCED BY A FACTOR OF 10, AND THE STEP IS RETRIED,
+C UNTIL IT SUCCEEDS OR H REACHES HMIN.
+C-----------------------------------------------------------------------
+ 640   IF (KFLAG .EQ. -10) GO TO 660
+      RH = 0.1D0
+      RH = MAX(HMIN/ABS(H),RH)
+      H = H*RH
+      DO 645 I = 1,NYH
+ 645    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (ISOPT .EQ. 0) GO TO 649
+      CALL SPRIME (NEQ, Y, YH, NYH, N, NSV, WM, IWM, EWT, SAVF, ACOR,
+     1   ACOR(N+1), PAR, F, JAC, DF, PJAC, PDF)
+      IF (IERSP .LT. 0) GO TO 680
+      DO 646 I = N+1,NYH
+ 646    YH(I,2) = H*YH(I,2)
+ 649  DO 650 I = 1,N
+ 650    YH(I,2) = H*SAVF(I)
+      IPUP = MITER
+      IALTH = 5
+      IF (NQ .EQ. 1) GO TO 200
+      NQ = 1
+      L = 2
+      IRET = 3
+      GO TO 150
+C-----------------------------------------------------------------------
+C ALL RETURNS ARE MADE THROUGH THIS SECTION.  H IS SAVED IN HOLD
+C TO ALLOW THE CALLER TO CHANGE H ON THE NEXT STEP.
+C-----------------------------------------------------------------------
+ 660   KFLAG = -1
+      GO TO 720
+ 670   KFLAG = -2
+      GO TO 720
+ 680   KFLAG = -3
+      GO TO 720
+ 690   RMAX = 10.0D0
+ 700   R = ONE/TESCO(2,NQU)
+      DO 710 I = 1,NYH
+ 710    ACOR(I) = ACOR(I)*R
+ 720   HOLD = H
+      JSTART = 1
+      RETURN
+C----------------------- END OF SUBROUTINE STODE -----------------------
+      END
+      SUBROUTINE CFODE (METH, ELCO, TESCO)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION ELCO(13,12), TESCO(3,12)
+C-----------------------------------------------------------------------
+C CFODE IS CALLED BY THE INTEGRATOR ROUTINE TO SET COEFFICIENTS
+C NEEDED THERE.  THE COEFFICIENTS FOR THE CURRENT METHOD, AS
+C GIVEN BY THE VALUE OF METH, ARE SET FOR ALL ORDERS AND SAVED.
+C THE MAXIMUM ORDER ASSUMED HERE IS 12 IF METH = 1 AND 5 IF METH = 2.
+C (A SMALLER VALUE OF THE MAXIMUM ORDER IS ALSO ALLOWED.)
+C CFODE IS CALLED ONCE AT THE BEGINNING OF THE PROBLEM,
+C AND IS NOT CALLED AGAIN UNLESS AND UNTIL METH IS CHANGED.
+C
+C THE ELCO ARRAY CONTAINS THE BASIC METHOD COEFFICIENTS.
+C THE COEFFICIENTS EL(I), 1 .LE. I .LE. NQ+1, FOR THE METHOD OF
+C ORDER NQ ARE STORED IN ELCO(I,NQ).  THEY ARE GIVEN BY A GENETRATING
+C POLYNOMIAL, I.E.,
+C    L(X) = EL(1) + EL(2)*X + ... + EL(NQ+1)*X**NQ.
+C FOR THE IMPLICIT ADAMS METHODS, L(X) IS GIVEN BY
+C    DL/DX = (X+1)*(X+2)*...*(X+NQ-1)/FACTORIAL(NQ-1),    L(-1) = 0.
+C FOR THE BDF METHODS, L(X) IS GIVEN BY
+C    L(X) = (X+1)*(X+2)* ... *(X+NQ)/K,
+C WHERE        K = FACTORIAL(NQ)*(1 + 1/2 + ... + 1/NQ).
+C
+C THE TESCO ARRAY CONTAINS TEST CONSTANTS USED FOR THE
+C LOCAL ERROR TEST AND THE SELECTION OF STEP SIZE AND/OR ORDER.
+C AT ORDER NQ, TESCO(K,NQ) IS USED FOR THE SELECTION OF STEP
+C SIZE AT ORDER NQ - 1 IF K = 1, AT ORDER NQ IF K = 2, AND AT ORDER
+C NQ + 1 IF K = 3.
+C-----------------------------------------------------------------------
+      DIMENSION PC(12)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+C
+      GO TO (100, 200), METH
+C
+ 100   ELCO(1,1) = ONE
+      ELCO(2,1) = ONE
+      TESCO(1,1) = ZERO
+      TESCO(2,1) = 2.0D0
+      TESCO(1,2) = ONE
+      TESCO(3,12) = ZERO
+      PC(1) = ONE
+      RQFAC = ONE
+      DO 140 NQ = 2,12
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ-1).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        RQ1FAC = RQFAC
+        RQFAC = RQFAC/REAL(NQ)
+        NQM1 = NQ - 1
+        FNQM1 = REAL(NQM1)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ-1). ----------------------------------
+        PC(NQ) = ZERO
+        DO 110 IB = 1,NQM1
+          I = NQP1 - IB
+ 110      PC(I) = PC(I-1) + FNQM1*PC(I)
+        PC(1) = FNQM1*PC(1)
+C COMPUTE INTEGRAL, -1 TO 0, OF P(X) AND X*P(X). -----------------------
+        PINT = PC(1)
+        XPIN = PC(1)/2.0D0
+        TSIGN = ONE
+        DO 120 I = 2,NQ
+          TSIGN = -TSIGN
+          PINT = PINT + TSIGN*PC(I)/REAL(I)
+ 120      XPIN = XPIN + TSIGN*PC(I)/REAL(I+1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        ELCO(1,NQ) = PINT*RQ1FAC
+        ELCO(2,NQ) = ONE
+        DO 130 I = 2,NQ
+ 130      ELCO(I+1,NQ) = RQ1FAC*PC(I)/REAL(I)
+        AGAMQ = RQFAC*XPIN
+        RAGQ = ONE/AGAMQ
+        TESCO(2,NQ) = RAGQ
+        IF (NQ .LT. 12) TESCO(1,NQP1) = RAGQ*RQFAC/REAL(NQP1)
+        TESCO(3,NQM1) = RAGQ
+ 140    CONTINUE
+      RETURN
+C
+ 200   PC(1) = ONE
+      RQ1FAC = ONE
+      DO 230 NQ = 1,5
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        FNQ = REAL(NQ)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ). ------------------------------------
+        PC(NQP1) = ZERO
+        DO 210 IB = 1,NQ
+          I = NQ + 2 - IB
+ 210      PC(I) = PC(I-1) + FNQ*PC(I)
+        PC(1) = FNQ*PC(1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        DO 220 I = 1,NQP1
+ 220      ELCO(I,NQ) = PC(I)/PC(2)
+        ELCO(2,NQ) = ONE
+        TESCO(1,NQ) = RQ1FAC
+        TESCO(2,NQ) = REAL(NQP1)/ELCO(1,NQ)
+        TESCO(3,NQ) = REAL(NQ+2)/ELCO(1,NQ)
+        RQ1FAC = RQ1FAC/FNQ
+ 230    CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE CFODE -----------------------
+      END
+      SUBROUTINE SOLSY (WM, IWM, X, TEM)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION WM(*), IWM(*), X(*), TEM(*)
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(6),
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(4), IERSL, IDUM2(5),
+     5   MITER, IDUM3(4), N, IDUM4(5)
+C-----------------------------------------------------------------------
+C THIS ROUTINE MANAGES THE SOLUTION OF THE LINEAR SYSTEM ARISING FROM
+C A CHORD ITERATION.  IT IS CALLED IF MITER .NE. 0.
+C IF MITER IS 1 OR 2, IT CALLS DGESL TO ACCOMPLISH THIS.
+C IF MITER = 3 IT UPDATES THE COEFFICIENT H*EL0 IN THE DIAGONAL
+C MATRIX, AND THEN COMPUTES THE SOLUTION.
+C IF MITER IS 4 OR 5, IT CALLS DGBSL.
+C COMMUNICATION WITH SOLSY USES THE FOLLOWING VARIABLES..
+C WM   = REAL WORK SPACE CONTAINING THE INVERSE DIAGONAL MATRIX IF
+C        MITER = 3 AND THE LU DECOMPOSITION OF THE MATRIX OTHERWISE.
+C        STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C        WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C        WM(1) = SQRT(UROUND) (NOT USED HERE),
+C        WM(2) = HL0, THE PREVIOUS VALUE OF H*EL0, USED IF MITER = 3.
+C IWM  = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C        IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C        PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C X    = THE RIGHT-HAND SIDE VECTOR ON INPUT, AND THE SOLUTION VECTOR
+C        ON OUTPUT, OF LENGTH N.
+C TEM  = VECTOR OF WORK SPACE OF LENGTH N, NOT USED IN THIS VERSION.
+C IERSL = OUTPUT FLAG (IN COMMON).  IERSL = 0 IF NO TROUBLE OCCURRED.
+C        IERSL = 1 IF A SINGULAR MATRIX AROSE WITH MITER = 3.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, MITER, AND N.
+C-----------------------------------------------------------------------
+      IERSL = 0
+      GO TO (100, 100, 300, 400, 400), MITER
+ 100   CALL DGESL (WM(3), N, N, IWM(21), X, 0)
+      RETURN
+C
+ 300   PHL0 = WM(2)
+      HL0 = H*EL0
+      WM(2) = HL0
+      IF (HL0 .EQ. PHL0) GO TO 330
+      R = HL0/PHL0
+      DO 320 I = 1,N
+        DI = ONE - R*(ONE - ONE/WM(I+2))
+        IF (ABS(DI) .EQ. ZERO) GO TO 390
+ 320    WM(I+2) = ONE/DI
+ 330   DO 340 I = 1,N
+ 340    X(I) = WM(I+2)*X(I)
+      RETURN
+ 390   IERSL = 1
+      RETURN
+C
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      MEBAND = 2*ML + MU + 1
+      CALL DGBSL (WM(3), MEBAND, N, ML, MU, IWM(21), X, 0)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLSY -----------------------
+      END
+      SUBROUTINE EWSET (N, ITOL, RTOL, ATOL, YCUR, EWT)
+C-----------------------------------------------------------------------
+C THIS SUBROUTINE SETS THE ERROR WEIGHT VECTOR EWT ACCORDING TO
+C    EWT(I) = RTOL(I)*ABS(YCUR(I)) + ATOL(I),  I = 1,...,N,
+C WITH THE SUBSCRIPT ON RTOL AND/OR ATOL POSSIBLY REPLACED BY 1 ABOVE,
+C DEPENDING ON THE VALUE OF ITOL.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RTOL(*), ATOL(*), YCUR(N), EWT(N)
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 10 I = 1,N
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        EWT(I) = RTOLI*ABS(YCUR(I)) + ATOLI
+ 10     CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE EWSET -----------------------
+      END
+      DOUBLE PRECISION FUNCTION VNORM (N, V, W)
+C-----------------------------------------------------------------------
+C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED ROOT-MEAN-SQUARE NORM
+C OF THE VECTOR OF LENGTH N CONTAINED IN THE ARRAY V, WITH WEIGHTS
+C CONTAINED IN THE ARRAY W OF LENGTH N..
+C  VNORM = SQRT( (1/N) * SUM( V(I)*W(I) )**2 )
+C PROTECTION FOR UNDERFLOW/OVERFLOW IS ACCOMPLISHED USING TWO
+C CONSTANTS WHICH ARE HOPEFULLY APPLICABLE FOR ALL MACHINES.
+C THESE ARE:
+C     CUTLO = maximum of SQRT(U/EPS)  over all known machines
+C     CUTHI = minimum of SQRT(Z)      over all known machines
+C WHERE
+C     EPS = smallest number s.t. EPS + 1 .GT. 1
+C     U   = smallest positive number (underflow limit)
+C     Z   = largest number (overflow limit)
+C
+C DETAILS OF THE ALGORITHM AND OF VALUES OF CUTLO AND CUTHI ARE
+C FOUND IN THE BLAS ROUTINE SNRM2 (SEE ALSO ALGORITHM 539, TRANS.
+C MATH. SOFTWARE, VOL. 5 NO. 3, 1979, 308-323.
+C FOR SINGLE PRECISION, THE FOLLOWING VALUES SHOULD BE UNIVERSAL:
+C     DATA CUTLO,CUTHI /4.441E-16,1.304E19/
+C FOR DOUBLE PRECISION, USE
+C     DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INTEGER NEXT,I,J,N
+      DIMENSION V(N),W(N)
+      DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+      DATA ZERO,ONE/0.0D0,1.0D0/
+C  BLAS ALGORITHM
+      NEXT = 1
+      SUM = ZERO
+      I = 1
+20    SX = V(I)*W(I)
+      GO TO (30,40,70,80),NEXT
+30    IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 2
+      XMAX = ZERO
+40    IF (SX.EQ.ZERO) GO TO 130
+      IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 3
+      GO TO 60
+50    I=J
+      NEXT = 4
+      SUM = (SUM/SX)/SX
+60    XMAX = ABS(SX)
+      GO TO 90
+70    IF(ABS(SX).GT.CUTLO) GO TO 100
+80    IF(ABS(SX).LE.XMAX) GO TO 90
+      SUM = ONE + SUM * (XMAX/SX)**2
+      XMAX = ABS(SX)
+      GO TO 130
+90    SUM = SUM + (SX/XMAX)**2
+      GO TO 130
+100   SUM = (SUM*XMAX)*XMAX
+110   HITEST = CUTHI/REAL(N)
+      DO 120 J = I,N
+         SX = V(J)*W(J)
+         IF(ABS(SX).GE.HITEST) GO TO 50
+         SUM = SUM + SX**2
+120   CONTINUE
+      VNORM = SQRT(SUM)
+      GO TO 140
+130   CONTINUE
+      I = I + 1
+      IF (I.LE.N) GO TO 20
+      VNORM = XMAX * SQRT(SUM)
+140   CONTINUE
+      RETURN
+C----------------------- END OF FUNCTION VNORM -------------------------
+      END
+      SUBROUTINE SVCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE STORES IN RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSA
+C PACKAGE.
+C RSAV = REAL ARRAY OF LENGTH 222 OR MORE.
+C ISAV = INTEGER ARRAY OF LENGTH 52 OR MORE.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RSAV(I) = RODE1(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RSAV(J) = RODE2(I)
+      DO 30 I = 1,LIODE1
+ 30     ISAV(I) = IODE1(I)
+      DO 40 I = 1,LIODE2
+        J = LIODE1 + I
+ 40     ISAV(J) = IODE2(I)
+      ISAV(LIODE1+LIODE2+1) = IEH(1)
+      ISAV(LIODE1+LIODE2+2) = IEH(2)
+      RETURN
+C----------------------- END OF SUBROUTINE SVCOM -----------------------
+      END
+      SUBROUTINE RSCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE RESTORES FROM RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSSA
+C PACKAGE.  THIS PRESUMES THAT RSAV AND ISAV WERE LOADED BY MEANS
+C OF SUBROUTINE SVCOM OR THE EQUIVALENT.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RODE1(I) = RSAV(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RODE2(I) = RSAV(J)
+      DO 30 I = 1,LIODE1
+ 30     IODE1(I) = ISAV(I)
+      DO 40 I = 1,LODE2
+        J = LIODE1 + I
+ 40     IODE2(I) = ISAV(J)
+      IEH(1) = ISAV(LIODE1+LIODE2+1)
+      IEH(2) = ISAV(LIODE1+LIODE2+2)
+      RETURN
+C----------------------- END OF SUBROUTINE RSCOM -----------------------
+      END
+      SUBROUTINE DGEFA(A,LDA,N,IPVT,INFO)
+      INTEGER LDA,N,IPVT(*),INFO
+      DOUBLE PRECISION A(LDA,*)
+C
+C    DGEFA FACTORS A DOUBLE PRECISION MATRIX BY GAUSSIAN ELIMINATION.
+C
+C    DGEFA IS USUALLY CALLED BY DGECO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C    (TIME FOR DGECO) = (1 + 9/N)*(TIME FOR DGEFA) .
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE MATRIX TO BE FACTORED.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C    ON RETURN
+C
+C       A       AN UPPER TRIANGULAR MATRIX AND THE MULTIPLIERS
+C               WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGESL OR DGEDI WILL DIVIDE BY ZERO
+C                    IF CALLED.  USE  RCOND  IN DGECO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER IDAMAX,J,K,KP1,L,NM1
+C
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      INFO = 0
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 70
+      DO 60 K = 1, NM1
+         KP1 = K + 1
+C
+C        FIND L = PIVOT INDEX
+C
+         L = IDAMAX(N-K+1,A(K,K),1) + K - 1
+         IPVT(K) = L
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (A(L,K) .EQ. 0.0D0) GO TO 40
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. K) GO TO 10
+               T = A(L,K)
+               A(L,K) = A(K,K)
+               A(K,K) = T
+  10        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T  = -1.0D0/A(K,K)
+            CALL DSCAL(N-K,T,A(K+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            DO 30 J = KP1, N
+               T = A(L,J)
+               IF (L .EQ. K) GO TO 20
+                  A(L,J) = A(K,J)
+                  A(K,J) = T
+  20           CONTINUE
+               CALL DAXPY(N-K,T,A(K+1,K),1,A(K+1,J),1)
+  30        CONTINUE
+         GO TO 50
+  40     CONTINUE
+            INFO = K
+  50     CONTINUE
+  60  CONTINUE
+  70  CONTINUE
+      IPVT(N) = N
+      IF (A(N,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGESL(A,LDA,N,IPVT,B,JOB)
+      INTEGER LDA,N,IPVT(*),JOB
+      DOUBLE PRECISION A(LDA,*),B(*)
+C
+C     DGESL KppSolveS THE DOUBLE PRECISION SYSTEM
+C     A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGECO OR DGEFA.
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGECO OR DGEFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGECO OR DGEFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B  WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGECO HAS SET RCOND .GT. 0.0
+C       OR DGEFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGESL(A,LDA,N,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,NM1
+C
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve  L*Y = B
+C
+         IF (NM1 .LT. 1) GO TO 30
+         DO 20 K = 1, NM1
+            L = IPVT(K)
+            T = B(L)
+            IF (L .EQ. K) GO TO 10
+               B(L) = B(K)
+               B(K) = T
+  10        CONTINUE
+            CALL DAXPY(N-K,T,A(K+1,K),1,B(K+1),1)
+  20     CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/A(K,K)
+            T = -B(K)
+            CALL DAXPY(K-1,T,A(1,K),1,B(1),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            T = DDOT(K-1,A(1,K),1,B(1),1)
+            B(K) = (B(K) - T)/A(K,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (NM1 .LT. 1) GO TO 90
+         DO 80 KB = 1, NM1
+            K = N - KB
+            B(K) = B(K) + DDOT(N-K,A(K+1,K),1,B(K+1),1)
+            L = IPVT(K)
+            IF (L .EQ. K) GO TO 70
+               T = B(L)
+               B(L) = B(K)
+               B(K) = T
+  70        CONTINUE
+  80     CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DGBFA(ABD,LDA,N,ML,MU,IPVT,INFO)
+      INTEGER LDA,N,ML,MU,IPVT(*),INFO
+      DOUBLE PRECISION ABD(LDA,*)
+C
+C    DGBFA FACTORS A DOUBLE PRECISION BAND MATRIX BY ELIMINATION.
+C
+C    DGBFA IS USUALLY CALLED BY DGBCO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               CONTAINS THE MATRIX IN BAND STORAGE.  THE COLUMNS
+C               OF THE MATRIX ARE STORED IN THE COLUMNS OF  ABD  AND
+C               THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C               ML+1 THROUGH 2*ML+MU+1 OF  ABD .
+C               SEE THE COMMENTS BELOW FOR DETAILS.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C               LDA MUST BE .GE. 2*ML + MU + 1 .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C               0 .LE. ML .LT. N .
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C               0 .LE. MU .LT. N .
+C               MORE EFFICIENT IF  ML .LE. MU .
+C    ON RETURN
+C
+C       ABD     AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C               THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGBSL WILL DIVIDE BY ZERO IF
+C                    CALLED.  USE  RCOND  IN DGBCO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    BAND STORAGE
+C
+C          IF  A  IS A BAND MATRIX, THE FOLLOWING PROGRAM SEGMENT
+C          WILL SET UP THE INPUT.
+C
+C                  ML = (BAND WIDTH BELOW THE DIAGONAL)
+C                  MU = (BAND WIDTH ABOVE THE DIAGONAL)
+C                  M = ML + MU + 1
+C                  DO 20 J = 1, N
+C                     I1 = MAX0(1, J-MU)
+C                     I2 = MIN0(N, J+ML)
+C                     DO 10 I = I1, I2
+C                        K = I - J + M
+C                        ABD(K,J) = A(I,J)
+C               10    CONTINUE
+C               20 CONTINUE
+C
+C          THIS USES ROWS  ML+1  THROUGH  2*ML+MU+1  OF  ABD .
+C          IN ADDITION, THE FIRST  ML  ROWS IN  ABD  ARE USED FOR
+C          ELEMENTS GENERATED DURING THE TRIANGULARIZATION.
+C          THE TOTAL NUMBER OF ROWS NEEDED IN  ABD  IS  2*ML+MU+1 .
+C          THE  ML+MU BY ML+MU  UPPER LEFT TRIANGLE AND THE
+C          ML BY ML  LOWER RIGHT TRIANGLE ARE NOT REFERENCED.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C    FORTRAN MAX0,MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER I,IDAMAX,I0,J,JU,JZ,J0,J1,K,KP1,L,LM,M,MM,NM1
+C
+C
+      M = ML + MU + 1
+      INFO = 0
+C
+C     ZERO INITIAL FILL-IN COLUMNS
+C
+      J0 = MU + 2
+      J1 = MIN0(N,M) - 1
+      IF (J1 .LT. J0) GO TO 30
+      DO 20 JZ = J0, J1
+         I0 = M + 1 - JZ
+         DO 10 I = I0, ML
+            ABD(I,JZ) = 0.0D0
+  10     CONTINUE
+  20  CONTINUE
+  30  CONTINUE
+      JZ = J1
+      JU = 0
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 130
+      DO 120 K = 1, NM1
+         KP1 = K + 1
+C
+C        ZERO NEXT FILL-IN COLUMN
+C
+         JZ = JZ + 1
+         IF (JZ .GT. N) GO TO 50
+         IF (ML .LT. 1) GO TO 50
+            DO 40 I = 1, ML
+               ABD(I,JZ) = 0.0D0
+  40        CONTINUE
+  50     CONTINUE
+C
+C        FIND L = PIVOT INDEX
+C
+         LM = MIN0(ML,N-K)
+         L = IDAMAX(LM+1,ABD(M,K),1) + M - 1
+         IPVT(K) = L + K - M
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (ABD(L,K) .EQ. 0.0D0) GO TO 100
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. M) GO TO 60
+               T = ABD(L,K)
+               ABD(L,K) = ABD(M,K)
+               ABD(M,K) = T
+  60        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T = -1.0D0/ABD(M,K)
+            CALL DSCAL(LM,T,ABD(M+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            JU = MIN0(MAX0(JU,MU+IPVT(K)),N)
+            MM = M
+            IF (JU .LT. KP1) GO TO 90
+            DO 80 J = KP1, JU
+               L = L - 1
+               MM = MM - 1
+               T = ABD(L,J)
+               IF (L .EQ. MM) GO TO 70
+                  ABD(L,J) = ABD(MM,J)
+                  ABD(MM,J) = T
+  70           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+  80        CONTINUE
+  90        CONTINUE
+         GO TO 110
+  100    CONTINUE
+            INFO = K
+  110    CONTINUE
+  120  CONTINUE
+  130  CONTINUE
+      IPVT(N) = N
+      IF (ABD(M,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGBSL(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+      INTEGER LDA,N,ML,MU,IPVT(*),JOB
+      DOUBLE PRECISION ABD(LDA,*),B(*)
+C
+C    DGBSL KppSolveS THE DOUBLE PRECISION BAND SYSTEM
+C    A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGBCO OR DGBFA.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGBCO OR DGBFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGBCO OR DGBFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B , WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGBCO HAS SET RCOND .GT. 0.0
+C       OR DGBFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGBSL(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C    FORTRAN MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,LA,LB,LM,M,NM1
+C
+      M = MU + ML + 1
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve L*Y = B
+C
+         IF (ML .EQ. 0) GO TO 30
+         IF (NM1 .LT. 1) GO TO 30
+            DO 20 K = 1, NM1
+               LM = MIN0(ML,N-K)
+               L = IPVT(K)
+               T = B(L)
+               IF (L .EQ. K) GO TO 10
+                  B(L) = B(K)
+                  B(K) = T
+  10           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,B(K+1),1)
+  20        CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/ABD(M,K)
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = -B(K)
+            CALL DAXPY(LM,T,ABD(LA,K),1,B(LB),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = DDOT(LM,ABD(LA,K),1,B(LB),1)
+            B(K) = (B(K) - T)/ABD(M,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (ML .EQ. 0) GO TO 90
+         IF (NM1 .LT. 1) GO TO 90
+            DO 80 KB = 1, NM1
+               K = N - KB
+               LM = MIN0(ML,N-K)
+               B(K) = B(K) + DDOT(LM,ABD(M+1,K),1,B(K+1),1)
+               L = IPVT(K)
+               IF (L .EQ. K) GO TO 70
+                  T = B(L)
+                  B(L) = B(K)
+                  B(K) = T
+  70           CONTINUE
+  80        CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
+C
+C     CONSTANT TIMES A VECTOR PLUS A VECTOR.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DA
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      IF(N.LE.0)RETURN
+      IF (DA .EQ. 0.0D0) RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DY(IY) = DY(IY) + DA*DX(IX)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,4)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DY(I) = DY(I) + DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 4 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,4
+        DY(I) = DY(I) + DA*DX(I)
+        DY(I + 1) = DY(I + 1) + DA*DX(I + 1)
+        DY(I + 2) = DY(I + 2) + DA*DX(I + 2)
+        DY(I + 3) = DY(I + 3) + DA*DX(I + 3)
+  50  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DSCAL(N,DA,DX,INCX)
+C
+C     SCALES A VECTOR BY A CONSTANT.
+C     USES UNROLLED LOOPS FOR INCREMENT EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DA,DX(*)
+      INTEGER I,INCX,M,MP1,N,NINCX
+C
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+*
+C
+      NINCX = N*INCX
+      DO 10 I = 1,NINCX,INCX
+        DX(I) = DA*DX(I)
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DX(I) = DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DX(I) = DA*DX(I)
+        DX(I + 1) = DA*DX(I + 1)
+        DX(I + 2) = DA*DX(I + 2)
+        DX(I + 3) = DA*DX(I + 3)
+        DX(I + 4) = DA*DX(I + 4)
+  50  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
+C
+C     FORMS THE DOT PRODUCT OF TWO VECTORS.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DTEMP
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      DDOT = 0.0D0
+      DTEMP = 0.0D0
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DTEMP = DTEMP + DX(IX)*DY(IY)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      DDOT = DTEMP
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DTEMP = DTEMP + DX(I)*DY(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) GO TO 60
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DTEMP = DTEMP + DX(I)*DY(I) + DX(I + 1)*DY(I + 1) +
+     *   DX(I + 2)*DY(I + 2) + DX(I + 3)*DY(I + 3) + DX(I + 4)*DY(I + 4)
+  50  CONTINUE
+  60  DDOT = DTEMP
+      RETURN
+      END
+      INTEGER FUNCTION IDAMAX(N,DX,INCX)
+C
+C     FINDS THE INDEX OF ELEMENT HAVING MAX. ABSOLUTE VALUE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DMAX
+      INTEGER I,INCX,IX,N
+C
+      IDAMAX = 0
+      IF( N .LT. 1 ) RETURN
+      IDAMAX = 1
+      IF(N.EQ.1)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+C
+      IX = 1
+      DMAX = DABS(DX(1))
+      IX = IX + INCX
+      DO 10 I = 2,N
+         IF(DABS(DX(IX)).LE.DMAX) GO TO 5
+         IDAMAX = I
+         DMAX = DABS(DX(IX))
+   5     IX = IX + INCX
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+  20  DMAX = DABS(DX(1))
+      DO 30 I = 2,N
+         IF(DABS(DX(I)).LE.DMAX) GO TO 30
+         IDAMAX = I
+         DMAX = DABS(DX(I))
+  30  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C THIS ROUTINE COMPUTES THE UNIT ROUNDOFF OF THE MACHINE IN DOUBLE
+C PRECISION.  THIS IS DEFINED AS THE SMALLEST POSITIVE MACHINE NUMBER
+C U SUCH THAT  1.0D0 + U .NE. 1.0D0 (IN DOUBLE PRECISION).
+C-----------------------------------------------------------------------
+      DOUBLE PRECISION U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- END OF FUNCTION D1MACH ------------------------
+      END
+      SUBROUTINE XERR (MSG, NERR, IERT, NI, I1, I2, NR, R1, R2)
+      INTEGER NERR, IERT, NI, I1, I2, NR,
+     1   LUN, LUNIT, MESFLG
+      DOUBLE PRECISION R1, R2
+      CHARACTER*(*) MSG
+C-------------------------------------------------------------------
+C
+C ALL ARGUMENTS ARE INPUT ARGUMENTS.
+C
+C MSG   = THE MESSAGE (CHARACTER VARIABLE)
+C NERR  = THE ERROR NUMBER (NOT USED).
+C IERT  = THE ERROR TYPE..
+C         1 MEANS RECOVERABLE (CONTROL RETURNS TO CALLER).
+C         2 MEANS FATAL (RUN IS ABORTED--SEE NOTE BELOW).
+C NI    = NUMBER OF INTEGERS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C I1,I2  = INTEGERS TO BE PRINTED, DEPENDING ON NI.
+C NR    = NUMBER OF REALS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C R1,R2  = REALS TO BE PRINTED, DEPENDING ON NR.
+C
+C  NOTES:
+C 1. THE DIMENSION OF MSG IS ASSUMED TO BE AT MOST 60.
+C   (MULTI-LINE MESSAGES ARE GENERATED BY REPEATED CALLS.)
+C 2. IF IERT = 2, CONTROL PASSES TO THE STATEMENT  STOP
+C   TO ABORT THE RUN.  THIS STATEMENT MAY BE MACHINE-DEPENDENT.
+C 3. R1 AND R2 ARE ASSUMED TO BE IN DOUBLE PRECISION AND ARE PRINTED
+C   IN D21.13 FORMAT.
+C 4. THE COMMON BLOCK /EH0001/ BELOW IS DATA-LOADED (A MACHINE-
+C   DEPENDENT FEATURE) WITH DEFAULT VALUES.
+C   THIS BLOCK IS NEEDED FOR PROPER RETENTION OF PARAMETERS USED BY
+C   THIS ROUTINE WHICH THE USER CAN RESET BY CALLING XSETF OR XSETUN.
+C   THE VARIABLES IN THIS BLOCK ARE AS FOLLOWS..
+C      MESFLG = PRINT CONTROL FLAG..
+C               1 MEANS PRINT ALL MESSAGES (THE DEFAULT).
+C               0 MEANS NO PRINTING.
+C      LUNIT  = LOGICAL UNIT NUMBER FOR MESSAGES.
+C               THE DEFAULT IS 6 (MACHINE-DEPENDENT).
+C 5. TO CHANGE THE DEFAULT OUTPUT UNIT, CHANGE THE DATA STATEMENT
+C  IN THE BLOCK DATA SUBPROGRAM BELOW.
+C
+C FOR A DIFFERENT RUN-ABORT COMMAND, CHANGE THE STATEMENT FOLLOWING
+C STATEMENT 100 AT THE END.
+C-----------------------------------------------------------------------
+      COMMON /EH0001/ MESFLG, LUNIT
+      IF (MESFLG .EQ. 0) GO TO 100
+C GET LOGICAL UNIT NUMBER. ---------------------------------------------
+      LUN = LUNIT
+C WRITE THE MESSAGE. ---------------------------------------------------
+      WRITE (LUN, 10) MSG
+ 10   FORMAT(1X,A)
+C-----------------------------------------------------------------------
+      IF (NI .EQ. 1) WRITE (LUN, 20) I1
+ 20   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10)
+      IF (NI .EQ. 2) WRITE (LUN, 30) I1,I2
+ 30   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10,3X,'I2 = ',I10)
+      IF (NR .EQ. 1) WRITE (LUN, 40) R1
+ 40   FORMAT(6X,'IN ABOVE MESSAGE,  R1 = ',D21.13)
+      IF (NR .EQ. 2) WRITE (LUN, 50) R1,R2
+ 50   FORMAT(6X,'IN ABOVE,  R1 = ',D21.13,3X,'R2 = ',D21.13)
+C ABORT THE RUN IF IERT = 2. -------------------------------------------
+ 100   IF (IERT .NE. 2) RETURN
+      STOP
+C----------------------- END OF SUBROUTINE XERR ----------------------
+      END
+      SUBROUTINE XSETF (MFLAG)
+C
+C THIS ROUTINE RESETS THE PRINT CONTROL FLAG MFLAG.
+C
+      INTEGER MFLAG, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) MESFLG = MFLAG
+      RETURN
+C----------------------- END OF SUBROUTINE XSETF -----------------------
+      END
+      SUBROUTINE XSETUN (LUN)
+C
+C THIS ROUTINE RESETS THE LOGICAL UNIT NUMBER FOR MESSAGES.
+C
+      INTEGER LUN, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (LUN .GT. 0) LUNIT = LUN
+      RETURN
+C----------------------- END OF SUBROUTINE XSETUN ----------------------
+      END
+      BLOCK DATA
+C-----------------------------------------------------------------------
+C THIS DATA SUBPROGRAM LOADS VARIABLES INTO THE INTERNAL COMMON
+C BLOCKS USED BY ODESSA AND ITS VARIANTS.  THE VARIABLES ARE
+C DEFINED AS FOLLOWS..
+C  ILLIN  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ILLEGAL INPUT.  THE RUN IS STOPPED WHEN
+C           ILLIN REACHES 5.
+C  NTREP  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ISTATE = 1 AND TOUT = T.  THE RUN IS
+C           STOPPED WHEN NTREP REACHES 5.
+C  MESFLG = FLAG TO CONTROL PRINTING OF ERROR MESSAGES.  1 MEANS PRINT,
+C           0 MEANS NO PRINTING.
+C  LUNIT  = DEFAULT VALUE OF LOGICAL UNIT NUMBER FOR PRINTING OF ERROR
+C           MESSAGES.
+C-----------------------------------------------------------------------
+      INTEGER ILLIN, IDUMA, NTREP, IDUMB, IOWNS, ICOMM, MESFLG, LUNIT
+      DOUBLE PRECISION ROWND, ROWNS, RCOMM
+      COMMON /ODE001/ ROWND, ROWNS(173), RCOMM(45),
+     1   ILLIN, IDUMA(10), NTREP, IDUMB(2), IOWNS(4), ICOMM(21)
+      COMMON /EH0001/ MESFLG, LUNIT
+      DATA ILLIN/0/, NTREP/0/
+      DATA MESFLG/1/, LUNIT/6/
+C
+C------------------------ END OF BLOCK DATA ----------------------------
+      END
+C-----------------------------------------------------------------------
+C INSTRUCTIONS FOR INSTALLING THE ODESSA PACKAGE. (see @ below.)
+C
+C ODESSA is an enhanced version of the widely disseminated ODE solver
+C LSODE, and as such retains the same properties regarding portability.
+C The notes below, adapted from the installation instructions for LSODE,
+C are intended to facilitate the installation of the ODESSA package in
+C the user's software library.
+C
+C 1. Both a single and a double precision version of ODESSA are
+C provided in this release.  It is expected that most users will
+C utilize the double precision version, except in the case of
+C extended word-length computers. Most routines used by ODESSA
+C are named the same regardless of whether they are single or
+C double precision.  The exceptions are the LINPAK and BLAS
+C routines that follow the LINPAK/BLAS naming conventions, i.e.
+C D--- for a double precision routine, and S--- for a single
+C precision routine.  Thus, care should be taken if both single
+C and double precision versions are stored in the same library.
+C
+C 2. Several routines in ODESSA have the same names as the LSODE
+C routines from which they were derived, although they contain
+C different code.  These are: INTDY, STODE, PREPJ, SVCOM, and
+C RSCOM.  If ODESSA is added to a subroutine library of which
+C LSODE is already a member, these routine names must be changed
+C in one of the two programs.  Also see the note regarding BLOCK
+C DATA subroutines below.
+C
+C 3.  In many cases, ODESSA uses unaltered LSODE routines and
+C common library routines that may already reside on your system.
+C The installation of ODESSA should be done so that identical routines
+C are shared rather than kept as duplicate copies.
+C a.  Normally, the user calls only subroutine ODESSA, but for optional
+C     capabilities the user may also CALL XSETUN, XSETF, SVCOM, RSCOM,
+C     or INTDY, as described in Part II of the Full Description in the
+C     User Documentation (ODESSA.DOC, see below).  Except for INTDY,
+C     none of these are called from within the package.
+C b.  Two routines, EWSET and VNORM, are optionally replaceable by the
+C     user if the package version is unsuitable.  Hence, the install-
+C     ation of the package should be done so that the user's version
+C     for either routine overrides the package version.
+C c.  The function routine D1MACH is provided to compute the unit
+C     roundoff of the machine and precision in use, in a manner com-
+C     patible with machine parameter routines developed at Bell Lab-
+C     oratories.  If such a routine has already been installed on
+C     your system, the version supplied here may be discarded.
+C d.  Linear algebraic systems are solved with routines from the
+C     LINPACK collection, in conjunction with routines from the Basic
+C     Linear Algebra module collection (BLAS).  In double precision,
+C     the names are DGEFA, DGESL, DGBFA, and DGBSL (from LINPACK), and
+C     DAXPY, DSCAL, IDAMAX, and DDOT (from BLAS). If these routines
+C     have already been installed on your system, copies supplied with
+C     ODESSA may be discarded.  The single precision versions of these
+C     routines are used in the single precision version.
+C
+C 4. There are four integer variables, in the two labeled COMMON
+C blocks /ODE001/ and /EH0001/, which need to be loaded with DATA
+C statements.  They can vary during execution, and are in common to
+C assure their retention between calls.  This is legal in ANSI Fortran
+C only if done in a BLOCK DATA subprogram, and this package has a
+C BLOCK DATA for this purpose.  However, BLOCK DATA subprograms can be
+C difficult to install in libraries, and many compilers allow such DATA
+C statements in subroutines.  If your system allows this, the location
+C of the DATA statements are just after the initial type and common
+C declarations in subroutines ODESSA and XERR.  In ODESSA, ILLIN and
+C NTREP are DATA-loaded as 0.  In XERR, MESFLG is loaded as 1 and
+C LUNIT is loaded as the appropriate default logical unit number.
+C
+C 5. The ODESSA package contains subscript expressions which may not
+C be accepted by some compilers.  Subscripts of the form I + J, I - J,
+C etc., occur in various routines.  If any of these forms are
+C unacceptable to your compiler, an extra line of code setting the
+C subscript to a dummy integer value should be added for each subscipt.
+C
+C 6. User documentation is provided in a two-level structure
+C to accommmodate both the casual and serious user.  The novice or
+C casual user should need to read only the Summary of Usage and the
+C Example Problem located at the beginning of the documentation.  More
+C experienced users, requiring the full set of available options,
+C should read the Full Description which follows the Example Problem.
+C
+C 7. The user documentation may need corrections in the following ways:
+C a.  If subroutine names have been changed to avoid conflicts between
+C     the LSODE and ODESSA packages, the corresponding name changes
+C     should be made in the documentation.
+C b.  In the Summary of Usage, and in the description of XSETUN under
+C     Part II of the Full Description, the default logical unit number
+C     should be corrected if it is not 6.
+C c.  In the Summary of Usage, users should be instructed to execute
+C     CALL XSETF(1) before the first CALL to ODESSA, if this is neces-
+C     sary for proper error message handling.  (see note 2(e) above.)
+C d.  In the description of the subroutines DF and JAC in the Summary
+C     of Usage and in Part I of the Full Description, it is stated
+C     that dummy names may be passed if these two routines are not user
+C     supplied.  Your system may require the user to supply a dummy
+C     subroutine instead.
+C e.  The ODESSA package treats the arguments NEQ, RTOL, and ATOL as
+C     arrays (possibly of length 1), while the usage documentation
+C     states that these arguments may be either arrays or scalars.
+C     If your system does not allow such a mismatch, then the
+C     documentation should be changed to reflect this.
+C 8.  A demonstration program is provided with the package for
+C     verification.
+C
+C
+C     Jorge R. Leis and Mark A. Kramer
+C     Department of Chemical Engineering
+C     Massachusetts Institute of Technology
+C     Cambridge, Massachusetts  02139
+C     U.S.A.
+C
+C     Current address of J.R. Leis (Jan. 1988):
+C
+C     Shell Development Company
+C     Westhollow Research Center
+C     Houston, TX
+C
+C  @ Adapted from 'Instructions for Installing LSODE', written by
+C    Alan C. Hindmarsh, Mathematics & Statistics Division, L-316,
+C    Lawrence Livermore National Laboratory, Livermore, CA. 94550
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_radau5.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_radau5.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_radau5.def	(revision 3477)
@@ -0,0 +1,19 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN FULL
+#DOUBLE ON 
+#INTFILE atm_radau5
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_radau5.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_radau5.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/atm_radau5.f	(revision 3477)
@@ -0,0 +1,4572 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT, H
+      SAVE H
+      DATA H /0.0d0/
+      INTEGER Nfun, Njac, Nstp, Nacc, Nrej, Ndec, Nsol
+      SAVE Nstp, Nacc, Nrej
+      DATA Nstp /0/
+      DATA Nacc /0/
+      DATA Nrej /0/
+      INTEGER i
+
+      PARAMETER (LWORK=5*NVAR*NVAR+12*NVAR+20,LIWORK=3*NVAR+20)
+      PARAMETER (LRCONT=4*NVAR+4)
+
+      KPP_REAL WORK(LWORK), RPAR(1)
+      INTEGER IWORK(LIWORK), IPAR(1)
+      COMMON /CONT/ ICONT(4),RCONT(LRCONT)
+      EXTERNAL FUNC_CHEM,JAC_CHEM,SOLOUT
+
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MLMAS=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUMAS=NVAR ! --- JACOBIAN IS A FULL MATRIX
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      IWORK(3) = 8    !  Max no. of Newton iterations
+      IWORK(4) = 0    !  Starting values for Newton are interpolated (0) or zero (1)
+      IWORK(8) = 2    ! Gustaffson (1) or classic(2) controller
+      WORK(2)  = 0.9  ! Safety factor
+
+      CALL RADAU5(NVAR,FUNC_CHEM,TIN,VAR,TOUT,H,
+     &                  RTOL,ATOL,ITOL,
+     &                  JAC_CHEM ,IJAC,MLJAC,MUJAC,
+     &                  FUNC_CHEM ,IMAS,MLMAS,MUMAS,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,RPAR,IPAR,IDID)
+
+
+       Nfun = Nfun + IWORK(14)
+       Njac = Njac + IWORK(15)
+       Nstp = Nstp + IWORK(16)
+       Nacc = Nacc + IWORK(17)
+       Nrej = Nrej + IWORK(18)
+       Ndec = Ndec + IWORK(19)
+       Nsol = Nsol + IWORK(20)
+
+       print("('Nstep=',I5,' Nacc=',I6,' Nrej=',I6)"),Nstp, Nacc, Nrej
+
+      IF (IDID.LT.0) THEN
+        print *,'RADAU: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE RADAU5(N,FCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,
+     &                  MAS ,IMAS,MLMAS,MUMAS,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,RPAR,IPAR,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS
+C                     M*Y'=F(X,Y).
+C     THE SYSTEM CAN BE (LINEARLY) IMPLICIT (MASS-MATRIX M .NE. I)
+C     OR EXPLICIT (M=I).
+C     THE METHOD USED IS AN IMPLICIT RUNGE-KUTTA METHOD (RADAU IIA)
+C     OF ORDER 5 WITH STEP SIZE CONTROL AND CONTINUOUS OUTPUT.
+C     C.F. SECTION IV.8
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND
+C              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+C
+C     THIS CODE IS PART OF THE BOOK:
+C         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+C         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+C         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+C         SPRINGER-VERLAG (1991)
+C
+C     VERSION OF SEPTEMBER 30, 1995
+C
+C     INPUT PARAMETERS
+C     ----------------
+C     N           DIMENSION OF THE SYSTEM
+C
+C     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+C                 VALUE OF F(X,Y):
+C                    SUBROUTINE FCN(N,X,Y,F,RPAR,IPAR)
+C                    KPP_REAL X,Y(N),F(N)
+C                    F(1)=...   ETC.
+C                 RPAR, IPAR (SEE BELOW)
+C
+C     X           INITIAL X-VALUE
+C
+C     Y(N)        INITIAL VALUES FOR Y
+C
+C     XEND        FINAL X-VALUE (XEND-X MAY BE POSITIVE OR NEGATIVE)
+C
+C     H           INITIAL STEP SIZE GUESS;
+C                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT,
+C                 H=1.D0/(NORM OF F'), USUALLY 1.D-3 OR 1.D-5, IS GOOD.
+C                 THIS CHOICE IS NOT VERY IMPORTANT, THE STEP SIZE IS
+C                 QUICKLY ADAPTED. (IF H=0.D0, THE CODE PUTS H=1.D-6).
+C
+C     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+C                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+C
+C     ITOL        SWITCH FOR RelTol AND AbsTol:
+C                   ITOL=0: BOTH RelTol AND AbsTol ARE SCALARS.
+C                     THE CODE KEEPS, ROUGHLY, THE LOCAL ERROR OF
+C                     Y(I) BELOW RelTol*ABS(Y(I))+AbsTol
+C                   ITOL=1: BOTH RelTol AND AbsTol ARE VECTORS.
+C                     THE CODE KEEPS THE LOCAL ERROR OF Y(I) BELOW
+C                     RelTol(I)*ABS(Y(I))+AbsTol(I).
+C
+C     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO Y
+C                 (THIS ROUTINE IS ONLY CALLED IF IJAC=1; SUPPLY
+C                 A DUMMY SUBROUTINE IN THE CASE IJAC=0).
+C                 FOR IJAC=1, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE JAC(N,X,Y,DFY,LDFY,RPAR,IPAR)
+C                    KPP_REAL X,Y(N),DFY(LDFY,N)
+C                    DFY(1,1)= ...
+C                 LDFY, THE COLUMN-LENGTH OF THE ARRAY, IS
+C                 FURNISHED BY THE CALLING PROGRAM.
+C                 IF (MLJAC.EQ.N) THE JACOBIAN IS SUPPOSED TO
+C                    BE FULL AND THE PARTIAL DERIVATIVES ARE
+C                    STORED IN DFY AS
+C                       DFY(I,J) = PARTIAL F(I) / PARTIAL Y(J)
+C                 ELSE, THE JACOBIAN IS TAKEN AS BANDED AND
+C                    THE PARTIAL DERIVATIVES ARE STORED
+C                    DIAGONAL-WISE AS
+C                       DFY(I-J+MUJAC+1,J) = PARTIAL F(I) / PARTIAL Y(J).
+C
+C     IJAC        SWITCH FOR THE COMPUTATION OF THE JACOBIAN:
+C                    IJAC=0: JACOBIAN IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "JAC" IS NEVER CALLED.
+C                    IJAC=1: JACOBIAN IS SUPPLIED BY SUBROUTINE JAC.
+C
+C     MLJAC       SWITCH FOR THE BANDED STRUCTURE OF THE JACOBIAN:
+C                    MLJAC=N: JACOBIAN IS A FULL MATRIX. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLJAC<N: MLJAC IS THE LOWER BANDWITH OF JACOBIAN
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C
+C     MUJAC       UPPER BANDWITH OF JACOBIAN  MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLJAC=N.
+C
+C     ----   MAS,IMAS,MLMAS, AND MUMAS HAVE ANALOG MEANINGS      -----
+C     ----   FOR THE "MASS MATRIX" (THE MATRIX "M" OF SECTION IV.8): -
+C
+C     MAS         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE MASS-
+C                 MATRIX M.
+C                 IF IMAS=0, THIS MATRIX IS ASSUMED TO BE THE IDENTITY
+C                 MATRIX AND NEEDS NOT TO BE DEFINED;
+C                 SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C                 IF IMAS=1, THE SUBROUTINE MAS IS OF THE FORM
+C                    SUBROUTINE MAS(N,AM,LMAS,RPAR,IPAR)
+C                    KPP_REAL AM(LMAS,N)
+C                    AM(1,1)= ....
+C                    IF (MLMAS.EQ.N) THE MASS-MATRIX IS STORED
+C                    AS FULL MATRIX LIKE
+C                         AM(I,J) = M(I,J)
+C                    ELSE, THE MATRIX IS TAKEN AS BANDED AND STORED
+C                    DIAGONAL-WISE AS
+C                         AM(I-J+MUMAS+1,J) = M(I,J).
+C
+C     IMAS       GIVES INFORMATION ON THE MASS-MATRIX:
+C                    IMAS=0: M IS SUPPOSED TO BE THE IDENTITY
+C                       MATRIX, MAS IS NEVER CALLED.
+C                    IMAS=1: MASS-MATRIX  IS SUPPLIED.
+C
+C     MLMAS       SWITCH FOR THE BANDED STRUCTURE OF THE MASS-MATRIX:
+C                    MLMAS=N: THE FULL MATRIX CASE. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLMAS<N: MLMAS IS THE LOWER BANDWITH OF THE
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C                 MLMAS IS SUPPOSED TO BE .LE. MLJAC.
+C
+C     MUMAS       UPPER BANDWITH OF MASS-MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLMAS=N.
+C                 MUMAS IS SUPPOSED TO BE .LE. MUJAC.
+C
+C     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+C                 NUMERICAL SOLUTION DURING INTEGRATION.
+C                 IF IOUT=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+C                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0.
+C                 IT MUST HAVE THE FORM
+C                    SUBROUTINE SOLOUT (NR,XOLD,X,Y,CONT,LRC,N,
+C                                       RPAR,IPAR,IRTRN)
+C                    KPP_REAL X,Y(N),CONT(LRC)
+C                    ....
+C                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+C                    GRID-POINT "X" (THEREBY THE INITIAL VALUE IS
+C                    THE FIRST GRID-POINT).
+C                 "XOLD" IS THE PRECEEDING GRID-POINT.
+C                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+C                    IS SET <0, RADAU5 RETURNS TO THE CALLING PROGRAM.
+C
+C          -----  CONTINUOUS OUTPUT: -----
+C                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+C                 FOR THE INTERVAL [XOLD,X] IS AVAILABLE THROUGH
+C                 THE FUNCTION
+C                        >>>   CONTR5(I,S,CONT,LRC)   <<<
+C                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+C                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+C                 S SHOULD LIE IN THE INTERVAL [XOLD,X].
+C                 DO NOT CHANGE THE ENTRIES OF CONT(LRC), IF THE
+C                 DENSE OUTPUT FUNCTION IS USED.
+C
+C     IOUT        SWITCH FOR CALLING THE SUBROUTINE SOLOUT:
+C                    IOUT=0: SUBROUTINE IS NEVER CALLED
+C                    IOUT=1: SUBROUTINE IS AVAILABLE FOR OUTPUT.
+C
+C     WORK        ARRAY OF WORKING SPACE OF LENGTH "LWORK".
+C                 WORK(1), WORK(2),.., WORK(20) SERVE AS PARAMETERS
+C                 FOR THE CODE. FOR STANDARD USE OF THE CODE
+C                 WORK(1),..,WORK(20) MUST BE SET TO ZERO BEFORE
+C                 CALLING. SEE BELOW FOR A MORE SOPHISTICATED USE.
+C                 WORK(21),..,WORK(LWORK) SERVE AS WORKING SPACE
+C                 FOR ALL VECTORS AND MATRICES.
+C                 "LWORK" MUST BE AT LEAST
+C                             N*(LJAC+LMAS+3*LE+12)+20
+C                 WHERE
+C                    LJAC=N              IF MLJAC=N (FULL JACOBIAN)
+C                    LJAC=MLJAC+MUJAC+1  IF MLJAC<N (BANDED JAC.)
+C                 AND
+C                    LMAS=0              IF IMAS=0
+C                    LMAS=N              IF IMAS=1 AND MLMAS=N (FULL)
+C                    LMAS=MLMAS+MUMAS+1  IF MLMAS<N (BANDED MASS-M.)
+C                 AND
+C                    LE=N               IF MLJAC=N (FULL JACOBIAN)
+C                    LE=2*MLJAC+MUJAC+1 IF MLJAC<N (BANDED JAC.)
+C
+C                 IN THE USUAL CASE WHERE THE JACOBIAN IS FULL AND THE
+C                 MASS-MATRIX IS THE INDENTITY (IMAS=0), THE MINIMUM
+C                 STORAGE REQUIREMENT IS
+C                             LWORK = 4*N*N+12*N+20.
+C                 IF IWORK(9)=M1>0 THEN "LWORK" MUST BE AT LEAST
+C                          N*(LJAC+12)+(N-M1)*(LMAS+3*LE)+20
+C                 WHERE IN THE DEFINITIONS OF LJAC, LMAS AND LE THE
+C                 NUMBER N CAN BE REPLACED BY N-M1.
+C
+C     LWORK       DECLARED LENGTH OF ARRAY "WORK".
+C
+C     IWORK       INTEGER WORKING SPACE OF LENGTH "LIWORK".
+C                 IWORK(1),IWORK(2),...,IWORK(20) SERVE AS PARAMETERS
+C                 FOR THE CODE. FOR STANDARD USE, SET IWORK(1),..,
+C                 IWORK(20) TO ZERO BEFORE CALLING.
+C                 IWORK(21),...,IWORK(LIWORK) SERVE AS WORKING AREA.
+C                 "LIWORK" MUST BE AT LEAST 3*N+20.
+C
+C     LIWORK      DECLARED LENGTH OF ARRAY "IWORK".
+C
+C     RPAR, IPAR  REAL AND INTEGER PARAMETERS (OR PARAMETER ARRAYS) WHICH
+C                 CAN BE USED FOR COMMUNICATION BETWEEN YOUR CALLING
+C                 PROGRAM AND THE FCN, JAC, MAS, SOLOUT SUBROUTINES.
+C
+C ----------------------------------------------------------------------
+C
+C     SOPHISTICATED SETTING OF PARAMETERS
+C     -----------------------------------
+C              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT WORK
+C              WELL. THEY MAY BE DEFINED BY SETTING WORK(1),...
+C              AS WELL AS IWORK(1),... DIFFERENT FROM ZERO.
+C              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+C
+C    IWORK(1)  IF IWORK(1).NE.0, THE CODE TRANSFORMS THE JACOBIAN
+C              MATRIX TO HESSENBERG FORM. THIS IS PARTICULARLY
+C              ADVANTAGEOUS FOR LARGE SYSTEMS WITH FULL JACOBIAN.
+C              IT DOES NOT WORK FOR BANDED JACOBIAN (MLJAC<N)
+C              AND NOT FOR IMPLICIT SYSTEMS (IMAS=1).
+C
+C    IWORK(2)  THIS IS THE MAXIMAL NUMBER OF ALLOWED STEPS.
+C              THE DEFAULT VALUE (FOR IWORK(2)=0) IS 100000.
+C
+C    IWORK(3)  THE MAXIMUM NUMBER OF NEWTON ITERATIONS FOR THE
+C              SOLUTION OF THE IMPLICIT SYSTEM IN EACH STEP.
+C              THE DEFAULT VALUE (FOR IWORK(3)=0) IS 7.
+C
+C    IWORK(4)  IF IWORK(4).EQ.0 THE EXTRAPOLATED COLLOCATION SOLUTION
+C              IS TAKEN AS STARTING VALUE FOR NEWTON'S METHOD.
+C              IF IWORK(4).NE.0 ZERO STARTING VALUES ARE USED.
+C              THE LATTER IS RECOMMENDED IF NEWTON'S METHOD HAS
+C              DIFFICULTIES WITH CONVERGENCE (THIS IS THE CASE WHEN
+C              NSTEP IS LARGER THAN NACCPT + NREJCT; SEE OUTPUT PARAM.).
+C              DEFAULT IS IWORK(4)=0.
+C
+C       THE FOLLOWING 3 PARAMETERS ARE IMPORTANT FOR
+C       DIFFERENTIAL-ALGEBRAIC SYSTEMS OF INDEX > 1.
+C       THE FUNCTION-SUBROUTINE SHOULD BE WRITTEN SUCH THAT
+C       THE INDEX 1,2,3 VARIABLES APPEAR IN THIS ORDER.
+C       IN ESTIMATING THE ERROR THE INDEX 2 VARIABLES ARE
+C       MULTIPLIED BY H, THE INDEX 3 VARIABLES BY H**2.
+C
+C    IWORK(5)  DIMENSION OF THE INDEX 1 VARIABLES (MUST BE > 0). FOR
+C              ODE'S THIS EQUALS THE DIMENSION OF THE SYSTEM.
+C              DEFAULT IWORK(5)=N.
+C
+C    IWORK(6)  DIMENSION OF THE INDEX 2 VARIABLES. DEFAULT IWORK(6)=0.
+C
+C    IWORK(7)  DIMENSION OF THE INDEX 3 VARIABLES. DEFAULT IWORK(7)=0.
+C
+C    IWORK(8)  SWITCH FOR STEP SIZE STRATEGY
+C              IF IWORK(8).EQ.1  MOD. PREDICTIVE CONTROLLER (GUSTAFSSON)
+C              IF IWORK(8).EQ.2  CLASSICAL STEP SIZE CONTROL
+C              THE DEFAULT VALUE (FOR IWORK(8)=0) IS IWORK(8)=1.
+C              THE CHOICE IWORK(8).EQ.1 SEEMS TO PRODUCE SAFER RESULTS;
+C              FOR SIMPLE PROBLEMS, THE CHOICE IWORK(8).EQ.2 PRODUCES
+C              OFTEN SLIGHTLY FASTER RUNS
+C
+C       IF THE DIFFERENTIAL SYSTEM HAS THE SPECIAL STRUCTURE THAT
+C            Y(I)' = Y(I+M2)   FOR  I=1,...,M1,
+C       WITH M1 A MULTIPLE OF M2, A SUBSTANTIAL GAIN IN COMPUTERTIME
+C       CAN BE ACHIEVED BY SETTING THE FOLLOWING TWO PARAMETERS. E.G.,
+C       FOR SECOND ORDER SYSTEMS P'=V, V'=G(P,V), WHERE P AND V ARE
+C       VECTORS OF DIMENSION N/2, ONE HAS TO PUT M1=M2=N/2.
+C       FOR M1>0 SOME OF THE INPUT PARAMETERS HAVE DIFFERENT MEANINGS:
+C       - JAC: ONLY THE ELEMENTS OF THE NON-TRIVIAL PART OF THE
+C              JACOBIAN HAVE TO BE STORED
+C              IF (MLJAC.EQ.N-M1) THE JACOBIAN IS SUPPOSED TO BE FULL
+C                 DFY(I,J) = PARTIAL F(I+M1) / PARTIAL Y(J)
+C                FOR I=1,N-M1 AND J=1,N.
+C              ELSE, THE JACOBIAN IS BANDED ( M1 = M2 * MM )
+C                 DFY(I-J+MUJAC+1,J+K*M2) = PARTIAL F(I+M1) / PARTIAL Y(J+K*M2)
+C                FOR I=1,MLJAC+MUJAC+1 AND J=1,M2 AND K=0,MM.
+C       - MLJAC: MLJAC=N-M1: IF THE NON-TRIVIAL PART OF THE JACOBIAN IS FULL
+C                0<=MLJAC<N-M1: IF THE (MM+1) SUBMATRICES (FOR K=0,MM)
+C                     PARTIAL F(I+M1) / PARTIAL Y(J+K*M2),  I,J=1,M2
+C                    ARE BANDED, MLJAC IS THE MAXIMAL LOWER BANDWIDTH
+C                    OF THESE MM+1 SUBMATRICES
+C       - MUJAC: MAXIMAL UPPER BANDWIDTH OF THESE MM+1 SUBMATRICES
+C                NEED NOT BE DEFINED IF MLJAC=N-M1
+C       - MAS: IF IMAS=0 THIS MATRIX IS ASSUMED TO BE THE IDENTITY AND
+C              NEED NOT BE DEFINED. SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C              IT IS ASSUMED THAT ONLY THE ELEMENTS OF RIGHT LOWER BLOCK OF
+C              DIMENSION N-M1 DIFFER FROM THAT OF THE IDENTITY MATRIX.
+C              IF (MLMAS.EQ.N-M1) THIS SUBMATRIX IS SUPPOSED TO BE FULL
+C                 AM(I,J) = M(I+M1,J+M1)     FOR I=1,N-M1 AND J=1,N-M1.
+C              ELSE, THE MASS MATRIX IS BANDED
+C                 AM(I-J+MUMAS+1,J) = M(I+M1,J+M1)
+C       - MLMAS: MLMAS=N-M1: IF THE NON-TRIVIAL PART OF M IS FULL
+C                0<=MLMAS<N-M1: LOWER BANDWIDTH OF THE MASS MATRIX
+C       - MUMAS: UPPER BANDWIDTH OF THE MASS MATRIX
+C                NEED NOT BE DEFINED IF MLMAS=N-M1
+C
+C    IWORK(9)  THE VALUE OF M1.  DEFAULT M1=0.
+C
+C    IWORK(10) THE VALUE OF M2.  DEFAULT M2=M1.
+C
+C ----------
+C
+C    WORK(1)   UROUND, THE ROUNDING UNIT, DEFAULT 1.D-16.
+C
+C    WORK(2)   THE SAFETY FACTOR IN STEP SIZE PREDICTION,
+C              DEFAULT 0.9D0.
+C
+C    WORK(3)   DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+C              INCREASE WORK(3), TO 0.1 SAY, WHEN JACOBIAN EVALUATIONS
+C              ARE COSTLY. FOR SMALL SYSTEMS WORK(3) SHOULD BE SMALLER
+C              (0.001D0, SAY). NEGATIV WORK(3) FORCES THE CODE TO
+C              COMPUTE THE JACOBIAN AFTER EVERY ACCEPTED STEP.
+C              DEFAULT 0.001D0.
+C
+C    WORK(4)   STOPPING CRITERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+C              SMALLER VALUES OF WORK(4) MAKE THE CODE SLOWER, BUT SAFER.
+C              DEFAULT 0.03D0.
+C
+C    WORK(5) AND WORK(6) : IF WORK(5) < HNEW/HOLD < WORK(6), THEN THE
+C              STEP SIZE IS NOT CHANGED. THIS SAVES, TOGETHER WITH A
+C              LARGE WORK(3), LU-DECOMPOSITIONS AND COMPUTING TIME FOR
+C              LARGE SYSTEMS. FOR SMALL SYSTEMS ONE MAY HAVE
+C              WORK(5)=1.D0, WORK(6)=1.2D0, FOR LARGE FULL SYSTEMS
+C              WORK(5)=0.99D0, WORK(6)=2.D0 MIGHT BE GOOD.
+C              DEFAULTS WORK(5)=1.D0, WORK(6)=1.2D0 .
+C
+C    WORK(7)   MAXIMAL STEP SIZE, DEFAULT XEND-X.
+C
+C    WORK(8), WORK(9)   PARAMETERS FOR STEP SIZE SELECTION
+C              THE NEW STEP SIZE IS CHOSEN SUBJECT TO THE RESTRICTION
+C                 WORK(8) <= HNEW/HOLD <= WORK(9)
+C              DEFAULT VALUES: WORK(8)=0.2D0, WORK(9)=8.D0
+C
+C-----------------------------------------------------------------------
+C
+C     OUTPUT PARAMETERS
+C     -----------------
+C     X           X-VALUE FOR WHICH THE SOLUTION HAS BEEN COMPUTED
+C                 (AFTER SUCCESSFUL RETURN X=XEND).
+C
+C     Y(N)        NUMERICAL SOLUTION AT X
+C
+C     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+C
+C     IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+C                   IDID= 1  COMPUTATION SUCCESSFUL,
+C                   IDID= 2  COMPUT. SUCCESSFUL (INTERRUPTED BY SOLOUT)
+C                   IDID=-1  INPUT IS NOT CONSISTENT,
+C                   IDID=-2  LARGER NMAX IS NEEDED,
+C                   IDID=-3  STEP SIZE BECOMES TOO SMALL,
+C                   IDID=-4  MATRIX IS REPEATEDLY SINGULAR.
+C
+C   IWORK(14)  NFCN    NUMBER OF FUNCTION EVALUATIONS (THOSE FOR NUMERICAL
+C                      EVALUATION OF THE JACOBIAN ARE NOT COUNTED)
+C   IWORK(15)  NJAC    NUMBER OF JACOBIAN EVALUATIONS (EITHER ANALYTICALLY
+C                      OR NUMERICALLY)
+C   IWORK(16)  NSTEP   NUMBER OF COMPUTED STEPS
+C   IWORK(17)  NACCPT  NUMBER OF ACCEPTED STEPS
+C   IWORK(18)  NREJCT  NUMBER OF REJECTED STEPS (DUE TO ERROR TEST),
+C                      (STEP REJECTIONS IN THE FIRST STEP ARE NOT COUNTED)
+C   IWORK(19)  NDEC    NUMBER OF LU-DECOMPOSITIONS OF BOTH MATRICES
+C   IWORK(20)  NSOL    NUMBER OF FORWARD-BACKWARD SUBSTITUTIONS, OF BOTH
+C                      SYSTEMS; THE NSTEP FORWARD-BACKWARD SUBSTITUTIONS,
+C                      NEEDED FOR STEP SIZE SELECTION, ARE NOT COUNTED
+C-----------------------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(*),RelTol(*),WORK(LWORK),IWORK(LIWORK)
+      DIMENSION RPAR(*),IPAR(*)
+      LOGICAL IMPLCT,JBAND,ARRET,STARTN,PRED
+      EXTERNAL FCN,JAC,MAS,SOLOUT
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS
+C *** *** *** *** *** *** ***
+       NFCN=0
+       NJAC=0
+       NSTEP=0
+       NACCPT=0
+       NREJCT=0
+       NDEC=0
+       NSOL=0
+       ARRET=.FALSE.
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF (IWORK(2).EQ.0) THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF (NMAX.LE.0) THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NIT    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF (IWORK(3).EQ.0) THEN
+         NIT=7
+      ELSE
+         NIT=IWORK(3)
+         IF (NIT.LE.0) THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- STARTN  SWITCH FOR STARTING VALUES OF NEWTON ITERATIONS
+      IF(IWORK(4).EQ.0)THEN
+         STARTN=.FALSE.
+      ELSE
+         STARTN=.TRUE.
+      END IF
+C -------- PARAMETER FOR DIFFERENTIAL-ALGEBRAIC COMPONENTS
+      NIND1=IWORK(5)
+      NIND2=IWORK(6)
+      NIND3=IWORK(7)
+      IF (NIND1.EQ.0) NIND1=N
+      IF (NIND1+NIND2+NIND3.NE.N) THEN
+       WRITE(6,*)' CURIOUS INPUT FOR IWORK(5,6,7)=',NIND1,NIND2,NIND3
+       ARRET=.TRUE.
+      END IF
+C -------- PRED   STEP SIZE CONTROL
+      IF(IWORK(8).LE.1)THEN
+         PRED=.TRUE.
+      ELSE
+         PRED=.FALSE.
+      END IF
+C -------- PARAMETER FOR SECOND ORDER EQUATIONS
+      M1=IWORK(9)
+      M2=IWORK(10)
+      NM1=N-M1
+      IF (M1.EQ.0) M2=N
+      IF (M2.EQ.0) M2=M1
+      IF (M1.LT.0.OR.M2.LT.0.OR.M1+M2.GT.N) THEN
+       WRITE(6,*)' CURIOUS INPUT FOR IWORK(9,10)=',M1,M2
+       ARRET=.TRUE.
+      END IF
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.0D0+UROUND>1.0D0
+      IF (WORK(1).EQ.0.0D0) THEN
+         UROUND=1.0D-16
+      ELSE
+         UROUND=WORK(1)
+         IF (UROUND.LE.1.0D-19.OR.UROUND.GE.1.0D0) THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 20 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      IF (WORK(2).EQ.0.0D0) THEN
+         SAFE=0.9D0
+      ELSE
+         SAFE=WORK(2)
+         IF (SAFE.LE.0.001D0.OR.SAFE.GE.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(2)=',WORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF (WORK(3).EQ.0.D0) THEN
+         THET=0.001D0
+      ELSE
+         THET=WORK(3)
+         IF (THET.LE.0.0D0.OR.THET.GE.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(3)=',WORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --- FNEWT   STOPPING CRIERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+      IF (WORK(4).EQ.0.D0) THEN
+         FNEWT=0.03D0
+      ELSE
+         FNEWT=WORK(4)
+         IF (FNEWT.LE.UROUND) THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(4)=',WORK(4)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --- QUOT1 AND QUOT2: IF QUOT1 < HNEW/HOLD < QUOT2, STEP SIZE = CONST.
+      IF (WORK(5).EQ.0.D0) THEN
+         QUOT1=1.D0
+      ELSE
+         QUOT1=WORK(5)
+      END IF
+      IF (WORK(6).EQ.0.D0) THEN
+         QUOT2=1.2D0
+      ELSE
+         QUOT2=WORK(6)
+      END IF
+      IF (QUOT1.GT.1.0D0.OR.QUOT2.LT.1.0D0) THEN
+         WRITE(6,*)' CURIOUS INPUT FOR WORK(5,6)=',QUOT1,QUOT2
+         ARRET=.TRUE.
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF (WORK(7).EQ.0.D0) THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(7)
+      END IF
+C -------  FACL,FACR     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(8).EQ.0.D0)THEN
+         FACL=5.D0
+      ELSE
+         FACL=1.D0/WORK(8)
+      END IF
+      IF(WORK(9).EQ.0.D0)THEN
+         FACR=1.D0/8.0D0
+      ELSE
+         FACR=1.D0/WORK(9)
+      END IF
+      IF (FACL.LT.1.0D0.OR.FACR.GT.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT WORK(8,9)=',WORK(8),WORK(9)
+            ARRET=.TRUE.
+         END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+          END DO
+      END IF
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- IMPLICIT, BANDED OR NOT ?
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.LT.NM1
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN  AND  MATRICES E1, E2
+      IF (JBAND) THEN
+         LDJAC=MLJAC+MUJAC+1
+         LDE1=MLJAC+LDJAC
+      ELSE
+         MLJAC=NM1
+         MUJAC=NM1
+         LDJAC=NM1
+         LDE1=NM1
+      END IF
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          IF (MLMAS.NE.NM1) THEN
+              LDMAS=MLMAS+MUMAS+1
+              IF (JBAND) THEN
+                 IJOB=4
+              ELSE
+                 IJOB=3
+              END IF
+          ELSE
+              LDMAS=NM1
+              IJOB=5
+          END IF
+C ------ BANDWITH OF "MAS" NOT SMALLER THAN BANDWITH OF "JAC"
+          IF (MLMAS.GT.MLJAC.OR.MUMAS.GT.MUJAC) THEN
+             WRITE (6,*) 'BANDWITH OF "MAS" NOT SMALLER THAN BANDWITH OF
+     & "JAC"'
+            ARRET=.TRUE.
+          END IF
+      ELSE
+          LDMAS=0
+          IF (JBAND) THEN
+             IJOB=2
+          ELSE
+             IJOB=1
+             IF (N.GT.2.AND.IWORK(1).NE.0) IJOB=7
+          END IF
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------ HESSENBERG OPTION ONLY FOR EXPLICIT EQU. WITH FULL JACOBIAN
+      IF ((IMPLCT.OR.JBAND).AND.IJOB.EQ.7) THEN
+         WRITE(6,*)' HESSENBERG OPTION ONLY FOR EXPLICIT EQUATIONS WITH
+     &FULL JACOBIAN'
+         ARRET=.TRUE.
+      END IF
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEZ1=21
+      IEZ2=IEZ1+N
+      IEZ3=IEZ2+N
+      IEY0=IEZ3+N
+      IESCAL=IEY0+N
+      IEF1=IESCAL+N
+      IEF2=IEF1+N
+      IEF3=IEF2+N
+      IECON=IEF3+N
+      IEJAC=IECON+4*N
+      IEMAS=IEJAC+N*LDJAC
+      IEE1=IEMAS+NM1*LDMAS
+      IEE2R=IEE1+NM1*LDE1
+      IEE2I=IEE2R+NM1*LDE1
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE2I+NM1*LDE1-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP1=21
+      IEIP2=IEIP1+NM1
+      IEIPH=IEIP2+NM1
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEIPH+NM1-1
+      IF (ISTORE.GT.LIWORK) THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL RADCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,IJOB,STARTN,
+     &   NIND1,NIND2,NIND3,PRED,FACL,FACR,M1,M2,NM1,
+     &   IMPLCT,JBAND,LDJAC,LDE1,LDMAS2,WORK(IEZ1),WORK(IEZ2),
+     &   WORK(IEZ3),WORK(IEY0),WORK(IESCAL),WORK(IEF1),WORK(IEF2),
+     &   WORK(IEF3),WORK(IEJAC),WORK(IEE1),WORK(IEE2R),WORK(IEE2I),
+     &   WORK(IEMAS),IWORK(IEIP1),IWORK(IEIP2),IWORK(IEIPH),
+     &   WORK(IECON),NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL,RPAR,IPAR)
+      IWORK(14)=NFCN
+      IWORK(15)=NJAC
+      IWORK(16)=NSTEP
+      IWORK(17)=NACCPT
+      IWORK(18)=NREJCT
+      IWORK(19)=NDEC
+      IWORK(20)=NSOL
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C     END OF SUBROUTINE RADAU5
+C
+C ***********************************************************
+C
+      SUBROUTINE RADCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,IJOB,STARTN,
+     &   NIND1,NIND2,NIND3,PRED,FACL,FACR,M1,M2,NM1,
+     &   IMPLCT,BANDED,LDJAC,LDE1,LDMAS,Z1,Z2,Z3,
+     &   Y0,SCAL,F1,F2,F3,FJAC,E1,E2R,E2I,FMAS,IP1,IP2,IPHES,
+     &   CONT,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL,RPAR,IPAR)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR RADAU5
+C     PARAMETERS SAME AS IN RADAU5 WITH WORKSPACE ADDED
+C ----------------------------------------------------------
+C         DECLARATIONS
+C ----------------------------------------------------------
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),Z1(N),Z2(N),Z3(N),Y0(N),SCAL(N),F1(N),F2(N),F3(N)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),CONT(4*N)
+      DIMENSION E1(LDE1,NM1),E2R(LDE1,NM1),E2I(LDE1,NM1)
+      DIMENSION AbsTol(*),RelTol(*),RPAR(*),IPAR(*)
+      INTEGER IP1(NM1),IP2(NM1),IPHES(NM1)
+      COMMON /CONRA5/NN,NN2,NN3,NN4,XSOL,HSOL,C2M1,C1M1
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      LOGICAL REJECT,FIRST,IMPLCT,BANDED,CALJAC,STARTN,CALHES
+      LOGICAL INDEX1,INDEX2,INDEX3,LAST,PRED
+      EXTERNAL FCN, JAC, MAS, SOLOUT
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+C --------- DUPLIFY N FOR COMMON BLOCK CONT -----
+      NN=N
+      NN2=2*N
+      NN3=3*N
+      LRC=4*N
+C -------- CHECK THE INDEX OF THE PROBLEM -----
+      INDEX1=NIND1.NE.0
+      INDEX2=NIND2.NE.0
+      INDEX3=NIND3.NE.0
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF (IMPLCT) CALL MAS(NM1,FMAS,LDMAS,RPAR,IPAR)
+C ---------- CONSTANTS ---------
+      SQ6=DSQRT(6.D0)
+      C1=(4.D0-SQ6)/10.D0
+      C2=(4.D0+SQ6)/10.D0
+      C1M1=C1-1.D0
+      C2M1=C2-1.D0
+      C1MC2=C1-C2
+      DD1=-(13.D0+7.D0*SQ6)/3.D0
+      DD2=(-13.D0+7.D0*SQ6)/3.D0
+      DD3=-1.D0/3.D0
+      U1=(6.D0+81.D0**(1.D0/3.D0)-9.D0**(1.D0/3.D0))/30.D0
+      ALPH=(12.D0-81.D0**(1.D0/3.D0)+9.D0**(1.D0/3.D0))/60.D0
+      BETA=(81.D0**(1.D0/3.D0)+9.D0**(1.D0/3.D0))*DSQRT(3.D0)/60.D0
+      CNO=ALPH**2+BETA**2
+      U1=1.0D0/U1
+      ALPH=ALPH/CNO
+      BETA=BETA/CNO
+      T11=9.1232394870892942792D-02
+      T12=-0.14125529502095420843D0
+      T13=-3.0029194105147424492D-02
+      T21=0.24171793270710701896D0
+      T22=0.20412935229379993199D0
+      T23=0.38294211275726193779D0
+      T31=0.96604818261509293619D0
+      TI11=4.3255798900631553510D0
+      TI12=0.33919925181580986954D0
+      TI13=0.54177053993587487119D0
+      TI21=-4.1787185915519047273D0
+      TI22=-0.32768282076106238708D0
+      TI23=0.47662355450055045196D0
+      TI31=-0.50287263494578687595D0
+      TI32=2.5719269498556054292D0
+      TI33=-0.59603920482822492497D0
+      IF (M1.GT.0) IJOB=IJOB+10
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAXN=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAXN)
+      H=SIGN(H,POSNEG)
+      HOLD=H
+      REJECT=.FALSE.
+      FIRST=.TRUE.
+      LAST=.FALSE.
+      IF ((X+H*1.0001D0-XEND)*POSNEG.GE.0.D0) THEN
+         H=XEND-X
+         LAST=.TRUE.
+      END IF
+      FACCON=1.D0
+      CFAC=SAFE*(1+2*NIT)
+      NSING=0
+      XOLD=X
+      IF (IOUT.NE.0) THEN
+          IRTRN=1
+          NRSOL=1
+          XOSOL=XOLD
+          XSOL=X
+          DO I=1,N
+             CONT(I)=Y(I)
+          END DO
+          NSOLU=N
+          HSOL=HOLD
+          CALL SOLOUT(NRSOL,XOSOL,XSOL,Y,CONT,LRC,NSOLU,
+     &                RPAR,IPAR,IRTRN)
+          IF (IRTRN.LT.0) GOTO 179
+      END IF
+      MLE=MLJAC
+      MUE=MUJAC
+      MBJAC=MLJAC+MUJAC+1
+      MBB=MLMAS+MUMAS+1
+      MDIAG=MLE+MUE+1
+      MDIFF=MLE+MUE-MUMAS
+      MBDIAG=MUMAS+1
+      N2=2*N
+      N3=3*N
+      IF (ITOL.EQ.0) THEN
+          DO I=1,N
+             SCAL(I)=AbsTol(1)+RelTol(1)*ABS(Y(I))
+          END DO
+      ELSE
+          DO I=1,N
+             SCAL(I)=AbsTol(I)+RelTol(I)*ABS(Y(I))
+          END DO
+      END IF
+      HHFAC=H
+      CALL FCN(N,X,Y,Y0,RPAR,IPAR)
+      NFCN=NFCN+1
+C --- BASIC INTEGRATION STEP
+  10  CONTINUE
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      IF (IJAC.EQ.0) THEN
+C --- COMPUTE JACOBIAN MATRIX NUMERICALLY
+         IF (BANDED) THEN
+C --- JACOBIAN IS BANDED
+            MUJACP=MUJAC+1
+            MD=MIN(MBJAC,M2)
+            DO MM=1,M1/M2+1
+               DO K=1,MD
+                  J=K+(MM-1)*M2
+ 12               F1(J)=Y(J)
+                  F2(J)=DSQRT(UROUND*MAX(1.D-5,ABS(Y(J))))
+                  Y(J)=Y(J)+F2(J)
+                  J=J+MD
+                  IF (J.LE.MM*M2) GOTO 12
+                  CALL FCN(N,X,Y,CONT,RPAR,IPAR)
+                  J=K+(MM-1)*M2
+                  J1=K
+                  LBEG=MAX(1,J1-MUJAC)+M1
+ 14               LEND=MIN(M2,J1+MLJAC)+M1
+                  Y(J)=F1(J)
+                  MUJACJ=MUJACP-J1-M1
+                  DO L=LBEG,LEND
+                     FJAC(L+MUJACJ,J)=(CONT(L)-Y0(L))/F2(J)
+                  END DO
+                  J=J+MD
+                  J1=J1+MD
+                  LBEG=LEND+1
+                  IF (J.LE.MM*M2) GOTO 14
+               END DO
+            END DO
+         ELSE
+C --- JACOBIAN IS FULL
+            DO I=1,N
+               YSAFE=Y(I)
+               DELT=DSQRT(UROUND*MAX(1.D-5,ABS(YSAFE)))
+               Y(I)=YSAFE+DELT
+               CALL FCN(N,X,Y,CONT,RPAR,IPAR)
+               DO J=M1+1,N
+                 FJAC(J-M1,I)=(CONT(J)-Y0(J))/DELT
+               END DO
+               Y(I)=YSAFE
+            END DO
+         END IF
+      ELSE
+C --- COMPUTE JACOBIAN MATRIX ANALYTICALLY
+      CALL JAC_CHEM(N,X,Y,FJAC,LDJAC,RPAR,IPAR)
+      END IF
+      CALJAC=.TRUE.
+      CALHES=.TRUE.
+  20  CONTINUE
+C --- COMPUTE THE MATRICES E1 AND E2 AND THEIR DECOMPOSITIONS
+      FAC1=U1/H
+      ALPHN=ALPH/H
+      BETAN=BETA/H
+      CALL DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC1,E1,LDE1,IP1,IER,IJOB,CALHES,IPHES)
+      IF (IER.NE.0) GOTO 78
+      CALL DECOMC(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,ALPHN,BETAN,E2R,E2I,LDE1,IP2,IER,IJOB)
+      IF (IER.NE.0) GOTO 78
+      NDEC=NDEC+1
+  30  CONTINUE
+      NSTEP=NSTEP+1
+      IF (NSTEP.GT.NMAX) GOTO 178
+      IF (0.1D0*ABS(H).LE.ABS(X)*UROUND) GOTO 177
+          IF (INDEX2) THEN
+             DO I=NIND1+1,NIND1+NIND2
+                SCAL(I)=SCAL(I)/HHFAC
+             END DO
+          END IF
+          IF (INDEX3) THEN
+             DO I=NIND1+NIND2+1,NIND1+NIND2+NIND3
+                SCAL(I)=SCAL(I)/(HHFAC*HHFAC)
+             END DO
+          END IF
+      XPH=X+H
+C *** *** *** *** *** *** ***
+C  STARTING VALUES FOR NEWTON ITERATION
+C *** *** *** *** *** *** ***
+      IF (FIRST.OR.STARTN) THEN
+         DO I=1,N
+            Z1(I)=0.D0
+            Z2(I)=0.D0
+            Z3(I)=0.D0
+            F1(I)=0.D0
+            F2(I)=0.D0
+            F3(I)=0.D0
+         END DO
+      ELSE
+         C3Q=H/HOLD
+         C1Q=C1*C3Q
+         C2Q=C2*C3Q
+         DO I=1,N
+            AK1=CONT(I+N)
+            AK2=CONT(I+N2)
+            AK3=CONT(I+N3)
+            Z1I=C1Q*(AK1+(C1Q-C2M1)*(AK2+(C1Q-C1M1)*AK3))
+            Z2I=C2Q*(AK1+(C2Q-C2M1)*(AK2+(C2Q-C1M1)*AK3))
+            Z3I=C3Q*(AK1+(C3Q-C2M1)*(AK2+(C3Q-C1M1)*AK3))
+            Z1(I)=Z1I
+            Z2(I)=Z2I
+            Z3(I)=Z3I
+            F1(I)=TI11*Z1I+TI12*Z2I+TI13*Z3I
+            F2(I)=TI21*Z1I+TI22*Z2I+TI23*Z3I
+            F3(I)=TI31*Z1I+TI32*Z2I+TI33*Z3I
+         END DO
+      END IF
+C *** *** *** *** *** *** ***
+C  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+C *** *** *** *** *** *** ***
+            NEWT=0
+            FACCON=MAX(FACCON,UROUND)**0.8D0
+            THETA=ABS(THET)
+  40        CONTINUE
+            IF (NEWT.GE.NIT) GOTO 78
+C ---     COMPUTE THE RIGHT-HAND SIDE
+            DO I=1,N
+               CONT(I)=Y(I)+Z1(I)
+            END DO
+            CALL FCN(N,X+C1*H,CONT,Z1,RPAR,IPAR)
+            DO I=1,N
+               CONT(I)=Y(I)+Z2(I)
+            END DO
+            CALL FCN(N,X+C2*H,CONT,Z2,RPAR,IPAR)
+            DO I=1,N
+               CONT(I)=Y(I)+Z3(I)
+            END DO
+            CALL FCN(N,XPH,CONT,Z3,RPAR,IPAR)
+            NFCN=NFCN+3
+C ---     KppSolve THE LINEAR SYSTEMS
+           DO I=1,N
+              A1=Z1(I)
+              A2=Z2(I)
+              A3=Z3(I)
+              Z1(I)=TI11*A1+TI12*A2+TI13*A3
+              Z2(I)=TI21*A1+TI22*A2+TI23*A3
+              Z3(I)=TI31*A1+TI32*A2+TI33*A3
+           END DO
+        CALL SLVRAD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,ALPHN,BETAN,E1,E2R,E2I,LDE1,Z1,Z2,Z3,
+     &          F1,F2,F3,CONT,IP1,IP2,IPHES,IER,IJOB)
+            NSOL=NSOL+1
+            NEWT=NEWT+1
+            DYNO=0.D0
+            DO I=1,N
+               DENOM=SCAL(I)
+               DYNO=DYNO+(Z1(I)/DENOM)**2+(Z2(I)/DENOM)**2
+     &          +(Z3(I)/DENOM)**2
+            END DO
+            DYNO=DSQRT(DYNO/N3)
+C ---     BAD CONVERGENCE OR NUMBER OF ITERATIONS TO LARGE
+            IF (NEWT.GT.1.AND.NEWT.LT.NIT) THEN
+                THQ=DYNO/DYNOLD
+                IF (NEWT.EQ.2) THEN
+                   THETA=THQ
+                ELSE
+                   THETA=SQRT(THQ*THQOLD)
+                END IF
+                THQOLD=THQ
+                IF (THETA.LT.0.99D0) THEN
+                    FACCON=THETA/(1.0D0-THETA)
+                    DYTH=FACCON*DYNO*THETA**(NIT-1-NEWT)/FNEWT
+                    IF (DYTH.GE.1.0D0) THEN
+                         QNEWT=DMAX1(1.0D-4,DMIN1(20.0D0,DYTH))
+                         HHFAC=.8D0*QNEWT**(-1.0D0/(4.0D0+NIT-1-NEWT))
+                         H=HHFAC*H
+                         REJECT=.TRUE.
+                         LAST=.FALSE.
+                         IF (CALJAC) GOTO 20
+                         GOTO 10
+                    END IF
+                ELSE
+                    GOTO 78
+                END IF
+            END IF
+            DYNOLD=MAX(DYNO,UROUND)
+            DO I=1,N
+               F1I=F1(I)+Z1(I)
+               F2I=F2(I)+Z2(I)
+               F3I=F3(I)+Z3(I)
+               F1(I)=F1I
+               F2(I)=F2I
+               F3(I)=F3I
+               Z1(I)=T11*F1I+T12*F2I+T13*F3I
+               Z2(I)=T21*F1I+T22*F2I+T23*F3I
+               Z3(I)=T31*F1I+    F2I
+            END DO
+            IF (FACCON*DYNO.GT.FNEWT) GOTO 40
+C --- ERROR ESTIMATION
+      CALL ESTRAD (N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          H,DD1,DD2,DD3,FCN,NFCN,Y0,Y,IJOB,X,M1,M2,NM1,
+     &          E1,LDE1,Z1,Z2,Z3,CONT,F1,F2,IP1,IPHES,SCAL,ERR,
+     &          FIRST,REJECT,FAC1,RPAR,IPAR)
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .2<=HNEW/H<=8.
+      FAC=MIN(SAFE,CFAC/(NEWT+2*NIT))
+      QUOT=MAX(FACR,MIN(FACL,ERR**.25D0/FAC))
+      HNEW=H/QUOT
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LT.1.D0) THEN
+C --- STEP IS ACCEPTED
+         FIRST=.FALSE.
+         NACCPT=NACCPT+1
+         IF (PRED) THEN
+C       --- PREDICTIVE CONTROLLER OF GUSTAFSSON
+            IF (NACCPT.GT.1) THEN
+               FACGUS=(HACC/H)*(ERR**2/ERRACC)**0.25D0/SAFE
+               FACGUS=MAX(FACR,MIN(FACL,FACGUS))
+               QUOT=MAX(QUOT,FACGUS)
+               HNEW=H/QUOT
+            END IF
+            HACC=H
+            ERRACC=MAX(1.0D-2,ERR)
+         END IF
+         XOLD=X
+         HOLD=H
+         X=XPH
+         DO I=1,N
+            Y(I)=Y(I)+Z3(I)
+            Z2I=Z2(I)
+            Z1I=Z1(I)
+            CONT(I+N)=(Z2I-Z3(I))/C2M1
+            AK=(Z1I-Z2I)/C1MC2
+            ACONT3=Z1I/C1
+            ACONT3=(AK-ACONT3)/C2
+            CONT(I+N2)=(AK-CONT(I+N))/C1M1
+            CONT(I+N3)=CONT(I+N2)-ACONT3
+         END DO
+         IF (ITOL.EQ.0) THEN
+             DO I=1,N
+                SCAL(I)=AbsTol(1)+RelTol(1)*ABS(Y(I))
+             END DO
+         ELSE
+             DO I=1,N
+                SCAL(I)=AbsTol(I)+RelTol(I)*ABS(Y(I))
+             END DO
+         END IF
+         IF (IOUT.NE.0) THEN
+             NRSOL=NACCPT+1
+             XSOL=X
+             XOSOL=XOLD
+             DO I=1,N
+                CONT(I)=Y(I)
+             END DO
+             NSOLU=N
+             HSOL=HOLD
+             CALL SOLOUT(NRSOL,XOSOL,XSOL,Y,CONT,LRC,NSOLU,
+     &                   RPAR,IPAR,IRTRN)
+             IF (IRTRN.LT.0) GOTO 179
+         END IF
+         CALJAC=.FALSE.
+         IF (LAST) THEN
+            H=HOPT
+            IDID=1
+            RETURN
+         END IF
+         CALL FCN(N,X,Y,Y0,RPAR,IPAR)
+         NFCN=NFCN+1
+         HNEW=POSNEG*MIN(ABS(HNEW),HMAXN)
+         HOPT=HNEW
+         HOPT=MIN(H,HNEW)
+         IF (REJECT) HNEW=POSNEG*MIN(ABS(HNEW),ABS(H))
+         REJECT=.FALSE.
+         IF ((X+HNEW/QUOT1-XEND)*POSNEG.GE.0.D0) THEN
+            H=XEND-X
+            LAST=.TRUE.
+         ELSE
+            QT=HNEW/H
+            HHFAC=H
+            IF (THETA.LE.THET.AND.QT.GE.QUOT1.AND.QT.LE.QUOT2) GOTO 30
+            H=HNEW
+         END IF
+         HHFAC=H
+         IF (THETA.LE.THET) GOTO 20
+         GOTO 10
+      ELSE
+C --- STEP IS REJECTED
+         REJECT=.TRUE.
+         LAST=.FALSE.
+         IF (FIRST) THEN
+             H=H*0.1D0
+             HHFAC=0.1D0
+         ELSE
+             HHFAC=HNEW/H
+             H=HNEW
+         END IF
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         IF (CALJAC) GOTO 20
+         GOTO 10
+      END IF
+C --- UNEXPECTED STEP-REJECTION
+  78  CONTINUE
+      IF (IER.NE.0) THEN
+          NSING=NSING+1
+          IF (NSING.GE.5) GOTO 176
+      END IF
+      H=H*0.5D0
+      HHFAC=0.5D0
+      REJECT=.TRUE.
+      LAST=.FALSE.
+      IF (CALJAC) GOTO 20
+      GOTO 10
+C --- FAIL EXIT
+ 176  CONTINUE
+      WRITE(6,979)X
+      WRITE(6,*) ' MATRIX IS REPEATEDLY SINGULAR, IER=',IER
+      IDID=-4
+      RETURN
+ 177  CONTINUE
+      WRITE(6,979)X
+      WRITE(6,*) ' STEP SIZE T0O SMALL, H=',H
+      IDID=-3
+      RETURN
+ 178  CONTINUE
+      WRITE(6,979)X
+      WRITE(6,*) ' MORE THAN NMAX =',NMAX,'STEPS ARE NEEDED'
+      IDID=-2
+      RETURN
+C --- EXIT CAUSED BY SOLOUT
+ 179  CONTINUE
+      WRITE(6,979)X
+ 979  FORMAT(' EXIT OF RADAU5 AT X=',E18.4)
+      IDID=2
+      RETURN
+      END
+C
+C     END OF SUBROUTINE RADCOR
+C
+C ***********************************************************
+C
+      KPP_REAL FUNCTION CONTR5(I,X,CONT,LRC)
+C ----------------------------------------------------------
+C     THIS FUNCTION CAN BE USED FOR CONINUOUS OUTPUT. IT PROVIDES AN
+C     APPROXIMATION TO THE I-TH COMPONENT OF THE SOLUTION AT X.
+C     IT GIVES THE VALUE OF THE COLLOCATION POLYNOMIAL, DEFINED FOR
+C     THE LAST SUCCESSFULLY COMPUTED STEP (BY RADAU5).
+C ----------------------------------------------------------
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION CONT(LRC)
+      COMMON /CONRA5/NN,NN2,NN3,NN4,XSOL,HSOL,C2M1,C1M1
+      S=(X-XSOL)/HSOL
+      CONTR5=CONT(I)+S*(CONT(I+NN)+(S-C2M1)*(CONT(I+NN2)
+     &     +(S-C1M1)*CONT(I+NN3)))
+      RETURN
+      END
+C
+C     END OF FUNCTION CONTR5
+C
+C ***********************************************************
+C ******************************************
+C     VERSION OF SEPTEMBER 18, 1995
+C ******************************************
+C
+      SUBROUTINE DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC1,E1,LDE1,IP1,IER,IJOB,CALHES,IPHES)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),
+     &          IP1(NM1),IPHES(N)
+      LOGICAL CALHES
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO  I=1,N
+            E1(I,J)=-FJAC(I,J)
+         END DO
+         E1(J,J)=E1(J,J)+FAC1
+      END DO
+      CALL DEC (N,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E1(I,J)=-FJAC(I,JM1)
+         END DO
+         E1(J,J)=E1(J,J)+FAC1
+      END DO
+ 45   MM=M1/M2
+      DO J=1,M2
+         DO I=1,NM1
+            SUM=0.D0
+            DO K=0,MM-1
+               SUM=(SUM+FJAC(I,J+K*M2))/FAC1
+            END DO
+            E1(I,J)=E1(I,J)-SUM
+         END DO
+      END DO
+      CALL DEC (NM1,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,J)
+         END DO
+         E1(MDIAG,J)=E1(MDIAG,J)+FAC1
+      END DO
+      CALL DECB (N,LDE1,E1,MLE,MUE,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,JM1)
+         END DO
+         E1(MDIAG,J)=E1(MDIAG,J)+FAC1
+      END DO
+  46  MM=M1/M2
+      DO J=1,M2
+         DO I=1,MBJAC
+            SUM=0.D0
+            DO K=0,MM-1
+               SUM=(SUM+FJAC(I,J+K*M2))/FAC1
+            END DO
+            E1(I+MLE,J)=E1(I+MLE,J)-SUM
+         END DO
+      END DO
+      CALL DECB (NM1,LDE1,E1,MLE,MUE,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            E1(I,J)=-FJAC(I,J)
+         END DO
+         DO I=MAX(1,J-MUMAS),MIN(N,J+MLMAS)
+            E1(I,J)=E1(I,J)+FAC1*FMAS(I-J+MBDIAG,J)
+         END DO
+      END DO
+      CALL DEC (N,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E1(I,J)=-FJAC(I,JM1)
+         END DO
+         DO I=MAX(1,J-MUMAS),MIN(NM1,J+MLMAS)
+            E1(I,J)=E1(I,J)+FAC1*FMAS(I-J+MBDIAG,J)
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,J)
+         END DO
+         DO I=1,MBB
+            IB=I+MDIFF
+            E1(IB,J)=E1(IB,J)+FAC1*FMAS(I,J)
+         END DO
+      END DO
+      CALL DECB (N,LDE1,E1,MLE,MUE,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  14  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,JM1)
+         END DO
+         DO I=1,MBB
+            IB=I+MDIFF
+            E1(IB,J)=E1(IB,J)+FAC1*FMAS(I,J)
+         END DO
+      END DO
+      GOTO 46
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            E1(I,J)=FMAS(I,J)*FAC1-FJAC(I,J)
+         END DO
+      END DO
+      CALL DEC (N,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E1(I,J)=FMAS(I,J)*FAC1-FJAC(I,JM1)
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      IF (CALHES) CALL Elmhes (LDJAC,N,1,N,FJAC,IPHES)
+      CALHES=.FALSE.
+      DO J=1,N-1
+         J1=J+1
+         E1(J1,J)=-FJAC(J1,J)
+      END DO
+      DO J=1,N
+         DO I=1,J
+            E1(I,J)=-FJAC(I,J)
+         END DO
+         E1(J,J)=E1(J,J)+FAC1
+      END DO
+      CALL DECH(N,LDE1,E1,1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE DECOMR
+C
+C ***********************************************************
+C
+      SUBROUTINE DECOMC(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,ALPHN,BETAN,E2R,E2I,LDE1,IP2,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),
+     &          E2R(LDE1,NM1),E2I(LDE1,NM1),IP2(NM1)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            E2R(I,J)=-FJAC(I,J)
+            E2I(I,J)=0.D0
+         END DO
+         E2R(J,J)=E2R(J,J)+ALPHN
+         E2I(J,J)=BETAN
+      END DO
+      CALL DECC (N,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E2R(I,J)=-FJAC(I,JM1)
+            E2I(I,J)=0.D0
+         END DO
+         E2R(J,J)=E2R(J,J)+ALPHN
+         E2I(J,J)=BETAN
+      END DO
+  45  MM=M1/M2
+      ABNO=ALPHN**2+BETAN**2
+      ALP=ALPHN/ABNO
+      BET=BETAN/ABNO
+      DO J=1,M2
+         DO I=1,NM1
+            SUMR=0.D0
+            SUMI=0.D0
+            DO K=0,MM-1
+               SUMS=SUMR+FJAC(I,J+K*M2)
+               SUMR=SUMS*ALP+SUMI*BET
+               SUMI=SUMI*ALP-SUMS*BET
+            END DO
+            E2R(I,J)=E2R(I,J)-SUMR
+            E2I(I,J)=E2I(I,J)-SUMI
+         END DO
+      END DO
+      CALL DECC (NM1,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            IMLE=I+MLE
+            E2R(IMLE,J)=-FJAC(I,J)
+            E2I(IMLE,J)=0.D0
+         END DO
+         E2R(MDIAG,J)=E2R(MDIAG,J)+ALPHN
+         E2I(MDIAG,J)=BETAN
+      END DO
+      CALL DECBC (N,LDE1,E2R,E2I,MLE,MUE,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E2R(I+MLE,J)=-FJAC(I,JM1)
+            E2I(I+MLE,J)=0.D0
+         END DO
+         E2R(MDIAG,J)=E2R(MDIAG,J)+ALPHN
+         E2I(MDIAG,J)=E2I(MDIAG,J)+BETAN
+      END DO
+  46  MM=M1/M2
+      ABNO=ALPHN**2+BETAN**2
+      ALP=ALPHN/ABNO
+      BET=BETAN/ABNO
+      DO J=1,M2
+         DO I=1,MBJAC
+            SUMR=0.D0
+            SUMI=0.D0
+            DO K=0,MM-1
+               SUMS=SUMR+FJAC(I,J+K*M2)
+               SUMR=SUMS*ALP+SUMI*BET
+               SUMI=SUMI*ALP-SUMS*BET
+            END DO
+            IMLE=I+MLE
+            E2R(IMLE,J)=E2R(IMLE,J)-SUMR
+            E2I(IMLE,J)=E2I(IMLE,J)-SUMI
+         END DO
+      END DO
+      CALL DECBC (NM1,LDE1,E2R,E2I,MLE,MUE,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO  J=1,N
+         DO  I=1,N
+            E2R(I,J)=-FJAC(I,J)
+            E2I(I,J)=0.D0
+         END DO
+      END DO
+      DO J=1,N
+         DO I=MAX(1,J-MUMAS),MIN(N,J+MLMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            E2R(I,J)=E2R(I,J)+ALPHN*BB
+            E2I(I,J)=BETAN*BB
+         END DO
+      END DO
+      CALL DECC(N,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E2R(I,J)=-FJAC(I,JM1)
+            E2I(I,J)=0.D0
+         END DO
+         DO I=MAX(1,J-MUMAS),MIN(NM1,J+MLMAS)
+            FFMA=FMAS(I-J+MBDIAG,J)
+            E2R(I,J)=E2R(I,J)+ALPHN*FFMA
+            E2I(I,J)=E2I(I,J)+BETAN*FFMA
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            IMLE=I+MLE
+            E2R(IMLE,J)=-FJAC(I,J)
+            E2I(IMLE,J)=0.D0
+         END DO
+         DO I=MAX(1,MUMAS+2-J),MIN(MBB,MUMAS+1-J+N)
+            IB=I+MDIFF
+            BB=FMAS(I,J)
+            E2R(IB,J)=E2R(IB,J)+ALPHN*BB
+            E2I(IB,J)=BETAN*BB
+         END DO
+      END DO
+      CALL DECBC (N,LDE1,E2R,E2I,MLE,MUE,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  14  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E2R(I+MLE,J)=-FJAC(I,JM1)
+            E2I(I+MLE,J)=0.D0
+         END DO
+         DO I=1,MBB
+            IB=I+MDIFF
+            FFMA=FMAS(I,J)
+            E2R(IB,J)=E2R(IB,J)+ALPHN*FFMA
+            E2I(IB,J)=E2I(IB,J)+BETAN*FFMA
+         END DO
+      END DO
+      GOTO 46
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            BB=FMAS(I,J)
+            E2R(I,J)=BB*ALPHN-FJAC(I,J)
+            E2I(I,J)=BB*BETAN
+         END DO
+      END DO
+      CALL DECC(N,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E2R(I,J)=ALPHN*FMAS(I,J)-FJAC(I,JM1)
+            E2I(I,J)=BETAN*FMAS(I,J)
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO J=1,N-1
+         J1=J+1
+         E2R(J1,J)=-FJAC(J1,J)
+         E2I(J1,J)=0.D0
+      END DO
+      DO J=1,N
+         DO I=1,J
+            E2I(I,J)=0.D0
+            E2R(I,J)=-FJAC(I,J)
+         END DO
+         E2R(J,J)=E2R(J,J)+ALPHN
+         E2I(J,J)=BETAN
+      END DO
+      CALL DECHC(N,LDE1,E2R,E2I,1,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE DECOMC
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVRAR(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E1,LDE1,Z1,F1,IP1,IPHES,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),
+     &          IP1(NM1),IPHES(N),Z1(N),F1(N)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+ 48   CONTINUE
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               Z1(IM1)=Z1(IM1)+FJAC(I,JKM)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,Z1(M1+1),IP1)
+ 49   CONTINUE
+      DO I=M1,1,-1
+         Z1(I)=(Z1(I)+Z1(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+  45  CONTINUE
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               Z1(IM1)=Z1(IM1)+FJAC(I+MUJAC+1-J,JKM)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,Z1(M1+1),IP1)
+      GOTO 49
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            S1=S1-FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            S1=S1-FMAS(I-J+MBDIAG,J)*F1(J+M1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+      END DO
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S1=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            S1=S1-FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         DO J=1,N
+            S1=S1-FMAS(I,J)*F1(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         DO J=1,NM1
+            S1=S1-FMAS(I,J)*F1(J+M1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+      END DO
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      DO MM=N-2,1,-1
+          MP=N-MM
+          MP1=MP-1
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 746
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+ 746      CONTINUE
+          DO I=MP+1,N
+             Z1(I)=Z1(I)-FJAC(I,MP1)*Z1(MP)
+          END DO
+       END DO
+       CALL SOLH(N,LDE1,E1,1,Z1,IP1)
+       DO MM=1,N-2
+          MP=N-MM
+          MP1=MP-1
+          DO I=MP+1,N
+             Z1(I)=Z1(I)+FJAC(I,MP1)*Z1(MP)
+          END DO
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 750
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+ 750      CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVRAR
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVRAI(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,ALPHN,BETAN,E2R,E2I,LDE1,Z2,Z3,
+     &          F2,F3,CONT,IP2,IPHES,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),
+     &          IP2(NM1),IPHES(N),Z2(N),Z3(N),F2(N),F3(N)
+      DIMENSION E2R(LDE1,NM1),E2I(LDE1,NM1)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLC (N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+ 48   ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=1,NM1
+               IM1=I+M1
+               Z2(IM1)=Z2(IM1)+FJAC(I,JKM)*SUM2
+               Z3(IM1)=Z3(IM1)+FJAC(I,JKM)*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOLC (NM1,LDE1,E2R,E2I,Z2(M1+1),Z3(M1+1),IP2)
+ 49   CONTINUE
+      DO I=M1,1,-1
+         MPI=M2+I
+         Z2I=Z2(I)+Z2(MPI)
+         Z3I=Z3(I)+Z3(MPI)
+         Z3(I)=(Z3I*ALPHN-Z2I*BETAN)/ABNO
+         Z2(I)=(Z2I*ALPHN+Z3I*BETAN)/ABNO
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLBC (N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+  45  ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               IIMU=I+MUJAC+1-J
+               Z2(IM1)=Z2(IM1)+FJAC(IIMU,JKM)*SUM2
+               Z3(IM1)=Z3(IM1)+FJAC(IIMU,JKM)*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOLBC (NM1,LDE1,E2R,E2I,MLE,MUE,Z2(M1+1),Z3(M1+1),IP2)
+      GOTO 49
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            JM1=J+M1
+            BB=FMAS(I-J+MBDIAG,J)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLBC(N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,N
+            BB=FMAS(I,J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,NM1
+            JM1=J+M1
+            BB=FMAS(I,J)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO MM=N-2,1,-1
+          MP=N-MM
+          MP1=MP-1
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 746
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 746      CONTINUE
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z2(I)=Z2(I)-E1IMP*Z2(MP)
+             Z3(I)=Z3(I)-E1IMP*Z3(MP)
+          END DO
+       END DO
+       CALL SOLHC(N,LDE1,E2R,E2I,1,Z2,Z3,IP2)
+       DO MM=1,N-2
+          MP=N-MM
+          MP1=MP-1
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z2(I)=Z2(I)+E1IMP*Z2(MP)
+             Z3(I)=Z3(I)+E1IMP*Z3(MP)
+          END DO
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 750
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 750      CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVRAI
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVRAD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,ALPHN,BETAN,E1,E2R,E2I,LDE1,Z1,Z2,Z3,
+     &          F1,F2,F3,CONT,IP1,IP2,IPHES,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),
+     &          E2R(LDE1,NM1),E2I(LDE1,NM1),IP1(NM1),IP2(NM1),
+     &          IPHES(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N),F3(N)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      CALL SOLC (N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+ 48   ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=1,NM1
+               IM1=I+M1
+               Z1(IM1)=Z1(IM1)+FJAC(I,JKM)*SUM1
+               Z2(IM1)=Z2(IM1)+FJAC(I,JKM)*SUM2
+               Z3(IM1)=Z3(IM1)+FJAC(I,JKM)*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,Z1(M1+1),IP1)
+      CALL SOLC (NM1,LDE1,E2R,E2I,Z2(M1+1),Z3(M1+1),IP2)
+ 49   CONTINUE
+      DO I=M1,1,-1
+         MPI=M2+I
+         Z1(I)=(Z1(I)+Z1(MPI))/FAC1
+         Z2I=Z2(I)+Z2(MPI)
+         Z3I=Z3(I)+Z3(MPI)
+         Z3(I)=(Z3I*ALPHN-Z2I*BETAN)/ABNO
+         Z2(I)=(Z2I*ALPHN+Z3I*BETAN)/ABNO
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      CALL SOLBC (N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+  45  ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               FFJA=FJAC(I+MUJAC+1-J,JKM)
+               Z1(IM1)=Z1(IM1)+FFJA*SUM1
+               Z2(IM1)=Z2(IM1)+FFJA*SUM2
+               Z3(IM1)=Z3(IM1)+FFJA*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,Z1(M1+1),IP1)
+      CALL SOLBC (NM1,LDE1,E2R,E2I,MLE,MUE,Z2(M1+1),Z3(M1+1),IP2)
+      GOTO 49
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S1=S1-BB*F1(J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         J1B=MAX(1,I-MLMAS)
+         J2B=MIN(NM1,I+MUMAS)
+         DO J=J1B,J2B
+            JM1=J+M1
+            BB=FMAS(I-J+MBDIAG,J)
+            S1=S1-BB*F1(JM1)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S1=S1-BB*F1(J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      CALL SOLBC(N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,N
+            BB=FMAS(I,J)
+            S1=S1-BB*F1(J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,NM1
+            JM1=J+M1
+            BB=FMAS(I,J)
+            S1=S1-BB*F1(JM1)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO MM=N-2,1,-1
+          MP=N-MM
+          MP1=MP-1
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 746
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 746      CONTINUE
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z1(I)=Z1(I)-E1IMP*Z1(MP)
+             Z2(I)=Z2(I)-E1IMP*Z2(MP)
+             Z3(I)=Z3(I)-E1IMP*Z3(MP)
+          END DO
+       END DO
+       CALL SOLH(N,LDE1,E1,1,Z1,IP1)
+       CALL SOLHC(N,LDE1,E2R,E2I,1,Z2,Z3,IP2)
+       DO MM=1,N-2
+          MP=N-MM
+          MP1=MP-1
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z1(I)=Z1(I)+E1IMP*Z1(MP)
+             Z2(I)=Z2(I)+E1IMP*Z2(MP)
+             Z3(I)=Z3(I)+E1IMP*Z3(MP)
+          END DO
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 750
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 750      CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVRAD
+C
+C ***********************************************************
+C
+      SUBROUTINE ESTRAD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          H,DD1,DD2,DD3,FCN,NFCN,Y0,Y,IJOB,X,M1,M2,NM1,
+     &          E1,LDE1,Z1,Z2,Z3,CONT,F1,F2,IP1,IPHES,SCAL,ERR,
+     &          FIRST,REJECT,FAC1,RPAR,IPAR)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),IP1(NM1),
+     &     SCAL(N),IPHES(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N),Y0(N),Y(N)
+      DIMENSION CONT(N),RPAR(1),IPAR(1)
+      LOGICAL FIRST,REJECT
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      EXTERNAL FCN
+      HEE1=DD1/H
+      HEE2=DD2/H
+      HEE3=DD3/H
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+   1  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO  I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  11  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+  48  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   2  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  12  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+  45  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   3  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         F2(I)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  13  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J+M1)
+         END DO
+         IM1=I+M1
+         F2(IM1)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   4  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         F2(I)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  14  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,M1
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J+M1)
+         END DO
+         IM1=I+M1
+         F2(IM1)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 45
+C
+   5  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=1,N
+            SUM=SUM+FMAS(I,J)*F1(J)
+         END DO
+         F2(I)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  15  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=1,NM1
+            SUM=SUM+FMAS(I,J)*F1(J+M1)
+         END DO
+         IM1=I+M1
+         F2(IM1)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   6  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ------  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+   7  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO MM=N-2,1,-1
+         MP=N-MM
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 310
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 310     CONTINUE
+         DO I=MP+1,N
+            CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+         END DO
+      END DO
+      CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+      DO MM=1,N-2
+         MP=N-MM
+         DO I=MP+1,N
+            CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+         END DO
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 440
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 440     CONTINUE
+      END DO
+C
+C --------------------------------------
+C
+  77  CONTINUE
+      ERR=0.D0
+      DO  I=1,N
+         ERR=ERR+(CONT(I)/SCAL(I))**2
+      END DO
+      ERR=MAX(SQRT(ERR/N),1.D-10)
+C
+      IF (ERR.LT.1.D0) RETURN
+      IF (FIRST.OR.REJECT) THEN
+          DO I=1,N
+             CONT(I)=Y(I)+CONT(I)
+          END DO
+          CALL FCN(N,X,CONT,F1,RPAR,IPAR)
+          NFCN=NFCN+1
+          DO I=1,N
+             CONT(I)=F1(I)+F2(I)
+          END DO
+          GOTO (31,32,31,32,31,32,33,55,55,55,41,42,41,42,41), IJOB
+C ------ FULL MATRIX OPTION
+  31      CONTINUE
+          CALL SOL(N,LDE1,E1,CONT,IP1)
+          GOTO 88
+C ------ FULL MATRIX OPTION, SECOND ORDER
+ 41      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=1,NM1
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOL(NM1,LDE1,E1,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+         GOTO 88
+C ------ BANDED MATRIX OPTION
+ 32      CONTINUE
+         CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+         GOTO 88
+C ------ BANDED MATRIX OPTION, SECOND ORDER
+ 42      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+          GOTO 88
+C ------ HESSENBERG MATRIX OPTION
+  33      CONTINUE
+          DO MM=N-2,1,-1
+             MP=N-MM
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 510
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 510         CONTINUE
+             DO I=MP+1,N
+                CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+             END DO
+          END DO
+          CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+          DO MM=1,N-2
+             MP=N-MM
+             DO I=MP+1,N
+                CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+             END DO
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 640
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 640         CONTINUE
+          END DO
+C -----------------------------------
+   88     CONTINUE
+          ERR=0.D0
+          DO I=1,N
+             ERR=ERR+(CONT(I)/SCAL(I))**2
+          END DO
+          ERR=MAX(SQRT(ERR/N),1.D-10)
+       END IF
+       RETURN
+C -----------------------------------------------------------
+  55   CONTINUE
+       RETURN
+       END
+C
+C     END OF SUBROUTINE ESTRAD
+C
+C ***********************************************************
+C
+      SUBROUTINE ESTRAV(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          H,DD,FCN,NFCN,Y0,Y,IJOB,X,M1,M2,NM1,NS,NNS,
+     &          E1,LDE1,ZZ,CONT,FF,IP1,IPHES,SCAL,ERR,
+     &          FIRST,REJECT,FAC1,RPAR,IPAR)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),IP1(NM1),
+     &     SCAL(N),IPHES(N),ZZ(NNS),FF(NNS),Y0(N),Y(N)
+      DIMENSION DD(NS),CONT(N),RPAR(1),IPAR(1)
+      LOGICAL FIRST,REJECT
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      EXTERNAL FCN
+
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+   1  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  11  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+  48  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   2  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  12  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+  45  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   3  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J)
+         END DO
+         FF(I+N)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  13  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO  I=1,M1
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J+M1)
+         END DO
+         IM1=I+M1
+         FF(IM1+N)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   4  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J)
+         END DO
+         FF(I+N)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  14  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO  I=1,M1
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J+M1)
+         END DO
+         IM1=I+M1
+         FF(IM1+N)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 45
+C
+   5  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=1,N
+            SUM=SUM+FMAS(I,J)*FF(J)
+         END DO
+         FF(I+N)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  15  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO  I=1,M1
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=1,NM1
+            SUM=SUM+FMAS(I,J)*FF(J+M1)
+         END DO
+         IM1=I+M1
+         FF(IM1+N)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   6  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ------  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+   7  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO MM=N-2,1,-1
+         MP=N-MM
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 310
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 310     CONTINUE
+         DO I=MP+1,N
+            CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+         END DO
+      END DO
+      CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+      DO MM=1,N-2
+         MP=N-MM
+         DO I=MP+1,N
+            CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+         END DO
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 440
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 440     CONTINUE
+      END DO
+C
+C --------------------------------------
+C
+  77  CONTINUE
+      ERR=0.D0
+      DO  I=1,N
+         ERR=ERR+(CONT(I)/SCAL(I))**2
+      END DO
+      ERR=MAX(SQRT(ERR/N),1.D-10)
+C
+      IF (ERR.LT.1.D0) RETURN
+      IF (FIRST.OR.REJECT) THEN
+          DO I=1,N
+             CONT(I)=Y(I)+CONT(I)
+          END DO
+          CALL FCN(N,X,CONT,FF,RPAR,IPAR)
+          NFCN=NFCN+1
+          DO I=1,N
+             CONT(I)=FF(I)+FF(I+N)
+          END DO
+          GOTO (31,32,31,32,31,32,33,55,55,55,41,42,41,42,41), IJOB
+C ------ FULL MATRIX OPTION
+ 31      CONTINUE
+         CALL SOL (N,LDE1,E1,CONT,IP1)
+          GOTO 88
+C ------ FULL MATRIX OPTION, SECOND ORDER
+ 41      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=1,NM1
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOL (NM1,LDE1,E1,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+          GOTO 88
+C ------ BANDED MATRIX OPTION
+ 32      CONTINUE
+         CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+          GOTO 88
+C ------ BANDED MATRIX OPTION, SECOND ORDER
+ 42      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+          GOTO 88
+C ------ HESSENBERG MATRIX OPTION
+  33      CONTINUE
+          DO MM=N-2,1,-1
+             MP=N-MM
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 510
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 510         CONTINUE
+             DO I=MP+1,N
+                CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+             END DO
+          END DO
+          CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+          DO MM=1,N-2
+             MP=N-MM
+             DO I=MP+1,N
+                CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+             END DO
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 640
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 640         CONTINUE
+          END DO
+C -----------------------------------
+  88      CONTINUE
+          ERR=0.D0
+          DO I=1,N
+             ERR=ERR+(CONT(I)/SCAL(I))**2
+          END DO
+          ERR=MAX(SQRT(ERR/N),1.D-10)
+       END IF
+       RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+       END
+C
+C     END OF SUBROUTINE ESTRAV
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E,LDE,IP,DY,AK,FX,YNEW,HD,IJOB,STAGE1)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E(LDE,NM1),
+     &          IP(NM1),DY(N),AK(N),FX(N),YNEW(N)
+      LOGICAL STAGE1
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      IF (HD.EQ.0.D0) THEN
+         DO  I=1,N
+           AK(I)=DY(I)
+         END DO
+      ELSE
+         DO I=1,N
+            AK(I)=DY(I)+HD*FX(I)
+         END DO
+      END IF
+C
+      GOTO (1,2,3,4,5,6,55,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+      CALL SOL (N,LDE,E,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+ 48   MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(AK(JKM)+SUM)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               AK(IM1)=AK(IM1)+FJAC(I,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE,E,AK(M1+1),IP)
+      DO I=M1,1,-1
+         AK(I)=(AK(I)+AK(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+      CALL SOLB (N,LDE,E,MLE,MUE,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+  45  MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(AK(JKM)+SUM)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               AK(IM1)=AK(IM1)+FJAC(I+MUJAC+1-J,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE,E,MLE,MUE,AK(M1+1),IP)
+      DO I=M1,1,-1
+         AK(I)=(AK(I)+AK(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+      DO  I=1,N
+         SUM=0.D0
+         DO  J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*YNEW(J)
+         END DO
+         AK(I)=AK(I)+SUM
+      END DO
+      END IF
+      CALL SOL (N,LDE,E,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,M1
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+         DO I=1,NM1
+            SUM=0.D0
+            DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+                SUM=SUM+FMAS(I-J+MBDIAG,J)*YNEW(J+M1)
+            END DO
+            IM1=I+M1
+            AK(IM1)=AK(IM1)+SUM
+         END DO
+      END IF
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      IF (STAGE1) THEN
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*YNEW(J)
+         END DO
+         AK(I)=AK(I)+SUM
+      END DO
+      END IF
+      CALL SOLB (N,LDE,E,MLE,MUE,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+      DO I=1,N
+         SUM=0.D0
+         DO J=1,N
+            SUM=SUM+FMAS(I,J)*YNEW(J)
+         END DO
+         AK(I)=AK(I)+SUM
+      END DO
+      END IF
+      CALL SOL (N,LDE,E,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,M1
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+         DO I=1,NM1
+            SUM=0.D0
+            DO J=1,NM1
+               SUM=SUM+FMAS(I,J)*YNEW(J+M1)
+            END DO
+            IM1=I+M1
+            AK(IM1)=AK(IM1)+SUM
+         END DO
+      END IF
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      IF (STAGE1) THEN
+      DO 624 I=1,N
+         SUM=0.D0
+         DO 623 J=1,N
+  623       SUM=SUM+FMAS(I,J)*YNEW(J)
+  624    AK(I)=AK(I)+SUM
+      CALL SOLB (N,LDE,E,MLE,MUE,AK,IP)
+      END IF
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVROD
+C
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVSEU(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E,LDE,IP,IPHES,DEL,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E(LDE,NM1),DEL(N)
+      DIMENSION IP(NM1),IPHES(N)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,1,2,1,55,7,55,55,55,11,12,11,12,11), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      CALL SOL (N,LDE,E,DEL,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(DEL(JKM)+SUM)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               DEL(IM1)=DEL(IM1)+FJAC(I,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE,E,DEL(M1+1),IP)
+      DO I=M1,1,-1
+         DEL(I)=(DEL(I)+DEL(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      CALL SOLB (N,LDE,E,MLE,MUE,DEL,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(DEL(JKM)+SUM)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               DEL(IM1)=DEL(IM1)+FJAC(I+MUJAC+1-J,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE,E,MLE,MUE,DEL(M1+1),IP)
+      DO I=M1,1,-1
+         DEL(I)=(DEL(I)+DEL(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  HESSENBERG OPTION
+      DO MMM=N-2,1,-1
+         MP=N-MMM
+         MP1=MP-1
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 110
+         ZSAFE=DEL(MP)
+         DEL(MP)=DEL(I)
+         DEL(I)=ZSAFE
+ 110     CONTINUE
+         DO I=MP+1,N
+            DEL(I)=DEL(I)-FJAC(I,MP1)*DEL(MP)
+         END DO
+      END DO
+      CALL SOLH(N,LDE,E,1,DEL,IP)
+      DO MMM=1,N-2
+         MP=N-MMM
+         MP1=MP-1
+         DO I=MP+1,N
+            DEL(I)=DEL(I)+FJAC(I,MP1)*DEL(MP)
+         END DO
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 240
+         ZSAFE=DEL(MP)
+         DEL(MP)=DEL(I)
+         DEL(I)=ZSAFE
+ 240     CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVSEU
+C
+      SUBROUTINE DEC (N, NDIM, A, IP, IER)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION.
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAY  A .
+C     A = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     A(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U .
+C     A(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(1,1)*A(2,2)*...*A(N,N).
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        DO 10 I = KP1,N
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        T = A(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(K,K)
+        A(K,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = KP1,N
+ 30       A(I,K) = -A(I,K)*T
+        DO 50 J = KP1,N
+          T = A(M,J)
+          A(M,J) = A(K,J)
+          A(K,J) = T
+          IF (T .EQ. 0.D0) GO TO 45
+          DO 40 I = KP1,N
+ 40         A(I,J) = A(I,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(N,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DEC -------------------------
+      END
+C
+C
+      SUBROUTINE SOL (N, NDIM, A, B, IP)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAY  A .
+C    A = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    B = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        DO 10 I = KP1,N
+ 10       B(I) = B(I) + A(I,K)*T
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        B(K) = B(K)/A(K,K)
+        T = -B(K)
+        DO 30 I = 1,KM1
+ 30       B(I) = B(I) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(1,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOL -------------------------
+      END
+c
+c
+      SUBROUTINE DECH (N, NDIM, A, LB, IP, IER)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J,LB,NA
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION OF A HESSENBERG
+C  MATRIX WITH LOWER BANDWIDTH LB
+C  INPUT..
+C     N = ORDER OF MATRIX A.
+C     NDIM = DECLARED DIMENSION OF ARRAY  A .
+C     A = MATRIX TO BE TRIANGULARIZED.
+C     LB = LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED, LB.GE.1).
+C  OUTPUT..
+C     A(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U .
+C     A(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOLH  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(1,1)*A(2,2)*...*A(N,N).
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     THIS IS A SLIGHT MODIFICATION OF
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        NA = MIN0(N,LB+K)
+        DO 10 I = KP1,NA
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        T = A(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(K,K)
+        A(K,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = KP1,NA
+ 30       A(I,K) = -A(I,K)*T
+        DO 50 J = KP1,N
+          T = A(M,J)
+          A(M,J) = A(K,J)
+          A(K,J) = T
+          IF (T .EQ. 0.D0) GO TO 45
+          DO 40 I = KP1,NA
+ 40         A(I,J) = A(I,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(N,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECH ------------------------
+      END
+C
+C
+      SUBROUTINE SOLH (N, NDIM, A, LB, B, IP)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1,LB,NA
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX A.
+C    NDIM = DECLARED DIMENSION OF ARRAY  A .
+C    A = TRIANGULARIZED MATRIX OBTAINED FROM DECH.
+C    LB = LOWER BANDWIDTH OF A.
+C    B = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DECH HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        NA = MIN0(N,LB+K)
+        DO 10 I = KP1,NA
+ 10       B(I) = B(I) + A(I,K)*T
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        B(K) = B(K)/A(K,K)
+        T = -B(K)
+        DO 30 I = 1,KM1
+ 30       B(I) = B(I) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(1,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLH ------------------------
+      END
+C
+      SUBROUTINE DECC (N, NDIM, AR, AI, IP, IER)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      DIMENSION AR(NDIM,N), AI(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION
+C  ------ MODIFICATION FOR COMPLEX MATRICES --------
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI .
+C     (AR, AI) = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     AR(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; REAL PART.
+C     AI(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; IMAGINARY PART.
+C     AR(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    REAL PART.
+C     AI(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    IMAGINARY PART.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        DO 10 I = KP1,N
+          IF (DABS(AR(I,K))+DABS(AI(I,K)) .GT.
+     &          DABS(AR(M,K))+DABS(AI(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        TR = AR(M,K)
+        TI = AI(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        AR(M,K) = AR(K,K)
+        AI(M,K) = AI(K,K)
+        AR(K,K) = TR
+        AI(K,K) = TI
+ 20     CONTINUE
+        IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 80
+        DEN=TR*TR+TI*TI
+        TR=TR/DEN
+        TI=-TI/DEN
+        DO 30 I = KP1,N
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          AR(I,K)=-PRODR
+          AI(I,K)=-PRODI
+ 30       CONTINUE
+        DO 50 J = KP1,N
+          TR = AR(M,J)
+          TI = AI(M,J)
+          AR(M,J) = AR(K,J)
+          AI(M,J) = AI(K,J)
+          AR(K,J) = TR
+          AI(K,J) = TI
+          IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 48
+          IF (TI .EQ. 0.D0) THEN
+            DO 40 I = KP1,N
+            PRODR=AR(I,K)*TR
+            PRODI=AI(I,K)*TR
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 40         CONTINUE
+            GO TO 48
+          END IF
+          IF (TR .EQ. 0.D0) THEN
+            DO 45 I = KP1,N
+            PRODR=-AI(I,K)*TI
+            PRODI=AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 45         CONTINUE
+            GO TO 48
+          END IF
+          DO 47 I = KP1,N
+            PRODR=AR(I,K)*TR-AI(I,K)*TI
+            PRODI=AI(I,K)*TR+AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 47         CONTINUE
+ 48       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (DABS(AR(N,N))+DABS(AI(N,N)) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECC ------------------------
+      END
+C
+C
+      SUBROUTINE SOLC (N, NDIM, AR, AI, BR, BI, IP)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      DIMENSION AR(NDIM,N), AI(NDIM,N), BR(N), BI(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI.
+C    (AR,AI) = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    (BR,BI) = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    (BR,BI) = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        TR = BR(M)
+        TI = BI(M)
+        BR(M) = BR(K)
+        BI(M) = BI(K)
+        BR(K) = TR
+        BI(K) = TI
+        DO 10 I = KP1,N
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 10       CONTINUE
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        DEN=AR(K,K)*AR(K,K)+AI(K,K)*AI(K,K)
+        PRODR=BR(K)*AR(K,K)+BI(K)*AI(K,K)
+        PRODI=BI(K)*AR(K,K)-BR(K)*AI(K,K)
+        BR(K)=PRODR/DEN
+        BI(K)=PRODI/DEN
+        TR = -BR(K)
+        TI = -BI(K)
+        DO 30 I = 1,KM1
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 30       CONTINUE
+ 40     CONTINUE
+ 50     CONTINUE
+        DEN=AR(1,1)*AR(1,1)+AI(1,1)*AI(1,1)
+        PRODR=BR(1)*AR(1,1)+BI(1)*AI(1,1)
+        PRODI=BI(1)*AR(1,1)-BR(1)*AI(1,1)
+        BR(1)=PRODR/DEN
+        BI(1)=PRODI/DEN
+      RETURN
+C----------------------- END OF SUBROUTINE SOLC ------------------------
+      END
+C
+C
+      SUBROUTINE DECHC (N, NDIM, AR, AI, LB, IP, IER)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      DIMENSION AR(NDIM,N), AI(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION
+C  ------ MODIFICATION FOR COMPLEX MATRICES --------
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI .
+C     (AR, AI) = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     AR(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; REAL PART.
+C     AI(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; IMAGINARY PART.
+C     AR(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    REAL PART.
+C     AI(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    IMAGINARY PART.
+C     LB = LOWER BANDWIDTH OF A (DIAGONAL NOT COUNTED), LB.GE.1.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (LB .EQ. 0) GO TO 70
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        NA = MIN0(N,LB+K)
+        DO 10 I = KP1,NA
+          IF (DABS(AR(I,K))+DABS(AI(I,K)) .GT.
+     &          DABS(AR(M,K))+DABS(AI(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        TR = AR(M,K)
+        TI = AI(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        AR(M,K) = AR(K,K)
+        AI(M,K) = AI(K,K)
+        AR(K,K) = TR
+        AI(K,K) = TI
+ 20     CONTINUE
+        IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 80
+        DEN=TR*TR+TI*TI
+        TR=TR/DEN
+        TI=-TI/DEN
+        DO 30 I = KP1,NA
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          AR(I,K)=-PRODR
+          AI(I,K)=-PRODI
+ 30       CONTINUE
+        DO 50 J = KP1,N
+          TR = AR(M,J)
+          TI = AI(M,J)
+          AR(M,J) = AR(K,J)
+          AI(M,J) = AI(K,J)
+          AR(K,J) = TR
+          AI(K,J) = TI
+          IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 48
+          IF (TI .EQ. 0.D0) THEN
+            DO 40 I = KP1,NA
+            PRODR=AR(I,K)*TR
+            PRODI=AI(I,K)*TR
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 40         CONTINUE
+            GO TO 48
+          END IF
+          IF (TR .EQ. 0.D0) THEN
+            DO 45 I = KP1,NA
+            PRODR=-AI(I,K)*TI
+            PRODI=AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 45         CONTINUE
+            GO TO 48
+          END IF
+          DO 47 I = KP1,NA
+            PRODR=AR(I,K)*TR-AI(I,K)*TI
+            PRODI=AI(I,K)*TR+AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 47         CONTINUE
+ 48       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (DABS(AR(N,N))+DABS(AI(N,N)) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECHC -----------------------
+      END
+C
+C
+      SUBROUTINE SOLHC (N, NDIM, AR, AI, LB, BR, BI, IP)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      DIMENSION AR(NDIM,N), AI(NDIM,N), BR(N), BI(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI.
+C    (AR,AI) = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    (BR,BI) = RIGHT HAND SIDE VECTOR.
+C    LB = LOWER BANDWIDTH OF A.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    (BR,BI) = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      IF (LB .EQ. 0) GO TO 25
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        TR = BR(M)
+        TI = BI(M)
+        BR(M) = BR(K)
+        BI(M) = BI(K)
+        BR(K) = TR
+        BI(K) = TI
+        DO 10 I = KP1,MIN0(N,LB+K)
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 10       CONTINUE
+ 20     CONTINUE
+ 25     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        DEN=AR(K,K)*AR(K,K)+AI(K,K)*AI(K,K)
+        PRODR=BR(K)*AR(K,K)+BI(K)*AI(K,K)
+        PRODI=BI(K)*AR(K,K)-BR(K)*AI(K,K)
+        BR(K)=PRODR/DEN
+        BI(K)=PRODI/DEN
+        TR = -BR(K)
+        TI = -BI(K)
+        DO 30 I = 1,KM1
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 30       CONTINUE
+ 40     CONTINUE
+ 50     CONTINUE
+        DEN=AR(1,1)*AR(1,1)+AI(1,1)*AI(1,1)
+        PRODR=BR(1)*AR(1,1)+BI(1)*AI(1,1)
+        PRODI=BI(1)*AR(1,1)-BR(1)*AI(1,1)
+        BR(1)=PRODR/DEN
+        BI(1)=PRODI/DEN
+      RETURN
+C----------------------- END OF SUBROUTINE SOLHC -----------------------
+      END
+C
+      SUBROUTINE DECB (N, NDIM, A, ML, MU, IP, IER)
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION OF A BANDED
+C  MATRIX WITH LOWER BANDWIDTH ML AND UPPER BANDWIDTH MU
+C  INPUT..
+C     N       ORDER OF THE ORIGINAL MATRIX A.
+C     NDIM    DECLARED DIMENSION OF ARRAY  A.
+C     A       CONTAINS THE MATRIX IN BAND STORAGE.   THE COLUMNS
+C                OF THE MATRIX ARE STORED IN THE COLUMNS OF  A  AND
+C                THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C                ML+1 THROUGH 2*ML+MU+1 OF  A.
+C     ML      LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C     MU      UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C  OUTPUT..
+C     A       AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C                THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C     IP      INDEX VECTOR OF PIVOT INDICES.
+C     IP(N)   (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER     = 0 IF MATRIX A IS NONSINGULAR, OR  = K IF FOUND TO BE
+C                SINGULAR AT STAGE K.
+C  USE  SOLB  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(MD,1)*A(MD,2)*...*A(MD,N)  WITH MD=ML+MU+1.
+C  IF IP(N)=O, A IS SINGULAR, SOLB WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     THIS IS A MODIFICATION OF
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      JU = 0
+      IF (ML .EQ. 0) GO TO 70
+      IF (N .EQ. 1) GO TO 70
+      IF (N .LT. MU+2) GO TO 7
+      DO 5 J = MU+2,N
+      DO 5 I = 1,ML
+  5   A(I,J) = 0.D0
+  7   NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = MD
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M + K - MD
+        T = A(M,K)
+        IF (M .EQ. MD) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(MD,K)
+        A(MD,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = MD1,MDL
+ 30       A(I,K) = -A(I,K)*T
+        JU = MIN0(MAX0(JU,MU+IP(K)),N)
+        MM = MD
+        IF (JU .LT. KP1) GO TO 55
+        DO 50 J = KP1,JU
+          M = M - 1
+          MM = MM - 1
+          T = A(M,J)
+          IF (M .EQ. MM) GO TO 35
+          A(M,J) = A(MM,J)
+          A(MM,J) = T
+ 35       CONTINUE
+          IF (T .EQ. 0.D0) GO TO 45
+          JK = J - K
+          DO 40 I = MD1,MDL
+            IJK = I - JK
+ 40         A(IJK,J) = A(IJK,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 55     CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(MD,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECB ------------------------
+      END
+C
+C
+      SUBROUTINE SOLB (N, NDIM, A, ML, MU, B, IP)
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N      ORDER OF MATRIX A.
+C    NDIM   DECLARED DIMENSION OF ARRAY  A .
+C    A      TRIANGULARIZED MATRIX OBTAINED FROM DECB.
+C    ML     LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    MU     UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    B      RIGHT HAND SIDE VECTOR.
+C    IP     PIVOT VECTOR OBTAINED FROM DECB.
+C  DO NOT USE IF DECB HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B      SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      MDM = MD - 1
+      NM1 = N - 1
+      IF (ML .EQ. 0) GO TO 25
+      IF (N .EQ. 1) GO TO 50
+      DO 20 K = 1,NM1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IMD = I + K - MD
+ 10       B(IMD) = B(IMD) + A(I,K)*T
+ 20     CONTINUE
+ 25   CONTINUE
+      DO 40 KB = 1,NM1
+        K = N + 1 - KB
+        B(K) = B(K)/A(MD,K)
+        T = -B(K)
+        KMD = MD - K
+        LM = MAX0(1,KMD+1)
+        DO 30 I = LM,MDM
+          IMD = I - KMD
+ 30       B(IMD) = B(IMD) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(MD,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLB ------------------------
+      END
+C
+      SUBROUTINE DECBC (N, NDIM, AR, AI, ML, MU, IP, IER)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION AR(NDIM,N), AI(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION OF A BANDED COMPLEX
+C  MATRIX WITH LOWER BANDWIDTH ML AND UPPER BANDWIDTH MU
+C  INPUT..
+C     N       ORDER OF THE ORIGINAL MATRIX A.
+C     NDIM    DECLARED DIMENSION OF ARRAY  A.
+C     AR, AI     CONTAINS THE MATRIX IN BAND STORAGE.   THE COLUMNS
+C                OF THE MATRIX ARE STORED IN THE COLUMNS OF  AR (REAL
+C                PART) AND AI (IMAGINARY PART)  AND
+C                THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C                ML+1 THROUGH 2*ML+MU+1 OF  AR AND AI.
+C     ML      LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C     MU      UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C  OUTPUT..
+C     AR, AI  AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C                THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C     IP      INDEX VECTOR OF PIVOT INDICES.
+C     IP(N)   (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER     = 0 IF MATRIX A IS NONSINGULAR, OR  = K IF FOUND TO BE
+C                SINGULAR AT STAGE K.
+C  USE  SOLBC  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(MD,1)*A(MD,2)*...*A(MD,N)  WITH MD=ML+MU+1.
+C  IF IP(N)=O, A IS SINGULAR, SOLBC WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     THIS IS A MODIFICATION OF
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      JU = 0
+      IF (ML .EQ. 0) GO TO 70
+      IF (N .EQ. 1) GO TO 70
+      IF (N .LT. MU+2) GO TO 7
+      DO 5 J = MU+2,N
+      DO 5 I = 1,ML
+      AR(I,J) = 0.D0
+      AI(I,J) = 0.D0
+  5   CONTINUE
+  7   NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = MD
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IF (DABS(AR(I,K))+DABS(AI(I,K)) .GT.
+     &          DABS(AR(M,K))+DABS(AI(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M + K - MD
+        TR = AR(M,K)
+        TI = AI(M,K)
+        IF (M .EQ. MD) GO TO 20
+        IP(N) = -IP(N)
+        AR(M,K) = AR(MD,K)
+        AI(M,K) = AI(MD,K)
+        AR(MD,K) = TR
+        AI(MD,K) = TI
+ 20     IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 80
+        DEN=TR*TR+TI*TI
+        TR=TR/DEN
+        TI=-TI/DEN
+        DO 30 I = MD1,MDL
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          AR(I,K)=-PRODR
+          AI(I,K)=-PRODI
+ 30       CONTINUE
+        JU = MIN0(MAX0(JU,MU+IP(K)),N)
+        MM = MD
+        IF (JU .LT. KP1) GO TO 55
+        DO 50 J = KP1,JU
+          M = M - 1
+          MM = MM - 1
+          TR = AR(M,J)
+          TI = AI(M,J)
+          IF (M .EQ. MM) GO TO 35
+          AR(M,J) = AR(MM,J)
+          AI(M,J) = AI(MM,J)
+          AR(MM,J) = TR
+          AI(MM,J) = TI
+ 35       CONTINUE
+          IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 48
+          JK = J - K
+          IF (TI .EQ. 0.D0) THEN
+            DO 40 I = MD1,MDL
+            IJK = I - JK
+            PRODR=AR(I,K)*TR
+            PRODI=AI(I,K)*TR
+            AR(IJK,J) = AR(IJK,J) + PRODR
+            AI(IJK,J) = AI(IJK,J) + PRODI
+ 40         CONTINUE
+            GO TO 48
+          END IF
+          IF (TR .EQ. 0.D0) THEN
+            DO 45 I = MD1,MDL
+            IJK = I - JK
+            PRODR=-AI(I,K)*TI
+            PRODI=AR(I,K)*TI
+            AR(IJK,J) = AR(IJK,J) + PRODR
+            AI(IJK,J) = AI(IJK,J) + PRODI
+ 45         CONTINUE
+            GO TO 48
+          END IF
+          DO 47 I = MD1,MDL
+            IJK = I - JK
+            PRODR=AR(I,K)*TR-AI(I,K)*TI
+            PRODI=AI(I,K)*TR+AR(I,K)*TI
+            AR(IJK,J) = AR(IJK,J) + PRODR
+            AI(IJK,J) = AI(IJK,J) + PRODI
+ 47         CONTINUE
+ 48       CONTINUE
+ 50       CONTINUE
+ 55     CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (DABS(AR(MD,N))+DABS(AI(MD,N)) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECBC ------------------------
+      END
+C
+C
+      SUBROUTINE SOLBC (N, NDIM, AR, AI, ML, MU, BR, BI, IP)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION AR(NDIM,N), AI(NDIM,N), BR(N), BI(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B ,
+C                  VERSION BANDED AND COMPLEX-KPP_REAL.
+C  INPUT..
+C    N      ORDER OF MATRIX A.
+C    NDIM   DECLARED DIMENSION OF ARRAY  A .
+C    AR, AI TRIANGULARIZED MATRIX OBTAINED FROM DECB (REAL AND IMAG. PART).
+C    ML     LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    MU     UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    BR, BI RIGHT HAND SIDE VECTOR (REAL AND IMAG. PART).
+C    IP     PIVOT VECTOR OBTAINED FROM DECBC.
+C  DO NOT USE IF DECB HAS SET IER .NE. 0.
+C  OUTPUT..
+C    BR, BI SOLUTION VECTOR, X (REAL AND IMAG. PART).
+C-----------------------------------------------------------------------
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      MDM = MD - 1
+      NM1 = N - 1
+      IF (ML .EQ. 0) GO TO 25
+      IF (N .EQ. 1) GO TO 50
+      DO 20 K = 1,NM1
+        M = IP(K)
+        TR = BR(M)
+        TI = BI(M)
+        BR(M) = BR(K)
+        BI(M) = BI(K)
+        BR(K) = TR
+        BI(K) = TI
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IMD = I + K - MD
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(IMD) = BR(IMD) + PRODR
+          BI(IMD) = BI(IMD) + PRODI
+ 10     CONTINUE
+ 20     CONTINUE
+ 25     CONTINUE
+      DO 40 KB = 1,NM1
+        K = N + 1 - KB
+        DEN=AR(MD,K)*AR(MD,K)+AI(MD,K)*AI(MD,K)
+        PRODR=BR(K)*AR(MD,K)+BI(K)*AI(MD,K)
+        PRODI=BI(K)*AR(MD,K)-BR(K)*AI(MD,K)
+        BR(K)=PRODR/DEN
+        BI(K)=PRODI/DEN
+        TR = -BR(K)
+        TI = -BI(K)
+        KMD = MD - K
+        LM = MAX0(1,KMD+1)
+        DO 30 I = LM,MDM
+          IMD = I - KMD
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(IMD) = BR(IMD) + PRODR
+          BI(IMD) = BI(IMD) + PRODI
+ 30       CONTINUE
+ 40     CONTINUE
+        DEN=AR(MD,1)*AR(MD,1)+AI(MD,1)*AI(MD,1)
+        PRODR=BR(1)*AR(MD,1)+BI(1)*AI(MD,1)
+        PRODI=BI(1)*AR(MD,1)-BR(1)*AI(MD,1)
+        BR(1)=PRODR/DEN
+        BI(1)=PRODI/DEN
+ 50   CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE SOLBC ------------------------
+      END
+c
+C
+      subroutine Elmhes(nm,n,low,igh,a,int)
+C
+      integer i,j,m,n,la,nm,igh,kp1,low,mm1,mp1
+      real*8 a(nm,n)
+      real*8 x,y
+      real*8 dabs
+      integer int(igh)
+C
+C     this subroutine is a translation of the algol procedure elmhes,
+C     num. math. 12, 349-368(1968) by martin and wilkinson.
+C     handbook for auto. comp., vol.ii-linear algebra, 339-358(1971).
+C
+C     given a real general matrix, this subroutine
+C     reduces a submatrix situated in rows and columns
+C     low through igh to upper hessenberg form by
+C     stabilized elementary similarity transformations.
+C
+C     on input:
+C
+C      nm must be set to the row dimension of two-dimensional
+C        array parameters as declared in the calling program
+C        dimension statement;
+C
+C      n is the order of the matrix;
+C
+C      low and igh are integers determined by the balancing
+C        subroutine  balanc.      if  balanc  has not been used,
+C        set low=1, igh=n;
+C
+C      a contains the input matrix.
+C
+C     on output:
+C
+C      a contains the hessenberg matrix.  the multipliers
+C        which were used in the reduction are stored in the
+C        remaining triangle under the hessenberg matrix;
+C
+C      int contains information on the rows and columns
+C        interchanged in the reduction.
+C        only elements low through igh are used.
+C
+C     questions and comments should be directed to b. s. garbow,
+C     applied mathematics division, argonne national laboratory
+C
+C     ------------------------------------------------------------------
+C
+      la = igh - 1
+      kp1 = low + 1
+      if (la .lt. kp1) go to 200
+C
+      do 180 m = kp1, la
+       mm1 = m - 1
+       x = 0.0d0
+       i = m
+C
+       do 100 j = m, igh
+          if (dabs(a(j,mm1)) .le. dabs(x)) go to 100
+          x = a(j,mm1)
+          i = j
+  100   continue
+C
+       int(m) = i
+       if (i .eq. m) go to 130
+C    :::::::::: interchange rows and columns of a ::::::::::
+       do 110 j = mm1, n
+          y = a(i,j)
+          a(i,j) = a(m,j)
+          a(m,j) = y
+  110   continue
+C
+       do 120 j = 1, igh
+          y = a(j,i)
+          a(j,i) = a(j,m)
+          a(j,m) = y
+  120   continue
+C    :::::::::: end interchange ::::::::::
+  130   if (x .eq. 0.0d0) go to 180
+       mp1 = m + 1
+C
+       do 160 i = mp1, igh
+          y = a(i,mm1)
+          if (y .eq. 0.0d0) go to 160
+          y = y / x
+          a(i,mm1) = y
+C
+          do 140 j = m, n
+  140      a(i,j) = a(i,j) - y * a(m,j)
+C
+          do 150 j = 1, igh
+  150      a(j,m) = a(j,m) + y * a(j,i)
+C
+  160   continue
+C
+  180 continue
+C
+  200 return
+C    :::::::::: last card of elmhes ::::::::::
+      end
+
+        SUBROUTINE SOLOUT (NR,XOLD,X,Y,CONT,LRC,N,RPAR,IPAR,IRTRN)
+C --- PRINTS SOLUTION AT EQUIDISTANT OUTPUT-POINTS BY USING "CONTR5"
+        IMPLICIT KPP_REAL (A-H,O-Z)
+        DIMENSION Y(N),CONT(LRC)
+        COMMON /INTERN/XOUT
+        IF (NR.EQ.1) THEN
+           WRITE (6,99) X,Y(1),Y(2),NR-1
+           XOUT=0.2D0
+        ELSE
+ 10        CONTINUE
+           IF (X.GE.XOUT) THEN
+C --- CONTINUOUS OUTPUT FOR RADAU5
+              WRITE (6,99) XOUT,CONTR5(1,XOUT,CONT,LRC),
+     &                     CONTR5(2,XOUT,CONT,LRC),NR-1
+              XOUT=XOUT+0.2D0
+              GOTO 10
+           END IF
+        END IF
+ 99     FORMAT(1X,'X =',F5.2,'    Y =',2E18.10,'    NSTEP =',I4)
+        RETURN
+        END
+
+        SUBROUTINE FUNC_CHEM (N, T, V, FCT, RPAR, IPAR)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), FCT(NVAR)
+	KPP_REAL T, TOLD, RPAR(1)
+	INTEGER N, IPAR(1)
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V,  FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE JAC_CHEM (N, T, V, JV, NROWPD, RPAR, IPAR)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), JV(NVAR,NVAR)
+	KPP_REAL T, TOLD, RPAR(1)
+	INTEGER N, IPAR(1), NROWPD, i, j
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        DO i=1,NVAR
+           DO j=1,NVAR
+              JV(i,j) = 0.D0
+           END DO
+        END DO
+        CALL Jac(V,  FIX, RCONST, JV)
+        RETURN
+        END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.c	(revision 3477)
@@ -0,0 +1,53 @@
+void StochasticRates( double RCT[], double Volume, double SCT[] );   
+void Propensity ( int V[], int F[], double SCT[], double A[] );
+void MoleculeChange ( int j, int NmlcV[] );
+double CellMass(double T); 
+void Update_RCONST();
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+void Gillespie(int Nevents, double Volume, double* T, int NmlcV[], int NmlcF[]) 
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+    
+      int i, m=0, event;
+      double r1, r2;
+      double A[NREACT], SCT[NREACT], x;
+
+     /* Compute the stochastic reaction rates */
+      Update_RCONST();
+      StochasticRates( RCONST, Volume, SCT );   
+   
+      for (event = 1; event <= Nevents; event++) {
+
+          /* Uniformly distributed ranfor (m numbers */
+          r1 = (double)rand()/(double)RAND_MAX;
+          r2 = (double)rand()/(double)RAND_MAX;
+
+	  /* Avoid log of zero */
+	  r2 = (r2-1.0e-14) ? r2 : 1.0e-14;
+	  
+          /* Propensity vector */
+	  TIME = *T;
+	  Propensity ( NmlcV, NmlcF, SCT, A );
+	  
+          /* Cumulative sum of propensities */
+	  for (i=1; i<NREACT; i++)
+            A[i] = A[i-1]+A[i];
+          
+	  /* Index of next reaction */
+	  x = r1*A[NREACT-1];
+	  for ( i = 0; i<NREACT; i++)
+	    if (A[i] >= x) {
+              m = i+1;
+	      break;
+	    }
+	  
+          /* Update T with time to next reaction */
+          *T = *T - log(r2)/A[NREACT-1];
+
+          /* Update state vector after reaction m */
+	  MoleculeChange( m, NmlcV );
+	  
+     } /* for event */
+    
+} /* Gillespie */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.def	(revision 3477)
@@ -0,0 +1,10 @@
+ 
+#FUNCTION   aggregate
+#JACOBIAN   SPARSE_LU_ROW
+#DOUBLE     on 
+#STOCHASTIC on 
+#INTFILE    gillespie
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/gillespie.f90	(revision 3477)
@@ -0,0 +1,86 @@
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Parameters, ONLY : NVAR, NFIX, NREACT 
+  USE KPP_ROOT_Global, ONLY : TIME, RCONST, Volume 
+  USE KPP_ROOT_Stoichiom  
+  USE KPP_ROOT_Stochastic
+  USE KPP_ROOT_Rates
+  IMPLICIT NONE
+
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gillespie(Nevents, T, SCT, NmlcV, NmlcF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!   Gillespie stochastic integration
+!   INPUT:
+!       Nevents = no. of individual reaction events to be simulated
+!       SCT     = stochastic rate constants
+!       T       = time
+!       NmlcV, NmlcF = no. of molecules for variable and fixed species
+!   OUTPUT:
+!       T       = updated time (after Nevents reactions)
+!       NmlcV   = updated no. of molecules for variable species
+!      
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      KPP_REAL:: T
+      INTEGER :: Nevents     
+      INTEGER :: NmlcV(NVAR), NmlcF(NFIX)
+      INTEGER :: i, m, issa
+      REAL   :: r1, r2
+      KPP_REAL :: A(NREACT), SCT(NREACT), x
+   
+      DO issa = 1, Nevents
+
+          ! Uniformly distributed random numbers
+          CALL RANDOM_NUMBER(r1)
+          CALL RANDOM_NUMBER(r2)
+          ! Avoid log of zero
+          r2 = MAX(r2,1.e-14)
+          
+          ! Propensity vector
+          CALL  Propensity ( NmlcV, NmlcF, SCT, A )
+          ! Cumulative sum of propensities
+          DO i = 2, NREACT
+            A(i) = A(i-1)+A(i);
+          END DO
+          
+          ! Index of next reaction
+          x = r1*A(NREACT)
+          DO i = 1, NREACT
+            IF (A(i)>=x) THEN
+              m = i;
+              EXIT
+            END IF
+          END DO
+          
+          ! Update time with time to next reaction
+          T = T - LOG(r2)/A(NREACT);
+
+          ! Update state vector
+          CALL MoleculeChange( m, NmlcV )
+        
+     END DO
+    
+  CONTAINS
+
+    SUBROUTINE PropensityTemplate( T, NmlcV, NmlcF, Prop )
+      KPP_REAL, INTENT(IN)  :: T
+      INTEGER, INTENT(IN)   :: NmlcV(NVAR), NmlcF(NFIX)
+      KPP_REAL, INTENT(OUT) :: Prop(NREACT)
+      KPP_REAL :: Tsave, SCT(NREACT)
+    ! Update the stochastic reaction rates, which may be time dependent 
+      Tsave = TIME
+      TIME = T
+      CALL Update_RCONST()
+      CALL StochasticRates( RCONST, Volume, SCT )   
+      CALL Propensity ( NmlcV, NmlcF, SCT, Prop )
+      TIME = Tsave
+    END SUBROUTINE PropensityTemplate    
+    
+  END SUBROUTINE Gillespie
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_dvode.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_dvode.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_dvode.def	(revision 3477)
@@ -0,0 +1,14 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_dvode
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_dvode.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_dvode.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_dvode.f	(revision 3477)
@@ -0,0 +1,3850 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      PARAMETER (LRW=2*NVAR*NVAR+9*NVAR+25,LIW=NVAR+35)
+      PARAMETER (LRCONT=4*NVAR+4+10)
+      COMMON /CONT/ICONT(4),RCONT(LRCONT)
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      COMMON /VERWER/ IVERWER, IBEGIN, STEPCUT
+      EXTERNAL VODE_FSPLIT_VAR, VODE_Jac_SP
+
+      KPP_REAL RWORK(LRW)
+      INTEGER IWORK(LIW)
+
+      STEPCUT = 0.
+      MAXORD = 5
+      IBEGIN = 1
+      ITOL=4
+
+C ---- NORMAL COMPUTATION ---
+      ITASK=1
+      ISTATE=1
+C ---- USE OPTIONAL INPUT ---
+      IOPT=1
+      IWORK(5) = MAXORD    ! MAX ORD
+      IWORK(6) = 20000
+      IWORK(7) = 0
+      RWORK(6) = STEPMAX   ! STEP MAX
+      RWORK(7) = STEPMIN   ! STEP MIN
+      RWORK(5) = STEPMIN   ! INITIAL STEP
+
+C ----- SIGNAL FOR STIFF CASE, FULL JACOBIAN, INTERN (22) or SUPPLIED (21)
+      MF = 21
+
+      CALL DVODE (VODE_FSPLIT_VAR, NVAR, VAR, TIN, TOUT, ITOL,
+     *            RTOL, ATOL, ITASK,
+     *            ISTATE, IOPT, RWORK, LRW, IWORK, LIW,
+     *            VODE_Jac_SP, MF, RPAR, IPAR)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'ATMDVODE: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+C -- This version has JAC sparse, FCN aggregate --
+
+      SUBROUTINE DVODE (F, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,
+     1            ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF,
+     2            RPAR, IPAR)
+
+      KPP_REAL Y, T, TOUT, RelTol, AbsTol, RWORK, RPAR
+      INTEGER NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, IWORK, LIW,
+     1        MF, IPAR
+      DIMENSION Y(*), RelTol(*), AbsTol(*), RWORK(LRW), IWORK(LIW),
+     1          RPAR(*), IPAR(*)
+C-----------------------------------------------------------------------
+C DVODE.. Variable-coefficient Ordinary Differential Equation solver,
+C with fixed-leading coefficient implementation.
+C This version is in KPP_REAL.
+C
+C DVODE solves the initial value problem for stiff or nonstiff
+C systems of first order ODEs,
+C     dy/dt = f(t,y) ,  or, in component form,
+C     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+C DVODE is a package based on the EPISODE and EPISODEB packages, and
+C on the ODEPACK user interface standard, with minor modifications.
+C-----------------------------------------------------------------------
+C Revision History (YYMMDD)
+C   890615  Date Written
+C   890922  Added interrupt/restart ability, minor changes throughout.
+C   910228  Minor revisions in line format,  prologue, etc.
+C   920227  Modifications by D. Pang:
+C           (1) Applied subgennam to get generic intrinsic names.
+C           (2) Changed intrinsic names to generic in comments.
+C           (3) Added *DECK lines before each routine.
+C   920721  Names of routines and labeled Common blocks changed, so as
+C           to be unique in combined single/KPP_REAL code (ACH).
+C   920722  Minor revisions to prologue (ACH).
+C   920831  Conversion to KPP_REAL done (ACH).
+C-----------------------------------------------------------------------
+C References..
+C
+C 1. P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, "VODE: A Variable
+C    Coefficient ODE Solver," SIAM J. Sci. Stat. Comput., 10 (1989),
+C    pp. 1038-1051.  Also, LLNL Report UCRL-98412, June 1988.
+C 2. G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the
+C    Numerical Solution of Ordinary Differential Equations,"
+C    ACM Trans. Math. Software, 1 (1975), pp. 71-96.
+C 3. A. C. Hindmarsh and G. D. Byrne, "EPISODE: An Effective Package
+C    for the Integration of Systems of Ordinary Differential
+C    Equations," LLNL Report UCID-30112, Rev. 1, April 1977.
+C 4. G. D. Byrne and A. C. Hindmarsh, "EPISODEB: An Experimental
+C    Package for the Integration of Systems of Ordinary Differential
+C    Equations with Banded Jacobians," LLNL Report UCID-30132, April
+C    1976.
+C 5. A. C. Hindmarsh, "ODEPACK, a Systematized Collection of ODE
+C    Solvers," in Scientific Computing, R. S. Stepleman et al., eds.,
+C    North-Holland, Amsterdam, 1983, pp. 55-64.
+C 6. K. R. Jackson and R. Sacks-Davis, "An Alternative Implementation
+C    of Variable Step-Size Multistep Formulas for Stiff ODEs," ACM
+C    Trans. Math. Software, 6 (1980), pp. 295-318.
+C-----------------------------------------------------------------------
+C Authors..
+C
+C               Peter N. Brown and Alan C. Hindmarsh
+C               Computing and Mathematics Research Division, L-316
+C               Lawrence Livermore National Laboratory
+C               Livermore, CA 94550
+C and
+C               George D. Byrne
+C               Exxon Research and Engineering Co.
+C               Clinton Township
+C               Route 22 East
+C               Annandale, NJ 08801
+C-----------------------------------------------------------------------
+C Summary of usage.
+C
+C Communication between the user and the DVODE package, for normal
+C situations, is summarized here.  This summary describes only a subset
+C of the full set of options available.  See the full description for
+C details, including optional communication, nonstandard options,
+C and instructions for special situations.  See also the example
+C problem (with program and output) following this summary.
+C
+C A. First provide a subroutine of the form..
+C
+C           SUBROUTINE F (NEQ, T, Y, YDOT, RPAR, IPAR)
+C           KPP_REAL T, Y, YDOT, RPAR
+C           DIMENSION Y(NEQ), YDOT(NEQ)
+C
+C which supplies the vector function f by loading YDOT(i) with f(i).
+C
+C B. Next determine (or guess) whether or not the problem is stiff.
+C Stiffness occurs when the Jacobian matrix df/dy has an eigenvalue
+C whose real part is negative and large in magnitude, compared to the
+C reciprocal of the t span of interest.  If the problem is nonstiff,
+C use a method flag MF = 10.  If it is stiff, there are four standard
+C choices for MF (21, 22, 24, 25), and DVODE requires the Jacobian
+C matrix in some form.  In these cases (MF .gt. 0), DVODE will use a
+C saved copy of the Jacobian matrix.  If this is undesirable because of
+C storage limitations, set MF to the corresponding negative value
+C (-21, -22, -24, -25).  (See full description of MF below.)
+C The Jacobian matrix is regarded either as full (MF = 21 or 22),
+C or banded (MF = 24 or 25).  In the banded case, DVODE requires two
+C half-bandwidth parameters ML and MU.  These are, respectively, the
+C widths of the lower and upper parts of the band, excluding the main
+C diagonal.  Thus the band consists of the locations (i,j) with
+C i-ML .le. j .le. i+MU, and the full bandwidth is ML+MU+1.
+C
+C C. If the problem is stiff, you are encouraged to supply the Jacobian
+C directly (MF = 21 or 24), but if this is not feasible, DVODE will
+C compute it internally by difference quotients (MF = 22 or 25).
+C If you are supplying the Jacobian, provide a subroutine of the form..
+C
+C           SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD, RPAR, IPAR)
+C           KPP_REAL T, Y, PD, RPAR
+C           DIMENSION Y(NEQ), PD(NROWPD,NEQ)
+C
+C which supplies df/dy by loading PD as follows..
+C     For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+C the partial derivative of f(i) with respect to y(j).  (Ignore the
+C ML and MU arguments in this case.)
+C     For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with
+C df(i)/dy(j), i.e. load the diagonal lines of df/dy into the rows of
+C PD from the top down.
+C     In either case, only nonzero elements need be loaded.
+C
+C D. Write a main program which calls subroutine DVODE once for
+C each point at which answers are desired.  This should also provide
+C for possible use of logical unit 6 for output of error messages
+C by DVODE.  On the first CALL to DVODE, supply arguments as follows..
+C F    = Name of subroutine for right-hand side vector f.
+C          This name must be declared external in calling program.
+C NEQ    = Number of first order ODE-s.
+C Y      = Array of initial values, of length NEQ.
+C T      = The initial value of the independent variable.
+C TOUT   = First point where output is desired (.ne. T).
+C ITOL   = 1 or 2 according as AbsTol (below) is a scalar or array.
+C RelTol   = Relative tolerance parameter (scalar).
+C AbsTol   = Absolute tolerance parameter (scalar or array).
+C          The estimated local error in Y(i) will be controlled so as
+C          to be roughly less (in magnitude) than
+C             EWT(i) = RelTol*abs(Y(i)) + AbsTol     if ITOL = 1, or
+C             EWT(i) = RelTol*abs(Y(i)) + AbsTol(i)  if ITOL = 2.
+C          Thus the local error test passes if, in each component,
+C          either the absolute error is less than AbsTol (or AbsTol(i)),
+C          or the relative error is less than RelTol.
+C          Use RelTol = 0.0 for pure absolute error control, and
+C          use AbsTol = 0.0 (or AbsTol(i) = 0.0) for pure relative error
+C          control.  Caution.. Actual (global) errors may exceed these
+C          local tolerances, so choose them conservatively.
+C ITASK  = 1 for normal computation of output values of Y at t = TOUT.
+C ISTATE = Integer flag (input and output).  Set ISTATE = 1.
+C IOPT   = 0 to indicate no optional input used.
+C RWORK  = Real work array of length at least..
+C             20 + 16*NEQ                      for MF = 10,
+C             22 +  9*NEQ + 2*NEQ**2           for MF = 21 or 22,
+C             22 + 11*NEQ + (3*ML + 2*MU)*NEQ  for MF = 24 or 25.
+C LRW    = Declared length of RWORK (in user's DIMENSION statement).
+C IWORK  = Integer work array of length at least..
+C             30        for MF = 10,
+C             30 + NEQ  for MF = 21, 22, 24, or 25.
+C          If MF = 24 or 25, input in IWORK(1),IWORK(2) the lower
+C          and upper half-bandwidths ML,MU.
+C LIW    = Declared length of IWORK (in user's DIMENSION).
+C JAC    = Name of subroutine for Jacobian matrix (MF = 21 or 24).
+C          If used, this name must be declared external in calling
+C          program.  If not used, pass a dummy name.
+C MF     = Method flag.  Standard values are..
+C          10 for nonstiff (Adams) method, no Jacobian used.
+C          21 for stiff (BDF) method, user-supplied full Jacobian.
+C          22 for stiff method, internally generated full Jacobian.
+C          24 for stiff method, user-supplied banded Jacobian.
+C          25 for stiff method, internally generated banded Jacobian.
+C RPAR,IPAR = user-defined real and integer arrays passed to F and JAC.
+C Note that the main program must declare arrays Y, RWORK, IWORK,
+C and possibly AbsTol, RPAR, and IPAR.
+C
+C E. The output from the first CALL (or any call) is..
+C      Y = Array of computed values of y(t) vector.
+C      T = Corresponding value of independent variable (normally TOUT).
+C ISTATE = 2  if DVODE was successful, negative otherwise.
+C          -1 means excess work done on this call. (Perhaps wrong MF.)
+C          -2 means excess accuracy requested. (Tolerances too small.)
+C          -3 means illegal input detected. (See printed message.)
+C          -4 means repeated error test failures. (Check all input.)
+C          -5 means repeated convergence failures. (Perhaps bad
+C             Jacobian supplied or wrong choice of MF or tolerances.)
+C          -6 means error weight became zero during problem. (Solution
+C             component i vanished, and AbsTol or AbsTol(i) = 0.)
+C
+C F. To continue the integration after a successful return, simply
+C reset TOUT and CALL DVODE again.  No other parameters need be reset.
+C
+C-----------------------------------------------------------------------
+C EXAMPLE PROBLEM
+C
+C The following is a simple example problem, with the coding
+C needed for its solution by DVODE.  The problem is from chemical
+C kinetics, and consists of the following three rate equations..
+C     dy1/dt = -.04*y1 + 1.e4*y2*y3
+C     dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2
+C     dy3/dt = 3.e7*y2**2
+C on the interval from t = 0.0 to t = 4.e10, with initial conditions
+C y1 = 1.0, y2 = y3 = 0.  The problem is stiff.
+C
+C The following coding solves this problem with DVODE, using MF = 21
+C and printing results at t = .4, 4., ..., 4.e10.  It uses
+C ITOL = 2 and AbsTol much smaller for y2 than y1 or y3 because
+C y2 has much smaller values.
+C At the end of the run, statistical quantities of interest are
+C printed. (See optional output in the full description below.)
+C To generate Fortran source code, replace C in column 1 with a blank
+C in the coding below.
+C
+C     EXTERNAL FEX, JEX
+C     KPP_REAL AbsTol, RPAR, RelTol, RWORK, T, TOUT, Y
+C     DIMENSION Y(3), AbsTol(3), RWORK(67), IWORK(33)
+C     NEQ = 3
+C     Y(1) = 1.0D0
+C     Y(2) = 0.0D0
+C     Y(3) = 0.0D0
+C     T = 0.0D0
+C     TOUT = 0.4D0
+C     ITOL = 2
+C     RelTol = 1.D-4
+C     AbsTol(1) = 1.D-8
+C     AbsTol(2) = 1.D-14
+C     AbsTol(3) = 1.D-6
+C     ITASK = 1
+C     ISTATE = 1
+C     IOPT = 0
+C     LRW = 67
+C     LIW = 33
+C     MF = 21
+C     DO 40 IOUT = 1,12
+C       CALL DVODE(FEX,NEQ,Y,T,TOUT,ITOL,RelTol,AbsTol,ITASK,ISTATE,
+C    1            IOPT,RWORK,LRW,IWORK,LIW,JEX,MF,RPAR,IPAR)
+C       WRITE(6,20)T,Y(1),Y(2),Y(3)
+C 20    FORMAT(' At t =',D12.4,'   y =',3D14.6)
+C       IF (ISTATE .LT. 0) GO TO 80
+C 40    TOUT = TOUT*10.
+C     WRITE(6,60) IWORK(11),IWORK(12),IWORK(13),IWORK(19),
+C    1            IWORK(20),IWORK(21),IWORK(22)
+C 60  FORMAT(/' No. steps =',I4,'   No. f-s =',I4,
+C    1       '   No. J-s =',I4,'   No. LU-s =',I4/
+C    2       '  No. nonlinear iterations =',I4/
+C    3       '  No. nonlinear convergence failures =',I4/
+C    4       '  No. error test failures =',I4/)
+C     STOP
+C 80  WRITE(6,90)ISTATE
+C 90  FORMAT(///' Error halt.. ISTATE =',I3)
+C     STOP
+C     END
+C
+C     SUBROUTINE FEX (NEQ, T, Y, YDOT, RPAR, IPAR)
+C     KPP_REAL RPAR, T, Y, YDOT
+C     DIMENSION Y(NEQ), YDOT(NEQ)
+C     YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
+C     YDOT(3) = 3.D7*Y(2)*Y(2)
+C     YDOT(2) = -YDOT(1) - YDOT(3)
+C     RETURN
+C     END
+C
+C     SUBROUTINE JEX (NEQ, T, Y, ML, MU, PD, NRPD, RPAR, IPAR)
+C     KPP_REAL PD, RPAR, T, Y
+C     DIMENSION Y(NEQ), PD(NRPD,NEQ)
+C     PD(1,1) = -.04D0
+C     PD(1,2) = 1.D4*Y(3)
+C     PD(1,3) = 1.D4*Y(2)
+C     PD(2,1) = .04D0
+C     PD(2,3) = -PD(1,3)
+C     PD(3,2) = 6.D7*Y(2)
+C     PD(2,2) = -PD(1,2) - PD(3,2)
+C     RETURN
+C     END
+C
+C The following output was obtained from the above program on a
+C Cray-1 computer with the CFT compiler.
+C
+C At t =  4.0000e-01   y =  9.851680e-01  3.386314e-05  1.479817e-02
+C At t =  4.0000e+00   y =  9.055255e-01  2.240539e-05  9.445214e-02
+C At t =  4.0000e+01   y =  7.158108e-01  9.184883e-06  2.841800e-01
+C At t =  4.0000e+02   y =  4.505032e-01  3.222940e-06  5.494936e-01
+C At t =  4.0000e+03   y =  1.832053e-01  8.942690e-07  8.167938e-01
+C At t =  4.0000e+04   y =  3.898560e-02  1.621875e-07  9.610142e-01
+C At t =  4.0000e+05   y =  4.935882e-03  1.984013e-08  9.950641e-01
+C At t =  4.0000e+06   y =  5.166183e-04  2.067528e-09  9.994834e-01
+C At t =  4.0000e+07   y =  5.201214e-05  2.080593e-10  9.999480e-01
+C At t =  4.0000e+08   y =  5.213149e-06  2.085271e-11  9.999948e-01
+C At t =  4.0000e+09   y =  5.183495e-07  2.073399e-12  9.999995e-01
+C At t =  4.0000e+10   y =  5.450996e-08  2.180399e-13  9.999999e-01
+C
+C No. steps = 595   No. f-s = 832   No. J-s =  13   No. LU-s = 112
+C  No. nonlinear iterations = 831
+C  No. nonlinear convergence failures =   0
+C  No. error test failures =  22
+C-----------------------------------------------------------------------
+C Full description of user interface to DVODE.
+C
+C The user interface to DVODE consists of the following parts.
+C
+C i.   The CALL sequence to subroutine DVODE, which is a driver
+C      routine for the solver.  This includes descriptions of both
+C      the CALL sequence arguments and of user-supplied routines.
+C      Following these descriptions is
+C        * a description of optional input available through the
+C          CALL sequence,
+C        * a description of optional output (in the work arrays), and
+C        * instructions for interrupting and restarting a solution.
+C
+C ii.  Descriptions of other routines in the DVODE package that may be
+C      (optionally) called by the user.  These provide the ability to
+C      alter error message handling, save and restore the internal
+C      COMMON, and obtain specified derivatives of the solution y(t).
+C
+C iii. Descriptions of COMMON blocks to be declared in overlay
+C      or similar environments.
+C
+C iv.  Description of two routines in the DVODE package, either of
+C      which the user may replace with his own version, if desired.
+C      these relate to the measurement of errors.
+C
+C-----------------------------------------------------------------------
+C Part i.  Call Sequence.
+C
+C The CALL sequence parameters used for input only are
+C     F, NEQ, TOUT, ITOL, RelTol, AbsTol, ITASK, IOPT, LRW, LIW, JAC, MF,
+C and those used for both input and output are
+C     Y, T, ISTATE.
+C The work arrays RWORK and IWORK are also used for conditional and
+C optional input and optional output.  (The term output here refers
+C to the return from subroutine DVODE to the user's calling program.)
+C
+C The legality of input parameters will be thoroughly checked on the
+C initial CALL for the problem, but not checked thereafter unless a
+C change in input parameters is flagged by ISTATE = 3 in the input.
+C
+C The descriptions of the CALL arguments are as follows.
+C
+C F    = The name of the user-supplied subroutine defining the
+C          ODE system.  The system must be put in the first-order
+C          form dy/dt = f(t,y), where f is a vector-valued function
+C          of the scalar t and the vector y.  Subroutine F is to
+C          compute the function f.  It is to have the form
+C               SUBROUTINE F (NEQ, T, Y, YDOT, RPAR, IPAR)
+C               KPP_REAL T, Y, YDOT, RPAR
+C               DIMENSION Y(NEQ), YDOT(NEQ)
+C          where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+C          is output.  Y and YDOT are arrays of length NEQ.
+C          (In the DIMENSION statement above, NEQ  can be replaced by
+C          *  to make  Y  and  YDOT  assumed size arrays.)
+C          Subroutine F should not alter Y(1),...,Y(NEQ).
+C          F must be declared EXTERNAL in the calling program.
+C
+C          Subroutine F may access user-defined real and integer
+C          work arrays RPAR and IPAR, which are to be dimensioned
+C          in the main program.
+C
+C          If quantities computed in the F routine are needed
+C          externally to DVODE, an extra CALL to F should be made
+C          for this purpose, for consistent and accurate results.
+C          If only the derivative dy/dt is needed, use DVINDY instead.
+C
+C NEQ    = The size of the ODE system (number of first order
+C          ordinary differential equations).  Used only for input.
+C          NEQ may not be increased during the problem, but
+C          can be decreased (with ISTATE = 3 in the input).
+C
+C Y      = A real array for the vector of dependent variables, of
+C          length NEQ or more.  Used for both input and output on the
+C          first CALL (ISTATE = 1), and only for output on other calls.
+C          On the first call, Y must contain the vector of initial
+C          values.  In the output, Y contains the computed solution
+C          evaluated at T.  If desired, the Y array may be used
+C          for other purposes between calls to the solver.
+C
+C          This array is passed as the Y argument in all calls to
+C          F and JAC.
+C
+C T      = The independent variable.  In the input, T is used only on
+C          the first call, as the initial point of the integration.
+C          In the output, after each call, T is the value at which a
+C          computed solution Y is evaluated (usually the same as TOUT).
+C          On an error return, T is the farthest point reached.
+C
+C TOUT   = The next value of t at which a computed solution is desired.
+C          Used only for input.
+C
+C          When starting the problem (ISTATE = 1), TOUT may be equal
+C          to T for one call, then should .ne. T for the next call.
+C          For the initial T, an input value of TOUT .ne. T is used
+C          in order to determine the direction of the integration
+C          (i.e. the algebraic sign of the step sizes) and the rough
+C          scale of the problem.  Integration in either direction
+C          (forward or backward in t) is permitted.
+C
+C          If ITASK = 2 or 5 (one-step modes), TOUT is ignored after
+C          the first CALL (i.e. the first CALL with TOUT .ne. T).
+C          Otherwise, TOUT is required on every call.
+C
+C          If ITASK = 1, 3, or 4, the values of TOUT need not be
+C          monotone, but a value of TOUT which backs up is limited
+C          to the current internal t interval, whose endpoints are
+C          TCUR - HU and TCUR.  (See optional output, below, for
+C          TCUR and HU.)
+C
+C ITOL   = An indicator for the type of error control.  See
+C          description below under AbsTol.  Used only for input.
+C
+C RelTol   = A relative error tolerance parameter, either a scalar or
+C          an array of length NEQ.  See description below under AbsTol.
+C          Input only.
+C
+C AbsTol   = An absolute error tolerance parameter, either a scalar or
+C          an array of length NEQ.  Input only.
+C
+C          The input parameters ITOL, RelTol, and AbsTol determine
+C          the error control performed by the solver.  The solver will
+C          control the vector e = (e(i)) of estimated local errors
+C          in Y, according to an inequality of the form
+C                      rms-norm of ( e(i)/EWT(i) )   .le.   1,
+C          where       EWT(i) = RelTol(i)*abs(Y(i)) + AbsTol(i),
+C          and the rms-norm (root-mean-square norm) here is
+C          rms-norm(v) = sqrt(sum v(i)**2 / NEQ).  Here EWT = (EWT(i))
+C          is a vector of weights which must always be positive, and
+C          the values of RelTol and AbsTol should all be non-negative.
+C          The following table gives the types (scalar/array) of
+C          RelTol and AbsTol, and the corresponding form of EWT(i).
+C
+C             ITOL    RelTol       AbsTol          EWT(i)
+C              1     scalar     scalar     RelTol*ABS(Y(i)) + AbsTol
+C              2     scalar     array      RelTol*ABS(Y(i)) + AbsTol(i)
+C              3     array      scalar     RelTol(i)*ABS(Y(i)) + AbsTol
+C              4     array      array      RelTol(i)*ABS(Y(i)) + AbsTol(i)
+C
+C          When either of these parameters is a scalar, it need not
+C          be dimensioned in the user's calling program.
+C
+C          If none of the above choices (with ITOL, RelTol, and AbsTol
+C          fixed throughout the problem) is suitable, more general
+C          error controls can be obtained by substituting
+C          user-supplied routines for the setting of EWT and/or for
+C          the norm calculation.  See Part iv below.
+C
+C          If global errors are to be estimated by making a repeated
+C          run on the same problem with smaller tolerances, then all
+C          components of RelTol and AbsTol (i.e. of EWT) should be scaled
+C          down uniformly.
+C
+C ITASK  = An index specifying the task to be performed.
+C          Input only.  ITASK has the following values and meanings.
+C          1  means normal computation of output values of y(t) at
+C             t = TOUT (by overshooting and interpolating).
+C          2  means take one step only and return.
+C          3  means stop at the first internal mesh point at or
+C             beyond t = TOUT and return.
+C          4  means normal computation of output values of y(t) at
+C             t = TOUT but without overshooting t = TCRIT.
+C             TCRIT must be input as RWORK(1).  TCRIT may be equal to
+C             or beyond TOUT, but not behind it in the direction of
+C             integration.  This option is useful if the problem
+C             has a singularity at or beyond t = TCRIT.
+C          5  means take one step, without passing TCRIT, and return.
+C             TCRIT must be input as RWORK(1).
+C
+C          Note..  If ITASK = 4 or 5 and the solver reaches TCRIT
+C          (within roundoff), it will return T = TCRIT (exactly) to
+C          indicate this (unless ITASK = 4 and TOUT comes before TCRIT,
+C          in which case answers at T = TOUT are returned first).
+C
+C ISTATE = an index used for input and output to specify the
+C          the state of the calculation.
+C
+C          In the input, the values of ISTATE are as follows.
+C          1  means this is the first CALL for the problem
+C             (initializations will be done).  See note below.
+C          2  means this is not the first call, and the calculation
+C             is to continue normally, with no change in any input
+C             parameters except possibly TOUT and ITASK.
+C             (If ITOL, RelTol, and/or AbsTol are changed between calls
+C             with ISTATE = 2, the new values will be used but not
+C             tested for legality.)
+C          3  means this is not the first call, and the
+C             calculation is to continue normally, but with
+C             a change in input parameters other than
+C             TOUT and ITASK.  Changes are allowed in
+C             NEQ, ITOL, RelTol, AbsTol, IOPT, LRW, LIW, MF, ML, MU,
+C             and any of the optional input except H0.
+C             (See IWORK description for ML and MU.)
+C          Note..  A preliminary CALL with TOUT = T is not counted
+C          as a first CALL here, as no initialization or checking of
+C          input is done.  (Such a CALL is sometimes useful to include
+C          the initial conditions in the output.)
+C          Thus the first CALL for which TOUT .ne. T requires
+C          ISTATE = 1 in the input.
+C
+C          In the output, ISTATE has the following values and meanings.
+C           1  means nothing was done, as TOUT was equal to T with
+C              ISTATE = 1 in the input.
+C           2  means the integration was performed successfully.
+C          -1  means an excessive amount of work (more than MXSTEP
+C              steps) was done on this call, before completing the
+C              requested task, but the integration was otherwise
+C              successful as far as T.  (MXSTEP is an optional input
+C              and is normally 500.)  To continue, the user may
+C              simply reset ISTATE to a value .gt. 1 and CALL again.
+C              (The excess work step counter will be reset to 0.)
+C              In addition, the user may increase MXSTEP to avoid
+C              this error return.  (See optional input below.)
+C          -2  means too much accuracy was requested for the precision
+C              of the machine being used.  This was detected before
+C              completing the requested task, but the integration
+C              was successful as far as T.  To continue, the tolerance
+C              parameters must be reset, and ISTATE must be set
+C              to 3.  The optional output TOLSF may be used for this
+C              purpose.  (Note.. If this condition is detected before
+C              taking any steps, then an illegal input return
+C              (ISTATE = -3) occurs instead.)
+C          -3  means illegal input was detected, before taking any
+C              integration steps.  See written message for details.
+C              Note..  If the solver detects an infinite loop of calls
+C              to the solver with illegal input, it will cause
+C              the run to stop.
+C          -4  means there were repeated error test failures on
+C              one attempted step, before completing the requested
+C              task, but the integration was successful as far as T.
+C              The problem may have a singularity, or the input
+C              may be inappropriate.
+C          -5  means there were repeated convergence test failures on
+C              one attempted step, before completing the requested
+C              task, but the integration was successful as far as T.
+C              This may be caused by an inaccurate Jacobian matrix,
+C              if one is being used.
+C          -6  means EWT(i) became zero for some i during the
+C              integration.  Pure relative error control (AbsTol(i)=0.0)
+C              was requested on a variable which has now vanished.
+C              The integration was successful as far as T.
+C
+C          Note..  Since the normal output value of ISTATE is 2,
+C          it does not need to be reset for normal continuation.
+C          Also, since a negative input value of ISTATE will be
+C          regarded as illegal, a negative output value requires the
+C          user to change it, and possibly other input, before
+C          calling the solver again.
+C
+C IOPT   = An integer flag to specify whether or not any optional
+C          input is being used on this call.  Input only.
+C          The optional input is listed separately below.
+C          IOPT = 0 means no optional input is being used.
+C                   Default values will be used in all cases.
+C          IOPT = 1 means optional input is being used.
+C
+C RWORK  = A real working array (KPP_REAL).
+C          The length of RWORK must be at least
+C             20 + NYH*(MAXORD + 1) + 3*NEQ + LWM    where
+C          NYH    = the initial value of NEQ,
+C          MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a
+C                   smaller value is given as an optional input),
+C          LWM = length of work space for matrix-related data..
+C          LWM = 0             if MITER = 0,
+C          LWM = 2*NEQ**2 + 2  if MITER = 1 or 2, and MF.gt.0,
+C          LWM = NEQ**2 + 2    if MITER = 1 or 2, and MF.lt.0,
+C          LWM = NEQ + 2       if MITER = 3,
+C          LWM = (3*ML+2*MU+2)*NEQ + 2 if MITER = 4 or 5, and MF.gt.0,
+C          LWM = (2*ML+MU+1)*NEQ + 2   if MITER = 4 or 5, and MF.lt.0.
+C          (See the MF description for METH and MITER.)
+C          Thus if MAXORD has its default value and NEQ is constant,
+C          this length is..
+C             20 + 16*NEQ                    for MF = 10,
+C             22 + 16*NEQ + 2*NEQ**2         for MF = 11 or 12,
+C             22 + 16*NEQ + NEQ**2           for MF = -11 or -12,
+C             22 + 17*NEQ                    for MF = 13,
+C             22 + 18*NEQ + (3*ML+2*MU)*NEQ  for MF = 14 or 15,
+C             22 + 17*NEQ + (2*ML+MU)*NEQ    for MF = -14 or -15,
+C             20 +  9*NEQ                    for MF = 20,
+C             22 +  9*NEQ + 2*NEQ**2         for MF = 21 or 22,
+C             22 +  9*NEQ + NEQ**2           for MF = -21 or -22,
+C             22 + 10*NEQ                    for MF = 23,
+C             22 + 11*NEQ + (3*ML+2*MU)*NEQ  for MF = 24 or 25.
+C             22 + 10*NEQ + (2*ML+MU)*NEQ    for MF = -24 or -25.
+C          The first 20 words of RWORK are reserved for conditional
+C          and optional input and optional output.
+C
+C          The following word in RWORK is a conditional input..
+C            RWORK(1) = TCRIT = critical value of t which the solver
+C                       is not to overshoot.  Required if ITASK is
+C                       4 or 5, and ignored otherwise.  (See ITASK.)
+C
+C LRW    = The length of the array RWORK, as declared by the user.
+C          (This will be checked by the solver.)
+C
+C IWORK  = An integer work array.  The length of IWORK must be at least
+C             30        if MITER = 0 or 3 (MF = 10, 13, 20, 23), or
+C             30 + NEQ  otherwise (abs(MF) = 11,12,14,15,21,22,24,25).
+C          The first 30 words of IWORK are reserved for conditional and
+C          optional input and optional output.
+C
+C          The following 2 words in IWORK are conditional input..
+C            IWORK(1) = ML     These are the lower and upper
+C            IWORK(2) = MU     half-bandwidths, respectively, of the
+C                       banded Jacobian, excluding the main diagonal.
+C                       The band is defined by the matrix locations
+C                       (i,j) with i-ML .le. j .le. i+MU.  ML and MU
+C                       must satisfy  0 .le.  ML,MU  .le. NEQ-1.
+C                       These are required if MITER is 4 or 5, and
+C                       ignored otherwise.  ML and MU may in fact be
+C                       the band parameters for a matrix to which
+C                       df/dy is only approximately equal.
+C
+C LIW    = the length of the array IWORK, as declared by the user.
+C          (This will be checked by the solver.)
+C
+C Note..  The work arrays must not be altered between calls to DVODE
+C for the same problem, except possibly for the conditional and
+C optional input, and except for the last 3*NEQ words of RWORK.
+C The latter space is used for internal scratch space, and so is
+C available for use by the user outside DVODE between calls, if
+C desired (but not for use by F or JAC).
+C
+C JAC    = The name of the user-supplied routine (MITER = 1 or 4) to
+C          compute the Jacobian matrix, df/dy, as a function of
+C          the scalar t and the vector y.  It is to have the form
+C               SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD,
+C                               RPAR, IPAR)
+C               KPP_REAL T, Y, PD, RPAR
+C               DIMENSION Y(NEQ), PD(NROWPD, NEQ)
+C          where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+C          PD is to be loaded with partial derivatives (elements of the
+C          Jacobian matrix) in the output.  PD must be given a first
+C          dimension of NROWPD.  T and Y have the same meaning as in
+C          Subroutine F.  (In the DIMENSION statement above, NEQ can
+C          be replaced by  *  to make Y and PD assumed size arrays.)
+C               In the full matrix case (MITER = 1), ML and MU are
+C          ignored, and the Jacobian is to be loaded into PD in
+C          columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+C               In the band matrix case (MITER = 4), the elements
+C          within the band are to be loaded into PD in columnwise
+C          manner, with diagonal lines of df/dy loaded into the rows
+C          of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+C          ML and MU are the half-bandwidth parameters. (See IWORK).
+C          The locations in PD in the two triangular areas which
+C          correspond to nonexistent matrix elements can be ignored
+C          or loaded arbitrarily, as they are overwritten by DVODE.
+C               JAC need not provide df/dy exactly.  A crude
+C          approximation (possibly with a smaller bandwidth) will do.
+C               In either case, PD is preset to zero by the solver,
+C          so that only the nonzero elements need be loaded by JAC.
+C          Each CALL to JAC is preceded by a CALL to F with the same
+C          arguments NEQ, T, and Y.  Thus to gain some efficiency,
+C          intermediate quantities shared by both calculations may be
+C          saved in a user COMMON block by F and not recomputed by JAC,
+C          if desired.  Also, JAC may alter the Y array, if desired.
+C          JAC must be declared external in the calling program.
+C               Subroutine JAC may access user-defined real and integer
+C          work arrays, RPAR and IPAR, whose dimensions are set by the
+C          user in the main program.
+C
+C MF     = The method flag.  Used only for input.  The legal values of
+C          MF are 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25,
+C          -11, -12, -14, -15, -21, -22, -24, -25.
+C          MF is a signed two-digit integer, MF = JSV*(10*METH + MITER).
+C          JSV = SIGN(MF) indicates the Jacobian-saving strategy..
+C            JSV =  1 means a copy of the Jacobian is saved for reuse
+C                     in the corrector iteration algorithm.
+C            JSV = -1 means a copy of the Jacobian is not saved
+C                     (valid only for MITER = 1, 2, 4, or 5).
+C          METH indicates the basic linear multistep method..
+C            METH = 1 means the implicit Adams method.
+C            METH = 2 means the method based on backward
+C                     differentiation formulas (BDF-s).
+C          MITER indicates the corrector iteration method..
+C            MITER = 0 means functional iteration (no Jacobian matrix
+C                      is involved).
+C            MITER = 1 means chord iteration with a user-supplied
+C                      full (NEQ by NEQ) Jacobian.
+C            MITER = 2 means chord iteration with an internally
+C                      generated (difference quotient) full Jacobian
+C                      (using NEQ extra calls to F per df/dy value).
+C            MITER = 3 means chord iteration with an internally
+C                      generated diagonal Jacobian approximation
+C                      (using 1 extra CALL to F per df/dy evaluation).
+C            MITER = 4 means chord iteration with a user-supplied
+C                      banded Jacobian.
+C            MITER = 5 means chord iteration with an internally
+C                      generated banded Jacobian (using ML+MU+1 extra
+C                      calls to F per df/dy evaluation).
+C          If MITER = 1 or 4, the user must supply a subroutine JAC
+C          (the name is arbitrary) as described above under JAC.
+C          For other values of MITER, a dummy argument can be used.
+C
+C RPAR     User-specified array used to communicate real parameters
+C          to user-supplied subroutines.  If RPAR is a vector, then
+C          it must be dimensioned in the user's main program.  If it
+C          is unused or it is a scalar, then it need not be
+C          dimensioned.
+C
+C IPAR     User-specified array used to communicate integer parameter
+C          to user-supplied subroutines.  The comments on dimensioning
+C          RPAR apply to IPAR.
+C-----------------------------------------------------------------------
+C Optional Input.
+C
+C The following is a list of the optional input provided for in the
+C CALL sequence.  (See also Part ii.)  For each such input variable,
+C this table lists its name as used in this documentation, its
+C location in the CALL sequence, its meaning, and the default value.
+C The use of any of this input requires IOPT = 1, and in that
+C case all of this input is examined.  A value of zero for any
+C of these optional input variables will cause the default value to be
+C used.  Thus to use a subset of the optional input, simply preload
+C locations 5 to 10 in RWORK and IWORK to 0.0 and 0 respectively, and
+C then set those of interest to nonzero values.
+C
+C NAME    LOCATION      MEANING AND DEFAULT VALUE
+C
+C H0      RWORK(5)  The step size to be attempted on the first step.
+C                   The default value is determined by the solver.
+C
+C HMAX    RWORK(6)  The maximum absolute step size allowed.
+C                   The default value is infinite.
+C
+C HMIN    RWORK(7)  The minimum absolute step size allowed.
+C                   The default value is 0.  (This lower bound is not
+C                   enforced on the final step before reaching TCRIT
+C                   when ITASK = 4 or 5.)
+C
+C MAXORD  IWORK(5)  The maximum order to be allowed.  The default
+C                   value is 12 if METH = 1, and 5 if METH = 2.
+C                   If MAXORD exceeds the default value, it will
+C                   be reduced to the default value.
+C                   If MAXORD is changed during the problem, it may
+C                   cause the current order to be reduced.
+C
+C MXSTEP  IWORK(6)  Maximum number of (internally defined) steps
+C                   allowed during one CALL to the solver.
+C                   The default value is 500.
+C
+C MXHNIL  IWORK(7)  Maximum number of messages printed (per problem)
+C                   warning that T + H = T on a step (H = step size).
+C                   This must be positive to result in a non-default
+C                   value.  The default value is 10.
+C
+C-----------------------------------------------------------------------
+C Optional Output.
+C
+C As optional additional output from DVODE, the variables listed
+C below are quantities related to the performance of DVODE
+C which are available to the user.  These are communicated by way of
+C the work arrays, but also have internal mnemonic names as shown.
+C Except where stated otherwise, all of this output is defined
+C on any successful return from DVODE, and on any return with
+C ISTATE = -1, -2, -4, -5, or -6.  On an illegal input return
+C (ISTATE = -3), they will be unchanged from their existing values
+C (if any), except possibly for TOLSF, LENRW, and LENIW.
+C On any error return, output relevant to the error will be defined,
+C as noted below.
+C
+C NAME    LOCATION      MEANING
+C
+C HU      RWORK(11) The step size in t last used (successfully).
+C
+C HCUR    RWORK(12) The step size to be attempted on the next step.
+C
+C TCUR    RWORK(13) The current value of the independent variable
+C                   which the solver has actually reached, i.e. the
+C                   current internal mesh point in t.  In the output,
+C                   TCUR will always be at least as far from the
+C                   initial value of t as the current argument T,
+C                   but may be farther (if interpolation was done).
+C
+C TOLSF   RWORK(14) A tolerance scale factor, greater than 1.0,
+C                   computed when a request for too much accuracy was
+C                   detected (ISTATE = -3 if detected at the start of
+C                   the problem, ISTATE = -2 otherwise).  If ITOL is
+C                   left unaltered but RelTol and AbsTol are uniformly
+C                   scaled up by a factor of TOLSF for the next call,
+C                   then the solver is deemed likely to succeed.
+C                   (The user may also ignore TOLSF and alter the
+C                   tolerance parameters in any other way appropriate.)
+C
+C NST     IWORK(11) The number of steps taken for the problem so far.
+C
+C NFE     IWORK(12) The number of f evaluations for the problem so far.
+C
+C NJE     IWORK(13) The number of Jacobian evaluations so far.
+C
+C NQU     IWORK(14) The method order last used (successfully).
+C
+C NQCUR   IWORK(15) The order to be attempted on the next step.
+C
+C IMXER   IWORK(16) The index of the component of largest magnitude in
+C                   the weighted local error vector ( e(i)/EWT(i) ),
+C                   on an error return with ISTATE = -4 or -5.
+C
+C LENRW   IWORK(17) The length of RWORK actually required.
+C                   This is defined on normal returns and on an illegal
+C                   input return for insufficient storage.
+C
+C LENIW   IWORK(18) The length of IWORK actually required.
+C                   This is defined on normal returns and on an illegal
+C                   input return for insufficient storage.
+C
+C NLU     IWORK(19) The number of matrix LU decompositions so far.
+C
+C NNI     IWORK(20) The number of nonlinear (Newton) iterations so far.
+C
+C NCFN    IWORK(21) The number of convergence failures of the nonlinear
+C                   solver so far.
+C
+C NETF    IWORK(22) The number of error test failures of the integrator
+C                   so far.
+C
+C The following two arrays are segments of the RWORK array which
+C may also be of interest to the user as optional output.
+C For each array, the table below gives its internal name,
+C its base address in RWORK, and its description.
+C
+C NAME    BASE ADDRESS      DESCRIPTION
+C
+C YH      21             The Nordsieck history array, of size NYH by
+C                        (NQCUR + 1), where NYH is the initial value
+C                        of NEQ.  For j = 0,1,...,NQCUR, column j+1
+C                        of YH contains HCUR**j/factorial(j) times
+C                        the j-th derivative of the interpolating
+C                        polynomial currently representing the
+C                        solution, evaluated at t = TCUR.
+C
+C ACOR     LENRW-NEQ+1   Array of size NEQ used for the accumulated
+C                        corrections on each step, scaled in the output
+C                        to represent the estimated local error in Y
+C                        on the last step.  This is the vector e in
+C                        the description of the error control.  It is
+C                        defined only on a successful return from DVODE.
+C
+C-----------------------------------------------------------------------
+C Interrupting and Restarting
+C
+C If the integration of a given problem by DVODE is to be
+C interrupted and then later continued, such as when restarting
+C an interrupted run or alternating between two or more ODE problems,
+C the user should save, following the return from the last DVODE call
+C prior to the interruption, the contents of the CALL sequence
+C variables and internal COMMON blocks, and later restore these
+C values before the next DVODE CALL for that problem.  To save
+C and restore the COMMON blocks, use subroutine DVSRCO, as
+C described below in part ii.
+C
+C In addition, if non-default values for either LUN or MFLAG are
+C desired, an extra CALL to XSETUN and/or XSETF should be made just
+C before continuing the integration.  See Part ii below for details.
+C
+C-----------------------------------------------------------------------
+C Part ii.  Other Routines Callable.
+C
+C The following are optional calls which the user may make to
+C gain additional capabilities in conjunction with DVODE.
+C (The routines XSETUN and XSETF are designed to conform to the
+C SLATEC error handling package.)
+C
+C     FORM OF CALL                  FUNCTION
+C  CALL XSETUN(LUN)           Set the logical unit number, LUN, for
+C                             output of messages from DVODE, if
+C                             the default is not desired.
+C                             The default value of LUN is 6.
+C
+C  CALL XSETF(MFLAG)          Set a flag to control the printing of
+C                             messages by DVODE.
+C                             MFLAG = 0 means do not print. (Danger..
+C                             This risks losing valuable information.)
+C                             MFLAG = 1 means print (the default).
+C
+C                             Either of the above calls may be made at
+C                             any time and will take effect immediately.
+C
+C  CALL DVSRCO(RSAV,ISAV,JOB) Saves and restores the contents of
+C                             the internal COMMON blocks used by
+C                             DVODE. (See Part iii below.)
+C                             RSAV must be a real array of length 49
+C                             or more, and ISAV must be an integer
+C                             array of length 40 or more.
+C                             JOB=1 means save COMMON into RSAV/ISAV.
+C                             JOB=2 means restore COMMON from RSAV/ISAV.
+C                                DVSRCO is useful if one is
+C                             interrupting a run and restarting
+C                             later, or alternating between two or
+C                             more problems solved with DVODE.
+C
+C  CALL DVINDY(,,,,,)         Provide derivatives of y, of various
+C        (See below.)         orders, at a specified point T, if
+C                             desired.  It may be called only after
+C                             a successful return from DVODE.
+C
+C The detailed instructions for using DVINDY are as follows.
+C The form of the CALL is..
+C
+C  CALL DVINDY (T, K, RWORK(21), NYH, DKY, IFLAG)
+C
+C The input parameters are..
+C
+C T         = Value of independent variable where answers are desired
+C             (normally the same as the T last returned by DVODE).
+C             For valid results, T must lie between TCUR - HU and TCUR.
+C             (See optional output for TCUR and HU.)
+C K         = Integer order of the derivative desired.  K must satisfy
+C             0 .le. K .le. NQCUR, where NQCUR is the current order
+C             (see optional output).  The capability corresponding
+C             to K = 0, i.e. computing y(T), is already provided
+C             by DVODE directly.  Since NQCUR .ge. 1, the first
+C             derivative dy/dt is always available with DVINDY.
+C RWORK(21) = The base address of the history array YH.
+C NYH       = Column length of YH, equal to the initial value of NEQ.
+C
+C The output parameters are..
+C
+C DKY       = A real array of length NEQ containing the computed value
+C             of the K-th derivative of y(t).
+C IFLAG     = Integer flag, returned as 0 if K and T were legal,
+C             -1 if K was illegal, and -2 if T was illegal.
+C             On an error return, a message is also written.
+C-----------------------------------------------------------------------
+C Part iii.  COMMON Blocks.
+C If DVODE is to be used in an overlay situation, the user
+C must declare, in the primary overlay, the variables in..
+C   (1) the CALL sequence to DVODE,
+C   (2) the two internal COMMON blocks
+C         /DVOD01/  of length  81  (48 KPP_REAL words
+C                         followed by 33 integer words),
+C         /DVOD02/  of length  9  (1 KPP_REAL word
+C                         followed by 8 integer words),
+C
+C If DVODE is used on a system in which the contents of internal
+C COMMON blocks are not preserved between calls, the user should
+C declare the above two COMMON blocks in his main program to insure
+C that their contents are preserved.
+C
+C-----------------------------------------------------------------------
+C Part iv.  Optionally Replaceable Solver Routines.
+C
+C Below are descriptions of two routines in the DVODE package which
+C relate to the measurement of errors.  Either routine can be
+C replaced by a user-supplied version, if desired.  However, since such
+C a replacement may have a major impact on performance, it should be
+C done only when absolutely necessary, and only with great caution.
+C (Note.. The means by which the package version of a routine is
+C superseded by the user's version may be system-dependent.)
+C
+C (a) DEWSET.
+C The following subroutine is called just before each internal
+C integration step, and sets the array of error weights, EWT, as
+C described under ITOL/RelTol/AbsTol above..
+C     SUBROUTINE DEWSET (NEQ, ITOL, RelTol, AbsTol, YCUR, EWT)
+C where NEQ, ITOL, RelTol, and AbsTol are as in the DVODE CALL sequence,
+C YCUR contains the current dependent variable vector, and
+C EWT is the array of weights set by DEWSET.
+C
+C If the user supplies this subroutine, it must return in EWT(i)
+C (i = 1,...,NEQ) a positive quantity suitable for comparison with
+C errors in Y(i).  The EWT array returned by DEWSET is passed to the
+C DVNORM routine (See below.), and also used by DVODE in the computation
+C of the optional output IMXER, the diagonal Jacobian approximation,
+C and the increments for difference quotient Jacobians.
+C
+C In the user-supplied version of DEWSET, it may be desirable to use
+C the current values of derivatives of y.  Derivatives up to order NQ
+C are available from the history array YH, described above under
+C Optional Output.  In DEWSET, YH is identical to the YCUR array,
+C extended to NQ + 1 columns with a column length of NYH and scale
+C factors of h**j/factorial(j).  On the first CALL for the problem,
+C given by NST = 0, NQ is 1 and H is temporarily set to 1.0.
+C NYH is the initial value of NEQ.  The quantities NQ, H, and NST
+C can be obtained by including in DEWSET the statements..
+C     KPP_REAL RVOD, H, HU
+C     COMMON /DVOD01/ RVOD(48), IVOD(33)
+C     COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C     NQ = IVOD(28)
+C     H = RVOD(21)
+C Thus, for example, the current value of dy/dt can be obtained as
+C YCUR(NYH+i)/H  (i=1,...,NEQ)  (and the division by H is
+C unnecessary when NST = 0).
+C
+C (b) DVNORM.
+C The following is a real function routine which computes the weighted
+C root-mean-square norm of a vector v..
+C     D = DVNORM (N, V, W)
+C where..
+C   N = the length of the vector,
+C   V = real array of length N containing the vector,
+C   W = real array of length N containing weights,
+C   D = sqrt( (1/N) * sum(V(i)*W(i))**2 ).
+C DVNORM is called with N = NEQ and with W(i) = 1.0/EWT(i), where
+C EWT is as set by subroutine DEWSET.
+C
+C If the user supplies this function, it should return a non-negative
+C value of DVNORM suitable for use in the error control in DVODE.
+C None of the arguments should be altered by DVNORM.
+C For example, a user-supplied DVNORM routine might..
+C   -substitute a max-norm of (V(i)*W(i)) for the rms-norm, or
+C   -ignore some components of V in the norm, with the effect of
+C    suppressing the error control on those components of Y.
+C-----------------------------------------------------------------------
+C Other Routines in the DVODE Package.
+C
+C In addition to subroutine DVODE, the DVODE package includes the
+C following subroutines and function routines..
+C  DVHIN     computes an approximate step size for the initial step.
+C  DVINDY    computes an interpolated value of the y vector at t = TOUT.
+C  DVSTEP    is the core integrator, which does one step of the
+C            integration and the associated error control.
+C  DVSET     sets all method coefficients and test constants.
+C  DVNLSD    solves the underlying nonlinear system -- the corrector.
+C  DVJAC     computes and preprocesses the Jacobian matrix J = df/dy
+C            and the Newton iteration matrix P = I - (h/l1)*J.
+C  DVSOL     manages solution of linear system in chord iteration.
+C  DVJUST    adjusts the history array on a change of order.
+C  DEWSET    sets the error weight vector EWT before each step.
+C  DVNORM    computes the weighted r.m.s. norm of a vector.
+C  DVSRCO    is a user-callable routines to save and restore
+C            the contents of the internal COMMON blocks.
+C  DACOPY    is a routine to copy one two-dimensional array to another.
+C  DGEFA and DGESL   are routines from LINPACK for solving full
+C            systems of linear algebraic equations.
+C  DGBFA and DGBSL   are routines from LINPACK for solving banded
+C            linear systems.
+C  DAXPY, DSCAL, and DCOPY are basic linear algebra modules (BLAS).
+C  D1MACH    sets the unit roundoff of the machine.
+C  XERRWD, XSETUN, XSETF, LUNSAV, and MFLGSV handle the printing of all
+C            error messages and warnings.  XERRWD is machine-dependent.
+C Note..  DVNORM, D1MACH, LUNSAV, and MFLGSV are function routines.
+C All the others are subroutines.
+C
+C The intrinsic and external routines used by the DVODE package are..
+C ABS, MAX, MIN, REAL, SIGN, SQRT, and WRITE.
+C
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      EXTERNAL DVNLSD, F, JAC
+      LOGICAL IHIT
+      KPP_REAL AbsTolI, BIG, EWTI, FOUR, H0, HMAX, HMX, HUN, ONE,
+     1   PT2, RH, RelTolI, SIZE, TCRIT, TNEXT, TOLSF, TP, TWO, ZERO
+      INTEGER I, IER, IFLAG, IMXER, JCO, KGO, LENIW, LENJ, LENP, LENRW,
+     1   LENWM, LF0, MBAND, ML, MORD, MU, MXHNL0, MXSTP0, NITER, NSLAST
+      CHARACTER*80 MSG
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL D1MACH, DVNORM
+C
+      DIMENSION MORD(2)
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to DVODE.
+C-----------------------------------------------------------------------
+      SAVE MORD, MXHNL0, MXSTP0
+      SAVE ZERO, ONE, TWO, FOUR, PT2, HUN
+C-----------------------------------------------------------------------
+C The following internal COMMON blocks contain variables which are
+C communicated between subroutines in the DVODE package, or which are
+C to be saved between calls to DVODE.
+C In each block, real variables precede integers.
+C The block /DVOD01/ appears in subroutines DVODE, DVINDY, DVSTEP,
+C DVSET, DVNLSD, DVJAC, DVSOL, DVJUST and DVSRCO.
+C The block /DVOD02/ appears in subroutines DVODE, DVINDY, DVSTEP,
+C DVNLSD, DVJAC, and DVSRCO.
+C
+C The variables stored in the internal COMMON blocks are as follows..
+C
+C ACNRM  = Weighted r.m.s. norm of accumulated correction vectors.
+C CCMXJ  = Threshhold on DRC for updating the Jacobian. (See DRC.)
+C CONP   = The saved value of TQ(5).
+C CRATE  = Estimated corrector convergence rate constant.
+C DRC    = Relative change in H*RL1 since last DVJAC call.
+C EL     = Real array of integration coefficients.  See DVSET.
+C ETA    = Saved tentative ratio of new to old H.
+C ETAMAX = Saved maximum value of ETA to be allowed.
+C H      = The step size.
+C HMIN   = The minimum absolute value of the step size H to be used.
+C HMXI   = Inverse of the maximum absolute value of H to be used.
+C          HMXI = 0.0 is allowed and corresponds to an infinite HMAX.
+C HNEW   = The step size to be attempted on the next step.
+C HSCAL  = Stepsize in scaling of YH array.
+C PRL1   = The saved value of RL1.
+C RC     = Ratio of current H*RL1 to value on last DVJAC call.
+C RL1    = The reciprocal of the coefficient EL(1).
+C TAU    = Real vector of past NQ step sizes, length 13.
+C TQ     = A real vector of length 5 in which DVSET stores constants
+C          used for the convergence test, the error test, and the
+C          selection of H at a new order.
+C TN     = The independent variable, updated on each step taken.
+C UROUND = The machine unit roundoff.  The smallest positive real number
+C          such that  1.0 + UROUND .ne. 1.0
+C ICF    = Integer flag for convergence failure in DVNLSD..
+C            0 means no failures.
+C            1 means convergence failure with out of date Jacobian
+C                   (recoverable error).
+C            2 means convergence failure with current Jacobian or
+C                   singular matrix (unrecoverable error).
+C INIT   = Saved integer flag indicating whether initialization of the
+C          problem has been done (INIT = 1) or not.
+C IPUP   = Saved flag to signal updating of Newton matrix.
+C JCUR   = Output flag from DVJAC showing Jacobian status..
+C            JCUR = 0 means J is not current.
+C            JCUR = 1 means J is current.
+C JSTART = Integer flag used as input to DVSTEP..
+C            0  means perform the first step.
+C            1  means take a new step continuing from the last.
+C            -1 means take the next step with a new value of MAXORD,
+C                  HMIN, HMXI, N, METH, MITER, and/or matrix parameters.
+C          On return, DVSTEP sets JSTART = 1.
+C JSV    = Integer flag for Jacobian saving, = sign(MF).
+C KFLAG  = A completion code from DVSTEP with the following meanings..
+C               0      the step was succesful.
+C              -1      the requested error could not be achieved.
+C              -2      corrector convergence could not be achieved.
+C              -3, -4  fatal error in VNLS (can not occur here).
+C KUTH   = Input flag to DVSTEP showing whether H was reduced by the
+C          driver.  KUTH = 1 if H was reduced, = 0 otherwise.
+C L      = Integer variable, NQ + 1, current order plus one.
+C LMAX   = MAXORD + 1 (used for dimensioning).
+C LOCJS  = A pointer to the saved Jacobian, whose storage starts at
+C          WM(LOCJS), if JSV = 1.
+C LYH, LEWT, LACOR, LSAVF, LWM, LIWM = Saved integer pointers
+C          to segments of RWORK and IWORK.
+C MAXORD = The maximum order of integration method to be allowed.
+C METH/MITER = The method flags.  See MF.
+C MSBJ   = The maximum number of steps between J evaluations, = 50.
+C MXHNIL = Saved value of optional input MXHNIL.
+C MXSTEP = Saved value of optional input MXSTEP.
+C N      = The number of first-order ODEs, = NEQ.
+C NEWH   = Saved integer to flag change of H.
+C NEWQ   = The method order to be used on the next step.
+C NHNIL  = Saved counter for occurrences of T + H = T.
+C NQ     = Integer variable, the current integration method order.
+C NQNYH  = Saved value of NQ*NYH.
+C NQWAIT = A counter controlling the frequency of order changes.
+C          An order change is about to be considered if NQWAIT = 1.
+C NSLJ   = The number of steps taken as of the last Jacobian update.
+C NSLP   = Saved value of NST as of last Newton matrix update.
+C NYH    = Saved value of the initial value of NEQ.
+C HU     = The step size in t last used.
+C NCFN   = Number of nonlinear convergence failures so far.
+C NETF   = The number of error test failures of the integrator so far.
+C NFE    = The number of f evaluations for the problem so far.
+C NJE    = The number of Jacobian evaluations so far.
+C NLU    = The number of matrix LU decompositions so far.
+C NNI    = Number of nonlinear iterations so far.
+C NQU    = The method order last used.
+C NST    = The number of steps taken for the problem so far.
+C-----------------------------------------------------------------------
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+
+      DATA  MORD(1) /12/, MORD(2) /5/, MXSTP0 /500/, MXHNL0 /10/
+      DATA ZERO /0.0D0/, ONE /1.0D0/, TWO /2.0D0/, FOUR /4.0D0/,
+     1     PT2 /0.2D0/, HUN /100.0D0/
+C-----------------------------------------------------------------------
+C Block A.
+C This code block is executed on every call.
+C It tests ISTATE and ITASK for legality and branches appropriately.
+C If ISTATE .gt. 1 but the flag INIT shows that initialization has
+C not yet been done, an error return occurs.
+C If ISTATE = 1 and TOUT = T, return immediately.
+C-----------------------------------------------------------------------
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602
+      IF (ISTATE .EQ. 1) GO TO 10
+      IF (INIT .NE. 1) GO TO 603
+      IF (ISTATE .EQ. 2) GO TO 200
+      GO TO 20
+ 10   INIT = 0
+      IF (TOUT .EQ. T) RETURN
+C-----------------------------------------------------------------------
+C Block B.
+C The next code block is executed for the initial CALL (ISTATE = 1),
+C or for a continuation CALL with parameter changes (ISTATE = 3).
+C It contains checking of all input and various initializations.
+C
+C First check legality of the non-optional input NEQ, ITOL, IOPT,
+C MF, ML, and MU.
+C-----------------------------------------------------------------------
+ 20   IF (NEQ .LE. 0) GO TO 604
+      IF (ISTATE .EQ. 1) GO TO 25
+      IF (NEQ .GT. N) GO TO 605
+ 25   N = NEQ
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606
+      IF (IOPT .LT. 0 .OR. IOPT .GT. 1) GO TO 607
+      JSV = SIGN(1,MF)
+      MF = ABS(MF)
+      METH = MF/10
+      MITER = MF - 10*METH
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608
+      IF (MITER .LE. 3) GO TO 30
+      ML = IWORK(1)
+      MU = IWORK(2)
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610
+ 30   CONTINUE
+C Next process and check the optional input. ---------------------------
+      IF (IOPT .EQ. 1) GO TO 40
+      MAXORD = MORD(METH)
+      MXSTEP = MXSTP0
+      MXHNIL = MXHNL0
+      IF (ISTATE .EQ. 1) H0 = ZERO
+      HMXI = ZERO
+      HMIN = ZERO
+      GO TO 60
+ 40   MAXORD = IWORK(5)
+      IF (MAXORD .LT. 0) GO TO 611
+      IF (MAXORD .EQ. 0) MAXORD = 100
+      MAXORD = MIN(MAXORD,MORD(METH))
+      MXSTEP = IWORK(6)
+      IF (MXSTEP .LT. 0) GO TO 612
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0
+      MXHNIL = IWORK(7)
+      IF (MXHNIL .LT. 0) GO TO 613
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0
+      IF (ISTATE .NE. 1) GO TO 50
+      H0 = RWORK(5)
+      IF ((TOUT - T)*H0 .LT. ZERO) GO TO 614
+ 50   HMAX = RWORK(6)
+      IF (HMAX .LT. ZERO) GO TO 615
+      HMXI = ZERO
+      IF (HMAX .GT. ZERO) HMXI = ONE/HMAX
+      HMIN = RWORK(7)
+      IF (HMIN .LT. ZERO) GO TO 616
+C-----------------------------------------------------------------------
+C Set work array pointers and check lengths LRW and LIW.
+C Pointers to segments of RWORK and IWORK are named by prefixing L to
+C the name of the segment.  E.g., the segment YH starts at RWORK(LYH).
+C Segments of RWORK (in order) are denoted  YH, WM, EWT, SAVF, ACOR.
+C Within WM, LOCJS is the location of the saved Jacobian (JSV .gt. 0).
+C-----------------------------------------------------------------------
+ 60   LYH = 21
+      IF (ISTATE .EQ. 1) NYH = N
+      LWM = LYH + (MAXORD + 1)*NYH
+      JCO = MAX(0,JSV)
+      IF (MITER .EQ. 0) LENWM = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) THEN
+        LENWM = 2 + (1 + JCO)*N*N
+        LOCJS = N*N + 3
+      ENDIF
+      IF (MITER .EQ. 3) LENWM = 2 + N
+      IF (MITER .EQ. 4 .OR. MITER .EQ. 5) THEN
+        MBAND = ML + MU + 1
+        LENP = (MBAND + ML)*N
+        LENJ = MBAND*N
+        LENWM = 2 + LENP + JCO*LENJ
+        LOCJS = LENP + 3
+        ENDIF
+      LEWT = LWM + LENWM
+      LSAVF = LEWT + N
+      LACOR = LSAVF + N
+      LENRW = LACOR + N - 1
+      IWORK(17) = LENRW
+      LIWM = 1
+      LENIW = 30 + N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 30
+      IWORK(18) = LENIW
+      IF (LENRW .GT. LRW) GO TO 617
+      IF (LENIW .GT. LIW) GO TO 618
+C Check RelTol and AbsTol for legality. ------------------------------------
+      RelTolI = RelTol(1)
+      AbsTolI = AbsTol(1)
+      DO 70 I = 1,N
+        IF (ITOL .GE. 3) RelTolI = RelTol(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I)
+        IF (RelTolI .LT. ZERO) GO TO 619
+        IF (AbsTolI .LT. ZERO) GO TO 620
+ 70     CONTINUE
+      IF (ISTATE .EQ. 1) GO TO 100
+C If ISTATE = 3, set flag to signal parameter changes to DVSTEP. -------
+      JSTART = -1
+      IF (NQ .LE. MAXORD) GO TO 90
+C MAXORD was reduced below NQ.  Copy YH(*,MAXORD+2) into SAVF. ---------
+      CALL DCOPY (N, RWORK(LWM), 1, RWORK(LSAVF), 1)
+C Reload WM(1) = RWORK(LWM), since LWM may have changed. ---------------
+ 90   IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+C-----------------------------------------------------------------------
+C Block C.
+C The next block is for the initial CALL only (ISTATE = 1).
+C It contains all remaining initializations, the initial CALL to F,
+C and the calculation of the initial step size.
+C The error weights in EWT are inverted after being loaded.
+C-----------------------------------------------------------------------
+ 100  UROUND = D1MACH(4)
+      TN = T
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 110
+      TCRIT = RWORK(1)
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. ZERO) GO TO 625
+      IF (H0 .NE. ZERO .AND. (T + H0 - TCRIT)*H0 .GT. ZERO)
+     1   H0 = TCRIT - T
+ 110  JSTART = 0
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      CCMXJ = PT2
+      MSBJ = 50
+      NHNIL = 0
+      NST = 0
+      NJE = 0
+      NNI = 0
+      NCFN = 0
+      NETF = 0
+      NLU = 0
+      NSLJ = 0
+      NSLAST = 0
+      HU = ZERO
+      NQU = 0
+C Initial CALL to F.  (LF0 points to YH(*,2).) -------------------------
+      LF0 = LYH + NYH
+      CALL F (N, T, Y, RWORK(LF0))
+      NFE = 1
+C Load the initial value vector in YH. ---------------------------------
+      CALL DCOPY (N, Y, 1, RWORK(LYH), 1)
+C Load and invert the EWT array.  (H is temporarily set to 1.0.) -------
+      NQ = 1
+      H = ONE
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT))
+      DO 120 I = 1,N
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 621
+ 120    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+      IF (H0 .NE. ZERO) GO TO 180
+C Call DVHIN to set initial step size H0 to be attempted. --------------
+      CALL DVHIN (N, T, RWORK(LYH), RWORK(LF0), F, RPAR, IPAR, TOUT,
+     1   UROUND, RWORK(LEWT), ITOL, AbsTol, Y, RWORK(LACOR), H0,
+     2   NITER, IER)
+      NFE = NFE + NITER
+      IF (IER .NE. 0) GO TO 622
+C Adjust H0 if necessary to meet HMAX bound. ---------------------------
+ 180  RH = ABS(H0)*HMXI
+      IF (RH .GT. ONE) H0 = H0/RH
+C Load H with H0 and scale YH(*,2) by H0. ------------------------------
+      H = H0
+      CALL DSCAL (N, H0, RWORK(LF0), 1)
+      GO TO 270
+C-----------------------------------------------------------------------
+C Block D.
+C The next code block is for continuation calls only (ISTATE = 2 or 3)
+C and is to check stop conditions before taking a step.
+C-----------------------------------------------------------------------
+ 200  NSLAST = NST
+      KUTH = 0
+      GO TO (210, 250, 220, 230, 240), ITASK
+ 210  IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 220  TP = TN - HU*(ONE + HUN*UROUND)
+      IF ((TP - TOUT)*H .GT. ZERO) GO TO 623
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      GO TO 400
+ 230  TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+      IF ((TCRIT - TOUT)*H .LT. ZERO) GO TO 625
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 245
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 240  TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+ 245  HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. HUN*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + HNEW*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      KUTH = 1
+C-----------------------------------------------------------------------
+C Block E.
+C The next block is normally executed for all calls and contains
+C the CALL to the one-step core integrator DVSTEP.
+C
+C This is a looping point for the integration steps.
+C
+C First check for too many steps being taken, update EWT (if not at
+C start of problem), check for too much accuracy being requested, and
+C check for H below the roundoff level in T.
+C-----------------------------------------------------------------------
+ 250  CONTINUE
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT))
+      DO 260 I = 1,N
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 510
+ 260    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+ 270  TOLSF = UROUND*DVNORM (N, RWORK(LYH), RWORK(LEWT))
+      IF (TOLSF .LE. ONE) GO TO 280
+      TOLSF = TOLSF*TWO
+      IF (NST .EQ. 0) GO TO 626
+      GO TO 520
+ 280  IF ((TN + H) .NE. TN) GO TO 290
+      NHNIL = NHNIL + 1
+      IF (NHNIL .GT. MXHNIL) GO TO 290
+      MSG = 'DVODE--  Warning..internal T (=R1) and H (=R2) are'
+      CALL XERRWD (MSG, 50, 101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG='      such that in the machine, T + H = T on the next step  '
+      CALL XERRWD (MSG, 60, 101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      (H = step size). solver will continue anyway'
+      CALL XERRWD (MSG, 50, 101, 1, 0, 0, 0, 2, TN, H)
+      IF (NHNIL .LT. MXHNIL) GO TO 290
+      MSG = 'DVODE--  Above warning has been issued I1 times.  '
+      CALL XERRWD (MSG, 50, 102, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      it will not be issued again for this problem'
+      CALL XERRWD (MSG, 50, 102, 1, 1, MXHNIL, 0, 0, ZERO, ZERO)
+ 290  CONTINUE
+C-----------------------------------------------------------------------
+C CALL DVSTEP (Y, YH, NYH, YH, EWT, SAVF, VSAV, ACOR,
+C              WM, IWM, F, JAC, F, DVNLSD, RPAR, IPAR)
+C-----------------------------------------------------------------------
+      CALL DVSTEP (Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LEWT),
+     1   RWORK(LSAVF), Y, RWORK(LACOR), RWORK(LWM), IWORK(LIWM),
+     2   F, JAC, F, DVNLSD, RPAR, IPAR)
+      KGO = 1 - KFLAG
+C Branch on KFLAG.  Note..In this version, KFLAG can not be set to -3.
+C  KFLAG .eq. 0,   -1,  -2
+      GO TO (300, 530, 540), KGO
+C-----------------------------------------------------------------------
+C Block F.
+C The following block handles the case of a successful return from the
+C core integrator (KFLAG = 0).  Test for stop conditions.
+C-----------------------------------------------------------------------
+ 300  INIT = 1
+      KUTH = 0
+      GO TO (310, 400, 330, 340, 350), ITASK
+C ITASK = 1.  If TOUT has been reached, interpolate. -------------------
+ 310  IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+C ITASK = 3.  Jump to exit if TOUT was reached. ------------------------
+ 330  IF ((TN - TOUT)*H .GE. ZERO) GO TO 400
+      GO TO 250
+C ITASK = 4.  See if TOUT or TCRIT was reached.  Adjust H if necessary.
+ 340  IF ((TN - TOUT)*H .LT. ZERO) GO TO 345
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+ 345  HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. HUN*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + HNEW*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      KUTH = 1
+      GO TO 250
+C ITASK = 5.  See if TCRIT was reached and jump to exit. ---------------
+ 350  HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. HUN*UROUND*HMX
+C-----------------------------------------------------------------------
+C Block G.
+C The following block handles all successful returns from DVODE.
+C If ITASK .ne. 1, Y is loaded from YH and T is set accordingly.
+C ISTATE is set to 2, and the optional output is loaded into the work
+C arrays before returning.
+C-----------------------------------------------------------------------
+ 400  CONTINUE
+      CALL DCOPY (N, RWORK(LYH), 1, Y, 1)
+      T = TN
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420
+      IF (IHIT) T = TCRIT
+ 420  ISTATE = 2
+      RWORK(11) = HU
+      RWORK(12) = HNEW
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NEWQ
+      IWORK(19) = NLU
+      IWORK(20) = NNI
+      IWORK(21) = NCFN
+      IWORK(22) = NETF
+      RETURN
+C-----------------------------------------------------------------------
+C Block H.
+C The following block handles all unsuccessful returns other than
+C those for illegal input.  First the error message routine is called.
+C if there was an error test or convergence test failure, IMXER is set.
+C Then Y is loaded from YH, T is set to TN, and the illegal input
+C The optional output is loaded into the work arrays before returning.
+C-----------------------------------------------------------------------
+C The maximum number of steps was taken before reaching TOUT. ----------
+ 500  MSG = 'DVODE--  At current T (=R1), MXSTEP (=I1) steps   '
+      CALL XERRWD (MSG, 50, 201, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      taken on this CALL before reaching TOUT     '
+      CALL XERRWD (MSG, 50, 201, 1, 1, MXSTEP, 0, 1, TN, ZERO)
+      ISTATE = -1
+      GO TO 580
+C EWT(i) .le. 0.0 for some i (not at start of problem). ----------------
+ 510  EWTI = RWORK(LEWT+I-1)
+      MSG = 'DVODE--  At T (=R1), EWT(I1) has become R2 .le. 0.'
+      CALL XERRWD (MSG, 50, 202, 1, 1, I, 0, 2, TN, EWTI)
+      ISTATE = -6
+      GO TO 580
+C Too much accuracy requested for machine precision. -------------------
+ 520  MSG = 'DVODE--  At T (=R1), too much accuracy requested  '
+      CALL XERRWD (MSG, 50, 203, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      for precision of machine..  see TOLSF (=R2) '
+      CALL XERRWD (MSG, 50, 203, 1, 0, 0, 0, 2, TN, TOLSF)
+      RWORK(14) = TOLSF
+      ISTATE = -2
+      GO TO 580
+C KFLAG = -1.  Error test failed repeatedly or with ABS(H) = HMIN. -----
+ 530  MSG = 'DVODE--  At T(=R1) and step size H(=R2), the error'
+      CALL XERRWD (MSG, 50, 204, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      test failed repeatedly or with abs(H) = HMIN'
+      CALL XERRWD (MSG, 50, 204, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -4
+      GO TO 560
+C KFLAG = -2.  Convergence failed repeatedly or with abs(H) = HMIN. ----
+ 540  MSG = 'DVODE--  At T (=R1) and step size H (=R2), the    '
+      CALL XERRWD (MSG, 50, 205, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      corrector convergence failed repeatedly     '
+      CALL XERRWD (MSG, 50, 205, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      or with abs(H) = HMIN   '
+      CALL XERRWD (MSG, 30, 205, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -5
+C Compute IMXER if relevant. -------------------------------------------
+ 560  BIG = ZERO
+      IMXER = 1
+      DO 570 I = 1,N
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1))
+        IF (BIG .GE. SIZE) GO TO 570
+        BIG = SIZE
+        IMXER = I
+ 570    CONTINUE
+      IWORK(16) = IMXER
+C Set Y vector, T, and optional output. --------------------------------
+ 580  CONTINUE
+      CALL DCOPY (N, RWORK(LYH), 1, Y, 1)
+      T = TN
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IWORK(19) = NLU
+      IWORK(20) = NNI
+      IWORK(21) = NCFN
+      IWORK(22) = NETF
+      RETURN
+C-----------------------------------------------------------------------
+C Block I.
+C The following block handles all error returns due to illegal input
+C (ISTATE = -3), as detected before calling the core integrator.
+C First the error message routine is called.   If the illegal input
+C is a negative ISTATE, the run is aborted (apparent infinite loop).
+C-----------------------------------------------------------------------
+ 601  MSG = 'DVODE--  ISTATE (=I1) illegal '
+      CALL XERRWD (MSG, 30, 1, 1, 1, ISTATE, 0, 0, ZERO, ZERO)
+      IF (ISTATE .LT. 0) GO TO 800
+      GO TO 700
+ 602  MSG = 'DVODE--  ITASK (=I1) illegal  '
+      CALL XERRWD (MSG, 30, 2, 1, 1, ITASK, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 603  MSG='DVODE--  ISTATE (=I1) .gt. 1 but DVODE not initialized      '
+      CALL XERRWD (MSG, 60, 3, 1, 1, ISTATE, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 604  MSG = 'DVODE--  NEQ (=I1) .lt. 1     '
+      CALL XERRWD (MSG, 30, 4, 1, 1, NEQ, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 605  MSG = 'DVODE--  ISTATE = 3 and NEQ increased (I1 to I2)  '
+      CALL XERRWD (MSG, 50, 5, 1, 2, N, NEQ, 0, ZERO, ZERO)
+      GO TO 700
+ 606  MSG = 'DVODE--  ITOL (=I1) illegal   '
+      CALL XERRWD (MSG, 30, 6, 1, 1, ITOL, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 607  MSG = 'DVODE--  IOPT (=I1) illegal   '
+      CALL XERRWD (MSG, 30, 7, 1, 1, IOPT, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 608  MSG = 'DVODE--  MF (=I1) illegal     '
+      CALL XERRWD (MSG, 30, 8, 1, 1, MF, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 609  MSG = 'DVODE--  ML (=I1) illegal.. .lt.0 or .ge.NEQ (=I2)'
+      CALL XERRWD (MSG, 50, 9, 1, 2, ML, NEQ, 0, ZERO, ZERO)
+      GO TO 700
+ 610  MSG = 'DVODE--  MU (=I1) illegal.. .lt.0 or .ge.NEQ (=I2)'
+      CALL XERRWD (MSG, 50, 10, 1, 2, MU, NEQ, 0, ZERO, ZERO)
+      GO TO 700
+ 611  MSG = 'DVODE--  MAXORD (=I1) .lt. 0  '
+      CALL XERRWD (MSG, 30, 11, 1, 1, MAXORD, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 612  MSG = 'DVODE--  MXSTEP (=I1) .lt. 0  '
+      CALL XERRWD (MSG, 30, 12, 1, 1, MXSTEP, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 613  MSG = 'DVODE--  MXHNIL (=I1) .lt. 0  '
+      CALL XERRWD (MSG, 30, 13, 1, 1, MXHNIL, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 614  MSG = 'DVODE--  TOUT (=R1) behind T (=R2)      '
+      CALL XERRWD (MSG, 40, 14, 1, 0, 0, 0, 2, TOUT, T)
+      MSG = '      integration direction is given by H0 (=R1)  '
+      CALL XERRWD (MSG, 50, 14, 1, 0, 0, 0, 1, H0, ZERO)
+      GO TO 700
+ 615  MSG = 'DVODE--  HMAX (=R1) .lt. 0.0  '
+      CALL XERRWD (MSG, 30, 15, 1, 0, 0, 0, 1, HMAX, ZERO)
+      GO TO 700
+ 616  MSG = 'DVODE--  HMIN (=R1) .lt. 0.0  '
+      CALL XERRWD (MSG, 30, 16, 1, 0, 0, 0, 1, HMIN, ZERO)
+      GO TO 700
+ 617  CONTINUE
+      MSG='DVODE--  RWORK length needed, LENRW (=I1), exceeds LRW (=I2)'
+      CALL XERRWD (MSG, 60, 17, 1, 2, LENRW, LRW, 0, ZERO, ZERO)
+      GO TO 700
+ 618  CONTINUE
+      MSG='DVODE--  IWORK length needed, LENIW (=I1), exceeds LIW (=I2)'
+      CALL XERRWD (MSG, 60, 18, 1, 2, LENIW, LIW, 0, ZERO, ZERO)
+      GO TO 700
+ 619  MSG = 'DVODE--  RelTol(I1) is R1 .lt. 0.0        '
+      CALL XERRWD (MSG, 40, 19, 1, 1, I, 0, 1, RelTolI, ZERO)
+      GO TO 700
+ 620  MSG = 'DVODE--  AbsTol(I1) is R1 .lt. 0.0        '
+      CALL XERRWD (MSG, 40, 20, 1, 1, I, 0, 1, AbsTolI, ZERO)
+      GO TO 700
+ 621  EWTI = RWORK(LEWT+I-1)
+      MSG = 'DVODE--  EWT(I1) is R1 .le. 0.0         '
+      CALL XERRWD (MSG, 40, 21, 1, 1, I, 0, 1, EWTI, ZERO)
+      GO TO 700
+ 622  CONTINUE
+      MSG='DVODE--  TOUT (=R1) too close to T(=R2) to start integration'
+      CALL XERRWD (MSG, 60, 22, 1, 0, 0, 0, 2, TOUT, T)
+      GO TO 700
+ 623  CONTINUE
+      MSG='DVODE--  ITASK = I1 and TOUT (=R1) behind TCUR - HU (= R2)  '
+      CALL XERRWD (MSG, 60, 23, 1, 1, ITASK, 0, 2, TOUT, TP)
+      GO TO 700
+ 624  CONTINUE
+      MSG='DVODE--  ITASK = 4 or 5 and TCRIT (=R1) behind TCUR (=R2)   '
+      CALL XERRWD (MSG, 60, 24, 1, 0, 0, 0, 2, TCRIT, TN)
+      GO TO 700
+ 625  CONTINUE
+      MSG='DVODE--  ITASK = 4 or 5 and TCRIT (=R1) behind TOUT (=R2)   '
+      CALL XERRWD (MSG, 60, 25, 1, 0, 0, 0, 2, TCRIT, TOUT)
+      GO TO 700
+ 626  MSG = 'DVODE--  At start of problem, too much accuracy   '
+      CALL XERRWD (MSG, 50, 26, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG='      requested for precision of machine..  see TOLSF (=R1) '
+      CALL XERRWD (MSG, 60, 26, 1, 0, 0, 0, 1, TOLSF, ZERO)
+      RWORK(14) = TOLSF
+      GO TO 700
+ 627  MSG='DVODE--  Trouble from DVINDY.  ITASK = I1, TOUT = R1.       '
+      CALL XERRWD (MSG, 60, 27, 1, 1, ITASK, 0, 1, TOUT, ZERO)
+C
+ 700  CONTINUE
+      ISTATE = -3
+      RETURN
+C
+ 800  MSG = 'DVODE--  Run aborted.. apparent infinite loop     '
+      CALL XERRWD (MSG, 50, 303, 2, 0, 0, 0, 0, ZERO, ZERO)
+      RETURN
+C----------------------- End of Subroutine DVODE -----------------------
+      END
+*DECK DVHIN
+      SUBROUTINE DVHIN (N, T0, Y0, YDOT, F, RPAR, IPAR, TOUT, UROUND,
+     1   EWT, ITOL, AbsTol, Y, TEMP, H0, NITER, IER)
+      EXTERNAL F
+      KPP_REAL T0, Y0, YDOT, RPAR, TOUT, UROUND, EWT, AbsTol, Y,
+     1   TEMP, H0
+      INTEGER N, IPAR, ITOL, NITER, IER
+      DIMENSION Y0(*), YDOT(*), EWT(*), AbsTol(*), Y(*),
+     1   TEMP(*), RPAR(*), IPAR(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- N, T0, Y0, YDOT, F, RPAR, IPAR, TOUT, UROUND,
+C                        EWT, ITOL, AbsTol, Y, TEMP
+C Call sequence output -- H0, NITER, IER
+C COMMON block variables accessed -- None
+C
+C Subroutines called by DVHIN.. F
+C Function routines called by DVHIN.. DVNORM
+C-----------------------------------------------------------------------
+C This routine computes the step size, H0, to be attempted on the
+C first step, when the user has not supplied a value for this.
+C
+C First we check that TOUT - T0 differs significantly from zero.  Then
+C an iteration is done to approximate the initial second derivative
+C and this is used to define h from w.r.m.s.norm(h**2 * yddot / 2) = 1.
+C A bias factor of 1/2 is applied to the resulting h.
+C The sign of H0 is inferred from the initial values of TOUT and T0.
+C
+C Communication with DVHIN is done with the following variables..
+C
+C N      = Size of ODE system, input.
+C T0     = Initial value of independent variable, input.
+C Y0     = Vector of initial conditions, input.
+C YDOT   = Vector of initial first derivatives, input.
+C F      = Name of subroutine for right-hand side f(t,y), input.
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C TOUT   = First output value of independent variable
+C UROUND = Machine unit roundoff
+C EWT, ITOL, AbsTol = Error weights and tolerance parameters
+C                   as described in the driver routine, input.
+C Y, TEMP = Work arrays of length N.
+C H0     = Step size to be attempted, output.
+C NITER  = Number of iterations (and of f evaluations) to compute H0,
+C          output.
+C IER    = The error flag, returned with the value
+C          IER = 0  if no trouble occurred, or
+C          IER = -1 if TOUT and T0 are considered too close to proceed.
+C-----------------------------------------------------------------------
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL AFI, AbsTolI, DELYI, HALF, HG, HLB, HNEW, HRAT,
+     1     HUB, HUN, PT1, T1, TDIST, TROUND, TWO, YDDNRM
+      INTEGER I, ITER
+
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE HALF, HUN, PT1, TWO
+      DATA HALF /0.5D0/, HUN /100.0D0/, PT1 /0.1D0/, TWO /2.0D0/
+C
+      NITER = 0
+      TDIST = ABS(TOUT - T0)
+      TROUND = UROUND*MAX(ABS(T0),ABS(TOUT))
+      IF (TDIST .LT. TWO*TROUND) GO TO 100
+C
+C Set a lower bound on h based on the roundoff level in T0 and TOUT. ---
+      HLB = HUN*TROUND
+C Set an upper bound on h based on TOUT-T0 and the initial Y and YDOT. -
+      HUB = PT1*TDIST
+      AbsTolI = AbsTol(1)
+      DO 10 I = 1, N
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I)
+        DELYI = PT1*ABS(Y0(I)) + AbsTolI
+        AFI = ABS(YDOT(I))
+        IF (AFI*HUB .GT. DELYI) HUB = DELYI/AFI
+ 10     CONTINUE
+C
+C Set initial guess for h as geometric mean of upper and lower bounds. -
+      ITER = 0
+      HG = SQRT(HLB*HUB)
+C If the bounds have crossed, exit with the mean value. ----------------
+      IF (HUB .LT. HLB) THEN
+        H0 = HG
+        GO TO 90
+      ENDIF
+C
+C Looping point for iteration. -----------------------------------------
+ 50   CONTINUE
+C Estimate the second derivative as a difference quotient in f. --------
+      T1 = T0 + HG
+      DO 60 I = 1, N
+ 60     Y(I) = Y0(I) + HG*YDOT(I)
+      CALL F (N, T1, Y, TEMP)
+      DO 70 I = 1, N
+ 70     TEMP(I) = (TEMP(I) - YDOT(I))/HG
+      YDDNRM = DVNORM (N, TEMP, EWT)
+C Get the corresponding new value of h. --------------------------------
+      IF (YDDNRM*HUB*HUB .GT. TWO) THEN
+        HNEW = SQRT(TWO/YDDNRM)
+      ELSE
+        HNEW = SQRT(HG*HUB)
+      ENDIF
+      ITER = ITER + 1
+C-----------------------------------------------------------------------
+C Test the stopping conditions.
+C Stop if the new and previous h values differ by a factor of .lt. 2.
+C Stop if four iterations have been done.  Also, stop with previous h
+C if HNEW/HG .gt. 2 after first iteration, as this probably means that
+C the second derivative value is bad because of cancellation error.
+C-----------------------------------------------------------------------
+      IF (ITER .GE. 4) GO TO 80
+      HRAT = HNEW/HG
+C AICI
+      IF ( (HRAT .GT. HALF) .AND. (HRAT .LT. TWO) ) GO TO 80
+      IF ( (ITER .GE. 2) .AND. (HNEW .GT. TWO*HG) ) THEN
+        HNEW = HG
+        GO TO 80
+      ENDIF
+      HG = HNEW
+      GO TO 50
+C
+C Iteration done.  Apply bounds, bias factor, and sign.  Then exit. ----
+ 80   H0 = HNEW*HALF
+      IF (H0 .LT. HLB) H0 = HLB
+      IF (H0 .GT. HUB) H0 = HUB
+ 90   H0 = SIGN(H0, TOUT - T0)
+      NITER = ITER
+      IER = 0
+      RETURN
+C Error return for TOUT - T0 too small. --------------------------------
+ 100  IER = -1
+      RETURN
+C----------------------- End of Subroutine DVHIN -----------------------
+      END
+*DECK DVINDY
+      SUBROUTINE DVINDY (T, K, YH, LDYH, DKY, IFLAG)
+      KPP_REAL T, YH, DKY
+      INTEGER K, LDYH, IFLAG
+      DIMENSION YH(LDYH,*), DKY(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- T, K, YH, LDYH
+C Call sequence output -- DKY, IFLAG
+C COMMON block variables accessed..
+C     /DVOD01/ --  H, TN, UROUND, L, N, NQ
+C     /DVOD02/ --  HU
+C
+C Subroutines called by DVINDY.. DSCAL, XERRWD
+C Function routines called by DVINDY.. None
+C-----------------------------------------------------------------------
+C DVINDY computes interpolated values of the K-th derivative of the
+C dependent variable vector y, and stores it in DKY.  This routine
+C is called within the package with K = 0 and T = TOUT, but may
+C also be called by the user for any K up to the current order.
+C (See detailed instructions in the usage documentation.)
+C-----------------------------------------------------------------------
+C The computed values in DKY are gotten by interpolation using the
+C Nordsieck history array YH.  This array corresponds uniquely to a
+C vector-valued polynomial of degree NQCUR or less, and DKY is set
+C to the K-th derivative of this polynomial at T.
+C The formula for DKY is..
+C              q
+C  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+C             j=K
+C where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+C The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+C communicated by COMMON.  The above sum is done in reverse order.
+C IFLAG is returned negative if either K or T is out of bounds.
+C
+C Discussion above and comments in driver explain all variables.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL C, HUN, R, S, TFUZZ, TN1, TP, ZERO
+      INTEGER I, IC, J, JB, JB2, JJ, JJ1, JP1
+      CHARACTER*80 MSG
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE HUN, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      DATA HUN /100.0D0/, ZERO /0.0D0/
+C
+      IFLAG = 0
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
+      TFUZZ = HUN*UROUND*(TN + HU)
+      TP = TN - HU - TFUZZ
+      TN1 = TN + TFUZZ
+      IF ((T-TP)*(T-TN1) .GT. ZERO) GO TO 90
+C
+      S = (T - TN)/H
+      IC = 1
+      IF (K .EQ. 0) GO TO 15
+      JJ1 = L - K
+      DO 10 JJ = JJ1, NQ
+ 10     IC = IC*JJ
+ 15   C = REAL(IC)
+      DO 20 I = 1, N
+ 20     DKY(I) = C*YH(I,L)
+      IF (K .EQ. NQ) GO TO 55
+      JB2 = NQ - K
+      DO 50 JB = 1, JB2
+        J = NQ - JB
+        JP1 = J + 1
+        IC = 1
+        IF (K .EQ. 0) GO TO 35
+        JJ1 = JP1 - K
+        DO 30 JJ = JJ1, J
+ 30       IC = IC*JJ
+ 35     C = REAL(IC)
+        DO 40 I = 1, N
+ 40       DKY(I) = C*YH(I,JP1) + S*DKY(I)
+ 50     CONTINUE
+      IF (K .EQ. 0) RETURN
+ 55   R = H**(-K)
+      CALL DSCAL (N, R, DKY, 1)
+      RETURN
+C
+ 80   MSG = 'DVINDY-- K (=I1) illegal      '
+      CALL XERRWD (MSG, 30, 51, 1, 1, K, 0, 0, ZERO, ZERO)
+      IFLAG = -1
+      RETURN
+ 90   MSG = 'DVINDY-- T (=R1) illegal      '
+      CALL XERRWD (MSG, 30, 52, 1, 0, 0, 0, 1, T, ZERO)
+      MSG='      T not in interval TCUR - HU (= R1) to TCUR (=R2)      '
+      CALL XERRWD (MSG, 60, 52, 1, 0, 0, 0, 2, TP, TN)
+      IFLAG = -2
+      RETURN
+C----------------------- End of Subroutine DVINDY ----------------------
+      END
+*DECK DVSTEP
+      SUBROUTINE DVSTEP (Y, YH, LDYH, YH1, EWT, SAVF, VSAV, ACOR,
+     1                  WM, IWM, F, JAC, PSOL, VNLS, RPAR, IPAR)
+      EXTERNAL F, JAC, PSOL, VNLS
+      KPP_REAL Y, YH, YH1, EWT, SAVF, VSAV, ACOR, WM, RPAR
+      INTEGER LDYH, IWM, IPAR
+      DIMENSION Y(*), YH(LDYH,*), YH1(*), EWT(*), SAVF(*), VSAV(*),
+     1   ACOR(*), WM(*), IWM(*), RPAR(*), IPAR(*)
+
+C-----------------------------------------------------------------------
+C Call sequence input -- Y, YH, LDYH, YH1, EWT, SAVF, VSAV,
+C                        ACOR, WM, IWM, F, JAC, PSOL, VNLS, RPAR, IPAR
+C Call sequence output -- YH, ACOR, WM, IWM
+C COMMON block variables accessed..
+C     /DVOD01/  ACNRM, EL(13), H, HMIN, HMXI, HNEW, HSCAL, RC, TAU(13),
+C               TQ(5), TN, JCUR, JSTART, KFLAG, KUTH,
+C               L, LMAX, MAXORD, MITER, N, NEWQ, NQ, NQWAIT
+C     /DVOD02/  HU, NCFN, NETF, NFE, NQU, NST
+C
+C Subroutines called by DVSTEP.. F, DAXPY, DCOPY, DSCAL,
+C                               DVJUST, VNLS, DVSET
+C Function routines called by DVSTEP.. DVNORM
+C-----------------------------------------------------------------------
+C DVSTEP performs one step of the integration of an initial value
+C problem for a system of ordinary differential equations.
+C DVSTEP calls subroutine VNLS for the solution of the nonlinear system
+C arising in the time step.  Thus it is independent of the problem
+C Jacobian structure and the type of nonlinear system solution method.
+C DVSTEP returns a completion flag KFLAG (in COMMON).
+C A return with KFLAG = -1 or -2 means either ABS(H) = HMIN or 10
+C consecutive failures occurred.  On a return with KFLAG negative,
+C the values of TN and the YH array are as of the beginning of the last
+C step, and H is the last step size attempted.
+C
+C Communication with DVSTEP is done with the following variables..
+C
+C Y      = An array of length N used for the dependent variable vector.
+C YH     = An LDYH by LMAX array containing the dependent variables
+C          and their approximate scaled derivatives, where
+C          LMAX = MAXORD + 1.  YH(i,j+1) contains the approximate
+C          j-th derivative of y(i), scaled by H**j/factorial(j)
+C          (j = 0,1,...,NQ).  On entry for the first step, the first
+C          two columns of YH must be set from the initial values.
+C LDYH   = A constant integer .ge. N, the first dimension of YH.
+C          N is the number of ODEs in the system.
+C YH1    = A one-dimensional array occupying the same space as YH.
+C EWT    = An array of length N containing multiplicative weights
+C          for local error measurements.  Local errors in y(i) are
+C          compared to 1.0/EWT(i) in various error tests.
+C SAVF   = An array of working storage, of length N.
+C          also used for input of YH(*,MAXORD+2) when JSTART = -1
+C          and MAXORD .lt. the current order NQ.
+C VSAV   = A work array of length N passed to subroutine VNLS.
+C ACOR   = A work array of length N, used for the accumulated
+C          corrections.  On a successful return, ACOR(i) contains
+C          the estimated one-step local error in y(i).
+C WM,IWM = Real and integer work arrays associated with matrix
+C          operations in VNLS.
+C F      = Dummy name for the user supplied subroutine for f.
+C JAC    = Dummy name for the user supplied Jacobian subroutine.
+C PSOL   = Dummy name for the subroutine passed to VNLS, for
+C          possible use there.
+C VNLS   = Dummy name for the nonlinear system solving subroutine,
+C          whose real name is dependent on the method used.
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL ADDON, BIAS1,BIAS2,BIAS3, CNQUOT, DDN, DSM, DUP,
+     1     ETACF, ETAMIN, ETAMX1, ETAMX2, ETAMX3, ETAMXF,
+     2     ETAQ, ETAQM1, ETAQP1, FLOTL, ONE, ONEPSM,
+     3     R, THRESH, TOLD, ZERO
+      INTEGER I, I1, I2, IBACK, J, JB, KFC, KFH, MXNCF, NCF, NFLAG
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE ADDON, BIAS1, BIAS2, BIAS3,
+     1     ETACF, ETAMIN, ETAMX1, ETAMX2, ETAMX3, ETAMXF,
+     2     KFC, KFH, MXNCF, ONEPSM, THRESH, ONE, ZERO
+C-----------------------------------------------------------------------
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      DATA KFC/-3/, KFH/-7/, MXNCF/10/
+      DATA ADDON  /1.0D-6/,    BIAS1  /6.0D0/,     BIAS2  /6.0D0/,
+     1     BIAS3  /10.0D0/,    ETACF  /0.25D0/,    ETAMIN /0.1D0/,
+     2     ETAMXF /0.2D0/,     ETAMX1 /1.0D4/,     ETAMX2 /10.0D1/,
+     3     ETAMX3 /10.0D1/,    ONEPSM /1.00001D0/, THRESH /1.5D0/
+
+      DATA ONE/1.0D0/, ZERO/0.0D0/
+C
+      ETAQ   = ETAMX1
+      ETAQM1 = ETAMX1
+      ETAQP1 = ETAMX1
+      KFLAG = 0
+      TOLD = TN
+      NCF = 0
+      JCUR = 0
+      NFLAG = 0
+      IF (JSTART .GT. 0) GO TO 20
+      IF (JSTART .EQ. -1) GO TO 100
+C-----------------------------------------------------------------------
+C On the first call, the order is set to 1, and other variables are
+C initialized.  ETAMAX is the maximum ratio by which H can be increased
+C in a single step.  It is normally 1.5, but is larger during the
+C first 10 steps to compensate for the small initial H.  If a failure
+C occurs (in corrector convergence or error test), ETAMAX is set to 1
+C for the next increase.
+C-----------------------------------------------------------------------
+      LMAX = MAXORD + 1
+      NQ = 1
+      L = 2
+      NQNYH = NQ*LDYH
+      TAU(1) = H
+      PRL1 = ONE
+      RC = ZERO
+      ETAMAX = ETAMX1
+      NQWAIT = 2
+      HSCAL = H
+      GO TO 200
+C-----------------------------------------------------------------------
+C Take preliminary actions on a normal continuation step (JSTART.GT.0).
+C If the driver changed H, then ETA must be reset and NEWH set to 1.
+C If a change of order was dictated on the previous step, then
+C it is done here and appropriate adjustments in the history are made.
+C On an order decrease, the history array is adjusted by DVJUST.
+C On an order increase, the history array is augmented by a column.
+C On a change of step size H, the history array YH is rescaled.
+C-----------------------------------------------------------------------
+ 20   CONTINUE
+      IF (KUTH .EQ. 1) THEN
+        ETA = MIN(ETA,H/HSCAL)
+        NEWH = 1
+        ENDIF
+ 50   IF (NEWH .EQ. 0) GO TO 200
+      IF (NEWQ .EQ. NQ) GO TO 150
+      IF (NEWQ .LT. NQ) THEN
+        CALL DVJUST (YH, LDYH, -1)
+        NQ = NEWQ
+        L = NQ + 1
+        NQWAIT = L
+        GO TO 150
+        ENDIF
+      IF (NEWQ .GT. NQ) THEN
+        CALL DVJUST (YH, LDYH, 1)
+        NQ = NEWQ
+        L = NQ + 1
+        NQWAIT = L
+        GO TO 150
+      ENDIF
+C-----------------------------------------------------------------------
+C The following block handles preliminaries needed when JSTART = -1.
+C If N was reduced, zero out part of YH to avoid undefined references.
+C If MAXORD was reduced to a value less than the tentative order NEWQ,
+C then NQ is set to MAXORD, and a new H ratio ETA is chosen.
+C Otherwise, we take the same preliminary actions as for JSTART .gt. 0.
+C In any case, NQWAIT is reset to L = NQ + 1 to prevent further
+C changes in order for that many steps.
+C The new H ratio ETA is limited by the input H if KUTH = 1,
+C by HMIN if KUTH = 0, and by HMXI in any case.
+C Finally, the history array YH is rescaled.
+C-----------------------------------------------------------------------
+ 100  CONTINUE
+      LMAX = MAXORD + 1
+      IF (N .EQ. LDYH) GO TO 120
+      I1 = 1 + (NEWQ + 1)*LDYH
+      I2 = (MAXORD + 1)*LDYH
+      IF (I1 .GT. I2) GO TO 120
+      DO 110 I = I1, I2
+ 110    YH1(I) = ZERO
+ 120  IF (NEWQ .LE. MAXORD) GO TO 140
+      FLOTL = REAL(LMAX)
+      IF (MAXORD .LT. NQ-1) THEN
+        DDN = DVNORM (N, SAVF, EWT)/TQ(1)
+        ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL) + ADDON)
+        ENDIF
+      IF (MAXORD .EQ. NQ .AND. NEWQ .EQ. NQ+1) ETA = ETAQ
+      IF (MAXORD .EQ. NQ-1 .AND. NEWQ .EQ. NQ+1) THEN
+        ETA = ETAQM1
+        CALL DVJUST (YH, LDYH, -1)
+        ENDIF
+      IF (MAXORD .EQ. NQ-1 .AND. NEWQ .EQ. NQ) THEN
+        DDN = DVNORM (N, SAVF, EWT)/TQ(1)
+        ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL) + ADDON)
+        CALL DVJUST (YH, LDYH, -1)
+        ENDIF
+      ETA = MIN(ETA,ONE)
+      NQ = MAXORD
+      L = LMAX
+ 140  IF (KUTH .EQ. 1) ETA = MIN(ETA,ABS(H/HSCAL))
+      IF (KUTH .EQ. 0) ETA = MAX(ETA,HMIN/ABS(HSCAL))
+      ETA = ETA/MAX(ONE,ABS(HSCAL)*HMXI*ETA)
+      NEWH = 1
+      NQWAIT = L
+      IF (NEWQ .LE. MAXORD) GO TO 50
+C Rescale the history array for a change in H by a factor of ETA. ------
+ 150  R = ONE
+      DO 180 J = 2, L
+        R = R*ETA
+        CALL DSCAL (N, R, YH(1,J), 1 )
+ 180    CONTINUE
+      H = HSCAL*ETA
+      HSCAL = H
+      RC = RC*ETA
+      NQNYH = NQ*LDYH
+C-----------------------------------------------------------------------
+C This section computes the predicted values by effectively
+C multiplying the YH array by the Pascal triangle matrix.
+C DVSET is called to calculate all integration coefficients.
+C RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+C-----------------------------------------------------------------------
+ 200  TN = TN + H
+      I1 = NQNYH + 1
+      DO 220 JB = 1, NQ
+        I1 = I1 - LDYH
+        DO 210 I = I1, NQNYH
+ 210      YH1(I) = YH1(I) + YH1(I+LDYH)
+ 220  CONTINUE
+      CALL DVSET
+      RL1 = ONE/EL(2)
+      RC = RC*(RL1/PRL1)
+      PRL1 = RL1
+C
+C Call the nonlinear system solver. ------------------------------------
+C
+      CALL VNLS (Y, YH, LDYH, VSAV, SAVF, EWT, ACOR, IWM, WM,
+     1           F, JAC, PSOL, NFLAG, RPAR, IPAR)
+C
+      IF ((NFLAG .EQ. 0).OR.(H.LE.1.2*HMIN)) GO TO 450
+C-----------------------------------------------------------------------
+C The VNLS routine failed to achieve convergence (NFLAG .NE. 0).
+C The YH array is retracted to its values before prediction.
+C The step size H is reduced and the step is retried, if possible.
+C Otherwise, an error exit is taken.
+C-----------------------------------------------------------------------
+        NCF = NCF + 1
+        NCFN = NCFN + 1
+        ETAMAX = ONE
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO 430 JB = 1, NQ
+          I1 = I1 - LDYH
+          DO 420 I = I1, NQNYH
+ 420        YH1(I) = YH1(I) - YH1(I+LDYH)
+ 430      CONTINUE
+        IF (NFLAG .LT. -1) GO TO 680
+        IF (ABS(H) .LE. HMIN*ONEPSM) GO TO 670
+        IF (NCF .EQ. MXNCF) GO TO 670
+        ETA = ETACF
+        ETA = MAX(ETA,HMIN/ABS(H))
+        NFLAG = -1
+        GO TO 150
+C-----------------------------------------------------------------------
+C The corrector has converged (NFLAG = 0).  The local error test is
+C made and control passes to statement 500 if it fails.
+C-----------------------------------------------------------------------
+ 450  CONTINUE
+      DSM = ACNRM/TQ(2)
+      IF ( (DSM .GT. ONE).and.(H.GT.HMIN) ) GO TO 500
+C-----------------------------------------------------------------------
+C After a successful step, update the YH and TAU arrays and decrement
+C NQWAIT.  If NQWAIT is then 1 and NQ .lt. MAXORD, then ACOR is saved
+C for use in a possible order increase on the next step.
+C If ETAMAX = 1 (a failure occurred this step), keep NQWAIT .ge. 2.
+C-----------------------------------------------------------------------
+      KFLAG = 0
+      NST = NST + 1
+      HU = H
+      NQU = NQ
+      DO 470 IBACK = 1, NQ
+        I = L - IBACK
+ 470    TAU(I+1) = TAU(I)
+      TAU(1) = H
+      DO 480 J = 1, L
+        CALL DAXPY (N, EL(J), ACOR, 1, YH(1,J), 1 )
+ 480    CONTINUE
+      NQWAIT = NQWAIT - 1
+      IF ((L .EQ. LMAX) .OR. (NQWAIT .NE. 1)) GO TO 490
+      CALL DCOPY (N, ACOR, 1, YH(1,LMAX), 1 )
+      CONP = TQ(5)
+ 490  IF (ETAMAX .NE. ONE) GO TO 560
+      IF (NQWAIT .LT. 2) NQWAIT = 2
+      NEWQ = NQ
+      NEWH = 0
+      ETA = ONE
+      HNEW = H
+      GO TO 690
+C-----------------------------------------------------------------------
+C The error test failed.  KFLAG keeps track of multiple failures.
+C Restore TN and the YH array to their previous values, and prepare
+C to try the step again.  Compute the optimum step size for the
+C same order.  After repeated failures, H is forced to decrease
+C more rapidly.
+C-----------------------------------------------------------------------
+ 500  KFLAG = KFLAG - 1
+      NETF = NETF + 1
+      NFLAG = -2
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 520 JB = 1, NQ
+        I1 = I1 - LDYH
+        DO 510 I = I1, NQNYH
+ 510      YH1(I) = YH1(I) - YH1(I+LDYH)
+ 520  CONTINUE
+      IF (ABS(H) .LE. HMIN*ONEPSM) GO TO 660
+      ETAMAX = ONE
+      IF (KFLAG .LE. KFC) GO TO 530
+C Compute ratio of new H to current H at the current order. ------------
+      FLOTL = REAL(L)
+      ETA = ONE/((BIAS2*DSM)**(ONE/FLOTL) + ADDON)
+      ETA = MAX(ETA,HMIN/ABS(H),ETAMIN)
+      IF ((KFLAG .LE. -2) .AND. (ETA .GT. ETAMXF)) ETA = ETAMXF
+      GO TO 150
+C-----------------------------------------------------------------------
+C Control reaches this section if 3 or more consecutive failures
+C have occurred.  It is assumed that the elements of the YH array
+C have accumulated errors of the wrong order.  The order is reduced
+C by one, if possible.  Then H is reduced by a factor of 0.1 and
+C the step is retried.  After a total of 7 consecutive failures,
+C an exit is taken with KFLAG = -1.
+C-----------------------------------------------------------------------
+ 530  IF (KFLAG .EQ. KFH) GO TO 660
+      IF (NQ .EQ. 1) GO TO 540
+      ETA = MAX(ETAMIN,HMIN/ABS(H))
+      CALL DVJUST (YH, LDYH, -1)
+      L = NQ
+      NQ = NQ - 1
+      NQWAIT = L
+      GO TO 150
+ 540  ETA = MAX(ETAMIN,HMIN/ABS(H))
+      H = H*ETA
+      HSCAL = H
+      TAU(1) = H
+      CALL F (N, TN, Y, SAVF)
+      NFE = NFE + 1
+      DO 550 I = 1, N
+ 550    YH(I,2) = H*SAVF(I)
+      NQWAIT = 10
+      GO TO 200
+C-----------------------------------------------------------------------
+C If NQWAIT = 0, an increase or decrease in order by one is considered.
+C Factors ETAQ, ETAQM1, ETAQP1 are computed by which H could
+C be multiplied at order q, q-1, or q+1, respectively.
+C The largest of these is determined, and the new order and
+C step size set accordingly.
+C A change of H or NQ is made only if H increases by at least a
+C factor of THRESH.  If an order change is considered and rejected,
+C then NQWAIT is set to 2 (reconsider it after 2 steps).
+C-----------------------------------------------------------------------
+C Compute ratio of new H to current H at the current order. ------------
+ 560  FLOTL = REAL(L)
+      ETAQ = ONE/((BIAS2*DSM)**(ONE/FLOTL) + ADDON)
+      IF (NQWAIT .NE. 0) GO TO 600
+      NQWAIT = 2
+      ETAQM1 = ZERO
+      IF (NQ .EQ. 1) GO TO 570
+C Compute ratio of new H to current H at the current order less one. ---
+      DDN = DVNORM (N, YH(1,L), EWT)/TQ(1)
+      ETAQM1 = ONE/((BIAS1*DDN)**(ONE/(FLOTL - ONE)) + ADDON)
+ 570  ETAQP1 = ZERO
+      IF (L .EQ. LMAX) GO TO 580
+C Compute ratio of new H to current H at current order plus one. -------
+      CNQUOT = (TQ(5)/CONP)*(H/TAU(2))**L
+      DO 575 I = 1, N
+ 575    SAVF(I) = ACOR(I) - CNQUOT*YH(I,LMAX)
+      DUP = DVNORM (N, SAVF, EWT)/TQ(3)
+      ETAQP1 = ONE/((BIAS3*DUP)**(ONE/(FLOTL + ONE)) + ADDON)
+ 580  IF (ETAQ .GE. ETAQP1) GO TO 590
+      IF (ETAQP1 .GT. ETAQM1) GO TO 620
+      GO TO 610
+ 590  IF (ETAQ .LT. ETAQM1) GO TO 610
+ 600  ETA = ETAQ
+      NEWQ = NQ
+      GO TO 630
+ 610  ETA = ETAQM1
+      NEWQ = NQ - 1
+      GO TO 630
+ 620  ETA = ETAQP1
+      NEWQ = NQ + 1
+      CALL DCOPY (N, ACOR, 1, YH(1,LMAX), 1)
+C Test tentative new H against THRESH, ETAMAX, and HMXI, then exit. ----
+ 630  IF (ETA .LT. THRESH .OR. ETAMAX .EQ. ONE) GO TO 640
+      ETA = MIN(ETA,ETAMAX)
+      ETA = ETA/MAX(ONE,ABS(H)*HMXI*ETA)
+      NEWH = 1
+      HNEW = H*ETA
+      GO TO 690
+ 640  NEWQ = NQ
+      NEWH = 0
+      ETA = ONE
+      HNEW = H
+      GO TO 690
+C-----------------------------------------------------------------------
+C All returns are made through this section.
+C On a successful return, ETAMAX is reset and ACOR is scaled.
+C-----------------------------------------------------------------------
+ 660  KFLAG = -1
+      GO TO 720
+ 670  KFLAG = -2
+      GO TO 720
+ 680  IF (NFLAG .EQ. -2) KFLAG = -3
+      IF (NFLAG .EQ. -3) KFLAG = -4
+      GO TO 720
+ 690  ETAMAX = ETAMX3
+      IF (NST .LE. 10) ETAMAX = ETAMX2
+ 700  R = ONE/TQ(2)
+      CALL DSCAL (N, R, ACOR, 1)
+ 720  JSTART = 1
+      RETURN
+C----------------------- End of Subroutine DVSTEP ----------------------
+      END
+*DECK DVSET
+      SUBROUTINE DVSET
+C-----------------------------------------------------------------------
+C Call sequence communication.. None
+C COMMON block variables accessed..
+C     /DVOD01/ -- EL(13), H, TAU(13), TQ(5), L(= NQ + 1),
+C                 METH, NQ, NQWAIT
+C
+C Subroutines called by DVSET.. None
+C Function routines called by DVSET.. None
+C-----------------------------------------------------------------------
+C DVSET is called by DVSTEP and sets coefficients for use there.
+C
+C For each order NQ, the coefficients in EL are calculated by use of
+C  the generating polynomial lambda(x), with coefficients EL(i).
+C      lambda(x) = EL(1) + EL(2)*x + ... + EL(NQ+1)*(x**NQ).
+C For the backward differentiation formulas,
+C                                     NQ-1
+C      lambda(x) = (1 + x/xi*(NQ)) * product (1 + x/xi(i) ) .
+C                                     i = 1
+C For the Adams formulas,
+C                              NQ-1
+C      (d/dx) lambda(x) = c * product (1 + x/xi(i) ) ,
+C                              i = 1
+C      lambda(-1) = 0,    lambda(0) = 1,
+C where c is a normalization constant.
+C In both cases, xi(i) is defined by
+C      H*xi(i) = t sub n  -  t sub (n-i)
+C              = H + TAU(1) + TAU(2) + ... TAU(i-1).
+C
+C
+C In addition to variables described previously, communication
+C with DVSET uses the following..
+C   TAU    = A vector of length 13 containing the past NQ values
+C            of H.
+C   EL     = A vector of length 13 in which vset stores the
+C            coefficients for the corrector formula.
+C   TQ     = A vector of length 5 in which vset stores constants
+C            used for the convergence test, the error test, and the
+C            selection of H at a new order.
+C   METH   = The basic method indicator.
+C   NQ     = The current order.
+C   L      = NQ + 1, the length of the vector stored in EL, and
+C            the number of columns of the YH array being used.
+C   NQWAIT = A counter controlling the frequency of order changes.
+C            An order change is about to be considered if NQWAIT = 1.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL AHATN0, ALPH0, CNQM1, CORTES, CSUM, ELP, EM,
+     1     EM0, FLOTI, FLOTL, FLOTNQ, HSUM, ONE, RXI, RXIS, S, SIX,
+     2     T1, T2, T3, T4, T5, T6, TWO, XI, ZERO
+      INTEGER I, IBACK, J, JP1, NQM1, NQM2
+C
+      DIMENSION EM(13)
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE CORTES, ONE, SIX, TWO, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+C
+      DATA CORTES /0.1D0/
+      DATA ONE  /1.0D0/, SIX /6.0D0/, TWO /2.0D0/, ZERO /0.0D0/
+C
+      FLOTL = REAL(L)
+      NQM1 = NQ - 1
+      NQM2 = NQ - 2
+      GO TO (100, 200), METH
+C
+C Set coefficients for Adams methods. ----------------------------------
+ 100  IF (NQ .NE. 1) GO TO 110
+      EL(1) = ONE
+      EL(2) = ONE
+      TQ(1) = ONE
+      TQ(2) = TWO
+      TQ(3) = SIX*TQ(2)
+      TQ(5) = ONE
+      GO TO 300
+ 110  HSUM = H
+      EM(1) = ONE
+      FLOTNQ = FLOTL - ONE
+      DO 115 I = 2, L
+ 115    EM(I) = ZERO
+      DO 150 J = 1, NQM1
+        IF ((J .NE. NQM1) .OR. (NQWAIT .NE. 1)) GO TO 130
+        S = ONE
+        CSUM = ZERO
+        DO 120 I = 1, NQM1
+          CSUM = CSUM + S*EM(I)/REAL(I+1)
+ 120      S = -S
+        TQ(1) = EM(NQM1)/(FLOTNQ*CSUM)
+ 130    RXI = H/HSUM
+        DO 140 IBACK = 1, J
+          I = (J + 2) - IBACK
+ 140      EM(I) = EM(I) + EM(I-1)*RXI
+        HSUM = HSUM + TAU(J)
+ 150    CONTINUE
+C Compute integral from -1 to 0 of polynomial and of x times it. -------
+      S = ONE
+      EM0 = ZERO
+      CSUM = ZERO
+      DO 160 I = 1, NQ
+        FLOTI = REAL(I)
+        EM0 = EM0 + S*EM(I)/FLOTI
+        CSUM = CSUM + S*EM(I)/(FLOTI+ONE)
+ 160    S = -S
+C In EL, form coefficients of normalized integrated polynomial. --------
+      S = ONE/EM0
+      EL(1) = ONE
+      DO 170 I = 1, NQ
+ 170    EL(I+1) = S*EM(I)/REAL(I)
+      XI = HSUM/H
+      TQ(2) = XI*EM0/CSUM
+      TQ(5) = XI/EL(L)
+      IF (NQWAIT .NE. 1) GO TO 300
+C For higher order control constant, multiply polynomial by 1+x/xi(q). -
+      RXI = ONE/XI
+      DO 180 IBACK = 1, NQ
+        I = (L + 1) - IBACK
+ 180    EM(I) = EM(I) + EM(I-1)*RXI
+C Compute integral of polynomial. --------------------------------------
+      S = ONE
+      CSUM = ZERO
+      DO 190 I = 1, L
+        CSUM = CSUM + S*EM(I)/REAL(I+1)
+ 190    S = -S
+      TQ(3) = FLOTL*EM0/CSUM
+      GO TO 300
+C
+C Set coefficients for BDF methods. ------------------------------------
+ 200  DO 210 I = 3, L
+ 210    EL(I) = ZERO
+      EL(1) = ONE
+      EL(2) = ONE
+      ALPH0 = -ONE
+      AHATN0 = -ONE
+      HSUM = H
+      RXI = ONE
+      RXIS = ONE
+      IF (NQ .EQ. 1) GO TO 240
+      DO 230 J = 1, NQM2
+C In EL, construct coefficients of (1+x/xi(1))*...*(1+x/xi(j+1)). ------
+        HSUM = HSUM + TAU(J)
+        RXI = H/HSUM
+        JP1 = J + 1
+        ALPH0 = ALPH0 - ONE/REAL(JP1)
+        DO 220 IBACK = 1, JP1
+          I = (J + 3) - IBACK
+ 220      EL(I) = EL(I) + EL(I-1)*RXI
+ 230    CONTINUE
+      ALPH0 = ALPH0 - ONE/REAL(NQ)
+      RXIS = -EL(2) - ALPH0
+      HSUM = HSUM + TAU(NQM1)
+      RXI = H/HSUM
+      AHATN0 = -EL(2) - RXI
+      DO 235 IBACK = 1, NQ
+        I = (NQ + 2) - IBACK
+ 235    EL(I) = EL(I) + EL(I-1)*RXIS
+ 240  T1 = ONE - AHATN0 + ALPH0
+      T2 = ONE + REAL(NQ)*T1
+      TQ(2) = ABS(ALPH0*T2/T1)
+      TQ(5) = ABS(T2/(EL(L)*RXI/RXIS))
+      IF (NQWAIT .NE. 1) GO TO 300
+      CNQM1 = RXIS/EL(L)
+      T3 = ALPH0 + ONE/REAL(NQ)
+      T4 = AHATN0 + RXI
+      ELP = T3/(ONE - T4 + T3)
+      TQ(1) = ABS(ELP/CNQM1)
+      HSUM = HSUM + TAU(NQ)
+      RXI = H/HSUM
+      T5 = ALPH0 - ONE/REAL(NQ+1)
+      T6 = AHATN0 - RXI
+      ELP = T2/(ONE - T6 + T5)
+      TQ(3) = ABS(ELP*RXI*(FLOTL + ONE)*T5)
+ 300  TQ(4) = CORTES*TQ(2)
+      RETURN
+C----------------------- End of Subroutine DVSET -----------------------
+      END
+*DECK DVJUST
+      SUBROUTINE DVJUST (YH, LDYH, IORD)
+      KPP_REAL YH
+      INTEGER LDYH, IORD
+      DIMENSION YH(LDYH,*)
+C-----------------------------------------------------------------------
+C Call sequence input -- YH, LDYH, IORD
+C Call sequence output -- YH
+C COMMON block input -- NQ, METH, LMAX, HSCAL, TAU(13), N
+C COMMON block variables accessed..
+C     /DVOD01/ -- HSCAL, TAU(13), LMAX, METH, N, NQ,
+C
+C Subroutines called by DVJUST.. DAXPY
+C Function routines called by DVJUST.. None
+C-----------------------------------------------------------------------
+C This subroutine adjusts the YH array on reduction of order,
+C and also when the order is increased for the stiff option (METH = 2).
+C Communication with DVJUST uses the following..
+C IORD  = An integer flag used when METH = 2 to indicate an order
+C         increase (IORD = +1) or an order decrease (IORD = -1).
+C HSCAL = Step size H used in scaling of Nordsieck array YH.
+C         (If IORD = +1, DVJUST assumes that HSCAL = TAU(1).)
+C See References 1 and 2 for details.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL ALPH0, ALPH1, HSUM, ONE, PROD, T1, XI,XIOLD, ZERO
+      INTEGER I, IBACK, J, JP1, LP1, NQM1, NQM2, NQP1
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE ONE, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+C
+      DATA ONE /1.0D0/, ZERO /0.0D0/
+C
+      IF ((NQ .EQ. 2) .AND. (IORD .NE. 1)) RETURN
+      NQM1 = NQ - 1
+      NQM2 = NQ - 2
+      GO TO (100, 200), METH
+C-----------------------------------------------------------------------
+C Nonstiff option...
+C Check to see if the order is being increased or decreased.
+C-----------------------------------------------------------------------
+ 100  CONTINUE
+      IF (IORD .EQ. 1) GO TO 180
+C Order decrease. ------------------------------------------------------
+      DO 110 J = 1, LMAX
+ 110    EL(J) = ZERO
+      EL(2) = ONE
+      HSUM = ZERO
+      DO 130 J = 1, NQM2
+C Construct coefficients of x*(x+xi(1))*...*(x+xi(j)). -----------------
+        HSUM = HSUM + TAU(J)
+        XI = HSUM/HSCAL
+        JP1 = J + 1
+        DO 120 IBACK = 1, JP1
+          I = (J + 3) - IBACK
+ 120      EL(I) = EL(I)*XI + EL(I-1)
+ 130    CONTINUE
+C Construct coefficients of integrated polynomial. ---------------------
+      DO 140 J = 2, NQM1
+ 140    EL(J+1) = REAL(NQ)*EL(J)/REAL(J)
+C Subtract correction terms from YH array. -----------------------------
+      DO 170 J = 3, NQ
+        DO 160 I = 1, N
+ 160      YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+ 170    CONTINUE
+      RETURN
+C Order increase. ------------------------------------------------------
+C Zero out next column in YH array. ------------------------------------
+ 180  CONTINUE
+      LP1 = L + 1
+      DO 190 I = 1, N
+ 190    YH(I,LP1) = ZERO
+      RETURN
+C-----------------------------------------------------------------------
+C Stiff option...
+C Check to see if the order is being increased or decreased.
+C-----------------------------------------------------------------------
+ 200  CONTINUE
+      IF (IORD .EQ. 1) GO TO 300
+C Order decrease. ------------------------------------------------------
+      DO 210 J = 1, LMAX
+ 210    EL(J) = ZERO
+      EL(3) = ONE
+      HSUM = ZERO
+      DO 230 J = 1,NQM2
+C Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)). ---------------
+        HSUM = HSUM + TAU(J)
+        XI = HSUM/HSCAL
+        JP1 = J + 1
+        DO 220 IBACK = 1, JP1
+          I = (J + 4) - IBACK
+ 220      EL(I) = EL(I)*XI + EL(I-1)
+ 230    CONTINUE
+C Subtract correction terms from YH array. -----------------------------
+      DO 250 J = 3,NQ
+        DO 240 I = 1, N
+ 240      YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+ 250    CONTINUE
+      RETURN
+C Order increase. ------------------------------------------------------
+ 300  DO 310 J = 1, LMAX
+ 310    EL(J) = ZERO
+      EL(3) = ONE
+      ALPH0 = -ONE
+      ALPH1 = ONE
+      PROD = ONE
+      XIOLD = ONE
+      HSUM = HSCAL
+      IF (NQ .EQ. 1) GO TO 340
+      DO 330 J = 1, NQM1
+C Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)). ---------------
+        JP1 = J + 1
+        HSUM = HSUM + TAU(JP1)
+        XI = HSUM/HSCAL
+        PROD = PROD*XI
+        ALPH0 = ALPH0 - ONE/REAL(JP1)
+        ALPH1 = ALPH1 + ONE/XI
+        DO 320 IBACK = 1, JP1
+          I = (J + 4) - IBACK
+ 320      EL(I) = EL(I)*XIOLD + EL(I-1)
+        XIOLD = XI
+ 330    CONTINUE
+ 340  CONTINUE
+      T1 = (-ALPH0 - ALPH1)/PROD
+C Load column L + 1 in YH array. ---------------------------------------
+      LP1 = L + 1
+      DO 350 I = 1, N
+ 350    YH(I,LP1) = T1*YH(I,LMAX)
+C Add correction terms to YH array. ------------------------------------
+      NQP1 = NQ + 1
+      DO 370 J = 3, NQP1
+        CALL DAXPY (N, EL(J), YH(1,LP1), 1, YH(1,J), 1 )
+ 370  CONTINUE
+      RETURN
+C----------------------- End of Subroutine DVJUST ----------------------
+      END
+*DECK DVNLSD
+      SUBROUTINE DVNLSD (Y, YH, LDYH, VSAV, SAVF, EWT, ACOR, IWM, WM,
+     1                 F, JAC, PDUM, NFLAG, RPAR, IPAR)
+      EXTERNAL F, JAC, PDUM
+      KPP_REAL Y, YH, VSAV, SAVF, EWT, ACOR, WM, RPAR
+      INTEGER LDYH, IWM, NFLAG, IPAR
+      DIMENSION Y(*), YH(LDYH,*), VSAV(*), SAVF(*), EWT(*), ACOR(*),
+     1          IWM(*), WM(*), RPAR(*), IPAR(*)
+
+C-----------------------------------------------------------------------
+C Call sequence input -- Y, YH, LDYH, SAVF, EWT, ACOR, IWM, WM,
+C                        F, JAC, NFLAG, RPAR, IPAR
+C Call sequence output -- YH, ACOR, WM, IWM, NFLAG
+C COMMON block variables accessed..
+C     /DVOD01/ ACNRM, CRATE, DRC, H, RC, RL1, TQ(5), TN, ICF,
+C                JCUR, METH, MITER, N, NSLP
+C     /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Subroutines called by DVNLSD.. F, DAXPY, DCOPY, DSCAL, DVJAC, DVSOL
+C Function routines called by DVNLSD.. DVNORM
+C-----------------------------------------------------------------------
+C Subroutine DVNLSD is a nonlinear system solver, which uses functional
+C iteration or a chord (modified Newton) method.  For the chord method
+C direct linear algebraic system solvers are used.  Subroutine DVNLSD
+C then handles the corrector phase of this integration package.
+C
+C Communication with DVNLSD is done with the following variables. (For
+C more details, please see the comments in the driver subroutine.)
+C
+C Y          = The dependent variable, a vector of length N, input.
+C YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+C              and output.  On input, it contains predicted values.
+C LDYH       = A constant .ge. N, the first dimension of YH, input.
+C VSAV       = Unused work array.
+C SAVF       = A work array of length N.
+C EWT        = An error weight vector of length N, input.
+C ACOR       = A work array of length N, used for the accumulated
+C              corrections to the predicted y vector.
+C WM,IWM     = Real and integer work arrays associated with matrix
+C              operations in chord iteration (MITER .ne. 0).
+C F          = Dummy name for user supplied routine for f.
+C JAC        = Dummy name for user supplied Jacobian routine.
+C PDUM       = Unused dummy subroutine name.  Included for uniformity
+C              over collection of integrators.
+C NFLAG      = Input/output flag, with values and meanings as follows..
+C              INPUT
+C                  0 first CALL for this time step.
+C                 -1 convergence failure in previous CALL to DVNLSD.
+C                 -2 error test failure in DVSTEP.
+C              OUTPUT
+C                  0 successful completion of nonlinear solver.
+C                 -1 convergence failure or singular matrix.
+C                 -2 unrecoverable error in matrix preprocessing
+C                    (cannot occur here).
+C                 -3 unrecoverable error in solution (cannot occur
+C                    here).
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C
+C IPUP       = Own variable flag with values and meanings as follows..
+C              0,            do not update the Newton matrix.
+C              MITER .ne. 0, update Newton matrix, because it is the
+C                            initial step, order was changed, the error
+C                            test failed, or an update is indicated by
+C                            the scalar RC or step counter NST.
+C
+C For more details, see comments in driver subroutine.
+C-----------------------------------------------------------------------
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL CCMAX, CRDOWN, CSCALE, DCON, DEL, DELP, ONE,
+     1     RDIV, TWO, ZERO
+      INTEGER I, IERPJ, IERSL, M, MAXCOR, MSBP
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM, STEPCUT
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE CCMAX, CRDOWN, MAXCOR, MSBP, RDIV, ONE, TWO, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      COMMON /VERWER/ IVERWER, IBEGIN, STEPCUT
+      DATA CCMAX /0.3D0/, CRDOWN /0.3D0/, MAXCOR /3/, MSBP /20/,
+     1     RDIV  /2.0D0/
+      DATA ONE /1.0D0/, TWO /2.0D0/, ZERO /0.0D0/
+C-----------------------------------------------------------------------
+C On the first step, on a change of method order, or after a
+C nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+C to force a Jacobian update when MITER .ne. 0.
+C-----------------------------------------------------------------------
+      if ( (h.lt.stepcut).and.(IBEGIN.eq.1) ) then
+c      if (h.lt.stepcut) then
+         iverwer = 1
+      else
+         ibegin = 0
+         iverwer = 0
+      end if
+      IF (JSTART .EQ. 0) NSLP = 0
+      IF (NFLAG .EQ. 0) ICF = 0
+      IF (NFLAG .EQ. -2) IPUP = MITER
+      IF ( (JSTART .EQ. 0) .OR. (JSTART .EQ. -1) ) IPUP = MITER
+C If this is functional iteration, set CRATE .eq. 1 and drop to 220
+      IF (MITER .EQ. 0) THEN
+        CRATE = ONE
+        GO TO 220
+      ENDIF
+C-----------------------------------------------------------------------
+C RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+C When RC differs from 1 by more than CCMAX, IPUP is set to MITER
+C to force DVJAC to be called, if a Jacobian is involved.
+C In any case, DVJAC is called at least every MSBP steps.
+C-----------------------------------------------------------------------
+      DRC = ABS(RC-ONE)
+      IF (DRC .GT. CCMAX .OR. NST .GE. NSLP+MSBP) IPUP = MITER
+C-----------------------------------------------------------------------
+C Up to MAXCOR corrector iterations are taken.  A convergence test is
+C made on the r.m.s. norm of each correction, weighted by the error
+C weight vector EWT.  The sum of the corrections is accumulated in the
+C vector ACOR(i).  The YH array is not altered in the corrector loop.
+C-----------------------------------------------------------------------
+ 220  M = 0
+      DELP = ZERO
+      CALL DCOPY (N, YH(1,1), 1, Y, 1 )
+      CALL F (N, TN, Y, SAVF)
+      NFE = NFE + 1
+      IF (IPUP .LE. 0) GO TO 250
+C-----------------------------------------------------------------------
+C If indicated, the matrix P = I - h*rl1*J is reevaluated and
+C preprocessed before starting the corrector iteration.  IPUP is set
+C to 0 as an indicator that this has been done.
+C-----------------------------------------------------------------------
+      IF (IVERWER.EQ.0) THEN
+      CALL DVJAC (Y, YH, LDYH, EWT, ACOR, SAVF, WM, IWM, F, JAC, IERPJ,
+     1           RPAR, IPAR)
+      ELSE
+        IERPJ = 0
+      END IF
+      IPUP = 0
+      RC = ONE
+      DRC = ZERO
+      CRATE = ONE
+      NSLP = NST
+C If matrix is singular, take error return to force cut in step size. --
+      IF (IERPJ .NE. 0) GO TO 430
+ 250  DO 260 I = 1,N
+ 260    ACOR(I) = ZERO
+C This is a looping point for the corrector iteration. -----------------
+ 270  IF (MITER .NE. 0) GO TO 350
+C-----------------------------------------------------------------------
+C In the case of functional iteration, update Y directly from
+C the result of the last function evaluation.
+C-----------------------------------------------------------------------
+      DO 280 I = 1,N
+ 280    SAVF(I) = RL1*(H*SAVF(I) - YH(I,2))
+      DO 290 I = 1,N
+ 290    Y(I) = SAVF(I) - ACOR(I)
+      DEL = DVNORM (N, Y, EWT)
+      DO 300 I = 1,N
+ 300    Y(I) = YH(I,1) + SAVF(I)
+      CALL DCOPY (N, SAVF, 1, ACOR, 1)
+      GO TO 400
+C-----------------------------------------------------------------------
+C In the case of the chord method, compute the corrector error,
+C and solve the linear system with that as right-hand side and
+C P as coefficient matrix.  The correction is scaled by the factor
+C 2/(1+RC) to account for changes in h*rl1 since the last DVJAC call.
+C-----------------------------------------------------------------------
+ 350  continue
+      if (IVERWER.EQ.1) then
+      CRATE = 1
+      DO  I = 1,N
+        Y(I) = SAVF(I) - ACOR(I)
+      end do
+      DEL = DVNORM (N, Y, EWT)
+      DO  I = 1,N
+         Y(I) = YH(I,1) + SAVF(I)
+      end do
+      CALL DCOPY (N, SAVF, 1, ACOR, 1)
+      GO TO 400
+      end if
+      DO 360 I = 1,N
+ 360    Y(I) = (RL1*H)*SAVF(I) - (RL1*YH(I,2) + ACOR(I))
+        CALL DVSOL (WM, IWM, Y, IERSL)
+      NNI = NNI + 1
+      IF (IERSL .GT. 0) GO TO 410
+      IF (METH .EQ. 2 .AND. RC .NE. ONE) THEN
+        CSCALE = TWO/(ONE + RC)
+        CALL DSCAL (N, CSCALE, Y, 1)
+      ENDIF
+      DEL = DVNORM (N, Y, EWT)
+      CALL DAXPY (N, ONE, Y, 1, ACOR, 1)
+      DO 380 I = 1,N
+ 380    Y(I) = YH(I,1) + ACOR(I)
+C-----------------------------------------------------------------------
+C Test for convergence.  If M .gt. 0, an estimate of the convergence
+C rate constant is stored in CRATE, and this is used in the test.
+C-----------------------------------------------------------------------
+ 400  IF (M .NE. 0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+      DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+      IF (DCON .LE. ONE) GO TO 450
+      M = M + 1
+      IF (M .EQ. MAXCOR) GO TO 410
+      IF (M .GE. 2 .AND. DEL .GT. RDIV*DELP) GO TO 410
+      DELP = DEL
+      CALL F (N, TN, Y, SAVF)
+      NFE = NFE + 1
+      GO TO 270
+C
+ 410  IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430
+      ICF = 1
+      IPUP = MITER
+      GO TO 220
+C
+ 430  CONTINUE
+      NFLAG = -1
+      ICF = 2
+      IPUP = MITER
+      RETURN
+C
+C Return for successful step. ------------------------------------------
+ 450  NFLAG = 0
+      JCUR = 0
+      ICF = 0
+      IF (M .EQ. 0) ACNRM = DEL
+      IF (M .GT. 0) ACNRM = DVNORM (N, ACOR, EWT)
+      RETURN
+C----------------------- End of Subroutine DVNLSD ----------------------
+      END
+
+*DECK DVJAC
+      SUBROUTINE DVJAC (Y, YH, LDYH, EWT, FTEM, SAVF, WM, IWM, FUN, JAC,
+     1                 IERPJ, RPAR, IPAR)
+C       IMPLICIT KPP_REAL (A-H, O-Z)
+       INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      EXTERNAL FUN, JAC
+      KPP_REAL Y, YH, EWT, FTEM, SAVF, WM, RPAR
+      INTEGER LDYH, IWM, IERPJ, IPAR
+      DIMENSION Y(*), YH(LDYH,*), EWT(*), FTEM(*), SAVF(*),
+     1   WM(*), IWM(*), RPAR(*), IPAR(*)
+
+C-----------------------------------------------------------------------
+C Call sequence input -- Y, YH, LDYH, EWT, FTEM, SAVF, WM, IWM,
+C                        FUN, JAC, RPAR, IPAR
+C Call sequence output -- WM, IWM, IERPJ
+C COMMON block variables accessed..
+C     /DVOD01/  CCMXJ, DRC, H, RL1, TN, UROUND, ICF, JCUR, LOCJS,
+C               MSBJ, NSLJ
+C     /DVOD02/  NFE, NST, NJE, NLU
+C
+C Subroutines called by DVJAC.. FUN, JAC, DACOPY, DCOPY, DGBFA, DGEFA,
+C                              DSCAL
+C Function routines called by DVJAC.. DVNORM
+C-----------------------------------------------------------------------
+C DVJAC is called by DVSTEP to compute and process the matrix
+C P = I - h*rl1*J , where J is an approximation to the Jacobian.
+C Here J is computed by the user-supplied routine JAC if
+C MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.
+C If MITER = 3, a diagonal approximation to J is used.
+C If JSV = -1, J is computed from scratch in all cases.
+C If JSV = 1 and MITER = 1, 2, 4, or 5, and if the saved value of J is
+C considered acceptable, then P is constructed from the saved J.
+C J is stored in wm and replaced by P.  If MITER .ne. 3, P is then
+C subjected to LU decomposition in preparation for later solution
+C of linear systems with P as coefficient matrix. This is done
+C by DGEFA if MITER = 1 or 2, and by DGBFA if MITER = 4 or 5.
+C
+C Communication with DVJAC is done with the following variables.  (For
+C more details, please see the comments in the driver subroutine.)
+C Y          = Vector containing predicted values on entry.
+C YH         = The Nordsieck array, an LDYH by LMAX array, input.
+C LDYH       = A constant .ge. N, the first dimension of YH, input.
+C EWT        = An error weight vector of length N.
+C SAVF       = Array containing f evaluated at predicted y, input.
+C WM         = Real work space for matrices.  In the output, it containS
+C              the inverse diagonal matrix if MITER = 3 and the LU
+C              decomposition of P if MITER is 1, 2 , 4, or 5.
+C              Storage of matrix elements starts at WM(3).
+C              Storage of the saved Jacobian starts at WM(LOCJS).
+C              WM also contains the following matrix-related data..
+C              WM(1) = SQRT(UROUND), used in numerical Jacobian step.
+C              WM(2) = H*RL1, saved for later use if MITER = 3.
+C IWM        = Integer work space containing pivot information,
+C              starting at IWM(31), if MITER is 1, 2, 4, or 5.
+C              IWM also contains band parameters ML = IWM(1) and
+C              MU = IWM(2) if MITER is 4 or 5.
+C FUN          = Dummy name for the user supplied subroutine for f.
+C JAC        = Dummy name for the user supplied Jacobian subroutine.
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C RL1        = 1/EL(2) (input).
+C IERPJ      = Output error flag,  = 0 if no trouble, 1 if the P
+C              matrix is found to be singular.
+C JCUR       = Output flag to indicate whether the Jacobian matrix
+C              (or approximation) is now current.
+C              JCUR = 0 means J is not current.
+C              JCUR = 1 means J is current.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL CON, DI, FAC, HRL1, ONE, PT1, R, R0, SRUR, THOU,
+     1     YI, YJ, YJJ, ZERO
+      INTEGER I, I1, I2, IER, II, J, J1, JJ, JOK, LENP, MBA, MBAND,
+     1        MEB1, MEBAND, ML, ML3, MU, NP1
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this subroutine.
+C-----------------------------------------------------------------------
+      SAVE ONE, PT1, THOU, ZERO
+C-----------------------------------------------------------------------
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      DATA ONE /1.0D0/, THOU /1000.0D0/, ZERO /0.0D0/, PT1 /0.1D0/
+C
+      IER = 0
+      IERPJ = 0
+      HRL1 = H*RL1
+C See whether J should be evaluated (JOK = -1) or not (JOK = 1). -------
+      JOK = JSV
+      IF (JSV .EQ. 1) THEN
+        IF (NST .EQ. 0 .OR. NST .GT. NSLJ+MSBJ) JOK = -1
+        IF (ICF .EQ. 1 .AND. DRC .LT. CCMXJ) JOK = -1
+        IF (ICF .EQ. 2) JOK = -1
+      ENDIF
+C End of setting JOK. --------------------------------------------------
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 1) THEN
+C If JOK = -1 and MITER = 1, CALL JAC to evaluate Jacobian. ------------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      LENP = LU_NONZERO
+      DO 110 I = 1,LENP
+ 110    WM(I+2) = ZERO
+
+c      CALL Update_SUN(TN)
+c      CALL Update_RCONST()
+      CALL JAC (N, TN, Y, WM(3))
+      IF (JSV .EQ. 1) CALL DCOPY (LENP, WM(3), 1, WM(LOCJS), 1)
+      ENDIF
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 2) THEN
+C If MITER = 2, make N calls to FUN to approximate the Jacobian. ---------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      FAC = DVNORM (N, SAVF, EWT)
+      R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      SRUR = WM(1)
+      J1 = 2
+      DO 230 J = 1,N
+        YJ = Y(J)
+        R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+        Y(J) = Y(J) + R
+        FAC = ONE/R
+        CALL FUN (N, TN, Y, FTEM)
+        DO 220 I = 1,N
+ 220      WM(I+J1) = (FTEM(I) - SAVF(I))*FAC
+        Y(J) = YJ
+        J1 = J1 + N
+ 230    CONTINUE
+      NFE = NFE + N
+      LENP = LU_NONZERO
+      IF (JSV .EQ. 1) CALL DCOPY (LENP, WM(3), 1, WM(LOCJS), 1)
+      ENDIF
+C
+      IF (JOK .EQ. 1 .AND. (MITER .EQ. 1 .OR. MITER .EQ. 2)) THEN
+      JCUR = 0
+      LENP = LU_NONZERO
+      CALL DCOPY (LENP, WM(LOCJS), 1, WM(3), 1)
+      ENDIF
+C
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) THEN
+C Multiply Jacobian by scalar, add identity, and do LU decomposition. --
+      CON = -HRL1
+      CALL DSCAL (LENP, CON, WM(3), 1)
+      J = 3
+      NP1 = N + 1
+      DO 250 I = 1,N
+        WM(2+LU_DIAG(i)) = WM(2+LU_DIAG(i)) + ONE
+ 250  CONTINUE
+      NLU = NLU + 1
+C      CALL DGEFA (WM(3), N, N, IWM(31), IER)
+      CALL KppDecomp ( WM(3), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+      ENDIF
+C End of code block for MITER = 1 or 2. --------------------------------
+C
+      IF (MITER .EQ. 3) THEN
+C If MITER = 3, construct a diagonal approximation to J and P. ---------
+      NJE = NJE + 1
+      JCUR = 1
+      WM(2) = HRL1
+      R = RL1*PT1
+      DO 310 I = 1,N
+ 310    Y(I) = Y(I) + R*(H*SAVF(I) - YH(I,2))
+      CALL FUN (N, TN, Y, WM(3))
+      NFE = NFE + 1
+      DO 320 I = 1,N
+        R0 = H*SAVF(I) - YH(I,2)
+        DI = PT1*R0 - H*(WM(I+2) - SAVF(I))
+        WM(I+2) = ONE
+        IF (ABS(R0) .LT. UROUND/EWT(I)) GO TO 320
+        IF (ABS(DI) .EQ. ZERO) GO TO 330
+        WM(I+2) = PT1*R0/DI
+ 320    CONTINUE
+      RETURN
+ 330  IERPJ = 1
+      RETURN
+      ENDIF
+C End of code block for MITER = 3. -------------------------------------
+C
+C Set constants for MITER = 4 or 5. ------------------------------------
+      ML = IWM(1)
+      MU = IWM(2)
+      ML3 = ML + 3
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      LENP = MEBAND*N
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 4) THEN
+C If JOK = -1 and MITER = 4, CALL JAC to evaluate Jacobian. ------------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      DO 410 I = 1,LENP
+ 410    WM(I+2) = ZERO
+
+c      CALL Update_SUN(TN)
+c      CALL Update_RCONST()
+      CALL JAC (N, TN, Y, WM(ML3))
+      IF (JSV .EQ. 1)
+     1   CALL DACOPY (MBAND, N, WM(ML3), MEBAND, WM(LOCJS), MBAND)
+      ENDIF
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 5) THEN
+C If MITER = 5, make N calls to FUN to approximate the Jacobian. ---------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      MBA = MIN(MBAND,N)
+      MEB1 = MEBAND - 1
+      SRUR = WM(1)
+      FAC = DVNORM (N, SAVF, EWT)
+      R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      DO 560 J = 1,MBA
+        DO 530 I = J,N,MBAND
+          YI = Y(I)
+          R = MAX(SRUR*ABS(YI),R0/EWT(I))
+ 530      Y(I) = Y(I) + R
+        CALL FUN (N, TN, Y, FTEM)
+        DO 550 JJ = J,N,MBAND
+          Y(JJ) = YH(JJ,1)
+          YJJ = Y(JJ)
+          R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+          FAC = ONE/R
+          I1 = MAX(JJ-MU,1)
+          I2 = MIN(JJ+ML,N)
+          II = JJ*MEB1 - ML + 2
+          DO 540 I = I1,I2
+ 540        WM(II+I) = (FTEM(I) - SAVF(I))*FAC
+ 550      CONTINUE
+ 560    CONTINUE
+      NFE = NFE + MBA
+      IF (JSV .EQ. 1)
+     1   CALL DACOPY (MBAND, N, WM(ML3), MEBAND, WM(LOCJS), MBAND)
+      ENDIF
+C
+      IF (JOK .EQ. 1) THEN
+      JCUR = 0
+      CALL DACOPY (MBAND, N, WM(LOCJS), MBAND, WM(ML3), MEBAND)
+      ENDIF
+C
+C Multiply Jacobian by scalar, add identity, and do LU decomposition.
+      CON = -HRL1
+      CALL DSCAL (LENP, CON, WM(3), 1 )
+      II = MBAND + 2
+      DO 580 I = 1,N
+        WM(II) = WM(II) + ONE
+ 580    II = II + MEBAND
+      NLU = NLU + 1
+C      CALL DGBFA (WM(3), MEBAND, N, ML, MU, IWM(31), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C End of code block for MITER = 4 or 5. --------------------------------
+C
+C----------------------- End of Subroutine DVJAC -----------------------
+      END
+*DECK DACOPY
+      SUBROUTINE DACOPY (NROW, NCOL, A, NROWA, B, NROWB)
+      KPP_REAL A, B
+      INTEGER NROW, NCOL, NROWA, NROWB
+      DIMENSION A(NROWA,NCOL), B(NROWB,NCOL)
+C-----------------------------------------------------------------------
+C Call sequence input -- NROW, NCOL, A, NROWA, NROWB
+C Call sequence output -- B
+C COMMON block variables accessed -- None
+C
+C Subroutines called by DACOPY.. DCOPY
+C Function routines called by DACOPY.. None
+C-----------------------------------------------------------------------
+C This routine copies one rectangular array, A, to another, B,
+C where A and B may have different row dimensions, NROWA and NROWB.
+C The data copied consists of NROW rows and NCOL columns.
+C-----------------------------------------------------------------------
+      INTEGER IC
+C
+      DO 20 IC = 1,NCOL
+        CALL DCOPY (NROW, A(1,IC), 1, B(1,IC), 1)
+ 20     CONTINUE
+C
+      RETURN
+C----------------------- End of Subroutine DACOPY ----------------------
+      END
+*DECK DVSOL
+      SUBROUTINE DVSOL (WM, IWM, X, IERSL)
+      KPP_REAL WM, X
+      INTEGER IWM, IERSL
+      DIMENSION WM(*), IWM(*), X(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- WM, IWM, X
+C Call sequence output -- X, IERSL
+C COMMON block variables accessed..
+C     /DVOD01/ -- H, RL1, MITER, N
+C
+C Subroutines called by DVSOL.. DGESL, DGBSL
+C Function routines called by DVSOL.. None
+C-----------------------------------------------------------------------
+C This routine manages the solution of the linear system arising from
+C a chord iteration.  It is called if MITER .ne. 0.
+C If MITER is 1 or 2, it calls DGESL to accomplish this.
+C If MITER = 3 it updates the coefficient H*RL1 in the diagonal
+C matrix, and then computes the solution.
+C If MITER is 4 or 5, it calls DGBSL.
+C Communication with DVSOL uses the following variables..
+C WM    = Real work space containing the inverse diagonal matrix if
+C         MITER = 3 and the LU decomposition of the matrix otherwise.
+C         Storage of matrix elements starts at WM(3).
+C         WM also contains the following matrix-related data..
+C         WM(1) = SQRT(UROUND) (not used here),
+C         WM(2) = HRL1, the previous value of H*RL1, used if MITER = 3.
+C IWM   = Integer work space containing pivot information, starting at
+C         IWM(31), if MITER is 1, 2, 4, or 5.  IWM also contains band
+C         parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.
+C X     = The right-hand side vector on input, and the solution vector
+C         on output, of length N.
+C IERSL = Output flag.  IERSL = 0 if no trouble occurred.
+C         IERSL = 1 if a singular matrix arose with MITER = 3.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for local variables --------------------------------
+C
+      INTEGER I, MEBAND, ML, MU
+      KPP_REAL DI, HRL1, ONE, PHRL1, R, ZERO
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE ONE, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+C
+      DATA ONE /1.0D0/, ZERO /0.0D0/
+C
+      IERSL = 0
+      GO TO (100, 100, 300, 400, 400), MITER
+C 100  CALL DGESL (WM(3), N, N, IWM(31), X, 0)
+ 100  CALL KppSolve (WM(3), X)
+      RETURN
+C
+ 300  PHRL1 = WM(2)
+      HRL1 = H*RL1
+      WM(2) = HRL1
+      IF (HRL1 .EQ. PHRL1) GO TO 330
+      R = HRL1/PHRL1
+      DO 320 I = 1,N
+        DI = ONE - R*(ONE - ONE/WM(I+2))
+        IF (ABS(DI) .EQ. ZERO) GO TO 390
+ 320    WM(I+2) = ONE/DI
+C
+ 330  DO 340 I = 1,N
+ 340    X(I) = WM(I+2)*X(I)
+      RETURN
+ 390  IERSL = 1
+      RETURN
+C
+ 400  ML = IWM(1)
+      MU = IWM(2)
+      MEBAND = 2*ML + MU + 1
+      CALL KppSolve (WM(3), X)
+      RETURN
+C----------------------- End of Subroutine DVSOL -----------------------
+      END
+*DECK DVSRCO
+      SUBROUTINE DVSRCO (RSAV, ISAV, JOB)
+      KPP_REAL RSAV
+      INTEGER ISAV, JOB
+      DIMENSION RSAV(*), ISAV(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- RSAV, ISAV, JOB
+C Call sequence output -- RSAV, ISAV
+C COMMON block variables accessed -- All of /DVOD01/ and /DVOD02/
+C
+C Subroutines/functions called by DVSRCO.. None
+C-----------------------------------------------------------------------
+C This routine saves or restores (depending on JOB) the contents of the
+C COMMON blocks DVOD01 and DVOD02, which are used internally by DVODE.
+C
+C RSAV = real array of length 49 or more.
+C ISAV = integer array of length 41 or more.
+C JOB  = flag indicating to save or restore the COMMON blocks..
+C        JOB  = 1 if COMMON is to be saved (written to RSAV/ISAV).
+C        JOB  = 2 if COMMON is to be restored (read from RSAV/ISAV).
+C        A CALL with JOB = 2 presumes a prior CALL with JOB = 1.
+C-----------------------------------------------------------------------
+      KPP_REAL RVOD1, RVOD2
+      INTEGER IVOD1, IVOD2
+      INTEGER I, LENIV1, LENIV2, LENRV1, LENRV2
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE LENRV1, LENIV1, LENRV2, LENIV2
+C
+      COMMON /DVOD01/ RVOD1(48), IVOD1(33)
+      COMMON /DVOD02/ RVOD2(1), IVOD2(8)
+      DATA LENRV1/48/, LENIV1/33/, LENRV2/1/, LENIV2/8/
+C
+      IF (JOB .EQ. 2) GO TO 100
+      DO 10 I = 1,LENRV1
+ 10     RSAV(I) = RVOD1(I)
+      DO 15 I = 1,LENRV2
+ 15     RSAV(LENRV1+I) = RVOD2(I)
+C
+      DO 20 I = 1,LENIV1
+ 20     ISAV(I) = IVOD1(I)
+      DO 25 I = 1,LENIV2
+ 25     ISAV(LENIV1+I) = IVOD2(I)
+C
+      RETURN
+C
+ 100  CONTINUE
+      DO 110 I = 1,LENRV1
+ 110     RVOD1(I) = RSAV(I)
+      DO 115 I = 1,LENRV2
+ 115     RVOD2(I) = RSAV(LENRV1+I)
+C
+      DO 120 I = 1,LENIV1
+ 120     IVOD1(I) = ISAV(I)
+      DO 125 I = 1,LENIV2
+ 125     IVOD2(I) = ISAV(LENIV1+I)
+C
+      RETURN
+C----------------------- End of Subroutine DVSRCO ----------------------
+      END
+*DECK DEWSET
+      SUBROUTINE DEWSET (N, ITOL, RelTol, AbsTol, YCUR, EWT)
+      KPP_REAL RelTol, AbsTol, YCUR, EWT
+      INTEGER N, ITOL
+      DIMENSION RelTol(*), AbsTol(*), YCUR(N), EWT(N)
+C-----------------------------------------------------------------------
+C Call sequence input -- N, ITOL, RelTol, AbsTol, YCUR
+C Call sequence output -- EWT
+C COMMON block variables accessed -- None
+C
+C Subroutines/functions called by DEWSET.. None
+C-----------------------------------------------------------------------
+C This subroutine sets the error weight vector EWT according to
+C     EWT(i) = RelTol(i)*abs(YCUR(i)) + AbsTol(i),  i = 1,...,N,
+C with the subscript on RelTol and/or AbsTol possibly replaced by 1 above,
+C depending on the value of ITOL.
+C-----------------------------------------------------------------------
+      INTEGER I
+C
+      GO TO (10, 20, 30, 40), ITOL
+ 10   CONTINUE
+      DO 15 I = 1, N
+ 15     EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(1)
+      RETURN
+ 20   CONTINUE
+      DO 25 I = 1, N
+ 25     EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(I)
+      RETURN
+ 30   CONTINUE
+      DO 35 I = 1, N
+ 35     EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(1)
+      RETURN
+ 40   CONTINUE
+      DO 45 I = 1, N
+ 45     EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(I)
+      RETURN
+C----------------------- End of Subroutine DEWSET ----------------------
+      END
+*DECK DVNORM
+      KPP_REAL FUNCTION DVNORM (N, V, W)
+      KPP_REAL V, W
+      INTEGER N
+      DIMENSION V(N), W(N)
+C-----------------------------------------------------------------------
+C Call sequence input -- N, V, W
+C Call sequence output -- None
+C COMMON block variables accessed -- None
+C
+C Subroutines/functions called by DVNORM.. None
+C-----------------------------------------------------------------------
+C This function routine computes the weighted root-mean-square norm
+C of the vector of length N contained in the array V, with weights
+C contained in the array W of length N..
+C   DVNORM = sqrt( (1/N) * sum( V(i)*W(i) )**2 )
+C
+C  LOOP UNROLLING BY ADRIAN SANDU, AUG 2, 1995
+C
+C-----------------------------------------------------------------------
+      KPP_REAL SUM
+      INTEGER I
+C
+      SUM = 0.0D0
+
+   20 m = mod(n,7)
+      if( m .eq. 0 ) go to 40
+      do 30 i = 1,m
+        SUM =  SUM + (V(I)*W(I))**2
+   30 continue
+      if( n .lt. 7 ) return
+   40 mp1 = m + 1
+      do 50 i = mp1,n,7
+        SUM =  SUM + (V(I)*W(I))**2
+        SUM =  SUM + (V(I + 1)*W(I + 1))**2
+        SUM =  SUM + (V(I + 2)*W(I + 2))**2
+        SUM =  SUM + (V(I + 3)*W(I + 3))**2
+        SUM =  SUM + (V(I + 4)*W(I + 4))**2
+        SUM =  SUM + (V(I + 5)*W(I + 5))**2
+        SUM =  SUM + (V(I + 6)*W(I + 6))**2
+   50 continue
+
+      DVNORM = SQRT(SUM/REAL(N))
+      RETURN
+C----------------------- End of Function DVNORM ------------------------
+      END
+
+*DECK D1MACH
+      KPP_REAL FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C This routine computes the unit roundoff of the machine.
+C This is defined as the smallest positive machine number
+C u such that  1.0 + u .ne. 1.0
+C
+C Subroutines/functions called by D1MACH.. None
+C-----------------------------------------------------------------------
+      KPP_REAL U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- End of Function D1MACH ------------------------
+      END
+*DECK XERRWD
+      SUBROUTINE XERRWD (MSG, NMES, NERR, LEVEL, NI, I1, I2, NR, R1, R2)
+      KPP_REAL R1, R2
+      INTEGER NMES, NERR, LEVEL, NI, I1, I2, NR
+      CHARACTER*1 MSG(NMES)
+C-----------------------------------------------------------------------
+C Subroutines XERRWD, XSETF, XSETUN, and the two function routines
+C MFLGSV and LUNSAV, as given here, constitute a simplified version of
+C the SLATEC error handling package.
+C Written by A. C. Hindmarsh and P. N. Brown at LLNL.
+C Version of 13 April, 1989.
+C This version is in KPP_REAL.
+C
+C All arguments are input arguments.
+C
+C MSG    = The message (character array).
+C NMES   = The length of MSG (number of characters).
+C NERR   = The error number (not used).
+C LEVEL  = The error level..
+C          0 or 1 means recoverable (control returns to caller).
+C          2 means fatal (run is aborted--see note below).
+C NI     = Number of integers (0, 1, or 2) to be printed with message.
+C I1,I2  = Integers to be printed, depending on NI.
+C NR     = Number of reals (0, 1, or 2) to be printed with message.
+C R1,R2  = Reals to be printed, depending on NR.
+C
+C Note..  this routine is machine-dependent and specialized for use
+C in limited context, in the following ways..
+C 1. The argument MSG is assumed to be of type CHARACTER, and
+C    the message is printed with a format of (1X,80A1).
+C 2. The message is assumed to take only one line.
+C    Multi-line messages are generated by repeated calls.
+C 3. If LEVEL = 2, control passes to the statement   STOP
+C    to abort the run.  This statement may be machine-dependent.
+C 4. R1 and R2 are assumed to be in KPP_REAL and are printed
+C    in D21.13 format.
+C
+C For a different default logical unit number, change the data
+C statement in function routine LUNSAV.
+C For a different run-abort command, change the statement following
+C statement 100 at the end.
+C-----------------------------------------------------------------------
+C Subroutines called by XERRWD.. None
+C Function routines called by XERRWD.. MFLGSV, LUNSAV
+C-----------------------------------------------------------------------
+C
+      INTEGER I, LUNIT, LUNSAV, MESFLG, MFLGSV
+C
+C Get message print flag and logical unit number. ----------------------
+      MESFLG = MFLGSV (0,.FALSE.)
+      LUNIT = LUNSAV (0,.FALSE.)
+      IF (MESFLG .EQ. 0) GO TO 100
+C Write the message. ---------------------------------------------------
+      WRITE (LUNIT,10) (MSG(I),I=1,NMES)
+ 10   FORMAT(1X,80A1)
+      IF (NI .EQ. 1) WRITE (LUNIT, 20) I1
+ 20   FORMAT(6X,'In above message,  I1 =',I10)
+      IF (NI .EQ. 2) WRITE (LUNIT, 30) I1,I2
+ 30   FORMAT(6X,'In above message,  I1 =',I10,3X,'I2 =',I10)
+      IF (NR .EQ. 1) WRITE (LUNIT, 40) R1
+ 40   FORMAT(6X,'In above message,  R1 =',D21.13)
+      IF (NR .EQ. 2) WRITE (LUNIT, 50) R1,R2
+ 50   FORMAT(6X,'In above,  R1 =',D21.13,3X,'R2 =',D21.13)
+C Abort the run if LEVEL = 2. ------------------------------------------
+ 100  IF (LEVEL .NE. 2) RETURN
+      STOP
+C----------------------- End of Subroutine XERRWD ----------------------
+      END
+*DECK XSETF
+      SUBROUTINE XSETF (MFLAG)
+C-----------------------------------------------------------------------
+C This routine resets the print control flag MFLAG.
+C
+C Subroutines called by XSETF.. None
+C Function routines called by XSETF.. MFLGSV
+C-----------------------------------------------------------------------
+      INTEGER MFLAG, JUNK, MFLGSV
+C
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) JUNK = MFLGSV (MFLAG,.TRUE.)
+      RETURN
+C----------------------- End of Subroutine XSETF -----------------------
+      END
+*DECK XSETUN
+      SUBROUTINE XSETUN (LUN)
+C-----------------------------------------------------------------------
+C This routine resets the logical unit number for messages.
+C
+C Subroutines called by XSETUN.. None
+C Function routines called by XSETUN.. LUNSAV
+C-----------------------------------------------------------------------
+      INTEGER LUN, JUNK, LUNSAV
+C
+      IF (LUN .GT. 0) JUNK = LUNSAV (LUN,.TRUE.)
+      RETURN
+C----------------------- End of Subroutine XSETUN ----------------------
+      END
+*DECK MFLGSV
+      INTEGER FUNCTION MFLGSV (IVALUE, ISET)
+      LOGICAL ISET
+      INTEGER IVALUE
+C-----------------------------------------------------------------------
+C MFLGSV saves and recalls the parameter MESFLG which controls the
+C printing of the error messages.
+C
+C Saved local variable..
+C
+C   MESFLG = Print control flag..
+C            1 means print all messages (the default).
+C            0 means no printing.
+C
+C On input..
+C
+C   IVALUE = The value to be set for the MESFLG parameter,
+C            if ISET is .TRUE. .
+C
+C   ISET   = Logical flag to indicate whether to read or write.
+C            If ISET=.TRUE., the MESFLG parameter will be given
+C            the value IVALUE.  If ISET=.FALSE., the MESFLG
+C            parameter will be unchanged, and IVALUE is a dummy
+C            parameter.
+C
+C On return..
+C
+C   The (old) value of the MESFLG parameter will be returned
+C   in the function value, MFLGSV.
+C
+C This is a modification of the SLATEC library routine J4SAVE.
+C
+C Subroutines/functions called by MFLGSV.. None
+C-----------------------------------------------------------------------
+      INTEGER MESFLG
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE MESFLG
+      DATA MESFLG/1/
+C
+      MFLGSV = MESFLG
+      IF (ISET) MESFLG = IVALUE
+      RETURN
+C----------------------- End of Function MFLGSV ------------------------
+      END
+*DECK LUNSAV
+      INTEGER FUNCTION LUNSAV (IVALUE, ISET)
+      LOGICAL ISET
+      INTEGER IVALUE
+C-----------------------------------------------------------------------
+C LUNSAV saves and recalls the parameter LUNIT which is the logical
+C unit number to which error messages are printed.
+C
+C Saved local variable..
+C
+C  LUNIT   = Logical unit number for messages.
+C            The default is 6 (machine-dependent).
+C
+C On input..
+C
+C   IVALUE = The value to be set for the LUNIT parameter,
+C            if ISET is .TRUE. .
+C
+C   ISET   = Logical flag to indicate whether to read or write.
+C            If ISET=.TRUE., the LUNIT parameter will be given
+C            the value IVALUE.  If ISET=.FALSE., the LUNIT
+C            parameter will be unchanged, and IVALUE is a dummy
+C            parameter.
+C
+C On return..
+C
+C   The (old) value of the LUNIT parameter will be returned
+C   in the function value, LUNSAV.
+C
+C This is a modification of the SLATEC library routine J4SAVE.
+C
+C Subroutines/functions called by LUNSAV.. None
+C-----------------------------------------------------------------------
+      INTEGER LUNIT
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE LUNIT
+      DATA LUNIT/6/
+C
+      LUNSAV = LUNIT
+      IF (ISET) LUNIT = IVALUE
+      RETURN
+C----------------------- End of Function LUNSAV ------------------------
+      END
+
+        SUBROUTINE VODE_FSPLIT_VAR(N, T, Y, PR)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        INTEGER N
+        REAL*8 Told, T
+        REAL*8 Y(NVAR), PR(NVAR)
+
+        Told = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        CALL Fun( Y,  FIX, RCONST, PR )
+        TIME = Told
+        RETURN
+        END
+
+        SUBROUTINE VODE_Jac_SP(N, T, Y, J)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        INTEGER N
+        REAL*8 Told, T
+        REAL*8 Y(NVAR), J(LU_NONZERO)
+
+        Told = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        CALL Jac_SP( Y,  FIX, RCONST, J )
+        TIME = Told
+        RETURN
+        END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_lsode.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_lsode.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_lsode.def	(revision 3477)
@@ -0,0 +1,7 @@
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+#DOUBLE ON 
+#INTFILE kpp_lsode
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_lsode.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_lsode.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_lsode.f90	(revision 3477)
@@ -0,0 +1,3421 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  LSODE - Stiff method based on backward differentiation formulas (BDF)  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+! A. Sandu - version of July 2005
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME, ATOL, RTOL
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve, &
+               Set2zero, WLAMCH
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  !~~~>  Statistics on the work performed by the LSODE method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4,  &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihexit=2
+  !  SDIRK method coefficients
+  KPP_REAL :: rkAlpha(5,4), rkBeta(5,4), rkD(4,5),  &
+                   rkGamma, rkA(5,5), rkB(5), rkC(5)
+
+  ! mz_rs_20050717: TODO: use strings of IERR_NAMES for error messages
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-8:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -8
+    'Step size too small                               ', & ! -7
+    'No of steps exceeds maximum bound                 ', & ! -6
+    'Improper tolerance values                         ', & ! -5
+    'FacMin/FacMax/FacRej must be positive             ', & ! -4
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3
+    'Improper value for maximal no of Newton iterations', & ! -2
+    'Improper value for maximal no of steps            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+!!$   INTEGER, SAVE :: Ntotal = 0
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   ICNTRL(5) = 2 ! maximal order
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+   CALL KppLsode( TIN,TOUT,VAR,RTOL,ATOL,                &
+                  RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+
+! mz_rs_20050716: IERR and ISTATUS are returned to the user who then
+! decides what to do about it, i.e. either stop the run or ignore it.
+!!$   IF (IERR < 0) THEN
+!!$        PRINT*,'LSODE: Unsuccessful exit at T=',TIN,' (IERR=',IERR,')'
+!!$        STOP
+!!$   ENDIF
+!!$   Ntotal = Ntotal + ISTATUS(3)
+!!$   PRINT*,'Nsteps = ', ISTATUS(3),'  (',Ntotal,')'
+
+   STEPMIN = RSTATUS(ihexit) ! Save last step
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(1:20)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(1:20)
+   IF (PRESENT(IERR_U)) THEN
+     IF (IERR==2) THEN ! DLSODE returns "2" after successful completion
+       IERR_U = 1 ! IERR_U will return "1" for successful completion
+     ELSE
+       IERR_U = IERR
+     ENDIF
+   ENDIF
+
+   END SUBROUTINE INTEGRATE
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE KppLsode( TIN,TOUT,Y,RelTol,AbsTol,      &
+               RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum order of the integration formula allowed
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last predicted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      KPP_REAL :: Y(NVAR), AbsTol(NVAR), RelTol(NVAR), TIN, TOUT
+      KPP_REAL :: RCNTRL(20), RSTATUS(20)
+      INTEGER       :: ICNTRL(20), ISTATUS(20)
+      INTEGER, PARAMETER :: LRW = 25 + 9*NVAR+2*NVAR*NVAR, &
+                            LIW = 32 + NVAR
+      KPP_REAL :: RWORK(LRW), RPAR(1)
+      INTEGER :: IWORK(LIW), IPAR(1), ITOL, ITASK,         &
+                 IERR, IOPT, MF
+
+      !~~~> NORMAL COMPUTATION
+      ITASK  = 1
+      IERR   = 1
+      IOPT   = 1     ! 0=no/1=use optional input
+      
+      RWORK(1:30) = 0.0d0
+      IWORK(1:30) = 0
+      
+      IF (ICNTRL(2)==0) THEN
+         ITOL = 4           ! Abs/RelTol are both vectors
+      ELSE              
+         ITOL = 1           ! Abs/RelTol are both scalars
+      END IF   
+      IWORK(6) = ICNTRL(4)  ! max number of internal steps 
+      IWORK(5) = ICNTRL(5)  ! maximal order
+
+      MF = 21  !~~~> stiff case, analytic full Jacobian
+
+      RWORK(5) = RCNTRL(3)  ! Hstart
+      RWORK(6) = RCNTRL(2)  ! Hmax                    
+      RWORK(7) = RCNTRL(1)  ! Hmin                    
+
+      CALL DLSODE ( FUN_CHEM, NVAR, Y, TIN, TOUT, ITOL, RelTol, AbsTol, ITASK,&
+                    IERR, IOPT, RWORK, LRW, IWORK, LIW, JAC_CHEM, MF)
+
+      ISTATUS(1) = IWORK(12) ! Number of function evaluations 
+      ISTATUS(2) = IWORK(13) ! Number of Jacobian evaluations   
+      ISTATUS(3) = IWORK(11) ! Number of steps
+
+      RSTATUS(1) = TOUT      ! mz_rs_20050717
+      RSTATUS(2) = RWORK(11) ! mz_rs_20050717
+
+      END SUBROUTINE KppLsode
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!DECK DLSODE                                                            
+      SUBROUTINE DLSODE (F, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,   &
+                       ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)  
+      EXTERNAL F, JAC 
+      INTEGER NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, LIW, IWORK(LIW), MF 
+      KPP_REAL Y(*), T, TOUT, RelTol(*), AbsTol(*), RWORK(LRW)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!***BEGIN PROLOGUE  DLSODE                                              
+!***PURPOSE  Livermore Solver for Ordinary Differential Equations.      
+!            DLSODE solves the initial-value problem for stiff or       
+!            nonstiff systems of first-order ODE's,                     
+!               dy/dt = f(t,y),   or, in component form,                
+!               dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(N)),  i=1,...,N.
+!***CATEGORY  I1A                                                       
+!***TYPE      KPP_REAL (SLSODE-S, DLSODE-D)                     
+!***KEYWORDS  ORDINARY DIFFERENTIAL EQUATIONS, INITIAL VALUE PROBLEM,   
+!             STIFF, NONSTIFF                                           
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!             Center for Applied Scientific Computing, L-561            
+!             Lawrence Livermore National Laboratory                    
+!             Livermore, CA 94551.                                      
+!***DESCRIPTION                                                         
+!                                                                       
+!     NOTE: The "Usage" and "Arguments" sections treat only a subset of 
+!           available options, in condensed fashion.  The options       
+!           covered and the information supplied will support most      
+!           standard uses of DLSODE.                                    
+!                                                                       
+!           For more sophisticated uses, full details on all options are
+!           given in the concluding section, headed "Long Description." 
+!           A synopsis of the DLSODE Long Description is provided at the
+!           beginning of that section; general topics covered are:      
+!           - Elements of the call sequence; optional input and output  
+!           - Optional supplemental routines in the DLSODE package      
+!           - internal COMMON block                                     
+!                                                                       
+! *Usage:                                                               
+!     Communication between the user and the DLSODE package, for normal 
+!     situations, is summarized here.  This summary describes a subset  
+!     of the available options.  See "Long Description" for complete    
+!     details, including optional communication, nonstandard options,   
+!     and instructions for special situations.                          
+!                                                                       
+!     A sample program is given in the "Examples" section.              
+!                                                                       
+!     Refer to the argument descriptions for the definitions of the     
+!     quantities that appear in the following sample declarations.      
+!                                                                       
+!     For MF = 10,                                                      
+!        PARAMETER  (LRW = 20 + 16*NEQ,           LIW = 20)             
+!     For MF = 21 or 22,                                                
+!        PARAMETER  (LRW = 22 +  9*NEQ + NEQ**2,  LIW = 20 + NEQ)       
+!     For MF = 24 or 25,                                                
+!        PARAMETER  (LRW = 22 + 10*NEQ + (2*ML+MU)*NEQ,                 
+!       *                                         LIW = 20 + NEQ)       
+!                                                                       
+!        EXTERNAL F, JAC                                                
+!        INTEGER  NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, IWORK(LIW),      
+!       *         LIW, MF                                               
+!        KPP_REAL Y(NEQ), T, TOUT, RelTol, AbsTol(ntol), RWORK(LRW) 
+!                                                                       
+!        CALL DLSODE (F, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,      
+!       *            ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)     
+!                                                                       
+! *Arguments:                                                           
+!     F     :EXT    Name of subroutine for right-hand-side vector f.    
+!                   This name must be declared EXTERNAL in calling      
+!                   program.  The form of F must be:                    
+!                                                                       
+!                   SUBROUTINE  F (NEQ, T, Y, YDOT)                     
+!                   INTEGER  NEQ                                        
+!                   KPP_REAL  T, Y(*), YDOT(*)                  
+!                                                                       
+!                   The inputs are NEQ, T, Y.  F is to set              
+!                                                                       
+!                   YDOT(i) = f(i,T,Y(1),Y(2),...,Y(NEQ)),              
+!                                                     i = 1, ..., NEQ . 
+!                                                                       
+!     NEQ   :IN     Number of first-order ODE's.                        
+!                                                                       
+!     Y     :INOUT  Array of values of the y(t) vector, of length NEQ.  
+!                   Input:  For the first call, Y should contain the    
+!                           values of y(t) at t = T. (Y is an input     
+!                           variable only if ISTATE = 1.)               
+!                   Output: On return, Y will contain the values at the 
+!                           new t-value.                                
+!                                                                       
+!     T     :INOUT  Value of the independent variable.  On return it    
+!                   will be the current value of t (normally TOUT).     
+!                                                                       
+!     TOUT  :IN     Next point where output is desired (.NE. T).        
+!                                                                       
+!     ITOL  :IN     1 or 2 according as AbsTol (below) is a scalar or     
+!                   an array.                                           
+!                                                                       
+!     RelTol  :IN     Relative tolerance parameter (scalar).              
+!                                                                       
+!     AbsTol  :IN     Absolute tolerance parameter (scalar or array).     
+!                   If ITOL = 1, AbsTol need not be dimensioned.          
+!                   If ITOL = 2, AbsTol must be dimensioned at least NEQ. 
+!                                                                       
+!                   The estimated local error in Y(i) will be controlled
+!                   so as to be roughly less (in magnitude) than        
+!                                                                       
+!                   EWT(i) = RelTol*ABS(Y(i)) + AbsTol     if ITOL = 1, or  
+!                   EWT(i) = RelTol*ABS(Y(i)) + AbsTol(i)  if ITOL = 2.     
+!                                                                       
+!                   Thus the local error test passes if, in each        
+!                   component, either the absolute error is less than   
+!                   AbsTol (or AbsTol(i)), or the relative error is less    
+!                   than RelTol.                                          
+!                                                                       
+!                   Use RelTol = 0.0 for pure absolute error control, and 
+!                   use AbsTol = 0.0 (or AbsTol(i) = 0.0) for pure relative 
+!                   error control.  Caution:  Actual (global) errors may
+!                   exceed these local tolerances, so choose them       
+!                   conservatively.                                     
+!                                                                       
+!     ITASK :IN     Flag indicating the task DLSODE is to perform.      
+!                   Use ITASK = 1 for normal computation of output      
+!                   values of y at t = TOUT.                            
+!                                                                       
+!     ISTATE:INOUT  Index used for input and output to specify the state
+!                   of the calculation.                                 
+!                   Input:                                              
+!                    1   This is the first call for a problem.          
+!                    2   This is a subsequent call.                     
+!                   Output:                                             
+!                    1   Nothing was done, because TOUT was equal to T. 
+!                    2   DLSODE was successful (otherwise, negative).   
+!                        Note that ISTATE need not be modified after a  
+!                        successful return.                             
+!                   -1   Excess work done on this call (perhaps wrong   
+!                        MF).                                           
+!                   -2   Excess accuracy requested (tolerances too      
+!                        small).                                        
+!                   -3   Illegal input detected (see printed message).  
+!                   -4   Repeated error test failures (check all        
+!                        inputs).                                       
+!                   -5   Repeated convergence failures (perhaps bad     
+!                        Jacobian supplied or wrong choice of MF or     
+!                        tolerances).                                   
+!                   -6   Error weight became zero during problem        
+!                        (solution component i vanished, and AbsTol or    
+!                        AbsTol(i) = 0.).                                 
+!                                                                       
+!     IOPT  :IN     Flag indicating whether optional inputs are used:   
+!                   0   No.                                             
+!                   1   Yes.  (See "Optional inputs" under "Long        
+!                       Description," Part 1.)                          
+!                                                                       
+!     RWORK :WORK   Real work array of length at least:                 
+!                   20 + 16*NEQ                    for MF = 10,         
+!                   22 +  9*NEQ + NEQ**2           for MF = 21 or 22,   
+!                   22 + 10*NEQ + (2*ML + MU)*NEQ  for MF = 24 or 25.   
+!                                                                       
+!     LRW   :IN     Declared length of RWORK (in user's DIMENSION       
+!                   statement).                                         
+!                                                                       
+!     IWORK :WORK   Integer work array of length at least:              
+!                   20        for MF = 10,                              
+!                   20 + NEQ  for MF = 21, 22, 24, or 25.               
+!                                                                       
+!                   If MF = 24 or 25, input in IWORK(1),IWORK(2) the    
+!                   lower and upper Jacobian half-bandwidths ML,MU.     
+!                                                                       
+!                   On return, IWORK contains information that may be   
+!                   of interest to the user:                            
+!                                                                       
+!            Name   Location   Meaning                                  
+!            -----  ---------  -----------------------------------------
+!            NST    IWORK(11)  Number of steps taken for the problem so 
+!                              far.                                     
+!            NFE    IWORK(12)  Number of f evaluations for the problem  
+!                              so far.                                  
+!            NJE    IWORK(13)  Number of Jacobian evaluations (and of   
+!                              matrix LU decompositions) for the problem
+!                              so far.                                  
+!            NQU    IWORK(14)  Method order last used (successfully).   
+!            LENRW  IWORK(17)  Length of RWORK actually required.  This 
+!                              is defined on normal returns and on an   
+!                              illegal input return for insufficient    
+!                              storage.                                 
+!            LENIW  IWORK(18)  Length of IWORK actually required.  This 
+!                              is defined on normal returns and on an   
+!                              illegal input return for insufficient    
+!                              storage.                                 
+!                                                                       
+!     LIW   :IN     Declared length of IWORK (in user's DIMENSION       
+!                   statement).                                         
+!                                                                       
+!     JAC   :EXT    Name of subroutine for Jacobian matrix (MF =        
+!                   21 or 24).  If used, this name must be declared     
+!                   EXTERNAL in calling program.  If not used, pass a   
+!                   dummy name.  The form of JAC must be:               
+!                                                                       
+!                   SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD)      
+!                   INTEGER  NEQ, ML, MU, NROWPD                        
+!                   KPP_REAL  T, Y(*), PD(NROWPD,*)             
+!                                                                       
+!                   See item c, under "Description" below for more      
+!                   information about JAC.                              
+!                                                                       
+!     MF    :IN     Method flag.  Standard values are:                  
+!                   10  Nonstiff (Adams) method, no Jacobian used.      
+!                   21  Stiff (BDF) method, user-supplied full Jacobian.
+!                   22  Stiff method, internally generated full         
+!                       Jacobian.                                       
+!                   24  Stiff method, user-supplied banded Jacobian.    
+!                   25  Stiff method, internally generated banded       
+!                       Jacobian.                                       
+!                                                                       
+! *Description:                                                         
+!     DLSODE solves the initial value problem for stiff or nonstiff     
+!     systems of first-order ODE's,                                     
+!                                                                       
+!        dy/dt = f(t,y) ,                                               
+!                                                                       
+!     or, in component form,                                            
+!                                                                       
+!        dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ))                  
+!                                                  (i = 1, ..., NEQ) .  
+!                                                                       
+!     DLSODE is a package based on the GEAR and GEARB packages, and on  
+!     the October 23, 1978, version of the tentative ODEPACK user       
+!     interface standard, with minor modifications.                     
+!                                                                       
+!     The steps in solving such a problem are as follows.               
+!                                                                       
+!     a. First write a subroutine of the form                           
+!                                                                       
+!           SUBROUTINE  F (NEQ, T, Y, YDOT)                             
+!           INTEGER  NEQ                                                
+!           KPP_REAL  T, Y(*), YDOT(*)                          
+!                                                                       
+!        which supplies the vector function f by loading YDOT(i) with   
+!        f(i).                                                          
+!                                                                       
+!     b. Next determine (or guess) whether or not the problem is stiff. 
+!        Stiffness occurs when the Jacobian matrix df/dy has an         
+!        eigenvalue whose real part is negative and large in magnitude  
+!        compared to the reciprocal of the t span of interest.  If the  
+!        problem is nonstiff, use method flag MF = 10.  If it is stiff, 
+!        there are four standard choices for MF, and DLSODE requires the
+!        Jacobian matrix in some form.  This matrix is regarded either  
+!        as full (MF = 21 or 22), or banded (MF = 24 or 25).  In the    
+!        banded case, DLSODE requires two half-bandwidth parameters ML  
+!        and MU. These are, respectively, the widths of the lower and   
+!        upper parts of the band, excluding the main diagonal.  Thus the
+!        band consists of the locations (i,j) with                      
+!                                                                       
+!           i - ML <= j <= i + MU ,                                     
+!                                                                       
+!        and the full bandwidth is ML + MU + 1 .                        
+!                                                                       
+!     c. If the problem is stiff, you are encouraged to supply the      
+!        Jacobian directly (MF = 21 or 24), but if this is not feasible,
+!        DLSODE will compute it internally by difference quotients (MF =
+!        22 or 25).  If you are supplying the Jacobian, write a         
+!        subroutine of the form                                         
+!                                                                       
+!           SUBROUTINE  JAC (NEQ, T, Y, ML, MU, PD, NROWPD)             
+!           INTEGER  NEQ, ML, MU, NRWOPD                                
+!           KPP_REAL  T, Y(*), PD(NROWPD,*)                     
+!                                                                       
+!        which provides df/dy by loading PD as follows:                 
+!        - For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+!          the partial derivative of f(i) with respect to y(j).  (Ignore
+!          the ML and MU arguments in this case.)                       
+!        - For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with    
+!          df(i)/dy(j); i.e., load the diagonal lines of df/dy into the 
+!          rows of PD from the top down.                                
+!        - In either case, only nonzero elements need be loaded.        
+!                                                                       
+!     d. Write a main program that calls subroutine DLSODE once for each
+!        point at which answers are desired.  This should also provide  
+!        for possible use of logical unit 6 for output of error messages
+!        by DLSODE.                                                     
+!                                                                       
+!        Before the first call to DLSODE, set ISTATE = 1, set Y and T to
+!        the initial values, and set TOUT to the first output point.  To
+!        continue the integration after a successful return, simply     
+!        reset TOUT and call DLSODE again.  No other parameters need be 
+!        reset.                                                         
+!                                                                       
+! *Examples:                                                            
+!     The following is a simple example problem, with the coding needed 
+!     for its solution by DLSODE. The problem is from chemical kinetics,
+!     and consists of the following three rate equations:               
+!                                                                       
+!        dy1/dt = -.04*y1 + 1.E4*y2*y3                                  
+!        dy2/dt = .04*y1 - 1.E4*y2*y3 - 3.E7*y2**2                      
+!        dy3/dt = 3.E7*y2**2                                            
+!                                                                       
+!     on the interval from t = 0.0 to t = 4.E10, with initial conditions
+!     y1 = 1.0, y2 = y3 = 0. The problem is stiff.                      
+!                                                                       
+!     The following coding solves this problem with DLSODE, using       
+!     MF = 21 and printing results at t = .4, 4., ..., 4.E10.  It uses  
+!     ITOL = 2 and AbsTol much smaller for y2 than for y1 or y3 because y2
+!     has much smaller values.  At the end of the run, statistical      
+!     quantities of interest are printed.                               
+!                                                                       
+!        EXTERNAL  FEX, JEX                                             
+!        INTEGER  IOPT, IOUT, ISTATE, ITASK, ITOL, IWORK(23), LIW, LRW, 
+!       *         MF, NEQ                                               
+!        KPP_REAL  AbsTol(3), RelTol, RWORK(58), T, TOUT, Y(3)      
+!        NEQ = 3                                                        
+!        Y(1) = 1.D0                                                    
+!        Y(2) = 0.D0                                                    
+!        Y(3) = 0.D0                                                    
+!        T = 0.D0                                                       
+!        TOUT = .4D0                                                    
+!        ITOL = 2                                                       
+!        RelTol = 1.D-4                                                   
+!        AbsTol(1) = 1.D-6                                                
+!        AbsTol(2) = 1.D-10                                               
+!        AbsTol(3) = 1.D-6                                                
+!        ITASK = 1                                                      
+!        ISTATE = 1                                                     
+!        IOPT = 0                                                       
+!        LRW = 58                                                       
+!        LIW = 23                                                       
+!        MF = 21                                                        
+!        DO 40 IOUT = 1,12                                              
+!          CALL DLSODE (FEX, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,  
+!       *               ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JEX, MF)  
+!          WRITE(6,20)  T, Y(1), Y(2), Y(3)                             
+!    20    FORMAT(' At t =',D12.4,'   y =',3D14.6)                      
+!          IF (ISTATE .LT. 0)  GO TO 80                                 
+!    40    TOUT = TOUT*10.D0                                            
+!        WRITE(6,60)  IWORK(11), IWORK(12), IWORK(13)                   
+!    60  FORMAT(/' No. steps =',i4,',  No. f-s =',i4,',  No. J-s =',i4) 
+!        STOP                                                           
+!    80  WRITE(6,90)  ISTATE                                            
+!    90  FORMAT(///' Error halt.. ISTATE =',I3)                         
+!        STOP                                                           
+!        END                                                            
+!                                                                       
+!        SUBROUTINE  FEX (NEQ, T, Y, YDOT)                              
+!        INTEGER  NEQ                                                   
+!        KPP_REAL  T, Y(3), YDOT(3)                             
+!        YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)                         
+!        YDOT(3) = 3.D7*Y(2)*Y(2)                                       
+!        YDOT(2) = -YDOT(1) - YDOT(3)                                   
+!        RETURN                                                         
+!        END                                                            
+!                                                                       
+!        SUBROUTINE  JEX (NEQ, T, Y, ML, MU, PD, NRPD)                  
+!        INTEGER  NEQ, ML, MU, NRPD                                     
+!        KPP_REAL  T, Y(3), PD(NRPD,3)                          
+!        PD(1,1) = -.04D0                                               
+!        PD(1,2) = 1.D4*Y(3)                                            
+!        PD(1,3) = 1.D4*Y(2)                                            
+!        PD(2,1) = .04D0                                                
+!        PD(2,3) = -PD(1,3)                                             
+!        PD(3,2) = 6.D7*Y(2)                                            
+!        PD(2,2) = -PD(1,2) - PD(3,2)                                   
+!        RETURN                                                         
+!        END                                                            
+!                                                                       
+!     The output from this program (on a Cray-1 in single precision)    
+!     is as follows.                                                    
+!                                                                       
+!     At t =  4.0000e-01   y =  9.851726e-01  3.386406e-05  1.479357e-02
+!     At t =  4.0000e+00   y =  9.055142e-01  2.240418e-05  9.446344e-02
+!     At t =  4.0000e+01   y =  7.158050e-01  9.184616e-06  2.841858e-01
+!     At t =  4.0000e+02   y =  4.504846e-01  3.222434e-06  5.495122e-01
+!     At t =  4.0000e+03   y =  1.831701e-01  8.940379e-07  8.168290e-01
+!     At t =  4.0000e+04   y =  3.897016e-02  1.621193e-07  9.610297e-01
+!     At t =  4.0000e+05   y =  4.935213e-03  1.983756e-08  9.950648e-01
+!     At t =  4.0000e+06   y =  5.159269e-04  2.064759e-09  9.994841e-01
+!     At t =  4.0000e+07   y =  5.306413e-05  2.122677e-10  9.999469e-01
+!     At t =  4.0000e+08   y =  5.494530e-06  2.197825e-11  9.999945e-01
+!     At t =  4.0000e+09   y =  5.129458e-07  2.051784e-12  9.999995e-01
+!     At t =  4.0000e+10   y = -7.170603e-08 -2.868241e-13  1.000000e+00
+!                                                                       
+!     No. steps = 330,  No. f-s = 405,  No. J-s = 69                    
+!                                                                       
+! *Accuracy:                                                            
+!     The accuracy of the solution depends on the choice of tolerances  
+!     RelTol and AbsTol.  Actual (global) errors may exceed these local     
+!     tolerances, so choose them conservatively.                        
+!                                                                       
+! *Cautions:                                                            
+!     The work arrays should not be altered between calls to DLSODE for 
+!     the same problem, except possibly for the conditional and optional
+!     inputs.                                                           
+!                                                                       
+! *Portability:                                                         
+!     Since NEQ is dimensioned inside DLSODE, some compilers may object 
+!     to a call to DLSODE with NEQ a scalar variable.  In this event,   
+!     use DIMENSION NEQ.  Similar remarks apply to RelTol and AbsTol.    
+!                                                                       
+!     Note to Cray users:                                               
+!     For maximum efficiency, use the CFT77 compiler.  Appropriate      
+!     compiler optimization directives have been inserted for CFT77.    
+!                                                                       
+! *Reference:                                                           
+!     Alan C. Hindmarsh, "ODEPACK, A Systematized Collection of ODE     
+!     Solvers," in Scientific Computing, R. S. Stepleman, et al., Eds.  
+!     (North-Holland, Amsterdam, 1983), pp. 55-64.                      
+!                                                                       
+! *Long Description:                                                    
+!     The following complete description of the user interface to       
+!     DLSODE consists of four parts:                                    
+!                                                                       
+!     1.  The call sequence to subroutine DLSODE, which is a driver     
+!         routine for the solver.  This includes descriptions of both   
+!         the call sequence arguments and user-supplied routines.       
+!         Following these descriptions is a description of optional     
+!         inputs available through the call sequence, and then a        
+!         description of optional outputs in the work arrays.           
+!                                                                       
+!     2.  Descriptions of other routines in the DLSODE package that may 
+!         be (optionally) called by the user.  These provide the ability
+!         to alter error message handling, save and restore the internal
+!         COMMON, and obtain specified derivatives of the solution y(t).
+!                                                                       
+!     3.  Descriptions of COMMON block to be declared in overlay or     
+!         similar environments, or to be saved when doing an interrupt  
+!         of the problem and continued solution later.                  
+!                                                                       
+!     4.  Description of two routines in the DLSODE package, either of  
+!         which the user may replace with his own version, if desired.  
+!         These relate to the measurement of errors.                    
+!                                                                       
+!                                                                       
+!                         Part 1.  Call Sequence                        
+!                         ----------------------                        
+!                                                                       
+!     Arguments                                                         
+!     ---------                                                         
+!     The call sequence parameters used for input only are              
+!                                                                       
+!        F, NEQ, TOUT, ITOL, RelTol, AbsTol, ITASK, IOPT, LRW, LIW, JAC, MF,
+!                                                                       
+!     and those used for both input and output are                      
+!                                                                       
+!        Y, T, ISTATE.                                                  
+!                                                                       
+!     The work arrays RWORK and IWORK are also used for conditional and 
+!     optional inputs and optional outputs.  (The term output here      
+!     refers to the return from subroutine DLSODE to the user's calling 
+!     program.)                                                         
+!                                                                       
+!     The legality of input parameters will be thoroughly checked on the
+!     initial call for the problem, but not checked thereafter unless a 
+!     change in input parameters is flagged by ISTATE = 3 on input.     
+!                                                                       
+!     The descriptions of the call arguments are as follows.            
+!                                                                       
+!     F        The name of the user-supplied subroutine defining the ODE
+!              system.  The system must be put in the first-order form  
+!              dy/dt = f(t,y), where f is a vector-valued function of   
+!              the scalar t and the vector y. Subroutine F is to compute
+!              the function f. It is to have the form                   
+!                                                                       
+!                 SUBROUTINE F (NEQ, T, Y, YDOT)                        
+!                 KPP_REAL  T, Y(*), YDOT(*)                    
+!                                                                       
+!              where NEQ, T, and Y are input, and the array YDOT =      
+!              f(T,Y) is output.  Y and YDOT are arrays of length NEQ.  
+!              Subroutine F should not alter Y(1),...,Y(NEQ).  F must be
+!              declared EXTERNAL in the calling program.                
+!                                                                       
+!              Subroutine F may access user-defined quantities in       
+!              NEQ(2),... and/or in Y(NEQ+1),..., if NEQ is an array 
+!              (dimensioned in F) and/or Y has length exceeding NEQ. 
+!              See the descriptions of NEQ and Y below.                 
+!                                                                       
+!              If quantities computed in the F routine are needed       
+!              externally to DLSODE, an extra call to F should be made  
+!              for this purpose, for consistent and accurate results.   
+!              If only the derivative dy/dt is needed, use DINTDY       
+!              instead.                                                 
+!                                                                       
+!     NEQ      The size of the ODE system (number of first-order        
+!              ordinary differential equations).  Used only for input.  
+!              NEQ may be decreased, but not increased, during the      
+!              problem.  If NEQ is decreased (with ISTATE = 3 on input),
+!              the remaining components of Y should be left undisturbed,
+!              if these are to be accessed in F and/or JAC.             
+!                                                                       
+!              Normally, NEQ is a scalar, and it is generally referred  
+!              to as a scalar in this user interface description.       
+!              However, NEQ may be an array, with NEQ set to the     
+!              system size.  (The DLSODE package accesses only NEQ.) 
+!              In either case, this parameter is passed as the NEQ      
+!              argument in all calls to F and JAC.  Hence, if it is an  
+!              array, locations NEQ(2),... may be used to store other   
+!              integer data and pass it to F and/or JAC.  Subroutines   
+!              F and/or JAC must include NEQ in a DIMENSION statement   
+!              in that case.                                            
+!                                                                       
+!     Y        A real array for the vector of dependent variables, of   
+!              length NEQ or more.  Used for both input and output on   
+!              the first call (ISTATE = 1), and only for output on      
+!              other calls.  On the first call, Y must contain the      
+!              vector of initial values.  On output, Y contains the     
+!              computed solution vector, evaluated at T. If desired,    
+!              the Y array may be used for other purposes between       
+!              calls to the solver.                                     
+!                                                                       
+!              This array is passed as the Y argument in all calls to F 
+!              and JAC.  Hence its length may exceed NEQ, and locations 
+!              Y(NEQ+1),... may be used to store other real data and    
+!              pass it to F and/or JAC.  (The DLSODE package accesses   
+!              only Y(1),...,Y(NEQ).)                                   
+!                                                                       
+!     T        The independent variable.  On input, T is used only on   
+!              the first call, as the initial point of the integration. 
+!              On output, after each call, T is the value at which a    
+!              computed solution Y is evaluated (usually the same as    
+!              TOUT).  On an error return, T is the farthest point      
+!              reached.                                                 
+!                                                                       
+!     TOUT     The next value of T at which a computed solution is      
+!              desired.  Used only for input.                           
+!                                                                       
+!              When starting the problem (ISTATE = 1), TOUT may be equal
+!              to T for one call, then should not equal T for the next  
+!              call.  For the initial T, an input value of TOUT .NE. T  
+!              is used in order to determine the direction of the       
+!              integration (i.e., the algebraic sign of the step sizes) 
+!              and the rough scale of the problem.  Integration in      
+!              either direction (forward or backward in T) is permitted.
+!                                                                       
+!              If ITASK = 2 or 5 (one-step modes), TOUT is ignored      
+!              after the first call (i.e., the first call with          
+!              TOUT .NE. T).  Otherwise, TOUT is required on every call.
+!                                                                       
+!              If ITASK = 1, 3, or 4, the values of TOUT need not be    
+!              monotone, but a value of TOUT which backs up is limited  
+!              to the current internal T interval, whose endpoints are  
+!              TCUR - HU and TCUR.  (See "Optional Outputs" below for   
+!              TCUR and HU.)                                            
+!                                                                       
+!                                                                       
+!     ITOL     An indicator for the type of error control.  See         
+!              description below under AbsTol.  Used only for input.      
+!                                                                       
+!     RelTol     A relative error tolerance parameter, either a scalar or 
+!              an array of length NEQ.  See description below under     
+!              AbsTol.  Input only.                                       
+!                                                                       
+!     AbsTol     An absolute error tolerance parameter, either a scalar or
+!              an array of length NEQ.  Input only.                     
+!                                                                       
+!              The input parameters ITOL, RelTol, and AbsTol determine the  
+!              error control performed by the solver.  The solver will  
+!              control the vector e = (e(i)) of estimated local errors  
+!              in Y, according to an inequality of the form             
+!                                                                       
+!                 rms-norm of ( e(i)/EWT(i) ) <= 1,                     
+!                                                                       
+!              where                                                    
+!                                                                       
+!                 EWT(i) = RelTol(i)*ABS(Y(i)) + AbsTol(i),                 
+!                                                                       
+!              and the rms-norm (root-mean-square norm) here is         
+!                                                                       
+!                 rms-norm(v) = SQRT(sum v(i)**2 / NEQ).                
+!                                                                       
+!              Here EWT = (EWT(i)) is a vector of weights which must    
+!              always be positive, and the values of RelTol and AbsTol      
+!              should all be nonnegative.  The following table gives the
+!              types (scalar/array) of RelTol and AbsTol, and the           
+!              corresponding form of EWT(i).                            
+!                                                                       
+!              ITOL    RelTol      AbsTol      EWT(i)                       
+!              ----    ------    ------    -----------------------------
+!              1       scalar    scalar    RelTol*ABS(Y(i)) + AbsTol        
+!              2       scalar    array     RelTol*ABS(Y(i)) + AbsTol(i)     
+!              3       array     scalar    RelTol(i)*ABS(Y(i)) + AbsTol     
+!              4       array     array     RelTol(i)*ABS(Y(i)) + AbsTol(i)  
+!                                                                       
+!              When either of these parameters is a scalar, it need not 
+!              be dimensioned in the user's calling program.            
+!                                                                       
+!              If none of the above choices (with ITOL, RelTol, and AbsTol  
+!              fixed throughout the problem) is suitable, more general  
+!              error controls can be obtained by substituting           
+!              user-supplied routines for the setting of EWT and/or for 
+!              the norm calculation.  See Part 4 below.                 
+!                                                                       
+!              If global errors are to be estimated by making a repeated
+!              run on the same problem with smaller tolerances, then all
+!              components of RelTol and AbsTol (i.e., of EWT) should be     
+!              scaled down uniformly.                                   
+!                                                                       
+!     ITASK    An index specifying the task to be performed.  Input     
+!              only.  ITASK has the following values and meanings:      
+!              1   Normal computation of output values of y(t) at       
+!                  t = TOUT (by overshooting and interpolating).        
+!              2   Take one step only and return.                       
+!              3   Stop at the first internal mesh point at or beyond   
+!                  t = TOUT and return.                                 
+!              4   Normal computation of output values of y(t) at       
+!                  t = TOUT but without overshooting t = TCRIT.  TCRIT  
+!                  must be input as RWORK(1).  TCRIT may be equal to or 
+!                  beyond TOUT, but not behind it in the direction of   
+!                  integration.  This option is useful if the problem   
+!                  has a singularity at or beyond t = TCRIT.            
+!              5   Take one step, without passing TCRIT, and return.    
+!                  TCRIT must be input as RWORK(1).                     
+!                                                                       
+!              Note:  If ITASK = 4 or 5 and the solver reaches TCRIT    
+!              (within roundoff), it will return T = TCRIT (exactly) to 
+!              indicate this (unless ITASK = 4 and TOUT comes before    
+!              TCRIT, in which case answers at T = TOUT are returned    
+!              first).                                                  
+!                                                                       
+!     ISTATE   An index used for input and output to specify the state  
+!              of the calculation.                                      
+!                                                                       
+!              On input, the values of ISTATE are as follows:           
+!              1   This is the first call for the problem               
+!                  (initializations will be done).  See "Note" below.   
+!              2   This is not the first call, and the calculation is to
+!                  continue normally, with no change in any input       
+!                  parameters except possibly TOUT and ITASK.  (If ITOL,
+!                  RelTol, and/or AbsTol are changed between calls with     
+!                  ISTATE = 2, the new values will be used but not      
+!                  tested for legality.)                                
+!              3   This is not the first call, and the calculation is to
+!                  continue normally, but with a change in input        
+!                  parameters other than TOUT and ITASK.  Changes are   
+!                  allowed in NEQ, ITOL, RelTol, AbsTol, IOPT, LRW, LIW, MF,
+!                  ML, MU, and any of the optional inputs except H0.    
+!                  (See IWORK description for ML and MU.)               
+!                                                                       
+!              Note:  A preliminary call with TOUT = T is not counted as
+!              a first call here, as no initialization or checking of   
+!              input is done.  (Such a call is sometimes useful for the 
+!              purpose of outputting the initial conditions.)  Thus the 
+!              first call for which TOUT .NE. T requires ISTATE = 1 on  
+!              input.                                                   
+!                                                                       
+!              On output, ISTATE has the following values and meanings: 
+!               1  Nothing was done, as TOUT was equal to T with        
+!                  ISTATE = 1 on input.                                 
+!               2  The integration was performed successfully.          
+!              -1  An excessive amount of work (more than MXSTEP steps) 
+!                  was done on this call, before completing the         
+!                  requested task, but the integration was otherwise    
+!                  successful as far as T. (MXSTEP is an optional input 
+!                  and is normally 500.)  To continue, the user may     
+!                  simply reset ISTATE to a value >1 and call again (the
+!                  excess work step counter will be reset to 0).  In    
+!                  addition, the user may increase MXSTEP to avoid this 
+!                  error return; see "Optional Inputs" below.           
+!              -2  Too much accuracy was requested for the precision of 
+!                  the machine being used.  This was detected before    
+!                  completing the requested task, but the integration   
+!                  was successful as far as T. To continue, the         
+!                  tolerance parameters must be reset, and ISTATE must  
+!                  be set to 3. The optional output TOLSF may be used   
+!                  for this purpose.  (Note:  If this condition is      
+!                  detected before taking any steps, then an illegal    
+!                  input return (ISTATE = -3) occurs instead.)          
+!              -3  Illegal input was detected, before taking any        
+!                  integration steps.  See written message for details. 
+!                  (Note:  If the solver detects an infinite loop of    
+!                  calls to the solver with illegal input, it will cause
+!                  the run to stop.)                                    
+!              -4  There were repeated error-test failures on one       
+!                  attempted step, before completing the requested task,
+!                  but the integration was successful as far as T.  The 
+!                  problem may have a singularity, or the input may be  
+!                  inappropriate.                                       
+!              -5  There were repeated convergence-test failures on one 
+!                  attempted step, before completing the requested task,
+!                  but the integration was successful as far as T. This 
+!                  may be caused by an inaccurate Jacobian matrix, if   
+!                  one is being used.                                   
+!              -6  EWT(i) became zero for some i during the integration.
+!                  Pure relative error control (AbsTol(i)=0.0) was        
+!                  requested on a variable which has now vanished.  The 
+!                  integration was successful as far as T.              
+!                                                                       
+!              Note:  Since the normal output value of ISTATE is 2, it  
+!              does not need to be reset for normal continuation.  Also,
+!              since a negative input value of ISTATE will be regarded  
+!              as illegal, a negative output value requires the user to 
+!              change it, and possibly other inputs, before calling the 
+!              solver again.                                            
+!                                                                       
+!     IOPT     An integer flag to specify whether any optional inputs   
+!              are being used on this call.  Input only.  The optional  
+!              inputs are listed under a separate heading below.        
+!              0   No optional inputs are being used.  Default values   
+!                  will be used in all cases.                           
+!              1   One or more optional inputs are being used.          
+!                                                                       
+!     RWORK    A real working array (double precision).  The length of  
+!              RWORK must be at least                                   
+!                                                                       
+!                 20 + NYH*(MAXORD + 1) + 3*NEQ + LWM                   
+!                                                                       
+!              where                                                    
+!                 NYH = the initial value of NEQ,                       
+!              MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a   
+!                       smaller value is given as an optional input),   
+!                 LWM = 0           if MITER = 0,                       
+!                 LWM = NEQ**2 + 2  if MITER = 1 or 2,                  
+!                 LWM = NEQ + 2     if MITER = 3, and                   
+!                 LWM = (2*ML + MU + 1)*NEQ + 2                         
+!                                   if MITER = 4 or 5.                  
+!              (See the MF description below for METH and MITER.)       
+!                                                                       
+!              Thus if MAXORD has its default value and NEQ is constant,
+!              this length is:                                          
+!              20 + 16*NEQ                    for MF = 10,              
+!              22 + 16*NEQ + NEQ**2           for MF = 11 or 12,        
+!              22 + 17*NEQ                    for MF = 13,              
+!              22 + 17*NEQ + (2*ML + MU)*NEQ  for MF = 14 or 15,        
+!              20 +  9*NEQ                    for MF = 20,              
+!              22 +  9*NEQ + NEQ**2           for MF = 21 or 22,        
+!              22 + 10*NEQ                    for MF = 23,              
+!              22 + 10*NEQ + (2*ML + MU)*NEQ  for MF = 24 or 25.        
+!                                                                       
+!              The first 20 words of RWORK are reserved for conditional 
+!              and optional inputs and optional outputs.                
+!                                                                       
+!              The following word in RWORK is a conditional input:      
+!              RWORK(1) = TCRIT, the critical value of t which the      
+!                         solver is not to overshoot.  Required if ITASK
+!                         is 4 or 5, and ignored otherwise.  See ITASK. 
+!                                                                       
+!     LRW      The length of the array RWORK, as declared by the user.  
+!              (This will be checked by the solver.)                    
+!                                                                       
+!     IWORK    An integer work array.  Its length must be at least      
+!              20       if MITER = 0 or 3 (MF = 10, 13, 20, 23), or     
+!              20 + NEQ otherwise (MF = 11, 12, 14, 15, 21, 22, 24, 25).
+!              (See the MF description below for MITER.)  The first few 
+!              words of IWORK are used for conditional and optional     
+!              inputs and optional outputs.                             
+!                                                                       
+!              The following two words in IWORK are conditional inputs: 
+!              IWORK(1) = ML   These are the lower and upper half-      
+!              IWORK(2) = MU   bandwidths, respectively, of the banded  
+!                              Jacobian, excluding the main diagonal.   
+!                         The band is defined by the matrix locations   
+!                         (i,j) with i - ML <= j <= i + MU. ML and MU   
+!                         must satisfy 0 <= ML,MU <= NEQ - 1. These are 
+!                         required if MITER is 4 or 5, and ignored      
+!                         otherwise.  ML and MU may in fact be the band 
+!                         parameters for a matrix to which df/dy is only
+!                         approximately equal.                          
+!                                                                       
+!     LIW      The length of the array IWORK, as declared by the user.  
+!              (This will be checked by the solver.)                    
+!                                                                       
+!     Note:  The work arrays must not be altered between calls to DLSODE
+!     for the same problem, except possibly for the conditional and     
+!     optional inputs, and except for the last 3*NEQ words of RWORK.    
+!     The latter space is used for internal scratch space, and so is    
+!     available for use by the user outside DLSODE between calls, if    
+!     desired (but not for use by F or JAC).                            
+!                                                                       
+!     JAC      The name of the user-supplied routine (MITER = 1 or 4) to
+!              compute the Jacobian matrix, df/dy, as a function of the 
+!              scalar t and the vector y.  (See the MF description below
+!              for MITER.)  It is to have the form                      
+!                                                                       
+!                 SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD)        
+!                 KPP_REAL T, Y(*), PD(NROWPD,*)                
+!                                                                       
+!              where NEQ, T, Y, ML, MU, and NROWPD are input and the    
+!              array PD is to be loaded with partial derivatives        
+!              (elements of the Jacobian matrix) on output.  PD must be 
+!              given a first dimension of NROWPD.  T and Y have the same
+!              meaning as in subroutine F.                              
+!                                                                       
+!              In the full matrix case (MITER = 1), ML and MU are       
+!              ignored, and the Jacobian is to be loaded into PD in     
+!              columnwise manner, with df(i)/dy(j) loaded into PD(i,j). 
+!                                                                       
+!              In the band matrix case (MITER = 4), the elements within 
+!              the band are to be loaded into PD in columnwise manner,  
+!              with diagonal lines of df/dy loaded into the rows of PD. 
+!              Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).  ML
+!              and MU are the half-bandwidth parameters (see IWORK).    
+!              The locations in PD in the two triangular areas which    
+!              correspond to nonexistent matrix elements can be ignored 
+!              or loaded arbitrarily, as they are overwritten by DLSODE.
+!                                                                       
+!              JAC need not provide df/dy exactly. A crude approximation
+!              (possibly with a smaller bandwidth) will do.             
+!                                                                       
+!              In either case, PD is preset to zero by the solver, so   
+!              that only the nonzero elements need be loaded by JAC.    
+!              Each call to JAC is preceded by a call to F with the same
+!              arguments NEQ, T, and Y. Thus to gain some efficiency,   
+!              intermediate quantities shared by both calculations may  
+!              be saved in a user COMMON block by F and not recomputed  
+!              by JAC, if desired.  Also, JAC may alter the Y array, if 
+!              desired.  JAC must be declared EXTERNAL in the calling   
+!              program.                                                 
+!                                                                       
+!              Subroutine JAC may access user-defined quantities in     
+!              NEQ(2),... and/or in Y(NEQ+1),... if NEQ is an array  
+!              (dimensioned in JAC) and/or Y has length exceeding       
+!              NEQ.  See the descriptions of NEQ and Y above.        
+!                                                                       
+!     MF       The method flag.  Used only for input.  The legal values 
+!              of MF are 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24,    
+!              and 25.  MF has decimal digits METH and MITER:           
+!                 MF = 10*METH + MITER .                                
+!                                                                       
+!              METH indicates the basic linear multistep method:        
+!              1   Implicit Adams method.                               
+!              2   Method based on backward differentiation formulas    
+!                  (BDF's).                                             
+!                                                                       
+!              MITER indicates the corrector iteration method:          
+!              0   Functional iteration (no Jacobian matrix is          
+!                  involved).                                           
+!              1   Chord iteration with a user-supplied full (NEQ by    
+!                  NEQ) Jacobian.                                       
+!              2   Chord iteration with an internally generated         
+!                  (difference quotient) full Jacobian (using NEQ       
+!                  extra calls to F per df/dy value).                   
+!              3   Chord iteration with an internally generated         
+!                  diagonal Jacobian approximation (using one extra call
+!                  to F per df/dy evaluation).                          
+!              4   Chord iteration with a user-supplied banded Jacobian.
+!              5   Chord iteration with an internally generated banded  
+!                  Jacobian (using ML + MU + 1 extra calls to F per     
+!                  df/dy evaluation).                                   
+!                                                                       
+!              If MITER = 1 or 4, the user must supply a subroutine JAC 
+!              (the name is arbitrary) as described above under JAC.    
+!              For other values of MITER, a dummy argument can be used. 
+!                                                                       
+!     Optional Inputs                                                   
+!     ---------------                                                   
+!     The following is a list of the optional inputs provided for in the
+!     call sequence.  (See also Part 2.)  For each such input variable, 
+!     this table lists its name as used in this documentation, its      
+!     location in the call sequence, its meaning, and the default value.
+!     The use of any of these inputs requires IOPT = 1, and in that case
+!     all of these inputs are examined.  A value of zero for any of     
+!     these optional inputs will cause the default value to be used.    
+!     Thus to use a subset of the optional inputs, simply preload       
+!     locations 5 to 10 in RWORK and IWORK to 0.0 and 0 respectively,   
+!     and then set those of interest to nonzero values.                 
+!                                                                       
+!     Name    Location   Meaning and default value                      
+!     ------  ---------  -----------------------------------------------
+!     H0      RWORK(5)   Step size to be attempted on the first step.   
+!                        The default value is determined by the solver. 
+!     HMAX    RWORK(6)   Maximum absolute step size allowed.  The       
+!                        default value is infinite.                     
+!     HMIN    RWORK(7)   Minimum absolute step size allowed.  The       
+!                        default value is 0.  (This lower bound is not  
+!                        enforced on the final step before reaching     
+!                        TCRIT when ITASK = 4 or 5.)                    
+!     MAXORD  IWORK(5)   Maximum order to be allowed.  The default value
+!                        is 12 if METH = 1, and 5 if METH = 2. (See the 
+!                        MF description above for METH.)  If MAXORD     
+!                        exceeds the default value, it will be reduced  
+!                        to the default value.  If MAXORD is changed    
+!                        during the problem, it may cause the current   
+!                        order to be reduced.                           
+!     MXSTEP  IWORK(6)   Maximum number of (internally defined) steps   
+!                        allowed during one call to the solver.  The    
+!                        default value is 500.                          
+!     MXHNIL  IWORK(7)   Maximum number of messages printed (per        
+!                        problem) warning that T + H = T on a step      
+!                        (H = step size).  This must be positive to     
+!                        result in a nondefault value.  The default     
+!                        value is 10.                                   
+!                                                                       
+!     Optional Outputs                                                  
+!     ----------------                                                  
+!     As optional additional output from DLSODE, the variables listed   
+!     below are quantities related to the performance of DLSODE which   
+!     are available to the user.  These are communicated by way of the  
+!     work arrays, but also have internal mnemonic names as shown.      
+!     Except where stated otherwise, all of these outputs are defined on
+!     any successful return from DLSODE, and on any return with ISTATE =
+!     -1, -2, -4, -5, or -6.  On an illegal input return (ISTATE = -3), 
+!     they will be unchanged from their existing values (if any), except
+!     possibly for TOLSF, LENRW, and LENIW.  On any error return,       
+!     outputs relevant to the error will be defined, as noted below.    
+!                                                                       
+!     Name   Location   Meaning                                         
+!     -----  ---------  ------------------------------------------------
+!     HU     RWORK(11)  Step size in t last used (successfully).        
+!     HCUR   RWORK(12)  Step size to be attempted on the next step.     
+!     TCUR   RWORK(13)  Current value of the independent variable which 
+!                       the solver has actually reached, i.e., the      
+!                       current internal mesh point in t. On output,    
+!                       TCUR will always be at least as far as the      
+!                       argument T, but may be farther (if interpolation
+!                       was done).                                      
+!     TOLSF  RWORK(14)  Tolerance scale factor, greater than 1.0,       
+!                       computed when a request for too much accuracy   
+!                       was detected (ISTATE = -3 if detected at the    
+!                       start of the problem, ISTATE = -2 otherwise).   
+!                       If ITOL is left unaltered but RelTol and AbsTol are 
+!                       uniformly scaled up by a factor of TOLSF for the
+!                       next call, then the solver is deemed likely to  
+!                       succeed.  (The user may also ignore TOLSF and   
+!                       alter the tolerance parameters in any other way 
+!                       appropriate.)                                   
+!     NST    IWORK(11)  Number of steps taken for the problem so far.   
+!     NFE    IWORK(12)  Number of F evaluations for the problem so far. 
+!     NJE    IWORK(13)  Number of Jacobian evaluations (and of matrix LU
+!                       decompositions) for the problem so far.         
+!     NQU    IWORK(14)  Method order last used (successfully).          
+!     NQCUR  IWORK(15)  Order to be attempted on the next step.         
+!     IMXER  IWORK(16)  Index of the component of largest magnitude in  
+!                       the weighted local error vector ( e(i)/EWT(i) ),
+!                       on an error return with ISTATE = -4 or -5.      
+!     LENRW  IWORK(17)  Length of RWORK actually required.  This is     
+!                       defined on normal returns and on an illegal     
+!                       input return for insufficient storage.          
+!     LENIW  IWORK(18)  Length of IWORK actually required.  This is     
+!                       defined on normal returns and on an illegal     
+!                       input return for insufficient storage.          
+!                                                                       
+!     The following two arrays are segments of the RWORK array which may
+!     also be of interest to the user as optional outputs.  For each    
+!     array, the table below gives its internal name, its base address  
+!     in RWORK, and its description.                                    
+!                                                                       
+!     Name  Base address  Description                                   
+!     ----  ------------  ----------------------------------------------
+!     YH    21            The Nordsieck history array, of size NYH by   
+!                         (NQCUR + 1), where NYH is the initial value of
+!                         NEQ.  For j = 0,1,...,NQCUR, column j + 1 of  
+!                         YH contains HCUR**j/factorial(j) times the jth
+!                         derivative of the interpolating polynomial    
+!                         currently representing the solution, evaluated
+!                         at t = TCUR.                                  
+!     ACOR  LENRW-NEQ+1   Array of size NEQ used for the accumulated    
+!                         corrections on each step, scaled on output to 
+!                         represent the estimated local error in Y on   
+!                         the last step.  This is the vector e in the   
+!                         description of the error control.  It is      
+!                         defined only on successful return from DLSODE.
+!                                                                       
+!                                                                       
+!                    Part 2.  Other Callable Routines                   
+!                    --------------------------------                   
+!                                                                       
+!     The following are optional calls which the user may make to gain  
+!     additional capabilities in conjunction with DLSODE.               
+!                                                                       
+!     Form of call              Function                                
+!     ------------------------  ----------------------------------------
+!     CALL XSETUN(LUN)          Set the logical unit number, LUN, for   
+!                               output of messages from DLSODE, if the  
+!                               default is not desired.  The default    
+!                               value of LUN is 6. This call may be made
+!                               at any time and will take effect        
+!                               immediately.                            
+!     CALL XSETF(MFLAG)         Set a flag to control the printing of   
+!                               messages by DLSODE.  MFLAG = 0 means do 
+!                               not print.  (Danger:  this risks losing 
+!                               valuable information.)  MFLAG = 1 means 
+!                               print (the default).  This call may be  
+!                               made at any time and will take effect   
+!                               immediately.                            
+!     CALL DSRCOM(RSAV,ISAV,JOB)  Saves and restores the contents of the
+!                               internal COMMON blocks used by DLSODE   
+!                               (see Part 3 below).  RSAV must be a     
+!                               real array of length 218 or more, and   
+!                               ISAV must be an integer array of length 
+!                               37 or more.  JOB = 1 means save COMMON  
+!                               into RSAV/ISAV.  JOB = 2 means restore  
+!                               COMMON from same.  DSRCOM is useful if  
+!                               one is interrupting a run and restarting
+!                               later, or alternating between two or    
+!                               more problems solved with DLSODE.       
+!     CALL DINTDY(,,,,,)        Provide derivatives of y, of various    
+!     (see below)               orders, at a specified point t, if      
+!                               desired.  It may be called only after a 
+!                               successful return from DLSODE.  Detailed
+!                               instructions follow.                    
+!                                                                       
+!     Detailed instructions for using DINTDY                            
+!     --------------------------------------                            
+!     The form of the CALL is:                                          
+!                                                                       
+!           CALL DINTDY (T, K, RWORK(21), NYH, DKY, IFLAG)              
+!                                                                       
+!     The input parameters are:                                         
+!                                                                       
+!     T          Value of independent variable where answers are        
+!                desired (normally the same as the T last returned by   
+!                DLSODE).  For valid results, T must lie between        
+!                TCUR - HU and TCUR.  (See "Optional Outputs" above     
+!                for TCUR and HU.)                                      
+!     K          Integer order of the derivative desired.  K must       
+!                satisfy 0 <= K <= NQCUR, where NQCUR is the current    
+!                order (see "Optional Outputs").  The capability        
+!                corresponding to K = 0, i.e., computing y(t), is       
+!                already provided by DLSODE directly.  Since            
+!                NQCUR >= 1, the first derivative dy/dt is always       
+!                available with DINTDY.                                 
+!     RWORK(21)  The base address of the history array YH.              
+!     NYH        Column length of YH, equal to the initial value of NEQ.
+!                                                                       
+!     The output parameters are:                                        
+!                                                                       
+!     DKY        Real array of length NEQ containing the computed value 
+!                of the Kth derivative of y(t).                         
+!     IFLAG      Integer flag, returned as 0 if K and T were legal,     
+!                -1 if K was illegal, and -2 if T was illegal.          
+!                On an error return, a message is also written.         
+!                                                                       
+!                                                                       
+!                          Part 3.  Common Blocks                       
+!                          ----------------------                       
+!                                                                       
+!     If DLSODE is to be used in an overlay situation, the user must    
+!     declare, in the primary overlay, the variables in:                
+!     (1) the call sequence to DLSODE,                                  
+!     (2) the internal COMMON block /DLS001/, of length 255             
+!         (218 double precision words followed by 37 integer words).    
+!                                                                       
+!     If DLSODE is used on a system in which the contents of internal   
+!     COMMON blocks are not preserved between calls, the user should    
+!     declare the above COMMON block in his main program to insure that 
+!     its contents are preserved.                                       
+!                                                                       
+!     If the solution of a given problem by DLSODE is to be interrupted 
+!     and then later continued, as when restarting an interrupted run or
+!     alternating between two or more problems, the user should save,   
+!     following the return from the last DLSODE call prior to the       
+!     interruption, the contents of the call sequence variables and the 
+!     internal COMMON block, and later restore these values before the  
+!     next DLSODE call for that problem.   In addition, if XSETUN and/or
+!     XSETF was called for non-default handling of error messages, then 
+!     these calls must be repeated.  To save and restore the COMMON     
+!     block, use subroutine DSRCOM (see Part 2 above).                  
+!                                                                       
+!                                                                       
+!              Part 4.  Optionally Replaceable Solver Routines          
+!              -----------------------------------------------          
+!                                                                       
+!     Below are descriptions of two routines in the DLSODE package which
+!     relate to the measurement of errors.  Either routine can be       
+!     replaced by a user-supplied version, if desired.  However, since  
+!     such a replacement may have a major impact on performance, it     
+!     should be done only when absolutely necessary, and only with great
+!     caution.  (Note:  The means by which the package version of a     
+!     routine is superseded by the user's version may be system-        
+!     dependent.)                                                       
+!                                                                       
+!     DEWSET                                                            
+!     ------                                                            
+!     The following subroutine is called just before each internal      
+!     integration step, and sets the array of error weights, EWT, as    
+!     described under ITOL/RelTol/AbsTol above:                             
+!                                                                       
+!           SUBROUTINE DEWSET (NEQ, ITOL, RelTol, AbsTol, YCUR, EWT)        
+!                                                                       
+!     where NEQ, ITOL, RelTol, and AbsTol are as in the DLSODE call         
+!     sequence, YCUR contains the current dependent variable vector,    
+!     and EWT is the array of weights set by DEWSET.                    
+!                                                                       
+!     If the user supplies this subroutine, it must return in EWT(i)    
+!     (i = 1,...,NEQ) a positive quantity suitable for comparing errors 
+!     in Y(i) to.  The EWT array returned by DEWSET is passed to the    
+!     DVNORM routine (see below), and also used by DLSODE in the        
+!     computation of the optional output IMXER, the diagonal Jacobian   
+!     approximation, and the increments for difference quotient         
+!     Jacobians.                                                        
+!                                                                       
+!     In the user-supplied version of DEWSET, it may be desirable to use
+!     the current values of derivatives of y. Derivatives up to order NQ
+!     are available from the history array YH, described above under    
+!     optional outputs.  In DEWSET, YH is identical to the YCUR array,  
+!     extended to NQ + 1 columns with a column length of NYH and scale  
+!     factors of H**j/factorial(j).  On the first call for the problem, 
+!     given by NST = 0, NQ is 1 and H is temporarily set to 1.0.        
+!     NYH is the initial value of NEQ.  The quantities NQ, H, and NST   
+!     can be obtained by including in SEWSET the statements:            
+!           KPP_REAL RLS                                        
+!           COMMON /DLS001/ RLS(218),ILS(37)                            
+!           NQ = ILS(33)                                                
+!           NST = ILS(34)                                               
+!           H = RLS(212)                                                
+!     Thus, for example, the current value of dy/dt can be obtained as  
+!     YCUR(NYH+i)/H (i=1,...,NEQ) (and the division by H is unnecessary 
+!     when NST = 0).                                                    
+!                                                                       
+!     DVNORM                                                            
+!     ------                                                            
+!     DVNORM is a real function routine which computes the weighted     
+!     root-mean-square norm of a vector v:                              
+!                                                                       
+!        d = DVNORM (n, v, w)                                           
+!                                                                       
+!     where:                                                            
+!     n = the length of the vector,                                     
+!     v = real array of length n containing the vector,                 
+!     w = real array of length n containing weights,                    
+!     d = SQRT( (1/n) * sum(v(i)*w(i))**2 ).                            
+!                                                                       
+!     DVNORM is called with n = NEQ and with w(i) = 1.0/EWT(i), where   
+!     EWT is as set by subroutine DEWSET.                               
+!                                                                       
+!     If the user supplies this function, it should return a nonnegative
+!     value of DVNORM suitable for use in the error control in DLSODE.  
+!     None of the arguments should be altered by DVNORM.  For example, a
+!     user-supplied DVNORM routine might:                               
+!     - Substitute a max-norm of (v(i)*w(i)) for the rms-norm, or       
+!     - Ignore some components of v in the norm, with the effect of     
+!       suppressing the error control on those components of Y.         
+!  ---------------------------------------------------------------------
+!***ROUTINES CALLED  DEWSET, DINTDY, DUMACH, DSTODE, DVNORM, XERRWD     
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYYYMMDD)                                        
+! 19791129  DATE WRITTEN                                                
+! 19791213  Minor changes to declarations; DELP init. in STODE.         
+! 19800118  Treat NEQ as array; integer declarations added throughout;  
+!           minor changes to prologue.                                  
+! 19800306  Corrected TESCO(1,NQP1) setting in CFODE.                   
+! 19800519  Corrected access of YH on forced order reduction;           
+!           numerous corrections to prologues and other comments.       
+! 19800617  In main driver, added loading of SQRT(UROUND) in RWORK;     
+!           minor corrections to main prologue.                         
+! 19800923  Added zero initialization of HU and NQU.                    
+! 19801218  Revised XERRWD routine; minor corrections to main prologue. 
+! 19810401  Minor changes to comments and an error message.             
+! 19810814  Numerous revisions: replaced EWT by 1/EWT; used flags       
+!           JCUR, ICF, IERPJ, IERSL between STODE and subordinates;     
+!           added tuning parameters CCMAX, MAXCOR, MSBP, MXNCF;         
+!           reorganized returns from STODE; reorganized type decls.;    
+!           fixed message length in XERRWD; changed default LUNIT to 6; 
+!           changed Common lengths; changed comments throughout.        
+! 19870330  Major update by ACH: corrected comments throughout;         
+!           removed TRET from Common; rewrote EWSET with 4 loops;       
+!           fixed t test in INTDY; added Cray directives in STODE;      
+!           in STODE, fixed DELP init. and logic around PJAC call;      
+!           combined routines to save/restore Common;                   
+!           passed LEVEL = 0 in error message calls (except run abort). 
+! 19890426  Modified prologue to SLATEC/LDOC format.  (FNF)             
+! 19890501  Many improvements to prologue.  (FNF)                       
+! 19890503  A few final corrections to prologue.  (FNF)                 
+! 19890504  Minor cosmetic changes.  (FNF)                              
+! 19890510  Corrected description of Y in Arguments section.  (FNF)     
+! 19890517  Minor corrections to prologue.  (FNF)                       
+! 19920514  Updated with prologue edited 891025 by G. Shaw for manual.  
+! 19920515  Converted source lines to upper case.  (FNF)                
+! 19920603  Revised XERRWD calls using mixed upper-lower case.  (ACH)   
+! 19920616  Revised prologue comment regarding CFT.  (ACH)              
+! 19921116  Revised prologue comments regarding Common.  (ACH).         
+! 19930326  Added comment about non-reentrancy.  (FNF)                  
+! 19930723  Changed D1MACH to DUMACH. (FNF)                             
+! 19930801  Removed ILLIN and NTREP from Common (affects driver logic); 
+!           minor changes to prologue and internal comments;            
+!           changed Hollerith strings to quoted strings;                
+!           changed internal comments to mixed case;                    
+!           replaced XERRWD with new version using character type;      
+!           changed dummy dimensions from 1 to *. (ACH)                 
+! 19930809  Changed to generic intrinsic names; changed names of        
+!           subprograms and Common blocks to DLSODE etc. (ACH)          
+! 19930929  Eliminated use of REAL intrinsic; other minor changes. (ACH)
+! 20010412  Removed all 'own' variables from Common block /DLS001/      
+!           (affects declarations in 6 routines). (ACH)                 
+! 20010509  Minor corrections to prologue. (ACH)                        
+! 20031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+! 20031112  Added SAVE statements for data-loaded constants.            
+!                                                                       
+!***END PROLOGUE  DLSODE                                                
+!                                                                       
+!*Internal Notes:                                                       
+!                                                                       
+! Other Routines in the DLSODE Package.                                 
+!                                                                       
+! In addition to Subroutine DLSODE, the DLSODE package includes the     
+! following subroutines and function routines:                          
+!  DINTDY   computes an interpolated value of the y vector at t = TOUT. 
+!  DSTODE   is the core integrator, which does one step of the          
+!           integration and the associated error control.               
+!  DCFODE   sets all method coefficients and test constants.            
+!  DPREPJ   computes and preprocesses the Jacobian matrix J = df/dy     
+!           and the Newton iteration matrix P = I - h*l0*J.             
+!  DSOLSY   manages solution of linear system in chord iteration.       
+!  DEWSET   sets the error weight vector EWT before each step.          
+!  DVNORM   computes the weighted R.M.S. norm of a vector.              
+!  DSRCOM   is a user-callable routine to save and restore              
+!           the contents of the internal Common block.                  
+!  DGEFA and DGESL   are routines from LINPACK for solving full         
+!           systems of linear algebraic equations.                      
+!  DGBFA and DGBSL   are routines from LINPACK for solving banded       
+!           linear systems.                                             
+!  DUMACH   computes the unit roundoff in a machine-independent manner. 
+!  XERRWD, XSETUN, XSETF, IXSAV, IUMACH   handle the printing of all    
+!           error messages and warnings.  XERRWD is machine-dependent.  
+! Note: DVNORM, DUMACH, IXSAV, and IUMACH are function routines.        
+! All the others are subroutines.                                       
+!                                                                       
+!**End                                                                  
+!                                                                       
+!  Declare externals.
+!  Note: they are now internal                                                   
+      !EXTERNAL DPREPJ, DSOLSY 
+      !KPP_REAL DUMACH, DVNORM 
+!                                                                       
+!  Declare all other variables.                                         
+      INTEGER INIT, MXSTEP, MXHNIL, NHNIL, NSLAST, NYH, IOWNS,          &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                      &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,                &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, I1, I2, IFLAG, IMXER, KGO, LF0,                        &
+        LENIW, LENRW, LENWM, ML, MORD(2), MU, MXHNL0, MXSTP0              
+      KPP_REAL ROWNS,                                           &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      KPP_REAL AbsTolI, AYI, BIG, EWTI, H0, HMAX, HMX, RH, RelTolI, &
+        TCRIT, TDIST, TNEXT, TOL, TOLSF, TP, SIZE, SUM, W0             
+
+      LOGICAL IHIT 
+      CHARACTER*80 MSG 
+      SAVE MORD, MXSTP0, MXHNL0 
+!-----------------------------------------------------------------------
+! The following internal Common block contains                          
+! (a) variables which are local to any subroutine but whose values must 
+!     be preserved between calls to the routine ("own" variables), and  
+! (b) variables which are communicated between subroutines.             
+! The block DLS001 is declared in subroutines DLSODE, DINTDY, DSTODE,   
+! DPREPJ, and DSOLSY.                                                   
+! Groups of variables are replaced by dummy arrays in the Common        
+! declarations in routines where those variables are not used.          
+!-----------------------------------------------------------------------
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        INIT, MXSTEP, MXHNIL, NHNIL, NSLAST, NYH, IOWNS(6),            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+!                                                                       
+      DATA  MORD(1),MORD(2)/12,5/, MXSTP0/500/, MXHNL0/10/ 
+!-----------------------------------------------------------------------
+! Block A.                                                              
+! This code block is executed on every call.                            
+! It tests ISTATE and ITASK for legality and branches appropriately.    
+! If ISTATE .GT. 1 but the flag INIT shows that initialization has      
+! not yet been done, an error return occurs.                            
+! If ISTATE = 1 and TOUT = T, return immediately.                       
+!-----------------------------------------------------------------------
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DLSODE                                  
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601 
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602 
+      IF (ISTATE .EQ. 1) GO TO 10 
+      IF (INIT .EQ. 0) GO TO 603 
+      IF (ISTATE .EQ. 2) GO TO 200 
+      GO TO 20 
+   10 INIT = 0 
+      IF (TOUT .EQ. T) RETURN 
+!-----------------------------------------------------------------------
+! Block B.                                                              
+! The next code block is executed for the initial call (ISTATE = 1),    
+! or for a continuation call with parameter changes (ISTATE = 3).       
+! It contains checking of all inputs and various initializations.       
+!                                                                       
+! First check legality of the non-optional inputs NEQ, ITOL, IOPT,      
+! MF, ML, and MU.                                                       
+!-----------------------------------------------------------------------
+   20 IF (NEQ .LE. 0) GO TO 604 
+      IF (ISTATE .EQ. 1) GO TO 25 
+      IF (NEQ .GT. N) GO TO 605 
+   25 N = NEQ 
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606 
+      IF (IOPT .LT. 0 .OR. IOPT .GT. 1) GO TO 607 
+      METH = MF/10 
+      MITER = MF - 10*METH 
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608 
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608 
+      IF (MITER .LE. 3) GO TO 30 
+      ML = IWORK(1) 
+      MU = IWORK(2) 
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609 
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610 
+   30 CONTINUE 
+! Next process and check the optional inputs. --------------------------
+      IF (IOPT .EQ. 1) GO TO 40 
+      MAXORD = MORD(METH) 
+      MXSTEP = MXSTP0 
+      MXHNIL = MXHNL0 
+      IF (ISTATE .EQ. 1) H0 = 0.0D0 
+      HMXI = 0.0D0 
+      HMIN = 0.0D0 
+      GO TO 60 
+   40 MAXORD = IWORK(5) 
+      IF (MAXORD .LT. 0) GO TO 611 
+      IF (MAXORD .EQ. 0) MAXORD = 100 
+      MAXORD = MIN(MAXORD,MORD(METH)) 
+      MXSTEP = IWORK(6) 
+      IF (MXSTEP .LT. 0) GO TO 612 
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0 
+      MXHNIL = IWORK(7) 
+      IF (MXHNIL .LT. 0) GO TO 613 
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0 
+      IF (ISTATE .NE. 1) GO TO 50 
+      H0 = RWORK(5) 
+      IF ((TOUT - T)*H0 .LT. 0.0D0) GO TO 614 
+   50 HMAX = RWORK(6) 
+      IF (HMAX .LT. 0.0D0) GO TO 615 
+      HMXI = 0.0D0 
+      IF (HMAX .GT. 0.0D0) HMXI = 1.0D0/HMAX 
+      HMIN = RWORK(7) 
+      IF (HMIN .LT. 0.0D0) GO TO 616 
+!-----------------------------------------------------------------------
+! Set work array pointers and check lengths LRW and LIW.                
+! Pointers to segments of RWORK and IWORK are named by prefixing L to   
+! the name of the segment.  E.g., the segment YH starts at RWORK(LYH).  
+! Segments of RWORK (in order) are denoted  YH, WM, EWT, SAVF, ACOR.    
+!-----------------------------------------------------------------------
+   60 LYH = 21 
+      IF (ISTATE .EQ. 1) NYH = N 
+      LWM = LYH + (MAXORD + 1)*NYH 
+      IF (MITER .EQ. 0) LENWM = 0 
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) LENWM = N*N + 2 
+      IF (MITER .EQ. 3) LENWM = N + 2 
+      IF (MITER .GE. 4) LENWM = (2*ML + MU + 1)*N + 2 
+      LEWT = LWM + LENWM 
+      LSAVF = LEWT + N 
+      LACOR = LSAVF + N 
+      LENRW = LACOR + N - 1 
+      IWORK(17) = LENRW 
+      LIWM = 1 
+      LENIW = 20 + N 
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 20 
+      IWORK(18) = LENIW 
+      IF (LENRW .GT. LRW) GO TO 617 
+      IF (LENIW .GT. LIW) GO TO 618 
+! Check RelTol and AbsTol for legality. ------------------------------------
+      RelTolI = RelTol(1) 
+      AbsTolI = AbsTol(1) 
+      DO 70 I = 1,N 
+        IF (ITOL .GE. 3) RelTolI = RelTol(I) 
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I) 
+        IF (RelTolI .LT. 0.0D0) GO TO 619 
+        IF (AbsTolI .LT. 0.0D0) GO TO 620 
+   70   CONTINUE 
+      IF (ISTATE .EQ. 1) GO TO 100 
+! If ISTATE = 3, set flag to signal parameter changes to DSTODE. -------
+      JSTART = -1 
+      IF (NQ .LE. MAXORD) GO TO 90 
+! MAXORD was reduced below NQ.  Copy YH(*,MAXORD+2) into SAVF. ---------
+      DO 80 I = 1,N 
+   80   RWORK(I+LSAVF-1) = RWORK(I+LWM-1) 
+! Reload WM(1) = RWORK(LWM), since LWM may have changed. ---------------
+   90 IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND) 
+      IF (N .EQ. NYH) GO TO 200 
+! NEQ was reduced.  Zero part of YH to avoid undefined references. -----
+      I1 = LYH + L*NYH 
+      I2 = LYH + (MAXORD + 1)*NYH - 1 
+      IF (I1 .GT. I2) GO TO 200 
+      DO 95 I = I1,I2 
+   95   RWORK(I) = 0.0D0 
+      GO TO 200 
+!-----------------------------------------------------------------------
+! Block C.                                                              
+! The next block is for the initial call only (ISTATE = 1).             
+! It contains all remaining initializations, the initial call to F,     
+! and the calculation of the initial step size.                         
+! The error weights in EWT are inverted after being loaded.             
+!-----------------------------------------------------------------------
+  100 UROUND = DUMACH() 
+      TN = T 
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 110 
+      TCRIT = RWORK(1) 
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. 0.0D0) GO TO 625 
+      IF (H0 .NE. 0.0D0 .AND. (T + H0 - TCRIT)*H0 .GT. 0.0D0)           &
+        H0 = TCRIT - T                                                 
+  110 JSTART = 0 
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND) 
+      NHNIL = 0 
+      NST = 0 
+      NJE = 0 
+      NSLAST = 0 
+      HU = 0.0D0 
+      NQU = 0 
+      CCMAX = 0.3D0 
+      MAXCOR = 3 
+      MSBP = 20 
+      MXNCF = 10 
+! Initial call to F.  (LF0 points to YH(*,2).) -------------------------
+      LF0 = LYH + NYH 
+      CALL F (NEQ, T, Y, RWORK(LF0)) 
+      NFE = 1 
+! Load the initial value vector in YH. ---------------------------------
+      DO 115 I = 1,N 
+  115   RWORK(I+LYH-1) = Y(I) 
+! Load and invert the EWT array.  (H is temporarily set to 1.0.) -------
+      NQ = 1 
+      H = 1.0D0 
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT)) 
+      DO 120 I = 1,N 
+        IF (RWORK(I+LEWT-1) .LE. 0.0D0) GO TO 621 
+  120   RWORK(I+LEWT-1) = 1.0D0/RWORK(I+LEWT-1) 
+!-----------------------------------------------------------------------
+! The coding below computes the step size, H0, to be attempted on the   
+! first step, unless the user has supplied a value for this.            
+! First check that TOUT - T differs significantly from zero.            
+! A scalar tolerance quantity TOL is computed, as MAX(RelTol(I))          
+! if this is positive, or MAX(AbsTol(I)/ABS(Y(I))) otherwise, adjusted    
+! so as to be between 100*UROUND and 1.0E-3.                            
+! Then the computed value H0 is given by..                              
+!                                      NEQ                              
+!   H0**2 = TOL / ( w0**-2 + (1/NEQ) * SUM ( f(i)/ywt(i) )**2  )        
+!                                       1                               
+! where   w0     = MAX ( ABS(T), ABS(TOUT) ),                           
+!         f(i)   = i-th component of initial value of f,                
+!         ywt(i) = EWT(i)/TOL  (a weight for y(i)).                     
+! The sign of H0 is inferred from the initial values of TOUT and T.     
+!-----------------------------------------------------------------------
+      IF (H0 .NE. 0.0D0) GO TO 180 
+      TDIST = ABS(TOUT - T) 
+      W0 = MAX(ABS(T),ABS(TOUT)) 
+      IF (TDIST .LT. 2.0D0*UROUND*W0) GO TO 622 
+      TOL = RelTol(1) 
+      IF (ITOL .LE. 2) GO TO 140 
+      DO 130 I = 1,N 
+  130   TOL = MAX(TOL,RelTol(I)) 
+  140 IF (TOL .GT. 0.0D0) GO TO 160 
+      AbsTolI = AbsTol(1) 
+      DO 150 I = 1,N 
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I) 
+        AYI = ABS(Y(I)) 
+        IF (AYI .NE. 0.0D0) TOL = MAX(TOL,AbsTolI/AYI) 
+  150   CONTINUE 
+  160 TOL = MAX(TOL,100.0D0*UROUND) 
+      TOL = MIN(TOL,0.001D0) 
+      SUM = DVNORM (N, RWORK(LF0), RWORK(LEWT)) 
+      SUM = 1.0D0/(TOL*W0*W0) + TOL*SUM**2 
+      H0 = 1.0D0/SQRT(SUM) 
+      H0 = MIN(H0,TDIST) 
+      H0 = SIGN(H0,TOUT-T) 
+! Adjust H0 if necessary to meet HMAX bound. ---------------------------
+  180 RH = ABS(H0)*HMXI 
+      IF (RH .GT. 1.0D0) H0 = H0/RH 
+! Load H with H0 and scale YH(*,2) by H0. ------------------------------
+      H = H0 
+      DO 190 I = 1,N 
+  190   RWORK(I+LF0-1) = H0*RWORK(I+LF0-1) 
+      GO TO 270 
+!-----------------------------------------------------------------------
+! Block D.                                                              
+! The next code block is for continuation calls only (ISTATE = 2 or 3)  
+! and is to check stop conditions before taking a step.                 
+!-----------------------------------------------------------------------
+  200 NSLAST = NST 
+      GO TO (210, 250, 220, 230, 240), ITASK 
+  210 IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 250 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      IF (IFLAG .NE. 0) GO TO 627 
+      T = TOUT 
+      GO TO 420 
+  220 TP = TN - HU*(1.0D0 + 100.0D0*UROUND) 
+      IF ((TP - TOUT)*H .GT. 0.0D0) GO TO 623 
+      IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 250 
+      GO TO 400 
+  230 TCRIT = RWORK(1) 
+      IF ((TN - TCRIT)*H .GT. 0.0D0) GO TO 624 
+      IF ((TCRIT - TOUT)*H .LT. 0.0D0) GO TO 625 
+      IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 245 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      IF (IFLAG .NE. 0) GO TO 627 
+      T = TOUT 
+      GO TO 420 
+  240 TCRIT = RWORK(1) 
+      IF ((TN - TCRIT)*H .GT. 0.0D0) GO TO 624 
+  245 HMX = ABS(TN) + ABS(H) 
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX 
+      IF (IHIT) GO TO 400 
+      TNEXT = TN + H*(1.0D0 + 4.0D0*UROUND) 
+      IF ((TNEXT - TCRIT)*H .LE. 0.0D0) GO TO 250 
+      H = (TCRIT - TN)*(1.0D0 - 4.0D0*UROUND) 
+      IF (ISTATE .EQ. 2) JSTART = -2 
+!-----------------------------------------------------------------------
+! Block E.                                                              
+! The next block is normally executed for all calls and contains        
+! the call to the one-step core integrator DSTODE.                      
+!                                                                       
+! This is a looping point for the integration steps.                    
+!                                                                       
+! First check for too many steps being taken, update EWT (if not at     
+! start of problem), check for too much accuracy being requested, and   
+! check for H below the roundoff level in T.                            
+!-----------------------------------------------------------------------
+  250 CONTINUE 
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500 
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT)) 
+      DO 260 I = 1,N 
+        IF (RWORK(I+LEWT-1) .LE. 0.0D0) GO TO 510 
+  260   RWORK(I+LEWT-1) = 1.0D0/RWORK(I+LEWT-1) 
+  270 TOLSF = UROUND*DVNORM (N, RWORK(LYH), RWORK(LEWT)) 
+      IF (TOLSF .LE. 1.0D0) GO TO 280 
+      TOLSF = TOLSF*2.0D0 
+      IF (NST .EQ. 0) GO TO 626 
+      GO TO 520 
+  280 IF ((TN + H) .NE. TN) GO TO 290 
+      NHNIL = NHNIL + 1 
+      IF (NHNIL .GT. MXHNIL) GO TO 290 
+      MSG = 'DLSODE-  Warning..internal T (=R1) and H (=R2) are' 
+      CALL XERRWD (MSG, 50, 101, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG='      such that in the machine, T + H = T on the next step  ' 
+      CALL XERRWD (MSG, 60, 101, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      (H = step size). Solver will continue anyway' 
+      CALL XERRWD (MSG, 50, 101, 0, 0, 0, 0, 2, TN, H) 
+      IF (NHNIL .LT. MXHNIL) GO TO 290 
+      MSG = 'DLSODE-  Above warning has been issued I1 times.  ' 
+      CALL XERRWD (MSG, 50, 102, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      It will not be issued again for this problem' 
+      CALL XERRWD (MSG, 50, 102, 0, 1, MXHNIL, 0, 0, 0.0D0, 0.0D0) 
+  290 CONTINUE 
+!-----------------------------------------------------------------------
+!  CALL DSTODE(NEQ,Y,YH,NYH,YH,EWT,SAVF,ACOR,WM,IWM,F,JAC,DPREPJ,DSOLSY)
+!-----------------------------------------------------------------------
+      CALL DSTODE (NEQ, Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LEWT),   &
+        RWORK(LSAVF), RWORK(LACOR), RWORK(LWM), IWORK(LIWM),           &
+        F, JAC)                                        
+        !F, JAC, DPREPJ, DSOLSY)                                        
+      KGO = 1 - KFLAG 
+      GO TO (300, 530, 540), KGO 
+!-----------------------------------------------------------------------
+! Block F.                                                              
+! The following block handles the case of a successful return from the  
+! core integrator (KFLAG = 0).  Test for stop conditions.               
+!-----------------------------------------------------------------------
+  300 INIT = 1 
+      GO TO (310, 400, 330, 340, 350), ITASK 
+! ITASK = 1.  If TOUT has been reached, interpolate. -------------------
+  310 IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 250 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      T = TOUT 
+      GO TO 420 
+! ITASK = 3.  Jump to exit if TOUT was reached. ------------------------
+  330 IF ((TN - TOUT)*H .GE. 0.0D0) GO TO 400 
+      GO TO 250 
+! ITASK = 4.  See if TOUT or TCRIT was reached.  Adjust H if necessary. 
+  340 IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 345 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      T = TOUT 
+      GO TO 420 
+  345 HMX = ABS(TN) + ABS(H) 
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX 
+      IF (IHIT) GO TO 400 
+      TNEXT = TN + H*(1.0D0 + 4.0D0*UROUND) 
+      IF ((TNEXT - TCRIT)*H .LE. 0.0D0) GO TO 250 
+      H = (TCRIT - TN)*(1.0D0 - 4.0D0*UROUND) 
+      JSTART = -2 
+      GO TO 250 
+! ITASK = 5.  See if TCRIT was reached and jump to exit. ---------------
+  350 HMX = ABS(TN) + ABS(H) 
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX 
+!-----------------------------------------------------------------------
+! Block G.                                                              
+! The following block handles all successful returns from DLSODE.       
+! If ITASK .NE. 1, Y is loaded from YH and T is set accordingly.        
+! ISTATE is set to 2, and the optional outputs are loaded into the      
+! work arrays before returning.                                         
+!-----------------------------------------------------------------------
+  400 DO 410 I = 1,N 
+  410   Y(I) = RWORK(I+LYH-1) 
+      T = TN 
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420 
+      IF (IHIT) T = TCRIT 
+  420 ISTATE = 2 
+      RWORK(11) = HU 
+      RWORK(12) = H 
+      RWORK(13) = TN 
+      IWORK(11) = NST 
+      IWORK(12) = NFE 
+      IWORK(13) = NJE 
+      IWORK(14) = NQU 
+      IWORK(15) = NQ 
+      RETURN 
+!-----------------------------------------------------------------------
+! Block H.                                                              
+! The following block handles all unsuccessful returns other than       
+! those for illegal input.  First the error message routine is called.  
+! If there was an error test or convergence test failure, IMXER is set. 
+! Then Y is loaded from YH and T is set to TN.  The optional outputs    
+! are loaded into the work arrays before returning.                     
+!-----------------------------------------------------------------------
+! The maximum number of steps was taken before reaching TOUT. ----------
+  500 MSG = 'DLSODE-  At current T (=R1), MXSTEP (=I1) steps   ' 
+      CALL XERRWD (MSG, 50, 201, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      taken on this call before reaching TOUT     ' 
+      CALL XERRWD (MSG, 50, 201, 0, 1, MXSTEP, 0, 1, TN, 0.0D0) 
+      ISTATE = -1 
+      GO TO 580 
+! EWT(I) .LE. 0.0 for some I (not at start of problem). ----------------
+  510 EWTI = RWORK(LEWT+I-1) 
+      MSG = 'DLSODE-  At T (=R1), EWT(I1) has become R2 .LE. 0.' 
+      CALL XERRWD (MSG, 50, 202, 0, 1, I, 0, 2, TN, EWTI) 
+      ISTATE = -6 
+      GO TO 580 
+! Too much accuracy requested for machine precision. -------------------
+  520 MSG = 'DLSODE-  At T (=R1), too much accuracy requested  ' 
+      CALL XERRWD (MSG, 50, 203, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      for precision of machine..  see TOLSF (=R2) ' 
+      CALL XERRWD (MSG, 50, 203, 0, 0, 0, 0, 2, TN, TOLSF) 
+      RWORK(14) = TOLSF 
+      ISTATE = -2 
+      GO TO 580 
+! KFLAG = -1.  Error test failed repeatedly or with ABS(H) = HMIN. -----
+  530 MSG = 'DLSODE-  At T(=R1) and step size H(=R2), the error' 
+      CALL XERRWD (MSG, 50, 204, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      test failed repeatedly or with ABS(H) = HMIN' 
+      CALL XERRWD (MSG, 50, 204, 0, 0, 0, 0, 2, TN, H) 
+      ISTATE = -4 
+      GO TO 560 
+! KFLAG = -2.  Convergence failed repeatedly or with ABS(H) = HMIN. ----
+  540 MSG = 'DLSODE-  At T (=R1) and step size H (=R2), the    ' 
+      CALL XERRWD (MSG, 50, 205, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      corrector convergence failed repeatedly     ' 
+      CALL XERRWD (MSG, 50, 205, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      or with ABS(H) = HMIN   ' 
+      CALL XERRWD (MSG, 30, 205, 0, 0, 0, 0, 2, TN, H) 
+      ISTATE = -5 
+! Compute IMXER if relevant. -------------------------------------------
+  560 BIG = 0.0D0 
+      IMXER = 1 
+      DO 570 I = 1,N 
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1)) 
+        IF (BIG .GE. SIZE) GO TO 570 
+        BIG = SIZE 
+        IMXER = I 
+  570   CONTINUE 
+      IWORK(16) = IMXER 
+! Set Y vector, T, and optional outputs. -------------------------------
+  580 DO 590 I = 1,N 
+  590   Y(I) = RWORK(I+LYH-1) 
+      T = TN 
+      RWORK(11) = HU 
+      RWORK(12) = H 
+      RWORK(13) = TN 
+      IWORK(11) = NST 
+      IWORK(12) = NFE 
+      IWORK(13) = NJE 
+      IWORK(14) = NQU 
+      IWORK(15) = NQ 
+      RETURN 
+!-----------------------------------------------------------------------
+! Block I.                                                              
+! The following block handles all error returns due to illegal input    
+! (ISTATE = -3), as detected before calling the core integrator.        
+! First the error message routine is called.  If the illegal input      
+! is a negative ISTATE, the run is aborted (apparent infinite loop).    
+!-----------------------------------------------------------------------
+  601 MSG = 'DLSODE-  ISTATE (=I1) illegal ' 
+      CALL XERRWD (MSG, 30, 1, 0, 1, ISTATE, 0, 0, 0.0D0, 0.0D0) 
+      IF (ISTATE .LT. 0) GO TO 800 
+      GO TO 700 
+  602 MSG = 'DLSODE-  ITASK (=I1) illegal  ' 
+      CALL XERRWD (MSG, 30, 2, 0, 1, ITASK, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  603 MSG = 'DLSODE-  ISTATE .GT. 1 but DLSODE not initialized ' 
+      CALL XERRWD (MSG, 50, 3, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  604 MSG = 'DLSODE-  NEQ (=I1) .LT. 1     ' 
+      CALL XERRWD (MSG, 30, 4, 0, 1, NEQ, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  605 MSG = 'DLSODE-  ISTATE = 3 and NEQ increased (I1 to I2)  ' 
+      CALL XERRWD (MSG, 50, 5, 0, 2, N, NEQ, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  606 MSG = 'DLSODE-  ITOL (=I1) illegal   ' 
+      CALL XERRWD (MSG, 30, 6, 0, 1, ITOL, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  607 MSG = 'DLSODE-  IOPT (=I1) illegal   ' 
+      CALL XERRWD (MSG, 30, 7, 0, 1, IOPT, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  608 MSG = 'DLSODE-  MF (=I1) illegal     ' 
+      CALL XERRWD (MSG, 30, 8, 0, 1, MF, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  609 MSG = 'DLSODE-  ML (=I1) illegal.. .LT.0 or .GE.NEQ (=I2)' 
+      CALL XERRWD (MSG, 50, 9, 0, 2, ML, NEQ, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  610 MSG = 'DLSODE-  MU (=I1) illegal.. .LT.0 or .GE.NEQ (=I2)' 
+      CALL XERRWD (MSG, 50, 10, 0, 2, MU, NEQ, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  611 MSG = 'DLSODE-  MAXORD (=I1) .LT. 0  ' 
+      CALL XERRWD (MSG, 30, 11, 0, 1, MAXORD, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  612 MSG = 'DLSODE-  MXSTEP (=I1) .LT. 0  ' 
+      CALL XERRWD (MSG, 30, 12, 0, 1, MXSTEP, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  613 MSG = 'DLSODE-  MXHNIL (=I1) .LT. 0  ' 
+      CALL XERRWD (MSG, 30, 13, 0, 1, MXHNIL, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  614 MSG = 'DLSODE-  TOUT (=R1) behind T (=R2)      ' 
+      CALL XERRWD (MSG, 40, 14, 0, 0, 0, 0, 2, TOUT, T) 
+      MSG = '      Integration direction is given by H0 (=R1)  ' 
+      CALL XERRWD (MSG, 50, 14, 0, 0, 0, 0, 1, H0, 0.0D0) 
+      GO TO 700 
+  615 MSG = 'DLSODE-  HMAX (=R1) .LT. 0.0  ' 
+      CALL XERRWD (MSG, 30, 15, 0, 0, 0, 0, 1, HMAX, 0.0D0) 
+      GO TO 700 
+  616 MSG = 'DLSODE-  HMIN (=R1) .LT. 0.0  ' 
+      CALL XERRWD (MSG, 30, 16, 0, 0, 0, 0, 1, HMIN, 0.0D0) 
+      GO TO 700 
+  617 CONTINUE 
+      MSG='DLSODE-  RWORK length needed, LENRW (=I1), exceeds LRW (=I2)' 
+      CALL XERRWD (MSG, 60, 17, 0, 2, LENRW, LRW, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  618 CONTINUE 
+      MSG='DLSODE-  IWORK length needed, LENIW (=I1), exceeds LIW (=I2)' 
+      CALL XERRWD (MSG, 60, 18, 0, 2, LENIW, LIW, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  619 MSG = 'DLSODE-  RelTol(I1) is R1 .LT. 0.0        ' 
+      CALL XERRWD (MSG, 40, 19, 0, 1, I, 0, 1, RelTolI, 0.0D0) 
+      GO TO 700 
+  620 MSG = 'DLSODE-  AbsTol(I1) is R1 .LT. 0.0        ' 
+      CALL XERRWD (MSG, 40, 20, 0, 1, I, 0, 1, AbsTolI, 0.0D0) 
+      GO TO 700 
+  621 EWTI = RWORK(LEWT+I-1) 
+      MSG = 'DLSODE-  EWT(I1) is R1 .LE. 0.0         ' 
+      CALL XERRWD (MSG, 40, 21, 0, 1, I, 0, 1, EWTI, 0.0D0) 
+      GO TO 700 
+  622 CONTINUE 
+      MSG='DLSODE-  TOUT (=R1) too close to T(=R2) to start integration' 
+      CALL XERRWD (MSG, 60, 22, 0, 0, 0, 0, 2, TOUT, T) 
+      GO TO 700 
+  623 CONTINUE 
+      MSG='DLSODE-  ITASK = I1 and TOUT (=R1) behind TCUR - HU (= R2)  ' 
+      CALL XERRWD (MSG, 60, 23, 0, 1, ITASK, 0, 2, TOUT, TP) 
+      GO TO 700 
+  624 CONTINUE 
+      MSG='DLSODE-  ITASK = 4 OR 5 and TCRIT (=R1) behind TCUR (=R2)   ' 
+      CALL XERRWD (MSG, 60, 24, 0, 0, 0, 0, 2, TCRIT, TN) 
+      GO TO 700 
+  625 CONTINUE 
+      MSG='DLSODE-  ITASK = 4 or 5 and TCRIT (=R1) behind TOUT (=R2)   ' 
+      CALL XERRWD (MSG, 60, 25, 0, 0, 0, 0, 2, TCRIT, TOUT) 
+      GO TO 700 
+  626 MSG = 'DLSODE-  At start of problem, too much accuracy   ' 
+      CALL XERRWD (MSG, 50, 26, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG='      requested for precision of machine..  See TOLSF (=R1) ' 
+      CALL XERRWD (MSG, 60, 26, 0, 0, 0, 0, 1, TOLSF, 0.0D0) 
+      RWORK(14) = TOLSF 
+      GO TO 700 
+  627 MSG = 'DLSODE-  Trouble in DINTDY.  ITASK = I1, TOUT = R1' 
+      CALL XERRWD (MSG, 50, 27, 0, 1, ITASK, 0, 1, TOUT, 0.0D0) 
+!                                                                       
+  700 ISTATE = -3 
+      RETURN 
+!                                                                       
+  800 MSG = 'DLSODE-  Run aborted.. apparent infinite loop     ' 
+      CALL XERRWD (MSG, 50, 303, 2, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      RETURN 
+!----------------------- END OF SUBROUTINE DLSODE ----------------------
+      !END SUBROUTINE DLSODE                                          
+      CONTAINS                                          
+
+
+!DECK DUMACH   
+      KPP_REAL FUNCTION DUMACH () 
+!***BEGIN PROLOGUE  DUMACH                                              
+!***PURPOSE  Compute the unit roundoff of the machine.                  
+!***CATEGORY  R1                                                        
+!***TYPE      KPP_REAL (RUMACH-S, DUMACH-D)                     
+!***KEYWORDS  MACHINE CONSTANTS                                         
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+! *Usage:                                                               
+!        KPP_REAL  A, DUMACH                                    
+!        A = DUMACH()                                                   
+!                                                                       
+! *Function Return Values:                                              
+!     A : the unit roundoff of the machine.                             
+!                                                                       
+! *Description:                                                         
+!     The unit roundoff is defined as the smallest positive machine     
+!     number u such that  1.0 + u .ne. 1.0.  This is computed by DUMACH 
+!     in a machine-independent manner.                                  
+!                                                                       
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  DUMSUM                                             
+!***REVISION HISTORY  (YYYYMMDD)                                        
+!   19930216  DATE WRITTEN                                              
+!   19930818  Added SLATEC-format prologue.  (FNF)                      
+!   20030707  Added DUMSUM to force normal storage of COMP.  (ACH)      
+!***END PROLOGUE  DUMACH                                                
+!                                                                       
+      KPP_REAL U, COMP 
+!***FIRST EXECUTABLE STATEMENT  DUMACH                                  
+      U = 1.0D0 
+   10 U = U*0.5D0 
+      CALL DUMSUM(1.0D0, U, COMP) 
+      IF (COMP .NE. 1.0D0) GO TO 10 
+      DUMACH = U*2.0D0 
+      RETURN 
+!----------------------- End of Function DUMACH ------------------------
+      END FUNCTION DUMACH  
+                                              
+      SUBROUTINE DUMSUM(A,B,C) 
+!     Routine to force normal storing of A + B, for DUMACH.             
+      KPP_REAL A, B, C 
+      C = A + B 
+      RETURN 
+      END SUBROUTINE DUMSUM                                        
+!DECK DCFODE                                                            
+      SUBROUTINE DCFODE (METH, ELCO, TESCO) 
+!***BEGIN PROLOGUE  DCFODE                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Set ODE integrator coefficients.                           
+!***TYPE      KPP_REAL (SCFODE-S, DCFODE-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DCFODE is called by the integrator routine to set coefficients       
+!  needed there.  The coefficients for the current method, as           
+!  given by the value of METH, are set for all orders and saved.        
+!  The maximum order assumed here is 12 if METH = 1 and 5 if METH = 2.  
+!  (A smaller value of the maximum order is also allowed.)              
+!  DCFODE is called once at the beginning of the problem,               
+!  and is not called again unless and until METH is changed.            
+!                                                                       
+!  The ELCO array contains the basic method coefficients.               
+!  The coefficients el(i), 1 .le. i .le. nq+1, for the method of        
+!  order nq are stored in ELCO(i,nq).  They are given by a genetrating  
+!  polynomial, i.e.,                                                    
+!      l(x) = el(1) + el(2)*x + ... + el(nq+1)*x**nq.                   
+!  For the implicit Adams methods, l(x) is given by                     
+!      dl/dx = (x+1)*(x+2)*...*(x+nq-1)/factorial(nq-1),    l(-1) = 0.  
+!  For the BDF methods, l(x) is given by                                
+!      l(x) = (x+1)*(x+2)* ... *(x+nq)/K,                               
+!  where         K = factorial(nq)*(1 + 1/2 + ... + 1/nq).              
+!                                                                       
+!  The TESCO array contains test constants used for the                 
+!  local error test and the selection of step size and/or order.        
+!  At order nq, TESCO(k,nq) is used for the selection of step           
+!  size at order nq - 1 if k = 1, at order nq if k = 2, and at order    
+!  nq + 1 if k = 3.                                                     
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!***END PROLOGUE  DCFODE                                                
+!**End                                                                  
+      INTEGER METH 
+      INTEGER I, IB, NQ, NQM1, NQP1 
+      KPP_REAL ELCO(13,12), TESCO(3,12), PC(12) 
+      KPP_REAL AGAMQ, FNQ, FNQM1, PINT, RAGQ, RQFAC, RQ1FAC, TSIGN, XPIN
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DCFODE                                  
+      GO TO (100, 200), METH 
+!                                                                       
+  100 ELCO(1,1) = 1.0D0 
+      ELCO(2,1) = 1.0D0 
+      TESCO(1,1) = 0.0D0 
+      TESCO(2,1) = 2.0D0 
+      TESCO(1,2) = 1.0D0 
+      TESCO(3,12) = 0.0D0 
+      PC(1) = 1.0D0 
+      RQFAC = 1.0D0 
+      DO 140 NQ = 2,12 
+!-----------------------------------------------------------------------
+! The PC array will contain the coefficients of the polynomial          
+!     p(x) = (x+1)*(x+2)*...*(x+nq-1).                                  
+! Initially, p(x) = 1.                                                  
+!-----------------------------------------------------------------------
+        RQ1FAC = RQFAC 
+        RQFAC = RQFAC/NQ 
+        NQM1 = NQ - 1 
+        FNQM1 = NQM1 
+        NQP1 = NQ + 1 
+! Form coefficients of p(x)*(x+nq-1). ----------------------------------
+        PC(NQ) = 0.0D0 
+        DO 110 IB = 1,NQM1 
+          I = NQP1 - IB 
+  110     PC(I) = PC(I-1) + FNQM1*PC(I) 
+        PC(1) = FNQM1*PC(1) 
+! Compute integral, -1 to 0, of p(x) and x*p(x). -----------------------
+        PINT = PC(1) 
+        XPIN = PC(1)/2.0D0 
+        TSIGN = 1.0D0 
+        DO 120 I = 2,NQ 
+          TSIGN = -TSIGN 
+          PINT = PINT + TSIGN*PC(I)/I 
+  120     XPIN = XPIN + TSIGN*PC(I)/(I+1) 
+! Store coefficients in ELCO and TESCO. --------------------------------
+        ELCO(1,NQ) = PINT*RQ1FAC 
+        ELCO(2,NQ) = 1.0D0 
+        DO 130 I = 2,NQ 
+  130     ELCO(I+1,NQ) = RQ1FAC*PC(I)/I 
+        AGAMQ = RQFAC*XPIN 
+        RAGQ = 1.0D0/AGAMQ 
+        TESCO(2,NQ) = RAGQ 
+        IF (NQ .LT. 12) TESCO(1,NQP1) = RAGQ*RQFAC/NQP1 
+        TESCO(3,NQM1) = RAGQ 
+  140   CONTINUE 
+      RETURN 
+!                                                                       
+  200 PC(1) = 1.0D0 
+      RQ1FAC = 1.0D0 
+      DO 230 NQ = 1,5 
+!-----------------------------------------------------------------------
+! The PC array will contain the coefficients of the polynomial          
+!     p(x) = (x+1)*(x+2)*...*(x+nq).                                    
+! Initially, p(x) = 1.                                                  
+!-----------------------------------------------------------------------
+        FNQ = NQ 
+        NQP1 = NQ + 1 
+! Form coefficients of p(x)*(x+nq). ------------------------------------
+        PC(NQP1) = 0.0D0 
+        DO 210 IB = 1,NQ 
+          I = NQ + 2 - IB 
+  210     PC(I) = PC(I-1) + FNQ*PC(I) 
+        PC(1) = FNQ*PC(1) 
+! Store coefficients in ELCO and TESCO. --------------------------------
+        DO 220 I = 1,NQP1 
+  220     ELCO(I,NQ) = PC(I)/PC(2) 
+        ELCO(2,NQ) = 1.0D0 
+        TESCO(1,NQ) = RQ1FAC 
+        TESCO(2,NQ) = NQP1/ELCO(1,NQ) 
+        TESCO(3,NQ) = (NQ+2)/ELCO(1,NQ) 
+        RQ1FAC = RQ1FAC/FNQ 
+  230   CONTINUE 
+      RETURN 
+!----------------------- END OF SUBROUTINE DCFODE ----------------------
+      END SUBROUTINE DCFODE                                         
+!DECK DINTDY                                                            
+      SUBROUTINE DINTDY (T, K, YH, NYH, DKY, IFLAG) 
+!***BEGIN PROLOGUE  DINTDY                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Interpolate solution derivatives.                          
+!***TYPE      KPP_REAL (SINTDY-S, DINTDY-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DINTDY computes interpolated values of the K-th derivative of the    
+!  dependent variable vector y, and stores it in DKY.  This routine     
+!  is called within the package with K = 0 and T = TOUT, but may        
+!  also be called by the user for any K up to the current order.        
+!  (See detailed instructions in the usage documentation.)              
+!                                                                       
+!  The computed values in DKY are gotten by interpolation using the     
+!  Nordsieck history array YH.  This array corresponds uniquely to a    
+!  vector-valued polynomial of degree NQCUR or less, and DKY is set     
+!  to the K-th derivative of this polynomial at T.                      
+!  The formula for DKY is:                                              
+!               q                                                       
+!   DKY(i)  =  sum  c(j,K) * (T - tn)**(j-K) * h**(-j) * YH(i,j+1)      
+!              j=K                                                      
+!  where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, tn = TCUR, h = HCUR. 
+!  The quantities  nq = NQCUR, l = nq+1, N = NEQ, tn, and h are         
+!  communicated by COMMON.  The above sum is done in reverse order.     
+!  IFLAG is returned negative if either K or T is out of bounds.        
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  XERRWD                                             
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!   050427  Corrected roundoff decrement in TP. (ACH)                   
+!***END PROLOGUE  DINTDY                                                
+!**End                                                                  
+      INTEGER K, NYH, IFLAG 
+      KPP_REAL T, YH(NYH,*), DKY(*) 
+      INTEGER IOWND, IOWNS,                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      KPP_REAL ROWNS,                                          &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IOWNS(6),                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, IC, J, JB, JB2, JJ, JJ1, JP1 
+      KPP_REAL C, R, S, TP 
+      CHARACTER*80 MSG 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DINTDY                                  
+      IFLAG = 0 
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80 
+      TP = TN - HU -  100.0D0*UROUND*SIGN(ABS(TN) + ABS(HU), HU) 
+      IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90 
+!                                                                       
+      S = (T - TN)/H 
+      IC = 1 
+      IF (K .EQ. 0) GO TO 15 
+      JJ1 = L - K 
+      DO 10 JJ = JJ1,NQ 
+   10   IC = IC*JJ 
+   15 C = IC 
+      DO 20 I = 1,N 
+   20   DKY(I) = C*YH(I,L) 
+      IF (K .EQ. NQ) GO TO 55 
+      JB2 = NQ - K 
+      DO 50 JB = 1,JB2 
+        J = NQ - JB 
+        JP1 = J + 1 
+        IC = 1 
+        IF (K .EQ. 0) GO TO 35 
+        JJ1 = JP1 - K 
+        DO 30 JJ = JJ1,J 
+   30     IC = IC*JJ 
+   35   C = IC 
+        DO 40 I = 1,N 
+   40     DKY(I) = C*YH(I,JP1) + S*DKY(I) 
+   50   CONTINUE 
+      IF (K .EQ. 0) RETURN 
+   55 R = H**(-K) 
+      DO 60 I = 1,N 
+   60   DKY(I) = R*DKY(I) 
+      RETURN 
+!                                                                       
+   80 MSG = 'DINTDY-  K (=I1) illegal      ' 
+      CALL XERRWD (MSG, 30, 51, 0, 1, K, 0, 0, 0.0D0, 0.0D0) 
+      IFLAG = -1 
+      RETURN 
+   90 MSG = 'DINTDY-  T (=R1) illegal      ' 
+      CALL XERRWD (MSG, 30, 52, 0, 0, 0, 0, 1, T, 0.0D0) 
+      MSG='      T not in interval TCUR - HU (= R1) to TCUR (=R2)      ' 
+      CALL XERRWD (MSG, 60, 52, 0, 0, 0, 0, 2, TP, TN) 
+      IFLAG = -2 
+      RETURN 
+!----------------------- END OF SUBROUTINE DINTDY ----------------------
+      END SUBROUTINE DINTDY                                          
+!DECK DPREPJ                                                            
+      SUBROUTINE DPREPJ (NEQ, Y, YH, NYH, EWT, FTEM, SAVF, WM, IWM, F, JAC)                                                        
+!***BEGIN PROLOGUE  DPREPJ                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Compute and process Newton iteration matrix.               
+!***TYPE      KPP_REAL (SPREPJ-S, DPREPJ-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DPREPJ is called by DSTODE to compute and process the matrix         
+!  P = I - h*el(1)*J , where J is an approximation to the Jacobian.     
+!  Here J is computed by the user-supplied routine JAC if               
+!  MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.     
+!  If MITER = 3, a diagonal approximation to J is used.                 
+!  J is stored in WM and replaced by P.  If MITER .ne. 3, P is then     
+!  subjected to LU decomposition in preparation for later solution      
+!  of linear systems with P as coefficient matrix.  This is done        
+!  by DGEFA if MITER = 1 or 2, and by DGBFA if MITER = 4 or 5.          
+!                                                                       
+!  In addition to variables described in DSTODE and DLSODE prologues,   
+!  communication with DPREPJ uses the following:                        
+!  Y     = array containing predicted values on entry.                  
+!  FTEM  = work array of length N (ACOR in DSTODE).                     
+!  SAVF  = array containing f evaluated at predicted y.                 
+!  WM    = real work space for matrices.  On output it contains the     
+!          inverse diagonal matrix if MITER = 3 and the LU decomposition
+!          of P if MITER is 1, 2 , 4, or 5.                             
+!          Storage of matrix elements starts at WM(3).                  
+!          WM also contains the following matrix-related data:          
+!          WM(1) = SQRT(UROUND), used in numerical Jacobian increments. 
+!          WM(2) = H*EL0, saved for later use if MITER = 3.             
+!  IWM   = integer work space containing pivot information, starting at 
+!          IWM(21), if MITER is 1, 2, 4, or 5.  IWM also contains band  
+!          parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.   
+!  EL0   = EL(1) (input).                                               
+!  IERPJ = output error flag,  = 0 if no trouble, .gt. 0 if             
+!          P matrix found to be singular.                               
+!  JCUR  = output flag = 1 to indicate that the Jacobian matrix         
+!          (or approximation) is now current.                           
+!  This routine also uses the COMMON variables EL0, H, TN, UROUND,      
+!  MITER, N, NFE, and NJE.                                              
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  DGBFA, DGEFA, DVNORM                               
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890504  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!***END PROLOGUE  DPREPJ                                                
+!**End                                                                  
+      EXTERNAL F, JAC 
+      INTEGER NEQ, NYH, IWM(*)
+      KPP_REAL Y(*), YH(NYH,*), EWT(*), FTEM(*), SAVF(*), WM(*) 
+      INTEGER IOWND, IOWNS,                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      KPP_REAL ROWNS,                                          &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IOWNS(6),                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, I1, I2, IER, II, J, J1, JJ, LENP,                     &
+              MBA, MBAND, MEB1, MEBAND, ML, ML3, MU, NP1                     
+      KPP_REAL CON, DI, FAC, HL0, R, R0, SRUR, YI, YJ, YJJ
+      !KPP_REAL  DVNORM                                                         
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DPREPJ                                  
+      NJE = NJE + 1 
+      IERPJ = 0 
+      JCUR = 1 
+      HL0 = H*EL0 
+      CON = -HL0 
+
+#ifdef FULL_ALGEBRA
+      LENP = N*N 
+      DO i = 1,LENP 
+         WM(i+2) = 0.0D0 
+      END DO
+      CALL JAC_CHEM (NEQ, TN, Y, WM(3)) 
+      DO I = 1,LENP 
+        WM(I+2) = WM(I+2)*CON
+      END DO 
+      ! Add identity matrix
+      J = 3 
+      NP1 = N + 1 
+      DO I = 1,N 
+        WM(J) = WM(J) + 1.0D0 
+        J = J + NP1 
+      END DO
+      ! Do LU decomposition on P
+      CALL DGETRF(N,N,WM(3),N,IWM(21),IER)
+#else
+      CALL JAC_CHEM (NEQ, TN, Y, WM(3)) 
+      DO i = 1,LU_NONZERO 
+         WM(i+2) = WM(i+2)*CON 
+      END DO
+      ! Add identity matrix
+      DO i = 1,N 
+        j = 2+LU_DIAG(i)
+        WM(j) = WM(j) + 1.0D0 
+      END DO 
+      ! Do LU decomposition on P
+      CALL KppDecomp(WM(3),IER)
+#endif      
+      IF (IER .NE. 0) IERPJ = 1 
+      RETURN 
+ !----------------------- END OF SUBROUTINE DPREPJ ----------------------
+      END SUBROUTINE DPREPJ                                          
+!DECK DSOLSY                                                            
+      SUBROUTINE DSOLSY (WM, IWM, X, TEM) 
+!***BEGIN PROLOGUE  DSOLSY                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  ODEPACK linear system solver.                              
+!***TYPE      KPP_REAL (SSOLSY-S, DSOLSY-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This routine manages the solution of the linear system arising from  
+!  a chord iteration.  It is called if MITER .ne. 0.                    
+!  If MITER is 1 or 2, it calls DGESL to accomplish this.               
+!  If MITER = 3 it updates the coefficient h*EL0 in the diagonal        
+!  matrix, and then computes the solution.                              
+!  If MITER is 4 or 5, it calls DGBSL.                                  
+!  Communication with DSOLSY uses the following variables:              
+!  WM    = real work space containing the inverse diagonal matrix if    
+!          MITER = 3 and the LU decomposition of the matrix otherwise.  
+!          Storage of matrix elements starts at WM(3).                  
+!          WM also contains the following matrix-related data:          
+!          WM(1) = SQRT(UROUND) (not used here),                        
+!          WM(2) = HL0, the previous value of h*EL0, used if MITER = 3. 
+!  IWM   = integer work space containing pivot information, starting at 
+!          IWM(21), if MITER is 1, 2, 4, or 5.  IWM also contains band  
+!          parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.   
+!  X     = the right-hand side vector on input, and the solution vector 
+!          on output, of length N.                                      
+!  TEM   = vector of work space of length N, not used in this version.  
+!  IERSL = output flag (in COMMON).  IERSL = 0 if no trouble occurred.  
+!          IERSL = 1 if a singular matrix arose with MITER = 3.         
+!  This routine also uses the COMMON variables EL0, H, MITER, and N.    
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  DGBSL, DGESL                                       
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!***END PROLOGUE  DSOLSY                                                
+!**End                                                                  
+      INTEGER IWM(*) 
+      KPP_REAL WM(*), X(*), TEM(*) 
+      INTEGER IOWND, IOWNS,                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      KPP_REAL ROWNS,                                          &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IOWNS(6),                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, MEBAND, ML, MU 
+      KPP_REAL DI, HL0, PHL0, R 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DSOLSY                                  
+      IERSL = 0 
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,WM(3),N,IWM(21),X,N,0)
+#else
+      CALL KppSolve(WM(3),X)
+#endif      
+      RETURN 
+!----------------------- END OF SUBROUTINE DSOLSY ----------------------
+      END SUBROUTINE DSOLSY                                          
+!DECK DSRCOM                                                            
+      SUBROUTINE DSRCOM (RSAV, ISAV, JOB) 
+!***BEGIN PROLOGUE  DSRCOM                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Save/restore ODEPACK COMMON blocks.                        
+!***TYPE      KPP_REAL (SSRCOM-S, DSRCOM-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This routine saves or restores (depending on JOB) the contents of    
+!  the COMMON block DLS001, which is used internally                    
+!  by one or more ODEPACK solvers.                                      
+!                                                                       
+!  RSAV = real array of length 218 or more.                             
+!  ISAV = integer array of length 37 or more.                           
+!  JOB  = flag indicating to save or restore the COMMON blocks:         
+!         JOB  = 1 if COMMON is to be saved (written to RSAV/ISAV)      
+!         JOB  = 2 if COMMON is to be restored (read from RSAV/ISAV)    
+!         A call with JOB = 2 presumes a prior call with JOB = 1.       
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   921116  Deleted treatment of block /EH0001/.  (ACH)                 
+!   930801  Reduced Common block length by 2.  (ACH)                    
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced Common block length by 209+12. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!   031112  Added SAVE statement for data-loaded constants.             
+!***END PROLOGUE  DSRCOM                                                
+!**End                                                                  
+      INTEGER ISAV(*), JOB 
+      INTEGER ILS 
+      INTEGER I, LENILS, LENRLS 
+      KPP_REAL RSAV(*),   RLS 
+      SAVE LENRLS, LENILS 
+      COMMON /DLS001/ RLS(218), ILS(37) 
+      DATA LENRLS/218/, LENILS/37/ 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DSRCOM                                  
+      IF (JOB .EQ. 2) GO TO 100 
+!                                                                       
+      DO 10 I = 1,LENRLS 
+   10   RSAV(I) = RLS(I) 
+      DO 20 I = 1,LENILS 
+   20   ISAV(I) = ILS(I) 
+      RETURN 
+!                                                                       
+  100 CONTINUE 
+      DO 110 I = 1,LENRLS 
+  110    RLS(I) = RSAV(I) 
+      DO 120 I = 1,LENILS 
+  120    ILS(I) = ISAV(I) 
+      RETURN 
+!----------------------- END OF SUBROUTINE DSRCOM ----------------------
+      END SUBROUTINE DSRCOM                                          
+!DECK DSTODE                                                            
+      SUBROUTINE DSTODE (NEQ, Y, YH, NYH, YH1, EWT, SAVF, ACOR, &
+                         WM, IWM, F, JAC)                                   
+                        !WM, IWM, F, JAC, PJAC, SLVS)                                   
+!***BEGIN PROLOGUE  DSTODE                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Performs one step of an ODEPACK integration.               
+!***TYPE      KPP_REAL (SSTODE-S, DSTODE-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DSTODE performs one step of the integration of an initial value      
+!  problem for a system of ordinary differential equations.             
+!  Note:  DSTODE is independent of the value of the iteration method    
+!  indicator MITER, when this is .ne. 0, and hence is independent       
+!  of the type of chord method used, or the Jacobian structure.         
+!  Communication with DSTODE is done with the following variables:      
+!                                                                       
+!  NEQ    = integer array containing problem size in NEQ, and        
+!           passed as the NEQ argument in all calls to F and JAC.       
+!  Y      = an array of length .ge. N used as the Y argument in         
+!           all calls to F and JAC.                                     
+!  YH     = an NYH by LMAX array containing the dependent variables     
+!           and their approximate scaled derivatives, where             
+!           LMAX = MAXORD + 1.  YH(i,j+1) contains the approximate      
+!           j-th derivative of y(i), scaled by h**j/factorial(j)        
+!           (j = 0,1,...,NQ).  on entry for the first step, the first   
+!           two columns of YH must be set from the initial values.      
+!  NYH    = a constant integer .ge. N, the first dimension of YH.       
+!  YH1    = a one-dimensional array occupying the same space as YH.     
+!  EWT    = an array of length N containing multiplicative weights      
+!           for local error measurements.  Local errors in Y(i) are     
+!           compared to 1.0/EWT(i) in various error tests.              
+!  SAVF   = an array of working storage, of length N.                   
+!           Also used for input of YH(*,MAXORD+2) when JSTART = -1      
+!           and MAXORD .lt. the current order NQ.                       
+!  ACOR   = a work array of length N, used for the accumulated          
+!           corrections.  On a successful return, ACOR(i) contains      
+!           the estimated one-step local error in Y(i).                 
+!  WM,IWM = real and integer work arrays associated with matrix         
+!           operations in chord iteration (MITER .ne. 0).               
+!  PJAC   = name of routine to evaluate and preprocess Jacobian matrix  
+!           and P = I - h*el0*JAC, if a chord method is being used.     
+!  SLVS   = name of routine to solve linear system in chord iteration.  
+!  CCMAX  = maximum relative change in h*el0 before PJAC is called.     
+!  H      = the step size to be attempted on the next step.             
+!           H is altered by the error control algorithm during the      
+!           problem.  H can be either positive or negative, but its     
+!           sign must remain constant throughout the problem.           
+!  HMIN   = the minimum absolute value of the step size h to be used.   
+!  HMXI   = inverse of the maximum absolute value of h to be used.      
+!           HMXI = 0.0 is allowed and corresponds to an infinite hmax.  
+!           HMIN and HMXI may be changed at any time, but will not      
+!           take effect until the next change of h is considered.       
+!  TN     = the independent variable. TN is updated on each step taken. 
+!  JSTART = an integer used for input only, with the following          
+!           values and meanings:                                        
+!                0  perform the first step.                             
+!            .gt.0  take a new step continuing from the last.           
+!               -1  take the next step with a new value of H, MAXORD,   
+!                     N, METH, MITER, and/or matrix parameters.         
+!               -2  take the next step with a new value of H,           
+!                     but with other inputs unchanged.                  
+!           On return, JSTART is set to 1 to facilitate continuation.   
+!  KFLAG  = a completion code with the following meanings:              
+!                0  the step was succesful.                             
+!               -1  the requested error could not be achieved.          
+!               -2  corrector convergence could not be achieved.        
+!               -3  fatal error in PJAC or SLVS.                        
+!           A return with KFLAG = -1 or -2 means either                 
+!           abs(H) = HMIN or 10 consecutive failures occurred.          
+!           On a return with KFLAG negative, the values of TN and       
+!           the YH array are as of the beginning of the last            
+!           step, and H is the last step size attempted.                
+!  MAXORD = the maximum order of integration method to be allowed.      
+!  MAXCOR = the maximum number of corrector iterations allowed.         
+!  MSBP   = maximum number of steps between PJAC calls (MITER .gt. 0).  
+!  MXNCF  = maximum number of convergence failures allowed.             
+!  METH/MITER = the method flags.  See description in driver.           
+!  N      = the number of first-order differential equations.           
+!  The values of CCMAX, H, HMIN, HMXI, TN, JSTART, KFLAG, MAXORD,       
+!  MAXCOR, MSBP, MXNCF, METH, MITER, and N are communicated via COMMON. 
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  DCFODE, DVNORM                                     
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!***END PROLOGUE  DSTODE                                                
+!**End                                                                  
+      EXTERNAL F, JAC !, PJAC, SLVS 
+      INTEGER NEQ, NYH, IWM(*) 
+      KPP_REAL Y(*), YH(NYH,*), YH1(*), EWT(*), SAVF(*),       &
+                       ACOR(*), WM(*) 
+      INTEGER IOWND, IALTH, IPUP, LMAX, MEO, NQNYH, NSLP,              &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, I1, IREDO, IRET, J, JB, M, NCF, NEWQ 
+      KPP_REAL CONIT, CRATE, EL, ELCO, HOLD, RMAX, TESCO,      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      KPP_REAL DCON, DDN, DEL, DELP, DSM, DUP, EXDN, EXSM,     &
+              EXUP,R, RH, RHDN, RHSM, RHUP, TOLD
+      !KPP_REAL DVNORM                          
+      COMMON /DLS001/ CONIT, CRATE, EL(13), ELCO(13,12),               &
+        HOLD, RMAX, TESCO(3,12),                                       &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IALTH, IPUP, LMAX, MEO, NQNYH, NSLP,                 &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DSTODE                                  
+      KFLAG = 0 
+      TOLD = TN 
+      NCF = 0 
+      IERPJ = 0 
+      IERSL = 0 
+      JCUR = 0 
+      ICF = 0 
+      DELP = 0.0D0 
+      IF (JSTART .GT. 0) GO TO 200 
+      IF (JSTART .EQ. -1) GO TO 100 
+      IF (JSTART .EQ. -2) GO TO 160 
+!-----------------------------------------------------------------------
+! On the first call, the order is set to 1, and other variables are     
+! initialized.  RMAX is the maximum ratio by which H can be increased   
+! in a single step.  It is initially 1.E4 to compensate for the small   
+! initial H, but then is normally equal to 10.  If a failure            
+! occurs (in corrector convergence or error test), RMAX is set to 2     
+! for the next increase.                                                
+!-----------------------------------------------------------------------
+      LMAX = MAXORD + 1 
+      NQ = 1 
+      L = 2 
+      IALTH = 2 
+      RMAX = 10000.0D0 
+      RC = 0.0D0 
+      EL0 = 1.0D0 
+      CRATE = 0.7D0 
+      HOLD = H 
+      MEO = METH 
+      NSLP = 0 
+      IPUP = MITER 
+      IRET = 3 
+      GO TO 140 
+!-----------------------------------------------------------------------
+! The following block handles preliminaries needed when JSTART = -1.    
+! IPUP is set to MITER to force a matrix update.                        
+! If an order increase is about to be considered (IALTH = 1),           
+! IALTH is reset to 2 to postpone consideration one more step.          
+! If the caller has changed METH, DCFODE is called to reset             
+! the coefficients of the method.                                       
+! If the caller has changed MAXORD to a value less than the current     
+! order NQ, NQ is reduced to MAXORD, and a new H chosen accordingly.    
+! If H is to be changed, YH must be rescaled.                           
+! If H or METH is being changed, IALTH is reset to L = NQ + 1           
+! to prevent further changes in H for that many steps.                  
+!-----------------------------------------------------------------------
+  100 IPUP = MITER 
+      LMAX = MAXORD + 1 
+      IF (IALTH .EQ. 1) IALTH = 2 
+      IF (METH .EQ. MEO) GO TO 110 
+      CALL DCFODE (METH, ELCO, TESCO) 
+      MEO = METH 
+      IF (NQ .GT. MAXORD) GO TO 120 
+      IALTH = L 
+      IRET = 1 
+      GO TO 150 
+  110 IF (NQ .LE. MAXORD) GO TO 160 
+  120 NQ = MAXORD 
+      L = LMAX 
+      DO 125 I = 1,L 
+  125   EL(I) = ELCO(I,NQ) 
+      NQNYH = NQ*NYH 
+      RC = RC*EL(1)/EL0 
+      EL0 = EL(1) 
+      CONIT = 0.5D0/(NQ+2) 
+      DDN = DVNORM (N, SAVF, EWT)/TESCO(1,L) 
+      EXDN = 1.0D0/L 
+      RHDN = 1.0D0/(1.3D0*DDN**EXDN + 0.0000013D0) 
+      RH = MIN(RHDN,1.0D0) 
+      IREDO = 3 
+      IF (H .EQ. HOLD) GO TO 170 
+      RH = MIN(RH,ABS(H/HOLD)) 
+      H = HOLD 
+      GO TO 175 
+!-----------------------------------------------------------------------
+! DCFODE is called to get all the integration coefficients for the      
+! current METH.  Then the EL vector and related constants are reset     
+! whenever the order NQ is changed, or at the start of the problem.     
+!-----------------------------------------------------------------------
+  140 CALL DCFODE (METH, ELCO, TESCO) 
+  150 DO 155 I = 1,L 
+  155   EL(I) = ELCO(I,NQ) 
+      NQNYH = NQ*NYH 
+      RC = RC*EL(1)/EL0 
+      EL0 = EL(1) 
+      CONIT = 0.5D0/(NQ+2) 
+      GO TO (160, 170, 200), IRET 
+!-----------------------------------------------------------------------
+! If H is being changed, the H ratio RH is checked against              
+! RMAX, HMIN, and HMXI, and the YH array rescaled.  IALTH is set to     
+! L = NQ + 1 to prevent a change of H for that many steps, unless       
+! forced by a convergence or error test failure.                        
+!-----------------------------------------------------------------------
+  160 IF (H .EQ. HOLD) GO TO 200 
+      RH = H/HOLD 
+      H = HOLD 
+      IREDO = 3 
+      GO TO 175 
+  170 RH = MAX(RH,HMIN/ABS(H)) 
+  175 RH = MIN(RH,RMAX) 
+      RH = RH/MAX(1.0D0,ABS(H)*HMXI*RH) 
+      R = 1.0D0 
+      DO 180 J = 2,L 
+        R = R*RH 
+        DO 180 I = 1,N 
+  180     YH(I,J) = YH(I,J)*R 
+      H = H*RH 
+      RC = RC*RH 
+      IALTH = L 
+      IF (IREDO .EQ. 0) GO TO 690 
+!-----------------------------------------------------------------------
+! This section computes the predicted values by effectively             
+! multiplying the YH array by the Pascal Triangle matrix.               
+! RC is the ratio of new to old values of the coefficient  H*EL(1).     
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER       
+! to force PJAC to be called, if a Jacobian is involved.                
+! In any case, PJAC is called at least every MSBP steps.                
+!-----------------------------------------------------------------------
+  200 IF (ABS(RC-1.0D0) .GT. CCMAX) IPUP = MITER 
+      IF (NST .GE. NSLP+MSBP) IPUP = MITER 
+      TN = TN + H 
+      I1 = NQNYH + 1 
+      DO 215 JB = 1,NQ 
+        I1 = I1 - NYH 
+!dir$ ivdep                                                             
+        DO 210 I = I1,NQNYH 
+  210     YH1(I) = YH1(I) + YH1(I+NYH) 
+  215   CONTINUE 
+!-----------------------------------------------------------------------
+! Up to MAXCOR corrector iterations are taken.  A convergence test is   
+! made on the R.M.S. norm of each correction, weighted by the error     
+! weight vector EWT.  The sum of the corrections is accumulated in the  
+! vector ACOR(i).  The YH array is not altered in the corrector loop.   
+!-----------------------------------------------------------------------
+  220 M = 0 
+      DO 230 I = 1,N 
+  230   Y(I) = YH(I,1) 
+      CALL F (NEQ, TN, Y, SAVF) 
+      NFE = NFE + 1 
+      IF (IPUP .LE. 0) GO TO 250 
+!-----------------------------------------------------------------------
+! If indicated, the matrix P = I - h*el(1)*J is reevaluated and         
+! preprocessed before starting the corrector iteration.  IPUP is set    
+! to 0 as an indicator that this has been done.                         
+!-----------------------------------------------------------------------
+      !CALL PJAC (NEQ, Y, YH, NYH, EWT, ACOR, SAVF, WM, IWM, F, JAC) 
+      CALL DPREPJ(NEQ, Y, YH, NYH, EWT, ACOR, SAVF, WM, IWM, F, JAC)
+      IPUP = 0 
+      RC = 1.0D0 
+      NSLP = NST 
+      CRATE = 0.7D0 
+      IF (IERPJ .NE. 0) GO TO 430 
+  250 DO 260 I = 1,N 
+  260   ACOR(I) = 0.0D0 
+  270 IF (MITER .NE. 0) GO TO 350 
+!-----------------------------------------------------------------------
+! In the case of functional iteration, update Y directly from           
+! the result of the last function evaluation.                           
+!-----------------------------------------------------------------------
+      DO 290 I = 1,N 
+        SAVF(I) = H*SAVF(I) - YH(I,2) 
+  290   Y(I) = SAVF(I) - ACOR(I) 
+      DEL = DVNORM (N, Y, EWT) 
+      DO 300 I = 1,N 
+        Y(I) = YH(I,1) + EL(1)*SAVF(I) 
+  300   ACOR(I) = SAVF(I) 
+      GO TO 400 
+!-----------------------------------------------------------------------
+! In the case of the chord method, compute the corrector error,         
+! and solve the linear system with that as right-hand side and          
+! P as coefficient matrix.                                              
+!-----------------------------------------------------------------------
+  350 DO 360 I = 1,N 
+  360   Y(I) = H*SAVF(I) - (YH(I,2) + ACOR(I)) 
+      !CALL SLVS (WM, IWM, Y, SAVF) 
+      CALL DSOLSY(WM, IWM, Y, SAVF)
+      IF (IERSL .LT. 0) GO TO 430 
+      IF (IERSL .GT. 0) GO TO 410 
+      DEL = DVNORM (N, Y, EWT) 
+      DO 380 I = 1,N 
+        ACOR(I) = ACOR(I) + Y(I) 
+  380   Y(I) = YH(I,1) + EL(1)*ACOR(I) 
+!-----------------------------------------------------------------------
+! Test for convergence.  If M.gt.0, an estimate of the convergence      
+! rate constant is stored in CRATE, and this is used in the test.       
+!-----------------------------------------------------------------------
+  400 IF (M .NE. 0) CRATE = MAX(0.2D0*CRATE,DEL/DELP) 
+      DCON = DEL*MIN(1.0D0,1.5D0*CRATE)/(TESCO(2,NQ)*CONIT) 
+      IF (DCON .LE. 1.0D0) GO TO 450 
+      M = M + 1 
+      IF (M .EQ. MAXCOR) GO TO 410 
+      IF (M .GE. 2 .AND. DEL .GT. 2.0D0*DELP) GO TO 410 
+      DELP = DEL 
+      CALL F (NEQ, TN, Y, SAVF) 
+      NFE = NFE + 1 
+      GO TO 270 
+!-----------------------------------------------------------------------
+! The corrector iteration failed to converge.                           
+! If MITER .ne. 0 and the Jacobian is out of date, PJAC is called for   
+! the next try.  Otherwise the YH array is retracted to its values      
+! before prediction, and H is reduced, if possible.  If H cannot be     
+! reduced or MXNCF failures have occurred, exit with KFLAG = -2.        
+!-----------------------------------------------------------------------
+  410 IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430 
+      ICF = 1 
+      IPUP = MITER 
+      GO TO 220 
+  430 ICF = 2 
+      NCF = NCF + 1 
+      RMAX = 2.0D0 
+      TN = TOLD 
+      I1 = NQNYH + 1 
+      DO 445 JB = 1,NQ 
+        I1 = I1 - NYH 
+!dir$ ivdep                                                             
+        DO 440 I = I1,NQNYH 
+  440     YH1(I) = YH1(I) - YH1(I+NYH) 
+  445   CONTINUE 
+      IF (IERPJ .LT. 0 .OR. IERSL .LT. 0) GO TO 680 
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 670 
+      IF (NCF .EQ. MXNCF) GO TO 670 
+      RH = 0.25D0 
+      IPUP = MITER 
+      IREDO = 1 
+      GO TO 170 
+!-----------------------------------------------------------------------
+! The corrector has converged.  JCUR is set to 0                        
+! to signal that the Jacobian involved may need updating later.         
+! The local error test is made and control passes to statement 500      
+! if it fails.                                                          
+!-----------------------------------------------------------------------
+  450 JCUR = 0 
+      IF (M .EQ. 0) DSM = DEL/TESCO(2,NQ) 
+      IF (M .GT. 0) DSM = DVNORM (N, ACOR, EWT)/TESCO(2,NQ) 
+      IF (DSM .GT. 1.0D0) GO TO 500 
+!-----------------------------------------------------------------------
+! After a successful step, update the YH array.                         
+! Consider changing H if IALTH = 1.  Otherwise decrease IALTH by 1.     
+! If IALTH is then 1 and NQ .lt. MAXORD, then ACOR is saved for         
+! use in a possible order increase on the next step.                    
+! If a change in H is considered, an increase or decrease in order      
+! by one is considered also.  A change in H is made only if it is by a  
+! factor of at least 1.1.  If not, IALTH is set to 3 to prevent         
+! testing for that many steps.                                          
+!-----------------------------------------------------------------------
+      KFLAG = 0 
+      IREDO = 0 
+      NST = NST + 1 
+      HU = H 
+      NQU = NQ 
+      DO 470 J = 1,L 
+        DO 470 I = 1,N 
+  470     YH(I,J) = YH(I,J) + EL(J)*ACOR(I) 
+      IALTH = IALTH - 1 
+      IF (IALTH .EQ. 0) GO TO 520 
+      IF (IALTH .GT. 1) GO TO 700 
+      IF (L .EQ. LMAX) GO TO 700 
+      DO 490 I = 1,N 
+  490   YH(I,LMAX) = ACOR(I) 
+      GO TO 700 
+!-----------------------------------------------------------------------
+! The error test failed.  KFLAG keeps track of multiple failures.       
+! Restore TN and the YH array to their previous values, and prepare     
+! to try the step again.  Compute the optimum step size for this or     
+! one lower order.  After 2 or more failures, H is forced to decrease   
+! by a factor of 0.2 or less.                                           
+!-----------------------------------------------------------------------
+  500 KFLAG = KFLAG - 1 
+      TN = TOLD 
+      I1 = NQNYH + 1 
+      DO 515 JB = 1,NQ 
+        I1 = I1 - NYH 
+!dir$ ivdep                                                             
+        DO 510 I = I1,NQNYH 
+  510     YH1(I) = YH1(I) - YH1(I+NYH) 
+  515   CONTINUE 
+      RMAX = 2.0D0 
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 660 
+      IF (KFLAG .LE. -3) GO TO 640 
+      IREDO = 2 
+      RHUP = 0.0D0 
+      GO TO 540 
+!-----------------------------------------------------------------------
+! Regardless of the success or failure of the step, factors             
+! RHDN, RHSM, and RHUP are computed, by which H could be multiplied     
+! at order NQ - 1, order NQ, or order NQ + 1, respectively.             
+! In the case of failure, RHUP = 0.0 to avoid an order increase.        
+! The largest of these is determined and the new order chosen           
+! accordingly.  If the order is to be increased, we compute one         
+! additional scaled derivative.                                         
+!-----------------------------------------------------------------------
+  520 RHUP = 0.0D0 
+      IF (L .EQ. LMAX) GO TO 540 
+      DO 530 I = 1,N 
+  530   SAVF(I) = ACOR(I) - YH(I,LMAX) 
+      DUP = DVNORM (N, SAVF, EWT)/TESCO(3,NQ) 
+      EXUP = 1.0D0/(L+1) 
+      RHUP = 1.0D0/(1.4D0*DUP**EXUP + 0.0000014D0) 
+  540 EXSM = 1.0D0/L 
+      RHSM = 1.0D0/(1.2D0*DSM**EXSM + 0.0000012D0) 
+      RHDN = 0.0D0 
+      IF (NQ .EQ. 1) GO TO 560 
+      DDN = DVNORM (N, YH(1,L), EWT)/TESCO(1,NQ) 
+      EXDN = 1.0D0/NQ 
+      RHDN = 1.0D0/(1.3D0*DDN**EXDN + 0.0000013D0) 
+  560 IF (RHSM .GE. RHUP) GO TO 570 
+      IF (RHUP .GT. RHDN) GO TO 590 
+      GO TO 580 
+  570 IF (RHSM .LT. RHDN) GO TO 580 
+      NEWQ = NQ 
+      RH = RHSM 
+      GO TO 620 
+  580 NEWQ = NQ - 1 
+      RH = RHDN 
+      IF (KFLAG .LT. 0 .AND. RH .GT. 1.0D0) RH = 1.0D0 
+      GO TO 620 
+  590 NEWQ = L 
+      RH = RHUP 
+      IF (RH .LT. 1.1D0) GO TO 610 
+      R = EL(L)/L 
+      DO 600 I = 1,N 
+  600   YH(I,NEWQ+1) = ACOR(I)*R 
+      GO TO 630 
+  610 IALTH = 3 
+      GO TO 700 
+  620 IF ((KFLAG .EQ. 0) .AND. (RH .LT. 1.1D0)) GO TO 610 
+      IF (KFLAG .LE. -2) RH = MIN(RH,0.2D0) 
+!-----------------------------------------------------------------------
+! If there is a change of order, reset NQ, l, and the coefficients.     
+! In any case H is reset according to RH and the YH array is rescaled.  
+! Then exit from 690 if the step was OK, or redo the step otherwise.    
+!-----------------------------------------------------------------------
+      IF (NEWQ .EQ. NQ) GO TO 170 
+  630 NQ = NEWQ 
+      L = NQ + 1 
+      IRET = 2 
+      GO TO 150 
+!-----------------------------------------------------------------------
+! Control reaches this section if 3 or more failures have occured.      
+! If 10 failures have occurred, exit with KFLAG = -1.                   
+! It is assumed that the derivatives that have accumulated in the       
+! YH array have errors of the wrong order.  Hence the first             
+! derivative is recomputed, and the order is set to 1.  Then            
+! H is reduced by a factor of 10, and the step is retried,              
+! until it succeeds or H reaches HMIN.                                  
+!-----------------------------------------------------------------------
+  640 IF (KFLAG .EQ. -10) GO TO 660 
+      RH = 0.1D0 
+      RH = MAX(HMIN/ABS(H),RH) 
+      H = H*RH 
+      DO 645 I = 1,N 
+  645   Y(I) = YH(I,1) 
+      CALL F (NEQ, TN, Y, SAVF) 
+      NFE = NFE + 1 
+      DO 650 I = 1,N 
+  650   YH(I,2) = H*SAVF(I) 
+      IPUP = MITER 
+      IALTH = 5 
+      IF (NQ .EQ. 1) GO TO 200 
+      NQ = 1 
+      L = 2 
+      IRET = 3 
+      GO TO 150 
+!-----------------------------------------------------------------------
+! All returns are made through this section.  H is saved in HOLD        
+! to allow the caller to change H on the next step.                     
+!-----------------------------------------------------------------------
+  660 KFLAG = -1 
+      GO TO 720 
+  670 KFLAG = -2 
+      GO TO 720 
+  680 KFLAG = -3 
+      GO TO 720 
+  690 RMAX = 10.0D0 
+  700 R = 1.0D0/TESCO(2,NQU) 
+      DO 710 I = 1,N 
+  710   ACOR(I) = ACOR(I)*R 
+  720 HOLD = H 
+      JSTART = 1 
+      RETURN 
+!----------------------- END OF SUBROUTINE DSTODE ----------------------
+      END SUBROUTINE DSTODE                                          
+!DECK DEWSET                                                            
+      SUBROUTINE DEWSET (N, ITOL, RelTol, AbsTol, YCUR, EWT) 
+!***BEGIN PROLOGUE  DEWSET                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Set error weight vector.                                   
+!***TYPE      KPP_REAL (SEWSET-S, DEWSET-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This subroutine sets the error weight vector EWT according to        
+!      EWT(i) = RelTol(i)*ABS(YCUR(i)) + AbsTol(i),  i = 1,...,N,           
+!  with the subscript on RelTol and/or AbsTol possibly replaced by 1 above, 
+!  depending on the value of ITOL.                                      
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!***END PROLOGUE  DEWSET                                                
+!**End                                                                  
+      INTEGER N, ITOL 
+      INTEGER I 
+      KPP_REAL RelTol(*), AbsTol(*), YCUR(N), EWT(N) 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DEWSET                                  
+      GO TO (10, 20, 30, 40), ITOL 
+   10 CONTINUE 
+      DO 15 I = 1,N 
+   15   EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(1) 
+      RETURN 
+   20 CONTINUE 
+      DO 25 I = 1,N 
+   25   EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(I) 
+      RETURN 
+   30 CONTINUE 
+      DO 35 I = 1,N 
+   35   EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(1) 
+      RETURN 
+   40 CONTINUE 
+      DO 45 I = 1,N 
+   45   EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(I) 
+      RETURN 
+!----------------------- END OF SUBROUTINE DEWSET ----------------------
+      END SUBROUTINE DEWSET                                          
+!DECK DVNORM                                                            
+      KPP_REAL FUNCTION DVNORM (N, V, W) 
+!***BEGIN PROLOGUE  DVNORM                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Weighted root-mean-square vector norm.                     
+!***TYPE      KPP_REAL (SVNORM-S, DVNORM-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This function routine computes the weighted root-mean-square norm    
+!  of the vector of length N contained in the array V, with weights     
+!  contained in the array W of length N:                                
+!    DVNORM = SQRT( (1/N) * SUM( V(i)*W(i) )**2 )                       
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!***END PROLOGUE  DVNORM                                                
+!**End                                                                  
+      INTEGER N,   I 
+      KPP_REAL V(N), W(N), SUM 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DVNORM                                  
+      SUM = 0.0D0 
+      DO 10 I = 1,N 
+   10   SUM = SUM + (V(I)*W(I))**2 
+      DVNORM = SQRT(SUM/N) 
+      RETURN 
+!----------------------- END OF FUNCTION DVNORM ------------------------
+      END FUNCTION DVNORM                                          
+!DECK XERRWD                                                            
+      SUBROUTINE XERRWD (MSG, NMES, NERR, LEVEL, NI, I1, I2, NR, R1, R2) 
+!***BEGIN PROLOGUE  XERRWD                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Write error message with values.                           
+!***CATEGORY  R3C                                                       
+!***TYPE      KPP_REAL (XERRWV-S, XERRWD-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  Subroutines XERRWD, XSETF, XSETUN, and the function routine IXSAV,   
+!  as given here, constitute a simplified version of the SLATEC error   
+!  handling package.                                                    
+!                                                                       
+!  All arguments are input arguments.                                   
+!                                                                       
+!  MSG    = The message (character array).                              
+!  NMES   = The length of MSG (number of characters).                   
+!  NERR   = The error number (not used).                                
+!  LEVEL  = The error level..                                           
+!           0 or 1 means recoverable (control returns to caller).       
+!           2 means fatal (run is aborted--see note below).             
+!  NI     = Number of integers (0, 1, or 2) to be printed with message. 
+!  I1,I2  = Integers to be printed, depending on NI.                    
+!  NR     = Number of reals (0, 1, or 2) to be printed with message.    
+!  R1,R2  = Reals to be printed, depending on NR.                       
+!                                                                       
+!  Note..  this routine is machine-dependent and specialized for use    
+!  in limited context, in the following ways..                          
+!  1. The argument MSG is assumed to be of type CHARACTER, and          
+!     the message is printed with a format of (1X,A).                   
+!  2. The message is assumed to take only one line.                     
+!     Multi-line messages are generated by repeated calls.              
+!  3. If LEVEL = 2, control passes to the statement   STOP              
+!     to abort the run.  This statement may be machine-dependent.       
+!  4. R1 and R2 are assumed to be in double precision and are printed   
+!     in D21.13 format.                                                 
+!                                                                       
+!***ROUTINES CALLED  IXSAV                                              
+!***REVISION HISTORY  (YYMMDD)                                          
+!   920831  DATE WRITTEN                                                
+!   921118  Replaced MFLGSV/LUNSAV by IXSAV. (ACH)                      
+!   930329  Modified prologue to SLATEC format. (FNF)                   
+!   930407  Changed MSG from CHARACTER*1 array to variable. (FNF)       
+!   930922  Minor cosmetic change. (FNF)                                
+!***END PROLOGUE  XERRWD                                                
+!                                                                       
+!*Internal Notes:                                                       
+!                                                                       
+! For a different default logical unit number, IXSAV (or a subsidiary   
+! routine that it calls) will need to be modified.                      
+! For a different run-abort command, change the statement following     
+! statement 100 at the end.                                             
+!-----------------------------------------------------------------------
+! Subroutines called by XERRWD.. None                                   
+! Function routine called by XERRWD.. IXSAV                             
+!-----------------------------------------------------------------------
+!**End                                                                  
+!                                                                       
+!  Declare arguments.                                                   
+!                                                                       
+      KPP_REAL R1, R2 
+      INTEGER NMES, NERR, LEVEL, NI, I1, I2, NR 
+      CHARACTER*(*) MSG 
+!                                                                       
+!  Declare local variables.                                             
+!                                                                       
+      INTEGER LUNIT, MESFLG !, IXSAV 
+!                                                                       
+!  Get logical unit number and message print flag.                      
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  XERRWD                                  
+      LUNIT = IXSAV (1, 0, .FALSE.) 
+      MESFLG = IXSAV (2, 0, .FALSE.) 
+      IF (MESFLG .EQ. 0) GO TO 100 
+!                                                                       
+!  Write the message.                                                   
+!                                                                       
+      WRITE (LUNIT,10)  MSG 
+   10 FORMAT(1X,A) 
+      IF (NI .EQ. 1) WRITE (LUNIT, 20) I1 
+   20 FORMAT(6X,'In above message,  I1 =',I10) 
+      IF (NI .EQ. 2) WRITE (LUNIT, 30) I1,I2 
+   30 FORMAT(6X,'In above message,  I1 =',I10,3X,'I2 =',I10) 
+      IF (NR .EQ. 1) WRITE (LUNIT, 40) R1 
+   40 FORMAT(6X,'In above message,  R1 =',D21.13) 
+      IF (NR .EQ. 2) WRITE (LUNIT, 50) R1,R2 
+   50 FORMAT(6X,'In above,  R1 =',D21.13,3X,'R2 =',D21.13) 
+!                                                                       
+!  Abort the run if LEVEL = 2.                                          
+!                                                                       
+  100 IF (LEVEL .NE. 2) RETURN 
+      STOP 
+!----------------------- End of Subroutine XERRWD ----------------------
+      END SUBROUTINE XERRWD                                          
+!DECK XSETF                                                             
+      SUBROUTINE XSETF (MFLAG) 
+!***BEGIN PROLOGUE  XSETF                                               
+!***PURPOSE  Reset the error print control flag.                        
+!***CATEGORY  R3A                                                       
+!***TYPE      ALL (XSETF-A)                                             
+!***KEYWORDS  ERROR CONTROL                                             
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!   XSETF sets the error print control flag to MFLAG:                   
+!      MFLAG=1 means print all messages (the default).                  
+!      MFLAG=0 means no printing.                                       
+!                                                                       
+!***SEE ALSO  XERRWD, XERRWV                                            
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  IXSAV                                              
+!***REVISION HISTORY  (YYMMDD)                                          
+!   921118  DATE WRITTEN                                                
+!   930329  Added SLATEC format prologue. (FNF)                         
+!   930407  Corrected SEE ALSO section. (FNF)                           
+!   930922  Made user-callable, and other cosmetic changes. (FNF)       
+!***END PROLOGUE  XSETF                                                 
+!                                                                       
+! Subroutines called by XSETF.. None                                    
+! Function routine called by XSETF.. IXSAV                              
+!-----------------------------------------------------------------------
+!**End                                                                  
+      INTEGER MFLAG, JUNK !, IXSAV 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  XSETF                                   
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) JUNK = IXSAV (2,MFLAG,.TRUE.) 
+      RETURN 
+!----------------------- End of Subroutine XSETF -----------------------
+      END SUBROUTINE XSETF                                          
+!DECK XSETUN                                                            
+      SUBROUTINE XSETUN (LUN) 
+!***BEGIN PROLOGUE  XSETUN                                              
+!***PURPOSE  Reset the logical unit number for error messages.          
+!***CATEGORY  R3B                                                       
+!***TYPE      ALL (XSETUN-A)                                            
+!***KEYWORDS  ERROR CONTROL                                             
+!***DESCRIPTION                                                         
+!                                                                       
+!   XSETUN sets the logical unit number for error messages to LUN.      
+!                                                                       
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***SEE ALSO  XERRWD, XERRWV                                            
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  IXSAV                                              
+!***REVISION HISTORY  (YYMMDD)                                          
+!   921118  DATE WRITTEN                                                
+!   930329  Added SLATEC format prologue. (FNF)                         
+!   930407  Corrected SEE ALSO section. (FNF)                           
+!   930922  Made user-callable, and other cosmetic changes. (FNF)       
+!***END PROLOGUE  XSETUN                                                
+!                                                                       
+! Subroutines called by XSETUN.. None                                   
+! Function routine called by XSETUN.. IXSAV                             
+!-----------------------------------------------------------------------
+!**End                                                                  
+      INTEGER LUN, JUNK !, IXSAV 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  XSETUN                                  
+      IF (LUN .GT. 0) JUNK = IXSAV (1,LUN,.TRUE.) 
+      RETURN 
+!----------------------- End of Subroutine XSETUN ----------------------
+      END SUBROUTINE XSETUN                                          
+!DECK IXSAV                                                             
+      INTEGER FUNCTION IXSAV (IPAR, IVALUE, ISET) 
+!***BEGIN PROLOGUE  IXSAV                                               
+!***SUBSIDIARY                                                          
+!***PURPOSE  Save and recall error message control parameters.          
+!***CATEGORY  R3C                                                       
+!***TYPE      ALL (IXSAV-A)                                             
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  IXSAV saves and recalls one of two error message parameters:         
+!    LUNIT, the logical unit number to which messages are printed, and  
+!    MESFLG, the message print flag.                                    
+!  This is a modification of the SLATEC library routine J4SAVE.         
+!                                                                       
+!  Saved local variables..                                              
+!   LUNIT  = Logical unit number for messages.  The default is obtained 
+!            by a call to IUMACH (may be machine-dependent).            
+!   MESFLG = Print control flag..                                       
+!            1 means print all messages (the default).                  
+!            0 means no printing.                                       
+!                                                                       
+!  On input..                                                           
+!    IPAR   = Parameter indicator (1 for LUNIT, 2 for MESFLG).          
+!    IVALUE = The value to be set for the parameter, if ISET = .TRUE.   
+!    ISET   = Logical flag to indicate whether to read or write.        
+!             If ISET = .TRUE., the parameter will be given             
+!             the value IVALUE.  If ISET = .FALSE., the parameter       
+!             will be unchanged, and IVALUE is a dummy argument.        
+!                                                                       
+!  On return..                                                          
+!    IXSAV = The (old) value of the parameter.                          
+!                                                                       
+!***SEE ALSO  XERRWD, XERRWV                                            
+!***ROUTINES CALLED  IUMACH                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   921118  DATE WRITTEN                                                
+!   930329  Modified prologue to SLATEC format. (FNF)                   
+!   930915  Added IUMACH call to get default output unit.  (ACH)        
+!   930922  Minor cosmetic changes. (FNF)                               
+!   010425  Type declaration for IUMACH added. (ACH)                    
+!***END PROLOGUE  IXSAV                                                 
+!                                                                       
+! Subroutines called by IXSAV.. None                                    
+! Function routine called by IXSAV.. IUMACH                             
+!-----------------------------------------------------------------------
+!**End                                                                  
+      LOGICAL ISET 
+      INTEGER IPAR, IVALUE 
+!-----------------------------------------------------------------------
+      INTEGER LUNIT, MESFLG!, IUMACH
+!-----------------------------------------------------------------------
+! The following Fortran-77 declaration is to cause the values of the    
+! listed (local) variables to be saved between calls to this routine.   
+!-----------------------------------------------------------------------
+      SAVE LUNIT, MESFLG 
+      DATA LUNIT/-1/, MESFLG/1/ 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  IXSAV                                   
+      IF (IPAR .EQ. 1) THEN 
+        IF (LUNIT .EQ. -1) LUNIT = IUMACH() 
+        IXSAV = LUNIT 
+        IF (ISET) LUNIT = IVALUE 
+        ENDIF 
+!                                                                       
+      IF (IPAR .EQ. 2) THEN                                             
+        IXSAV = MESFLG                                                  
+        IF (ISET) MESFLG = IVALUE                                       
+        ENDIF                                                           
+!                                                                       
+      RETURN                                                            
+!----------------------- End of Function IXSAV -------------------------
+      END FUNCTION IXSAV                                         
+!DECK IUMACH                                                            
+      INTEGER FUNCTION IUMACH() 
+!***BEGIN PROLOGUE  IUMACH                                              
+!***PURPOSE  Provide standard output unit number.                       
+!***CATEGORY  R1                                                        
+!***TYPE      INTEGER (IUMACH-I)                                        
+!***KEYWORDS  MACHINE CONSTANTS                                         
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+! *Usage:                                                               
+!        INTEGER  LOUT, IUMACH                                          
+!        LOUT = IUMACH()                                                
+!                                                                       
+! *Function Return Values:                                              
+!     LOUT : the standard logical unit for Fortran output.              
+!                                                                       
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   930915  DATE WRITTEN                                                
+!   930922  Made user-callable, and other cosmetic changes. (FNF)       
+!***END PROLOGUE  IUMACH                                                
+!                                                                       
+!*Internal Notes:                                                       
+!  The built-in value of 6 is standard on a wide range of Fortran       
+!  systems.  This may be machine-dependent.                             
+!**End                                                                  
+!***FIRST EXECUTABLE STATEMENT  IUMACH                                  
+      IUMACH = 6 
+!                                                                       
+      RETURN 
+!----------------------- End of Function IUMACH ------------------------
+      END FUNCTION IUMACH                                         
+
+!---- END OF SUBROUTINE DLSODE AND ITS INTERNAL PROCEDURES
+      END SUBROUTINE DLSODE                                          
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM(N, T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      INTEGER :: N
+      KPP_REAL :: V(NVAR), FCT(NVAR), T, TOLD
+      
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+
+      CALL Fun(V, FIX, RCONST, FCT)
+      
+      !Nfun=Nfun+1
+
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM (N, T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_JacobianSP
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      KPP_REAL :: V(NVAR), T, TOLD
+      INTEGER :: I, J, N, ML, MU, NROWPD
+#ifdef FULL_ALGEBRA    
+      KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+#else
+      KPP_REAL :: JF(LU_NONZERO)
+#endif   
+  
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+    
+#ifdef FULL_ALGEBRA    
+      CALL Jac_SP(V, FIX, RCONST, JV)
+      DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+      END DO
+#else
+      CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+      !Njac=Njac+1
+    
+      END SUBROUTINE JAC_CHEM
+
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_odessa_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_odessa_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_odessa_ddm.def	(revision 3477)
@@ -0,0 +1,42 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+#DOUBLE ON 
+#INTFILE kpp_odessa_ddm
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
+#INLINE C_GLOBAL
+extern int Autonomous;
+extern double STEPSTART;
+#ENDINLINE
+
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+
+
+#INLINE C_INIT
+        STEPMIN=0.0001;
+        STEPMAX=3600.0;
+        Autonomous = 0;
+        STEPSTART=STEPMIN;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_odessa_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_odessa_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_odessa_ddm.f	(revision 3477)
@@ -0,0 +1,4427 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      REAL*8 TIN
+C TOUT - End Time
+      REAL*8 TOUT
+C Concentrations and Sensitivities
+      REAL*8 Y(NVAR,NSENSIT+1), PARAMS(NSENSIT)
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+      INTEGER i
+
+      INTEGER LIW, LRW
+C      PARAMETER (LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+C      PARAMETER (LIW = 21 + NVAR + NSENSIT)
+C      REAL*8 RWORK(LRW)
+C      INTEGER IWORK(LIW)
+C Note: the following dynamic allocation is not standard F77 and may not work on
+C       some systems. Declare LRW, LIW parameters as above with some upper bound used for NSENSIT
+      REAL*8 RWORK(22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+      INTEGER IWORK(21 + NVAR + NSENSIT)
+
+      INTEGER IOPT(3), NEQ(2)
+
+      EXTERNAL FUNC_CHEM,JAC,DFUNC_CHEMDPAR
+
+      MF = 21    ! --- BDF plus user-supplied Jacobian
+
+      LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR
+      LIW = 21 + NVAR + NSENSIT
+
+      NEQ(1) = NVAR ! --- No. of Variables
+      NEQ(2) = NSENSIT ! --- No of parameters
+
+      ITOL=1     ! --- 1=Scalar Tolerances; 4 = VECTOR TOLERANCES
+      ITASK=1    ! --- Normal Output
+      ISTATE=1
+      IOPT(1)=1  ! --- 0= No optional parameters, 1=Optional parameters
+      IOPT(2)=1  ! --- 1=Perform sensitivity analysis; 0 if not
+      IOPT(3)=1  ! --- 1 if DFUNC_CHEMDPAR supplied by the user;
+                 ! --- 0 if finite differences are to be used
+C --- Set optional parameters
+      DO 10 i=1,LRW
+        RWORK(i) = 0.0D0
+ 10   CONTINUE
+      DO 20 i=1,LIW
+        IWORK(i) = 0
+ 20   CONTINUE
+
+      RWORK(5) = STEPMIN   ! 	THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+      RWORK(6) = STEPMAX     ! THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+      RWORK(7) = 0.0D0       ! THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+      IWORK(6) = 5000        !  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+
+      CALL KPP_ODESSA( FUNC_CHEM,DFUNC_CHEMDPAR,NEQ,Y,PARAMS,TIN,TOUT,
+     &              ITOL,RTOL,ATOL,
+     1              ITASK,ISTATE,IOPT,RWORK,LRW,IWORK,LIW,
+     &              JAC,MF)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'KPP_ODESSA: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+
+
+        SUBROUTINE FUNC_CHEM (N, T, V, PARAMS, FCT)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        DIMENSION V(NVAR), PARAMS(*), FCT(NVAR)
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V,  FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE DFUNC_CHEMDPAR (N, T, V, PARAMS, DFCT, JPAR)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+C --- NCOEFF = number of rate coefficients w.r.t. which we differentiate
+C    (note that in some applications NCOEFF may be different than NSENSIT)
+C    JCOEFF(1:NCOEFF) are the indices of rate coefficients   w.r.t. which we differentiate
+        INTEGER NCOEFF, JCOEFF(NREACT)
+        COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+
+        DIMENSION V(NVAR), PARAMS(*), DFCT(NVAR)
+	INTEGER JPAR, i, JC(1)
+	IF (DDMTYPE .EQ. 0) THEN
+C This setting is required for sensitivities w.r.t. initial conditions
+          DO i=1,NVAR
+	    DFCT(i) = 0.d0
+	  END DO
+	ELSE
+C This setting is required for sensitivities w.r.t. rate coefficients
+C   ... and should be changed by the user for other applications
+          JC(1) = JCOEFF(JPAR)
+	  CALL dFun_dRcoeff(V,  FIX, 1, JC, DFCT )
+	END IF
+        RETURN
+        END
+
+        SUBROUTINE JAC (N, T, V, PARAMS, ML, MU, JS, NROWPD)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Sparse.h'
+
+        REAL*8 V(NVAR), PARAMS(*), JS(LU_NONZERO)
+	INTEGER ML, MU, NROWPD
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        DO i=1,LU_NONZERO
+            JS(i) = 0.0D0
+        END DO
+        CALL Jac_SP(V,  FIX, RCONST, JS)
+        RETURN
+        END
+
+
+C      ALGORITHM 658, COLLECTED ALGORITHMS FROM ACM.
+C      THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+C      VOL. 14, NO. 1, P.61.
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE..  LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS.  SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY DIFFERENTIA
+C     EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS SENSITIVITY ANALYSIS.
+C     SUBMITTED TO ACM TRANS. MATH. SOFTWARE, (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C PROBLEM STATEMENT..
+C
+C THE ODESSA MODIFICATION OF THE LSODE PACKAGE PROVIDES THE OPTION TO
+C CALCULATE FIRST-ORDER SENSITIVITY COEFFICIENTS FOR A SYSTEM OF STIFF
+C OR NON-STIFF EXPLICIT ORDINARY DIFFERENTIAL EQUATIONS OF THE GENERAL
+C FORM :
+C
+C                  DY/DT = F(Y,T;P)     (1)
+C
+C WHERE Y IS AN N-DIMENSIONAL DEPENDENT VARIABLE VECTOR, T IS THE
+C INDEPENDENT INTEGRATION VARIABLE, AND P IS AN NPAR-DIMENSIONAL
+C CONSTANT VECTOR. THE GOVERNING EQUATIONS FOR THE FIRST-ORDER
+C SENSITIVITY COEFFICIENTS ARE GIVEN BY :
+C
+C                  S'(T) = J(T)*S(T) + DF/DP     (2)
+C
+C WHERE
+C
+C                  S(T)  = DY(T)/DP (= SENSITIVITY FUNCTIONS)
+C                  S'(T) = D(DY(T)/DP)/DT
+C                  J(T)  = DF(Y,T;P)/DY(T) (= JACOBIAN MATRIX)
+C AND              DF/DP = DF(Y,T;P)/DP (= INHOMOGENEITY MATRIX)
+C
+C SOLUTION OF EQUATIONS (1) AND (2) PROCEEDS SIMULTANEOUSLY VIA AN
+C EXTENSION OF THE LSODE PACKAGE AS DESCRIBED IN [1].
+C----------------------------------------------------------------------
+C ACKNOWLEDGEMENT : THE FOLLOWING ODESSA PACKAGE DOCUMENTATION IS A
+C                   MODIFICATION OF THE LSODE DOCUMENTATION WHICH
+C                   ACCOMPANIES THE LSODE PACKAGE CODE.
+C----------------------------------------------------------------------
+C SUMMARY OF USAGE.
+C
+C COMMUNICATION BETWEEN THE USER AND THE ODESSA PACKAGE, FOR NORMAL
+C SITUATIONS, IS SUMMARIZED HERE. THIS SUMMARY DESCRIBES ONLY A SUBSET
+C OF THE FULL SET OF OPTIONS AVAILABLE.  SEE THE FULL DESCRIPTION FOR
+C DETAILS, INCLUDING OPTIONAL COMMUNICATION, NONSTANDARD OPTIONS,
+C AND INSTRUCTIONS FOR SPECIAL SITUATIONS.  SEE ALSO THE EXAMPLE
+C PROBLEM (WITH PROGRAM AND OUTPUT) FOLLOWING THIS SUMMARY.
+C
+C A. FIRST PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE F (N, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(N), YDOT(N), PAR(NPAR)
+C WHICH SUPPLIES THE VECTOR FUNCTION F BY LOADING YDOT(I) WITH F(I).
+C N IS THE NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS IN THE
+C ABOVE MODEL. NPAR IS THE NUMBER OF MODEL PARAMETERS FOR WHICH
+C VECTOR SENSITIVITY FUNCTIONS ARE DESIRED. YOU ARE ALSO ENCOURAGED
+C TO PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE DF (N, T, Y, PAR, DFDP, JPAR)
+C              DOUBLE PRECISION T, Y, PAR, DFDP
+C              DIMENSION Y(N), PAR(NPAR), DFDP(N)
+C              GO TO (1,...,NPAR) JPAR
+C         1    DFDP(1) = DF(1)/DP(1)
+C              .
+C              DFDP(I) = DF(I)/DP(1)
+C              .
+C              DFDP(N) = DF(N)/DP(1)
+C              RETURN
+C         2    DFDP(1) = DF(1)/DP(2)
+C              .
+C              DFDP(I) = DF(I)/DP(2)
+C              .
+C              DFDP(N) = DF(N)/DP(2)
+C              RETURN
+C         .    .
+C         .    .
+C              RETURN
+C       NPAR   DFDP(1) = DF(1)/DP(NPAR)
+C              .
+C              DFDP(I) = DF(I)/DP(NPAR)
+C              .
+C              DFDP(N) = DF(N)/DP(NPAR)
+C              RETURN
+C              END
+C ONLY NONZERO ELEMENTS NEED BE LOADED. IF THIS IS NOT FEASIBLE,
+C ODESSA WILL GENERATE THIS MATRIX INTERNALLY BY DIFFERENCE QUOTIENTS.
+C
+C B. NEXT DETERMINE (OR GUESS) WHETHER OR NOT THE PROBLEM IS STIFF.
+C STIFFNESS OCCURS WHEN THE JACOBIAN MATRIX DF/DY HAS AN EIGENVALUE
+C WHOSE REAL PART IS NEGATIVE AND LARGE IN MAGNITUDE, COMPARED TO THE
+C RECIPROCAL OF THE T SPAN OF INTEREST.  IF THE PROBLEM IS NONSTIFF,
+C USE METH = 10.  IF IT IS STIFF, USE METH = 20. THE USER IS REQUIRED
+C TO INPUT THE METHOD FLAG MF = 10*METH + MITER. THERE ARE FOUR
+C STANDARD CHOICES FOR MITER WHEN A SENSITIVITY ANALYSIS IS DESIRED,
+C AND ODESSA REQUIRES THE JACOBIAN MATRIX IN SOME FORM.
+C THIS MATRIX IS REGARDED EITHER AS FULL (MITER = 1 OR 2),
+C OR BANDED (MITER = 4 OR 5). IN THE BANDED CASE, ODESSA REQUIRES TWO
+C HALF-BANDWIDTH PARAMETERS ML AND MU.  THESE ARE, RESPECTIVELY, THE
+C WIDTHS OF THE LOWER AND UPPER PARTS OF THE BAND, EXCLUDING THE MAIN
+C DIAGONAL.  THUS THE BAND CONSISTS OF THE LOCATIONS (I,J) WITH
+C I-ML .LE. J .LE. I+MU, AND THE FULL BANDWIDTH IS ML+MU+1.
+C
+C C. YOU ARE ENCOURAGED TO SUPPLY THE JACOBIAN DIRECTLY (MF = 11, 14,
+C 21, OR 24), BUT IF THIS IS NOT FEASIBLE, ODESSA WILL COMPUTE IT
+C INTERNALLY BY DIFFERENCE QUOTIENTS (MF = 12, 15, 22, OR 25). IF YOU
+C ARE SUPPLYING THE JACOBIAN, PROVIDE A SUBROUTINE OF THE FORM..
+C         SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C         DOUBLE PRECISION T, Y, PAR, PD
+C         DIMENSION Y(N), PD(NROWPD,N), PAR(NPAR)
+C WHICH SUPPLIES DF/DY BY LOADING PD AS FOLLOWS..
+C  FOR A FULL JACOBIAN (MF = 11, OR 21), LOAD PD(I,J) WITH DF(I)/DY(J),
+C  THE PARTIAL DERIVATIVE OF F(I) WITH RESPECT TO Y(J).  (IGNORE THE
+C  ML AND MU ARGUMENTS IN THIS CASE.)
+C  FOR A BANDED JACOBIAN (MF = 14, OR 24), LOAD PD(I-J+MU+1,J) WITH
+C  DF(I)/DY(J), I.E. LOAD THE DIAGONAL LINES OF DF/DY INTO THE ROWS OF
+C  PD FROM THE TOP DOWN.
+C IN EITHER CASE, ONLY NONZERO ELEMENTS NEED BE LOADED.
+C
+C D. WRITE A MAIN PROGRAM WHICH CALLS SUBROUTINE ODESSA ONCE FOR
+C EACH POINT AT WHICH ANSWERS ARE DESIRED.  THIS SHOULD ALSO PROVIDE
+C FOR POSSIBLE USE OF LOGICAL UNIT 6 FOR OUTPUT OF ERROR MESSAGES BY
+C ODESSA.  ON THE FIRST CALL TO ODESSA, SUPPLY ARGUMENTS AS FOLLOWS..
+C F     = NAME OF SUBROUTINE FOR RIGHT-HAND SIDE VECTOR F (MODEL).
+C         THIS NAME MUST BE DECLARED EXTERNAL IN CALLING PROGRAM.
+C DF    = NAME OF SUBROUTINE FOR INHOMOGENEITY MATRIX DF/DP.
+C         IF USED (IDF = 1), THIS NAME MUST BE DECLARED EXTERNAL IN
+C         CALLING PROGRAM. IF NOT USED (IDF = 0), PASS A DUMMY NAME.
+C N     = NUMBER OF FIRST ORDER ODE-S IN MODEL; LOAD INTO NEQ(1).
+C NPAR  = NUMBER OF MODEL PARAMETERS OF INTEREST; LOAD INTO NEQ(2).
+C Y     = AN (N) BY (NPAR+1) REAL ARRAY OF INITIAL VALUES..
+C         Y(I,1) , I = 1,N , CONTAIN THE STATE, OR MODEL, DEPENDENT
+C                            VARIABLES,
+C         Y(I,J) , J = 2,NPAR , CONTAIN THE DEPENDENT SENSITIVITY
+C                               COEFFICIENTS.
+C PAR   = A REAL ARRAY OF LENGTH NPAR CONTAINING MODEL PARAMETERS
+C         OF INTEREST.
+C T     = THE INITIAL VALUE OF THE INDEPENDENT VARIABLE.
+C TOUT  = FIRST POINT WHERE OUTPUT IS DESIRED (.NE. T).
+C ITOL  = 1, 2, 3, OR 4 ACCORDING AS RTOL, ATOL (BELOW) ARE  SCALARS
+C         OR ARRAYS.
+C RTOL  = RELATIVE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C ATOL  = ABSOLUTE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C         THE ESTIMATED LOCAL ERROR IN Y(I,J) WILL BE CONTROLLED SO AS
+C         TO BE ROUGHLY LESS (IN MAGNITUDE) THAN
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL          IF ITOL = 1,
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL(I,J)     IF ITOL = 2,
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL      IF ITOL = 3, OR
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL(I,J) IF ITOL = 4.
+C         THUS THE LOCAL ERROR TEST PASSES IF, IN EACH COMPONENT,
+C         EITHER THE ABSOLUTE ERROR IS LESS THAN ATOL (OR ATOL(I,J)),
+C         OR THE RELATIVE ERROR IS LESS THAN RTOL (OR RTOL(I,J)).
+C         USE RTOL = 0.0 FOR PURE ABSOLUTE ERROR CONTROL, AND
+C         USE ATOL = 0.0 FOR PURE RELATIVE ERROR CONTROL.
+C         CAUTION.. ACTUAL (GLOBAL) ERRORS MAY EXCEED THESE LOCAL
+C         TOLERANCES, SO CHOOSE THEM CONSERVATIVELY.
+C ITASK = 1 FOR NORMAL COMPUTATION OF OUTPUT VALUES OF Y AT T = TOUT.
+C ISTATE = INTEGER FLAG (INPUT AND OUTPUT).  SET ISTATE = 1.
+C IOPT  = 0, TO INDICATE NO OPTIONAL INPUTS FOR INTEGRATION;
+C          LOAD INTO IOPT(1).
+C ISOPT = 1, TO INDICATE SENSITIVITY ANALYSIS, = 0, TO INDICATE
+C          NO SENSITIVITY ANALYSIS; LOAD INTO IOPT(2).
+C IDF   = 1, IF SUBROUTINE DF (ABOVE) IS SUPPLIED BY THE USER,
+C          = 0, OTHERWISE; LOAD INTO IOPT(3).
+C RWORK = REAL WORK ARRAY OF LENGTH AT LEAST..
+C           22 + 16*N + N**2           FOR MF = 11 OR 12,
+C           22 + 17*N + (2*ML + MU)*N  FOR MF = 14 OR 15,
+C           22 +  9*N + N**2           FOR MF = 21 OR 22,
+C           22 + 10*N + (2*ML + MU)*N  FOR MF = 24 OR 25,
+C         IF ISOPT = 0, OR..
+C           22 + 15*(NPAR+1)*N + N**2 + N           FOR MF = 11 OR 12,
+C           24 + 15*(NPAR+1)*N + (2*ML+MU+2)*N + N  FOR MF = 14 OR 15,
+C           22 + 8*(NPAR+1)*N + N**2 + N            FOR MF = 21 OR 22,
+C           24 + 8*(NPAR+1)*N + (2*ML+MU+2)*N + N   FOR MF = 24 OR 25,
+C         IF ISOPT = 1.
+C LRW   = DECLARED LENGTH OF RWORK (IN USER-S DIMENSION STATEMENT).
+C IWORK = INTEGER WORK ARRAY OF LENGTH AT LEAST..
+C          20 + N         IF ISOPT = 0,
+C          21 + N + NPAR  IF ISOPT = 1.
+C        IF MITER = 4 OR 5, INPUT IN IWORK(1),IWORK(2) THE LOWER
+C        AND UPPER HALF-BANDWIDTHS ML,MU (EXCLUDING MAIN DIAGONAL).
+C LIW  = DECLARED LENGTH OF IWORK (IN USER-S DIMENSION STATEMENT).
+C JAC  = NAME OF SUBROUTINE FOR JACOBIAN MATRIX.
+C        IF USED, THIS NAME MUST BE DECLARED EXTERNAL IN CALLING
+C        PROGRAM.  IF NOT USED, PASS A DUMMY NAME.
+C MF   = METHOD FLAG.  STANDARD VALUES FOR ISOPT = 0 ARE..
+C         10 FOR NONSTIFF (ADAMS) METHOD, NO JACOBIAN USED.
+C         21 FOR STIFF (BDF) METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         22 FOR STIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         24 FOR STIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         25 FOR STIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C        IF ISOPT = 1, MF = 10 IS ILLEGAL AND CAN BE REPLACED BY..
+C         11 FOR NONSTIFF METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         12 FOR NONSTIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         14 FOR NONSTIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         15 FOR NONSTIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C NOTE THAT THE MAIN PROGRAM MUST DECLARE ARRAYS Y, RWORK, IWORK, AND
+C POSSIBLY ATOL AND RTOL, AS WELL AS NEQ, IOPT, AND PAR IF ISOPT = 1.
+C
+C E. THE OUTPUT FROM THE FIRST CALL (OR ANY CALL) IS..
+C     Y = ARRAY OF COMPUTED VALUES OF Y(T) VECTOR.
+C     T = CORRESPONDING VALUE OF INDEPENDENT VARIABLE (NORMALLY TOUT).
+C ISTATE = 2  IF ODESSA WAS SUCCESSFUL, NEGATIVE OTHERWISE.
+C         -1 MEANS EXCESS WORK DONE ON THIS CALL (PERHAPS WRONG MF).
+C         -2 MEANS EXCESS ACCURACY REQUESTED (TOLERANCES TOO SMALL).
+C         -3 MEANS ILLEGAL INPUT DETECTED (SEE PRINTED MESSAGE).
+C         -4 MEANS REPEATED ERROR TEST FAILURES (CHECK ALL INPUTS).
+C         -5 MEANS REPEATED CONVERGENCE FAILURES (PERHAPS BAD JACOBIAN
+C            SUPPLIED OR WRONG CHOICE OF MF OR TOLERANCES).
+C         -6 MEANS ERROR WEIGHT BECAME ZERO DURING PROBLEM. (SOLUTION
+C            COMPONENT I,J VANISHED, AND ATOL OR ATOL(I,J) = 0.0)
+C
+C F. TO CONTINUE THE INTEGRATION AFTER A SUCCESSFUL RETURN, SIMPLY
+C RESET TOUT AND CALL ODESSA AGAIN. NO OTHER PARAMETERS NEED BE RESET.
+C----------------------------------------------------------------------
+C EXAMPLE PROBLEM.
+C
+C THE FOLLOWING IS A SIMPLE EXAMPLE PROBLEM, WITH THE CODING
+C NEEDED FOR ITS SOLUTION BY ODESSA.  THE PROBLEM IS FROM CHEMICAL
+C KINETICS, AND CONSISTS OF THE FOLLOWING THREE RATE EQUATIONS..
+C    DY1/DT = -PAR(1)*Y1 + PAR(2)*Y2*Y3 ; PAR(1) = .04, PAR(2) = 1.E4
+C    DY2/DT = PAR(1)*Y1 - PAR(2)*Y2*Y3 - PAR(3)*Y2**2 ; PAR(3) = 3.E7
+C    DY3/DT = PAR(3)*Y2**2
+C ON THE INTERVAL FROM T = 0.0 TO T = 4.E10, WITH INITIAL CONDITIONS
+C Y1 = 1.0, Y2 = Y3 = 0, AND S(I,J) = 0, I = 1,3, J = 1,3.
+C THE PROBLEM IS STIFF.
+C
+C THE FOLLOWING CODING KppSolveS THIS PROBLEM WITH ODESSA, USING
+C MF = 21 AND PRINTING RESULTS AT T = .4, 4., ..., 4.E10.
+C IT USES ITOL = 4 AND ATOL MUCH SMALLER FOR Y2 THAN Y1 OR Y3,
+C BECAUSE Y2 HAS MUCH SMALLER VALUES. LESS STRINGENT TOLERANCES
+C ARE ASSIGNED FOR THE SENSITIVITIES TO ACHIEVE GREATER EFFICIENCY.
+C AT THE END OF THE RUN, STATISTICAL QUANTITIES OF INTEREST ARE
+C PRINTED (SEE OPTIONAL OUTPUTS IN THE FULL DESCRIPTION BELOW).
+C
+C      DOUBLE PRECISION ATOL, RWORK, RTOL, T, TOUT, Y, PAR
+C      EXTERNAL FEX, JEX, DFEX
+C      DIMENSION Y(3,4), PAR(3), ATOL(3,4), RTOL(3,4), RWORK(130),
+C     1  IWORK(27), NEQ(2), IOPT(3)
+C      N = 3
+C      NPAR = 3
+C      NEQ(1) = N
+C      NEQ(2) = NPAR
+C      NSV = NPAR+1
+C      DO 10 I = 1,N
+C      DO 10 J = 1,NSV
+C 10     Y(I,J) = 0.0D0
+C      Y(1,1) = 1.0D0
+C      PAR(1) = 0.04D0
+C      PAR(2) = 1.0D4
+C      PAR(3) = 3.0D7
+C      T = 0.D0
+C      TOUT = .4D0
+C      ITOL = 4
+C      ATOL(1,1) = 1.D-6
+C      ATOL(2,1) = 1.D-10
+C      ATOL(3,1) = 1.D-6
+C      DO 20 I = 1,N
+C        RTOL(I,1) = 1.D-4
+C        DO 15 J = 2,NSV
+C          RTOL(I,J) = 1.D-3
+C 15       ATOL(I,J) = 1.D2 * ATOL(I,1)
+C 20   CONTINUE
+C      ITASK = 1
+C      ISTATE = 1
+C      IOPT(1) = 0
+C      IOPT(2) = 1
+C      IOPT(3) = 1
+C      LRW = 130
+C      LIW = 27
+C      MF = 21
+C      DO 60 IOUT = 1,12
+C        CALL ODESSA(FEX,DFEX,NEQ,Y,PAR,T,TOUT,ITOL,RTOL,ATOL,
+C     1    ITASK,ISTATE, IOPT,RWORK,LRW,IWORK,LIW,JEX,MF)
+C        WRITE(6,30)T,Y(1,1),Y(2,1),Y(3,1)
+C 30     FORMAT(1X,7H AT T =,E12.4,6H   Y =,3E14.6)
+C        DO 50 J = 2,NSV
+C          JPAR = J-1
+C          WRITE(6,40)JPAR,Y(1,J),Y(2,J),Y(3,J)
+C 40       FORMAT(20X,2HS(,I1,3H) =,3E14.6)
+C 50     CONTINUE
+C        IF (ISTATE .LT. 0) GO TO 80
+C 60     TOUT = TOUT*10.D0
+C      WRITE(6,70)IWORK(11),IWORK(12),IWORK(13),IWORK(19)
+C 70   FORMAT(1X,/,12H NO. STEPS =,I4,11H  NO. F-S =,I4,11H  NO. J-S =,
+C     1  I4,12H  NO. DF-S =,I4)
+C      STOP
+C 80   WRITE(6,90)ISTATE
+C 90   FORMAT(///22H ERROR HALT.. ISTATE =,I3)
+C      STOP
+C      END
+C
+C      SUBROUTINE FEX (NEQ, T, Y, PAR, YDOT)
+C      DOUBLE PRECISION T, Y, YDOT, PAR
+C      DIMENSION Y(3), YDOT(3), PAR(3)
+C      YDOT(1) = -PAR(1)*Y(1) + PAR(2)*Y(2)*Y(3)
+C      YDOT(3) = PAR(3)*Y(2)*Y(2)
+C      YDOT(2) = -YDOT(1) - YDOT(3)
+C      RETURN
+C      END
+C
+C      SUBROUTINE JEX (NEQ, T, Y, PAR, ML, MU, PD, NRPD)
+C      DOUBLE PRECISION PD, T, Y, PAR
+C      DIMENSION Y(3), PD(NRPD,3), PAR(3)
+C      PD(1,1) = -PAR(1)
+C      PD(1,2) = PAR(2)*Y(3)
+C      PD(1,3) = PAR(2)*Y(2)
+C      PD(2,1) = PAR(1)
+C      PD(2,3) = -PD(1,3)
+C      PD(3,2) = 2.D0*PAR(3)*Y(2)
+C      PD(2,2) = -PD(1,2) - PD(3,2)
+C      RETURN
+C      END
+C
+C      SUBROUTINE DFEX (NEQ, T, Y, PAR, DFDP, JPAR)
+C      DOUBLE PRECISION T, Y, PAR, DFDP
+C      DIMENSION Y(3), PAR(3), DFDP(3)
+C      GO TO (1,2,3), JPAR
+C  1   DFDP(1) = -Y(1)
+C      DFDP(2) = Y(1)
+C      RETURN
+C  2   DFDP(1) = Y(2)*Y(3)
+C      DFDP(2) = -Y(2)*Y(3)
+C      RETURN
+C  3   DFDP(2) = -Y(2)*Y(2)
+C      DFDP(3) = Y(2)*Y(2)
+C      RETURN
+C      END
+C
+C  THE OUTPUT OF THIS PROGRAM (ON A DATA GENERAL MV-8000 IN
+C  DOUBLE PRECISION IS AS FOLLOWS:
+C
+C AT T =   .4000E+00   Y =   .985173E+00   .338641E-04   .147930E-01
+C                   S(1) =  -.355914E+00   .390261E-03   .355524E+00
+C                   S(2) =   .955150E-07  -.213065E-09  -.953019E-07
+C                   S(3) =  -.158466E-10  -.529012E-12   .163756E-10
+C AT T =   .4000E+01   Y =   .905516E+00   .224044E-04   .944615E-01
+C                   S(1) =  -.187621E+01   .179197E-03   .187603E+01
+C                   S(2) =   .296093E-05  -.583104E-09  -.296034E-05
+C                   S(3) =  -.493267E-09  -.276246E-12   .493544E-09
+C AT T =   .4000E+02   Y =   .715848E+00   .918628E-05   .284143E+00
+C                   S(1) =  -.424730E+01   .459360E-04   .424726E+01
+C                   S(2) =   .137294E-04  -.235815E-09  -.137291E-04
+C                   S(3) =  -.228818E-08  -.113803E-12   .228829E-08
+C AT T =   .4000E+03   Y =   .450526E+00   .322299E-05   .549471E+00
+C                   S(1) =  -.595837E+01   .354310E-05   .595836E+01
+C                   S(2) =   .227380E-04  -.226041E-10  -.227380E-04
+C                   S(3) =  -.378971E-08  -.499501E-13   .378976E-08
+C AT T =   .4000E+04   Y =   .183185E+00   .894131E-06   .816814E+00
+C                   S(1) =  -.475006E+01  -.599504E-05   .475007E+01
+C                   S(2) =   .188089E-04   .231330E-10  -.188089E-04
+C                   S(3) =  -.313478E-08  -.187575E-13   .313480E-08
+C AT T =   .4000E+05   Y =   .389733E-01   .162133E-06   .961027E+00
+C                   S(1) =  -.157477E+01  -.276199E-05   .157477E+01
+C                   S(2) =   .628668E-05   .110026E-10  -.628670E-05
+C                   S(3) =  -.104776E-08  -.453588E-14   .104776E-08
+C AT T =   .4000E+06   Y =   .493609E-02   .198411E-07   .995064E+00
+C                   S(1) =  -.236244E+00  -.458262E-06   .236244E+00
+C                   S(2) =   .944669E-06   .183193E-11  -.944671E-06
+C                   S(3) =  -.157441E-09  -.635990E-15   .157442E-09
+C AT T =   .4000E+07   Y =   .516087E-03   .206540E-08   .999484E+00
+C                   S(1) =  -.256277E-01  -.509808E-07   .256278E-01
+C                   S(2) =   .102506E-06   .203905E-12  -.102506E-06
+C                   S(3) =  -.170825E-10  -.684002E-16   .170826E-10
+C AT T =   .4000E+08   Y =   .519314E-04   .207736E-09   .999948E+00
+C                   S(1) =  -.259316E-02  -.518029E-08   .259316E-02
+C                   S(2) =   .103726E-07   .207209E-13  -.103726E-07
+C                   S(3) =  -.172845E-11  -.691450E-17   .172845E-11
+C AT T =   .4000E+09   Y =   .544710E-05   .217885E-10   .999995E+00
+C                   S(1) =  -.271637E-03  -.541849E-09   .271638E-03
+C                   S(2) =   .108655E-08   .216739E-14  -.108655E-08
+C                   S(3) =  -.180902E-12  -.723615E-18   .180902E-12
+C AT T =   .4000E+10   Y =   .446748E-06   .178699E-11   .100000E+01
+C                   S(1) =  -.322322E-04  -.842541E-10   .322323E-04
+C                   S(2) =   .128929E-09   .337016E-15  -.128929E-09
+C                   S(3) =  -.209715E-13  -.838859E-19   .209715E-13
+C AT T =   .4000E+11   Y =  -.363960E-07  -.145584E-12   .100000E+01
+C                   S(1) =  -.164109E-06  -.429604E-11   .164113E-06
+C                   S(2) =   .656436E-12   .171842E-16  -.656451E-12
+C                   S(3) =  -.689361E-15  -.275745E-20   .689363E-15
+C
+C NO. STEPS = 340  NO. F-S = 412  NO. J-S = 343  NO. DF-S =1023
+C----------------------------------------------------------------------
+C FULL DESCRIPTION OF USER INTERFACE TO ODESSA.
+C
+C THE USER INTERFACE TO ODESSA CONSISTS OF THE FOLLOWING PARTS.
+C
+C I.  THE CALL SEQUENCE TO SUBROUTINE ODESSA, WHICH IS A DRIVER
+C     ROUTINE FOR THE KppSolveR.  THIS INCLUDES DESCRIPTIONS OF BOTH
+C     THE CALL SEQUENCE ARGUMENTS AND OF USER-SUPPLIED ROUTINES.
+C     FOLLOWING THESE DESCRIPTIONS IS A DESCRIPTION OF
+C     OPTIONAL INPUTS AVAILABLE THROUGH THE CALL SEQUENCE, AND THEN
+C     A DESCRIPTION OF OPTIONAL OUTPUTS (IN THE WORK ARRAYS).
+C
+C II.  DESCRIPTIONS OF OTHER ROUTINES IN THE ODESSA PACKAGE THAT MAY
+C     BE (OPTIONALLY) CALLED BY THE USER.  THESE PROVIDE THE ABILITY
+C     TO ALTER ERROR MESSAGE HANDLING, SAVE AND RESTORE THE INTERNAL
+C     COMMON, AND OBTAIN SPECIFIED DERIVATIVES OF THE SOLUTION Y(T).
+C
+C III. DESCRIPTIONS OF COMMON BLOCKS TO BE DECLARED IN OVERLAY
+C     OR SIMILAR ENVIRONMENTS, OR TO BE SAVED WHEN DOING AN INTERRUPT
+C     OF THE PROBLEM AND CONTINUED SOLUTION LATER.
+C
+C IV.  DESCRIPTION OF TWO SUBROUTINES IN THE ODESSA PACKAGE, EITHER OF
+C     WHICH THE USER MAY REPLACE WITH HIS OWN VERSION, IF DESIRED.
+C     THESE RELATE TO THE MEASUREMENT OF ERRORS.
+C
+C V.   GENERAL REMARKS WHICH HIGHLIGHT DIFFERENCES BETWEEN THE LSODE
+C     PACKAGE AND THE ODESSA PACKAGE.
+C----------------------------------------------------------------------
+C PART I.  CALL SEQUENCE.
+C
+C THE CALL SEQUENCE PARAMETERS USED FOR INPUT ONLY ARE..
+C    F, DF, NEQ, PAR, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, LRW, LIW,
+C    JAC, MF,
+C AND THOSE USED FOR BOTH INPUT AND OUTPUT ARE
+C    Y, T, ISTATE.
+C THE WORK ARRAYS RWORK AND IWORK ARE ALSO USED FOR CONDITIONAL AND
+C OPTIONAL INPUTS AND OPTIONAL OUTPUTS.  (THE TERM OUTPUT HERE REFERS
+C TO THE RETURN FROM SUBROUTINE ODESSA TO THE USER-S CALLING PROGRAM.)
+C
+C THE LEGALITY OF INPUT PARAMETERS WILL BE THOROUGHLY CHECKED ON THE
+C INITIAL CALL FOR THE PROBLEM, BUT NOT CHECKED THEREAFTER UNLESS A
+C CHANGE IN INPUT PARAMETERS IS FLAGGED BY ISTATE = 3 ON INPUT.
+C
+C THE DESCRIPTIONS OF THE CALL ARGUMENTS ARE AS FOLLOWS.
+C
+C F     = THE NAME OF THE USER-SUPPLIED SUBROUTINE DEFINING THE
+C         ODE MODEL. THIS SYSTEM MUST BE PUT IN THE FIRST-ORDER
+C         FORM DY/DT = F(Y,T;P), WHERE F IS A VECTOR-VALUED FUNCTION
+C         OF THE SCALAR T AND VECTORS Y, AND PAR.  SUBROUTINE F IS TO
+C         COMPUTE THE FUNCTION F.  IT IS TO HAVE THE FORM..
+C              SUBROUTINE F (NEQ, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(1), PAR(1), YDOT(1)
+C         WHERE NEQ, T, Y, AND PAR ARE INPUT, AND YDOT = F(Y,T;P)
+C         IS OUTPUT.  Y AND YDOT ARE ARRAYS OF LENGTH N (= NEQ(1)).
+C         (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C         F SHOULD NOT ALTER ARRAY Y, OR PAR(1),...,PAR(NPAR).
+C         F MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C
+C         SUBROUTINE F MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN F) AND PAR HAS LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR BELOW.
+C
+C DF    = THE NAME OF THE USER-SUPPLIED ROUTINE (IDF = 1) TO COMPUTE
+C         THE INHOMOGENEITY MATRIX, DF/DP, AS A FUNCTION OF THE SCALAR
+C         T, AND THE VECTORS Y, AND PAR. IT IS TO HAVE THE FORM
+C                SUBROUTINE DF (NEQ, T, Y, PAR, DFDP, JPAR)
+C                DOUBLE PRECISION T, Y, PAR, DFDP
+C                DIMENSION Y(1), PAR(1), DFDP(1)
+C                GO TO (1,2,...,NPAR) JPAR
+C            1   DFDP(1) = DF(1)/DP(1)
+C                .
+C                DFDP(I) = DF(I)/DP(1)
+C                .
+C                DFDP(N) = DF(N)/DP(1)
+C                RETURN
+C            2   DFDP(1) = DF(1)/DP(2)
+C                .
+C                DFDP(I) = DF(I)/DP(2)
+C                .
+C                DFDP(N) = DF(N)/DP(2)
+C                .
+C                RETURN
+C            .   .
+C            .   .
+C          NPAR  DFDP(1) = DF(1)/DP(NPAR)
+C                .
+C                DFDP(I) = DF(I)/DP(NPAR)
+C                .
+C                DFDP(N) = DF(N)/DP(NPAR)
+C                RETURN
+C                END
+C         WHERE NEQ, T, Y, PAR, AND JPAR ARE INPUT AND THE VECTOR
+C         DFDP(*,JPAR) IS TO BE LOADED WITH THE PARTIAL DERIVATIVES
+C         DF(Y,T;PAR)/DP(JPAR) ON OUTPUT. ONLY NONZERO ELEMENTS NEED
+C         BE LOADED.  T, Y, AND PAR HAVE THE SAME MEANING AS IN
+C         SUBROUTINE F. (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE).
+C
+C         DFDP(*,JPAR) IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY
+C         THE NONZERO ELEMENTS NEED BE LOADED BY DF. SUBROUTINE DF
+C         MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM IF USED.
+C         IF IDF = 0 (OR ISOPT = 0), A DUMMY ARGUMENT CAN BE USED.
+C
+C         SUBROUTINE DF MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN DF) AND PAR HAS A LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR (BELOW).
+C
+C NEQ   = THE SIZE OF THE ODE SYSTEM (NUMBER OF FIRST ORDER ORDINARY
+C         DIFFERENTIAL EQUATIONS (N) IN THE MODEL).  USED ONLY FOR
+C         INPUT.  NEQ MAY NOT BE CHANGED DURING THE PROBLEM.
+C
+C         FOR ISOPT = 0, NEQ IS NORMALLY A SCALAR.  HOWEVER, NEQ MAY
+C         BE AN ARRAY, WITH NEQ(1) SET TO THE SYSTEM SIZE (N), IN WHICH
+C         CASE THE ODESSA PACKAGE ACCESSES ONLY NEQ(1). HOWEVER,
+C         THIS PARAMETER IS PASSED AS THE NEQ ARGUMENT IN ALL CALLS
+C         TO F, DF, AND JAC.  HENCE, IF IT IS AN ARRAY, LOCATIONS
+C         NEQ(2),... MAY BE USED TO STORE OTHER INTEGER DATA AND PASS
+C         IT TO F, DF, AND/OR JAC.  FOR ISOPT = 1, NPAR MUST BE LOADED
+C         INTO NEQ(2), AND IS NOT ALLOWED TO CHANGE DURING THE PROBLEM.
+C         IN THESE CASES, SUBROUTINES F, DF, AND/OR JAC MUST INCLUDE
+C         NEQ IN A DIMENSION STATEMENT.
+C
+C Y     = A REAL ARRAY FOR THE VECTOR OF DEPENDENT VARIABLES, OF
+C         DIMENSION (N) BY (NPAR+1).  USED FOR BOTH INPUT AND
+C         OUTPUT ON THE FIRST CALL (ISTATE = 1), AND ONLY FOR
+C         OUTPUT ON OTHER CALLS. ON THE FIRST CALL, Y MUST CONTAIN
+C         THE VECTORS OF INITIAL VALUES.  ON OUTPUT, Y CONTAINS THE
+C         COMPUTED SOLUTION VECTORS, EVALUATED AT T.
+C
+C PAR   = A REAL ARRAY FOR THE VECTOR OF CONSTANT MODEL PARAMETERS
+C         OF INTEREST IN THE SENSITIVITY ANALYSIS, OF LENGTH NPAR
+C         OR MORE. PAR IS PASSED AS AN ARGUMENT IN ALL CALLS TO F,
+C         DF, AND JAC. HENCE LOCATIONS PAR(NPAR+1),... MAY BE USED
+C         TO STORE OTHER REAL DATA AND PASS IT TO F, DF, AND/OR JAC.
+C         LOCATIONS PAR(1),...,PAR(NPAR) ARE USED AS INPUT ONLY,
+C         AND MUST NOT BE CHANGED DURING THE PROBLEM.
+C
+C T     = THE INDEPENDENT VARIABLE.  ON INPUT, T IS USED ONLY ON THE
+C         FIRST CALL, AS THE INITIAL POINT OF THE INTEGRATION.
+C         ON OUTPUT, AFTER EACH CALL, T IS THE VALUE AT WHICH A
+C         COMPUTED SOLUTION Y IS EVALUATED (USUALLY THE SAME AS TOUT).
+C         ON AN ERROR RETURN, T IS THE FARTHEST POINT REACHED.
+C
+C TOUT  = THE NEXT VALUE OF T AT WHICH A COMPUTED SOLUTION IS DESIRED.
+C         USED ONLY FOR INPUT.
+C
+C         WHEN STARTING THE PROBLEM (ISTATE = 1), TOUT MAY BE EQUAL
+C         TO T FOR ONE CALL, THEN SHOULD .NE. T FOR THE NEXT CALL.
+C         FOR THE INITIAL T, AN INPUT VALUE OF TOUT .NE. T IS USED
+C         IN ORDER TO DETERMINE THE DIRECTION OF THE INTEGRATION
+C         (I.E. THE ALGEBRAIC SIGN OF THE STEP SIZES) AND THE ROUGH
+C         SCALE OF THE PROBLEM.  INTEGRATION IN EITHER DIRECTION
+C         (FORWARD OR BACKWARD IN T) IS PERMITTED.
+C
+C         IF ITASK = 2 OR 5 (ONE-STEP MODES), TOUT IS IGNORED AFTER
+C         THE FIRST CALL (I.E. THE FIRST CALL WITH TOUT .NE. T).
+C         OTHERWISE, TOUT IS REQUIRED ON EVERY CALL.
+C
+C         IF ITASK = 1, 3, OR 4, THE VALUES OF TOUT NEED NOT BE
+C         MONOTONE, BUT A VALUE OF TOUT WHICH BACKS UP IS LIMITED
+C         TO THE CURRENT INTERNAL T INTERVAL, WHOSE ENDPOINTS ARE
+C         TCUR - HU AND TCUR (SEE OPTIONAL OUTPUTS, BELOW, FOR
+C         TCUR AND HU).
+C
+C ITOL  = AN INDICATOR FOR THE TYPE OF ERROR CONTROL.  SEE
+C         DESCRIPTION BELOW UNDER ATOL.  USED ONLY FOR INPUT.
+C
+C RTOL  = A RELATIVE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  SEE DESCRIPTION BELOW
+C         UNDER ATOL. INPUT ONLY.
+C
+C ATOL  = AN ABSOLUTE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  INPUT ONLY.
+C
+C            THE INPUT PARAMETERS ITOL, RTOL, AND ATOL DETERMINE
+C         THE ERROR CONTROL PERFORMED BY THE KppSolveR.  THE KppSolveR WILL
+C         CONTROL THE VECTOR E = (E(I,J)) OF ESTIMATED LOCAL ERRORS
+C         IN Y, ACCORDING TO AN INEQUALITY OF THE FORM
+C                   RMS-NORM OF ( E(I,J)/EWT(I,J) )   .LE.   1,
+C         WHERE     EWT(I,J) = RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J),
+C         AND THE RMS-NORM (ROOT-MEAN-SQUARE NORM) HERE IS
+C         RMS-NORM(V) = SQRT ( (1/N) * SUM (V(I,J)**2) ); I =1,...,N.
+C         HERE EWT = (EWT(I,J)) IS A VECTOR OF WEIGHTS WHICH MUST
+C         ALWAYS BE POSITIVE, AND THE VALUES OF RTOL AND ATOL SHOULD
+C         ALL BE NON-NEGATIVE.  THE FOLLOWING TABLE GIVES THE TYPES
+C         (SCALAR/ARRAY) OF RTOL AND ATOL, AND THE CORRESPONDING FORM
+C         OF EWT(I,J).
+C
+C          ITOL   RTOL      ATOL           EWT(I,J)
+C           1    SCALAR    SCALAR   RTOL*ABS(Y(I,J)) + ATOL
+C           2    SCALAR    ARRAY    RTOL*ABS(Y(I,J)) + ATOL(I,J)
+C           3    ARRAY     SCALAR   RTOL(I,J)*ABS(Y(I,J)) + ATOL
+C           4    ARRAY     ARRAY    RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J)
+C
+C         WHEN EITHER OF THESE PARAMETERS IS A SCALAR, IT NEED NOT
+C         BE DIMENSIONED IN THE USER-S CALLING PROGRAM.
+C
+C         THE TOTAL NUMBER OF ERROR TEST FAILURES DUE TO THE SENSITIVITY
+C         ANALYSIS, AND WHICH REQUIRE AN INTEGRATION STEP TO BE
+C         REPEATED, ARE ACCUMULATED IN THE LAST NPAR+1 LOCATIONS OF THE
+C         INTEGER WORK ARRAY IWORK (SEE OPTIONAL OUTPUTS BELOW).
+C         THIS INFORMATION MAY BE OF VALUE IN DETERMINING APPROPRIATE
+C         ERROR TOLERANCES TO BE APPLIED TO THE SENSITIVITY FUNCTIONS.
+C
+C         IF NONE OF THE ABOVE CHOICES (WITH ITOL, RTOL, AND ATOL
+C         FIXED THROUGHOUT THE PROBLEM) IS SUITABLE, MORE GENERAL
+C         ERROR CONTROLS CAN BE OBTAINED BY SUBSTITUTING
+C         USER-SUPPLIED ROUTINES FOR THE SETTING OF EWT AND/OR FOR
+C         THE NORM CALCULATION.  SEE PART IV BELOW.
+C
+C         IF GLOBAL ERRORS ARE TO BE ESTIMATED BY MAKING A REPEATED
+C         RUN ON THE SAME PROBLEM WITH SMALLER TOLERANCES, THEN ALL
+C         COMPONENTS OF RTOL AND ATOL (I.E. OF EWT) SHOULD BE SCALED
+C         DOWN UNIFORMLY.
+C
+C ITASK  = AN INDEX SPECIFYING THE TASK TO BE PERFORMED.
+C         INPUT ONLY.  ITASK HAS THE FOLLOWING VALUES AND MEANINGS.
+C         1  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT (BY OVERSHOOTING AND INTERPOLATING).
+C         2  MEANS TAKE ONE STEP ONLY AND RETURN.
+C         3  MEANS STOP AT THE FIRST INTERNAL MESH POINT AT OR
+C            BEYOND T = TOUT AND RETURN.
+C         4  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT BUT WITHOUT OVERSHOOTING T = TCRIT.
+C            TCRIT MUST BE INPUT AS RWORK(1).  TCRIT MAY BE EQUAL TO
+C            OR BEYOND TOUT, BUT NOT BEHIND IT IN THE DIRECTION OF
+C            INTEGRATION.  THIS OPTION IS USEFUL IF THE PROBLEM
+C            HAS A SINGULARITY AT OR BEYOND T = TCRIT.
+C         5  MEANS TAKE ONE STEP, WITHOUT PASSING TCRIT, AND RETURN.
+C            TCRIT MUST BE INPUT AS RWORK(1).
+C
+C         NOTE..  IF ITASK = 4 OR 5 AND THE KppSolveR REACHES TCRIT
+C         (WITHIN ROUNDOFF), IT WILL RETURN T = TCRIT (EXACTLY) TO
+C         INDICATE THIS (UNLESS ITASK = 4 AND TOUT COMES BEFORE TCRIT,
+C         IN WHICH CASE ANSWERS AT T = TOUT ARE RETURNED FIRST).
+C
+C ISTATE = AN INDEX USED FOR INPUT AND OUTPUT TO SPECIFY THE
+C         THE STATE OF THE CALCULATION.
+C
+C         ON INPUT, THE VALUES OF ISTATE ARE AS FOLLOWS.
+C         1  MEANS THIS IS THE FIRST CALL FOR THE PROBLEM
+C            (INITIALIZATIONS WILL BE DONE).  SEE NOTE BELOW.
+C         2  MEANS THIS IS NOT THE FIRST CALL, AND THE CALCULATION
+C            IS TO CONTINUE NORMALLY, WITH NO CHANGE IN ANY INPUT
+C            PARAMETERS EXCEPT POSSIBLY TOUT AND ITASK.
+C            (IF ITOL, RTOL, AND/OR ATOL ARE CHANGED BETWEEN CALLS
+C            WITH ISTATE = 2, THE NEW VALUES WILL BE USED BUT NOT
+C            TESTED FOR LEGALITY.)
+C         3  MEANS THIS IS NOT THE FIRST CALL, AND THE
+C            CALCULATION IS TO CONTINUE NORMALLY, BUT WITH
+C            A CHANGE IN INPUT PARAMETERS OTHER THAN
+C            TOUT AND ITASK.  CHANGES ARE ALLOWED IN
+C            ITOL, RTOL, ATOL, IOPT, LRW, LIW, MF, ML, MU,
+C            AND ANY OF THE OPTIONAL INPUTS EXCEPT H0.
+C            (SEE IWORK DESCRIPTION FOR ML AND MU.)
+C         NOTE..  A PRELIMINARY CALL WITH TOUT = T IS NOT COUNTED
+C         AS A FIRST CALL HERE, AS NO INITIALIZATION OR CHECKING OF
+C         INPUT IS DONE.  (SUCH A CALL IS SOMETIMES USEFUL FOR THE
+C         PURPOSE OF OUTPUTTING THE INITIAL CONDITIONS.)
+C         THUS THE FIRST CALL FOR WHICH TOUT .NE. T REQUIRES
+C         ISTATE = 1 ON INPUT.
+C
+C         ON OUTPUT, ISTATE HAS THE FOLLOWING VALUES AND MEANINGS.
+C          1  MEANS NOTHING WAS DONE, AS TOUT WAS EQUAL TO T WITH
+C             ISTATE = 1 ON INPUT.  (HOWEVER, AN INTERNAL COUNTER WAS
+C             SET TO DETECT AND PREVENT REPEATED CALLS OF THIS TYPE.)
+C          2  MEANS THE INTEGRATION WAS PERFORMED SUCCESSFULLY.
+C         -1  MEANS AN EXCESSIVE AMOUNT OF WORK (MORE THAN MXSTEP
+C             STEPS) WAS DONE ON THIS CALL, BEFORE COMPLETING THE
+C             REQUESTED TASK, BUT THE INTEGRATION WAS OTHERWISE
+C             SUCCESSFUL AS FAR AS T.  (MXSTEP IS AN OPTIONAL INPUT
+C             AND IS NORMALLY 500.)  TO CONTINUE, THE USER MAY
+C             SIMPLY RESET ISTATE TO A VALUE .GT. 1 AND CALL AGAIN
+C             (THE EXCESS WORK STEP COUNTER WILL BE RESET TO 0).
+C             IN ADDITION, THE USER MAY INCREASE MXSTEP TO AVOID
+C             THIS ERROR RETURN (SEE BELOW ON OPTIONAL INPUTS).
+C         -2  MEANS TOO MUCH ACCURACY WAS REQUESTED FOR THE PRECISION
+C             OF THE MACHINE BEING USED.  THIS WAS DETECTED BEFORE
+C             COMPLETING THE REQUESTED TASK, BUT THE INTEGRATION
+C             WAS SUCCESSFUL AS FAR AS T.  TO CONTINUE, THE TOLERANCE
+C             PARAMETERS MUST BE RESET, AND ISTATE MUST BE SET
+C             TO 3.  THE OPTIONAL OUTPUT TOLSF MAY BE USED FOR THIS
+C             PURPOSE.  (NOTE.. IF THIS CONDITION IS DETECTED BEFORE
+C             TAKING ANY STEPS, THEN AN ILLEGAL INPUT RETURN
+C             (ISTATE = -3) OCCURS INSTEAD.)
+C         -3  MEANS ILLEGAL INPUT WAS DETECTED, BEFORE TAKING ANY
+C             INTEGRATION STEPS.  SEE WRITTEN MESSAGE FOR DETAILS.
+C             NOTE..  IF THE KppSolveR DETECTS AN INFINITE LOOP OF CALLS
+C             TO THE KppSolveR WITH ILLEGAL INPUT, IT WILL CAUSE
+C             THE RUN TO STOP.
+C         -4  MEANS THERE WERE REPEATED ERROR TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THE PROBLEM MAY HAVE A SINGULARITY, OR THE INPUT
+C             MAY BE INAPPROPRIATE.
+C         -5  MEANS THERE WERE REPEATED CONVERGENCE TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THIS MAY BE CAUSED BY AN INACCURATE JACOBIAN MATRIX,
+C             IF ONE IS BEING USED.
+C         -6  MEANS EWT(I,J) BECAME ZERO FOR SOME I,J DURING THE
+C             INTEGRATION.  PURE RELATIVE ERROR CONTROL (ATOL(I,J)=0.0)
+C             WAS REQUESTED ON A VARIABLE WHICH HAS NOW VANISHED.
+C             THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C
+C         NOTE..  SINCE THE NORMAL OUTPUT VALUE OF ISTATE IS 2,
+C         IT DOES NOT NEED TO BE RESET FOR NORMAL CONTINUATION.
+C         ALSO, SINCE A NEGATIVE INPUT VALUE OF ISTATE WILL BE
+C         REGARDED AS ILLEGAL, A NEGATIVE OUTPUT VALUE REQUIRES THE
+C         USER TO CHANGE IT, AND POSSIBLY OTHER INPUTS, BEFORE
+C         CALLING THE KppSolveR AGAIN.
+C
+C IOPT  = AN INTEGER ARRAY FLAG TO SPECIFY WHETHER OR NOT ANY OPTIONAL
+C         INPUTS ARE BEING USED ON THIS CALL.  INPUT ONLY.
+C         THE OPTIONAL INPUTS ARE LISTED SEPARATELY BELOW.
+C         IOPT(1) = 0 MEANS NO OPTIONAL INPUTS FOR THE KppSolveR WILL BE
+C                   USED. DEFAULT VALUES WILL BE USED IN ALL CASES.
+C                 = 1 MEANS ONE OR MORE OPTIONAL INPUTS FOR THE
+C                   KppSolveR ARE BEING USED.
+C                   NOTE : IOPT(1) IS INDEPENDENT OF ISOPT AND IDF.
+C         IOPT(2) = 0 MEANS NO SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                 = 1 MEANS A SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                   NOTE : IOPT(2) IS RENAMED TO ISOPT IN ODESSA.
+C                 = 0 MEANS DF/DP WILL BE CALCULATED BY FINITE
+C                   DIFFERENCE WITHIN ODESSA.
+C         IOPT(3) = 1 MEANS DF/DP WILL BE CALCULATED BY A USER-SUPPLIED
+C                   ROUTINE.
+C                   NOTE : IOPT(3) IS RENAMED TO IDF IN ODESSA.
+C                          IF IDF = 1, THE USER MUST SUPPLY A
+C                          SUBROUTINE DF (THE NAME IS ARBITRARY) AS
+C                          DESCRIBED BELOW UNDER DF. FOR IDF = 0,
+C                          A DUMMY ARGUMENT CAN BE USED.
+C
+C RWORK  = A REAL WORKING ARRAY (DOUBLE PRECISION).
+C         FOR ISOPT = 0, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 3*NEQ + LWM
+C         FOR ISOPT = 1, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 2*NYH + LWM + N
+C         WHERE..
+C         NYH    = THE TOTAL NUMBER OF DEPENDENT VARIABLES;
+C                  (= N IF ISOPT = 0, AND N*(NPAR+1) IF ISOPT = 1).
+C         MAXORD = 12 (IF METH = 1) OR 5 (IF METH = 2) (UNLESS A
+C                  SMALLER VALUE IS GIVEN AS AN OPTIONAL INPUT),
+C         LWM    = 0                  IF MITER = 0,
+C         LWM    = N**2 + 2           IF MITER IS 1 OR 2,
+C         LWM    = N + 2              IF MITER = 3, AND
+C         LWM    = (2*ML+MU+1)*N + 2  IF MITER IS 4 OR 5.
+C         (SEE THE MF DESCRIPTION FOR METH AND MITER.)
+C
+C         THE FIRST 20 WORDS OF RWORK ARE RESERVED FOR CONDITIONAL
+C         AND OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING WORD IN RWORK IS A CONDITIONAL INPUT..
+C           RWORK(1) = TCRIT = CRITICAL VALUE OF T WHICH THE KppSolveR
+C                      IS NOT TO OVERSHOOT.  REQUIRED IF ITASK IS
+C                      4 OR 5, AND IGNORED OTHERWISE.  (SEE ITASK.)
+C
+C LRW   = THE LENGTH OF THE ARRAY RWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C IWORK  = AN INTEGER WORK ARRAY. THE LENGTH MUST BE AT LEAST..
+C            20      IF MITER = 0 OR 3 (MF = 10, 13, 20, 23), OR
+C            20 + N  OTHERWISE (MF = 11, 12, 14, 15, 21, 22, 24, 25).
+C          FOR ISOPT = 0, OR..
+C            21 + N + NPAR
+C          FOR ISOPT = 1.
+C         THE FIRST FEW WORDS OF IWORK ARE USED FOR CONDITIONAL AND
+C         OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING 2 WORDS IN IWORK ARE CONDITIONAL INPUTS..
+C           IWORK(1) = ML     THESE ARE THE LOWER AND UPPER
+C           IWORK(2) = MU     HALF-BANDWIDTHS, RESPECTIVELY, OF THE
+C                      BANDED JACOBIAN, EXCLUDING THE MAIN DIAGONAL.
+C                      THE BAND IS DEFINED BY THE MATRIX LOCATIONS
+C                      (I,J) WITH I-ML .LE. J .LE. I+MU.  ML AND MU
+C                      MUST SATISFY  0 .LE.  ML,MU  .LE. NEQ-1.
+C                      THESE ARE REQUIRED IF MITER IS 4 OR 5, AND
+C                      IGNORED OTHERWISE.  ML AND MU MAY IN FACT BE
+C                      THE BAND PARAMETERS FOR A MATRIX TO WHICH
+C                      DF/DY IS ONLY APPROXIMATELY EQUAL.
+*
+C
+C LIW   = THE LENGTH OF THE ARRAY IWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C NOTE..  THE WORK ARRAYS MUST NOT BE ALTERED BETWEEN CALLS TO ODESSA
+C FOR THE SAME PROBLEM, EXCEPT POSSIBLY FOR THE CONDITIONAL AND
+C OPTIONAL INPUTS, AND EXCEPT FOR THE LAST 2*NYH + N WORDS OF RWORK.
+C THE LATTER SPACE IS USED FOR INTERNAL SCRATCH SPACE, AND SO IS
+C AVAILABLE FOR USE BY THE USER OUTSIDE ODESSA BETWEEN CALLS, IF
+C DESIRED (BUT NOT FOR USE BY F, DF, OR JAC).
+C
+C JAC   = THE NAME OF THE USER-SUPPLIED ROUTINE (MITER = 1 OR 4) TO
+C         COMPUTE THE JACOBIAN MATRIX, DF/DY, AS A FUNCTION OF THE
+C         SCALAR T AND THE VECTORS Y, AND PAR.  IT IS TO HAVE THE FORM
+C              SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C              DOUBLE PRECISION T, Y, PAR, PD
+C              DIMENSION Y(1), PAR(1), PD(NROWPD,1)
+C         WHERE NEQ, T, Y, PAR, ML, MU, AND NROWPD ARE INPUT AND THE
+C         ARRAY PD IS TO BE LOADED WITH PARTIAL DERIVATIVES (ELEMENTS
+C         OF THE JACOBIAN MATRIX) ON OUTPUT.  PD MUST BE GIVEN A FIRST
+C         DIMENSION OF NROWPD.  T, Y, AND PAR HAVE THE SAME MEANING AS
+C         IN SUBROUTINE F.  (IN THE DIMENSION STATEMENT ABOVE, 1 IS A
+C         DUMMY DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C              IN THE FULL MATRIX CASE (MITER = 1), ML AND MU ARE
+C         IGNORED, AND THE JACOBIAN IS TO BE LOADED INTO PD IN
+C         COLUMNWISE MANNER, WITH DF(I)/DY(J) LOADED INTO PD(I,J).
+C              IN THE BAND MATRIX CASE (MITER = 4), THE ELEMENTS
+C         WITHIN THE BAND ARE TO BE LOADED INTO PD IN COLUMNWISE
+C         MANNER, WITH DIAGONAL LINES OF DF/DY LOADED INTO THE ROWS
+C         OF PD.  THUS DF(I)/DY(J) IS TO BE LOADED INTO PD(I-J+MU+1,J).
+C         ML AND MU ARE THE HALF-BANDWIDTH PARAMETERS (SEE IWORK).
+C         THE LOCATIONS IN PD IN THE TWO TRIANGULAR AREAS WHICH
+C         CORRESPOND TO NONEXISTENT MATRIX ELEMENTS CAN BE IGNORED
+C         OR LOADED ARBITRARILY, AS THEY ARE OVERWRITTEN BY ODESSA.
+C              PD IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY THE
+C         NONZERO ELEMENTS NEED BE LOADED BY JAC. EACH CALL TO JAC IS
+C         PRECEDED BY A CALL TO F WITH THE SAME ARGUMENTS NEQ, T, Y,
+C         AND PAR. THUS TO GAIN SOME EFFICIENCY, INTERMEDIATE
+C         QUANTITIES SHARED BY BOTH CALCULATIONS MAY BE SAVED IN A
+C         USER COMMON BLOCK BY F AND NOT RECOMPUTED BY JAC, IF
+C         DESIRED.  ALSO, JAC MAY ALTER THE Y ARRAY, IF DESIRED.
+C         JAC MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C              SUBROUTINE JAC MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),.... SEE THE DESCRIPTIONS OF
+C         NEQ (ABOVE) AND PAR (BELOW).
+C
+C MF    = THE METHOD FLAG.  USED ONLY FOR INPUT.  THE LEGAL VALUES OF
+C         MF ARE 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, AND 25.
+C         MF HAS DECIMAL DIGITS METH AND MITER.. MF = 10*METH + MITER.
+C         METH INDICATES THE BASIC LINEAR MULTISTEP METHOD..
+C           METH = 1 MEANS THE IMPLICIT ADAMS METHOD.
+*
+C           METH = 2 MEANS THE METHOD BASED ON BACKWARD
+C                    DIFFERENTIATION FORMULAS (BDF-S).
+C         MITER INDICATES THE CORRECTOR ITERATION METHOD..
+C           MITER = 0 MEANS FUNCTIONAL ITERATION (NO JACOBIAN MATRIX
+C                     IS INVOLVED).
+C           MITER = 1 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     FULL (NEQ BY NEQ) JACOBIAN.
+C           MITER = 2 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED (DIFFERENCE QUOTIENT) FULL JACOBIAN
+C                     (USING NEQ EXTRA CALLS TO F PER DF/DY VALUE).
+C           MITER = 3 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED DIAGONAL JACOBIAN APPROXIMATION.
+C                     (USING 1 EXTRA CALL TO F PER DF/DY EVALUATION).
+C           MITER = 4 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     BANDED JACOBIAN.
+C           MITER = 5 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED BANDED JACOBIAN (USING ML+MU+1 EXTRA
+C                     CALLS TO F PER DF/DY EVALUATION).
+C         IF MITER = 1 OR 4, THE USER MUST SUPPLY A SUBROUTINE JAC
+C         (THE NAME IS ARBITRARY) AS DESCRIBED ABOVE UNDER JAC.
+C         FOR OTHER VALUES OF MITER, A DUMMY ARGUMENT CAN BE USED.
+C
+C         IF A SENSITIVITY ANLYSIS IS DESIRED (ISOPT = 1), MITER = 0
+C         AND 3 ARE DISALLOWED. IN THESE CASES, THE USER IS RECOMMENDED
+C         TO SUPPLY AN ANALYTICAL JACOBIAN (MITER = 1 OR 4) AND AN
+C         ANALYTICAL INHOMOGENEITY MATRIX (IDF = 1).
+C----------------------------------------------------------------------
+C OPTIONAL INPUTS.
+C
+C THE FOLLOWING IS A LIST OF THE OPTIONAL INPUTS PROVIDED FOR IN THE
+C CALL SEQUENCE.  (SEE ALSO PART II.)  FOR EACH SUCH INPUT VARIABLE,
+C THIS TABLE LISTS ITS NAME AS USED IN THIS DOCUMENTATION, ITS
+C LOCATION IN THE CALL SEQUENCE, ITS MEANING, AND THE DEFAULT VALUE.
+C THE USE OF ANY OF THESE INPUTS REQUIRES IOPT(1) = 1, AND IN THAT
+C CASE ALL OF THESE INPUTS ARE EXAMINED.  A VALUE OF ZERO FOR ANY
+C OF THESE OPTIONAL INPUTS WILL CAUSE THE DEFAULT VALUE TO BE USED.
+C THUS TO USE A SUBSET OF THE OPTIONAL INPUTS, SIMPLY PRELOAD
+C LOCATIONS 5 TO 10 IN RWORK AND IWORK TO 0.0 AND 0 RESPECTIVELY, AND
+C THEN SET THOSE OF INTEREST TO NONZERO VALUES.
+C
+C NAME   LOCATION      MEANING AND DEFAULT VALUE
+C
+C H0     RWORK(5)  THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+C                  THE DEFAULT VALUE IS DETERMINED BY THE KppSolveR.
+C
+C HMAX   RWORK(6)  THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS INFINITE.
+C
+C HMIN   RWORK(7)  THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS 0.  (THIS LOWER BOUND IS NOT
+C                  ENFORCED ON THE FINAL STEP BEFORE REACHING TCRIT
+C                  WHEN ITASK = 4 OR 5.)
+C
+C MAXORD  IWORK(5)  THE MAXIMUM ORDER TO BE ALLOWED.  THE DEFAULT
+C                  VALUE IS 12 IF METH = 1, AND 5 IF METH = 2.
+C                  IF MAXORD EXCEEDS THE DEFAULT VALUE, IT WILL
+C                  BE REDUCED TO THE DEFAULT VALUE.
+C                  IF MAXORD IS CHANGED DURING THE PROBLEM, IT MAY
+C                  CAUSE THE CURRENT ORDER TO BE REDUCED.
+C
+C MXSTEP  IWORK(6)  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+C                  ALLOWED DURING ONE CALL TO THE KppSolveR.
+C                  THE DEFAULT VALUE IS 500.
+C
+C MXHNIL  IWORK(7)  MAXIMUM NUMBER OF MESSAGES PRINTED (PER PROBLEM)
+C                  WARNING THAT T + H = T ON A STEP (H = STEP SIZE).
+C                  THIS MUST BE POSITIVE TO RESULT IN A NON-DEFAULT
+C                  VALUE.  THE DEFAULT VALUE IS 10.
+C----------------------------------------------------------------------
+C OPTIONAL OUTPUTS.
+C
+C AS OPTIONAL ADDITIONAL OUTPUT FROM ODESSA, THE VARIABLES LISTED
+C BELOW ARE QUANTITIES RELATED TO THE PERFORMANCE OF ODESSA
+C WHICH ARE AVAILABLE TO THE USER.  THESE ARE COMMUNICATED BY WAY OF
+C THE WORK ARRAYS, BUT ALSO HAVE INTERNAL MNEMONIC NAMES AS SHOWN.
+C EXCEPT WHERE STATED OTHERWISE, ALL OF THESE OUTPUTS ARE DEFINED
+C ON ANY SUCCESSFUL RETURN FROM ODESSA, AND ON ANY RETURN WITH
+C ISTATE = -1, -2, -4, -5, OR -6.  ON AN ILLEGAL INPUT RETURN
+C (ISTATE = -3), THEY WILL BE UNCHANGED FROM THEIR EXISTING VALUES
+C (IF ANY), EXCEPT POSSIBLY FOR TOLSF, LENRW, AND LENIW.
+C ON ANY ERROR RETURN, OUTPUTS RELEVANT TO THE ERROR WILL BE DEFINED,
+C AS NOTED BELOW.
+C
+C NAME   LOCATION      MEANING
+C
+C HU     RWORK(11) THE STEP SIZE IN T LAST USED (SUCCESSFULLY).
+C
+C HCUR   RWORK(12) THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C TCUR   RWORK(13) THE CURRENT VALUE OF THE INDEPENDENT VARIABLE
+C                  WHICH THE KppSolveR HAS ACTUALLY REACHED, I.E. THE
+C                  CURRENT INTERNAL MESH POINT IN T.  ON OUTPUT, TCUR
+C                  WILL ALWAYS BE AT LEAST AS FAR AS THE ARGUMENT
+C                  T, BUT MAY BE FARTHER (IF INTERPOLATION WAS DONE).
+C
+C TOLSF  RWORK(14) A TOLERANCE SCALE FACTOR, GREATER THAN 1.0,
+C                  COMPUTED WHEN A REQUEST FOR TOO MUCH ACCURACY WAS
+C                  DETECTED (ISTATE = -3 IF DETECTED AT THE START OF
+C                  THE PROBLEM, ISTATE = -2 OTHERWISE).  IF ITOL IS
+C                  LEFT UNALTERED BUT RTOL AND ATOL ARE UNIFORMLY
+C                  SCALED UP BY A FACTOR OF TOLSF FOR THE NEXT CALL,
+C                  THEN THE KppSolveR IS DEEMED LIKELY TO SUCCEED.
+C                  (THE USER MAY ALSO IGNORE TOLSF AND ALTER THE
+C                  TOLERANCE PARAMETERS IN ANY OTHER WAY APPROPRIATE.)
+C
+C NST    IWORK(11) THE NUMBER OF STEPS TAKEN FOR THE PROBLEM SO FAR.
+C
+C NFE    IWORK(12) THE NUMBER OF F EVALUATIONS FOR THE PROBLEM SO FAR.
+C
+C NJE    IWORK(13) THE NUMBER OF JACOBIAN EVALUATIONS (AND OF MATRIX
+C                  LU DECOMPOSITIONS IF ISOPT = 0) FOR THE PROBLEM SO
+C                  FAR. IF ISOPT = 1, THE NUMBER OF LU DECOMPOSITIONS
+C                  IS EQUAL TO NJE - NSPE (SEE BELOW).
+C
+C NQU    IWORK(14) THE METHOD ORDER LAST USED (SUCCESSFULLY).
+C
+C NQCUR  IWORK(15) THE ORDER TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C IMXER  IWORK(16) THE INDEX OF THE COMPONENT OF LARGEST MAGNITUDE IN
+C                  THE WEIGHTED LOCAL ERROR VECTOR (E(I,J)/EWT(I,J)),
+C                  ON AN ERROR RETURN WITH ISTATE = -4 OR -5.
+C
+C LENRW  IWORK(17) THE LENGTH OF RWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C LENIW  IWORK(18) THE LENGTH OF IWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C NDFE   IWORK(19) THE NUMBER OF DF/DP (VECTOR) EVALUATIONS.
+C
+C NSPE   IWORK(20) THE NUMBER OF CALLS TO SUBROUTINE SPRIME. EACH CALL
+C                  TO SPRIME REQUIRES A JACOBIAN EVALUATION, BUT NOT
+C                  AN LU DECOMPOSITION.
+C
+C THE FOLLOWING ARRAYS ARE SEGMENTS OF THE RWORK AND IWORK ARRAYS
+C WHICH MAY ALSO BE OF INTEREST TO THE USER AS OPTIONAL OUTPUTS.
+C FOR EACH ARRAY, THE TABLE BELOW GIVES ITS INTERNAL NAME, ITS BASE
+C ADDRESS IN RWORK OR IWORK, AND ITS DESCRIPTION.
+C
+C NAME   BASE ADDRESS      DESCRIPTION
+C
+C YH     21 IN RWORK    THE NORDSIECK HISTORY ARRAY, OF SIZE NYH BY
+C                       (NQCUR + 1). FOR J = 0,1,...,NQCUR, COLUMN J+1
+C                       OF YH CONTAINS HCUR**J/FACTORIAL(J) TIMES
+C                       THE J-TH DERIVATIVE OF THE INTERPOLATING
+C                       POLYNOMIAL CURRENTLY REPRESENTING THE SOLUTION,
+C                       EVALUATED AT T = TCUR.
+C
+C ACOR    LENRW-NYH+1   ARRAY OF SIZE NYH USED FOR THE ACCUMULATED
+C         IN RWORK      CORRECTIONS ON EACH STEP, SCALED ON OUTPUT
+C                       TO REPRESENT THE ESTIMATED LOCAL ERROR IN Y
+C                       ON THE LAST STEP.  THIS IS THE VECTOR E IN
+C                       THE DESCRIPTION OF THE ERROR CONTROL.
+C                       IT IS DEFINED ONLY ON A SUCCESSFUL RETURN
+C                       FROM ODESSA.
+C NRS     LENIW-NPAR    ARRAY OF SIZE NPAR+1, USED TO STORE THE
+C         IN IWORK      ACCUMULATED NUMBER OF REPEATED STEPS DUE TO
+C                       THE SENSITIVITY ANALYSIS..
+C                         NRS(1) = TOTAL NUMBER OF REPEATED STEPS,
+C                         NRS(2),... = NUMBER OF REPEATED STEPS DUE TO
+C                                      MODEL PARAMETER 1,...
+C
+C----------------------------------------------------------------------
+C PART II.  OTHER ROUTINES CALLABLE.
+C
+C THE FOLLOWING ARE OPTIONAL CALLS WHICH THE USER MAY MAKE TO
+C GAIN ADDITIONAL CAPABILITIES IN CONJUNCTION WITH ODESSA.
+C (THE ROUTINES XSETUN AND XSETF ARE DESIGNED TO CONFORM TO THE
+C SLATEC ERROR HANDLING PACKAGE.)
+C
+C    FORM OF CALL                  FUNCTION
+C  CALL XSETUN(LUN)          SET THE LOGICAL UNIT NUMBER, LUN, FOR
+C                            OUTPUT OF MESSAGES FROM ODESSA, IF
+C                            THE DEFAULT IS NOT DESIRED.
+C                            THE DEFAULT VALUE OF LUN IS 6.
+C
+C  CALL XSETF(MFLAG)         SET A FLAG TO CONTROL THE PRINTING OF
+C                            MESSAGES BY ODESSA..
+C                            MFLAG = 0 MEANS DO NOT PRINT. (DANGER..
+C                            THIS RISKS LOSING VALUABLE INFORMATION.)
+C                            MFLAG = 1 MEANS PRINT (THE DEFAULT).
+C
+C                            EITHER OF THE ABOVE CALLS MAY BE MADE AT
+C                            ANY TIME AND WILL TAKE EFFECT IMMEDIATELY.
+C
+C  CALL SVCOM (RSAV, ISAV)   STORE IN RSAV AND ISAV THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA (SEE PART III BELOW).
+C                            RSAV MUST BE A REAL ARRAY OF LENGTH 222
+C                            OR MORE, AND ISAV MUST BE AN INTEGER
+C                            ARRAY OF LENGTH 54 OR MORE.
+C
+C  CALL RSCOM (RSAV, ISAV)   RESTORE, FROM RSAV AND ISAV, THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA.  PRESUMES A PRIOR CALL TO SVCOM
+C                            WITH THE SAME ARGUMENTS.
+C
+C                            SVCOM AND RSCOM ARE USEFUL IF
+C                            INTERRUPTING A RUN AND RESTARTING
+C                            LATER, OR ALTERNATING BETWEEN TWO OR
+C                            MORE PROBLEMS KppSolveD WITH ODESSA.
+C
+C  CALL INTDY(,,,,,)         PROVIDE DERIVATIVES OF Y, OF VARIOUS
+C       (SEE BELOW)          ORDERS, AT A SPECIFIED POINT T, IF
+C                            DESIRED.  IT MAY BE CALLED ONLY AFTER
+C                            A SUCCESSFUL RETURN FROM ODESSA.
+C
+C THE DETAILED INSTRUCTIONS FOR USING INTDY ARE AS FOLLOWS.
+C THE FORM OF THE CALL IS..
+C
+C  CALL INTDY (T, K, RWORK(21), NYH, DKY, IFLAG)
+C
+C THE INPUT PARAMETERS ARE..
+C
+C T        = VALUE OF INDEPENDENT VARIABLE WHERE ANSWERS ARE DESIRED
+C            (NORMALLY THE SAME AS THE T LAST RETURNED BY ODESSA).
+C            FOR VALID RESULTS, T MUST LIE BETWEEN TCUR - HU AND TCUR.
+C            (SEE OPTIONAL OUTPUTS FOR TCUR AND HU.)
+C K        = INTEGER ORDER OF THE DERIVATIVE DESIRED.  K MUST SATISFY
+C            0 .LE. K .LE. NQCUR, WHERE NQCUR IS THE CURRENT ORDER
+C            (SEE OPTIONAL OUTPUTS).  THE CAPABILITY CORRESPONDING
+C            TO K = 0, I.E. COMPUTING Y(T), IS ALREADY PROVIDED
+C            BY ODESSA DIRECTLY.  SINCE NQCUR .GE. 1, THE FIRST
+C            DERIVATIVE DY/DT IS ALWAYS AVAILABLE WITH INTDY.
+C RWORK(21) = THE BASE ADDRESS OF THE HISTORY ARRAY YH.
+C NYH      = COLUMN LENGTH OF YH, EQUAL TO THE TOTAL NUMBER OF
+C            DEPENDENT VARIABLES. IF ISOPT = 0, NYH = N. IF ISOPT = 1,
+C            NYH = N * (NPAR + 1).
+C
+C THE OUTPUT PARAMETERS ARE..
+C
+C DKY      = A REAL ARRAY OF LENGTH NYH CONTAINING THE COMPUTED VALUE
+C            OF THE K-TH DERIVATIVE OF Y(T).
+C IFLAG    = INTEGER FLAG, RETURNED AS 0 IF K AND T WERE LEGAL,
+C            -1 IF K WAS ILLEGAL, AND -2 IF T WAS ILLEGAL.
+C            ON AN ERROR RETURN, A MESSAGE IS ALSO WRITTEN.
+C----------------------------------------------------------------------
+C PART III.  COMMON BLOCKS.
+C
+C IF ODESSA IS TO BE USED IN AN OVERLAY SITUATION, THE USER
+C MUST DECLARE, IN THE PRIMARY OVERLAY, THE VARIABLES IN..
+C  (1) THE CALL SEQUENCE TO ODESSA,
+C  (2) THE THREE INTERNAL COMMON BLOCKS
+C        /ODE001/  OF LENGTH  258  (219 DOUBLE PRECISION WORDS
+C                        FOLLOWED BY 39 INTEGER WORDS),
+C        /ODE002/  OF LENGTH 14 (3 DOUBLE PRECISION WORDS FOLLOWED
+C                        BY 11 INTEGER WORDS),
+C        /EH0001/  OF LENGTH  2 (INTEGER WORDS).
+C
+C IF ODESSA IS USED ON A SYSTEM IN WHICH THE CONTENTS OF INTERNAL
+C COMMON BLOCKS ARE NOT PRESERVED BETWEEN CALLS, THE USER SHOULD
+C DECLARE THE ABOVE THREE COMMON BLOCKS IN HIS MAIN PROGRAM TO INSURE
+C THAT THEIR CONTENTS ARE PRESERVED.
+C
+C IF THE SOLUTION OF A GIVEN PROBLEM BY ODESSA IS TO BE INTERRUPTED
+C AND THEN LATER CONTINUED, SUCH AS WHEN RESTARTING AN INTERRUPTED RUN
+C OR ALTERNATING BETWEEN TWO OR MORE PROBLEMS, THE USER SHOULD SAVE,
+C FOLLOWING THE RETURN FROM THE LAST ODESSA CALL PRIOR TO THE
+C INTERRUPTION, THE CONTENTS OF THE CALL SEQUENCE VARIABLES AND THE
+C INTERNAL COMMON BLOCKS, AND LATER RESTORE THESE VALUES BEFORE THE
+C NEXT ODESSA CALL FOR THAT PROBLEM.  TO SAVE AND RESTORE THE COMMON
+C BLOCKS, USE SUBROUTINES SVCOM AND RSCOM (SEE PART II ABOVE).
+C
+C----------------------------------------------------------------------
+C PART IV.  OPTIONALLY REPLACEABLE KppSolveR ROUTINES.
+C
+C BELOW ARE DESCRIPTIONS OF TWO ROUTINES IN THE ODESSA PACKAGE WHICH
+C RELATE TO THE MEASUREMENT OF ERRORS.  EITHER ROUTINE CAN BE
+C REPLACED BY A USER-SUPPLIED VERSION, IF DESIRED. HOWEVER, SINCE SUCH
+C A REPLACEMENT MAY HAVE A MAJOR IMPACT ON PERFORMANCE, IT SHOULD BE
+C DONE ONLY WHEN ABSOLUTELY NECESSARY, AND ONLY WITH GREAT CAUTION.
+C (NOTE.. THE MEANS BY WHICH THE PACKAGE VERSION OF A ROUTINE IS
+C SUPERSEDED BY THE USER-S VERSION MAY BE SYSTEM-DEPENDENT.)
+C
+C (A) EWSET.
+C THE FOLLOWING SUBROUTINE IS CALLED JUST BEFORE EACH INTERNAL
+C INTEGRATION STEP, AND SETS THE ARRAY OF ERROR WEIGHTS, EWT, AS
+C DESCRIBED UNDER ITOL/RTOL/ATOL ABOVE..
+C    SUBROUTINE EWSET (NYH, ITOL, RTOL, ATOL, YCUR, EWT)
+C WHERE NEQ, ITOL, RTOL, AND ATOL ARE AS IN THE ODESSA CALL SEQUENCE,
+C YCUR CONTAINS THE CURRENT DEPENDENT VARIABLE VECTOR, AND
+C EWT IS THE ARRAY OF WEIGHTS SET BY EWSET.
+C
+C IF THE USER SUPPLIES THIS SUBROUTINE, IT MUST RETURN IN EWT(I)
+C (I = 1,...,NYH) A POSITIVE QUANTITY SUITABLE FOR COMPARING ERRORS
+C IN Y(I) TO.  THE EWT ARRAY RETURNED BY EWSET IS PASSED TO THE
+C VNORM ROUTINE (SEE BELOW), AND ALSO USED BY ODESSA IN THE COMPUTATION
+C OF THE OPTIONAL OUTPUT IMXER, THE DIAGONAL JACOBIAN APPROXIMATION,
+C AND THE INCREMENTS FOR DIFFERENCE QUOTIENT JACOBIANS.
+C
+C IN THE USER-SUPPLIED VERSION OF EWSET, IT MAY BE DESIRABLE TO USE
+C THE CURRENT VALUES OF DERIVATIVES OF Y.  DERIVATIVES UP TO ORDER NQ
+C ARE AVAILABLE FROM THE HISTORY ARRAY YH, DESCRIBED ABOVE UNDER
+C OPTIONAL OUTPUTS.  IN EWSET, YH IS IDENTICAL TO THE YCUR ARRAY,
+C EXTENDED TO NQ + 1 COLUMNS WITH A COLUMN LENGTH OF NYH AND SCALE
+C FACTORS OF H**J/FACTORIAL(J).  ON THE FIRST CALL FOR THE PROBLEM,
+C GIVEN BY NST = 0, NQ IS 1 AND H IS TEMPORARILY SET TO 1.0.
+C THE QUANTITIES NQ, NYH, H, AND NST CAN BE OBTAINED BY INCLUDING
+C IN EWSET THE STATEMENTS..
+C    DOUBLE PRECISION H, RLS
+C    COMMON /ODE001/ RLS(219),ILS(39)
+C    NQ = ILS(35)
+C    NYH = ILS(14)
+C    NST = ILS(36)
+C    H = RLS(213)
+C THUS, FOR EXAMPLE, THE CURRENT VALUE OF DY/DT CAN BE OBTAINED AS
+C YCUR(NYH+I)/H  (I=1,...,N)  (AND THE DIVISION BY H IS
+C UNNECESSARY WHEN NST = 0).
+C
+C (B) VNORM.
+C THE FOLLOWING IS A REAL FUNCTION ROUTINE WHICH COMPUTES THE WEIGHTED
+C ROOT-MEAN-SQUARE NORM OF A VECTOR V..
+C    D = VNORM (LV, V, W)
+C WHERE..
+C  LV = THE LENGTH OF THE VECTOR,
+C  V = REAL ARRAY OF LENGTH N CONTAINING THE VECTOR,
+C  W = REAL ARRAY OF LENGTH N CONTAINING WEIGHTS,
+C  D = SQRT( (1/N) * SUM(V(I)*W(I))**2 ).
+C VNORM IS CALLED WITH LV = N AND WITH W(I) = 1.0/EWT(I), WHERE
+C EWT IS AS SET BY SUBROUTINE EWSET.
+C
+C IF THE USER SUPPLIES THIS FUNCTION, IT SHOULD RETURN A NON-NEGATIVE
+C VALUE OF VNORM SUITABLE FOR USE IN THE ERROR CONTROL IN ODESSA.
+C NONE OF THE ARGUMENTS SHOULD BE ALTERED BY VNORM.
+C FOR EXAMPLE, A USER-SUPPLIED VNORM ROUTINE MIGHT..
+C  -SUBSTITUTE A MAX-NORM OF (V(I)*W(I)) FOR THE RMS-NORM, OR
+C  -IGNORE SOME COMPONENTS OF V IN THE NORM, WITH THE EFFECT OF
+C   SUPPRESSING THE ERROR CONTROL ON THOSE COMPONENTS OF Y.
+C----------------------------------------------------------------------
+C OTHER ROUTINES IN THE ODESSA PACKAGE.
+C
+C IN ADDITION TO SUBROUTINE ODESSA, THE ODESSA PACKAGE INCLUDES THE
+C FOLLOWING SUBROUTINES AND FUNCTION ROUTINES..
+C  INTDY   COMPUTES AN INTERPOLATED VALUE OF THE Y VECTOR AT T = TOUT.
+C  STODE   IS THE CORE INTEGRATOR, WHICH DOES ONE STEP OF THE
+C          INTEGRATION AND THE ASSOCIATED ERROR CONTROL.
+C  STESA   MANAGES THE SOLUTION OF THE SENSITIVITY FUNCTIONS.
+C  CFODE   SETS ALL METHOD COEFFICIENTS AND TEST CONSTANTS.
+C  PREPJ   COMPUTES AND PREPROCESSES THE JACOBIAN MATRIX J = DF/DY
+C          AND THE NEWTON ITERATION MATRIX P = I - H*L0*J.
+C          IT IS ALSO CALLED BY SPRIME (WITH JOPT = 1) TO JUST
+C          COMPUTE THE JACOBIAN MATRIX.
+C  PREPDF  COMPUTES THE INHOMOGENEITY MATRIX DF/DP.
+C  SPRIME  DEFINES THE SYSTEM OF SENSITIVITY EQUATIONS.
+C  SOLSY   MANAGES SOLUTION OF LINEAR SYSTEM IN CHORD ITERATION.
+C  EWSET   SETS THE ERROR WEIGHT VECTOR EWT BEFORE EACH STEP.
+C  VNORM   COMPUTES THE WEIGHTED R.M.S. NORM OF A VECTOR.
+C  SVCOM AND RSCOM  ARE USER-CALLABLE ROUTINES TO SAVE AND RESTORE,
+C          RESPECTIVELY, THE CONTENTS OF THE INTERNAL COMMON BLOCKS.
+C  DGEFA AND DGESL  ARE ROUTINES FROM LINPACK FOR SOLVING FULL
+C          SYSTEMS OF LINEAR ALGEBRAIC EQUATIONS.
+C  DGBFA AND DGBSL  ARE ROUTINES FROM LINPACK FOR SOLVING BANDED
+C          LINEAR SYSTEMS.
+C  DAXPY, DSCAL, IDAMAX, AND DDOT  ARE BASIC LINEAR ALGEBRA MODULES
+C          (BLAS) USED BY THE ABOVE LINPACK ROUTINES.
+C  D1MACH  COMPUTES THE UNIT ROUNDOFF IN A MACHINE-INDEPENDENT MANNER.
+C  XERR, XSETUN, AND XSETF  HANDLE THE PRINTING OF ALL ERROR
+C          MESSAGES AND WARNINGS.
+C NOTE..  VNORM, IDAMAX, DDOT, AND D1MACH ARE FUNCTION ROUTINES.
+C ALL THE OTHERS ARE SUBROUTINES.
+C
+C THE FORTRAN GENERIC INTRINSIC FUNCTIONS USED BY ODESSA ARE..
+C ABS, MAX, MIN, REAL, MOD, SIGN, SQRT, AND WRITE
+C
+C A BLOCK DATA SUBPROGRAM IS ALSO INCLUDED WITH THE PACKAGE,
+C FOR LOADING SOME OF THE VARIABLES IN INTERNAL COMMON.
+C
+C----------------------------------------------------------------------
+C PART V.  GENERAL REMARKS
+C
+C THIS SECTION HIGHLIGHTS THE BASIC DIFFERENCES BETWEEN THE ORIGINAL
+C LSODE PACKAGE AND THE ODESSA MODIFICATION. THIS IS PROVIDED AS A
+C SERVICE TO EXPERIENCED LSODE USERS TO EXPEDITE FAMILIARIZATION WITH
+C ODESSA.
+C
+C (A). ORIGINAL SUBROUTINES AND FUNCTIONS.
+C
+C      OF THE ORIGINAL 22 SUBROUTINES AND FUNCTIONS USED IN THE LSODE
+C      PACKAGE, ALL ARE USED BY ODESSA, WITH THE FOLLOWING HAVING BEEN
+C      MODIFIED..
+C
+C      LSODE  THE ORIGINAL DRIVER SUBROUTINE FOR THE LSODE PACKAGE IS
+C             EXTENSIVELY MODIFIED AND RENAMED ODESSA, WHICH NOW
+C             CONTAINS A CALL TO SPRIME TO ESTABLISH INITIAL CONDITIONS
+C             FOR THE SENSITIVITY CALCULATIONS.
+C
+C      STODE  THE ONE STEP INTEGRATOR IS SLIGHTLY MODIFIED AND RETAINS
+C             ITS ORIGINAL NAME. IT NOW CONTAINS THE CALL TO STESA,
+C             AND ALSO CALLS SPRIME IF KFLAG .LE. -3.
+C
+C      PREPJ  ALSO NAMED PREPJ IN ODESSA IS SLIGHTLY MODIFIED TO ALLOW
+C             FOR THE CALCULATION OF JACOBIAN WITH NO PREPROCESSING
+C             (JOPT = 1).
+C
+C (B). NEW SUBROUTINES.
+C
+C      IN ADDITION TO THE CHANGES NOTED ABOVE, THREE NEW SUBROUTINES
+C      HAVE BEEN INTRODUCED (SEE STESA, SPRIME, AND PREPDF AS DESCRIBED
+C      IN PART IV. ABOVE).
+C
+C (C). COMMON BLOCKS.
+C
+C      /LS0001/  RETAINS THE SAME LENGTH AND IS RENAMED /ODE001/;
+C                HOWEVER THE REAL ARRAY ROWNS(209) IS SHORTENED TO A
+C                LENGTH OF (173) REAL WORDS, ALLOWING THE REMOVAL OF
+C                TESCO(3,12) WHICH IS NOW PASSED FROM STODE TO STESA.
+C                IN ADDITION, THE INTEGER ARRAY IOWNS(6) IS SHORTENED
+C                TO A LENGTH OF (4) INTEGER WORDS, ALLOWING THE REMOVAL
+C                OF IALTH AND LMAX WHICH ARE NOW PASSED FROM STODE TO
+C                STESA.
+C
+C      /ODE002/  ADDED COMMON BLOCK FOR VARIABLES IMPORTANT TO
+C                SENSITIVITY ANALYSIS (SEE PART III. ABOVE). A BLOCK
+C                DATA PROGRAM IS NOT REQUIRED FOR THIS COMMON BLOCK.
+C
+C      SVCOM,RSCOM  THESE TWO SUBROUTINES ARE MODIFIED TO HANDLE
+C                   COMMON BLOCK /ODE002/ AS WELL.
+C
+C (D). OPTIONAL INPUTS.
+C
+C      THE FULL SET OF OPTIONAL INPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA, WITH THE EXCEPTION THAT THE NUMBER OF ODE'S
+C      IN THE MODEL (NEQ(1)), MAY NOT BE CHANGED DURING THE PROBLEM.
+C      IN ODESSA, NYH NOW REFERS TO THE TOTAL NUMBER OF FIRST-ORDER
+C      ODE'S (MODEL AND SENSITIVITY EQUATIONS) WHICH IS EQUAL TO
+C      NEQ(1) IF ISOPT = 0, OR NEQ(1)*(NEQ(2)+1) IF ISOPT = 1.
+C      NEQ(1), NEQ(2), AND NYH ARE NOT ALLOWED TO CHANGE DURING
+C      THE COURSE OF AN INTEGRATION.
+C
+C (E). OPTIONAL OUTPUTS.
+C
+C      THE FULL SET OF OPTIONAL OUTPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA. IN ADDITION, IWORK(19) AND IWORK(20) ARE
+C      LOADED WITH NDFE AND NSPE, RESPECTIVELY, UPON OUTPUT. THE TOTAL
+C      NUMBER OF LU DECOMPOSITIONS OF THE PROCESSED JACOBIAN IS EQUAL
+C      TO NJE - NSPE.
+C-----------------------------------------------------------------------
+      SUBROUTINE KPP_ODESSA (F, DF, NEQ, Y, PAR, T, TOUT,
+     1   ITOL, RTOL, ATOL,
+     1   ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      LOGICAL IHIT
+      EXTERNAL F, DF, JAC, PREPJ, SOLSY, PREPDF
+      DIMENSION NEQ(*), Y(*), PAR(*), RTOL(*), ATOL(*), IOPT(*),
+     1   RWORK(LRW), IWORK(LIW), MORD(2)
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE.. LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY(T)/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY
+C     DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C     SENSITIVITY ANALYSIS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE.
+C     (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C THE FOLLOWING INTERNAL COMMON BLOCKS CONTAIN
+C (A) VARIABLES WHICH ARE LOCAL TO ANY SUBROUTINE BUT WHOSE VALUES MUST
+C    BE PRESERVED BETWEEN CALLS TO THE ROUTINE (OWN VARIABLES), AND
+C (B) VARIABLES WHICH ARE COMMUNICATED BETWEEN SUBROUTINES.
+C THE STRUCTURE OF THE BLOCKS ARE AS FOLLOWS..  ALL REAL VARIABLES ARE
+C LISTED FIRST, FOLLOWED BY ALL INTEGERS.  WITHIN EACH TYPE, THE
+C VARIABLES ARE GROUPED WITH THOSE LOCAL TO SUBROUTINE ODESSA FIRST,
+C THEN THOSE LOCAL TO SUBROUTINE STODE, AND FINALLY THOSE USED
+C FOR COMMUNICATION.  THE BLOCKS ARE DECLARED IN SUBROUTINES ODESSA
+C INTDY, STODE, STESA, PREPJ, PREPDF, AND SOLSY.  GROUPS OF VARIABLES
+C ARE REPLACED BY DUMMY ARRAYS IN THE COMMON DECLARATIONS IN ROUTINES
+C WHERE THOSE VARIABLES ARE NOT USED.
+C-----------------------------------------------------------------------
+      COMMON /ODE001/ TRET, ROWNS(173),
+     1   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     2   ILLIN, INIT, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     3   MXSTEP, MXHNIL, NHNIL, NTREP, NSLAST, NYH, IOWNS(4),
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   NPAR, LDFDP, LNRS,
+     2   ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0,TWO=2.0D0,FOUR=4.0D0)
+      DATA  MORD(1),MORD(2)/12,5/, MXSTP0/500/, MXHNL0/10/
+C-----------------------------------------------------------------------
+C BLOCK A.
+C THIS CODE BLOCK IS EXECUTED ON EVERY CALL.
+C IT TESTS ISTATE AND ITASK FOR LEGALITY AND BRANCHES APPROPIATELY.
+C IF ISTATE .GT. 1 BUT THE FLAG INIT SHOWS THAT INITIALIZATION HAS
+C NOT YET BEEN DONE, AN ERROR RETURN OCCURS.
+C IF ISTATE = 1 AND TOUT = T, JUMP TO BLOCK G AND RETURN IMMEDIATELY.
+C-----------------------------------------------------------------------
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602
+      IF (ISTATE .EQ. 1) GO TO 10
+      IF (INIT .EQ. 0) GO TO 603
+      IF (ISTATE .EQ. 2) GO TO 200
+      GO TO 20
+ 10   INIT = 0
+      IF (TOUT .EQ. T) GO TO 430
+ 20   NTREP = 0
+C-----------------------------------------------------------------------
+C BLOCK B.
+C THE NEXT CODE BLOCK IS EXECUTED FOR THE INITIAL CALL (ISTATE = 1),
+C OR FOR A CONTINUATION CALL WITH PARAMETER CHANGES (ISTATE = 3).
+C IT CONTAINS CHECKING OF ALL INPUTS AND VARIOUS INITIALIZATIONS.
+C
+C FIRST CHECK LEGALITY OF THE NON-OPTIONAL INPUTS NEQ, ITOL, IOPT,
+C MF, ML, AND MU.
+C-----------------------------------------------------------------------
+      IF (NEQ(1) .LE. 0) GO TO 604
+      IF (ISTATE .EQ. 1) GO TO 25
+      IF (NEQ(1) .NE. N) GO TO 605
+ 25   N = NEQ(1)
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606
+      DO 26 I = 1,3
+ 26     IF (IOPT(I) .LT. 0 .OR. IOPT(I) .GT. 1) GO TO 607
+      ISOPT = IOPT(2)
+      IDF = IOPT(3)
+      NYH = N
+      NSV = 1
+      METH = MF/10
+      MITER = MF - 10*METH
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608
+      IF (MITER .LE. 3) GO TO 30
+      ML = IWORK(1)
+      MU = IWORK(2)
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610
+ 30   IF (ISOPT .EQ. 0) GO TO 32
+C CHECK LEGALITY OF THE NON-OPTIONAL INPUTS ISOPT, NPAR.
+C COMPUTE NUMBER OF SOLUTION VECTORS AND TOTAL NUMBER OF EQUATIONS.
+      IF (NEQ(2) .LE. 0) GO TO 628
+      IF (ISTATE .EQ. 1) GO TO 31
+      IF (NEQ(2) .NE. NPAR) GO TO 629
+ 31   NPAR = NEQ(2)
+      NSV = NPAR + 1
+      NYH = NSV * N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) GO TO 630
+C NEXT PROCESS AND CHECK THE OPTIONAL INPUTS. --------------------------
+ 32   IF (IOPT(1) .EQ. 1) GO TO 40
+      MAXORD = MORD(METH)
+      MXSTEP = MXSTP0
+      MXHNIL = MXHNL0
+      IF (ISTATE .EQ. 1) H0 = ZERO
+      HMXI = ZERO
+      HMIN = ZERO
+      GO TO 60
+ 40   MAXORD = IWORK(5)
+      IF (MAXORD .LT. 0) GO TO 611
+      IF (MAXORD .EQ. 0) MAXORD = 100
+      MAXORD = MIN(MAXORD,MORD(METH))
+      MXSTEP = IWORK(6)
+      IF (MXSTEP .LT. 0) GO TO 612
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0
+      MXHNIL = IWORK(7)
+      IF (MXHNIL .LT. 0) GO TO 613
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0
+      IF (ISTATE .NE. 1) GO TO 50
+      H0 = RWORK(5)
+      IF ((TOUT - T)*H0 .LT. ZERO) GO TO 614
+ 50   HMAX = RWORK(6)
+      IF (HMAX .LT. ZERO) GO TO 615
+      HMXI = ZERO
+      IF (HMAX .GT. ZERO) HMXI = ONE/HMAX
+      HMIN = RWORK(7)
+      IF (HMIN .LT. ZERO) GO TO 616
+C-----------------------------------------------------------------------
+C SET WORK ARRAY POINTERS AND CHECK LENGTHS LRW AND LIW.
+C POINTERS TO SEGMENTS OF RWORK AND IWORK ARE NAMED BY PREFIXING L TO
+C THE NAME OF THE SEGMENT.  E.G., THE SEGMENT YH STARTS AT RWORK(LYH).
+C SEGMENTS OF RWORK (IN ORDER) ARE DENOTED  YH, WM, EWT, SAVF, ACOR.
+C WORK SPACE FOR DFDP IS CONTAINED IN ACOR.
+C-----------------------------------------------------------------------
+ 60   LYH = 21
+      LWM = LYH + (MAXORD + 1)*NYH
+      IF (MITER .EQ. 0) LENWM = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) LENWM = N*N + 2
+      IF (MITER .EQ. 3) LENWM = N + 2
+      IF (MITER .GE. 4) LENWM = (2*ML + MU + 1)*N + 2
+      LEWT = LWM + LENWM
+      LSAVF = LEWT + NYH
+      LACOR = LSAVF + N
+      LDFDP = LACOR + N
+      LENRW = LACOR + NYH - 1
+      IWORK(17) = LENRW
+      LIWM = 1
+      LENIW = 20 + N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 20
+      LNRS = LENIW + LIWM
+      IF (ISOPT .EQ. 1) LENIW = LNRS + NPAR
+      IWORK(18) = LENIW
+      IF (LENRW .GT. LRW) GO TO 617
+      IF (LENIW .GT. LIW) GO TO 618
+C CHECK RTOL AND ATOL FOR LEGALITY. ------------------------------------
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 70 I = 1,NYH
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        IF (RTOLI .LT. ZERO) GO TO 619
+        IF (ATOLI .LT. ZERO) GO TO 620
+ 70     CONTINUE
+      IF (ISTATE .EQ. 1) GO TO 100
+C IF ISTATE = 3, SET FLAG TO SIGNAL PARAMETER CHANGES TO STODE. --------
+      JSTART = -1
+      IF (NQ .LE. MAXORD) GO TO 90
+C MAXORD WAS REDUCED BELOW NQ.  COPY YH(*,MAXORD+2) INTO SAVF. ---------
+      DO 80 I = 1,N
+ 80     RWORK(I+LSAVF-1) = RWORK(I+LWM-1)
+C RELOAD WM(1) = RWORK(LWM), SINCE LWM MAY HAVE CHANGED. ---------------
+ 90   IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      GO TO 200
+C-----------------------------------------------------------------------
+C BLOCK C.
+C THE NEXT BLOCK IS FOR THE INITIAL CALL ONLY (ISTATE = 1).
+C IT CONTAINS ALL REMAINING INITIALIZATIONS, THE INITIAL CALL TO F,
+C THE INITIAL CALL TO SPRIME IF ISOPT = 1,
+C AND THE CALCULATION OF THE INITIAL STEP SIZE.
+C THE ERROR WEIGHTS IN EWT ARE INVERTED AFTER BEING LOADED.
+C-----------------------------------------------------------------------
+ 100  UROUND = D1MACH(4)
+      TN = T
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 105
+      TCRIT = RWORK(1)
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. ZERO) GO TO 625
+      IF (H0 .NE. ZERO .AND. (T + H0 - TCRIT)*H0 .GT. ZERO)
+     1   H0 = TCRIT - T
+ 105  JSTART = 0
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      NHNIL = 0
+      NST = 0
+      NJE = 0
+      NSLAST = 0
+      HU = ZERO
+      NQU = 0
+      CCMAX = 0.3D0
+      MAXCOR = 3
+      IF (ISOPT .EQ. 1) MAXCOR = 4
+      MSBP = 20
+      MXNCF = 10
+C INITIAL CALL TO F.  (LF0 POINTS TO YH(1,2) AND LOADS IN VALUES).
+      LF0 = LYH + NYH
+      CALL F (NEQ, T, Y, PAR, RWORK(LF0))
+      NFE = 1
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      NDFE = 0
+      NSPE = 0
+      IF (ISOPT .EQ. 0) GO TO 114
+C INITIALIZE COUNTS FOR REPEATED STEPS DUE TO SENSITIVITY ANALYSIS.
+      DO 110 J = 1,NSV
+ 110    IWORK(J + LNRS - 1) = 0
+C LOAD THE INITIAL VALUE VECTOR IN YH. ---------------------------------
+ 114  DO 115 I = 1,NYH
+ 115    RWORK(I+LYH-1) = Y(I)
+C LOAD AND INVERT THE EWT ARRAY.  (H IS TEMPORARILY SET TO ONE.) -------
+      NQ = 1
+      H = ONE
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 120 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 621
+ 120    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+      IF (ISOPT .EQ. 0) GO TO 125
+C CALL SPRIME TO LOAD FIRST-ORDER SENSITIVITY DERIVATIVES INTO
+C REMAINING YH(*,2) POSITIONS.
+      CALL SPRIME (NEQ, Y, RWORK(LYH), NYH, N, NSV, RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LF0), RWORK(LACOR),
+     2   RWORK(LDFDP), PAR, F, JAC, DF, PREPJ, PREPDF)
+      IF (IERSP .EQ. -1) GO TO 631
+      IF (IERSP .EQ. -2) GO TO 632
+C-----------------------------------------------------------------------
+C THE CODING BELOW COMPUTES THE STEP SIZE, H0, TO BE ATTEMPTED ON THE
+C FIRST STEP, UNLESS THE USER HAS SUPPLIED A VALUE FOR THIS.
+C FIRST CHECK THAT TOUT - T DIFFERS SIGNIFICANTLY FROM ZERO.
+C A SCALAR TOLERANCE QUANTITY TOL IS COMPUTED, AS MAX(RTOL(I))
+C IF THIS IS POSITIVE, OR MAX(ATOL(I)/ABS(Y(I))) OTHERWISE, ADJUSTED
+C SO AS TO BE BETWEEN 100*UROUND AND 1.0E-3. ONLY THE ORIGINAL
+C SOLUTION VECTOR IS CONSIDERED IN THIS CALCULATION (ISOPT = 0 OR 1).
+C THEN THE COMPUTED VALUE H0 IS GIVEN BY..
+C                                     NEQ
+C  H0**2 = TOL / ( W0**-2 + (1/NEQ) * SUM ( F(I)/YWT(I) )**2  )
+C                                      1
+C WHERE  W0     = MAX ( ABS(T), ABS(TOUT) ),
+C        F(I)   = I-TH COMPONENT OF INITIAL VALUE OF F,
+C        YWT(I) = EWT(I)/TOL  (A WEIGHT FOR Y(I)).
+C THE SIGN OF H0 IS INFERRED FROM THE INITIAL VALUES OF TOUT AND T.
+C-----------------------------------------------------------------------
+ 125  IF (H0 .NE. ZERO) GO TO 180
+      TDIST = ABS(TOUT - T)
+      W0 = MAX(ABS(T),ABS(TOUT))
+      IF (TDIST .LT. TWO*UROUND*W0) GO TO 622
+      TOL = RTOL(1)
+      IF (ITOL .LE. 2) GO TO 140
+      DO 130 I = 1,N
+ 130    TOL = MAX(TOL,RTOL(I))
+ 140   IF (TOL .GT. ZERO) GO TO 160
+      ATOLI = ATOL(1)
+      DO 150 I = 1,N
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        AYI = ABS(Y(I))
+        IF (AYI .NE. ZERO) TOL = MAX(TOL,ATOLI/AYI)
+ 150    CONTINUE
+ 160   TOL = MAX(TOL,100.0D0*UROUND)
+      TOL = MIN(TOL,0.001D0)
+      SUM = VNORM (N, RWORK(LF0), RWORK(LEWT))
+      SUM = ONE/(TOL*W0*W0) + TOL*SUM**2
+      H0 = ONE/SQRT(SUM)
+      H0 = MIN(H0,TDIST)
+      H0 = SIGN(H0,TOUT-T)
+C ADJUST H0 IF NECESSARY TO MEET HMAX BOUND. ---------------------------
+ 180   RH = ABS(H0)*HMXI
+      IF (RH .GT. ONE) H0 = H0/RH
+C LOAD H WITH H0 AND SCALE YH(*,2) BY H0. ------------------------------
+      H = H0
+      DO 190 I = 1,NYH
+ 190    RWORK(I+LF0-1) = H0*RWORK(I+LF0-1)
+      GO TO 270
+C-----------------------------------------------------------------------
+C BLOCK D.
+C THE NEXT CODE BLOCK IS FOR CONTINUATION CALLS ONLY (ISTATE = 2 OR 3)
+C AND IS TO CHECK STOP CONDITIONS BEFORE TAKING A STEP.
+C-----------------------------------------------------------------------
+ 200   NSLAST = NST
+      GO TO (210, 250, 220, 230, 240), ITASK
+ 210   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 220   TP = TN - HU*(ONE + 100.0D0*UROUND)
+      IF ((TP - TOUT)*H .GT. ZERO) GO TO 623
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      GO TO 400
+ 230   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+      IF ((TCRIT - TOUT)*H .LT. ZERO) GO TO 625
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 245
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 240   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+ 245   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      IF (ISTATE .EQ. 2) JSTART = -2
+C-----------------------------------------------------------------------
+C BLOCK E.
+C THE NEXT BLOCK IS NORMALLY EXECUTED FOR ALL CALLS AND CONTAINS
+C THE CALL TO THE ONE-STEP CORE INTEGRATOR STODE.
+C
+C THIS IS A LOOPING POINT FOR THE INTEGRATION STEPS.
+C
+C FIRST CHECK FOR TOO MANY STEPS BEING TAKEN, UPDATE EWT (IF NOT AT
+C START OF PROBLEM), CHECK FOR TOO MUCH ACCURACY BEING REQUESTED, AND
+C CHECK FOR H BELOW THE ROUNDOFF LEVEL IN T.
+C TOLSF IS CALCULATED CONSIDERING ALL SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 250   CONTINUE
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 260 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 510
+ 260    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+ 270   TOLSF = UROUND*VNORM (NYH, RWORK(LYH), RWORK(LEWT))
+      IF (TOLSF .LE. ONE) GO TO 280
+      TOLSF = TOLSF*2.0D0
+      IF (NST .EQ. 0) GO TO 626
+      GO TO 520
+ 280   IF (ADDX(TN,H) .NE. TN) GO TO 290
+      NHNIL = NHNIL + 1
+      IF (NHNIL .GT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - WARNING..INTERNAL T (=R1) AND H (=R2) ARE',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('SUCH THAT IN THE MACHINE, T + H = T ON THE NEXT STEP',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('(H = STEP SIZE). KppSolveR WILL CONTINUE ANYWAY',
+     1   101, 1, 0, 0, 0, 2, TN, H)
+      IF (NHNIL .LT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - ABOVE WARNING HAS BEEN ISSUED I1 TIMES.',
+     1   102, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('IT WILL NOT BE ISSUED AGAIN FOR THIS PROBLEM',
+     1   102, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+ 290   CONTINUE
+C-----------------------------------------------------------------------
+C     CALL STODE(NEQ,Y,YH,NYH,YH,WM,IWM,EWT,SAVF,ACOR,PAR,NRS,
+C    1   F,JAC,DF,PREPJ,PREPDF,SOLSY)
+C-----------------------------------------------------------------------
+      CALL STODE (NEQ, Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LSAVF), RWORK(LACOR),
+     2   PAR, IWORK(LNRS), F, JAC, DF, PREPJ, PREPDF, SOLSY)
+      KGO = 1 - KFLAG
+      GO TO (300, 530, 540, 633), KGO
+C-----------------------------------------------------------------------
+C BLOCK F.
+C THE FOLLOWING BLOCK HANDLES THE CASE OF A SUCCESSFUL RETURN FROM THE
+C CORE INTEGRATOR (KFLAG = 0).  TEST FOR STOP CONDITIONS.
+C-----------------------------------------------------------------------
+ 300   INIT = 1
+      GO TO (310, 400, 330, 340, 350), ITASK
+C ITASK = 1.  IF TOUT HAS BEEN REACHED, INTERPOLATE. -------------------
+ 310   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+C ITASK = 3.  JUMP TO EXIT IF TOUT WAS REACHED. ------------------------
+ 330   IF ((TN - TOUT)*H .GE. ZERO) GO TO 400
+      GO TO 250
+C ITASK = 4.  SEE IF TOUT OR TCRIT WAS REACHED.  ADJUST H IF NECESSARY.
+ 340   IF ((TN - TOUT)*H .LT. ZERO) GO TO 345
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+ 345   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      JSTART = -2
+      GO TO 250
+C ITASK = 5.  SEE IF TCRIT WAS REACHED AND JUMP TO EXIT. ---------------
+ 350   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+C-----------------------------------------------------------------------
+C BLOCK G.
+C THE FOLLOWING BLOCK HANDLES ALL SUCCESSFUL RETURNS FROM ODESSA.
+C IF ITASK .NE. 1, Y IS LOADED FROM YH AND T IS SET ACCORDINGLY.
+C ISTATE IS SET TO 2, THE ILLEGAL INPUT COUNTER IS ZEROED, AND THE
+C OPTIONAL OUTPUTS ARE LOADED INTO THE WORK ARRAYS BEFORE RETURNING.
+C IF ISTATE = 1 AND TOUT = T, THERE IS A RETURN WITH NO ACTION TAKEN,
+C EXCEPT THAT IF THIS HAS HAPPENED REPEATEDLY, THE RUN IS TERMINATED.
+C-----------------------------------------------------------------------
+ 400  DO 410 I = 1,NYH
+ 410    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420
+      IF (IHIT) T = TCRIT
+ 420   ISTATE = 2
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+ 430   NTREP = NTREP + 1
+      IF (NTREP .LT. 5) RETURN
+      CALL XERR ('ODESSA -- REPEATED CALLS WITH ISTATE = 1 AND
+     1TOUT = T (=R1)', 301, 1, 0, 0, 0, 1, T, ZERO)
+      GO TO 800
+C-----------------------------------------------------------------------
+C BLOCK H.
+C THE FOLLOWING BLOCK HANDLES ALL UNSUCCESSFUL RETURNS OTHER THAN
+C THOSE FOR ILLEGAL INPUT.  FIRST THE ERROR MESSAGE ROUTINE IS CALLED.
+C IF THERE WAS AN ERROR TEST OR CONVERGENCE TEST FAILURE, IMXER IS SET.
+C THEN Y IS LOADED FROM YH, T IS SET TO TN, AND THE ILLEGAL INPUT
+C COUNTER ILLIN IS SET TO 0.  THE OPTIONAL OUTPUTS ARE LOADED INTO
+C THE WORK ARRAYS BEFORE RETURNING.
+C-----------------------------------------------------------------------
+C THE MAXIMUM NUMBER OF STEPS WAS TAKEN BEFORE REACHING TOUT. ----------
+ 500  CALL XERR ('ODESSA - AT CURRENT T (=R1), MXSTEP (=I1) STEPS',
+     1   201, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('TAKEN ON THIS CALL BEFORE REACHING TOUT',
+     1   201, 1, 1, MXSTEP, 0, 1, TN, ZERO)
+      ISTATE = -1
+      GO TO 580
+C EWT(I) .LE. 0.0 FOR SOME I (NOT AT START OF PROBLEM). ----------------
+ 510   EWTI = RWORK(LEWT+I-1)
+      CALL XERR ('ODESSA - AT T (=R1), EWT(I1) HAS BECOME R2 .LE. 0.',
+     1   202, 1, 1, I, 0, 2, TN, EWTI)
+      ISTATE = -6
+      GO TO 580
+C TOO MUCH ACCURACY REQUESTED FOR MACHINE PRECISION. -------------------
+ 520  CALL XERR ('ODESSA - AT T (=R1), TOO MUCH ACCURACY REQUESTED',
+     1  203, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('FOR PRECISION OF MACHINE..  SEE TOLSF (=R2)',
+     1  203, 1, 0, 0, 0, 2, TN, TOLSF)
+      RWORK(14) = TOLSF
+      ISTATE = -2
+      GO TO 580
+C KFLAG = -1.  ERROR TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN. -----
+ 530  CALL XERR ('ODESSA - AT T(=R1) AND STEP SIZE H(=R2), THE ERROR',
+     1  204, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN',
+     1  204, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -4
+      GO TO 560
+C KFLAG = -2.  CONVERGENCE FAILED REPEATEDLY OR WITH ABS(H) = HMIN. ----
+ 540  CALL XERR ('ODESSA - AT T (=R1) AND STEP SIZE H (=R2), THE',
+     1  205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('CORRECTOR CONVERGENCE FAILED REPEATEDLY',
+     1   205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('OR WITH ABS(H) = HMIN',
+     1   205, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -5
+C COMPUTE IMXER IF RELEVANT. -------------------------------------------
+ 560   BIG = ZERO
+      IMXER = 1
+      DO 570 I = 1,NYH
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1))
+        IF (BIG .GE. SIZE) GO TO 570
+        BIG = SIZE
+        IMXER = I
+ 570    CONTINUE
+      IWORK(16) = IMXER
+C SET Y VECTOR, T, ILLIN, AND OPTIONAL OUTPUTS. ------------------------
+ 580   DO 590 I = 1,NYH
+ 590    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+C-----------------------------------------------------------------------
+C BLOCK I.
+C THE FOLLOWING BLOCK HANDLES ALL ERROR RETURNS DUE TO ILLEGAL INPUT
+C (ISTATE = -3), AS DETECTED BEFORE CALLING THE CORE INTEGRATOR.
+C FIRST THE ERROR MESSAGE ROUTINE IS CALLED.  THEN IF THERE HAVE BEEN
+C 5 CONSECUTIVE SUCH RETURNS JUST BEFORE THIS CALL TO THE KppSolveR,
+C THE RUN IS HALTED.
+C-----------------------------------------------------------------------
+ 601   CALL XERR ('ODESSA - ISTATE (=I1) ILLEGAL',
+     1  1, 1, 1, ISTATE, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 602   CALL XERR ('ODESSA - ITASK (=I1) ILLEGAL',
+     1  2, 1, 1, ITASK, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 603  CALL XERR ('ODESSA - ISTATE .GT. 1 BUT ODESSA NOT INITIALIZED',
+     1  3, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 604   CALL XERR ('ODESSA - NEQ (=I1) .LT. 1',
+     1  4, 1, 1, NEQ(1), 0, 0, ZERO,ZERO)
+      GO TO 700
+ 605  CALL XERR ('ODESSA - ISTATE = 3 AND NEQ CHANGED.  (I1 TO I2)',
+     1  5, 1, 2, N, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 606   CALL XERR ('ODESSA - ITOL (=I1) ILLEGAL',
+     1  6, 1, 1, ITOL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 607   CALL XERR ('ODESSA - IOPT (=I1) ILLEGAL',
+     1   7, 1, 1, IOPT, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 608   CALL XERR('ODESSA - MF (=I1) ILLEGAL',
+     1   8, 1, 1, MF, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 609  CALL XERR('ODESSA - ML (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   9, 1, 2, ML, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 610  CALL XERR('ODESSA - MU (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   10, 1, 2, MU, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 611   CALL XERR('ODESSA - MAXORD (=I1) .LT. 0',
+     1   11, 1, 1, MAXORD, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 612   CALL XERR('ODESSA - MXSTEP (=I1) .LT. 0',
+     1   12, 1, 1, MXSTEP, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 613   CALL XERR('ODESSA - MXHNIL (=I1) .LT. 0',
+     1   13, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 614   CALL XERR('ODESSA - TOUT (=R1) BEHIND T (=R2)',
+     1   14, 1, 0, 0, 0, 2, TOUT, T)
+      CALL XERR('INTEGRATION DIRECTION IS GIVEN BY H0 (=R1)',
+     1   14, 1, 0, 0, 0, 1, H0, ZERO)
+      GO TO 700
+ 615   CALL XERR('ODESSA - HMAX (=R1) .LT. 0.0',
+     1   15, 1, 0, 0, 0, 1, HMAX, ZERO)
+      GO TO 700
+ 616   CALL XERR('ODESSA - HMIN (=R1) .LT. 0.0',
+     1   16, 1, 0, 0, 0, 1, HMIN, ZERO)
+      GO TO 700
+ 617  CALL XERR('ODESSA - RWORK LENGTH NEEDED, LENRW (=I1), EXCEEDS
+     1 LRW (=I2)', 17, 1, 2, LENRW, LRW, 0, ZERO,ZERO)
+      GO TO 700
+ 618  CALL XERR('ODESSA - IWORK LENGTH NEEDED, LENIW (=I1), EXCEEDS
+     1 LIW (=I2)', 18, 1, 2, LENIW, LIW, 0, ZERO,ZERO)
+      GO TO 700
+ 619   CALL XERR('ODESSA - RTOL(I1) IS R1 .LT. 0.0',
+     1   19, 1, 1, I, 0, 1, RTOLI, ZREO)
+      GO TO 700
+ 620   CALL XERR('ODESSA - ATOL(I1) IS R1 .LT. 0.0',
+     1   20, 1, 1, I, 0, 1, ATOLI, ZERO)
+      GO TO 700
+*
+ 621   EWTI = RWORK(LEWT+I-1)
+      CALL XERR('ODESSA - EWT(I1) IS R1 .LE. 0.0',
+     1   21, 1, 1, I, 0, 1, EWTI, ZERO)
+      GO TO 700
+ 622  CALL XERR('ODESSA - TOUT (=R1) TOO CLOSE TO T(=R2) TO START
+     1 INTEGRATION', 22, 1, 0, 0, 0, 2, TOUT, T)
+      GO TO 700
+ 623  CALL XERR('ODESSA - ITASK = I1 AND TOUT (=R1) BEHIND TCUR - HU
+     1 (= R2)', 23, 1, 1, ITASK, 0, 2, TOUT, TP)
+      GO TO 700
+ 624  CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TCUR
+     1 (=R2)', 24, 1, 0, 0, 0, 2, TCRIT, TN)
+      GO TO 700
+ 625   CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TOUT
+     1 (=R2)', 25, 1, 0, 0, 0, 2, TCRIT, TOUT)
+      GO TO 700
+ 626  CALL XERR('ODESSA - AT START OF PROBLEM, TOO MUCH ACCURACY',
+     1   26, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR('REQUESTED FOR PRECISION OF MACHINE. SEE TOLSF (=R1)',
+     1   26, 1, 0, 0, 0, 1, TOLSF, ZERO)
+      RWORK(14) = TOLSF
+      GO TO 700
+ 627  CALL XERR('ODESSA - TROUBLE FROM INTDY. ITASK = I1, TOUT = R1',
+     1   27, 1, 1, ITASK, 0, 1, TOUT, ZERO)
+      GO TO 700
+C ERROR STATEMENTS ASSOCIATED WITH SENSITIVITY ANALYSIS.
+ 628  CALL XERR('ODESSA - NPAR (=I1) .LT. 1',
+     1   28, 1, 1, NPAR, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 629  CALL XERR('ODESSA - ISTATE = 3 AND NPAR CHANGED (I1 TO I2)',
+     1   29, 1, 2, NP, NPAR, 0, ZERO,ZERO)
+      GO TO 700
+ 630  CALL XERR('ODESSA - MITER (=I1) ILLEGAL',
+     1   30, 1, 1, MITER, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 631  CALL XERR('ODESSA - TROUBLE IN SPRIME (IERPJ)',
+     1   31, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 632  CALL XERR('ODESSA - TROUBLE IN SPRIME (MITER)',
+     1   32, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 633  CALL XERR('ODESSA - FATAL ERROR IN STODE (KFLAG = -3)',
+     1   33, 2, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 801
+C
+ 700   IF (ILLIN .EQ. 5) GO TO 710
+      ILLIN = ILLIN + 1
+      ISTATE = -3
+      RETURN
+ 710  CALL XERR('ODESSA - REPEATED OCCURRENCES OF ILLEGAL INPUT',
+     1   302, 1, 0, 0, 0, 0, ZERO,ZERO)
+C
+ 800  CALL XERR('ODESSA - RUN ABORTED.. APPARENT INFINITE LOOP',
+     1   303, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+ 801  CALL XERR('ODESSA - RUN ABORTED',
+     1   304, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+C-------------------- END OF SUBROUTINE ODESSA -------------------------
+      END
+      DOUBLE PRECISION FUNCTION ADDX(A,B)
+      DOUBLE PRECISION A,B
+C
+C  THIS FUNCTION IS NECESSARY TO FORCE OPTIMIZING COMPILERS TO
+C  EXECUTE AND STORE A SUM, FOR SUCCESSFUL EXECUTION OF THE
+C  TEST A + B = B.
+C
+      ADDX = A + B
+      RETURN
+C-------------------- END OF FUNCTION SUM ------------------------------
+      END
+      SUBROUTINE SPRIME (NEQ, Y, YH, NYH, NROW, NCOL, WM, IWM,
+     1  EWT, SAVF, FTEM, DFDP, PAR, F, JAC, DF, PJAC, PDF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION NEQ(*), Y(*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1  EWT(*), SAVF(*), FTEM(*), DFDP(NROW,*), PAR(*)
+      EXTERNAL F, JAC, DF, PJAC, PDF
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1  RDUM1(37),EL0, H, RDUM2(6),
+     2  IOWND1(14), IOWNS(4),
+     3  IDUM1(3), IERPJ, IDUM2(6),
+     4  MITER, IDUM3(4), N, IDUM4(5)
+      COMMON /ODE002/ RDUM3(3),
+     1  IOWND2(3), IDUM5, NSV, IDUM6, NSPE, IDUM7, IERSP, JOPT, IDUM8
+C-----------------------------------------------------------------------
+C SPRIME IS CALLED BY ODESSA TO INITIALIZE THE YH ARRAY. IT IS ALSO
+C CALLED BY STODE TO REEVALUATE FIRST ORDER DERIVATIVES WHEN KFLAG
+C .LE. -3. SPRIME COMPUTES THE FIRST DERIVATIVES OF THE SENSITIVITY
+C COEFFICIENTS WITH RESPECT TO THE INDEPENDENT VARIABLE T...
+C
+C        SPRIME = D(DY/DP)/DT = JAC*DY/DP + DF/DP
+C                   WHERE JAC = JACOBIAN MATRIX
+C                       DY/DP = SENSITIVITY MATRIX
+C                       DF/DP = INHOMOGENEITY MATRIX
+C THIS ROUTINE USES THE COMMON VARIABLES EL0, H, IERPJ, MITER, N,
+C NSV, NSPE, IERSP, JOPT
+C-----------------------------------------------------------------------
+C CALL PREPJ WITH JOPT = 1.
+C IF MITER = 2 OR 5, EL0 IS TEMPORARILY SET TO -1.0 AND H IS
+C TEMPORARILY SET TO 1.0D0.
+C-----------------------------------------------------------------------
+      NSPE = NSPE + 1
+      JOPT = 1
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 10
+      HTEMP = H
+      ETEMP = EL0
+      H = ONE
+      EL0 = -ONE
+ 10   CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 300
+      JOPT = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 20
+      H = HTEMP
+      EL0 = ETEMP
+C-----------------------------------------------------------------------
+C CALL PREPDF AND LOAD DFDP(*,JPAR).
+C-----------------------------------------------------------------------
+ 20   DO 30 J = 2,NSV
+        JPAR = J - 1
+        CALL PDF (NEQ, Y, WM, SAVF, FTEM, DFDP(1,JPAR), PAR,
+     1     F, DF, JPAR)
+ 30   CONTINUE
+C-----------------------------------------------------------------------
+C COMPUTE JAC*DY/DP AND STORE RESULTS IN YH(*,*,2).
+C-----------------------------------------------------------------------
+      GO TO (40,40,310,100,100) MITER
+C THE JACOBIAN IS FULL.------------------------------------------------
+C FOR EACH ROW OF THE JACOBIAN..
+C 40   DO 70 IROW = 1,N
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+C        DO 60 J = 2,NSV
+C          SUM = ZERO
+C TAKE THE VECTOR DOT PRODUCT..
+C          DO 50 I = 1,N
+C            IPD = IROW + N*(I-1) + 2
+C            SUM = SUM + WM(IPD)*YH(I,J,1)
+C 50       CONTINUE
+C          YH(IROW,J,2) = SUM
+C 60     CONTINUE
+C 70   CONTINUE
+  40  CONTINUE
+C FOR EACH COLUMN OF THE SENSITIVITY MATRIX..
+      DO 60 J = 2,NSV
+        CALL Jac_SP_Vec( WM(3), YH(1,J,1), YH(1,J,2) )
+ 60   CONTINUE
+      GO TO 200
+C THE JACOBIAN IS BANDED.-----------------------------------------------
+ 100  ML = IWM(1)
+      MU = IWM(2)
+      ICOUNT = 1
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      NMU = N - MU
+      ML1 = ML + 1
+C FOR EACH ROW OF THE JACOBIAN..
+      DO 160 IROW = 1,N
+        IF (IROW .GT. ML1) GO TO 110
+        IPD = MBAND + IROW + 1
+        IYH = 1
+        LBAND = MU + IROW
+        GO TO 120
+ 110    ICOUNT = ICOUNT + 1
+        IPD = ICOUNT*MEBAND + 2
+        IYH = IYH + 1
+        LBAND = LBAND - 1
+        IF (IROW .LE. NMU) LBAND = MBAND
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+ 120    DO 150 J = 2,NSV
+          SUM = ZERO
+          I1 = IPD
+          I2 = IYH
+C TAKE THE VECTOR DOT PRODUCT.
+          DO 140 I = 1,LBAND
+            SUM = SUM + WM(I1)*YH(I2,J,1)
+            I1 = I1 + MEBAND - 1
+            I2 = I2 + 1
+ 140      CONTINUE
+          YH(IROW,J,2) = SUM
+ 150    CONTINUE
+ 160  CONTINUE
+C-----------------------------------------------------------------------
+C ADD THE INHOMOGENEITY TERM, I.E., ADD DFDP(*,JPAR) TO YH(*,JPAR+1,2).
+C-----------------------------------------------------------------------
+ 200  DO 220 J = 2,NSV
+        JPAR = J - 1
+        DO 210 I = 1,N
+          YH(I,J,2) = YH(I,J,2) + DFDP(I,JPAR)
+ 210    CONTINUE
+ 220  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C ERROR RETURNS.
+C-----------------------------------------------------------------------
+ 300  IERSP = -1
+      RETURN
+ 310  IERSP = -2
+      RETURN
+C------------------------END OF SUBROUTINE SPRIME-----------------------
+      END
+      SUBROUTINE PREPJ (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, FUNC_CHEM, JAC, JOPT)
+C      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), FTEM(*), PAR(*)
+      EXTERNAL FUNC_CHEM, JAC
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(4), TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(3), IERPJ, IDUM2, JCUR, IDUM3(4),
+     5   MITER, IDUM4(4), N, IDUM5(2), NFE, NJE, IDUM6
+C-----------------------------------------------------------------------
+C PREPJ IS CALLED BY STODE TO COMPUTE AND PROCESS THE MATRIX
+C P = I - H*EL(1)*J , WHERE J IS AN APPROXIMATION TO THE JACOBIAN.
+C IF ISOPT = 1, PREPJ IS ALSO CALLED BY SPRIME WITH JOPT = 1.
+C HERE J IS COMPUTED BY THE USER-SUPPLIED ROUTINE JAC IF
+C MITER = 1 OR 4, OR BY FINITE DIFFERENCING IF MITER = 2, 3, OR 5.
+C IF MITER = 3, A DIAGONAL APPROXIMATION TO J IS USED.
+C J IS STORED IN WM AND REPLACED BY P.  IF MITER .NE. 3, P IS THEN
+C SUBJECTED TO LU DECOMPOSITION (JOPT = 0) IN PREPARATION FOR LATER
+C SOLUTION OF LINEAR SYSTEMS WITH P AS COEFFICIENT MATRIX. THIS IS
+C DONE BY DGEFA IF MITER = 1 OR 2, AND BY DGBFA IF MITER = 4 OR 5.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH PREPJ USES THE FOLLOWING..
+C Y     = ARRAY CONTAINING PREDICTED VALUES ON ENTRY.
+C FTEM  = WORK ARRAY OF LENGTH N (ACOR IN STODE).
+C SAVF  = ARRAY CONTAINING F EVALUATED AT PREDICTED Y.
+C WM    = REAL WORK SPACE FOR MATRICES.  ON OUTPUT IT CONTAINS THE
+C         INVERSE DIAGONAL MATRIX IF MITER = 3 AND THE LU DECOMPOSITION
+C         OF P IF MITER IS 1, 2 , 4, OR 5.
+C         STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C         WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C         WM(1) = SQRT(UROUND), USED IN NUMERICAL JACOBIAN INCREMENTS.
+C         WM(2) = H*EL0, SAVED FOR LATER USE IF MITER = 3.
+C IWM   = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C         IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C         PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C EL0   = EL(1) (INPUT).
+C IERPJ = OUTPUT ERROR FLAG,  = 0 IF NO TROUBLE, .GT. 0 IF
+C         P MATRIX FOUND TO BE SINGULAR.
+C JCUR  = OUTPUT FLAG = 1 TO INDICATE THAT THE JACOBIAN MATRIX
+C         (OR APPROXIMATION) IS NOW CURRENT.
+C JOPT  = INPUT JACOBIAN OPTION, = 1 IF JAC IS DESIRED ONLY.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, UROUND,
+C IERPJ, JCUR, MITER, N, NFE, AND NJE.
+C-----------------------------------------------------------------------
+      NJE = NJE + 1
+      IERPJ = 0
+      JCUR = 1
+      HL0 = H*EL0
+      GO TO (100, 200, 300, 400, 500), MITER
+C IF MITER = 1, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+C 100   LENP = N*N
+ 100   LENP = LU_NONZERO
+      DO 110 I = 1,LU_NONZERO
+ 110    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, 0, 0, WM(3), N)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 120 I = 1,LU_NONZERO
+ 120    WM(I+2) = WM(I+2)*CON
+      GO TO 240
+C IF MITER = 2, MAKE N CALLS TO F TO APPROXIMATE J. --------------------
+ 200   FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      SRUR = WM(1)
+      J1 = 2
+      DO 230 J = 1,N
+        YJ = Y(J)
+        R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+        Y(J) = Y(J) + R
+        FAC = -HL0/R
+        CALL FUNC_CHEM (NEQ, TN, Y, PAR, FTEM)
+        DO 220 I = 1,N
+ 220      WM(I+J1) = (FTEM(I) - SAVF(I))*FAC
+        Y(J) = YJ
+        J1 = J1 + N
+ 230    CONTINUE
+      NFE = NFE + N
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 240   J = 3
+C      DO 250 I = 1,N
+C        WM(J) = WM(J) + ONE
+C 250    J = J + (N + 1)
+      DO 250 I = 1,NVAR
+ 250       WM(2+LU_DIAG(I)) = WM(2+LU_DIAG(I)) + ONE
+C DO LU DECOMPOSITION ON P. --------------------------------------------
+C      CALL DGEFA (WM(3), N, N, IWM(21), IER)
+      CALL KppDecomp (WM(3), IER)
+      IF (IER .NE. 0) THEN
+           IERPJ = 1
+	   PRINT*,"Singular Matrix"
+	   STOP
+      END IF
+      RETURN
+C IF MITER = 3, CONSTRUCT A DIAGONAL APPROXIMATION TO J AND P. ---------
+ 300   WM(2) = HL0
+      R = EL0*0.1D0
+      DO 310 I = 1,N
+ 310    Y(I) = Y(I) + R*(H*SAVF(I) - YH(I,2))
+      CALL FUNC_CHEM (NEQ, TN, Y, PAR, WM(3))
+      NFE = NFE + 1
+      DO 320 I = 1,N
+        R0 = H*SAVF(I) - YH(I,2)
+        DI = 0.1D0*R0 - H*(WM(I+2) - SAVF(I))
+        WM(I+2) = 1.0D0
+        IF (ABS(R0) .LT. UROUND/EWT(I)) GO TO 320
+        IF (ABS(DI) .EQ. ZERO) GO TO 330
+        WM(I+2) = 0.1D0*R0/DI
+ 320    CONTINUE
+      RETURN
+ 330   IERPJ = 1
+      RETURN
+C IF MITER = 4, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      ML3 = ML + 3
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      LENP = MEBAND*N
+      DO 410 I = 1,LENP
+ 410    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, ML, MU, WM(ML3), MEBAND)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 420 I = 1,LENP
+ 420    WM(I+2) = WM(I+2)*CON
+      GO TO 570
+C IF MITER = 5, MAKE MBAND CALLS TO F TO APPROXIMATE J. ----------------
+ 500   ML = IWM(1)
+      MU = IWM(2)
+      MBAND = ML + MU + 1
+      MBA = MIN(MBAND,N)
+      MEBAND = MBAND + ML
+      MEB1 = MEBAND - 1
+      SRUR = WM(1)
+      FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      DO 560 J = 1,MBA
+        DO 530 I = J,N,MBAND
+          YI = Y(I)
+          R = MAX(SRUR*ABS(YI),R0/EWT(I))
+ 530      Y(I) = Y(I) + R
+        CALL FUNC_CHEM (NEQ, TN, Y, PAR, FTEM)
+        DO 550 JJ = J,N,MBAND
+          Y(JJ) = YH(JJ,1)
+          YJJ = Y(JJ)
+          R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+          FAC = -HL0/R
+          I1 = MAX(JJ-MU,1)
+          I2 = MIN(JJ+ML,N)
+          II = JJ*MEB1 - ML + 2
+          DO 540 I = I1,I2
+ 540        WM(II+I) = (FTEM(I) - SAVF(I))*FAC
+ 550      CONTINUE
+ 560    CONTINUE
+      NFE = NFE + MBA
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 570   II = MBAND + 2
+      DO 580 I = 1,N
+        WM(II) = WM(II) + ONE
+ 580    II = II + MEBAND
+C DO LU DECOMPOSITION OF P. --------------------------------------------
+      CALL DGBFA (WM(3), MEBAND, N, ML, MU, IWM(21), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C----------------------- END OF SUBROUTINE PREPJ -----------------------
+      END
+      SUBROUTINE PREPDF (NEQ, Y, SRUR, SAVF, FTEM, DFDP, PAR,
+     1   F, DF, JPAR)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, DF
+      DIMENSION NEQ(*), Y(*), SAVF(*), FTEM(*), DFDP(*), PAR(*)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   RDUM1(43), TN, RDUM2,
+     2   IOWND1(14), IOWNS(4),
+     3   IDUM1(10), MITER, IDUM2(4), N, IDUM3(2), NFE, IDUM4(2)
+      COMMON /ODE002/ RDUM3(3),
+     1   IOWND2(3), IDUM5(2), NDFE, IDUM6, IDF, IDUM7(3)
+C-----------------------------------------------------------------------
+C PREPDF IS CALLED BY SPRIME AND STESA TO COMPUTE THE INHOMOGENEITY
+C VECTORS DF(I)/DP(JPAR). HERE DF/DP IS COMPUTED BY THE USER-SUPPLIED
+C ROUTINE DF IF IDF = 1, OR BY FINITE DIFFERENCING IF IDF = 0.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION WITH
+C PREPDF USES THE FOLLOWING..
+C Y     = REAL ARRAY OF LENGTH NYH CONTAINING DEPENDENT VARIABLES.
+C         PREPDF USES ONLY THE FIRST N ENTRIES OF Y(*).
+C SRUR  = SQRT(UROUND) (= WM(1)).
+C SAVF  = REAL ARRAY OF LENGTH N CONTAINING DERIVATIVES DY/DT.
+C FTEM  = REAL ARRAY OF LENGTH N USED TO TEMPORARILY STORE DY/DT FOR
+C         NUMERICAL DIFFERENTIATION.
+C DFDP  = REAL ARRAY OF LENGTH N USED TO STORE DF(I)/DP(JPAR), I = 1,N.
+C PAR   = REAL ARRAY OF LENGTH NPAR CONTAINING EQUATION PARAMETERS
+C         OF INTEREST.
+C JPAR  = INPUT PARAMETER, 2 .LE. JPAR .LE. NSV, DESIGNATING THE
+C         APPROPRIATE SOLUTION VECTOR CORRESPONDING TO PAR(JPAR).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES TN, MITER, N, NFE, NDFE,
+C AND IDF.
+C-----------------------------------------------------------------------
+      NDFE = NDFE + 1
+      IDF1 = IDF + 1
+      GO TO (100, 200), IDF1
+C IDF = 0, CALL F TO APPROXIMATE DFDP. ---------------------------------
+ 100  RPAR = PAR(JPAR)
+      R = MAX(SRUR*ABS(RPAR),SRUR)
+      PAR(JPAR) = RPAR + R
+      FAC = 1.0D0/R
+      CALL F (NEQ, TN, Y, PAR, FTEM)
+      DO 110 I = 1,N
+ 110    DFDP(I) = (FTEM(I) - SAVF(I))*FAC
+      PAR(JPAR) = RPAR
+      NFE = NFE + 1
+      RETURN
+C IDF = 1, CALL USER SUPPLIED DF. --------------------------------------
+ 200  DO 210 I = 1,N
+ 210    DFDP(I) = 0.0D0
+      CALL DF (NEQ, TN, Y, PAR, DFDP, JPAR)
+      RETURN
+C -------------------- END OF SUBROUTINE PREPDF ------------------------
+      END
+      SUBROUTINE INTDY (T, K, YH, NYH, DKY, IFLAG)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION YH(NYH,1), DKY(1)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(38),H, RDUM2(2), HU, RDUM3, TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(8), L, IDUM2,
+     5   IDUM3(5), N, NQ, IDUM4(4)
+C-----------------------------------------------------------------------
+C INTDY COMPUTES INTERPOLATED VALUES OF THE K-TH DERIVATIVE OF THE
+C DEPENDENT VARIABLE VECTOR Y, AND STORES IT IN DKY.  THIS ROUTINE
+C IS CALLED WITHIN THE PACKAGE WITH K = 0 AND T = TOUT, BUT MAY
+C ALSO BE CALLED BY THE USER FOR ANY K UP TO THE CURRENT ORDER.
+C (SEE DETAILED INSTRUCTIONS IN THE USAGE DOCUMENTATION.)
+C-----------------------------------------------------------------------
+C THE COMPUTED VALUES IN DKY ARE GOTTEN BY INTERPOLATION USING THE
+C NORDSIECK HISTORY ARRAY YH.  THIS ARRAY CORRESPONDS UNIQUELY TO A
+C VECTOR-VALUED POLYNOMIAL OF DEGREE NQCUR OR LESS, AND DKY IS SET
+C TO THE K-TH DERIVATIVE OF THIS POLYNOMIAL AT T.
+C THE FORMULA FOR DKY IS..
+C             Q
+C  DKY(I)  =  SUM  C(J,K) * (T - TN)**(J-K) * H**(-J) * YH(I,J+1)
+C            J=K
+C WHERE  C(J,K) = J*(J-1)*...*(J-K+1), Q = NQCUR, TN = TCUR, H = HCUR.
+C THE QUANTITIES  NQ = NQCUR, L = NQ+1, N = NEQ, TN, AND H ARE
+C COMMUNICATED BY COMMON.  THE ABOVE SUM IS DONE IN REVERSE ORDER.
+C IFLAG IS RETURNED NEGATIVE IF EITHER K OR T IS OUT OF BOUNDS.
+C-----------------------------------------------------------------------
+      IFLAG = 0
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
+      TP = TN - HU*(1.0D0 + 100.0D0*UROUND)
+      IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90
+C
+      S = (T - TN)/H
+      IC = 1
+      IF (K .EQ. 0) GO TO 15
+      JJ1 = L - K
+      DO 10 JJ = JJ1,NQ
+ 10     IC = IC*JJ
+ 15   C = REAL(IC)
+      DO 20 I = 1,NYH
+ 20     DKY(I) = C*YH(I,L)
+      IF (K .EQ. NQ) GO TO 55
+      JB2 = NQ - K
+      DO 50 JB = 1,JB2
+        J = NQ - JB
+        JP1 = J + 1
+        IC = 1
+        IF (K .EQ. 0) GO TO 35
+        JJ1 = JP1 - K
+        DO 30 JJ = JJ1,J
+ 30       IC = IC*JJ
+ 35     C = REAL(IC)
+        DO 40 I = 1,NYH
+ 40       DKY(I) = C*YH(I,JP1) + S*DKY(I)
+ 50     CONTINUE
+      IF (K .EQ. 0) RETURN
+ 55   R = H**(-K)
+      DO 60 I = 1,NYH
+ 60     DKY(I) = R*DKY(I)
+      RETURN
+C
+ 80   CALL XERR('INTDY--  K (=I1) ILLEGAL',
+     1  51, 1, 1, K, 0, 0, ZERO,ZERO)
+      IFLAG = -1
+      RETURN
+ 90   CALL XERR ('INTDY--  T (=R1) ILLEGAL',
+     1   52, 1, 0, 0, 0, 1, T, ZERO)
+      CALL XERR('T NOT IN INTERVAL TCUR - HU (= R1) TO TCUR (=R2)',
+     1   52, 1, 0, 0, 0, 2, TP, TN)
+      IFLAG = -2
+      RETURN
+C----------------------- END OF SUBROUTINE INTDY -----------------------
+      END
+      SUBROUTINE STESA (NEQ, Y, NROW, NCOL, YH, WM, IWM, EWT, SAVF,
+     1   ACOR, PAR, NRS, F, JAC, DF, PJAC, PDF, KppSolve)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, KppSolve
+      DIMENSION NEQ(*), Y(NROW,*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1   EWT(NROW,*), SAVF(*), ACOR(NROW,*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   TESCO(3,12), RDUM1, EL0, H, RDUM2(4), TN, RDUM3,
+     2   IOWND1(14), IOWNS(4),
+     3   IALTH, LMAX, IDUM1, IERPJ, IERSL, JCUR, IDUM2, KFLAG, L, IDUM3,
+     4   MITER, IDUM4(4), N, NQ, IDUM5, NFE, IDUM6(2)
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), IDUM7, NSV, IDUM8(2), IDF, IDUM9, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STESA IS CALLED BY STODE TO PERFORM AN EXPLICIT CALCULATION FOR THE
+C FIRST-ORDER SENSITIVITY COEFFICIENTS DY(I)/DP(J), I = 1,N; J = 1,NPAR.
+C
+C IN ADDITION TO THE VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH STESA USES THE FOLLOWING..
+C Y      = AN NROW (=N) BY NCOL (=NSV) REAL ARRAY CONTAINING THE
+C          CORRECTED DEPENDENT VARIABLES ON OUTPUT..
+C                  Y(I,1) , I = 1,N = STATE VARIABLES (INPUT);
+C                  Y(I,J) , I = 1,N , J = 2,NSV ,
+C                           = SENSITIVITY COEFFICIENTS, DY(I)/DP(J).
+C YH     = AN N BY NSV BY LMAX REAL ARRAY CONTAINING THE PREDICTED
+C          DEPENDENT VARIABLES AND THEIR APPROXIMATE SCALED DERIVATIVES.
+C SAVF   = A REAL ARRAY OF LENGTH N USED TO STORE FIRST DERIVATIVES
+C          OF DEPENDENT VARIABLES IF MITER = 2 OR 5.
+C PAR    = A REAL ARRAY OF LENGTH NPAR CONTAINING THE EQUATION
+C          PARAMETERS OF INTEREST.
+C NRS    = AN INTEGER ARRAY OF LENGTH NPAR + 1 CONTAINING THE NUMBER
+C          OF REPEATED STEPS (KFLAGS .LT. 0) DUE TO THE SENSITIVITY
+C          CALCULATIONS..
+C                  NRS(1) = TOTAL NUMBER OF REPEATED STEPS
+C                  NRS(I) , I = 2,NPAR = NUMBER OF REPEATED STEPS DUE
+C                                        TO PARAMETER I.
+C NSV    = NUMBER OF SOLUTION VECTORS = NPAR + 1.
+C KFLAGS = LOCAL ERROR TEST FLAG, = 0 IF TEST PASSES, .LT. 0 IF TEST
+C          FAILS, AND STEP NEEDS TO BE REPEATED. ERROR TEST IS APPLIED
+C          TO EACH SOLUTION VECTOR INDEPENDENTLY.
+C DUPS, DSMS, DDNS = REAL SCALARS USED FOR COMPUTING RHUP, RHSM, RHDN,
+C                    ON RETURN TO STODE (IALTH .EQ. 1).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, IALTH, LMAX,
+C IERPJ, IERSL, JCUR, KFLAG, L, MITER, N, NQ, NFE, AND JOPT.
+C-----------------------------------------------------------------------
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      HL0 = H*EL0
+      EL0I = ONE/EL0
+      TI2 = ONE/TESCO(2,NQ)
+      TI3 = ONE/TESCO(3,NQ)
+C IF MITER = 2 OR 5 (OR IDF = 0), SUPPLY DERIVATIVES AT CORRECTED
+C Y(*,1) VALUES FOR NUMERICAL DIFFERENTIATION IN PJAC AND/OR PDF.
+      IF (MITER .EQ. 2  .OR.  MITER .EQ. 5  .OR.  IDF .EQ. 0)  GO TO 10
+      GO TO 15
+ 10   CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+C IF JCUR = 0, UPDATE THE JACOBIAN MATRIX.
+C IF MITER = 5, LOAD CORRECTED Y(*,1) VALUES INTO Y(*,2).
+ 15   IF (JCUR .EQ. 1) GO TO 30
+      IF (MITER .NE. 5) GO TO 25
+      DO 20 I = 1,N
+ 20     Y(I,2) = Y(I,1)
+ 25   CALL PJAC (NEQ, Y, Y(1,2), N, WM, IWM, EWT, SAVF, ACOR(1,2),
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) RETURN
+C-----------------------------------------------------------------------
+C THIS IS A LOOPING POINT FOR THE SENSITIVITY CALCULATIONS.
+C-----------------------------------------------------------------------
+C FOR EACH PARAMETER PAR(*), A SENSITIVITY SOLUTION VECTOR IS COMPUTED
+C USING THE SAME STEP SIZE (H) AND ORDER (NQ) AS IN STODE.
+C A LOCAL ERROR TEST IS APPLIED INDEPENDENTLY TO EACH SOLUTION VECTOR.
+C-----------------------------------------------------------------------
+ 30   DO 100 J = 2,NSV
+        JPAR = J - 1
+C EVALUATE INHOMOGENEITY TERM, TEMPORARILY LOAD INTO Y(*,JPAR+1). ------
+        CALL PDF(NEQ, Y, WM, SAVF, ACOR(1,J), Y(1,J), PAR,
+     1     F, DF, JPAR)
+C-----------------------------------------------------------------------
+C LOAD RHS OF SENSITIVITY SOLUTION (CORRECTOR) EQUATION..
+C
+C       RHS = DY/DP - EL(1)*H*D(DY/DP)/DT + EL(1)*H*DF/DP
+C
+C-----------------------------------------------------------------------
+        DO 40 I = 1,N
+ 40       Y(I,J) = YH(I,J,1) - EL0*YH(I,J,2) + HL0*Y(I,J)
+C-----------------------------------------------------------------------
+C KppSolve CORRECTOR EQUATION: THE SOLUTIONS ARE LOCATED IN Y(*,JPAR+1).
+C THE EXPLICIT FORMULA IS..
+C
+C       (I - EL(1)*H*JAC) * DY/DP(CORRECTED) = RHS
+C
+C-----------------------------------------------------------------------
+        CALL KppSolve (WM, IWM, Y(1,J), DUM)
+        IF (IERSL .NE. 0) RETURN
+C ESTIMATE LOCAL TRUNCATION ERROR. -------------------------------------
+        DO 50 I = 1,N
+ 50       ACOR(I,J) = (Y(I,J) - YH(I,J,1))*EL0I
+        ERR = VNORM(N, ACOR(1,J), EWT(1,J))*TI2
+        IF (ERR .GT. ONE) GO TO 200
+C-----------------------------------------------------------------------
+C LOCAL ERROR TEST PASSED. SET KFLAGS TO 0 TO INDICATE THIS.
+C IF IALTH = 1, COMPUTE DSMS, DDNS, AND DUPS (IF L .LT. LMAX).
+C-----------------------------------------------------------------------
+        KFLAGS = 0
+        IF (IALTH .GT. 1) GO TO 100
+        IF (L .EQ. LMAX) GO TO 70
+        DO 60 I= 1,N
+ 60       Y(I,J) = ACOR(I,J) - YH(I,J,LMAX)
+        DUPS = MAX(DUPS,VNORM(N,Y(1,J),EWT(1,J))*TI3)
+ 70     DSMS = MAX(DSMS,ERR)
+ 100  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C THIS SECTION IS REACHED IF THE ERROR TOLERANCE FOR SENSITIVITY
+C SOLUTION VECTOR JPAR HAS BEEN VIOLATED. KFLAGS IS MADE NEGATIVE TO
+C INDICATE THIS. IF KFLAGS = -1, SET KFLAG EQUAL TO ZERO SO THAT KFLAG
+C IS SET TO -1 ON RETURN TO STODE BEFORE REPEATING THE STEP.
+C INCREMENT NRS(1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO ALL
+C SENSITIVITY SOLUTION VECTORS) BY ONE.
+C INCREMENT NRS(JPAR+1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO
+C SOLUTION VECTOR JPAR+1) BY ONE.
+C LOAD DSMS FOR RH CALCULATION IN STODE.
+C-----------------------------------------------------------------------
+ 200  KFLAGS = KFLAGS - 1
+      IF (KFLAGS .EQ. -1) KFLAG = 0
+      NRS(1) = NRS(1) + 1
+      NRS(J) = NRS(J) + 1
+      DSMS = ERR
+      RETURN
+C------------------------ END OF SUBROUTINE STESA ----------------------
+      END
+      SUBROUTINE STODE (NEQ, Y, YH, NYH, YH1, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, SLVS
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), YH1(*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), ACOR(*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND,
+     1   CONIT, CRATE, EL(13), ELCO(13,12), HOLD, RMAX,
+     2   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     3   IOWND1(14), IPUP, MEO, NQNYH, NSLP,
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STODE PERFORMS ONE STEP OF THE INTEGRATION OF AN INITIAL VALUE
+C PROBLEM FOR A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS.
+C NOTE.. STODE IS INDEPENDENT OF THE VALUE OF THE ITERATION METHOD
+C INDICATOR MITER, WHEN THIS IS .NE. 0, AND HENCE IS INDEPENDENT
+C OF THE TYPE OF CHORD METHOD USED, OR THE JACOBIAN STRUCTURE.
+C FOR ISOPT = 1, STODE CALLS STESA FOR SENSITIVITY CALCULATIONS.
+C VARIABLES USED FOR COMMUNICATION WITH STESA ARE DESCRIBED IN STESA.
+C COMMUNICATION WITH STODE IS DONE WITH THE FOLLOWING VARIABLES..
+C
+C NEQ   = INTEGER ARRAY CONTAINING PROBLEM SIZE IN NEQ(1), AND
+C         NUMBER OF PARAMETERS TO BE CONSIDERED IN THE SENSITIVITY
+C         ANALYSIS NEQ(2) (FOR ISOPT = 1), AND PASSED AS THE
+C         NEQ ARGUMENT IN ALL CALLS TO F,  JAC, AND DF.
+C Y     = AN ARRAY OF LENGTH .GE. N USED AS THE Y ARGUMENT IN
+C         ALL CALLS TO F, JAC, AND DF.
+C YH    = AN NYH BY LMAX ARRAY CONTAINING THE DEPENDENT VARIABLES
+C         AND THEIR APPROXIMATE SCALED DERIVATIVES, WHERE
+C         LMAX = MAXORD + 1.  YH(I,J+1) CONTAINS THE APPROXIMATE
+C         J-TH DERIVATIVE OF Y(I), SCALED BY H**J/FACTORIAL(J)
+C         (J = 0,1,...,NQ).  ON ENTRY FOR THE FIRST STEP, THE FIRST
+C         TWO COLUMNS OF YH MUST BE SET FROM THE INITIAL VALUES.
+C NYH   = A CONSTANT INTEGER .GE. N, THE FIRST DIMENSION OF YH.
+C         THE TOTAL NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS..
+C         NYH = N, ISOPT = 0,
+C         NYH = N * (NPAR + 1), ISOPT = 1
+C YH1   = A ONE-DIMENSIONAL ARRAY OCCUPYING THE SAME SPACE AS YH.
+C EWT   = AN ARRAY OF LENGTH NYH CONTAINING MULTIPLICATIVE WEIGHTS
+C         FOR LOCAL ERROR MEASUREMENTS.  LOCAL ERRORS IN Y(I) ARE
+C         COMPARED TO 1.0/EWT(I) IN VARIOUS ERROR TESTS.
+C SAVF  = AN ARRAY OF WORKING STORAGE, OF LENGTH N.
+C         ALSO USED FOR INPUT OF YH(*,MAXORD+2) WHEN JSTART = -1
+C         AND MAXORD .LT. THE CURRENT ORDER NQ.
+C ACOR  = A WORK ARRAY OF LENGTH NYH, USED FOR THE ACCUMULATED
+C         CORRECTIONS.  ON A SUCCESSFUL RETURN, ACOR(I) CONTAINS
+C         THE ESTIMATED ONE-STEP LOCAL ERROR IN Y(I).
+C WM,IWM = REAL AND INTEGER WORK ARRAYS ASSOCIATED WITH MATRIX
+C         OPERATIONS IN CHORD ITERATION (MITER .NE. 0).
+C PJAC  = NAME OF ROUTINE TO EVALUATE AND PREPROCESS JACOBIAN MATRIX
+C         AND P = I - H*EL0*JAC, IF A CHORD METHOD IS BEING USED.
+C         IF ISOPT = 1, PJAC CAN BE CALLED TO CALCULATE JAC BY
+C         SETTING JOPT = 1.
+C SLVS  = NAME OF ROUTINE TO KppSolve LINEAR SYSTEM IN CHORD ITERATION.
+C CCMAX  = MAXIMUM RELATIVE CHANGE IN H*EL0 BEFORE PJAC IS CALLED.
+C H     = THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C         H IS ALTERED BY THE ERROR CONTROL ALGORITHM DURING THE
+C         PROBLEM.  H CAN BE EITHER POSITIVE OR NEGATIVE, BUT ITS
+C         SIGN MUST REMAIN CONSTANT THROUGHOUT THE PROBLEM.
+C HMIN  = THE MINIMUM ABSOLUTE VALUE OF THE STEP SIZE H TO BE USED.
+C HMXI  = INVERSE OF THE MAXIMUM ABSOLUTE VALUE OF H TO BE USED.
+C         HMXI = 0.0 IS ALLOWED AND CORRESPONDS TO AN INFINITE HMAX.
+C         HMIN AND HMXI MAY BE CHANGED AT ANY TIME, BUT WILL NOT
+C         TAKE EFFECT UNTIL THE NEXT CHANGE OF H IS CONSIDERED.
+C TN    = THE INDEPENDENT VARIABLE. TN IS UPDATED ON EACH STEP TAKEN.
+C JSTART = AN INTEGER USED FOR INPUT ONLY, WITH THE FOLLOWING
+C         VALUES AND MEANINGS..
+C              0  PERFORM THE FIRST STEP.
+C          .GT.0  TAKE A NEW STEP CONTINUING FROM THE LAST.
+C             -1  TAKE THE NEXT STEP WITH A NEW VALUE OF H, MAXORD,
+C                   N, METH, OR MITER.
+C             -2  TAKE THE NEXT STEP WITH A NEW VALUE OF H,
+C                   BUT WITH OTHER INPUTS UNCHANGED.
+C         ON RETURN, JSTART IS SET TO 1 TO FACILITATE CONTINUATION.
+C KFLAG  = A COMPLETION CODE WITH THE FOLLOWING MEANINGS..
+C              0  THE STEP WAS SUCCESFUL.
+C             -1  THE REQUESTED ERROR COULD NOT BE ACHIEVED.
+C             -2  CORRECTOR CONVERGENCE COULD NOT BE ACHIEVED.
+C             -3  FATAL ERROR IN PJAC, OR SLVS, (OR STESA).
+C         A RETURN WITH KFLAG = -1 OR -2 MEANS EITHER
+C         ABS(H) = HMIN OR 10 CONSECUTIVE FAILURES OCCURRED.
+C         ON A RETURN WITH KFLAG NEGATIVE, THE VALUES OF TN AND
+C         THE YH ARRAY ARE AS OF THE BEGINNING OF THE LAST
+C         STEP, AND H IS THE LAST STEP SIZE ATTEMPTED.
+C MAXORD = THE MAXIMUM ORDER OF INTEGRATION METHOD TO BE ALLOWED.
+C MAXCOR = THE MAXIMUM NUMBER OF CORRECTOR ITERATIONS ALLOWED.
+C          (= 3, IF ISOPT = 0)
+C          (= 4, IF ISOPT = 1)
+C MSBP  = MAXIMUM NUMBER OF STEPS BETWEEN PJAC CALLS (MITER .GT. 0).
+C         IF ISOPT = 1, PJAC IS CALLED AT LEAST ONCE EVERY STEP.
+C MXNCF  = MAXIMUM NUMBER OF CONVERGENCE FAILURES ALLOWED.
+C METH/MITER = THE METHOD FLAGS.  SEE DESCRIPTION IN DRIVER.
+C N     = THE NUMBER OF FIRST-ORDER MODEL DIFFERENTIAL EQUATIONS.
+C-----------------------------------------------------------------------
+      KFLAG = 0
+      KFLAGS = 0
+      TOLD = TN
+      NCF = 0
+      IERPJ = 0
+      IERSL = 0
+      JCUR = 0
+      ICF = 0
+      IF (JSTART .GT. 0) GO TO 200
+      IF (JSTART .EQ. -1) GO TO 100
+      IF (JSTART .EQ. -2) GO TO 160
+C-----------------------------------------------------------------------
+C ON THE FIRST CALL, THE ORDER IS SET TO 1, AND OTHER VARIABLES ARE
+C INITIALIZED.  RMAX IS THE MAXIMUM RATIO BY WHICH H CAN BE INCREASED
+C IN A SINGLE STEP.  IT IS INITIALLY 1.E4 TO COMPENSATE FOR THE SMALL
+C INITIAL H, BUT THEN IS NORMALLY EQUAL TO 10.  IF A FAILURE
+C OCCURS (IN CORRECTOR CONVERGENCE OR ERROR TEST), RMAX IS SET AT 2
+C FOR THE NEXT INCREASE.
+C THESE COMPUTATIONS CONSIDER ONLY THE ORIGINAL SOLUTION VECTOR.
+C THE SENSITIVITY SOLUTION VECTORS ARE CONSIDERED IN STESA (ISOPT = 1).
+C-----------------------------------------------------------------------
+      LMAX = MAXORD + 1
+      NQ = 1
+      L = 2
+      IALTH = 2
+      RMAX = 10000.0D0
+      RC = ZERO
+      EL0 = ONE
+      CRATE = 0.7D0
+      DELP = ZERO
+      HOLD = H
+      MEO = METH
+      NSLP = 0
+      IPUP = MITER
+      IRET = 3
+      GO TO 140
+C-----------------------------------------------------------------------
+C THE FOLLOWING BLOCK HANDLES PRELIMINARIES NEEDED WHEN JSTART = -1.
+C IPUP IS SET TO MITER TO FORCE A MATRIX UPDATE.
+C IF AN ORDER INCREASE IS ABOUT TO BE CONSIDERED (IALTH = 1),
+C IALTH IS RESET TO 2 TO POSTPONE CONSIDERATION ONE MORE STEP.
+C IF THE CALLER HAS CHANGED METH, CFODE IS CALLED TO RESET
+C THE COEFFICIENTS OF THE METHOD.
+C IF THE CALLER HAS CHANGED MAXORD TO A VALUE LESS THAN THE CURRENT
+C ORDER NQ, NQ IS REDUCED TO MAXORD, AND A NEW H CHOSEN ACCORDINGLY.
+C IF H IS TO BE CHANGED, YH MUST BE RESCALED.
+C IF H OR METH IS BEING CHANGED, IALTH IS RESET TO L = NQ + 1
+C TO PREVENT FURTHER CHANGES IN H FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 100   IPUP = MITER
+      LMAX = MAXORD + 1
+      IF (IALTH .EQ. 1) IALTH = 2
+      IF (METH .EQ. MEO) GO TO 110
+      CALL CFODE (METH, ELCO, TESCO)
+      MEO = METH
+      IF (NQ .GT. MAXORD) GO TO 120
+      IALTH = L
+      IRET = 1
+      GO TO 150
+ 110   IF (NQ .LE. MAXORD) GO TO 160
+ 120   NQ = MAXORD
+      L = LMAX
+      DO 125 I = 1,L
+ 125    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      DDN = VNORM (N, SAVF, EWT)/TESCO(1,L)
+      EXDN = ONE/REAL(L)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+      RH = MIN(RHDN,ONE)
+      IREDO = 3
+      IF (H .EQ. HOLD) GO TO 170
+      RH = MIN(RH,ABS(H/HOLD))
+      H = HOLD
+      GO TO 175
+C-----------------------------------------------------------------------
+C CFODE IS CALLED TO GET ALL THE INTEGRATION COEFFICIENTS FOR THE
+C CURRENT METH.  THEN THE EL VECTOR AND RELATED CONSTANTS ARE RESET
+C WHENEVER THE ORDER NQ IS CHANGED, OR AT THE START OF THE PROBLEM.
+C-----------------------------------------------------------------------
+ 140   CALL CFODE (METH, ELCO, TESCO)
+ 150   DO 155 I = 1,L
+ 155    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      GO TO (160, 170, 200), IRET
+C-----------------------------------------------------------------------
+C IF H IS BEING CHANGED, THE H RATIO RH IS CHECKED AGAINST
+C RMAX, HMIN, AND HMXI, AND THE YH ARRAY RESCALED.  IALTH IS SET TO
+C L = NQ + 1 TO PREVENT A CHANGE OF H FOR THAT MANY STEPS, UNLESS
+C FORCED BY A CONVERGENCE OR ERROR TEST FAILURE.
+C-----------------------------------------------------------------------
+ 160  IF (H .EQ. HOLD) GO TO 200
+      RH = H/HOLD
+      H = HOLD
+      IREDO = 3
+      GO TO 175
+ 170   RH = MAX(RH,HMIN/ABS(H))
+ 175   RH = MIN(RH,RMAX)
+      RH = RH/MAX(ONE,ABS(H)*HMXI*RH)
+      R = ONE
+      DO 180 J = 2,L
+        R = R*RH
+        DO 180 I = 1,NYH
+ 180      YH(I,J) = YH(I,J)*R
+      H = H*RH
+      RC = RC*RH
+      IALTH = L
+      IF (IREDO .EQ. 0) GO TO 690
+C-----------------------------------------------------------------------
+C THIS SECTION COMPUTES THE PREDICTED VALUES BY EFFECTIVELY
+C MULTIPLYING THE YH ARRAY BY THE PASCAL TRIANGLE MATRIX.
+C RC IS THE RATIO OF NEW TO OLD VALUES OF THE COEFFICIENT  H*EL(1).
+C WHEN RC DIFFERS FROM 1 BY MORE THAN CCMAX, IPUP IS SET TO MITER
+C TO FORCE PJAC TO BE CALLED, IF A JACOBIAN IS INVOLVED.
+C IN ANY CASE, PJAC IS CALLED AT LEAST EVERY MSBP STEPS FOR ISOPT = 0,
+C AND AT LEAST ONCE EVERY STEP FOR ISOPT = 1.
+C-----------------------------------------------------------------------
+ 200  IF (ABS(RC-ONE) .GT. CCMAX) IPUP = MITER
+      IF (NST .GE. NSLP+MSBP) IPUP = MITER
+      TN = TN + H
+      I1 = NQNYH + 1
+      DO 215 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 210 I = I1,NQNYH
+ 210      YH1(I) = YH1(I) + YH1(I+NYH)
+ 215    CONTINUE
+C-----------------------------------------------------------------------
+C UP TO MAXCOR CORRECTOR ITERATIONS ARE TAKEN.  (= 3, FOR ISOPT = 0;
+C = 4, FOR ISOPT = 1).  A CONVERGENCE TEST IS MADE ON THE R.M.S. NORM
+C OF EACH CORRECTION, WEIGHTED BY THE ERROR WEIGHT VECTOR EWT.  THE SUM
+C OF THE CORRECTIONS IS ACCUMULATED IN THE VECTOR ACOR(I), I = 1,N.
+C (ACOR(I), I = N+1,NYH IS LOADED IN SUBROUTINE STESA (ISOPT = 1).)
+C THE YH ARRAY IS NOT ALTERED IN THE CORRECTOR LOOP.
+C-----------------------------------------------------------------------
+ 220  M = 0
+      DO 230 I = 1,N
+ 230    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (IPUP .LE. 0) GO TO 250
+C-----------------------------------------------------------------------
+C IF INDICATED, THE MATRIX P = I - H*EL(1)*J IS REEVALUATED AND
+C PREPROCESSED BEFORE STARTING THE CORRECTOR ITERATION.  IPUP IS SET
+C TO 0 AS AN INDICATOR THAT THIS HAS BEEN DONE.
+C-----------------------------------------------------------------------
+      IPUP = 0
+      RC = ONE
+      NSLP = NST
+      CRATE = 0.7D0
+      CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, ACOR, PAR,
+     1   F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 430
+ 250   DO 260 I = 1,N
+ 260    ACOR(I) = ZERO
+ 270   IF (MITER .NE. 0) GO TO 350
+C-----------------------------------------------------------------------
+C IN THE CASE OF FUNCTIONAL ITERATION, UPDATE Y DIRECTLY FROM
+C THE RESULT OF THE LAST FUNCTION EVALUATION.
+C (IF ISOPT = 1, FUNCTIONAL ITERATION IS NOT ALLOWED.)
+C-----------------------------------------------------------------------
+      DO 290 I = 1,N
+        SAVF(I) = H*SAVF(I) - YH(I,2)
+ 290    Y(I) = SAVF(I) - ACOR(I)
+      DEL = VNORM (N, Y, EWT)
+      DO 300 I = 1,N
+        Y(I) = YH(I,1) + EL(1)*SAVF(I)
+ 300    ACOR(I) = SAVF(I)
+      GO TO 400
+C-----------------------------------------------------------------------
+C IN THE CASE OF THE CHORD METHOD, COMPUTE THE CORRECTOR ERROR,
+C AND KppSolve THE LINEAR SYSTEM WITH THAT AS RIGHT-HAND SIDE AND
+C P AS COEFFICIENT MATRIX.
+C-----------------------------------------------------------------------
+ 350   DO 360 I = 1,N
+ 360    Y(I) = H*SAVF(I) - (YH(I,2) + ACOR(I))
+      CALL SLVS (WM, IWM, Y, SAVF)
+      IF (IERSL .LT. 0) GO TO 430
+      IF (IERSL .GT. 0) GO TO 410
+      DEL = VNORM (N, Y, EWT)
+      DO 380 I = 1,N
+        ACOR(I) = ACOR(I) + Y(I)
+ 380    Y(I) = YH(I,1) + EL(1)*ACOR(I)
+C-----------------------------------------------------------------------
+C TEST FOR CONVERGENCE.  IF M.GT.0, AN ESTIMATE OF THE CONVERGENCE
+C RATE CONSTANT IS STORED IN CRATE, AND THIS IS USED IN THE TEST.
+C-----------------------------------------------------------------------
+ 400   IF (M .NE. 0) CRATE = MAX(0.2D0*CRATE,DEL/DELP)
+      DCON = DEL*MIN(ONE,1.5D0*CRATE)/(TESCO(2,NQ)*CONIT)
+      IF (DCON .LE. ONE) GO TO 450
+      M = M + 1
+      IF (M .EQ. MAXCOR) GO TO 410
+      IF (M .GE. 2 .AND. DEL .GT. 2.0D0*DELP) GO TO 410
+      DELP = DEL
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      GO TO 270
+C-----------------------------------------------------------------------
+C THE CORRECTOR ITERATION FAILED TO CONVERGE IN MAXCOR TRIES.
+C IF MITER .NE. 0 AND THE JACOBIAN IS OUT OF DATE, PJAC IS CALLED FOR
+C THE NEXT TRY.  OTHERWISE THE YH ARRAY IS RETRACTED TO ITS VALUES
+C BEFORE PREDICTION, AND H IS REDUCED, IF POSSIBLE.  IF H CANNOT BE
+C REDUCED OR MXNCF FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -2.
+C-----------------------------------------------------------------------
+ 410   IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430
+      ICF = 1
+      IPUP = MITER
+      GO TO 220
+ 430   ICF = 2
+      NCF = NCF + 1
+      RMAX = 2.0D0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 445 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 440 I = I1,NQNYH
+ 440      YH1(I) = YH1(I) - YH1(I+NYH)
+ 445    CONTINUE
+      IF (IERPJ .LT. 0 .OR. IERSL .LT. 0) GO TO 680
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 670
+      IF (NCF .EQ. MXNCF) GO TO 670
+      RH = 0.25D0
+      IPUP = MITER
+      IREDO = 1
+      GO TO 170
+C-----------------------------------------------------------------------
+C THE CORRECTOR HAS CONVERGED.
+C THE LOCAL ERROR TEST IS MADE AND CONTROL PASSES TO STATEMENT 500
+C IF IT FAILS. OTHERWISE, STESA IS CALLED (ISOPT = 1) TO PERFORM
+C SENSITIVITY CALCULATIONS AT CURRENT STEP SIZE AND ORDER.
+C-----------------------------------------------------------------------
+ 450   CONTINUE
+      IF (M .EQ. 0) DSM = DEL/TESCO(2,NQ)
+      IF (M .GT. 0) DSM = VNORM (N, ACOR, EWT)/TESCO(2,NQ)
+      IF (DSM .GT. ONE) GO TO 500
+C
+      IF (ISOPT .EQ. 0) GO TO 460
+C-----------------------------------------------------------------------
+C CALL STESA TO PERFORM EXPLICIT SENSITIVITY ANALYSIS.
+C IF THE LOCAL ERROR TEST FAILS (WITHIN STESA) FOR ANY SOLUTION VECTOR,
+C KFLAGS IS SET .LT. 0 AND CONTROL PASSES TO STATEMENT 500 UPON RETURN.
+C IN EITHER CASE, JCUR IS SET TO ZERO TO SIGNAL THAT THE JACOBIAN MAY
+C NEED UPDATING LATER.
+C-----------------------------------------------------------------------
+      CALL STESA (NEQ, Y, N, NSV, YH, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IF (IERPJ .NE. 0 .OR. IERSL .NE. 0) GO TO 680
+      IF (KFLAGS .LT. 0) GO TO 500
+C-----------------------------------------------------------------------
+C AFTER A SUCCESSFUL STEP, UPDATE THE YH ARRAY.
+C CONSIDER CHANGING H IF IALTH = 1.  OTHERWISE DECREASE IALTH BY 1.
+C IF IALTH IS THEN 1 AND NQ .LT. MAXORD, THEN ACOR IS SAVED FOR
+C USE IN A POSSIBLE ORDER INCREASE ON THE NEXT STEP.
+C IF A CHANGE IN H IS CONSIDERED, AN INCREASE OR DECREASE IN ORDER
+C BY ONE IS CONSIDERED ALSO.  A CHANGE IN H IS MADE ONLY IF IT IS BY A
+C FACTOR OF AT LEAST 1.1.  IF NOT, IALTH IS SET TO 3 TO PREVENT
+C TESTING FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 460   JCUR = 0
+      KFLAG = 0
+      IREDO = 0
+      NST = NST + 1
+      HU = H
+      NQU = NQ
+      DO 470 J = 1,L
+        DO 470 I = 1,NYH
+ 470      YH(I,J) = YH(I,J) + EL(J)*ACOR(I)
+      IALTH = IALTH - 1
+      IF (IALTH .EQ. 0) GO TO 520
+      IF (IALTH .GT. 1) GO TO 700
+      IF (L .EQ. LMAX) GO TO 700
+      DO 490 I = 1,NYH
+ 490    YH(I,LMAX) = ACOR(I)
+      GO TO 700
+C-----------------------------------------------------------------------
+C THE ERROR TEST FAILED IN EITHER STODE OR STESA.
+C KFLAG KEEPS TRACK OF MULTIPLE FAILURES.
+C RESTORE TN AND THE YH ARRAY TO THEIR PREVIOUS VALUES, AND PREPARE
+C TO TRY THE STEP AGAIN.  COMPUTE THE OPTIMUM STEP SIZE FOR THIS OR
+C ONE LOWER ORDER.  AFTER 2 OR MORE FAILURES, H IS FORCED TO DECREASE
+C BY A FACTOR OF 0.2 OR LESS.
+C-----------------------------------------------------------------------
+ 500  KFLAG = KFLAG - 1
+      JCUR = 0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 515 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 510 I = I1,NQNYH
+ 510      YH1(I) = YH1(I) - YH1(I+NYH)
+ 515    CONTINUE
+      RMAX = 2.0D0
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 660
+      IF (KFLAG .LE. -3) GO TO 640
+      IREDO = 2
+      RHUP = ZERO
+      GO TO 540
+C-----------------------------------------------------------------------
+*
+C REGARDLESS OF THE SUCCESS OR FAILURE OF THE STEP, FACTORS
+C RHDN, RHSM, AND RHUP ARE COMPUTED, BY WHICH H COULD BE MULTIPLIED
+C AT ORDER NQ - 1, ORDER NQ, OR ORDER NQ + 1, RESPECTIVELY.
+C IN THE CASE OF FAILURE, RHUP = 0.0 TO AVOID AN ORDER INCREASE.
+C THE LARGEST OF THESE IS DETERMINED AND THE NEW ORDER CHOSEN
+C ACCORDINGLY.  IF THE ORDER IS TO BE INCREASED, WE COMPUTE ONE
+C ADDITIONAL SCALED DERIVATIVE.
+C FOR ISOPT = 1, DUPS AND DSMS ARE LOADED WITH THE LARGEST RMS-NORMS
+C OBTAINED BY CONSIDERING SEPARATELY THE SENSITIVITY SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 520   RHUP = ZERO
+      IF (L .EQ. LMAX) GO TO 540
+      DO 530 I = 1,N
+ 530    SAVF(I) = ACOR(I) - YH(I,LMAX)
+      DUP = VNORM (N, SAVF, EWT)/TESCO(3,NQ)
+      DUP = MAX(DUP,DUPS)
+      EXUP = ONE/REAL(L+1)
+      RHUP = ONE/(1.4D0*DUP**EXUP + 0.0000014D0)
+ 540   EXSM = ONE/REAL(L)
+      DSM = MAX(DSM,DSMS)
+      RHSM = ONE/(1.2D0*DSM**EXSM + 0.0000012D0)
+      RHDN = ZERO
+      IF (NQ .EQ. 1) GO TO 560
+      JPOINT = 1
+      DO 550 J = 1,NSV
+        DDN = VNORM (N, YH(JPOINT,L), EWT(JPOINT))/TESCO(1,NQ)
+        DDNS = MAX(DDNS,DDN)
+        JPOINT = JPOINT + N
+ 550  CONTINUE
+      DDN = DDNS
+      DDNS = ZERO
+      EXDN = ONE/REAL(NQ)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+ 560   IF (RHSM .GE. RHUP) GO TO 570
+      IF (RHUP .GT. RHDN) GO TO 590
+      GO TO 580
+ 570   IF (RHSM .LT. RHDN) GO TO 580
+      NEWQ = NQ
+      RH = RHSM
+      GO TO 620
+ 580   NEWQ = NQ - 1
+      RH = RHDN
+      IF (KFLAG .LT. 0 .AND. RH .GT. ONE) RH = ONE
+      GO TO 620
+ 590   NEWQ = L
+      RH = RHUP
+      IF (RH .LT. 1.1D0) GO TO 610
+      R = EL(L)/REAL(L)
+      DO 600 I = 1,NYH
+ 600    YH(I,NEWQ+1) = ACOR(I)*R
+      GO TO 630
+ 610   IALTH = 3
+      GO TO 700
+ 620   IF ((KFLAG .EQ. 0) .AND. (RH .LT. 1.1D0)) GO TO 610
+      IF (KFLAG .LE. -2) RH = MIN(RH,0.2D0)
+C-----------------------------------------------------------------------
+C IF THERE IS A CHANGE OF ORDER, RESET NQ, L, AND THE COEFFICIENTS.
+C IN ANY CASE H IS RESET ACCORDING TO RH AND THE YH ARRAY IS RESCALED.
+C THEN EXIT FROM 690 IF THE STEP WAS OK, OR REDO THE STEP OTHERWISE.
+C-----------------------------------------------------------------------
+      IF (NEWQ .EQ. NQ) GO TO 170
+ 630   NQ = NEWQ
+      L = NQ + 1
+      IRET = 2
+      GO TO 150
+C-----------------------------------------------------------------------
+C CONTROL REACHES THIS SECTION IF 3 OR MORE FAILURES HAVE OCCURED.
+C IF 10 FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -1.
+C IT IS ASSUMED THAT THE DERIVATIVES THAT HAVE ACCUMULATED IN THE
+C YH ARRAY HAVE ERRORS OF THE WRONG ORDER.  HENCE THE FIRST
+C DERIVATIVE IS RECOMPUTED, AND THE ORDER IS SET TO 1.  THEN
+C H IS REDUCED BY A FACTOR OF 10, AND THE STEP IS RETRIED,
+C UNTIL IT SUCCEEDS OR H REACHES HMIN.
+C-----------------------------------------------------------------------
+ 640   IF (KFLAG .EQ. -10) GO TO 660
+      RH = 0.1D0
+      RH = MAX(HMIN/ABS(H),RH)
+      H = H*RH
+      DO 645 I = 1,NYH
+ 645    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (ISOPT .EQ. 0) GO TO 649
+      CALL SPRIME (NEQ, Y, YH, NYH, N, NSV, WM, IWM, EWT, SAVF, ACOR,
+     1   ACOR(N+1), PAR, F, JAC, DF, PJAC, PDF)
+      IF (IERSP .LT. 0) GO TO 680
+      DO 646 I = N+1,NYH
+ 646    YH(I,2) = H*YH(I,2)
+ 649  DO 650 I = 1,N
+ 650    YH(I,2) = H*SAVF(I)
+      IPUP = MITER
+      IALTH = 5
+      IF (NQ .EQ. 1) GO TO 200
+      NQ = 1
+      L = 2
+      IRET = 3
+      GO TO 150
+C-----------------------------------------------------------------------
+C ALL RETURNS ARE MADE THROUGH THIS SECTION.  H IS SAVED IN HOLD
+C TO ALLOW THE CALLER TO CHANGE H ON THE NEXT STEP.
+C-----------------------------------------------------------------------
+ 660   KFLAG = -1
+      GO TO 720
+ 670   KFLAG = -2
+      GO TO 720
+ 680   KFLAG = -3
+      GO TO 720
+ 690   RMAX = 10.0D0
+ 700   R = ONE/TESCO(2,NQU)
+      DO 710 I = 1,NYH
+ 710    ACOR(I) = ACOR(I)*R
+ 720   HOLD = H
+      JSTART = 1
+      RETURN
+C----------------------- END OF SUBROUTINE STODE -----------------------
+      END
+      SUBROUTINE CFODE (METH, ELCO, TESCO)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION ELCO(13,12), TESCO(3,12)
+C-----------------------------------------------------------------------
+C CFODE IS CALLED BY THE INTEGRATOR ROUTINE TO SET COEFFICIENTS
+C NEEDED THERE.  THE COEFFICIENTS FOR THE CURRENT METHOD, AS
+C GIVEN BY THE VALUE OF METH, ARE SET FOR ALL ORDERS AND SAVED.
+C THE MAXIMUM ORDER ASSUMED HERE IS 12 IF METH = 1 AND 5 IF METH = 2.
+C (A SMALLER VALUE OF THE MAXIMUM ORDER IS ALSO ALLOWED.)
+C CFODE IS CALLED ONCE AT THE BEGINNING OF THE PROBLEM,
+C AND IS NOT CALLED AGAIN UNLESS AND UNTIL METH IS CHANGED.
+C
+C THE ELCO ARRAY CONTAINS THE BASIC METHOD COEFFICIENTS.
+C THE COEFFICIENTS EL(I), 1 .LE. I .LE. NQ+1, FOR THE METHOD OF
+C ORDER NQ ARE STORED IN ELCO(I,NQ).  THEY ARE GIVEN BY A GENETRATING
+C POLYNOMIAL, I.E.,
+C    L(X) = EL(1) + EL(2)*X + ... + EL(NQ+1)*X**NQ.
+C FOR THE IMPLICIT ADAMS METHODS, L(X) IS GIVEN BY
+C    DL/DX = (X+1)*(X+2)*...*(X+NQ-1)/FACTORIAL(NQ-1),    L(-1) = 0.
+C FOR THE BDF METHODS, L(X) IS GIVEN BY
+C    L(X) = (X+1)*(X+2)* ... *(X+NQ)/K,
+C WHERE        K = FACTORIAL(NQ)*(1 + 1/2 + ... + 1/NQ).
+C
+C THE TESCO ARRAY CONTAINS TEST CONSTANTS USED FOR THE
+C LOCAL ERROR TEST AND THE SELECTION OF STEP SIZE AND/OR ORDER.
+C AT ORDER NQ, TESCO(K,NQ) IS USED FOR THE SELECTION OF STEP
+C SIZE AT ORDER NQ - 1 IF K = 1, AT ORDER NQ IF K = 2, AND AT ORDER
+C NQ + 1 IF K = 3.
+C-----------------------------------------------------------------------
+      DIMENSION PC(12)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+C
+      GO TO (100, 200), METH
+C
+ 100   ELCO(1,1) = ONE
+      ELCO(2,1) = ONE
+      TESCO(1,1) = ZERO
+      TESCO(2,1) = 2.0D0
+      TESCO(1,2) = ONE
+      TESCO(3,12) = ZERO
+      PC(1) = ONE
+      RQFAC = ONE
+      DO 140 NQ = 2,12
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ-1).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        RQ1FAC = RQFAC
+        RQFAC = RQFAC/REAL(NQ)
+        NQM1 = NQ - 1
+        FNQM1 = REAL(NQM1)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ-1). ----------------------------------
+        PC(NQ) = ZERO
+        DO 110 IB = 1,NQM1
+          I = NQP1 - IB
+ 110      PC(I) = PC(I-1) + FNQM1*PC(I)
+        PC(1) = FNQM1*PC(1)
+C COMPUTE INTEGRAL, -1 TO 0, OF P(X) AND X*P(X). -----------------------
+        PINT = PC(1)
+        XPIN = PC(1)/2.0D0
+        TSIGN = ONE
+        DO 120 I = 2,NQ
+          TSIGN = -TSIGN
+          PINT = PINT + TSIGN*PC(I)/REAL(I)
+ 120      XPIN = XPIN + TSIGN*PC(I)/REAL(I+1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        ELCO(1,NQ) = PINT*RQ1FAC
+        ELCO(2,NQ) = ONE
+        DO 130 I = 2,NQ
+ 130      ELCO(I+1,NQ) = RQ1FAC*PC(I)/REAL(I)
+        AGAMQ = RQFAC*XPIN
+        RAGQ = ONE/AGAMQ
+        TESCO(2,NQ) = RAGQ
+        IF (NQ .LT. 12) TESCO(1,NQP1) = RAGQ*RQFAC/REAL(NQP1)
+        TESCO(3,NQM1) = RAGQ
+ 140    CONTINUE
+      RETURN
+C
+ 200   PC(1) = ONE
+      RQ1FAC = ONE
+      DO 230 NQ = 1,5
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        FNQ = REAL(NQ)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ). ------------------------------------
+        PC(NQP1) = ZERO
+        DO 210 IB = 1,NQ
+          I = NQ + 2 - IB
+ 210      PC(I) = PC(I-1) + FNQ*PC(I)
+        PC(1) = FNQ*PC(1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        DO 220 I = 1,NQP1
+ 220      ELCO(I,NQ) = PC(I)/PC(2)
+        ELCO(2,NQ) = ONE
+        TESCO(1,NQ) = RQ1FAC
+        TESCO(2,NQ) = REAL(NQP1)/ELCO(1,NQ)
+        TESCO(3,NQ) = REAL(NQ+2)/ELCO(1,NQ)
+        RQ1FAC = RQ1FAC/FNQ
+ 230    CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE CFODE -----------------------
+      END
+      SUBROUTINE SOLSY (WM, IWM, X, TEM)
+C      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      DIMENSION WM(*), IWM(*), X(*), TEM(*)
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(6),
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(4), IERSL, IDUM2(5),
+     5   MITER, IDUM3(4), N, IDUM4(5)
+C-----------------------------------------------------------------------
+C THIS ROUTINE MANAGES THE SOLUTION OF THE LINEAR SYSTEM ARISING FROM
+C A CHORD ITERATION.  IT IS CALLED IF MITER .NE. 0.
+C IF MITER IS 1 OR 2, IT CALLS DGESL TO ACCOMPLISH THIS.
+C IF MITER = 3 IT UPDATES THE COEFFICIENT H*EL0 IN THE DIAGONAL
+C MATRIX, AND THEN COMPUTES THE SOLUTION.
+C IF MITER IS 4 OR 5, IT CALLS DGBSL.
+C COMMUNICATION WITH SOLSY USES THE FOLLOWING VARIABLES..
+C WM   = REAL WORK SPACE CONTAINING THE INVERSE DIAGONAL MATRIX IF
+C        MITER = 3 AND THE LU DECOMPOSITION OF THE MATRIX OTHERWISE.
+C        STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C        WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C        WM(1) = SQRT(UROUND) (NOT USED HERE),
+C        WM(2) = HL0, THE PREVIOUS VALUE OF H*EL0, USED IF MITER = 3.
+C IWM  = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C        IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C        PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C X    = THE RIGHT-HAND SIDE VECTOR ON INPUT, AND THE SOLUTION VECTOR
+C        ON OUTPUT, OF LENGTH N.
+C TEM  = VECTOR OF WORK SPACE OF LENGTH N, NOT USED IN THIS VERSION.
+C IERSL = OUTPUT FLAG (IN COMMON).  IERSL = 0 IF NO TROUBLE OCCURRED.
+C        IERSL = 1 IF A SINGULAR MATRIX AROSE WITH MITER = 3.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, MITER, AND N.
+C-----------------------------------------------------------------------
+      IERSL = 0
+      GO TO (100, 100, 300, 400, 400), MITER
+C 100   CALL DGESL (WM(3), N, N, IWM(21), X, 0)
+ 100   CALL KppSolve (WM(3), X)
+      RETURN
+C
+ 300   PHL0 = WM(2)
+      HL0 = H*EL0
+      WM(2) = HL0
+      IF (HL0 .EQ. PHL0) GO TO 330
+      R = HL0/PHL0
+      DO 320 I = 1,N
+        DI = ONE - R*(ONE - ONE/WM(I+2))
+        IF (ABS(DI) .EQ. ZERO) GO TO 390
+ 320    WM(I+2) = ONE/DI
+ 330   DO 340 I = 1,N
+ 340    X(I) = WM(I+2)*X(I)
+      RETURN
+ 390   IERSL = 1
+      RETURN
+C
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      MEBAND = 2*ML + MU + 1
+      CALL DGBSL (WM(3), MEBAND, N, ML, MU, IWM(21), X, 0)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLSY -----------------------
+      END
+      SUBROUTINE EWSET (N, ITOL, RTOL, ATOL, YCUR, EWT)
+C-----------------------------------------------------------------------
+C THIS SUBROUTINE SETS THE ERROR WEIGHT VECTOR EWT ACCORDING TO
+C    EWT(I) = RTOL(I)*ABS(YCUR(I)) + ATOL(I),  I = 1,...,N,
+C WITH THE SUBSCRIPT ON RTOL AND/OR ATOL POSSIBLY REPLACED BY 1 ABOVE,
+C DEPENDING ON THE VALUE OF ITOL.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RTOL(*), ATOL(*), YCUR(N), EWT(N)
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 10 I = 1,N
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        EWT(I) = RTOLI*ABS(YCUR(I)) + ATOLI
+ 10     CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE EWSET -----------------------
+      END
+      DOUBLE PRECISION FUNCTION VNORM (N, V, W)
+C-----------------------------------------------------------------------
+C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED ROOT-MEAN-SQUARE NORM
+C OF THE VECTOR OF LENGTH N CONTAINED IN THE ARRAY V, WITH WEIGHTS
+C CONTAINED IN THE ARRAY W OF LENGTH N..
+C  VNORM = SQRT( (1/N) * SUM( V(I)*W(I) )**2 )
+C PROTECTION FOR UNDERFLOW/OVERFLOW IS ACCOMPLISHED USING TWO
+C CONSTANTS WHICH ARE HOPEFULLY APPLICABLE FOR ALL MACHINES.
+C THESE ARE:
+C     CUTLO = maximum of SQRT(U/EPS)  over all known machines
+C     CUTHI = minimum of SQRT(Z)      over all known machines
+C WHERE
+C     EPS = smallest number s.t. EPS + 1 .GT. 1
+C     U   = smallest positive number (underflow limit)
+C     Z   = largest number (overflow limit)
+C
+C DETAILS OF THE ALGORITHM AND OF VALUES OF CUTLO AND CUTHI ARE
+C FOUND IN THE BLAS ROUTINE SNRM2 (SEE ALSO ALGORITHM 539, TRANS.
+C MATH. SOFTWARE, VOL. 5 NO. 3, 1979, 308-323.
+C FOR SINGLE PRECISION, THE FOLLOWING VALUES SHOULD BE UNIVERSAL:
+C     DATA CUTLO,CUTHI /4.441E-16,1.304E19/
+C FOR DOUBLE PRECISION, USE
+C     DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INTEGER NEXT,I,J,N
+      DIMENSION V(N),W(N)
+      DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+      DATA ZERO,ONE/0.0D0,1.0D0/
+C  BLAS ALGORITHM
+      NEXT = 1
+      SUM = ZERO
+      I = 1
+20    SX = V(I)*W(I)
+      GO TO (30,40,70,80),NEXT
+30    IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 2
+      XMAX = ZERO
+40    IF (SX.EQ.ZERO) GO TO 130
+      IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 3
+      GO TO 60
+50    I=J
+      NEXT = 4
+      SUM = (SUM/SX)/SX
+60    XMAX = ABS(SX)
+      GO TO 90
+70    IF(ABS(SX).GT.CUTLO) GO TO 100
+80    IF(ABS(SX).LE.XMAX) GO TO 90
+      SUM = ONE + SUM * (XMAX/SX)**2
+      XMAX = ABS(SX)
+      GO TO 130
+90    SUM = SUM + (SX/XMAX)**2
+      GO TO 130
+100   SUM = (SUM*XMAX)*XMAX
+110   HITEST = CUTHI/REAL(N)
+      DO 120 J = I,N
+         SX = V(J)*W(J)
+         IF(ABS(SX).GE.HITEST) GO TO 50
+         SUM = SUM + SX**2
+120   CONTINUE
+      VNORM = SQRT(SUM)
+      GO TO 140
+130   CONTINUE
+      I = I + 1
+      IF (I.LE.N) GO TO 20
+      VNORM = XMAX * SQRT(SUM)
+140   CONTINUE
+      RETURN
+C----------------------- END OF FUNCTION VNORM -------------------------
+      END
+      SUBROUTINE SVCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE STORES IN RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSA
+C PACKAGE.
+C RSAV = REAL ARRAY OF LENGTH 222 OR MORE.
+C ISAV = INTEGER ARRAY OF LENGTH 52 OR MORE.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RSAV(I) = RODE1(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RSAV(J) = RODE2(I)
+      DO 30 I = 1,LIODE1
+ 30     ISAV(I) = IODE1(I)
+      DO 40 I = 1,LIODE2
+        J = LIODE1 + I
+ 40     ISAV(J) = IODE2(I)
+      ISAV(LIODE1+LIODE2+1) = IEH(1)
+      ISAV(LIODE1+LIODE2+2) = IEH(2)
+      RETURN
+C----------------------- END OF SUBROUTINE SVCOM -----------------------
+      END
+      SUBROUTINE RSCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE RESTORES FROM RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSSA
+C PACKAGE.  THIS PRESUMES THAT RSAV AND ISAV WERE LOADED BY MEANS
+C OF SUBROUTINE SVCOM OR THE EQUIVALENT.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RODE1(I) = RSAV(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RODE2(I) = RSAV(J)
+      DO 30 I = 1,LIODE1
+ 30     IODE1(I) = ISAV(I)
+      DO 40 I = 1,LODE2
+        J = LIODE1 + I
+ 40     IODE2(I) = ISAV(J)
+      IEH(1) = ISAV(LIODE1+LIODE2+1)
+      IEH(2) = ISAV(LIODE1+LIODE2+2)
+      RETURN
+C----------------------- END OF SUBROUTINE RSCOM -----------------------
+      END
+      SUBROUTINE DGEFA(A,LDA,N,IPVT,INFO)
+      INTEGER LDA,N,IPVT(*),INFO
+      DOUBLE PRECISION A(LDA,*)
+C
+C    DGEFA FACTORS A DOUBLE PRECISION MATRIX BY GAUSSIAN ELIMINATION.
+C
+C    DGEFA IS USUALLY CALLED BY DGECO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C    (TIME FOR DGECO) = (1 + 9/N)*(TIME FOR DGEFA) .
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE MATRIX TO BE FACTORED.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C    ON RETURN
+C
+C       A       AN UPPER TRIANGULAR MATRIX AND THE MULTIPLIERS
+C               WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGESL OR DGEDI WILL DIVIDE BY ZERO
+C                    IF CALLED.  USE  RCOND  IN DGECO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER IDAMAX,J,K,KP1,L,NM1
+C
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      INFO = 0
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 70
+      DO 60 K = 1, NM1
+         KP1 = K + 1
+C
+C        FIND L = PIVOT INDEX
+C
+         L = IDAMAX(N-K+1,A(K,K),1) + K - 1
+         IPVT(K) = L
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (A(L,K) .EQ. 0.0D0) GO TO 40
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. K) GO TO 10
+               T = A(L,K)
+               A(L,K) = A(K,K)
+               A(K,K) = T
+  10        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T  = -1.0D0/A(K,K)
+            CALL DSCAL(N-K,T,A(K+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            DO 30 J = KP1, N
+               T = A(L,J)
+               IF (L .EQ. K) GO TO 20
+                  A(L,J) = A(K,J)
+                  A(K,J) = T
+  20           CONTINUE
+               CALL DAXPY(N-K,T,A(K+1,K),1,A(K+1,J),1)
+  30        CONTINUE
+         GO TO 50
+  40     CONTINUE
+            INFO = K
+  50     CONTINUE
+  60  CONTINUE
+  70  CONTINUE
+      IPVT(N) = N
+      IF (A(N,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGESL(A,LDA,N,IPVT,B,JOB)
+      INTEGER LDA,N,IPVT(*),JOB
+      DOUBLE PRECISION A(LDA,*),B(*)
+C
+C     DGESL KppSolveS THE DOUBLE PRECISION SYSTEM
+C     A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGECO OR DGEFA.
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGECO OR DGEFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGECO OR DGEFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B  WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGECO HAS SET RCOND .GT. 0.0
+C       OR DGEFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGESL(A,LDA,N,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,NM1
+C
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve  L*Y = B
+C
+         IF (NM1 .LT. 1) GO TO 30
+         DO 20 K = 1, NM1
+            L = IPVT(K)
+            T = B(L)
+            IF (L .EQ. K) GO TO 10
+               B(L) = B(K)
+               B(K) = T
+  10        CONTINUE
+            CALL DAXPY(N-K,T,A(K+1,K),1,B(K+1),1)
+  20     CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/A(K,K)
+            T = -B(K)
+            CALL DAXPY(K-1,T,A(1,K),1,B(1),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            T = DDOT(K-1,A(1,K),1,B(1),1)
+            B(K) = (B(K) - T)/A(K,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (NM1 .LT. 1) GO TO 90
+         DO 80 KB = 1, NM1
+            K = N - KB
+            B(K) = B(K) + DDOT(N-K,A(K+1,K),1,B(K+1),1)
+            L = IPVT(K)
+            IF (L .EQ. K) GO TO 70
+               T = B(L)
+               B(L) = B(K)
+               B(K) = T
+  70        CONTINUE
+  80     CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DGBFA(ABD,LDA,N,ML,MU,IPVT,INFO)
+      INTEGER LDA,N,ML,MU,IPVT(*),INFO
+      DOUBLE PRECISION ABD(LDA,*)
+C
+C    DGBFA FACTORS A DOUBLE PRECISION BAND MATRIX BY ELIMINATION.
+C
+C    DGBFA IS USUALLY CALLED BY DGBCO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               CONTAINS THE MATRIX IN BAND STORAGE.  THE COLUMNS
+C               OF THE MATRIX ARE STORED IN THE COLUMNS OF  ABD  AND
+C               THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C               ML+1 THROUGH 2*ML+MU+1 OF  ABD .
+C               SEE THE COMMENTS BELOW FOR DETAILS.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C               LDA MUST BE .GE. 2*ML + MU + 1 .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C               0 .LE. ML .LT. N .
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C               0 .LE. MU .LT. N .
+C               MORE EFFICIENT IF  ML .LE. MU .
+C    ON RETURN
+C
+C       ABD     AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C               THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGBSL WILL DIVIDE BY ZERO IF
+C                    CALLED.  USE  RCOND  IN DGBCO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    BAND STORAGE
+C
+C          IF  A  IS A BAND MATRIX, THE FOLLOWING PROGRAM SEGMENT
+C          WILL SET UP THE INPUT.
+C
+C                  ML = (BAND WIDTH BELOW THE DIAGONAL)
+C                  MU = (BAND WIDTH ABOVE THE DIAGONAL)
+C                  M = ML + MU + 1
+C                  DO 20 J = 1, N
+C                     I1 = MAX0(1, J-MU)
+C                     I2 = MIN0(N, J+ML)
+C                     DO 10 I = I1, I2
+C                        K = I - J + M
+C                        ABD(K,J) = A(I,J)
+C               10    CONTINUE
+C               20 CONTINUE
+C
+C          THIS USES ROWS  ML+1  THROUGH  2*ML+MU+1  OF  ABD .
+C          IN ADDITION, THE FIRST  ML  ROWS IN  ABD  ARE USED FOR
+C          ELEMENTS GENERATED DURING THE TRIANGULARIZATION.
+C          THE TOTAL NUMBER OF ROWS NEEDED IN  ABD  IS  2*ML+MU+1 .
+C          THE  ML+MU BY ML+MU  UPPER LEFT TRIANGLE AND THE
+C          ML BY ML  LOWER RIGHT TRIANGLE ARE NOT REFERENCED.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C    FORTRAN MAX0,MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER I,IDAMAX,I0,J,JU,JZ,J0,J1,K,KP1,L,LM,M,MM,NM1
+C
+C
+      M = ML + MU + 1
+      INFO = 0
+C
+C     ZERO INITIAL FILL-IN COLUMNS
+C
+      J0 = MU + 2
+      J1 = MIN0(N,M) - 1
+      IF (J1 .LT. J0) GO TO 30
+      DO 20 JZ = J0, J1
+         I0 = M + 1 - JZ
+         DO 10 I = I0, ML
+            ABD(I,JZ) = 0.0D0
+  10     CONTINUE
+  20  CONTINUE
+  30  CONTINUE
+      JZ = J1
+      JU = 0
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 130
+      DO 120 K = 1, NM1
+         KP1 = K + 1
+C
+C        ZERO NEXT FILL-IN COLUMN
+C
+         JZ = JZ + 1
+         IF (JZ .GT. N) GO TO 50
+         IF (ML .LT. 1) GO TO 50
+            DO 40 I = 1, ML
+               ABD(I,JZ) = 0.0D0
+  40        CONTINUE
+  50     CONTINUE
+C
+C        FIND L = PIVOT INDEX
+C
+         LM = MIN0(ML,N-K)
+         L = IDAMAX(LM+1,ABD(M,K),1) + M - 1
+         IPVT(K) = L + K - M
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (ABD(L,K) .EQ. 0.0D0) GO TO 100
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. M) GO TO 60
+               T = ABD(L,K)
+               ABD(L,K) = ABD(M,K)
+               ABD(M,K) = T
+  60        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T = -1.0D0/ABD(M,K)
+            CALL DSCAL(LM,T,ABD(M+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            JU = MIN0(MAX0(JU,MU+IPVT(K)),N)
+            MM = M
+            IF (JU .LT. KP1) GO TO 90
+            DO 80 J = KP1, JU
+               L = L - 1
+               MM = MM - 1
+               T = ABD(L,J)
+               IF (L .EQ. MM) GO TO 70
+                  ABD(L,J) = ABD(MM,J)
+                  ABD(MM,J) = T
+  70           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+  80        CONTINUE
+  90        CONTINUE
+         GO TO 110
+  100    CONTINUE
+            INFO = K
+  110    CONTINUE
+  120  CONTINUE
+  130  CONTINUE
+      IPVT(N) = N
+      IF (ABD(M,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGBSL(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+      INTEGER LDA,N,ML,MU,IPVT(*),JOB
+      DOUBLE PRECISION ABD(LDA,*),B(*)
+C
+C    DGBSL KppSolveS THE DOUBLE PRECISION BAND SYSTEM
+C    A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGBCO OR DGBFA.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGBCO OR DGBFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGBCO OR DGBFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B , WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGBCO HAS SET RCOND .GT. 0.0
+C       OR DGBFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGBSL(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C    FORTRAN MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,LA,LB,LM,M,NM1
+C
+      M = MU + ML + 1
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve L*Y = B
+C
+         IF (ML .EQ. 0) GO TO 30
+         IF (NM1 .LT. 1) GO TO 30
+            DO 20 K = 1, NM1
+               LM = MIN0(ML,N-K)
+               L = IPVT(K)
+               T = B(L)
+               IF (L .EQ. K) GO TO 10
+                  B(L) = B(K)
+                  B(K) = T
+  10           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,B(K+1),1)
+  20        CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/ABD(M,K)
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = -B(K)
+            CALL DAXPY(LM,T,ABD(LA,K),1,B(LB),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = DDOT(LM,ABD(LA,K),1,B(LB),1)
+            B(K) = (B(K) - T)/ABD(M,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (ML .EQ. 0) GO TO 90
+         IF (NM1 .LT. 1) GO TO 90
+            DO 80 KB = 1, NM1
+               K = N - KB
+               LM = MIN0(ML,N-K)
+               B(K) = B(K) + DDOT(LM,ABD(M+1,K),1,B(K+1),1)
+               L = IPVT(K)
+               IF (L .EQ. K) GO TO 70
+                  T = B(L)
+                  B(L) = B(K)
+                  B(K) = T
+  70           CONTINUE
+  80        CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
+C
+C     CONSTANT TIMES A VECTOR PLUS A VECTOR.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DA
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      IF(N.LE.0)RETURN
+      IF (DA .EQ. 0.0D0) RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DY(IY) = DY(IY) + DA*DX(IX)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,4)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DY(I) = DY(I) + DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 4 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,4
+        DY(I) = DY(I) + DA*DX(I)
+        DY(I + 1) = DY(I + 1) + DA*DX(I + 1)
+        DY(I + 2) = DY(I + 2) + DA*DX(I + 2)
+        DY(I + 3) = DY(I + 3) + DA*DX(I + 3)
+  50  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DSCAL(N,DA,DX,INCX)
+C
+C     SCALES A VECTOR BY A CONSTANT.
+C     USES UNROLLED LOOPS FOR INCREMENT EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DA,DX(*)
+      INTEGER I,INCX,M,MP1,N,NINCX
+C
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+*
+C
+      NINCX = N*INCX
+      DO 10 I = 1,NINCX,INCX
+        DX(I) = DA*DX(I)
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DX(I) = DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DX(I) = DA*DX(I)
+        DX(I + 1) = DA*DX(I + 1)
+        DX(I + 2) = DA*DX(I + 2)
+        DX(I + 3) = DA*DX(I + 3)
+        DX(I + 4) = DA*DX(I + 4)
+  50  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
+C
+C     FORMS THE DOT PRODUCT OF TWO VECTORS.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DTEMP
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      DDOT = 0.0D0
+      DTEMP = 0.0D0
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DTEMP = DTEMP + DX(IX)*DY(IY)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      DDOT = DTEMP
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DTEMP = DTEMP + DX(I)*DY(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) GO TO 60
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DTEMP = DTEMP + DX(I)*DY(I) + DX(I + 1)*DY(I + 1) +
+     *   DX(I + 2)*DY(I + 2) + DX(I + 3)*DY(I + 3) + DX(I + 4)*DY(I + 4)
+  50  CONTINUE
+  60  DDOT = DTEMP
+      RETURN
+      END
+      INTEGER FUNCTION IDAMAX(N,DX,INCX)
+C
+C     FINDS THE INDEX OF ELEMENT HAVING MAX. ABSOLUTE VALUE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DMAX
+      INTEGER I,INCX,IX,N
+C
+      IDAMAX = 0
+      IF( N .LT. 1 ) RETURN
+      IDAMAX = 1
+      IF(N.EQ.1)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+C
+      IX = 1
+      DMAX = DABS(DX(1))
+      IX = IX + INCX
+      DO 10 I = 2,N
+         IF(DABS(DX(IX)).LE.DMAX) GO TO 5
+         IDAMAX = I
+         DMAX = DABS(DX(IX))
+   5     IX = IX + INCX
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+  20  DMAX = DABS(DX(1))
+      DO 30 I = 2,N
+         IF(DABS(DX(I)).LE.DMAX) GO TO 30
+         IDAMAX = I
+         DMAX = DABS(DX(I))
+  30  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C THIS ROUTINE COMPUTES THE UNIT ROUNDOFF OF THE MACHINE IN DOUBLE
+C PRECISION.  THIS IS DEFINED AS THE SMALLEST POSITIVE MACHINE NUMBER
+C U SUCH THAT  1.0D0 + U .NE. 1.0D0 (IN DOUBLE PRECISION).
+C-----------------------------------------------------------------------
+      DOUBLE PRECISION U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- END OF FUNCTION D1MACH ------------------------
+      END
+      SUBROUTINE XERR (MSG, NERR, IERT, NI, I1, I2, NR, R1, R2)
+      INTEGER NERR, IERT, NI, I1, I2, NR,
+     1   LUN, LUNIT, MESFLG
+      DOUBLE PRECISION R1, R2
+      CHARACTER*(*) MSG
+C-------------------------------------------------------------------
+C
+C ALL ARGUMENTS ARE INPUT ARGUMENTS.
+C
+C MSG   = THE MESSAGE (CHARACTER VARIABLE)
+C NERR  = THE ERROR NUMBER (NOT USED).
+C IERT  = THE ERROR TYPE..
+C         1 MEANS RECOVERABLE (CONTROL RETURNS TO CALLER).
+C         2 MEANS FATAL (RUN IS ABORTED--SEE NOTE BELOW).
+C NI    = NUMBER OF INTEGERS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C I1,I2  = INTEGERS TO BE PRINTED, DEPENDING ON NI.
+C NR    = NUMBER OF REALS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C R1,R2  = REALS TO BE PRINTED, DEPENDING ON NR.
+C
+C  NOTES:
+C 1. THE DIMENSION OF MSG IS ASSUMED TO BE AT MOST 60.
+C   (MULTI-LINE MESSAGES ARE GENERATED BY REPEATED CALLS.)
+C 2. IF IERT = 2, CONTROL PASSES TO THE STATEMENT  STOP
+C   TO ABORT THE RUN.  THIS STATEMENT MAY BE MACHINE-DEPENDENT.
+C 3. R1 AND R2 ARE ASSUMED TO BE IN DOUBLE PRECISION AND ARE PRINTED
+C   IN D21.13 FORMAT.
+C 4. THE COMMON BLOCK /EH0001/ BELOW IS DATA-LOADED (A MACHINE-
+C   DEPENDENT FEATURE) WITH DEFAULT VALUES.
+C   THIS BLOCK IS NEEDED FOR PROPER RETENTION OF PARAMETERS USED BY
+C   THIS ROUTINE WHICH THE USER CAN RESET BY CALLING XSETF OR XSETUN.
+C   THE VARIABLES IN THIS BLOCK ARE AS FOLLOWS..
+C      MESFLG = PRINT CONTROL FLAG..
+C               1 MEANS PRINT ALL MESSAGES (THE DEFAULT).
+C               0 MEANS NO PRINTING.
+C      LUNIT  = LOGICAL UNIT NUMBER FOR MESSAGES.
+C               THE DEFAULT IS 6 (MACHINE-DEPENDENT).
+C 5. TO CHANGE THE DEFAULT OUTPUT UNIT, CHANGE THE DATA STATEMENT
+C  IN THE BLOCK DATA SUBPROGRAM BELOW.
+C
+C FOR A DIFFERENT RUN-ABORT COMMAND, CHANGE THE STATEMENT FOLLOWING
+C STATEMENT 100 AT THE END.
+C-----------------------------------------------------------------------
+      COMMON /EH0001/ MESFLG, LUNIT
+      IF (MESFLG .EQ. 0) GO TO 100
+C GET LOGICAL UNIT NUMBER. ---------------------------------------------
+      LUN = LUNIT
+C WRITE THE MESSAGE. ---------------------------------------------------
+      WRITE (LUN, 10) MSG
+ 10   FORMAT(1X,A)
+C-----------------------------------------------------------------------
+      IF (NI .EQ. 1) WRITE (LUN, 20) I1
+ 20   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10)
+      IF (NI .EQ. 2) WRITE (LUN, 30) I1,I2
+ 30   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10,3X,'I2 = ',I10)
+      IF (NR .EQ. 1) WRITE (LUN, 40) R1
+ 40   FORMAT(6X,'IN ABOVE MESSAGE,  R1 = ',D21.13)
+      IF (NR .EQ. 2) WRITE (LUN, 50) R1,R2
+ 50   FORMAT(6X,'IN ABOVE,  R1 = ',D21.13,3X,'R2 = ',D21.13)
+C ABORT THE RUN IF IERT = 2. -------------------------------------------
+ 100   IF (IERT .NE. 2) RETURN
+      STOP
+C----------------------- END OF SUBROUTINE XERR ----------------------
+      END
+      SUBROUTINE XSETF (MFLAG)
+C
+C THIS ROUTINE RESETS THE PRINT CONTROL FLAG MFLAG.
+C
+      INTEGER MFLAG, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) MESFLG = MFLAG
+      RETURN
+C----------------------- END OF SUBROUTINE XSETF -----------------------
+      END
+      SUBROUTINE XSETUN (LUN)
+C
+C THIS ROUTINE RESETS THE LOGICAL UNIT NUMBER FOR MESSAGES.
+C
+      INTEGER LUN, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (LUN .GT. 0) LUNIT = LUN
+      RETURN
+C----------------------- END OF SUBROUTINE XSETUN ----------------------
+      END
+      BLOCK DATA
+C-----------------------------------------------------------------------
+C THIS DATA SUBPROGRAM LOADS VARIABLES INTO THE INTERNAL COMMON
+C BLOCKS USED BY ODESSA AND ITS VARIANTS.  THE VARIABLES ARE
+C DEFINED AS FOLLOWS..
+C  ILLIN  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ILLEGAL INPUT.  THE RUN IS STOPPED WHEN
+C           ILLIN REACHES 5.
+C  NTREP  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ISTATE = 1 AND TOUT = T.  THE RUN IS
+C           STOPPED WHEN NTREP REACHES 5.
+C  MESFLG = FLAG TO CONTROL PRINTING OF ERROR MESSAGES.  1 MEANS PRINT,
+C           0 MEANS NO PRINTING.
+C  LUNIT  = DEFAULT VALUE OF LOGICAL UNIT NUMBER FOR PRINTING OF ERROR
+C           MESSAGES.
+C-----------------------------------------------------------------------
+      INTEGER ILLIN, IDUMA, NTREP, IDUMB, IOWNS, ICOMM, MESFLG, LUNIT
+      DOUBLE PRECISION ROWND, ROWNS, RCOMM
+      COMMON /ODE001/ ROWND, ROWNS(173), RCOMM(45),
+     1   ILLIN, IDUMA(10), NTREP, IDUMB(2), IOWNS(4), ICOMM(21)
+      COMMON /EH0001/ MESFLG, LUNIT
+      DATA ILLIN/0/, NTREP/0/
+      DATA MESFLG/1/, LUNIT/6/
+C
+C------------------------ END OF BLOCK DATA ----------------------------
+      END
+C-----------------------------------------------------------------------
+C INSTRUCTIONS FOR INSTALLING THE ODESSA PACKAGE. (see @ below.)
+C
+C ODESSA is an enhanced version of the widely disseminated ODE solver
+C LSODE, and as such retains the same properties regarding portability.
+C The notes below, adapted from the installation instructions for LSODE,
+C are intended to facilitate the installation of the ODESSA package in
+C the user's software library.
+C
+C 1. Both a single and a double precision version of ODESSA are
+C provided in this release.  It is expected that most users will
+C utilize the double precision version, except in the case of
+C extended word-length computers. Most routines used by ODESSA
+C are named the same regardless of whether they are single or
+C double precision.  The exceptions are the LINPAK and BLAS
+C routines that follow the LINPAK/BLAS naming conventions, i.e.
+C D--- for a double precision routine, and S--- for a single
+C precision routine.  Thus, care should be taken if both single
+C and double precision versions are stored in the same library.
+C
+C 2. Several routines in ODESSA have the same names as the LSODE
+C routines from which they were derived, although they contain
+C different code.  These are: INTDY, STODE, PREPJ, SVCOM, and
+C RSCOM.  If ODESSA is added to a subroutine library of which
+C LSODE is already a member, these routine names must be changed
+C in one of the two programs.  Also see the note regarding BLOCK
+C DATA subroutines below.
+C
+C 3.  In many cases, ODESSA uses unaltered LSODE routines and
+C common library routines that may already reside on your system.
+C The installation of ODESSA should be done so that identical routines
+C are shared rather than kept as duplicate copies.
+C a.  Normally, the user calls only subroutine ODESSA, but for optional
+C     capabilities the user may also CALL XSETUN, XSETF, SVCOM, RSCOM,
+C     or INTDY, as described in Part II of the Full Description in the
+C     User Documentation (ODESSA.DOC, see below).  Except for INTDY,
+C     none of these are called from within the package.
+C b.  Two routines, EWSET and VNORM, are optionally replaceable by the
+C     user if the package version is unsuitable.  Hence, the install-
+C     ation of the package should be done so that the user's version
+C     for either routine overrides the package version.
+C c.  The function routine D1MACH is provided to compute the unit
+C     roundoff of the machine and precision in use, in a manner com-
+C     patible with machine parameter routines developed at Bell Lab-
+C     oratories.  If such a routine has already been installed on
+C     your system, the version supplied here may be discarded.
+C d.  Linear algebraic systems are solved with routines from the
+C     LINPACK collection, in conjunction with routines from the Basic
+C     Linear Algebra module collection (BLAS).  In double precision,
+C     the names are DGEFA, DGESL, DGBFA, and DGBSL (from LINPACK), and
+C     DAXPY, DSCAL, IDAMAX, and DDOT (from BLAS). If these routines
+C     have already been installed on your system, copies supplied with
+C     ODESSA may be discarded.  The single precision versions of these
+C     routines are used in the single precision version.
+C
+C 4. There are four integer variables, in the two labeled COMMON
+C blocks /ODE001/ and /EH0001/, which need to be loaded with DATA
+C statements.  They can vary during execution, and are in common to
+C assure their retention between calls.  This is legal in ANSI Fortran
+C only if done in a BLOCK DATA subprogram, and this package has a
+C BLOCK DATA for this purpose.  However, BLOCK DATA subprograms can be
+C difficult to install in libraries, and many compilers allow such DATA
+C statements in subroutines.  If your system allows this, the location
+C of the DATA statements are just after the initial type and common
+C declarations in subroutines ODESSA and XERR.  In ODESSA, ILLIN and
+C NTREP are DATA-loaded as 0.  In XERR, MESFLG is loaded as 1 and
+C LUNIT is loaded as the appropriate default logical unit number.
+C
+C 5. The ODESSA package contains subscript expressions which may not
+C be accepted by some compilers.  Subscripts of the form I + J, I - J,
+C etc., occur in various routines.  If any of these forms are
+C unacceptable to your compiler, an extra line of code setting the
+C subscript to a dummy integer value should be added for each subscipt.
+C
+C 6. User documentation is provided in a two-level structure
+C to accommmodate both the casual and serious user.  The novice or
+C casual user should need to read only the Summary of Usage and the
+C Example Problem located at the beginning of the documentation.  More
+C experienced users, requiring the full set of available options,
+C should read the Full Description which follows the Example Problem.
+C
+C 7. The user documentation may need corrections in the following ways:
+C a.  If subroutine names have been changed to avoid conflicts between
+C     the LSODE and ODESSA packages, the corresponding name changes
+C     should be made in the documentation.
+C b.  In the Summary of Usage, and in the description of XSETUN under
+C     Part II of the Full Description, the default logical unit number
+C     should be corrected if it is not 6.
+C c.  In the Summary of Usage, users should be instructed to execute
+C     CALL XSETF(1) before the first CALL to ODESSA, if this is neces-
+C     sary for proper error message handling.  (see note 2(e) above.)
+C d.  In the description of the subroutines DF and JAC in the Summary
+C     of Usage and in Part I of the Full Description, it is stated
+C     that dummy names may be passed if these two routines are not user
+C     supplied.  Your system may require the user to supply a dummy
+C     subroutine instead.
+C e.  The ODESSA package treats the arguments NEQ, RTOL, and ATOL as
+C     arrays (possibly of length 1), while the usage documentation
+C     states that these arguments may be either arrays or scalars.
+C     If your system does not allow such a mismatch, then the
+C     documentation should be changed to reflect this.
+C 8.  A demonstration program is provided with the package for
+C     verification.
+C
+C
+C     Jorge R. Leis and Mark A. Kramer
+C     Department of Chemical Engineering
+C     Massachusetts Institute of Technology
+C     Cambridge, Massachusetts  02139
+C     U.S.A.
+C
+C     Current address of J.R. Leis (Jan. 1988):
+C
+C     Shell Development Company
+C     Westhollow Research Center
+C     Houston, TX
+C
+C  @ Adapted from 'Instructions for Installing LSODE', written by
+C    Alan C. Hindmarsh, Mathematics & Statistics Division, L-316,
+C    Lawrence Livermore National Laboratory, Livermore, CA. 94550
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_radau5.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_radau5.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_radau5.def	(revision 3477)
@@ -0,0 +1,5 @@
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+#DOUBLE ON 
+#INTFILE kpp_radau5
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_radau5.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_radau5.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_radau5.f90	(revision 3477)
@@ -0,0 +1,1201 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RADAU5 - Runge-Kutta method based on Radau-2A quadrature               !
+!                       (2 stages, order 5)                               !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision, ONLY: dp
+  USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+  USE KPP_ROOT_Jacobian, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  ! Statistics
+  INTEGER :: Nfun, Njac, Nstp, Nacc, Nrej, Ndec, Nsol, Nsng
+  
+  ! Method parameters
+  KPP_REAL :: Transf(3,3), TransfInv(3,3),      &
+                   rkA(3,3), rkB(3), rkC(3), rkE(3), &
+                   rkGamma, rkAlpha, rkBeta
+  
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-11:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -11 
+    'Step size too small: T + 10*H = T or H < Roundoff ', & ! -10 
+    'No of steps exceeds maximum bound                 ', & ! -9  
+    'Tolerances are too small                          ', & ! -8  
+    'Improper values for Qmin, Qmax                    ', & ! -7  
+    'Newton stopping tolerance too small               ', & ! -6  
+    'Improper value for ThetaMin                       ', & ! -5  
+    'Improper values for FacMin/FacMax/FacSafe/FacRej  ', & ! -4  
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3  
+    'Improper value for maximal no of Newton iterations', & ! -2  
+    'Improper value for maximal no of steps            ', & ! -1  
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+    KPP_REAL, SAVE :: H
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20)
+    INTEGER :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    H =0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(:)  = 0
+    ICNTRL(2)  = 0 ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8 ! Max no. of Newton iterations
+    ICNTRL(6)  = 1 ! Starting values for Newton are interpolated (0) or zero (1)
+    ICNTRL(11) = 1 ! Gustaffson (1) or classic(2) controller
+    RCNTRL(1:20) = 0._dp
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) ICNTRL(1:20) = ICNTRL_U(1:20)
+    IF (PRESENT(RCNTRL_U)) RCNTRL(1:20) = RCNTRL_U(1:20)
+   
+
+    CALL RADAU5(  NVAR,TIN,TOUT,VAR,H,                  &
+                  RTOL,ATOL,                            &
+                  RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+!!$    Ntotal = Ntotal + Nstp
+!!$    PRINT*,'NSTEPS=',Nstp,' (',Ntotal,')'
+
+    Nfun = Nfun + ISTATUS(1)
+    Njac = Njac + ISTATUS(2)
+    Nstp = Nstp + ISTATUS(3)
+    Nacc = Nacc + ISTATUS(4)
+    Nrej = Nrej + ISTATUS(5)
+    Ndec = Ndec + ISTATUS(6)
+    Nsol = Nsol + ISTATUS(7)
+    Nsng = Nsng + ISTATUS(8)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) THEN
+      ISTATUS_U(:) = 0
+      ISTATUS_U(1) = Nfun ! function calls
+      ISTATUS_U(2) = Njac ! jacobian calls
+      ISTATUS_U(3) = Nstp ! steps
+      ISTATUS_U(4) = Nacc ! accepted steps
+      ISTATUS_U(5) = Nrej ! rejected steps (except at the beginning)
+      ISTATUS_U(6) = Ndec ! LU decompositions
+      ISTATUS_U(7) = Nsol ! forward/backward substitutions
+    ENDIF
+    IF (PRESENT(RSTATUS_U)) THEN
+      RSTATUS_U(:) = 0.
+      RSTATUS_U(1) = TOUT ! final time
+    ENDIF
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+! mz_rs_20050716: IERR is returned to the user who then decides what to do
+! about it, i.e. either stop the run or ignore it.
+!!$    IF (IERR < 0) THEN
+!!$      PRINT *,'RADAU: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+!!$      STOP
+!!$    ENDIF
+
+  END SUBROUTINE INTEGRATE
+
+   SUBROUTINE RADAU5(N,T,Tend,Y,H,RelTol,AbsTol,    &
+                       RCNTRL,ICNTRL,RSTATUS,ISTATUS,IDID)
+
+!~~~>-----------------------------------------------
+!     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+!     SYSTEM OF FirstStep 0RDER ORDINARY DIFFERENTIAL EQUATIONS
+!                     M*Y'=F(T,Y).
+!     THE SYSTEM CAN BE (LINEARLY) IMPLICIT (MASS-MATRIX M  /=  I)
+!     OR EXPLICIT (M=I).
+!     THE METHOD USED IS AN IMPLICIT RUNGE-KUTTA METHOD (RADAU IIA)
+!     OF ORDER 5 WITH STEP SIZE CONTROL AND CONTINUOUS OUTPUT.
+!     C.F. SECTION IV.8
+!
+!     AUTHORS: E. HAIRER AND G. WANNER
+!              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!              CH-1211 GENEVE 24, SWITZERLAND
+!              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!     THIS CODE IS PART OF THE BOOK:
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!     VERSION OF SEPTEMBER 30, 1995
+!
+!     INPUT PARAMETERS
+!     ----------------
+!     N           DIMENSION OF THE SYSTEM
+!
+!     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+!                 VALUE OF F(T,Y):
+!                 SUBROUTINE FCN(N,T,Y,F)
+!                    KPP_REAL T,Y(N),F(N)
+!                    F(1)=...   ETC.
+!                 RPAR, IPAR (SEE BELOW)
+!
+!     T           INITIAL TIME VALUE
+!
+!     Tend        FINAL T-VALUE (Tend-T MAY BE POSITIVE OR NEGATIVE)
+!
+!     Y(N)        INITIAL VALUES FOR Y
+!
+!     H           INITIALL STEP SIZE GUESS;
+!                 FOR STIFF EQUATIONS WITH INITIALL TRANSIENT,
+!                 H=1.D0/(NORM OF F'), USUALLY 1.D-3 OR 1.D-5, IS GOOD.
+!                 THIS CHOICE IS NOT VERY IMPORTANT, THE STEP SIZE IS
+!                 QUICKLY ADAPTED. (IF H=0.D0, THE CODE PUTS H=1.D-6).
+!
+!     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!          -----  CONTINUOUS OUTPUT: -----
+!                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+!                 FOR THE INTERVAL [Told,T] IS AVAILABLE THROUGH
+!                 THE FUNCTION
+!                        >>>   CONTR5(I,S,CONT,LRC)   <<<
+!                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+!                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+!                 S SHOULD LIE IN THE INTERVAL [Told,T].
+!                 DO NOT CHANGE THE ENTRIES OF CONT(LRC), IF THE
+!                 DENSE OUTPUT FUNCTION IS USED.
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 10000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(8) == 1:  mod. predictive controller (Gustafsson)
+!              ICNTRL(8) == 2:  classical step size control
+!              the default value (for iwork(8)=0) is iwork(8)=1.
+!              the choice iwork(8) == 1 seems to produce safer results;
+!              for simple problems, the choice iwork(8) == 2 produces
+!              often slightly faster runs
+!              ( currently unused )
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> not used
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> not used
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT PARAMETERS
+!    -----------------
+!    T           T-VALUE FOR WHICH THE SOLUTION HAS BEEN COMPUTED
+!                     (AFTER SUCCESSFUL RETURN T=Tend).
+!
+!    Y(N)        NUMERICAL SOLUTION AT T
+!
+!    H           PREDICTED STEP SIZE OF THE LastStep ACCEPTED STEP
+!
+!    IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!                   For multiple restarts, use Hexit as Hstart 
+!                   in the subsequent run
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: Y(N),AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson
+      INTEGER :: IDID, ITOL
+      KPP_REAL :: H,Tend,T
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit
+      KPP_REAL :: Hstart,Hmin,Hmax,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin,TolNewton
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      !~~~> Local variables
+      INTEGER :: i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+ 
+      !~~~> variables from the former COMMON block /CONRA5/
+      ! KPP_REAL :: Tsol, Hsol
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       Nfun=0
+       Njac=0
+       Nstp=0
+       Nacc=0
+       Nrej=0
+       Ndec=0
+       Nsol=0
+       IDID = 0
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> ICNTRL(3) - method selection - not used       
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 10000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RAD_ErrorMsg(-1,T,ZERO,IDID)
+         END IF
+      END IF
+!~~~> NewtonMaxit    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RAD_ErrorMsg(-2,T,ZERO,IDID)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF
+!~~~> Gustafsson: step size controller
+      IF(ICNTRL(11) == 0)THEN
+         Gustafsson=.TRUE.
+      ELSE
+         Gustafsson=.FALSE.
+      END IF
+
+
+!~~~> Roundoff   SMALLEST NUMBER SATISFYING 1.0d0+Roundoff>1.0d0
+      Roundoff=WLAMCH('E');
+
+!~~~> RCNTRL(1) = Hmin - not used
+      Hmin = ZERO
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax=Tend-T
+      ELSE
+         Hmax=MAX(ABS(RCNTRL(7)),ABS(Tend-T))
+      END IF
+!~~~> RCNTRL(3) = Hstart - not used
+      Hstart = ZERO
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 0.001D0) .OR. (FacSafe >= 1.0d0) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RAD_ErrorMsg(-4,T,ZERO,IDID)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RAD_ErrorMsg(-5,T,ZERO,IDID)
+         END IF
+      END IF
+!~~~> TolNewton:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         TolNewton = 3.0d-2
+      ELSE
+         TolNewton = RCNTRL(9)
+         IF (TolNewton <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RAD_ErrorMsg(-6,T,ZERO,IDID)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RAD_ErrorMsg(-7,T,ZERO,IDID)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RAD_ErrorMsg(-8,T,ZERO,IDID)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RAD_ErrorMsg(-8,T,ZERO,IDID)
+          END IF
+          END DO
+      END IF
+
+!~~~> WHEN A FAIL HAS OCCURED, RETURN
+      IF (IDID < 0) RETURN
+
+      
+!~~~>  CALL TO CORE INTEGRATOR ------------
+      CALL RAD_Integrator( N,T,Y,Tend,Hmax,H,RelTol,AbsTol,ITOL,IDID, &
+        Max_no_steps,Roundoff,FacSafe,ThetaMin,TolNewton,Qmin,Qmax,   &
+        NewtonMaxit,StartNewton,Gustafsson,FacMin,FacMax,FacRej )
+        
+      ISTATUS(1)=Nfun
+      ISTATUS(2)=Njac
+      ISTATUS(3)=Nstp
+      ISTATUS(4)=Nacc
+      ISTATUS(5)=Nrej
+      ISTATUS(6)=Ndec
+      ISTATUS(7)=Nsol
+      ISTATUS(8)=Nsng
+
+   ! END SUBROUTINE RADAU5
+   CONTAINS ! INTERNAL PROCEDURES TO RADAU5
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_Integrator( N,T,Y,Tend,Hmax,H,RelTol,AbsTol,ITOL,IDID, &
+        Max_no_steps,Roundoff,FacSafe,ThetaMin,TolNewton,Qmin,Qmax,      &
+        NewtonMaxit,StartNewton,Gustafsson,FacMin,FacMax,FacRej )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     CORE INTEGRATOR FOR RADAU5
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      INTEGER :: N
+      KPP_REAL  Y(NVAR),Z1(NVAR),Z2(NVAR),Z3(NVAR),Y0(NVAR),&
+                     SCAL(NVAR),F1(NVAR),F2(NVAR),F3(NVAR),      &
+                     CONT(N,4),AbsTol(NVAR),RelTol(NVAR)
+
+#ifdef FULL_ALGEBRA
+      KPP_REAL  :: FJAC(NVAR,NVAR), E1(NVAR,NVAR)
+      DOUBLE COMPLEX :: E2(NVAR,NVAR)   
+#else
+      KPP_REAL  :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      DOUBLE COMPLEX :: E2(LU_NONZERO)   
+#endif
+                  
+      !~~~> Local variables
+      KPP_REAL  :: TMP(NVAR), T, Tend, Tdirection, &
+                 H, Hmax, HmaxN, Hacc, Hnew, Hopt, Hold, &
+                 Fac, FacMin, Facmax, FacSafe, FacRej, FacGus, FacConv, &
+                 Theta, ThetaMin, TolNewton, ERR, ERRACC,   &
+                 Qmin, Qmax, DYNO, Roundoff, &
+                 AK, AK1, AK2, AK3, C3Q, &
+                 Qnewton, DYTH, THQ, THQOLD, DYNOLD, &
+                 DENOM, C1Q, C2Q, ALPHA, BETA, GAMMA, CFAC, ACONT3, QT
+      INTEGER :: IP1(NVAR),IP2(NVAR), ITOL, IDID, Max_no_steps, &
+                 NewtonIter, NewtonMaxit, ISING
+      LOGICAL :: REJECT, FirstStep, FreshJac, LastStep, &
+                 Gustafsson, StartNewton, NewtonDone
+      ! KPP_REAL, PARAMETER  :: ONE = 1.0d0, ZERO = 0.0d0
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  INITIALISATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      CALL RAD_Coefficients
+            
+      Tdirection=SIGN(1.D0,Tend-T)
+      HmaxN=MIN(ABS(Hmax),ABS(Tend-T))
+      H=MIN(ABS(Hmin),ABS(Hstart))
+      H=MIN(ABS(H),HmaxN)
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=SIGN(H,Tdirection)
+      Hold=H
+      REJECT=.FALSE.
+      FirstStep=.TRUE.
+      LastStep=.FALSE.
+      FreshJac=.FALSE.; Theta=1.0d0
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= 0.D0) THEN
+         H=Tend-T
+         LastStep=.TRUE.
+      END IF
+      FacConv=1.D0
+      CFAC=FacSafe*(1+2*NewtonMaxit)
+      Nsng=0
+!      Told=T
+      CALL RAD_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+      CALL FUN_CHEM(T,Y,Y0)
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      !~~~> COMPUTE JACOBIAN MATRIX ANALYTICALLY
+      IF ( (.NOT.FreshJac)  .AND. (Theta > ThetaMin) ) THEN
+        CALL JAC_CHEM(T,Y,FJAC)
+        FreshJac=.TRUE.
+      END IF
+      
+      !~~~> Compute the matrices E1 and E2 and their decompositions
+      GAMMA  = rkGamma/H
+      ALPHA = rkAlpha/H
+      BETA  = rkBeta/H
+      CALL RAD_DecompReal(N,FJAC,GAMMA,E1,IP1,ISING)
+      IF (ISING /= 0) THEN
+          Nsng=Nsng+1
+          IF (Nsng >= 5) THEN
+            CALL RAD_ErrorMsg(-12,T,H,IDID); RETURN
+          END IF
+          H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+          CYCLE Tloop
+      END IF   
+      CALL RAD_DecompCmplx(N,FJAC,ALPHA,BETA,E2,IP2,ISING)
+      IF (ISING /= 0) THEN
+          Nsng=Nsng+1
+          IF (Nsng >= 5) THEN
+            CALL RAD_ErrorMsg(-12,T,H,IDID); RETURN
+          END IF
+          H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+          CYCLE Tloop
+      END IF
+
+   30 CONTINUE
+      Nstp=Nstp+1
+      IF (Nstp > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RAD_ErrorMsg(-9,T,H,IDID); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RAD_ErrorMsg(-10,T,H,IDID); RETURN
+      END IF
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  STARTING VALUES FOR NEWTON ITERATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+         CALL Set2zero(N,F1)
+         CALL Set2zero(N,F2)
+         CALL Set2zero(N,F3)
+      ELSE
+         C3Q=H/Hold
+         C1Q=rkC(1)*C3Q
+         C2Q=rkC(2)*C3Q
+         DO i=1,N
+            AK1=CONT(i,2)
+            AK2=CONT(i,3)
+            AK3=CONT(i,4)
+            Z1(i)=C1Q*(AK1+(C1Q-rkC(2)+ONE)*(AK2+(C1Q-rkC(1)+ONE)*AK3))
+            Z2(i)=C2Q*(AK1+(C2Q-rkC(2)+ONE)*(AK2+(C2Q-rkC(1)+ONE)*AK3))
+            Z3(i)=C3Q*(AK1+(C3Q-rkC(2)+ONE)*(AK2+(C3Q-rkC(1)+ONE)*AK3))
+         END DO
+         !  F(1,2,3) = TransfInv x Z(1,2,3)
+         CALL RAD_Transform(N,TransfInv,Z1,Z2,Z3,F1,F2,F3)
+      END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+            FacConv = MAX(FacConv,Roundoff)**0.8D0
+            Theta=ABS(ThetaMin)
+
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit  
+ 
+            !~~~>  The right-hand side
+            DO i=1,N
+               TMP(i)=Y(i)+Z1(i)
+            END DO
+            CALL FUN_CHEM(T+rkC(1)*H,TMP,Z1)
+            DO i=1,N
+               TMP(i)=Y(i)+Z2(i)
+            END DO
+            CALL FUN_CHEM(T+rkC(2)*H,TMP,Z2)
+            DO i=1,N
+               TMP(i)=Y(i)+Z3(i)
+            END DO
+            CALL FUN_CHEM(T+rkC(3)*H,TMP,Z3)
+
+            !~~~> Solve the linear systems
+            !  Z(1,2,3) = TransfInv x Z(1,2,3)
+            CALL RAD_Transform(N,TransfInv,Z1,Z2,Z3,Z1,Z2,Z3)
+            CALL RAD_Solve( N,FJAC,GAMMA,ALPHA,BETA,E1,E2, &
+                        Z1,Z2,Z3,F1,F2,F3,CONT,IP1,IP2,ISING )
+            Nsol=Nsol+1
+            
+            DYNO=0.0d0
+            DO i=1,N
+               DENOM=SCAL(i)
+               DYNO=DYNO+(Z1(i)/DENOM)**2+(Z2(i)/DENOM)**2+(Z3(i)/DENOM)**2
+            END DO
+            DYNO=SQRT(DYNO/(3*N))
+            
+            !~~~> Bad convergence or number of iterations too large
+            IF ( (NewtonIter > 1) .AND. (NewtonIter < NewtonMaxit) ) THEN
+                THQ=DYNO/DYNOLD
+                IF (NewtonIter == 2) THEN
+                   Theta=THQ
+                ELSE
+                   Theta=SQRT(THQ*THQOLD)
+                END IF
+                THQOLD=THQ
+                IF (Theta < 0.99d0) THEN
+                    FacConv=Theta/(1.0d0-Theta)
+                    DYTH=FacConv*DYNO*Theta**(NewtonMaxit-1-NewtonIter)/TolNewton
+                    IF (DYTH >= 1.0d0) THEN
+                         Qnewton=MAX(1.0D-4,MIN(20.0d0,DYTH))
+                         FAC=.8D0*Qnewton**(-1.0d0/(4.0d0+NewtonMaxit-1-NewtonIter))
+                         H=FAC*H
+                         REJECT=.TRUE.
+                         LastStep=.FALSE.
+                         CYCLE Tloop
+                    END IF
+                ELSE ! Non-convergence of Newton
+                   H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+                   CYCLE Tloop
+                END IF
+            END IF
+            DYNOLD=MAX(DYNO,Roundoff) 
+            CALL WAXPY(N,ONE,Z1,1,F1,1) ! F1 <- F1 + Z1
+            CALL WAXPY(N,ONE,Z2,1,F2,1) ! F2 <- F2 + Z2
+            CALL WAXPY(N,ONE,Z3,1,F3,1) ! F3 <- F3 + Z3
+            !  Z(1,2,3) = Transf x F(1,2,3)
+            CALL RAD_Transform(N,Transf,F1,F2,F3,Z1,Z2,Z3)
+            NewtonDone = (FacConv*DYNO <= TolNewton)
+            IF (NewtonDone) EXIT NewtonLoop
+            
+       END DO NewtonLoop
+            
+       IF (.NOT.NewtonDone) THEN
+           CALL RAD_ErrorMsg(-8,T,H,IDID);
+           H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+           CYCLE Tloop
+       END IF
+
+            
+!~~~> ERROR ESTIMATION
+      CALL  RAD_ErrorEstimate(N,FJAC,H,Y0,Y,T, &
+               E1,Z1,Z2,Z3,IP1,SCAL,ERR,       &
+               FirstStep,REJECT,GAMMA)
+!~~~> COMPUTATION OF Hnew
+      Fac  = ERR**(-0.25d0)*   &
+             MIN(FacSafe,(NewtonIter+2*NewtonMaxit)/CFAC)
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~> IS THE ERROR SMALL ENOUGH ?
+accept:IF (ERR < ONE) THEN !~~~> STEP IS ACCEPTED
+         FirstStep=.FALSE.
+         Nacc=Nacc+1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            !~~~> Currently not implemented
+            IF (Nacc > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(ERR**2/ERRACC)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew=H*Fac
+            END IF
+            Hacc=H
+            ERRACC=MAX(1.0D-2,ERR)
+         END IF
+         ! Told = T
+         Hold = H
+         T=T+H
+         DO i=1,N
+            Y(i)=Y(i)+Z3(i)
+            CONT(i,2)=(Z2(i)-Z3(i))/(rkC(2)-ONE)
+            AK=(Z1(i)-Z2(i))/(rkC(1)-rkC(2))
+            ACONT3=Z1(i)/rkC(1)
+            ACONT3=(AK-ACONT3)/rkC(2)
+            CONT(i,3)=(AK-CONT(i,2))/(rkC(1)-ONE)
+            CONT(i,4)=CONT(i,3)-ACONT3
+         END DO
+         CALL RAD_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         FreshJac=.FALSE.
+         IF (LastStep) THEN
+            H=Hopt
+            IDID=1
+            RETURN
+         END IF
+         CALL FUN_CHEM(T,Y,Y0)
+         Hnew=Tdirection*MIN(ABS(Hnew),HmaxN)
+         Hopt=Hnew
+         Hopt=MIN(H,Hnew)
+         IF (REJECT) Hnew=Tdirection*MIN(ABS(Hnew),ABS(H))
+         REJECT=.FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >= 0.D0) THEN
+            H=Tend-T
+            LastStep=.TRUE.
+         ELSE
+            QT=Hnew/H
+            IF ( (Theta<=ThetaMin) .AND. (QT>=Qmin) &
+                            .AND. (QT<=Qmax) ) GOTO 30
+            H=Hnew
+         END IF
+         CYCLE Tloop
+      ELSE accept !~~~> STEP IS REJECTED
+         REJECT=.TRUE.
+         LastStep=.FALSE.
+         IF (FirstStep) THEN
+             H=H*FacRej
+         ELSE
+             H=Hnew
+         END IF
+         IF (Nacc >= 1) Nrej=Nrej+1
+         CYCLE Tloop
+      END IF accept
+      
+      
+      END DO Tloop
+      
+
+   END SUBROUTINE RAD_Integrator
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RAD_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RADAU5 due to the following error:'
+   IF ((Code>=-11).AND.(Code<=-1)) THEN
+     PRINT *, IERR_NAMES(Code)
+   ELSE
+     PRINT *, 'Unknown Error code: ', Code
+   ENDIF
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE RAD_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RAD_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)=AbsTol(1)+RelTol(1)*ABS(Y(i))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=AbsTol(i)+RelTol(i)*ABS(Y(i))
+       END DO
+   END IF
+      
+ END SUBROUTINE RAD_ErrorScale
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RAD_Transform(N,Tr,Z1,Z2,Z3,F1,F2,F3)
+!~~~>                 F = Tr x Z
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, i
+      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),F1(N),F2(N),F3(N)
+      KPP_REAL :: x1, x2, x3
+      DO i=1,N
+          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+          F1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+          F2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+          F3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+      END DO
+  END SUBROUTINE RAD_Transform
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RAD_Coefficients
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: s2,s3,s6,x1,x2,x3,x4,y1,y2,y3,y4,y5
+      
+      s2 = SQRT(2.0d0);
+      s3 = SQRT(3.0d0);
+      s6 = SQRT(6.0d0);
+      x1 = 3.d0**(1.d0/3.d0);
+      x2 = 3.d0**(2.d0/3.d0);
+      x3 = 3.d0**(1.d0/6.d0);
+      x4 = 3.d0**(5.d0/6.d0);
+      
+      rkA(1,1) =  11.d0/45.d0-7.d0/360.d0*s6
+      rkA(1,2) =  37.d0/225.d0-169.d0/1800.d0*s6
+      rkA(1,3) =  -2.d0/225.d0+s6/75
+      rkA(2,1) =  37.d0/225.d0+169.d0/1800.d0*s6
+      rkA(2,2) =  11.d0/45.d0+7.d0/360.d0*s6
+      rkA(2,3) =  -2.d0/225.d0-s6/75
+      rkA(3,1) =  4.d0/9.d0-s6/36
+      rkA(3,2) =  4.d0/9.d0+s6/36
+      rkA(3,3) =  1.d0/9.d0
+      
+      rkB(1)   =  4.d0/9.d0-s6/36
+      rkB(2)   =  4.d0/9.d0+s6/36
+      rkB(3)   =  1.d0/9.d0
+      
+      rkC(1)   =  2.d0/5.d0-s6/10
+      rkC(2)   =  2.d0/5.d0+s6/10
+      rkC(3)   =  1.d0
+
+      ! Error estimation
+      rkE(1) = -(13.d0+7.d0*s6)/3.d0
+      rkE(2) =  (-13.d0+7.d0*s6)/3.d0
+      rkE(3) = -1.d0/3.d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:
+      ! TransfInv * inv(rkA) * Transf =
+      !       |  rkGamma      0           0       |
+      !       |      0      rkAlpha   -rkBeta   |
+      !       |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      rkGamma =  3-x1+x2
+      rkAlpha =  x1/2-x2/2+3
+      rkBeta  =  -x4/2-3.d0/2.d0*x3
+
+      y1 = 36.d0/625.d0*s6
+      y2 = 129.d0/2500.d0*x1
+      y3 = 111.d0/2500.d0*x3*s2
+      Transf(1,1) = -31.d0/1250.d0*s6*x1+37.d0/1250.d0*s6*x2-y1 &
+                    +129.d0/1250.d0*x1-33.d0/1250.d0*x2+49.d0/625.d0
+      Transf(1,2) =  -y1-y2-y3 &
+                    +31.d0/2500.d0*x4*s2+33.d0/2500.d0*x2+49.d0/625.d0
+      Transf(1,3) =  3.d0/2500.d0*x3*(-33-43*x2+31*x3*s2+37*s3*s2)
+      Transf(2,1) =  31.d0/1250.d0*s6*x1-37.d0/1250.d0*s6*x2+y1 &
+                    +129.d0/1250.d0*x1-33.d0/1250.d0*x2+49.d0/625.d0
+      Transf(2,2) =  y1-y2+y3&
+                    -31.d0/2500.d0*x4*s2+33.d0/2500.d0*x2+49.d0/625.d0
+      Transf(2,3) =  -3.d0/2500.d0*x3*(33+43*x2+31*x3*s2+37*s3*s2)
+      Transf(3,1) =  1.d0
+      Transf(3,2) =  1.d0
+      Transf(3,3) =  0.d0
+      
+      y1 = 11.d0/36.d0*x3*s2 + 43.d0/108.d0*x4*s2
+      y2 = 11.d0/36.d0*s2*x2 - 43.d0/36.d0*s2*x1
+      y3 = 31.d0/54.d0*x1 + 37.d0/54.d0*x2
+      y4 = 31.d0/54.d0*x4-37.d0/18.d0*x3
+      y5 = -x2/27+5.d0/27.d0*x1
+      TransfInv(1,1) =  y1 + y3
+      TransfInv(1,2) = -y1 + y3
+      TransfInv(1,3) =  y5 + 1.d0/3.d0
+      TransfInv(2,1) = -y1 - y3
+      TransfInv(2,2) =  y1 - y3
+      TransfInv(2,3) = -y5 + 2.d0/3.d0
+      TransfInv(3,1) =  y4 - y2
+      TransfInv(3,2) =  y4 + y2
+      TransfInv(3,3) =  x3/9+5.d0/27.d0*x4
+      
+   END SUBROUTINE RAD_Coefficients
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_DecompReal(N,FJAC,GAMMA,E1,IP1,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N, ISING
+      KPP_REAL :: GAMMA
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: FJAC(NVAR,NVAR),E1(NVAR,NVAR)
+#else      
+      KPP_REAL :: FJAC(LU_NONZERO),E1(LU_NONZERO)
+#endif      
+      INTEGER :: IP1(N), i, j
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+GAMMA
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,NVAR
+         j = LU_DIAG(i); E1(j)=E1(j)+GAMMA
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+   END SUBROUTINE RAD_DecompReal
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_DecompCmplx(N,FJAC,ALPHA,BETA,E2,IP2,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL ::  FJAC(N,N)
+      DOUBLE COMPLEX :: E2(N,N)
+#else      
+      KPP_REAL ::  FJAC(LU_NONZERO)
+      DOUBLE COMPLEX :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL :: ALPHA, BETA
+      INTEGER :: IP2(N), i, j
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), 0.0d0 )
+        END DO
+        E2(j,j) = E2(j,j) + DCMPLX( ALPHA, BETA )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), 0.0d0 )
+      END DO
+      DO i=1,NVAR
+         j = LU_DIAG(i); E2(j)=E2(j)+DCMPLX( ALPHA, BETA )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      Ndec=Ndec+1
+      
+   END SUBROUTINE RAD_DecompCmplx
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_Solve(N,FJAC,GAMMA,ALPHA,BETA,E1,E2,&
+               Z1,Z2,Z3,F1,F2,F3,CONT,IP1,IP2,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N,IP1(NVAR),IP2(NVAR),ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL  :: FJAC(NVAR,NVAR), E1(NVAR,NVAR)
+      DOUBLE COMPLEX :: E2(NVAR,NVAR)
+#else      
+      KPP_REAL  :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      DOUBLE COMPLEX :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL :: Z1(N),Z2(N),Z3(N),   &
+               F1(N),F2(N),F3(N),CONT(N),   &
+               GAMMA,ALPHA,BETA
+      DOUBLE COMPLEX :: BC(N)
+      INTEGER :: i,j
+      KPP_REAL :: S2, S3
+!
+      DO i=1,N
+         S2=-F2(i)
+         S3=-F3(i)
+         Z1(i)=Z1(i)-F1(i)*GAMMA
+         Z2(i)=Z2(i)+S2*ALPHA-S3*BETA
+         Z3(i)=Z3(i)+S3*ALPHA+S2*BETA
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,Z1,N,0) 
+#else      
+      CALL KppSolve (E1,Z1)
+#endif      
+      
+      DO j=1,N
+        BC(j) = DCMPLX(Z2(j),Z3(j))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,0) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO j=1,N
+        Z2(j) = DBLE( BC(j) )
+        Z3(j) = AIMAG( BC(j) )
+      END DO
+
+   END SUBROUTINE RAD_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_ErrorEstimate(N,FJAC,H,Y0,Y,T,&
+               E1,Z1,Z2,Z3,IP1,SCAL,ERR,        &
+               FirstStep,REJECT,GAMMA)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: FJAC(NVAR,NVAR),  E1(NVAR,NVAR)
+#else      
+      KPP_REAL :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+#endif      
+      KPP_REAL :: SCAL(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N), &
+               Y0(N),Y(N),TMP(N),T,H,GAMMA
+      INTEGER :: IP1(N), i
+      LOGICAL FirstStep,REJECT
+      KPP_REAL :: HEE1,HEE2,HEE3,ERR
+
+      HEE1 = rkE(1)/H
+      HEE2 = rkE(2)/H
+      HEE3 = rkE(3)/H
+
+      DO  i=1,N
+         F2(i)=HEE1*Z1(i)+HEE2*Z2(i)+HEE3*Z3(i)
+         TMP(i)=F2(i)+Y0(i)
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+#else      
+      CALL KppSolve (E1, TMP)
+#endif      
+
+      ERR=0.D0
+      DO  i=1,N
+         ERR=ERR+(TMP(i)/SCAL(i))**2
+      END DO
+      ERR=MAX(SQRT(ERR/N),1.D-10)
+!
+      IF (ERR < 1.D0) RETURN
+firej:IF (FirstStep.OR.REJECT) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          ERR=0.D0
+          DO i=1,N
+             ERR=ERR+(TMP(i)/SCAL(i))**2
+          END DO
+          ERR=MAX(SQRT(ERR/N),1.0d-10)
+       END IF firej
+ 
+   END SUBROUTINE RAD_ErrorEstimate
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   KPP_REAL FUNCTION CONTR5(I,N,T,CONT)
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!!     THIS FUNCTION CAN BE USED FOR CONTINUOUS OUTPUT. IT PROVIDES AN
+!!     APPROXIMATION TO THE I-TH COMPONENT OF THE SOLUTION AT T.
+!!     IT GIVES THE VALUE OF THE COLLOCATION POLYNOMIAL, DEFINED FOR
+!!     THE STEP SUCCESSFULLY COMPUTED STEP (BY RADAU5).
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: I, N
+!      KPP_REAL :: T, CONT(N,4)
+!      KPP_REAL :: S 
+!      KPP_REAL, PARAMETER :: ONE = 1.0d0 
+!      S=(T-Tsol)/Hsol
+!      CONTR5=CONT(i,1)+S* &
+!        (CONT(i,2)+(S-rkC(2)+ONE)*(CONT(i,3)+(S-rkC(1)+ONE)*CONT(i,4)))
+!   END FUNCTION CONTR5
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RADAU5 ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, Told
+
+    !Told = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+    Nfun=Nfun+1
+
+  END SUBROUTINE FUN_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T, Told
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+    INTEGER :: i, j 
+#else
+    KPP_REAL :: JF(LU_NONZERO)
+#endif   
+
+    !Told = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+    
+    Njac=Njac+1
+
+  END SUBROUTINE JAC_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_sdirk4
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.f	(revision 3477)
@@ -0,0 +1,705 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      PARAMETER (LWORK=2*NVAR*NVAR+12*NVAR+7,LIWORK=2*NVAR+7)
+      PARAMETER (LRCONT=5*NVAR+2)
+
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      COMMON /CONT/ ICONT(4),RCONT(LRCONT)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      IWORK(3) = 8
+
+      CALL ATMSDIRK(NVAR,FUNC_CHEM,TIN,VAR,TOUT,STEPMIN,
+     &                  RTOL,ATOL,ITOL,
+     &                  JAC_CHEM ,IJAC, FUNC_CHEM ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMSDIRK: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMSDIRK(N,FCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC, MAS ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)
+C ----------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(1),RelTol(1),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL IMPLCT,JBAND,ARRET
+      EXTERNAL FCN,JAC,MAS
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS
+C *** *** *** *** *** *** ***
+       NFCN=0
+       NJAC=0
+       NSTEP=0
+       NACCPT=0
+       NREJCT=0
+       NDEC=0
+       NSOL=0
+       ARRET=.FALSE.
+C -------- SWITCH FOR TRANSFORMATION OF JACOBIAN TO HESS_CHEM FORM ---
+      NHESS1 = 0         ! ADRIAN
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(2).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NIT    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF(IWORK(3).EQ.0)THEN
+         NIT=8
+      ELSE
+         NIT=IWORK(3)
+         IF(NIT.LE.0)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- METH    SWITCH FOR THE COEFFICIENTS OF THE METHOD
+      METH = 2
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.1.D-19.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 20 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      IF(WORK(2).EQ.0.D0)THEN
+         SAFE=0.9D0
+      ELSE
+         SAFE=WORK(2)
+         IF(SAFE.LE..001D0.OR.SAFE.GE.1.D0)THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(2)=',WORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(WORK(3).EQ.0.D0)THEN
+         THET=0.001D0
+      ELSE
+         THET=WORK(3)
+      END IF
+C --- FNEWT   STOPPING CRIERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+      IF(WORK(4).EQ.0.D0)THEN
+         FNEWT=0.03D0
+      ELSE
+         FNEWT=WORK(4)
+      END IF
+C --- QUOT1 AND QUOT2: IF QUOT1 < HNEW/HOLD < QUOT2, STEP SIZE = CONST.
+      IF(WORK(5).EQ.0.D0)THEN
+         QUOT1=1.D0
+      ELSE
+         QUOT1=WORK(5)
+      END IF
+      IF(WORK(6).EQ.0.D0)THEN
+         QUOT2=1.2D0
+      ELSE
+         QUOT2=WORK(6)
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(7).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(7)
+      END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO 15 I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+  15      CONTINUE
+      END IF
+
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- IMPLICIT, BANDED OR NOT ?
+      IMPLCT=IMAS.NE.0
+      ARRET=.FALSE.
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN
+         LDJAC=N
+C -- MATRIX E FOR LINEAR ALGEBRA
+         LDE=N
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 1'
+      ELSE
+          LDMAS=0
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYHAT=8
+      IEZ=IEYHAT+N
+      IEY0=IEZ+N
+      IEZ1=IEY0+N
+      IEZ2=IEZ1+N
+      IEZ3=IEZ2+N
+      IEZ4=IEZ3+N
+      IEZ5=IEZ4+N
+      IESCAL=IEZ5+N
+      IEF1=IESCAL+N
+      IEG1=IEF1+N
+      IEH1=IEG1+N
+      IEJAC=IEH1+N
+      IEMAS=IEJAC+N*LDJAC
+      IEE=IEMAS+N*LDMAS
+
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+N*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=5
+      IEHES=IEIP+N
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEHES+N-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C --------- CONTROL OF LENGTH OF COMMON BLOCK "CONT" -------
+      IF(LRCONT.LT.(5*N+2))THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR RCONT, MIN. LRCONT=',5*N+2
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,JBAND,LDJAC,LDE,LDMAS2,
+     &   WORK(IEYHAT),WORK(IEZ),WORK(IEY0),WORK(IEZ1),WORK(IEZ2),
+     &   WORK(IEZ3),WORK(IEZ4),WORK(IEZ5),WORK(IESCAL),WORK(IEF1),
+     &   WORK(IEG1),WORK(IEH1),WORK(IEJAC),WORK(IEE),
+     &   WORK(IEMAS),IWORK(IEIP),IWORK(IEHES))
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,BANDED,LDJAC,LE,LDMAS,
+     &   YHAT,Z,Y0,Z1,Z2,Z3,Z4,Z5,SCAL,F1,G1,H1,FJAC,E,FMAS,IP,IPHES)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR SDIRK4
+C     PARAMETERS SAME AS IN SDIRK4 WITH WORKSPACE ADDED
+C ----------------------------------------------------------
+C         DECLARATIONS
+C ----------------------------------------------------------
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      KPP_REAL Y(N),YHAT(N),Z(N),Y0(N),Z1(N),Z2(N),Z3(N),Z4(N),Z5(N)
+      KPP_REAL SCAL(N),F1(N),G1(N),H1(N)
+      KPP_REAL FJAC(LU_NONZERO),E(LU_NONZERO),FMAS(LDMAS,N)
+      KPP_REAL AbsTol(1),RelTol(1)
+      INTEGER IP(N),IPHES(N)
+      LOGICAL REJECT,FIRST,IMPLCT,BANDED,CALJAC,NEWTRE
+      COMMON /CONT/NN,NN2,NN3,NN4,XOLD,HSOL,CONT(5*NVAR)
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      EXTERNAL MAS, FCN, JAC
+
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+
+C --------- DUPLIFY N FOR COMMON BLOCK CONT -----
+      NN=N
+      NN2=2*N
+      NN3=3*N
+      NN4=4*N
+
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF(IMPLCT) CALL MAS(N,FMAS,LDMAS)
+
+C ---------- CONSTANTS ---------
+      MBDIAG=MUMAS+1
+      IF (METH.EQ.2) THEN
+C ---------- METHOD WITH GAMMA = 4/15 ---------------
+          GAMMA=4.0D0/15.0D0
+          C2=23.0D0/30.0D0
+          C3=17.0D0/30.0D0
+          C4=2881.0D0/28965.0D0+GAMMA
+          ALPH21=15.0D0/8.0D0
+          ALPH31=1577061.0D0/922880.0D0
+          ALPH32=-23427.0D0/115360.0D0
+          ALPH41=647163682356923881.0D0/2414496535205978880.0D0
+          ALPH42=-593512117011179.0D0/3245291041943520.0D0
+          ALPH43=559907973726451.0D0/1886325418129671.0D0
+          ALPH51=724545451.0D0/796538880.0D0
+          ALPH52=-830832077.0D0/267298560.0D0
+          ALPH53=30957577.0D0/2509272.0D0
+          ALPH54=-69863904375173.0D0/6212571137048.0D0
+          E1=7752107607.0D0/11393456128.0D0
+          E2=-17881415427.0D0/11470078208.0D0
+          E3=2433277665.0D0/179459416.0D0
+          E4=-96203066666797.0D0/6212571137048.0D0
+          D11= 24.74416644927758D0
+          D12= -4.325375951824688D0
+          D13= 41.39683763286316D0
+          D14= -61.04144619901784D0
+          D15= -3.391332232917013D0
+          D21= -51.98245719616925D0
+          D22= 10.52501981094525D0
+          D23= -154.2067922191855D0
+          D24= 214.3082125319825D0
+          D25= 14.71166018088679D0
+          D31= 33.14347947522142D0
+          D32= -19.72986789558523D0
+          D33= 230.4878502285804D0
+          D34= -287.6629744338197D0
+          D35= -18.99932366302254D0
+          D41= -5.905188728329743D0
+          D42= 13.53022403646467D0
+          D43= -117.6778956422581D0
+          D44= 134.3962081008550D0
+          D45= 8.678995715052762D0
+         ETA1=23.D0/8.D0
+         ANU1= 0.9838473040915402D0
+         ANU2= 0.3969226768377252D0
+         AMU1= 0.6563374010466914D0
+         AMU3= 0.3372498196189311D0
+      ELSE
+         PRINT *, 'WRONG  CHOICE OF <METH>'
+      END IF
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAX1=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAX1)
+      H=SIGN(H,POSNEG)
+      HOLD=H
+      CFAC=SAFE*(1+2*NIT)
+      NEWTRE=.FALSE.
+      REJECT=.FALSE.
+      FIRST=.TRUE.
+      FACCO1=1.D0
+      FACCO2=1.D0
+      FACCO3=1.D0
+      FACCO4=1.D0
+      FACCO5=1.D0
+      NSING=0
+      XOLD=X
+      IF (ITOL.EQ.0) THEN
+          DO 8 I=1,N
+   8      SCAL(I)=1.D0 / ( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+      ELSE
+          DO 9 I=1,N
+   9      SCAL(I)=1.D0 / ( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+      END IF
+
+C --- BASIC INTEGRATION STEP
+  10  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      CALL JAC(N,X,Y,FJAC)
+      CALJAC=.TRUE.
+  20  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+C *** *** *** *** *** *** ***
+      FAC1=1.D0/(H*GAMMA)
+      IF (IMPLCT) THEN
+         print *, 'IMPLCT 4'
+      ELSE  ! EXPLICIT SYSTEM
+C --- THE MATRIX E (MAS=IDENTITY, JACOBIAN A FULL MATRIX)
+c         DO 526 J=1,N
+c           DO 525 I=1,N
+c 525         E(I,J)=-FJAC(I,J)
+c 526       E(J,J)=E(J,J)+FAC1
+c         CALL DEC(N,LE,E,IP,IER)
+          DO K=1,LU_NONZERO
+             E(K) = -FJAC(K)
+          END DO
+          DO I=1,N
+             IDG = LU_DIAG(I)
+             E(IDG) = E(IDG) + FAC1
+          END DO
+          CALL KppDecomp ( E, IER)
+
+         IF (IER.NE.0) GOTO 79
+      END IF
+      NDEC=NDEC+1
+  30  CONTINUE
+
+      IF (NSTEP.GT.NMAX.OR.X+.1D0*H.EQ.X.OR.ABS(H).LE.UROUND) GOTO 79
+      XPH=X+H
+C --- LOOP FOR THE 5 STAGES
+      FACCO1=DMAX1(FACCO1,UROUND)**0.8D0
+      FACCO2=DMAX1(FACCO2,UROUND)**0.8D0
+      FACCO3=DMAX1(FACCO3,UROUND)**0.8D0
+      FACCO4=DMAX1(FACCO4,UROUND)**0.8D0
+      FACCO5=DMAX1(FACCO5,UROUND)**0.8D0
+
+C *** *** *** *** *** *** ***
+C  STARTING VALUES FOR NEWTON ITERATION
+C *** *** *** *** *** *** ***
+      DO 59 ISTAGE=1,5
+      IF (ISTAGE.EQ.1) THEN
+          XCH=X+GAMMA*H
+          IF (FIRST.OR.NEWTRE) THEN
+              DO 132 I=1,N
+ 132          Z(I)=0.D0
+          ELSE
+              S=1.D0+GAMMA*H/HOLD
+              DO 232 I=1,N
+c  232          Z(I) = 0.D0
+ 232          Z(I)=S*(CONT(I+NN)+S*(CONT(I+NN2)+S*(CONT(I+NN3)
+     &             +S*CONT(I+NN4))))-YHAT(I)
+
+          END IF
+          DO 31 I=1,N
+  31      G1(I)=0.D0
+          FACCON=FACCO1
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          XCH=X+C2*H
+          DO 131 I=1,N
+          Z1I=Z1(I)
+          Z(I)=ETA1*Z1I
+ 131      G1(I)=ALPH21*Z1I
+          FACCON=FACCO2
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          XCH=X+C3*H
+          DO 231 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z(I)=ANU1*Z1I+ANU2*Z2I
+ 231      G1(I)=ALPH31*Z1I+ALPH32*Z2I
+          FACCON=FACCO3
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          XCH=X+C4*H
+          DO 331 I=1,N
+          Z1I=Z1(I)
+          Z3I=Z3(I)
+          Z(I)=AMU1*Z1I+AMU3*Z3I
+ 331      G1(I)=ALPH41*Z1I+ALPH42*Z2(I)+ALPH43*Z3I
+          FACCON=FACCO4
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          XCH=XPH
+          DO 431 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z(I)=E1*Z1I+E2*Z2I+E3*Z3I+E4*Z4I
+          YHAT(I)=Z(I)
+ 431      G1(I)=ALPH51*Z1I+ALPH52*Z2I+ALPH53*Z3I+ALPH54*Z4I
+          FACCON=FACCO5
+      END IF
+
+
+
+C *** *** *** *** *** *** *** *** *** *** ***
+C  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+C *** *** *** *** *** *** *** *** *** *** ***
+            NEWT=0
+            THETA=ABS(THET)
+            IF (REJECT) THETA=2*ABS(THET)
+  40        CONTINUE
+            IF (NEWT.GE.NIT) THEN
+                H=H/2.D0
+                REJECT=.TRUE.
+                NEWTRE=.TRUE.
+                IF (CALJAC) GOTO 20
+                GOTO 10
+            END IF
+
+C ---     COMPUTE THE RIGHT-HAND SIDE
+            DO 41 I=1,N
+            H1(I)=G1(I)-Z(I)
+  41        CONT(I)=Y(I)+Z(I)
+            CALL FCN(N,XCH,CONT,F1)
+            NFCN=NFCN+1
+
+C ---     KppSolve THE LINEAR SYSTEMS
+            IF (IMPLCT) THEN
+                print *, 'IMPLCT 2'
+            ELSE
+                DO 345 I=1,N
+ 345            F1(I)=H1(I)*FAC1+F1(I)
+C                CALL SOL(N,LE,E,F1,IP)
+                CALL KppSolve(E, F1)
+            END IF
+            NEWT=NEWT+1
+            DYNO=0.D0
+C --- NORM 2 ---
+            DO 57 I=1,N
+  57        DYNO=DYNO+(F1(I)*SCAL(I))**2
+            DYNO=DSQRT(DYNO/N)
+C --- NORM INF ---
+C            DO 57 I=1,N
+C  57        DYNO=DMAX1( DYNO, DABS(F1(I)*SCAL(I)) )
+
+
+C ---     BAD CONVERGENCE OR NUMBER OF ITERATIONS TO LARGE
+            IF (NEWT.GE.2.AND.NEWT.LT.NIT) THEN
+                THETA=DYNO/DYNOLD
+                IF (THETA.LT.0.99D0) THEN
+                    FACCON=THETA/(1.0D0-THETA)
+                    DYTH=FACCON*DYNO*THETA**(NIT-1-NEWT)
+                    QNEWT=DMAX1(1.0D-4,DMIN1(16.0D0,DYTH/FNEWT))
+                    IF (QNEWT.GE.1.0D0) THEN
+                         H=.8D0*H*QNEWT**(-1.0D0/(NIT-NEWT))
+                         REJECT=.TRUE.
+                         NEWTRE=.TRUE.
+                         IF (CALJAC) GOTO 20
+                         GOTO 10
+                    END IF
+                ELSE
+                    NEWTRE=.TRUE.
+                    GOTO 78
+                END IF
+            END IF
+            DYNOLD=DYNO
+            DO 58 I=1,N
+  58        Z(I)=Z(I)+F1(I)
+            NSOL=NSOL+1
+            IF (FACCON*DYNO.GT.FNEWT) GOTO 40
+
+C --- END OF SIMPILFIED NEWTON
+      IF (ISTAGE.EQ.1) THEN
+          DO I=1,N
+            Z1(I) = Z(I)
+          END DO
+          FACCO1=FACCON
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          DO I=1,N
+            Z2(I) = Z(I)
+          END DO
+          FACCO2=FACCON
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          DO I=1,N
+            Z3(I) = Z(I)
+          END DO
+          FACCO3=FACCON
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          DO I=1,N
+            Z4(I) = Z(I)
+          END DO
+          FACCO4=FACCON
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          DO I=1,N
+            Z5(I) = Z(I)
+          END DO
+          FACCO5=FACCON
+      END IF
+  59  CONTINUE
+
+
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 3'
+      ELSE
+          DO 461 I=1,N
+ 461      CONT(I)=FAC1*(Z5(I)-YHAT(I))
+      END IF
+
+      CALL KppSolve(E, CONT)
+
+      ERR=0.D0
+C ---- NORM 2 ---
+      DO 64 I=1,N
+  64  ERR=ERR+(CONT(I)*SCAL(I))**2
+      ERR=DMAX1(DSQRT(ERR/N),1.D-10)
+
+C ---- NORM INF ---
+C      DO 64 I=1,N
+c  64  ERR=DMAX1( ERR, DABS( CONT(I)*SCAL(I) ) )
+
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .25<=HNEW/H<=10.
+      FAC=DMIN1(SAFE,CFAC/(NEWT+2*NIT))
+      QUOT=DMAX1(.25D0,DMIN1(10.D0,(ERR)**.25D0/FAC))
+      HNEW= H/QUOT
+
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LT.1.D0) THEN
+C --- STEP IS ACCEPTED
+         FIRST=.FALSE.
+         NACCPT=NACCPT+1
+         HOLD=H
+         XOLD=X
+C --- COEFFICIENTS FOR CONTINUOUS SOLUTION
+         DO 74 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z5I=Z5(I)
+         CONT(I)=Y(I)
+         Y(I)=Y(I)+Z5I
+         CONT(I+NN) =D11*Z1I+D12*Z2I+D13*Z3I+D14*Z4I+D15*Z5I
+         CONT(I+NN2)=D21*Z1I+D22*Z2I+D23*Z3I+D24*Z4I+D25*Z5I
+         CONT(I+NN3)=D31*Z1I+D32*Z2I+D33*Z3I+D34*Z4I+D35*Z5I
+         CONT(I+NN4)=D41*Z1I+D42*Z2I+D43*Z3I+D44*Z4I+D45*Z5I
+         YHAT(I)=Z5I
+         IF (ITOL.EQ.0) THEN
+           SCAL(I)=1.D0/( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+         ELSE
+           SCAL(I)=1.D0/( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+         END IF
+  74     CONTINUE
+         X=XPH
+         CALJAC=.FALSE.
+         IF ((X-XEND)*POSNEG+UROUND.GT.0.D0) THEN
+            H=HOPT
+            IDID=1
+            RETURN
+         END IF
+         IF (IJAC.EQ.0) CALL FCN(N,X,Y,Y0)
+         NFCN=NFCN+1
+         HNEW=POSNEG*DMIN1(DABS(HNEW),HMAX1)
+         HOPT=HNEW
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H))
+         REJECT=.FALSE.
+         NEWTRE=.FALSE.
+         IF ((X+HNEW/QUOT1-XEND)*POSNEG.GT.0.D0) THEN
+            H=XEND-X
+         ELSE
+            QT=HNEW/H
+            IF (THETA.LE.THET.AND.QT.GE.QUOT1.AND.QT.LE.QUOT2) GOTO 30
+            H = HNEW
+         END IF
+         IF (THETA.LE.THET) GOTO 20
+         GOTO 10
+
+      ELSE
+C --- STEP IS REJECTED
+         REJECT=.TRUE.
+         IF (FIRST) THEN
+             H=H/10.D0
+         ELSE
+             H=HNEW
+         END IF
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         IF (CALJAC) GOTO 20
+         GOTO 10
+      END IF
+
+C --- UNEXPECTED STEP-REJECTION
+  78  CONTINUE
+      IF (IER.NE.0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, IER=',IER,' X=',X,' H=',H
+          NSING=NSING+1
+          IF (NSING.GE.6) GOTO 79
+      END IF
+      H=H*0.5D0
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 20
+      GOTO 10
+
+C --- FAIL EXIT
+  79  WRITE (6,979) X,H,IER
+ 979  FORMAT(' EXIT OF SDIRK4 AT X=',D14.7,'   H=',D14.7,'   IER=',I4)
+      IDID=-1
+      RETURN
+      END
+C
+
+
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_sdirk4.f90	(revision 3477)
@@ -0,0 +1,972 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SDIRK - Singly-Diagonally-Implicit Runge-Kutta method                  !
+!                       (L-stable, 5 stages, order 4)                     !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+! A. Sandu - version of July 10, 2005
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve, &
+               Set2zero, WLAMCH, WAXPY, WCOPY
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  !~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4,  &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihexit=2
+  !  SDIRK method coefficients
+  KPP_REAL :: rkAlpha(5,4), rkBeta(5,4), rkD(4,5),  &
+                   rkGamma, rkA(5,5), rkB(5), rkC(5)
+                   
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-8:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -8
+    'Step size too small: T + 10*H = T or H < Roundoff ', & ! -7
+    'No of steps exceeds maximum bound                 ', & ! -6
+    'Improper tolerance values                         ', & ! -5
+    'FacMin/FacMax/FacRej must be positive             ', & ! -4
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3
+    'Improper value for maximal no of Newton iterations', & ! -2
+    'Improper value for maximal no of steps            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+   !INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER  :: ICNTRL(20), ISTATUS(20), IERR
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+   CALL SDIRK( NVAR,TIN,TOUT,VAR,RTOL,ATOL,          &
+               RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+
+! mz_rs_20050716: IERR and ISTATUS(istp) are returned to the user who then
+! decides what to do about it, i.e. either stop the run or ignore it.
+!!$   IF (IERR < 0) THEN
+!!$        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (IERR=',IERR,')'
+!!$   ENDIF
+!!$   Ntotal = Ntotal + Nstp
+!!$   PRINT*,'NSTEPS=',Nstp, '(',Ntotal,')'
+
+    STEPMIN = RSTATUS(ihexit) ! Save last step
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) THEN
+     RSTATUS_U(:) = RSTATUS(:)
+     RSTATUS_U(1) = TOUT ! final time
+   END IF  
+   IF (PRESENT(IERR_U))    IERR_U       = IERR
+
+   END SUBROUTINE INTEGRATE
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK(N, Tinitial, Tfinal, Y, RelTol, AbsTol,     &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, IDID)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    For details on SDIRK methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    IDID            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last predicted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal,    &
+                    RelTol(NVAR), AbsTol(NVAR), RCNTRL(20)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      INTEGER, INTENT(OUT)         :: IDID
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+! Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax, &
+                       Texit, Hexit
+      INTEGER :: ITOL, NewtonMaxit, Max_no_steps, i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0
+
+!~~~>  Initialize statistics
+   Nfun = ISTATUS(ifun)
+   Njac = ISTATUS(ijac)
+   Nstp = ISTATUS(istp)
+   Nacc = ISTATUS(iacc)
+   Nrej = ISTATUS(irej)
+   Ndec = ISTATUS(idec)
+   Nsol = ISTATUS(isol)
+   Nsng = ISTATUS(isng)
+!   Nfun=0; Njac=0; Nstp=0; Nacc=0
+!   Nrej=0; Ndec=0; Nsol=0; Nsng=0
+       
+   IDID = 0
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      ITOL = 1
+   ELSE
+      ITOL = 0
+   END IF
+
+!~~~>   The maximum number of time steps admitted
+   IF (ICNTRL(3) == 0) THEN
+      Max_no_steps = 100000
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(3)
+   ELSE
+      PRINT * ,'User-selected ICNTRL(3)=',ICNTRL(3)
+      CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,IDID)
+   END IF
+
+
+!~~~> The maximum number of Newton iterations admitted
+   IF(ICNTRL(4) == 0)THEN
+      NewtonMaxit=8
+   ELSE
+      NewtonMaxit=ICNTRL(4)
+      IF(NewtonMaxit <= 0)THEN
+          PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+          CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,IDID)
+      END IF
+   END IF
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN
+      Hmin = RCNTRL(1)
+   ELSE
+      PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+      CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,IDID)
+   END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tfinal-Tinitial)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+      CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,IDID)
+   END IF
+   
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,Roundoff)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,IDID)
+   END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2_dp
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 10.0_dp
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1_dp
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9_dp
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+
+!~~~> DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> STOPPING CRITERION FOR NEWTON'S METHOD
+      IF(RCNTRL(9) == 0.0d0)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol =RCNTRL(9)
+      END IF
+
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == 0.D0)THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == 0.D0)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= 0.D0.OR.RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,IDID)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,IDID)
+            END IF
+         END DO
+      END IF
+    
+    IF (IDID < 0) RETURN
+
+
+!~~~> CALL TO CORE INTEGRATOR 
+    CALL SDIRK_Integrator( N,Tinitial,Tfinal,Y,Hmin,Hmax,Hstart, &
+          RelTol,AbsTol,ITOL, Max_no_steps, NewtonMaxit,         &
+          Roundoff, FacMin, FacMax, FacRej, FacSafe, ThetaMin,   &
+          NewtonTol, Qmin, Qmax, Hexit, Texit, IDID )
+
+!~~~>  Collect run statistics
+   ISTATUS(ifun) = Nfun
+   ISTATUS(ijac) = Njac
+   ISTATUS(istp) = Nstp
+   ISTATUS(iacc) = Nacc
+   ISTATUS(irej) = Nrej
+   ISTATUS(idec) = Ndec
+   ISTATUS(isol) = Nsol
+   ISTATUS(isng) = Nsng
+!~~~> Last T and H
+   RSTATUS(:)      = 0.0_dp
+   RSTATUS(itexit) = Texit
+   RSTATUS(ihexit) = Hexit
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  PROCEDURES INTERNAL TO SDIRK
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_Integrator( N,Tinitial,Tfinal,Y,Hmin,Hmax,Hstart, &
+                RelTol,AbsTol,ITOL, Max_no_steps, NewtonMaxit,        &
+                Roundoff, FacMin, FacMax, FacRej, FacSafe, ThetaMin,  &
+                NewtonTol, Qmin, Qmax, Hexit, Texit, IDID )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     CORE INTEGRATOR FOR SDIRK4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER :: N
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal, Hmin, Hmax, Hstart, &
+                        RelTol(NVAR), AbsTol(NVAR), Roundoff,            &
+                        FacMin, FacMax, FacRej, FacSafe, ThetaMin,       &
+                        NewtonTol, Qmin, Qmax
+      KPP_REAL, INTENT(OUT) :: Hexit, Texit
+      INTEGER, INTENT(IN)  :: ITOL, Max_no_steps, NewtonMaxit
+      INTEGER, INTENT(OUT) :: IDID
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,5), FV(NVAR,5), CONT(NVAR,4),      &
+                       NewtonFactor(5), SCAL(NVAR), RHS(NVAR),   &
+                       G(NVAR), Yhat(NVAR), TMP(NVAR),           &
+                       T, H, Hold, Theta, Hratio, Hmax1, W,      &
+                       HGammaInv, DYTH, QNEWT, ERR, Fac, Hnew,   &
+                       Tdirection, NewtonErr, NewtonErrOld
+      INTEGER :: i, j, IER, istage, NewtonIter, IP(NVAR)
+      LOGICAL :: Reject, FIRST, NewtonReject, FreshJac, SkipJacUpdate, SkipLU
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL FJAC(NVAR,NVAR),  E(NVAR,NVAR)
+#else      
+      KPP_REAL FJAC(LU_NONZERO), E(LU_NONZERO)
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  INITIALISATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      CALL SDIRK_Coefficients
+      T = Tinitial
+      Tdirection = SIGN(1.D0,Tfinal-Tinitial)
+      Hmax1=MIN(ABS(Hmax),ABS(Tfinal-Tinitial))
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax1)
+      H=SIGN(H,Tdirection)
+      Hold=H
+      NewtonReject=.FALSE.
+      SkipLU =.FALSE.
+      FreshJac = .FALSE.
+      SkipJacUpdate = .FALSE.
+      Reject=.FALSE.
+      FIRST=.TRUE.
+      NewtonFactor(1:5)=ONE
+
+      CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( SkipLU ) THEN ! This time around skip the Jac update and LU
+         SkipLU = .FALSE.; FreshJac = .FALSE.; SkipJacUpdate = .FALSE.
+      ELSE
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   FreshJac, SkipJacUpdate, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,IDID); RETURN
+         END IF
+      END IF      
+
+      IF (Nstp>Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,IDID); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,IDID); RETURN
+      END IF   
+
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>    NEWTON ITERATION
+stages:DO istage=1,5
+
+      NewtonFactor(istage) = MAX(NewtonFactor(istage),Roundoff)**0.8d0
+
+!~~~>  STARTING VALUES FOR NEWTON ITERATION
+      CALL Set2zero(N,G)
+      CALL Set2zero(N,Z(1,istage))
+      IF (istage==1) THEN
+          IF (FIRST.OR.NewtonReject) THEN
+              CALL Set2zero(N,Z(1,istage))
+          ELSE
+              W=ONE+rkGamma*H/Hold
+              DO i=1,N
+                Z(i,istage)=W*(CONT(i,1)+W*(CONT(i,2)+W*(CONT(i,3)+W*CONT(i,4))))-Yhat(i)
+              END DO     
+          END IF
+      ELSE
+          DO j = 1, istage-1
+            ! Gj(:) = sum_j Beta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+            CALL WAXPY(N,rkBeta(istage,j),Z(1,j),1,G,1)
+            ! CALL WAXPY(N,H*rkA(istage,j),FV(1,j),1,G,1)
+            ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+            CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+          END DO
+          IF (istage==5) CALL WCOPY(N,Z(1,istage),1,Yhat,1)  ! Yhat(:) <- Z5(:)
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            NewtonIter=0
+            Theta=ABS(ThetaMin)
+            IF (Reject) Theta=2*ABS(ThetaMin)
+            NewtonErr = 1.0e+6 ! To force-enter Newton loop
+            
+  Newton:   DO WHILE (NewtonFactor(istage)*NewtonErr > NewtonTol)
+            
+            IF (NewtonIter >= NewtonMaxit) THEN
+                H=H*0.5d0
+                Reject=.TRUE.
+                NewtonReject=.TRUE.
+                CYCLE Tloop
+            END IF
+            NewtonIter=NewtonIter+1
+
+!~~~>     COMPUTE THE RIGHT-HAND SIDE
+            TMP(1:N) = Y(1:N) + Z(1:N,istage)
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,RHS)
+            TMP(1:N) = G(1:N) - Z(1:N,istage)
+            CALL WAXPY(N,HGammaInv,TMP,1,RHS,1) ! RHS(:) <- RHS(:) + HGammaInv*(G(:)-Z(:))
+
+!~~~>     SOLVE THE LINEAR SYSTEMS
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, IER )
+#else
+            CALL KppSolve(E, RHS)
+#endif
+            Nsol=Nsol+1
+            
+!~~~>     CHECK CONVERGENCE OR IF NUMBER OF ITERATIONS TOO LARGE
+            CALL SDIRK_ErrorNorm(N, RHS, SCAL, NewtonErr)
+            IF ( (NewtonIter >= 2) .AND. (NewtonIter < NewtonMaxit) ) THEN
+                Theta = NewtonErr/NewtonErrOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonFactor(istage)=Theta/(ONE-Theta)
+                    DYTH = NewtonFactor(istage)*NewtonErr* &
+                           Theta**(NewtonMaxit-1-NewtonIter)
+                    QNEWT = MAX(1.0d-4,MIN(16.0d0,DYTH/NewtonTol))
+                    IF (QNEWT >= ONE) THEN
+                         H=.8D0*H*QNEWT**(-ONE/(NewtonMaxit-NewtonIter))
+                         Reject=.TRUE.
+                         NewtonReject=.TRUE.
+                         CYCLE Tloop ! go back to the beginning of DO step
+                    END IF
+                ELSE
+                    NewtonReject=.TRUE.
+                    H=H*0.5d0
+                    Reject=.TRUE.
+                    CYCLE Tloop ! go back to the beginning of DO step
+                END IF
+            END IF
+            NewtonErrOld = NewtonErr
+            CALL WAXPY(N,ONE,RHS,1,Z(1,istage),1) ! Z(:) <-- Z(:)+RHS(:)
+            
+            END DO Newton
+
+!~~> END OF SIMPLIFIED NEWTON ITERATION
+            ! Save function values
+            TMP(1:N) = Y(1:N) + Z(1:N,istage)
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,FV(1,istage))
+
+   END DO stages
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  ERROR ESTIMATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Nstp=Nstp+1
+      TMP(1:N)=HGammaInv*(Z(1:N,5)-Yhat(1:N))
+
+#ifdef FULL_ALGEBRA  
+      CALL DGETRS( 'N', N, 1, E, N, IP, TMP, N, IER )
+#else
+      CALL KppSolve(E, TMP)
+#endif
+
+      CALL SDIRK_ErrorNorm(N, TMP, SCAL, ERR)
+
+!~~~> COMPUTATION OF Hnew: WE REQUIRE FacMin <= Hnew/H <= FacMax
+      !Safe = FacSafe*DBLE(1+2*NewtonMaxit)/DBLE(NewtonIter+2*NewtonMaxit)
+      Fac  = MAX(FacMin,MIN(FacMax,(ERR)**(-0.25d0)*FacSafe))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  ACCEPT/Reject STEP
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:  IF ( ERR < ONE ) THEN !~~~> STEP IS ACCEPTED
+
+         FIRST=.FALSE.
+         Nacc=Nacc+1
+         Hold=H
+
+!~~~> COEFFICIENTS FOR CONTINUOUS SOLUTION
+         CALL WAXPY(N,ONE,Z(1,5),1,Y,1) ! Y(:) <-- Y(:)+Z5(:)
+         CALL WCOPY(N,Z(1,5),1,Yhat,1)  ! Yhat <-- Z5
+
+         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+           CALL Set2zero(N,CONT(1,i))
+           DO j = 1,5
+             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+           END DO
+         END DO
+         
+         CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+         T=T+H
+         FreshJac=.FALSE.
+
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax1)
+         Hexit = Hnew
+         IF (Reject) Hnew=Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         NewtonReject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > 0.D0) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much, keep it as is;
+            !    do not update Jacobian and reuse LU
+            IF ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) ) THEN
+               SkipJacUpdate = .TRUE. 
+               SkipLU        = .TRUE. 
+            ELSE   
+               H = Hnew
+            END IF   
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+         IF (Theta <= ThetaMin) SkipJacUpdate = .TRUE. 
+
+      ELSE accept !~~~> STEP IS REJECTED
+
+         Reject=.TRUE.
+         IF (FIRST) THEN
+             H=H*FacRej
+         ELSE
+             H=Hnew
+         END IF
+         IF (Nacc >= 1) Nrej=Nrej+1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Texit = T
+      IDID  = 1
+  
+      END SUBROUTINE SDIRK_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,NVAR
+          SCAL(i) = 1.0d0 / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,NVAR
+          SCAL(i) = 1.0d0 / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, ERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), ERR      
+      ERR=0.0d0
+      DO i=1,N
+           ERR = ERR+(Y(i)*SCAL(i))**2
+      END DO
+      ERR = MAX( SQRT(ERR/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SDIRK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+   IF ((Code>=-8).AND.(Code<=-1)) THEN
+     PRINT *, IERR_NAMES(Code)
+   ELSE
+     PRINT *, 'Unknown Error code: ', Code
+   ENDIF
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   FreshJac, SkipJacUpdate, E, IP, Reject, IER )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: FreshJac, SkipJacUpdate
+      INTEGER, INTENT(OUT)         :: IER, IP(NVAR)
+      LOGICAL, INTENT(INOUT)       :: Reject
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+      KPP_REAL, PARAMETER     :: ONE = 1.0d0
+
+ 20   CONTINUE
+
+!~~~>  COMPUTE THE JACOBIAN
+      IF (SkipJacUpdate) THEN
+          SkipJacUpdate = .FALSE.
+      ELSE IF ( .NOT.FreshJac  ) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          FreshJac = .TRUE.
+      END IF  
+
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+      ConsecutiveSng = 0
+      IER = 1
+      
+Hloop: DO WHILE (IER /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j)=-FJAC(i,j)
+         END DO
+         E(j,j)=E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, IER )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, IER)
+      IP(1) = 1
+#endif
+      Ndec=Ndec+1
+
+      IF (IER /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, IER=',IER,' T=',T,' H=',H
+          Nsng = Nsng+1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H=H*0.5d0
+          Reject=.TRUE.
+          !~~~> Update Jacobian if not fresh
+          IF ( .NOT.FreshJac ) GOTO 20
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Coefficients
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+          rkGamma=4.0d0/15.0d0
+          
+          rkA(1,1)= 4.d0/15.d0
+          rkA(2,1)= 1.d0/2.d0
+          rkA(2,2)= 4.d0/15.d0
+          rkA(3,1)= 51069.d0/144200.d0
+          rkA(3,2)=-7809.d0/144200.d0
+          rkA(3,3)= 4.d0/15.d0 
+          rkA(4,1)= 12047244770625658.d0/141474406359725325.d0
+          rkA(4,2)=-3057890203562191.d0/47158135453241775.d0
+          rkA(4,3)= 2239631894905804.d0/28294881271945065.d0
+          rkA(4,4)= 4.d0/15.d0
+          rkA(5,1)= 181513.d0/86430.d0
+          rkA(5,2)=-89074.d0/116015.d0
+          rkA(5,3)= 83636.d0/34851.d0
+          rkA(5,4)=-69863904375173.d0/23297141763930.d0
+          rkA(5,5)= 4.d0/15.d0
+     
+          rkB(1)= 181513.d0/86430.d0
+          rkB(2)=-89074.d0/116015.d0
+          rkB(3)= 83636.d0/34851.d0
+          rkB(4)=-69863904375173.d0/23297141763930.d0
+          rkB(5)= 4/15.d0
+     
+          rkC(1)=4.d0/15.d0
+          rkC(2)=23.d0/30.d0
+          rkC(3)=17.d0/30.d0
+          rkC(4)=707.d0/1931.d0
+          rkC(5)=1.d0
+          
+          rkBeta(2,1)=15.0d0/8.0d0
+          rkBeta(3,1)=1577061.0d0/922880.0d0
+          rkBeta(3,2)=-23427.0d0/115360.0d0
+          rkBeta(4,1)=647163682356923881.0d0/2414496535205978880.0d0
+          rkBeta(4,2)=-593512117011179.0d0/3245291041943520.0d0
+          rkBeta(4,3)=559907973726451.0d0/1886325418129671.0d0
+          rkBeta(5,1)=724545451.0d0/796538880.0d0
+          rkBeta(5,2)=-830832077.0d0/267298560.0d0
+          rkBeta(5,3)=30957577.0d0/2509272.0d0
+          rkBeta(5,4)=-69863904375173.0d0/6212571137048.0d0
+          
+          rkAlpha(2,1)= 23.d0/8.d0
+          rkAlpha(3,1)= 0.9838473040915402d0
+          rkAlpha(3,2)= 0.3969226768377252d0
+          rkAlpha(4,1)= 0.6563374010466914d0
+          rkAlpha(4,2)= 0.0d0
+          rkAlpha(4,3)= 0.3372498196189311d0
+          rkAlpha(5,1)=7752107607.0d0/11393456128.0d0
+          rkAlpha(5,2)=-17881415427.0d0/11470078208.0d0
+          rkAlpha(5,3)=2433277665.0d0/179459416.0d0
+          rkAlpha(5,4)=-96203066666797.0d0/6212571137048.0d0
+          
+          rkD(1,1)= 24.74416644927758d0
+          rkD(1,2)= -4.325375951824688d0
+          rkD(1,3)= 41.39683763286316d0
+          rkD(1,4)= -61.04144619901784d0
+          rkD(1,5)= -3.391332232917013d0
+          rkD(2,1)= -51.98245719616925d0
+          rkD(2,2)= 10.52501981094525d0
+          rkD(2,3)= -154.2067922191855d0
+          rkD(2,4)= 214.3082125319825d0
+          rkD(2,5)= 14.71166018088679d0
+          rkD(3,1)= 33.14347947522142d0
+          rkD(3,2)= -19.72986789558523d0
+          rkD(3,3)= 230.4878502285804d0
+          rkD(3,4)= -287.6629744338197d0
+          rkD(3,5)= -18.99932366302254d0
+          rkD(4,1)= -5.905188728329743d0
+          rkD(4,2)= 13.53022403646467d0
+          rkD(4,3)= -117.6778956422581d0
+          rkD(4,4)= 134.3962081008550d0
+          rkD(4,5)= 8.678995715052762d0
+          
+      END SUBROUTINE SDIRK_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRK ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y,  FIX, RCONST, P )
+      
+      TIME = Told
+      Nfun=Nfun+1
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+  
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO j=1,NVAR
+          JV(i,j) = 0.0D0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+      Njac = Njac+1
+
+      END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_seulex
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.f	(revision 3477)
@@ -0,0 +1,1174 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      PARAMETER (KM=12,KM2=2+KM*(KM+3)/2,NRDENS=NVAR)
+      PARAMETER (LWORK=2*NVAR*NVAR+(KM+8)*NVAR+4*KM+20+KM2*NRDENS)
+      PARAMETER (LIWORK=2*NVAR+KM+20+NRDENS)
+
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      IDFX=0     ! --- INTERNAL TIME DERIVATIVE
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      CALL ATMSEULEX(NVAR,FUNC_CHEM,Autonomous,TIN,VAR,TOUT,
+     &                  STEPMIN,RTOL,ATOL,ITOL,
+     &                  JAC_CHEM,IJAC,MLJAC,MUJAC,
+     &                  FUNC_CHEM,IMAS,MLJAC,MUJAC,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMSEULEX: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMSEULEX(N,FCN,IFCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,
+     &                  MAS,IMAS,MLMAS,MUMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(X,Y).
+C     THIS IS AN EXTRAPOLATION-ALGORITHM, BASED ON THE
+C     LINEARLY IMPLICIT EULER METHOD (WITH STEP SIZE CONTROL
+C     AND ORDER SELECTION).
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND
+C              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+C              INCLUSION OF DENSE OUTPUT BY E. HAIRER AND A. OSTERMANN
+C
+C     THIS CODE IS PART OF THE BOOK:
+C         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+C         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+C         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+C         SPRINGER-VERLAG (1991)
+C
+C     VERSION OF SEPTEMBER 30, 1995
+C
+C     INPUT PARAMETERS
+C     ----------------
+C     N           DIMENSION OF THE SYSTEM
+C
+C     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+C                 VALUE OF F(X,Y):
+C                    SUBROUTINE FCN(N,X,Y,F)
+C                    KPP_REAL X,Y(N),F(N)
+C                    F(1)=...   ETC.
+C                 RPAR, IPAR (SEE BELOW)
+C
+C     IFCN        GIVES INFORMATION ON FCN:
+C                    IFCN=0: F(X,Y) INDEPENDENT OF X (AUTONOMOUS)
+C                    IFCN=1: F(X,Y) MAY DEPEND ON X (NON-AUTONOMOUS)
+C
+C     X           INITIAL X-VALUE
+C
+C     Y(N)        INITIAL VALUES FOR Y
+C
+C     XEND        FINAL X-VALUE (XEND-X MAY BE POSITIVE OR NEGATIVE)
+C
+C     H           INITIAL STEP SIZE GUESS;
+C                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT,
+C                 H=1.D0/(NORM OF F'), USUALLY 1.D-2 OR 1.D-3, IS GOOD.
+C                 THIS CHOICE IS NOT VERY IMPORTANT, THE CODE QUICKLY
+C                 ADAPTS ITS STEP SIZE (IF H=0.D0, THE CODE PUTS H=1.D-6).
+C
+C     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+C                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+C
+C     ITOL        SWITCH FOR RelTol AND AbsTol:
+C                   ITOL=0: BOTH RelTol AND AbsTol ARE SCALARS.
+C                     THE CODE KEEPS, ROUGHLY, THE LOCAL ERROR OF
+C                     Y(I) BELOW RelTol*ABS(Y(I))+AbsTol
+C                   ITOL=1: BOTH RelTol AND AbsTol ARE VECTORS.
+C                     THE CODE KEEPS THE LOCAL ERROR OF Y(I) BELOW
+C                     RelTol(I)*ABS(Y(I))+AbsTol(I).
+C
+C     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO Y
+C                 (THIS ROUTINE IS ONLY CALLED IF IJAC=1; SUPPLY
+C                 A DUMMY SUBROUTINE IN THE CASE IJAC=0).
+C                 FOR IJAC=1, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE JAC(N,X,Y,DFY,LDFY)
+C                    KPP_REAL X,Y(N),DFY(LDFY,N)
+C                    DFY(1,1)= ...
+C                 LDFY, THE COLOMN-LENGTH OF THE ARRAY, IS
+C                 FURNISHED BY THE CALLING PROGRAM.
+C                 IF (MLJAC.EQ.N) THE JACOBIAN IS SUPPOSED TO
+C                    BE FULL AND THE PARTIAL DERIVATIVES ARE
+C                    STORED IN DFY AS
+C                       DFY(I,J) = PARTIAL F(I) / PARTIAL Y(J)
+C                 ELSE, THE JACOBIAN IS TAKEN AS BANDED AND
+C                    THE PARTIAL DERIVATIVES ARE STORED
+C                    DIAGONAL-WISE AS
+C                       DFY(I-J+MUJAC+1,J) = PARTIAL F(I) / PARTIAL Y(J).
+C
+C     IJAC        SWITCH FOR THE COMPUTATION OF THE JACOBIAN:
+C                    IJAC=0: JACOBIAN IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "JAC" IS NEVER CALLED.
+C                    IJAC=1: JACOBIAN IS SUPPLIED BY SUBROUTINE JAC.
+C
+C     MLJAC       SWITCH FOR THE BANDED STRUCTURE OF THE JACOBIAN:
+C                    MLJAC=N: JACOBIAN IS A FULL MATRIX. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLJAC<N: MLJAC IS THE LOWER BANDWITH OF JACOBIAN
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C
+C     MUJAC       UPPER BANDWITH OF JACOBIAN  MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLJAC=N.
+C
+C     ----   MAS,IMAS,MLMAS, AND MUMAS HAVE ANALOG MEANINGS      -----
+C     ----   FOR THE "MASS MATRIX" (THE MATRIX "M" OF SECTION IV.8): -
+C
+C     MAS         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE MASS-
+C                 MATRIX M.
+C                 IF IMAS=0, THIS MATRIX IS ASSUMED TO BE THE IDENTITY
+C                 MATRIX AND NEEDS NOT TO BE DEFINED;
+C                 SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C                 IF IMAS=1, THE SUBROUTINE MAS IS OF THE FORM
+C                    SUBROUTINE MAS(N,AM,LMAS)
+C                    KPP_REAL AM(LMAS,N)
+C                    AM(1,1)= ....
+C                    IF (MLMAS.EQ.N) THE MASS-MATRIX IS STORED
+C                    AS FULL MATRIX LIKE
+C                         AM(I,J) = M(I,J)
+C                    ELSE, THE MATRIX IS TAKEN AS BANDED AND STORED
+C                    DIAGONAL-WISE AS
+C                         AM(I-J+MUMAS+1,J) = M(I,J).
+C
+C     IMAS       GIVES INFORMATION ON THE MASS-MATRIX:
+C                    IMAS=0: M IS SUPPOSED TO BE THE IDENTITY
+C                       MATRIX, MAS IS NEVER CALLED.
+C                    IMAS=1: MASS-MATRIX  IS SUPPLIED.
+C
+C     MLMAS       SWITCH FOR THE BANDED STRUCTURE OF THE MASS-MATRIX:
+C                    MLMAS=N: THE FULL MATRIX CASE. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLMAS<N: MLMAS IS THE LOWER BANDWITH OF THE
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C                 MLMAS IS SUPPOSED TO BE .LE. MLJAC.
+C
+C     MUMAS       UPPER BANDWITH OF MASS-MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLMAS=N.
+C                 MUMAS IS SUPPOSED TO BE .LE. MUJAC.
+C
+C     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+C                 NUMERICAL SOLUTION DURING INTEGRATION.
+C                 IF IOUT>=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+C                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0.
+C                 IT MUST HAVE THE FORM
+C                    SUBROUTINE SOLOUT (NR,XOLD,X,Y,RC,LRC,IC,LIC,N,
+C                                       RPAR,IPAR,IRTRN)
+C                    KPP_REAL X,Y(N),RC(LRC),IC(LIC)
+C                    ....
+C                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+C                    GRID-POINT "X" (THEREBY THE INITIAL VALUE IS
+C                    THE FIRST GRID-POINT).
+C                 "XOLD" IS THE PRECEEDING GRID-POINT.
+C                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+C                    IS SET <0, SEULEX RETURNS TO THE CALLING PROGRAM.
+C                 DO NOT CHANGE THE ENTRIES OF RC(LRC),IC(LIC)!
+C
+C          -----  CONTINUOUS OUTPUT (IF IOUT=2): -----
+C                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+C                 FOR THE INTERVAL [XOLD,X] IS AVAILABLE THROUGH
+C                 THE KPP_REAL FUNCTION
+C                        >>>   CONTEX(I,S,RC,LRC,IC,LIC)   <<<
+C                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+C                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+C                 S SHOULD LIE IN THE INTERVAL [XOLD,X].
+C
+C     IOUT        GIVES INFORMATION ON THE SUBROUTINE SOLOUT:
+C                    IOUT=0: SUBROUTINE IS NEVER CALLED
+C                    IOUT=1: SUBROUTINE IS USED FOR OUTPUT
+C                    IOUT=2: DENSE OUTPUT IS PERFORMED IN SOLOUT
+C
+C     WORK        ARRAY OF WORKING SPACE OF LENGTH "LWORK".
+C                 SERVES AS WORKING SPACE FOR ALL VECTORS AND MATRICES.
+C                 "LWORK" MUST BE AT LEAST
+C                        N*(LJAC+LMAS+LE1+KM+8)+4*KM+20+KM2*NRDENS
+C                 WHERE
+C                    KM2=2+KM*(KM+3)/2  AND  NRDENS=IWORK(6) (SEE BELOW)
+C                 AND
+C                    LJAC=N              IF MLJAC=N (FULL JACOBIAN)
+C                    LJAC=MLJAC+MUJAC+1  IF MLJAC<N (BANDED JAC.)
+C                 AND
+C                    LMAS=0              IF IMAS=0
+C                    LMAS=N              IF IMAS=1 AND MLMAS=N (FULL)
+C                    LMAS=MLMAS+MUMAS+1  IF MLMAS<N (BANDED MASS-M.)
+C                 AND
+C                    LE1=N               IF MLJAC=N (FULL JACOBIAN)
+C                    LE1=2*MLJAC+MUJAC+1 IF MLJAC<N (BANDED JAC.).
+C                 AND
+C                    KM=12               IF IWORK(3)=0
+C                    KM=IWORK(3)         IF IWORK(3).GT.0
+C
+C                 IN THE USUAL CASE WHERE THE JACOBIAN IS FULL AND THE
+C                 MASS-MATRIX IS THE INDENTITY (IMAS=0), THE MINIMUM
+C                 STORAGE REQUIREMENT IS
+C                         LWORK = 2*N*N+(KM+8)*N+4*KM+13+KM2*NRDENS.
+C                 IF IWORK(9)=M1>0 THEN "LWORK" MUST BE AT LEAST
+C                    N*(LJAC+KM+8)+(N-M1)*(LMAS+LE1)+4*KM+20+KM2*NRDENS
+C                 WHERE IN THE DEFINITIONS OF LJAC, LMAS AND LE1 THE
+C                 NUMBER N CAN BE REPLACED BY N-M1.
+C
+C     LWORK       DECLARED LENGTH OF ARRAY "WORK".
+C
+C     IWORK       INTEGER WORKING SPACE OF LENGTH "LIWORK".
+C                 "LIWORK" MUST BE AT LEAST  2*N+KM+20+NRDENS.
+C
+C     LIWORK      DECLARED LENGTH OF ARRAY "IWORK".
+C
+C     RPAR, IPAR  REAL AND INTEGER PARAMETERS (OR PARAMETER ARRAYS) WHICH
+C                 CAN BE USED FOR COMMUNICATION BETWEEN YOUR CALLING
+C                 PROGRAM AND THE FCN, JAC, MAS, SOLOUT SUBROUTINES.
+C
+C ----------------------------------------------------------------------
+C
+C     SOPHISTICATED SETTING OF PARAMETERS
+C     -----------------------------------
+C              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT WORK
+C              WELL. THEY MAY BE DEFINED BY SETTING WORK(1),..,WORK(13)
+C              AS WELL AS IWORK(1),..,IWORK(4) DIFFERENT FROM ZERO.
+C              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+C
+C    IWORK(1)  IF IWORK(1).NE.0, THE CODE TRANSFORMS THE JACOBIAN
+C              MATRIX TO HESSENBERG FORM. THIS IS PARTICULARLY
+C              ADVANTAGEOUS FOR LARGE SYSTEMS WITH FULL JACOBIAN.
+C              IT DOES NOT WORK FOR BANDED JACOBIAN (MLJAC<N)
+C              AND NOT FOR IMPLICIT SYSTEMS (IMAS=1).
+C
+C    IWORK(2)  THIS IS THE MAXIMAL NUMBER OF ALLOWED STEPS.
+C              THE DEFAULT VALUE (FOR IWORK(2)=0) IS 100000.
+C
+C    IWORK(3)  THE MAXIMUM NUMBER OF COLUMNS IN THE EXTRAPOLATION
+C              TABLE. THE DEFAULT VALUE (FOR IWORK(3)=0) IS 12.
+C              IF IWORK(3).NE.0 THEN IWORK(3) SHOULD BE .GE.3.
+C
+C    IWORK(4)  SWITCH FOR THE STEP SIZE SEQUENCE
+C              IF IWORK(4).EQ.1 THEN 1,2,3,4,6,8,12,16,24,32,48,...
+C              IF IWORK(4).EQ.2 THEN 2,3,4,6,8,12,16,24,32,48,64,...
+C              IF IWORK(4).EQ.3 THEN 1,2,3,4,5,6,7,8,9,10,...
+C              IF IWORK(4).EQ.4 THEN 2,3,4,5,6,7,8,9,10,11,...
+C              THE DEFAULT VALUE (FOR IWORK(4)=0) IS IWORK(4)=2.
+C
+C    IWORK(5)  PARAMETER "LAMBDA" OF DENSE OUTPUT; POSSIBLE VALUES
+C              ARE 0 AND 1; DEFAULT IWORK(5)=0.
+C
+C    IWORK(6)  = NRDENS = NUMBER OF COMPONENTS, FOR WHICH DENSE OUTPUT
+C              IS REQUIRED
+C
+C    IWORK(21),...,IWORK(NRDENS+20) INDICATE THE COMPONENTS, FOR WHICH
+C              DENSE OUTPUT IS REQUIRED
+C
+C       IF THE DIFFERENTIAL SYSTEM HAS THE SPECIAL STRUCTURE THAT
+C            Y(I)' = Y(I+M2)   FOR  I=1,...,M1,
+C       WITH M1 A MULTIPLE OF M2, A SUBSTANTIAL GAIN IN COMPUTERTIME
+C       CAN BE ACHIEVED BY SETTING THE FOLLOWING TWO PARAMETERS. E.G.,
+C       FOR SECOND ORDER SYSTEMS P'=V, V'=G(P,V), WHERE P AND V ARE
+C       VECTORS OF DIMENSION N/2, ONE HAS TO PUT M1=M2=N/2.
+C       FOR M1>0 SOME OF THE INPUT PARAMETERS HAVE DIFFERENT MEANINGS:
+C       - JAC: ONLY THE ELEMENTS OF THE NON-TRIVIAL PART OF THE
+C              JACOBIAN HAVE TO BE STORED
+C              IF (MLJAC.EQ.N-M1) THE JACOBIAN IS SUPPOSED TO BE FULL
+C                 DFY(I,J) = PARTIAL F(I+M1) / PARTIAL Y(J)
+C                FOR I=1,N-M1 AND J=1,N.
+C              ELSE, THE JACOBIAN IS BANDED ( M1 = M2 * MM )
+C                 DFY(I-J+MUJAC+1,J+K*M2) = PARTIAL F(I+M1) / PARTIAL Y(J+K*M2)
+C                FOR I=1,MLJAC+MUJAC+1 AND J=1,M2 AND K=0,MM.
+C       - MLJAC: MLJAC=N-M1: IF THE NON-TRIVIAL PART OF THE JACOBIAN IS FULL
+C                0<=MLJAC<N-M1: IF THE (MM+1) SUBMATRICES (FOR K=0,MM)
+C                     PARTIAL F(I+M1) / PARTIAL Y(J+K*M2),  I,J=1,M2
+C                    ARE BANDED, MLJAC IS THE MAXIMAL LOWER BANDWIDTH
+C                    OF THESE MM+1 SUBMATRICES
+C       - MUJAC: MAXIMAL UPPER BANDWIDTH OF THESE MM+1 SUBMATRICES
+C                NEED NOT BE DEFINED IF MLJAC=N-M1
+C       - MAS: IF IMAS=0 THIS MATRIX IS ASSUMED TO BE THE IDENTITY AND
+C              NEED NOT BE DEFINED. SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C              IT IS ASSUMED THAT ONLY THE ELEMENTS OF RIGHT LOWER BLOCK OF
+C              DIMENSION N-M1 DIFFER FROM THAT OF THE IDENTITY MATRIX.
+C              IF (MLMAS.EQ.N-M1) THIS SUBMATRIX IS SUPPOSED TO BE FULL
+C                 AM(I,J) = M(I+M1,J+M1)     FOR I=1,N-M1 AND J=1,N-M1.
+C              ELSE, THE MASS MATRIX IS BANDED
+C                 AM(I-J+MUMAS+1,J) = M(I+M1,J+M1)
+C       - MLMAS: MLMAS=N-M1: IF THE NON-TRIVIAL PART OF M IS FULL
+C                0<=MLMAS<N-M1: LOWER BANDWIDTH OF THE MASS MATRIX
+C       - MUMAS: UPPER BANDWIDTH OF THE MASS MATRIX
+C                NEED NOT BE DEFINED IF MLMAS=N-M1
+C
+C    IWORK(9)  THE VALUE OF M1.  DEFAULT M1=0.
+C
+C    IWORK(10) THE VALUE OF M2.  DEFAULT M2=M1.
+C
+C    WORK(1)   UROUND, THE ROUNDING UNIT, DEFAULT 1.D-16.
+C
+C    WORK(2)   MAXIMAL STEP SIZE, DEFAULT XEND-X.
+C
+C    WORK(3)   DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+C              INCREASE WORK(3), TO 0.01 SAY, WHEN JACOBIAN EVALUATIONS
+C              ARE COSTLY. FOR SMALL SYSTEMS WORK(3) SHOULD BE SMALLER.
+C              DEFAULT MIN(1.0D-4,RelTol(1))
+C
+C    WORK(4), WORK(5)   PARAMETERS FOR STEP SIZE SELECTION
+C              THE NEW STEP SIZE FOR THE J-TH DIAGONAL ENTRY IS
+C              CHOSEN SUBJECT TO THE RESTRICTION
+C                 FACMIN/WORK(5) <= HNEW(J)/HOLD <= 1/FACMIN
+C              WHERE FACMIN=WORK(4)**(1/(J-1))
+C              DEFAULT VALUES: WORK(4)=0.1D0, WORK(5)=4.D0
+C
+C    WORK(6), WORK(7)   PARAMETERS FOR THE ORDER SELECTION
+C              ORDER IS DECREASED IF    W(K-1) <= W(K)*WORK(6)
+C              ORDER IS INCREASED IF    W(K) <= W(K-1)*WORK(7)
+C              DEFAULT VALUES: WORK(6)=0.7D0, WORK(7)=0.9D0
+C
+C    WORK(8), WORK(9)   SAFETY FACTORS FOR STEP CONTROL ALGORITHM
+C             HNEW=H*WORK(9)*(WORK(8)*TOL/ERR)**(1/(J-1))
+C              DEFAULT VALUES: WORK(8)=0.8D0, WORK(9)=0.93D0
+C
+C    WORK(10), WORK(11), WORK(12), WORK(13)   ESTIMATED WORKS FOR
+C             A CALL TO  FCN, JAC, DEC, SOL, RESPECTIVELY.
+C             DEFAULT VALUES ARE: WORK(10)=1.D0, WORK(11)=5.D0,
+C             WORK(12)=1.D0, WORK(13)=1.D0.
+C
+C-----------------------------------------------------------------------
+C
+C     OUTPUT PARAMETERS
+C     -----------------
+C     X           X-VALUE WHERE THE SOLUTION IS COMPUTED
+C                 (AFTER SUCCESSFUL RETURN X=XEND)
+C
+C     Y(N)        SOLUTION AT X
+C
+C     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+C
+C     IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+C                   IDID=1  COMPUTATION SUCCESSFUL,
+C                   IDID=-1 COMPUTATION UNSUCCESSFUL.
+C
+C   IWORK(14)  NFCN    NUMBER OF FUNCTION EVALUATIONS (THOSE FOR NUMERICAL
+C                      EVALUATION OF THE JACOBIAN ARE NOT COUNTED)
+C   IWORK(15)  NJAC    NUMBER OF JACOBIAN EVALUATIONS (EITHER ANALYTICALLY
+C                      OR NUMERICALLY)
+C   IWORK(16)  NSTEP   NUMBER OF COMPUTED STEPS
+C   IWORK(17)  NACCPT  NUMBER OF ACCEPTED STEPS
+C   IWORK(18)  NREJCT  NUMBER OF REJECTED STEPS (AFTER AT LEAST ONE STEP
+C                      HAS BEEN ACCEPTED)
+C   IWORK(19)  NDEC    NUMBER OF LU-DECOMPOSITIONS (N-DIMENSIONAL MATRIX)
+C   IWORK(20)  NSOL    NUMBER OF FORWARD-BACKWARD SUBSTITUTIONS
+C-----------------------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(*),RelTol(*),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL AUTNMS,IMPLCT,ARRET,JBAND
+      EXTERNAL FCN,JAC,MAS
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS
+C *** *** *** *** *** *** ***
+      IOUT = 0
+      NFCN=0
+      NJAC=0
+      NSTEP=0
+      NACCPT=0
+      NREJCT=0
+      NDEC=0
+      NSOL=0
+      ARRET=.FALSE.
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(2).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- KM     MAXIMUM NUMBER OF COLUMNS IN THE EXTRAPOLATION
+      IF(IWORK(3).EQ.0)THEN
+         KM=12
+      ELSE
+         KM=IWORK(3)
+         IF(KM.LE.2)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NSEQU     CHOICE OF STEP SIZE SEQUENCE
+      NSEQU=IWORK(4)
+      IF(IWORK(4).EQ.0) NSEQU=2
+      IF(NSEQU.LE.0.OR.NSEQU.GE.5)THEN
+         WRITE(6,*)' CURIOUS INPUT IWORK(4)=',IWORK(4)
+         ARRET=.TRUE.
+      END IF
+C -------- LAMBDA   PARAMETER FOR DENSE OUTPUT
+      LAMBDA=IWORK(5)
+      IF(LAMBDA.LT.0.OR.LAMBDA.GE.2)THEN
+         WRITE(6,*)' CURIOUS INPUT IWORK(5)=',IWORK(5)
+         ARRET=.TRUE.
+      END IF
+C -------- NRDENS   NUMBER OF DENSE OUTPUT COMPONENTS
+      NRDENS=IWORK(6)
+      IF(NRDENS.LT.0.OR.NRDENS.GT.N)THEN
+         WRITE(6,*)' CURIOUS INPUT IWORK(6)=',IWORK(6)
+         ARRET=.TRUE.
+      END IF
+C -------- PARAMETER FOR SECOND ORDER EQUATIONS
+      M1=IWORK(9)
+      M2=IWORK(10)
+      NM1=N-M1
+      IF (M1.EQ.0) M2=N
+      IF (M2.EQ.0) M2=M1
+      IF (M1.LT.0.OR.M2.LT.0.OR.M1+M2.GT.N) THEN
+       WRITE(6,*)' CURIOUS INPUT FOR IWORK(9,10)=',M1,M2
+       ARRET=.TRUE.
+      END IF
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.0.D0.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)'  UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(2).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(2)
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(WORK(3).EQ.0.D0)THEN
+         THET=MIN(1.0D-4,RelTol(1))
+      ELSE
+         THET=WORK(3)
+      END IF
+C -------  FAC1,FAC2     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(4).EQ.0.D0)THEN
+         FAC1=0.1D0
+      ELSE
+         FAC1=WORK(4)
+      END IF
+      IF(WORK(5).EQ.0.D0)THEN
+         FAC2=4.0D0
+      ELSE
+         FAC2=WORK(5)
+      END IF
+C -------  FAC3, FAC4   PARAMETERS FOR THE ORDER SELECTION
+      IF(WORK(6).EQ.0.D0)THEN
+         FAC3=0.7D0
+      ELSE
+         FAC3=WORK(6)
+      END IF
+      IF(WORK(7).EQ.0.D0)THEN
+         FAC4=0.9D0
+      ELSE
+         FAC4=WORK(7)
+      END IF
+C ------- SAFE1, SAFE2 SAFETY FACTORS FOR STEP SIZE PREDICTION
+      IF(WORK(8).EQ.0.D0)THEN
+         SAFE1=0.6D0
+      ELSE
+         SAFE1=WORK(8)
+      END IF
+      IF(WORK(9).EQ.0.D0)THEN
+         SAFE2=0.93D0
+      ELSE
+         SAFE2=WORK(9)
+      END IF
+C ------- WKFCN,WKJAC,WKDEC,WKSOL  ESTIMATED WORK FOR  FCN,JAC,DEC,SOL
+      IF(WORK(10).EQ.0.D0)THEN
+         WKFCN=1.D0
+      ELSE
+         WKFCN=WORK(10)
+      END IF
+      IF(WORK(11).EQ.0.D0)THEN
+         WKJAC=5.D0
+      ELSE
+         WKJAC=WORK(11)
+      END IF
+      IF(WORK(12).EQ.0.D0)THEN
+         WKDEC=1.D0
+      ELSE
+         WKDEC=WORK(12)
+      END IF
+      IF(WORK(13).EQ.0.D0)THEN
+         WKSOL=1.D0
+      ELSE
+         WKSOL=WORK(13)
+      END IF
+      WKROW=WKFCN+WKSOL
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+        DO I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+        END DO
+      END IF
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- AUTONOMOUS, IMPLICIT, BANDED OR NOT ?
+      AUTNMS=IFCN.EQ.0
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.LT.NM1
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN AND MATRIX E
+      IF(JBAND)THEN
+         LDJAC=MLJAC+MUJAC+1
+         LDE=MLJAC+LDJAC
+      ELSE
+         MLJAC=NM1
+         MUJAC=NM1
+         LDJAC=NM1
+         LDE=NM1
+      END IF
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          IF (MLMAS.NE.NM1) THEN
+              LDMAS=MLMAS+MUMAS+1
+              IF (JBAND) THEN
+                 IJOB=4
+              ELSE
+                 IJOB=3
+              END IF
+          ELSE
+              LDMAS=NM1
+              IJOB=5
+          END IF
+C ------ BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF "JAC"
+          IF (MLMAS.GT.MLJAC.OR.MUMAS.GT.MUJAC) THEN
+              WRITE (6,*) 'BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF
+     & "JAC"'
+            ARRET=.TRUE.
+          END IF
+      ELSE
+          LDMAS=0
+          IF (JBAND) THEN
+             IJOB=2
+          ELSE
+             IJOB=1
+             IF (N.GT.2.AND.IWORK(1).NE.0) IJOB=7
+          END IF
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------ HESSENBERG OPTION ONLY FOR EXPLICIT EQU. WITH FULL JACOBIAN
+      IF ((IMPLCT.OR.JBAND).AND.IJOB.EQ.7) THEN
+         WRITE(6,*)' HESSENBERG OPTION ONLY FOR EXPLICIT EQUATIONS WITH
+     &FULL JACOBIAN'
+         ARRET=.TRUE.
+      END IF
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      KM2=(KM*(KM+1))/2
+      IEYH=21
+      IEDY=IEYH+N
+      IEFX=IEDY+N
+      IEYHH=IEFX+N
+      IEDYH=IEYHH+N
+      IEDEL=IEDYH+N
+      IEWH =IEDEL+N
+      IESCAL=IEWH+N
+      IEHH =IESCAL+N
+      IEW  =IEHH+KM
+      IEA  =IEW+KM
+      IEJAC =IEA+KM
+      IEE  =IEJAC+N*LDJAC
+      IEMAS=IEE+NM1*LDE
+      IET=IEMAS+NM1*LDMAS
+      IFAC=IET+N*KM
+      IEDE=IFAC+KM
+      IFSAFE=IEDE+(KM+2)*NRDENS
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IFSAFE+KM2*NRDENS-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IECO=21
+      IEIP=21+NRDENS
+      IENJ=IEIP+N
+      IEIPH=IENJ+KM
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IECO+KM-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+      NRD=MAX(1,NRDENS)
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL SEUCOR(N,FCN,X,Y,XEND,HMAX,H,KM,RelTol,AbsTol,ITOL,JAC,IJAC,
+     &   MLJAC,MUJAC,MLMAS,MUMAS,IOUT,IDID,IJOB,M1,M2,NM1,
+     &   NMAX,UROUND,NSEQU,AUTNMS,IMPLCT,JBAND,LDJAC,LDE,LDMAS2,
+     &   WORK(IEYH),WORK(IEDY),WORK(IEFX),WORK(IEYHH),WORK(IEDYH),
+     &   WORK(IEDEL),WORK(IEWH),WORK(IESCAL),WORK(IEHH),
+     &   WORK(IEW),WORK(IEA),WORK(IEJAC),WORK(IEE),WORK(IEMAS),
+     &   WORK(IET),IWORK(IEIP),IWORK(IENJ),IWORK(IEIPH),FAC1,FAC2,FAC3,
+     &   FAC4,THET,SAFE1,SAFE2,WKJAC,WKDEC,WKROW,KM2,NRD,WORK(IFAC),
+     &   WORK(IFSAFE),LAMBDA,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL,
+     &   WORK(IEDE),IWORK(IECO))
+      IWORK(14)=NFCN
+      IWORK(15)=NJAC
+      IWORK(16)=NSTEP
+      IWORK(17)=NACCPT
+      IWORK(18)=NREJCT
+      IWORK(19)=NDEC
+      IWORK(20)=NSOL
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE SEUCOR(N,FCN,X,Y,XEND,HMAX,H,KM,RelTol,AbsTol,ITOL,
+     &  JAC,IJAC,MLJAC,MUJAC,MLB,MUB,IOUT,IDID,IJOB,M1,M2,
+     &  NM1,NMAX,UROUND,NSEQU,AUTNMS,IMPLCT,BANDED,LFJAC,LE,
+     &  LDMAS,YH,DY,FX,YHH,DYH,DEL,WH,SCAL,HH,W,A,FJAC,E,FMAS,T,IP,
+     &  NJ,IPHES,FAC1,FAC2,FAC3,FAC4,THET,SAFE1,SAFE2,WKJAC,WKDEC,WKROW,
+     &  KM2,NRD,FACUL,FSAFE,LAMBDA,NFCN,NJAC,NSTEP,NACCPT,NREJCT,
+     &  NDEC,NSOL,DENS,ICOMP)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR SEULEX
+C     PARAMETERS SAME AS IN SEULEX WITH WORKSPACE ADDED
+C ----------------------------------------------------------
+C         DECLARATIONS
+C ----------------------------------------------------------
+       IMPLICIT KPP_REAL (A-H,O-Z)
+       INCLUDE 'KPP_ROOT_Parameters.h'
+       INCLUDE 'KPP_ROOT_Sparse.h'
+       INTEGER KM, KM2, K, KC, KRIGHT, KLR, KK, KRN, KOPT
+       DIMENSION Y(N),YH(N),DY(N),FX(N),YHH(N),DYH(N),DEL(N)
+       DIMENSION WH(N),SCAL(N),HH(KM),W(KM),A(KM),FJAC(LU_NONZERO)
+       DIMENSION FMAS(LDMAS,NM1),T(KM,N),IP(NM1),NJ(KM)
+       DIMENSION RelTol(*),AbsTol(*)
+       DIMENSION IPHES(N),FSAFE(KM2,NRD),FACUL(KM),E(LE,NM1)
+       DIMENSION DENS((KM+2)*NRD),ICOMP(NRD)
+       LOGICAL REJECT,LAST,ATOV,CALJAC,CALHES,AUTNMS,IMPLCT,BANDED
+       EXTERNAL FCN, JAC
+       COMMON /COSEU/XOLDD,HHH,NNRD,KRIGHT
+       COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C --- COMPUTE COEFFICIENTS FOR DENSE OUTPUT
+       IF (IOUT.EQ.2) THEN
+          NNRD=NRD
+C --- COMPUTE THE FACTORIALS --------
+          FACUL(1)=1.D0
+          DO I=1,KM-1
+             FACUL(I+1)=I*FACUL(I)
+          END DO
+       END IF
+
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+       LRDE=(KM+2)*NRD
+       MLE=MLJAC
+       MUE=MUJAC
+       MBJAC=MLJAC+MUJAC+1
+       MBB=MLB+MUB+1
+       MDIAG=MLE+MUE+1
+       MDIFF=MLE+MUE-MUB
+       MBDIAG=MUB+1
+       IF (M1.GT.0) IJOB=IJOB+10
+C --- DEFINE THE STEP SIZE SEQUENCE
+       IF (NSEQU.EQ.1) THEN
+           NJ(1)=1
+           NJ(2)=2
+           NJ(3)=3
+           DO I=4,KM
+              NJ(I)=2*NJ(I-2)
+           END DO
+       END IF
+       IF (NSEQU.EQ.2) THEN
+           NJ(1)=2
+           NJ(2)=3
+           DO I=3,KM
+              NJ(I)=2*NJ(I-2)
+           END DO
+       END IF
+       DO I=1,KM
+          IF (NSEQU.EQ.3) NJ(I)=I
+          IF (NSEQU.EQ.4) NJ(I)=I+1
+       END DO
+       A(1)=WKJAC+NJ(1)*WKROW+WKDEC
+       DO I=2,KM
+          A(I)=A(I-1)+(NJ(I)-1)*WKROW+WKDEC
+       END DO
+       K=MAX0(3,MIN0(KM-2,INT(-DLOG10(RelTol(1)+AbsTol(1))*.6D0+1.5D0)))
+       HMAXN=MIN(ABS(HMAX),ABS(XEND-X))
+       IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+       H=MIN(ABS(H),HMAXN)
+       THETA=2*ABS(THET)
+       ERR=0.D0
+       W(1)=1.D30
+       DO I=1,N
+          IF (ITOL.EQ.0) THEN
+            SCAL(I)=AbsTol(1)+RelTol(1)*DABS(Y(I))
+          ELSE
+            SCAL(I)=AbsTol(I)+RelTol(I)*DABS(Y(I))
+          END IF
+       END DO
+       CALJAC=.FALSE.
+       REJECT=.FALSE.
+       LAST=.FALSE.
+  10   CONTINUE
+       IF (REJECT) THETA=2*ABS(THET)
+       ATOV=.FALSE.
+C *** *** *** *** *** *** ***
+C --- IS XEND REACHED IN THE NEXT STEP?
+C *** *** *** *** *** *** ***
+       H1=XEND-X
+       IF (H1.LE.UROUND) GO TO 110
+       HOPT=H
+       H=MIN(H,H1,HMAXN)
+       IF (H.GE.H1-UROUND) LAST=.TRUE.
+       IF (AUTNMS) THEN
+          CALL FCN(N,X,Y,DY)
+          NFCN=NFCN+1
+       END IF
+       IF (THETA.GT.THET.AND..NOT.CALJAC) THEN
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+          NJAC=NJAC+1
+C --- COMPUTE JACOBIAN MATRIX ANALYTICALLY
+          CALL JAC(N,X,Y,FJAC)
+          CALJAC=.TRUE.
+          CALHES=.FALSE.
+       END IF
+C *** *** *** *** *** *** ***
+C --- THE FIRST AND LAST STEP
+C *** *** *** *** *** *** ***
+      IF (NSTEP.EQ.0.OR.LAST) THEN
+        IPT=0
+        NSTEP=NSTEP+1
+        DO J=1,K
+         KC=J
+         CALL SEUL(J,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &             HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,FAC,
+     &             FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,MLB,
+     &             MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &             ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+         IF (ATOV) GOTO 10
+         IF (J.GT.1.AND.ERR.LE.1.D0) GO TO 60
+        END DO
+        GO TO 55
+      END IF
+C --- BASIC INTEGRATION STEP
+  30  CONTINUE
+      IPT=0
+      NSTEP=NSTEP+1
+      IF (NSTEP.GE.NMAX) GO TO 120
+      KC=K-1
+      DO J=1,KC
+       CALL SEUL(J,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &           HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,
+     &           FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &           MLB,MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &           ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+       IF (ATOV) GOTO 10
+      END DO
+C *** *** *** *** *** *** ***
+C --- CONVERGENCE MONITOR
+C *** *** *** *** *** *** ***
+      IF (K.EQ.2.OR.REJECT) GO TO 50
+      IF (ERR.LE.1.D0) GO TO 60
+      IF (ERR.GT.DBLE(NJ(K+1)*NJ(K))*4.D0) GO TO 100
+  50  CALL SEUL(K,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &           HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,
+     &           FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &           MLB,MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &           ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+      IF (ATOV) GOTO 10
+      KC=K
+      IF (ERR.LE.1.D0) GO TO 60
+C --- HOPE FOR CONVERGENCE IN LINE K+1
+  55  IF (ERR.GT.DBLE(NJ(K+1))*2.D0) GO TO 100
+      KC=K+1
+      CALL SEUL(KC,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &           HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,
+     &           FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &           MLB,MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &           ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+      IF (ATOV) GOTO 10
+CAdi      IF (ERR.GT.1.D0) GO TO 100
+      IF ((ERR.GT.1.D0).and.(H.gt.STEPMIN)) GO TO 100 ! Adi
+C *** *** *** *** *** *** ***
+C --- STEP IS ACCEPTED
+C *** *** *** *** *** *** ***
+  60  XOLD=X
+      X=X+H
+      IF (IOUT.EQ.2) THEN
+         KRIGHT=KC
+         DO I=1,NRD
+            DENS(I)=Y(ICOMP(I))
+         END DO
+      END IF
+      DO I=1,N
+         T1I=T(1,I)
+         IF (ITOL.EQ.0) THEN
+            SCAL(I)=AbsTol(1)+RelTol(1)*DABS(T1I)
+         ELSE
+            SCAL(I)=AbsTol(I)+RelTol(I)*DABS(T1I)
+         END IF
+         Y(I)=T1I
+      END DO
+      NACCPT=NACCPT+1
+      CALJAC=.FALSE.
+      IF (IOUT.EQ.2) THEN
+         XOLDD=XOLD
+         HHH=H
+         DO I=1,NRD
+            DENS(NRD+I)=Y(ICOMP(I))
+         END DO
+         DO KLR=1,KRIGHT-1
+C --- COMPUTE DIFFERENCES
+            IF (KLR.GE.2) THEN
+               DO KK=KLR,KC
+                  LBEG=((KK+1)*KK)/2
+                  LEND=LBEG-KK+2
+                  DO L=LBEG,LEND,-1
+                     DO I=1,NRD
+                        FSAFE(L,I)=FSAFE(L,I)-FSAFE(L-1,I)
+                     END DO
+                  END DO
+               END DO
+             END IF
+C --- COMPUTE DERIVATIVES AT RIGHT END ----
+             DO KK=KLR+LAMBDA,KC
+                FACNJ=NJ(KK)
+                FACNJ=FACNJ**KLR/FACUL(KLR+1)
+                IPT=((KK+1)*KK)/2
+                DO  I=1,NRD
+                   KRN=(KK-LAMBDA+1)*NRD
+                   DENS(KRN+I)=FSAFE(IPT,I)*FACNJ
+                END DO
+             END DO
+             DO J=KLR+LAMBDA+1,KC
+               DBLENJ=NJ(J)
+               DO L=J,KLR+LAMBDA+1,-1
+                 FACTOR=DBLENJ/NJ(L-1)-1.D0
+                 DO I=1,NRD
+                   KRN=(L-LAMBDA+1)*NRD+I
+                   DENS(KRN-NRD)=DENS(KRN)
+     &                          +(DENS(KRN)-DENS(KRN-NRD))/FACTOR
+                 END DO
+               END DO
+             END DO
+         END DO
+C ---  COMPUTE THE COEFFICIENTS OF THE INTERPOLATION POLYNOMIAL
+         DO IN=1,NRD
+            DO J=1,KRIGHT
+               II=NRD*J+IN
+               DENS(II)=DENS(II)-DENS(II-NRD)
+            END DO
+         END DO
+      END IF
+C --- COMPUTE OPTIMAL ORDER
+      IF (KC.EQ.2) THEN
+         KOPT=3
+         IF (REJECT) KOPT=2
+         GO TO 80
+      END IF
+      IF (KC.LE.K) THEN
+         KOPT=KC
+         IF (W(KC-1).LT.W(KC)*FAC3) KOPT=KC-1
+         IF (W(KC).LT.W(KC-1)*FAC4) KOPT=MIN0(KC+1,KM-1)
+      ELSE
+         KOPT=KC-1
+         IF (KC.GT.3.AND.W(KC-2).LT.W(KC-1)*FAC3) KOPT=KC-2
+         IF (W(KC).LT.W(KOPT)*FAC4) KOPT=MIN0(KC,KM-1)
+      END IF
+C --- AFTER A REJECTED STEP
+  80  IF (REJECT) THEN
+         K=MIN0(KOPT,KC)
+         H=DMIN1(H,HH(K))
+         REJECT=.FALSE.
+         GO TO 10
+      END IF
+C --- COMPUTE STEP SIZE FOR NEXT STEP
+      IF (KOPT.LE.KC) THEN
+         H=HH(KOPT)
+      ELSE
+         IF (KC.LT.K.AND.W(KC).LT.W(KC-1)*FAC4) THEN
+            H=HH(KC)*A(KOPT+1)/A(KC)
+         ELSE
+            H=HH(KC)*A(KOPT)/A(KC)
+         END IF
+      END IF
+      K=KOPT
+      H = DMAX1(H, STEPMIN)  ! Adi
+      GO TO 10
+C *** *** *** *** *** *** ***
+C --- STEP IS REJECTED
+C *** *** *** *** *** *** ***
+ 100  K=MIN0(K,KC)
+      IF (K.GT.2.AND.W(K-1).LT.W(K)*FAC3) K=K-1
+      NREJCT=NREJCT+1
+      H=HH(K)
+      LAST=.FALSE.
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 30
+      GO TO 10
+C --- SOLUTION EXIT
+ 110  CONTINUE
+      H=HOPT
+      IDID=1
+      RETURN
+C --- FAIL EXIT
+ 120  WRITE (6,979) X,H
+ 979  FORMAT(' EXIT OF SEULEX AT X=',D14.7,'   H=',D14.7)
+      IDID=-1
+      RETURN
+      END
+C
+C
+C *** *** *** *** *** *** ***
+C     S U B R O U T I N E    S E U L
+C *** *** *** *** *** *** ***
+C
+      SUBROUTINE SEUL(JJ,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,
+     &          H,KM,HMAXN,T,SCAL,NJ,HH,W,A,YH,DYH,DEL,WH,ERR,SAFE1,
+     &          FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &          MLB,MUB,ERROLD,IPHES,ICOMP,
+     &          AUTNMS,IMPLCT,BANDED,REJECT,ATOV,FSAFE,KM2,NRD,IOUT,
+     &          IPT,M1,M2,NM1,IJOB,CALHES)
+C --- THIS SUBROUTINE COMPUTES THE J-TH LINE OF THE
+C --- EXTRAPOLATION TABLE AND PROVIDES AN ESTIMATE
+C --- OF THE OPTIMAL STEP SIZE
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      INTEGER KM, KM2
+      DIMENSION Y(N),YH(N),DY(N),FX(N),DYH(N),DEL(N)
+      DIMENSION WH(N),SCAL(N),HH(KM),W(KM),A(KM)
+      DIMENSION FJAC(LU_NONZERO),E(LU_NONZERO)
+      DIMENSION FMAS(LDMAS,N),T(KM,N),IP(N),NJ(KM),IPHES(N)
+      DIMENSION FSAFE(KM2,NRD),ICOMP(NRD)
+      LOGICAL ATOV,REJECT,AUTNMS,IMPLCT,BANDED,CALHES
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      EXTERNAL FCN
+C *** *** *** *** *** *** ***
+C  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+C *** *** *** *** *** *** ***
+      HJ=H/NJ(JJ)
+      HJI=1.D0/HJ
+      DO  I=1,LU_NONZERO
+         E(I)=-FJAC(I)
+      END DO
+      DO J=1,N
+         E(LU_DIAG(J))=E(LU_DIAG(J))+HJI
+      END DO
+      CALL KppDecomp (E,IER)
+      IF (IER.NE.0) GOTO 79
+      NDEC=NDEC+1
+C *** *** *** *** *** *** ***
+C --- STARTING PROCEDURE
+C *** *** *** *** *** *** ***
+       IF (.NOT.AUTNMS) THEN
+          CALL FCN(N,X+HJ,Y,DY)
+          NFCN=NFCN+1
+       END IF
+       DO I=1,N
+          YH(I)=Y(I)
+          DEL(I)=DY(I)
+       END DO
+       CALL KppSolve (E,DEL)
+       NSOL=NSOL+1
+       M=NJ(JJ)
+       IF (IOUT.EQ.2.AND.M.EQ.JJ) THEN
+          IPT=IPT+1
+          DO I=1,NRD
+             FSAFE(IPT,I)=DEL(ICOMP(I))
+          END DO
+       END IF
+C *** *** *** *** *** *** ***
+C --- SEMI-IMPLICIT EULER METHOD
+C *** *** *** *** *** *** ***
+       IF (M.GT.1) THEN
+          DO MM=1,M-1
+             DO I=1,N
+                YH(I)=YH(I)+DEL(I)
+             END DO
+             IF (AUTNMS) THEN
+                CALL FCN(N,X+HJ*MM,YH,DYH)
+             ELSE
+                CALL FCN(N,X+HJ*(MM+1),YH,DYH)
+             END IF
+             NFCN=NFCN+1
+             IF (MM.EQ.1.AND.JJ.LE.2) THEN
+C --- STABILITY CHECK
+                DEL1=0.D0
+                DO I=1,N
+                   DEL1=DEL1+(DEL(I)/SCAL(I))**2
+                END DO
+                DEL1=DSQRT(DEL1)
+                IF (IMPLCT) THEN
+                   DO I=1,NM1
+                      WH(I)=DEL(I+M1)
+                   END DO
+                   IF (MLB.EQ.NM1) THEN
+                      DO I=1,NM1
+                         SUM=0.D0
+                         DO J=1,NM1
+                            SUM=SUM+FMAS(I,J)*WH(J)
+                         END DO
+                         DEL(I+M1)=SUM
+                      END DO
+                   ELSE
+                      DO I=1,NM1
+                         SUM=0.D0
+                         DO J=MAX(1,I-MLB),MIN(NM1,I+MUB)
+                            SUM=SUM+FMAS(I-J+MBDIAG,J)*WH(J)
+                         END DO
+                         DEL(I+M1)=SUM
+                      END DO
+                   END IF
+                END IF
+                IF (.NOT.AUTNMS) THEN
+                   CALL FCN(N,X+HJ,YH,WH)
+                   NFCN=NFCN+1
+                   DO I=1,N
+                      DEL(I)=WH(I)-DEL(I)*HJI
+                   END DO
+                ELSE
+                   DO I=1,N
+                      DEL(I)=DYH(I)-DEL(I)*HJI
+                   END DO
+                END IF
+                CALL KppSolve (E,DEL)
+                NSOL=NSOL+1
+                DEL2=0.D0
+                DO I=1,N
+                   DEL2=DEL2+(DEL(I)/SCAL(I))**2
+                END DO
+                DEL2=DSQRT(DEL2)
+                THETA=DEL2/MAX(1.D0,DEL1)
+                IF (THETA.GT.1.D0) GOTO 79
+             END IF
+             CALL KppSolve (E,DYH)
+             NSOL=NSOL+1
+             DO I=1,N
+                DEL(I)=DYH(I)
+             END DO
+             IF (IOUT.EQ.2.AND.MM.GE.M-JJ) THEN
+                IPT=IPT+1
+                DO I=1,NRD
+                   FSAFE(IPT,I)=DEL(ICOMP(I))
+                END DO
+             END IF
+          END DO
+       END IF
+       DO I=1,N
+          T(JJ,I)=YH(I)+DEL(I)
+       END DO
+C *** *** *** *** *** *** ***
+C --- POLYNOMIAL EXTRAPOLATION
+C *** *** *** *** *** *** ***
+       IF (JJ.EQ.1) RETURN
+       DO L=JJ,2,-1
+          FAC=(DBLE(NJ(JJ))/DBLE(NJ(L-1)))-1.D0
+          DO I=1,N
+             T(L-1,I)=T(L,I)+(T(L,I)-T(L-1,I))/FAC
+          END DO
+       END DO
+       ERR=0.D0
+       DO I=1,N
+          ERR=ERR+MIN(ABS((T(1,I)-T(2,I)))/SCAL(I),1.D15)**2
+       END DO
+       IF (ERR.GE.1.D30) GOTO 79
+       ERR=DSQRT(ERR/DBLE(N))
+       IF (JJ.GT.2.AND.ERR.GE.ERROLD) GOTO 79
+       ERROLD=DMAX1(4*ERR,1.D0)
+C --- COMPUTE OPTIMAL STEP SIZES
+       EXPO=1.D0/JJ
+       FACMIN=FAC1**EXPO
+       FAC=DMIN1(FAC2/FACMIN,DMAX1(FACMIN,(ERR/SAFE1)**EXPO/SAFE2))
+       FAC=1.D0/FAC
+       HH(JJ)=DMIN1(H*FAC,HMAXN)
+       W(JJ)=A(JJ)/HH(JJ)
+       RETURN
+  79   ATOV=.TRUE.
+       H=H*0.5D0
+       REJECT=.TRUE.
+       RETURN
+       END
+
+
+
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/kpp_seulex.f90	(revision 3477)
@@ -0,0 +1,1163 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SEULEX - Stiff extrapolation method based on linearly implicit Euler   !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision, ONLY: dp
+  USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+  USE KPP_ROOT_Jacobian, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+  ! variables from the former COMMON block /CONRA5/ are now here:
+  INTEGER :: NN, NN2, NN3, NN4
+  KPP_REAL :: TSOL, HSOL
+  
+  ! Statistics
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  
+  ! Method parameters
+  
+  ! mz_rs_20050717: TODO: use strings of IERR_NAMES for error messages
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-4:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -4
+    'Step size too small                               ', & ! -3
+    'More than Max_no_steps steps are needed           ', & ! -2
+    'Insufficient storage for work or iwork            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters, ONLY: nvar
+    USE KPP_ROOT_Global,     ONLY: atol,rtol,var
+
+    IMPLICIT NONE
+
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: Ncolumns, Ncolumns2, NRDENS
+    PARAMETER (Ncolumns=12,Ncolumns2=2+Ncolumns*(Ncolumns+3)/2,NRDENS=NVAR)
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20)
+    INTEGER ::       ICNTRL(20), ISTATUS(20)
+    INTEGER :: IERR
+    INTEGER, SAVE :: Ntotal = 0
+    KPP_REAL, SAVE :: H
+
+    H = 0.0_dp
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20)  = 0._dp
+    ICNTRL(10)=0    !~~~> OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+
+    ! if optional parameters are given, and if they are >0, 
+    ! they overwrite the default settings
+    IF (PRESENT(ICNTRL_U)) ICNTRL(:) = ICNTRL_U(:)
+    IF (PRESENT(RCNTRL_U)) RCNTRL(:) = RCNTRL_U(:)
+    !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-----
+    
+
+    CALL ATMSEULEX(NVAR,TIN,TOUT,VAR,H,RTOL,ATOL,      &
+                    RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+    Ntotal = Ntotal + Nstp
+!!$    PRINT*,'NSTEPS=',Nstp,' (',Ntotal,')  T=',TIN
+
+
+    Nfun = Nfun + ISTATUS(1)
+    Njac = Njac + ISTATUS(2)
+    Nstp = Nstp + ISTATUS(3)
+    Nacc = Nacc + ISTATUS(4)
+    Nrej = Nrej + ISTATUS(5)
+    Ndec = Ndec + ISTATUS(6)
+    Nsol = Nsol + ISTATUS(7)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) THEN
+      ISTATUS_U(:) = 0
+      ISTATUS_U(1) = Nfun ! function calls
+      ISTATUS_U(2) = Njac ! jacobian calls
+      ISTATUS_U(3) = Nstp ! steps
+      ISTATUS_U(4) = Nacc ! accepted steps
+      ISTATUS_U(5) = Nrej ! rejected steps (except at the beginning)
+      ISTATUS_U(6) = Ndec ! LU decompositions
+      ISTATUS_U(7) = Nsol ! forward/backward substitutions
+    ENDIF
+    IF (PRESENT(RSTATUS_U)) THEN
+      RSTATUS_U(:) = 0.
+      RSTATUS_U(1) = TOUT ! final time
+    ENDIF
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+! mz_rs_20050716: IERR is returned to the user who then decides what to do
+! about it, i.e. either stop the run or ignore it.
+!!$    IF (IERR < 0) THEN
+!!$      PRINT *,'SEULEX: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+!!$      STOP
+!!$    ENDIF
+
+  END SUBROUTINE INTEGRATE
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ATMSEULEX( N,Tinitial,Tfinal,Y,H,RelTol,AbsTol,     &
+                        RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+!     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(T,Y).
+!     THIS IS AN EXTRAPOLATION-ALGORITHM, BASED ON THE
+!     LINEARLY IMPLICIT EULER METHOD (WITH STEP SIZE CONTROL
+!     AND ORDER SELECTION).
+!
+!     AUTHORS: E. HAIRER AND G. WANNER
+!              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!              CH-1211 GENEVE 24, SWITZERLAND
+!              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!              INCLUSION OF DENSE OUTPUT BY E. HAIRER AND A. OSTERMANN
+!
+!     THIS CODE IS PART OF THE BOOK:
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!     VERSION OF SEPTEMBER 30, 1995
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!     INPUT PARAMETERS
+!     ----------------
+!     N           DIMENSION OF THE SYSTEM
+!
+!     T           INITIAL T-VALUE
+!
+!     Y(N)        INITIAL VALUES FOR Y
+!
+!     Tend        FINAL T-VALUE (Tend-T MAY BE POSITIVE OR NEGATIVE)
+!
+!     H           INITIAL STEP SIZE GUESS;
+!                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT,
+!                 H=1.D0/(NORM OF F'), USUALLY 1.D-2 OR 1.D-3, IS GOOD.
+!                 THIS CHOICE IS NOT VERY IMPORTANT, THE CODE QUICKLY
+!                 ADAPTS ITS STEP SIZE (IF H=0.D0, THE CODE PUTS H=1.D-6
+!
+!     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+!                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+!
+!     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+!                 THE PARTIAL DERIVATIVES OF F(T,Y) WITH RESPECT TO Y
+!
+!     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+!                 NUMERICAL SOLUTION DURING INTEGRATION.
+!                 IF IOUT>=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+!                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0.
+!                 IT MUST HAVE THE FORM
+!                    SUBROUTINE SOLOUT (NR,TOLD,T,Y,RC,LRC,IC,LIC,N,
+!                                       RPAR,IPAR,IRTRN)
+!                    KPP_REAL T,Y(N),RC(LRC),IC(LIC)
+!                    ....
+!                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+!                    GRID-POINT "T" (THEREBY THE INITIAL VALUE IS
+!                    THE FIRST GRID-POINT).
+!                 "TOLD" IS THE PRECEEDING GRID-POINT.
+!                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+!                    IS SET <0, SEULEX RETURNS TO THE CALLING PROGRAM.
+!                 DO NOT CHANGE THE ENTRIES OF RC(LRC),IC(LIC)!
+!
+!          -----  CONTINUOUS OUTPUT (IF IOUT=2): -----
+!                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+!                 FOR THE INTERVAL [TOLD,T] IS AVAILABLE THROUGH
+!                 THE KPP_REAL FUNCTION
+!                        >>>   CONTEX(I,S,RC,LRC,IC,LIC)   <<<
+!                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+!                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+!                 S SHOULD LIE IN THE INTERVAL [TOLD,T].
+!
+!     IOUT        GIVES INFORMATION ON THE SUBROUTINE SOLOUT:
+!                    IOUT=0: SUBROUTINE IS NEVER CALLED
+!                    IOUT=1: SUBROUTINE IS USED FOR OUTPUT
+!                    IOUT=2: DENSE OUTPUT IS PERFORMED IN SOLOUT
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!     SOPHISTICATED SETTING OF PARAMETERS
+!     -----------------------------------
+!              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT CNTRL
+!              WELL. THEY MAY BE DEFINED BY SETTING CNTRL(1),..,CNTRL(13)
+!              AS WELL AS ICNTRL(1),..,ICNTRL(4) DIFFERENT FROM ZERO.
+!              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+!
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = 1: F = F(y)   Independent of T (autonomous)
+!              = 0: F = F(t,y) Depends on T (non-autonomous)
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(11)  THE MAXIMUM NUMBER OF COLUMNS IN THE EXTRAPOLATION
+!              TABLE. THE DEFAULT VALUE (FOR ICNTRL(3)=0) IS 12.
+!              IF ICNTRL(3).NE.0 THEN ICNTRL(3) SHOULD BE  >= 3.
+!
+!    ICNTRL(12)  SWITCH FOR THE STEP SIZE SEQUENCE
+!              IF ICNTRL(4) == 1 THEN 1,2,3,4,6,8,12,16,24,32,48,...
+!              IF ICNTRL(4) == 2 THEN 2,3,4,6,8,12,16,24,32,48,64,...
+!              IF ICNTRL(4) == 3 THEN 1,2,3,4,5,6,7,8,9,10,...
+!              IF ICNTRL(4) == 4 THEN 2,3,4,5,6,7,8,9,10,11,...
+!              THE DEFAULT VALUE (FOR ICNTRL(4)=0) IS ICNTRL(4)=2.
+!
+!    ICNTRL(13)  PARAMETER "LAMBDA" OF DENSE OUTPUT; POSSIBLE VALUES
+!              ARE 0 AND 1; DEFAULT ICNTRL(5)=0.
+!
+!    ICNTRL(14)  = NRDENS = NUMBER OF COMPONENTS, FOR WHICH DENSE OUTPUT
+!              IS REQUIRED
+!
+!    ICNTRL(21),...,ICNTRL(NRDENS+20) INDICATE THE COMPONENTS, FOR WHICH
+!              DENSE OUTPUT IS REQUIRED
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001). Increase cntrl(3), to 0.01 say, when 
+!                   Jacobian evaluations are costly. for small systems it 
+!                   should be smaller.
+!    RCNTRL(9)  -> not used
+!    RCNTRL(10,11) -> FAC1,FAC2 (parameters for step size selection)
+!    RCNTRL(12,13) -> FAC3,FAC4 (parameters for order selection)
+!    RCNTRL(14,15) -> FacSafe1, FacSafe2
+!                     Safety factors for step size prediction
+!                     HNEW=H*FacSafe2*(FacSafe1*TOL/ERR)**(1/(J-1))
+!    RCNTRL(16:19) -> WorkFcn, WorkJac, WorkDec, WorkSol 
+!                     estimated computational work
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!     OUTPUT PARAMETERS
+!     -----------------
+!     T           T-VALUE WHERE THE SOLUTION IS COMPUTED
+!                 (AFTER SUCCESSFUL RETURN T=Tend)
+!
+!     Y(N)        SOLUTION AT T
+!
+!     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!          DECLARATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, IERR, ITOL, Max_no_steps, Ncolumns, Nsequence, Lambda, &
+                 NRDENS, i, Ncolumns2, NRD, IOUT
+      KPP_REAL :: Y(NVAR),AbsTol(*),RelTol(*)
+      KPP_REAL :: Tinitial, Tfinal, Roundoff, Hmin, Hmax,         &
+                 FacMin, FacMax, FAC1, FAC2, FAC3, FAC4, FacSafe1,     &
+                 FacSafe2, H, Hstart,WorkFcn,WorkJac, WorkDec, WorkSol,&
+                 WorkRow, FacRej, FacSafe, ThetaMin, T
+      LOGICAL :: AUTNMS
+      KPP_REAL :: RCNTRL(20), RSTATUS(20)
+      INTEGER ::       ICNTRL(20), ISTATUS(20)
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Nfun=0
+   Njac=0
+   Nstp=0
+   Nacc=0
+   Nrej=0
+   Ndec=0
+   Nsol=0
+       
+   IERR = 0
+
+   IF (ICNTRL(1) == 0) THEN
+      AUTNMS = .FALSE. 
+   ELSE
+      AUTNMS = .TRUE.
+   END IF
+
+!~~~>  For Scalar tolerances (ICNTRL(1)/=0) the code uses AbsTol(1) and RelTol(1)
+!~~~>  For Vector tolerances (ICNTRL(1)==0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      ITOL = 1
+   ELSE
+      ITOL = 0
+   END IF
+
+!~~~> Max_no_steps: the maximum number of time steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = 100000
+   ELSEIF (ICNTRL(4) > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE
+      PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+      CALL SEULEX_ErrorMsg(-1,Tinitial,ZERO,IERR);
+   END IF
+
+!~~~> IOUT = use (or not) the output routine
+   IOUT = ICNTRL(10)
+   IF ( IOUT<0 .OR. IOUT>2 ) THEN
+       PRINT * ,'User-selected ICNTRL(10)=',ICNTRL(10)
+       IOUT = 0
+   END IF
+   
+!~~~> Ncolumns:  maximum number of columns in the extrapolation
+   IF (ICNTRL(11)==0) THEN
+       Ncolumns=12
+   ELSEIF (ICNTRL(11) > 2) THEN
+       Ncolumns=ICNTRL(11)
+   ELSE   
+       PRINT * ,'User-selected ICNTRL(11)=',ICNTRL(11)
+       CALL SEULEX_ErrorMsg(-2,Tinitial,ZERO,IERR);
+   END IF
+
+!~~~> Nsequence: choice of step size sequence
+   IF (ICNTRL(12)==0) THEN
+      Nsequence = 2
+   ELSEIF ( (ICNTRL(12)>0).AND.(ICNTRL(12)<5) ) THEN
+      Nsequence = ICNTRL(4)
+   ELSE
+      PRINT * ,'User-selected ICNTRL(12)=',ICNTRL(12)
+      CALL SEULEX_ErrorMsg(-3,Tinitial,ZERO,IERR)
+   END IF
+
+!~~~> LAMBDA: parameter for dense output
+   LAMBDA = ICNTRL(13)
+   IF ( LAMBDA < 0 .OR. LAMBDA >= 2 ) THEN
+       PRINT * ,'User-selected ICNTRL(13)=',ICNTRL(13)
+       CALL SEULEX_ErrorMsg(-4,Tinitial,ZERO,IERR)
+   END IF
+      
+!~~~>- NRDENS:  number of dense output components
+   NRDENS=ICNTRL(14)
+   IF ( (NRDENS < 0) .OR. (NRDENS > N)  ) THEN
+       PRINT * ,'User-selected ICNTRL(14)=',ICNTRL(14)
+       CALL SEULEX_ErrorMsg(-5,Tinitial,ZERO,IERR)
+   END IF
+
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN
+      Hmin = RCNTRL(1)
+   ELSE
+      PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+      CALL SEULEX_ErrorMsg(-7,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tfinal-Tinitial)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+      CALL SEULEX_ErrorMsg(-7,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,Roundoff)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL SEULEX_ErrorMsg(-7,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2_dp
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 10.0_dp
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1_dp
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9_dp
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+
+!~~~> ThetaMin: DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+!              INCREASE WORK(3), TO 0.01 SAY, WHEN JACOBIAN EVALUATIONS
+!              ARE COSTLY. FOR SMALL SYSTEMS WORK(3) SHOULD BE SMALLER.
+   IF(RCNTRL(8) == 0.D0)THEN
+       ThetaMin = 1.0d-3
+   ELSE
+       ThetaMin = RCNTRL(8)
+   END IF
+
+!~~~>  FAC1,FAC2:     PARAMETERS FOR STEP SIZE SELECTION
+!              THE NEW STEP SIZE FOR THE J-TH DIAGONAL ENTRY IS
+!              CHOSEN SUBJECT TO THE RESTRICTION
+!                 FACMIN/WORK(5) <= HNEW(J)/HOLD <= 1/FACMIN
+!              WHERE FACMIN=WORK(4)**(1/(J-1))
+      IF(RCNTRL(10) == 0.D0)THEN
+         FAC1=0.1D0
+      ELSE
+         FAC1=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == 0.D0)THEN
+         FAC2=4.0D0
+      ELSE
+         FAC2=RCNTRL(11)
+      END IF
+!~~~>  FAC3, FAC4:   PARAMETERS FOR THE ORDER SELECTION
+!              ORDER IS DECREASED IF    W(K-1) <= W(K)*WORK(6)
+!              ORDER IS INCREASED IF    W(K) <= W(K-1)*WORK(7)
+      IF(RCNTRL(12) == 0.D0)THEN
+         FAC3=0.7D0
+      ELSE
+         FAC3=RCNTRL(12)
+      END IF
+      IF(RCNTRL(13) == 0.D0)THEN
+         FAC4=0.9D0
+      ELSE
+         FAC4=RCNTRL(13)
+      END IF
+!~~~>- FacSafe1, FacSafe2: safety factors for step size prediction
+!             HNEW=H*WORK(9)*(WORK(8)*TOL/ERR)**(1/(J-1))
+      IF(RCNTRL(14) == 0.D0)THEN
+         FacSafe1=0.6D0
+      ELSE
+         FacSafe1=RCNTRL(14)
+      END IF
+      IF(RCNTRL(15) == 0.D0)THEN
+         FacSafe2=0.93D0
+      ELSE
+         FacSafe2=RCNTRL(15)
+      END IF
+      
+!~~~> WorkFcn: estimated computational work for a calls to FCN
+      IF(RCNTRL(16) == 0.D0)THEN
+         WorkFcn=1.D0
+      ELSE
+         WorkFcn=RCNTRL(16)
+      END IF
+!~~~> WorkJac: estimated computational work for calls to JAC
+      IF(RCNTRL(17) == 0.D0)THEN
+         WorkJac=5.D0
+      ELSE
+         WorkJac=RCNTRL(17)
+      END IF
+!~~~> WorkDec: estimated computational work for calls to DEC
+      IF(RCNTRL(18) == 0.D0)THEN
+         WorkDec=1.D0
+      ELSE
+         WorkDec=RCNTRL(18)
+      END IF
+!~~~> WorkSol: estimated computational work for calls to SOL
+      IF(RCNTRL(19) == 0.D0)THEN
+         WorkSol=1.D0
+      ELSE
+         WorkSol=RCNTRL(19)
+      END IF
+      WorkRow=WorkFcn+WorkSol
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= 0.D0.OR.RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SEULEX_ErrorMsg(-9,Tinitial,ZERO,IERR)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SEULEX_ErrorMsg(-9,Tinitial,ZERO,IERR)
+            END IF
+         END DO
+      END IF
+    
+    IF (IERR < 0) RETURN
+       
+!~~~>---- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      Ncolumns2=(Ncolumns*(Ncolumns+1))/2
+      NRD=MAX(1,NRDENS)
+
+      T = Tinitial
+!~~~> CALL TO CORE INTEGRATOR 
+      CALL SEULEX_Integrator(N,T,Tfinal,Y,Hmax,H,Ncolumns,RelTol,AbsTol,ITOL,  &
+                IOUT,IERR,Max_no_steps,Roundoff,Nsequence,AUTNMS,  &
+                FAC1,FAC2,FAC3,FAC4,ThetaMin,FacSafe1,FacSafe2,WorkJac,  &
+                WorkDec,WorkRow,Ncolumns2,NRD,LAMBDA,Nstp)
+        
+      ISTATUS(1)=Nfun
+      ISTATUS(2)=Njac
+      ISTATUS(3)=Nstp
+      ISTATUS(4)=Nacc
+      ISTATUS(5)=Nrej
+      ISTATUS(6)=Ndec
+      ISTATUS(7)=Nsol
+
+      END SUBROUTINE ATMSEULEX
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SEULEX_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from SEULEX due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximum no of columns in extrapolation'
+    CASE (-3)
+      PRINT * , '--> Improper value for step size sequence'
+    CASE (-4)
+      PRINT * , '--> Improper value for Lambda (must be 0/1)'
+    CASE (-5)
+      PRINT * , '--> Improper number of dense output components'
+    CASE (-6)
+      PRINT * , '--> Improper parameters for second order equations'
+    CASE (-7)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-8)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-9)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-10)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-11)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-12)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SEULEX_ErrorMsg
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SEULEX_Integrator(N,T,Tend,Y,Hmax,H,Ncolumns,RelTol,AbsTol,ITOL,&
+       IOUT,IERR,Max_no_steps,Roundoff,Nsequence,AUTNMS,             &
+       FAC1,FAC2,FAC3,FAC4,ThetaMin,FacSafe1,FacSafe2,WorkJac,       &
+       WorkDec,WorkRow,Ncolumns2,NRD,LAMBDA,Nstp)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     CORE INTEGRATOR FOR SEULEX
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!         DECLARATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       USE KPP_ROOT_Parameters
+       USE KPP_ROOT_Jacobian
+       IMPLICIT KPP_REAL (A-H,O-Z)
+       IMPLICIT INTEGER (I-N)
+
+       INTEGER ::  N, Ncolumns, Ncolumns2, K, KC, KRIGHT, KLR, KK, KRN,&
+       KOPT, NRD
+       KPP_REAL ::  Y(NVAR),DY(NVAR),FX(NVAR),YHH(NVAR)
+       KPP_REAL ::  DYH(NVAR), DEL(NVAR), WH(NVAR)
+       KPP_REAL ::  SCAL(NVAR), HH(Ncolumns), W(Ncolumns), A(Ncolumns)
+#ifdef FULL_ALGEBRA    
+       KPP_REAL :: FJAC(NVAR,NVAR)
+#else       
+       KPP_REAL :: FJAC(LU_NONZERO)
+#endif       
+       KPP_REAL Table(Ncolumns,N)
+       INTEGER IP(N),NJ(Ncolumns),IPHES(N),ICOMP(NRD)
+       KPP_REAL RelTol(*),AbsTol(*)
+       KPP_REAL FSAFE(Ncolumns2,NRD),FACUL(Ncolumns),E(N,N),DENS((Ncolumns+2)*NRD)
+       LOGICAL REJECT,LAST,ATOV,CALJAC,CALHES,AUTNMS
+
+       KPP_REAL TOLDD,HHH,NNRD
+       COMMON /COSEU/TOLDD,HHH,NNRD,KRIGHT
+
+!~~~> COMPUTE COEFFICIENTS FOR DENSE OUTPUT
+       IF (IOUT == 2) THEN
+          NNRD=NRD
+!~~~> COMPUTE THE FACTORIALS --------
+          FACUL(1)=1.D0
+          DO i=1,Ncolumns-1
+             FACUL(i+1)=i*FACUL(i)
+          END DO
+       END IF
+
+!~~~> DEFINE THE STEP SIZE SEQUENCE
+       IF (Nsequence == 1) THEN
+           NJ(1)=1
+           NJ(2)=2
+           NJ(3)=3
+           DO I=4,Ncolumns
+              NJ(i)=2*NJ(I-2)
+           END DO
+       END IF
+       IF (Nsequence == 2) THEN
+           NJ(1)=2
+           NJ(2)=3
+           DO I=3,Ncolumns
+              NJ(i)=2*NJ(I-2)
+           END DO
+       END IF
+       DO i=1,Ncolumns
+          IF (Nsequence == 3) NJ(i)=I
+          IF (Nsequence == 4) NJ(i)=I+1
+       END DO
+       A(1)=WorkJac+NJ(1)*WorkRow+WorkDec
+       DO I=2,Ncolumns
+          A(i)=A(i-1)+(NJ(i)-1)*WorkRow+WorkDec
+       END DO
+       K=MAX0(3,MIN0(Ncolumns-2,INT(-DLOG10(RelTol(1)+AbsTol(1))*.6D0+1.5D0)))
+       
+       ! T = Tinitial
+       HmaxN = MIN(ABS(Hmax),ABS(Tend-T))
+       IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+       H=MIN(ABS(H),HmaxN)
+       Theta=2*ABS(ThetaMin)
+       ERR=0.D0
+       W(1)=1.D30
+       DO i=1,N
+          IF (ITOL == 0) THEN
+            SCAL(i)=AbsTol(1)+RelTol(1)*DABS(Y(i))
+          ELSE
+            SCAL(i)=AbsTol(i)+RelTol(i)*DABS(Y(i))
+          END IF
+       END DO
+       CALJAC=.FALSE.
+       REJECT=.FALSE.
+       LAST=.FALSE.
+   10  CONTINUE
+       IF (REJECT) Theta=2*ABS(ThetaMin)
+       ATOV=.FALSE.
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> IS Tend REACHED IN THE NEXT STEP?
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       H1=Tend-T
+       IF (H1 <= Roundoff) GO TO 110
+       HOPT=H
+       H=MIN(H,H1,HmaxN)
+       IF (H >= H1-Roundoff) LAST=.TRUE.
+       IF (AUTNMS) THEN
+          CALL FUN_CHEM(T,Y,DY)
+       END IF
+       IF (Theta > ThetaMin.AND..NOT.CALJAC) THEN
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  COMPUTATION OF THE JACOBIAN
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+          CALL JAC_CHEM(T,Y,FJAC)
+          CALJAC=.TRUE.
+          CALHES=.FALSE.
+       END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> THE FIRST AND LAST STEP
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (Nstp == 0.OR.LAST) THEN
+        IPT=0
+        Nstp=Nstp+1
+        DO J=1,K
+         KC=J
+         CALL SEUL(J,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns, &
+                  HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,FAC, &
+                  FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol, &
+                  ERROLD,IPHES,ICOMP,AUTNMS,REJECT, &
+                  ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+         IF (ATOV) GOTO 10
+         IF (J > 1 .AND. ERR <= 1.d0) GOTO 60
+        END DO
+        GO TO 55
+      END IF
+!~~~> BASIC INTEGRATION STEP
+   30 CONTINUE
+      IPT=0
+      Nstp=Nstp+1
+      IF (Nstp >= Max_no_steps) GOTO 120
+      KC=K-1
+      DO J=1,KC
+       CALL SEUL(J,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns,&
+                HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,&
+                FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+                ERROLD,IPHES,ICOMP,AUTNMS,REJECT,&
+                ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+       IF (ATOV) GOTO 10
+      END DO
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> CONVERGENCE MONITOR
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (K == 2.OR.REJECT) GO TO 50
+      IF (ERR <= 1.D0) GO TO 60
+      IF (ERR > DBLE(NJ(K+1)*NJ(K))*4.D0) GO TO 100
+   50 CALL SEUL(K,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns,&
+                HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,&
+                FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+                ERROLD,IPHES,ICOMP,AUTNMS,REJECT,&
+                ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+      IF (ATOV) GOTO 10
+      KC=K
+      IF (ERR <= 1.D0) GO TO 60
+!~~~> HOPE FOR CONVERGENCE IN LINE K+1
+   55 IF (ERR > DBLE(NJ(K+1))*2.D0) GO TO 100
+      KC=K+1
+      CALL SEUL(KC,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns,&
+                HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,&
+                FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+                ERROLD,IPHES,ICOMP,AUTNMS,REJECT,&
+                ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+      IF (ATOV) GOTO 10
+      IF (ERR > 1.D0) GO TO 100
+      !Adi IF ((ERR > 1.D0).and.(H.gt.Hmin)) GO TO 100
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> STEP IS ACCEPTED
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   60 TOLD=T
+      T=T+H
+      IF (IOUT == 2) THEN
+         KRIGHT=KC
+         DO i=1,NRD
+            DENS(i)=Y(ICOMP(i))
+         END DO
+      END IF
+      DO i=1,N
+         T1I=Table(1,I)
+         IF (ITOL == 0) THEN
+            SCAL(i)=AbsTol(1)+RelTol(1)*DABS(T1I)
+         ELSE
+            SCAL(i)=AbsTol(i)+RelTol(i)*DABS(T1I)
+         END IF
+         Y(i)=T1I
+      END DO
+      Nacc=Nacc+1
+      CALJAC=.FALSE.
+      IF (IOUT == 2) THEN
+         TOLDD=TOLD
+         HHH=H
+         DO i=1,NRD
+            DENS(NRD+I)=Y(ICOMP(i))
+         END DO
+         DO KLR=1,KRIGHT-1
+!~~~> COMPUTE DIFFERENCES
+            IF (KLR >= 2) THEN
+               DO KK=KLR,KC
+                  LBEG=((KK+1)*KK)/2
+                  LEND=LBEG-KK+2
+                  DO L=LBEG,LEND,-1
+                     DO i=1,NRD
+                        FSAFE(L,I)=FSAFE(L,I)-FSAFE(L-1,I)
+                     END DO
+                  END DO
+               END DO
+             END IF
+!~~~> COMPUTE DERIVATIVES AT RIGHT END ----
+             DO KK=KLR+LAMBDA,KC
+                FACNJ=NJ(KK)
+                FACNJ=FACNJ**KLR/FACUL(KLR+1)
+                IPT=((KK+1)*KK)/2
+                DO  I=1,NRD
+                   KRN=(KK-LAMBDA+1)*NRD
+                   DENS(KRN+I)=FSAFE(IPT,I)*FACNJ
+                END DO
+             END DO
+             DO J=KLR+LAMBDA+1,KC
+               DBLENJ=NJ(J)
+               DO L=J,KLR+LAMBDA+1,-1
+                 FACTOR=DBLENJ/NJ(L-1)-1.D0
+                 DO i=1,NRD
+                   KRN=(L-LAMBDA+1)*NRD+I
+                   DENS(KRN-NRD)=DENS(KRN)+(DENS(KRN)-DENS(KRN-NRD))/FACTOR
+                 END DO
+               END DO
+             END DO
+         END DO
+!~~~>  COMPUTE THE COEFFICIENTS OF THE INTERPOLATION POLYNOMIAL
+         DO IN=1,NRD
+            DO J=1,KRIGHT
+               II=NRD*J+IN
+               DENS(II)=DENS(II)-DENS(II-NRD)
+            END DO
+         END DO
+      END IF
+!~~~> COMPUTE OPTIMAL ORDER
+      IF (KC == 2) THEN
+         KOPT=3
+         IF (REJECT) KOPT=2
+         GO TO 80
+      END IF
+      IF (KC <= K) THEN
+         KOPT=KC
+         IF (W(KC-1) < W(KC)*FAC3) KOPT=KC-1
+         IF (W(KC) < W(KC-1)*FAC4) KOPT=MIN0(KC+1,Ncolumns-1)
+      ELSE
+         KOPT=KC-1
+         IF (KC > 3.AND.W(KC-2) < W(KC-1)*FAC3) KOPT=KC-2
+         IF (W(KC) < W(KOPT)*FAC4) KOPT=MIN0(KC,Ncolumns-1)
+      END IF
+!~~~> AFTER A REJECTED STEP
+   80 IF (REJECT) THEN
+         K=MIN0(KOPT,KC)
+         H=MIN(H,HH(K))
+         REJECT=.FALSE.
+         GO TO 10
+      END IF
+!~~~> COMPUTE STEP SIZE FOR NEXT STEP
+      IF (KOPT <= KC) THEN
+         H=HH(KOPT)
+      ELSE
+         IF (KC < K.AND.W(KC) < W(KC-1)*FAC4) THEN
+            H=HH(KC)*A(KOPT+1)/A(KC)
+         ELSE
+            H=HH(KC)*A(KOPT)/A(KC)
+         END IF
+      END IF
+      K=KOPT
+      !Adi H = MAX(H, Hmin)
+      GO TO 10
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> STEP IS REJECTED
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  100 K=MIN0(K,KC)
+      IF (K > 2.AND.W(K-1) < W(K)*FAC3) K=K-1
+      Nrej=Nrej+1
+      H=HH(K)
+      LAST=.FALSE.
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 30
+      GO TO 10
+!~~~> SOLUTION EXIT
+  110 CONTINUE
+      H=HOPT
+      IERR=1
+      RETURN
+!~~~> FAIL EXIT
+  120 WRITE (6,979) T,H
+  979 FORMAT(' EXIT OF SEULEX AT T=',D14.7,'   H=',D14.7)
+      IERR=-1
+      RETURN
+                                                      
+                             
+      END SUBROUTINE SEULEX_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SEUL(JJ,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,&
+               H,Ncolumns,HmaxN,Table,SCAL,NJ,HH,W,A,YH,DYH,DEL,WH,ERR,FacSafe1, &
+               FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+               ERROLD,IPHES,ICOMP,                             &
+               AUTNMS,REJECT,ATOV,FSAFE,Ncolumns2,NRD,IOUT,    &
+               IPT,CALHES)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> THIS SUBROUTINE COMPUTES THE J-TH LINE OF THE
+!~~~> EXTRAPOLATION TABLE AND PROVIDES AN ESTIMATE
+!~~~> OF THE OPTIMAL STEP SIZE
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Jacobian
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      IMPLICIT INTEGER (I-N)
+      INTEGER :: Ncolumns, Ncolumns2, N, NRD
+      KPP_REAL :: Y(NVAR),YH(NVAR),DY(NVAR),FX(NVAR),DYH(NVAR)
+      KPP_REAL :: DEL(NVAR),WH(NVAR),SCAL(NVAR),HH(Ncolumns),W(Ncolumns),A(Ncolumns)
+#ifdef FULL_ALGEBRA    
+      KPP_REAL :: FJAC(NVAR,NVAR), E(NVAR,NVAR)
+#else
+      KPP_REAL :: FJAC(LU_NONZERO), E(LU_NONZERO)
+#endif      
+      KPP_REAL :: Table(Ncolumns,NVAR)
+      KPP_REAL :: FSAFE(Ncolumns2,NRD)
+      INTEGER :: IP(N),NJ(Ncolumns),IPHES(N),ICOMP(NRD)
+      LOGICAL ATOV,REJECT,AUTNMS,CALHES
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      HJ=H/NJ(JJ)
+      HJI=1.D0/HJ
+#ifdef FULL_ALGEBRA    
+      DO j=1,N
+        DO  i=1,N
+           E(i,j)=-FJAC(i,j)
+        END DO
+        E(j,j)=E(j,j)+HJI
+      END DO
+      CALL DGETRF(N,N,E,N,IP,ISING)
+#else
+      DO  i=1,LU_NONZERO
+         E(i)=-FJAC(i)
+      END DO
+      DO j=1,N
+         E(LU_DIAG(j))=E(LU_DIAG(j))+HJI
+      END DO
+      CALL KppDecomp (E,ISING)
+#endif      
+      Ndec=Ndec+1
+      IF (ISING.NE.0) GOTO 79
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> STARTING PROCEDURE
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (.NOT.AUTNMS) THEN
+          CALL FUN_CHEM(T+HJ,Y,DY)
+       END IF
+       DO i=1,N
+          YH(i)=Y(i)
+          DEL(i)=DY(i)
+       END DO
+#ifdef FULL_ALGEBRA      
+       CALL DGETRS ('N',N,1,E,N,IP,DEL,N,ISING)
+#else
+       CALL KppSolve (E,DEL)
+#endif       
+       Nsol=Nsol+1
+       M=NJ(JJ)
+       IF (IOUT == 2.AND.M == JJ) THEN
+          IPT=IPT+1
+          DO i=1,NRD
+             FSAFE(IPT,I)=DEL(ICOMP(i))
+          END DO
+       END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SEMI-IMPLICIT EULER METHOD
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (M > 1) THEN
+          DO MM=1,M-1
+             DO i=1,N
+                YH(i)=YH(i)+DEL(i)
+             END DO
+             IF (AUTNMS) THEN
+                CALL FUN_CHEM(T+HJ*MM,YH,DYH)
+             ELSE
+                CALL FUN_CHEM(T+HJ*(MM+1),YH,DYH)
+             END IF
+             
+             IF (MM == 1.AND.JJ <= 2) THEN
+!~~~> STABILITY CHECK
+                DEL1=0.D0
+                DO i=1,N
+                   DEL1=DEL1+(DEL(i)/SCAL(i))**2
+                END DO
+                DEL1=SQRT(DEL1)
+                IF (.NOT.AUTNMS) THEN
+                   CALL FUN_CHEM(T+HJ,YH,WH)
+                   
+                   DO i=1,N
+                      DEL(i)=WH(i)-DEL(i)*HJI
+                   END DO
+                ELSE
+                   DO i=1,N
+                      DEL(i)=DYH(i)-DEL(i)*HJI
+                   END DO
+                END IF
+#ifdef FULL_ALGEBRA      
+                CALL DGETRS ('N',N,1,E,N,IP,DEL,N,ISING)
+#else
+                CALL KppSolve (E,DEL)
+#endif
+                Nsol=Nsol+1
+                DEL2=0.D0
+                DO i=1,N
+                   DEL2=DEL2+(DEL(i)/SCAL(i))**2
+                END DO
+                DEL2=SQRT(DEL2)
+                Theta=DEL2/MAX(1.D0,DEL1)
+                IF (Theta > 1.D0) GOTO 79
+             END IF
+#ifdef FULL_ALGEBRA      
+             CALL DGETRS ('N',N,1,E,N,IP,DYH,N,ISING)
+#else
+             CALL KppSolve (E,DYH)
+#endif             
+             Nsol=Nsol+1
+             DO i=1,N
+                DEL(i)=DYH(i)
+             END DO
+             IF (IOUT == 2.AND.MM >= M-JJ) THEN
+                IPT=IPT+1
+                DO i=1,NRD
+                   FSAFE(IPT,i)=DEL(ICOMP(i))
+                END DO
+             END IF
+          END DO
+       END IF
+       DO i=1,N
+          Table(JJ,I)=YH(i)+DEL(i)
+       END DO
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> POLYNOMIAL EXTRAPOLATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (JJ == 1) RETURN
+       DO L=JJ,2,-1
+          FAC=(DBLE(NJ(JJ))/DBLE(NJ(L-1)))-1.D0
+          DO i=1,N
+             Table(L-1,I)=Table(L,I)+(Table(L,I)-Table(L-1,I))/FAC
+          END DO
+       END DO
+       ERR=0.D0
+       DO i=1,N
+          ERR=ERR+MIN(ABS((Table(1,I)-Table(2,I)))/SCAL(i),1.D15)**2
+       END DO
+       IF (ERR >= 1.D30) GOTO 79
+       ERR=SQRT(ERR/DBLE(N))
+       IF (JJ > 2.AND.ERR >= ERROLD) GOTO 79
+       ERROLD=MAX(4*ERR,1.D0)
+!~~~> COMPUTE OPTIMAL STEP SIZES
+       EXPO=1.D0/JJ
+       FACMIN=FAC1**EXPO
+       FAC=MIN(FAC2/FACMIN,MAX(FACMIN,(ERR/FacSafe1)**EXPO/FacSafe2))
+       FAC=1.D0/FAC
+       HH(JJ)=MIN(H*FAC,HmaxN)
+       W(JJ)=A(JJ)/HH(JJ)
+       RETURN
+   79  ATOV=.TRUE.
+       H=H*0.5D0
+       REJECT=.TRUE.
+       RETURN
+      END SUBROUTINE SEUL
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM( T, V, FCT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, TOLD
+
+    !TOLD = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = TOLD
+    CALL Fun(V, FIX, RCONST, FCT)
+    Nfun=Nfun+1
+
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM ( T, V, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T, TOLD
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), Jcb(NVAR,NVAR)
+    INTEGER :: i,j
+#else
+    KPP_REAL :: Jcb(LU_NONZERO)
+#endif   
+
+    !TOLD = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = TOLD
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         Jcb(i,j) = 0.0D0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       Jcb(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, Jcb) 
+#endif   
+    Njac=Njac+1
+    
+  END SUBROUTINE JAC_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.c	(revision 3477)
@@ -0,0 +1,90 @@
+void INTEGRATE( double DT )
+{
+KPP_REAL P_VAR[NVAR], D_VAR[NVAR], V1[NVAR], V2[NVAR];
+int IsReject;
+KPP_REAL T, Tnext, STEP, STEPold, Told, SUP;
+KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp;
+int i;
+
+  T = TIME;
+  Tnext = TIME + DT;
+  STEP = STEPMIN;
+  Told = T;
+  SUP  = 1e-14;
+  IsReject = 0;
+  ERR = .5;
+  
+/* -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP --- */
+
+  while ( T < Tnext ) {
+   
+    T = Told + STEP;
+    if ( T > Tnext ) {
+      STEP = Tnext - Told;
+      T = Tnext;
+    }
+
+    FSPLIT_VAR ( VAR,  P_VAR, D_VAR );
+
+    for( i = 0; i < NVAR; i++ ) {
+      if ( fabs(D_VAR[i]) > SUP ) {
+        ratio = P_VAR[i] / D_VAR[i];
+        tmp = (KPP_REAL)exp( (double)(-D_VAR[i] * STEP * 0.5) );
+        V1[i] = tmp * tmp * (VAR[i] - ratio) + ratio;
+        V2[i] = tmp * (VAR[i] - ratio) + ratio;
+      } else {
+        tmp = D_VAR[i] * STEP * 0.5;
+        V1[i] = VAR[i] + P_VAR[i] * STEP * ( 1 - tmp *
+               ( 1 - 2.0 / 3.0 * tmp ) );
+        V2[i] = VAR[i] + P_VAR[i] * 0.5 * STEP * ( 1 - 0.5 * tmp *
+               ( 1 - 1.0 / 3.0 * tmp ) );
+      }
+    }
+
+    FSPLIT_VAR( V2,  P_VAR, D_VAR );
+
+    for( i = 0; i < NVAR; i++ ) {
+      if ( fabs(D_VAR[i]) > SUP ) {
+        ratio = P_VAR[i] / D_VAR[i];
+        tmp = (KPP_REAL)exp( (double)(-D_VAR[i] * STEP * 0.5) );
+        V2[i] = tmp * (V2[i] - ratio) + ratio;
+      } else {
+        tmp = D_VAR[i] * STEP * 0.5;
+        V2[i] = V2[i] + P_VAR[i] * 0.5 * STEP * ( 1 - 0.5 * tmp *
+               ( 1 - 1.0 / 3.0 * tmp ) );
+      }
+    }
+/* ==== Extrapolation and error estimation ======== */
+
+    ERRold=ERR;
+    ERR=0.;
+    for( i = 0; i < NVAR; i++ ) {
+      V1[i] = 2.*V2[i] - V1[i];
+      tmp = (V2[i] - V1[i]) / (ATOL[i] + RTOL[i]*V2[i]); 
+      ERR = ERR + tmp*tmp;
+    }
+    ERR = sqrt(ERR/NVAR);
+    STEPold = STEP;
+
+/* ===== choosing the stepsize ==================== */
+
+    factor = 0.9 / pow(ERR,0.35) * pow(ERRold,0.2);
+    facmax = IsReject ? 1.0 : 5.0;
+
+    factor = max( 0.2, min(factor,facmax) );
+    STEP = min( STEPMAX, max(STEPMIN,factor*STEP) );
+
+/*================================================= */
+
+    if ( (ERR > 1) && (STEPold > STEPMIN) ) {
+      T = Told;
+      IsReject = 1;
+    } else {
+      IsReject = 0;
+      Told = T;
+      for( i = 0; i < NVAR; i++ ) 
+        VAR[i] = max( V1[i], 0.0 );
+      TIME = Tnext;
+    }
+  }
+}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE exqssa
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/exqssa.f	(revision 3477)
@@ -0,0 +1,136 @@
+C -- EXTRAPOLATED QSSA WITH STEADY STATE APPROXIMATION --
+C    For extrapolated plain QSSA (to remove the steady state assumption)
+C    modify slow -> 0, fast -> 1e20
+C
+
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR), V1(NVAR), V2(NVAR)
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, STEPold, Told, SUP
+      KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp
+      INTEGER i
+      KPP_REAL slow, fast
+
+      T = TIN
+      Tnext = TOUT
+      STEP = DMAX1(STEPMIN,1.d-10)
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+      ERR = 1.d0
+      ERRold = 1.d0
+      slow = 0.01
+      fast = 10.  
+
+ 10    continue  
+       Tplus = T + STEP
+       if ( Tplus .gt. Tnext ) then
+          STEP = Tnext - T
+          Tplus = Tnext
+       end if
+
+
+        TITI = TIME
+        TIME = T
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V1(i) = VAR(i) + XXX
+             V2(i) = VAR(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V1(i) = P_VAR(i)/D_VAR(i)
+             V2(i) = V1(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V1(i) = tmp * tmp * (VAR(i) - ratio) + ratio
+              V2(i) = tmp * (VAR(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V1(i) = VAR(i) + P_VAR(i) * STEP * ( 1 - tmp *
+     *             ( 1 - 2.0 / 3.0 * tmp ) )
+              V2(i) = VAR(i) + P_VAR(i) * 0.5 * STEP*( 1-0.5*tmp*
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+              end if
+          END IF
+        end do
+
+        TITI = TIME
+        TIME = T + 0.5*STEP
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( V2,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V2(i) = V2(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V2(i) = P_VAR(i)/D_VAR(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V2(i) = tmp * (V2(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V2(i) = V2(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+            end if
+          END IF
+        end do
+
+C ===== Extrapolation and error estimation ========
+
+        ERRold=ERR
+        ERR=0.0D0
+          do i=1,NVAR
+             ERR = ERR + ((V2(i)-V1(i))/(ATOL(i) + RTOL(i)*V2(i)))**2
+          end do       
+        ERR = DSQRT( ERR/NVAR )
+        STEPold=STEP
+
+C ===== choosing the stepsize =====================
+
+        factor = 0.9*ERR**(-0.35)*ERRold**0.2
+        if (IsReject) then
+            facmax=1.
+        else
+            facmax=8.
+        end if 
+        factor = DMAX1( 1.25D-1, DMIN1(factor,facmax) )
+        STEP = DMIN1( STEPMAX, DMAX1(STEPMIN,factor*STEP) )    
+
+C===================================================
+
+        if ( (ERR.gt.1).and.(STEPold.gt.STEPMIN) ) then
+          IsReject = .true.
+        else
+          IsReject = .false.
+          do 140 i=1,NVAR
+             VAR(i)  = DMAX1(2*V2(i)-V1(i), 0.d0)
+ 140      continue 
+          T = Tplus     
+        end if
+      if ( T .lt. Tnext ) go to 10
+
+      TIME = Tnext
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_rodas.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_rodas.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_rodas.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_rodas
+
+#INLINE F_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_rodas.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_rodas.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_rodas.f	(revision 3477)
@@ -0,0 +1,647 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+         
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+      
+      PARAMETER (LWORK=2*NVAR*NVAR+14*NVAR+20,LIWORK=NVAR+20)
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+
+      ITOL=1     ! --- VECTOR TOLERANCES 
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      IDFX=0     ! --- INTERNAL TIME DERIVATIVE
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      IWORK(3) = 1
+
+      CALL ATMRODAS(NVAR,FUNC_CHEM,Autonomous,TIN,VAR,TOUT,
+     &                  STEPMIN,RTOL,ATOL,ITOL,
+     &                  JAC_CHEM,IJAC,MLJAC,MUJAC,FUNC_CHEM,IDFX,
+     &                  FUNC_CHEM,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMRODAS: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMRODAS(N,FCN,IFCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,DFX,IDFX,
+     &                  MAS ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(X,Y).
+C     THIS IS AN EMBEDDED ROSENBROCK METHOD OF ORDER (3)4  
+C     (WITH STEP SIZE CONTROL).
+C     C.F. SECTIONS IV.7  AND VI.3
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND 
+C              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+C --------------------------------------------------------- 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(*),RelTol(*),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL AUTNMS,IMPLCT,JBAND,ARRET,PRED
+      EXTERNAL FCN,JAC,DFX,MAS
+      COMMON /STATISTICS/ NFCN,NACCPT,NREJCT,NSTEP,NJAC,NDEC,NSOL
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS 
+C *** *** *** *** *** *** ***
+      ARRET=.FALSE.
+      METH = 1
+      NMAX=100000
+C -------- PRED   STEP SIZE CONTROL
+      IF(IWORK(3).LE.1)THEN
+         PRED=.TRUE.
+      ELSE
+         PRED=.FALSE.
+      END IF
+      UROUND=1.D-16
+      NM1 = N
+      M1  = N
+      M2  = N
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(2).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(2)
+      END IF
+C -------  FAC1,FAC2     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(3).EQ.0.D0)THEN
+         FAC1=5.D0
+      ELSE
+         FAC1=1.D0/WORK(3)
+      END IF
+      IF(WORK(4).EQ.0.D0)THEN
+         FAC2=1.D0/6.0D0
+      ELSE
+         FAC2=1.D0/WORK(4)
+      END IF
+      IF (FAC1.LT.1.0D0.OR.FAC2.GT.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT WORK(3,4)=',WORK(3),WORK(4)
+            ARRET=.TRUE.
+         END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      SAFE=0.9D0
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO I=1,N
+             IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+                WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+                ARRET=.TRUE.
+             END IF
+          END DO
+      END IF
+      
+      IF (ARRET) STOP
+      NM1 = N
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- AUTONOMOUS, IMPLICIT, BANDED OR NOT ?
+      AUTNMS=IFCN.EQ.0
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.LT.NM1
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN AND MATRIX E
+         MLJAC=NM1
+         MUJAC=NM1
+         LDJAC=NM1
+         LDE=NM1
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+         print *, 'Implicit 1'
+      ELSE
+         LDMAS=0
+         IJOB=1
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYNEW=21
+      IEDY1=IEYNEW+N
+      IEDY=IEDY1+N
+      IEAK1=IEDY+N
+      IEAK2=IEAK1+N
+      IEAK3=IEAK2+N
+      IEAK4=IEAK3+N
+      IEAK5=IEAK4+N
+      IEAK6=IEAK5+N
+      IEFX =IEAK6+N
+      IECON=IEFX+N
+      IEJAC=IECON+4*N
+      IEMAS=IEJAC+N*LDJAC
+      IEE  =IEMAS+NM1*LDMAS
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+NM1*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=21
+      ISTORE=IEIP+NM1-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL ROSCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,JAC,IJAC,
+     &   MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,IOUT,IDID,NMAX,
+     &   UROUND,METH,IJOB,FAC1,FAC2,SAFE,AUTNMS,IMPLCT,JBAND,PRED,LDJAC,
+     &   LDE,LDMAS2,WORK(IEYNEW),WORK(IEDY1),WORK(IEDY),WORK(IEAK1),
+     &   WORK(IEAK2),WORK(IEAK3),WORK(IEAK4),WORK(IEAK5),WORK(IEAK6),
+     &   WORK(IEFX),WORK(IEJAC),WORK(IEE),WORK(IEMAS),IWORK(IEIP),
+     &   WORK(IECON),
+     &   M1,M2,NM1,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL)
+      IWORK(14)=NFCN
+      IWORK(15)=NJAC
+      IWORK(16)=NSTEP
+      IWORK(17)=NACCPT
+      IWORK(18)=NREJCT
+      IWORK(19)=NDEC
+      IWORK(20)=NSOL
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE ROSCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,
+     &  ITOL,JAC,IJAC,
+     &  MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,IOUT,IDID,NMAX,
+     &  UROUND,METH,IJOB,FAC1,FAC2,SAFE,AUTNMS,IMPLCT,BANDED,
+     &  PRED,LDJAC,
+     &  LDE,LDMAS,YNEW,DY1,DY,AK1,AK2,AK3,AK4,AK5,AK6,
+     &  FX,FJAC,E,FMAS,IP,CONT,
+     &  M1,M2,NM1,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR RODAS
+C     PARAMETERS SAME AS IN RODAS WITH WORKSPACE ADDED 
+C ---------------------------------------------------------- 
+C         DECLARATIONS 
+C ---------------------------------------------------------- 
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      DIMENSION Y(N),YNEW(N),DY1(N),DY(N),AK1(N),
+     *  AK2(N),AK3(N),AK4(N),AK5(N),AK6(N),FX(N),
+     *  FJAC(LU_NONZERO),E(LDE,NM1),FMAS(LDMAS,NM1),
+     *  AbsTol(*),RelTol(*)
+      DIMENSION CONT(4*N)
+      INTEGER IP(NM1)
+      LOGICAL REJECT,AUTNMS,IMPLCT,BANDED
+      LOGICAL ONE,LAST,PRED,SINGULAR
+      EXTERNAL FCN, MAS, JAC, DFX
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      COMMON /CONROS/XOLD,HOUT,NN
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** *** 
+      NN=N 
+      NN2=2*N
+      NN3=3*N
+      LRC=4*N
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF (IMPLCT) CALL MAS (NM1,FMAS,LDMAS)
+C ------ SET THE PARAMETERS OF THE METHOD -----
+      CALL ROCOE(METH,A21,A31,A32,A41,A42,A43,A51,A52,A53,A54,
+     &    C21,C31,C32,C41,C42,C43,C51,C52,C53,C54,C61,
+     &    C62,C63,C64,C65,GAMMA,C2,C3,C4,D1,D2,D3,D4,
+     &    D21,D22,D23,D24,D25,D31,D32,D33,D34,D35)
+C --- INITIAL PREPARATIONS
+      IF (M1.GT.0) IJOB=IJOB+10
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAXN=DMIN1(DABS(HMAX),DABS(XEND-X))
+      IF (DABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=DMIN1(DABS(H),HMAXN) 
+      H=SIGN(H,POSNEG) 
+      HACC = H
+      ERRACC = 1.0d0
+      REJECT=.FALSE.
+      LAST=.FALSE.
+      NSING=0
+      IRTRN=1
+      IF (AUTNMS) THEN
+         HD1=0.0D0
+         HD2=0.0D0
+         HD3=0.0D0
+         HD4=0.0D0
+      END IF
+C -------- PREPARE BAND-WIDTHS --------
+      MBDIAG=MUMAS+1
+
+C --- BASIC INTEGRATION STEP 
+      LAST = .FALSE.
+      DO WHILE (.NOT.LAST) 
+      IF (.NOT. REJECT) THEN
+      IF (NSTEP.GT.NMAX) CALL FAIL_EXIT(3,X,IDID,H,NMAX) 
+      IF ( 0.1D0*DABS(H) .LE. DABS(X)*UROUND )
+     *       CALL FAIL_EXIT(2,X,IDID,H,NMAX)
+      HOPT=H
+      IF ((X+H*1.0001D0-XEND)*POSNEG.GE.0.D0) THEN
+         H=XEND-X
+         LAST=.TRUE.
+      END IF
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      CALL FCN(N,X,Y,DY1)
+      CALL JAC(N,X,Y,FJAC,LDJAC)
+      NFCN=NFCN+1
+      NJAC=NJAC+1
+
+      IF (.NOT.AUTNMS) THEN
+C --- COMPUTE NUMERICALLY THE DERIVATIVE WITH RESPECT TO X
+            DELT=DSQRT(UROUND*DMAX1(1.D-5,DABS(X)))
+            XDELT=X+DELT
+            CALL FCN(N,XDELT,Y,AK1)
+            DO J=1,N
+               FX(J)=(AK1(J)-DY1(J))/DELT
+            END DO
+      END IF
+      END IF
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE STAGES
+C *** *** *** *** *** *** ***
+      SINGULAR = .TRUE.
+      DO WHILE (SINGULAR)
+        FAC=1.D0/(H*GAMMA)
+        CALL DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC,E,LDE,IP,IER,IJOB,IMPLCT,IP)
+        SINGULAR = IER.NE.0
+        IF (SINGULAR) THEN
+          NSING=NSING+1
+          IF (NSING.GE.5) CALL FAIL_EXIT(1,X,IDID,H,NMAX)
+          H=H*0.5D0
+          REJECT=.TRUE.
+          LAST=.FALSE.
+          ONE = .FALSE.
+        END IF 
+      END DO
+
+      NDEC=NDEC+1
+C --- PREPARE FOR THE COMPUTATION OF THE 6 STAGES
+      HC21=C21/H
+      HC31=C31/H
+      HC32=C32/H
+      HC41=C41/H
+      HC42=C42/H
+      HC43=C43/H
+      HC51=C51/H
+      HC52=C52/H
+      HC53=C53/H
+      HC54=C54/H
+      HC61=C61/H
+      HC62=C62/H
+      HC63=C63/H
+      HC64=C64/H
+      HC65=C65/H
+      IF (.NOT.AUTNMS) THEN
+         HD1=H*D1
+         HD2=H*D2
+         HD3=H*D3
+         HD4=H*D4
+      END IF
+C --- THE STAGES
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY1,AK1,FX,YNEW,HD1,IJOB,.FALSE.)
+      DO  I=1,N
+         YNEW(I)=Y(I)+A21*AK1(I)
+      END DO
+      CALL FCN(N,X+C2*H,YNEW,DY)
+      DO I=1,N
+         YNEW(I)=HC21*AK1(I)
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK2,FX,YNEW,HD2,IJOB,.TRUE.)
+      DO I=1,N
+         YNEW(I)=Y(I)+A31*AK1(I)+A32*AK2(I) 
+      END DO
+      CALL FCN(N,X+C3*H,YNEW,DY)
+      DO I=1,N
+         YNEW(I)=HC31*AK1(I)+HC32*AK2(I)
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK3,FX,YNEW,HD3,IJOB,.TRUE.)
+      DO I=1,N
+         YNEW(I)=Y(I)+A41*AK1(I)+A42*AK2(I)+A43*AK3(I)
+      END DO
+      CALL FCN(N,X+C4*H,YNEW,DY)
+      DO I=1,N
+         YNEW(I)=HC41*AK1(I)+HC42*AK2(I)+HC43*AK3(I) 
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK4,FX,YNEW,HD4,IJOB,.TRUE.)
+      DO I=1,N
+         YNEW(I)=Y(I)+A51*AK1(I)+A52*AK2(I)+A53*AK3(I)+A54*AK4(I)
+      END DO
+      CALL FCN(N,X+H,YNEW,DY)
+      DO I=1,N
+         AK6(I)=HC52*AK2(I)+HC54*AK4(I)+HC51*AK1(I)+HC53*AK3(I) 
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK5,FX,AK6,0.D0,IJOB,.TRUE.)
+C ------------ EMBEDDED SOLUTION ---------------
+      DO I=1,N
+         YNEW(I)=YNEW(I)+AK5(I)  
+      END DO
+      CALL FCN(N,X+H,YNEW,DY)
+      DO I=1,N
+         AK5(I)=HC61*AK1(I)+HC62*AK2(I)+HC65*AK5(I)
+     &              +HC64*AK4(I)+HC63*AK3(I) 
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK6,FX,AK5,0.D0,IJOB,.TRUE.)
+C ------------ NEW SOLUTION ---------------
+      DO  I=1,N
+         YNEW(I)=YNEW(I)+AK6(I)  
+      END DO
+      NSOL=NSOL+6
+      NFCN=NFCN+5 
+
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION  
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+C ------------ COMPUTE ERROR ESTIMATION ----------------
+      ERR=0.0D0
+      DO I=1,N
+         IF (ITOL.EQ.0) THEN
+            SK=AbsTol(1)+RelTol(1)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+         ELSE
+            SK=AbsTol(I)+RelTol(I)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+         END IF
+         ERR=ERR+(AK6(I)/SK)**2
+c2           ERR = DMAX1(ERR, AK6(I)/SK)
+      END DO
+      ERR=DSQRT(ERR/N)
+      
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .2<=HNEW/H<=6.
+      FAC=DMAX1(FAC2,DMIN1(FAC1,(ERR)**0.25D0/SAFE))
+      HNEW=DMAX1(H/FAC, STEPMIN)  
+
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+
+      IF ( (ERR.LE.1.D0).or.(H.LE.STEPMIN) ) THEN
+C --- STEP IS ACCEPTED  
+         NACCPT=NACCPT+1
+         IF (PRED) THEN
+C       --- PREDICTIVE CONTROLLER OF GUSTAFSSON
+            IF (NACCPT.GT.1) THEN
+               FACGUS=(HACC/H)*(ERR**2/ERRACC)**0.25D0/SAFE
+               FACGUS=DMAX1(FAC2,DMIN1(FAC1,FACGUS))
+               FAC=DMAX1(FAC,FACGUS)
+               HNEW=DMAX1(H/FAC, STEPMIN)
+            END IF
+            HACC=H
+            ERRACC=DMAX1(1.0D-2,ERR)
+         END IF
+         DO I=1,N 
+            Y(I)=YNEW(I)
+         END DO
+         XOLD=X 
+         X=X+H
+         IF (DABS(HNEW).GT.HMAXN) HNEW=POSNEG*HMAXN
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H)) 
+         REJECT=.FALSE.
+         H=HNEW
+      ELSE
+C --- STEP IS REJECTED  
+         REJECT=.TRUE.
+         LAST=.FALSE.
+         H=HNEW
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+      END IF
+      END DO
+      RETURN
+      END 
+C
+      SUBROUTINE FAIL_EXIT(NERR,X,IDID,H,NMAX)
+      INTEGER NERR, NMAX
+      KPP_REAL X, H
+      GO TO (1,2,3,4) NERR
+ 1    CONTINUE
+      WRITE(6,979)X   
+      WRITE(6,*) ' MATRIX IS REPEATEDLY SINGULAR, IER=',IER
+      IDID=-4
+      STOP
+ 2    CONTINUE
+      WRITE(6,979)X   
+      WRITE(6,*) ' STEP SIZE TOO SMALL, H=',H
+      IDID=-3
+      STOP
+ 3    CONTINUE
+      WRITE(6,979)X   
+      WRITE(6,*) ' MORE THAN NMAX =',NMAX,'STEPS ARE NEEDED' 
+      IDID=-2
+      STOP
+C --- EXIT CAUSED BY solout
+ 4    CONTINUE
+      WRITE(6,979)X
+ 979  FORMAT(' EXIT OF RODAS AT X=',E18.4) 
+      IDID=2
+      RETURN
+      END
+      
+      SUBROUTINE ROCOE(METH,A21,A31,A32,A41,A42,A43,A51,A52,A53,A54,
+     &  C21,C31,C32,C41,C42,C43,C51,C52,C53,C54,C61,
+     &  C62,C63,C64,C65,GAMMA,C2,C3,C4,D1,D2,D3,D4,
+     &  D21,D22,D23,D24,D25,D31,D32,D33,D34,D35)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+
+      if (METH.ne.1) print *, 'WRONG CHOICE OF METHOD'
+        C2=0.386D0
+        C3=0.21D0 
+        C4=0.63D0
+        BET2P=0.0317D0
+        BET3P=0.0635D0
+        BET4P=0.3438D0 
+       D1= 0.2500000000000000D+00
+       D2=-0.1043000000000000D+00
+       D3= 0.1035000000000000D+00
+       D4=-0.3620000000000023D-01
+       A21= 0.1544000000000000D+01
+       A31= 0.9466785280815826D+00
+       A32= 0.2557011698983284D+00
+       A41= 0.3314825187068521D+01
+       A42= 0.2896124015972201D+01
+       A43= 0.9986419139977817D+00
+       A51= 0.1221224509226641D+01
+       A52= 0.6019134481288629D+01
+       A53= 0.1253708332932087D+02
+       A54=-0.6878860361058950D+00
+       C21=-0.5668800000000000D+01
+       C31=-0.2430093356833875D+01
+       C32=-0.2063599157091915D+00
+       C41=-0.1073529058151375D+00
+       C42=-0.9594562251023355D+01
+       C43=-0.2047028614809616D+02
+       C51= 0.7496443313967647D+01
+       C52=-0.1024680431464352D+02
+       C53=-0.3399990352819905D+02
+       C54= 0.1170890893206160D+02
+       C61= 0.8083246795921522D+01
+       C62=-0.7981132988064893D+01
+       C63=-0.3152159432874371D+02
+       C64= 0.1631930543123136D+02
+       C65=-0.6058818238834054D+01
+       GAMMA= 0.2500000000000000D+00  
+
+       D21= 0.1012623508344586D+02
+       D22=-0.7487995877610167D+01
+       D23=-0.3480091861555747D+02
+       D24=-0.7992771707568823D+01
+       D25= 0.1025137723295662D+01
+       D31=-0.6762803392801253D+00
+       D32= 0.6087714651680015D+01
+       D33= 0.1643084320892478D+02
+       D34= 0.2476722511418386D+02
+       D35=-0.6594389125716872D+01
+      RETURN
+      END
+C
+
+C ******************************************
+C     VERSION OF SEPTEMBER 18, 1995      
+C ******************************************
+C
+      SUBROUTINE DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC1,E1,LDE1,IP1,IER,IJOB,CALHES,IPHES)
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      DIMENSION FJAC(LU_NONZERO),FMAS(LDMAS,NM1),E1(LU_NONZERO),
+     &          IP1(NM1),IPHES(N)
+      LOGICAL CALHES
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+
+
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO J=1,LU_NONZERO
+         E1(J) = -FJAC(J)
+      END DO
+      DO J=1,N
+         E1(LU_DIAG(J)) = E1(LU_DIAG(J)) + FAC1
+      END DO
+      CALL KppDecomp (E1,IER)
+      RETURN
+      END
+C
+C     END OF SUBROUTINE DECOMR
+C
+C ***********************************************************
+C
+C
+C
+C
+      SUBROUTINE SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E,LDE,IP,DY,AK,FX,YNEW,HD,IJOB,STAGE1)
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      DIMENSION FJAC(LU_NONZERO),FMAS(LDMAS,NM1),E(LU_NONZERO),
+     &          IP(NM1),DY(N),AK(N),FX(N),YNEW(N)
+      LOGICAL STAGE1
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      IF (HD.EQ.0.D0) THEN
+         DO  I=1,N
+           AK(I)=DY(I)
+         END DO
+      ELSE
+         DO I=1,N
+            AK(I)=DY(I)+HD*FX(I)
+         END DO
+      END IF
+
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+      CALL KppSolve (E,AK)
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVROD
+C
+C
+C ***********************************************************
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_ros4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_ros4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_ros4.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_ros4
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_ros4.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_ros4.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/kpp_ros4.f	(revision 3477)
@@ -0,0 +1,1052 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      PARAMETER (LWORK=2*NVAR*NVAR+14*NVAR+20,LIWORK=NVAR+20)
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      EXTERNAL FUNC_CHEM,JAC_CHEM,SOLOUT
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      IDFX=0     ! --- INTERNAL TIME DERIVATIVE
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+      IWORK(2) = 6
+
+      CALL KPP_ROS4(NVAR,FUNC_CHEM,Autonomous,TIN,VAR,TOUT,
+     &                  STEPMIN,RTOL,ATOL,ITOL,
+     &                  JAC_CHEM,IJAC,MLJAC,MUJAC,FUNC_CHEM,IDFX,
+     &                  FUNC_CHEM,IMAS,MLJAC,MUJAC,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'KPP_ROS4: Unsucessful step at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE KPP_ROS4(N,FCN,IFCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,DFX,IDFX,
+     &                  MAS ,IMAS,MLMAS,MUMAS,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(X,Y).
+C     THIS IS AN EMBEDDED ROSENBROCK METHOD OF ORDER (3)4  
+C     (WITH STEP SIZE CONTROL).
+C     C.F. SECTION IV.7
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND 
+C              E-MAIL:  HAIRER@CGEUGE51.BITNET,  WANNER@CGEUGE51.BITNET
+C     
+C     THIS CODE IS PART OF THE BOOK:
+C         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+C         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+C         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+C         SPRINGER-VERLAG (1990)               
+C      
+C     VERSION OF NOVEMBER 17, 1992
+C
+C     INPUT PARAMETERS  
+C     ----------------  
+C     N           DIMENSION OF THE SYSTEM 
+C
+C     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+C                 VALUE OF F(X,Y):
+C                    SUBROUTINE FCN(N,X,Y,F)
+C                    KPP_REAL X,Y(N),F(N)
+C                    F(1)=...   ETC.
+C
+C     IFCN        GIVES INFORMATION ON FCN:
+C                    IFCN=0: F(X,Y) INDEPENDENT OF X (AUTONOMOUS)
+C                    IFCN=1: F(X,Y) MAY DEPEND ON X (NON-AUTONOMOUS)
+C
+C     X           INITIAL X-VALUE
+C
+C     Y(N)        INITIAL VALUES FOR Y
+C
+C     XEND        FINAL X-VALUE (XEND-X MAY BE POSITIVE OR NEGATIVE)
+C
+C     H           INITIAL STEP SIZE GUESS;
+C                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT, 
+C                 H=1.D0/(NORM OF F'), USUALLY 1.D-2 OR 1.D-3, IS GOOD.
+C                 THIS CHOICE IS NOT VERY IMPORTANT, THE CODE QUICKLY
+C                 ADAPTS ITS STEP SIZE. STUDY THE CHOSEN VALUES FOR A FEW
+C                 STEPS IN SUBROUTINE "SOLOUT", WHEN YOU ARE NOT SURE.
+C                 (IF H=0.D0, THE CODE PUTS H=1.D-6).
+C
+C     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+C                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+C
+C     ITOL        SWITCH FOR RelTol AND AbsTol:
+C                   ITOL=0: BOTH RelTol AND AbsTol ARE SCALARS.
+C                     THE CODE KEEPS, ROUGHLY, THE LOCAL ERROR OF
+C                     Y(I) BELOW RelTol*ABS(Y(I))+AbsTol
+C                   ITOL=1: BOTH RelTol AND AbsTol ARE VECTORS.
+C                     THE CODE KEEPS THE LOCAL ERROR OF Y(I) BELOW
+C                     RelTol(I)*ABS(Y(I))+AbsTol(I).
+C
+C     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO Y
+C                 (THIS ROUTINE IS ONLY CALLED IF IJAC=1; SUPPLY
+C                 A DUMMY SUBROUTINE IN THE CASE IJAC=0).
+C                 FOR IJAC=1, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE JAC(N,X,Y,DFY,LDFY)
+C                    KPP_REAL X,Y(N),DFY(LDFY,N)
+C                    DFY(1,1)= ...
+C                 LDFY, THE COLOMN-LENGTH OF THE ARRAY, IS
+C                 FURNISHED BY THE CALLING PROGRAM.
+C                 IF (MLJAC.EQ.N) THE JACOBIAN IS SUPPOSED TO
+C                    BE FULL AND THE PARTIAL DERIVATIVES ARE
+C                    STORED IN DFY AS
+C                       DFY(I,J) = PARTIAL F(I) / PARTIAL Y(J)
+C                 ELSE, THE JACOBIAN IS TAKEN AS BANDED AND
+C                    THE PARTIAL DERIVATIVES ARE STORED
+C                    DIAGONAL-WISE AS
+C                       DFY(I-J+MUJAC+1,J) = PARTIAL F(I) / PARTIAL Y(J).
+C
+C     IJAC        SWITCH FOR THE COMPUTATION OF THE JACOBIAN:
+C                    IJAC=0: JACOBIAN IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "JAC" IS NEVER CALLED.
+C                    IJAC=1: JACOBIAN IS SUPPLIED BY SUBROUTINE JAC.
+C
+C     MLJAC       SWITCH FOR THE BANDED STRUCTURE OF THE JACOBIAN:
+C                    MLJAC=N: JACOBIAN IS A FULL MATRIX. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLJAC<N: MLJAC IS THE LOWER BANDWITH OF JACOBIAN 
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C
+C     MUJAC       UPPER BANDWITH OF JACOBIAN  MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLJAC=N.
+C
+C     DFX         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO X
+C                 (THIS ROUTINE IS ONLY CALLED IF IDFX=1 AND IFCN=1;
+C                 SUPPLY A DUMMY SUBROUTINE IN THE CASE IDFX=0 OR IFCN=0).
+C                 OTHERWISE, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE DFX(N,X,Y,FX)
+C                    KPP_REAL X,Y(N),FX(N)
+C                    FX(1)= ...
+C                
+C     IDFX        SWITCH FOR THE COMPUTATION OF THE DF/DX:
+C                    IDFX=0: DF/DX IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "DFX" IS NEVER CALLED.
+C                    IDFX=1: DF/DX IS SUPPLIED BY SUBROUTINE DFX.
+C
+C     ----   MAS,IMAS,MLMAS, AND MUMAS HAVE ANALOG MEANINGS      -----
+C     ----   FOR THE "MASS MATRIX" (THE MATRIX "M" OF SECTION IV.8): -
+C
+C     MAS         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE MASS-
+C                 MATRIX M.
+C                 IF IMAS=0, THIS MATRIX IS ASSUMED TO BE THE IDENTITY
+C                 MATRIX AND NEEDS NOT TO BE DEFINED;
+C                 SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C                 IF IMAS=1, THE SUBROUTINE MAS IS OF THE FORM
+C                    SUBROUTINE MAS(N,AM,LMAS)
+C                    KPP_REAL AM(LMAS,N)
+C                    AM(1,1)= ....
+C                    IF (MLMAS.EQ.N) THE MASS-MATRIX IS STORED
+C                    AS FULL MATRIX LIKE
+C                         AM(I,J) = M(I,J)
+C                    ELSE, THE MATRIX IS TAKEN AS BANDED AND STORED
+C                    DIAGONAL-WISE AS
+C                         AM(I-J+MUMAS+1,J) = M(I,J).
+C
+C     IMAS       GIVES INFORMATION ON THE MASS-MATRIX:
+C                    IMAS=0: M IS SUPPOSED TO BE THE IDENTITY
+C                       MATRIX, MAS IS NEVER CALLED.
+C                    IMAS=1: MASS-MATRIX  IS SUPPLIED.
+C
+C     MLMAS       SWITCH FOR THE BANDED STRUCTURE OF THE MASS-MATRIX:
+C                    MLMAS=N: THE FULL MATRIX CASE. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLMAS<N: MLMAS IS THE LOWER BANDWITH OF THE
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C                 MLMAS IS SUPPOSED TO BE .LE. MLJAC.
+C
+C     MUMAS       UPPER BANDWITH OF MASS-MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLMAS=N.
+C                 MUMAS IS SUPPOSED TO BE .LE. MUJAC.
+C
+C     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+C                 NUMERICAL SOLUTION DURING INTEGRATION. 
+C                 IF IOUT=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+C                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0. 
+C                 IT MUST HAVE THE FORM
+C                    SUBROUTINE SOLOUT (NR,XOLD,X,Y,N,IRTRN)
+C                    KPP_REAL X,Y(N)
+C                    ....  
+C                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+C                    GRID-POINT "X" (THEREBY THE INITIAL VALUE IS
+C                    THE FIRST GRID-POINT).
+C                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+C                    IS SET <0, ROS4 RETURNS TO THE CALLING PROGRAM.
+C           
+C     IOUT        GIVES INFORMATION ON THE SUBROUTINE SOLOUT:
+C                    IOUT=0: SUBROUTINE IS NEVER CALLED
+C                    IOUT=1: SUBROUTINE IS USED FOR OUTPUT
+C
+C     WORK        ARRAY OF WORKING SPACE OF LENGTH "LWORK".
+C                 SERVES AS WORKING SPACE FOR ALL VECTORS AND MATRICES.
+C                 "LWORK" MUST BE AT LEAST
+C                             N*(LJAC+LMAS+LE1+8)+5
+C                 WHERE
+C                    LJAC=N              IF MLJAC=N (FULL JACOBIAN)
+C                    LJAC=MLJAC+MUJAC+1  IF MLJAC<N (BANDED JAC.)
+C                 AND                  
+C                    LMAS=0              IF IMAS=0
+C                    LMAS=N              IF IMAS=1 AND MLMAS=N (FULL)
+C                    LMAS=MLMAS+MUMAS+1  IF MLMAS<N (BANDED MASS-M.)
+C                 AND
+C                    LE1=N               IF MLJAC=N (FULL JACOBIAN)
+C                    LE1=2*MLJAC+MUJAC+1 IF MLJAC<N (BANDED JAC.). 
+c
+C                 IN THE USUAL CASE WHERE THE JACOBIAN IS FULL AND THE
+C                 MASS-MATRIX IS THE INDENTITY (IMAS=0), THE MINIMUM
+C                 STORAGE REQUIREMENT IS 
+C                             LWORK = 2*N*N+8*N+5.
+C
+C     LWORK       DECLARED LENGHT OF ARRAY "WORK".
+C
+C     IWORK       INTEGER WORKING SPACE OF LENGTH "LIWORK".
+C                 "LIWORK" MUST BE AT LEAST N+2.
+C
+C     LIWORK      DECLARED LENGHT OF ARRAY "IWORK".
+C
+C ----------------------------------------------------------------------
+C 
+C     SOPHISTICATED SETTING OF PARAMETERS
+C     -----------------------------------
+C              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT WORK 
+C              WELL. THEY MAY BE DEFINED BY SETTING WORK(1),..,WORK(5)
+C              AS WELL AS IWORK(1),IWORK(2) DIFFERENT FROM ZERO.
+C              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+C
+C    IWORK(1)  THIS IS THE MAXIMAL NUMBER OF ALLOWED STEPS.
+C              THE DEFAULT VALUE (FOR IWORK(1)=0) IS 100000.
+C
+C    IWORK(2)  SWITCH FOR THE CHOICE OF THE COEFFICIENTS
+C              IF IWORK(2).EQ.1  METHOD OF SHAMPINE
+C              IF IWORK(2).EQ.2  METHOD GRK4T OF KAPS-RENTROP
+C              IF IWORK(2).EQ.3  METHOD GRK4A OF KAPS-RENTROP
+C              IF IWORK(2).EQ.4  METHOD OF VAN VELDHUIZEN (GAMMA=1/2)
+C              IF IWORK(2).EQ.5  METHOD OF VAN VELDHUIZEN ("D-STABLE")
+C              IF IWORK(2).EQ.6  AN L-STABLE METHOD
+C              THE DEFAULT VALUE (FOR IWORK(2)=0) IS IWORK(2)=2.
+C
+C    WORK(1)   UROUND, THE ROUNDING UNIT, DEFAULT 1.D-16.
+C
+C    WORK(2)   MAXIMAL STEP SIZE, DEFAULT XEND-X.
+C
+C    WORK(3), WORK(4)   PARAMETERS FOR STEP SIZE SELECTION
+C              THE NEW STEP SIZE IS CHOSEN SUBJECT TO THE RESTRICTION
+C                 WORK(3) <= HNEW/HOLD <= WORK(4)
+C              DEFAULT VALUES: WORK(3)=0.2D0, WORK(4)=6.D0
+C
+C    WORK(5)   AVOID THE HUMP: AFTER TWO CONSECUTIVE STEP REJECTIONS
+C              THE STEP SIZE IS MULTIPLIED BY WORK(5)
+C              DEFAULT VALUES: WORK(5)=0.1D0
+C
+C-----------------------------------------------------------------------
+C
+C     OUTPUT PARAMETERS 
+C     ----------------- 
+C     X           X-VALUE WHERE THE SOLUTION IS COMPUTED
+C                 (AFTER SUCCESSFUL RETURN X=XEND)
+C
+C     Y(N)        SOLUTION AT X
+C  
+C     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+C
+C     IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+C                   IDID=1  COMPUTATION SUCCESSFUL,
+C                   IDID=-1 COMPUTATION UNSUCCESSFUL.
+C
+C --------------------------------------------------------- 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(1),RelTol(1),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL AUTNMS,IMPLCT,JBAND,ARRET
+      EXTERNAL FCN,JAC,DFX,MAS,SOLOUT
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+C -----------------------------------------------------
+C --- COMMON STAT CAN BE USED FOR STATISTICS
+C ---    NFCN      NUMBER OF FUNC_CHEMCTION EVALUATIONS (THOSE FOR NUMERICAL
+C                  EVALUATION OF THE JACOBIAN ARE NOT COUNTED)  
+C ---    NJAC      NUMBER OF JACOBIAN EVALUATIONS (EITHER ANALYTICALLY
+C                  OR NUMERICALLY)
+C ---    NSTEP     NUMBER OF COMPUTED STEPS
+C ---    NACCPT    NUMBER OF ACCEPTED STEPS
+C ---    NREJCT    NUMBER OF REJECTED STEPS (AFTER AT LEAST ONE STEP
+C                  HAS BEEN ACCEPTED)
+C ---    NDEC      NUMBER OF LU-DECOMPOSITIONS (N-DIMENSIONAL MATRIX)
+C ---    NSOL      NUMBER OF FORWARD-BACKWARD SUBSTITUTIONS
+C -----------------------------------------------------
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS 
+C *** *** *** *** *** *** ***
+      NFCN=0
+      NJAC=0
+      NSTEP=0
+      NACCPT=0
+      NREJCT=0
+      NDEC=0
+      NSOL=0
+      ARRET=.FALSE.
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(1).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(1)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(1)=',IWORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- METH   COEFFICIENTS OF THE METHOD
+      IF(IWORK(2).EQ.0)THEN
+         METH=2
+      ELSE
+         METH=IWORK(2)
+         IF(METH.LE.0.OR.METH.GE.7)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0  
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.1.D-14.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 16 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(2).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(2)
+      END IF
+C -------  FAC1,FAC2     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(3).EQ.0.D0)THEN
+         FAC1=5.D0
+      ELSE
+         FAC1=1.D0/WORK(3)
+      END IF
+      IF(WORK(4).EQ.0.D0)THEN
+         FAC2=1.D0/6.0D0
+      ELSE
+         FAC2=1.D0/WORK(4)
+      END IF
+C -------  FACREJ    FOR THE HUMP
+      IF(WORK(5).EQ.0.D0)THEN
+         FACREJ=0.1D0
+      ELSE
+         FACREJ=WORK(5)
+      END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO 15 I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+  15      CONTINUE
+      END IF
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- AUTONOMOUS, IMPLICIT, BANDED OR NOT ?
+      AUTNMS=IFCN.EQ.0
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.NE.N
+      ARRET=.FALSE.
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN 
+      IF(JBAND)THEN
+         LDJAC=MLJAC+MUJAC+1
+      ELSE
+         LDJAC=N
+      END IF
+C -- MATRIX E FOR LINEAR ALGEBRA
+      IF(JBAND)THEN
+         LDE=2*MLJAC+MUJAC+1
+      ELSE
+         LDE=N
+      END IF
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          IF (MLMAS.NE.N) THEN
+              LDMAS=MLMAS+MUMAS+1
+          ELSE
+              LDMAS=N
+          END IF
+C ------ BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF "JAC"
+          IF (MLMAS.GT.MLJAC.OR.MUMAS.GT.MUJAC) THEN
+              WRITE (6,*) 'BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF
+     & "JAC"'
+            ARRET=.TRUE.
+          END IF
+      ELSE
+          LDMAS=0
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYNEW=6
+      IEDY1=IEYNEW+N
+      IEDY=IEDY1+N
+      IEAK1=IEDY+N
+      IEAK2=IEAK1+N
+      IEAK3=IEAK2+N
+      IEAK4=IEAK3+N
+      IEFX =IEAK4+N
+      IEJAC=IEFX +N
+      IEMAS=IEJAC+N*LDJAC
+      IEE  =IEMAS+N*LDMAS
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+N*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=3
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEIP+N-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL RO4COR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,JAC,IJAC,
+     &   MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &   NMAX,UROUND,METH,FAC1,FAC2,FACREJ,AUTNMS,IMPLCT,JBAND,
+     &   LDJAC,LDE,LDMAS2,WORK(IEYNEW),WORK(IEDY1),WORK(IEDY),
+     &   WORK(IEAK1),WORK(IEAK2),WORK(IEAK3),WORK(IEAK4),
+     &   WORK(IEFX),WORK(IEJAC),WORK(IEE),WORK(IEMAS),IWORK(IEIP))
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE RO4COR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,JAC,
+     &  IJAC,MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &  NMAX,UROUND,METH,FAC1,FAC2,FACREJ,AUTNMS,IMPLCT,BANDED,
+     &  LFJAC,LE,LDMAS,YNEW,DY1,DY,AK1,AK2,AK3,AK4,FX,FJAC,E,FMAS,IP)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR ROS4
+C     PARAMETERS SAME AS IN ROS4 WITH WORKSPACE ADDED 
+C ---------------------------------------------------------- 
+C         DECLARATIONS 
+C ---------------------------------------------------------- 
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      KPP_REAL Y(N),YNEW(N),DY1(N),DY(N),AK1(N),
+     *  AK2(N),AK3(N),AK4(N),FX(N),
+     *  FJAC(LU_NONZERO),E(LU_NONZERO),
+     *  FMAS(LDMAS,N),AbsTol(1),RelTol(1)
+      INTEGER IP(N)
+      LOGICAL REJECT,RJECT2,AUTNMS,IMPLCT,BANDED
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      EXTERNAL FCN,JAC,MAS,SOLOUT,DFX
+
+
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF (IMPLCT) CALL MAS(N,FMAS,LDMAS)
+C ---- PREPARE BANDWIDTHS -----
+      IF (BANDED) THEN
+          MLE=MLJAC
+          MUE=MUJAC
+          MBJAC=MLJAC+MUJAC+1
+          MBB=MLMAS+MUMAS+1
+          MDIAG=MLE+MUE+1
+          MBDIAG=MUMAS+1
+          MDIFF=MLE+MUE-MUMAS
+      END IF
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+      IF (METH.EQ.1) CALL SHAMP (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.2) CALL GRK4T (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.3) CALL GRK4A (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.4) CALL VELDS (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.5) CALL VELDD (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.6) CALL LSTAB (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- INITIAL PREPARATIONS
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAXN=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAXN) 
+      H=SIGN(H,POSNEG) 
+      REJECT=.FALSE.
+      NSING=0
+      IRTRN=1 
+      XXOLD=X
+      IF (IRTRN.LT.0) GOTO 79
+C --- BASIC INTEGRATION STEP  
+   1  IF (NSTEP.GT.NMAX.OR.X+.1D0*H.EQ.X.OR.ABS(H).LE.UROUND) GOTO 79
+      IF ((X-XEND)*POSNEG+UROUND.GT.0.D0) THEN
+          H=HOPT
+          IDID=1
+          RETURN
+      END IF
+      HOPT=H
+      IF ((X+H-XEND)*POSNEG.GT.0.D0) H=XEND-X
+      CALL FCN(N,X,Y,DY1)
+      NFCN=NFCN+1
+
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      CALL JAC(N,X,Y,FJAC)
+
+      IF (.NOT.AUTNMS) THEN
+          IF (IDFX.EQ.0) THEN
+C --- COMPUTE NUMERICALLY THE DERIVATIVE WITH RESPECT TO X
+              DELT=DSQRT(UROUND*MAX(1.D-5,ABS(X)))
+              XDELT=X+DELT
+              CALL FCN(N,XDELT,Y,AK1)
+              DO 19 J=1,N
+  19          FX(J)=(AK1(J)-DY1(J))/DELT
+          ELSE
+C --- COMPUTE ANALYTICALLY THE DERIVATIVE WITH RESPECT TO X
+              CALL DFX(N,X,Y,FX)
+          END IF
+      END IF
+   2  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE STAGES
+C *** *** *** *** *** *** ***
+      NDEC=NDEC+1
+      HC21=C21/H
+      HC31=C31/H
+      HC32=C32/H
+      HC41=C41/H
+      HC42=C42/H
+      HC43=C43/H
+      FAC=1.D0/(H*GAMMA)
+C --- THE MATRIX E (B=IDENTITY, JACOBIAN A FULL MATRIX)
+              DO 800 I=1,LU_NONZERO
+  800         E(I)=-FJAC(I)
+              DO 801 J=1,N
+  801         E(LU_DIAG(J))=E(LU_DIAG(J))+FAC
+              CALL KppDecomp (E,IER)
+              IF (IER.NE.0) GOTO 80
+              IF (AUTNMS) THEN
+C --- THIS PART COMPUTES THE STAGES IN THE CASE WHERE
+C ---   1) THE DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+C ---   2) THE JACOBIAN OF THE PROBLEM IS A FULL MATRIX
+C ---   3) THE DIFFERENTIAL EQUATION IS AUTONOMOUS
+                  DO 803 I=1,N
+  803             AK1(I)=DY1(I)
+                  CALL KppSolve(E,AK1)
+                  DO 810 I=1,N
+  810             YNEW(I)=Y(I)+A21*AK1(I) 
+                  CALL FCN(N,X,YNEW,DY)
+                  DO 811 I=1,N
+  811             AK2(I)=DY(I)+HC21*AK1(I)
+                  CALL KppSolve(E,AK2)
+                  DO 820 I=1,N
+  820             YNEW(I)=Y(I)+A31*AK1(I)+A32*AK2(I)  
+                  CALL FCN(N,X,YNEW,DY)
+                  DO 821 I=1,N
+  821             AK3(I)=DY(I)+HC31*AK1(I)+HC32*AK2(I)
+                  CALL KppSolve(E,AK3)
+                  DO 831 I=1,N
+  831             AK4(I)=DY(I)+HC41*AK1(I)+HC42*AK2(I)+HC43*AK3(I) 
+                  CALL KppSolve(E,AK4)
+              ELSE
+C --- THIS PART COMPUTES THE STAGES IN THE CASE WHERE
+C ---   1) THE DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+C ---   2) THE JACOBIAN OF THE PROBLEM IS A FULL MATRIX
+C ---   3) THE DIFFERENTIAL EQUATION IS NON-AUTONOMOUS
+                  HD1=H*D1
+                  HD2=H*D2
+                  HD3=H*D3
+                  HD4=H*D4
+                  DO 903 I=1,N
+  903             AK1(I)=DY1(I)+HD1*FX(I)
+                  CALL KppSolve(E,AK1)
+                  DO 910 I=1,N
+  910             YNEW(I)=Y(I)+A21*AK1(I) 
+                  CALL FCN(N,X+C2*H,YNEW,DY)
+                  DO 911 I=1,N
+  911             AK2(I)=DY(I)+HD2*FX(I)+HC21*AK1(I)
+                  CALL KppSolve(E,AK2)
+                  DO 920 I=1,N
+  920             YNEW(I)=Y(I)+A31*AK1(I)+A32*AK2(I)  
+                  CALL FCN(N,X+C3*H,YNEW,DY)
+                  DO 921 I=1,N
+  921             AK3(I)=DY(I)+HD3*FX(I)+HC31*AK1(I)+HC32*AK2(I)
+                  CALL KppSolve(E,AK3)
+                  DO 931 I=1,N
+  931             AK4(I)=DY(I)+HD4*FX(I)+HC41*AK1(I)+HC42*AK2(I)
+     &                  +HC43*AK3(I) 
+                  CALL KppSolve(E,AK4)
+              END IF
+      NSOL=NSOL+4
+      NFCN=NFCN+2
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION  
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+C ------------ NEW SOLUTION ---------------
+      DO 240 I=1,N
+  240 YNEW(I)=Y(I)+B1*AK1(I)+B2*AK2(I)+B3*AK3(I)+B4*AK4(I)  
+C ------------ COMPUTE ERROR ESTIMATION ----------------
+      ERR=0.D0
+      DO 300 I=1,N
+      S=E1*AK1(I)+E2*AK2(I)+E3*AK3(I)+E4*AK4(I) 
+      IF (ITOL.EQ.0) THEN
+         SK=AbsTol(1)+RelTol(1)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+      ELSE
+         SK=AbsTol(I)+RelTol(I)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+      END IF
+  300 ERR=ERR+(S/SK)**2
+      ERR=DSQRT(ERR/N)
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .2<=HNEW/H<=6.
+      FAC=DMAX1(FAC2,DMIN1(FAC1,(ERR)**.25D0/.9D0))
+      HNEW=H/FAC  
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LE.1.D0) THEN
+C --- STEP IS ACCEPTED  
+         NACCPT=NACCPT+1
+         DO 44 I=1,N 
+  44     Y(I)=YNEW(I) 
+         XXOLD=X 
+         X=X+H
+         IF (IRTRN.LT.0) GOTO 79
+         IF (DABS(HNEW).GT.HMAXN) HNEW=POSNEG*HMAXN
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H)) 
+         REJECT=.FALSE.
+         RJECT2=.FALSE.
+         H=HNEW
+         GOTO 1
+      ELSE
+C --- STEP IS REJECTED  
+         IF (RJECT2) HNEW=H*FACREJ
+         IF (REJECT) RJECT2=.TRUE.
+         REJECT=.TRUE.
+         H=HNEW
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         GOTO 2
+      END IF
+C --- EXIT
+  80  WRITE (6,*) ' MATRIX E IS SINGULAR, INFO = ',INFO
+      NSING=NSING+1
+      IF (NSING.GE.5) GOTO 79
+      H=H*0.5D0
+      GOTO 2
+  79  WRITE(6,979)X,H
+ 979  FORMAT(' EXIT OF ROS4 AT X=',D16.7,'   H=',D16.7)
+      IDID=-1
+      RETURN
+      END
+C
+      SUBROUTINE SHAMP (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+         A21=2.D0
+         A31=48.D0/25.D0
+         A32=6.D0/25.D0
+         C21=-8.D0
+         C31=372.D0/25.D0
+         C32=12.D0/5.D0
+         C41=-112.D0/125.D0
+         C42=-54.D0/125.D0
+         C43=-2.D0/5.D0
+         B1=19.D0/9.D0
+         B2=1.D0/2.D0
+         B3=25.D0/108.D0
+         B4=125.D0/108.D0
+         E1=17.D0/54.D0
+         E2=7.D0/36.D0
+         E3=0.D0
+         E4=125.D0/108.D0
+         GAMMA=.5D0
+         C2= 0.1000000000000000D+01
+         C3= 0.6000000000000000D+00
+         D1= 0.5000000000000000D+00
+         D2=-0.1500000000000000D+01
+         D3= 0.2420000000000000D+01
+         D4= 0.1160000000000000D+00
+      RETURN
+      END
+C
+      SUBROUTINE GRK4A (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.1108860759493671D+01
+       A31= 0.2377085261983360D+01
+       A32= 0.1850114988899692D+00
+       C21=-0.4920188402397641D+01
+       C31= 0.1055588686048583D+01
+       C32= 0.3351817267668938D+01
+       C41= 0.3846869007049313D+01
+       C42= 0.3427109241268180D+01
+       C43=-0.2162408848753263D+01
+       B1= 0.1845683240405840D+01
+       B2= 0.1369796894360503D+00
+       B3= 0.7129097783291559D+00
+       B4= 0.6329113924050632D+00
+       E1= 0.4831870177201765D-01
+       E2=-0.6471108651049505D+00
+       E3= 0.2186876660500240D+00
+       E4=-0.6329113924050632D+00
+       GAMMA= 0.3950000000000000D+00
+       C2= 0.4380000000000000D+00
+       C3= 0.8700000000000000D+00
+       D1= 0.3950000000000000D+00
+       D2=-0.3726723954840920D+00
+       D3= 0.6629196544571492D-01
+       D4= 0.4340946962568634D+00
+      RETURN
+      END
+C
+      SUBROUTINE GRK4T (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.4524708207373116D+01
+       A32= 0.4163528788597648D+01
+       C21=-0.5071675338776316D+01
+       C31= 0.6020152728650786D+01
+       C32= 0.1597506846727117D+00
+       C41=-0.1856343618686113D+01
+       C42=-0.8505380858179826D+01
+       C43=-0.2084075136023187D+01
+       B1= 0.3957503746640777D+01
+       B2= 0.4624892388363313D+01
+       B3= 0.6174772638750108D+00
+       B4= 0.1282612945269037D+01
+       E1= 0.2302155402932996D+01
+       E2= 0.3073634485392623D+01
+       E3=-0.8732808018045032D+00
+       E4=-0.1282612945269037D+01
+       GAMMA= 0.2310000000000000D+00
+       C2= 0.4620000000000000D+00
+       C3= 0.8802083333333334D+00
+       D1= 0.2310000000000000D+00
+       D2=-0.3962966775244303D-01
+       D3= 0.5507789395789127D+00
+       D4=-0.5535098457052764D-01
+      RETURN
+      END
+C
+      SUBROUTINE VELDS (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- METHOD GIVEN BY VAN VELDHUIZEN
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.1750000000000000D+01
+       A32= 0.2500000000000000D+00
+       C21=-0.8000000000000000D+01
+       C31=-0.8000000000000000D+01
+       C32=-0.1000000000000000D+01
+       C41= 0.5000000000000000D+00
+       C42=-0.5000000000000000D+00
+       C43= 0.2000000000000000D+01
+       B1= 0.1333333333333333D+01
+       B2= 0.6666666666666667D+00
+       B3=-0.1333333333333333D+01
+       B4= 0.1333333333333333D+01
+       E1=-0.3333333333333333D+00
+       E2=-0.3333333333333333D+00
+       E3=-0.0000000000000000D+00
+       E4=-0.1333333333333333D+01
+       GAMMA= 0.5000000000000000D+00
+       C2= 0.1000000000000000D+01
+       C3= 0.5000000000000000D+00
+       D1= 0.5000000000000000D+00
+       D2=-0.1500000000000000D+01
+       D3=-0.7500000000000000D+00
+       D4= 0.2500000000000000D+00
+      RETURN
+      END
+C
+      SUBROUTINE VELDD (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- METHOD GIVEN BY VAN VELDHUIZEN
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.4812234362695436D+01
+       A32= 0.4578146956747842D+01
+       C21=-0.5333333333333331D+01
+       C31= 0.6100529678848254D+01
+       C32= 0.1804736797378427D+01
+       C41=-0.2540515456634749D+01
+       C42=-0.9443746328915205D+01
+       C43=-0.1988471753215993D+01
+       B1= 0.4289339254654537D+01
+       B2= 0.5036098482851414D+01
+       B3= 0.6085736420673917D+00
+       B4= 0.1355958941201148D+01
+       E1= 0.2175672787531755D+01
+       E2= 0.2950911222575741D+01
+       E3=-0.7859744544887430D+00
+       E4=-0.1355958941201148D+01
+       GAMMA= 0.2257081148225682D+00
+       C2= 0.4514162296451364D+00
+       C3= 0.8755928946018455D+00
+       D1= 0.2257081148225682D+00
+       D2=-0.4599403502680582D-01
+       D3= 0.5177590504944076D+00
+       D4=-0.3805623938054428D-01
+      RETURN
+      END 
+C
+      SUBROUTINE LSTAB (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- AN L-STABLE METHOD
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.1867943637803922D+01
+       A32= 0.2344449711399156D+00
+       C21=-0.7137615036412310D+01
+       C31= 0.2580708087951457D+01
+       C32= 0.6515950076447975D+00
+       C41=-0.2137148994382534D+01
+       C42=-0.3214669691237626D+00
+       C43=-0.6949742501781779D+00
+C  B_i = M_i
+       B1= 0.2255570073418735D+01
+       B2= 0.2870493262186792D+00
+       B3= 0.4353179431840180D+00
+       B4= 0.1093502252409163D+01
+C E_i = error estimator       
+       E1=-0.2815431932141155D+00
+       E2=-0.7276199124938920D-01
+       E3=-0.1082196201495311D+00
+       E4=-0.1093502252409163D+01
+C gamma = gamma
+       GAMMA= 0.5728200000000000D+00
+C  C_i = alpha_i
+       C2= 0.1145640000000000D+01
+       C3= 0.6552168638155900D+00
+C D_i = gamma_i       
+       D1= 0.5728200000000000D+00
+       D2=-0.1769193891319233D+01
+       D3= 0.7592633437920482D+00
+       D4=-0.1049021087100450D+00
+      RETURN
+      END 
+
+        SUBROUTINE SOLOUT (NR,XOLD,X,Y,N,IRTRN)
+C --- PRINTS SOLUTION
+        IMPLICIT KPP_REAL (A-H,O-Z)
+        DIMENSION Y(N)
+        COMMON /INTERN/XOUT
+        IF (NR.EQ.1) THEN
+           WRITE (6,99) X,Y(1),Y(2),NR-1
+           XOUT=0.1D0
+        ELSE
+           IF (X.GE.XOUT) THEN
+              WRITE (6,99) X,Y(1),Y(2),NR-1
+              XOUT=DMAX1(XOUT+0.1D0,X)
+           END IF
+        END IF
+ 99     FORMAT(1X,'X =',F5.2,'    Y =',2E18.10,'    NSTEP =',I4)
+        RETURN
+        END
+
+      SUBROUTINE DEC (N, NDIM, A, IP, IER)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION.
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAY  A .
+C     A = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     A(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U .
+C     A(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(1,1)*A(2,2)*...*A(N,N).
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        DO 10 I = KP1,N
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I  
+ 10     CONTINUE
+        IP(K) = M
+        T = A(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(K,K)
+        A(K,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = KP1,N
+ 30       A(I,K) = -A(I,K)*T
+        DO 50 J = KP1,N
+          T = A(M,J)
+          A(M,J) = A(K,J)
+          A(K,J) = T
+          IF (T .EQ. 0.D0) GO TO 45
+          DO 40 I = KP1,N
+ 40         A(I,J) = A(I,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(N,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DEC -------------------------
+      END
+C
+C
+      SUBROUTINE SOL (N, NDIM, A, B, IP)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAY  A .
+C    A = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    B = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        DO 10 I = KP1,N
+ 10       B(I) = B(I) + A(I,K)*T
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        B(K) = B(K)/A(K,K)
+        T = -B(K)
+        DO 30 I = 1,KM1
+ 30       B(I) = B(I) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(1,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOL -------------------------
+      END
+
+
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE qssa
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa.f	(revision 3477)
@@ -0,0 +1,136 @@
+C -- QSSA WITH STEADY STATE APPROXIMATION --
+C    For plain QSSA (to remove the steady state assumption)
+C    modify slow -> 0, fast -> 1e20
+C
+
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR), V1(NVAR), V2(NVAR)
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, STEPold, Told, SUP
+      KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp
+      INTEGER i 
+      KPP_REAL slow, fast
+
+      T = TIN
+      Tnext = TOUT
+      STEP = DMAX1(STEPMIN,1.d-10)
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+      ERR = 1.d0
+      ERRold = 1.d0
+      slow = 0.01
+      fast = 10.  
+
+ 10    continue  
+       Tplus = T + STEP
+       if ( Tplus .gt. Tnext ) then
+          STEP = Tnext - T
+          Tplus = Tnext
+       end if
+
+
+        TITI = TIME
+        TIME = T
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V1(i) = VAR(i) + XXX
+             V2(i) = VAR(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V1(i) = P_VAR(i)/D_VAR(i)
+             V2(i) = V1(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V1(i) = tmp * tmp * (VAR(i) - ratio) + ratio
+              V2(i) = tmp * (VAR(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V1(i) = VAR(i) + P_VAR(i) * STEP * ( 1 - tmp *
+     *             ( 1 - 2.0 / 3.0 * tmp ) )
+              V2(i) = VAR(i) + P_VAR(i) * 0.5 * STEP*( 1-0.5*tmp*
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+              end if
+          END IF
+        end do
+
+        TITI = TIME
+        TIME = T + 0.5*STEP
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( V2,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V2(i) = V2(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V2(i) = P_VAR(i)/D_VAR(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V2(i) = tmp * (V2(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V2(i) = V2(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+            end if
+          END IF
+        end do
+
+C ===== Extrapolation and error estimation ========
+
+        ERRold=ERR
+        ERR=0.0D0
+          do i=1,NVAR
+             ERR = ERR + ((V2(i)-V1(i))/(ATOL(i) + RTOL(i)*V2(i)))**2
+          end do       
+        ERR = DSQRT( ERR/NVAR )
+        STEPold=STEP
+
+C ===== choosing the stepsize =====================
+
+        factor = 0.9*ERR**(-0.35)*ERRold**0.2
+        if (IsReject) then
+            facmax=1.
+        else
+            facmax=8.
+        end if 
+        factor = DMAX1( 1.25D-1, DMIN1(factor,facmax) )
+        STEP = DMIN1( STEPMAX, DMAX1(STEPMIN,factor*STEP) )    
+
+C===================================================
+
+        if ( (ERR.gt.1).and.(STEPold.gt.STEPMIN) ) then
+          IsReject = .true.
+        else
+          IsReject = .false.
+          do 140 i=1,NVAR
+             VAR(i)  = DMAX1(V2(i), 0.d0)
+ 140      continue 
+          T = Tplus     
+        end if
+      if ( T .lt. Tnext ) go to 10
+
+      TIME = Tnext
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa1.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa1.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssa1.f	(revision 3477)
@@ -0,0 +1,136 @@
+C -- QSSA WITH STEADY STATE APPROXIMATION --
+C    For plain QSSA (to remove the steady state assumption)
+C    modify slow -> 0, fast -> 1e20
+C
+
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR), V1(NVAR), V2(NVAR)
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, STEPold, Told, SUP
+      KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp
+      INTEGER I
+      KPP_REAL slow, fast
+
+      T = TIN
+      Tnext = TOUT
+      STEP = DMAX1(STEPMIN,1.d-10)
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+      ERR = 1.d0
+      ERRold = 1.d0
+      slow = 0.01
+      fast = 10.  
+
+ 10    continue  
+       Tplus = T + STEP
+       if ( Tplus .gt. Tnext ) then
+          STEP = Tnext - T
+          Tplus = Tnext
+       end if
+
+
+        TITI = TIME
+        TIME = T
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*step .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(I) - D_VAR(I)*VAR(I))
+             V1(I) = VAR(I) + XXX
+             V2(I) = VAR(I) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*step .GT. fast) THEN  ! FAST SPECIES
+             V1(I) = P_VAR(I)/D_VAR(I)
+             V2(I) = V1(I)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V1(i) = tmp * tmp * (VAR(i) - ratio) + ratio
+              V2(i) = tmp * (VAR(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V1(i) = VAR(i) + P_VAR(i) * STEP * ( 1 - tmp *
+     *             ( 1 - 2.0 / 3.0 * tmp ) )
+              V2(i) = VAR(i) + P_VAR(i) * 0.5 * STEP*( 1-0.5*tmp*
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+              end if
+          END IF
+        end do
+
+        TITI = TIME
+        TIME = T + 0.5*STEP
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( V2,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*step .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(I) - D_VAR(I)*VAR(I))
+             V2(I) = V2(I) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*step .GT. fast) THEN  ! FAST SPECIES
+             V2(I) = P_VAR(I)/D_VAR(I)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V2(i) = tmp * (V2(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V2(i) = V2(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+            end if
+          END IF
+        end do
+
+C ===== Extrapolation and error estimation ========
+
+        ERRold=ERR
+        ERR=0.0D0
+          do i=1,NVAR
+             ERR = ERR + ((V2(i)-V1(i))/(ATOL(i) + RTOL(i)*V2(i)))**2
+          end do       
+        ERR = DSQRT( ERR/NVAR )
+        STEPold=STEP
+
+C ===== choosing the stepsize =====================
+
+        factor = 0.9*ERR**(-0.35)*ERRold**0.2
+        if (IsReject) then
+            facmax=1.
+        else
+            facmax=8.
+        end if 
+        factor = DMAX1( 1.25D-1, DMIN1(factor,facmax) )
+        STEP = DMIN1( STEPMAX, DMAX1(STEPMIN,factor*STEP) )    
+
+C===================================================
+
+        if ( (ERR.gt.1).and.(STEPold.gt.STEPMIN) ) then
+          IsReject = .true.
+        else
+          IsReject = .false.
+          do 140 i=1,NVAR
+             VAR(i)  = DMAX1(V2(i), 0.d0)
+ 140      continue 
+          T = Tplus     
+        end if
+      if ( T .lt. Tnext ) go to 10
+
+      TIME = Tnext
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssafix.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssafix.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssafix.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE qssafix
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssafix.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssafix.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/qssafix.f	(revision 3477)
@@ -0,0 +1,56 @@
+C --- Plain QSSA with fixed step size
+C
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR)                    
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, Told, SUP
+      KPP_REAL ratio, tmp
+      INTEGER i
+
+      T = TIN
+      Tnext = TOUT
+      STEP = 0.1
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+
+C -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP ---
+
+      do while ( T.lt.Tnext )   
+   
+        if ( T.gt.Tnext ) then
+          STEP = Tnext - Told
+          T = Tnext
+        end if
+
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          if ( abs(D_VAR(i)).gt.SUP ) then
+            ratio = P_VAR(i)/D_VAR(i)
+            tmp = exp(-D_VAR(i)*STEP)
+            VAR(i) = tmp * (VAR(i) - ratio) + ratio
+          else
+            tmp = D_VAR(i) * STEP
+            VAR(i) = VAR(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+          end if
+        end do
+
+        T = T + STEP
+        TIME = T
+
+      end do
+
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.c	(revision 3477)
@@ -0,0 +1,313 @@
+
+	#define MAX(a,b) ((a) >= (b) ) ?(a):(b)
+	#define MIN(b,c) ((b) <  (c) ) ?(b):(c)	
+	#define abs(x)   ((x) >=  0  ) ?(x):(-x) 
+	#define dabs(y)  (double)abs(y) 
+	#define DSQRT(d) (double)pow(d,0.5)
+
+	void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	
+
+void FUNC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL P[NVAR])
+	{
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_PHOTO();
+         Fun( Y, FIX, RCONST, P );
+         TIME = Told;
+        } /* function fun ends here */
+
+void JAC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL J[LU_NONZERO])
+	{
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_PHOTO();
+         Jac_SP( Y, FIX, RCONST, J );
+         TIME = Told;
+        } /* function jac_sp ends here */
+
+
+     INTEGRATE( KPP_REAL TIN, KPP_REAL TOUT )
+      {
+	/*  TIN - Start Time       */   
+	/*  TOUT - End Time          */
+
+        int INFO[5];
+		
+	forfun = &FUNC_CHEM;
+	forjac = &JAC_CHEM;	
+        INFO[0] = Autonomous;
+
+ RODAS3( NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,VAR,ATOL,RTOL,INFO
+ ,forfun ,forjac );
+	
+}
+    
+
+
+int RODAS3(int N,KPP_REAL T, KPP_REAL Tnext,KPP_REAL Hmin,KPP_REAL Hmax,
+   KPP_REAL Hstart,KPP_REAL y[NVAR],KPP_REAL AbsTol[NVAR],KPP_REAL RelTol[NVAR],
+   int INFO[5],void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []),
+   void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) )
+   {
+/*
+       Stiffly accurate Rosenbrock 3(2), with 
+     stiffly accurate embedded formula for error control.  
+
+     All the arguments aggree with the KPP syntax.
+
+  INPUT ARGUMENTS:
+    y = Vector of (NVAR) concentrations, contains the
+         initial values on input
+     [T, Tnext] = the integration interval
+     Hmin, Hmax = lower and upper bounds for the selected step-size.
+          Note that for Step = Hmin the current computed
+          solution is unconditionally accepted by the error
+          control mechanism.
+     AbsTol, RelTol = (NVAR) dimensional vectors of 
+          componentwise absolute and relative tolerances.
+     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+          See the header below.
+     JAC_CHEM = name of routine that computes the Jacobian, in
+          sparse format. KPP syntax. See the header below.
+     Info(1) = 1  for  autonomous   system
+             = 0  for nonautonomous system 
+
+  OUTPUT ARGUMENTS:
+     y = the values of concentrations at Tend.
+     T = equals Tend on output.
+     Info(2) = # of FUNC_CHEM calls.
+     Info(3) = # of JAC_CHEM calls.
+     Info(4) = # of accepted steps.
+     Info(5) = # of rejected steps.
+    
+     Adrian Sandu, March 1996
+     The Center for Global and Regional Environmental Research
+*/
+      KPP_REAL   K1[NVAR], K2[NVAR], K3[NVAR], K4[NVAR];
+      KPP_REAL   F1[NVAR], JAC[LU_NONZERO];
+      KPP_REAL   ghinv,uround,c43,x1,x2,ytol;
+      KPP_REAL   ynew[NVAR];
+      KPP_REAL   H, Hold, Tplus,tau,tau1,tau2,tau3;
+      KPP_REAL   ERR, factor, facmax;
+      int n,nfcn,njac,Naccept,Nreject,i,j,ier;
+      char IsReject,Autonomous;	
+	
+
+
+/*      Initialization of counters, etc.	*/
+      Autonomous = (INFO[0] == 1);         
+      uround = (double)1e-15;               
+      c43 = (double)(-8.e0/3.e0);
+      H = MAX( (double)1e-8, Hstart );
+      Hmin = MAX(Hmin,uround*(Tnext-T));
+      Hmax = MIN(Hmax,Tnext-T);
+      Tplus = T;
+      IsReject = 0;
+      Naccept  = 0;
+      Nreject  = 0;
+      nfcn     = 0;
+      njac     = 0;
+
+
+/*  === Starting the time loop ===      */
+
+while(T<Tnext)
+{
+ ten :
+       Tplus = T + H;
+
+       if ( Tplus > Tnext )
+	{
+          H = Tnext - T;
+          Tplus = Tnext;
+        }
+
+       (*forjac)(NVAR, T, y,JAC );               
+
+       njac = njac+1;
+       ghinv = (double)-2.0e0/H;
+	for(j=0;j<NVAR;j++)
+	    JAC[LU_DIAG[j]] = JAC[LU_DIAG[j]] + ghinv;  
+	
+
+ ier = KppDecomp (JAC);
+
+ if ( ier != 0)
+ {
+  if( H > Hmin ) 
+  {
+   H = (double)5.0e-1*H; 
+   goto ten;	   
+  }
+  else
+   printf("IER <> 0 , H = %d", H);
+ }/* main ier if ends*/	
+		
+
+	(*forfun)(NVAR , T, y, F1 ) ;              
+
+
+/*  ====== NONAUTONOMOUS CASE ===============         */
+
+        if( Autonomous == 0)
+	{
+         tau = DSQRT( uround*MAX( (double)1.0e-5, dabs(T) ) );    
+  	 (*forfun)(NVAR , T+tau , y ,K2 ); 
+         nfcn=nfcn+1;
+	 for(j=0;j<NVAR;j++)
+	     K3[j] = ( K2[j]-F1[j] )/tau;          	  
+
+  
+/*  ----- STAGE 1 (NONAUTONOMOUS) -----	*/	
+         x1 = (double)0.5*H;
+
+	 for(j=0;j<NVAR;j++)
+	     K1[j] =  F1[j] + x1*K3[j]; 
+	 
+         KppSolve (JAC, K1);
+
+/*  ----- STAGE 2 (NONAUTONOMOUS) -----	*/
+
+	 x1 = (double)4.e0/H;
+
+	 x2 = (double)1.5e0*H;
+
+	 for(j=0;j<NVAR;j++)
+	     K2[j] = F1[j] - x1*K1[j] + x2*K3[j];     
+
+	 KppSolve (JAC, K2);
+	}/* if nonautonomous case ends here */
+
+
+/*  ====== AUTONOMOUS CASE ===============	*/
+       else
+       {
+/*  ----- STAGE 1 (AUTONOMOUS) ----- 		*/
+	 for(j=0;j<NVAR;j++)
+	     K1[j] =  F1[j];  
+	 
+         KppSolve (JAC, K1);
+      
+/*  ----- STAGE 2 (AUTONOMOUS) -----	*/
+
+	x1 = (double)4.e0/H;
+
+	for(j=0;j<NVAR;j++)
+	    K2[j] = F1[j] - x1*K1[j];  	 
+	
+	KppSolve(JAC,K2);
+	
+       }   /* else autonomous case ends here */
+
+       
+/*  ----- STAGE 3 -----	*/
+
+        for(j=0;j<NVAR;j++)
+            ynew[j] = y[j] - 2.0e0*K1[j];    
+       
+
+        (*forfun)(NVAR , T+H , ynew ,F1 ); 
+	 
+        nfcn=nfcn+1;       
+     
+        for(j=0;j<NVAR;j++)
+            K3[j] = F1[j] + ( -K1[j] + K2[j] )/H;	
+      	
+        KppSolve (JAC, K3);
+         
+
+
+/*  ----- STAGE 4 -----	*/
+
+	for(j=0;j<NVAR;j++)
+	    ynew[j] = y[j] - 2.0e0*K1[j] - K3[j];    
+	
+	(*forfun)(NVAR, T+H , ynew, F1 );	
+	 
+	nfcn=nfcn+1;
+	for(j=0;j<NVAR;j++)
+	    K4[j] = F1[j] + ( -K1[j] + K2[j] - c43*K3[j]  )/H;  
+	  
+	KppSolve (JAC, K4);
+
+
+/*  ---- The Solution ---	*/
+	for(j=0;j<NVAR;j++)
+	    ynew[j] = y[j] - (double)2.0e0*K1[j] - K3[j] - K4[j];  
+	
+
+
+/*  ====== Error estimation ========	*/
+
+	ERR=(double)0.e0; 
+
+	for(i=0;i<NVAR;i++)
+	{
+	 ytol = AbsTol[i] + RelTol[i]*dabs(ynew[i]);
+	 ERR = (double)(ERR + pow( K4[i]/ytol,2 ));     
+	}
+
+        ERR = MAX( uround, DSQRT( ERR/NVAR ) );
+	    
+/*  ======= Choose the stepsize ===============================	*/
+
+        factor = (double)0.9/pow(ERR,1.e0/3.e0);   
+
+	if(IsReject == 1)
+	   facmax = (double)1.0;
+	else
+	   facmax = (double)10.0;
+	
+        factor =(double) MAX( 1.0e-1, MIN(factor,facmax) );    
+
+        Hold = H;
+        H = (double)MIN( Hmax, MAX(Hmin,factor*H) );                 
+
+
+/*  ======= Rejected/Accepted Step ============================	*/
+
+	if( (ERR>1) && (Hold>Hmin) )
+	{
+	 IsReject = 1;
+	 Nreject = Nreject + 1;
+	}		
+	else
+	{
+	 IsReject = 0;
+	
+ 	 for(i=0;i<NVAR;i++)
+	 {
+	  y[i] = ynew[i];
+	 }
+	 T = Tplus;
+	 Naccept = Naccept+1;    
+	} /* 	  else should end here */
+
+
+/*  ======= End of the time loop ===============================	*/
+
+
+  }/*      while loop (T < Tnext) ends here    */
+
+    
+      
+/*  ======= Output Information =================================	*/
+
+      INFO[1] = nfcn;
+      INFO[2] = njac;
+      INFO[3] = Naccept;
+      INFO[4] = Nreject;                   
+  	
+      return 0; 	
+      
+ 
+} /* function rodas ends here */
+  
+
+ 
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.def	(revision 3477)
@@ -0,0 +1,55 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rodas3
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+extern int Autonomous;
+extern double STEPSTART;
+#ENDINLINE
+
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+
+
+#INLINE C_INIT_INT
+        STEPMIN=0.0001;
+        STEPMAX=3600.0;
+        Autonomous = 0;
+        STEPSTART=STEPMIN;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3.f	(revision 3477)
@@ -0,0 +1,271 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time          
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+        CALL RODAS3(NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,
+     +                   VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+
+
+
+      SUBROUTINE RODAS3(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+
+C     Stiffly accurate Rosenbrock 3(2), with 
+C     stiffly accurate embedded formula for error control.  
+C
+C     All the arguments aggree with the KPP syntax.
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of 
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system 
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals Tend on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C    
+C     Adrian Sandu, March 1996
+C     The Center for Global and Regional Environmental Research
+
+      KPP_REAL   K1(NVAR), K2(NVAR), K3(NVAR), K4(NVAR)
+      KPP_REAL   F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL   Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL   y(NVAR), ynew(NVAR)
+      KPP_REAL   AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL   T, Tnext, H, Hold, Tplus
+      KPP_REAL   ERR, factor, facmax
+      KPP_REAL   c43, tau, x1, x2, ytol, elo
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      c43 = - 8.d0/3.d0 
+      H = DMAX1(1.d-8, Hstart)
+      Hmin = DMAX1(Hmin,uround*(Tnext-T))
+      Hmax = DMIN1(Hmax,Tnext-T)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+
+
+C === Starting the time loop ===      
+ 10    continue  
+       Tplus = T + H
+       if ( Tplus .gt. Tnext ) then
+          H = Tnext - T
+          Tplus = Tnext
+       end if
+
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+       gHinv = -2.0d0/H
+       do 20 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + gHinv
+ 20    continue
+       CALL KppDecomp (JAC, ier)
+
+       if (ier.ne.0) then
+         if ( H.gt.Hmin) then
+            H = 5.0d-1*H
+            go to 10
+         else
+            print *,'IER <> 0, H=',H
+            stop
+         end if      
+       end if  
+       
+       CALL FUNC_CHEM(NVAR, T, y, F1)
+
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = DSQRT( uround*DMAX1( 1.0d-5, DABS(T) ) )
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         do 30 j = 1,NVAR
+           K3(j) = ( K2(j)-F1(j) )/tau
+ 30      continue
+ 
+C ----- STAGE 1 (NONAUTONOMOUS) -----
+         x1 = 0.5*H
+         do 40 j = 1,NVAR
+           K1(j) =  F1(j) + x1*K3(j) 
+ 40      continue
+         CALL KppSolve (JAC, K1)
+
+C ----- STAGE 2 (NONAUTONOMOUS) -----
+         x1 = 4.d0/H
+         x2 = 1.5d0*H
+         do 50 j = 1,NVAR
+           K2(j) = F1(j) - x1*K1(j) + x2*K3(j)
+ 50      continue
+         CALL KppSolve (JAC, K2)
+
+C ====== AUTONOMOUS CASE ===============
+       ELSE
+C ----- STAGE 1 (AUTONOMOUS) -----
+         do 60 j = 1,NVAR
+           K1(j) =  F1(j) 
+ 60      continue
+         CALL KppSolve (JAC, K1)
+      
+C ----- STAGE 2 (AUTONOMOUS) -----
+         x1 = 4.d0/H
+         do 70 j = 1,NVAR
+           K2(j) = F1(j) - x1*K1(j) 
+ 70      continue
+         CALL KppSolve (JAC, K2)
+       END IF
+       
+C ----- STAGE 3 -----
+       do 80 j = 1,NVAR
+         ynew(j) = y(j) - 2.0d0*K1(j) 
+ 80    continue
+       CALL FUNC_CHEM(NVAR, T+H, ynew, F1)
+       nfcn=nfcn+1
+       do 90 j = 1,NVAR
+         K3(j) = F1(j) + ( -K1(j) + K2(j) )/H
+ 90    continue
+       CALL KppSolve (JAC, K3)
+
+C ----- STAGE 4 -----
+       do 100 j = 1,NVAR
+         ynew(j) = y(j) - 2.0d0*K1(j) - K3(j)
+ 100   continue
+       CALL FUNC_CHEM(NVAR, T+H, ynew, F1)
+       nfcn=nfcn+1
+       do 110 j = 1,NVAR
+         K4(j) = F1(j) + ( -K1(j) + K2(j) - C43*K3(j)  )/H
+ 110   continue
+       CALL KppSolve (JAC, K4)
+
+C ---- The Solution ---
+
+       do 120 j = 1,NVAR
+         ynew(j) = y(j) - 2.0d0*K1(j) - K3(j) - K4(j) 
+ 120   continue
+
+
+C ====== Error estimation ========
+
+        ERR=0.d0
+        do 130 i=1,NVAR
+           ytol = AbsTol(i) + RelTol(i)*DABS(ynew(i))
+           ERR = ERR + ( K4(i)/ytol )**2
+ 130    continue      
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+
+C ======= Choose the stepsize ===============================
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             y(i)  = ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+
+
+C ======= End of the time loop ===============================
+      if ( T .lt. Tnext ) go to 10
+ 
+     
+      
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+      
+      RETURN 
+      END        
+
+  
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y, FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3_ddm.def	(revision 3477)
@@ -0,0 +1,52 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rodas3_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/rodas3_ddm.f	(revision 3477)
@@ -0,0 +1,592 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL RODAS3_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE RODAS3_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+     
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C       Stiffly accurate Rosenbrock 3(2), with 
+C       stiffly accurate embedded formula for error control.  
+C
+C Direct decoupled computation of sensitivities.
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations and sensitivities at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C 
+C    Adrian Sandu, December 2001
+C 
+
+      INTEGER      NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR*(NSENSIT+1))
+      KPP_REAL K4(NVAR*(NSENSIT+1))
+      KPP_REAL Fv(NVAR), Hv(NVAR)
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL DFDP(NVAR*NSENSIT), DFDPDT(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, Hnew, elo
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL w, e, beta1, beta2, beta3, beta4
+      KPP_REAL tau, x1, x2, ytol, dround
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL    FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+C   The method coefficients
+      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+      PARAMETER ( gamma  =  0.5D+00 )
+      PARAMETER ( gamma2 =  1.5D+00 ) 
+      PARAMETER ( gamma3 =  0.0D+00 ) 
+      PARAMETER ( gamma4 =  0.0D+00 ) 
+      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+      PARAMETER (  a21 = 0.0D+00  )   
+      PARAMETER (  a31 = 2.0D+00  )   
+      PARAMETER (  a32 = 0.0D+00  )   
+      PARAMETER (  a41 = 2.0D+00  )   
+      PARAMETER (  a42 = 0.0D+00  )   
+      PARAMETER (  a43 = 1.0D+00  )   
+      DOUBLE PRECISION alpha2, alpha3, alpha4
+      PARAMETER (  alpha2  = 0.0D0  )   
+      PARAMETER (  alpha3  = 1.0D0  )   
+      PARAMETER (  alpha4  = 1.0D0  )   
+      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+      PARAMETER (  c21  =  4.0D0  ) 
+      PARAMETER (  c31  =  1.0D0  ) 
+      PARAMETER (  c32  = -1.0D0  ) 
+      PARAMETER (  c41  =  1.0D0  ) 
+      PARAMETER (  c42  = -1.0D0  ) 
+      PARAMETER (  c43  = -2.666666666666667D0 ) 
+      DOUBLE PRECISION b1, b2, b3, b4
+      PARAMETER (  b1 = 2.0D+00  ) 
+      PARAMETER (  b2 = 0.0D0  ) 
+      PARAMETER (  b3 = 1.0D0  ) 
+      PARAMETER (  b4 = 1.0D0  )  
+      DOUBLE PRECISION d1, d2, d3, d4
+      PARAMETER (  d1 = 0.0D0  ) 
+      PARAMETER (  d2 = 0.0D0  ) 
+      PARAMETER (  d3 = 0.0D0  ) 
+      PARAMETER (  d4 = 1.0D0  )  
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function, Jacobian, and Hessian Values
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+ 
+C              The time derivatives for non-Autonomous case                                                                                                                            
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d0, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-Fv(j) )/tau
+ 20      CONTINUE
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 35 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 35      CONTINUE
+       END IF
+ 
+ 11    CONTINUE  ! From here we restart after a rejected step
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       Njac = Njac+1
+       ghinv = 1.0d0/(gamma*H)
+       DO 40 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j)
+ 40    CONTINUE
+       DO 50 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + ghinv
+ 50    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+C 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'ROS4: Singular factorization at T=',T,'; H=',H
+            STOP
+         END IF
+       END IF
+                                                                                                                            
+C ------------ STAGE 1-------------------------
+       DO 60 j = 1,NVAR
+         K1(j) =  Fv(j)
+ 60    CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta1 = H*gamma
+	  DO 70 j=1,NVAR
+	    K1(j) = K1(j) + beta1*DFDT(j)	    
+ 70	  CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 100 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K1(1), Hv )
+	  DO 80 j=1,NVAR
+	    K1(i*NVAR+j) = K1(i*NVAR+j) + Hv(j)
+ 80	  CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	    DO 90 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + beta1*DFDT(i*NVAR+j)
+ 90         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 95 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 95        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 100   CONTINUE
+ 
+C ----------- STAGE 2 -------------------------
+C Note: uses the same function values as Stage 1
+C       DO 110 j = 1,NVAR*(NSENSIT+1)
+C         ynew(j) = y(j) + a21*K1(j)
+C 110   CONTINUE
+C       CALL FUNC_CHEM(NVAR, T+alpha2*H, ynew, Fv)
+C       IF (DDMTYPE .EQ. 1) THEN
+C         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha2*H, ynew, DFDP)
+C       END IF	 
+C       nfcn=nfcn+1
+       beta1 = c21/H
+       DO 120 j = 1,NVAR
+         K2(j) = Fv(j) + beta1*K1(j)
+ 120   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta2 = H*gamma2
+	 DO 130 j=1,NVAR
+	    K2(j) = K2(j) + beta2*DFDT(j)	    
+ 130     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha2*H, ynew, JAC)
+       njac=njac+1
+       DO 160 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K2(1), Hv )
+          DO 140 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                          + Hv(j)
+ 140      CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	     DO 150 j=1,NVAR
+	        K2(i*NVAR+j) = K2(i*NVAR+j) + beta2*DFDT(i*NVAR+j)
+ 150         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 155 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 155        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 160   CONTINUE
+ 
+ 
+C ------------ STAGE 3 -------------------------
+       DO 170 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a31*K1(j) + a32*K2(j)
+ 170   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha3*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha3*H, ynew, DFDP)
+       END IF	    
+       nfcn=nfcn+1
+       beta1 = c31/H
+       beta2 = c32/H
+       DO 180 j = 1,NVAR
+         K3(j) = Fv(j) + beta1*K1(j) + beta2*K2(j)
+ 180   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta3 = H*gamma3
+	 DO 190 j=1,NVAR
+	    K3(j) = K3(j) + beta3*DFDT(j)	    
+ 190     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K3)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K3(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha3*H, ynew, JAC)
+       njac=njac+1
+       DO 220 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K3(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K3(1), Hv )
+          DO 200 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + Hv(j)
+ 200      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 210 j=1,NVAR
+	        K3(i*NVAR+j) = K3(i*NVAR+j) + beta3*DFDT(i*NVAR+j)
+ 210         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 215 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 215        CONTINUE	  
+	  END IF	 
+C               --- End of derivative w.r.t. parameters
+          CALL KppSolve (AJAC, K3(i*NVAR+1))
+ 220   CONTINUE
+ 
+C ------------ STAGE 4 -------------------------
+       DO 225 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a41*K1(j) + a42*K2(j) + a43*K3(j)
+ 225   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha4*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha4*H, ynew, DFDP)
+       END IF	    
+       nfcn=nfcn+1
+       beta1 = c41/H
+       beta2 = c42/H
+       beta3 = c43/H
+       DO 230 j = 1,NVAR
+         K4(j) = Fv(j) + beta1*K1(j) + beta2*K2(j) + beta3*K3(j)
+ 230   CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta4 = H*gamma4
+	  DO 240 j=1,NVAR
+	    K4(j) = K4(j) + beta4*DFDT(j)
+ 240      CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K4)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K4(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       njac=njac+1
+       DO 270 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K4(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K4(1), Hv )
+          DO 250 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + beta3*K3(i*NVAR+j)
+     &                       + Hv(j)
+ 250      CONTINUE
+          IF (.NOT. Autonomous) THEN
+	     DO 260 j=1,NVAR
+	        K4(i*NVAR+j) = K4(i*NVAR+j) + beta4*DFDT(i*NVAR+j)
+ 260         CONTINUE
+          END IF
+C --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 265 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 265        CONTINUE	  
+	  END IF	 
+          CALL KppSolve (AJAC, K4(i*NVAR+1))
+ 270   CONTINUE
+
+
+C ---- The Solution ---
+       DO 280 j = 1,NVAR*(NSENSIT+1)
+C         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) + b4*K4(j)
+         ynew(j) = y(j) + 2*K1(j) + K3(j) + K4(j)
+ 280   CONTINUE
+ 
+ 
+C ====== Error estimation -- can be extended to control sensitivities too ========
+ 
+        ERR = 0.d0
+        DO 290 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(ynew(i)),DABS(y(i)))
+C	   e = d1*K1(i) + d2*K2(i) + d3*K3(i) + d4*K4(i)
+	   e = K4(i)
+           ERR = ERR + ( e/w )**2
+ 290    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 300 i=1,NVAR*(NSENSIT+1)
+             y(i)  = ynew(i)
+ 300      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y,  FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros1
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 30.0;
+        STEPMAX = 30.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1.f	(revision 3477)
@@ -0,0 +1,166 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS1(NVAR,TIN,TOUT,STEPMIN,VAR,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS1(N,T,Tnext,Hstart,
+     +                   y,Info,FUNC_CHEM,JAC_CHEM)
+     
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Linearly Implicit Euler
+C  A method of theoretical interest but of no practical value
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C     Hstart = The last accepted stepsize
+C 
+C    Adrian Sandu, December 2001
+C 
+      KPP_REAL Fv(NVAR)
+      KPP_REAL JAC(LU_NONZERO)
+      KPP_REAL H, Hstart
+      KPP_REAL y(NVAR)
+      KPP_REAL T, Tnext, Tplus
+      KPP_REAL elo,ghinv,uround
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL    FUNC_CHEM, JAC_CHEM                                                                                                
+
+
+      H     = Hstart
+      Tplus = T
+      Nfcn  = 0
+      Njac  = 0
+  
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function and Jacobian values                                                                                                                            
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       Nfcn = Nfcn+1
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       DO 40 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) - 1.0d0/H
+ 40    CONTINUE
+       CALL KppDecomp (JAC, ier)
+C 
+       IF (ier.ne.0) THEN
+          PRINT *,'ROS1: Singular factorization at T=',T,'; H=',H
+          STOP
+       END IF
+ 
+C ------------ STAGE 1-------------------------
+       CALL KppSolve (JAC, Fv)
+ 
+C ---- The Solution ---
+       DO 160 j = 1,NVAR
+         y(j) = y(j) - Fv(j) 
+ 160   CONTINUE
+       T = T + H
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Njac
+      Info(5) = 0
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1_ddm.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros1_ddm
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 30.0;
+        STEPMAX = 30.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros1_ddm.f	(revision 3477)
@@ -0,0 +1,300 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+      INTEGER   NSENSIT
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C TOUT - End Time
+      KPP_REAL Y( NVAR*(NSENSIT+1) )
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM,  HESS_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS1_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,Y,
+     +                   Info,FUNC_CHEM,JAC_CHEM,HESS_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS1_DDM(N,NSENSIT,T,Tnext,Hstart,
+     +                   y,Info,FUNC_CHEM,JAC_CHEM,HESS_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+C
+C  Linearly Implicit Euler with direct-decoupled calculation of sensitivities
+C  A method of theoretical interest but of no practical value
+C
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C     Hstart = The last accepted stepsize
+C 
+C    Adrian Sandu, December 2001
+C 
+      INTEGER   NSENSIT
+      KPP_REAL Fv(NVAR*(NSENSIT+1)), Hv(NVAR)
+      KPP_REAL DFDP(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL H, Hstart
+      KPP_REAL y(NVAR*(NSENSIT+1))
+      KPP_REAL T, Tnext, Tplus
+      KPP_REAL elo,ghinv,uround
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+
+      H     = Hstart
+      Tplus = T
+      Nfcn  = 0
+      Njac  = 0
+  
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function and Jacobian values                                                                                                                            
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       Nfcn = Nfcn+1
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF  
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       DO 40 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j)
+ 40    CONTINUE
+       DO 50 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + 1.0d0/H
+ 50    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+C 
+       IF (ier.ne.0) THEN
+          PRINT *,'ROS1: Singular factorization at T=',T,'; H=',H
+          STOP
+       END IF
+ 
+C ------------ STAGE 1-------------------------
+       CALL KppSolve (AJAC, Fv)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, Fv(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 100 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC, y(i*NVAR+1), Fv(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), Fv(1), Hv )
+          IF (DDMTYPE .EQ. 0) THEN
+	    DO 80 j=1,NVAR
+	      Fv(i*NVAR+j) = Fv(i*NVAR+j) + Hv(j)
+ 80	    CONTINUE	    
+          ELSE
+	    DO 90 j=1,NVAR
+	      Fv(i*NVAR+j) = Fv(i*NVAR+j) + Hv(j) 
+     &      	      + DFDP(i*NVAR+j)+ DJDP((i-1)*NVAR+j)
+ 90	    CONTINUE	    
+          END IF  
+          CALL KppSolve (AJAC, Fv(i*NVAR+1))
+ 100   CONTINUE
+ 
+C ---- The Solution ---
+       DO 160 j = 1,NVAR*(NSENSIT+1)
+         y(j) = y(j) + Fv(j) 
+ 160   CONTINUE
+       T = T + H
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) THEN
+          GO TO 10
+      END IF	  
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y, FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.c	(revision 3477)
@@ -0,0 +1,311 @@
+
+	#define MAX(a,b) ((a) >= (b)) ?(a):(b)
+	#define MIN(b,c) ((b) <  (c)) ?(b):(c)	
+	#define abs(x)   ((x) >=  0 ) ?(x):(-x) 
+	#define dabs(y)  (double)abs(y) 
+	#define DSQRT(d) (double)pow(d,0.5)
+	#define signum(x)((x) >=  0 ) ?(1):(-1)
+
+
+
+	void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+
+
+
+ 
+void FUNC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL P[NVAR])
+	{
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_RCONST();
+         Fun( Y, FIX, RCONST, P );
+         TIME = Told;
+        }
+ 
+void JAC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL J[LU_NONZERO])
+        {
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_RCONST();
+         Jac_SP( Y, FIX, RCONST, J );
+         TIME = Told;
+        }  
+                                                                                                                         
+
+
+
+
+       INTEGRATE(KPP_REAL TIN,KPP_REAL TOUT )
+	{
+ 
+	 /*  TIN - Start Time   */
+	 /*  TOUT - End Time     */
+
+
+         int INFO[5];
+	 forfun = &FUNC_CHEM;
+	 forjac = &JAC_CHEM;	
+         INFO[0] = Autonomous;
+	 ROS2(NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,VAR,ATOL
+	 ,RTOL,INFO,forfun,forjac);
+ 
+	}
+ 
+ 
+int ROS2(int N,KPP_REAL T, KPP_REAL Tnext,KPP_REAL Hmin,KPP_REAL Hmax,
+   KPP_REAL Hstart,KPP_REAL y[NVAR],KPP_REAL AbsTol[NVAR],KPP_REAL RelTol[NVAR],
+   int INFO[5],void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []),
+   void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) )
+   {
+     
+                                                                                
+/*
+     All the arguments aggree with the KPP syntax.
+
+  INPUT ARGUMENTS:
+     y = Vector of (NVAR) concentrations, contains the
+         initial values on input
+     [T, Tnext] = the integration interval
+     Hmin, Hmax = lower and upper bounds for the selected step-size.
+          Note that for Step = Hmin the current computed
+          solution is unconditionally accepted by the error
+          control mechanism.
+     AbsTol, RelTol = (NVAR) dimensional vectors of
+          componentwise absolute and relative tolerances.
+     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+          See the header below.
+     JAC_CHEM = name of routine that computes the Jacobian, in
+          sparse format. KPP syntax. See the header below.
+     Info(1) = 1  for  autonomous   system
+             = 0  for nonautonomous system
+
+  OUTPUT ARGUMENTS:
+     y = the values of concentrations at Tend.
+     T = equals Tend on output.
+     Info(2) = # of FUNC_CHEM calls.
+     Info(3) = # of JAC_CHEM calls.
+     Info(4) = # of accepted steps.
+     Info(5) = # of rejected steps.
+*/
+ 
+      KPP_REAL K1[NVAR], K2[NVAR], K3[NVAR], K4[NVAR];
+      KPP_REAL F1[NVAR], JAC[LU_NONZERO];
+      KPP_REAL ghinv , uround , dround , c43 , tau;
+      KPP_REAL ynew[NVAR];
+      KPP_REAL H, Hold, Tplus;
+      KPP_REAL ERR, factor, facmax;
+      int n,nfcn,njac,Naccept,Nreject,i,j,ier;
+      char IsReject,Autonomous;
+                                                                            
+      KPP_REAL gamma, m1, m2, alpha, beta, delta, theta, g[NVAR], x[NVAR];
+ 
+/*     Initialization of counters, etc.       */
+      Autonomous = (INFO[0] == 1);         
+      uround = (double)(1e-15);               
+
+      dround = DSQRT(uround);
+      c43 = (double)(- 8.e0/3.e0);
+      H = MAX( (double)1.e-8, Hmin );
+      Tplus = T;
+      IsReject = 0;
+      Naccept  = 0;
+      Nreject  = 0;
+      nfcn     = 0;
+      njac     = 0;
+      gamma = (double)(1.e0 + 1.e0/DSQRT(2.e0));
+ 
+/* === Starting the time loop ===     */
+ while(T < Tnext)
+ {
+ ten :     
+     Tplus = T + H;
+
+     if ( Tplus > Tnext )
+      {
+        H = Tnext - T;
+        Tplus = Tnext;
+      }
+
+     (*forjac)(NVAR, T, y,JAC );               
+
+     njac = njac+1;
+     ghinv = (double)(-1.0e0/(gamma*H));
+     
+     
+     
+     for(j=0;j<NVAR;j++)
+        JAC[LU_DIAG[j]] = JAC[LU_DIAG[j]] + ghinv;
+      
+
+
+     ier = KppDecomp (JAC);
+
+     if ( ier != 0)
+     {
+      if( H > Hmin ) 
+      {
+       H = (double)(5.0e-1*H); 
+       goto ten;	   
+      }
+     else
+       printf("IER <> 0 , H = %d", H);
+       
+     }/* main ier if ends*/	
+		
+
+     (*forfun)(NVAR , T, y, F1 ) ;              
+
+
+
+                                                                                                                            
+
+ 
+/* ====== NONAUTONOMOUS CASE ===============   */
+       if(Autonomous == 0) 
+       {
+         tau =( dround*MAX ((double)1.0e-6, dabs(T)) *signum(T) );
+         (*forfun)(NVAR, T+tau, y, K2);
+         nfcn=nfcn+1;
+	 
+         for(j = 0;j<NVAR;j++)
+	     K3[j] = ( K2[j]-F1[j] )/tau;
+	  
+ 
+/* ----- STAGE 1 (NON-AUTONOMOUS) -----   */
+
+         delta = (double)(gamma*H);
+	 
+         for(j = 0;j<NVAR;j++)
+	     K1[j] =  F1[j] + delta*K3[j];
+	 
+         KppSolve (JAC, K1);
+ 
+
+/* ----- STAGE 2  (NON-AUTONOMOUS) -----   */
+         alpha = (double)(- 1.e0/gamma);
+         for(j = 0;j<NVAR;j++)
+             ynew[j] = y[j] + alpha*K1[j];
+	 
+ 
+         (*forfun)(NVAR, T+H, ynew, F1);
+         nfcn=nfcn+1;
+         beta = (double)(2.e0/(gamma*H));
+         delta = (double)(-gamma*H);
+         for(j = 0;j<NVAR;j++)
+             K2[j] = F1[j] + beta*K1[j] + delta*K3[j];
+	 
+         KppSolve (JAC, K2);
+    
+       }/* if for non - autonomous case ends here  */	
+ 
+/* ====== AUTONOMOUS CASE ===============    */
+       else
+       {
+ 
+/* ----- STAGE 1 (AUTONOMOUS) -----   */
+         for(j = 0;j<NVAR;j++)
+	     K1[j] =  F1[j];
+         
+         KppSolve (JAC, K1);
+ 
+/* ----- STAGE 2  (AUTONOMOUS) -----  */
+         alpha = (double)(- 1.e0/gamma);
+       
+         for(j = 0;j<NVAR;j++)
+             ynew[j] = y[j] + alpha*K1[j];
+       
+         (*forfun)(NVAR, T+H, ynew, F1);
+
+         nfcn=nfcn+1;
+         beta = (double)(2.e0/(gamma*H));
+         for(j = 0;j < NVAR;j++)
+             K2[j] = F1[j] + beta*K1[j];
+       
+         KppSolve (JAC, K2);
+       
+       }/* else autonomous case ends here */
+       
+ 
+                                                                                                            
+/* ---- The Solution ---  */
+       m1 = (double)(-3.e0/(2.e0*gamma));
+       m2 = (double)(-1.e0/(2.e0*gamma));
+       for(j = 0;j<NVAR;j++)
+          ynew[j] = y[j] + m1*K1[j] + m2*K2[j];
+       
+ 
+ 
+/* ====== Error estimation ========    */
+ 
+        ERR=(double)0.e0;
+        theta = (double)(1.e0/(2.e0*gamma));
+	
+        for(i=0;i<NVAR;i++)
+	{
+           g[i] = AbsTol[i] + RelTol[i]*dabs(ynew[i]);
+           ERR = (double)( ERR + pow( ( theta*(K1[i]+K2[i])/g[i] ) , 2.0 ) );
+        }
+         ERR = MAX( uround, DSQRT( ERR/NVAR ) );
+ 
+/* ======= Choose the stepsize ==================  */
+ 
+ 
+        factor = (double)(0.9/pow( ERR,(1.e0/2.e0) ));
+        if (IsReject == 1) 
+	    facmax=(double)1.0;
+        
+	else
+            facmax=(double)10.0;
+        
+	
+        factor =(double) MAX( 1.0e-1, MIN(factor,facmax) );
+        Hold = H;
+        H = (double)MIN( Hmax, MAX(Hmin,factor*H) );
+                                                                                                
+/* ======= Rejected/Accepted Step ==================  */
+ 
+ 
+	if( (ERR>1) && (Hold>Hmin) )
+	{
+	 IsReject = 1;
+	 Nreject = Nreject + 1;
+	}		
+	else
+	{
+	 IsReject = 0;
+ 	 for(i=0;i<NVAR;i++)
+	 {
+	  y[i] = ynew[i];
+	 }
+	T = Tplus;
+	Naccept = Naccept+1;    
+ 
+ 	}/*  else ends here */
+
+ 
+ 
+ 
+ 
+/* ======= End of the time loop =================    */
+  
+ }    /*      while loop (T < Tnext) ends here    */ 
+ 
+ 
+/* ======= Output Information ================      */
+      INFO[1] = nfcn;
+      INFO[2] = njac;
+      INFO[3] = Naccept;
+      INFO[4] = Nreject;
+
+      return 0;	
+	
+  } /* function ros2 ends here   */
+ 
+ 
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros2
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.f	(revision 3477)
@@ -0,0 +1,314 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - END Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+      
+C--------------------------------
+      INTEGER N_stepss, N_accepteds, N_rejecteds, N_jacs, ITOL, IERR
+      SAVE N_stepss, N_accepteds, N_rejecteds, N_jacs
+C--------------------------------
+
+      INFO(1) = 1 ! Autonomous
+      INFO(2) = 0
+ 
+      CALL ROS2(NVAR,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+C--------------------------------
+      N_stepss=N_stepss+Info(4)+Info(5)
+      N_accepteds=N_accepteds+Info(4)
+      N_rejecteds=N_rejecteds+Info(5)
+      N_jacs=N_jacs+Info(3)
+      PRINT*,'Step=',N_stepss,' Acc=',N_accepteds,' Rej=',N_rejecteds,
+     &          ' Jac=',N_jacs
+C--------------------------------
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS2(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   Y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+
+C  INPUT ARGUMENTS:
+C     Y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system
+C     Info(2) = 1  for third order embedded formula
+C             = 0  for first order embedded formula 
+C
+C   Note: Stage 3 used to build strongly A-stable order 3 formula for error control
+C            Embed3 = (Info(2).EQ.1)
+C         IF Embed3 = .true. THEN the third order embedded formula is used
+C                     .false. THEN a first order embedded  formula is used
+C
+C
+C  OUTPUT ARGUMENTS:
+C     Y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+ 
+      KPP_REAL  K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL  F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL  DFDT(NVAR)
+      KPP_REAL  Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL  Y(NVAR), Ynew(NVAR)
+      KPP_REAL  AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL  T, Tnext, H, Hold, Tplus
+      KPP_REAL  ERR, factor, facmax
+      KPP_REAL  tau, beta, elo, dround, a21, c21, c31, c32
+      KPP_REAL  gamma3, d1, d2, d3, gam
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous, Embed3
+      EXTERNAL    FUNC_CHEM, JAC_CHEM                                                                                                
+
+      KPP_REAL  gamma, m1, m2, alpha, beta1, beta2, delta, w, e
+ 
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround  = 1.d-15
+      dround  = dsqrt(uround)
+      H = DMAX1(1.d-8, Hmin)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      
+C     Method Parameters      
+      gamma = 1.d0 + 1.d0/sqrt(2.d0)
+      a21   = - 1.d0/gamma
+      m1 = -3.d0/(2.d0*gamma)
+      m2 = -1.d0/(2.d0*gamma)
+      c21 = -2.d0/gamma
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2)
+     &         /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2)
+     &          /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/
+     &          (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gamma)/gamma**2/
+     &          (-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+ 
+C === Start the time loop ===
+       DO WHILE (T .LT. Tnext)
+
+10     CONTINUE
+
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+       CALL JAC_CHEM( T, Y, JAC )
+ 
+       Njac = Njac+1
+       ghinv = -1.0d0/(gamma*H)
+       DO 20 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+ 20    CONTINUE
+       CALL KppDecomp (JAC, ier)
+ 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'IER <> 0, H=',H
+            STOP
+         END IF
+       END IF
+ 
+       CALL FUNC_CHEM( T, Y, F1 )
+ 
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.NOT. Autonomous) THEN
+         tau = DSIGN(DROUND*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM( T+tau, Y, K2)
+         nfcn=nfcn+1
+         DO 30 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 30      CONTINUE
+       END IF ! .NOT.Autonomous
+ 
+C ----- STAGE 1 -----
+       delta = gamma*H
+       DO 40 j = 1,NVAR
+          K1(j) =  F1(j) 
+ 40    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 45 j = 1,NVAR
+           K1(j) = K1(j) + delta*DFDT(j)
+ 45      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K1)
+ 
+C ----- STAGE 2  -----
+       DO 50 j = 1,NVAR
+         Ynew(j) = Y(j) + a21*K1(j)
+ 50    CONTINUE
+       CALL FUNC_CHEM( T+H, Ynew, F1)
+       nfcn=nfcn+1
+       beta = -c21/H
+       DO 55 j = 1,NVAR
+         K2(j) = F1(j) + beta*K1(j) 
+ 55    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         delta = -gamma*H
+         DO 56 j = 1,NVAR
+           K2(j) = K2(j) + delta*DFDT(j)
+ 56      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K2)
+ 
+C ----- STAGE 3  -----
+       IF (Embed3) THEN
+       beta1 = -c31/H
+       beta2 = -c32/H
+       delta = gamma3*H
+       DO 57 j = 1,NVAR
+         K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j) 
+ 57    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 58 j = 1,NVAR
+           K3(j) = K3(j) + delta*DFDT(j)
+ 58      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K3)
+       END IF ! Embed3
+ 
+
+C ---- The Solution ---
+       DO 120 j = 1,NVAR
+         Ynew(j) = Y(j) + m1*K1(j) + m2*K2(j)
+ 120   CONTINUE
+ 
+ 
+C ====== Error estimation ========
+ 
+        ERR=0.d0
+        DO 130 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(Y(i)),DABS(Ynew(i)))
+	   IF ( Embed3 ) THEN
+	     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+	   ELSE
+             e = 1.d0/(2.d0*gamma)*(K1(i)+K2(i))
+	   END IF  ! Embed3 
+           ERR = ERR + ( e/w )**2
+ 130    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+ 
+        IF ( Embed3 ) THEN
+            elo = 3.0D0 ! estimator local order
+	ELSE
+	    elo = 2.0D0
+	END IF    
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             Y(i)  = Ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize IF previous step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= END of the time loop ===============================
+      END DO
+  
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM( T, Y, P )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL  T, Told
+      KPP_REAL  Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM( T, Y, J )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL  Told, T
+      KPP_REAL  Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2.f90	(revision 3477)
@@ -0,0 +1,294 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      USE KPP_ROOT_global
+
+! TIN - Start Time
+      KPP_REAL TIN
+! TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      call ROS2(NVAR,TIN,TOUT,STEPMIN,STEPMAX,   &
+            STEPMIN,VAR,ATOL,RTOL, &
+            Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      END SUBROUTINE INTEGRATE
+  
+
+ 
+ 
+      SUBROUTINE ROS2(N,T,Tnext,Hmin,Hmax,Hstart,  &
+            y,AbsTol,RelTol,      &
+            Info,FUNC_CHEM,JAC_CHEM)
+      
+      USE KPP_ROOT_params
+      USE KPP_ROOT_Jacobian_sparsity                                 
+      IMPLICIT NONE
+
+!  INPUT ARGUMENTS:
+!     y = Vector of (NVAR) concentrations, contains the
+!     initial values on input
+!     [T, Tnext] = the integration interval
+!     Hmin, Hmax = lower and upper bounds for the selected step-size.
+!      Note that for Step = Hmin the current computed
+!      solution is unconditionally accepted by the error
+!      control mechanism.
+!     AbsTol, RelTol = (NVAR) dimensional vectors of
+!      componentwise absolute and relative tolerances.
+!     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+!      See the header below.
+!     JAC_CHEM = name of routine that computes the Jacobian, in
+!      sparse format. KPP syntax. See the header below.
+!     Info(1) = 1  for  autonomous   system
+!         = 0  for nonautonomous system
+!     Info(2) = 1  for third order embedded formula
+!         = 0  for first order embedded formula 
+!
+!   Note: Stage 3 used to build strongly A-stable order 3 formula for error control
+!        Embed3 = (Info(2).EQ.1)
+!     if Embed3 = .true. then the third order embedded formula is used
+!         .false. then a first order embedded  formula is used
+!
+!
+!  OUTPUT ARGUMENTS:
+!     y = the values of concentrations at Tend.
+!     T = equals Tend on output.
+!     Info(2) = # of FUNC_CHEM calls.
+!     Info(3) = # of JAC_CHEM calls.
+!     Info(4) = # of accepted steps.
+!     Info(5) = # of rejected steps.
+ 
+      KPP_REAL K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL DFDT(NVAR)
+      KPP_REAL Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL y(NVAR), ynew(NVAR)
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, H, Hold, Tplus
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL tau, beta, elo, dround, a21, c31, c32
+      KPP_REAL gamma3, d1, d2, d3, gam
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous, Embed3
+      EXTERNAL    FUNC_CHEM, JAC_CHEM                                 
+
+      KPP_REAL gamma, m1, m2, alpha, beta1, beta2, delta, w, e
+ 
+!     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround  = 1.d-15
+      dround  = dsqrt(uround)
+      H = DMAX1(1.d-8, Hmin)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      
+!     Method Parameters      
+      gamma = 1.d0 + 1.d0/sqrt(2.d0)
+      a21   = - 1.d0/gamma
+      m1 = -3.d0/(2.d0*gamma)
+      m2 = -1.d0/(2.d0*gamma)
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2) &
+      /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2) &
+       /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/      &
+       (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gamma)/gamma**2/(-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+ 
+! === Starting the time loop ===
+ 10    CONTINUE
+      Tplus = T + H
+      if ( Tplus .gt. Tnext ) then
+         H = Tnext - T
+         Tplus = Tnext
+      end if
+ 
+      call JAC_CHEM(NVAR, T, y, JAC)
+ 
+      Njac = Njac+1
+      ghinv = -1.0d0/(gamma*H)
+      DO j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+      END DO
+      CALL KppDecomp (JAC, ier)
+ 
+      if (ier.ne.0) then
+        if ( H.gt.Hmin) then
+          H = 5.0d-1*H
+          go to 10
+        else
+          print *,'IER <> 0, H=',H
+          stop
+        end if
+      end if
+ 
+      call FUNC_CHEM(NVAR, T, y, F1)
+ 
+! ====== NONAUTONOMOUS CASE ===============
+   IF (.not. Autonomous) THEN
+     tau = dsign(dround*dmax1( 1.0d-6, dabs(T) ), T)
+     call FUNC_CHEM(NVAR, T+tau, y, K2)
+     nfcn=nfcn+1
+     DO j = 1,NVAR
+       DFDT(j) = ( K2(j)-F1(j) )/tau
+     END DO
+   END IF ! .NOT.Autonomous
+ 
+! ----- STAGE 1 -----
+   DO j = 1,NVAR
+      K1(j) =  F1(j) 
+   END DO
+   IF (.NOT.Autonomous) THEN
+     delta = gamma*H
+     DO j = 1,NVAR
+       K1(j) = K1(j) + delta*DFDT(j)
+     END DO      
+   END IF ! .NOT.Autonomous
+   call KppSolve (JAC, K1)
+ 
+! ----- STAGE 2  -----
+   DO j = 1,NVAR
+     ynew(j) = y(j) + a21*K1(j)
+   END DO
+   call FUNC_CHEM(NVAR, T+H, ynew, F1)
+   nfcn=nfcn+1
+   beta = 2.d0/(gamma*H)
+   DO j = 1,NVAR
+     K2(j) = F1(j) + beta*K1(j) 
+   END DO
+   IF (.NOT. Autonomous) THEN
+     delta = -gamma*H
+     DO j = 1,NVAR
+       K2(j) = K2(j) + delta*DFDT(j)
+     END DO   
+   END IF ! .NOT.Autonomous
+   call KppSolve (JAC, K2)
+ 
+! ----- STAGE 3  -----
+   IF (Embed3) THEN
+   beta1 = -c31/H
+   beta2 = -c32/H
+   delta = gamma3*H
+   DO j = 1,NVAR
+     K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j) 
+   END DO
+   IF (.NOT.Autonomous) THEN
+     DO j = 1,NVAR
+       K3(j) = K3(j) + delta*DFDT(j)
+     END DO   
+   END IF ! .NOT.Autonomous
+   CALL KppSolve (JAC, K3)
+    END IF ! Embed3
+ 
+
+
+! ---- The Solution ---
+   DO j = 1,NVAR
+     ynew(j) = y(j) + m1*K1(j) + m2*K2(j)
+   END DO
+ 
+ 
+! ====== Error estimation ========
+ 
+    ERR=0.d0
+    DO i=1,NVAR
+       w = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(ynew(i)))
+    IF ( Embed3 ) THEN
+     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+    ELSE
+         e = 1.d0/(2.d0*gamma)*(K1(i)+K2(i))
+    END IF  ! Embed3 
+       ERR = ERR + ( e/w )**2
+    END DO
+    ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+! ======= Choose the stepsize ===============================
+ 
+    IF ( Embed3 ) THEN
+        elo = 3.0D0 ! estimator local order
+    ELSE
+        elo = 2.0D0
+    END IF    
+    factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+    Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+! ======= Rejected/Accepted Step ============================
+ 
+    IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+      IsReject = .true.
+      H = DMIN1(H/10,Hnew)
+      Nreject  = Nreject+1
+    ELSE
+      DO i=1,NVAR
+         y(i)  = ynew(i)
+      END DO
+      T = Tplus
+      IF (.NOT. IsReject) THEN
+          H = Hnew   ! Do not increase stepsize if previous step was rejected
+      END IF    
+      IsReject = .false.
+      Naccept = Naccept+1
+    END IF
+
+ 
+! ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+! ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+ 
+      END SUBROUTINE Ros2
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)      
+      USE KPP_ROOT_global
+      INTEGER N 
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y, FIX, RCONST, P )
+      TIME = Told
+      END SUBROUTINE FUNC_CHEM
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)     
+      USE KPP_ROOT_global
+      INTEGER N 
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, J )
+      TIME = Told
+      END SUBROUTINE JAC_CHEM                                           
+  
+
+
+
+
+                                                        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_cts_adj.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_cts_adj.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_cts_adj.f	(revision 3477)
@@ -0,0 +1,312 @@
+      SUBROUTINE ros2_cts_adj(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,Lambda,Fix,Rconst,AbsTol,RelTol,
+     +                   Info)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUN = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_SP = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system
+C     Info(2) = 1  for third order embedded formula
+C             = 0  for first order embedded formula 
+C
+C   Note: Stage 3 used to build strongly A-stable order 3 formula for error control
+C            Embed3 = (Info(2).EQ.1)
+C         IF Embed3 = .true. THEN the third order embedded formula is used
+C                     .false. THEN a first order embedded  formula is used
+C
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUN CALLs.
+C     Info(3) = # of JAC_SP CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+
+      INTEGER max_no_steps
+      PARAMETER (max_no_steps = 200)      
+      KPP_REAL  Trajectory(NVAR,max_no_steps)
+      KPP_REAL  StepSize(max_no_steps)
+ 
+      KPP_REAL  K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL  F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL  DFDT(NVAR)(NRAD)
+      KPP_REAL  Fix(NFIX), Rconst(NREACT)
+      KPP_REAL  Hmin,Hmax,Hstart,ghinv,uround      
+      KPP_REAL  y(NVAR), Ynew(NVAR)
+      KPP_REAL  AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL  T, Tnext, H, Hold, Tplus
+      KPP_REAL  ERR, factor, facmax
+      KPP_REAL  Lambda(NVAR), K11(NVAR), JAC1(LU_NONZERO)
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous, Embed3
+      EXTERNAL    FUN, JAC_SP                                                                                                
+
+      KPP_REAL gamma, m1, m2, alpha, beta1, beta2, delta, w, e
+      KPP_REAL ginv
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround  = 1.d-15
+      dround  = dsqrt(uround)
+      H = DMAX1(Hstart,DMAX1(1.d-8, Hmin))
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      
+C     Method Parameters      
+      gamma = 1.d0 + 1.d0/sqrt(2.d0)
+      a21   = - 1.d0/gamma
+      m1 = -3.d0/(2.d0*gamma)
+      m2 = -1.d0/(2.d0*gamma)
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2)
+     &         /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2)
+     &          /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/
+     &          (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gam)/gamma**2/
+     &          (-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+
+      Trajectory(1:NVAR,1) = Ynew(1)
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+       CALL Jac_SP( Y, Fix, Rconst, JAC )
+ 
+       Njac = Njac+1
+       ghinv = -1.0d0/(gamma*H)
+       DO 20 j=1,NVAR
+         JAC(LU_DIAG_V(j)) = JAC(LU_DIAG_V(j)) + ghinv
+ 20    CONTINUE
+       CALL KppDecomp (NVAR, JAC, ier)
+ 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         else
+            PRINT *,'IER <> 0, H=',H
+            STOP
+         END IF
+       END IF
+ 
+       CALL Fun( Y, Fix, Rconst, F1 )
+ 
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = dsign(dround*dmax1( 1.0d-6, dabs(T) ), T)
+         CALL Fun( Y, Fix, Rconst, K2 )
+         nfcn=nfcn+1
+         DO 30 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 30      CONTINUE
+       END IF ! .NOT.Autonomous
+ 
+C ----- STAGE 1 -----
+       DO 40 j = 1,NVAR
+          K1(j) =  F1(j) 
+ 40    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         delta = gamma*H
+         DO 45 j = 1,NVAR
+           K1(j) = K1(j) + delta*DFDT(j)
+ 45      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K1)
+ 
+C ----- STAGE 2  -----
+       DO 50 j = 1,NVAR
+         Ynew(j) = y(j) + a21*K1(j)
+ 50    CONTINUE
+       CALL Fun( Ynew, Fix, Rconst, F1 )
+       nfcn=nfcn+1
+       beta = 2.d0/(gamma*H)
+       delta = -gamma*H
+       DO 55 j = 1,NVAR
+         K2(j) = F1(j) + beta*K1(j) 
+ 55    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 56 j = 1,NVAR
+           K2(j) = K2(j) + delta*DFDT(j)
+ 56      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K2)
+ 
+C ----- STAGE 3  -----
+       IF (Embed3) THEN
+       beta1 = -c31/H
+       beta2 = -c32/H
+       delta = gamma3*H
+       DO 57 j = 1,NVAR
+         K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j) 
+ 57    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 58 j = 1,NVAR
+           K3(j) = K3(j) + delta*DFDT(j)
+ 58      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K3)
+       END IF ! Embed3
+
+
+C ---- The Solution ---
+       DO 120 j = 1,NVAR
+         Ynew(j) = y(j) + m1*K1(j) + m2*K2(j)
+ 120   CONTINUE
+ 
+ 
+C ====== Error estimation ========
+ 
+        ERR=0.d0
+        DO 130 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(Ynew(i)))
+	   IF ( Embed3 ) THEN
+	     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+	   ELSE
+             e = 1.d0/(2.d0*gamma)*(K1(i)+K2(i))
+	   END IF  ! Embed3 
+           ERR = ERR + ( e/w )**2
+ 130    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+	
+C ======= Choose the stepsize ===============================
+ 
+        IF ( Embed3 ) THEN
+            elo = 3.0D0 ! estimator local order
+	ELSE
+	    elo = 2.0D0
+	END IF    
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+        Hold = H
+         
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             y(i)  = Ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize IF previous step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+	  IF (Naccept+1>max_no_steps) THEN
+	    PRINT*,'Error in Adjoint Ros2: more steps than allowed'
+	    STOP
+	  END IF  
+	  Trajectory(1:NVAR,Naccept+1) = Ynew(1:NVAR)
+	  StepSize(Naccept) = Hold
+!	  CALL TRAJISTORE(y,hold)    
+        END IF        
+C ======= END of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject      
+
+      ginv = 1.d0/gamma
+C -- The backwards loop for the CONTINUOUS ADJOINT    
+      DO istep = Naccept,1,-1
+        
+	h = StepSize(istep)
+	y(1:NVAR) = Trajectory(1:NVAR,istep+1)
+	gHinv = -ginv/H  
+
+	CALL Jac_SP(Y, Fix, Rconst, JAC)
+        JAC1(1:LU_NONZERO)=JAC(1:LU_NONZERO)
+        DO j=1,NVAR
+          JAC(lu_diag_v(j)) = JAC(lu_diag_v(j)) + gHinv
+        END DO
+        CALL KppDecomp (NVAR,JAC,ier) 
+ccc equivalent to function evaluation in forward integration  
+ccc is J^T*Lambda in backward integration    
+        CALL JacTR_SP_Vec ( JAC1, Lambda, F1)      
+      
+C ----- STAGE 1 (AUTONOMOUS) -----
+        K11(1:NVAR) =  F1(1:NVAR) 
+        CALL KppSolveTR (JAC,K11,K1) 
+C ----- STAGE 2 (AUTONOMOUS) -----       
+	y(1:NVAR) = Trajectory(1:NVAR,istep)
+        CALL Jac_SP(Y, Fix, Rconst, JAC1)
+        Ynew(1:NVAR) = Lambda(1:NVAR) - ginv*K1(1:NVAR)
+        CALL JacTR_SP_Vec ( JAC1, Ynew, F1) 
+        beta = -2.d0*ghinv
+        K11(1:NVAR) = F1(1:NVAR) + beta*K1(1:NVAR)
+        CALL KppSolveTR (JAC,K11,K2)
+c ---- The solution
+        Lambda(1:NVAR) = Lambda(1:NVAR)+m1*K1(1:NVAR)+m2*K2(1:NVAR)                
+
+      END DO ! istep
+     
+     
+      RETURN
+      END
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_ddm.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros2_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros2_ddm.f	(revision 3477)
@@ -0,0 +1,480 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+      INTEGER NSENSIT
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS2_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS2_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Ros2 with direct-decoupled calculation of sensitivities 
+C
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C
+C  Adrian Sandu, December 2001
+
+ 
+      INTEGER NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR)
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DFDP(NVAR*NSENSIT+1), DFDPDT(NVAR*NSENSIT+1)
+      KPP_REAL DJDP(NVAR*NSENSIT+1)
+      KPP_REAL F1(NVAR), F2(NVAR)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, H, Hold, Tplus, e
+      KPP_REAL ERR, factor, facmax, dround, elo, tau, gam
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous,Embed3
+      EXTERNAL   FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+      LOGICAL    negative
+      KPP_REAL gamma, m1, m2, alpha, beta, delta, theta, w
+      KPP_REAL gamma3, d1, d2, d3, beta1, beta2
+      KPP_REAL c31, c32, c34
+ 
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround = 1.d-15
+      dround = 1.0d-7 ! DSQRT(uround)
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      gamma = 1.d0 + 1.d0/DSQRT(2.0d0)
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2)
+     &         /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2)
+     &          /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/
+     &          (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gamma)/gamma**2/
+     &          (-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+       m1 = -3.d0/(2.d0*gamma)
+       m2 = -1.d0/(2.d0*gamma)
+      
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function, Jacobian, and Hessian Values
+       CALL FUNC_CHEM(NVAR, T, y, F1)
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+                                                                                                                            
+C              Estimate the time derivatives in non-autonomous case 
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d0, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         njac=njac+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 20      CONTINUE
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 40 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 40      CONTINUE
+        END IF ! .not. Autonomous
+ 
+       Njac = Njac+1
+       ghinv = - 1.0d0/(gamma*H)
+       DO 50 j=1,LU_NONZERO
+         AJAC(j) = JAC(j) 
+ 50    CONTINUE
+       DO 60 j=1,NVAR
+         AJAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+ 60    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+ 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            go to 10
+         ELSE
+            print *,'IER <> 0, H=',H
+            stop
+         END IF
+       END IF
+ 
+                                                                                                                            
+
+
+C ----- STAGE 1 -----
+         delta = gamma*H
+         DO 70 j = 1,NVAR
+           K1(j) =  F1(j) 
+ 70      CONTINUE
+         IF (.NOT. Autonomous) THEN	 
+           DO 80 j = 1,NVAR
+             K1(j) =  K1(j) + delta*DFDT(j)
+ 80        CONTINUE
+	 END IF
+         CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+	 DO 120 i=1,NSENSIT
+	    CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	    CALL Hess_Vec ( HESS, K1(1), y(i*NVAR+1), F2 )
+	    DO 90 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + gHinv*F2(j)
+ 90	    CONTINUE	    
+           IF (.NOT. Autonomous) THEN	 
+             DO 100 j = 1,NVAR
+               K1(i*NVAR+j) =  K1(i*NVAR+j) + delta*DFDT(i*NVAR+j)
+ 100          CONTINUE
+	   END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 110 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 110        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+            CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 120	 CONTINUE
+ 
+C ----- STAGE 2   -----
+       alpha = - 1.d0/gamma
+       DO 130 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + alpha*K1(j)
+ 130    CONTINUE
+       CALL FUNC_CHEM(NVAR, T+H, ynew, F1)
+       IF (DDMTYPE.EQ.1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+H, ynew, DFDP)
+       END IF
+       nfcn=nfcn+1
+       beta1 = 2.d0/(gamma*H)
+       delta = -gamma*H
+       DO 140 j = 1,NVAR
+         K2(j) = F1(j) + beta1*K1(j) 
+ 140   CONTINUE
+       IF (.NOT. Autonomous) THEN	 
+          DO 150 j = 1,NVAR
+               K2(j) =  K2(j) + delta*DFDT(j)
+ 150      CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+ 
+       CALL JAC_CHEM(NVAR, T+H, Ynew, JAC)
+       njac=njac+1
+       DO 190 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),F1)
+	  CALL Hess_Vec ( HESS, K2(1), y(i*NVAR+1), F2 )
+          DO 160 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + gHinv*F2(j)
+ 160      CONTINUE	 
+          IF (.NOT. Autonomous) THEN	 
+             DO 170 j = 1,NVAR
+               K2(i*NVAR+j) =  K2(i*NVAR+j) + delta*DFDT(i*NVAR+j)
+ 170         CONTINUE
+	  END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 180 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j)  + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 180        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 190    CONTINUE
+ 
+C ----- STAGE 3  for error control only -----
+       IF (Embed3) THEN
+       beta1 = -c31/H
+       beta2 = -c32/H
+       delta = gamma3*H
+       DO 195 j = 1,NVAR
+         K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j)
+ 195   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         DO 196 j = 1,NVAR
+           K3(j) = K3(j) + delta*DFDT(j)
+ 196     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K3)
+       END IF
+
+C ---- The Solution ---
+       DO 200 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + m1*K1(j) + m2*K2(j)
+ 200   CONTINUE
+ 
+ 
+C ====== Error estimation for concentrations only; this can be easily adapted to
+C                                             estimate the sensitivity error too ========
+ 
+        ERR=0.d0
+        DO 210 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(ynew(i)))
+	   IF (Embed3) THEN
+	     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+	   ELSE
+             e = (1.d0/(2.d0*gamma))*(K1(i)+K2(i))
+	   END IF   
+           ERR = ERR + ( e/w )**2
+ 210    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+        
+	IF (Embed3) THEN
+           elo    = 3.0D0 ! estimator local order
+	ELSE
+	   elo    = 2.0D0
+	END IF   
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 300 i=1,NVAR*(NSENSIT+1)
+             y(i)  = ynew(i)
+ 300      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previous step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+ 
+      RETURN
+      END
+ 
+ 
+  
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y, FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.c	(revision 3477)
@@ -0,0 +1,344 @@
+
+	#define MAX(a,b) ((a) >= (b)) ?(a):(b)
+	#define MIN(b,c) ((b) <  (c)) ?(b):(c)	
+	#define abs(x)   ((x) >=  0 ) ?(x):(-x) 
+	#define dabs(y)  (double)abs(y) 
+	#define DSQRT(d) (double)pow(d,0.5)
+	#define signum(x)((x) >=  0 ) ?(1):(-1)
+
+	void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+
+
+
+    void FUNC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL P[NVAR])
+       {
+	KPP_REAL Told;
+        Told = TIME;
+        TIME = T;
+        Update_SUN();
+        Update_PHOTO();
+        Fun( Y, FIX, RCONST, P );
+        TIME = Told;
+       }/*  function fun ends here  */
+        
+
+    void JAC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL J[LU_NONZERO])
+       { 
+        KPP_REAL Told;
+        Told = TIME;
+        TIME = T;
+        Update_SUN();
+        Update_PHOTO();
+        Jac_SP( Y, FIX, RCONST, J );
+        TIME = Told;
+       }  
+        
+
+      INTEGRATE( KPP_REAL TIN, KPP_REAL TOUT )
+       {
+	
+        /*    TIN - Start Time		*/
+        /*    TOUT - End Time		*/
+   
+	int INFO[5];
+	forfun = &FUNC_CHEM;
+	forjac = &JAC_CHEM;	
+        INFO[0] = Autonomous;
+	ROS3(NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,VAR,ATOL,RTOL,INFO
+        ,forfun,forjac);
+       }	/* function integrate ends here  */
+     
+
+      
+int ROS3(int N,KPP_REAL T,KPP_REAL Tnext,KPP_REAL Hmin,KPP_REAL Hmax,
+KPP_REAL Hstart,KPP_REAL y[NVAR],KPP_REAL AbsTol[NVAR],KPP_REAL RelTol[NVAR],
+int INFO[5],void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) ,
+void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) )
+  {
+    
+/*  
+
+       L-stable Rosenbrock 3(2), with 
+     strongly A-stable embedded formula for error control.  
+
+     All the arguments aggree with the KPP syntax.
+
+  INPUT ARGUMENTS:
+     y = Vector of (NVAR) concentrations, contains the
+         initial values on input
+     [T, Tnext] = the integration interval
+     Hmin, Hmax = lower and upper bounds for the selected step-size.
+          Note that for Step = Hmin the current computed
+          solution is unconditionally accepted by the error
+          control mechanism.
+     AbsTol, RelTol = (NVAR) dimensional vectors of 
+          componentwise absolute and relative tolerances.
+     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+          See the header below.
+     JAC_CHEM = name of routine that computes the Jacobian, in
+          sparse format. KPP syntax. See the header below.
+     Info(1) = 1  for  autonomous   system
+             = 0  for nonautonomous system 
+
+  OUTPUT ARGUMENTS:
+     y = the values of concentrations at Tend.
+     T = equals Tend on output.
+     Info(2) = # of FUNC_CHEM calls.
+     Info(3) = # of JAC_CHEM calls.
+     Info(4) = # of accepted steps.
+     Info(5) = # of rejected steps.
+    
+     Adrian Sandu, April 1996
+     The Center for Global and Regional Environmental Research
+*/
+
+      KPP_REAL K1[NVAR], K2[NVAR], K3[NVAR];
+      KPP_REAL F1[NVAR], JAC[LU_NONZERO];
+      KPP_REAL ghinv,uround,dround,c43,x1,x2,x3,ytol;
+      KPP_REAL gam,c21,c31,c32,b1,b2,b3,d1,d2,d3,a21,a31,a32,alpha2,alpha3,
+      		   g1,g2,g3;	 	
+      KPP_REAL ynew[NVAR];
+      KPP_REAL H, Hold, Tplus,tau;
+      KPP_REAL ERR, factor, facmax;
+      int n,nfcn,njac,Naccept,Nreject,i,j,ier;
+      char IsReject,Autonomous;
+
+
+/*     Initialization of counters, etc.		*/
+      Autonomous = (INFO[0] == 1);         
+      uround = (double)1.e-15;
+      dround = DSQRT(uround);
+      H = MAX( (double)1.e-8, Hstart);
+      Tplus = T;
+      IsReject = 0;
+      Naccept  = 0;
+      Nreject  = 0;
+      nfcn     = 0;
+      njac     = 0;
+      gam  =   (double)  (.43586652150845899941601945119356e+00);
+      c21  =   (double) -(.10156171083877702091975600115545e+01);
+      c31  =   (double)  (.40759956452537699824805835358067e+01);
+      c32  =   (double)  (.92076794298330791242156818474003e+01);
+       b1  =   (double)  (.10000000000000000000000000000000e+01);
+       b2  =   (double)  (.61697947043828245592553615689730e+01);
+       b3  =   (double) -(.42772256543218573326238373806514e+00);
+       d1  =   (double)  (.50000000000000000000000000000000e+00);
+       d2  =   (double) -(.29079558716805469821718236208017e+01);
+       d3  =   (double)  (.22354069897811569627360909276199e+00);
+       a21 =   (double) 1.e0;
+       a31 =   (double) 1.e0;
+       a32 =   (double) 0.e0;
+       alpha2 = gam;
+       alpha3 = gam;
+       g1  =   (double)  (.43586652150845899941601945119356e+00);
+       g2  =   (double)  (.24291996454816804366592249683314e+00);
+       g3  =   (double)  (.21851380027664058511513169485832e+01);
+
+
+/* === Starting the time loop ===      */
+
+while( T < Tnext )
+ {
+  ten :  
+       Tplus = T + H;
+       
+       if ( Tplus > Tnext ) 
+       {
+          H = Tnext - T;
+          Tplus = Tnext;
+       }
+
+       (*forjac)(NVAR, T, y, JAC);
+       
+       njac = njac+1;
+       ghinv = (double)-1.0e0/(gam*H);
+
+       for(j=0;j<LU_NONZERO;j++)
+           JAC[j] = -JAC[j];
+       
+     
+
+       for(j=0;j<NVAR;j++)
+           JAC[LU_DIAG[j]] = JAC[LU_DIAG[j]] - ghinv;
+	 	
+	
+	
+       ier = KppDecomp (JAC);
+ 
+       if ( ier != 0)
+       {
+        if( H > Hmin ) 
+  	{
+   	 H = (double)5.0e-1*H; 
+   	 goto ten;	   
+  	}
+  	else
+  	 {
+	  printf("IER <> 0 , H = %d", H);
+	 }  
+       }/* main ier if ends*/	
+		
+
+       (*forfun)(NVAR, T, y, F1);
+       
+
+/* ====== NONAUTONOMOUS CASE =============== */
+       if( Autonomous == 0 ) 
+       {
+         tau =(double) (dround*MAX( (double)1.0e-6, dabs(T) ) * signum(T) );
+
+         (*forfun)(NVAR, T+tau, y, K2);
+	 
+         nfcn=nfcn+1;
+         
+	 for(j=0;j<NVAR;j++)
+	     K3[j] = ( K2[j]-F1[j] )/tau;
+	   
+ 
+
+/* ----- STAGE 1 (NONAUTONOMOUS) ----- */
+         x1 = (double)g1*H;
+	 
+         for(j=0;j<NVAR;j++)
+	     K1[j] =  F1[j] + x1*K3[j];
+	    
+         KppSolve (JAC, K1);
+      
+/* ----- STAGE 2 (NONAUTONOMOUS) -----    */
+        for(j = 0;j<NVAR;j++)
+            ynew[j] = y[j] + K1[j]; 
+        
+       (*forfun)(NVAR, T+gam*H, ynew, F1);
+       nfcn=nfcn+1;
+       x1 = (double)(c21/H);
+       x2 = (double)(g2*H);
+       for(j = 0;j<NVAR;j++)
+           K2[j] = F1[j] + x1*K1[j] + x2*K3[j];
+	
+       KppSolve (JAC, K2);
+       
+/* ----- STAGE 3  (NONAUTONOMOUS) -----        */
+       x1 = (double)(c31/H);
+       x2 = (double)(c32/H);
+       x3 = (double)(g3*H);
+       for(j=0;j<NVAR;j++)
+           K3[j] = F1[j] + x1*K1[j] + x2*K2[j] + x3*K3[j];
+       
+       KppSolve (JAC, K3);
+      }/* "if" nonautonomous case ends here */	
+
+
+
+/* ====== AUTONOMOUS CASE ===============  */
+
+       else
+       {
+       
+/* ----- STAGE 1 (AUTONOMOUS) -----   */
+
+         for(j = 0;j < NVAR;j++)
+	     K1[j] =  F1[j]; 
+	  
+	 KppSolve (JAC, K1);
+  
+      
+/* ----- STAGE 2 (AUTONOMOUS) ----- */
+       for(j = 0;j < NVAR;j++)
+           ynew[j] = y[j] + K1[j];
+	
+	
+       (*forfun)(NVAR, T + gam*H, ynew, F1);
+       nfcn=nfcn+1;
+         x1 = (double)c21/H;
+         for(j = 0;j < NVAR;j++)
+	     K2[j] = F1[j] + x1*K1[j]; 
+         
+         KppSolve (JAC, K2);
+       
+/* ----- STAGE 3  (AUTONOMOUS) -----   */
+
+       x1 = (double)(c31/H);
+       x2 = (double)(c32/H);
+       for(j = 0;j < NVAR;j++)
+           K3[j] = F1[j] + x1*K1[j] + x2*K2[j];
+       
+       KppSolve (JAC, K3);
+
+       }/*  Autonomousous case ends here  */
+       
+       
+    /*   ---- The Solution ---      */
+
+        for(j = 0;j < NVAR;j++)
+	    ynew[j] = y[j] + b1*K1[j] + b2*K2[j] + b3*K3[j]; 
+        
+
+
+/* ====== Error estimation ========   */
+
+        ERR=(double)0.e0;
+        for(i=0;i<NVAR;i++)
+	{
+           ytol = AbsTol[i] + RelTol[i]*dabs(ynew[i]);
+           ERR = (double)(ERR+ pow( (double) ( (d1*K1[i]+d2*K2[i]+d3*K3[i])/ytol ) , 2 ));
+        }      
+        ERR = (double)MAX( uround, DSQRT( ERR/NVAR ) );
+
+/*
+this is the library i am linkin it to 
+[sdmehra@herbert small_strato]$ ldd small_strato
+        libm.so.6 => /lib/libm.so.6 (0x40015000)
+        libc.so.6 => /lib/libc.so.6 (0x40032000)
+       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)                                                             
+*/
+
+/* ======= Choose the stepsize ===============================   */
+
+        factor = 0.9/pow( ERR , (1.e0/3.e0) );
+        if(IsReject == 1)
+           facmax = (double)1.0;
+	    
+        else
+           facmax = (double)10.0;
+	 
+	    
+        factor = (double)MAX( 1.0e-1, MIN(factor,facmax) );
+        Hold = H;
+        H = (double)MIN( Hmax, MAX(Hmin,factor*H) );
+	    
+
+/* ======= Rejected/Accepted Step ============================   */
+
+        if ( (ERR > 1) && (Hold > Hmin) ) 
+	{
+          IsReject = 1;
+          Nreject  = Nreject+1;
+        }
+	else
+        {
+	  IsReject = 0;
+         
+	 for(i = 0;i < NVAR;i++)
+	     y[i]  = ynew[i];
+         	     
+          T = Tplus;     
+          Naccept = Naccept+1;
+
+	}/*   else should end here */
+        
+
+/* ======= End of the time loop ===============================  */
+  
+   } /*      while loop (T < Tnext) ends here    */
+     
+      
+/* ======= Output Information =================================   */
+      INFO[1] = nfcn;
+      INFO[2] = njac;
+      INFO[3] = Naccept;
+      INFO[4] = Nreject;
+      
+    } /* function rodas ends here   */     
+
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.def	(revision 3477)
@@ -0,0 +1,46 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros3
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER Autonomous
+      DOUBLE PRECISION STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+  int Autonomous;
+  double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=1e-4;
+  STEPMAX=3600.;
+  Autonomous = 0;
+  STEPSTART=STEPMIN;
+#ENDINLINE
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3.f	(revision 3477)
@@ -0,0 +1,304 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+
+        CALL ROS3(NVAR,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+
+      
+      SUBROUTINE ROS3(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+
+C       L-stable Rosenbrock 3(2), with 
+C     strongly A-stable embedded formula for error control.  
+C
+C     All the arguments aggree with the KPP syntax.
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of 
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system 
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals Tend on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C    
+C     Adrian Sandu, April 1996
+C     The Center for Global and Regional Environmental Research
+
+      KPP_REAL K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL y(NVAR), ynew(NVAR)
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, elo
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL gam, c21, c31, c32, b1, b2, b3
+      KPP_REAL d1, d2, d3, a21, a31, a32
+      KPP_REAL alpha2, alpha3, g1, g2, g3
+      KPP_REAL tau, x1, x2, x3, dround, ytol
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+      
+      gam=   .43586652150845899941601945119356d+00
+      c21=  -.10156171083877702091975600115545d+01
+      c31=   .40759956452537699824805835358067d+01
+      c32=   .92076794298330791242156818474003d+01
+       b1=   .10000000000000000000000000000000d+01
+       b2=   .61697947043828245592553615689730d+01
+       b3=  -.42772256543218573326238373806514d+00
+       d1=   .50000000000000000000000000000000d+00
+       d2=  -.29079558716805469821718236208017d+01
+       d3=   .22354069897811569627360909276199d+00
+       a21 = 1.d0
+       a31 = 1.d0
+       a32 = 0.d0
+       alpha2 = gam
+       alpha3 = gam
+       g1=   .43586652150845899941601945119356d+00
+       g2=   .24291996454816804366592249683314d+00
+       g3=   .21851380027664058511513169485832d+01
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+
+C === Starting the time loop ===      
+ 10    continue  
+ 
+       Tplus = T + H
+       if ( Tplus .gt. Tnext ) then
+          H = Tnext - T
+          Tplus = Tnext
+       end if
+
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+       gHinv = -1.0d0/(gam*H)
+       do 15 j=1,LU_NONZERO
+         JAC(j) = -JAC(j) 
+ 15    continue
+       do 20 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) - gHinv
+ 20    continue
+       CALL KppDecomp (JAC, ier)
+
+       if (ier.ne.0) then
+         if ( H.gt.Hmin) then
+            H = 5.0d-1*H
+            go to 10
+         else
+            print *,'IER <> 0, H=',H
+            stop
+         end if      
+       end if  
+       
+       CALL FUNC_CHEM(NVAR, T, y, F1)
+
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         do 30 j = 1,NVAR
+           K3(j) = ( K2(j)-F1(j) )/tau
+ 30      continue
+ 
+C ----- STAGE 1 (NONAUTONOMOUS) -----
+         x1 = g1*H
+         do 35 j = 1,NVAR
+           K1(j) =  F1(j) + x1*K3(j)
+ 35      continue
+         CALL KppSolve (JAC, K1)
+      
+C ----- STAGE 2 (NONAUTONOMOUS) -----
+       do 40 j = 1,NVAR
+         ynew(j) = y(j) + K1(j) 
+ 40    continue
+       CALL FUNC_CHEM(NVAR, T+gam*H, ynew, F1)
+       nfcn=nfcn+1
+       x1 = c21/H
+       x2 = g2*H
+       do 45 j = 1,NVAR
+         K2(j) = F1(j) + x1*K1(j) + x2*K3(j)
+ 45    continue
+       CALL KppSolve (JAC, K2)
+       
+C ----- STAGE 3  (NONAUTONOMOUS) -----
+       x1 = c31/H
+       x2 = c32/H
+       x3 = g3*H
+       do 50 j = 1,NVAR
+         K3(j) = F1(j) + x1*K1(j) + x2*K2(j) + x3*K3(j)
+ 50    continue
+       CALL KppSolve (JAC, K3)
+
+
+C ====== AUTONOMOUS CASE ===============
+       ELSE
+
+C ----- STAGE 1 (AUTONOMOUS) -----
+         do 60 j = 1,NVAR
+           K1(j) =  F1(j) 
+ 60      continue
+         CALL KppSolve (JAC, K1)
+      
+C ----- STAGE 2 (AUTONOMOUS) -----
+       do 65 j = 1,NVAR
+         ynew(j) = y(j) + K1(j) 
+ 65    continue
+       CALL FUNC_CHEM(NVAR, T + gam*H, ynew, F1)
+       nfcn=nfcn+1
+         x1 = c21/H
+         do 70 j = 1,NVAR
+           K2(j) = F1(j) + x1*K1(j) 
+ 70      continue
+         CALL KppSolve (JAC, K2)
+       
+C ----- STAGE 3  (AUTONOMOUS) -----
+       x1 = c31/H
+       x2 = c32/H
+       do 90 j = 1,NVAR
+         K3(j) = F1(j) + x1*K1(j) + x2*K2(j)
+ 90    continue
+       CALL KppSolve (JAC, K3)
+
+       END  IF ! Autonomousous
+
+C ---- The Solution ---
+
+       do 120 j = 1,NVAR
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) 
+ 120   continue
+
+
+C ====== Error estimation ========
+
+        ERR=0.d0
+        do 130 i=1,NVAR
+           ytol = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(ynew(i)))
+           ERR=ERR+((d1*K1(i)+d2*K2(i)+d3*K3(i))/ytol)**2
+ 130    continue      
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             y(i)  = ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+
+
+C ======= End of the time loop ===============================
+      if ( T .lt. Tnext ) go to 10
+     
+      
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+      
+      RETURN 
+      END        
+
+  
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3_ddm.def	(revision 3477)
@@ -0,0 +1,51 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros3_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros3_ddm.f	(revision 3477)
@@ -0,0 +1,503 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+
+        CALL ROS3_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+
+      
+      SUBROUTINE ROS3_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+
+C       L-stable Rosenbrock 3(2), with 
+C     strongly A-stable embedded formula for error control.  
+C
+C Direct decoupled computation of sensitivities.
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C     All the arguments aggree with the KPP syntax.
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of 
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system 
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C    
+C     Adrian Sandu, April 1996
+C     The Center for Global and Regional Environmental Research
+      INTEGER     NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR*(NSENSIT+1))
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DFDP(NVAR*NSENSIT), DFDPDT(NVAR*NSENSIT)
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL Fv(NVAR), Hv(NVAR)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, Hnew, elo
+      KPP_REAL ERR, factor, facmax
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM, HESS_CHEM
+      
+      KPP_REAL gamma, c21, c31,c32,b1,b2,b3,d1,d2,d3,a21,a31,a32
+      KPP_REAL alpha2, alpha3, g1, g2, g3, x1, x2, x3, ytol
+      KPP_REAL dround, tau
+      
+      gamma= .43586652150845899941601945119356d+00
+      c21=  -.10156171083877702091975600115545d+01
+      c31=   .40759956452537699824805835358067d+01
+      c32=   .92076794298330791242156818474003d+01
+       b1=   .10000000000000000000000000000000d+01
+       b2=   .61697947043828245592553615689730d+01
+       b3=  -.42772256543218573326238373806514d+00
+       d1=   .50000000000000000000000000000000d+00
+       d2=  -.29079558716805469821718236208017d+01
+       d3=   .22354069897811569627360909276199d+00
+       a21 = 1.d0
+       a31 = 1.d0
+       a32 = 0.d0
+       alpha2 = gamma
+       g1=   .43586652150845899941601945119356d+00
+       g2=   .24291996454816804366592249683314d+00
+       g3=   .21851380027664058511513169485832d+01
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+
+
+C === Starting the time loop ===      
+ 10    CONTINUE  
+
+C ====== Initial Function, Jacobian, and Hessian values ===============
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       Nfcn = Nfcn + 1
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac + 1
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+       
+C ====== Time derivatives for NONAutonomousous CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-Fv(j) )/tau
+ 20      CONTINUE
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 40 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 40      CONTINUE
+       END IF
+ 
+       
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) then
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+
+       gHinv = 1.0d0/(gamma*H)
+       DO 50 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j) 
+ 50    CONTINUE
+       DO 60 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + gHinv
+ 60    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+
+       IF (ier.NE.0) THEN
+         IF ( H.GT.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'IER <> 0, H=',H
+            STOP
+         END IF      
+       END IF  
+       
+       Autonomous = .true.
+       
+C ------------------------------- STAGE 1 --------------------------------------
+       DO 70 j = 1,NVAR
+           K1(j) =  Fv(j) 
+ 70    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         x1 = gamma*H
+         DO 80 j = 1,NVAR
+            K1(j) = K1(j) + x1*DFDT(j)
+ 80     CONTINUE       
+       END IF 
+       CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 110 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K1(1), Hv )
+	  DO 90 j=1,NVAR
+	    K1(i*NVAR+j) = K1(i*NVAR+j) + Hv(j)
+ 90	  CONTINUE	    
+          IF (.NOT. Autonomous) THEN
+	    DO 100 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + x1*DFDT(i*NVAR+j)
+ 100        CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 44 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 44        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 110   CONTINUE
+      
+C ------------------------------- STAGE 2 --------------------------------------
+       DO 120 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a21*K1(j) 
+ 120   CONTINUE
+       CALL FUNC_CHEM(NVAR, T + alpha2*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha3*H, ynew, DFDP)
+       END IF	  
+       nfcn=nfcn+1
+       x1 = c21/H
+       DO 130 j = 1,NVAR
+           K2(j) = Fv(j) + x1*K1(j) 
+ 130   CONTINUE
+       IF (.NOT.Autonomous) THEN
+         x2 = g2*H
+         DO 140 j = 1,NVAR
+            K2(j) = K2(j) + x2*DFDT(j)
+ 140     CONTINUE       
+       END IF 
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+             
+       CALL JAC_CHEM(NVAR, T+alpha2*H, ynew, JAC)
+       njac=njac+1
+       DO 170 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K2(1), Hv )
+          DO 150 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + x1*K1(i*NVAR+j) 
+     &                          + Hv(j)
+ 150      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 160 j=1,NVAR
+	        K2(i*NVAR+j) = K2(i*NVAR+j) + x2*DFDT(i*NVAR+j)
+ 160         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 165 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 165        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 170   CONTINUE
+ 
+C ------------------------------- STAGE 3  --------------------------------------
+       x1 = c31/H
+       x2 = c32/H
+       DO 180 j = 1,NVAR
+         K3(j) = Fv(j) + x1*K1(j) + x2*K2(j)
+ 180   CONTINUE
+       IF (.NOT.Autonomous) THEN
+         x3 = g3*H
+         DO 190 j = 1,NVAR
+            K3(j) = K3(j) + x3*DFDT(j)
+ 190     CONTINUE       
+       END IF 
+       CALL KppSolve (AJAC, K3)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K3(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       DO 220 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K3(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K3(1), Hv )
+          DO 200 j = 1,NVAR
+	     K3(i*NVAR+j) = K3(i*NVAR+j) +x1*K1(i*NVAR+j) 
+     &                       + x2*K2(i*NVAR+j) + Hv(j)
+ 200      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 210 j=1,NVAR
+	        K3(i*NVAR+j) = K3(i*NVAR+j) + x3*DFDT(i*NVAR+j)
+ 210         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+             DO 215 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 215        CONTINUE	  
+	  END IF	 
+C               --- End of derivative w.r.t. parameters
+          CALL KppSolve (AJAC, K3(i*NVAR+1))
+ 220   CONTINUE
+
+C ------------------------------ The Solution ---
+
+       DO 230 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) 
+ 230   CONTINUE
+
+
+C ====== Error estimation ========
+
+        ERR=0.d0
+        DO 240 i=1,NVAR
+           ytol = AbsTol(i) + RelTol(i)*DABS(ynew(i))
+           ERR=ERR+((d1*K1(i)+d2*K2(i)+d3*K3(i))/ytol)**2
+ 240    CONTINUE      
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1 
+	  GO TO 10
+        ELSE
+          DO 250 j=1,NVAR*(NSENSIT+1)
+             y(j)  = ynew(j)
+ 250      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize IF previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+
+
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+     
+      
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+      
+      RETURN 
+      END        
+
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y,  FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4.def	(revision 3477)
@@ -0,0 +1,63 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros4
+
+#INLINE F_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
+
+#INLINE MATLAB_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4.f	(revision 3477)
@@ -0,0 +1,334 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS4(NVAR,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS4(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Four Stages, Fourth Order L-stable Rosenbrock Method, 
+C     with embedded L-stable, third order method for error control
+C     Simplified version of E. Hairer's atmros4; the coefficients are slightly
+C     different
+C
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C     Hstart = The last accepted stepsize
+C 
+C    Adrian Sandu, December 2001
+C 
+      KPP_REAL K1(NVAR), K2(NVAR), K3(NVAR), K4(NVAR)
+      KPP_REAL F1(NVAR)
+      KPP_REAL DFDT(NVAR)
+      KPP_REAL JAC(LU_NONZERO)
+      KPP_REAL Hmin,Hmax,Hstart
+      KPP_REAL y(NVAR), ynew(NVAR)
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, H, Hnew, Tplus
+      KPP_REAL elo,ghinv,uround
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL w, e, dround, tau
+      KPP_REAL hgam1, hgam2, hgam3, hgam4
+      KPP_REAL hc21, hc31, hc32, hc41, hc42, hc43
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM                                                                                                
+
+
+C   The method coefficients
+      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+      PARAMETER ( gamma  =  0.5728200000000000D+00 )
+      PARAMETER ( gamma2 = -0.1769193891319233D+01 ) 
+      PARAMETER ( gamma3 =  0.7592633437920482D+00 ) 
+      PARAMETER ( gamma4 = -0.1049021087100450D+00 ) 
+      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+      PARAMETER (  a21 = 0.2000000000000000D+01  )   
+      PARAMETER (  a31 = 0.1867943637803922D+01  )   
+      PARAMETER (  a32 = 0.2344449711399156D+00  )   
+      DOUBLE PRECISION alpha2, alpha3
+      PARAMETER (  alpha2  = 0.1145640000000000D+01  )   
+      PARAMETER (  alpha3  = 0.6552168638155900D+00  )   
+      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+      PARAMETER (  c21  = -0.7137615036412310D+01  ) 
+      PARAMETER (  c31  =  0.2580708087951457D+01  ) 
+      PARAMETER (  c32  =  0.6515950076447975D+00  ) 
+      PARAMETER (  c41  = -0.2137148994382534D+01  ) 
+      PARAMETER (  c42  = -0.3214669691237626D+00  ) 
+      PARAMETER (  c43  = -0.6949742501781779D+00  ) 
+      DOUBLE PRECISION b1, b2, b3, b4
+      PARAMETER (  b1 = 0.2255570073418735D+01  ) 
+      PARAMETER (  b2 = 0.2870493262186792D+00  ) 
+      PARAMETER (  b3 = 0.4353179431840180D+00  ) 
+      PARAMETER (  b4 = 0.1093502252409163D+01 )  
+      DOUBLE PRECISION d1, d2, d3, d4
+      PARAMETER (  d1 = -0.2815431932141155D+00  ) 
+      PARAMETER (  d2 = -0.7276199124938920D-01  ) 
+      PARAMETER (  d3 = -0.1082196201495311D+00  ) 
+      PARAMETER (  d4 = -0.1093502252409163D+01  )  
+ 
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+  
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function and Jacobian values                                                                                                                            
+       CALL FUNC_CHEM( T, y, F1 )
+       CALL JAC_CHEM( T, y, JAC )
+ 
+C              The time derivative for non-Autonomous case                                                                                                                            
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM( T+tau, y, K2 )
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 20      CONTINUE
+       END IF
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       Njac = Njac+1
+       ghinv = 1.0d0/(gamma*H)
+       DO 30 j=1,LU_NONZERO
+         JAC(j) = -JAC(j)
+ 30    CONTINUE
+       DO 40 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+ 40    CONTINUE
+       CALL KppDecomp (JAC, ier)
+C 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'ROS4: Singular factorization at T=',T,'; H=',H
+            STOP
+         END IF
+       END IF
+                                                                                                                            
+ 
+C ------------ STAGE 1-------------------------
+       DO 50 j = 1,NVAR
+         K1(j) =  F1(j)
+ 50    CONTINUE
+       IF (.NOT. Autonomous) THEN
+          hgam1 = H*gamma
+	  DO 60 j=1,NVAR
+	    K1(j) = K1(j) + hgam1*DFDT(j)	    
+ 60	  CONTINUE
+       END IF
+       CALL KppSolve (JAC, K1)
+ 
+C ----------- STAGE 2 -------------------------
+       DO 70 j = 1,NVAR
+         ynew(j) = y(j) + a21*K1(j)
+ 70    CONTINUE
+       CALL FUNC_CHEM( T+alpha2*H, ynew, F1)
+       nfcn=nfcn+1
+       hc21 = c21/H
+       DO 80 j = 1,NVAR
+         K2(j) = F1(j) + hc21*K1(j)
+ 80    CONTINUE
+       IF (.NOT. Autonomous) THEN
+         hgam2 = H*gamma2
+	 DO 90 j=1,NVAR
+	    K2(j) = K2(j) + hgam2*DFDT(j)	    
+ 90	 CONTINUE
+       END IF
+       CALL KppSolve (JAC, K2)
+ 
+ 
+C ------------ STAGE 3 -------------------------
+       DO 100 j = 1,NVAR
+         ynew(j) = y(j) + a31*K1(j) + a32*K2(j)
+ 100   CONTINUE
+       CALL FUNC_CHEM( T+alpha3*H, ynew, F1)
+       nfcn=nfcn+1
+       hc31 = c31/H
+       hc32 = c32/H
+       DO 110 j = 1,NVAR
+         K3(j) = F1(j) + hc31*K1(j) + hc32*K2(j)
+ 110   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         hgam3 = H*gamma3
+	 DO 120 j=1,NVAR
+	    K3(j) = K3(j) + hgam3*DFDT(j)	    
+ 120     CONTINUE
+       END IF
+       CALL KppSolve (JAC, K3)
+ 
+C ------------ STAGE 4 -------------------------
+C              Note: uses the same function value as stage 3
+       hc41 = c41/H
+       hc42 = c42/H
+       hc43 = c43/H
+       DO 140 j = 1,NVAR
+         K4(j) = F1(j) + hc41*K1(j) + hc42*K2(j) + hc43*K3(j)
+ 140   CONTINUE
+       IF (.NOT. Autonomous) THEN
+          hgam4 = H*gamma4
+	  DO 150 j=1,NVAR
+	    K4(j) = K4(j) + hgam4*DFDT(j)
+ 150      CONTINUE
+       END IF
+       CALL KppSolve (JAC, K4)
+ 
+
+
+C ---- The Solution ---
+       DO 160 j = 1,NVAR
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) + b4*K4(j)
+ 160   CONTINUE
+ 
+ 
+C ====== Error estimation ========
+ 
+        ERR=0.d0
+        DO 170 j = 1,NVAR
+           w = AbsTol(j) + RelTol(j)*DMAX1(DABS(y(j)),DABS(ynew(j)))
+	   e = d1*K1(j) + d2*K2(j) + d3*K3(j) + d4*K4(j)
+           ERR = ERR + ( e/w )**2
+ 170    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+     
+        elo    = 4.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 180 i=1,NVAR
+             y(i)  = ynew(i)
+ 180      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+      SUBROUTINE FUNC_CHEM( T, Y, P )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM( T, Y, J )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4_ddm.def	(revision 3477)
@@ -0,0 +1,58 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros4_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER Autonomous
+      DOUBLE PRECISION STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
+
+#INLINE MATLAB_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/ros4_ddm.f	(revision 3477)
@@ -0,0 +1,615 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS4_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS4_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Four Stages, Fourth Order L-stable Rosenbrock Method, 
+C     with embedded L-stable, third order method for error control
+C     Simplified version of E. Hairer's atmros4; the coefficients are slightly different
+C
+C Direct decoupled computation of sensitivities.
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations and sensitivities at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C 
+C    Adrian Sandu, December 2001
+C 
+
+
+      INTEGER NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR*(NSENSIT+1))
+      KPP_REAL K4(NVAR*(NSENSIT+1))
+      KPP_REAL Fv(NVAR), Hv(NVAR)
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DFDP(NVAR*NSENSIT), DFDPDT(NVAR*NSENSIT)
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, Hnew, elo
+      KPP_REAL ERR, factor, facmax, dround, tau
+      KPP_REAL w, e, beta1, beta2, beta3, beta4
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL    FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+
+C   The method coefficients
+C      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+C      PARAMETER ( gamma = 0.57281606D0  )
+C      PARAMETER ( gamma2 = -1.769177067112013949170520D0  ) 
+C      PARAMETER ( gamma3 =  0.759293964293209853670967D0  ) 
+C      PARAMETER ( gamma4 = -0.104894621490955803206743D0  ) 
+C      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+C      PARAMETER (  a21 = 2.00000000000000000000000D0  )   
+C      PARAMETER (  a31 = 1.86794814949823713234476D0  )   
+C      PARAMETER (  a32 = 0.23444556851723885002322D0  )   
+C      DOUBLE PRECISION alpha2, alpha3, alpha4 
+C      PARAMETER (  alpha2  = 1.145632120D0  )   
+C      PARAMETER (  alpha3  = 0.655214975973133829477748D0  )   
+C      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+C      PARAMETER (  c21  = -7.137649943349979830369260D0  ) 
+C      PARAMETER (  c31  =  2.580923666509657714488050D0  ) 
+C      PARAMETER (  c32  =  0.651629887302032023387417D0  ) 
+C      PARAMETER (  c41  = -2.137115266506619116806370D0  ) 
+C      PARAMETER (  c42  = -0.321469531339951070769241D0  ) 
+C      PARAMETER (  c43  = -0.694966049282445225157329D0  ) 
+C      DOUBLE PRECISION m1, m2, m3, m4, mhat1, mhat2, mhat3, mhat4
+C      PARAMETER (  m1 = 2.255566228604565243728840D0  ) 
+C      PARAMETER (  m2 = 0.287055063194157607662630D0  ) 
+C      PARAMETER (  m3 = 0.435311963379983213402707D0  ) 
+C      PARAMETER (  m4 = 1.093507656403247803214820D0  )  
+C      PARAMETER (  mhat1 = 2.068399160527583734258670D0  ) 
+C      PARAMETER (  mhat2 = 0.238681352067532797956493D0  ) 
+C      PARAMETER (  mhat3 = 0.363373345435391708261747D0  ) 
+C      PARAMETER (  mhat4 = 0.366557127936155144309163D0  ) 
+C      DOUBLE PRECISION e1, e2, e3, e4
+c      PARAMETER (  e1 = 1.8716706807698191283861888D-01  ) 
+c      PARAMETER (  e2 = 4.8373711126624835410225955D-02  ) 
+c      PARAMETER (  e3 = 7.1938617944591554120847832D-02  ) 
+c      PARAMETER (  e4 = 7.2695052846709262706070831D-01 )  
+C      PARAMETER (  e1 = -0.2815431932141155D+00  ) 
+C      PARAMETER (  e2 = -0.7276199124938920D-01  ) 
+C      PARAMETER (  e3 = -0.1082196201495311D+00  ) 
+C      PARAMETER (  e4 = -0.1093502252409163D+01  )  
+C   The method coefficients
+      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+      PARAMETER ( gamma  =  0.5728200000000000D+00 )
+      PARAMETER ( gamma2 = -0.1769193891319233D+01 ) 
+      PARAMETER ( gamma3 =  0.7592633437920482D+00 ) 
+      PARAMETER ( gamma4 = -0.1049021087100450D+00 ) 
+      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+      PARAMETER (  a21 = 0.2000000000000000D+01  )   
+      PARAMETER (  a31 = 0.1867943637803922D+01  )   
+      PARAMETER (  a32 = 0.2344449711399156D+00  )   
+      DOUBLE PRECISION alpha2, alpha3
+      PARAMETER (  alpha2  = 0.1145640000000000D+01  )   
+      PARAMETER (  alpha3  = 0.6552168638155900D+00  )   
+      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+      PARAMETER (  c21  = -0.7137615036412310D+01  ) 
+      PARAMETER (  c31  =  0.2580708087951457D+01  ) 
+      PARAMETER (  c32  =  0.6515950076447975D+00  ) 
+      PARAMETER (  c41  = -0.2137148994382534D+01  ) 
+      PARAMETER (  c42  = -0.3214669691237626D+00  ) 
+      PARAMETER (  c43  = -0.6949742501781779D+00  ) 
+      DOUBLE PRECISION b1, b2, b3, b4
+      PARAMETER (  b1 = 0.2255570073418735D+01  ) 
+      PARAMETER (  b2 = 0.2870493262186792D+00  ) 
+      PARAMETER (  b3 = 0.4353179431840180D+00  ) 
+      PARAMETER (  b4 = 0.1093502252409163D+01 )  
+      DOUBLE PRECISION d1, d2, d3, d4
+      PARAMETER (  d1 = -0.2815431932141155D+00  ) 
+      PARAMETER (  d2 = -0.7276199124938920D-01  ) 
+      PARAMETER (  d3 = -0.1082196201495311D+00  ) 
+      PARAMETER (  d4 = -0.1093502252409163D+01  )  
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function, Jacobian, and Hessian Values
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+ 
+C              The time derivatives for non-Autonomous case                                                                                                                            
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d0, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-Fv(j) )/tau
+ 20      CONTINUE
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 35 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 35      CONTINUE
+       END IF
+ 
+ 11    CONTINUE  ! From here we restart after a rejected step
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       Njac = Njac+1
+       ghinv = 1.0d0/(gamma*H)
+       DO 40 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j)
+ 40    CONTINUE
+       DO 50 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + ghinv
+ 50    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+C 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'ROS4: Singular factorization at T=',T,'; H=',H
+            STOP
+         END IF
+       END IF
+                                                                                                                            
+C ------------ STAGE 1-------------------------
+       DO 60 j = 1,NVAR
+         K1(j) =  Fv(j)
+ 60    CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta1 = H*gamma
+	  DO 70 j=1,NVAR
+	    K1(j) = K1(j) + beta1*DFDT(j)	    
+ 70	  CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 100 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K1(1), Hv )
+	  DO 80 j=1,NVAR
+	    K1(i*NVAR+j) = K1(i*NVAR+j) + Hv(j)
+ 80	  CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	    DO 90 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + beta1*DFDT(i*NVAR+j)
+ 90         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 95 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 95        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 100   CONTINUE
+ 
+C ----------- STAGE 2 -------------------------
+       DO 110 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a21*K1(j)
+ 110   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha2*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha2*H, ynew, DFDP)
+       END IF	 
+       nfcn=nfcn+1
+       beta1 = c21/H
+       DO 120 j = 1,NVAR
+         K2(j) = Fv(j) + beta1*K1(j)
+ 120   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta2 = H*gamma2
+	 DO 130 j=1,NVAR
+	    K2(j) = K2(j) + beta2*DFDT(j)	    
+ 130     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha2*H, ynew, JAC)
+       njac=njac+1
+       DO 160 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K2(1), Hv )
+          DO 140 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                          + Hv(j)
+ 140      CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	     DO 150 j=1,NVAR
+	        K2(i*NVAR+j) = K2(i*NVAR+j) + beta2*DFDT(i*NVAR+j)
+ 150         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 155 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 155        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 160   CONTINUE
+ 
+ 
+C ------------ STAGE 3 -------------------------
+       DO 170 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a31*K1(j) + a32*K2(j)
+ 170   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha3*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha3*H, ynew, DFDP)
+       END IF	    
+       nfcn=nfcn+1
+       beta1 = c31/H
+       beta2 = c32/H
+       DO 180 j = 1,NVAR
+         K3(j) = Fv(j) + beta1*K1(j) + beta2*K2(j)
+ 180   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta3 = H*gamma3
+	 DO 190 j=1,NVAR
+	    K3(j) = K3(j) + beta3*DFDT(j)	    
+ 190     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K3)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K3(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha3*H, ynew, JAC)
+       njac=njac+1
+       DO 220 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K3(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K3(1), Hv )
+          DO 200 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + Hv(j)
+ 200      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 210 j=1,NVAR
+	        K3(i*NVAR+j) = K3(i*NVAR+j) + beta3*DFDT(i*NVAR+j)
+ 210         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 215 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 215        CONTINUE	  
+	  END IF	 
+C               --- End of derivative w.r.t. parameters
+          CALL KppSolve (AJAC, K3(i*NVAR+1))
+ 220   CONTINUE
+ 
+C ------------ STAGE 4 -------------------------
+C              Note: uses the same function values as stage 3
+       beta1 = c41/H
+       beta2 = c42/H
+       beta3 = c43/H
+       DO 230 j = 1,NVAR
+         K4(j) = Fv(j) + beta1*K1(j) + beta2*K2(j) + beta3*K3(j)
+ 230   CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta4 = H*gamma4
+	  DO 240 j=1,NVAR
+	    K4(j) = K4(j) + beta4*DFDT(j)
+ 240      CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K4)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K4(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       njac=njac+1
+       DO 270 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K4(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K4(1), Hv )
+          DO 250 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + beta3*K3(i*NVAR+j)
+     &                       + Hv(j)
+ 250      CONTINUE
+          IF (.NOT. Autonomous) THEN
+	     DO 260 j=1,NVAR
+	        K4(i*NVAR+j) = K4(i*NVAR+j) + beta4*DFDT(i*NVAR+j)
+ 260         CONTINUE
+          END IF
+C --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 265 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 265        CONTINUE	  
+	  END IF	 
+          CALL KppSolve (AJAC, K4(i*NVAR+1))
+ 270   CONTINUE
+
+
+C ---- The Solution ---
+       DO 280 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) + b4*K4(j)
+ 280   CONTINUE
+ 
+ 
+C ====== Error estimation -- can be extended to control sensitivities too ========
+ 
+        ERR = 0.d0
+        DO 290 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(ynew(i)),DABS(y(i)))
+	   e = d1*K1(i) + d2*K2(i) + d3*K3(i) + d4*K4(i)
+           ERR = ERR + ( e/w )**2
+ 290    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 4.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 300 i=1,NVAR*(NSENSIT+1)
+             y(i)  = ynew(i)
+ 300      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y,  FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/twostepj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/twostepj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/twostepj.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE twostepj
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/twostepj.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/twostepj.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/oldies/twostepj.f	(revision 3477)
@@ -0,0 +1,244 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      EXTERNAL ITER
+      KPP_REAL T
+      KPP_REAL V(NVAR), VOLD(NVAR), VNEW(NVAR)
+      KPP_REAL startdt, hmin, hmax, h 
+
+      INTEGER    INFO(5)
+
+      INFO(1) = Autonomous
+      h = hmin
+      
+c Number of Jacobi-Seidel iterations      
+      numit = 3   
+
+      
+      DO i=1,NVAR
+        RTOL(i) = 1.e-2
+      ENDDO	
+
+      CALL twostepj(NVAR,TIN,TOUT,h,hmin,hmax,
+     +                   VOLD,VAR,VNEW, 
+     +                   ATOL,RTOL,numit,
+     +                   nfcn,naccpt,nrejec,nstart,startdt,ITER)
+
+
+      RETURN
+      END
+      
+      
+
+      SUBROUTINE ITER(n,T,y,yp,yl)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      REAL*8 T, y(NVAR), yp(NVAR), yl(NVAR)
+      TOLD = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL FunSPLIT_VAR(y,Rad,yp,yl)
+      TIME = TOLD
+      RETURN
+      END
+     
+
+      subroutine twostepj(n,t,te,dt,dtmin,dtmax,
+     +                   yold,y,ynew,
+     +                   atol,rtol,numit,
+     +                   nfcn,naccpt,nrejec,nstart,startdt,ITER)
+      implicit real*8 (a-h,o-z)
+      external ITER
+      integer	 n,numit,nfcn,naccpt,nrejec,nstart,i,j
+      real*8	 t,te,dt,dtmin,dtmax,startdt,ytol,
+     +           ratio,dtold,a1,a2,c,cp1,dtg,errlte,dy
+      real*8       yold(n),y(n),ynew(n),yp(n),yl(n),
+     +           work(n),sum(n),atol(n),rtol(n)
+      logical 	 accept,failer,restart
+
+c
+c     Initialization of counters, etc.
+
+      naccpt=0
+      nrejec=0
+      nfcn=0
+      nstart=0
+      failer=.false.
+      restart=.false.
+      accept=.true.
+
+c     Initial stepsize computation. 
+    
+   10 if (dtmin.eq.dtmax) then
+       nstart=1
+       dt=min(dtmin,(te-t)/2)
+       goto 28
+      endif
+      CALL ITER(n,t,y,yp,yl)
+      nfcn=nfcn+1
+      dt=te-t
+      do 20 i=1,n
+       ytol=atol(i)+rtol(i)*abs(y(i))
+       dy=yp(i)-y(i)*yl(i)
+       if (dy.ne.0.0) dt=min(dt,ytol/abs(dy))
+   20 continue
+   25 nstart=nstart+1
+      if (restart) dt=dt/10.0
+      restart=.true.
+      dt=max(dtmin,min(dt,dtmax))
+      CALL FIT(t,te,dt)
+      dt=min(dt,(te-t)/2)
+      startdt=dt
+
+c     The starting step is carried out, using the implicit Euler method.
+
+   28 do 30 i=1,n
+       ynew(i)=y(i)
+       yold(i)=y(i)
+       sum(i)=y(i)
+   30 continue
+      do 40 i=1,numit
+       CALL ITER(n,t+dt,ynew,yp,yl)
+       do i2i=1,n
+         ynew(i2i) = (sum(i2i) + dt*yp(i2i))/(1.+dt*yl(i2i))
+       end do
+       nfcn=nfcn+1
+   40 continue
+      naccpt=naccpt+1
+      t=t+dt
+      do 50 j=1,n
+       y(j)=ynew(j)
+   50 continue
+
+c     Subsequent steps are carried out with the two-step BDF method.
+
+      dtold=dt
+      ratio=1.0
+   60 continue
+      c=1.0/ratio
+      cp1=c+1.0
+      a1=((c+1.0)**2)/(c*c+2.0*c)
+      a2=-1.0/(c*c+2.0*c)
+      dtg=dt*(1.0+c)/(2.0+c)
+      do 70 j=1,n
+       sum(j)=a1*y(j)+a2*yold(j)
+       ynew(j)=max(0.0,y(j)+ratio*(y(j)-yold(j)))
+   70 continue
+      do 80 i=1,numit
+       CALL ITER(n,t+dt,ynew,yp,yl)
+       do i2i=1,n
+        ynew(i2i) = (sum(i2i) + dtg*yp(i2i))/(1.+dtg*yl(i2i))
+       end do
+       nfcn=nfcn+1
+   80 continue
+
+c     If stepsizes should remain equal, stepsize control is omitted.
+
+      if (dtmin.eq.dtmax) then
+       t=t+dtold
+       naccpt=naccpt+1
+       do 85 j=1,n
+        yold(j)=y(j)
+        y(j)=ynew(j)
+   85  continue
+       if (dt.ne.dtold) then
+	t=t-dtold+dt
+	goto 120
+       endif
+       dt=min(dtold,te-t)
+       ratio=dt/dtold
+       if (t.ge.te) goto 120
+       goto 60
+      endif
+
+c     Otherwise stepsize control is carried out.
+
+      errlte=0.0
+      do 90 i=1,n
+       ytol=atol(i)+rtol(i)*abs(y(i))
+       errlte=max(errlte,abs(c*ynew(i)-cp1*y(i)+yold(i))/ytol)
+   90 continue
+      errlte=2.0*errlte/(c+c*c)
+      CALL NEWDT(t,te,dt,dtold,ratio,errlte,accept,
+     +           dtmin,dtmax)
+
+c     Here the step has been accepted. 
+
+      if (accept) then
+ 201   format(2(E24.16,1X))
+       failer=.false.
+       restart=.false.
+       t=t+dtold
+       naccpt=naccpt+1
+       do 100 j=1,n
+	yold(j)=y(j)
+	y(j)=ynew(j)
+  100  continue
+       if (t.ge.te) goto 120
+       goto 60
+      endif
+
+c     A restart check is carried out.
+      
+      if (failer) then
+       nrejec=nrejec+1
+       failer=.false.
+       naccpt=naccpt-1
+       t=t-dtold
+       do 110 j=1,n
+        y(j)=yold(j)
+  110  continue
+       goto 25
+      endif
+
+c     Here the step has been rejected.
+
+      nrejec=nrejec+1
+      failer=.true.
+      goto 60
+      
+c     End of TWOSTEP.
+  120 end
+c=====================================================================
+
+      subroutine NEWDT(t,te,dt,dtold,ratio,errlte,
+     +                 accept,dtmin,dtmax)
+      real*8    t,te,dt,dtold,ratio,errlte,ts,dtmin,dtmax
+      logical accept
+      if (errlte.gt.1.0.and.dt.gt.dtmin) then
+       accept=.false.
+       ts=t
+      else
+       accept=.true.
+       dtold=dt
+       ts=t+dtold
+      endif
+      dt=max(0.5,min(2.0,0.8/sqrt(errlte)))*dt
+      dt=max(dtmin,min(dt,dtmax))
+      CALL FIT(ts,te,dt)
+      ratio=dt/dtold
+      end
+
+      subroutine FIT(t,te,dt)
+      real*8 	t,te,dt,rns
+      integer 	ns
+      rns=(te-t)/dt
+      if (rns.gt.10.0) goto 10
+      ns=int(rns)+1
+      dt=(te-t)/ns
+      dt=(dt+t)-t
+   10 return
+      end
+
+
+
+C End of MAIN function                                             
+C **************************************************************** 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/readme
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/readme	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/readme	(revision 3477)
@@ -0,0 +1,21 @@
+The integrator naming conventions:
+
+*.def = definition file
+*.f   = Fortran 77 source code
+*.f90 = Fortran 90 source code
+*.c   = C source code
+
+atm_* = off-the-shelf integrators, adapted to work with KPP
+        use the native full linear algebra
+	useful for providing reference solutions
+	
+kpp_* = off-the-shelf integrators, using the KPP sparse linear algebra	
+        very efficient, useful for production runs
+	
+plain names = original integrators
+        either use the KPP sparse linear algebra, or provide
+	explicit solutions	
+	
+*_ddm = direct decoupled method
+        integrate for both the concentrations and their sensitivities
+	implements the forward and the tangent linear models together	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.c	(revision 3477)
@@ -0,0 +1,1216 @@
+
+ #define MAX(a,b) ( ((a) >= (b)) ?(a):(b)  )
+ #define MIN(b,c) ( ((b) <  (c)) ?(b):(c)  )	
+ #define ABS(x)   ( ((x) >=  0 ) ?(x):(-x) ) 
+ #define SQRT(d)  ( pow((d),0.5)  )
+ #define SIGN(x)  ( ((x) >=  0 ) ?[0]:(-1) )
+
+/*~~> Numerical constants */
+ #define  ZERO     (KPP_REAL)0.0
+ #define  ONE      (KPP_REAL)1.0
+ #define  HALF     (KPP_REAL)0.5
+ #define  DeltaMin (KPP_REAL)1.0e-6    
+   
+/*~~~> Collect statistics: global variables */   
+ int Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng;
+
+
+/*~~~> Function headers */   
+ void FunTemplate(KPP_REAL, KPP_REAL [], KPP_REAL []); 
+ void JacTemplate(KPP_REAL, KPP_REAL [], KPP_REAL []) ;
+ int Rosenbrock(KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend,
+     KPP_REAL AbsTol[], KPP_REAL RelTol[],
+     void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []),
+     KPP_REAL RPAR[], int IPAR[]);
+ int RosenbrockIntegrator(
+     KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend ,     
+     KPP_REAL  AbsTol[], KPP_REAL  RelTol[],
+     void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []),
+     int ros_S,
+     KPP_REAL ros_M[], KPP_REAL ros_E[], 
+     KPP_REAL ros_A[], KPP_REAL ros_C[],
+     KPP_REAL ros_Alpha[],KPP_REAL  ros_Gamma[],
+     KPP_REAL ros_ELO, char ros_NewF[],
+     char Autonomous, char VectorTol, int Max_no_steps,  
+     KPP_REAL Roundoff, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart,
+     KPP_REAL FacMin, KPP_REAL FacMax, KPP_REAL FacRej, KPP_REAL FacSafe, 
+     KPP_REAL *Texit, KPP_REAL *Hexit ); 
+ char ros_PrepareMatrix (
+     KPP_REAL* H, 
+     int Direction,  KPP_REAL gam, KPP_REAL Jac0[], 
+     KPP_REAL Ghimj[], int Pivot[] );
+ KPP_REAL ros_ErrorNorm ( 
+     KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[], 
+     KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+     char VectorTol );
+ int  ros_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H);
+ void ros_FunTimeDerivative ( 
+     KPP_REAL T, KPP_REAL Roundoff, 
+     KPP_REAL Y[], KPP_REAL Fcn0[], 
+     void ode_Fun(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     KPP_REAL dFdT[] );
+ void Fun( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+ void Jac_SP( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+ void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] );
+ void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] );
+ void DecompTemplate( KPP_REAL A[], int Pivot[], int* ising );
+ void SolveTemplate( KPP_REAL A[], int Pivot[], KPP_REAL b[] );
+ void WCOPY(int N, KPP_REAL X[], int incX, KPP_REAL Y[], int incY);
+ void WAXPY(int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], int incY );
+ void WSCAL(int N, KPP_REAL Alpha, KPP_REAL X[], int incX);
+ KPP_REAL WLAMCH( char C );
+ void Ros2 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Ros3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Ros4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Rodas3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Rodas4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ int  KppDecomp( KPP_REAL A[] );
+ void KppSolve ( KPP_REAL A[], KPP_REAL b[] );
+ void Update_SUN();
+ void Update_RCONST();
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void INTEGRATE( KPP_REAL TIN, KPP_REAL TOUT )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   static KPP_REAL  RPAR[20];
+   static int  i, IERR, IPAR[20];
+   static int Ns=0, Na=0, Nr=0, Ng=0;
+
+   for ( i = 0; i < 20; i++ ) {
+     IPAR[i] = 0;
+     RPAR[i] = ZERO;
+   } /* for */
+   
+   
+   IPAR[0] = 0;    /* non-autonomous */
+   IPAR[1] = 1;    /* vector tolerances */
+   RPAR[2] = STEPMIN; /* starting step */
+   IPAR[3] = 5;    /* choice of the method */
+
+   IERR = Rosenbrock(VAR, TIN, TOUT,
+           ATOL, RTOL,
+           &FunTemplate, &JacTemplate,
+           RPAR, IPAR);
+
+	     
+   Ns=Ns+IPAR[12];
+   Na=Na+IPAR[13];
+   Nr=Nr+IPAR[14];
+   Ng=Ng+IPAR[17];
+   printf("\n Step=%d  Acc=%d  Rej=%d  Singular=%d\n",
+         Ns,Na,Nr,Ng);
+
+
+   if (IERR < 0)
+     printf("\n Rosenbrock: Unsucessful step at T=%g: IERR=%d\n",
+         TIN,IERR);
+   
+   TIN = RPAR[10];      /* Exit time */
+   STEPMIN = RPAR[11];  /* Last step */
+   
+} /* INTEGRATE */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int Rosenbrock(KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend,
+        KPP_REAL AbsTol[], KPP_REAL RelTol[],
+        void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+	void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []),
+        KPP_REAL RPAR[], int IPAR[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+
+     G = 1/(H*gamma[0]) - ode_Jac(t0,Y0)
+     T_i = t0 + Alpha(i)*H
+     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+     G * K_i = ode_Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+         gamma(i)*dF/dT(t0, Y0)
+     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+
+    For details on Rosenbrock methods and their implementation consult:
+      E. Hairer and G. Wanner
+      "Solving ODEs II. Stiff and differential-algebraic problems".
+      Springer series in computational mathematics, Springer-Verlag, 1996.  
+    The codes contained in the book inspired this implementation.       
+
+    (C)  Adrian Sandu, August 2004
+    Virginia Polytechnic Institute and State University    
+    Contact: sandu@cs.vt.edu
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+  *~~~>   INPUT ARGUMENTS: 
+    
+-     Y(NVAR)    = vector of initial conditions (at T=Tstart)
+-    [Tstart,Tend]  = time range of integration
+     (if Tstart>Tend the integration is performed backwards in time)  
+-    RelTol, AbsTol = user precribed accuracy
+-    void ode_Fun( T, Y, Ydot ) = ODE function, 
+                       returns Ydot = Y' = F(T,Y) 
+-    void ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+                       returns Jcb = dF/dY 
+-    IPAR(1:10)    = int inputs parameters
+-    RPAR(1:10)    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>     OUTPUT ARGUMENTS:  
+     
+-    Y(NVAR)    -> vector of final states (at T->Tend)
+-    IPAR(11:20)   -> int output parameters
+-    RPAR(11:20)   -> real output parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>    RETURN VALUE (int):  
+
+-    IERR       -> job status upon return
+       - succes (positive value) or failure (negative value) -
+           =  1 : Success
+           = -1 : Improper value for maximal no of steps
+           = -2 : Selected Rosenbrock method not implemented
+           = -3 : Hmin/Hmax/Hstart must be positive
+           = -4 : FacMin/FacMax/FacRej must be positive
+           = -5 : Improper tolerance values
+           = -6 : No of steps exceeds maximum bound
+           = -7 : Step size too small
+           = -8 : Matrix is repeatedly singular
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+  *~~~>     INPUT PARAMETERS:
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    IPAR[0]   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+        = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+    IPAR[1]   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+        = 1:  AbsTol, RelTol are scalars
+    IPAR[2]  -> maximum number of integration steps
+        For IPAR[2]=0) the default value of 100000 is used
+
+    IPAR[3]  -> selection of a particular Rosenbrock method
+        = 0 :  default method is Rodas3
+        = 1 :  method is  Ros2
+        = 2 :  method is  Ros3 
+        = 3 :  method is  Ros4 
+        = 4 :  method is  Rodas3
+        = 5:   method is  Rodas4
+
+    RPAR[0]  -> Hmin, lower bound for the integration step size
+          It is strongly recommended to keep Hmin = ZERO 
+    RPAR[1]  -> Hmax, upper bound for the integration step size
+    RPAR[2]  -> Hstart, starting value for the integration step size
+          
+    RPAR[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+    RPAR[4]  -> FacMin,upper bound on step increase factor (default=6)
+    RPAR[5]  -> FacRej, step decrease factor after multiple rejections
+            (default=0.1)
+    RPAR[6]  -> FacSafe, by which the new step is slightly smaller 
+         than the predicted value  (default=0.9)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+  *~~~>     OUTPUT PARAMETERS:
+
+    Note: each call to Rosenbrock adds the corrent no. of fcn calls
+      to previous value of IPAR[10], and similar for the other params.
+      Set IPAR(11:20) = 0 before call to avoid this accumulation.
+
+    IPAR[10] = No. of function calls
+    IPAR[11] = No. of jacobian calls
+    IPAR[12] = No. of steps
+    IPAR[13] = No. of accepted steps
+    IPAR[14] = No. of rejected steps (except at the beginning)
+    IPAR[15] = No. of LU decompositions
+    IPAR[16] = No. of forward/backward substitutions
+    IPAR[17] = No. of singular matrix decompositions
+
+    RPAR[10]  -> Texit, the time corresponding to the 
+            computed Y upon return
+    RPAR[11]  -> Hexit, last accepted step before exit
+    For multiple restarts, use Hexit as Hstart in the following run 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{   
+
+  /*~~~>  The method parameters    */   
+   #define Smax 6
+   int  Method, ros_S;
+   KPP_REAL ros_M[Smax], ros_E[Smax];
+   KPP_REAL ros_A[Smax*(Smax-1)/2], ros_C[Smax*(Smax-1)/2];
+   KPP_REAL ros_Alpha[Smax], ros_Gamma[Smax], ros_ELO;
+   char ros_NewF[Smax], ros_Name[12];
+  /*~~~>  Local variables    */  
+   int Max_no_steps, IERR, i, UplimTol;
+   char Autonomous, VectorTol;
+   KPP_REAL Roundoff,FacMin,FacMax,FacRej,FacSafe;
+   KPP_REAL Hmin, Hmax, Hstart, Hexit, Texit;
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  /*~~~>  Initialize statistics */
+   Nfun = IPAR[10];
+   Njac = IPAR[11];
+   Nstp = IPAR[12];
+   Nacc = IPAR[13];
+   Nrej = IPAR[14];
+   Ndec = IPAR[15];
+   Nsol = IPAR[16];
+   Nsng = IPAR[17];
+   
+  /*~~~>  Autonomous or time dependent ODE. Default is time dependent. */
+   Autonomous = !(IPAR[0] == 0);
+
+  /*~~~>  For Scalar tolerances (IPAR[1] != 0)  the code uses AbsTol[0] and RelTol[0]
+!   For Vector tolerances (IPAR[1] == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR) */
+   if (IPAR[1] == 0) {
+      VectorTol = 1; UplimTol  = KPP_NVAR;
+   } else { 
+      VectorTol = 0; UplimTol  = 1;
+   } /* end if */
+   
+  /*~~~>   The maximum number of steps admitted */
+   if (IPAR[2] == 0)  
+      Max_no_steps = 100000;
+   else                
+      Max_no_steps=IPAR[2];
+   if (Max_no_steps < 0) { 
+      printf("\n User-selected max no. of steps: IPAR[2]=%d\n",IPAR[2]);
+      return ros_ErrorMsg(-1,Tstart,ZERO);
+   } /* end if */
+
+  /*~~~>  The particular Rosenbrock method chosen */
+   if (IPAR[3] == 0)  
+       Method = 3;
+   else                
+       Method = IPAR[3];
+   if ( (IPAR[3] < 1) || (IPAR[3] > 5) ){  
+      printf("\n User-selected Rosenbrock method: IPAR[3]=%d\n",IPAR[3]);
+      return ros_ErrorMsg(-2,Tstart,ZERO);
+   } /* end if */
+   
+  /*~~~>  Unit Roundoff (1+Roundoff>1)   */
+   Roundoff = WLAMCH('E');
+
+  /*~~~>  Lower bound on the step size: (positive value) */
+   Hmin = RPAR[0];
+   if (RPAR[0] < ZERO) {	 
+      printf("\n User-selected Hmin: RPAR[0]=%e\n", RPAR[0]);
+      return ros_ErrorMsg(-3,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Upper bound on the step size: (positive value) */
+   if (RPAR[1] == ZERO)  
+      Hmax = ABS(Tend-Tstart);
+   else   
+      Hmax = MIN(ABS(RPAR[1]),ABS(Tend-Tstart));
+   if (RPAR[1] < ZERO) {	 
+      printf("\n User-selected Hmax: RPAR[1]=%e\n", RPAR[1]);
+      return ros_ErrorMsg(-3,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Starting step size: (positive value) */
+   if (RPAR[2] == ZERO) 
+      Hstart = MAX(Hmin,DeltaMin);
+   else
+      Hstart = MIN(ABS(RPAR[2]),ABS(Tend-Tstart));
+   if (RPAR[2] < ZERO) {	 
+      printf("\n User-selected Hstart: RPAR[2]=%e\n", RPAR[2]);
+      return ros_ErrorMsg(-3,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax  */
+   if (RPAR[3] == ZERO)
+      FacMin = (KPP_REAL)0.2;
+   else
+      FacMin = RPAR[3];
+   if (RPAR[3] < ZERO) {	 
+      printf("\n User-selected FacMin: RPAR[3]=%e\n", RPAR[3]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+   if (RPAR[4] == ZERO) 
+      FacMax = (KPP_REAL)6.0;
+   else
+      FacMax = RPAR[4];
+   if (RPAR[4] < ZERO) {	 
+      printf("\n User-selected FacMax: RPAR[4]=%e\n", RPAR[4]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+  /*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+   if (RPAR[5] == ZERO) 
+      FacRej = (KPP_REAL)0.1;
+   else
+      FacRej = RPAR[5];
+   if (RPAR[5] < ZERO) {	 
+      printf("\n User-selected FacRej: RPAR[5]=%e\n", RPAR[5]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+  /*~~~>   FacSafe: Safety Factor in the computation of new step size */
+   if (RPAR[6] == ZERO) 
+      FacSafe = (KPP_REAL)0.9;
+   else
+      FacSafe = RPAR[6];
+   if (RPAR[6] < ZERO) {	 
+      printf("\n User-selected FacSafe: RPAR[6]=%e\n", RPAR[6]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Check if tolerances are reasonable */
+    for (i = 0; i < UplimTol; i++) {
+      if ( (AbsTol[i] <= ZERO)  ||  (RelTol[i] <= 10.0*Roundoff)
+          ||  (RelTol[i] >= ONE) ) {
+        printf("\n  AbsTol[%d] = %e\n",i,AbsTol[i]);
+        printf("\n  RelTol[%d] = %e\n",i,RelTol[i]);
+        return ros_ErrorMsg(-5,Tstart,ZERO);
+      } /* end if */
+    } /* for */
+     
+ 
+  /*~~~>   Initialize the particular Rosenbrock method */
+   switch (Method) {
+     case 1:
+       Ros2(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 2:
+       Ros3(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 3:
+       Ros4(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 4:
+       Rodas3(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 5:
+       Rodas4(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     default:
+       printf("\n Unknown Rosenbrock method: IPAR[3]= %d", Method);
+       return ros_ErrorMsg(-2,Tstart,ZERO); 
+   } /* end switch */
+
+  /*~~~>  Rosenbrock method   */
+   IERR = RosenbrockIntegrator( Y,Tstart,Tend,
+        AbsTol, RelTol,
+        ode_Fun,ode_Jac ,
+      /*  Rosenbrock method coefficients  */     
+        ros_S, ros_M, ros_E, ros_A, ros_C, 
+        ros_Alpha, ros_Gamma, ros_ELO, ros_NewF,
+      /*  Integration parameters */ 
+        Autonomous, VectorTol, Max_no_steps,
+        Roundoff, Hmin, Hmax, Hstart,
+        FacMin, FacMax, FacRej, FacSafe, 
+      /* Output parameters */ 
+	&Texit, &Hexit );
+
+
+  /*~~~>  Collect run statistics */
+   IPAR[10] = Nfun;
+   IPAR[11] = Njac;
+   IPAR[12] = Nstp;
+   IPAR[13] = Nacc;
+   IPAR[14] = Nrej;
+   IPAR[15] = Ndec;
+   IPAR[16] = Nsol;
+   IPAR[17] = Nsng;
+  /*~~~> Last T and H */
+   RPAR[10] = Texit;
+   RPAR[11] = Hexit;    
+   
+   return IERR;
+   
+} /* Rosenbrock */
+
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int RosenbrockIntegrator(
+  /*~~~> Input: the initial condition at Tstart; Output: the solution at T */  
+     KPP_REAL Y[],
+  /*~~~> Input: integration interval */   
+     KPP_REAL Tstart, KPP_REAL Tend ,     
+  /*~~~> Input: tolerances  */        
+     KPP_REAL  AbsTol[], KPP_REAL  RelTol[],
+  /*~~~> Input: ode function and its Jacobian */      
+     void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []) ,
+  /*~~~> Input: The Rosenbrock method parameters */   
+     int ros_S,
+     KPP_REAL ros_M[], KPP_REAL ros_E[], 
+     KPP_REAL ros_A[], KPP_REAL ros_C[],
+     KPP_REAL ros_Alpha[],KPP_REAL  ros_Gamma[],
+     KPP_REAL ros_ELO, char ros_NewF[],
+  /*~~~> Input: integration parameters  */     
+     char Autonomous, char VectorTol,
+     int Max_no_steps,  
+     KPP_REAL Roundoff, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart,
+     KPP_REAL FacMin, KPP_REAL FacMax, KPP_REAL FacRej, KPP_REAL FacSafe, 
+  /*~~~> Output: time at which the solution is returned (T=Tend  if success)   
+             and last accepted step  */     
+     KPP_REAL *Texit, KPP_REAL *Hexit ) 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Template for the implementation of a generic Rosenbrock method 
+      defined by ros_S (no of stages) and coefficients ros_{A,C,M,E,Alpha,Gamma}
+      
+      returned value: IERR, indicator of success (if positive) 
+                                      or failure (if negative)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{   
+   KPP_REAL Ynew[KPP_NVAR], Fcn0[KPP_NVAR], Fcn[KPP_NVAR],
+      dFdT[KPP_NVAR],
+      Jac0[KPP_LU_NONZERO], Ghimj[KPP_LU_NONZERO];
+   KPP_REAL K[KPP_NVAR*ros_S];   
+   KPP_REAL H, T, Hnew, HC, HG, Fac, Tau; 
+   KPP_REAL Err, Yerr[KPP_NVAR];
+   int Pivot[KPP_NVAR], Direction, ioffset, j, istage;
+   char RejectLastH, RejectMoreH;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  /*~~~>  INITIAL PREPARATIONS  */
+   T = Tstart;
+   *Hexit = 0.0;
+   H = MIN(Hstart,Hmax); 
+   if (ABS(H) <= 10.0*Roundoff) 
+        H = DeltaMin;
+   
+   if (Tend  >=  Tstart) {
+     Direction = +1;
+   } else {
+     Direction = -1;
+   } /* end if */		
+
+   RejectLastH=0; RejectMoreH=0;
+   
+  /*~~~> Time loop begins below  */ 
+
+   while ( ( (Direction > 0) && ((T-Tend)+Roundoff <= ZERO) )
+       || ( (Direction < 0) && ((Tend-T)+Roundoff <= ZERO) ) ) { 
+      
+   if ( Nstp > Max_no_steps )  {                /* Too many steps */
+        *Texit = T;
+	return ros_ErrorMsg(-6,T,H);
+   }	
+   if ( ((T+0.1*H) == T) || (H <= Roundoff) ) { /* Step size too small */
+        *Texit = T;
+	return ros_ErrorMsg(-7,T,H);
+   }   
+   
+  /*~~~>  Limit H if necessary to avoid going beyond Tend   */  
+   *Hexit = H;
+   H = MIN(H,ABS(Tend-T));
+
+  /*~~~>   Compute the function at current time  */
+   (*ode_Fun)(T,Y,Fcn0);
+
+  /*~~~>  Compute the function derivative with respect to T  */
+   if (!Autonomous) 
+      ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, ode_Fun, dFdT );
+  
+  /*~~~>   Compute the Jacobian at current time  */
+   (*ode_Jac)(T,Y,Jac0);
+ 
+  /*~~~>  Repeat step calculation until current step accepted  */
+   while (1) { /* WHILE STEP NOT ACCEPTED */
+
+   
+   if( ros_PrepareMatrix( &H, Direction, ros_Gamma[0],
+          Jac0, Ghimj, Pivot) ) { /* More than 5 consecutive failed decompositions */
+       *Texit = T;
+       return ros_ErrorMsg(-8,T,H);
+   }
+
+  /*~~~>   Compute the stages  */
+   for (istage = 1; istage <= ros_S; istage++) {
+      
+      /* Current istage offset. Current istage vector is K[ioffset:ioffset+KPP_NVAR-1] */
+      ioffset = KPP_NVAR*(istage-1);
+	 
+      /* For the 1st istage the function has been computed previously */
+      if ( istage == 1 )
+	   WCOPY(KPP_NVAR,Fcn0,1,Fcn,1);
+      else { /* istage>1 and a new function evaluation is needed at current istage */
+	if ( ros_NewF[istage-1] ) {
+	   WCOPY(KPP_NVAR,Y,1,Ynew,1);
+	   for (j = 1; j <= istage-1; j++)
+	     WAXPY(KPP_NVAR,ros_A[(istage-1)*(istage-2)/2+j-1],
+                   &K[KPP_NVAR*(j-1)],1,Ynew,1); 
+	   Tau = T + ros_Alpha[istage-1]*Direction*H;
+           (*ode_Fun)(Tau,Ynew,Fcn);
+	} /*end if ros_NewF(istage)*/
+      } /* end if istage */
+	 
+      WCOPY(KPP_NVAR,Fcn,1,&K[ioffset],1);
+      for (j = 1; j <= istage-1; j++) {
+	 HC = ros_C[(istage-1)*(istage-2)/2+j-1]/(Direction*H);
+	 WAXPY(KPP_NVAR,HC,&K[KPP_NVAR*(j-1)],1,&K[ioffset],1);
+      } /* for j */
+	 
+      if ((!Autonomous) && (ros_Gamma[istage-1])) { 
+        HG = Direction*H*ros_Gamma[istage-1];
+	WAXPY(KPP_NVAR,HG,dFdT,1,&K[ioffset],1);
+      } /* end if !Autonomous */
+      
+      SolveTemplate(Ghimj, Pivot, &K[ioffset]);
+	 
+   } /* for istage */	    
+	    
+
+  /*~~~>  Compute the new solution   */
+   WCOPY(KPP_NVAR,Y,1,Ynew,1);
+   for (j=1; j<=ros_S; j++)
+       WAXPY(KPP_NVAR,ros_M[j-1],&K[KPP_NVAR*(j-1)],1,Ynew,1);
+
+  /*~~~>  Compute the error estimation   */
+   WSCAL(KPP_NVAR,ZERO,Yerr,1);
+   for (j=1; j<=ros_S; j++)    
+       WAXPY(KPP_NVAR,ros_E[j-1],&K[KPP_NVAR*(j-1)],1,Yerr,1);
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol );
+
+  /*~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax  */
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/pow(Err,ONE/ros_ELO)));
+   Hnew = H*Fac;  
+
+  /*~~~>  Check the error magnitude and adjust step size  */
+   Nstp++;
+   if ( (Err <= ONE) || (H <= Hmin) ) {    /*~~~> Accept step  */
+      Nacc++;
+      WCOPY(KPP_NVAR,Ynew,1,Y,1);
+      T += Direction*H;
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax));
+      /* No step size increase after a rejected step  */
+      if (RejectLastH) 
+         Hnew = MIN(Hnew,H); 
+      RejectLastH = 0; RejectMoreH = 0;
+      H = Hnew;
+	 break; /* EXIT THE LOOP: WHILE STEP NOT ACCEPTED */
+   } else {             /*~~~> Reject step  */
+      if (Nacc >= 1) 
+         Nrej++;    
+      if (RejectMoreH) 
+         Hnew=H*FacRej;   
+      RejectMoreH = RejectLastH; RejectLastH = 1;
+      H = Hnew;
+   } /* end if Err <= 1 */
+
+   } /* while LOOP: WHILE STEP NOT ACCEPTED */
+
+   } /* while: time loop */   
+   
+  /*~~~> The integration was successful */
+   *Texit = T;
+   return 1;    
+
+}  /* RosenbrockIntegrator */
+ 
+
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL ros_ErrorNorm ( 
+  /*~~~> Input arguments */  
+     KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[], 
+     KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+     char VectorTol )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        Computes and returns the "scaled norm" of the error vector Yerr
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   	 
+  /*~~~> Local variables */     
+   KPP_REAL Err, Scale, Ymax;   
+   int i;
+   
+   Err = ZERO;
+   for (i=0; i<KPP_NVAR; i++) {
+	Ymax = MAX(ABS(Y[i]),ABS(Ynew[i]));
+     if (VectorTol) {
+       Scale = AbsTol[i]+RelTol[i]*Ymax;
+     } else {
+       Scale = AbsTol[0]+RelTol[0]*Ymax;
+     } /* end if */
+     Err = Err+(Yerr[i]*Yerr[i])/(Scale*Scale);
+   } /* for i */
+   Err  = SQRT(Err/(KPP_REAL)KPP_NVAR);
+
+   return Err;
+   
+} /* ros_ErrorNorm */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FunTimeDerivative ( 
+    /*~~~> Input arguments: */ 
+        KPP_REAL T, KPP_REAL Roundoff, 
+        KPP_REAL Y[], KPP_REAL Fcn0[], 
+	void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+    /*~~~> Output arguments: */ 
+        KPP_REAL dFdT[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    The time partial derivative of the function by finite differences
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+  /*~~~> Local variables */     
+   KPP_REAL Delta;    
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T));
+   (*ode_Fun)(T+Delta,Y,dFdT);
+   WAXPY(KPP_NVAR,(-ONE),Fcn0,1,dFdT,1);
+   WSCAL(KPP_NVAR,(ONE/Delta),dFdT,1);
+
+}  /*  ros_FunTimeDerivative */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+char ros_PrepareMatrix (
+       /* Inout argument: (step size is decreased when LU fails) */  
+           KPP_REAL* H, 
+       /* Input arguments: */    
+           int Direction,  KPP_REAL gam, KPP_REAL Jac0[], 
+       /* Output arguments: */	  
+           KPP_REAL Ghimj[], int Pivot[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Prepares the LHS matrix for stage calculations
+  1.  Construct Ghimj = 1/(H*ham) - Jac0
+      "(Gamma H) Inverse Minus Jacobian"
+  2.  Repeat LU decomposition of Ghimj until successful.
+       -half the step size if LU decomposition fails and retry
+       -exit after 5 consecutive fails
+
+  Return value:       Singular (true=1=failed_LU or false=0=successful_LU)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+  /*~~~> Local variables */     
+   int i, ising, Nconsecutive;
+   KPP_REAL ghinv;
+   
+   Nconsecutive = 0;
+   
+   while (1) {  /* while Singular */
+   
+  /*~~~>    Construct Ghimj = 1/(H*ham) - Jac0 */
+     WCOPY(KPP_LU_NONZERO,Jac0,1,Ghimj,1);
+     WSCAL(KPP_LU_NONZERO,(-ONE),Ghimj,1);
+     ghinv = ONE/(Direction*(*H)*gam);
+     for (i=0; i<KPP_NVAR; i++) {
+       Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+ghinv;
+     } /* for i */
+  /*~~~>    Compute LU decomposition  */
+     DecompTemplate( Ghimj, Pivot, &ising );
+     if (ising == 0) {
+  /*~~~>    if successful done  */
+        return 0;  /* Singular = false */
+     } else { /* ising .ne. 0 */
+  /*~~~>    if unsuccessful half the step size; if 5 consecutive fails return */
+        Nsng++; Nconsecutive++;
+        printf("\nWarning: LU Decomposition returned ising = %d\n",ising);
+        if (Nconsecutive <= 5) { /* Less than 5 consecutive failed LUs */
+          *H = (*H)*HALF;
+        } else {                  /* More than 5 consecutive failed LUs */
+          return 1; /* Singular = true */
+        } /* end if  Nconsecutive */
+     } /* end if ising */
+	 
+   } /* while Singular */
+
+}  /*  ros_PrepareMatrix */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+int ros_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                  Handles all error messages and returns IERR = error Code
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 
+   printf("\nForced exit from Rosenbrock due to the following error:\n"); 
+     
+   switch (Code) {
+   case -1:   
+      printf("--> Improper value for maximal no of steps"); break;
+   case -2:   
+      printf("--> Selected Rosenbrock method not implemented"); break;
+   case -3:   
+      printf("--> Hmin/Hmax/Hstart must be positive"); break;
+   case -4:   
+      printf("--> FacMin/FacMax/FacRej must be positive"); break;
+   case -5:
+      printf("--> Improper tolerance values"); break;
+   case -6:
+      printf("--> No of steps exceeds maximum bound"); break;
+   case -7:
+      printf("--> Step size too small (T + H/10 = T) or H < Roundoff"); break;
+   case -8:   
+      printf("--> Matrix is repeatedly singular"); break;
+   default:
+      printf("Unknown Error code: %d ",Code); 
+   } /* end switch */
+   
+   printf("\n   Time = %15.7e,  H = %15.7e",T,H);
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); 
+     
+   return Code;  
+     
+}  /* ros_ErrorMsg  */
+      
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Ros2 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+           KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	   KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	   char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+             AN L-STABLE METHOD, 2 stages, order 2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   double g = (KPP_REAL)1.70710678118655; /* 1.0 + 1.0/SQRT(2.0) */
+   
+  /*~~~> Name of the method */
+    strcpy(ros_Name, "ROS-2");  
+        
+  /*~~~> Number of stages */
+    *ros_S = 2;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+        A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]   */
+    ros_A[0] = 1.0/g;
+    
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+    ros_C[0] = (-2.0)/g;
+    
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+    ros_NewF[0] = 1;
+    ros_NewF[1] = 1;
+    
+  /*~~~> M_i = Coefficients for new step solution */
+    ros_M[0]= (3.0)/(2.0*g);
+    ros_M[1]= (1.0)/(2.0*g);
+    
+  /*~~~> E_i = Coefficients for error estimator */    
+    ros_E[0] = 1.0/(2.0*g);
+    ros_E[1] = 1.0/(2.0*g);
+    
+  /*~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one */
+    *ros_ELO = (KPP_REAL)2.0;   
+     
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+    ros_Alpha[0] = (KPP_REAL)0.0;
+    ros_Alpha[1] = (KPP_REAL)1.0; 
+    
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+    ros_Gamma[0] =  g;
+    ros_Gamma[1] = -g;
+    
+}  /*  Ros2 */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Ros3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+           KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	   KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	   char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+       AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{ 
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "ROS-3");   
+
+  /*~~~> Number of stages */
+   *ros_S = 3;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+        A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]   */
+   ros_A[0]= (KPP_REAL)1.0;
+   ros_A[1]= (KPP_REAL)1.0;
+   ros_A[2]= (KPP_REAL)0.0;
+
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+   ros_C[0] = (KPP_REAL)(-1.0156171083877702091975600115545);
+   ros_C[1] = (KPP_REAL)4.0759956452537699824805835358067;
+   ros_C[2] = (KPP_REAL)9.2076794298330791242156818474003;
+   
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+   ros_NewF[0] = 1;
+   ros_NewF[1] = 1;
+   ros_NewF[2] = 0;
+   
+  /*~~~> M_i = Coefficients for new step solution */
+   ros_M[0] = (KPP_REAL)1.0;
+   ros_M[1] = (KPP_REAL)6.1697947043828245592553615689730;
+   ros_M[2] = (KPP_REAL)(-0.4277225654321857332623837380651);
+   
+  /*~~~> E_i = Coefficients for error estimator */    
+   ros_E[0] = (KPP_REAL)0.5;
+   ros_E[1] = (KPP_REAL)(-2.9079558716805469821718236208017);
+   ros_E[2] = (KPP_REAL)0.2235406989781156962736090927619;
+   
+  /*~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+   *ros_ELO = (KPP_REAL)3.0;    
+   
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+   ros_Alpha[0]= (KPP_REAL)0.0;
+   ros_Alpha[1]= (KPP_REAL)0.43586652150845899941601945119356;
+   ros_Alpha[2]= (KPP_REAL)0.43586652150845899941601945119356;
+   
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+   ros_Gamma[0]= (KPP_REAL)0.43586652150845899941601945119356;
+   ros_Gamma[1]= (KPP_REAL)0.24291996454816804366592249683314;
+   ros_Gamma[2]= (KPP_REAL)2.1851380027664058511513169485832;
+
+}  /*  Ros3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Ros4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+           KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	   KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	   char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1990)         
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "ROS-4");  
+       
+  /*~~~> Number of stages */
+   *ros_S = 4;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+       A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]  */
+   ros_A[0] = (KPP_REAL)0.2000000000000000e+01;
+   ros_A[1] = (KPP_REAL)0.1867943637803922e+01;
+   ros_A[2] = (KPP_REAL)0.2344449711399156;
+   ros_A[3] = ros_A[1];
+   ros_A[4] = ros_A[2];
+   ros_A[5] = (KPP_REAL)0.0;
+
+  /*~~~>     C(i,j) = (KPP_REAL)ros_C( (i-1)*(i-2)/2 + j )  */
+   ros_C[0] = (KPP_REAL)(-0.7137615036412310e+01);
+   ros_C[1] = (KPP_REAL)( 0.2580708087951457e+01);
+   ros_C[2] = (KPP_REAL)( 0.6515950076447975);
+   ros_C[3] = (KPP_REAL)(-0.2137148994382534e+01);
+   ros_C[4] = (KPP_REAL)(-0.3214669691237626);
+   ros_C[5] = (KPP_REAL)(-0.6949742501781779);
+   
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+   ros_NewF[0]  = 1;
+   ros_NewF[1]  = 1;
+   ros_NewF[2]  = 1;
+   ros_NewF[3]  = 0;
+   
+  /*~~~> M_i = Coefficients for new step solution */
+   ros_M[0] = (KPP_REAL)0.2255570073418735e+01;
+   ros_M[1] = (KPP_REAL)0.2870493262186792;
+   ros_M[2] = (KPP_REAL)0.4353179431840180;
+   ros_M[3] = (KPP_REAL)0.1093502252409163e+01;
+   
+  /*~~~> E_i  = Coefficients for error estimator */   
+   ros_E[0] = (KPP_REAL)(-0.2815431932141155);
+   ros_E[1] = (KPP_REAL)(-0.7276199124938920e-01);
+   ros_E[2] = (KPP_REAL)(-0.1082196201495311);
+   ros_E[3] = (KPP_REAL)(-0.1093502252409163e+01);
+   
+  /*~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+   *ros_ELO  = (KPP_REAL)4.0;    
+   
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+   ros_Alpha[0] = (KPP_REAL)0.0;
+   ros_Alpha[1] = (KPP_REAL)0.1145640000000000e+01;
+   ros_Alpha[2] = (KPP_REAL)0.6552168638155900;
+   ros_Alpha[3] = (KPP_REAL)ros_Alpha[2];
+   
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+   ros_Gamma[0] = (KPP_REAL)( 0.5728200000000000);
+   ros_Gamma[1] = (KPP_REAL)(-0.1769193891319233e+01);
+   ros_Gamma[2] = (KPP_REAL)( 0.7592633437920482);
+   ros_Gamma[3] = (KPP_REAL)(-0.1049021087100450);
+
+}  /*  Ros4 */
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Rodas3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "RODAS-3");  
+   
+  /*~~~> Number of stages */
+   *ros_S = 4;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+        A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]  */   
+   ros_A[0] = (KPP_REAL)0.0;
+   ros_A[1] = (KPP_REAL)2.0;
+   ros_A[2] = (KPP_REAL)0.0;
+   ros_A[3] = (KPP_REAL)2.0;
+   ros_A[4] = (KPP_REAL)0.0;
+   ros_A[5] = (KPP_REAL)1.0;
+
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+   ros_C[0] = (KPP_REAL)4.0;
+   ros_C[1] = (KPP_REAL)1.0;
+   ros_C[2] = (KPP_REAL)(-1.0);
+   ros_C[3] = (KPP_REAL)1.0;
+   ros_C[4] = (KPP_REAL)(-1.0); 
+   ros_C[5] = (KPP_REAL)(-2.66666666666667); /* -8/3 */ 
+         
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+   ros_NewF[0]  = 1;
+   ros_NewF[1]  = 0;
+   ros_NewF[2]  = 1;
+   ros_NewF[3]  = 1;
+   
+  /*~~~> M_i = Coefficients for new step solution */
+   ros_M[0] = (KPP_REAL)2.0;
+   ros_M[1] = (KPP_REAL)0.0;
+   ros_M[2] = (KPP_REAL)1.0;
+   ros_M[3] = (KPP_REAL)1.0;
+   
+  /*~~~> E_i  = Coefficients for error estimator */   
+   ros_E[0] = (KPP_REAL)0.0;
+   ros_E[1] = (KPP_REAL)0.0;
+   ros_E[2] = (KPP_REAL)0.0;
+   ros_E[3] = (KPP_REAL)1.0;
+   
+  /*~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+   *ros_ELO  = (KPP_REAL)3.0;
+      
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+   ros_Alpha[0] = (KPP_REAL)0.0;
+   ros_Alpha[1] = (KPP_REAL)0.0;
+   ros_Alpha[2] = (KPP_REAL)1.0;
+   ros_Alpha[3] = (KPP_REAL)1.0;
+   
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+   ros_Gamma[0] = (KPP_REAL)0.5;
+   ros_Gamma[1] = (KPP_REAL)1.5;
+   ros_Gamma[2] = (KPP_REAL)0.0;
+   ros_Gamma[3] = (KPP_REAL)0.0;
+ 
+}  /*  Rodas3 */
+    
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Rodas4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1996)         
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "RODAS-4");  
+   
+  /*~~~> Number of stages */
+    *ros_S = 6;
+
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+    ros_Alpha[0] = (KPP_REAL)0.000;
+    ros_Alpha[1] = (KPP_REAL)0.386;
+    ros_Alpha[2] = (KPP_REAL)0.210; 
+    ros_Alpha[3] = (KPP_REAL)0.630;
+    ros_Alpha[4] = (KPP_REAL)1.000;
+    ros_Alpha[5] = (KPP_REAL)1.000;
+	
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+    ros_Gamma[0] = (KPP_REAL)0.2500000000000000;
+    ros_Gamma[1] = (KPP_REAL)(-0.1043000000000000);
+    ros_Gamma[2] = (KPP_REAL)0.1035000000000000;
+    ros_Gamma[3] = (KPP_REAL)(-0.3620000000000023e-01);
+    ros_Gamma[4] = (KPP_REAL)0.0;
+    ros_Gamma[5] = (KPP_REAL)0.0;
+
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:  A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]  */
+    ros_A[0]  = (KPP_REAL)0.1544000000000000e+01;
+    ros_A[1]  = (KPP_REAL)0.9466785280815826;
+    ros_A[2]  = (KPP_REAL)0.2557011698983284;
+    ros_A[3]  = (KPP_REAL)0.3314825187068521e+01;
+    ros_A[4]  = (KPP_REAL)0.2896124015972201e+01;
+    ros_A[5]  = (KPP_REAL)0.9986419139977817;
+    ros_A[6]  = (KPP_REAL)0.1221224509226641e+01;
+    ros_A[7]  = (KPP_REAL)0.6019134481288629e+01;
+    ros_A[8]  = (KPP_REAL)0.1253708332932087e+02;
+    ros_A[9]  = (KPP_REAL)(-0.6878860361058950);
+    ros_A[10] =  ros_A[6];
+    ros_A[11] =  ros_A[7];
+    ros_A[12] =  ros_A[8];
+    ros_A[13] =  ros_A[9];
+    ros_A[14] =  (KPP_REAL)1.0;
+
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+    ros_C[0]  = (KPP_REAL)(-0.5668800000000000e+01);
+    ros_C[1]  = (KPP_REAL)(-0.2430093356833875e+01);
+    ros_C[2]  = (KPP_REAL)(-0.2063599157091915);
+    ros_C[3]  = (KPP_REAL)(-0.1073529058151375);
+    ros_C[4]  = (KPP_REAL)(-0.9594562251023355e+01);
+    ros_C[5]  = (KPP_REAL)(-0.2047028614809616e+02);
+    ros_C[6]  = (KPP_REAL)( 0.7496443313967647e+01);
+    ros_C[7]  = (KPP_REAL)(-0.1024680431464352e+02);
+    ros_C[8]  = (KPP_REAL)(-0.3399990352819905e+02);
+    ros_C[9]  = (KPP_REAL)( 0.1170890893206160e+02);
+    ros_C[10] = (KPP_REAL)( 0.8083246795921522e+01);
+    ros_C[11] = (KPP_REAL)(-0.7981132988064893e+01);
+    ros_C[12] = (KPP_REAL)(-0.3152159432874371e+02);
+    ros_C[13] = (KPP_REAL)( 0.1631930543123136e+02);
+    ros_C[14] = (KPP_REAL)(-0.6058818238834054e+01);
+
+  /*~~~> M_i  = Coefficients for new step solution */
+    ros_M[0] = ros_A[6];
+    ros_M[1] = ros_A[7];
+    ros_M[2] = ros_A[8];
+    ros_M[3] = ros_A[9];
+    ros_M[4] = (KPP_REAL)1.0;
+    ros_M[5] = (KPP_REAL)1.0;
+
+  /*~~~> E_i  = Coefficients for error estimator */   
+    ros_E[0] = (KPP_REAL)0.0;
+    ros_E[1] = (KPP_REAL)0.0;
+    ros_E[2] = (KPP_REAL)0.0;
+    ros_E[3] = (KPP_REAL)0.0;
+    ros_E[4] = (KPP_REAL)0.0;
+    ros_E[5] = (KPP_REAL)1.0;
+
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+    ros_NewF[0] = 1;
+    ros_NewF[1] = 1;
+    ros_NewF[2] = 1;
+    ros_NewF[3] = 1;
+    ros_NewF[4] = 1;
+    ros_NewF[5] = 1;
+     
+  /*~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+    *ros_ELO = (KPP_REAL)4.0;
+     
+}  /*  Rodas4 */
+
+   
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void DecompTemplate( KPP_REAL A[], int Pivot[], int* ising )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+        Template for the LU decomposition   
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   *ising = KppDecomp ( A );
+  /*~~~> Note: for a full matrix use Lapack:
+      DGETRF( KPP_NVAR, KPP_NVAR, A, KPP_NVAR, Pivot, ising ) */
+    
+   Ndec++;
+
+}  /*  DecompTemplate */
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+ void SolveTemplate( KPP_REAL A[], int Pivot[], KPP_REAL b[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+     Template for the forward/backward substitution (using pre-computed LU decomposition)   
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   KppSolve( A, b );
+  /*~~~> Note: for a full matrix use Lapack:
+      NRHS = 1
+      DGETRS( 'N', KPP_NVAR , NRHS, A, KPP_NVAR, Pivot, b, KPP_NVAR, INFO ) */
+     
+   Nsol++;
+
+}  /*  SolveTemplate */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+    Template for the ODE function call.
+    Updates the rate coefficients (and possibly the fixed species) at each call    
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+   KPP_REAL Told;     
+
+   Told = TIME;
+   TIME = T;
+   Update_SUN();
+   Update_RCONST();
+   Fun( Y, FIX, RCONST, Ydot );
+   TIME = Told;
+     
+   Nfun++;
+   
+}  /*  FunTemplate */
+
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Jcb[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+    Template for the ODE Jacobian call.
+    Updates the rate coefficients (and possibly the fixed species) at each call    
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+  /*~~~> Local variables */
+   KPP_REAL Told;     
+
+   Told = TIME;
+   TIME = T ; 
+   Update_SUN();
+   Update_RCONST();
+   Jac_SP( Y, FIX, RCONST, Jcb );
+   TIME = Told;
+     
+   Njac++;
+
+} /* JacTemplate   */                                    
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.f	(revision 3477)
@@ -0,0 +1,1286 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER Nstp, Nacc, Nrej, Nsng, IERR
+      SAVE Nstp, Nacc, Nrej, Nsng
+
+! TIN - Start Time
+      KPP_REAL TIN
+! TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      KPP_REAL  RPAR(20)
+      INTEGER  IPAR(20)
+      EXTERNAL  FunTemplate, JacTemplate
+
+
+      DO i=1,20
+        IPAR(i) = 0
+        RPAR(i) = 0.0d0
+      ENDDO
+      
+      
+      IPAR(1) = 0       ! non-autonomous
+      IPAR(2) = 1       ! vector tolerances
+      RPAR(3) = STEPMIN ! starting step
+      IPAR(4) = 5       ! choice of the method
+
+      CALL Rosenbrock(VAR,TIN,TOUT,
+     &            ATOL,RTOL,
+     &            FunTemplate,JacTemplate,
+     &            RPAR,IPAR,IERR)
+
+	        
+      Nstp = Nstp + IPAR(13)
+      Nacc = Nacc + IPAR(14)
+      Nrej = Nrej + IPAR(15)
+      Nsng = Nsng + IPAR(18)
+      PRINT*,'Step=',Nstp,' Acc=',Nacc,' Rej=',Nrej,
+     &      ' Singular=',Nsng
+
+
+      IF (IERR.LT.0) THEN
+        print *,'Rosenbrock: Unsucessful step at T=',
+     &          TIN,' (IERR=',IERR,')'
+      ENDIF
+      
+      TIN = RPAR(11) ! Exit time
+      STEPMIN = RPAR(12)
+      
+      RETURN
+      END
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Rosenbrock(Y,Tstart,Tend,
+     &            AbsTol,RelTol,
+     &            ode_Fun,ode_Jac ,
+     &            RPAR,IPAR,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - ode_Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = ode_Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!                  gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!         E. Hairer and G. Wanner
+!         "Solving ODEs II. Stiff and differential-algebraic problems".
+!         Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.             
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!       
+!~~~>      INPUT ARGUMENTS: 
+!       
+!-     Y(NVAR)       = vector of initial conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!        (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol = user precribed accuracy
+!-    SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function, 
+!                                         returns Ydot = Y' = F(T,Y) 
+!-    SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                                         returns Jcb = dF/dY 
+!-    IPAR(1:10)    = integer inputs parameters
+!-    RPAR(1:10)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!        
+!-    Y(NVAR)       -> vector of final states (at T->Tend)
+!-    IPAR(11:20)   -> integer output parameters
+!-    RPAR(11:20)   -> real output parameters
+!-    IERR          -> job status upon return
+!          - succes (positive value) or failure (negative value) -
+!                    =  1 : Success
+!                    = -1 : Improper value for maximal no of steps
+!                    = -2 : Selected Rosenbrock method not implemented
+!                    = -3 : Hmin/Hmax/Hstart must be positive
+!                    = -4 : FacMin/FacMax/FacRej must be positive
+!                    = -5 : Improper tolerance values
+!                    = -6 : No of steps exceeds maximum bound
+!                    = -7 : Step size too small
+!                    = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!    IPAR(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!    IPAR(2)   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!    IPAR(3)  -> maximum number of integration steps
+!              For IPAR(3)=0) the default value of 100000 is used
+!
+!    IPAR(4)  -> selection of a particular Rosenbrock method
+!              = 0 :  default method is Rodas3
+!              = 1 :  method is  Ros2
+!              = 2 :  method is  Ros3 
+!              = 3 :  method is  Ros4 
+!              = 4 :  method is  Rodas3
+!              = 5:   method is  Rodas4
+!
+!    RPAR(1)  -> Hmin, lower bound for the integration step size
+!                It is strongly recommended to keep Hmin = ZERO 
+!    RPAR(2)  -> Hmax, upper bound for the integration step size
+!    RPAR(3)  -> Hstart, starting value for the integration step size
+!                
+!    RPAR(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RPAR(5)  -> FacMin,upper bound on step increase factor (default=6)
+!    RPAR(6)  -> FacRej, step decrease factor after multiple rejections
+!                        (default=0.1)
+!    RPAR(7)  -> FacSafe, by which the new step is slightly smaller 
+!                  than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the corrent no. of fcn calls
+!         to previous value of IPAR(11), and similar for the other params.
+!         Set IPAR(11:20) = 0 before call to avoid this accumulation.
+!
+!    IPAR(11) = No. of function calls
+!    IPAR(12) = No. of jacobian calls
+!    IPAR(13) = No. of steps
+!    IPAR(14) = No. of accepted steps
+!    IPAR(15) = No. of rejected steps (except at the beginning)
+!    IPAR(16) = No. of LU decompositions
+!    IPAR(17) = No. of forward/backward substitutions
+!    IPAR(18) = No. of singular matrix decompositions
+!
+!    RPAR(11)  -> Texit, the time corresponding to the 
+!                        computed Y upon return
+!    RPAR(12)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      
+      KPP_REAL Tstart,Tend
+      KPP_REAL Y(KPP_NVAR),AbsTol(KPP_NVAR),RelTol(KPP_NVAR)
+      INTEGER IPAR(20)
+      KPP_REAL RPAR(20)
+      INTEGER IERR
+!~~~>  The method parameters      
+      INTEGER Smax
+      PARAMETER (Smax = 6)
+      INTEGER  Method, ros_S
+      KPP_REAL ros_M(Smax), ros_E(Smax)
+      KPP_REAL ros_A(Smax*(Smax-1)/2), ros_C(Smax*(Smax-1)/2)
+      KPP_REAL ros_Alpha(Smax), ros_Gamma(Smax), ros_ELO
+      LOGICAL  ros_NewF(Smax)
+      CHARACTER*12 ros_Name
+!~~~>  Local variables     
+      KPP_REAL Roundoff,FacMin,FacMax,FacRej,FacSafe
+      KPP_REAL Hmin, Hmax, Hstart, Hexit
+      KPP_REAL Texit
+      INTEGER i, UplimTol, Max_no_steps
+      LOGICAL Autonomous, VectorTol
+!~~~>   Statistics on the work performed
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+!~~~>   Parameters
+      KPP_REAL ZERO, ONE, DeltaMin 
+      PARAMETER (ZERO = 0.0d0)
+      PARAMETER (ONE  = 1.0d0)
+      PARAMETER (DeltaMin = 1.0d-5)
+!~~~>   Functions
+      EXTERNAL ode_Fun, ode_Jac
+      KPP_REAL WLAMCH, ros_ErrorNorm
+      EXTERNAL WLAMCH, ros_ErrorNorm
+
+!~~~>  Initialize statistics
+      Nfun = IPAR(11)
+      Njac = IPAR(12)
+      Nstp = IPAR(13)
+      Nacc = IPAR(14)
+      Nrej = IPAR(15)
+      Ndec = IPAR(16)
+      Nsol = IPAR(17)
+      Nsng = IPAR(18)
+      
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+      Autonomous = .NOT.(IPAR(1).EQ.0)
+
+!~~~>  For Scalar tolerances (IPAR(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!      For Vector tolerances (IPAR(2).EQ.0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (IPAR(2).EQ.0) THEN
+         VectorTol = .TRUE.
+	 UplimTol  = KPP_NVAR
+      ELSE 
+         VectorTol = .FALSE.
+	 UplimTol  = 1
+      END IF
+      
+!~~~>   The maximum number of steps admitted
+      IF (IPAR(3).EQ.0) THEN
+         Max_no_steps = 100000
+      ELSEIF (Max_no_steps.GT.0) THEN
+         Max_no_steps=IPAR(3)
+      ELSE 
+         WRITE(6,*)'User-selected max no. of steps: IPAR(3)=',IPAR(3)
+         CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+
+!~~~>  The particular Rosenbrock method chosen
+      IF (IPAR(4).EQ.0) THEN
+         Method = 3
+      ELSEIF ( (IPAR(4).GE.1).AND.(IPAR(4).LE.5) ) THEN
+         Method = IPAR(4)
+      ELSE  
+         WRITE (6,*) 'User-selected Rosenbrock method: IPAR(4)=', Method
+         CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+      
+!~~~>  Unit roundoff (1+Roundoff>1)  
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RPAR(1).EQ.ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RPAR(1).GT.ZERO) THEN 
+         Hmin = RPAR(1)
+      ELSE	 
+         WRITE (6,*) 'User-selected Hmin: RPAR(1)=', RPAR(1)
+         CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RPAR(2).EQ.ZERO) THEN
+         Hmax = ABS(Tend-Tstart)
+      ELSEIF (RPAR(2).GT.ZERO) THEN
+         Hmax = MIN(ABS(RPAR(2)),ABS(Tend-Tstart))
+      ELSE	 
+         WRITE (6,*) 'User-selected Hmax: RPAR(2)=', RPAR(2)
+         CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Starting step size: (positive value)
+      IF (RPAR(3).EQ.ZERO) THEN
+         Hstart = MAX(Hmin,DeltaMin)
+      ELSEIF (RPAR(3).GT.ZERO) THEN
+         Hstart = MIN(ABS(RPAR(3)),ABS(Tend-Tstart))
+      ELSE	 
+         WRITE (6,*) 'User-selected Hstart: RPAR(3)=', RPAR(3)
+         CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax 
+      IF (RPAR(4).EQ.ZERO) THEN
+         FacMin = 0.2d0
+      ELSEIF (RPAR(4).GT.ZERO) THEN
+         FacMin = RPAR(4)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacMin: RPAR(4)=', RPAR(4)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+      IF (RPAR(5).EQ.ZERO) THEN
+         FacMax = 6.0d0
+      ELSEIF (RPAR(5).GT.ZERO) THEN
+         FacMax = RPAR(5)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacMax: RPAR(5)=', RPAR(5)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RPAR(6).EQ.ZERO) THEN
+         FacRej = 0.1d0
+      ELSEIF (RPAR(6).GT.ZERO) THEN
+         FacRej = RPAR(6)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacRej: RPAR(6)=', RPAR(6)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RPAR(7).EQ.ZERO) THEN
+         FacSafe = 0.9d0
+      ELSEIF (RPAR(7).GT.ZERO) THEN
+         FacSafe = RPAR(7)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacSafe: RPAR(7)=', RPAR(7)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Check if tolerances are reasonable
+       DO i=1,UplimTol
+         IF ( (AbsTol(i).LE.ZERO) .OR. (RelTol(i).LE.10.d0*Roundoff)
+     &          .OR. (RelTol(i).GE.1.0d0) ) THEN
+            WRITE (6,*) ' AbsTol(',i,') = ',AbsTol(i)
+            WRITE (6,*) ' RelTol(',i,') = ',RelTol(i)
+            CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+	    RETURN
+         END IF
+       END DO
+     
+ 
+!~~~>   Initialize the particular Rosenbrock method
+
+      IF (Method .EQ. 1) THEN
+         CALL Ros2(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 2) THEN
+         CALL Ros3(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 3) THEN
+         CALL Ros4(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 4) THEN
+         CALL Rodas3(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 5) THEN
+         CALL Rodas4(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSE
+         WRITE (6,*) 'Unknown Rosenbrock method: IPAR(4)=', Method
+         CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR) 
+	 RETURN        
+      END IF
+
+!~~~>  CALL Rosenbrock method   
+      CALL RosenbrockIntegrator(Y,Tstart,Tend,Texit,
+     &      AbsTol,RelTol,
+     &      ode_Fun,ode_Jac ,
+!  Rosenbrock method coefficients     
+     &      ros_S, ros_M, ros_E, ros_A, ros_C, 
+     &      ros_Alpha, ros_Gamma, ros_ELO, ros_NewF,
+!  Integration parameters
+     &      Autonomous, VectorTol, Max_no_steps,
+     &      Roundoff, Hmin, Hmax, Hstart, Hexit,
+     &      FacMin, FacMax, FacRej, FacSafe,  
+!  Error indicator
+     &      IERR)
+
+
+!~~~>  Collect run statistics
+      IPAR(11) = Nfun
+      IPAR(12) = Njac
+      IPAR(13) = Nstp
+      IPAR(14) = Nacc
+      IPAR(15) = Nrej
+      IPAR(16) = Ndec
+      IPAR(17) = Nsol
+      IPAR(18) = Nsng
+!~~~> Last T and H
+      RPAR(11) = Texit
+      RPAR(12) = Hexit       
+      
+      RETURN
+      END  !  SUBROUTINE Rosenbrock
+
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE RosenbrockIntegrator(Y,Tstart,Tend,T,
+     &      AbsTol,RelTol,
+     &      ode_Fun,ode_Jac ,
+!~~~> Rosenbrock method coefficients     
+     &      ros_S, ros_M, ros_E, ros_A, ros_C, 
+     &      ros_Alpha, ros_Gamma, ros_ELO, ros_NewF,
+!~~~> Integration parameters
+     &      Autonomous, VectorTol, Max_no_steps,
+     &      Roundoff, Hmin, Hmax, Hstart, Hexit,
+     &      FacMin, FacMax, FacRej, FacSafe,  
+!~~~> Error indicator
+     &      IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method 
+!            defined by ros_S (no of stages)  
+!            and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      
+!~~~> Input: the initial condition at Tstart; Output: the solution at T      
+      KPP_REAL Y(KPP_NVAR)
+!~~~> Input: integration interval   
+      KPP_REAL Tstart,Tend         
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+      KPP_REAL T         
+!~~~> Input: tolerances            
+      KPP_REAL  AbsTol(KPP_NVAR), RelTol(KPP_NVAR)
+!~~~> Input: ode function and its Jacobian            
+      EXTERNAL ode_Fun, ode_Jac
+!~~~> Input: The Rosenbrock method parameters      
+      INTEGER  ros_S
+      KPP_REAL ros_M(ros_S), ros_E(ros_S) 
+      KPP_REAL ros_A(ros_S*(ros_S-1)/2), ros_C(ros_S*(ros_S-1)/2)
+      KPP_REAL ros_Alpha(ros_S), ros_Gamma(ros_S), ros_ELO
+      LOGICAL ros_NewF(ros_S)
+!~~~> Input: integration parameters      
+      LOGICAL Autonomous, VectorTol
+      KPP_REAL Hstart, Hmin, Hmax
+      INTEGER Max_no_steps
+      KPP_REAL Roundoff, FacMin, FacMax, FacRej, FacSafe 
+!~~~> Output: last accepted step      
+      KPP_REAL Hexit 
+!~~~> Output: Error indicator
+      INTEGER IERR
+! ~~~~ Local variables           
+      KPP_REAL Ynew(KPP_NVAR), Fcn0(KPP_NVAR), Fcn(KPP_NVAR),
+     &       K(KPP_NVAR*ros_S), dFdT(KPP_NVAR),
+     &       Jac0(KPP_LU_NONZERO), Ghimj(KPP_LU_NONZERO)
+      KPP_REAL H, Hnew, HC, HG, Fac, Tau 
+      KPP_REAL Err, Yerr(KPP_NVAR)
+      INTEGER Pivot(KPP_NVAR), Direction, ioffset, j, istage
+      LOGICAL RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+      KPP_REAL ZERO, ONE, DeltaMin 
+      PARAMETER (ZERO = 0.0d0)
+      PARAMETER (ONE  = 1.0d0)
+      PARAMETER (DeltaMin = 1.0d-5)
+!~~~>  Locally called functions
+      KPP_REAL WLAMCH, ros_ErrorNorm
+      EXTERNAL WLAMCH, ros_ErrorNorm
+!~~~>  Statistics on the work performed
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      
+!~~~>  INITIAL PREPARATIONS
+      T = Tstart
+      Hexit = 0.0d0
+      H = MIN(Hstart,Hmax) 
+      IF (ABS(H).LE.10.d0*Roundoff) THEN
+           H = DeltaMin
+      END IF	   
+      
+      IF (Tend .GE. Tstart) THEN
+        Direction = +1
+      ELSE
+        Direction = -1
+      END IF		
+
+      RejectLastH=.FALSE.
+      RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+      DO WHILE ( (Direction.GT.0).AND.((T-Tend)+Roundoff.LE.ZERO)
+     &     .OR. (Direction.LT.0).AND.((Tend-T)+Roundoff.LE.ZERO) ) 
+         
+      IF ( Nstp.GT.Max_no_steps ) THEN  ! Too many steps
+	CALL ros_ErrorMsg(-6,T,H,IERR)
+	RETURN
+      END IF
+      IF ( ((T+0.1d0*H).EQ.T).OR.(H.LE.Roundoff) ) THEN  ! Step size too small
+	CALL ros_ErrorMsg(-7,T,H,IERR)
+	RETURN
+      END IF
+      
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+      Hexit = H
+      H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+      CALL ode_Fun(T,Y,Fcn0)
+
+!~~~>  Compute the function derivative with respect to T
+      IF (.NOT.Autonomous) THEN
+         CALL ros_FunTimeDerivative ( T, Roundoff, Y, 
+     &                       Fcn0, ode_Fun, dFdT )
+      END IF
+  
+!~~~>   Compute the Jacobian at current time
+      CALL ode_Jac(T,Y,Jac0)
+ 
+!~~~>  Repeat step calculation until current step accepted
+      DO WHILE (.TRUE.) ! WHILE STEP NOT ACCEPTED
+
+      
+      CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1),
+     &              Jac0,Ghimj,Pivot,Singular)
+      IF (Singular) THEN ! More than 5 consecutive failed decompositions
+	 CALL ros_ErrorMsg(-8,T,H,IERR)
+	 RETURN
+      END IF
+
+!~~~>   Compute the stages
+      DO istage = 1, ros_S
+         
+	 ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+KPP_NVAR)
+	 ioffset = KPP_NVAR*(istage-1)
+	 
+	 ! For the 1st istage the function has been computed previously
+	 IF ( istage.EQ.1 ) THEN
+	   CALL WCOPY(KPP_NVAR,Fcn0,1,Fcn,1)
+	 ! istage>1 and a new function evaluation is needed at the current istage
+	 ELSEIF ( ros_NewF(istage) ) THEN
+	   CALL WCOPY(KPP_NVAR,Y,1,Ynew,1)
+	   DO j = 1, istage-1
+	     CALL WAXPY(KPP_NVAR,ros_A((istage-1)*(istage-2)/2+j),
+     &                   K(KPP_NVAR*(j-1)+1),1,Ynew,1) 
+	   END DO
+	   Tau = T + ros_Alpha(istage)*Direction*H
+           CALL ode_Fun(Tau,Ynew,Fcn)
+	 END IF ! if istage.EQ.1 elseif ros_NewF(istage)
+	 CALL WCOPY(KPP_NVAR,Fcn,1,K(ioffset+1),1)
+	 DO j = 1, istage-1
+	   HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+	   CALL WAXPY(KPP_NVAR,HC,K(KPP_NVAR*(j-1)+1),1,K(ioffset+1),1)
+	 END DO
+         IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+           HG = Direction*H*ros_Gamma(istage)
+	   CALL WAXPY(KPP_NVAR,HG,dFdT,1,K(ioffset+1),1)
+         END IF
+         CALL SolveTemplate(Ghimj, Pivot, K(ioffset+1))
+	 
+      END DO  ! istage	    
+	    
+
+!~~~>  Compute the new solution 
+      CALL WCOPY(KPP_NVAR,Y,1,Ynew,1)
+      DO j=1,ros_S
+	 CALL WAXPY(KPP_NVAR,ros_M(j),K(KPP_NVAR*(j-1)+1),1,Ynew,1)
+      END DO
+
+!~~~>  Compute the error estimation 
+      CALL WSCAL(KPP_NVAR,ZERO,Yerr,1)
+      DO j=1,ros_S        
+	CALL WAXPY(KPP_NVAR,ros_E(j),K(KPP_NVAR*(j-1)+1),1,Yerr,1)
+      END DO 
+      Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+      Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+      Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+      Nstp = Nstp+1
+      IF ( (Err.LE.ONE).OR.(H.LE.Hmin) ) THEN  !~~~> Accept step
+         Nacc = Nacc+1
+	 CALL WCOPY(KPP_NVAR,Ynew,1,Y,1)
+         T = T + Direction*H
+	 Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+         IF (RejectLastH) THEN  ! No step size increase after a rejected step
+	    Hnew = MIN(Hnew,H) 
+	 END IF   
+         RejectLastH = .FALSE.  
+         RejectMoreH = .FALSE.
+         H = Hnew
+	 GOTO 101  ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+      ELSE                 !~~~> Reject step
+         IF (RejectMoreH) THEN
+	    Hnew=H*FacRej
+	 END IF   
+         RejectMoreH = RejectLastH
+         RejectLastH = .TRUE.
+         H = Hnew
+         IF (Nacc.GE.1) THEN
+	    Nrej = Nrej+1
+	 END IF    
+      END IF ! Err <= 1
+
+      END DO ! LOOP: WHILE STEP NOT ACCEPTED
+
+101   CONTINUE
+
+      END DO ! Time loop    
+      
+!~~~> Succesful exit
+      IERR = 1  !~~~> The integration was successful
+
+      RETURN
+      END  !  SUBROUTINE RosenbrockIntegrator
+ 
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, 
+     &                      AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+
+! Input arguments   
+      KPP_REAL Y(KPP_NVAR), Ynew(KPP_NVAR), Yerr(KPP_NVAR)
+      KPP_REAL AbsTol(KPP_NVAR), RelTol(KPP_NVAR)   
+      LOGICAL  VectorTol
+! Local variables     
+      KPP_REAL Err, Scale, Ymax, ZERO    
+      INTEGER i
+      PARAMETER (ZERO = 0.0d0)
+      
+      Err = ZERO
+      DO i=1,KPP_NVAR
+	Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+        IF (VectorTol) THEN
+          Scale = AbsTol(i)+RelTol(i)*Ymax
+        ELSE
+          Scale = AbsTol(1)+RelTol(1)*Ymax
+        END IF
+        Err = Err+(Yerr(i)/Scale)**2
+      END DO
+      Err  = SQRT(Err/KPP_NVAR)
+
+      ros_ErrorNorm = Err
+      
+      RETURN
+      END ! FUNCTION ros_ErrorNorm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, 
+     &                       Fcn0, ode_Fun, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+
+!~~~> Input arguments   
+      KPP_REAL T, Roundoff, Y(KPP_NVAR), Fcn0(KPP_NVAR) 
+      EXTERNAL ode_Fun  
+!~~~> Output arguments      
+      KPP_REAL dFdT(KPP_NVAR)   
+!~~~> Global variables     
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng     
+!~~~> Local variables     
+      KPP_REAL Delta, DeltaMin, ONE     
+      PARAMETER ( DeltaMin = 1.0d-6 )   
+      PARAMETER ( ONE = 1.0d0 )
+      
+      Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+      CALL ode_Fun(T+Delta,Y,dFdT)
+      CALL WAXPY(KPP_NVAR,(-ONE),Fcn0,1,dFdT,1)
+      CALL WSCAL(KPP_NVAR,(ONE/Delta),dFdT,1)
+
+      RETURN
+      END ! SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, 
+     &                    Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!         "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!          -half the step size if LU decomposition fails and retry
+!          -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      
+!~~~> Input arguments      
+      KPP_REAL gam, Jac0(KPP_LU_NONZERO)
+      INTEGER  Direction
+!~~~> Output arguments      
+      KPP_REAL Ghimj(KPP_LU_NONZERO)
+      LOGICAL  Singular
+      INTEGER  Pivot(KPP_NVAR)
+!~~~> Inout arguments      
+      KPP_REAL H      ! step size is decreased when LU fails
+!~~~> Global variables     
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng     
+!~~~> Local variables     
+      INTEGER  i, ising, Nconsecutive
+      KPP_REAL  ghinv, ONE, HALF
+      PARAMETER ( ONE  = 1.0d0 )
+      PARAMETER ( HALF = 0.5d0 )
+      
+      Nconsecutive = 0
+      Singular = .TRUE.
+      
+      DO WHILE (Singular)
+      
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+        CALL WCOPY(KPP_LU_NONZERO,Jac0,1,Ghimj,1)
+        CALL WSCAL(KPP_LU_NONZERO,(-ONE),Ghimj,1)
+        ghinv = ONE/(Direction*H*gam)
+        DO i=1,KPP_NVAR
+          Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+        END DO
+!~~~>    Compute LU decomposition 
+        CALL DecompTemplate( Ghimj, Pivot, ising )
+        IF (ising .EQ. 0) THEN
+!~~~>    If successful done 
+	  Singular = .FALSE. 
+	ELSE ! ising .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+          Nsng = Nsng+1
+          Nconsecutive = Nconsecutive+1
+	  Singular = .TRUE. 
+	  PRINT*,'Warning: LU Decomposition returned ising = ',ising
+          IF (Nconsecutive.LE.5) THEN ! Less than 5 consecutive failed decompositions
+            H = H*HALF
+	  ELSE  ! More than 5 consecutive failed decompositions
+ 	    RETURN
+          END IF  ! Nconsecutive
+        END IF	! ising 
+	 
+      END DO ! WHILE Singular
+
+      RETURN
+      END ! SUBROUTINE ros_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+      KPP_REAL T, H
+      INTEGER IERR, Code
+      
+      IERR = Code
+      WRITE(6,*) 
+     &   'Forced exit from Rosenbrock due to the following error:' 
+     
+      IF    (Code .EQ. -1) THEN   
+         WRITE(6,*) '--> Improper value for maximal no of steps'
+      ELSEIF (Code .EQ. -2) THEN   
+         WRITE(6,*) '--> Selected Rosenbrock method not implemented'
+      ELSEIF (Code .EQ. -3) THEN   
+         WRITE(6,*) '--> Hmin/Hmax/Hstart must be positive'
+      ELSEIF (Code .EQ. -4) THEN   
+         WRITE(6,*) '--> FacMin/FacMax/FacRej must be positive'
+      ELSEIF (Code .EQ. -5) THEN
+         WRITE(6,*) '--> Improper tolerance values'
+      ELSEIF (Code .EQ. -6) THEN
+         WRITE(6,*) '--> No of steps exceeds maximum bound'
+      ELSEIF (Code .EQ. -7) THEN
+         WRITE(6,*) '--> Step size too small: T + 10*H = T',
+     &                ' or H < Roundoff'
+      ELSEIF (Code .EQ. -8) THEN   
+         WRITE(6,*) '--> Matrix is repeatedly singular'
+      ELSE
+         WRITE(6,102) 'Unknown Error code: ',Code
+      END IF
+      
+  102 FORMAT('       ',A,I4)    
+      WRITE(6,103) T, H
+      
+  103 FORMAT('        T=',E15.7,' and H=',E15.7)    
+     
+      RETURN
+      END
+      
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Ros2 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &                ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=2)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      DOUBLE PRECISION g
+      
+       g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+      
+!~~~> Name of the method
+       ros_Name = 'ROS-2'      
+!~~~> Number of stages
+       ros_S = 2
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+      
+       ros_A(1) = (1.d0)/g
+       ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+       ros_NewF(1) = .TRUE.
+       ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+       ros_M(1)= (3.d0)/(2.d0*g)
+       ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator       
+       ros_E(1) = 1.d0/(2.d0*g)
+       ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus one
+       ros_ELO = 2.0d0       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+       ros_Alpha(1) = 0.0d0
+       ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+       ros_Gamma(1) = g
+       ros_Gamma(2) =-g
+      
+      RETURN
+      END ! SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Ros3 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &               ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=3)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      
+!~~~> Name of the method
+      ros_Name = 'ROS-3'      
+!~~~> Number of stages
+      ros_S = 3
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+      ros_A(1)= 1.d0
+      ros_A(2)= 1.d0
+      ros_A(3)= 0.d0
+
+      ros_C(1) = -0.10156171083877702091975600115545d+01
+      ros_C(2) =  0.40759956452537699824805835358067d+01
+      ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+      ros_NewF(1) = .TRUE.
+      ros_NewF(2) = .TRUE.
+      ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+      ros_M(1) =  0.1d+01
+      ros_M(2) =  0.61697947043828245592553615689730d+01
+      ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator       
+      ros_E(1) =  0.5d+00
+      ros_E(2) = -0.29079558716805469821718236208017d+01
+      ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+      ros_ELO = 3.0d0       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+      ros_Alpha(1)= 0.0d+00
+      ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+      ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+      ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+      ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+      ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+      RETURN
+      END ! SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+      SUBROUTINE Ros4 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &               ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!         SPRINGER-VERLAG (1990)               
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=4)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      
+!~~~> Name of the method
+      ros_Name = 'ROS-4'      
+!~~~> Number of stages
+      ros_S = 4
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+      ros_A(1) = 0.2000000000000000d+01
+      ros_A(2) = 0.1867943637803922d+01
+      ros_A(3) = 0.2344449711399156d+00
+      ros_A(4) = ros_A(2)
+      ros_A(5) = ros_A(3)
+      ros_A(6) = 0.0D0
+
+      ros_C(1) =-0.7137615036412310d+01
+      ros_C(2) = 0.2580708087951457d+01
+      ros_C(3) = 0.6515950076447975d+00
+      ros_C(4) =-0.2137148994382534d+01
+      ros_C(5) =-0.3214669691237626d+00
+      ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+      ros_NewF(1)  = .TRUE.
+      ros_NewF(2)  = .TRUE.
+      ros_NewF(3)  = .TRUE.
+      ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+      ros_M(1) = 0.2255570073418735d+01
+      ros_M(2) = 0.2870493262186792d+00
+      ros_M(3) = 0.4353179431840180d+00
+      ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator       
+      ros_E(1) =-0.2815431932141155d+00
+      ros_E(2) =-0.7276199124938920d-01
+      ros_E(3) =-0.1082196201495311d+00
+      ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+      ros_ELO  = 4.0d0       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+      ros_Alpha(1) = 0.D0
+      ros_Alpha(2) = 0.1145640000000000d+01
+      ros_Alpha(3) = 0.6552168638155900d+00
+      ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+      ros_Gamma(1) = 0.5728200000000000d+00
+      ros_Gamma(2) =-0.1769193891319233d+01
+      ros_Gamma(3) = 0.7592633437920482d+00
+      ros_Gamma(4) =-0.1049021087100450d+00
+      RETURN
+      END ! SUBROUTINE Ros4
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Rodas3 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &                ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=4)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      
+!~~~> Name of the method
+      ros_Name = 'RODAS-3'      
+!~~~> Number of stages
+      ros_S = 4
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+      ros_A(1) = 0.0d+00
+      ros_A(2) = 2.0d+00
+      ros_A(3) = 0.0d+00
+      ros_A(4) = 2.0d+00
+      ros_A(5) = 0.0d+00
+      ros_A(6) = 1.0d+00
+
+      ros_C(1) = 4.0d+00
+      ros_C(2) = 1.0d+00
+      ros_C(3) =-1.0d+00
+      ros_C(4) = 1.0d+00
+      ros_C(5) =-1.0d+00 
+      ros_C(6) =-(8.0d+00/3.0d+00) 
+               
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+      ros_NewF(1)  = .TRUE.
+      ros_NewF(2)  = .FALSE.
+      ros_NewF(3)  = .TRUE.
+      ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+      ros_M(1) = 2.0d+00
+      ros_M(2) = 0.0d+00
+      ros_M(3) = 1.0d+00
+      ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator       
+      ros_E(1) = 0.0d+00
+      ros_E(2) = 0.0d+00
+      ros_E(3) = 0.0d+00
+      ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+      ros_ELO  = 3.0d+00       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+      ros_Alpha(1) = 0.0d+00
+      ros_Alpha(2) = 0.0d+00
+      ros_Alpha(3) = 1.0d+00
+      ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+      ros_Gamma(1) = 0.5d+00
+      ros_Gamma(2) = 1.5d+00
+      ros_Gamma(3) = 0.0d+00
+      ros_Gamma(4) = 0.0d+00
+      RETURN
+      END ! SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Rodas4 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &                 ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!         SPRINGER-VERLAG (1996)               
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=6)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+
+!~~~> Name of the method
+       ros_Name = 'RODAS-4'      
+!~~~> Number of stages
+       ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+       ros_Alpha(1) = 0.000d0
+       ros_Alpha(2) = 0.386d0
+       ros_Alpha(3) = 0.210d0 
+       ros_Alpha(4) = 0.630d0
+       ros_Alpha(5) = 1.000d0
+       ros_Alpha(6) = 1.000d0
+	
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+       ros_Gamma(1) = 0.2500000000000000d+00
+       ros_Gamma(2) =-0.1043000000000000d+00
+       ros_Gamma(3) = 0.1035000000000000d+00
+       ros_Gamma(4) =-0.3620000000000023d-01
+       ros_Gamma(5) = 0.0d0
+       ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!                                    C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+       ros_A(1) = 0.1544000000000000d+01
+       ros_A(2) = 0.9466785280815826d+00
+       ros_A(3) = 0.2557011698983284d+00
+       ros_A(4) = 0.3314825187068521d+01
+       ros_A(5) = 0.2896124015972201d+01
+       ros_A(6) = 0.9986419139977817d+00
+       ros_A(7) = 0.1221224509226641d+01
+       ros_A(8) = 0.6019134481288629d+01
+       ros_A(9) = 0.1253708332932087d+02
+       ros_A(10) =-0.6878860361058950d+00
+       ros_A(11) = ros_A(7)
+       ros_A(12) = ros_A(8)
+       ros_A(13) = ros_A(9)
+       ros_A(14) = ros_A(10)
+       ros_A(15) = 1.0d+00
+
+       ros_C(1) =-0.5668800000000000d+01
+       ros_C(2) =-0.2430093356833875d+01
+       ros_C(3) =-0.2063599157091915d+00
+       ros_C(4) =-0.1073529058151375d+00
+       ros_C(5) =-0.9594562251023355d+01
+       ros_C(6) =-0.2047028614809616d+02
+       ros_C(7) = 0.7496443313967647d+01
+       ros_C(8) =-0.1024680431464352d+02
+       ros_C(9) =-0.3399990352819905d+02
+       ros_C(10) = 0.1170890893206160d+02
+       ros_C(11) = 0.8083246795921522d+01
+       ros_C(12) =-0.7981132988064893d+01
+       ros_C(13) =-0.3152159432874371d+02
+       ros_C(14) = 0.1631930543123136d+02
+       ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+       ros_M(1) = ros_A(7)
+       ros_M(2) = ros_A(8)
+       ros_M(3) = ros_A(9)
+       ros_M(4) = ros_A(10)
+       ros_M(5) = 1.0d+00
+       ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator       
+       ros_E(1) = 0.0d+00
+       ros_E(2) = 0.0d+00
+       ros_E(3) = 0.0d+00
+       ros_E(4) = 0.0d+00
+       ros_E(5) = 0.0d+00
+       ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+       ros_NewF(1) = .TRUE.
+       ros_NewF(2) = .TRUE.
+       ros_NewF(3) = .TRUE.
+       ros_NewF(4) = .TRUE.
+       ros_NewF(5) = .TRUE.
+       ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+       ros_ELO = 4.0d0
+     
+      RETURN
+      END ! SUBROUTINE Rodas4
+
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE DecompTemplate( A, Pivot, ising )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the LU decomposition   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Inout variables     
+      KPP_REAL A(KPP_LU_NONZERO)
+!~~~> Output variables     
+      INTEGER Pivot(KPP_NVAR), ising
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+      
+      CALL KppDecomp ( A, ising )
+!~~~> Note: for a full matrix use Lapack:
+!        CALL  DGETRF( KPP_NVAR, KPP_NVAR, A, KPP_NVAR, Pivot, ising ) 
+    
+      Ndec = Ndec + 1
+
+      END ! SUBROUTINE DecompTemplate
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE SolveTemplate( A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Input variables     
+      KPP_REAL A(KPP_LU_NONZERO)
+      INTEGER Pivot(KPP_NVAR)
+!~~~> InOut variables     
+      KPP_REAL b(KPP_NVAR)
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+      
+      CALL KppSolve( A, b )
+!~~~> Note: for a full matrix use Lapack:
+!        NRHS = 1
+!        CALL  DGETRS( 'N', KPP_NVAR , NRHS, A, KPP_NVAR, Pivot, b, KPP_NVAR, INFO )
+     
+      Nsol = Nsol+1
+
+      END ! SUBROUTINE SolveTemplate
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Input variables     
+      KPP_REAL T, Y(KPP_NVAR)
+!~~~> Output variables     
+      KPP_REAL Ydot(KPP_NVAR)
+!~~~> Local variables
+      KPP_REAL Told     
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y, FIX, RCONST, Ydot )
+      TIME = Told
+     
+      Nfun = Nfun+1
+      
+      RETURN
+      END ! SUBROUTINE FunTemplate
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Input variables     
+      KPP_REAL T, Y(KPP_NVAR)
+!~~~> Output variables     
+      KPP_REAL Jcb(KPP_LU_NONZERO)
+!~~~> Local variables
+      KPP_REAL Told     
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+
+      Told = TIME
+      TIME = T   
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, Jcb )
+      TIME = Told
+     
+      Njac = Njac+1
+
+      RETURN
+      END !  SUBROUTINE JacTemplate                                                                          
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.f90	(revision 3477)
@@ -0,0 +1,1308 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Rosenbrock - Implementation of several Rosenbrock methods:             !
+!               * Ros2                                                    !
+!               * Ros3                                                    !
+!               * Ros4                                                    !
+!               * Rodas3                                                  !
+!               * Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !                               !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NFIX, NSPEC, LU_NONZERO
+  USE KPP_ROOT_Global
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the Rosenbrock method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+                        Nrej=5, Ndec=6, Nsol=7, Nsng=8, &
+                        Ntexit=1, Nhexit=2, Nhnew = 3
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+
+   INTEGER, SAVE :: Ntotal = 0
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+   ICNTRL(1) = 0	! 0 - non-autonomous, 1 - autonomous
+   ICNTRL(2) = 0	! 0 - vector tolerances, 1 - scalars
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+
+   CALL Rosenbrock(NVAR,VAR,TIN,TOUT,   &
+         ATOL,RTOL,                &
+         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+
+   !~~~> Debug option: show no of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+   STEPMIN = RSTATUS(Nhexit)
+   ! if optional parameters are given for output they 
+   ! are updated with the return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(IERR_U))    IERR_U       = IERR
+
+END SUBROUTINE INTEGRATE
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE Rosenbrock(N,Y,Tstart,Tend, &
+           AbsTol,RelTol,              &
+           RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    The codes contained in the book inspired this implementation.
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(N)    = vector of initial conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE  Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE  Jac( T, Y, Jcb ) = Jacobian of the ODE function,
+!                       returns Jcb = dFun/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(N)    -> vector of final states (at T->Tend)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    IERR            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1) = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :    Rodas3 (default)
+!        = 1 :    Ros2
+!        = 2 :    Ros3
+!        = 3 :    Ros4
+!        = 4 :    Rodas3
+!        = 5 :    Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0) the default value of 100000 is used
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                          (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!         than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IDID        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  USE KPP_ROOT_Parameters
+  USE KPP_ROOT_LinearAlgebra
+  IMPLICIT NONE
+
+!~~~>  Arguments
+   INTEGER,       INTENT(IN)    :: N
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+   KPP_REAL, INTENT(IN)    :: Tstart,Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(N),RelTol(N)
+   INTEGER,       INTENT(IN)    :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER,       INTENT(INOUT) :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)   :: IERR
+!~~~>  Parameters of the Rosenbrock method, up to 6 stages
+   INTEGER ::  ros_S, rosMethod
+   INTEGER, PARAMETER :: RS2=1, RS3=2, RS4=3, RD3=4, RD4=5, RG3=6
+   KPP_REAL :: ros_A(15), ros_C(15), ros_M(6), ros_E(6), &
+                    ros_Alpha(6), ros_Gamma(6), ros_ELO
+   LOGICAL :: ros_NewF(6)
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Local variables
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart
+   KPP_REAL :: Texit
+   INTEGER       :: i, UplimTol, Max_no_steps
+   LOGICAL       :: Autonomous, VectorTol
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0_dp, ONE  = 1.0_dp
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0E-5_dp
+
+!~~~>  Initialize statistics
+   ISTATUS(1:8) = 0
+   RSTATUS(1:3) = ZERO
+
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+      UplimTol  = N
+   ELSE
+      VectorTol = .FALSE.
+      UplimTol  = 1
+   END IF
+
+!~~~>   Initialize the particular Rosenbrock method selected
+   SELECT CASE (ICNTRL(3))
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (0,4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE (6)
+       CALL Rang3
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=',ICNTRL(3) 
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+       RETURN
+   END SELECT
+
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = 200000
+   ELSEIF (ICNTRL(4) > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE
+      PRINT * ,'User-selected max no. of steps: ICNTRL(4)=',ICNTRL(4)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN
+      Hmin = RCNTRL(1)
+   ELSE
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2_dp
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0_dp
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1_dp
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9_dp
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.0_dp*Roundoff) &
+         .OR. (RelTol(i) >= 1.0_dp) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+
+
+!~~~>  CALL Rosenbrock method
+   CALL ros_Integrator(Y, Tstart, Tend, Texit,   &
+        AbsTol, RelTol,                          &
+!  Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart,            &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!  Error indicator
+        IERR)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS !  SUBROUTINES internal to Rosenbrock
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from Rosenbrock due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected Rosenbrock method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_Integrator (Y, Tstart, Tend, T,  &
+        AbsTol, RelTol,                          &
+!~~~> Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart,            &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method
+!      defined by ros_S (no of stages)
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+
+!~~~> Input: the initial condition at Tstart; Output: the solution at T
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+!~~~> Input: integration interval
+   KPP_REAL, INTENT(IN) :: Tstart,Tend
+!~~~> Output: time at which the solution is returned (T=Tend if success)
+   KPP_REAL, INTENT(OUT) ::  T
+!~~~> Input: tolerances
+   KPP_REAL, INTENT(IN) ::  AbsTol(N), RelTol(N)
+!~~~> Input: integration parameters
+   LOGICAL, INTENT(IN) :: Autonomous, VectorTol
+   KPP_REAL, INTENT(IN) :: Hstart, Hmin, Hmax
+   INTEGER, INTENT(IN) :: Max_no_steps
+   KPP_REAL, INTENT(IN) :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables
+   KPP_REAL :: Ynew(N), Fcn0(N), Fcn(N)
+   KPP_REAL :: K(N*ros_S), dFdT(N)
+#ifdef FULL_ALGEBRA    
+   KPP_REAL :: Jac0(N,N), Ghimj(N,N)
+#else
+   KPP_REAL :: Jac0(LU_NONZERO), Ghimj(LU_NONZERO)
+#endif
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau
+   KPP_REAL :: Err, Yerr(N)
+   INTEGER :: Pivot(N), Direction, ioffset, j, istage
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0_dp, ONE  = 1.0_dp
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0E-5_dp
+!~~~>  Locally called functions
+!    KPP_REAL WLAMCH
+!    EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = ZERO
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.0_dp*Roundoff) H = DeltaMin
+
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+
+!~~~> Time loop begins below
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) )
+
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1_dp*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+
+!~~~>  Limit H if necessary to avoid going beyond Tend
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL FunTemplate(T,Y,Fcn0)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+   END IF
+
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T,Y,Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO
+
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1), &
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+N)
+       ioffset = N*(istage-1)
+
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         CALL WCOPY(N,Fcn0,1,Fcn,1)
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(N,Y,1,Ynew,1)
+         DO j = 1, istage-1
+           CALL WAXPY(N,ros_A((istage-1)*(istage-2)/2+j), &
+            K(N*(j-1)+1:N*j),1,Ynew,1)
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL FunTemplate(Tau,Ynew,Fcn)
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+       CALL WCOPY(N,Fcn,1,K(ioffset+1:ioffset+N),1)
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(N,HC,K(N*(j-1)+1:N*j),1,K(ioffset+1:ioffset+N),1)
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(N,HG,dFdT,1,K(ioffset+1:ioffset+N),1)
+       END IF
+       CALL ros_Solve(Ghimj, Pivot, K(ioffset+1:ioffset+N))
+
+   END DO Stage
+
+
+!~~~>  Compute the new solution
+   CALL WCOPY(N,Y,1,Ynew,1)
+   DO j=1,ros_S
+         CALL WAXPY(N,ros_M(j),K(N*(j-1)+1:N*j),1,Ynew,1)
+   END DO
+
+!~~~>  Compute the error estimation
+   CALL WSCAL(N,ZERO,Yerr,1)
+   DO j=1,ros_S
+        CALL WAXPY(N,ros_E(j),K(N*(j-1)+1:N*j),1,Yerr,1)
+   END DO
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac
+
+!~~~>  Check the error magnitude and adjust step size
+   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      CALL WCOPY(N,Ynew,1,Y,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H)
+      END IF
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.
+      RejectMoreH = .FALSE.
+      H = Hnew
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1)  ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+   END IF ! Err <= 1
+
+   END DO UntilAccepted
+
+   END DO TimeLoop
+
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, &
+                               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+
+! Input arguments
+   KPP_REAL, INTENT(IN) :: Y(N), Ynew(N), &
+          Yerr(N), AbsTol(N), RelTol(N)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables
+   KPP_REAL :: Err, Scale, Ymax
+   INTEGER  :: i
+   KPP_REAL, PARAMETER :: ZERO = 0.0_dp
+
+   Err = ZERO
+   DO i=1,N
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/N)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+
+  END FUNCTION ros_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+
+!~~~> Input arguments
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(N), Fcn0(N)
+!~~~> Output arguments
+   KPP_REAL, INTENT(OUT) :: dFdT(N)
+!~~~> Local variables
+   KPP_REAL :: Delta
+   KPP_REAL, PARAMETER :: ONE = 1.0_dp, DeltaMin = 1.0E-6_dp
+
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL FunTemplate(T+Delta,Y,dFdT)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+   CALL WAXPY(N,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(N,(ONE/Delta),dFdT,1)
+
+  END SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE
+
+!~~~> Input arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) ::  Jac0(N,N)
+#else
+   KPP_REAL, INTENT(IN) ::  Jac0(LU_NONZERO)
+#endif   
+   KPP_REAL, INTENT(IN) ::  gam
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(OUT) :: Ghimj(N,N)
+#else
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+#endif   
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(N)
+!~~~> Inout arguments
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables
+   INTEGER  :: i, ising, Nconsecutive
+   KPP_REAL :: ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0_dp, HALF = 0.5_dp
+
+   Nconsecutive = 0
+   Singular = .TRUE.
+
+   DO WHILE (Singular)
+
+!~~~>    Construct Ghimj = 1/(H*gam) - Jac0
+#ifdef FULL_ALGEBRA    
+     CALL WCOPY(N*N,Jac0,1,Ghimj,1)
+     CALL WSCAL(N*N,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,N
+       Ghimj(i,i) = Ghimj(i,i)+ghinv
+     END DO
+#else
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,N
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+#endif   
+!~~~>    Compute LU decomposition
+     CALL ros_Decomp( Ghimj, Pivot, ising )
+     IF (ising == 0) THEN
+!~~~>    If successful done
+        Singular = .FALSE.
+     ELSE ! ising .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        ISTATUS(Nsng) = ISTATUS(Nsng) + 1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE.
+        PRINT*,'Warning: LU Decomposition returned ising = ',ising
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decompositions
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ising
+
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Decomp( A, Pivot, ising )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the LU decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Inout variables
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+!~~~> Output variables
+   INTEGER, INTENT(OUT) :: Pivot(N), ising
+
+#ifdef FULL_ALGEBRA    
+   CALL  DGETRF( N, N, A, N, Pivot, ising )
+#else   
+   CALL KppDecomp ( A, ising )
+   Pivot(1) = 1
+#endif
+   ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+  END SUBROUTINE ros_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Solve( A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Input variables
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+   INTEGER, INTENT(IN) :: Pivot(N)
+!~~~> InOut variables
+   KPP_REAL, INTENT(INOUT) :: b(N)
+
+#ifdef FULL_ALGEBRA    
+   CALL  DGETRS( 'N', N , 1, A, N, Pivot, b, N, 0 )
+#else   
+   CALL KppSolve( A, b )
+#endif
+
+   ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+  END SUBROUTINE ros_Solve
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   DOUBLE PRECISION g
+
+    g = 1.0_dp + 1.0_dp/SQRT(2.0_dp)
+    rosMethod = RS2
+!~~~> Name of the method
+    ros_Name = 'ROS-2'
+!~~~> Number of stages
+    ros_S = 2
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+    ros_A(1) = (1.0_dp)/g
+    ros_C(1) = (-2.0_dp)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.0_dp)/(2.0_dp*g)
+    ros_M(2)= (1.0_dp)/(2.0_dp*g)
+! E_i = Coefficients for error estimator
+    ros_E(1) = 1.0_dp/(2.0_dp*g)
+    ros_E(2) = 1.0_dp/(2.0_dp*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0_dp
+    ros_Alpha(2) = 1.0_dp
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   rosMethod = RS3
+!~~~> Name of the method
+   ros_Name = 'ROS-3'
+!~~~> Number of stages
+   ros_S = 3
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+   ros_A(1)= 1.0_dp
+   ros_A(2)= 1.0_dp
+   ros_A(3)= 0.0_dp
+
+   ros_C(1) = -0.10156171083877702091975600115545E+01_dp
+   ros_C(2) =  0.40759956452537699824805835358067E+01_dp
+   ros_C(3) =  0.92076794298330791242156818474003E+01_dp
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1E+01_dp
+   ros_M(2) =  0.61697947043828245592553615689730E+01_dp
+   ros_M(3) = -0.42772256543218573326238373806514_dp
+! E_i = Coefficients for error estimator
+   ros_E(1) =  0.5_dp
+   ros_E(2) = -0.29079558716805469821718236208017E+01_dp
+   ros_E(3) =  0.22354069897811569627360909276199_dp
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0_dp
+   ros_Alpha(2)= 0.43586652150845899941601945119356_dp
+   ros_Alpha(3)= 0.43586652150845899941601945119356_dp
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+   ros_Gamma(1)= 0.43586652150845899941601945119356_dp
+   ros_Gamma(2)= 0.24291996454816804366592249683314_dp
+   ros_Gamma(3)= 0.21851380027664058511513169485832E+01_dp
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+   rosMethod = RS4
+!~~~> Name of the method
+   ros_Name = 'ROS-4'
+!~~~> Number of stages
+   ros_S = 4
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+   ros_A(1) = 0.2000000000000000E+01_dp
+   ros_A(2) = 0.1867943637803922E+01_dp
+   ros_A(3) = 0.2344449711399156_dp
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0_dp
+
+   ros_C(1) =-0.7137615036412310E+01_dp
+   ros_C(2) = 0.2580708087951457E+01_dp
+   ros_C(3) = 0.6515950076447975_dp
+   ros_C(4) =-0.2137148994382534E+01_dp
+   ros_C(5) =-0.3214669691237626_dp
+   ros_C(6) =-0.6949742501781779_dp
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735E+01_dp
+   ros_M(2) = 0.2870493262186792_dp
+   ros_M(3) = 0.4353179431840180_dp
+   ros_M(4) = 0.1093502252409163E+01_dp
+!~~~> E_i  = Coefficients for error estimator
+   ros_E(1) =-0.2815431932141155_dp
+   ros_E(2) =-0.7276199124938920E-01_dp
+   ros_E(3) =-0.1082196201495311_dp
+   ros_E(4) =-0.1093502252409163E+01_dp
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0_dp
+   ros_Alpha(2) = 0.1145640000000000E+01_dp
+   ros_Alpha(3) = 0.6552168638155900_dp
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+   ros_Gamma(1) = 0.5728200000000000_dp
+   ros_Gamma(2) =-0.1769193891319233E+01_dp
+   ros_Gamma(3) = 0.7592633437920482_dp
+   ros_Gamma(4) =-0.1049021087100450_dp
+
+  END SUBROUTINE Ros4
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+   rosMethod = RD3
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'
+!~~~> Number of stages
+   ros_S = 4
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+   ros_A(1) = 0.0_dp
+   ros_A(2) = 2.0_dp
+   ros_A(3) = 0.0_dp
+   ros_A(4) = 2.0_dp
+   ros_A(5) = 0.0_dp
+   ros_A(6) = 1.0_dp
+
+   ros_C(1) = 4.0_dp
+   ros_C(2) = 1.0_dp
+   ros_C(3) =-1.0_dp
+   ros_C(4) = 1.0_dp
+   ros_C(5) =-1.0_dp
+   ros_C(6) =-(8.0_dp/3.0_dp)
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0_dp
+   ros_M(2) = 0.0_dp
+   ros_M(3) = 1.0_dp
+   ros_M(4) = 1.0_dp
+!~~~> E_i  = Coefficients for error estimator
+   ros_E(1) = 0.0_dp
+   ros_E(2) = 0.0_dp
+   ros_E(3) = 0.0_dp
+   ros_E(4) = 1.0_dp
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0_dp
+   ros_Alpha(2) = 0.0_dp
+   ros_Alpha(3) = 1.0_dp
+   ros_Alpha(4) = 1.0_dp
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+   ros_Gamma(1) = 0.5_dp
+   ros_Gamma(2) = 1.5_dp
+   ros_Gamma(3) = 0.0_dp
+   ros_Gamma(4) = 0.0_dp
+
+  END SUBROUTINE Rodas3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+    rosMethod = RD4
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'
+!~~~> Number of stages
+    ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000_dp
+    ros_Alpha(2) = 0.386_dp
+    ros_Alpha(3) = 0.210_dp
+    ros_Alpha(4) = 0.630_dp
+    ros_Alpha(5) = 1.000_dp
+    ros_Alpha(6) = 1.000_dp
+
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+    ros_Gamma(1) = 0.2500000000000000_dp
+    ros_Gamma(2) =-0.1043000000000000_dp
+    ros_Gamma(3) = 0.1035000000000000_dp
+    ros_Gamma(4) =-0.3620000000000023E-01_dp
+    ros_Gamma(5) = 0.0_dp
+    ros_Gamma(6) = 0.0_dp
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+    ros_A(1) = 0.1544000000000000E+01_dp
+    ros_A(2) = 0.9466785280815826_dp
+    ros_A(3) = 0.2557011698983284_dp
+    ros_A(4) = 0.3314825187068521E+01_dp
+    ros_A(5) = 0.2896124015972201E+01_dp
+    ros_A(6) = 0.9986419139977817_dp
+    ros_A(7) = 0.1221224509226641E+01_dp
+    ros_A(8) = 0.6019134481288629E+01_dp
+    ros_A(9) = 0.1253708332932087E+02_dp
+    ros_A(10) =-0.6878860361058950_dp
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0_dp
+
+    ros_C(1) =-0.5668800000000000E+01_dp
+    ros_C(2) =-0.2430093356833875E+01_dp
+    ros_C(3) =-0.2063599157091915_dp
+    ros_C(4) =-0.1073529058151375_dp
+    ros_C(5) =-0.9594562251023355E+01_dp
+    ros_C(6) =-0.2047028614809616E+02_dp
+    ros_C(7) = 0.7496443313967647E+01_dp
+    ros_C(8) =-0.1024680431464352E+02_dp
+    ros_C(9) =-0.3399990352819905E+02_dp
+    ros_C(10) = 0.1170890893206160E+02_dp
+    ros_C(11) = 0.8083246795921522E+01_dp
+    ros_C(12) =-0.7981132988064893E+01_dp
+    ros_C(13) =-0.3152159432874371E+02_dp
+    ros_C(14) = 0.1631930543123136E+02_dp
+    ros_C(15) =-0.6058818238834054E+01_dp
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0_dp
+    ros_M(6) = 1.0_dp
+
+!~~~> E_i  = Coefficients for error estimator
+    ros_E(1) = 0.0_dp
+    ros_E(2) = 0.0_dp
+    ros_E(3) = 0.0_dp
+    ros_E(4) = 0.0_dp
+    ros_E(5) = 0.0_dp
+    ros_E(6) = 1.0_dp
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0_dp
+
+  END SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rang3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! STIFFLY-STABLE W METHOD OF ORDER 3, WITH 4 STAGES
+!
+! J. RANG and L. ANGERMANN
+! NEW ROSENBROCK W-METHODS OF ORDER 3
+! FOR PARTIAL DIFFERENTIAL ALGEBRAIC
+!        EQUATIONS OF INDEX 1                                             
+! BIT Numerical Mathematics (2005) 45: 761-787
+!  DOI: 10.1007/s10543-005-0035-y
+! Table 4.1-4.2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+    rosMethod = RG3
+!~~~> Name of the method
+    ros_Name = 'RANG-3'
+!~~~> Number of stages
+    ros_S = 4
+
+    ros_A(1) = 5.09052051067020d+00;
+    ros_A(2) = 5.09052051067020d+00;
+    ros_A(3) = 0.0d0;
+    ros_A(4) = 4.97628111010787d+00;
+    ros_A(5) = 2.77268164715849d-02;
+    ros_A(6) = 2.29428036027904d-01;
+
+    ros_C(1) = -1.16790812312283d+01;
+    ros_C(2) = -1.64057326467367d+01;
+    ros_C(3) = -2.77268164715850d-01;
+    ros_C(4) = -8.38103960500476d+00;
+    ros_C(5) = -8.48328409199343d-01;
+    ros_C(6) =  2.87009860433106d-01;
+
+    ros_M(1) =  5.22582761233094d+00;
+    ros_M(2) = -5.56971148154165d-01;
+    ros_M(3) =  3.57979469353645d-01;
+    ros_M(4) =  1.72337398521064d+00;
+
+    ros_E(1) = -5.16845212784040d+00;
+    ros_E(2) = -1.26351942603842d+00;
+    ros_E(3) = -1.11022302462516d-16;
+    ros_E(4) =  2.22044604925031d-16;
+
+    ros_Alpha(1) = 0.0d00;
+    ros_Alpha(2) = 2.21878746765329d+00;
+    ros_Alpha(3) = 2.21878746765329d+00;
+    ros_Alpha(4) = 1.55392337535788d+00;
+
+    ros_Gamma(1) =  4.35866521508459d-01;
+    ros_Gamma(2) = -1.78292094614483d+00;
+    ros_Gamma(3) = -2.46541900496934d+00;
+    ros_Gamma(4) = -8.05529997906370d-01;
+
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 3.0_dp
+
+  END SUBROUTINE Rang3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   End of the set of internal Rosenbrock subroutines
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+END SUBROUTINE Rosenbrock
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+ USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+ USE KPP_ROOT_Function, ONLY: Fun
+ USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+!~~~> Input variables
+   KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables
+   KPP_REAL :: Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL :: Told
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+
+END SUBROUTINE FunTemplate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+ USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+ USE KPP_ROOT_Jacobian, ONLY: Jac_SP, LU_IROW, LU_ICOL
+ USE KPP_ROOT_LinearAlgebra
+ USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+!~~~> Input variables
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), Jcb(NVAR,NVAR)
+#else
+    KPP_REAL :: Jcb(LU_NONZERO)
+#endif   
+!~~~> Local variables
+    KPP_REAL :: Told
+#ifdef FULL_ALGEBRA    
+    INTEGER :: i, j
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(Y, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         Jcb(i,j) = 0.0_dp
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       Jcb(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+#endif   
+    TIME = Told
+
+END SUBROUTINE JacTemplate
+
+END MODULE KPP_ROOT_Integrator
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.m
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.m	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock.m	(revision 3477)
@@ -0,0 +1,986 @@
+function [T, Y, RCNTRL, ICNTRL, RSTAT, ISTAT] = ...
+    Rosenbrock(Function, Tspan, Y0, Options, RCNTRL, ICNTRL)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Rosenbrock - Implementation of several Rosenbrock methods:
+%               * Ros2                                                
+%               * Ros3                                                
+%               * Ros4                                                
+%               * Rodas3                                              
+%               * Rodas4                                              
+%                                                                     
+%    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+%                                                                     
+%     G = 1/(H*gamma(1)) - Jac(t0,Y0)                                 
+%     T_i = t0 + Alpha(i)*H                                           
+%     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+%     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+%         gamma(i)*dF/dT(t0, Y0)
+%     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j
+%
+%    For details on Rosenbrock methods and their implementation consult:
+%      E. Hairer and G. Wanner
+%      "Solving ODEs II. Stiff and differential-algebraic problems".
+%      Springer series in computational mathematics, Springer-Verlag, 1996.
+%    The codes contained in the book inspired this implementation.
+%
+%    MATLAB implementation (C) John C. Linford (jlinford@vt.edu).      
+%    Virginia Polytechnic Institute and State University             
+%    November, 2009    
+%
+%    Based on the Fortran90 implementation (C) Adrian Sandu, August 2004
+%    and revised by Philipp Miehe and Adrian Sandu, May 2006.
+%    Virginia Polytechnic Institute and State University
+%    Contact: sandu@cs.vt.edu
+%
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Input Arguments :
+%  The first four arguments are similar to the input arguments of 
+%  MATLAB's ODE solvers
+%      Function  - A function handle for the ODE function
+%      Tspan     - The time space to integrate
+%      Y0        - Initial value
+%      Options   - ODE solver options created by odeset():           
+%                  AbsTol, InitialStep, Jacobian, MaxStep, and RelTol
+%                  are considered.  Other options are ignored.       
+%                  'Jacobian' must be set.                           
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Output Arguments:
+%  The first two arguments are similar to the output arguments of
+%  MATLAB's ODE solvers
+%      T         - A vector of final integration times.
+%      Y         - A matrix of function values.  Y(T(i),:) is the value of
+%                  the function at the ith output time.
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%      RSTAT     - real output parameters (explained below)
+%      ISTAT     - integer output parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RCNTRL and ICNTRL on input and output:
+%
+%    Note: For input parameters equal to zero the default values of the
+%       corresponding variables are used.
+%
+%    ICNTRL(1) = 1: F = F(y)   Independent of T (AUTONOMOUS)
+%              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+%
+%    ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+%              = 1: AbsTol, RelTol are scalars
+%
+%    ICNTRL(3)  -> selection of a particular Rosenbrock method
+%        = 0 :    Rodas3 (default)
+%        = 1 :    Ros2
+%        = 2 :    Ros3
+%        = 3 :    Ros4
+%        = 4 :    Rodas3
+%        = 5 :    Rodas4
+%
+%    ICNTRL(4)  -> maximum number of integration steps
+%        For ICNTRL(4)=0) the default value of 100000 is used
+%
+%    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+%          It is strongly recommended to keep Hmin = ZERO
+%    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+%    RCNTRL(3)  -> Hstart, starting value for the integration step size
+%
+%    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+%    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+%    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+%                          (default=0.1)
+%    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+%         than the predicted value  (default=0.9)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RSTAT and ISTAT on output:
+%
+%    ISTAT(1)  -> No. of function calls
+%    ISTAT(2)  -> No. of jacobian calls
+%    ISTAT(3)  -> No. of steps
+%    ISTAT(4)  -> No. of accepted steps
+%    ISTAT(5)  -> No. of rejected steps (except at very beginning)
+%    ISTAT(6)  -> No. of LU decompositions
+%    ISTAT(7)  -> No. of forward/backward substitutions
+%    ISTAT(8)  -> No. of singular matrix decompositions
+%
+%    RSTAT(1)  -> Texit, the time corresponding to the
+%                     computed Y upon return
+%    RSTAT(2)  -> Hexit, last accepted step before exit
+%    RSTAT(3)  -> Hnew, last predicted step (not yet taken)
+%                   For multiple restarts, use Hnew as Hstart
+%                     in the subsequent run
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%~~~>  Statistics on the work performed by the Rosenbrock method
+global Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew
+global ISTATUS RSTATUS
+
+% Parse ODE options
+AbsTol = odeget(Options, 'AbsTol');
+if isempty(AbsTol)
+    AbsTol = 1.0e-3;
+end
+Hstart = odeget(Options, 'InitialStep');
+if isempty(Hstart)
+    Hstart = 0;
+end
+Jacobian = odeget(Options, 'Jacobian');
+if isempty(Jacobian)
+    error('A Jacobian function is required.');
+end
+Hmax = odeget(Options, 'MaxStep');
+if isempty(Hmax)
+    Hmax = 0;
+end
+RelTol = odeget(Options, 'RelTol');
+if isempty(RelTol)
+    RelTol = 1.0e-4;
+end
+
+% Initialize statistics
+Nfun=1; Njac=2; Nstp=3; Nacc=4; Nrej=5; Ndec=6; Nsol=7; Nsng=8;
+Ntexit=1; Nhexit=2; Nhnew=3;
+RSTATUS = zeros(20,1);
+ISTATUS = zeros(20,1);
+
+% Get problem size
+steps = length(Tspan);
+N = length(Y0);
+
+% Initialize tolerances
+ATOL = ones(N,1)*AbsTol;
+RTOL = ones(N,1)*RelTol;
+
+% Initialize step
+RCNTRL(2) = max(0, Hmax);
+RCNTRL(3) = max(0, Hstart);
+
+% Integrate
+Y = zeros(steps,N);
+T = zeros(steps,1);
+Y(1,:) = Y0;
+T(1) = Tspan(1);
+for i=2:steps
+    [T(i), Y(i,:), IERR] = ...
+        RosenbrockIntegrator(N, Y(i-1,:), T(i-1), Tspan(i), ...
+            Function, Jacobian, ATOL, RTOL, RCNTRL, ICNTRL);
+
+    if IERR < 0
+        error(['Rosenbrock exited with IERR=',num2str(IERR)]);
+    end
+
+end
+
+ISTAT = ISTATUS;
+RSTAT = RSTATUS;
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ T, Y, IERR ] = RosenbrockIntegrator(N, Y, Tstart, Tend, ...
+    OdeFunction, OdeJacobian, AbsTol, RelTol, RCNTRL, ICNTRL)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% Advances the ODE system defined by OdeFunction, OdeJacobian and Y
+% from time=Tstart to time=Tend
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%~~~>  Statistics on the work performed by the Rosenbrock method
+global Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew Ntotal
+global ISTATUS RSTATUS
+
+%~~~>   Parameters
+global ZERO ONE DeltaMin
+ZERO = 0.0; ONE = 1.0; DeltaMin = 1.0E-5;
+
+%~~~>  Initialize statistics
+ISTATUS(1:8) = 0;
+RSTATUS(1:3) = ZERO;
+
+%~~~>  Autonomous or time dependent ODE. Default is time dependent.
+Autonomous = ~(ICNTRL(1) == 0);
+
+%~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+%   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+if ICNTRL(2) == 0
+    VectorTol = true;
+    UplimTol  = N;
+else
+    VectorTol = false;
+    UplimTol  = 1;
+end
+
+%~~~>   Initialize the particular Rosenbrock method selected
+switch (ICNTRL(3))
+    case (1)
+        ros_Param = Ros2;
+    case (2)
+        ros_Param = Ros3;
+    case (3)
+        ros_Param = Ros4;
+    case {0,4}
+        ros_Param = Rodas3;
+    case (5)
+        ros_Param = Rodas4;
+    otherwise
+        disp(['Unknown Rosenbrock method: ICNTRL(3)=',num2str(ICNTRL(3))]);
+        IERR = ros_ErrorMsg(-2,Tstart,ZERO);
+        return
+end
+ros_S     = ros_Param{1};
+rosMethod = ros_Param{2};
+ros_A     = ros_Param{3};
+ros_C     = ros_Param{4};
+ros_M     = ros_Param{5};
+ros_E     = ros_Param{6};
+ros_Alpha = ros_Param{7};
+ros_Gamma = ros_Param{8};
+ros_ELO   = ros_Param{9};
+ros_NewF  = ros_Param{10};
+ros_Name  = ros_Param{11};
+
+%~~~>   The maximum number of steps admitted
+if ICNTRL(4) == 0
+    Max_no_steps = 200000;
+elseif ICNTRL(4) > 0
+    Max_no_steps=ICNTRL(4);
+else
+    disp(['User-selected max no. of steps: ICNTRL(4)=',num2str(ICNTRL(4))]);
+    IERR = ros_ErrorMsg(-1,Tstart,ZERO);
+    return
+end
+
+%~~~>  Unit roundoff (1+Roundoff>1)
+Roundoff = eps;
+
+%~~~>  Lower bound on the step size: (positive value)
+if RCNTRL(1) == ZERO
+    Hmin = ZERO;
+elseif RCNTRL(1) > ZERO
+    Hmin = RCNTRL(1);
+else
+    disp(['User-selected Hmin: RCNTRL(1)=', num2str(RCNTRL(1))]);
+    IERR = ros_ErrorMsg(-3,Tstart,ZERO);
+    return
+end
+
+%~~~>  Upper bound on the step size: (positive value)
+if RCNTRL(2) == ZERO
+    Hmax = abs(Tend-Tstart);
+elseif RCNTRL(2) > ZERO
+    Hmax = min(abs(RCNTRL(2)),abs(Tend-Tstart));
+else
+    disp(['User-selected Hmax: RCNTRL(2)=', num2str(RCNTRL(2))]);
+    IERR = ros_ErrorMsg(-3,Tstart,ZERO);
+    return
+end
+
+%~~~>  Starting step size: (positive value)
+if RCNTRL(3) == ZERO
+    Hstart = max(Hmin,DeltaMin);
+elseif RCNTRL(3) > ZERO
+    Hstart = min(abs(RCNTRL(3)),abs(Tend-Tstart));
+else
+    disp(['User-selected Hstart: RCNTRL(3)=', num2str(RCNTRL(3))]);
+    IERR = ros_ErrorMsg(-3,Tstart,ZERO);
+    return
+end
+
+%~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax
+if RCNTRL(4) == ZERO
+    FacMin = 0.2;
+elseif RCNTRL(4) > ZERO
+    FacMin = RCNTRL(4);
+else
+    disp(['User-selected FacMin: RCNTRL(4)=', num2str(RCNTRL(4))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+if RCNTRL(5) == ZERO
+    FacMax = 6.0;
+elseif RCNTRL(5) > ZERO
+    FacMax = RCNTRL(5);
+else
+    disp(['User-selected FacMax: RCNTRL(5)=', num2str(RCNTRL(5))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+
+%~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+if RCNTRL(6) == ZERO
+    FacRej = 0.1;
+elseif RCNTRL(6) > ZERO
+    FacRej = RCNTRL(6);
+else
+    disp(['User-selected FacRej: RCNTRL(6)=', num2str(RCNTRL(6))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+
+%~~~>   FacSafe: Safety Factor in the computation of new step size
+if RCNTRL(7) == ZERO
+    FacSafe = 0.9;
+elseif RCNTRL(7) > ZERO
+    FacSafe = RCNTRL(7);
+else
+    disp(['User-selected FacSafe: RCNTRL(7)=', num2str(RCNTRL(7))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+
+%~~~>  Check if tolerances are reasonable
+for i=1:UplimTol
+    if  (AbsTol(i) <= ZERO) || (RelTol(i) <= 10.0*Roundoff) || (RelTol(i) >= 1.0)
+        disp([' AbsTol(',i,') = ',num2str(AbsTol(i))]);
+        disp([' RelTol(',i,') = ',num2str(RelTol(i))]);
+        IERR = ros_ErrorMsg(-5,Tstart,ZERO);
+        return
+    end
+end
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%   Template for the implementation of a generic Rosenbrock method
+%      defined by ros_S (no of stages)
+%      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+% ~~~~ Local variables
+Ynew  = zeros(N,1);
+Fcn0  = zeros(N,1);
+Fcn   = zeros(N,1);
+K     = zeros(N,ros_S);
+dFdT  = zeros(N,1);
+Jac0  = sparse(N,N);
+Ghimj = sparse(N,N);
+Yerr  = zeros(N,1);
+Pivot = zeros(N,1);
+
+%~~~>  Initial preparations
+T = Tstart;
+RSTATUS(Nhexit) = ZERO;
+H = min(max(abs(Hmin), abs(Hstart)), abs(Hmax));
+if abs(H) <= 10.0*Roundoff
+    H = DeltaMin;
+end
+
+if Tend >= Tstart
+    Direction = +1;
+else
+    Direction = -1;
+end
+H = Direction*H;
+
+RejectLastH = false;
+RejectMoreH = false;
+
+%~~~> Time loop begins below
+
+while ( (Direction > 0) && ((T-Tend)+Roundoff <= ZERO) || ...
+        (Direction < 0) && ((Tend-T)+Roundoff <= ZERO) )
+
+    if ISTATUS(Nstp) > Max_no_steps   % Too many steps
+        IERR = ros_ErrorMsg(-6,T,H);
+        return
+    end
+    if ((T+0.1*H) == T) || (H <= Roundoff)   % Step size too small
+        IERR = ros_ErrorMsg(-7,T,H);
+        return
+    end
+
+    %~~~>  Limit H if necessary to avoid going beyond Tend
+    H = min(H, abs(Tend-T));
+
+    %~~~>   Compute the function at current time
+    Fcn0 = OdeFunction(T, Y);
+    ISTATUS(Nfun) = ISTATUS(Nfun) + 1;
+
+    %~~~>  Compute the function derivative with respect to T
+    if ~Autonomous
+        dFdT = ros_FunTimeDerivative (T, OdeFunction, Roundoff, Y, Fcn0);
+    end
+
+    %~~~>   Compute the Jacobian at current time
+    Jac0 = OdeJacobian(T,Y);
+    ISTATUS(Njac) = ISTATUS(Njac) + 1;
+
+    %~~~>  Repeat step calculation until current step accepted
+    while(true)
+
+        [H, Ghimj, Pivot, Singular] = ...
+            ros_PrepareMatrix(N, H, Direction, ros_Gamma(1), Jac0);
+
+        % Not calculating LU decomposition in ros_PrepareMatrix anymore 
+        % so don't need to check if the matrix is singular
+        %
+        %if Singular % More than 5 consecutive failed decompositions
+        %    IERR = ros_ErrorMsg(-8,T,H);
+        %    return
+        %end
+
+        % For the 1st istage the function has been computed previously
+        Fcn = Fcn0;
+        K(:,1) = Fcn;
+        if (~Autonomous) && (ros_Gamma(1) ~= ZERO)
+            HG = Direction*H*ros_Gamma(1);
+            K(:,1) = K(:,1) + HG * dFdT;
+        end
+        K(:,1) = ros_Solve(Ghimj, Pivot, K(:,1));
+        
+        %~~~>   Compute the remaining stages
+        for istage=2:ros_S
+
+            % istage>1 and a new function evaluation is needed
+            if ros_NewF(istage)
+                Ynew = Y;
+                for j=1:istage-1
+                    Ynew = Ynew + ros_A((istage-1)*(istage-2)/2+j)*K(:,j)';
+                end
+                Tau = T + ros_Alpha(istage)*Direction*H;
+                Fcn = OdeFunction(Tau,Ynew);
+                ISTATUS(Nfun) = ISTATUS(Nfun) + 1;
+            end
+
+            K(:,istage) = Fcn;
+            for j=1:istage-1
+                HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H);
+                K(:,istage) = K(:,istage) + HC * K(:,j);
+            end
+            if (~Autonomous) && (ros_Gamma(istage) ~= ZERO)
+                HG = Direction*H*ros_Gamma(istage);
+                K(:,istage) = K(:,istage) + HG * dFdT;
+            end
+
+            % Linear system is solved here with MATLAB '\' operator
+            % instead of LU decomposition.
+            K(:,istage) = ros_Solve(Ghimj, Pivot, K(:,istage));
+
+        end
+
+        %~~~>  Compute the new solution
+        Ynew = Y;
+        for j=1:ros_S
+            Ynew = Ynew + ros_M(j) * K(:,j)';
+        end
+
+        %~~~>  Compute the error estimation
+        Yerr = zeros(N,1);
+        for j=1:ros_S
+            Yerr = Yerr + ros_E(j) * K(:,j);
+        end
+        Err = ros_ErrorNorm(N, Y, Ynew, Yerr, AbsTol, RelTol, VectorTol);
+
+        %~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+        Fac  = min(FacMax, max(FacMin, FacSafe/(Err^(ONE/ros_ELO))));
+        Hnew = H*Fac;
+
+        %~~~>  Check the error magnitude and adjust step size
+        ISTATUS(Nstp) = ISTATUS(Nstp) + 1;
+        if  (Err <= ONE) || (H <= Hmin)   %~~~> Accept step
+            ISTATUS(Nacc) = ISTATUS(Nacc) + 1;
+            Y = Ynew;
+            T = T + Direction*H;
+            Hnew = max(Hmin, min(Hnew, Hmax));
+            if RejectLastH  % No step size increase after a rejected step
+                Hnew = min(Hnew, H);
+            end
+            RSTATUS(Nhexit) = H;
+            RSTATUS(Nhnew)  = Hnew;
+            RSTATUS(Ntexit) = T;
+            RejectLastH = false;
+            RejectMoreH = false;
+            H = Hnew;
+            break % EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+        else           %~~~> Reject step
+            if RejectMoreH
+                Hnew = H*FacRej;
+            end
+            RejectMoreH = RejectLastH;
+            RejectLastH = true;
+            H = Hnew;
+            if ISTATUS(Nacc) >= 1
+                ISTATUS(Nrej) = ISTATUS(Nrej) + 1;
+            end
+        end % Err <= 1
+
+    end % UntilAccepted
+
+end % TimeLoop
+
+%~~~> Succesful exit
+IERR = 1;  %~~~> The integration was successful
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ ErrNorm ] = ros_ErrorNorm(N, Y, Ynew, Yerr, AbsTol, RelTol, VectorTol)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%~~~> Computes the "scaled norm" of the error vector Yerr
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Err = 0;
+for i=1:N
+    Ymax = max(abs(Y(i)), abs(Ynew(i)));
+    if VectorTol
+        Scale = AbsTol(i) + RelTol(i)*Ymax;
+    else
+        Scale = AbsTol(1) + RelTol(1)*Ymax;
+    end
+    Err = Err + (Yerr(i)/Scale)^2;
+end
+Err = sqrt(Err/N);
+ErrNorm = max(Err,1.0e-10);
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ dFdT ] = ros_FunTimeDerivative (T, OdeFunction, Roundoff, Y, Fcn0)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%~~~> The time partial derivative of the function by finite differences
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%~~~>  Statistics on the work performed by the Rosenbrock method
+global Nfun ISTATUS
+
+%~~~>   Parameters
+global ZERO ONE DeltaMin
+
+Delta = sqrt(Roundoff) * max(DeltaMin, abs(T));
+dFdT = OdeFunction(T+Delta,Y);
+ISTATUS(Nfun) = ISTATUS(Nfun) + 1;
+dFdT = (dFdT - Fcn0) / Delta;
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [H, Ghimj, Pivot, Singular] = ...
+    ros_PrepareMatrix(N, H, Direction, gam, Jac0)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Prepares the LHS matrix for stage calculations
+%  1.  Construct Ghimj = 1/(H*ham) - Jac0
+%      "(Gamma H) Inverse Minus Jacobian"
+%  2.  LU decomposition not performed here because
+%      MATLAB solves the linear system with '\'.
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Ghimj = -Jac0;
+ghinv = 1.0/(Direction*H*gam);
+for i=1:N
+    Ghimj(i,i) = Ghimj(i,i)+ghinv;
+end
+
+Pivot(1) = 1;
+Singular = false;
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ IERR ] = ros_ErrorMsg(Code, T, H)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%    Handles all error messages
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+IERR = Code;
+
+disp('Forced exit from Rosenbrock due to the following error:');
+
+switch (Code)
+    case (-1)
+        disp('--> Improper value for maximal no of steps');
+    case (-2)
+        disp('--> Selected Rosenbrock method not implemented');
+    case (-3)
+        disp('--> Hmin/Hmax/Hstart must be positive');
+    case (-4)
+        disp('--> FacMin/FacMax/FacRej must be positive');
+    case (-5)
+        disp('--> Improper tolerance values');
+    case (-6)
+        disp('--> No of steps exceeds maximum bound');
+    case (-7)
+        disp('--> Step size too small: T + 10*H = T or H < Roundoff');
+    case (-8)
+        disp('--> Matrix is repeatedly singular');
+    otherwise
+        disp(['Unknown Error code: ', num2str(Code)]);
+end
+
+disp(['T=',num2str(T),' and H=',num2str(H)]);
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [X] = ros_Solve(JVS, Pivot, X)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Template for the forward/backward substitution 
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+global Nsol ISTATUS
+
+X = JVS\X;
+Pivot(1) = 1;
+ISTATUS(Nsol) = ISTATUS(Nsol) + 1;
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Ros2()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% --- AN L-STABLE METHOD, 2 stages, order 2
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+g = 1.0 + 1.0/sqrt(2.0);
+rosMethod = 1;
+%~~~> Name of the method
+ros_Name = 'ROS-2';
+%~~~> Number of stages
+ros_S = 2;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = (1.0)/g;
+ros_C(1) = (-2.0)/g;
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1) = true;
+ros_NewF(2) = true;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1)= (3.0)/(2.0*g);
+ros_M(2)= (1.0)/(2.0*g);
+% E_i = Coefficients for error estimator
+ros_E(1) = 1.0/(2.0*g);
+ros_E(2) = 1.0/(2.0*g);
+%~~~> ros_ELO = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus one
+ros_ELO = 2.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.0;
+ros_Alpha(2) = 1.0;
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = g;
+ros_Gamma(2) =-g;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Ros3()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 2;
+%~~~> Name of the method
+ros_Name = 'ROS-3';
+%~~~> Number of stages
+ros_S = 3;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1)= 1.0;
+ros_A(2)= 1.0;
+ros_A(3)= 0.0;
+
+ros_C(1) = -0.10156171083877702091975600115545E+01;
+ros_C(2) =  0.40759956452537699824805835358067E+01;
+ros_C(3) =  0.92076794298330791242156818474003E+01;
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1) = true;
+ros_NewF(2) = true;
+ros_NewF(3) = false;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) =  0.1E+01;
+ros_M(2) =  0.61697947043828245592553615689730E+01;
+ros_M(3) = -0.42772256543218573326238373806514;
+% E_i = Coefficients for error estimator
+ros_E(1) =  0.5;
+ros_E(2) = -0.29079558716805469821718236208017E+01;
+ros_E(3) =  0.22354069897811569627360909276199;
+%~~~> ros_ELO = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus 1
+ros_ELO = 3.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1)= 0.0;
+ros_Alpha(2)= 0.43586652150845899941601945119356;
+ros_Alpha(3)= 0.43586652150845899941601945119356;
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1)= 0.43586652150845899941601945119356;
+ros_Gamma(2)= 0.24291996454816804366592249683314;
+ros_Gamma(3)= 0.21851380027664058511513169485832E+01;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Ros4()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+%     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+%
+%      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+%      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+%      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+%      SPRINGER-VERLAG (1990)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 3;
+%~~~> Name of the method
+ros_Name = 'ROS-4';
+%~~~> Number of stages
+ros_S = 4;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = 0.2000000000000000E+01;
+ros_A(2) = 0.1867943637803922E+01;
+ros_A(3) = 0.2344449711399156;
+ros_A(4) = ros_A(2);
+ros_A(5) = ros_A(3);
+ros_A(6) = 0.0;
+
+ros_C(1) =-0.7137615036412310E+01;
+ros_C(2) = 0.2580708087951457E+01;
+ros_C(3) = 0.6515950076447975;
+ros_C(4) =-0.2137148994382534E+01;
+ros_C(5) =-0.3214669691237626;
+ros_C(6) =-0.6949742501781779;
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1)  = true;
+ros_NewF(2)  = true;
+ros_NewF(3)  = true;
+ros_NewF(4)  = false;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) = 0.2255570073418735E+01;
+ros_M(2) = 0.2870493262186792;
+ros_M(3) = 0.4353179431840180;
+ros_M(4) = 0.1093502252409163E+01;
+%~~~> E_i  = Coefficients for error estimator
+ros_E(1) =-0.2815431932141155;
+ros_E(2) =-0.7276199124938920E-01;
+ros_E(3) =-0.1082196201495311;
+ros_E(4) =-0.1093502252409163E+01;
+%~~~> ros_ELO  = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus 1
+ros_ELO  = 4.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.0;
+ros_Alpha(2) = 0.1145640000000000E+01;
+ros_Alpha(3) = 0.6552168638155900;
+ros_Alpha(4) = ros_Alpha(3);
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = 0.5728200000000000;
+ros_Gamma(2) =-0.1769193891319233E+01;
+ros_Gamma(3) = 0.7592633437920482;
+ros_Gamma(4) =-0.1049021087100450;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Rodas3()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 4;
+%~~~> Name of the method
+ros_Name = 'RODAS-3';
+%~~~> Number of stages
+ros_S = 4;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = 0.0;
+ros_A(2) = 2.0;
+ros_A(3) = 0.0;
+ros_A(4) = 2.0;
+ros_A(5) = 0.0;
+ros_A(6) = 1.0;
+
+ros_C(1) = 4.0;
+ros_C(2) = 1.0;
+ros_C(3) =-1.0;
+ros_C(4) = 1.0;
+ros_C(5) =-1.0;
+ros_C(6) =-(8.0/3.0);
+
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1)  = true;
+ros_NewF(2)  = false;
+ros_NewF(3)  = true;
+ros_NewF(4)  = true;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) = 2.0;
+ros_M(2) = 0.0;
+ros_M(3) = 1.0;
+ros_M(4) = 1.0;
+%~~~> E_i  = Coefficients for error estimator
+ros_E(1) = 0.0;
+ros_E(2) = 0.0;
+ros_E(3) = 0.0;
+ros_E(4) = 1.0;
+%~~~> ros_ELO  = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus 1
+ros_ELO  = 3.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.0;
+ros_Alpha(2) = 0.0;
+ros_Alpha(3) = 1.0;
+ros_Alpha(4) = 1.0;
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = 0.5;
+ros_Gamma(2) = 1.5;
+ros_Gamma(3) = 0.0;
+ros_Gamma(4) = 0.0;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Rodas4()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+%
+%      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+%      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+%      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+%      SPRINGER-VERLAG (1996)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 5;
+%~~~> Name of the method
+ros_Name = 'RODAS-4';
+%~~~> Number of stages
+ros_S = 6;
+
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.000;
+ros_Alpha(2) = 0.386;
+ros_Alpha(3) = 0.210;
+ros_Alpha(4) = 0.630;
+ros_Alpha(5) = 1.000;
+ros_Alpha(6) = 1.000;
+
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = 0.2500000000000000;
+ros_Gamma(2) =-0.1043000000000000;
+ros_Gamma(3) = 0.1035000000000000;
+ros_Gamma(4) =-0.3620000000000023E-01;
+ros_Gamma(5) = 0.0;
+ros_Gamma(6) = 0.0;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = 0.1544000000000000E+01;
+ros_A(2) = 0.9466785280815826;
+ros_A(3) = 0.2557011698983284;
+ros_A(4) = 0.3314825187068521E+01;
+ros_A(5) = 0.2896124015972201E+01;
+ros_A(6) = 0.9986419139977817;
+ros_A(7) = 0.1221224509226641E+01;
+ros_A(8) = 0.6019134481288629E+01;
+ros_A(9) = 0.1253708332932087E+02;
+ros_A(10) =-0.6878860361058950;
+ros_A(11) = ros_A(7);
+ros_A(12) = ros_A(8);
+ros_A(13) = ros_A(9);
+ros_A(14) = ros_A(10);
+ros_A(15) = 1.0;
+
+ros_C(1) =-0.5668800000000000E+01;
+ros_C(2) =-0.2430093356833875E+01;
+ros_C(3) =-0.2063599157091915;
+ros_C(4) =-0.1073529058151375;
+ros_C(5) =-0.9594562251023355E+01;
+ros_C(6) =-0.2047028614809616E+02;
+ros_C(7) = 0.7496443313967647E+01;
+ros_C(8) =-0.1024680431464352E+02;
+ros_C(9) =-0.3399990352819905E+02;
+ros_C(10) = 0.1170890893206160E+02;
+ros_C(11) = 0.8083246795921522E+01;
+ros_C(12) =-0.7981132988064893E+01;
+ros_C(13) =-0.3152159432874371E+02;
+ros_C(14) = 0.1631930543123136E+02;
+ros_C(15) =-0.6058818238834054E+01;
+
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) = ros_A(7);
+ros_M(2) = ros_A(8);
+ros_M(3) = ros_A(9);
+ros_M(4) = ros_A(10);
+ros_M(5) = 1.0;
+ros_M(6) = 1.0;
+
+%~~~> E_i  = Coefficients for error estimator
+ros_E(1) = 0.0;
+ros_E(2) = 0.0;
+ros_E(3) = 0.0;
+ros_E(4) = 0.0;
+ros_E(5) = 0.0;
+ros_E(6) = 1.0;
+
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1) = true;
+ros_NewF(2) = true;
+ros_NewF(3) = true;
+ros_NewF(4) = true;
+ros_NewF(5) = true;
+ros_NewF(6) = true;
+
+%~~~> ros_ELO  = estimator of local order - the minimum between the
+%        main and the embedded scheme orders plus 1
+ros_ELO = 4.0;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+% End of INTEGRATE function
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.c	(revision 3477)
@@ -0,0 +1,2470 @@
+#define MAX(a,b) ( ((a) >= (b)) ? (a):(b)  )
+#define MIN(b,c) ( ((b) < (c))  ? (b):(c)  )
+#define ABS(x)	 ( ((x) >= 0 )  ? (x):(-x) )
+#define SQRT(d)  ( pow((d),0.5) )
+
+/* Numerical Constants */
+#define ZERO	    (KPP_REAL)0.0
+#define ONE	    (KPP_REAL)1.0
+#define HALF        (KPP_REAL)0.5
+#define DeltaMin    (KPP_REAL)1.0e-5
+enum boolean { FALSE=0, TRUE=1 };
+
+/*  Statistics on the work performed by the Rosenbrock method */
+enum statistics { Nfun=1, Njac=2, Nstp=3, Nacc=4, Nrej=5, Ndec=6, Nsol=7, 
+		  Nsng=8, Ntexit=1, Nhexit=2, Nhnew=3 };
+
+/*~~~>  Parameters of the Rosenbrock method, up to 6 stages */
+int ros_S, rosMethod;
+enum ros_Params { RS2=1, RS3=2, RS4=3, RD3=4, RD4=5 };
+KPP_REAL ros_A[15], ros_C[15], ros_M[6], ros_E[6], ros_Alpha[6], ros_Gamma[6], 
+       ros_ELO;
+int ros_NewF[6]; /* Holds Boolean values */
+char ros_Name[12]; /* Length 12 */
+
+/*~~~>  Types of Adjoints Implemented */
+enum adjoint { Adj_none=1, Adj_discrete=2, Adj_continuous=3, 
+	       Adj_simple_continuous=4 };
+
+/*~~~>  Checkpoints in memory */
+int bufsize = 200000;
+int stack_ptr; /* last written entry */
+KPP_REAL *chk_H, *chk_T;
+KPP_REAL **chk_Y, **chk_K, **chk_J; /* 2D arrays */
+KPP_REAL **chk_dY, **chk_d2Y; /* 2D arrays */
+
+/* Function Headers */
+void INTEGRATE_ADJ(int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		   KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		   KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		   KPP_REAL RCNTRL_U[], int ISTATUS_U[], KPP_REAL RSTATUS_U[]);
+int RosenbrockADJ( KPP_REAL Y[], int NADJ, KPP_REAL Lambda[][NVAR],
+		   KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL AbsTol[], 
+		   KPP_REAL RelTol[], KPP_REAL AbsTol_adj[][NVAR], 
+		   KPP_REAL RelTol_adj[][NVAR], KPP_REAL RCNTRL[], 
+		   int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[] );
+void ros_AllocateDBuffers( int S, int SaveLU );
+void ros_FreeDBuffers( int SaveLU );
+void ros_AllocateCBuffers();
+void ros_FreeCBuffers();
+void ros_DPush( int S, KPP_REAL T, KPP_REAL H, KPP_REAL Ystage[], 
+		KPP_REAL K[], KPP_REAL E[], int P[], int SaveLU );
+void ros_DPop( int S, KPP_REAL* T, KPP_REAL* H, KPP_REAL* Ystage, 
+	       KPP_REAL* K, KPP_REAL* E, int* P, int SaveLU );
+void ros_CPush( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+		KPP_REAL d2Y[] );
+void ros_CPop( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+	       KPP_REAL d2Y[] );
+int ros_ErrorMsg( int Code, KPP_REAL T, KPP_REAL H);
+int ros_FwdInt (KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL T, 
+		KPP_REAL AbsTol[], KPP_REAL RelTol[], int AdjointType, 
+		KPP_REAL Hmin, KPP_REAL Hstart, KPP_REAL Hmax, 
+		KPP_REAL Roundoff, int ISTATUS[], int Max_no_steps, 
+		KPP_REAL RSTATUS[], int Autonomous, int VectorTol, 
+		KPP_REAL FacMax, KPP_REAL FacMin, KPP_REAL FacSafe, 
+		KPP_REAL FacRej, int SaveLU);
+int ros_DadjInt ( int NADJ, KPP_REAL Lambda[][NVAR], KPP_REAL Tstart, 
+		  KPP_REAL Tend, KPP_REAL T, int SaveLU, int ISTATUS[], 
+		  KPP_REAL Roundoff, int Autonomous);
+int ros_CadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart, KPP_REAL Tend,
+		  KPP_REAL T, KPP_REAL AbsTol_adj[][NVAR], 
+		  KPP_REAL RelTol_adj[][NVAR], KPP_REAL RSTATUS[], 
+		  KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, int Max_no_steps, int Autonomous, 
+		  int VectorTol, KPP_REAL FacMax, KPP_REAL FacMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacRej, int ISTATUS[] );
+int ros_SimpleCadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart, 
+			KPP_REAL Tend, KPP_REAL T, int ISTATUS[], 
+			int Autonomous,	KPP_REAL Roundoff );
+KPP_REAL ros_ErrorNorm ( KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[], 
+		       KPP_REAL AbsTol[], KPP_REAL RelTol[], int VectorTol );
+void ros_FunTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[], 
+			     KPP_REAL Fcn0[], KPP_REAL dFdT[], int ISTATUS[] );
+void ros_JacTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[], 
+			     KPP_REAL Jac0[], KPP_REAL dJdT[], int ISTATUS[] );
+int ros_PrepareMatrix ( KPP_REAL H, int Direction, KPP_REAL gam, 
+			 KPP_REAL Jac0[], KPP_REAL Ghimj[], int Pivot[], 
+			 int ISTATUS[] );
+void ros_Decomp( KPP_REAL A[], int Pivot[], int* ising, int ISTATUS[] );
+void ros_Solve( char How, KPP_REAL A[], int Pivot[], KPP_REAL b[], 
+		int ISTATUS[] );
+void ros_cadj_Y( KPP_REAL T, KPP_REAL Y[] );
+void ros_Hermite3( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[], 
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Y[] );
+void ros_Hermite5( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[], 
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Ha[], 
+		   KPP_REAL Hb[], KPP_REAL Y[] );
+void Ros2();
+void Ros3();
+void Ros4();
+void Rodas3();
+void Rodas4();
+void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Jcb[] );
+void HessTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Hes[] );
+void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Fun [] ); 
+void WSCAL( int N, KPP_REAL Alpha, KPP_REAL X[], int incX );
+void WAXPY( int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], 
+	    int incY );
+void WCOPY( int N, KPP_REAL X[], int incX, KPP_REAL Y[], int incY );
+KPP_REAL WLAMCH( char C );
+void Update_SUN();
+void Update_RCONST();
+void Fun( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+void Jac_SP( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+void Jac_SP_Vec( KPP_REAL Jac[], KPP_REAL Fcn[], KPP_REAL K[] );
+void JacTR_SP_Vec( KPP_REAL Jac[], KPP_REAL Fcn[], KPP_REAL K[] );
+void HessTR_Vec(KPP_REAL Hess[], KPP_REAL U1[], KPP_REAL U2[], KPP_REAL HTU[]);
+void KppSolve( KPP_REAL A[], KPP_REAL b[] );
+int KppDecomp( KPP_REAL A[] );
+void KppSolveTR( KPP_REAL JVS[], KPP_REAL X[], KPP_REAL XX[] );
+void Hessian( KPP_REAL V[], KPP_REAL F[], KPP_REAL RCT[], KPP_REAL Hess[] );
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*  Local Variables */
+  KPP_REAL RCNTRL[20], RSTATUS[20];
+  int ICNTRL[20], ISTATUS[20], IERR, i;
+
+  for( i = 0; i < 20; i++ ) {
+    ICNTRL[i]  = 0;
+    RCNTRL[i]  = ZERO;
+    ISTATUS[i] = 0;
+    RSTATUS[i] = ZERO;
+  }
+
+/*~~~> fine-tune the integrator:
+  ICNTRL(1) = 0       ! 0 = non-autonomous, 1 = autonomous
+  ICNTRL(2) = 1       ! 0 = scalar, 1 = vector tolerances
+  RCNTRL(3) = STEPMIN ! starting step
+  ICNTRL(3) = 5       ! choice of the method for forward integration
+  ICNTRL(6) = 1       ! choice of the method for continuous adjoint
+  ICNTRL(7) = 2       ! 1=none, 2=discrete, 3=full continuous, 
+                        4=simplified continuous adjoint
+  ICNTRL(8) = 1       ! Save fwd LU factorization: 0=*don't* save, 1=save */
+
+/* if optional parameters are given, and if they are >=0, then they overwrite 
+   default settings */
+//  if(ICNTRL_U != NULL) {
+//    for(i=0; i<20; i++)
+//	if(ICNTRL_U[i] > 0)
+//	  ICNTRL[i] = ICNTRL_U[i];
+//    } /* end for */
+//  } /* end if */
+
+//  if(RCNTRL_U != NULL) {
+//    for(i=0; i<20; i++)
+//	if(RCNTRL_U[i] > 0)
+//	  RCNTRL[i] = RCNTRL_U[i];
+//    } /* end for */
+//  } /* end if */
+
+  IERR = RosenbrockADJ( Y, NADJ, Lambda, TIN, TOUT, ATOL, RTOL, ATOL_adj, 
+			RTOL_adj, RCNTRL, ICNTRL, RSTATUS, ISTATUS );
+
+  if (IERR < 0)
+    printf( "RosenbrockADJ: Unsucessful step at T=%f (IERR=%d)", TIN, IERR );
+
+  STEPMIN = RSTATUS[Nhexit];
+
+/* if optional parameters are given for output 
+         copy to them to return information */
+//  if(ISTATUS_U != NULL)
+//    for(i=0; i<20; i++)
+//	ISTATUS_U[i] = ISTATUS[i];
+//  }
+
+//  if(RSTATUS_U != NULL)
+//    for(i=0; i<20; i++)
+//	RSTATUS_U[i] = RSTATUS[i];
+//  }
+
+} /* End of INTEGRATE_ADJ */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int RosenbrockADJ( KPP_REAL Y[], int NADJ, KPP_REAL Lambda[][NVAR],
+		   KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL AbsTol[], 
+		   KPP_REAL RelTol[], KPP_REAL AbsTol_adj[][NVAR],
+		   KPP_REAL RelTol_adj[][NVAR], KPP_REAL RCNTRL[],
+		   int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    ADJ = Adjoint of the Tangent Linear Model of a Rosenbrock Method
+
+    Solves the system y'=F(t,y) using a RosenbrockADJ method defined by:
+
+     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+     T_i = t0 + Alpha(i)*H
+     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+         gamma(i)*dF/dT(t0, Y0)
+     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+
+    For details on RosenbrockADJ methods and their implementation consult:
+      E. Hairer and G. Wanner
+      "Solving ODEs II. Stiff and differential-algebraic problems".
+      Springer series in computational mathematics, Springer-Verlag, 1996.  
+    The codes contained in the book inspired this implementation.
+
+    (C)  Adrian Sandu, August 2004
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    Revised by Philipp Miehe and Adrian Sandu, May 2006
+    Translation F90 to C by Paul Eller, April 2007
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>   INPUT ARGUMENTS:
+
+-     Y[NVAR]    = vector of initial conditions (at T=Tstart)
+      NADJ       -> dimension of linearized system,
+                   i.e. the number of sensitivity coefficients
+-     Lambda[NVAR][NADJ] -> vector of initial sensitivity conditions 
+                            (at T=Tstart)
+-    [Tstart,Tend]  = time range of integration
+     (if Tstart>Tend the integration is performed backwards in time)
+-    RelTol, AbsTol = user precribed accuracy
+- void Fun( T, Y, Ydot ) = ODE function,
+                       returns Ydot = Y' = F(T,Y)
+- void Jac( T, Y, Jcb ) = Jacobian of the ODE function,
+                       returns Jcb = dF/dY
+-    ICNTRL[0:9]    = integer inputs parameters
+-    RCNTRL[0:9]    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT ARGUMENTS:
+
+-    Y[NVAR]    -> vector of final states (at T->Tend)
+-    Lambda[NVAR][NADJ] -> vector of final sensitivities (at T=Tend)
+-    ICNTRL[9:18]   -> integer output parameters
+-    RCNTRL[9:18]   -> real output parameters
+-    IERR       -> job status upon return
+       - succes (positive value) or failure (negative value) -
+           =  1 : Success
+           = -1 : Improper value for maximal no of steps
+           = -2 : Selected RosenbrockADJ method not implemented
+           = -3 : Hmin/Hmax/Hstart must be positive
+           = -4 : FacMin/FacMax/FacRej must be positive
+           = -5 : Improper tolerance values
+           = -6 : No of steps exceeds maximum bound
+           = -7 : Step size too small
+           = -8 : Matrix is repeatedly singular
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     INPUT PARAMETERS:
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    ICNTRL[0]   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+
+    ICNTRL[1]   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+              = 1:  AbsTol, RelTol are scalars
+
+    ICNTRL[2]  -> selection of a particular Rosenbrock method
+        = 0 :  default method is Rodas3
+        = 1 :  method is  Ros2
+        = 2 :  method is  Ros3 
+        = 3 :  method is  Ros4 
+        = 4 :  method is  Rodas3
+        = 5:   method is  Rodas4
+
+    ICNTRL[3]  -> maximum number of integration steps
+        For ICNTRL[4]=0) the default value of BUFSIZE is used
+
+    ICNTRL[5]  -> selection of a particular Rosenbrock method for the
+                continuous adjoint integration - for cts adjoint it
+                can be different than the forward method ICNTRL(3)
+         Note 1: to avoid interpolation errors (which can be huge!) 
+                   it is recommended to use only ICNTRL[6] = 2 or 4
+         Note 2: the performance of the full continuous adjoint
+                   strongly depends on the forward solution accuracy Abs/RelTol
+
+    ICNTRL[6] -> Type of adjoint algorithm
+         = 0 : default is discrete adjoint ( of method ICNTRL[3] )
+         = 1 : no adjoint
+         = 2 : discrete adjoint ( of method ICNTRL[3] )
+         = 3 : fully adaptive continuous adjoint ( with method ICNTRL[6] )
+         = 4 : simplified continuous adjoint ( with method ICNTRL[6] )
+
+    ICNTRL[7]  -> checkpointing the LU factorization at each step:
+        ICNTRL[7]=0 : do *not* save LU factorization (the default)
+        ICNTRL[7]=1 : save LU factorization
+        Note: if ICNTRL[7]=1 the LU factorization is *not* saved
+
+~~~>  Real input parameters:
+
+    RCNTRL[0]  -> Hmin, lower bound for the integration step size
+          It is strongly recommended to keep Hmin = ZERO
+
+    RCNTRL[1]  -> Hmax, upper bound for the integration step size
+
+    RCNTRL[2]  -> Hstart, starting value for the integration step size
+
+    RCNTRL[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+
+    RCNTRL[4]  -> FacMax, upper bound on step increase factor (default=6)
+
+    RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+            (default=0.1)
+
+    RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+         than the predicted value  (default=0.9)
+
+    RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+                  than ThetaMin the Jacobian is not recomputed;
+                  (default=0.001)
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT PARAMETERS:
+
+    Note: each call to RosenbrockADJ adds the corrent no. of fcn calls
+      to previous value of ISTATUS(1), and similar for the other params.
+      Set ISTATUS[0:9] = 0 before call to avoid this accumulation.
+
+    ISTATUS[0] = No. of function calls
+    ISTATUS[1] = No. of jacobian calls
+    ISTATUS[2] = No. of steps
+    ISTATUS[3] = No. of accepted steps
+    ISTATUS[4] = No. of rejected steps (except at the beginning)
+    ISTATUS[5] = No. of LU decompositions
+    ISTATUS[6] = No. of forward/backward substitutions
+    ISTATUS[7] = No. of singular matrix decompositions
+
+    RSTATUS[0]  -> Texit, the time corresponding to the 
+                   computed Y upon return
+    RSTATUS[1]  -> Hexit, last accepted step before exit
+    For multiple restarts, use Hexit as Hstart in the following run
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  Local variables */
+  KPP_REAL Roundoff, FacMin, FacMax, FacRej, FacSafe;
+  KPP_REAL Hmin, Hmax, Hstart;
+  KPP_REAL Texit=0.0;
+  int i, UplimTol, Max_no_steps=0, IERR;
+  int AdjointType=0, CadjMethod=0;
+  int Autonomous, VectorTol, SaveLU; /* Holds boolean values */
+
+  stack_ptr = -1;
+
+/*~~~>  Initialize statistics */
+  for(i=0; i<20; i++) {
+    ISTATUS[i] = 0;
+    RSTATUS[i] = ZERO;
+  }
+
+/*~~~>  Autonomous or time dependent ODE. Default is time dependent. */
+  Autonomous = !(ICNTRL[0] == 0);
+
+/*~~~> For Scalar tolerances(ICNTRL[1] != 0) the code uses AbsTol[0] and 
+         RelTol[0]
+   For Vector tolerances(ICNTRL[1] == 0) the code uses AbsTol[1:NVAR] and 
+     RelTol[1:NVAR] */
+
+  if (ICNTRL[1] == 0) {
+    VectorTol = TRUE;
+    UplimTol  = NVAR;
+  }
+  else { 
+    VectorTol = FALSE;
+    UplimTol  = 1;
+  }
+
+/*~~~>   Initialize the particular Rosenbrock method selected */
+  switch( ICNTRL[2] ) {
+    case 0:
+    case 4:
+      Rodas3();
+      break;
+    case 1:
+      Ros2();
+      break;
+    case 2:
+      Ros3();
+      break;
+    case 3:
+      Ros4();
+      break;
+    case 5:
+      Rodas4();
+      break;
+    default:
+      printf( "Unknown Rosenbrock method: ICNTRL[2]=%d", ICNTRL[2] );
+      return ros_ErrorMsg(-2, Tstart, ZERO);
+  } /* End switch */
+
+/*~~~>   The maximum number of steps admitted */
+  if (ICNTRL[3] == 0)
+    Max_no_steps = bufsize - 1;
+  else if (Max_no_steps > 0)
+    Max_no_steps = ICNTRL[3];
+  else {
+    printf("User-selected max no. of steps: ICNTRL[3]=%d",ICNTRL[3] );
+    return ros_ErrorMsg(-1,Tstart,ZERO);
+  }
+
+/*~~~>The particular Rosenbrock method chosen for integrating the cts adjoint*/
+  if (ICNTRL[5] == 0)
+    CadjMethod = 4;
+  else if ( (ICNTRL[5] >= 1) && (ICNTRL[5] <= 5) )
+    CadjMethod = ICNTRL[5];
+  else {
+    printf( "Unknown CADJ Rosenbrock method: ICNTRL[5]=%d", CadjMethod );
+    return ros_ErrorMsg(-2,Tstart,ZERO);
+  }
+
+/*~~~>  Discrete or continuous adjoint formulation */
+  if ( ICNTRL[6] == 0 )
+    AdjointType = Adj_discrete;
+  else if ( (ICNTRL[6] >= 1) && (ICNTRL[6] <= 4) )
+    AdjointType = ICNTRL[6];
+  else {
+    printf( "User-selected adjoint type: ICNTRL[6]=%d", AdjointType );
+    return ros_ErrorMsg(-9,Tstart,ZERO);
+  }
+
+/*~~~> Save or not the forward LU factorization */
+  SaveLU = (ICNTRL[7] != 0);
+
+/*~~~>  Unit roundoff (1+Roundoff>1)  */
+  Roundoff = WLAMCH('E');
+
+/*~~~>  Lower bound on the step size: (positive value) */
+  if (RCNTRL[0] == ZERO)
+    Hmin = ZERO;
+  else if (RCNTRL[0] > ZERO)
+    Hmin = RCNTRL[0];
+  else {
+    printf( "User-selected Hmin: RCNTRL[0]=%f", RCNTRL[0] );
+    return ros_ErrorMsg(-3,Tstart,ZERO);
+  }
+
+/*~~~>  Upper bound on the step size: (positive value) */
+  if (RCNTRL[1] == ZERO)
+    Hmax = ABS(Tend-Tstart);
+  else if (RCNTRL[1] > ZERO)
+    Hmax = MIN(ABS(RCNTRL[1]),ABS(Tend-Tstart));
+  else {
+    printf( "User-selected Hmax: RCNTRL[1]=%f", RCNTRL[1] );
+    return ros_ErrorMsg(-3,Tstart,ZERO);
+  }
+
+/*~~~>  Starting step size: (positive value) */
+  if (RCNTRL[2] == ZERO) {
+    Hstart = MAX(Hmin,DeltaMin);
+  }
+  else if (RCNTRL[2] > ZERO)
+    Hstart = MIN(ABS(RCNTRL[2]),ABS(Tend-Tstart));
+  else {
+    printf( "User-selected Hstart: RCNTRL[2]=%f", RCNTRL[2] );
+    return ros_ErrorMsg(-3,Tstart,ZERO);
+  }
+
+/*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax */
+  if (RCNTRL[3] == ZERO)
+    FacMin = (KPP_REAL)0.2;
+  else if (RCNTRL[3] > ZERO)
+    FacMin = RCNTRL[3];
+  else {
+    printf( "User-selected FacMin: RCNTRL[3]=%f", RCNTRL[3] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+  if (RCNTRL[4] == ZERO)
+    FacMax = (KPP_REAL)6.0;
+  else if (RCNTRL[4] > ZERO)
+    FacMax = RCNTRL[4];
+  else {
+    printf( "User-selected FacMax: RCNTRL[4]=%f", RCNTRL[4] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+
+/*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+  if (RCNTRL[5] == ZERO)
+    FacRej = (KPP_REAL)0.1;
+  else if (RCNTRL[5] > ZERO)
+    FacRej = RCNTRL[5];
+  else {
+    printf( "User-selected FacRej: RCNTRL[5]=%f", RCNTRL[5] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+
+/*~~~>   FacSafe: Safety Factor in the computation of new step size */
+  if (RCNTRL[6] == ZERO)
+    FacSafe = (KPP_REAL)0.9;
+  else if (RCNTRL[6] > ZERO)
+    FacSafe = RCNTRL[6];
+  else {
+    printf( "User-selected FacSafe: RCNTRL[6]=%f", RCNTRL[6] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+
+/*~~~>  Check if tolerances are reasonable */
+  for(i=0; i < UplimTol; i++) {
+    if ( (AbsTol[i] <= ZERO) || (RelTol[i] <= (KPP_REAL)10.0*Roundoff)
+	 || (RelTol[i] >= (KPP_REAL)1.0) ) {
+      printf( " AbsTol[%d] = %f", i, AbsTol[i] );
+      printf( " RelTol[%d] = %f", i, RelTol[i] );
+      return ros_ErrorMsg(-5,Tstart,ZERO);
+    }
+  }
+
+/*~~~>  Allocate checkpoint space or open checkpoint files */
+  if (AdjointType == Adj_discrete) {
+    ros_AllocateDBuffers( ros_S, SaveLU );
+  }
+  else if ( (AdjointType == Adj_continuous) || 
+	    (AdjointType == Adj_simple_continuous) ) {
+    ros_AllocateCBuffers();
+  }
+
+/*~~~>  CALL Forward Rosenbrock method */
+  IERR = ros_FwdInt(Y, Tstart, Tend, Texit, AbsTol, RelTol, AdjointType, Hmin,
+		    Hstart, Hmax, Roundoff, ISTATUS, Max_no_steps, 
+		    RSTATUS, Autonomous, VectorTol, FacMax, FacMin,
+		    FacSafe, FacRej, SaveLU);
+
+  printf( "\n\nFORWARD STATISTICS\n" );
+  printf( "Step=%d Acc=%d Rej=%d Singular=%d\n\n", Nstp, Nacc, Nrej, Nsng );
+
+/*~~~>  If Forward integration failed return */
+  if (IERR<0)
+    return IERR;
+
+/*~~~>   Initialize the particular Rosenbrock method for continuous adjoint */
+  if ( (AdjointType == Adj_continuous) || 
+       (AdjointType == Adj_simple_continuous) ) {
+    switch (CadjMethod) {
+      case 1:
+	Ros2();
+	break;
+      case 2:
+	Ros3();
+	break;
+      case 3:
+	Ros4();
+	break;
+      case 4:
+	Rodas3();
+	break;
+      case 5:
+	Rodas4();
+	break;
+      default:
+	printf( "Unknown Rosenbrock method: ICNTRL[2]=%d", ICNTRL[2] );
+	return ros_ErrorMsg(-2,Tstart,ZERO);
+    }
+  } /* End switch */
+
+  switch( AdjointType ) {
+    case Adj_discrete:
+      IERR = ros_DadjInt (NADJ, Lambda, Tstart, Tend, Texit, SaveLU, ISTATUS, 
+			  Roundoff, Autonomous );
+      break;
+    case Adj_continuous:
+      IERR = ros_CadjInt (NADJ, Lambda, Tend, Tstart, Texit, AbsTol_adj, 
+			  RelTol_adj, RSTATUS, Hmin, Hmax, Hstart, Roundoff,
+			  Max_no_steps, Autonomous, VectorTol, FacMax, FacMin,
+			  FacSafe, FacRej, ISTATUS);
+      break;
+    case Adj_simple_continuous:
+      IERR = ros_SimpleCadjInt (NADJ, Lambda, Tstart, Tend, Texit, ISTATUS, 
+				Autonomous, Roundoff);
+  } /* End switch for AdjointType */
+
+  printf( "ADJOINT STATISTICS\n" );
+  printf( "Step=%d Acc=%d Rej=%d Singular=%d\n",Nstp,Nacc,Nrej,Nsng );
+
+/*~~~>  Free checkpoint space or close checkpoint files */
+  if (AdjointType == Adj_discrete)
+    ros_FreeDBuffers( SaveLU );
+  else if ( (AdjointType == Adj_continuous) || 
+	    (AdjointType == Adj_simple_continuous) )
+    ros_FreeCBuffers();
+
+  return IERR;
+}
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_AllocateDBuffers( int S, int SaveLU ) {
+/*~~~>  Allocate buffer space for discrete adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    
+  int i;
+    
+  chk_H = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_H == NULL) {
+    printf("Failed allocation of buffer H");
+    exit(0);
+  }
+    
+  chk_T = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_T == NULL) {
+    printf("Failed allocation of buffer T");
+    exit(0);
+  }
+  
+  chk_Y = (KPP_REAL**) malloc(bufsize * sizeof(KPP_REAL*));
+  if (chk_Y == NULL) {
+    printf("Failed allocation of buffer Y");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_Y[i] = (KPP_REAL*) malloc(NVAR * S * sizeof(KPP_REAL));
+    if (chk_Y[i] == NULL) {
+      printf("Failed allocation of buffer Y");
+      exit(0);
+    }
+  }
+    
+  chk_K = (KPP_REAL**) malloc(bufsize * sizeof(KPP_REAL*));
+  if (chk_K == NULL) {
+    printf("Failed allocation of buffer K");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_K[i] = (KPP_REAL*) malloc(NVAR * S * sizeof(KPP_REAL));
+    if (chk_K == NULL) {
+      printf("Failed allocation of buffer K");
+      exit(0);
+    }
+  }
+  
+  if (SaveLU) {
+    chk_J = (KPP_REAL**) malloc(bufsize * sizeof(KPP_REAL*));
+    if (chk_J == NULL) {
+      printf( "Failed allocation of buffer J");
+      exit(0);
+    }
+#ifdef FULL_ALGEBRA
+    for(i=0; i<bufsize; i++) {
+      chk_J[i] = (KPP_REAL*) malloc(NVAR * NVAR * sizeof(KPP_REAL));
+      if (chk_J == NULL) {
+	printf( "Failed allocation of buffer J");
+	exit(0);
+      }
+    }
+#else
+    for(i=0; i<bufsize; i++) {
+      chk_J[i] = (KPP_REAL*) malloc(LU_NONZERO * sizeof(KPP_REAL));
+      if (chk_J == NULL) {
+	printf( "Failed allocation of buffer J");
+	exit(0);
+      }
+    }
+#endif
+  } 
+
+} /* End of ros_AllocateDBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FreeDBuffers( int SaveLU ) {
+/*~~~>  Deallocate buffer space for discrete adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+
+  free(chk_H);
+  free(chk_T);
+
+  for(i=0; i<bufsize; i++) {
+    free(chk_Y[i]);
+    free(chk_K[i]);
+  }
+  free(chk_Y);
+  free(chk_K);
+
+  if (SaveLU) {
+    for(i=0; i<bufsize; i++)
+      free(chk_J[i]);
+    free(chk_J);
+  }
+
+} /* End of ros_FreeDBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_AllocateCBuffers() {
+/*~~~>  Allocate buffer space for continuous adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+
+  chk_H = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_H == NULL) {
+    printf( "Failed allocation of buffer H");
+    exit(0);
+  }
+
+  chk_T = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_T == NULL) {
+    printf( "Failed allocation of buffer T");
+    exit(0);
+  }
+
+  chk_Y = (KPP_REAL**) malloc(sizeof(KPP_REAL*) * bufsize);
+  if (chk_Y == NULL) {
+    printf( "Failed allocation of buffer Y");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_Y[i] = (KPP_REAL*) malloc( sizeof(KPP_REAL)* NVAR );
+    if (chk_Y == NULL) {
+      printf( "Failed allocation of buffer Y");
+      exit(0);
+    }
+  }
+
+  chk_dY = (KPP_REAL**) malloc(sizeof(KPP_REAL*) * bufsize);
+  if (chk_dY == NULL) {
+    printf( "Failed allocation of buffer dY");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_dY[i] = (KPP_REAL*) malloc( sizeof(KPP_REAL) * NVAR);
+    if (chk_dY == NULL) {
+      printf( "Failed allocation of buffer dY");
+      exit(0);
+    }
+  }
+
+  chk_d2Y = (KPP_REAL**) malloc(sizeof(KPP_REAL*) * bufsize);
+  if (chk_d2Y == NULL) {
+    printf( "Failed allocation of buffer d2Y");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_d2Y[i] = (KPP_REAL*) malloc( sizeof(KPP_REAL) * NVAR);
+    if (chk_d2Y == NULL) {
+      printf( "Failed allocation of buffer d2Y");
+      exit(0);
+    }
+  }
+} /* End of ros_AllocateCBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FreeCBuffers() {
+/*~~~>  Dallocate buffer space for continuous adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  
+  int i;
+
+  free(chk_H);
+  free(chk_T);
+
+  for(i=0; i<bufsize; i++) {
+    free(chk_Y[i]);
+    free(chk_dY[i]);
+    free(chk_d2Y[i]);
+  }
+
+  free(chk_Y);
+  free(chk_dY);
+  free(chk_d2Y);
+
+} /* End of ros_FreeCBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_DPush( int S, KPP_REAL T, KPP_REAL H, KPP_REAL Ystage[], 
+		KPP_REAL K[], KPP_REAL E[], int P[], int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Saves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+
+  stack_ptr = stack_ptr + 1;
+  if ( stack_ptr >= bufsize ) {
+    printf( "Push failed: buffer overflow" );
+    exit(0);
+  }
+
+  chk_H[ stack_ptr ] = H;
+  chk_T[ stack_ptr ] = T;
+  for(i=0; i<NVAR*S; i++) {
+    chk_Y[stack_ptr][i] = Ystage[i];
+    chk_K[stack_ptr][i] = K[i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    int j;
+    for(j=0; j<NVAR; j++) {
+      for(i=0; i<NVAR; i++)
+	chk_J[stack_ptr][i][j] = E[i][j];
+      chk_P[stack_ptr][j] = P[j];
+    }
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      chk_J[stack_ptr][i] = E[i];
+#endif
+  }
+
+} /* End of ros_DPush */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_DPop( int S, KPP_REAL* T, KPP_REAL* H, KPP_REAL* Ystage,
+	       KPP_REAL* K, KPP_REAL* E, int* P, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Retrieves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    
+  int i;
+  
+  if ( stack_ptr < 0 ) {
+    printf( "Pop failed: empty buffer" );
+    exit(0);
+  }
+
+  *H = chk_H[ stack_ptr ];
+  *T = chk_T[ stack_ptr ];
+
+  for(i=0; i<NVAR*S; i++) {
+    Ystage[i] = chk_Y[stack_ptr][i];
+    K[i]      = chk_K[stack_ptr][i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    int j;
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	E[(j*NVAR)+i] = chk_J[stack_ptr][j][i];
+      P[i] = chk_P[stack_ptr][i];
+    }
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      E[i] = chk_J[stack_ptr][i];
+#endif
+  }
+
+  stack_ptr--;
+
+} /* End of ros_DPop */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_CPush( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+		KPP_REAL d2Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Saves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  int i;
+  
+  stack_ptr++;
+  if ( stack_ptr > bufsize ) {
+    printf( "Push failed: buffer overflow" );
+    exit(0);
+  }
+  chk_H[ stack_ptr ] = H;
+  chk_T[ stack_ptr ] = T;
+
+  for(i = 0; i< NVAR; i++ ) {
+    chk_Y[stack_ptr][i] = Y[i];
+    chk_dY[stack_ptr][i] = dY[i];
+    chk_d2Y[stack_ptr][i] = d2Y[i];
+  }
+} /* End of ros_CPush */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_CPop( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+	       KPP_REAL d2Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Retrieves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  int i;
+
+  if ( stack_ptr <= 0 ) {
+    printf( "Pop failed: empty buffer" );
+    exit(0);
+  }
+  H = chk_H[ stack_ptr ];
+  T = chk_T[ stack_ptr ];
+
+  for(i=0; i<NVAR; i++) {
+    Y[i] = chk_Y[stack_ptr][i];
+    dY[i] = chk_dY[stack_ptr][i];
+    d2Y[i] = chk_d2Y[stack_ptr][i];
+  }
+  stack_ptr--;
+} /* End of ros_CPop */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_ErrorMsg( int Code, KPP_REAL T, KPP_REAL H) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Handles all error messages
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int IERR = Code;
+  printf( "Forced exit from RosenbrockADJ due to the following error:");
+  
+  switch (Code) {
+    case -1:
+      printf( "--> Improper value for maximal no of steps" );
+      break;
+    case -2:
+      printf( "--> Selected RosenbrockADJ method not implemented" );
+      break;
+    case -3:
+      printf( "--> Hmin/Hmax/Hstart must be positive" );
+      break;
+    case -4:
+      printf( "--> FacMin/FacMax/FacRej must be positive" );
+      break;
+    case -5:
+      printf( "--> Improper tolerance values" );
+      break;
+    case -6:
+      printf( "--> No of steps exceeds maximum buffer bound" );
+      break;
+    case -7:
+      printf( "--> Step size too small: T + 10*H = T or H < Roundoff" );
+      break;
+    case -8:
+      printf( "--> Matrix is repeatedly singular" );
+      break;
+    case -9:
+      printf( "--> Improper type of adjoint selected" );
+      break;
+    default:
+      printf( "Unknown Error code: %d", Code );
+  } /* End of switch */
+
+  return IERR;
+} /* End of ros_ErrorMsg */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_FwdInt ( KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL T, 
+		 KPP_REAL AbsTol[], KPP_REAL RelTol[], int AdjointType, 
+		 KPP_REAL Hmin, KPP_REAL Hstart, KPP_REAL Hmax, 
+		 KPP_REAL Roundoff, int ISTATUS[], int Max_no_steps, 
+		 KPP_REAL RSTATUS[], int Autonomous, int VectorTol, 
+		 KPP_REAL FacMax, KPP_REAL FacMin, KPP_REAL FacSafe, 
+		 KPP_REAL FacRej, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockADJ method
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+~~~> Y - Input: the initial condition at Tstart; Output: the solution at T
+~~~> Tstart, Tend - Input: integration interval
+~~~> T - Output: time at which the solution is returned (T=Tend if success)
+~~~> AbsTol, RelTol - Input: tolerances
+~~~> IERR - Output: Error indicator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/* ~~~~ Local variables */
+  KPP_REAL Ynew[NVAR], Fcn0[NVAR], Fcn[NVAR];
+  KPP_REAL K[NVAR*ros_S], dFdT[NVAR];
+  KPP_REAL *Ystage = NULL; /* Array pointer */
+#ifdef FULL_ALGEBRA
+  KPP_REAL Jac0[NVAR][NVAR],  Ghimj[NVAR][NVAR];
+#else
+  KPP_REAL Jac0[LU_NONZERO], Ghimj[LU_NONZERO];
+#endif
+  KPP_REAL H, Hnew, HC, HG, Fac, Tau;
+  KPP_REAL Err, Yerr[NVAR];
+  int Pivot[NVAR], Direction, ioffset, i, j=0, istage;
+  int RejectLastH, RejectMoreH, Singular; /* Boolean Values */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  Allocate stage vector buffer if needed */
+  if (AdjointType == Adj_discrete) {
+    Ystage = (KPP_REAL*) malloc(NVAR*ros_S*sizeof(KPP_REAL));
+    /* Uninitialized Ystage may lead to NaN on some compilers */
+    if (Ystage == NULL) {
+      printf( "Allocation of Ystage failed" );
+      exit(0);
+    }
+  }
+
+/*~~~>  Initial preparations */
+  T = Tstart;
+  RSTATUS[Nhexit] = ZERO;
+  H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) );
+  if (ABS(H) <= ((KPP_REAL)10.0)*Roundoff)
+    H = DeltaMin;
+
+  if (Tend >= Tstart)
+    Direction = 1;
+  else
+    Direction = -1;
+
+  H = Direction*H;
+  
+  RejectLastH = FALSE;
+  RejectMoreH = FALSE;
+
+/*~~~> Time loop begins below */
+  while ( ((Direction > 0) && ((T-Tend)+Roundoff <= ZERO)) || 
+	  ((Direction < 0) && ((Tend-T)+Roundoff <= ZERO)) ) { /* TimeLoop */
+
+    if ( ISTATUS[Nstp] > Max_no_steps )  /* Too many steps */
+      return ros_ErrorMsg(-6,T,H);
+
+    if ( ((T+((KPP_REAL)0.1)*H) == T) || (H <= Roundoff) ) /* Step size 
+							    too small */
+      return ros_ErrorMsg(-7,T,H);
+
+/*~~~>  Limit H if necessary to avoid going beyond Tend */
+    RSTATUS[Nhexit] = H;
+    H = MIN(H,ABS(Tend-T));
+
+/*~~~>   Compute the function at current time */
+    FunTemplate(T,Y,Fcn0);
+    ISTATUS[Nfun] = ISTATUS[Nfun] + 1;
+
+/*~~~>  Compute the function derivative with respect to T */
+    if (!Autonomous)
+      ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT, ISTATUS );
+
+/*~~~>   Compute the Jacobian at current time */
+    JacTemplate(T,Y,Jac0);
+    ISTATUS[Njac] = ISTATUS[Njac] + 1;
+
+/*~~~>  Repeat step calculation until current step accepted */
+    do {  /* UntilAccepted */
+
+      Singular = ros_PrepareMatrix ( H,Direction,ros_Gamma[0],Jac0,Ghimj,Pivot,
+				     ISTATUS );
+
+      if (Singular) /* More than 5 consecutive failed decompositions */
+	return ros_ErrorMsg(-8,T,H);
+
+/*~~~>   Compute the stages */
+      for( istage = 0; istage < ros_S; istage++ ) { /* Stage */
+
+	/* Current istage offset. Current istage vector is 
+	   K(ioffset+1:ioffset+NVAR) */
+	ioffset = NVAR*istage;
+
+	/*For the 1st istage the function has been computed previously*/
+	if ( istage == 0 ) {
+	  WCOPY(NVAR,Fcn0,1,Fcn,1);
+	  if (AdjointType == Adj_discrete) { /* Save stage solution */
+	    for(i=0; i<NVAR; i++)
+	      Ystage[i] = Y[i];
+	    WCOPY(NVAR,Y,1,Ynew,1);
+	  }
+	}
+	/* istage>0 and a new function evaluation is needed at the 
+	   current istage */
+	else if ( ros_NewF[istage] ) {
+	  WCOPY(NVAR,Y,1,Ynew,1);
+	  for ( j = 0; j < istage; j++ ) {
+	    WAXPY( NVAR,ros_A[(istage)*(istage-1)/2+j], 
+		   &K[NVAR*j],1,Ynew,1 );
+	  }
+	  Tau = T + ros_Alpha[istage]*Direction*H;
+	  FunTemplate(Tau,Ynew,Fcn);
+	  ISTATUS[Nfun] = ISTATUS[Nfun] + 1;
+	} /* if istage == 1 elseif ros_NewF[istage] */
+
+	/* Save stage solution every time even if ynew is not updated */
+	if ( ( istage > 0 ) && (AdjointType == Adj_discrete) ) {
+	  for(i=0; i<NVAR; i++)
+	    Ystage[ioffset+i] = Ynew[i];
+	}
+	WCOPY(NVAR,Fcn,1,&K[ioffset],1);
+	for( j = 0; j < istage; j++ ) {
+	  HC = ros_C[(istage)*(istage-1)/2+j]/(Direction*H);
+	  WAXPY(NVAR,HC,&K[NVAR*j],1,&K[ioffset],1);
+	}
+	if (( !Autonomous) && (ros_Gamma[istage] != ZERO)) {
+	  HG = Direction*H*ros_Gamma[istage];
+	  WAXPY(NVAR,HG,dFdT,1,&K[ioffset],1);
+	}
+	ros_Solve('N', Ghimj, Pivot, &K[ioffset], ISTATUS);
+      } /* End of Stage loop */
+
+/*~~~>  Compute the new solution */
+      WCOPY(NVAR,Y,1,Ynew,1);
+      for( j=0; j<ros_S; j++ )
+	WAXPY(NVAR,ros_M[j],&K[NVAR*j],1,Ynew,1);
+
+/*~~~>  Compute the error estimation */ 
+      WSCAL(NVAR,ZERO,Yerr,1);
+      for( j=0; j<ros_S; j++ )
+	WAXPY(NVAR,ros_E[j],&K[NVAR*j],1,Yerr,1);
+      Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol );
+
+/*~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax */
+      Fac  = MIN(FacMax,MAX(FacMin,FacSafe/pow(Err,(ONE/ros_ELO))));
+      Hnew = H*Fac;
+
+/*~~~>  Check the error magnitude and adjust step size */
+      ISTATUS[Nstp] = ISTATUS[Nstp] + 1;
+      if ( (Err <= ONE) || (H <= Hmin) ) {  /*~~~> Accept step */
+	ISTATUS[Nacc]++;
+	if (AdjointType == Adj_discrete) { /* Save current state */
+	  ros_DPush( ros_S, T, H, Ystage, K, Ghimj, Pivot, SaveLU );
+	}
+	else if ( (AdjointType == Adj_continuous) || 
+		  (AdjointType == Adj_simple_continuous) ) {
+#ifdef FULL_ALGEBRA
+	  K = MATMUL(Jac0,Fcn0);
+#else
+	  Jac_SP_Vec( Jac0, Fcn0, &K[0] );
+#endif
+	  if ( !Autonomous)
+	    WAXPY(NVAR,ONE,dFdT,1,&K[0],1);
+	  ros_CPush( T, H, Y, Fcn0, &K[0] );
+	}
+	WCOPY(NVAR,Ynew,1,Y,1);
+	T = T + Direction*H;
+	Hnew = MAX(Hmin,MIN(Hnew,Hmax));
+	if (RejectLastH) { /* No step size increase after a 
+			     rejected step */
+	  Hnew = MIN(Hnew,H);
+	}
+	RSTATUS[Nhexit] = H;
+	RSTATUS[Nhnew]  = Hnew;
+	RSTATUS[Ntexit] = T;
+	RejectLastH = FALSE;
+	RejectMoreH = FALSE;
+	H = Hnew;
+	break; /* UntilAccepted - EXIT THE LOOP: WHILE STEP NOT ACCEPTED */
+      }
+
+      else { /*~~~> Reject step */
+	if (RejectMoreH)
+	  Hnew = H*FacRej;
+        RejectMoreH = RejectLastH;
+        RejectLastH = TRUE;
+        H = Hnew;
+        if (ISTATUS[Nacc] >= 1)
+	  ISTATUS[Nrej]++;
+      } /* End if else - Err <= 1 */
+    
+    } while(1); /* End of UntilAccepted do loop */
+  } /* End of TimeLoop */
+   
+/*~~~> Save last state: only needed for continuous adjoint */
+  if ( (AdjointType == Adj_continuous) || 
+       (AdjointType == Adj_simple_continuous) ) {
+    FunTemplate(T,Y,Fcn0);
+    ISTATUS[Nfun]++;
+    JacTemplate(T,Y,Jac0);
+    ISTATUS[Njac]++;
+#ifdef FULL_ALGEBRA
+    K = MATMUL(Jac0,Fcn0);
+#else
+    Jac_SP_Vec( Jac0, Fcn0, &K[0] );
+#endif
+    if (!Autonomous) {
+      ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT, ISTATUS );
+      WAXPY(NVAR,ONE,dFdT,1,&K[0],1);
+    }
+    ros_CPush( T, H, Y, Fcn0, &K[0] );
+/*~~~> Deallocate stage buffer: only needed for discrete adjoint */
+  }
+  else if (AdjointType == Adj_discrete) {
+    free(Ystage);
+  }
+
+/*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+} /* End of ros_FwdInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_DadjInt ( int NADJ, KPP_REAL Lambda[][NVAR], KPP_REAL Tstart, 
+		  KPP_REAL Tend, KPP_REAL T, int SaveLU, int ISTATUS[], 
+		  KPP_REAL Roundoff, int Autonomous) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockSOA method
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~> NADJ - Input: the initial condition at Tstart; Output: the solution at T
+!~~~> Lambda[NADJ][NVAR] -  First order adjoint
+!~~~> Tstart, Tend - Input: integration interval
+!~~~> T - Output: time at which the solution is returned (T=Tend if success)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~ Local variables */
+  KPP_REAL Ystage[NVAR*ros_S], K[NVAR*ros_S];
+  KPP_REAL U[NADJ][NVAR*ros_S], V[NADJ][NVAR*ros_S];
+#ifdef FULL_ALGEBRA
+  KPP_REAL Jac[NVAR][NVAR], dJdT[NVAR][NVAR], Ghimj[NVAR][NVAR];
+#else
+  KPP_REAL Jac[LU_NONZERO], dJdT[LU_NONZERO], Ghimj[LU_NONZERO];
+#endif
+  KPP_REAL Hes0[NHESS];
+  KPP_REAL Tmp[NVAR], Tmp2[NVAR];
+  KPP_REAL H=0.0, HC, HA, Tau;
+  int Pivot[NVAR], Direction;
+  int i, j, m, istage, istart, jstart;
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  if (Tend  >=  Tstart)
+    Direction = 1;
+  else
+    Direction = -1;
+  
+  /*~~~> Time loop begins below */
+  while ( stack_ptr > 0 ) { /* TimeLoop */
+
+    /*~~~>  Recover checkpoints for stage values and vectors */
+    ros_DPop( ros_S, &T, &H, &Ystage[0], &K[0], &Ghimj[0], &Pivot[0], SaveLU );
+
+    /*~~~>    Compute LU decomposition */
+    if (!SaveLU) {
+      JacTemplate(T,&Ystage[0],Ghimj);
+      ISTATUS[Njac] = ISTATUS[Njac] + 1;
+      Tau = ONE/(Direction*H*ros_Gamma[0]);
+#ifdef FULL_ALGEBRA
+      for(j=0; j<NVAR; j++) {
+	for(i=0; i<NVAR; i++)
+	  Ghimj[i][j] = -Ghimj[i][j];
+      }
+      for(i=0; i<NVAR; i++)
+	Ghimj[i][i] = Ghimj[i][i]+Tau;
+#else
+      WSCAL(LU_NONZERO,(-ONE),Ghimj,1);
+      for (i=0; i<NVAR; i++)
+	Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+Tau;
+#endif
+      ros_Decomp(Ghimj, Pivot, &j, ISTATUS);
+    }
+
+/*~~~>   Compute Hessian at the beginning of the interval */
+    HessTemplate(T,&Ystage[0],Hes0);
+
+/*~~~>   Compute the stages */
+    for (istage = ros_S - 1; istage >= 0; istage--) { /* Stage loop */
+
+      /*~~~> Current istage first entry */
+      istart = NVAR*istage;
+	 
+      /*~~~> Compute U */
+      for (m = 0; m<NADJ; m++) {
+	WCOPY(NVAR,&Lambda[m][0],1,&U[m][istart],1);
+	WSCAL(NVAR,ros_M[istage],&U[m][istart],1);
+      } /* m=0:NADJ-1 */
+      for (j = istage+1; j < ros_S; j++) {
+	jstart = NVAR*j;
+	HA = ros_A[j*(j-1)/2+istage];
+	HC = ros_C[j*(j-1)/2+istage]/(Direction*H);
+	for ( m = 0; m < NADJ; m++ ) {
+	  WAXPY(NVAR,HA,&V[m][jstart],1,&U[m][istart],1);
+	  WAXPY(NVAR,HC,&U[m][jstart],1,&U[m][istart],1);
+	} /* m=0:NADJ-1 */
+      }
+      for ( m = 0; m < NADJ; m++ )
+	ros_Solve('T', Ghimj, Pivot, &U[m][istart], ISTATUS); /* m=1:NADJ-1 */
+
+      /*~~~> Compute V */
+      Tau = T + ros_Alpha[istage]*Direction*H;
+      JacTemplate(Tau,&Ystage[istart],Jac);
+      ISTATUS[Njac]++;
+      for ( m = 0; m < NADJ; m++ ) {
+#ifdef FULL_ALGEBRA
+	for (i=istart; i < istart+NVAR-1; i++ )
+	  V[[m][i] = MATMUL(TRANSPOSE(Jac),U[m][i]];
+#else
+	JacTR_SP_Vec(Jac,&U[m][istart],&V[m][istart]); 
+#endif
+      } /* m=0:NADJ-1 */
+    } /*End of Stage loop */
+
+    if (!Autonomous)
+/*~~~>  Compute the Jacobian derivative with respect to T.
+        Last "Jac" computed for stage 1 */
+      ros_JacTimeDerivative ( T, Roundoff, &Ystage[0], Jac, dJdT, ISTATUS );
+
+/*~~~>  Compute the new solution */
+    /*~~~>  Compute Lambda */ 
+    for( istage = 0; istage < ros_S; istage++ ) {
+      istart = NVAR*istage;
+      for (m = 0; m < NADJ; m++) {
+	/* Add V_i */
+	WAXPY(NVAR,ONE,&V[m][istart],1,&Lambda[m][0],1);
+	/* Add (H0xK_i)^T * U_i */
+	HessTR_Vec ( Hes0, &U[m][istart], &K[istart], Tmp );
+	WAXPY(NVAR,ONE,Tmp,1,&Lambda[m][0],1);
+      } /* m=0:NADJ-1 */
+    }
+
+    /* Add H * dJac_dT_0^T * \sum(gamma_i U_i) */
+    /* Tmp holds sum gamma_i U_i */
+    if (!Autonomous) {
+      for( m = 0; m < NADJ; m++ ) {
+	for(i=0; i<NVAR; i++)
+	  Tmp[i] = ZERO;
+	for( istage = 0; istage < ros_S; istage++ ) {
+	  istart = NVAR*istage;
+	  WAXPY(NVAR,ros_Gamma[istage],&U[m][istart],1,Tmp,1);
+	}
+#ifdef FULL_ALGEBRA
+	Tmp2 = MATMUL(TRANSPOSE(dJdT),Tmp);
+#else
+	JacTR_SP_Vec(dJdT,Tmp,Tmp2);
+#endif
+	WAXPY(NVAR,H,Tmp2,1,&Lambda[m][0],1);
+      } /* m=0:NADJ-1 */
+    } /* .NOT.Autonomous */
+  } /* End of TimeLoop */
+
+  /*~~~> Save last state */
+  /*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+} /* End of ros_DadjInt */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_CadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart, KPP_REAL Tend,
+		  KPP_REAL T, KPP_REAL AbsTol_adj[][NVAR], 
+		  KPP_REAL RelTol_adj[][NVAR], KPP_REAL RSTATUS[], 
+		  KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, int Max_no_steps, int Autonomous, 
+		  int VectorTol, KPP_REAL FacMax, KPP_REAL FacMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacRej, int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockADJ method
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+~~~> NADJ, Y[NADJ][NVAR] - Input: the initial condition at Tstart;
+                           Output: the solution at T
+~~~> Tstart, Tend - Input: integration interval 
+~~~> AbsTol_adj[NADJ][NVAR], RelTol_adj[NADJ][NVAR] - Input: adjoint tolerances
+~~~> T - Output: time at which the solution is returned (T=Tend if success)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~ Local variables */
+  KPP_REAL Y0[NVAR];
+  KPP_REAL Ynew[NADJ][NVAR], Fcn0[NADJ][NVAR], Fcn[NADJ][NVAR];
+  KPP_REAL K[NADJ][NVAR*ros_S], dFdT[NADJ][NVAR];
+#ifdef FULL_ALGEBRA
+  KPP_REAL Jac0[NVAR][NVAR], Ghimj[NVAR][NVAR], Jac[NVAR][NVAR], 
+         dJdT[NVAR][NVAR];
+#else
+  KPP_REAL Jac0[LU_NONZERO], Ghimj[LU_NONZERO], Jac[LU_NONZERO], 
+         dJdT[LU_NONZERO];
+#endif
+  KPP_REAL H, Hnew, HC, HG, Fac, Tau; 
+  KPP_REAL Err, Yerr[NADJ][NVAR];
+  int Pivot[NVAR], Direction, ioffset, j, istage, iadj;
+  int RejectLastH, RejectMoreH, Singular; /* Boolean values */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  Initial preparations */
+  T = Tstart;
+  RSTATUS[Nhexit] = (KPP_REAL)0.0;
+  H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) );
+  if (ABS(H) <= ((KPP_REAL)10.0)*Roundoff) 
+    H = DeltaMin;
+  
+  if (Tend  >=  Tstart)
+    Direction = 1;
+  else
+    Direction = -1;
+  
+  H = Direction*H;
+  RejectLastH = FALSE;
+  RejectMoreH = FALSE;
+
+/*~~~> Time loop begins below */
+  while ( ((Direction > 0) && ((T-Tend)+Roundoff <= ZERO))
+	  || ((Direction < 0) && ((Tend-T)+Roundoff <= ZERO)) ) { /*TimeLoop*/
+
+    if ( ISTATUS[Nstp] > Max_no_steps )  /* Too many steps */
+      return ros_ErrorMsg(-6,T,H);
+
+    /* Step size too small */
+    if ( ((T+((KPP_REAL)0.1)*H) == T) || (H <= Roundoff) )
+      return ros_ErrorMsg(-7,T,H);
+
+/*~~~>  Limit H if necessary to avoid going beyond Tend */
+    RSTATUS[Nhexit] = H;
+    H = MIN(H,ABS(Tend-T));
+
+/*~~~>   Interpolate forward solution */
+    ros_cadj_Y( T, Y0 );
+/*~~~>   Compute the Jacobian at current time */
+    JacTemplate(T, Y0, Jac0);
+    ISTATUS[Njac]++;
+
+/*~~~>  Compute the function derivative with respect to T */
+    if (!Autonomous) {
+      ros_JacTimeDerivative ( T, Roundoff, Y0, Jac0, dJdT, ISTATUS );
+      for (iadj = 0; iadj < NADJ; iadj++) {
+#ifdef FULL_ALGEBRA
+	for (i=0; i<NVAR; i++)
+	  dFdT[iadj][i] = MATMUL(TRANSPOSE(dJdT),Y[iadj][i]);
+#else
+	JacTR_SP_Vec(dJdT,&Y[iadj][0],&dFdT[iadj][0]);
+#endif
+	WSCAL(NVAR,(-ONE),&dFdT[iadj][0],1);
+      } /* End for loop */
+    } /* End if */
+
+/*~~~>  Ydot = -J^T*Y */
+#ifdef FULL_ALGEBRA
+    int i;
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	Jac0[i][j] = -Jac0[i][j];
+    }
+#else
+    WSCAL(LU_NONZERO,(-ONE),Jac0,1);
+#endif
+
+    for ( iadj = 0; iadj < NADJ; iadj++ ) {
+#ifdef FULL_ALGEBRA
+      int i;
+      for(i=0; i<NVAR; i++)
+	Fcn0[iadj][i] = MATMUL(TRANSPOSE(Jac0),Y[iadj][i]);
+#else
+      JacTR_SP_Vec(Jac0,&Y[iadj][0],&Fcn0[iadj][0]);
+#endif
+    }
+
+/*~~~>  Repeat step calculation until current step accepted */
+    do { /* UntilAccepted */
+
+      Singular = ros_PrepareMatrix(H,Direction,ros_Gamma[0], Jac0,Ghimj,Pivot,
+				   ISTATUS);
+      if (Singular) /* More than 5 consecutive failed decompositions */
+	return ros_ErrorMsg(-8,T,H);
+
+/*~~~>   Compute the stages */
+      for ( istage = 0; istage < ros_S; istage++ ) { /* Stage loop */
+
+	/* Current istage offset. Current istage vector 
+	   is K[ioffset+1:ioffset+NVAR] */
+	ioffset = NVAR*(istage-1);
+
+	/* For the 1st istage the function has been computed previously */
+	if ( istage == 0 ) {
+	  for ( iadj = 0; iadj < NADJ; iadj++ )
+	    WCOPY(NVAR,&Fcn0[iadj][0],1,&Fcn[iadj][0],1);
+
+	  /* istage>0 and a new function evaluation is needed at 
+	     the current istage */
+	}
+	else if ( ros_NewF[istage] ) {
+	  WCOPY(NVAR*NADJ,&Y[0][0],1,&Ynew[0][0],1);
+	  for (j = 0; j < istage-1; j++) {
+	    for ( iadj = 0; iadj < NADJ; iadj++ )
+	      WAXPY( NVAR,ros_A[(istage-1)*(istage-2)/2+j],
+		     &K[iadj][NVAR*(j-1)+1],1,&Ynew[iadj][0],1);
+	  } /* End for loop */
+	  Tau = T + ros_Alpha[istage]*Direction*H;
+	  ros_cadj_Y( Tau, Y0 );
+	  JacTemplate(Tau, Y0, Jac);
+	  ISTATUS[Njac]++;
+
+#ifdef FULL_ALGEBRA
+	  for(i=0; i<NVAR; i++) {
+	    for(j=0; j<NVAR; j++)
+	      Jac[i][j] = -Jac[i][j];
+	  }
+#else
+	  WSCAL(LU_NONZERO,(-ONE),Jac,1);
+#endif
+
+	  for ( iadj = 0; iadj < NADJ; iadj++ ) {
+#ifdef FULL_ALGEBRA
+	    for(i=0; i<NVAR; i++)
+	      Fcn[iadj][i] = MATMUL(TRANSPOSE(Jac),Ynew[iadj][i]);
+#else
+	    JacTR_SP_Vec(Jac,&Ynew[iadj][0],&Fcn[iadj][0]);
+#endif
+	  } /* End for loop */
+	} /*  if istage == 1 elseif ros_NewF(istage) */
+
+	for ( iadj = 0; iadj < NADJ; iadj++ )
+	  WCOPY(NVAR,&Fcn[iadj][0],1,&K[iadj][ioffset+1],1);
+	for ( j = 0; j < istage-1; j++ ) {
+	  HC = ros_C[(istage-1)*(istage-2)/2+j]/(Direction*H);
+	  for ( iadj = 0; iadj < NADJ; iadj++ )
+	    WAXPY(NVAR,HC,&K[iadj][NVAR*(j-1)+1],1,&K[iadj][ioffset+1],1);
+	} /* End for loop */
+	if ((!Autonomous) && (ros_Gamma[istage] != ZERO)) {
+	  HG = Direction*H*ros_Gamma[istage];
+	  for ( iadj = 0; iadj < NADJ; iadj++ )
+	    WAXPY(NVAR,HG,&dFdT[iadj][0],1,&K[iadj][ioffset+1],1);
+	} /* End if */
+	for ( iadj = 0; iadj < NADJ; iadj++ )
+	  ros_Solve('T', Ghimj, Pivot, &K[iadj][ioffset+1], ISTATUS);
+
+      } /* End of Stage loop */
+
+/*~~~>  Compute the new solution */
+      for ( iadj = 0; iadj < NADJ; iadj++ ) {
+	WCOPY(NVAR,&Y[iadj][0],1,&Ynew[iadj][0],1);
+	for ( j=0; j<ros_S; j++ )
+	  WAXPY(NVAR,ros_M[j],&K[iadj][NVAR*(j-1)+1],1,&Ynew[iadj][0],1);
+      } /* End for loop */
+
+/*~~~>  Compute the error estimation */
+      WSCAL(NVAR*NADJ,ZERO,&Yerr[0][0],1);
+      for ( j=0; j<ros_S; j++ ) {
+	for ( iadj = 0; iadj < NADJ; iadj++ )
+	  WAXPY(NVAR,ros_E[j],&K[iadj][NVAR*(j-1)+1],1,&Yerr[iadj][0],1);
+      } /* End for loop */
+
+/*~~~> Max error among all adjoint components */
+      iadj = 1;
+      Err = ros_ErrorNorm ( &Y[iadj][0], &Ynew[iadj][0], &Yerr[iadj][0],
+			    &AbsTol_adj[iadj][0], &RelTol_adj[iadj][0], 
+			    VectorTol );
+
+/*~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax */
+      Fac  = MIN(FacMax,MAX(FacMin,FacSafe/pow(Err,(ONE/ros_ELO))));
+      Hnew = H*Fac;
+
+/*~~~>  Check the error magnitude and adjust step size */
+      /* ISTATUS[Nstp] = ISTATUS[Nstp] + 1 */
+      if ( (Err <= ONE) || (H <= Hmin) ) {  /*~~~> Accept step */
+	ISTATUS[Nacc] = ISTATUS[Nacc] + 1;
+	WCOPY(NVAR*NADJ,&Ynew[0][0],1,&Y[0][0],1);
+	T = T + Direction*H;
+	Hnew = MAX(Hmin,MIN(Hnew,Hmax));
+	if (RejectLastH) /* No step size increase after a rejected step */
+	  Hnew = MIN(Hnew,H);
+	RSTATUS[Nhexit] = H;
+	RSTATUS[Nhnew] = Hnew;
+	RSTATUS[Ntexit] = T;
+	RejectLastH = FALSE;
+	RejectMoreH = FALSE;
+	H = Hnew;
+	break; /* UntilAccepted - EXIT THE LOOP: WHILE STEP NOT ACCEPTED */
+      }
+      else {         /*~~~> Reject step */
+	if (RejectMoreH)
+	  Hnew = H*FacRej;
+	RejectMoreH = RejectLastH;
+	RejectLastH = TRUE;
+	H = Hnew;
+	if (ISTATUS[Nacc] >= 1)
+	  ISTATUS[Nrej]++;
+      } /* Err <= 1 */
+      
+    } while(1); /* End of UntilAccepted do loop */
+
+  } /* End of TimeLoop */
+
+  /*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+} /* End of ros_CadjInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_SimpleCadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart,
+			 KPP_REAL Tend, KPP_REAL T, int ISTATUS[], 
+			int Autonomous, KPP_REAL Roundoff ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockADJ method 
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+~~~> NADJ, Y[NADJ][NVAR] - Input: the initial condition at Tstart; 
+                           Output: the solution at T
+~~~> Tstart, Tend - Input: integration interval 
+~~~> T - Output: time at which the solution is returned (T=Tend if success) 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~ Local variables */
+   KPP_REAL Y0[NVAR];
+   KPP_REAL Ynew[NADJ][NVAR], Fcn0[NADJ][NVAR], Fcn[NADJ][NVAR];
+   KPP_REAL K[NADJ][NVAR*ros_S], dFdT[NADJ][NVAR];
+#ifdef FULL_ALGEBRA
+   KPP_REAL Jac0[NVAR][NVAR], Ghimj[NVAR][NVAR], Jac[NVAR][NVAR], 
+          dJdT[NVAR][NVAR];
+#else
+   KPP_REAL Jac0[LU_NONZERO], Ghimj[LU_NONZERO], Jac[LU_NONZERO], 
+          dJdT[LU_NONZERO];
+#endif
+   KPP_REAL H, HC, HG, Tau; 
+   KPP_REAL ghinv;
+   int Pivot[NVAR], Direction, ioffset, i, j, istage, iadj;
+   int istack;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  INITIAL PREPARATIONS */
+  if (Tend  >=  Tstart)
+    Direction = -1;
+  else
+    Direction = 1;
+ 
+/*~~~> Time loop begins below */
+  for( istack = stack_ptr; istack >= 1; istack-- ) { /* TimeLoop */
+    T = chk_T[istack];
+    H = chk_H[istack-1];
+    for(i=0; i<NVAR; i++)
+      Y0[i] = chk_Y[istack][i];
+
+/*~~~>   Compute the Jacobian at current time */
+    JacTemplate(T, Y0, Jac0);
+    ISTATUS[Njac] = ISTATUS[Njac] + 1;
+
+/*~~~>  Compute the function derivative with respect to T */
+    if (!Autonomous) {
+      ros_JacTimeDerivative ( T, Roundoff, Y0, Jac0, dJdT, ISTATUS );
+      for ( iadj = 0; iadj < NADJ; iadj++ ) {
+#ifdef FULL_ALGEBRA
+	for( i=0; i<NVAR; i++)
+	  dFdT[iadj][i] = MATMUL(TRANSPOSE(dJdT),Y[iadj][i]);
+#else
+	JacTR_SP_Vec(dJdT,&Y[iadj][0],&dFdT[iadj][0]);
+#endif
+	WSCAL(NVAR,(-ONE),&dFdT[iadj][0],1);
+      }
+    }
+
+/*~~~>  Ydot = -J^T*Y */
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	Jac0[i][j] = -Jac0[i][j];
+    }
+#else
+    WSCAL(LU_NONZERO,(-ONE),Jac0,1);
+#endif
+    
+    for(iadj=0; iadj<NADJ; iadj++) {
+#ifdef FULL_ALGEBRA
+      for(i=0; i<NVAR; i++)
+	Fcn0[iadj][i] = MATMUL(TRANSPOSE(Jac0),Y[iadj][i]);
+#else
+      JacTR_SP_Vec(Jac0,&Y[iadj][0],&Fcn0[iadj][0]);
+#endif
+    }
+    
+/*~~~>    Construct Ghimj = 1/(H*ham) - Jac0 */
+    ghinv = ONE/(Direction*H*ros_Gamma[0]);
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	Ghimj[i][j] = -Jac0[i][j];
+    }
+    for(i=0; i<NVAR; i++)
+      Ghimj[i][i] = Ghimj[i][i]+ghinv;
+#else
+    WCOPY(LU_NONZERO,Jac0,1,Ghimj,1);
+    WSCAL(LU_NONZERO,(-ONE),Ghimj,1);
+    for(i=0; i<NVAR; i++)
+      Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+ghinv;
+#endif
+
+/*~~~>    Compute LU decomposition */
+    ros_Decomp( Ghimj, Pivot, &j, ISTATUS );
+    if (j != 0) {
+      ros_ErrorMsg(-8,T,H);
+      printf( "The matrix is singular !");
+      exit(0);
+    }
+
+/*~~~>   Compute the stages */
+    for(istage=0; istage<ros_S; istage++) { /* Stage */
+      /* Current istage offset. Current istage vector 
+	 is K(ioffset+1:ioffset+NVAR) */
+      ioffset = NVAR*istage;
+
+      /* For the 1st istage the function has been computed previously */
+      if ( istage == 0 ) {
+	for(iadj=0; iadj<NADJ; iadj++)
+	  WCOPY(NVAR,&Fcn0[iadj][0],1,&Fcn[iadj][0],1);
+      }
+      /* istage>=1 and a new function evaluation is needed 
+	 at the current istage */
+      else if ( ros_NewF[istage] ) {
+	WCOPY(NVAR*NADJ,&Y[0][0],1,&Ynew[0][0],1);
+	for(j=0; j<istage; j++) {
+	  for(iadj=0; iadj<NADJ; iadj++)
+	    WAXPY(NVAR,ros_A[istage*(istage-1)/2+j], &K[iadj][NVAR*j],1,
+		  &Ynew[iadj][0],1);
+	}
+	
+	Tau = T + ros_Alpha[istage]*Direction*H;
+	for(i=0; i<NVAR; i++)
+	  ros_Hermite3( chk_T[istack-1], chk_T[istack], Tau,
+			&chk_Y[istack-1][i], &chk_Y[istack][i],
+			&chk_dY[istack-1][i], &chk_dY[istack][i], Y0 );
+	JacTemplate(Tau, Y0, Jac);
+	ISTATUS[Njac]++;
+
+#ifdef FULL_ALGEBRA
+	for(i=0; i<NVAR; i++) {
+	  for(j=0; j<NVAR; j++)
+	    Jac[i][j] = -Jac[i][j];
+	}
+#else
+	WSCAL(LU_NONZERO,(-ONE),Jac,1);
+#endif
+
+	for(iadj=0; iadj<NADJ; iadj++) {
+#ifdef FULL_ALGEBRA
+	  for(i=0; i<NVAR; i++)
+	    Fcn[iadj][i] = MATMUL(TRANSPOSE(Jac),Ynew[iadj][i]);
+#else
+	  JacTR_SP_Vec(Jac,&Ynew[iadj][0],&Fcn[iadj][0]);
+#endif
+	}
+      } /* if istage == 1 elseif ros_NewF(istage) */
+
+      for(iadj=0; iadj<NADJ; iadj++)
+	WCOPY(NVAR,&Fcn[iadj][0],1,&K[iadj][ioffset],1);
+      for(j=0; j<istage-1; j++) {
+	HC = ros_C[istage*(istage-1)/2+j]/(Direction*H);
+	for(iadj=0; iadj<NADJ; iadj++)
+	  WAXPY(NVAR,HC,&K[iadj][NVAR*j],1,&K[iadj][ioffset],1);
+      }
+      if((!Autonomous) && (ros_Gamma[istage] != ZERO)) {
+	HG = Direction*H*ros_Gamma[istage];
+	for(iadj=0; iadj<NADJ; iadj++)
+	  WAXPY(NVAR,HG,&dFdT[iadj][0],1,&K[iadj][ioffset],1);
+      }
+      for(iadj=0; iadj<NADJ; iadj++)
+	ros_Solve('T', Ghimj, Pivot, &K[iadj][ioffset], ISTATUS);
+    } /* End of Stage loop */
+    
+/*~~~>  Compute the new solution */
+    for(iadj=0; iadj<NADJ; iadj++) {
+      for(j=0; j<ros_S; j++)
+	WAXPY(NVAR,ros_M[j],&K[iadj][NVAR*j],1,&Y[iadj][0],1);
+    }
+  } /* End of TimeLoop */
+
+/*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+
+} /* End of ros_SimpleCadjInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL ros_ErrorNorm ( KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[],
+		       KPP_REAL AbsTol[], KPP_REAL RelTol[], int VectorTol ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Computes the "scaled norm" of the error vector Yerr
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/* Local variables */
+  KPP_REAL Err, Scale, Ymax;
+  int i;
+
+  Err = ZERO;
+  for(i=0; i<NVAR; i++) {
+    Ymax = MAX(ABS(Y[i]),ABS(Ynew[i]));
+    if (VectorTol)
+      Scale = AbsTol[i]+RelTol[i]*Ymax;
+    else
+      Scale = AbsTol[0]+RelTol[0]*Ymax;
+
+    Err = Err+pow((Yerr[i]/Scale),2);
+  }
+  Err  = SQRT(Err/NVAR);
+
+  return MAX(Err,(KPP_REAL)1.0e-10);
+} /* End of ros_ErrorNorm */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FunTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[],
+			     KPP_REAL Fcn0[], KPP_REAL dFdT[], int ISTATUS[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> The time partial derivative of the function by finite differences
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Delta;
+  
+  Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T));
+  FunTemplate(T+Delta,Y,dFdT);
+  ISTATUS[Nfun]++;
+  WAXPY(NVAR,(-ONE),Fcn0,1,dFdT,1);
+  WSCAL(NVAR,(ONE/Delta),dFdT,1);
+
+} /* End of ros_FunTimeDerivative */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_JacTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[],
+			     KPP_REAL Jac0[], KPP_REAL dJdT[], int ISTATUS[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> The time partial derivative of the Jacobian by finite differences
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Delta;
+
+  Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T));
+  JacTemplate(T+Delta,Y,dJdT);
+  ISTATUS[Njac]++;
+#ifdef FULL_ALGEBRA
+  WAXPY(NVAR*NVAR,(-ONE),Jac0,1,dJdT,1);
+  WSCAL(NVAR*NVAR,(ONE/Delta),dJdT,1);
+#else
+  WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1);
+  WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1);
+#endif
+} /* End of ros_JacTimeDerivative */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_PrepareMatrix ( KPP_REAL H, int Direction, KPP_REAL gam,
+			KPP_REAL Jac0[], KPP_REAL Ghimj[], int Pivot[], 
+			int ISTATUS[] ) {
+/* --- --- --- --- --- --- --- --- --- --- --- --- ---
+  Prepares the LHS matrix for stage calculations
+  1.  Construct Ghimj = 1/(H*gam) - Jac0
+      "(Gamma H) Inverse Minus Jacobian"
+  2.  Repeat LU decomposition of Ghimj until successful.
+       -half the step size if LU decomposition fails and retry
+       -exit after 5 consecutive fails
+ --- --- --- --- --- --- --- --- --- --- --- --- --- */
+
+/*~~~> Local variables */
+  int i, ising, Nconsecutive;
+  int Singular; /* Boolean value */
+  KPP_REAL ghinv;
+
+  Nconsecutive = 0;
+  Singular = TRUE;
+
+  while (Singular) {
+
+/*~~~>    Construct Ghimj = 1/(H*gam) - Jac0 */
+#ifdef FULL_ALGEBRA
+    WCOPY(NVAR*NVAR,Jac0,1,Ghimj,1);
+    WSCAL(NVAR*NVAR,(-ONE),Ghimj,1);
+    ghinv = ONE/(Direction*H*gam);
+    for(i=0; i<NVAR; i++)
+      Ghimj[i][i] = Ghimj[i][i]+ghinv;
+#else
+    WCOPY(LU_NONZERO,Jac0,1,Ghimj,1);
+    WSCAL(LU_NONZERO,(-ONE),Ghimj,1);
+    ghinv = ONE/(Direction*H*gam);
+    for(i=0; i<NVAR; i++)
+      Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+ghinv;
+#endif
+
+/*~~~>    Compute LU decomposition */
+    ros_Decomp( Ghimj, Pivot, &ising, ISTATUS );
+    if (ising == 0)
+/*~~~>    If successful done */
+      Singular = FALSE;
+    
+    else { /* ising != 0 */
+/*~~~>    If unsuccessful half the step size; 
+          if 5 consecutive fails then return */
+      ISTATUS[Nsng]++;
+      Nconsecutive++;
+      Singular = TRUE;
+      printf( "Warning: LU Decomposition returned ising = %d", ising );
+      if (Nconsecutive <= 5) /*Less than 5 consecutive failed decompositions*/
+	H = H*HALF;
+      else  /* More than 5 consecutive failed decompositions */
+	return Singular;
+
+    }  /* End of ising */
+  }  /* while Singular */
+
+  return Singular;
+} /* End of ros_PrepareMatrix */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Decomp( KPP_REAL A[], int Pivot[], int* ising, int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the LU decomposition
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifdef FULL_ALGEBRA
+  DGETRF( NVAR, NVAR, A, NVAR, Pivot, ising );
+#else
+  *ising = KppDecomp ( A );
+  Pivot[0] = 1;
+#endif
+  ISTATUS[Ndec]++;
+
+} /* End of ros_Decomp */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Solve( char How, KPP_REAL A[], int Pivot[], KPP_REAL b[], 
+		int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the forward/backward substitution 
+  (using pre-computed LU decomposition)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  switch (How) {
+    case 'N':
+#ifdef FULL_ALGEBRA    
+      DGETRS( 'N', NVAR , 1, A, NVAR, Pivot, b, NVAR, 0 );
+#else
+      KppSolve( A, b );
+#endif
+      break;
+    case 'T':
+#ifdef FULL_ALGEBRA
+      DGETRS( 'T', NVAR , 1, A, NVAR, Pivot, b, NVAR, 0 );
+#else
+      KppSolveTR( A, b, b );
+#endif
+      break;
+    default:
+      printf( "Error: unknown argument in ros_Solve: How=%d", How );
+      exit(0);
+  }
+  ISTATUS[Nsol]++;
+
+} /* End of ros_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_cadj_Y( KPP_REAL T, KPP_REAL Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Finds the solution Y at T by interpolating the stored forward trajectory
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  int i,j;
+
+  if( (T < chk_T[0]) || (T> chk_T[stack_ptr]) ) {
+    printf( "Cannot locate solution at T = %f", T );
+    printf( "Stored trajectory is between Tstart = %f", chk_T[0] );
+    printf( "    and Tend = %f", chk_T[stack_ptr] );
+    exit(0);
+  }
+  for(i=0; i<stack_ptr-1; i++) {
+    if( (T >= chk_T[i]) &&(T <= chk_T[i+1]) )
+      exit(0);
+  }
+
+  for(j=0; j<NVAR; j++ )
+    ros_Hermite3( chk_T[i], chk_T[i+1], T, &chk_Y[i][j], &chk_Y[i+1][j],
+		  &chk_dY[i][j],  &chk_dY[i+1][j], Y );
+
+} /* End of ros_cadj_Y */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Hermite3( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[],
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Y[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for Hermite interpolation of order 5 on the interval [a,b]
+   P = c(1) + c(2)*(x-a) + ... + c(4)*(x-a)^3
+   P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Tau, amb[3], C[4][NVAR];
+  int i, j;
+
+  amb[0] = ((KPP_REAL)1.0)/(a-b);
+  for(i=1; i<3; i++)
+    amb[i] = amb[i-1]*amb[0];
+
+/* c(1) = ya; */
+  WCOPY(NVAR,Ya,1,&C[0][0],1);
+/* c(2) = ja; */
+  WCOPY(NVAR,Ja,1,&C[1][0],1);
+/* c(3) = 2/(a-b)*ja + 1/(a-b)*jb - 3/(a - b)^2*ya + 3/(a - b)^2*yb; */
+  WCOPY(NVAR,Ya,1,&C[2][0],1);
+  WSCAL(NVAR,-3.0*amb[1],&C[2][0],1);
+  WAXPY(NVAR,3.0*amb[1],Yb,1,&C[2][0],1);
+  WAXPY(NVAR,2.0*amb[0],Ja,1,&C[2][0],1);
+  WAXPY(NVAR,amb[0],Jb,1,&C[2][0],1);
+/* c(4) =  1/(a-b)^2*ja + 1/(a-b)^2*jb - 2/(a-b)^3*ya + 2/(a-b)^3*yb */
+  WCOPY(NVAR,Ya,1,&C[3][0],1);
+  WSCAL(NVAR,-2.0*amb[2],&C[3][0],1);
+  WAXPY(NVAR,2.0*amb[2],Yb,1,&C[3][0],1);
+  WAXPY(NVAR,amb[1],Ja,1,&C[3][0],1);
+  WAXPY(NVAR,amb[1],Jb,1,&C[3][0],1);
+   
+  Tau = T - a;
+  WCOPY(NVAR,&C[3][0],1,Y,1);
+  WSCAL(NVAR,pow(Tau,3),Y,1);
+  for(j=2; j>=0; j--)
+    WAXPY(NVAR,pow(Tau,(j-1)),&C[j][0],1,Y,1);
+
+} /* End of ros_Hermite3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Hermite5( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[], 
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Ha[], 
+		   KPP_REAL Hb[], KPP_REAL Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for Hermite interpolation of order 5 on the interval [a,b]
+ P = c(1) + c(2)*(x-a) + ... + c(6)*(x-a)^5
+ P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb], P"[a,b] = [Ha,Hb]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Tau, amb[5], C[6][NVAR];
+  int i, j;
+
+  amb[0] = ((KPP_REAL)1.0)/(a-b);
+  for(i=1; i<5; i++)
+    amb[i] = amb[i-1]*amb[0];
+
+/* c(1) = ya; */
+  WCOPY(NVAR,Ya,1,&C[0][0],1);
+/* c(2) = ja; */
+  WCOPY(NVAR,Ja,1,&C[1][0],1);
+/* c(3) = ha/2; */
+  WCOPY(NVAR,Ha,1,&C[2][0],1);
+  WSCAL(NVAR,HALF,&C[2][0],1);
+
+/* c(4) = 10*amb(3)*ya - 10*amb(3)*yb - 6*amb(2)*ja - 4*amb(2)*jb  
+          + 1.5*amb(1)*ha - 0.5*amb(1)*hb ; */
+  WCOPY(NVAR,Ya,1,&C[3][0],1);
+  WSCAL(NVAR,10.0*amb[2],&C[3][0],1);
+  WAXPY(NVAR,-10.0*amb[2],Yb,1,&C[3][0],1);
+  WAXPY(NVAR,-6.0*amb[1],Ja,1,&C[3][0],1);
+  WAXPY(NVAR,-4.0*amb[1],Jb,1,&C[3][0],1);
+  WAXPY(NVAR, 1.5*amb[0],Ha,1,&C[3][0],1);
+  WAXPY(NVAR,-0.5*amb[0],Hb,1,&C[3][0],1);
+
+/* c(5) =   15*amb(4)*ya - 15*amb(4)*yb - 8.*amb(3)*ja - 7*amb(3)*jb 
+            + 1.5*amb(2)*ha - 1*amb(2)*hb ; */
+  WCOPY(NVAR,Ya,1,&C[4][0],1);
+  WSCAL(NVAR, 15.0*amb[3],&C[4][0],1);
+  WAXPY(NVAR,-15.0*amb[3],Yb,1,&C[4][0],1);
+  WAXPY(NVAR,-8.0*amb[2],Ja,1,&C[4][0],1);
+  WAXPY(NVAR,-7.0*amb[2],Jb,1,&C[4][0],1);
+  WAXPY(NVAR,1.5*amb[1],Ha,1,&C[4][0],1);
+  WAXPY(NVAR,-amb[1],Hb,1,&C[4][0],1);
+
+/* c(6) =   6*amb(5)*ya - 6*amb(5)*yb - 3.*amb(4)*ja - 3.*amb(4)*jb 
+            + 0.5*amb(3)*ha -0.5*amb(3)*hb ; */
+  WCOPY(NVAR,Ya,1,&C[5][0],1);
+  WSCAL(NVAR, 6.0*amb[4],&C[5][0],1);
+  WAXPY(NVAR,-6.0*amb[4],Yb,1,&C[5][0],1);
+  WAXPY(NVAR,-3.0*amb[3],Ja,1,&C[5][0],1);
+  WAXPY(NVAR,-3.0*amb[3],Jb,1,&C[5][0],1);
+  WAXPY(NVAR, 0.5*amb[2],Ha,1,&C[5][0],1);
+  WAXPY(NVAR,-0.5*amb[2],Hb,1,&C[5][0],1);
+
+  Tau = T - a;
+  WCOPY(NVAR,&C[5][0],1,Y,1);
+  for(j=4; j>=0; j--) {
+    WSCAL(NVAR,Tau,Y,1);
+    WAXPY(NVAR,ONE,&C[j][0],1,Y,1);
+  }
+
+} /* End of ros_Hermite5 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Ros2() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ --- AN L-STABLE METHOD, 2 stages, order 2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL g;
+
+  g = (KPP_REAL)1.0 + ((KPP_REAL)1.0)/SQRT((KPP_REAL)2.0);
+
+  rosMethod = RS2;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "ROS-2");
+/*~~~> Number of stages */
+  ros_S = 2;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+  The lower triangular (subdiagonal) elements are stored in row-wise order:
+  A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+  The general mapping formula is:
+      A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+      C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = ((KPP_REAL)1.0)/g;
+  ros_C[0] = ((KPP_REAL)-2.0)/g;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0]= ((KPP_REAL)3.0)/((KPP_REAL)2.0*g);
+  ros_M[1]= ((KPP_REAL)1.0)/((KPP_REAL)2.0*g);
+
+/* E_i = Coefficients for error estimator */
+  ros_E[0] = ((KPP_REAL)1.0)/((KPP_REAL)2.0*g);
+  ros_E[1] = ((KPP_REAL)1.0)/((KPP_REAL)2.0*g);
+
+/*~~~> ros_ELO = estimator of local order - the minimum between the
+       main and the embedded scheme orders plus one */
+  ros_ELO = (KPP_REAL)2.0;
+
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.0;
+  ros_Alpha[1] = (KPP_REAL)1.0;
+
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0] = g;
+  ros_Gamma[1] =-g;
+
+} /* End of Ros2 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Ros3() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RS3;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "ROS-3");
+/*~~~> Number of stages */
+  ros_S = 3;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:
+       A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+       C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0]= (KPP_REAL)1.0;
+  ros_A[1]= (KPP_REAL)1.0;
+  ros_A[2]= (KPP_REAL)0.0;
+  ros_C[0] = (KPP_REAL)-0.10156171083877702091975600115545e01;
+  ros_C[1] = (KPP_REAL) 0.40759956452537699824805835358067e01;
+  ros_C[2] = (KPP_REAL) 0.92076794298330791242156818474003e01;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+  ros_NewF[2] = FALSE;
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = (KPP_REAL) 0.1e01;
+  ros_M[1] = (KPP_REAL) 0.61697947043828245592553615689730e01;
+  ros_M[2] = (KPP_REAL)-0.42772256543218573326238373806514;
+/* E_i = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL) 0.5;
+  ros_E[1] = (KPP_REAL)-0.29079558716805469821718236208017e01;
+  ros_E[2] = (KPP_REAL) 0.22354069897811569627360909276199;
+
+/*~~~> ros_ELO = estimator of local order - the minimum between the
+       main and the embedded scheme orders plus 1 */
+  ros_ELO = (KPP_REAL)3.0;
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0]= (KPP_REAL)0.0;
+  ros_Alpha[1]= (KPP_REAL)0.43586652150845899941601945119356;
+  ros_Alpha[2]= (KPP_REAL)0.43586652150845899941601945119356;
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0]= (KPP_REAL)0.43586652150845899941601945119356;
+  ros_Gamma[1]= (KPP_REAL)0.24291996454816804366592249683314;
+  ros_Gamma[2]= (KPP_REAL)0.21851380027664058511513169485832e01;
+
+} /* End of Ros3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Ros4() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1990)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RS4;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "ROS-4");
+/*~~~> Number of stages */
+  ros_S = 4;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:
+       A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+       C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = (KPP_REAL)0.2000000000000000e01;
+  ros_A[1] = (KPP_REAL)0.1867943637803922e01;
+  ros_A[2] = (KPP_REAL)0.2344449711399156;
+  ros_A[3] = ros_A[1];
+  ros_A[4] = ros_A[2];
+  ros_A[5] = (KPP_REAL)0.0;
+
+  ros_C[0] = (KPP_REAL)-0.7137615036412310e01;
+  ros_C[1] = (KPP_REAL) 0.2580708087951457e01;
+  ros_C[2] = (KPP_REAL) 0.6515950076447975;
+  ros_C[3] = (KPP_REAL)-0.2137148994382534e01;
+  ros_C[4] = (KPP_REAL)-0.3214669691237626;
+  ros_C[5] = (KPP_REAL)-0.6949742501781779;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+  ros_NewF[2] = TRUE;
+  ros_NewF[3] = FALSE;
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = (KPP_REAL)0.2255570073418735e01;
+  ros_M[1] = (KPP_REAL)0.2870493262186792;
+  ros_M[2] = (KPP_REAL)0.4353179431840180;
+  ros_M[3] = (KPP_REAL)0.1093502252409163e01;
+/*~~~> E_i  = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL)-0.2815431932141155;
+  ros_E[1] = (KPP_REAL)-0.7276199124938920e-01;
+  ros_E[2] = (KPP_REAL)-0.1082196201495311;
+  ros_E[3] = (KPP_REAL)-0.1093502252409163e01;
+
+/*~~~> ros_ELO  = estimator of local order - the minimum between the
+       main and the embedded scheme orders plus 1 */
+  ros_ELO = (KPP_REAL)4.0;
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.0;
+  ros_Alpha[1] = (KPP_REAL)0.1145640000000000e01;
+  ros_Alpha[2] = (KPP_REAL)0.6552168638155900;
+  ros_Alpha[3] = ros_Alpha[2];
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */ 
+  ros_Gamma[0] = (KPP_REAL) 0.5728200000000000;
+  ros_Gamma[1] = (KPP_REAL)-0.1769193891319233e01;
+  ros_Gamma[2] = (KPP_REAL) 0.7592633437920482;
+  ros_Gamma[3] = (KPP_REAL)-0.1049021087100450;
+
+} /* End of Ros4 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Rodas3() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RD3;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "RODAS-3");
+/*~~~> Number of stages */
+  ros_S = 4;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:
+       A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+       C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = (KPP_REAL)0.0;
+  ros_A[1] = (KPP_REAL)2.0;
+  ros_A[2] = (KPP_REAL)0.0;
+  ros_A[3] = (KPP_REAL)2.0;
+  ros_A[4] = (KPP_REAL)0.0;
+  ros_A[5] = (KPP_REAL)1.0;
+
+  ros_C[0] = (KPP_REAL) 4.0;
+  ros_C[1] = (KPP_REAL) 1.0;
+  ros_C[2] = (KPP_REAL)-1.0;
+  ros_C[3] = (KPP_REAL) 1.0;
+  ros_C[4] = (KPP_REAL)-1.0;
+  ros_C[5] = -(((KPP_REAL)8.0)/((KPP_REAL)3.0));
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = FALSE;
+  ros_NewF[2] = TRUE;
+  ros_NewF[3] = TRUE;
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = (KPP_REAL)2.0;
+  ros_M[1] = (KPP_REAL)0.0;
+  ros_M[2] = (KPP_REAL)1.0;
+  ros_M[3] = (KPP_REAL)1.0;
+/*~~~> E_i  = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL)0.0;
+  ros_E[1] = (KPP_REAL)0.0;
+  ros_E[2] = (KPP_REAL)0.0;
+  ros_E[3] = (KPP_REAL)1.0;
+
+/*~~~> ros_ELO  = estimator of local order - the minimum between the
+    main and the embedded scheme orders plus 1 */
+  ros_ELO  = (KPP_REAL)3.0;
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.0;
+  ros_Alpha[1] = (KPP_REAL)0.0;
+  ros_Alpha[2] = (KPP_REAL)1.0;
+  ros_Alpha[3] = (KPP_REAL)1.0;
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0] = (KPP_REAL)0.5;
+  ros_Gamma[1] = (KPP_REAL)1.5;
+  ros_Gamma[2] = (KPP_REAL)0.0;
+  ros_Gamma[3] = (KPP_REAL)0.0;
+
+} /* End of Rodas3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Rodas4() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1996)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RD4;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "RODAS-4");
+/*~~~> Number of stages */
+  ros_S = 6;
+
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.000;
+  ros_Alpha[1] = (KPP_REAL)0.386;
+  ros_Alpha[2] = (KPP_REAL)0.210;
+  ros_Alpha[3] = (KPP_REAL)0.630;
+  ros_Alpha[4] = (KPP_REAL)1.000;
+  ros_Alpha[5] = (KPP_REAL)1.000;
+
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0] = (KPP_REAL) 0.2500000000000000;
+  ros_Gamma[1] = (KPP_REAL)-0.1043000000000000;
+  ros_Gamma[2] = (KPP_REAL) 0.1035000000000000;
+  ros_Gamma[3] = (KPP_REAL)-0.3620000000000023e-01;
+  ros_Gamma[4] = (KPP_REAL) 0.0;
+  ros_Gamma[5] = (KPP_REAL) 0.0;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:  A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+                  C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = (KPP_REAL) 0.1544000000000000e01;
+  ros_A[1] = (KPP_REAL) 0.9466785280815826;
+  ros_A[2] = (KPP_REAL) 0.2557011698983284;
+  ros_A[3] = (KPP_REAL) 0.3314825187068521e01;
+  ros_A[4] = (KPP_REAL) 0.2896124015972201e01;
+  ros_A[5] = (KPP_REAL) 0.9986419139977817;
+  ros_A[6] = (KPP_REAL) 0.1221224509226641e01;
+  ros_A[7] = (KPP_REAL) 0.6019134481288629e01;
+  ros_A[8] = (KPP_REAL) 0.1253708332932087e02;
+  ros_A[9] = (KPP_REAL)-0.6878860361058950;
+  ros_A[10] = ros_A[6];
+  ros_A[11] = ros_A[7];
+  ros_A[12] = ros_A[8];
+  ros_A[13] = ros_A[9];
+  ros_A[14] = (KPP_REAL)1.0;
+  
+  ros_C[0]  = (KPP_REAL)-0.5668800000000000e01;
+  ros_C[1]  = (KPP_REAL)-0.2430093356833875e01;
+  ros_C[2]  = (KPP_REAL)-0.2063599157091915;
+  ros_C[3]  = (KPP_REAL)-0.1073529058151375;
+  ros_C[4]  = (KPP_REAL)-0.9594562251023355e01;
+  ros_C[5]  = (KPP_REAL)-0.2047028614809616e02;
+  ros_C[6]  = (KPP_REAL) 0.7496443313967647e01;
+  ros_C[7]  = (KPP_REAL)-0.1024680431464352e02;
+  ros_C[8]  = (KPP_REAL)-0.3399990352819905e02;
+  ros_C[9]  = (KPP_REAL) 0.1170890893206160e02;
+  ros_C[10] = (KPP_REAL) 0.8083246795921522e01;
+  ros_C[11] = (KPP_REAL)-0.7981132988064893e01;
+  ros_C[12] = (KPP_REAL)-0.3152159432874371e02;
+  ros_C[13] = (KPP_REAL) 0.1631930543123136e02;
+  ros_C[14] = (KPP_REAL)-0.6058818238834054e01;
+
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = ros_A[6];
+  ros_M[1] = ros_A[7];
+  ros_M[2] = ros_A[8];
+  ros_M[3] = ros_A[9];
+  ros_M[4] = (KPP_REAL)1.0;
+  ros_M[5] = (KPP_REAL)1.0;
+
+/*~~~> E_i  = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL)0.0;
+  ros_E[1] = (KPP_REAL)0.0;
+  ros_E[2] = (KPP_REAL)0.0;
+  ros_E[3] = (KPP_REAL)0.0;
+  ros_E[4] = (KPP_REAL)0.0;
+  ros_E[5] = (KPP_REAL)1.0;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+  ros_NewF[2] = TRUE;
+  ros_NewF[3] = TRUE;
+  ros_NewF[4] = TRUE;
+  ros_NewF[5] = TRUE;
+
+/*~~~> ros_ELO  = estimator of local order - the minimum between the
+        main and the embedded scheme orders plus 1 */
+  ros_ELO = (KPP_REAL)4.0;
+
+} /* End of Rodas4 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the ODE function call.
+  Updates the rate coefficients (and possibly the fixed species) at each call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Told;
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+  Fun( Y, FIX, RCONST, Ydot );
+  TIME = Told;
+
+} /* End of FunTemplate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Jcb[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the ODE Jacobian call.
+  Updates the rate coefficients (and possibly the fixed species) at each call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Told;
+#ifdef FULL_ALGEBRA
+  KPP_REAL JV[LU_NONZERO];
+  int i, j;
+#endif
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+#ifdef FULL_ALGEBRA
+  Jac_SP(Y, FIX, RCONST, JV);
+  for(j=0; j<NVAR; j++) {
+    for(i=0; i<NVAR; i++)
+      Jcb[i][j] = (KPP_REAL)0.0;
+  }
+  for(i=0; i<LU_NONZERO; i++)
+    Jcb[LU_ICOL[i]][LU_IROW[i]] = JV[i];
+#else
+  Jac_SP( Y, FIX, RCONST, Jcb );
+#endif
+  TIME = Told;
+} /* End of JacTemplate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void HessTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Hes[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the ODE Hessian call.
+  Updates the rate coefficients (and possibly the fixed species) at each call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Told;
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+  Hessian( Y, FIX, RCONST, Hes );
+  TIME = Told;
+
+} /* End of HessTemplate */
+
+/* End of INTEGRATE function                                                 */
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock_adj
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_adj.f90	(revision 3477)
@@ -0,0 +1,2575 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Discrete adjoints of Rosenbrock,                                       !
+!           for several Rosenbrock methods:                               !
+!               * Ros2                                                    !
+!               * Ros3                                                    !
+!               * Ros4                                                    !
+!               * Rodas3                                                  !
+!               * Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  ! 
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+   USE KPP_ROOT_Precision
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   USE KPP_ROOT_LinearAlgebra
+   USE KPP_ROOT_Rates
+   USE KPP_ROOT_Function
+   USE KPP_ROOT_Jacobian
+   USE KPP_ROOT_Hessian
+   USE KPP_ROOT_Util
+   
+   IMPLICIT NONE
+   PUBLIC
+   SAVE
+  
+!~~~>  Statistics on the work performed by the Rosenbrock method
+   INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+                         Nrej=5, Ndec=6, Nsol=7, Nsng=8, &
+                         Ntexit=1, Nhexit=2, Nhnew = 3
+
+
+CONTAINS ! Routines in the module KPP_ROOT_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_ADJ( NADJ, Y, Lambda, TIN, TOUT, &
+           ATOL_adj, RTOL_adj,                        &
+           ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE        
+    
+!~~~> Y - Concentrations
+   KPP_REAL  :: Y(NVAR)
+!~~~> NADJ - No. of cost functionals for which adjoints
+!                are evaluated simultaneously
+!            If single cost functional is considered (like in
+!                most applications) simply set NADJ = 1      
+   INTEGER NADJ
+!~~~> Lambda - Sensitivities w.r.t. concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+   KPP_REAL  :: Lambda(NVAR,NADJ)
+   KPP_REAL, INTENT(IN)  :: TIN  ! TIN  - Start Time
+   KPP_REAL, INTENT(IN)  :: TOUT ! TOUT - End Time
+!~~~> Tolerances for adjoint calculations
+!     (used only for full continuous adjoint)   
+   KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+!~~~> Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+
+   INTEGER, SAVE :: Ntotal
+
+
+   ICNTRL(1:20)  = 0
+   RCNTRL(1:20)  = 0.0_dp
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = 0.0_dp
+   
+   
+!~~~> fine-tune the integrator:
+!   ICNTRL(1) = 0       ! 0 = non-autonomous, 1 = autonomous
+!   ICNTRL(2) = 1       ! 0 = scalar, 1 = vector tolerances
+!   RCNTRL(3) = STEPMIN ! starting step
+!   ICNTRL(3) = 5       ! choice of the method for forward integration
+!   ICNTRL(6) = 1       ! choice of the method for continuous adjoint
+!   ICNTRL(7) = 2       ! 1=none, 2=discrete, 3=full continuous, 4=simplified continuous adjoint
+!   ICNTRL(8) = 1       ! Save fwd LU factorization: 0 = *don't* save, 1 = save
+
+
+   ! if optional parameters are given, and if they are >=0, then they overwrite default settings
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) >= 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) >= 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+   
+   CALL RosenbrockADJ(Y, NADJ, Lambda,                 &
+         TIN, TOUT,                                    &
+         ATOL, RTOL, ATOL_adj, RTOL_adj,               &
+         RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR)
+
+
+!~~~> Debug option: show number of steps
+!    Ntotal = Ntotal + ISTATUS(Nstp)
+!    WRITE(6,777) ISTATUS(Nstp),Ntotal,VAR(ind_O3),VAR(ind_NO2)
+!777 FORMAT('NSTEPS=',I6,' (',I6,')  O3=',E24.14,'  NO2=',E24.14)    
+
+   IF (IERR < 0) THEN
+     print *,'RosenbrockADJ: Unsucessful step at T=',  &
+         TIN,' (IERR=',IERR,')'
+   END IF
+
+   STEPMIN = RSTATUS(Nhexit)
+   ! if optional parameters are given for output 
+   !         copy to them to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+
+END SUBROUTINE INTEGRATE_ADJ
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE RosenbrockADJ( Y, NADJ, Lambda,             &
+           Tstart, Tend,                               &
+           AbsTol, RelTol, AbsTol_adj, RelTol_adj,     &
+           RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   
+!    ADJ = Adjoint of the Tangent Linear Model of a Rosenbrock Method
+!
+!    Solves the system y'=F(t,y) using a RosenbrockADJ method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on RosenbrockADJ methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.       
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                   
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    
+!~~~>   INPUT ARGUMENTS: 
+!    
+!-     Y(NVAR)    = vector of initial conditions (at T=Tstart)
+!      NADJ       -> dimension of linearized system, 
+!                   i.e. the number of sensitivity coefficients
+!-     Lambda(NVAR,NADJ) -> vector of initial sensitivity conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE Fun( T, Y, Ydot ) = ODE function, 
+!                       returns Ydot = Y' = F(T,Y) 
+!- SUBROUTINE Jac( T, Y, Jcb ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY 
+!-    ICNTRL(1:10)    = integer inputs parameters
+!-    RCNTRL(1:10)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!     
+!-    Y(NVAR)    -> vector of final states (at T->Tend)
+!-    Lambda(NVAR,NADJ) -> vector of final sensitivities (at T=Tend)
+!-    ICNTRL(11:20)   -> integer output parameters
+!-    RCNTRL(11:20)   -> real output parameters
+!-    IERR       -> job status upon return
+!       - succes (positive value) or failure (negative value) -
+!           =  1 : Success
+!           = -1 : Improper value for maximal no of steps
+!           = -2 : Selected RosenbrockADJ method not implemented
+!           = -3 : Hmin/Hmax/Hstart must be positive
+!           = -4 : FacMin/FacMax/FacRej must be positive
+!           = -5 : Improper tolerance values
+!           = -6 : No of steps exceeds maximum bound
+!           = -7 : Step size too small
+!           = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2)   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :  default method is Rodas3
+!        = 1 :  method is  Ros2
+!        = 2 :  method is  Ros3 
+!        = 3 :  method is  Ros4 
+!        = 4 :  method is  Rodas3
+!        = 5:   method is  Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0) the default value of BUFSIZE is used
+!
+!    ICNTRL(6)  -> selection of a particular Rosenbrock method for the
+!                continuous adjoint integration - for cts adjoint it
+!                can be different than the forward method ICNTRL(3)
+!         Note 1: to avoid interpolation errors (which can be huge!) 
+!                   it is recommended to use only ICNTRL(7) = 2 or 4
+!         Note 2: the performance of the full continuous adjoint
+!                   strongly depends on the forward solution accuracy Abs/RelTol
+!
+!    ICNTRL(7) -> Type of adjoint algorithm
+!         = 0 : default is discrete adjoint ( of method ICNTRL(3) )
+!         = 1 : no adjoint       
+!         = 2 : discrete adjoint ( of method ICNTRL(3) )
+!         = 3 : fully adaptive continuous adjoint ( with method ICNTRL(6) )
+!         = 4 : simplified continuous adjoint ( with method ICNTRL(6) )
+!
+!    ICNTRL(8)  -> checkpointing the LU factorization at each step:
+!        ICNTRL(8)=0 : do *not* save LU factorization (the default)
+!        ICNTRL(8)=1 : save LU factorization
+!        Note: if ICNTRL(7)=1 the LU factorization is *not* saved
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO 
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!          
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!            (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller 
+!         than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to RosenbrockADJ adds the corrent no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the 
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~>  Arguments   
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+   INTEGER, INTENT(IN)          :: NADJ
+   KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+   KPP_REAL, INTENT(IN)    :: Tstart,Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(NVAR),RelTol(NVAR)
+   KPP_REAL, INTENT(IN)    :: AbsTol_adj(NVAR,NADJ), RelTol_adj(NVAR,NADJ)
+   INTEGER, INTENT(IN)          :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER, INTENT(INOUT)       :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)         :: IERR
+!~~~>  Parameters of the Rosenbrock method, up to 6 stages
+   INTEGER ::  ros_S, rosMethod
+   INTEGER, PARAMETER :: RS2=1, RS3=2, RS4=3, RD3=4, RD4=5
+   KPP_REAL :: ros_A(15), ros_C(15), ros_M(6), ros_E(6), &
+                    ros_Alpha(6), ros_Gamma(6), ros_ELO
+   LOGICAL :: ros_NewF(6)
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Types of Adjoints Implemented
+   INTEGER, PARAMETER :: Adj_none = 1, Adj_discrete = 2,      &
+                   Adj_continuous = 3, Adj_simple_continuous = 4
+!~~~>  Checkpoints in memory
+   INTEGER, PARAMETER :: bufsize = 200000
+   INTEGER :: stack_ptr = 0 ! last written entry
+   KPP_REAL, DIMENSION(:),   POINTER :: chk_H, chk_T
+   KPP_REAL, DIMENSION(:,:), POINTER :: chk_Y, chk_K, chk_J
+   KPP_REAL, DIMENSION(:,:), POINTER :: chk_dY, chk_d2Y
+!~~~>  Local variables     
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart
+   KPP_REAL :: Texit
+   INTEGER :: i, UplimTol, Max_no_steps
+   INTEGER :: AdjointType, CadjMethod 
+   LOGICAL :: Autonomous, VectorTol, SaveLU
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+
+!~~~>  Initialize statistics
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = ZERO
+   
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+      UplimTol  = NVAR
+   ELSE 
+      VectorTol = .FALSE.
+      UplimTol  = 1
+   END IF
+
+!~~~>   Initialize the particular Rosenbrock method selected
+   SELECT CASE (ICNTRL(3))
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (0,4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=',ICNTRL(3) 
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+       RETURN
+   END SELECT
+   
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = bufsize - 1
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE 
+      PRINT * ,'User-selected max no. of steps: ICNTRL(4)=',ICNTRL(4)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+
+!~~~>  The particular Rosenbrock method chosen for integrating the cts adjoint
+   IF (ICNTRL(6) == 0) THEN
+      CadjMethod = 4
+   ELSEIF ( (ICNTRL(6) >= 1).AND.(ICNTRL(6) <= 5) ) THEN
+      CadjMethod = ICNTRL(6)
+   ELSE  
+      PRINT * , 'Unknown CADJ Rosenbrock method: ICNTRL(6)=', CadjMethod
+      CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+ 
+!~~~>  Discrete or continuous adjoint formulation
+   IF ( ICNTRL(7) == 0 ) THEN
+       AdjointType = Adj_discrete
+   ELSEIF ( (ICNTRL(7) >= 1).AND.(ICNTRL(7) <= 4) ) THEN
+       AdjointType = ICNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected adjoint type: ICNTRL(7)=', AdjointType
+      CALL ros_ErrorMsg(-9,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) 
+
+ 
+!~~~>  Unit roundoff (1+Roundoff>1)  
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN 
+      Hmin = RCNTRL(1)
+   ELSE  
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax 
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2d0
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE  
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0d0
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE  
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1d0
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE  
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9d0
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.d0*Roundoff) &
+         .OR. (RelTol(i) >= 1.0d0) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+     
+ 
+!~~~>  Allocate checkpoint space or open checkpoint files
+   IF (AdjointType == Adj_discrete) THEN
+       CALL ros_AllocateDBuffers( ros_S )
+   ELSEIF ( (AdjointType == Adj_continuous).OR.  &
+           (AdjointType == Adj_simple_continuous) ) THEN
+       CALL ros_AllocateCBuffers
+   END IF
+   
+!~~~>  CALL Forward Rosenbrock method   
+   CALL ros_FwdInt(Y,Tstart,Tend,Texit,          & 
+        AbsTol, RelTol,                          & 
+!  Error indicator
+        IERR)
+
+   PRINT*,'FORWARD STATISTICS'
+   PRINT*,'Step=',Nstp,' Acc=',Nacc,   &
+        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  If Forward integration failed return   
+   IF (IERR<0) RETURN
+
+!~~~>   Initialize the particular Rosenbrock method for continuous adjoint
+   IF ( (AdjointType == Adj_continuous).OR. &
+           (AdjointType == Adj_simple_continuous) ) THEN
+   SELECT CASE (CadjMethod)
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=', ICNTRL(3)
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR) 
+       RETURN     
+   END SELECT
+   END IF
+
+   SELECT CASE (AdjointType)   
+   CASE (Adj_discrete)   
+     CALL ros_DadjInt (                          &
+        NADJ, Lambda,                            &
+        Tstart, Tend, Texit,                     &
+        IERR )
+   CASE (Adj_continuous) 
+     CALL ros_CadjInt (                          &
+        NADJ, Lambda,                            &
+        Tend, Tstart, Texit,                     &
+        AbsTol_adj, RelTol_adj,                  &
+        IERR )
+   CASE (Adj_simple_continuous)
+     CALL ros_SimpleCadjInt (                    &
+        NADJ, Lambda,                            &
+        Tstart, Tend, Texit,                     &
+        IERR )
+   END SELECT ! AdjointType
+
+   PRINT*,'ADJOINT STATISTICS'
+   PRINT*,'Step=',Nstp,' Acc=',Nacc,             &
+        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  Free checkpoint space or close checkpoint files
+   IF (AdjointType == Adj_discrete) THEN
+      CALL ros_FreeDBuffers
+   ELSEIF ( (AdjointType == Adj_continuous) .OR. &
+           (AdjointType == Adj_simple_continuous) ) THEN
+      CALL ros_FreeCBuffers
+   END IF
+   
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS !  Procedures internal to RosenbrockADJ
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_AllocateDBuffers( S )
+!~~~>  Allocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i, S
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_K(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer K'; STOP
+   END IF  
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+     ALLOCATE( chk_J(NVAR*NVAR,bufsize), STAT=i )
+#else
+     ALLOCATE( chk_J(LU_NONZERO,bufsize), STAT=i )
+#endif
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer J'; STOP
+     END IF   
+   END IF   
+
+ END SUBROUTINE ros_AllocateDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FreeDBuffers
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_K, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer K'; STOP
+   END IF   
+   IF (SaveLU) THEN 
+     DEALLOCATE( chk_J, STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed deallocation of buffer J'; STOP
+     END IF   
+   END IF   
+ 
+ END SUBROUTINE ros_FreeDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_AllocateCBuffers
+!~~~>  Allocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_dY(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer dY'; STOP
+   END IF   
+   ALLOCATE( chk_d2Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE ros_AllocateCBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FreeCBuffers
+!~~~>  Dallocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_dY, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer dY'; STOP
+   END IF   
+   DEALLOCATE( chk_d2Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE ros_FreeCBuffers
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_DPush( S, T, H, Ystage, K, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: S ! no of stages
+   KPP_REAL :: T, H, Ystage(NVAR*S), K(NVAR*S)
+   INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+   KPP_REAL :: E(NVAR,NVAR)
+#else       
+   KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   !CALL WCOPY(NVAR*S,Ystage,1,chk_Y(1,stack_ptr),1)
+   !CALL WCOPY(NVAR*S,K,1,chk_K(1,stack_ptr),1)
+   chk_Y(1:NVAR*S,stack_ptr) = Ystage(1:NVAR*S)
+   chk_K(1:NVAR*S,stack_ptr) = K(1:NVAR*S)
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+       chk_J(1:NVAR,1:NVAR,stack_ptr) = E(1:NVAR,1:NVAR)
+       chk_P(1:NVAR,stack_ptr)        = P(1:NVAR)
+#else       
+       chk_J(1:LU_NONZERO,stack_ptr)  = E(1:LU_NONZERO)
+#endif
+    END IF
+  
+  END SUBROUTINE ros_DPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_DPop( S, T, H, Ystage, K, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   INTEGER :: S ! no of stages
+   KPP_REAL :: T, H, Ystage(NVAR*S), K(NVAR*S)
+   INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+   KPP_REAL :: E(NVAR,NVAR)
+#else       
+   KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   !CALL WCOPY(NVAR*S,chk_Y(1,stack_ptr),1,Ystage,1)
+   !CALL WCOPY(NVAR*S,chk_K(1,stack_ptr),1,K,1)
+   Ystage(1:NVAR*S) = chk_Y(1:NVAR*S,stack_ptr)
+   K(1:NVAR*S)      = chk_K(1:NVAR*S,stack_ptr)
+   !CALL WCOPY(LU_NONZERO,chk_J(1,stack_ptr),1,Jcb,1)
+   IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+       E(1:NVAR,1:NVAR) = chk_J(1:NVAR,1:NVAR,stack_ptr)
+       P(1:NVAR)        = chk_P(1:NVAR,stack_ptr)
+#else       
+       E(1:LU_NONZERO)  = chk_J(1:LU_NONZERO,stack_ptr)
+#endif
+    END IF
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE ros_DPop
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_CPush( T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   !CALL WCOPY(NVAR,Y,1,chk_Y(1,stack_ptr),1)
+   !CALL WCOPY(NVAR,dY,1,chk_dY(1,stack_ptr),1)
+   !CALL WCOPY(NVAR,d2Y,1,chk_d2Y(1,stack_ptr),1)
+   chk_Y(1:NVAR,stack_ptr)   = Y(1:NVAR)
+   chk_dY(1:NVAR,stack_ptr)  = dY(1:NVAR)
+   chk_d2Y(1:NVAR,stack_ptr) = d2Y(1:NVAR)
+  END SUBROUTINE ros_CPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_CPop( T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   !CALL WCOPY(NVAR,chk_Y(1,stack_ptr),1,Y,1)
+   !CALL WCOPY(NVAR,chk_dY(1,stack_ptr),1,dY,1)
+   !CALL WCOPY(NVAR,chk_d2Y(1,stack_ptr),1,d2Y,1)
+   Y(1:NVAR)   = chk_Y(1:NVAR,stack_ptr)
+   dY(1:NVAR)  = chk_dY(1:NVAR,stack_ptr)
+   d2Y(1:NVAR) = chk_d2Y(1:NVAR,stack_ptr)
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE ros_CPop
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RosenbrockADJ due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected RosenbrockADJ method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum buffer bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-9)    
+      PRINT * , '--> Improper type of adjoint selected'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+   
+     
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FwdInt (Y,                       &
+        Tstart, Tend, T,                         &
+        AbsTol, RelTol,                          &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockADJ method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Input: tolerances      
+   KPP_REAL, INTENT(IN) ::  AbsTol(NVAR), RelTol(NVAR)
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ynew(NVAR), Fcn0(NVAR), Fcn(NVAR) 
+   KPP_REAL :: K(NVAR*ros_S), dFdT(NVAR)
+   KPP_REAL, DIMENSION(:), POINTER :: Ystage
+#ifdef FULL_ALGEBRA    
+   KPP_REAL :: Jac0(NVAR,NVAR),  Ghimj(NVAR,NVAR)
+#else
+   KPP_REAL :: Jac0(LU_NONZERO), Ghimj(LU_NONZERO)
+#endif
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Yerr(NVAR)
+   INTEGER :: Pivot(NVAR), Direction, ioffset, i, j, istage
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Allocate stage vector buffer if needed
+   IF (AdjointType == Adj_discrete) THEN
+        ALLOCATE(Ystage(NVAR*ros_S), STAT=i)
+        ! Uninitialized Ystage may lead to NaN on some compilers
+        Ystage = 0.0d0
+        IF (i/=0) THEN
+          PRINT*,'Allocation of Ystage failed'
+          STOP
+        END IF
+   END IF   
+   
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = ZERO
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.0_dp*Roundoff) H = DeltaMin
+
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   RSTATUS(Nhexit) = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL Fun_Template(T,Y,Fcn0)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1 
+
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+   END IF
+  
+!~~~>   Compute the Jacobian at current time
+   CALL Jac_Template(T,Y,Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+ 
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1), &
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+NVAR)
+       ioffset = NVAR*(istage-1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         CALL WCOPY(NVAR,Fcn0,1,Fcn,1)
+         IF (AdjointType == Adj_discrete) THEN ! Save stage solution
+            ! CALL WCOPY(NVAR,Y,1,Ystage(1),1)
+            Ystage(1:NVAR) = Y(1:NVAR)
+            CALL WCOPY(NVAR,Y,1,Ynew,1)
+         END IF   
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR,Y,1,Ynew,1)
+         DO j = 1, istage-1
+	   CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+            K(NVAR*(j-1)+1:NVAR*j),1,Ynew,1) 
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL Fun_Template(Tau,Ynew,Fcn)
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+      ! save stage solution every time even if ynew is not updated
+       IF ( ( istage > 1 ).AND.(AdjointType == Adj_discrete) ) THEN
+         ! CALL WCOPY(NVAR,Ynew,1,Ystage(ioffset+1:ioffset+NVAR),1)
+         Ystage(ioffset+1:ioffset+NVAR) = Ynew(1:NVAR)
+       END IF   
+       !CALL WCOPY(NVAR,Fcn,1,K(ioffset+1:ioffset+NVAR),1)
+       K(ioffset+1:ioffset+NVAR) = Fcn(1:NVAR)
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1:NVAR*j),1,K(ioffset+1:ioffset+NVAR),1)
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(NVAR,HG,dFdT,1,K(ioffset+1:ioffset+NVAR),1)
+       END IF
+       CALL ros_Solve('N', Ghimj, Pivot, K(ioffset+1:ioffset+NVAR))
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   CALL WCOPY(NVAR,Y,1,Ynew,1)
+   DO j=1,ros_S
+         CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1:NVAR*j),1,Ynew,1)
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL WSCAL(NVAR,ZERO,Yerr,1)
+   DO j=1,ros_S     
+        CALL WAXPY(NVAR,ros_E(j),K(NVAR*(j-1)+1:NVAR*j),1,Yerr,1)
+   END DO 
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      IF (AdjointType == Adj_discrete) THEN ! Save current state
+          CALL ros_DPush( ros_S, T, H, Ystage, K, Ghimj, Pivot )
+      ELSEIF ( (AdjointType == Adj_continuous) .OR. &
+           (AdjointType == Adj_simple_continuous) ) THEN
+#ifdef FULL_ALGEBRA
+          K = MATMUL(Jac0,Fcn0)
+#else           
+          CALL Jac_SP_Vec( Jac0, Fcn0, K(1:NVAR) )
+#endif          
+          IF (.NOT. Autonomous) THEN
+             CALL WAXPY(NVAR,ONE,dFdT,1,K(1:NVAR),1)
+          END IF   
+          CALL ros_CPush( T, H, Y, Fcn0, K(1:NVAR) )
+      END IF      
+      CALL WCOPY(NVAR,Ynew,1,Y,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew      
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1) THEN
+         ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+   
+!~~~> Save last state: only needed for continuous adjoint
+   IF ( (AdjointType == Adj_continuous) .OR. &
+       (AdjointType == Adj_simple_continuous) ) THEN
+       CALL Fun_Template(T,Y,Fcn0)
+       ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       CALL Jac_Template(T,Y,Jac0)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA
+       K = MATMUL(Jac0,Fcn0)
+#else
+       CALL Jac_SP_Vec( Jac0, Fcn0, K(1:NVAR) )
+#endif       
+       IF (.NOT. Autonomous) THEN
+           CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+           CALL WAXPY(NVAR,ONE,dFdT,1,K(1:NVAR),1)
+       END IF   
+       CALL ros_CPush( T, H, Y, Fcn0, K(1:NVAR) )
+!~~~> Deallocate stage buffer: only needed for discrete adjoint
+   ELSEIF (AdjointType == Adj_discrete) THEN 
+        DEALLOCATE(Ystage, STAT=i)
+        IF (i/=0) THEN
+          PRINT*,'Deallocation of Ystage failed'
+          STOP
+        END IF
+   END IF   
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_FwdInt
+   
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_DadjInt (                        &
+        NADJ, Lambda,                            &
+        Tstart, Tend, T,                         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockSOA method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+   KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+!!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ystage(NVAR*ros_S), K(NVAR*ros_S)
+   KPP_REAL :: U(NVAR*ros_S,NADJ), V(NVAR*ros_S,NADJ)
+#ifdef FULL_ALGEBRA
+   KPP_REAL, DIMENSION(NVAR,NVAR)  :: Jac, dJdT, Ghimj
+#else
+   KPP_REAL, DIMENSION(LU_NONZERO) :: Jac, dJdT, Ghimj
+#endif
+   KPP_REAL :: Hes0(NHESS)
+   KPP_REAL :: Tmp(NVAR), Tmp2(NVAR)
+   KPP_REAL :: H, HC, HA, Tau 
+   INTEGER :: Pivot(NVAR), Direction
+   INTEGER :: i, j, m, istage, ioffset, joffset
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+
+!~~~> Time loop begins below 
+TimeLoop: DO WHILE ( stack_ptr > 0 )
+        
+   !~~~>  Recover checkpoints for stage values and vectors
+   CALL ros_DPop( ros_S, T, H, Ystage, K, Ghimj, Pivot )
+
+!   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+
+!~~~>    Compute LU decomposition 
+   IF (.NOT.SaveLU) THEN
+     CALL Jac_Template(T,Ystage(1:NVAR),Ghimj)
+     ISTATUS(Njac) = ISTATUS(Njac) + 1
+     Tau = ONE/(Direction*H*ros_Gamma(1))
+#ifdef FULL_ALGEBRA
+     Ghimj(1:NVAR,1:NVAR) = -Ghimj(1:NVAR,1:NVAR)
+     DO i=1,NVAR
+       Ghimj(i,i) = Ghimj(i,i)+Tau
+     END DO
+#else
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+Tau
+     END DO
+#endif
+     CALL ros_Decomp( Ghimj, Pivot, j )
+   END IF
+            
+!~~~>   Compute Hessian at the beginning of the interval
+   CALL Hess_Template(T,Ystage(1:NVAR),Hes0)
+   
+!~~~>   Compute the stages
+Stage: DO istage = ros_S, 1, -1
+      
+      !~~~> Current istage first entry 
+       ioffset = NVAR*(istage-1)
+      
+      !~~~> Compute U
+       DO m = 1,NADJ
+         !CALL WCOPY(NVAR,Lambda(1:NVAR,m),1,U(ioffset+1:ioffset+NVAR,m),1)
+	 U(ioffset+1:ioffset+NVAR,m) = Lambda(1:NVAR,m)
+         CALL WSCAL(NVAR,ros_M(istage),U(ioffset+1:ioffset+NVAR,m),1)
+       END DO ! m=1:NADJ
+       DO j = istage+1, ros_S
+         joffset = NVAR*(j-1)
+         HA = ros_A((j-1)*(j-2)/2+istage)
+         HC = ros_C((j-1)*(j-2)/2+istage)/(Direction*H)
+         DO m = 1,NADJ
+           CALL WAXPY(NVAR,HA,V(joffset+1:joffset+NVAR,m),1,U(ioffset+1:ioffset+NVAR,m),1) 
+           CALL WAXPY(NVAR,HC,U(joffset+1:joffset+NVAR,m),1,U(ioffset+1:ioffset+NVAR,m),1) 
+         END DO ! m=1:NADJ
+       END DO
+       DO m = 1,NADJ
+         CALL ros_Solve('T', Ghimj, Pivot, U(ioffset+1:ioffset+NVAR,m))
+       END DO ! m=1:NADJ
+      !~~~> Compute V 
+       Tau = T + ros_Alpha(istage)*Direction*H
+       CALL Jac_Template(Tau,Ystage(ioffset+1:ioffset+NVAR),Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+       DO m = 1,NADJ
+#ifdef FULL_ALGEBRA
+         V(ioffset+1:ioffset+NVAR,m) = MATMUL(TRANSPOSE(Jac),U(ioffset+1:ioffset+NVAR,m))
+#else
+         CALL JacTR_SP_Vec(Jac,U(ioffset+1:ioffset+NVAR,m),V(ioffset+1:ioffset+NVAR,m)) 
+#endif         
+       END DO ! m=1:NADJ
+             
+   END DO Stage     
+
+   IF (.NOT.Autonomous) THEN
+!~~~>  Compute the Jacobian derivative with respect to T. 
+!      Last "Jac" computed for stage 1
+      CALL ros_JacTimeDerivative ( T, Roundoff, Ystage(1), Jac, dJdT )
+   END IF
+
+!~~~>  Compute the new solution 
+   
+      !~~~>  Compute Lambda 
+      DO istage=1,ros_S
+         ioffset = NVAR*(istage-1)
+         DO m = 1,NADJ
+           ! Add V_i
+           CALL WAXPY(NVAR,ONE,V(ioffset+1:ioffset+NVAR,m),1,Lambda(1,m),1)
+           ! Add (H0xK_i)^T * U_i
+           CALL HessTR_Vec ( Hes0, U(ioffset+1:ioffset+NVAR,m), &
+	           K(ioffset+1:ioffset+NVAR), Tmp )
+           CALL WAXPY(NVAR,ONE,Tmp,1,Lambda(1:NVAR,m),1)
+         END DO ! m=1:NADJ
+      END DO
+     ! Add H * dJac_dT_0^T * \sum(gamma_i U_i)
+     ! Tmp holds sum gamma_i U_i
+      IF (.NOT.Autonomous) THEN
+         DO m = 1,NADJ
+           Tmp(1:NVAR) = ZERO
+           DO istage = 1, ros_S
+             ioffset = NVAR*(istage-1)
+             CALL WAXPY(NVAR,ros_Gamma(istage),U(ioffset+1:ioffset+NVAR,m),1,Tmp,1)
+           END DO  
+#ifdef FULL_ALGEBRA
+           Tmp2 = MATMUL(TRANSPOSE(dJdT),Tmp)
+#else
+           CALL JacTR_SP_Vec(dJdT,Tmp,Tmp2) 
+#endif           
+           CALL WAXPY(NVAR,H,Tmp2,1,Lambda(1:NVAR,m),1)
+         END DO ! m=1:NADJ
+      END IF ! .NOT.Autonomous
+ 
+
+   END DO TimeLoop 
+   
+!~~~> Save last state
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_DadjInt
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+   
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_CadjInt (                        &
+        NADJ, Y,                                 &
+        Tstart, Tend, T,                         &
+        AbsTol_adj, RelTol_adj,                  &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockADJ method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN) :: NADJ
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR,NADJ)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Input: adjoint tolerances   
+   KPP_REAL, INTENT(IN) :: AbsTol_adj(NVAR,NADJ), RelTol_adj(NVAR,NADJ)
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Y0(NVAR)
+   KPP_REAL :: Ynew(NVAR,NADJ), Fcn0(NVAR,NADJ), Fcn(NVAR,NADJ) 
+   KPP_REAL :: K(NVAR*ros_S,NADJ), dFdT(NVAR,NADJ)
+#ifdef FULL_ALGEBRA
+   KPP_REAL, DIMENSION(NVAR,NVAR)  :: Jac0, Ghimj, Jac, dJdT
+#else
+   KPP_REAL, DIMENSION(LU_NONZERO) :: Jac0, Ghimj, Jac, dJdT
+#endif   
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Yerr(NVAR,NADJ)
+   INTEGER :: Pivot(NVAR), Direction, ioffset, j, istage, iadj
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = 0.0_dp
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.0_dp*Roundoff) H = DeltaMin
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   RSTATUS(Nhexit) = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Interpolate forward solution
+   CALL ros_cadj_Y( T, Y0 )     
+!~~~>   Compute the Jacobian at current time
+   CALL Jac_Template(T, Y0, Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+   
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y0, &
+                Jac0, dJdT )
+      DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+        dFdT(1:NVAR,iadj) = MATMUL(TRANSPOSE(dJdT),Y(1:NVAR,iadj))
+#else
+        CALL JacTR_SP_Vec(dJdT,Y(1:NVAR,iadj),dFdT(1:NVAR,iadj))
+#endif
+        CALL WSCAL(NVAR,(-ONE),dFdT(1:NVAR,iadj),1)
+      END DO
+   END IF
+
+!~~~>  Ydot = -J^T*Y
+#ifdef FULL_ALGEBRA
+   Jac0(1:NVAR,1:NVAR) = -Jac0(1:NVAR,1:NVAR)
+#else
+   CALL WSCAL(LU_NONZERO,(-ONE),Jac0,1)
+#endif
+   DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+     Fcn0(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac0),Y(1:NVAR,iadj))
+#else
+     CALL JacTR_SP_Vec(Jac0,Y(1:NVAR,iadj),Fcn0(1:NVAR,iadj))
+#endif
+   END DO
+    
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1), &
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+NVAR)
+       ioffset = NVAR*(istage-1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         DO iadj = 1, NADJ
+           !CALL WCOPY(NVAR,Fcn0(1,iadj),1,Fcn(1,iadj),1)
+           Fcn(1:NVAR,iadj) = Fcn0(1:NVAR,iadj)
+         END DO
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR*NADJ,Y,1,Ynew,1)
+         DO j = 1, istage-1
+           DO iadj = 1, NADJ
+             CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+                K(NVAR*(j-1)+1:NVAR*j,iadj),1,Ynew(1,iadj),1) 
+           END DO       
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         ! CALL Fun_Template(Tau,Ynew,Fcn)
+         ! ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+         CALL ros_cadj_Y( Tau, Y0 )     
+         CALL Jac_Template(Tau, Y0, Jac)
+         ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA
+         Jac(1:NVAR,1:NVAR) = -Jac(1:NVAR,1:NVAR)
+#else
+         CALL WSCAL(LU_NONZERO,(-ONE),Jac,1)
+#endif
+         DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+             Fcn(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac),Ynew(1:NVAR,iadj))
+#else
+             CALL JacTR_SP_Vec(Jac,Ynew(1:NVAR,iadj),Fcn(1:NVAR,iadj))
+#endif
+             !CALL WSCAL(NVAR,(-ONE),Fcn(1,iadj),1)
+         END DO
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+
+       DO iadj = 1, NADJ
+          !CALL WCOPY(NVAR,Fcn(1,iadj),1,K(ioffset+1,iadj),1)
+	  K(ioffset+1:ioffset+NVAR,iadj) = Fcn(1:NVAR,iadj)
+       END DO
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1:NVAR*j,iadj),1, &
+                  K(ioffset+1:ioffset+NVAR,iadj),1)
+         END DO
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HG,dFdT(1:NVAR,iadj),1,K(ioffset+1:ioffset+NVAR,iadj),1)
+         END DO
+       END IF
+       DO iadj = 1, NADJ
+         CALL ros_Solve('T', Ghimj, Pivot, K(ioffset+1:ioffset+NVAR,iadj))
+       END DO
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   DO iadj = 1, NADJ
+      !CALL WCOPY(NVAR,Y(1:NVAR,iadj),1,Ynew(1,iadj),1)
+      Ynew(1:NVAR,iadj) = Y(1:NVAR,iadj)
+      DO j=1,ros_S
+         CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1:NVAR*j,iadj),1,Ynew(1:NVAR,iadj),1)
+      END DO
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL WSCAL(NVAR*NADJ,ZERO,Yerr,1)
+   DO j=1,ros_S     
+       DO iadj = 1, NADJ
+        CALL WAXPY(NVAR,ros_E(j),K(NVAR*(j-1)+1:NVAR*j,iadj),1,Yerr(1:NVAR,iadj),1)
+       END DO
+   END DO
+!~~~> Max error among all adjoint components    
+   iadj = 1
+   Err = ros_ErrorNorm ( Y(1:NVAR,iadj), Ynew(1,iadj), Yerr(1,iadj), &
+              AbsTol_adj(1,iadj), RelTol_adj(1,iadj), VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+!   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      CALL WCOPY(NVAR*NADJ,Ynew,1,Y,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew      
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1) THEN
+         ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+      
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_CadjInt
+  
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_SimpleCadjInt (                  &
+        NADJ, Y,                                 &
+        Tstart, Tend, T,                         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockADJ method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN) :: NADJ
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR,NADJ)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Y0(NVAR)
+   KPP_REAL :: Ynew(NVAR,NADJ), Fcn0(NVAR,NADJ), Fcn(NVAR,NADJ) 
+   KPP_REAL :: K(NVAR*ros_S,NADJ), dFdT(NVAR,NADJ)
+#ifdef FULL_ALGEBRA
+   KPP_REAL,DIMENSION(NVAR,NVAR)  :: Jac0, Ghimj, Jac, dJdT
+#else   
+   KPP_REAL,DIMENSION(LU_NONZERO) :: Jac0, Ghimj, Jac, dJdT
+#endif   
+   KPP_REAL :: H, HC, HG, Tau 
+   KPP_REAL :: ghinv
+   INTEGER :: Pivot(NVAR), Direction, ioffset, i, j, istage, iadj
+   INTEGER :: istack
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>  Locally called functions
+!    KPP_REAL WLAMCH
+!    EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  INITIAL PREPARATIONS
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = -1
+   ELSE
+     Direction = +1
+   END IF               
+   
+!~~~> Time loop begins below 
+TimeLoop: DO istack = stack_ptr,2,-1
+        
+   T = chk_T(istack)
+   H = chk_H(istack-1)
+   !CALL WCOPY(NVAR,chk_Y(1,istack),1,Y0,1)
+   Y0(1:NVAR) = chk_Y(1:NVAR,istack)
+   
+!~~~>   Compute the Jacobian at current time
+   CALL Jac_Template(T, Y0, Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+   
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y0, &
+                Jac0, dJdT )
+      DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+        dFdT(1:NVAR,iadj) = MATMUL(TRANSPOSE(dJdT),Y(1:NVAR,iadj))
+#else
+        CALL JacTR_SP_Vec(dJdT,Y(1:NVAR,iadj),dFdT(1:NVAR,iadj))
+#endif
+        CALL WSCAL(NVAR,(-ONE),dFdT(1:NVAR,iadj),1)
+      END DO
+   END IF
+
+!~~~>  Ydot = -J^T*Y
+#ifdef FULL_ALGEBRA
+   Jac0(1:NVAR,1:NVAR) = -Jac0(1:NVAR,1:NVAR)
+#else
+   CALL WSCAL(LU_NONZERO,(-ONE),Jac0,1)
+#endif
+   DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+     Fcn0(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac0),Y(1:NVAR,iadj))
+#else
+     CALL JacTR_SP_Vec(Jac0,Y(1:NVAR,iadj),Fcn0(1:NVAR,iadj))
+#endif
+   END DO
+   
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+     ghinv = ONE/(Direction*H*ros_Gamma(1))
+#ifdef FULL_ALGEBRA
+     Ghimj(1:NVAR,1:NVAR) = -Jac0(1:NVAR,1:NVAR)
+     DO i=1,NVAR
+       Ghimj(i,i) = Ghimj(i,i)+ghinv
+     END DO
+#else
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+#endif
+!~~~>    Compute LU decomposition 
+     CALL ros_Decomp( Ghimj, Pivot, j )
+     IF (j /= 0) THEN
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       PRINT*,' The matrix is singular !'
+       STOP
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+NVAR)
+       ioffset = NVAR*(istage-1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         DO iadj = 1, NADJ
+           CALL WCOPY(NVAR,Fcn0(1,iadj),1,Fcn(1,iadj),1)
+         END DO
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR*NADJ,Y,1,Ynew,1)
+         DO j = 1, istage-1
+           DO iadj = 1, NADJ
+             CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+                K(NVAR*(j-1)+1:NVAR*j,iadj),1,Ynew(1:NVAR,iadj),1) 
+           END DO       
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL ros_Hermite3( chk_T(istack-1), chk_T(istack), Tau, &
+             chk_Y(1:NVAR,istack-1), chk_Y(1:NVAR,istack),       &
+             chk_dY(1:NVAR,istack-1), chk_dY(1:NVAR,istack), Y0 )
+         CALL Jac_Template(Tau, Y0, Jac)
+         ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA
+         Jac(1:NVAR,1:NVAR) = -Jac(1:NVAR,1:NVAR)
+#else
+         CALL WSCAL(LU_NONZERO,(-ONE),Jac,1)
+#endif
+         DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+             Fcn(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac),Ynew(1:NVAR,iadj))
+#else
+             CALL JacTR_SP_Vec(Jac,Ynew(1:NVAR,iadj),Fcn(1:NVAR,iadj))
+#endif
+         END DO
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+
+       DO iadj = 1, NADJ
+          CALL WCOPY(NVAR,Fcn(1,iadj),1,K(ioffset+1,iadj),1)
+       END DO
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1:NVAR*j,iadj),1, &
+                  K(ioffset+1:ioffset+NVAR,iadj),1)
+         END DO
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HG,dFdT(1:NVAR,iadj),1,K(ioffset+1:ioffset+NVAR,iadj),1)
+         END DO
+       END IF
+       DO iadj = 1, NADJ
+         CALL ros_Solve('T', Ghimj, Pivot, K(ioffset+1:ioffset+NVAR,iadj))
+       END DO
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   DO iadj = 1, NADJ
+      DO j=1,ros_S
+         CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1:NVAR*j,iadj),1,Y(1:NVAR,iadj),1)
+      END DO
+   END DO
+
+   END DO TimeLoop 
+      
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_SimpleCadjInt
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, & 
+               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y(NVAR), Ynew(NVAR), &
+          Yerr(NVAR), AbsTol(NVAR), RelTol(NVAR)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: Err, Scale, Ymax   
+   INTEGER  :: i
+   
+   Err = ZERO
+   DO i=1,NVAR
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/NVAR)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+   
+  END FUNCTION ros_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR), Fcn0(NVAR) 
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dFdT(NVAR)   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL Fun_Template(T+Delta,Y,dFdT)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+   CALL WAXPY(NVAR,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(NVAR,(ONE/Delta),dFdT,1)
+
+  END SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_JacTimeDerivative ( T, Roundoff, Y, &
+                Jac0, dJdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the Jacobian by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR)
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN)  :: Jac0(NVAR,NVAR) 
+   KPP_REAL, INTENT(OUT) :: dJdT(NVAR,NVAR)   
+#else
+   KPP_REAL, INTENT(IN)  :: Jac0(LU_NONZERO) 
+   KPP_REAL, INTENT(OUT) :: dJdT(LU_NONZERO)   
+#endif   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL Jac_Template(T+Delta,Y,dJdT)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA    
+   CALL WAXPY(NVAR*NVAR,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(NVAR*NVAR,(ONE/Delta),dJdT,1)
+#else
+   CALL WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1)
+#endif   
+
+  END SUBROUTINE ros_JacTimeDerivative
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*gam) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE
+
+!~~~> Input arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) ::  Jac0(NVAR,NVAR)
+#else
+   KPP_REAL, INTENT(IN) ::  Jac0(LU_NONZERO)
+#endif   
+   KPP_REAL, INTENT(IN) ::  gam
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(OUT) :: Ghimj(NVAR,NVAR)
+#else
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+#endif   
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(NVAR)
+!~~~> Inout arguments
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables
+   INTEGER  :: i, ising, Nconsecutive
+   KPP_REAL :: ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0_dp, HALF = 0.5_dp
+
+   Nconsecutive = 0
+   Singular = .TRUE.
+
+   DO WHILE (Singular)
+
+!~~~>    Construct Ghimj = 1/(H*gam) - Jac0
+#ifdef FULL_ALGEBRA    
+     CALL WCOPY(NVAR*NVAR,Jac0,1,Ghimj,1)
+     CALL WSCAL(NVAR*NVAR,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,NVAR
+       Ghimj(i,i) = Ghimj(i,i)+ghinv
+     END DO
+#else
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+#endif   
+!~~~>    Compute LU decomposition
+     CALL ros_Decomp( Ghimj, Pivot, ising )
+     IF (ising == 0) THEN
+!~~~>    If successful done
+        Singular = .FALSE.
+     ELSE ! ising .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        ISTATUS(Nsng) = ISTATUS(Nsng) + 1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE.
+        PRINT*,'Warning: LU Decomposition returned ising = ',ising
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decompositions
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ising
+
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Decomp( A, Pivot, ising )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the LU decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Inout variables
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(INOUT) :: A(NVAR,NVAR)
+#else   
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+#endif
+!~~~> Output variables
+   INTEGER, INTENT(OUT) :: Pivot(NVAR), ising
+
+#ifdef FULL_ALGEBRA    
+   CALL  DGETRF( NVAR, NVAR, A, NVAR, Pivot, ising )
+#else   
+   CALL KppDecomp ( A, ising )
+   Pivot(1) = 1
+#endif
+   ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+  END SUBROUTINE ros_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Solve( How, A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Input variables
+   CHARACTER, INTENT(IN) :: How
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) :: A(NVAR,NVAR)
+#else   
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+#endif
+   INTEGER, INTENT(IN) :: Pivot(NVAR)
+!~~~> InOut variables
+   KPP_REAL, INTENT(INOUT) :: b(NVAR)
+
+   SELECT CASE (How)
+   CASE ('N')
+#ifdef FULL_ALGEBRA    
+     CALL DGETRS( 'N', NVAR , 1, A, NVAR, Pivot, b, NVAR, 0 )
+#else   
+     CALL KppSolve( A, b )
+#endif
+   CASE ('T')
+#ifdef FULL_ALGEBRA    
+     CALL DGETRS( 'T', NVAR , 1, A, NVAR, Pivot, b, NVAR, 0 )
+#else   
+     CALL KppSolveTR( A, b, b )
+#endif
+   CASE DEFAULT
+     PRINT*,'Error: unknown argument in ros_Solve: How=',How
+     STOP
+   END SELECT
+   ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+  END SUBROUTINE ros_Solve
+
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_cadj_Y( T, Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Finds the solution Y at T by interpolating the stored forward trajectory
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+   KPP_REAL, INTENT(IN) :: T
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Y(NVAR)
+!~~~> Local variables     
+   INTEGER     :: i
+   KPP_REAL, PARAMETER  :: ONE = 1.0d0
+
+!   chk_H, chk_T, chk_Y, chk_dY, chk_d2Y
+
+   IF( (T < chk_T(1)).OR.(T> chk_T(stack_ptr)) ) THEN
+      PRINT*,'Cannot locate solution at T = ',T
+      PRINT*,'Stored trajectory is between Tstart = ',chk_T(1)
+      PRINT*,'    and Tend = ',chk_T(stack_ptr)
+      STOP
+   END IF
+   DO i = 1, stack_ptr-1
+     IF( (T>= chk_T(i)).AND.(T<= chk_T(i+1)) ) EXIT
+   END DO 
+
+
+!   IF (.FALSE.) THEN
+!
+!   CALL ros_Hermite5( chk_T(i), chk_T(i+1), T, &
+!                chk_Y(1,i),   chk_Y(1,i+1),     &
+!                chk_dY(1,i),  chk_dY(1,i+1),    &
+!                chk_d2Y(1,i), chk_d2Y(1,i+1), Y )
+!   
+!   ELSE
+                
+   CALL ros_Hermite3( chk_T(i), chk_T(i+1), T, &
+                chk_Y(1:NVAR,i),   chk_Y(1:NVAR,i+1),     &
+                chk_dY(1:NVAR,i),  chk_dY(1:NVAR,i+1),    &
+                Y )
+                        
+!   
+!   END IF       
+
+  END SUBROUTINE ros_cadj_Y
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Hermite3( a, b, T, Ya, Yb, Ja, Jb, Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for Hermite interpolation of order 5 on the interval [a,b]
+! P = c(1) + c(2)*(x-a) + ... + c(4)*(x-a)^3
+! P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb]
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+   KPP_REAL, INTENT(IN) :: a, b, T, Ya(NVAR), Yb(NVAR)
+   KPP_REAL, INTENT(IN) :: Ja(NVAR), Jb(NVAR)
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Y(NVAR)
+!~~~> Local variables     
+   KPP_REAL :: Tau, amb(3), C(NVAR,4)
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0
+   INTEGER :: i, j
+   
+   amb(1) = 1.0d0/(a-b)
+   DO i=2,3
+     amb(i) = amb(i-1)*amb(1)
+   END DO
+   
+   
+! c(1) = ya;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,1),1)
+! c(2) = ja;
+   CALL WCOPY(NVAR,Ja,1,C(1:NVAR,2),1)
+! c(3) = 2/(a-b)*ja + 1/(a-b)*jb - 3/(a - b)^2*ya + 3/(a - b)^2*yb  ;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,3),1)
+   CALL WSCAL(NVAR,-3.0*amb(2),C(1:NVAR,3),1)
+   CALL WAXPY(NVAR,3.0*amb(2),Yb,1,C(1:NVAR,3),1)
+   CALL WAXPY(NVAR,2.0*amb(1),Ja,1,C(1:NVAR,3),1)
+   CALL WAXPY(NVAR,amb(1),Jb,1,C(1:NVAR,3),1)
+! c(4) =  1/(a-b)^2*ja + 1/(a-b)^2*jb - 2/(a-b)^3*ya + 2/(a-b)^3*yb ;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,4),1)
+   CALL WSCAL(NVAR,-2.0*amb(3),C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,2.0*amb(3),Yb,1,C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,amb(2),Ja,1,C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,amb(2),Jb,1,C(1:NVAR,4),1)
+   
+   Tau = T - a
+   CALL WCOPY(NVAR,C(1:NVAR,4),1,Y,1)
+   CALL WSCAL(NVAR,Tau**3,Y,1)
+   DO j = 3,1,-1
+     CALL WAXPY(NVAR,TAU**(j-1),C(1:NVAR,j),1,Y,1)
+   END DO       
+
+  END SUBROUTINE ros_Hermite3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Hermite5( a, b, T, Ya, Yb, Ja, Jb, Ha, Hb, Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for Hermite interpolation of order 5 on the interval [a,b]
+! P = c(1) + c(2)*(x-a) + ... + c(6)*(x-a)^5
+! P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb], P"[a,b] = [Ha,Hb]
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+   KPP_REAL, INTENT(IN) :: a, b, T, Ya(NVAR), Yb(NVAR)
+   KPP_REAL, INTENT(IN) :: Ja(NVAR), Jb(NVAR), Ha(NVAR), Hb(NVAR)
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Y(NVAR)
+!~~~> Local variables     
+   KPP_REAL :: Tau, amb(5), C(NVAR,6)
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, HALF = 0.5d0
+   INTEGER :: i, j
+   
+   amb(1) = 1.0d0/(a-b)
+   DO i=2,5
+     amb(i) = amb(i-1)*amb(1)
+   END DO
+     
+! c(1) = ya;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,1),1)
+! c(2) = ja;
+   CALL WCOPY(NVAR,Ja,1,C(1:NVAR,2),1)
+! c(3) = ha/2;
+   CALL WCOPY(NVAR,Ha,1,C(1:NVAR,3),1)
+   CALL WSCAL(NVAR,HALF,C(1:NVAR,3),1)
+   
+! c(4) = 10*amb(3)*ya - 10*amb(3)*yb - 6*amb(2)*ja - 4*amb(2)*jb  + 1.5*amb(1)*ha - 0.5*amb(1)*hb ;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,4),1)
+   CALL WSCAL(NVAR,10.0*amb(3),C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,-10.0*amb(3),Yb,1,C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,-6.0*amb(2),Ja,1,C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,-4.0*amb(2),Jb,1,C(1:NVAR,4),1)
+   CALL WAXPY(NVAR, 1.5*amb(1),Ha,1,C(1:NVAR,4),1)
+   CALL WAXPY(NVAR,-0.5*amb(1),Hb,1,C(1:NVAR,4),1)
+
+! c(5) =   15*amb(4)*ya - 15*amb(4)*yb - 8.*amb(3)*ja - 7*amb(3)*jb + 1.5*amb(2)*ha - 1*amb(2)*hb ;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,5),1)
+   CALL WSCAL(NVAR, 15.0*amb(4),C(1:NVAR,5),1)
+   CALL WAXPY(NVAR,-15.0*amb(4),Yb,1,C(1:NVAR,5),1)
+   CALL WAXPY(NVAR,-8.0*amb(3),Ja,1,C(1:NVAR,5),1)
+   CALL WAXPY(NVAR,-7.0*amb(3),Jb,1,C(1:NVAR,5),1)
+   CALL WAXPY(NVAR,1.5*amb(2),Ha,1,C(1:NVAR,5),1)
+   CALL WAXPY(NVAR,-amb(2),Hb,1,C(1:NVAR,5),1)
+   
+! c(6) =   6*amb(5)*ya - 6*amb(5)*yb - 3.*amb(4)*ja - 3.*amb(4)*jb + 0.5*amb(3)*ha -0.5*amb(3)*hb ;
+   CALL WCOPY(NVAR,Ya,1,C(1:NVAR,6),1)
+   CALL WSCAL(NVAR, 6.0*amb(5),C(1:NVAR,6),1)
+   CALL WAXPY(NVAR,-6.0*amb(5),Yb,1,C(1:NVAR,6),1)
+   CALL WAXPY(NVAR,-3.0*amb(4),Ja,1,C(1:NVAR,6),1)
+   CALL WAXPY(NVAR,-3.0*amb(4),Jb,1,C(1:NVAR,6),1)
+   CALL WAXPY(NVAR, 0.5*amb(3),Ha,1,C(1:NVAR,6),1)
+   CALL WAXPY(NVAR,-0.5*amb(3),Hb,1,C(1:NVAR,6),1)
+   
+   Tau = T - a
+   CALL WCOPY(NVAR,C(1:NVAR,6),1,Y,1)
+   DO j = 5,1,-1
+     CALL WSCAL(NVAR,Tau,Y,1)
+     CALL WAXPY(NVAR,ONE,C(1:NVAR,j),1,Y,1)
+   END DO       
+
+  END SUBROUTINE ros_Hermite5
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+    IMPLICIT NONE
+    DOUBLE PRECISION g
+   
+    g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+   
+    rosMethod = RS2
+!~~~> Name of the method
+    ros_Name = 'ROS-2'   
+!~~~> Number of stages
+    ros_S = 2
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+   
+    ros_A(1) = (1.d0)/g
+    ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.d0)/(2.d0*g)
+    ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator    
+    ros_E(1) = 1.d0/(2.d0*g)
+    ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0d0
+    ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+   
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   IMPLICIT NONE
+    
+    rosMethod = RS3
+!~~~> Name of the method
+   ros_Name = 'ROS-3'   
+!~~~> Number of stages
+   ros_S = 3
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1)= 1.d0
+   ros_A(2)= 1.d0
+   ros_A(3)= 0.d0
+
+   ros_C(1) = -0.10156171083877702091975600115545d+01
+   ros_C(2) =  0.40759956452537699824805835358067d+01
+   ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1d+01
+   ros_M(2) =  0.61697947043828245592553615689730d+01
+   ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator    
+   ros_E(1) =  0.5d+00
+   ros_E(2) = -0.29079558716805469821718236208017d+01
+   ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0d+00
+   ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+   ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+   ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+   ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RS4
+!~~~> Name of the method
+   ros_Name = 'ROS-4'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1) = 0.2000000000000000d+01
+   ros_A(2) = 0.1867943637803922d+01
+   ros_A(3) = 0.2344449711399156d+00
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0D0
+
+   ros_C(1) =-0.7137615036412310d+01
+   ros_C(2) = 0.2580708087951457d+01
+   ros_C(3) = 0.6515950076447975d+00
+   ros_C(4) =-0.2137148994382534d+01
+   ros_C(5) =-0.3214669691237626d+00
+   ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735d+01
+   ros_M(2) = 0.2870493262186792d+00
+   ros_M(3) = 0.4353179431840180d+00
+   ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) =-0.2815431932141155d+00
+   ros_E(2) =-0.7276199124938920d-01
+   ros_E(3) =-0.1082196201495311d+00
+   ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.D0
+   ros_Alpha(2) = 0.1145640000000000d+01
+   ros_Alpha(3) = 0.6552168638155900d+00
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5728200000000000d+00
+   ros_Gamma(2) =-0.1769193891319233d+01
+   ros_Gamma(3) = 0.7592633437920482d+00
+   ros_Gamma(4) =-0.1049021087100450d+00
+
+  END SUBROUTINE Ros4
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RD3
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+   ros_A(1) = 0.0d+00
+   ros_A(2) = 2.0d+00
+   ros_A(3) = 0.0d+00
+   ros_A(4) = 2.0d+00
+   ros_A(5) = 0.0d+00
+   ros_A(6) = 1.0d+00
+
+   ros_C(1) = 4.0d+00
+   ros_C(2) = 1.0d+00
+   ros_C(3) =-1.0d+00
+   ros_C(4) = 1.0d+00
+   ros_C(5) =-1.0d+00 
+   ros_C(6) =-(8.0d+00/3.0d+00) 
+         
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0d+00
+   ros_M(2) = 0.0d+00
+   ros_M(3) = 1.0d+00
+   ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) = 0.0d+00
+   ros_E(2) = 0.0d+00
+   ros_E(3) = 0.0d+00
+   ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0d+00    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0d+00
+   ros_Alpha(2) = 0.0d+00
+   ros_Alpha(3) = 1.0d+00
+   ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5d+00
+   ros_Gamma(2) = 1.5d+00
+   ros_Gamma(3) = 0.0d+00
+   ros_Gamma(4) = 0.0d+00
+
+  END SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+
+    rosMethod = RD4
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'   
+!~~~> Number of stages
+    ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000d0
+    ros_Alpha(2) = 0.386d0
+    ros_Alpha(3) = 0.210d0 
+    ros_Alpha(4) = 0.630d0
+    ros_Alpha(5) = 1.000d0
+    ros_Alpha(6) = 1.000d0
+        
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = 0.2500000000000000d+00
+    ros_Gamma(2) =-0.1043000000000000d+00
+    ros_Gamma(3) = 0.1035000000000000d+00
+    ros_Gamma(4) =-0.3620000000000023d-01
+    ros_Gamma(5) = 0.0d0
+    ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+    ros_A(1) = 0.1544000000000000d+01
+    ros_A(2) = 0.9466785280815826d+00
+    ros_A(3) = 0.2557011698983284d+00
+    ros_A(4) = 0.3314825187068521d+01
+    ros_A(5) = 0.2896124015972201d+01
+    ros_A(6) = 0.9986419139977817d+00
+    ros_A(7) = 0.1221224509226641d+01
+    ros_A(8) = 0.6019134481288629d+01
+    ros_A(9) = 0.1253708332932087d+02
+    ros_A(10) =-0.6878860361058950d+00
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0d+00
+
+    ros_C(1) =-0.5668800000000000d+01
+    ros_C(2) =-0.2430093356833875d+01
+    ros_C(3) =-0.2063599157091915d+00
+    ros_C(4) =-0.1073529058151375d+00
+    ros_C(5) =-0.9594562251023355d+01
+    ros_C(6) =-0.2047028614809616d+02
+    ros_C(7) = 0.7496443313967647d+01
+    ros_C(8) =-0.1024680431464352d+02
+    ros_C(9) =-0.3399990352819905d+02
+    ros_C(10) = 0.1170890893206160d+02
+    ros_C(11) = 0.8083246795921522d+01
+    ros_C(12) =-0.7981132988064893d+01
+    ros_C(13) =-0.3152159432874371d+02
+    ros_C(14) = 0.1631930543123136d+02
+    ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0d+00
+    ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator    
+    ros_E(1) = 0.0d+00
+    ros_E(2) = 0.0d+00
+    ros_E(3) = 0.0d+00
+    ros_E(4) = 0.0d+00
+    ros_E(5) = 0.0d+00
+    ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0d0
+     
+  END SUBROUTINE Rodas4
+
+
+END SUBROUTINE RosenbrockADJ ! and its internal procedures
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE Fun_Template( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ 
+!~~~> Input variables     
+   KPP_REAL, INTENT(IN)  :: T, Y(NVAR)
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL :: Told     
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+   
+END SUBROUTINE Fun_Template
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE Jac_Template( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~> Input variables
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), Jcb(NVAR,NVAR)
+#else
+    KPP_REAL :: Jcb(LU_NONZERO)
+#endif   
+!~~~> Local variables
+    KPP_REAL :: Told
+#ifdef FULL_ALGEBRA    
+    INTEGER :: i, j
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(Y, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         Jcb(i,j) = 0.0_dp
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       Jcb(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+#endif   
+    TIME = Told
+
+END SUBROUTINE Jac_Template
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE Hess_Template( T, Y, Hes )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!  Template for the ODE Hessian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+!~~~> Input variables     
+    KPP_REAL, INTENT(IN)  :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL, INTENT(OUT) :: Hes(NHESS)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Hessian( Y, FIX, RCONST, Hes )
+    TIME = Told
+
+END SUBROUTINE Hess_Template                                      
+
+END MODULE KPP_ROOT_Integrator
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_soa.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_soa.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_soa.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock_soa
+
+#INLINE F90_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT
+       STEPMIN=0.0001
+       STEPMAX=3600.
+       Autonomous = 1 
+       STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_soa.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_soa.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_soa.f90	(revision 3477)
@@ -0,0 +1,1942 @@
+MODULE KPP_ROOT_Integrator
+ 
+ USE KPP_ROOT_Precision
+ USE KPP_ROOT_Parameters
+ USE KPP_ROOT_Global
+ USE KPP_ROOT_Function
+ USE KPP_ROOT_Jacobian
+ USE KPP_ROOT_Hessian
+ USE KPP_ROOT_LinearAlgebra
+ USE KPP_ROOT_Rates
+ 
+   IMPLICIT NONE
+   PUBLIC
+   SAVE
+!~~~>  Statistics on the work performed by the Rosenbrock method
+   INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+   INTEGER, PARAMETER :: ifun=11,  ijac=12, istp=13,  &
+                iacc=14, irej=15,  idec=16, isol=17,  &
+                isng=18, itexit=11,ihexit=12
+!~~~>  Checkpoints in memory
+   INTEGER, PARAMETER :: bufsize = 1500
+   INTEGER :: stack_ptr = 0 ! last written entry
+   KPP_REAL, DIMENSION(:), POINTER :: buf_H, buf_T
+   KPP_REAL, DIMENSION(:,:), POINTER :: buf_Y, buf_K
+   KPP_REAL, DIMENSION(:,:), POINTER :: buf_Y_tlm, buf_K_tlm
+
+CONTAINS
+
+ 
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE INTEGRATE_SOA( NSOA, Y, Y_tlm, Y_adj, Y_soa, TIN, TOUT, &
+       AtolAdj, RtolAdj, ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+   IMPLICIT NONE        
+    
+!~~~> NSOA - No. of vectors to multiply SOA with
+   INTEGER :: NSOA
+!~~~> Y -   Forward model variables
+   KPP_REAL, INTENT(INOUT)  :: Y(NVAR)
+!~~~> Y_adj -   Tangent linear variables
+   KPP_REAL, INTENT(INOUT)  :: Y_tlm(NVAR,NSOA)
+!~~~> Y_adj   - First order adjoint
+   KPP_REAL, INTENT(INOUT)  :: Y_adj(NVAR)
+!~~~> Y_soa - Second order adjoint
+   KPP_REAL, INTENT(INOUT)  :: Y_soa(NVAR,NSOA)
+!~~~> 
+   KPP_REAL, INTENT(IN)         :: TIN  ! TIN  - Start Time
+   KPP_REAL, INTENT(IN)         :: TOUT ! TOUT - End Time
+!~~~> Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+
+   INTEGER N_stp, N_acc, N_rej, N_sng, IERR
+   SAVE N_stp, N_acc, N_rej, N_sng
+   INTEGER i
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   KPP_REAL :: AtolAdj(NVAR), RtolAdj(NVAR)
+   INTEGER :: ICNTRL(20), ISTATUS(20)
+
+   ICNTRL(1:20)  = 0
+   RCNTRL(1:20)  = 0.0_dp
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = 0.0_dp
+   
+   ICNTRL(1) = 0       ! 0 = non-autonomous, 1 = autonomous
+   ICNTRL(2) = 1       ! 0 = scalar, 1 = vector tolerances
+   RCNTRL(3) = STEPMIN ! starting step
+   ICNTRL(4) = 5       ! choice of the method for forward and adjoint integration
+
+! Tighter tolerances, especially atol, are needed for the full continuous adjoint
+!  (Atol on sensitivities is different than on concentrations)
+!   CADJ_ATOL(1:NVAR) = 1.0d-5
+!   CADJ_RTOL(1:NVAR) = 1.0d-4
+
+   ! if optional parameters are given, and if they are >=0, 
+   !       then they overwrite default settings
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) >= 0) ICNTRL(:) = ICNTRL_U(:)
+   ENDIF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) >= 0) RCNTRL(:) = RCNTRL_U(:)
+   ENDIF
+
+   
+   CALL RosenbrockSOA(NSOA,                   &
+         Y, Y_tlm, Y_adj, Y_soa,                &
+         TIN,TOUT,                              &
+         ATOL,RTOL,                             &
+         Fun_Template,Jac_Template,Hess_Template,  &
+         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+
+             
+!   N_stp = N_stp + ICNTRL(istp)
+!   N_acc = N_acc + ICNTRL(iacc)
+!   N_rej = N_rej + ICNTRL(irej)
+!   N_sng = N_sng + ICNTRL(isng)
+!   PRINT*,'Step=',N_stp,' Acc=',N_acc,' Rej=',N_rej, &
+!        ' Singular=',N_sng
+
+   IF (IERR < 0) THEN
+     print *,'RosenbrockSOA: Unsucessful step at T=', &
+         TIN,' (IERR=',IERR,')'
+   ENDIF
+
+   STEPMIN = RCNTRL(ihexit)
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+
+END SUBROUTINE INTEGRATE_SOA
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE RosenbrockSOA( NSOA,            &
+           Y, Y_tlm, Y_adj, Y_soa,         &
+           Tstart,Tend,                    &
+           AbsTol,RelTol,                  &
+           ode_Fun,ode_Jac , ode_Hess,     &
+           RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   
+!    ADJ = Adjoint of the Tangent Linear Model of a RosenbrockSOA Method
+!
+!    Solves the system y'=F(t,y) using a RosenbrockSOA method defined by:
+!
+!     G = 1/(H*gamma(1)) - ode_Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = ode_Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on RosenbrockSOA methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.       
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    
+!~~~>   INPUT ARGUMENTS: 
+!    
+!-     Y(NVAR)     -> vector of initial conditions (at T=Tstart)
+!      NSOA        -> dimension of linearized system, 
+!                     i.e. the number of sensitivity coefficients
+!-     Y_adj(NVAR) -> vector of initial sensitivity conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function, 
+!                       returns Ydot = Y' = F(T,Y) 
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY 
+!-    ICNTRL(1:10)    = integer inputs parameters
+!-    RCNTRL(1:10)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!     
+!-    Y(NVAR)         -> vector of final states (at T->Tend)
+!-    Y_adj(NVAR)     -> vector of final sensitivities (at T=Tend)
+!-    ICNTRL(11:20)   -> integer output parameters
+!-    RCNTRL(11:20)   -> real output parameters
+!-    IERR       -> job status upon return
+!       - succes (positive value) or failure (negative value) -
+!           =  1 : Success
+!           = -1 : Improper value for maximal no of steps
+!           = -2 : Selected RosenbrockSOA method not implemented
+!           = -3 : Hmin/Hmax/Hstart must be positive
+!           = -4 : FacMin/FacMax/FacRej must be positive
+!           = -5 : Improper tolerance values
+!           = -6 : No of steps exceeds maximum bound
+!           = -7 : Step size too small
+!           = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!    ICNTRL(2)   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!    ICNTRL(3)  -> maximum number of integration steps
+!        For ICNTRL(3)=0) the default value of 100000 is used
+!
+!    ICNTRL(4)  -> selection of a particular Rosenbrock method
+!        = 0 :  default method is Rodas3
+!        = 1 :  method is  Ros2
+!        = 2 :  method is  Ros3 
+!        = 3 :  method is  Ros4 
+!        = 4 :  method is  Rodas3
+!        = 5:   method is  Rodas4
+!
+!    ICNTRL(5) -> Type of adjoint algorithm
+!         = 0 : default is discrete adjoint ( of method ICNTRL(4) )
+!         = 1 : no adjoint       
+!         = 2 : discrete adjoint ( of method ICNTRL(4) )
+!         = 3 : fully adaptive continuous adjoint ( with method ICNTRL(6) )
+!         = 4 : simplified continuous adjoint ( with method ICNTRL(6) )
+!
+!    ICNTRL(6)  -> selection of a particular Rosenbrock method for the
+!                continuous adjoint integration - for cts adjoint it
+!                can be different than the forward method ICNTRL(4)
+!         Note 1: to avoid interpolation errors (which can be huge!) 
+!                   it is recommended to use only ICNTRL(6) = 1 or 4
+!         Note 2: the performance of the full continuous adjoint
+!                   strongly depends on the forward solution accuracy Abs/RelTol
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO 
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!          
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMin,upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!            (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller 
+!         than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to RosenbrockSOA adds the corrent no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the 
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~>  Arguments   
+   INTEGER, INTENT(IN)     :: NSOA
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+   KPP_REAL, INTENT(INOUT) :: Y_tlm(NVAR,NSOA)
+   KPP_REAL, INTENT(INOUT) :: Y_adj(NVAR)
+   KPP_REAL, INTENT(INOUT) :: Y_soa(NVAR,NSOA)
+   KPP_REAL, INTENT(IN)    :: Tstart, Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(NVAR),RelTol(NVAR)
+   INTEGER, INTENT(IN)     :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER, INTENT(INOUT)  :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)    :: IERR
+!~~~>  The method parameters   
+   INTEGER, PARAMETER :: Smax = 6
+   INTEGER  :: Method, ros_S
+   KPP_REAL, DIMENSION(Smax) :: ros_M, ros_E, ros_Alpha, ros_Gamma
+   KPP_REAL, DIMENSION(Smax*(Smax-1)/2) :: ros_A, ros_C
+   KPP_REAL :: ros_ELO
+   LOGICAL, DIMENSION(Smax) :: ros_NewF
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Local variables     
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart, Hexit
+   KPP_REAL :: T
+   INTEGER :: i, UplimTol, Max_no_steps
+   LOGICAL :: Autonomous, VectorTol
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>   Functions
+   EXTERNAL ode_Fun, ode_Jac, ode_Hess
+
+!~~~>  Initialize statistics
+   Nfun = ISTATUS(ifun)
+   Njac = ISTATUS(ijac)
+   Nstp = ISTATUS(istp)
+   Nacc = ISTATUS(iacc)
+   Nrej = ISTATUS(irej)
+   Ndec = ISTATUS(idec)
+   Nsol = ISTATUS(isol)
+   Nsng = ISTATUS(isng)
+   
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  
+!               the code uses AbsTol(1) and RelTol(1)
+!      For Vector tolerances (ICNTRL(2) == 0) 
+!               the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+         UplimTol  = NVAR
+   ELSE 
+      VectorTol = .FALSE.
+         UplimTol  = 1
+   END IF
+   
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(3) == 0) THEN
+      Max_no_steps = bufsize - 1
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(3)
+   ELSE 
+      PRINT * ,'User-selected max no. of steps: ICNTRL(3)=',ICNTRL(3)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+
+!~~~>  The particular Rosenbrock method chosen
+   IF (ICNTRL(4) == 0) THEN
+      Method = 5
+   ELSEIF ( (ICNTRL(4) >= 1).AND.(ICNTRL(4) <= 5) ) THEN
+      Method = ICNTRL(4)
+   ELSE  
+      PRINT * , 'User-selected Rosenbrock method: ICNTRL(4)=', Method
+      CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+
+ 
+!~~~>  Unit roundoff (1+Roundoff>1)  
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN 
+      Hmin = RCNTRL(1)
+   ELSE  
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax 
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2d0
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE  
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0d0
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE  
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1d0
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE  
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9d0
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.d0*Roundoff) &
+         .OR. (RelTol(i) >= 1.0d0) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+     
+ 
+!~~~>   Initialize the particular RosenbrockSOA method
+   SELECT CASE (Method)
+     CASE (1)
+       CALL Ros2(ros_S, ros_A, ros_C, ros_M, ros_E,   & 
+          ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+     CASE (2)
+       CALL Ros3(ros_S, ros_A, ros_C, ros_M, ros_E,   & 
+          ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+     CASE (3)
+       CALL Ros4(ros_S, ros_A, ros_C, ros_M, ros_E,   & 
+          ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+     CASE (4)
+       CALL Rodas3(ros_S, ros_A, ros_C, ros_M, ros_E, & 
+          ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+     CASE (5)
+       CALL Rodas4(ros_S, ros_A, ros_C, ros_M, ros_E, & 
+          ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(4)=', Method
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR) 
+       RETURN     
+   END SELECT
+ 
+!~~~>  Allocate checkpoint space or open checkpoint files
+   CALL ros_AllocateDBuffers( ros_S )
+   
+!~~~>  Forward Rosenbrock and TLM integration   
+   CALL ros_TlmInt (NSOA, Y, Y_tlm,              &
+        Tstart, Tend, T,                         &
+        AbsTol, RelTol,                          &
+        ode_Fun, ode_Jac, ode_Hess,              &
+!~~~> Rosenbrock method coefficients     
+        ros_S, ros_M, ros_E, ros_A, ros_C,       &
+        ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, &
+!~~~> Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart, Hexit,     &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!~~~> Error indicator
+        IERR )
+
+   PRINT*,'FORWARD STATISTICS'
+   PRINT*,'Step=',Nstp,' Acc=',Nacc,             &
+        ' Rej=',Nrej, ' Singular=',Nsng
+   Nstp = 0
+   Nacc = 0
+   Nrej = 0
+   Nsng = 0
+
+!~~~>  If Forward integration failed return   
+   IF (IERR<0) RETURN
+
+!~~~>  Backward ADJ and SOADJ Rosenbrock integration   
+   CALL ros_SoaInt (                             &
+        NSOA, Y_adj, Y_soa,                      &
+        Tstart, Tend, T,                         &
+        AbsTol, RelTol,                          &
+        ode_Fun, ode_Jac, ode_Hess,              &
+!~~~> RosenbrockSOA method coefficients     
+        ros_S, ros_M, ros_E, ros_A, ros_C,       &
+        ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, &
+!~~~> Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart,            &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!~~~> Error indicator
+        IERR )
+
+
+   PRINT*,'ADJOINT STATISTICS'
+   PRINT*,'Step=',Nstp,' Acc=',Nacc,             &
+        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  Free checkpoint space or close checkpoint files
+   CALL ros_FreeDBuffers
+
+!~~~>  Collect run statistics
+   ISTATUS(ifun) = Nfun
+   ISTATUS(ijac) = Njac
+   ISTATUS(istp) = Nstp
+   ISTATUS(iacc) = Nacc
+   ISTATUS(irej) = Nrej
+   ISTATUS(idec) = Ndec
+   ISTATUS(isol) = Nsol
+   ISTATUS(isng) = Nsng
+!~~~> Last T and H
+   RSTATUS(itexit) = T
+   RSTATUS(ihexit) = Hexit    
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ END SUBROUTINE RosenbrockSOA
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RosenbrockSOA due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected RosenbrockSOA method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-9)    
+      PRINT * , '--> Improper type of adjoint selected'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+   
+     
+     
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_TlmInt (NSOA, Y, Y_tlm,          &
+        Tstart, Tend, T,                         &
+        AbsTol, RelTol,                          &
+        ode_Fun, ode_Jac, ode_Hess,              &
+!~~~> Rosenbrock method coefficients     
+        ros_S, ros_M, ros_E, ros_A, ros_C,       &
+        ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, &
+!~~~> Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart, Hexit,     &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+!~~~> Input: Number of sensitivity coefficients
+   INTEGER, INTENT(IN) :: NSOA 
+!~~~> Input: the initial sensitivites at Tstart; Output: the sensitivities at T   
+   KPP_REAL, INTENT(INOUT) :: Y_tlm(NVAR,NSOA)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Input: tolerances      
+   KPP_REAL, INTENT(IN) ::  AbsTol(NVAR), RelTol(NVAR)
+!~~~> Input: ode function and its Jacobian      
+   EXTERNAL ode_Fun, ode_Jac, ode_Hess
+!~~~> Input: The Rosenbrock method parameters   
+   INTEGER, INTENT(IN) ::  ros_S
+   KPP_REAL, INTENT(IN) :: ros_M(ros_S), ros_E(ros_S),  & 
+       ros_Alpha(ros_S), ros_A(ros_S*(ros_S-1)/2),      &
+       ros_Gamma(ros_S), ros_C(ros_S*(ros_S-1)/2), ros_ELO
+   LOGICAL, INTENT(IN) :: ros_NewF(ros_S)
+!~~~> Input: integration parameters   
+   LOGICAL, INTENT(IN) :: Autonomous, VectorTol
+   KPP_REAL, INTENT(IN) :: Hstart, Hmin, Hmax
+   INTEGER, INTENT(IN) :: Max_no_steps
+   KPP_REAL, INTENT(IN) :: Roundoff, FacMin, FacMax, FacRej, FacSafe 
+!~~~> Output: last accepted step   
+   KPP_REAL, INTENT(OUT) :: Hexit 
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ystage(NVAR*ros_S), Fcn0(NVAR), Fcn(NVAR) 
+   KPP_REAL :: K(NVAR*ros_S), Tmp(NVAR)
+   KPP_REAL :: Ystage_tlm(NVAR*ros_S,NSOA), Fcn0_tlm(NVAR,NSOA), Fcn_tlm(NVAR,NSOA) 
+   KPP_REAL :: K_tlm(NVAR*ros_S,NSOA)
+   KPP_REAL :: Hes0(NHESS)
+   KPP_REAL :: dFdT(NVAR), dJdT(LU_NONZERO)
+   KPP_REAL :: Jac0(LU_NONZERO), Jac(LU_NONZERO), Ghimj(LU_NONZERO)
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Yerr(NVAR), Ynew(NVAR), Ynew_tlm(NVAR,NSOA)
+   INTEGER :: Pivot(NVAR), Direction, ioffset, joffset, j, istage, mtlm
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>  Locally called functions
+!   KPP_REAL WLAMCH
+!   EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  Initial preparations
+   T = Tstart
+   Hexit = 0.0_dp
+   H = MIN(Hstart,Hmax) 
+   IF (ABS(H) <= 10.D0*Roundoff) H = DeltaMin
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( Nstp > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   Hexit = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL ode_Fun(T,Y,Fcn0)
+  
+!~~~>   Compute the Jacobian at current time
+   CALL ode_Jac(T,Y,Jac0)
+  
+!~~~>   Compute the Hessian at current time
+   CALL ode_Hess(T,Y,Hes0)
+   
+!~~~>   Compute the TLM function at current time
+   DO mtlm = 1, NSOA
+      CALL Jac_SP_Vec ( Jac0, Y_tlm(1:NVAR,mtlm), Fcn0_tlm(1:NVAR,mtlm) )
+   END DO  
+   
+!~~~>  Compute the function and Jacobian derivatives with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, ode_Fun, dFdT )
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y, &
+                Jac0, ode_Jac, dJdT )
+   END IF
+ 
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1),&
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage vector is K(ioffset+1:ioffset+NVAR:ioffset+1+NVAR-1)
+       ioffset = NVAR*(istage-1)
+         
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         CALL WCOPY(NVAR,Y,1,Ystage(ioffset+1:ioffset+NVAR),1)
+         DO mtlm=1,NSOA                    
+            CALL WCOPY(NVAR,Y_tlm(1:NVAR,mtlm),1,Ystage_tlm(ioffset+1:ioffset+NVAR,mtlm),1)
+         END DO                    
+         CALL WCOPY(NVAR,Fcn0,1,Fcn,1)
+         CALL WCOPY(NVAR*NSOA,Fcn0_tlm,1,Fcn_tlm,1)
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR,Y,1,Ystage(ioffset+1:ioffset+NVAR),1)
+         DO mtlm=1,NSOA                    
+            CALL WCOPY(NVAR,Y_tlm(1:NVAR,mtlm),1,Ystage_tlm(ioffset+1:ioffset+NVAR,mtlm),1)
+         END DO                    
+         DO j = 1, istage-1
+           joffset = NVAR*(j-1)
+           CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j),    &
+                     K(joffset+1:joffset+NVAR),1,Ystage(ioffset+1:ioffset+NVAR),1) 
+           DO mtlm=1,NSOA                    
+              CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+                     K_tlm(joffset+1:joffset+NVAR,mtlm),1,Ystage_tlm(ioffset+1:ioffset+NVAR,mtlm),1) 
+           END DO                    
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL ode_Fun(Tau,Ystage(ioffset+1:ioffset+NVAR),Fcn)
+         CALL ode_Jac(Tau,Ystage(ioffset+1:ioffset+NVAR),Jac)
+         DO mtlm=1,NSOA 
+           CALL Jac_SP_Vec ( Jac, Ystage_tlm(ioffset+1:ioffset+NVAR,mtlm), Fcn_tlm(1:NVAR,mtlm) )
+         END DO              
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+       
+       CALL WCOPY(NVAR,Fcn,1,K(ioffset+1:ioffset+NVAR),1)
+       DO mtlm=1,NSOA   
+          CALL WCOPY(NVAR,Fcn_tlm(1:NVAR,mtlm),1,K_tlm(ioffset+1:ioffset+NVAR,mtlm),1)
+       END DO                
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1:NVAR*j),1,K(ioffset+1:ioffset+NVAR),1)
+         DO mtlm=1,NSOA 
+           CALL WAXPY(NVAR,HC,K_tlm(NVAR*(j-1)+1:NVAR*j,mtlm),1,K_tlm(ioffset+1:ioffset+NVAR,mtlm),1)
+         END DO              
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(NVAR,HG,dFdT,1,K(ioffset+1:ioffset+NVAR),1)
+         DO mtlm=1,NSOA 
+           CALL Jac_SP_Vec ( dJdT, Ystage_tlm(ioffset+1:ioffset+NVAR,mtlm), Fcn_tlm(1:NVAR,mtlm) )
+           CALL WAXPY(NVAR,HG,Fcn_tlm(1:NVAR,mtlm),1,K_tlm(ioffset+1:ioffset+NVAR,mtlm),1)
+         END DO              
+       END IF
+       CALL ros_Solve('N', Ghimj, Pivot, K(ioffset+1:ioffset+NVAR))
+       DO mtlm=1,NSOA   
+         CALL Hess_Vec ( Hes0,  K(ioffset+1:ioffset+NVAR), Y_tlm(1:NVAR,mtlm), Tmp )
+         CALL WAXPY(NVAR,ONE,Tmp,1,K_tlm(ioffset+1:ioffset+NVAR,mtlm),1)
+         CALL ros_Solve('N', Ghimj, Pivot, K_tlm(ioffset+1:ioffset+NVAR,mtlm))
+       END DO                
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   CALL WCOPY(NVAR,Y,1,Ynew,1)
+   DO j=1,ros_S
+      CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1:NVAR*j),1,Ynew,1)
+   END DO
+   DO mtlm=1,NSOA       
+     CALL WCOPY(NVAR,Y_tlm(1:NVAR,mtlm),1,Ynew_tlm(1:NVAR,mtlm),1)
+     DO j=1,ros_S
+       joffset = NVAR*(j-1)
+       CALL WAXPY(NVAR,ros_M(j),K_tlm(joffset+1:joffset+NVAR,mtlm),1,Ynew_tlm(1:NVAR,mtlm),1)
+     END DO
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL WSCAL(NVAR,ZERO,Yerr,1)
+   DO j=1,ros_S     
+        CALL WAXPY(NVAR,ros_E(j),K(NVAR*(j-1)+1:NVAR*j),1,Yerr,1)
+   END DO 
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+   Nstp = Nstp+1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      Nacc = Nacc+1
+      !~~~>  Checkpoints for stage values and vectors
+      CALL ros_DPush( ros_S, NSOA, T, H, Ystage, K, Ystage_tlm, K_tlm )
+      !~~~>  Accept new solution, etc.
+      CALL WCOPY(NVAR,Ynew,1,Y,1)
+      CALL WCOPY(NVAR*NSOA,Ynew_tlm,1,Y_tlm,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (Nacc >= 1) THEN
+         Nrej = Nrej+1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_TlmInt
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+   
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_SoaInt (                         &
+        NSOA, Lambda, Sigma,                     &
+        Tstart, Tend, T,                         &
+        AbsTol, RelTol,                          &
+        ode_Fun, ode_Jac, ode_Hess,              &
+!~~~> RosenbrockSOA method coefficients     
+        ros_S, ros_M, ros_E, ros_A, ros_C,       &
+        ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, &
+!~~~> Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart,            &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockSOA method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN)     :: NSOA
+!~~~> First order adjoint   
+   KPP_REAL, INTENT(INOUT) :: Lambda(NVAR)
+!~~~> Second order adjoint   
+   KPP_REAL, INTENT(INOUT) :: Sigma(NVAR,NSOA)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Input: tolerances      
+   KPP_REAL, INTENT(IN) ::  AbsTol(NVAR), RelTol(NVAR)
+!~~~> Input: ode function and its Jacobian      
+   EXTERNAL ode_Fun, ode_Jac, ode_Hess
+!~~~> Input: The RosenbrockSOA method parameters   
+   INTEGER, INTENT(IN) ::  ros_S
+   KPP_REAL, INTENT(IN) :: ros_M(ros_S), ros_E(ros_S),  & 
+       ros_Alpha(ros_S), ros_A(ros_S*(ros_S-1)/2),      &
+       ros_Gamma(ros_S), ros_C(ros_S*(ros_S-1)/2), ros_ELO
+   LOGICAL, INTENT(IN) :: ros_NewF(ros_S)
+!~~~> Input: integration parameters   
+   LOGICAL, INTENT(IN) :: Autonomous, VectorTol
+   KPP_REAL, INTENT(IN) :: Hstart, Hmin, Hmax
+   INTEGER, INTENT(IN) :: Max_no_steps
+   KPP_REAL, INTENT(IN) :: Roundoff, FacMin, FacMax, FacRej, FacSafe 
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   !KPP_REAL :: Ystage_adj(NVAR,NSOA)
+   !KPP_REAL :: dFdT(NVAR)
+   KPP_REAL :: Ystage(NVAR*ros_S), K(NVAR*ros_S)
+   KPP_REAL :: Ystage_tlm(NVAR*ros_S,NSOA), K_tlm(NVAR*ros_S,NSOA)
+   KPP_REAL :: U(NVAR*ros_S), V(NVAR*ros_S)
+   KPP_REAL :: W(NVAR*ros_S,NSOA), Z(NVAR*ros_S,NSOA)
+   KPP_REAL :: Jac(LU_NONZERO), dJdT(LU_NONZERO), Ghimj(LU_NONZERO)
+   KPP_REAL :: Hes0(NHESS), Hes1(NHESS), dHdT(NHESS)
+   KPP_REAL :: Tmp(NVAR), Tmp2(NVAR)
+   KPP_REAL :: H, HC, HA, Tau 
+   INTEGER :: Pivot(NVAR), Direction, i, ioffset, joffset
+   INTEGER :: msoa, j, istage
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>  Locally called functions
+!    KPP_REAL WLAMCH
+!   EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+
+!~~~> Time loop begins below 
+TimeLoop: DO WHILE ( stack_ptr > 0 )
+        
+   !~~~>  Recover checkpoints for stage values and vectors
+   CALL ros_DPop( ros_S, NSOA, T, H, Ystage, K, Ystage_tlm, K_tlm )
+
+   Nstp = Nstp+1
+
+!~~~>    Compute LU decomposition 
+   CALL ode_Jac(T,Ystage(1:NVAR),Ghimj)
+   CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+   Tau = ONE/(Direction*H*ros_Gamma(1))
+   DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+Tau
+   END DO
+   CALL ros_Decomp( Ghimj, Pivot, j )
+            
+!~~~>   Compute Hessian at the beginning of the interval
+   CALL ode_Hess(T,Ystage(1),Hes0)
+   
+!~~~>   Compute the stages
+Stage: DO istage = ros_S, 1, -1
+      
+      !~~~> Current istage offset. 
+       ioffset = NVAR*(istage-1)
+      
+      !~~~> Compute U
+       CALL WCOPY(NVAR,Lambda,1,U(ioffset+1:ioffset+NVAR),1)
+       CALL WSCAL(NVAR,ros_M(istage),U(ioffset+1:ioffset+NVAR),1)
+       DO j = istage+1, ros_S
+         joffset = NVAR*(j-1)
+         HA = ros_A((j-1)*(j-2)/2+istage)
+         HC = ros_C((j-1)*(j-2)/2+istage)/(Direction*H)
+         CALL WAXPY(NVAR,HA,V(joffset+1:joffset+NVAR),1,U(ioffset+1:ioffset+NVAR),1) 
+         CALL WAXPY(NVAR,HC,U(joffset+1:joffset+NVAR),1,U(ioffset+1:ioffset+NVAR),1) 
+       END DO
+       CALL ros_Solve('T', Ghimj, Pivot, U(ioffset+1:ioffset+NVAR))
+      !~~~> Compute W
+       DO msoa = 1, NSOA
+         CALL WCOPY(NVAR,Sigma(1:NVAR,msoa),1,W(ioffset+1:ioffset+NVAR,msoa),1)
+         CALL WSCAL(NVAR,ros_M(istage),W(ioffset+1:ioffset+NVAR,msoa),1)
+       END DO
+       DO j = istage+1, ros_S
+         joffset = NVAR*(j-1)
+         HA = ros_A((j-1)*(j-2)/2+istage)
+         HC = ros_C((j-1)*(j-2)/2+istage)/(Direction*H)
+         DO msoa = 1, NSOA
+           CALL WAXPY(NVAR,HA,   &
+               Z(joffset+1:joffset+NVAR,msoa),1,W(ioffset+1:ioffset+NVAR,msoa),1) 
+           CALL WAXPY(NVAR,HC,   &
+               W(joffset+1:joffset+NVAR,msoa),1,W(ioffset+1:ioffset+NVAR,msoa),1) 
+         END DO
+       END DO
+       DO msoa = 1, NSOA
+         CALL HessTR_Vec( Hes0, U(ioffset+1:ioffset+NVAR), Ystage_tlm(ioffset+1:ioffset+NVAR,msoa), Tmp )
+         CALL WAXPY(NVAR,ONE,Tmp,1,W(ioffset+1:ioffset+NVAR,msoa),1)
+         CALL ros_Solve('T', Ghimj, Pivot, W(ioffset+1:ioffset+NVAR,msoa))
+       END DO       
+      !~~~> Compute V 
+       Tau = T + ros_Alpha(istage)*Direction*H
+       CALL ode_Jac(Tau,Ystage(ioffset+1:ioffset+NVAR),Jac)
+       CALL JacTR_SP_Vec(Jac,U(ioffset+1:ioffset+NVAR),V(ioffset+1:ioffset+NVAR)) 
+      !~~~> Compute Z 
+       CALL ode_Hess(T,Ystage(ioffset+1:ioffset+NVAR),Hes1)
+       DO msoa = 1, NSOA
+         CALL JacTR_SP_Vec(Jac,W(ioffset+1:ioffset+NVAR,msoa),Z(ioffset+1:ioffset+NVAR,msoa)) 
+         CALL HessTR_Vec( Hes1, U(ioffset+1:ioffset+NVAR), Ystage_tlm(ioffset+1:ioffset+NVAR,msoa), Tmp )
+         CALL WAXPY(NVAR,ONE,Tmp,1,Z(ioffset+1:ioffset+NVAR,msoa),1)
+       END DO  
+             
+   END DO Stage     
+
+   IF (.NOT.Autonomous) THEN
+!~~~>  Compute the Jacobian derivative with respect to T. 
+!      Last "Jac" computed for stage 1
+      CALL ros_JacTimeDerivative ( T, Roundoff, Ystage(1),        &
+                Jac, ode_Jac, dJdT )
+!~~~>  Compute the Hessian derivative with respect to T. 
+!      Last "Jac" computed for stage 1
+      CALL ros_HesTimeDerivative ( T, Roundoff, Ystage(1),        &
+                Hes0, ode_Hess, dHdT )
+   END IF
+
+!~~~>  Compute the new solution 
+   
+      !~~~>  Compute Lambda 
+      DO istage=1,ros_S
+         ioffset = NVAR*(istage-1)
+         ! Add V_i
+         CALL WAXPY(NVAR,ONE,V(ioffset+1:ioffset+NVAR),1,Lambda,1)
+         ! Add (H0xK_i)^T * U_i
+         CALL HessTR_Vec ( Hes0, U(ioffset+1:ioffset+NVAR), K(ioffset+1:ioffset+NVAR), Tmp )
+         CALL WAXPY(NVAR,ONE,Tmp,1,Lambda,1)
+      END DO
+     ! Add H * dJac_dT_0^T * \sum(gamma_i U_i)
+     ! Tmp holds sum gamma_i U_i
+      IF (.NOT.Autonomous) THEN
+        Tmp(1:NVAR) = ZERO
+        DO istage = 1, ros_S
+          ioffset = NVAR*(istage-1)
+          CALL WAXPY(NVAR,ros_Gamma(istage),U(ioffset+1:ioffset+NVAR),1,Tmp,1)
+        END DO  
+        CALL JacTR_SP_Vec(dJdT,Tmp,Tmp2) 
+        CALL WAXPY(NVAR,H,Tmp2,1,Lambda,1)
+      END IF ! .NOT.Autonomous
+      
+      !~~~>  Compute Sigma 
+    DO msoa = 1, NSOA
+    
+      DO istage=1,ros_S
+         ioffset = NVAR*(istage-1)
+         ! Add Z_i
+         CALL WAXPY(NVAR,ONE,Z(ioffset+1:ioffset+NVAR,msoa),1,Sigma(1:NVAR,msoa),1)
+         ! Add (Hess_0 x K_i)^T * W_i
+         CALL HessTR_Vec ( Hes0, W(ioffset+1:ioffset+NVAR,msoa), K(ioffset+1:ioffset+NVAR), Tmp )
+         CALL WAXPY(NVAR,ONE,Tmp,1,Sigma(1:NVAR,msoa),1)
+         ! Add (Hess_0 x K_tlm_i)^T * U_i
+         CALL HessTR_Vec ( Hes0, U(ioffset+1:ioffset+NVAR), K_tlm(ioffset+1:ioffset+NVAR,msoa), Tmp )
+         CALL WAXPY(NVAR,ONE,Tmp,1,Sigma(1:NVAR,msoa),1)
+      END DO  
+      
+      !~~~> Add high derivative terms
+      DO istage=1,ros_S
+         ioffset = NVAR*(istage-1)
+         CALL ros_HighDerivative ( T, Roundoff, Ystage(1), Hes0, K(ioffset+1:ioffset+NVAR), &
+                 U(ioffset+1:ioffset+NVAR), Ystage_tlm(1:NVAR,msoa), ode_Hess, Tmp)
+         CALL WAXPY(NVAR,ONE,Tmp,1,Sigma(1:NVAR,msoa),1)
+      END DO  
+
+      IF (.NOT.Autonomous) THEN
+        ! Add H * dJac_dT_0^T * \sum(gamma_i W_i)
+        ! Tmp holds sum gamma_i W_i
+        Tmp(1:NVAR) = ZERO
+        DO istage = 1, ros_S
+          ioffset = NVAR*(istage-1)
+          CALL WAXPY(NVAR,ros_Gamma(istage),W(ioffset+1:ioffset+NVAR,msoa),1,Tmp,1)
+        END DO  
+        CALL JacTR_SP_Vec(dJdT,Tmp,Tmp2) 
+        CALL WAXPY(NVAR,H,Tmp2,1,Sigma(1:NVAR,msoa),1)
+        ! Add H * ( dHess_dT_0 x Y_tlm_0)^T * \sum(gamma_i U_i)
+        ! Tmp holds sum gamma_i U_i
+        Tmp(1:NVAR) = ZERO
+        DO istage = 1, ros_S
+          ioffset = NVAR*(istage-1)
+          CALL WAXPY(NVAR,ros_Gamma(istage),U(ioffset+1:ioffset+NVAR),1,Tmp,1)
+        END DO  
+        CALL HessTR_Vec ( dHdT, Tmp, Ystage_tlm(ioffset+1:ioffset+NVAR,msoa), Tmp2 )
+        CALL WAXPY(NVAR,H,Tmp2,1,Sigma(1:NVAR,msoa),1)
+      END IF ! .NOT.Autonomous
+      
+    END DO ! msoa
+
+
+   END DO TimeLoop 
+   
+!~~~> Save last state
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_SoaInt
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+   
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, & 
+               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y(NVAR), Ynew(NVAR),    &
+          Yerr(NVAR), AbsTol(NVAR), RelTol(NVAR)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: Err, Scale, Ymax   
+   INTEGER  :: i
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0
+   
+   Err = ZERO
+   DO i=1,NVAR
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/NVAR)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END FUNCTION ros_ErrorNorm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, ode_Fun, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR), Fcn0(NVAR) 
+   EXTERNAL ode_Fun
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dFdT(NVAR)   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL ode_Fun(T+Delta,Y,dFdT)
+   CALL WAXPY(NVAR,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(NVAR,(ONE/Delta),dFdT,1)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_FunTimeDerivative
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_JacTimeDerivative ( T, Roundoff, Y, &
+                Jac0, ode_Jac, dJdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the Jacobian by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR), Jac0(LU_NONZERO) 
+   EXTERNAL ode_Jac
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dJdT(LU_NONZERO)   
+!~~~> Local variables     
+   KPP_REAL Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL ode_Jac( T+Delta, Y, dJdT )   
+   CALL WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_JacTimeDerivative
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_HesTimeDerivative ( T, Roundoff, Y, Hes0, ode_Hess, dHdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the Hessian by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR), Hes0(NHESS) 
+   EXTERNAL ode_Hess
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dHdT(NHESS)   
+!~~~> Local variables     
+   KPP_REAL Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL ode_Hess( T+Delta, Y, dHdT )   
+   CALL WAXPY(NHESS,(-ONE),Hes0,1,dHdT,1)
+   CALL WSCAL(NHESS,(ONE/Delta),dHdT,1)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_HesTimeDerivative
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_HighDerivative ( T, Roundoff, Y, Hes0, K, U, Y_tlm, &
+                                  ode_Hess, Term)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> High order derivative by finite differences:
+!     d/dy { (Hes0 x K_i)^T * U_i } * Y_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR), Hes0(NHESS) 
+   KPP_REAL, INTENT(IN) :: K(NVAR), U(NVAR), Y_tlm(NVAR) 
+   EXTERNAL ode_Hess
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: Term(NVAR)   
+!~~~> Local variables     
+   KPP_REAL :: Delta, Y1(NVAR), Hes1(NHESS), Tmp(NVAR)  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   CALL HessTR_Vec ( Hes0, U, K, Tmp )
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   Y1(1:NVAR) = Y(1:NVAR) + Delta*Y_tlm(1:NVAR)
+   CALL ode_Hess( T, Y1, Hes1 )   
+   ! Add (Hess_0 x K_i)^T * U_i
+   CALL HessTR_Vec ( Hes1, U, K, Term )
+
+   CALL WAXPY(NVAR,(-ONE),Tmp,1,Term,1)
+   CALL WSCAL(NVAR,(ONE/Delta),Term,1)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_HighDerivative
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE         
+   
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) ::  gam, Jac0(LU_NONZERO)
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(NVAR)
+!~~~> Inout arguments   
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables     
+   INTEGER  :: i, ising, Nconsecutive
+   KPP_REAL ::  ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0d0, HALF = 0.5d0
+   
+   Nconsecutive = 0
+   Singular = .TRUE.
+   
+   DO WHILE (Singular)
+   
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+!~~~>    Compute LU decomposition 
+     CALL ros_Decomp( Ghimj, Pivot, ising )
+     IF (ising == 0) THEN
+!~~~>    If successful done 
+        Singular = .FALSE. 
+     ELSE ! ising .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        Nsng = Nsng+1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE. 
+        PRINT*,'Warning: LU Decomposition returned ising = ',ising
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decomps
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ising 
+         
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Decomp( A, Pivot, ising )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the LU decomposition   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Inout variables     
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+!~~~> Output variables     
+   INTEGER, INTENT(OUT) :: Pivot(NVAR), ising
+   
+   CALL KppDecomp ( A, ising )
+!~~~> Note: for a full matrix use Lapack:
+!     CALL  DGETRF( NVAR, NVAR, A, NVAR, Pivot, ising ) 
+   Pivot(1) = 1
+    
+   Ndec = Ndec + 1
+
+  END SUBROUTINE ros_Decomp
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Solve( C, A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the forward/backward substitution (using pre-computed LU decomp)   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+   IMPLICIT NONE
+!~~~> Input variables 
+   CHARACTER, INTENT(IN) :: C    
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+   INTEGER, INTENT(IN) :: Pivot(NVAR)
+!~~~> InOut variables     
+   KPP_REAL, INTENT(INOUT) :: b(NVAR)
+   
+   SELECT CASE (C)
+     CASE ('N')
+         CALL KppSolve( A, b )
+     CASE ('T')
+         CALL KppSolveTR( A, b, b )
+     CASE DEFAULT
+         PRINT*,'Unknown C = (',C,') in ros_Solve'
+         STOP
+   END SELECT
+!~~~> Note: for a full matrix use Lapack:
+!     NRHS = 1
+!     CALL  DGETRS( C, NVAR , NRHS, A, NVAR, Pivot, b, NVAR, INFO )
+     
+   Nsol = Nsol+1
+
+  END SUBROUTINE ros_Solve
+  
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros2 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,&
+            ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+  
+   INTEGER, PARAMETER :: S = 2
+   INTEGER, INTENT(OUT) ::  ros_S
+   KPP_REAL, DIMENSION(S), INTENT(OUT) :: ros_M,ros_E,ros_Alpha,ros_Gamma
+   KPP_REAL, DIMENSION(S*(S-1)/2), INTENT(OUT) :: ros_A, ros_C
+   KPP_REAL, INTENT(OUT) :: ros_ELO
+   LOGICAL, DIMENSION(S), INTENT(OUT) :: ros_NewF
+   CHARACTER(LEN=12), INTENT(OUT) :: ros_Name
+   KPP_REAL :: g
+   
+    g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+   
+!~~~> Name of the method
+    ros_Name = 'ROS-2'   
+!~~~> Number of stages
+    ros_S = S
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+   
+    ros_A(1) = (1.d0)/g
+    ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.d0)/(2.d0*g)
+    ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator    
+    ros_E(1) = 1.d0/(2.d0*g)
+    ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0d0
+    ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+   
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros3 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,&
+           ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  
+  IMPLICIT NONE
+  
+   INTEGER, PARAMETER :: S = 3
+   INTEGER, INTENT(OUT) ::  ros_S
+   KPP_REAL, DIMENSION(S), INTENT(OUT) :: ros_M,ros_E,ros_Alpha,ros_Gamma
+   KPP_REAL, DIMENSION(S*(S-1)/2), INTENT(OUT) :: ros_A, ros_C
+   KPP_REAL, INTENT(OUT) :: ros_ELO
+   LOGICAL, DIMENSION(S), INTENT(OUT) :: ros_NewF
+   CHARACTER(LEN=12), INTENT(OUT) :: ros_Name
+   
+!~~~> Name of the method
+   ros_Name = 'ROS-3'   
+!~~~> Number of stages
+   ros_S = S
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1)= 1.d0
+   ros_A(2)= 1.d0
+   ros_A(3)= 0.d0
+
+   ros_C(1) = -0.10156171083877702091975600115545d+01
+   ros_C(2) =  0.40759956452537699824805835358067d+01
+   ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1d+01
+   ros_M(2) =  0.61697947043828245592553615689730d+01
+   ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator    
+   ros_E(1) =  0.5d+00
+   ros_E(2) = -0.29079558716805469821718236208017d+01
+   ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0d+00
+   ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+   ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+   ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+   ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros4 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,&
+           ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+  
+   INTEGER, PARAMETER :: S=4
+   INTEGER, INTENT(OUT) ::  ros_S
+   KPP_REAL, DIMENSION(S), INTENT(OUT) :: ros_M,ros_E,ros_Alpha,ros_Gamma
+   KPP_REAL, DIMENSION(S*(S-1)/2), INTENT(OUT) :: ros_A, ros_C
+   KPP_REAL, INTENT(OUT) :: ros_ELO
+   LOGICAL, DIMENSION(S), INTENT(OUT) :: ros_NewF
+   CHARACTER(LEN=12), INTENT(OUT) :: ros_Name
+   
+   
+!~~~> Name of the method
+   ros_Name = 'ROS-4'   
+!~~~> Number of stages
+   ros_S = S
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1) = 0.2000000000000000d+01
+   ros_A(2) = 0.1867943637803922d+01
+   ros_A(3) = 0.2344449711399156d+00
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0D0
+
+   ros_C(1) =-0.7137615036412310d+01
+   ros_C(2) = 0.2580708087951457d+01
+   ros_C(3) = 0.6515950076447975d+00
+   ros_C(4) =-0.2137148994382534d+01
+   ros_C(5) =-0.3214669691237626d+00
+   ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735d+01
+   ros_M(2) = 0.2870493262186792d+00
+   ros_M(3) = 0.4353179431840180d+00
+   ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) =-0.2815431932141155d+00
+   ros_E(2) =-0.7276199124938920d-01
+   ros_E(3) =-0.1082196201495311d+00
+   ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.D0
+   ros_Alpha(2) = 0.1145640000000000d+01
+   ros_Alpha(3) = 0.6552168638155900d+00
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5728200000000000d+00
+   ros_Gamma(2) =-0.1769193891319233d+01
+   ros_Gamma(3) = 0.7592633437920482d+00
+   ros_Gamma(4) =-0.1049021087100450d+00
+
+  END SUBROUTINE Ros4
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rodas3 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,&
+            ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+  
+   INTEGER, PARAMETER :: S=4
+   INTEGER, INTENT(OUT) ::  ros_S
+   KPP_REAL, DIMENSION(S), INTENT(OUT) :: ros_M,ros_E,ros_Alpha,ros_Gamma
+   KPP_REAL, DIMENSION(S*(S-1)/2), INTENT(OUT) :: ros_A, ros_C
+   KPP_REAL, INTENT(OUT) :: ros_ELO
+   LOGICAL, DIMENSION(S), INTENT(OUT) :: ros_NewF
+   CHARACTER(LEN=12), INTENT(OUT) :: ros_Name
+   
+   
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'   
+!~~~> Number of stages
+   ros_S = S
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+   ros_A(1) = 0.0d+00
+   ros_A(2) = 2.0d+00
+   ros_A(3) = 0.0d+00
+   ros_A(4) = 2.0d+00
+   ros_A(5) = 0.0d+00
+   ros_A(6) = 1.0d+00
+
+   ros_C(1) = 4.0d+00
+   ros_C(2) = 1.0d+00
+   ros_C(3) =-1.0d+00
+   ros_C(4) = 1.0d+00
+   ros_C(5) =-1.0d+00 
+   ros_C(6) =-(8.0d+00/3.0d+00) 
+         
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0d+00
+   ros_M(2) = 0.0d+00
+   ros_M(3) = 1.0d+00
+   ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) = 0.0d+00
+   ros_E(2) = 0.0d+00
+   ros_E(3) = 0.0d+00
+   ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0d+00    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0d+00
+   ros_Alpha(2) = 0.0d+00
+   ros_Alpha(3) = 1.0d+00
+   ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5d+00
+   ros_Gamma(2) = 1.5d+00
+   ros_Gamma(3) = 0.0d+00
+   ros_Gamma(4) = 0.0d+00
+
+  END SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rodas4 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,&
+             ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+  
+   INTEGER, PARAMETER :: S=6
+   INTEGER, INTENT(OUT) ::  ros_S
+   KPP_REAL, DIMENSION(S), INTENT(OUT) :: ros_M,ros_E,ros_Alpha,ros_Gamma
+   KPP_REAL, DIMENSION(S*(S-1)/2), INTENT(OUT) :: ros_A, ros_C
+   KPP_REAL, INTENT(OUT) :: ros_ELO
+   LOGICAL, DIMENSION(S), INTENT(OUT) :: ros_NewF
+   CHARACTER(LEN=12), INTENT(OUT) :: ros_Name
+   
+
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'   
+!~~~> Number of stages
+    ros_S = S
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000d0
+    ros_Alpha(2) = 0.386d0
+    ros_Alpha(3) = 0.210d0 
+    ros_Alpha(4) = 0.630d0
+    ros_Alpha(5) = 1.000d0
+    ros_Alpha(6) = 1.000d0
+        
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = 0.2500000000000000d+00
+    ros_Gamma(2) =-0.1043000000000000d+00
+    ros_Gamma(3) = 0.1035000000000000d+00
+    ros_Gamma(4) =-0.3620000000000023d-01
+    ros_Gamma(5) = 0.0d0
+    ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+    ros_A(1) = 0.1544000000000000d+01
+    ros_A(2) = 0.9466785280815826d+00
+    ros_A(3) = 0.2557011698983284d+00
+    ros_A(4) = 0.3314825187068521d+01
+    ros_A(5) = 0.2896124015972201d+01
+    ros_A(6) = 0.9986419139977817d+00
+    ros_A(7) = 0.1221224509226641d+01
+    ros_A(8) = 0.6019134481288629d+01
+    ros_A(9) = 0.1253708332932087d+02
+    ros_A(10) =-0.6878860361058950d+00
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0d+00
+
+    ros_C(1) =-0.5668800000000000d+01
+    ros_C(2) =-0.2430093356833875d+01
+    ros_C(3) =-0.2063599157091915d+00
+    ros_C(4) =-0.1073529058151375d+00
+    ros_C(5) =-0.9594562251023355d+01
+    ros_C(6) =-0.2047028614809616d+02
+    ros_C(7) = 0.7496443313967647d+01
+    ros_C(8) =-0.1024680431464352d+02
+    ros_C(9) =-0.3399990352819905d+02
+    ros_C(10) = 0.1170890893206160d+02
+    ros_C(11) = 0.8083246795921522d+01
+    ros_C(12) =-0.7981132988064893d+01
+    ros_C(13) =-0.3152159432874371d+02
+    ros_C(14) = 0.1631930543123136d+02
+    ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0d+00
+    ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator    
+    ros_E(1) = 0.0d+00
+    ros_E(2) = 0.0d+00
+    ros_E(3) = 0.0d+00
+    ros_E(4) = 0.0d+00
+    ros_E(5) = 0.0d+00
+    ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0d0
+     
+  END SUBROUTINE Rodas4
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Fun_Template( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Input variables     
+   KPP_REAL T, Y(NVAR)
+!~~~> Output variables     
+   KPP_REAL Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL Told     
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+     
+   Nfun = Nfun+1
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE Fun_Template
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Jac_Template( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+!~~~> Input variables     
+    KPP_REAL T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL Jcb(LU_NONZERO)
+!~~~> Local variables
+    KPP_REAL Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+    TIME = Told
+     
+    Njac = Njac+1
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE Jac_Template                                      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Hess_Template( T, Y, Hes )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Hessian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Input variables     
+    KPP_REAL T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL Hes(NHESS)
+!~~~> Local variables
+    KPP_REAL Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Hessian( Y, FIX, RCONST, Hes )
+    TIME = Told
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE Hess_Template                                      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_AllocateDBuffers( S )
+!~~~>  Allocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i, S
+   
+   ALLOCATE( buf_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( buf_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( buf_Y(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( buf_K(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer K'; STOP
+   END IF   
+   ALLOCATE( buf_Y_tlm(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y_tlm'; STOP
+   END IF   
+   ALLOCATE( buf_K_tlm(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer K_tlm'; STOP
+   END IF   
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ END SUBROUTINE ros_AllocateDBuffers
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FreeDBuffers
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( buf_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( buf_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( buf_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( buf_K, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer K'; STOP
+   END IF   
+   DEALLOCATE( buf_Y_tlm, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y_tlm'; STOP
+   END IF   
+   DEALLOCATE( buf_K_tlm, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer K_tlm'; STOP
+   END IF   
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ END SUBROUTINE ros_FreeDBuffers
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_DPush( S, NSOA, T, H, Ystage, K, Ystage_tlm, K_tlm )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   INTEGER, INTENT(IN) :: S    ! no of stages
+   INTEGER, INTENT(IN) :: NSOA ! no of second order adjoints
+   KPP_REAL :: T, H, Ystage(NVAR*S), K(NVAR*S)
+   KPP_REAL :: Ystage_tlm(NVAR*S,NSOA), K_tlm(NVAR*S,NSOA) 
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   buf_H( stack_ptr ) = H
+   buf_T( stack_ptr ) = T
+   CALL WCOPY(NVAR*S,Ystage,1,buf_Y(1:NVAR*S,stack_ptr),1)
+   CALL WCOPY(NVAR*S,K,1,buf_K(1:NVAR*S,stack_ptr),1)
+   CALL WCOPY(NVAR*S*NSOA,Ystage_tlm,1,buf_Y_tlm(1:NVAR*S*NSOA,stack_ptr),1)
+   CALL WCOPY(NVAR*S*NSOA,K_tlm,1,buf_K_tlm(1:NVAR*S*NSOA,stack_ptr),1)
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ END SUBROUTINE ros_DPush
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_DPop( S, NSOA, T, H, Ystage, K, Ystage_tlm, K_tlm  )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   INTEGER, INTENT(IN) :: S    ! no of stages
+   INTEGER, INTENT(IN) :: NSOA ! no of second order adjoints
+   KPP_REAL, INTENT(OUT) :: T, H, Ystage(NVAR*S), K(NVAR*S)
+   KPP_REAL, INTENT(OUT) :: Ystage_tlm(NVAR*S,NSOA), K_tlm(NVAR*S,NSOA) 
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = buf_H( stack_ptr )
+   T = buf_T( stack_ptr )
+   CALL WCOPY(NVAR*S,buf_Y(1:NVAR*S,stack_ptr),1,Ystage,1)
+   CALL WCOPY(NVAR*S,buf_K(1:NVAR*S,stack_ptr),1,K,1)
+   CALL WCOPY(NVAR*S*NSOA,buf_Y_tlm(1:NVAR*S*NSOA,stack_ptr),1,Ystage_tlm,1)
+   CALL WCOPY(NVAR*S*NSOA,buf_K_tlm(1:NVAR*S*NSOA,stack_ptr),1,K_tlm,1)
+
+   stack_ptr = stack_ptr - 1
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ END SUBROUTINE ros_DPop
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_tlm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_tlm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_tlm.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock_tlm
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/rosenbrock_tlm.f90	(revision 3477)
@@ -0,0 +1,1357 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Rosenbrock_TLM - Implementation of the Tangent Linear Model            !
+!               for several Rosenbrock methods:                           !
+!               * Ros2                                                    !
+!               * Ros3                                                    !
+!               * Ros4                                                    !
+!               * Rodas3                                                  !
+!               * Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+   USE KPP_ROOT_Precision
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   USE KPP_ROOT_LinearAlgebra
+   USE KPP_ROOT_Rates
+   USE KPP_ROOT_Function
+   USE KPP_ROOT_Jacobian
+   USE KPP_ROOT_Hessian
+   USE KPP_ROOT_Util
+
+   IMPLICIT NONE
+   PUBLIC
+   SAVE
+
+!~~~>  Statistics on the work performed by the Rosenbrock method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+                        Nrej=5, Ndec=6, Nsol=7, Nsng=8, &
+                        Nhes=9, Ntexit=1, Nhexit=2, Nhnew = 3
+
+
+CONTAINS ! Functions in the module KPP_ROOT_Integrator
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_TLM( NTLM, Y, Y_tlm, TIN, TOUT, ATOL_tlm, RTOL_tlm,&
+       ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE        
+    
+!~~~> Y - Concentrations
+   KPP_REAL :: Y(NVAR)
+!~~~> NTLM - No. of sensitivity coefficients
+   INTEGER NTLM
+!~~~> Y_tlm - Sensitivities of concentrations
+!     Note: Y_tlm (1:NVAR,j) contains sensitivities of
+!               Y(1:NVAR) w.r.t. the j-th parameter, j=1...NTLM
+   KPP_REAL :: Y_tlm(NVAR,NTLM)
+   KPP_REAL, INTENT(IN)         :: TIN  ! TIN  - Start Time
+   KPP_REAL, INTENT(IN)         :: TOUT ! TOUT - End Time
+!~~~> Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RTOL_tlm(NVAR,NTLM),ATOL_tlm(NVAR,NTLM)
+
+   INTEGER, SAVE :: IERR
+   KPP_REAL ::  RCNTRL(20), RSTATUS(20)
+   INTEGER ::   ICNTRL(20), ISTATUS(20)
+   INTEGER, SAVE :: Ntotal = 0
+
+   ICNTRL(1:20)  = 0
+   RCNTRL(1:20)  = 0.0_dp
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = 0.0_dp
+   
+   ICNTRL(1) = 0       ! non-autonomous
+   ICNTRL(2) = 1       ! vector tolerances
+   ICNTRL(3) = 5       ! choice of the method
+   ICNTRL(12) = 1      ! 0 - fwd trunc error only, 1 - tlm trunc error
+   RCNTRL(3) = STEPMIN ! starting step
+
+   ! if optional parameters are given, and if they are >=0, then they overwrite default settings
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) >= 0) ICNTRL(:) = ICNTRL_U(:)
+   ENDIF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) >= 0) RCNTRL(:) = RCNTRL_U(:)
+   ENDIF
+
+   CALL RosenbrockTLM(NVAR, VAR, NTLM, Y_tlm,      &
+         TIN,TOUT,ATOL,RTOL,ATOL_tlm,RTOL_tlm,     &
+         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+
+!~~~> Debug option: show number of steps
+!   Ntotal = Ntotal + ISTATUS(Nstp)
+!   PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+    
+   IF (IERR < 0) THEN
+     print *,'Rosenbrock: Unsucessful step at T=', &
+         TIN,' (IERR=',IERR,')'
+   END IF
+   
+   STEPMIN = RSTATUS(Nhexit)
+   ! if optional parameters are given for output they return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+
+END SUBROUTINE INTEGRATE_TLM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE RosenbrockTLM(N,Y,NTLM,Y_tlm,                      &
+           Tstart,Tend,AbsTol,RelTol,AbsTol_tlm,RelTol_tlm,   &
+           RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   
+!    TLM = Tangent Linear Model of a Rosenbrock Method
+!
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.       
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    
+!~~~>   INPUT ARGUMENTS: 
+!    
+!-     Y(N)    -> vector of initial conditions (at T=Tstart)
+!      NTLM       -> dimension of linearized system, 
+!                   i.e. the number of sensitivity coefficients
+!-     Y_tlm(N*NTLM) -> vector of initial sensitivity conditions (at T=Tstart)
+!-    [Tstart,Tend]    -> time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol -> user precribed accuracy
+!- SUBROUTINE Fun( T, Y, Ydot ) -> ODE function, 
+!                       returns Ydot = Y' = F(T,Y) 
+!- SUBROUTINE Jac( T, Y, Jcb ) -> Jacobian of the ODE function,
+!                       returns Jcb = dF/dY 
+!-    ICNTRL(1:20)    -> integer inputs parameters
+!-    RCNTRL(1:20)    -> real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!     
+!-    Y(N)         -> vector of final states (at T->Tend)
+!-    Y_tlm(N*NTLM)-> vector of final sensitivities (at T=Tend)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(:20)    -> real output parameters
+!-    IERR            -> job status upon return
+!       - succes (positive value) or failure (negative value) -
+!           =  1 : Success
+!           = -1 : Improper value for maximal no of steps
+!           = -2 : Selected Rosenbrock method not implemented
+!           = -3 : Hmin/Hmax/Hstart must be positive
+!           = -4 : FacMin/FacMax/FacRej must be positive
+!           = -5 : Improper tolerance values
+!           = -6 : No of steps exceeds maximum bound
+!           = -7 : Step size too small
+!           = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2)   = 0: AbsTol, RelTol are N-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :  default method is Rodas3
+!        = 1 :  method is  Ros2
+!        = 2 :  method is  Ros3 
+!        = 3 :  method is  Ros4 
+!        = 4 :  method is  Rodas3
+!        = 5 :  method is  Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0) the default value of 100000 is used
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO 
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!          
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMin,upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                       (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller 
+!         than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the corrent no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of Jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!    ISTATUS(9) = No. of Hessian calls
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the 
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~>  Arguments   
+   INTEGER,       INTENT(IN)    :: N, NTLM
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+   KPP_REAL, INTENT(INOUT) :: Y_tlm(N,NTLM)
+   KPP_REAL, INTENT(IN)    :: Tstart, Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(N),RelTol(N)
+   KPP_REAL, INTENT(IN)    :: AbsTol_tlm(N,NTLM),RelTol_tlm(N,NTLM)
+   INTEGER,       INTENT(IN)    :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER,       INTENT(INOUT) :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)   :: IERR
+!~~~>  Parameters of the Rosenbrock method, up to 6 stages
+   INTEGER ::  ros_S, rosMethod
+   INTEGER, PARAMETER :: RS2=1, RS3=2, RS4=3, RD3=4, RD4=5
+   KPP_REAL :: ros_A(15), ros_C(15), ros_M(6), ros_E(6), &
+                    ros_Alpha(6), ros_Gamma(6), ros_ELO
+   LOGICAL :: ros_NewF(6)
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Local variables     
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart, Hexit
+   KPP_REAL :: Texit
+   INTEGER :: i, UplimTol, Max_no_steps 
+   LOGICAL :: Autonomous, VectorTol, TLMtruncErr
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+
+!~~~> Initialize the statistics
+   IERR          = 0
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = ZERO
+   
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+      UplimTol  = N
+   ELSE 
+      VectorTol = .FALSE.
+      UplimTol  = 1
+   END IF
+
+!~~~>   Initialize the particular Rosenbrock method selected
+   SELECT CASE (ICNTRL(3))
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (0,4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=',ICNTRL(3) 
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+       RETURN
+   END SELECT
+   
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = 200000
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE 
+      PRINT * ,'User-selected max no. of steps: ICNTRL(4)=',ICNTRL(4)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+   
+!~~~>  Unit roundoff (1+Roundoff>1)  
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN 
+      Hmin = RCNTRL(1)
+   ELSE  
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax 
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2d0
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE  
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0d0
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE  
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1d0
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE  
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9d0
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.d0*Roundoff) &
+         .OR. (RelTol(i) >= 1.0d0) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+     
+
+!~~~>  CALL Rosenbrock method   
+   CALL ros_TLM_Int(Y, NTLM, Y_tlm,              &
+        Tstart, Tend, Texit,                     & 
+!  Error indicator
+        IERR)
+
+
+CONTAINS ! Procedures internal to RosenbrockTLM
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from Rosenbrock due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected Rosenbrock method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+   
+     
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_TLM_Int (Y, NTLM, Y_tlm,         &
+        Tstart, Tend, T,                         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+!~~~> Input: Number of sensitivity coefficients
+   INTEGER, INTENT(IN) :: NTLM 
+!~~~> Input: the initial sensitivites at Tstart; Output: the sensitivities at T   
+   KPP_REAL, INTENT(INOUT) :: Y_tlm(N,NTLM)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ynew(N), Fcn0(N), Fcn(N) 
+   KPP_REAL :: K(N*ros_S)
+   KPP_REAL :: Ynew_tlm(N,NTLM), Fcn0_tlm(N,NTLM), Fcn_tlm(N,NTLM) 
+   KPP_REAL :: K_tlm(N*ros_S,NTLM)
+   KPP_REAL :: Hes0(NHESS), Tmp(N)
+   KPP_REAL :: dFdT(N), dJdT(LU_NONZERO)
+   KPP_REAL :: Jac0(LU_NONZERO), Jac(LU_NONZERO), Ghimj(LU_NONZERO)
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Err0, Err1, Yerr(N), Yerr_tlm(N,NTLM)
+   INTEGER  :: Pivot(N), Direction, ioffset, j, istage, itlm
+   LOGICAL  :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>  Locally called functions
+!   KPP_REAL WLAMCH
+!   EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = ZERO
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.D0*Roundoff) H = DeltaMin
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   Hexit = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL FunTemplate(T,Y,Fcn0)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T,Y,Jac0)    
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+  
+!~~~>   Compute the Hessian at current time
+   CALL HessTemplate(T,Y,Hes0)
+   ISTATUS(Nhes) = ISTATUS(Nhes) + 1
+   
+!~~~>   Compute the TLM function at current time
+   DO itlm = 1, NTLM
+      CALL Jac_SP_Vec ( Jac0, Y_tlm(1:N,itlm), Fcn0_tlm(1:N,itlm) )
+   END DO  
+   
+!~~~>  Compute the function and Jacobian derivatives with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT )
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y, Jac0, dJdT )
+   END IF
+ 
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1),&
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+N)
+       ioffset = N*(istage-1)
+
+      ! Initialize stage solution
+       CALL WCOPY(N,Y,1,Ynew,1)
+       CALL WCOPY(N*NTLM,Y_tlm,1,Ynew_tlm,1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         CALL WCOPY(N,Fcn0,1,Fcn,1)
+         CALL WCOPY(N*NTLM,Fcn0_tlm,1,Fcn_tlm,1)
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         DO j = 1, istage-1
+           CALL WAXPY(N,ros_A((istage-1)*(istage-2)/2+j),    &
+                     K(N*(j-1)+1:N*j),1,Ynew,1) 
+           DO itlm=1,NTLM  
+              CALL WAXPY(N,ros_A((istage-1)*(istage-2)/2+j), &
+                     K_tlm(N*(j-1)+1:N*j,itlm),1,Ynew_tlm(1:N,itlm),1) 
+           END DO                    
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL FunTemplate(Tau,Ynew,Fcn)   
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+         CALL JacTemplate(Tau,Ynew,Jac)    
+         ISTATUS(Njac) = ISTATUS(Njac) + 1
+         DO itlm=1,NTLM 
+           CALL Jac_SP_Vec ( Jac, Ynew_tlm(1:N,itlm), Fcn_tlm(1:N,itlm) )
+         END DO              
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+       CALL WCOPY(N,Fcn,1,K(ioffset+1:ioffset+N),1)
+       DO itlm=1,NTLM   
+          CALL WCOPY(N,Fcn_tlm(1:N,itlm),1,K_tlm(ioffset+1:ioffset+N,itlm),1)
+       END DO                
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(N,HC,K(N*(j-1)+1:N*j),1,K(ioffset+1:ioffset+N),1)
+         DO itlm=1,NTLM 
+           CALL WAXPY(N,HC,K_tlm(N*(j-1)+1:N*j,itlm),1,K_tlm(ioffset+1:ioffset+N,itlm),1)
+         END DO              
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(N,HG,dFdT(1:N),1,K(ioffset+1:ioffset+N),1)
+         DO itlm=1,NTLM 
+           CALL Jac_SP_Vec ( dJdT, Ynew_tlm(1:N,itlm), Tmp )
+           CALL WAXPY(N,HG,Tmp,1,K_tlm(ioffset+1:ioffset+N,itlm),1)
+         END DO              
+       END IF
+       CALL ros_Solve(Ghimj, Pivot, K(ioffset+1:ioffset+N))
+       DO itlm=1,NTLM   
+         CALL Hess_Vec ( Hes0, K(ioffset+1:ioffset+N), Y_tlm(1:N,itlm), Tmp )
+         CALL WAXPY(N,ONE,Tmp,1,K_tlm(ioffset+1:ioffset+N,itlm),1)
+         CALL ros_Solve(Ghimj, Pivot, K_tlm(ioffset+1:ioffset+N,itlm))
+       END DO                
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   CALL WCOPY(N,Y,1,Ynew,1)
+   DO j=1,ros_S
+      CALL WAXPY(N,ros_M(j),K(N*(j-1)+1:N*j),1,Ynew,1)
+   END DO
+   DO itlm=1,NTLM       
+     CALL WCOPY(N,Y_tlm(1:N,itlm),1,Ynew_tlm(1:N,itlm),1)
+     DO j=1,ros_S
+       CALL WAXPY(N,ros_M(j),K_tlm(N*(j-1)+1:N*j,itlm),1,Ynew_tlm(1:N,itlm),1)
+     END DO
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL Set2zero(N,Yerr)
+   DO j=1,ros_S     
+        CALL WAXPY(N,ros_E(j),K(N*(j-1)+1:N*j),1,Yerr,1)
+   END DO 
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+   IF (TLMtruncErr) THEN
+     Err1 = 0.0d0
+     CALL Set2zero(N*NTLM,Yerr_tlm)
+     DO itlm=1,NTLM
+       DO j=1,ros_S  
+         CALL WAXPY(N,ros_E(j),K_tlm(N*(j-1)+1:N*j,itlm),1,Yerr_tlm(1:N,itlm),1)
+       END DO 
+     END DO
+     Err = ros_ErrorNorm_tlm(Y_tlm,Ynew_tlm,Yerr_tlm,AbsTol_tlm,RelTol_tlm,Err,VectorTol)
+   END IF
+  
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      CALL WCOPY(N,Ynew,1,Y,1)
+      CALL WCOPY(N*NTLM,Ynew_tlm,1,Y_tlm,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1) THEN
+         ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_TLM_Int
+   
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, & 
+               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y(N), Ynew(N),    &
+          Yerr(N), AbsTol(N), RelTol(N)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: Err, Scale, Ymax   
+   INTEGER  :: i
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0
+   
+   Err = ZERO
+   DO i=1,N
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/N)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+   
+  END FUNCTION ros_ErrorNorm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm_tlm ( Y_tlm, Ynew_tlm, Yerr_tlm, & 
+               AbsTol_tlm, RelTol_tlm, Fwd_Err, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y_tlm(N,NTLM), Ynew_tlm(N,NTLM),    &
+          Yerr_tlm(N,NTLM), AbsTol_tlm(N,NTLM), RelTol_tlm(N,NTLM), Fwd_Err
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: TMP, Err
+   INTEGER  :: itlm
+   
+   Err = FWD_Err
+   DO itlm = 1,NTLM
+     TMP = ros_ErrorNorm(Y_tlm(1,itlm), Ynew_tlm(1,itlm),Yerr_tlm(1,itlm), &
+     		AbsTol_tlm(1,itlm), RelTol_tlm(1,itlm), VectorTol)
+     Err = MAX(Err, TMP)
+   END DO
+
+   ros_ErrorNorm_tlm = MAX(Err,1.0d-10)
+   
+  END FUNCTION ros_ErrorNorm_tlm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(N), Fcn0(N) 
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dFdT(N)   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL FunTemplate(T+Delta,Y,dFdT)   
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+   CALL WAXPY(N,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(N,(ONE/Delta),dFdT,1)
+
+  END SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_JacTimeDerivative ( T, Roundoff, Y, &
+                Jac0, dJdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the Jacobian by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(N), Jac0(LU_NONZERO) 
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dJdT(LU_NONZERO)   
+!~~~> Local variables     
+   KPP_REAL Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL JacTemplate(T+Delta,Y,dJdT)    
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+   CALL WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1)
+
+  END SUBROUTINE ros_JacTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE         
+   
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) ::  gam, Jac0(LU_NONZERO)
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(N)
+!~~~> Inout arguments   
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables     
+   INTEGER  :: i, ising, Nconsecutive
+   KPP_REAL ::  ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0d0, HALF = 0.5d0
+   
+   Nconsecutive = 0
+   Singular = .TRUE.
+   
+   DO WHILE (Singular)
+   
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,N
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+!~~~>    Compute LU decomposition 
+     CALL ros_Decomp( Ghimj, Pivot, ising )
+     IF (ising == 0) THEN
+!~~~>    If successful done 
+        Singular = .FALSE. 
+     ELSE ! ising .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        ISTATUS(Nsng) = ISTATUS(Nsng) + 1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE. 
+        PRINT*,'Warning: LU Decomposition returned ising = ',ising
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decompositions
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ising 
+         
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Decomp( A, Pivot, ising )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the LU decomposition   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Inout variables     
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+!~~~> Output variables     
+   INTEGER, INTENT(OUT) :: Pivot(N), ising
+   
+   CALL KppDecomp ( A, ising )
+!~~~> Note: for a full matrix use Lapack:
+!     CALL  DGETRF( N, N, A, N, Pivot, ising ) 
+   Pivot(1) = 1
+    
+   ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+  END SUBROUTINE ros_Decomp
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Solve( A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables     
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+   INTEGER, INTENT(IN) :: Pivot(N)
+!~~~> InOut variables     
+   KPP_REAL, INTENT(INOUT) :: b(N)
+   
+   CALL KppSolve( A, b )
+!~~~> Note: for a full matrix use Lapack:
+!     NRHS = 1
+!     CALL  DGETRS( 'N', N , NRHS, A, N, Pivot, b, N, INFO )
+     
+   ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+  END SUBROUTINE ros_Solve
+
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros2 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   DOUBLE PRECISION g
+   
+    g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+   
+    rosMethod = RS2
+!~~~> Name of the method
+    ros_Name = 'ROS-2'   
+!~~~> Number of stages
+    ros_S = 2
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+   
+    ros_A(1) = (1.d0)/g
+    ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.d0)/(2.d0*g)
+    ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator    
+    ros_E(1) = 1.d0/(2.d0*g)
+    ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0d0
+    ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+   
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   IMPLICIT NONE
+   
+    rosMethod = RS3
+!~~~> Name of the method
+   ros_Name = 'ROS-3'   
+!~~~> Number of stages
+   ros_S = 3
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1)= 1.d0
+   ros_A(2)= 1.d0
+   ros_A(3)= 0.d0
+
+   ros_C(1) = -0.10156171083877702091975600115545d+01
+   ros_C(2) =  0.40759956452537699824805835358067d+01
+   ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1d+01
+   ros_M(2) =  0.61697947043828245592553615689730d+01
+   ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator    
+   ros_E(1) =  0.5d+00
+   ros_E(2) = -0.29079558716805469821718236208017d+01
+   ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0d+00
+   ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+   ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+   ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+   ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RS4
+!~~~> Name of the method
+   ros_Name = 'ROS-4'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1) = 0.2000000000000000d+01
+   ros_A(2) = 0.1867943637803922d+01
+   ros_A(3) = 0.2344449711399156d+00
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0D0
+
+   ros_C(1) =-0.7137615036412310d+01
+   ros_C(2) = 0.2580708087951457d+01
+   ros_C(3) = 0.6515950076447975d+00
+   ros_C(4) =-0.2137148994382534d+01
+   ros_C(5) =-0.3214669691237626d+00
+   ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735d+01
+   ros_M(2) = 0.2870493262186792d+00
+   ros_M(3) = 0.4353179431840180d+00
+   ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) =-0.2815431932141155d+00
+   ros_E(2) =-0.7276199124938920d-01
+   ros_E(3) =-0.1082196201495311d+00
+   ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.D0
+   ros_Alpha(2) = 0.1145640000000000d+01
+   ros_Alpha(3) = 0.6552168638155900d+00
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5728200000000000d+00
+   ros_Gamma(2) =-0.1769193891319233d+01
+   ros_Gamma(3) = 0.7592633437920482d+00
+   ros_Gamma(4) =-0.1049021087100450d+00
+
+  END SUBROUTINE Ros4
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RD3
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+   ros_A(1) = 0.0d+00
+   ros_A(2) = 2.0d+00
+   ros_A(3) = 0.0d+00
+   ros_A(4) = 2.0d+00
+   ros_A(5) = 0.0d+00
+   ros_A(6) = 1.0d+00
+
+   ros_C(1) = 4.0d+00
+   ros_C(2) = 1.0d+00
+   ros_C(3) =-1.0d+00
+   ros_C(4) = 1.0d+00
+   ros_C(5) =-1.0d+00 
+   ros_C(6) =-(8.0d+00/3.0d+00) 
+         
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0d+00
+   ros_M(2) = 0.0d+00
+   ros_M(3) = 1.0d+00
+   ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) = 0.0d+00
+   ros_E(2) = 0.0d+00
+   ros_E(3) = 0.0d+00
+   ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0d+00    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0d+00
+   ros_Alpha(2) = 0.0d+00
+   ros_Alpha(3) = 1.0d+00
+   ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5d+00
+   ros_Gamma(2) = 1.5d+00
+   ros_Gamma(3) = 0.0d+00
+   ros_Gamma(4) = 0.0d+00
+
+  END SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+
+    rosMethod = RD4
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'   
+!~~~> Number of stages
+    ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000d0
+    ros_Alpha(2) = 0.386d0
+    ros_Alpha(3) = 0.210d0 
+    ros_Alpha(4) = 0.630d0
+    ros_Alpha(5) = 1.000d0
+    ros_Alpha(6) = 1.000d0
+        
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = 0.2500000000000000d+00
+    ros_Gamma(2) =-0.1043000000000000d+00
+    ros_Gamma(3) = 0.1035000000000000d+00
+    ros_Gamma(4) =-0.3620000000000023d-01
+    ros_Gamma(5) = 0.0d0
+    ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+    ros_A(1) = 0.1544000000000000d+01
+    ros_A(2) = 0.9466785280815826d+00
+    ros_A(3) = 0.2557011698983284d+00
+    ros_A(4) = 0.3314825187068521d+01
+    ros_A(5) = 0.2896124015972201d+01
+    ros_A(6) = 0.9986419139977817d+00
+    ros_A(7) = 0.1221224509226641d+01
+    ros_A(8) = 0.6019134481288629d+01
+    ros_A(9) = 0.1253708332932087d+02
+    ros_A(10) =-0.6878860361058950d+00
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0d+00
+
+    ros_C(1) =-0.5668800000000000d+01
+    ros_C(2) =-0.2430093356833875d+01
+    ros_C(3) =-0.2063599157091915d+00
+    ros_C(4) =-0.1073529058151375d+00
+    ros_C(5) =-0.9594562251023355d+01
+    ros_C(6) =-0.2047028614809616d+02
+    ros_C(7) = 0.7496443313967647d+01
+    ros_C(8) =-0.1024680431464352d+02
+    ros_C(9) =-0.3399990352819905d+02
+    ros_C(10) = 0.1170890893206160d+02
+    ros_C(11) = 0.8083246795921522d+01
+    ros_C(12) =-0.7981132988064893d+01
+    ros_C(13) =-0.3152159432874371d+02
+    ros_C(14) = 0.1631930543123136d+02
+    ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0d+00
+    ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator    
+    ros_E(1) = 0.0d+00
+    ros_E(2) = 0.0d+00
+    ros_E(3) = 0.0d+00
+    ros_E(4) = 0.0d+00
+    ros_E(5) = 0.0d+00
+    ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0d0
+     
+  END SUBROUTINE Rodas4
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+END SUBROUTINE RosenbrockTLM
+!  and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+!~~~> Input variables     
+   KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables     
+   KPP_REAL :: Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL :: Told     
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+        
+END SUBROUTINE FunTemplate
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+    IMPLICIT NONE
+   
+!~~~> Input variables     
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL :: Jcb(LU_NONZERO)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+    TIME = Told
+     
+END SUBROUTINE JacTemplate                                      
+
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE HessTemplate( T, Y, Hes )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!  Template for the ODE Hessian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+    IMPLICIT NONE
+    
+!~~~> Input variables     
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL :: Hes(NHESS)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Hessian( Y, FIX, RCONST, Hes )
+    TIME = Told
+
+END SUBROUTINE HessTemplate                                      
+
+END MODULE KPP_ROOT_Integrator
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.c	(revision 3477)
@@ -0,0 +1,2087 @@
+ #define MAX(a,b) ( ((a) >= (b)) ?(a):(b)  )
+ #define MIN(b,c) ( ((b) <  (c)) ?(b):(c)  )
+ #define ABS(x)   ( ((x) >=  0 ) ?(x):(-x) )
+ #define SQRT(d)  ( pow((d),0.5)  )
+ /* SIGN transfer function */
+ #define SIGN(x,y) (((y) >=  0 ) ?(ABS(x)):(-ABS(x)) ) 
+
+/*~~> Numerical constants */
+ #define  ZERO     (KPP_REAL)0.0
+ #define  ONE      (KPP_REAL)1.0
+
+/*~~~> Statistics on the work performed by the Runge-Kutta method */
+ #define Nfun	0
+ #define Njac	1
+ #define Nstp	2
+ #define Nacc	3
+ #define Nrej	4
+ #define Ndec	5
+ #define Nsol	6
+ #define Nsng	7
+ #define Ntexit	0
+ #define Nhacc	1
+ #define Nhnew	2
+
+/*~~~> Runge-Kutta method parameters */
+ #define RKmax 3
+
+ #define R2A 1
+ #define R1A 2
+ #define L3C 3
+ #define GAU 4
+ #define L3A 5
+
+ int rkMethod,
+     SdirkError;
+ KPP_REAL rkT[RKmax][RKmax],
+	rkTinv[RKmax][RKmax],
+       	rkTinvAinv[RKmax][RKmax],
+   	rkAinvT[RKmax][RKmax],
+   	rkA[RKmax+1][RKmax+1],
+   	rkB[RKmax+1],
+      	rkC[RKmax+1],
+       	rkD[RKmax+1],
+       	rkE[RKmax+1],
+   	rkBgam[RKmax+2],
+       	rkBhat[RKmax+2],
+       	rkTheta[RKmax+1],
+       	rkF[RKmax+2],
+   	rkGamma,
+   	rkAlpha,
+   	rkBeta,
+	rkELO;
+/*~~~> Function headers */
+// void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//		int ISTATUS_U[], KPP_REAL RSTATUS_U[], int IERR_U); 
+ void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT); 
+ void RungeKutta(int N, KPP_REAL T, KPP_REAL Tend, KPP_REAL Y[],
+     	       KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[],
+	       int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[], int* IERR);
+ void RK_Integrator(int N, KPP_REAL*  T, KPP_REAL  Tend, KPP_REAL Y[],
+     		   KPP_REAL AbsTol[], KPP_REAL RelTol[], int ITOL,
+     		   int ISTATUS[], KPP_REAL RSTATUS[], KPP_REAL Hmin,
+		   KPP_REAL Hmax, KPP_REAL Hstart, KPP_REAL Roundoff,
+		   int Max_no_steps, int NewtonMaxit, int StartNewton,
+		   int Gustafsson, KPP_REAL ThetaMin, KPP_REAL NewtonTol,
+		   KPP_REAL FacSafe, KPP_REAL FacMax, KPP_REAL FacMin,
+     		   KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int* IERR);
+ void RK_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H, int* IERR);
+ void RK_ErrorScale(int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+		KPP_REAL Y[], KPP_REAL SCAL[]);
+ /*void RK_Transform(int N, KPP_REAL Tr[][RKmax], KPP_REAL Z1[], KPP_REAL Z2[],
+                KPP_REAL Z3[], KPP_REAL W1[], KPP_REAL W2[], KPP_REAL W3[]);*/
+ void RK_Interpolate(char action[], int N, KPP_REAL H, KPP_REAL Hold,
+	 KPP_REAL Z1[], KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL CONT[][RKmax]);
+ void RK_PrepareRHS(int N, KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL FO[],
+        KPP_REAL Z1[], KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL R1[], KPP_REAL R2[],
+        KPP_REAL R3[]);
+ void RK_Decomp(int N, KPP_REAL H, KPP_REAL FJAC[], KPP_REAL E1[],
+                int IP1[], KPP_REAL E2R[], KPP_REAL E2I[], 
+		int IP2[], int* ISING, int ISTATUS[]);
+ void RK_Solve(int N, KPP_REAL H, KPP_REAL E1[], int IP1[], KPP_REAL E2R[],
+	KPP_REAL E2I[], int IP2[], KPP_REAL R1[], KPP_REAL R2[], KPP_REAL R3[],
+	int ISTATUS[]);
+ void RK_ErrorEstimate(int N, KPP_REAL H, KPP_REAL T, KPP_REAL Y[],
+        KPP_REAL FO[], KPP_REAL E1[], int IP1[], KPP_REAL Z1[],
+        KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL SCAL[], KPP_REAL* Err,
+        int FirstStep, int Reject, int ISTATUS[]);
+ void Radau2A_Coefficients();
+ void Lobatto3C_Coefficients ();
+ void Gauss_Coefficients();
+ void Radau1A_Coefficients();
+ void Lobatto3A_Coefficients();
+ void FUN_CHEM(KPP_REAL T, KPP_REAL V[], KPP_REAL FCT[]);
+ void JAC_CHEM(KPP_REAL T, KPP_REAL V[], KPP_REAL JF[]);
+ KPP_REAL RK_ErrorNorm(int N, KPP_REAL SCAL[], KPP_REAL DY[]);
+ void Fun(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+ void Jac_SP(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+ void WCOPY(int N, KPP_REAL X[], int incX, KPP_REAL Y[], int incY);
+ void WADD(int N, KPP_REAL Y[], KPP_REAL Z[], KPP_REAL TMP[]);
+ void WAXPY(int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], int incY );
+ KPP_REAL WLAMCH( char C );
+ void KppSolveCmplxR(KPP_REAL JVSR[], KPP_REAL JVSI[], KPP_REAL XR[], KPP_REAL XI[]);
+ int KppDecompCmplxR(KPP_REAL *JVSR, KPP_REAL *JVSI);
+ void Set2Zero(int N, KPP_REAL A[]);
+ int KppDecomp( KPP_REAL A[] );
+ void KppSolve ( KPP_REAL A[], KPP_REAL b[] );
+ void Update_SUN();
+ void Update_RCONST();
+ void Update_PHOTO();
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+//void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//	       int ISTATUS_U[], KPP_REAL RSTATUS_U[], int IERR_U )
+void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/* RungeKutta - Fully Implicit 3-stage Runge-Kutta methods based on:
+          * Radau-2A   quadrature (order 5)                        
+          * Radau-1A   quadrature (order 5)                              
+          * Lobatto-3C quadrature (order 4)                              
+          * Gauss      quadrature (order 6)                              
+  By default the code employs the KPP sparse linear algebra routines     
+  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        
+                                                                         
+    (C)  Adrian Sandu, August 2005                                       
+    Virginia Polytechnic Institute and State University                  
+    Contact: sandu@cs.vt.edu                                             
+    Revised by Philipp Miehe and Adrian Sandu, May 2006  
+    F90 to C translation by Tinting Jiang and Don Jacob, July 2006                
+    This implementation is part of KPP - the Kinetic PreProcessor        
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   int IERR;
+   KPP_REAL RCNTRL[20],
+  	  RSTATUS[20],
+	  T1,
+	  T2;
+   int ICNTRL[20],
+       ISTATUS[20];
+   static int Ntotal = 0; /* for printing the number of steps */
+   
+   int i;
+   for ( i = 0; i < 20; i++ ) {
+     RCNTRL[i] = ZERO;
+     ICNTRL[i] = 0;
+   } /* for */
+
+   /*~~~> fine-tune the integrator: */
+   ICNTRL[1]  = 0;    /* 0=vector tolerances, 1=scalar tolerances */
+   ICNTRL[4]  = 8;    /* Max no. of Newton iterations */
+   ICNTRL[5]  = 0;    /* Starting values for Newton are interpolated(0) or zero(1) */
+   ICNTRL[9]  = 1;    /* 0 - classic or 1 - SDIRK error estimation */
+   ICNTRL[10] = 0;    /* Gustaffson(0) or classic(1) controller */ 
+   
+//   /*~~~> if optional parameters are given, and if they are >0,
+//          then use them to overwrite default settings */	
+//   if (ICNTRL_U != NULL) {
+//	for ( i = 0; i < 20; i++) {
+//	   if (ICNTRL_U[i] > 0) {
+//		  ICNTRL[i] = ICNTRL_U[i];
+//	   } /* end if */
+//	} /* end for */
+//   } /* end if */
+//   if (RCNTRL_U != NULL) {
+//	for (i = 0; i < 20; i++) {
+//   	   if (RCNTRL_U[i] > 0) {
+//		RCNTRL[i] = RCNTRL_U[i];
+//	   } /* end if */
+//	} /* end for */
+//   } /* end if */
+
+   T1 = TIN;
+   /*printf("T1=%f\n", T1);*/
+   T2 = TOUT;
+   /*printf("T2=%f\n", T2);*/
+   RungeKutta(NVAR, T1, T2, VAR, RTOL, ATOL, RCNTRL,ICNTRL,RSTATUS,ISTATUS, &IERR);
+   
+   Ntotal += ISTATUS[Nstp];
+   printf("NSTEPS=%d (%d)  O3=%E ", ISTATUS[Nstp], Ntotal, VAR[ind_O3]);
+
+//   /* if optional parameters are given for output
+//    * use them to store information in them */
+//   if (ISTATUS_U != NULL) {
+//	for (i = 0; i < 20; i++) {
+//	   ISTATUS_U[i] = ISTATUS[i];
+//	} /* end for */
+//    } /* end if */
+//   if (RSTATUS_U != NULL) {
+//	for (i = 0; i < 20; i++) {
+//	   RSTATUS_U[i] = RSTATUS[i];
+//	} /* end for */
+//   } /* end if */
+//   /*if (IERR_U != NULL) */
+//	IERR_U = IERR;
+
+   if (IERR < 0) {
+	printf("Runge-Kutta: Unsuccessful exit at T=%f(IERR=%d)", TIN, IERR);
+   } /* end if */
+   
+} /* end INTEGRATE */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+void RungeKutta(int N, KPP_REAL T, KPP_REAL Tend, KPP_REAL Y[],
+     	       KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[],
+	       int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[], int* IERR)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    This implementation is based on the book and the code Radau5:
+
+     	E. HAIRER AND G. WANNER
+     	"SOLVING ORDINARY DIFFERENTIAL EQUATIONS II.
+       	     STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+     	SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+        SPRINGER-VERLAG (1991)
+
+	UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+	CH-1211 GENEVE 24, SWITZERLAND
+    	E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+   
+    Methods:
+	 * Radau-2A	quadrature (order 5)
+      	 * Radau-1A	quadrature (order 5)
+      	 * Lobatto-3C	quadrature (order 4)
+    	 * Gauss	quadrature (order 6)
+
+    (C)  Adrian Sandu, August 2005
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>   INPUT ARGUMENTS:
+	  ----------------
+    Note: For input parameters equal to zero the default values of the
+	  corresponding variables are used.
+
+     N		Dimension of the system
+     T		Initial time value
+
+     Tend	Final T value (Tend-T may be positive or negative)
+
+     Y(N)	Initial values for Y
+
+     RelTol, AbsTol   Relative and absolute error tolerances.
+           for ICNTRL[1] = 0: AbsTol, RelTol are N-dimensional vectors
+                         = 1: AbsTol, RelTol are scalars
+  *~~~>   Integer input parameters:
+
+     ICNTRL[0] = not used
+     
+     ICNTRL[1] = 0: AbsTol, RelTol are NVAR-dimensional vectors
+               = 1: AbsTol, RelTol are scalars
+
+     ICNTRL[2] = RK method selection
+	     = 1: Radau-2A	(the default)
+	     = 2: Radau-1A
+	     = 3: Lobatto-3C
+	     = 4: Gauss
+	     = 5: Lobatto-3A (not yet implemented)
+
+     ICNTRL[3] -> maximum number of integration steps
+	For ICNTRL[3] = 0 the default value of 10000 is used
+
+     ICNTRL[4] -> maximum number of Newton iterations
+	For ICNTRL[4] = 0 the default value of 8 is used
+
+     ICNTRL[5] -> starting values of Newton iterations:
+	ICNTRL[5] = 0: starting values are obtained from
+		     the extrapolated collocation solution
+		     (the default)
+   	ICNTRL[5] = 1: starting values are zero
+
+     ICNTRL[9] -> switch for error estimation strategy
+	ICNTRL[9] = 0: one additional stage at c = 0,
+		     see Hairer (default)
+	ICNTRL[9] = 1: two additional stages at c = 0,
+		     and SDIRK at c = 1, stiffly accurate
+
+     ICNTRL[10] -> switch for step size strategy
+	ICNTRL[10] = 0: mod. predictive controller (Gustafsson, default)
+	ICNTRL[10] = 1: classical step size control
+ 	the choice 1 seems to produce safer results;
+	for simple problems, the choice 2 produces
+	often slightly faster runs
+
+  *~~~>   Real input parameters:
+     RCNTRL[0]  -> Hmin, lower bound for the integration step size
+		(highly recommended to keep Hmin = ZERO, the default)
+
+     RCNTRL[1]  -> Hmax, upper bound for the integration step size
+
+     RCNTRL[2]  -> Hstart, the starting step size
+
+     RCNTRL[3]  -> FacMin, lower bound on step decrease factor 
+		(default=0.2)
+
+     RCNTRL[4]  -> FacMax, upper bound on step increase factor
+		(default=6)
+
+     RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+		(default=0.1)
+
+     RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+		than the predicted value (default=0.9)
+
+     RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+		than ThetaMin the Jacobian is not recomputed;
+		(default=0.001)
+
+     RCNTRL[8]  -> NewtonTol, stopping criterion for Newton's method
+		(default=0.03)
+
+     RCNTRL[9]  -> Qmin
+
+     RCNTRL[10] -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+		 step size is kept constant and the LU factorization
+		 reused (default Qmin=1, Qmax=1.2)	
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>     OUTPUT ARGUMENTS:
+            -----------------
+     T	      -> T value for which the solution has been computed
+		 (after successful return T=Tend).
+
+     Y(N)  -> Numerical solution at T
+
+  Note: each call to RungeKutta adds the current no. of fcn calls
+	to previous value of ISTATUS[0], and similar to other params.
+	Set ISTATUS[1:9] = 0 before call to avoid this accumulation.
+
+     ISTATUS[0] -> No. of function calls
+     ISTATUS[1] -> No. of Jacobian calls
+     ISTATUS[2] -> No. of steps
+     ISTATUS[3] -> No. of accepted steps
+     ISTATUS[4] -> No. of rejected steps (except at very beginning)
+     ISTATUS[5] -> No. of LU decompositions
+     ISTATUS[6] -> No. of forward/backward substitutions
+     ISTATUS[7] -> No. of singular matrix decompositions
+
+     RSTATUS[0] -> Texit, the time corresponding to the 
+		 computed Y upon return
+     RSTATUS[1] -> Hexit, last accepted step before exit
+     RSTATUS[2] -> Hnew, last predicted step (not yet taken)
+		 For multiple restarts, use Hnew as Hstart
+  		 in the subsequent run
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>    RETURN VALUE (int):
+
+     IERR     -> Reports on successfulness upon return:
+	= 1 for success
+	< 0 for error (value equals error code)
+	= -1  : Improper value for maximal no of steps
+	= -2  : Improper value for maximal no of Newton iterations
+	= -3  : Hmin/Hmax/Hstart must be positive
+    	= -4  : Improper values for FacMin/FacMax/FacSafe/FacRej
+    	= -5  : Improper value for ThetaMin
+    	= -6  : Newton stopping tolerance too small
+    	= -7  : Improper values for Qmin, Qmax
+    	= -8  : Tolerances are too small
+    	= -9  : No of steps exceeds maximum bound
+    	= -10 : Step size too small
+	= -11 : Matrix is repeatedly singular
+   	= -12 : Non-convergence of Newton iterations
+    	= -13 : Requested RK method not implemented
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+  /*~~~>  Control arguments */
+  /*printf("Starting RungeKutta\n");*/
+   int Max_no_steps;
+   KPP_REAL Hmin,
+  	  Hmax,
+	  Hstart,
+	  Qmin,
+	  Qmax,
+   	  Roundoff,
+	  ThetaMin,
+	  NewtonTol,
+   	  FacSafe,
+          FacMin,
+	  FacMax,
+	  FacRej;
+  /*~~~> Local variables */
+   int NewtonMaxit,
+       ITOL,
+       i,
+       StartNewton,
+       Gustafsson; 
+
+   *IERR = 0;
+   for (i = 0; i < 20; i++) {
+	ISTATUS[i] = 0;
+	RSTATUS[i] = ZERO;
+   } /* end for */
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  /*~~~> ICNTRL[0] - autonomous system - not used */
+  /*~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol */
+   if (ICNTRL[1] == 0) {
+	/*printf("Entering if ICNTRL[1] == 0\n");*/
+	ITOL = 1;
+   }
+   else {
+	ITOL = 0;
+   } /*end if */
+  /*~~~> Error control selection */
+   if (ICNTRL[9] == 0) {
+	SdirkError = 0;
+   }
+   else {
+	/*printf("Entering if ICNTRL[9] == 1\n");*/    
+	SdirkError = 1;
+   } /* end if */
+  /*~~~> Method Selection */
+  /*printf("Starting case ICNTRL[2]\n");*/
+   switch (ICNTRL[2]) {
+	case 0:
+	case 1:	Radau2A_Coefficients(); /*printf("case 0 or 1\n");*/
+		break;
+	case 2: Lobatto3C_Coefficients(); printf("case 2\n");
+		break;
+	case 3: Gauss_Coefficients(); printf("case 3\n");
+		break;
+	case 4: Radau1A_Coefficients(); printf("case 4\n");
+		break;
+	case 5: Lobatto3A_Coefficients(); printf("case 5\n");
+		break;
+	default:
+		printf("\n ICNTRL[2]=%d\n", ICNTRL[2]);
+		RK_ErrorMsg(-13, T, ZERO, IERR);
+   } /* end switch */
+ 
+ /*~~~> Max_no_steps: the maximal number of time steps */
+   if (ICNTRL[3] == 0) {
+	Max_no_steps = 200000;
+	/*printf("Max_no_steps = %d\n", Max_no_steps);*/
+   }
+   else {
+	Max_no_steps = ICNTRL[3];
+	if (Max_no_steps <= 0)
+	{
+		printf("\n ICNTRL[3]=%d\n", ICNTRL[3]);
+		RK_ErrorMsg(-1, T, ZERO, IERR);
+	} /* end if */
+   } /* end if */
+
+ /*~~~> NewtonMaxit: maximal number of Newton iterations */
+   if (ICNTRL[4] == 0)
+	NewtonMaxit = 8;
+   else 
+   {
+	NewtonMaxit = ICNTRL[4];
+	if (NewtonMaxit <= 0) {
+		printf("\n ICNTRL[4]=%d\n", ICNTRL[4]);
+		RK_ErrorMsg(-2, T, ZERO, IERR);
+	}
+	/*printf("NewtonMaxit = %d\n", NewtonMaxit);*/
+   } /* end if */
+
+ /*~~~> StartNewton: Use extrapolation for starting values of Newton iterations */
+   if (ICNTRL[5] == 0) {
+	StartNewton = 1;
+	/*printf("StartNewton = %d\n", StartNewton);*/
+   }
+   else {
+	StartNewton = 0;
+   } /* end if */
+
+ /*~~~> Gustafsson: step size controller */
+   if (ICNTRL[10] == 0) {
+	Gustafsson = 1;
+	/*printf("Gustafsson = %d\n", Gustafsson);*/
+   }
+   else {
+	Gustafsson = 0;
+   } /* end if */
+  
+ /*~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0 */
+   Roundoff = WLAMCH('E');
+   /*printf("Roundoff=%f\n", Roundoff);*/
+ /*~~~> Hmin = minimal step size */
+   if (RCNTRL[0] == ZERO) {
+	/*printf("Entering if RCNTRL[0]=%f == ZERO\n", RCNTRL[0]);*/   
+	Hmin = ZERO;
+   }
+   else {
+	Hmin = MIN(ABS(RCNTRL[0]), ABS(Tend-T));
+   } /* end if */
+ /*~~~> Hmax = maximal step size */
+   if (RCNTRL[1] == ZERO) {
+	/*printf("Entering if RCNTRL[1]=%f == ZERO\n", RCNTRL[1]);*/   
+      	Hmax = ABS(Tend-T);
+   }
+   else {
+      	Hmax = MIN(ABS(RCNTRL[1]),ABS(Tend-T));
+   } /* end if */
+ /*~~~> Hstart = starting step size */
+   if (RCNTRL[2] == ZERO) {
+	/*printf("Entering if RCNTRL[2]=%f == ZERO\n", RCNTRL[2]);*/   
+    	Hstart = ZERO;
+   }
+   else {
+	Hstart = MIN(ABS(RCNTRL[2]),ABS(Tend-T));
+   } /* end if */
+ /*~~~> FacMin: lower bound on step decrease factor */
+   if (RCNTRL[3] == ZERO) {
+	/*printf("Entering if RCNTRL[3]=%f == ZERO\n", RCNTRL[3]);*/   
+	FacMin = (KPP_REAL)0.2;
+   }
+   else {
+   	FacMin = RCNTRL[3];
+   } /* end if */
+ /*~~~> FacMax: upper bound on step increase factor */
+   if (RCNTRL[4] == ZERO) {
+	/*printf("Entering if RCNTRL[4]=%f == ZERO\n", RCNTRL[4]);*/   
+    	FacMax = (KPP_REAL)8.0;
+   }
+   else {
+    	FacMax = RCNTRL[4];
+   } /* end if */
+ /*~~~> FacRej: step decrease factor after 2 consecutive rejections */
+   if (RCNTRL[5] == ZERO) {
+	/*printf("Entering if RCNTRL[5]=%f == ZERO\n", RCNTRL[5]);*/
+	FacRej = (KPP_REAL)0.1;
+   }
+   else {
+     	FacRej = RCNTRL[5];
+   } /* end if */
+ /*~~~> FacSafe: by which the new step is slightly smaller
+		 than the predicted value */
+   if (RCNTRL[6] == ZERO) {
+	/*printf("Entering if RCNTRL[6]=%f == ZERO\n", RCNTRL[6]);*/   
+    	FacSafe = (KPP_REAL)0.9;
+   }
+   else {
+ 	FacSafe = RCNTRL[6];
+   } /* end if */
+   if ((FacMax < ONE) || (FacMin > ONE) || (FacSafe <= 1.0e-03) || (FacSafe >= ONE)) {
+	printf("\n RCNTRL[3]=%f, RCNTRL[4]=%f, RCNTRL[5]=%f, RCNTRL[6]=%f\n",
+		RCNTRL[3], RCNTRL[4], RCNTRL[5], RCNTRL[6]);
+	RK_ErrorMsg(-4, T, ZERO, IERR);
+   } /* end if */
+
+ /*~~~> ThetaMin: decides whether the Jacobian should be recomputed */
+   if (RCNTRL[7] == ZERO)
+  	ThetaMin = (KPP_REAL)1.0e-03;
+   else {
+	ThetaMin = RCNTRL[7];
+	if (ThetaMin <= (KPP_REAL)0.0 || ThetaMin >= (KPP_REAL)1.0) {
+		printf("\n RCNTRL[7]=%f\n", RCNTRL[7]);
+		RK_ErrorMsg(-5, T, ZERO, IERR);
+	}
+   } /* end if */
+ /*~~~> NewtonTol: stopping criterion for Newton's method */
+   if (RCNTRL[8] == ZERO)
+	NewtonTol = (KPP_REAL)3.0e-02;
+   else {
+	NewtonTol = RCNTRL[8];
+  	if (NewtonTol <= Roundoff) {
+		printf("\n RCNTRL[8]=%f\n", RCNTRL[8]);
+		RK_ErrorMsg(-6, T, ZERO, IERR);
+	}
+   } /* end if */
+ /*~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const. */
+   if (RCNTRL[9] == ZERO) {
+	Qmin = ONE;
+   }
+   else {
+	Qmin = RCNTRL[9];
+   } /* end if */
+   if (RCNTRL[10] == ZERO) {
+	Qmax = (KPP_REAL)1.2;
+   }
+   else {
+	Qmax = RCNTRL[10];
+   } /* end if */
+   if (Qmin > ONE || Qmax < ONE) {
+	printf("\n RCNTRL[9]=%f\n", Qmin);
+	printf("\n RCNTRL[10]=%f\n", Qmax);
+	RK_ErrorMsg(-7, T, ZERO, IERR);
+   } /* end if */
+ /*~~~> Check if tolerances are reasonable */
+   if (ITOL == 0) {
+	if ( AbsTol[0] <= ZERO || RelTol[0] <= ( ((KPP_REAL)10.0)*Roundoff) ) {
+	   printf("\n AbsTol=%f\n", AbsTol[0]);
+	   printf("\n RelTol=%f\n", RelTol[0]);
+	   RK_ErrorMsg(-8, T, ZERO, IERR);
+	}
+   }
+   else {
+	for (i = 0; i < N; i++) {
+	   if ( (AbsTol[i] <= ZERO) || (RelTol[i] <= ((KPP_REAL)10.0)*Roundoff) ) {
+                printf("\n AbsTol[%d] = %f\n", i, AbsTol[i]);
+		printf("\n AbsTol[%d] = %f\n", i, RelTol[i]);
+		RK_ErrorMsg(-8, T, ZERO, IERR);
+	   } /* end if */
+	} /* end for */
+   } /* end if */
+
+ /*~~~> Parameters are wrong */
+   if (*IERR < 0)
+	return;
+
+ /*~~~> Call the core method */	
+   RK_Integrator(N, &T, Tend, Y, AbsTol, RelTol, ITOL, ISTATUS, RSTATUS,
+		   Hmin, Hmax, Hstart, Roundoff, Max_no_steps, NewtonMaxit,
+		   StartNewton, Gustafsson, ThetaMin, NewtonTol,
+		   FacSafe, FacMax, FacMin, FacRej, Qmin, Qmax, IERR);
+  /*printf("*IERR = %d\n", *IERR);*/
+  /*printf("Ending RungeKutta\n");*/
+} /* RungeKutta */
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_Integrator( int N, 
+	/*~~~> Input: integration interval */        
+     	KPP_REAL*  T, KPP_REAL  Tend, KPP_REAL Y[],
+     	KPP_REAL AbsTol[], KPP_REAL RelTol[], int ITOL,
+  /*~~~> Input: the initial condition at T; output: the solution at Tend */     
+     	int ISTATUS[], KPP_REAL RSTATUS[], KPP_REAL Hmin, KPP_REAL Hmax, 
+	KPP_REAL Hstart, KPP_REAL Roundoff, int Max_no_steps, int NewtonMaxit,
+       	int StartNewton, int Gustafsson, KPP_REAL ThetaMin,
+       	KPP_REAL NewtonTol, KPP_REAL FacSafe, KPP_REAL FacMax, KPP_REAL FacMin,
+     	KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int* IERR)
+{  
+   /*printf("Starting RK_Integrator\n");*/
+   KPP_REAL FJAC[LU_NONZERO],
+  	  E1[LU_NONZERO],
+	  E2R[LU_NONZERO],
+	  E2I[LU_NONZERO];
+   KPP_REAL Z1[NVAR],
+  	  Z2[NVAR],
+	  Z3[NVAR],
+	  Z4[NVAR],
+	  SCAL[NVAR],
+	  DZ1[NVAR],
+	  DZ2[NVAR],
+	  DZ3[NVAR],
+	  DZ4[NVAR],
+	  G[NVAR],
+	  TMP[NVAR],
+	  FO[NVAR];   
+   KPP_REAL CONT[NVAR][RKmax],
+  	  Tdirection,
+	  H,
+	  Hacc,
+	  Hnew,
+	  Hold,
+	  Fac,
+	  FacGus, 
+   	  Theta,
+	  Err,
+	  ErrOld,
+	  NewtonRate,
+	  NewtonIncrement,
+	  Hratio,
+	  Qnewton, 
+	  NewtonPredictedErr,
+	  NewtonIncrementOld,
+	  ThetaSD;
+   int IP1[NVAR],
+       IP2[NVAR],
+       NewtonIter,
+       Nconsecutive,
+       i;
+   int ISING;
+   int Reject,
+       FirstStep,
+       SkipJac,
+       NewtonDone,
+       SkipLU;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  /*~~~>  INITIAL setting */
+   /*printf("ONE=%f Tend-*T=%f\n", ONE, Tend-*T);*/
+   Tdirection = SIGN(ONE, Tend-*T);
+   /*printf("Tdirection=%f\n", Tdirection);*/
+   /*printf("Hmin=%g Hstart=%g \n", Hmin, Hstart);*/
+   /*printf("ABS(Hmin)=%g ABS(Hstart)=%g \n", ABS(Hmin), ABS(Hstart));*/
+   H = MIN( MAX(ABS(Hmin), ABS(Hstart)), Hmax ); 
+   if (ABS(H) <= ((KPP_REAL)10.0*Roundoff)) {
+	/*printf("Entering if ABS(H)=%g <= 10.0*Roundoff=%g\n", ABS(H),(KPP_REAL)10.0*Roundoff);*/
+        H = (KPP_REAL)(1.0e-06);
+   } /* end if */
+   H = SIGN(H, Tdirection);
+   Hold = H;
+   /*printf("Hold=%f\n", Hold);*/ 
+   Reject = 0;
+   FirstStep = 1;
+   SkipJac = 0;
+   SkipLU = 0;
+   if ((*T+H*((KPP_REAL)1.0001)-Tend)*Tdirection >= ZERO) {   
+	H = Tend - *T;
+   } /* end if */
+   Nconsecutive = 0;
+   RK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+   /*for(i=0; i<NVAR; i++) {
+        printf("AbsTol=%g RelTol=%g Y=%g SCAL=%g \n", AbsTol[i], RelTol[i], Y[i], SCAL[i] );
+   }*/
+   
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  /*~~~> Time loop begins */ 
+  /* while Tloop */
+Tloop:   while ( (Tend-*T)*Tdirection - Roundoff > ZERO ) {
+      /*printf("Starting Tloop: (Tend-*T)*Tdirection - Roundoff=%g > ZERO\n", (Tend-*T)*Tdirection-Roundoff);*/
+      /*if ( Reject == 0 ) { */
+	FUN_CHEM(*T,Y,FO);
+	ISTATUS[Nfun]++;
+      /* } * end if */ 
+      if ( SkipLU == 0 ) { /* This time around skip the Jac update and LU */
+	/*~~~> Compute the Jacobian matrix */
+	/*printf("Entering if SkipLU == 0\n");*/
+	if ( SkipJac == 0 ) {
+	   /*printf("Entering if SkipJac == 0\n");*/
+	   JAC_CHEM(*T,Y,FJAC);
+	   ISTATUS[Njac]++;
+	} /* end if */
+	/*~~~> Compute the matrices E1 and E2 and their decompositions */
+	RK_Decomp(N,H,FJAC,E1,IP1,E2R,E2I,IP2,&ISING,ISTATUS);
+	/*printf("ISING=%d\n", ISING);*/
+	if ( ISING != 0 ) {
+	   /*printf("Entering if ISING != 0\n");*/
+	   ISTATUS[Nsng]++;
+	   Nconsecutive++;
+	   if (Nconsecutive >= 5) {
+		RK_ErrorMsg(-12,*T,H,IERR);
+	   }
+	   H = H * ((KPP_REAL)0.5);
+	   Reject = 1;
+	   SkipJac = 1;
+	   SkipLU = 0;
+	   goto Tloop;
+	}
+	else {
+	   /*printf("Entering if ISING == 0\n");*/
+	   Nconsecutive = 0;
+	} /* end if */
+      } /* end if !SkipLU */
+
+      /*printf("NSTEPS=%d\n", ISTATUS[Nstp]);*/
+      ISTATUS[Nstp]++;
+      /*printf("NSTEPS=%d\n", ISTATUS[Nstp]);*/
+      if (ISTATUS[Nstp] > Max_no_steps) {
+	printf("\n Max number of time steps is = %d", Max_no_steps);
+	RK_ErrorMsg(-9,*T,H,IERR);
+      } /* end if */
+      if (((KPP_REAL)0.1)*ABS(H) <= ABS(*T)*Roundoff)
+	RK_ErrorMsg(-10,*T,H,IERR);
+ 
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~>  Loop for the simplified Newton iterations */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+      /*~~~> Starting values for Newton iteration */  
+      if ( (FirstStep == 1) || (StartNewton == 0) ) {
+	/*printf("Entering if FirstStep or Not StartNewton\n");*/
+	Set2Zero(N,Z1);
+	Set2Zero(N,Z2);
+	Set2Zero(N,Z3);
+      }
+      else
+      {
+    	/* Evaluate quadratic polynomial */
+   	RK_Interpolate("eval",N,H,Hold,Z1,Z2,Z3,CONT);
+      } /* end if */
+
+      /*~~~> Initializations for Newton iteration */
+      NewtonDone = 0;
+      Fac = (KPP_REAL)0.5; /* Step reduction if too many iterations */
+  
+      /* for NewtonLoop */
+      for (NewtonIter = 1; NewtonIter <= NewtonMaxit; NewtonIter++)
+      {
+	/*printf("Starting NewtonIter loop: NewtonIter=%d\n", NewtonIter);*/
+   	/* Prepare the right-hand side */
+      	RK_PrepareRHS(N,*T,H,Y,FO,Z1,Z2,Z3,DZ1,DZ2,DZ3);
+
+	/* Solve the linear systems */
+  	RK_Solve(N,H,E1,IP1,E2R,E2I,IP2,DZ1,DZ2,DZ3,ISTATUS);
+
+	NewtonIncrement = 
+		SQRT((RK_ErrorNorm(N,SCAL,DZ1) * RK_ErrorNorm(N,SCAL,DZ1)
+		    + RK_ErrorNorm(N,SCAL,DZ2) * RK_ErrorNorm(N,SCAL,DZ2) 
+		    + RK_ErrorNorm(N,SCAL,DZ3) * RK_ErrorNorm(N,SCAL,DZ3))
+	            / (KPP_REAL)3.0 );
+	/*printf( "NewtonIncrement=%g \n", NewtonIncrement );*/
+	if (NewtonIter == 1) {
+	   /*printf("Entering NewtonIter=%d == 1\n", NewtonIter);*/
+	   Theta = ABS(ThetaMin);
+	   NewtonRate = (KPP_REAL)2.0;
+	}
+	else {
+	   /*printf("Entering else from NewtonIter=%d == 1\n", NewtonIter);*/
+	   Theta = NewtonIncrement / NewtonIncrementOld;
+	   /*printf("Theta=%f\n", Theta);*/
+	   if (Theta < (KPP_REAL)0.99) {
+		/*printf( "Entering if Theta=%g < 0.99\n", Theta );*/
+		NewtonRate = Theta / (ONE-Theta);
+	   }
+	   else { /* Non-convergence of Newton: Theta too large */
+       	      break; /* EXIT NewtonLoop */
+	   } /* end if */
+	   if (NewtonIter < NewtonMaxit) {
+	      /*printf("Entering if NewtonIter=%d < NewtonMaxit=%d\n", NewtonIter, NewtonMaxit);*/
+	      /* Predict error at the end of Newton process */
+ 	      NewtonPredictedErr = NewtonIncrement
+                             *pow(Theta,(NewtonMaxit-NewtonIter))/(ONE-Theta);
+	      /*printf("NewtonRate=%g NewtonPredictedErr=%g \n", NewtonRate, NewtonPredictedErr);*/
+	      if (NewtonPredictedErr >= NewtonTol) {
+		/*printf( "Entering if NewtonPredictedErr=%g >= NewtonTol%g \n", NewtonPredictedErr, NewtonTol );*/
+	      	/* Non-convergence of Newton: predicted error too large */
+	        Qnewton = MIN((KPP_REAL)10.0, NewtonPredictedErr/NewtonTol);
+	        Fac = (KPP_REAL)0.8*pow(Qnewton,(-ONE/(1+NewtonMaxit-NewtonIter)));
+	        break; /* EXIT NewtonLoop */
+	      } /* end if */
+	   } /* end if */
+   	} /* end if */
+	    
+   	NewtonIncrementOld = MAX(NewtonIncrement, Roundoff);
+	/*printf("NewtonIncrementOld=%f\n", NewtonIncrementOld);*/
+  	/*~~~> Update solution */
+   	WAXPY(N,-ONE,DZ1,1,Z1,1);	/* Z1 <- Z1 - DZ1 */
+   	WAXPY(N,-ONE,DZ2,1,Z2,1);	/* Z2 <- Z2 - DZ2 */
+   	WAXPY(N,-ONE,DZ3,1,Z3,1);	/* Z3 <- Z3 - DZ3 */
+        /*for(i=0; i<N; i++) 
+	   printf("DZ1[%d]=%g Z1[%d]=%g\n", i, DZ1[i], i, Z1[i]);*/
+  	/*~~~> Check error in Newton iterations */
+	/*printf( "NewtonRate=%g NewtonIncrement=%g NewtonTol=%g \n", NewtonRate, NewtonIncrement, NewtonTol );*/
+	NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol);
+	/*printf( "NewtonDone=%d \n", NewtonDone );*/
+   	if (NewtonDone == 1)
+	   break; /* Exit NewtonLoop */
+   	if (NewtonIter == NewtonMaxit)
+   	{
+	   printf("\n Slow or no convergence in Newton Iteration:");
+	   printf(" Max no. of Newton iterations reached");
+   	} /* end if */
+      }/* end for NewtonLoop */
+
+      if ( NewtonDone == 0)
+      {
+	/*printf( "Entering if NewtonDone == 0\n" );*/
+	/*RK_ErrorMsg(-12,*T,H,IERR); */
+	H = Fac*H;
+	Reject  = 1;
+	SkipJac = 1;
+	SkipLU  = 0;
+	goto Tloop;
+      } /* end if */
+
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~> SDIRK Stage */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      if (SdirkError == 1)
+      {
+	/*printf("Entering if SdirkError=%d==1\n", SdirkError);*/
+      	/*~~~> Starting values for Newton iterations */
+   	for (i = 0; i < N; i++)
+	{
+	   Z4[i] = Z3[i];
+ 	}
+      	/*~~~> Prepare the loop-independent part of the right-hand side */
+      	/* G = H*rkBgam(0)*FO + rkTheta(1)*Z1 
+		+ rkTheta(2)*Z2 + rkTheta(3)*Z3; */
+      	Set2Zero(N,G);
+      	if (rkMethod != L3A)
+	   WAXPY(N,rkBgam[0]*H, FO,1,G,1);
+      	WAXPY(N,rkTheta[0],Z1,1,G,1);  
+      	WAXPY(N,rkTheta[1],Z2,1,G,1);  
+      	WAXPY(N,rkTheta[2],Z3,1,G,1);  
+
+      	/*~~~> Initializations for Newton iteration */
+      	NewtonDone = 0;
+      	Fac = (KPP_REAL)0.5; /* Step reduction factor if too many iterations */
+
+      	/* for SDNewtonLoop */
+      	for (NewtonIter = 1; NewtonIter <= NewtonMaxit; NewtonIter++)
+      	{
+	   /*printf("Starting NewtonIter loop: NewtonIter=%d\n", NewtonIter);*/
+	   /*~~~> Prepare the loop-dependent part of right-hand side */
+	   WADD(N,Y,Z4,TMP);	/* TMP <- Y + Z4 */
+	   FUN_CHEM(*T+H,TMP,DZ4);	/* DZ4 <- Fun(Y+Z4) */
+	   ISTATUS[Nfun]++;
+	   /* DZ4[1,N] = (D[1, N]-Z4[1,N])*(rkGamma/H) + DZ4[1,N]; */
+	   WAXPY(N,-ONE*rkGamma/H,Z4,1,DZ4,1);
+	   WAXPY(N,rkGamma/H,G,1,DZ4,1);
+
+	   /*~~~> Solve the linear system */
+	   KppSolve(E1, DZ4);
+	   /*~~~> Note: for a full matrix use Lapack:
+		DGETRS('N', 5, 1, E1, N, IP1, DZ4, 5, ISING) */
+
+	   /*~~~> Check convergence of Newton iterations */
+	   NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4);
+	   /*printf( "NewtonIncrement=%g \n", NewtonIncrement );*/
+	   if (NewtonIter == 1) {
+	      /*printf("Entering NewtonIter=%d == 1\n", NewtonIter);*/
+	      ThetaSD = ABS(ThetaMin);
+              NewtonRate = (KPP_REAL)2.0;
+	   }
+	   else {
+	      /*printf("Entering else from NewtonIter=%d == 1\n", NewtonIter);*/
+	      ThetaSD = NewtonIncrement / NewtonIncrementOld;
+	      if (ThetaSD < (KPP_REAL)0.99) {
+		/*printf( "Entering if Theta=%g < 0.99\n", Theta );*/
+		NewtonRate = ThetaSD / (ONE-ThetaSD);
+		/* Predict error at the end of Newton process */
+		NewtonPredictedErr = NewtonIncrement
+			*pow(ThetaSD,(NewtonMaxit-NewtonIter))/(ONE-ThetaSD);
+	        /*printf("NewtonRate=%g NewtonPredictedErr=%g \n", NewtonRate, NewtonPredictedErr);*/
+		if (NewtonPredictedErr >= NewtonTol) {
+		   /*printf( "Entering if NewtonPredictedErr=%g >= NewtonTol%g \n", NewtonPredictedErr, NewtonTol );*/
+		   /* Non-convergence of Newton: predicted error too large */
+		   /* printf("\n Error too large", NewtonPredictedErr); */
+		   Qnewton = MIN((KPP_REAL)10.0,NewtonPredictedErr/NewtonTol);
+		   Fac = (KPP_REAL)0.8*pow(Qnewton,(-ONE/(1+NewtonMaxit-NewtonIter)));
+		   break; /* EXIT SDNewtonLoop */
+		} /* end if */
+	      }
+	      /* Non-convergence of Newton: Theta too large */
+	      else {
+		/* prinf("\n Theta too large", ThetaSD); */
+		break; /* EXIT SDNewtonLoop */
+	      } /* end if */
+	   } /* end if */
+     	   NewtonIncrementOld = NewtonIncrement;
+	   /*printf("NewtonIncrementOld=%f\n", NewtonIncrementOld);*/
+	   /* Update solution: Z4 <-- Z4 + DZ4; */
+	   WAXPY(N,ONE,DZ4,1,Z4,1);
+
+	   /* Check error in Newton iterations */
+	   NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol);
+	   /*printf( "NewtonDone=%d \n", NewtonDone );*/
+	   if (NewtonDone == 1)
+		break;	/* EXIT SDNewtonLoop */
+      	} /* end for SDNewtonLoop */
+      
+      	if ( NewtonDone == 0 ) {
+	   /*printf( "Entering if NewtonDone == 0\n" );*/
+	   H       = Fac*H;
+	   Reject  = 1;
+	   SkipJac = 1;
+	   SkipLU  = 0;
+	   goto Tloop;
+      	} /* end if */
+      } /* end if */
+      /*~~~> End of implified SDIRK Newton iterations */
+
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~> Error estimation */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      if (SdirkError == 1) {
+      	Set2Zero(N, DZ4);
+      	if (rkMethod == L3A) {
+	   for (i = 0; i < N; i++)
+		DZ4[i] = H*rkF[0]*FO[i];
+	   if (rkF[0] != ZERO)
+		WAXPY(N, rkF[0], Z1, 1, DZ4, 1);
+	   if (rkF[1] != ZERO)
+		WAXPY(N, rkF[1], Z2, 1, DZ4, 1);
+	   if (rkF[2] != ZERO)
+		WAXPY(N, rkF[2], Z3, 1, DZ4, 1);
+	   for (i = 0; i < N; i++)
+		 TMP[i] = Y[i] + Z4[i];
+	   FUN_CHEM(*T+H, TMP, DZ1);
+	   WAXPY(N, H*rkBgam[4], DZ1, 1, DZ4, 1);
+      	}
+      	else {
+	   /* DZ4(1,N) = rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4; */
+	   if (rkD[0] != ZERO)
+		WAXPY(N, rkD[0], Z1, 1, DZ4, 1);
+	   if (rkD[1] != ZERO)
+		WAXPY(N, rkD[1], Z2, 1, DZ4, 1);
+	   if (rkD[2] != ZERO)
+		WAXPY(N, rkD[2], Z3, 1, DZ4, 1);
+	   WAXPY(N, -ONE, Z4, 1, DZ4, 1);
+      	} /* end if */
+      	Err = RK_ErrorNorm(N,SCAL,DZ4);
+      }
+      else
+      {
+      	RK_ErrorEstimate(N,H,*T,Y,FO,E1,IP1,Z1,Z2,Z3,SCAL,&Err,
+			FirstStep,Reject,ISTATUS);
+      } /* end if */
+
+      /*~~~> Computation of new step size Hnew */
+      Fac = pow(Err, (-ONE/rkELO))
+	    *MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit));
+      Fac = MIN(FacMax,MAX(FacMin,Fac));
+      Hnew = Fac*H;
+
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~> Accept/reject step */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      // accept:
+      if (Err < ONE) { /*~~~> STEP IS ACCEPTED */
+      	FirstStep = 0;
+      	ISTATUS[Nacc]++;
+      	if (Gustafsson == 1) {
+	   /*~~~> Predictive controller of Gustafsson */
+	   if (ISTATUS[Nacc] > 1) {
+	      FacGus = FacSafe*(H/Hacc)*pow(Err*Err/ErrOld,(KPP_REAL)(-0.25));
+	      FacGus = MIN(FacMax,MAX(FacMin,FacGus));
+	      Fac = MIN(Fac,FacGus);	
+	      Hnew = Fac*H;
+	   } /* end if */
+	   Hacc = H;
+	   ErrOld = MAX((KPP_REAL)1.0e-02,Err);
+      	} /* end if */
+        Hold = H;
+      	*T = *T + H;
+      	/* Update solution: Y <- Y + sum(d_i Z-i) */
+      	if (rkD[0] != ZERO)
+	   WAXPY(N, rkD[0], Z1, 1, Y, 1);
+      	if (rkD[1] != ZERO)
+	   WAXPY(N, rkD[1], Z2, 1, Y, 1);
+      	if (rkD[2] != ZERO)
+	   WAXPY(N, rkD[2], Z3, 1, Y, 1);
+      	/* Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3 */
+      	if (StartNewton == 1)
+	   RK_Interpolate("make",N,H,Hold,Z1,Z2,Z3,CONT);
+      	RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL);
+	RSTATUS[Ntexit] = *T;
+	RSTATUS[Nhnew] = Hnew;
+	RSTATUS[Nhacc] = H;
+      	Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin), Hmax );
+      	if (Reject == 1)
+	   Hnew = Tdirection*MIN(ABS(Hnew),ABS(H));
+      	Reject = 0;
+      	if ((*T+Hnew/Qmin-Tend)*Tdirection >= ZERO)
+	   H = Tend - *T;
+      	else {
+	   Hratio = Hnew/H;
+	   /* Reuse the LU decomposition */
+	   SkipLU = (Theta <= ThetaMin) && (Hratio >= Qmin) && (Hratio <= Qmax);
+	   if ( SkipLU == 0)
+	   	H = Hnew;
+        } /* end if */
+        /* If convergence is fast enough, do not update Jacobian */
+      	/* SkipJac = (Theta <= ThetaMin); */
+      	SkipJac = 0;
+      }
+
+      /*~~~> Step is rejected */
+      else {
+      	if ((FirstStep == 1)  || (Reject == 1))
+	   H = FacRej*H;
+        else
+	   H = Hnew;
+        Reject  = 1;
+        SkipJac = 1; /* Skip if rejected - Jac is independent of H */
+        SkipLU  = 0;
+      	if (ISTATUS[Nacc] >= 1)
+	   ISTATUS[Nrej]++;
+      } /* end if accept */
+   } /* while: time Tloop */
+ 
+   /*~~~> Successful exit */
+   *IERR = 1;
+
+} /* RK_Integrator */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	Handles all error messages and returns IERR = error Code
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H, int* IERR)
+{
+   Code = *IERR;
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
+   printf("\nForced exit from RungeKutta due to the following error:\n");
+
+   switch (Code) {
+   case -1:
+      printf("--> Improper value for maximal no of steps");
+      break;
+   case -2:
+      printf("--> Improper value for maximal no of Newton iterations");
+      break;
+   case -3:
+      printf("--> Hmin/Hmax/Hstart must be positive");
+      break;
+   case -4:
+      printf("--> Improper values for FacMin/FacMax/FacSafe/FacRej");
+      break;
+   case -5:
+      printf("--> Improper value for ThetaMin");
+      break;
+   case -6:
+      printf("--> Newton stopping tolerance too small");
+      break;
+   case -7:
+      printf("--> Improper values for Qmin, Qmax");
+      break;
+   case -8:
+      printf("--> Tolerances are too small");
+      break;
+   case -9:
+      printf("--> No of steps exceeds maximum bound");
+      break;
+   case -10:
+      printf("--> Step size too small: (T + 10*H = T) or H < Roundoff");
+      break;
+   case -11:
+      printf("--> Matrix is repeatedly singular");
+      break;
+   case -12:
+      printf("--> Non-convergence of Newton iterations");
+      break;
+   case -13:
+      printf("--> Requested RK method not implemented");
+      break;
+   default:
+      printf("Unknown Error code: %d \n", Code);
+   } /* end switch */ 
+
+   printf("\n     T=%e,  H =%e", T, H);
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
+
+} /* RK_ErrorMsg */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*	Handles all error messages and returns SCAL */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_ErrorScale(int N, 
+   /*~~~> Input arguments: */
+	int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[], KPP_REAL Y[],
+   /*~~~> Output arguments: */
+	KPP_REAL SCAL[])
+{
+   /*printf("Starting RK_ErrorScale\n");*/
+   int i;
+   if (ITOL == 0) {
+	for (i = 0; i < N; i++) {
+	   SCAL[i] = ONE/(AbsTol[0]+RelTol[0]*ABS(Y[i]));
+	} /* end for loop*/
+   }
+   else {
+	for (i = 0; i< N; i++) {
+	   SCAL[i] = ONE/(AbsTol[i]+RelTol[i]*ABS(Y[i]));
+	} /* end for loop */
+   } /* end if */
+   /*printf("Ending RK_ErrorScale\n");*/
+} /* RK_ErrorScale */  
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+void RK_Transform(int N, KPP_REAL Tr[][3], KPP_REAL Z1[], KPP_REAL Z2[],
+		KPP_REAL Z3[], KPP_REAL W1[], KPP_REAL W2[], KPP_REAL W3[])
+-->	W <-- Tr x Z 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+{
+   int i;
+   KPP_REAL x1,x2,x3;
+   for (i = 0; i < N; i++)
+   {
+	x1 = Z1[i];
+	x2 = Z2[i]; 
+	x3 = Z3[i]; 
+	W1[i] = Tr[0][0]*x1 + Tr[0][1]*x2 + Tr[0][2]*x3;
+	W2[i] = Tr[1][0]*x1 + Tr[1][1]*x2 + Tr[1][2]*x3;
+	W1[i] = Tr[2][0]*x1 + Tr[2][1]*x2 + Tr[2][2]*x3;
+   }  end for loop
+}  end RK_Transform */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*--> Constructs or evaluates a quadratic polynomial that
+      interpolates the Z solution at current step and
+      provides starting values for the next step
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_Interpolate(char action[], int N, KPP_REAL H, KPP_REAL Hold, KPP_REAL Z1[],
+	KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL CONT[][RKmax])
+{
+   int i;
+   KPP_REAL r,x1,x2,x3,den;
+ 
+   /* Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3 */
+   if (action == "make") {
+	den = (rkC[2]-rkC[1])*(rkC[1]-rkC[0])*(rkC[0]-rkC[2]);
+	for (i = 0; i < N; i++)
+	{
+	   CONT[i][0] = (-rkC[2]*rkC[2]*rkC[1]*Z1[i]
+			+Z3[i]*rkC[1]*rkC[0]*rkC[0]
+	   		+rkC[1]*rkC[1]*rkC[2]*Z1[i]
+	   		-rkC[1]*rkC[1]*rkC[0]*Z3[i]
+	   		+rkC[2]*rkC[2]*rkC[0]*Z2[i]
+	   		-Z2[i]*rkC[2]*rkC[0]*rkC[0])/den-Z3[i];
+	   CONT[i][1] = -( rkC[0]*rkC[0]*(Z3[i]-Z2[i])
+	   		+ rkC[1]*rkC[1]*(Z1[i]-Z3[i])
+	   		+ rkC[2]*rkC[2]*(Z2[i]-Z1[i]) )/den;
+	   CONT[i][2] = ( rkC[0]*(Z3[i]-Z2[i])
+	   		+ rkC[1]*(Z1[i]-Z3[i])
+	   		+ rkC[2]*(Z2[i]-Z1[i]) )/den;
+	} /* end for loop */
+   }
+   /* Evaluate quadratic polynomial */
+   else if (action == "eval") {
+   	r  = H / Hold;
+	x1 = ONE + rkC[0]*r;
+	x2 = ONE + rkC[1]*r;
+	x3 = ONE + rkC[2]*r;
+	for (i = 0; i < N; i++)
+	{
+	   Z1[i] = CONT[i][0]+x1*(CONT[i][1]+x1*CONT[i][2]);	
+	   Z2[i] = CONT[i][0]+x2*(CONT[i][1]+x2*CONT[i][2]);	
+	   Z3[i] = CONT[i][0]+x3*(CONT[i][1]+x3*CONT[i][2]);
+	} /* end for loop */
+   } /* end if */
+} /* RK_Interpolate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~> Prepare the right-hand side for Newton iterations
+       R = Z - hA x F
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_PrepareRHS(int N, KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL FO[],
+	KPP_REAL Z1[], KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL R1[], KPP_REAL R2[],
+	KPP_REAL R3[])
+{
+   KPP_REAL TMP[N], F[N];
+   WCOPY(N,Z1,1,R1,1); /* R1 <- Z1 */	
+   WCOPY(N,Z2,1,R2,1); /* R2 <- Z2 */	
+   WCOPY(N,Z3,1,R3,1); /* R3 <- Z3 */	
+ 
+   if (rkMethod == L3A)
+   {
+	WAXPY(N,-H*rkA[0][0],FO,1,R1,1); /* R1 <- R1 - h*A_10*FO */
+	WAXPY(N,-H*rkA[1][0],FO,1,R2,1); /* R2 <- R2 - h*A_20*FO */
+	WAXPY(N,-H*rkA[2][0],FO,1,R3,1); /* R3 <- R3 - h*A_30*FO */
+   } /* end if */
+
+   WADD(N,Y,Z1,TMP);			/* TMP <- Y + Z1 */
+   FUN_CHEM(T+rkC[0]*H,TMP,F);		/* F1 <- Fun(Y+Z1) */
+   WAXPY(N,-H*rkA[0][0],F,1,R1,1); 	/* R1 <- R1 - h*A_11*F1 */
+   WAXPY(N,-H*rkA[1][0],F,1,R2,1); 	/* R2 <- R2 - h*A_21*F1 */
+   WAXPY(N,-H*rkA[2][0],F,1,R3,1); 	/* R3 <- R3 - h*A_31*F1 */
+
+   WADD(N,Y,Z2,TMP);			/* TMP <- Y + Z2 */
+   FUN_CHEM(T+rkC[1]*H,TMP,F);		/* F2 <- Fun(Y+Z2) */
+   WAXPY(N,-H*rkA[0][1],F,1,R1,1); 	/* R1 <- R1 - h*A_12*F2 */
+   WAXPY(N,-H*rkA[1][1],F,1,R2,1); 	/* R2 <- R2 - h*A_22*F2 */
+   WAXPY(N,-H*rkA[2][1],F,1,R3,1); 	/* R3 <- R3 - h*A_32*F2 */
+
+   WADD(N,Y,Z3,TMP);			/* TMP <- Y + Z3 */
+   FUN_CHEM(T+rkC[2]*H,TMP,F);		/* F3 <- Fun(Y+Z3) */
+   WAXPY(N,-H*rkA[0][2],F,1,R1,1); 	/* R1 <- R1 - h*A_13*F3 */
+   WAXPY(N,-H*rkA[1][2],F,1,R2,1); 	/* R2 <- R2 - h*A_23*F3 */
+   WAXPY(N,-H*rkA[2][2],F,1,R3,1); 	/* R3 <- R3 - h*A_33*F3 */
+} /* RK_PrepareRHS */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~> Compute the matrices E1 and E2 and their decompositions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_Decomp(int N, KPP_REAL H, KPP_REAL FJAC[], KPP_REAL E1[],
+	int IP1[], KPP_REAL E2R[], KPP_REAL E2I[], int IP2[], 
+	int* ISING, int ISTATUS[]) 
+{
+   /*printf("Starting RK_Decomp\n");*/
+   KPP_REAL Alpha, Beta, Gamma;
+   int i,j;
+
+   Gamma = rkGamma / H;
+   Alpha = rkAlpha / H;
+   Beta  = rkBeta / H;
+
+   for (i = 0; i < LU_NONZERO; i++) {
+	E1[i] = -FJAC[i];
+   }
+   for (i = 0; i < NVAR; i++) {
+	j = LU_DIAG[i];
+	E1[j] = E1[j] + Gamma;
+   }
+   *ISING = KppDecomp(E1);
+   /*~~~> Note: for a full matrix use Lapack:
+   for (j = 0; j < N; j++) {
+	for (i = 0; i < N; i++)
+	{  
+	   E1[i,j] = -FJAC[i][j];
+	}
+	E1[i][j] = E1[i][j]+Gamma;
+   }
+   DGETRF(N, N, E1, N, IP1, ISING); */
+
+   if (*ISING != 0) {
+	/*printf("Matrix is singular, ISING=%d\n", *ISING);*/
+	ISTATUS[Ndec]++;
+	return;
+   }
+
+   for (i = 0; i < LU_NONZERO; i++) {
+	E2R[i] = (KPP_REAL)(-FJAC[i]);
+	E2I[i] = ZERO;
+   }
+   for (i = 0; i < NVAR; i++) {
+	j = LU_DIAG[i];
+	E2R[j] = E2R[j] + Alpha;
+	E2I[j] = E2I[j] + Beta;
+   }
+   *ISING = KppDecompCmplxR(E2R, E2I);
+   /*printf("Matrix is singular, ISING=%d\n", *ISING);*/
+   /*~~~> Note: for a full matrix use Lapack:
+   for (j = 0; j < N; j++) {
+      	for (i = 0; i < N; i++) {
+	   E2[i,j] = DCMPLX( -FJAC[i,j], ZERO );
+	}
+	E2[j,j] = E2[j,j] + CMPLX( Alpha, Beta );
+   }
+   ZGETRF(N,N,E2,N,IP2,ISING); */
+   ISTATUS[Ndec]++;
+} /*RK_Decomp */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 
+void RK_Solve(int N, KPP_REAL H, KPP_REAL E1[], int IP1[], KPP_REAL E2R[],
+	KPP_REAL E2I[], int IP2[],KPP_REAL R1[], KPP_REAL R2[], KPP_REAL R3[],
+	int ISTATUS[])
+{
+   KPP_REAL x1, x2, x3;
+   KPP_REAL BCR[N], BCI[N];
+   int i;
+
+   /* Z <- h^{-1) T^{-1) A^{-1) x Z */
+   for (i = 0; i < N; i++)
+   {
+	x1 = R1[i]/H;
+	x2 = R2[i]/H;
+	x3 = R3[i]/H;
+        R1[i] = rkTinvAinv[0][0]*x1 + rkTinvAinv[0][1]*x2 + rkTinvAinv[0][2]*x3;
+	R2[i] = rkTinvAinv[1][0]*x1 + rkTinvAinv[1][1]*x2 + rkTinvAinv[1][2]*x3;
+	R3[i] = rkTinvAinv[2][0]*x1 + rkTinvAinv[2][1]*x2 + rkTinvAinv[2][2]*x3;
+   } 
+   KppSolve(E1,R1);
+   /*~~~> Note: for a full matrix use Lapack:
+   DGETRS('N',5,1,E1,N,IP1,R1,5,0); */
+   for(i = 0; i < N; i++)
+   {
+        BCR[i] = (KPP_REAL)(R2[i]);
+        BCI[i] = (KPP_REAL)(R3[i]);
+   }
+   KppSolveCmplxR(E2R,E2I,BCR,BCI);
+   /*~~~> Note: for a full matrix use Lapack:
+   ZGETRS ('N',N,1,E2,N,IP2,BC,N,0); */
+   for (i = 0; i < N; i++)
+   {
+	R2[i] = (KPP_REAL)( BCR[i] );
+        R3[i] = (KPP_REAL)( BCI[i] );
+   }
+
+   /* Z <- T x Z */
+   for (i = 0; i < N; i++)
+   {
+	x1 = R1[i];
+	x2 = R2[i];
+	x3 = R3[i];
+        R1[i] = rkT[0][0]*x1 + rkT[0][1]*x2 + rkT[0][2]*x3;
+	R2[i] = rkT[1][0]*x1 + rkT[1][1]*x2 + rkT[1][2]*x3;
+	R3[i] = rkT[2][0]*x1 + rkT[2][1]*x2 + rkT[2][2]*x3;
+   } 
+   ISTATUS[Nsol]++;
+} /* RK_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_ErrorEstimate(int N, KPP_REAL H, KPP_REAL T, KPP_REAL Y[], 
+	KPP_REAL FO[], KPP_REAL E1[], int IP1[], KPP_REAL Z1[], 
+	KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL SCAL[], KPP_REAL* Err,
+	int FirstStep, int Reject, int ISTATUS[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   KPP_REAL F1[N],F2[N],TMP[N];
+   KPP_REAL HrkE1,HrkE2,HrkE3;
+   int i;
+
+   HrkE1  = rkE[0]/H;
+   HrkE2  = rkE[1]/H;
+   HrkE3  = rkE[2]/H;
+
+   for (i = 0; i < N; i++)
+   {
+	F2[i]  = HrkE1*Z1[i]+HrkE2*Z2[i]+HrkE3*Z3[i];
+	TMP[i] = rkE[0]*FO[i] + F2[i];
+   }
+   
+   KppSolve(E1, TMP);
+   if ((rkMethod == R1A) || (rkMethod == GAU) || (rkMethod == L3A))
+	KppSolve(E1,TMP);
+   if (rkMethod == GAU)
+	KppSolve(E1,TMP);
+   /*~~~> Note: for a full matrix use Lapack:
+	DGETRS ('N',N,1,E1,N,IP1,TMP,N,0);
+      	if ((rkMethod == R1A) || (rkMethod == GAU) || (rkMethod == L3A))
+	   DGETRS('N',N,1,E1,N,IP1,TMP,N,0);
+   	if (rkMethod == GAU)
+	   DGETRS('N',N,1,E1,N,IP1,TMP,N,0); */
+
+   *Err = RK_ErrorNorm(N,SCAL,TMP);
+
+   if (*Err < ONE)
+	return;
+   /* firej */
+   if ((FirstStep == 1) || (Reject == 1)) {
+	for (i = 0; i < N; i++) {
+	   TMP[i] = Y[i] + TMP[i];
+        } /* end for */
+        FUN_CHEM(T,TMP,F1);
+        ISTATUS[Nfun]++;
+	for (i = 0; i < N; i++) {
+	   TMP[i] = F1[i] + F2[i];
+	} /* end for */
+
+        KppSolve(E1, TMP);
+	/*~~~> Note: for a full matrix use Lapack:
+	   DGETRS ('N',N,1,E1,N,IP1,TMP,N,0); */
+        *Err = RK_ErrorNorm(N,SCAL,TMP);
+   } /* end if firej */
+} /* RK_ErrorEstimate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   KPP_REAL RK_ErrorNorm(int N, KPP_REAL SCAL[], KPP_REAL DY[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   int i;
+   KPP_REAL RK_ErrorNorm = ZERO;
+   for (i = 0; i < N; i++) {
+	RK_ErrorNorm = RK_ErrorNorm + (DY[i]*SCAL[i]) * (DY[i]*SCAL[i]);
+   }    
+   RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), (KPP_REAL)1.0e-10 );
+   return RK_ErrorNorm;
+} /* RK_ErrorNorm */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Radau-2A method
+	(given to ~30 accurate digits)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Radau2A_Coefficients()
+{
+   /*printf("Starting Radau2A\n");*/
+   /* The coefficients of the Radau2A method */
+   KPP_REAL b0;
+   /* b0 = (KPP_REAL)1.0; */
+   if (SdirkError == 1) {
+   	b0 = (KPP_REAL)(0.2e-01);
+	/*printf("b0 = %f\n", b0);*/
+   }
+   else {
+	b0 = (KPP_REAL)(0.5e-01);
+	/*printf("b0 = %f\n", b0);*/
+   } /*end if */
+   /* The coefficients of the Radau2A method */
+   rkMethod = R2A;
+
+   rkA[0][0] = (KPP_REAL)(1.968154772236604258683861429918299e-01);
+   rkA[0][1] = (KPP_REAL)(-6.55354258501983881085227825696087e-02);
+   rkA[0][2] = (KPP_REAL)(2.377097434822015242040823210718965e-02);
+   rkA[1][0] = (KPP_REAL)(3.944243147390872769974116714584975e-01);
+   rkA[1][1] = (KPP_REAL)(2.920734116652284630205027458970589e-01);
+   rkA[1][2] = (KPP_REAL)(-4.154875212599793019818600988496743e-02);
+   rkA[2][0] = (KPP_REAL)(3.764030627004672750500754423692808e-01);
+   rkA[2][1] = (KPP_REAL)(5.124858261884216138388134465196080e-01);
+   rkA[2][2] = (KPP_REAL)(1.111111111111111111111111111111111e-01);
+
+   rkB[0] = (KPP_REAL)(3.764030627004672750500754423692808e-01);
+   rkB[1] = (KPP_REAL)(5.124858261884216138388134465196080e-01);
+   rkB[2] = (KPP_REAL)(1111111111111111111111111111111111e-01);
+
+   rkC[0] = (KPP_REAL)(1.550510257216821901802715925294109e-01);
+   rkC[1] = (KPP_REAL)(6.449489742783178098197284074705891e-01);
+   rkC[2] = ONE;
+
+   /* New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD[0] = ZERO;
+   rkD[1] = ZERO;
+   rkD[2] = ONE;
+   
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE[0] = ONE*b0;
+   rkE[1] = (KPP_REAL)(-10.04880939982741556246032950764708)*b0;
+   rkE[2] = (KPP_REAL)1.382142733160748895793662840980412*b0;
+   rkE[3] = (KPP_REAL)(-.3333333333333333333333333333333333)*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = b0;
+   rkBgam[1] = (KPP_REAL).3764030627004672750500754423692807
+		-(KPP_REAL)1.558078204724922382431975370686279*b0;
+   rkBgam[2] = (KPP_REAL).8914115380582557157653087040196118*b0
+		+(KPP_REAL).5124858261884216138388134465196077;
+   rkBgam[3] = (KPP_REAL)(-.1637777184845662566367174924883037)
+		-(KPP_REAL).3333333333333333333333333333333333*b0;
+   rkBgam[4] = (KPP_REAL).2748888295956773677478286035994148;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)(-1.520677486405081647234271944611547)
+		-(KPP_REAL)10.04880939982741556246032950764708*b0;
+   rkTheta[1] = (KPP_REAL)2.070455145596436382729929151810376
+		+(KPP_REAL)1.382142733160748895793662840980413*b0;
+   rkTheta[2] = (KPP_REAL)(-.3333333333333333333333333333333333)*b0
+		-(KPP_REAL).3744441479783868387391430179970741;
+
+   /* Local order of error estimator */
+   if ( b0 == ZERO)
+   	rkELO  = (KPP_REAL)6.0;
+   else
+        rkELO  = (KPP_REAL)4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    ~~~> Diagonalize the RK matrix:
+    	 rkTinv * inv(rkA) * rkT =
+    	           |  rkGamma      0           0     |
+      	           |      0      rkAlpha   -rkBeta   |
+      	           |      0      rkBeta     rkAlpha  |
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAlpha = (KPP_REAL)2.681082873627752133895790743211112;
+   rkBeta  = (KPP_REAL)3.050430199247410569426377624787569;
+
+   rkT[0][0] = (KPP_REAL)(9.443876248897524148749007950641664e-02);
+   rkT[0][1] = (KPP_REAL)(-1.412552950209542084279903838077973e-01);
+   rkT[0][2] = (KPP_REAL)(-3.00291941051474244918611170890539e-02);
+   rkT[1][0] = (KPP_REAL)(2.502131229653333113765090675125018e-01);
+   rkT[1][1] = (KPP_REAL)(2.041293522937999319959908102983381e-01);
+   rkT[1][2] = (KPP_REAL)(3.829421127572619377954382335998733e-01);
+   rkT[2][0] =  ONE;
+   rkT[2][1] =  ONE;
+   rkT[2][2] =  ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)4.178718591551904727346462658512057;
+   rkTinv[0][1] = (KPP_REAL)(3.27682820761062387082533272429617e-01);
+   rkTinv[0][2] = (KPP_REAL)(5.233764454994495480399309159089876e-01);
+   rkTinv[1][0] = (KPP_REAL)(-4.178718591551904727346462658512057);
+   rkTinv[1][1] = (KPP_REAL)(-3.27682820761062387082533272429617e-01);
+   rkTinv[1][2] = (KPP_REAL)(4.766235545005504519600690840910124e-01);
+   rkTinv[2][0] = (KPP_REAL)(-5.02872634945786875951247343139544e-01);
+   rkTinv[2][1] = (KPP_REAL)2.571926949855605429186785353601676;
+   rkTinv[2][2] = (KPP_REAL)(-5.960392048282249249688219110993024e-01);
+
+   rkTinvAinv[0][0] = (KPP_REAL)(1.520148562492775501049204957366528e+01);
+   rkTinvAinv[0][1] = (KPP_REAL)1.192055789400527921212348994770778;
+   rkTinvAinv[0][2] = (KPP_REAL)1.903956760517560343018332287285119;
+   rkTinvAinv[1][0] = (KPP_REAL)(-9.669512977505946748632625374449567);
+   rkTinvAinv[1][1] = (KPP_REAL)(-8.724028436822336183071773193986487);
+   rkTinvAinv[1][2] = (KPP_REAL)3.096043239482439656981667712714881;
+   rkTinvAinv[2][0] = (KPP_REAL)(-1.409513259499574544876303981551774e+01);
+   rkTinvAinv[2][1] = (KPP_REAL)5.895975725255405108079130152868952;
+   rkTinvAinv[2][2] = (KPP_REAL)(-1.441236197545344702389881889085515e-01);
+
+   rkAinvT[0][0] = (KPP_REAL).3435525649691961614912493915818282;
+   rkAinvT[0][1] = (KPP_REAL)(-.4703191128473198422370558694426832);
+   rkAinvT[0][2] = (KPP_REAL).3503786597113668965366406634269080;
+   rkAinvT[1][0] = (KPP_REAL).9102338692094599309122768354288852;
+   rkAinvT[1][1] = (KPP_REAL)1.715425895757991796035292755937326;
+   rkAinvT[1][2] = (KPP_REAL).4040171993145015239277111187301784;
+   rkAinvT[2][0] = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAinvT[2][1] = (KPP_REAL)2.681082873627752133895790743211112;
+   rkAinvT[2][2] = (KPP_REAL)(-3.050430199247410569426377624787569);
+   /*printf("Ending Radau2A");*/
+} /* Radau2A_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Lobatto-3C method
+	(given to ~30 accurate digits)
+	The parameter b0 can be chosen to tune the error estimator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Lobatto3C_Coefficients ()
+{
+   KPP_REAL b0;	
+   rkMethod = L3C;
+   /* b0 = 1.0d0 */
+   if (SdirkError == 1)
+	b0 = (KPP_REAL)0.2;
+   else
+	b0 = (KPP_REAL)0.5;
+    
+   /* The coefficients of the Lobatto3C method */
+   rkA[0][0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[0][1] = (KPP_REAL)(-.3333333333333333333333333333333333);
+   rkA[0][2] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[1][0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[1][1] = (KPP_REAL).4166666666666666666666666666666667;
+   rkA[1][2] = (KPP_REAL)(-.8333333333333333333333333333333333e-01);
+   rkA[2][0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[2][1] = (KPP_REAL).6666666666666666666666666666666667;
+   rkA[2][2] = (KPP_REAL).1666666666666666666666666666666667;
+
+   rkB[0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkB[1] = (KPP_REAL).6666666666666666666666666666666667;
+   rkB[2] = (KPP_REAL).1666666666666666666666666666666667;
+
+   rkC[0] = ZERO;
+   rkC[1] = (KPP_REAL)0.5;
+   rkC[2] = ONE;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = b0;
+   rkBhat[1] = (KPP_REAL).16666666666666666666666666666666667-b0;
+   rkBhat[2] = (KPP_REAL).66666666666666666666666666666666667;
+   rkBhat[3] = (KPP_REAL).16666666666666666666666666666666667;
+
+   /* New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j */
+   rkD[0] = ZERO;
+   rkD[1] = ZERO;
+   rkD[2] = ONE;
+
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE[0] = (KPP_REAL).3808338772072650364017425226487022*b0;
+   rkE[1] = (KPP_REAL)(-1.142501631621795109205227567946107)*b0;
+   rkE[2] = (KPP_REAL)(-1.523335508829060145606970090594809)*b0;
+   rkE[3] = (KPP_REAL).3808338772072650364017425226487022*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = b0;
+   rkBgam[1] = (KPP_REAL).1666666666666666666666666666666667-1.0*b0;
+   rkBgam[2] = (KPP_REAL).6666666666666666666666666666666667;
+   rkBgam[3] = (KPP_REAL)(-.2141672105405983697350758559820354);
+   rkBgam[4] = (KPP_REAL).3808338772072650364017425226487021;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = -3.0*b0-(KPP_REAL).3808338772072650364017425226487021;
+   rkTheta[1] = -4.0*b0+(KPP_REAL)1.523335508829060145606970090594808;
+   rkTheta[2] = (KPP_REAL)(-.142501631621795109205227567946106)+b0;
+
+   /* Local order of error estimator */
+   if (b0 == ZERO)
+	rkELO  = 5.0;
+   else
+	rkELO  = 4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)2.625816818958466716011888933765284;
+   rkAlpha = (KPP_REAL)1.687091590520766641994055533117359;
+   rkBeta  = (KPP_REAL)2.508731754924880510838743672432351;
+
+   rkT[0][1] = ONE;
+   rkT[0][1] = ONE;
+   rkT[0][2] = ZERO;
+   rkT[1][0] = (KPP_REAL).4554100411010284672111720348287483;
+   rkT[1][1] = (KPP_REAL)(-.6027050205505142336055860174143743);
+   rkT[1][2] = (KPP_REAL)(-.4309321229203225731070721341350346);
+   rkT[2][0] = (KPP_REAL)2.195823345445647152832799205549709;
+   rkT[2][1] = (KPP_REAL)(-1.097911672722823576416399602774855);
+   rkT[2][2] = (KPP_REAL).7850032632435902184104551358922130;
+
+   rkTinv[0][0] = (KPP_REAL).4205559181381766909344950150991349;
+   rkTinv[0][1] = (KPP_REAL).3488903392193734304046467270632057;
+   rkTinv[0][2] = (KPP_REAL).1915253879645878102698098373933487;
+   rkTinv[1][0] = (KPP_REAL).5794440818618233090655049849008650;
+   rkTinv[1][1] = (KPP_REAL)(-.3488903392193734304046467270632057);
+   rkTinv[1][2] = (KPP_REAL)(-.1915253879645878102698098373933487);
+   rkTinv[2][0] = (KPP_REAL)(-.3659705575742745254721332009249516);
+   rkTinv[2][1] = (KPP_REAL)(-1.463882230297098101888532803699806);
+   rkTinv[2][2] = (KPP_REAL).4702733607340189781407813565524989;
+
+   rkTinvAinv[0][0] = (KPP_REAL)1.104302803159744452668648155627548;
+   rkTinvAinv[0][1] = (KPP_REAL).916122120694355522658740710823143;
+   rkTinvAinv[0][2] = (KPP_REAL).5029105849749601702795812241441172;
+   rkTinvAinv[1][0] = (KPP_REAL)1.895697196840255547331351844372453;
+   rkTinvAinv[1][1] = (KPP_REAL)3.083877879305644477341259289176857;
+   rkTinvAinv[1][2] = (KPP_REAL)(-1.502910584974960170279581224144117);
+   rkTinvAinv[2][0] = (KPP_REAL).8362439183082935036129145574774502;
+   rkTinvAinv[2][1] = (KPP_REAL)(-3.344975673233174014451658229909802);
+   rkTinvAinv[2][2] = (KPP_REAL).312908409479233358005944466882642;
+
+   rkAinvT[0][0] = (KPP_REAL)2.625816818958466716011888933765282;
+   rkAinvT[0][1] = (KPP_REAL)1.687091590520766641994055533117358;
+   rkAinvT[0][2] = (KPP_REAL)(-2.508731754924880510838743672432351);
+   rkAinvT[1][0] = (KPP_REAL)1.195823345445647152832799205549710;
+   rkAinvT[1][1] = (KPP_REAL)(-2.097911672722823576416399602774855);
+   rkAinvT[1][2] = (KPP_REAL).7850032632435902184104551358922130;
+   rkAinvT[2][0] = (KPP_REAL)5.765829871932827589653709477334136;
+   rkAinvT[2][1] = (KPP_REAL).1170850640335862051731452613329320;
+   rkAinvT[2][2] = (KPP_REAL)4.078738281412060947659653944216779;
+} /* Lobatto3C_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Gauss method
+	(given to ~30 accurate digits)
+	The parameter b3 can be chosen by the user
+	to tune the error estimator
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Gauss_Coefficients()
+{
+   rkMethod = GAU;
+   
+   /* The coefficients of the Gauss method */
+   KPP_REAL b0;
+   /*b0 = (KPP_REAL)4.0; */
+   b0 = (KPP_REAL)0.1;
+
+   /* The coefficients of the Gauss method */
+   rkA[0][0] = (KPP_REAL).1388888888888888888888888888888889;
+   rkA[0][1] = (KPP_REAL)(-.359766675249389034563954710966045e-01);
+   rkA[0][2] = (KPP_REAL)(.97894440153083260495800422294756e-02);
+   rkA[1][0] = (KPP_REAL).3002631949808645924380249472131556;
+   rkA[1][1] = (KPP_REAL).2222222222222222222222222222222222;
+   rkA[1][2] = (KPP_REAL)(-.224854172030868146602471694353778e-01);
+   rkA[2][0] = (KPP_REAL).2679883337624694517281977355483022;
+   rkA[2][1] = (KPP_REAL).4804211119693833479008399155410489;
+   rkA[2][2] = (KPP_REAL).1388888888888888888888888888888889;
+
+   rkB[0] = (KPP_REAL).2777777777777777777777777777777778;
+   rkB[1] = (KPP_REAL).4444444444444444444444444444444444;
+   rkB[2] = (KPP_REAL).2777777777777777777777777777777778;
+
+   rkC[0] = (KPP_REAL).1127016653792583114820734600217600;
+   rkC[1] = (KPP_REAL).5000000000000000000000000000000000;
+   rkC[2] = (KPP_REAL).8872983346207416885179265399782400;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = b0;
+   rkBhat[1] = (KPP_REAL)(-1.4788305577012361475298775666303999)*b0
+   		 +(KPP_REAL).27777777777777777777777777777777778;
+   rkBhat[2] = (KPP_REAL).44444444444444444444444444444444444
+    	         +(KPP_REAL).66666666666666666666666666666666667*b0;
+   rkBhat[3] = (KPP_REAL)(-.18783610896543051913678910003626672)*b0
+  	         +(KPP_REAL).27777777777777777777777777777777778;
+
+   /* New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j */
+   rkD[0] = (KPP_REAL)(.1666666666666666666666666666666667e+01);
+   rkD[1] = (KPP_REAL)(-.1333333333333333333333333333333333e+01);
+   rkD[2] = (KPP_REAL)(.1666666666666666666666666666666667e+01);
+
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE[0] = (KPP_REAL).2153144231161121782447335303806954*b0;
+   rkE[1] = (KPP_REAL)(-2.825278112319014084275808340593191)*b0;
+   rkE[2] = (KPP_REAL).2870858974881495709929780405075939*b0;
+   rkE[3] = (KPP_REAL)(-.4558086256248162565397206448274867e-01)*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = ZERO;
+   rkBgam[1] = (KPP_REAL).2373339543355109188382583162660537;
+   rkBgam[2] = (KPP_REAL).5879873931885192299409334646982414;
+   rkBgam[3] = (KPP_REAL)(-.4063577064014232702392531134499046e-01);
+   rkBgam[4] = (KPP_REAL).2153144231161121782447335303806955;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)(-2.594040933093095272574031876464493);
+   rkTheta[1] = (KPP_REAL)1.824611539036311947589425112250199;
+   rkTheta[2] = (KPP_REAL).1856563166634371860478043996459493;
+
+   /* ELO = local order of classical error estimator */
+   rkELO = (KPP_REAL)4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)4.644370709252171185822941421408064;
+   rkAlpha = (KPP_REAL)3.677814645373914407088529289295970;
+   rkBeta  = (KPP_REAL)3.508761919567443321903661209182446;
+
+   rkT[0][0] = (KPP_REAL)(.7215185205520017032081769924397664e-01);
+   rkT[0][1] = (KPP_REAL)(-.8224123057363067064866206597516454e-01);
+   rkT[0][2] = (KPP_REAL)(-.6012073861930850173085948921439054e-01);
+   rkT[1][0] = (KPP_REAL).1188325787412778070708888193730294;
+   rkT[1][1] = (KPP_REAL)(.5306509074206139504614411373957448e-01);
+   rkT[1][2] = (KPP_REAL).3162050511322915732224862926182701;
+   rkT[2][0] = ONE;
+   rkT[2][1] = ONE;
+   rkT[2][2] = ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)5.991698084937800775649580743981285;
+   rkTinv[0][1] = (KPP_REAL)1.139214295155735444567002236934009;
+   rkTinv[0][2] = (KPP_REAL).4323121137838583855696375901180497;
+   rkTinv[1][0] = (KPP_REAL)(-5.991698084937800775649580743981285);
+   rkTinv[1][1] = (KPP_REAL)(-1.139214295155735444567002236934009);
+   rkTinv[1][2] = (KPP_REAL).5676878862161416144303624098819503;
+   rkTinv[2][0] = (KPP_REAL)(-1.246213273586231410815571640493082);
+   rkTinv[2][1] = (KPP_REAL)2.925559646192313662599230367054972;
+   rkTinv[2][2] = (KPP_REAL)(-.2577352012734324923468722836888244);
+
+   rkTinvAinv[0][0] = (KPP_REAL)27.82766708436744962047620566703329;
+   rkTinvAinv[0][1] = (KPP_REAL)5.290933503982655311815946575100597;
+   rkTinvAinv[0][2] = (KPP_REAL)2.007817718512643701322151051660114;
+   rkTinvAinv[1][0] = (KPP_REAL)(-17.66368928942422710690385180065675);
+   rkTinvAinv[1][1] = (KPP_REAL)(-14.45491129892587782538830044147713);
+   rkTinvAinv[1][2] = (KPP_REAL)2.992182281487356298677848948339886;
+   rkTinvAinv[2][0] = (KPP_REAL)(-25.60678350282974256072419392007303);
+   rkTinvAinv[2][1] = (KPP_REAL)6.762434375611708328910623303779923;
+   rkTinvAinv[2][2] = (KPP_REAL)1.043979339483109825041215970036771;
+
+   rkAinvT[0][0] = (KPP_REAL).3350999483034677402618981153470483;
+   rkAinvT[0][1] = (KPP_REAL)(-.5134173605009692329246186488441294);
+   rkAinvT[0][2] = (KPP_REAL)(.6745196507033116204327635673208923e-01);
+   rkAinvT[1][0] = (KPP_REAL).5519025480108928886873752035738885;
+   rkAinvT[1][1] = (KPP_REAL)1.304651810077110066076640761092008;
+   rkAinvT[1][2] = (KPP_REAL).9767507983414134987545585703726984;
+   rkAinvT[2][0] = (KPP_REAL)4.644370709252171185822941421408064;
+   rkAinvT[2][1] = (KPP_REAL)3.677814645373914407088529289295970;
+   rkAinvT[2][2] = (KPP_REAL)(-3.508761919567443321903661209182446);
+} /* Gauss_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Gauss method
+	(given to ~30 accurate digits)
+	The parameter b3 can be chosen by the user
+	to tune the error estimator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Radau1A_Coefficients()
+{
+   /* The coefficients of the Radau1A method */
+   KPP_REAL b0;
+   /*b0 = (KPP_REAL)0.3; */
+   b0 = (KPP_REAL)0.1;
+
+   /* The coefficients of the Radau1A method */
+   rkMethod = R1A;
+
+   rkA[0][0] = (KPP_REAL) .1111111111111111111111111111111111;
+   rkA[0][1] = (KPP_REAL)(-.1916383190435098943442935597058829);
+   rkA[0][2] = (KPP_REAL)(.8052720793239878323318244859477174e-01);
+   rkA[1][0] = (KPP_REAL).1111111111111111111111111111111111;
+   rkA[1][1] = (KPP_REAL).2920734116652284630205027458970589;
+   rkA[1][2] = (KPP_REAL)(-.481334970546573839513422644787591e-01);
+   rkA[2][0] = (KPP_REAL).1111111111111111111111111111111111;
+   rkA[2][1] = (KPP_REAL).5370223859435462728402311533676479;
+   rkA[2][2] = (KPP_REAL).1968154772236604258683861429918299;
+
+   rkB[0] = (KPP_REAL).1111111111111111111111111111111111;
+   rkB[1] = (KPP_REAL).5124858261884216138388134465196080;
+   rkB[2] = (KPP_REAL).3764030627004672750500754423692808;
+
+   rkC[0] = ZERO;
+   rkC[1] = (KPP_REAL).3550510257216821901802715925294109;
+   rkC[2] = (KPP_REAL).8449489742783178098197284074705891;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = b0;
+   rkBhat[1] = (KPP_REAL).11111111111111111111111111111111111-b0;
+   rkBhat[2] = (KPP_REAL).51248582618842161383881344651960810;
+   rkBhat[3] = (KPP_REAL).37640306270046727505007544236928079;
+
+   /* New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD[0] = (KPP_REAL).3333333333333333333333333333333333;
+   rkD[1] = (KPP_REAL)(-.8914115380582557157653087040196127);
+   rkD[2] = (KPP_REAL)(1.558078204724922382431975370686279);
+
+   /* Classical error estimator: */
+   /* H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j */
+   rkE[0] = (KPP_REAL).2748888295956773677478286035994148*b0;
+   rkE[1] = (KPP_REAL)(-1.374444147978386838739143017997074)*b0;
+   rkE[2] = (KPP_REAL)(-1.335337922441686804550326197041126)*b0;
+   rkE[3] = (KPP_REAL).235782604058977333559011782643466*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = ZERO;
+   rkBgam[1] = (KPP_REAL)(.1948150124588532186183490991130616e-01);
+   rkBgam[2] = (KPP_REAL).7575249005733381398986810981093584;
+   rkBgam[3] = (KPP_REAL)(-.518952314149008295083446116200793e-01);
+   rkBgam[4] = (KPP_REAL).2748888295956773677478286035994148;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)(-1.224370034375505083904362087063351);
+   rkTheta[1] = (KPP_REAL).9340045331532641409047527962010133;
+   rkTheta[2] = (KPP_REAL).4656990124352088397561234800640929;
+
+   /* ELO = local order of classical error estimator */
+   rkELO = (KPP_REAL)4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAlpha = (KPP_REAL)2.681082873627752133895790743211112;
+   rkBeta  = (KPP_REAL)3.050430199247410569426377624787569;
+
+   rkT[0][0] = (KPP_REAL).424293819848497965354371036408369;
+   rkT[0][1] = (KPP_REAL)(-.3235571519651980681202894497035503);
+   rkT[0][2] = (KPP_REAL)(-.522137786846287839586599927945048);
+   rkT[1][0] = (KPP_REAL)(.57594609499806128896291585429339e-01);
+   rkT[1][1] = (KPP_REAL)(.3148663231849760131614374283783e-02);
+   rkT[1][2] = (KPP_REAL).452429247674359778577728510381731;
+   rkT[2][0] = ONE;
+   rkT[2][1] = ONE;
+   rkT[2][2] = ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)1.233523612685027760114769983066164;
+   rkTinv[0][1] = (KPP_REAL)1.423580134265707095505388133369554;
+   rkTinv[0][2] = (KPP_REAL).3946330125758354736049045150429624;
+   rkTinv[1][0] = (KPP_REAL)(-1.233523612685027760114769983066164);
+   rkTinv[1][1] = (KPP_REAL)(-1.423580134265707095505388133369554);
+   rkTinv[1][2] = (KPP_REAL).6053669874241645263950954849570376;
+   rkTinv[2][0] = (KPP_REAL)(-.1484438963257383124456490049673414);
+   rkTinv[2][1] = (KPP_REAL)2.038974794939896109682070471785315;
+   rkTinv[2][2] = (KPP_REAL)(-.544501292892686735299355831692542e-01);
+
+   rkTinvAinv[0][0] = (KPP_REAL)4.487354449794728738538663081025420;
+   rkTinvAinv[0][1] = (KPP_REAL)5.178748573958397475446442544234494;
+   rkTinvAinv[0][2] = (KPP_REAL)1.435609490412123627047824222335563;
+   rkTinvAinv[1][0] = (KPP_REAL)(-2.854361287939276673073807031221493);
+   rkTinvAinv[1][1] = (KPP_REAL)(-1.003648660720543859000994063139137e+01);
+   rkTinvAinv[1][2] = (KPP_REAL)1.789135380979465422050817815017383;
+   rkTinvAinv[2][0] = (KPP_REAL)(-4.160768067752685525282947313530352);
+   rkTinvAinv[2][1] = (KPP_REAL)1.124128569859216916690209918405860;
+   rkTinvAinv[2][2] = (KPP_REAL)1.700644430961823796581896350418417;
+
+   rkAinvT[0][0] = (KPP_REAL)1.543510591072668287198054583233180;
+   rkAinvT[0][1] = (KPP_REAL)(-2.460228411937788329157493833295004);
+   rkAinvT[0][2] = (KPP_REAL)(-.412906170450356277003910443520499);
+   rkAinvT[1][0] = (KPP_REAL).209519643211838264029272585946993;
+   rkAinvT[1][1] = (KPP_REAL)1.388545667194387164417459732995766;
+   rkAinvT[1][2] = (KPP_REAL)1.20339553005832004974976023130002;
+   rkAinvT[2][0] = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAinvT[2][1] = (KPP_REAL)2.681082873627752133895790743211112;
+   rkAinvT[2][2] = (KPP_REAL)(-3.050430199247410569426377624787569);
+} /* Radau1A_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 4-stage Lobatto-3A method
+	(given to ~30 accurate digits)
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Lobatto3A_Coefficients()
+{
+   /* The coefficients of the Lobatto-3A method */
+   rkMethod = L3A;
+
+   rkA[0][0] = ZERO;
+   rkA[0][1] = ZERO;
+   rkA[0][2] = ZERO;
+   rkA[0][3] = ZERO;
+   rkA[1][0] = (KPP_REAL).11030056647916491413674311390609397;
+   rkA[1][1] = (KPP_REAL).1896994335208350858632568860939060;
+   rkA[1][2] = (KPP_REAL)(-.339073642291438837776604807792215e-01);
+   rkA[1][3] = (KPP_REAL)(.1030056647916491413674311390609397e-01);
+   rkA[2][0] = (KPP_REAL)(.73032766854168419196590219427239365e-01);
+   rkA[2][1] = (KPP_REAL).4505740308958105504443271474458881;
+   rkA[2][2] = (KPP_REAL).2269672331458315808034097805727606;
+   rkA[2][3] = (KPP_REAL)(-.2696723314583158080340978057276063e-01);
+   rkA[3][0] = (KPP_REAL)(.83333333333333333333333333333333333e-01);
+   rkA[3][1] = (KPP_REAL).4166666666666666666666666666666667;
+   rkA[3][2] = (KPP_REAL).4166666666666666666666666666666667;
+   rkA[3][3] = (KPP_REAL)(.8333333333333333333333333333333333e-01);
+
+   rkB[0] = (KPP_REAL)(.83333333333333333333333333333333333e-01);
+   rkB[1] = (KPP_REAL).4166666666666666666666666666666667;
+   rkB[2] = (KPP_REAL).4166666666666666666666666666666667;
+   rkB[3] = (KPP_REAL)(.8333333333333333333333333333333333e-01);
+
+   rkC[0] = ZERO;
+   rkC[1] = (KPP_REAL).2763932022500210303590826331268724;
+   rkC[2] = (KPP_REAL).7236067977499789696409173668731276;
+   rkC[3] = ONE;
+
+   /* New solution: H*Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD[0] = ZERO;
+   rkD[1] = ZERO;
+   rkD[2] = ZERO;
+   rkD[3] = ONE;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = (KPP_REAL)(.90909090909090909090909090909090909e-01);
+   rkBhat[1] = (KPP_REAL).39972675774621371442114262372173276;
+   rkBhat[2] = (KPP_REAL).43360657558711961891219070961160058;
+   rkBhat[3] = (KPP_REAL)(.15151515151515151515151515151515152e-01);
+
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+
+   rkE[0] = (KPP_REAL)(.1957403846510110711315759367097231e-01);
+   rkE[1] = (KPP_REAL)(-.1986820345632580910316020806676438);
+   rkE[2] = (KPP_REAL).1660586371214229125096727578826900;
+   rkE[3] = (KPP_REAL)(-.9787019232550553556578796835486154e-01);
+
+   /* Sdirk error estimator: */
+   rkF[0] = ZERO;
+   rkF[1] = (KPP_REAL)(-.66535815876916686607437314126436349);
+   rkF[2] = (KPP_REAL)1.7419302743497277572980407931678409;
+   rkF[3] = (KPP_REAL)(-1.2918865386966730694684011822841728);
+
+   /* ELO = local order of classical error estimator */
+   rkELO = (KPP_REAL)4.0;
+
+   /* Sdirk error estimator: */
+   rkBgam[0] = (KPP_REAL)(.2950472755430528877214995073815946e-01);
+   rkBgam[1] = (KPP_REAL).5370310883226113978352873633882769;
+   rkBgam[2] = (KPP_REAL).2963022450107219354980459699450564;
+   rkBgam[3] = (KPP_REAL)(-.7815248400375080035021681445218837e-01);
+   rkBgam[4] = (KPP_REAL).2153144231161121782447335303806956;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)0.0;
+   rkTheta[1] = (KPP_REAL)(-.6653581587691668660743731412643631);
+   rkTheta[2] = (KPP_REAL)1.741930274349727757298040793167842;
+   rkTheta[3] = (KPP_REAL)(-.291886538696673069468401182284174);
+
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)4.644370709252171185822941421408063;
+   rkAlpha = (KPP_REAL)3.677814645373914407088529289295968;
+   rkBeta  = (KPP_REAL)3.508761919567443321903661209182446;
+
+   rkT[0][0] = (KPP_REAL)(.5303036326129938105898786144870856e-01);
+   rkT[0][1] = (KPP_REAL)(-.7776129960563076320631956091016914e-01);
+   rkT[0][2] = (KPP_REAL)(.6043307469475508514468017399717112e-02);
+   rkT[1][0] = (KPP_REAL).2637242522173698467283726114649606;
+   rkT[1][1] = (KPP_REAL).2193839918662961493126393244533346;
+   rkT[1][2] = (KPP_REAL).3198765142300936188514264752235344;
+   rkT[2][0] = ONE;
+   rkT[2][1] = ZERO;
+   rkT[2][2] = ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)7.695032983257654470769069079238553;
+   rkTinv[0][1] = (KPP_REAL)(-.1453793830957233720334601186354032);
+   rkTinv[0][2] = (KPP_REAL).6302696746849084900422461036874826;
+   rkTinv[1][0] = (KPP_REAL)(-7.695032983257654470769069079238553);
+   rkTinv[1][1] = (KPP_REAL).1453793830957233720334601186354032;
+   rkTinv[1][2] = (KPP_REAL).3697303253150915099577538963125174;
+   rkTinv[2][0] = (KPP_REAL)(-1.066660885401270392058552736086173);
+   rkTinv[2][1] = (KPP_REAL)3.146358406832537460764521760668932;
+   rkTinv[2][2] = (KPP_REAL)(-.7732056038202974770406168510664738);
+
+   rkTinvAinv[0][0] = (KPP_REAL)35.73858579417120341641749040405149;
+   rkTinvAinv[0][1] = (KPP_REAL)(-.675195748578927863668368190236025);
+   rkTinvAinv[0][2] = (KPP_REAL)2.927206016036483646751158874041632;
+   rkTinvAinv[1][0] = (KPP_REAL)(-24.55824590667225493437162206039511);
+   rkTinvAinv[1][1] = (KPP_REAL)(-10.50514413892002061837750015342036);
+   rkTinvAinv[1][2] = (KPP_REAL)4.072793983963516353248841125958369;
+   rkTinvAinv[2][0] = (KPP_REAL)(-30.92301972744621647251975054630589);
+   rkTinvAinv[2][1] = (KPP_REAL)12.08182467154052413351908559269928;
+   rkTinvAinv[2][2] = (KPP_REAL)(-1.546411207640594954081233702132946);
+
+   rkAinvT[0][0] = (KPP_REAL).2462926658317812882584158369803835;
+   rkAinvT[0][1] = (KPP_REAL)(-.2647871194157644619747121197289574);
+   rkAinvT[0][2] = (KPP_REAL).2950720515900466654896406799284586;
+   rkAinvT[1][0] = (KPP_REAL)1.224833192317784474576995878738004;
+   rkAinvT[1][1] = (KPP_REAL)1.929224190340981580557006261869763;
+   rkAinvT[1][2] = (KPP_REAL).4066803323234419988910915619080306;
+   rkAinvT[2][0] = (KPP_REAL)4.644370709252171185822941421408064;
+   rkAinvT[2][1] = (KPP_REAL)3.677814645373914407088529289295968;
+   rkAinvT[2][2] = (KPP_REAL)(-3.508761919567443321903661209182446);
+} /* Lobatto3A_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	END SUBROUTINE RungeKutta ! and all its internal procedures
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FUN_CHEM(KPP_REAL T, KPP_REAL V[], KPP_REAL FCT[])
+{
+   KPP_REAL Told;
+
+   Told = TIME;
+   TIME = T;
+   Update_SUN();
+   Update_RCONST();
+   Update_PHOTO();
+   TIME = Told;
+
+   Fun(V, FIX, RCONST, FCT);
+
+} /* FUN_CHEM */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JAC_CHEM (KPP_REAL T, KPP_REAL V[], KPP_REAL JF[])
+{
+   KPP_REAL Told;
+
+   Told = TIME;
+   TIME = T;
+   Update_SUN();
+   Update_RCONST();
+   Update_PHOTO();
+   TIME = Told;
+   Jac_SP(V, FIX, RCONST, JF);
+} /* JAC_CHEM */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.def	(revision 3477)
@@ -0,0 +1,8 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE runge_kutta
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta.f90	(revision 3477)
@@ -0,0 +1,1881 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RungeKutta - Fully Implicit 3-stage Runge-Kutta methods based on:      !
+!          * Radau-2A   quadrature (order 5)                              !
+!          * Radau-1A   quadrature (order 5)                              !
+!          * Lobatto-3C quadrature (order 4)                              !
+!          * Gauss      quadrature (order 6)                              !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2005                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Jacobian,   ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+!~~~>  Statistics on the work performed by the Runge-Kutta method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+    Nrej=5, Ndec=6, Nsol=7, Nsng=8, Ntexit=1, Nhacc=2, Nhnew=3
+  
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    RCNTRL(1:20) = 0.0_dp
+    ICNTRL(1:20) = 0
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are interpolated (0) or zero (1)
+    ICNTRL(10) = 1   ! 0 - classic or 1 - SDIRK error estimation
+    ICNTRL(11) = 0   ! Gustaffson (0) or classic(1) controller
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+    
+    T1 = TIN; T2 = TOUT
+    CALL RungeKutta(  NVAR, T1, T2, VAR, RTOL, ATOL, &
+                      RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+    Ntotal = Ntotal + ISTATUS(Nstp)
+    PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'Runge-Kutta: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RungeKutta( N,T,Tend,Y,RelTol,AbsTol,    &
+                         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!  This implementation is based on the book and the code Radau5:
+!
+!         E. HAIRER AND G. WANNER
+!         "SOLVING ORDINARY DIFFERENTIAL EQUATIONS II. 
+!              STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!         UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!         CH-1211 GENEVE 24, SWITZERLAND
+!         E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!   Methods:
+!          * Radau-2A   quadrature (order 5)                              
+!          * Radau-1A   quadrature (order 5)                              
+!          * Lobatto-3C quadrature (order 4)                              
+!          * Gauss      quadrature (order 6)                              
+!                                                                         
+!   (C)  Adrian Sandu, August 2005                                       
+!   Virginia Polytechnic Institute and State University                  
+!   Contact: sandu@cs.vt.edu                                             
+!   Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!   This implementation is part of KPP - the Kinetic PreProcessor        
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!       ----------------
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!     N           Dimension of the system
+!     T           Initial time value
+!
+!     Tend        Final T value (Tend-T may be positive or negative)
+!
+!     Y(N)        Initial values for Y
+!
+!     RelTol,AbsTol   Relative and absolute error tolerances. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = RK method selection       
+!              = 1:  Radau-2A    (the default)
+!              = 2:  Lobatto-3C
+!              = 3:  Gauss
+!              = 4:  Radau-1A
+!	       = 5:  Lobatto-3A (not yet implemented)
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 10000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(10) -> switch for error estimation strategy
+!		ICNTRL(10) = 0: one additional stage at c=0, 
+!				see Hairer (default)
+!		ICNTRL(10) = 1: two additional stages at c=0 
+!				and SDIRK at c=1, stiffly accurate
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(11)=0:  mod. predictive controller (Gustafsson, default)
+!              ICNTRL(11)=1:  classical step size control
+!              the choice 1 seems to produce safer results;
+!              for simple problems, the choice 2 produces
+!              often slightly faster runs
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  (highly recommended to keep Hmin = ZERO, the default)
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, the starting step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IERR        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of Jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: Y(N),AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson, SdirkError
+      INTEGER :: IERR, ITOL
+      KPP_REAL :: T,Tend
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit, rkMethod
+      KPP_REAL :: Hmin,Hmax,Hstart,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin, NewtonTol
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      ! Runge-Kutta method parameters
+      INTEGER, PARAMETER :: R2A=1, R1A=2, L3C=3, GAU=4, L3A=5
+      KPP_REAL :: rkT(3,3), rkTinv(3,3), rkTinvAinv(3,3), rkAinvT(3,3), &
+                       rkA(0:3,0:3), rkB(0:3),  rkC(0:3), rkD(0:3), rkE(0:3), &
+		       rkBgam(0:4), rkBhat(0:4), rkTheta(0:3), rkF(0:4),      &
+                       rkGamma,  rkAlpha, rkBeta, rkELO
+       !~~~> Local variables
+      INTEGER :: i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IERR = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> Error control selection  
+      IF (ICNTRL(10) == 0) THEN 
+         SdirkError = .FALSE.
+      ELSE
+         SdirkError = .TRUE.
+      END IF      
+!~~~> Method selection  
+      SELECT CASE (ICNTRL(3))     
+      CASE (0,1)
+         CALL Radau2A_Coefficients
+      CASE (2)
+         CALL Lobatto3C_Coefficients
+      CASE (3)
+         CALL Gauss_Coefficients
+      CASE (4)
+         CALL Radau1A_Coefficients
+      CASE (5)
+         CALL Lobatto3A_Coefficients
+      CASE DEFAULT
+         WRITE(6,*) 'ICNTRL(3)=',ICNTRL(3)
+         CALL RK_ErrorMsg(-13,T,ZERO,IERR)
+      END SELECT
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RK_ErrorMsg(-1,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonMaxit    maximal number of Newton iterations
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RK_ErrorMsg(-2,T,ZERO,IERR)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~> Gustafsson: step size controller
+      IF(ICNTRL(11) == 0)THEN
+         Gustafsson = .TRUE.
+      ELSE
+         Gustafsson = .FALSE.
+      END IF
+
+!~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0
+      Roundoff=WLAMCH('E');
+
+!~~~> Hmin = minimal step size
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSE
+         Hmin = MIN(ABS(RCNTRL(1)),ABS(Tend-T))
+      END IF
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tend-T)
+      ELSE
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-T))
+      END IF
+!~~~> Hstart = starting step size
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = ZERO
+      ELSE
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-T))
+      END IF
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 1.0d-3) .OR. (FacSafe >= ONE) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RK_ErrorMsg(-4,T,ZERO,IERR)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RK_ErrorMsg(-5,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonTol:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+         IF (NewtonTol <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RK_ErrorMsg(-6,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RK_ErrorMsg(-7,T,ZERO,IERR)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+          END DO
+      END IF
+
+!~~~> Parameters are wrong
+      IF (IERR < 0) RETURN
+
+!~~~> Call the core method
+      CALL RK_Integrator( N,T,Tend,Y,IERR )
+
+   CONTAINS ! Internal procedures to RungeKutta
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Integrator( N,T,Tend,Y,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+      INTEGER,  INTENT(IN)         :: N
+      KPP_REAL, INTENT(IN)    :: Tend
+      KPP_REAL, INTENT(INOUT) :: T, Y(NVAR)
+      INTEGER,  INTENT(OUT)        :: IERR
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL    :: FJAC(NVAR,NVAR), E1(NVAR,NVAR)
+      COMPLEX(kind=dp) :: E2(NVAR,NVAR)   
+#else
+      KPP_REAL    :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif                
+      KPP_REAL, DIMENSION(NVAR) :: Z1,Z2,Z3,Z4,SCAL,DZ1,DZ2,DZ3,DZ4, &
+      				G,TMP,F0
+      KPP_REAL  :: CONT(NVAR,3), Tdirection,  H, Hacc, Hnew, Hold, Fac, &
+                 FacGus, Theta, Err, ErrOld, NewtonRate, NewtonIncrement,    &
+                 Hratio, Qnewton, NewtonPredictedErr,NewtonIncrementOld, ThetaSD
+      INTEGER :: IP1(NVAR),IP2(NVAR),NewtonIter, ISING, Nconsecutive
+      LOGICAL :: Reject, FirstStep, SkipJac, NewtonDone, SkipLU
+      
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Tdirection = SIGN(ONE,Tend-T)
+      H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , Hmax )
+      IF (ABS(H) <= 10.d0*Roundoff) H = 1.0d-6
+      H = SIGN(H,Tdirection)
+      Hold      = H
+      Reject    = .FALSE.
+      FirstStep = .TRUE.
+      SkipJac   = .FALSE.
+      SkipLU    = .FALSE.
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= ZERO) THEN
+         H = Tend-T
+      END IF
+      Nconsecutive = 0
+      CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      !IF ( .NOT.Reject ) THEN      
+         CALL FUN_CHEM(T,Y,F0)
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+      !END IF   
+
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+        !~~~> Compute the Jacobian matrix
+        IF ( .NOT.SkipJac ) THEN
+          CALL JAC_CHEM(T,Y,FJAC)
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+        END IF
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+        IF (ISING /= 0) THEN
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; Nconsecutive = Nconsecutive + 1
+          IF (Nconsecutive >= 5) THEN
+            CALL RK_ErrorMsg(-12,T,H,IERR); RETURN
+          END IF
+          H=H*0.5d0; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+          CYCLE Tloop
+        ELSE
+          Nconsecutive = 0    
+        END IF   
+      END IF ! SkipLU
+   
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RK_ErrorMsg(-9,T,H,IERR); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RK_ErrorMsg(-10,T,H,IERR); RETURN
+      END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+      !~~~>  Starting values for Newton iteration
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+      ELSE
+         ! Evaluate quadratic polynomial
+         CALL RK_Interpolate('eval',N,H,Hold,Z1,Z2,Z3,CONT)
+      END IF
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      Fac = 0.5d0 ! Step reduction if too many iterations
+      
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS(N,T,H,Y,F0,Z1,Z2,Z3,DZ1,DZ2,DZ3)
+            
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+            
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ2)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ3)**2 )/3.0d0 )
+            
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+                IF ( NewtonIter < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                    EXIT NewtonLoop
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1,1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2,1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3,1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT NewtonLoop
+   	    IF (NewtonIter == NewtonMaxit) THEN
+		PRINT*, 'Slow or no convergence in Newton Iteration: Max no. of', &
+		 	'Newton iterations reached'
+	    END IF
+            
+      END DO NewtonLoop
+            
+      IF (.NOT.NewtonDone) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+           CYCLE Tloop
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SDIRK Stage
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+
+!~~~>  Starting values for Newton iterations
+       Z4(1:N) = Z3(1:N)
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+!       G = H*rkBgam(0)*F0 + rkTheta(1)*Z1 + rkTheta(2)*Z2 + rkTheta(3)*Z3
+       CALL Set2Zero(N, G)
+       IF (rkMethod/=L3A) CALL WAXPY(N,rkBgam(0)*H, F0,1,G,1) 
+       CALL WAXPY(N,rkTheta(1),Z1,1,G,1)
+       CALL WAXPY(N,rkTheta(2),Z2,1,G,1)
+       CALL WAXPY(N,rkTheta(3),Z3,1,G,1)
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+SDNewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+	    CALL WADD(N,Y,Z4,TMP)         ! TMP <- Y + Z4
+	    CALL FUN_CHEM(T+H,TMP,DZ4) 	  ! DZ4 <- Fun(Y+Z4)         
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ4(1:N) = (G(1:N)-Z4(1:N))*(rkGamma/H) + DZ4(1:N)
+	    CALL WAXPY (N, -ONE*rkGamma/H, Z4, 1, DZ4, 1)
+            CALL WAXPY (N, rkGamma/H, G,1, DZ4,1)
+
+!~~~>   Solve the linear system
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E1, N, IP1, DZ4, N, ISING )
+#else
+            CALL KppSolve(E1, DZ4)
+#endif
+            
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4)
+            IF ( NewtonIter == 1 ) THEN
+                ThetaSD      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaSD = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaSD < 0.99d0) THEN
+                    NewtonRate = ThetaSD/(ONE-ThetaSD)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaSD**(NewtonMaxit-NewtonIter)/(ONE-ThetaSD)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      !PRINT*,'Error too large: ', NewtonPredictedErr
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT SDNewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    !PRINT*,'Theta too large: ',ThetaSD
+                    EXIT SDNewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z4 <-- Z4 + DZ4
+            CALL WAXPY(N,ONE,DZ4,1,Z4,1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT SDNewtonLoop
+            
+            END DO SDNewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+                CYCLE Tloop
+            END IF
+      END IF
+!~~~>  End of implified SDIRK Newton iterations
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+	 CALL Set2Zero(N, DZ4)
+         IF (rkMethod==L3A) THEN
+           DZ4(1:N) = H*rkF(0)*F0(1:N)
+	   IF (rkF(1) /= ZERO)  CALL WAXPY(N, rkF(1), Z1, 1, DZ4, 1)
+	   IF (rkF(2) /= ZERO)  CALL WAXPY(N, rkF(2), Z2, 1, DZ4, 1)
+	   IF (rkF(3) /= ZERO)  CALL WAXPY(N, rkF(3), Z3, 1, DZ4, 1)
+           TMP = Y + Z4
+           CALL FUN_CHEM(T+H,TMP,DZ1)
+ 	   CALL WAXPY(N, H*rkBgam(4), DZ1, 1, DZ4, 1)
+         ELSE
+!         DZ4(1:N) =  rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4    
+  	   IF (rkD(1) /= ZERO)  CALL WAXPY(N, rkD(1), Z1, 1, DZ4, 1)
+	   IF (rkD(2) /= ZERO)  CALL WAXPY(N, rkD(2), Z2, 1, DZ4, 1)
+	   IF (rkD(3) /= ZERO)  CALL WAXPY(N, rkD(3), Z3, 1, DZ4, 1)
+	   CALL WAXPY(N, -ONE, Z4, 1, DZ4, 1)
+         END IF
+         Err = RK_ErrorNorm(N,SCAL,DZ4)    
+      ELSE
+         CALL  RK_ErrorEstimate(N,H,T,Y,F0, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,FirstStep,Reject)
+      END IF
+
+!~~~> Computation of new step size Hnew
+      Fac  = Err**(-ONE/rkELO)*   &
+             MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit))
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Accept/reject step 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:IF (Err < ONE) THEN !~~~> STEP IS ACCEPTED
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            IF (ISTATUS(Nacc) > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(Err**2/ErrOld)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew = Fac*H
+            END IF
+            Hacc=H
+            ErrOld=MAX(1.0d-2,Err)
+         END IF
+         Hold = H
+         T = T+H 
+         ! Update solution: Y <- Y + sum(d_i Z_i)
+         IF (rkD(1) /= ZERO)  CALL WAXPY(N,rkD(1),Z1,1,Y,1)
+         IF (rkD(2) /= ZERO)  CALL WAXPY(N,rkD(2),Z2,1,Y,1)
+         IF (rkD(3) /= ZERO)  CALL WAXPY(N,rkD(3),Z3,1,Y,1)
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         IF (StartNewton) CALL RK_Interpolate('make',N,H,Hold,Z1,Z2,Z3,CONT)
+         CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhnew)  = Hnew
+         RSTATUS(Nhacc)  = H
+         Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin) , Hmax )
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >=  ZERO) THEN
+            H = Tend-T
+         ELSE
+            Hratio=Hnew/H
+            ! Reuse the LU decomposition
+            SkipLU = (Theta<=ThetaMin) .AND. (Hratio>=Qmin) .AND. (Hratio<=Qmax)
+            IF (.NOT.SkipLU) H=Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac  = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject   = .TRUE.
+         SkipJac  = .TRUE.	! Skip if rejected - Jac is independent of H
+         SkipLU   = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF accept
+      
+    END DO Tloop
+    
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RungeKutta due to the following error:'
+
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> Improper values for FacMin/FacMax/FacSafe/FacRej'
+    CASE (-5)
+      PRINT * , '--> Improper value for ThetaMin'
+    CASE (-6)
+      PRINT * , '--> Newton stopping tolerance too small'
+    CASE (-7)
+      PRINT * , '--> Improper values for Qmin, Qmax'
+    CASE (-8)
+      PRINT * , '--> Tolerances are too small'
+    CASE (-9)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-10)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-11)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-12)
+      PRINT * , '--> Non-convergence of Newton iterations'
+    CASE (-13)
+      PRINT * , '--> Requested RK method not implemented'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   WRITE(6,FMT="(5X,'T=',E12.5,'  H=',E12.5)") T, H 
+
+ END SUBROUTINE RK_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)= ONE/(AbsTol(1)+RelTol(1)*ABS(Y(i)))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=ONE/(AbsTol(i)+RelTol(i)*ABS(Y(i)))
+       END DO
+   END IF
+      
+ END SUBROUTINE RK_ErrorScale
+
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  SUBROUTINE RK_Transform(N,Tr,Z1,Z2,Z3,W1,W2,W3)
+!!~~~>                 W <-- Tr x Z
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: N, i
+!      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),W1(N),W2(N),W3(N)
+!      KPP_REAL :: x1, x2, x3
+!      DO i=1,N
+!          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+!          W1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+!          W2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+!          W3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+!      END DO
+!  END SUBROUTINE RK_Transform
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RK_Interpolate(action,N,H,Hold,Z1,Z2,Z3,CONT)
+!~~~>   Constructs or evaluates a quadratic polynomial
+!         that interpolates the Z solution at current step
+!         and provides starting values for the next step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      INTEGER :: N, i
+      KPP_REAL :: H,Hold,Z1(N),Z2(N),Z3(N),CONT(N,3)
+      KPP_REAL :: r, x1, x2, x3, den
+      CHARACTER(LEN=4) :: action
+       
+      SELECT CASE (action) 
+      CASE ('make')
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         den = (rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3))
+         DO i=1,N
+             CONT(i,1)=(-rkC(3)**2*rkC(2)*Z1(i)+Z3(i)*rkC(2)*rkC(1)**2 &
+                        +rkC(2)**2*rkC(3)*Z1(i)-rkC(2)**2*rkC(1)*Z3(i) &
+                        +rkC(3)**2*rkC(1)*Z2(i)-Z2(i)*rkC(3)*rkC(1)**2)&
+                        /den-Z3(i)
+             CONT(i,2)= -( rkC(1)**2*(Z3(i)-Z2(i)) + rkC(2)**2*(Z1(i)  &
+                          -Z3(i)) +rkC(3)**2*(Z2(i)-Z1(i)) )/den
+             CONT(i,3)= ( rkC(1)*(Z3(i)-Z2(i)) + rkC(2)*(Z1(i)-Z3(i))  &
+                           +rkC(3)*(Z2(i)-Z1(i)) )/den
+         END DO
+      CASE ('eval')
+          ! Evaluate quadratic polynomial
+          r = H/Hold
+         x1 = ONE + rkC(1)*r
+         x2 = ONE + rkC(2)*r
+         x3 = ONE + rkC(3)*r
+         DO i=1,N
+            Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3))
+            Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3))
+            Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3))
+         END DO
+       END SELECT   
+  END SUBROUTINE RK_Interpolate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS(N,T,H,Y,F0,Z1,Z2,Z3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z - hA x F
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: T, H
+      KPP_REAL, DIMENSION(N) :: Y,Z1,Z2,Z3,F0,F,R1,R2,R3,TMP
+
+      CALL WCOPY(N,Z1,1,R1,1) ! R1 <- Z1
+      CALL WCOPY(N,Z2,1,R2,1) ! R2 <- Z2
+      CALL WCOPY(N,Z3,1,R3,1) ! R3 <- Z3
+
+      IF (rkMethod==L3A) THEN
+         CALL WAXPY(N,-H*rkA(1,0),F0,1,R1,1) ! R1 <- R1 - h*A_10*F0
+         CALL WAXPY(N,-H*rkA(2,0),F0,1,R2,1) ! R2 <- R2 - h*A_20*F0
+         CALL WAXPY(N,-H*rkA(3,0),F0,1,R3,1) ! R3 <- R3 - h*A_30*F0
+      END IF
+
+      CALL WADD(N,Y,Z1,TMP)              ! TMP <- Y + Z1
+      CALL FUN_CHEM(T+rkC(1)*H,TMP,F)    ! F1 <- Fun(Y+Z1)         
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y,Z2,TMP)              ! TMP <- Y + Z2
+      CALL FUN_CHEM(T+rkC(2)*H,TMP,F)    ! F2 <- Fun(Y+Z2)        
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y,Z3,TMP)              ! TMP <- Y + Z3
+      CALL FUN_CHEM(T+rkC(3)*H,TMP,F)    ! F3 <- Fun(Y+Z3)     
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+   !~~~> Compute the matrices E1 and E2 and their decompositions
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N, ISING
+      KPP_REAL    :: H, Alpha, Beta, Gamma
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: FJAC(NVAR,NVAR),E1(NVAR,NVAR)
+      COMPLEX(kind=dp) :: E2(N,N)
+#else      
+      KPP_REAL    :: FJAC(LU_NONZERO),E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      INTEGER :: IP1(N), IP2(N), i, j
+      
+      Gamma = rkGamma/H
+      Alpha = rkAlpha/H
+      Beta  = rkBeta /H
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+Gamma
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,NVAR
+         j=LU_DIAG(i); E1(j)=E1(j)+Gamma
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+      IF (ISING /= 0) THEN
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         RETURN
+      END IF
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), ZERO )
+        END DO
+        E2(j,j) = E2(j,j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), ZERO )
+      END DO
+      DO i=1,NVAR
+         j=LU_DIAG(i); E2(j)=E2(j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+      
+   END SUBROUTINE RK_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Solve(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N,IP1(NVAR),IP2(NVAR),ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: E1(NVAR,NVAR)
+      COMPLEX(kind=dp) :: E2(NVAR,NVAR)
+#else      
+      KPP_REAL    :: E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL    :: R1(N),R2(N),R3(N)
+      KPP_REAL    :: H, x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! Z <- h^{-1) T^{-1) A^{-1) x Z
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3
+          R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3
+          R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,R1,N,0) 
+#else      
+      CALL KppSolve (E1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,0) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = AIMAG( BC(i) )
+      END DO
+
+      ! Z <- T x Z
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3
+          R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3
+          R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3
+      END DO
+
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+   END SUBROUTINE RK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate(N,H,T,Y,F0,   &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: E1(NVAR,NVAR)
+#else      
+      KPP_REAL :: E1(LU_NONZERO)
+#endif      
+      KPP_REAL :: SCAL(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N), &
+                        F0(N),Y(N),TMP(N),T,H
+      INTEGER :: IP1(N), i
+      LOGICAL FirstStep,Reject
+      KPP_REAL :: HrkE1,HrkE2,HrkE3,Err
+
+      HrkE1  = rkE(1)/H
+      HrkE2  = rkE(2)/H
+      HrkE3  = rkE(3)/H
+
+      DO  i=1,N
+         F2(i)  = HrkE1*Z1(i)+HrkE2*Z2(i)+HrkE3*Z3(i)
+         TMP(i) = rkE(0)*F0(i) + F2(i)
+      END DO
+
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+      IF (rkMethod==GAU) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+#else      
+      CALL KppSolve (E1, TMP)
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) CALL KppSolve (E1,TMP)
+      IF (rkMethod==GAU) CALL KppSolve (E1,TMP)
+#endif      
+
+      Err = RK_ErrorNorm(N,SCAL,TMP)
+!
+      IF (Err < ONE) RETURN
+firej:IF (FirstStep.OR.Reject) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)    
+          ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          Err = RK_ErrorNorm(N,SCAL,TMP)
+       END IF firej
+ 
+   END SUBROUTINE RK_ErrorEstimate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL FUNCTION RK_ErrorNorm(N,SCAL,DY)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: SCAL(N),DY(N)
+      INTEGER :: i
+
+      RK_ErrorNorm = ZERO
+        DO i=1,N
+          RK_ErrorNorm = RK_ErrorNorm + (DY(i)*SCAL(i))**2
+        END DO
+      RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), 1.0d-10 )
+ 
+   END FUNCTION RK_ErrorNorm
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau2A_Coefficients
+!    The coefficients of the 3-stage Radau-2A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+! The coefficients of the Radau2A method
+      KPP_REAL :: b0
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d-1
+      ELSE
+        b0 = 0.5d-1
+      END IF
+
+! The coefficients of the Radau2A method
+      rkMethod = R2A
+
+      rkA(1,1) =  1.968154772236604258683861429918299d-1
+      rkA(1,2) = -6.55354258501983881085227825696087d-2
+      rkA(1,3) =  2.377097434822015242040823210718965d-2
+      rkA(2,1) =  3.944243147390872769974116714584975d-1
+      rkA(2,2) =  2.920734116652284630205027458970589d-1
+      rkA(2,3) = -4.154875212599793019818600988496743d-2
+      rkA(3,1) =  3.764030627004672750500754423692808d-1
+      rkA(3,2) =  5.124858261884216138388134465196080d-1
+      rkA(3,3) =  1.111111111111111111111111111111111d-1
+
+      rkB(1) = 3.764030627004672750500754423692808d-1
+      rkB(2) = 5.124858261884216138388134465196080d-1
+      rkB(3) = 1.111111111111111111111111111111111d-1
+
+      rkC(1) = 1.550510257216821901802715925294109d-1
+      rkC(2) = 6.449489742783178098197284074705891d-1
+      rkC(3) = 1.0d0
+      
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = 1.0d0*b0
+      rkE(1) = -10.04880939982741556246032950764708d0*b0
+      rkE(2) = 1.382142733160748895793662840980412d0*b0
+      rkE(3) = -.3333333333333333333333333333333333d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .3764030627004672750500754423692807d0-1.558078204724922382431975370686279d0*b0
+      rkBgam(2) = .8914115380582557157653087040196118d0*b0+.5124858261884216138388134465196077d0
+      rkBgam(3) = -.1637777184845662566367174924883037d0-.3333333333333333333333333333333333d0*b0
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.520677486405081647234271944611547d0-10.04880939982741556246032950764708d0*b0
+      rkTheta(2) = 2.070455145596436382729929151810376d0+1.382142733160748895793662840980413d0*b0
+      rkTheta(3) = -.3333333333333333333333333333333333d0*b0-.3744441479783868387391430179970741d0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 6.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  9.443876248897524148749007950641664d-2
+      rkT(1,2) = -1.412552950209542084279903838077973d-1
+      rkT(1,3) = -3.00291941051474244918611170890539d-2
+      rkT(2,1) =  2.502131229653333113765090675125018d-1
+      rkT(2,2) =  2.041293522937999319959908102983381d-1
+      rkT(2,3) =  3.829421127572619377954382335998733d-1
+      rkT(3,1) =  1.0d0
+      rkT(3,2) =  1.0d0
+      rkT(3,3) =  0.0d0
+
+      rkTinv(1,1) =  4.178718591551904727346462658512057d0
+      rkTinv(1,2) =  3.27682820761062387082533272429617d-1
+      rkTinv(1,3) =  5.233764454994495480399309159089876d-1
+      rkTinv(2,1) = -4.178718591551904727346462658512057d0
+      rkTinv(2,2) = -3.27682820761062387082533272429617d-1
+      rkTinv(2,3) =  4.766235545005504519600690840910124d-1
+      rkTinv(3,1) = -5.02872634945786875951247343139544d-1
+      rkTinv(3,2) =  2.571926949855605429186785353601676d0
+      rkTinv(3,3) = -5.960392048282249249688219110993024d-1
+
+      rkTinvAinv(1,1) =  1.520148562492775501049204957366528d+1
+      rkTinvAinv(1,2) =  1.192055789400527921212348994770778d0
+      rkTinvAinv(1,3) =  1.903956760517560343018332287285119d0
+      rkTinvAinv(2,1) = -9.669512977505946748632625374449567d0
+      rkTinvAinv(2,2) = -8.724028436822336183071773193986487d0
+      rkTinvAinv(2,3) =  3.096043239482439656981667712714881d0
+      rkTinvAinv(3,1) = -1.409513259499574544876303981551774d+1
+      rkTinvAinv(3,2) =  5.895975725255405108079130152868952d0
+      rkTinvAinv(3,3) = -1.441236197545344702389881889085515d-1
+
+      rkAinvT(1,1) = .3435525649691961614912493915818282d0
+      rkAinvT(1,2) = -.4703191128473198422370558694426832d0
+      rkAinvT(1,3) = .3503786597113668965366406634269080d0
+      rkAinvT(2,1) = .9102338692094599309122768354288852d0
+      rkAinvT(2,2) = 1.715425895757991796035292755937326d0
+      rkAinvT(2,3) = .4040171993145015239277111187301784d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau2A_Coefficients
+
+    
+
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3C_Coefficients
+!    The coefficients of the 3-stage Lobatto-3C method
+!    (given to ~30 accurate digits)
+!    The parameter b0 can be chosen to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+
+      rkMethod = L3C
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d0
+      ELSE
+        b0 = 0.5d0
+      END IF
+! The coefficients of the Lobatto3C method
+
+      rkA(1,1) =  .1666666666666666666666666666666667d0
+      rkA(1,2) = -.3333333333333333333333333333333333d0
+      rkA(1,3) =  .1666666666666666666666666666666667d0
+      rkA(2,1) =  .1666666666666666666666666666666667d0
+      rkA(2,2) =  .4166666666666666666666666666666667d0
+      rkA(2,3) = -.8333333333333333333333333333333333d-1
+      rkA(3,1) =  .1666666666666666666666666666666667d0
+      rkA(3,2) =  .6666666666666666666666666666666667d0
+      rkA(3,3) =  .1666666666666666666666666666666667d0
+
+      rkB(1) = .1666666666666666666666666666666667d0
+      rkB(2) = .6666666666666666666666666666666667d0
+      rkB(3) = .1666666666666666666666666666666667d0
+
+      rkC(1) = 0.0d0
+      rkC(2) = 0.5d0
+      rkC(3) = 1.0d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .16666666666666666666666666666666667d0-b0
+      rkBhat(2) = .66666666666666666666666666666666667d0
+      rkBhat(3) = .16666666666666666666666666666666667d0
+      
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) =   .3808338772072650364017425226487022*b0
+      rkE(1) = -1.142501631621795109205227567946107*b0
+      rkE(2) = -1.523335508829060145606970090594809*b0
+      rkE(3) =   .3808338772072650364017425226487022*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .1666666666666666666666666666666667d0-1.d0*b0
+      rkBgam(2) = .6666666666666666666666666666666667d0
+      rkBgam(3) = -.2141672105405983697350758559820354d0
+      rkBgam(4) = .3808338772072650364017425226487021d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -3.d0*b0-.3808338772072650364017425226487021d0
+      rkTheta(2) = -4.d0*b0+1.523335508829060145606970090594808d0
+      rkTheta(3) = -.142501631621795109205227567946106d0+b0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 5.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 2.625816818958466716011888933765284d0
+      rkAlpha = 1.687091590520766641994055533117359d0
+      rkBeta  = 2.508731754924880510838743672432351d0
+
+      rkT(1,1) = 1.d0
+      rkT(1,2) = 1.d0
+      rkT(1,3) = 0.d0
+      rkT(2,1) = .4554100411010284672111720348287483d0
+      rkT(2,2) = -.6027050205505142336055860174143743d0
+      rkT(2,3) = -.4309321229203225731070721341350346d0
+      rkT(3,1) = 2.195823345445647152832799205549709d0
+      rkT(3,2) = -1.097911672722823576416399602774855d0
+      rkT(3,3) = .7850032632435902184104551358922130d0
+
+      rkTinv(1,1) = .4205559181381766909344950150991349d0
+      rkTinv(1,2) = .3488903392193734304046467270632057d0
+      rkTinv(1,3) = .1915253879645878102698098373933487d0
+      rkTinv(2,1) = .5794440818618233090655049849008650d0
+      rkTinv(2,2) = -.3488903392193734304046467270632057d0
+      rkTinv(2,3) = -.1915253879645878102698098373933487d0
+      rkTinv(3,1) = -.3659705575742745254721332009249516d0
+      rkTinv(3,2) = -1.463882230297098101888532803699806d0
+      rkTinv(3,3) = .4702733607340189781407813565524989d0
+
+      rkTinvAinv(1,1) = 1.104302803159744452668648155627548d0
+      rkTinvAinv(1,2) = .916122120694355522658740710823143d0
+      rkTinvAinv(1,3) = .5029105849749601702795812241441172d0
+      rkTinvAinv(2,1) = 1.895697196840255547331351844372453d0
+      rkTinvAinv(2,2) = 3.083877879305644477341259289176857d0
+      rkTinvAinv(2,3) = -1.502910584974960170279581224144117d0
+      rkTinvAinv(3,1) = .8362439183082935036129145574774502d0
+      rkTinvAinv(3,2) = -3.344975673233174014451658229909802d0
+      rkTinvAinv(3,3) = .312908409479233358005944466882642d0
+
+      rkAinvT(1,1) = 2.625816818958466716011888933765282d0
+      rkAinvT(1,2) = 1.687091590520766641994055533117358d0
+      rkAinvT(1,3) = -2.508731754924880510838743672432351d0
+      rkAinvT(2,1) = 1.195823345445647152832799205549710d0
+      rkAinvT(2,2) = -2.097911672722823576416399602774855d0
+      rkAinvT(2,3) = .7850032632435902184104551358922130d0
+      rkAinvT(3,1) = 5.765829871932827589653709477334136d0
+      rkAinvT(3,2) = .1170850640335862051731452613329320d0
+      rkAinvT(3,3) = 4.078738281412060947659653944216779d0
+
+  END SUBROUTINE Lobatto3C_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gauss_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+! The coefficients of the Gauss method
+
+
+      rkMethod = GAU
+      
+!      b0 = 4.0d0
+      b0 = 0.1d0
+      
+! The coefficients of the Gauss method
+
+      rkA(1,1) =  .1388888888888888888888888888888889d0
+      rkA(1,2) = -.359766675249389034563954710966045d-1
+      rkA(1,3) =  .97894440153083260495800422294756d-2
+      rkA(2,1) =  .3002631949808645924380249472131556d0
+      rkA(2,2) =  .2222222222222222222222222222222222d0
+      rkA(2,3) = -.224854172030868146602471694353778d-1
+      rkA(3,1) =  .2679883337624694517281977355483022d0
+      rkA(3,2) =  .4804211119693833479008399155410489d0
+      rkA(3,3) =  .1388888888888888888888888888888889d0
+
+      rkB(1) = .2777777777777777777777777777777778d0
+      rkB(2) = .4444444444444444444444444444444444d0
+      rkB(3) = .2777777777777777777777777777777778d0
+
+      rkC(1) = .1127016653792583114820734600217600d0
+      rkC(2) = .5000000000000000000000000000000000d0
+      rkC(3) = .8872983346207416885179265399782400d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) =-1.4788305577012361475298775666303999d0*b0 &
+                  +.27777777777777777777777777777777778d0
+      rkBhat(2) =  .44444444444444444444444444444444444d0 &
+                  +.66666666666666666666666666666666667d0*b0
+      rkBhat(3) = -.18783610896543051913678910003626672d0*b0 &
+                  +.27777777777777777777777777777777778d0
+
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = .1666666666666666666666666666666667d1
+      rkD(2) = -.1333333333333333333333333333333333d1
+      rkD(3) = .1666666666666666666666666666666667d1
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = .2153144231161121782447335303806954d0*b0
+      rkE(1) = -2.825278112319014084275808340593191d0*b0
+      rkE(2) = .2870858974881495709929780405075939d0*b0
+      rkE(3) = -.4558086256248162565397206448274867d-1*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.d0
+      rkBgam(1) = .2373339543355109188382583162660537d0
+      rkBgam(2) = .5879873931885192299409334646982414d0
+      rkBgam(3) = -.4063577064014232702392531134499046d-1
+      rkBgam(4) = .2153144231161121782447335303806955d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -2.594040933093095272574031876464493d0
+      rkTheta(2) = 1.824611539036311947589425112250199d0
+      rkTheta(3) = .1856563166634371860478043996459493d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408064d0
+      rkAlpha = 3.677814645373914407088529289295970d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) =  .7215185205520017032081769924397664d-1
+      rkT(1,2) = -.8224123057363067064866206597516454d-1
+      rkT(1,3) = -.6012073861930850173085948921439054d-1
+      rkT(2,1) =  .1188325787412778070708888193730294d0
+      rkT(2,2) =  .5306509074206139504614411373957448d-1
+      rkT(2,3) =  .3162050511322915732224862926182701d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) =  5.991698084937800775649580743981285d0
+      rkTinv(1,2) =  1.139214295155735444567002236934009d0
+      rkTinv(1,3) =   .4323121137838583855696375901180497d0
+      rkTinv(2,1) = -5.991698084937800775649580743981285d0
+      rkTinv(2,2) = -1.139214295155735444567002236934009d0
+      rkTinv(2,3) =   .5676878862161416144303624098819503d0
+      rkTinv(3,1) = -1.246213273586231410815571640493082d0
+      rkTinv(3,2) =  2.925559646192313662599230367054972d0
+      rkTinv(3,3) =  -.2577352012734324923468722836888244d0
+
+      rkTinvAinv(1,1) =  27.82766708436744962047620566703329d0
+      rkTinvAinv(1,2) =   5.290933503982655311815946575100597d0
+      rkTinvAinv(1,3) =   2.007817718512643701322151051660114d0
+      rkTinvAinv(2,1) = -17.66368928942422710690385180065675d0
+      rkTinvAinv(2,2) = -14.45491129892587782538830044147713d0
+      rkTinvAinv(2,3) =   2.992182281487356298677848948339886d0
+      rkTinvAinv(3,1) = -25.60678350282974256072419392007303d0
+      rkTinvAinv(3,2) =   6.762434375611708328910623303779923d0
+      rkTinvAinv(3,3) =   1.043979339483109825041215970036771d0
+      
+      rkAinvT(1,1) = .3350999483034677402618981153470483d0
+      rkAinvT(1,2) = -.5134173605009692329246186488441294d0
+      rkAinvT(1,3) = .6745196507033116204327635673208923d-1
+      rkAinvT(2,1) = .5519025480108928886873752035738885d0
+      rkAinvT(2,2) = 1.304651810077110066076640761092008d0
+      rkAinvT(2,3) = .9767507983414134987545585703726984d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295970d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+      
+  END SUBROUTINE Gauss_Coefficients
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau1A_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+!      KPP_REAL :: b0 = 0.3d0
+      KPP_REAL :: b0 = 0.1d0
+
+! The coefficients of the Radau1A method
+
+      rkMethod = R1A
+
+      rkA(1,1) =  .1111111111111111111111111111111111d0
+      rkA(1,2) = -.1916383190435098943442935597058829d0
+      rkA(1,3) =  .8052720793239878323318244859477174d-1
+      rkA(2,1) =  .1111111111111111111111111111111111d0
+      rkA(2,2) =  .2920734116652284630205027458970589d0
+      rkA(2,3) = -.481334970546573839513422644787591d-1
+      rkA(3,1) =  .1111111111111111111111111111111111d0
+      rkA(3,2) =  .5370223859435462728402311533676479d0
+      rkA(3,3) =  .1968154772236604258683861429918299d0
+
+      rkB(1) = .1111111111111111111111111111111111d0
+      rkB(2) = .5124858261884216138388134465196080d0
+      rkB(3) = .3764030627004672750500754423692808d0
+
+      rkC(1) = 0.d0
+      rkC(2) = .3550510257216821901802715925294109d0
+      rkC(3) = .8449489742783178098197284074705891d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .11111111111111111111111111111111111d0-b0
+      rkBhat(2) = .51248582618842161383881344651960810d0
+      rkBhat(3) = .37640306270046727505007544236928079d0
+
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = .3333333333333333333333333333333333d0
+      rkD(2) = -.8914115380582557157653087040196127d0
+      rkD(3) = .1558078204724922382431975370686279d1
+
+      ! Classical error estimator: 
+      ! H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j
+      rkE(0) =   .2748888295956773677478286035994148d0*b0
+      rkE(1) = -1.374444147978386838739143017997074d0*b0
+      rkE(2) = -1.335337922441686804550326197041126d0*b0
+      rkE(3) =   .235782604058977333559011782643466d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.0d0
+      rkBgam(1) = .1948150124588532186183490991130616d-1
+      rkBgam(2) = .7575249005733381398986810981093584d0
+      rkBgam(3) = -.518952314149008295083446116200793d-1
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.224370034375505083904362087063351d0
+      rkTheta(2) = .9340045331532641409047527962010133d0
+      rkTheta(3) = .4656990124352088397561234800640929d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  .424293819848497965354371036408369d0
+      rkT(1,2) = -.3235571519651980681202894497035503d0
+      rkT(1,3) = -.522137786846287839586599927945048d0
+      rkT(2,1) =  .57594609499806128896291585429339d-1
+      rkT(2,2) =  .3148663231849760131614374283783d-2
+      rkT(2,3) =  .452429247674359778577728510381731d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 1.233523612685027760114769983066164d0
+      rkTinv(1,2) = 1.423580134265707095505388133369554d0
+      rkTinv(1,3) = .3946330125758354736049045150429624d0
+      rkTinv(2,1) = -1.233523612685027760114769983066164d0
+      rkTinv(2,2) = -1.423580134265707095505388133369554d0
+      rkTinv(2,3) = .6053669874241645263950954849570376d0
+      rkTinv(3,1) = -.1484438963257383124456490049673414d0
+      rkTinv(3,2) = 2.038974794939896109682070471785315d0
+      rkTinv(3,3) = -.544501292892686735299355831692542d-1
+
+      rkTinvAinv(1,1) =  4.487354449794728738538663081025420d0
+      rkTinvAinv(1,2) =  5.178748573958397475446442544234494d0
+      rkTinvAinv(1,3) =  1.435609490412123627047824222335563d0
+      rkTinvAinv(2,1) = -2.854361287939276673073807031221493d0
+      rkTinvAinv(2,2) = -1.003648660720543859000994063139137d+1
+      rkTinvAinv(2,3) =  1.789135380979465422050817815017383d0
+      rkTinvAinv(3,1) = -4.160768067752685525282947313530352d0
+      rkTinvAinv(3,2) =  1.124128569859216916690209918405860d0
+      rkTinvAinv(3,3) =  1.700644430961823796581896350418417d0
+
+      rkAinvT(1,1) = 1.543510591072668287198054583233180d0
+      rkAinvT(1,2) = -2.460228411937788329157493833295004d0
+      rkAinvT(1,3) = -.412906170450356277003910443520499d0
+      rkAinvT(2,1) = .209519643211838264029272585946993d0
+      rkAinvT(2,2) = 1.388545667194387164417459732995766d0
+      rkAinvT(2,3) = 1.20339553005832004974976023130002d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau1A_Coefficients
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3A_Coefficients
+!    The coefficients of the 4-stage Lobatto-3A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+
+! The coefficients of the Lobatto-3A method
+
+      rkMethod = L3A
+
+      rkA(0,0) = 0.0d0
+      rkA(0,1) = 0.0d0
+      rkA(0,2) = 0.0d0
+      rkA(0,3) = 0.0d0
+      rkA(1,0) = .11030056647916491413674311390609397d0
+      rkA(1,1) = .1896994335208350858632568860939060d0
+      rkA(1,2) = -.339073642291438837776604807792215d-1
+      rkA(1,3) = .1030056647916491413674311390609397d-1
+      rkA(2,0) = .73032766854168419196590219427239365d-1
+      rkA(2,1) = .4505740308958105504443271474458881d0
+      rkA(2,2) = .2269672331458315808034097805727606d0
+      rkA(2,3) = -.2696723314583158080340978057276063d-1
+      rkA(3,0) = .83333333333333333333333333333333333d-1
+      rkA(3,1) = .4166666666666666666666666666666667d0
+      rkA(3,2) = .4166666666666666666666666666666667d0
+      rkA(3,3) = .8333333333333333333333333333333333d-1
+      
+      rkB(0) = .83333333333333333333333333333333333d-1
+      rkB(1) = .4166666666666666666666666666666667d0
+      rkB(2) = .4166666666666666666666666666666667d0
+      rkB(3) = .8333333333333333333333333333333333d-1
+
+      rkC(0) = 0.0d0
+      rkC(1) = .2763932022500210303590826331268724d0
+      rkC(2) = .7236067977499789696409173668731276d0
+      rkC(3) = 1.0d0
+
+      ! New solution: H*Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(0) = 0.0d0
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+      
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = .90909090909090909090909090909090909d-1
+      rkBhat(1) = .39972675774621371442114262372173276d0
+      rkBhat(2) = .43360657558711961891219070961160058d0
+      rkBhat(3) = .15151515151515151515151515151515152d-1
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+
+      rkE(0) =  .1957403846510110711315759367097231d-1
+      rkE(1) = -.1986820345632580910316020806676438d0
+      rkE(2) =  .1660586371214229125096727578826900d0
+      rkE(3) = -.9787019232550553556578796835486154d-1
+
+      ! Sdirk error estimator: 
+      rkF(0) =  0.0d0
+      rkF(1) = -.66535815876916686607437314126436349d0
+      rkF(2) =  1.7419302743497277572980407931678409d0
+      rkF(3) = -1.2918865386966730694684011822841728d0
+       
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+      
+      ! Sdirk error estimator: 
+      rkBgam(0) =  .2950472755430528877214995073815946d-1
+      rkBgam(1) =  .5370310883226113978352873633882769d0
+      rkBgam(2) =  .2963022450107219354980459699450564d0
+      rkBgam(3) = -.7815248400375080035021681445218837d-1
+      rkBgam(4) =  .2153144231161121782447335303806956d0
+      
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(0) = 0.0d0
+      rkTheta(1) = -.6653581587691668660743731412643631d0
+      rkTheta(2) = 1.741930274349727757298040793167842d0
+      rkTheta(3) = -.291886538696673069468401182284174d0
+
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408063d0
+      rkAlpha = 3.677814645373914407088529289295968d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) = .5303036326129938105898786144870856d-1
+      rkT(1,2) = -.7776129960563076320631956091016914d-1
+      rkT(1,3) = .6043307469475508514468017399717112d-2
+      rkT(2,1) = .2637242522173698467283726114649606d0
+      rkT(2,2) = .2193839918662961493126393244533346d0
+      rkT(2,3) = .3198765142300936188514264752235344d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 7.695032983257654470769069079238553d0
+      rkTinv(1,2) = -.1453793830957233720334601186354032d0
+      rkTinv(1,3) = .6302696746849084900422461036874826d0
+      rkTinv(2,1) = -7.695032983257654470769069079238553d0
+      rkTinv(2,2) = .1453793830957233720334601186354032d0
+      rkTinv(2,3) = .3697303253150915099577538963125174d0
+      rkTinv(3,1) = -1.066660885401270392058552736086173d0
+      rkTinv(3,2) = 3.146358406832537460764521760668932d0
+      rkTinv(3,3) = -.7732056038202974770406168510664738d0
+
+      rkTinvAinv(1,1) = 35.73858579417120341641749040405149d0
+      rkTinvAinv(1,2) = -.675195748578927863668368190236025d0
+      rkTinvAinv(1,3) = 2.927206016036483646751158874041632d0
+      rkTinvAinv(2,1) = -24.55824590667225493437162206039511d0
+      rkTinvAinv(2,2) = -10.50514413892002061837750015342036
+      rkTinvAinv(2,3) = 4.072793983963516353248841125958369d0
+      rkTinvAinv(3,1) = -30.92301972744621647251975054630589d0
+      rkTinvAinv(3,2) = 12.08182467154052413351908559269928d0
+      rkTinvAinv(3,3) = -1.546411207640594954081233702132946d0
+
+      rkAinvT(1,1) = .2462926658317812882584158369803835d0
+      rkAinvT(1,2) = -.2647871194157644619747121197289574d0
+      rkAinvT(1,3) = .2950720515900466654896406799284586d0
+      rkAinvT(2,1) = 1.224833192317784474576995878738004d0
+      rkAinvT(2,2) = 1.929224190340981580557006261869763d0
+      rkAinvT(2,3) = .4066803323234419988910915619080306d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295968d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+
+  END SUBROUTINE Lobatto3A_Coefficients
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RungeKutta ! and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T , Told
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+    INTEGER :: i, j 
+#else
+    KPP_REAL :: JF(LU_NONZERO)
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+
+  END SUBROUTINE JAC_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_adj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_adj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_adj.def	(revision 3477)
@@ -0,0 +1,8 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE runge_kutta_adj
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_adj.f90	(revision 3477)
@@ -0,0 +1,2687 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RungeKuttaADJ - Adjoint Model of Fully Implicit 3-stage Runge-Kutta:   !
+!          * Radau-2A   quadrature (order 5)                              !
+!          * Radau-1A   quadrature (order 5)                              !
+!          * Lobatto-3C quadrature (order 4)                              !
+!          * Gauss      quadrature (order 6)                              !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2005                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Jacobian
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+!~~~>  Statistics on the work performed by the Runge-Kutta method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4, &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihacc=2, ihnew=3
+  
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE_ADJ(NADJ, Y, Lambda, TIN, TOUT,  &
+             ATOL_adj, RTOL_adj,                        &
+             ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL
+
+    IMPLICIT NONE
+
+!~~~> Y - Concentrations
+   KPP_REAL  :: Y(NVAR)
+!~~~> NADJ - No. of cost functionals for which adjoints
+!                are evaluated simultaneously
+!            If single cost functional is considered (like in
+!                most applications) simply set NADJ = 1      
+   INTEGER NADJ
+!~~~> Lambda - Sensitivities of concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+    KPP_REAL :: Lambda(NVAR,NADJ)
+!~~~> Tolerances for adjoint calculations
+!     (used for full continuous adjoint, and for controlling
+!     the convergence of iterations for solving the discrete adjoint)   
+    KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER       :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are: 0=interpolated, 1=zero
+    ICNTRL(7)  = 2   ! Adj. system solved by: 1=iteration, 2=direct, 3=adaptive
+    ICNTRL(8)  = 0   ! Adj. LU decomp: 0=compute, 1=save from fwd
+    ICNTRL(9)  = 2   ! Adjoint: 1=none, 2=discrete, 3=full continuous, 4=simplified continuous
+    ICNTRL(10) = 0   ! Error estimator: 0=classic, 1=SDIRK
+    ICNTRL(11) = 1   ! Step controller: 1=Gustaffson, 2=classic
+
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+    
+    T1 = TIN; T2 = TOUT
+    CALL RungeKuttaADJ(NVAR, Y, NADJ, Lambda, T1, T2,   &
+                       RTOL, ATOL, ATOL_adj, RTOL_adj,  &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR  )
+
+    Ntotal = Ntotal + ISTATUS(istp)
+!    PRINT*,'NSTEPS=',ISTATUS(istp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'Runge-Kutta-ADJ: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE_ADJ
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RungeKuttaADJ( N, Y, NADJ, Lambda,Tstart,Tend,      &
+                         RelTol, AbsTol, RelTol_adj, AbsTol_adj, &
+                         RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!  This implementation is based on the book and the code Radau5:
+!
+!         E. HAIRER AND G. WANNER
+!         "SOLVING ORDINARY DIFFERENTIAL EQUATIONS II. 
+!              STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!         UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!         CH-1211 GENEVE 24, SWITZERLAND
+!         E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!   Methods:
+!          * Radau-2A   quadrature (order 5)                              
+!          * Radau-1A   quadrature (order 5)                              
+!          * Lobatto-3C quadrature (order 4)                              
+!          * Gauss      quadrature (order 6)                              
+!                                                                         
+!   (C)  Adrian Sandu, August 2005                                       
+!   Virginia Polytechnic Institute and State University                  
+!   Contact: sandu@cs.vt.edu                                             
+!   Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!   This implementation is part of KPP - the Kinetic PreProcessor        
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!       ----------------
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!     N           Dimension of the system
+!     T           Initial time value
+!
+!     Tend        Final T value (Tend-T may be positive or negative)
+!
+!     Y(N)        Initial values for Y
+!
+!     RelTol,AbsTol   Relative and absolute error tolerances. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = RK method selection       
+!              = 1:  Radau-2A    (the default)
+!              = 2:  Lobatto-3C
+!              = 3:  Gauss
+!              = 4:  Radau-1A
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 10000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve the linear ADJ equations:
+!        ICNTRL(7)=0,1 : modified Newton re-using LU (the default)
+!                        with a fixed number of iterations
+!        ICNTRL(7)=2 :   direct solution (additional one LU factorization
+!                        of 3Nx3N matrix per step); good for debugging
+!        ICNTRL(7)=3 :   adaptive solution (if Newton does not converge
+!                        switch to direct)
+!
+!    ICNTRL(8)  -> checkpointing the LU factorization at each step:
+!        ICNTRL(8)=0 : do *not* save LU factorization (the default)
+!        ICNTRL(8)=1 : save LU factorization
+!        Note: if ICNTRL(7)=1 the LU factorization is *not* saved
+!
+!    ICNTRL(9) -> Type of adjoint algorithm
+!         = 0 : default is discrete adjoint ( of method ICNTRL(3) )
+!         = 1 : no adjoint       
+!         = 2 : discrete adjoint ( of method ICNTRL(3) )
+!         = 3 : fully adaptive continuous adjoint ( with method ICNTRL(6) )
+!         = 4 : simplified continuous adjoint ( with method ICNTRL(6) )
+!
+!    ICNTRL(10) -> switch for error estimation strategy
+!		ICNTRL(10) = 0: one additional stage at c=0, 
+!				see Hairer (default)
+!		ICNTRL(10) = 1: two additional stages at c=0 
+!				and SDIRK at c=1, stiffly accurate
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(11)=1:  mod. predictive controller (Gustafsson, default)
+!              ICNTRL(11)=2:  classical step size control
+!              the choice 1 seems to produce safer results;
+!              for simple problems, the choice 2 produces
+!              often slightly faster runs
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  (highly recommended to keep Hmin = ZERO, the default)
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, the starting step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IERR        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of Jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      INTEGER, INTENT(IN)     :: NADJ
+      KPP_REAL, INTENT(INOUT) :: Lambda(N,NADJ)
+      KPP_REAL, INTENT(IN) :: AbsTol_adj(N,NADJ), RelTol_adj(N,NADJ)
+      KPP_REAL :: Y(N),AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson, SdirkError, SaveLU
+      INTEGER :: IERR, ITOL
+      KPP_REAL, INTENT(IN):: Tstart,Tend
+      KPP_REAL :: Texit
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit, AdjointType, rkMethod
+      KPP_REAL :: Hmin,Hmax,Hstart,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin, NewtonTol
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      ! Runge-Kutta method parameters
+      INTEGER, PARAMETER :: R2A=1, R1A=2, L3C=3, GAU=4, L3A=5
+      KPP_REAL :: rkT(3,3), rkTinv(3,3), rkTinvAinv(3,3), rkAinvT(3,3), &
+                       rkA(3,3), rkB(3),  rkC(3), rkD(0:3), rkE(0:3), 	   &
+		       rkBgam(0:4), rkBhat(0:4), rkTheta(0:3),             &
+                       rkGamma,  rkAlpha, rkBeta, rkELO
+      ! ADJ method parameters
+      INTEGER, PARAMETER :: KPP_ROOT_none = 1, KPP_ROOT_discrete = 2,     	   &
+                            KPP_ROOT_continuous = 3, KPP_ROOT_simple_continuous = 4
+      INTEGER :: AdjointSolve                      
+      INTEGER, PARAMETER :: Solve_direct = 1, Solve_fixed = 2,     	   &
+                            Solve_adaptive = 3
+      INTEGER, PARAMETER :: bufsize = 10000
+      INTEGER :: stack_ptr = 0 ! last written entry
+      KPP_REAL, DIMENSION(:), POINTER :: chk_H, chk_T
+      KPP_REAL, DIMENSION(:,:), POINTER :: chk_Y, chk_Z, chk_E1
+      INTEGER, DIMENSION(:), POINTER :: chk_NiT
+      COMPLEX(kind=dp), DIMENSION(:,:), POINTER :: chk_E2
+      KPP_REAL, DIMENSION(:,:), POINTER :: chk_dY, chk_d2Y
+      !~~~> Local variables
+      INTEGER :: i 
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IERR = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> Error control selection  
+      IF (ICNTRL(10) == 0) THEN 
+         SdirkError = .FALSE.
+      ELSE
+         SdirkError = .TRUE.
+      END IF      
+!~~~> Method selection  
+      SELECT CASE (ICNTRL(3))     
+      CASE (0,1)
+         CALL Radau2A_Coefficients
+      CASE (2)
+         CALL Lobatto3C_Coefficients
+      CASE (3)
+         CALL Gauss_Coefficients
+      CASE (4)
+         CALL Radau1A_Coefficients
+      CASE DEFAULT
+         WRITE(6,*) 'ICNTRL(3)=',ICNTRL(3)
+         CALL RK_ErrorMsg(-13,Tstart,ZERO,IERR)
+      END SELECT
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RK_ErrorMsg(-1,Tstart,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonMaxit    maximal number of Newton iterations
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RK_ErrorMsg(-2,Tstart,ZERO,IERR)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~>  How to solve the linear adjoint system
+      SELECT CASE (ICNTRL(7))     
+      CASE (0,1)
+         AdjointSolve = Solve_fixed
+      CASE (2)
+         AdjointSolve = Solve_direct
+      CASE (3)
+         AdjointSolve = Solve_adaptive
+      CASE DEFAULT  
+         PRINT * , 'User-selected adjoint solution: ICNTRL(7)=', ICNTRL(7)
+         PRINT * , 'Implemented: =(0,1) (fixed), =2 (direct), =3 (adaptive)'
+         CALL rk_ErrorMsg(-9,Tstart,ZERO,IERR)
+         RETURN      
+      END SELECT
+!~~~>  Discrete or continuous adjoint formulation
+      SELECT CASE (ICNTRL(9))     
+      CASE (0,2)
+         AdjointType = KPP_ROOT_discrete
+      CASE (1)
+         AdjointType = KPP_ROOT_none
+      CASE DEFAULT  
+         PRINT * , 'User-selected adjoint type: ICNTRL(9)=', ICNTRL(9)
+         PRINT * , 'Implemented: =(0,2) (discrete adj) and =1 (no adj)'
+         CALL rk_ErrorMsg(-9,Tstart,ZERO,IERR)
+         RETURN      
+      END SELECT
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) 
+      IF (AdjointSolve == Solve_direct) SaveLU = .FALSE.
+!~~~> Gustafsson: step size controller
+      IF (ICNTRL(11) == 0) THEN
+         Gustafsson = .TRUE.
+      ELSE
+         Gustafsson = .FALSE.
+      END IF
+
+!~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0
+      Roundoff = WLAMCH('E');
+
+!~~~> Hmin = minimal step size
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSE
+         Hmin = MIN(ABS(RCNTRL(1)),ABS(Tend-Tstart))
+      END IF
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tend-Tstart)
+      ELSE
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+      END IF
+!~~~> Hstart = starting step size
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = ZERO
+      ELSE
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+      END IF
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 1.0d-3) .OR. (FacSafe >= ONE) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RK_ErrorMsg(-4,Tstart,ZERO,IERR)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RK_ErrorMsg(-5,Tstart,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonTol:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+         IF (NewtonTol <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RK_ErrorMsg(-6,Tstart,ZERO,IERR)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RK_ErrorMsg(-7,Tstart,ZERO,IERR)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RK_ErrorMsg(-8,Tstart,ZERO,IERR)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RK_ErrorMsg(-8,Tstart,ZERO,IERR)
+          END IF
+          END DO
+      END IF
+
+!~~~> Parameters are wrong
+      IF (IERR < 0) RETURN
+
+!~~~>  Allocate checkpoint space or open checkpoint files
+   IF (AdjointType == KPP_ROOT_discrete) THEN
+       CALL rk_AllocateDBuffers()
+   ELSEIF ( (AdjointType == KPP_ROOT_continuous).OR. &
+           (AdjointType == KPP_ROOT_simple_continuous) ) THEN
+       CALL rk_AllocateCBuffers
+   END IF
+
+!~~~> Call the core method
+      CALL RK_FwdIntegrator( N,Tstart,Tend,Y,AdjointType,IERR )
+!   PRINT*,'FORWARD STATISTICS'
+!   PRINT*,'Step=',Istatus(istp),' Acc=',Istatus(iacc),   &
+!        ' Rej=',Istatus(irej), ' Singular=',Istatus(isng)
+   Nstp = 0
+   Nacc = 0
+   Nrej = 0
+   Nsng = 0
+
+!~~~>  If Forward integration failed return   
+   IF (IERR<0) RETURN
+
+   SELECT CASE (AdjointType)   
+   CASE (KPP_ROOT_discrete)   
+     CALL rk_DadjInt (                          &
+        NADJ, Lambda,                           &
+        Tstart, Tend, Texit,                    &
+        IERR )
+   CASE (KPP_ROOT_continuous) 
+     CALL rk_CadjInt (                          &
+        NADJ, Lambda,                           &
+        Tend, Tstart, Texit,                    &
+        IERR )
+   CASE (KPP_ROOT_simple_continuous)
+     CALL rk_SimpleCadjInt (                    &
+        NADJ, Lambda,                           &
+        Tstart, Tend, Texit,                    &
+        IERR )
+   END SELECT ! AdjointType
+!   PRINT*,'ADJOINT STATISTICS'
+!   PRINT*,'Step=',Nstp,' Acc=',Nacc,             &
+!        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  Free checkpoint space or close checkpoint files
+   IF (AdjointType == KPP_ROOT_discrete) THEN
+      CALL rk_FreeDBuffers
+   ELSEIF ( (AdjointType == KPP_ROOT_continuous) .OR. &
+           (AdjointType == KPP_ROOT_simple_continuous) ) THEN
+      CALL rk_FreeCBuffers
+   END IF
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS ! Internal procedures to RungeKuttaADJ
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_AllocateDBuffers()
+!~~~>  Allocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_Z(NVAR*3,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Z'; STOP
+   END IF   
+   ALLOCATE( chk_NiT(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer NiT'; STOP
+   END IF   
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA      
+     ALLOCATE( chk_E1(NVAR*NVAR,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E1'; STOP
+     END IF   
+     ALLOCATE( chk_E2(NVAR*NVAR,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E2'; STOP
+     END IF   
+#else      
+     ALLOCATE( chk_E1(LU_NONZERO,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E1'; STOP
+     END IF   
+     ALLOCATE( chk_E2(LU_NONZERO,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E2'; STOP
+     END IF   
+#endif
+   END IF   
+   
+ 
+ END SUBROUTINE rk_AllocateDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_FreeDBuffers()
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_Z, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Z'; STOP
+   END IF   
+   DEALLOCATE( chk_NiT, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer NiT'; STOP
+   END IF   
+   IF (SaveLU) THEN 
+     DEALLOCATE( chk_E1, STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E1'; STOP
+     END IF   
+     DEALLOCATE( chk_E2, STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E2'; STOP
+     END IF   
+   END IF   
+
+ END SUBROUTINE rk_FreeDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_AllocateCBuffers()
+!~~~>  Allocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_dY(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer dY'; STOP
+   END IF   
+   ALLOCATE( chk_d2Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE rk_AllocateCBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_FreeCBuffers()
+!~~~>  Dallocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   print*,'cbuffers deallocate???'
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_dY, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer dY'; STOP
+   END IF   
+   DEALLOCATE( chk_d2Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE rk_FreeCBuffers
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_DPush( T, H, Y, Zstage, NewIt, E1, E2 )!, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL :: T, H, Y(NVAR), Zstage(NVAR*3)
+   INTEGER :: NewIt
+#ifdef FULL_ALGEBRA      
+   KPP_REAL :: E1(NVAR,NVAR)
+   COMPLEX(kind=dp) :: E2(NVAR,NVAR)
+   INTEGER :: i, j   
+#else      
+   KPP_REAL :: E1(LU_NONZERO)
+   COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif      
+
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   ! CALL WCOPY(NVAR,Y,1,chk_Y(1,stack_ptr),1)
+   ! CALL WCOPY(NVAR*3,Zstage,1,chk_Z(1,stack_ptr),1)
+   chk_Y(1:N,stack_ptr) = Y(1:N)
+   chk_Z(1:3*N,stack_ptr) = Zstage(1:3*N)
+   chk_NiT( stack_ptr ) = NewIt
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA      
+     ! CALL WCOPY(NVAR*NVAR, E1,1,chk_E1(1,stack_ptr),1)
+     ! CALL WCOPYCmplx(NVAR*NVAR, E2,1,chk_E2(1,stack_ptr),1)
+     DO j=1,NVAR
+       DO i=1,NVAR
+         chk_E1(NVAR*(j-1)+i,stack_ptr) = E1(i,j)
+         chk_E2(NVAR*(j-1)+i,stack_ptr) = E2(i,j)
+       END DO
+     END DO
+#else      
+     ! CALL WCOPY(LU_NONZERO, E1,1,chk_E1(1,stack_ptr),1)
+     ! CALL WCOPYCmplx(LU_NONZERO, E2,1,chk_E2(1,stack_ptr),1)
+     chk_E1(1:LU_NONZERO,stack_ptr) = E1(1:LU_NONZERO)
+     chk_E2(1:LU_NONZERO,stack_ptr) = E2(1:LU_NONZERO)
+#endif      
+   END IF  
+   !CALL WCOPY(LU_NONZERO,Jcb,1,chk_J(1,stack_ptr),1)
+  
+  END SUBROUTINE rk_DPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_DPop( T, H, Y, Zstage, NewIt, E1, E2 ) !, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), Zstage(NVAR*3) ! , Jcb(LU_NONZERO)
+   INTEGER :: NewIt
+#ifdef FULL_ALGEBRA      
+   KPP_REAL :: E1(NVAR,NVAR)
+   COMPLEX(kind=dp) :: E2(NVAR,NVAR)   
+   INTEGER :: i, j   
+#else      
+   KPP_REAL :: E1(LU_NONZERO)
+   COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif      
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   ! CALL WCOPY(NVAR,chk_Y(1,stack_ptr),1,Y,1)
+   Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+   ! CALL WCOPY(NVAR*3,chk_Z(1,stack_ptr),1,Zstage,1)
+   Zstage(1:3*NVAR) = chk_Z(1:3*NVAR,stack_ptr)
+   NewIt = chk_NiT( stack_ptr )
+   IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA      
+     ! CALL WCOPY(NVAR*NVAR,chk_E1(1,stack_ptr),1, E1,1)
+     ! CALL WCOPYCmplx(NVAR*NVAR,chk_E2(1,stack_ptr),1, E2,1)
+     DO j=1,NVAR
+       DO i=1,NVAR
+         E1(i,j) = chk_E1(NVAR*(j-1)+i,stack_ptr)
+         E2(i,j) = chk_E2(NVAR*(j-1)+i,stack_ptr)
+       END DO
+     END DO
+#else      
+     ! CALL WCOPY(LU_NONZERO,chk_E1(1,stack_ptr),1, E1,1)
+     ! CALL WCOPYCmplx(LU_NONZERO,chk_E2(1,stack_ptr),1, E2,1)
+     E1(1:LU_NONZERO) = chk_E1(1:LU_NONZERO,stack_ptr)
+     E2(1:LU_NONZERO) = chk_E2(1:LU_NONZERO,stack_ptr)
+#endif      
+   END IF  
+   !CALL WCOPY(LU_NONZERO,chk_J(1,stack_ptr),1,Jcb,1)
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE rk_DPop
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_CPush(T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   ! CALL WCOPY(NVAR,Y,1,chk_Y(1,stack_ptr),1)
+   ! CALL WCOPY(NVAR,dY,1,chk_dY(1,stack_ptr),1)
+   ! CALL WCOPY(NVAR,d2Y,1,chk_d2Y(1,stack_ptr),1)
+   chk_Y(1:NVAR,stack_ptr)  =  Y(1:NVAR)
+   chk_dY(1:NVAR,stack_ptr) = dY(1:NVAR)
+   chk_d2Y(1:NVAR,stack_ptr)= d2Y(1:NVAR)
+  
+  END SUBROUTINE rk_CPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_CPop( T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   ! CALL WCOPY(NVAR,chk_Y(1,stack_ptr),1,Y,1)
+   ! CALL WCOPY(NVAR,chk_dY(1,stack_ptr),1,dY,1)
+   ! CALL WCOPY(NVAR,chk_d2Y(1,stack_ptr),1,d2Y,1)
+     Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+    dY(1:NVAR) = chk_dY(1:NVAR,stack_ptr)
+   d2Y(1:NVAR) = chk_d2Y(1:NVAR,stack_ptr)
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE rk_CPop
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_FwdIntegrator( N,Tstart,Tend,Y,AdjointType,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+      INTEGER,  INTENT(IN)         :: N
+      KPP_REAL, INTENT(IN)    :: Tend, Tstart
+      KPP_REAL, INTENT(INOUT) :: Y(N)
+      INTEGER,  INTENT(OUT)        :: IERR
+      INTEGER,  INTENT(IN)         :: AdjointType
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL    :: FJAC(N,N), E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)   
+#else
+      KPP_REAL    :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif                
+      KPP_REAL, DIMENSION(N) :: Z1,Z2,Z3,Z4,SCAL,DZ1,DZ2,DZ3,DZ4,G,TMP,FCN0
+      KPP_REAL  :: CONT(N,3), Tdirection,  H, T, Hacc, Hnew, Hold, Fac,  &
+                 FacGus, Theta, Err, ErrOld, NewtonRate, NewtonIncrement,  &
+                 Hratio, Qnewton, NewtonPredictedErr,NewtonIncrementOld, ThetaSD
+      INTEGER :: IP1(N),IP2(N),NewtonIter, ISING, Nconsecutive, NewIt
+      LOGICAL :: Reject, FirstStep, SkipJac, NewtonDone, SkipLU
+      
+      KPP_REAL, DIMENSION(:), POINTER :: Zstage
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (AdjointType == KPP_ROOT_discrete) THEN ! Save stage solution
+        ALLOCATE(Zstage(N*3), STAT=i)
+        IF (i/=0) THEN
+          PRINT*,'Allocation of Zstage failed'
+          STOP
+        END IF
+      END IF   
+      T=Tstart
+
+      Tdirection = SIGN(ONE,Tend-Tstart)
+      H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , Hmax )
+      IF (ABS(H) <= 10.d0*Roundoff) H = 1.0d-6
+      H = SIGN(H,Tdirection)
+      Hold      = H
+      Reject    = .FALSE.
+      FirstStep = .TRUE.
+      SkipJac   = .FALSE.
+      SkipLU    = .FALSE.
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= ZERO) THEN
+         H = Tend-T
+      END IF
+      Nconsecutive = 0
+      CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+        !~~~> Compute the Jacobian matrix
+        IF ( .NOT.SkipJac ) THEN
+          CALL JAC_CHEM(T,Y,FJAC)
+          ISTATUS(ijac) = ISTATUS(ijac) + 1
+        END IF
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+        IF (ISING /= 0) THEN
+          ISTATUS(isng) = ISTATUS(isng) + 1; Nconsecutive = Nconsecutive + 1
+          IF (Nconsecutive >= 5) THEN
+            CALL RK_ErrorMsg(-12,T,H,IERR); RETURN
+          END IF
+          H=H*0.5d0; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+          CYCLE Tloop
+        ELSE
+          Nconsecutive = 0    
+        END IF   
+      END IF ! SkipLU
+   
+      ISTATUS(istp) = ISTATUS(istp) + 1
+      IF (ISTATUS(istp) > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RK_ErrorMsg(-9,T,H,IERR); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RK_ErrorMsg(-10,T,H,IERR); RETURN
+      END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+      !~~~>  Starting values for Newton iteration
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+      ELSE
+         ! Evaluate quadratic polynomial
+         CALL RK_Interpolate('eval',N,H,Hold,Z1,Z2,Z3,CONT)
+      END IF
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      Fac = 0.5d0 ! Step reduction if too many iterations
+      
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit  
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,DZ1,DZ2,DZ3)
+            
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+
+
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ2)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ3)**2 )/3.0d0 )
+            
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+                IF ( NewtonIter < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                    EXIT NewtonLoop
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1,1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2,1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3,1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+	      NewIt = NewtonIter
+	      EXIT NewtonLoop
+	    END IF  
+   	    IF (NewtonIter == NewtonMaxit) THEN
+		PRINT*, 'Slow or no convergence in Newton Iteration: Max no. of', &
+		 	'Newton iterations reached'
+	    END IF
+
+      END DO NewtonLoop
+
+            
+      IF (.NOT.NewtonDone) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+	   ISTATUS(irej) = ISTATUS(irej) + 1
+           CYCLE Tloop
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SDIRK Stage
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+
+!~~~>  Starting values for Newton iterations
+       Z4(1:N) = Z3(1:N)
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL FUN_CHEM(T,Y,DZ4)
+       ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       
+!       G = H*rkBgam(0)*DZ4 + rkTheta(1)*Z1 + rkTheta(2)*Z2 + rkTheta(3)*Z3
+       CALL Set2Zero(N, G)
+       CALL WAXPY(N,rkBgam(0)*H, DZ4,1,G,1) 
+       CALL WAXPY(N,rkTheta(1),Z1,1,G,1)
+       CALL WAXPY(N,rkTheta(2),Z2,1,G,1)
+       CALL WAXPY(N,rkTheta(3),Z3,1,G,1)
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+SDNewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+	    CALL WADD(N,Y,Z4,TMP)         ! TMP <- Y + Z4
+	    CALL FUN_CHEM(T+H,TMP,DZ4) 	  ! DZ4 <- Fun(Y+Z4)         
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ4(1:N) = (G(1:N)-Z4(1:N))*(rkGamma/H) + DZ4(1:N)
+	    CALL WAXPY (N, -ONE*rkGamma/H, Z4, 1, DZ4, 1)
+            CALL WAXPY (N, rkGamma/H, G,1, DZ4,1)
+
+!~~~>   Solve the linear system
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E1, N, IP1, DZ4, N, ISING )
+#else
+            CALL KppSolve(E1, DZ4)
+#endif
+            
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4)
+            IF ( NewtonIter == 1 ) THEN
+                ThetaSD      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaSD = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaSD < 0.99d0) THEN
+                    NewtonRate = ThetaSD/(ONE-ThetaSD)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaSD**(NewtonMaxit-NewtonIter)/(ONE-ThetaSD)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      !print*,'Error too large: ', NewtonPredictedErr
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT SDNewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: ThetaSD too large
+                    !print*,'Theta too large: ',ThetaSD
+                    EXIT SDNewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z4 <-- Z4 + DZ4
+            CALL WAXPY(N,ONE,DZ4,1,Z4,1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT SDNewtonLoop
+            
+            END DO SDNewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+                CYCLE Tloop
+            END IF
+      END IF
+!~~~>  End of implified SDIRK Newton iterations
+
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+!         DZ4(1:N) =  rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4    
+	 CALL Set2Zero(N, DZ4)
+	 IF (rkD(1) /= ZERO) CALL WAXPY(N, rkD(1), Z1, 1, DZ4, 1)
+	 IF (rkD(2) /= ZERO) CALL WAXPY(N, rkD(2), Z2, 1, DZ4, 1)
+	 IF (rkD(3) /= ZERO) CALL WAXPY(N, rkD(3), Z3, 1, DZ4, 1)
+	 CALL WAXPY(N, -ONE, Z4, 1, DZ4, 1)
+         Err = RK_ErrorNorm(N,SCAL,DZ4)    
+      ELSE
+         CALL  RK_ErrorEstimate(N,H,Y,T, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,FirstStep,Reject)
+      END IF
+!~~~> Computation of new step size Hnew
+      Fac  = Err**(-ONE/rkELO)*          &
+             MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit))
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Accept/reject step 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:IF (Err < ONE) THEN !~~~> STEP IS ACCEPTED
+         IF (AdjointType == KPP_ROOT_discrete) THEN ! Save stage solution
+            ! CALL WCOPY(N,Z1,1,Zstage(1),1)
+            ! CALL WCOPY(N,Z2,1,Zstage(N+1),1)
+            ! CALL WCOPY(N,Z3,1,Zstage(2*N+1),1)
+            Zstage(1:N)       = Z1(1:N) 
+            Zstage(N+1:2*N)   = Z2(1:N)
+            Zstage(2*N+1:3*N) = Z3(1:N)
+	    ! Push old Y - Y at the beginning of the stage
+            CALL rk_DPush(T, H, Y, Zstage, NewIt, E1, E2)
+         END IF
+
+         FirstStep=.FALSE.
+         ISTATUS(iacc) = ISTATUS(iacc) + 1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            IF (ISTATUS(iacc) > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(Err**2/ErrOld)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew = Fac*H
+            END IF
+            Hacc=H
+            ErrOld=MAX(1.0d-2,Err)
+         END IF
+         Hold = H
+         T = T+H 
+         ! Update solution: Y <- Y + sum (d_i Z_i)
+         IF (rkD(1) /= ZERO) CALL WAXPY(N,rkD(1),Z1,1,Y,1)
+         IF (rkD(2) /= ZERO) CALL WAXPY(N,rkD(2),Z2,1,Y,1)
+         IF (rkD(3) /= ZERO) CALL WAXPY(N,rkD(3),Z3,1,Y,1)
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         IF (StartNewton) CALL RK_Interpolate('make',N,H,Hold,Z1,Z2,Z3,CONT)
+         CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         RSTATUS(itexit) = T
+         RSTATUS(ihnew)  = Hnew
+         RSTATUS(ihacc)  = H
+         Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin) , Hmax )
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >=  ZERO) THEN
+            H = Tend-T
+         ELSE
+            Hratio=Hnew/H
+            ! Reuse the LU decomposition
+            SkipLU = (Theta<=ThetaMin) .AND. (Hratio>=Qmin) .AND. (Hratio<=Qmax)
+	    SkipLU = .false.
+            IF (.NOT.SkipLU) H=Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+         ! SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject   = .TRUE.
+         SkipJac  = .TRUE.
+         SkipLU   = .FALSE. 
+         IF (ISTATUS(iacc) >= 1) ISTATUS(irej) = ISTATUS(irej) + 1
+      END IF accept
+      
+    END DO Tloop
+
+!~~~> Save last state: only needed for continuous adjoint
+   IF ( (AdjointType == KPP_ROOT_continuous) .OR. &
+       (AdjointType == KPP_ROOT_simple_continuous) ) THEN
+       CALL Fun_Chem(T,Y,Fcn0)
+       CALL rk_CPush( T, H, Y, Fcn0, DZ3)
+!~~~> Deallocate stage buffer: only needed for discrete adjoint
+   ELSEIF (AdjointType == KPP_ROOT_discrete) THEN 
+        DEALLOCATE(Zstage, STAT=i)
+        IF (i/=0) THEN
+          PRINT*,'Deallocation of Zstage failed'
+          STOP
+        END IF
+   END IF   
+   
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_FwdIntegrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_DadjInt( NADJ,Lambda,Tstart,Tend,T,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+      INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+      KPP_REAL, INTENT(INOUT) :: Lambda(N,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tstart, Tend
+      KPP_REAL, INTENT(INOUT) :: T
+      INTEGER,  INTENT(OUT)        :: IERR
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL    :: Jac0(N,N), Jac1(N,N),Jac2(N,N),Jac3(N,N), E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)   
+      KPP_REAL    :: Jbig(3*N,3*N), X(3*N)
+      INTEGER          :: IPbig(3*N)
+#else
+      KPP_REAL, DIMENSION(LU_NONZERO) :: Jac0, Jac1, Jac2, Jac3, E1
+      COMPLEX(kind=dp), DIMENSION(LU_NONZERO) :: E2   
+      ! Next two lines for sparse big algebra:
+      ! KPP_REAL :: Jbig(3,3,LU_NONZERO), X(3,N)
+      ! INTEGER :: IPbig(3,N)
+      KPP_REAL :: Jbig(3*N,3*N), X(3*N)
+      INTEGER :: IPbig(3*N)
+#endif                
+      KPP_REAL, DIMENSION(N,NADJ) :: U1,U2,U3
+      KPP_REAL, DIMENSION(N) :: SCAL,DU1,DU2,DU3
+      KPP_REAL :: Y(N), Zstage(3*N)
+      KPP_REAL  :: H, NewtonRate, NewtonIncrement, NewtonIncrementOld
+      INTEGER :: IP1(N),IP2(N),NewtonIter, ISING, iadj, NewIt
+      LOGICAL :: Reject, NewtonDone, NewtonConverge
+      KPP_REAL :: T1, Theta
+      KPP_REAL, DIMENSION(N) :: TMP, G1, G2, G3
+      INTEGER :: info, i, j
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      T1 = Tend      
+!      Tdirection = SIGN(ONE,Tend-Tstart)
+      NewtonConverge = .TRUE.
+      Reject = .FALSE.
+      
+!~~~> Time loop begins below 
+TimeLoop:DO WHILE ( stack_ptr > 0 )
+
+   IF (.not.Reject) THEN
+   
+     !~~~>  Recover checkpoints for stage values and vectors
+     CALL rk_DPop(T, H, Y, Zstage, NewIt, E1, E2)
+
+     !~~~>  Compute LU decomposition 
+     IF (.NOT.SaveLU) THEN
+        !~~~> Compute the Jacobian matrix
+        CALL JAC_CHEM(T,Y,Jac0)
+        ISTATUS(ijac) = ISTATUS(ijac) + 1
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,Jac0,E1,IP1,E2,IP2,ISING)
+     END IF
+   
+     !~~~>   Jacobian values at stage vectors
+     CALL WADD(N,Y,Zstage(1),TMP)       ! TMP  <- Y + Z1
+     CALL JAC_CHEM(T+rkC(1)*H,TMP,Jac1) ! Jac1 <- Jac(Y+Z1)  
+     CALL WADD(N,Y,Zstage(1+N),TMP)     ! TMP  <- Y + Z2
+     CALL JAC_CHEM(T+rkC(2)*H,TMP,Jac2) ! Jac2 <- Jac(Y+Z2)  
+     CALL WADD(N,Y,Zstage(1+2*N),TMP)   ! TMP  <- Y + Z3
+     CALL JAC_CHEM(T+rkC(3)*H,TMP,Jac3) ! Jac3 <- Jac(Y+Z3)
+      
+   END IF ! .not.Reject
+
+111 CONTINUE
+
+   IF ( (AdjointSolve == Solve_adaptive .and. .not.NewtonConverge) &
+         .or. (AdjointSolve == Solve_direct) ) THEN
+#ifdef FULL_ALGEBRA  
+       DO j=1,N
+         DO i=1,N
+          Jbig(i,j)         = -H*rkA(1,1)*Jac1(i,j)
+          Jbig(N+i,j)       = -H*rkA(2,1)*Jac1(i,j)
+          Jbig(2*N+i,j)     = -H*rkA(3,1)*Jac1(i,j)
+          Jbig(i,N+j)       = -H*rkA(1,2)*Jac2(i,j)
+          Jbig(N+i,N+j)     = -H*rkA(2,2)*Jac2(i,j)
+          Jbig(2*N+i,N+j)   = -H*rkA(3,2)*Jac2(i,j)
+          Jbig(i,2*N+j)     = -H*rkA(1,3)*Jac3(i,j)
+          Jbig(N+i,2*N+j)   = -H*rkA(2,3)*Jac3(i,j)
+          Jbig(2*N+i,2*N+j) = -H*rkA(3,3)*Jac3(i,j)
+         END DO  
+       END DO
+       DO i=1,3*N
+	  Jbig(i,i) = Jbig(i,i) + ONE
+       END DO
+       CALL DGETRF(3*N,3*N,Jbig,3*N,IPbig,info) 
+       ! CALL WGEFA(3*N,Jbig,IPbig,info) 
+       IF (info /= 0) THEN
+         PRINT*,'Big guy is singular'; STOP
+       END IF 
+#else    
+!  Commented lines for sparse big algebra:    
+!      !~~~>  Construct the big Jacobian
+!      DO j=1,LU_NONZERO
+!        DO i=1,3
+!          Jbig(i,1,j) = -H*rkA(i,1)*Jac1(j)
+!          Jbig(i,2,j) = -H*rkA(i,2)*Jac2(j)
+!          Jbig(i,3,j) = -H*rkA(i,3)*Jac3(j)
+!        END DO
+!      END DO
+!      DO j=1,NVAR
+!        DO i=1,3
+!          Jbig(i,i,LU_DIAG(j)) = ONE + Jbig(i,i,LU_DIAG(j))
+!        END DO
+!      END DO
+!      !~~~>  Solve the big system
+!      CALL KppDecompBig( Jbig, IPbig, info )
+!  Use full big algebra:    
+      Jbig(1:3*N,1:3*N) = 0.0d0
+      DO i=1,LU_NONZERO
+	  Jbig(LU_irow(i),LU_icol(i))         = -H*rkA(1,1)*Jac1(i)
+	  Jbig(LU_irow(i),N+LU_icol(i))       = -H*rkA(1,2)*Jac2(i)
+	  Jbig(LU_irow(i),2*N+LU_icol(i))     = -H*rkA(1,3)*Jac3(i)
+	  Jbig(N+LU_irow(i),LU_icol(i))       = -H*rkA(2,1)*Jac1(i)
+	  Jbig(N+LU_irow(i),N+LU_icol(i))     = -H*rkA(2,2)*Jac2(i)
+	  Jbig(N+LU_irow(i),2*N+LU_icol(i))   = -H*rkA(2,3)*Jac3(i)
+	  Jbig(2*N+LU_irow(i),LU_icol(i))     = -H*rkA(3,1)*Jac1(i)
+	  Jbig(2*N+LU_irow(i),N+LU_icol(i))   = -H*rkA(3,2)*Jac2(i)
+	  Jbig(2*N+LU_irow(i),2*N+LU_icol(i)) = -H*rkA(3,3)*Jac3(i)
+      END DO
+      DO i=1, 3*N
+	 Jbig(i,i) = ONE + Jbig(i,i)
+      END DO
+      ! CALL DGETRF(3*N,3*N,Jbig,3*N,IPbig,info) 
+      CALL WGEFA(3*N,Jbig,IPbig,info) 
+      IF (info /= 0) THEN
+         PRINT*,'Big guy is singular'; STOP
+      END IF
+#endif        
+    END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Adj:DO iadj = 1, NADJ      
+      !~~~>  Starting values for Newton iteration
+      ! CALL WCOPY(N,Lambda(1,iadj),1,U1(1,iadj),1)
+      ! CALL WCOPY(N,Lambda(1,iadj),1,U2(1,iadj),1)
+      ! CALL WCOPY(N,Lambda(1,iadj),1,U3(1,iadj),1)
+      CALL Set2Zero(N,U1(1,iadj))
+      CALL Set2Zero(N,U2(1,iadj))
+      CALL Set2Zero(N,U3(1,iadj))
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      !~~~>    Right Hand Side - part G for all Newton iterations
+      CALL RK_PrepareRHS_G(N,H,Jac1,Jac2,Jac3,Lambda(1,iadj), 	      &
+      			G1, G2, G3)
+			
+      IF ( (AdjointSolve == Solve_adaptive .and. NewtonConverge)      &
+            .or. (AdjointSolve == Solve_fixed) ) THEN
+
+NewtonLoopAdj:DO  NewtonIter = 1, NewtonMaxit  
+
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS_Adj(N,H,Jac1,Jac2,Jac3,Lambda(1,iadj), &
+	    		U1(1,iadj),U2(1,iadj),U3(1,iadj),	      &
+			G1, G2, G3, DU1,DU2,DU3)
+
+            !~~~> Solve the linear systems
+            CALL RK_SolveTR( N,H,E1,IP1,E2,IP2,DU1,DU2,DU3,ISING )
+
+!~~~> The following code performs an adaptive number of Newton
+!     iterations for solving adjoint system
+            IF (AdjointSolve == Solve_adaptive) THEN
+
+            CALL RK_ErrorScale(N,ITOL,                      &
+                 AbsTol_adj(1:N,iadj),RelTol_adj(1:N,iadj), &
+                 Lambda(1:N,iadj),SCAL)
+
+	    ! SCAL(1:N) = 1.0d0
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DU1)**2 +   &
+                                RK_ErrorNorm(N,SCAL,DU2)**2 +         &
+                                RK_ErrorNorm(N,SCAL,DU3)**2 )/3.0d0 )
+            
+	
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+		    Reject = .TRUE.
+		    NewtonDone = .FALSE.
+                    EXIT NewtonLoopAdj
+                END IF
+
+            END IF
+	  
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+
+            END IF ! (AdjointSolve == Solve_adaptive)
+            
+            ! Update solution
+            CALL WAXPY(N,-ONE,DU1,1,U1(1,iadj),1) ! U1 <- U1 - DU1
+            CALL WAXPY(N,-ONE,DU2,1,U2(1,iadj),1) ! U2 <- U2 - DU2
+            CALL WAXPY(N,-ONE,DU3,1,U3(1,iadj),1) ! U3 <- U3 - DU3
+
+            IF (AdjointSolve == Solve_adaptive) THEN
+            ! When performing an adaptive number of iterations
+            !       check the error in Newton iterations
+               NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+               IF ((NewtonDone).and.(NewtonIter>NewIt+1)) EXIT NewtonLoopAdj
+            ELSE IF (AdjointSolve == Solve_fixed) THEN
+               IF (NewtonIter>MAX(NewIt+1,6)) EXIT NewtonLoopAdj
+            END IF   
+            
+      END DO NewtonLoopAdj
+      
+      IF ((AdjointSolve==Solve_adaptive).AND.(.NOT.NewtonDone)) THEN
+         ! print*,'Newton iterations do not converge, switching to full system.'
+	 NewtonConverge = .FALSE.
+	 Reject = .TRUE.
+	 GOTO 111
+      END IF
+      
+      ! Update adjoint solution: Y_adj <- Y_adj + sum (U_i)
+      CALL WAXPY(N,ONE,U1(1,iadj),1,Lambda(1,iadj),1)
+      CALL WAXPY(N,ONE,U2(1,iadj),1,Lambda(1,iadj),1)
+      CALL WAXPY(N,ONE,U3(1,iadj),1,Lambda(1,iadj),1)
+
+      ELSE ! NewtonConverge = .false.
+
+#ifdef FULL_ALGEBRA  
+	X(1:N)       = -G1(1:N)
+	X(N+1:2*N)   = -G2(1:N)
+	X(2*N+1:3*N) = -G3(1:N)
+	CALL DGETRS('T',3*N,1,Jbig,3*N,IPbig,X,3*N,0) 
+        ! CALL WGESL('T',3*N,Jbig,IPbig,X)
+	Lambda(1:N,iadj) = Lambda(1:N,iadj)+X(1:N)+X(N+1:2*N)+X(2*N+1:3*N)
+#else        
+!   Commented lines for sparse big algebra:
+!	X(1,1:N) = -G1(1:N)
+!	X(2,1:N) = -G2(1:N)
+!	X(3,1:N) = -G3(1:N)
+!	CALL KppSolveBigTR( Jbig, IPbig, X )                
+!	Lambda(1:N,iadj) = Lambda(1:N,iadj)+X(1,1:N)+X(2,1:N)+X(3,1:N)
+!   Use fill big algebra:
+	X(1:N)       = -G1(1:N)
+	X(N+1:2*N)   = -G2(1:N)
+	X(2*N+1:3*N) = -G3(1:N)
+	! CALL DGETRS('T',3*N,1,Jbig,3*N,IPbig,X,3*N,0) 
+        CALL WGESL('T',3*N,Jbig,IPbig,X)
+	Lambda(1:N,iadj) = Lambda(1:N,iadj)+X(1:N)+X(N+1:2*N)+X(2*N+1:3*N)
+#endif        
+        IF ((AdjointSolve==Solve_adaptive).AND.(iadj>=NADJ)) THEN
+	  NewtonConverge = .TRUE.
+	  Reject = .FALSE.
+        END IF
+     
+     END IF ! NewtonConverge
+ 
+   END DO Adj
+   
+   T1 = T1-H
+      
+   END DO TimeLoop
+   
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_DadjInt
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_CadjInt (                        &
+        NADJ, Y,                                &
+        Tstart, Tend, T, IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+!~~~> Arguments
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+      INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+      KPP_REAL, INTENT(INOUT) :: Y(N,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tstart, Tend
+      KPP_REAL, INTENT(INOUT) :: T
+      INTEGER,  INTENT(OUT)        :: IERR
+
+  END SUBROUTINE rk_CadjInt
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_SimpleCadjInt (                  &
+        NADJ, Y,                                &
+        Tstart, Tend, T,                        &
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+!~~~> Arguments
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+      INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+      KPP_REAL, INTENT(INOUT) :: Y(N,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tstart, Tend
+      KPP_REAL, INTENT(INOUT) :: T
+      INTEGER,  INTENT(OUT)        :: IERR
+
+  END SUBROUTINE rk_SimpleCadjInt
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RungeKutta due to the following error:'
+
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> Improper values for FacMin/FacMax/FacSafe/FacRej'
+    CASE (-5)
+      PRINT * , '--> Improper value for ThetaMin'
+    CASE (-6)
+      PRINT * , '--> Newton stopping tolerance too small'
+    CASE (-7)
+      PRINT * , '--> Improper values for Qmin, Qmax'
+    CASE (-8)
+      PRINT * , '--> Tolerances are too small'
+    CASE (-9)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-10)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-11)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-12)
+      PRINT * , '--> Non-convergence of Newton iterations'
+    CASE (-13)
+      PRINT * , '--> Requested RK method not implemented'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   WRITE(6,FMT="(5X,'T=',E12.5,'  H=',E12.5)") T, H 
+
+ END SUBROUTINE RK_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)= ONE/(AbsTol(1)+RelTol(1)*ABS(Y(i)))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=ONE/(AbsTol(i)+RelTol(i)*ABS(Y(i)))
+       END DO
+   END IF
+      
+ END SUBROUTINE RK_ErrorScale
+
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  SUBROUTINE RK_Transform(N,Tr,Z1,Z2,Z3,W1,W2,W3)
+!!~~~>                 W <-- Tr x Z
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: N, i
+!      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),W1(N),W2(N),W3(N)
+!      KPP_REAL :: x1, x2, x3
+!      DO i=1,N
+!          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+!          W1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+!          W2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+!          W3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+!      END DO
+!  END SUBROUTINE RK_Transform
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RK_Interpolate(action,N,H,Hold,Z1,Z2,Z3,CONT)
+!~~~>   Constructs or evaluates a quadratic polynomial
+!         that interpolates the Z solution at current step
+!         and provides starting values for the next step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      INTEGER :: N, i
+      KPP_REAL :: H,Hold,Z1(N),Z2(N),Z3(N),CONT(N,3)
+      KPP_REAL :: r, x1, x2, x3, den
+      CHARACTER(LEN=4) :: action
+       
+      SELECT CASE (action) 
+      CASE ('make')
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         den = (rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3))
+         DO i=1,N
+             CONT(i,1)=(-rkC(3)**2*rkC(2)*Z1(i)+Z3(i)*rkC(2)*rkC(1)**2 &
+                        +rkC(2)**2*rkC(3)*Z1(i)-rkC(2)**2*rkC(1)*Z3(i) &
+                        +rkC(3)**2*rkC(1)*Z2(i)-Z2(i)*rkC(3)*rkC(1)**2)&
+                        /den-Z3(i)
+             CONT(i,2)= -( rkC(1)**2*(Z3(i)-Z2(i)) + rkC(2)**2*(Z1(i)  &
+                          -Z3(i)) +rkC(3)**2*(Z2(i)-Z1(i)) )/den
+             CONT(i,3)= ( rkC(1)*(Z3(i)-Z2(i)) + rkC(2)*(Z1(i)-Z3(i))  &
+                           +rkC(3)*(Z2(i)-Z1(i)) )/den
+         END DO
+      CASE ('eval')
+          ! Evaluate quadratic polynomial
+          r = H/Hold
+         x1 = ONE + rkC(1)*r
+         x2 = ONE + rkC(2)*r
+         x3 = ONE + rkC(3)*r
+         DO i=1,N
+            Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3))
+            Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3))
+            Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3))
+         END DO
+       END SELECT   
+  END SUBROUTINE RK_Interpolate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z - hA x F
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: T,H
+      KPP_REAL, DIMENSION(N) :: Y,Z1,Z2,Z3,F,R1,R2,R3,TMP
+
+      CALL WCOPY(N,Z1,1,R1,1) ! R1 <- Z1
+      CALL WCOPY(N,Z2,1,R2,1) ! R2 <- Z2
+      CALL WCOPY(N,Z3,1,R3,1) ! R3 <- Z3
+
+      CALL WADD(N,Y,Z1,TMP)              ! TMP <- Y + Z1
+      CALL FUN_CHEM(T+rkC(1)*H,TMP,F)    ! F1 <- Fun(Y+Z1)         
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y,Z2,TMP)              ! TMP <- Y + Z2
+      CALL FUN_CHEM(T+rkC(2)*H,TMP,F)    ! F2 <- Fun(Y+Z2)        
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y,Z3,TMP)              ! TMP <- Y + Z3
+      CALL FUN_CHEM(T+rkC(3)*H,TMP,F)    ! F3 <- Fun(Y+Z3)     
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_Adj(N,H,Jac1,Jac2,Jac3,Lambda, &
+                      U1,U2,U3,G1,G2,G3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z_adj - hA x Jac*Z_adj - h J^t b lambda
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, DIMENSION(N), INTENT(IN) :: U1,U2,U3,Lambda,G1,G2,G3
+      KPP_REAL, DIMENSION(N), INTENT(OUT) :: R1,R2,R3
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(N,N), INTENT(IN) :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO),INTENT(IN) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) ::  F,TMP
+
+
+      CALL WCOPY(N,G1,1,R1,1) ! R1 <- G1
+      CALL WCOPY(N,G2,1,R2,1) ! R2 <- G2
+      CALL WCOPY(N,G3,1,R3,1) ! R3 <- G3
+
+      CALL SET2ZERO(N,F)
+      CALL WAXPY(N,-H*rkA(1,1),U1,1,F,1) ! F1 <- -h*A_11*U1
+      CALL WAXPY(N,-H*rkA(2,1),U2,1,F,1) ! F1 <- F1 - h*A_21*U2
+      CALL WAXPY(N,-H*rkA(3,1),U3,1,F,1) ! F1 <- F1 - h*A_31*U3
+#ifdef FULL_ALGEBRA  
+      TMP = MATMUL(TRANSPOSE(Jac1),F)    
+#else      
+      CALL JacTR_SP_Vec ( Jac1, F, TMP )   ! R1 <- -Jac(Y+Z1)^t*h*sum(A_j1*U_j)  
+#endif      
+      CALL WAXPY(N,ONE,U1,1,TMP,1) ! R1 <- U1 -Jac(Y+Z1)^t*h*sum(A_j1*U_j)
+      CALL WAXPY(N,ONE,TMP,1,R1,1) ! R1 <- U1 -Jac(Y+Z1)^t*h*sum(A_j1*U_j)
+
+      CALL SET2ZERO(N,F)
+      CALL WAXPY(N,-H*rkA(1,2),U1,1,F,1) ! F2 <- -h*A_11*U1
+      CALL WAXPY(N,-H*rkA(2,2),U2,1,F,1) ! F2 <- F2 - h*A_21*U2
+      CALL WAXPY(N,-H*rkA(3,2),U3,1,F,1) ! F2 <- F2 - h*A_31*U3
+#ifdef FULL_ALGEBRA  
+      TMP = MATMUL(TRANSPOSE(Jac2),F)    
+#else      
+      CALL JacTR_SP_Vec ( Jac2, F, TMP )   ! R2 <- -Jac(Y+Z2)^t*h*sum(A_j2*U_j)  
+#endif      
+      CALL WAXPY(N,ONE,U2,1,TMP,1) ! R2 <- U2 -Jac(Y+Z2)^t*h*sum(A_j2*U_j)
+      CALL WAXPY(N,ONE,TMP,1,R2,1) ! R2 <- U2 -Jac(Y+Z2)^t*h*sum(A_j2*U_j)
+
+      CALL SET2ZERO(N,F)
+      CALL WAXPY(N,-H*rkA(1,3),U1,1,F,1) ! F3 <- -h*A_11*U1
+      CALL WAXPY(N,-H*rkA(2,3),U2,1,F,1) ! F3 <- F3 - h*A_21*U2
+      CALL WAXPY(N,-H*rkA(3,3),U3,1,F,1) ! F3 <- F3 - h*A_31*U3
+#ifdef FULL_ALGEBRA  
+      TMP = MATMUL(TRANSPOSE(Jac3),F)    
+#else      
+      CALL JacTR_SP_Vec ( Jac3, F, TMP )   ! R3 <- -Jac(Y+Z3)^t*h*sum(A_j3*U_j)  
+#endif      
+      CALL WAXPY(N,ONE,U3,1,TMP,1) ! R3 <- U3 -Jac(Y+Z3)^t*h*sum(A_j3*U_j)
+      CALL WAXPY(N,ONE,TMP,1,R3,1) ! R3 <- U3 -Jac(Y+Z3)^t*h*sum(A_j3*U_j)
+
+
+  END SUBROUTINE RK_PrepareRHS_Adj
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_G(N,H,Jac1,Jac2,Jac3,Lambda, &
+                      G1,G2,G3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z_adj - hA x Jac*Z_adj - h J^t b lambda
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, DIMENSION(N), INTENT(IN) :: Lambda
+      KPP_REAL, DIMENSION(N), INTENT(OUT) :: G1,G2,G3
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(N,N), INTENT(IN) :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO),INTENT(IN) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) ::  F  
+
+      CALL SET2ZERO(N,G1)
+      CALL SET2ZERO(N,G2)
+      CALL SET2ZERO(N,G3)
+#ifdef FULL_ALGEBRA  
+      F = MATMUL(TRANSPOSE(Jac1),Lambda)    
+#else      
+      CALL JacTR_SP_Vec ( Jac1, Lambda, F )   ! F1 <- Jac(Y+Z1)^t*Lambda  
+#endif      
+      CALL WAXPY(N,-H*rkB(1),F,1,G1,1) ! R1 <- R1 - h*B_1*F1
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(TRANSPOSE(Jac2),Lambda)    
+#else      
+      CALL JacTR_SP_Vec ( Jac2, Lambda, F )   ! F2 <- Jac(Y+Z2)^t*Lambda  
+#endif      
+      CALL WAXPY(N,-H*rkB(2),F,1,G2,1) ! R2 <- R2 - h*B_2*F2
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(TRANSPOSE(Jac3),Lambda)    
+#else      
+      CALL JacTR_SP_Vec ( Jac3, Lambda, F )   ! F3 <- Jac(Y+Z3)^t*Lambda  
+#endif      
+      CALL WAXPY(N,-H*rkB(3),F,1,G3,1) ! R3 <- R3 - h*B_3*F3
+
+            
+  END SUBROUTINE RK_PrepareRHS_G
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+   !~~~> Compute the matrices E1 and E2 and their decompositions
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N, ISING
+      KPP_REAL    :: H, Alpha, Beta, Gamma
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: FJAC(N,N),E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)
+#else      
+      KPP_REAL    :: FJAC(LU_NONZERO),E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      INTEGER :: IP1(N), IP2(N), i, j
+      
+      Gamma = rkGamma/H
+      Alpha = rkAlpha/H
+      Beta  = rkBeta /H
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+Gamma
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,N
+         j=LU_DIAG(i); E1(j)=E1(j)+Gamma
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+      IF (ISING /= 0) THEN
+         ISTATUS(idec) = ISTATUS(idec) + 1
+         RETURN
+      END IF
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), ZERO )
+        END DO
+        E2(j,j) = E2(j,j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), ZERO )
+      END DO
+      DO i=1,N
+         j = LU_DIAG(i); E2(j)=E2(j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      ISTATUS(idec) = ISTATUS(idec) + 1
+      
+   END SUBROUTINE RK_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Solve(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N,IP1(N),IP2(N),ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)
+#else      
+      KPP_REAL    :: E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL    :: R1(N),R2(N),R3(N)
+      KPP_REAL    :: H, x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! Z <- h^{-1) T^{-1) A^{-1) x Z
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3
+          R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3
+          R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,R1,N,0) 
+#else      
+      CALL KppSolve (E1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,0) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = AIMAG( BC(i) )
+      END DO
+
+      ! Z <- T x Z
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3
+          R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3
+          R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3
+      END DO
+
+      ISTATUS(isol) = ISTATUS(isol) + 1
+
+   END SUBROUTINE RK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_SolveTR(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)  :: N,IP1(N),IP2(N)
+      INTEGER, INTENT(OUT) :: ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL,    INTENT(IN) :: E1(N,N)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(N,N)
+#else      
+      KPP_REAL,    INTENT(IN) :: E1(LU_NONZERO)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(INOUT) :: R1(N),R2(N),R3(N)
+      KPP_REAL    :: H, x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! RHS <- h^{-1) (A^{-1) T^{-1))^t x RHS
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkAinvT(1,1)*x1 + rkAinvT(2,1)*x2 + rkAinvT(3,1)*x3
+          R2(i) = rkAinvT(1,2)*x1 + rkAinvT(2,2)*x2 + rkAinvT(3,2)*x3
+          R3(i) = rkAinvT(1,3)*x1 + rkAinvT(2,3)*x2 + rkAinvT(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('T',N,1,E1,N,IP1,R1,N,0) 
+#else      
+      CALL KppSolveTR (E1,R1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),-R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('T',N,1,E2,N,IP2,BC,N,0) 
+#else      
+      CALL KppSolveTRCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = -AIMAG( BC(i) )
+      END DO
+
+      ! X <- (T^{-1})^t x X
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkTinv(1,1)*x1 + rkTinv(2,1)*x2 + rkTinv(3,1)*x3
+          R2(i) = rkTinv(1,2)*x1 + rkTinv(2,2)*x2 + rkTinv(3,2)*x3
+          R3(i) = rkTinv(1,3)*x1 + rkTinv(2,3)*x2 + rkTinv(3,3)*x3
+      END DO
+
+      ISTATUS(isol) = ISTATUS(isol) + 1
+
+   END SUBROUTINE RK_SolveTR
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate(N,H,Y,T, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: E1(N,N)
+#else      
+      KPP_REAL :: E1(LU_NONZERO)
+#endif      
+      KPP_REAL :: SCAL(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N), &
+                        F0(N),Y(N),TMP(N),T,H
+      INTEGER :: IP1(N), i
+      LOGICAL FirstStep,Reject
+      KPP_REAL :: HEE1,HEE2,HEE3,Err
+
+      HEE1  = rkE(1)/H
+      HEE2  = rkE(2)/H
+      HEE3  = rkE(3)/H
+
+      CALL FUN_CHEM(T,Y,F0)
+      ISTATUS(ifun) = ISTATUS(ifun) + 1
+
+      DO  i=1,N
+         F2(i)  = HEE1*Z1(i)+HEE2*Z2(i)+HEE3*Z3(i)
+         TMP(i) = rkE(0)*F0(i) + F2(i)
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+      IF (rkMethod==GAU) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+#else      
+      CALL KppSolve (E1, TMP)
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) CALL KppSolve (E1,TMP)
+      IF (rkMethod==GAU) CALL KppSolve (E1,TMP)
+#endif      
+
+      Err = RK_ErrorNorm(N,SCAL,TMP)
+!
+      IF (Err < ONE) RETURN
+firej:IF (FirstStep.OR.Reject) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)    
+          ISTATUS(ifun) = ISTATUS(ifun) + 1
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          Err = RK_ErrorNorm(N,SCAL,TMP)
+       END IF firej
+ 
+   END SUBROUTINE RK_ErrorEstimate
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL FUNCTION RK_ErrorNorm(N,SCAL,DY)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: SCAL(N),DY(N)
+      INTEGER :: i
+
+      RK_ErrorNorm = ZERO
+      DO i=1,N
+          RK_ErrorNorm = RK_ErrorNorm + (DY(i)*SCAL(i))**2
+      END DO
+      RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), 1.0d-10 )
+ 
+   END FUNCTION RK_ErrorNorm
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau2A_Coefficients
+!    The coefficients of the 3-stage Radau-2A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+! The coefficients of the Radau2A method
+      KPP_REAL :: b0
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d-1
+      ELSE
+        b0 = 0.5d-1
+      END IF
+
+! The coefficients of the Radau2A method
+      rkMethod = R2A
+
+      rkA(1,1) =  1.968154772236604258683861429918299d-1
+      rkA(1,2) = -6.55354258501983881085227825696087d-2
+      rkA(1,3) =  2.377097434822015242040823210718965d-2
+      rkA(2,1) =  3.944243147390872769974116714584975d-1
+      rkA(2,2) =  2.920734116652284630205027458970589d-1
+      rkA(2,3) = -4.154875212599793019818600988496743d-2
+      rkA(3,1) =  3.764030627004672750500754423692808d-1
+      rkA(3,2) =  5.124858261884216138388134465196080d-1
+      rkA(3,3) =  1.111111111111111111111111111111111d-1
+
+      rkB(1) = 3.764030627004672750500754423692808d-1
+      rkB(2) = 5.124858261884216138388134465196080d-1
+      rkB(3) = 1.111111111111111111111111111111111d-1
+
+      rkC(1) = 1.550510257216821901802715925294109d-1
+      rkC(2) = 6.449489742783178098197284074705891d-1
+      rkC(3) = 1.0d0
+      
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = 1.0d0*b0
+      rkE(1) = -10.04880939982741556246032950764708d0*b0
+      rkE(2) = 1.382142733160748895793662840980412d0*b0
+      rkE(3) = -.3333333333333333333333333333333333d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .3764030627004672750500754423692807d0-1.558078204724922382431975370686279d0*b0
+      rkBgam(2) = .8914115380582557157653087040196118d0*b0+.5124858261884216138388134465196077d0
+      rkBgam(3) = -.1637777184845662566367174924883037d0-.3333333333333333333333333333333333d0*b0
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.520677486405081647234271944611547d0-10.04880939982741556246032950764708d0*b0
+      rkTheta(2) = 2.070455145596436382729929151810376d0+1.382142733160748895793662840980413d0*b0
+      rkTheta(3) = -.3333333333333333333333333333333333d0*b0-.3744441479783868387391430179970741d0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 6.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  9.443876248897524148749007950641664d-2
+      rkT(1,2) = -1.412552950209542084279903838077973d-1
+      rkT(1,3) = -3.00291941051474244918611170890539d-2
+      rkT(2,1) =  2.502131229653333113765090675125018d-1
+      rkT(2,2) =  2.041293522937999319959908102983381d-1
+      rkT(2,3) =  3.829421127572619377954382335998733d-1
+      rkT(3,1) =  1.0d0
+      rkT(3,2) =  1.0d0
+      rkT(3,3) =  0.0d0
+
+      rkTinv(1,1) =  4.178718591551904727346462658512057d0
+      rkTinv(1,2) =  3.27682820761062387082533272429617d-1
+      rkTinv(1,3) =  5.233764454994495480399309159089876d-1
+      rkTinv(2,1) = -4.178718591551904727346462658512057d0
+      rkTinv(2,2) = -3.27682820761062387082533272429617d-1
+      rkTinv(2,3) =  4.766235545005504519600690840910124d-1
+      rkTinv(3,1) = -5.02872634945786875951247343139544d-1
+      rkTinv(3,2) =  2.571926949855605429186785353601676d0
+      rkTinv(3,3) = -5.960392048282249249688219110993024d-1
+
+      rkTinvAinv(1,1) =  1.520148562492775501049204957366528d+1
+      rkTinvAinv(1,2) =  1.192055789400527921212348994770778d0
+      rkTinvAinv(1,3) =  1.903956760517560343018332287285119d0
+      rkTinvAinv(2,1) = -9.669512977505946748632625374449567d0
+      rkTinvAinv(2,2) = -8.724028436822336183071773193986487d0
+      rkTinvAinv(2,3) =  3.096043239482439656981667712714881d0
+      rkTinvAinv(3,1) = -1.409513259499574544876303981551774d+1
+      rkTinvAinv(3,2) =  5.895975725255405108079130152868952d0
+      rkTinvAinv(3,3) = -1.441236197545344702389881889085515d-1
+
+      rkAinvT(1,1) = .3435525649691961614912493915818282d0
+      rkAinvT(1,2) = -.4703191128473198422370558694426832d0
+      rkAinvT(1,3) = .3503786597113668965366406634269080d0
+      rkAinvT(2,1) = .9102338692094599309122768354288852d0
+      rkAinvT(2,2) = 1.715425895757991796035292755937326d0
+      rkAinvT(2,3) = .4040171993145015239277111187301784d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau2A_Coefficients
+
+    
+
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3C_Coefficients
+!    The coefficients of the 3-stage Lobatto-3C method
+!    (given to ~30 accurate digits)
+!    The parameter b0 can be chosen to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+
+      rkMethod = L3C
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d0
+      ELSE
+        b0 = 0.5d0
+      END IF
+! The coefficients of the Lobatto3C method
+
+      rkA(1,1) =  .1666666666666666666666666666666667d0
+      rkA(1,2) = -.3333333333333333333333333333333333d0
+      rkA(1,3) =  .1666666666666666666666666666666667d0
+      rkA(2,1) =  .1666666666666666666666666666666667d0
+      rkA(2,2) =  .4166666666666666666666666666666667d0
+      rkA(2,3) = -.8333333333333333333333333333333333d-1
+      rkA(3,1) =  .1666666666666666666666666666666667d0
+      rkA(3,2) =  .6666666666666666666666666666666667d0
+      rkA(3,3) =  .1666666666666666666666666666666667d0
+
+      rkB(1) = .1666666666666666666666666666666667d0
+      rkB(2) = .6666666666666666666666666666666667d0
+      rkB(3) = .1666666666666666666666666666666667d0
+
+      rkC(1) = 0.0d0
+      rkC(2) = 0.5d0
+      rkC(3) = 1.0d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .16666666666666666666666666666666667d0-b0
+      rkBhat(2) = .66666666666666666666666666666666667d0
+      rkBhat(3) = .16666666666666666666666666666666667d0
+      
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) =   .3808338772072650364017425226487022*b0
+      rkE(1) = -1.142501631621795109205227567946107*b0
+      rkE(2) = -1.523335508829060145606970090594809*b0
+      rkE(3) =   .3808338772072650364017425226487022*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .1666666666666666666666666666666667d0-1.d0*b0
+      rkBgam(2) = .6666666666666666666666666666666667d0
+      rkBgam(3) = -.2141672105405983697350758559820354d0
+      rkBgam(4) = .3808338772072650364017425226487021d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -3.d0*b0-.3808338772072650364017425226487021d0
+      rkTheta(2) = -4.d0*b0+1.523335508829060145606970090594808d0
+      rkTheta(3) = -.142501631621795109205227567946106d0+b0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 5.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 2.625816818958466716011888933765284d0
+      rkAlpha = 1.687091590520766641994055533117359d0
+      rkBeta  = 2.508731754924880510838743672432351d0
+
+      rkT(1,1) = 1.d0
+      rkT(1,2) = 1.d0
+      rkT(1,3) = 0.d0
+      rkT(2,1) = .4554100411010284672111720348287483d0
+      rkT(2,2) = -.6027050205505142336055860174143743d0
+      rkT(2,3) = -.4309321229203225731070721341350346d0
+      rkT(3,1) = 2.195823345445647152832799205549709d0
+      rkT(3,2) = -1.097911672722823576416399602774855d0
+      rkT(3,3) = .7850032632435902184104551358922130d0
+
+      rkTinv(1,1) = .4205559181381766909344950150991349d0
+      rkTinv(1,2) = .3488903392193734304046467270632057d0
+      rkTinv(1,3) = .1915253879645878102698098373933487d0
+      rkTinv(2,1) = .5794440818618233090655049849008650d0
+      rkTinv(2,2) = -.3488903392193734304046467270632057d0
+      rkTinv(2,3) = -.1915253879645878102698098373933487d0
+      rkTinv(3,1) = -.3659705575742745254721332009249516d0
+      rkTinv(3,2) = -1.463882230297098101888532803699806d0
+      rkTinv(3,3) = .4702733607340189781407813565524989d0
+
+      rkTinvAinv(1,1) = 1.104302803159744452668648155627548d0
+      rkTinvAinv(1,2) = .916122120694355522658740710823143d0
+      rkTinvAinv(1,3) = .5029105849749601702795812241441172d0
+      rkTinvAinv(2,1) = 1.895697196840255547331351844372453d0
+      rkTinvAinv(2,2) = 3.083877879305644477341259289176857d0
+      rkTinvAinv(2,3) = -1.502910584974960170279581224144117d0
+      rkTinvAinv(3,1) = .8362439183082935036129145574774502d0
+      rkTinvAinv(3,2) = -3.344975673233174014451658229909802d0
+      rkTinvAinv(3,3) = .312908409479233358005944466882642d0
+
+      rkAinvT(1,1) = 2.625816818958466716011888933765282d0
+      rkAinvT(1,2) = 1.687091590520766641994055533117358d0
+      rkAinvT(1,3) = -2.508731754924880510838743672432351d0
+      rkAinvT(2,1) = 1.195823345445647152832799205549710d0
+      rkAinvT(2,2) = -2.097911672722823576416399602774855d0
+      rkAinvT(2,3) = .7850032632435902184104551358922130d0
+      rkAinvT(3,1) = 5.765829871932827589653709477334136d0
+      rkAinvT(3,2) = .1170850640335862051731452613329320d0
+      rkAinvT(3,3) = 4.078738281412060947659653944216779d0
+
+  END SUBROUTINE Lobatto3C_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gauss_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+! The coefficients of the Gauss method
+
+
+      rkMethod = GAU
+      
+!      b0 = 4.0d0
+      b0 = 0.1d0
+      
+! The coefficients of the Gauss method
+
+      rkA(1,1) =  .1388888888888888888888888888888889d0
+      rkA(1,2) = -.359766675249389034563954710966045d-1
+      rkA(1,3) =  .97894440153083260495800422294756d-2
+      rkA(2,1) =  .3002631949808645924380249472131556d0
+      rkA(2,2) =  .2222222222222222222222222222222222d0
+      rkA(2,3) = -.224854172030868146602471694353778d-1
+      rkA(3,1) =  .2679883337624694517281977355483022d0
+      rkA(3,2) =  .4804211119693833479008399155410489d0
+      rkA(3,3) =  .1388888888888888888888888888888889d0
+
+      rkB(1) = .2777777777777777777777777777777778d0
+      rkB(2) = .4444444444444444444444444444444444d0
+      rkB(3) = .2777777777777777777777777777777778d0
+
+      rkC(1) = .1127016653792583114820734600217600d0
+      rkC(2) = .5000000000000000000000000000000000d0
+      rkC(3) = .8872983346207416885179265399782400d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) =-1.4788305577012361475298775666303999d0*b0 &
+                  +.27777777777777777777777777777777778d0
+      rkBhat(2) =  .44444444444444444444444444444444444d0 &
+                  +.66666666666666666666666666666666667d0*b0
+      rkBhat(3) = -.18783610896543051913678910003626672d0*b0 &
+                  +.27777777777777777777777777777777778d0
+
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = .1666666666666666666666666666666667d1
+      rkD(2) = -.1333333333333333333333333333333333d1
+      rkD(3) = .1666666666666666666666666666666667d1
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = .2153144231161121782447335303806954d0*b0
+      rkE(1) = -2.825278112319014084275808340593191d0*b0
+      rkE(2) = .2870858974881495709929780405075939d0*b0
+      rkE(3) = -.4558086256248162565397206448274867d-1*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.d0
+      rkBgam(1) = .2373339543355109188382583162660537d0
+      rkBgam(2) = .5879873931885192299409334646982414d0
+      rkBgam(3) = -.4063577064014232702392531134499046d-1
+      rkBgam(4) = .2153144231161121782447335303806955d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -2.594040933093095272574031876464493d0
+      rkTheta(2) = 1.824611539036311947589425112250199d0
+      rkTheta(3) = .1856563166634371860478043996459493d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408064d0
+      rkAlpha = 3.677814645373914407088529289295970d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) =  .7215185205520017032081769924397664d-1
+      rkT(1,2) = -.8224123057363067064866206597516454d-1
+      rkT(1,3) = -.6012073861930850173085948921439054d-1
+      rkT(2,1) =  .1188325787412778070708888193730294d0
+      rkT(2,2) =  .5306509074206139504614411373957448d-1
+      rkT(2,3) =  .3162050511322915732224862926182701d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) =  5.991698084937800775649580743981285d0
+      rkTinv(1,2) =  1.139214295155735444567002236934009d0
+      rkTinv(1,3) =   .4323121137838583855696375901180497d0
+      rkTinv(2,1) = -5.991698084937800775649580743981285d0
+      rkTinv(2,2) = -1.139214295155735444567002236934009d0
+      rkTinv(2,3) =   .5676878862161416144303624098819503d0
+      rkTinv(3,1) = -1.246213273586231410815571640493082d0
+      rkTinv(3,2) =  2.925559646192313662599230367054972d0
+      rkTinv(3,3) =  -.2577352012734324923468722836888244d0
+
+      rkTinvAinv(1,1) =  27.82766708436744962047620566703329d0
+      rkTinvAinv(1,2) =   5.290933503982655311815946575100597d0
+      rkTinvAinv(1,3) =   2.007817718512643701322151051660114d0
+      rkTinvAinv(2,1) = -17.66368928942422710690385180065675d0
+      rkTinvAinv(2,2) = -14.45491129892587782538830044147713d0
+      rkTinvAinv(2,3) =   2.992182281487356298677848948339886d0
+      rkTinvAinv(3,1) = -25.60678350282974256072419392007303d0
+      rkTinvAinv(3,2) =   6.762434375611708328910623303779923d0
+      rkTinvAinv(3,3) =   1.043979339483109825041215970036771d0
+      
+      rkAinvT(1,1) = .3350999483034677402618981153470483d0
+      rkAinvT(1,2) = -.5134173605009692329246186488441294d0
+      rkAinvT(1,3) = .6745196507033116204327635673208923d-1
+      rkAinvT(2,1) = .5519025480108928886873752035738885d0
+      rkAinvT(2,2) = 1.304651810077110066076640761092008d0
+      rkAinvT(2,3) = .9767507983414134987545585703726984d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295970d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+      
+  END SUBROUTINE Gauss_Coefficients
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau1A_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+!      KPP_REAL :: b0 = 0.3d0
+      KPP_REAL :: b0 = 0.1d0
+
+! The coefficients of the Radau1A method
+
+      rkMethod = R1A
+
+      rkA(1,1) =  .1111111111111111111111111111111111d0
+      rkA(1,2) = -.1916383190435098943442935597058829d0
+      rkA(1,3) =  .8052720793239878323318244859477174d-1
+      rkA(2,1) =  .1111111111111111111111111111111111d0
+      rkA(2,2) =  .2920734116652284630205027458970589d0
+      rkA(2,3) = -.481334970546573839513422644787591d-1
+      rkA(3,1) =  .1111111111111111111111111111111111d0
+      rkA(3,2) =  .5370223859435462728402311533676479d0
+      rkA(3,3) =  .1968154772236604258683861429918299d0
+
+      rkB(1) = .1111111111111111111111111111111111d0
+      rkB(2) = .5124858261884216138388134465196080d0
+      rkB(3) = .3764030627004672750500754423692808d0
+
+      rkC(1) = 0.d0
+      rkC(2) = .3550510257216821901802715925294109d0
+      rkC(3) = .8449489742783178098197284074705891d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .11111111111111111111111111111111111d0-b0
+      rkBhat(2) = .51248582618842161383881344651960810d0
+      rkBhat(3) = .37640306270046727505007544236928079d0
+
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = .3333333333333333333333333333333333d0
+      rkD(2) = -.8914115380582557157653087040196127d0
+      rkD(3) = .1558078204724922382431975370686279d1
+
+      ! Classical error estimator: 
+      ! H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j
+      rkE(0) =   .2748888295956773677478286035994148d0*b0
+      rkE(1) = -1.374444147978386838739143017997074d0*b0
+      rkE(2) = -1.335337922441686804550326197041126d0*b0
+      rkE(3) =   .235782604058977333559011782643466d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.0d0
+      rkBgam(1) = .1948150124588532186183490991130616d-1
+      rkBgam(2) = .7575249005733381398986810981093584d0
+      rkBgam(3) = -.518952314149008295083446116200793d-1
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.224370034375505083904362087063351d0
+      rkTheta(2) = .9340045331532641409047527962010133d0
+      rkTheta(3) = .4656990124352088397561234800640929d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  .424293819848497965354371036408369d0
+      rkT(1,2) = -.3235571519651980681202894497035503d0
+      rkT(1,3) = -.522137786846287839586599927945048d0
+      rkT(2,1) =  .57594609499806128896291585429339d-1
+      rkT(2,2) =  .3148663231849760131614374283783d-2
+      rkT(2,3) =  .452429247674359778577728510381731d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 1.233523612685027760114769983066164d0
+      rkTinv(1,2) = 1.423580134265707095505388133369554d0
+      rkTinv(1,3) = .3946330125758354736049045150429624d0
+      rkTinv(2,1) = -1.233523612685027760114769983066164d0
+      rkTinv(2,2) = -1.423580134265707095505388133369554d0
+      rkTinv(2,3) = .6053669874241645263950954849570376d0
+      rkTinv(3,1) = -.1484438963257383124456490049673414d0
+      rkTinv(3,2) = 2.038974794939896109682070471785315d0
+      rkTinv(3,3) = -.544501292892686735299355831692542d-1
+
+      rkTinvAinv(1,1) =  4.487354449794728738538663081025420d0
+      rkTinvAinv(1,2) =  5.178748573958397475446442544234494d0
+      rkTinvAinv(1,3) =  1.435609490412123627047824222335563d0
+      rkTinvAinv(2,1) = -2.854361287939276673073807031221493d0
+      rkTinvAinv(2,2) = -1.003648660720543859000994063139137d+1
+      rkTinvAinv(2,3) =  1.789135380979465422050817815017383d0
+      rkTinvAinv(3,1) = -4.160768067752685525282947313530352d0
+      rkTinvAinv(3,2) =  1.124128569859216916690209918405860d0
+      rkTinvAinv(3,3) =  1.700644430961823796581896350418417d0
+
+      rkAinvT(1,1) = 1.543510591072668287198054583233180d0
+      rkAinvT(1,2) = -2.460228411937788329157493833295004d0
+      rkAinvT(1,3) = -.412906170450356277003910443520499d0
+      rkAinvT(2,1) = .209519643211838264029272585946993d0
+      rkAinvT(2,2) = 1.388545667194387164417459732995766d0
+      rkAinvT(2,3) = 1.20339553005832004974976023130002d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau1A_Coefficients
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RungeKuttaADJ ! and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T , Told
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+    INTEGER       :: i, j 
+#else
+    KPP_REAL :: JF(LU_NONZERO)
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+
+  END SUBROUTINE JAC_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_tlm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_tlm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_tlm.def	(revision 3477)
@@ -0,0 +1,8 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE runge_kutta_tlm
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/runge_kutta_tlm.f90	(revision 3477)
@@ -0,0 +1,2218 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RungeKuttaTLM - Tangent Linear Model of Fully Implicit 3-stage RK:     !
+!          * Radau-2A   quadrature (order 5)                              !
+!          * Radau-1A   quadrature (order 5)                              !
+!          * Lobatto-3C quadrature (order 4)                              !
+!          * Gauss      quadrature (order 6)                              !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2005                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Jacobian
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+!~~~>  Statistics on the work performed by the Runge-Kutta method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+    Nrej=5, Ndec=6, Nsol=7, Nsng=8, Ntexit=1, Nhacc=2, Nhnew=3
+
+CONTAINS
+
+  ! **************************************************************************
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_TLM( NTLM, Y, Y_tlm, TIN, TOUT, ATOL_tlm, RTOL_tlm, &
+       ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+!~~~> Y - Concentrations
+    KPP_REAL :: Y(NVAR)
+!~~~> NTLM - No. of sensitivity coefficients
+    INTEGER NTLM
+!~~~> Y_tlm - Sensitivities of concentrations
+!     Note: Y_tlm (1:NVAR,j) contains sensitivities of
+!               Y(1:NVAR) w.r.t. the j-th parameter, j=1...NTLM
+    KPP_REAL :: Y_tlm(NVAR,NTLM)
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RTOL_tlm(NVAR,NTLM),ATOL_tlm(NVAR,NTLM)
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! Tolerances: 0=vector, 1=scalar
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are: 0=interpolated, 1=zero
+    ICNTRL(7)  = 1   ! TLM solution: 0=iterations, 1=direct
+    ICNTRL(9)  = 0   ! TLM Newton iteration error: 0=fwd Newton, 1=TLM Newton error est
+    ICNTRL(10) = 1   ! FWD error estimation: 0=classic, 1=SDIRK
+    ICNTRL(11) = 1   ! Step size ontroller: 1=Gustaffson, 2=classic
+    ICNTRL(12) = 0   ! Trunc. error estimate: 0=fwd only, 1=fwd and TLM
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+    T1 = TIN; T2 = TOUT
+    CALL RungeKuttaTLM(  NVAR, NTLM, Y, Y_tlm, T1, T2, RTOL, ATOL, &
+                           RTOL_tlm, ATOL_tlm,                     &
+			   RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+    Ntotal = Ntotal + ISTATUS(Nstp)
+    PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'Runge-Kutta-TLM: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE_TLM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RungeKuttaTLM(  N, NTLM, Y, Y_tlm, T, Tend,RelTol,AbsTol,    &
+                             RelTol_tlm,AbsTol_tlm,RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!  This implementation is based on the book and the code Radau5:
+!
+!         E. HAIRER AND G. WANNER
+!         "SOLVING ORDINARY DIFFERENTIAL EQUATIONS II. 
+!              STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!         UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!         CH-1211 GENEVE 24, SWITZERLAND
+!         E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!   Methods:
+!          * Radau-2A   quadrature (order 5)                              
+!          * Radau-1A   quadrature (order 5)                              
+!          * Lobatto-3C quadrature (order 4)                              
+!          * Gauss      quadrature (order 6)                              
+!                                                                         
+!   (C)  Adrian Sandu, August 2005                                       
+!   Virginia Polytechnic Institute and State University                  
+!   Contact: sandu@cs.vt.edu                                             
+!   Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!   This implementation is part of KPP - the Kinetic PreProcessor        
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!       ----------------
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!     N           Dimension of the system
+!     T           Initial time value
+!
+!     Tend        Final T value (Tend-T may be positive or negative)
+!
+!     Y(N)        Initial values for Y
+!
+!     RelTol,AbsTol   Relative and absolute error tolerances. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = RK method selection       
+!              = 1:  Radau-2A    (the default)
+!              = 2:  Lobatto-3C
+!              = 3:  Gauss
+!	       = 4:  Radau-1A
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve TLM equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one *big* LU factorization)
+!
+!    ICNTRL(9) -> switch for TLM Newton iteration error estimation strategy
+!		ICNTRL(9) = 0: base number of iterations as forward solution
+!		ICNTRL(9) = 1: use RTOL_tlm and ATOL_tlm to calculate
+!				error estimation for TLM at Newton stages
+!
+!    ICNTRL(10) -> switch for error estimation strategy
+!		ICNTRL(10) = 0: one additional stage: at c=0, 
+!				see Hairer (default)
+!		ICNTRL(10) = 1: two additional stages: one at c=0 
+!				and one SDIRK at c=1, stiffly accurate
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(11)=1:  mod. predictive controller (Gustafsson, default)
+!              ICNTRL(11)=2:  classical step size control
+!              the choice 1 seems to produce safer results;
+!              for simple problems, the choice 2 produces
+!              often slightly faster runs
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  (highly recommended to keep Hmin = ZERO, the default)
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, the starting step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IERR        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER       :: N, NTLM
+      KPP_REAL :: Y(N),Y_tlm(N,NTLM)
+      KPP_REAL :: AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      KPP_REAL :: AbsTol_tlm(N,NTLM),RelTol_tlm(N,NTLM)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson, SdirkError, TLMNewtonEst, &
+                       TLMtruncErr, TLMDirect
+      INTEGER :: IERR, ITOL
+      KPP_REAL :: T,Tend
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit, rkMethod
+      KPP_REAL :: Hmin,Hmax,Hstart,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin, NewtonTol
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      ! Runge-Kutta method parameters
+      INTEGER, PARAMETER :: R2A=1, R1A=2, L3C=3, GAU=4, L3A=5
+      KPP_REAL :: rkT(3,3), rkTinv(3,3), rkTinvAinv(3,3), rkAinvT(3,3), &
+                       rkA(3,3), rkB(3),  rkC(3), rkD(0:3), rkE(0:3), 	&
+	   	       rkBgam(0:4), rkBhat(0:4), rkTheta(0:3),          &
+                       rkGamma,  rkAlpha, rkBeta, rkELO
+      !~~~> Local variables
+      INTEGER :: i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IERR = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> Error control selection  
+      IF (ICNTRL(10) == 0) THEN 
+         SdirkError = .FALSE.
+      ELSE
+         SdirkError = .TRUE.
+      END IF      
+!~~~> Method selection  
+      SELECT CASE (ICNTRL(3))     
+      CASE (0,1)
+         CALL Radau2A_Coefficients
+      CASE (2)
+         CALL Lobatto3C_Coefficients
+      CASE (3)
+         CALL Gauss_Coefficients
+      CASE (4)
+         CALL Radau1A_Coefficients
+      CASE DEFAULT
+         WRITE(6,*) 'ICNTRL(3)=',ICNTRL(3)
+         CALL RK_ErrorMsg(-13,T,ZERO,IERR)
+      END SELECT
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RK_ErrorMsg(-1,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonMaxit    maximal number of Newton iterations
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RK_ErrorMsg(-2,T,ZERO,IERR)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~> Solve TLM equations directly or by Newton iterations 
+      IF (ICNTRL(7) == 0) THEN
+         TLMDirect = .FALSE.
+      ELSE
+         TLMDirect = .TRUE.
+      END IF      
+!~~~> Newton iteration error control selection  
+      IF (ICNTRL(9) == 0) THEN 
+         TLMNewtonEst = .FALSE.
+      ELSE
+         TLMNewtonEst = .TRUE.
+      END IF      
+!~~~> Gustafsson: step size controller
+      IF(ICNTRL(11) == 0)THEN
+         Gustafsson = .TRUE.
+      ELSE
+         Gustafsson = .FALSE.
+      END IF
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+
+!~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0
+      Roundoff=WLAMCH('E');
+
+!~~~> Hmin = minimal step size
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSE
+         Hmin = MIN(ABS(RCNTRL(1)),ABS(Tend-T))
+      END IF
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tend-T)
+      ELSE
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-T))
+      END IF
+!~~~> Hstart = starting step size
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = ZERO
+      ELSE
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-T))
+      END IF
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 1.0d-3) .OR. (FacSafe >= ONE) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RK_ErrorMsg(-4,T,ZERO,IERR)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RK_ErrorMsg(-5,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonTol:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+         IF (NewtonTol <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RK_ErrorMsg(-6,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RK_ErrorMsg(-7,T,ZERO,IERR)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+          END DO
+      END IF
+
+!~~~> Parameters are wrong
+      IF (IERR < 0) RETURN
+
+!~~~> Call the core method
+      CALL RK_IntegratorTLM( N,NTLM,T,Tend,Y,Y_tlm,IERR )
+
+   CONTAINS ! Internal procedures to RungeKutta
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_IntegratorTLM( N,NTLM,T,Tend,Y,Y_tlm,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+      INTEGER,  INTENT(IN)         :: N, NTLM
+      KPP_REAL, INTENT(IN)    :: Tend
+      KPP_REAL, INTENT(INOUT) :: T, Y(N), Y_tlm(NVAR,NTLM)
+      INTEGER,  INTENT(OUT)        :: IERR
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL, DIMENSION(NVAR,NVAR)    ::   &
+                             FJAC, E1, Jac1, Jac2, Jac3
+      COMPLEX(kind=dp), DIMENSION(NVAR,NVAR) :: E2   
+      KPP_REAL, DIMENSION(3*NVAR,3*NVAR)  :: Jbig, Ebig
+      KPP_REAL, DIMENSION(3*NVAR)         :: Zbig
+      INTEGER,       DIMENSION(3*NVAR)         :: IPbig
+#else
+      KPP_REAL, DIMENSION(LU_NONZERO)   ::   &
+                             FJAC, E1, Jac1, Jac2, Jac3
+      COMPLEX(kind=dp), DIMENSION(LU_NONZERO)  :: E2 
+!  Next 3 commented lines for sparse big linear algebra:
+!      KPP_REAL, DIMENSION(3,3,LU_NONZERO) :: Jbig
+!      KPP_REAL, DIMENSION(3,NVAR)         :: Zbig
+!      INTEGER, DIMENSION(3,NVAR)               :: IPbig
+      KPP_REAL, DIMENSION(3*NVAR,3*NVAR)  :: Jbig, Ebig
+      KPP_REAL, DIMENSION(3*NVAR)         :: Zbig
+      INTEGER,       DIMENSION(3*NVAR)         :: IPbig
+#endif                
+      KPP_REAL, DIMENSION(NVAR) :: Z1,Z2,Z3,Z4,SCAL,DZ1,DZ2,DZ3,DZ4, &
+                 G,TMP,SCAL_tlm
+      KPP_REAL, DIMENSION(NVAR,NTLM) :: Z1_tlm,Z2_tlm,Z3_tlm
+      KPP_REAL  :: CONT(NVAR,3), Tdirection,  H, Hacc, Hnew, Hold, Fac, &
+                 FacGus, Theta, Err, ErrOld, NewtonRate, NewtonIncrement,    &
+                 Hratio, Qnewton, NewtonPredictedErr,NewtonIncrementOld,    &
+		 ThetaTLM, ThetaSD
+      INTEGER :: i,j,IP1(NVAR),IP2(NVAR),NewtonIter, ISING, Nconsecutive, itlm
+      INTEGER :: saveNiter, NewtonIterTLM, info
+      LOGICAL :: Reject, FirstStep, SkipJac, NewtonDone, SkipLU
+      
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Tdirection = SIGN(ONE,Tend-T)
+      H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , Hmax )
+      IF (ABS(H) <= 10.d0*Roundoff) H = 1.0d-6
+      H = SIGN(H,Tdirection)
+      Hold      = H
+      Reject    = .FALSE.
+      FirstStep = .TRUE.
+      SkipJac   = .FALSE.
+      SkipLU    = .FALSE.
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= ZERO) THEN
+         H = Tend-T
+      END IF
+      Nconsecutive = 0
+      CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+        !~~~> Compute the Jacobian matrix
+        IF ( .NOT.SkipJac ) THEN
+          CALL JAC_CHEM(T,Y,FJAC)
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+        END IF
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+        IF (ISING /= 0) THEN
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; Nconsecutive = Nconsecutive + 1
+          IF (Nconsecutive >= 5) THEN
+            CALL RK_ErrorMsg(-12,T,H,IERR); RETURN
+          END IF
+          H=H*0.5d0; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+          CYCLE Tloop
+        ELSE
+          Nconsecutive = 0    
+        END IF   
+      END IF ! SkipLU
+   
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RK_ErrorMsg(-9,T,H,IERR); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RK_ErrorMsg(-10,T,H,IERR); RETURN
+      END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+      !~~~>  Starting values for Newton iteration
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+      ELSE
+         ! Evaluate quadratic polynomial
+         CALL RK_Interpolate('eval',N,H,Hold,Z1,Z2,Z3,CONT)
+      END IF
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      Fac = 0.5d0 ! Step reduction if too many iterations
+      
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit  
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,DZ1,DZ2,DZ3)
+            
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+            
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ2)**2 +       &
+                                RK_ErrorNorm(N,SCAL,DZ3)**2 )/3.0d0 )
+            
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+                IF ( NewtonIter < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                    EXIT NewtonLoop
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1,1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2,1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3,1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+	      ! Tune error in TLM variables by defining the minimal number of Newton iterations.
+	      saveNiter = NewtonIter+1
+	      EXIT NewtonLoop
+	    END IF
+   	    IF (NewtonIter == NewtonMaxit) THEN
+		PRINT*, 'Slow or no convergence in Newton Iteration: Max no. of', &
+		 	'Newton iterations reached'
+	    END IF
+            
+      END DO NewtonLoop
+            
+      IF (.NOT.NewtonDone) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+           CYCLE Tloop
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SDIRK Stage
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (SdirkError) THEN
+
+!~~~>  Starting values for Newton iterations
+       Z4(1:N) = Z3(1:N)
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL FUN_CHEM(T,Y,DZ4)
+       ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       
+!       G = H*rkBgam(0)*DZ4 + rkTheta(1)*Z1 + rkTheta(2)*Z2 + rkTheta(3)*Z3
+       CALL Set2Zero(N, G)
+       CALL WAXPY(N,rkBgam(0)*H, DZ4,1,G,1) 
+       CALL WAXPY(N,rkTheta(1),Z1,1,G,1)
+       CALL WAXPY(N,rkTheta(2),Z2,1,G,1)
+       CALL WAXPY(N,rkTheta(3),Z3,1,G,1)
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+SDNewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+	    CALL WADD(N,Y,Z4,TMP)         ! TMP <- Y + Z4
+	    CALL FUN_CHEM(T+H,TMP,DZ4) 	  ! DZ4 <- Fun(Y+Z4)         
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ4(1:N) = (G(1:N)-Z4(1:N))*(rkGamma/H) + DZ4(1:N)
+	    CALL WAXPY (N, -ONE*rkGamma/H, Z4, 1, DZ4, 1)
+            CALL WAXPY (N, rkGamma/H, G,1, DZ4,1)
+
+!~~~>   Solve the linear system
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E1, N, IP1, DZ4, N, ISING )
+#else
+            CALL KppSolve(E1, DZ4)
+#endif
+            
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4)
+            IF ( NewtonIter == 1 ) THEN
+                ThetaSD      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaSD = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaSD < 0.99d0) THEN
+                    NewtonRate = ThetaSD/(ONE-ThetaSD)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaSD**(NewtonMaxit-NewtonIter)/(ONE-ThetaSD)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT SDNewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    print*,'Theta too large: ',ThetaSD
+                    EXIT SDNewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z4 <-- Z4 + DZ4
+            CALL WAXPY(N,ONE,DZ4,1,Z4,1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT SDNewtonLoop
+            
+            END DO SDNewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+                CYCLE Tloop
+            END IF
+
+!~~~>  End of implified SDIRK Newton iterations
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation, forward solution
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+!         DZ4(1:N) =  rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4    
+	 CALL Set2Zero(N, DZ4)
+	 IF (rkD(1) /= ZERO) CALL WAXPY(N, rkD(1), Z1, 1, DZ4, 1)
+	 IF (rkD(2) /= ZERO) CALL WAXPY(N, rkD(2), Z2, 1, DZ4, 1)
+	 IF (rkD(3) /= ZERO) CALL WAXPY(N, rkD(3), Z3, 1, DZ4, 1)
+	 CALL WAXPY(N, -ONE, Z4, 1, DZ4, 1)
+         Err = RK_ErrorNorm(N,SCAL,DZ4)    
+      ELSE
+        CALL  RK_ErrorEstimate(N,H,Y,T, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,FirstStep,Reject)
+      END IF
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> If error small enough, compute TLM solution
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (Err < ONE) THEN
+
+      !~~~>  Jacobian values
+      CALL WADD(N,Y,Z1,TMP)              ! TMP  <- Y + Z1
+      CALL JAC_CHEM(T+rkC(1)*H,TMP,Jac1) ! Jac1 <- Jac(Y+Z1)  
+      CALL WADD(N,Y,Z2,TMP)              ! TMP  <- Y + Z2
+      CALL JAC_CHEM(T+rkC(2)*H,TMP,Jac2) ! Jac2 <- Jac(Y+Z2)  
+      CALL WADD(N,Y,Z3,TMP)              ! TMP  <- Y + Z3
+      CALL JAC_CHEM(T+rkC(3)*H,TMP,Jac3) ! Jac3 <- Jac(Y+Z3)  
+       
+TLMDIR: IF (TLMDirect) THEN 
+       
+#ifdef FULL_ALGEBRA
+      !~~~>  Construct the full Jacobian
+      DO j=1,N
+        DO i=1,N
+          Jbig(i,j)         = -H*rkA(1,1)*Jac1(i,j)
+          Jbig(N+i,j)       = -H*rkA(2,1)*Jac1(i,j)
+          Jbig(2*N+i,j)     = -H*rkA(3,1)*Jac1(i,j)
+          Jbig(i,N+j)       = -H*rkA(1,2)*Jac2(i,j)
+          Jbig(N+i,N+j)     = -H*rkA(2,2)*Jac2(i,j)
+          Jbig(2*N+i,N+j)   = -H*rkA(3,2)*Jac2(i,j)
+          Jbig(i,2*N+j)     = -H*rkA(1,3)*Jac3(i,j)
+          Jbig(N+i,2*N+j)   = -H*rkA(2,3)*Jac3(i,j)
+          Jbig(2*N+i,2*N+j) = -H*rkA(3,3)*Jac3(i,j)
+        END DO  
+      END DO
+      Ebig = -Jbig
+      DO i=1,3*NVAR
+          Jbig(i,i) = ONE + Jbig(i,i)
+      END DO
+      !~~~>  Solve the big system
+      ! CALL DGETRF(3*NVAR,3*NVAR,Jbig,3*NVAR,IPbig,j) 
+      CALL WGEFA(3*N,Jbig,IPbig,info) 
+      IF (info /= 0) THEN
+        PRINT*,'Big big guy is singular'; STOP
+      END IF  
+      DO itlm = 1, NTLM      
+        DO j=1,NVAR
+            Zbig(j)        = Y_tlm(j,itlm)
+            Zbig(NVAR+j)   = Y_tlm(j,itlm)
+            Zbig(2*NVAR+j) = Y_tlm(j,itlm)
+        END DO
+        Zbig = MATMUL(Ebig,Zbig)
+        !CALL DGETRS ('N',3*NVAR,1,Jbig,3*NVAR,IPbig,Zbig,3*NVAR,0) 
+        CALL WGESL('N',3*N,Jbig,IPbig,Zbig)
+        DO j=1,NVAR
+            Z1_tlm(j,itlm) = Zbig(j)
+            Z2_tlm(j,itlm) = Zbig(NVAR+j)
+            Z3_tlm(j,itlm) = Zbig(2*NVAR+j)
+        END DO
+      END DO  
+#else       
+!  Commented code for sparse big linear algebra:
+!      !~~~>  Construct the big Jacobian
+!      DO j=1,LU_NONZERO
+!        DO i=1,3
+!          Jbig(i,1,j) = -H*rkA(i,1)*Jac1(j)
+!          Jbig(i,2,j) = -H*rkA(i,2)*Jac2(j)
+!          Jbig(i,3,j) = -H*rkA(i,3)*Jac3(j)
+!        END DO
+!      END DO
+!      DO j=1,NVAR
+!        DO i=1,3
+!          Jbig(i,i,LU_DIAG(j)) = ONE + Jbig(i,i,LU_DIAG(j))
+!        END DO
+!      END DO
+!      !~~~>  Solve the big system
+!      CALL KppDecompBig( Jbig, IPbig, j )
+!   Use full big linear algebra:
+      Jbig(1:3*N,1:3*N) = 0.0d0
+      DO i=1,LU_NONZERO
+	  Jbig(LU_irow(i),LU_icol(i))         = -H*rkA(1,1)*Jac1(i)
+	  Jbig(LU_irow(i),N+LU_icol(i))       = -H*rkA(1,2)*Jac2(i)
+	  Jbig(LU_irow(i),2*N+LU_icol(i))     = -H*rkA(1,3)*Jac3(i)
+	  Jbig(N+LU_irow(i),LU_icol(i))       = -H*rkA(2,1)*Jac1(i)
+	  Jbig(N+LU_irow(i),N+LU_icol(i))     = -H*rkA(2,2)*Jac2(i)
+	  Jbig(N+LU_irow(i),2*N+LU_icol(i))   = -H*rkA(2,3)*Jac3(i)
+	  Jbig(2*N+LU_irow(i),LU_icol(i))     = -H*rkA(3,1)*Jac1(i)
+	  Jbig(2*N+LU_irow(i),N+LU_icol(i))   = -H*rkA(3,2)*Jac2(i)
+	  Jbig(2*N+LU_irow(i),2*N+LU_icol(i)) = -H*rkA(3,3)*Jac3(i)
+      END DO
+      Ebig = -Jbig
+      DO i=1, 3*N
+	 Jbig(i,i) = ONE + Jbig(i,i)
+      END DO
+      ! CALL DGETRF(3*N,3*N,Jbig,3*N,IPbig,info) 
+      CALL WGEFA(3*N,Jbig,IPbig,info) 
+      IF (info /= 0) THEN
+        PRINT*,'Big guy is singular'; STOP
+      END IF  
+
+      DO itlm = 1, NTLM      
+!  Commented code for sparse big linear algebra:
+!       ! Compute RHS
+!        CALL RK_PrepareRHS_TLMdirect(N,H,Jac1,Jac2,Jac3,Y_tlm(1,itlm),Zbig)
+!       ! Solve the system
+!        CALL KppSolveBig( Jbig, IPbig, Zbig )
+!        DO j=1,NVAR
+!            Z1_tlm(j,itlm) = Zbig(1,j)
+!            Z2_tlm(j,itlm) = Zbig(2,j)
+!            Z3_tlm(j,itlm) = Zbig(3,j)
+!        END DO
+        ! Compute RHS
+        CALL RK_PrepareRHS_TLMdirect(N,H,Jac1,Jac2,Jac3,Y_tlm(1,itlm),Zbig)
+        ! Solve the system
+	! CALL DGETRS('N',3*N,1,Jbig,3*N,IPbig,Zbig,3*N,0) 
+        CALL WGESL('N',3*N,Jbig,IPbig,Zbig)
+        Z1_tlm(1:NVAR,itlm) = Zbig(1:NVAR)
+        Z2_tlm(1:NVAR,itlm) = Zbig(NVAR+1:2*NVAR)
+        Z3_tlm(1:NVAR,itlm) = Zbig(2*NVAR+1:3*NVAR)
+      END DO  
+#endif
+
+    ELSE TLMDIR
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for Newton iterations, TLM variables
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         
+Tlm:DO itlm = 1, NTLM      
+            
+      !~~~>  Starting values for Newton iteration
+      CALL Set2zero(N,Z1_tlm(1,itlm))
+      CALL Set2zero(N,Z2_tlm(1,itlm))
+      CALL Set2zero(N,Z3_tlm(1,itlm))
+      
+      !~~~>  Initializations for Newton iteration
+      IF (TLMNewtonEst) THEN
+         NewtonDone = .FALSE.
+         Fac = 0.5d0 ! Step reduction if too many iterations
+
+         CALL RK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+              Y_tlm(1,itlm),SCAL_tlm)
+      END IF
+      
+NewtonLoopTLM:DO  NewtonIterTLM = 1, NewtonMaxit  
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS_TLM(N,H,Jac1,Jac2,Jac3,Y_tlm(1,itlm), &
+                      Z1_tlm(1,itlm),Z2_tlm(1,itlm),Z3_tlm(1,itlm),  &
+                      DZ1,DZ2,DZ3) 
+                                 
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+            
+	    IF (TLMNewtonEst) THEN
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL_tlm,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL_tlm,DZ2)**2 +       &
+                                RK_ErrorNorm(N,SCAL_tlm,DZ3)**2 )/3.0d0 )
+            IF ( NewtonIterTLM == 1 ) THEN
+                ThetaTLM      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaTLM = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaTLM < 0.99d0) THEN
+                    NewtonRate = ThetaTLM/(ONE-ThetaTLM)
+                ELSE ! Non-convergence of Newton: ThetaTLM too large
+                    EXIT NewtonLoopTLM
+                END IF
+                IF ( NewtonIterTLM < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *ThetaTLM**(NewtonMaxit-NewtonIterTLM)/(ONE-ThetaTLM)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIterTLM))
+                    EXIT NewtonLoopTLM
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+	    END IF !(TLMNewtonEst)
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1_tlm(1,itlm),1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2_tlm(1,itlm),1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3_tlm(1,itlm),1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            IF (TLMNewtonEst) THEN
+  	       NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+	       IF (NewtonDone) EXIT NewtonLoopTLM
+	    ELSE
+  	       ! Minimum number of iterations same as FWD iterations
+               IF (NewtonIterTLM>=saveNiter) EXIT NewtonLoopTLM
+	    END IF
+            
+      END DO NewtonLoopTLM
+            
+      IF ((TLMNewtonEst) .AND. (.NOT.NewtonDone)) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+           CYCLE Tloop
+      END IF
+              
+  END DO Tlm    
+
+  END IF TLMDIR
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation, TLM solution
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (TLMtruncErr) THEN
+        CALL RK_ErrorEstimate_tlm(N,NTLM,T,H,FJAC,Y, Y_tlm, &
+               E1,IP1,Z1_tlm,Z2_tlm,Z3_tlm,Err,FirstStep,Reject)
+      END IF
+
+  END IF ! (Err<ONE)
+            
+
+!~~~> Computation of new step size Hnew
+      Fac  = Err**(-ONE/rkELO)*   &
+             MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit))
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Accept/reject step 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:IF (Err < ONE) THEN !~~~> STEP IS ACCEPTED
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            IF (ISTATUS(Nacc) > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(Err**2/ErrOld)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew = Fac*H
+            END IF
+            Hacc=H
+            ErrOld=MAX(1.0d-2,Err)
+         END IF
+         Hold = H
+         T = T+H 
+         ! Update solution: Y <- Y + sum(d_i Z_i)
+         IF (rkD(1)/=ZERO) CALL WAXPY(N,rkD(1),Z1,1,Y,1)
+         IF (rkD(2)/=ZERO) CALL WAXPY(N,rkD(2),Z2,1,Y,1)
+         IF (rkD(3)/=ZERO) CALL WAXPY(N,rkD(3),Z3,1,Y,1)
+         ! Update TLM solution: Y <- Y + sum(d_i*Z_i_tlm)
+         DO itlm = 1,NTLM
+            IF (rkD(1)/=ZERO) CALL WAXPY(N,rkD(1),Z1_tlm(1,itlm),1,Y_tlm(1,itlm),1)
+            IF (rkD(2)/=ZERO) CALL WAXPY(N,rkD(2),Z2_tlm(1,itlm),1,Y_tlm(1,itlm),1)
+            IF (rkD(3)/=ZERO) CALL WAXPY(N,rkD(3),Z3_tlm(1,itlm),1,Y_tlm(1,itlm),1)
+         END DO   
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         IF (StartNewton) CALL RK_Interpolate('make',N,H,Hold,Z1,Z2,Z3,CONT)
+         CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhnew)  = Hnew
+         RSTATUS(Nhacc)  = H
+         Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin) , Hmax )
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >=  ZERO) THEN
+            H = Tend-T
+         ELSE
+            Hratio=Hnew/H
+            ! Reuse the LU decomposition
+            SkipLU = (Theta<=ThetaMin) .AND. (Hratio>=Qmin) .AND. (Hratio<=Qmax)
+            ! For TLM: do not skip LU (decrease TLM error)
+  	    SkipLU = .FALSE.
+            IF (.NOT.SkipLU) H=Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac  = .FALSE.	! For TLM: do not skip jac
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject   = .TRUE.
+         SkipJac  = .TRUE.
+         SkipLU   = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+
+      END IF accept
+      
+    END DO Tloop
+    
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_IntegratorTLM
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RungeKutta due to the following error:'
+
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> Improper values for FacMin/FacMax/FacSafe/FacRej'
+    CASE (-5)
+      PRINT * , '--> Improper value for ThetaMin'
+    CASE (-6)
+      PRINT * , '--> Newton stopping tolerance too small'
+    CASE (-7)
+      PRINT * , '--> Improper values for Qmin, Qmax'
+    CASE (-8)
+      PRINT * , '--> Tolerances are too small'
+    CASE (-9)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-10)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-11)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-12)
+      PRINT * , '--> Non-convergence of Newton iterations'
+    CASE (-13)
+      PRINT * , '--> Requested RK method not implemented'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   WRITE(6,FMT="(5X,'T=',E12.5,'  H=',E12.5)") T, H 
+
+ END SUBROUTINE RK_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)= ONE/(AbsTol(1)+RelTol(1)*ABS(Y(i)))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=ONE/(AbsTol(i)+RelTol(i)*ABS(Y(i)))
+       END DO
+   END IF
+      
+ END SUBROUTINE RK_ErrorScale
+
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  SUBROUTINE RK_Transform(N,Tr,Z1,Z2,Z3,W1,W2,W3)
+!!~~~>                 W <-- Tr x Z
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: N, i
+!      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),W1(N),W2(N),W3(N)
+!      KPP_REAL :: x1, x2, x3
+!      DO i=1,N
+!          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+!          W1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+!          W2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+!          W3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+!      END DO
+!  END SUBROUTINE RK_Transform
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RK_Interpolate(action,N,H,Hold,Z1,Z2,Z3,CONT)
+!~~~>   Constructs or evaluates a quadratic polynomial
+!         that interpolates the Z solution at current step
+!         and provides starting values for the next step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H,Hold
+      KPP_REAL, INTENT(INOUT) :: Z1(N),Z2(N),Z3(N),CONT(N,3)
+      CHARACTER(LEN=4), INTENT(IN) :: action
+      KPP_REAL :: r, x1, x2, x3, den
+      INTEGER :: i
+       
+      SELECT CASE (action) 
+      CASE ('make')
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         den = (rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3))
+         DO i=1,N
+             CONT(i,1)=(-rkC(3)**2*rkC(2)*Z1(i)+Z3(i)*rkC(2)*rkC(1)**2 &
+                        +rkC(2)**2*rkC(3)*Z1(i)-rkC(2)**2*rkC(1)*Z3(i) &
+                        +rkC(3)**2*rkC(1)*Z2(i)-Z2(i)*rkC(3)*rkC(1)**2)&
+                        /den-Z3(i)
+             CONT(i,2)= -( rkC(1)**2*(Z3(i)-Z2(i)) + rkC(2)**2*(Z1(i)  &
+                          -Z3(i)) +rkC(3)**2*(Z2(i)-Z1(i)) )/den
+             CONT(i,3)= ( rkC(1)*(Z3(i)-Z2(i)) + rkC(2)*(Z1(i)-Z3(i))  &
+                           +rkC(3)*(Z2(i)-Z1(i)) )/den
+         END DO
+      CASE ('eval')
+          ! Evaluate quadratic polynomial
+          r = H/Hold
+         x1 = ONE + rkC(1)*r
+         x2 = ONE + rkC(2)*r
+         x3 = ONE + rkC(3)*r
+         DO i=1,N
+            Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3))
+            Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3))
+            Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3))
+         END DO
+       END SELECT   
+  END SUBROUTINE RK_Interpolate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z - hA x F
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: T, H
+      KPP_REAL, INTENT(IN), DIMENSION(N) :: Y,Z1,Z2,Z3
+      KPP_REAL, INTENT(INOUT), DIMENSION(N) :: R1,R2,R3
+      KPP_REAL, DIMENSION(N) :: F, TMP
+      
+      CALL WCOPY(N,Z1,1,R1,1) ! R1 <- Z1
+      CALL WCOPY(N,Z2,1,R2,1) ! R2 <- Z2
+      CALL WCOPY(N,Z3,1,R3,1) ! R3 <- Z3
+
+      CALL WADD(N,Y,Z1,TMP)              ! TMP <- Y + Z1
+      CALL FUN_CHEM(T+rkC(1)*H,TMP,F)    ! F1 <- Fun(Y+Z1)         
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y,Z2,TMP)              ! TMP <- Y + Z2
+      CALL FUN_CHEM(T+rkC(2)*H,TMP,F)    ! F2 <- Fun(Y+Z2)        
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y,Z3,TMP)              ! TMP <- Y + Z3
+      CALL FUN_CHEM(T+rkC(3)*H,TMP,F)    ! F3 <- Fun(Y+Z3)     
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_TLM(N,H,Jac1,Jac2,Jac3,Y_tlm, &
+                      Z1_tlm,Z2_tlm,Z3_tlm,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z_tlm - hA x Jac*Z_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, INTENT(IN), DIMENSION(N) :: Y_tlm,Z1_tlm,Z2_tlm,Z3_tlm
+      KPP_REAL, INTENT(INOUT), DIMENSION(N) :: R1,R2,R3
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN), DIMENSION(NVAR,NVAR)  :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, INTENT(IN), DIMENSION(LU_NONZERO) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) :: F, TMP
+
+      CALL WCOPY(N,Z1_tlm,1,R1,1) ! R1 <- Z1_tlm
+      CALL WCOPY(N,Z2_tlm,1,R2,1) ! R2 <- Z2_tlm
+      CALL WCOPY(N,Z3_tlm,1,R3,1) ! R3 <- Z3_tlm
+
+      CALL WADD(N,Y_tlm,Z1_tlm,TMP)      ! TMP <- Y + Z1
+#ifdef FULL_ALGEBRA  
+      F = MATMUL(Jac1,TMP)    
+#else      
+      CALL Jac_SP_Vec ( Jac1, TMP, F )   ! F1 <- Jac(Y+Z1)*(Y_tlm+Z1_tlm)  
+#endif      
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y_tlm,Z2_tlm,TMP)      ! TMP <- Y + Z2
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac2,TMP)    
+#else      
+      CALL Jac_SP_Vec ( Jac2, TMP, F )   ! F2 <- Jac(Y+Z2)*(Y_tlm+Z2_tlm)  
+#endif      
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y_tlm,Z3_tlm,TMP)      ! TMP <- Y + Z3
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac3,TMP)    
+#else      
+      CALL Jac_SP_Vec ( Jac3, TMP, F )   ! F3 <- Jac(Y+Z3)*(Y_tlm+Z3_tlm)  
+#endif      
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS_TLM
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_TLMdirect(N,H,Jac1,Jac2,Jac3,Y_tlm,Zbig)
+!~~~> Prepare the right-hand side for direct solution
+!     Z =  hA x Jac*Y_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, INTENT(IN), DIMENSION(N) :: Y_tlm
+! Commented code for sparse big linear algebra:  
+!      KPP_REAL, INTENT(OUT), DIMENSION(3,N) :: Zbig
+      KPP_REAL, INTENT(OUT), DIMENSION(3*N) :: Zbig
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN), DIMENSION(NVAR,NVAR)  :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, INTENT(IN), DIMENSION(LU_NONZERO) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) :: F, TMP
+
+#ifdef FULL_ALGEBRA  
+      F = MATMUL(Jac1,Y_tlm)    
+#else      
+      CALL Jac_SP_Vec ( Jac1, Y_tlm, F )   ! F1 <- Jac(Y+Z1)*(Y_tlm)  
+#endif      
+! Commented code for sparse big linear algebra:  
+!      Zbig(1,1:N) = H*rkA(1,1)*F(1:N)
+!      Zbig(2,1:N) = H*rkA(2,1)*F(1:N)
+!      Zbig(3,1:N) = H*rkA(3,1)*F(1:N)
+      Zbig(1:N)       = H*rkA(1,1)*F(1:N)
+      Zbig(N+1:2*N)   = H*rkA(2,1)*F(1:N)
+      Zbig(2*N+1:3*N) = H*rkA(3,1)*F(1:N)
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac2,Y_tlm)    
+#else      
+      CALL Jac_SP_Vec ( Jac2, Y_tlm, F )   ! F2 <- Jac(Y+Z2)*(Y_tlm)  
+#endif    
+! Commented code for sparse big linear algebra:  
+!      Zbig(1,1:N) = Zbig(1,1:N) + H*rkA(1,2)*F(1:N)
+!      Zbig(2,1:N) = Zbig(2,1:N) + H*rkA(2,2)*F(1:N)
+!      Zbig(3,1:N) = Zbig(3,1:N) + H*rkA(3,2)*F(1:N)
+      Zbig(1:N)       = Zbig(1:N)       + H*rkA(1,2)*F(1:N)
+      Zbig(N+1:2*N)   = Zbig(N+1:2*N)   + H*rkA(2,2)*F(1:N)
+      Zbig(2*N+1:3*N) = Zbig(2*N+1:3*N) + H*rkA(3,2)*F(1:N)
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac3,Y_tlm)    
+#else      
+      CALL Jac_SP_Vec ( Jac3, Y_tlm, F )   ! F3 <- Jac(Y+Z3)*(Y_tlm)  
+#endif      
+! Commented code for sparse big linear algebra:  
+!      Zbig(1,1:N) = Zbig(1,1:N) + H*rkA(1,3)*F(1:N)
+!      Zbig(2,1:N) = Zbig(2,1:N) + H*rkA(2,3)*F(1:N)
+!      Zbig(3,1:N) = Zbig(3,1:N) + H*rkA(3,3)*F(1:N)
+      Zbig(1:N)       = Zbig(1:N)       + H*rkA(1,3)*F(1:N)
+      Zbig(N+1:2*N)   = Zbig(N+1:2*N)   + H*rkA(2,3)*F(1:N)
+      Zbig(2*N+1:3*N) = Zbig(2*N+1:3*N) + H*rkA(3,3)*F(1:N)
+            
+  END SUBROUTINE RK_PrepareRHS_TLMdirect
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+   !~~~> Compute the matrices E1 and E2 and their decompositions
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT) ::E1(NVAR,NVAR)
+      COMPLEX(kind=dp), INTENT(OUT) :: E2(N,N)
+#else      
+      KPP_REAL, INTENT(IN) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT) :: E1(LU_NONZERO)
+      COMPLEX(kind=dp),INTENT(OUT) :: E2(LU_NONZERO)
+#endif      
+      INTEGER, INTENT(OUT) :: IP1(N), IP2(N), ISING
+
+      INTEGER :: i, j
+      KPP_REAL    :: Alpha, Beta, Gamma
+      
+      Gamma = rkGamma/H
+      Alpha = rkAlpha/H
+      Beta  = rkBeta /H
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+Gamma
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,NVAR
+         j=LU_DIAG(i); E1(j)=E1(j)+Gamma
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+      IF (ISING /= 0) THEN
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         RETURN
+      END IF
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), ZERO )
+        END DO
+        E2(j,j) = E2(j,j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), ZERO )
+      END DO
+      DO i=1,NVAR
+         j = LU_DIAG(i); E2(j)=E2(j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+      
+   END SUBROUTINE RK_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Solve(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: N,IP1(NVAR),IP2(NVAR)
+      INTEGER, INTENT(OUT) :: ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: E1(NVAR,NVAR)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(NVAR,NVAR)
+#else      
+      KPP_REAL, INTENT(IN) :: E1(LU_NONZERO)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, INTENT(INOUT) :: R1(N),R2(N),R3(N)
+
+      KPP_REAL    :: x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! Z <- h^{-1) T^{-1) A^{-1) x Z
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3
+          R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3
+          R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,R1,N,0) 
+#else      
+      CALL KppSolve (E1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,0) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = AIMAG( BC(i) )
+      END DO
+
+      ! Z <- T x Z
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3
+          R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3
+          R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3
+      END DO
+
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+   END SUBROUTINE RK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate(N,H,Y,T,      &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N, IP1(N)
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: E1(NVAR,NVAR)
+#else      
+      KPP_REAL, INTENT(IN) :: E1(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(IN) :: T,H,SCAL(N),Z1(N),Z2(N),Z3(N),Y(N)
+      LOGICAL,INTENT(IN) :: FirstStep,Reject
+      KPP_REAL, INTENT(INOUT) :: Err
+
+      KPP_REAL :: F1(N),F2(N),F0(N),TMP(N)
+      INTEGER :: i
+      KPP_REAL :: HEE1,HEE2,HEE3
+
+      HEE1  = rkE(1)/H
+      HEE2  = rkE(2)/H
+      HEE3  = rkE(3)/H
+
+      CALL FUN_CHEM(T,Y,F0)
+      ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+
+      DO  i=1,N
+         F2(i)  = HEE1*Z1(i)+HEE2*Z2(i)+HEE3*Z3(i)
+         TMP(i) = rkE(0)*F0(i) + F2(i)
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+      IF (rkMethod==GAU) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+#else      
+      CALL KppSolve (E1, TMP)
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) CALL KppSolve (E1,TMP)
+      IF (rkMethod==GAU) CALL KppSolve (E1,TMP)
+#endif      
+
+      Err = RK_ErrorNorm(N,SCAL,TMP)
+!
+      IF (Err < ONE) RETURN
+firej:IF (FirstStep.OR.Reject) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)    
+          ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          Err = RK_ErrorNorm(N,SCAL,TMP)
+       END IF firej
+ 
+   END SUBROUTINE RK_ErrorEstimate
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate_tlm(N,NTLM,T,H,FJAC,Y,Y_tlm, &
+               E1,IP1,Z1_tlm,Z2_tlm,Z3_tlm,FWD_Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N,NTLM,IP1(N)
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: FJAC(N,N),  E1(N,N)
+      KPP_REAL :: J0(N,N)
+#else      
+      KPP_REAL, INTENT(IN) :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      KPP_REAL :: J0(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(IN) :: T,H, Z1_tlm(N,NTLM),Z2_tlm(N,NTLM),Z3_tlm(N,NTLM), &
+      				Y_tlm(N,NTLM), Y(N)
+      LOGICAL, INTENT(IN) :: FirstStep, Reject
+      KPP_REAL, INTENT(INOUT) :: FWD_Err
+
+      INTEGER :: itlm
+      KPP_REAL :: HEE1,HEE2,HEE3, SCAL_tlm(N), Err, TMP(N), TMP2(N), JY_tlm(N)
+	
+	HEE1  = rkE(1)/H
+	HEE2  = rkE(2)/H
+	HEE3  = rkE(3)/H
+	
+      DO itlm=1,NTLM
+        CALL RK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+              Y_tlm(1,itlm),SCAL_tlm)
+
+ 	CALL JAC_CHEM(T,Y,J0)
+	ISTATUS(Njac) = ISTATUS(Njac) + 1
+	CALL JAC_SP_Vec(J0,Y_tlm(1,itlm),JY_tlm)
+
+	DO  i=1,N
+          TMP2(i)  = HEE1*Z1_tlm(i,itlm)+HEE2*Z2_tlm(i,itlm)+HEE3*Z3_tlm(i,itlm)
+          TMP(i) = rkE(0)*JY_tlm(i) + TMP2(i)
+	END DO
+
+#ifdef FULL_ALGEBRA      
+	CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+!	IF ((ICNTRL(3)==3).OR.(ICNTRL(3)==4)) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+!	IF (ICNTRL(3)==3) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0)
+#else      
+	CALL KppSolve (E1, TMP)
+!	IF ((ICNTRL(3)==3).OR.(ICNTRL(3)==4)) THEN
+!          CALL KppSolve (E1,TMP)
+!	END IF  
+!	IF (ICNTRL(3)==3) THEN
+!          CALL KppSolve (E1,TMP)
+!	END IF  
+#endif      
+
+        Err = RK_ErrorNorm(N,SCAL_tlm,TMP)
+!
+	FWD_Err = MAX(FWD_Err, Err)
+      END DO
+      
+   END SUBROUTINE RK_ErrorEstimate_tlm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL FUNCTION RK_ErrorNorm(N,SCAL,DY)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: SCAL(N),DY(N)
+      INTEGER :: i
+
+      RK_ErrorNorm = ZERO
+      DO i=1,N
+          RK_ErrorNorm = RK_ErrorNorm + (DY(i)*SCAL(i))**2
+      END DO
+      RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), 1.0d-10 )
+ 
+   END FUNCTION RK_ErrorNorm
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau2A_Coefficients
+!    The coefficients of the 3-stage Radau-2A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+! The coefficients of the Radau2A method
+      KPP_REAL :: b0
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d-1
+      ELSE
+        b0 = 0.5d-1
+      END IF
+
+! The coefficients of the Radau2A method
+      rkMethod = R2A
+
+      rkA(1,1) =  1.968154772236604258683861429918299d-1
+      rkA(1,2) = -6.55354258501983881085227825696087d-2
+      rkA(1,3) =  2.377097434822015242040823210718965d-2
+      rkA(2,1) =  3.944243147390872769974116714584975d-1
+      rkA(2,2) =  2.920734116652284630205027458970589d-1
+      rkA(2,3) = -4.154875212599793019818600988496743d-2
+      rkA(3,1) =  3.764030627004672750500754423692808d-1
+      rkA(3,2) =  5.124858261884216138388134465196080d-1
+      rkA(3,3) =  1.111111111111111111111111111111111d-1
+
+      rkB(1) = 3.764030627004672750500754423692808d-1
+      rkB(2) = 5.124858261884216138388134465196080d-1
+      rkB(3) = 1.111111111111111111111111111111111d-1
+
+      rkC(1) = 1.550510257216821901802715925294109d-1
+      rkC(2) = 6.449489742783178098197284074705891d-1
+      rkC(3) = 1.0d0
+      
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = 1.0d0*b0
+      rkE(1) = -10.04880939982741556246032950764708d0*b0
+      rkE(2) = 1.382142733160748895793662840980412d0*b0
+      rkE(3) = -.3333333333333333333333333333333333d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .3764030627004672750500754423692807d0-1.558078204724922382431975370686279d0*b0
+      rkBgam(2) = .8914115380582557157653087040196118d0*b0+.5124858261884216138388134465196077d0
+      rkBgam(3) = -.1637777184845662566367174924883037d0-.3333333333333333333333333333333333d0*b0
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.520677486405081647234271944611547d0-10.04880939982741556246032950764708d0*b0
+      rkTheta(2) = 2.070455145596436382729929151810376d0+1.382142733160748895793662840980413d0*b0
+      rkTheta(3) = -.3333333333333333333333333333333333d0*b0-.3744441479783868387391430179970741d0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 6.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  9.443876248897524148749007950641664d-2
+      rkT(1,2) = -1.412552950209542084279903838077973d-1
+      rkT(1,3) = -3.00291941051474244918611170890539d-2
+      rkT(2,1) =  2.502131229653333113765090675125018d-1
+      rkT(2,2) =  2.041293522937999319959908102983381d-1
+      rkT(2,3) =  3.829421127572619377954382335998733d-1
+      rkT(3,1) =  1.0d0
+      rkT(3,2) =  1.0d0
+      rkT(3,3) =  0.0d0
+
+      rkTinv(1,1) =  4.178718591551904727346462658512057d0
+      rkTinv(1,2) =  3.27682820761062387082533272429617d-1
+      rkTinv(1,3) =  5.233764454994495480399309159089876d-1
+      rkTinv(2,1) = -4.178718591551904727346462658512057d0
+      rkTinv(2,2) = -3.27682820761062387082533272429617d-1
+      rkTinv(2,3) =  4.766235545005504519600690840910124d-1
+      rkTinv(3,1) = -5.02872634945786875951247343139544d-1
+      rkTinv(3,2) =  2.571926949855605429186785353601676d0
+      rkTinv(3,3) = -5.960392048282249249688219110993024d-1
+
+      rkTinvAinv(1,1) =  1.520148562492775501049204957366528d+1
+      rkTinvAinv(1,2) =  1.192055789400527921212348994770778d0
+      rkTinvAinv(1,3) =  1.903956760517560343018332287285119d0
+      rkTinvAinv(2,1) = -9.669512977505946748632625374449567d0
+      rkTinvAinv(2,2) = -8.724028436822336183071773193986487d0
+      rkTinvAinv(2,3) =  3.096043239482439656981667712714881d0
+      rkTinvAinv(3,1) = -1.409513259499574544876303981551774d+1
+      rkTinvAinv(3,2) =  5.895975725255405108079130152868952d0
+      rkTinvAinv(3,3) = -1.441236197545344702389881889085515d-1
+
+      rkAinvT(1,1) = .3435525649691961614912493915818282d0
+      rkAinvT(1,2) = -.4703191128473198422370558694426832d0
+      rkAinvT(1,3) = .3503786597113668965366406634269080d0
+      rkAinvT(2,1) = .9102338692094599309122768354288852d0
+      rkAinvT(2,2) = 1.715425895757991796035292755937326d0
+      rkAinvT(2,3) = .4040171993145015239277111187301784d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau2A_Coefficients
+
+    
+
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3C_Coefficients
+!    The coefficients of the 3-stage Lobatto-3C method
+!    (given to ~30 accurate digits)
+!    The parameter b0 can be chosen to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+
+      rkMethod = L3C
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d0
+      ELSE
+        b0 = 0.5d0
+      END IF
+! The coefficients of the Lobatto3C method
+
+      rkA(1,1) =  .1666666666666666666666666666666667d0
+      rkA(1,2) = -.3333333333333333333333333333333333d0
+      rkA(1,3) =  .1666666666666666666666666666666667d0
+      rkA(2,1) =  .1666666666666666666666666666666667d0
+      rkA(2,2) =  .4166666666666666666666666666666667d0
+      rkA(2,3) = -.8333333333333333333333333333333333d-1
+      rkA(3,1) =  .1666666666666666666666666666666667d0
+      rkA(3,2) =  .6666666666666666666666666666666667d0
+      rkA(3,3) =  .1666666666666666666666666666666667d0
+
+      rkB(1) = .1666666666666666666666666666666667d0
+      rkB(2) = .6666666666666666666666666666666667d0
+      rkB(3) = .1666666666666666666666666666666667d0
+
+      rkC(1) = 0.0d0
+      rkC(2) = 0.5d0
+      rkC(3) = 1.0d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .16666666666666666666666666666666667d0-b0
+      rkBhat(2) = .66666666666666666666666666666666667d0
+      rkBhat(3) = .16666666666666666666666666666666667d0
+      
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) =   .3808338772072650364017425226487022*b0
+      rkE(1) = -1.142501631621795109205227567946107*b0
+      rkE(2) = -1.523335508829060145606970090594809*b0
+      rkE(3) =   .3808338772072650364017425226487022*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .1666666666666666666666666666666667d0-1.d0*b0
+      rkBgam(2) = .6666666666666666666666666666666667d0
+      rkBgam(3) = -.2141672105405983697350758559820354d0
+      rkBgam(4) = .3808338772072650364017425226487021d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -3.d0*b0-.3808338772072650364017425226487021d0
+      rkTheta(2) = -4.d0*b0+1.523335508829060145606970090594808d0
+      rkTheta(3) = -.142501631621795109205227567946106d0+b0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 5.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 2.625816818958466716011888933765284d0
+      rkAlpha = 1.687091590520766641994055533117359d0
+      rkBeta  = 2.508731754924880510838743672432351d0
+
+      rkT(1,1) = 1.d0
+      rkT(1,2) = 1.d0
+      rkT(1,3) = 0.d0
+      rkT(2,1) = .4554100411010284672111720348287483d0
+      rkT(2,2) = -.6027050205505142336055860174143743d0
+      rkT(2,3) = -.4309321229203225731070721341350346d0
+      rkT(3,1) = 2.195823345445647152832799205549709d0
+      rkT(3,2) = -1.097911672722823576416399602774855d0
+      rkT(3,3) = .7850032632435902184104551358922130d0
+
+      rkTinv(1,1) = .4205559181381766909344950150991349d0
+      rkTinv(1,2) = .3488903392193734304046467270632057d0
+      rkTinv(1,3) = .1915253879645878102698098373933487d0
+      rkTinv(2,1) = .5794440818618233090655049849008650d0
+      rkTinv(2,2) = -.3488903392193734304046467270632057d0
+      rkTinv(2,3) = -.1915253879645878102698098373933487d0
+      rkTinv(3,1) = -.3659705575742745254721332009249516d0
+      rkTinv(3,2) = -1.463882230297098101888532803699806d0
+      rkTinv(3,3) = .4702733607340189781407813565524989d0
+
+      rkTinvAinv(1,1) = 1.104302803159744452668648155627548d0
+      rkTinvAinv(1,2) = .916122120694355522658740710823143d0
+      rkTinvAinv(1,3) = .5029105849749601702795812241441172d0
+      rkTinvAinv(2,1) = 1.895697196840255547331351844372453d0
+      rkTinvAinv(2,2) = 3.083877879305644477341259289176857d0
+      rkTinvAinv(2,3) = -1.502910584974960170279581224144117d0
+      rkTinvAinv(3,1) = .8362439183082935036129145574774502d0
+      rkTinvAinv(3,2) = -3.344975673233174014451658229909802d0
+      rkTinvAinv(3,3) = .312908409479233358005944466882642d0
+
+      rkAinvT(1,1) = 2.625816818958466716011888933765282d0
+      rkAinvT(1,2) = 1.687091590520766641994055533117358d0
+      rkAinvT(1,3) = -2.508731754924880510838743672432351d0
+      rkAinvT(2,1) = 1.195823345445647152832799205549710d0
+      rkAinvT(2,2) = -2.097911672722823576416399602774855d0
+      rkAinvT(2,3) = .7850032632435902184104551358922130d0
+      rkAinvT(3,1) = 5.765829871932827589653709477334136d0
+      rkAinvT(3,2) = .1170850640335862051731452613329320d0
+      rkAinvT(3,3) = 4.078738281412060947659653944216779d0
+
+  END SUBROUTINE Lobatto3C_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gauss_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+! The coefficients of the Gauss method
+
+
+      rkMethod = GAU
+      
+!      b0 = 4.0d0
+      b0 = 0.1d0
+      
+! The coefficients of the Gauss method
+
+      rkA(1,1) =  .1388888888888888888888888888888889d0
+      rkA(1,2) = -.359766675249389034563954710966045d-1
+      rkA(1,3) =  .97894440153083260495800422294756d-2
+      rkA(2,1) =  .3002631949808645924380249472131556d0
+      rkA(2,2) =  .2222222222222222222222222222222222d0
+      rkA(2,3) = -.224854172030868146602471694353778d-1
+      rkA(3,1) =  .2679883337624694517281977355483022d0
+      rkA(3,2) =  .4804211119693833479008399155410489d0
+      rkA(3,3) =  .1388888888888888888888888888888889d0
+
+      rkB(1) = .2777777777777777777777777777777778d0
+      rkB(2) = .4444444444444444444444444444444444d0
+      rkB(3) = .2777777777777777777777777777777778d0
+
+      rkC(1) = .1127016653792583114820734600217600d0
+      rkC(2) = .5000000000000000000000000000000000d0
+      rkC(3) = .8872983346207416885179265399782400d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) =-1.4788305577012361475298775666303999d0*b0 &
+                  +.27777777777777777777777777777777778d0
+      rkBhat(2) =  .44444444444444444444444444444444444d0 &
+                  +.66666666666666666666666666666666667d0*b0
+      rkBhat(3) = -.18783610896543051913678910003626672d0*b0 &
+                  +.27777777777777777777777777777777778d0
+
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = .1666666666666666666666666666666667d1
+      rkD(2) = -.1333333333333333333333333333333333d1
+      rkD(3) = .1666666666666666666666666666666667d1
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = .2153144231161121782447335303806954d0*b0
+      rkE(1) = -2.825278112319014084275808340593191d0*b0
+      rkE(2) = .2870858974881495709929780405075939d0*b0
+      rkE(3) = -.4558086256248162565397206448274867d-1*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.d0
+      rkBgam(1) = .2373339543355109188382583162660537d0
+      rkBgam(2) = .5879873931885192299409334646982414d0
+      rkBgam(3) = -.4063577064014232702392531134499046d-1
+      rkBgam(4) = .2153144231161121782447335303806955d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -2.594040933093095272574031876464493d0
+      rkTheta(2) = 1.824611539036311947589425112250199d0
+      rkTheta(3) = .1856563166634371860478043996459493d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408064d0
+      rkAlpha = 3.677814645373914407088529289295970d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) =  .7215185205520017032081769924397664d-1
+      rkT(1,2) = -.8224123057363067064866206597516454d-1
+      rkT(1,3) = -.6012073861930850173085948921439054d-1
+      rkT(2,1) =  .1188325787412778070708888193730294d0
+      rkT(2,2) =  .5306509074206139504614411373957448d-1
+      rkT(2,3) =  .3162050511322915732224862926182701d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) =  5.991698084937800775649580743981285d0
+      rkTinv(1,2) =  1.139214295155735444567002236934009d0
+      rkTinv(1,3) =   .4323121137838583855696375901180497d0
+      rkTinv(2,1) = -5.991698084937800775649580743981285d0
+      rkTinv(2,2) = -1.139214295155735444567002236934009d0
+      rkTinv(2,3) =   .5676878862161416144303624098819503d0
+      rkTinv(3,1) = -1.246213273586231410815571640493082d0
+      rkTinv(3,2) =  2.925559646192313662599230367054972d0
+      rkTinv(3,3) =  -.2577352012734324923468722836888244d0
+
+      rkTinvAinv(1,1) =  27.82766708436744962047620566703329d0
+      rkTinvAinv(1,2) =   5.290933503982655311815946575100597d0
+      rkTinvAinv(1,3) =   2.007817718512643701322151051660114d0
+      rkTinvAinv(2,1) = -17.66368928942422710690385180065675d0
+      rkTinvAinv(2,2) = -14.45491129892587782538830044147713d0
+      rkTinvAinv(2,3) =   2.992182281487356298677848948339886d0
+      rkTinvAinv(3,1) = -25.60678350282974256072419392007303d0
+      rkTinvAinv(3,2) =   6.762434375611708328910623303779923d0
+      rkTinvAinv(3,3) =   1.043979339483109825041215970036771d0
+      
+      rkAinvT(1,1) = .3350999483034677402618981153470483d0
+      rkAinvT(1,2) = -.5134173605009692329246186488441294d0
+      rkAinvT(1,3) = .6745196507033116204327635673208923d-1
+      rkAinvT(2,1) = .5519025480108928886873752035738885d0
+      rkAinvT(2,2) = 1.304651810077110066076640761092008d0
+      rkAinvT(2,3) = .9767507983414134987545585703726984d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295970d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+      
+  END SUBROUTINE Gauss_Coefficients
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau1A_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+!      KPP_REAL :: b0 = 0.3d0
+      KPP_REAL :: b0 = 0.1d0
+
+! The coefficients of the Radau1A method
+
+      rkMethod = R1A
+
+      rkA(1,1) =  .1111111111111111111111111111111111d0
+      rkA(1,2) = -.1916383190435098943442935597058829d0
+      rkA(1,3) =  .8052720793239878323318244859477174d-1
+      rkA(2,1) =  .1111111111111111111111111111111111d0
+      rkA(2,2) =  .2920734116652284630205027458970589d0
+      rkA(2,3) = -.481334970546573839513422644787591d-1
+      rkA(3,1) =  .1111111111111111111111111111111111d0
+      rkA(3,2) =  .5370223859435462728402311533676479d0
+      rkA(3,3) =  .1968154772236604258683861429918299d0
+
+      rkB(1) = .1111111111111111111111111111111111d0
+      rkB(2) = .5124858261884216138388134465196080d0
+      rkB(3) = .3764030627004672750500754423692808d0
+
+      rkC(1) = 0.d0
+      rkC(2) = .3550510257216821901802715925294109d0
+      rkC(3) = .8449489742783178098197284074705891d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .11111111111111111111111111111111111d0-b0
+      rkBhat(2) = .51248582618842161383881344651960810d0
+      rkBhat(3) = .37640306270046727505007544236928079d0
+
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = .3333333333333333333333333333333333d0
+      rkD(2) = -.8914115380582557157653087040196127d0
+      rkD(3) = .1558078204724922382431975370686279d1
+
+      ! Classical error estimator: 
+      ! H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j
+      rkE(0) =   .2748888295956773677478286035994148d0*b0
+      rkE(1) = -1.374444147978386838739143017997074d0*b0
+      rkE(2) = -1.335337922441686804550326197041126d0*b0
+      rkE(3) =   .235782604058977333559011782643466d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.0d0
+      rkBgam(1) = .1948150124588532186183490991130616d-1
+      rkBgam(2) = .7575249005733381398986810981093584d0
+      rkBgam(3) = -.518952314149008295083446116200793d-1
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.224370034375505083904362087063351d0
+      rkTheta(2) = .9340045331532641409047527962010133d0
+      rkTheta(3) = .4656990124352088397561234800640929d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  .424293819848497965354371036408369d0
+      rkT(1,2) = -.3235571519651980681202894497035503d0
+      rkT(1,3) = -.522137786846287839586599927945048d0
+      rkT(2,1) =  .57594609499806128896291585429339d-1
+      rkT(2,2) =  .3148663231849760131614374283783d-2
+      rkT(2,3) =  .452429247674359778577728510381731d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 1.233523612685027760114769983066164d0
+      rkTinv(1,2) = 1.423580134265707095505388133369554d0
+      rkTinv(1,3) = .3946330125758354736049045150429624d0
+      rkTinv(2,1) = -1.233523612685027760114769983066164d0
+      rkTinv(2,2) = -1.423580134265707095505388133369554d0
+      rkTinv(2,3) = .6053669874241645263950954849570376d0
+      rkTinv(3,1) = -.1484438963257383124456490049673414d0
+      rkTinv(3,2) = 2.038974794939896109682070471785315d0
+      rkTinv(3,3) = -.544501292892686735299355831692542d-1
+
+      rkTinvAinv(1,1) =  4.487354449794728738538663081025420d0
+      rkTinvAinv(1,2) =  5.178748573958397475446442544234494d0
+      rkTinvAinv(1,3) =  1.435609490412123627047824222335563d0
+      rkTinvAinv(2,1) = -2.854361287939276673073807031221493d0
+      rkTinvAinv(2,2) = -1.003648660720543859000994063139137d+1
+      rkTinvAinv(2,3) =  1.789135380979465422050817815017383d0
+      rkTinvAinv(3,1) = -4.160768067752685525282947313530352d0
+      rkTinvAinv(3,2) =  1.124128569859216916690209918405860d0
+      rkTinvAinv(3,3) =  1.700644430961823796581896350418417d0
+
+      rkAinvT(1,1) = 1.543510591072668287198054583233180d0
+      rkAinvT(1,2) = -2.460228411937788329157493833295004d0
+      rkAinvT(1,3) = -.412906170450356277003910443520499d0
+      rkAinvT(2,1) = .209519643211838264029272585946993d0
+      rkAinvT(2,2) = 1.388545667194387164417459732995766d0
+      rkAinvT(2,3) = 1.20339553005832004974976023130002d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau1A_Coefficients
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RungeKuttaTLM ! and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: V(NVAR), T
+    KPP_REAL, INTENT(INOUT) :: FCT(NVAR)
+    KPP_REAL :: Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: V(NVAR), T 
+#ifdef FULL_ALGEBRA    
+    KPP_REAL, INTENT(INOUT) :: JF(NVAR,NVAR)
+    KPP_REAL :: JV(LU_NONZERO)
+    INTEGER       :: i, j 
+#else
+    KPP_REAL, INTENT(INOUT) :: JF(LU_NONZERO)
+#endif   
+
+    KPP_REAL :: Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+
+  END SUBROUTINE JAC_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+END MODULE KPP_ROOT_Integrator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.c	(revision 3477)
@@ -0,0 +1,1361 @@
+#define MAX(a,b) ( ((a) >= (b)) ?(a):(b)  )
+#define MIN(b,c) ( ((b) <  (c)) ?(b):(c)  )
+#define ABS(x)   ( ((x) >=  0 ) ?(x):(-x) )
+#define SQRT(d)  ( pow((d),0.5)  )
+#define SIGN(x,y)( ( (x*y) >= 0 ) ?(x):(-x) )/* Sign transfer function */
+#define MOD(A,B) (int)((A)%(B))
+
+/* ~~~> Numerical constants    */
+#define  ZERO     (KPP_REAL)0.0
+#define  ONE      (KPP_REAL)1.0
+
+/* ~~~>  Statistics on the work performed by the SDIRK method */
+#define  Nfun 1
+#define  Njac 2
+#define  Nstp 3
+#define  Nacc 4
+#define  Nrej 5
+#define  Ndec 6
+#define  Nsol 7
+#define  Nsng 8
+#define  Ntexit 1
+#define  Nhexit 2
+#define  Nhnew 3
+
+/*~~~>  SDIRK method coefficients, up to 5 stages    */
+#define Smax 5
+
+int S2A=1,
+	S2B=2,
+	S3A=3, 
+	S4A=4, 
+	S4B=5;
+
+int sdMethod, 
+	rkS;
+
+KPP_REAL rkGamma, 
+	rkA[Smax][Smax], 
+	rkB[Smax], 
+	rkELO, 
+	rkBhat[Smax],
+	rkC[Smax], 
+	rkD[Smax], 
+	rkE[Smax], 
+	rkTheta[Smax][Smax], 
+	rkAlpha[Smax][Smax];
+
+/*~~~> Function headers     */
+//void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//	int ISTATUS_U[], KPP_REAL RSTATUS_U[], int Ierr);
+void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT);
+int SDIRK(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+	KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[], int ICNTRL[], 
+	KPP_REAL RSTATUS[], int ISTATUS[]);
+int SDIRK_Integrator(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+	int Ierr, KPP_REAL Hstart, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Roundoff, 
+	KPP_REAL AbsTol[], KPP_REAL RelTol[], int ISTATUS[], KPP_REAL RSTATUS[],
+	int ITOL, int Max_no_steps, int StartNewton, KPP_REAL NewtonTol, 
+	KPP_REAL ThetaMin, KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax,
+	KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int NewtonMaxit);
+void SDIRK_ErrorScale(int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+	KPP_REAL Y[], KPP_REAL SCAL[]);
+KPP_REAL SDIRK_ErrorNorm(int N, KPP_REAL Y[], KPP_REAL SCAL[]);
+int SDIRK_ErrorMsg(int code, KPP_REAL T, KPP_REAL H, int Ierr);
+void SDIRK_PrepareMatrix(KPP_REAL H, KPP_REAL T, KPP_REAL Y[], KPP_REAL FJAC[], 
+	int SkipJac, int SkipLU, KPP_REAL E[], int IP[], int Reject, 
+	int ISING, int ISTATUS[]);
+void SDIRK_Solve(KPP_REAL H, int N, KPP_REAL E[], int IP[], int ISING, 
+	KPP_REAL RHS[], int ISTATUS[]);
+void Sdirk4a(void);
+void Sdirk4b(void);
+void Sdirk2a(void);
+void Sdirk2b(void);
+void Sdirk3a(void);
+void FUN_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL P[]);
+void JAC_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[]);
+void Fun(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+void Jac_SP(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+void WAXPY(int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], int incY);
+void WSCAL(int N, KPP_REAL Alpha, KPP_REAL X[], int incX);
+KPP_REAL WLAMCH(char C);
+void WADD(int N, KPP_REAL Y[], KPP_REAL Z[], KPP_REAL TMP[]);
+void Set2Zero(int N, KPP_REAL Y[]);
+void KppSolve(KPP_REAL A[], KPP_REAL b[]);
+int KppDecomp(KPP_REAL A[]);
+void Update_SUN();
+void Update_RCONST();
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+//void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//		int ISTATUS_U[], KPP_REAL RSTATUS_U[], int Ierr_U)
+void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+/* int Ntotal = 0; *//* Used for debug option below to print the number of steps */
+KPP_REAL RCNTRL[20], 
+	RSTATUS[20], 
+	T1, 
+	T2;
+	
+int ICNTRL[20], 
+	ISTATUS[20], 
+	Ierr;
+
+Ierr = 0;
+
+int i;
+for(i=0; i<20; i++) {
+	ICNTRL[i] = 0;
+	RCNTRL[i] = (KPP_REAL)0.0;
+	ISTATUS[i] = 0;
+	RSTATUS[i] = (KPP_REAL)0.0;
+} /* end for */
+
+/*~> fine-tune the integrator: */
+ICNTRL[1] = 0; /* 0 - vector tolerances, 1 - scalar tolerances */
+ICNTRL[5] = 0; /* starting values of N. iter.: interpolated 0), zero (1) */
+
+///* If optional parameters are given, and if they are >0, 
+//	then they overwrite default settings. */
+//if(ICNTRL_U != NULL) { /* Check to see if ICNTRL_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		if(ICNTRL_U[i] > 0) {
+//			ICNTRL[i] = ICNTRL_U[i];
+//		} /* end if */
+//	} /* end for */
+//} /* end if */
+//
+//if(RCNTRL_U != NULL) { /* Check to see if RCNTRL_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		if(RCNTRL_U[i] > 0) {
+//			RCNTRL[i] = RCNTRL_U[i];
+//		} /* end if */
+//	} /* end for */
+//} /* end if */
+
+
+T1 = TIN;
+T2 = TOUT;
+Ierr = SDIRK( NVAR, T1, T2, VAR, RTOL, ATOL, RCNTRL, ICNTRL, RSTATUS,
+	ISTATUS);
+
+
+/*~~~> Debug option: print number of steps
+   Ntotal += ISTATUS[Nstp]; */
+
+if(Ierr < 0) {
+	printf("SDIRK: Unsuccessful exit at T=%f(Ierr=%d)", TIN, Ierr);
+}
+
+///*if optional parameters are given for output they to return information */
+//if(ISTATUS_U != NULL) { /* Check to see if ISTATUS_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		ISTATUS_U[i] = ISTATUS[i];
+//	} /* end for */
+//} /* end if */
+//
+//if(RSTATUS_U != NULL) { /* Check to see if RSTATUS_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		RSTATUS_U[i] = RSTATUS[i];
+//	} /* end for */
+//} /* end if */
+//
+//Ierr_U = Ierr;
+
+}
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[],
+	KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[],
+	int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+    Runge-Kutta (SDIRK) method.
+
+    This implementation is based on the book and the code Sdirk4:
+
+    E. Hairer and G. Wanner
+    "Solving ODEs II. Stiff and differential-algebraic problems".
+    Springer series in computational mathematics, Springer-Verlag, 1996.
+    This code is based on the SDIRK4 routine in the above book.
+
+    Methods:
+        * Sdirk 2a, 2b: L-stable, 2 stages, order 2
+        * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant
+        * Sdirk 4a, 4b: L-stable, 5 stages, order 4
+
+    (C)  Adrian Sandu, July 2005
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    Revised by Philipp Miehe and Adrian Sandu, May 2006
+    Translation F90 to C by Paul Eller and Nicholas Hobbs, July 2006
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>  INPUT ARGUMENTS:
+
+   -     Y[NVAR]    = vector of initial conditions (at T=Tinitial)
+   -    [Tinitial,Tfinal]  = time range of integration
+        (if Tinitial>Tfinal the integration is performed backwards in time)
+   -    RelTol, AbsTol = user precribed accuracy
+   - SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+        returns Ydot = Y' = F(T,Y)
+   - SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+        returns Jcb = dF/dY
+   -    ICNTRL[1:20]    = integer inputs parameters
+   -    RCNTRL[1:20]    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>  OUTPUT ARGUMENTS:
+
+   -    Y[NVAR]         -> vector of final states (at T->Tfinal)
+   -    ISTATUS[1:20]   -> integer output parameters
+   -    RSTATUS[1:20]   -> real output parameters
+   -    Ierr            -> job status upon return
+                           success (positive value) or
+                           failure (negative value)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  INPUT PARAMETERS:
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+~~~>
+    ICNTRL[0] = not used
+    ICNTRL[1] = 0: AbsTol, RelTol are NVAR-dimensional vectors
+                                           = 1: AbsTol, RelTol are scalars
+    ICNTRL[2] = Method
+    ICNTRL[3]  -> maximum number of integration steps
+            For ICNTRL[3]=0 the default value of 100000 is used
+    ICNTRL[4]  -> maximum number of Newton iterations
+        For ICNTRL(4)=0 the default value of 8 is used
+    ICNTRL[5]  -> starting values of Newton iterations:
+    ICNTRL[5]=0 : starting values are interpolated (the default)
+    ICNTRL[5]=1 : starting values are zero
+
+~~~>  Real parameters
+
+    RCNTRL[0]  -> Hmin, lower bound for the integration step size
+                  It is strongly recommended to keep Hmin = ZERO
+    RCNTRL[1]  -> Hmax, upper bound for the integration step size
+    RCNTRL[2]  -> Hstart, starting value for the integration step size
+    RCNTRL[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+    RCNTRL[4]  -> FacMax, upper bound on step increase factor (default=6)
+    RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+                  (default=0.1)
+    RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+                  than the predicted value  (default=0.9)
+    RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+                  than ThetaMin the Jacobian is not recomputed;
+                  (default=0.001)
+    RCNTRL[8]  -> NewtonTol, stopping criterion for Newton's method
+                  (default=0.03)
+    RCNTRL[9]  -> Qmin
+    RCNTRL[10] -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+                  step size is kept constant and the LU factorization
+                  reused (default Qmin=1, Qmax=1.2)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  OUTPUT PARAMETERS:
+   Note: each call to Rosenbrock adds the current no. of fcn calls
+   to previous value of ISTATUS(1), and similar for the other params.
+   Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+  ISTATUS[0] = No. of function calls
+  ISTATUS[1] = No. of jacobian calls
+  ISTATUS[2] = No. of steps
+  ISTATUS[3] = No. of accepted steps
+  ISTATUS[4] = No. of rejected steps (except at the beginning)
+  ISTATUS[5] = No. of LU decompositions
+  ISTATUS[6] = No. of forward/backward substitutions
+  ISTATUS[7] = No. of singular matrix decompositions
+  RSTATUS[0]  -> Texit, the time corresponding to the computed Y upon return
+  RSTATUS[1]  -> Hexit,last accepted step before return
+  RSTATUS[2]  -> Hnew, last predicted step before return
+  For multiple restarts, use Hnew as Hstart in the following run
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{ 
+
+int Max_no_steps=0;
+
+/*~~~> Local variables      */
+int StartNewton;
+
+KPP_REAL  Hmin=0,
+	Hmax=0,
+	Hstart=0,
+	Roundoff,
+	FacMin=0,
+	FacMax=0,
+	FacSafe=0,
+	FacRej=0,
+	ThetaMin,
+	NewtonTol,
+	Qmin,
+	Qmax;
+
+int ITOL,
+	NewtonMaxit,
+	i,
+	Ierr = 0;
+
+/*~~~>  For Scalar tolerances (ICNTRL[1] !=0 )  the code uses AbsTol[1] and RelTol[1)
+    For Vector tolerances (ICNTRL[1] == 0) the code uses AbsTol[1:NVAR] and RelTol[1:NVAR] */
+if (ICNTRL[1]==0){
+	ITOL = 1;
+}
+else {
+	ITOL = 0;
+}  /* end if */
+
+/*~~~> ICNTRL[3] - method selection   */
+
+switch (ICNTRL[2]) {
+
+case 0: Sdirk2a();
+	break;
+
+case 1: Sdirk2a();
+	break;
+
+case 2: Sdirk2b();
+	break;
+
+case 3: Sdirk3a();
+	break;
+
+case 4: Sdirk4a();
+	break;
+
+case 5: Sdirk4b();
+	break;
+
+default: Sdirk2a();
+
+} /* end switch */
+
+/*~~~>   The maximum number of time steps admitted   */
+if (ICNTRL[3] == 0) {
+	Max_no_steps = 200000;
+}
+else if (ICNTRL[3] > 0) {
+	Max_no_steps = ICNTRL[3];
+}
+else {
+	printf("User-selected ICNTRL(4)=%d", ICNTRL[3]);
+	SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr);
+} /*end if */
+
+/*~~~>The maximum number of Newton iterations admitted */
+if(ICNTRL[4]==0) {
+	NewtonMaxit = 8;
+}
+else {
+	NewtonMaxit=ICNTRL[4];
+	if(NewtonMaxit <=0) {
+		printf("User-selected ICNTRL(5)=%d", ICNTRL[4] );
+		SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr);
+	}
+}
+
+/*~~~> StartNewton: Extrapolate for starting values of Newton iterations */
+if (ICNTRL[5] == 0) {
+	StartNewton = 1;
+}
+else {
+	StartNewton = 0;
+} /* end if */
+
+/*~~~>  Unit roundoff (1+Roundoff>1) */
+Roundoff = WLAMCH('E');
+
+/*~~~>  Lower bound on the step size: (positive value) */
+if (RCNTRL[0] == ZERO) {
+	Hmin = ZERO;
+}
+else if (RCNTRL[0] > ZERO) {
+	Hmin = RCNTRL[0];
+}
+else {
+	printf("User-selected RCNTRL[0]=%f", RCNTRL[0]);
+	SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>  Upper bound on the step size: (positive value) */
+if (RCNTRL[1] == ZERO) {
+	Hmax = ABS(Tfinal-Tinitial);
+}
+else if (RCNTRL[1] > ZERO) {
+	Hmax = MIN( ABS(RCNTRL[1]), ABS(Tfinal-Tinitial) );
+}
+else {
+	printf("User-selected RCNTRL[1]=%f", RCNTRL[1]);
+	SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>  Starting step size: (positive value) */
+if (RCNTRL[2] == ZERO) {
+	Hstart = MAX( Hmin, Roundoff);
+}
+else if (RCNTRL[2] > ZERO) {
+	Hstart = MIN( ABS(RCNTRL[2]), ABS(Tfinal-Tinitial) );
+}
+else {
+	printf("User-selected Hstart: RCNTRL[2]=%f", RCNTRL[2]);
+	SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax */
+if (RCNTRL[3] == ZERO) {
+	FacMin = (KPP_REAL)0.2;
+}
+else if (RCNTRL[3] > ZERO) {
+	FacMin = RCNTRL[3];
+}
+else {
+	printf("User-selected FacMin: RCNTRL[3]=%f", RCNTRL[3]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /* end if */
+
+if (RCNTRL[4] == ZERO) {
+	FacMax = (KPP_REAL)10.0;
+}
+else if (RCNTRL[4] > ZERO) {
+	FacMax = RCNTRL[4];
+}
+else {
+	printf("User-selected FacMax: RCNTRL[4]=%f", RCNTRL[4]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+if (RCNTRL[5] == ZERO) {
+	FacRej = (KPP_REAL)0.1;
+}
+else if (RCNTRL[5] > ZERO) {
+	FacRej = RCNTRL[5];
+}
+else {
+	printf("User-selected FacRej: RCNTRL[5]=%f", RCNTRL[5]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /*end if */
+
+/* ~~~>   FacSafe: Safety Factor in the computation of new step size  */
+if (RCNTRL[6] == ZERO) {
+	FacSafe = (KPP_REAL)0.9;
+}
+else if (RCNTRL[6] > ZERO) {
+	FacSafe = RCNTRL[6];
+}
+else {
+	printf("User-selected FacSafe: RCNTRL[6]=%f", RCNTRL[6]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~> ThetaMin: decides whether the Jacobian should be recomputed */
+if (RCNTRL[7] == ZERO) {
+	ThetaMin = (KPP_REAL)1.0e-03;
+}
+else {
+	ThetaMin = RCNTRL[7];
+} /* end if */
+
+/*~~~> Stopping criterion for Newton's method */
+if (RCNTRL[8] == ZERO) {
+	NewtonTol = (KPP_REAL)3.0e-02;
+}
+else {
+	NewtonTol = RCNTRL[8];
+} /* end if */
+
+/* ~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST. */
+if (RCNTRL[9] == ZERO) {
+	Qmin = ONE;
+}
+else {
+	Qmin = RCNTRL[9];
+} /* end if */
+
+if (RCNTRL[10] == ZERO) {
+	Qmax = (KPP_REAL)1.2;
+}
+else {
+	Qmax = RCNTRL [10];
+} /* end if */
+
+/* ~~~>  Check if tolerances are reasonable */
+if (ITOL == 0) {
+	if ((AbsTol[0]<=ZERO || RelTol[0])<=(((KPP_REAL)10.0)*Roundoff)) {
+		SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr);
+	} /* end internal if */
+}
+else {
+	for (i = 0; i < N; i++) {
+		if((AbsTol[i]<=ZERO)||(RelTol[i]<=((KPP_REAL)10.0)*Roundoff)){
+			SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr);
+		} /* end internal if */
+	} /* end for */
+} /* end if */
+
+if (Ierr < 0) {
+	return Ierr;
+} /*end if */
+
+Ierr = SDIRK_Integrator(N, Tinitial, Tfinal, Y, Ierr, Hstart, Hmin, Hmax,
+	Roundoff, AbsTol, RelTol, ISTATUS, RSTATUS, ITOL, Max_no_steps,
+	StartNewton, NewtonTol, ThetaMin, FacSafe, FacMin, FacMax, FacRej,
+	Qmin, Qmax, NewtonMaxit);
+
+return Ierr;
+
+}  /* end of main SDIRK function */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_Integrator(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+	int Ierr, KPP_REAL Hstart, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Roundoff,
+	KPP_REAL AbsTol[], KPP_REAL RelTol[], int ISTATUS[], KPP_REAL RSTATUS[],
+	int ITOL, int Max_no_steps, int StartNewton, KPP_REAL NewtonTol,
+	KPP_REAL ThetaMin, KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax,
+	KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int NewtonMaxit)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+/*~~~> Local variables:    */
+KPP_REAL Z[Smax][NVAR],
+	G[NVAR],
+	TMP[NVAR],
+	NewtonRate,
+	SCAL[NVAR],
+	RHS[NVAR],
+	T,
+	H,
+	Theta=0,
+	Hratio,
+	NewtonPredictedErr,
+	Qnewton,
+	Err=0,
+	Fac,
+	Hnew,
+	Tdirection,
+	NewtonIncrement=0,
+	NewtonIncrementOld=0;
+
+int IER=0,
+	istage,
+	NewtonIter,
+	IP[NVAR],
+	Reject,
+	FirstStep,
+	SkipJac,
+	SkipLU,
+	NewtonDone,
+	CycleTloop,
+	i,
+	j;
+
+#ifdef FULL_ALGEBRA
+	KPP_REAL FJAC[NVAR][NVAR];
+	KPP_REAL E[NVAR][NVAR];
+#else
+	KPP_REAL FJAC[LU_NONZERO];
+	KPP_REAL E[LU_NONZERO];
+#endif
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~~>   Initializations              */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+T = Tinitial;
+Tdirection = SIGN(ONE, Tfinal-Tinitial);
+H = MAX(ABS(Hmin), ABS(Hstart));
+
+if(ABS(H) <= ((KPP_REAL)10.0 * Roundoff)) {
+	H = (KPP_REAL)(1.0e-06);
+} /* end if */
+
+H = MIN(ABS(H), Hmax);
+H = SIGN(H, Tdirection);
+SkipLU = 0;
+SkipJac = 0;
+Reject = 0;
+FirstStep = 1;
+CycleTloop = 0;
+
+SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Time loop begins                */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+while((Tfinal-T)*Tdirection - Roundoff > ZERO) {  /* Tloop */
+
+/*~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition */
+	if(SkipLU == 0) { /* This time around skip the Jac update and LU */
+		SDIRK_PrepareMatrix(H, T, Y, FJAC, SkipJac, SkipLU, E, IP, 
+			Reject, IER, ISTATUS);
+		if(IER != 0) {
+			SDIRK_ErrorMsg(-8, T, H, Ierr);
+		return Ierr;
+		} /* end if */
+	} /* end if */
+
+	if(ISTATUS[Nstp] > Max_no_steps) {
+		SDIRK_ErrorMsg(-6, T, H, Ierr);
+		return Ierr;
+	} /* end if */
+
+	if((T + ((KPP_REAL)0.1) * H == T) || (ABS(H) <= Roundoff)) {
+		SDIRK_ErrorMsg(-7, T, H, Ierr);
+		return Ierr;
+	} /* end if */
+
+/*stages*/ for(istage=0; istage < rkS; istage++) {
+		/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+		/*~~~>  Simplified Newton iterations          */
+		/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+		/*~~~>  Starting values for Newton iterations */
+		Set2Zero(N, &Z[istage][0]);
+
+	/*~~~>   Prepare the loop-independent part of the right-hand side */
+		Set2Zero(N, G);
+			if(istage > 0) {
+				for(j=0; j < istage; j++) {
+         				 WAXPY(N, rkTheta[j][istage], 
+						&Z[j][0], 1, G, 1);
+					if(StartNewton == 1) {
+						WAXPY(N, rkAlpha[j][istage],
+							&Z[j][0], 1, 
+							&Z[istage][0], 1);
+					} /* end if */
+				} /* end for */
+			} /* end if */
+
+	/*~~~>  Initializations for Newton iteration */
+		NewtonDone = 0; /* false */
+		Fac = (KPP_REAL)0.5; /* Step reduction factor */
+
+/*NewtonLoop*/	for(NewtonIter=0; NewtonIter<NewtonMaxit; NewtonIter++ ) {
+
+        /*~~~>  Prepare the loop-dependent part of the right-hand side */
+			WADD(N, Y, &Z[istage][0], TMP);
+			FUN_CHEM(T+rkC[istage]*H, TMP, RHS);
+			ISTATUS[Nfun]++;
+			WSCAL(N, H*rkGamma, RHS, 1);
+			WAXPY(N, -ONE, &Z[istage][0], 1, RHS, 1);
+			WAXPY(N, ONE, G, 1, RHS, 1 );
+
+	        /*~~~>   Solve the linear system  */
+			SDIRK_Solve(H, N, E, IP, IER, RHS, ISTATUS);
+
+		/*~~~>   Check convergence of Newton iterations */
+			NewtonIncrement = SDIRK_ErrorNorm(N, RHS, SCAL);
+
+			if(NewtonIter == 0) {
+				Theta = ABS(ThetaMin);
+				NewtonRate = (KPP_REAL)2.0;
+			}
+			else {
+				Theta = NewtonIncrement/NewtonIncrementOld;
+
+				if(Theta < (KPP_REAL)0.99) {
+					NewtonRate = Theta/(ONE-Theta);
+			/* Predict error at the end of Newton process */
+					NewtonPredictedErr = 	
+						(NewtonIncrement*pow(Theta,
+						(NewtonMaxit - (NewtonIter +
+						1)) / (ONE - Theta)));
+					if(NewtonPredictedErr >= NewtonTol) {
+		              /* Non-convergence of Newton: 
+				predicted error too large*/
+						Qnewton = MIN((KPP_REAL)10.0,
+							NewtonPredictedErr/
+							NewtonTol);
+						Fac = (KPP_REAL)0.8 * pow
+							(Qnewton, (-ONE / (1
+							+ NewtonMaxit -
+							NewtonIter + 1)));
+						break;
+					} /* end internal if */
+				}
+				else  /* Non-convergence of Newton: 
+					Theta too large */ {
+					break;
+				} /* end internal if else */
+			} /* end if else */
+
+			NewtonIncrementOld = NewtonIncrement;
+
+		/* Update solution: Z(:) <-- Z(:)+RHS(:) */
+			WAXPY(N, ONE, RHS, 1, &Z[istage][0], 1);
+
+		/* Check error in Newton iterations */
+			NewtonDone=(NewtonRate*NewtonIncrement<=NewtonTol);
+
+		        if(NewtonDone == 1) {
+				break;
+			}
+		} /* end NewtonLoop for */
+
+		if(NewtonDone == 0) {
+		/* CALL RK_ErrorMsg(-12,T,H,Ierr); */
+			H = Fac*H;
+			Reject = 1; /* true */
+			SkipJac = 1;/* true */
+			SkipLU = 0;/* false */
+			CycleTloop = 1; /* cycle Tloop */
+		} /* end if */
+
+		if(CycleTloop == 1) {
+			CycleTloop=0;
+			break;
+		}
+	} /* end stages for */
+
+	if(CycleTloop==0) {
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Error estimation      */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+	ISTATUS[Nstp]++;
+	Set2Zero(N, TMP);
+
+	for(i=0; i<rkS; i++) {
+		if(rkE[i] != ZERO) {
+			WAXPY(N, rkE[i], &Z[i][0], 1, TMP, 1);
+		} /* end if */
+	} /* end for */
+
+	SDIRK_Solve(H, N, E, IP, IER, TMP, ISTATUS);
+	Err = SDIRK_ErrorNorm(N, TMP, SCAL);
+
+/*~~~~> Computation of new step size Hnew */
+	Fac = FacSafe * pow((Err), (-ONE/rkELO));
+	Fac = MAX(FacMin, MIN(FacMax, Fac));
+	Hnew = H*Fac;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Accept/Reject step    */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+	if(Err < ONE) { /*~~~> Step is accepted */
+		FirstStep = 0; /* false */
+		ISTATUS[Nacc]++;
+
+	/*~~~> Update time and solution */
+		T = T + H;
+
+        /* Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:) */
+		for(i=0; i<rkS; i++) {
+			if(rkD[i] != ZERO) {
+				WAXPY(N, rkD[i], &Z[i][0], 1, Y, 1);
+			} /* end if */
+		} /* end for */
+
+	/*~~~> Update scaling coefficients */
+		SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+	/*~~~> Next time step */
+		Hnew = Tdirection*MIN(ABS(Hnew), Hmax);
+
+	/* Last T and H */
+		RSTATUS[Ntexit] = T;
+		RSTATUS[Nhexit] = H;
+		RSTATUS[Nhnew] = Hnew;
+
+	/* No step increase after a rejection */
+		if(Reject==1) {
+			Hnew = Tdirection*MIN(ABS(Hnew), ABS(H));
+		} /* end if */
+
+		Reject = 0; /* false */
+
+		if((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) {
+			H = Tfinal-T;
+		}
+		else {
+			Hratio = Hnew/H;
+		/* If step not changed too much keep Jacobian and reuse LU */
+			SkipLU = ((Theta <= ThetaMin) && (Hratio >= Qmin) && 
+				(Hratio <= Qmax));
+
+			if(SkipLU==0) {
+				H = Hnew;
+			} /* end internal if */
+		} /* end if else */
+
+		SkipJac = (Theta <= ThetaMin);
+		SkipJac = 0; /* false */
+		}
+		else { /*~~~> Step is rejected */
+			if((FirstStep==1) || (Reject==1)) {
+				H = FacRej * H;
+			}
+			else {
+				H = Hnew;
+			} /* end internal if */
+
+			Reject = 1;
+			SkipJac = 1;
+			SkipLU = 0;
+
+			if(ISTATUS[Nacc] >=1) {
+				ISTATUS[Nrej]++;
+			} /* end if */
+		} /* end if else */
+	} /* end CycleTloop if */
+} /* end Tloop */
+
+/* Successful return */
+Ierr = 1;
+return Ierr;
+
+} /* end SDIRK_Integrator */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_ErrorScale(int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+			KPP_REAL Y[],KPP_REAL SCAL[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+int i;
+if (ITOL == 0){
+	for (i = 0; i < NVAR; i++){
+		SCAL[i] = ONE / (AbsTol[0]+RelTol[0]*ABS(Y[i]) );
+	} /* end for */
+}
+else {
+	for (i = 0; i < NVAR; i++){
+		SCAL[i] = ONE / (AbsTol[i]+RelTol[i]*ABS(Y[i]) );
+	} /*  end for  */
+} /*  end if  */
+
+} /*  end SDIRK_ErrorScale  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL SDIRK_ErrorNorm(int N, KPP_REAL Y[], KPP_REAL SCAL[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+int i;
+KPP_REAL Err = ZERO;
+
+for (i = 0; i < N; i++) {
+	Err = Err + pow( (Y[i]*SCAL[i]), 2);
+} /* end for */
+
+Err = MAX( SQRT(Err/(KPP_REAL)N), (KPP_REAL)1.0e-10);
+
+return Err;
+
+} /*  end SDIRK_ErrorNorm  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_ErrorMsg(int code, KPP_REAL T, KPP_REAL H, int Ierr)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *    Handles all error messages
+ *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+
+Ierr = code;
+
+printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
+printf("\nForced exit from Sdirk due to the following error:\n");
+
+switch (code) {
+
+case -1:
+	printf("--> Improper value for maximal no of steps");
+	break;
+case -2:
+	printf("--> Selected Rosenbrock method not implemented");
+	break;
+case -3:
+	printf("--> Hmin/Hmax/Hstart must be positive");
+	break;
+case -4:
+	printf("--> FacMin/FacMax/FacRej must be positive");
+	break;
+case -5:
+	printf("--> Improper tolerance values");
+	break;
+case -6:
+	printf("--> No of steps exceeds maximum bound");
+	break;
+case -7:
+	printf("--> Step size too small (T + H/10 = T) or H < Roundoff");
+	break;
+case -8:
+	printf("--> Matrix is repeatedly singular");
+	break;
+default: /* causing an error */
+	printf("Unknown Error code: %d", code);
+
+} /*  end switch   */
+
+printf("\n   Time = %f and H = %f", T, H );
+printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
+
+return code;
+
+} /*  end SDIRK_ErrorMsg   */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_PrepareMatrix(KPP_REAL H, KPP_REAL T, KPP_REAL Y[], KPP_REAL FJAC[],
+			int SkipJac, int SkipLU, KPP_REAL E[], int IP[], 
+			int Reject, int ISING, int ISTATUS[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+ *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL HGammaInv;
+int i, j;
+int ConsecutiveSng = 0;
+ISING = 1;
+
+
+while( ISING != 0) {
+	HGammaInv = ONE/(H*rkGamma);
+
+/*~~~>  Compute the Jacobian */
+	if(SkipJac==0) {
+		JAC_CHEM(T,Y,FJAC);
+		ISTATUS[Njac]++;
+	} /* end if */
+
+	#ifdef FULL_ALGEBRA
+		for(j=0; j<NVAR; j++) {
+			for(i=0; i<NVAR; i++) {
+				E[j][i] = -FJAC[j][i];
+			} /* end for */
+
+			E[j][j] = E[j][j] + HGammaInv;
+		} /* end for */
+
+		DGETRF(NVAR, NVAR, E, NVAR, IP, ISING);
+	#else
+		for(i=0; i<LU_NONZERO; i++) {
+			E[i] = -FJAC[i];
+		} /* end for */
+
+		for(i=0; i<NVAR; i++) {
+			j = LU_DIAG[i];
+			E[j]=E[j] + HGammaInv;
+		} /* end for */
+
+		ISING = KppDecomp(E);
+		IP[0] = 1;
+	#endif
+
+	ISTATUS[Ndec]++;
+
+	if(ISING != 0) {
+		ISTATUS[Nsng]++;
+		ConsecutiveSng++;
+
+		if(ConsecutiveSng >= 6) {
+			return; /* Failure */
+		} /* end internal if */
+
+		H = (KPP_REAL)(0.5) * H;
+		SkipJac = 1; /* true */
+		SkipLU = 0; /* false */
+		Reject = 1; /* true */
+	} /* end if */
+} /* end while */
+
+} /* end SDIRK_PrepareMatrix */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Solve( KPP_REAL H, int N, KPP_REAL E[], int IP[], int ISING, 
+		KPP_REAL RHS[], int ISTATUS[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *  Solves the system (H*Gamma-Jac)*x = RHS
+ *      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+ *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL HGammaInv = ONE/(H * rkGamma);
+
+WSCAL(N, HGammaInv, RHS, 1);
+
+#ifdef FULL_ALGEBRA
+	DGETRS('N', N, 1, E, N, IP, RHS, N, ISING);
+#else
+	KppSolve(E, RHS);
+#endif
+	ISTATUS[Nsol]++;
+
+} /* end SDIRK_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S4A;
+
+/* Number of stages */
+rkS = 5;
+
+/* Method Coefficients */
+rkGamma = (KPP_REAL)0.2666666666666666666666666666666667;
+
+rkA[0][0] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][1] = (KPP_REAL)0.5000000000000000000000000000000000;
+rkA[1][1] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][2] = (KPP_REAL)0.3541539528432732316227461858529820;
+rkA[1][2] = (KPP_REAL)(-0.5415395284327323162274618585298197e-01);
+rkA[2][2] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][3] = (KPP_REAL)0.8515494131138652076337791881433756e-01;
+rkA[1][3] = (KPP_REAL)(-0.6484332287891555171683963466229754e-01);
+rkA[2][3] = (KPP_REAL)0.7915325296404206392428857585141242e-01;
+rkA[3][3] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][4] = (KPP_REAL)2.100115700566932777970612055999074;
+rkA[1][4] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+rkA[2][4] = (KPP_REAL)2.399816361080026398094746205273880;
+rkA[3][4] = (KPP_REAL)(-2.998818699869028161397714709433394);
+rkA[4][4] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkB[0] = (KPP_REAL)2.100115700566932777970612055999074;
+rkB[1] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+rkB[2] = (KPP_REAL)2.399816361080026398094746205273880;
+rkB[3] = (KPP_REAL)(-2.998818699869028161397714709433394);
+rkB[4] = (KPP_REAL)0.2666666666666666666666666666666667;
+
+rkBhat[0] = (KPP_REAL)2.885264204387193942183851612883390;
+rkBhat[1] = (KPP_REAL)(-0.1458793482962771337341223443218041);
+rkBhat[2] = (KPP_REAL)2.390008682465139866479830743628554;
+rkBhat[3] = (KPP_REAL)(-4.129393538556056674929560012190140);
+rkBhat[4] = ZERO;
+
+rkC[0] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkC[1] = (KPP_REAL)0.7666666666666666666666666666666667;
+rkC[2] = (KPP_REAL)0.5666666666666666666666666666666667;
+rkC[3] = (KPP_REAL)0.3661315380631796996374935266701191;
+rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+rkD[0] = ZERO;
+rkD[1] = ZERO;
+rkD[2] = ZERO;
+rkD[3] = ZERO;
+rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+rkE[0] = (KPP_REAL)(-0.6804000050475287124787034884002302);
+rkE[1] = (KPP_REAL)(1.558961944525217193393931795738823);
+rkE[2] = (KPP_REAL)(-13.55893003128907927748632408763868);
+rkE[3] = (KPP_REAL)(15.48522576958521253098585004571302);
+rkE[4] = ONE;
+
+/* Local order of Err estimate */
+rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+rkTheta[0][1] = (KPP_REAL)1.875000000000000000000000000000000;
+rkTheta[0][2] = (KPP_REAL)1.708847304091539528432732316227462;
+rkTheta[1][2] = (KPP_REAL)(-0.2030773231622746185852981969486824);
+rkTheta[0][3] = (KPP_REAL)0.2680325578937783958847157206823118;
+rkTheta[1][3] = (KPP_REAL)(-0.1828840955527181631794050728644549);
+rkTheta[2][3] = (KPP_REAL)0.2968246986151577397160821594427966;
+rkTheta[0][4] = (KPP_REAL)0.9096171815241460655379433581446771;
+rkTheta[1][4] = (KPP_REAL)(-3.108254967778352416114774430509465);
+rkTheta[2][4] = (KPP_REAL)12.33727431701306195581826123274001;
+rkTheta[3][4] = (KPP_REAL)(-11.24557012450885560524143016037523);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+rkAlpha[0][1] = (KPP_REAL)2.875000000000000000000000000000000;
+rkAlpha[0][2] = (KPP_REAL)0.8500000000000000000000000000000000;
+rkAlpha[1][2] = (KPP_REAL)0.4434782608695652173913043478260870;
+rkAlpha[0][3] = (KPP_REAL)0.7352046091658870564637910527807370;
+rkAlpha[1][3] = (KPP_REAL)(-0.9525565003057343527941920657462074e-01);
+rkAlpha[2][3] = (KPP_REAL)0.4290111305453813852259481840631738;
+rkAlpha[0][4] = (KPP_REAL)(-16.10898993405067684831655675112808);
+rkAlpha[1][4] = (KPP_REAL)6.559571569643355712998131800797873;
+rkAlpha[2][4] = (KPP_REAL)(-15.90772144271326504260996815012482);
+rkAlpha[3][4] = (KPP_REAL)25.34908987169226073668861694892683;
+
+rkELO = (KPP_REAL)4.0;
+
+} /* end Sdirk4a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4b()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S4B;
+
+/* Number of stages */
+rkS = 5;
+
+/* Method coefficients */
+rkGamma = (KPP_REAL)0.25;
+
+rkA[0][0] = (KPP_REAL)0.25;
+rkA[0][1] = (KPP_REAL)0.5;
+rkA[1][1] = (KPP_REAL)0.25;
+rkA[0][2] = (KPP_REAL)0.34;
+rkA[1][2] = (KPP_REAL)(-0.40e-01);
+rkA[2][2] = (KPP_REAL)0.25;
+rkA[0][3] = (KPP_REAL)0.2727941176470588235294117647058824;
+rkA[1][3] = (KPP_REAL)(-0.5036764705882352941176470588235294e-01);
+rkA[2][3] = (KPP_REAL)0.2757352941176470588235294117647059e-01;
+rkA[3][3] = (KPP_REAL)0.25;
+rkA[0][4] = (KPP_REAL)1.041666666666666666666666666666667;
+rkA[1][4] = (KPP_REAL)(-1.020833333333333333333333333333333);
+rkA[2][4] = (KPP_REAL)7.812500000000000000000000000000000;
+rkA[3][4] = (KPP_REAL)(-7.083333333333333333333333333333333);
+rkA[4][4] = (KPP_REAL)0.25;
+
+rkB[0] = (KPP_REAL)1.041666666666666666666666666666667;
+rkB[1] = (KPP_REAL)(-1.020833333333333333333333333333333);
+rkB[2] = (KPP_REAL)7.812500000000000000000000000000000;
+rkB[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+rkB[4] = (KPP_REAL)0.250000000000000000000000000000000;
+
+rkBhat[0] = (KPP_REAL)1.069791666666666666666666666666667;
+rkBhat[1] = (KPP_REAL)(-0.894270833333333333333333333333333);
+rkBhat[2] = (KPP_REAL)7.695312500000000000000000000000000;
+rkBhat[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+rkBhat[4] = (KPP_REAL)0.212500000000000000000000000000000;
+
+rkC[0] = (KPP_REAL)0.25;
+rkC[1] = (KPP_REAL)0.75;
+rkC[2] = (KPP_REAL)0.55;
+rkC[3] = (KPP_REAL)0.5;
+rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+rkD[0] = ZERO;
+rkD[1] = ZERO;
+rkD[2] = ZERO;
+rkD[3] = ZERO;
+rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+rkE[0] = (KPP_REAL)0.5750;
+rkE[1] = (KPP_REAL)0.2125;
+rkE[2] = (KPP_REAL)(-4.6875);
+rkE[3] = (KPP_REAL)4.2500;
+rkE[4] = (KPP_REAL)0.1500;
+
+/* Local order of Err estimate */
+rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+rkTheta[0][1] = (KPP_REAL)2.0;
+rkTheta[0][2] = (KPP_REAL)1.680000000000000000000000000000000;
+rkTheta[1][2] = (KPP_REAL)(-0.1600000000000000000000000000000000);
+rkTheta[0][3] = (KPP_REAL)1.308823529411764705882352941176471;
+rkTheta[1][3] = (KPP_REAL)(-0.1838235294117647058823529411764706);
+rkTheta[2][3] = (KPP_REAL)0.1102941176470588235294117647058824;
+rkTheta[0][4] = (KPP_REAL)(-3.083333333333333333333333333333333);
+rkTheta[1][4] = (KPP_REAL)(-4.291666666666666666666666666666667);
+rkTheta[2][4] = (KPP_REAL)34.37500000000000000000000000000000;
+rkTheta[3][4] = (KPP_REAL)(-28.3333333333333333333333333333);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+rkAlpha[0][1] = (KPP_REAL)3.0;
+rkAlpha[0][2] = (KPP_REAL)0.8800000000000000000000000000000000;
+rkAlpha[1][2] = (KPP_REAL)0.4400000000000000000000000000000000;
+rkAlpha[0][3] = (KPP_REAL)0.1666666666666666666666666666666667;
+rkAlpha[1][3] = (KPP_REAL)(-0.8333333333333333333333333333333333e-01);
+rkAlpha[2][3] = (KPP_REAL)0.9469696969696969696969696969696970;
+rkAlpha[0][4] = (KPP_REAL)(-6.0);
+rkAlpha[1][4] = (KPP_REAL)9.0;
+rkAlpha[2][4] = (KPP_REAL)(-56.81818181818181818181818181818182);
+rkAlpha[3][4] = (KPP_REAL)54.0;
+
+} /* end Sdirk4b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S2A;
+
+/* ~~~> Number of stages    */
+rkS = 2;
+
+/* ~~~> Method coefficients    */
+rkGamma = (KPP_REAL)0.2928932188134524755991556378951510;
+rkA[0][0] = (KPP_REAL)0.2928932188134524755991556378951510;
+rkA[0][1] = (KPP_REAL)0.7071067811865475244008443621048490;
+rkA[1][1] = (KPP_REAL)0.2928932188134524755991556378951510;
+rkB[0] = (KPP_REAL)0.7071067811865475244008443621048490;
+rkB[1] = (KPP_REAL)0.2928932188134524755991556378951510;
+rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+rkC[0] = (KPP_REAL)0.292893218813452475599155637895151;
+rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD[0] = ZERO;
+rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE[0] = (KPP_REAL)0.4714045207910316829338962414032326;
+rkE[1] = (KPP_REAL)(-0.1380711874576983496005629080698993);
+
+/* ~~~> Local order of Err estimate    */
+rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta[0][1] = (KPP_REAL)2.414213562373095048801688724209698;
+
+/* ~~~> Starting value for Newton iterations */
+rkAlpha[0][1] = (KPP_REAL)3.414213562373095048801688724209698;
+
+} /* end Sdirk2a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2b()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S2B;
+
+/* ~~~> Number of stages    */
+rkS      = 2;
+
+/* ~~~> Method coefficients    */
+rkGamma = (KPP_REAL)1.707106781186547524400844362104849;
+rkA[0][0] = (KPP_REAL)1.707106781186547524400844362104849;
+rkA[0][1] = (KPP_REAL)(-0.707106781186547524400844362104849);
+rkA[1][1] = (KPP_REAL)1.707106781186547524400844362104849;
+rkB[0] = (KPP_REAL)(-0.707106781186547524400844362104849);
+rkB[1] = (KPP_REAL)1.707106781186547524400844362104849;
+rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+rkC[0] = (KPP_REAL)1.707106781186547524400844362104849;
+rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD[0] = ZERO;
+rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE[0] = (KPP_REAL)(-0.4714045207910316829338962414032326);
+rkE[1] = (KPP_REAL)0.8047378541243650162672295747365659;
+
+/* ~~~> Local order of Err estimate    */
+rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta[0][1] = (KPP_REAL)(-0.414213562373095048801688724209698);
+
+/* ~~~> Starting value for Newton iterations */
+rkAlpha[0][1] = (KPP_REAL)0.5857864376269049511983112757903019;
+
+} /* end Sdirk2b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk3a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S3A;
+
+/* ~~~> Number of stages    */
+rkS = 3;
+
+/* ~~~> Method coefficients    */
+rkGamma = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[0][0] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[0][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[1][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[0][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[1][2] = (KPP_REAL)0.5773502691896257645091487805019573;
+rkA[2][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkB[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkB[1] = (KPP_REAL)0.5773502691896257645091487805019573;
+rkB[2] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkBhat[0]= (KPP_REAL)0.2113248654051871177454256097490213;
+rkBhat[1]= (KPP_REAL)0.6477918909913548037576239837516312;
+rkBhat[2]= (KPP_REAL)0.1408832436034580784969504064993475;
+rkC[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkC[1] = (KPP_REAL)0.4226497308103742354908512194980427;
+rkC[2] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD[0] = ZERO;
+rkD[1] = ZERO;
+rkD[2] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE[0] = (KPP_REAL)0.9106836025229590978424821138352906;
+rkE[1] = (KPP_REAL)(-1.244016935856292431175815447168624);
+rkE[2] = (KPP_REAL)0.3333333333333333333333333333333333;
+
+/* ~~~> Local order of Err estimate    */
+rkELO    = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta[0][1] =  ONE;
+rkTheta[0][2] = (KPP_REAL)(-1.732050807568877293527446341505872);
+rkTheta[1][2] = (KPP_REAL)2.732050807568877293527446341505872;
+
+/* ~~~> Starting value for Newton iterations */
+rkAlpha[0][1] = (KPP_REAL)2.0;
+rkAlpha[0][2] = (KPP_REAL)(-12.92820323027550917410978536602349);
+rkAlpha[1][2] = (KPP_REAL)8.83012701892219323381861585376468;
+
+} /* end Sdirk3a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FUN_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL P[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL Told;
+
+Told = TIME;
+TIME = T;
+Update_SUN();
+Update_RCONST();
+Fun( Y, FIX, RCONST, P );
+TIME = Told;
+
+
+}  /*  end FUN_CHEM  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JAC_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL Told;
+
+#ifdef FULL_ALGEBRA
+	KPP_REAL JS[LU_NONZERO];
+	int i,j;
+#endif
+
+Told = TIME;
+TIME = T;
+Update_SUN();
+Update_RCONST();
+
+#ifdef FULL_ALGEBRA
+	Jac_SP( Y, FIX, RCONST, JS);
+
+	for(j=0; j<NVAR; j++) {
+		for(i=0; i<NVAR; i++) {
+			JV[j][i] = (KPP_REAL)0.0;
+		} /* end for */
+	} /* end for */
+
+	for(i=0; i<LU_NONZERO; i++) {
+		JV[LU_ICOL[i]][LU_IROW[i]] = JS[i];
+	} /* end for */
+#else
+	Jac_SP(Y, FIX, RCONST, JV);
+#endif
+
+TIME = Told;
+
+} /* end JAC_CHEM  */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.f	(revision 3477)
@@ -0,0 +1,705 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i 
+
+      PARAMETER (LWORK=2*NVAR*NVAR+12*NVAR+7,LIWORK=2*NVAR+7)
+      PARAMETER (LRCONT=5*NVAR+2)
+
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)   
+      COMMON /CONT/ ICONT(4),RCONT(LRCONT)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+      
+      IWORK(3) = 8
+
+      CALL ATMSDIRK(NVAR,FUNC_CHEM,TIN,VAR,TOUT,STEPMIN,     
+     &                  RTOL,ATOL,ITOL,     
+     &                  JAC_CHEM ,IJAC, FUNC_CHEM ,IMAS,                   
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)        
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMSDIRK: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMSDIRK(N,FCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC, MAS ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)
+C ----------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS 
+C *** *** *** *** *** *** *** *** *** *** *** *** *** 
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(1),RelTol(1),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL IMPLCT,JBAND,ARRET
+      EXTERNAL FCN,JAC,MAS
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS 
+C *** *** *** *** *** *** ***
+       NFCN=0
+       NJAC=0
+       NSTEP=0
+       NACCPT=0
+       NREJCT=0
+       NDEC=0
+       NSOL=0
+       ARRET=.FALSE.
+C -------- SWITCH FOR TRANSFORMATION OF JACOBIAN TO HESS_CHEM FORM ---
+      NHESS1 = 0         ! ADRIAN
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(2).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NIT    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF(IWORK(3).EQ.0)THEN
+         NIT=8
+      ELSE
+         NIT=IWORK(3)
+         IF(NIT.LE.0)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- METH    SWITCH FOR THE COEFFICIENTS OF THE METHOD 
+      METH = 2
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0  
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.1.D-19.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 20 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      IF(WORK(2).EQ.0.D0)THEN
+         SAFE=0.9D0
+      ELSE
+         SAFE=WORK(2)
+         IF(SAFE.LE..001D0.OR.SAFE.GE.1.D0)THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(2)=',WORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(WORK(3).EQ.0.D0)THEN
+         THET=0.001D0
+      ELSE
+         THET=WORK(3)
+      END IF
+C --- FNEWT   STOPPING CRIERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+      IF(WORK(4).EQ.0.D0)THEN
+         FNEWT=0.03D0
+      ELSE
+         FNEWT=WORK(4)
+      END IF
+C --- QUOT1 AND QUOT2: IF QUOT1 < HNEW/HOLD < QUOT2, STEP SIZE = CONST.
+      IF(WORK(5).EQ.0.D0)THEN
+         QUOT1=1.D0
+      ELSE
+         QUOT1=WORK(5)
+      END IF
+      IF(WORK(6).EQ.0.D0)THEN
+         QUOT2=1.2D0
+      ELSE
+         QUOT2=WORK(6)
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(7).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(7)
+      END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO 15 I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+  15      CONTINUE
+      END IF
+
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- IMPLICIT, BANDED OR NOT ?
+      IMPLCT=IMAS.NE.0
+      ARRET=.FALSE.
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN 
+         LDJAC=N
+C -- MATRIX E FOR LINEAR ALGEBRA
+         LDE=N
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 1'
+      ELSE
+          LDMAS=0
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYHAT=8
+      IEZ=IEYHAT+N
+      IEY0=IEZ+N
+      IEZ1=IEY0+N
+      IEZ2=IEZ1+N
+      IEZ3=IEZ2+N
+      IEZ4=IEZ3+N
+      IEZ5=IEZ4+N
+      IESCAL=IEZ5+N
+      IEF1=IESCAL+N
+      IEG1=IEF1+N
+      IEH1=IEG1+N
+      IEJAC=IEH1+N
+      IEMAS=IEJAC+N*LDJAC
+      IEE=IEMAS+N*LDMAS
+
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+N*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=5
+      IEHES=IEIP+N
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEHES+N-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C --------- CONTROL OF LENGTH OF COMMON BLOCK "CONT" -------
+      IF(LRCONT.LT.(5*N+2))THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR RCONT, MIN. LRCONT=',5*N+2
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,JBAND,LDJAC,LDE,LDMAS2,
+     &   WORK(IEYHAT),WORK(IEZ),WORK(IEY0),WORK(IEZ1),WORK(IEZ2),
+     &   WORK(IEZ3),WORK(IEZ4),WORK(IEZ5),WORK(IESCAL),WORK(IEF1),
+     &   WORK(IEG1),WORK(IEH1),WORK(IEJAC),WORK(IEE),
+     &   WORK(IEMAS),IWORK(IEIP),IWORK(IEHES))
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,BANDED,LDJAC,LE,LDMAS,
+     &   YHAT,Z,Y0,Z1,Z2,Z3,Z4,Z5,SCAL,F1,G1,H1,FJAC,E,FMAS,IP,IPHES)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR SDIRK4
+C     PARAMETERS SAME AS IN SDIRK4 WITH WORKSPACE ADDED 
+C ---------------------------------------------------------- 
+C         DECLARATIONS 
+C ---------------------------------------------------------- 
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      KPP_REAL Y(N),YHAT(N),Z(N),Y0(N),Z1(N),Z2(N),Z3(N),Z4(N),Z5(N)
+      KPP_REAL SCAL(N),F1(N),G1(N),H1(N)
+      KPP_REAL FJAC(LU_NONZERO),E(LU_NONZERO),FMAS(LDMAS,N)
+      KPP_REAL AbsTol(1),RelTol(1)
+      INTEGER IP(N),IPHES(N)
+      LOGICAL REJECT,FIRST,IMPLCT,BANDED,CALJAC,NEWTRE
+      COMMON /CONT/NN,NN2,NN3,NN4,XOLD,HSOL,CONT(5*NVAR)
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      EXTERNAL MAS, FCN, JAC
+
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+
+C --------- DUPLIFY N FOR COMMON BLOCK CONT -----
+      NN=N
+      NN2=2*N
+      NN3=3*N
+      NN4=4*N
+
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF(IMPLCT) CALL MAS(N,FMAS,LDMAS)
+
+C ---------- CONSTANTS ---------
+      MBDIAG=MUMAS+1
+      IF (METH.EQ.2) THEN
+C ---------- METHOD WITH GAMMA = 4/15 ---------------
+          GAMMA=4.0D0/15.0D0
+          C2=23.0D0/30.0D0
+          C3=17.0D0/30.0D0
+          C4=2881.0D0/28965.0D0+GAMMA
+          ALPH21=15.0D0/8.0D0
+          ALPH31=1577061.0D0/922880.0D0
+          ALPH32=-23427.0D0/115360.0D0
+          ALPH41=647163682356923881.0D0/2414496535205978880.0D0
+          ALPH42=-593512117011179.0D0/3245291041943520.0D0
+          ALPH43=559907973726451.0D0/1886325418129671.0D0
+          ALPH51=724545451.0D0/796538880.0D0
+          ALPH52=-830832077.0D0/267298560.0D0
+          ALPH53=30957577.0D0/2509272.0D0
+          ALPH54=-69863904375173.0D0/6212571137048.0D0
+          E1=7752107607.0D0/11393456128.0D0
+          E2=-17881415427.0D0/11470078208.0D0
+          E3=2433277665.0D0/179459416.0D0
+          E4=-96203066666797.0D0/6212571137048.0D0
+          D11= 24.74416644927758D0
+          D12= -4.325375951824688D0
+          D13= 41.39683763286316D0
+          D14= -61.04144619901784D0
+          D15= -3.391332232917013D0
+          D21= -51.98245719616925D0
+          D22= 10.52501981094525D0
+          D23= -154.2067922191855D0
+          D24= 214.3082125319825D0
+          D25= 14.71166018088679D0
+          D31= 33.14347947522142D0
+          D32= -19.72986789558523D0
+          D33= 230.4878502285804D0
+          D34= -287.6629744338197D0
+          D35= -18.99932366302254D0
+          D41= -5.905188728329743D0
+          D42= 13.53022403646467D0
+          D43= -117.6778956422581D0
+          D44= 134.3962081008550D0
+          D45= 8.678995715052762D0
+         ETA1=23.D0/8.D0
+         ANU1= 0.9838473040915402D0
+         ANU2= 0.3969226768377252D0
+         AMU1= 0.6563374010466914D0
+         AMU3= 0.3372498196189311D0
+      ELSE
+         PRINT *, 'WRONG  CHOICE OF <METH>'
+      END IF
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAX1=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAX1) 
+      H=SIGN(H,POSNEG) 
+      HOLD=H
+      CFAC=SAFE*(1+2*NIT)
+      NEWTRE=.FALSE.
+      REJECT=.FALSE.
+      FIRST=.TRUE.
+      FACCO1=1.D0
+      FACCO2=1.D0
+      FACCO3=1.D0
+      FACCO4=1.D0
+      FACCO5=1.D0
+      NSING=0
+      XOLD=X
+      IF (ITOL.EQ.0) THEN
+          DO 8 I=1,N
+   8      SCAL(I)=1.D0 / ( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+      ELSE
+          DO 9 I=1,N
+   9      SCAL(I)=1.D0 / ( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+      END IF
+
+C --- BASIC INTEGRATION STEP  
+  10  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      CALL JAC(N,X,Y,FJAC)
+      CALJAC=.TRUE.
+  20  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+C *** *** *** *** *** *** ***
+      FAC1=1.D0/(H*GAMMA)
+      IF (IMPLCT) THEN
+         print *, 'IMPLCT 4'
+      ELSE  ! EXPLICIT SYSTEM
+C --- THE MATRIX E (MAS=IDENTITY, JACOBIAN A FULL MATRIX)
+c         DO 526 J=1,N
+c           DO 525 I=1,N
+c 525         E(I,J)=-FJAC(I,J)
+c 526       E(J,J)=E(J,J)+FAC1
+c         CALL DEC(N,LE,E,IP,IER)
+          DO K=1,LU_NONZERO
+             E(K) = -FJAC(K)
+          END DO
+          DO I=1,N
+             IDG = LU_DIAG(I)
+             E(IDG) = E(IDG) + FAC1
+          END DO
+          CALL KppDecomp ( E, IER)
+          
+         IF (IER.NE.0) GOTO 79 
+      END IF
+      NDEC=NDEC+1
+  30  CONTINUE
+
+      IF (NSTEP.GT.NMAX.OR.X+.1D0*H.EQ.X.OR.ABS(H).LE.UROUND) GOTO 79
+      XPH=X+H
+C --- LOOP FOR THE 5 STAGES
+      FACCO1=DMAX1(FACCO1,UROUND)**0.8D0
+      FACCO2=DMAX1(FACCO2,UROUND)**0.8D0
+      FACCO3=DMAX1(FACCO3,UROUND)**0.8D0
+      FACCO4=DMAX1(FACCO4,UROUND)**0.8D0
+      FACCO5=DMAX1(FACCO5,UROUND)**0.8D0
+
+C *** *** *** *** *** *** ***
+C  STARTING VALUES FOR NEWTON ITERATION
+C *** *** *** *** *** *** ***
+      DO 59 ISTAGE=1,5
+      IF (ISTAGE.EQ.1) THEN
+          XCH=X+GAMMA*H
+          IF (FIRST.OR.NEWTRE) THEN
+              DO 132 I=1,N
+ 132          Z(I)=0.D0
+          ELSE
+              S=1.D0+GAMMA*H/HOLD
+              DO 232 I=1,N
+c  232          Z(I) = 0.D0
+ 232          Z(I)=S*(CONT(I+NN)+S*(CONT(I+NN2)+S*(CONT(I+NN3)
+     &             +S*CONT(I+NN4))))-YHAT(I)
+
+          END IF
+          DO 31 I=1,N
+  31      G1(I)=0.D0 
+          FACCON=FACCO1
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          XCH=X+C2*H
+          DO 131 I=1,N
+          Z1I=Z1(I)
+          Z(I)=ETA1*Z1I
+ 131      G1(I)=ALPH21*Z1I
+          FACCON=FACCO2
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          XCH=X+C3*H
+          DO 231 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z(I)=ANU1*Z1I+ANU2*Z2I
+ 231      G1(I)=ALPH31*Z1I+ALPH32*Z2I
+          FACCON=FACCO3
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          XCH=X+C4*H
+          DO 331 I=1,N
+          Z1I=Z1(I)
+          Z3I=Z3(I)
+          Z(I)=AMU1*Z1I+AMU3*Z3I
+ 331      G1(I)=ALPH41*Z1I+ALPH42*Z2(I)+ALPH43*Z3I
+          FACCON=FACCO4
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          XCH=XPH
+          DO 431 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z(I)=E1*Z1I+E2*Z2I+E3*Z3I+E4*Z4I
+          YHAT(I)=Z(I)
+ 431      G1(I)=ALPH51*Z1I+ALPH52*Z2I+ALPH53*Z3I+ALPH54*Z4I
+          FACCON=FACCO5
+      END IF
+
+
+
+C *** *** *** *** *** *** *** *** *** *** ***
+C  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+C *** *** *** *** *** *** *** *** *** *** ***
+            NEWT=0
+            THETA=ABS(THET)
+            IF (REJECT) THETA=2*ABS(THET)
+  40        CONTINUE
+            IF (NEWT.GE.NIT) THEN
+                H=H/2.D0
+                REJECT=.TRUE.
+                NEWTRE=.TRUE.
+                IF (CALJAC) GOTO 20
+                GOTO 10
+            END IF
+
+C ---     COMPUTE THE RIGHT-HAND SIDE
+            DO 41 I=1,N
+            H1(I)=G1(I)-Z(I)
+  41        CONT(I)=Y(I)+Z(I)
+            CALL FCN(N,XCH,CONT,F1)
+            NFCN=NFCN+1
+
+C ---     KppSolve THE LINEAR SYSTEMS
+            IF (IMPLCT) THEN
+                print *, 'IMPLCT 2'
+            ELSE
+                DO 345 I=1,N
+ 345            F1(I)=H1(I)*FAC1+F1(I)
+C                CALL SOL(N,LE,E,F1,IP)
+                CALL KppSolve(E, F1)
+            END IF
+            NEWT=NEWT+1
+            DYNO=0.D0
+C --- NORM 2 ---
+            DO 57 I=1,N
+  57        DYNO=DYNO+(F1(I)*SCAL(I))**2
+            DYNO=DSQRT(DYNO/N)
+C --- NORM INF ---
+C            DO 57 I=1,N
+C  57        DYNO=DMAX1( DYNO, DABS(F1(I)*SCAL(I)) )
+
+
+C ---     BAD CONVERGENCE OR NUMBER OF ITERATIONS TO LARGE
+            IF (NEWT.GE.2.AND.NEWT.LT.NIT) THEN
+                THETA=DYNO/DYNOLD
+                IF (THETA.LT.0.99D0) THEN
+                    FACCON=THETA/(1.0D0-THETA)
+                    DYTH=FACCON*DYNO*THETA**(NIT-1-NEWT)
+                    QNEWT=DMAX1(1.0D-4,DMIN1(16.0D0,DYTH/FNEWT))
+                    IF (QNEWT.GE.1.0D0) THEN
+                         H=.8D0*H*QNEWT**(-1.0D0/(NIT-NEWT))
+                         REJECT=.TRUE.
+                         NEWTRE=.TRUE.
+                         IF (CALJAC) GOTO 20
+                         GOTO 10
+                    END IF
+                ELSE
+                    NEWTRE=.TRUE.
+                    GOTO 78
+                END IF
+            END IF
+            DYNOLD=DYNO
+            DO 58 I=1,N
+  58        Z(I)=Z(I)+F1(I)
+            NSOL=NSOL+1
+            IF (FACCON*DYNO.GT.FNEWT) GOTO 40
+
+C --- END OF SIMPILFIED NEWTON
+      IF (ISTAGE.EQ.1) THEN
+          DO I=1,N
+            Z1(I) = Z(I)
+          END DO  
+          FACCO1=FACCON
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          DO I=1,N
+            Z2(I) = Z(I)
+          END DO  
+          FACCO2=FACCON
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          DO I=1,N
+            Z3(I) = Z(I)
+          END DO  
+          FACCO3=FACCON
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          DO I=1,N
+            Z4(I) = Z(I)
+          END DO  
+          FACCO4=FACCON
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          DO I=1,N
+            Z5(I) = Z(I)
+          END DO  
+          FACCO5=FACCON
+      END IF
+  59  CONTINUE
+
+
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION  
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 3'
+      ELSE
+          DO 461 I=1,N 
+ 461      CONT(I)=FAC1*(Z5(I)-YHAT(I))
+      END IF
+
+      CALL KppSolve(E, CONT)
+
+      ERR=0.D0
+C ---- NORM 2 ---
+      DO 64 I=1,N
+  64  ERR=ERR+(CONT(I)*SCAL(I))**2
+      ERR=DMAX1(DSQRT(ERR/N),1.D-10)
+
+C ---- NORM INF ---
+C      DO 64 I=1,N
+c  64  ERR=DMAX1( ERR, DABS( CONT(I)*SCAL(I) ) )
+
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .25<=HNEW/H<=10.
+      FAC=DMIN1(SAFE,CFAC/(NEWT+2*NIT))
+      QUOT=DMAX1(.25D0,DMIN1(10.D0,(ERR)**.25D0/FAC))
+      HNEW= H/QUOT
+
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LT.1.D0) THEN
+C --- STEP IS ACCEPTED  
+         FIRST=.FALSE.
+         NACCPT=NACCPT+1
+         HOLD=H
+         XOLD=X
+C --- COEFFICIENTS FOR CONTINUOUS SOLUTION
+         DO 74 I=1,N 
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z5I=Z5(I)
+         CONT(I)=Y(I)
+         Y(I)=Y(I)+Z5I  
+         CONT(I+NN) =D11*Z1I+D12*Z2I+D13*Z3I+D14*Z4I+D15*Z5I
+         CONT(I+NN2)=D21*Z1I+D22*Z2I+D23*Z3I+D24*Z4I+D25*Z5I
+         CONT(I+NN3)=D31*Z1I+D32*Z2I+D33*Z3I+D34*Z4I+D35*Z5I
+         CONT(I+NN4)=D41*Z1I+D42*Z2I+D43*Z3I+D44*Z4I+D45*Z5I
+         YHAT(I)=Z5I
+         IF (ITOL.EQ.0) THEN
+           SCAL(I)=1.D0/( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+         ELSE
+           SCAL(I)=1.D0/( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+         END IF
+  74     CONTINUE
+         X=XPH 
+         CALJAC=.FALSE.
+         IF ((X-XEND)*POSNEG+UROUND.GT.0.D0) THEN
+            H=HOPT
+            IDID=1
+            RETURN
+         END IF
+         IF (IJAC.EQ.0) CALL FCN(N,X,Y,Y0)
+         NFCN=NFCN+1
+         HNEW=POSNEG*DMIN1(DABS(HNEW),HMAX1)
+         HOPT=HNEW
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H)) 
+         REJECT=.FALSE.
+         NEWTRE=.FALSE.
+         IF ((X+HNEW/QUOT1-XEND)*POSNEG.GT.0.D0) THEN
+            H=XEND-X
+         ELSE
+            QT=HNEW/H
+            IF (THETA.LE.THET.AND.QT.GE.QUOT1.AND.QT.LE.QUOT2) GOTO 30
+            H = HNEW 
+         END IF
+         IF (THETA.LE.THET) GOTO 20
+         GOTO 10
+
+      ELSE
+C --- STEP IS REJECTED  
+         REJECT=.TRUE.
+         IF (FIRST) THEN
+             H=H/10.D0
+         ELSE
+             H=HNEW
+         END IF
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         IF (CALJAC) GOTO 20
+         GOTO 10
+      END IF
+
+C --- UNEXPECTED STEP-REJECTION
+  78  CONTINUE
+      IF (IER.NE.0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, IER=',IER,' X=',X,' H=',H
+          NSING=NSING+1
+          IF (NSING.GE.6) GOTO 79
+      END IF
+      H=H*0.5D0
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 20
+      GOTO 10
+
+C --- FAIL EXIT
+  79  WRITE (6,979) X,H,IER
+ 979  FORMAT(' EXIT OF SDIRK4 AT X=',D14.7,'   H=',D14.7,'   IER=',I4)
+      IDID=-1
+      RETURN
+      END
+C
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk.f90	(revision 3477)
@@ -0,0 +1,1258 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SDIRK - Singly-Diagonally-Implicit Runge-Kutta methods                 !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2005                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp,    &
+               KppSolve, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, Ierr_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: Ierr_U
+
+   INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+   INTEGER       :: ICNTRL(20), ISTATUS(20), Ierr
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   !~~~> fine-tune the integrator:
+   ICNTRL(2) = 0	! 0 - vector tolerances, 1 - scalar tolerances
+   ICNTRL(6) = 0	! starting values of Newton iterations: interpolated (0), zero (1)
+  ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+   
+   
+   T1 = TIN; T2 = TOUT
+   CALL SDIRK( NVAR,T1,T2,VAR,RTOL,ATOL,          &
+               RCNTRL,ICNTRL,RSTATUS,ISTATUS,Ierr )
+
+   !~~~> Debug option: print number of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! PRINT*,'NSTEPS=',ISTATUS(Nstp), '(',Ntotal,')','   O3=',VAR(ind_O3), &
+   !       '  NO2=',VAR(ind_NO2)
+
+   IF (Ierr < 0) THEN
+        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (Ierr=',Ierr,')'
+   ENDIF
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(Ierr_U))    Ierr_U       = Ierr
+
+   END SUBROUTINE INTEGRATE
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK(N, Tinitial, Tfinal, Y, RelTol, AbsTol,     &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                 
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(NVAR), AbsTol(NVAR), RCNTRL(20)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+! Local variables      
+      LOGICAL :: StartNewton
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+       
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+      Ierr = 0
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps=ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+
+!~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+    IF (Ierr < 0) RETURN
+
+    CALL SDIRK_Integrator( N,Tinitial,Tfinal,Y,Ierr )
+
+
+   !END SUBROUTINE SDIRK
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  PROCEDURES INTERNAL TO SDIRK
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_Integrator( N,Tinitial,Tfinal,Y,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,Smax), G(NVAR), TMP(NVAR),        &   
+                       NewtonRate, SCAL(NVAR), RHS(NVAR),       &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew,Tdirection,      &
+                       NewtonIncrement, NewtonIncrementOld
+      INTEGER :: j, IER, istage, NewtonIter, IP(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL FJAC(NVAR,NVAR),  E(NVAR,NVAR)
+#else      
+      KPP_REAL FJAC(LU_NONZERO), E(LU_NONZERO)
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU =.FALSE.
+      SkipJac = .FALSE.
+      Reject=.FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj)
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+	       IF (StartNewton) THEN
+                  CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+	       END IF
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,RHS)	! RHS <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            RHS(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*RHS(1:N)
+	    CALL WSCAL(N, H*rkGamma, RHS, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, RHS, 1)
+            CALL WAXPY (N, ONE, G,1, RHS,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( H, N, E, IP, IER, RHS )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, RHS, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+RHS(:)
+            CALL WAXPY(N,ONE,RHS,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT NewtonLoop
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of implified Newton iterations
+
+ 
+   END DO stages
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,TMP)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,TMP,1)
+      END DO  
+
+      CALL SDIRK_Solve( H, N, E, IP, IER, TMP )
+      CALL SDIRK_ErrorNorm(N, TMP, SCAL, Err)
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+	 
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject  = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, N, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .TRUE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = RHS
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+#ifdef FULL_ALGEBRA  
+      CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+      CALL KppSolve(E, RHS)
+#endif
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRK ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+      IMPLICIT NONE
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+      
+      TIME = Told
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+      USE KPP_ROOT_Jacobian
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+      IMPLICIT NONE
+  
+      KPP_REAL ::  T, Told
+      KPP_REAL ::  Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO i=1,NVAR
+          JV(i,j) = 0.0D0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+
+      END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.c	(revision 3477)
@@ -0,0 +1,1705 @@
+
+#define MAX(a,b) ( ((a) >= (b)) ? (a):(b)  )
+#define MIN(b,c) ( ((b) < (c))  ? (b):(c)  )
+#define ABS(x)	 ( ((x) >= 0 )  ? (x):(-x) )
+#define SIGN(x,y)( ( (x*y) >= 0 ) ?(x):(-x) )
+#define SQRT(d)  ( pow((d),0.5)  )
+
+/* Numerical Constants */
+#define ZERO	    (KPP_REAL)0.0
+#define ONE	    (KPP_REAL)1.0
+#define HALF        (KPP_REAL)0.5
+#define DeltaMin    (KPP_REAL)1.0e-5
+enum boolean { FALSE=0, TRUE=1 };
+  
+/*~~~>  Statistics on the work performed by the SDIRK method */
+enum statistics { Nfun=1, Njac=2, Nstp=3, Nacc=4, Nrej=5, Ndec=6, Nsol=7, 
+		  Nsng=8, Ntexit=1, Nhexit=2, Nhnew=3 };
+
+/*~~~>  SDIRK method coefficients, up to 5 stages */
+int Smax = 5;
+enum ros_Params { S2A=1, S2B=2, S3A=3, S4A=4, S4B=5 };
+KPP_REAL rkGamma, rkA[5][5], rkB[5], rkC[5], rkD[5], rkE[5], 
+  rkBhat[5], rkELO, rkAlpha[5][5], rkTheta[5][5];
+int sdMethod, rkS; /* The number of stages */
+
+/*~~~>  Checkpoints in memory buffers */
+int stack_ptr = -1; /* last written entry in checkpoint */
+KPP_REAL *chk_H, *chk_T;
+KPP_REAL **chk_Y;
+KPP_REAL ***chk_Z;
+int **chk_P;
+#ifdef FULL_ALGEBRA
+  KPP_REAL ***chk_J;
+#else
+  KPP_REAL **chk_J;
+#endif
+
+/* Function Headers */
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] );
+int SDIRKADJ( int N, int NADJ, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[],
+	      KPP_REAL Lambda[][NVAR], KPP_REAL RelTol[], KPP_REAL AbsTol[], 
+	      KPP_REAL RelTol_adj[][NVAR], KPP_REAL AbsTol_adj[][NVAR], 
+	      KPP_REAL RCNTRL[], int ICNTRL[], KPP_REAL RSTATUS[], 
+	      int ISTATUS[]);
+int SDIRK_FwdInt( int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+		  KPP_REAL Hmax, KPP_REAL Hmin, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+		  int ISTATUS[], KPP_REAL RSTATUS[], int Max_no_steps, 
+		  int NewtonMaxit, KPP_REAL NewtonTol, KPP_REAL ThetaMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax, 
+		  KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int ITOL, 
+		  int SaveLU );
+int SDIRK_DadjInt( int N, int NADJ, KPP_REAL Lambda[][NVAR], int SaveLU, 
+		   int ISTATUS[], int ITOL, KPP_REAL AbsTol_adj[][NVAR], 
+		   KPP_REAL RelTol_adj[][NVAR], int NewtonMaxit,
+		   KPP_REAL ThetaMin, KPP_REAL NewtonTol, int DirectADJ );
+void SDIRK_AllocBuffers( int Max_no_steps, int rkS, int SaveLU );
+void SDIRK_FreeBuffers( int Max_no_steps, int SaveLU );
+void SDIRK_Push( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL Z[][NVAR], 
+		 KPP_REAL E[], int P[], int Max_no_steps, int SaveLU );
+void SDIRK_Pop( KPP_REAL* T, KPP_REAL* H, KPP_REAL* Y, KPP_REAL* Z, 
+		KPP_REAL* E, int* P, int SaveLU );
+void SDIRK_ErrorScale( int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+		       KPP_REAL Y[],KPP_REAL SCAL[]);
+KPP_REAL SDIRK_ErrorNorm( int N, KPP_REAL Y[], KPP_REAL SCAL[] );
+int SDIRK_ErrorMsg( int code, KPP_REAL T, KPP_REAL H );
+void SDIRK_PrepareMatrix( KPP_REAL H, KPP_REAL T, KPP_REAL Y[], KPP_REAL FJAC[],
+			  int SkipJac, int SkipLU, KPP_REAL E[], int IP[], 
+			  int Reject, int ISING, int ISTATUS[] );
+void SDIRK_Solve ( char Transp, KPP_REAL H, int N, KPP_REAL E[], 
+		   int IP[], int ISING, KPP_REAL RHS[], int ISTATUS[] );
+void Sdirk4a();
+void Sdirk4b();
+void Sdirk2a();
+void Sdirk2b();
+void Sdirk3a();
+void FUN_CHEM( KPP_REAL T, KPP_REAL Y[], KPP_REAL P[] );
+void JAC_CHEM( KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[] );
+KPP_REAL WLAMCH( char C );
+void Set2Zero( int N, KPP_REAL Y[] );
+void WAXPY( int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], 
+	    int incY );
+void WADD( int N, KPP_REAL Y[], KPP_REAL Z[], KPP_REAL TMP[] );
+void WSCAL( int N, KPP_REAL Alpha, KPP_REAL X[], int incX );
+void JacTR_SP_Vec( KPP_REAL Jac[], KPP_REAL Fcn[], KPP_REAL K[] );
+void KppSolve( KPP_REAL A[], KPP_REAL b[] );
+void KppSolveTR( KPP_REAL JVS[], KPP_REAL X[], KPP_REAL XX[] );
+int KppDecomp( KPP_REAL A[] );
+void Update_SUN();
+void Update_RCONST();
+void Fun( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+void Jac_SP( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+void Set2Zero( int N, KPP_REAL Y[] );
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  //int Ntotal = 0;
+  KPP_REAL RCNTRL[20], RSTATUS[20], T1, T2;
+  int ICNTRL[20], ISTATUS[20], Ierr, i;
+
+  for(i=0; i<20; i++) {
+    ICNTRL[i] = 0;
+    RCNTRL[i] = (KPP_REAL)0.0;
+    ISTATUS[i] = 0;
+    RSTATUS[i] = (KPP_REAL)0.0;
+  }
+
+  /*~~~> fine-tune the integrator: */
+  ICNTRL[4] = 8;    /* Max no. of Newton iterations */
+  ICNTRL[6] = 1;   /* Adjoint solution by: 0=Newton, 1=direct */
+  ICNTRL[7] = 1;    /* Save fwd LU factorization: 0 = do *not* save, 1 = save */
+
+  /* If optional parameters are given, and if they are >0, 
+     then they overwrite default settings. */ 
+  //if(ICNTRL_U != NULL) { /* Check to see if ICNTRL_U is not NULL */
+  //  for(i=0; i<20; i++) {
+  //	if(ICNTRL_U[i] > 0)
+  //	  ICNTRL[i] = ICNTRL_U[i];
+  //  }
+  //}
+  //
+  //if(RCNTRL_U != NULL) { /* Check to see if RCNTRL_U is not NULL */
+  //  for(i=0; i<20; i++) {
+  //	if(RCNTRL_U[i] > 0)
+  //	  RCNTRL[i] = RCNTRL_U[i];
+  //  }
+  //}
+  
+  T1 = TIN; 
+  T2 = TOUT;
+  Ierr = SDIRKADJ( NVAR, NADJ, T1, T2, Y, Lambda, RTOL, ATOL, ATOL_adj, 
+		   RTOL_adj, RCNTRL, ICNTRL, RSTATUS, ISTATUS );
+
+  /*~~~> Debug option: number of steps */
+  // Ntotal = Ntotal + ISTATUS(Nstp)
+  // printf( "NSTEP=%d Ntotal=%d O3=%e NO2=%e\n", ISTATUS(Nstp), Ntotal, 
+  //          VAR(ind_O3), VAR(ind_NO2) );    
+
+  if (Ierr < 0)
+    printf("SDIRK: Unsuccessful exit at T=%f (Ierr=%d)\n", TIN, Ierr );
+   
+  /* if optional parameters are given for output they to return information */
+  //if(ISTATUS_U != NULL) { /* Check to see if ISTATUS_U is not NULL */
+  //	for(i=0; i<20; i++)
+  //	  ISTATUS_U[i] = ISTATUS[i];
+  //} 
+  //
+  //if(RSTATUS_U != NULL) { /* Check to see if RSTATUS_U is not NULL */
+  //	for(i=0; i<20; i++)
+  //	  RSTATUS_U[i] = RSTATUS[i];
+  //}
+  //
+  //Ierr_U = Ierr;
+  
+} /* END of SUBROUTINE INTEGRATE_ADJ */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRKADJ( int N, int NADJ, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[],
+	      KPP_REAL Lambda[][NVAR], KPP_REAL RelTol[], KPP_REAL AbsTol[], 
+	      KPP_REAL RelTol_adj[][NVAR], KPP_REAL AbsTol_adj[][NVAR], 
+	      KPP_REAL RCNTRL[], int ICNTRL[], KPP_REAL RSTATUS[], 
+	      int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+    Runge-Kutta (SDIRK) method.
+
+    This implementation is based on the book and the code Sdirk4:
+
+      E. Hairer and G. Wanner
+      "Solving ODEs II. Stiff and differential-algebraic problems".
+      Springer series in computational mathematics, Springer-Verlag, 1996.
+    This code is based on the SDIRK4 routine in the above book.
+
+    Methods:
+            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+
+    (C)  Adrian Sandu, July 2005
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    Revised by Philipp Miehe and Adrian Sandu, May 2006     
+    Translation F90 to C by Paul Eller, May 2007
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>   INPUT ARGUMENTS:
+
+-     Y[NVAR]    = vector of initial conditions (at T=Tinitial)
+-    [Tinitial,Tfinal]  = time range of integration
+     (if Tinitial>Tfinal the integration is performed backwards in time)
+-    RelTol, AbsTol = user precribed accuracy
+- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+                       returns Ydot = Y' = F(T,Y)
+- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+                       returns Jcb = dF/dY
+-    ICNTRL[1:20]    = integer inputs parameters
+-    RCNTRL[1:20]    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT ARGUMENTS:
+
+-    Y[NVAR]         -> vector of final states (at T->Tfinal)
+-    ISTATUS[0:19]   -> integer output parameters
+-    RSTATUS[0:19]   -> real output parameters
+-    Ierr            -> job status upon return
+                        success (positive value) or
+                        failure (negative value)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     INPUT PARAMETERS:
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    Note: For input parameters equal to zero the default values of the
+          corresponding variables are used.
+~~~>  
+    ICNTRL[0] = not used
+
+    ICNTRL[1] = 0: AbsTol, RelTol are NVAR-dimensional vectors
+              = 1: AbsTol, RelTol are scalars
+
+    ICNTRL[2] = Method
+
+    ICNTRL[3]  -> maximum number of integration steps
+        For ICNTRL[3]=0 the default value of 1500 is used
+        Note: use a conservative estimate, since the checkpoint
+              buffers are allocated to hold Max_no_steps
+
+    ICNTRL[4]  -> maximum number of Newton iterations
+        For ICNTRL[4]=0 the default value of 8 is used
+
+    ICNTRL[5]  -> starting values of Newton iterations:
+        ICNTRL[5]=0 : starting values are interpolated (the default)
+        ICNTRL[5]=1 : starting values are zero
+
+    ICNTRL[6]  -> method to solve ADJ equations:
+        ICNTRL[6]=0 : modified Newton re-using LU (the default)
+        ICNTRL[6]=1 : direct solution(additional one LU factorization per stage)
+
+    ICNTRL[7]  -> checkpointing the LU factorization at each step:
+        ICNTRL[7]=0 : do *not* save LU factorization (the default)
+        ICNTRL[7]=1 : save LU factorization
+        Note: if ICNTRL[6]=1 the LU factorization is *not* saved
+
+~~~>  Real parameters
+
+    RCNTRL[0]  -> Hmin, lower bound for the integration step size
+                  It is strongly recommended to keep Hmin = ZERO
+    RCNTRL[1]  -> Hmax, upper bound for the integration step size
+    RCNTRL[2]  -> Hstart, starting value for the integration step size
+
+    RCNTRL[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+    RCNTRL[4]  -> FacMax, upper bound on step increase factor (default=6)
+    RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+                 (default=0.1)
+    RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+                  than the predicted value  (default=0.9)
+    RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+                  than ThetaMin the Jacobian is not recomputed;
+                  (default=0.001)
+    RCNTRL[8]  -> NewtonTol, stopping criterion for Newton's method
+                  (default=0.03)
+    RCNTRL[9] -> Qmin
+    RCNTRL[10] -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+                  step size is kept constant and the LU factorization
+                  reused (default Qmin=1, Qmax=1.2)
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT PARAMETERS:
+
+    Note: each call to Rosenbrock adds the current no. of fcn calls
+      to previous value of ISTATUS[0], and similar for the other params.
+      Set ISTATUS[1:10] = 0 before call to avoid this accumulation.
+
+    ISTATUS[0] = No. of function calls
+    ISTATUS[1] = No. of jacobian calls
+    ISTATUS[2] = No. of steps
+    ISTATUS[3] = No. of accepted steps
+    ISTATUS[4] = No. of rejected steps (except at the beginning)
+    ISTATUS[5] = No. of LU decompositions
+    ISTATUS[6] = No. of forward/backward substitutions
+    ISTATUS[7] = No. of singular matrix decompositions
+
+    RSTATUS[0]  -> Texit, the time corresponding to the
+                   computed Y upon return
+    RSTATUS[1]  -> Hexit,last accepted step before return
+    RSTATUS[2]  -> Hnew, last predicted step before return
+        For multiple restarts, use Hnew as Hstart in the following run
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/* Local variables */     
+  KPP_REAL Hmin=0.0, Hmax=0.0, Hstart=0.0, Roundoff, FacMin=0.0, FacMax=0.0, 
+    FacSafe=0.0, FacRej=0.0, ThetaMin, NewtonTol,Qmin, Qmax;
+  int SaveLU, DirectADJ; /* Boolean variables */                 
+  int ITOL, NewtonMaxit, Max_no_steps=0, i, Ierr=0;
+
+  stack_ptr = -1;
+
+/*~~~>  Initialize statistics */
+  for(i=0; i<20; i++) {
+    ISTATUS[i] = 0;
+    RSTATUS[i] = ZERO;
+  }
+
+/*~~~>  For Scalar tolerances (ICNTRL[1] != 0)  the code uses AbsTol[0] 
+            and RelTol[0]
+	For Vector tolerances (ICNTRL[1] == 0) the code uses AbsTol[0:NVAR-1] 
+            and RelTol[0:NVAR-1]*/
+  if (ICNTRL[1]==0)
+    ITOL = 1;
+  else
+    ITOL = 0;
+
+/*~~~> ICNTRL(3) - method selection */
+  switch (ICNTRL[2]) {
+    case 0:
+    case 1:
+      Sdirk2a();
+      break;
+    case 2:
+      Sdirk2b();
+      break;
+    case 3:
+      Sdirk3a();
+      break;
+    case 4:
+      Sdirk4a();
+      break;
+    case 5:
+      Sdirk4b();
+      break;
+    default:
+      Sdirk2a();
+  }
+      
+/*~~~>   The maximum number of time steps admitted */
+  if (ICNTRL[3] == 0)
+    Max_no_steps = 200000;
+  else if (ICNTRL[3] > 0)
+    Max_no_steps = ICNTRL[3];
+  else {
+    printf("User-selected ICNTRL(4)=%d", ICNTRL[3]);
+    Ierr = SDIRK_ErrorMsg(-1,Tinitial,ZERO);
+  }
+
+/*~~~>The maximum number of Newton iterations admitted */
+  if(ICNTRL[4]==0)
+    NewtonMaxit = 8;
+  else {
+    NewtonMaxit=ICNTRL[4];
+    if(NewtonMaxit <=0) {
+      printf("User-selected ICNTRL(5)=%d", ICNTRL[4] );
+      Ierr = SDIRK_ErrorMsg(-2,Tinitial,ZERO);
+    }
+  }
+
+/*~~~> Solve ADJ equations directly or by Newton iterations */
+  DirectADJ = (ICNTRL[6] == 1);
+ 
+/*~~~> Save or not the forward LU factorization */
+  SaveLU = ((ICNTRL[7] != 0) && (DirectADJ == 0));
+
+/*~~~>  Unit roundoff (1+Roundoff>1) */
+  Roundoff = WLAMCH('E');
+
+/*~~~>  Lower bound on the step size: (positive value) */
+  if (RCNTRL[0] == ZERO)
+    Hmin = ZERO;
+  else if (RCNTRL[0] > ZERO)
+    Hmin = RCNTRL[0];
+  else {
+    printf("User-selected RCNTRL[0]=%f", RCNTRL[0]);
+    Ierr = SDIRK_ErrorMsg(-3,Tinitial,ZERO);
+  }
+   
+/*~~~>  Upper bound on the step size: (positive value) */
+  if (RCNTRL[1] == ZERO)
+    Hmax = ABS(Tfinal-Tinitial);
+  else if (RCNTRL[1] > ZERO)
+    Hmax = MIN( ABS(RCNTRL[1]), ABS(Tfinal-Tinitial) );
+  else {
+    printf("User-selected RCNTRL[1]=%f", RCNTRL[1]);
+    Ierr = SDIRK_ErrorMsg(-3,Tinitial,ZERO);
+  }
+
+/*~~~>  Starting step size: (positive value) */
+  if (RCNTRL[2] == ZERO)
+    Hstart = MAX( Hmin, Roundoff);
+  else if (RCNTRL[2] > ZERO)
+    Hstart = MIN( ABS(RCNTRL[2]), ABS(Tfinal-Tinitial) );
+  else {
+    printf("User-selected Hstart: RCNTRL[2]=%f", RCNTRL[2]);
+    Ierr = SDIRK_ErrorMsg(-3,Tinitial,ZERO);
+  }
+
+/*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax */
+  if (RCNTRL[3] == ZERO)
+    FacMin = (KPP_REAL)0.2;
+  else if (RCNTRL[3] > ZERO)
+    FacMin = RCNTRL[3];
+  else {
+    printf("User-selected FacMin: RCNTRL[3]=%f", RCNTRL[3]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+   
+  if (RCNTRL[4] == ZERO)
+    FacMax = (KPP_REAL)10.0;
+  else if (RCNTRL[4] > ZERO)
+    FacMax = RCNTRL[4];
+  else {
+    printf("User-selected FacMax: RCNTRL[4]=%f", RCNTRL[4]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+
+/*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+  if (RCNTRL[5] == ZERO)
+    FacRej = (KPP_REAL)0.1;
+  else if (RCNTRL[5] > ZERO)
+    FacRej = RCNTRL[5];
+  else {
+    printf("User-selected FacRej: RCNTRL[5]=%f", RCNTRL[5]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+
+/* ~~~>   FacSafe: Safety Factor in the computation of new step size  */
+  if (RCNTRL[6] == ZERO)
+    FacSafe = (KPP_REAL)0.9;
+  else if (RCNTRL[6] > ZERO)
+    FacSafe = RCNTRL[6];
+  else {
+    printf("User-selected FacSafe: RCNTRL[6]=%f", RCNTRL[6]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+
+/*~~~> ThetaMin: decides whether the Jacobian should be recomputed */
+  if (RCNTRL[7] == ZERO)
+    ThetaMin = (KPP_REAL)1.0e-03;
+  else
+    ThetaMin = RCNTRL[7];
+
+/*~~~> Stopping criterion for Newton's method */
+  if (RCNTRL[8] == ZERO)
+    NewtonTol = (KPP_REAL)3.0e-02;
+  else
+    NewtonTol = RCNTRL[8];
+
+/* ~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST. */
+  if (RCNTRL[9] == ZERO)
+    Qmin = ONE;
+  else
+    Qmin = RCNTRL[9];
+
+  if (RCNTRL[10] == ZERO)
+    Qmax = (KPP_REAL)1.2;
+  else
+    Qmax = RCNTRL [10];
+
+/* ~~~>  Check if tolerances are reasonable */
+  if (ITOL == 0) {
+    if ((AbsTol[0]<=ZERO || RelTol[0])<=(((KPP_REAL)10.0)*Roundoff))
+      Ierr = SDIRK_ErrorMsg(-5,Tinitial,ZERO);
+  }
+  else {
+    for (i = 0; i < N; i++) {
+      if ((AbsTol[i]<=ZERO)||(RelTol[i]<=((KPP_REAL)10.0)*Roundoff))
+	Ierr = SDIRK_ErrorMsg(-5,Tinitial,ZERO);
+    }
+  }
+
+  if (Ierr < 0)
+    return Ierr;
+    
+/*~~~>  Allocate memory buffers */
+  SDIRK_AllocBuffers(Max_no_steps, rkS, SaveLU);
+
+/*~~~>  Call forward integration */
+  Ierr = SDIRK_FwdInt( N, Tinitial, Tfinal, Y, Hmax, Hmin, Hstart, Roundoff, 
+		       AbsTol, RelTol, ISTATUS, RSTATUS, Max_no_steps, 
+		       NewtonMaxit, NewtonTol, ThetaMin, FacSafe, FacMin, 
+		       FacMax, FacRej, Qmin, Qmax, ITOL, SaveLU );
+
+/*~~~>  Call adjoint integration */  
+  Ierr = SDIRK_DadjInt( N, NADJ, Lambda, SaveLU, ISTATUS, ITOL, AbsTol_adj, 
+			RelTol_adj, NewtonMaxit, ThetaMin, NewtonTol, 
+			DirectADJ );
+
+/*~~~>  Free memory buffers */ 
+  SDIRK_FreeBuffers(Max_no_steps, SaveLU);
+
+  return Ierr;
+
+} /* End of main SDIRK_ADJ */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_FwdInt( int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+		  KPP_REAL Hmax, KPP_REAL Hmin, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+		  int ISTATUS[], KPP_REAL RSTATUS[], int Max_no_steps, 
+		  int NewtonMaxit, KPP_REAL NewtonTol, KPP_REAL ThetaMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax, 
+		  KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int ITOL, 
+		  int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      
+/*~~~> Local variables: */   
+  KPP_REAL Z[Smax][NVAR], G[NVAR], TMP[NVAR], NewtonRate, SCAL[NVAR], RHS[NVAR],
+    T, H, Theta=0.0, Hratio, NewtonPredictedErr, Qnewton, Err, Fac, Hnew, 
+    Tdirection, NewtonIncrement, NewtonIncrementOld=0.0;
+  int i, j, IER=0, istage, NewtonIter, IP[NVAR];
+
+  /*Boolean Variables*/
+  int Reject, FirstStep, SkipJac, SkipLU, NewtonDone, CycleTloop;
+      
+#ifdef FULL_ALGEBRA      
+  KPP_REAL FJAC[NVAR][NVAR], E[NVAR][NVAR];
+#else      
+  KPP_REAL FJAC[LU_NONZERO], E[LU_NONZERO];
+#endif
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~~>   Initializations              */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  T = Tinitial;
+  Tdirection = SIGN(ONE, Tfinal-Tinitial);
+  H = MAX(ABS(Hmin), ABS(Hstart));
+  if (ABS(H) <= ((KPP_REAL)10.0 * Roundoff))
+    H = (KPP_REAL)(1.0e-06);
+  H = MIN(ABS(H), Hmax);
+  H = SIGN(H, Tdirection);
+  SkipLU = 0;
+  SkipJac = 0;
+  Reject = 0;
+  FirstStep = 1;
+  CycleTloop = 0;
+
+  SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Time loop begins                */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  while((Tfinal-T)*Tdirection - Roundoff > ZERO) {  /* Tloop */
+
+  /*~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition */
+    if (SkipLU == 0) { /* This time around skip the Jac update and LU */
+      SDIRK_PrepareMatrix( H, T, Y, FJAC, SkipJac, SkipLU, E, IP, 
+	                   Reject, IER, ISTATUS);
+      if (IER != 0)
+	return SDIRK_ErrorMsg(-8, T, H);
+    }
+
+    if (ISTATUS[Nstp] > Max_no_steps)
+      return SDIRK_ErrorMsg(-6, T, H);
+
+    if ((T + ((KPP_REAL)0.1) * H == T) || (ABS(H) <= Roundoff)) {
+      return SDIRK_ErrorMsg(-7, T, H);
+    }
+
+    for (istage=0; istage < rkS; istage++) {  /*stages*/
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Simplified Newton iterations          */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+    /*~~~>  Starting values for Newton iterations */
+      Set2Zero(N, &Z[istage][0]);
+
+    /*~~~>   Prepare the loop-independent part of the right-hand side */
+      Set2Zero(N, G);
+      if (istage > 0) {
+	for (j=0; j < istage; j++) {
+	/* Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:)) */
+          WAXPY(N, rkTheta[j][istage], &Z[j][0], 1, G, 1);
+	/* Zi(:) = sum_j Alpha(i,j)*Zj(:) */
+	  WAXPY(N, rkAlpha[j][istage],&Z[j][0], 1, &Z[istage][0], 1);
+	}
+      }
+
+    /*~~~>  Initializations for Newton iteration */
+      NewtonDone = 0; /* false */
+      Fac = (KPP_REAL)0.5; /* Step reduction factor */
+
+      for (NewtonIter=0; NewtonIter<NewtonMaxit; NewtonIter++ ) { /*NewtonLoop*/
+      /*~~~>  Prepare the loop-dependent part of the right-hand side */
+	WADD(N, Y, &Z[istage][0], TMP); /* TMP <- Y + Zi */
+        FUN_CHEM(T+rkC[istage]*H, TMP, RHS); /* RHS <- Run(Y+Zi) */
+	ISTATUS[Nfun]++;
+      /* RHS[0:N-1] = G[0:N-1] - Z[istage][0:N-1] + (H*rkGamma)*RHS[1:N] */
+	WSCAL(N, H*rkGamma, RHS, 1);
+	WAXPY(N, -ONE, &Z[istage][0], 1, RHS, 1);
+	WAXPY(N, ONE, G, 1, RHS, 1 );
+
+      /*~~~>   Solve the linear system  */
+	SDIRK_Solve('N', H, N, E, IP, IER, RHS, ISTATUS);
+            
+      /*~~~>   Check convergence of Newton iterations */
+	NewtonIncrement = SDIRK_ErrorNorm(N, RHS, SCAL);
+	if (NewtonIter == 0) {
+	  Theta = ABS(ThetaMin);
+	  NewtonRate = (KPP_REAL)2.0;
+       	}
+	else {
+	  Theta = NewtonIncrement/NewtonIncrementOld;
+   	  if (Theta < (KPP_REAL)0.99) {
+	    NewtonRate = Theta/(ONE-Theta);
+	  /* Predict error at the end of Newton process */
+	    NewtonPredictedErr = (NewtonIncrement*pow(Theta,
+				 (NewtonMaxit - (NewtonIter+1))/(ONE - Theta)));
+	    if(NewtonPredictedErr >= NewtonTol) {
+	    /* Non-convergence of Newton: predicted error too large*/
+	      Qnewton = MIN((KPP_REAL)10.0, NewtonPredictedErr/NewtonTol);
+	      Fac = (KPP_REAL)0.8 * pow(Qnewton, (-ONE / (1 + NewtonMaxit - 
+							  NewtonIter + 1)));
+	      break;
+	    }
+	  }
+	  else  /* Non-convergence of Newton: Theta too large */ {
+	    break;
+	  }
+	}
+
+	NewtonIncrementOld = NewtonIncrement;
+
+      /* Update solution: Z(:) <-- Z(:)+RHS(:) */
+	WAXPY(N, ONE, RHS, 1, &Z[istage][0], 1);
+
+      /* Check error in Newton iterations */
+	NewtonDone=(NewtonRate*NewtonIncrement<=NewtonTol);
+	if (NewtonDone == 1)
+	  break;
+      } /* end NewtonLoop for */
+                      
+      if(NewtonDone == 0) {
+	H = Fac*H;
+	Reject = 1;
+	SkipJac = 1;
+	SkipLU = 0;
+        CycleTloop = 1;
+      } /* end if */
+
+      if (CycleTloop == 1) {
+	CycleTloop=0;
+	break;
+      }
+    /* End of implified Newton iterations */
+    } /* end stages for */
+
+    if (CycleTloop==0) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Error estimation      */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      ISTATUS[Nstp]++;
+      Set2Zero(N, TMP);
+
+      for (i=0; i<rkS; i++) {
+        if (rkE[i] != ZERO)
+	  WAXPY(N, rkE[i], &Z[i][0], 1, TMP, 1);
+      }
+
+      SDIRK_Solve('N', H, N, E, IP, IER, TMP, ISTATUS);
+      Err = SDIRK_ErrorNorm(N, TMP, SCAL);
+
+    /*~~~~> Computation of new step size Hnew */
+      Fac = FacSafe * pow((Err), (-ONE/rkELO));
+      Fac = MAX(FacMin, MIN(FacMax, Fac));
+      Hnew = H*Fac;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Accept/Reject step    */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      if (Err < ONE) { /*~~~> Step is accepted */
+        FirstStep = 0; /* false */
+        ISTATUS[Nacc]++;
+
+      /* Checkpoint solution */
+        SDIRK_Push( T, H, Y, Z, E, IP, Max_no_steps, SaveLU );
+
+      /*~~~> Update time and solution */
+        T = T + H;
+      /* Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:) */
+        for(i=0; i<rkS; i++) {
+	  if(rkD[i] != ZERO)
+	    WAXPY(N, rkD[i], &Z[i][0], 1, Y, 1);
+        }
+
+      /*~~~> Update scaling coefficients */
+        SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+      /*~~~> Next time step */
+        Hnew = Tdirection*MIN(ABS(Hnew), Hmax);
+
+      /* Last T and H */
+        RSTATUS[Ntexit] = T;
+        RSTATUS[Nhexit] = H;
+        RSTATUS[Nhnew] = Hnew;
+
+      /* No step increase after a rejection */
+        if (Reject==1)
+	  Hnew = Tdirection*MIN(ABS(Hnew), ABS(H));
+        Reject = 0; /* false */
+        if ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO)
+	  H = Tfinal-T;
+        else {
+	  Hratio = Hnew/H;
+        /* If step not changed too much keep Jacobian and reuse LU */
+          SkipLU = ((Theta <= ThetaMin) && (Hratio >= Qmin) 
+		    && (Hratio <= Qmax));
+	  if (SkipLU==0)
+	    H = Hnew;
+        }
+
+        /* If convergence is fast enough, do not update Jacobian */
+        /* SkipJac = (Theta <= ThetaMin); */
+        SkipJac = 0;
+      }
+      else { /*~~~> Step is rejected */
+        if ((FirstStep==1) || (Reject==1))
+	  H = FacRej * H;
+        else  
+          H = Hnew;
+
+        Reject = 1;
+        SkipJac = 1;
+        SkipLU = 0;
+        if (ISTATUS[Nacc] >=1)
+	  ISTATUS[Nrej]++;
+
+      }
+    } /* end CycleTloop if */
+  } /* end Tloop */
+
+  /* Successful return */
+  return 1;
+
+} /* end SDIRK_FwdInt */
+         
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_DadjInt( int N, int NADJ, KPP_REAL Lambda[][NVAR], int SaveLU, 
+		   int ISTATUS[], int ITOL, KPP_REAL AbsTol_adj[][NVAR], 
+		   KPP_REAL RelTol_adj[][NVAR], int NewtonMaxit, 
+		   KPP_REAL ThetaMin, KPP_REAL NewtonTol, int DirectADJ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables: */
+  KPP_REAL Y[NVAR];
+  KPP_REAL Z[Smax][NVAR], U[Smax][NADJ][NVAR], TMP[NVAR], G[NVAR], NewtonRate, 
+    SCAL[NVAR], DU[NVAR], T, H, Theta, NewtonPredictedErr, NewtonIncrement, 
+    NewtonIncrementOld=0.0;
+  int i, j, IER=0, istage, iadj, NewtonIter, IP[NVAR], IP_adj[NVAR];
+  int Reject=0, SkipJac, SkipLU, NewtonDone; /* Boolean */
+      
+#ifdef FULL_ALGEBRA      
+  KPP_REAL E[NVAR][NVAR], Jac[NVAR][NVAR], E_adj[NVAR][NVAR];
+#else      
+  KPP_REAL E[LU_NONZERO], Jac[LU_NONZERO], E_adj[LU_NONZERO];
+#endif      
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  Time loop begins
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  while ( stack_ptr > -1 ) { /* Tloop */
+        
+  /*~~~>  Recover checkpoints for stage values and vectors */
+    SDIRK_Pop( &T, &H, &Y[0], &Z[0][0], &E[0], &IP[0], SaveLU );
+
+  /*~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition */
+    if (!SaveLU) {
+      SkipJac = FALSE; 
+      SkipLU = FALSE;
+      SDIRK_PrepareMatrix ( H, T, Y, Jac, SkipJac, SkipLU, E, IP, Reject, IER, 
+			    ISTATUS );
+      if (IER != 0)
+	return SDIRK_ErrorMsg(-8,T,H); 
+    }  
+
+    for( istage = rkS-1; istage >=0; istage--) { /* Stages Loop */
+    /*~~~>  Jacobian of the current stage solution */
+      for(i=0; i<N; i++)
+	TMP[i] = Y[i] + Z[istage][i];
+      JAC_CHEM(T+rkC[istage]*H,TMP,Jac);
+      ISTATUS[Njac]++;
+       
+      if (DirectADJ) {
+#ifdef FULL_ALGEBRA
+	for(i=0; i<N; i++) {
+	  for(j=0; j<N; j++)
+	    E_adj[i][j] = -Jac[i][j];
+	}
+	for(i=0; i<N; i++)
+	  E_adj[i][i] = E_adj[i][i] + ONE/(H*rkGamma);
+
+	DGETRF( N, N, E_adj, N, IP_adj, IER );
+#else
+	for(i=0; i<LU_NONZERO; i++)
+	  E_adj[i] = -Jac[i];
+	for(i=0; i<NVAR; i++) {
+	  j = LU_DIAG[i];
+	  E_adj[j] = E_adj[j] + ONE/(H*rkGamma);
+	}
+        IER = KppDecomp (E_adj);
+#endif
+	ISTATUS[Ndec]++;
+        if (IER != 0) {
+	  printf("At stage %d the matrix used in adjoint computation is " 
+		 "singular\n", istage);
+          return SDIRK_ErrorMsg(-8,T,H);
+	}
+      }
+
+      for(iadj=0; iadj<NADJ; iadj++) { /* adj loop */
+       
+      /*~~~> Update scaling coefficients */
+	for(i=0; i<NVAR; i++)
+	  SDIRK_ErrorScale(N, ITOL, &AbsTol_adj[iadj][i], &RelTol_adj[iadj][i], 
+			   &Lambda[iadj][i], SCAL);
+      
+      /*~~~>   Prepare the loop-independent part of the right-hand side
+	       G(:) = H*Jac^T*( B(i)*Lambda + sum_j A(j,i)*Uj(:) ) */
+	for(i=0; i<N; i++)
+	  G[i] = rkB[istage]*Lambda[iadj][i];
+	if (istage+1 < rkS) {
+	  for (j=istage+1; j<rkS; j++)
+	    WAXPY(N,rkA[istage][j],&U[j][iadj][0],1,G,1);
+	}
+#ifdef FULL_ALGEBRA  
+	TMP = MATMUL(TRANSPOSE(Jac),G); /* DZ <- Jac(Y+Z)*Y_tlm */
+#else      
+	JacTR_SP_Vec ( Jac, G, TMP );    
+#endif     
+	for(i=0; i<N; i++)
+	  G[i] = H*TMP[i];
+	
+	if (DirectADJ) {
+	  SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G, ISTATUS );
+	  for(i=0; i<N; i++)
+	    U[istage][iadj][i] = G[i];
+	} else {
+	  /*~~~>  Initializations for Newton iteration */
+	  Set2Zero(N,&U[istage][iadj][0]);
+	  NewtonDone = FALSE;
+            
+	  /* Newton Loop */
+	  for( NewtonIter=0; NewtonIter<NewtonMaxit; NewtonIter++) {
+
+	  /*~~~>   Prepare the loop-dependent part of the right-hand side */
+#ifdef FULL_ALGEBRA  
+	    for(i=0; i<N; i++)
+	      TMP = MATMUL(TRANSPOSE(Jac),U[istage][iadj][i]);    
+#else      
+	    for(i=0; i<N; i++)
+	      JacTR_SP_Vec ( Jac, &U[istage][iadj][i], TMP );    
+#endif      
+	    for(i=0; i<N; i++)
+	      DU[i] = U[istage][iadj][i] - (H*rkGamma)*TMP[i] - G[i];
+
+	  /*~~~>   Solve the linear system */
+            SDIRK_Solve ( 'T', H, N, E, IP, IER, DU, ISTATUS );
+            
+	  /*~~~>   Check convergence of Newton iterations */
+            NewtonIncrement = SDIRK_ErrorNorm(N, DU, SCAL);
+            if ( NewtonIter == 0 ) {
+	      Theta = ABS(ThetaMin);
+	      NewtonRate = (KPP_REAL)2.0;
+	    }
+            else {
+	      Theta = NewtonIncrement/NewtonIncrementOld;
+	      if (Theta < (KPP_REAL)0.99) {
+		NewtonRate = Theta/(ONE-Theta);
+	      /* Predict error at the end of Newton process */ 
+		NewtonPredictedErr = NewtonIncrement*
+		  pow(Theta,(NewtonMaxit-NewtonIter)) / (ONE-Theta);
+	      /* Non-convergence of Newton: predicted error too large */
+                if (NewtonPredictedErr >= NewtonTol)
+		  break; /* Exit NewtonLoop */
+	      } else { /* Non-convergence of Newton: Theta too large */
+		break;
+	      }
+            }
+            NewtonIncrementOld = NewtonIncrement;
+	  /* Update solution */
+	    for(i=0; i<N; i++)
+	      U[istage][iadj][i] -= DU[i];
+            
+          /* Check error in Newton iterations */
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol);
+          /* AbsTol is often inappropriate for adjoints -
+              we do at least 4 Newton iterations to ensure convergence
+              of all adjoint components */
+            if ((NewtonIter>=4) && NewtonDone)
+	      break; /* Exit Newton Loop */ 
+	  }
+            
+	/*~~~> If Newton iterations fail employ the direct solution */
+	  if (!NewtonDone) {
+	    printf("Problems with Newton Adjoint!!!\n");
+#ifdef FULL_ALGEBRA
+	    for(i=0; i<N; i++)
+	      E_adj[i][j] = -Jac[i][j];
+	    for(j=0; j<N; j++)
+	      E_adj[j][j] += ONE/(H*rkGamma);
+	    DGETRF( N, N, E_adj, N, IP_adj, IER );
+#else
+	    for(i=0; i<LU_NONZERO; i++)
+	      E_adj[i] = -Jac[i];
+	    for(i=0; i<NVAR; i++) {
+	      j = LU_DIAG[i];
+	      E_adj[j] += ONE/(H*rkGamma);
+	    }
+	    IER = KppDecomp ( E_adj);
+#endif
+	    ISTATUS[Ndec]++;
+	    if (IER != 0) {
+	      printf("At stage %d the matrix used in adjoint computation is "
+		     "singular", istage);
+	      return SDIRK_ErrorMsg(-8,T,H);
+	    }
+	    SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G, ISTATUS );
+	    for(i=0; i<N; i++)
+	      U[istage][iadj][i] = G[i];  
+	  }
+
+	/*~~~>  End of implified Newton iterations */
+	} /* End of DirADJ */
+
+      } /* End of adj */
+ 
+    } /* End of stages */
+
+    /*~~~> Update adjoint solution
+           Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:) */
+    for (istage=0; istage<rkS; istage++) {
+      for (iadj=0; iadj<NADJ; iadj++) {
+	for(i=0; i<N; i++)
+	  Lambda[iadj][i] += U[istage][iadj][i];
+      }
+    }
+  } /* End of Tloop */
+
+  /* Successful return */
+  return 1;
+  
+} /* End of SDIRK_DadjInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_AllocBuffers(int Max_no_steps, int rkS, int SaveLU) {
+/*~~~>  Allocate buffer space for checkpointing
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  int i,j;
+
+  chk_H = (KPP_REAL*) malloc(Max_no_steps * sizeof(KPP_REAL));
+  if (chk_H == NULL) {
+    printf("Failed allocation of buffer H\n");
+    exit(0);
+  }
+
+  chk_T = (KPP_REAL*) malloc(Max_no_steps * sizeof(KPP_REAL));
+  if (chk_T == NULL) {
+    printf("Failed allocation of buffer T\n");
+    exit(0);
+  }
+
+  chk_Y = (KPP_REAL**) malloc(Max_no_steps * sizeof(KPP_REAL*));
+  if (chk_Y == NULL) {
+    printf("Failed allocation of buffer Y\n");
+    exit(0);
+  }
+  for(i=0; i<Max_no_steps; i++) {
+    chk_Y[i] = (KPP_REAL*) malloc(NVAR * sizeof(KPP_REAL));
+    if (chk_Y[i] == NULL) {
+      printf("Failed allocation of buffer Y\n");
+      exit(0);
+    }
+  }
+   
+  chk_Z = (KPP_REAL***) malloc(Max_no_steps * sizeof(KPP_REAL**));
+  if (chk_Z == NULL) {
+    printf("Failed allocation of buffer Z\n");
+    exit(0);
+  }
+  for(i=0; i<Max_no_steps; i++) {
+    chk_Z[i] = (KPP_REAL**) malloc(rkS * sizeof(KPP_REAL*));
+    if (chk_Z[i] == NULL) {
+      printf("Failed allocation of buffer Z\n");
+      exit(0);
+    }
+    for(j=0; j<rkS; j++) {
+      chk_Z[i][j] = (KPP_REAL*) malloc(NVAR * sizeof(KPP_REAL));
+      if (chk_Z[i][j] == NULL) {
+	printf("Failed allocation of buffer Z\n");
+	exit(0);
+      }
+    }
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    chk_J = (KPP_REAL***) malloc(Max_no_steps * sizeof(KPP_REAL**));
+    if (chk_J == NULL) {
+      printf("Failed allocation of buffer J\n");
+      exit(0);
+    }
+    for(i=0; i<Max_no_steps; i++) {
+      chk_J[i] = (KPP_REAL**) malloc(NVAR * sizeof(KPP_REAL*));
+      if (chk_J[i] == NULL) {
+	printf("Failed allocation of buffer J\n");
+	exit(0);
+      }
+      for(j=0; j<NVAR; j++) {
+	chk_J[i][j] = (KPP_REAL*) malloc(NVAR * sizeof(KPP_REAL));
+	if (chk_J[i][j] == NULL) {
+	  printf("Failed allocation of buffer J\n");
+	  exit(0);
+	}
+      }
+    }
+#else
+    chk_J = (KPP_REAL**) malloc(Max_no_steps * sizeof(KPP_REAL*));
+    if (chk_J == NULL) {
+      printf("Failed allocation of buffer J\n");
+      exit(0);
+    }
+    for(i=0; i<Max_no_steps; i++) {
+      chk_J[i] = (KPP_REAL*) malloc(LU_NONZERO * sizeof(KPP_REAL));
+      if (chk_J[i] == NULL) {
+	printf("Failed allocation of buffer J\n");
+	exit(0);
+      }
+    }
+#endif
+ 
+    chk_P = (int**) malloc(Max_no_steps * sizeof(int*));
+    if (chk_P == NULL) {
+      printf("Failed allocation of buffer P\n");
+      exit(0);
+    }
+    for(i=0; i<Max_no_steps; i++) {
+      chk_P[i] = (int*) malloc(NVAR * sizeof(int));
+      if (chk_P[i] == NULL) {
+	printf("Failed allocation of buffer P\n");
+	exit(0);
+      }
+    }
+  }
+} /* End of SDIRK_AllocBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_FreeBuffers(int Max_no_steps, int SaveLU) {
+/*~~~>  Deallocate buffer space for discrete adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  int i,j;
+
+  free(chk_H);
+  free(chk_T);
+
+  for(i=0; i<Max_no_steps; i++)
+    free(chk_Y[i]);
+  free(chk_Y);
+
+  for(i=0; i<Max_no_steps; i++) {
+    for(j=0; j<rkS; j++) {
+      free(chk_Z[i][j]);
+    }
+    free(chk_Z[i]);
+  }
+  free(chk_Z);
+
+  if(SaveLU) {
+#ifdef FULL_ALGEBRA
+    for(i=0; i<Max_no_steps; i++) {
+      for(j=0; j<rkS; j++) {
+	free(chk_J[i][j]);
+      }
+      free(chk_J[i]);
+    }
+    free(chk_Z);
+#else
+    for(i=0; i<Max_no_steps; i++)
+      free(chk_J[i]);
+    free(chk_J);
+#endif
+
+    for(i=0; i<Max_no_steps; i++)
+      free(chk_P[i]);
+    free(chk_P);
+  }
+} /* End of SDIRK_FreeBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Push( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL Z[][NVAR], 
+		 KPP_REAL E[], int P[], int Max_no_steps, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Saves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  
+  int i,j;
+
+  stack_ptr++;
+  if( stack_ptr > Max_no_steps ) {
+    printf( "Push failed: buffer overflow");
+    exit(0);
+  }
+
+  chk_H[ stack_ptr ] = H;
+  chk_T[ stack_ptr ] = T;
+  for(i=0; i<NVAR; i++) {
+    chk_Y[stack_ptr][i] = Y[i];
+    for(j=0; j<rkS; j++)
+      chk_Z[stack_ptr][j][i] = Z[j][i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	chk_J[stack_ptr][i][j] = E[i][j];
+      chk_P[stack_ptr][i] = P[i];
+    }
+#else   
+    for(i=0; i<LU_NONZERO; i++)
+      chk_J[stack_ptr][i] = E[i];
+#endif
+  }
+  
+} /* End of SDIRK_Push */
+  
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Pop( KPP_REAL* T, KPP_REAL* H, KPP_REAL* Y, KPP_REAL* Z, KPP_REAL* E,
+		int* P, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Retrieves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  int i,j;
+
+  if ( stack_ptr < 0 ) {
+    printf( "Pop failed: empty buffer\n" );
+    exit(0);
+  }
+
+  *H = chk_H[ stack_ptr ];
+  *T = chk_T[ stack_ptr ];
+  for(i=0; i<NVAR; i++) {
+    Y[i] = chk_Y[stack_ptr][i];
+    for(j=0; j<rkS; j++)
+      Z[(j * NVAR) + i] = chk_Z[stack_ptr][j][i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	E[(j*NVAR)+i] = chk_J[stack_ptr][j][i];
+      P[i] = chk_P[stack_ptr][i];
+    }
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      E[i] = chk_J[stack_ptr][i];
+#endif
+  }
+
+  stack_ptr--;
+  
+} /* End of SDIRK_Pop */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_ErrorScale( int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+		       KPP_REAL Y[], KPP_REAL SCAL[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+  if (ITOL == 0){
+    for (i = 0; i < NVAR; i++)
+      SCAL[i] = ONE / (AbsTol[0]+RelTol[0]*ABS(Y[i]) );
+  }
+  else {
+    for (i = 0; i < NVAR; i++)
+      SCAL[i] = ONE / (AbsTol[i]+RelTol[i]*ABS(Y[i]) );
+  }
+
+} /*  End of SDIRK_ErrorScale */
+      
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL SDIRK_ErrorNorm( int N, KPP_REAL Y[], KPP_REAL SCAL[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+  KPP_REAL Err = ZERO;
+
+  for (i = 0; i < N; i++)
+    Err = Err + pow( (Y[i]*SCAL[i]), 2);
+  Err = MAX( SQRT(Err/(KPP_REAL)N), (KPP_REAL)1.0e-10);
+
+  return Err;
+
+} /*  End of SDIRK_ErrorNorm  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_ErrorMsg(int code, KPP_REAL T, KPP_REAL H) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Handles all error messages
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  printf("\nForced exit from Sdirk due to the following error:\n");
+
+  switch (code) {
+    case -1:
+      printf("--> Improper value for maximal no of steps\n");
+      break;
+    case -2:
+      printf("--> Selected Rosenbrock method not implemented\n");
+      break;
+    case -3:
+      printf("--> Hmin/Hmax/Hstart must be positive\n");
+      break;
+    case -4:
+      printf("--> FacMin/FacMax/FacRej must be positive\n");
+      break;
+    case -5:
+      printf("--> Improper tolerance values\n");
+      break;
+    case -6:
+      printf("--> No of steps exceeds maximum bound\n");
+      break;
+    case -7:
+      printf("--> Step size too small T + 10*H = T or H < Roundoff\n");
+      break;
+    case -8:
+      printf("--> Matrix is repeatedly singular\n");
+      break;
+    default: /* causing an error */
+      printf("Unknown Error code: %d\n", code);
+  }
+
+  printf("\nTime = %f and H = %f\n", T, H );
+  return code;
+
+} /*  end SDIRK_ErrorMsg   */
+      
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_PrepareMatrix ( KPP_REAL H, KPP_REAL T, KPP_REAL Y[], 
+			   KPP_REAL FJAC[], int SkipJac, int SkipLU, 
+			   KPP_REAL E[], int IP[], int Reject, int ISING, 
+			   int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL HGammaInv;
+  int i, j, ConsecutiveSng = 0;
+
+  ISING = 1;
+
+  while (ISING != 0) {
+    HGammaInv = ONE/(H*rkGamma);
+
+  /*~~~>  Compute the Jacobian */
+    if (SkipJac==0) {
+      JAC_CHEM(T,Y,FJAC);
+      ISTATUS[Njac]++;
+    }
+
+#ifdef FULL_ALGEBRA
+    for(j=0; j<NVAR; j++) {
+      for(i=0; i<NVAR; i++)
+	E[j][i] = -FJAC[j][i];
+      E[j][j] = E[j][j] + HGammaInv;
+    }
+    DGETRF(NVAR, NVAR, E, NVAR, IP, ISING);
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      E[i] = -FJAC[i];
+    for(i=0; i<NVAR; i++) {
+      j = LU_DIAG[i];
+      E[j]=E[j] + HGammaInv;
+    }
+
+    ISING = KppDecomp(E);
+    IP[0] = 1;
+#endif
+      
+    ISTATUS[Ndec]++;
+
+    if (ISING != 0) {
+      printf("MATRIX IS SINGULAR, ISING=%d T=%e H=%e\n", ISING, T, H);
+      ISTATUS[Nsng]++;
+      ConsecutiveSng++;
+      if (ConsecutiveSng >= 6) 
+	return; /* Failure */
+      H = (KPP_REAL)(0.5)*H;
+      SkipJac = 0; /* False */
+      SkipLU  = 0; /* False */
+      Reject  = 1; /* True */
+    }
+  }
+} /* End of SDIRK_PrepareMatrix */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Solve ( char Transp, KPP_REAL H, int N, KPP_REAL E[], int IP[], 
+		   int ISING, KPP_REAL RHS[], int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  Solves the system (H*Gamma-Jac)*x = R
+      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL HGammaInv;
+      
+  HGammaInv = ONE/(H*rkGamma);
+  WSCAL(N,HGammaInv,RHS,1);
+  switch (Transp) {
+    case 'N':
+#ifdef FULL_ALGEBRA  
+      DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING );
+#else
+      KppSolve(E, RHS);
+#endif
+      break;
+    case 'T':
+#ifdef FULL_ALGEBRA  
+      DGETRS( 'T', N, 1, E, N, IP, RHS, N, ISING );
+#else
+      KppSolveTR(E, RHS, RHS);
+#endif
+      break;
+    default:
+      printf("Error in SDIRK_Solve. Unknown Transp argument: %c\n", Transp);
+      exit(0);
+  }
+  ISTATUS[Nsol]++;
+} /* End of SDIRK_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+  sdMethod = S4A;
+
+/* Number of stages */
+  rkS = 5;
+
+/* Method Coefficients */
+  rkGamma = (KPP_REAL)0.2666666666666666666666666666666667;
+
+  rkA[0][0] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][1] = (KPP_REAL)0.5000000000000000000000000000000000;
+  rkA[1][1] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][2] = (KPP_REAL)0.3541539528432732316227461858529820;
+  rkA[1][2] = (KPP_REAL)(-0.5415395284327323162274618585298197e-01);
+  rkA[2][2] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][3] = (KPP_REAL)0.8515494131138652076337791881433756e-01;
+  rkA[1][3] = (KPP_REAL)(-0.6484332287891555171683963466229754e-01);
+  rkA[2][3] = (KPP_REAL)0.7915325296404206392428857585141242e-01;
+  rkA[3][3] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][4] = (KPP_REAL)2.100115700566932777970612055999074;
+  rkA[1][4] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+  rkA[2][4] = (KPP_REAL)2.399816361080026398094746205273880;
+  rkA[3][4] = (KPP_REAL)(-2.998818699869028161397714709433394);
+  rkA[4][4] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkB[0] = (KPP_REAL)2.100115700566932777970612055999074;
+  rkB[1] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+  rkB[2] = (KPP_REAL)2.399816361080026398094746205273880;
+  rkB[3] = (KPP_REAL)(-2.998818699869028161397714709433394);
+  rkB[4] = (KPP_REAL)0.2666666666666666666666666666666667;
+
+  rkBhat[0] = (KPP_REAL)2.885264204387193942183851612883390;
+  rkBhat[1] = (KPP_REAL)(-0.1458793482962771337341223443218041);
+  rkBhat[2] = (KPP_REAL)2.390008682465139866479830743628554;
+  rkBhat[3] = (KPP_REAL)(-4.129393538556056674929560012190140);
+  rkBhat[4] = ZERO;
+
+  rkC[0] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkC[1] = (KPP_REAL)0.7666666666666666666666666666666667;
+  rkC[2] = (KPP_REAL)0.5666666666666666666666666666666667;
+  rkC[3] = (KPP_REAL)0.3661315380631796996374935266701191;
+  rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ZERO;
+  rkD[2] = ZERO;
+  rkD[3] = ZERO;
+  rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)(-0.6804000050475287124787034884002302);
+  rkE[1] = (KPP_REAL)(1.558961944525217193393931795738823);
+  rkE[2] = (KPP_REAL)(-13.55893003128907927748632408763868);
+  rkE[3] = (KPP_REAL)(15.48522576958521253098585004571302);
+  rkE[4] = ONE;
+
+/* Local order of Err estimate */
+  rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)1.875000000000000000000000000000000;
+  rkTheta[0][2] = (KPP_REAL)1.708847304091539528432732316227462;
+  rkTheta[1][2] = (KPP_REAL)(-0.2030773231622746185852981969486824);
+  rkTheta[0][3] = (KPP_REAL)0.2680325578937783958847157206823118;
+  rkTheta[1][3] = (KPP_REAL)(-0.1828840955527181631794050728644549);
+  rkTheta[2][3] = (KPP_REAL)0.2968246986151577397160821594427966;
+  rkTheta[0][4] = (KPP_REAL)0.9096171815241460655379433581446771;
+  rkTheta[1][4] = (KPP_REAL)(-3.108254967778352416114774430509465);
+  rkTheta[2][4] = (KPP_REAL)12.33727431701306195581826123274001;
+  rkTheta[3][4] = (KPP_REAL)(-11.24557012450885560524143016037523);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+  rkAlpha[0][1] = (KPP_REAL)2.875000000000000000000000000000000;
+  rkAlpha[0][2] = (KPP_REAL)0.8500000000000000000000000000000000;
+  rkAlpha[1][2] = (KPP_REAL)0.4434782608695652173913043478260870;
+  rkAlpha[0][3] = (KPP_REAL)0.7352046091658870564637910527807370;
+  rkAlpha[1][3] = (KPP_REAL)(-0.9525565003057343527941920657462074e-01);
+  rkAlpha[2][3] = (KPP_REAL)0.4290111305453813852259481840631738;
+  rkAlpha[0][4] = (KPP_REAL)(-16.10898993405067684831655675112808);
+  rkAlpha[1][4] = (KPP_REAL)6.559571569643355712998131800797873;
+  rkAlpha[2][4] = (KPP_REAL)(-15.90772144271326504260996815012482);
+  rkAlpha[3][4] = (KPP_REAL)25.34908987169226073668861694892683;
+
+  rkELO = (KPP_REAL)4.0;
+
+} /* end Sdirk4a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4b() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S4B;
+
+/* Number of stages */
+  rkS = 5;
+
+/* Method coefficients */
+  rkGamma = (KPP_REAL)0.25;
+
+  rkA[0][0] = (KPP_REAL)0.25;
+  rkA[0][1] = (KPP_REAL)0.5;
+  rkA[1][1] = (KPP_REAL)0.25;
+  rkA[0][2] = (KPP_REAL)0.34;
+  rkA[1][2] = (KPP_REAL)(-0.40e-01);
+  rkA[2][2] = (KPP_REAL)0.25;
+  rkA[0][3] = (KPP_REAL)0.2727941176470588235294117647058824;
+  rkA[1][3] = (KPP_REAL)(-0.5036764705882352941176470588235294e-01);
+  rkA[2][3] = (KPP_REAL)0.2757352941176470588235294117647059e-01;
+  rkA[3][3] = (KPP_REAL)0.25;
+  rkA[0][4] = (KPP_REAL)1.041666666666666666666666666666667;
+  rkA[1][4] = (KPP_REAL)(-1.020833333333333333333333333333333);
+  rkA[2][4] = (KPP_REAL)7.812500000000000000000000000000000;
+  rkA[3][4] = (KPP_REAL)(-7.083333333333333333333333333333333);
+  rkA[4][4] = (KPP_REAL)0.25;
+
+  rkB[0] = (KPP_REAL)1.041666666666666666666666666666667;
+  rkB[1] = (KPP_REAL)(-1.020833333333333333333333333333333);
+  rkB[2] = (KPP_REAL)7.812500000000000000000000000000000;
+  rkB[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+  rkB[4] = (KPP_REAL)0.250000000000000000000000000000000;
+
+  rkBhat[0] = (KPP_REAL)1.069791666666666666666666666666667;
+  rkBhat[1] = (KPP_REAL)(-0.894270833333333333333333333333333);
+  rkBhat[2] = (KPP_REAL)7.695312500000000000000000000000000;
+  rkBhat[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+  rkBhat[4] = (KPP_REAL)0.212500000000000000000000000000000;
+
+  rkC[0] = (KPP_REAL)0.25;
+  rkC[1] = (KPP_REAL)0.75;
+  rkC[2] = (KPP_REAL)0.55;
+  rkC[3] = (KPP_REAL)0.5;
+  rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ZERO;
+  rkD[2] = ZERO;
+  rkD[3] = ZERO;
+  rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)0.5750;
+  rkE[1] = (KPP_REAL)0.2125;
+  rkE[2] = (KPP_REAL)(-4.6875);
+  rkE[3] = (KPP_REAL)4.2500;
+  rkE[4] = (KPP_REAL)0.1500;
+
+/* Local order of Err estimate */
+  rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)2.0;
+  rkTheta[0][2] = (KPP_REAL)1.680000000000000000000000000000000;
+  rkTheta[1][2] = (KPP_REAL)(-0.1600000000000000000000000000000000);
+  rkTheta[0][3] = (KPP_REAL)1.308823529411764705882352941176471;
+  rkTheta[1][3] = (KPP_REAL)(-0.1838235294117647058823529411764706);
+  rkTheta[2][3] = (KPP_REAL)0.1102941176470588235294117647058824;
+  rkTheta[0][4] = (KPP_REAL)(-3.083333333333333333333333333333333);
+  rkTheta[1][4] = (KPP_REAL)(-4.291666666666666666666666666666667);
+  rkTheta[2][4] = (KPP_REAL)34.37500000000000000000000000000000;
+  rkTheta[3][4] = (KPP_REAL)(-28.3333333333333333333333333333);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+  rkAlpha[0][1] = (KPP_REAL)3.0;
+  rkAlpha[0][2] = (KPP_REAL)0.8800000000000000000000000000000000;
+  rkAlpha[1][2] = (KPP_REAL)0.4400000000000000000000000000000000;
+  rkAlpha[0][3] = (KPP_REAL)0.1666666666666666666666666666666667;
+  rkAlpha[1][3] = (KPP_REAL)(-0.8333333333333333333333333333333333e-01);
+  rkAlpha[2][3] = (KPP_REAL)0.9469696969696969696969696969696970;
+  rkAlpha[0][4] = (KPP_REAL)(-6.0);
+  rkAlpha[1][4] = (KPP_REAL)9.0;
+  rkAlpha[2][4] = (KPP_REAL)(-56.81818181818181818181818181818182);
+  rkAlpha[3][4] = (KPP_REAL)54.0;
+
+} /* end Sdirk4b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2a() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S2A;
+
+/* ~~~> Number of stages */
+  rkS = 2;
+
+/* ~~~> Method coefficients */
+  rkGamma = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkA[0][0] = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkA[0][1] = (KPP_REAL)0.7071067811865475244008443621048490;
+  rkA[1][1] = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkB[0] = (KPP_REAL)0.7071067811865475244008443621048490;
+  rkB[1] = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+  rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+  rkC[0] = (KPP_REAL)0.292893218813452475599155637895151;
+  rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)0.4714045207910316829338962414032326;
+  rkE[1] = (KPP_REAL)(-0.1380711874576983496005629080698993);
+
+/* ~~~> Local order of Err estimate */
+  rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)2.414213562373095048801688724209698;
+
+/* ~~~> Starting value for Newton iterations */
+  rkAlpha[0][1] = (KPP_REAL)3.414213562373095048801688724209698;
+
+} /* end Sdirk2a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2b() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S2B;
+
+/* ~~~> Number of stages */
+  rkS = 2;
+
+/* ~~~> Method coefficients */
+  rkGamma = (KPP_REAL)1.707106781186547524400844362104849;
+  rkA[0][0] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkA[0][1] = (KPP_REAL)(-0.707106781186547524400844362104849);
+  rkA[1][1] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkB[0] = (KPP_REAL)(-0.707106781186547524400844362104849);
+  rkB[1] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+  rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+  rkC[0] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)(-0.4714045207910316829338962414032326);
+  rkE[1] = (KPP_REAL)0.8047378541243650162672295747365659;
+
+/* ~~~> Local order of Err estimate */
+  rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)(-0.414213562373095048801688724209698);
+
+/* ~~~> Starting value for Newton iterations */
+  rkAlpha[0][1] = (KPP_REAL)0.5857864376269049511983112757903019;
+
+} /* end Sdirk2b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk3a() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S3A;
+
+/* ~~~> Number of stages */
+  rkS = 3;
+
+/* ~~~> Method coefficients */
+  rkGamma = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[0][0] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[0][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[1][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[0][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[1][2] = (KPP_REAL)0.5773502691896257645091487805019573;
+  rkA[2][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkB[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkB[1] = (KPP_REAL)0.5773502691896257645091487805019573;
+  rkB[2] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkBhat[0]= (KPP_REAL)0.2113248654051871177454256097490213;
+  rkBhat[1]= (KPP_REAL)0.6477918909913548037576239837516312;
+  rkBhat[2]= (KPP_REAL)0.1408832436034580784969504064993475;
+  rkC[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkC[1] = (KPP_REAL)0.4226497308103742354908512194980427;
+  rkC[2] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ZERO;
+  rkD[2] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)0.9106836025229590978424821138352906;
+  rkE[1] = (KPP_REAL)(-1.244016935856292431175815447168624);
+  rkE[2] = (KPP_REAL)0.3333333333333333333333333333333333;
+
+/* ~~~> Local order of Err estimate    */
+  rkELO    = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] =  ONE;
+  rkTheta[0][2] = (KPP_REAL)(-1.732050807568877293527446341505872);
+  rkTheta[1][2] = (KPP_REAL)2.732050807568877293527446341505872;
+
+/* ~~~> Starting value for Newton iterations */
+  rkAlpha[0][1] = (KPP_REAL)2.0;
+  rkAlpha[0][2] = (KPP_REAL)(-12.92820323027550917410978536602349);
+  rkAlpha[1][2] = (KPP_REAL)8.83012701892219323381861585376468;
+
+} /* end Sdirk3a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FUN_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL P[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+  KPP_REAL Told;
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+  Fun( Y, FIX, RCONST, P );
+  TIME = Told;
+
+}  /*  end FUN_CHEM  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JAC_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL Told;
+
+#ifdef FULL_ALGEBRA
+  KPP_REAL JS[LU_NONZERO];
+  int i,j;
+#endif
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+
+#ifdef FULL_ALGEBRA
+  Jac_SP( Y, FIX, RCONST, JS);
+
+  for(j=0; j<NVAR; j++) {
+    for(i=0; i<NVAR; i++)
+      JV[j][i] = (KPP_REAL)0.0;
+  } /* end for */
+
+  for(i=0; i<LU_NONZERO; i++)
+    JV[LU_ICOL[i]][LU_IROW[i]] = JS[i];
+#else
+  Jac_SP(Y, FIX, RCONST, JV);
+#endif
+
+  TIME = Told;
+
+} /* end JAC_CHEM  */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk_adj
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_adj.f90	(revision 3477)
@@ -0,0 +1,1669 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Adjoint of SDIRK - Singly-Diagonally-Implicit Runge-Kutta method       !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2005                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_Jacobian, ONLY: Jac_SP_Vec, JacTR_SP_Vec
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve,    &
+               KppSolveTR, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+SUBROUTINE INTEGRATE_ADJ( NADJ, Y, Lambda, TIN, TOUT, &
+           ATOL_adj, RTOL_adj,                        &
+           ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, Ierr_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+!~~~> Y - Concentrations
+   KPP_REAL :: Y(NVAR)
+!~~~> NADJ - No. of cost functionals for which adjoints
+!                are evaluated simultaneously
+!            If single cost functional is considered (like in
+!                most applications) simply set NADJ = 1      
+   INTEGER :: NADJ
+!~~~> Lambda - Sensitivities w.r.t. concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+   KPP_REAL  :: Lambda(NVAR,NADJ)
+!~~~> Tolerances for adjoint calculations
+!     (used for full continuous adjoint, and for controlling
+!      iterations when used to solve the discrete adjoint)   
+   KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: Ierr_U
+
+   INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+   INTEGER       :: ICNTRL(20), ISTATUS(20), Ierr
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   !~~~> fine-tune the integrator:
+   ICNTRL(5) = 8    ! Max no. of Newton iterations
+   ICNTRL(7) = 1    ! Adjoint solution by: 0=Newton, 1=direct
+   ICNTRL(8) = 1    ! Save fwd LU factorization: 0 = do *not* save, 1 = save
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+   
+   
+   T1 = TIN; T2 = TOUT
+   CALL SDIRKADJ( NVAR, NADJ, T1, T2, Y, Lambda,            &
+                  RTOL, ATOL, ATOL_adj, RTOL_adj,           &
+                  RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr )
+
+   !~~~> Debug option: number of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! WRITE(6,777) ISTATUS(Nstp),Ntotal,VAR(ind_O3),VAR(ind_NO2)
+   ! 777 FORMAT('NSTEPS=',I5,' (',I5,')  O3=',E24.14,'  NO2=',E24.14)    
+
+   IF (Ierr < 0) THEN
+        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (Ierr=',Ierr,')'
+   ENDIF
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(Ierr_U))    Ierr_U       = Ierr
+
+   END SUBROUTINE INTEGRATE_ADJ
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRKADJ(N, NADJ, Tinitial, Tfinal, Y, Lambda,   &
+                       RelTol, AbsTol, RelTol_adj, AbsTol_adj, &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 1500 is used
+!        Note: use a conservative estimate, since the checkpoint
+!              buffers are allocated to hold Max_no_steps
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve ADJ equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one LU factorization per stage)
+!
+!    ICNTRL(8)  -> checkpointing the LU factorization at each step:
+!        ICNTRL(8)=0 : do *not* save LU factorization (the default)
+!        ICNTRL(8)=1 : save LU factorization
+!        Note: if ICNTRL(7)=1 the LU factorization is *not* saved
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, NADJ, ICNTRL(20)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR), Lambda(NVAR,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(NVAR), AbsTol(NVAR), RCNTRL(20), &
+                    RelTol_adj(NVAR,NADJ), AbsTol_adj(NVAR,NADJ)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+
+!~~~>  Checkpoints in memory buffers
+      INTEGER :: stack_ptr = 0 ! last written entry in checkpoint
+      KPP_REAL, DIMENSION(:),     POINTER :: chk_H, chk_T
+      KPP_REAL, DIMENSION(:,:),   POINTER :: chk_Y
+      KPP_REAL, DIMENSION(:,:,:), POINTER :: chk_Z
+      INTEGER,       DIMENSION(:,:),   POINTER :: chk_P
+#ifdef FULL_ALGEBRA
+      KPP_REAL, DIMENSION(:,:,:), POINTER :: chk_J
+#else
+      KPP_REAL, DIMENSION(:,:),   POINTER :: chk_J
+#endif
+! Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      LOGICAL       :: SaveLU, DirectADJ                 
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+      KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+
+       
+!~~~>  Initialize statistics
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+      Ierr          = 0
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps = ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+ 
+!~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+
+!~~~> Solve ADJ equations directly or by Newton iterations 
+      DirectADJ = (ICNTRL(7) == 1)
+ 
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) .AND. (.NOT.DirectADJ)
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+    IF (Ierr < 0) RETURN
+    
+!~~~>  Allocate memory buffers    
+    CALL SDIRK_AllocBuffers
+
+!~~~>  Call forward integration    
+    CALL SDIRK_FwdInt( N, Tinitial, Tfinal, Y, Ierr )
+
+!~~~>  Call adjoint integration    
+    CALL SDIRK_DadjInt( N, NADJ, Lambda, Ierr )
+
+!~~~>  Free memory buffers    
+    CALL SDIRK_FreeBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  Procedures internal to SDIRKADJ
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_FwdInt( N,Tinitial,Tfinal,Y,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER :: N
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,Smax), G(NVAR), TMP(NVAR),        &   
+                       NewtonRate, SCAL(NVAR), RHS(NVAR),       &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew,Tdirection,      &
+                       NewtonIncrement, NewtonIncrementOld
+      INTEGER :: j, IER, istage, NewtonIter, IP(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR) :: FJAC, E
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO):: FJAC, E
+#endif      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU =.FALSE.
+      SkipJac = .FALSE.
+      Reject=.FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+               CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,RHS)	! RHS <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            RHS(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*RHS(1:N)
+	    CALL WSCAL(N, H*rkGamma, RHS, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, RHS, 1)
+            CALL WAXPY (N, ONE, G,1, RHS,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( 'N', H, N, E, IP, IER, RHS )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, RHS, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+RHS(:)
+            CALL WAXPY(N,ONE,RHS,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT NewtonLoop
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of implified Newton iterations
+
+ 
+   END DO stages
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,TMP)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,TMP,1)
+      END DO  
+
+      CALL SDIRK_Solve( 'N', H, N, E, IP, IER, TMP )
+      CALL SDIRK_ErrorNorm(N, TMP, SCAL, Err)
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Checkpoint solution
+         CALL SDIRK_Push( T, H, Y, Z, E, IP )
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject  = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_FwdInt
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_DadjInt( N, NADJ, Lambda, Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N, NADJ
+      KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Y(NVAR)
+      KPP_REAL :: Z(NVAR,Smax), U(NVAR,NADJ,Smax),   &
+                       TMP(NVAR), G(NVAR),                &   
+                       NewtonRate, SCAL(NVAR), DU(NVAR),  &
+                       T, H, Theta, NewtonPredictedErr,   &
+                       NewtonIncrement, NewtonIncrementOld
+      INTEGER :: j, IER, istage, iadj, NewtonIter, &
+                 IP(NVAR), IP_adj(NVAR)
+      LOGICAL :: Reject, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR) :: E, Jac, E_adj
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO):: E, Jac, E_adj
+#endif      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( stack_ptr > 0 )
+        
+   !~~~>  Recover checkpoints for stage values and vectors
+      CALL SDIRK_Pop( T, H, Y, Z, E, IP )
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF (.NOT.SaveLU) THEN
+          SkipJac = .FALSE.; SkipLU = .FALSE.
+          CALL SDIRK_PrepareMatrix ( H, T, Y, Jac, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+stages:DO istage = rkS, 1, -1
+
+!~~~>  Jacobian of the current stage solution
+       TMP(1:N) = Y(1:N) + Z(1:N,istage)
+       CALL JAC_CHEM(T+rkC(istage)*H,TMP,Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+       
+       IF (DirectADJ) THEN 
+#ifdef FULL_ALGEBRA
+         E_adj(1:N,1:N) = -Jac(1:N,1:N)
+         DO j=1,N
+            E_adj(j,j) = E_adj(j,j) + ONE/(H*rkGamma)
+         END DO
+         CALL DGETRF( N, N, E_adj, N, IP_adj, IER )
+#else
+         E_adj(1:LU_NONZERO) = -Jac(1:LU_NONZERO)
+         DO i = 1,NVAR
+            j = LU_DIAG(i); E_adj(j) = E_adj(j) + ONE/(H*rkGamma)
+         END DO
+         CALL KppDecomp ( E_adj, IER)
+#endif
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         IF (IER /= 0)  THEN
+             PRINT*,'At stage ',istage,' the matrix used in adjoint', &
+                      ' computation is singular'
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+       END IF
+
+adj:   DO iadj = 1, NADJ
+       
+!~~~> Update scaling coefficients
+       CALL SDIRK_ErrorScale(ITOL, AbsTol_adj(1:NVAR,iadj), &
+             RelTol_adj(1:NVAR,iadj), Lambda(1:NVAR,iadj), SCAL)
+      
+!~~~>   Prepare the loop-independent part of the right-hand side
+!       G(:) = H*Jac^T*( B(i)*Lambda + sum_j A(j,i)*Uj(:) )
+       G(1:N) = rkB(istage)*Lambda(1:N,iadj)
+       IF (istage < rkS) THEN
+           DO j = istage+1, rkS
+               CALL WAXPY(N,rkA(j,istage),U(1,iadj,j),1,G,1)
+           END DO
+       END IF
+#ifdef FULL_ALGEBRA  
+       TMP = MATMUL(TRANSPOSE(Jac),G)    ! DZ <- Jac(Y+Z)*Y_tlm
+#else      
+       CALL JacTR_SP_Vec ( Jac, G, TMP )    
+#endif      
+       G(1:N) = H*TMP(1:N)
+
+DirADJ:IF (DirectADJ) THEN 
+
+            CALL SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G )
+            U(1:N,iadj,istage) = G(1:N)
+      
+       ELSE DirADJ
+
+            !~~~>  Initializations for Newton iteration
+            CALL Set2zero(N,U(1,iadj,istage))
+            NewtonDone = .FALSE.
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+#ifdef FULL_ALGEBRA  
+            TMP = MATMUL(TRANSPOSE(Jac),U(1:N,iadj,istage))    
+#else      
+            CALL JacTR_SP_Vec ( Jac, U(1:N,iadj,istage), TMP )    
+#endif      
+            DU(1:N) = U(1:N,iadj,istage) - (H*rkGamma)*TMP(1:N) - G(1:N)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( 'T', H, N, E, IP, IER, DU )
+            
+!~~~>   Check convergence of Newton iterations
+            
+            CALL SDIRK_ErrorNorm(N, DU, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                     ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                     ! Non-convergence of Newton: predicted error too large
+                    IF (NewtonPredictedErr >= NewtonTol) EXIT NewtonLoop
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution
+            U(1:N,iadj,istage) = U(1:N,iadj,istage) - DU(1:N)
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            ! AbsTol is often inappropriate for adjoints -
+            !    we do at least 4 Newton iterations to ensure convergence
+            !    of all adjoint components
+            IF ((NewtonIter>=4) .AND. NewtonDone) EXIT NewtonLoop
+            
+            END DO NewtonLoop
+            
+            !~~~> If Newton iterations fail employ the direct solution
+            IF (.NOT.NewtonDone) THEN                 
+               PRINT*,'Problems with Newton Adjoint!!!'
+#ifdef FULL_ALGEBRA
+               E_adj(1:N,1:N) = -Jac(1:N,1:N)
+               DO j=1,N
+                  E_adj(j,j) = E_adj(j,j) + ONE/(H*rkGamma)
+               END DO
+               CALL DGETRF( N, N, E_adj, N, IP_adj, IER )
+#else
+               E_adj(1:LU_NONZERO) = -Jac(1:LU_NONZERO)
+               DO i = 1,NVAR
+                  j = LU_DIAG(i); E_adj(j) = E_adj(j) + ONE/(H*rkGamma)
+               END DO
+               CALL KppDecomp ( E_adj, IER)
+#endif
+               ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+               IF (IER /= 0)  THEN
+                   PRINT*,'At stage ',istage,' the matrix used in adjoint', &
+                            ' computation is singular'
+                   CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+               END IF
+                  CALL SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G )
+                  U(1:N,iadj,istage) = G(1:N)
+                 
+            END IF
+
+!~~~>  End of simplified Newton iterations
+      
+       END IF DirADJ
+
+   END DO adj
+ 
+   END DO stages
+
+!~~~> Update adjoint solution
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO istage = 1,rkS 
+             DO iadj = 1,NADJ
+                 Lambda(1:N,iadj) = Lambda(1:N,iadj) + U(1:N,iadj,istage)
+                 !CALL WAXPY(N,ONE,U(1:N,iadj,istage),1,Lambda(1,iadj),1)
+             END DO  
+         END DO  
+
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_DadjInt
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_AllocBuffers
+!~~~>  Allocate buffer space for checkpointing
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       INTEGER :: i
+   
+       ALLOCATE( chk_H(Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer H'; STOP
+       END IF   
+       ALLOCATE( chk_T(Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer T'; STOP
+       END IF   
+       ALLOCATE( chk_Y(NVAR,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer Y'; STOP
+       END IF   
+       ALLOCATE( chk_Z(NVAR,rkS,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer K'; STOP
+       END IF   
+       IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+          ALLOCATE( chk_J(NVAR,NVAR,Max_no_steps),  STAT=i )
+#else
+          ALLOCATE( chk_J(LU_NONZERO,Max_no_steps), STAT=i )
+#endif
+          IF (i/=0) THEN
+             PRINT*,'Failed allocation of buffer J'; STOP
+          END IF   
+          ALLOCATE( chk_P(NVAR,Max_no_steps), STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed allocation of buffer P'; STOP
+          END IF   
+       END IF   
+ 
+     END SUBROUTINE SDIRK_AllocBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     SUBROUTINE SDIRK_FreeBuffers
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       INTEGER :: i
+   
+       DEALLOCATE( chk_H, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer H'; STOP
+       END IF   
+       DEALLOCATE( chk_T, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer T'; STOP
+       END IF   
+       DEALLOCATE( chk_Y, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer Y'; STOP
+       END IF   
+       DEALLOCATE( chk_Z, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer K'; STOP
+       END IF   
+       IF (SaveLU) THEN
+          DEALLOCATE( chk_J, STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed deallocation of buffer J'; STOP
+          END IF   
+          DEALLOCATE( chk_P, STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed deallocation of buffer P'; STOP
+          END IF   
+       END IF   
+ 
+     END SUBROUTINE SDIRK_FreeBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     SUBROUTINE SDIRK_Push( T, H, Y, Z, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       KPP_REAL :: T, H, Y(NVAR), Z(NVAR,Smax) 
+       INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+       KPP_REAL :: E(NVAR,NVAR)
+#else       
+       KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+       stack_ptr = stack_ptr + 1
+       IF ( stack_ptr > Max_no_steps ) THEN
+         PRINT*,'Push failed: buffer overflow'
+         STOP
+       END IF  
+       chk_H( stack_ptr ) = H
+       chk_T( stack_ptr ) = T
+       chk_Y(1:NVAR,stack_ptr) = Y(1:NVAR)
+       chk_Z(1:NVAR,1:rkS,stack_ptr) = Z(1:NVAR,1:rkS)
+       IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+          chk_J(1:NVAR,1:NVAR,stack_ptr) = E(1:NVAR,1:NVAR)
+          chk_P(1:NVAR,stack_ptr)        = P(1:NVAR)
+#else       
+          chk_J(1:LU_NONZERO,stack_ptr)  = E(1:LU_NONZERO)
+#endif
+       END IF
+  
+      END SUBROUTINE SDIRK_Push
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Pop( T, H, Y, Z, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       KPP_REAL :: T, H, Y(NVAR), Z(NVAR,Smax)
+       INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+       KPP_REAL :: E(NVAR,NVAR)
+#else       
+       KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+       IF ( stack_ptr <= 0 ) THEN
+         PRINT*,'Pop failed: empty buffer'
+         STOP
+       END IF  
+       H = chk_H( stack_ptr )
+       T = chk_T( stack_ptr )
+       Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+       Z(1:NVAR,1:rkS) = chk_Z(1:NVAR,1:rkS,stack_ptr)
+       IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+          E(1:NVAR,1:NVAR) = chk_J(1:NVAR,1:NVAR,stack_ptr)
+          P(1:NVAR)        = chk_P(1:NVAR,stack_ptr)
+#else       
+          E(1:LU_NONZERO)  = chk_J(1:LU_NONZERO,stack_ptr)
+#endif
+       END IF
+
+       stack_ptr = stack_ptr - 1
+  
+      END SUBROUTINE SDIRK_Pop
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound', max_no_steps
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .FALSE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( Transp, H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = R
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      CHARACTER, INTENT(IN)     :: Transp
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+      SELECT CASE (TRANSP)
+      CASE ('N')
+#ifdef FULL_ALGEBRA  
+         CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+         CALL KppSolve(E, RHS)
+#endif
+      CASE ('T')
+#ifdef FULL_ALGEBRA  
+         CALL DGETRS( 'T', N, 1, E, N, IP, RHS, N, ISING )
+#else
+         CALL KppSolveTR(E, RHS, RHS)
+#endif
+      CASE DEFAULT
+         PRINT*,'Error in SDIRK_Solve. Unknown Transp argument:',Transp
+         STOP
+      END SELECT
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRKADJ ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+      
+      TIME = Told
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP,LU_IROW,LU_ICOL
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+  
+      KPP_REAL ::  T, Told
+      KPP_REAL ::  Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO j=1,NVAR
+          JV(i,j) = 0.0d0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+
+      END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_soa.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_soa.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_soa.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk_soa
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_soa.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_soa.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_soa.f90	(revision 3477)
@@ -0,0 +1,1758 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Second Order Adjoint of SDIRK - Singly-Diagonally-Implicit Runge-Kutta !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2007                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO, NHESS
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_Jacobian, ONLY: Jac_SP_Vec, JacTR_SP_Vec
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve,    &
+               KppSolveTR, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  USE KPP_ROOT_Hessian
+  USE KPP_ROOT_Util
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+SUBROUTINE INTEGRATE_SOA( NSOA, Y, Y_tlm, Lambda, Sigma, &
+           TIN, TOUT, ATOL_adj, RTOL_adj,                &
+           ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, Ierr_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+!~~~> Y - Concentrations
+   KPP_REAL :: Y(NVAR)
+!~~~> NSOA - No. of vectors U_j for which
+!            Hessian*U_j is computed     
+   INTEGER :: NSOA
+!~~~> Y_tlm - Forward sensitivities
+!             Initially Y_tlm(1:NVAR,j) = U_j
+   KPP_REAL :: Y_tlm(NVAR,NSOA)
+!~~~> ADJ - No. of cost functionals (always 1)     
+   INTEGER, PARAMETER :: NADJ = 1
+!~~~> Lambda - Sensitivities w.r.t. concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+   KPP_REAL  :: Lambda(NVAR,NADJ)
+!~~~> Sigma - Second order adjoint sensitivities
+!     Note: Sigma(1:NVAR,j) = Hessian*U_j
+   KPP_REAL  :: Sigma(NVAR,NSOA)
+!~~~> Tolerances for adjoint calculations
+!     (used for full continuous adjoint, and for controlling
+!      iterations when used to solve the discrete adjoint)   
+   KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: Ierr_U
+
+   INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+   INTEGER       :: ICNTRL(20), ISTATUS(20), Ierr
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   !~~~> fine-tune the integrator:
+   ICNTRL(5) = 8    ! Max no. of Newton iterations
+   ICNTRL(7) = 1    ! Adjoint solution by: 0=Newton, 1=direct
+   ICNTRL(8) = 1    ! Save fwd LU factorization: 0 = do *not* save, 1 = save
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+   
+   
+   T1 = TIN; T2 = TOUT
+   CALL SDIRK_SOA(NVAR, NSOA, T1, T2, Y, Y_tlm, Lambda, Sigma,  &
+                  RTOL, ATOL, ATOL_adj, RTOL_adj,               &
+                  RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr )
+
+   !~~~> Debug option: number of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! WRITE(6,777) ISTATUS(Nstp),Ntotal,VAR(ind_O3),VAR(ind_NO2)
+   ! 777 FORMAT('NSTEPS=',I5,' (',I5,')  O3=',E24.14,'  NO2=',E24.14)    
+
+   IF (Ierr < 0) THEN
+        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (Ierr=',Ierr,')'
+   ENDIF
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(Ierr_U))    Ierr_U       = Ierr
+
+   END SUBROUTINE INTEGRATE_SOA
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_SOA(N, NSOA, Tinitial, Tfinal,              &
+                        Y, Y_tlm, Lambda, Sigma,                &
+                        RelTol, AbsTol, RelTol_adj, AbsTol_adj, &
+                        RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve TLM equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one LU factorization per stage)
+!
+!    ICNTRL(9) -> switch for TLM Newton iteration error estimation strategy
+!		ICNTRL(9) = 0: base number of iterations as forward solution
+!		ICNTRL(9) = 1: use RTOL_tlm and ATOL_tlm to calculate
+!				error estimation for TLM at Newton stages
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+
+! Arguments      
+      INTEGER, PARAMETER           :: NADJ = 1
+      INTEGER, INTENT(IN)          :: N, NSOA
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR), Y_tlm(NVAR,NSOA)
+      KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+      KPP_REAL, INTENT(INOUT) :: Sigma(NVAR,NSOA)
+      INTEGER, INTENT(IN)          :: ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(N), AbsTol(N), RCNTRL(20), &
+		    RelTol_adj(N,NSOA), AbsTol_adj(N,NSOA)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)        :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+
+!~~~>  Checkpoints in memory buffers
+      INTEGER :: stack_ptr = 0 ! last written entry in checkpoint
+      KPP_REAL, DIMENSION(:),     POINTER :: chk_H, chk_T
+      KPP_REAL, DIMENSION(:,:),   POINTER :: chk_Y
+      KPP_REAL, DIMENSION(:,:,:), POINTER :: chk_Z
+      KPP_REAL, DIMENSION(:,:,:),   POINTER :: chk_Y_tlm
+      KPP_REAL, DIMENSION(:,:,:,:), POINTER :: chk_Z_tlm
+      INTEGER,       DIMENSION(:,:),   POINTER :: chk_P
+#ifdef FULL_ALGEBRA
+      KPP_REAL, DIMENSION(:,:,:), POINTER :: chk_J
+#else
+      KPP_REAL, DIMENSION(:,:),   POINTER :: chk_J
+#endif
+
+!~~~>   Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      LOGICAL       :: SaveLU, DirectADJ                 
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      LOGICAL       :: StartNewton, DirectTLM, TLMNewtonEst, TLMtruncErr
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+       
+      Ierr = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps=ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+   !~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+
+!~~~> Solve ADJ equations directly or by Newton iterations 
+      DirectADJ = (ICNTRL(7) == 1)
+ 
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) .AND. (.NOT.DirectADJ)
+
+!~~~> Newton iteration error control selection  
+      IF (ICNTRL(9) == 0) THEN 
+         TLMNewtonEst = .FALSE.
+      ELSE
+         TLMNewtonEst = .TRUE.
+      END IF      
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+           
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+     IF (Ierr < 0) RETURN
+    
+!~~~>  Allocate memory buffers    
+    CALL SDIRK_AllocBuffers
+
+!~~~>  Call forward integration    
+    CALL SDIRK_FwdTlmInt( N, NSOA, Tinitial, Tfinal, Y, Y_tlm, Ierr )
+
+!~~~>  Call adjoint integration    
+    CALL SDIRK_SoaInt( N, NSOA, Lambda, Sigma, Ierr )
+
+!~~~>  Free memory buffers    
+    CALL SDIRK_FreeBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  Procedures internal to SDIRK_SOA
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_FwdTlmInt( N,NTLM,Tinitial,Tfinal,Y,Y_tlm,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N, NTLM
+      KPP_REAL, INTENT(INOUT) :: Y(N), Y_tlm(N,NTLM)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,rkS), G(NVAR), TMP(NVAR),         &   
+                       NewtonRate, SCAL(NVAR), DZ(NVAR),        &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew, Tdirection,     &
+                       NewtonIncrement, NewtonIncrementOld, &
+		       SCAL_tlm(NVAR), Yerr(N), Yerr_tlm(N,NTLM), ThetaTLM
+      KPP_REAL :: Z_tlm(NVAR,rkS,NTLM)
+      INTEGER :: itlm, j, IER, istage, NewtonIter, saveNiter, NewtonIterTLM
+      INTEGER :: IP(NVAR), IP_tlm(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR)  :: FJAC, E, Jac, E_tlm
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO) :: FJAC, E, Jac, E_tlm
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU  = .FALSE.
+      SkipJac = .FALSE.
+      Reject =  .FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+	       IF (StartNewton) THEN
+                 CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+	       END IF
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,DZ)	! DZ <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*DZ(1:N)
+	    CALL WSCAL(N, H*rkGamma, DZ, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, DZ, 1)
+            CALL WAXPY (N, ONE, G,1, DZ,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( 'N', H, N, E, IP, IER, DZ )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, DZ, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+DZ(:)
+            CALL WAXPY(N,ONE,DZ,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+    	       ! Tune error in TLM variables by defining the minimal number of Newton iterations.
+	       saveNiter = NewtonIter+1
+	       EXIT NewtonLoop
+	    END IF
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of simplified Newton iterations for forward variables
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solve for TLM variables
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+         TMP(1:N) = Y(1:N) + Z(1:N,istage)
+         SkipJac = .FALSE.
+         CALL SDIRK_PrepareMatrix ( H, T+rkC(istage)*H, TMP, Jac, &
+                   SkipJac, SkipLU, E_tlm, IP_tlm, Reject, IER )
+         IF (IER /= 0) CYCLE TLoop
+
+TlmL:    DO itlm = 1, NTLM
+            G(1:N) = Y_tlm(1:N,itlm)
+            IF (istage > 1) THEN
+              ! Gj(:) = sum_j Theta(i,j)*Zj_tlm(:) 
+              !       = H * sum_j A(i,j)*Jac(Zj(:))*(Yj_tlm+Zj_tlm)
+              DO j = 1, istage-1
+                  CALL WAXPY(N,rkTheta(istage,j),Z_tlm(1,j,itlm),1,G,1)
+              END DO
+            END IF
+            CALL SDIRK_Solve ( 'N', H, N, E_tlm, IP_tlm, IER, G )
+            Z_tlm(1:N,istage,itlm) = G(1:N) - Y_tlm(1:N,itlm)
+         END DO TlmL
+
+
+   END DO stages
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,Yerr)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,Yerr,1)
+      END DO  
+
+      CALL SDIRK_Solve ( 'N', H, N, E, IP, IER, Yerr )
+      CALL SDIRK_ErrorNorm(N, Yerr, SCAL, Err)
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Checkpoint (old) solution
+         CALL SDIRK_Push( T, H, Y, Z, Y_tlm, Z_tlm, E, IP )
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) THEN
+                 CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+                 DO itlm = 1, NTLM
+                   CALL WAXPY(N,rkD(i),Z_tlm(1,i,itlm),1,Y_tlm(1,itlm),1)
+                 END DO  
+            END IF     
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            ! For TLM: do not skip LU (decrease TLM error)
+   	    SkipLU = .FALSE.
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_FwdTlmInt
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_SoaInt( N, NSOA, Lambda, Sigma, Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+      INTEGER, PARAMETER  :: NADJ = 1
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N, NSOA
+      KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+      KPP_REAL, INTENT(INOUT) :: Sigma(NVAR,NSOA)
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Y(NVAR)
+      KPP_REAL :: Z(NVAR,Smax), U(NVAR,Smax),        &
+                       TMP(NVAR), G1(NVAR),               &   
+                       NewtonRate, SCAL(NVAR), DU(NVAR),  &
+                       T, H, Theta, NewtonPredictedErr,   &
+                       NewtonIncrement, NewtonIncrementOld
+      KPP_REAL :: Y_tlm(NVAR,NSOA), Z_tlm(NVAR,Smax,NSOA), &
+                       G2(NVAR,NSOA), Hess0(NHESS), TMP2(NVAR)
+      KPP_REAL :: W(NVAR,Smax,NSOA), TMP_tlm(NVAR) 
+      INTEGER :: j, IER, istage, iadj, isoa, NewtonIter, &
+                 IP(NVAR), IP_adj(NVAR)
+      LOGICAL :: Reject, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR) :: E, Jac, E_adj
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO):: E, Jac, E_adj
+#endif      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( stack_ptr > 0 )
+        
+   !~~~>  Recover checkpoints for stage values and vectors
+      CALL SDIRK_Pop( T, H, Y, Z, Y_tlm, Z_tlm, E, IP )
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+!      IF (.NOT.SaveLU) THEN
+!          SkipJac = .FALSE.; SkipLU = .FALSE.
+!          CALL SDIRK_PrepareMatrix ( H, T, Y, Jac, &
+!                   SkipJac, SkipLU, E, IP, Reject, IER )
+!         IF (IER /= 0) THEN
+!             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+!         END IF
+!      END IF      
+
+stages:DO istage = rkS, 1, -1
+
+!~~~>  Jacobian at the current stage solution
+       TMP(1:N) = Y(1:N) + Z(1:N,istage)
+       CALL JAC_CHEM(T+rkC(istage)*H,TMP,Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+            
+!~~~>  Hessian at the current stage solution
+       CALL HESS_CHEM(T+rkC(istage)*H,TMP,Hess0)
+       
+#ifdef FULL_ALGEBRA
+         E_adj(1:N,1:N) = -Jac(1:N,1:N)
+         DO j=1,N
+            E_adj(j,j) = E_adj(j,j) + ONE/(H*rkGamma)
+         END DO
+         CALL DGETRF( N, N, E_adj, N, IP_adj, IER )
+#else
+         E_adj(1:LU_NONZERO) = -Jac(1:LU_NONZERO)
+         DO i = 1,NVAR
+            j = LU_DIAG(i); E_adj(j) = E_adj(j) + ONE/(H*rkGamma)
+         END DO
+         CALL KppDecomp ( E_adj, IER)
+#endif
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         IF (IER /= 0)  THEN
+             PRINT*,'At stage ',istage,' the matrix used in adjoint', &
+                      ' computation is singular'
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+
+!~~~>   Prepare the loop-independent part of the right-hand side
+!~~~>   G1(:) = H*( B(i)*Lambda + sum_j A(j,i)*Uj(:) )
+       G1(1:N) = rkB(istage)*Lambda(1:N,1)
+       IF (istage < rkS) THEN
+           DO j = istage+1, rkS
+               CALL WAXPY(N,rkA(j,istage),U(1,j),1,G1,1)
+           END DO
+       END IF
+       G1(1:N)   = H*G1(1:N)
+       TMP2(1:N) = G1(1:N)
+       
+!       G1(:) = H*Jac^T*( B(i)*Lambda + sum_j A(j,i)*Uj(:) )
+#ifdef FULL_ALGEBRA  
+       TMP = MATMUL(TRANSPOSE(Jac),G1)    ! DZ <- Jac(Y+Z)*Y_tlm
+#else      
+       CALL JacTR_SP_Vec ( Jac, G1, TMP )    
+#endif      
+       G1(1:N)   = TMP(1:N)
+
+!~~~>  Compute FOA stage
+       CALL SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G1 )
+       U(1:N,istage) = G1(1:N)
+
+!~~~>   Prepare the loop-independent part of the SOA right-hand side
+       G1(1:N) = rkB(istage)*Lambda(1:N,1)
+       IF (istage < rkS) THEN
+           DO j = istage+1, rkS
+               CALL WAXPY(N,rkA(j,istage),U(1,j),1,G1,1)
+           END DO
+           CALL WAXPY(N,rkGamma,U(1,istage),1,G1,1)
+       END IF
+       G1(1:N)   = H*G1(1:N)
+       
+!~~~>    G2(:) = H*( B(i)*Sigma + sum_j A(j,i)*Wj(:) )
+       DO isoa = 1, NSOA
+       
+       G2(1:N,isoa) = rkB(istage)*Sigma(1:N,isoa)
+       IF (istage < rkS) THEN
+           DO j = istage+1, rkS
+	       G2(1:N,isoa) = G2(1:N,isoa) + rkA(j,istage)*W(1:N,j,isoa)
+           END DO
+       END IF
+       G2(1:N,isoa) = H*G2(1:N,isoa)
+
+#ifdef FULL_ALGEBRA  
+       TMP = MATMUL(TRANSPOSE(Jac),G2(1,isoa))    ! DZ <- Jac(Y+Z)*Y_tlm
+#else      
+       CALL JacTR_SP_Vec ( Jac, G2(1,isoa), TMP )    
+#endif      
+       G2(1:N,isoa) = TMP(1:N)
+
+!~~~>   Add [ Hess0 x Y_tlm(istage) ]^T * G1
+       TMP_tlm(1:N) = Y_tlm(1:N,isoa) + Z_tlm(1:N,istage,isoa)
+       CALL HessTR_Vec ( Hess0, G1, TMP_tlm, TMP )
+       G2(1:N,isoa) = G2(1:N,isoa) + TMP(1:N)
+
+       END DO ! isoa = 1, NSOA
+       
+!~~~>  Compute SOA stage
+       DO isoa = 1, NSOA
+         TMP(1:N) = G2(1:N,isoa)
+         CALL SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, TMP )
+         W(1:N,istage,isoa) = TMP
+       END DO ! isoa = 1, NSOA
+ 
+   END DO stages
+
+!~~~> Update first order adjoint solution
+         DO istage = 1,rkS 
+             Lambda(1:N,1) = Lambda(1:N,1) + U(1:N,istage)
+         END DO  
+
+!~~~> Update second order adjoint solution
+         DO istage = 1,rkS 
+             DO isoa = 1,NSOA
+                 Sigma(1:N,isoa) = Sigma(1:N,isoa) + W(1:N,istage,isoa)
+             END DO  
+         END DO  
+
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_SoaInt
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_AllocBuffers
+!~~~>  Allocate buffer space for checkpointing
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       INTEGER :: i
+   
+       ALLOCATE( chk_H(Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer H'; STOP
+       END IF   
+       ALLOCATE( chk_T(Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer T'; STOP
+       END IF   
+       ALLOCATE( chk_Y(NVAR,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer Y'; STOP
+       END IF   
+       ALLOCATE( chk_Y_tlm(NVAR,NSOA,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer Y_tlm'; STOP
+       END IF   
+       ALLOCATE( chk_Z(NVAR,rkS,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer Z'; STOP
+       END IF   
+       ALLOCATE( chk_Z_tlm(NVAR,rkS,NSOA,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer Z_tlm'; STOP
+       END IF   
+       IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+          ALLOCATE( chk_J(NVAR,NVAR,Max_no_steps),  STAT=i )
+#else
+          ALLOCATE( chk_J(LU_NONZERO,Max_no_steps), STAT=i )
+#endif
+          IF (i/=0) THEN
+             PRINT*,'Failed allocation of buffer J'; STOP
+          END IF   
+          ALLOCATE( chk_P(NVAR,Max_no_steps), STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed allocation of buffer P'; STOP
+          END IF   
+       END IF   
+ 
+     END SUBROUTINE SDIRK_AllocBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     SUBROUTINE SDIRK_FreeBuffers
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       INTEGER :: i
+   
+       DEALLOCATE( chk_H, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer H'; STOP
+       END IF   
+       DEALLOCATE( chk_T, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer T'; STOP
+       END IF   
+       DEALLOCATE( chk_Y, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer Y'; STOP
+       END IF   
+       DEALLOCATE( chk_Y_tlm, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer Y_tlm'; STOP
+       END IF   
+       DEALLOCATE( chk_Z, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer Z'; STOP
+       END IF   
+       DEALLOCATE( chk_Z_tlm, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer Z_tlm'; STOP
+       END IF   
+       IF (SaveLU) THEN
+          DEALLOCATE( chk_J, STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed deallocation of buffer J'; STOP
+          END IF   
+          DEALLOCATE( chk_P, STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed deallocation of buffer P'; STOP
+          END IF   
+       END IF   
+ 
+     END SUBROUTINE SDIRK_FreeBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     SUBROUTINE SDIRK_Push( T, H, Y, Z, Y_tlm, Z_tlm, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       KPP_REAL :: T, H, Y(NVAR), Z(NVAR,rkS) 
+       KPP_REAL :: Y_tlm(NVAR,NSOA), Z_tlm(NVAR,rkS,NSOA)
+       INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+       KPP_REAL :: E(NVAR,NVAR)
+#else       
+       KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+       stack_ptr = stack_ptr + 1
+       IF ( stack_ptr > Max_no_steps ) THEN
+         PRINT*,'Push failed: buffer overflow'
+         STOP
+       END IF  
+       chk_H( stack_ptr ) = H
+       chk_T( stack_ptr ) = T
+       chk_Y(1:NVAR,stack_ptr) = Y(1:NVAR)
+       chk_Z(1:NVAR,1:rkS,stack_ptr) = Z(1:NVAR,1:rkS)
+       chk_Y_tlm(1:NVAR,1:NSOA,stack_ptr) = Y_tlm(1:NVAR,1:NSOA)
+       chk_Z_tlm(1:NVAR,1:rkS,1:NSOA,stack_ptr) = Z_tlm(1:NVAR,1:rkS,1:NSOA)
+       IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+          chk_J(1:NVAR,1:NVAR,stack_ptr) = E(1:NVAR,1:NVAR)
+          chk_P(1:NVAR,stack_ptr)        = P(1:NVAR)
+#else       
+          chk_J(1:LU_NONZERO,stack_ptr)  = E(1:LU_NONZERO)
+#endif
+       END IF
+  
+      END SUBROUTINE SDIRK_Push
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Pop( T, H, Y, Z, Y_tlm, Z_tlm, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       KPP_REAL :: T, H, Y(NVAR), Z(NVAR,Smax)
+       KPP_REAL :: Y_tlm(NVAR,NSOA), Z_tlm(NVAR,Smax,NSOA)
+       INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+       KPP_REAL :: E(NVAR,NVAR)
+#else       
+       KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+       IF ( stack_ptr <= 0 ) THEN
+         PRINT*,'Pop failed: empty buffer'
+         STOP
+       END IF  
+       H = chk_H( stack_ptr )
+       T = chk_T( stack_ptr )
+       Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+       Z(1:NVAR,1:rkS) = chk_Z(1:NVAR,1:rkS,stack_ptr)
+       Y_tlm(1:NVAR,1:NSOA) = chk_Y_tlm(1:NVAR,1:NSOA,stack_ptr)
+       Z_tlm(1:NVAR,1:rkS,1:NSOA) = chk_Z_tlm(1:NVAR,1:rkS,1:NSOA,stack_ptr)
+       IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+          E(1:NVAR,1:NVAR) = chk_J(1:NVAR,1:NVAR,stack_ptr)
+          P(1:NVAR)        = chk_P(1:NVAR,stack_ptr)
+#else       
+          E(1:LU_NONZERO)  = chk_J(1:LU_NONZERO,stack_ptr)
+#endif
+       END IF
+
+       stack_ptr = stack_ptr - 1
+  
+      END SUBROUTINE SDIRK_Pop
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, N, ITOL
+      KPP_REAL :: AbsTol(N), RelTol(N), &
+                       Y(N), SCAL(N)
+      IF (ITOL == 0) THEN
+        DO i=1,N
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,N
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound', max_no_steps
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .FALSE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( Transp, H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = R
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      CHARACTER, INTENT(IN)     :: Transp
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+      SELECT CASE (TRANSP)
+      CASE ('N')
+#ifdef FULL_ALGEBRA  
+         CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+         CALL KppSolve(E, RHS)
+#endif
+      CASE ('T')
+#ifdef FULL_ALGEBRA  
+         CALL DGETRS( 'T', N, 1, E, N, IP, RHS, N, ISING )
+#else
+         CALL KppSolveTR(E, RHS, RHS)
+#endif
+      CASE DEFAULT
+         PRINT*,'Error in SDIRK_Solve. Unknown Transp argument:',Transp
+         STOP
+      END SELECT
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRK_SOA ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+!    Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+    
+!    TIME = Told
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP,LU_IROW,LU_ICOL
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+  
+      KPP_REAL ::  T, Told
+      KPP_REAL ::  Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+!    Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO j=1,NVAR
+          JV(i,j) = 0.0d0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+    
+!    TIME = Told
+
+      END SUBROUTINE JAC_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE HESS_CHEM( T, Y, Hes )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+!~~~> Input variables     
+    KPP_REAL, INTENT(IN)  :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL, INTENT(OUT) :: Hes(NHESS)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+!    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    
+    CALL Hessian( Y, FIX, RCONST, Hes )
+    
+!    TIME = Told
+
+END SUBROUTINE HESS_CHEM                                      
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_tlm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_tlm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_tlm.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk_tlm
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/sdirk_tlm.f90	(revision 3477)
@@ -0,0 +1,1461 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SDIRK-TLM - Tangent Linear Model of Singly-Diagonally-Implicit RK      !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2005                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_Jacobian, ONLY:   Jac_SP_Vec
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp,    &
+               KppSolve, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_TLM( NTLM, Y, Y_tlm, TIN, TOUT, ATOL_tlm,RTOL_tlm, &
+       ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR,ind_O3
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+!~~~> Y - Concentrations
+    KPP_REAL :: Y(NVAR)
+!~~~> NTLM - No. of sensitivity coefficients
+    INTEGER NTLM
+!~~~> Y_tlm - Sensitivities of concentrations
+!     Note: Y_tlm (1:NVAR,j) contains sensitivities of
+!               Y(1:NVAR) w.r.t. the j-th parameter, j=1...NTLM
+    KPP_REAL :: Y_tlm(NVAR,NTLM)
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RTOL_tlm(NVAR,NTLM),ATOL_tlm(NVAR,NTLM)
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER       :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are interpolated (0) or zero (1)
+    ICNTRL(7)  = 0   ! How to solve TLM: 0=modified Newton, 1=direct
+    ICNTRL(9)  = 0   ! TLM Newton Iterations influence
+    ICNTRL(12) = 0   ! TLM Truncation Error influence
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+
+    T1 = TIN; T2 = TOUT
+    CALL SdirkTLM(  NVAR, NTLM, T1, T2, Y, Y_tlm, RTOL, ATOL, &
+                    RTOL_tlm, ATOL_tlm, RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+    !~~~> Debug option: print number of steps
+    ! Ntotal = Ntotal + ISTATUS(Nstp)
+    ! PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'SDIRK-TLM: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE_TLM
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SdirkTLM(N, NTLM, Tinitial, Tfinal, Y, Y_tlm, RelTol, AbsTol, &
+                          RelTol_tlm, AbsTol_tlm, &
+			  RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve TLM equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one LU factorization per stage)
+!
+!    ICNTRL(9) -> switch for TLM Newton iteration error estimation strategy
+!		ICNTRL(9) = 0: base number of iterations as forward solution
+!		ICNTRL(9) = 1: use RTOL_tlm and ATOL_tlm to calculate
+!				error estimation for TLM at Newton stages
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, NTLM, ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(N), AbsTol(N), RCNTRL(20), &
+		    RelTol_tlm(N,NTLM), AbsTol_tlm(N,NTLM)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR), Y_tlm(N,NTLM)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+
+! Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      LOGICAL       :: StartNewton, DirectTLM, TLMNewtonEst, TLMtruncErr
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+       
+      Ierr = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps=ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+   !~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~> Solve TLM equations directly or by Newton iterations 
+      DirectTLM = (ICNTRL(7) == 1)
+!~~~> Newton iteration error control selection  
+      IF (ICNTRL(9) == 0) THEN 
+         TLMNewtonEst = .FALSE.
+      ELSE
+         TLMNewtonEst = .TRUE.
+      END IF      
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+           
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+    IF (Ierr < 0) RETURN
+
+    CALL SDIRK_IntegratorTLM( N,NTLM,Tinitial,Tfinal,Y,Y_tlm,Ierr )
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  PROCEDURES INTERNAL TO SDIRK
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_IntegratorTLM( N,NTLM,Tinitial,Tfinal,Y,Y_tlm,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N, NTLM
+      KPP_REAL, INTENT(INOUT) :: Y(N), Y_tlm(N,NTLM)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,rkS), G(NVAR), TMP(NVAR),         &   
+                       NewtonRate, SCAL(NVAR), DZ(NVAR),        &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew, Tdirection,     &
+                       NewtonIncrement, NewtonIncrementOld, &
+		       SCAL_tlm(NVAR), Yerr(N), Yerr_tlm(N,NTLM), ThetaTLM
+      KPP_REAL :: Z_tlm(NVAR,rkS,NTLM)
+      INTEGER :: itlm, j, IER, istage, NewtonIter, saveNiter, NewtonIterTLM
+      INTEGER :: IP(NVAR), IP_tlm(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR)  :: FJAC, E, Jac, E_tlm
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO) :: FJAC, E, Jac, E_tlm
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU  = .FALSE.
+      SkipJac = .FALSE.
+      Reject =  .FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+	       IF (StartNewton) THEN
+                 CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+	       END IF
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,DZ)	! DZ <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*DZ(1:N)
+	    CALL WSCAL(N, H*rkGamma, DZ, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, DZ, 1)
+            CALL WAXPY (N, ONE, G,1, DZ,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( H, N, E, IP, IER, DZ )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, DZ, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+DZ(:)
+            CALL WAXPY(N,ONE,DZ,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+    	       ! Tune error in TLM variables by defining the minimal number of Newton iterations.
+	       saveNiter = NewtonIter+1
+	       EXIT NewtonLoop
+	    END IF
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of simplified Newton iterations for forward variables
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solve for TLM variables
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Direct solution for TLM variables
+DirTLM:IF (DirectTLM) THEN 
+
+         TMP(1:N) = Y(1:N) + Z(1:N,istage)
+         SkipJac = .FALSE.
+         CALL SDIRK_PrepareMatrix ( H, T+rkC(istage)*H, TMP, Jac, &
+                   SkipJac, SkipLU, E_tlm, IP_tlm, Reject, IER )
+         IF (IER /= 0) CYCLE TLoop
+
+TlmL:    DO itlm = 1, NTLM
+            G(1:N) = Y_tlm(1:N,itlm)
+            IF (istage > 1) THEN
+              ! Gj(:) = sum_j Theta(i,j)*Zj_tlm(:) 
+              !       = H * sum_j A(i,j)*Jac(Zj(:))*(Yj_tlm+Zj_tlm)
+              DO j = 1, istage-1
+                  CALL WAXPY(N,rkTheta(istage,j),Z_tlm(1,j,itlm),1,G,1)
+              END DO
+            END IF
+            CALL SDIRK_Solve ( H, N, E_tlm, IP_tlm, IER, G )
+            Z_tlm(1:N,istage,itlm) = G(1:N) - Y_tlm(1:N,itlm)
+         END DO TlmL
+
+       ELSE DirTLM
+
+!~~~>  Jacobian of the current stage solution
+       TMP(1:N) = Y(1:N) + Z(1:N,istage)
+       CALL JAC_CHEM(T+rkC(istage)*H,TMP,Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+
+!~~~>  Simplified Newton iterations for TLM variables
+TlmLoop:DO itlm = 1,NTLM
+       NewtonRate = MAX(NewtonRate,Roundoff)**0.8d0
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z_tlm(1,istage,itlm))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+#ifdef FULL_ALGEBRA  
+       DZ = MATMUL(Jac,Y_tlm(1,itlm))    ! DZ <- Jac(Y+Z)*Y_tlm
+#else      
+       CALL Jac_SP_Vec ( Jac, Y_tlm(1,itlm), DZ )    
+#endif      
+       G(1:N) = (H*rkGamma)*DZ(1:N)
+       IF (istage > 1) THEN
+           ! Gj(:) = sum_j Theta(i,j)*Zj_tlm(:) 
+           !       = H * sum_j A(i,j)*Jac(Zj(:))*(Yj_tlm+Zj_tlm)
+           DO j = 1, istage-1
+               CALL WAXPY(N,rkTheta(istage,j),Z_tlm(1,j,itlm),1,G,1)
+           END DO
+       END IF
+       
+       
+       !~~~>  Initializations for Newton iteration
+       IF (TLMNewtonEst) THEN
+          NewtonDone = .FALSE.
+          Fac = 0.5d0 ! Step reduction factor if too many iterations
+
+          CALL SDIRK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+               Y_tlm(1,itlm),SCAL_tlm)
+       END IF
+            
+NewtonLoopTLM:DO NewtonIterTLM = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+#ifdef FULL_ALGEBRA  
+            DZ = MATMUL(Jac,Z_tlm(1,istage,itlm))    ! DZ <- Jac(Y+Z)*Z_tlm
+#else      
+            CALL Jac_SP_Vec ( Jac, Z_tlm(1,istage,itlm), DZ )    
+#endif      
+            DZ(1:N) = (H*rkGamma)*DZ(1:N)+G(1:N)-Z_tlm(1:N,istage,itlm)
+
+            CALL SDIRK_Solve ( H, N, E, IP, IER, DZ )
+            
+	    IF (TLMNewtonEst) THEN
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, DZ, SCAL_tlm, NewtonIncrement)
+            IF ( NewtonIterTLM <= 1 ) THEN
+                ThetaTLM      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaTLM = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaTLM < 0.99d0) THEN
+                    NewtonRate = ThetaTLM/(ONE-ThetaTLM)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaTLM**(NewtonMaxit-NewtonIterTLM)/(ONE-ThetaTLM)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIterTLM))
+                      EXIT NewtonLoopTLM
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoopTLM
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+	    END IF !(TLMNewtonEst)
+	    
+            ! Update solution: Z_tlm(:) <-- Z_tlm(:)+DZ(:)
+            CALL WAXPY(N,ONE,DZ,1,Z_tlm(1,istage,itlm),1) 
+            
+            ! Check error in Newton iterations
+            IF (TLMNewtonEst) THEN
+               NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+               IF (NewtonDone) EXIT NewtonLoopTLM
+	    ELSE
+  	       ! Minimum number of iterations same as FWD iterations
+               IF (NewtonIterTLM>=saveNiter) EXIT NewtonLoopTLM
+	    END IF
+            
+            END DO NewtonLoopTLM
+            
+            IF ((TLMNewtonEst) .AND. (.NOT.NewtonDone)) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+      END DO TlmLoop
+!~~~> End of simplified Newton iterations for TLM
+
+    END IF DirTLM
+
+   END DO stages
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,Yerr)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,Yerr,1)
+      END DO  
+
+      CALL SDIRK_Solve ( H, N, E, IP, IER, Yerr )
+      CALL SDIRK_ErrorNorm(N, Yerr, SCAL, Err)
+
+      IF (TLMtruncErr) THEN
+        CALL Set2zero(NVAR*NTLM,Yerr_tlm)
+        DO itlm=1,NTLM
+          DO j=1,rkS  
+            IF (rkE(j) /= ZERO) CALL WAXPY(N,rkE(j),Z_tlm(1,j,itlm),1,Yerr_tlm(1,itlm),1)
+          END DO 
+	  CALL SDIRK_Solve (H, N, E, IP, IER, Yerr_tlm(1,itlm))
+        END DO
+        CALL SDIRK_ErrorNorm_tlm(N,NTLM, Yerr_tlm, Err)
+      END IF
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) THEN
+                 CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+                 DO itlm = 1, NTLM
+                   CALL WAXPY(N,rkD(i),Z_tlm(1,i,itlm),1,Y_tlm(1,itlm),1)
+                 END DO  
+            END IF     
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            ! For TLM: do not skip LU (decrease TLM error)
+   	    SkipLU = .FALSE.
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_IntegratorTLM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, i, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,N
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,N
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm_tlm(N,NTLM, Y_tlm, FWD_Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: itlm, NTLM, N
+      KPP_REAL :: Y_tlm(N,NTLM), SCAL_tlm(N), FWD_Err, Err  
+      
+      DO itlm=1,NTLM
+        CALL SDIRK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+               Y_tlm(1,itlm),SCAL_tlm)
+	CALL SDIRK_ErrorNorm(N, Y_tlm(1,itlm), SCAL_tlm, Err)
+	FWD_Err = MAX(FWD_Err, Err)
+      END DO
+!
+      END SUBROUTINE SDIRK_ErrorNorm_tlm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = I - 1/(H*Gamma)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .TRUE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = R
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+#ifdef FULL_ALGEBRA  
+      CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+      CALL KppSolve(E, RHS)
+#endif
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SdirkTLM ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+      
+      TIME = Told
+      
+    END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP,LU_IROW,LU_ICOL
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+  
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO i=1,NVAR
+           JV(i,j) = 0.0D0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+
+    END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/tau_leap.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/tau_leap.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/tau_leap.def	(revision 3477)
@@ -0,0 +1,10 @@
+ 
+#FUNCTION   aggregate
+#JACOBIAN   SPARSE_LU_ROW
+#DOUBLE     on 
+#STOCHASTIC on 
+#INTFILE    tau_leap
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/tau_leap.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/tau_leap.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/tau_leap.f90	(revision 3477)
@@ -0,0 +1,1688 @@
+MODULE KPP_ROOT_Random
+! A module for random number generation from the following distributions:
+!
+!     Distribution                    Function/subroutine name
+!
+!     Normal (Gaussian)               random_normal
+!     Gamma                           random_gamma
+!     Chi-squared                     random_chisq
+!     Exponential                     random_exponential
+!     Weibull                         random_Weibull
+!     Beta                            random_beta
+!     t                               random_t
+!     Multivariate normal             random_mvnorm
+!     Generalized inverse Gaussian    random_inv_gauss
+!     Poisson                         random_Poisson
+!     Binomial                        random_binomial1   *
+!                                     random_binomial2   *
+!     Negative binomial               random_neg_binomial
+!     von Mises                       random_von_Mises
+!     Cauchy                          random_Cauchy
+!
+!  Generate a random ordering of the integers 1 .. N
+!                                     random_order
+!     Initialize (seed) the uniform random number generator for ANY compiler
+!                                     seed_random_number
+
+!     Lognormal - see note below.
+
+!  ** Two functions are provided for the binomial distribution.
+!  If the parameter values remain constant, it is recommended that the
+!  first function is used (random_binomial1).   If one or both of the
+!  parameters change, use the second function (random_binomial2).
+
+! The compilers own random number generator, SUBROUTINE RANDOM_NUMBER(r),
+! is used to provide a source of uniformly distributed random numbers.
+
+! N.B. At this stage, only one random number is generated at each call to
+!      one of the functions above.
+
+! The module uses the following functions which are included here:
+! bin_prob to calculate a single binomial probability
+! lngamma  to calculate the logarithm to base e of the gamma function
+
+! Some of the code is adapted from Dagpunar's book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+!
+! In most of Dagpunar's routines, there is a test to see whether the value
+! of one or two floating-point parameters has changed since the last call.
+! These tests have been replaced by using a logical variable FIRST.
+! This should be set to .TRUE. on the first call using new values of the
+! parameters, and .FALSE. if the parameter values are the same as for the
+! previous call.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Lognormal distribution
+! If X has a lognormal distribution, then log(X) is normally distributed.
+! Here the logarithm is the natural logarithm, that is to base e, sometimes
+! denoted as ln.  To generate random variates from this distribution, generate
+! a random deviate from the normal distribution with mean and variance equal
+! to the mean and variance of the logarithms of X, then take its exponential.
+
+! Relationship between the mean & variance of log(X) and the mean & variance
+! of X, when X has a lognormal distribution.
+! Let m = mean of log(X), and s^2 = variance of log(X)
+! Then
+! mean of X     = exp(m + 0.5s^2)
+! variance of X = (mean(X))^2.[exp(s^2) - 1]
+
+! In the reverse direction (rarely used)
+! variance of log(X) = log[1 + var(X)/(mean(X))^2]
+! mean of log(X)     = log(mean(X) - 0.5var(log(X))
+
+! N.B. The above formulae relate to population parameters; they will only be
+!      approximate if applied to sample values.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! Version 1.13, 2 October 2000
+! Changes from version 1.01
+! 1. The random_order, random_Poisson & random_binomial routines have been
+!    replaced with more efficient routines.
+! 2. A routine, seed_random_number, has been added to seed the uniform random
+!    number generator.   This requires input of the required number of seeds
+!    for the particular compiler from a specified I/O unit such as a keyboard.
+! 3. Made compatible with Lahey's ELF90.
+! 4. Marsaglia & Tsang algorithm used for random_gamma when shape parameter > 1.
+! 5. INTENT for array f corrected in random_mvnorm.
+
+!     Author: Alan Miller
+!             CSIRO Division of Mathematical & Information Sciences
+!             Private Bag 10, Clayton South MDC
+!             Clayton 3169, Victoria, Australia
+!     Phone: (+61) 3 9545-8016      Fax: (+61) 3 9545-8080
+!     e-mail: amiller @ bigpond.net.au
+
+IMPLICIT NONE
+REAL, PRIVATE      :: zero = 0.0, half = 0.5, one = 1.0, two = 2.0,   &
+                      vsmall = TINY(1.0), vlarge = HUGE(1.0)
+PRIVATE            :: integral
+INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(12, 60)
+
+
+CONTAINS
+
+
+FUNCTION random_normal() RESULT(fn_val)
+
+! Adapted from the following Fortran 77 code
+!      ALGORITHM 712, COLLECTED ALGORITHMS FROM ACM.
+!      THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+!      VOL. 18, NO. 4, DECEMBER, 1992, PP. 434-435.
+
+!  The function random_normal() returns a normally distributed pseudo-random
+!  number with zero mean and unit variance.
+
+!  The algorithm uses the ratio of uniforms method of A.J. Kinderman
+!  and J.F. Monahan augmented with quadratic bounding curves.
+
+REAL :: fn_val
+
+!     Local variables
+REAL     :: s = 0.449871, t = -0.386595, a = 0.19600, b = 0.25472,           &
+            r1 = 0.27597, r2 = 0.27846, u, v, x, y, q
+
+!     Generate P = (u,v) uniform in rectangle enclosing acceptance region
+
+DO
+  CALL RANDOM_NUMBER(u)
+  CALL RANDOM_NUMBER(v)
+  v = 1.7156 * (v - half)
+
+!     Evaluate the quadratic form
+  x = u - s
+  y = ABS(v) - t
+  q = x**2 + y*(a*y - b*x)
+
+!     Accept P if inside inner ellipse
+  IF (q < r1) EXIT
+!     Reject P if outside outer ellipse
+  IF (q > r2) CYCLE
+!     Reject P if outside acceptance region
+  IF (v**2 < -4.0*LOG(u)*u**2) EXIT
+END DO
+
+!     Return ratio of P's coordinates as the normal deviate
+fn_val = v/u
+RETURN
+
+END FUNCTION random_normal
+
+
+
+FUNCTION random_gamma(s, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+!     FUNCTION GENERATES A RANDOM GAMMA VARIATE.
+!     CALLS EITHER random_gamma1 (S > 1.0)
+!     OR random_exponential (S = 1.0)
+!     OR random_gamma2 (S < 1.0).
+
+!     S = SHAPE PARAMETER OF DISTRIBUTION (0 < REAL).
+
+REAL, INTENT(IN)    :: s
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+IF (s <= zero) THEN
+  WRITE(*, *) 'SHAPE PARAMETER VALUE MUST BE POSITIVE'
+  STOP
+END IF
+
+IF (s > one) THEN
+  fn_val = random_gamma1(s, first)
+ELSE IF (s < one) THEN
+  fn_val = random_gamma2(s, first)
+ELSE
+  fn_val = random_exponential()
+END IF
+
+RETURN
+END FUNCTION random_gamma
+
+
+
+FUNCTION random_gamma1(s, first) RESULT(fn_val)
+
+! Uses the algorithm in
+! Marsaglia, G. and Tsang, W.W. (2000) `A simple method for generating
+! gamma variables', Trans. om Math. Software (TOMS), vol.26(3), pp.363-372.
+
+! Generates a random gamma deviate for shape parameter s >= 1.
+
+REAL, INTENT(IN)    :: s
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+! Local variables
+REAL, SAVE  :: c, d
+REAL        :: u, v, x
+
+IF (first) THEN
+  d = s - one/3.
+  c = one/SQRT(9.0*d)
+END IF
+
+! Start of main loop
+DO
+
+! Generate v = (1+cx)^3 where x is random normal; repeat if v <= 0.
+
+  DO
+    x = random_normal()
+    v = (one + c*x)**3
+    IF (v > zero) EXIT
+  END DO
+
+! Generate uniform variable U
+
+  CALL RANDOM_NUMBER(u)
+  IF (u < one - 0.0331*x**4) THEN
+    fn_val = d*v
+    EXIT
+  ELSE IF (LOG(u) < half*x**2 + d*(one - v + LOG(v))) THEN
+    fn_val = d*v
+    EXIT
+  END IF
+END DO
+
+RETURN
+END FUNCTION random_gamma1
+
+
+
+FUNCTION random_gamma2(s, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,INFINITY) FROM
+! A GAMMA DISTRIBUTION WITH DENSITY PROPORTIONAL TO
+! GAMMA2**(S-1) * EXP(-GAMMA2),
+! USING A SWITCHING METHOD.
+
+!    S = SHAPE PARAMETER OF DISTRIBUTION
+!          (REAL < 1.0)
+
+REAL, INTENT(IN)    :: s
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+!     Local variables
+REAL       :: r, x, w
+REAL, SAVE :: a, p, c, uf, vr, d
+
+IF (s <= zero .OR. s >= one) THEN
+  WRITE(*, *) 'SHAPE PARAMETER VALUE OUTSIDE PERMITTED RANGE'
+  STOP
+END IF
+
+IF (first) THEN                        ! Initialization, if necessary
+  a = one - s
+  p = a/(a + s*EXP(-a))
+  IF (s < vsmall) THEN
+    WRITE(*, *) 'SHAPE PARAMETER VALUE TOO SMALL'
+    STOP
+  END IF
+  c = one/s
+  uf = p*(vsmall/a)**s
+  vr = one - vsmall
+  d = a*LOG(a)
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r)
+  IF (r >= vr) THEN
+    CYCLE
+  ELSE IF (r > p) THEN
+    x = a - LOG((one - r)/(one - p))
+    w = a*LOG(x)-d
+  ELSE IF (r > uf) THEN
+    x = a*(r/p)**c
+    w = x
+  ELSE
+    fn_val = zero
+    RETURN
+  END IF
+
+  CALL RANDOM_NUMBER(r)
+  IF (one-r <= w .AND. r > zero) THEN
+    IF (r*(w + one) >= one) CYCLE
+    IF (-LOG(r) <= w) CYCLE
+  END IF
+  EXIT
+END DO
+
+fn_val = x
+RETURN
+
+END FUNCTION random_gamma2
+
+
+
+FUNCTION random_chisq(ndf, first) RESULT(fn_val)
+
+!     Generates a random variate from the chi-squared distribution with
+!     ndf degrees of freedom
+
+INTEGER, INTENT(IN) :: ndf
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+fn_val = two * random_gamma(half*ndf, first)
+RETURN
+
+END FUNCTION random_chisq
+
+
+
+FUNCTION random_exponential() RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,INFINITY) FROM
+! A NEGATIVE EXPONENTIAL DlSTRIBUTION WlTH DENSITY PROPORTIONAL
+! TO EXP(-random_exponential), USING INVERSION.
+
+REAL  :: fn_val
+
+!     Local variable
+REAL  :: r
+
+DO
+  CALL RANDOM_NUMBER(r)
+  IF (r > zero) EXIT
+END DO
+
+fn_val = -LOG(r)
+RETURN
+
+END FUNCTION random_exponential
+
+
+
+FUNCTION random_Weibull(a) RESULT(fn_val)
+
+!     Generates a random variate from the Weibull distribution with
+!     probability density:
+!                      a
+!               a-1  -x
+!     f(x) = a.x    e
+
+REAL, INTENT(IN) :: a
+REAL             :: fn_val
+
+!     For speed, there is no checking that a is not zero or very small.
+
+fn_val = random_exponential() ** (one/a)
+RETURN
+
+END FUNCTION random_Weibull
+
+
+
+FUNCTION random_beta(aa, bb, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,1]
+! FROM A BETA DISTRIBUTION WITH DENSITY
+! PROPORTIONAL TO BETA**(AA-1) * (1-BETA)**(BB-1).
+! USING CHENG'S LOG LOGISTIC METHOD.
+
+!     AA = SHAPE PARAMETER FROM DISTRIBUTION (0 < REAL)
+!     BB = SHAPE PARAMETER FROM DISTRIBUTION (0 < REAL)
+
+REAL, INTENT(IN)    :: aa, bb
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+!     Local variables
+REAL, PARAMETER  :: aln4 = 1.3862944
+REAL             :: a, b, g, r, s, x, y, z
+REAL, SAVE       :: d, f, h, t, c
+LOGICAL, SAVE    :: swap
+
+IF (aa <= zero .OR. bb <= zero) THEN
+  WRITE(*, *) 'IMPERMISSIBLE SHAPE PARAMETER VALUE(S)'
+  STOP
+END IF
+
+IF (first) THEN                        ! Initialization, if necessary
+  a = aa
+  b = bb
+  swap = b > a
+  IF (swap) THEN
+    g = b
+    b = a
+    a = g
+  END IF
+  d = a/b
+  f = a+b
+  IF (b > one) THEN
+    h = SQRT((two*a*b - f)/(f - two))
+    t = one
+  ELSE
+    h = b
+    t = one/(one + (a/(vlarge*b))**b)
+  END IF
+  c = a+h
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r)
+  CALL RANDOM_NUMBER(x)
+  s = r*r*x
+  IF (r < vsmall .OR. s <= zero) CYCLE
+  IF (r < t) THEN
+    x = LOG(r/(one - r))/h
+    y = d*EXP(x)
+    z = c*x + f*LOG((one + d)/(one + y)) - aln4
+    IF (s - one > z) THEN
+      IF (s - s*z > one) CYCLE
+      IF (LOG(s) > z) CYCLE
+    END IF
+    fn_val = y/(one + y)
+  ELSE
+    IF (4.0*s > (one + one/d)**f) CYCLE
+    fn_val = one
+  END IF
+  EXIT
+END DO
+
+IF (swap) fn_val = one - fn_val
+RETURN
+END FUNCTION random_beta
+
+
+
+FUNCTION random_t(m) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE FROM A
+! T DISTRIBUTION USING KINDERMAN AND MONAHAN'S RATIO METHOD.
+
+!     M = DEGREES OF FREEDOM OF DISTRIBUTION
+!           (1 <= 1NTEGER)
+
+INTEGER, INTENT(IN) :: m
+REAL                :: fn_val
+
+!     Local variables
+REAL, SAVE      :: s, c, a, f, g
+REAL            :: r, x, v
+
+REAL, PARAMETER :: three = 3.0, four = 4.0, quart = 0.25,   &
+                   five = 5.0, sixteen = 16.0
+INTEGER         :: mm = 0
+
+IF (m < 1) THEN
+  WRITE(*, *) 'IMPERMISSIBLE DEGREES OF FREEDOM'
+  STOP
+END IF
+
+IF (m /= mm) THEN                    ! Initialization, if necessary
+  s = m
+  c = -quart*(s + one)
+  a = four/(one + one/s)**c
+  f = sixteen/a
+  IF (m > 1) THEN
+    g = s - one
+    g = ((s + one)/g)**c*SQRT((s+s)/g)
+  ELSE
+    g = one
+  END IF
+  mm = m
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r)
+  IF (r <= zero) CYCLE
+  CALL RANDOM_NUMBER(v)
+  x = (two*v - one)*g/r
+  v = x*x
+  IF (v > five - a*r) THEN
+    IF (m >= 1 .AND. r*(v + three) > f) CYCLE
+    IF (r > (one + v/s)**c) CYCLE
+  END IF
+  EXIT
+END DO
+
+fn_val = x
+RETURN
+END FUNCTION random_t
+
+
+
+SUBROUTINE random_mvnorm(n, h, d, f, first, x, ier)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! N.B. An extra argument, ier, has been added to Dagpunar's routine
+
+!     SUBROUTINE GENERATES AN N VARIATE RANDOM NORMAL
+!     VECTOR USING A CHOLESKY DECOMPOSITION.
+
+! ARGUMENTS:
+!        N = NUMBER OF VARIATES IN VECTOR
+!           (INPUT,INTEGER >= 1)
+!     H(J) = J'TH ELEMENT OF VECTOR OF MEANS
+!           (INPUT,REAL)
+!     X(J) = J'TH ELEMENT OF DELIVERED VECTOR
+!           (OUTPUT,REAL)
+!
+!    D(J*(J-1)/2+I) = (I,J)'TH ELEMENT OF VARIANCE MATRIX (J> = I)
+!            (INPUT,REAL)
+!    F((J-1)*(2*N-J)/2+I) = (I,J)'TH ELEMENT OF LOWER TRIANGULAR
+!           DECOMPOSITION OF VARIANCE MATRIX (J <= I)
+!            (OUTPUT,REAL)
+
+!    FIRST = .TRUE. IF THIS IS THE FIRST CALL OF THE ROUTINE
+!    OR IF THE DISTRIBUTION HAS CHANGED SINCE THE LAST CALL OF THE ROUTINE.
+!    OTHERWISE SET TO .FALSE.
+!            (INPUT,LOGICAL)
+
+!    ier = 1 if the input covariance matrix is not +ve definite
+!        = 0 otherwise
+
+INTEGER, INTENT(IN)   :: n
+REAL, INTENT(IN)      :: h(:), d(:)   ! d(n*(n+1)/2)
+REAL, INTENT(IN OUT)  :: f(:)         ! f(n*(n+1)/2)
+REAL, INTENT(OUT)     :: x(:)
+LOGICAL, INTENT(IN)   :: first
+INTEGER, INTENT(OUT)  :: ier
+
+!     Local variables
+INTEGER       :: j, i, m
+REAL          :: y, v
+INTEGER, SAVE :: n2
+
+IF (n < 1) THEN
+  WRITE(*, *) 'SIZE OF VECTOR IS NON POSITIVE'
+  STOP
+END IF
+
+ier = 0
+IF (first) THEN                        ! Initialization, if necessary
+  n2 = 2*n
+  IF (d(1) < zero) THEN
+    ier = 1
+    RETURN
+  END IF
+
+  f(1) = SQRT(d(1))
+  y = one/f(1)
+  DO j = 2,n
+    f(j) = d(1+j*(j-1)/2) * y
+  END DO
+
+  DO i = 2,n
+    v = d(i*(i-1)/2+i)
+    DO m = 1,i-1
+      v = v - f((m-1)*(n2-m)/2+i)**2
+    END DO
+
+    IF (v < zero) THEN
+      ier = 1
+      RETURN
+    END IF
+
+    v = SQRT(v)
+    y = one/v
+    f((i-1)*(n2-i)/2+i) = v
+    DO j = i+1,n
+      v = d(j*(j-1)/2+i)
+      DO m = 1,i-1
+        v = v - f((m-1)*(n2-m)/2+i)*f((m-1)*(n2-m)/2 + j)
+      END DO ! m = 1,i-1
+      f((i-1)*(n2-i)/2 + j) = v*y
+    END DO ! j = i+1,n
+  END DO ! i = 2,n
+END IF
+
+x(1:n) = h(1:n)
+DO j = 1,n
+  y = random_normal()
+  DO i = j,n
+    x(i) = x(i) + f((j-1)*(n2-j)/2 + i) * y
+  END DO ! i = j,n
+END DO ! j = 1,n
+
+RETURN
+END SUBROUTINE random_mvnorm
+
+
+
+FUNCTION random_inv_gauss(h, b, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,INFINITY] FROM
+! A REPARAMETERISED GENERALISED INVERSE GAUSSIAN (GIG) DISTRIBUTION
+! WITH DENSITY PROPORTIONAL TO  GIG**(H-1) * EXP(-0.5*B*(GIG+1/GIG))
+! USING A RATIO METHOD.
+
+!     H = PARAMETER OF DISTRIBUTION (0 <= REAL)
+!     B = PARAMETER OF DISTRIBUTION (0 < REAL)
+
+REAL, INTENT(IN)    :: h, b
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+!     Local variables
+REAL            :: ym, xm, r, w, r1, r2, x
+REAL, SAVE      :: a, c, d, e
+REAL, PARAMETER :: quart = 0.25
+
+IF (h < zero .OR. b <= zero) THEN
+  WRITE(*, *) 'IMPERMISSIBLE DISTRIBUTION PARAMETER VALUES'
+  STOP
+END IF
+
+IF (first) THEN                        ! Initialization, if necessary
+  IF (h > quart*b*SQRT(vlarge)) THEN
+    WRITE(*, *) 'THE RATIO H:B IS TOO SMALL'
+    STOP
+  END IF
+  e = b*b
+  d = h + one
+  ym = (-d + SQRT(d*d + e))/b
+  IF (ym < vsmall) THEN
+    WRITE(*, *) 'THE VALUE OF B IS TOO SMALL'
+    STOP
+  END IF
+
+  d = h - one
+  xm = (d + SQRT(d*d + e))/b
+  d = half*d
+  e = -quart*b
+  r = xm + one/xm
+  w = xm*ym
+  a = w**(-half*h) * SQRT(xm/ym) * EXP(-e*(r - ym - one/ym))
+  IF (a < vsmall) THEN
+    WRITE(*, *) 'THE VALUE OF H IS TOO LARGE'
+    STOP
+  END IF
+  c = -d*LOG(xm) - e*r
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r1)
+  IF (r1 <= zero) CYCLE
+  CALL RANDOM_NUMBER(r2)
+  x = a*r2/r1
+  IF (x <= zero) CYCLE
+  IF (LOG(r1) < d*LOG(x) + e*(x + one/x) + c) EXIT
+END DO
+
+fn_val = x
+
+RETURN
+END FUNCTION random_inv_gauss
+
+
+
+FUNCTION random_Poisson(mu, first) RESULT(ival)
+!**********************************************************************
+!     Translated to Fortran 90 by Alan Miller from:
+!                           RANLIB
+!
+!     Library of Fortran Routines for Random Number Generation
+!
+!                    Compiled and Written by:
+!
+!                         Barry W. Brown
+!                          James Lovato
+!
+!             Department of Biomathematics, Box 237
+!             The University of Texas, M.D. Anderson Cancer Center
+!             1515 Holcombe Boulevard
+!             Houston, TX      77030
+!
+! This work was supported by grant CA-16672 from the National Cancer Institute.
+
+!                    GENerate POIsson random deviate
+
+!                            Function
+
+! Generates a single random deviate from a Poisson distribution with mean mu.
+
+!                            Arguments
+
+!     mu --> The mean of the Poisson distribution from which
+!            a random deviate is to be generated.
+!                              REAL mu
+
+!                              Method
+
+!     For details see:
+
+!               Ahrens, J.H. and Dieter, U.
+!               Computer Generation of Poisson Deviates
+!               From Modified Normal Distributions.
+!               ACM Trans. Math. Software, 8, 2
+!               (June 1982),163-179
+
+!     TABLES: COEFFICIENTS A0-A7 FOR STEP F. FACTORIALS FACT
+!     COEFFICIENTS A(K) - FOR PX = FK*V*V*SUM(A(K)*V**K)-DEL
+
+!     SEPARATION OF CASES A AND B
+
+!     .. Scalar Arguments ..
+REAL, INTENT(IN)    :: mu
+LOGICAL, INTENT(IN) :: first
+INTEGER             :: ival
+!     ..
+!     .. Local Scalars ..
+REAL          :: b1, b2, c, c0, c1, c2, c3, del, difmuk, e, fk, fx, fy, g,  &
+                 omega, px, py, t, u, v, x, xx
+REAL, SAVE    :: s, d, p, q, p0
+INTEGER       :: j, k, kflag
+LOGICAL, SAVE :: full_init
+INTEGER, SAVE :: l, m
+!     ..
+!     .. Local Arrays ..
+REAL, SAVE    :: pp(35)
+!     ..
+!     .. Data statements ..
+REAL, PARAMETER :: a0 = -.5, a1 = .3333333, a2 = -.2500068, a3 = .2000118,  &
+                   a4 = -.1661269, a5 = .1421878, a6 = -.1384794,   &
+                   a7 = .1250060
+
+REAL, PARAMETER :: fact(10) = (/ 1., 1., 2., 6., 24., 120., 720., 5040.,  &
+                                 40320., 362880. /)
+
+!     ..
+!     .. Executable Statements ..
+IF (mu > 10.0) THEN
+!     C A S E  A. (RECALCULATION OF S, D, L IF MU HAS CHANGED)
+
+  IF (first) THEN
+    s = SQRT(mu)
+    d = 6.0*mu*mu
+
+!             THE POISSON PROBABILITIES PK EXCEED THE DISCRETE NORMAL
+!             PROBABILITIES FK WHENEVER K >= M(MU). L=IFIX(MU-1.1484)
+!             IS AN UPPER BOUND TO M(MU) FOR ALL MU >= 10 .
+
+    l = mu - 1.1484
+    full_init = .false.
+  END IF
+
+
+!     STEP N. NORMAL SAMPLE - random_normal() FOR STANDARD NORMAL DEVIATE
+
+  g = mu + s*random_normal()
+  IF (g > 0.0) THEN
+    ival = g
+
+!     STEP I. IMMEDIATE ACCEPTANCE IF ival IS LARGE ENOUGH
+
+    IF (ival>=l) RETURN
+
+!     STEP S. SQUEEZE ACCEPTANCE - SAMPLE U
+
+    fk = ival
+    difmuk = mu - fk
+    CALL RANDOM_NUMBER(u)
+    IF (d*u >= difmuk*difmuk*difmuk) RETURN
+  END IF
+
+!     STEP P. PREPARATIONS FOR STEPS Q AND H.
+!             (RECALCULATIONS OF PARAMETERS IF NECESSARY)
+!             .3989423=(2*PI)**(-.5)  .416667E-1=1./24.  .1428571=1./7.
+!             THE QUANTITIES B1, B2, C3, C2, C1, C0 ARE FOR THE HERMITE
+!             APPROXIMATIONS TO THE DISCRETE NORMAL PROBABILITIES FK.
+!             C=.1069/MU GUARANTEES MAJORIZATION BY THE 'HAT'-FUNCTION.
+
+  IF (.NOT. full_init) THEN
+    omega = .3989423/s
+    b1 = .4166667E-1/mu
+    b2 = .3*b1*b1
+    c3 = .1428571*b1*b2
+    c2 = b2 - 15.*c3
+    c1 = b1 - 6.*b2 + 45.*c3
+    c0 = 1. - b1 + 3.*b2 - 15.*c3
+    c = .1069/mu
+    full_init = .true.
+  END IF
+
+  IF (g < 0.0) GO TO 50
+
+!             'SUBROUTINE' F IS CALLED (KFLAG=0 FOR CORRECT RETURN)
+
+  kflag = 0
+  GO TO 70
+
+!     STEP Q. QUOTIENT ACCEPTANCE (RARE CASE)
+
+  40 IF (fy-u*fy <= py*EXP(px-fx)) RETURN
+
+!     STEP E. EXPONENTIAL SAMPLE - random_exponential() FOR STANDARD EXPONENTIAL
+!             DEVIATE E AND SAMPLE T FROM THE LAPLACE 'HAT'
+!             (IF T <= -.6744 THEN PK < FK FOR ALL MU >= 10.)
+
+  50 e = random_exponential()
+  CALL RANDOM_NUMBER(u)
+  u = u + u - one
+  t = 1.8 + SIGN(e, u)
+  IF (t <= (-.6744)) GO TO 50
+  ival = mu + s*t
+  fk = ival
+  difmuk = mu - fk
+
+!             'SUBROUTINE' F IS CALLED (KFLAG=1 FOR CORRECT RETURN)
+
+  kflag = 1
+  GO TO 70
+
+!     STEP H. HAT ACCEPTANCE (E IS REPEATED ON REJECTION)
+
+  60 IF (c*ABS(u) > py*EXP(px+e) - fy*EXP(fx+e)) GO TO 50
+  RETURN
+
+!     STEP F. 'SUBROUTINE' F. CALCULATION OF PX, PY, FX, FY.
+!             CASE ival < 10 USES FACTORIALS FROM TABLE FACT
+
+  70 IF (ival>=10) GO TO 80
+  px = -mu
+  py = mu**ival/fact(ival+1)
+  GO TO 110
+
+!             CASE ival >= 10 USES POLYNOMIAL APPROXIMATION
+!             A0-A7 FOR ACCURACY WHEN ADVISABLE
+!             .8333333E-1=1./12.  .3989423=(2*PI)**(-.5)
+
+  80 del = .8333333E-1/fk
+  del = del - 4.8*del*del*del
+  v = difmuk/fk
+  IF (ABS(v)>0.25) THEN
+    px = fk*LOG(one + v) - difmuk - del
+  ELSE
+    px = fk*v*v* (((((((a7*v+a6)*v+a5)*v+a4)*v+a3)*v+a2)*v+a1)*v+a0) - del
+  END IF
+  py = .3989423/SQRT(fk)
+  110 x = (half - difmuk)/s
+  xx = x*x
+  fx = -half*xx
+  fy = omega* (((c3*xx + c2)*xx + c1)*xx + c0)
+  IF (kflag <= 0) GO TO 40
+  GO TO 60
+
+!---------------------------------------------------------------------------
+!     C A S E  B.    mu < 10
+!     START NEW TABLE AND CALCULATE P0 IF NECESSARY
+
+ELSE
+  IF (first) THEN
+    m = MAX(1, INT(mu))
+    l = 0
+    p = EXP(-mu)
+    q = p
+    p0 = p
+  END IF
+
+!     STEP U. UNIFORM SAMPLE FOR INVERSION METHOD
+
+  DO
+    CALL RANDOM_NUMBER(u)
+    ival = 0
+    IF (u <= p0) RETURN
+
+!     STEP T. TABLE COMPARISON UNTIL THE END PP(L) OF THE
+!             PP-TABLE OF CUMULATIVE POISSON PROBABILITIES
+!             (0.458=PP(9) FOR MU=10)
+
+    IF (l == 0) GO TO 150
+    j = 1
+    IF (u > 0.458) j = MIN(l, m)
+    DO k = j, l
+      IF (u <= pp(k)) GO TO 180
+    END DO
+    IF (l == 35) CYCLE
+
+!     STEP C. CREATION OF NEW POISSON PROBABILITIES P
+!             AND THEIR CUMULATIVES Q=PP(K)
+
+    150 l = l + 1
+    DO k = l, 35
+      p = p*mu / k
+      q = q + p
+      pp(k) = q
+      IF (u <= q) GO TO 170
+    END DO
+    l = 35
+  END DO
+
+  170 l = k
+  180 ival = k
+  RETURN
+END IF
+
+RETURN
+END FUNCTION random_Poisson
+
+
+
+FUNCTION random_binomial1(n, p, first) RESULT(ival)
+
+! FUNCTION GENERATES A RANDOM BINOMIAL VARIATE USING C.D.Kemp's method.
+! This algorithm is suitable when many random variates are required
+! with the SAME parameter values for n & p.
+
+!    P = BERNOULLI SUCCESS PROBABILITY
+!           (0 <= REAL <= 1)
+!    N = NUMBER OF BERNOULLI TRIALS
+!           (1 <= INTEGER)
+!    FIRST = .TRUE. for the first call using the current parameter values
+!          = .FALSE. if the values of (n,p) are unchanged from last call
+
+! Reference: Kemp, C.D. (1986). `A modal method for generating binomial
+!            variables', Commun. Statist. - Theor. Meth. 15(3), 805-813.
+
+INTEGER, INTENT(IN) :: n
+REAL, INTENT(IN)    :: p
+LOGICAL, INTENT(IN) :: first
+INTEGER             :: ival
+
+!     Local variables
+
+INTEGER         :: ru, rd
+INTEGER, SAVE   :: r0
+REAL            :: u, pd, pu
+REAL, SAVE      :: odds_ratio, p_r
+REAL, PARAMETER :: zero = 0.0, one = 1.0
+
+IF (first) THEN
+  r0 = (n+1)*p
+  p_r = bin_prob(n, p, r0)
+  odds_ratio = p / (one - p)
+END IF
+
+CALL RANDOM_NUMBER(u)
+u = u - p_r
+IF (u < zero) THEN
+  ival = r0
+  RETURN
+END IF
+
+pu = p_r
+ru = r0
+pd = p_r
+rd = r0
+DO
+  rd = rd - 1
+  IF (rd >= 0) THEN
+    pd = pd * (rd+1) / (odds_ratio * (n-rd))
+    u = u - pd
+    IF (u < zero) THEN
+      ival = rd
+      RETURN
+    END IF
+  END IF
+
+  ru = ru + 1
+  IF (ru <= n) THEN
+    pu = pu * (n-ru+1) * odds_ratio / ru
+    u = u - pu
+    IF (u < zero) THEN
+      ival = ru
+      RETURN
+    END IF
+  END IF
+END DO
+
+!     This point should not be reached, but just in case:
+
+ival = r0
+RETURN
+
+END FUNCTION random_binomial1
+
+
+
+FUNCTION bin_prob(n, p, r) RESULT(fn_val)
+!     Calculate a binomial probability
+
+INTEGER, INTENT(IN) :: n, r
+REAL, INTENT(IN)    :: p
+REAL                :: fn_val
+
+!     Local variable
+REAL                :: one = 1.0
+
+fn_val = EXP( lngamma(DBLE(n+1)) - lngamma(DBLE(r+1)) - lngamma(DBLE(n-r+1)) &
+              + r*LOG(p) + (n-r)*LOG(one - p) )
+RETURN
+
+END FUNCTION bin_prob
+
+
+
+FUNCTION lngamma(x) RESULT(fn_val)
+
+! Logarithm to base e of the gamma function.
+!
+! Accurate to about 1.e-14.
+! Programmer: Alan Miller
+
+! Latest revision of Fortran 77 version - 28 February 1988
+
+REAL (dp), INTENT(IN) :: x
+REAL (dp)             :: fn_val
+
+!       Local variables
+
+REAL (dp) :: a1 = -4.166666666554424D-02, a2 = 2.430554511376954D-03,  &
+             a3 = -7.685928044064347D-04, a4 = 5.660478426014386D-04,  &
+             temp, arg, product, lnrt2pi = 9.189385332046727D-1,       &
+             pi = 3.141592653589793D0
+LOGICAL   :: reflect
+
+!       lngamma is not defined if x = 0 or a negative integer.
+
+IF (x > 0.d0) GO TO 10
+IF (x /= INT(x)) GO TO 10
+fn_val = 0.d0
+RETURN
+
+!       If x < 0, use the reflection formula:
+!               gamma(x) * gamma(1-x) = pi * cosec(pi.x)
+
+10 reflect = (x < 0.d0)
+IF (reflect) THEN
+  arg = 1.d0 - x
+ELSE
+  arg = x
+END IF
+
+!       Increase the argument, if necessary, to make it > 10.
+
+product = 1.d0
+20 IF (arg <= 10.d0) THEN
+  product = product * arg
+  arg = arg + 1.d0
+  GO TO 20
+END IF
+
+!  Use a polynomial approximation to Stirling's formula.
+!  N.B. The real Stirling's formula is used here, not the simpler, but less
+!       accurate formula given by De Moivre in a letter to Stirling, which
+!       is the one usually quoted.
+
+arg = arg - 0.5D0
+temp = 1.d0/arg**2
+fn_val = lnrt2pi + arg * (LOG(arg) - 1.d0 + &
+                  (((a4*temp + a3)*temp + a2)*temp + a1)*temp) - LOG(product)
+IF (reflect) THEN
+  temp = SIN(pi * x)
+  fn_val = LOG(pi/temp) - fn_val
+END IF
+RETURN
+END FUNCTION lngamma
+
+
+
+FUNCTION random_binomial2(n, pp, first) RESULT(ival)
+!**********************************************************************
+!     Translated to Fortran 90 by Alan Miller from:
+!                              RANLIB
+!
+!     Library of Fortran Routines for Random Number Generation
+!
+!                      Compiled and Written by:
+!
+!                           Barry W. Brown
+!                            James Lovato
+!
+!               Department of Biomathematics, Box 237
+!               The University of Texas, M.D. Anderson Cancer Center
+!               1515 Holcombe Boulevard
+!               Houston, TX      77030
+!
+! This work was supported by grant CA-16672 from the National Cancer Institute.
+
+!                    GENerate BINomial random deviate
+
+!                              Function
+
+!     Generates a single random deviate from a binomial
+!     distribution whose number of trials is N and whose
+!     probability of an event in each trial is P.
+
+!                              Arguments
+
+!     N  --> The number of trials in the binomial distribution
+!            from which a random deviate is to be generated.
+!                              INTEGER N
+
+!     P  --> The probability of an event in each trial of the
+!            binomial distribution from which a random deviate
+!            is to be generated.
+!                              REAL P
+
+!     FIRST --> Set FIRST = .TRUE. for the first call to perform initialization
+!               the set FIRST = .FALSE. for further calls using the same pair
+!               of parameter values (N, P).
+!                              LOGICAL FIRST
+
+!     random_binomial2 <-- A random deviate yielding the number of events
+!                from N independent trials, each of which has
+!                a probability of event P.
+!                              INTEGER random_binomial
+
+!                              Method
+
+!     This is algorithm BTPE from:
+
+!         Kachitvichyanukul, V. and Schmeiser, B. W.
+!         Binomial Random Variate Generation.
+!         Communications of the ACM, 31, 2 (February, 1988) 216.
+
+!**********************************************************************
+
+!*****DETERMINE APPROPRIATE ALGORITHM AND WHETHER SETUP IS NECESSARY
+
+!     ..
+!     .. Scalar Arguments ..
+REAL, INTENT(IN)    :: pp
+INTEGER, INTENT(IN) :: n
+LOGICAL, INTENT(IN) :: first
+INTEGER             :: ival
+!     ..
+!     .. Local Scalars ..
+REAL            :: alv, amaxp, f, f1, f2, u, v, w, w2, x, x1, x2, ynorm, z, z2
+REAL, PARAMETER :: zero = 0.0, half = 0.5, one = 1.0
+INTEGER         :: i, ix, ix1, k, mp
+INTEGER, SAVE   :: m
+REAL, SAVE      :: p, q, xnp, ffm, fm, xnpq, p1, xm, xl, xr, c, al, xll,  &
+                   xlr, p2, p3, p4, qn, r, g
+
+!     ..
+!     .. Executable Statements ..
+
+!*****SETUP, PERFORM ONLY WHEN PARAMETERS CHANGE
+
+IF (first) THEN
+  p = MIN(pp, one-pp)
+  q = one - p
+  xnp = n * p
+END IF
+
+IF (xnp > 30.) THEN
+  IF (first) THEN
+    ffm = xnp + p
+    m = ffm
+    fm = m
+    xnpq = xnp * q
+    p1 = INT(2.195*SQRT(xnpq) - 4.6*q) + half
+    xm = fm + half
+    xl = xm - p1
+    xr = xm + p1
+    c = 0.134 + 20.5 / (15.3 + fm)
+    al = (ffm-xl) / (ffm - xl*p)
+    xll = al * (one + half*al)
+    al = (xr - ffm) / (xr*q)
+    xlr = al * (one + half*al)
+    p2 = p1 * (one + c + c)
+    p3 = p2 + c / xll
+    p4 = p3 + c / xlr
+  END IF
+
+!*****GENERATE VARIATE, Binomial mean at least 30.
+
+  20 CALL RANDOM_NUMBER(u)
+  u = u * p4
+  CALL RANDOM_NUMBER(v)
+
+!     TRIANGULAR REGION
+
+  IF (u <= p1) THEN
+    ix = xm - p1 * v + u
+    GO TO 110
+  END IF
+
+!     PARALLELOGRAM REGION
+
+  IF (u <= p2) THEN
+    x = xl + (u-p1) / c
+    v = v * c + one - ABS(xm-x) / p1
+    IF (v > one .OR. v <= zero) GO TO 20
+    ix = x
+  ELSE
+
+!     LEFT TAIL
+
+    IF (u <= p3) THEN
+      ix = xl + LOG(v) / xll
+      IF (ix < 0) GO TO 20
+      v = v * (u-p2) * xll
+    ELSE
+
+!     RIGHT TAIL
+
+      ix = xr - LOG(v) / xlr
+      IF (ix > n) GO TO 20
+      v = v * (u-p3) * xlr
+    END IF
+  END IF
+
+!*****DETERMINE APPROPRIATE WAY TO PERFORM ACCEPT/REJECT TEST
+
+  k = ABS(ix-m)
+  IF (k <= 20 .OR. k >= xnpq/2-1) THEN
+
+!     EXPLICIT EVALUATION
+
+    f = one
+    r = p / q
+    g = (n+1) * r
+    IF (m < ix) THEN
+      mp = m + 1
+      DO i = mp, ix
+        f = f * (g/i-r)
+      END DO
+
+    ELSE IF (m > ix) THEN
+      ix1 = ix + 1
+      DO i = ix1, m
+        f = f / (g/i-r)
+      END DO
+    END IF
+
+    IF (v > f) THEN
+      GO TO 20
+    ELSE
+      GO TO 110
+    END IF
+  END IF
+
+!     SQUEEZING USING UPPER AND LOWER BOUNDS ON LOG(F(X))
+
+  amaxp = (k/xnpq) * ((k*(k/3. + .625) + .1666666666666)/xnpq + half)
+  ynorm = -k * k / (2.*xnpq)
+  alv = LOG(v)
+  IF (alv<ynorm - amaxp) GO TO 110
+  IF (alv>ynorm + amaxp) GO TO 20
+
+!     STIRLING'S (actually de Moivre's) FORMULA TO MACHINE ACCURACY FOR
+!     THE FINAL ACCEPTANCE/REJECTION TEST
+
+  x1 = ix + 1
+  f1 = fm + one
+  z = n + 1 - fm
+  w = n - ix + one
+  z2 = z * z
+  x2 = x1 * x1
+  f2 = f1 * f1
+  w2 = w * w
+  IF (alv - (xm*LOG(f1/x1) + (n-m+half)*LOG(z/w) + (ix-m)*LOG(w*p/(x1*q)) +    &
+      (13860.-(462.-(132.-(99.-140./f2)/f2)/f2)/f2)/f1/166320. +               &
+      (13860.-(462.-(132.-(99.-140./z2)/z2)/z2)/z2)/z/166320. +                &
+      (13860.-(462.-(132.-(99.-140./x2)/x2)/x2)/x2)/x1/166320. +               &
+      (13860.-(462.-(132.-(99.-140./w2)/w2)/w2)/w2)/w/166320.) > zero) THEN
+    GO TO 20
+  ELSE
+    GO TO 110
+  END IF
+
+ELSE
+!     INVERSE CDF LOGIC FOR MEAN LESS THAN 30
+  IF (first) THEN
+    qn = q ** n
+    r = p / q
+    g = r * (n+1)
+  END IF
+
+  90 ix = 0
+  f = qn
+  CALL RANDOM_NUMBER(u)
+  100 IF (u >= f) THEN
+    IF (ix > 110) GO TO 90
+    u = u - f
+    ix = ix + 1
+    f = f * (g/ix - r)
+    GO TO 100
+  END IF
+END IF
+
+110 IF (pp > half) ix = n - ix
+ival = ix
+RETURN
+
+END FUNCTION random_binomial2
+
+
+
+
+FUNCTION random_neg_binomial(sk, p) RESULT(ival)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM NEGATIVE BINOMIAL VARIATE USING UNSTORED
+! INVERSION AND/OR THE REPRODUCTIVE PROPERTY.
+
+!    SK = NUMBER OF FAILURES REQUIRED (Dagpunar's words!)
+!       = the `power' parameter of the negative binomial
+!           (0 < REAL)
+!    P = BERNOULLI SUCCESS PROBABILITY
+!           (0 < REAL < 1)
+
+! THE PARAMETER H IS SET SO THAT UNSTORED INVERSION ONLY IS USED WHEN P <= H,
+! OTHERWISE A COMBINATION OF UNSTORED INVERSION AND
+! THE REPRODUCTIVE PROPERTY IS USED.
+
+REAL, INTENT(IN)   :: sk, p
+INTEGER            :: ival
+
+!     Local variables
+! THE PARAMETER ULN = -LOG(MACHINE'S SMALLEST REAL NUMBER).
+
+REAL, PARAMETER    :: h = 0.7
+REAL               :: q, x, st, uln, v, r, s, y, g
+INTEGER            :: k, i, n
+
+IF (sk <= zero .OR. p <= zero .OR. p >= one) THEN
+  WRITE(*, *) 'IMPERMISSIBLE DISTRIBUTION PARAMETER VALUES'
+  STOP
+END IF
+
+q = one - p
+x = zero
+st = sk
+IF (p > h) THEN
+  v = one/LOG(p)
+  k = st
+  DO i = 1,k
+    DO
+      CALL RANDOM_NUMBER(r)
+      IF (r > zero) EXIT
+    END DO
+    n = v*LOG(r)
+    x = x + n
+  END DO
+  st = st - k
+END IF
+
+s = zero
+uln = -LOG(vsmall)
+IF (st > -uln/LOG(q)) THEN
+  WRITE(*, *) ' P IS TOO LARGE FOR THIS VALUE OF SK'
+  STOP
+END IF
+
+y = q**st
+g = st
+CALL RANDOM_NUMBER(r)
+DO
+  IF (y > r) EXIT
+  r = r - y
+  s = s + one
+  y = y*p*g/s
+  g = g + one
+END DO
+
+ival = x + s + half
+RETURN
+END FUNCTION random_neg_binomial
+
+
+
+FUNCTION random_von_Mises(k, first) RESULT(fn_val)
+
+!     Algorithm VMD from:
+!     Dagpunar, J.S. (1990) `Sampling from the von Mises distribution via a
+!     comparison of random numbers', J. of Appl. Statist., 17, 165-168.
+
+!     Fortran 90 code by Alan Miller
+!     CSIRO Division of Mathematical & Information Sciences
+
+!     Arguments:
+!     k (real)        parameter of the von Mises distribution.
+!     first (logical) set to .TRUE. the first time that the function
+!                     is called, or the first time with a new value
+!                     for k.   When first = .TRUE., the function sets
+!                     up starting values and may be very much slower.
+
+REAL, INTENT(IN)     :: k
+LOGICAL, INTENT(IN)  :: first
+REAL                 :: fn_val
+
+!     Local variables
+
+INTEGER          :: j, n
+INTEGER, SAVE    :: nk
+REAL, PARAMETER  :: pi = 3.14159265
+REAL, SAVE       :: p(20), theta(0:20)
+REAL             :: sump, r, th, lambda, rlast
+REAL (dp)        :: dk
+
+IF (first) THEN                        ! Initialization, if necessary
+  IF (k < zero) THEN
+    WRITE(*, *) '** Error: argument k for random_von_Mises = ', k
+    RETURN
+  END IF
+
+  nk = k + k + one
+  IF (nk > 20) THEN
+    WRITE(*, *) '** Error: argument k for random_von_Mises = ', k
+    RETURN
+  END IF
+
+  dk = k
+  theta(0) = zero
+  IF (k > half) THEN
+
+!     Set up array p of probabilities.
+
+    sump = zero
+    DO j = 1, nk
+      IF (j < nk) THEN
+        theta(j) = ACOS(one - j/k)
+      ELSE
+        theta(nk) = pi
+      END IF
+
+!     Numerical integration of e^[k.cos(x)] from theta(j-1) to theta(j)
+
+      CALL integral(theta(j-1), theta(j), p(j), dk)
+      sump = sump + p(j)
+    END DO
+    p(1:nk) = p(1:nk) / sump
+  ELSE
+    p(1) = one
+    theta(1) = pi
+  END IF                         ! if k > 0.5
+END IF                           ! if first
+
+CALL RANDOM_NUMBER(r)
+DO j = 1, nk
+  r = r - p(j)
+  IF (r < zero) EXIT
+END DO
+r = -r/p(j)
+
+DO
+  th = theta(j-1) + r*(theta(j) - theta(j-1))
+  lambda = k - j + one - k*COS(th)
+  n = 1
+  rlast = lambda
+
+  DO
+    CALL RANDOM_NUMBER(r)
+    IF (r > rlast) EXIT
+    n = n + 1
+    rlast = r
+  END DO
+
+  IF (n .NE. 2*(n/2)) EXIT         ! is n even?
+  CALL RANDOM_NUMBER(r)
+END DO
+
+fn_val = SIGN(th, (r - rlast)/(one - rlast) - half)
+RETURN
+END FUNCTION random_von_Mises
+
+
+
+SUBROUTINE integral(a, b, result, dk)
+
+!     Gaussian integration of exp(k.cosx) from a to b.
+
+REAL (dp), INTENT(IN) :: dk
+REAL, INTENT(IN)      :: a, b
+REAL, INTENT(OUT)     :: result
+
+!     Local variables
+
+REAL (dp)  :: xmid, range, x1, x2,                                    &
+  x(3) = (/0.238619186083197_dp, 0.661209386466265_dp, 0.932469514203152_dp/), &
+  w(3) = (/0.467913934572691_dp, 0.360761573048139_dp, 0.171324492379170_dp/)
+INTEGER    :: i
+
+xmid = (a + b)/2._dp
+range = (b - a)/2._dp
+
+result = 0._dp
+DO i = 1, 3
+  x1 = xmid + x(i)*range
+  x2 = xmid - x(i)*range
+  result = result + w(i)*(EXP(dk*COS(x1)) + EXP(dk*COS(x2)))
+END DO
+
+result = result * range
+RETURN
+END SUBROUTINE integral
+
+
+
+FUNCTION random_Cauchy() RESULT(fn_val)
+
+!     Generate a random deviate from the standard Cauchy distribution
+
+REAL     :: fn_val
+
+!     Local variables
+REAL     :: v(2)
+
+DO
+  CALL RANDOM_NUMBER(v)
+  v = two*(v - half)
+  IF (ABS(v(2)) < vsmall) CYCLE               ! Test for zero
+  IF (v(1)**2 + v(2)**2 < one) EXIT
+END DO
+fn_val = v(1) / v(2)
+
+RETURN
+END FUNCTION random_Cauchy
+
+
+
+SUBROUTINE random_order(order, n)
+
+!     Generate a random ordering of the integers 1 ... n.
+
+INTEGER, INTENT(IN)  :: n
+INTEGER, INTENT(OUT) :: order(n)
+
+!     Local variables
+
+INTEGER :: i, j, k
+REAL    :: wk
+
+DO i = 1, n
+  order(i) = i
+END DO
+
+!     Starting at the end, swap the current last indicator with one
+!     randomly chosen from those preceeding it.
+
+DO i = n, 2, -1
+  CALL RANDOM_NUMBER(wk)
+  j = 1 + i * wk
+  IF (j < i) THEN
+    k = order(i)
+    order(i) = order(j)
+    order(j) = k
+  END IF
+END DO
+
+RETURN
+END SUBROUTINE random_order
+
+
+
+SUBROUTINE seed_random_number(iounit)
+
+INTEGER, INTENT(IN)  :: iounit
+
+! Local variables
+
+INTEGER              :: k
+INTEGER, ALLOCATABLE :: seed(:)
+
+CALL RANDOM_SEED(SIZE=k)
+ALLOCATE( seed(k) )
+
+WRITE(*, '(a, i2, a)')' Enter ', k, ' integers for random no. seeds: '
+READ(*, *) seed
+WRITE(iounit, '(a, (7i10))') ' Random no. seeds: ', seed
+CALL RANDOM_SEED(PUT=seed)
+
+DEALLOCATE( seed )
+
+RETURN
+END SUBROUTINE seed_random_number
+
+
+END MODULE KPP_ROOT_Random
+
+MODULE KPP_ROOT_Integrator
+  USE KPP_ROOT_Random
+  USE KPP_ROOT_Parameters, ONLY : NVAR, NFIX, NREACT 
+  USE KPP_ROOT_Global, ONLY : TIME, RCONST, Volume 
+  USE KPP_ROOT_Stoichiom  
+  USE KPP_ROOT_Stochastic
+  USE KPP_ROOT_Rates
+  USE KPP_ROOT_Random, ddp => dp
+  IMPLICIT NONE
+
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE TauLeap(Nsteps, Tau, T, SCT, NmlcV, NmlcF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!   Tau-leap stochastic integration
+!   INPUT:
+!       Nsteps  = no. of tau-leap steps to be simulated
+!       Tau     = time step length
+!       T       = time
+!       SCT     = stochastic rate constants
+!       NmlcV, NmlcF = no. of molecules for variable and fixed species
+!   OUTPUT:
+!       T       = updated time (after Nsteps)
+!       NmlcV   = updated no. of molecules for variable species
+!      
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  IMPLICIT NONE
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+      KPP_REAL:: T, Tau
+      INTEGER :: Nsteps     
+      INTEGER :: NmlcV(NVAR), NmlcF(NFIX)
+      INTEGER :: i, j, irct, id, istep, Nfirings(NREACT)
+      REAL   :: mu
+      KPP_REAL :: A(NREACT), SCT(NREACT), x
+      LOGICAL, SAVE :: First = .TRUE.
+   
+      DO istep = 1, Nsteps
+
+          ! Propensity vector
+          CALL  Propensity ( NmlcV, NmlcF, SCT, A )
+          
+          ! Index of next reaction
+          DO irct = 1, NREACT
+            mu = A(irct)*Tau
+            Nfirings(irct) = random_Poisson(mu, First)
+            First = .TRUE.
+          END DO
+          
+          ! Update time with the leap interval
+          T = T + Tau;
+
+          ! Directly update state vector
+          DO irct = 1, NREACT
+             DO i = CCOL_STOICM(irct), CCOL_STOICM(irct+1)-1
+                id = IROW_STOICM(i)
+                NmlcV(id) = MAX(0, NmlcV(id) + Nfirings(irct)*INT(STOICM(i)))
+             END DO
+          END DO
+          
+          ! Update state vector
+          ! DO irct = 1, NREACT
+          !   DO j = 1, Nfirings(irct)
+          !    CALL MoleculeChange( irct, NmlcV )
+          !   END DO 
+          ! END DO
+        
+     END DO
+     
+CONTAINS
+
+     SUBROUTINE PropensityTemplate( T, NmlcV, NmlcF, Prop )
+      KPP_REAL, INTENT(IN)  :: T
+      INTEGER, INTENT(IN)   :: NmlcV(NVAR), NmlcF(NFIX)
+      KPP_REAL, INTENT(OUT) :: Prop(NREACT)
+      KPP_REAL :: Tsave
+! Update the stochastic reaction rates, which may be time dependent 
+      Tsave = TIME
+      TIME = T
+      CALL Update_RCONST()
+      CALL StochasticRates( RCONST, Volume, SCT )   
+      CALL Propensity ( NmlcV, NmlcF, SCT, Prop )
+      TIME = Tsave
+     END SUBROUTINE PropensityTemplate    
+    
+END SUBROUTINE TauLeap
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/readme
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/readme	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/readme	(revision 3477)
@@ -0,0 +1,3 @@
+Integrators in this directory have been contributed by KPP users. By
+default, KPP will not search for integrators in this directory. To
+activate them, move them into the int/ directory.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/ros2_manual.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/ros2_manual.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/ros2_manual.def	(revision 3477)
@@ -0,0 +1,5 @@
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW 
+
+#DOUBLE ON
+#INTFILE ros2_manual
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/ros2_manual.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/ros2_manual.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int.modified_WCOPY/user_contributed/ros2_manual.f90	(revision 3477)
@@ -0,0 +1,119 @@
+! Rosenbrock integrator with manual time step control
+! Solve: d/dt c = f(t,c)
+
+! written by Edwin Spee, CWI, Amsterdam. Last update: July 28, 1997
+! email: Edwin.Spee@cwi.nl (http://edwin-spee.mypage.org/)
+! adapted to KPP-2.1 by Rolf Sander, Max-Planck Institute, Mainz, Germany, 2005
+!
+! Integration method for Ros2:
+! C_{n+1} = C_n + 3/2 dt k_1 + 1/2 dt k_2
+! k_1 = S f(t_n, C_n)
+! k_2 = S [f(t_{n+1},C_n + dt k_1) - 2 k_1]
+!
+! where g = 1.0 + sqrt(0.5_dp),
+! S = (I - g dt J ) ^ {-1}
+! with J the Jacobian
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision, ONLY: dp
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(1) :: IERR_NAMES = (/ &
+    'dummy value                                       ' /)
+
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: TIN  ! TIN - Start Time
+    KPP_REAL, INTENT(IN) :: TOUT ! TOUT - End Time
+    ! Optional input parameters and statistics
+    INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+    CALL ROS2(TIN, TOUT)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = 0
+    IF (PRESENT(RSTATUS_U)) THEN
+      RSTATUS_U(:) = 0._dp
+      RSTATUS_U(1)=TOUT ! put final time into RSTATUS_U
+    ENDIF
+    IF (PRESENT(IERR_U)) IERR_U = 1 ! dummy value
+
+  END SUBROUTINE INTEGRATE
+
+  ! **************************************************************************
+
+  SUBROUTINE ROS2(Tstart,Tend)
+
+    USE KPP_ROOT_Jacobian,         ONLY: Jac_SP
+    USE KPP_ROOT_Global,           ONLY: VAR,   & ! VARiable species
+                                         FIX,   & ! FIXed species
+                                         RCONST   ! rate coefficients
+    USE KPP_ROOT_JacobianSP,       ONLY: LU_DIAG
+    USE KPP_ROOT_Function,         ONLY: Fun
+    USE KPP_ROOT_LinearAlgebra,    ONLY: KppDecomp, KppSolve
+    USE KPP_ROOT_Parameters,       ONLY: NVAR, LU_NONZERO
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: Tstart, Tend
+
+    KPP_REAL :: dt ! time step                                          
+    KPP_REAL :: k1(NVAR), k2(NVAR), w1(NVAR), g, jvs(LU_NONZERO)
+    INTEGER ising, i
+
+    dt = Tend - Tstart
+    g = 1.0 + SQRT(0.5_dp)
+    CALL JAC_sp(VAR, FIX, RCONST, jvs)
+    jvs(1:LU_NONZERO) = -g*dt*jvs(1:LU_NONZERO)
+
+    ! Rolf von Kuhlmann:
+    ! optionally cut this out and replace it by directly addressed statements
+    DO i=1,NVAR
+      jvs(LU_DIAG(i)) = jvs(LU_DIAG(i)) + 1.0_dp
+    END DO
+
+    CALL KppDecomp (jvs, ising)
+
+    IF (ising /= 0) THEN
+      PRINT *,'ising <> 0, dt=',dt
+      STOP
+    END IF
+
+    CALL Fun(VAR, FIX, RCONST, k1 )
+
+    CALL KppSolve (jvs,k1)
+
+    DO i = 1,NVAR
+      w1(i) = MAX(0.0_dp, VAR(i) + dt * k1(i) )
+    END DO
+
+    CALL Fun(w1, FIX, RCONST, k2 )
+
+    k2(1:NVAR) = k2(1:NVAR) - 2.0_dp*k1(1:NVAR)
+    CALL KppSolve (jvs,k2)
+    DO i = 1,NVAR
+      VAR(i) = MAX( 0.0_dp, VAR(i)+1.5_dp*dt*k1(i)+0.5_dp*dt*k2(i) )
+    END DO
+
+  END SUBROUTINE ROS2
+
+  ! **************************************************************************
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/ChangeRecord.txt
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/ChangeRecord.txt	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/ChangeRecord.txt	(revision 3477)
@@ -0,0 +1,354 @@
+!_______________________________________________________________________
+! DVODE_F90 Conversion Change Record
+! Last change: ST 01/01/08
+! ST 06/15/04:
+!   Convert test program dtest.f to dtest.f90
+!   Use unix2dos on vode.f
+!   Use Metcalf converter to produce dvode_1.f90 from vode.f
+!   Change some of the Metcalf formatting
+!   Trim trailing blanks to produce dvode_2.f90
+! ST 06/16/04:
+!   Dimension RPAR, IPAR, ATOL, ITOL as(*) or (1) in the documentation
+!     prologue and in dtest.f to produce dvode_3.f90
+!   Convert DVNORM to a subroutine DVNORMST to produce dvode_4.f90
+!   Convert IXSAV to a subroutine IXSAVST to produce dvode_5.f90
+!   Replace DUMACH and DUMSET by F90 intrinsic calculation to
+!     produce dvode_6.f90
+!   Convert IUMACH to subroutine IUMACHST to produce dvode_.7f90
+!   Convert function DDOT to subroutine DDOTST
+!   Convert function IDAMAX to subroutine IDAMAXST to produce
+!     dvode_.9f90
+!   Note: DVNORM, IXSAV, IUMACH, DDOT, IDAMAX later changed
+!     back to original forms (see 06/23/04 below)
+!   Convert dvode_9.f90 to a module DVODE_M.F90=dvode_10.f90
+!   Convert dvode_10.f90 to dvode_11.f90 with dynamic storage
+!     allocation for the nonuser portions of the RWORK and IWORK
+!     arrays.
+!   Deallocate work arrays at the start of new problems (ISTATE=1)
+!     to produce dvode_12.f90
+! ST 06/17/04:
+!   Remove LRWUSER and LIWUSER from call list. Set internally to
+!     22 and 30, respectively.
+!   Set lengths LRW and LIW of the allocatable works arrays
+!     according to value of MF and MAXORD and verify that the
+!     lengths of the arrays allocated are identical to
+!     original minimum sizes in dvode.f. Inserted IMPLICIT NONE
+!     and necessary declarations in all routines to produce
+!     dvode13.f90
+!   Get rid of warning messages for conditional arithmetic
+!     tests on equality to produce dvode14.f90
+!   Replace LE, GE, LT, GT, NE, EQ with <=, >=, <, >, /=, ==
+!     to produce dvode15.f90
+!   Miscellaneous cleanup to produce dvode16.f90
+! ST 06/18/04:
+!   Move DATA constants to PRIVATE section and eliminated the
+!     corresponding SAVE statements to produce dvode17.f90
+!   Move the DVOD02 common block to PRIVATE section to
+!     produce dvode18.f90
+!   Move the DVOD01 common block to PRIVATE section to
+!     produce dvode19.f90
+!   Modify DVSRCO to reflect above changes to produce dvode20.f90
+!   Add interface DVINDY_USER to allow the user to interpolate
+!     the derivative to produce dvode21.f90
+! ST 06/19/04:
+!   Add SET_OPTS function and GET_STATS subroutine.
+!   Add PUBLIC data type VODE_OPTS
+!   Remove MF, ITOL, ATOL, RTOL, IOPT, RUSER, IUSER from dvode
+!     argument list (passed via fields in OPTS)
+!   Add OPTS to dvode call list to produce dvode22.f90
+! ST 06/20/04:
+!   Add INTERFACE VODE_F90 to allow OPTIONS and JAC to be
+!     OPTIONAL, to produce dvode_f90_m23.f90
+! ST 06/21/04
+!   Add short summary of usage for DVODE_F90
+!   Eliminate RPAR and IPAR
+!   Modify prologue example programs to reflect changes
+! ST 06/22/04
+!   Make necessary changes to accommodate ISTATE=3 calls
+!     to produce dvode_f90_m24.f90 ** not yet tested **
+! ST 06/23/04
+!   Reactivate DVNLSD in its original form (passed as argument)
+!     to produce (v25)
+!   Reactivate DVNORM in its original form (as a function) (v26)
+!   Reactivate DDOT in its original form (as a function) (v27)
+!   Reactivate IDAMAX in its original form (as a function) (v28)
+!   Reactivate IXSAV and IUMACH in their original form (as
+!   functions) to produce dvode_f90_m29.f90 
+!   Convert new PRINT statements to (terminal) XERRDV error
+!     messages
+!   Debug INDEX = 3 changes to produce dvode_f90_m29.f90 
+!     (test program = check3.f90)
+! ST 06/23/04
+!   Change name of DYINDY to DVINDY_CORE and DYINDY_USER to
+!     DVINDY to produce dvode_f90_m31.f90
+! ST 06/29/04
+!   Add routine SET_IAJA to calculate sparse pointer arrays
+!     to produce dvode_f90_m32.f90 
+! ST 07/02/04
+!   Rewrite SET_OPTS to produce dvode_f90_m34.f90 
+!   Test various input options in demo34.f90
+! GB 07/05/04
+!   Change AE/RE options to ABSERR/RELERR
+! ST 07/18/04
+!   Finish first stab at implementing MA28
+! ST 07/26/04
+!   Finish second stab at implementing MA28 and MOSS
+! ST 07/27/04
+!   Finish third stab at implementing MA28 and MOSS
+! ST 07/28/04
+!   Test sparse option with the column humidification problem
+! ST 07/29/04
+!   Adapt LCHECK and LROOTS subroutines from LSODAR and add
+!     to DVODE_F90
+! ST 07/31/04
+!   Make JAC and GFUN optional; the VODE_F90 interface calls
+!     DVODE in one of four ways depending on presence of
+!     JAC and/or GFUN
+!   Error if SET_OPTS not called before DVODE_F90 called
+!     for the first time
+! ST 07/31/04
+!   First stab at root finding
+! ST 08/02/04
+!   Finish implementation of LSODAR root finding and adapt
+!   LSODAR demo problems for vode_f90 solution
+! ST 08/05/04
+!   Implement temporary changes for optional enforcement of
+!     nonnegativity constraints on the solution
+! ST 08/06/04
+!   Replace some labelled DO's and some loops
+!   Modify calls to DVODE_F90 in the test programs and
+!     and verify they work correctly
+!   First cut at printing warning message when |y| < abserr
+! ST 08/07/04
+!   Implement nonnegativity option in SET_OPTS and remove
+!     temporary coding from DVODE_F90
+! ST 08/08/04
+!   Remove temporary subroutine DVSTEPS (copy of DVSTEP for
+!     sparse solutions)
+!   Remove dummy PSOL from calls lists for DVSTEP, DVNLSD,
+!     and DVNLSS
+! ST 08/08/04
+!   Add short summary of typical OPTIONS settings
+!   Run source thru a spell checker
+!   Take another whack at the documentation prologue for DVODE_F90
+! ST 08/11/04
+!   Solve Robertson problem with nonnegativity, dense and sparse tests
+!   Change how sparse pointers arrays determined via derivative
+!     calls in DVPREPS to be the same as elsewhere
+!   Add easy to use version of SET_OPTS named mortal_opts
+!   Take another whack at the documentation prologue for DVODE_F90
+! ST 08/12/04
+!   Add argument Called_From_Where to CHECK_STAT to indicate where
+!     a storage allocation/deallocation occurred
+!   Add subroutine RELEASE_ARRAYS which may be called to deallocate
+!     the arrays allocated by DVODE_F90 and to determine how much
+!     storage was used
+! ST 08/13/04
+!   With the nonnegativity option, project both y and y'
+!   Whack on documentation prologues
+!   Temporary subroutine CHECK_MESSAGES to write all error messages
+!   Renumber error messages
+! ST 08/16/04
+!   Cleaner stab at nonnegativity
+!   Temporarily change DVINDY/DVINDY_CORE not to enforce negativity
+! ST 08/17/04
+!   Add DVINDY_BNDS for use by the user callable DVINDY to enforce
+!     nonnegativity
+!   Add INTENT attribute to all subroutine and function arguments
+! ST 08/18/04
+!   Reorganize type declarations
+!   Make cosmetic header changes
+!   Eliminate NMES from XERRDV and change name to XERRDV
+! ST 09/05/04
+!   Stopped being stupid and got nonnegativity to work
+! ST 09/07/04
+!   Arbitrary bounds enforcement
+! ST 10/26/04
+!   Get rid of some compiler warning messages about tests of equality
+! ST 11/03/04
+!   Fix an problem in DVROOTS involving JROOT
+! ST 11/11/04
+!   Remove mortal_opts function
+! ST 12/25/04-12/28/04
+!   Implement HSL MA48
+! ST 01/05/05
+!   Separate MA28 and MA48 versions
+! ST 01/09/05
+!   MA28 Hollerith formats to strings
+!   MA28 lower case
+!   0 default for lp/mp in MA28
+! ST 01/11/05
+!   Single precision version of MA28
+!   Save TSAVE in blocks G,H in DVODE
+!   Change DOUBLE PRECISION to REAL(KIND=WP)
+!   Single precision version SVODE_F90 of DVODE_F90
+!   D* to E* in SVODE_F90, *=0,...,9,-,+
+!   Some D's replaced by d's to make global replacements possible
+!   D to S in BLAS routines and rest of SVODE_F90
+! ST 01/11/05
+!   Change definition of UMAX in single precision version
+! ST 02/09/05
+!   Reorganize documentation prologue
+! ST 03/30/05
+!   Implement Alan's fix for root too close to X2 in root finder
+! ST 05/11/05
+!   Implement Alan's fix for testing for equality of T in
+!   DVINDY_CORE and DVINDY_BNDS
+!   Implement Alan's fix for nearby zeros in DVCHECK
+! ST 05/14/05
+!   Change distribution file to constitute only one F90 module
+!   Miscellaneous cosmetic changes
+!   Replace several decimal values for numbers by named variables
+!   Delete unused LINPACK function DNRM2
+! ST 05/15/05
+!   Determine the working precision and define UMAX for MA28
+!   accordingly in SET_OPTS
+!   Miscellaneous cosmetic changes
+!   Convert case in MA28
+!   Modify single precision demo programs to call DVODE
+!   than SVODE
+! ST 05/16/05
+!   Define arithmetic constants using _WP extension
+! ST 06/03/05
+!   Change name of NULL to MYNULL in MA28 routines
+!   Delete unnecessary commented out statements
+! ST 06/04/05
+!   Remove ACOR, SAVF, EWT from the RWORK array
+!   Eliminate LACOR, LSAVF, LEWT pointers
+! ST 06/05/05
+!   Remove WM from the RWORK array
+!   Use WM1, WM2 instead of WM(1), WM(2)
+! ST 06/06/05
+!   Make changes necessary to allow the maximum order to be
+!     reduced at output points (save YH, WM and restore)
+! ST 06/07/05
+!   Make cosmetic changes
+! ST 06/08/05
+!   Make cosmetic changes
+!   Add directions for building LAPACK-based and MA48-based
+!     versions
+! ST 06/11/05
+!   Standardize declaration and polish with nag
+!   Cosmetic changes
+! ST 06/12/05
+!   Cosmetic changes
+! ST 06/13/05
+!   Replace USE_LINPACK flag by USE_LAPACK flag
+!   Remove check on sizes of ISTAT and RSTAT arrays in GET_STATS
+!   Add explicit declarations of public and private subroutines
+!     and functions
+!   Add the user callable subroutines to the generic interfaces
+!     block
+! ST 06/14/05
+!   Cosmetic changes
+! ST 07/21/05
+!   Implement option to increase the elbow room in the MA28
+!     work arrays
+!   Implement option to invoke MC19 sparse scaling of numerical
+!     Jacobians
+!   Clean up the 2d diurnal kinetics program
+! ST 07/25/05
+!   Implement MA28_EPS threshold option for numerical singularity
+! ST 07/26/05
+!   Implement MA28_MESSAGES option to control MA28 printing
+! ST 07/30/05
+!   Implement sparsity recalculation if a structurally singular
+!     matrix is encountered
+! ST 07/31/05
+!   Implement MA28_RPS option to force calculation of a new pivot
+!     sequence if MA28BD encounters a singular matrix
+! ST 08/02/05
+!   Add SET_NORMAL_OPTS for normal usage
+!   Add SET_OPTS_2 for changing HMAX, HMIN, and MXSTEP
+! ST 08/03/05
+!   Change how swag storage increment for sparse Jacobians determined
+!   Change length of ISTATS to 31
+!   Change sparse statistics available in GET_STATS
+! ST 08/10/05
+!   Add SUB_DIAGONALS and SUP_DIAGONALS option for banded systems
+!   Add BGROUP to compute sparse column grouping for banded
+!      systems with known diagonals and verify it's results
+!      match those of DGROUP
+! ST 08/11/05
+!   Add subroutine BANDED_IAJA to compute the sparse matrix
+!      descriptor arrays for a banded matrix with known
+!      diagonals
+!   Make miscellaneous cosmetic changes
+! ST 08/12/05
+!   One at a time column version of BANDED_IAJA
+!   Modify DVJAC to handle banded systems using diagonal information
+! ST 08/16/05
+!   Work on documentation for SET_OPTS
+! ST 08/17/05
+!   Use DTEMP rather than SAVF in DVPREPS
+! ST 08/18/05
+!   Add CONSTANT_JACOBIAN option
+! ST 08/23/05
+!   Add SET_INTERMEDIATE_OPTS and work on the documentation for each
+!   of SET_NORMAL_OPTS, SET_INTERMEDIATE_OPTS, and SET_OPTS
+! ST 08/24/05
+!   Add warning if default error tolerances used
+!   Work on OPTs documentation
+! ST 08/25/05
+!   Make miscellaneous cosmetic changes
+! ST 08/28/05
+!   Work on the MA48 based sparse solution option
+! ST 08/29/05
+!   Fixes in the MA48 version
+! ST 09/05/05
+!   Put back the IMPLICIT NONE statements that nag tools deleted
+! ST 09/06/05
+!   Do not allow default error tolerances to be used
+! ST 09/08/05
+!   Add the USE_FAST_FACTOR flag in MA48 version
+! ST 09/11/05
+!   Add debug prints
+! ST 09/14/05
+!   Delete the first two slots in the WM Jacobian array
+! ST 09/18/05
+!   Incorporate option to use JACSP for sparse Jacobians
+! ST 09-19-05
+!   Change name of DSM to DVDSM
+!   Do not allow NEQ to be reduced
+!   Add flags for consecutive error test failures and for consecutive
+!   corrector failures.
+! ST 09-20-05
+!   Modify JACSP to produce JACSPDV
+!   Incorporate option to use JACSPDV for dense Jacobians
+!   Incorporate option to use JACSPDV for banded Jacobians
+!   Incorporate option to use JACSPDV for sparse Jacobians
+! ST 09-21-05
+!   Supply YSCALE to JACSPDV
+! ST 10-04-05
+!   Make a few changes to introductory comments
+! ST 12-05
+!   Add subroutine interfaces
+!   Change some MA28 work arrays to two-dimensional and reference
+!     differently to satisfy the Salford ftn95 compiler
+!   Modify demo programs to make Salford happy
+! ST 01-01-08
+!   Fixed bug found by Richard Cox (restore NZ when sparse
+!   analytic Jacobian used) 
+! End DVODE_F90 Conversion Change Record
+!_______________________________________________________________________
+! f77 REVISION HISTORY(YYYYMMDD)
+!  19890615  Date Written. Initial release.
+!  19890922  Added interrupt/restart ability, minor changes throughout.
+!  19910228  Minor revisions in line format, prologue, etc.
+!  19920227  Modifications by D. Pang:
+!            (1) Applied subgennam to get generic intrinsic names.
+!            (2) Changed intrinsic names to generic in comments.
+!            (3) Added *DECK lines before each routine.
+!  19920721  Names of routines and labelled common blocks changed, so as
+!            to be unique in combined single/real(wp) code (ACH)
+!  19920722  Minor revisions to prologue (ACH).
+!  19920831  Conversion to real(wp) done (ACH).
+!  19921106  Fixed minor bug: ETAQ,ETAQM1 in DVSTEP SAVE statement (ACH)
+!  19921118  Changed LUNSAV/MFLGSV to IXSAV(ACH).
+!  19941222  Removed MF overwrite; attached sign to H in est. second
+!            deriv. in DVHIN; misc. comment changes throughout (ACH).
+!  19970515  Minor corrections to comments in prologue, DVJAC(ACH).
+!  19981111  Corrected Block B by adding final line, GOTO 200 (ACH).
+!  20020430  Various upgrades (ACH): Use ODEPACK error handler package.
+!            Replaced D1MACH by DUMACH. Various changes to main
+!            prologue and other routine prologues.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/NonstiffOptionsReadme.txt
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/NonstiffOptionsReadme.txt	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/NonstiffOptionsReadme.txt	(revision 3477)
@@ -0,0 +1,9 @@
+After you have installed DVODE_F90 and run the two example programs
+in the distribution file, you may wish to run the test program
+'nonstiffoptions.f90' to test your installation. It solves each of
+the test problems in the Toronto nonstiff test suite. It does this
+for each of the scalar error tolerances 1.0D-4, 1.0D-6, 1.0D-8, and
+1.0D-10. All results are written to a file named 'nonstiffoptions.dat.'
+If after running the program, the last line of this file does not
+read as follows: 'No errors occurred.', please contact one of the
+authors.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/StiffOptionsReadme.txt
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/StiffOptionsReadme.txt	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/StiffOptionsReadme.txt	(revision 3477)
@@ -0,0 +1,9 @@
+After you have installed DVODE_F90 and run the two example programs
+in the distribution file, you may wish to run the test program
+'stiffoptions.f90' to test your installation. It solves each of the
+test problems in the Toronto stiff test suite in several different
+ways to test the dense, banded, and sparse Jacobian options using
+several different error tolerances. All results are written to a
+file named 'stiffoptions.dat.' If after running the program, the
+last line of this file does not read as follows: 'No errors occurred.',
+please contact one of the authors.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/dvode_f90_m.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/dvode_f90_m.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/dvode_f90_m.f90	(revision 3477)
@@ -0,0 +1,18921 @@
+  MODULE DVODE_F90_M
+! This version is the December 2005 release.
+! Last change: 01/01/08
+! _____________________________________________________________________
+! Working Precision
+  IMPLICIT NONE
+! Define the working precision for DVODE_F90. Change D0 to E0 in the
+! next statement to convert to single precision.
+  INTEGER, PARAMETER, PRIVATE :: WP = KIND(1.0D0)
+! ______________________________________________________________________
+! Overview
+
+! The f77 ordinary differential equation solver VODE.f is applicable to
+! nonstiff systems of odes and to stiff systems having dense or banded
+! Jacobians. DVODE_F90 is a Fortran 90 extension of VODE.f. While
+! retaining all of the features available in VODE.f, we have
+! incorporated several new options in DVODE_F90 including:
+!   1. the ability to solve stiff systems with sparse Jacobians
+!   2. internal management of storage and work arrays
+!   3. specification of options via optional keywords
+!   4. the ability to perform root finding or "event detection"
+!   5. various new diagnostic and warning messages
+!   6. the ability to impose solution bounds
+!   7. several specialized options for dealing with sparsity
+! ______________________________________________________________________
+! Version Information
+
+! This is DVODE_F90, the double precision FORTRAN 90 extension of the
+! f77 DVODE.f ordinary differential equation solver. This version uses
+! MA28 for sparse Jacobians. This file and related information can be
+! obtained at the following support page:
+!
+!     http://www.radford.edu/~thompson/vodef90web/
+!
+! We are indebted to Richard Cox (ORNL) for providing us with his
+! implementation of MA28 in LSOD28.f (a variant of Alan Hindmarsh's
+! lsodes.f). We are indebted to Alan Hindmarsh for numerous contributions.
+! In particular, we borrowed liberally from the f77 solvers VODE.f,
+! LSODAR.f, and LSODES.f while developing DVODE_F90. We are indebted
+! to Doug Salane for providing us with his JACSP Jacobian routines.
+!
+! If you find a bug or encounter a problem with DVODE_F90, please
+! contact one of us:
+!    G.D. Byrne (gbyrne@wi.rr.com)
+!    S. Thompson (thompson@radford.edu)
+! A set of quick start instructions is provided below.
+! ______________________________________________________________________
+! Note on F90/F95 Compilers
+
+! To date we have used DVODE_F90 successfully with all F90/F95 compilers
+! to which we have access. In particular, we have used it with the Lahey
+! F90 and Lahey-Fujitsu F95 compilers, the Compaq Visual F90 compiler,
+! the g90 compiler, and the INTEL, Portland, Salford, and SUN compilers.
+! It should be noted that compilers such as Salford's FTN95 complain
+! about uninitialized arrays passed as subroutine arguments and the use of
+! slices of two dimensional arrays as one dimensional vectors, and will
+! not run using the strictest compiler options. It is perfectly safe to
+! use the /-CHECK compiler option to avoid these FTN95 runtime checks.
+! DVODE_F90 does not use any variable for numerical purposes until it
+! has been assigned an appropriate value.
+! ______________________________________________________________________
+! Quick Start Instructions
+
+! (1) Compile this file. Then compile, link, and execute the program
+!     example1.f90. The output is written to the file example1.dat.
+!     Verify that the last line of the output is the string
+!     'No errors occurred.'
+! (2) Repeat this process for the program example2.f90.
+!
+! Other test programs you may wish to run to verify your installation
+! of DVODE_F90 are:
+!
+! (3) Run the test programs nonstiffoptions.f90 and stiffoptions.f90
+!     and verify that the last line in the output files produced is
+!     'No errors occurred.' They solve the problems in the Toronto
+!     test suites using several different error tolerances and various
+!     solution options. Note that stiffoptions.f90 takes several
+!     minutes to run because it performs several thousand separate
+!     integrations.
+! (4) Locate the file robertson.f90 in the demo programs and look at
+!     how options are set using SET_OPTS, how DVODE_F90 is called to
+!     obtain the solution at desired output times, and how the
+!     derivative and Jacobian routines are supplied. Note too the
+!     manner in which the solution is constrained to be nonnegative.
+! (5) Locate demoharmonic.f90 and look at how root finding options
+!     are set and how the event residual routine is supplied to
+!     DVODE_F90.
+! (6) The other demo programs available from the DVODE_F90 support
+!     page illustrate various other solution options available in
+!     DVODE_F90. The demo programs may be obtained from
+!
+!        http://www.radford.edu/~thompson/vodef90web/index.html
+! ______________________________________________________________________
+! DVODE_F90 Full Documentation Prologue
+
+! Section 1.  Setting Options in DVODE_F90
+! Section 2.  Calling DVODE_F90
+! Section 3.  Choosing Error Tolerances
+! Section 4.  Choosing the Method of Integration
+! Section 5.  Interpolation of the Solution and Derivatives
+! Section 6.  Handling Events (Root Finding)
+! Section 7.  Gathering Integration Statistics
+! Section 8.  Determining Jacobian Sparsity Structure Arrays
+! Section 9.  Original DVODE Documentation Prologue
+! Section 10. Example Usage
+
+! Note: Search on the string 'Section' to locate these sections. You
+! may wish to refer to the support page which has the sections broken
+! into smaller pieces.
+! ______________________________________________________________________
+! Section 1.  Setting Options in DVODE_F90
+!
+! You can use any of three options routines:
+!
+! SET_NORMAL_OPTS
+! SET_INTERMEDIATE_OPTS
+! SET_OPTS
+
+! OPTIONS = SET_NORMAL_OPTS(DENSE_J, BANDED_J, SPARSE_J,               &
+!   USER_SUPPLIED_JACOBIAN, LOWER_BANDWIDTH, UPPER_BANDWIDTH,          &
+!   RELERR, ABSERR, ABSERR_VECTOR, NEVENTS)
+
+! OPTIONS = SET_INTERMEDIATE_OPTS(DENSE_J, BANDED_J, SPARSE_J,         &
+!   USER_SUPPLIED_JACOBIAN,LOWER_BANDWIDTH, UPPER_BANDWIDTH,           &
+!   RELERR, ABSERR, ABSERR_VECTOR,TCRIT, H0, HMAX, HMIN, MAXORD,       &
+!   MXSTEP, MXHNIL, NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS,          &
+!   NEVENTS, CONSTRAINED, CLOWER, CUPPER, CHANGE_ONLY_f77_OPTIONS)     &
+
+! OPTIONS = SET_OPTS(METHOD_FLAG, DENSE_J, BANDED_J, SPARSE_J,         &
+!   USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN, CONSTANT_JACOBIAN,          &
+!   LOWER_BANDWIDTH, UPPER_BANDWIDTH, SUB_DIAGONALS, SUP_DIAGONALS,    &
+!   RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR, TCRIT, H0, HMAX,     &
+!   HMIN, MAXORD, MXSTEP, MXHNIL, YMAGWARN, SETH, UPIVOT, NZSWAG,      &
+!   USER_SUPPLIED_SPARSITY, NEVENTS, CONSTRAINED, CLOWER, CUPPER,      &
+!   MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES, MA28_EPS,            &
+!   MA28_RPS, CHANGE_ONLY_f77_OPTIONS, JACOBIAN_BY_JACSP)
+
+! Please refer to the documentation prologue for each of these functions
+! to see what options may be used with each. Note that input to each is
+! via keyword and all variables except error tolerances are optional.
+! Defaults are used for unspecified options. If an option is available
+! in SET_NORMAL OPTS, it is available and has the same meaning in
+! SET_INTERMEDIATE_OPTS and SET_OPTS. Similarly, if an option is available
+! in SET_INTERMEDIATE_OPTS, it is available and has the same meaning in
+! SET_OPTS.
+
+! The first two functions are provided merely for convenience.
+! SET_NORMAL_OPTS is available simply to relieve you of reading the
+! documentation for SET_OPTS and to use default values for all but
+! the most common options. SET_INTERMEDIATE_OPTS is available to allow
+! you more control of the integration while still using default values
+! for less commonly used options. SET_OPTS allows you to specify any
+! of the options available in DVODE_F90.
+
+! Roughly, SET_NORMAL_OPTS is intended to provide for dense, banded,
+! and numerical sparse Jacobians without the need to specify other
+! specialized options. SET_INTERMEDIATE_OPTIONS is intended to allow
+! more general sparse Jacobian options. SET_OPTS is intended to provide
+! access to all options in DVODE_F90.
+
+! Please note that SET_INTERMEDIATE_OPTS can be invoked using the same
+! arguments as SET_NORMAL_OPTS; and SET_OPTS can be invoked using the
+! same arguments as either SET_NORMAL_OPTS or SET_INTERMEDIATE_OPTS.
+! If you wish you can simply delete SET_NORMAL_OPTS as well as
+! SET_INTERMEDIATE_OPTS and use only SET_OPTS for all problems. If you
+! do so, you need only include the options that you wish to use when
+! you invoke SET_OPTIONS.
+
+! In the following description any reference to SET_OPTS applies equally
+! to SET_NORMAL_OPTS and SET_INTERMEDIATE OPTS.
+
+! Before calling DVODE_F90 for the first time, SET_OPTS must be invoked.
+! Typically, SET_OPTS is called once to set the desired integration
+! options and parameters. DVODE_F90 is then called in an output loop to
+! obtain the solution for the desired times. A detailed description of
+! the DVODE_F90 arguments is given in a section below. Detailed descriptions
+! of the options available via SET_OPTS are given in the documentation prologue.
+! Although each option available in the f77 version of DVODE as well as
+! several additional ones are available in DVODE_F90 via SET_OPTS,
+! several of the available options are not relevant for most problems
+! and need not be specified. Refer to the accompanying demonstration
+! programs for specific examples of each usage. Note that after any call
+! to DVODE_F90, you may call GET_STATS to gather relevant integration
+! statistics. After your problem has completed, you may call
+! RELEASE_ARRAYS to deallocate any internal arrays allocated by
+! DVODE_F90 and to determine how much storage was used by DVODE_F90.
+!
+! To communicate with DVODE_F90 you will need to include the following
+! statement in your calling program:
+!    USE DVODE_F90_M
+! and include the following statement in your type declarations section:
+!    TYPE(VODE_OPTS) :: OPTIONS
+! Below are brief summaries of typical uses of SET_OPTS.
+! Nonstiff Problems:
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR=ATOL)
+!    The above use of SET_OPTS will integrate your system of odes
+!    using the nonstiff Adams methods while using a relative error
+!    tolerance of RTOL and an absolute error tolerance of ATOL.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR=ATOL,NEVENTS=NG)
+!    If you wish to do root finding, SET_OPTS can be used as above.
+!    Here, NEVENTS is the desired number of root finding functions.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=G)
+!    Here F is the name of your derivative subroutine and G is the
+!    name of your subroutine to evaluate residuals of the root
+!    finding functions.
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR_VECTOR=ATOL)
+!    This use of SET_OPTS indicates that a scalar relative error
+!    tolerance and a vector of absolute error tolerances will be
+!    used.
+! Stiff Problems, internally generated dense Jacobian:
+! OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL,ABSERR=ATOL)
+!    This use of DENSE_J=.TRUE. indicates that DVODE_F90 will
+!    use the stiffly stable BDF methods and will approximate
+!    the Jacobian, considered to be a dense matrix, using
+!    finite differences. Your subsequent call to DVODE_F90
+!    might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+! OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL, &
+!                    USER_SUPPLIED_JACOBIAN=.TRUE.)
+!    If you know the Jacobian and wish to supply subroutine JAC
+!    as described in the documentation for DVODE_F90, the options
+!    call could look like the above.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F1,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC)
+!    Here, JAC is the name of the subroutine that you provide to
+!    evaluate the known Jacobian.
+! Stiff Problems, internally generated banded Jacobian:
+! OPTIONS = SET_OPTS(BANDED_J=.TRUE.,RELERR=RTOL,ABSERR=ATOL, &
+!                       LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU)
+!    This use of BANDED_J=.TRUE. indicates that DVODE_F90 will
+!    use the stiffly stable BDF methods and will approximate the
+!    Jacobian, considered to be a banded matrix, using finite
+!    differences. Here ML is the lower bandwidth of the Jacobian
+!    and ML is the upper bandwidth of the Jacobian.
+! Stiff Problems, internally generated sparse Jacobian:
+! OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    This use of SET_OPTS indicates that the Jacobian is a sparse
+!    matrix. Its structure will be approximated internally by
+!    making calls to your derivative routine. If you know the
+!    structure before hand, you may provide it directly in a
+!    variety of ways as described in the documentation prologue
+!    for SET_OPTS. In addition, several other options related
+!    to sparsity are available.
+! More complicated common usage:
+!    Suppose you need to solve a stiff problem with a sparse Jacobian.
+!    After some time, the structure of the Jacobian changes and you
+!    wish to have DVODE_F90 recalculate the structure before continuing
+!    the integration. Suppose that initially you want to use an absolute
+!    error tolerance of 1.0D-5 and that when the Jacobian structure is
+!    changed you wish to reduce the error tolerance 1.0D-7. Your calls
+!    might look like this.
+!    RTOL = ...
+!    ATOL = 1.0D-5
+!    OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    Output loop:
+!       CALL DVODE_F90(FCN,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+!       At desired time:
+!       ISTATE = 3
+!       ATOL = 1.0D-7
+!       OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    End of output loop
+
+! In the following we have summarized and described how some of the demonstration
+! programs set options and call DVODE_F90. In each case the necessary parameters
+! are defined before invoking SET_OPTS. The call to DVODE_F90 is in a loop in
+! which the output time is successively updated. The actual programs are available
+! from the web support page
+!
+!    http://www.radford. edu/~thompson/vodef90web/index.html/
+!
+!                              Problem Summary
+!
+! Problem                  NEQ      Jacobian            Features Illustrated
+!
+! Prologue Example 1        3        Dense               Basic
+!
+! Prologue Example 2        3        Dense               Root finding
+!
+! Robertson                 3        Dense               Solution bounds
+!
+! Harmonic Oscillator       4        Nonstiff            Root finding
+!
+! Flow Equations         5-1800      Sparse              Automatic determination
+!                                                        of sparsity arrays
+!
+! Diurnal Kinetics      50-5000      Sparse or banded    Sparsity options
+!
+!                       Options Used and DVODE_F90 Call
+!
+! Prologue Example 1
+!
+!    OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE., ABSERR_VECTOR=ATOL, RELERR=RTOL,     &
+!              USER_SUPPLIED_JACOBIAN=.TRUE.)
+!    CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+!
+!    The problem consists of a stiff system of NEQ=3 equations. The dense
+!    Jacobian option (DENSE_J) is used. A vector ATOL(*) of error tolerances
+!    is used. A scalar relative error tolerance RTOL is used. Subroutine JEX
+!    is provided to evaluate the analytical Jacobian. If the last argument
+!    J_FCN=JEX is omitted (as in Example 2), a numerical Jacobian will
+!    be used.
+!
+! Prologue Example 2
+!
+!    OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE., RELERR=RTOL, ABSERR_VECTOR=ATOL,     &
+!              NEVENTS=NG)
+!    CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!
+!    The system in Example 1 is used to illustrate root finding. It is
+!    desired to locate the times at which two of the solution components
+!    attain prescribed values. NEVENTS=2 informs the solver that two such
+!    functions are used. Subroutine GEX is used to calculate the residuals
+!    for these two functions. A dense numerical Jacobian is used.
+!
+! Robertson Problem
+!
+!    OPTIONS = SET_INTERMEDIATE_OPTS(DENSE_J=.TRUE., RELERR_VECTOR=RTOL,            &
+!              ABSERR_VECTOR=ABSERR_TOLERANCES, CONSTRAINED=BOUNDED_COMPONENTS,     &
+!              CLOWER=LOWER_BOUNDS, CUPPER=UPPER_BOUNDS)
+!
+!    CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JACD)
+!    The system used in Examples 1 and 2 is solved over a much larger
+!    time interval. The solution is constrained to be nonegative. This
+!    is done by prescribing the components to be constrained (BOUNDED_COMPONENTS).
+!    Artificially large values are used to impose upper bounds (UPPER_BOUNDS)
+!    and lower bounds of zero are used to force a nonnegative solution.
+!
+! Harmonic Oscillator Problem
+!
+!    OPTIONS = SET_NORMAL_OPTS(RELERR=RTOL, ABSERR=ATOL, NEVENTS=NG)
+!    CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEVENTS)
+!
+!    A nonstiff system of NEQ=4 equations is solved. The nonstiff option is
+!    used because neither DENSE_ nor BANDED_J nor SPARSE_J is present. It is
+!    desired to find the times at which Y(2) or Y(3) is equal to 0. Residuals
+!    for the two corresponding event functions are calculated in subroutine
+!    GEVENTS.
+!
+! Flow Equations Problem
+!
+!    OPTIONS = SET_OPTS(SPARSE_J=SPARSE, ABSERR=ATOL(1), RELERR=RTOL(1),            &
+!              MXSTEP=100000, NZSWAG=20000)
+!    CALL DVODE_F90(FCN,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+!
+!    This is a stiff system of equations resulting a method of lines
+!    discretization. The Jacobian is sparse. Scalar absolute and relative
+!    error tolerances are used. The Jacobian structure and a numerical
+!    Jacobian are used. The solver is limited to a maximum of MXSTEP steps.
+!    NZSWAG is the amount by which allocated array sizes will be increased.
+!    The accompanying test program may be used to illutrate several other
+!    solution options.
+!
+! Diurnal Kinetics Problem
+!
+!    OPTIONS = SET_OPTS(SPARSE_J=SPARSE, BANDED_J=BANDED, DENSE_J=DENSE,            &
+!              ABSERR_VECTOR=ATOL(1:NEQ), RELERR=RTOL(1), MXSTEP=100000,            &
+!              NZSWAG=50000, HMAX=MAXH, LOWER_BANDWIDTH=ML, UPPER_BANDWIDTH=MU,     &
+!              MA28_ELBOW_ROOM=10, MC19_SCALING=.TRUE., MA28_MESSAGES=.FALSE.,      &
+!              MA28_EPS=1.0D-4, MA28_RPS=.TRUE.,                                    &
+!              USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE)
+!   CALL USERSETS_IAJA(IA, IADIM, JA, JADIM)
+!   CALL DVODE_F90(FCN, NEQ, Y, T, TOUT, ITASK, ISTATE, OPTIONS)
+!
+!   This problem can be used to illustrate most solution options. Here, dense,
+!   banded, or sparse Jacobians are used depending on the values of the first
+!   three parameters. A vector error tolerance is used and a scalar relative
+!   error tolerance is used. If a banded solution is desired, it is necessary
+!   to supply the bandwidths ML and MU. If a sparse solution is desired,
+!   several special options are used. The most important one is MA28_RPS to
+!   force the solver to update the partial pivoting sequence when singular
+!   iteration matrices are encountered. The sparsity pattern is determined
+!   numerically if SUPPLY_STRUCTURE is FALSE. Otherwise the user will supply
+!   the pattern by calling subroutine USERSETS_IAJA.
+! ______________________________________________________________________
+! Section 2.  Calling DVODE_F90
+!
+! DVODE_F90 solves the initial value problem for stiff or nonstiff
+! systems of first order ODEs,
+!     dy/dt = f(t,y), or, in component form,
+!     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+! DVODE_F90 is a package based on the EPISODE and EPISODEB packages,
+! and on the ODEPACK user interface standard. It was developed from
+! the f77 solver DVODE developed by Brown, Byrne, and Hindmarsh.
+! DVODE_F90 also provides for the solution of sparse systems in a
+! fashion similar to LSODES and LSOD28. Currently, MA28 is used
+! to perform the necessary sparse linear algebra. DVODE_F90 also
+! contains the provision to do root finding in a fashion similar
+! to the LSODAR solver from ODEPACK.
+
+! Communication between the user and the DVODE_F90 package, for normal
+! situations, is summarized here. This summary describes only a subset
+! of the full set of options available. See the full description for
+! details, including optional communication, nonstandard options, and
+! instructions for special situations.
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC,G_FCN=GEX)
+!    The arguments in the call list to DVODE_F90 have the following
+!    meanings.
+! F       = The name of the user-supplied subroutine defining the
+!           ODE system. The system must be put in the first-order
+!           form dy/dt = f(t,y), where f is a vector-valued function
+!           of the scalar t and the vector y. Subroutine F is to
+!           compute the function f. It is to have the form
+!                SUBROUTINE F(NEQ,T,Y,YDOT)
+!                DOUBLE PRECISION T,Y(NEQ),YDOT(NEQ)
+!           where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+!           is output. Y and YDOT are arrays of length NEQ.
+!           Subroutine F should not alter Y(1),...,Y(NEQ).
+!           If F (and JAC) are not contained in a module available to
+!           your calling program, you must declare F to be EXTERNAL
+!           in the calling program.
+! NEQ     = The size of the ODE system (number of first order
+!           ordinary differential equations).
+! Y       = A double precision array for the vector of dependent variables,
+!           of length NEQ or more. Used for both input and output on the
+!           first call (ISTATE = 1), and only for output on other calls.
+!           On the first call, Y must contain the vector of initial
+!           values. In the output, Y contains the computed solution
+!           evaluated at T.
+! T       = The independent variable. In the input, T is used only on
+!           the first call, as the initial point of the integration.
+!           In the output, after each call, T is the value at which a
+!           computed solution Y is evaluated (usually the same as TOUT).
+!           On an error return, T is the farthest point reached.
+! TOUT    = The next value of t at which a computed solution is desired.
+!           TOUT is Used only for input. When starting the problem
+!           (ISTATE = 1), TOUT may be equal to T for one call, then
+!           should not equal T for the next call. For the initial T,
+!           an input value of TOUT unequal to T is used in order to
+!           determine the direction of the integration (i.e. the
+!           algebraic sign of the step sizes) and the rough scale
+!           of the problem. Integration in either direction (forward
+!           or backward in t) is permitted. If ITASK = 2 or 5 (one-step
+!           modes), TOUT is ignored after the first call (i.e. the
+!           first call with TOUT \= T). Otherwise, TOUT is required
+!           on every call. If ITASK = 1, 3, or 4, the values of TOUT
+!           need not be monotone, but a value of TOUT which backs up
+!           is limited to the current internal t interval, whose
+!           endpoints are TCUR - HU and TCUR. (Refer to the description
+!           of GET_STATS for a description of TCUR and HU.)
+! ITASK   = An index specifying the task to be performed.
+!           Input only. ITASK has the following values and meanings.
+!           1  means normal computation of output values of y(t) at
+!              t = TOUT (by overshooting and interpolating).
+!           2  means take one step only and return.
+!           3  means stop at the first internal mesh point at or
+!              beyond t = TOUT and return.
+!           4  means normal computation of output values of y(t) at
+!              t = TOUT but without overshooting t = TCRIT.
+!              TCRIT must be specified in your SET_OPTS call. TCRIT
+!              may be equal to or beyond TOUT, but not behind it in
+!              the direction of integration. This option is useful
+!              if the problem has a singularity at or beyond t = TCRIT.
+!           5  means take one step, without passing TCRIT, and return.
+!              TCRIT must be specified in your SET_OPTS call.
+!           If ITASK = 4 or 5 and the solver reaches TCRIT (within
+!           roundoff), it will return T = TCRIT(exactly) to indicate
+!           this (unless ITASK = 4 and TOUT comes before TCRIT, in
+!           which case answers at T = TOUT are returned first).
+! ISTATE  = an index used for input and output to specify the
+!           the state of the calculation.
+!           In the input, the values of ISTATE are as follows.
+!           1  means this is the first call for the problem
+!              (initializations will be done). See note below.
+!           2  means this is not the first call, and the calculation
+!              is to continue normally, with no change in any input
+!              parameters except possibly TOUT and ITASK.
+!           3  means this is not the first call, and the
+!              calculation is to continue normally, but with
+!              a change in input parameters other than
+!              TOUT and ITASK. Desired changes require SET_OPTS
+!              be called prior to calling DVODE_F90 again.
+!           A preliminary call with TOUT = T is not counted as a
+!           first call here, as no initialization or checking of
+!           input is done. (Such a call is sometimes useful to
+!           include the initial conditions in the output.)
+!           Thus the first call for which TOUT is unequal to T
+!           requires ISTATE = 1 in the input.
+!           In the output, ISTATE has the following values and meanings.
+!            1  means nothing was done, as TOUT was equal to T with
+!               ISTATE = 1 in the input.
+!            2  means the integration was performed successfully.
+!            3  means a root of one of your root finding functions
+!               has been located.
+!           A negative value of ISTATE indicates that DVODE_F90
+!           encountered an error as described in the printed error
+!           message. Since the normal output value of ISTATE is 2,
+!           it does not need to be reset for normal continuation.
+!           Also, since a negative input value of ISTATE will be
+!           regarded as illegal, a negative output value requires
+!           the user to change it, and possibly other input, before
+!           calling the solver again.
+! OPTIONS = The options structure produced by your call to SET_OPTS.
+! JAC     = The name of the user-supplied routine (MITER = 1 or 4 or 6)
+!           If you do not specify that a stiff method is to be used
+!           in your call to SET_OPTS, you need not include JAC in
+!           your call to DVODE_F90. If you specify a stiff method and
+!           that a user supplied Jacobian will be supplied, JAC must
+!           compute the Jacobian matrix, df/dy, as a function of the
+!           scalar t and the vector y. It is to have the form:
+!              SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!              DOUBLE PRECISION T, Y(NEQ), PD(NROWPD,NEQ)
+!           where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+!           PD is to be loaded with partial derivatives (elements of the
+!           Jacobian matrix) in the output. PD must be given a first
+!           dimension of NROWPD. T and Y have the same meaning as in
+!           Subroutine F.
+!           In the full matrix case (MITER = 1), ML and MU are
+!           ignored, and the Jacobian is to be loaded into PD in
+!           columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+!           In the band matrix case (MITER = 4), the elements
+!           within the band are to be loaded into PD in columnwise
+!           manner, with diagonal lines of df/dy loaded into the rows
+!           of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+!           ML and MU are the half-bandwidth parameters. (See IUSER).
+!           The locations in PD in the two triangular areas which
+!           correspond to nonexistent matrix elements can be ignored
+!           or loaded arbitrarily, as they are overwritten by DVODE_F90.
+!           In the sparse matrix case the elements of the matrix
+!           are determined by the sparsity structure given by the
+!           IA and JA pointer arrays. Refer to the documentation
+!           prologue for SET_OPTS for a description of the arguments
+!           for JAC since they differ from the dense and banded cases.
+!           JAC need not provide df/dy exactly. A crude
+!           approximation (possibly with a smaller bandwidth) will do.
+!           In either case, PD is preset to zero by the solver,
+!           so that only the nonzero elements need be loaded by JAC.
+!           In the sparse matrix case, JAC has a different form:
+!                SUBROUTINE JAC (N, T, Y, IA, JA, NZ, PD)
+!           Given the number of odes N, the current time T, and the
+!           current solution vector Y, JAC must do the following:
+!              If NZ = 0 on input:
+!              Replace NZ by the number of nonzero elements in the
+!              Jacobian. The diagonal of the Jacobian must be included.
+!              Do NOT define the arrays IA, JA, PD at this time.
+!              Once JAC has been called with NZ = 0 and you have
+!              defined the value of NZ, future calls to JAC will use
+!              this value of NZ.
+!              When a call is made with NZ unequal to 0, you must
+!              define the sparsity structure arrays IA and JA, and
+!              the sparse Jacobian PD.
+!                 IA defines the number of nonzeros including the
+!                 diagonal in each column of the Jacobian. Define
+!                 IA(1) = 1 and for J = 1,..., N,
+!                 IA(J+1) = IA(J) + number of nonzeros in column J.
+!                 Diagonal elements must be included even if they are
+!                 zero. You should check to ensure that IA(N+1)-1 = NZ.
+!                 JA defines the rows in which the nonzeros occur.
+!                 For I = 1,...,NZ, JA(I) is the row in which the Ith
+!                 element of the Jacobian occurs. JA must also include
+!                 the diagonal elements of the Jacobian.
+!                 PD defines the numerical value of the Jacobian
+!                 elements. For I = 1,...,NZ, PD(I) is the numerical
+!                 value of the Ith element in the Jacobian. PD must
+!                 also include the diagonal elements of the Jacobian.
+! GFUN    = the name of the subroutine to evaluate the residuals for
+!           event functions. If you do not specify that events are
+!           present (by specifying NEVENTS > 0 in SET_OPTS), you
+!           need not include GFUN in your call list for DVODE_F90.
+!           If GFUN is not contained in a module available to your
+!           calling program, you must declare GFUN to be EXTERNAL
+!           in your calling program.
+! To continue the integration after a successful return, simply
+! reset TOUT and call DVODE_F90 again. No other parameters need
+! be reset unless ISTATE=3 in which case, reset it to 2 before
+! calling DVODE_F90 again.
+! ______________________________________________________________________
+! Section 3.  Choosing Error Tolerances
+!
+! This is the most important aspect of solving odes numerically.
+! You may supply any of four keywords and values. If you wish to
+! use scalar error tolerances, you should supply ABSERR and RELERR.
+! For a good many problems, it is advisable to supply a vector of
+! absolute error tolerances ABSERR_VECTOR = desired vector. This
+! allows you to use different tolerances for each component of
+! the solution. If ABSERR_VECTOR is supplied, it must be a vector
+! of length NEQ where NEQ is the number of odes in your system.
+! Similarly, you may supply a vector of relative error tolerances,
+! RELERR_VECTOR. If no tolerances are specified, DVODE_F90 will use
+! default error tolerances ABSERR=1D-6 and RELERR=1D-4; but it is
+! strongly recommended that you supply values that are appropriate
+! for your problem. In the event you do not supply error tolerances,
+! DVODE_F90 will print a reminder that the default error tolerances
+! are not appropriate for all problems.
+!
+! RELERR can be set to a scalar value as follows.
+! Determine the number of significant digits of accuracy desired, 
+! which will be a positive integer, say, N.
+! Then set RELERR = 10**-(N+1). 
+! The authors recommend that RELERR be no larger than 10**-4.
+! The authors recommend a vector valued absolute error tolerance,
+! which can be set as follows.
+! For the I-th component of the solution vector, Y(I), determine
+! the positive number FLOOR(I) at which ABS(Y(I)) becomes
+! negligible for the problem at hand. FLOOR(I) is sometimes called
+! the problem zero or the floor value for the I-th component and is
+! problem dependent. For a given problem that is not scaled, these
+! floor values may well vary by up to 9 orders of magnitude.
+! Set ABSERR(I) = FLOOR(I) or to be conservative
+! ABSERR_VECTOR(I) = 0.1*FLOOR(I). There is no variable FLOOR in
+! DVODE_F90. If it is difficult to divine the components of ABSERR,
+! (or FLOOR) make a reasonable guess, run the problem, then set that
+! ABSERR_VECTOR so for I = 1, 2,...NEQ,
+! ABSERR_VECTOR(I) = 1D-6*RELERR*MAX{ABS(Y(I,TOUT): for all TOUT}.
+! The correct choices for RELERR and ABSERR can and do have
+! significant impact on both the quality of the solution and run
+! time. Counter intuitively, error tolerances that are too loose
+! can and do increase run time significantly and the quality of
+! the solution may be seriously compromised.
+! Examples:
+! 1. OPTIONS = SET_OPTS(DENSE_J=.TRUE., ABSERR=1D-8,RELERR=1D-8)
+!    This will yield MF = 22. Both the relative error tolerance
+!    and the absolute error tolerance will equal 1D-8.
+! 2. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=1D-5, &
+!                       ABSERR_VECTOR=(/1D-6,1D-8/))
+!    For a system with NEQ=2 odes, this will yield MF = 22. A scalar
+!    relative error tolerance equal to 1D-5 will be used. Component 1
+!    of the solution will use an absolute error tolerance of 1D-6
+!    while component 2 will use an absolute error tolerance of 1D-8.
+! ______________________________________________________________________
+! Section 4.  Choosing the Method of Integration
+!
+! If you wish to specify a numerical value for METHOD_FLAG, it can equal
+! any of the legal values of MF for DVODE or LSODES. (See below.) If
+! you do not wish to specify a numerical value for METHOD_FLAG, you
+! may specify any combination of the five logical keywords DENSE_J,
+! BANDED_J, SPARSE_J, USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN that you
+! wish. Appropriate values will be used in DVODE_F90 for any variables
+! that are not present. The first three flags indicate the type of
+! Jacobian, dense, banded, or sparse. If USER_SUPPLIED_JACOBIAN=.TRUE.,
+! the Jacobian will be determined using the subroutine JAC you supply
+! in your call to DVODE_F90. Otherwise, an internal Jacobian will be
+! generated using finite differences.
+! Examples:
+! 1. OPTIONS = SET_OPTS(METHOD_FLAG=22,...)
+!    DVODE will use the value MF=22 as described in the documentation
+!    prologue. In this case, the stiff BDF methods will be used with
+!    a dense, internally generated Jacobian.
+! 2. OPTIONS = SET_OPTS(METHOD_FLAG=21,...)
+!    This is the same an Example 1 except that a user supplied dense
+!    Jacobian will be used and DVODE will use MF=21.
+! 3. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,...)
+!    This will yield MF = 22 as in Example 1, provided
+!    USER_SUPPLIED_JACOBIAN and SAVE_JACOBIAN are not present, or if
+!    present are set to their default
+!     values of .FALSE. and .TRUE., respectively.
+! 4. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,&
+!                       USER_SUPPLIED_JACOBIAN=.TRUE.,...)
+!    This will yield MF = 21 as in Example 2, provided SAVE_JACOBIAN
+!    is not present, or if present is set to its default value .FALSE.
+! Notes:
+! 1. If you specify more than one of DENSE_J, BANDED_J, and SPARSE_J,
+!    DENSE_J takes precedence over BANDED_J which in turn takes
+!    precedence over SPARSE_J.
+! 2. By default, DVODE_F90 saves a copy of the Jacobian and reuses the
+!    copy when necessary. For problems in which storage requirements
+!    are acute, you may wish to override this default and have
+!    DVODE_F90 recalculate the Jacobian rather than use a saved copy.
+!    You can do this by specifying SAVE_JACOBIAN=.FALSE. It is
+!    recommended that you not do this unless necessary since it can
+!    have a significant impact on the efficiency of DVODE_F90. (For
+!    example, when solving a linear problem only one evaluation of
+!    the Jacobian is required with the default option.)
+! 3. If you choose BANDED_J = .TRUE. or if you supply a value of MF
+!    that corresponds to a banded Jacobian, you must also supply the
+!    lower  bandwidth ML and the upper bandwidth of the Jacobian MU
+!    by including the keywords
+!    LOWER_BANDWIDTH = value of ML and UPPER_BANDWIDTH = value of M
+!                   More on Method Selection
+! The keyword options available in SET_OPTS are intended to replace
+! the original method indicator flag MF. However, if you wish to
+! retain the flexibility of the original solver, you may specify MF
+! directly in your call to SET_OPTS. This is done by using the
+! keyword METHOD_FLAG=MF in your SET_OPTS where MF has any of the
+! values in the following description. Refer to the demonstration
+! program demosp.f90 for an example in which this is done.
+! MF     = The method flag. Used only for input. The legal values of
+!          MF are:
+!          10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26,
+!          27, -11, -12, -14, -15, -21, -22, -24, -25, -26, -27.
+!          MF is a signed two-digit integer, MF = JSV*(10*METH+MITER).
+!          JSV = SIGN(MF) indicates the Jacobian-saving strategy:
+!            JSV =  1 means a copy of the Jacobian is saved for reuse
+!                     in the corrector iteration algorithm.
+!            JSV = -1 means a copy of the Jacobian is not saved
+!                     (valid only for MITER = 1, 2, 4, or 5).
+!          METH indicates the basic linear multistep method:
+!            METH = 1 means the implicit Adams method.
+!            METH = 2 means the method based on backward
+!                     differentiation formulas (BDF-s).
+!          MITER indicates the corrector iteration method:
+!            MITER = 0 means functional iteration (no Jacobian matrix
+!                      is involved).
+!            MITER = 1 means chord iteration with a user-supplied
+!                      full (NEQ by NEQ) Jacobian.
+!            MITER = 2 means chord iteration with an internally
+!                      generated (difference quotient) full Jacobian
+!                      (using NEQ extra calls to F per df/dy value).
+!            MITER = 4 means chord iteration with a user-supplied
+!                      banded Jacobian.
+!            MITER = 5 means chord iteration with an internally
+!                      generated banded Jacobian (using ML+MU+1 extra
+!                      calls to F per df/dy evaluation).
+!            MITER = 6 means chord iteration with a user-supplied
+!                      sparse Jacobian.
+!            MITER = 7 means chord iteration with an internally
+!                      generated sparse Jacobian
+!          If MITER = 1, 4, or 6 the user must supply a subroutine
+!          JAC(the name is arbitrary) as described above under JAC.
+!          For other values of MITER, JAC need not be provided.
+! ______________________________________________________________________
+! Section 5.  Interpolation of the Solution and Derivative
+!
+! Following a successful return from DVODE_F90, you may call
+! subroutine DVINDY to interpolate the solution or derivative.
+! SUBROUTINE DVINDY(T, K, DKY, IFLAG)
+! DVINDY computes interpolated values of the K-th derivative of the
+! dependent variable vector y, and stores it in DKY. This routine
+! is called with K = 0 or K = 1 and T = TOUT. In either case, the
+! results are returned in the array DKY of length at least NEQ which
+! must be declared and dimensioned in your calling program. The
+! computed values in DKY are obtained by interpolation using the
+! Nordsieck history array.
+! ______________________________________________________________________
+! Section 6.  Handling Events (Root Finding)
+!
+!    DVODE_F90 contains root finding provisions. It attempts to
+!    locates the roots of a set of functions
+!         g(i) = g(i,t,y(1),...,y(NEQ))  (i = 1,...,ng).
+!    To use root finding include NEVENTS=NG in your call to SET_OPTS
+!    where NG is the number of root finding functions. You must then
+!    supply subroutine GFUN in your call to DVODE_F90 using
+!    G_FCN=GFUN as the last argument. GFUN must has the form
+!               SUBROUTINE GFUN(NEQ, T, Y, NG, GOUT)
+!    where NEQ, T, Y, and NG are input, and the array GOUT is output.
+!    NEQ, T, and Y have the same meaning as in the F routine, and
+!    GOUT is an array of length NG. For i = 1,...,NG, this routine is
+!    to load into GOUT(i) the value at (T,Y) of the i-th constraint
+!    function g(i). DVODE_F90 will find roots of the g(i) of odd
+!    multiplicity (i.e. sign changes) as they occur during the
+!    integration. GFUN must be declared EXTERNAL in the calling
+!    program. Note that because of numerical errors in the functions
+!    g(i) due to roundoff and integration error, DVODE_F90 may return
+!    false roots, or return the same root at two or more nearly equal
+!    values of t. This is particularly true for problems in which the
+!    integration is restarted (ISTATE = 1) at a root. If such false
+!    roots are suspected, you should consider smaller error tolerances
+!    and/or higher precision in the evaluation of the g(i). Note
+!    further that if a root of some g(i) defines the end of the
+!    problem, the input to DVODE_F90 should nevertheless allow
+!    integration to a point slightly past that root, so that DVODE_F90
+!    can locate the root by interpolation. Each time DVODE_F90 locates
+!    a root of one of your event functions it makes a return to the
+!    calling program with ISTATE = 3. When such a return is made and
+!    you have processed the results, simply change ISTATE = 2 and call
+!    DVODE_F90 again without making other changes.
+! ______________________________________________________________________
+! Section 7.  Gathering Integration Statistics
+!
+! SUBROUTINE GET_STATS(RSTATS, ISTATS, NUMEVENTS, JROOTS)
+! Caution:
+! RSTATS and ISTATS must be declared and dimensioned in your
+! main program. The minimum dimensions are:
+! DIMENSION RSTATS(22), ISTATS(31)
+! This subroutine returns the user portions of the original DVODE
+! RUSER and IUSER arrays, and if root finding is being done, it
+! returns the original LSODAR JROOT vector. NUMEVENTS and JROOTS
+! are optional parameters. NUMEVENTS is the number of root functions
+! and JROOTS is an integer array of length NUMEVENTS.
+! Available Integration Statistics:
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (E(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! MA28AD_CALLS      IUSER(23) The number of calls made to MA28AD
+! MA28BD_CALLS      IUSER(24) The number of calls made to MA28BD
+! MA28CD_CALLS      IUSER(25) The number of calls made to MA28CD
+! MC19AD_CALLS      IUSER(26) The number of calls made to MC19AD
+! IRNCP             IUSER(27) The number of compressions done on array JAN
+! ICNCP             IUSER(28) The number of compressions done on array ICN
+! MINIRN            IUSER(29) Minimum size for JAN array
+! MINICN            IUSER(30) Minimum size for ICN array
+! MINNZ             IUSER(31) Number of nonzeros in sparse Jacobian
+! JROOTS  JROOTS    Optional array of component indices for components
+!                   having a zero at the current time
+! ______________________________________________________________________
+! Section 8.  Determining Jacobian Sparsity Structure Arrays
+!
+! If you are solving a problem with a sparse Jacobian, the arrays
+! that define the sparsity structure are needed. The arrays may
+! be determined in any of several ways.
+! 1. If you choose the default mode by indicating SPARSE=.TRUE.,
+!    the sparsity arrays will be determined internally by DVODE_F90
+!    by making calls to your derivative subroutine. This mode is
+!    equivalent to using the integration method flag MF = 227.
+! 2. The DVODE_F90 method flag MF is defined to be
+!    MF = 100*MOSS + 10*METH + MITER. If you supply MF = 227 (or 217),
+!    the sparse Jacobian will be determined using finite differences;
+!    and the sparsity arrays will be determined by calling your
+!    derivative subroutine.
+! 3. If you supply MF = 126 (or 116), you must supply the Jacobian
+!    subroutine JAC to define the exact Jacobian. JAC must have the
+!    following form:
+!           SUBROUTINE JAC (N, T, Y, IA, JA, NZ, PD)
+!    Given the number of odes N, the current time T, and the current
+!    solution vector Y, JAC must do the following:
+!    -  If NZ = 0 on input:
+!       Replace NZ by the number of nonzero elements in the Jacobian.
+!       The diagonal of the Jacobian must be included.
+!       Do NOT define the arrays IA, JA, PD at this time.
+!       Once JAC has been called with NZ = 0 and you have defined the
+!       value of NZ, future calls to JAC will use this value of NZ.
+!    -  When a call is made with NZ unequal to 0, you must define the
+!       sparsity structure arrays IA and JA, and the sparse Jacobian
+!       PD.
+!         - IA defines the number of nonzeros including the diagonal
+!           in each column of the Jacobian. Define IA(1) = 1 and for
+!           J = 1,..., N,
+!           IA(J+1) = IA(J) + number of nonzeros in column J.
+!           Diagonal elements must be include even if they are zero.
+!           You should check to ensure that IA(N+1)-1 = NZ.
+!         - JA defines the rows in which the nonzeros occur. For
+!           I = 1,...,NZ, JA(I) is the row in which the Ith element
+!           of the Jacobian occurs. JA must also include the diagonal
+!           elements of the Jacobian.
+!         - PD defines the numerical value of the Jacobian elements.
+!           For I = 1,...,NZ, PD(I) is the numerical value of the
+!           Ith element in the Jacobian. PD must also include the
+!           diagonal elements of the Jacobian.
+! 4. If you wish to supply the IA and JA arrays directly, use
+!    MF = 27. In this case, after calling SET_OPTS, you must call
+!    SET_IAJA supplying the arrays IAUSER and JAUSER described in
+!    the documentation prologue for SET_IAJA. These arrays will be
+!    used when approximate Jacobians are determined using finite
+!    differences.
+! There are two user callable sparsity structure subroutines:
+! USERSETS_IAJA may be used if you wish to supply the sparsity
+! structure directly.
+! SUBROUTINE USERSETS_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!     Caution:
+!     If it is called, USERSETS_IAJA must be called after the
+!     call to SET_OPTS.
+!     Usage:
+!     CALL SET_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!     Arguments:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+! The second subroutine allows you to approximate the sparsity
+! structure using derivative differences. It allows more flexibility
+! in the determination of perturbation increments used.
+! SUBROUTINE SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER, &
+!   NIAUSER, JAUSER, NJAUSER)
+!     Caution:
+!     If it is called, SET_IAJA must be called after the call to
+!     SET_OPTS.
+!     Usage:
+!     SET_IAJA may be called in one of two ways:
+
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB)
+!       In this case IA and JA will be determined using calls
+!       to your derivative routine DFN.
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+!       JAUSER, NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!       T, Y, FMIN, NTURB, and DTURB will be ignored (though
+!       they must be present in the argument list).
+!     Arguments:
+!     DFN     = DVODE derivative subroutine
+!     NEQ     = Number of odes
+!     T       = independent variable t
+!     Y       = solution y(t)
+!     FMIN    = Jacobian threshold value. Elements of the Jacobian
+!               with magnitude smaller than FMIN will be ignored.
+!               FMIN will be ignored if it is less than or equal
+!               to ZERO.
+!     NTURB   = Perturbation flag. If NTURB=1, component I of Y
+!               will be perturbed by 1.01D0.
+!               If NTURB=NEQ, component I of Y will be perturbed
+!               by ONE + DTURB(I).
+!     DTURB   = perturbation vector of length 1 or NEQ.
+!     If these four optional parameters are present, IAUSER and JAUSER
+!     will be copied to IA and JA rather than making derivative calls
+!     to approximate IA and JA:
+!        IAUSER  = user supplied IA array
+!        NIAUSER = length of IAUSER array
+!        JAUSER  = user supplied JA vector
+!        NJAUSER = length of JAUSER array
+! ______________________________________________________________________
+! Section 9.  Original DVODE.F Documentation Prologue
+!
+! SUBROUTINE DVODE(F, NEQ, Y, T, TOUT, ITASK, ISTATE, OPTS, JAC, GFUN)
+! DVODE: Variable-coefficient Ordinary Differential Equation solver,
+! with fixed-leading-coefficient implementation.
+! Note:
+! Numerous changes have been made in the documentation and the code
+! from the original Fortran 77 DVODE solver. With regard to the new
+! F90 version, if you choose options that correspond to options
+! available in the original f77 solver, you should obtain the same
+! results. In all testing, identical results have been obtained
+! between this version and a simple F90 translation of the original
+! solver.
+! DVODE solves the initial value problem for stiff or nonstiff
+! systems of first order ODEs,
+!     dy/dt = f(t,y), or, in component form,
+!     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+! DVODE is a package based on the EPISODE and EPISODEB packages, and
+! on the ODEPACK user interface standard, with minor modifications.
+! This version is based also on elements of LSODES and LSODAR.
+! Authors:
+!               Peter N. Brown and Alan C. Hindmarsh
+!               Center for Applied Scientific Computing, L-561
+!               Lawrence Livermore National Laboratory
+!               Livermore, CA 94551
+!               George D. Byrne
+!               Illinois Institute of Technology
+!               Chicago, IL 60616
+! References:
+! 1. P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, "VODE: A Variable
+!    Coefficient ODE Solver," SIAM J. Sci. Stat. Comput., 10 (1989),
+!    pp. 1038-1051. Also, LLNL Report UCRL-98412, June 1988.
+! 2. G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the
+!    Numerical Solution of Ordinary Differential Equations,"
+!    ACM Trans. Math. Software, 1 (1975), pp. 71-96.
+! 3. A. C. Hindmarsh and G. D. Byrne, "EPISODE: An Effective Package
+!    for the Integration of Systems of Ordinary Differential
+!    Equations," LLNL Report UCID/30112, Rev. 1, April 1977.
+! 4. G. D. Byrne and A. C. Hindmarsh, "EPISODEB: An Experimental
+!    Package for the Integration of Systems of Ordinary Differential
+!    Equations with Banded Jacobians," LLNL Report UCID/30132, April
+!    1976.
+! 5. A. C. Hindmarsh, "ODEPACK, a Systematized Collection of ODE
+!    Solvers," in Scientific Computing, R. S. Stepleman et al., eds.,
+!    North-Holland, Amsterdam, 1983, pp. 55-64.
+! 6. K. R. Jackson and R. Sacks-Davis, "An Alternative Implementation
+!    of Variable Step-Size Multistep Formulas for Stiff ODEs," ACM
+!    Trans. Math. Software, 6 (1980), pp. 295-318.
+!                     Summary of Usage
+! Communication between the user and the DVODE package, for normal
+! situations, is summarized here. This summary describes only a subset
+! of the full set of options available. See the full description for
+! details, including optional communication, nonstandard options,
+! and instructions for special situations. See also the example
+! problem (with program and output) following this summary.
+! A. First provide a subroutine of the form:
+!           SUBROUTINE F(NEQ, T, Y, YDOT)
+!           REAL(KIND=WP) T, Y(NEQ), YDOT(NEQ)
+! which supplies the vector function f by loading YDOT(i) with f(i).
+! B. Next determine (or guess) whether or not the problem is stiff.
+! Stiffness occurs when the Jacobian matrix df/dy has an eigenvalue
+! whose real part is negative and large in magnitude, compared to the
+! reciprocal of the t span of interest. If the problem is nonstiff,
+! use a method flag MF = 10. If it is stiff, there are four standard
+! choices for MF(21, 22, 24, 25), and DVODE requires the Jacobian
+! matrix in some form. In these cases (MF > 0), DVODE will use a
+! saved copy of the Jacobian matrix. If this is undesirable because of
+! storage limitations, set MF to the corresponding negative value
+! (-21, -22, -24, -25). (See full description of MF below.)
+! The Jacobian matrix is regarded either as full (MF = 21 or 22),
+! or banded (MF = 24 or 25). In the banded case, DVODE requires two
+! half-bandwidth parameters ML and MU. These are, respectively, the
+! widths of the lower and upper parts of the band, excluding the main
+! diagonal. Thus the band consists of the locations (i,j) with
+! i-ML <= j <= i+MU, and the full bandwidth is ML+MU+1.
+! C. If the problem is stiff, you are encouraged to supply the Jacobian
+! directly (MF = 21 or 24), but if this is not feasible, DVODE will
+! compute it internally by difference quotients (MF = 22 or 25).
+! If you are supplying the Jacobian, provide a subroutine of the form:
+!           SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!           REAL(KIND=WP) T, Y(NEQ), PD(NROWPD,NEQ)
+! which supplies df/dy by loading PD as follows:
+!     For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+! the partial derivative of f(i) with respect to y(j). (Ignore the
+! ML and MU arguments in this case.)
+!     For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with
+! df(i)/dy(j), i.e. load the diagonal lines of df/dy into the rows of
+! PD from the top down.
+!     In either case, only nonzero elements need be loaded.
+! D. Write a main program which calls subroutine DVODE once for
+! each point at which answers are desired. This should also provide
+! for possible use of logical unit 6 for output of error messages
+! by DVODE. On the first call to DVODE, supply arguments as follows:
+! F      = Name of subroutine for right-hand side vector f.
+!          This name must be declared external in calling program.
+! NEQ    = Number of first order ODEs.
+! Y      = Array of initial values, of length NEQ.
+! T      = The initial value of the independent variable.
+! TOUT   = First point where output is desired (/= T).
+! ITOL   = 1 or 2 according as ATOL(below) is a scalar or array.
+! RTOL   = Relative tolerance parameter (scalar).
+! ATOL   = Absolute tolerance parameter (scalar or array).
+!          The estimated local error in Y(i) will be controlled so as
+!          to be roughly less (in magnitude) than
+!             EWT(i) = RTOL*ABS(Y(i)) + ATOL     if ITOL = 1, or
+!             EWT(i) = RTOL*ABS(Y(i)) + ATOL(i)  if ITOL = 2.
+!          Thus the local error test passes if, in each component,
+!          either the absolute error is less than ATOL(or ATOL(i)),
+!          or the relative error is less than RTOL.
+!          Use RTOL = 0.0 for pure absolute error control, and
+!          use ATOL = 0.0 (or ATOL(i) = 0.0) for pure relative error
+!          control. Caution: Actual (global) errors may exceed these
+!          local tolerances, so choose them conservatively.
+! ITASK  = 1 for normal computation of output values of Y at t = TOUT.
+! ISTATE = Integer flag (input and output). Set ISTATE = 1.
+! IOPT   = 0 to indicate no optional input used.
+! JAC    = Name of subroutine for Jacobian matrix (MF = 21 or 24).
+!          If used, this name must be declared external in calling
+!          program. If not used, pass a dummy name.
+! MF     = Method flag. Standard values are:
+!          10 for nonstiff (Adams) method, no Jacobian used.
+!          21 for stiff (BDF) method, user-supplied full Jacobian.
+!          22 for stiff method, internally generated full Jacobian.
+!          24 for stiff method, user-supplied banded Jacobian.
+!          25 for stiff method, internally generated banded Jacobian.
+! E. The output from the first call (or any call) is:
+!      Y = Array of computed values of y(t) vector.
+!      T = Corresponding value of independent variable (normally TOUT).
+! ISTATE = 2  if DVODE was successful, negative otherwise.
+!          -1 means excess work done on this call. (Perhaps wrong MF.)
+!          -2 means excess accuracy requested. (Tolerances too small.)
+!          -3 means illegal input detected. (See printed message.)
+!          -4 means repeated error test failures. (Check all input.)
+!          -5 means repeated convergence failures. (Perhaps bad
+!             Jacobian supplied or wrong choice of MF or tolerances.)
+!          -6 means error weight became zero during problem. (Solution
+!             component I vanished, and ATOL or ATOL(I) = 0.)
+! F. To continue the integration after a successful return, simply
+! reset TOUT and call DVODE again. No other parameters need be reset.
+!         Full Description of User Interface to DVODE
+! The user interface to DVODE consists of the following parts.
+! i.  The call sequence to subroutine DVODE, which is a driver
+!      routine for the solver. This includes descriptions of both
+!      the call sequence arguments and of user-supplied routines.
+!      Following these descriptions is
+!        * a description of optional input available through the
+!          call sequence,
+!        * a description of optional output (in the work arrays), and
+!        * instructions for interrupting and restarting a solution.
+! ii. Descriptions of other routines in the DVODE package that may be
+!      (optionally) called by the user. These provide the ability to
+!      alter error message handling, save and restore the internal
+!      PRIVATE variables, and obtain specified derivatives of the
+!      solution y(t).
+! iii. Descriptions of PRIVATE variables to be declared in overlay
+!      or similar environments.
+! iv. Description of two routines in the DVODE package, either of
+!      which the user may replace with his own version, if desired.
+!      these relate to the measurement of errors.
+! Part i. Call Sequence.
+! The call sequence parameters used for input only are
+!     F, NEQ, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, JAC, MF,
+! and those used for both input and output are
+!     Y, T, ISTATE.
+! The work arrays RUSER and IUSER are used for conditional and
+! optional input and optional output. (The term output here refers
+! to the return from subroutine DVODE to the user's calling program.)
+! The legality of input parameters will be thoroughly checked on the
+! initial call for the problem, but not checked thereafter unless a
+! change in input parameters is flagged by ISTATE = 3 in the input.
+! The descriptions of the call arguments are as follows.
+! F      = The name of the user-supplied subroutine defining the
+!          ODE system. The system must be put in the first-order
+!          form dy/dt = f(t,y), where f is a vector-valued function
+!          of the scalar t and the vector y. Subroutine F is to
+!          compute the function f. It is to have the form
+!               SUBROUTINE F(NEQ, T, Y, YDOT)
+!               REAL(KIND=WP) T, Y(NEQ), YDOT(NEQ)
+!          where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+!          is output. Y and YDOT are arrays of length NEQ.
+!          Subroutine F should not alter Y(1),...,Y(NEQ).
+!          F must be declared EXTERNAL in the calling program.
+
+!          If quantities computed in the F routine are needed
+!          externally to DVODE, an extra call to F should be made
+!          for this purpose, for consistent and accurate results.
+!          If only the derivative dy/dt is needed, use DVINDY instead.
+! NEQ    = The size of the ODE system (number of first order
+!          ordinary differential equations). Used only for input.
+!          NEQ may not be increased during the problem, but
+!          can be decreased (with ISTATE = 3 in the input).
+! Y      = A real array for the vector of dependent variables, of
+!          length NEQ or more. Used for both input and output on the
+!          first call (ISTATE = 1), and only for output on other calls.
+!          On the first call, Y must contain the vector of initial
+!          values. In the output, Y contains the computed solution
+!          evaluated at T. If desired, the Y array may be used
+!          for other purposes between calls to the solver.
+!          This array is passed as the Y argument in all calls to
+!          F and JAC.
+! T      = The independent variable. In the input, T is used only on
+!          the first call, as the initial point of the integration.
+!          In the output, after each call, T is the value at which a
+!          computed solution Y is evaluated (usually the same as TOUT).
+!          On an error return, T is the farthest point reached.
+! TOUT   = The next value of t at which a computed solution is desired.
+!          Used only for input.
+!          When starting the problem (ISTATE = 1), TOUT may be equal
+!          to T for one call, then should /= T for the next call.
+!          For the initial T, an input value of TOUT /= T is used
+!          in order to determine the direction of the integration
+!          (i.e. the algebraic sign of the step sizes) and the rough
+!          scale of the problem. Integration in either direction
+!          (forward or backward in t) is permitted.
+!          If ITASK = 2 or 5 (one-step modes), TOUT is ignored after
+!          the first call (i.e. the first call with TOUT /= T).
+!          Otherwise, TOUT is required on every call.
+!          If ITASK = 1, 3, or 4, the values of TOUT need not be
+!          monotone, but a value of TOUT which backs up is limited
+!          to the current internal t interval, whose endpoints are
+!          TCUR - HU and TCUR. (See optional output, below, for
+!          TCUR and HU.)
+! ITOL   = An indicator for the type of error control. See
+!          description below under ATOL. Used only for input.
+! RTOL   = A relative error tolerance parameter, either a scalar or
+!          an array of length NEQ. See description below under ATOL.
+!          Input only.
+! ATOL   = An absolute error tolerance parameter, either a scalar or
+!          an array of length NEQ. Input only.
+!          The input parameters ITOL, RTOL, and ATOL determine
+!          the error control performed by the solver. The solver will
+!          control the vector e = (e(i)) of estimated local errors
+!          in Y, according to an inequality of the form
+!                      rms-norm of (E(i)/EWT(i)) <= 1,
+!          where       EWT(i) = RTOL(i)*ABS(Y(i)) + ATOL(i),
+!          and the rms-norm (root-mean-square norm) here is
+!          rms-norm(v) = sqrt(sum v(i)**2 / NEQ). Here EWT
+!          is a vector of weights which must always be positive, and
+!          the values of RTOL and ATOL should all be nonnegative.
+!          The following table gives the types (scalar/array) of
+!          RTOL and ATOL, and the corresponding form of EWT(i).
+!           ITOL    RTOL       ATOL          EWT(i)
+!            1     scalar     scalar     RTOL*ABS(Y(i)) + ATOL
+!            2     scalar     array      RTOL*ABS(Y(i)) + ATOL(i)
+!            3     array      scalar     RTOL(i)*ABS(Y(i)) + ATOL
+!            4     array      array      RTOL(i)*ABS(Y(i)) + ATOL(i)
+!          When either of these parameters is a scalar, it need not
+!          be dimensioned in the user's calling program.
+!          If none of the above choices (with ITOL, RTOL, and ATOL
+!          fixed throughout the problem) is suitable, more general
+!          error controls can be obtained by substituting
+!          user-supplied routines for the setting of EWT and/or for
+!          the norm calculation. See Part iv below.
+!          If global errors are to be estimated by making a repeated
+!          run on the same problem with smaller tolerances, then all
+!          components of RTOL and ATOL(i.e. of EWT) should be scaled
+!          down uniformly.
+! ITASK  = An index specifying the task to be performed.
+!          Input only. ITASK has the following values and meanings.
+!          1  means normal computation of output values of y(t) at
+!             t = TOUT(by overshooting and interpolating).
+!          2  means take one step only and return.
+!          3  means stop at the first internal mesh point at or
+!             beyond t = TOUT and return.
+!          4  means normal computation of output values of y(t) at
+!             t = TOUT but without overshooting t = TCRIT.
+!             TCRIT must be input as RUSER(1). TCRIT may be equal to
+!             or beyond TOUT, but not behind it in the direction of
+!             integration. This option is useful if the problem
+!             has a singularity at or beyond t = TCRIT.
+!          5  means take one step, without passing TCRIT, and return.
+!             TCRIT must be input as RUSER(1).
+!          Note:  If ITASK = 4 or 5 and the solver reaches TCRIT
+!          (within roundoff), it will return T = TCRIT(exactly) to
+!          indicate this (unless ITASK = 4 and TOUT comes before TCRIT,
+!          in which case answers at T = TOUT are returned first).
+! ISTATE = an index used for input and output to specify the
+!          the state of the calculation.
+!          In the input, the values of ISTATE are as follows.
+!          1  means this is the first call for the problem
+!             (initializations will be done). See note below.
+!          2  means this is not the first call, and the calculation
+!             is to continue normally, with no change in any input
+!             parameters except possibly TOUT and ITASK.
+!             (If ITOL, RTOL, and/or ATOL are changed between calls
+!             with ISTATE = 2, the new values will be used but not
+!             tested for legality.)
+!          3  means this is not the first call, and the
+!             calculation is to continue normally, but with
+!             a change in input parameters other than
+!             TOUT and ITASK. Changes are allowed in
+!             NEQ, ITOL, RTOL, ATOL, IOPT, MF, ML, MU,
+!             and any of the optional input except H0.
+!             (See IUSER description for ML and MU.)
+!          Caution:
+!          If you make a call to DVODE_F90 with ISTATE=3, you will
+!          first need to call SET_OPTS again, supplying the new
+!          necessary option values.
+!          Note:  A preliminary call with TOUT = T is not counted
+!          as a first call here, as no initialization or checking of
+!          input is done. (Such a call is sometimes useful to include
+!          the initial conditions in the output.)
+!          Thus the first call for which TOUT /= T requires
+!          ISTATE = 1 in the input.
+!          In the output, ISTATE has the following values and meanings.
+!           1  means nothing was done, as TOUT was equal to T with
+!              ISTATE = 1 in the input.
+!           2  means the integration was performed successfully.
+!          -1  means an excessive amount of work (more than MXSTEP
+!              steps) was done on this call, before completing the
+!              requested task, but the integration was otherwise
+!              successful as far as T. (MXSTEP is an optional input
+!              and is normally 5000.)  To continue, the user may
+!              simply reset ISTATE to a value > 1 and call again.
+!              (The excess work step counter will be reset to 0.)
+!              In addition, the user may increase MXSTEP to avoid
+!              this error return. (See optional input below.)
+!          -2  means too much accuracy was requested for the precision
+!              of the machine being used. This was detected before
+!              completing the requested task, but the integration
+!              was successful as far as T. To continue, the tolerance
+!              parameters must be reset, and ISTATE must be set
+!              to 3. The optional output TOLSF may be used for this
+!              purpose. (Note: If this condition is detected before
+!              taking any steps, then an illegal input return
+!              (ISTATE = -3) occurs instead.)
+!          -3  means illegal input was detected, before taking any
+!              integration steps. See written message for details.
+!              Note:  If the solver detects an infinite loop of calls
+!              to the solver with illegal input, it will cause
+!              the run to stop.
+!          -4  means there were repeated error test failures on
+!              one attempted step, before completing the requested
+!              task, but the integration was successful as far as T.
+!              The problem may have a singularity, or the input
+!              may be inappropriate.
+!          -5  means there were repeated convergence test failures on
+!              one attempted step, before completing the requested
+!              task, but the integration was successful as far as T.
+!              This may be caused by an inaccurate Jacobian matrix,
+!              if one is being used.
+!          -6  means EWT(i) became zero for some i during the
+!              integration. Pure relative error control (ATOL(i)=0.0)
+!              was requested on a variable which has now vanished.
+!              The integration was successful as far as T.
+!          Note:  Since the normal output value of ISTATE is 2,
+!          it does not need to be reset for normal continuation.
+!          Also, since a negative input value of ISTATE will be
+!          regarded as illegal, a negative output value requires the
+!          user to change it, and possibly other input, before
+!          calling the solver again.
+! IOPT   = An integer flag to specify whether or not any optional
+!          input is being used on this call. Input only.
+!          The optional input is listed separately below.
+!          IOPT = 0 means no optional input is being used.
+!                   Default values will be used in all cases.
+!          IOPT = 1 means optional input is being used.
+! RUSER  = A real working array (real(wp)).
+!          The length of RUSER must be at least 22
+!             20 + NYH * (MAXORD + 1) where
+!          NYH    = the initial value of NEQ,
+!          MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a
+!                   smaller value is given as an optional input),
+!          The first 22 words of RUSER are reserved for conditional
+!          and optional input and optional output.
+
+!          The following word in RUSER is a conditional input:
+!            RUSER(1) = TCRIT = critical value of t which the solver
+!                       is not to overshoot. Required if ITASK is
+!                       4 or 5, and ignored otherwise. (See ITASK.)
+! IUSER  = An integer work array. The length of IUSER must be at least 30.
+!             30        if MITER = 0 or 3 (MF = 10, 13, 20, 23), or
+!             30 + NEQ  otherwise (ABS(MF) = 11,12,14,15,16,17,21,22,
+!             24,25,26,27).
+!          The first 30 words of IUSER are reserved for conditional and
+!          optional input and optional output.
+
+!          The following 2 words in IUSER are conditional input:
+!            IUSER(1) = ML  These are the lower and upper
+!            IUSER(2) = MU  half-bandwidths, respectively, of the
+!                       banded Jacobian, excluding the main diagonal.
+!                       The band is defined by the matrix locations
+!                       (i,j) with i-ML <= j <= i+MU. ML and MU
+!                       must satisfy  0 <= ML,MU  <= NEQ-1.
+!                       These are required if MITER is 4 or 5, and
+!                       ignored otherwise. ML and MU may in fact be
+!                       the band parameters for a matrix to which
+!                       df/dy is only approximately equal.
+! Note:  The work arrays must not be altered between calls to DVODE
+! for the same problem, except possibly for the conditional and
+! optional input, and except for the last 3*NEQ words of RUSER.
+! The latter space is used for internal scratch space, and so is
+! available for use by the user outside DVODE between calls, if
+! desired (but not for use by F or JAC).
+! JAC    = The name of the user-supplied routine (MITER = 1 or 4 or 6)
+!          to compute the Jacobian matrix, df/dy, as a function of
+!          the scalar t and the vector y. It is to have the form
+!               SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!               REAL(KIND=WP) T, Y(NEQ), PD(NROWPD,NEQ)
+!          where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+!          PD is to be loaded with partial derivatives (elements of the
+!          Jacobian matrix) in the output. PD must be given a first
+!          dimension of NROWPD. T and Y have the same meaning as in
+!          Subroutine F.
+!               In the full matrix case (MITER = 1), ML and MU are
+!          ignored, and the Jacobian is to be loaded into PD in
+!          columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+!               In the band matrix case (MITER = 4), the elements
+!          within the band are to be loaded into PD in columnwise
+!          manner, with diagonal lines of df/dy loaded into the rows
+!          of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+!          ML and MU are the half-bandwidth parameters. (See IUSER).
+!          The locations in PD in the two triangular areas which
+!          correspond to nonexistent matrix elements can be ignored
+!          or loaded arbitrarily, as they are overwritten by DVODE.
+!               In the sparse matrix case the elements of the matrix
+!          are determined by the sparsity structure given by the
+!          IA and JA pointer arrays. Refer to the documentation
+!          prologue for SET_OPTS for a description of the arguments
+!          for JAC since they differ from the dense and banded cases.
+!               JAC need not provide df/dy exactly. A crude
+!          approximation (possibly with a smaller bandwidth) will do.
+!               In either case, PD is preset to zero by the solver,
+!          so that only the nonzero elements need be loaded by JAC.
+!          Each call to JAC is preceded by a call to F with the same
+!          arguments NEQ, T, and Y. Thus to gain some efficiency,
+!          intermediate quantities shared by both calculations may be
+!          saved in a user common block by F and not recomputed by JAC,
+!          if desired. Also, JAC may alter the Y array, if desired.
+!          JAC must be declared external in the calling program.
+! MF     = The method flag. Used only for input. The legal values of
+!          MF are 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24,
+!          25, 26, 27, -11, -12, -14, -15, -21, -22, -24, -25, -26,
+!          -27.
+!          MF is a signed two-digit integer, MF = JSV*(10*METH+MITER).
+!          JSV = SIGN(MF) indicates the Jacobian-saving strategy:
+!            JSV =  1 means a copy of the Jacobian is saved for reuse
+!                     in the corrector iteration algorithm.
+!            JSV = -1 means a copy of the Jacobian is not saved
+!                     (valid only for MITER = 1, 2, 4, or 5).
+!          METH indicates the basic linear multistep method:
+!            METH = 1 means the implicit Adams method.
+!            METH = 2 means the method based on backward
+!                     differentiation formulas (BDF-s).
+!          MITER indicates the corrector iteration method:
+!            MITER = 0 means functional iteration (no Jacobian matrix
+!                      is involved).
+!            MITER = 1 means chord iteration with a user-supplied
+!                      full (NEQ by NEQ) Jacobian.
+!            MITER = 2 means chord iteration with an internally
+!                      generated (difference quotient) full Jacobian
+!                      (using NEQ extra calls to F per df/dy value).
+!            MITER = 3 means chord iteration with an internally
+!                      generated diagonal Jacobian approximation
+!                      (using 1 extra call to F per df/dy evaluation).
+!            MITER = 4 means chord iteration with a user-supplied
+!                      banded Jacobian.
+!            MITER = 5 means chord iteration with an internally
+!                      generated banded Jacobian (using ML+MU+1 extra
+!                      calls to F per df/dy evaluation).
+!            MITER = 6 means chord iteration with a user-supplied
+!                      sparse Jacobian.
+!            MITER = 7 means chord iteration with an internally
+!                      generated sparse Jacobian
+!          If MITER = 1, 4, or 6 the user must supply a subroutine
+!          JAC(the name is arbitrary) as described above under JAC.
+!          For other values of MITER, a dummy argument can be used.
+!                         Optional Input
+! The following is a list of the optional input provided for in the
+! call sequence. (See also Part ii.)  For each such input variable,
+! this table lists its name as used in this documentation, its
+! location in the call sequence, its meaning, and the default value.
+! The use of any of this input requires IOPT = 1, and in that
+! case all of this input is examined. A value of zero for any of
+! these optional input variables will cause the default value to be
+! used. Thus to use a subset of the optional input, simply preload
+! locations 5 to 10 in RUSER and IUSER to 0.0 and 0, respectively,
+! and then set those of interest to nonzero values.
+! NAME    LOCATION      MEANING AND DEFAULT VALUE
+! H0      RUSER(5)  The step size to be attempted on the first step.
+!                   The default value is determined by the solver.
+! HMAX    RUSER(6)  The maximum absolute step size allowed.
+!                   The default value is infinite.
+! HMIN    RUSER(7)  The minimum absolute step size allowed.
+!                   The default value is 0. (This lower bound is not
+!                   enforced on the final step before reaching TCRIT
+!                   when ITASK = 4 or 5.)
+! MAXORD  IUSER(5)  The maximum order to be allowed. The default
+!                   value is 12 if METH = 1, and 5 if METH = 2.
+!                   If MAXORD exceeds the default value, it will
+!                   be reduced to the default value.
+!                   If MAXORD is changed during the problem, it may
+!                   cause the current order to be reduced.
+! MXSTEP  IUSER(6)  Maximum number of (internally defined) steps
+!                   allowed during one call to the solver.
+!                   The default value is 5000.
+! MXHNIL  IUSER(7)  Maximum number of messages printed (per problem)
+!                   warning that T + H = T on a step (H = step size).
+!                   This must be positive to result in a non-default
+!                   value. The default value is 10.
+!                          Optional Output
+! As optional additional output from DVODE, the variables listed
+! below are quantities related to the performance of DVODE
+! which are available to the user. These are communicated by way of
+! the work arrays, but also have internal mnemonic names as shown.
+! Except where stated otherwise, all of this output is defined
+! on any successful return from DVODE, and on any return with
+! ISTATE = -1, -2, -4, -5, or -6. On an illegal input return
+! (ISTATE = -3), they will be unchanged from their existing values
+! (if any), except possibly for TOLSF, LENRW, and LENIW.
+! On any error return, output relevant to the error will be defined,
+! as noted below.
+! NAME    LOCATION      MEANING
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (e(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! The following two arrays are segments of the RUSER array which
+! may also be of interest to the user as optional output.
+! For each array, the table below gives its internal name,
+! its base address in RUSER, and its description.
+!                  Interrupting and Restarting
+! If the integration of a given problem by DVODE is to be interrupted
+! and then later continued, such as when restarting an interrupted run
+! or alternating between two or more ODE problems, the user should save,
+! following the return from the last DVODE call prior to the
+! interruption, the contents of the call sequence variables and
+! internal PRIVATE variables, and later restore these values before the
+! next DVODE call for that problem. To save and restore the PRIVATE
+! variables, use subroutine DVSRCO, as described below in part ii.
+! In addition, if non-default values for either LUN or MFLAG are
+! desired, an extra call to XSETUN and/or XSETF should be made just
+! before continuing the integration. See Part ii below for details.
+! Part ii. Other Routines Callable.
+! The following are optional calls which the user may make to
+! gain additional capabilities in conjunction with DVODE.
+! (The routines XSETUN and XSETF are designed to conform to the
+! SLATEC error handling package.)
+!     FORM OF CALL                  FUNCTION
+!  CALL XSETUN(LUN)           Set the logical unit number, LUN, for
+!                             output of messages from DVODE, if
+!                             the default is not desired.
+!                             The default value of LUN is 6.
+!  CALL XSETF(MFLAG)          Set a flag to control the printing of
+!                             messages by DVODE.
+!                             MFLAG = 0 means do not print. (Danger:
+!                             This risks losing valuable information.)
+!                             Either of the above calls may be made at
+!                             any time and will take effect immediately.
+!  CALL DVINDY(...)           Provide derivatives of y, of various
+!                             orders, at a specified point T, if
+!                             desired. It may be called only after
+!                             a successful return from DVODE.
+! The detailed instructions for using DVINDY are as follows.
+! The form of the call is:
+!      CALL DVINDY(T,K,DKY,IFLAG)
+! The input parameters are:
+! T         = Value of independent variable where answers are desired
+!             (normally the same as the T last returned by DVODE).
+!             For valid results, T must lie between TCUR - HU and TCUR.
+!             (See optional output for TCUR and HU.)
+! K         = Integer order of the derivative desired. K must satisfy
+!             0 <= K <= NQCUR, where NQCUR is the current order
+!             (see optional output). The capability corresponding
+!             to K = 0, i.e. computing y(T), is already provided
+!             by DVODE directly. Since NQCUR >= 1, the first
+!             derivative dy/dt is always available with DVINDY.
+! The output parameters are:
+! DKY       = A real array of length NEQ containing the computed value
+!             of the K-th derivative of y(t).
+! IFLAG     = Integer flag, returned as 0 if K and T were legal,
+!             -1 if K was illegal, and -2 if T was illegal.
+!             On an error return, a message is also written.
+! Part iii. Optionally Replaceable Solver Routines.
+! Below are descriptions of two routines in the DVODE package which
+! relate to the measurement of errors. Either routine can be
+! replaced by a user-supplied version, if desired. However, since such
+! a replacement may have a major impact on performance, it should be
+! done only when absolutely necessary, and only with great caution.
+! (Note: The means by which the package version of a routine is
+! superseded by the user's version may be system-dependent.)
+! (a) DEWSET.
+! The following subroutine is called just before each internal
+! integration step, and sets the array of error weights, EWT, as
+! described under ITOL/RTOL/ATOL above:
+!     SUBROUTINE DEWSET(NEQ, ITOL, RTOL, ATOL, YCUR, EWT)
+! where NEQ, ITOL, RTOL, and ATOL are as in the DVODE call sequence,
+! YCUR contains the current dependent variable vector, and
+! EWT is the array of weights set by DEWSET.
+! If the user supplies this subroutine, it must return in EWT(i)
+! (i = 1,...,NEQ) a positive quantity suitable for comparison with
+! errors in Y(i). The EWT array returned by DEWSET is passed to the
+! DVNORM function (See below.), and also used by DVODE in the
+! computation of the optional output IMXER, the diagonal Jacobian
+! approximation, and the increments for difference quotient Jacobians.
+! In the user-supplied version of DEWSET, it may be desirable to use
+! the current values of derivatives of y. Derivatives up to order NQ
+! are available from the history array YH, described above under
+! Optional Output. In DEWSET, YH is identical to the YCUR array,
+! extended to NQ + 1 columns with a column length of NYH and scale
+! factors of h**j/factorial(j). On the first call for the problem,
+! given by NST = 0, NQ is 1 and H is temporarily set to 1.0.
+! NYH is the initial value of NEQ. Thus, for example, the current
+! value of dy/dt can be obtained as YCUR(NYH+i)/H  (i=1,...,NEQ)
+! (and the division by H is unnecessary when NST = 0).
+! (b) DVNORM.
+! The following is a function which computes the weighted
+! root-mean-square norm of a vector v:
+!     D = DVNORM(N, V, W)
+! where:
+!   N = the length of the vector,
+!   V = real array of length N containing the vector,
+!   W = real array of length N containing weights,
+!   D = sqrt((1/N) * sum(V(i)*W(i))**2).
+! DVNORM is called with N = NEQ and with W(i) = 1.0/EWT(i), where
+! EWT is as set by subroutine DEWSET.
+! If the user supplies this routine, it should return a nonnegative
+! value of DVNORM suitable for use in the error control in DVODE.
+! None of the arguments should be altered by DVNORM.
+! For example, a user-supplied DVNORM function might:
+!   -substitute a max-norm of (V(i)*W(i)) for the rms-norm, or
+!   -ignore some components of V in the norm, with the effect of
+!    suppressing the error control on those components of Y.
+!_______________________________________________________________________
+! Other Routines in the DVODE Package
+
+! In addition to subroutine DVODE, the DVODE package includes the
+! following subroutines and function routines (not user callable):
+!  DVHIN       computes an approximate step size for the initial step.
+!  DVINDY_CORE computes an interpolated value of the y vector at t=TOUT.
+!  DVINDY      computes an interpolated value of the y vector at t=TOUT.
+!              (user callable)
+!  DVSTEP      is the core integrator, which does one step of the
+!              integration and the associated error control.
+!  DVSET       sets all method coefficients and test constants.
+!  DVNLSD,     solves the underlying nonlinear system -- the corrector.
+!  DVNLSS28
+!  DVJAC,      computes and preprocesses the Jacobian matrix J = df/dy
+!  DVJACS28    and the Newton iteration matrix P = I - (h/l1)*J.
+!  DVSOL,      manages solution of linear system in chord iteration.
+!  DVSOLS28
+!  DVJUST      adjusts the history array on a change of order.
+!  DEWSET      sets the error weight vector EWT before each step.
+!  DVNORM      computes the weighted r.m.s. norm of a vector.
+!  DACOPY      is a routine to copy a two-dimensional array to another.
+!  DGEFA_F90 and DGESL_F90 are routines from LINPACK for solving full
+!              systems of linear algebraic equations.
+!  DGBFA_F90 and DGBSL_F90 are routines from LINPACK for solving banded
+!              linear systems.
+!  DAXPY_F90, DSCAL_F90, and DCOPY_F90 are basic linear algebra modules
+!              (BLAS).
+!  DVCHECK     does preliminary checking for roots, and serves as an
+!              interface between subroutine DVODE_F90 and subroutine
+!              DVROOTS.
+!  DVROOTS     finds the leftmost root of a set of functions.
+! ______________________________________________________________________
+! Section 10.  Example Usage
+!
+! MODULE example1
+! The following is a simple example problem, with the coding
+! needed for its solution by DVODE_F90. The problem is from
+! chemical kinetics, and consists of the following three rate
+! equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! The following coding solves this problem with DVODE_F90,
+! using a user supplied Jacobian and printing results at
+! t = .4, 4.,...,4.d10. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values. At
+! the end of the run, statistical quantities of interest are
+! printed. (See optional output in the full DVODE description
+! below.) Output is written to the file example1.dat.
+! CONTAINS
+!     SUBROUTINE FEX(NEQ, T, Y, YDOT)
+!     IMPLICIT NONE
+!     INTEGER NEQ
+!     DOUBLE PRECISION T, Y, YDOT
+!     DIMENSION Y(NEQ), YDOT(NEQ)
+!     YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
+!     YDOT(3) = 3.E7*Y(2)*Y(2)
+!     YDOT(2) = -YDOT(1) - YDOT(3)
+!     RETURN
+!     END SUBROUTINE FEX
+!     SUBROUTINE JEX(NEQ, T, Y, ML, MU, PD, NRPD)
+!     IMPLICIT NONE
+!     INTEGER NEQ,ML,MU,NRPD
+!     DOUBLE PRECISION PD, T, Y
+!     DIMENSION Y(NEQ), PD(NRPD,NEQ)
+!     PD(1,1) = -.04D0
+!     PD(1,2) = 1.D4*Y(3)
+!     PD(1,3) = 1.D4*Y(2)
+!     PD(2,1) = .04D0
+!     PD(2,3) = -PD(1,3)
+!     PD(3,2) = 6.E7*Y(2)
+!     PD(2,2) = -PD(1,2) - PD(3,2)
+!     RETURN
+!     END SUBROUTINE JEX
+! END MODULE example1
+!******************************************************************
+
+!     PROGRAM runexample1
+!     USE DVODE_F90_M
+!     USE example1
+!     IMPLICIT NONE
+!     DOUBLE PRECISION ATOL, RTOL, T, TOUT, Y, RSTATS
+!     INTEGER NEQ, ITASK, ISTATE, ISTATS, IOUT, IERROR, I
+!     DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     OPEN(UNIT=6, FILE = 'example1.dat')
+!     IERROR = 0
+!     NEQ = 3
+!     Y(1) = 1.0D0
+!     Y(2) = 0.0D0
+!     Y(3) = 0.0D0
+!     T = 0.0D0
+!     TOUT = 0.4D0
+!     RTOL = 1.D-4
+!     ATOL(1) = 1.D-8
+!     ATOL(2) = 1.D-14
+!     ATOL(3) = 1.D-6
+!     ITASK = 1
+!     ISTATE = 1
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR_VECTOR=ATOL, &
+!       RELERR=RTOL, USER_SUPPLIED_JACOBIAN=.TRUE.)
+!     DO IOUT = 1,12
+!       CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+!       CALL GET_STATS(RSTATS,ISTATS)
+!       WRITE(6,63)T,Y(1),Y(2),Y(3)
+!       DO I = 1, NEQ
+!          IF (Y(I) < 0.0D0) IERROR = 1
+!       END DO
+!       IF (ISTATE < 0) THEN
+!          WRITE(6,64)ISTATE
+!          STOP
+!       END IF
+!       TOUT = TOUT*10.0D0
+!     END DO
+!     WRITE(6,60) ISTATS(11),ISTATS(12),ISTATS(13),ISTATS(19), &
+!                 ISTATS(20),ISTATS(21),ISTATS(22)
+!     IF (IERROR == 1) THEN
+!        WRITE(6,61)
+!     ELSE
+!        WRITE(6,62)
+!     END IF
+! 60  FORMAT(/'  No. steps =',I4,'   No. f-s =',I4,        &
+!             '  No. J-s =',I4,'   No. LU-s =',I4/         &
+!             '  No. nonlinear iterations =',I4/           &
+!             '  No. nonlinear convergence failures =',I4/ &
+!             '  No. error test failures =',I4/)
+! 61  FORMAT(/' An error occurred.')
+! 62  FORMAT(/' No errors occurred.')
+! 63  FORMAT(' At t =',D12.4,'   y =',3D14.6)
+! 64  FORMAT(///' Error halt: ISTATE =',I3)
+!     STOP
+!     END PROGRAM runexample1
+!
+! MODULE example2
+! The following is a modification of the previous example
+! program to illustrate root finding. The problem is from
+! chemical kinetics, and consists of the following three
+! rate equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! In addition, we want to find the values of t, y1, y2,
+! and y3 at which:
+!   (1) y1 reaches the value 1.d-4, and
+!   (2) y3 reaches the value 1.d-2.
+! The following coding solves this problem with DVODE_F90
+! using an internally generated dense Jacobian and
+! printing results at t = .4, 4., ..., 4.d10, and at the
+! computed roots. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values.
+! At the end of the run, statistical quantities of interest
+! are printed (see optional outputs in the full description
+! below). Output is written to the file example2.dat.
+! CONTAINS
+!     SUBROUTINE FEX (NEQ, T, Y, YDOT)
+!     IMPLICIT NONE
+!     INTEGER NEQ
+!     DOUBLE PRECISION T, Y, YDOT
+!     DIMENSION Y(3), YDOT(3)
+!     YDOT(1) = -0.04D0*Y(1) + 1.0D4*Y(2)*Y(3)
+!     YDOT(3) = 3.0D7*Y(2)*Y(2)
+!     YDOT(2) = -YDOT(1) - YDOT(3)
+!     RETURN
+!     END SUBROUTINE FEX
+!     SUBROUTINE GEX (NEQ, T, Y, NG, GOUT)
+!     IMPLICIT NONE
+!     INTEGER NEQ, NG
+!     DOUBLE PRECISION T, Y, GOUT
+!     DIMENSION Y(3), GOUT(2)
+!     GOUT(1) = Y(1) - 1.0D-4
+!     GOUT(2) = Y(3) - 1.0D-2
+!     RETURN
+!     END SUBROUTINE GEX
+! END MODULE example2
+!******************************************************************
+!     PROGRAM runexample2
+!     USE DVODE_F90_M
+!     USE example2
+!     IMPLICIT NONE
+!     INTEGER ITASK, ISTATE, NG, NEQ, IOUT, JROOT, ISTATS, &
+!     IERROR, I
+!     DOUBLE PRECISION ATOL, RTOL, RSTATS, T, TOUT, Y
+!     DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31), JROOT(2)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     OPEN (UNIT=6, FILE='example2.dat')
+!     IERROR = 0
+!     NEQ = 3
+!     Y(1) = 1.0D0
+!     Y(2) = 0.0D0
+!     Y(3) = 0.0D0
+!     T = 0.0D0
+!     TOUT = 0.4D0
+!     RTOL = 1.0D-4
+!     ATOL(1) = 1.0D-8
+!     ATOL(2) = 1.0D-12
+!     ATOL(3) = 1.0D-8
+!     ITASK = 1
+!     ISTATE = 1
+!     NG = 2
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL, &
+!       ABSERR_VECTOR=ATOL,NEVENTS=NG)
+!     DO 40 IOUT = 1,12
+! 10    CONTINUE
+!       CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!       CALL GET_STATS(RSTATS, ISTATS, NG, JROOT)
+!       WRITE(6,20) T, Y(1), Y(2), Y(3)
+!       DO I = 1, NEQ
+!          IF (Y(I) < 0.0D0) IERROR = 1
+!       END DO
+! 20    FORMAT(' At t =',D12.4,'   Y =',3D14.6)
+!       IF (ISTATE < 0) GOTO 60
+!       IF (ISTATE == 2) GOTO 40
+!       WRITE(6,30) JROOT(1),JROOT(2)
+! 30    FORMAT(5X,' The above line is a root, JROOT =',2I5)
+!       ISTATE = 2
+!       GOTO 10
+! 40  TOUT = TOUT*10.0D0
+!     WRITE(6,50) ISTATS(11), ISTATS(12), ISTATS(13), ISTATS(10)
+!     IF (IERROR == 1) THEN
+!        WRITE(6,61)
+!     ELSE
+!        WRITE(6,62)
+!     END IF
+! 50  FORMAT(/' No. steps =',I4,'  No. f-s =',I4,'  No. J-s =',I4, &
+!     '  No. g-s =',I4/)
+!     STOP
+! 60  WRITE(6,70) ISTATE
+! 61  FORMAT(/' An error occurred.')
+! 62  FORMAT(/' No errors occurred.')
+! 70  FORMAT(///' Error halt.. ISTATE =',I3)
+!     STOP
+!     END PROGRAM runexample2
+!_______________________________________________________________________
+! BEGINNING OF DVODE_F90_M PRIVATE SECTION.
+! Note: This global information is used throughout DVODE_F90.
+!_______________________________________________________________________
+! JACSPDB arrays and parameters.
+  LOGICAL, PRIVATE :: USE_JACSP, LIKE_ORIGINAL_VODE
+  INTEGER, PRIVATE :: INFODS, LIWADS, MAXGRPDS, MINGRPDS, NRFJACDS,    &
+    NCFJACDS, LWKDS, LIWKDS
+  INTEGER, ALLOCATABLE, PRIVATE :: INDROWDS(:), INDCOLDS(:),           &
+    NGRPDS(:), IPNTRDS(:), JPNTRDS(:), IWADS(:), IWKDS(:), IOPTDS(:)
+  REAL (WP), ALLOCATABLE, PRIVATE :: YSCALEDS(:), WKDS(:), FACDS(:)
+  REAL (WP), PRIVATE :: U125, U325
+!_______________________________________________________________________
+  LOGICAL, PARAMETER, PRIVATE :: USE_MA48_FOR_SPARSE=.FALSE.
+!_______________________________________________________________________
+! *****MA48 build change point. Replace the above statement.
+! LOGICAL, PARAMETER, PRIVATE :: USE_MA48_FOR_SPARSE=.TRUE.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+! MA48 type declarations:
+! TYPE(ZD01_TYPE) MATRIX
+! TYPE(MA48_CONTROL) CONTROL
+! TYPE(MA48_FACTORS) FACTORS
+! TYPE(MA48_AINFO) AINFO
+! TYPE(MA48_FINFO) FINFO
+! TYPE(MA48_SINFO) SINFO
+!_______________________________________________________________________
+! .. Parameters ..
+!     IPCUTH_MAX - maximum number of times the solver will halve the
+!                  stepsize to prevent an infeasible prediction if
+!                  solution bounds are used
+!     KFC        - maximum number of consecutive convergence failures
+!                  before crashing the order
+!     KFH        - maximum number of consecutive error test failures
+!                  before giving up (changed from 7 to 15)
+!     MAXCOR     - maximum number of corrections
+!     MSBP       - maximum number of steps before forming new P matrix
+!     MXNCF      - maximum number of consecutive convergence failures
+!                  before giving up
+!     MXHNLO     - maximum number of T+H=T messages
+!     MXSTP0     - maximum number of integration steps
+!     L*****     - lengths and pointers for some internal arrays
+!     INTEGER, PARAMETER, PRIVATE :: KFC = -3, KFH = -7, LENIV1 = 33,    &
+      INTEGER, PARAMETER, PRIVATE :: IPCUTH_MAX = 100, KFC = -3,         &
+        KFH = -15, LENIV1 = 33,                                          &
+        LENIV2 = 8, LENRV1 = 48, LENRV2 = 1, LIWUSER = 30, LRWUSER = 22, &
+        MAXCOR = 3, MAX_ARRAY_SIZE = 900000000, MSBP = 20, MXHNL0 = 10,  &
+        MXNCF = 10, MXSTP0 = 5000
+!_______________________________________________________________________
+! *****LAPACK build change point. Use .TRUE. for LAPACK.
+!     LOGICAL, PARAMETER, PRIVATE :: USE_LAPACK = .TRUE.
+!_______________________________________________________________________
+      REAL (WP), PARAMETER, PRIVATE :: ADDON = 1.0E-6_WP
+      REAL (WP), PARAMETER, PRIVATE :: BIAS1 = 6.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: BIAS2 = 6.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: BIAS3 = 10.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: CCMAX = 0.3_WP
+      REAL (WP), PARAMETER, PRIVATE :: CORTES = 0.1_WP
+      REAL (WP), PARAMETER, PRIVATE :: CRDOWN = 0.3_WP
+      REAL (WP), PARAMETER, PRIVATE :: ETACF = 0.25_WP
+      REAL (WP), PARAMETER, PRIVATE :: ETAMIN = 0.1_WP
+      REAL (WP), PARAMETER, PRIVATE :: ETAMX1 = 1.0E4_WP
+      REAL (WP), PARAMETER, PRIVATE :: ETAMX2 = 10.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: ETAMX3 = 10.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: ETAMXF = 0.2_WP
+      REAL (WP), PARAMETER, PRIVATE :: FIVE = 5.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: FOUR = 4.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: HALF = 0.5_WP
+      REAL (WP), PARAMETER, PRIVATE :: HUN = 100.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: HUNDRETH = 0.01_WP
+      REAL (WP), PARAMETER, PRIVATE :: ONE = 1.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: ONEPSM = 1.00001_WP
+      REAL (WP), PARAMETER, PRIVATE :: PT1 = 0.1_WP
+      REAL (WP), PARAMETER, PRIVATE :: PT2 = 0.2_WP
+      REAL (WP), PARAMETER, PRIVATE :: RDIV = 2.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: SIX = 6.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: TEN = 10.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: TENTH = 0.1_WP
+      REAL (WP), PARAMETER, PRIVATE :: THOU = 1000.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: THRESH = 1.5_WP
+      REAL (WP), PARAMETER, PRIVATE :: TWO = 2.0_WP
+      REAL (WP), PARAMETER, PRIVATE :: ZERO = 0.0_WP
+
+! Beginning of DVODE_F90 interface.
+! ..
+! .. Generic Interface Blocks ..
+      INTERFACE DVODE_F90
+
+!         VODE_F90 is the interface subroutine that is actually invoked
+!         when the user calls DVODE_F90. It in turn calls subroutine
+!         DVODE which is the driver that directs all the work.
+          MODULE PROCEDURE VODE_F90
+
+!         GET_STATS can be called to gather integration statistics.
+          MODULE PROCEDURE GET_STATS
+
+!         DVINDY can be called to interpolate the solution and derivative.
+          MODULE PROCEDURE DVINDY
+
+!         RELEASE_ARRAYS can be called to release/deallocate the work arrays.
+          MODULE PROCEDURE RELEASE_ARRAYS
+
+!         SET_IAJA can be called to set sparse matrix descriptor arrays.
+          MODULE PROCEDURE SET_IAJA
+
+!         USERSETS_IAJA can be called to set sparse matrix descriptor arrays.
+          MODULE PROCEDURE USERSETS_IAJA
+
+!         CHECK_STAT can be called to stop if a storage allocation or
+!         deallocation error occurs.
+          MODULE PROCEDURE CHECK_STAT
+
+!         JACSP can be called to calculate a Jacobian using Doug Salane's
+!         algoritm 
+          MODULE PROCEDURE JACSP
+
+!         DVDSM can be called to calculate sparse pointer arrays needed
+!         by JACSP
+          MODULE PROCEDURE DVDSM
+
+      END INTERFACE
+! ..
+! .. Derived Type Declarations ..
+      TYPE, PUBLIC :: VODE_OPTS
+        REAL (WP), DIMENSION (:), POINTER :: ATOL, RTOL
+        INTEGER :: MF, METH, MITER, MOSS, ITOL, IOPT, NG
+        LOGICAL :: DENSE, BANDED, SPARSE
+      END TYPE VODE_OPTS
+! ..
+! .. Local Scalars ..
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!     For communication with subroutine ma48_control_array:
+!     REAL (WP), PUBLIC :: COPY_OF_U_PIVOT
+!_______________________________________________________________________
+      REAL (WP), PRIVATE :: ACNRM, ALPHA, BIG, BIG1, CCMXJ, CGCE, CONP, CRATE,  &
+        DRC, DRES, DXMAX, EPS, ERRMAX, ETA, ETAMAX, FRACINT, FRACSUB, H, HMIN,  &
+        HMXI, HNEW, HSCAL, HU, MEPS, MRESID, MRMIN, PRL1, RC, RESID, RL1,       &
+        RMIN, SETH, T0ST, THEMAX, TLAST, TN, TOL, TOL1, TOUTC, UMAX, UROUND,    &
+        U_PIVOT, X2, WM1, WM2
+      INTEGER, PRIVATE :: ADDTOJA, ADDTONNZ, CONSECUTIVE_CFAILS,                &
+        CONSECUTIVE_EFAILS, ELBOW_ROOM, IADIM, IANPIV, IAVPIV,                  &
+        ICF, ICNCP, IFAIL, IMAX, IMIN, INEWJ, INIT, IPUP, IRANK, IRFND, IRNCP,  &
+        ISTART, ISTATC, ITASKC, JADIM, JCUR, JMIN, JSTART, JSV, KFLAG, KOUNTL,  &
+        KUTH, L, LARGE, LAST, LENIGP, LICN_ALL, LIRN_ALL, LIW, LIWM, LMAX,      &
+        LOCJS, LP, LRW, LWM, LWMDIM, LWMTEMP, LYH, LYHTEMP, MANPIV, MAPIV, MAXG,&
+        MAXIT, MAXORD, MB28, MB48, METH, MICN, MICNCP, MINICN, MINIRN, MIRANK,  &
+        MIRN, MIRNCP, MITER, MLP, MOSS, MP, MSBG, MSBJ, MXHNIL, MXSTEP, N, NZB, &
+        NCFN, NDROP, NDROP1, NDX, NETF, NEWH, NEWQ, NFE, NGC, NGE, NGP, NHNIL,  &
+        NJE, NLP, NLU, NNI, NNZ, NOITER, NQ, NQNYH, NQU, NQWAIT, NSLG, NSLJ,    &
+        NSLP, NSRCH, NSRCH1, NST, NSUBS, NSUPS, NUM, NUMNZ, NYH, NZ_ALL,        &
+        NZ_SWAG, PREVIOUS_MAXORD, WPD, WPS, MA28AD_CALLS, MA28BD_CALLS,         &
+        MA28CD_CALLS, MC19AD_CALLS, MAX_MINIRN, MAX_MINICN, MAX_NNZ, BNGRP
+!       MA48AD_CALLS, MA48BD_CALLS, MA48CD_CALLS
+! *****MA48 build change point. Insert the above line.
+      LOGICAL, PRIVATE :: ABORT, ABORT1, ABORT2, ABORT3, ABORTA, ABORTB,        &
+        ALLOW_DEFAULT_TOLS, BUILD_IAJA, BOUNDS, CHANGED_ACOR, GROW, IAJA_CALLED,&
+        J_HAS_BEEN_COMPUTED, J_IS_CONSTANT, LBIG, LBIG1, LBLOCK, MA48_WAS_USED, &
+        OK_TO_CALL_MA28, SUBS, SUPS, OPTS_CALLED, REDO_PIVOT_SEQUENCE,          &
+        SCALE_MATRIX, SPARSE, USE_FAST_FACTOR, YMAXWARN  
+! ..
+! .. Local Arrays ..
+      REAL (WP), ALLOCATABLE, PRIVATE :: ACOR(:), CSCALEX(:), EWT(:),           &
+        FPTEMP(:), FTEMP(:), FTEMP1(:), G0(:), G1(:), GX(:), JMAT(:),           &
+        LB(:), PMAT(:), RSCALEX(:), RWORK(:), SAVF(:), UB(:), WM(:),            &
+        WMTEMP(:), WSCALEX(:,:), YHNQP2(:), YHTEMP(:), YMAX(:), YNNEG(:),       &
+        YTEMP(:), DTEMP(:)
+      REAL (WP), PRIVATE :: EL(13), RUSER(22), TAU(13), TQ(5)
+      INTEGER, ALLOCATABLE, PRIVATE :: BIGP(:), BJGP(:), IA(:), IAB(:), IAN(:), &
+        ICN(:), IDX(:), IGP(:), IKEEP28(:,:), IW28(:,:), IWORK(:), JA(:),       &
+        JAB(:), JAN(:), JATEMP(:), JGP(:), JROOT(:), JVECT(:), SUBDS(:), SUPDS(:)
+      INTEGER, PRIVATE :: IDISP(2), IUSER(30), LNPIV(10), LPIV(10)
+      INTEGER, PRIVATE :: MORD(2) = (/ 12, 5 /)
+! ..
+! .. Public Subroutines and Functions ..
+  PUBLIC ::                                                        &
+  DAXPY_F90, DCOPY_F90, DDOT_F90, DGBFA_F90, DGBSL_F90, DGEFA_F90, &
+  DGESL_F90, DSCAL_F90, IDAMAX_F90
+! ..
+! .. Private Subroutines and Functions ..
+  PRIVATE ::                                                       &
+  CHECK_DIAG    , DACOPY        , DEWSET        , DGROUP        ,  &
+  DGROUPDS      , DVCHECK       , DVHIN         , DVINDY_BNDS   ,  &
+  DVINDY_CORE   , DVJAC         , DVJACS28      , DVJUST        ,  &
+  DVNLSD        , DVNLSS28      , DVNORM        , DVNRDN        ,  &
+  DVNRDP        , DVNRDS        , DVODE         , DVPREPS       ,  &
+  DVROOTS       , DVSET         , DVSOL         , DVSOLS28      ,  &
+  DVSRCO        , DVSTEP        , GDUMMY        , IUMACH        ,  &
+  IXSAV         , JACSPDB       , JDUMMY        , MA28AD        ,  &
+  MA28BD        , MA28CD        , MA28DD        , MA28ID        ,  &
+  MA30AD        , MA30BD        , MA30CD        , MA30DD        ,  &
+  MC13E         , MC19AD        , MC20AD        , MC20BD        ,  &
+  MC21A         , MC21B         , MC22AD        , MC23AD        ,  &
+  MC24AD        , SET_ICN       , XERRDV        , XSETF         ,  &
+  XSETUN        , DEGR          , IDO           , NUMSRT        ,  &
+  SEQ           , SETR          , SLO           , SRTDAT        ,  &
+  FDJS
+! DVJACS48      , DVNLSS48      , DVPREPS48     , DVSOLS48
+!_______________________________________________________________________
+! *****MA48 build change point. Insert the above line.
+!_______________________________________________________________________
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC KIND
+! ..
+! .. Data Statements ..
+      DATA OPTS_CALLED/ .FALSE./
+      DATA MP/6/, NLP/6/, MLP/6/, NSRCH/32768/, ISTART/0/, MAXIT/16/, &
+        LBIG/ .FALSE./, LBLOCK/ .TRUE./, GROW/ .TRUE./,               &
+        TOL/0.0_WP/, CGCE/0.5_WP/, BIG/0.0_WP/, ABORT1/ .TRUE./,      &
+        ABORT2/ .TRUE./, ABORT3/ .FALSE./, ABORT/ .FALSE./, MIRN/0/,  &
+        MICN/0/, MIRNCP/0/, MICNCP/0/, MIRANK/0/, NDROP1/0/,          &
+        MRMIN/0.0D0/, MRESID/0/, OK_TO_CALL_MA28/.FALSE./
+! ..
+! END OF DVODE_F90 PRIVATE SECTION.
+!_______________________________________________________________________
+
+    CONTAINS
+
+      SUBROUTINE VODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,G_FCN)
+! ..
+! This is an interface for DVODE to allow JAC and GFUN to be
+! OPTIONAL arguments.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Structure Arguments ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (INOUT) :: T, TOUT
+        INTEGER, INTENT (INOUT) :: ISTATE
+        INTEGER, INTENT (IN) :: ITASK, NEQ
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: Y(*)
+! ..
+! .. Subroutine Arguments ..
+        OPTIONAL :: G_FCN, J_FCN
+        EXTERNAL J_FCN
+! ..
+! .. Subroutine Interfaces ..
+     INTERFACE
+       SUBROUTINE F(NEQ,T,Y,YDOT)
+         INTEGER, PARAMETER :: WP = KIND(1.0D0)
+         INTEGER NEQ
+         REAL(WP) T
+         REAL(WP), DIMENSION(NEQ) :: Y, YDOT
+         INTENT(IN)  :: NEQ, T, Y
+         INTENT(OUT) :: YDOT
+       END SUBROUTINE F
+     END INTERFACE
+
+     INTERFACE
+       SUBROUTINE G_FCN(NEQ,T,Y,NG,GROOT)
+         INTEGER, PARAMETER :: WP = KIND(1.0D0)
+         INTEGER NEQ, NG
+         REAL(WP) T
+         REAL(WP), DIMENSION(NEQ) :: Y
+         REAL(WP), DIMENSION(NG) :: GROOT(NG)
+         INTENT(IN)  :: NEQ, T, Y, NG
+         INTENT(OUT) :: GROOT
+       END SUBROUTINE G_FCN
+     END INTERFACE
+
+!    Note:
+!    The best we can do here is to declare J_FCN to be
+!    external. The interface for a sparse problem differs
+!    from that for a banded or dense problem. The following
+!    would suffuce for a banded or dense problem.
+!    INTERFACE
+!      SUBROUTINE J_FCN(NEQ,T,Y,ML,MU,PD,NROWPD)
+!        INTEGER, PARAMETER :: WP = KIND(1.0D0)
+!        INTEGER NEQ, ML, MU, NROWPD
+!        REAL(WP) T
+!        REAL(WP), DIMENSION(NEQ) :: Y
+!        REAL(WP), DIMENSION(NEQ) :: PD(NROWPD,NEQ)
+!        INTENT(IN)  :: NEQ, T, Y, ML, MU, NROWPD
+!        INTENT(INOUT) :: PD
+!      END SUBROUTINE J_FCN
+!    END INTERFACE
+!    The following would suffice for a sparse problem.
+!    INTERFACE
+!      SUBROUTINE J_FCN(NEQ,T,Y,IA,JA,NZ,P)
+!        INTEGER, PARAMETER :: WP = KIND(1.0D0)
+!        INTEGER NEQ, NZ
+!        REAL(WP) T
+!        REAL(WP), DIMENSION Y(*), P(*)
+!        INTEGER, DIMENSION IA(*), JA(*)
+!        INTENT(IN) :: NEQ, T, Y
+!        INTENT(INOUT) IA, JA, NZ, P
+!      END SUBROUTINE J_FCN
+!    END INTERFACE
+! ..
+! .. Local Scalars ..
+        INTEGER :: HOWCALL, METH, MFA, MITER, MOSS, NG
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT VODE_F90
+! ..
+!       Check that SET_OPTS has been called.
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,10,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling DVODE_F90 the first time.'
+          CALL XERRDV(MSG,10,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Check that JAC is present if it is needed.
+        IF (PRESENT(J_FCN)) THEN
+        ELSE
+!         Note:
+!         MOSS is irrelevant. OPTS%MF is two digits after the
+!         call to SET_OPTS.
+          MFA = ABS(OPTS%MF)
+          MOSS = MFA/100
+          METH = (MFA-100*MOSS)/10
+          MITER = MFA - 100*MOSS - 10*METH
+          IF (MITER==1 .OR. MITER==4 .OR. MITER==6) THEN
+            MSG = 'You have specified a value of the integration'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'method flag MF which requires that you supply'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'a Jacobian subroutine JAC; but FAC is not'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'present in the argument list.'
+            CALL XERRDV(MSG,20,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Check that GFUN is present if it is needed.
+
+        IF (PRESENT(G_FCN)) THEN
+        ELSE
+          NG = OPTS%NG
+          IF (NG>0) THEN
+            MSG = 'You have indicated that events are present but'
+            CALL XERRDV(MSG,30,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'you have not supplied a GFUN subroutine.'
+            CALL XERRDV(MSG,30,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!     Determine how DVODE will be called.
+
+!     HOWCALL = 1: JDUMMY, GDUMMY
+!               2: JAC, GFUN
+!               3: JAC, GDUMMY
+!               4: JDUMMY, GFUN
+        HOWCALL = 1
+        IF (PRESENT(J_FCN)) THEN
+          IF (PRESENT(G_FCN)) THEN
+            HOWCALL = 2
+          ELSE
+            HOWCALL = 3
+          END IF
+        ELSE
+          IF (PRESENT(G_FCN)) THEN
+            HOWCALL = 4
+          ELSE
+            HOWCALL = 1
+          END IF
+        END IF
+
+!       Call DVODE to do the integration.
+
+        IF (HOWCALL==1) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JDUMMY,GDUMMY)
+        ELSE IF (HOWCALL==2) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,G_FCN)
+        ELSE IF (HOWCALL==3) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,GDUMMY)
+        ELSE IF (HOWCALL==4) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JDUMMY,G_FCN)
+        END IF
+        RETURN
+
+      END SUBROUTINE VODE_F90
+!_______________________________________________________________________
+
+      SUBROUTINE JDUMMY(NEQ,T,Y,ML,MU,PD,NROWPD)
+! ..
+! This is a dummy Jacobian subroutine for VODE_F90 (never called).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: T
+        INTEGER :: ML, MU, NEQ, NROWPD, I
+        LOGICAL DUMMY
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: PD(NROWPD,*), Y(*)
+! ..
+      INTENT(IN) T, Y, ML, MU, NROWPD
+      INTENT(INOUT) PD
+! ..
+! .. FIRST EXECUTABLE STATEMENT JDUMMY
+! ..
+!       Get rid of some needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          I = NEQ
+          I = ML
+          I = MU
+          I = NROWPD
+          PD(1,1) = T
+          PD(1,1) = Y(1)
+          PD(1,1) = DBLE(REAL(I))
+        END IF
+        RETURN
+
+      END SUBROUTINE JDUMMY
+!_______________________________________________________________________
+
+      SUBROUTINE GDUMMY(NEQ,T,Y,NG,GOUT)
+! ..
+! This is a dummy event subroutine for VODE_F90 (never called).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: T
+        INTEGER :: NEQ, NG, I
+        LOGICAL DUMMY
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: GOUT(*), Y(*)
+! ..
+      INTENT(IN) NEQ, T, Y, NG
+      INTENT(OUT) GOUT
+! ..
+! .. FIRST EXECUTABLE STATEMENT JDUMMY
+! ..
+!       Get rid of some needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          I = NEQ
+          I = NG
+          GOUT(1) = T
+          GOUT(1) = Y(1)
+          GOUT(1) = DBLE(REAL(I))
+        END IF
+        RETURN
+
+      END SUBROUTINE GDUMMY
+!_______________________________________________________________________
+
+  SUBROUTINE SET_OPTS_2(HMAX,HMIN,MXSTEP)
+! ..
+! Allow the maximum step size, the minimum step size, and the maximum
+! number of steps to be changed without restarting the integration.
+! ..
+!                     Quick Summary of Options
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MXSTEP                 - Maximum number of integration steps in DVODE
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: HMAX, HMIN
+        INTEGER, OPTIONAL, INTENT (IN) :: MXSTEP
+! ..
+! .. Local Scalars ..
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_OPTS_2
+! ..
+!       Check that SET_OPTS has been called:
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,40,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling subroutine SET_OPTS_2.'
+          CALL XERRDV(MSG,40,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          MSG = 'HMAX changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,50,1,0,0,0,1,HMAX,ZERO)
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          MSG = 'HMIN changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,60,1,0,0,0,1,HMIN,ZERO)
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          MSG = 'MXSTEP changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,70,1,1,MXSTEP,0,0,ZERO,ZERO)
+        END IF
+
+  END SUBROUTINE SET_OPTS_2
+!_______________________________________________________________________
+
+  FUNCTION SET_NORMAL_OPTS(DENSE_J, BANDED_J, SPARSE_J,                &
+    USER_SUPPLIED_JACOBIAN, LOWER_BANDWIDTH, UPPER_BANDWIDTH,          &
+    RELERR, ABSERR, ABSERR_VECTOR, NEVENTS) RESULT(OPTS)
+
+! FUNCTION SET_NORMAL_OPTS:
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH,UPPER_BANDWIDTH
+!    Error tolerances:
+!       RELERR, ABSERR, ABSERR_VECTOR
+!    Rootfinding:
+!       NEVENTS
+! RESULT(OPTS)
+
+! Note:
+! Invoking SET_NORMAL_OPTS causes an integration restart. A common
+! situation is one in which all you wish to change is one of the
+! vode.f77 optional parameters HMAX, HMIN, or MXSTEP. Once the
+! integration is started and this is all you wish to do, you can
+! change any of these parameters without restarting the integration
+! simply by calling subroutine SET_OPTS_2:
+!      CALL SET_OPTS_2(HMAX,HMIN,MXSTEP)
+! Each of the three arguments is optional and only the ones actually
+! supplied will be used. Changes will take effect in the same manner
+! as in the VODE.f77 solver.
+!
+! NORMAL_OPTIONS sets user parameters for DVODE via keywords.
+! Values that are defined herein will be used internally by
+! DVODE. All option keywords are OPTIONAL and order is not
+! important. These options should be adequate for most problems.
+! If you wish to use more specialized options, you must use
+! SET_INTERMEDIATE_OPTS or SET_OPTS rather than NORMAL_OPTS.
+! If you wish to use SET_INTERMEDIATE_OPTS or SET_OPTS, you
+! may use any of the SET_NORMAL_OPTS keywords or any of the
+! keywords available for these two functions. Of course, you
+! may opt to simply use SET_OPTS for all problems.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+!
+! Important Note:
+! If feasible, you should use the dense or banded option; but
+! SET_NORMAL_OPTS allows you to use a sparse internal Jacobian
+! (i.e., one that is determined using finite differences) and
+! structure pointere array that are determined internally
+! using finite differences. If any of the following are true
+!    (1) DVODE_F90 doesn't perform satisfactorily for
+!        your problem,
+!    (2) you are solving a very large problem,
+!    (3) you wish to supply the sparse pointer arrays
+!        directly,
+!    (4) you wish to supply an analytical sparse Jacobian,
+! or
+!    (5) you wish to use one of the specialized sparse
+!        Jacobian options,
+! you are encouraged to use SET_OPTS which contains several
+! provisions for solving sparse problems more efficiently.
+
+! Option Types:
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! RELERR                 - real(wp) scalar
+! ABSERR                 - real(wp) scalar
+! ABSERR_VECTOR          - real(wp) vector
+! NEVENTS                - integer
+! Options:
+! ABSERR                 = Absolute error tolerance
+! ABSERR_VECTOR          = Vector of absolute error tolerances
+! RELERR                 = Scalar relative error tolerance
+! NEVENTS                = Number of event functions (requires
+!                          user-supplied GFUN)
+! DENSE_J                = Use dense linear algebra if .TRUE.
+! BANDED_J               = Use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH      = Lower bandwidth of the Jacobian
+!                          (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH      = Upper bandwidth of the Jacobian
+!                          (required if BANDED_J = .TRUE.)
+! SPARSE_J               = Use sparse linear algebra if .TRUE.
+! USER_SUPPLIED_JACOBIAN = Exact Jacobian option
+!                          (requires user-supplied JAC;
+!                          ignored for SPARSE_J=.TRUE.)
+!
+! Note: DENSE_J takes precedence over BANDED_J which in turn
+! takes precedence over SPARSE_J if more than one is supplied.
+! If neither of the three flags is present, the nonstiff Adams
+! option will be used. Similiarly, ABSERR_VECTOR takes
+! precedence over ABSERR.
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: ABSERR,RELERR
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH,   &
+          NEVENTS,UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, DENSE_J, &
+          SPARSE_J, USER_SUPPLIED_JACOBIAN
+! ..
+! .. Array Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IER,IOPT,METH,MF,MFA,MFSIGN,MITER,ML,MOSS, &
+          MU,NAE,NG,NRE
+        LOGICAL :: BANDED,DENSE,SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_NORMAL_OPTS
+! ..
+        RUSER(1:LRWUSER) = ZERO
+        IUSER(1:LIWUSER) = 0
+        
+!       Allow default error tolerances?
+        ALLOW_DEFAULT_TOLS = .FALSE.
+
+!       Maximum number of consecutive error test failures?
+        CONSECUTIVE_EFAILS = KFH
+
+!       Maximum number of consecutive corrector iteration failures?
+        CONSECUTIVE_CFAILS = MXNCF
+
+!       Use JACSP to approximate Jacobian?
+        USE_JACSP = .FALSE.
+
+!       Set the flag to indicate that SET_NORMAL_OPTS has been called.
+        OPTS_CALLED = .TRUE.
+
+!       Set the MA48 storage cleanup flag.
+        MA48_WAS_USED = .FALSE.
+
+!       Set the fast factor option for MA48,
+        USE_FAST_FACTOR = .TRUE.
+
+!       Set the constant Jacobian flags.
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!       Determine the working precision and define the value for UMAX
+!       expected by MA28. Note that it is different for single and
+!       double precision.
+        WPD = KIND(1.0D0)
+        WPS = KIND(1.0E0)
+        IF (WPD/=WP .AND. WPS/=WP) THEN
+          MSG = 'Illegal working precision in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,80,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (WPD==WP) THEN
+!       Working precision is double.
+          UMAX = 0.999999999_WP
+        ELSE
+!       Working precision is single.
+          UMAX = 0.9999_WP
+        END IF
+
+        MA28AD_CALLS = 0
+        MA28BD_CALLS = 0
+        MA28CD_CALLS = 0
+        MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       MA48AD_CALLS = 0
+!       MA48BD_CALLS = 0
+!       MA48CD_CALLS = 0
+!_______________________________________________________________________
+        IRNCP = 0
+        ICNCP = 0
+        MINIRN = 0
+        MINICN = 0
+        MAX_MINIRN = 0
+        MAX_MINICN = 0
+        MAX_NNZ = 0
+
+!       Set the flag to warn the user if |(y(t)| < abserr.
+        YMAXWARN = .FALSE.
+
+!       Load defaults for the optional input arrays for DVODE.
+        IUSER(1:8) = 0
+        RUSER(1:8) = ZERO
+
+!       Set the method flag.
+        MF = 10
+        IF (PRESENT(SPARSE_J)) THEN
+          IF (SPARSE_J) THEN
+             MF = 227
+             IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+               MSG = 'You have indicated you wish to supply an'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'exact sparse Jacobian in function'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'SET_NORMAL_OPTS. In order to do this,'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'you must use SET_OPTS. Execution will'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'continue.'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+             END IF
+          END IF
+        END IF
+
+        IF (PRESENT(BANDED_J)) THEN
+          IF (BANDED_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 24
+              ELSE
+                MF = 25
+              END IF
+            ELSE
+              MF = 25
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(DENSE_J)) THEN
+          IF (DENSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 21
+              ELSE
+                MF = 22
+              END IF
+            ELSE
+              MF = 22
+            END IF
+          END IF
+        END IF
+
+!       Check for errors in MF.
+        MFA = IABS(MF)
+        MOSS = MFA/100
+        METH = (MFA-100*MOSS)/10
+        MITER = MFA - 100*MOSS - 10*METH
+        IF (METH<1 .OR. METH>2) THEN
+          MSG = 'Illegal value of METH in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,100,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MITER<0 .OR. MITER>7) THEN
+          MSG = 'Illegal value of MITER in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,110,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MOSS<0 .OR. MOSS>2) THEN
+          MSG = 'Illegal value of MOSS in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,120,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Reset MF, now that MOSS is known.
+        MFSIGN = SIGN(1,MF)
+        MF = MF - 100*MOSS*MFSIGN
+
+        IF (MITER==0) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==1 .OR. MITER==2) THEN
+          DENSE = .TRUE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==3) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==4 .OR. MITER==5) THEN
+          DENSE = .FALSE.
+          BANDED = .TRUE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==6 .OR. MITER==7) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .TRUE.
+        END IF
+
+!       Define the banded Jacobian band widths.
+        IF (BANDED) THEN
+          IF (PRESENT(LOWER_BANDWIDTH)) THEN
+            ML = LOWER_BANDWIDTH
+            IUSER(1) = ML
+          ELSE
+            MSG = 'In SET_NORMAL_OPTS you have indicated a'
+            CALL XERRDV(MSG,130,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not supplied'
+            CALL XERRDV(MSG,130,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'the lower bandwidth.'
+            CALL XERRDV(MSG,130,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(UPPER_BANDWIDTH)) THEN
+            MU = UPPER_BANDWIDTH
+            IUSER(2) = MU
+          ELSE
+            MSG = 'In SET_NORMAL_OPTS you have indicated a'
+            CALL XERRDV(MSG,140,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not supplied'
+            CALL XERRDV(MSG,140,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'the upper bandwidth.'
+            CALL XERRDV(MSG,140,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Define the sparse Jacobian options.
+        IF (SPARSE) THEN
+!         Set the MA28 message flag.
+          LP = 0
+!         Set the MA28 pivot sequence frequency flag.
+          REDO_PIVOT_SEQUENCE = .FALSE.
+!         Set the MA28 singularity threshold.
+          EPS = 1.0E-4_WP
+!         Use scaling of the iteration matrix.
+          SCALE_MATRIX = .TRUE.
+!         Define the elbow room factor for the MA28 sparse work arrays.
+          ELBOW_ROOM = 2
+!         NZSWAG is a swag for the number of nonzeros in the Jacobian.
+          NZ_SWAG = 0
+!         Use partial pivoting.
+          U_PIVOT = ONE
+!         Indicate that SET_IAJA has not yet been called successfully.
+          IAJA_CALLED = .FALSE.
+!         Check for illegal method flags.
+          IF (MOSS==2 .AND. MITER/=7) THEN
+            MSG = 'In SET_NORMAL_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,150,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (MOSS==1 .AND. MITER/=6) THEN
+            MSG = 'In SET_NORMAL_OPTS MOSS=1 but MITER is not 6.'
+            CALL XERRDV(MSG,160,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         IF (MOSS==0 .AND. MITER/=7) THEN
+!           MSG = 'In SET_NORMAL_OPTS MOSS=0 but MITER is not 7.'
+!           CALL XERRDV(MSG,170,2,0,0,0,0,ZERO,ZERO)
+!         END IF
+        END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       No solution bounds will be imposed.
+        BOUNDS = .FALSE.
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+        IOPT = 1
+        OPTS%IOPT = IOPT
+
+!       Process the error tolerances.
+
+!       Relative error tolerance.
+        NRE = 1
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,10)
+        IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,180,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_WP
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,200,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerance(s).
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,210,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,210,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,20)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,220,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,240,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,240,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,240,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+           OPTS%ITOL = 2
+        ELSE
+           OPTS%ITOL = 1
+        END IF
+        RETURN
+
+  END FUNCTION SET_NORMAL_OPTS
+!_______________________________________________________________________
+
+  FUNCTION SET_INTERMEDIATE_OPTS(DENSE_J, BANDED_J, SPARSE_J,          &
+    USER_SUPPLIED_JACOBIAN,                                            &
+    LOWER_BANDWIDTH, UPPER_BANDWIDTH,                                  &
+    RELERR, ABSERR, ABSERR_VECTOR,                                     &
+    TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL,                     &
+    NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS,                          &
+    NEVENTS, CONSTRAINED, CLOWER, CUPPER, CHANGE_ONLY_f77_OPTIONS)     &
+  RESULT(OPTS)
+
+! FUNCTION SET_INTERMEDIATE_OPTS:
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH, UPPER_BANDWIDTH
+!    Error tolerances:
+!       RELERR, ABSERR, ABSERR_VECTOR
+!    VODE.f77 optional parameters:
+!       TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL
+!    Sparse flags:
+!       NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS
+!    Rootfinding:
+!       NEVENTS
+!    Impose bounds on solution:
+!       CONSTRAINED, CLOWER, CUPPER
+!    Change one or more of HMAX, HMIN, TCRIT, MXSTEP, MXHNIL, MAXORD
+!       CHANGE_ONLY_f77_OPTIONS
+! RESULT(OPTS)
+
+! SET_OPTIONS sets user parameters for DVODE via keywords. Values
+! that are defined herein will be used internally by DVODE.
+! All option keywords are OPTIONAL and order is not important.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+
+!                     Quick Summary of Options
+
+! DENSE_J                - Jacobian is sparse alternative to MF
+! BANDED_J               - Jacobian is banded alternative to MF 
+! SPARSE_J               - Jacobian is sparse alternative to MF   
+! USER_SUPPLIED_JACOBIAN - User will supply Jacobian subroutine
+!                          (user supplied subroutine JAC required)
+! LOWER_BANDWIDTH        - Lower bandwidth ML in DVODE
+! UPPER_BANDWIDTH        - Upper bandwidth MU in DVODE
+! RELERR                 - Scalar relative error tolerance in DVODE
+! ABSERR                 - Scalar absolute error tolerance in DVODE
+! ABSERR_VECTOR          - Vector absolute error tolerance in DVODE
+! TCRIT                  - Critical time TCRIT in DVODE
+! H0                     - Starting step size in DVODE
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MAXORD                 - Maximum integration order in DVODE
+! MXSTEP                 - Maximum number of integration steps
+!                          in DVODE
+! MXHNIL                 - Maximum number of T+H=T messages in DVODE
+! NZSWAG                 - guess for the number of nonzeros in sparse
+!                          Jacobian
+! USER_SUPPLIED_SPARSITY - user will supply sparsity structure
+!                          arrays by calling USERSETS_IAJA 
+! MA28_RPS               - Redo MA28AD pivot sequence if a singularity
+!                          is encountered
+! NEVENTS                - number of user defined root finding functions
+!                          (user supplied subroutine G required)
+! CONSTRAINED,           - array of solution component indices that
+! CLOWER,                  are to be constrained by the lower and
+! CUPPER                   upper bound arrays CLOWER and CUPPER so that
+!                          CLOWER(I) <= Y(CONSTRAINED(I)) <= CUPPER(I)
+!                     Options Types
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! RELERR                 - real(wp) scalar
+! ABSERR                 - real(wp) scalar
+! ABSERR_VECTOR          - real(wp) vector
+! TCRIT                  - real(wp) scalar
+! H0                     - real(wp) scalar
+! HMAX                   - real(wp) scalar
+! HMIN                   - real(wp) scalar
+! MAXORD                 - integer
+! MXSTEP                 - integer
+! MXHNIL                 - integer
+! NZSWAG                 - integer
+! USER_SUPPLIED_SPARSITY - logical
+! MA28_RPS               - logical
+! NEVENTS                - integer
+! CONSTRAINED            - integer array
+! CLOWER                 - real(wp) array
+! CUPPER                 - real(wp) array
+! CHANGE_ONLY_f77_OPTIONS- logical
+! Argument list parameters:
+! ABSERR                   = scalar absolute error tolerance
+! ABSERR_VECTOR            = vector of absolute error tolerances
+! RELERR                   = scalar relative error tolerance
+! NEVENTS                  = Number of event functions (requires
+!                            user-supplied GFUN)
+! DENSE_J                  = use dense linear algebra if .TRUE.
+! BANDED_J                 = use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH        = lower bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH        = upper bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+! SPARSE_J                 = use sparse linear algebra if .TRUE.
+!
+!   NZSWAG                 = If you wish you may supply a guess,
+!                            NZSWAG, at the number of nonzeros
+!                            in the Jacobian matrix. In some cases
+!                            this will speed up the determination
+!                            of the necessary storage.
+!   USER_SUPPLIED_SPARSITY = .TRUE. if you wish to supply the sparsity
+!                            structure arrays directly by calling
+!   MA28_RPS               = .TRUE. to force MA28AD to calculate a new
+!                            pivot sequence for use in MA28BD if a
+!                            singular iteration matrix is encountered
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+! USER_SUPPLIED_JACOBIAN   = exact Jacobian option
+!                            (requires user-supplied JAC)
+! TCRIT                    = critical time
+! H0                       = initial step size to try
+! HMAX                     = maximum allowable step size
+! HMIN                     = minimum allowable step size
+! MAXORD                   = maximum allowable integration order
+! MXSTEP                   = maximum number of integration steps
+!                            between calls to DVODE
+! MXHNIL                   = maximum number of printed messages
+!                            if the T+H=T condition occurs
+! CONSTRAINED              = array containing the indices of
+!                            solution components which are to be
+!                            be constrained by CLOWER and CUPPER.
+!                            The size of CONSTRAINED must be
+!                            positive and not exceed NEQ, the
+!                            number of ODEs. Each component of
+!                            CONSTRAINED must be between 1 and NEQ.
+!   CLOWER, CUPPER         = lower and upper bound arrays for the.
+!                            solution. Each must be the same size
+!                            as the CONSTRAINED vector.
+!
+!   User-callable Routines:
+!   The following routines may be called by the user:
+!   SET_INTERMEDIATE_OPTS      : Used to set options for DVODE_F90
+!   GET_STATS     : Used to gather summary integration
+!                   statistics following a successful
+!                   return from DVODE_F90
+!   DVINDY        : Used if the user wishes to interpolate
+!                   solution or derivative following a
+!                   successful return from DVODE_F90
+!   USERSETS_IAJA : Used if the user wishes to supply the
+!                   sparsity structure directly
+!   Detailed Description of SET_INTERMEDIATE_OPTS
+!   The following are defined in SET_INTERMEDIATE_OPTS:
+!   OPTS%MF     = Integration method flag (MF)
+!   OPTS%METH   = Integration family flag (METH)
+!   OPTS%MITER  = Iteration type flag (MITER)
+!   OPTS%MOSS   = Sparsity array type flag (MOSS)
+!   OPTS%ITOL   = Error tolerance flag (ITOL) (ITOL)
+!   OPTS%ATOL   = Absolute error tolerance(s) (ATOL)
+!   OPTS%RTOL   = Relative error tolerance(s) (RTOL)
+!   OPTS%DENSE  = Use dense linear algebra
+!   OPTS%BANDED = Use banded linear algebra 
+!   OPTS%SPARSE = Use sparse linear algebra 
+!   OPTS%IOPT   = DVODE optional parameter input flag (IOPT)
+!   OPTS%NG     = Number of event functions
+!   RUSER(1)    = TCRIT (don't step past)
+!   IUSER(1)    = Jacobian lower bandwidth (ML)
+!   IUSER(2)    = Jacobian upper bandwidth (MU)
+!   RUSER(5)    = Initial step size to try (H0)
+!   RUSER(6)    = Maximum allowable step size (HMAX)
+!   RUSER(7)    = Minimum allowable step size (HMIN)
+!   IUSER(5)    = Maximum allowable integration order (MAXORD)
+!   IUSER(6)    = Maximum number of integration steps (MXSTEP)
+!   IUSER(7)    = Maximum number of T+H=T messages (MXHNIL)
+!   NZ_SWAG     = Guess for the number of nonzeros in the
+!                 sparse Jacobian
+!   NG          = Number of user event functions
+!   BOUNDS,     = Nonnegativity information
+!   NDX, IDX
+!   YMAXWARN    = Warning flag for |y(t)| < abserr
+!   MA28_ELBOW_ROOM = Integer multiple by which to increase
+!                     the elbow room in the MA28 sparse work
+!                     arrays
+!   MC19_SCALING    = logical flag to control MC19 sparse
+!                     scaling of the Jacobian
+!   MA28_MESSAGES   = logical flag to control printing of MA28
+!                     messages.
+!   MA28_EPS        = real(wp) MA28 singularity threshold
+!
+!                         All Options
+!
+! METHOD_FLAG
+!
+! Default:   Not used
+! Change to: No need to specify if use one of next three parameters
+!            but can be changed to any value of the MF method flag
+!            in dvode.f77
+!
+! DENSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for dense linear algebra
+!
+! BANDED_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for banded linear algebra
+!
+! SPARSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for sparse linear algebra
+
+! USER_SUPPLIED_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if want to supply subroutine JAC to DVODE_F90
+!
+! LOWER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Lower bandwidth if BANDED_J = .TRUE.
+!
+! UPPER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Upper bandwidth if BANDED_J = .TRUE.
+!
+! RELERR
+!
+! Default:   None
+! Change to: Specify a nonzero relative error tolerance
+!
+! ABSERR
+!
+! Default:   None
+! Change to: Specify a scalar absolute error tolerance or
+!            a vector of absolute error tolerances
+!
+! ABSERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of absolute error tolerances
+!
+! TCRIT
+!
+! Default:   Not used
+! Change to: Value of T which DVODE_F90 is not to step past
+!
+!     H0
+!
+! Default:   Determined by DVODE_F90
+! Change to: Guess for initial step size
+!
+! HMAX
+!
+! Default:   Infinity
+! Change to: Maximum allowable step size
+!
+! HMIN
+!
+! Default:   0.0D0
+! Change to: Minimum allowable step size
+!
+! MAXORD
+!
+! Default:   Determined by DVODE_F90
+! Change to: Maximum integration order
+!
+! MXSTEP
+!
+! Default:   5000
+!     Change to: Maximum number of steps between output points
+!
+! MXHNIL
+!
+! Default:   10
+! Change to: Maximum number of times T+H=T message will be printed
+!
+! NZSWAG
+!
+! Default:   Determined by DVODE_F90
+! Change to: Amount by which to increment sizes of sparse arrays
+!
+! USER_SUPPLIED_SPARSITY
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to call subroutine USERSETS_IAJA to
+!            define the sparse structure array pointers directly
+!
+! NEVENTS
+!
+! Default:   0
+! Change to: Number of event functions if wish to supply subroutine
+!            GFUN to DVODE_F90
+!
+! CONSTRAINED
+!
+! Default:   Bounds not imposed on solution
+! Change to: Array of indices for components on which to impose
+!            solution bounds
+!
+! CLOWER
+!
+! Default:   Not used
+! Change to: Vector containing lower bounds corresponding to
+!            CONSTRAINED
+!
+! CUPPER
+!
+! Default:   Not used
+! Change to: Vector containing upper bounds corresponding to
+!            CONSTRAINED
+!
+! MA28_RPS
+!
+! Default:   .FALSE.
+! Change to: Redo the MA28AD sparse pivoting sequence any time
+!            MA28BD considers the iteration matrix to be
+!            numerically singularity
+!
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+! For a sparse Jacobian, IA(J+1)-IA(J) is the number
+! of nonzeros in column change. JA(I) indicates the
+! rows in which the nonzeros occur. For column J,
+! the nonzeros occurs in rows I=JA(K) for K=I1,...,I2
+! where I1=IA(J) and I2= IA(J+1)-1. Load DF(I)/DY(J)
+! in PD(I). Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = IA(J)
+!       I2 = IA(J+1) - 1
+!       DO K = I1, I2
+!          I = JA(K)
+!          PD(I) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+!                    More on Sparsity Options
+!
+! Two facts of life regarding the use of direct sparse solvers are
+! (1) significant improvements are possible, and (2) the use of
+! direct sparse solvers often is more demanding of the user.
+! Although SET_NORMAL_OPTS provides modest provisions for solving
+! problems with sparse Jacobians, using SET_INTERMEDIATE_OPTS rather than
+! SET_NORMAL_OPTS provides several advanced options. These options
+! are described below. The recommended manner in which to use
+! these options is also provided. Note that each of these optional
+! parameters have default values and need not be specified in your
+! call to SET_INTERMEDIATE_OPTS if you wish to use the default values. Note
+! also that the order in which the options are specified in a call
+! to SET_INTERMEDIATE_OPTS is not important.
+!
+!  (1) First determine if it is feasible to use either the BANDED
+!      or DENSE Jacobian option.
+!         Recommendation:
+!         Use the DENSE or BANDED option if possible. They do
+!         not require use of most of the options described here.
+!    
+!  (2) The Jacobian is approximated internally using differences
+!      if you do not provide an analytic Jacobian. The option
+!      USER_SUPPLIED_JACOBIAN=.TRUE. may be used if you wish to
+!      provide an analytic Jacobian.
+!         Recommendation:
+!         Use an internally generated Jacobian for most problems
+!         but consider providing an analytic Jacobian if it not
+!         too much trouble.
+!
+!  (3) If you do not provide the sparse structure arrays, they
+!      are approximated internally by making NEQ calls to your
+!      derivative subroutine and using differences to approximate
+!      the structure of the Jacobian. The option
+!      USER_SUPPLIED_SPARSITY and a call to USERSETS_IAJA can
+!      be used to supply the arrays directly. You can also use
+!      subroutine SET_IAJA to approximate the structure using
+!      different perturbation factors than those used in DVODE_F90.
+!         Recommendations:
+!         Although allowing DVODE_F90 to approximate the Jacobian
+!         structure suffices for most problems, if you know the
+!         sparsity pattern provide it directly. This eliminates
+!         the possibility that an important element that happens
+!         to be 0 when the sparsity pattern is approximated is
+!         later nonzero; and it avoids the NEQ extra calls to
+!         your derivative subroutine to approximate the structure.
+!         Note that a nemesis for any sparse ode solver is a
+!         problem in which the sparsity pattern actually changes
+!         during the integration. An example of such a problem
+!         is provided in the demohum21.f90 demonstration program.
+!         If you know the sparsity pattern changes or if you
+!         suspect it does because DVODE_F90 is generating
+!         nonconvergence error messages, consider having DVODE_F90
+!         re-approximate the structure by calling SET_INTERMEDIATE_OPTS and
+!         forcing an integration restart when control is returned
+!         to your calling program. Please do not do this at every
+!         output point since it will be extremely time consuming
+!         and inefficient if it is not needed.
+!
+!  (4) The optional parameter NZSWAG may/should be used to speed
+!      up the determination of acceptable array sizes for the
+!      internal sparse working arrays and the sparse Jacobian.
+!      Initially, DVODE_F90 allocates arrays of length
+!      max(10*NEQ,NSZSWAG) and increases this amount by
+!      max(10*NEQ,ELBOW_ROOM*NSZSWAG) as necessary. NZSWAG
+!      has a default value of 1000 and ELBOW_ROOM has a default
+!      value of 2.
+!         Recommendation:
+!         Provide a larger value for NZSWAG particularly if NEQ
+!         is large and you suspect considerable fill-in due to
+!         partial pivoting.
+!
+!  (5) MA28BD uses the pivot sequence initially determined by
+!      MA28AD. When a singularity is diagnosed, the internal
+!      procedure used by the DENSE and BANDED options is used
+!      to reduce the step size and re-calulate the iteration
+!      matrix. This works fine for most problems; but particularly
+!      for badly scaled problems, the solution may be unsuccessful
+!      or it may drag along using small step sizes. This is due
+!      to the fact MA28BD will continue to use the out-of-date pivot
+!      sequence until singularity is again diagnosed. An option not
+!      available in previous sparse ode solvers may be used to
+!      instruct DVODE_F90 to force MA28AD to calculate a new pivot
+!      sequence when MA28BD encounters a singularity. Although
+!      MA28AD is considerably slower than MA28BD, the additional
+!      calls to MA28AD ensure that the pivot sequence is more
+!      up to date. This can increase both the accuracy and the
+!      efficiency very dramatically. The demodirn.f90 demonstration
+!      program provides an illustration of the dramatic improvement
+!      that is possible. The optional parameter MA28_RPS may be set
+!      .TRUE. to force these pivot sequence updates.
+!         Recommendation:
+!         Use the default value MA28_RPS=.FALSE; but if DVODE_F90
+!         encounters nonconvergence, use MA28_RPS=.TRUE. to force
+!         pivot sequence updates.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: ABSERR, H0, HMAX, HMIN,         &
+        RELERR, TCRIT
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH, MAXORD,          &
+          MXHNIL, MXSTEP, NEVENTS, NZSWAG, UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, CHANGE_ONLY_f77_OPTIONS,&
+          DENSE_J, MA28_RPS, SPARSE_J, USER_SUPPLIED_JACOBIAN,              &
+          USER_SUPPLIED_SPARSITY
+! ..
+! .. Array Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:)
+        REAL (WP), OPTIONAL :: CLOWER(:), CUPPER(:)
+        INTEGER, OPTIONAL, INTENT (IN) :: CONSTRAINED(:)
+! ..
+! .. Local Scalars ..
+        INTEGER ::  IER, IOPT, METH, MF, MFA, MFSIGN, MITER, ML, MOSS, MU,  &
+          NAE, NG, NRE
+        LOGICAL :: BANDED, DENSE, SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_INTERMEDIATE_OPTS
+! ..
+    RUSER(1:LRWUSER) = ZERO
+    IUSER(1:LIWUSER) = 0
+    
+!   Allow default error tolerances?
+    ALLOW_DEFAULT_TOLS = .FALSE.
+
+!   Maximum number of consecutive error test failures?
+    CONSECUTIVE_EFAILS = KFH
+
+!   Maximum number of consecutive corrector iteration failures?
+    CONSECUTIVE_CFAILS = MXNCF
+
+!   Use JACSP to approximate Jacobian?
+    USE_JACSP = .FALSE.
+
+!   If only f77 options are to be changed, do it and return.
+    IF (PRESENT(CHANGE_ONLY_f77_OPTIONS)) THEN
+       IF (CHANGE_ONLY_f77_OPTIONS) THEN
+          IF (.NOT.OPTS_CALLED) THEN
+             MSG = 'You have not previously called SET_OPTS before attempting'
+             CALL XERRDV(MSG,250,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'to change one or more of the vode.f77 optional parameters.'
+             CALL XERRDV(MSG,250,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(HMAX)) THEN
+             IOPT = 1
+             RUSER(6) = HMAX
+             MSG = 'HMAX changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,260,1,0,0,0,1,HMAX,ZERO)
+          END IF
+          IF (PRESENT(HMIN)) THEN
+             IOPT = 1
+             RUSER(7) = HMIN
+             MSG = 'HMIN changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,270,1,0,0,0,1,HMIN,ZERO)
+          END IF
+          IF (PRESENT(TCRIT)) THEN
+             IOPT = 1
+             RUSER(1) = TCRIT
+             MSG = 'TCRIT changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,280,1,0,0,0,1,TCRIT,ZERO)
+          END IF
+          IF (PRESENT(MXSTEP)) THEN
+             IOPT = 1
+             IUSER(6) = MXSTEP
+             MSG = 'MXSTEP changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,290,1,1,MXSTEP,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MAXORD)) THEN
+             IOPT = 1
+             IUSER(5) = MAXORD
+             MSG = 'MAXORD changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,300,1,1,MAXORD,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MXHNIL)) THEN
+             IOPT = 1
+             IUSER(7) = MXHNIL
+             MSG = 'MXHNIL changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,310,1,1,MXHNIL,0,0,ZERO,ZERO)
+          END IF
+       END IF
+       RETURN
+    END IF
+
+!       Set the flag to indicate that SET_INTERMEDIATE_OPTS has been called.
+        OPTS_CALLED = .TRUE.
+
+!       Set the MA48 storage cleanup flag.
+        MA48_WAS_USED = .FALSE.
+
+!       Set the fast factor option for MA48,
+        USE_FAST_FACTOR = .TRUE.
+
+!       Determine the working precision and define the value for UMAX
+!       expected by MA28. Note that it is different for single and
+!       double precision.
+        WPD = KIND(1.0D0)
+        WPS = KIND(1.0E0)
+        IF (WPD/=WP .AND. WPS/=WP) THEN
+          MSG = 'Illegal working precision in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,320,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (WPD==WP) THEN
+!       Working precision is double.
+          UMAX = 0.999999999_WP
+        ELSE
+!       Working precision is single.
+          UMAX = 0.9999_WP
+        END IF
+
+!       Set the MA28 message flag.
+        LP = 0
+
+!       Set the MA28 singularity threshold.
+        EPS = 1.0E-4_WP
+
+!       Set the MA28 pivot sequence frequency flag.
+        IF (PRESENT(MA28_RPS)) THEN
+           IF (MA28_RPS) THEN
+              REDO_PIVOT_SEQUENCE = MA28_RPS
+           ELSE
+              REDO_PIVOT_SEQUENCE = .FALSE.
+           END IF
+        ELSE
+           REDO_PIVOT_SEQUENCE = .FALSE.
+        END IF
+
+        MA28AD_CALLS = 0
+        MA28BD_CALLS = 0
+        MA28CD_CALLS = 0
+        MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       MA48AD_CALLS = 0
+!       MA48BD_CALLS = 0
+!       MA48CD_CALLS = 0
+!_______________________________________________________________________
+        IRNCP = 0
+        ICNCP = 0
+        MINIRN = 0
+        MINICN = 0
+        MAX_MINIRN = 0
+        MAX_MINICN = 0
+        MAX_NNZ = 0
+
+!       Set the flag to warn the user if |(y(t)| < abserr.
+        YMAXWARN = .FALSE.
+
+!       Load defaults for the optional input arrays for DVODE.
+        IUSER(1:8) = 0
+        RUSER(1:8) = ZERO
+
+        IF (PRESENT(SPARSE_J)) THEN
+          IF (SPARSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 126
+              ELSE
+                MF = 227
+              END IF
+            ELSE
+              MF = 227
+            END IF
+            IF (PRESENT(USER_SUPPLIED_SPARSITY)) THEN
+              IF (USER_SUPPLIED_SPARSITY) THEN
+                MF = MF - 100*(MF/100)
+              END IF
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(BANDED_J)) THEN
+          IF (BANDED_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 24
+              ELSE
+                MF = 25
+              END IF
+            ELSE
+              MF = 25
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(DENSE_J)) THEN
+          IF (DENSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 21
+              ELSE
+                MF = 22
+              END IF
+            ELSE
+              MF = 22
+            END IF
+          END IF
+        END IF
+
+!       Check for errors in MF.
+        MFA = IABS(MF)
+        MOSS = MFA/100
+        METH = (MFA-100*MOSS)/10
+        MITER = MFA - 100*MOSS - 10*METH
+        IF (METH<1 .OR. METH>2) THEN
+          MSG = 'Illegal value of METH in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,330,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MITER<0 .OR. MITER>7) THEN
+          MSG = 'Illegal value of MITER in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,340,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MOSS<0 .OR. MOSS>2) THEN
+          MSG = 'Illegal value of MOSS in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,350,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Reset MF, now that MOSS is known.
+        MFSIGN = SIGN(1,MF)
+        MF = MF - 100*MOSS*MFSIGN
+
+        IF (MITER==0) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==1 .OR. MITER==2) THEN
+          DENSE = .TRUE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==3) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==4 .OR. MITER==5) THEN
+          DENSE = .FALSE.
+          BANDED = .TRUE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==6 .OR. MITER==7) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .TRUE.
+        END IF
+
+!       Define the banded Jacobian band widths.
+        IF (BANDED) THEN
+          IF (PRESENT(LOWER_BANDWIDTH)) THEN
+            ML = LOWER_BANDWIDTH
+            IUSER(1) = ML
+          ELSE
+            MSG = 'In SET_INTERMEDIATE_OPTS you have indicated a'
+            CALL XERRDV(MSG,360,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not'
+            CALL XERRDV(MSG,360,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'supplied the lower bandwidth.'
+            CALL XERRDV(MSG,360,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(UPPER_BANDWIDTH)) THEN
+            MU = UPPER_BANDWIDTH
+            IUSER(2) = MU
+          ELSE
+            MSG = 'In SET_INTERMEDIATE_OPTS you have indicated a'
+            CALL XERRDV(MSG,370,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not'
+            CALL XERRDV(MSG,370,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'supplied the upper bandwidth.'
+            CALL XERRDV(MSG,370,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Define the nonzero diagonals.
+          BNGRP = 0
+          SUBS = .FALSE.
+          SUPS = .FALSE.
+          NSUBS  = 0
+          NSUPS = 0
+        END IF
+
+!       Define the sparse Jacobian options.
+        SCALE_MATRIX = .FALSE.
+        ELBOW_ROOM = 2
+        IF (SPARSE) THEN
+!         NZSWAG for the number of nonzeros in the Jacobian.
+          IF (PRESENT(NZSWAG)) THEN
+            NZ_SWAG = MAX(NZSWAG,0)
+          ELSE
+            NZ_SWAG = 0
+          END IF
+!         Indicate that SET_IAJA has not yet been called successfully.
+          IAJA_CALLED = .FALSE.
+!         Check for illegal method flags.
+          IF (MOSS==2 .AND. MITER/=7) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,380,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (MOSS==1 .AND. MITER/=6) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS MOSS=1 but MITER is not 6.'
+            CALL XERRDV(MSG,390,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         IF (MOSS==0 .AND. MITER/=7) THEN
+!           MSG = 'In SET_INTERMEDIATE_OPTS MOSS=0 but MITER is not 7.'
+!           CALL XERRDV(MSG,400,2,0,0,0,0,ZERO,ZERO)
+!         END IF
+!         Allow MC19 scaling for the Jacobian.
+          SCALE_MATRIX = .FALSE.
+        END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       Process the constrained solution components.
+        IF (PRESENT(CONSTRAINED)) THEN
+          NDX = SIZE(CONSTRAINED)
+          IF (NDX<1) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the size of CONSTRAINED < 1.'
+            CALL XERRDV(MSG,410,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (.NOT.(PRESENT(CLOWER)) .OR. .NOT.(PRESENT(CUPPER))) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the arrays CLOWER and CUPPER'
+            CALL XERRDV(MSG,420,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'are not present.'
+            CALL XERRDV(MSG,420,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (SIZE(CLOWER)/=NDX .OR. SIZE(CUPPER)/=NDX) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the size of the solution bound'
+            CALL XERRDV(MSG,430,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'arrays must be the same as the CONSTRAINED array.'
+            CALL XERRDV(MSG,430,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Note: The contents of CONSTRAINED will be checked
+!         in subroutine DVODE after NEQ is known.
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,30)
+          END IF
+          ALLOCATE (IDX(NDX),LB(NDX),UB(NDX),STAT=IER)
+          CALL CHECK_STAT(IER,40)
+          IDX(1:NDX) = CONSTRAINED(1:NDX)
+          LB(1:NDX) = CLOWER(1:NDX)
+          UB(1:NDX) = CUPPER(1:NDX)
+          BOUNDS = .TRUE.
+        ELSE
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,50)
+          END IF
+          NDX = 0
+          BOUNDS = .FALSE.
+        END IF
+
+!       Is the Jacobian constant?
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+!       Process the miscellaneous options.
+
+!       Don't step past TCRIT variable.
+        IF (PRESENT(TCRIT)) THEN
+          RUSER(1) = TCRIT
+        ELSE
+          RUSER(1) = ZERO
+        END IF
+
+!       DVODE optional parameters.
+        IOPT = 1
+        IF (PRESENT(MAXORD)) THEN
+          IUSER(5) = MAXORD
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXHNIL)) THEN
+          IUSER(7) = MXHNIL
+          IOPT = 1
+        END IF
+        IF (PRESENT(H0)) THEN
+          RUSER(5) = H0
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          IOPT = 1
+        END IF
+        U_PIVOT = ONE
+        OPTS%IOPT = IOPT
+
+!       Define the error tolerances.
+
+!       Relative error tolerances.
+        NRE = 1
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,60)
+        IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,440,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_WP
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,460,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerances.
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,460,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,460,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,70)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,470,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,490,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,490,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,490,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+!            3   array    scalar  RTOL(i)*ABS(Y(i)) + ATOL
+!            4   array    array   RTOL(i)*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ITOL = 2
+        ELSE
+          OPTS%ITOL = 1
+        END IF
+        RETURN
+
+  END FUNCTION SET_INTERMEDIATE_OPTS
+!_______________________________________________________________________
+
+  FUNCTION SET_OPTS(METHOD_FLAG, DENSE_J, BANDED_J, SPARSE_J,          &
+    USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN, CONSTANT_JACOBIAN,          &
+    LOWER_BANDWIDTH, UPPER_BANDWIDTH, SUB_DIAGONALS, SUP_DIAGONALS,    &
+    RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR, TCRIT, H0, HMAX,     &
+    HMIN, MAXORD, MXSTEP, MXHNIL, YMAGWARN, SETH, UPIVOT, NZSWAG,      &
+    USER_SUPPLIED_SPARSITY, NEVENTS, CONSTRAINED, CLOWER, CUPPER,      &
+    MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES, MA28_EPS,            &
+    MA28_RPS, CHANGE_ONLY_f77_OPTIONS,JACOBIAN_BY_JACSP)               &
+  RESULT(OPTS)
+
+! FUNCTION SET_OPTS:
+!    VODE.f77 method flag:
+!       METHOD_FLAG
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    Jacobian options:
+!       SAVE_JACOBIAN, CONSTANT_JACOBIAN. JACOBIAN_BY_JACSP
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH, UPPER_BANDWIDTH
+!    If specify the nonzero diagonals for banded Jacobian:
+!       SUB_DIAGONALS, SUP_DIAGONALS
+!    Error tolerances:
+!       RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR
+!    VODE.f77 optional parameters:
+!       TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL
+!    Solution smaller than absolute error tolerance:
+!       YMAGWARN
+!    Sparse flags:
+!       SETH, UPIVOT, NZSWAG, USER_SUPPLIED_SPARSITY
+!       MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES
+!       MA28_EPS, MA28_RPS
+!    Rootfinding:
+!       NEVENTS
+!    Impose bounds on solution:
+!       CONSTRAINED, CLOWER, CUPPER
+!    Change one or more of HMAX, HMIN, TCRIT, MXSTEP, MXHNIL, MAXORD
+!       CHANGE_ONLY_f77_OPTIONS
+! RESULT(OPTS)
+
+! SET_OPTIONS sets user parameters for DVODE via keywords. Values that
+! are defined herein will be used internally by DVODE. All option
+! keywords are OPTIONAL and order is not important.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+
+!                     Quick Summary of Options
+
+! METHOD_FLAG            - any legal value of MF as in DVODE
+! DENSE_J                - Jacobian is sparse alternative to MF
+! BANDED_J               - Jacobian is banded alternative to MF 
+! SPARSE_J               - Jacobian is sparse alternative to MF   
+! USER_SUPPLIED_JACOBIAN - User will supply Jacobian subroutine
+!                          (user supplied subroutine JAC required)
+! SAVE_JACOBIAN          - Jacobian will be saved and reused
+! CONSTANT_JACOBIAN      - Jacobian is constant
+! JACOBIAN_BY_JACSP      - Use Doug Salane's approximate Jacobian
+!                          algorithm
+! LOWER_BANDWIDTH        - Lower bandwidth ML in DVODE
+! UPPER_BANDWIDTH        - Upper bandwidth MU in DVODE
+! SUB_DIAGONALS          - Nonzero sub diagonals in Jacobian
+! SUP_DIAGONALS          - Nonzero super diagonals in Jacobian
+! RELERR                 - Scalar relative error tolerance in DVODE
+! RELERR_VECTOR          - Vector relative error tolerance in DVODE
+! ABSERR                 - Scalar absolute error tolerance in DVODE
+! ABSERR_VECTOR          - Vector absolute error tolerance in DVODE
+! TCRIT                  - Critical time TCRIT in DVODE
+! H0                     - Starting step size in DVODE
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MAXORD                 - Maximum integration order in DVODE
+! MXSTEP                 - Maximum number of integration steps
+!                          in DVODE
+! MXHNIL                 - Maximum number of T+H=T messages in DVODE
+! YMAGWARN               - Warn if magnitude of solution is smaller
+!                          than absolute error tolerance
+! SETH                   - Sparse Jacobian element threshold value
+! UPIVOT                 - MA28 partial pivoting parameter
+! NZSWAG                 - guess for the number of nonzeros in sparse
+!                          Jacobian
+! USER_SUPPLIED_SPARSITY - user will supply sparsity structure
+!                          arrays by calling USERSETS_IAJA 
+! MA28_ELBOW_ROOM        - Supply an integer greater than 2 if you
+!                          wish to increase the elbow room in the
+!                          MA28 work arrays (by MA28_ELBOW_ROOM * NZA).
+! MC19_SCALING           - .TRUE. if you wish to invoke sparse scaling
+!                           of the Jacobian.
+! MA28_MESSAGES          - Control printing of MA28 messages
+! MA28_RPS               - Redo MA28AD pivot sequence if a singularity
+!                          is encountered
+! NEVENTS                - number of user defined root finding functions
+!                          (user supplied subroutine G required)
+! CONSTRAINED,           - array of solution component indices that
+! CLOWER,                  are to be constrained by the lower and
+! CUPPER                   upper bound arrays CLOWER and CUPPER so that
+!                          CLOWER(I) <= Y(CONSTRAINED(I)) <= CUPPER(I)
+! CHANGE_ONLY_f77_OPTIONS- flag to indicate whether to only change any
+!                          of the parameters MXSTEP, MXHNIL, MAXORD,
+!                          HMAX, HMIN, TCRIT
+!                     Options Types
+! METHOD_FLAG            - integer
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! SAVE_JACOBIAN          - logical
+! CONSTANT_JACOBIAN      - logical
+! JACOBIAN_BY_JACSP      - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! SUB_DIAGONALS          - integer array
+! SUP_DIAGONALS          - integer array
+! RELERR                 - real(wp) scalar
+! RELERR_VECTOR          - real(wp) vector
+! ABSERR                 - real(wp) scalar
+! ABSERR_VECTOR          - real(wp) vector
+! TCRIT                  - real(wp) scalar
+! H0                     - real(wp) scalar
+! HMAX                   - real(wp) scalar
+! HMIN                   - real(wp) scalar
+! MAXORD                 - integer
+! MXSTEP                 - integer
+! MXHNIL                 - integer
+! YMAGWARN               - logical
+! SETH                   - real(wp) scalar
+! UPIVOT                 - real(wp) scalar
+! NZSWAG                 - integer
+! USER_SUPPLIED_SPARSITY - logical
+! NEVENTS                - integer
+! CONSTRAINED            - integer array
+! CLOWER                 - real(wp) array
+! CUPPER                 - real(wp) array
+! CHANGE_ONLY_f77_OPTIONS- logical
+
+! Argument list parameters:
+! METHOD_FLAG              = integration method flag
+! ABSERR                   = scalar absolute error tolerance
+! ABSERR_VECTOR            = vector of absolute error tolerances
+! RELERR                   = scalar relative error tolerance
+! RELERR_VECTOR            = vector of relative error tolerances
+! NEVENTS                  = Number of event functions (requires
+!                            user-supplied GFUN)
+! DENSE_J                  = use dense linear algebra if .TRUE.
+! BANDED_J                 = use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH        = lower bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH        = upper bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   SUB_DIAGONALS          = starting row numbers of nonzero sub
+!                            diagonals counting up from the lowest
+!                            sub diagonal
+!   SUP_DIAGONALS          = starting column numbers of nonzero
+!                            super diagonals counting up from the
+!                            lowest super diagonal
+! SPARSE_J                 = use sparse linear algebra if .TRUE.
+!   UPIVOT                 = partial pivot control flag (default=ONE)
+!                          = 0.0D0 for no partial pivoting
+!                          = ONE for (full) partial pivoting
+!                            Values between 0.0D0 and ONE yield
+!                            MA28 (partial) partial pivoting.
+!   NZSWAG                 = If you wish you may supply a guess,
+!                            NZSWAG, at the number of nonzeros
+!                            in the Jacobian matrix. In some cases
+!                            this will speed up the determination
+!                            of the necessary storage.
+!   USER_SUPPLIED_SPARSITY = .TRUE. if you wish to supply the sparsity
+!                            structure arrays directly by calling
+!                            USERSETS_IAJA
+!   MA28_ELBOW_ROOM        = Supply an integer greater than 2 if you
+!                            wish to increase the elbow room in the
+!                            MA28 work arrays (by MA28_ELBOW_ROOM * NZA).
+!   MC19_SCALING           = .TRUE. if you wish to invoke sparse scaling
+!                            of the Jacobian.
+!   MA28_MESSAGES          = .TRUE. to print all MA28 messages.
+!   MA28_EPS               = MA28 singularity threshold. If MA28BD
+!                            determines that the ratio of the current
+!                            pivot to the largest element in the row
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+!   MA28_RPS               = .TRUE. to force MA28AD to calculate a new
+!                            pivot sequence for use in MA28BD if a
+!                            singular iteration matrix is encountered
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+! USER_SUPPLIED_JACOBIAN   = exact Jacobian option
+!                            (requires user-supplied JAC)
+! SAVE_JACOBIAN            = reuse saved Jacobians
+! JACOBIAN_BY_JACSP        = use Doug Salane's Jacobian algorithm
+! TCRIT                    = critical time
+! H0                       = initial step size to try
+! HMAX                     = maximum allowable step size
+! HMIN                     = minimum allowable step size
+! MAXORD                   = maximum allowable integration order
+! MXSTEP                   = maximum number of integration steps
+!                            between calls to DVODE
+! MXHNIL                   = maximum number of printed messages
+!                            if the T+H=T condition occurs
+! CONSTRAINED              = array containing the indices of
+!                            solution components which are to be
+!                            be constrained by CLOWER and CUPPER.
+!                            The size of CONSTRAINED must be
+!                            positive and not exceed NEQ, the
+!                            number of ODEs. Each component of
+!                            CONSTRAINED must be between 1 and NEQ.
+! CLOWER, CUPPER           = lower and upper bound arrays for the.
+!                            solution. Each must be the same size
+!                            as the CONSTRAINED vector.
+! YMAGWARN                 = If .TRUE., a warning will be issued
+!                            before any return from DVODE for any
+!                            solution component whose magnitude
+!                            is smaller than the absolute error
+!                            tolerance for that component.
+!   User-callable Routines:
+!   The following routines may be called by the user:
+!   SET_OPTS      : Used to set options for DVODE_F90
+!   GET_STATS     : Used to gather summary integration
+!                   statistics following a successful
+!                   return from DVODE_F90
+!   DVINDY        : Used if the user wishes to interpolate
+!                   solution or derivative following a
+!                   successful return from DVODE_F90
+!   USERSETS_IAJA : Used if the user wishes to supply the
+!                   sparsity structure directly
+!   Detailed Description of SET_OPTS
+!   The following are defined in SET_OPTS:
+!   OPTS%MF     = Integration method flag (MF)
+!   OPTS%METH   = Integration family flag (METH)
+!   OPTS%MITER  = Iteration type flag (MITER)
+!   OPTS%MOSS   = Sparsity array type flag (MOSS)
+!   OPTS%ITOL   = Error tolerance flag (ITOL) (ITOL)
+!   OPTS%ATOL   = Absolute error tolerance(s) (ATOL)
+!   OPTS%RTOL   = Relative error tolerance(s) (RTOL)
+!   OPTS%DENSE  = Use dense linear algebra
+!   OPTS%BANDED = Use banded linear algebra 
+!   OPTS%SPARSE = Use sparse linear algebra 
+!   OPTS%IOPT   = DVODE optional parameter input flag (IOPT)
+!   OPTS%NG     = Number of event functions
+!   RUSER(1)    = TCRIT (don't step past)
+!   IUSER(1)    = Jacobian lower bandwidth (ML)
+!   IUSER(2)    = Jacobian upper bandwidth (MU)
+!   RUSER(5)    = Initial step size to try (H0)
+!   RUSER(6)    = Maximum allowable step size (HMAX)
+!   RUSER(7)    = Minimum allowable step size (HMIN)
+!   IUSER(5)    = Maximum allowable integration order (MAXORD)
+!   IUSER(6)    = Maximum number of integration steps (MXSTEP)
+!   IUSER(7)    = Maximum number of T+H=T messages (MXHNIL)
+!   NZ_SWAG     = Guess for the number of nonzeros in the
+!                 sparse Jacobian
+!   NG          = Number of user event functions
+!   BOUNDS,     = Nonnegativity information
+!   NDX, IDX
+!   YMAXWARN    = Warning flag for |y(t)| < abserr
+!   MA28_ELBOW_ROOM = Integer multiple by which to increase
+!                     the elbow room in the MA28 sparse work
+!                     arrays
+!   MC19_SCALING    = logical flag to control MC19 sparse
+!                     scaling of the Jacobian
+!   MA28_MESSAGES   = logical flag to control printing of MA28
+!                     messages.
+!   MA28_EPS        = real(wp) MA28 singularity threshold
+!
+!                         All Options
+!
+! METHOD_FLAG
+!
+! Default:   Not used
+! Change to: No need to specify if use one of next three parameters
+!            but can be changed to any value of the MF method flag
+!            in dvode.f77
+!
+! DENSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for dense linear algebra
+!
+! BANDED_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for banded linear algebra
+!
+! SPARSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for sparse linear algebra
+
+! USER_SUPPLIED_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if want to supply subroutine JAC to DVODE_F90
+!
+! SAVE_JACOBIAN
+!
+! Default:   .TRUE.
+! Change to: .FALSE. if do not want DVODE_F90 to reuse saved
+!            Jacobians
+!
+! JACOBIAN_BY_JACSP
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to approximate the Jacobian using Doug Salane's
+!            JACSP Jacobian subroutine
+!
+! CONSTANT_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if Jacobian is constant
+!
+! LOWER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Lower bandwidth if BANDED_J = .TRUE.
+!
+! UPPER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Upper bandwidth if BANDED_J = .TRUE.
+!
+! SUB_DIAGONALS
+!
+! Default:   Not used
+! Change to: Starting row locations for sub diagonals in
+!            banded Jacobian
+!
+! SUP_DIAGONALS
+!
+! Default:   Not used
+! Change to: Starting columns locations for super diagonals
+!            in banded Jacobian
+!
+! RELERR
+!
+! Default:   None
+! Change to: Specify a nonzero relative error tolerance
+!
+! RELERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of relative error tolerances
+!
+! ABSERR
+!
+! Default:   None
+! Change to: Specify a scalar absolute error tolerance or
+!            a vector of absolute error tolerances
+!
+! ABSERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of absolute error tolerances
+!
+! TCRIT
+!
+! Default:   Not used
+! Change to: Value of T which DVODE_F90 is not to step past
+!
+!     H0
+!
+! Default:   Determined by DVODE_F90
+! Change to: Guess for initial step size
+!
+! HMAX
+!
+! Default:   Infinity
+! Change to: Maximum allowable step size
+!
+! HMIN
+!
+! Default:   0.0D0
+! Change to: Minimum allowable step size
+!
+! MAXORD
+!
+! Default:   Determined by DVODE_F90
+! Change to: Maximum integration order
+!
+! MXSTEP
+!
+! Default:   5000
+!     Change to: Maximum number of steps between output points
+!
+! MXHNIL
+!
+! Default:   10
+! Change to: Maximum number of times T+H=T message will be printed
+!
+! YMAGWARN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to be warned when the magnitude of the
+!            solution is smaller than the absolute error tolerance
+!
+! SETH
+!
+! Default:   0.0D0
+! Change to: Threshold value below which Jacobian elements in the
+!            sparse Jacobian are considered to be zero
+!
+! UPIVOT
+!
+! Default:   1.0D0
+! Change to: partial pivoting factor between 0.0d0 and 1.0d0 to
+!            control the degree of partial pivoting used in sparse
+!            Gaussian Elimination
+!
+! NZSWAG
+!
+! Default:   Determined by DVODE_F90
+! Change to: Amount by which to increment sizes of sparse arrays
+!
+! USER_SUPPLIED_SPARSITY
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to call subroutine USERSETS_IAJA to
+!            define the sparse structure array pointers directly
+!
+! NEVENTS
+!
+! Default:   0
+! Change to: Number of event functions if wish to supply subroutine
+!            GFUN to DVODE_F90
+!
+! CONSTRAINED
+!
+! Default:   Bounds not imposed on solution
+! Change to: Array of indices for components on which to impose
+!            solution bounds
+!
+! CLOWER
+!
+! Default:   Not used
+! Change to: Vector containing lower bounds corresponding to
+!            CONSTRAINED
+!
+! CUPPER
+!
+! Default:   Not used
+! Change to: Vector containing upper bounds corresponding to
+!            CONSTRAINED
+!
+! MA28_ELBOW_ROOM
+!
+! Default:   2
+! Change to: Larger value to allow the sparse arrays more
+!            elbow room
+!
+! MC19_SCALING
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to invoke scaling of the sparse solution
+!
+! MA28_MESSAGES
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to have MA28 diagnostic messages written
+!            to unit 6
+!
+! MA28_EPS
+!
+! Default:   1.0D-4
+! Change to: Smaller positive value to allow the ratio of the
+!            magnitude of pivot elements and remaining row
+!            entries to be smaller before the iteration matrix
+!            is considered to be numerically singularity
+!
+! MA28_RPS
+!
+! Default:   .FALSE.
+! Change to: Redo the MA28AD sparse pivoting sequence any time
+!            MA28BD considers the iteration matrix to be
+!            numerically singularity
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+! For a sparse Jacobian, IA(J+1)-IA(J) is the number
+! of nonzeros in column change. JA(I) indicates the
+! rows in which the nonzeros occur. For column J,
+! the nonzeros occurs in rows I=JA(K) for K=I1,...,I2
+! where I1=IA(J) and I2= IA(J+1)-1. Load DF(I)/DY(J)
+! in PD(I). Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = IA(J)
+!       I2 = IA(J+1) - 1
+!       DO K = I1, I2
+!          I = JA(K)
+!          PD(I) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+!                    More on Sparsity Options
+!
+! Two facts of life regarding the use of direct sparse solvers are
+! (1) significant improvements are possible, and (2) the use of
+! direct sparse solvers often is more demanding of the user.
+! Although SET_NORMAL_OPTS provides modest provisions for solving
+! problems with sparse Jacobians, using SET_OPTS rather than
+! SET_NORMAL_OPTS provides several advanced options. These options
+! are described below. The recommended manner in which to use
+! these options is also provided. Note that each of these optional
+! parameters have default values and need not be specified in your
+! call to SET_OPTS if you wish to use the default values. Note
+! also that the order in which the options are specified in a call
+! to SET_OPTS is not important.
+!
+!  (1) First determine if it is feasible to use either the BANDED
+!      or DENSE Jacobian option.
+!         Recommendation:
+!         Use the DENSE or BANDED option if possible. They do
+!         not require use of most of the options described here.
+!    
+!  (2) The Jacobian is approximated internally using differences
+!      if you do not provide an analytic Jacobian. The option
+!      USER_SUPPLIED_JACOBIAN=.TRUE. may be used if you wish to
+!      provide an analytic Jacobian.
+!         Recommendation:
+!         Use an internally generated Jacobian for most problems
+!         but consider providing an analytic Jacobian if it not
+!         too much trouble.
+!
+!  (3) If you do not provide the sparse structure arrays, they
+!      are approximated internally by making NEQ calls to your
+!      derivative subroutine and using differences to approximate
+!      the structure of the Jacobian. The option
+!      USER_SUPPLIED_SPARSITY and a call to USERSETS_IAJA can
+!      be used to supply the arrays directly. You can also use
+!      subroutine SET_IAJA to approximate the structure using
+!      different perturbation factors than those used in DVODE_F90.
+!         Recommendations:
+!         Although allowing DVODE_F90 to approximate the Jacobian
+!         structure suffices for most problems, if you know the
+!         sparsity pattern provide it directly. This eliminates
+!         the possibility that an important element that happens
+!         to be 0 when the sparsity pattern is approximated is
+!         later nonzero; and it avoids the NEQ extra calls to
+!         your derivative subroutine to approximate the structure.
+!         Note that a nemesis for any sparse ode solver is a
+!         problem in which the sparsity pattern actually changes
+!         during the integration. An example of such a problem
+!         is provided in the demohum21.f90 demonstration program.
+!         If you know the sparsity pattern changes or if you
+!         suspect it does because DVODE_F90 is generating
+!         nonconvergence error messages, consider having DVODE_F90
+!         re-approximate the structure by calling SET_OPTS and
+!         forcing an integration restart when control is returned
+!         to your calling program. Please do not do this at every
+!         output point since it will be extremely time consuming
+!         and inefficient if it is not needed.
+!
+!  (4) The optional parameter UPIVOT is used to control the type
+!      of partial pivoting pivoting in MA28AD. UPIVOT=0.0D0
+!      corresponds to no pivoting; and UPIVOT=1.0D0 corresponds
+!      to partial pivoting. UPIVOT may be assigned any value
+!      between 0 and 1. The pivoting strategy used in MA28AD is
+!      to accept a pivot for which the magnitude of the pivot
+!      element is greater than or equal to UPIVOT times the
+!      magnitude of the largest remaining element in the pivot
+!      row. The default value is UPIVOT=1.DO
+!         Recommendation:
+!         Use the default value UPIVOT=1.0D0.
+!
+!  (5) The optional parameter NZSWAG may/should be used to speed
+!      up the determination of acceptable array sizes for the
+!      internal sparse working arrays and the sparse Jacobian.
+!      Initially, DVODE_F90 allocates arrays of length
+!      max(10*NEQ,NSZSWAG) and increases this amount by
+!      max(10*NEQ,ELBOW_ROOM*NSZSWAG) as necessary. NZSWAG
+!      has a default value of 1000 and ELBOW_ROOM has a default
+!      value of 2.
+!         Recommendation:
+!         Provide a larger value for NZSWAG particularly if NEQ
+!         is large and you suspect considerable fill-in due to
+!         partial pivoting.
+!
+!  (6) The optional parameter ELBOW_ROOM may be used to control
+!      the amount of "elbow room" needed in the MA28 sparse arrays.
+!      The default value is 2 but a larger value can sometimes
+!      speed up the determination of sparse array sizes.
+!         Recommendation:
+!         MA28 error and diagnostic messages are turned off by
+!         default. The optional parameter MA28_MESSAGES may be
+!         used to turn them on if it is assigned a nonzero value.
+!         If you see several messages that state that LIRN_ALL
+!         or LICN_ALL is too small and that additional storage
+!         is being allocated for another try, and you have
+!         provided a large value for NZSWAG, increase the size
+!         of ELBOW_ROOM.
+!
+!  (7) The optional parameter SETH may be assigned a nonzero value
+!      that represents a threshhold value for the magitude of
+!      elements in the Jacobian below which the element will be
+!      treated as being zero. The default value is SETH=0.0D0.
+!         Recommendation:
+!         Use the default value SETH=0.0D0.
+!
+!  (8) MA28AD determines the pivot sequence to be used in subsequent
+!      calls to MA28BD. When MA28BD is called it considers the
+!      iteration matrix to be numerically singular if the magnitude
+!      of the ratio of the largest remaining element in the pivot
+!      row to the pivot element is less than EPS. This condition
+!      can arise since MA28BD is using an out-of-date pivot sequence.
+!      The default value used is EPS=1.0D-4. A smaller value
+!      of EPS may be appropriate for some problems. The optional
+!      parameter MA28_EPS may be used to change the default value.
+!         Recommendation:
+!         Use the default value EPS=1.0D-4.
+!
+!  (9) Badly scaled Jacobians can cause problems for sparse solvers.
+!      The parameter MA28_SCALING may be set .TRUE. to instruct
+!      DVODE_F90 to scale the iteration matrix using MC19AD. This
+!      can positively impact the performance of MA28AD. The default
+!      setting is MA28_SCALING=.FALSE.
+!         Recommendation:
+!         Unless the solution is not successful, use the default
+!         setting for MA29_SCALING; but consider using scaling
+!         if you know the problem is badly scaled (e.g., if the
+!         magnitudes of the components differ greatly).
+!
+! (10) As mentioned above, MA28BD uses the pivot sequence initially
+!      determined by MA28AD. When a singularity is diagnosed, the
+!      internal procedure used by the DENSE and BANDED options is
+!      used to reduce the step size and re-calulate the iteration
+!      matrix. This works fine for most problems; but particularly
+!      for badly scaled problems, the solution may be unsuccessful
+!      or it may drag along using small step sizes. This is due
+!      to the fact MA28BD will continue to use the out-of-date pivot
+!      sequence until singularity is again diagnosed. An option not
+!      available in previous sparse ode solvers may be used to
+!      instruct DVODE_F90 to force MA28AD to calculate a new pivot
+!      sequence when MA28BD encounters a singularity. Although
+!      MA28AD is considerably slower than MA28BD, the additional
+!      calls to MA28AD ensure that the pivot sequence is more
+!      up to date. This can increase both the accuracy and the
+!      efficiency very dramatically. The demodirn.f90 demonstration
+!      program provides an illustration of the dramatic improvement
+!      that is possible. The optional parameter MA28_RPS may be set
+!      .TRUE. to force these pivot sequence updates.
+!         Recommendation:
+!         Use the default value MA28_RPS=.FALSE; but if DVODE_F90
+!         encounters nonconvergence, use MA28_RPS=.TRUE. to force
+!         pivot sequence updates. Note that use of this option
+!         will usually obviate the necessity to use the other
+!         options described above. Note that we decided not to
+!         use MA28_RPS=.TRUE. as default simply because other
+!         sparse ode solvers are averse to calling MA28AD more
+!         than is absolutely necessary for a given problem.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: ABSERR, H0, HMAX, HMIN,         &
+        MA28_EPS, RELERR, SETH, TCRIT, UPIVOT
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH, MAXORD,          &
+          MA28_ELBOW_ROOM, METHOD_FLAG, MXHNIL, MXSTEP, NEVENTS, NZSWAG,    &
+          UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, CHANGE_ONLY_f77_OPTIONS,&
+          CONSTANT_JACOBIAN, DENSE_J, JACOBIAN_BY_JACSP, MA28_MESSAGES,     &
+          MA28_RPS, MC19_SCALING, SAVE_JACOBIAN, SPARSE_J,                  &
+          USER_SUPPLIED_JACOBIAN, USER_SUPPLIED_SPARSITY, YMAGWARN
+! ..
+! .. Array Arguments ..
+        REAL (WP), OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:), RELERR_VECTOR(:)
+        REAL (WP), OPTIONAL :: CLOWER(:), CUPPER(:)
+        INTEGER, OPTIONAL, INTENT (IN) :: CONSTRAINED(:), SUB_DIAGONALS(:), &
+        SUP_DIAGONALS(:)
+! ..
+! .. Local Scalars ..
+        INTEGER ::  IER, IOPT, METH, MF, MFA, MFSIGN, MITER, ML, MOSS, MU,  &
+          NAE, NG, NRE
+        LOGICAL :: BANDED, DENSE, SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_OPTS
+! ..
+    RUSER(1:LRWUSER) = ZERO
+    IUSER(1:LIWUSER) = 0
+    
+!   Allow default error tolerances?
+    ALLOW_DEFAULT_TOLS = .FALSE.
+
+!   Maximum number of consecutive error test failures?
+    CONSECUTIVE_EFAILS = KFH
+
+!   Maximum number of consecutive corrector iteration failures?
+    CONSECUTIVE_CFAILS = MXNCF
+
+!   Use JACSP to approximate Jacobian?
+    USE_JACSP = .FALSE.
+    IF (PRESENT(JACOBIAN_BY_JACSP)) THEN
+       IF (JACOBIAN_BY_JACSP) USE_JACSP = .TRUE.
+    END IF
+
+!   If only f77 options are to be changed, do it and return.
+    IF (PRESENT(CHANGE_ONLY_f77_OPTIONS)) THEN
+       IF (CHANGE_ONLY_f77_OPTIONS) THEN
+          IF (.NOT.OPTS_CALLED) THEN
+             MSG = 'You have not previously called SET_OPTS before attempting'
+             CALL XERRDV(MSG,500,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'to change one or more of the vode.f77 optional parameters.'
+             CALL XERRDV(MSG,500,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(HMAX)) THEN
+             IOPT = 1
+             RUSER(6) = HMAX
+             MSG = 'HMAX changed in SET_OPTS.'
+             CALL XERRDV(MSG,510,1,0,0,0,1,HMAX,ZERO)
+          END IF
+          IF (PRESENT(HMIN)) THEN
+             IOPT = 1
+             RUSER(7) = HMIN
+             MSG = 'HMIN changed in SET_OPTS.'
+             CALL XERRDV(MSG,520,1,0,0,0,1,HMIN,ZERO)
+          END IF
+          IF (PRESENT(TCRIT)) THEN
+             IOPT = 1
+             RUSER(1) = TCRIT
+             MSG = 'TCRIT changed in SET_OPTS.'
+             CALL XERRDV(MSG,530,1,0,0,0,1,TCRIT,ZERO)
+          END IF
+          IF (PRESENT(MXSTEP)) THEN
+             IOPT = 1
+             IUSER(6) = MXSTEP
+             MSG = 'MXSTEP changed in SET_OPTS.'
+             CALL XERRDV(MSG,530,1,1,MXSTEP,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MAXORD)) THEN
+             IOPT = 1
+             IUSER(5) = MAXORD
+             MSG = 'MAXORD changed in SET_OPTS.'
+             CALL XERRDV(MSG,540,1,1,MAXORD,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MXHNIL)) THEN
+             IOPT = 1
+             IUSER(7) = MXHNIL
+             MSG = 'MXHNIL changed in SET_OPTS.'
+             CALL XERRDV(MSG,550,1,1,MXHNIL,0,0,ZERO,ZERO)
+          END IF
+       END IF
+       RETURN
+    END IF
+
+!   Set the flag to indicate that SET_OPTS has been called.
+    OPTS_CALLED = .TRUE.
+
+!   Set the MA48 storage cleanup flag.
+    MA48_WAS_USED = .FALSE.
+
+!   Set the fast factor option for MA48,
+    USE_FAST_FACTOR = .TRUE.
+
+!   Determine the working precision and define the value for UMAX
+!   expected by MA28. Note that it is different for single and
+!   double precision.
+    WPD = KIND(1.0D0)
+    WPS = KIND(1.0E0)
+    IF (WPD/=WP .AND. WPS/=WP) THEN
+      MSG = 'Illegal working precision in SET_OPTS.'
+      CALL XERRDV(MSG,560,2,0,0,0,0,ZERO,ZERO)
+    END IF
+    IF (WPD==WP) THEN
+!   Working precision is double.
+      UMAX = 0.999999999_WP
+    ELSE
+!     Working precision is single.
+      UMAX = 0.9999_WP
+    END IF
+
+!   Set the MA28 message flag.
+    IF (PRESENT(MA28_MESSAGES)) THEN
+       LP = 0
+       IF (MA28_MESSAGES) LP = 6
+    ELSE
+       LP = 0
+    END IF
+
+!   Set the MA28 singularity threshold.
+    IF (PRESENT(MA28_EPS)) THEN
+       IF (MA28_EPS > ZERO) THEN
+          EPS = MA28_EPS
+       ELSE
+          EPS = 1.0E-4_WP
+       END IF
+     ELSE
+       EPS = 1.0E-4_WP
+     END IF
+
+!   Set the MA28 pivot sequence frequency flag.
+    IF (PRESENT(MA28_RPS)) THEN
+       IF (MA28_RPS) THEN
+          REDO_PIVOT_SEQUENCE = MA28_RPS
+       ELSE
+          REDO_PIVOT_SEQUENCE = .FALSE.
+       END IF
+     ELSE
+       REDO_PIVOT_SEQUENCE = .FALSE.
+     END IF
+
+     MA28AD_CALLS = 0
+     MA28BD_CALLS = 0
+     MA28CD_CALLS = 0
+     MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!    MA48AD_CALLS = 0
+!    MA48BD_CALLS = 0
+!    MA48CD_CALLS = 0
+!_______________________________________________________________________
+     IRNCP = 0
+     ICNCP = 0
+     MINIRN = 0
+     MINICN = 0
+     MAX_MINIRN = 0
+     MAX_MINICN = 0
+     MAX_NNZ = 0
+
+!   Set the flag to warn the user if |(y(t)| < abserr.
+     IF (PRESENT(YMAGWARN)) THEN
+       IF (YMAGWARN) THEN
+         YMAXWARN = .TRUE.
+       ELSE
+         YMAXWARN = .FALSE.
+       END IF
+     ELSE
+       YMAXWARN = .FALSE.
+     END IF
+
+!    Load defaults for the optional input arrays for DVODE.
+     IUSER(1:8) = 0
+     RUSER(1:8) = ZERO
+
+!    Set the method flag.
+     IF (.NOT.(PRESENT(METHOD_FLAG))) THEN
+       MF = 10
+       IF (PRESENT(SPARSE_J)) THEN
+         IF (SPARSE_J) THEN
+           IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+             IF (USER_SUPPLIED_JACOBIAN) THEN
+               MF = 126
+             ELSE
+               MF = 227
+             END IF
+           ELSE
+             MF = 227
+           END IF
+           IF (PRESENT(USER_SUPPLIED_SPARSITY)) THEN
+             IF (USER_SUPPLIED_SPARSITY) THEN
+               MF = MF - 100*(MF/100)
+             END IF
+           END IF
+           IF (PRESENT(SAVE_JACOBIAN)) THEN
+             IF (.NOT.SAVE_JACOBIAN) THEN
+               MF = -MF
+             END IF
+           END IF
+          END IF
+          END IF
+
+          IF (PRESENT(BANDED_J)) THEN
+            IF (BANDED_J) THEN
+              IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+                IF (USER_SUPPLIED_JACOBIAN) THEN
+                  MF = 24
+                ELSE
+                  MF = 25
+                END IF
+              ELSE
+                MF = 25
+              END IF
+              IF (PRESENT(SAVE_JACOBIAN)) THEN
+                IF (.NOT.SAVE_JACOBIAN) THEN
+                  MF = -MF
+                END IF
+              END IF
+            END IF
+          END IF
+
+          IF (PRESENT(DENSE_J)) THEN
+            IF (DENSE_J) THEN
+              IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+                IF (USER_SUPPLIED_JACOBIAN) THEN
+                  MF = 21
+                ELSE
+                  MF = 22
+                END IF
+              ELSE
+                MF = 22
+              END IF
+              IF (PRESENT(SAVE_JACOBIAN)) THEN
+                IF (.NOT.SAVE_JACOBIAN) THEN
+                  MF = -MF
+                END IF
+              END IF
+            END IF
+          END IF
+     ELSE
+       MF = METHOD_FLAG
+     END IF
+
+!    Check for errors in MF.
+     MFA = IABS(MF)
+     MOSS = MFA/100
+     METH = (MFA-100*MOSS)/10
+     MITER = MFA - 100*MOSS - 10*METH
+     IF (METH<1 .OR. METH>2) THEN
+       MSG = 'Illegal value of METH in SET_OPTS.'
+       CALL XERRDV(MSG,570,2,0,0,0,0,ZERO,ZERO)
+     END IF
+     IF (MITER<0 .OR. MITER>7) THEN
+       MSG = 'Illegal value of MITER in SET_OPTS.'
+       CALL XERRDV(MSG,580,2,0,0,0,0,ZERO,ZERO)
+     END IF
+     IF (MOSS<0 .OR. MOSS>2) THEN
+       MSG = 'Illegal value of MOSS in SET_OPTS.'
+       CALL XERRDV(MSG,580,2,0,0,0,0,ZERO,ZERO)
+     END IF
+
+!    Reset MF, now that MOSS is known.
+     MFSIGN = SIGN(1,MF)
+     MF = MF - 100*MOSS*MFSIGN
+
+     IF (MITER==0) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==1 .OR. MITER==2) THEN
+       DENSE = .TRUE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==3) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==4 .OR. MITER==5) THEN
+       DENSE = .FALSE.
+       BANDED = .TRUE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==6 .OR. MITER==7) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .TRUE.
+     END IF
+
+!    Define the banded Jacobian band widths.
+     IF (BANDED) THEN
+       IF (PRESENT(LOWER_BANDWIDTH)) THEN
+         ML = LOWER_BANDWIDTH
+         IUSER(1) = ML
+       ELSE
+         MSG = 'In SET_OPTS you have indicated a'
+         CALL XERRDV(MSG,590,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'banded Jacobian but you have not'
+         CALL XERRDV(MSG,590,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'supplied the lower bandwidth.'
+         CALL XERRDV(MSG,590,2,0,0,0,0,ZERO,ZERO)
+       END IF
+       IF (PRESENT(UPPER_BANDWIDTH)) THEN
+         MU = UPPER_BANDWIDTH
+         IUSER(2) = MU
+       ELSE
+         MSG = 'In SET_OPTS you have indicated a'
+         CALL XERRDV(MSG,600,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'banded Jacobian but you have not'
+         CALL XERRDV(MSG,600,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'supplied the upper bandwidth.'
+         CALL XERRDV(MSG,600,2,0,0,0,0,ZERO,ZERO)
+       END IF
+!      Define the nonzero diagonals.
+       BNGRP = 0
+       SUBS = .FALSE.
+       SUPS = .FALSE.
+       NSUBS  = 0
+       NSUPS = 0
+       IF (PRESENT(SUB_DIAGONALS)) THEN
+         SUBS = .TRUE.
+         NSUBS = SIZE(SUB_DIAGONALS)
+         IF (NSUBS > 0) THEN
+            IF (ALLOCATED(SUBDS)) THEN
+               DEALLOCATE(SUBDS,STAT=IER)
+               CALL CHECK_STAT(IER,80)
+            END IF
+            ALLOCATE(SUBDS(NSUBS),STAT=IER)
+            CALL CHECK_STAT(IER,90)
+            SUBDS(1:NSUBS) = SUB_DIAGONALS(1:NSUBS)
+         ELSE
+            IF (ML > 0) THEN
+               MSG = 'You must indicated that the lower bandwidth'
+               CALL XERRDV(MSG,610,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'is positive but you have not specified the'
+               CALL XERRDV(MSG,610,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'indices for the lower sub diagonals.'
+               CALL XERRDV(MSG,610,2,0,0,0,0,ZERO,ZERO)
+            END IF
+         END IF
+       END IF
+       IF (PRESENT(SUP_DIAGONALS)) THEN
+         SUPS = .TRUE.
+         NSUPS = SIZE(SUP_DIAGONALS)
+         IF (NSUPS > 0) THEN
+            IF (ALLOCATED(SUPDS)) THEN
+               DEALLOCATE(SUPDS,STAT=IER)
+               CALL CHECK_STAT(IER,100)
+            END IF
+            ALLOCATE(SUPDS(NSUPS),STAT=IER)
+            CALL CHECK_STAT(IER,110)
+            SUPDS(1:NSUPS) = SUP_DIAGONALS(1:NSUPS)
+         ELSE
+            IF (ML > 0) THEN
+               MSG = 'You must indicated that the upper bandwidth'
+               CALL XERRDV(MSG,620,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'is positive but you have not specified the'
+               CALL XERRDV(MSG,620,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'indices for the upper sub diagonals.'
+               CALL XERRDV(MSG,620,2,0,0,0,0,ZERO,ZERO)
+            END IF
+         END IF
+       END IF
+     END IF
+
+!    Define the sparse Jacobian options.
+     SCALE_MATRIX = .FALSE.
+     ELBOW_ROOM = 2
+     IF (SPARSE) THEN
+!      NZSWAG for the number of nonzeros in the Jacobian.
+       IF (PRESENT(NZSWAG)) THEN
+         NZ_SWAG = MAX(NZSWAG,0)
+       ELSE
+         NZ_SWAG = 0
+       END IF
+!      Indicate that SET_IAJA has not yet been called successfully.
+       IAJA_CALLED = .FALSE.
+!      Check for illegal method flags.
+       IF (MOSS==2 .AND. MITER/=7) THEN
+         MSG = 'In SET_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,630,2,0,0,0,0,ZERO,ZERO)
+         END IF
+         IF (MOSS==1 .AND. MITER/=6) THEN
+           MSG = 'In SET_OPTS MOSS=1 but MITER is not 6.'
+           CALL XERRDV(MSG,640,2,0,0,0,0,ZERO,ZERO)
+         END IF
+!        IF (MOSS==0 .AND. MITER/=7) THEN
+!          MSG = 'In SET_OPTS MOSS=0 but MITER is not 7.'
+!          CALL XERRDV(MSG,650,2,0,0,0,0,ZERO,ZERO)
+!        END IF
+!        Allow the work array elbow room to be increased.
+         IF (PRESENT(MA28_ELBOW_ROOM)) THEN
+            ELBOW_ROOM = MAX(MA28_ELBOW_ROOM, ELBOW_ROOM)
+         END IF
+!      Allow MC19 scaling for the Jacobian.
+       SCALE_MATRIX = .FALSE.
+       IF (PRESENT(MC19_SCALING)) THEN
+          IF (MC19_SCALING) THEN
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!         IF (USE_MA48_FOR_SPARSE) THEN
+!            MSG = 'MC29AD scaling is not available at this time.'
+!            CALL XERRDV(MSG,660,1,0,0,0,0,ZERO,ZERO)
+!            MSG = 'Execution will continue.'
+!            CALL XERRDV(MSG,660,1,0,0,0,0,ZERO,ZERO)
+!         END IF
+!_______________________________________________________________________
+             SCALE_MATRIX = MC19_SCALING
+!            SCALE_MATRIX = .FALSE.
+          END IF
+       END IF
+
+!_______________________________________________________________________
+! *****MA48 build change point. Replace above with these statements.
+!      IF (PRESENT(MC19_SCALING)) THEN
+!         IF (MC19_SCALING) THEN
+!            IF (USE_MA48_FOR_SPARSE) THEN
+!               MSG = 'Please note that this version uses MC19AD rather'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!               MSG = 'than MC29AD to sacle the iteration matrix.'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!               MSG = 'Execution will continue.'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!            END IF
+!            SCALE_MATRIX = MC19_SCALING
+!         END IF
+!       END IF
+!_______________________________________________________________________
+
+       END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       Process the constrained solution components.
+        IF (PRESENT(CONSTRAINED)) THEN
+          NDX = SIZE(CONSTRAINED)
+          IF (NDX<1) THEN
+            MSG = 'In SET_OPTS the size of CONSTRAINED < 1.'
+            CALL XERRDV(MSG,680,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (.NOT.(PRESENT(CLOWER)) .OR. .NOT.(PRESENT(CUPPER))) THEN
+            MSG = 'In SET_OPTS the arrays CLOWER and CUPPER are'
+            CALL XERRDV(MSG,690,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'not present.'
+            CALL XERRDV(MSG,690,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (SIZE(CLOWER)/=NDX .OR. SIZE(CUPPER)/=NDX) THEN
+            MSG = 'In SET_OPTS the size of the solution bound arrays'
+            CALL XERRDV(MSG,700,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'must be the same as the CONSTRAINED array.'
+            CALL XERRDV(MSG,700,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Note: The contents of CONSTRAINED will be checked
+!         in subroutine DVODE after NEQ is known.
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,120)
+          END IF
+          ALLOCATE (IDX(NDX),LB(NDX),UB(NDX),STAT=IER)
+          CALL CHECK_STAT(IER,130)
+          IDX(1:NDX) = CONSTRAINED(1:NDX)
+          LB(1:NDX) = CLOWER(1:NDX)
+          UB(1:NDX) = CUPPER(1:NDX)
+          BOUNDS = .TRUE.
+        ELSE
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,140)
+          END IF
+          NDX = 0
+          BOUNDS = .FALSE.
+        END IF
+
+!       Is the Jacobian constant?
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!_______________________________________________________________________
+        IF (PRESENT(CONSTANT_JACOBIAN)) THEN
+           IF (CONSTANT_JACOBIAN) THEN
+              J_IS_CONSTANT = .TRUE.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+              IF (USE_MA48_FOR_SPARSE .AND. SPARSE) THEN
+                 MSG = 'The constant Jacobian option is not yet available'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'with the sparse MA48 solution option. Execution'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'will continue.'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 J_IS_CONSTANT = .FALSE.
+              END IF
+!_______________________________________________________________________
+           END IF
+        END IF
+! *****MA48 build change point. Replace above with these statements.
+!       IF (PRESENT(CONSTANT_JACOBIAN)) THEN
+!          IF (CONSTANT_JACOBIAN) THEN
+!             IF (USE_MA48_FOR_SPARSE) THEN
+!                MSG = 'The constant Jacobian option is not yet available'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!                MSG = 'with the sparse MA48 solution option. Execution'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!                MSG = 'will continue.'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!             END IF
+!          ELSE
+!             J_IS_CONSTANT = .TRUE.
+!          END IF
+!       END IF
+!_______________________________________________________________________
+        IF (J_IS_CONSTANT) THEN
+           IF (PRESENT(SAVE_JACOBIAN)) THEN
+              IF (.NOT.SAVE_JACOBIAN) THEN
+                 MSG = 'You have specified that the Jacobian is constant.'
+                 CALL XERRDV(MSG,730,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'In this case you cannot also specify that'
+                 CALL XERRDV(MSG,730,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'SAVE_JACOBIAN=.FALSE.'
+                 CALL XERRDV(MSG,730,2,0,0,0,0,ZERO,ZERO)
+              END IF
+           END IF
+           IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN .AND. SPARSE) THEN
+                 MSG = 'You have specified that the Jacobian is constant'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'and that you wish to supply an analytic Jacobian'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'for a sparse problem. In this case your request'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'to use a constant Jacobian will be ignored.'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'Execution will continue.'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+              END IF
+           END IF
+        END IF
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+!       Process the miscellaneous options.
+
+!       Don't step past TCRIT variable.
+        IF (PRESENT(TCRIT)) THEN
+          RUSER(1) = TCRIT
+        ELSE
+          RUSER(1) = ZERO
+        END IF
+
+!       DVODE optional parameters.
+        IOPT = 1
+        IF (PRESENT(MAXORD)) THEN
+          IUSER(5) = MAXORD
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXHNIL)) THEN
+          IUSER(7) = MXHNIL
+          IOPT = 1
+        END IF
+        IF (PRESENT(H0)) THEN
+          RUSER(5) = H0
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          IOPT = 1
+        END IF
+        IF (PRESENT(SETH)) THEN
+          RUSER(8) = SETH
+          IOPT = 1
+        END IF
+        IF (PRESENT(UPIVOT)) THEN
+          U_PIVOT = UPIVOT
+          IF (U_PIVOT<ZERO) U_PIVOT = ZERO
+          IF (U_PIVOT>ONE) U_PIVOT = ONE
+        ELSE
+          U_PIVOT = ONE
+        END IF
+!_______________________________________________________________________
+! *****MA48 build change point. Insert this statement.
+!       COPY_OF_U_PIVOT = U_PIVOT
+!_______________________________________________________________________
+        OPTS%IOPT = IOPT
+
+!       Define the error tolerances.
+
+!       Relative error tolerances.
+        IF (PRESENT(RELERR_VECTOR)) THEN
+          IF (MINVAL(RELERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of RELERR_VECTOR must'
+            CALL XERRDV(MSG,750,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,750,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NRE = SIZE(RELERR_VECTOR)
+        ELSE
+          NRE = 1
+        END IF
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,150)
+        IF (PRESENT(RELERR_VECTOR)) THEN
+          OPTS%RTOL = RELERR_VECTOR
+        ELSE IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,760,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_WP
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,780,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerances.
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,790,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,790,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,160)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,800,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,820,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,820,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,820,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+!            3   array    scalar  RTOL(i)*ABS(Y(i)) + ATOL
+!            4   array    array   RTOL(i)*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (PRESENT(RELERR_VECTOR)) THEN
+            OPTS%ITOL = 4
+          ELSE
+            OPTS%ITOL = 2
+          END IF
+        ELSE
+          IF (PRESENT(RELERR_VECTOR)) THEN
+            OPTS%ITOL = 3
+          ELSE
+            OPTS%ITOL = 1
+          END IF
+        END IF
+        RETURN
+
+  END FUNCTION SET_OPTS
+!_______________________________________________________________________
+
+      SUBROUTINE GET_STATS(RSTATS,ISTATS,NUMEVENTS,JROOTS)
+! ..
+! Return the user portions of the DVODE RUSER and IUSER arrays;
+! and if root finding is being done, return the JROOT vector
+! (not called by DVODE_F90).
+! ..
+! Available Integration Statistics.
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (e(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! MA28AD_CALLS      IUSER(23) The number of calls made to MA28AD
+! MA28BD_CALLS      IUSER(24) The number of calls made to MA28BD
+! MA28CD_CALLS      IUSER(25) The number of calls made to MA28CD
+! MC19AD_CALLS      IUSER(26) The number of calls made to MC19AD
+! IRNCP             IUSER(27) The number of compressions done on array JAN
+! ICNCP             IUSER(28) The number of compressions done on array ICN
+! MINIRN            IUSER(29) Minimum size for JAN array
+! MINICN            IUSER(30) Minimum size for ICN array
+! JROOTS  JROOTS    Optional array of component indices for components
+!                   having a zero at the current time
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, OPTIONAL, INTENT (IN) :: NUMEVENTS
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: RSTATS(22)
+        INTEGER, INTENT (INOUT) :: ISTATS(31)
+        INTEGER, OPTIONAL, INTENT (INOUT) :: JROOTS(:)
+! ..
+! .. Local Scalars ..
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, PRESENT, SIZE
+! ..
+!   Caution:
+!   It is assumed that the size of RSTATS is 22.
+!   It is assumed that the size of ISTATS is 31.
+!   Refer to the documentation prologue for a description
+!   the optional output contained in RUSER and IUSER.
+! ..
+! .. FIRST EXECUTABLE STATEMENT GET_STATS
+! ..
+!       Check if DVODE_F90 has been called yet.
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have called GET_STATS before'
+          CALL XERRDV(MSG,830,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling DVODE_F90 the first time.'
+          CALL XERRDV(MSG,830,1,0,0,0,0,ZERO,ZERO)
+          RETURN
+        END IF
+
+!       Check that the arrays are large enough to hold the statistics.
+!       Some compilers don't like this use of SIZE.
+!       IF (SIZE(RSTATS)<LRWUSER) THEN
+!       IF (SIZE(RSTATS)<31) THEN
+!         MSG = 'In GET_STATS, RSTATS array is too small.'
+!         CALL XERRDV(MSG,840,1,0,0,0,0,ZERO,ZERO)
+!         RETURN
+!       END IF
+!       IF (SIZE(ISTATS)<LIWUSER) THEN
+!       IF (SIZE(ISTATS)<31) THEN
+!         MSG = 'In GET_STATS, ISTATS array is too small.'
+!         CALL XERRDV(MSG,850,1,0,0,0,0,ZERO,ZERO)
+!         RETURN
+!       END IF
+
+!       Copy the statistics.
+        RSTATS(1:LRWUSER) = RUSER(1:LRWUSER)
+!       ISTATS(1:LIWUSER) = IUSER(1:LIWUSER)
+        ISTATS(1:22) = IUSER(1:22)
+        ISTATS(23) = MA28AD_CALLS
+        ISTATS(24) = MA28BD_CALLS
+        ISTATS(25) = MA28CD_CALLS
+!_______________________________________________________________________
+! *****MA48 build change point.Replace the three previous statements
+!      with these statements.
+!       IF (USE_MA48_FOR_SPARSE) THEN
+!          ISTATS(23) = MA48AD_CALLS
+!          ISTATS(24) = MA48BD_CALLS
+!          ISTATS(25) = MA48CD_CALLS
+!       ELSE
+!          ISTATS(23) = MA28AD_CALLS
+!          ISTATS(24) = MA28BD_CALLS
+!          ISTATS(25) = MA28CD_CALLS
+!       END IF
+!_______________________________________________________________________
+        ISTATS(26) = MC19AD_CALLS
+        ISTATS(27) = IRNCP
+        ISTATS(28) = ICNCP
+!       ISTATS(29) = MINIRN
+!       ISTATS(30) = MINICN
+!       ISTATS(31) = NZ_ALL
+        ISTATS(29) = MAX_MINIRN
+        ISTATS(30) = MAX_MINICN
+        ISTATS(31) = MAX_NNZ
+!       If root finding is being used return the JROOT vector.
+        IF (PRESENT(NUMEVENTS)) THEN
+          IF (PRESENT(JROOTS)) THEN
+            IF (ALLOCATED(JROOT)) THEN
+              JROOTS(1:NUMEVENTS) = JROOT(1:NUMEVENTS)
+            END IF
+          END IF
+        END IF
+        RETURN
+
+      END SUBROUTINE GET_STATS
+!_______________________________________________________________________
+
+      SUBROUTINE USERSETS_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+! ..
+! Approximate or allow the user to supply the sparse Jacobian
+! structure pointer arrays IA and JA directly for DVODE_F90
+! (not called by DVODE_F90).
+! ..
+! Used if the user wishes to supply the sparsity structure
+! directly.
+!     Caution:
+!     If it is called, USERSETS_IAJA must be called after the
+!     call to SET_OPTS.
+!     Usage:
+!     CALL SET_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!     Arguments:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+!     Results:
+!     IA(IADIM), IADIM, JA(JADIM), JAMIN, SPARSE
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NIAUSER, NJAUSER
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IAUSER(NIAUSER), JAUSER(NJAUSER)
+! ..
+! .. Local Scalars ..
+        INTEGER :: JER
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED
+! ..
+! .. FIRST EXECUTABLE STATEMENT USERSETS_IAJA
+! ..
+!       Check that SET_OPTS has been called:
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,860,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling USERSETS_IAJA.'
+          CALL XERRDV(MSG,860,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        SPARSE = .FALSE.
+        IAJA_CALLED = .FALSE.
+        IADIM = NIAUSER
+        JADIM = NJAUSER
+        IF (ALLOCATED(IA)) THEN
+          DEALLOCATE (IA,JA,STAT=JER)
+          CALL CHECK_STAT(JER,170)
+        END IF
+        ALLOCATE (IA(IADIM),JA(JADIM),STAT=JER)
+        IF (JER/=0) THEN
+          MSG = 'Check your values of NIAUSER and NJAUSER'
+          CALL XERRDV(MSG,870,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'in your call to USERSETS_IAJA.'
+          CALL XERRDV(MSG,870,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        CALL CHECK_STAT(JER,180)
+        IA(1:IADIM) = IAUSER(1:IADIM)
+        JA(1:JADIM) = JAUSER(1:JADIM)
+!       Set the flags to indicate to DVODE_F90 that IA and JA have
+!       been loaded successfully.
+        SPARSE = .TRUE.
+        IAJA_CALLED = .TRUE.
+        RETURN
+
+      END SUBROUTINE USERSETS_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+        JAUSER,NJAUSER)
+! ..
+!     Approximate or allow the user to supply the sparse Jacobian
+!     structure pointer arrays IA and JA for DVODE_F90 (not called
+!     by DVODE_F90).
+! ..
+!     Caution:
+!     If it is called, SET_IAJA must be called after the call to
+!     SET_OPTS.
+!     Usage:
+!     SET_IAJA may be called in one of two ways:
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB)
+!       In this case IA and JA will be determined using calls
+!       to your derivative routine DFN.
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+!       JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!       T, Y, FMIN, NTURB, and DTURB will be ignored (though
+!       they must be present in the argument list).
+!
+!     Arguments:
+!     DFN     = VODE derivative subroutine
+!     NEQ     = Number of odes
+!     T       = independent variable t
+!     Y       = solution y(t)
+!     FMIN    = Jacobian threshold value. Elements of the Jacobian
+!               with magnitude smaller than FMIN will be ignored.
+!               FMIN will be ignored if it is less than or equal
+!               to ZERO.
+!     NTURB   = Perturbation flag. If NTURB=1, component I of Y
+!               will be perturbed by by 1.01D0.
+!               If NTURB=NEQ, component I of Y will be perturbed
+!               by ONE + DTURB(I).
+!     DTURB   = perturbation vector of length 1 or NEQ.
+!     If these four optional parameters are present, IAUSER and JAUSER
+!     will be copied to IA and JA rather than making derivative calls
+!     to approximate IA and JA:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+!     Results:
+!     IA(IADIM), IADIM, IMIN, JA(JADIM), JAMIN, JMIN, SPARSE
+!     Allocated but free for further use by DVODE_F90:
+!     FTEMP(NEQ), FPTEMP(NEQ)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: FMIN, T
+        INTEGER, INTENT (IN) :: NEQ, NTURB
+        INTEGER, OPTIONAL, INTENT (IN) :: NIAUSER, NJAUSER
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: DTURB(*), Y(NEQ)
+        INTEGER, OPTIONAL, INTENT (IN) :: IAUSER(:), JAUSER(:)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL DFN
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AIJ, DTRB, EMIN, RJ, YJ, YJSAVE, YPJ
+        INTEGER :: I, J, JER, JP1, K, MTURB
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, EPSILON, MAX, MIN, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_IAJA
+! ..
+        SPARSE = .FALSE.
+        IAJA_CALLED = .FALSE.
+        IF (NEQ<1) GOTO 30
+
+!       Check if the user is supplying the IA and JA arrays.
+        IF (PRESENT(IAUSER)) THEN
+!         If IAUSER is present, so must be NIAUSER, JAUSER,
+!         and NJAUSER.
+          IF (.NOT.(PRESENT(NIAUSER))) GOTO 30
+          IF (.NOT.(PRESENT(JAUSER))) GOTO 30
+          IF (.NOT.(PRESENT(NJAUSER))) GOTO 30
+          IF (NIAUSER<NEQ+1 .OR. NJAUSER<1) GOTO 30
+          IADIM = MIN(NIAUSER,NEQ+1)
+          IMIN = IADIM
+          JADIM = NJAUSER
+          JMIN = NJAUSER
+          IF (ALLOCATED(IA)) THEN
+            DEALLOCATE (IA,JA,FTEMP,FPTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,190)
+          END IF
+          ALLOCATE (IA(IADIM),JA(JADIM),FTEMP(NEQ),FPTEMP(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,200)
+          IA(1:IADIM) = IAUSER(1:IADIM)
+          JA(1:JADIM) = JAUSER(1:JADIM)
+          GOTO 40
+        END IF
+
+!       Determine IA and JA using derivative calls.
+
+!       Jacobian element magnitude threshold value.
+        IF (FMIN>ZERO) THEN
+          EMIN = MAX(FMIN,ZERO)
+        ELSE
+          EMIN = ZERO
+        END IF
+
+!       Solution perturbation factors.
+        IF (NTURB>0) THEN
+          IF (NTURB<1 .OR. (NTURB>1 .AND. NTURB/=NEQ)) GOTO 30
+          IF (NTURB==NEQ) THEN
+            DO I = 1, NEQ
+              DTURB(I) = MAX(DTURB(I),HUNDRETH)
+            END DO
+          ELSE
+            MTURB = 1
+            DTRB = MAX(DTURB(1),HUNDRETH)
+          END IF
+        ELSE
+          MTURB = 1
+          DTRB = HUNDRETH
+        END IF
+
+        JADIM = MIN(NEQ*NEQ,MAX(1000,NZ_SWAG))
+        ADDTOJA = MAX(1000,NZ_SWAG)
+!       Loop point for array allocation.
+10      CONTINUE
+        IF (ALLOCATED(IA)) THEN
+          DEALLOCATE (IA,JA,FTEMP,FPTEMP,STAT=JER)
+          CALL CHECK_STAT(JER,210)
+        END IF
+        IMIN = NEQ + 1
+        IADIM = NEQ + 1
+        JMIN = 0
+        JADIM = JADIM + ADDTOJA
+        IF (JADIM>MAX_ARRAY_SIZE) THEN
+          MSG = 'Maximum array size exceeded. Stopping.'
+          CALL XERRDV(MSG,880,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        ALLOCATE (IA(IADIM),JA(JADIM),FTEMP(NEQ),FPTEMP(NEQ),STAT=JER)
+        CALL CHECK_STAT(JER,220)
+
+!       f = y'(t,y).
+        CALL DFN(NEQ,T,Y,FTEMP)
+        IA(1) = 1
+        K = 1
+
+!       Calculate unit roundoff and powers of it used if JACSP
+!       is used.
+        UROUND = EPSILON(ONE)
+
+!       Successively perturb each of the solution components and
+!       calculate the corresponding derivatives.
+        DO J = 1, NEQ
+          IF (MTURB==NEQ) DTRB = DTURB(J)
+          YJ = Y(J)
+          YJSAVE = YJ
+          IF (ABS(YJ)<=ZERO) YJ = HUN*UROUND
+          YPJ = YJ*(ONE+DTRB)
+          RJ = ABS(YPJ-YJ)
+          IF (ABS(RJ)<=ZERO) RJ = HUN*UROUND
+          IF (ABS(RJ)<=ZERO) GOTO 30
+          Y(J) = YPJ
+          CALL DFN(NEQ,T,Y,FPTEMP)
+          DO 20 I = 1, NEQ
+!           Estimate the Jacobian element.
+            AIJ = ABS(FPTEMP(I)-FTEMP(I))/RJ
+            IF ((AIJ<=EMIN) .AND. (I/=J)) GOTO 20
+!           Need more storage for JA.
+            IF (K>JADIM) GOTO 10
+            JMIN = K
+            JA(K) = I
+            K = K + 1
+20        CONTINUE
+          JP1 = J + 1
+          IA(JP1) = K
+          Y(J) = YJSAVE
+        END DO
+        GOTO 40
+30      CONTINUE
+        MSG = 'An error occurred in subroutine SET_IAJA.'
+        CALL XERRDV(MSG,890,2,0,0,0,0,ZERO,ZERO)
+
+40      CONTINUE
+!       Set the flags to indicate to DVODE_F90 that IA and JA have
+!       been calculated successfully.
+        SPARSE = .TRUE.
+        IAJA_CALLED = .TRUE.
+
+!       Trim JA.
+        ALLOCATE (JATEMP(JMIN),STAT=JER)
+        CALL CHECK_STAT(JER,230)
+        JATEMP(1:JMIN) = JA(1:JMIN)
+        DEALLOCATE (JA,STAT=JER)
+        CALL CHECK_STAT(JER,240)
+        ALLOCATE (JA(JMIN),STAT=JER)
+        CALL CHECK_STAT(JER,250)
+        JA(1:JMIN) = JATEMP(1:JMIN)
+        DEALLOCATE (JATEMP,STAT=JER)
+        CALL CHECK_STAT(JER,260)
+        JADIM = JMIN
+        RETURN
+
+      END SUBROUTINE SET_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JAC,GFUN)
+! ..
+! This is the core driver (modified original DVODE.F driver).
+! ..
+! The documentation prologue was moved nearer the top of the file.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Structure Arguments ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (INOUT) :: T, TOUT
+        INTEGER, INTENT (INOUT) :: ISTATE
+        INTEGER, INTENT (IN) :: ITASK, NEQ
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: Y(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, GFUN, JAC
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: ATOLI, BIG, EWTI, H0, HMAX, HMX, RH, RTOLI, SIZEST, &
+          TCRIT, TNEXT, TOLSF, TP
+        INTEGER :: I, IER, IFLAG, IMXER, IOPT, IPCUTH, IRFP, IRT, ITOL, JCO, &
+          JER, KGO, LENIW, LENJ, LENP, LENRW, LENWM, LF0, MBAND, MF, MFA, ML, &
+          MU, NG, NITER, NSLAST
+        LOGICAL :: IHIT
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! The following internal PRIVATE variable blocks contain variables which
+! are communicated between subroutines in the DVODE package, or which
+! are to be saved between calls to DVODE.
+! In each block, real variables precede integers.
+! The variables stored in the internal PRIVATE variable blocks are as
+! follows:
+! ACNRM  = Weighted r.m.s. norm of accumulated correction vectors.
+! CCMXJ  = Threshhold on DRC for updating the Jacobian. (See DRC.)
+! CONP   = The saved value of TQ(5).
+! CRATE  = Estimated corrector convergence rate constant.
+! DRC    = Relative change in H*RL1 since last DVJAC call.
+! EL     = Real array of integration coefficients. See DVSET.
+! ETA    = Saved tentative ratio of new to old H.
+! ETAMAX = Saved maximum value of ETA to be allowed.
+! H      = The step size.
+! HMIN   = The minimum absolute value of the step size H to be used.
+! HMXI   = Inverse of the maximum absolute value of H to be used.
+!          HMXI = 0.0 is allowed and corresponds to an infinite HMAX.
+! HNEW   = The step size to be attempted on the next step.
+! HSCAL  = Stepsize in scaling of YH array.
+! PRL1   = The saved value of RL1.
+! RC     = Ratio of current H*RL1 to value on last DVJAC call.
+! RL1    = The reciprocal of the coefficient EL(2).
+! TAU    = Real vector of past NQ step sizes, length 13.
+! TQ     = A real vector of length 5 in which DVSET stores constants
+!          used for the convergence test, the error test, and the
+!          selection of H at a new order.
+! TN     = The independent variable, updated on each step taken.
+! UROUND = The machine unit roundoff. The smallest positive real number
+!          such that  1.0 + UROUND /= 1.0
+! ICF    = Integer flag for convergence failure in DVNLSD:
+!            0 means no failures.
+!            1 means convergence failure with out of date Jacobian
+!                   (recoverable error).
+!            2 means convergence failure with current Jacobian or
+!                   singular matrix (unrecoverable error).
+! INIT   = Saved integer flag indicating whether initialization of the
+!          problem has been done (INIT = 1) or not.
+! IPUP   = Saved flag to signal updating of Newton matrix.
+! JCUR   = Output flag from DVJAC showing Jacobian status:
+!            JCUR = 0 means J is not current.
+!            JCUR = 1 means J is current.
+! JSTART = Integer flag used as input to DVSTEP:
+!            0  means perform the first step.
+!            1  means take a new step continuing from the last.
+!           -1  means take the next step with a new value of MAXORD,
+!               HMIN, HMXI, N, METH, MITER, and/or matrix parameters.
+!          On return, DVSTEP sets JSTART = 1.
+! JSV    = Integer flag for Jacobian saving, = sign(MF).
+! KFLAG  = A completion code from DVSTEP with the following meanings:
+!               0      the step was successful.
+!              -1      the requested error could not be achieved.
+!              -2      corrector convergence could not be achieved.
+!              -3, -4  fatal error in DVNLSD(can not occur here).
+! KUTH   = Input flag to DVSTEP showing whether H was reduced by the
+!          driver. KUTH = 1 if H was reduced, = 0 otherwise.
+! L      = Integer variable, NQ + 1, current order plus one.
+! LMAX   = MAXORD + 1 (used for dimensioning).
+! LOCJS  = A pointer to the saved Jacobian, whose storage starts at
+!          WM(LOCJS), if JSV = 1.
+! LYH    = Saved integer pointer to segments of RWORK and IWORK.
+! MAXORD = The maximum order of integration method to be allowed.
+! METH/MITER = The method flags. See MF.
+! MSBJ   = The maximum number of steps between J evaluations, = 50.
+! MXHNIL = Saved value of optional input MXHNIL.
+! MXSTEP = Saved value of optional input MXSTEP.
+! N      = The number of first-order ODEs, = NEQ.
+! NEWH   = Saved integer to flag change of H.
+! NEWQ   = The method order to be used on the next step.
+! NHNIL  = Saved counter for occurrences of T + H = T.
+! NQ     = Integer variable, the current integration method order.
+! NQNYH  = Saved value of NQ*NYH.
+! NQWAIT = A counter controlling the frequency of order changes.
+!          An order change is about to be considered if NQWAIT = 1.
+! NSLJ   = The number of steps taken as of the last Jacobian update.
+! NSLP   = Saved value of NST as of last Newton matrix update.
+! NYH    = Saved value of the initial value of NEQ.
+! HU     = The step size in t last used.
+! NCFN   = Number of nonlinear convergence failures so far.
+! NETF   = The number of error test failures of the integrator so far.
+! NFE    = The number of f evaluations for the problem so far.
+! NJE    = The number of Jacobian evaluations so far.
+! NLU    = The number of matrix LU decompositions so far.
+! NNI    = Number of nonlinear iterations so far.
+! NQU    = The method order last used.
+! NST    = The number of steps taken for the problem so far.
+! Block 0.
+! Retrieve the necessary flags from the OPTIONS structure and manage
+! the storage allocation.
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVODE
+! ..
+!       Retrieve the local flags from the options structure.
+        IOPT = OPTS%IOPT
+        ITOL = OPTS%ITOL
+        MF = OPTS%MF
+        METH = OPTS%METH
+        MITER = OPTS%MITER
+        MOSS = OPTS%MOSS
+        NG = OPTS%NG
+
+!       Allocate the necessary storage for RWORK and IWORK. (Assume that
+!       both or neither of the arrays are allocated.)
+
+!       If we are starting a new problem, deallocate the old RWORK and
+!       IWORK arrays if they were allocated in a previous call. Also
+!       manage the event residual arrays.
+
+        IF (ISTATE==1) THEN
+          IF (ALLOCATED(DTEMP)) THEN
+            DEALLOCATE (DTEMP,YTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,270)
+          END IF
+          IF (ALLOCATED(RWORK)) THEN
+            DEALLOCATE (RWORK,IWORK,ACOR,SAVF,EWT,WM,STAT=JER)
+            CALL CHECK_STAT(JER,280)
+          END IF
+          IF (ALLOCATED(JROOT)) THEN
+            DEALLOCATE (JROOT,G0,G1,GX,STAT=JER)
+            CALL CHECK_STAT(JER,290)
+          END IF
+          IF (ALLOCATED(YMAX)) THEN
+            DEALLOCATE (YMAX,STAT=JER)
+            CALL CHECK_STAT(JER,300)
+          END IF
+        END IF
+
+!       If the user has made changes and called DVODE_F90 with ISTATE=3,
+!       temporarily save the necessary portion of the Nordsieck array
+!       and then release RWORK and IWORK. Also, save the contents of
+!       the WM array and release WM. Note: ACOR, SAVF, and EWT do not
+!       need to be saved.
+
+        IF (ISTATE==3) THEN
+          IF (IOPT/=1) THEN
+            MAXORD = MORD(METH)
+          ELSE
+            MAXORD = IUSER(5)
+            IF (MAXORD<0) GOTO 520
+            IF (MAXORD==0) MAXORD = 100
+            MAXORD = MIN(MAXORD,MORD(METH))
+          END IF
+          IF (MAXORD<NQ) THEN
+!           If MAXORD is less than NQ, save column NQ+2 of YH for
+!           later use.
+            IF (ALLOCATED(YHNQP2)) THEN
+              DEALLOCATE (YHNQP2,STAT=JER)
+              CALL CHECK_STAT(JER,310)
+            END IF
+            ALLOCATE (YHNQP2(NEQ),STAT=JER)
+            CALL CHECK_STAT(JER,320)
+            CALL DCOPY_F90(NEQ,RWORK(LYH+NYH*(MAXORD+1)),1,YHNQP2,1)
+          END IF
+          LYHTEMP = MIN((PREVIOUS_MAXORD+1)*NYH+LYH-1,(MAXORD+1)*NYH+LYH-1)
+          ALLOCATE (YHTEMP(LYHTEMP),STAT=JER)
+          CALL CHECK_STAT(JER,330)
+!         Save YH.
+          YHTEMP(1:LYHTEMP) = RWORK(1:LYHTEMP)
+!         Save WM.
+          LWMTEMP = LWMDIM
+          ALLOCATE (WMTEMP(LWMTEMP),STAT=JER)
+          CALL CHECK_STAT(JER,340)
+          WMTEMP(1:LWMTEMP) = WM(1:LWMTEMP)
+          IF (ALLOCATED(DTEMP)) THEN
+             DEALLOCATE (DTEMP,YTEMP,STAT=JER)
+             CALL CHECK_STAT(JER,350)
+          END IF
+          DEALLOCATE (RWORK,IWORK,YMAX,ACOR,SAVF,EWT,WM,STAT=JER)
+          CALL CHECK_STAT(JER,360)
+        END IF
+
+!     Allocate the RWORK and WM work arrays if they haven't already
+!     been allocated in a previous call.
+!     LRW = 20 + (MAXORD + 1) * NEQ
+!     LWMDIM =     
+!            0                        for MF = 10,
+!            2 * NEQ**2               for MF = 11 or 12,
+!            NEQ**2                   for MF = -11 or -12,
+!            NEQ                      for MF = 13,
+!            (3*ML + 2*MU + 2) * NEQ  for MF = 14 or 15,
+!            (2*ML + MU + 1) * NEQ    for MF = -14 or -15,
+!            0                        for MF = 16 or 17,
+!            0                        for MF = -16 or -17,
+!            0                        for MF = 20,
+!            2 * NEQ**2               for MF = 21 or 22,
+!            NEQ**2                   for MF = -21 or -22,
+!            NEQ                      for MF = 23,
+!            (3*ML + 2*MU + 2) * NEQ  for MF = 24 or 25,
+!            (2*ML + MU + 1) * NEQ    for MF = -24 or -25,
+!            0                        for MF = 26 or 27,
+!            0                        for MF = -26 or -27.
+        IF (ALLOCATED(RWORK)) THEN
+        ELSE
+          MFA = ABS(MF)
+          IF (IOPT/=1) THEN
+            MAXORD = MORD(METH)
+          ELSE
+            MAXORD = IUSER(5)
+            IF (MAXORD<0) GOTO 520
+            IF (MAXORD==0) MAXORD = 100
+            MAXORD = MIN(MAXORD,MORD(METH))
+          END IF
+          LRW = LRWUSER + (MAXORD+1)*NEQ
+!        IF (MITER == 0) LRW = LRW - 2
+          LRW = LRW - 2
+          IF (MF==10) THEN
+            LWMDIM = 0
+          ELSE IF (MF==11 .OR. MF==12) THEN
+            LWMDIM = 2*NEQ**2
+          ELSE IF (MF==-11 .OR. MF==-12) THEN
+            LWMDIM = NEQ**2
+          ELSE IF (MF==13) THEN
+            LWMDIM = NEQ
+          ELSE IF (MF==14 .OR. MF==15) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (3*ML+2*MU+2)*NEQ
+          ELSE IF (MF==-14 .OR. MF==-15) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (2*ML+MU+1)*NEQ
+          ELSE IF (MF==16 .OR. MF==17) THEN
+            LWMDIM = 0
+          ELSE IF (MF==-16 .OR. MF==-17) THEN
+            LWMDIM = 0
+          ELSE IF (MF==20) THEN
+            LWMDIM = 0
+          ELSE IF (MF==21 .OR. MF==22) THEN
+            LWMDIM = 2*NEQ**2
+          ELSE IF (MF==-21 .OR. MF==-22) THEN
+            LWMDIM = NEQ**2
+          ELSE IF (MF==23) THEN
+            LWMDIM = NEQ
+          ELSE IF (MF==24 .OR. MF==25) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (3*ML+2*MU+2)*NEQ
+          ELSE IF (MF==-24 .OR. MF==-25) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (2*ML+MU+1)*NEQ
+          ELSE IF (MF==26 .OR. MF==27) THEN
+            LWMDIM = 0
+          ELSE IF (MF==-26 .OR. MF==-27) THEN
+            LWMDIM = 0
+          END IF
+!         LWMDIM = LWMDIM + 2
+          ALLOCATE (RWORK(LRW),WM(LWMDIM),STAT=JER)
+          CALL CHECK_STAT(JER,370)
+          RWORK(1:LRW) = ZERO
+          WM(1:LWMDIM) = ZERO
+          IF (.NOT.ALLOCATED(DTEMP)) THEN
+             ALLOCATE (DTEMP(NEQ),YTEMP(NEQ),STAT=JER)
+             CALL CHECK_STAT(JER,380)
+          END IF
+          ALLOCATE (ACOR(NEQ),SAVF(NEQ),EWT(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,390)
+!         If necessary, reload the saved portion of the Nordsieck
+!         array and the WM array, saved above.
+          IF (ISTATE==3) THEN
+            RWORK(1:LYHTEMP) = YHTEMP(1:LYHTEMP)
+            I = MIN(LWMTEMP,LWMDIM)
+!           WM(1:LWMTEMP) = WMTEMP(1:LWMTEMP)
+            WM(1:I) = WMTEMP(1:I)
+            DEALLOCATE (YHTEMP,WMTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,400)
+          END IF
+          RWORK(1:LRWUSER) = RUSER(1:LRWUSER)
+!         IUSER: = LIWUSER if MITER = 0 or 3 (MF = 10, 13, 20, 23)
+!                = LIWUSER + NEQ otherwise
+!                  (ABS(MF) = 11,12,14,15,16,17,21,22,24,25,26,27).
+          LIW = LIWUSER + NEQ
+          IF (MITER==0 .OR. MITER==3) LIW = LIWUSER
+          ALLOCATE (IWORK(LIW),STAT=JER)
+          CALL CHECK_STAT(JER,410)
+          IWORK(1:LIWUSER) = IUSER(1:LIWUSER)
+!         Allocate the YMAX vector.
+          ALLOCATE (YMAX(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,420)
+        END IF
+!       Allocate the event arrays if they haven't already been allocated
+!       in a previous call.
+        IF (ALLOCATED(JROOT)) THEN
+        ELSE
+          IF (NG>0) THEN
+            ALLOCATE (JROOT(NG),G0(NG),G1(NG),GX(NG),STAT=JER)
+            CALL CHECK_STAT(JER,430)
+          END IF
+        END IF
+
+! Block A.
+! This code block is executed on every call. It tests ISTATE and
+! ITASK for legality and branches appropriately.
+! If ISTATE > 1 but the flag INIT shows that initialization has
+! not yet been done, an error return occurs.
+! If ISTATE = 1 and TOUT = T, return immediately.
+! The user portion of RWORK and IWORK are reloaded since something
+! may have changed since the previous visit.
+
+        RWORK(1:LRWUSER) = RUSER(1:LRWUSER)
+        IWORK(1:LIWUSER) = IUSER(1:LIWUSER)
+        IF (ISTATE<1 .OR. ISTATE>3) GOTO 420
+        IF (ITASK<1 .OR. ITASK>5) GOTO 430
+        ITASKC = ITASK
+        IF (ISTATE==1) GOTO 10
+        IF (INIT/=1) GOTO 440
+        IF (ISTATE==2) GOTO 130
+        GOTO 20
+10      INIT = 0
+        IF (ABS(TOUT-T)<=ZERO) THEN
+          RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+          IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+          RETURN
+        END IF
+
+! Block B.
+! The next code block is executed for the initial call (ISTATE = 1),
+! or for a continuation call with parameter changes (ISTATE = 3).
+! It contains checking of all input and various initializations.
+
+!       First check legality of the non-optional input NEQ, ITOL, IOPT,
+!       MF, ML, and MU.
+
+20      IF (NEQ<=0) GOTO 450
+        IF (ISTATE==1) GOTO 30
+        IF (NEQ>N) GOTO 460
+        IF (NEQ/=N) GOTO 465
+30      N = NEQ
+        IF (ITOL<1 .OR. ITOL>4) GOTO 470
+        IF (IOPT<0 .OR. IOPT>1) GOTO 480
+        JSV = SIGN(1,MF)
+        INEWJ = (1-JSV)/2
+        MFA = ABS(MF)
+        METH = MFA/10
+        MITER = MFA - 10*METH
+        IF (METH<1 .OR. METH>2) GOTO 490
+        IF (MITER<0 .OR. MITER>7) GOTO 490
+        IF (MITER<=3) GOTO 40
+        IF (MITER<=5) THEN
+          ML = IWORK(1)
+          MU = IWORK(2)
+          IF (ML<0 .OR. ML>=N) GOTO 500
+          IF (MU<0 .OR. MU>=N) GOTO 510
+        END IF
+40      CONTINUE
+        IF (NG<0) GOTO 700
+        IF (ISTATE==1) GOTO 50
+        IF (IRFND==0 .AND. NG/=NGC) GOTO 710
+50      NGC = NG
+!       Next process and check the optional input.
+        IF (IOPT==1) GOTO 60
+        MAXORD = MORD(METH)
+        MXSTEP = MXSTP0
+        MXHNIL = MXHNL0
+        IF (ISTATE==1) H0 = ZERO
+        HMXI = ZERO
+        HMIN = ZERO
+        GOTO 80
+60      MAXORD = IWORK(5)
+        IF (MAXORD<0) GOTO 520
+        IF (MAXORD==0) MAXORD = 100
+        MAXORD = MIN(MAXORD,MORD(METH))
+        MXSTEP = IWORK(6)
+        IF (MXSTEP<0) GOTO 530
+        IF (MXSTEP==0) MXSTEP = MXSTP0
+        MXHNIL = IWORK(7)
+        IF (MXHNIL<0) GOTO 540
+        IF (MXHNIL==0) MXHNIL = MXHNL0
+        IF (ISTATE/=1) GOTO 70
+        H0 = RWORK(5)
+        IF ((TOUT-T)*H0<ZERO) GOTO 550
+70      HMAX = RWORK(6)
+        IF (HMAX<ZERO) GOTO 560
+        HMXI = ZERO
+        IF (HMAX>ZERO) HMXI = ONE/HMAX
+        HMIN = RWORK(7)
+        IF (HMIN<ZERO) GOTO 570
+        SETH = RWORK(8)
+        IF (SETH<ZERO) GOTO 690
+!       Check the nonnegativity information.
+        IF (BOUNDS) THEN
+          IF (NDX<1 .OR. NDX>NEQ) THEN
+            MSG = 'The size of the CONSTRAINED vector'
+            CALL XERRDV(MSG,900,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'must be between 1 and NEQ.'
+            CALL XERRDV(MSG,900,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DO I = 1, NDX
+            IF (IDX(I)<1 .OR. IDX(I)>N) THEN
+              MSG = 'Each component of THE CONSTRAINED'
+              CALL XERRDV(MSG,910,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'vector must be between 1 and N.'
+              CALL XERRDV(MSG,910,2,0,0,0,0,ZERO,ZERO)
+            END IF
+          END DO
+        END IF
+!       Check the sub diagonal and super diagonal arrays.
+        IF (MITER==4 .OR. MITER==5) THEN
+           IF (SUBS) THEN
+              DO I = 1, NSUBS
+                 IF (SUBDS(I) < 2 .OR. SUBDS(I) > ML+1) THEN
+                    MSG = 'Each element of SUB_DIAGONALS'
+                    CALL XERRDV(MSG,920,1,0,0,0,0,ZERO,ZERO)
+                    MSG = 'must be between 2 and ML + 1.'
+                    CALL XERRDV(MSG,920,2,0,0,0,0,ZERO,ZERO)
+                 END IF
+              END DO
+           END IF
+           IF (SUPS) THEN
+              DO I = 1, NSUPS
+                 IF (SUPDS(I) < 2 .OR. SUPDS(I) > MU + 1) THEN
+                    MSG = 'Each element of SUP_DIAGONALS'
+                    CALL XERRDV(MSG,930,1,0,0,0,0,ZERO,ZERO)
+                    MSG = 'must be between 2 and MU + 1.'
+                    CALL XERRDV(MSG,930,2,0,0,0,0,ZERO,ZERO)
+                 END IF
+              END DO
+           END IF
+!          Compute the banded column grouping.
+           IF (SUBS .OR. SUPS) THEN
+             CALL BGROUP(N,EWT,ACOR,YMAX,ML,MU)
+             BUILD_IAJA = .FALSE.
+             BUILD_IAJA = .TRUE.
+             IF (BUILD_IAJA) THEN
+                CALL BANDED_IAJA(N,ML,MU)
+                NZB = IAB(N+1) - 1
+             END IF
+           END IF
+        END IF
+
+        IF ((MITER==2 .OR. MITER==5) .AND. USE_JACSP) THEN
+!         Allocate the arrays needed by DVJAC/JACSPD.
+          IF (ALLOCATED(INDROWDS)) THEN
+             DEALLOCATE (INDROWDS, INDCOLDS, NGRPDS, IPNTRDS, JPNTRDS, &
+               IWADS, IWKDS, IOPTDS, YSCALEDS, WKDS, FACDS)
+             CALL CHECK_STAT(IER,440)
+          END IF
+          ALLOCATE (INDROWDS(1), INDCOLDS(1), NGRPDS(1), IPNTRDS(1),   &
+            JPNTRDS(1), IWADS(1), IWKDS(50+N), IOPTDS(5), YSCALEDS(N), &
+            WKDS(3*N), FACDS(N), STAT=IER)
+          CALL CHECK_STAT(IER,450)
+!         For use in DVJAC:
+          IOPTDS(4) = 0
+        END IF
+
+! Set work array pointers and check lengths LRW and LIW. Pointers
+! to segments of RWORK and IWORK are named by prefixing L to the
+! name of the segment. e.g., the segment YH starts at RWORK(LYH).
+! Within WM, LOCJS is the location of the saved Jacobian (JSV > 0).
+
+80      LYH = 21
+        IF (ISTATE==1) NYH = N
+        LENRW = LYH + (MAXORD+1)*NYH - 1
+        IWORK(17) = LENRW
+        IF (LENRW>LRW) GOTO 580
+        IF (LENRW/=LRW) GOTO 580
+        LWM = 1
+!       Save MAXORD in case the calling program calls with ISTATE=3.
+        PREVIOUS_MAXORD = MAXORD
+        JCO = MAX(0,JSV)
+!       IF (MITER==0) LENWM = 2
+        IF (MITER==0) LENWM = 0
+        IF (MITER==1 .OR. MITER==2) THEN
+!         LENWM = 2 + (1+JCO)*N*N
+!         LOCJS = N*N + 3
+          LENWM = (1+JCO)*N*N
+          LOCJS = N*N + 1
+        END IF
+!       IF (MITER==3) LENWM = N + 2
+        IF (MITER==3) LENWM = N
+        IF (MITER==4 .OR. MITER==5) THEN
+          MBAND = ML + MU + 1
+          LENP = (MBAND+ML)*N
+          LENJ = MBAND*N
+!         LENWM = 2 + LENP + JCO*LENJ
+!         LOCJS = LENP + 3
+          LENWM = LENP + JCO*LENJ
+          LOCJS = LENP + 1
+        END IF
+        IF (MITER==6 .OR. MITER==7) THEN
+!         LENWM = 2
+          LENWM = 0
+        END IF
+        IF (LENWM>LWMDIM) GOTO 730
+        IF (LENWM/=LWMDIM) GOTO 730
+        LIWM = 1
+        LENIW = 30 + N
+        IF (MITER==0 .OR. MITER==3) LENIW = 30
+        IWORK(18) = LENIW
+        IF (LENIW>LIW) GOTO 590
+!       Check RTOL and ATOL for legality.
+        RTOLI = OPTS%RTOL(1)
+        ATOLI = OPTS%ATOL(1)
+        DO I = 1, N
+          IF (ITOL>=3) RTOLI = OPTS%RTOL(I)
+          IF (ITOL==2 .OR. ITOL==4) ATOLI = OPTS%ATOL(I)
+          IF (RTOLI<ZERO) GOTO 600
+          IF (ATOLI<ZERO) GOTO 610
+        END DO
+        IF (ISTATE==1) GOTO 100
+!       If ISTATE = 3, set flag to signal parameter changes to DVSTEP.
+        JSTART = -1
+        IF (NQ<=MAXORD) GOTO 90
+!       MAXORD was reduced below NQ. Copy YH(*,MAXORD+2) into SAVF.
+!       YH(*,MAXORD+2) was copied to the YHNQP2 array at the
+!       beginning of DVODE when the ISTATE=3 call was made.
+        CALL DCOPY_F90(N,YHNQP2,1,SAVF,1)
+!       Reload WM1 since LWM may have changed.
+90      IF (MITER>0) WM1 = SQRT(UROUND)
+!       ISTATC controls the determination of the sparsity arrays
+!       if the sparse solution option is used.
+        ISTATC = ISTATE
+        GOTO 130
+
+! Block C.
+! The next block is for the initial call only (ISTATE = 1).
+! It contains all remaining initializations, the initial call to F,
+! and the calculation of the initial step size.
+! The error weights in EWT are inverted after being loaded.
+
+100     UROUND = EPSILON(ONE)
+        U125 = UROUND ** 0.125_WP
+        U325 = UROUND ** 0.325_WP
+!       ISTATC controls the determination of the sparsity arrays if
+!       the sparse solution option is used.
+        ISTATC = ISTATE
+        TN = T
+        IF (ITASK/=4 .AND. ITASK/=5) GOTO 110
+        TCRIT = RWORK(1)
+        IF ((TCRIT-TOUT)*(TOUT-T)<ZERO) GOTO 660
+        IF (ABS(H0)>ZERO .AND. (T+H0-TCRIT)*H0>ZERO) H0 = TCRIT - T
+110     JSTART = 0
+        IF (MITER>0) WM1 = SQRT(UROUND)
+        CCMXJ = PT2
+        MSBJ = 50
+        MSBG = 75
+        NHNIL = 0
+        NST = 0
+        NJE = 0
+        NNI = 0
+        NCFN = 0
+        NETF = 0
+        NLU = 0
+        NSLJ = 0
+        NSLAST = 0
+        HU = ZERO
+        NQU = 0
+        MB28 = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert this statement.
+!       MB48 = 0
+!_______________________________________________________________________
+        NSLG = 0
+        NGE = 0
+!       Initial call to F. (LF0 points to YH(*,2).)
+        LF0 = LYH + NYH
+        CALL F(N,T,Y,RWORK(LF0))
+        NFE = 1
+!       Load the initial value vector in YH.
+        CALL DCOPY_F90(N,Y,1,RWORK(LYH),1)
+!       Load and invert the EWT array. (H is temporarily set to 1.0.)
+        NQ = 1
+        H = ONE
+        CALL DEWSET(N,ITOL,OPTS%RTOL,OPTS%ATOL,RWORK(LYH),EWT)
+        DO I = 1, N
+          IF (EWT(I)<=ZERO) GOTO 620
+          EWT(I) = ONE/EWT(I)
+        END DO
+        NNZ = 0
+        NGP = 0
+        IF (OPTS%SPARSE) THEN
+          ISTATC = ISTATE
+        END IF
+        IF (ABS(H0)>ZERO) GOTO 120
+!       Call DVHIN to set initial step size H0 to be attempted.
+        CALL DVHIN(N,T,RWORK(LYH),RWORK(LF0),F,TOUT,EWT,ITOL,OPTS%ATOL,Y,ACOR, &
+          H0,NITER,IER)
+        NFE = NFE + NITER
+        IF (IER/=0) GOTO 630
+!       Adjust H0 if necessary to meet HMAX bound.
+120     RH = ABS(H0)*HMXI
+        IF (RH>ONE) H0 = H0/RH
+!       Load H with H0 and scale YH(*,2) by H0.
+        H = H0
+        CALL DSCAL_F90(N,H0,RWORK(LF0),1)
+!       GOTO 270
+!       Check for a zero of g at T.
+        IRFND = 0
+        TOUTC = TOUT
+        IF (NGC==0) GOTO 210
+        CALL DVCHECK(1,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT==0) GOTO 210
+        GOTO 720
+
+! Block D.
+! The next code block is for continuation calls only (ISTATE = 2 or 3)
+! and is to check stop conditions before taking a step.
+
+130     NSLAST = NST
+        IRFP = IRFND
+        IF (NGC==0) GOTO 140
+        IF (ITASK==1 .OR. ITASK==4) TOUTC = TOUT
+        CALL DVCHECK(2,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT/=1) GOTO 140
+        IRFND = 1
+        ISTATE = 3
+        T = T0ST
+        GOTO 330
+140     CONTINUE
+        IRFND = 0
+        IF (IRFP==1 .AND. (ABS(TLAST-TN)>ZERO) .AND. ITASK==2) GOTO 310
+        KUTH = 0
+        GOTO (150,200,160,170,180) ITASK
+150     IF ((TN-TOUT)*H<ZERO) GOTO 200
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (IFLAG/=0) GOTO 680
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+160     TP = TN - HU*(ONE+HUN*UROUND)
+        IF ((TP-TOUT)*H>ZERO) GOTO 640
+        IF ((TN-TOUT)*H<ZERO) GOTO 200
+        GOTO 310
+170     TCRIT = RWORK(1)
+        IF ((TN-TCRIT)*H>ZERO) GOTO 650
+        IF ((TCRIT-TOUT)*H<ZERO) GOTO 660
+        IF ((TN-TOUT)*H<ZERO) GOTO 190
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (IFLAG/=0) GOTO 680
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+180     TCRIT = RWORK(1)
+        IF ((TN-TCRIT)*H>ZERO) GOTO 650
+190     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+        IF (IHIT) GOTO 310
+        TNEXT = TN + HNEW*(ONE+FOUR*UROUND)
+        IF ((TNEXT-TCRIT)*H<=ZERO) GOTO 200
+        H = (TCRIT-TN)*(ONE-FOUR*UROUND)
+        KUTH = 1
+
+! Block E.
+! The next block is normally executed for all calls and contains
+! the call to the one-step core integrator DVSTEP. This is a
+! looping point for the integration steps.
+! First check for too many steps being taken, update EWT(if not
+! at start of problem), check for too much accuracy being
+! requested, and check for H below the roundoff level in T.
+
+200     CONTINUE
+        IF ((NST-NSLAST)>=MXSTEP) GOTO 340
+        CALL DEWSET(N,ITOL,OPTS%RTOL,OPTS%ATOL,RWORK(LYH),EWT)
+        DO I = 1, N
+          IF (EWT(I)<=ZERO) GOTO 350
+          EWT(I) = ONE/EWT(I)
+        END DO
+210     TOLSF = UROUND*DVNORM(N,RWORK(LYH),EWT)
+        IPCUTH = -1
+        IF (TOLSF<=ONE) GOTO 220
+        TOLSF = TOLSF*TWO
+        IF (NST==0) GOTO 670
+        GOTO 360
+220     CONTINUE
+        IPCUTH = IPCUTH + 1
+        IF (IPCUTH>=IPCUTH_MAX) THEN
+          MSG = 'Too many step reductions to prevent'
+          CALL XERRDV(MSG,940,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'an infeasible prediction.'
+          CALL XERRDV(MSG,940,1,0,0,0,0,ZERO,ZERO)
+!         Retract the solution to TN:
+          CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+          ACOR(1:N) = ZERO
+          ISTATE = -7
+          GOTO 410
+        END IF
+        IF (ABS((TN+H)-TN)>ZERO) GOTO 230
+        NHNIL = NHNIL + 1
+        IF (NHNIL>MXHNIL) GOTO 230
+        MSG = 'Warning: internal T(=R1) and H(=R2) are such that'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'in the machine, T + H = T on the next step.'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = '(H = step size). The solver will continue anyway.'
+        CALL XERRDV(MSG,950,1,0,0,0,2,TN,H)
+        IF (NHNIL<MXHNIL) GOTO 230
+        MSG = 'The above warning has been issued I1 times.'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'It will not be issued again for this problem.'
+        CALL XERRDV(MSG,950,1,1,MXHNIL,0,0,ZERO,ZERO)
+230     CONTINUE
+        IF (BOUNDS) THEN
+!         Check positive components for infeasible prediction; reduce 
+!         step size if infeasible prediction will occur in DVNLSD.
+          ACOR(1:N) = RWORK(LYH:LYH+N-1)
+!         Predict:
+          CALL DVNRDP(RWORK(LYH:LRW),NYH,N,NQ)
+          DO I = 1, NDX
+            IF ((ACOR(IDX(I))>LB(I) .AND. RWORK(LYH+ &
+                IDX(I)-1)<LB(I)) .OR. (ACOR(IDX(I))<UB(I) .AND. RWORK(LYH+ &
+                IDX(I)-1)>UB(I))) THEN
+!              Retract:
+              CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+              H = HALF*H
+              ETA = HALF
+!              Rescale:
+              CALL DVNRDS(RWORK(LYH),NYH,N,L,ETA)
+              GOTO 220
+            END IF
+          END DO
+!         Retract:
+          CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+          ACOR(1:N) = ZERO
+        END IF
+
+!       CALL DVSTEP(Y,YH,LDYH,YH1,EWT,SAVF,ACOR,WM,IWM,F,JAC, &
+!         VNLS,OPTS%ATOL,ITOL)
+!_______________________________________________________________________
+
+        IF (MITER/=6 .AND. MITER/=7) THEN
+          CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+            IWORK(LIWM),F,JAC,DVNLSD,OPTS%ATOL,ITOL)
+        ELSE
+          CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+            IWORK(LIWM),F,JAC,DVNLSS28,OPTS%ATOL,ITOL)
+        END IF
+! *****MA48 build change point. Replace above with these statements.
+!     IF (MITER /= 6 .AND. MITER /= 7) THEN
+!        CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!          IWORK(LIWM),F,JAC,DVNLSD,OPTS%ATOL,ITOL)
+!     ELSE
+!        IF (USE_MA48_FOR_SPARSE) THEN
+!           CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!             IWORK(LIWM), F, JAC, DVNLSS48,OPTS%ATOL,ITOL)
+!        ELSE
+!           CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!           IWORK(LIWM),F,JAC,DVNLSS28,OPTS%ATOL,ITOL)
+!        END IF
+!     END IF
+!_______________________________________________________________________
+
+        KGO = 1 - KFLAG
+!       Branch on KFLAG. Note: In this version, KFLAG can not be set to
+!                            -3; KFLAG = 0, -1, -2.
+        GOTO (240,370,380) KGO
+
+! Block F.
+! The following block handles the case of a successful return from the
+! core integrator (KFLAG = 0). Test for stop conditions.
+
+240     INIT = 1
+        KUTH = 0
+        GOTO (250,310,270,280,300) ITASK
+!       ITASK = 1. If TOUT has been reached, interpolate.
+250     CONTINUE
+        IF (NGC==0) GOTO 260
+        CALL DVCHECK(3,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT/=1) GOTO 260
+        IRFND = 1
+        ISTATE = 3
+        T = T0ST
+        GOTO 330
+260     CONTINUE
+        IF ((TN-TOUT)*H<ZERO) GOTO 200
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+!       ITASK = 3. Jump to exit if TOUT was reached.
+270     IF ((TN-TOUT)*H>=ZERO) GOTO 310
+        GOTO 200
+!       ITASK = 4. See if TOUT or TCRIT was reached. Adjust H if necessary.
+280     IF ((TN-TOUT)*H<ZERO) GOTO 290
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+290     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+        IF (IHIT) GOTO 310
+        TNEXT = TN + HNEW*(ONE+FOUR*UROUND)
+        IF ((TNEXT-TCRIT)*H<=ZERO) GOTO 200
+        H = (TCRIT-TN)*(ONE-FOUR*UROUND)
+        KUTH = 1
+        GOTO 200
+!       ITASK = 5. See if TCRIT was reached and jump to exit.
+300     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+
+! Block G.
+! The following block handles all successful returns from DVODE.
+! If ITASK /= 1, Y is loaded from YH and T is set accordingly.
+! ISTATE is set to 2, and the optional output is loaded into the
+! work arrays before returning.
+
+310     CONTINUE
+        CALL DCOPY_F90(N,RWORK(LYH),1,Y,1)
+        T = TN
+        IF (ITASK/=4 .AND. ITASK/=5) GOTO 320
+        IF (IHIT) T = TCRIT
+320     ISTATE = 2
+330     CONTINUE
+        RWORK(11) = HU
+        RWORK(12) = HNEW
+        RWORK(13) = TN
+        IWORK(10) = NGE
+        IWORK(11) = NST
+        IWORK(12) = NFE
+        IWORK(13) = NJE
+        IWORK(14) = NQU
+        IWORK(15) = NEWQ
+        IWORK(19) = NLU
+        IWORK(20) = NNI
+        IWORK(21) = NCFN
+        IWORK(22) = NETF
+        TLAST = T
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+!       Warn the user if |y(t)| < ATOL:
+        IF (ISTATE==2 .OR. ISTATE==3) THEN
+          IF (YMAXWARN) THEN
+            ATOLI = OPTS%ATOL(1)
+            DO I = 1, N
+              IF (ITOL==2 .OR. ITOL==4) ATOLI = OPTS%ATOL(I)
+              IF (ABS(Y(I))<ATOLI) THEN
+                MSG = 'Warning: Component I1 of the solution is'
+                CALL XERRDV(MSG,960,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'smaller in magnitude than component I1'
+                CALL XERRDV(MSG,960,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'of the absolute error tolerance vector.'
+                CALL XERRDV(MSG,960,1,1,I,0,0,ZERO,ZERO)
+              END IF
+            END DO
+          END IF
+        END IF
+        RETURN
+
+! Block H.
+! The following block handles all unsuccessful returns other than
+! those for illegal input. First the error message routine is called.
+! if there was an error test or convergence test failure, IMXER is set.
+! Then Y is loaded from YH, and T is set to TN. The optional output
+! is loaded into the work arrays before returning.
+
+!       The maximum number of steps was taken before reaching TOUT.
+340     MSG = 'At current T(=R1), MXSTEP(=I1) steps'
+        CALL XERRDV(MSG,970,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'taken on this call before reaching TOUT.'
+        CALL XERRDV(MSG,970,1,1,MXSTEP,0,1,TN,ZERO)
+        ISTATE = -1
+        GOTO 410
+!       EWT(i) <= 0.0 for some i (not at start of problem).
+350     EWTI = EWT(I)
+        MSG = 'At T(=R1), EWT(I1) has become R2 <= 0.'
+        CALL XERRDV(MSG,980,1,1,I,0,2,TN,EWTI)
+        ISTATE = -6
+        GOTO 410
+!       Too much accuracy requested for machine precision.
+360     MSG = 'At T(=R1), too much accuracy was requested'
+        CALL XERRDV(MSG,990,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'for precision of machine:   see TOLSF(=R2).'
+        CALL XERRDV(MSG,990,1,0,0,0,2,TN,TOLSF)
+        RWORK(14) = TOLSF
+        ISTATE = -2
+        GOTO 410
+!       KFLAG = -1. Error test failed repeatedly or with ABS(H) = HMIN.
+370     MSG = 'At T(=R1) and step size H(=R2), the error'
+        CALL XERRDV(MSG,1000,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'test failed repeatedly or with ABS(H) = HMIN.'
+        CALL XERRDV(MSG,1000,1,0,0,0,2,TN,H)
+        ISTATE = -4
+        GOTO 390
+!       KFLAG = -2. Convergence failed repeatedly or with ABS(H) = HMIN.
+380     MSG = 'At T(=R1) and step size H(=R2), the'
+        CALL XERRDV(MSG,1010,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'corrector convergence failed repeatedly'
+        CALL XERRDV(MSG,1010,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'or with ABS(H) = HMIN.'
+        CALL XERRDV(MSG,1010,1,0,0,0,2,TN,H)
+        ISTATE = -5
+!       Compute IMXER if relevant.
+390     BIG = ZERO
+        IMXER = 1
+        DO 400 I = 1, N
+          SIZEST = ABS(ACOR(I)*EWT(I))
+          IF (BIG>=SIZEST) GOTO 400
+          BIG = SIZEST
+          IMXER = I
+400     END DO
+        IWORK(16) = IMXER
+!       Set Y vector, T, and optional output.
+410     CONTINUE
+        CALL DCOPY_F90(N,RWORK(LYH),1,Y,1)
+        T = TN
+        RWORK(11) = HU
+        RWORK(12) = H
+        RWORK(13) = TN
+        IWORK(10) = NGE
+        IWORK(11) = NST
+        IWORK(12) = NFE
+        IWORK(13) = NJE
+        IWORK(14) = NQU
+        IWORK(15) = NQ
+        IWORK(19) = NLU
+        IWORK(20) = NNI
+        IWORK(21) = NCFN
+        IWORK(22) = NETF
+        TLAST = T
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+! Block I.
+! The following block handles all error returns due to illegal input
+! (ISTATE = -3), as detected before calling the core integrator.
+! First the error message routine is called. If the illegal input
+! is a negative ISTATE, the run is aborted (apparent infinite loop).
+
+420     MSG = 'ISTATE(=I1) is illegal.'
+        CALL XERRDV(MSG,1020,1,1,ISTATE,0,0,ZERO,ZERO)
+        IF (ISTATE<0) GOTO 750
+        GOTO 740
+430     MSG = 'ITASK(=I1) is illegal.'
+        CALL XERRDV(MSG,1030,1,1,ITASK,0,0,ZERO,ZERO)
+        GOTO 740
+440     MSG = 'ISTATE(=I1) > 1 but DVODE is not initialized.'
+        CALL XERRDV(MSG,1040,1,1,ISTATE,0,0,ZERO,ZERO)
+        GOTO 740
+450     MSG = 'NEQ (=I1) < 1.'
+        CALL XERRDV(MSG,1050,1,1,NEQ,0,0,ZERO,ZERO)
+        GOTO 740
+460     MSG = 'ISTATE = 3 and NEQ increased (I1 to I2).'
+        CALL XERRDV(MSG,1060,1,2,N,NEQ,0,ZERO,ZERO)
+        GOTO 740
+465     MSG = 'This version of DVODE requires does not allow NEQ to be reduced.'
+        CALL XERRDV(MSG,1070,2,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+470     MSG = 'ITOL(=I1) is illegal.'
+        CALL XERRDV(MSG,1080,1,1,ITOL,0,0,ZERO,ZERO)
+        GOTO 740
+480     MSG = 'IOPT(=I1) is illegal.'
+        CALL XERRDV(MSG,1090,1,1,IOPT,0,0,ZERO,ZERO)
+        GOTO 740
+490     MSG = 'MF(=I1) is illegal.'
+        CALL XERRDV(MSG,1100,1,1,MF,0,0,ZERO,ZERO)
+        GOTO 740
+500     MSG = 'ML(=I1) illegal: < 0 or >= NEQ (=I2)'
+        CALL XERRDV(MSG,1110,1,2,ML,NEQ,0,ZERO,ZERO)
+        GOTO 740
+510     MSG = 'MU(=I1) illegal: < 0 or >= NEQ (=I2)'
+        CALL XERRDV(MSG,1120,1,2,MU,NEQ,0,ZERO,ZERO)
+        GOTO 740
+520     MSG = 'MAXORD(=I1) < 0.'
+        CALL XERRDV(MSG,1130,1,1,MAXORD,0,0,ZERO,ZERO)
+        GOTO 740
+530     MSG = 'MXSTEP(=I1) < 0.'
+        CALL XERRDV(MSG,1140,1,1,MXSTEP,0,0,ZERO,ZERO)
+        GOTO 740
+540     MSG = 'MXHNIL(=I1) < 0.'
+        CALL XERRDV(MSG,1150,1,1,MXHNIL,0,0,ZERO,ZERO)
+        GOTO 740
+550     MSG = 'TOUT(=R1) is behind T(=R2).'
+        CALL XERRDV(MSG,1160,1,0,0,0,2,TOUT,T)
+        MSG = 'The integration direction is given by H0 (=R1).'
+        CALL XERRDV(MSG,1160,1,0,0,0,1,H0,ZERO)
+        GOTO 740
+560     MSG = 'HMAX(=R1) < 0.'
+        CALL XERRDV(MSG,1170,1,0,0,0,1,HMAX,ZERO)
+        GOTO 740
+570     MSG = 'HMIN(=R1) < 0.'
+        CALL XERRDV(MSG,1180,1,0,0,0,1,HMIN,ZERO)
+        GOTO 740
+580     CONTINUE
+        MSG = 'RWORK length needed, LENRW(=I1) > LRW(=I2)'
+        CALL XERRDV(MSG,1190,1,2,LENRW,LRW,0,ZERO,ZERO)
+        GOTO 740
+590     CONTINUE
+        MSG = 'IWORK length needed, LENIW(=I1) > LIW(=I2)'
+        CALL XERRDV(MSG,1200,1,2,LENIW,LIW,0,ZERO,ZERO)
+        GOTO 740
+600     MSG = 'RTOL(I1) is R1 < 0.'
+        CALL XERRDV(MSG,1210,1,1,I,0,1,RTOLI,ZERO)
+        GOTO 740
+610     MSG = 'ATOL(I1) is R1 < 0.'
+        CALL XERRDV(MSG,1220,1,1,I,0,1,ATOLI,ZERO)
+        GOTO 740
+620     EWTI = EWT(I)
+        MSG = 'EWT(I1) is R1 <= 0.'
+        CALL XERRDV(MSG,1230,1,1,I,0,1,EWTI,ZERO)
+        GOTO 740
+630     CONTINUE
+        MSG = 'TOUT(=R1) too close to T(=R2) to start.'
+        CALL XERRDV(MSG,1240,1,0,0,0,2,TOUT,T)
+        GOTO 740
+640     CONTINUE
+        MSG = 'ITASK = I1 and TOUT(=R1) < TCUR - HU(=R2).'
+        CALL XERRDV(MSG,1250,1,1,ITASK,0,2,TOUT,TP)
+        GOTO 740
+650     CONTINUE
+        MSG = 'ITASK = 4 or 5 and TCRIT(=R1) < TCUR(=R2).'
+        CALL XERRDV(MSG,1260,1,0,0,0,2,TCRIT,TN)
+        GOTO 740
+660     CONTINUE
+        MSG = 'ITASK = 4 or 5 and TCRIT(=R1) < TOUT(=R2).'
+        CALL XERRDV(MSG,1270,1,0,0,0,2,TCRIT,TOUT)
+        GOTO 740
+670     MSG = 'At the start of the problem, too much'
+        CALL XERRDV(MSG,1280,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'accuracy was requested for precision'
+        CALL XERRDV(MSG,1280,1,0,0,0,1,TOLSF,ZERO)
+        MSG = 'of machine: see TOLSF(=R1).'
+        CALL XERRDV(MSG,1280,1,0,0,0,1,TOLSF,ZERO)
+        RWORK(14) = TOLSF
+        GOTO 740
+680     MSG = 'Trouble from DVINDY. ITASK = I1, TOUT = R1.'
+        CALL XERRDV(MSG,1290,1,1,ITASK,0,1,TOUT,ZERO)
+        GOTO 740
+690     MSG = 'SETH must be nonnegative.'
+        CALL XERRDV(MSG,1300,1,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+700     MSG = 'NG(=I1) < 0.'
+        CALL XERRDV(MSG,1310,0,1,NG,0,0,ZERO,ZERO)
+        GOTO 740
+710     MSG = 'NG changed (from I1 to I2) illegally, i.e.,'
+        CALL XERRDV(MSG,1320,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'not immediately after a root was found.'
+        CALL XERRDV(MSG,1320,1,2,NGC,NG,0,ZERO,ZERO)
+        GOTO 740
+720     MSG = 'One or more components of g has a root'
+        CALL XERRDV(MSG,1330,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'too near to the initial point.'
+        CALL XERRDV(MSG,1330,1,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+730     CONTINUE
+        MSG = 'WM length needed, LENWM(=I1) > LWMDIM(=I2)'
+        CALL XERRDV(MSG,1340,1,2,LENWM,LWMDIM,0,ZERO,ZERO)
+
+740     CONTINUE
+        ISTATE = -3
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+750     MSG = 'Run aborted:  apparent infinite loop.'
+        CALL XERRDV(MSG,1350,2,0,0,0,0,ZERO,ZERO)
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+      END SUBROUTINE DVODE
+!_______________________________________________________________________
+
+      SUBROUTINE DVHIN(N,T0,Y0,YDOT,F,TOUT,EWT,ITOL,ATOL,Y,TEMP,H0, &
+        NITER,IER)
+! ..
+! Calculate the initial step size.
+! ..
+! This routine computes the step size, H0, to be attempted on the
+! first step, when the user has not supplied a value for this.
+! First we check that TOUT - T0 differs significantly from zero. Then
+! an iteration is done to approximate the initial second derivative
+! and this is used to define h from w.r.m.s.norm(h**2 * yddot / 2) = 1.
+! A bias factor of 1/2 is applied to the resulting h.
+! The sign of H0 is inferred from the initial values of TOUT and T0.
+! Communication with DVHIN is done with the following variables:
+! N      = Size of ODE system, input.
+! T0     = Initial value of independent variable, input.
+! Y0     = Vector of initial conditions, input.
+! YDOT   = Vector of initial first derivatives, input.
+! F      = Name of subroutine for right-hand side f(t,y), input.
+! TOUT   = First output value of independent variable
+! UROUND = Machine unit roundoff
+! EWT, ITOL, ATOL = Error weights and tolerance parameters
+!                   as described in the driver routine, input.
+! Y, TEMP = Work arrays of length N.
+! H0     = Step size to be attempted, output.
+! NITER  = Number of iterations (and of f evaluations) to compute H0,
+!          output.
+! IER    = The error flag, returned with the value
+!          IER = 0  if no trouble occurred, or
+!          IER = -1 if TOUT and T0 are considered too close to proceed.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (INOUT) :: H0
+        REAL (WP), INTENT (IN) :: T0, TOUT
+        INTEGER :: IER
+        INTEGER, INTENT (IN) :: ITOL, N
+        INTEGER, INTENT (INOUT) :: NITER
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: ATOL(*), EWT(*), Y0(*)
+        REAL (WP), INTENT (INOUT) :: TEMP(*), Y(*), YDOT(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AFI, ATOLI, DELYI, H, HG, HLB, HNEW, HRAT, HUB, T1, &
+          TDIST, TROUND, YDDNRM
+        INTEGER :: I, ITER
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, SIGN, SQRT
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVHIN
+! ..
+        NITER = 0
+        TDIST = ABS(TOUT-T0)
+        TROUND = UROUND*MAX(ABS(T0),ABS(TOUT))
+        IF (TDIST<TWO*TROUND) GOTO 40
+
+!       Set a lower bound on H based on the roundoff level in T0
+!       and TOUT.
+        HLB = HUN*TROUND
+!       Set an upper bound on H based on TOUT-T0 and the initial
+!       Y and YDOT.
+        HUB = PT1*TDIST
+        ATOLI = ATOL(1)
+        DO I = 1, N
+          IF (ITOL==2 .OR. ITOL==4) ATOLI = ATOL(I)
+          DELYI = PT1*ABS(Y0(I)) + ATOLI
+          AFI = ABS(YDOT(I))
+          IF (AFI*HUB>DELYI) HUB = DELYI/AFI
+        END DO
+!       Set initial guess for H as geometric mean of upper and
+!       lower bounds.
+        ITER = 0
+        HG = SQRT(HLB*HUB)
+!       If the bounds have crossed, exit with the mean value.
+        IF (HUB<HLB) THEN
+          H0 = HG
+          GOTO 30
+        END IF
+
+!       Looping point for iteration.
+10      CONTINUE
+!       Estimate the second derivative as a difference quotient in f.
+        H = SIGN(HG,TOUT-T0)
+        T1 = T0 + H
+        Y(1:N) = Y0(1:N) + H*YDOT(1:N)
+        CALL F(N,T1,Y,TEMP)
+        NFE = NFE + 1
+        TEMP(1:N) = (TEMP(1:N)-YDOT(1:N))/H
+        YDDNRM = DVNORM(N,TEMP,EWT)
+!       Get the corresponding new value of h.
+        IF (YDDNRM*HUB*HUB>TWO) THEN
+          HNEW = SQRT(TWO/YDDNRM)
+        ELSE
+          HNEW = SQRT(HG*HUB)
+        END IF
+        ITER = ITER + 1
+
+! Test the stopping conditions.
+! Stop if the new and previous h values differ by a factor of < 2.
+! Stop if four iterations have been done. Also, stop with previous h
+! if HNEW/HG > 2 after first iteration, as this probably means that
+! the second derivative value is bad because of cancellation error.
+
+        IF (ITER>=4) GOTO 20
+        HRAT = HNEW/HG
+        IF ((HRAT>HALF) .AND. (HRAT<TWO)) GOTO 20
+        IF ((ITER>=2) .AND. (HNEW>TWO*HG)) THEN
+          HNEW = HG
+          GOTO 20
+        END IF
+        HG = HNEW
+        GOTO 10
+
+!       Iteration done. Apply bounds, bias factor, and sign. Then exit.
+20      H0 = HNEW*HALF
+        IF (H0<HLB) H0 = HLB
+        IF (H0>HUB) H0 = HUB
+30      H0 = SIGN(H0,TOUT-T0)
+        NITER = ITER
+        IER = 0
+        RETURN
+!       Error return for TOUT - T0 too small.
+40      IER = -1
+        RETURN
+
+      END SUBROUTINE DVHIN
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY_CORE(T,K,YH,LDYH,DKY,IFLAG)
+! ..
+! Interpolate the solution and derivative.
+! ..
+! DVINDY_CORE computes interpolated values of the K-th derivative
+! of the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! The formula for DKY is:
+!              q
+!  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+!             j=K
+! where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+! The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+! communicated by PRIVATE variables. The above sum is done in reverse
+! order.
+! IFLAG is returned negative if either K or T is out of bounds.
+! Discussion above and comments in driver explain all variables.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K, LDYH
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: DKY(*), YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: C, R, S, TFUZZ, TN1, TP
+        INTEGER :: IC, J, JB, JB2, JJ, JJ1, JP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY_CORE
+! ..
+        IFLAG = 0
+        IF (K<0 .OR. K>NQ) GOTO 40
+!       TFUZZ = HUN * UROUND * (TN + HU)
+        TFUZZ = HUN*UROUND*SIGN(ABS(TN)+ABS(HU),HU)
+        TP = TN - HU - TFUZZ
+        TN1 = TN + TFUZZ
+        IF ((T-TP)*(T-TN1)>ZERO) GOTO 50
+        S = (T-TN)/H
+        IC = 1
+        IF (K==0) GOTO 10
+        JJ1 = L - K
+        DO JJ = JJ1, NQ
+          IC = IC*JJ
+        END DO
+10      C = REAL(IC)
+        DKY(1:N) = C*YH(1:N,L)
+        IF (K==NQ) GOTO 30
+        JB2 = NQ - K
+        DO JB = 1, JB2
+          J = NQ - JB
+          JP1 = J + 1
+          IC = 1
+          IF (K==0) GOTO 20
+          JJ1 = JP1 - K
+          DO JJ = JJ1, J
+            IC = IC*JJ
+          END DO
+20        C = REAL(IC)
+          DKY(1:N) = C*YH(1:N,JP1) + S*DKY(1:N)
+        END DO
+30      R = H**(-K)
+        CALL DSCAL_F90(N,R,DKY,1)
+        RETURN
+40      MSG = 'Error in DVINDY, K(=I1) is illegal.'
+        CALL XERRDV(MSG,1360,1,1,K,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+50      MSG = 'Error in DVINDY, T(=R1) is illegal. T is not'
+        CALL XERRDV(MSG,1370,1,0,0,0,1,T,ZERO)
+        MSG = 'in interval TCUR - HU(= R1) to TCUR(=R2)'
+        CALL XERRDV(MSG,1370,1,0,0,0,2,TP,TN)
+        IFLAG = -2
+        RETURN
+
+      END SUBROUTINE DVINDY_CORE
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY_BNDS(T,K,YH,LDYH,DKY,IFLAG)
+! ..
+! Interpolate the solution and derivative and enforce nonnegativity
+! (used only if user calls DVINDY and the BOUNDS option is in
+! use).
+! ..
+! This version of DVINDY_CORE enforces nonnegativity and is called
+! only by DVINDY (which is called only by the user). It uses the
+! private YNNEG array produced by a call to DVINDY_CORE from DVINDY
+! to enforce nonnegativity.
+! DVINDY_BNDS computes interpolated values of the K-th derivative
+! of the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! The formula for DKY is:
+!              q
+!  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+!             j=K
+! where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+! The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+! communicated by PRIVATE variables. The above sum is done in reverse
+! order.
+! IFLAG is returned negative if either K or T is out of bounds.
+! Discussion above and comments in driver explain all variables.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K, LDYH
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: DKY(*), YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: C, R, S, TFUZZ, TN1, TP
+        INTEGER :: I, IC, J, JB, JB2, JJ, JJ1, JP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY_BNDS
+! ..
+        IFLAG = 0
+        IF (K==0) GOTO 50
+        IF (K<0 .OR. K>NQ) GOTO 40
+!       TFUZZ = HUN * UROUND * (TN + HU)
+        TFUZZ = HUN*UROUND*SIGN(ABS(TN)+ABS(HU),HU)
+        TP = TN - HU - TFUZZ
+        TN1 = TN + TFUZZ
+        IF ((T-TP)*(T-TN1)>ZERO) GOTO 60
+        S = (T-TN)/H
+        IC = 1
+        IF (K==0) GOTO 10
+        JJ1 = L - K
+        DO JJ = JJ1, NQ
+          IC = IC*JJ
+        END DO
+10      C = REAL(IC)
+        DKY(1:N) = C*YH(1:N,L)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (YNNEG(IDX(I))<LB(I) .OR. YNNEG(IDX(I))>UB(I)) DKY(IDX(I)) &
+              = ZERO
+          END DO
+        END IF
+        IF (K==NQ) GOTO 30
+        JB2 = NQ - K
+        DO JB = 1, JB2
+          J = NQ - JB
+          JP1 = J + 1
+          IC = 1
+          IF (K==0) GOTO 20
+          JJ1 = JP1 - K
+          DO JJ = JJ1, J
+            IC = IC*JJ
+          END DO
+20        C = REAL(IC)
+          DKY(1:N) = C*YH(1:N,JP1) + S*DKY(1:N)
+          IF (BOUNDS) THEN
+            DO I = 1, NDX
+              IF (YNNEG(IDX(I))<LB(I) .OR. YNNEG(IDX(I))>UB(I)) DKY(IDX(I)) &
+                = ZERO
+            END DO
+          END IF
+        END DO
+30      R = H**(-K)
+        CALL DSCAL_F90(N,R,DKY,1)
+        RETURN
+40      MSG = 'Error in DVINDY, K(=I1) is illegal.'
+        CALL XERRDV(MSG,1380,1,1,K,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+50      MSG = 'DVINDY_BNDS cannot be called with k = 0.'
+        CALL XERRDV(MSG,1390,1,0,0,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+60      MSG = 'Error in DVINDY, T(=R1) is illegal. T is not'
+        CALL XERRDV(MSG,1400,1,0,0,0,1,T,ZERO)
+        MSG = 'not in interval TCUR - HU(= R1) to TCUR(=R2)'
+        CALL XERRDV(MSG,1400,1,0,0,0,2,TP,TN)
+        IFLAG = -2
+        RETURN
+
+      END SUBROUTINE DVINDY_BNDS
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY(T,K,DKY,IFLAG)
+! ..
+! This is a dummy interface to allow the user to interpolate the
+! solution and the derivative (not called by DVODE_F90).
+! ..
+! May be used if the user wishes to interpolate solution or
+! derivative following a successful return from DVODE_F90
+! DVINDY computes interpolated values of the K-th derivative of
+! the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! IFLAG is returned negative if either K or T is out of bounds.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: DKY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IER
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY
+! ..
+        CALL DVINDY_CORE(T,K,RWORK(LYH),N,DKY,IFLAG)
+        IF (.NOT.BOUNDS) RETURN
+
+        IF (K==0) THEN
+!         Interpolate only the solution.
+          CALL DVINDY_CORE(T,K,RWORK(LYH),N,DKY,IFLAG)
+!         Enforce bounds.
+          DO I = 1, NDX
+            IF (DKY(IDX(I))<LB(I)) DKY(IDX(I)) = LB(I)
+            IF (DKY(IDX(I))>UB(I)) DKY(IDX(I)) = UB(I)
+          END DO
+          RETURN
+        END IF
+
+!       k > 0 - derivatives requested.
+
+!       Make sure space is available for the interpolated solution.
+        IF (ALLOCATED(YNNEG)) THEN
+          IF (SIZE(YNNEG)<N) THEN
+            DEALLOCATE (YNNEG,STAT=IER)
+            CALL CHECK_STAT(IER,460)
+            ALLOCATE (YNNEG(N),STAT=IER)
+            CALL CHECK_STAT(IER,470)
+          END IF
+        ELSE
+          ALLOCATE (YNNEG(N),STAT=IER)
+          CALL CHECK_STAT(IER,480)
+        END IF
+!       Interpolate the solution; do not enforce bounds.
+        CALL DVINDY_CORE(T,0,RWORK(LYH),N,YNNEG,IFLAG)
+!       Now interpolate the derivative using YNNEG to enforce
+!       nonnegativity.
+        CALL DVINDY_BNDS(T,K,RWORK(LYH),N,DKY,IFLAG)
+        RETURN
+
+      END SUBROUTINE DVINDY
+!_______________________________________________________________________
+
+      SUBROUTINE DVSTEP(Y,YH,LDYH,YH1,EWT,SAVF,ACOR,WM,IWM,F,JAC, &
+        VNLS,ATOL,ITOL)
+! ..
+! This is the core step integrator for nonstiff and for dense, banded,
+! and sparse solutions.
+! ..
+! DVSTEP performs one step of the integration of an initial value
+! problem for a system of ordinary differential equations. It
+! calls subroutine DVNLSD for the solution of the nonlinear system
+! arising in the time step. Thus it is independent of the problem
+! Jacobian structure and the type of nonlinear system solution method.
+! DVSTEP returns a completion flag KFLAG (in PRIVATE variables block).
+! A return with KFLAG = -1 or -2 means either ABS(H) = HMIN or 10
+! consecutive failures occurred. On a return with KFLAG negative,
+! the values of TN and the YH array are as of the beginning of the last
+! step, and H is the last step size attempted.
+! Communication with DVSTEP is done with the following variables:
+! Y      = An array of length N used for the dependent variable vector.
+! YH     = An LDYH by LMAX array containing the dependent variables
+!          and their approximate scaled derivatives, where
+!          LMAX = MAXORD + 1. YH(i,j+1) contains the approximate
+!          j-th derivative of y(i), scaled by H**j/factorial(j)
+!          (j = 0,1,...,NQ). On entry for the first step, the first
+!          two columns of YH must be set from the initial values.
+! LDYH   = A constant integer >= N, the first dimension of YH.
+!          N is the number of ODEs in the system.
+! YH1    = A one-dimensional array occupying the same space as YH.
+! EWT    = An array of length N containing multiplicative weights
+!          for local error measurements. Local errors in y(i) are
+!          compared to 1.0/EWT(i) in various error tests.
+! SAVF   = An array of working storage, of length N.
+!          also used for input of YH(*,MAXORD+2) when JSTART = -1
+!          and MAXORD < the current order NQ.
+! ACOR   = A work array of length N, used for the accumulated
+!          corrections. On a successful return, ACOR(i) contains
+!          the estimated one-step local error in y(i).
+! WM,IWM = Real and integer work arrays associated with matrix
+!          operations in DVNLSD.
+! F      = Dummy name for the user supplied subroutine for f.
+! JAC    = Dummy name for the user supplied Jacobian subroutine.
+! DVNLSD = Dummy name for the nonlinear system solving subroutine,
+!          whose real name is dependent on the method used.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: LDYH, ITOL
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*), YH1(*)
+        REAL (WP), INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC, VNLS
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: CNQUOT, DDN, DSM, DUP, ETAQ, ETAQM1, ETAQP1, FLOTL, R, &
+          TOLD
+        INTEGER :: I, I1, I2, IBACK, J, JB, NCF, NFLAG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSTEP
+! ..
+        KFLAG = 0
+        TOLD = TN
+        NCF = 0
+        JCUR = 0
+        NFLAG = 0
+        IF (JSTART>0) GOTO 10
+        IF (JSTART==-1) GOTO 30
+
+! On the first call, the order is set to 1, and other variables are
+! initialized. ETAMAX is the maximum ratio by which H can be increased
+! in a single step. It is normally 10, but is larger during the first
+! step to compensate for the small initial H. If a failure occurs
+! (in corrector convergence or error test), ETAMAX is set to 1 for
+! the next increase.
+
+        LMAX = MAXORD + 1
+        NQ = 1
+        L = 2
+        NQNYH = NQ*LDYH
+        TAU(1) = H
+        PRL1 = ONE
+        RC = ZERO
+        ETAMAX = ETAMX1
+        NQWAIT = 2
+        HSCAL = H
+        GOTO 70
+
+! Take preliminary actions on a normal continuation step (JSTART > 0).
+! If the driver changed H, then ETA must be reset and NEWH set to 1.
+! If a change of order was dictated on the previous step, then it is
+! done here and appropriate adjustments in the history are made.
+! On an order decrease, the history array is adjusted by DVJUST.
+! On an order increase, the history array is augmented by a column.
+! On a change of step size H, the history array YH is rescaled.
+
+10      CONTINUE
+        IF (KUTH==1) THEN
+          ETA = MIN(ETA,H/HSCAL)
+          NEWH = 1
+        END IF
+20      IF (NEWH==0) GOTO 70
+        IF (NEWQ==NQ) GOTO 60
+        IF (NEWQ<NQ) THEN
+          CALL DVJUST(YH,LDYH,-1)
+          NQ = NEWQ
+          L = NQ + 1
+          NQWAIT = L
+          GOTO 60
+        END IF
+        IF (NEWQ>NQ) THEN
+          CALL DVJUST(YH,LDYH,1)
+          NQ = NEWQ
+          L = NQ + 1
+          NQWAIT = L
+          GOTO 60
+        END IF
+
+! The following block handles preliminaries needed when JSTART = -1.
+! If N was reduced, zero out part of YH to avoid undefined references.
+! If MAXORD was reduced to a value less than the tentative order NEWQ,
+! then NQ is set to MAXORD, and a new H ratio ETA is chosen.
+! Otherwise, we take the same preliminary actions as for JSTART > 0.
+! In any case, NQWAIT is reset to L = NQ + 1 to prevent further
+! changes in order for that many steps. The new H ratio ETA is
+! limited by the input H if KUTH = 1, by HMIN if KUTH = 0, and by
+! HMXI in any case. Finally, the history array YH is rescaled.
+
+30      CONTINUE
+        LMAX = MAXORD + 1
+        IF (N==LDYH) GOTO 40
+        I1 = 1 + (NEWQ+1)*LDYH
+        I2 = (MAXORD+1)*LDYH
+        IF (I1>I2) GOTO 40
+        YH1(I1:I2) = ZERO
+40      IF (NEWQ<=MAXORD) GOTO 50
+        FLOTL = REAL(LMAX)
+        IF (MAXORD<NQ-1) THEN
+          DDN = DVNORM(N,SAVF,EWT)/TQ(1)
+          ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL)+ADDON)
+        END IF
+        IF (MAXORD==NQ .AND. NEWQ==NQ+1) ETA = ETAQ
+        IF (MAXORD==NQ-1 .AND. NEWQ==NQ+1) THEN
+          ETA = ETAQM1
+          CALL DVJUST(YH,LDYH,-1)
+        END IF
+        IF (MAXORD==NQ-1 .AND. NEWQ==NQ) THEN
+          DDN = DVNORM(N,SAVF,EWT)/TQ(1)
+          ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL)+ADDON)
+          CALL DVJUST(YH,LDYH,-1)
+        END IF
+        ETA = MIN(ETA,ONE)
+        NQ = MAXORD
+        L = LMAX
+50      IF (KUTH==1) ETA = MIN(ETA,ABS(H/HSCAL))
+        IF (KUTH==0) ETA = MAX(ETA,HMIN/ABS(HSCAL))
+        ETA = ETA/MAX(ONE,ABS(HSCAL)*HMXI*ETA)
+        NEWH = 1
+        NQWAIT = L
+        IF (NEWQ<=MAXORD) GOTO 20
+!       Rescale the history array for a change in H by a factor of ETA.
+60      R = ONE
+        DO J = 2, L
+          R = R*ETA
+! Original:
+!         CALL DSCAL_F90(N,R,YH(1,J),1)
+          CALL DSCAL_F90(N,R,YH(1:N,J),1)
+        END DO
+        H = HSCAL*ETA
+        HSCAL = H
+        RC = RC*ETA
+        NQNYH = NQ*LDYH
+
+! This section computes the predicted values by effectively
+! multiplying the YH array by the Pascal triangle matrix.
+! DVSET is called to calculate all integration coefficients.
+! RC is the ratio of new to old values of the coefficient
+! H/EL(2)=h/l1.
+
+70      TN = TN + H
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) + YH1(I+LDYH)
+          END DO
+        END DO
+        CALL DVSET
+        RL1 = ONE/EL(2)
+        RC = RC*(RL1/PRL1)
+        PRL1 = RL1
+
+!       Call the nonlinear system solver.
+
+        CALL VNLS(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC,NFLAG, &
+          ATOL,ITOL)
+
+        IF (NFLAG==0) GOTO 80
+
+! The DVNLSD routine failed to achieve convergence (NFLAG /= 0).
+! The YH array is retracted to its values before prediction.
+! The step size H is reduced and the step is retried, if possible.
+! Otherwise, an error exit is taken.
+
+        NCF = NCF + 1
+        NCFN = NCFN + 1
+        ETAMAX = ONE
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) - YH1(I+LDYH)
+          END DO
+        END DO
+        IF (NFLAG<-1) GOTO 240
+        IF (ABS(H)<=HMIN*ONEPSM) GOTO 230
+!       IF (NCF==MXNCF) GOTO 230
+        IF (NCF==CONSECUTIVE_CFAILS) GOTO 230
+        ETA = ETACF
+        ETA = MAX(ETA,HMIN/ABS(H))
+        NFLAG = -1
+        GOTO 60
+
+! The corrector has converged (NFLAG = 0). The local error test is
+! made and control passes to statement 500 if it fails.
+
+80      CONTINUE
+        DSM = ACNRM/TQ(2)
+        IF (DSM>ONE) GOTO 100
+
+! After a successful step, update the YH and TAU arrays and decrement
+! NQWAIT. If NQWAIT is then 1 and NQ < MAXORD, then ACOR is saved
+! for use in a possible order increase on the next step.
+! If ETAMAX = 1 (a failure occurred this step), keep NQWAIT >= 2.
+
+        KFLAG = 0
+        NST = NST + 1
+        HU = H
+        NQU = NQ
+        DO IBACK = 1, NQ
+          I = L - IBACK
+          TAU(I+1) = TAU(I)
+        END DO
+        TAU(1) = H
+
+        IF (BOUNDS) THEN
+! Original:
+!         CALL DAXPY_F90(N,EL(1),ACOR,1,YH(1,1),1)
+!         CALL DAXPY_F90(N,EL(2),ACOR,1,YH(1,2),1)
+          CALL DAXPY_F90(N,EL(1),ACOR,1,YH(1:N,1),1)
+          CALL DAXPY_F90(N,EL(2),ACOR,1,YH(1:N,2),1)
+!         Take care of roundoff causing y(t) to be slightly unequal
+!         to the constraint bound.
+          DO J = 1, NDX
+            YH(IDX(J),1) = MAX(YH(IDX(J),1),LB(J))
+            Y(IDX(J)) = MAX(Y(IDX(J)),LB(J))
+            YH(IDX(J),1) = MIN(YH(IDX(J),1),UB(J))
+            Y(IDX(J)) = MIN(Y(IDX(J)),UB(J))
+          END DO
+!         Update the higher derivatives and project to zero if necessary.
+          IF (L>2) THEN
+            DO J = 3, L
+! Original:
+!             CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1,J),1)
+              CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1:N,J),1)
+            END DO
+          END IF
+        ELSE
+!         Proceed as usual.
+          DO J = 1, L
+! Original:
+!           CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1,J),1)
+            CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1:N,J),1)
+          END DO
+        END IF
+
+        NQWAIT = NQWAIT - 1
+        IF ((L==LMAX) .OR. (NQWAIT/=1)) GOTO 90
+! Original:
+!       CALL DCOPY_F90(N,ACOR,1,YH(1,LMAX),1)
+        CALL DCOPY_F90(N,ACOR,1,YH(1:N,LMAX),1)
+        CONP = TQ(5)
+90      IF (ABS(ETAMAX-ONE)>0) GOTO 130
+        IF (NQWAIT<2) NQWAIT = 2
+        NEWQ = NQ
+        NEWH = 0
+        ETA = ONE
+        HNEW = H
+        GOTO 250
+
+! The error test failed. KFLAG keeps track of multiple failures.
+! Restore TN and the YH array to their previous values, and prepare
+! to try the step again. Compute the optimum step size for the
+! same order. After repeated failures, H is forced to decrease
+! more rapidly.
+
+100     KFLAG = KFLAG - 1
+        NETF = NETF + 1
+        NFLAG = -2
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) - YH1(I+LDYH)
+          END DO
+        END DO
+        IF (ABS(H)<=HMIN*ONEPSM) GOTO 220
+        ETAMAX = ONE
+        IF (KFLAG<=KFC) GOTO 110
+!       Compute ratio of new H to current H at the current order.
+        FLOTL = REAL(L)
+        ETA = ONE/((BIAS2*DSM)**(ONE/FLOTL)+ADDON)
+        ETA = MAX(ETA,HMIN/ABS(H),ETAMIN)
+        IF ((KFLAG<=-2) .AND. (ETA>ETAMXF)) ETA = ETAMXF
+        GOTO 60
+
+! Control reaches this section if 3 or more consecutive failures
+! have occurred. It is assumed that the elements of the YH array
+! have accumulated errors of the wrong order. The order is reduced
+! by one, if possible. Then H is reduced by a factor of 0.1 and
+! the step is retried. After a total of 7 consecutive failures,
+! an exit is taken with KFLAG = -1.
+
+!110     IF (KFLAG==KFH) GOTO 220
+110     IF (KFLAG==CONSECUTIVE_EFAILS) GOTO 220
+        IF (NQ==1) GOTO 120
+        ETA = MAX(ETAMIN,HMIN/ABS(H))
+        CALL DVJUST(YH,LDYH,-1)
+        L = NQ
+        NQ = NQ - 1
+        NQWAIT = L
+        GOTO 60
+120     ETA = MAX(ETAMIN,HMIN/ABS(H))
+        H = H*ETA
+        HSCAL = H
+        TAU(1) = H
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        YH(1:N,2) = H*SAVF(1:N)
+        NQWAIT = 10
+        GOTO 70
+
+! If NQWAIT = 0, an increase or decrease in order by one is considered.
+! Factors ETAQ, ETAQM1, ETAQP1 are computed by which H could be
+! multiplied at order q, q-1, or q+1, respectively. The largest of
+! these is determined, and the new order and step size set accordingly.
+! A change of H or NQ is made only if H increases by at least a factor
+! of THRESH. If an order change is considered and rejected, then NQWAIT
+! is set to 2 (reconsider it after 2 steps).
+
+!       Compute ratio of new H to current H at the current order.
+130     FLOTL = REAL(L)
+        ETAQ = ONE/((BIAS2*DSM)**(ONE/FLOTL)+ADDON)
+        IF (NQWAIT/=0) GOTO 170
+        NQWAIT = 2
+        ETAQM1 = ZERO
+        IF (NQ==1) GOTO 140
+!       Compute ratio of new H to current H at the current order
+!       less one.
+! Original:
+!       DDN = DVNORM(N,YH(1,L),EWT)/TQ(1)
+        DDN = DVNORM(N,YH(1:N,L),EWT)/TQ(1)
+        ETAQM1 = ONE/((BIAS1*DDN)**(ONE/(FLOTL-ONE))+ADDON)
+140     ETAQP1 = ZERO
+        IF (L==LMAX) GOTO 150
+!       Compute ratio of new H to current H at current order plus one.
+        CNQUOT = (TQ(5)/CONP)*(H/TAU(2))**L
+        SAVF(1:N) = ACOR(1:N) - CNQUOT*YH(1:N,LMAX)
+        DUP = DVNORM(N,SAVF,EWT)/TQ(3)
+        ETAQP1 = ONE/((BIAS3*DUP)**(ONE/(FLOTL+ONE))+ADDON)
+150     IF (ETAQ>=ETAQP1) GOTO 160
+        IF (ETAQP1>ETAQM1) GOTO 190
+        GOTO 180
+160     IF (ETAQ<ETAQM1) GOTO 180
+170     ETA = ETAQ
+        NEWQ = NQ
+        GOTO 200
+180     ETA = ETAQM1
+        NEWQ = NQ - 1
+        GOTO 200
+190     ETA = ETAQP1
+        NEWQ = NQ + 1
+! Original:
+!       CALL DCOPY_F90(N,ACOR,1,YH(1,LMAX),1)
+        CALL DCOPY_F90(N,ACOR,1,YH(1:N,LMAX),1)
+!       Test tentative new H against THRESH, ETAMAX, and HMXI and
+!       then exit.
+200     IF (ETA<THRESH .OR. ABS(ETAMAX-ONE)<=ZERO) GOTO 210
+        ETA = MIN(ETA,ETAMAX)
+        ETA = ETA/MAX(ONE,ABS(H)*HMXI*ETA)
+        NEWH = 1
+        HNEW = H*ETA
+        GOTO 250
+210     NEWQ = NQ
+        NEWH = 0
+        ETA = ONE
+        HNEW = H
+        GOTO 250
+
+! All returns are made through this section.
+! On a successful return, ETAMAX is reset and ACOR is scaled.
+
+220     KFLAG = -1
+        GOTO 260
+230     KFLAG = -2
+        GOTO 260
+240     IF (NFLAG==-2) KFLAG = -3
+        IF (NFLAG==-3) KFLAG = -4
+        GOTO 260
+250     ETAMAX = ETAMX3
+        IF (NST<=10) ETAMAX = ETAMX2
+        R = ONE/TQ(2)
+
+        CALL DSCAL_F90(N,R,ACOR,1)
+260     JSTART = 1
+        RETURN
+
+      END SUBROUTINE DVSTEP
+!_______________________________________________________________________
+
+      SUBROUTINE DVSET
+! ..
+! Set the integration coefficients for DVSTEP.
+! ..
+! For each order NQ, the coefficients in EL are calculated by use
+! of the generating polynomial lambda(x), with coefficients EL(i).
+!      lambda(x) = EL(1) + EL(2)*x + ... + EL(NQ+1)*(x**NQ).
+! For the backward differentiation formulas,
+!                                     NQ-1
+!      lambda(x) = (1 + x/xi*(NQ)) * product (1 + x/xi(i)) .
+!                                     i = 1
+! For the Adams formulas,
+!                              NQ-1
+!      (d/dx) lambda(x) = c * product (1 + x/xi(i)),
+!                              i = 1
+!      lambda(-1) = 0,    lambda(0) = 1,
+! where c is a normalization constant.
+! In both cases, xi(i) is defined by
+!      H*xi(i) = t sub n - t sub (n-i)
+!              = H + TAU(1) + TAU(2) + ... TAU(i-1).
+! In addition to variables described previously, communication
+! with DVSET uses the following:
+!   TAU    = A vector of length 13 containing the past NQ values
+!            of H.
+!   EL     = A vector of length 13 in which vset stores the
+!            coefficients for the corrector formula.
+!   TQ     = A vector of length 5 in which vset stores constants
+!            used for the convergence test, the error test, and the
+!            selection of H at a new order.
+!   METH   = The basic method indicator.
+!   NQ     = The current order.
+!   L      = NQ + 1, the length of the vector stored in EL, and
+!            the number of columns of the YH array being used.
+!   NQWAIT = A counter controlling the frequency of order changes.
+!            An order change is about to be considered if NQWAIT = 1.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AHATN0, ALPH0, CNQM1, CSUM, ELP, EM0, FLOTI, FLOTL, &
+          FLOTNQ, HSUM, RXI, RXIS, S, T1, T2, T3, T4, T5, T6, XI
+        INTEGER :: I, IBACK, J, JP1, NQM1, NQM2
+! ..
+! .. Local Arrays ..
+        REAL (WP) :: EM(13)
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSET
+! ..
+        FLOTL = REAL(L)
+        NQM1 = NQ - 1
+        NQM2 = NQ - 2
+        GOTO (10,40) METH
+
+!       Set coefficients for Adams methods.
+10      IF (NQ/=1) GOTO 20
+        EL(1) = ONE
+        EL(2) = ONE
+        TQ(1) = ONE
+        TQ(2) = TWO
+        TQ(3) = SIX*TQ(2)
+        TQ(5) = ONE
+        GOTO 60
+20      HSUM = H
+        EM(1) = ONE
+        FLOTNQ = FLOTL - ONE
+        EM(2:L) = ZERO
+        DO J = 1, NQM1
+          IF ((J/=NQM1) .OR. (NQWAIT/=1)) GOTO 30
+          S = ONE
+          CSUM = ZERO
+          DO I = 1, NQM1
+            CSUM = CSUM + S*EM(I)/REAL(I+1)
+            S = -S
+          END DO
+          TQ(1) = EM(NQM1)/(FLOTNQ*CSUM)
+30        RXI = H/HSUM
+          DO IBACK = 1, J
+            I = (J+2) - IBACK
+            EM(I) = EM(I) + EM(I-1)*RXI
+          END DO
+          HSUM = HSUM + TAU(J)
+        END DO
+!       Compute integral from -1 to 0 of polynomial and of x times it.
+        S = ONE
+        EM0 = ZERO
+        CSUM = ZERO
+        DO I = 1, NQ
+          FLOTI = REAL(I)
+          EM0 = EM0 + S*EM(I)/FLOTI
+          CSUM = CSUM + S*EM(I)/(FLOTI+ONE)
+          S = -S
+        END DO
+!       In EL, form coefficients of normalized integrated polynomial.
+        S = ONE/EM0
+        EL(1) = ONE
+        DO I = 1, NQ
+          EL(I+1) = S*EM(I)/REAL(I)
+        END DO
+        XI = HSUM/H
+        TQ(2) = XI*EM0/CSUM
+        TQ(5) = XI/EL(L)
+        IF (NQWAIT/=1) GOTO 60
+!       For higher order control constant, multiply polynomial by
+!       1+x/xi(q).
+        RXI = ONE/XI
+        DO IBACK = 1, NQ
+          I = (L+1) - IBACK
+          EM(I) = EM(I) + EM(I-1)*RXI
+        END DO
+!       Compute integral of polynomial.
+        S = ONE
+        CSUM = ZERO
+        DO I = 1, L
+          CSUM = CSUM + S*EM(I)/REAL(I+1)
+          S = -S
+        END DO
+        TQ(3) = FLOTL*EM0/CSUM
+        GOTO 60
+
+!       Set coefficients for BDF methods.
+40      EL(3:L) = ZERO
+        EL(1) = ONE
+        EL(2) = ONE
+        ALPH0 = -ONE
+        AHATN0 = -ONE
+        HSUM = H
+        RXI = ONE
+        RXIS = ONE
+        IF (NQ==1) GOTO 50
+        DO J = 1, NQM2
+!       In EL, construct coefficients of (1+x/xi(1))*...*(1+x/xi(j+1)).
+          HSUM = HSUM + TAU(J)
+          RXI = H/HSUM
+          JP1 = J + 1
+          ALPH0 = ALPH0 - ONE/REAL(JP1)
+          DO IBACK = 1, JP1
+            I = (J+3) - IBACK
+            EL(I) = EL(I) + EL(I-1)*RXI
+          END DO
+        END DO
+        ALPH0 = ALPH0 - ONE/REAL(NQ)
+        RXIS = -EL(2) - ALPH0
+        HSUM = HSUM + TAU(NQM1)
+        RXI = H/HSUM
+        AHATN0 = -EL(2) - RXI
+        DO IBACK = 1, NQ
+          I = (NQ+2) - IBACK
+          EL(I) = EL(I) + EL(I-1)*RXIS
+        END DO
+50      T1 = ONE - AHATN0 + ALPH0
+        T2 = ONE + REAL(NQ)*T1
+        TQ(2) = ABS(ALPH0*T2/T1)
+        TQ(5) = ABS(T2/(EL(L)*RXI/RXIS))
+        IF (NQWAIT/=1) GOTO 60
+        CNQM1 = RXIS/EL(L)
+        T3 = ALPH0 + ONE/REAL(NQ)
+        T4 = AHATN0 + RXI
+        ELP = T3/(ONE-T4+T3)
+        TQ(1) = ABS(ELP/CNQM1)
+        HSUM = HSUM + TAU(NQ)
+        RXI = H/HSUM
+        T5 = ALPH0 - ONE/REAL(NQ+1)
+        T6 = AHATN0 - RXI
+        ELP = T2/(ONE-T6+T5)
+        TQ(3) = ABS(ELP*RXI*(FLOTL+ONE)*T5)
+60      TQ(4) = CORTES*TQ(2)
+        RETURN
+
+      END SUBROUTINE DVSET
+!_______________________________________________________________________
+
+      SUBROUTINE DVJUST(YH,LDYH,IORD)
+! ..
+! Adjust the Nordsieck array.
+! ..
+! This subroutine adjusts the YH array on reduction of order, and
+! also when the order is increased for the stiff option (METH = 2).
+! Communication with DVJUST uses the following:
+! IORD  = An integer flag used when METH = 2 to indicate an order
+!         increase (IORD = +1) or an order decrease (IORD = -1).
+! HSCAL = Step size H used in scaling of Nordsieck array YH.
+!         (If IORD = +1, DVJUST assumes that HSCAL = TAU(1).)
+! See References 1 and 2 for details.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: IORD, LDYH
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: ALPH0, ALPH1, HSUM, PROD, T1, XI, XIOLD
+        INTEGER :: I, IBACK, J, JP1, LP1, NQM1, NQM2, NQP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJUST
+! ..
+        IF ((NQ==2) .AND. (IORD/=1)) RETURN
+        NQM1 = NQ - 1
+        NQM2 = NQ - 2
+        GOTO (10,30) METH
+
+!       Nonstiff option.
+
+!       Check to see if the order is being increased or decreased.
+10      CONTINUE
+        IF (IORD==1) GOTO 20
+!       Order decrease.
+        EL(1:LMAX) = ZERO
+        EL(2) = ONE
+        HSUM = ZERO
+        DO J = 1, NQM2
+!         Construct coefficients of x*(x+xi(1))*...*(x+xi(j)).
+          HSUM = HSUM + TAU(J)
+          XI = HSUM/HSCAL
+          JP1 = J + 1
+          DO IBACK = 1, JP1
+            I = (J+3) - IBACK
+            EL(I) = EL(I)*XI + EL(I-1)
+          END DO
+        END DO
+!       Construct coefficients of integrated polynomial.
+        DO J = 2, NQM1
+          EL(J+1) = REAL(NQ)*EL(J)/REAL(J)
+        END DO
+!       Subtract correction terms from YH array.
+        DO J = 3, NQ
+          DO I = 1, N
+            YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+          END DO
+        END DO
+        RETURN
+!       Order increase.
+!       Zero out next column in YH array.
+20      CONTINUE
+        LP1 = L + 1
+        YH(1:N,LP1) = ZERO
+        RETURN
+
+!       Stiff option.
+
+!       Check to see if the order is being increased or decreased.
+30      CONTINUE
+        IF (IORD==1) GOTO 40
+!       Order decrease.
+        EL(1:LMAX) = ZERO
+        EL(3) = ONE
+        HSUM = ZERO
+        DO J = 1, NQM2
+!     Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)).
+          HSUM = HSUM + TAU(J)
+          XI = HSUM/HSCAL
+          JP1 = J + 1
+          DO IBACK = 1, JP1
+            I = (J+4) - IBACK
+            EL(I) = EL(I)*XI + EL(I-1)
+          END DO
+        END DO
+!       Subtract correction terms from YH array.
+        DO J = 3, NQ
+          YH(1:N,J) = YH(1:N,J) - YH(1:N,L)*EL(J)
+        END DO
+        RETURN
+!       Order increase.
+40      EL(1:LMAX) = ZERO
+        EL(3) = ONE
+        ALPH0 = -ONE
+        ALPH1 = ONE
+        PROD = ONE
+        XIOLD = ONE
+        HSUM = HSCAL
+        IF (NQ==1) GOTO 50
+        DO J = 1, NQM1
+!       Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)).
+          JP1 = J + 1
+          HSUM = HSUM + TAU(JP1)
+          XI = HSUM/HSCAL
+          PROD = PROD*XI
+          ALPH0 = ALPH0 - ONE/REAL(JP1)
+          ALPH1 = ALPH1 + ONE/XI
+          DO IBACK = 1, JP1
+            I = (J+4) - IBACK
+            EL(I) = EL(I)*XIOLD + EL(I-1)
+          END DO
+          XIOLD = XI
+        END DO
+50      CONTINUE
+        T1 = (-ALPH0-ALPH1)/PROD
+!       Load column L+1 in YH array.
+        LP1 = L + 1
+        YH(1:N,LP1) = T1*YH(1:N,LMAX)
+!       Add correction terms to YH array.
+        NQP1 = NQ + 1
+        DO J = 3, NQP1
+! Original:
+!         CALL DAXPY_F90(N,EL(J),YH(1,LP1),1,YH(1,J),1)
+          CALL DAXPY_F90(N,EL(J),YH(1:N,LP1),1,YH(1:N,J),1)
+        END DO
+        RETURN
+
+      END SUBROUTINE DVJUST
+!_______________________________________________________________________
+
+      SUBROUTINE DVNLSD(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC,NFLAG,&
+        ATOL,ITOL)
+! ..
+! This is the nonlinear system solver for dense and banded solutions.
+! ..
+! Subroutine DVNLSD is a nonlinear system solver which uses functional
+! iteration or a chord (modified Newton) method. For the chord method
+! direct linear algebraic system solvers are used. Subroutine DVNLSD
+! then handles the corrector phase of this integration package.
+! Communication with DVNLSD is done with the following variables. (For
+! more details, please see the comments in the driver subroutine.)
+! Y          = The dependent variable, a vector of length N, input.
+! YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+!              and output. On input, it contains predicted values.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! SAVF       = A work array of length N.
+! EWT        = An error weight vector of length N, input.
+! ACOR       = A work array of length N, used for the accumulated
+!              corrections to the predicted y vector.
+! WM,IWM     = Real and integer work arrays associated with matrix
+!              operations in chord iteration (MITER /= 0).
+! F          = Dummy name for user supplied routine for f.
+! JAC        = Dummy name for user supplied Jacobian routine.
+! NFLAG      = Input/output flag, with values and meanings as follows:
+!              INPUT
+!                  0 first call for this time step.
+!                 -1 convergence failure in previous call to DVNLSD.
+!                 -2 error test failure in DVSTEP.
+!              OUTPUT
+!                  0 successful completion of nonlinear solver.
+!                 -1 convergence failure or singular matrix.
+!                 -2 unrecoverable error in matrix preprocessing
+!                    (cannot occur here).
+!                 -3 unrecoverable error in solution (cannot occur
+!                    here).
+! IPUP       = Own variable flag with values and meanings as follows:
+!              0,          do not update the Newton matrix.
+!              MITER /= 0  update Newton matrix, because it is the
+!                          initial step, order was changed, the error
+!                          test failed, or an update is indicated by
+!                          the scalar RC or step counter NST.
+! For more details, see comments in driver subroutine.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, LDYH
+        INTEGER, INTENT (INOUT) :: NFLAG
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*)
+        REAL (WP), INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: ACNRMNEW, CSCALE, DCON, DEL, DELP
+        INTEGER :: I, IERPJ, IERSL, M
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNLSD
+! ..
+! On the first step, on a change of method order, or after a
+! nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+! to force a Jacobian update when MITER /= 0.
+        IF (JSTART==0) NSLP = 0
+        IF (NFLAG==0) ICF = 0
+        IF (NFLAG==-2) IPUP = MITER
+        IF ((JSTART==0) .OR. (JSTART==-1)) IPUP = MITER
+!     If this is functional iteration, set CRATE = 1 and drop to 220
+        IF (MITER==0) THEN
+          CRATE = ONE
+          GOTO 10
+        END IF
+
+! RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER to
+! force DVJAC to be called, if a Jacobian is involved. In any case,
+! DVJAC is called at least every MSBP steps.
+
+        DRC = ABS(RC-ONE)
+        IF (DRC>CCMAX .OR. NST>=NSLP+MSBP) IPUP = MITER
+
+! Up to MAXCOR corrector iterations are taken. A convergence test is
+! made on the r.m.s. norm of each correction, weighted by the error
+! weight vector EWT. The sum of the corrections is accumulated in the
+! vector ACOR(i). The YH array is not altered in the corrector loop.
+
+10      M = 0
+        DELP = ZERO
+! Original:
+!       CALL DCOPY_F90(N,YH(1,1),1,Y,1)
+        CALL DCOPY_F90(N,YH(1:N,1),1,Y(1:N),1)
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+               MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+               MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        IF (IPUP<=0) GOTO 20
+
+! If indicated, the matrix P = I - h*rl1*J is reevaluated and
+! preprocessed before starting the corrector iteration. IPUP
+! is set to 0 as an indicator that this has been done.
+
+        CALL DVJAC(Y,YH,LDYH,EWT,ACOR,SAVF,WM,IWM,F,JAC,IERPJ, &
+          ATOL,ITOL)
+        IPUP = 0
+        RC = ONE
+        DRC = ZERO
+        CRATE = ONE
+        NSLP = NST
+!       If matrix is singular, take error return to force cut in
+!       step size.
+        IF (IERPJ/=0) GOTO 70
+20      ACOR(1:N) = ZERO
+!       This is a looping point for the corrector iteration.
+30      IF (MITER/=0) GOTO 40
+
+! In the case of functional iteration, update Y directly from
+! the result of the last function evaluation.
+
+        SAVF(1:N) = RL1*(H*SAVF(1:N)-YH(1:N,2))
+        Y(1:N) = SAVF(1:N) - ACOR(1:N)
+        DEL = DVNORM(N,Y,EWT)
+        Y(1:N) = YH(1:N,1) + SAVF(1:N)
+        CALL DCOPY_F90(N,SAVF,1,ACOR,1)
+        GOTO 50
+
+! In the case of the chord method, compute the corrector error, and
+! solve the linear system with that as right-hand side and P as
+! coefficient matrix. The correction is scaled by the factor
+! 2/(1+RC) to account for changes in h*rl1 since the last DVJAC call.
+
+40      Y(1:N) = (RL1*H)*SAVF(1:N) - (RL1*YH(1:N,2)+ACOR(1:N))
+        CALL DVSOL(WM,IWM,Y,IERSL)
+        NNI = NNI + 1
+        IF (IERSL>0) GOTO 60
+        IF (METH==2 .AND. ABS(RC-ONE)>ZERO) THEN
+          CSCALE = TWO/(ONE+RC)
+          CALL DSCAL_F90(N,CSCALE,Y,1)
+        END IF
+        DEL = DVNORM(N,Y,EWT)
+        CALL DAXPY_F90(N,ONE,Y,1,ACOR,1)
+        Y(1:N) = YH(1:N,1) + ACOR(1:N)
+
+! Test for convergence. If M > 0, an estimate of the convergence
+! rate constant is stored in CRATE, and this is used in the test.
+
+50      IF (M/=0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+        DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+        IF (DCON<=ONE) GOTO 80
+        M = M + 1
+        IF (M==MAXCOR) GOTO 60
+        IF (M>=2 .AND. DEL>RDIV*DELP) GOTO 60
+        DELP = DEL
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+               MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+               MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        GOTO 30
+
+60      IF (MITER==0 .OR. JCUR==1) GOTO 70
+        ICF = 1
+        IPUP = MITER
+        GOTO 10
+
+70      CONTINUE
+        NFLAG = -1
+        ICF = 2
+        IPUP = MITER
+        RETURN
+
+!       Return for successful step.
+80      CONTINUE
+
+!       Enforce bounds.
+        IF (BOUNDS) THEN
+          CHANGED_ACOR = .FALSE.
+          IF (M==0) THEN
+            ACNRM = DEL
+          ELSE
+            ACNRM = DVNORM(N,ACOR,EWT)
+          END IF
+          IF (MITER/=0) THEN
+!           Since Y(:) = YH(:,1) + ACOR(:) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+              IF (Y(IDX(I))>UB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+            END DO
+          ELSE
+!           Since Y(:) = YH(:,1) + SAVF(:) and
+!           since CALL DCOPY_F90(N,SAVF,1,ACOR,1) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+              END IF
+              IF (Y(IDX(I))>UB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+              END IF
+            END DO
+          END IF
+          IF (CHANGED_ACOR) THEN
+            IF (M==0) THEN
+              ACNRMNEW = DEL
+            ELSE
+              ACNRMNEW = DVNORM(N,ACOR,EWT)
+            END IF
+!           ACNRM = ACNRMNEW
+            ACNRM = MAX(ACNRM,ACNRMNEW)
+          ELSE
+          END IF
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+        ELSE
+!         No projections are required.
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+          IF (M==0) ACNRM = DEL
+          IF (M>0) ACNRM = DVNORM(N,ACOR,EWT)
+        END IF
+        RETURN
+
+      END SUBROUTINE DVNLSD
+!_______________________________________________________________________
+
+      SUBROUTINE DVJAC(Y,YH,LDYH,EWT,FTEM,SAVF,WM,IWM,F,JAC,IERPJ, &
+        ATOL,ITOL)
+! ..
+! Compute and process the matrix P = I - h*rl1*J, where J is an
+! approximation to the Jacobian for dense and banded solutions.
+! ..
+! This is a version of DVJAC that allows use of the known nonzero
+! diagonals if it is available.
+! DVJAC is called by DVNLSD to compute and process the matrix
+! P = I - h*rl1*J, where J is an approximation to the Jacobian.
+! Here J is computed by the user-supplied routine JAC if
+! MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.
+! If MITER = 3, a diagonal approximation to J is used.
+! If JSV = -1, J is computed from scratch in all cases.
+! If JSV = 1 and MITER = 1, 2, 4, or 5, and if the saved value of J is
+! considered acceptable, then P is constructed from the saved J.
+! J is stored in wm and replaced by P. If MITER /= 3, P is then
+! subjected to LU decomposition in preparation for later solution
+! of linear systems with P as coefficient matrix. This is done
+! by DGEFA_F90 if MITER = 1 or 2, and by DGBFA_F90 if MITER = 4 or 5.
+! Communication with DVJAC is done with the following variables.
+! (For more details, please see the comments in the driver subroutine.)
+! Y          = Vector containing predicted values on entry.
+! YH         = The Nordsieck array, an LDYH by LMAX array, input.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! EWT        = An error weight vector of length N.
+! SAVF       = Array containing f evaluated at predicted y, input.
+! WM         = Real work space for matrices. In the output, it contains
+!              the inverse diagonal matrix if MITER = 3 and the LU
+!              decomposition of P if MITER is 1, 2, 4, or 5.
+!              Storage of matrix elements starts at WM(1).
+!              Storage of the saved Jacobian starts at WM(LOCJS).
+! IWM        = Integer work space containing pivot information,
+!              starting at IWM(31), if MITER is 1, 2, 4, or 5.
+!              IWM also contains band parameters ML = IWM(1) and
+!              MU = IWM(2) if MITER is 4 or 5.
+! F          = Dummy name for the user supplied subroutine for f.
+! JAC        = Dummy name for the user supplied Jacobian subroutine.
+! RL1        = 1/EL(2) (input).
+! IERPJ      = Output error flag, = 0 if no trouble, 1 if the P
+!              matrix is found to be singular.
+! JCUR       = Output flag to indicate whether the Jacobian matrix
+!              (or approximation) is now current.
+!              JCUR = 0 means J is not current.
+!              JCUR = 1 means J is current.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERPJ
+        INTEGER, INTENT (IN) :: LDYH, ITOL
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: EWT(*), FTEM(*), SAVF(*), WM(*), &
+          Y(*),YH(LDYH,*)
+        REAL (WP), INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: CON, DI, FAC, HRL1, R, R0, SRUR, YI, YJ, YJJ
+        INTEGER :: I, I1, I2, IER, II, J, J1, JJ, JJ1, JJ2, JOK, K,   &
+          K1, K2, LENP, MBA, MBAND, MEB1, MEBAND, ML, ML1, MU, NG, NP1
+!         K1, K2, LENP, MBA, MBAND, MEB1, MEBAND, ML, ML3, MU, NG, NP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJAC
+! ..
+        IERPJ = 0
+        HRL1 = H*RL1
+!       See whether J should be evaluated (JOK = -1) or not (JOK = 1).
+        JOK = JSV
+        IF (JSV==1) THEN
+          IF (NST==0 .OR. NST>NSLJ+MSBJ) JOK = -1
+          IF (ICF==1 .AND. DRC<CCMXJ) JOK = -1
+          IF (ICF==2) JOK = -1
+        END IF
+        IF (J_IS_CONSTANT .AND. J_HAS_BEEN_COMPUTED) JOK = 1
+!       End of setting JOK.
+
+        IF (JOK==-1 .AND. MITER==1) THEN
+!         If JOK = -1 and MITER = 1, call JAC to evaluate Jacobian.
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+          LENP = N*N
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+!         CALL JAC(N,TN,Y,0,0,WM(3),N)
+          CALL JAC(N,TN,Y,0,0,WM(1),N)
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+!         IF (JSV==1) CALL DCOPY_F90(LENP,WM(3),1,WM(LOCJS),1)
+          IF (JSV==1) CALL DCOPY_F90(LENP,WM(1),1,WM(LOCJS),1)
+        END IF
+
+!       Set flag to indicate how the YSCALE vector will be set for
+!       JACSP.
+        LIKE_ORIGINAL_VODE = .FALSE.
+
+        IF (JOK==-1 .AND. MITER==2) THEN
+           IF (USE_JACSP) THEN
+!             Approximate the Jacobian using Doug Salane's JACSP.
+              NSLJ = NST
+              JCUR = 1
+              IOPTDS(1) = 0
+              IOPTDS(2) = 0
+              IOPTDS(3) = 1
+              IOPTDS(5) = 0
+!             INFORDS(4) was initialized in DVODE.
+              LWKDS  = 3 * N
+              LIWKDS = 50 + N
+              NRFJACDS = N
+              NCFJACDS = N
+              MAXGRPDS = N
+!             Calculate the YSCALEDS vector for JACSPDV.
+              IF (LIKE_ORIGINAL_VODE) THEN
+                 FAC = DVNORM(N,SAVF,EWT)
+!                JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                 R0 = THOU*ABS(H)*REAL(N)*FAC
+                 IF (ABS(R0)<=ZERO) R0 = ONE
+                 SRUR = WM1
+                 DO J = 1, N
+!                   JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                   R = MAX(ABS(Y(J)),R0/EWT(J))
+                    R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                    YSCALEDS(J) = R
+                 END DO
+              ELSE
+                 IF (ITOL == 1 .OR. ITOL == 3) THEN
+                    DO J = 1, N
+                       YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                    END DO
+                 ELSE
+                    DO J = 1, N
+                       YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                    END DO
+                 END IF
+              END IF
+
+              CALL JACSPDB(F,N,TN,Y,SAVF,WM(1),NRFJACDS, &
+                YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS, &
+                MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+              NFE = NFE + IWKDS(7)
+              NJE = NJE + 1
+           ELSE
+!             If MITER = 2, make N calls to F to approximate the Jacobian.
+              NSLJ = NST
+              JCUR = 1
+              FAC = DVNORM(N,SAVF,EWT)
+              R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+              IF (ABS(R0)<=ZERO) R0 = ONE
+              SRUR = WM1
+!             J1 = 2
+              J1 = 0
+              DO J = 1, N
+                 YJ = Y(J)
+                 R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+                 Y(J) = Y(J) + R
+                 FAC = ONE/R
+                 CALL F(N,TN,Y,FTEM)
+                 DO I = 1, N
+                   WM(I+J1) = (FTEM(I)-SAVF(I))*FAC
+                 END DO
+                 Y(J) = YJ
+                 J1 = J1 + N
+              END DO
+              NFE = NFE + N
+              NJE = NJE + 1
+           END IF
+           LENP = N*N
+!          IF (JSV==1) CALL DCOPY_F90(LENP,WM(3),1,WM(LOCJS),1)
+           IF (JSV==1) CALL DCOPY_F90(LENP,WM(1),1,WM(LOCJS),1)
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+        END IF
+
+        IF (JOK==1 .AND. (MITER==1 .OR. MITER==2)) THEN
+          JCUR = 0
+          LENP = N*N
+!         CALL DCOPY_F90(LENP,WM(LOCJS),1,WM(3),1)
+          CALL DCOPY_F90(LENP,WM(LOCJS),1,WM(1),1)
+        END IF
+
+        IF (MITER==1 .OR. MITER==2) THEN
+!         Multiply Jacobian by scalar, add identity, and do LU
+!         decomposition.
+          CON = -HRL1
+!         CALL DSCAL_F90(LENP,CON,WM(3),1)
+          CALL DSCAL_F90(LENP,CON,WM(1),1)
+!         J = 3
+          J = 1
+          NP1 = N + 1
+          DO I = 1, N
+            WM(J) = WM(J) + ONE
+            J = J + NP1
+          END DO
+          NLU = NLU + 1
+! ______________________________________________________________________
+
+!         CALL DGEFA_F90(WM(3),N,N,IWM(31),IER)
+          CALL DGEFA_F90(WM(1),N,N,IWM(31),IER)
+          IF (IER/=0) IERPJ = 1
+! *****LAPACK build change point. Replace above with these statements.
+!        IF (.NOT.USE_LAPACK) THEN
+!!         CALL DGEFA_f90(WM(3),N,N,IWM(31),IER)
+!          CALL DGEFA_f90(WM(1),N,N,IWM(31),IER)
+!          IF (IER /= 0) IERPJ = 1
+!        ELSE
+!!         CALL DGETRF(N,N,WM(3),N,IWM(31),IER)
+!          CALL DGETRF(N,N,WM(1),N,IWM(31),IER)
+!          IF (IER /= 0) IERPJ = 1
+!        END IF
+! ______________________________________________________________________
+
+          RETURN
+        END IF
+!       End of code block for MITER = 1 or 2.
+
+        IF (MITER==3) THEN
+!         If MITER = 3, construct a diagonal approximation to
+!         J and P.
+          NJE = NJE + 1
+          JCUR = 1
+          WM2 = HRL1
+          R = RL1*PT1
+          Y(1:N) = Y(1:N) + R*(H*SAVF(1:N)-YH(1:N,2))
+!         CALL F(N,TN,Y,WM(3))
+          CALL F(N,TN,Y,WM(1))
+          NFE = NFE + 1
+          DO 10 I = 1, N
+            R0 = H*SAVF(I) - YH(I,2)
+!           DI = PT1*R0 - H*(WM(I+2)-SAVF(I))
+            DI = PT1*R0 - H*(WM(I)-SAVF(I))
+!           WM(I+2) = ONE
+            WM(I) = ONE
+            IF (ABS(R0)<UROUND/EWT(I)) GOTO 10
+            IF (ABS(DI)<=ZERO) GOTO 20
+!           WM(I+2) = PT1*R0/DI
+            WM(I) = PT1*R0/DI
+10        END DO
+          RETURN
+20        IERPJ = 1
+          RETURN
+        END IF
+!       End of code block for MITER = 3.
+
+!       Set constants for MITER = 4 or 5.
+        ML = IWM(1)
+        MU = IWM(2)
+!       ML3 = ML + 3
+        ML1 = ML + 1
+        MBAND = ML + MU + 1
+        MEBAND = MBAND + ML
+        LENP = MEBAND*N
+
+        IF (JOK==-1 .AND. MITER==4) THEN
+!       If JOK = -1 and MITER = 4, call JAC to evaluate Jacobian.
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+!         CALL JAC(N,TN,Y,ML,MU,WM(ML3),MEBAND)
+          CALL JAC(N,TN,Y,ML,MU,WM(ML1),MEBAND)
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+!         IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML3),MEBAND,WM(LOCJS),MBAND)
+          IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML1),MEBAND,WM(LOCJS),MBAND)
+        END IF
+
+        IF (JOK==-1 .AND. MITER==5) THEN
+!       If MITER = 5, make ML+MU+1 calls to F to approximate the Jacobian
+!       unless the user has specified which sub and super diagonals are
+!       nonzero. In the latter case NSUBS+NSUPS+1 calls will be made.
+
+!         If the subdiagonals are known, use that information to build
+!         the Jacobian matrix.
+          IF ((SUBS .OR. SUPS) .OR. BNGRP >= MBAND) GOTO 60
+
+!         Otherwise, use the original algorithm.
+          IF (USE_JACSP) THEN
+!            Approximate the Jacobian using Doug Salane's JACSP.
+             NSLJ = NST
+             JCUR = 1
+             WM(1:LENP) = ZERO
+             IOPTDS(1) = 1
+             IOPTDS(2) = MBAND
+             IOPTDS(3) = 1
+             IOPTDS(5) = ML
+!            INFORDS(4) was initialized in DVODE.
+             LWKDS  = 3 * N
+             LIWKDS = 50 + N
+!            NRFJACDS = MEBAND*N
+!            NCFJACDS = 1
+             NRFJACDS = MEBAND
+             NCFJACDS = N
+             MBA = MIN(MBAND,N)
+             MAXGRPDS = MBA
+!            Calculate the YSCALEDS vector for JACSPDV.
+             IF (LIKE_ORIGINAL_VODE) THEN
+                FAC = DVNORM(N,SAVF,EWT)
+!               JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!               R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                R0 = THOU*ABS(H)*REAL(N)*FAC
+                IF (ABS(R0)<=ZERO) R0 = ONE
+                SRUR = WM1
+                DO J = 1, N
+!                  JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                  R = MAX(ABS(Y(J)),R0/EWT(J))
+                   R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                   YSCALEDS(J) = R
+                END DO
+             ELSE
+                IF (ITOL == 1 .OR. ITOL == 3) THEN
+                   DO J = 1, N
+                      YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                   END DO
+                ELSE
+                   DO J = 1, N
+                      YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                   END DO
+                END IF
+             END IF
+             CALL JACSPDB(F,N,TN,Y,SAVF,WM(1),NRFJACDS, &
+               YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS,  &
+               MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+             NFE = NFE + IWKDS(7)
+             NJE = NJE + 1
+          ELSE
+             NSLJ = NST
+             JCUR = 1
+             MBA = MIN(MBAND,N)
+             MEB1 = MEBAND - 1
+             SRUR = WM1
+             FAC = DVNORM(N,SAVF,EWT)
+             R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+             IF (ABS(R0)<=ZERO) R0 = ONE
+             DO J = 1, MBA
+               DO I = J, N, MBAND
+                 YI = Y(I)
+                 R = MAX(SRUR*ABS(YI),R0/EWT(I))
+                 Y(I) = Y(I) + R
+               END DO
+               CALL F(N,TN,Y,FTEM)
+               DO JJ = J, N, MBAND
+                 Y(JJ) = YH(JJ,1)
+                 YJJ = Y(JJ)
+                 R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+                 FAC = ONE/R
+                 I1 = MAX(JJ-MU,1)
+                 I2 = MIN(JJ+ML,N)
+!                II = JJ*MEB1 - ML + 2
+                 II = JJ*MEB1 - ML
+                 DO I = I1, I2
+                   WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                 END DO
+               END DO
+             END DO
+             NFE = NFE + MBA
+             NJE = NJE + 1
+          END IF
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+          GOTO 90
+   60     CONTINUE
+
+!         User supplied diagonals information is available.
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+          MBA = MIN(MBAND,N)
+          MEB1 = MEBAND - 1
+          SRUR = WM1
+          FAC = DVNORM(N,SAVF,EWT)
+          R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+          IF (ABS(R0)<=ZERO) R0 = ONE
+!         For each group of columns...
+          DO NG = 1, BNGRP
+!            Find the first and last columns in the group.
+             JJ1 = BIGP(NG)
+             JJ2 = BIGP(NG+1) - 1
+!            For each column in this group...
+             DO JJ = JJ1, JJ2
+                J = BJGP(JJ)
+                R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                Y(J) = Y(J) + R
+             END DO
+             CALL F(N,TN,Y,FTEM)
+!            For each column in this group...
+             DO JJ = JJ1, JJ2
+                 J = BJGP(JJ)
+                 Y(J) = YH(J,1)
+                 R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                 FAC = ONE/R
+                 IF (BUILD_IAJA) THEN
+!                   Use the IAB, JAB sparse structure arrays to
+!                   determine the first and last nonzeros in
+!                   column J.
+                    K1 = IAB(J)
+                    K2 = IAB(J+1) - 1
+                 ELSE
+!                   Extract the positions of the first and
+!                   last nonzeros in this column directly.
+                    CALL BANDED_GET_BJNZ(N,ML,MU,J,IWM(31),I)
+                    DO K = 1, N
+                       IF (IWM(30+K) /= 0) THEN
+                          K1 = K
+                          GOTO 70
+                       END IF
+                    END DO
+   70               CONTINUE
+                    DO K = N, 1, -1
+                       IF (IWM(30+K) /= 0) THEN
+                          K2 = K
+                          GOTO 80
+                       END IF
+                    END DO
+   80               CONTINUE
+                 END IF
+!                Load the nonzeros for column J in the banded matrix.
+                 IF (BUILD_IAJA) THEN
+                    DO K = K1, K2
+                       I = JAB(K)
+!                      II = J * MEB1 - ML + 2
+                       II = J * MEB1 - ML
+                       WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                    END DO
+                 ELSE
+                    DO K = K1, K2
+                       I = IWM(30+K)
+                       IF (I /= 0) THEN
+!                         II = J * MEB1 - ML + 2
+                          II = J * MEB1 - ML
+                          WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                       END IF
+                    END DO
+                 END IF
+             END DO
+          END DO
+          NFE = NFE + BNGRP
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+   90     CONTINUE
+!         IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML3),MEBAND,WM(LOCJS),MBAND)
+          IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML1),MEBAND,WM(LOCJS),MBAND)
+        END IF
+
+        IF (JOK==1) THEN
+          JCUR = 0
+!         CALL DACOPY(MBAND,N,WM(LOCJS),MBAND,WM(ML3),MEBAND)
+          CALL DACOPY(MBAND,N,WM(LOCJS),MBAND,WM(ML1),MEBAND)
+        END IF
+
+!       Multiply Jacobian by scalar, add identity, and do LU
+!       decomposition.
+        CON = -HRL1
+!       CALL DSCAL_F90(LENP,CON,WM(3),1)
+        CALL DSCAL_F90(LENP,CON,WM(1),1)
+!       II = MBAND + 2
+        II = MBAND
+        DO I = 1, N
+          WM(II) = WM(II) + ONE
+          II = II + MEBAND
+        END DO
+        NLU = NLU + 1
+! ______________________________________________________________________
+
+!       CALL DGBFA_F90(WM(3),MEBAND,N,ML,MU,IWM(31),IER)
+        CALL DGBFA_F90(WM(1),MEBAND,N,ML,MU,IWM(31),IER)
+        IF (IER/=0) IERPJ = 1
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!        CALL DGBFA_f90(WM(3),MEBAND,N,ML,MU,IWM(31),IER)
+!         CALL DGBFA_f90(WM(1),MEBAND,N,ML,MU,IWM(31),IER)
+!         IF (IER /= 0) IERPJ = 1
+!       ELSE
+!!        CALL DGBTRF(N,N,ML,MU,WM(3),MEBAND,IWM(31),IER)
+!         CALL DGBTRF(N,N,ML,MU,WM(1),MEBAND,IWM(31),IER)
+!         IF (IER /= 0) IERPJ = 1
+!       END IF
+! ______________________________________________________________________
+       RETURN
+!      End of code block for MITER = 4 or 5.
+
+      END SUBROUTINE DVJAC
+!_______________________________________________________________________
+
+      SUBROUTINE DACOPY(NROW,NCOL,A,NROWA,B,NROWB)
+! ..
+! Copy one array to another.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NCOL, NROW, NROWA, NROWB
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: A(NROWA,NCOL)
+        REAL (WP), INTENT (INOUT) :: B(NROWB,NCOL)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IC
+! ..
+! .. FIRST EXECUTABLE STATEMENT DACOPY
+! ..
+        DO IC = 1, NCOL
+          CALL DCOPY_F90(NROW,A(1,IC),1,B(1,IC),1)
+        END DO
+        RETURN
+
+      END SUBROUTINE DACOPY
+!_______________________________________________________________________
+
+      SUBROUTINE DVSOL(WM,IWM,X,IERSL)
+! ..
+! Manage the solution of the linear system arising from a chord
+! iteration for dense and banded solutions.
+! ..
+! This routine manages the solution of the linear system arising from
+! a chord iteration. It is called if MITER /= 0.
+! If MITER is 1 or 2, it calls DGESL_F90 to accomplish this.
+! If MITER = 3 it updates the coefficient H*RL1 in the diagonal
+! matrix, and then computes the solution.
+! If MITER is 4 or 5, it calls DGBSL_F90.
+! Communication with DVSOL uses the following variables:
+! WM    = Real work space containing the inverse diagonal matrix if
+!         MITER = 3 and the LU decomposition of the matrix otherwise.
+!         Storage of matrix elements starts at WM(1).
+!         WM also contains the following matrix-related data:
+!         WM1 = SQRT(UROUND) (not used here),
+!         WM2 = HRL1, the previous value of H*RL1, used if MITER = 3.
+! IWM   = Integer work space containing pivot information, starting at
+!         IWM(31), if MITER is 1, 2, 4, or 5. IWM also contains band
+!         parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.
+! X     = The right-hand side vector on input, and the solution vector
+!         on output, of length N.
+! IERSL = Output flag. IERSL = 0 if no trouble occurred.
+!         IERSL = 1 if a singular matrix arose with MITER = 3.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERSL
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: WM(*), X(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: DI, HRL1, PHRL1, R
+        INTEGER :: I, MEBAND, ML, MU
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! ______________________________________________________________________
+
+! *****LAPACK build change point. Insert this statement.
+!       INTEGER INFO
+!       CHARACTER*1 TRANS
+! ______________________________________________________________________
+
+! .. FIRST EXECUTABLE STATEMENT DVSOL
+! ..
+        IERSL = 0
+        GOTO (10,10,20,50,50) MITER
+
+10      CONTINUE
+! ______________________________________________________________________
+
+!       CALL DGESL_F90(WM(3),N,N,IWM(31),X,0)
+        CALL DGESL_F90(WM(1),N,N,IWM(31),X,0)
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!         CALL DGESL_f90(WM(3),N,N,IWM(31),X,0)
+!          CALL DGESL_f90(WM(1),N,N,IWM(31),X,0)
+!       ELSE
+!          TRANS = 'N'
+!!         CALL DGETRS(TRANS,N,1,WM(3),N,IWM(31),X,N,INFO)
+!          CALL DGETRS(TRANS,N,1,WM(1),N,IWM(31),X,N,INFO)
+!          IF (INFO /= 0) THEN
+!             WRITE(6,*) 'Stopping in DVSOL with INFO = ', INFO
+!             STOP
+!          END IF
+!       END IF
+! ______________________________________________________________________
+
+        RETURN
+
+20      PHRL1 = WM2
+        HRL1 = H*RL1
+        WM2 = HRL1
+        IF (ABS(HRL1-PHRL1)<=ZERO) GOTO 30
+        R = HRL1/PHRL1
+        DO I = 1, N
+!         DI = ONE - R*(ONE-ONE/WM(I+2))
+          DI = ONE - R*(ONE-ONE/WM(I))
+          IF (ABS(DI)<=ZERO) GOTO 40
+!         WM(I+2) = ONE/DI
+          WM(I) = ONE/DI
+        END DO
+
+30      DO I = 1, N
+!         X(I) = WM(I+2)*X(I)
+          X(I) = WM(I)*X(I)
+        END DO
+        RETURN
+40      IERSL = 1
+        RETURN
+
+50      ML = IWM(1)
+        MU = IWM(2)
+        MEBAND = 2*ML + MU + 1
+! ______________________________________________________________________
+
+!       CALL DGBSL_F90(WM(3),MEBAND,N,ML,MU,IWM(31),X,0)
+        CALL DGBSL_F90(WM(1),MEBAND,N,ML,MU,IWM(31),X,0)
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!        CALL DGBSL_F90(WM(3),MEBAND,N,ML,MU,IWM(31),X,0)
+!         CALL DGBSL_F90(WM(1),MEBAND,N,ML,MU,IWM(31),X,0)
+!       ELSE
+!         TRANS = 'N'
+!!        CALL DGBTRS(TRANS,N,ML,MU,1,WM(3),MEBAND,IWM(31),X,N,INFO)
+!         CALL DGBTRS(TRANS,N,ML,MU,1,WM(1),MEBAND,IWM(31),X,N,INFO)
+!         IF (INFO /= 0) THEN
+!           WRITE(6,*) 'Stopping in DVSOL with INFO = ', INFO
+!           STOP
+!         END IF
+!       END IF
+! ______________________________________________________________________
+
+      RETURN
+
+      END SUBROUTINE DVSOL
+!_______________________________________________________________________
+
+      SUBROUTINE DVSRCO(RSAV,ISAV,JOB)
+! ..
+! Save or restore (depending on JOB) the contents of the PRIVATE
+! variable blocks, which are used internally by DVODE (not called
+! by DVODE_F90).
+! ..
+! RSAV = real array of length 49 or more.
+! ISAV = integer array of length 41 or more.
+! JOB  = flag indicating to save or restore the PRIVATE variable
+!        blocks:
+!        JOB  = 1 if PRIVATE variables is to be saved
+!                 (written to RSAV/ISAV).
+!        JOB  = 2 if PRIVATE variables is to be restored
+!                 (read from RSAV/ISAV).
+!        A call with JOB = 2 presumes a prior call with JOB = 1.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: RSAV(*)
+        INTEGER, INTENT (INOUT) :: ISAV(*)
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSRCO
+! ..
+        IF (JOB/=2) THEN
+!         Save the contents of the PRIVATE blocks.
+          RSAV(1) = ACNRM
+          RSAV(2) = CCMXJ
+          RSAV(3) = CONP
+          RSAV(4) = CRATE
+          RSAV(5) = DRC
+          RSAV(6:18) = EL(1:13)
+          RSAV(19) = ETA
+          RSAV(20) = ETAMAX
+          RSAV(21) = H
+          RSAV(22) = HMIN
+          RSAV(23) = HMXI
+          RSAV(24) = HNEW
+          RSAV(25) = HSCAL
+          RSAV(26) = PRL1
+          RSAV(27) = RC
+          RSAV(28) = RL1
+          RSAV(29:41) = TAU(1:13)
+          RSAV(42:46) = TQ(1:5)
+          RSAV(47) = TN
+          RSAV(48) = UROUND
+          RSAV(LENRV1+1) = HU
+          ISAV(1) = ICF
+          ISAV(2) = INIT
+          ISAV(3) = IPUP
+          ISAV(4) = JCUR
+          ISAV(5) = JSTART
+          ISAV(6) = JSV
+          ISAV(7) = KFLAG
+          ISAV(8) = KUTH
+          ISAV(9) = L
+          ISAV(10) = LMAX
+          ISAV(11) = LYH
+          ISAV(12) = 0
+          ISAV(13) = 0
+          ISAV(14) = 0
+          ISAV(15) = LWM
+          ISAV(16) = LIWM
+          ISAV(17) = LOCJS
+          ISAV(18) = MAXORD
+          ISAV(19) = METH
+          ISAV(20) = MITER
+          ISAV(21) = MSBJ
+          ISAV(22) = MXHNIL
+          ISAV(23) = MXSTEP
+          ISAV(24) = N
+          ISAV(25) = NEWH
+          ISAV(26) = NEWQ
+          ISAV(27) = NHNIL
+          ISAV(28) = NQ
+          ISAV(29) = NQNYH
+          ISAV(30) = NQWAIT
+          ISAV(31) = NSLJ
+          ISAV(32) = NSLP
+          ISAV(33) = NYH
+          ISAV(LENIV1+1) = NCFN
+          ISAV(LENIV1+2) = NETF
+          ISAV(LENIV1+3) = NFE
+          ISAV(LENIV1+4) = NJE
+          ISAV(LENIV1+5) = NLU
+          ISAV(LENIV1+6) = NNI
+          ISAV(LENIV1+7) = NQU
+          ISAV(LENIV1+8) = NST
+          RETURN
+        ELSE
+!         Replace the contents of the PRIVATE blocks.
+          ACNRM = RSAV(1)
+          CCMXJ = RSAV(2)
+          CONP = RSAV(3)
+          CRATE = RSAV(4)
+          DRC = RSAV(5)
+          EL(1:13) = RSAV(6:18)
+          ETA = RSAV(19)
+          ETAMAX = RSAV(20)
+          H = RSAV(21)
+          HMIN = RSAV(22)
+          HMXI = RSAV(23)
+          HNEW = RSAV(24)
+          HSCAL = RSAV(25)
+          PRL1 = RSAV(26)
+          RC = RSAV(27)
+          RL1 = RSAV(28)
+          TAU(1:13) = RSAV(29:41)
+          TQ(1:5) = RSAV(42:46)
+          TN = RSAV(47)
+          UROUND = RSAV(48)
+          HU = RSAV(LENRV1+1)
+          ICF = ISAV(1)
+          INIT = ISAV(2)
+          IPUP = ISAV(3)
+          JCUR = ISAV(4)
+          JSTART = ISAV(5)
+          JSV = ISAV(6)
+          KFLAG = ISAV(7)
+          KUTH = ISAV(8)
+          L = ISAV(9)
+          LMAX = ISAV(10)
+          LYH = ISAV(11)
+          LWM = ISAV(15)
+          LIWM = ISAV(16)
+          LOCJS = ISAV(17)
+          MAXORD = ISAV(18)
+          METH = ISAV(19)
+          MITER = ISAV(20)
+          MSBJ = ISAV(21)
+          MXHNIL = ISAV(22)
+          MXSTEP = ISAV(23)
+          N = ISAV(24)
+          NEWH = ISAV(25)
+          NEWQ = ISAV(26)
+          NHNIL = ISAV(27)
+          NQ = ISAV(28)
+          NQNYH = ISAV(29)
+          NQWAIT = ISAV(30)
+          NSLJ = ISAV(31)
+          NSLP = ISAV(32)
+          NYH = ISAV(33)
+          NCFN = ISAV(LENIV1+1)
+          NETF = ISAV(LENIV1+2)
+          NFE = ISAV(LENIV1+3)
+          NJE = ISAV(LENIV1+4)
+          NLU = ISAV(LENIV1+5)
+          NNI = ISAV(LENIV1+6)
+          NQU = ISAV(LENIV1+7)
+          NST = ISAV(LENIV1+8)
+          RETURN
+        END IF
+
+      END SUBROUTINE DVSRCO
+!_______________________________________________________________________
+
+      SUBROUTINE DEWSET(N,ITOL,RTOL,ATOL,YCUR,EWT)
+! ..
+! Set the error weight vector.
+! ..
+! This subroutine sets the error weight vector EWT according to
+! EWT(i) = RTOL(i)*ABS(YCUR(i)) + ATOL(i), i = 1,...,N,
+! with the subscript on RTOL and/or ATOL possibly replaced by 1
+! above, depending on the value of ITOL.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: ATOL(*), RTOL(*), YCUR(N)
+        REAL (WP), INTENT (OUT) :: EWT(N)
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT DEWSET
+! ..
+        GOTO (10,20,30,40) ITOL
+10      CONTINUE
+        EWT(1:N) = RTOL(1)*ABS(YCUR(1:N)) + ATOL(1)
+        RETURN
+20      CONTINUE
+        EWT(1:N) = RTOL(1)*ABS(YCUR(1:N)) + ATOL(1:N)
+        RETURN
+30      CONTINUE
+        EWT(1:N) = RTOL(1:N)*ABS(YCUR(1:N)) + ATOL(1)
+        RETURN
+40      CONTINUE
+        EWT(1:N) = RTOL(1:N)*ABS(YCUR(1:N)) + ATOL(1:N)
+        RETURN
+
+      END SUBROUTINE DEWSET
+!_______________________________________________________________________
+
+      FUNCTION DVNORM(N,V,W)
+! ..
+! Calculate weighted root-mean-square (rms) vector norm.
+! ..
+! This routine computes the weighted root-mean-square norm
+! of the vector of length N contained in the array V, with
+! weights contained in the array W of length N.
+! DVNORM = SQRT((1/N) * SUM(V(i)*W(i))**2)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        REAL (WP) :: DVNORM
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: V(N), W(N)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: SUM
+        INTEGER :: I
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC SQRT
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNORM
+! ..
+        SUM = ZERO
+        DO I = 1, N
+          SUM = SUM + (V(I)*W(I))**2
+        END DO
+        DVNORM = SQRT(SUM/N)
+        RETURN
+
+      END FUNCTION DVNORM
+!_______________________________________________________________________
+
+! The modified SLATEC error handling routines begin here.
+      SUBROUTINE XERRDV(MSG,NERR,LEVEL,NI,I1,I2,NR,R1,R2)
+! ..
+! Write error messages with values.
+! ..
+! This is an adaptation of subroutine XERRWD (NMES eliminated).
+! Subroutines XERRDV, XSETF, XSETUN, and Functions IXSAV
+! as given here, constitute a simplified version of the SLATEC
+! error handling package.
+!
+! All arguments are input arguments.
+! MSG    = The message (character array).
+! NERR   = The error number (not used).
+! LEVEL  = The error level
+!          0 or 1 means recoverable (control returns to caller).
+!          2 means fatal (run is aborted--see note below).
+! NI     = Number of integers (0, 1, or 2) to be printed with message.
+! I1,I2  = Integers to be printed, depending on NI.
+! NR     = Number of reals (0, 1, or 2) to be printed with message.
+! R1,R2  = Reals to be printed, depending on NR.
+! Note: This routine is machine-dependent and specialized for use
+! in limited context, in the following ways:
+!  1. The argument MSG is assumed to be of type CHARACTER, and
+!     the message is printed with a format of (1X,A).
+!  2. The message is assumed to take only one line.
+!     Multi-line messages are generated by repeated calls.
+!  3. If LEVEL = 2, control passes to the statement: STOP
+!     to abort the run. This statement may be machine-dependent.
+!  4. R1 and R2 are assumed to be in real(wp) and are printed
+!     in D21.13 format.
+! Internal Notes:
+! For a different default logical unit number, IXSAV(or a subsidiary
+! function that it calls) will need to be modified.
+! For a different run-abort command, change the statement following
+! statement 100 at the end.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: R1, R2
+        INTEGER :: I1, I2, LEVEL, NERR, NI, NR
+        CHARACTER (*) :: MSG
+        LOGICAL PRINT_NERR
+! ..
+! .. Local Scalars ..
+        INTEGER :: LUNIT, MESFLG
+! ..
+! .. FIRST EXECUTABLE STATEMENT XERRDV
+! ..
+!       Get logical unit number and message print flag.
+        LUNIT = IXSAV(1,0,.FALSE.)
+        MESFLG = IXSAV(2,0,.FALSE.)
+        IF (MESFLG==0) GOTO 10
+
+        PRINT_NERR = .FALSE.
+        IF (PRINT_NERR) PRINT *, MSG, 'Message number = ', NERR
+
+!       Write the message.
+        WRITE (LUNIT,90000) MSG
+90000   FORMAT (1X,A)
+        IF (NI==1) WRITE (LUNIT,90001) I1
+90001   FORMAT ('In the above message, I1 = ',I10)
+        IF (NI==2) WRITE (LUNIT,90002) I1, I2
+90002   FORMAT ('In the above message, I1 = ',I10,3X,'I2 = ',I10)
+        IF (NR==1) WRITE (LUNIT,90003) R1
+90003   FORMAT ('In the above message, R1 = ',D21.13)
+        IF (NR==2) WRITE (LUNIT,90004) R1, R2
+90004   FORMAT ('In the above message, R1 = ',D21.13,3X,'R2 = ',D21.13)
+
+!       Abort the run if LEVEL = 2.
+10      IF (LEVEL/=2) RETURN
+        WRITE (LUNIT,90005)
+90005   FORMAT ('LEVEL = 2 in XERRDV. Stopping.')
+        STOP
+
+      END SUBROUTINE XERRDV
+!_______________________________________________________________________
+
+      SUBROUTINE XSETF(MFLAG)
+! ..
+!     Reset the error print control flag.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: MFLAG
+! ..
+! .. Local Scalars ..
+        INTEGER :: JUNK
+! ..
+! .. FIRST EXECUTABLE STATEMENT XSETF
+! ..
+        IF (MFLAG==0 .OR. MFLAG==1) JUNK = IXSAV(2,MFLAG,.TRUE.)
+!       Get rid of a compiler warning message:
+        IF (JUNK/=JUNK) STOP
+        RETURN
+
+      END SUBROUTINE XSETF
+!_______________________________________________________________________
+
+      SUBROUTINE XSETUN(LUN)
+! ..
+!     Reset the logical unit number for error messages.
+! ..
+!     XSETUN sets the logical unit number for error messages to LUN.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LUN
+! ..
+! .. Local Scalars ..
+        INTEGER :: JUNK
+! ..
+! .. FIRST EXECUTABLE STATEMENT XSETUN
+! ..
+        IF (LUN>0) JUNK = IXSAV(1,LUN,.TRUE.)
+!       Get rid of a compiler warning message:
+        IF (JUNK/=JUNK) STOP
+        RETURN
+
+      END SUBROUTINE XSETUN
+!_______________________________________________________________________
+
+      FUNCTION IXSAV(IPAR,IVALUE,ISET)
+! ..
+! Save and recall error message control parameters.
+! ..
+! IXSAV saves and recalls one of two error message parameters:
+!  LUNIT, the logical unit number to which messages are printed,
+!  and MESFLG, the message print flag.
+! This is a modification of the SLATEC library routine J4SAVE.
+! Saved local variables:
+!  LUNIT  = Logical unit number for messages. The default is
+!           obtained by a call to IUMACH(may be machine-dependent).
+!  MESFLG = Print control flag:
+!           1 means print all messages (the default).
+!           0 means no printing.
+! On input:
+!  IPAR   = Parameter indicator (1 for LUNIT, 2 for MESFLG).
+!  IVALUE = The value to be set for the parameter, if ISET = .TRUE.
+!  ISET   = Logical flag to indicate whether to read or write.
+!           If ISET = .TRUE., the parameter will be given
+!           the value IVALUE. If ISET = .FALSE., the parameter
+!           will be unchanged, and IVALUE is a dummy argument.
+! On return:
+!   IXSAV = The (old) value of the parameter.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        INTEGER :: IXSAV
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: IPAR, IVALUE
+        LOGICAL, INTENT (IN) :: ISET
+! ..
+! .. Local Scalars ..
+        INTEGER, SAVE :: LUNIT, MESFLG
+! ..
+! .. Data Statements ..
+        DATA LUNIT/ -1/, MESFLG/1/
+! ..
+! .. FIRST EXECUTABLE STATEMENT IXSAV
+! ..
+        IF (IPAR==1) THEN
+          IF (LUNIT==-1) LUNIT = IUMACH()
+!  i       Get rid of a compiler warning message:
+          IF (LUNIT/=LUNIT) STOP
+          IXSAV = LUNIT
+          IF (ISET) LUNIT = IVALUE
+        END IF
+
+        IF (IPAR==2) THEN
+          IXSAV = MESFLG
+          IF (ISET) MESFLG = IVALUE
+        END IF
+        RETURN
+
+      END FUNCTION IXSAV
+!_______________________________________________________________________
+
+      FUNCTION IUMACH()
+! ..
+!     Provide the standard output unit number.
+! ..
+!     INTEGER LOUT, IUMACH
+!     LOUT = IUMACH()
+!     Function Return Values:
+!     LOUT: the standard logical unit for Fortran output.
+!     Internal Notes:
+!     The built-in value of 6 is standard on a wide range
+!     of Fortran systems. This may be machine-dependent.
+! ..
+! .. Function Return Value ..
+        INTEGER :: IUMACH
+! ..
+! .. FIRST EXECUTABLE STATEMENT IUMACH
+! ..
+        IUMACH = 6
+        RETURN
+
+      END FUNCTION IUMACH
+! The modified error handling routines end here.
+!_______________________________________________________________________
+
+      SUBROUTINE CHECK_STAT(IER,CALLED_FROM_WHERE)
+! ..
+! Print an error message if a storage allocation error
+! occurred.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: CALLED_FROM_WHERE, IER
+! ..
+! .. Local Scalars ..
+        INTEGER :: I1
+        CHARACTER (80) :: MSG
+! ..
+! .. FIRST EXECUTABLE STATEMENT CHECK_STAT
+! ..
+        IF (IER/=0) THEN
+          I1 = CALLED_FROM_WHERE
+          MSG = 'A storage allocation error occurred.'
+          CALL XERRDV(MSG,1410,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'The error occurred at location I1.'
+          CALL XERRDV(MSG,1410,2,1,I1,0,0,ZERO,ZERO)
+        END IF
+        RETURN
+
+      END SUBROUTINE CHECK_STAT
+!_______________________________________________________________________
+
+      SUBROUTINE DVPREPS(NEQ,Y,YH,LDYH,SAVF,EWT,F,JAC)
+! ..
+! Determine the sparsity structure and allocate the necessary arrays
+! for MA28 based sparse solutions.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: LDYH, NEQ
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: EWT(*), Y(*)
+        REAL (WP) :: SAVF(*)
+        REAL (WP), INTENT (IN) :: YH(LDYH,*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: DQ, DYJ, ERWT, FAC, YJ
+        INTEGER :: I, IER, J, JFOUND, K, KMAX, KMIN, KNEW, NP1, NZ
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, MAX, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVPREPS
+! ..
+        NZ_SWAG = MAX(MAX(1000,NZ_SWAG),10*N)
+        NP1 = N + 1
+        NZ_ALL = NZ_SWAG
+!       ADDTONNZ = MAX(1000,NZ_SWAG)
+        ADDTONNZ = NZ_SWAG
+10      CONTINUE
+        IF (ALLOCATED(IAN)) THEN
+          DEALLOCATE (IAN,JAN,IGP,JGP,FTEMP1,IKEEP28,IW28,ICN,PMAT, &
+            JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,490)
+          IF (ALLOCATED(JMAT)) THEN
+            DEALLOCATE (JMAT,STAT=IER)
+            CALL CHECK_STAT(IER,500)
+          END IF
+        END IF
+        NZ_ALL = NZ_ALL + ADDTONNZ
+        LICN_ALL = ELBOW_ROOM * NZ_ALL
+        LIRN_ALL = ELBOW_ROOM * NZ_ALL
+        IF (LICN_ALL>MAX_ARRAY_SIZE .OR. LIRN_ALL>MAX_ARRAY_SIZE) THEN
+          MSG = 'Maximum array size exceeded. Stopping.'
+          CALL XERRDV(MSG,1420,2,0,0,0,0,ZERO,ZERO)
+        END IF
+!       Note: ICN may need to be reallocated in DVJACS28.
+        ALLOCATE (IAN(NP1),JAN(LIRN_ALL),IGP(NP1),JGP(N),FTEMP1(N), &
+          IKEEP28(N,5),IW28(N,8),ICN(LICN_ALL),PMAT(LICN_ALL),      &
+          JVECT(LIRN_ALL),STAT=IER)
+        CALL CHECK_STAT(IER,510)
+        IF (JSV==1) THEN
+          ALLOCATE (JMAT(NZ_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,520)
+          JMAT(1:NZ_ALL) = ZERO
+        END IF
+
+        IF (MOSS==0) GOTO 30
+        IF (ISTATC==3) GOTO 20
+
+!       ISTATE = 1 and MOSS /= 0.
+
+!       Perturb Y for structure determination:
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        GOTO (60,70) MOSS
+
+20      CONTINUE
+!       ISTATE = 3 and MOSS /= 0.
+
+!       Load Y from YH(*,1):
+        Y(1:N) = YH(1:N,1)
+        GOTO (60,70) MOSS
+
+!       MOSS = 0
+
+!       Process user's IA,JA. Add diagonal entries if necessary:
+30      CONTINUE
+        IF (IAJA_CALLED) THEN
+        ELSE
+          MSG = 'You have indicated that you wish to supply the'
+          CALL XERRDV(MSG,1430,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'sparsity arrays IA and JA directly but you did'
+          CALL XERRDV(MSG,1430,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'not call SET_IAJA after calling SET_OPTS.'
+          CALL XERRDV(MSG,1430,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        KNEW = 1
+        KMIN = IA(1)
+        IAN(1) = 1
+        DO J = 1, N
+          JFOUND = 0
+          KMAX = IA(J+1) - 1
+          IF (KMIN>KMAX) GOTO 40
+          DO K = KMIN, KMAX
+            I = JA(K)
+            IF (I==J) JFOUND = 1
+            IF (KNEW>NZ_ALL) THEN
+               IF (LP /= 0) THEN
+                  MSG = 'NZ_ALL (=I1) is not large enough.'
+                  CALL XERRDV(MSG,1440,1,0,0,0,0,ZERO,ZERO)
+                  MSG = 'Allocating more space for another try.'
+                  CALL XERRDV(MSG,1440,1,1,NZ_ALL,0,0,ZERO,ZERO)
+               END IF
+               GOTO 10
+            END IF
+            JAN(KNEW) = I
+            KNEW = KNEW + 1
+          END DO
+          IF (JFOUND==1) GOTO 50
+40        IF (KNEW>NZ_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'NZ_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1450,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1450,1,1,NZ_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          JAN(KNEW) = J
+          KNEW = KNEW + 1
+50        IAN(J+1) = KNEW
+          KMIN = KMAX + 1
+        END DO
+        GOTO 90
+
+60      CONTINUE
+
+!       MOSS = 1.
+
+!       Compute structure from user-supplied Jacobian routine JAC.
+        NZ = 0
+        CALL JAC(NEQ,TN,Y,IAN,JAN,NZ,PMAT)
+        IF (NZ<=0) THEN
+          MSG = 'Illegal value of NZ from JAC in DVPREPS.'
+          CALL XERRDV(MSG,1460,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (NZ>NZ_ALL) THEN
+           IF (LP /= 0) THEN
+              MSG = 'NZ_ALL (=I1) is not large enough.'
+              CALL XERRDV(MSG,1470,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'Allocating more space for another try.'
+              CALL XERRDV(MSG,1470,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           END IF
+           GOTO 10
+        END IF
+        CALL JAC(NEQ,TN,Y,IAN,JAN,NZ,PMAT)
+        CALL SET_ICN(N,IAN,ICN)
+        CALL CHECK_DIAG(N,IAN,JAN,ICN)
+        GOTO 90
+
+!       MOSS = 2.
+
+!       Compute structure from results of N+1 calls to F.
+70      K = 1
+        IAN(1) = 1
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        CALL F(NEQ,TN,Y,SAVF)
+        NFE = NFE + 1
+        DO J = 1, N
+          IF (K>NZ_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'NZ_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1480,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1480,1,1,NZ_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          YJ = Y(J)
+          ERWT = ONE/EWT(J)
+          DYJ = SIGN(ERWT,YJ)
+          Y(J) = YJ + DYJ
+          CALL F(NEQ,TN,Y,FTEMP1)
+          NFE = NFE + 1
+          Y(J) = YJ
+          DO 80 I = 1, N
+            DQ = (FTEMP1(I)-SAVF(I))/DYJ
+            IF ((ABS(DQ)<=SETH) .AND. (I/=J)) GOTO 80
+            JAN(K) = I
+            K = K + 1
+80        END DO
+          IAN(J+1) = K
+        END DO
+90      CONTINUE
+        IF (MOSS==0 .OR. ISTATC/=1) GOTO 100
+!       If ISTATE = 1 and MOSS /= 0, restore Y from YH.
+        Y(1:N) = YH(1:N,1)
+100     NNZ = IAN(NP1) - 1
+        LENIGP = 0
+        MAXG = 0
+        IF (MITER==7) THEN
+!         Compute grouping of column indices.
+          MAXG = NP1
+          CALL DGROUP(N,IAN,JAN,MAXG,NGP,IGP,JGP,IKEEP28(1,1), &
+            IKEEP28(1,2),IER)
+          IF (IER/=0) THEN
+            MSG = 'An error occurred in DGROUP.'
+            CALL XERRDV(MSG,1490,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          LENIGP = NGP + 1
+        END IF
+
+        IF (USE_JACSP .AND. MITER==7) THEN
+!         Use Doug Salane's Jacobian routines to determine the column
+!         grouping; and allocate and initialize the necessary arrays
+!         for use in DVJACS48.
+          IF (ALLOCATED(INDROWDS)) THEN
+             DEALLOCATE (INDROWDS, INDCOLDS, NGRPDS, IPNTRDS, JPNTRDS, IWADS, &
+               IWKDS, IOPTDS, YSCALEDS, WKDS, FACDS)
+             CALL CHECK_STAT(IER,530)
+          END IF
+!         We could delete IWADS and use IW28 array.
+          ALLOCATE (INDROWDS(NNZ), INDCOLDS(NNZ), NGRPDS(N+1), IPNTRDS(N+1), &
+            JPNTRDS(N+1), IWADS(6*N), IWKDS(50+N), IOPTDS(5), YSCALEDS(N),  &
+            WKDS(3*N), FACDS(N) ,STAT=IER)
+          CALL CHECK_STAT(IER,540)
+          INDROWDS(1:NNZ) = JAN(1:NNZ)
+          CALL SET_ICN(N,IAN,INDCOLDS)
+          CALL CHECK_DIAG(N,IAN,INDROWDS,INDCOLDS)
+          LIWADS = 6 * N
+          CALL DVDSM(N,N,NNZ,INDROWDS,INDCOLDS,NGRPDS,MAXGRPDS,MINGRPDS,      &
+            INFODS,IPNTRDS,JPNTRDS,IWADS,LIWADS)
+          IF (INFODS /= 1) THEN
+             MSG = 'An error occurred in subroutine DSM. INFO = I1.'
+               CALL XERRDV(MSG,1500,2,1,INFODS,0,0,ZERO,ZERO)
+          END IF
+!         For use in DVJACS28:
+          IOPTDS(4) = 0
+!         Define the IGP and JGP arrays needed by DVJACS28.
+          CALL DGROUPDS(N,MAXGRPDS,NGRPDS,IGP,JGP)
+          NGP = MAXGRPDS
+          LENIGP = MAXGRPDS + 1
+        END IF
+
+!       Trim the arrays to the final sizes.
+
+        IF (NZ_ALL>NNZ) THEN
+          NZ_ALL = NNZ
+          MAX_NNZ = MAX(MAX_NNZ,NNZ)
+          LIRN_ALL = ELBOW_ROOM * NNZ
+          ICN(1:NNZ) = JAN(1:NNZ)
+          DEALLOCATE (JAN,STAT=IER)
+          CALL CHECK_STAT(IER,550)
+          ALLOCATE (JAN(LIRN_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,560)
+          JAN(1:NNZ) = ICN(1:NNZ)
+          CALL CHECK_STAT(IER,570)
+          DEALLOCATE (ICN,PMAT,JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,580)
+          IF (ALLOCATED(JMAT)) THEN
+            DEALLOCATE (JMAT,STAT=IER)
+            CALL CHECK_STAT(IER,590)
+          END IF
+          LICN_ALL = ELBOW_ROOM * NNZ
+          ALLOCATE (ICN(LICN_ALL),PMAT(LICN_ALL),JVECT(LIRN_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,600)
+          IF (JSV==1) THEN
+            ALLOCATE (JMAT(NNZ),STAT=IER)
+            CALL CHECK_STAT(IER,610)
+            JMAT(1:NNZ) = ZERO
+          END IF
+          IF (MITER==7) THEN
+            JVECT(1:LENIGP) = IGP(1:LENIGP)
+            DEALLOCATE (IGP,STAT=IER)
+            CALL CHECK_STAT(IER,620)
+            ALLOCATE (IGP(LENIGP),STAT=IER)
+            CALL CHECK_STAT(IER,630)
+            IGP(1:LENIGP) = JVECT(1:LENIGP)
+          END IF
+        END IF
+        IF (SCALE_MATRIX) THEN
+           IF (ALLOCATED(CSCALEX)) THEN
+              DEALLOCATE (CSCALEX,RSCALEX,WSCALEX,STAT=IER)
+              CALL CHECK_STAT(IER,640)
+              ALLOCATE (CSCALEX(N),RSCALEX(N),WSCALEX(N,5),STAT=IER)
+              CALL CHECK_STAT(IER,650)
+           ELSE
+              ALLOCATE (CSCALEX(N),RSCALEX(N),WSCALEX(N,5),STAT=IER)
+              CALL CHECK_STAT(IER,660)
+           END IF
+        END IF
+        IF (LP /= 0) THEN
+           MSG = 'The final DVPRPEPS storage allocations are:'
+           CALL XERRDV(MSG,1510,1,0,0,0,0,ZERO,ZERO)
+           MSG = '   NZ_ALL (=I1):'
+           CALL XERRDV(MSG,1510,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           MSG = '   LIRN_ALL (=I1) and LICN_ALL (=I2):'
+           CALL XERRDV(MSG,1510,1,2,LIRN_ALL,LICN_ALL,0,ZERO,ZERO)
+         END IF
+        RETURN
+
+      END SUBROUTINE DVPREPS
+!_______________________________________________________________________
+
+      SUBROUTINE DVRENEW(NEQ,Y,SAVF,EWT,F)
+! ..
+! In the event MA28BD encounters a zero pivot in the LU factorization
+! of the iteration matrix due to an out-of-date MA28AD pivot sequence,
+! re-calculate the sparsity structure using finite differences.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NEQ
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: EWT(*), SAVF(*), Y(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: DQ, DYJ, ERWT, FAC, YJ
+        INTEGER :: ADDTONZ, I, IER, J, K, KVAL, NP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, MAX, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVRENEW
+! ..
+! .. Caution:
+!    This routine must not be called before DVPREPS has been called.
+!
+!    Note:
+!    On entry to DVRENEW, the allocated array sizes of arrays that
+!    may change size are:
+!      ICN, PMAT  = length LICN_ALL
+!      JAN, JVECT = length LIRN_ALL
+!      JMAT       = length NZ_ALL
+!      IGP        = length LENIGP on first entry; N+1 thereafter
+
+!       Check if a numerical Jacobian is being used and stop if
+!       it is not.
+        IF (MITER /= 7) THEN
+          MSG = 'DVRENEW can be used only if MITER = 7.'
+          CALL XERRDV(MSG,1520,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Save Y and SAVF.
+        IF (.NOT.ALLOCATED(YTEMP)) THEN
+           ALLOCATE (YTEMP(N),DTEMP(N),STAT=IER)
+           CALL CHECK_STAT(IER,670)
+        END IF
+        YTEMP(1:N) = Y(1:N)
+        DTEMP(1:N) = SAVF(1:N)
+
+!       Define the amount to be added to the array lengths
+!       if necessary.
+        NP1 = N + 1
+        NNZ = IAN(NP1) - 1
+        ADDTONZ = ELBOW_ROOM * NNZ
+
+!       Just change the size of IGP to N+1 if have not already
+!       done so.
+        IF (SIZE(IGP) /= NP1) THEN
+           DEALLOCATE (IAN,STAT=IER)
+           CALL CHECK_STAT(IER,680)
+           ALLOCATE (IAN(NP1),STAT=IER)
+           CALL CHECK_STAT(IER,690)
+        END IF
+
+!       Go to the differencing section to determine the new
+!       sparsity structure.
+        GOTO 20
+
+10      CONTINUE
+
+!       Reallocate the arrays if necessary.
+        IF (KVAL > LIRN_ALL) THEN
+!          Note: JAN and JVECT may need to be reallocated in DVJACS28.
+           LIRN_ALL = LIRN_ALL + ADDTONZ
+           IF (LIRN_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+             CALL XERRDV(MSG,1530,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (JAN,JVECT,STAT=IER)
+           CALL CHECK_STAT(IER,700)
+           ALLOCATE (JAN(LIRN_ALL),JVECT(LIRN_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,710)
+        END IF
+        IF (KVAL > LICN_ALL) THEN
+!          Note: ICN and PMAT may need to be reallocated in DVJACS28.
+           LICN_ALL = LICN_ALL + ADDTONZ
+           IF (LICN_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+             CALL XERRDV(MSG,1540,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (ICN,PMAT,STAT=IER)
+           CALL CHECK_STAT(IER,720)
+           ALLOCATE (ICN(LICN_ALL),PMAT(LICN_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,730)
+        END IF
+
+   20   CONTINUE
+
+!       Perturb Y for structure determination:
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+
+!       Compute structure from results of N+1 calls to F.
+        K = 1
+        IAN(1) = 1
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        CALL F(NEQ,TN,Y,SAVF)
+        NFE = NFE + 1
+        DO J = 1, N
+          KVAL = K
+          IF (KVAL > LIRN_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'LIRN_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1550,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1550,1,1,LIRN_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          IF (KVAL > LICN_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'LICN_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1560,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1560,1,1,LICN_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          YJ = Y(J)
+          ERWT = ONE/EWT(J)
+          DYJ = SIGN(ERWT,YJ)
+          Y(J) = YJ + DYJ
+          CALL F(NEQ,TN,Y,FTEMP1)
+          NFE = NFE + 1
+          Y(J) = YJ
+          DO 80 I = 1, N
+            DQ = (FTEMP1(I)-SAVF(I))/DYJ
+            IF ((ABS(DQ)<=SETH) .AND. (I/=J)) GOTO 80
+            JAN(K) = I
+            K = K + 1
+80        END DO
+          IAN(J+1) = K
+        END DO
+
+        NNZ = IAN(NP1) - 1
+        IF (NNZ > NZ_ALL .AND. JSV == 1) THEN
+!          Increase the size of JMAT if necessary.
+           NZ_ALL = NNZ
+           IF (LP /= 0) THEN
+              MSG = 'NZ_ALL (=I1) is not large enough.'
+              CALL XERRDV(MSG,1570,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'Allocating more space for another try.'
+              CALL XERRDV(MSG,1570,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           END IF
+           IF (NZ_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+              CALL XERRDV(MSG,1580,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (JMAT,STAT=IER)
+           CALL CHECK_STAT(IER,740)
+           ALLOCATE (JMAT(NZ_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,750)
+           JMAT(1:NZ_ALL) = ZERO
+        END IF
+
+!       Compute grouping of column indices.
+
+        LENIGP = 0
+        MAXG = 0
+        MAXG = NP1
+        CALL DGROUP(N,IAN,JAN,MAXG,NGP,IGP,JGP,IKEEP28(1,1), &
+          IKEEP28(1,2),IER)
+        IF (IER/=0) THEN
+          MSG = 'An error occurred in DGROUP.'
+          CALL XERRDV(MSG,1590,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        LENIGP = NGP + 1
+
+!       Restore Y and SAVF.
+        Y(1:N) = YTEMP(1:N)
+        SAVF(1:N) = DTEMP(1:N)
+        RETURN
+
+      END SUBROUTINE DVRENEW
+!_______________________________________________________________________
+
+      SUBROUTINE DGROUP(N,IA,JA,MAXG,NGRP,IGP,JGP,INCL,JDONE,IER)
+! ..
+! Construct groupings of the column indices of the Jacobian matrix,
+! used in the numerical evaluation of the Jacobian by finite
+! differences for sparse solutions.
+! ..
+!     Input:
+!     N      = the order of the matrix
+!     IA,JA  = sparse structure descriptors of the matrix by rows
+!     MAXG   = length of available storage in the IGP array
+!     INCL and JDONE are working arrays of length N.
+!     Output:
+!     NGRP   = number of groups
+!     JGP    = array of length N containing the column indices by
+!              groups
+!     IGP    = pointer array of length NGRP + 1 to the locations
+!              in JGP of the beginning of each group
+!     IER    = error indicator. IER = 0 if no error occurred, or
+!              1 if MAXG was insufficient
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IER, NGRP
+        INTEGER, INTENT (IN) :: MAXG, N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*), JA(*)
+        INTEGER, INTENT (INOUT) :: IGP(*), INCL(*), JDONE(*), JGP(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, K, KMAX, KMIN, NCOL, NG
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGROUP
+! ..
+        IER = 0
+        JDONE(1:N) = 0
+        NCOL = 1
+        DO NG = 1, MAXG
+          IGP(NG) = NCOL
+          INCL(1:N) = 0
+          DO 20 J = 1, N
+!           Reject column J if it is already in a group.
+            IF (JDONE(J)==1) GOTO 20
+            KMIN = IA(J)
+            KMAX = IA(J+1) - 1
+            DO 10 K = KMIN, KMAX
+!           Reject column J if it overlaps any column already
+!           in this group.
+              I = JA(K)
+              IF (INCL(I)==1) GOTO 20
+10          END DO
+!           Accept column J into group NG.
+            JGP(NCOL) = J
+            NCOL = NCOL + 1
+            JDONE(J) = 1
+            DO K = KMIN, KMAX
+              I = JA(K)
+              INCL(I) = 1
+            END DO
+20        END DO
+!         Stop if this group is empty (grouping is complete).
+          IF (NCOL==IGP(NG)) GOTO 30
+        END DO
+!       Error return if not all columns were chosen (MAXG too small).
+        IF (NCOL<=N) GOTO 40
+        NG = MAXG
+30      NGRP = NG - 1
+        RETURN
+40      IER = 1
+        RETURN
+
+      END SUBROUTINE DGROUP
+!_______________________________________________________________________
+
+      SUBROUTINE BGROUP(N,BJA,BINCL,BDONE,ML,MU)
+! ..
+! Construct groupings of the column indices of the Jacobian
+! matrix, used in the numerical evaluation of the Jacobian
+! by finite differences for banded solutions when the nonzero
+! sub and super diagonals are known. BGROUP is similar to
+! DGROUP but it does not require the sparse structure arrays
+! and it uses real rather than integer work arrays.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       BINCL   = real working array of length N
+!       BJA     = real working array of length N
+!       BDONE   = real working array of length N
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!
+!     Output: (PRIVATE information used in DVJAC)
+!
+!       BNGRP   = integer number of groups
+!       BJGP    = integer array of length N containing the
+!                 column indices by groups
+!       BIGP    = integer pointer array of length BNGRP + 1
+!                 to the locations in BJGP of the beginning
+!                 of each group
+!
+!       Note:
+!          On output:
+!             For I = 1, ..., BNGRP:
+!                Start of group I:
+!                  J = BIGP(I)
+!                Number of columns in group I:
+!                  K = BIGP(I+1) - BIGP(I)
+!                Columns in group I:
+!                  BJGP(J-1+L), L=1, ..., K
+!
+!    Note:
+!    The three arrays BJA, BINCL, and BDONE are REAL to avoid the
+!    necessity to allocate three new INTEGER arrays. BGROUP can
+!    be called only at an integration start or restart because
+!    DVODE_F90 work arrays are used for these arrays.
+!
+!    Note:
+!    The PRIVATE banded information SUBDS, NSUBDS, SUPDS, NSUPS,
+!    ML, and MU must be defined before calling BGROUP.
+!       ML        = lower bandwidth
+!       MU        = upper bandwidth
+!       NSUBS     = number of strict sub diagonals
+!       SUBDS(I)  = row in which the Ith sub diagonal
+!                   begins, I=1, ..., NSUBS
+!       NSUPS     = number of strict super diagonals
+!       SUPDS(I)  = column in which the Ith super diagonal
+!                   begins, I=1, ..., NSUPS
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: BINCL(*), BJA(*), BDONE(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IBDONE, IBINCL, IER, J, K, KBEGIN, KFINI, &
+          KI, KJ, MAXG, NCOL, NG
+        REAL (WP) :: FUDGE, ONE_PLUS_FUDGE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC INT, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT BGROUP
+! ..
+!       Storage for the column grouping information.
+        IF (ALLOCATED(BIGP)) THEN
+           DEALLOCATE (BIGP,BJGP,STAT=IER)
+           CALL CHECK_STAT(IER,760)
+        END IF
+        ALLOCATE (BIGP(N+1),BJGP(N),STAT=IER)
+        CALL CHECK_STAT(IER,770)
+
+        FUDGE = 0.4_WP
+        ONE_PLUS_FUDGE = 1.0_WP + FUDGE
+        MAXG = N + 1
+!       BDONE(1:N) = 0 ...
+        BDONE(1:N) = FUDGE
+        NCOL = 1
+        DO NG = 1, MAXG
+           BIGP(NG) = NCOL
+!          BINCL(1:N) = 0 ...
+           BINCL(1:N) = FUDGE
+           DO 30 J = 1, N
+!             Reject column J if it is already in a group.
+!             IF (BDONE(J) == 1) GOTO 30 ...
+              IBDONE = INT(BDONE(J))
+              IF (IBDONE == 1) GOTO 30
+!             Vertical extent of band = KBEGIN to KFINI.
+!             KJ = number of nonzeros in column J.
+!             BJA(K) = K implies nonzero at (k,j).
+              KBEGIN = MAX(J-MU,1)
+              KFINI = MIN(J+ML,N)
+              KJ = 0
+!             BJA(1:N) = 0 ...
+              BJA(1:N) = FUDGE
+!             Locate the row positions of the nonzeros in column J.
+!             Restrict attention to the band:
+              DO 10 K = KBEGIN, KFINI
+                 IF (K < J) THEN
+                    IF (NSUPS > 0) THEN
+                       DO I = NSUPS, 1, -1
+!                         KI = SUPDS(I) + J - 1
+                          KI = J + 1 - SUPDS(I)
+                          IF (K == KI) THEN
+                             KJ = KJ + 1
+!                            BJA(K) = K ...
+                             BJA(K) = REAL(K) + FUDGE
+                          END IF
+                       END DO
+                    END IF
+                 ELSEIF (K == J) THEN
+                    KJ = KJ + 1
+!                   BJA(K) = K ...
+                    BJA(K) = REAL(K) + FUDGE
+                 ELSE
+                    IF (NSUBS > 0) THEN
+                       DO I = NSUBS, 1, -1
+                          KI = SUBDS(I) + J -1
+                          IF (K == KI) THEN
+                             KJ = KJ + 1
+!                            BJA(K) = K ...
+                             BJA(K) = REAL(K) + FUDGE
+                          END IF
+                       END DO
+                    END IF
+              END IF
+ 10           CONTINUE
+!             At this point BJA contains the row numbers for
+!             the nonzeros in column J.
+              DO 20 K = KBEGIN, KFINI
+!                Reject column J if it overlaps any column
+!                already in this group.
+!                I = BJA(K)
+                 I = INT(BJA(K))
+                 IBINCL = INT(BINCL(I))
+!                IF (BINCL(I) == 1 .AND. I == K) GOTO 30
+                 IF (IBINCL == 1 .AND. I == K) GOTO 30
+ 20           END DO
+!             Accept column J into group NG.
+              BJGP(NCOL) = J
+              NCOL = NCOL + 1
+!             BDONE(J) = 1 ...
+              BDONE(J) = ONE_PLUS_FUDGE
+              DO K = 1, N
+!                IF (I == K) BINCL(I) = 1 ...
+                 I = INT(BJA(K))
+                 IF (I == K) BINCL(I) = ONE_PLUS_FUDGE
+              END DO
+ 30        END DO
+!          Done if this group is empty (grouping is complete).
+           IF (NCOL == BIGP(NG)) GOTO 40
+        END DO
+
+!       Should not get here since MAXG = N + 1.
+!       Terminal error if not all columns were chosen
+!       because MAXG too small.
+        IF (NCOL <= N) THEN
+           MSG = 'An impossible error occurred in subroutine BGROUP.'
+           CALL XERRDV(MSG,1600,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+        NG = MAXG
+ 40     BNGRP = NG - 1
+
+!       Trim BIGP to it's actual size if necessary.
+        IF (NG < MAXG) THEN
+!          BJA(1:NG) = BIGP(1:NG) ...
+           DO I = 1, NG
+              BJA(I) = REAL(BIGP(I)) + FUDGE
+           END DO
+           DEALLOCATE (BIGP,STAT=IER)
+           CALL CHECK_STAT(IER,780)
+           ALLOCATE (BIGP(NG),STAT=IER)
+           CALL CHECK_STAT(IER,790)
+!          BIGP(1:NG) = BJA(1:NG) ...
+           DO I = 1, NG
+              BIGP(I) = INT(BJA(I))
+           END DO
+        END IF
+        RETURN
+
+      END SUBROUTINE BGROUP
+!_______________________________________________________________________
+
+      SUBROUTINE BANDED_IAJA(N,ML,MU)
+! ..
+! Build the sparse structure descriptor arrays for a banded
+! matrix if the nonzero diagonals are known.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!
+!     Output: (PRIVATE information used in DVJAC)
+!
+!       IAB     = IA descriptor array
+!       JAB     = JA descriptor array
+!
+!    Note:
+!    The PRIVATE banded information SUBDS, NSUBS, SUPDS, NSUPS,
+!    ML, and MU must be defined before calling BANDED_IAJA.
+!       ML        = lower bandwidth
+!       MU        = upper bandwidth
+!       NSUBS     = number of strict sub diagonals
+!       SUBDS(I)  = row in which the Ith sub diagonal
+!                   begins, I=1, ..., NSUBS
+!       NSUPS     = number of strict super diagonals
+!       SUPDS(I)  = column in which the Ith super diagonal
+!                   begins, I=1, ..., NSUPS
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IER, J, K, KBEGIN, KFINI, KI, KJ, &
+          NP1, NZBB
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC ALLOCATED, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT BANDED_IAJA
+! ..
+!    Check for errors.
+
+     IF (.NOT.BUILD_IAJA) THEN
+        MSG = 'BANDED_IAJA cannot be called with BUILD_IAJA = .FALSE.'
+        CALL XERRDV(MSG,1610,2,0,0,0,0,ZERO,ZERO)
+     END IF
+
+     IF (NSUBS < 0) THEN
+        MSG = 'NSUBS < 0 in BANDED_IAJA.'
+        CALL XERRDV(MSG,1620,2,0,0,0,0,ZERO,ZERO)
+     ELSE
+        IF (NSUBS > 0) THEN
+           IF (NSUBS /= SIZE(SUBDS)) THEN
+              MSG = 'The size of the SUBDS array must'
+              CALL XERRDV(MSG,1630,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'equal NSUBS in BANDED_IAJA.'
+              CALL XERRDV(MSG,1630,2,0,0,0,0,ZERO,ZERO)
+           END IF
+        END IF
+     END IF
+
+     IF (NSUPS < 0) THEN
+        MSG = 'NSUPS < 0 in BANDED_IAJA.'
+        CALL XERRDV(MSG,1640,2,0,0,0,0,ZERO,ZERO)
+     ELSE
+        IF (NSUPS > 0) THEN
+           IF (NSUPS /= SIZE(SUPDS)) THEN
+              MSG = 'The size of the SUPDS array must'
+              CALL XERRDV(MSG,1650,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'equal NSUPS in BANDED_IAJA.'
+              CALL XERRDV(MSG,1650,2,0,0,0,0,ZERO,ZERO)
+           END IF
+        END IF
+     END IF
+
+!    Allocate the necessary storage for the descriptor arrays.
+
+!    Define the total number of elements in all diagonals.
+     NP1 = N + 1
+     NZB = (NSUBS + NSUPS + 1) * NP1 - 1
+     IF (NSUBS /= 0) THEN
+        DO I = 1, NSUBS
+           NZB = NZB - SUBDS(I)
+        END DO
+     END IF
+     IF (NSUPS /= 0) THEN
+        DO I = 1, NSUPS
+           NZB = NZB - SUPDS(I)
+        END DO
+     END IF
+     IF (ALLOCATED(IAB)) THEN
+        DEALLOCATE(IAB,JAB,STAT=IER)
+        CALL CHECK_STAT(IER,800)
+     END IF
+     ALLOCATE(IAB(NP1),JAB(NZB),STAT=IER)
+     CALL CHECK_STAT(IER,810)
+     IAB(1) = 1
+     NZBB = 0
+
+!    For each column in the matrix...
+     DO J = 1, N
+!       Vertical extent of band = KBEGIN to KFINI.
+!       KJ = number of nonzeros in column J.
+        KBEGIN = MAX(J-MU,1)
+        KFINI = MIN(J+ML,N)
+        KJ = 0
+!       Locate the row positions of the nonzeros in column J.
+!       (Restrict attention to the band.)
+        IAB(J+1) = IAB(J)
+!       For each row in the intersection of the band with
+!       this column ...
+        DO K = KBEGIN, KFINI
+!          Does column J intersect a super diagonal at (K,J)?
+           IF (K < J) THEN
+              DO I = NSUPS, 1, -1
+                 KI = J + 1 - SUPDS(I)
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    IAB(J+1) = IAB(J+1) + 1
+                    NZBB = NZBB + 1
+                    JAB(NZBB) = K
+                    GOTO 10
+                 END IF
+              END DO
+           ELSEIF (K == J) THEN
+!             We are on the main diagonal.
+              KJ = KJ + 1
+              IAB(J+1) = IAB(J+1) + 1
+              NZBB = NZBB + 1
+              JAB(NZBB) = K
+              GOTO 10
+           ELSE
+!             Does column J intersect a sub diagonal at (K,J)?
+              DO I = NSUBS, 1, -1
+                 KI = SUBDS(I) + J - 1
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    IAB(J+1) = IAB(J+1) + 1
+                    NZBB = NZBB + 1
+                    JAB(NZBB) = K
+                    GOTO 10
+                 END IF
+              END DO
+           END IF
+10         CONTINUE
+        END DO
+     END DO
+
+     IF (NZBB /= NZB) THEN
+        MSG = 'NZBB (I1) is not equal to NZB (I2)'
+        CALL XERRDV(MSG,1660,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'in BANDED_IAJA.'
+        CALL XERRDV(MSG,1660,2,2,NZBB,NZB,0,ZERO,ZERO)
+     END IF
+     RETURN
+
+   END SUBROUTINE BANDED_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE BANDED_GET_BJNZ(N,ML,MU,JCOL,JNZ,NZJ)
+! ..
+! Locate the nonzeros in a given column of a sparse banded matrix
+! with known diagonals. This is a version of BANDED_IAJA modified
+! to do only one column.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!       JCOL    = column number between 1 and N
+!       JZ      = integer array of length N
+!
+!     Output:
+!
+!       JNZ    = integer array of length N. If
+!                 JNZ(K) is not 0, there is a
+!                 nonzero at position (K,JCOL)
+!       NZJ     = number of nozeros in column JCOL
+!
+!    Caution:
+!    No parameter checking is done since this subroutine
+!    will be called many times. Note that a number of
+!    PRIVATE parameters must be set before calling this
+!    subroutine.
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU, JCOL
+        INTEGER, INTENT (OUT) :: NZJ
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (OUT) :: JNZ(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, K, KBEGIN, KFINI, KI, KJ
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT BANDED_GET_BJNZ
+! ..
+        JNZ(1:N) = 0
+        J = JCOL
+
+!       Locate the row positions of the nonzeros in column J.
+
+!       Vertical extent of band = KBEGIN to KFINI.
+        KBEGIN = MAX(J-MU,1)
+        KFINI = MIN(J+ML,N)
+!       KJ = number of nonzeros in column J.
+        KJ = 0
+!       For each row in the intersection of the band with
+!       this column ...
+        DO K = KBEGIN, KFINI
+!          Does column J intersect a super diagonal at (K,J)?
+           IF (K < J) THEN
+              DO I = NSUPS, 1, -1
+                 KI = J + 1 - SUPDS(I)
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    JNZ(KJ) = K
+                    GOTO 10
+                 END IF
+              END DO
+           ELSEIF (K == J) THEN
+!             We are on the main diagonal.
+              KJ = KJ + 1
+              JNZ(KJ) = K
+              GOTO 10
+           ELSE
+!             Does column J intersect a sub diagonal at (K,J)?
+              DO I = NSUBS, 1, -1
+                 KI = SUBDS(I) + J - 1
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    JNZ(KJ) = K
+                    GOTO 10
+                 END IF
+              END DO
+           END IF
+10         CONTINUE
+        END DO
+        NZJ = KJ
+     RETURN
+
+   END SUBROUTINE BANDED_GET_BJNZ
+!_______________________________________________________________________
+
+! Beginning of Jacobian related routines that use MA28
+
+      SUBROUTINE DVNLSS28(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC, &
+        NFLAG,ATOL,ITOL)
+! ..
+! This is the nonlinear system solver for MA28 based sparse solutions.
+! ..
+! Subroutine DVNLSS28 is a nonlinear system solver, which uses functional
+! iteration or a chord (modified Newton) method. For the chord method
+! direct linear algebraic system solvers are used. Subroutine DVNLSS28
+! then handles the corrector phase of this integration package.
+! Communication with DVNLSS28 is done with the following variables. (For
+! more details, please see the comments in the driver subroutine.)
+! Y          = The dependent variable, a vector of length N, input.
+! YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+!              and output. On input, it contains predicted values.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! SAVF       = A work array of length N.
+! EWT        = An error weight vector of length N, input.
+! ACOR       = A work array of length N, used for the accumulated
+!              corrections to the predicted y vector.
+! WM,IWM     = Real and integer work arrays associated with matrix
+!              operations in chord iteration (MITER /= 0).
+! F          = Dummy name for user supplied routine for f.
+! JAC        = Dummy name for user supplied Jacobian routine.
+! NFLAG      = Input/output flag, with values and meanings as follows:
+!              INPUT
+!                  0 first call for this time step.
+!                 -1 convergence failure in previous call to DVNLSS28.
+!                 -2 error test failure in DVSTEP.
+!              OUTPUT
+!                  0 successful completion of nonlinear solver.
+!                 -1 convergence failure or singular matrix.
+!                 -2 unrecoverable error in matrix preprocessing
+!                    (cannot occur here).
+!                 -3 unrecoverable error in solution (cannot occur
+!                    here).
+! IPUP       = Own variable flag with values and meanings as follows:
+!              0,          do not update the Newton matrix.
+!              MITER \= 0  update Newton matrix, because it is the
+!                          initial step, order was changed, the error
+!                          test failed, or an update is indicated by
+!                          the scalar RC or step counter NST.
+! For more details, see comments in driver subroutine.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, LDYH
+        INTEGER, INTENT (INOUT) :: NFLAG
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*)
+        REAL (WP), INTENT (IN) :: ATOL(*)
+        INTEGER IWM(*)
+        LOGICAL DUMMY
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: ACNRMNEW, CSCALE, DCON, DEL, DELP
+        INTEGER :: I, IERPJ, IERSL, M
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNLSS28
+! ..
+! Get rid of a couple of needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          WM(1) = ZERO
+          IWM(1) = 0
+        END IF  
+! On the first step, on a change of method order, or after a
+! nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+! to force a Jacobian update when MITER /= 0.
+        IF (JSTART==0) NSLP = 0
+        IF (NFLAG==0) ICF = 0
+        IF (NFLAG==-2) IPUP = MITER
+        IF ((JSTART==0) .OR. (JSTART==-1)) IPUP = MITER
+!       If this is functional iteration, set CRATE = 1 and drop
+!       to 220.
+        IF (MITER==0) THEN
+          CRATE = ONE
+          GOTO 10
+        END IF
+
+! RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER
+! to force DVJACS28 to be called, if a Jacobian is involved. In any
+! case, DVJACS28 is called at least every MSBP steps.
+
+        DRC = ABS(RC-ONE)
+        IF (DRC>CCMAX .OR. NST>=NSLP+MSBP) IPUP = MITER
+
+! Up to MAXCOR corrector iterations are taken. A convergence test is
+! made on the r.m.s. norm of each correction, weighted by the error
+! weight vector EWT. The sum of the corrections is accumulated in the
+! vector ACOR(i). The YH array is not altered in the corrector loop.
+
+10      M = 0
+        DELP = ZERO
+! Original:
+!       CALL DCOPY_F90(N,YH(1,1),1,Y,1)
+        CALL DCOPY_F90(N,YH(1:N,1),1,Y(1:N),1)
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        IF (IPUP<=0) GOTO 20
+
+! If indicated, the matrix P = I - h*rl1*J is reevaluated and
+! preprocessed before starting the corrector iteration. IPUP
+! is set to 0 as an indicator that this has been done.
+
+        CALL DVJACS28(Y,YH,LDYH,EWT,ACOR,SAVF,F,JAC,IERPJ,N, &
+          ATOL,ITOL)
+        IPUP = 0
+        RC = ONE
+        DRC = ZERO
+        CRATE = ONE
+        NSLP = NST
+!     If matrix is singular, take error return to force cut in
+!     step size.
+        IF (IERPJ/=0) GOTO 70
+20      ACOR(1:N) = ZERO
+!       This is a looping point for the corrector iteration.
+30      IF (MITER/=0) GOTO 40
+
+! In the case of functional iteration, update Y directly from
+! the result of the last function evaluation.
+
+        SAVF(1:N) = RL1*(H*SAVF(1:N)-YH(1:N,2))
+        Y(1:N) = SAVF(1:N) - ACOR(1:N)
+        DEL = DVNORM(N,Y,EWT)
+        Y(1:N) = YH(1:N,1) + SAVF(1:N)
+        CALL DCOPY_F90(N,SAVF,1,ACOR,1)
+        GOTO 50
+
+! In the case of the chord method, compute the corrector error,
+! and solve the linear system with that as right-hand side and
+! P as coefficient matrix. The correction is scaled by the factor
+! 2/(1+RC) to account for changes in h*rl1 since the last
+! DVJACS28 call.
+
+40      Y(1:N) = (RL1*H)*SAVF(1:N) - (RL1*YH(1:N,2)+ACOR(1:N))
+        CALL DVSOLS28(Y,SAVF,IERSL)
+        NNI = NNI + 1
+        IF (IERSL>0) GOTO 60
+        IF (METH==2 .AND. ABS(RC-ONE)>ZERO) THEN
+          CSCALE = TWO/(ONE+RC)
+          CALL DSCAL_F90(N,CSCALE,Y,1)
+        END IF
+        DEL = DVNORM(N,Y,EWT)
+        CALL DAXPY_F90(N,ONE,Y,1,ACOR,1)
+        Y(1:N) = YH(1:N,1) + ACOR(1:N)
+
+! Test for convergence. If M > 0, an estimate of the convergence
+! rate constant is stored in CRATE, and this is used in the test.
+
+50      IF (M/=0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+        DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+        IF (DCON<=ONE) GOTO 80
+        M = M + 1
+        IF (M==MAXCOR) GOTO 60
+        IF (M>=2 .AND. DEL>RDIV*DELP) GOTO 60
+        DELP = DEL
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(I),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(I),ZERO)
+          END DO
+        END IF
+        GOTO 30
+
+60      IF (MITER==0 .OR. JCUR==1) GOTO 70
+        ICF = 1
+        IPUP = MITER
+        GOTO 10
+
+70      CONTINUE
+        NFLAG = -1
+        ICF = 2
+        IPUP = MITER
+        RETURN
+
+!       Return for successful step.
+80      NFLAG = 0
+
+!       Enforce bounds.
+        IF (BOUNDS) THEN
+          CHANGED_ACOR = .FALSE.
+          IF (M==0) THEN
+            ACNRM = DEL
+          ELSE
+            ACNRM = DVNORM(N,ACOR,EWT)
+          END IF
+          IF (MITER/=0) THEN
+!           Since Y(:) = YH(:,1) + ACOR(:):
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+              IF (Y(IDX(I))>UB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+            END DO
+          ELSE
+!           Since Y(:) = YH(:,1) + SAVF(:) and
+!           since CALL DCOPY_F90(N, SAVF, 1, ACOR, 1) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+              END IF
+              IF (Y(IDX(I))>UB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+              END IF
+            END DO
+          END IF
+          IF (CHANGED_ACOR) THEN
+            IF (M==0) THEN
+              ACNRMNEW = DEL
+            ELSE
+              ACNRMNEW = DVNORM(N,ACOR,EWT)
+            END IF
+            ACNRM = MAX(ACNRM,ACNRMNEW)
+          ELSE
+          END IF
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+        ELSE
+!         No projections are required.
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+          IF (M==0) ACNRM = DEL
+          IF (M>0) ACNRM = DVNORM(N,ACOR,EWT)
+        END IF
+        RETURN
+
+      END SUBROUTINE DVNLSS28
+!_______________________________________________________________________
+
+      SUBROUTINE DVSOLS28(X,TEM,IERSL)
+! ..
+! Manage the solution of the MA28 based sparse linear system arising
+! from a chord iteration.
+! ..
+! This routine solves the sparse linear system arising from a chord
+! iteration. If MITER is 6 or 7, it calls MA28CD to accomplish this.
+! Communication with DVSOLS28 uses the following variables:
+! X = The right-hand side vector on input, and the solution vector
+!     on output, of length N.
+! TEM (=SAVF(*))
+! IERSL = Output flag. IERSL = 0 if no trouble occurred.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERSL
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: TEM(*), X(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSOLS28
+! ..
+        IF (SCALE_MATRIX) THEN
+           DO I = 1, N
+              X(I) = X(I) * RSCALEX(I)
+           END DO
+        END IF
+        IERSL = 0
+        CALL MA28CD(N,PMAT,LICN_ALL,ICN,IKEEP28,X,TEM,1)
+        MA28CD_CALLS = MA28CD_CALLS + 1
+        IF (SCALE_MATRIX) THEN
+           DO I = 1, N
+              X(I) = X(I) * CSCALEX(I)
+           END DO
+        END IF
+        RETURN
+
+      END SUBROUTINE DVSOLS28
+!_______________________________________________________________________
+
+      SUBROUTINE DVJACS28(Y,YH,LDYH,EWT,FTEMP1,SAVF,F,JAC,IERPJ,N, &
+        ATOL,ITOL)
+! ..
+! Compute and process P = I - H*RL1*J, where J is an approximation to
+! the MA28 based sparse Jacobian.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERPJ
+        INTEGER, INTENT (IN) :: LDYH, N, ITOL
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: EWT(*), FTEMP1(*), SAVF(*), Y(*), YH(LDYH,*)
+        REAL (WP), INTENT (IN) :: ATOL(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: CON, FAC, HRL1, R, R0, SRUR
+        INTEGER :: I, IER, J, JER, JJ, JJ1, JJ2, K, K1, K2, MA28,       &
+          MA28SAVE, MB28SAVE, NG, NZ
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, EXP, MAX, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJACS28
+! ..
+        IERPJ = 0
+
+!       Structure determination
+
+!       Calculate the sparsity structure if this is the first call to
+!       DVJACS28 with ISTATE = 1 or if it is a continuation call with
+!       ISTATE = 3.
+        IF (ISTATC==1 .OR. ISTATC==3) THEN
+          CALL DVPREPS(N,Y,YH,LDYH,DTEMP,EWT,F,JAC)
+          ISTATC = 0
+        END IF
+        JCUR = 0
+        HRL1 = H*RL1
+        CON = -HRL1
+
+!       If MA28 = 4 the saved copy of the Jacobian will be used
+!       to restore PMAT. If MA28 = 1,2,3 the Jacobian will be
+!       recomputed. If MA28 = 1,2 the JVECT and ICN pointer arrays
+!       will be defined and MA28AD will be called to decompose
+!       PMAT. If MA28 = 3 the JVECT pointer array will be defined
+!       and MA28BD will be called to decompose PMAT using the ICN
+!       pointer array returned in the last call to MA28AD.
+
+        MA28 = 4
+        IF (INEWJ==1 .OR. MB28==0) MA28 = 3
+        IF (NST>=NSLJ+MSBJ) MA28 = 3
+!       IF (ICF==1 .OR. ICF==2) MA28 = 3
+        IF (ICF==1 .AND. DRC<CCMXJ) MA28 = 3
+        IF (ICF==2) MA28 = 3
+        IF (NST>=NSLG+MSBG) MA28 = 2
+        IF (JSTART==0 .OR. JSTART==-1) MA28 = 1
+        JSTART = 1
+10      IF (MA28<=2) NSLG = NST
+        IF (MA28<=3) NSLJ = NST
+
+!       Analytical Sparse Jacobian
+
+!       If MITER = 6, call JAC to evaluate J analytically, multiply
+!       J by CON = -H*EL(1), and add the identity matrix to form P.
+        IF (MITER==6) THEN
+          IF (MA28==4) THEN
+!           Reuse the saved Jacobian.
+            NZ = IAN(N+1) - 1
+            PMAT(1:NZ) = CON*JMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==JVECT(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 90
+          END IF
+          JCUR = 1
+          NJE = NJE + 1
+          IF (MA28==1 .OR. MA28==2) THEN
+            NZ = IAN(N+1) - 1
+            CALL JAC(N,TN,Y,IAN,JAN,NZ,PMAT)
+            NZ = IAN(N+1) - 1
+            IF (NZ>NZ_ALL) THEN
+              MSG = 'DVODE_F90-- NZ > NZ_ALL in DVJACS28.'
+              CALL XERRDV(MSG,1670,2,0,0,0,0,ZERO,ZERO)
+            END IF
+!           Define column pointers for MA28AD.
+            CALL SET_ICN(N,IAN,ICN)
+            CALL CHECK_DIAG(N,IAN,JAN,ICN)
+            PMAT(1:NZ) = CON*PMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==ICN(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 80
+          ELSE
+!           MA28 = 3...
+            NZ = IAN(N+1) - 1
+            CALL JAC(N,TN,Y,IAN,JAN,NZ,PMAT)
+            NZ = IAN(N+1) - 1
+            IF (NZ>NZ_ALL) THEN
+              MSG = 'DVODE_F90-- NZ > NZ_ALL in DVJACS28.'
+              CALL XERRDV(MSG,1680,2,0,0,0,0,ZERO,ZERO)
+            END IF
+!           Define column pointers for MA28AD.
+            CALL SET_ICN(N,IAN,JVECT)
+            CALL CHECK_DIAG(N,IAN,JAN,JVECT)
+            IF (INEWJ/=1) JMAT(1:NZ) = PMAT(1:NZ)
+            PMAT(1:NZ) = CON*PMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==JVECT(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 90
+          END IF
+        END IF
+
+!       Finite Difference Sparse Jacobian
+
+!       If MITER = 7, evaluate J numerically, multiply J by
+!       CON, and add the identity matrix to form P.
+        IF (MITER==7) THEN
+          IF (MA28==4) THEN
+!           Reuse the saved constant Jacobian.
+            NZ = IAN(N+1) - 1
+            PMAT(1:NZ) = CON*JMAT(1:NZ)
+            DO J = 1, N
+              K1 = IAN(J)
+              K2 = IAN(J+1) - 1
+              DO K = K1, K2
+                I = JAN(K)
+                IF (I==J) PMAT(K) = PMAT(K) + ONE
+              END DO
+            END DO
+            GOTO 90
+          ELSE
+            NZ = IAN(N+1) - 1
+            JCUR = 1
+            IF (.NOT.(J_IS_CONSTANT.AND.J_HAS_BEEN_COMPUTED)) THEN
+               IF (USE_JACSP) THEN
+!                 Approximate the Jacobian using Doug Salane's JACSP.
+!                 The JPNTRDS and INDROWDS pointer arrays were defined
+!                 in DVPREPS (and altered in DSM).
+                  IOPTDS(1) = 2
+                  IOPTDS(2) = 0
+                  IOPTDS(3) = 1
+                  IOPTDS(5) = 0
+!                 INFORDS(4) was initialized in DVPREPS (and altered in
+!                 the first call to JACSP).
+                  LWKDS  = 3 * N
+                  LIWKDS = 50 + N
+                  NRFJACDS = NZ
+                  NCFJACDS = 1
+
+!                 Set flag to indicate how the YSCALE vector will be
+!                 set for JACSP.
+                  LIKE_ORIGINAL_VODE = .FALSE.
+!                 Calculate the YSCALEDS vector for JACSPDV.
+                  IF (LIKE_ORIGINAL_VODE) THEN
+                     FAC = DVNORM(N,SAVF,EWT)
+!                    JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                    R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                     R0 = THOU*ABS(H)*REAL(N)*FAC
+                     IF (ABS(R0)<=ZERO) R0 = ONE
+!                    SRUR = WM1
+                     DO J = 1, N
+!                       JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                       R = MAX(ABS(Y(J)),R0/EWT(J))
+                        R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                        YSCALEDS(J) = R
+                     END DO
+                  ELSE
+                     IF (ITOL == 1 .OR. ITOL == 3) THEN
+                        DO J = 1, N
+                           YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                        END DO
+                     ELSE
+                        DO J = 1, N
+                          YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                        END DO
+                     END IF
+                  END IF
+
+                  CALL JACSPDB(F,N,TN,Y,SAVF,PMAT(1),NRFJACDS, &
+                    YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS, &
+                    MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+                  NFE = NFE + IWKDS(7)
+                  NJE = NJE + 1
+
+                  DO NG = 1, MAXGRPDS
+                    JJ1 = IGP(NG)
+                    JJ2 = IGP(NG+1) - 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      K1 = IAN(J)
+                      K2 = IAN(J+1) - 1
+                      DO K = K1, K2
+                        I = JAN(K)
+                        GOTO (17,17,18) MA28
+!                       Define the row pointers for MA28AD.
+17                      JVECT(K) = I
+!                       Define the column pointers for MA28AD.
+                        ICN(K) = J
+                        GOTO 19
+!                       Define the column pointers for MA28AD.
+18                      JVECT(K) = J
+19                      CONTINUE
+                        IF (INEWJ==0) JMAT(K) = PMAT(K)
+                        PMAT(K) = CON*PMAT(K)
+                        IF (I==J) PMAT(K) = PMAT(K) + ONE
+                      END DO
+                    END DO
+                  END DO
+                  NFE = NFE + MAXGRPDS
+               ELSE
+                  FAC = DVNORM(N,SAVF,EWT)
+                  R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                  IF (ABS(R0)<=ZERO) R0 = ONE
+                  SRUR = WM1
+                  DO NG = 1, NGP
+                    JJ1 = IGP(NG)
+                    JJ2 = IGP(NG+1) - 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                      Y(J) = Y(J) + R
+                    END DO
+                    CALL F(N,TN,Y,FTEMP1)
+                    NFE = NFE + 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      Y(J) = YH(J,1)
+                      R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                      FAC = ONE / R
+                      K1 = IAN(J)
+                      K2 = IAN(J+1) - 1
+                      DO K = K1, K2
+                        I = JAN(K)
+                        GOTO (20,20,30) MA28
+!                       Define row pointers for MA28AD.
+20                      JVECT(K) = I
+!                       Define column pointers for MA28AD.
+                        ICN(K) = J
+                        GOTO 40
+!                       Define column pointers for MA28AD.
+30                      JVECT(K) = J
+40                      PMAT(K) = (FTEMP1(I)-SAVF(I)) * FAC
+                        IF (INEWJ==0) JMAT(K) = PMAT(K)
+                        PMAT(K) = CON*PMAT(K)
+                        IF (I==J) PMAT(K) = PMAT(K) + ONE
+                      END DO
+                    END DO
+                  END DO
+                  NFE = NFE + NGP
+                  NJE = NJE + 1
+               END IF
+               IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+            ELSE
+!              Do not recompute the constant Jacobian.
+!              Reuse the saved Jacobian.
+               NZ = IAN(N+1) - 1
+               PMAT(1:NZ) = CON*JMAT(1:NZ)
+               DO J = 1, N
+                 K1 = IAN(J)
+                 K2 = IAN(J+1) - 1
+                 DO K = K1, K2
+                   I = JAN(K)
+                   IF (I==J) PMAT(K) = PMAT(K) + ONE
+                   GOTO (50,50,60) MA28
+!                  Define row pointers for MA28AD.
+50                 JVECT(K) = I
+!                  Define column pointers for MA28AD.
+                   ICN(K) = J
+                   GOTO 70
+!                  Define column pointers for MA28AD.
+60                 JVECT(K) = J
+70                 CONTINUE
+                 END DO
+               END DO
+            END IF
+            GOTO (80,80,90) MA28
+          END IF
+        END IF
+
+!       MA28AD does an LU factorization based on a pivotal strategy
+!       designed to compromise between maintaining sparsity and
+!       controlling loss of accuracy due to roundoff error. Unless
+!       magnitudes of Jacobian elements change so as to invalidate
+!       choice of pivots, MA28AD need only be called at beginning
+!       of the integration.
+
+80      CONTINUE
+        IF (SCALE_MATRIX) THEN
+!          MA19AD computes scaling factors for the iteration matrix.
+           CALL MC19AD(N,NZ,PMAT,JAN,ICN,RSCALEX,CSCALEX,WSCALEX)
+           MC19AD_CALLS = MC19AD_CALLS + 1
+           DO I =1, N
+              RSCALEX(I) = EXP(RSCALEX(I))
+              CSCALEX(I) = EXP(CSCALEX(I))
+           END DO
+           DO K = 1, NZ
+              I = JAN(K)
+              J = ICN(K)
+              PMAT(K) = PMAT(K) * RSCALEX(I) * CSCALEX(J)
+           END DO
+        END IF
+        OK_TO_CALL_MA28 = .TRUE.
+        CALL MA28AD(N,NZ,PMAT,LICN_ALL,JAN,LIRN_ALL,ICN,U_PIVOT, &
+          IKEEP28,IW28,FTEMP1,IER)
+        OK_TO_CALL_MA28 = .FALSE.
+        MA28AD_CALLS = MA28AD_CALLS + 1
+        MA28SAVE = MA28
+        MB28SAVE = MB28
+        MB28 = 0
+        NLU = NLU + 1
+        MAX_MINIRN = MAX(MAX_MINIRN,MINIRN)
+        MAX_MINICN = MAX(MAX_MINICN,MINICN)
+!       IER = -1: Numerically singular Jacobian
+!       IER = -2: Structurally singular Jacobian
+        IF (IER==-1 .OR. IER==-2) IERPJ = 1
+        IF (IER==-3) THEN
+!         LIRN_ALL is not large enough.
+          IF (LP /= 0) THEN
+             MSG = 'LIRN_ALL (=I1) is not large enough.'
+             CALL XERRDV(MSG,1690,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Allocating more space for another try.'
+             CALL XERRDV(MSG,1690,1,1,LIRN_ALL,0,0,ZERO,ZERO)
+          END IF
+!         Allocate more space for JAN and JVECT and try again.
+          LIRN_ALL = LIRN_ALL + MAX(MAX(1000,ELBOW_ROOM*NZ_SWAG),10*N)
+          LIRN_ALL = MAX(LIRN_ALL,(11*MINIRN)/10)
+          IF (LIRN_ALL>MAX_ARRAY_SIZE) THEN
+            MSG = 'Maximum array size exceeded. Stopping.'
+            CALL XERRDV(MSG,1700,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DEALLOCATE (JAN,STAT=JER)
+          CALL CHECK_STAT(JER,820)
+          ALLOCATE (JAN(LIRN_ALL),STAT=JER)
+          CALL CHECK_STAT(JER,830)
+          IF (MITER==7) THEN
+            JAN(1:NZ) = JVECT(1:NZ)
+          END IF
+          DEALLOCATE (JVECT,STAT=JER)
+          CALL CHECK_STAT(JER,840)
+          ALLOCATE (JVECT(LIRN_ALL),STAT=JER)
+          CALL CHECK_STAT(JER,850)
+          IF (MITER==7) THEN
+            JVECT(1:NZ) = JAN(1:NZ)
+          END IF
+          MA28 = MA28SAVE
+          MB28 = MB28SAVE
+          NLU = NLU - 1
+!         Since PMAT has changed, it must be restored:
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+          GOTO 10
+        END IF
+        IF (IER==-4 .OR. IER==-5 .OR. IER==-6) THEN
+!         LICN_ALL is not large enough.
+          IF (LP /= 0) THEN
+             MSG = 'LICN_ALL (=I1) is not large enough.'
+             CALL XERRDV(MSG,1710,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Allocating more space for another try.'
+             CALL XERRDV(MSG,1710,1,1,LICN_ALL,0,0,ZERO,ZERO)
+          END IF
+!         Allocate more space for JAN and JVECT and try again.
+          LICN_ALL = LICN_ALL + MAX(MAX(1000,ELBOW_ROOM*NZ_SWAG),10*N)
+          LICN_ALL = MAX(LICN_ALL,(11*MINICN)/10)
+          IF (LICN_ALL>MAX_ARRAY_SIZE) THEN
+            MSG = 'Maximum array size exceeded. Stopping.'
+            CALL XERRDV(MSG,1720,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DEALLOCATE (PMAT,ICN,STAT=JER)
+          CALL CHECK_STAT(JER,860)
+          ALLOCATE (PMAT(LICN_ALL),ICN(LICN_ALL),STAT=JER)
+          PMAT(1:LICN_ALL) = ZERO
+          CALL CHECK_STAT(JER,870)
+          IF (MITER==7) THEN
+            JAN(1:NZ) = JVECT(1:NZ)
+          END IF
+          MA28 = MA28SAVE
+          MB28 = MB28SAVE
+          NLU = NLU - 1
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+          GOTO 10
+        END IF
+        IF (MITER/=7) RETURN
+        JAN(1:NZ) = JVECT(1:NZ)
+        RETURN
+
+!       MA28BD uses the pivot sequence generated by an earlier call
+!       to MA28AD to factor a new matrix of the same structure.
+
+90      CONTINUE
+
+        IF (SCALE_MATRIX) THEN
+           DO K =1, NZ
+              I = JAN(K)
+              J = JVECT(K)
+              PMAT(K) = PMAT(K) * RSCALEX(I) * CSCALEX(J)
+           END DO
+        END IF
+        CALL MA28BD(N,NZ,PMAT,LICN_ALL,JAN,JVECT,ICN,IKEEP28,IW28, &
+          FTEMP1,IER)
+        MA28BD_CALLS = MA28BD_CALLS + 1
+        MB28 = 1
+        NLU = NLU + 1
+!       IER = -2 : The matrix is numerically singular. The MA28AD
+!                  pivot sequence leads to a zero pivot, that is,
+!                  to one for which the ratio of it to the smallest
+!                  element in the row is less than EPS.
+!       IER = -13: The matrix is structurally singular.
+
+        IF (REDO_PIVOT_SEQUENCE) THEN
+!          Force MA28AD to calculate a new pivot sequence.
+           IF (IER/=-13 .AND. IER/=-2 .AND. IER<=0) RETURN
+           IF (IER==-2) MA28 = 1
+           IF (IER==-13) MA28 = 1
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        ELSE
+           IF (IER==-2) IERPJ = 1
+           IF (IER/=-13 .AND. IER<=0) RETURN
+           IF (IER==-13) MA28 = 1
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        END IF
+        IF (IER>0) MA28 = 2
+        IF (IER==-13 .AND. MITER==7 .AND. MOSS==2) THEN
+!          Recompute the sparsity structure.
+           CALL DVRENEW(N,Y,SAVF,EWT,F)
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        END IF
+        GOTO 10
+
+      END SUBROUTINE DVJACS28
+! End of Jacobian related routines that use MA28
+!_______________________________________________________________________
+
+      SUBROUTINE SET_ICN(N,IA,ICN)
+! ..
+! Define the column locations of nonzero elements for a sparse
+! matrix.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*)
+        INTEGER, INTENT (INOUT) :: ICN(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, KMAX, KMIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_ICN
+! ..
+        KMIN = 1
+        DO J = 1, N
+          KMAX = IA(J+1) - 1
+          ICN(KMIN:KMAX) = J
+          KMIN = KMAX + 1
+        END DO
+
+      END SUBROUTINE SET_ICN
+!_______________________________________________________________________
+
+      SUBROUTINE CHECK_DIAG(N,IA,JA,ICN)
+! ..
+! Check that the diagonal is included in the sparse matrix
+! description arrays.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*), ICN(*), JA(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, K, KMAX, KMIN
+        CHARACTER (80) :: MSG
+! ..
+! .. FIRST EXECUTABLE STATEMENT CHECK_DIAG
+! ..
+        KMIN = 1
+        DO J = 1, N
+          KMAX = IA(J+1) - 1
+          DO K = KMIN, KMAX
+            IF (JA(K)==ICN(K)) GOTO 10
+          END DO
+          MSG = 'In CHECK_DIAG, the diagonal is not present.'
+          CALL XERRDV(MSG,1730,2,0,0,0,0,ZERO,ZERO)
+10        CONTINUE
+          KMIN = KMAX + 1
+        END DO
+
+      END SUBROUTINE CHECK_DIAG
+!_______________________________________________________________________
+
+      SUBROUTINE DVCHECK(JOB,G,NEQ,Y,YH,NYH,G0,G1,GX,IRT)
+! ..
+! Check for the presence of a root in the vicinity of the current T,
+! in a manner depending on the input flag JOB, and call DVROOTS to
+! locate the root as precisely as possible.
+! ..
+! This subroutine is essentially DRCHEK from LSODAR.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IRT
+        INTEGER, INTENT (IN) :: JOB, NEQ, NYH
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: G0(*), G1(*), GX(*), Y(*), YH(NYH,*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL G
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: HMING, T1, TEMP1, TEMP2, X
+        INTEGER :: I, IFLAG, JFLAG
+        LOGICAL :: ZROOT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, SIGN
+! ..
+! In addition to variables described previously, DVCHECK
+! uses the following for communication:
+! JOB    = integer flag indicating type of call:
+!          JOB = 1 means the problem is being initialized, and DVCHECK
+!                  is to look for a root at or very near the initial T.
+!          JOB = 2 means a continuation call to the solver was just
+!                  made, and DVCHECK is to check for a root in the
+!                  relevant part of the step last taken.
+!          JOB = 3 means a successful step was just taken, and DVCHECK
+!                  is to look for a root in the interval of the step.
+! G0     = array of length NG, containing the value of g at T = T0ST.
+!          G0 is input for JOB >= 2, and output in all cases.
+! G1,GX  = arrays of length NG for work space.
+! IRT    = completion flag:
+!          IRT = 0  means no root was found.
+!          IRT = -1 means JOB = 1 and a root was found too near to T.
+!          IRT = 1  means a legitimate root was found (JOB = 2 or 3).
+!                   On return, T0ST is the root location, and Y is the
+!                   corresponding solution vector.
+! T0ST   = value of T at one endpoint of interval of interest. Only
+!          roots beyond T0ST in the direction of integration are sought.
+!          T0ST is input if JOB >= 2, and output in all cases.
+!          T0ST is updated by DVCHECK, whether a root is found or not.
+! TLAST  = last value of T returned by the solver (input only).
+! TOUTC  = copy of TOUT(input only).
+! IRFND  = input flag showing whether the last step taken had a root.
+!          IRFND = 1 if it did, = 0 if not.
+! ITASKC = copy of ITASK (input only).
+! NGC    = copy of NG (input only).
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVCHECK
+! ..
+        IRT = 0
+        JROOT(1:NGC) = 0
+        HMING = (ABS(TN)+ABS(H))*UROUND*HUN
+
+        GOTO (10,30,80) JOB
+
+!       Evaluate g at initial T, and check for zero values.
+10      CONTINUE
+        T0ST = TN
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 20
+!       g has a zero at T. Look at g at T + (small increment).
+!       TEMP1 = SIGN(HMING, H)
+!       T0ST = T0ST + TEMP1
+!       TEMP2 = TEMP1 / H
+        TEMP2 = MAX(HMING/ABS(H),TENTH)
+        TEMP1 = TEMP2*H
+        T0ST = T0ST + TEMP1
+        Y(1:N) = Y(1:N) + TEMP2*YH(1:N,2)
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 20
+!       g has a zero at T and also close to T. Take error return.
+        IRT = -1
+        RETURN
+
+20      CONTINUE
+        RETURN
+
+30      CONTINUE
+        IF (IRFND==0) GOTO 70
+!       If a root was found on the previous step, evaluate G0 = g(T0ST).
+        CALL DVINDY_CORE(T0ST,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 70
+!       g has a zero at T0ST. Look at g at T + (small increment).
+        TEMP1 = SIGN(HMING,H)
+        T0ST = T0ST + TEMP1
+        IF ((T0ST-TN)*H<ZERO) GOTO 40
+        TEMP2 = TEMP1/H
+        Y(1:N) = Y(1:N) + TEMP2*YH(1:N,2)
+        GOTO 50
+40      CALL DVINDY_CORE(T0ST,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+50      CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO 60 I = 1, NGC
+          IF (ABS(G0(I))>ZERO) GOTO 60
+          JROOT(I) = 1
+          ZROOT = .TRUE.
+60      END DO
+        IF (.NOT.ZROOT) GOTO 70
+!       g has a zero at T0ST and also close to T0ST. Return root.
+        IRT = 1
+        RETURN
+!       G0 has no zero components. Proceed to check relevant interval.
+70      IF (ABS(TN-TLAST)<=ZERO) GOTO 130
+
+80      CONTINUE
+!       Set T1 to TN or TOUTC, whichever comes first, and get g at T1.
+        IF (ITASKC==2 .OR. ITASKC==3 .OR. ITASKC==5) GOTO 90
+        IF ((TOUTC-TN)*H>=ZERO) GOTO 90
+        T1 = TOUTC
+        IF ((T1-T0ST)*H<=ZERO) GOTO 130
+        CALL DVINDY_CORE(T1,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        GOTO 100
+90      T1 = TN
+        DO I = 1, N
+          Y(I) = YH(I,1)
+        END DO
+100     CALL G(NEQ,T1,Y,NGC,G1)
+        NGE = NGE + 1
+!       Call DVROOTS to search for root in interval from T0ST to T1.
+        JFLAG = 0
+110     CONTINUE
+        CALL DVROOTS(NGC,HMING,JFLAG,T0ST,T1,G0,G1,GX,X)
+        IF (JFLAG>1) GOTO 120
+        CALL DVINDY_CORE(X,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        CALL G(NEQ,X,Y,NGC,GX)
+        NGE = NGE + 1
+        GOTO 110
+120     T0ST = X
+        CALL DCOPY_F90(NGC,GX,1,G0,1)
+        IF (JFLAG==4) GOTO 130
+!       Found a root. Interpolate to X and return.
+        CALL DVINDY_CORE(X,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        IRT = 1
+        RETURN
+130     CONTINUE
+        RETURN
+
+      END SUBROUTINE DVCHECK
+!_______________________________________________________________________
+
+      SUBROUTINE DVROOTS(NG,HMIN,JFLAG,X0,X1,G0,G1,GX,X)
+! ..
+! Perform root finding for DVODE_F90.
+! ..
+! This is essentially subroutine DROOTS from LSODAR.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: HMIN
+        REAL (WP), INTENT (INOUT) :: X, X0, X1
+        INTEGER, INTENT (INOUT) :: JFLAG
+        INTEGER, INTENT (IN) :: NG
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: G0(NG), G1(NG), GX(NG)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: T2, TMAX
+        INTEGER :: I, IMXOLD, NXLAST
+        LOGICAL :: SGNCHG, XROOT, ZROOT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, SIGN
+! ..
+! This subroutine finds the leftmost root of a set of arbitrary
+! functions gi(x) (i = 1,...,NG) in an interval (X0,X1). Only roots
+! of odd multiplicity (i.e. changes of sign of the gi) are found.
+! Here the sign of X1 - X0 is arbitrary, but is constant for a given
+! problem, and 'leftmost' means nearest to X0.The values of the
+! vector-valued function g(x) = (gi, i=1...NG) are communicated
+! through the call sequence of DVROOTS. The method used is the
+! Illinois algorithm.
+
+! Reference:
+! Kathie L. Hiebert and Lawrence F. Shampine, Implicitly Defined
+! Output Points for Solutions of ODEs, Sandia Report SAND/80-0180,
+! February 1980.
+
+! Description of parameters.
+
+! NG     = number of functions gi, or the number of components of
+!          the vector valued function g(x). Input only.
+
+! HMIN   = resolution parameter in X. Input only. When a root is
+!          found, it is located only to within an error of HMIN in X.
+!          Typically, HMIN should be set to something on the order of
+!               100 * UROUND * MAX(ABS(X0),ABS(X1)),
+!          where UROUND is the unit roundoff of the machine.
+
+! JFLAG  = integer flag for input and output communication.
+
+!          On input, set JFLAG = 0 on the first call for the problem,
+!          and leave it unchanged until the problem is completed.
+!          (The problem is completed when JFLAG >= 2 on return.)
+
+!          On output, JFLAG has the following values and meanings:
+!          JFLAG = 1 means DVROOTS needs a value of g(x). Set GX = g(X)
+!                    and call DVROOTS again.
+!          JFLAG = 2 means a root has been found. The root is
+!                    at X, and GX contains g(X). (Actually, X is the
+!                    rightmost approximation to the root on an interval
+!                    (X0,X1) of size HMIN or less.)
+!          JFLAG = 3 means X = X1 is a root, with one or more of the gi
+!                    being zero at X1 and no sign changes in (X0,X1).
+!                    GX contains g(X) on output.
+!          JFLAG = 4 means no roots (of odd multiplicity) were
+!                    found in (X0,X1) (no sign changes).
+
+! X0,X1  = endpoints of the interval where roots are sought.
+!          X1 and X0 are input when JFLAG = 0 (first call), and
+!          must be left unchanged between calls until the problem is
+!          completed. X0 and X1 must be distinct, but X1 - X0 may be
+!          of either sign. However, the notion of 'left' and 'right'
+!          will be used to mean nearer to X0 or X1, respectively.
+!          When JFLAG >= 2 on return, X0 and X1 are output, and
+!          are the endpoints of the relevant interval.
+
+! G0,G1  = arrays of length NG containing the vectors g(X0) and g(X1),
+!          respectively. When JFLAG = 0, G0 and G1 are input and
+!          none of the G0(i) should be zero.
+!          When JFLAG >= 2 on return, G0 and G1 are output.
+
+! GX     = array of length NG containing g(X). GX is input
+!          when JFLAG = 1, and output when JFLAG >= 2.
+
+! X      = independent variable value. Output only.
+!          When JFLAG = 1 on output, X is the point at which g(x)
+!          is to be evaluated and loaded into GX.
+!          When JFLAG = 2 or 3, X is the root.
+!          When JFLAG = 4, X is the right endpoint of the interval, X1.
+
+! JROOT  = integer array of length NG. Output only.
+!          When JFLAG = 2 or 3, JROOT indicates which components
+!          of g(x) have a root at X. JROOT(i) is 1 if the i-th
+!          component has a root, and JROOT(i) = 0 otherwise.
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVROOTS
+! ..
+        IF (JFLAG==1) GOTO 90
+!       JFLAG /= 1. Check for change in sign of g or zero at X1.
+        IMAX = 0
+        TMAX = ZERO
+        ZROOT = .FALSE.
+        DO 20 I = 1, NG
+          IF (ABS(G1(I))>ZERO) GOTO 10
+          ZROOT = .TRUE.
+          GOTO 20
+!         At this point, G0(i) has been checked and cannot be zero.
+10        IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,G1(I)))<=ZERO) GOTO 20
+          T2 = ABS(G1(I)/(G1(I)-G0(I)))
+          IF (T2<=TMAX) GOTO 20
+          TMAX = T2
+          IMAX = I
+20      END DO
+        IF (IMAX>0) GOTO 30
+        SGNCHG = .FALSE.
+        GOTO 40
+30      SGNCHG = .TRUE.
+40      IF (.NOT.SGNCHG) GOTO 200
+!       There is a sign change. Find the first root in the interval.
+        XROOT = .FALSE.
+        NXLAST = 0
+        LAST = 1
+
+!       Repeat until the first root in the interval is found. Loop point.
+50      CONTINUE
+        IF (XROOT) GOTO 170
+        IF (NXLAST==LAST) GOTO 60
+        ALPHA = ONE
+        GOTO 80
+60      IF (LAST==0) GOTO 70
+        ALPHA = HALF*ALPHA
+        GOTO 80
+70      ALPHA = TWO*ALPHA
+80      X2 = X1 - (X1-X0)*G1(IMAX)/(G1(IMAX)-ALPHA*G0(IMAX))
+!       IF ((ABS(X2 - X0) < HMIN) .AND. (ABS(X1 - X0) > TEN * &
+!       HMIN)) X2 = X0 + PT1 * (X1 - X0)
+
+!       If X2 is too close to X0 or X1, adjust it inward,
+!       by a fractional distance that is between 0.1 and 0.5.
+        IF (ABS(X2-X0)<HALF*HMIN) THEN
+          FRACINT = ABS(X1-X0)/HMIN
+          FRACSUB = TENTH
+          IF (FRACINT<=FIVE) FRACSUB = HALF/FRACINT
+          X2 = X0 + FRACSUB*(X1-X0)
+        END IF
+        IF (ABS(X1-X2)<HALF*HMIN) THEN
+          FRACINT = ABS(X1-X0)/HMIN
+          FRACSUB = TENTH
+          IF (FRACINT<=FIVE) FRACSUB = HALF/FRACINT
+          X2 = X1 - FRACSUB*(X1-X0)
+        END IF
+
+        JFLAG = 1
+        X = X2
+!       Return to the calling routine to get a value of GX = g(X).
+        RETURN
+!       Check to see in which interval g changes sign.
+90      IMXOLD = IMAX
+        IMAX = 0
+        TMAX = ZERO
+        ZROOT = .FALSE.
+        DO 110 I = 1, NG
+          IF (ABS(GX(I))>ZERO) GOTO 100
+          ZROOT = .TRUE.
+          GOTO 110
+!         Neither G0(i) nor GX(i) can be zero at this point.
+100       IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,GX(I)))<=ZERO) GOTO 110
+          T2 = ABS(GX(I)/(GX(I)-G0(I)))
+          IF (T2<=TMAX) GOTO 110
+          TMAX = T2
+          IMAX = I
+110     END DO
+        IF (IMAX>0) GOTO 120
+        SGNCHG = .FALSE.
+        IMAX = IMXOLD
+        GOTO 130
+120     SGNCHG = .TRUE.
+130     NXLAST = LAST
+        IF (.NOT.SGNCHG) GOTO 140
+!       Sign change between X0 and X2, so replace X1 with X2.
+        X1 = X2
+        CALL DCOPY_F90(NG,GX,1,G1,1)
+        LAST = 1
+        XROOT = .FALSE.
+        GOTO 160
+140     IF (.NOT.ZROOT) GOTO 150
+!       Zero value at X2 and no sign change in (X0,X2), so X2 is a root.
+        X1 = X2
+        CALL DCOPY_F90(NG,GX,1,G1,1)
+        XROOT = .TRUE.
+        GOTO 160
+!       No sign change between X0 and X2. Replace X0 with X2.
+150     CONTINUE
+        CALL DCOPY_F90(NG,GX,1,G0,1)
+        X0 = X2
+        LAST = 0
+        XROOT = .FALSE.
+160     IF (ABS(X1-X0)<=HMIN) XROOT = .TRUE.
+        GOTO 50
+
+!       Return with X1 as the root. Set JROOT. Set X = X1 and GX = G1.
+170     JFLAG = 2
+        X = X1
+        CALL DCOPY_F90(NG,G1,1,GX,1)
+        DO 190 I = 1, NG
+          JROOT(I) = 0
+          IF (ABS(G1(I))>ZERO) GOTO 180
+          JROOT(I) = 1
+          GOTO 190
+180       IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,G1(I)))>ZERO) JROOT(I) = 1
+190     END DO
+        RETURN
+
+!       No sign change in the interval. Check for zero at right endpoint.
+200     IF (.NOT.ZROOT) GOTO 210
+
+!       Zero value at X1 and no sign change in (X0,X1). Return JFLAG = 3.
+        X = X1
+        CALL DCOPY_F90(NG,G1,1,GX,1)
+        DO I = 1, NG
+          JROOT(I) = 0
+          IF (ABS(G1(I))<=ZERO) JROOT(I) = 1
+        END DO
+        JFLAG = 3
+        RETURN
+
+!       No sign changes in this interval. Set X = X1, return JFLAG = 4.
+210     CALL DCOPY_F90(NG,G1,1,GX,1)
+        X = X1
+        JFLAG = 4
+        RETURN
+
+      END SUBROUTINE DVROOTS
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDP(Y,IYDIM,NEQN,NQ)
+! ..
+! Retract the Nordsieck array (undo prediction).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IYDIM, NEQN, NQ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: Y(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, J1, J2
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDP
+! ..
+        DO J1 = 1, NQ
+          DO J2 = J1, NQ
+            J = (NQ+J1) - J2
+            DO I = 1, NEQN
+! Original:
+!             Y(I,J) = Y(I,J) + Y(I,J+1)
+              Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM) + Y(I+J*IYDIM)
+            END DO
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDP
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDN(Y,IYDIM,NEQN,NQ)
+! ..
+! Apply the Nordsieck array (predict).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IYDIM, NEQN, NQ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: Y(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, J1, J2
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDN
+! ..
+        DO J1 = 1, NQ
+          DO J2 = J1, NQ
+            J = (NQ+J1) - J2
+            DO I = 1, NEQN
+! Original:
+!             Y(I,J) = Y(I,J) - Y(I,J+1)
+              Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM) - Y(I+J*IYDIM)
+            END DO
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDN
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDS(Y,IYDIM,NEQN,L,RH)
+! ..
+! Scale the Nordsieck array.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: RH
+        INTEGER :: IYDIM, L, NEQN
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: Y(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: R1
+        INTEGER :: I, J
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDS
+! ..
+        R1 = ONE
+        DO J = 2, L
+          R1 = R1*RH
+          DO I = 1, NEQN
+! Original:
+!           Y(I,J) = Y(I,J)*R1
+            Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM)*R1
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDS
+!_______________________________________________________________________
+
+      SUBROUTINE RELEASE_ARRAYS
+! ..
+! Deallocate any allocated arrays and determine how much storage was
+! used (not called by DVODE_F90).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Local Scalars ..
+        INTEGER :: IER, II, IR
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, SIZE
+! ..
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!     INTEGER INFO
+!     INTEGER ISIZE
+!     COMMON /MA48SIZE/ ISIZE
+!_______________________________________________________________________
+! ..
+! .. FIRST EXECUTABLE STATEMENT RELEASE_ARRAYS
+! ..
+        IR = 0
+        IF (ALLOCATED(ACOR)) THEN
+          IR = IR + SIZE(ACOR)
+          DEALLOCATE (ACOR,STAT=IER)
+          CALL CHECK_STAT(IER,880)
+        END IF
+        IF (ALLOCATED(CSCALEX)) THEN
+          IR = IR + SIZE(CSCALEX) + SIZE(RSCALEX) + SIZE(WSCALEX)
+          DEALLOCATE (CSCALEX,RSCALEX,WSCALEX,STAT=IER)
+          CALL CHECK_STAT(IER,890)
+        END IF
+        IF (ALLOCATED(DTEMP)) THEN
+          IR = IR + SIZE(DTEMP)
+          DEALLOCATE (DTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,900)
+        END IF
+        IF (ALLOCATED(EWT)) THEN
+          IR = IR + SIZE(EWT)
+          DEALLOCATE (EWT,STAT=IER)
+          CALL CHECK_STAT(IER,910)
+        END IF
+        IF (ALLOCATED(FACDS)) THEN
+          IR = IR + SIZE(FACDS)
+          DEALLOCATE (FACDS,STAT=IER)
+          CALL CHECK_STAT(IER,920)
+        END IF
+        IF (ALLOCATED(FPTEMP)) THEN
+          IR = IR + SIZE(FPTEMP)
+          DEALLOCATE (FPTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,930)
+        END IF
+        IF (ALLOCATED(FTEMP)) THEN
+          IR = IR + SIZE(FTEMP)
+          DEALLOCATE (FTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,940)
+        END IF
+        IF (ALLOCATED(FTEMP1)) THEN
+          IR = IR + SIZE(FTEMP1)
+          DEALLOCATE (FTEMP1,STAT=IER)
+          CALL CHECK_STAT(IER,950)
+        END IF
+        IF (ALLOCATED(G0)) THEN
+          IR = IR + SIZE(G0)
+          DEALLOCATE (G0,STAT=IER)
+          CALL CHECK_STAT(IER,960)
+        END IF
+        IF (ALLOCATED(G1)) THEN
+          IR = IR + SIZE(G1)
+          DEALLOCATE (G1,STAT=IER)
+          CALL CHECK_STAT(IER,970)
+        END IF
+        IF (ALLOCATED(GX)) THEN
+          IR = IR + SIZE(GX)
+          DEALLOCATE (GX,STAT=IER)
+          CALL CHECK_STAT(IER,980)
+        END IF
+        IF (ALLOCATED(JMAT)) THEN
+          IR = IR + SIZE(JMAT)
+          DEALLOCATE (JMAT,STAT=IER)
+          CALL CHECK_STAT(IER,990)
+        END IF
+        IF (ALLOCATED(LB)) THEN
+          IR = IR + SIZE(LB)
+          DEALLOCATE (LB,STAT=IER)
+          CALL CHECK_STAT(IER,1000)
+        END IF
+        IF (ALLOCATED(UB)) THEN
+          IR = IR + SIZE(UB)
+          DEALLOCATE (UB,STAT=IER)
+          CALL CHECK_STAT(IER,1000)
+        END IF
+        IF (ALLOCATED(PMAT)) THEN
+          IR = IR + SIZE(PMAT)
+          DEALLOCATE (PMAT,STAT=IER)
+          CALL CHECK_STAT(IER,1010)
+        END IF
+        IF (ALLOCATED(RWORK)) THEN
+          IR = IR + SIZE(RWORK)
+          DEALLOCATE (RWORK,STAT=IER)
+          CALL CHECK_STAT(IER,1020)
+        END IF
+        IF (ALLOCATED(SAVF)) THEN
+          IR = IR + SIZE(SAVF)
+          DEALLOCATE (SAVF,STAT=IER)
+          CALL CHECK_STAT(IER,1030)
+        END IF
+        IF (ALLOCATED(YMAX)) THEN
+          IR = IR + SIZE(YMAX)
+          DEALLOCATE (YMAX,STAT=IER)
+          CALL CHECK_STAT(IER,1040)
+        END IF
+        IF (ALLOCATED(WM)) THEN
+          IR = IR + SIZE(WM)
+          DEALLOCATE (WM,STAT=IER)
+          CALL CHECK_STAT(IER,1050)
+        END IF
+        IF (ALLOCATED(YHNQP2)) THEN
+          IR = IR + SIZE(YHNQP2)
+          DEALLOCATE (YHNQP2,STAT=IER)
+          CALL CHECK_STAT(IER,1060)
+        END IF
+        IF (ALLOCATED(YHTEMP)) THEN
+          IR = IR + SIZE(YHTEMP)
+          DEALLOCATE (YHTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1070)
+        END IF
+        IF (ALLOCATED(YMAX)) THEN
+          IR = IR + SIZE(YMAX)
+          DEALLOCATE (YMAX,STAT=IER)
+          CALL CHECK_STAT(IER,1080)
+        END IF
+        IF (ALLOCATED(YNNEG)) THEN
+          IR = IR + SIZE(YNNEG)
+          DEALLOCATE (YNNEG,STAT=IER)
+          CALL CHECK_STAT(IER,1090)
+        END IF
+        IF (ALLOCATED(YSCALEDS)) THEN
+          IR = IR + SIZE(YSCALEDS)
+          DEALLOCATE (YSCALEDS,STAT=IER)
+          CALL CHECK_STAT(IER,1100)
+        END IF
+        IF (ALLOCATED(YTEMP)) THEN
+          IR = IR + SIZE(YTEMP)
+          DEALLOCATE (YTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1110)
+        END IF
+        IF (ALLOCATED(WKDS)) THEN
+          IR = IR + SIZE(WKDS)
+          DEALLOCATE (WKDS,STAT=IER)
+          CALL CHECK_STAT(IER,1120)
+        END IF
+        II = 0
+        IF (ALLOCATED(BIGP)) THEN
+          II = II + SIZE(BIGP)
+          DEALLOCATE (BIGP,STAT=IER)
+          CALL CHECK_STAT(IER,1130)
+        END IF
+        IF (ALLOCATED(BJGP)) THEN
+          II = II + SIZE(BJGP)
+          DEALLOCATE (BJGP,STAT=IER)
+          CALL CHECK_STAT(IER,1140)
+        END IF
+        IF (ALLOCATED(IA)) THEN
+          II = II + SIZE(IA)
+          DEALLOCATE (IA,STAT=IER)
+          CALL CHECK_STAT(IER,1150)
+        END IF
+        IF (ALLOCATED(IAB)) THEN
+          II = II + SIZE(IAB)
+          DEALLOCATE (IAB,STAT=IER)
+          CALL CHECK_STAT(IER,1160)
+        END IF
+        IF (ALLOCATED(IAN)) THEN
+          II = II + SIZE(IAN)
+          DEALLOCATE (IAN,STAT=IER)
+          CALL CHECK_STAT(IER,1170)
+        END IF
+        IF (ALLOCATED(ICN)) THEN
+          II = II + SIZE(ICN)
+          DEALLOCATE (ICN,STAT=IER)
+          CALL CHECK_STAT(IER,1180)
+        END IF
+        IF (ALLOCATED(IDX)) THEN
+          II = II + SIZE(IDX)
+          DEALLOCATE (IDX,STAT=IER)
+          CALL CHECK_STAT(IER,1190)
+        END IF
+        IF (ALLOCATED(IGP)) THEN
+          II = II + SIZE(IGP)
+          DEALLOCATE (IGP,STAT=IER)
+          CALL CHECK_STAT(IER,1200)
+        END IF
+        IF (ALLOCATED(IKEEP28)) THEN
+          II = II + SIZE(IKEEP28,1)*SIZE(IKEEP28,2)
+          DEALLOCATE (IKEEP28,STAT=IER)
+          CALL CHECK_STAT(IER,1210)
+        END IF
+        IF (ALLOCATED(INDCOLDS)) THEN
+          II = II + SIZE(INDCOLDS)
+          DEALLOCATE (INDCOLDS,STAT=IER)
+          CALL CHECK_STAT(IER,1220)
+        END IF
+        IF (ALLOCATED(INDROWDS)) THEN
+          II = II + SIZE(INDROWDS)
+          DEALLOCATE (INDROWDS,STAT=IER)
+          CALL CHECK_STAT(IER,1230)
+        END IF
+        IF (ALLOCATED(IOPTDS)) THEN
+          II = II + SIZE(IOPTDS)
+          DEALLOCATE (IOPTDS,STAT=IER)
+          CALL CHECK_STAT(IER,1240)
+        END IF
+        IF (ALLOCATED(IPNTRDS)) THEN
+          II = II + SIZE(IPNTRDS)
+          DEALLOCATE (IPNTRDS,STAT=IER)
+          CALL CHECK_STAT(IER,1250)
+        END IF
+        IF (ALLOCATED(IWADS)) THEN
+          II = II + SIZE(IWADS)
+          DEALLOCATE (IWADS,STAT=IER)
+          CALL CHECK_STAT(IER,1260)
+        END IF
+        IF (ALLOCATED(IWKDS)) THEN
+          II = II + SIZE(IWKDS)
+          DEALLOCATE (IWKDS,STAT=IER)
+          CALL CHECK_STAT(IER,1270)
+        END IF
+        IF (ALLOCATED(IWORK)) THEN
+          II = II + SIZE(IWORK)
+          DEALLOCATE (IWORK,STAT=IER)
+          CALL CHECK_STAT(IER,1280)
+        END IF
+        IF (ALLOCATED(IW28)) THEN
+          II = II + SIZE(IW28,1)*SIZE(IW28,2)
+          DEALLOCATE (IW28,STAT=IER)
+          CALL CHECK_STAT(IER,1290)
+        END IF
+        IF (ALLOCATED(JA)) THEN
+          II = II + SIZE(JA)
+          DEALLOCATE (JA,STAT=IER)
+          CALL CHECK_STAT(IER,1300)
+        END IF
+        IF (ALLOCATED(JAB)) THEN
+          II = II + SIZE(JAB)
+          DEALLOCATE (JAB,STAT=IER)
+          CALL CHECK_STAT(IER,1310)
+        END IF
+        IF (ALLOCATED(JAN)) THEN
+          II = II + SIZE(JAN)
+          DEALLOCATE (JAN,STAT=IER)
+          CALL CHECK_STAT(IER,1320)
+        END IF
+        IF (ALLOCATED(JATEMP)) THEN
+          II = II + SIZE(JATEMP)
+          DEALLOCATE (JATEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1330)
+        END IF
+        IF (ALLOCATED(JGP)) THEN
+          II = II + SIZE(JGP)
+          DEALLOCATE (JGP,STAT=IER)
+          CALL CHECK_STAT(IER,1340)
+        END IF
+        IF (ALLOCATED(JPNTRDS)) THEN
+          II = II + SIZE(JPNTRDS)
+          DEALLOCATE (JPNTRDS,STAT=IER)
+          CALL CHECK_STAT(IER,1350)
+        END IF
+        IF (ALLOCATED(JROOT)) THEN
+          II = II + SIZE(JROOT)
+          DEALLOCATE (JROOT,STAT=IER)
+          CALL CHECK_STAT(IER,1360)
+        END IF
+        IF (ALLOCATED(JVECT)) THEN
+          II = II + SIZE(JVECT)
+          DEALLOCATE (JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,1370)
+        END IF
+        IF (ALLOCATED(NGRPDS)) THEN
+          II = II + SIZE(NGRPDS)
+          DEALLOCATE (NGRPDS,STAT=IER)
+          CALL CHECK_STAT(IER,1380)
+        END IF
+        IF (ALLOCATED(SUBDS)) THEN
+          II = II + SIZE(SUBDS)
+          DEALLOCATE (SUBDS,STAT=IER)
+          CALL CHECK_STAT(IER,1390)
+        END IF
+        IF (ALLOCATED(SUPDS)) THEN
+          II = II + SIZE(SUPDS)
+          DEALLOCATE (SUPDS,STAT=IER)
+          CALL CHECK_STAT(IER,1400)
+        END IF
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       IF (MA48_WAS_USED) THEN
+!          CALL MA48_FINALIZE(FACTORS,CONTROL,INFO)
+!          IF (INFO /= 0) THEN
+!             MSG = 'The call to MA48_FINALIZE FAILED.'
+!             CALL XERRDV(MSG,1740,1,1,II,0,0,ZERO,ZERO)
+!          END IF
+!          MSG = 'Size of MA48 deallocated arrays (I1) = '
+!          CALL XERRDV(MSG,1750,1,1,ISIZE,0,0,ZERO,ZERO)
+!       END IF
+!_______________________________________________________________________
+
+!       Print the amount of storage used.
+        MSG = 'I1 = Total length of REAL arrays used.'
+        CALL XERRDV(MSG,1760,1,1,IR,0,0,ZERO,ZERO)
+        MSG = 'I1 = Total length of INTEGER arrays used.'
+        CALL XERRDV(MSG,1760,1,1,II,0,0,ZERO,ZERO)
+
+!       In case DVODE_F90 is subsequently called:
+        OPTS_CALLED = .FALSE.
+        RETURN
+
+      END SUBROUTINE RELEASE_ARRAYS
+! End of DVODE_F90 subroutines
+!_______________________________________________________________________
+
+! Beginning of LINPACK and BLAS subroutines
+      SUBROUTINE DGEFA_F90(A,LDA,N,IPVT,INFO)
+! ..
+! Factor a matrix using Gaussian elimination.
+! ..
+!     DGEFA_F90 factors a real(wp) matrix by Gaussian elimination.
+!     DGEFA_F90 is usually called by DGECO, but it can be called
+!     directly with a saving in time if RCOND is not needed.
+!     (Time for DGECO) = (1 + 9/N)*(Time for DGEFA_F90).
+!     On Entry
+!        A       REAL(KIND=WP)(LDA, N)
+!                the matrix to be factored.
+!        LDA     INTEGER
+!                the leading dimension of the array A.
+!        N       INTEGER
+!                the order of the matrix A.
+!     On Return
+!        A       an upper triangular matrix and the multipliers
+!                which were used to obtain it.
+!                The factorization can be written A = L*U where
+!                L is a product of permutation and unit lower
+!                triangular matrices and U is upper triangular.
+!        IPVT    INTEGER(N)
+!                an integer vector of pivot indices.
+!        INFO    INTEGER
+!                = 0  normal value.
+!                = K  if U(K,K) == 0.0. This is not an error
+!                     condition for this subroutine, but it does
+!                     indicate that DGESL_F90 or DGEDI will divide
+!                     by zero if called. Use RCOND in DGECO for a
+!                     reliable indication of singularity.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: INFO
+        INTEGER, INTENT (IN) :: LDA, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: A(LDA,*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: T
+        INTEGER :: J, K, KP1, L, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGEFA_F90
+! ..
+        INFO = 0
+        NM1 = N - 1
+        IF (NM1<1) GOTO 50
+        DO K = 1, NM1
+          KP1 = K + 1
+
+!         Find L = pivot index.
+
+! Original:
+!         L = IDAMAX_F90(N-K+1,A(K,K),1) + K - 1
+          L = IDAMAX_F90(N-K+1,A(K:N,K),1) + K - 1
+          IPVT(K) = L
+
+!         Zero pivot implies this column already triangularized.
+
+!         IF (A(L, K) == ZERO) GOTO 40
+          IF (ABS(A(L,K))<=ZERO) GOTO 30
+
+!         Interchange if necessary.
+
+          IF (L==K) GOTO 10
+          T = A(L,K)
+          A(L,K) = A(K,K)
+          A(K,K) = T
+10        CONTINUE
+
+!         Compute multipliers.
+
+          T = -ONE/A(K,K)
+! Original:          
+!         CALL DSCAL_F90(N-K,T,A(K+1,K),1)         
+          CALL DSCAL_F90(N-K,T,A(K+1:N,K),1)
+
+!         Row elimination with column indexing.
+
+          DO J = KP1, N
+            T = A(L,J)
+            IF (L==K) GOTO 20
+            A(L,J) = A(K,J)
+            A(K,J) = T
+20          CONTINUE
+! Original:            
+!           CALL DAXPY_F90(N-K,T,A(K+1,K),1,A(K+1,J),1)
+            CALL DAXPY_F90(N-K,T,A(K+1:N,K),1,A(K+1:N,J),1)
+          END DO
+          GOTO 40
+30        CONTINUE
+          INFO = K
+40        CONTINUE
+        END DO
+50      CONTINUE
+        IPVT(N) = N
+!       IF (A(N, N) == ZERO) INFO = N
+        IF (ABS(A(N,N))<=ZERO) INFO = N
+        RETURN
+
+      END SUBROUTINE DGEFA_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGESL_F90(A,LDA,N,IPVT,B,JOB)
+! ..
+! Solve the real system A*X=B or TRANS(A)*X=B using the factors
+! computed by DGECO or DGEFA_F90.
+! ..
+!     DGESL_F90 solves the real(wp) system
+!     A * X = B or TRANS(A) * X = B
+!     using the factors computed by DGECO or DGEFA_F90.
+!     On Entry
+!        A       REAL(KIND=WP)(LDA, N)
+!                the output from DGECO or DGEFA_F90.
+!        LDA     INTEGER
+!                the leading dimension of the array A.
+!        N       INTEGER
+!                the order of the matrix A.
+!        IPVT    INTEGER(N)
+!                the pivot vector from DGECO or DGEFA_F90.
+!        B       REAL(KIND=WP)(N)
+!                the right hand side vector.
+!        JOB     INTEGER
+!                = 0         to solve A*X = B,
+!                = nonzero   to solve TRANS(A)*X = B where
+!                            TRANS(A)is the transpose.
+!     On Return
+!        B       the solution vector X.
+!     Error Condition
+!        A division by zero will occur if the input factor contains a
+!        zero on the diagonal. Technically this indicates singularity
+!        but it is often caused by improper arguments or improper
+!        setting of LDA. It will not occur if the subroutines are
+!        called correctly and if DGECO has set RCOND > 0.0 or
+!        DGEFA_F90 has set INFO == 0.
+!     To compute INVERSE(A) * C where C is a matrix
+!     with P columns
+!           CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+!           IF (RCOND is too small) GOTO
+!           DO J = 1, P
+!              CALL DGESL_F90(A,LDA,N,IPVT,C(1,J),0)
+!           END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB, LDA, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: A(LDA,*), B(*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: T
+        INTEGER :: K, KB, L, NM1
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGESL_F90
+! ..
+        NM1 = N - 1
+        IF (JOB/=0) GOTO 30
+
+!       JOB = 0, solve A*X = B.
+!       First solve L*Y = B.
+
+        IF (NM1<1) GOTO 20
+        DO K = 1, NM1
+          L = IPVT(K)
+          T = B(L)
+          IF (L==K) GOTO 10
+          B(L) = B(K)
+          B(K) = T
+10        CONTINUE
+! Original:
+!         CALL DAXPY_F90(N-K,T,A(K+1,K),1,B(K+1),1)
+          CALL DAXPY_F90(N-K,T,A(K+1:N,K),1,B(K+1:N),1)
+        END DO
+20      CONTINUE
+
+!       Now solve U*X = Y.
+
+        DO KB = 1, N
+          K = N + 1 - KB
+          B(K) = B(K)/A(K,K)
+          T = -B(K)
+! Original:
+!         CALL DAXPY_F90(K-1,T,A(1,K),1,B(1),1)
+          CALL DAXPY_F90(K-1,T,A(1:K-1,K),1,B(1:K-1),1)
+        END DO
+        GOTO 60
+30      CONTINUE
+
+!       JOB /= 0, solve TRANS(A)*X = B.
+!       First solve TRANS(U)*Y = B.
+
+        DO K = 1, N
+          T = DDOT_F90(K-1,A(1,K),1,B(1),1)
+          B(K) = (B(K)-T)/A(K,K)
+        END DO
+
+!       Now solve TRANS(L)*X = Y.
+
+        IF (NM1<1) GOTO 50
+        DO KB = 1, NM1
+          K = N - KB
+          B(K) = B(K) + DDOT_F90(N-K,A(K+1,K),1,B(K+1),1)
+          L = IPVT(K)
+          IF (L==K) GOTO 40
+          T = B(L)
+          B(L) = B(K)
+          B(K) = T
+40        CONTINUE
+        END DO
+50      CONTINUE
+60      CONTINUE
+        RETURN
+
+      END SUBROUTINE DGESL_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGBFA_F90(ABD,LDA,N,ML,MU,IPVT,INFO)
+! ..
+! Factor a banded matrix using Gaussian elimination.
+! ..
+!     DGBFA_F90 factors a real(wp) band matrix by elimination.
+!     DGBFA_F90 is usually called by DGBCO, but it can be called
+!     directly with a saving in time if RCOND is not needed.
+!     On Entry
+!        ABD     REAL(KIND=WP)(LDA, N)
+!                contains the matrix in band storage. The columns
+!                of the matrix are stored in the columns of ABD and
+!                the diagonals of the matrix are stored in rows
+!                ML+1 through 2*ML+MU+1 of ABD.
+!                See the comments below for details.
+!        LDA     INTEGER
+!                the leading dimension of the array ABD.
+!                LDA must be >= 2*ML + MU + 1.
+!        N       INTEGER
+!                the order of the original matrix.
+!        ML      INTEGER
+!                number of diagonals below the main diagonal.
+!                0 <= ML < N.
+!        MU      INTEGER
+!                number of diagonals above the main diagonal.
+!                0 <= MU < N.
+!                More efficient if ML <= MU.
+!     On Return
+!        ABD     an upper triangular matrix in band storage and
+!                the multipliers which were used to obtain it.
+!                The factorization can be written A = L*U where
+!                L is a product of permutation and unit lower
+!                triangular matrices and U is upper triangular.
+!        IPVT    INTEGER(N)
+!                an integer vector of pivot indices.
+!        INFO    INTEGER
+!                = 0  normal value.
+!                = K  if U(K,K) == 0.0. This is not an error
+!                     condition for this subroutine, but it does
+!                     indicate that DGBSL_F90 will divide by zero
+!                     if called. Use RCOND in DGBCO for a reliable
+!                     indication of singularity.
+!     Band Storage
+!           If A is a band matrix, the following program segment
+!           will set up the input.
+!                   ML = (band width below the diagonal)
+!                   MU = (band width above the diagonal)
+!                   M = ML + MU + 1
+!                   DO J = 1, N
+!                      I1 = MAX(1, J-MU)
+!                      I2 = MIN(N, J+ML)
+!                      DO 10 I = I1, I2
+!                         K = I - J + M
+!                         ABD(K,J) = A(I,J)
+!                      END DO
+!                   END DO
+!           This uses rows ML+1 through 2*ML+MU+1 of ABD.
+!           In addition, the first ML rows in ABD are used for
+!           elements generated during the triangularization.
+!           The total number of rows needed in ABD is 2*ML+MU+1.
+!           The ML+MU by ML+MU upper left triangle and the
+!           ML by ML lower right triangle are not referenced.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: INFO
+        INTEGER, INTENT (IN) :: LDA, ML, MU, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: ABD(LDA,*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: T
+        INTEGER :: I0, J, J0, J1, JU, JZ, K, KP1, L, LM, M, MM, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGBFA_F90
+! ..
+        M = ML + MU + 1
+        INFO = 0
+
+!       Zero initial fill-in columns.
+
+        J0 = MU + 2
+        J1 = MIN(N,M) - 1
+        IF (J1<J0) GOTO 10
+        DO JZ = J0, J1
+          I0 = M + 1 - JZ
+          ABD(I0:ML,JZ) = ZERO
+        END DO
+10      CONTINUE
+        JZ = J1
+        JU = 0
+
+!       Gaussian elimination with partial pivoting.
+
+        NM1 = N - 1
+        IF (NM1<1) GOTO 80
+        DO K = 1, NM1
+          KP1 = K + 1
+
+!         Zero next fill-in column.
+
+          JZ = JZ + 1
+          IF (JZ>N) GOTO 20
+          IF (ML<1) GOTO 20
+          ABD(1:ML,JZ) = ZERO
+20        CONTINUE
+
+!         Find L = pivot index.
+
+          LM = MIN(ML,N-K)
+! Original:
+!         L = IDAMAX_F90(LM+1,ABD(M,K),1) + M - 1
+          L = IDAMAX_F90(LM+1,ABD(M:M+LM,K),1) + M - 1
+
+          IPVT(K) = L + K - M
+
+!         Zero pivot implies this column already triangularized.
+
+!         IF (ABD(L, K) == ZERO) GOTO 100
+          IF (ABS(ABD(L,K))<=ZERO) GOTO 60
+
+!         Interchange if necessary.
+
+          IF (L==M) GOTO 30
+          T = ABD(L,K)
+          ABD(L,K) = ABD(M,K)
+          ABD(M,K) = T
+30        CONTINUE
+
+!         Compute multipliers.
+
+          T = -ONE/ABD(M,K)
+! Original:
+!         CALL DSCAL_F90(LM,T,ABD(M+1,K),1)
+          CALL DSCAL_F90(LM,T,ABD(M+1:M+LM,K),1)
+
+!         Row elimination with column indexing.
+
+          JU = MIN(MAX(JU,MU+IPVT(K)),N)
+          MM = M
+          IF (JU<KP1) GOTO 50
+          DO J = KP1, JU
+            L = L - 1
+            MM = MM - 1
+            T = ABD(L,J)
+            IF (L==MM) GOTO 40
+            ABD(L,J) = ABD(MM,J)
+            ABD(MM,J) = T
+40          CONTINUE
+! Original:
+!           CALL DAXPY_F90(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+            CALL DAXPY_F90(LM,T,ABD(M+1:M+LM,K),1,ABD(MM+1:M+LM,J),1)
+          END DO
+50        CONTINUE
+          GOTO 70
+60        CONTINUE
+          INFO = K
+70        CONTINUE
+        END DO
+80      CONTINUE
+        IPVT(N) = N
+!       IF (ABD(M, N) == ZERO) INFO = N
+        IF (ABS(ABD(M,N))<=ZERO) INFO = N
+        RETURN
+
+      END SUBROUTINE DGBFA_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGBSL_F90(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+! ..
+! Solve the real band system A*X=B or TRANS(A)*X=B using the factors
+! computed by DGBCO or DGBFA_F90.
+! ..
+!     DGBSL_F90 solves the real(wp) band system
+!     A * X = B or TRANS(A) * X = B
+!     using the factors computed by DGBCO or DGBFA_F90.
+!     On Entry
+!        ABD     REAL(KIND=WP)(LDA, N)
+!                the output from DGBCO or DGBFA_F90.
+!        LDA     INTEGER
+!                the leading dimension of the array ABD.
+!        N       INTEGER
+!                the order of the original matrix.
+!        ML      INTEGER
+!                number of diagonals below the main diagonal.
+!        MU      INTEGER
+!                number of diagonals above the main diagonal.
+!        IPVT    INTEGER(N)
+!                the pivot vector from DGBCO or DGBFA_F90.
+!        B       REAL(KIND=WP)(N)
+!                the right hand side vector.
+!        JOB     INTEGER
+!                = 0         to solve A*X = B,
+!                = nonzero   to solve TRANS(A)*X = B, where
+!                            TRANS(A) is the transpose.
+!     On Return
+!        B       the solution vector X.
+!     Error Condition
+!        A division by zero will occur if the input factor contains a
+!        zero on the diagonal. Technically this indicates singularity
+!        but it is often caused by improper arguments or improper
+!        setting of LDA. It will not occur if the subroutines are
+!        called correctly and if DGBCO has set RCOND > 0.0
+!        or DGBFA_F90 has set INFO == 0 .
+!     To compute INVERSE(A) * C where C is a matrix
+!     with P columns
+!           CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+!           IF (RCOND is too small) GOTO ...
+!           DO J = 1, P
+!              CALL DGBSL_F90(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+!           END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB, LDA, ML, MU, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: ABD(LDA,*), B(*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: T
+        INTEGER :: K, KB, L, LA, LB, LM, M, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGBSL_F90
+! ..
+        M = MU + ML + 1
+        NM1 = N - 1
+        IF (JOB/=0) GOTO 30
+
+!       JOB = 0, solve A*X = B.
+!       First solve L*Y = B.
+
+        IF (ML==0) GOTO 20
+        IF (NM1<1) GOTO 20
+        DO K = 1, NM1
+          LM = MIN(ML,N-K)
+          L = IPVT(K)
+          T = B(L)
+          IF (L==K) GOTO 10
+          B(L) = B(K)
+          B(K) = T
+10        CONTINUE
+! Original:
+!         CALL DAXPY_F90(LM,T,ABD(M+1,K),1,B(K+1),1)
+          CALL DAXPY_F90(LM,T,ABD(M+1:M+LM,K),1,B(K+1:K+LM),1)
+        END DO
+20      CONTINUE
+
+!       Now solve U*X = Y.
+
+        DO KB = 1, N
+          K = N + 1 - KB
+          B(K) = B(K)/ABD(M,K)
+          LM = MIN(K,M) - 1
+          LA = M - LM
+          LB = K - LM
+          T = -B(K)
+! Original:
+!         CALL DAXPY_F90(LM,T,ABD(LA,K),1,B(LB),1)
+          CALL DAXPY_F90(LM,T,ABD(LA:LA+LM-1,K),1,B(LB:LB+LM-1),1)
+        END DO
+        GOTO 60
+30      CONTINUE
+
+!       JOB /= 0, solve TRANS(A)*X = B.
+!       First solve TRANS(U)*Y = B.
+
+        DO K = 1, N
+          LM = MIN(K,M) - 1
+          LA = M - LM
+          LB = K - LM
+! Original:
+!         T = DDOT_F90(LM,ABD(LA,K),1,B(LB),1)
+          T = DDOT_F90(LM,ABD(LA:LA+LM-1,K),1,B(LB:LB+LM-1),1)
+          B(K) = (B(K)-T)/ABD(M,K)
+        END DO
+
+!       Now solve TRANS(L)*X = Y.
+
+        IF (ML==0) GOTO 50
+        IF (NM1<1) GOTO 50
+        DO KB = 1, NM1
+          K = N - KB
+          LM = MIN(ML,N-K)
+! Original:
+!         B(K) = B(K) + DDOT_F90(LM,ABD(M+1,K),1,B(K+1),1)
+          B(K) = B(K) + DDOT_F90(LM,ABD(M+1:M+LM,K),1,B(K+1:K+LM),1)
+          L = IPVT(K)
+          IF (L==K) GOTO 40
+          T = B(L)
+          B(L) = B(K)
+          B(K) = T
+40        CONTINUE
+        END DO
+50      CONTINUE
+60      CONTINUE
+        RETURN
+
+      END SUBROUTINE DGBSL_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DAXPY_F90(N,DA,DX,INCX,DY,INCY)
+! ..
+! Compute a constant times a vector plus a vector.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DA   - real(wp) scalar multiplier
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - real(wp) vector with N elements
+!     INCY -  storage spacing between elements of DY
+!     Output:
+!     DY - real(wp) result (unchanged if N <= 0)
+!     Overwrite real(wp) DY with real(wp) DA*DX + DY.
+!     For I = 0 to N-1, replace  DY(LY+I*INCY) with
+!     DA*DX(LX+I*INCX) + DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX,
+!     and LY is defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: DA
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: DX(*)
+        REAL (WP), INTENT (INOUT) :: DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DAXPY_F90
+! ..
+!       IF (N <= 0 .OR. DA == ZERO) RETURN
+        IF (N<=0 .OR. ABS(DA)<=ZERO) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DY(IY) = DY(IY) + DA*DX(IX)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 4.
+
+20      M = MOD(N,4)
+        IF (M==0) GOTO 30
+        DY(1:M) = DY(1:M) + DA*DX(1:M)
+        IF (N<4) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 4
+          DY(I) = DY(I) + DA*DX(I)
+          DY(I+1) = DY(I+1) + DA*DX(I+1)
+          DY(I+2) = DY(I+2) + DA*DX(I+2)
+          DY(I+3) = DY(I+3) + DA*DX(I+3)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DY(I) = DA*DX(I) + DY(I)
+        END DO
+        RETURN
+
+      END SUBROUTINE DAXPY_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DCOPY_F90(N,DX,INCX,DY,INCY)
+! ..
+! Copy a vector to another vector.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - real(wp) vector with N elements
+!     INCY - storage spacing between elements of DY
+!     Output:
+!     DY - copy of vector DX(unchanged if N <= 0)
+!     Copy real(wp) DX to real(wp) DY.
+!     For I = 0 to N-1, copy DX(LX+I*INCX) to DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX,
+!     and LY is defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: DX(*)
+        REAL (WP), INTENT (INOUT) :: DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DCOPY_F90
+! ..
+        IF (N<=0) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DY(IY) = DX(IX)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 7.
+
+20      M = MOD(N,7)
+        IF (M==0) GOTO 30
+        DO I = 1, M
+          DY(I) = DX(I)
+        END DO
+        IF (N<7) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 7
+          DY(I) = DX(I)
+          DY(I+1) = DX(I+1)
+          DY(I+2) = DX(I+2)
+          DY(I+3) = DX(I+3)
+          DY(I+4) = DX(I+4)
+          DY(I+5) = DX(I+5)
+          DY(I+6) = DX(I+6)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DY(I) = DX(I)
+        END DO
+        RETURN
+
+      END SUBROUTINE DCOPY_F90
+!_______________________________________________________________________
+
+      FUNCTION DDOT_F90(N,DX,INCX,DY,INCY)
+! ..
+! Compute the inner product of two vectors.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - real(wp) vector with N elements
+!     INCY - storage spacing between elements of DY
+!     Output:
+!     DDOT_F90 - real(wp) dot product (zero if N <= 0)
+!     Returns the dot product of real(wp) DX and DY.
+!     DDOT_F90 = sum for I = 0 to N-1 of  DX(LX+I*INCX) * DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is
+!     defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        REAL (WP) :: DDOT_F90
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: DX(*), DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DDOT_F90
+! ..
+        DDOT_F90 = ZERO
+        IF (N<=0) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DDOT_F90 = DDOT_F90 + DX(IX)*DY(IY)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 5.
+
+20      M = MOD(N,5)
+        IF (M==0) GOTO 30
+        DO I = 1, M
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I)
+        END DO
+        IF (N<5) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 5
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I) + DX(I+1)*DY(I+1) + &
+            DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I)
+        END DO
+        RETURN
+
+      END FUNCTION DDOT_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DSCAL_F90(N,DA,DX,INCX)
+! ..
+! Multiply a vector by a constant.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DA   - real(wp) scale factor
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     Output:
+!     DX - real(wp) result (unchanged if N <= 0)
+!     Replace real(wp) DX by real(wp) DA*DX.
+!     For I = 0 to N-1, replace DX(IX+I*INCX) with DA * DX(IX+I*INCX),
+!     where IX = 1 if INCX >= 0, else IX = 1+(1-N)*INCX.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP), INTENT (IN) :: DA
+        INTEGER, INTENT (IN) :: INCX, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (INOUT) :: DX(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, M, MP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DSCAL_F90
+! ..
+        IF (N<=0) RETURN
+        IF (INCX==1) GOTO 10
+
+!       Code for increment not equal to 1.
+
+        IX = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        DO I = 1, N
+          DX(IX) = DA*DX(IX)
+          IX = IX + INCX
+        END DO
+        RETURN
+
+!       Code for increment equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 5.
+
+10      M = MOD(N,5)
+        IF (M==0) GOTO 20
+        DX(1:M) = DA*DX(1:M)
+        IF (N<5) RETURN
+20      MP1 = M + 1
+        DO I = MP1, N, 5
+          DX(I) = DA*DX(I)
+          DX(I+1) = DA*DX(I+1)
+          DX(I+2) = DA*DX(I+2)
+          DX(I+3) = DA*DX(I+3)
+          DX(I+4) = DA*DX(I+4)
+        END DO
+        RETURN
+
+      END SUBROUTINE DSCAL_F90
+!_______________________________________________________________________
+
+      FUNCTION IDAMAX_F90(N,DX,INCX)
+! ..
+! Find the smallest index of that component of a vector
+! having the maximum magnitude.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     Output:
+!     IDAMAX_F90 - smallest index (zero if N <= 0)
+!     Find smallest index of maximum magnitude of real(wp) DX.
+!     IDAMAX_F90 = first I, I = 1 to N, to maximize
+!     ABS(DX(IX+(I-1)*INCX)), where IX = 1 if INCX >= 0,
+!     else IX = 1+(1-N)*INCX.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        INTEGER :: IDAMAX_F90
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, N
+! ..
+! .. Array Arguments ..
+        REAL (WP), INTENT (IN) :: DX(*)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: DMAX, XMAG
+        INTEGER :: I, IX
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT IDAMAX_F90
+! ..
+        IDAMAX_F90 = 0
+        IF (N<=0) RETURN
+        IDAMAX_F90 = 1
+        IF (N==1) RETURN
+
+        IF (INCX==1) GOTO 10
+
+!       Code for increments not equal to 1.
+
+        IX = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        DMAX = ABS(DX(IX))
+        IX = IX + INCX
+        DO I = 2, N
+          XMAG = ABS(DX(IX))
+          IF (XMAG>DMAX) THEN
+            IDAMAX_F90 = I
+            DMAX = XMAG
+          END IF
+          IX = IX + INCX
+        END DO
+        RETURN
+
+!       Code for increments equal to 1.
+
+10      DMAX = ABS(DX(1))
+        DO I = 2, N
+          XMAG = ABS(DX(I))
+          IF (XMAG>DMAX) THEN
+            IDAMAX_F90 = I
+            DMAX = XMAG
+          END IF
+        END DO
+        RETURN
+
+      END FUNCTION IDAMAX_F90
+! End of LINPACK and BLAS subroutines
+!_______________________________________________________________________
+
+! Beginning of MA28 subroutines
+! THIS IS A FORTRAN 90 TRANSLATION OF HSL'S F77 MA28. IT IS INTENDED
+! ONLY FOR USE IN CONJUNCTION WITH THE ODE SOLVER DVODE_F90 AND IS
+! NOT FUNCTIONAL IN A STANDALONE MANNER. PLEASE NOTE THAT MA28 IS NOT
+! PUBLIC DOMAIN SOFTWARE BUT HAS BEEN MADE AVAILABLE TO THE NUMERICAL
+! ANALYSIS COMMUNITY BY HARWELL. FOR OTHER USE PLEASE CONTACT HARWELL
+! AT HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM IF YOU
+! WISH TO SOLVE GENERAL SPARSE LINEAR SYSTEMS. IF YOU FIND A BUG OR
+! ENCOUNTER A PROBLEM WITH THE USE OF MA28 WITH DVODE.F90, PLEASE
+! CONTACT ONE OF THE AUTHORS OF DVODE_F90:
+!           G.D. Byrne (gbyrne@wi.rr.com)
+!           S. Thompson, thompson@radford.edu
+! NUMEROUS CHANGES WERE MADE IN CONNECTION WITH DVODE_F90 USAGE. THESE
+! INCLUDE USING METCALF'S CONVERTER TO TRANSLATE THE ORIGINAL f77 CODE
+! TO F90, MOVING INITIALIZATIONS TO THE DVODE_F90 PRIVATE SECTION,
+! ELIMINATION OF HOLLERITHS IN FORMAT STATEMENTS, ELIMINATION OF
+! BLOCKDATA, CHANGES IN ARITHMETICAL OPERATOR SYNTAX, AND CONVERSION
+! TO UPPER CASE. THIS VERSION OF MA28 IS INTENDED ONLY FOR USE WITH
+! DVODE_F90. PLEASE DO NOT MODIFY IT FOR ANY OTHER PURPOSE. IF YOU
+! HAVE LICENSED ACCESS TO THE HSL LIBRARY, AN ALTERNATE VERSION OF
+! DVODE_F90 BASED ON THE SUCCESSOR TO MA28, MA48, IS AVAILABLE FROM
+! THE AUTHORS. PLEASE NOTE THAT THE ALTERNATE VERSION OF DVODE_F90
+! IS NOT SELF CONTAINED SINCE MA48 IS NOT DISTRIBUTED WITH DVODE_F90.
+!******************************************************************
+!             *****MA28 COPYRIGHT NOTICE*****
+! COPYRIGHT (C) 2001 COUNCIL FOR THE CENTRAL LABORATORY
+!               OF THE RESEARCH COUNCILS
+! ALL RIGHTS RESERVED.
+
+! NONE OF THE COMMENTS IN THIS COPYRIGHT NOTICE BETWEEN THE LINES
+! OF ASTERISKS SHALL BE REMOVED OR ALTERED IN ANY WAY.
+
+! THIS PACKAGE IS INTENDED FOR COMPILATION WITHOUT MODIFICATION,
+! SO MOST OF THE EMBEDDED COMMENTS HAVE BEEN REMOVED.
+
+! ALL USE IS SUBJECT TO LICENCE. IF YOU NEED FURTHER CLARIFICATION,
+! PLEASE SEE HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM
+
+! PLEASE NOTE THAT:
+
+! 1. THE PACKAGES MAY ONLY BE USED FOR THE PURPOSES SPECIFIED IN THE
+!    LICENCE AGREEMENT AND MUST NOT BE COPIED BY THE LICENSEE FOR
+!    USE BY ANY OTHER PERSONS. USE OF THE PACKAGES IN ANY COMMERCIAL
+!    APPLICATION SHALL BE SUBJECT TO PRIOR WRITTEN AGREEMENT BETWEEN
+!    HYPROTECH UK LIMITED AND THE LICENSEE ON SUITABLE TERMS AND
+!    CONDITIONS, WHICH WILL INCLUDE FINANCIAL CONDITIONS.
+! 2. ALL INFORMATION ON THE PACKAGE IS PROVIDED TO THE LICENSEE ON
+!    THE UNDERSTANDING THAT THE DETAILS THEREOF ARE CONFIDENTIAL.
+! 3. ALL PUBLICATIONS ISSUED BY THE LICENSEE THAT INCLUDE RESULTS
+!    OBTAINED WITH THE HELP OF ONE OR MORE OF THE PACKAGES SHALL
+!    ACKNOWLEDGE THE USE OF THE PACKAGES. THE LICENSEE WILL NOTIFY
+!    HSL@HYPROTECH.COM OR HYPROTECH UK LIMITED OF ANY SUCH PUBLICATION.
+! 4. THE PACKAGES MAY BE MODIFIED BY OR ON BEHALF OF THE LICENSEE
+!    FOR SUCH USE IN RESEARCH APPLICATIONS BUT AT NO TIME SHALL SUCH
+!    PACKAGES OR MODIFICATIONS THEREOF BECOME THE PROPERTY OF THE
+!    LICENSEE. THE LICENSEE SHALL MAKE AVAILABLE FREE OF CHARGE TO THE
+!    COPYRIGHT HOLDER FOR ANY PURPOSE ALL INFORMATION RELATING TO
+!    ANY MODIFICATION.
+! 5. NEITHER COUNCIL FOR THE CENTRAL LABORATORY OF THE RESEARCH
+!    COUNCILS NOR HYPROTECH UK LIMITED SHALL BE LIABLE FOR ANY
+!    DIRECT OR CONSEQUENTIAL LOSS OR DAMAGE WHATSOEVER ARISING OUT OF
+!    THE USE OF PACKAGES BY THE LICENSEE.
+!******************************************************************
+
+      SUBROUTINE MA28AD(N,NZ,A,LICN,IRN,LIRN,ICN,U,IKEEP,IW,W,IFLAG)
+! ..
+! This subroutine performs the LU factorization of A.
+! ..
+! The parameters are as follows:
+! N     Order of matrix. Not altered by subroutine.
+! NZ    Number of non-zeros in input matrix. Not altered by subroutine.
+! A     Array of length LICN. Holds non-zeros of matrix
+!       on entry and non-zeros of factors on exit. Reordered by
+!       MA20AD and MC23AD and altered by MA30AD.
+! LICN  Length of arrays A and ICN. Not altered by subroutine.
+! IRN   Array of length LIRN. Holds row indices on input.
+!       Used as workspace by MA30AD to hold column orientation of
+!       matrix.
+! LIRN  Length of array IRN. Not altered by the subroutine.
+! ICN   Array of length LICN. Holds column indices on entry
+!       and column indices of decomposed matrix on exit. Reordered
+!       by MA20AD and MC23AD and altered by MA30AD.
+! U     Variable set by user to control bias towards numeric or
+!       sparsity pivoting. U = 1.0 gives partial pivoting
+!       while U = 0. does not check multipliers at all. Values of U
+!       greater than one are treated as one while negative values
+!       are treated as zero. Not altered by subroutine.
+! IKEEP Array of length 5*N used as workspace by MA28AD.
+!       (See later comments.) It is not required to be set on entry
+!       and, on exit, it contains information about the decomposition.
+!       It should be preserved between this call and subsequent calls
+!       to MA28BD or MA30CD.
+!       IKEEP(I,1),I = 1,N holds the total length of the part of row
+!       I in the diagonal block.
+!       Row IKEEP(I,2),I = 1,N of the input matrix is the Ith row in
+!       pivot order.
+!       Column IKEEP(I,3),I = 1,N of the input matrix is the Ith
+!       Column in pivot order.
+!       IKEEP(I,4),I = 1,N holds the length of the part of row I in
+!       the L part of the LU decomposition.
+!       IKEEP(I,5),I = 1,N holds the length of the part of row I in
+!       the off-diagonal blocks. If there is only one diagonal block,
+!       IKEEP(1,5) will be set to -1.
+! IW    Array of length 8*N. If the option NSRCH <= N is used, then
+!       the length of array IW can be reduced to 7*N.
+! W     Array length N. Used by MC24AD both as workspace and to return
+!       growth estimate in W(1). The use of this array by MA28AD is
+!       thus optional depending on logical variable GROW.
+! IFLAG Variable used as error flag by subroutine. A positive or
+!       zero value on exit indicates success. Possible negative
+!       values are -1 through -14.
+
+! Private Variable Information.
+! LP, MP Default value 6 (line printer). Unit number for error
+!     messages and duplicate element warning, respectively.
+! NLP, MLP INTEGER. Unit number for messages from MA30AD and
+!     MC23AD. Set by MA28AD to the value of LP.
+! LBLOCK Logical variable with default value .TRUE. If .TRUE.,
+!     MC23AD is used to first permute the matrix to block lower
+!     triangular form.
+! GROW Logical variable with default value .TRUE. If .TRUE., then
+!     an estimate of the increase in size of matrix elements during
+!     LU decomposition is given by MC24AD.
+! EPS, RMIN, RESID. Variables not referenced by MA28AD.
+! IRNCP, ICNCP INTEGER. Set to number of compresses on arrays IRN
+!     and ICN/A, respectively.
+! MINIRN, MINICN INTEGER. Minimum length of arrays IRN and ICN/A,
+!     respectively, for success on future runs.
+! IRANK INTEGER. Estimated rank of matrix.
+! MIRNCP, MICNCP, MIRANK, MIRN, MICN INTEGER. Variables used to
+!     communicate between MA30FD and MA28FD values of
+!     abovenamed variables with somewhat similar names.
+! ABORT1, ABORT2 LOGICAL. Variables with default value .TRUE.
+!     If .FALSE., then decomposition will be performed even
+!     if the matrix is structurally or numerically singular,
+!     respectively.
+! ABORTA, ABORTB LOGICAL. Variables used to communicate values
+!     of ABORT1 and ABORT2 to MA30AD.
+! ABORT Logical variable used to communicate value of ABORT1
+!     to MC23AD.
+! ABORT3 Logical variable. Not referenced by MA28AD.
+! IDISP Array of length 2. Used to communicate information
+!     on decomposition between this call to MA28AD and subsequent
+!     calls to MA28BD and MA30CD. On exit, IDISP(1) and
+!     IDISP(2) indicate position in arrays A and ICN of the
+!     first and last elements in the LU decomposition of the
+!     diagonal blocks, respectively.
+! NUMNZ Structural rank of matrix.
+! NUM   Number of diagonal blocks.
+! LARGE Size of largest diagonal block.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: U
+        INTEGER :: IFLAG, LICN, LIRN, N, NZ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5), IRN(LIRN), IW(N,8)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: UPRIV
+        INTEGER :: I, I1, IEND, II, J, J1, J2, JAY, JJ, KNUM, LENGTH, MOVE, &
+          NEWJ1, NEWPOS
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28AD
+! ..
+!       Check that this call was made from DVODE_F90 and, if not, stop.
+        IF (.NOT.OK_TO_CALL_MA28) THEN
+          MSG = 'This version of MA28 may be used only in conjunction with DVODE_F90.'
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'Please refer to the following HSL copyright notice for MA28.'
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '******************************************************************     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '             *****MA28 COPYRIGHT NOTICE*****                           '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' COPYRIGHT (C) 2001 COUNCIL FOR THE CENTRAL LABORATORY                 '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '               OF THE RESEARCH COUNCILS                                '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' ALL RIGHTS RESERVED.                                                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' NONE OF THE COMMENTS IN THIS COPYRIGHT NOTICE BETWEEN THE LINES       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' OF ASTERISKS SHALL BE REMOVED OR ALTERED IN ANY WAY.                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' THIS PACKAGE IS INTENDED FOR COMPILATION WITHOUT MODIFICATION,        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' SO MOST OF THE EMBEDDED COMMENTS HAVE BEEN REMOVED.                   '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' ALL USE IS SUBJECT TO LICENCE. IF YOU NEED FURTHER CLARIFICATION,     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' PLEASE SEE HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' PLEASE NOTE THAT:                                                     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 1. THE PACKAGES MAY ONLY BE USED FOR THE PURPOSES SPECIFIED IN THE    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    LICENCE AGREEMENT AND MUST NOT BE COPIED BY THE LICENSEE FOR       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    USE BY ANY OTHER PERSONS. USE OF THE PACKAGES IN ANY COMMERCIAL    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    APPLICATION SHALL BE SUBJECT TO PRIOR WRITTEN AGREEMENT BETWEEN    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    HYPROTECH UK LIMITED AND THE LICENSEE ON SUITABLE TERMS AND        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    CONDITIONS, WHICH WILL INCLUDE FINANCIAL CONDITIONS.               '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 2. ALL INFORMATION ON THE PACKAGE IS PROVIDED TO THE LICENSEE ON      '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    THE UNDERSTANDING THAT THE DETAILS THEREOF ARE CONFIDENTIAL.       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 3. ALL PUBLICATIONS ISSUED BY THE LICENSEE THAT INCLUDE RESULTS       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    OBTAINED WITH THE HELP OF ONE OR MORE OF THE PACKAGES SHALL        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    ACKNOWLEDGE THE USE OF THE PACKAGES. THE LICENSEE WILL NOTIFY      '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    HSL@HYPROTECH.COM OR HYPROTECH UK LIMITED OF ANY SUCH PUBLICATION. '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 4. THE PACKAGES MAY BE MODIFIED BY OR ON BEHALF OF THE LICENSEE       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    FOR SUCH USE IN RESEARCH APPLICATIONS BUT AT NO TIME SHALL SUCH    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    PACKAGES OR MODIFICATIONS THEREOF BECOME THE PROPERTY OF THE       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    LICENSEE. THE LICENSEE SHALL MAKE AVAILABLE FREE OF CHARGE TO THE  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    COPYRIGHT HOLDER FOR ANY PURPOSE ALL INFORMATION RELATING TO       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    ANY MODIFICATION.                                                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 5. NEITHER COUNCIL FOR THE CENTRAL LABORATORY OF THE RESEARCH         '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    COUNCILS NOR HYPROTECH UK LIMITED SHALL BE LIABLE FOR ANY          '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    DIRECT OR CONSEQUENTIAL LOSS OR DAMAGE WHATSOEVER ARISING OUT OF   '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    THE USE OF PACKAGES BY THE LICENSEE.                               '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '******************************************************************     '
+          CALL XERRDV(MSG,1770,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Some initialization and transfer of information between
+!       common blocks (see earlier comments).
+        IFLAG = 0
+        ABORTA = ABORT1
+        ABORTB = ABORT2
+        ABORT = ABORT1
+        MLP = LP
+        NLP = LP
+        TOL1 = TOL
+        LBIG1 = LBIG
+        NSRCH1 = NSRCH
+!       UPRIV private copy of U is used in case it is outside
+!       range zero to one and is thus altered by MA30AD.
+        UPRIV = U
+!       Simple data check on input variables and array dimensions.
+        IF (N>0) GOTO 10
+        IFLAG = -8
+        IF (LP/=0) WRITE (LP,90000) N
+        GOTO 170
+10      IF (NZ>0) GOTO 20
+        IFLAG = -9
+        IF (LP/=0) WRITE (LP,90001) NZ
+        GOTO 170
+20      IF (LICN>=NZ) GOTO 30
+        IFLAG = -10
+        IF (LP/=0) WRITE (LP,90002) LICN
+        GOTO 170
+30      IF (LIRN>=NZ) GOTO 40
+        IFLAG = -11
+        IF (LP/=0) WRITE (LP,90003) LIRN
+        GOTO 170
+
+!       Data check to see if all indices lie between 1 and N.
+40      DO 50 I = 1, NZ
+          IF (IRN(I)>0 .AND. IRN(I)<=N .AND. ICN(I)>0 .AND. ICN(I)<=N) &
+            GOTO 50
+          IF (IFLAG==0 .AND. LP/=0) WRITE (LP,90004)
+          IFLAG = -12
+          IF (LP/=0) WRITE (LP,90005) I, A(I), IRN(I), ICN(I)
+50      END DO
+        IF (IFLAG<0) GOTO 180
+
+!       Sort matrix into row order.
+        CALL MC20AD(N,NZ,A,ICN,IW(1,1),IRN,0)
+!       Part of IKEEP is used here as a work-array. IKEEP(I,2) is
+!       the last row to have a non-zero in column I. IKEEP(I,3)
+!       is the off-set of column I from the start of the row.
+        IKEEP(1:N,2) = 0
+        IKEEP(1:N,1) = 0
+
+!       Check for duplicate elements summing any such entries
+!       and printing a warning message on unit MP.
+!       MOVE is equal to the number of duplicate elements found.
+        MOVE = 0
+!       The loop also calculates the largest element in the matrix,
+!       THEMAX.
+        THEMAX = ZERO
+!       J1 is position in arrays of first non-zero in row.
+        J1 = IW(1,1)
+        DO 90 I = 1, N
+          IEND = NZ + 1
+          IF (I/=N) IEND = IW(I+1,1)
+          LENGTH = IEND - J1
+          IF (LENGTH==0) GOTO 90
+          J2 = IEND - 1
+          NEWJ1 = J1 - MOVE
+          DO 80 JJ = J1, J2
+            J = ICN(JJ)
+            THEMAX = MAX(THEMAX,ABS(A(JJ)))
+            IF (IKEEP(J,2)==I) GOTO 70
+!           First time column has ocurred in current row.
+            IKEEP(J,2) = I
+            IKEEP(J,3) = JJ - MOVE - NEWJ1
+            IF (MOVE==0) GOTO 80
+!           Shift necessary because of previous duplicate element.
+            NEWPOS = JJ - MOVE
+            A(NEWPOS) = A(JJ)
+            ICN(NEWPOS) = ICN(JJ)
+            GOTO 80
+!           Duplicate element.
+70          MOVE = MOVE + 1
+            LENGTH = LENGTH - 1
+            JAY = IKEEP(J,3) + NEWJ1
+            IF (MP/=0) WRITE (MP,90006) I, J, A(JJ)
+            A(JAY) = A(JAY) + A(JJ)
+            THEMAX = MAX(THEMAX,ABS(A(JAY)))
+80        END DO
+          IKEEP(I,1) = LENGTH
+          J1 = IEND
+90      END DO
+
+!       KNUM is actual number of non-zeros in matrix with any multiple
+!       entries counted only once.
+        KNUM = NZ - MOVE
+        IF (.NOT.LBLOCK) GOTO 100
+
+!       Perform block triangularisation.
+        CALL MC23AD(N,ICN,A,LICN,IKEEP(1,1),IDISP,IKEEP(1,2),IKEEP(1,3), &
+          IKEEP(1,5),IW(1,3),IW)
+        IF (IDISP(1)>0) GOTO 130
+        IFLAG = -7
+        IF (IDISP(1)==-1) IFLAG = -1
+        IF (LP/=0) WRITE (LP,90007)
+        GOTO 170
+
+!       Block triangularization not requested.
+!       Move structure to end of data arrays in preparation for MA30AD.
+!       Also set LENOFF(1) to -1 and set permutation arrays.
+100     DO I = 1, KNUM
+          II = KNUM - I + 1
+          NEWPOS = LICN - I + 1
+          ICN(NEWPOS) = ICN(II)
+          A(NEWPOS) = A(II)
+        END DO
+        IDISP(1) = 1
+        IDISP(2) = LICN - KNUM + 1
+        DO I = 1, N
+          IKEEP(I,2) = I
+          IKEEP(I,3) = I
+        END DO
+        IKEEP(1,5) = -1
+130     IF (LBIG) BIG1 = THEMAX
+        IF (NSRCH<=N) GOTO 140
+
+!       Perform LU decomposition on diagonal blocks.
+        CALL MA30AD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2),       &
+          IKEEP(1,3),IRN,LIRN,IW(1,2),IW(1,3),IW(1,4),IW(1,5),IW(1,6),IW(1,7), &
+          IW(1,8),IW,UPRIV,IFLAG)
+        GOTO 150
+!       This call if used if NSRCH has been set less than or equal to N.
+!       In this case, two integer work arrays of length can be saved.
+140     CALL MA30AD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2),       &
+          IKEEP(1,3),IRN,LIRN,IW(1,2),IW(1,3),IW(1,4),IW(1,5),IW,IW,IW(1,6),IW,&
+          UPRIV,IFLAG)
+
+!       Transfer private variable information.
+!150    MINIRN = MAX(MIRN,NZ)
+!       MINICN = MAX(MICN,NZ)
+150     MINIRN = MAX(MINIRN,NZ)
+        MINICN = MAX(MINICN,NZ)
+!       IRNCP = MIRNCP
+!       ICNCP = MICNCP
+!       IRANK = MIRANK
+!       NDROP = NDROP1
+        IF (LBIG) BIG = BIG1
+        IF (IFLAG>=0) GOTO 160
+        IF (LP/=0) WRITE (LP,90008)
+        GOTO 170
+
+!       Reorder off-diagonal blocks according to pivot permutation.
+160     I1 = IDISP(1) - 1
+        IF (I1/=0) CALL MC22AD(N,ICN,A,I1,IKEEP(1,5),IKEEP(1,2), &
+          IKEEP(1,3),IW,IRN)
+        I1 = IDISP(1)
+        IEND = LICN - I1 + 1
+
+!       Optionally calculate element growth estimate.
+        IF (GROW) CALL MC24AD(N,ICN,A(I1),IEND,IKEEP,IKEEP(1,4),W)
+!       Increment growth estimate by original maximum element.
+        IF (GROW) W(1) = W(1) + THEMAX
+        IF (GROW .AND. N>1) W(2) = THEMAX
+!       Set flag if the only error is due to duplicate elements.
+        IF (IFLAG>=0 .AND. MOVE/=0) IFLAG = -14
+        GOTO 180
+170     IF (LP/=0) WRITE (LP,90009)
+180     RETURN
+90000   FORMAT (' N is out of range = ',I10)
+90001   FORMAT (' NZ is non positive = ',I10)
+90002   FORMAT (' LICN is too small = ',I10)
+90003   FORMAT (' LIRN is too small = ',I10)
+90004   FORMAT (' Error return from MA28AD because indices found out', &
+          ' of range')
+90005   FORMAT (1X,I6,'The element with value ',1P,D22.14, &
+          ' is out of range with indices ',I8,',',I8)
+90006   FORMAT (' Duplicate element in position ',I8,',',I8,' with value ',1P, &
+          D22.14)
+90007   FORMAT (' Error return from MC23AD')
+90008   FORMAT (' Error return from MA30AD')
+90009   FORMAT (' Error return from MA28AD')
+
+      END SUBROUTINE MA28AD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28BD(N,NZ,A,LICN,IVECT,JVECT,ICN,IKEEP,IW,W,IFLAG)
+! ..
+! This subroutine factorizes a matrix of a similar sparsity
+! pattern to that previously factorized by MA28AD.
+! ..
+! The parameters are as follows:
+! N            Order of matrix. Not altered by subroutine.
+! NZ           Number of non-zeros in input matrix. Not
+!              altered by subroutine.
+! A            Array of length LICN. Holds non-zeros of
+!              matrix on entry and non-zeros of factors on exit.
+!              Reordered by MA28DD and altered by MA30BD.
+! LICN         Length of arrays A and ICN. Not altered by
+!              subroutine.
+! IVECT, JVECT Arrays of length NZ. Hold row and column
+!              indices of non-zeros, respectively. Not altered
+!              by subroutine.
+! ICN          Array of length LICN. Same array as output
+!              from MA28AD. Unchanged by MA28BD.
+! IKEEP        Array of length 5*N. Same array as output
+!              from MA28AD. Unchanged by MA28BD.
+! IW           Array length 5*N. Used as workspace by
+!              MA28DD and MA30BD.
+! W            Array of length N. Used as workspace by
+!              MA28DD, MA30BD and (optionally) MC24AD.
+! IFLAG        Integer used as error flag, with positive
+!              or zero value indicating success.
+
+! Private Variable Information.
+! Unless otherwise stated private variables are as in MA28AD.
+! Those variables referenced by MA28BD are mentioned below.
+! LP, MP     Integers used as in MA28AD as unit number for error
+!            and warning messages, respectively.
+! NLP        Integer variable used to give value of LP to MA30ED.
+! EPS        MA30BD will output a positive value
+!            for IFLAG if any modulus of the ratio of pivot element
+!            to the largest element in its row (U part only) is less
+!            than EPS (unless EPS is greater than 1.0 when no action
+!            takes place).
+! RMIN       Variable equal to the value of this minimum ratio in
+!            cases where EPS is less than or equal to 1.0.
+! MEPS,MRMIN Variables used by the subroutine to communicate between
+!            MA28FD and MA30GD.
+! IDISP      Integer array of length 2. The same as that used by
+!            MA28AD. Unchanged by MA28BD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IFLAG, LICN, N, NZ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5), IVECT(NZ), IW(N,5), JVECT(NZ)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I1, IDUP, IEND
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28BD
+! ..
+!       Check to see if elements were dropped in previous MA28AD call.
+        IF (NDROP==0) GOTO 10
+        IFLAG = -15
+        IF (LP/=0) WRITE (LP,90000) IFLAG, NDROP
+        GOTO 70
+10      IFLAG = 0
+        MEPS = EPS
+        NLP = LP
+!       Simple data check on variables.
+        IF (N>0) GOTO 20
+        IFLAG = -11
+        IF (LP/=0) WRITE (LP,90001) N
+        GOTO 60
+20      IF (NZ>0) GOTO 30
+        IFLAG = -10
+        IF (LP/=0) WRITE (LP,90002) NZ
+        GOTO 60
+30      IF (LICN>=NZ) GOTO 40
+        IFLAG = -9
+        IF (LP/=0) WRITE (LP,90003) LICN
+        GOTO 60
+
+40      CALL MA28DD(N,A,LICN,IVECT,JVECT,NZ,ICN,IKEEP(1,1),IKEEP(1,4), &
+          IKEEP(1,5),IKEEP(1,2),IKEEP(1,3),IW(1,3),IW,W(1),IFLAG)
+!       THEMAX is largest element in matrix.
+        THEMAX = W(1)
+        IF (LBIG) BIG1 = THEMAX
+!       IDUP equals one if there were duplicate elements, zero otherwise.
+        IDUP = 0
+        IF (IFLAG==(N+1)) IDUP = 1
+        IF (IFLAG<0) GOTO 60
+
+!       Perform row Gauss elimination on the structure received from MA28DD.
+        CALL MA30BD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2), &
+          IKEEP(1,3),W,IW,IFLAG)
+
+!       Transfer private variable information.
+        IF (LBIG) BIG1 = BIG
+!       RMIN = MRMIN
+        IF (IFLAG>=0) GOTO 50
+        IFLAG = -2
+        IF (LP/=0) WRITE (LP,90004)
+        GOTO 60
+
+!       Optionally calculate the growth parameter.
+50      I1 = IDISP(1)
+        IEND = LICN - I1 + 1
+        IF (GROW) CALL MC24AD(N,ICN,A(I1),IEND,IKEEP,IKEEP(1,4),W)
+!       Increment estimate by largest element in input matrix.
+        IF (GROW) W(1) = W(1) + THEMAX
+        IF (GROW .AND. N>1) W(2) = THEMAX
+!       Set flag if the only error is due to duplicate elements.
+        IF (IDUP==1 .AND. IFLAG>=0) IFLAG = -14
+        GOTO 70
+60      IF (LP/=0) WRITE (LP,90005)
+70      RETURN
+90000   FORMAT (' Error return from MA28BD with IFLAG = ',I4/I7, &
+          ' Entries dropped from structure by MA28AD')
+90001   FORMAT (' N is out of range = ',I10)
+90002   FORMAT (' NZ is non positive = ',I10)
+90003   FORMAT (' LICN is too small = ',I10)
+90004   FORMAT (' Error return from MA30BD')
+90005   FORMAT (' + Error return from MA28BD')
+
+      END SUBROUTINE MA28BD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28DD(N,A,LICN,IVECT,JVECT,NZ,ICN,LENR,LENRL,LENOFF, &
+        IP,IQ,IW1,IW,W1,IFLAG)
+! ..
+! This subroutine need never be called by the user directly. It sorts
+! the user's matrix into the structure of the decomposed form and checks
+! for the presence of duplicate entries or non-zeros lying outside the
+! sparsity pattern of the decomposition. It also calculates the largest
+! element in the input matrix.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: W1
+        INTEGER :: IFLAG, LICN, N, NZ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN)
+        INTEGER :: ICN(LICN), IP(N), IQ(N), IVECT(NZ), IW(N,2), IW1(N,3), &
+          JVECT(NZ), LENOFF(N), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AA
+        INTEGER :: I, IBLOCK, IDISP2, IDUMMY, II, INEW, IOLD, J1, J2, JCOMP, &
+          JDUMMY, JJ, JNEW, JOLD, MIDPT
+        LOGICAL :: BLOCKL
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28DD
+! ..
+        BLOCKL = LENOFF(1) >= 0
+!       IW1(I,3) is set to the block in which row I lies and the
+!       inverse permutations to IP and IQ are set in IW1(:,1) and
+!       IW1(:,2), respectively.
+!       Pointers to beginning of the part of row I in diagonal and
+!       off-diagonal blocks are set in IW(I,2) and IW(I,1),
+!       respectively.
+        IBLOCK = 1
+        IW(1,1) = 1
+        IW(1,2) = IDISP(1)
+        DO 10 I = 1, N
+          IW1(I,3) = IBLOCK
+          IF (IP(I)<0) IBLOCK = IBLOCK + 1
+          II = IABS(IP(I)+0)
+!         II = IABS(IP(I))
+          IW1(II,1) = I
+          JJ = IQ(I)
+          JJ = IABS(JJ)
+          IW1(JJ,2) = I
+          IF (I==1) GOTO 10
+          IF (BLOCKL) IW(I,1) = IW(I-1,1) + LENOFF(I-1)
+          IW(I,2) = IW(I-1,2) + LENR(I-1)
+10      END DO
+!       Place each non-zero in turn into its correct location in
+!       the A/ICN array.
+        IDISP2 = IDISP(2)
+        DO 170 I = 1, NZ
+!         Necessary to avoid reference to unassigned element of ICN.
+          IF (I>IDISP2) GOTO 20
+          IF (ICN(I)<0) GOTO 170
+20        IOLD = IVECT(I)
+          JOLD = JVECT(I)
+          AA = A(I)
+!         This is a dummy loop for following a chain of interchanges.
+!         It will be executed NZ TIMES in total.
+          DO IDUMMY = 1, NZ
+!           Perform some validity checks on IOLD and JOLD.
+            IF (IOLD<=N .AND. IOLD>0 .AND. JOLD<=N .AND. JOLD>0) GOTO 30
+            IF (LP/=0) WRITE (LP,90000) I, A(I), IOLD, JOLD
+            IFLAG = -12
+            GOTO 180
+30          INEW = IW1(IOLD,1)
+            JNEW = IW1(JOLD,2)
+!           Are we in a valid block and is it diagonal or off-diagonal?
+!           IF (IW1(INEW,3)-IW1(JNEW,3)) 40, 60, 50
+!40         IFLAG = -13
+            IF (IW1(INEW,3)-IW1(JNEW,3) == 0) GOTO 60
+            IF (IW1(INEW,3)-IW1(JNEW,3) > 0) GOTO 50
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90001) IOLD, JOLD
+            GOTO 180
+50          J1 = IW(INEW,1)
+            J2 = J1 + LENOFF(INEW) - 1
+            GOTO 110
+!           Element is in diagonal block.
+60          J1 = IW(INEW,2)
+            IF (INEW>JNEW) GOTO 70
+            J2 = J1 + LENR(INEW) - 1
+            J1 = J1 + LENRL(INEW)
+            GOTO 110
+70          J2 = J1 + LENRL(INEW)
+!           Binary search of ordered list. Element in L part of row.
+            DO 100 JDUMMY = 1, N
+              MIDPT = (J1+J2)/2
+              JCOMP = IABS(ICN(MIDPT)+0)
+!             JCOMP = IABS(ICN(MIDPT))
+!             IF (JNEW-JCOMP) 80, 130, 90
+!80           J2 = MIDPT
+              IF (JNEW-JCOMP == 0) GOTO 130
+              IF (JNEW-JCOMP > 0) GOTO 90
+              J2 = MIDPT
+              GOTO 100
+90            J1 = MIDPT
+100         END DO
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90002) IOLD, JOLD
+            GOTO 180
+!           Linear search. Element in L part of row or off-diagonal blocks.
+110         DO MIDPT = J1, J2
+              IF (IABS(ICN(MIDPT)+0)==JNEW) GOTO 130
+!             IF (IABS(ICN(MIDPT))==JNEW) GOTO 130
+            END DO
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90002) IOLD, JOLD
+            GOTO 180
+!           Equivalent element of ICN is in position MIDPT.
+130         IF (ICN(MIDPT)<0) GOTO 160
+            IF (MIDPT>NZ .OR. MIDPT<=I) GOTO 150
+            W1 = A(MIDPT)
+            A(MIDPT) = AA
+            AA = W1
+            IOLD = IVECT(MIDPT)
+            JOLD = JVECT(MIDPT)
+            ICN(MIDPT) = -ICN(MIDPT)
+          END DO
+150       A(MIDPT) = AA
+          ICN(MIDPT) = -ICN(MIDPT)
+          GOTO 170
+160       A(MIDPT) = A(MIDPT) + AA
+!        Set flag for duplicate elements.
+          iflag = n + 1
+170     END DO
+!       Reset ICN array and zero elements in LU but not in A.
+!       Also calculate the maximum element of A.
+180     W1 = ZERO
+        DO 200 I = 1, IDISP2
+          IF (ICN(I)<0) GOTO 190
+          A(I) = ZERO
+          GOTO 200
+190       ICN(I) = -ICN(I)
+          W1 = MAX(W1,ABS(A(I)))
+200     END DO
+        RETURN
+90000   FORMAT (' Element ',I6,' with value ',D22.14,' has indices ',I8, &
+          ','/I8,' indices out of range')
+90001   FORMAT (' Non-zero ',I7,',',I6,' in zero off-diagonal',' block')
+90002   FORMAT (' Element ',I6,',',I6,' was not in LU pattern')
+
+      END SUBROUTINE MA28DD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28CD(N,A,LICN,ICN,IKEEP,RHS,W,MTYPE)
+! ..
+! This subroutine uses the factors from MA28AD or MA28BD to solve a
+! system of equations without iterative refinement.
+! ..
+! The parameters are:
+! N     Order of matrix. Not altered by subroutine.
+! A     array of length LICN. the same array as
+!       was used in the most recent call to MA28AD or MA28BD.
+! LICN  Length of arrays A and ICN. Not altered by subroutine.
+! ICN   Array of length LICN. Same array as output from
+!       MA28AD. Unchanged by MA30CD.
+! IKEEP Array of length 5*N. Same array as output from
+!       MA28AD. Unchanged by MA30CD.
+! RHS   Array of length N. On entry, it holds the
+!       right hand side, on exit, the solution vector.
+! W     Array of length N. Used as workspace by MA30CD.
+! MTYPE Integer used to tell MA30CD to solve the direct
+!       equation (MTYPE = 1) or its transpose (MTYPE /= 1).
+
+! Private Variable Information.
+! Unless otherwise stated private variables are as in MA28AD.
+! Those variables referenced by MA30CD are mentioned below.
+! RESID   Variable which returns maximum residual of
+!         equations where pivot was zero.
+! MRESID  Variable used by MA30CD to communicate between
+!         MA28FD and MA30HD.
+! IDISP   Integer array of length 2. The same as that used
+!         by MA28AD. Unchanged by MA28BD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, MTYPE, N
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), RHS(N), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28CD
+! ..
+!       This call performs the solution of the set of equations.
+        CALL MA30CD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IKEEP(1,5),IDISP, &
+          IKEEP(1,2),IKEEP(1,3),RHS,W,MTYPE)
+!       Transfer private variable information.
+        RESID = MRESID
+        RETURN
+
+      END SUBROUTINE MA28CD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28ID(N,NZ,AORG,IRNORG,ICNORG,LICN,A,ICN,IKEEP,RHS, &
+        X,R,W,MTYPE,PREC,IFLAG)
+! ..
+! This subroutine uses the factors from an earlier call to MA28AD or
+! MA28BD to solve the system of equations with iterative refinement.
+! ..
+! The parameters are:
+! N      Order of the matrix. Not altered by the subroutine.
+! NZ     Number of entries in the original matrix. Not altered by
+!        the subroutine.
+!        For this entry the original matrix must have been saved in
+!        AORG, IRNORG, ICNORG where entry AORG(K) is in row IRNORG(K)
+!        and column ICNORG(K),K = 1,...,NZ. Information about the
+!        factors of A is communicated to this subroutine via the
+!        parameters LICN, A, ICN and IKEEP where:
+! AORG   Array of length NZ. Not altered by MA28ID.
+! IRNORG Array of length NZ. Not altered by MA28ID.
+! ICNORG Array of length NZ. Not altered by MA28ID.
+! LICN   Length of arrays A and ICN. Not altered by the subroutine.
+! A      Array of length LICN. It must be unchanged since the
+!        last call to MA28AD or MA28BD. Not altered by the
+!        subroutine.
+! ICN, IKEEP are the arrays (of lengths LICN and 5*N, respectively)
+!        of the same names as in the previous all to MA28AD. They
+!        should be unchanged since this earlier call and they are
+!        not altered by MA28ID.
+! The other parameters are as follows:
+! RHS    Array of length N. The user must set RHS(I) to contain
+!        the value of the Ith component of the right hand side.
+!        Not altered by MA28ID.
+! X      Array of length N. If an initial guess of the solution
+!        is given (ISTART equal to 1), then the user must set X(I)
+!        to contain the value of the Ith component of the estimated
+!        solution. On exit, X(I) contains the Ith component of the
+!        solution vector.
+! R      Array of length N. It need not be set on entry. On exit,
+!        R(I) contains the Ith component of an estimate of the error
+!        if MAXIT is greater than 0.
+! W      Array of length N. Used as workspace by MA28ID.
+! MTYPE  Must be set to determine whether MA28ID will solve A*X = RHS
+!        (MTYPE = 1) or AT*X = RHS (MTYPE /= 1). Not altered by MA28ID.
+! PREC   Should be set by the user to the relative accuracy required.
+!        The iterative refinement will terminate if the magnitude of
+!        the largest component of the estimated error relative to the
+!        largest component in the solution is less than PREC.
+!        Not altered by MA28ID.
+! IFLAG  Diagnostic flag which will be set to zero on successful
+!        exit from MA28ID. Otherwise it will have a non-zero value.
+!        The non-zero value IFLAG can have on exit from MA28ID are
+!        -16 indicating that more than MAXIT iteartions are required.
+!        -17 indicating that more convergence was too slow.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: PREC
+        INTEGER :: IFLAG, LICN, MTYPE, N, NZ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), AORG(NZ), R(N), RHS(N), W(N), X(N)
+        INTEGER :: ICN(LICN), ICNORG(NZ), IKEEP(N,5), IRNORG(NZ)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: CONVER, D, DD
+        INTEGER :: I, ITERAT, NCOL, NROW
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28ID
+! ..
+!       Initialization of NOITER, ERRMAX, and IFLAG.
+        NOITER = 0
+        ERRMAX = ZERO
+        IFLAG = 0
+
+!       Jump if a starting vector has been supplied by the user.
+
+        IF (ISTART==1) GOTO 20
+
+!       Make a copy of the right-hand side vector.
+
+        X(1:N) = RHS(1:N)
+
+!       Find the first solution.
+
+        CALL MA28CD(N,A,LICN,ICN,IKEEP,X,W,MTYPE)
+
+!       Stop the computations if MAXIT = 0.
+
+20      IF (MAXIT==0) GOTO 160
+
+!       Calculate the max-norm of the first solution.
+
+        DD = 0.0
+        DO I = 1, N
+          DD = MAX(DD,ABS(X(I)))
+        END DO
+        DXMAX = DD
+
+!       Begin the iterative process.
+
+        DO 120 ITERAT = 1, MAXIT
+          D = DD
+
+!         Calculate the residual vector.
+
+          R(1:N) = RHS(1:N)
+          IF (MTYPE==1) GOTO 60
+          DO I = 1, NZ
+            NROW = IRNORG(I)
+            NCOL = ICNORG(I)
+            R(NCOL) = R(NCOL) - AORG(I)*X(NROW)
+          END DO
+          GOTO 80
+!         MTYPE = 1.
+60        DO I = 1, NZ
+            NROW = IRNORG(I)
+            NCOL = ICNORG(I)
+            R(NROW) = R(NROW) - AORG(I)*X(NCOL)
+          END DO
+80        DRES = 0.0
+
+!         Find the max-norm of the residual vector.
+
+          DO I = 1, N
+            DRES = MAX(DRES,ABS(R(I)))
+          END DO
+
+!         Stop the calculations if the max-norm of
+!         the residual vector is zero.
+
+!         IF (DRES == 0.0) GOTO 150
+          IF (ABS(DRES)<=ZERO) GOTO 150
+
+!         Calculate the correction vector.
+
+          NOITER = NOITER + 1
+          CALL MA28CD(N,A,LICN,ICN,IKEEP,R,W,MTYPE)
+
+!         Find the max-norm of the correction vector.
+
+          DD = 0.0
+          DO I = 1, N
+            DD = MAX(DD,ABS(R(I)))
+          END DO
+
+!         Check the convergence.
+
+          IF (DD>D*CGCE .AND. ITERAT>=2) GOTO 130
+          IF (ABS((DXMAX*TEN+DD)-(DXMAX*TEN))<=ZERO) GOTO 140
+
+!         Attempt to improve the solution.
+
+          DXMAX = 0.0
+          DO I = 1, N
+            X(I) = X(I) + R(I)
+            DXMAX = MAX(DXMAX,ABS(X(I)))
+          END DO
+
+!         Check the stopping criterion.
+ 
+          IF (DD<PREC*DXMAX) GOTO 140
+120     END DO
+!       More than MAXIT iterations required.
+        IFLAG = -16
+        WRITE (LP,90000) IFLAG, MAXIT
+        GOTO 140
+!       Convergence rate unacceptably slow.
+130     IFLAG = -17
+        CONVER = DD/D
+        WRITE (LP,90001) IFLAG, CONVER, CGCE
+
+!       The iterative process is terminated.
+
+140     ERRMAX = DD
+150     CONTINUE
+160     RETURN
+90000   FORMAT (' Error return from MA28ID with IFLAG = ',I3/' More than ', &
+          I5,' iterations required')
+90001   FORMAT (' Error return from MA28I with IFLAG = ', &
+          I3/' Convergence rate of ',1P,E9.2,' too slow'/ &
+          ' Maximum acceptable rate set to ',1P,E9.2)
+
+      END SUBROUTINE MA28ID
+!_______________________________________________________________________
+
+! Private Variable Information.
+! LP, MP are used by the subroutine as the unit numbers for its warning
+!     and diagnostic messages. Default value for both is 6 (for line
+!     printer output). The user can either reset them to a different
+!     stream number or suppress the output by setting them to zero.
+!     While LP directs the output of error diagnostics from the
+!     principal subroutines and internally called subroutines, MP
+!     controls only the output of a message which warns the user that
+!     he has input two or more non-zeros A(I),. .,A(K) with the same
+!     row and column indices. The action taken in this case is to
+!     proceed using a numerical value of A(I)+...+A(K). In the absence
+!     of other errors, IFLAG will equal -14 on exit.
+! LBLOCK Is a logical variable which controls an option of first
+!     preordering the matrix to block lower triangular form (using
+!     Harwell subroutine MC23A). The preordering is performed if LBLOCK
+!     is equal to its default value of .TRUE. If LBLOCK is set to
+!     .FALSE., the option is not invoked and the space allocated to
+!     IKEEP can be reduced to 4*N+1.
+! GROW is a logical variable. If it is left at its default value of
+!     .TRUE., then on return from MA28AD or MA28BD, W(1) will give
+!     an estimate (an upper bound) of the increase in size of elements
+!     encountered during the decomposition. If the matrix is well
+!     scaled, then a high value for W(1), relative to the largest entry
+!     in the input matrix, indicates that the LU decomposition may be
+!     inaccurate and the user should be wary of his results and perhaps
+!     increase U for subsequent runs. We would like to emphasise that
+!     this value only relates to the accuracy of our LU decomposition
+!     and gives no indication as to the singularity of the matrix or the
+!     accuracy of the solution. This upper bound can be a significant
+!     overestimate particularly if the matrix is badly scaled. If an
+!     accurate value for the growth is required, LBIG(Q.V.) should be
+!     set to .TRUE.
+! EPS, RMIN If, on entry to MA28BD, EPS is less than one, then RMIN
+!     will give the smallest ratio of the pivot to the largest element
+!     in the corresponding row of the upper triangular factor thus
+!     monitoring the stability of successive factorizations. If RMIN
+!     becomes very large and W(1) from MA28BD is also very large, it
+!     may be advisable to perform a new decomposition using MA28AD.
+! RESID Variable which on exit from MA30CD gives the value of the
+!     maximum residual over all the equations unsatisfied because
+!     of dependency (zero pivots).
+! IRNCP, ICNCP Variables which monitor the adequacy of "elbow room"
+!     in IRN and A/ICN, respectively. If either is quite large (say
+!     greater than N/10), it will probably pay to increase the size of
+!     the corresponding array for subsequent runs. If either is very low
+!     or zero, then one can perhaps save storage by reducing the size of
+!     the corresponding array.
+! MINIRN, MINICN Integer variables which, in the event of a successful
+!     return (IFLAG >= 0 or IFLAG = -14) give the minimum size of IRN
+!     and A/ICN, respectively which would enable a successful run on
+!     an identical matrix. On an exit with IFLAG equal to -5, MINICN
+!     gives the minimum value of ICN for success on subsequent runs on
+!     an identical matrix. In the event of failure with IFLAG = -6,-4,
+!     -3,-2, OR -1, then MINICN and MINIRN give the minimum value of
+!     LICN and LIRN, respectively which would be required for a
+!     successful decomposition up to the point at which the failure
+!     occurred.
+! IRANK Integer variable which gives an upper bound on the rank of
+!     the matrix.
+! ABORT1 is a logical variable with default value .TRUE. If ABORT1 is
+!     set to .FALSE., then MA28AD will decompose structurally singular
+!     matrices (including rectangular ones).
+! ABORT2 is a logical variable with default value .TRUE. If ABORT2 is
+!     set to .FALSE., then MA28AD will decompose numerically singular
+!     matrices.
+! IDISP is an integer array of length 2. On output from MA28AD, The
+!     indices of the diagonal blocks of the factors lie in positions
+!     IDISP(1) to IDISP(2) of A/ICN. This array must be preserved
+!     between a call to MA28AD and subsequent calls to MA28BD,
+!     MA30CD or MA28ID.
+! TOL If set to a positive value, then any non-zero whose modulus is
+!     less than TOL will be dropped from the factorization. The
+!     factorization will then require less storage but will be
+!     inaccurate. After a run of MA28AD with TOL positive it is not
+!     possible to use MA28BD and the user is recommended to use
+!     MA28ID to obtain the solution. The default value for TOL is 0.0.
+! THEMAX On exit from MA28AD, THEMAX will hold the largest entry of
+!     the original matrix.
+! BIG If LBIG has been set to .TRUE., BIG will hold the largest entry
+!     encountered during the factorization by MA28AD or MA28BD.
+! DXMAX On exit from MA28ID, DXMAX will be set to the largest component
+!     of the solution.
+! ERRMAX If MAXIT is positive, ERRMAX will be set to the largest
+!     component in the estimate of the error.
+! DRES On exit from MA28ID, if MAXIT is positive, DRES will be set to
+!     the largest component of the residual.
+! CGCE Used by MA28ID to check the convergence rate. If the ratio of
+!     successive corrections is not less than CGCE, then we terminate
+!     since the convergence rate is adjudged too slow.
+! NDROP If TOL has been set positive on exit from MA28AD, NDROP will
+!     hold the number of entries dropped from the data structure.
+! MAXIT Maximum number of iterations performed by MA28ID. Default = 16.
+! NOITER Set by MA28ID to the number of iterative refinement iterations
+!     actually used.
+! NSRCH If NSRCH is set to a value less than N, then a different pivot
+!     option will be employed by MA28AD. This may result in different
+!     fill-in and execution time for MA28AD. If NSRCH is less than or
+!     equal to N, the workspace array IW can be reduced in length. The
+!     default value for NSRCH is 32768.
+! ISTART If ISTART is set to a value other than zero, then the user
+!     must supply an estimate of the solution to MA28ID. The default
+!     value for istart is zero.
+! LBIG If LBIG is set to .TRUE., the value of the largest element
+!     encountered in the factorization by MA28AD or MA28BD is returned
+!     in BIG. Setting LBIG to .TRUE. will increase the time for MA28AD
+!     marginally and that for MA28BD by about 20%. The default value
+!     for LBIG is .FALSE.
+!_______________________________________________________________________
+
+      SUBROUTINE MA30AD(NN,ICN,A,LICN,LENR,LENRL,IDISP,IP,IQ,IRN,LIRN, &
+        LENC,IFIRST,LASTR,NEXTR,LASTC,NEXTC,IPTR,IPC,U,IFLAG)
+! ..
+!     If the user requires a more convenient data interface then the
+!     MA28 package should be used. The MA28 subroutines call the MA30
+!     subroutines after checking the user's input data and optionally
+!     using MC23AD to permute the matrix to block triangular form.
+!     This package of subroutines (MA30AD, MA30BD, MA30CD, and MA30DD)
+!     performs operations pertinent to the solution of a general
+!     sparse N by N system of linear equations (i.e., solve
+!     AX = B). Structually singular matrices are permitted including
+!     those with row or columns consisting entirely of zeros (i.e.,
+!     including rectangular matrices). It is assumed that the
+!     non-zeros of the matrix A do not differ widely in size. If
+!     necessary a prior call of the scaling subroutine MA19AD may be
+!     made.
+!     A discussion of the design of these subroutines is given by Duff
+!     and Reid (ACM TRANS MATH SOFTWARE 5 PP 18-35, 1979(CSS 48)) while
+!     fuller details of the implementation are given in duff (HARWELL
+!     REPORT AERE-R 8730, 1977). The additional pivoting option in
+!     ma30ad and the use of drop tolerances (see private variables for
+!     MA30ID) were added to the package after joint work with Reid,
+!     Schaumburg, Wasniewski and Zlatev (Duff, Reid, Schaumburg,
+!     Wasniewski and Zlatev, HARWELL REPORT CSS 135, 1983).
+
+!     MA30AD performs the LU decomposition of the diagonal blocks of
+!     the permutation PAQ of a sparse matrix A, where input permutations
+!     P1 and Q1 are used to define the diagonal blocks. There may be
+!     non-zeros in the off-diagonal blocks but they are unaffected by
+!     MA30AD. P and P1 differ only within blocks as do Q and Q1. The
+!     permutations P1 and Q1 may be found by calling MC23AD or the
+!     matrix may be treated as a single block by using P1 = Q1 = I. The
+!     matrix non-zeros should be held compactly by rows, although it
+!     should be noted that the user can supply the matrix by columns
+!     to get the LU decomposition of A transpose.
+
+!     This description should also be consulted for further information
+!     on most of the parameters of MA30BD and MA30CD.
+!     The parameters are:
+! N   is an integer variable which must be set by the user to the order
+!     of the matrix. It is not altered by MA30AD.
+! ICN is an integer array of length LICN. Positions IDISP(2) to
+!     LICN must be set by the user to contain the column indices of
+!     the non-zeros in the diagonal blocks of P1*A*Q1. Those belonging
+!     to a single row must be contiguous but the ordering of column
+!     indices with each row is unimportant. The non-zeros of row I
+!     precede those of row I+1,I = 1,...,N-1 and no wasted space is
+!     allowed between the rows. On output the column indices of the
+!     LU decomposition of PAQ are held in positions IDISP(1) to
+!     IDISP(2), the rows are in pivotal order, and the column indices
+!     of the L Part of each row are in pivotal order and precede those
+!     of U. Again there is no wasted space either within a row or
+!     between the rows. ICN(1) to ICN(IDISP(1)-1), are neither
+!     required nor altered. If MC23AD has been called, these will hold
+!     information about the off-diagonal blocks.
+! A   Array of length LICN whose entries IDISP(2) to LICN must be set
+!     by the user to the values of the non-zero entries of the matrix
+!     in the order indicated by ICN. On output A will hold the LU
+!     factors of the matrix where again the position in the matrix
+!     is determined by the corresponding values in ICN.
+!     A(1) to A(IDISP(1)-1) are neither required nor altered.
+! LICN is an integer variable which must be set by the user to the
+!     length of arrays ICN and A. It must be big enough for A and ICN
+!     to hold all the non-zeros of L and U and leave some "elbow
+!     room". It is possible to calculate a minimum value for LICN by
+!     a preliminary run of MA30AD. The adequacy of the elbow room
+!     can be judged by the size of the private variable ICNCP.
+!     It is not altered by MA30AD.
+! LENR is an integer array of length N. On input, LENR(I) should
+!     equal the number of non-zeros in row I,I = 1,...,N of the
+!     diagonal blocks of P1*A*Q1. On output, LENR(I) will equal the
+!     total number of non-zeros in row I of L and row I of U.
+! LENRL is an integer array of length N. On output from MA30AD,
+!     LENRL(I) will hold the number of non-zeros in row I of L.
+! IDISP is an integer array of length 2. The user should set IDISP(1)
+!     to be the first available position in A/ICN for the LU
+!     decomposition while IDISP(2) is set to the position in A/ICN of
+!     the first non-zero in the diagonal blocks of P1*A*Q1. On output,
+!     IDISP(1) will be unaltered while IDISP(2) will be set to the
+!     position in A/ICN of the last non-zero of the LU decomposition.
+! IP  is an integer array of length N which holds a permutation of
+!     the integers 1 to N. On input to MA30AD, the absolute value of
+!     IP(I) must be set to the row of A which is row I of P1*A*Q1. A
+!     negative value for IP(I) indicates that row I is at the end of a
+!     diagonal block. On output from MA30AD, IP(I) indicates the row
+!     of A which is the Ith row in PAQ. IP(I) will still be negative
+!     for the last row of each block (except the last).
+! IQ  is an integer array of length N which again holds a
+!     permutation of the integers 1 to N. On input to MA30AD, IQ(J)
+!     must be set to the column of A which is column J of P1*A*Q1. On
+!     output from MA30AD, the absolute value of IQ(J) indicates the
+!     column of A which is the Jth in PAQ. For rows, I say, in which
+!     structural or numerical singularity is detected IQ(I) is
+!     negated.
+! IRN is an integer array of length LIRN used as workspace by
+!     MA30AD.
+! LIRN is an integer variable. It should be greater than the
+!     largest number of non-zeros in a diagonal block of P1*A*Q1 but
+!     need not be as large as LICN. It is the length of array IRN and
+!     should be large enough to hold the active part of any block,
+!     plus some "elbow room", the a posteriori adequacy of which can
+!     be estimated by examining the size of private variable
+!     IRNCP.
+! LENC, FIRST, LASTR, NEXTR, LASTC, NEXTC are all integer arrays of
+!     length N which are used as workspace by MA30AD. If NSRCH is
+!     set to a value less than or equal to N, then arrays LASTC and
+!     NEXTC are not referenced by MA30AD and so can be dummied in
+!     the call to MA30AD.
+! IPTR, IPC are integer arrays of length N which are used as
+!     workspace by MA30AD.
+! U   is a real(kind=wp) variable which should be set by the user
+!     to a value between 0. and 1.0. If less than zero it is reset
+!     to zero and if its value is 1.0 or greater it is reset to
+!     0.9999 (0.999999999 in D version). It determines the balance
+!     between pivoting for sparsity and for stability, values near
+!     zero emphasizing sparsity and values near one emphasizing
+!     stability. We recommend U = 0.1 as a posible first trial value.
+!     The stability can be judged by a later call to MC24AD or by
+!     setting LBIG to .TRUE.
+! IFLAG is an integer variable. It will have a non-negative value
+!     if MA30AD is successful. Negative values indicate error
+!     conditions while positive values indicate that the matrix has
+!     been successfully decomposed but is singular. For each non-zero
+!     value, an appropriate message is output on unit LP. Possible
+!     non-zero values for IFLAG are
+! -1  THe matrix is structurally singular with rank given by IRANK
+!     in private variables for MA30FD.
+! +1  If, however, the user wants the LU decomposition of a
+!     structurally singular matrix and sets the private variable
+!     ABORT1 to .FALSE., then, in the event of singularity and a
+!     successful decomposition, Iflag is returned with the value +1
+!     and no message is output.
+! -2  The matrix is numerically singular (it may also be structurally
+!     singular) with estimated rank given by IRANK in private variables
+!     for MA30FD.
+! +2  THE user can choose to continue the decomposition even when a
+!     zero pivot is encountered by setting private variable
+!     ABORT2 TO .FALSE. If a singularity is encountered, IFLAG will
+!     then return with a value of +2, and no message is output if
+!     the decomposition has been completed successfully.
+! -3  LIRN has not been large enough to continue with the
+!     decomposition. If the stage was zero then private variable
+!     MINIRN gives the length sufficient to start the decomposition on
+!     this block. FOr a successful decomposition on this block the
+!     user should make LIRN slightly (say about N/2) greater than this
+!     value.
+! -4  LICN is not large enough to continue with the decomposition.
+! -5  The decomposition has been completed but some of the LU factors
+!     have been discarded to create enough room in A/ICN to continue
+!     the decomposition. The variable MINICN in private variables for
+!     MA30FD. Then gives the size that LICN should be to enable the
+!     factorization to be successful. If the user sets private
+!     variable ABORT3 to .TRUE., then the subroutine will exit
+!     immediately instead of destroying any factors and continuing.
+! -6  Both LICN and LIRN are too small. Termination has been caused
+!     by lack of space in IRN (see error IFLAG = -3), but already
+!     some of the LU factors in A/ICN have been lost (see error
+!     IFLAG = -5). MINICN gives the minimum amount of space
+!     required in A/ICN for decomposition up to this point.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        REAL (WP) :: U
+        INTEGER :: IFLAG, LICN, LIRN, NN
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN)
+        INTEGER :: ICN(LICN), IDISP(2), IFIRST(NN), IP(NN), IPC(NN), &
+          IPTR(NN), IQ(NN), IRN(LIRN), LASTC(NN), LASTR(NN),         &
+          LENC(NN), LENR(NN), LENRL(NN), NEXTC(NN), NEXTR(NN)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AANEW, AMAX, ANEW, AU, PIVR, PIVRAT, SCALE
+        INTEGER :: COLUPD, DISPC, I, I1, I2, IACTIV, IBEG, IDISPC,   &
+          IDROP, IDUMMY, IEND, IFILL, IFIR, II, III, IJFIR, IJP1,    &
+          IJPOS, ILAST, INDROW, IOP, IPIV, IPOS, IROWS, ISING, ISRCH,&
+          ISTART, ISW, ISW1, ITOP, J, J1, J2, JBEG, JCOST, JCOUNT,   &
+          JDIFF, JDUMMY, JEND, JJ, JMORE, JNEW, JNPOS, JOLD, JPIV,   &
+          JPOS, JROOM, JVAL, JZER, JZERO, K, KCOST, KDROP, L, LC,    &
+          LENPIV, LENPP, LL, LR, MOREI, MSRCH, N, NBLOCK, NC, NNM1,  &
+          NR, NUM, NZ, NZ2, NZCOL, NZMIN, NZPC, NZROW, OLDEND,       &
+          OLDPIV, PIVEND, PIVOT, PIVROW, ROWI
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30AD
+! ..
+        MSRCH = NSRCH
+        NDROP = 0
+        LNPIV(1:10) = 0
+        LPIV(1:10) = 0
+        MAPIV = 0
+        MANPIV = 0
+        IAVPIV = 0
+        IANPIV = 0
+        KOUNTL = 0
+        MINIRN = 0
+        MINICN = IDISP(1) - 1
+        MOREI = 0
+        IRANK = NN
+        IRNCP = 0
+        ICNCP = 0
+        IFLAG = 0
+!       Reset U if necessary.
+        U = MIN(U,UMAX)
+!       IBEG is the position of the next pivot row after elimination
+!       step using it.
+        U = MAX(U,ZERO)
+        IBEG = IDISP(1)
+!       IACTIV is the position of the first entry in the active part
+!       of A/ICN.
+        IACTIV = IDISP(2)
+!       NZROW is current number of non-zeros in active and unprocessed
+!       part of row file ICN.
+        NZROW = LICN - IACTIV + 1
+        MINICN = NZROW + MINICN
+
+!       Count the number of diagonal blocks and set up pointers to the
+!       beginnings of the rows. NUM is the number of diagonal blocks.
+        NUM = 1
+        IPTR(1) = IACTIV
+        IF (NN==1) GOTO 30
+        NNM1 = NN - 1
+        DO I = 1, NNM1
+          IF (IP(I)<0) NUM = NUM + 1
+          IPTR(I+1) = IPTR(I) + LENR(I)
+        END DO
+!       ILAST is the last row in the previous block.
+30      ILAST = 0
+
+! ***********************************************
+! ****    LU decomposition of block NBLOCK   ****
+! ***********************************************
+
+!       Each pass through this loop performs LU decomposition on one
+!       of the diagonal blocks.
+        DO 1070 NBLOCK = 1, NUM
+          ISTART = ILAST + 1
+          DO IROWS = ISTART, NN
+            IF (IP(IROWS)<0) GOTO 50
+          END DO
+          IROWS = NN
+50        ILAST = IROWS
+!         N is the number of rows in the current block.
+!         ISTART is the index of the first row in the current block.
+!         ILAST is the index of the last row in the current block.
+!         IACTIV is the position of the first entry in the block.
+!         ITOP is the position of the last entry in the block.
+          N = ILAST - ISTART + 1
+          IF (N/=1) GOTO 100
+
+!         Code for dealing WITH 1x1 block.
+          LENRL(ILAST) = 0
+          ISING = ISTART
+          IF (LENR(ILAST)/=0) GOTO 60
+!         Block is structurally singular.
+          IRANK = IRANK - 1
+          ISING = -ISING
+          IF (IFLAG/=2 .AND. IFLAG/=-5) IFLAG = 1
+          IF (.NOT.ABORT1) GOTO 90
+          IDISP(2) = IACTIV
+          IFLAG = -1
+          IF (LP/=0) WRITE (LP,90000)
+!         RETURN
+          GOTO 1190
+60        SCALE = ABS(A(IACTIV))
+          IF (ABS(SCALE)<=ZERO) GOTO 70
+          IF (LBIG) BIG = MAX(BIG,SCALE)
+          GOTO 80
+70        ISING = -ISING
+          IRANK = IRANK - 1
+          IPTR(ILAST) = 0
+          IF (IFLAG/=-5) IFLAG = 2
+          IF (.NOT.ABORT2) GOTO 80
+          IDISP(2) = IACTIV
+          IFLAG = -2
+          IF (LP/=0) WRITE (LP,90001)
+          GOTO 1190
+80        A(IBEG) = A(IACTIV)
+          ICN(IBEG) = ICN(IACTIV)
+          IACTIV = IACTIV + 1
+          IPTR(ISTART) = 0
+          IBEG = IBEG + 1
+          NZROW = NZROW - 1
+90        LASTR(ISTART) = ISTART
+          IPC(ISTART) = -ISING
+          GOTO 1070
+
+!         Non-trivial block.
+100       ITOP = LICN
+          IF (ILAST/=NN) ITOP = IPTR(ILAST+1) - 1
+
+!         Set up column oriented storage.
+          LENRL(ISTART:ILAST) = 0
+          LENC(ISTART:ILAST) = 0
+          IF (ITOP-IACTIV<LIRN) GOTO 120
+          MINIRN = ITOP - IACTIV + 1
+          PIVOT = ISTART - 1
+          GOTO 1170
+
+!         Calculate column counts.
+120       DO II = IACTIV, ITOP
+            I = ICN(II)
+            LENC(I) = LENC(I) + 1
+          END DO
+!         Set up column pointers so that IPC(J) points to position
+!         after end of column J in column file.
+          IPC(ILAST) = LIRN + 1
+          J1 = ISTART + 1
+          DO JJ = J1, ILAST
+            J = ILAST - JJ + J1 - 1
+            IPC(J) = IPC(J+1) - LENC(J+1)
+          END DO
+          DO 160 INDROW = ISTART, ILAST
+            J1 = IPTR(INDROW)
+            J2 = J1 + LENR(INDROW) - 1
+            IF (J1>J2) GOTO 160
+            DO JJ = J1, J2
+              J = ICN(JJ)
+              IPOS = IPC(J) - 1
+              IRN(IPOS) = INDROW
+              IPC(J) = IPOS
+            END DO
+160       END DO
+!         DISPC is the lowest indexed active location in the column file.
+          DISPC = IPC(ISTART)
+          NZCOL = LIRN - DISPC + 1
+          MINIRN = MAX(NZCOL,MINIRN)
+          NZMIN = 1
+
+!         Initialize array IFIRST. IFIRST(I) = +/- K indicates that
+!         row/col K has I non-zeros. If IFIRST(I) = 0, there is no
+!         row or column with I non-zeros.
+          IFIRST(1:N) = 0
+
+!         Compute ordering of row and column counts.
+!         First run through columns (from column N to column 1).
+          DO 190 JJ = ISTART, ILAST
+            J = ILAST - JJ + ISTART
+            NZ = LENC(J)
+            IF (NZ/=0) GOTO 180
+            IPC(J) = 0
+            GOTO 190
+180         IF (NSRCH<=NN) GOTO 190
+            ISW = IFIRST(NZ)
+            IFIRST(NZ) = -J
+            LASTC(J) = 0
+            NEXTC(J) = -ISW
+            ISW1 = IABS(ISW)
+            IF (ISW/=0) LASTC(ISW1) = J
+190       END DO
+!        Now run through rows (again from N to 1).
+          DO 220 II = ISTART, ILAST
+               I = ILAST - II + ISTART
+            NZ = LENR(I)
+            IF (NZ/=0) GOTO 200
+            IPTR(I) = 0
+            LASTR(I) = 0
+            GOTO 220
+200         ISW = IFIRST(NZ)
+            IFIRST(NZ) = I
+            IF (ISW>0) GOTO 210
+            NEXTR(I) = 0
+            LASTR(I) = ISW
+            GOTO 220
+210         NEXTR(I) = ISW
+            LASTR(I) = LASTR(ISW)
+            LASTR(ISW) = I
+220       END DO
+
+! **********************************************
+! ****    Start of main elimination loop    ****
+! **********************************************
+          DO 1050 PIVOT = ISTART, ILAST
+
+!           First find the pivot using MARKOWITZ criterion with
+!           stability control.
+!           JCOST is the Markowitz cost of the best pivot so far.
+!           This pivot is in row IPIV and column JPIV.
+            NZ2 = NZMIN
+            JCOST = N*N
+
+!           Examine rows/columns in order of ascending count.
+            DO L = 1, 2
+              PIVRAT = ZERO
+              ISRCH = 1
+              LL = L
+!             A pass with L equal to 2 is only performed in the
+!             case of singularity.
+              DO 340 NZ = NZ2, N
+                IF (JCOST<=(NZ-1)**2) GOTO 430
+                IJFIR = IFIRST(NZ)
+!               IF (IJFIR) 240, 230, 250
+!230            IF (LL==1) NZMIN = NZ + 1
+                IF (IJFIR < 0) GOTO 240
+                IF (IJFIR > 0) GOTO 250
+                IF (LL==1) NZMIN = NZ + 1
+                GOTO 340
+240             LL = 2
+                IJFIR = -IJFIR
+                GOTO 300
+250             LL = 2
+!               Scan rows with NZ non-zeros.
+                DO IDUMMY = 1, N
+                  IF (JCOST<=(NZ-1)**2) GOTO 430
+                  IF (ISRCH>MSRCH) GOTO 430
+                  IF (IJFIR==0) GOTO 290
+!                 Row IJFIR is now examined.
+                  I = IJFIR
+                  IJFIR = NEXTR(I)
+!                 First calculate multiplier threshold level.
+                  AMAX = ZERO
+                  J1 = IPTR(I) + LENRL(I)
+                  J2 = IPTR(I) + LENR(I) - 1
+                  DO JJ = J1, J2
+                    AMAX = MAX(AMAX,ABS(A(JJ)))
+                  END DO
+                  AU = AMAX*U
+                  ISRCH = ISRCH + 1
+!                 Scan row for possible pivots.
+                  DO 270 JJ = J1, J2
+                    IF (ABS(A(JJ))<=AU .AND. L==1) GOTO 270
+                    J = ICN(JJ)
+                    KCOST = (NZ-1)*(LENC(J)-1)
+                    IF (KCOST>JCOST) GOTO 270
+                    PIVR = ZERO
+                    IF (ABS(AMAX)>ZERO) PIVR = ABS(A(JJ))/AMAX
+                    IF (KCOST==JCOST .AND. (PIVR<=PIVRAT .OR. NSRCH>NN+1)) &
+                      GOTO 270
+!                   Best pivot so far is found.
+                    JCOST = KCOST
+                    IJPOS = JJ
+                    IPIV = I
+                    JPIV = J
+                    IF (MSRCH>NN+1 .AND. JCOST<=(NZ-1)**2) GOTO 430
+                    PIVRAT = PIVR
+270               END DO
+                END DO
+
+!               Columns with NZ non-zeros now examined.
+290             IJFIR = IFIRST(NZ)
+                IJFIR = -LASTR(IJFIR)
+300             IF (JCOST<=NZ*(NZ-1)) GOTO 430
+                IF (MSRCH<=NN) GOTO 340
+                DO 330 IDUMMY = 1, N
+                  IF (IJFIR==0) GOTO 340
+                  J = IJFIR
+                  IJFIR = NEXTC(IJFIR)
+                  I1 = IPC(J)
+                  I2 = I1 + NZ - 1
+!                 Scan column J.
+                  DO 320 II = I1, I2
+                    I = IRN(II)
+                    KCOST = (NZ-1)*(LENR(I)-LENRL(I)-1)
+                    IF (KCOST>=JCOST) GOTO 320
+!                   Pivot has best Markowitz count so far. Now
+!                   check its suitability on numeric grounds by
+!                   examining the other non-zeros in its row.
+                    J1 = IPTR(I) + LENRL(I)
+                    J2 = IPTR(I) + LENR(I) - 1
+!                   We need a stability check on singleton columns
+!                   because of possible problems with
+!                   underdetermined systems.
+                    AMAX = ZERO
+                    DO JJ = J1, J2
+                      AMAX = MAX(AMAX,ABS(A(JJ)))
+                      IF (ICN(JJ)==J) JPOS = JJ
+                    END DO
+                    IF (ABS(A(JPOS))<=AMAX*U .AND. L==1) GOTO 320
+                    JCOST = KCOST
+                    IPIV = I
+                    JPIV = J
+                    IJPOS = JPOS
+                    IF (ABS(AMAX)>ZERO) PIVRAT = ABS(A(JPOS))/AMAX
+                    IF (JCOST<=NZ*(NZ-1)) GOTO 430
+320               END DO
+330             END DO
+340           END DO
+!             In the event of singularity, we must make sure all
+!             rows and columns are tested.
+              MSRCH = N
+
+!             Matrix is numerically or structurally singular. Which
+!             it is will be diagnosed later.
+              IRANK = IRANK - 1
+            END DO
+!           Assign rest of rows and columns to ordering array.
+!           Matrix is structurally singular.
+            IF (IFLAG/=2 .AND. IFLAG/=-5) IFLAG = 1
+            IRANK = IRANK - ILAST + PIVOT + 1
+            IF (.NOT.ABORT1) GOTO 360
+            IDISP(2) = IACTIV
+            IFLAG = -1
+            IF (LP/=0) WRITE (LP,90000)
+            GOTO 1190
+360         K = PIVOT - 1
+            DO 400 I = ISTART, ILAST
+              IF (LASTR(I)/=0) GOTO 400
+              K = K + 1
+              LASTR(I) = K
+              IF (LENRL(I)==0) GOTO 390
+              MINICN = MAX(MINICN,NZROW+IBEG-1+MOREI+LENRL(I))
+              IF (IACTIV-IBEG>=LENRL(I)) GOTO 370
+              CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+!             Check now to see if MA30DD has created enough
+!             available space.
+              IF (IACTIV-IBEG>=LENRL(I)) GOTO 370
+!             Create more space by destroying previously created
+!             LU factors.
+              MOREI = MOREI + IBEG - IDISP(1)
+              IBEG = IDISP(1)
+              IF (LP/=0) WRITE (LP,90002)
+              IFLAG = -5
+              IF (ABORT3) GOTO 1160
+370           J1 = IPTR(I)
+              J2 = J1 + LENRL(I) - 1
+              IPTR(I) = 0
+              DO JJ = J1, J2
+                A(IBEG) = A(JJ)
+                ICN(IBEG) = ICN(JJ)
+                ICN(JJ) = 0
+                IBEG = IBEG + 1
+              END DO
+              NZROW = NZROW - LENRL(I)
+390           IF (K==ILAST) GOTO 410
+400         END DO
+410         K = PIVOT - 1
+            DO 420 I = ISTART, ILAST
+              IF (IPC(I)/=0) GOTO 420
+              K = K + 1
+              IPC(I) = K
+              IF (K==ILAST) GOTO 1060
+420         END DO
+
+!           The pivot has now been found in position (IPIV,JPIV)
+!           in location IJPOS in row file.
+!           Update column and row ordering arrays to correspond
+!           with removal of the active part of the matrix.
+430         ISING = PIVOT
+            IF (ABS(A(IJPOS))>ZERO) GOTO 440
+!           Numerical singularity is recorded here.
+            ISING = -ISING
+            IF (IFLAG/=-5) IFLAG = 2
+            IF (.NOT.ABORT2) GOTO 440
+            IDISP(2) = IACTIV
+            IFLAG = -2
+            IF (LP/=0) WRITE (LP,90001)
+            GOTO 1190
+440         OLDPIV = IPTR(IPIV) + LENRL(IPIV)
+            OLDEND = IPTR(IPIV) + LENR(IPIV) - 1
+!           Changes to column ordering.
+            IF (NSRCH<=NN) GOTO 470
+            COLUPD = NN + 1
+            LENPP = OLDEND - OLDPIV + 1
+            IF (LENPP<4) LPIV(1) = LPIV(1) + 1
+            IF (LENPP>=4 .AND. LENPP<=6) LPIV(2) = LPIV(2) + 1
+            IF (LENPP>=7 .AND. LENPP<=10) LPIV(3) = LPIV(3) + 1
+            IF (LENPP>=11 .AND. LENPP<=15) LPIV(4) = LPIV(4) + 1
+            IF (LENPP>=16 .AND. LENPP<=20) LPIV(5) = LPIV(5) + 1
+            IF (LENPP>=21 .AND. LENPP<=30) LPIV(6) = LPIV(6) + 1
+            IF (LENPP>=31 .AND. LENPP<=50) LPIV(7) = LPIV(7) + 1
+            IF (LENPP>=51 .AND. LENPP<=70) LPIV(8) = LPIV(8) + 1
+            IF (LENPP>=71 .AND. LENPP<=100) LPIV(9) = LPIV(9) + 1
+            IF (LENPP>=101) LPIV(10) = LPIV(10) + 1
+            MAPIV = MAX(MAPIV,LENPP)
+            IAVPIV = IAVPIV + LENPP
+            DO 460 JJ = OLDPIV, OLDEND
+              J = ICN(JJ)
+              LC = LASTC(J)
+              NC = NEXTC(J)
+              NEXTC(J) = -COLUPD
+              IF (JJ/=IJPOS) COLUPD = J
+              IF (NC/=0) LASTC(NC) = LC
+              IF (LC==0) GOTO 450
+              NEXTC(LC) = NC
+              GOTO 460
+450           NZ = LENC(J)
+              ISW = IFIRST(NZ)
+              IF (ISW>0) LASTR(ISW) = -NC
+              IF (ISW<0) IFIRST(NZ) = -NC
+460         END DO
+!           Changes to row ordering.
+470         I1 = IPC(JPIV)
+            I2 = I1 + LENC(JPIV) - 1
+            DO 490 II = I1, I2
+              I = IRN(II)
+              LR = LASTR(I)
+              NR = NEXTR(I)
+              IF (NR/=0) LASTR(NR) = LR
+              IF (LR<=0) GOTO 480
+              NEXTR(LR) = NR
+              GOTO 490
+480           NZ = LENR(I) - LENRL(I)
+              IF (NR/=0) IFIRST(NZ) = NR
+              IF (NR==0) IFIRST(NZ) = LR
+490         END DO
+
+!           Move pivot to position LENRL+1 in pivot row and move pivot
+!           row to the beginning of the available storage. The L part
+!           and the pivot in the old copy of the pivot row is nullified
+!           while, in the strictly upper triangular part, the column
+!           indices, J say, are overwritten by the corresponding entry
+!           of IQ (IQ(J)) and IQ(J) is set to the negative of the
+!           displacement of the column index from the pivot entry.
+            IF (OLDPIV==IJPOS) GOTO 500
+            AU = A(OLDPIV)
+            A(OLDPIV) = A(IJPOS)
+            A(IJPOS) = AU
+            ICN(IJPOS) = ICN(OLDPIV)
+            ICN(OLDPIV) = JPIV
+!           Check to see if there is space immediately available in
+!           A/ICN to hold new copy of pivot row.
+500         MINICN = MAX(MINICN,NZROW+IBEG-1+MOREI+LENR(IPIV))
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+            CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+            OLDPIV = IPTR(IPIV) + LENRL(IPIV)
+            OLDEND = IPTR(IPIV) + LENR(IPIV) - 1
+!           Check now to see if MA30DD has created enough
+!           available space.
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+!           Create more space by destroying previously created
+!           LU factors.
+            MOREI = MOREI + IBEG - IDISP(1)
+            IBEG = IDISP(1)
+            IF (LP/=0) WRITE (LP,90002)
+            IFLAG = -5
+            IF (ABORT3) GOTO 1160
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+!           There is still not enough room in A/ICN.
+            IFLAG = -4
+            GOTO 1160
+!           Copy pivot row and set up IQ array.
+510         IJPOS = 0
+            J1 = IPTR(IPIV)
+
+            DO JJ = J1, OLDEND
+              A(IBEG) = A(JJ)
+              ICN(IBEG) = ICN(JJ)
+              IF (IJPOS/=0) GOTO 520
+              IF (ICN(JJ)==JPIV) IJPOS = IBEG
+              ICN(JJ) = 0
+              GOTO 530
+520           K = IBEG - IJPOS
+              J = ICN(JJ)
+              ICN(JJ) = IQ(J)
+              IQ(J) = -K
+530           IBEG = IBEG + 1
+            END DO
+
+            IJP1 = IJPOS + 1
+            PIVEND = IBEG - 1
+            LENPIV = PIVEND - IJPOS
+            NZROW = NZROW - LENRL(IPIV) - 1
+            IPTR(IPIV) = OLDPIV + 1
+            IF (LENPIV==0) IPTR(IPIV) = 0
+
+!           Remove pivot row (including pivot) from column
+!           oriented file.
+            DO JJ = IJPOS, PIVEND
+              J = ICN(JJ)
+              I1 = IPC(J)
+              LENC(J) = LENC(J) - 1
+!             I2 is last position in new column.
+              I2 = IPC(J) + LENC(J) - 1
+              IF (I2<I1) GOTO 560
+              DO 550 II = I1, I2
+                IF (IRN(II)/=IPIV) GOTO 550
+                IRN(II) = IRN(I2+1)
+                GOTO 560
+550           END DO
+560           IRN(I2+1) = 0
+            END DO
+            NZCOL = NZCOL - LENPIV - 1
+
+!           Go down the pivot column and for each row with a
+!           non-zero add the appropriate multiple of the pivot
+!           row to it. We loop on the number of non-zeros in
+!           the pivot column since MA30DD may change its
+!           actual position.
+
+            NZPC = LENC(JPIV)
+            IF (NZPC==0) GOTO 940
+            DO 880 III = 1, NZPC
+              II = IPC(JPIV) + III - 1
+              I = IRN(II)
+!             Search row I For non-zero to be eliminated,
+!             calculate multiplier, and place it in position
+!             LENRL+1 in its row. IDROP is the number of
+!             non-zero entries dropped from row I because
+!             these fall beneath tolerance level.
+              IDROP = 0
+              J1 = IPTR(I) + LENRL(I)
+              IEND = IPTR(I) + LENR(I) - 1
+              DO 580 JJ = J1, IEND
+                IF (ICN(JJ)/=JPIV) GOTO 580
+!               IF pivot is zero, rest of column is and so
+!               multiplier is zero.
+                AU = ZERO
+                IF (ABS(A(IJPOS))>ZERO) AU = -A(JJ)/A(IJPOS)
+                IF (LBIG) BIG = MAX(BIG,ABS(AU))
+                A(JJ) = A(J1)
+                A(J1) = AU
+                ICN(JJ) = ICN(J1)
+                ICN(J1) = JPIV
+                LENRL(I) = LENRL(I) + 1
+                GOTO 590
+580           END DO
+!             JUMP if pivot row is a singleton.
+590           IF (LENPIV==0) GOTO 880
+!             Now perform necessary operations on rest of non-pivot
+!             row I.
+              ROWI = J1 + 1
+              IOP = 0
+!             Jump if all the pivot row causes fill-in.
+              IF (ROWI>IEND) GOTO 670
+!             Perform operations on current non-zeros in row I.
+!             Innermost loop.
+              LENPP = IEND - ROWI + 1
+              IF (LENPP<4) LNPIV(1) = LNPIV(1) + 1
+              IF (LENPP>=4 .AND. LENPP<=6) LNPIV(2) = LNPIV(2) + 1
+              IF (LENPP>=7 .AND. LENPP<=10) LNPIV(3) = LNPIV(3) + 1
+              IF (LENPP>=11 .AND. LENPP<=15) LNPIV(4) = LNPIV(4) + 1
+              IF (LENPP>=16 .AND. LENPP<=20) LNPIV(5) = LNPIV(5) + 1
+              IF (LENPP>=21 .AND. LENPP<=30) LNPIV(6) = LNPIV(6) + 1
+              IF (LENPP>=31 .AND. LENPP<=50) LNPIV(7) = LNPIV(7) + 1
+              IF (LENPP>=51 .AND. LENPP<=70) LNPIV(8) = LNPIV(8) + 1
+              IF (LENPP>=71 .AND. LENPP<=100) LNPIV(9) = LNPIV(9) + 1
+              IF (LENPP>=101) LNPIV(10) = LNPIV(10) + 1
+              MANPIV = MAX(MANPIV,LENPP)
+              IANPIV = IANPIV + LENPP
+              KOUNTL = KOUNTL + 1
+              DO 600 JJ = ROWI, IEND
+                J = ICN(JJ)
+                IF (IQ(J)>0) GOTO 600
+                IOP = IOP + 1
+                PIVROW = IJPOS - IQ(J)
+                A(JJ) = A(JJ) + AU*A(PIVROW)
+                IF (LBIG) BIG = MAX(ABS(A(JJ)),BIG)
+                ICN(PIVROW) = -ICN(PIVROW)
+                IF (ABS(A(JJ))<TOL) IDROP = IDROP + 1
+600           END DO
+
+!             JUMP if no non-zeros in non-pivot row have been removed
+!             because these are beneath the drop-tolerance TOL.
+
+              IF (IDROP==0) GOTO 670
+
+!             Run through non-pivot row compressing row so that only
+!             non-zeros greater than TOL are stored. All non-zeros
+!             less than TOL are also removed from the column structure.
+
+              JNEW = ROWI
+              DO 650 JJ = ROWI, IEND
+                IF (ABS(A(JJ))<TOL) GOTO 610
+                A(JNEW) = A(JJ)
+                ICN(JNEW) = ICN(JJ)
+                JNEW = JNEW + 1
+                GOTO 650
+
+!               Remove non-zero entry from column structure.
+
+610             J = ICN(JJ)
+                I1 = IPC(J)
+                I2 = I1 + LENC(J) - 1
+                DO II = I1, I2
+                  IF (IRN(II)==I) GOTO 630
+                END DO
+630             IRN(II) = IRN(I2)
+                IRN(I2) = 0
+                LENC(J) = LENC(J) - 1
+                IF (NSRCH<=NN) GOTO 650
+!               Remove column from column chain and place in
+!               update chain.
+                IF (NEXTC(J)<0) GOTO 650
+!               JUMP if column already in update chain.
+                LC = LASTC(J)
+                NC = NEXTC(J)
+                NEXTC(J) = -COLUPD
+                COLUPD = J
+                IF (NC/=0) LASTC(NC) = LC
+                IF (LC==0) GOTO 640
+                NEXTC(LC) = NC
+                GOTO 650
+640             NZ = LENC(J) + 1
+                ISW = IFIRST(NZ)
+                IF (ISW>0) LASTR(ISW) = -NC
+                IF (ISW<0) IFIRST(NZ) = -NC
+650           END DO
+              ICN(JNEW:IEND) = 0
+!             The value of IDROP might be different from that
+!             calculated earlier because we may now have dropped
+!             some non-zeros which were not modified by the pivot
+!             row.
+              IDROP = IEND + 1 - JNEW
+              IEND = JNEW - 1
+              LENR(I) = LENR(I) - IDROP
+              NZROW = NZROW - IDROP
+              NZCOL = NZCOL - IDROP
+              NDROP = NDROP + IDROP
+670           IFILL = LENPIV - IOP
+!             Jump is if there is no fill-in.
+              IF (IFILL==0) GOTO 770
+!             Now for the fill-in.
+              MINICN = MAX(MINICN,MOREI+IBEG-1+NZROW+IFILL+LENR(I))
+!             See if there is room for fill-in.
+!             Get maximum space for row I in situ.
+              DO JDIFF = 1, IFILL
+                JNPOS = IEND + JDIFF
+                IF (JNPOS>LICN) GOTO 690
+                IF (ICN(JNPOS)/=0) GOTO 690
+              END DO
+!             There is room for all the fill-in after the end of the
+!             row so it can be left in situ.
+!             Next available space for fill-in.
+              IEND = IEND + 1
+              GOTO 770
+!             JMORE spaces for fill-in are required in front of row.
+690           JMORE = IFILL - JDIFF + 1
+              I1 = IPTR(I)
+!             We now look in front of the row to see if there is space
+!             for the rest of the fill-in.
+              DO JDIFF = 1, JMORE
+                JNPOS = I1 - JDIFF
+                IF (JNPOS<IACTIV) GOTO 710
+                IF (ICN(JNPOS)/=0) GOTO 720
+              END DO
+710           JNPOS = I1 - JMORE
+              GOTO 730
+!             Whole row must be moved to the beginning of available
+!             storage.
+720           JNPOS = IACTIV - LENR(I) - IFILL
+!             Jump if there is space immediately available for the
+!             shifted row.
+730           IF (JNPOS>=IBEG) GOTO 750
+              CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+              I1 = IPTR(I)
+              IEND = I1 + LENR(I) - 1
+              JNPOS = IACTIV - LENR(I) - IFILL
+              IF (JNPOS>=IBEG) GOTO 750
+!             No space available so try to create some by throwing
+!             away previous LU decomposition.
+              MOREI = MOREI + IBEG - IDISP(1) - LENPIV - 1
+              IF (LP/=0) WRITE (LP,90002)
+              IFLAG = -5
+              IF (ABORT3) GOTO 1160
+!             Keep record of current pivot row.
+              IBEG = IDISP(1)
+              ICN(IBEG) = JPIV
+              A(IBEG) = A(IJPOS)
+              IJPOS = IBEG
+              DO JJ = IJP1, PIVEND
+                IBEG = IBEG + 1
+                A(IBEG) = A(JJ)
+                ICN(IBEG) = ICN(JJ)
+              END DO
+              IJP1 = IJPOS + 1
+              PIVEND = IBEG
+              IBEG = IBEG + 1
+              IF (JNPOS>=IBEG) GOTO 750
+!             This still does not give enough room.
+              IFLAG = -4
+              GOTO 1160
+750           IACTIV = MIN(IACTIV,JNPOS)
+!             Move non-pivot row I.
+              IPTR(I) = JNPOS
+              DO JJ = I1, IEND
+                A(JNPOS) = A(JJ)
+                ICN(JNPOS) = ICN(JJ)
+                JNPOS = JNPOS + 1
+                ICN(JJ) = 0
+              END DO
+!             First new available space.
+              IEND = JNPOS
+770           NZROW = NZROW + IFILL
+!             Innermost fill-in loop which also resets ICN.
+              IDROP = 0
+              DO 850 JJ = IJP1, PIVEND
+                J = ICN(JJ)
+                IF (J<0) GOTO 840
+                ANEW = AU*A(JJ)
+                AANEW = ABS(ANEW)
+                IF (AANEW>=TOL) GOTO 780
+                IDROP = IDROP + 1
+                NDROP = NDROP + 1
+                NZROW = NZROW - 1
+                MINICN = MINICN - 1
+                IFILL = IFILL - 1
+                GOTO 850
+780             IF (LBIG) BIG = MAX(AANEW,BIG)
+                A(IEND) = ANEW
+                ICN(IEND) = J
+                IEND = IEND + 1
+
+!               Put new entry in column file.
+                MINIRN = MAX(MINIRN,NZCOL+LENC(J)+1)
+                JEND = IPC(J) + LENC(J)
+                JROOM = NZPC - III + 1 + LENC(J)
+                IF (JEND>LIRN) GOTO 790
+                IF (IRN(JEND)==0) GOTO 830
+790             IF (JROOM<DISPC) GOTO 800
+!               Compress column file to obtain space for new
+!               copy of column.
+                CALL MA30DD(A,IRN,IPC(ISTART),N,DISPC,LIRN,.FALSE.)
+                IF (JROOM<DISPC) GOTO 800
+                JROOM = DISPC - 1
+                IF (JROOM>=LENC(J)+1) GOTO 800
+!               Column file is not large enough.
+                GOTO 1170
+!               Copy column to beginning of file.
+800             JBEG = IPC(J)
+                JEND = IPC(J) + LENC(J) - 1
+                JZERO = DISPC - 1
+                DISPC = DISPC - JROOM
+                IDISPC = DISPC
+                DO II = JBEG, JEND
+                  IRN(IDISPC) = IRN(II)
+                  IRN(II) = 0
+                  IDISPC = IDISPC + 1
+                END DO
+                IPC(J) = DISPC
+                JEND = IDISPC
+                IRN(JEND:JZERO) = 0
+830             IRN(JEND) = I
+                NZCOL = NZCOL + 1
+                LENC(J) = LENC(J) + 1
+!               End of adjustment to column file.
+                GOTO 850
+840             ICN(JJ) = -J
+850           END DO
+              IF (IDROP==0) GOTO 870
+              DO KDROP = 1, IDROP
+                ICN(IEND) = 0
+                IEND = IEND + 1
+              END DO
+870           LENR(I) = LENR(I) + IFILL
+!             End of scan of pivot column.
+880         END DO
+
+!           Remove pivot column from column oriented storage
+!           and update row ordering arrays.
+            I1 = IPC(JPIV)
+            I2 = IPC(JPIV) + LENC(JPIV) - 1
+            NZCOL = NZCOL - LENC(JPIV)
+            DO 930 II = I1, I2
+              I = IRN(II)
+              IRN(II) = 0
+              NZ = LENR(I) - LENRL(I)
+              IF (NZ/=0) GOTO 890
+              LASTR(I) = 0
+              GOTO 930
+890           IFIR = IFIRST(NZ)
+              IFIRST(NZ) = I
+!             IF (IFIR) 900, 920, 910
+!900          LASTR(I) = IFIR
+              IF (IFIR == 0) GOTO 920
+              IF (IFIR > 0) GOTO 910
+              LASTR(I) = IFIR
+              NEXTR(I) = 0
+              GOTO 930
+910           LASTR(I) = LASTR(IFIR)
+              NEXTR(I) = IFIR
+              LASTR(IFIR) = I
+              GOTO 930
+920           LASTR(I) = 0
+              NEXTR(I) = 0
+              NZMIN = MIN(NZMIN,NZ)
+930         END DO
+!           Restore IQ and nullify U part of old pivot row.
+!           Record the column permutation in LASTC(JPIV) and
+!           the row permutation in LASTR(IPIV).
+940         IPC(JPIV) = -ISING
+            LASTR(IPIV) = PIVOT
+            IF (LENPIV==0) GOTO 1050
+            NZROW = NZROW - LENPIV
+            JVAL = IJP1
+            JZER = IPTR(IPIV)
+            IPTR(IPIV) = 0
+            DO JCOUNT = 1, LENPIV
+              J = ICN(JVAL)
+              IQ(J) = ICN(JZER)
+              ICN(JZER) = 0
+              JVAL = JVAL + 1
+              JZER = JZER + 1
+            END DO
+!           Adjust column ordering arrays.
+            IF (NSRCH>NN) GOTO 980
+            DO 970 JJ = IJP1, PIVEND
+              J = ICN(JJ)
+              NZ = LENC(J)
+              IF (NZ/=0) GOTO 960
+              IPC(J) = 0
+              GOTO 970
+960           NZMIN = MIN(NZMIN,NZ)
+970         END DO
+            GOTO 1050
+980         JJ = COLUPD
+            DO 1040 JDUMMY = 1, NN
+              J = JJ
+              IF (J==NN+1) GOTO 1050
+              JJ = -NEXTC(J)
+              NZ = LENC(J)
+              IF (NZ/=0) GOTO 990
+              IPC(J) = 0
+              GOTO 1040
+990           IFIR = IFIRST(NZ)
+              LASTC(J) = 0
+!             IF (IFIR) 1000, 1010, 1020
+!1000         IFIRST(NZ) = -J
+              IF (IFIR == 0) GOTO 1010
+              IF (IFIR > 0) GOTO 1020
+              IFIRST(NZ) = -J
+              IFIR = -IFIR
+              LASTC(IFIR) = J
+              NEXTC(J) = IFIR
+              GOTO 1040
+1010          IFIRST(NZ) = -J
+              NEXTC(J) = 0
+              GOTO 1030
+1020          LC = -LASTR(IFIR)
+              LASTR(IFIR) = -J
+              NEXTC(J) = LC
+              IF (LC/=0) LASTC(LC) = J
+1030          NZMIN = MIN(NZMIN,NZ)
+1040        END DO
+1050      END DO
+! ********************************************
+! ****    End of main elimination loop    ****
+! ********************************************
+
+!         Reset IACTIV to point to the beginning of the
+!         next block.
+1060      IF (ILAST/=NN) IACTIV = IPTR(ILAST+1)
+1070    END DO
+
+! ********************************************
+! ****    End of deomposition of block    ****
+! ********************************************
+
+!     Record singularity (if any) in IQ array.
+        IF (IRANK==NN) GOTO 1090
+        DO 1080 I = 1, NN
+          IF (IPC(I)<0) GOTO 1080
+          ISING = IPC(I)
+          IQ(ISING) = -IQ(ISING)
+          IPC(I) = -ISING
+1080    END DO
+
+!       Run through LU decomposition changing column indices
+!       to that of new order and permuting LENR and LENRL
+!       arrays according to pivot permutations.
+1090    ISTART = IDISP(1)
+        IEND = IBEG - 1
+        IF (IEND<ISTART) GOTO 1110
+        DO JJ = ISTART, IEND
+          JOLD = ICN(JJ)
+          ICN(JJ) = -IPC(JOLD)
+        END DO
+1110    DO II = 1, NN
+          I = LASTR(II)
+          NEXTR(I) = LENR(II)
+          IPTR(I) = LENRL(II)
+        END DO
+        LENRL(1:NN) = IPTR(1:NN)
+        LENR(1:NN) = NEXTR(1:NN)
+
+!       Update permutation arrays IP and IQ.
+        DO II = 1, NN
+          I = LASTR(II)
+          J = -IPC(II)
+          NEXTR(I) = IABS(IP(II)+0)
+          IPTR(J) = IABS(IQ(II)+0)
+!         NEXTR(I) = IABS(IP(II))
+!         IPTR(J) = IABS(IQ(II))
+        END DO
+        DO I = 1, NN
+          IF (IP(I)<0) NEXTR(I) = -NEXTR(I)
+          IP(I) = NEXTR(I)
+          IF (IQ(I)<0) IPTR(I) = -IPTR(I)
+          IQ(I) = IPTR(I)
+        END DO
+        IP(NN) = IABS(IP(NN)+0)
+!       IP(NN) = IABS(IP(NN))
+        IDISP(2) = IEND
+        GOTO 1190
+
+!       Error returns
+1160    IDISP(2) = IACTIV
+        IF (LP==0) GOTO 1190
+        WRITE (LP,90003)
+        GOTO 1180
+1170    IF (IFLAG==-5) IFLAG = -6
+        IF (IFLAG/=-6) IFLAG = -3
+        IDISP(2) = IACTIV
+        IF (LP==0) GOTO 1190
+        IF (IFLAG==-3) WRITE (LP,90004)
+        IF (IFLAG==-6) WRITE (LP,90005)
+1180    PIVOT = PIVOT - ISTART + 1
+        WRITE (LP,90006) PIVOT, NBLOCK, ISTART, ILAST
+        IF (PIVOT==0) WRITE (LP,90007) MINIRN
+
+1190    RETURN
+90000   FORMAT (' Error return from MA30AD because matrix is', &
+          ' structurally singular')
+90001   FORMAT (' Error return from MA30AD because matrix is', &
+          ' numerically singular')
+90002   FORMAT (' LU decomposition destroyed to create more space')
+90003   FORMAT (' Error return from MA30AD because LICN is not big enough')
+90004   FORMAT (' Error return from MA30AD because LIRN is not big enough')
+90005   FORMAT (' Error return from MA30AD LIRN and LICN are too small')
+90006   FORMAT (' At stage ',I5,' in block ',I5,' with first row ',I5, &
+          ' and last row ',I5)
+90007   FORMAT (' To continue set LIRN to at least ',I8)
+
+      END SUBROUTINE MA30AD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30DD(A,ICN,IPTR,N,IACTIV,ITOP,REALS)
+! ..
+! This subroutine performs garbage collection operations on the arrays
+! A, ICN, and IRN.
+! ..
+! IACTIV is the first position in arrays A/ICN from which the compress
+! starts. On exit, IACTIV equals the position of the first entry.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IACTIV, ITOP, N
+        LOGICAL :: REALS
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(ITOP)
+        INTEGER :: ICN(ITOP), IPTR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, JPOS, K, KL, KN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30DD
+! ..
+        IF (REALS) ICNCP = ICNCP + 1
+        IF (.NOT.REALS) IRNCP = IRNCP + 1
+!       Set the first non-zero entry in each row to the negative of the
+!       row/col number and hold this row/col index in the row/col
+!       pointer. This is so that the beginning of each row/col can
+!       be recognized in the subsequent scan.
+        DO 10 J = 1, N
+          K = IPTR(J)
+          IF (K<IACTIV) GOTO 10
+          IPTR(J) = ICN(K)
+          ICN(K) = -J
+10      END DO
+        KN = ITOP + 1
+        KL = ITOP - IACTIV + 1
+!       Go through arrays in reverse order compressing to the back so
+!       that there are no zeros held in positions IACTIV to ITOP in ICN.
+!       Reset first entry of each row/col and pointer array IPTR.
+        DO 30 K = 1, KL
+          JPOS = ITOP - K + 1
+          IF (ICN(JPOS)==0) GOTO 30
+          KN = KN - 1
+          IF (REALS) A(KN) = A(JPOS)
+          IF (ICN(JPOS)>=0) GOTO 20
+!         First non-zero of row/col has been located.
+          J = -ICN(JPOS)
+          ICN(JPOS) = IPTR(J)
+          IPTR(J) = KN
+20        ICN(KN) = ICN(JPOS)
+30      END DO
+        IACTIV = KN
+        RETURN
+
+      END SUBROUTINE MA30DD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30BD(N,ICN,A,LICN,LENR,LENRL,IDISP,IP,IQ,W,IW,IFLAG)
+! ..
+! MA30BD performs the LU decomposition of the diagonal blocks of
+! a new matrix PAQ of the same sparsity pattern, using information
+! from a previous call to MA30AD. THe entries of the input matrix
+! must already be in their final positions in the LU decomposition
+! structure. This routine executes about five times faster than
+! MA30AD.
+! ..
+! We now describe the argument list for MA30BD. Consult MA30AD for
+!     further information on these parameters.
+! N   is an integer variable set to the order of the matrix.
+! ICN is an integer array of length LICN. It should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30BD.
+! A   is a real(kind=wp) array of length LICN. The user must set
+!     entries IDISP(1) to IDISP(2) to contain the entries in the
+!     diagonal blocks of the matrix PAQ whose column numbers are
+!     held in ICN, using corresponding positions. Note that some
+!     zeros may need to be held explicitly. On output entries
+!     IDISP(1) to IDISP(2) of array A contain the LU decomposition
+!     of the diagonal blocks of PAQ. Entries A(1) to A(IDISP(1)-1)
+!     are neither required nor altered by MA30BD.
+! LICN is an integer variable which must be set by the user to the
+!     length of arrays A and ICN. it is not altered by MA30BD.
+! LENR, LENRL are integer arrays of length N. They should be
+!     unchanged since the last call to MA30AD. They are not
+!     altered by MA30BD.
+! IDISP is an integer array of length 2. It should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30BD.
+! IP, IQ are integer arrays of length N. They should be unchanged
+!     since the last call to MA30AD. They are not altered by
+!     MA30BD.
+! W   is a REAL(KIND=WP) array of length N which is used as
+!     workspace by MA30BD.
+! IW  is an integer array of length N which is used as workspace
+!     by MA30BD.
+! IFLAG is an integer variable. On output from MA30BD, IFLAG has
+!     the value zero if the factorization was successful, has the
+!     value I if pivot I was very small and has the value -I if
+!     an unexpected singularity was detected at stage I of the
+!     decomposition.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IFLAG, LICN, N
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), IW(N), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AU, ROWMAX
+        INTEGER :: I, IFIN, ILEND, IPIVJ, ISING, ISTART, J, JAY, JAYJAY, JFIN, &
+          JJ, PIVPOS
+        LOGICAL :: STAB
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30BD
+! ..
+        STAB = EPS <= ONE
+        RMIN = EPS
+        ISING = 0
+        IFLAG = 0
+        W(1:N) = ZERO
+!       Set up pointers to the beginning of the rows.
+        IW(1) = IDISP(1)
+        IF (N==1) GOTO 30
+        DO I = 2, N
+          IW(I) = IW(I-1) + LENR(I-1)
+        END DO
+
+!       Start of main loop.
+!       At step I, row I of A is transformed to row I of LU by
+!       adding appropriate multiples of rows 1 TO I-1 using row
+!       Gauss elimination.
+30      DO 170 I = 1, N
+!         ISTART is beginning of row I of A and row I of L.
+          ISTART = IW(I)
+!         IFIN is end of row I of A and row I of U.
+          IFIN = ISTART + LENR(I) - 1
+!         ILEND is end of row I of L.
+          ILEND = ISTART + LENRL(I) - 1
+          IF (ISTART>ILEND) GOTO 100
+!         Load row I of A into vector W.
+          DO JJ = ISTART, IFIN
+            J = ICN(JJ)
+            W(J) = A(JJ)
+          END DO
+
+!         Add multiples of appropriate rows of I to I-1 to row I.
+          DO 80 JJ = ISTART, ILEND
+            J = ICN(JJ)
+!           IPIVJ is position of pivot in row J.
+            IPIVJ = IW(J) + LENRL(J)
+!           Form multiplier AU.
+            AU = -W(J)/A(IPIVJ)
+            IF (LBIG) BIG = MAX(ABS(AU),BIG)
+            W(J) = AU
+!           AU * ROW J (U part) is added to row I.
+            IPIVJ = IPIVJ + 1
+            JFIN = IW(J) + LENR(J) - 1
+            IF (IPIVJ>JFIN) GOTO 80
+!           Innermost loop.
+            IF (LBIG) GOTO 60
+            DO JAYJAY = IPIVJ, JFIN
+              JAY = ICN(JAYJAY)
+              W(JAY) = W(JAY) + AU*A(JAYJAY)
+            END DO
+            GOTO 80
+60          DO JAYJAY = IPIVJ, JFIN
+              JAY = ICN(JAYJAY)
+              W(JAY) = W(JAY) + AU*A(JAYJAY)
+              BIG = MAX(ABS(W(JAY)),BIG)
+            END DO
+80        END DO
+
+!         Reload W back into A (now LU).
+          DO JJ = ISTART, IFIN
+            J = ICN(JJ)
+            A(JJ) = W(J)
+            W(J) = ZERO
+          END DO
+!         We now perform the stability checks.
+100       PIVPOS = ILEND + 1
+          IF (IQ(I)>0) GOTO 150
+!         Matrix had singularity at this point in MA30AD.
+!         Is it the first such pivot in current block?
+          IF (ISING==0) ISING = I
+!         Does current matrix have a singularity in the same place?
+          IF (PIVPOS>IFIN) GOTO 110
+          IF (ABS(A(PIVPOS))>ZERO) GOTO 180
+!         It does, so set ising if it is not the end of the current
+!         block. Check to see that appropriate part of LU is zero
+!         or null.
+110       IF (ISTART>IFIN) GOTO 130
+          DO 120 JJ = ISTART, IFIN
+            IF (ICN(JJ)<ISING) GOTO 120
+            IF (ABS(A(JJ))>ZERO) GOTO 180
+120       END DO
+130       IF (PIVPOS<=IFIN) A(PIVPOS) = ONE
+          IF (IP(I)>0 .AND. I/=N) GOTO 170
+!         End of current block. Reset zero pivots and ISING.
+          DO 140 J = ISING, I
+            IF ((LENR(J)-LENRL(J))==0) GOTO 140
+            JJ = IW(J) + LENRL(J)
+            A(JJ) = ZERO
+140       END DO
+          ISING = 0
+          GOTO 170
+!         Matrix had non-zero pivot in MA30AD at this stage.
+150       IF (PIVPOS>IFIN) GOTO 180
+          IF (ABS(A(PIVPOS))<=ZERO) GOTO 180
+          IF (.NOT.STAB) GOTO 170
+          ROWMAX = ZERO
+          DO JJ = PIVPOS, IFIN
+            ROWMAX = MAX(ROWMAX,ABS(A(JJ)))
+          END DO
+          IF (ABS(A(PIVPOS))/ROWMAX>=RMIN) GOTO 170
+          IFLAG = I
+          RMIN = ABS(A(PIVPOS))/ROWMAX
+!         End of main loop.
+170     END DO
+
+        GOTO 190
+!       Error return
+180     IF (LP/=0) WRITE (LP,90000) I
+        IFLAG = -I
+
+190     RETURN
+90000   FORMAT (' Error return from MA30BD; Singularity detected in',' row', &
+          I8)
+
+      END SUBROUTINE MA30BD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30CD(N,ICN,A,LICN,LENR,LENRL,LENOFF,IDISP,IP,IQ,X, &
+        W,MTYPE)
+! ..
+! MA30CD uses the factors produced by MA30AD or MA30BD to solve
+! AX = B or A TRANSPOSE X = B when the matrix P1*A*Q1(PAQ) is
+! block lower triangular (including the case of only one diagonal
+! block).
+! ..
+! We now describe the argument list for MA30CD.
+! N   is an integer variable set to the order of the matrix. It is
+!     not altered by the subroutine.
+! ICN is an integer array of length LICN. Entries IDISP(1) to
+!     IDISP(2) should be unchanged since the last call to MA30AD. If
+!     the matrix has more than one diagonal block, then column indices
+!     corresponding to non-zeros in sub-diagonal blocks of PAQ must
+!     appear in positions 1 to IDISP(1)-1. For the same row those
+!     entries must be contiguous, with those in row I preceding those
+!     in row I+1 (I=1,...,N-1) and no wasted space between rows.
+!     Entries may be in any order within each row. It is not altered
+!     by MA30CD.
+! A   is a REAL(KIND=WP) array of length LICN. Entries IDISP(1) to
+!     IDISP(2) should be unchanged since the last call to MA30AD or
+!     MA30BD. If the matrix has more than one diagonal block, then
+!     the values of the non-zeros in sub-diagonal blocks must be in
+!     positions 1 to IDISP(1)-1 in the order given by ICN. It is not
+!     altered by MA30CD.
+! LICN is an integer variable set to the size of arrays ICN and A.
+!     It is not altered by MA30CD.
+! LENR, LENRL are integer arrays of length N which should be
+!     unchanged since the last call to MA30AD. They are not
+!     altered by MA30CD.
+! LENOFF is an integer array of length N. If the matrix PAQ (or
+!     P1*A*Q1) has more than one diagonal block, then LENOFF(I),
+!     I=1,...,N should be set to the number of non-zeros in row I of
+!     the matrix PAQ which are in sub-diagonal blocks. If there is
+!     only one diagonal block then LENOFF(1) may be set TO -1, in
+!     which case the other entries of LENOFF are never accessed.
+!     It is not altered by ma30cd.
+! IDISP is an integer array of length 2 which should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30CD.
+! IP, IQ are integer arrays of length N which should be unchanged
+!     since the last call to MA30AD. They are not altered by
+!     MA30CD.
+! X   is a REAL(KIND=WP) array of length N. It must be set by the
+!     user to the values of the right hand side vector B for the
+!     equations being solved. ON exit from MA30CD it will be equal
+!     to the solution X required.
+! W   is a REAL(KIND=WP) array of length N which is used as
+!     workspace by MA30CD.
+! MTYPE is an integer variable which must be set by the user. If
+!     MTYPE = 1, then the solution to the system AX = B is returned.
+!     Any other value for mtype will return the solution to the
+!     system A TRANSPOSE X = B. It is not altered by MA30CD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, MTYPE, N
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), W(N), X(N)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), LENOFF(N), LENR(N), &
+          LENRL(N)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: WI, WII
+        INTEGER :: I, IB, IBACK, IBLEND, IBLOCK, IEND, IFIRST, II, III,   &
+          ILAST, J, J1, J2, J3, JJ, JPIV, JPIVP1, K, LJ1, LJ2, LT, LTEND, &
+          NUMBLK
+        LOGICAL :: NEG, NOBLOC
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30CD
+! ..
+!       The final value of RESID is the maximum residual for an
+!       inconsistent set of equations.
+        RESID = ZERO
+!       NOBLOC is .TRUE. if subroutine block has been used
+!       previously and is .FALSE. otherwise. The value .FALSE.
+!       means that LENOFF will not be subsequently accessed.
+        NOBLOC = LENOFF(1) < 0
+        IF (MTYPE/=1) GOTO 140
+
+!       We now solve  A * X = B.
+!       NEG is used to indicate when the last row in a block
+!       has been reached. It is then set to .TRUE. whereafter
+!       back substitution is performed on the block.
+        NEG = .FALSE.
+!       IP(N) is negated so that the last row of the last
+!       block can be recognised. It is reset to its positive
+!       value on exit.
+        IP(N) = -IP(N)
+!       Preorder VECTOR ... W(I) = X(IP(I))
+        DO II = 1, N
+          I = IP(II)
+          I = IABS(I)
+          W(II) = X(I)
+        END DO
+!       LT holds the position of the first non-zero in the current
+!       row of the off-diagonal blocks.
+        LT = 1
+!       IFIRST holds the index of the first row in the current block.
+        IFIRST = 1
+!       IBLOCK holds the position of the first non-zero in the current
+!       row of the LU decomposition of the diagonal blocks.
+        IBLOCK = IDISP(1)
+!       If I is not the last row of a block, then a pass through this
+!       loop adds the inner product of row I of the off-diagonal blocks
+!       and W to W and performs forward elimination using row I of the
+!       LU decomposition. If I is the last row of a block then, after
+!       performing these aforementioned operations, back substitution
+!       is performed using the rows of the block.
+        DO 120 I = 1, N
+          WI = W(I)
+          IF (NOBLOC) GOTO 30
+          IF (LENOFF(I)==0) GOTO 30
+!         Operations using lower triangular blocks.
+!         LTEND is the end of row I in the off-diagonal blocks.
+          LTEND = LT + LENOFF(I) - 1
+          DO JJ = LT, LTEND
+            J = ICN(JJ)
+            WI = WI - A(JJ)*W(J)
+          END DO
+!         LT is set the beginning of the next off-diagonal row.
+          LT = LTEND + 1
+!         Set NEG to .TRUE. if we are on the last row of the block.
+30        IF (IP(I)<0) NEG = .TRUE.
+          IF (LENRL(I)==0) GOTO 50
+!         Forward elimination phase.
+!         IEND is the end of the L part of row I in the LU decomposition.
+          IEND = IBLOCK + LENRL(I) - 1
+          DO JJ = IBLOCK, IEND
+            J = ICN(JJ)
+            WI = WI + A(JJ)*W(J)
+          END DO
+!         IBLOCK is adjusted to point to the start of the next row.
+50        IBLOCK = IBLOCK + LENR(I)
+          W(I) = WI
+          IF (.NOT.NEG) GOTO 120
+!         Back substitution phase.
+!         J1 is position in A/ICN after end of block beginning in
+!         row IFIRST and ending in row I.
+          J1 = IBLOCK
+!         Are there any singularities in this block? If not, continue
+!         with the back substitution.
+          IB = I
+          IF (IQ(I)>0) GOTO 70
+          DO III = IFIRST, I
+            IB = I - III + IFIRST
+            IF (IQ(IB)>0) GOTO 70
+            J1 = J1 - LENR(IB)
+            RESID = MAX(RESID,ABS(W(IB)))
+            W(IB) = ZERO
+          END DO
+!         Entire block is singular.
+          GOTO 110
+!         Each pass through this loop performs the back substitution
+!         operations for a single row, starting at the end of the
+!         block and working through it in reverse order.
+70        DO III = IFIRST, IB
+            II = IB - III + IFIRST
+!           J2 is end of row II.
+            J2 = J1 - 1
+!           J1 is beginning of row II.
+            J1 = J1 - LENR(II)
+!           JPIV is the position of the pivot in row II.
+            JPIV = J1 + LENRL(II)
+            JPIVP1 = JPIV + 1
+!           JUMP if row II of U has no non-zeros.
+            IF (J2<JPIVP1) GOTO 90
+            WII = W(II)
+            DO JJ = JPIVP1, J2
+              J = ICN(JJ)
+              WII = WII - A(JJ)*W(J)
+            END DO
+            W(II) = WII
+90          W(II) = W(II)/A(JPIV)
+          END DO
+110       IFIRST = I + 1
+          NEG = .FALSE.
+120     END DO
+
+!       Reorder solution vector, X(I) = W(IQINVERSE(I)).
+        DO II = 1, N
+          I = IQ(II)
+          I = IABS(I)
+          X(I) = W(II)
+        END DO
+        IP(N) = -IP(N)
+        GOTO 320
+
+!       WE now solve ATRANSPOSE * X = B.
+!       Preorder vector, W(I) = X(IQ(I)).
+140     DO II = 1, N
+          I = IQ(II)
+          I = IABS(I)
+          W(II) = X(I)
+        END DO
+!       LJ1 points to the beginning the current row in the off-diagonal
+!       blocks.
+        LJ1 = IDISP(1)
+!       IBLOCK is initialized to point to the beginning of the block
+!       after the last one.
+        IBLOCK = IDISP(2) + 1
+!       ILAST is the last row in the current block.
+        ILAST = N
+!       IBLEND points to the position after the last non-zero in the
+!       current block.
+        IBLEND = IBLOCK
+!       Each pass through this loop operates with one diagonal block and
+!       the off-diagonal part of the matrix corresponding to the rows
+!       of this block. The blocks are taken in reverse order and the
+!       number of times the loop is entered is MIN(N, NO. BLOCKS+1).
+        DO NUMBLK = 1, N
+          IF (ILAST==0) GOTO 300
+          IBLOCK = IBLOCK - LENR(ILAST)
+!         This loop finds the index of the first row in the current
+!         block. It is FIRST and IBLOCK is set to the position of
+!         the beginning of this first row.
+          DO K = 1, N
+            II = ILAST - K
+            IF (II==0) GOTO 170
+            IF (IP(II)<0) GOTO 170
+            IBLOCK = IBLOCK - LENR(II)
+          END DO
+170       IFIRST = II + 1
+!         J1 points to the position of the beginning of row I (LT part)
+!         or pivot.
+          J1 = IBLOCK
+!         Forward elimination.
+!         Each pass through this loop performs the operations for one row
+!         of the block. If the corresponding entry of W is zero then the
+!         operations can be avoided.
+          DO I = IFIRST, ILAST
+            IF (ABS(W(I))<=ZERO) GOTO 200
+!           JUMP IF ROW I SINGULAR.
+            IF (IQ(I)<0) GOTO 220
+!           J2 first points to the pivot in row I and then is made
+!           to point to the first non-zero in the U TRANSPOSE part
+!           of the row.
+            J2 = J1 + LENRL(I)
+            WI = W(I)/A(J2)
+            IF (LENR(I)-LENRL(I)==1) GOTO 190
+            J2 = J2 + 1
+!           J3 points to the end of row I.
+            J3 = J1 + LENR(I) - 1
+            DO JJ = J2, J3
+              J = ICN(JJ)
+              W(J) = W(J) - A(JJ)*WI
+            END DO
+190         W(I) = WI
+200         J1 = J1 + LENR(I)
+          END DO
+          GOTO 240
+!         Deal with rest of block which is singular.
+220       DO II = I, ILAST
+            RESID = MAX(RESID,ABS(W(II)))
+            W(II) = ZERO
+          END DO
+!         Back substitution.
+!         This loop does the back substitution on the rows of the
+!         block in the reverse order doing it simultaneously on
+!         the L TRANSPOSE part of the diagonal blocks and the
+!         off-diagonal blocks.
+240       J1 = IBLEND
+          DO 280 IBACK = IFIRST, ILAST
+            I = ILAST - IBACK + IFIRST
+!           J1 points to the beginning of row I.
+            J1 = J1 - LENR(I)
+            IF (LENRL(I)==0) GOTO 260
+!           J2 points to the end of the L TRANSPOSE part of row I.
+            J2 = J1 + LENRL(I) - 1
+            DO JJ = J1, J2
+              J = ICN(JJ)
+              W(J) = W(J) + A(JJ)*W(I)
+            END DO
+260         IF (NOBLOC) GOTO 280
+!           Operations using lower triangular blocks.
+            IF (LENOFF(I)==0) GOTO 280
+!           LJ2 points to the end of row I of the off-diagonal blocks.
+            LJ2 = LJ1 - 1
+!           LJ1 points to the beginning of row I of the off-diagonal
+!           blocks.
+            LJ1 = LJ1 - LENOFF(I)
+            DO JJ = LJ1, LJ2
+              J = ICN(JJ)
+              W(J) = W(J) - A(JJ)*W(I)
+            END DO
+280       END DO
+          IBLEND = J1
+          ILAST = IFIRST - 1
+        END DO
+!       Reorder solution vector, X(I) = W(IPINVERSE(I)).
+300     DO II = 1, N
+          I = IP(II)
+          I = IABS(I)
+          X(I) = W(II)
+        END DO
+
+320     RETURN
+
+      END SUBROUTINE MA30CD
+!_______________________________________________________________________
+
+! Private Variable Information.
+! Private variables for MA30ED hold control parameters.
+!     Original : COMMON /MA30ED/ LP,ABORT1,ABORT2,ABORT3
+! The integer LP is the unit number to which the error messages are
+!     sent. LP has a default value of 6. This default value can be
+!     reset by the user, if desired. A value of 0 suppresses all
+!     messages.
+! The logical variables ABORT1, ABORT2, ABORT3 are used to control
+!     the conditions under which the subroutine will terminate.
+! If ABORT1 iS .TRUE. then the subroutine will exit immediately on
+!     detecting structural singularity.
+! If ABORT2 iS .TRUE. then the subroutine will exit immediately on
+!     detecting numerical singularity.
+! If ABORT3 iS .TRUE. then the subroutine will exit immediately when
+!     the available space in A/ICN is filled up by the previously
+!     decomposed, active, and undecomposed parts of the matrix.
+! The default values for ABORT1, ABORT2, ABORT3 are set to .TRUE.,
+!     .TRUE., and .FALSE., respectively.
+
+! The private variables for MA30FD are used to provide the user with
+! information on the decomposition.
+!     Original : COMMON /MA30FD/ IRNCP,ICNCP,IRANK,MINIRN,MINICN
+! IRNCP AND ICNCP are integer variables used to monitor the adequacy
+!     of the allocated space in arrays IRN and A/ICN, respectively,
+!     by taking account of the number of data management compresses
+!     required on these arrays. If IRNCP or ICNCP is fairly large (say
+!     greater than N/10), It may be advantageous to increase the size
+!     of the corresponding array(s). IRNCP and ICNCP are initialized
+!     to zero on entry to MA30AD and are incremented each time the
+!     compressing routine MA30DD is entered.
+! ICNCP is the number of compresses on A/ICN.
+! IRNCP is the number of compresses on IRN.
+! IRANK is an integer variable which gives an estimate (actually an
+!     upper bound) of the rank of the matrix. On an exit with IFLAG
+!     equal to 0, this will be equal to N.
+! MINIRN is an integer variable which, after a successful call to
+!     MA30AD, indicates the minimum length to which IRN can be
+!     reduced while still permitting a successful decomposition
+!     of the same matrix. If, however, the user were to decrease the
+!     length of IRN to that size, the number of compresses (IRNCP)
+!     may be very high and quite costly. If LIRN is not large enough
+!     to begin the decomposition on a diagonal block, MINIRN will be
+!     equal to the value required to continue the decomposition and
+!     IFLAG will be set to -3 or -6. A value of LIRN slightly greater
+!     than this (say about N/2) will usually provide enough space to
+!     complete the decomposition on that block. In the event of any
+!     other failure minirn gives the minimum size of IRN required
+!     for a successful decomposition up to that point.
+! MINICN is an integer variable which after a successful call to
+!     MA30AD, indicates the minimum size of LICN required to enable
+!     a successful decomposition. In the event of failure with
+!     IFLAG = -5, MINICN will, if ABORT3 is left set to .FALSE.,
+!     indicate the minimum length that would be sufficient to
+!     prevent this error in a subsequent run on an identical matrix.
+!     Again the user may prefer to use a value of icn slightly
+!     greater than MINICN for subsequent runs to avoid too many
+!     conpresses (ICNCP). In the event of failure with IFLAG equal
+!     to any negative value except -4, minicn will give the minimum
+!     length to which licn could be reduced to enable a successful
+!     decomposition to the point at which failure occurred. Notice
+!     that, on a successful entry IDISP(2) gives the amount of space
+!     in A/ICN required for the decomposition while MINICN will
+!     usually be slightly greater because of the need for
+!     "elbow room". If the user is very unsure how large to make
+!     LICN, the variable MINICN can be used to provide that
+!     information. A preliminary run should be performed with ABORT3
+!     left set to .FALSE. and LICN about 3/2 times as big as the
+!     number of non-zeros in the original matrix. Unless the initial
+!     problem is very sparse (when the run will be successful) or
+!     fills in extremely badly (giving an error return with
+!     IFLAG = -4), an error return with IFLAG = -5 should result and
+!     MINICN will give the amount of space required for a successful
+!     decomposition.
+
+! The private variables for MA30GD are used by the MA30BD entry only.
+!     Original : COMMON /MA30GD/ EPS,RMIN
+! EPS is a REAL(KIND=WP) variable. It is used to test for small
+!     pivots. Its default value is 1.0D-4 (1.0E-4 in E version).
+!     If the user sets EPS to any value greater than 1.0, then no
+!     check is made on the size of the pivots. Although the absence
+!     of such a check would fail to warn the user of bad instability,
+!     its absence will enable MA30BD to run slightly faster. An a
+!     posteriori check on the stability of the factorization can
+!     be obtained from MC24AD.
+! RMIN is a REAL(KIND=WP) variable which gives the user some
+!     information about the stability of the decomposition. At each
+!     stage of the LU decomposition the magnitude of the pivot APIV
+!     is compared with the largest off-diagonal entry currently in
+!     its row (row of U), ROWMAX say. If the ratio
+!                       MIN(APIV/ROWMAX)
+!     where the minimum is taken over all the rows, is less than EPS
+!     then RMIN is set to this minimum value and IFLAG is returned
+!     with the value +I where I is the row in which this minimum
+!     occurs. If the user sets EPS greater than one, then this test
+!     is not performed. In this case, and when there are no small
+!     pivots rmin will be set equal to EPS.
+
+! The private variables for MA30HD are used by MA30CD only.
+!     Original : COMMON /MA30HD/ RESID
+! RESID is a REAL(KIND=WP) variable. In the case of singular or
+!     rectangular matrices its final value will be equal to the
+!     maximum residual for the unsatisfied equations; otherwise
+!     its value will be set to zero.
+
+!  MA30ID private variables control the use of drop tolerances,
+!     the modified pivot option and the calculation of the largest
+!     entry in the factorization process. These private variables
+!     were added to the MA30 package in February, 1983.
+!     Original : COMMON /MA30ID/ TOL,BIG,NDROP,NSRCH,LBIG
+! TOL is a REAL(KIND=WP) variable. If it is set to a positive
+!     value, then MA30AD will drop from the factors any non-zero
+!     whose modulus is less than TOL. The factorization will then
+!     require less storage but will be inaccurate. After a run of
+!     MA30AD where entries have been dropped, MA30BD should not
+!     be called. The default value for TOL is 0.0.
+! BIG is a REAL(KIND=WP) variable. If LBIG has been set to .TRUE.,
+!     BIG will be set to the largest entry encountered during the
+!     factorization.
+! NDROP is an integer variable. If TOL has been set positive, on
+!     exit from MA30AD, NDROP will hold the number of entries
+!     dropped from the data structure.
+! NSRCH is an integer variable. If NSRCH is set to a value less
+!     than or equal to N, then a different pivot option will be
+!     employed by MA30AD. This may result in different fill-in
+!     and execution time for MA30AD. If NSRCH is less than or
+!     equal to N, the workspace arrays LASTC and NEXTC are not
+!     referenced by MA30AD. The default value for NSRCH is 32768.
+! LBIG is a logical variable. If LBIG is set to .TRUE., the value
+!     of the largest entry encountered in the factorization by
+!     MA30AD is returned in BIG. Setting LBIG to .TRUE. will
+!     marginally increase the factorization time for MA30AD and
+!     will increase that for MA30BD by about 20%. The default
+!     value for LBIG is .FALSE.
+!_______________________________________________________________________
+
+      SUBROUTINE MC13D(N,ICN,LICN,IP,LENR,IOR,IB,NUM,IW)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUM
+! ..
+! .. Array Arguments ..
+        INTEGER :: IB(N), ICN(LICN), IOR(N), IP(N), IW(N,3), LENR(N)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA13D
+! ..
+        CALL MC13E(N,ICN,LICN,IP,LENR,IOR,IB,NUM,IW(1,1),IW(1,2),IW(1,3))
+        RETURN
+
+      END SUBROUTINE MC13D
+!_______________________________________________________________________
+
+      SUBROUTINE MC13E(N,ICN,LICN,IP,LENR,ARP,IB,NUM,LOWL,NUMB,PREV)
+! ..
+! ARP(I) is one less than the number of unsearched edges leaving
+!     node I. At the end of the algorithm it is set to a
+!     permutation which puts the matrix in block lower
+!     triangular form.
+! IB(I) is the position in the ordering of the start of the Ith
+!     block. IB(N+1-I) holds the node number of the Ith node
+!     on the stack.
+! LOWL(I) is the smallest stack position of any node to which a
+!     path from node I has been found. It is set to N+1 when
+!     node I is removed from the stack.
+! NUMB(I) is the position of node I in the stack if it is on
+!     the stack. It is the permuted order of node I for those
+!     nodes whose final position has been found and is otherwise
+!     zero.
+! PREV(I) is the node at the end of the path when node I was
+!     placed on the stack.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUM
+! ..
+! .. Array Arguments ..
+        INTEGER :: ARP(N), IB(N), ICN(LICN), IP(N), LENR(N), LOWL(N),  &
+          NUMB(N), PREV(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: DUMMY, I, I1, I2, ICNT, II, ISN, IST, IST1, IV, IW, &
+          J, K, LCNT, NNM1, STP
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA13E
+! ..
+!       ICNT is the number of nodes whose positions in final ordering
+!       have been found.
+        ICNT = 0
+!       NUM is the number of blocks that have been found.
+        NUM = 0
+        NNM1 = N + N - 1
+
+!       Initialization of arrays.
+        DO J = 1, N
+          NUMB(J) = 0
+          ARP(J) = LENR(J) - 1
+        END DO
+
+        DO 90 ISN = 1, N
+!         Look for a starting node.
+          IF (NUMB(ISN)/=0) GOTO 90
+          IV = ISN
+!         IST is the number of nodes on the stack. It is the
+!         stack pointer.
+          IST = 1
+!         Put node IV at beginning of stack.
+          LOWL(IV) = 1
+          NUMB(IV) = 1
+          IB(N) = IV
+
+!         The body of this loop puts a new node on the stack
+!         or backtracks.
+          DO 80 DUMMY = 1, NNM1
+            I1 = ARP(IV)
+!           Have all edges leaving node iv been searched?
+            IF (I1<0) GOTO 30
+            I2 = IP(IV) + LENR(IV) - 1
+            I1 = I2 - I1
+
+!           Look at edges leaving node iv until one enters a
+!           new node or all edges are exhausted.
+            DO 20 II = I1, I2
+              IW = ICN(II)
+!             Has node iw been on stack already?
+              IF (NUMB(IW)==0) GOTO 70
+!             Update value of LOWL(IV) if necessary.
+20          LOWL(IV) = MIN(LOWL(IV),LOWL(IW))
+
+!           There are no more edges leaving node IV.
+            ARP(IV) = -1
+!           Is node IV the root of a block.
+30          IF (LOWL(IV)<NUMB(IV)) GOTO 60
+
+!           Order nodes in a block.
+            NUM = NUM + 1
+            IST1 = N + 1 - IST
+            LCNT = ICNT + 1
+!           Peel block off the top of the stack starting at the
+!           top and working down to the root of the block.
+            DO STP = IST1, N
+              IW = IB(STP)
+              LOWL(IW) = N + 1
+              ICNT = ICNT + 1
+              NUMB(IW) = ICNT
+              IF (IW==IV) GOTO 50
+            END DO
+50          IST = N - STP
+            IB(NUM) = LCNT
+!           Are there any nodes left on the stack?
+            IF (IST/=0) GOTO 60
+!           Have all the nodes been ordered?
+            IF (ICNT<N) GOTO 90
+            GOTO 100
+
+!           Backtrack to previous node on path.
+60          IW = IV
+            IV = PREV(IV)
+!           Update value of LOWL(IV) if necessary.
+            LOWL(IV) = MIN(LOWL(IV),LOWL(IW))
+            GOTO 80
+
+!           Put new node on the stack.
+70          ARP(IV) = I2 - II - 1
+            PREV(IW) = IV
+            IV = IW
+            IST = IST + 1
+            LOWL(IV) = IST
+            NUMB(IV) = IST
+            K = N + 1 - IST
+            IB(K) = IV
+80        END DO
+
+90      END DO
+
+!       Put permutation in the required form.
+100     DO I = 1, N
+          II = NUMB(I)
+          ARP(II) = I
+        END DO
+        RETURN
+
+      END SUBROUTINE MC13E
+!_______________________________________________________________________
+
+      SUBROUTINE MC20AD(NC,MAXA,A,INUM,JPTR,JNUM,JDISP)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+! ..
+        INTEGER :: JDISP, MAXA, NC
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(MAXA)
+        INTEGER :: INUM(MAXA), JNUM(MAXA), JPTR(NC)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: ACE, ACEP
+        INTEGER :: I, ICE, ICEP, J, JA, JB, JCE, JCEP, K, KR, LOC, MYNULL
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA20AD
+! ..
+        MYNULL = -JDISP
+!       CLEAR JPTR
+        JPTR(1:NC) = 0
+!       Count the number of elements in each column.
+        DO K = 1, MAXA
+          J = JNUM(K) + JDISP
+          JPTR(J) = JPTR(J) + 1
+        END DO
+!       SET THE JPTR ARRAY.
+        K = 1
+        DO J = 1, NC
+          KR = K + JPTR(J)
+          JPTR(J) = K
+          K = KR
+        END DO
+
+!       Reorder the elements into column order. The algorithm is an
+!       in-place sort and is of order MAXA.
+        DO 50 I = 1, MAXA
+!         Establish the current entry.
+          JCE = JNUM(I) + JDISP
+          IF (JCE==0) GOTO 50
+          ACE = A(I)
+          ICE = INUM(I)
+!         Clear the location vacated.
+          JNUM(I) = MYNULL
+!         Chain from current entry to store items.
+          DO 40 J = 1, MAXA
+!           Current entry not in correct position. Determine the
+!           correct position to store entry.
+            LOC = JPTR(JCE)
+            JPTR(JCE) = JPTR(JCE) + 1
+!           Save contents of that location.
+            ACEP = A(LOC)
+            ICEP = INUM(LOC)
+            JCEP = JNUM(LOC)
+!           Store current entry.
+            A(LOC) = ACE
+            INUM(LOC) = ICE
+            JNUM(LOC) = MYNULL
+!           Check if next current entry needs to be processed.
+            IF (JCEP==MYNULL) GOTO 50
+!           It does. Copy into current entry.
+            ACE = ACEP
+            ICE = ICEP
+40        JCE = JCEP + JDISP
+
+50      END DO
+
+!       Reset JPTR vector.
+        JA = 1
+        DO J = 1, NC
+          JB = JPTR(J)
+          JPTR(J) = JA
+          JA = JB
+        END DO
+        RETURN
+
+      END SUBROUTINE MC20AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC20BD(NC,MAXA,A,INUM,JPTR)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: MAXA, NC
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(MAXA)
+        INTEGER :: INUM(MAXA), JPTR(NC)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: ACE
+        INTEGER :: ICE, IK, J, JJ, K, KDUMMY, KLO, KMAX, KOR
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC IABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA20BD
+! ..
+        KMAX = MAXA
+        DO JJ = 1, NC
+          J = NC + 1 - JJ
+          KLO = JPTR(J) + 1
+          IF (KLO>KMAX) GOTO 40
+          KOR = KMAX
+          DO KDUMMY = KLO, KMAX
+!           Items KOR,KOR+1,...,KMAX are in order.
+            ACE = A(KOR-1)
+            ICE = INUM(KOR-1)
+            DO K = KOR, KMAX
+              IK = INUM(K)
+              IF (IABS(ICE)<=IABS(IK)) GOTO 20
+              INUM(K-1) = IK
+              A(K-1) = A(K)
+            END DO
+            K = KMAX + 1
+20          INUM(K-1) = ICE
+            A(K-1) = ACE
+            KOR = KOR - 1
+          END DO
+!         Next column.
+40        KMAX = KLO - 2
+        END DO
+        RETURN
+
+      END SUBROUTINE MC20BD
+!_______________________________________________________________________
+
+      SUBROUTINE MC21A(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,IW)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUMNZ
+! ..
+! .. Array Arguments ..
+        INTEGER :: ICN(LICN), IP(N), IPERM(N), IW(N,4), LENR(N)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA21A
+! ..
+        CALL MC21B(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,IW(1,1),IW(1,2), &
+          IW(1,3),IW(1,4))
+        RETURN
+
+      END SUBROUTINE MC21A
+!_______________________________________________________________________
+
+      SUBROUTINE MC21B(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,PR,ARP,CV,OUT)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+! ..
+        INTEGER :: LICN, N, NUMNZ
+! ..
+! .. Array Arguments ..
+        INTEGER :: ARP(N), CV(N), ICN(LICN), IP(N), IPERM(N), LENR(N), &
+          OUT(N), PR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, II, IN1, IN2, IOUTK, J, J1, JORD, K, KK
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA21B
+! ..
+! PR(I) is the previous row to I in the depth first search.
+!    It is used as a work array in the sorting algorithm.
+!    Elements (IPERM(I),I) I=1,...,N are non-zero at the
+!    end of the algorithm unless N assignments have not
+!    been made, in which case (IPERM(I),I) will be zero
+!    for N-NUMNZ entries.
+! CV(I) is the most recent row extension at which column I
+!    was visited.
+! ARP(I) is one less than the number of non-zeros in row I
+!    which have not been scanned when looking for a cheap
+!    assignment.
+! OUT(I) is one less than the number of non-zeros in row I
+!    which have not been scanned during one pass through
+!    the main loop.
+
+!       Initialization of arrays.
+        DO I = 1, N
+          ARP(I) = LENR(I) - 1
+          CV(I) = 0
+          IPERM(I) = 0
+        END DO
+        NUMNZ = 0
+
+!       Main loop.
+!       Each pass round this loop either results in a new
+!       assignment or gives a row with no assignment.
+        DO 100 JORD = 1, N
+          J = JORD
+          PR(J) = -1
+          DO 70 K = 1, JORD
+!           Look for a cheap assignment.
+            IN1 = ARP(J)
+            IF (IN1<0) GOTO 30
+            IN2 = IP(J) + LENR(J) - 1
+            IN1 = IN2 - IN1
+            DO II = IN1, IN2
+              I = ICN(II)
+              IF (IPERM(I)==0) GOTO 80
+            END DO
+!           No cheap assignment in row.
+            ARP(J) = -1
+!           Begin looking for assignment chain starting with row J.
+30          OUT(J) = LENR(J) - 1
+!           Inner loop. Extends chain by one or backtracks.
+            DO KK = 1, JORD
+              IN1 = OUT(J)
+              IF (IN1<0) GOTO 50
+              IN2 = IP(J) + LENR(J) - 1
+              IN1 = IN2 - IN1
+!             Forward scan.
+              DO 40 II = IN1, IN2
+                I = ICN(II)
+                IF (CV(I)==JORD) GOTO 40
+!               Column I has not yet been accessed during this pass.
+                J1 = J
+                J = IPERM(I)
+                CV(I) = JORD
+                PR(J) = J1
+                OUT(J1) = IN2 - II - 1
+                GOTO 70
+40            END DO
+
+!             Backtracking step.
+50            J = PR(J)
+              IF (J==-1) GOTO 100
+            END DO
+
+70        END DO
+
+!         New assignment is made.
+80        IPERM(I) = J
+          ARP(J) = IN2 - II - 1
+          NUMNZ = NUMNZ + 1
+          DO K = 1, JORD
+            J = PR(J)
+            IF (J==-1) GOTO 100
+            II = IP(J) + LENR(J) - OUT(J) - 2
+            I = ICN(II)
+            IPERM(I) = J
+          END DO
+
+100     END DO
+
+!       If matrix is structurally singular, we now complete the
+!       permutation IPERM.
+        IF (NUMNZ==N) RETURN
+        ARP(1:N) = 0
+        K = 0
+        DO 130 I = 1, N
+          IF (IPERM(I)/=0) GOTO 120
+          K = K + 1
+          OUT(K) = I
+          GOTO 130
+120       J = IPERM(I)
+          ARP(J) = I
+130     END DO
+        K = 0
+        DO 140 I = 1, N
+          IF (ARP(I)/=0) GOTO 140
+          K = K + 1
+          IOUTK = OUT(K)
+          IPERM(IOUTK) = I
+140     END DO
+        RETURN
+
+      END SUBROUTINE MC21B
+!_______________________________________________________________________
+
+      SUBROUTINE MC22AD(N,ICN,A,NZ,LENROW,IP,IQ,IW,IW1)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: N, NZ
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(NZ)
+        INTEGER :: ICN(NZ), IP(N), IQ(N), IW(N,2), IW1(NZ), LENROW(N)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AVAL
+        INTEGER :: I, ICHAIN, IOLD, IPOS, J, J2, JJ, JNUM, JVAL, LENGTH, &
+          NEWPOS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC IABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA22AD
+! ..
+        IF (NZ<=0) GOTO 90
+        IF (N<=0) GOTO 90
+!       Set start of row I in IW(I,1) and LENROW(I) in IW(I,2)
+        IW(1,1) = 1
+        IW(1,2) = LENROW(1)
+        DO I = 2, N
+          IW(I,1) = IW(I-1,1) + LENROW(I-1)
+          IW(I,2) = LENROW(I)
+        END DO
+!       Permute LENROW according to IP. Set off-sets for new
+!       position of row IOLD in IW(IOLD,1) and put old row
+!       indices in IW1 in positions corresponding to the new
+!       position of this row in A/ICN.
+        JJ = 1
+        DO 30 I = 1, N
+          IOLD = IP(I)
+          IOLD = IABS(IOLD)
+          LENGTH = IW(IOLD,2)
+          LENROW(I) = LENGTH
+          IF (LENGTH==0) GOTO 30
+          IW(IOLD,1) = IW(IOLD,1) - JJ
+          J2 = JJ + LENGTH - 1
+          DO 20 J = JJ, J2
+20        IW1(J) = IOLD
+          JJ = J2 + 1
+30      END DO
+!       Set inverse permutation to IQ in IW(:,2).
+        DO I = 1, N
+          IOLD = IQ(I)
+          IOLD = IABS(IOLD)
+          IW(IOLD,2) = I
+        END DO
+!       Permute A and ICN in place, changing to new column numbers.
+!       Main loop.
+!       Each pass through this loop places a closed chain of
+!       column indices in their new (and final) positions.
+!       This is recorded by setting the iw1 entry to zero so
+!       that any which are subsequently encountered during
+!       this major scan can be bypassed.
+        DO 80 I = 1, NZ
+          IOLD = IW1(I)
+          IF (IOLD==0) GOTO 80
+          IPOS = I
+          JVAL = ICN(I)
+!         If row IOLD is in same positions after permutation,
+!         GOTO 150.
+          IF (IW(IOLD,1)==0) GOTO 70
+          AVAL = A(I)
+!         Chain loop.
+!         Each pass through this loop places one(permuted) column
+!         index in its final position, viz. IPOS.
+          DO ICHAIN = 1, NZ
+!           NEWPOS is the original position in A/ICN of the
+!           element to be placed in position IPOS. It is also
+!           the position of the next element in the chain.
+            NEWPOS = IPOS + IW(IOLD,1)
+!           Is chain complete?
+            IF (NEWPOS==I) GOTO 60
+            A(IPOS) = A(NEWPOS)
+            JNUM = ICN(NEWPOS)
+            ICN(IPOS) = IW(JNUM,2)
+            IPOS = NEWPOS
+            IOLD = IW1(IPOS)
+            IW1(IPOS) = 0
+!           End of chain loop.
+          END DO
+60        A(IPOS) = AVAL
+70        ICN(IPOS) = IW(JVAL,2)
+!         END OF MAIN LOOP
+80      END DO
+90      RETURN
+
+      END SUBROUTINE MC22AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC23AD(N,ICN,A,LICN,LENR,IDISP,IP,IQ,LENOFF,IW,IW1)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), IW(N,5), IW1(N,2), &
+          LENOFF(N), LENR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, I1, I2, IBEG, IBLOCK, IEND, II, ILEND, INEW, IOLD, &
+          IROWB, IROWE, J, JJ, JNEW, JNPOS, JOLD, K, LENI, NZ
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA23AD
+! ..
+!     Input ... N,ICN ... A,ICN,LENR ...
+!     Set up pointers IW(:,1) to the beginning of the rows
+!     and set LENOFF equal to LENR.
+        IW1(1,1) = 1
+        LENOFF(1) = LENR(1)
+        IF (N==1) GOTO 20
+        DO I = 2, N
+          LENOFF(I) = LENR(I)
+          IW1(I,1) = IW1(I-1,1) + LENR(I-1)
+        END DO
+!       IDISP(1) points to the first position in A/ICN after
+!       the off-diagonal blocks and untreated rows.
+20      IDISP(1) = IW1(N,1) + LENR(N)
+
+!       Find row permutation ip to make diagonal zero-free.
+        CALL MC21A(N,ICN,LICN,IW1(1,1),LENR,IP,NUMNZ,IW(1,1))
+
+!       Possible error return for structurally singular matrices.
+        IF (NUMNZ/=N .AND. ABORT) GOTO 170
+
+!       IW1(:,2) and LENR are permutations of IW1(:,1) and
+!       LENR/LENOFF suitable for entry to MC13D since matrix
+!       with these row pointer and length arrays has maximum
+!       number of non-zeros on the diagonal.
+        DO II = 1, N
+          I = IP(II)
+          IW1(II,2) = IW1(I,1)
+          LENR(II) = LENOFF(I)
+        END DO
+
+!       Find symmetric permutation IQ to block lower triangular form.
+        CALL MC13D(N,ICN,LICN,IW1(1,2),LENR,IQ,IW(1,4),NUM,IW)
+
+        IF (NUM/=1) GOTO 60
+
+!       Action taken if matrix is irreducible: The
+!       whole matrix is just moved to the end of the storage.
+        DO I = 1, N
+          LENR(I) = LENOFF(I)
+          IP(I) = I
+          IQ(I) = I
+        END DO
+        LENOFF(1) = -1
+!       IDISP(1) is the first position after the last element in
+!       the off-diagonal blocks and untreated rows.
+        NZ = IDISP(1) - 1
+        IDISP(1) = 1
+!       IDISP(2) Is the position in A/ICN of the first element
+!       in the diagonal blocks.
+        IDISP(2) = LICN - NZ + 1
+        LARGE = N
+        IF (NZ==LICN) GOTO 200
+        DO K = 1, NZ
+          J = NZ - K + 1
+          JJ = LICN - K + 1
+          A(JJ) = A(J)
+          ICN(JJ) = ICN(J)
+        END DO
+        GOTO 200
+
+!       Data structure reordered.
+
+!       Form composite row permutation, IP(I) = IP(IQ(I)).
+60      DO II = 1, N
+          I = IQ(II)
+          IW(II,1) = IP(I)
+        END DO
+        DO I = 1, N
+          IP(I) = IW(I,1)
+        END DO
+
+!       Run through blocks in reverse order separating diagonal
+!       blocks which are moved to the end of the storage. Elements
+!       in off-diagonal blocks are left in place unless a compress
+!       is necessary.
+
+!       IBEG indicates the lowest value of J for which ICN(J) has
+!       been set to zero when element in position J was moved to
+!       the diagonal block part of storage.
+        IBEG = LICN + 1
+!       IEND is the position of the first element of those treated
+!       rows which are in diagonal blocks.
+        IEND = LICN + 1
+!       LARGE is the dimension of the largest block encountered
+!       so far.
+        LARGE = 0
+
+!       NUM is the number of diagonal blocks.
+        DO K = 1, NUM
+          IBLOCK = NUM - K + 1
+!         I1 is first row (in permuted form) of block IBLOCK.
+!         I2 is last row (in permuted form) of block IBLOCK.
+          I1 = IW(IBLOCK,4)
+          I2 = N
+          IF (K/=1) I2 = IW(IBLOCK+1,4) - 1
+          LARGE = MAX(LARGE,I2-I1+1)
+!         Go through the rows of block IBLOCK in the reverse order.
+          DO II = I1, I2
+            INEW = I2 - II + I1
+!           We now deal with row inew in permuted form (row IOLD
+!           in original matrix).
+            IOLD = IP(INEW)
+!           If there is space to move up diagonal block portion
+!           of row GOTO 110.
+            IF (IEND-IDISP(1)>=LENOFF(IOLD)) GOTO 110
+
+!           In-line compress.
+!           Moves separated off-diagonal elements and untreated
+!           rows to front of storage.
+            JNPOS = IBEG
+            ILEND = IDISP(1) - 1
+            IF (ILEND<IBEG) GOTO 180
+            DO 90 J = IBEG, ILEND
+              IF (ICN(J)==0) GOTO 90
+              ICN(JNPOS) = ICN(J)
+              A(JNPOS) = A(J)
+              JNPOS = JNPOS + 1
+90          END DO
+            IDISP(1) = JNPOS
+            IF (IEND-JNPOS<LENOFF(IOLD)) GOTO 180
+            IBEG = LICN + 1
+!           Reset pointers to the beginning of the rows.
+            DO 100 I = 2, N
+100         IW1(I,1) = IW1(I-1,1) + LENOFF(I-1)
+
+!           Row IOLD is now split into diagonal and off-diagonal parts.
+110         IROWB = IW1(IOLD,1)
+            LENI = 0
+            IROWE = IROWB + LENOFF(IOLD) - 1
+!           Backward scan of whole of row IOLD (in original matrix).
+            IF (IROWE<IROWB) GOTO 130
+            DO 120 JJ = IROWB, IROWE
+              J = IROWE - JJ + IROWB
+              JOLD = ICN(J)
+!             IW(:,2) holds the inverse permutation to IQ.
+!             It was set to this in MC13D.
+              JNEW = IW(JOLD,2)
+!             IF (JNEW < I1) THEN ...
+!             Element is in off-diagonal block and so is
+!             left in situ.
+              IF (JNEW<I1) GOTO 120
+!             Element is in diagonal block and is moved to
+!             the end of the storage.
+              IEND = IEND - 1
+              A(IEND) = A(J)
+              ICN(IEND) = JNEW
+              IBEG = MIN(IBEG,J)
+              ICN(J) = 0
+              LENI = LENI + 1
+120         END DO
+
+            LENOFF(IOLD) = LENOFF(IOLD) - LENI
+130         LENR(INEW) = LENI
+          END DO
+
+          IP(I2) = -IP(I2)
+        END DO
+!       Resets IP(N) to positive value.
+        IP(N) = -IP(N)
+!       IDISP(2) is position of first element in diagonal blocks.
+        IDISP(2) = IEND
+
+!       This compress is used to move all off-diagonal elements
+!       to the front of the storage.
+        IF (IBEG>LICN) GOTO 200
+        JNPOS = IBEG
+        ILEND = IDISP(1) - 1
+        DO 160 J = IBEG, ILEND
+          IF (ICN(J)==0) GOTO 160
+          ICN(JNPOS) = ICN(J)
+          A(JNPOS) = A(J)
+          JNPOS = JNPOS + 1
+160     END DO
+!       IDISP(1) is first position after last element of
+!       off-diagonal blocks.
+        IDISP(1) = JNPOS
+        GOTO 200
+
+!       Error return
+170     IF (LP/=0) WRITE (LP,90000) NUMNZ
+90000   FORMAT (' Matrix is structurally singular, rank = ',I6)
+        IDISP(1) = -1
+        GOTO 190
+180     IF (LP/=0) WRITE (LP,90001) N
+90001   FORMAT (' LICN is not big enough; increase by ',I6)
+        IDISP(1) = -2
+190     IF (LP/=0) WRITE (LP,90002)
+90002   FORMAT (' + Error return from MC23AD')
+200     RETURN
+
+      END SUBROUTINE MC23AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC24AD(N,ICN,A,LICN,LENR,LENRL,W)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: AMAXL, AMAXU, WROWL
+        INTEGER :: I, J, J0, J1, J2, JJ
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA24AD
+! ..
+        AMAXL = ZERO
+        W(1:N) = ZERO
+        J0 = 1
+        DO 60 I = 1, N
+          IF (LENR(I)==0) GOTO 60
+          J2 = J0 + LENR(I) - 1
+          IF (LENRL(I)==0) GOTO 30
+!         Calculation of 1-norm of L.
+          J1 = J0 + LENRL(I) - 1
+          WROWL = ZERO
+          DO 20 JJ = J0, J1
+20        WROWL = WROWL + ABS(A(JJ))
+!         AMAXL is the maximum norm of columns of L so far found.
+          AMAXL = MAX(AMAXL,WROWL)
+          J0 = J1 + 1
+!         Calculation of norms of columns of U(MAX-NORMS).
+30        J0 = J0 + 1
+          IF (J0>J2) GOTO 50
+          DO 40 JJ = J0, J2
+            J = ICN(JJ)
+40        W(J) = MAX(ABS(A(JJ)),W(J))
+50        J0 = J2 + 1
+60      END DO
+!       AMAXU is set to maximum max-norm of columns of U.
+        AMAXU = ZERO
+        DO I = 1, N
+          AMAXU = MAX(AMAXU,W(I))
+        END DO
+!       GROFAC is MAX U max-norm times MAX L 1-norm.
+        W(1) = AMAXL*AMAXU
+        RETURN
+
+      END SUBROUTINE MC24AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC19AD(N,NA,A,IRN,ICN,R,C,W)
+! ..
+!     MC19A was altered to use same precision for R, C,
+!     and W as is used for other variables in program.
+! ..
+!     REAL A(NA),R(N),C(N),W(N,5)
+!     R(I) is used to return log(scaling factor for row I).
+!     C(J) is used to return log(scaling factor for col J).
+!     W(I,1), W(I,2) hold row,col non-zero counts.
+!     W(J,3) holds - COL J LOG during execution.
+!     W(J,4) holds 2-iteration change in W(J,3).
+!     W(I,5) is used to save average element log for row I.
+!     INTEGER*2 IRN(NA), ICN(NA)
+!     IRN(K) gives row number of element in A(K).
+!     ICN(K) gives col number of element in A(K).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: N, NA
+! ..
+! .. Array Arguments ..
+        REAL (WP) :: A(NA), C(N), R(N), W(N,5)
+        INTEGER :: ICN(NA), IRN(NA)
+! ..
+! .. Local Scalars ..
+        REAL (WP) :: E, E1, EM, Q, Q1, QM, S, S1, SM, SMIN, U, V
+        INTEGER :: I, I1, I2, ITER, J, K, MAXIT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, LOG, REAL
+! ..
+! .. Data Statements ..
+!       MAXIT is the maximal permitted number of iterations.
+!       SMIN is used in a convergence test on (residual norm)**2.
+        DATA MAXIT/100/, SMIN/0.1/
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA19AD
+! ..
+!       Check scalar data.
+        IFAIL = 1
+        IF (N<1) GOTO 210
+        IFAIL = 2
+!       IF (N > 32767)GOTO 230
+        IFAIL = 2
+        IFAIL = 0
+
+!       Initialise for accumulation of sums and products.
+        C(1:N) = ZERO
+        R(1:N) = ZERO
+        W(1:N,1:4) = ZERO
+        IF (NA<=0) GOTO 220
+        DO 40 K = 1, NA
+          U = ABS(A(K))
+!         IF (U == ZERO) GOTO 30
+          IF (ABS(U-ZERO)<=ZERO) GOTO 40
+          U = LOG(U)
+          I1 = IRN(K)
+          I2 = ICN(K)
+          IF (I1>=1 .AND. I1<=N .AND. I2>=1 .AND. I2<=N) GOTO 30
+          IF (LP>0) WRITE (LP,90000) K, I1, I2
+90000     FORMAT (' MC19 error. Element ',I5,' is in row ',I5,' and column ', &
+            I5)
+          IFAIL = 3
+          GOTO 40
+!         Count row/col non-zeros and compute rhs vectors.
+30        W(I1,1) = W(I1,1) + 1.
+          W(I2,2) = W(I2,2) + 1.
+          R(I1) = R(I1) + U
+          W(I2,3) = W(I2,3) + U
+40      END DO
+        IF (IFAIL==3) GOTO 210
+
+!       Divide rhs by diagonal matrices.
+        DO I = 1, N
+!        IF (W(I,1) == ZERO) W(I,1) = 1.
+          IF (ABS(W(I,1))<=ZERO) W(I,1) = ONE
+          R(I) = R(I)/W(I,1)
+!         SAVE R(I) FOR USE AT END.
+          W(I,5) = R(I)
+!         IF (W(I,2) == ZERO) W(I,2) = 1.
+          IF (ABS(W(I,2))<=ZERO) W(I,2) = ONE
+          W(I,3) = W(I,3)/W(I,2)
+        END DO
+!       SM = SMIN*FLOAT(NA)
+        SM = SMIN*REAL(NA)
+!       Sweep to compute initial residual vector.
+        DO 60 K = 1, NA
+!         IF (A(K) == ZERO) GOTO 80
+          IF (ABS(A(K))<=ZERO) GOTO 60
+          I = IRN(K)
+          J = ICN(K)
+          R(I) = R(I) - W(J,3)/W(I,1)
+60      END DO
+
+!       Initialise iteration.
+        E = ZERO
+        Q = 1.
+        S = ZERO
+        DO I = 1, N
+          S = S + W(I,1)*R(I)**2
+        END DO
+        IF (S<=SM) GOTO 160
+
+!       Iteration loop.
+        DO ITER = 1, MAXIT
+!         Sweep through matrix to update residual vector.
+          DO 80 K = 1, NA
+!           IF (A(K) == ZERO) GOTO 130
+            IF (ABS(A(K))<=ZERO) GOTO 80
+            I = ICN(K)
+            J = IRN(K)
+            C(I) = C(I) + R(J)
+80        END DO
+          S1 = S
+          S = ZERO
+          DO I = 1, N
+            V = -C(I)/Q
+            C(I) = V/W(I,2)
+            S = S + V*C(I)
+          END DO
+          E1 = E
+          E = Q*S/S1
+          Q = 1. - E
+          IF (S<=SM) E = ZERO
+!         Update residual.
+          DO I = 1, N
+            R(I) = R(I)*E*W(I,1)
+          END DO
+          IF (S<=SM) GOTO 180
+          EM = E*E1
+!         Sweep through matrix to update residual vector.
+          DO 110 K = 1, NA
+!           IF (A(K) == ZERO) GOTO 152
+            IF (ABS(A(K))<=ZERO) GOTO 110
+            I = IRN(K)
+            J = ICN(K)
+            R(I) = R(I) + C(J)
+110       END DO
+          S1 = S
+          S = ZERO
+          DO I = 1, N
+            V = -R(I)/Q
+            R(I) = V/W(I,1)
+            S = S + V*R(I)
+          END DO
+          E1 = E
+          E = Q*S/S1
+          Q1 = Q
+          Q = 1. - E
+!         Special fixup for last iteration.
+          IF (S<=SM) Q = 1.
+!         Update colulm scaling powers.
+          QM = Q*Q1
+          DO I = 1, N
+            W(I,4) = (EM*W(I,4)+C(I))/QM
+            W(I,3) = W(I,3) + W(I,4)
+          END DO
+          IF (S<=SM) GOTO 160
+!         Update residual.
+          DO I = 1, N
+            C(I) = C(I)*E*W(I,2)
+          END DO
+        END DO
+160     DO I = 1, N
+          R(I) = R(I)*W(I,1)
+        END DO
+
+!       Sweep through matrix to prepare to get row scaling powers.
+180     DO 190 K = 1, NA
+!         IF (A(K) == ZERO) GOTO 200
+          IF (ABS(A(K))<=ZERO) GOTO 190
+          I = IRN(K)
+          J = ICN(K)
+          R(I) = R(I) + W(J,3)
+190     END DO
+
+!       Final conversion to output values.
+        DO I = 1, N
+          R(I) = R(I)/W(I,1) - W(I,5)
+          C(I) = -W(I,3)
+        END DO
+        GOTO 220
+210     IF (LP>0) WRITE (LP,90001) IFAIL
+90001   FORMAT (' Error return ',I2,' from MC19')
+220     RETURN
+      END SUBROUTINE MC19AD
+! End of  MA28 subroutines.
+!_______________________________________________________________________
+! Beginning of JACSP routines.
+! Change Record:
+! ST 09-01-05
+!   Convert to F90 using Metcalf converter
+!   Trim trailing blanks using trimem.pl
+!   Convert arithmetic operators to F90
+!   Replace R1MACH by EPSILON
+!   Run through nag tools suite
+! ST 09-17-05
+!   Delete RDUM and IDUM
+!   Change FCN argument list
+! ST 09-18-05
+!   Add subroutine DGROUPDS to define the IGP and JGP arrays for JACSP
+! ST 09-20-05
+!   Modify JACSP to produce JACSPDB for sparse, dense, and
+!   banded Jacobians
+!_______________________________________________________________________
+
+    SUBROUTINE JACSP(FCN,N,T,Y,F,FJAC,NRFJAC,YSCALE,FAC,IOPT,WK, &
+      LWK,IWK,LIWK,MAXGRP,NGRP,JPNTR,INDROW)
+
+! BEGIN PROLOGUE JACSP
+! DATE WRITTEN 850415
+! CATEGORY NO. D4
+! KEYWORDS NUMERICAL DIFFERENCING, SPARSE JACOBIANS
+! AUTHOR SALANE, DOUGLAS E., SANDIA NATIONAL LABORATORIES
+!        NUMERICAL MATHEMATICS DIVISION,1642
+!        ALBUQUERQUE, NM 87185
+
+! SUBROUTINE JACSP USES FINITE DIFFERENCES TO COMPUTE THE JACOBIAN OF
+! A SPARSE SYSTEM OF N EQUATIONS AND N UNKNOWNS. JACSP IS DESIGNED FOR
+! USE IN NUMERICAL METHODS FOR SOLVING NONLINEAR PROBLEMS WHERE THE
+! JACOBIAN IS EVALUATED REPEATEDLY AND OFTEN AT NEIGHBORING ARGUMENTS
+! (E.G., NEWTON'S METHOD OR A BDF METHOD FOR SOVING STIFF ORDINARY
+! DIFFERENTIAL EQUATIONS). JACSP IS INTENDED FOR APPLICATIONS IN WHICH
+! THE REQUIRED JACOBIANS ARE LARGE AND SPARSE.
+
+! TAKING ADVANTAGE OF SPARSITY.
+
+! SUBROUTINE JACSP TAKES ADVANTAGE OF THE SPARSITY OF A MATRIX TO REDUCE
+! THE NUMBER OF FUNCTION EVALUATIONS REQUIRED TO COMPUTE THE JACOBIAN.
+! TO REALIZE THIS ADVANTAGE, THE USER MUST PROVIDE JACSP WITH A COLUMN
+! GROUPING. THIS MEANS THE USER MUST ASSIGN COLUMNS OF THE JACOBIAN TO
+! MUTUALLY EXCLUSIVE GROUPS BASED ON THE SPARSITY OF THE COLUMNS.THE
+! DIFFERENCES REQUIRED TO COMPUTE THE NONZERO ELEMENTS IN ALL COLUMNS IN
+! A GROUP ARE FORMED USING ONLY ONE ADDITIONAL FUNCTION EVALUATION. FOR
+! MORE DETAILS, THE USER IS REFERRED TO THE REPORT BY D.E. SALANE AND
+! L.F. SHAMPINE (REF. 1).
+
+! THE SUBROUTINE DVDSM (REF 2.) IS THE WAY MOST USERS WILL DETERMINE A
+! COLUMN GROUPING FOR JACSP. THE USE OF DSM AND JACSP IS DESCRIBED
+! LATER IN THE PROLOGUE.
+
+! STORAGE.
+
+! JACSP REQUIRES THE USER TO PROVIDE A SPARSE DATA STRUCTURE FOR THE
+! JACOBIAN TO BE COMPUTED. JACSP REQUIRES THE USER TO SPECIFY THE
+! INDICES OF THE NONZERO ELEMENTS IN A COLUMN PACKED SPARSE DATA
+! STRUCTURE (SEE REF.1). THE SUBROUTINE DVDSM( REF 2.) CAN BE USED TO
+! ESTABLISH THE SPARSE DATA STRUCTURE REQUIRED BY JACSP. THE USE OF
+! JACSP AND DSM IS DESCRIBED LATER IN THE PROLOGUE.
+
+! ON OUTPUT, SUBROUTINE JACSP WILL RETURN THE JACOBIAN IN ANY ONE OF
+! THE FOLLOWING THREE FORMATS SPECIFIED BY THE USER.
+
+! (1) FULL STORAGE FORMAT.......THE COMPUTED JACOBIAN IS STORED IN
+!      AN ARRAY WHOSE ROW AND COLUMN DIMENSIONS ARE THE NUMBER OF
+!      EQUATIONS.
+
+! (2) BANDED STORAGE FORMAT.....THE COMPUTED MATRIX IS STORED IN A TWO
+!      DIMENSIONAL ARRAY WHOSE ROW DIMENSION IS
+!      2*(NUMBER OF LOWER DIAGONALS) + (THE NUMBER OF UPPER DIAGONALS)
+!      + 1. THE COLUMN DIMENSION OF THIS ARRAY IS THE NUMBER OF
+!      EQUATIONS. THIS STORAGE FORMAT IS COMPATIBLE WITH THE LINPACK
+!      GENERAL BAND MATRIX EQUATION SOLVER.
+
+! (3) SPARSE STORAGE FORMAT.....THE COMPUTED JACOBIAN IS STORED IN A
+!      ONE DIMENSIONAL ARRAY WHOSE LENGTH IS THE NUMBER OF NONZERO
+!      ELEMENTS IN THE JACOBIAN.
+
+! DESCRIPTION
+
+!  SUBROUTINE PARAMETERS
+
+!  FCN()......A USER-PROVIDED FUNCTION (SEE SUBROUTINE DESCRIPTION).
+!  N..........THE NUMBER OF EQUATIONS.
+!  T..........A SCALAR VARIABLE. T IS PROVIDED SO USERS CAN PASS THE
+!             VALUE OF AN INDEPENDENT VARIALBE TO THE FUNCTION
+!             EVALUATION ROUTINE.
+!  Y(*).......AN ARRAY OF DIMENSION N. THE POINT AT WHICH THE
+!             JACOBIAN IS TO BE EVALUATED.
+!  F(*).......AN ARRAY OF DIMENSION N. THE EQUATIONS EVALUATED AT
+!             THE POINT Y.
+!  FJAC(*,*)..AN ARRAY OF WHOSE DIMENSIONS DEPEND ON THE STORAGE
+!      FORMAT SELECTED BY THE USER. THE ROW AND COLUMN DIMENSIONS ARE
+!      SET BY THE USER. IF THE SPARSE MATRIX FORMAT IS SELECTED, FJAC
+!      SHOULD BE TREATED AS A ONE DIMENSIONAL ARRAY BY THE CALLING
+!      PROGRAM. FOR FURTHER DETAILS, SEE THE DESCRIPTION OF THE
+!      PARAMETER IOPT(1) WHICH CONTROLS THE STORAGE FORMAT.
+
+!      NOTE THAT IF THE BANDED OR FULL OPTION IS USED,THE USER SHOULD
+!      ZERO OUT THOSE POSITIONS OF FJAC THAT WILL NOT BE ACCESSED BY
+!      JACSP. JACSP DOES NOT ZERO OUT THE MATRIX FJAC BEFORE
+!      COMPUTING THE JACOBIAN. POSITIONS OF FJAC THAT ARE NOT ASSIGNED
+!      VALUES BY JACSP WILL BE THE SAME ON EXIT AS ON ENTRY TO JACSP.
+
+!  NRFJAC.....THE NUMBER OF ROWS IN FJAC AND THE LEADING DIMENSION
+!             OF FJAC (SEE IOPT(1)).
+!  NCFJAC.....THE NUMBER OF COLUMNS IN FJAC AND THE COLUMN DIMENSION
+!             OF FJAC (SEE IOPT(1)).
+!  YSCALE(*)..AN ARRAY OF DIMENSION N. YSCALE(I) CONTAINS A
+!     REPRESENTATIVE MAGNITUDE FOR Y(I). YSCALE(I) MUST BE POSITIVE.
+!     YSCALE IS AN OPTIONAL FEATURE OF THE ROUTINE. IF THE USER DOES
+!     NOT WISH TO PROVIDE YSCALE, IT CAN BE TREATED AS A DUMMY SCALAR
+!     VARIABLE (SEE IOPT(3)).
+
+!  FAC(*).....AN ARRAY OF DIMENSION N. FAC CONTAINS A PERCENTAGE FOR
+!     USE IN COMPUTING THE INCREMENT.
+
+!     THE NORMAL WAY TO USE THE CODE IS TO LET JACSP ADJUST FAC VALUES.
+!     IN THIS CASE FAC IS INITIALIZED BY JACSP. ALSO, THE USER MUST
+!     NOT ALTER FAC VALUES BETWEEN CALLS TO JACSP.
+
+!     THE USER MAY PROVIDE FAC VALUES IF DESIRED (SEE IOPT(4) FOR
+!     DETAILS). IF THE USER PROVIDES FAC VALUES, FAC(I) SHOULD BE
+!     SHOULD BE SET TO A VALUE BETWEEN O AND 1. JACSP WILL NOT PERMIT
+!     FAC(I) TO BE SET TO A VALUE THAT RESULTS IN TOO SMALL AN
+!     INCREMENT. JACSP ENSURES THAT
+!                     FACMIN <= FAC(I) <= FACMAX.
+!     FOR FURTHER DETAILS ON FACMIN AND FACMAX SEE
+!     THE REPORT(REF.3).
+
+!  IOPT(*)....AN INTEGER ARRAY OF LENGTH 5 FOR USER SELECTED OPTIONS.
+
+!          IOPT(1) CONTROLS THE STORAGE FORMAT.
+
+!             IOPT(1) = 0 INDICATES FULL STORAGE FORMAT. SET BOTH
+!             NRFJAC = N AMD NCFJAC = N.
+
+!             IOPT(1) = 1 INDICATES BANDED STORAGE FORMAT. SET
+!             NRFJAC = 2 * ML + MU + 1 WHERE
+!             ML = NUMBER OF SUB-DIAGONALS BELOW THE MAIN DIAGONAL AND
+!             MU = NUMBER OF SUPER-DIAGONALS ABOVE THE MAIN DIAGONAL.
+!             SET NCFJAC = N.
+
+!             IOPT(1) = 2 INDICATES SPARSE STORAGE FORMAT. SET
+!             NRFJAC = TO THE NUMBER OF NONZEROS IN THE JACOBIAN AND
+!             SET NCFJAC = 1.
+
+!          IOPT(2) MUST BE SET TO THE BANDWIDTH OF THE MATRIX.
+!          IOPT(2) NEED ONLY BE PROVIDED IF BANDED STORAGE
+!          FORMAT IS REQUESTED(I.E., IOPT(1) = 1).
+
+!          IOPT(3) ALLOWS THE USER TO PROVIDE TYPICAL VALUES
+!          TO BE USED IN COMPUTING INCREMENTS FOR DIFFERENCING.
+
+!             IOPT(3) = 0 INDICATES Y VALUES ARE USED IN COMPUTING
+!             INCREMENTS. IF IOPT(3) = 0, NO STORAGE IS REQUIRED FOR
+!             YSCALE AND IT MAY BE TREATED AS A DUMMY VARIABLE.
+
+!             IOPT(3) = 1 INDICATES THAT YSCALE VALUES ARE TO BE USED.
+!             IF IOPT(3) = 1, THE USER MUST PROVIDE AN ARRAY OF NONZERO
+!             VALUES IN YSCALE.
+
+!          IOPT(4) ALLOWS THE USER TO PROVIDE THE VALUES USED
+!          IN THE FAC ARRAY TO COMPUTE INCREMENTS FOR DIFFERENCING.
+
+!             IF IOPT(4) = 0, EACH COMPONENT OF FAC IS
+!             SET TO THE SQUARE ROOT OF MACHINE UNIT ROUNDOFF ON THE
+!             FIRST CALL TO JACSP. IOPT(4) IS SET TO ONE ON RETURN.
+
+!             IF IOPT(4) = 1, EACH COMPONENT OF FAC MUST BE SET
+!             BY THE CALLING ROUTINE. UNLESS THE USER WISHES TO
+!             INITIALIZE FAC, THE FAC ARRAY SHOULD NOT BE ALTERED
+!             BETWEEN SUBSEQUENT CALLS TO JACSP. ALSO, THE USER
+!             SHOULD NOT CHANGE THE VALUE OF IOPT(4) RETURNED BY
+!             JACSP.
+
+!          IOPT(5) IS NOT USED IN JACSP.
+
+!  WK(*)......A WORK ARRAY OF DIMENSION AT LEAST 3*N
+!  LWK........THE LENGTH OF THE WORK ARRAY. LWK IS AT LEAST 3*N.
+!  IWK(*)...AN INTEGER ARRAY OF LENGTH LIWK = 50 + N WHICH GIVES
+!      DIAGNOSTIC INFORMATION IN POSITIONS 1 THROUGH 50. POSITIONS 51
+!      THROUGH 50 + N ARE USED AS INTEGER WORKSPACE.
+
+!      IWK(1) GIVES THE NUMBER OF TIMES THE INCREMENT FOR DIFFERENCING
+!      (DEL) WAS COMPUTED AND HAD TO BE INCREASED BECAUSE (Y(JCOL)+DEL)
+!      -Y(JCOL)) WAS TOO SMALL RELATIVE TO Y(JCOL) OR YSCALE(JCOL).
+
+!      IWK(2) GIVES THE NUMBER OF COLUMNS IN WHICH THREE ATTEMPTS WERE
+!      MADE TO INCREASE A PERCENTAGE FACTOR FOR DIFFERENCING (I.E., A
+!      COMPONENT IN THE FAC ARRAY) BUT THE COMPUTED DEL REMAINED
+!      UNACCEPTABLY SMALL RELATIVE TO Y(JCOL) OR YSCALE(JCOL). IN SUCH
+!      CASES THE PERCENTAGE FACTOR IS SET TO THE SQUARE ROOT OF THE UNIT
+!      ROUNDOFF OF THE MACHINE. THE FIRST 10 COLUMNS ARE GIVEN IN
+!      IWK(21),...,IWK(30).
+
+!      IWK(3) GIVES THE NUMBER OF COLUMNS IN WHICH THE COMPUTED DEL WAS
+!      ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) OR YSCALE(JCOL) WAS
+!      ZERO. IN SUCH CASES DEL IS SET TO THE SQUARE ROOT OF THE UNIT
+!      ROUNDOFF.
+
+!      IWK(4) GIVES THE NUMBER OF COLUMNS WHICH HAD TO BE RECOMPUTED
+!      BECAUSE THE LARGEST DIFFERENCE FORMED IN THE COLUMN WAS VERY
+!      CLOSE TO ZERO RELATIVE TO SCALE WHERE
+
+!                    SCALE = MAX(F(Y),F(Y+DEL))
+!                                 I     I
+
+!      AND I DENOTES THE ROW INDEX OF THE LARGEST DIFFERENCE IN THE
+!      COLUMN CURRENTLY BEING PROCESSED. IWK(31),...,IWK(40) GIVES THE
+!      FIRST 10 OF THESE COLUMNS.
+
+!      IWK(5) GIVES THE NUMBER OF COLUMNS WHOSE LARGEST DIFFERENCE IS
+!      CLOSE TO ZERO RELATIVE TO SCALE AFTER THE COLUMN HAS BEEN
+!      RECOMPUTED. THE FIRST 10 OF THESE COLUMNS ARE GIVEN IN POSITIONS
+!      IWK(41)...IWK(50).
+!      IWK(6) GIVES THE NUMBER OF TIMES SCALE INFORMATION WAS NOT
+!      AVAILABLE FOR USE IN THE ROUNDOFF AND TRUNCATION ERROR TESTS.
+!      THIS OCCURS WHEN
+!                    MIN(F(Y),F(Y+DEL)) = 0.
+!                          I     I
+!      WHERE I IS THE INDEX OF THE LARGEST DIFFERENCE FOR THE COLUMN
+!      CURRENTLY BEING PROCESSED.
+!      IWK(7) GIVES THE NUMBER OF TIMES THE FUNCTION EVALUATION ROUTINE
+!      WAS CALLED.
+!      IWK(8) GIVES THE NUMBER OF TIMES A COMPONENT OF THE FAC ARRAY WAS
+!      REDUCED BECAUSE CHANGES IN FUNCTION VALUES WERE LARGE AND EXCESS
+!      TRUNCATION ERROR WAS SUSPECTED. IWK(11),...,IWK(20) GIVES THE FIRST
+!      10 OF THESE COLUMNS.
+!      IWK(9) AND IWK(10) ARE NOT USED IN JACSP.
+!  LIWK.....THE LENGTH OF THE ARRAY IWK. LIWK = 50 + N.
+!      THE FOLLOWING PARAMETERS MAY BE PROVIDED BY THE USER OR
+!      INITIALIZED BY THE SUBROUTINE DVDSM (SEE LONG DESCRIPTION
+!      SECTION OF THE PROLOGUE).
+!  PARAMETERS CONTAINING COLUMN GROUPING:
+!  MAXGRP.....THE NUMBER OF DIFFERENT GROUPS TO WHICH THE COLUMNS
+!             HAVE BEEN ASSIGNED.
+!  NGRP(*)....AN ARRAY OF LENGTH N THAT CONTAINS THE COLUMN GROUPING.
+!             NGRP(I) IS THE GROUP TO WHICH THE I-TH COLUMN HAS BEEN
+!             ASSIGNED.
+!             (SEE USE OF DSM AND JACSP FOR DETERMINING MAXGRP AND NGRP)
+!  PARAMETERS CONTAINING THE SPARSE DATA STRUCTURE:
+!  JPNTR(*)...AN ARRAY OF LENGTH N+1 THAT CONTAINS POINTERS TO
+!             THE ROW INDICES IN INDROW (SEE INDROW).
+!  INDROW(*)..AN ARRAY WHOSE LENGTH IS THE NUMBER OF NONZERO ELEMENTS
+!             IN THE JACOBIAN. INDROW CONTAINS THE ROW INDICES
+!             STORED IN COLUMN PACKED FORMAT. IN OTHER WORDS, THE
+!             ROW INDICES OF THE NONZERO ELEMENTS OF A GIVEN
+!             COLUMN OF THE JACOBIAN ARE STORED CONTIGUOUSLY IN
+!             INDROW. JPNTR(JCOL) POINTS TO THE ROW INDEX OF THE FIRST
+!             NONZERO ELEMENT IN THE COLUMN JCOL. JPNTR(JCOL+1) - 1
+!             POINTS TO THE ROW INDEX OF THE LAST NONZERO ELEMENT IN
+!             THE COLUMN JCOL.
+!             (SEE USE OF DSM AND JACSP FOR DETERMINING INDROW AND JPNTR)
+!  REQUIRED SUBROUTINES: SUBROUTINE FCN(N,T,Y,F)
+!     T......AN INDEPENDENT SCALAR VARIABLE WHICH MAY BE USED
+!           IN EVALUATING F(E.G., F(Y(T),T)).
+!     Y(*)...AN ARRAY OF DIMENSION N WHICH CONTAINS THE POINT AT
+!            WHICH THE EQUATIONS ARE TO BE EVALUATED.
+!     F(*)...AN ARRAY OF DIMENSION N WHICH ON RETURN FROM FCN
+!            CONTAINS THE EQUATIONS EVALUATED AT Y.
+
+! LONG DESCRIPTION
+
+! ROUNDOFF AND TRUNCATION ERRORS.
+! SUBROUTINE JACSP TAKES ADVANTAGE OF THE WAY IN WHICH THE JACOBIAN
+! IS EVALUATED TO ADJUST INCREMENTS FOR DIFFERENCING TO CONTROL
+! ROUNDOFF AND TRUNCATION ERRORS. THE ROUTINE SELDOM REQUIRES MORE
+! THAN ONE ADDITIONAL FUNCTION EVALUATION TO COMPUTE A COLUMN OF THE
+! JACOBIAN. ALSO, THE ROUTINE RETURNS A VARIETY OF ERROR DIAGNOSTICS
+! TO WARN USERS WHEN COMPUTED DERIVATIVES MAY NOT BE ACCURATE.
+! WARNING: JACSP CAN NOT GUARANTEE THE ACCURACY OF THE COMPUTED
+! DERIVATIVES. IN ORDER O SAVE ON FUNCTION EVALUATIONS, HEURISTIC
+! TECNIQUES FOR INCREMENT ADJUSTMENT AND SAFEGUARDING INCREMENTS ARE
+! USED. THESE USUALLY WORK WELL.
+! WARNING: SOME OF THE DIAGNOSTICS RETURNED CAN ONLY BE INTERPRETED
+! WITH A DETAILED KNOWLEDGE OF THE ROUTINE. NEVERTHELESS, THEY ARE
+! PROVIDED TO GIVE USERS FULL ACCESS TO THE INFORMATION PRODUCED BY
+! THE SUBROUTINE.
+! USE OF DSM AND JACSP.
+! SUBROUTINE DVDSM CAN BE USED TO DETERMINE THE COLUMN GROUPING (MAXGRP
+! AND NGRP(*)) AND THE SPARSE DATA STRUCTURE VARIABLES (JPNTR(*) AND
+! INDROW(*)). THE USER CAN CALL DVDSM ONCE TO INITIALIZE
+! MAXGRP,NGRP,JPNTR AND INDROW. JACSP MAY THEN BE CALLED REPEATEDLY TO
+! EVALUATE THE JACOBIAN. THE FOLLOWING ARE THE IMPORTANT VARIABLES IN
+! THE DSM CALLING SEQUENCE.
+! SUBROUTINE DVDSM(...,INDROW,INDCOL,NGRP,MAXGRP,..,JPNTR,...)
+! ON INPUT, THE USER MUST PROVIDE DSM WITH THE INTEGER ARRAYS INDROW AND
+! INDCOL. THE PAIR
+!                  (INDROW(I),INDCOL(I))
+! PROVIDES THE INDEX OF A NONZERO ELEMENT OF THE JACOBIAN. THE LENGTH OF
+! INDROW AND INDCOL IS THE NUMBER OF NONZERO ELEMENTS IN THE JACOBIAN.
+! NO ORDERING OF THE INDICES FOR NONZERO ELEMENTS IS REQUIRED IN THE
+! ARRAYS INDROW AND INDCOL.
+! ON RETURN FROM DSM, MAXGRP,NGRP,INDROW,JPNTR ARE INITIALIZED
+! FOR INPUT TO JACSP. THE USER MUST NOT CHANGE MAXGRP,NGRP,JPNTR OR
+! INDROW AFTER CALLING DSM.
+! WE REFER THE READER TO THE IN CODE DOCUMENTATION FOR DSM OR THE REPORT
+! BY MORE AND COLEMAN (REF 2.) FOR FURTHER DETAILS.
+! REFERENCES
+!  (1) D.E. SALANE AND L. F. SHAMPINE
+!      "AN ECONOMICAL AND EFFICIENT ROUTINE FOR COMPUTING
+!      SPARSE JACOBIANS", REPORT NO. SAND85-0977, SANDIA NATIONAL
+!      LABORATORIES, ALBUQUERQUE,NM,87185.
+!  (2) T.F. COLEMAN AND J.J. MORE
+!      "SOFTWARE FOR ESTIMATING SPARSE JACOBIAN MATRICES" ACM TOMS,
+!      V10.,N0.3,SEPT. 1984.
+!  (3) D.E. SALANE AND L. F. SHAMPINE
+!      "THREE ADAPTIVE ROUTINES FOR FORMING JACOBIANS NUMERICALLY,"
+!       REPORT NO. SAND86- ****, SANDIA NATIONAL LABORATORIES,
+!       ALBUQUERQUE, NM, 87185.
+!  REQUIRED FORTRAN INTRINSIC FUNCTIONS: MAX,MIN,ABS,SIGN
+!  MACHINE DEPENDENT CONSTANT: U (MACHINE UNIT ROUNDOFF)
+!  JACSP SETS THE REQUIRED MACHINE CONSTANT USING THE F90
+!  INTRINSIC EPSILON.
+!  END PROLOGUE JACSP
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      REAL (WP) :: T
+      INTEGER :: LIWK, LWK, MAXGRP, N, NRFJAC
+! ..
+! .. Array Arguments ..
+      REAL (WP) :: F(N), FAC(N), FJAC(NRFJAC,*), WK(LWK), Y(N), YSCALE(*)
+      INTEGER :: INDROW(*), IOPT(5), IWK(LIWK), JPNTR(*), NGRP(N)
+! ..
+! .. Subroutine Arguments ..
+      EXTERNAL FCN
+! ..
+! .. Local Scalars ..
+      REAL (WP) :: ADIFF, AY, DEL, DELM, DFMJ, DIFF, DMAX, EXPFMN, FACMAX, &
+        FACMIN, FJACL, FMJ, ONE, P125, P25, P75, P875, PERT, RDEL, RMNFDF, &
+        RMXFDF, SDF, SF, SGN, T1, T2, U, U3QRT, U7EGT, UEGT, UMEGT, UQRT, &
+        USQT, ZERO
+      INTEGER :: IDXL, IDXU, IFLAG1, IFLAG2, IRCMP, IRDEL, IROW, IROWB, &
+        IROWMX, ITRY, J, JCOL, KT1, KT2, KT3, KT4, KT5, L, NID1, NID2, NID3, &
+        NID4, NID5, NID6, NIFAC, NT2, NUMGRP
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC ABS, EPSILON, KIND, MAX, MIN, SIGN, SQRT
+      INTRINSIC ABS, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! .. Data Statements ..
+      DATA PERT/2.0E+0_WP/, FACMAX/1.E-1_WP/, EXPFMN/.75E+0_WP/
+      DATA ONE/1.0E0_WP/, ZERO/0.0E0_WP/
+      DATA P125/.125E+0_WP/, P25/.25E+0_WP/, P75/.75E+0_WP/, P875/.875E+0_WP/
+      DATA NIFAC/3/, NID1/10/, NID2/20/, NID3/30/, NID4/40/, NID5/50/
+! ..
+!     COMPUTE ALGORITHM AND MACHINE CONSTANTS.
+! ..
+! ..  FIRST EXECUTABLE STATEMENT JACSP
+! ..
+      U = EPSILON(ONE)
+      USQT = SQRT(U)
+      UEGT = U**P125
+      UMEGT = ONE/UEGT
+      UQRT = U**P25
+      U3QRT = U**P75
+      U7EGT = U**P875
+      FACMIN = U**EXPFMN
+
+      IF (IOPT(4) == 0) THEN
+        IOPT(4) = 1
+        DO 10 J = 1, N
+          FAC(J) = USQT
+10      CONTINUE
+      END IF
+      DO 20 J = 1, 50
+        IWK(J) = 0
+20    CONTINUE
+      KT1 = NID1
+      KT2 = NID2
+      KT3 = NID3
+      KT4 = NID4
+      KT5 = NID5
+      NID6 = LIWK
+      NT2 = 2*N
+      DO NUMGRP = 1, MAXGRP
+!       COMPUTE AND SAVE THE INCREMENTS FOR THE COLUMNS IN GROUP NUMGRP.
+        IRCMP = 0
+        ITRY = 0
+        DO 30 J = NID5 + 1, NID6
+          IWK(J) = 0
+30      CONTINUE
+40      CONTINUE
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            WK(N+JCOL) = Y(JCOL)
+!           COMPUTE DEL. IF DEL IS TOO SMALL INCREASE FAC(JCOL) AND RECOMPUTE
+!           DEL. NIFAC ATTEMPTS ARE MADE TO INCREASE FAC(JCOL) AND FIND AN
+!           APPROPRIATE DEL. IF DEL CANT BE FOUND IN THIS MANNER, DEL IS COMPUTED
+!           WITH FAC(JCOL) SET TO THE SQUARE ROOT OF THE MACHINE PRECISION (USQT).
+!           IF DEL IS ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) IS ZERO OR
+!           YSCALE(JCOL) IS ZERO, DEL IS SET TO USQT.
+            SGN = SIGN(ONE,F(JCOL))
+            IRDEL = 0
+            IF (IOPT(3) == 1) THEN
+              AY = ABS(YSCALE(JCOL))
+            ELSE
+              AY = ABS(Y(JCOL))
+            END IF
+            DELM = U7EGT*AY
+
+            DO 50 J = 1, NIFAC
+              DEL = FAC(JCOL)*AY*SGN
+!             IF (DEL == ZERO) THEN
+              IF (ABS(DEL) <= ZERO) THEN
+
+                DEL = USQT*SGN
+                IF (ITRY == 0) IWK(3) = IWK(3) + 1
+              END IF
+              T1 = Y(JCOL) + DEL
+              DEL = T1 - Y(JCOL)
+              IF (ABS(DEL) < DELM) THEN
+                IF (J >= NIFAC) GOTO 50
+                IF (IRDEL == 0) THEN
+                  IRDEL = 1
+                  IWK(1) = IWK(1) + 1
+                END IF
+                T1 = FAC(JCOL)*UMEGT
+                FAC(JCOL) = MIN(T1,FACMAX)
+              ELSE
+                GOTO 60
+              END IF
+50          END DO
+
+            FAC(JCOL) = USQT
+            DEL = USQT*AY*SGN
+            IWK(2) = IWK(2) + 1
+            IF (KT2 < NID3) THEN
+              KT2 = KT2 + 1
+              IWK(KT2) = JCOL
+            END IF
+
+60          CONTINUE
+            WK(NT2+JCOL) = DEL
+            Y(JCOL) = Y(JCOL) + DEL
+          END IF
+        END DO
+
+        IWK(7) = IWK(7) + 1
+        CALL FCN(N,T,Y,WK)
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) Y(JCOL) = WK(N+JCOL)
+        END DO
+
+!       COMPUTE THE JACOBIAN ENTRIES FOR ALL COLUMNS IN NUMGRP.
+!       STORE ENTRIES ACCORDING TO SELECTED STORAGE FORMAT.
+!       USE LARGEST ELEMENTS IN A COLUMN TO DETERMINE SCALING
+!       INFORMATION FOR ROUNDOFF AND TRUNCATION ERROR TESTS.
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            IDXL = JPNTR(JCOL)
+            IDXU = JPNTR(JCOL+1) - 1
+            DMAX = ZERO
+            RDEL = ONE/WK(NT2+JCOL)
+            IROWMX = 1
+            DO L = IDXL, IDXU
+              IROW = INDROW(L)
+              DIFF = WK(IROW) - F(IROW)
+              ADIFF = ABS(DIFF)
+              IF (ADIFF >= DMAX) THEN
+                IROWMX = IROW
+                DMAX = ADIFF
+                SF = F(IROW)
+                SDF = WK(IROW)
+              END IF
+              FJACL = DIFF*RDEL
+              IF (ITRY == 1) WK(IROW) = FJACL
+
+              IF (IOPT(1) == 0) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROW,JCOL)
+                FJAC(IROW,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 1) THEN
+                IROWB = IROW - JCOL + IOPT(2)
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,JCOL)
+                FJAC(IROWB,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 2) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(L,1)
+                FJAC(L,1) = FJACL
+              END IF
+            END DO
+
+!           IF A COLUMN IS BEING RECOMPUTED (ITRY=1),THIS SECTION OF THE
+!           CODE PERFORMS AN EXTRAPOLATION TEST TO ENABLE THE CODE TO
+!           COMPUTE SMALL DERIVATIVES MORE ACCURATELY. THIS TEST IS ONLY
+!           PERFORMED ON THOSE COLUMNS WHOSE LARGEST DIFFERENCE IS CLOSE
+!           TO ZERO RELATIVE TO SCALE.
+            IF (ITRY == 1) THEN
+              IFLAG1 = 0
+              IFLAG2 = 0
+              DO 100 J = NID5 + 1, NID6
+                IF (IWK(J) == JCOL) IFLAG1 = 1
+100           CONTINUE
+              IF (IFLAG1 == 1) THEN
+                IFLAG1 = 0
+                T1 = WK(IROWMX+N)
+                T2 = WK(IROWMX)*FAC(JCOL)
+                IF (ABS(T2) < ABS(T1)*PERT) IFLAG2 = 1
+              END IF
+
+              IF (IFLAG2 == 1) THEN
+                IFLAG2 = 0
+                T1 = FAC(JCOL)*FAC(JCOL)
+                FAC(JCOL) = MAX(T1,FACMIN)
+                DO L = IDXL, IDXU
+                  IROW = INDROW(L)
+                  FJACL = WK(IROW+N)
+                  IF (IOPT(1) == 0) FJAC(IROW,JCOL) = FJACL
+                  IF (IOPT(1) == 1) THEN
+                    IROWB = IROW - JCOL + IOPT(2)
+                    FJAC(IROWB,JCOL) = FJACL
+                  END IF
+                  IF (IOPT(1) == 2) FJAC(L,1) = FJACL
+                END DO
+              END IF
+            END IF
+
+            FMJ = ABS(SF)
+            DFMJ = ABS(SDF)
+            RMXFDF = MAX(FMJ,DFMJ)
+            RMNFDF = MIN(FMJ,DFMJ)
+
+!           IF SCALE INFORMATION IS NOT AVAILABLE, PERFORM NO ROUNDOFF
+!           OR TRUNCATION ERROR TESTS. IF THE EXTRAPOLATION TEST HAS
+!           CAUSED FAC(JCOL) TO BE RESET TO ITS PREVIOUS VALUE (IAJAC=1)
+!           THEN NO FURTHER ROUNDOFF OR TRUNCATION ERROR TESTS ARE
+!           PERFORMED.
+!           IF (RMNFDF/=ZERO) THEN
+            IF (ABS(RMNFDF) > ZERO) THEN
+!             TEST FOR POSSIBLE ROUNDOFF ERROR (FIRST TEST)
+!             AND ALSO FOR POSSIBLE SERIOUS ROUNDOFF ERROR (SECOND TEST).
+              IF (DMAX <= (U3QRT*RMXFDF)) THEN
+                IF (DMAX <= (U7EGT*RMXFDF)) THEN
+                  IF (ITRY == 0) THEN
+                    T1 = SQRT(FAC(JCOL))
+                    FAC(JCOL) = MIN(T1,FACMAX)
+                    IRCMP = 1
+                    IF (KT5 < NID6) THEN
+                      KT5 = KT5 + 1
+                      IWK(KT5) = JCOL
+                    END IF
+                    IWK(4) = IWK(4) + 1
+                    IF (KT3 < NID4) THEN
+                      KT3 = KT3 + 1
+                      IWK(KT3) = JCOL
+                    END IF
+                  ELSE
+                    IWK(5) = IWK(5) + 1
+                    IF (KT4 < NID5) THEN
+                      KT4 = KT4 + 1
+                      IWK(KT4) = JCOL
+                    END IF
+                  END IF
+                ELSE
+                  T1 = UMEGT*FAC(JCOL)
+                  FAC(JCOL) = MIN(T1,FACMAX)
+                END IF
+              END IF
+!             TEST FOR POSSIBLE TRUNCATION ERROR.
+              IF (DMAX > UQRT*RMXFDF) THEN
+                T1 = FAC(JCOL)*UEGT
+                FAC(JCOL) = MAX(T1,FACMIN)
+                IWK(8) = IWK(8) + 1
+                IF (KT1 < NID2) THEN
+                  KT1 = KT1 + 1
+                  IWK(KT1) = JCOL
+                END IF
+              END IF
+            ELSE
+              IWK(6) = IWK(6) + 1
+            END IF
+          END IF
+        END DO
+
+!       IF SERIOUS ROUNDOFF ERROR IS SUSPECTED, RECOMPUTE ALL
+!       COLUMNS IN GROUP NUMGRP.
+        IF (IRCMP == 1) THEN
+          IRCMP = 0
+          ITRY = 1
+          GOTO 40
+        END IF
+        ITRY = 0
+      END DO
+      RETURN
+
+    END SUBROUTINE JACSP
+!_______________________________________________________________________
+
+    SUBROUTINE DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,IWA)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A,
+!     THIS SUBROUTINE DETERMINES THE DEGREE SEQUENCE FOR
+!     THE INTERSECTION GRAPH OF THE COLUMNS OF A.
+!     IN GRAPH-THEORY TERMINOLOGY, THE INTERSECTION GRAPH OF
+!     THE COLUMNS OF A IS THE LOOPLESS GRAPH G WITH VERTICES
+!     A(J), J = 1,2,...,N WHERE A(J) IS THE J-TH COLUMN OF A
+!     AND WITH EDGE (A(I),A(J)) IF AND ONLY IF COLUMNS I AND J
+!     HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY DEGR AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH
+!         SPECIFIES THE DEGREE SEQUENCE. THE DEGREE OF THE
+!         J-TH COLUMN OF A IS NDEG(J).
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA(N), JPNTR(N+1), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT DEGR
+! ..
+!     INITIALIZATION BLOCK.
+      NDEG(1:N) = 0
+      IWA(1:N) = 0
+
+!     COMPUTE THE DEGREE SEQUENCE BY DETERMINING THE CONTRIBUTIONS
+!     TO THE DEGREES FROM THE CURRENT (JCOL) COLUMN AND FURTHER
+!     COLUMNS WHICH HAVE NOT YET BEEN CONSIDERED.
+      DO JCOL = 2, N
+        IWA(JCOL) = N
+!       DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!       TO NON-ZEROES IN THE MATRIX.
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+!         FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!         WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+          DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+            IC = INDCOL(IP)
+!           ARRAY IWA MARKS COLUMNS WHICH HAVE CONTRIBUTED TO
+!           THE DEGREE COUNT OF COLUMN JCOL. UPDATE THE DEGREE
+!           COUNTS OF THESE COLUMNS AS WELL AS COLUMN JCOL.
+            IF (IWA(IC) < JCOL) THEN
+              IWA(IC) = JCOL
+              NDEG(IC) = NDEG(IC) + 1
+              NDEG(JCOL) = NDEG(JCOL) + 1
+            END IF
+          END DO
+        END DO
+      END DO
+      RETURN
+
+    END SUBROUTINE DEGR
+!_______________________________________________________________________
+
+    SUBROUTINE IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,MAXCLQ, &
+      IWA1,IWA2,IWA3,IWA4)
+
+!     SUBROUTINE IDO
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES AN INCIDENCE-DEGREE ORDERING OF THE
+!     COLUMNS OF A.
+!     THE INCIDENCE-DEGREE ORDERING IS DEFINED FOR THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE (A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     THE INCIDENCE-DEGREE ORDERING IS DETERMINED RECURSIVELY BY
+!     LETTING LIST(K), K = 1,...,N BE A COLUMN WITH MAXIMAL
+!     INCIDENCE TO THE SUBGRAPH SPANNED BY THE ORDERED COLUMNS.
+!     AMONG ALL THE COLUMNS OF MAXIMAL INCIDENCE, IDO CHOOSES A
+!     COLUMN OF MAXIMAL DEGREE.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,
+!                      MAXCLQ,IWA1,IWA2,IWA3,IWA4)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE DEGREE SEQUENCE. THE DEGREE OF THE J-TH COLUMN
+!         OF A IS NDEG(J).
+!       LIST IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE INCIDENCE-DEGREE ORDERING OF THE COLUMNS OF A. THE J-TH
+!         COLUMN IN THIS ORDER IS LIST(J).
+!       MAXCLQ IS AN INTEGER OUTPUT VARIABLE SET TO THE SIZE
+!         OF THE LARGEST CLIQUE FOUND DURING THE ORDERING.
+!       IWA1,IWA2,IWA3, AND IWA4 ARE INTEGER WORK ARRAYS OF LENGTH N.
+!     SUBPROGRAMS CALLED
+!       MINPACK-SUPPLIED ... NUMSRT
+!       INTRINSIC ... MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: M, MAXCLQ, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(M+1), IWA1(0:N-1), IWA2(N), &
+        IWA3(N), IWA4(N), JPNTR(N+1), LIST(N), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP, MAXINC, MAXLST, NCOMP, NUMINC, NUMLST, &
+        NUMORD, NUMWGT
+! ..
+! .. External Subroutines ..
+!     EXTERNAL NUMSRT
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT IDO
+! ..
+!     SORT THE DEGREE SEQUENCE.
+      CALL NUMSRT(N,N-1,NDEG,-1,IWA4,IWA2,IWA3)
+
+!     INITIALIZATION BLOCK.
+
+!     CREATE A DOUBLY-LINKED LIST TO ACCESS THE INCIDENCES OF THE
+!     COLUMNS. THE POINTERS FOR THE LINKED LIST ARE AS FOLLOWS.
+
+!     EACH UNORDERED COLUMN IC IS IN A LIST (THE INCIDENCE LIST)
+!     OF COLUMNS WITH THE SAME INCIDENCE.
+
+!     IWA1(NUMINC) IS THE FIRST COLUMN IN THE NUMINC LIST
+!     UNLESS IWA1(NUMINC) = 0. IN THIS CASE THERE ARE
+!     NO COLUMNS IN THE NUMINC LIST.
+
+!     IWA2(IC) IS THE COLUMN BEFORE IC IN THE INCIDENCE LIST
+!     UNLESS IWA2(IC) = 0. IN THIS CASE IC IS THE FIRST
+!     COLUMN IN THIS INCIDENCE LIST.
+
+!     IWA3(IC) IS THE COLUMN AFTER IC IN THE INCIDENCE LIST
+!     UNLESS IWA3(IC) = 0. IN THIS CASE IC IS THE LAST
+!     COLUMN IN THIS INCIDENCE LIST.
+
+!     IF IC IS AN UN-ORDERED COLUMN, THEN LIST(IC) IS THE
+!     INCIDENCE OF IC TO THE GRAPH INDUCED BY THE ORDERED
+!     COLUMNS. IF JCOL IS AN ORDERED COLUMN, THEN LIST(JCOL)
+!     IS THE INCIDENCE-DEGREE ORDER OF COLUMN JCOL.
+
+      MAXINC = 0
+      DO JP = N, 1, -1
+        IC = IWA4(JP)
+        IWA1(N-JP) = 0
+        IWA2(IC) = 0
+        IWA3(IC) = IWA1(0)
+        IF (IWA1(0) > 0) IWA2(IWA1(0)) = IC
+        IWA1(0) = IC
+        IWA4(JP) = 0
+        LIST(JP) = 0
+      END DO
+
+!     DETERMINE THE MAXIMAL SEARCH LENGTH FOR THE LIST
+!     OF COLUMNS OF MAXIMAL INCIDENCE.
+      MAXLST = 0
+      DO IR = 1, M
+        MAXLST = MAXLST + (IPNTR(IR+1)-IPNTR(IR))**2
+      END DO
+      MAXLST = MAXLST/N
+      MAXCLQ = 0
+      NUMORD = 1
+
+!     BEGINNING OF ITERATION LOOP.
+
+30    CONTINUE
+
+!     UPDATE THE SIZE OF THE LARGEST CLIQUE
+!     FOUND DURING THE ORDERING.
+      IF (MAXINC == 0) NCOMP = 0
+      NCOMP = NCOMP + 1
+      IF (MAXINC+1 == NCOMP) MAXCLQ = MAX(MAXCLQ,NCOMP)
+
+!     CHOOSE A COLUMN JCOL OF MAXIMAL DEGREE AMONG THE
+!     COLUMNS OF MAXIMAL INCIDENCE MAXINC.
+40    CONTINUE
+      JP = IWA1(MAXINC)
+      IF (JP > 0) GOTO 50
+      MAXINC = MAXINC - 1
+      GOTO 40
+50    CONTINUE
+      NUMWGT = -1
+      DO NUMLST = 1, MAXLST
+        IF (NDEG(JP) > NUMWGT) THEN
+          NUMWGT = NDEG(JP)
+          JCOL = JP
+        END IF
+        JP = IWA3(JP)
+        IF (JP <= 0) GOTO 70
+      END DO
+70    CONTINUE
+      LIST(JCOL) = NUMORD
+      NUMORD = NUMORD + 1
+
+!     TERMINATION TEST.
+      IF (NUMORD > N) GOTO 100
+
+!     DELETE COLUMN JCOL FROM THE MAXINC LIST.
+      IF (IWA2(JCOL) == 0) THEN
+        IWA1(MAXINC) = IWA3(JCOL)
+      ELSE
+        IWA3(IWA2(JCOL)) = IWA3(JCOL)
+      END IF
+      IF (IWA3(JCOL) > 0) IWA2(IWA3(JCOL)) = IWA2(JCOL)
+
+!     FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+      IWA4(JCOL) = N
+
+!     DETERMINE ALL POSITIONS(IR,JCOL) WHICH CORRESPOND
+!     TO NON-ZEROES IN THE MATRIX.
+      DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+        IR = INDROW(JP)
+!       FOR EACH ROW IR, DETERMINE ALL POSITIONS(IR,IC)
+!       WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+        DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+          IC = INDCOL(IP)
+!         ARRAY IWA4 MARKS COLUMNS WHICH ARE ADJACENT TO
+!         COLUMN JCOL.
+          IF (IWA4(IC) < NUMORD) THEN
+            IWA4(IC) = NUMORD
+!           UPDATE THE POINTERS TO THE CURRENT INCIDENCE LISTS.
+            NUMINC = LIST(IC)
+            LIST(IC) = LIST(IC) + 1
+            MAXINC = MAX(MAXINC,LIST(IC))
+!           DELETE COLUMN IC FROM THE NUMINC LIST.
+            IF (IWA2(IC) == 0) THEN
+              IWA1(NUMINC) = IWA3(IC)
+            ELSE
+              IWA3(IWA2(IC)) = IWA3(IC)
+            END IF
+            IF (IWA3(IC) > 0) IWA2(IWA3(IC)) = IWA2(IC)
+!           ADD COLUMN IC TO THE NUMINC+1 LIST.
+            IWA2(IC) = 0
+            IWA3(IC) = IWA1(NUMINC+1)
+            IF (IWA1(NUMINC+1) > 0) IWA2(IWA1(NUMINC+1)) = IC
+            IWA1(NUMINC+1) = IC
+          END IF
+        END DO
+      END DO
+!     END OF ITERATION LOOP.
+      GOTO 30
+100   CONTINUE
+!     INVERT THE ARRAY LIST.
+      DO JCOL = 1, N
+        IWA2(LIST(JCOL)) = JCOL
+      END DO
+      LIST(1:N) = IWA2(1:N)
+      RETURN
+
+    END SUBROUTINE IDO
+!_______________________________________________________________________
+
+    SUBROUTINE NUMSRT(N,NMAX,NUM,MODE,INDEX,LAST,NEXT)
+
+!     GIVEN A SEQUENCE OF INTEGERS, THIS SUBROUTINE GROUPS TOGETHER THOSE
+!     INDICES WITH THE SAME SEQUENCE VALUE AND, OPTIONALLY, SORTS THE
+!     SEQUENCE INTO EITHER ASCENDING OR DESCENDING ORDER. THE SEQUENCE
+!     OF INTEGERS IS DEFINED BY THE ARRAY NUM, AND IT IS ASSUMED THAT THE
+!     INTEGERS ARE EACH FROM THE SET 0,1,...,NMAX. ON OUTPUT THE INDICES
+!     K SUCH THAT NUM(K) = L FOR ANY L = 0,1,...,NMAX CAN BE OBTAINED
+!     FROM THE ARRAYS LAST AND NEXT AS FOLLOWS.
+!           K = LAST(L)
+!           WHILE(K /= 0) K = NEXT(K)
+!     OPTIONALLY, THE SUBROUTINE PRODUCES AN ARRAY INDEX SO THAT
+!     THE SEQUENCE NUM(INDEX(I)), I = 1,2,...,N IS SORTED.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE NUMSRT(N,NMAX,NUM,MODE,INDEX,LAST,NEXT)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE.
+!       NMAX IS A POSITIVE INTEGER INPUT VARIABLE.
+!       NUM IS AN INPUT ARRAY OF LENGTH N WHICH CONTAINS THE
+!         SEQUENCE OF INTEGERS TO BE GROUPED AND SORTED. IT
+!         IS ASSUMED THAT THE INTEGERS ARE EACH FROM THE SET
+!         0,1,...,NMAX.
+!       MODE IS AN INTEGER INPUT VARIABLE. THE SEQUENCE NUM IS
+!         SORTED IN ASCENDING ORDER IF MODE IS POSITIVE AND IN
+!         DESCENDING ORDER IF MODE IS NEGATIVE. IF MODE IS 0,
+!         NO SORTING IS DONE.
+!       INDEX IS AN INTEGER OUTPUT ARRAY OF LENGTH N SET SO
+!         THAT THE SEQUENCE
+!               NUM(INDEX(I)), I = 1,2,...,N
+!         IS SORTED ACCORDING TO THE SETTING OF MODE. IF MODE
+!         IS 0, INDEX IS NOT REFERENCED.
+!       LAST IS AN INTEGER OUTPUT ARRAY OF LENGTH NMAX + 1. THE
+!         INDEX OF NUM FOR THE LAST OCCURRENCE OF L IS LAST(L)
+!         FOR ANY L = 0,1,...,NMAX UNLESS LAST(L) = 0. IN
+!         THIS CASE L DOES NOT APPEAR IN NUM.
+!       NEXT IS AN INTEGER OUTPUT ARRAY OF LENGTH N. IF
+!         NUM(K) = L, THEN THE INDEX OF NUM FOR THE PREVIOUS
+!         OCCURRENCE OF L IS NEXT(K) FOR ANY L = 0,1,...,NMAX
+!         UNLESS NEXT(K) = 0. IN THIS CASE THERE IS NO PREVIOUS
+!         OCCURRENCE OF L IN NUM.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+      IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MODE, N, NMAX
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDEX(N), LAST(0:NMAX), NEXT(N), NUM(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, J, JINC, JL, JU, K, L
+! ..
+! ..  FIRST EXECUTABLE STATEMENT NUMSRT
+! ..
+!     DETERMINE THE ARRAYS NEXT AND LAST.
+      LAST(0:NMAX) = 0
+      DO K = 1, N
+        L = NUM(K)
+        NEXT(K) = LAST(L)
+        LAST(L) = K
+      END DO
+      IF (MODE == 0) RETURN
+
+!     STORE THE POINTERS TO THE SORTED ARRAY IN INDEX.
+      I = 1
+      IF (MODE > 0) THEN
+        JL = 0
+        JU = NMAX
+        JINC = 1
+      ELSE
+        JL = NMAX
+        JU = 0
+        JINC = -1
+      END IF
+      DO J = JL, JU, JINC
+        K = LAST(J)
+30      CONTINUE
+        IF (K == 0) GOTO 40
+        INDEX(I) = K
+        I = I + 1
+        K = NEXT(K)
+        GOTO 30
+40      CONTINUE
+      END DO
+      RETURN
+
+    END SUBROUTINE NUMSRT
+!_______________________________________________________________________
+
+    SUBROUTINE SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,LIST,NGRP,MAXGRP,IWA)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES A CONSISTENT PARTITION OF THE
+!     COLUMNS OF A BY A SEQUENTIAL ALGORITHM.
+!     A CONSISTENT PARTITION IS DEFINED IN TERMS OF THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE(A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     A PARTITION OF THE COLUMNS OF A INTO GROUPS IS CONSISTENT
+!     IF THE COLUMNS IN ANY GROUP ARE NOT ADJACENT IN THE GRAPH G.
+!     IN GRAPH-THEORY TERMINOLOGY, A CONSISTENT PARTITION OF THE
+!     COLUMNS OF A CORRESPONDS TO A COLORING OF THE GRAPH G.
+!     THE SUBROUTINE EXAMINES THE COLUMNS IN THE ORDER SPECIFIED
+!     BY THE ARRAY LIST, AND ASSIGNS THE CURRENT COLUMN TO THE
+!     GROUP WITH THE SMALLEST POSSIBLE NUMBER.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SEQ AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!     SUBROUTINE SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,LIST,NGRP,MAXGRP,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       LIST IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE ORDER TO BE USED BY THE SEQUENTIAL ALGORITHM.
+!         THE J-TH COLUMN IN THIS ORDER IS LIST(J).
+!       NGRP IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF A. COLUMN JCOL BELONGS
+!         TO GROUP NGRP(JCOL).
+!       MAXGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES THE
+!         NUMBER OF GROUPS IN THE PARTITION OF THE COLUMNS OF A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MAXGRP, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA(N), JPNTR(N+1), &
+        LIST(N), NGRP(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, J, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SEQ
+! ..
+!     INITIALIZATION BLOCK.
+      MAXGRP = 0
+      NGRP(1:N) = N
+      IWA(1:N) = 0
+
+!     BEGINNING OF ITERATION LOOP.
+
+      DO J = 1, N
+        JCOL = LIST(J)
+!       FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+!       DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!       TO NON-ZEROES IN THE MATRIX.
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+!         FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!         WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+          DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+            IC = INDCOL(IP)
+!           ARRAY IWA MARKS THE GROUP NUMBERS OF THE
+!           COLUMNS WHICH ARE ADJACENT TO COLUMN JCOL.
+            IWA(NGRP(IC)) = J
+          END DO
+        END DO
+!       ASSIGN THE SMALLEST UN-MARKED GROUP NUMBER TO JCOL.
+        DO JP = 1, MAXGRP
+          IF (IWA(JP)/=J) GOTO 50
+        END DO
+        MAXGRP = MAXGRP + 1
+50      CONTINUE
+        NGRP(JCOL) = JP
+      END DO
+
+!     END OF ITERATION LOOP.
+
+      RETURN
+
+    END SUBROUTINE SEQ
+!_______________________________________________________________________
+
+    SUBROUTINE SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+
+!     GIVEN A COLUMN-ORIENTED DEFINITION OF THE SPARSITY PATTERN
+!     OF AN M BY N MATRIX A, THIS SUBROUTINE DETERMINES A
+!     ROW-ORIENTED DEFINITION OF THE SPARSITY PATTERN OF A.
+!     ON INPUT THE COLUMN-ORIENTED DEFINITION IS SPECIFIED BY
+!     THE ARRAYS INDROW AND JPNTR. ON OUTPUT THE ROW-ORIENTED
+!     DEFINITION IS SPECIFIED BY THE ARRAYS INDCOL AND IPNTR.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER OUTPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(1) IS SET TO 1 AND THAT IPNTR(M+1)-1 IS
+!         THEN THE NUMBER OF NON-ZERO ELEMENTS OF THE MATRIX A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH M.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: M, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(M+1), IWA(M), JPNTR(N+1)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IR, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SETR
+! ..
+!     STORE IN ARRAY IWA THE COUNTS OF NON-ZEROES IN THE ROWS.
+      IWA(1:M) = 0
+      DO JP = 1, JPNTR(N+1) - 1
+        IWA(INDROW(JP)) = IWA(INDROW(JP)) + 1
+      END DO
+
+!     SET POINTERS TO THE START OF THE ROWS IN INDCOL.
+      IPNTR(1) = 1
+      DO IR = 1, M
+        IPNTR(IR+1) = IPNTR(IR) + IWA(IR)
+        IWA(IR) = IPNTR(IR)
+      END DO
+
+!     FILL INDCOL.
+      DO JCOL = 1, N
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+          INDCOL(IWA(IR)) = JCOL
+          IWA(IR) = IWA(IR) + 1
+        END DO
+      END DO
+      RETURN
+
+    END SUBROUTINE SETR
+!_______________________________________________________________________
+
+    SUBROUTINE SLO(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,MAXCLQ,IWA1,IWA2, &
+        IWA3,IWA4)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES THE SMALLEST-LAST ORDERING OF THE
+!     COLUMNS OF A.
+!     THE SMALLEST-LAST ORDERING IS DEFINED FOR THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE(A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     THE SMALLEST-LAST ORDERING IS DETERMINED RECURSIVELY BY
+!     LETTING LIST(K), K = N,...,1 BE A COLUMN WITH LEAST DEGREE
+!     IN THE SUBGRAPH SPANNED BY THE UN-ORDERED COLUMNS.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SLO AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!     SUBROUTINE SLO(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST, &
+!                    MAXCLQ,IWA1,IWA2,IWA3,IWA4)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE DEGREE SEQUENCE. THE DEGREE OF THE J-TH COLUMN
+!         OF A IS NDEG(J).
+!       LIST IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE SMALLEST-LAST ORDERING OF THE COLUMNS OF A. THE J-TH
+!         COLUMN IN THIS ORDER IS LIST(J).
+!       MAXCLQ IS AN INTEGER OUTPUT VARIABLE SET TO THE SIZE
+!         OF THE LARGEST CLIQUE FOUND DURING THE ORDERING.
+!       IWA1,IWA2,IWA3, AND IWA4 ARE INTEGER WORK ARRAYS OF LENGTH N.
+!     SUBPROGRAMS CALLED
+!       INTRINSIC ... MIN
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MAXCLQ, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA1(0:N-1), IWA2(N), &
+        IWA3(N), IWA4(N), JPNTR(N+1), LIST(N), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP, MINDEG, NUMDEG, NUMORD
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MIN
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SLO
+! ..
+!     INITIALIZATION BLOCK.
+      MINDEG = N
+      DO JP = 1, N
+        IWA1(JP-1) = 0
+        IWA4(JP) = N
+        LIST(JP) = NDEG(JP)
+        MINDEG = MIN(MINDEG,NDEG(JP))
+      END DO
+
+!     CREATE A DOUBLY-LINKED LIST TO ACCESS THE DEGREES OF THE
+!     COLUMNS. THE POINTERS FOR THE LINKED LIST ARE AS FOLLOWS.
+
+!     EACH UN-ORDERED COLUMN IC IS IN A LIST (THE DEGREE LIST)
+!     OF COLUMNS WITH THE SAME DEGREE.
+
+!     IWA1(NUMDEG) IS THE FIRST COLUMN IN THE NUMDEG LIST
+!     UNLESS IWA1(NUMDEG) = 0. IN THIS CASE THERE ARE
+!     NO COLUMNS IN THE NUMDEG LIST.
+
+!     IWA2(IC) IS THE COLUMN BEFORE IC IN THE DEGREE LIST
+!     UNLESS IWA2(IC) = 0. IN THIS CASE IC IS THE FIRST
+!     COLUMN IN THIS DEGREE LIST.
+
+!     IWA3(IC) IS THE COLUMN AFTER IC IN THE DEGREE LIST
+!     UNLESS IWA3(IC) = 0. IN THIS CASE IC IS THE LAST
+!     COLUMN IN THIS DEGREE LIST.
+
+!     IF IC IS AN UN-ORDERED COLUMN, THEN LIST(IC) IS THE
+!     DEGREE OF IC IN THE GRAPH INDUCED BY THE UN-ORDERED
+!     COLUMNS. IF JCOL IS AN ORDERED COLUMN, THEN LIST(JCOL)
+!     IS THE SMALLEST-LAST ORDER OF COLUMN JCOL.
+
+      DO JP = 1, N
+        NUMDEG = NDEG(JP)
+        IWA2(JP) = 0
+        IWA3(JP) = IWA1(NUMDEG)
+        IF (IWA1(NUMDEG) > 0) IWA2(IWA1(NUMDEG)) = JP
+        IWA1(NUMDEG) = JP
+      END DO
+      MAXCLQ = 0
+      NUMORD = N
+
+!     BEGINNING OF ITERATION LOOP.
+
+30    CONTINUE
+
+!     MARK THE SIZE OF THE LARGEST CLIQUE
+!     FOUND DURING THE ORDERING.
+      IF (MINDEG+1 == NUMORD .AND. MAXCLQ == 0) MAXCLQ = NUMORD
+
+!     CHOOSE A COLUMN JCOL OF MINIMAL DEGREE MINDEG.
+40    CONTINUE
+      JCOL = IWA1(MINDEG)
+      IF (JCOL > 0) GOTO 50
+      MINDEG = MINDEG + 1
+      GOTO 40
+50    CONTINUE
+      LIST(JCOL) = NUMORD
+      NUMORD = NUMORD - 1
+
+!     TERMINATION TEST.
+      IF (NUMORD == 0) GOTO 80
+
+!     DELETE COLUMN JCOL FROM THE MINDEG LIST.
+      IWA1(MINDEG) = IWA3(JCOL)
+      IF (IWA3(JCOL) > 0) IWA2(IWA3(JCOL)) = 0
+
+!     FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+      IWA4(JCOL) = 0
+
+!     DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!     TO NON-ZEROES IN THE MATRIX.
+      DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+        IR = INDROW(JP)
+!       FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!       WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+        DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+          IC = INDCOL(IP)
+!         ARRAY IWA4 MARKS COLUMNS WHICH ARE ADJACENT TO
+!         COLUMN JCOL.
+
+          IF (IWA4(IC) > NUMORD) THEN
+            IWA4(IC) = NUMORD
+!           UPDATE THE POINTERS TO THE CURRENT DEGREE LISTS.
+            NUMDEG = LIST(IC)
+            LIST(IC) = LIST(IC) - 1
+            MINDEG = MIN(MINDEG,LIST(IC))
+!           DELETE COLUMN IC FROM THE NUMDEG LIST.
+            IF (IWA2(IC) == 0) THEN
+              IWA1(NUMDEG) = IWA3(IC)
+            ELSE
+              IWA3(IWA2(IC)) = IWA3(IC)
+            END IF
+            IF (IWA3(IC) > 0) IWA2(IWA3(IC)) = IWA2(IC)
+!           ADD COLUMN IC TO THE NUMDEG-1 LIST.
+            IWA2(IC) = 0
+            IWA3(IC) = IWA1(NUMDEG-1)
+            IF (IWA1(NUMDEG-1) > 0) IWA2(IWA1(NUMDEG-1)) = IC
+            IWA1(NUMDEG-1) = IC
+          END IF
+        END DO
+      END DO
+!     END OF ITERATION LOOP.
+
+      GOTO 30
+80    CONTINUE
+
+!     INVERT THE ARRAY LIST.
+      DO JCOL = 1, N
+        IWA2(LIST(JCOL)) = JCOL
+      END DO
+      LIST(1:N) = IWA2(1:N)
+      RETURN
+
+    END SUBROUTINE SLO
+!_______________________________________________________________________
+
+    SUBROUTINE SRTDAT(N,NNZ,INDROW,INDCOL,JPNTR,IWA)
+
+!     GIVEN THE NON-ZERO ELEMENTS OF AN M BY N MATRIX A IN ARBITRARY
+!     ORDER AS SPECIFIED BY THEIR ROW AND COLUMN INDICES, THIS SUBROUTINE
+!     PERMUTES THESE ELEMENTS SO THAT THEIR COLUMN INDICES ARE IN
+!     NON-DECREASING ORDER. ON INPUT IT IS ASSUMED THAT THE ELEMENTS ARE
+!     SPECIFIED IN
+!           INDROW(K),INDCOL(K), K = 1,...,NNZ.
+!     ON OUTPUT THE ELEMENTS ARE PERMUTED SO THAT INDCOL IS IN
+!     NON-DECREASING ORDER. IN ADDITION, THE ARRAY JPNTR IS SET SO THAT
+!     THE ROW INDICES FOR COLUMN J ARE
+!           INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SRTDAT AND IS THEREFORE
+!     NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE SRTDAT(N,NNZ,INDROW,INDCOL,JPNTR,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       NNZ IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF NON-ZERO ELEMENTS OF A.
+!       INDROW IS AN INTEGER ARRAY OF LENGTH NNZ. ON INPUT INDROW
+!         MUST CONTAIN THE ROW INDICES OF THE NON-ZERO ELEMENTS OF A.
+!         ON OUTPUT INDROW IS PERMUTED SO THAT THE CORRESPONDING
+!         COLUMN INDICES OF INDCOL ARE IN NON-DECREASING ORDER.
+!       INDCOL IS AN INTEGER ARRAY OF LENGTH NNZ. ON INPUT INDCOL
+!         MUST CONTAIN THE COLUMN INDICES OF THE NON-ZERO ELEMENTS
+!         OF A. ON OUTPUT INDCOL IS PERMUTED SO THAT THESE INDICES
+!         ARE IN NON-DECREASING ORDER.
+!       JPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN THE OUTPUT
+!         INDROW. THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(1) IS SET TO 1 AND THAT JPNTR(N+1)-1
+!         IS THEN NNZ.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     SUBPROGRAMS CALLED - NONE
+!     INTRINSIC - MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: N, NNZ
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(NNZ), INDROW(NNZ), IWA(N), JPNTR(N+1)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, J, K, L
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SRTDAT
+! ..
+!     STORE IN ARRAY IWA THE COUNTS OF NON-ZEROES IN THE COLUMNS.
+      IWA(1:N) = 0
+      DO K = 1, NNZ
+        IWA(INDCOL(K)) = IWA(INDCOL(K)) + 1
+      END DO
+
+!     SET POINTERS TO THE START OF THE COLUMNS IN INDROW.
+      JPNTR(1) = 1
+      DO J = 1, N
+        JPNTR(J+1) = JPNTR(J) + IWA(J)
+        IWA(J) = JPNTR(J)
+      END DO
+      K = 1
+
+!     BEGIN IN-PLACE SORT.
+40    CONTINUE
+      J = INDCOL(K)
+      IF (K >= JPNTR(J)) THEN
+!        CURRENT ELEMENT IS IN POSITION. NOW EXAMINE THE
+!        NEXT ELEMENT OR THE FIRST UN-SORTED ELEMENT IN
+!        THE J-TH GROUP.
+        K = MAX(K+1,IWA(J))
+      ELSE
+!       CURRENT ELEMENT IS NOT IN POSITION. PLACE ELEMENT
+!       IN POSITION AND MAKE THE DISPLACED ELEMENT THE
+!       CURRENT ELEMENT.
+        L = IWA(J)
+        IWA(J) = IWA(J) + 1
+        I = INDROW(K)
+        INDROW(K) = INDROW(L)
+        INDCOL(K) = INDCOL(L)
+        INDROW(L) = I
+        INDCOL(L) = J
+      END IF
+      IF (K <= NNZ) GOTO 40
+      RETURN
+
+    END SUBROUTINE SRTDAT
+!_______________________________________________________________________
+
+    SUBROUTINE FDJS(M,N,COL,IND,NPNTR,NGRP,NUMGRP,D,FJACD,FJAC)
+
+!     GIVEN A CONSISTENT PARTITION OF THE COLUMNS OF AN M BY N
+!     JACOBIAN MATRIX INTO GROUPS, THIS SUBROUTINE COMPUTES
+!     APPROXIMATIONS TO THOSE COLUMNS IN A GIVEN GROUP. THE
+!     APPROXIMATIONS ARE STORED INTO EITHER A COLUMN-ORIENTED
+!     OR A ROW-ORIENTED PATTERN.
+!     A PARTITION IS CONSISTENT IF THE COLUMNS IN ANY GROUP
+!     DO NOT HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     APPROXIMATIONS TO THE COLUMNS OF THE JACOBIAN MATRIX IN A
+!     GIVEN GROUP CAN BE OBTAINED BY SPECIFYING A DIFFERENCE
+!     PARAMETER ARRAY D WITH D(JCOL) NON-ZERO IF AND ONLY IF
+!     JCOL IS A COLUMN IN THE GROUP, AND AN APPROXIMATION TO
+!     JAC*D WHERE JAC DENOTES THE JACOBIAN MATRIX OF A MAPPING F.
+!     D CAN BE DEFINED WITH THE FOLLOWING SEGMENT OF CODE.
+!           DO 10 JCOL = 1, N
+!             D(JCOL) = 0.0
+!             IF (NGRP(JCOL) == NUMGRP) D(JCOL) = ETA(JCOL)
+!        10 CONTINUE
+!     IN THE ABOVE CODE NUMGRP IS THE GIVEN GROUP NUMBER,
+!     NGRP(JCOL) IS THE GROUP NUMBER OF COLUMN JCOL, AND
+!     ETA(JCOL) IS THE DIFFERENCE PARAMETER USED TO
+!     APPROXIMATE COLUMN JCOL OF THE JACOBIAN MATRIX.
+!     SUITABLE VALUES FOR THE ARRAY ETA MUST BE PROVIDED.
+!     AS MENTIONED ABOVE, AN APPROXIMATION TO JAC*D MUST
+!     ALSO BE PROVIDED. FOR EXAMPLE, THE APPROXIMATION
+!           F(X+D) - F(X)
+!     CORRESPONDS TO THE FORWARD DIFFERENCE FORMULA AT X.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE FDJS(M,N,COL,IND,NPNTR,NGRP,NUMGRP,D,FJACD,FJAC)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF THE JACOBIAN MATRIX.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF THE JACOBIAN MATRIX.
+!       COL IS A LOGICAL INPUT VARIABLE. IF COL IS SET TRUE, THEN THE
+!         JACOBIAN APPROXIMATIONS ARE STORED INTO A COLUMN-ORIENTED
+!         PATTERN. IF COL IS SET FALSE, THEN THE JACOBIAN
+!         APPROXIMATIONS ARE STORED INTO A ROW-ORIENTED PATTERN.
+!       IND IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE JACOBIAN MATRIX
+!         IF COL IS TRUE, AND CONTAINS THE COLUMN INDICES FOR
+!         THE NON-ZEROES IN THE JACOBIAN MATRIX IF COL IS FALSE.
+!       NPNTR IS AN INTEGER INPUT ARRAY WHICH SPECIFIES THE
+!         LOCATIONS OF THE ROW INDICES IN IND IF COL IS TRUE, AND
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN IND IF
+!         COL IS FALSE. IF COL IS TRUE, THE INDICES FOR COLUMN J ARE
+!               IND(K), K = NPNTR(J),...,NPNTR(J+1)-1.
+!         IF COL IS FALSE, THE INDICES FOR ROW I ARE
+!               IND(K), K = NPNTR(I),...,NPNTR(I+1)-1.
+!         NOTE THAT NPNTR(N+1)-1 IF COL IS TRUE, OR NPNTR(M+1)-1
+!         IF COL IS FALSE, IS THEN THE NUMBER OF NON-ZERO ELEMENTS
+!         OF THE JACOBIAN MATRIX.
+!       NGRP IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF THE JACOBIAN MATRIX.
+!         COLUMN JCOL BELONGS TO GROUP NGRP(JCOL).
+!       NUMGRP IS A POSITIVE INTEGER INPUT VARIABLE SET TO A GROUP
+!         NUMBER IN THE PARTITION. THE COLUMNS OF THE JACOBIAN
+!         MATRIX IN THIS GROUP ARE TO BE ESTIMATED ON THIS CALL.
+!       D IS AN INPUT ARRAY OF LENGTH N WHICH CONTAINS THE
+!         DIFFERENCE PARAMETER VECTOR FOR THE ESTIMATE OF
+!         THE JACOBIAN MATRIX COLUMNS IN GROUP NUMGRP.
+!       FJACD IS AN INPUT ARRAY OF LENGTH M WHICH CONTAINS
+!         AN APPROXIMATION TO THE DIFFERENCE VECTOR JAC*D,
+!         WHERE JAC DENOTES THE JACOBIAN MATRIX.
+!       FJAC IS AN OUTPUT ARRAY OF LENGTH NNZ, WHERE NNZ IS THE
+!         NUMBER OF ITS NON-ZERO ELEMENTS. AT EACH CALL OF FDJS,
+!         FJAC IS UPDATED TO INCLUDE THE NON-ZERO ELEMENTS OF THE
+!         JACOBIAN MATRIX FOR THOSE COLUMNS IN GROUP NUMGRP. FJAC
+!         SHOULD NOT BE ALTERED BETWEEN SUCCESSIVE CALLS TO FDJS.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      INTEGER :: M, N, NUMGRP
+      LOGICAL :: COL
+! ..
+! .. Array Arguments ..
+      REAL (WP) :: D(N), FJAC(*), FJACD(M)
+      INTEGER :: IND(*), NGRP(N), NPNTR(*)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IP, IROW, JCOL, JP
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC KIND
+! ..
+! ..  FIRST EXECUTABLE STATEMENT FDJS
+! ..
+!     COMPUTE ESTIMATES OF JACOBIAN MATRIX COLUMNS IN GROUP
+!     NUMGRP. THE ARRAY FJACD MUST CONTAIN AN APPROXIMATION
+!     TO JAC*D, WHERE JAC DENOTES THE JACOBIAN MATRIX AND D
+!     IS A DIFFERENCE PARAMETER VECTOR WITH D(JCOL) NON-ZERO
+!     IF AND ONLY IF JCOL IS A COLUMN IN GROUP NUMGRP.
+      IF (COL) THEN
+!       COLUMN ORIENTATION.
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            DO JP = NPNTR(JCOL), NPNTR(JCOL+1) - 1
+              IROW = IND(JP)
+              FJAC(JP) = FJACD(IROW)/D(JCOL)
+            END DO
+          END IF
+        END DO
+      ELSE
+!       ROW ORIENTATION.
+        DO IROW = 1, M
+          DO IP = NPNTR(IROW), NPNTR(IROW+1) - 1
+            JCOL = IND(IP)
+            IF (NGRP(JCOL) == NUMGRP) THEN
+              FJAC(IP) = FJACD(IROW)/D(JCOL)
+              GOTO 40
+            END IF
+          END DO
+40        CONTINUE
+        END DO
+      END IF
+      RETURN
+
+    END SUBROUTINE FDJS
+!_______________________________________________________________________
+
+    SUBROUTINE DVDSM(M,N,NPAIRS,INDROW,INDCOL,NGRP,MAXGRP,MINGRP,INFO, &
+        IPNTR, JPNTR,IWA,LIWA)
+
+!     THE PURPOSE OF DSM IS TO DETERMINE AN OPTIMAL OR NEAR-
+!     OPTIMAL CONSISTENT PARTITION OF THE COLUMNS OF A SPARSE
+!     M BY N MATRIX A.
+!     THE SPARSITY PATTERN OF THE MATRIX A IS SPECIFIED BY
+!     THE ARRAYS INDROW AND INDCOL. ON INPUT THE INDICES
+!     FOR THE NON-ZERO ELEMENTS OF A ARE
+!           INDROW(K),INDCOL(K), K = 1,2,...,NPAIRS.
+!     THE(INDROW,INDCOL) PAIRS MAY BE SPECIFIED IN ANY ORDER.
+!     DUPLICATE INPUT PAIRS ARE PERMITTED, BUT THE SUBROUTINE
+!     ELIMINATES THEM.
+!     THE SUBROUTINE PARTITIONS THE COLUMNS OF A INTO GROUPS
+!     SUCH THAT COLUMNS IN THE SAME GROUP DO NOT HAVE A
+!     NON-ZERO IN THE SAME ROW POSITION. A PARTITION OF THE
+!     COLUMNS OF A WITH THIS PROPERTY IS CONSISTENT WITH THE
+!     DIRECT DETERMINATION OF A.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE DVDSM(M,N,NPAIRS,INDROW,INDCOL,NGRP,MAXGRP,MINGRP,
+!                      INFO,IPNTR,JPNTR,IWA,LIWA)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       NPAIRS IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE
+!         NUMBER OF (INDROW,INDCOL) PAIRS USED TO DESCRIBE THE
+!         SPARSITY PATTERN OF A.
+!       INDROW IS AN INTEGER ARRAY OF LENGTH NPAIRS. ON INPUT INDROW
+!         MUST CONTAIN THE ROW INDICES OF THE NON-ZERO ELEMENTS OF A.
+!         ON OUTPUT INDROW IS PERMUTED SO THAT THE CORRESPONDING
+!         COLUMN INDICES ARE IN NON-DECREASING ORDER. THE COLUMN
+!         INDICES CAN BE RECOVERED FROM THE ARRAY JPNTR.
+!       INDCOL IS AN INTEGER ARRAY OF LENGTH NPAIRS. ON INPUT INDCOL
+!         MUST CONTAIN THE COLUMN INDICES OF THE NON-ZERO ELEMENTS OF
+!         A. ON OUTPUT INDCOL IS PERMUTED SO THAT THE CORRESPONDING
+!         ROW INDICES ARE IN NON-DECREASING ORDER. THE ROW INDICES
+!         CAN BE RECOVERED FROM THE ARRAY IPNTR.
+!       NGRP IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF A. COLUMN JCOL BELONGS
+!         TO GROUP NGRP(JCOL).
+!       MAXGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES THE
+!         NUMBER OF GROUPS IN THE PARTITION OF THE COLUMNS OF A.
+!       MINGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES A LOWER
+!         BOUND FOR THE NUMBER OF GROUPS IN ANY CONSISTENT PARTITION
+!         OF THE COLUMNS OF A.
+!       INFO IS AN INTEGER OUTPUT VARIABLE SET AS FOLLOWS. FOR
+!         NORMAL TERMINATION INFO = 1. IF M, N, OR NPAIRS IS NOT
+!         POSITIVE OR LIWA IS LESS THAN MAX(M,6*N), THEN INFO = 0.
+!         IF THE K-TH ELEMENT OF INDROW IS NOT AN INTEGER BETWEEN
+!         1 AND M OR THE K-TH ELEMENT OF INDCOL IS NOT AN INTEGER
+!         BETWEEN 1 AND N, THEN INFO = -K.
+!       IPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       JPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH LIWA.
+!       LIWA IS A POSITIVE INTEGER INPUT VARIABLE NOT LESS THAN
+!         MAX(M,6*N).
+!       MINPACK-SUPPLIED ... DEGR,IDO,NUMSRT,SEQ,SETR,SLO,SRTDAT
+!       INTRINSIC - MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: INFO, LIWA, M, MAXGRP, MINGRP, N, NPAIRS
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(NPAIRS), INDROW(NPAIRS), IPNTR(M+1), IWA(LIWA), &
+        JPNTR(N+1), NGRP(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, IR, J, JP, K, MAXCLQ, NNZ, NUMGRP
+! ..
+! .. External Subroutines ..
+!     EXTERNAL DEGR, IDO, NUMSRT, SEQ, SETR, SLO, SRTDAT
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT DSM
+! ..
+!     CHECK THE INPUT DATA.
+      INFO = 0
+      IF (M<1 .OR. N<1 .OR. NPAIRS<1 .OR. LIWA<MAX(M,6*N)) RETURN
+      DO K = 1, NPAIRS
+        INFO = -K
+        IF (INDROW(K)<1 .OR. INDROW(K)>M .OR. INDCOL(K)<1 .OR. INDCOL(K)>N) &
+          RETURN
+      END DO
+      INFO = 1
+
+!     SORT THE DATA STRUCTURE BY COLUMNS.
+      CALL SRTDAT(N,NPAIRS,INDROW,INDCOL,JPNTR,IWA)
+
+!     COMPRESS THE DATA AND DETERMINE THE NUMBER OF
+!     NON-ZERO ELEMENTS OF A.
+      IWA(1:M) =  0
+      NNZ = 1
+      DO J = 1, N
+        K = NNZ
+        DO JP = JPNTR(J), JPNTR(J+1) - 1
+          IR = INDROW(JP)
+          IF (IWA(IR)/=J) THEN
+            INDROW(NNZ) = IR
+            NNZ = NNZ + 1
+            IWA(IR) = J
+          END IF
+        END DO
+        JPNTR(J) = K
+      END DO
+      JPNTR(N+1) = NNZ
+
+!     EXTEND THE DATA STRUCTURE TO ROWS.
+      CALL SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+
+!     DETERMINE A LOWER BOUND FOR THE NUMBER OF GROUPS.
+      MINGRP = 0
+      DO I = 1, M
+        MINGRP = MAX(MINGRP,IPNTR(I+1)-IPNTR(I))
+      END DO
+
+!     DETERMINE THE DEGREE SEQUENCE FOR THE INTERSECTION
+!     GRAPH OF THE COLUMNS OF A.
+      CALL DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(N+1))
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE SMALLEST-LAST (SL) ORDERING.
+      CALL SLO(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(4*N+1),MAXCLQ, &
+        IWA(1),IWA(N+1),IWA(2*N+1),IWA(3*N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),NGRP,MAXGRP,IWA(N+1))
+      MINGRP = MAX(MINGRP,MAXCLQ)
+
+!     EXIT IF THE SMALLEST-LAST ORDERING IS OPTIMAL.
+
+      IF (MAXGRP == MINGRP) RETURN
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE INCIDENCE-DEGREE(ID) ORDERING.
+      CALL IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(4*N+1),MAXCLQ, &
+        IWA(1),IWA(N+1),IWA(2*N+1),IWA(3*N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),IWA(1),NUMGRP,IWA(N+1))
+      MINGRP = MAX(MINGRP,MAXCLQ)
+
+!     RETAIN THE BETTER OF THE TWO ORDERINGS SO FAR.
+      IF (NUMGRP < MAXGRP) THEN
+        MAXGRP = NUMGRP
+        NGRP(1:N) = IWA(1:N)
+
+!       EXIT IF THE INCIDENCE-DEGREE ORDERING IS OPTIMAL.
+        IF (MAXGRP == MINGRP) RETURN
+      END IF
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE LARGEST-FIRST (LF) ORDERING.
+      CALL NUMSRT(N,N-1,IWA(5*N+1),-1,IWA(4*N+1),IWA(2*N+1),IWA(N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),IWA(1),NUMGRP,IWA(N+1))
+
+!     RETAIN THE BEST OF THE THREE ORDERINGS AND EXIT.
+      IF (NUMGRP < MAXGRP) THEN
+        MAXGRP = NUMGRP
+        NGRP(1:N) = IWA(1:N)
+      END IF
+      RETURN
+
+    END SUBROUTINE DVDSM
+!_______________________________________________________________________
+
+      SUBROUTINE DGROUPDS(N,MAXGRPDS,NGRPDS,IGP,JGP)
+! ..
+! Construct the column grouping arrays IGP anf JGP needed by DVJACS28
+! from the DSM array NGRPDS.
+! ..
+!     Input:
+!
+!     N        = the order of the matrix
+!     MAXGRPDS = number of groups (from DSM)
+!     NGRPDS   = DSM output array
+!     Output:
+!     JGP      = array of length N containing the column
+!                indices by groups
+!     IGP      = pointer array of length NGRP + 1 to the
+!                locations in JGP of the beginning of
+!                each group
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, MAXGRPDS
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: NGRPDS(MAXGRPDS)
+        INTEGER, INTENT (OUT) :: IGP(MAXGRPDS+1), JGP(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IGRP, INDEX, JCOL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGROUPDS
+! ..
+        IGP(1) = 1
+        INDEX =  0
+        DO IGRP = 1, MAXGRPDS
+           IGP(IGRP+1) = IGP(IGRP)
+           DO JCOL = 1, N
+              IF (NGRPDS(JCOL) == IGRP) THEN
+                 IGP(IGRP+1) = IGP(IGRP+1) + 1
+                 INDEX = INDEX + 1
+                 JGP(INDEX) = JCOL
+              END IF
+           END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DGROUPDS
+!_______________________________________________________________________
+
+    SUBROUTINE JACSPDB(FCN,N,T,Y,F,FJAC,NRFJAC,YSCALE,FAC,IOPT, &
+      WK,LWK,IWK,LIWK,MAXGRP,NGRP,JPNTR,INDROW)
+
+! This is a modified version of JACSP which does not require the NGRP,
+! JPNTR and INDROW sparse pointer arrays in the event a dense or a
+! banded matrix is being processed.
+
+! Refer to the documentation for JACSP for a description of the
+! parameters. If the banded option is used, IOPT(5) is used to
+! input the lower bandwidth ML in this version.
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      REAL (WP) :: T
+      INTEGER :: LIWK, LWK, MAXGRP, N, NRFJAC
+! ..
+! .. Array Arguments ..
+      REAL (WP) :: F(N), FAC(N), FJAC(NRFJAC,*), WK(LWK), Y(N), YSCALE(*)
+      INTEGER :: INDROW(*), IOPT(5), IWK(LIWK), JPNTR(*), NGRP(N)
+! ..
+! .. Subroutine Arguments ..
+      EXTERNAL FCN
+! ..
+! .. Local Scalars ..
+      REAL (WP) :: ADIFF, AY, DEL, DELM, DFMJ, DIFF, DMAX, EXPFMN, FACMAX, &
+        FACMIN, FJACL, FMJ, ONE, P125, P25, P75, P875, PERT, RDEL, RMNFDF, &
+        RMXFDF, SDF, SF, SGN, T1, T2, U, U3QRT, U7EGT, UEGT, UMEGT, UQRT,  &
+        USQT, ZERO
+      INTEGER :: IDXL, IDXU, IFLAG1, IFLAG2, IRCMP, IRDEL, IROW, IROWB,    &
+        IROWMX, ITRY, J, JCOL, JFIRST, JINC, JLAST, KT1, KT2, KT3, KT4,    &
+        KT5, L, MBAND, ML, MU, NID1, NID2, NID3, NID4, NID5, NID6,         &
+        NIFAC, NT2, NUMGRP
+!       KT5, L, MBAND, MEB1, ML, MU, NID1, NID2, NID3, NID4, NID5, NID6,   &
+      LOGICAL :: DOTHISBLOCK
+      CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC ABS, EPSILON, KIND, MAX, MIN, SIGN, SQRT
+      INTRINSIC ABS, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! .. Data Statements ..
+      DATA PERT/2.0E+0_WP/, FACMAX/1.E-1_WP/, EXPFMN/.75E+0_WP/
+      DATA ONE/1.0E0_WP/, ZERO/0.0E0_WP/
+      DATA P125/.125E+0_WP/, P25/.25E+0_WP/, P75/.75E+0_WP/, P875/.875E+0_WP/
+      DATA NIFAC/3/, NID1/10/, NID2/20/, NID3/30/, NID4/40/, NID5/50/
+! ..
+!     COMPUTE ALGORITHM AND MACHINE CONSTANTS.
+! ..
+! ..  FIRST EXECUTABLE STATEMENT JACSPDB
+! ..
+      IF (IOPT(1) == 0 .AND. MAXGRP /= N) THEN
+         MSG = 'JACSPDB requires that MAXGRP=N for a dense matrix.'
+         CALL XERRDV(MSG,1800,2,0,0,0,0,ZERO,ZERO)
+      END IF
+
+      IF (IOPT(1) == 1) THEN
+         MBAND = IOPT(2)
+         ML = IOPT(5)
+         MU = MBAND - ML - 1
+!        MEB1 = 2*ML + MU
+      END IF
+
+      U = EPSILON(ONE)
+      USQT = SQRT(U)
+      UEGT = U**P125
+      UMEGT = ONE/UEGT
+      UQRT = U**P25
+      U3QRT = U**P75
+      U7EGT = U**P875
+      FACMIN = U**EXPFMN
+
+      IF (IOPT(4) == 0) THEN
+        IOPT(4) = 1
+        DO 10 J = 1, N
+          FAC(J) = USQT
+10      CONTINUE
+      END IF
+      DO 20 J = 1, 50
+        IWK(J) = 0
+20    CONTINUE
+      KT1 = NID1
+      KT2 = NID2
+      KT3 = NID3
+      KT4 = NID4
+      KT5 = NID5
+      NID6 = LIWK
+      NT2 = 2*N
+
+      DO NUMGRP = 1, MAXGRP
+!       COMPUTE AND SAVE THE INCREMENTS FOR THE COLUMNS IN GROUP NUMGRP.
+        IRCMP = 0
+        ITRY = 0
+        DO 30 J = NID5 + 1, NID6
+          IWK(J) = 0
+30      CONTINUE
+40      CONTINUE
+
+!       Note: For banded in DVJAC:
+!       mba = min(mband,n)
+!          Groups: j=1,...,mba
+!             Columns in group j: jj=j,...,n by mband
+!                Rows in column jj: i1=max(jj-mu,1),...,i2=min(jj+ml,n)       
+
+        IF (IOPT(1) == 0 .OR. IOPT(1) == 2) THEN
+          JFIRST = 1
+          JLAST = N
+          JINC = 1
+        ELSE
+          JFIRST = NUMGRP
+          JLAST = N
+          JINC = MBAND
+        END IF
+        DO JCOL = JFIRST, JLAST, JINC
+          DOTHISBLOCK = .FALSE.
+          IF (IOPT(1) == 2) THEN
+            IF (NGRP(JCOL) == NUMGRP) DOTHISBLOCK = .TRUE.
+          ELSE
+            IF (IOPT(1) == 0) THEN
+              IF (JCOL == NUMGRP) DOTHISBLOCK = .TRUE.
+            ELSE
+              IF (IOPT(1) == 1) THEN
+                DOTHISBLOCK = .TRUE.
+              END IF
+            END IF
+          END IF
+
+          IF (DOTHISBLOCK) THEN
+            WK(N+JCOL) = Y(JCOL)
+!           COMPUTE DEL. IF DEL IS TOO SMALL INCREASE FAC(JCOL) AND RECOMPUTE
+!           DEL. NIFAC ATTEMPTS ARE MADE TO INCREASE FAC(JCOL) AND FIND AN
+!           APPROPRIATE DEL. IF DEL CANT BE FOUND IN THIS MANNER, DEL IS COMPUTED
+!           WITH FAC(JCOL) SET TO THE SQUARE ROOT OF THE MACHINE PRECISION (USQT).
+!           IF DEL IS ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) IS ZERO OR
+!           YSCALE(JCOL) IS ZERO, DEL IS SET TO USQT.
+            SGN = SIGN(ONE,F(JCOL))
+            IRDEL = 0
+            IF (IOPT(3) == 1) THEN
+              AY = ABS(YSCALE(JCOL))
+            ELSE
+              AY = ABS(Y(JCOL))
+            END IF
+            DELM = U7EGT*AY
+
+            DO 50 J = 1, NIFAC
+              DEL = FAC(JCOL)*AY*SGN
+              IF (ABS(DEL) <= ZERO) THEN
+                DEL = USQT*SGN
+                IF (ITRY == 0) IWK(3) = IWK(3) + 1
+              END IF
+              T1 = Y(JCOL) + DEL
+              DEL = T1 - Y(JCOL)
+              IF (ABS(DEL) < DELM) THEN
+                IF (J >= NIFAC) GOTO 50
+                IF (IRDEL == 0) THEN
+                  IRDEL = 1
+                  IWK(1) = IWK(1) + 1
+                END IF
+                T1 = FAC(JCOL)*UMEGT
+                FAC(JCOL) = MIN(T1,FACMAX)
+              ELSE
+                GOTO 60
+              END IF
+50          END DO
+
+            FAC(JCOL) = USQT
+            DEL = USQT*AY*SGN
+            IWK(2) = IWK(2) + 1
+            IF (KT2 < NID3) THEN
+              KT2 = KT2 + 1
+              IWK(KT2) = JCOL
+            END IF
+
+60          CONTINUE
+            WK(NT2+JCOL) = DEL
+            Y(JCOL) = Y(JCOL) + DEL
+          END IF
+        END DO
+
+        IWK(7) = IWK(7) + 1
+        CALL FCN(N,T,Y,WK)
+
+        DO JCOL = JFIRST, JLAST, JINC
+          IF (IOPT(1) == 2) THEN
+             IF (NGRP(JCOL) == NUMGRP) Y(JCOL) = WK(N+JCOL)
+          ELSE
+             IF (IOPT(1) == 0) THEN
+                IF (JCOL == NUMGRP) Y(JCOL) = WK(N+JCOL)
+             ELSE
+                IF (IOPT(1) == 1) Y(JCOL) = WK(N+JCOL) 
+             END IF
+          END IF
+        END DO
+
+!       COMPUTE THE JACOBIAN ENTRIES FOR ALL COLUMNS IN NUMGRP.
+!       STORE ENTRIES ACCORDING TO SELECTED STORAGE FORMAT.
+!       USE LARGEST ELEMENTS IN A COLUMN TO DETERMINE SCALING
+!       INFORMATION FOR ROUNDOFF AND TRUNCATION ERROR TESTS.
+
+        DO JCOL = JFIRST, JLAST, JINC
+          DOTHISBLOCK = .FALSE.
+          IF (IOPT(1) == 2) THEN
+             IF (NGRP(JCOL) == NUMGRP) DOTHISBLOCK = .TRUE.
+          ELSE
+             IF (IOPT(1) == 0) THEN
+                IF (JCOL == NUMGRP) DOTHISBLOCK = .TRUE.
+             ELSE
+                IF(IOPT(1) == 1) DOTHISBLOCK = .TRUE. 
+             END IF
+          END IF
+          IF (DOTHISBLOCK) THEN
+            IF (IOPT(1) == 2) THEN
+              IDXL = JPNTR(JCOL)
+              IDXU = JPNTR(JCOL+1) - 1
+            ELSE
+              IF (IOPT(1) == 0) THEN
+                IDXL = 1
+                IDXU = N
+              ELSE
+                IF (IOPT(1) == 1) THEN
+                  IDXL = MAX(JCOL-MU,1)
+                  IDXU = MIN(JCOL+ML,N)
+                END IF
+              END IF
+            END IF
+            DMAX = ZERO
+            RDEL = ONE/WK(NT2+JCOL)
+            IROWMX = 1
+            DO L = IDXL, IDXU
+              IF (IOPT(1) == 2) THEN
+                 IROW = INDROW(L)
+              ELSE
+                 IF (IOPT(1)==0 .OR. IOPT(1)==1) IROW = L
+              END IF
+              DIFF = WK(IROW) - F(IROW)
+              ADIFF = ABS(DIFF)
+              IF (ADIFF >= DMAX) THEN
+                IROWMX = IROW
+                DMAX = ADIFF
+                SF = F(IROW)
+                SDF = WK(IROW)
+              END IF
+              FJACL = DIFF*RDEL
+              IF (ITRY == 1) WK(IROW) = FJACL
+
+              IF (IOPT(1) == 0) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROW,JCOL)
+                FJAC(IROW,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 1) THEN
+                IROWB = IROW - JCOL + IOPT(2)
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,JCOL)
+                FJAC(IROWB,JCOL) = FJACL
+!               IROWB = JCOL * MEB1 - ML + L
+!               IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,1)
+!               FJAC(IROWB,1) = FJACL
+              END IF
+              IF (IOPT(1) == 2) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(L,1)
+                FJAC(L,1) = FJACL
+              END IF
+            END DO
+
+!           IF A COLUMN IS BEING RECOMPUTED (ITRY=1),THIS SECTION OF THE
+!           CODE PERFORMS AN EXTRAPOLATION TEST TO ENABLE THE CODE TO
+!           COMPUTE SMALL DERIVATIVES MORE ACCURATELY. THIS TEST IS ONLY
+!           PERFORMED ON THOSE COLUMNS WHOSE LARGEST DIFFERENCE IS CLOSE
+!           TO ZERO RELATIVE TO SCALE.
+            IF (ITRY == 1) THEN
+              IFLAG1 = 0
+              IFLAG2 = 0
+              DO 100 J = NID5 + 1, NID6
+                IF (IWK(J) == JCOL) IFLAG1 = 1
+100           CONTINUE
+              IF (IFLAG1 == 1) THEN
+                IFLAG1 = 0
+                T1 = WK(IROWMX+N)
+                T2 = WK(IROWMX)*FAC(JCOL)
+                IF (ABS(T2) < ABS(T1)*PERT) IFLAG2 = 1
+              END IF
+
+              IF (IFLAG2 == 1) THEN
+                IFLAG2 = 0
+                T1 = FAC(JCOL)*FAC(JCOL)
+                FAC(JCOL) = MAX(T1,FACMIN)
+                DO L = IDXL, IDXU
+                  IF (IOPT(1) == 2) THEN
+                     IROW = INDROW(L)
+                  ELSE
+                     IF (IOPT(1)==0 .OR. IOPT(1)==1) IROW = L
+                  END IF
+                  FJACL = WK(IROW+N)
+                  IF (IOPT(1) == 0) FJAC(IROW,JCOL) = FJACL
+                  IF (IOPT(1) == 1) THEN
+                    IROWB = IROW - JCOL + IOPT(2)
+                    FJAC(IROWB,JCOL) = FJACL
+!                   IROWB = JCOL * MEB1 - ML + L
+!                   FJAC(IROWB,1) = FJACL
+                  END IF
+                  IF (IOPT(1) == 2) FJAC(L,1) = FJACL
+              END DO
+              END IF
+            END IF
+
+            FMJ = ABS(SF)
+            DFMJ = ABS(SDF)
+            RMXFDF = MAX(FMJ,DFMJ)
+            RMNFDF = MIN(FMJ,DFMJ)
+
+!           IF SCALE INFORMATION IS NOT AVAILABLE, PERFORM NO ROUNDOFF
+!           OR TRUNCATION ERROR TESTS. IF THE EXTRAPOLATION TEST HAS
+!           CAUSED FAC(JCOL) TO BE RESET TO ITS PREVIOUS VALUE (IAJAC=1)
+!           THEN NO FURTHER ROUNDOFF OR TRUNCATION ERROR TESTS ARE
+!           PERFORMED.
+!           IF (RMNFDF/=ZERO) THEN
+            IF (ABS(RMNFDF) > ZERO) THEN
+!             TEST FOR POSSIBLE ROUNDOFF ERROR (FIRST TEST)
+!             AND ALSO FOR POSSIBLE SERIOUS ROUNDOFF ERROR (SECOND TEST).
+              IF (DMAX <= (U3QRT*RMXFDF)) THEN
+                IF (DMAX <= (U7EGT*RMXFDF)) THEN
+                  IF (ITRY == 0) THEN
+                    T1 = SQRT(FAC(JCOL))
+                    FAC(JCOL) = MIN(T1,FACMAX)
+                    IRCMP = 1
+                    IF (KT5 < NID6) THEN
+                      KT5 = KT5 + 1
+                      IWK(KT5) = JCOL
+                    END IF
+                    IWK(4) = IWK(4) + 1
+                    IF (KT3 < NID4) THEN
+                      KT3 = KT3 + 1
+                      IWK(KT3) = JCOL
+                    END IF
+                  ELSE
+                    IWK(5) = IWK(5) + 1
+                    IF (KT4 < NID5) THEN
+                      KT4 = KT4 + 1
+                      IWK(KT4) = JCOL
+                    END IF
+                  END IF
+                ELSE
+                  T1 = UMEGT*FAC(JCOL)
+                  FAC(JCOL) = MIN(T1,FACMAX)
+                END IF
+              END IF
+!             TEST FOR POSSIBLE TRUNCATION ERROR.
+              IF (DMAX > UQRT*RMXFDF) THEN
+                T1 = FAC(JCOL)*UEGT
+                FAC(JCOL) = MAX(T1,FACMIN)
+                IWK(8) = IWK(8) + 1
+                IF (KT1 < NID2) THEN
+                  KT1 = KT1 + 1
+                  IWK(KT1) = JCOL
+                END IF
+              END IF
+            ELSE
+              IWK(6) = IWK(6) + 1
+            END IF
+          END IF
+        END DO
+
+!       IF SERIOUS ROUNDOFF ERROR IS SUSPECTED, RECOMPUTE ALL
+!       COLUMNS IN GROUP NUMGRP.
+        IF (IRCMP == 1) THEN
+          IRCMP = 0
+          ITRY = 1
+          GOTO 40
+        END IF
+        ITRY = 0
+      END DO
+      RETURN
+
+    END SUBROUTINE JACSPDB
+
+! End of JACSP routines.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert the MA48 Jacobian related
+! routines DVNLSS48, DVSOLS48, DVPREPS48, and DVJACS48 here.
+! filename = jacobian_for_ma48.f90. Insert the following line
+! after the first line of this file:
+! USE hsl_ma48_double
+!_______________________________________________________________________
+
+! *****LAPACK build change point. Insert the following line after the
+! first line of this file:
+! USE lapackd_f90_m
+! Include the module lapackd_f90_m.f90 at the beginning of this file
+! or as an external module.
+!_______________________________________________________________________
+
+    END MODULE DVODE_F90_M
+!_______________________________________________________________________
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/dvode_f90_m.mod
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/dvode_f90_m.mod	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/dvode_f90_m.mod	(revision 3477)
@@ -0,0 +1,4428 @@
+V24 dvode_f90_m
+15 dvode_f90_m.f90 S582 0
+05/10/2011  17:19:07
+enduse
+D 33 21 6 1 28 27 0 1 0 0 1
+ 19 23 25 19 23 21
+D 36 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 39 21 6 1 37 36 0 1 0 0 1
+ 31 34 35 31 34 32
+D 42 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 45 21 6 1 46 45 0 1 0 0 1
+ 40 43 44 40 43 41
+D 48 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 51 21 6 1 55 54 0 1 0 0 1
+ 49 52 53 49 52 50
+D 54 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 57 21 6 1 64 63 0 1 0 0 1
+ 58 61 62 58 61 59
+D 60 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 63 21 6 1 73 72 0 1 0 0 1
+ 67 70 71 67 70 68
+D 66 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 69 21 6 1 82 81 0 1 0 0 1
+ 76 79 80 76 79 77
+D 72 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 75 21 6 1 91 90 0 1 0 0 1
+ 85 88 89 85 88 86
+D 78 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 81 21 9 1 100 99 0 1 0 0 1
+ 94 97 98 94 97 95
+D 84 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 87 21 9 1 109 108 0 1 0 0 1
+ 103 106 107 103 106 104
+D 90 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 93 21 9 1 118 117 0 1 0 0 1
+ 112 115 116 112 115 113
+D 96 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 99 24 755 216 753 7
+D 105 21 9 1 205 204 0 1 0 0 1
+ 199 202 203 199 202 200
+D 108 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 111 21 9 1 214 213 0 1 0 0 1
+ 208 211 212 208 211 209
+D 114 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 117 21 9 1 223 222 0 1 0 0 1
+ 217 220 221 217 220 218
+D 120 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 123 21 9 1 232 231 0 1 0 0 1
+ 226 229 230 226 229 227
+D 126 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 129 21 9 1 241 240 0 1 0 0 1
+ 235 238 239 235 238 236
+D 132 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 135 21 9 1 250 249 0 1 0 0 1
+ 244 247 248 244 247 245
+D 138 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 141 21 9 1 259 258 0 1 0 0 1
+ 253 256 257 253 256 254
+D 144 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 147 21 9 1 268 267 0 1 0 0 1
+ 262 265 266 262 265 263
+D 150 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 153 21 9 1 277 276 0 1 0 0 1
+ 271 274 275 271 274 272
+D 156 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 159 21 9 1 286 285 0 1 0 0 1
+ 280 283 284 280 283 281
+D 162 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 165 21 9 1 295 294 0 1 0 0 1
+ 289 292 293 289 292 290
+D 168 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 171 21 9 1 304 303 0 1 0 0 1
+ 298 301 302 298 301 299
+D 174 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 177 21 9 1 313 312 0 1 0 0 1
+ 307 310 311 307 310 308
+D 180 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 183 21 9 1 322 321 0 1 0 0 1
+ 316 319 320 316 319 317
+D 186 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 189 21 9 1 331 330 0 1 0 0 1
+ 325 328 329 325 328 326
+D 192 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 195 21 9 1 340 339 0 1 0 0 1
+ 334 337 338 334 337 335
+D 198 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 201 21 9 1 349 348 0 1 0 0 1
+ 343 346 347 343 346 344
+D 204 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 207 21 9 1 358 357 0 1 0 0 1
+ 352 355 356 352 355 353
+D 210 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 213 21 9 1 367 366 0 1 0 0 1
+ 361 364 365 361 364 362
+D 216 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 219 21 9 1 376 375 0 1 0 0 1
+ 370 373 374 370 373 371
+D 222 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 225 21 9 2 394 393 0 1 0 0 1
+ 381 384 390 381 384 382
+ 386 389 392 386 389 387
+D 228 21 6 1 0 379 0 0 0 0 0
+ 0 379 0 3 379 0
+D 231 21 9 1 403 402 0 1 0 0 1
+ 397 400 401 397 400 398
+D 234 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 237 21 9 1 412 411 0 1 0 0 1
+ 406 409 410 406 409 407
+D 240 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 243 21 9 1 421 420 0 1 0 0 1
+ 415 418 419 415 418 416
+D 246 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 249 21 9 1 430 429 0 1 0 0 1
+ 424 427 428 424 427 425
+D 252 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 255 21 9 1 439 438 0 1 0 0 1
+ 433 436 437 433 436 434
+D 258 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 261 21 9 1 448 447 0 1 0 0 1
+ 442 445 446 442 445 443
+D 264 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 267 21 9 1 3 17 0 0 0 0 0
+ 0 17 3 3 17 17
+D 270 21 9 1 3 137 0 0 0 0 0
+ 0 137 3 3 137 137
+D 273 21 9 1 3 17 0 0 0 0 0
+ 0 17 3 3 17 17
+D 276 21 9 1 3 449 0 0 0 0 0
+ 0 449 3 3 449 449
+D 279 21 6 1 458 457 0 1 0 0 1
+ 452 455 456 452 455 453
+D 282 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 285 21 6 1 467 466 0 1 0 0 1
+ 461 464 465 461 464 462
+D 288 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 291 21 6 1 476 475 0 1 0 0 1
+ 470 473 474 470 473 471
+D 294 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 297 21 6 1 485 484 0 1 0 0 1
+ 479 482 483 479 482 480
+D 300 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 303 21 6 1 494 493 0 1 0 0 1
+ 488 491 492 488 491 489
+D 306 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 309 21 6 1 503 502 0 1 0 0 1
+ 497 500 501 497 500 498
+D 312 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 315 21 6 1 512 511 0 1 0 0 1
+ 506 509 510 506 509 507
+D 318 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 321 21 6 1 521 520 0 1 0 0 1
+ 515 518 519 515 518 516
+D 324 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 327 21 6 2 536 535 0 1 0 0 1
+ 525 528 533 525 528 526
+ 529 532 534 529 532 530
+D 330 21 6 1 0 379 0 0 0 0 0
+ 0 379 0 3 379 0
+D 333 21 6 2 551 550 0 1 0 0 1
+ 540 543 548 540 543 541
+ 544 547 549 544 547 545
+D 336 21 6 1 0 379 0 0 0 0 0
+ 0 379 0 3 379 0
+D 339 21 6 1 560 559 0 1 0 0 1
+ 554 557 558 554 557 555
+D 342 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 345 21 6 1 569 568 0 1 0 0 1
+ 563 566 567 563 566 564
+D 348 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 351 21 6 1 578 577 0 1 0 0 1
+ 572 575 576 572 575 573
+D 354 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 357 21 6 1 587 586 0 1 0 0 1
+ 581 584 585 581 584 582
+D 360 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 363 21 6 1 596 595 0 1 0 0 1
+ 590 593 594 590 593 591
+D 366 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 369 21 6 1 605 604 0 1 0 0 1
+ 599 602 603 599 602 600
+D 372 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 375 21 6 1 614 613 0 1 0 0 1
+ 608 611 612 608 611 609
+D 378 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 381 21 6 1 623 622 0 1 0 0 1
+ 617 620 621 617 620 618
+D 384 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 387 21 6 1 632 631 0 1 0 0 1
+ 626 629 630 626 629 627
+D 390 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 393 21 6 1 641 640 0 1 0 0 1
+ 635 638 639 635 638 636
+D 396 21 6 1 0 16 0 0 0 0 0
+ 0 16 0 3 16 0
+D 399 21 6 1 3 642 0 0 0 0 0
+ 0 642 3 3 642 642
+D 402 21 6 1 3 135 0 0 0 0 0
+ 0 135 3 3 135 135
+D 405 21 6 1 3 144 0 0 0 0 0
+ 0 144 3 3 144 144
+D 408 21 6 1 3 144 0 0 0 0 0
+ 0 144 3 3 144 144
+D 411 21 6 1 3 642 0 0 0 0 0
+ 0 642 3 3 642 642
+D 417 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 675
+D 420 21 9 1 3 677 0 0 1 0 0
+ 0 676 3 3 677 677
+D 423 21 9 1 3 677 0 0 1 0 0
+ 0 676 3 3 677 677
+D 426 21 9 1 3 679 0 0 1 0 0
+ 0 678 3 3 679 679
+D 429 21 9 1 3 681 0 0 1 0 0
+ 0 680 3 3 681 681
+D 432 21 9 2 682 0 0 0 1 1 0
+ 0 683 3 3 684 684
+ 0 0 684 3 0 685
+D 435 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 686
+D 438 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 687
+D 441 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 688
+D 444 21 9 1 689 692 1 1 0 0 1
+ 3 690 3 3 690 691
+D 447 21 9 1 693 696 1 1 0 0 1
+ 3 694 3 3 694 695
+D 450 21 9 1 697 700 1 1 0 0 1
+ 3 698 3 3 698 699
+D 453 21 9 1 701 704 1 1 0 0 1
+ 3 702 3 3 702 703
+D 456 21 6 1 705 708 1 1 0 0 1
+ 3 706 3 3 706 707
+D 459 21 9 1 709 712 1 1 0 0 1
+ 3 710 3 3 710 711
+D 462 21 9 1 713 716 1 1 0 0 1
+ 3 714 3 3 714 715
+D 465 21 9 1 717 720 1 1 0 0 1
+ 3 718 3 3 718 719
+D 468 21 9 1 721 724 1 1 0 0 1
+ 3 722 3 3 722 723
+D 471 21 6 1 725 728 1 1 0 0 1
+ 3 726 3 3 726 727
+D 474 21 6 1 729 732 1 1 0 0 1
+ 3 730 3 3 730 731
+D 477 21 6 1 733 736 1 1 0 0 1
+ 3 734 3 3 734 735
+D 480 21 9 1 3 137 0 0 0 0 0
+ 0 137 3 3 137 137
+D 483 21 6 1 3 737 0 0 0 0 0
+ 0 737 3 3 737 737
+D 486 21 6 1 738 741 1 1 0 0 1
+ 3 739 3 3 739 740
+D 489 21 6 1 3 743 0 0 1 0 0
+ 0 742 3 3 743 743
+D 492 21 6 1 3 745 0 0 1 0 0
+ 0 744 3 3 745 745
+D 495 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 746
+D 498 21 9 1 3 748 0 0 1 0 0
+ 0 747 3 3 748 748
+D 501 21 6 1 749 752 1 1 0 0 1
+ 3 750 3 3 750 751
+D 504 21 6 1 753 756 1 1 0 0 1
+ 3 754 3 3 754 755
+D 507 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 757
+D 510 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 758
+D 513 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 759
+D 516 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 760
+D 519 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 761
+D 522 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 762
+D 525 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 763
+D 528 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 764
+D 531 21 9 2 765 0 0 0 1 1 0
+ 0 766 3 3 767 767
+ 0 0 767 3 0 768
+D 534 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 769
+D 537 21 9 2 770 0 0 0 1 1 0
+ 0 771 3 3 772 772
+ 0 0 772 3 0 773
+D 540 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 774
+D 543 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 775
+D 546 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 776
+D 549 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 777
+D 552 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 778
+D 555 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 779
+D 558 21 9 2 780 0 0 0 1 1 0
+ 0 781 3 3 782 782
+ 0 0 782 3 0 783
+D 561 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 784
+D 564 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 785
+D 567 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 786
+D 570 21 9 2 787 0 0 0 1 1 0
+ 0 788 3 3 789 789
+ 0 0 789 3 0 790
+D 573 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 791
+D 576 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 792
+D 579 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 793
+D 582 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 794
+D 585 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 795
+D 588 21 9 2 796 0 0 0 1 1 0
+ 0 797 3 3 798 798
+ 0 0 798 3 0 799
+D 591 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 800
+D 594 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 801
+D 597 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 802
+D 600 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 803
+D 603 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 804
+D 606 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 805
+D 609 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 806
+D 612 21 9 2 807 0 0 0 1 1 0
+ 0 808 3 3 809 809
+ 0 0 809 3 0 810
+D 615 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 811
+D 618 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 812
+D 621 21 9 2 813 818 0 0 1 0 0
+ 0 814 3 3 815 815
+ 0 816 815 3 817 817
+D 624 21 9 2 819 822 0 0 1 0 0
+ 0 820 3 3 821 821
+ 0 816 821 3 817 817
+D 627 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 823
+D 630 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 824
+D 633 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 825
+D 636 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 826
+D 639 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 827
+D 642 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 828
+D 645 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 829
+D 648 21 9 1 3 831 0 0 1 0 0
+ 0 830 3 3 831 831
+D 651 21 9 1 3 831 0 0 1 0 0
+ 0 830 3 3 831 831
+D 654 21 9 1 3 833 0 0 1 0 0
+ 0 832 3 3 833 833
+D 657 21 9 1 3 833 0 0 1 0 0
+ 0 832 3 3 833 833
+D 660 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 834
+D 663 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 835
+D 666 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 836
+D 669 21 9 2 837 0 0 0 1 1 0
+ 0 838 3 3 839 839
+ 0 0 839 3 0 840
+D 672 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 841
+D 675 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 842
+D 678 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 843
+D 681 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 844
+D 684 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 845
+D 687 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 846
+D 690 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 847
+D 693 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 848
+D 696 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 849
+D 699 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 850
+D 702 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 851
+D 705 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 852
+D 708 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 853
+D 711 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 854
+D 714 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 855
+D 717 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 856
+D 720 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 857
+D 723 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 858
+D 726 21 9 2 859 0 0 0 1 1 0
+ 0 860 3 3 861 861
+ 0 0 861 3 0 862
+D 729 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 863
+D 732 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 864
+D 735 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 865
+D 738 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 866
+D 741 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 867
+D 744 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 868
+D 747 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 869
+D 750 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 870
+D 753 21 9 2 871 0 0 0 1 1 0
+ 0 872 3 3 873 873
+ 0 0 873 3 0 874
+D 756 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 875
+D 759 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 876
+D 762 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 877
+D 765 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 878
+D 768 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 879
+D 771 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 880
+D 774 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 881
+D 777 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 882
+D 780 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 883
+D 783 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 884
+D 786 21 9 2 885 0 0 0 1 1 0
+ 0 886 3 3 887 887
+ 0 0 887 3 0 888
+D 789 21 9 1 3 890 0 0 1 0 0
+ 0 889 3 3 890 890
+D 792 21 9 1 3 890 0 0 1 0 0
+ 0 889 3 3 890 890
+D 795 21 9 1 3 890 0 0 1 0 0
+ 0 889 3 3 890 890
+D 798 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 891
+D 801 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 892
+D 804 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 893
+D 807 21 9 2 894 0 0 0 1 1 0
+ 0 895 3 3 896 896
+ 0 0 896 3 0 897
+D 810 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 898
+D 813 21 9 2 899 0 0 0 1 1 0
+ 0 900 3 3 901 901
+ 0 0 901 3 0 902
+D 816 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 903
+D 819 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 904
+D 822 21 9 2 905 0 0 0 1 1 0
+ 0 906 3 3 907 907
+ 0 0 907 3 0 908
+D 825 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 909
+D 828 21 9 2 910 0 0 0 1 1 0
+ 0 911 3 3 912 912
+ 0 0 912 3 0 913
+D 831 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 914
+D 834 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 915
+D 837 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 916
+D 840 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 917
+D 843 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 918
+D 846 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 919
+D 849 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 920
+D 852 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 921
+D 855 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 922
+D 858 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 923
+D 861 21 9 1 3 925 0 0 1 0 0
+ 0 924 3 3 925 925
+D 864 21 9 1 3 927 0 0 1 0 0
+ 0 926 3 3 927 927
+D 867 21 6 1 3 925 0 0 1 0 0
+ 0 924 3 3 925 925
+D 870 21 6 2 928 929 0 0 1 0 0
+ 0 926 3 3 927 927
+ 0 449 927 3 449 449
+D 873 21 6 1 3 931 0 0 1 0 0
+ 0 930 3 3 931 931
+D 876 21 6 2 928 932 0 0 1 0 0
+ 0 926 3 3 927 927
+ 0 13 927 3 13 13
+D 879 21 9 1 3 934 0 0 1 0 0
+ 0 933 3 3 934 934
+D 882 21 9 1 3 936 0 0 1 0 0
+ 0 935 3 3 936 936
+D 885 21 6 1 3 934 0 0 1 0 0
+ 0 933 3 3 934 934
+D 888 21 6 2 937 938 0 0 1 0 0
+ 0 935 3 3 936 936
+ 0 449 936 3 449 449
+D 891 21 6 1 3 940 0 0 1 0 0
+ 0 939 3 3 940 940
+D 894 21 6 2 937 938 0 0 1 0 0
+ 0 935 3 3 936 936
+ 0 449 936 3 449 449
+D 897 21 6 1 3 940 0 0 1 0 0
+ 0 939 3 3 940 940
+D 900 21 9 1 3 942 0 0 1 0 0
+ 0 941 3 3 942 942
+D 903 21 6 1 3 942 0 0 1 0 0
+ 0 941 3 3 942 942
+D 906 21 6 1 3 944 0 0 1 0 0
+ 0 943 3 3 944 944
+D 909 21 6 1 3 944 0 0 1 0 0
+ 0 943 3 3 944 944
+D 912 21 6 1 3 946 0 0 1 0 0
+ 0 945 3 3 946 946
+D 915 21 6 2 947 948 0 0 1 0 0
+ 0 943 3 3 944 944
+ 0 642 944 3 642 642
+D 918 21 6 2 947 949 0 0 1 0 0
+ 0 943 3 3 944 944
+ 0 123 944 3 123 123
+D 921 21 6 1 3 946 0 0 1 0 0
+ 0 945 3 3 946 946
+D 924 21 6 1 3 944 0 0 1 0 0
+ 0 943 3 3 944 944
+D 927 21 6 1 3 944 0 0 1 0 0
+ 0 943 3 3 944 944
+D 930 21 6 1 3 944 0 0 1 0 0
+ 0 943 3 3 944 944
+D 933 21 9 1 3 951 0 0 1 0 0
+ 0 950 3 3 951 951
+D 936 21 9 1 3 953 0 0 1 0 0
+ 0 952 3 3 953 953
+D 939 21 9 1 3 953 0 0 1 0 0
+ 0 952 3 3 953 953
+D 942 21 6 1 3 951 0 0 1 0 0
+ 0 950 3 3 951 951
+D 945 21 6 2 954 955 0 0 1 0 0
+ 0 952 3 3 953 953
+ 0 449 953 3 449 449
+D 948 21 9 1 3 957 0 0 1 0 0
+ 0 956 3 3 957 957
+D 951 21 9 1 3 959 0 0 1 0 0
+ 0 958 3 3 959 959
+D 954 21 9 1 3 961 0 0 1 0 0
+ 0 960 3 3 961 961
+D 957 21 9 1 3 961 0 0 1 0 0
+ 0 960 3 3 961 961
+D 960 21 9 1 3 961 0 0 1 0 0
+ 0 960 3 3 961 961
+D 963 21 9 1 3 961 0 0 1 0 0
+ 0 960 3 3 961 961
+D 966 21 6 1 3 957 0 0 1 0 0
+ 0 956 3 3 957 957
+D 969 21 6 1 3 959 0 0 1 0 0
+ 0 958 3 3 959 959
+D 972 21 6 2 962 963 0 0 1 0 0
+ 0 960 3 3 961 961
+ 0 449 961 3 449 449
+D 975 21 6 1 3 959 0 0 1 0 0
+ 0 958 3 3 959 959
+D 978 21 9 1 3 965 0 0 1 0 0
+ 0 964 3 3 965 965
+D 981 21 6 1 3 965 0 0 1 0 0
+ 0 964 3 3 965 965
+D 984 21 6 1 3 642 0 0 0 0 0
+ 0 642 3 3 642 642
+D 987 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 990 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 993 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 996 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 999 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1002 21 6 1 3 969 0 0 1 0 0
+ 0 968 3 3 969 969
+D 1005 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1008 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1011 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1014 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1017 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1020 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1023 21 6 1 3 967 0 0 1 0 0
+ 0 966 3 3 967 967
+D 1026 21 9 1 3 971 0 0 1 0 0
+ 0 970 3 3 971 971
+D 1029 21 6 1 3 971 0 0 1 0 0
+ 0 970 3 3 971 971
+D 1032 21 6 1 3 973 0 0 1 0 0
+ 0 972 3 3 973 973
+D 1035 21 9 1 3 975 0 0 1 0 0
+ 0 974 3 3 975 975
+D 1038 21 9 1 3 977 0 0 1 0 0
+ 0 976 3 3 977 977
+D 1041 21 6 1 3 975 0 0 1 0 0
+ 0 974 3 3 975 975
+D 1044 21 6 1 3 642 0 0 0 0 0
+ 0 642 3 3 642 642
+D 1047 21 6 1 3 977 0 0 1 0 0
+ 0 976 3 3 977 977
+D 1050 21 6 1 3 977 0 0 1 0 0
+ 0 976 3 3 977 977
+D 1053 21 6 1 3 977 0 0 1 0 0
+ 0 976 3 3 977 977
+D 1056 21 6 1 3 977 0 0 1 0 0
+ 0 976 3 3 977 977
+D 1059 21 6 1 3 977 0 0 1 0 0
+ 0 976 3 3 977 977
+D 1062 21 9 1 3 979 0 0 1 0 0
+ 0 978 3 3 979 979
+D 1065 21 9 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1068 21 9 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1071 21 6 1 3 979 0 0 1 0 0
+ 0 978 3 3 979 979
+D 1074 21 6 1 3 642 0 0 0 0 0
+ 0 642 3 3 642 642
+D 1077 21 6 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1080 21 6 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1083 21 6 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1086 21 6 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1089 21 6 1 3 981 0 0 1 0 0
+ 0 980 3 3 981 981
+D 1092 21 6 1 3 983 0 0 1 0 0
+ 0 982 3 3 983 983
+D 1095 21 6 1 3 985 0 0 1 0 0
+ 0 984 3 3 985 985
+D 1098 21 6 1 3 983 0 0 1 0 0
+ 0 982 3 3 983 983
+D 1101 21 6 1 3 983 0 0 1 0 0
+ 0 982 3 3 983 983
+D 1104 21 6 2 986 987 0 0 1 0 0
+ 0 982 3 3 983 983
+ 0 123 983 3 123 123
+D 1107 21 6 1 3 983 0 0 1 0 0
+ 0 982 3 3 983 983
+D 1110 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1113 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1116 21 6 1 3 991 0 0 1 0 0
+ 0 990 3 3 991 991
+D 1119 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1122 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1125 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1128 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1131 21 6 1 3 989 0 0 1 0 0
+ 0 988 3 3 989 989
+D 1134 21 9 1 3 993 0 0 1 0 0
+ 0 992 3 3 993 993
+D 1137 21 6 1 3 993 0 0 1 0 0
+ 0 992 3 3 993 993
+D 1140 21 6 1 3 993 0 0 1 0 0
+ 0 992 3 3 993 993
+D 1143 21 6 1 3 995 0 0 1 0 0
+ 0 994 3 3 995 995
+D 1146 21 9 1 3 997 0 0 1 0 0
+ 0 996 3 3 997 997
+D 1149 21 6 1 3 997 0 0 1 0 0
+ 0 996 3 3 997 997
+D 1152 21 6 1 3 999 0 0 1 0 0
+ 0 998 3 3 999 999
+D 1155 21 6 1 3 1001 0 0 1 0 0
+ 0 1000 3 3 1001 1001
+D 1158 21 6 1 3 1003 0 0 1 0 0
+ 0 1002 3 3 1003 1003
+D 1161 21 6 1 3 1003 0 0 1 0 0
+ 0 1002 3 3 1003 1003
+D 1164 21 6 2 1004 1006 0 0 1 0 0
+ 0 1002 3 3 1003 1003
+ 0 1005 1003 3 1005 1005
+D 1167 21 6 1 3 1003 0 0 1 0 0
+ 0 1002 3 3 1003 1003
+D 1170 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1173 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1176 21 6 1 3 1010 0 0 1 0 0
+ 0 1009 3 3 1010 1010
+D 1179 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1182 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1185 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1188 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1191 21 6 1 3 1008 0 0 1 0 0
+ 0 1007 3 3 1008 1008
+D 1194 21 9 1 3 1012 0 0 1 0 0
+ 0 1011 3 3 1012 1012
+D 1197 21 6 1 3 1012 0 0 1 0 0
+ 0 1011 3 3 1012 1012
+D 1200 21 6 1 3 1014 0 0 1 0 0
+ 0 1013 3 3 1014 1014
+D 1203 21 6 1 3 1014 0 0 1 0 0
+ 0 1013 3 3 1014 1014
+D 1206 21 6 2 1015 1016 0 0 1 0 0
+ 0 1013 3 3 1014 1014
+ 0 642 1014 3 642 642
+D 1209 21 6 1 3 1012 0 0 1 0 0
+ 0 1011 3 3 1012 1012
+D 1212 21 6 1 3 1014 0 0 1 0 0
+ 0 1013 3 3 1014 1014
+D 1215 21 9 1 3 1018 0 0 1 0 0
+ 0 1017 3 3 1018 1018
+D 1218 21 6 1 3 1018 0 0 1 0 0
+ 0 1017 3 3 1018 1018
+D 1221 21 6 1 3 642 0 0 0 0 0
+ 0 642 3 3 642 642
+D 1224 21 6 1 3 1020 0 0 1 0 0
+ 0 1019 3 3 1020 1020
+D 1227 21 6 1 3 1020 0 0 1 0 0
+ 0 1019 3 3 1020 1020
+D 1230 21 6 2 1021 1022 0 0 1 0 0
+ 0 1019 3 3 1020 1020
+ 0 449 1020 3 449 449
+D 1233 21 6 2 1021 1023 0 0 1 0 0
+ 0 1019 3 3 1020 1020
+ 0 642 1020 3 642 642
+D 1236 21 6 1 3 1020 0 0 1 0 0
+ 0 1019 3 3 1020 1020
+D 1239 21 6 1 3 1020 0 0 1 0 0
+ 0 1019 3 3 1020 1020
+D 1242 21 9 1 3 1025 0 0 1 0 0
+ 0 1024 3 3 1025 1025
+D 1245 21 9 1 3 1027 0 0 1 0 0
+ 0 1026 3 3 1027 1027
+D 1248 21 6 1 3 1025 0 0 1 0 0
+ 0 1024 3 3 1025 1025
+D 1251 21 6 1 3 1027 0 0 1 0 0
+ 0 1026 3 3 1027 1027
+D 1254 21 6 1 3 1027 0 0 1 0 0
+ 0 1026 3 3 1027 1027
+D 1257 21 9 1 3 1029 0 0 1 0 0
+ 0 1028 3 3 1029 1029
+D 1260 21 9 1 3 1031 0 0 1 0 0
+ 0 1030 3 3 1031 1031
+D 1263 21 9 1 3 1031 0 0 1 0 0
+ 0 1030 3 3 1031 1031
+D 1266 21 9 2 1032 1033 0 0 1 0 0
+ 0 1030 3 3 1031 1031
+ 0 449 1031 3 449 449
+D 1269 21 6 1 3 1029 0 0 1 0 0
+ 0 1028 3 3 1029 1029
+D 1272 21 6 1 3 1029 0 0 1 0 0
+ 0 1028 3 3 1029 1029
+D 1275 21 9 1 3 1035 0 0 1 0 0
+ 0 1034 3 3 1035 1035
+D 1278 21 9 1 3 1035 0 0 1 0 0
+ 0 1034 3 3 1035 1035
+D 1281 21 9 2 1036 0 0 0 1 1 0
+ 0 1037 3 3 1038 1038
+ 0 0 1038 3 0 1039
+D 1284 21 9 1 3 1041 0 0 1 0 0
+ 0 1040 3 3 1041 1041
+D 1287 21 9 1 3 1035 0 0 1 0 0
+ 0 1034 3 3 1035 1035
+D 1290 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1042
+D 1293 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1043
+D 1296 21 6 1 3 449 0 0 0 0 0
+ 0 449 3 3 449 449
+D 1299 21 6 1 3 1045 0 0 1 0 0
+ 0 1044 3 3 1045 1045
+D 1302 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1046
+D 1305 21 6 1 3 1035 0 0 1 0 0
+ 0 1034 3 3 1035 1035
+D 1308 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1047
+D 1311 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1048
+D 1314 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1049
+D 1317 21 6 1 3 1051 0 0 1 0 0
+ 0 1050 3 3 1051 1051
+D 1320 21 6 1 3 1053 0 0 1 0 0
+ 0 1052 3 3 1053 1053
+D 1323 21 6 1 3 1051 0 0 1 0 0
+ 0 1050 3 3 1051 1051
+D 1326 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1054
+D 1329 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1055
+D 1332 21 6 1 3 1058 0 0 1 0 0
+ 0 1057 3 3 1058 1058
+D 1335 21 6 1 2 1062 0 0 1 0 0
+ 2 1060 3 2 1061 1062
+D 1338 21 6 1 3 1063 0 0 1 0 0
+ 0 1059 3 3 1063 1063
+D 1341 21 6 1 3 1063 0 0 1 0 0
+ 0 1059 3 3 1063 1063
+D 1344 21 6 1 3 1063 0 0 1 0 0
+ 0 1059 3 3 1063 1063
+D 1347 21 6 1 3 1065 0 0 1 0 0
+ 0 1064 3 3 1065 1065
+D 1350 21 6 1 3 1063 0 0 1 0 0
+ 0 1059 3 3 1063 1063
+D 1353 21 6 1 3 1063 0 0 1 0 0
+ 0 1059 3 3 1063 1063
+D 1356 21 6 1 3 1067 0 0 1 0 0
+ 0 1066 3 3 1067 1067
+D 1359 21 6 1 2 1070 0 0 1 0 0
+ 2 1068 3 2 1069 1070
+D 1362 21 6 1 3 1067 0 0 1 0 0
+ 0 1066 3 3 1067 1067
+D 1365 21 6 1 3 1067 0 0 1 0 0
+ 0 1066 3 3 1067 1067
+D 1368 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1071
+D 1371 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1072
+D 1374 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1073
+D 1377 21 6 1 3 1075 0 0 1 0 0
+ 0 1074 3 3 1075 1075
+D 1380 21 6 1 3 1077 0 0 1 0 0
+ 0 1076 3 3 1077 1077
+D 1383 21 6 1 3 1075 0 0 1 0 0
+ 0 1074 3 3 1075 1075
+D 1386 21 6 1 3 1075 0 0 1 0 0
+ 0 1074 3 3 1075 1075
+D 1389 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1078
+D 1392 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1079
+D 1395 21 6 1 3 1082 0 0 1 0 0
+ 0 1081 3 3 1082 1082
+D 1398 21 6 1 3 1083 0 0 1 0 0
+ 0 1080 3 3 1083 1083
+D 1401 21 6 1 3 1086 0 0 1 0 0
+ 0 1085 3 3 1086 1086
+D 1404 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1087
+D 1407 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1088
+D 1410 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1089
+D 1413 21 6 1 2 1093 0 0 1 0 0
+ 2 1091 3 2 1092 1093
+D 1416 21 6 1 3 1094 0 0 1 0 0
+ 0 1090 3 3 1094 1094
+D 1419 21 6 1 3 1094 0 0 1 0 0
+ 0 1090 3 3 1094 1094
+D 1422 21 6 1 3 1094 0 0 1 0 0
+ 0 1090 3 3 1094 1094
+D 1425 21 6 1 3 1096 0 0 1 0 0
+ 0 1095 3 3 1096 1096
+D 1428 21 6 1 3 1094 0 0 1 0 0
+ 0 1090 3 3 1094 1094
+D 1431 21 6 1 3 1094 0 0 1 0 0
+ 0 1090 3 3 1094 1094
+D 1434 21 6 1 3 1098 0 0 1 0 0
+ 0 1097 3 3 1098 1098
+D 1437 21 6 1 3 1098 0 0 1 0 0
+ 0 1097 3 3 1098 1098
+D 1440 21 6 1 3 1100 0 0 1 0 0
+ 0 1099 3 3 1100 1100
+D 1443 21 6 1 3 1102 0 0 1 0 0
+ 0 1101 3 3 1102 1102
+D 1446 21 9 1 3 1104 0 0 1 0 0
+ 0 1103 3 3 1104 1104
+D 1449 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1105
+D 1452 21 9 1 3 1107 0 0 1 0 0
+ 0 1106 3 3 1107 1107
+D 1455 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1108
+D 1458 21 6 1 3 1104 0 0 1 0 0
+ 0 1103 3 3 1104 1104
+D 1461 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1109
+D 1464 21 6 1 3 1111 0 0 1 0 0
+ 0 1110 3 3 1111 1111
+D 1467 21 6 1 3 1111 0 0 1 0 0
+ 0 1110 3 3 1111 1111
+D 1470 21 6 1 3 1114 0 0 1 0 0
+ 0 1113 3 3 1114 1114
+D 1473 21 6 1 3 1116 0 0 1 0 0
+ 0 1115 3 3 1116 1116
+D 1476 21 6 1 3 1119 0 0 1 0 0
+ 0 1118 3 3 1119 1119
+D 1479 21 6 1 3 1120 0 0 1 0 0
+ 0 1117 3 3 1120 1120
+D 1482 21 6 1 3 1122 0 0 1 0 0
+ 0 1121 3 3 1122 1122
+D 1485 21 6 1 3 1124 0 0 1 0 0
+ 0 1123 3 3 1124 1124
+D 1488 21 6 1 3 1126 0 0 1 0 0
+ 0 1125 3 3 1126 1126
+D 1491 21 9 1 3 1128 0 0 1 0 0
+ 0 1127 3 3 1128 1128
+D 1494 21 9 1 3 1128 0 0 1 0 0
+ 0 1127 3 3 1128 1128
+D 1497 21 9 2 1129 0 0 0 1 1 0
+ 0 1130 3 3 1131 1131
+ 0 0 1131 3 0 1132
+D 1500 21 9 1 3 1134 0 0 1 0 0
+ 0 1133 3 3 1134 1134
+D 1503 21 9 1 3 1128 0 0 1 0 0
+ 0 1127 3 3 1128 1128
+D 1506 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1135
+D 1509 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1136
+D 1512 21 6 1 3 449 0 0 0 0 0
+ 0 449 3 3 449 449
+D 1515 21 6 1 3 1138 0 0 1 0 0
+ 0 1137 3 3 1138 1138
+D 1518 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 1139
+D 1521 21 6 1 3 1128 0 0 1 0 0
+ 0 1127 3 3 1128 1128
+S 582 24 0 0 0 8 1 0 4668 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 dvode_f90_m
+S 583 16 1 0 0 6 1 582 4680 14 400000 0 0 0 0 8 13 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wp
+S 584 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 585 6 4 0 0 16 586 582 4689 14 0 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 use_jacsp
+S 586 6 4 0 0 16 587 582 4699 14 0 0 4 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 like_original_vode
+S 587 6 4 0 0 6 588 582 4718 14 0 0 8 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 infods
+S 588 6 4 0 0 6 589 582 4725 14 0 0 12 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 liwads
+S 589 6 4 0 0 6 590 582 4732 14 0 0 16 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 maxgrpds
+S 590 6 4 0 0 6 591 582 4741 14 0 0 20 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mingrpds
+S 591 6 4 0 0 6 592 582 4750 14 0 0 24 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nrfjacds
+S 592 6 4 0 0 6 593 582 4759 14 0 0 28 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ncfjacds
+S 593 6 4 0 0 6 594 582 4768 14 0 0 32 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lwkds
+S 594 6 4 0 0 6 821 582 4774 14 0 0 36 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 liwkds
+S 595 7 6 0 0 33 1 582 4781 10a00014 51 0 0 599 0 0 0 601 0 0 0 0 0 0 0 0 598 0 0 600 582 0 0 0 0 indrowds
+S 596 6 4 0 0 6 607 582 4790 40800006 0 0 0 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_0
+S 597 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 598 8 4 0 0 36 609 582 4796 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indrowds$sd
+S 599 6 4 0 0 7 600 582 4808 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indrowds$p
+S 600 6 4 0 0 7 598 582 4819 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indrowds$o
+S 601 22 0 0 0 6 1 582 4830 40000000 1000 0 0 0 595 0 0 0 0 598 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indrowds$arrdsc
+S 602 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 603 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 604 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 605 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 606 7 6 0 0 39 1 582 4846 10a00014 51 0 0 609 0 0 0 611 0 0 0 0 0 0 0 0 608 0 0 610 582 0 0 0 0 indcolds
+S 607 6 4 0 0 6 613 582 4855 40800006 0 0 4 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_1
+S 608 8 4 0 0 42 615 582 4861 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indcolds$sd
+S 609 6 4 0 0 7 610 582 4873 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indcolds$p
+S 610 6 4 0 0 7 608 582 4884 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indcolds$o
+S 611 22 0 0 0 6 1 582 4895 40000000 1000 0 0 0 606 0 0 0 0 608 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 indcolds$arrdsc
+S 612 7 6 0 0 45 1 582 4911 10a00014 51 0 0 615 0 0 0 617 0 0 0 0 0 0 0 0 614 0 0 616 582 0 0 0 0 ngrpds
+S 613 6 4 0 0 6 619 582 4918 40800006 0 0 8 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_2
+S 614 8 4 0 0 48 621 582 4924 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ngrpds$sd
+S 615 6 4 0 0 7 616 582 4934 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ngrpds$p
+S 616 6 4 0 0 7 614 582 4943 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ngrpds$o
+S 617 22 0 0 0 6 1 582 4952 40000000 1000 0 0 0 612 0 0 0 0 614 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ngrpds$arrdsc
+S 618 7 6 0 0 51 1 582 4966 10a00014 51 0 0 621 0 0 0 623 0 0 0 0 0 0 0 0 620 0 0 622 582 0 0 0 0 ipntrds
+S 619 6 4 0 0 6 625 582 4974 40800006 0 0 12 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_3
+S 620 8 4 0 0 54 627 582 4980 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ipntrds$sd
+S 621 6 4 0 0 7 622 582 4991 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ipntrds$p
+S 622 6 4 0 0 7 620 582 5001 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ipntrds$o
+S 623 22 0 0 0 6 1 582 5011 40000000 1000 0 0 0 618 0 0 0 0 620 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ipntrds$arrdsc
+S 624 7 6 0 0 57 1 582 5026 10a00014 51 0 0 627 0 0 0 629 0 0 0 0 0 0 0 0 626 0 0 628 582 0 0 0 0 jpntrds
+S 625 6 4 0 0 6 631 582 5034 40800006 0 0 16 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_4
+S 626 8 4 0 0 60 633 582 5040 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jpntrds$sd
+S 627 6 4 0 0 7 628 582 5051 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jpntrds$p
+S 628 6 4 0 0 7 626 582 5061 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jpntrds$o
+S 629 22 0 0 0 6 1 582 5071 40000000 1000 0 0 0 624 0 0 0 0 626 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jpntrds$arrdsc
+S 630 7 6 0 0 63 1 582 5086 10a00014 51 0 0 633 0 0 0 635 0 0 0 0 0 0 0 0 632 0 0 634 582 0 0 0 0 iwads
+S 631 6 4 0 0 6 637 582 5092 40800006 0 0 20 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_5
+S 632 8 4 0 0 66 639 582 5098 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwads$sd
+S 633 6 4 0 0 7 634 582 5107 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwads$p
+S 634 6 4 0 0 7 632 582 5115 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwads$o
+S 635 22 0 0 0 6 1 582 5123 40000000 1000 0 0 0 630 0 0 0 0 632 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwads$arrdsc
+S 636 7 6 0 0 69 1 582 5136 10a00014 51 0 0 639 0 0 0 641 0 0 0 0 0 0 0 0 638 0 0 640 582 0 0 0 0 iwkds
+S 637 6 4 0 0 6 643 582 5142 40800006 0 0 24 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_6
+S 638 8 4 0 0 72 645 582 5148 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwkds$sd
+S 639 6 4 0 0 7 640 582 5157 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwkds$p
+S 640 6 4 0 0 7 638 582 5165 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwkds$o
+S 641 22 0 0 0 6 1 582 5173 40000000 1000 0 0 0 636 0 0 0 0 638 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwkds$arrdsc
+S 642 7 6 0 0 75 1 582 5186 10a00014 51 0 0 645 0 0 0 647 0 0 0 0 0 0 0 0 644 0 0 646 582 0 0 0 0 ioptds
+S 643 6 4 0 0 6 649 582 5193 40800006 0 0 28 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_7
+S 644 8 4 0 0 78 651 582 5199 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ioptds$sd
+S 645 6 4 0 0 7 646 582 5209 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ioptds$p
+S 646 6 4 0 0 7 644 582 5218 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ioptds$o
+S 647 22 0 0 0 6 1 582 5227 40000000 1000 0 0 0 642 0 0 0 0 644 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ioptds$arrdsc
+S 648 7 6 0 0 81 1 582 5241 10a00014 51 0 0 651 0 0 0 653 0 0 0 0 0 0 0 0 650 0 0 652 582 0 0 0 0 yscaleds
+S 649 6 4 0 0 6 655 582 5250 40800006 0 0 32 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_8
+S 650 8 4 0 0 84 657 582 5256 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yscaleds$sd
+S 651 6 4 0 0 7 652 582 5268 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yscaleds$p
+S 652 6 4 0 0 7 650 582 5279 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yscaleds$o
+S 653 22 0 0 0 8 1 582 5290 40000000 1000 0 0 0 648 0 0 0 0 650 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yscaleds$arrdsc
+S 654 7 6 0 0 87 1 582 5306 10a00014 51 0 0 657 0 0 0 659 0 0 0 0 0 0 0 0 656 0 0 658 582 0 0 0 0 wkds
+S 655 6 4 0 0 6 661 582 5311 40800006 0 0 36 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_9
+S 656 8 4 0 0 90 663 582 5317 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wkds$sd
+S 657 6 4 0 0 7 658 582 5325 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wkds$p
+S 658 6 4 0 0 7 656 582 5332 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wkds$o
+S 659 22 0 0 0 8 1 582 5339 40000000 1000 0 0 0 654 0 0 0 0 656 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wkds$arrdsc
+S 660 7 6 0 0 93 1 582 5351 10a00014 51 0 0 663 0 0 0 665 0 0 0 0 0 0 0 0 662 0 0 664 582 0 0 0 0 facds
+S 661 6 4 0 0 6 754 582 5357 40800006 0 0 40 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_10
+S 662 8 4 0 0 96 969 582 5364 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 facds$sd
+S 663 6 4 0 0 7 664 582 5373 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 facds$p
+S 664 6 4 0 0 7 662 582 5381 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 facds$o
+S 665 22 0 0 0 8 1 582 5389 40000000 1000 0 0 0 660 0 0 0 0 662 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 facds$arrdsc
+S 666 6 4 0 0 9 667 582 5402 14 0 0 0 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 u125
+S 667 6 4 0 0 9 776 582 5407 14 0 0 8 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 u325
+S 668 16 0 0 0 16 1 582 5412 14 400000 0 0 0 0 0 119 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 use_ma48_for_sparse
+S 669 3 0 0 0 16 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16
+S 670 16 0 0 0 6 1 582 5432 14 400000 0 0 0 0 100 121 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ipcuth_max
+S 671 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 672 16 0 0 0 6 1 582 5443 14 400000 0 0 0 0 -3 124 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 kfc
+S 673 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 674 3 0 0 0 6 0 1 0 0 0 0 0 0 0 -1 -3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 675 16 0 0 0 6 1 582 5447 14 400000 0 0 0 0 -15 127 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 kfh
+S 677 3 0 0 0 6 0 1 0 0 0 0 0 0 0 -1 -15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 678 16 0 0 0 6 1 582 5451 14 400000 0 0 0 0 33 129 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 leniv1
+S 679 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 680 16 0 0 0 6 1 582 5458 14 400000 0 0 0 0 8 13 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 leniv2
+S 681 16 0 0 0 6 1 582 5465 14 400000 0 0 0 0 48 132 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lenrv1
+S 682 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 48 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 683 16 0 0 0 6 1 582 5472 14 400000 0 0 0 0 1 3 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lenrv2
+S 684 16 0 0 0 6 1 582 5479 14 400000 0 0 0 0 30 135 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 liwuser
+S 685 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 686 16 0 0 0 6 1 582 5487 14 400000 0 0 0 0 22 137 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lrwuser
+S 687 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 688 16 0 0 0 6 1 582 5495 14 400000 0 0 0 0 3 123 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 maxcor
+S 689 16 0 0 0 6 1 582 5502 14 400000 0 0 0 0 900000000 140 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 max_array_size
+S 690 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 900000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 691 16 0 0 0 6 1 582 5517 14 400000 0 0 0 0 20 142 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 msbp
+S 692 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 693 16 0 0 0 6 1 582 5522 14 400000 0 0 0 0 10 144 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mxhnl0
+S 694 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 695 16 0 0 0 6 1 582 5529 14 400000 0 0 0 0 10 144 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mxncf
+S 696 16 0 0 0 6 1 582 5535 14 400000 0 0 0 0 5000 147 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mxstp0
+S 697 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 5000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 698 16 0 0 0 9 1 582 5542 14 400000 0 0 0 0 699 149 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 addon
+S 699 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1051772663 -1598689907 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 700 16 0 0 0 9 1 582 5558 14 400000 0 0 0 0 701 151 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bias1
+S 701 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1075314688 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 702 16 0 0 0 9 1 582 5571 14 400000 0 0 0 0 701 151 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bias2
+S 703 16 0 0 0 9 1 582 5584 14 400000 0 0 0 0 704 154 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bias3
+S 704 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1076101120 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 705 16 0 0 0 9 1 582 5598 14 400000 0 0 0 0 706 156 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ccmax
+S 706 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1070805811 858993459 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 707 16 0 0 0 9 1 582 5611 14 400000 0 0 0 0 708 158 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 cortes
+S 708 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1069128089 -1717986918 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 709 16 0 0 0 9 1 582 5625 14 400000 0 0 0 0 706 156 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 crdown
+S 710 16 0 0 0 9 1 582 5639 14 400000 0 0 0 0 711 161 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etacf
+S 711 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1070596096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 712 16 0 0 0 9 1 582 5653 14 400000 0 0 0 0 708 158 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etamin
+S 713 16 0 0 0 9 1 582 5667 14 400000 0 0 0 0 714 164 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etamx1
+S 714 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1086556160 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 715 16 0 0 0 9 1 582 5683 14 400000 0 0 0 0 704 154 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etamx2
+S 716 16 0 0 0 9 1 582 5698 14 400000 0 0 0 0 704 154 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etamx3
+S 717 16 0 0 0 9 1 582 5713 14 400000 0 0 0 0 718 168 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etamxf
+S 718 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1070176665 -1717986918 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 719 16 0 0 0 9 1 582 5727 14 400000 0 0 0 0 720 170 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 five
+S 720 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1075052544 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 721 16 0 0 0 9 1 582 5739 14 400000 0 0 0 0 722 172 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 four
+S 722 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1074790400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 723 16 0 0 0 9 1 582 5751 14 400000 0 0 0 0 580 174 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 half
+S 724 16 0 0 0 9 1 582 5763 14 400000 0 0 0 0 725 176 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hun
+S 725 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1079574528 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 726 16 0 0 0 9 1 582 5776 14 400000 0 0 0 0 727 178 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hundreth
+S 727 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1065646817 1202590843 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 728 16 0 0 0 9 1 582 5793 14 400000 0 0 0 0 578 12 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 one
+S 729 16 0 0 0 9 1 582 5804 14 400000 0 0 0 0 730 181 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 onepsm
+S 730 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1072693258 2086323314 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 731 16 0 0 0 9 1 582 5822 14 400000 0 0 0 0 708 158 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 pt1
+S 732 16 0 0 0 9 1 582 5833 14 400000 0 0 0 0 718 168 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 pt2
+S 733 16 0 0 0 9 1 582 5844 14 400000 0 0 0 0 579 185 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rdiv
+S 734 16 0 0 0 9 1 582 5856 14 400000 0 0 0 0 701 151 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 six
+S 735 16 0 0 0 9 1 582 5867 14 400000 0 0 0 0 704 154 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ten
+S 736 16 0 0 0 9 1 582 5879 14 400000 0 0 0 0 708 158 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tenth
+S 737 16 0 0 0 9 1 582 5892 14 400000 0 0 0 0 738 190 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 thou
+S 738 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1083129856 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 739 16 0 0 0 9 1 582 5907 14 400000 0 0 0 0 740 192 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 thresh
+S 740 3 0 0 0 9 0 1 0 0 0 0 0 0 0 1073217536 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9
+S 741 16 0 0 0 9 1 582 5921 14 400000 0 0 0 0 579 185 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 two
+S 742 16 0 0 0 9 1 582 5932 14 400000 0 0 0 0 577 195 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 zero
+S 743 19 0 0 0 8 1 582 5944 4000 0 0 0 0 0 0 0 0 0 0 0 0 0 18 9 0 0 0 0 0 582 0 0 0 0 dvode_f90
+O 743 9 752 751 750 749 748 747 746 745 744
+S 744 27 0 0 0 8 1333 582 5954 10000 0 0 0 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 vode_f90
+Q 744 743 0
+S 745 27 0 0 0 8 1514 582 5963 10000 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 get_stats
+Q 745 743 0
+S 746 27 0 0 0 8 1615 582 5973 10000 0 0 0 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvindy
+Q 746 743 0
+S 747 27 0 0 0 8 1980 582 5980 10000 0 0 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 release_arrays
+Q 747 743 0
+S 748 27 0 0 0 8 1533 582 5995 10000 0 0 0 22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 set_iaja
+Q 748 743 0
+S 749 27 0 0 0 8 1525 582 6004 10000 0 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 usersets_iaja
+Q 749 743 0
+S 750 27 0 0 0 8 1784 582 6018 10000 0 0 0 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 check_stat
+Q 750 743 0
+S 751 27 0 0 0 6 2384 582 6029 10000 0 0 0 26 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jacsp
+Q 751 743 0
+S 752 27 0 0 0 8 2540 582 6035 10000 0 0 0 27 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvdsm
+Q 752 743 0
+S 753 25 0 0 0 99 1 582 6041 4 800004 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 vode_opts
+S 754 6 4 0 0 6 761 582 6051 40800006 0 0 44 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_11
+S 755 5 6 0 0 105 757 582 6058 10a00004 14 0 0 757 0 99 0 759 0 0 0 0 0 0 0 0 756 1 755 758 582 0 0 0 0 atol
+S 756 5 0 0 0 108 760 582 6063 40822004 1020 0 16 0 0 99 0 0 0 0 0 0 0 0 0 0 0 758 756 0 582 0 0 0 0 atol$sd
+S 757 5 0 0 0 7 758 582 6071 40802001 1020 0 0 0 0 99 0 0 0 0 0 0 0 0 0 0 0 755 757 0 582 0 0 0 0 atol$p
+S 758 5 0 0 0 7 756 582 6078 40802000 1020 0 8 0 0 99 0 0 0 0 0 0 0 0 0 0 0 757 758 0 582 0 0 0 0 atol$o
+S 759 22 0 0 0 8 1 582 6085 40000000 1000 0 0 0 755 0 0 0 0 756 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 atol$arrdsc
+S 760 5 6 0 0 111 763 582 6097 10a00004 14 0 88 763 0 99 0 765 0 0 0 0 0 0 0 0 762 755 760 764 582 0 0 0 0 rtol
+S 761 6 4 0 0 6 967 582 6102 40800006 0 0 48 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_12
+S 762 5 0 0 0 114 766 582 6109 40822004 1020 0 104 0 0 99 0 0 0 0 0 0 0 0 0 0 0 764 762 0 582 0 0 0 0 rtol$sd
+S 763 5 0 0 0 7 764 582 6117 40802001 1020 0 88 0 0 99 0 0 0 0 0 0 0 0 0 0 0 760 763 0 582 0 0 0 0 rtol$p
+S 764 5 0 0 0 7 762 582 6124 40802000 1020 0 96 0 0 99 0 0 0 0 0 0 0 0 0 0 0 763 764 0 582 0 0 0 0 rtol$o
+S 765 22 0 0 0 8 1 582 6131 40000000 1000 0 0 0 760 0 0 0 0 762 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rtol$arrdsc
+S 766 5 0 0 0 6 767 582 6143 800004 0 0 176 0 0 99 0 0 0 0 0 0 0 0 0 0 0 760 766 0 582 0 0 0 0 mf
+S 767 5 0 0 0 6 768 582 6146 800004 0 0 180 0 0 99 0 0 0 0 0 0 0 0 0 0 0 766 767 0 582 0 0 0 0 meth
+S 768 5 0 0 0 6 769 582 6151 800004 0 0 184 0 0 99 0 0 0 0 0 0 0 0 0 0 0 767 768 0 582 0 0 0 0 miter
+S 769 5 0 0 0 6 770 582 6157 800004 0 0 188 0 0 99 0 0 0 0 0 0 0 0 0 0 0 768 769 0 582 0 0 0 0 moss
+S 770 5 0 0 0 6 771 582 6162 800004 0 0 192 0 0 99 0 0 0 0 0 0 0 0 0 0 0 769 770 0 582 0 0 0 0 itol
+S 771 5 0 0 0 6 772 582 6167 800004 0 0 196 0 0 99 0 0 0 0 0 0 0 0 0 0 0 770 771 0 582 0 0 0 0 iopt
+S 772 5 0 0 0 6 773 582 6172 800004 0 0 200 0 0 99 0 0 0 0 0 0 0 0 0 0 0 771 772 0 582 0 0 0 0 ng
+S 773 5 0 0 0 16 774 582 6175 800004 0 0 204 0 0 99 0 0 0 0 0 0 0 0 0 0 0 772 773 0 582 0 0 0 0 dense
+S 774 5 0 0 0 16 775 582 6181 800004 0 0 208 0 0 99 0 0 0 0 0 0 0 0 0 0 0 773 774 0 582 0 0 0 0 banded
+S 775 5 0 0 0 16 1 582 6188 800004 0 0 212 0 0 99 0 0 0 0 0 0 0 0 0 0 0 774 775 0 582 0 0 0 0 sparse
+S 776 6 4 0 0 9 777 582 6195 14 0 0 16 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 acnrm
+S 777 6 4 0 0 9 779 582 6201 14 0 0 24 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 alpha
+S 778 6 4 0 0 9 781 582 6207 80001c 0 0 0 0 0 0 0 0 0 1331 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 big
+S 779 6 4 0 0 9 780 582 6211 14 0 0 32 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 big1
+S 780 6 4 0 0 9 782 582 6216 14 0 0 40 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ccmxj
+S 781 6 4 0 0 9 800 582 6222 80001c 0 0 8 0 0 0 0 0 0 1331 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 cgce
+S 782 6 4 0 0 9 783 582 6227 14 0 0 48 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 conp
+S 783 6 4 0 0 9 784 582 6232 14 0 0 56 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 crate
+S 784 6 4 0 0 9 785 582 6238 14 0 0 64 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 drc
+S 785 6 4 0 0 9 786 582 6242 14 0 0 72 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dres
+S 786 6 4 0 0 9 787 582 6247 14 0 0 80 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dxmax
+S 787 6 4 0 0 9 788 582 6253 14 0 0 88 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 eps
+S 788 6 4 0 0 9 789 582 6257 14 0 0 96 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 errmax
+S 789 6 4 0 0 9 790 582 6264 14 0 0 104 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 eta
+S 790 6 4 0 0 9 791 582 6268 14 0 0 112 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 etamax
+S 791 6 4 0 0 9 792 582 6275 14 0 0 120 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fracint
+S 792 6 4 0 0 9 793 582 6283 14 0 0 128 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fracsub
+S 793 6 4 0 0 9 794 582 6291 14 0 0 136 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 h
+S 794 6 4 0 0 9 795 582 6293 14 0 0 144 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hmin
+S 795 6 4 0 0 9 796 582 6298 14 0 0 152 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hmxi
+S 796 6 4 0 0 9 797 582 6303 14 0 0 160 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hnew
+S 797 6 4 0 0 9 798 582 6308 14 0 0 168 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hscal
+S 798 6 4 0 0 9 799 582 6314 14 0 0 176 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 hu
+S 799 6 4 0 0 9 802 582 6317 14 0 0 184 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 meps
+S 800 6 4 0 0 9 801 582 6322 80001c 0 0 16 0 0 0 0 0 0 1331 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mresid
+S 801 6 4 0 0 9 812 582 6329 80001c 0 0 24 0 0 0 0 0 0 1331 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mrmin
+S 802 6 4 0 0 9 803 582 6335 14 0 0 192 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 prl1
+S 803 6 4 0 0 9 804 582 6340 14 0 0 200 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rc
+S 804 6 4 0 0 9 805 582 6343 14 0 0 208 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 resid
+S 805 6 4 0 0 9 806 582 6349 14 0 0 216 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rl1
+S 806 6 4 0 0 9 807 582 6353 14 0 0 224 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rmin
+S 807 6 4 0 0 9 808 582 6358 14 0 0 232 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 seth
+S 808 6 4 0 0 9 809 582 6363 14 0 0 240 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 t0st
+S 809 6 4 0 0 9 810 582 6368 14 0 0 248 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 themax
+S 810 6 4 0 0 9 811 582 6375 14 0 0 256 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tlast
+S 811 6 4 0 0 9 813 582 6381 14 0 0 264 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tn
+S 812 6 4 0 0 9 1 582 6384 80001c 0 0 32 0 0 0 0 0 0 1331 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tol
+S 813 6 4 0 0 9 814 582 6388 14 0 0 272 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tol1
+S 814 6 4 0 0 9 815 582 6393 14 0 0 280 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 toutc
+S 815 6 4 0 0 9 816 582 6399 14 0 0 288 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 umax
+S 816 6 4 0 0 9 817 582 6404 14 0 0 296 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 uround
+S 817 6 4 0 0 9 818 582 6411 14 0 0 304 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 u_pivot
+S 818 6 4 0 0 9 819 582 6419 14 0 0 312 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 x2
+S 819 6 4 0 0 9 820 582 6422 14 0 0 320 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wm1
+S 820 6 4 0 0 9 1120 582 6426 14 0 0 328 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wm2
+S 821 6 4 0 0 6 822 582 6430 14 0 0 40 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 addtoja
+S 822 6 4 0 0 6 823 582 6438 14 0 0 44 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 addtonnz
+S 823 6 4 0 0 6 824 582 6447 14 0 0 48 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 consecutive_cfails
+S 824 6 4 0 0 6 825 582 6466 14 0 0 52 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 consecutive_efails
+S 825 6 4 0 0 6 826 582 6485 14 0 0 56 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 elbow_room
+S 826 6 4 0 0 6 827 582 6496 14 0 0 60 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iadim
+S 827 6 4 0 0 6 828 582 6502 14 0 0 64 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ianpiv
+S 828 6 4 0 0 6 829 582 6509 14 0 0 68 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iavpiv
+S 829 6 4 0 0 6 830 582 6516 14 0 0 72 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 icf
+S 830 6 4 0 0 6 831 582 6520 14 0 0 76 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 icncp
+S 831 6 4 0 0 6 832 582 6526 14 0 0 80 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ifail
+S 832 6 4 0 0 6 833 582 6532 14 0 0 84 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 imax
+S 833 6 4 0 0 6 834 582 6537 14 0 0 88 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 imin
+S 834 6 4 0 0 6 835 582 6542 14 0 0 92 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 inewj
+S 835 6 4 0 0 6 836 582 6548 14 0 0 96 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 init
+S 836 6 4 0 0 6 837 582 6553 14 0 0 100 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ipup
+S 837 6 4 0 0 6 838 582 6558 14 0 0 104 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 irank
+S 838 6 4 0 0 6 839 582 6564 14 0 0 108 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 irfnd
+S 839 6 4 0 0 6 841 582 6570 14 0 0 112 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 irncp
+S 840 6 4 0 0 6 871 582 6576 80001c 0 0 0 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 istart
+S 841 6 4 0 0 6 842 582 6583 14 0 0 116 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 istatc
+S 842 6 4 0 0 6 843 582 6590 14 0 0 120 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 itaskc
+S 843 6 4 0 0 6 844 582 6597 14 0 0 124 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jadim
+S 844 6 4 0 0 6 845 582 6603 14 0 0 128 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jcur
+S 845 6 4 0 0 6 846 582 6608 14 0 0 132 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jmin
+S 846 6 4 0 0 6 847 582 6613 14 0 0 136 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jstart
+S 847 6 4 0 0 6 848 582 6620 14 0 0 140 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jsv
+S 848 6 4 0 0 6 849 582 6624 14 0 0 144 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 kflag
+S 849 6 4 0 0 6 850 582 6630 14 0 0 148 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 kountl
+S 850 6 4 0 0 6 851 582 6637 14 0 0 152 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 kuth
+S 851 6 4 0 0 6 852 582 6642 14 0 0 156 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 l
+S 852 6 4 0 0 6 853 582 6644 14 0 0 160 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 large
+S 853 6 4 0 0 6 854 582 6650 14 0 0 164 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 last
+S 854 6 4 0 0 6 855 582 6655 14 0 0 168 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lenigp
+S 855 6 4 0 0 6 856 582 6662 14 0 0 172 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 licn_all
+S 856 6 4 0 0 6 857 582 6671 14 0 0 176 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lirn_all
+S 857 6 4 0 0 6 858 582 6680 14 0 0 180 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 liw
+S 858 6 4 0 0 6 859 582 6684 14 0 0 184 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 liwm
+S 859 6 4 0 0 6 860 582 6689 14 0 0 188 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lmax
+S 860 6 4 0 0 6 861 582 6694 14 0 0 192 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 locjs
+S 861 6 4 0 0 6 862 582 6700 14 0 0 196 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lp
+S 862 6 4 0 0 6 863 582 6703 14 0 0 200 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lrw
+S 863 6 4 0 0 6 864 582 6707 14 0 0 204 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lwm
+S 864 6 4 0 0 6 865 582 6711 14 0 0 208 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lwmdim
+S 865 6 4 0 0 6 866 582 6718 14 0 0 212 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lwmtemp
+S 866 6 4 0 0 6 867 582 6726 14 0 0 216 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lyh
+S 867 6 4 0 0 6 868 582 6730 14 0 0 220 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lyhtemp
+S 868 6 4 0 0 6 869 582 6738 14 0 0 224 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 manpiv
+S 869 6 4 0 0 6 870 582 6745 14 0 0 228 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mapiv
+S 870 6 4 0 0 6 872 582 6751 14 0 0 232 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 maxg
+S 871 6 4 0 0 6 876 582 6756 80001c 0 0 4 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 maxit
+S 872 6 4 0 0 6 873 582 6762 14 0 0 236 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 maxord
+S 873 6 4 0 0 6 874 582 6769 14 0 0 240 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mb28
+S 874 6 4 0 0 6 875 582 6774 14 0 0 244 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mb48
+S 875 6 4 0 0 6 878 582 6146 14 0 0 248 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 meth
+S 876 6 4 0 0 6 877 582 6779 80001c 0 0 8 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 micn
+S 877 6 4 0 0 6 880 582 6784 80001c 0 0 12 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 micncp
+S 878 6 4 0 0 6 879 582 6791 14 0 0 252 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 minicn
+S 879 6 4 0 0 6 883 582 6798 14 0 0 256 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 minirn
+S 880 6 4 0 0 6 881 582 6805 80001c 0 0 16 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mirank
+S 881 6 4 0 0 6 882 582 6812 80001c 0 0 20 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mirn
+S 882 6 4 0 0 6 884 582 6817 80001c 0 0 24 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mirncp
+S 883 6 4 0 0 6 885 582 6151 14 0 0 260 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 miter
+S 884 6 4 0 0 6 886 582 6824 80001c 0 0 28 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mlp
+S 885 6 4 0 0 6 887 582 6157 14 0 0 264 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 moss
+S 886 6 4 0 0 6 895 582 6828 80001c 0 0 32 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mp
+S 887 6 4 0 0 6 888 582 6831 14 0 0 268 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 msbg
+S 888 6 4 0 0 6 889 582 6836 14 0 0 272 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 msbj
+S 889 6 4 0 0 6 890 582 6841 14 0 0 276 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mxhnil
+S 890 6 4 0 0 6 891 582 6848 14 0 0 280 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mxstep
+S 891 6 4 0 0 6 892 582 6855 14 0 0 284 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 n
+S 892 6 4 0 0 6 893 582 6857 14 0 0 288 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nzb
+S 893 6 4 0 0 6 894 582 6861 14 0 0 292 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ncfn
+S 894 6 4 0 0 6 896 582 6866 14 0 0 296 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ndrop
+S 895 6 4 0 0 6 906 582 6872 80001c 0 0 36 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ndrop1
+S 896 6 4 0 0 6 897 582 6879 14 0 0 300 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ndx
+S 897 6 4 0 0 6 898 582 6883 14 0 0 304 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 netf
+S 898 6 4 0 0 6 899 582 6888 14 0 0 308 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 newh
+S 899 6 4 0 0 6 900 582 6893 14 0 0 312 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 newq
+S 900 6 4 0 0 6 901 582 6898 14 0 0 316 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nfe
+S 901 6 4 0 0 6 902 582 6902 14 0 0 320 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ngc
+S 902 6 4 0 0 6 903 582 6906 14 0 0 324 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nge
+S 903 6 4 0 0 6 904 582 6910 14 0 0 328 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ngp
+S 904 6 4 0 0 6 905 582 6914 14 0 0 332 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nhnil
+S 905 6 4 0 0 6 907 582 6920 14 0 0 336 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nje
+S 906 6 4 0 0 6 918 582 6924 80001c 0 0 40 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nlp
+S 907 6 4 0 0 6 908 582 6928 14 0 0 340 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nlu
+S 908 6 4 0 0 6 909 582 6932 14 0 0 344 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nni
+S 909 6 4 0 0 6 910 582 6936 14 0 0 348 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nnz
+S 910 6 4 0 0 6 911 582 6940 14 0 0 352 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 noiter
+S 911 6 4 0 0 6 912 582 6947 14 0 0 356 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nq
+S 912 6 4 0 0 6 913 582 6950 14 0 0 360 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nqnyh
+S 913 6 4 0 0 6 914 582 6956 14 0 0 364 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nqu
+S 914 6 4 0 0 6 915 582 6960 14 0 0 368 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nqwait
+S 915 6 4 0 0 6 916 582 6967 14 0 0 372 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nslg
+S 916 6 4 0 0 6 917 582 6972 14 0 0 376 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nslj
+S 917 6 4 0 0 6 919 582 6977 14 0 0 380 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nslp
+S 918 6 4 0 0 6 939 582 6982 80001c 0 0 44 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nsrch
+S 919 6 4 0 0 6 920 582 6988 14 0 0 384 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nsrch1
+S 920 6 4 0 0 6 921 582 6995 14 0 0 388 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nst
+S 921 6 4 0 0 6 922 582 6999 14 0 0 392 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nsubs
+S 922 6 4 0 0 6 923 582 7005 14 0 0 396 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nsups
+S 923 6 4 0 0 6 924 582 7011 14 0 0 400 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 num
+S 924 6 4 0 0 6 925 582 7015 14 0 0 404 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 numnz
+S 925 6 4 0 0 6 926 582 7021 14 0 0 408 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nyh
+S 926 6 4 0 0 6 927 582 7025 14 0 0 412 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nz_all
+S 927 6 4 0 0 6 928 582 7032 14 0 0 416 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nz_swag
+S 928 6 4 0 0 6 929 582 7040 14 0 0 420 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 previous_maxord
+S 929 6 4 0 0 6 930 582 7056 14 0 0 424 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wpd
+S 930 6 4 0 0 6 931 582 7060 14 0 0 428 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wps
+S 931 6 4 0 0 6 932 582 7064 14 0 0 432 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28ad_calls
+S 932 6 4 0 0 6 933 582 7077 14 0 0 436 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28bd_calls
+S 933 6 4 0 0 6 934 582 7090 14 0 0 440 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28cd_calls
+S 934 6 4 0 0 6 935 582 7103 14 0 0 444 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc19ad_calls
+S 935 6 4 0 0 6 936 582 7116 14 0 0 448 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 max_minirn
+S 936 6 4 0 0 6 937 582 7127 14 0 0 452 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 max_minicn
+S 937 6 4 0 0 6 938 582 7138 14 0 0 456 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 max_nnz
+S 938 6 4 0 0 6 943 582 7146 14 0 0 460 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bngrp
+S 939 6 4 0 0 16 940 582 7152 80001c 0 0 48 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 abort
+S 940 6 4 0 0 16 941 582 7158 80001c 0 0 52 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 abort1
+S 941 6 4 0 0 16 942 582 7165 80001c 0 0 56 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 abort2
+S 942 6 4 0 0 16 949 582 7172 80001c 0 0 60 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 abort3
+S 943 6 4 0 0 16 944 582 7179 14 0 0 464 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 aborta
+S 944 6 4 0 0 16 945 582 7186 14 0 0 468 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 abortb
+S 945 6 4 0 0 16 946 582 7193 14 0 0 472 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 allow_default_tols
+S 946 6 4 0 0 16 947 582 7212 14 0 0 476 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 build_iaja
+S 947 6 4 0 0 16 948 582 7223 14 0 0 480 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bounds
+S 948 6 4 0 0 16 950 582 7230 14 0 0 484 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 changed_acor
+S 949 6 4 0 0 16 953 582 7243 80001c 0 0 64 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 grow
+S 950 6 4 0 0 16 951 582 7248 14 0 0 488 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iaja_called
+S 951 6 4 0 0 16 952 582 7260 14 0 0 492 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 j_has_been_computed
+S 952 6 4 0 0 16 954 582 7280 14 0 0 496 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 j_is_constant
+S 953 6 4 0 0 16 955 582 7294 80001c 0 0 68 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lbig
+S 954 6 4 0 0 16 956 582 7299 14 0 0 500 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lbig1
+S 955 6 4 0 0 16 957 582 7305 80001c 0 0 72 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lblock
+S 956 6 4 0 0 16 958 582 7312 14 0 0 504 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma48_was_used
+S 957 6 4 0 0 16 960 582 7326 80001c 0 0 76 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ok_to_call_ma28
+S 958 6 4 0 0 16 959 582 7342 14 0 0 508 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 subs
+S 959 6 4 0 0 16 961 582 7347 14 0 0 512 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 sups
+S 960 6 4 0 0 16 1252 582 7352 80001c 0 0 80 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 opts_called
+S 961 6 4 0 0 16 962 582 7364 14 0 0 516 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 redo_pivot_sequence
+S 962 6 4 0 0 16 963 582 7384 14 0 0 520 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 scale_matrix
+S 963 6 4 0 0 16 964 582 6188 14 0 0 524 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 sparse
+S 964 6 4 0 0 16 965 582 7397 14 0 0 528 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 use_fast_factor
+S 965 6 4 0 0 16 1247 582 7413 14 0 0 532 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ymaxwarn
+S 966 7 6 0 0 117 1 582 7422 10a00014 51 0 0 969 0 0 0 971 0 0 0 0 0 0 0 0 968 0 0 970 582 0 0 0 0 acor
+S 967 6 4 0 0 6 973 582 7427 40800006 0 0 52 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_13
+S 968 8 4 0 0 120 975 582 7434 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 acor$sd
+S 969 6 4 0 0 7 970 582 7442 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 acor$p
+S 970 6 4 0 0 7 968 582 7449 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 acor$o
+S 971 22 0 0 0 8 1 582 7456 40000000 1000 0 0 0 966 0 0 0 0 968 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 acor$arrdsc
+S 972 7 6 0 0 123 1 582 7468 10a00014 51 0 0 975 0 0 0 977 0 0 0 0 0 0 0 0 974 0 0 976 582 0 0 0 0 cscalex
+S 973 6 4 0 0 6 979 582 7476 40800006 0 0 56 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_14
+S 974 8 4 0 0 126 981 582 7483 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 cscalex$sd
+S 975 6 4 0 0 7 976 582 7494 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 cscalex$p
+S 976 6 4 0 0 7 974 582 7504 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 cscalex$o
+S 977 22 0 0 0 8 1 582 7514 40000000 1000 0 0 0 972 0 0 0 0 974 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 cscalex$arrdsc
+S 978 7 6 0 0 129 1 582 7529 10a00014 51 0 0 981 0 0 0 983 0 0 0 0 0 0 0 0 980 0 0 982 582 0 0 0 0 ewt
+S 979 6 4 0 0 6 985 582 7533 40800006 0 0 60 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_15
+S 980 8 4 0 0 132 987 582 7540 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ewt$sd
+S 981 6 4 0 0 7 982 582 7547 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ewt$p
+S 982 6 4 0 0 7 980 582 7553 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ewt$o
+S 983 22 0 0 0 8 1 582 7559 40000000 1000 0 0 0 978 0 0 0 0 980 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ewt$arrdsc
+S 984 7 6 0 0 135 1 582 7570 10a00014 51 0 0 987 0 0 0 989 0 0 0 0 0 0 0 0 986 0 0 988 582 0 0 0 0 fptemp
+S 985 6 4 0 0 6 991 582 7577 40800006 0 0 64 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_16
+S 986 8 4 0 0 138 993 582 7584 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fptemp$sd
+S 987 6 4 0 0 7 988 582 7594 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fptemp$p
+S 988 6 4 0 0 7 986 582 7603 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fptemp$o
+S 989 22 0 0 0 8 1 582 7612 40000000 1000 0 0 0 984 0 0 0 0 986 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fptemp$arrdsc
+S 990 7 6 0 0 141 1 582 7626 10a00014 51 0 0 993 0 0 0 995 0 0 0 0 0 0 0 0 992 0 0 994 582 0 0 0 0 ftemp
+S 991 6 4 0 0 6 997 582 7632 40800006 0 0 68 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_17
+S 992 8 4 0 0 144 999 582 7639 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp$sd
+S 993 6 4 0 0 7 994 582 7648 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp$p
+S 994 6 4 0 0 7 992 582 7656 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp$o
+S 995 22 0 0 0 8 1 582 7664 40000000 1000 0 0 0 990 0 0 0 0 992 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp$arrdsc
+S 996 7 6 0 0 147 1 582 7677 10a00014 51 0 0 999 0 0 0 1001 0 0 0 0 0 0 0 0 998 0 0 1000 582 0 0 0 0 ftemp1
+S 997 6 4 0 0 6 1003 582 7684 40800006 0 0 72 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_18
+S 998 8 4 0 0 150 1005 582 7691 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp1$sd
+S 999 6 4 0 0 7 1000 582 7701 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp1$p
+S 1000 6 4 0 0 7 998 582 7710 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp1$o
+S 1001 22 0 0 0 8 1 582 7719 40000000 1000 0 0 0 996 0 0 0 0 998 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ftemp1$arrdsc
+S 1002 7 6 0 0 153 1 582 7733 10a00014 51 0 0 1005 0 0 0 1007 0 0 0 0 0 0 0 0 1004 0 0 1006 582 0 0 0 0 g0
+S 1003 6 4 0 0 6 1009 582 7736 40800006 0 0 76 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_19
+S 1004 8 4 0 0 156 1011 582 7743 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g0$sd
+S 1005 6 4 0 0 7 1006 582 7749 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g0$p
+S 1006 6 4 0 0 7 1004 582 7754 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g0$o
+S 1007 22 0 0 0 8 1 582 7759 40000000 1000 0 0 0 1002 0 0 0 0 1004 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g0$arrdsc
+S 1008 7 6 0 0 159 1 582 7769 10a00014 51 0 0 1011 0 0 0 1013 0 0 0 0 0 0 0 0 1010 0 0 1012 582 0 0 0 0 g1
+S 1009 6 4 0 0 6 1015 582 7772 40800006 0 0 80 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_20
+S 1010 8 4 0 0 162 1017 582 7779 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g1$sd
+S 1011 6 4 0 0 7 1012 582 7785 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g1$p
+S 1012 6 4 0 0 7 1010 582 7790 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g1$o
+S 1013 22 0 0 0 8 1 582 7795 40000000 1000 0 0 0 1008 0 0 0 0 1010 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 g1$arrdsc
+S 1014 7 6 0 0 165 1 582 7805 10a00014 51 0 0 1017 0 0 0 1019 0 0 0 0 0 0 0 0 1016 0 0 1018 582 0 0 0 0 gx
+S 1015 6 4 0 0 6 1021 582 7808 40800006 0 0 84 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_21
+S 1016 8 4 0 0 168 1023 582 7815 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 gx$sd
+S 1017 6 4 0 0 7 1018 582 7821 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 gx$p
+S 1018 6 4 0 0 7 1016 582 7826 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 gx$o
+S 1019 22 0 0 0 8 1 582 7831 40000000 1000 0 0 0 1014 0 0 0 0 1016 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 gx$arrdsc
+S 1020 7 6 0 0 171 1 582 7841 10a00014 51 0 0 1023 0 0 0 1025 0 0 0 0 0 0 0 0 1022 0 0 1024 582 0 0 0 0 jmat
+S 1021 6 4 0 0 6 1027 582 7846 40800006 0 0 88 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_22
+S 1022 8 4 0 0 174 1029 582 7853 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jmat$sd
+S 1023 6 4 0 0 7 1024 582 7861 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jmat$p
+S 1024 6 4 0 0 7 1022 582 7868 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jmat$o
+S 1025 22 0 0 0 6 1 582 7875 40000000 1000 0 0 0 1020 0 0 0 0 1022 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jmat$arrdsc
+S 1026 7 6 0 0 177 1 582 7887 10a00014 51 0 0 1029 0 0 0 1031 0 0 0 0 0 0 0 0 1028 0 0 1030 582 0 0 0 0 lb
+S 1027 6 4 0 0 6 1033 582 7890 40800006 0 0 92 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_23
+S 1028 8 4 0 0 180 1035 582 7897 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lb$sd
+S 1029 6 4 0 0 7 1030 582 7903 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lb$p
+S 1030 6 4 0 0 7 1028 582 7908 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lb$o
+S 1031 22 0 0 0 6 1 582 7913 40000000 1000 0 0 0 1026 0 0 0 0 1028 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lb$arrdsc
+S 1032 7 6 0 0 183 1 582 7923 10a00014 51 0 0 1035 0 0 0 1037 0 0 0 0 0 0 0 0 1034 0 0 1036 582 0 0 0 0 pmat
+S 1033 6 4 0 0 6 1039 582 7928 40800006 0 0 96 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_24
+S 1034 8 4 0 0 186 1041 582 7935 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 pmat$sd
+S 1035 6 4 0 0 7 1036 582 7943 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 pmat$p
+S 1036 6 4 0 0 7 1034 582 7950 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 pmat$o
+S 1037 22 0 0 0 8 1 582 7957 40000000 1000 0 0 0 1032 0 0 0 0 1034 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 pmat$arrdsc
+S 1038 7 6 0 0 189 1 582 7969 10a00014 51 0 0 1041 0 0 0 1043 0 0 0 0 0 0 0 0 1040 0 0 1042 582 0 0 0 0 rscalex
+S 1039 6 4 0 0 6 1045 582 7977 40800006 0 0 100 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_25
+S 1040 8 4 0 0 192 1047 582 7984 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rscalex$sd
+S 1041 6 4 0 0 7 1042 582 7995 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rscalex$p
+S 1042 6 4 0 0 7 1040 582 8005 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rscalex$o
+S 1043 22 0 0 0 8 1 582 8015 40000000 1000 0 0 0 1038 0 0 0 0 1040 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rscalex$arrdsc
+S 1044 7 6 0 0 195 1 582 8030 10a00014 51 0 0 1047 0 0 0 1049 0 0 0 0 0 0 0 0 1046 0 0 1048 582 0 0 0 0 rwork
+S 1045 6 4 0 0 6 1051 582 8036 40800006 0 0 104 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_26
+S 1046 8 4 0 0 198 1053 582 8043 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rwork$sd
+S 1047 6 4 0 0 7 1048 582 8052 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rwork$p
+S 1048 6 4 0 0 7 1046 582 8060 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rwork$o
+S 1049 22 0 0 0 8 1 582 8068 40000000 1000 0 0 0 1044 0 0 0 0 1046 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 rwork$arrdsc
+S 1050 7 6 0 0 201 1 582 8081 10a00014 51 0 0 1053 0 0 0 1055 0 0 0 0 0 0 0 0 1052 0 0 1054 582 0 0 0 0 savf
+S 1051 6 4 0 0 6 1057 582 8086 40800006 0 0 108 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_27
+S 1052 8 4 0 0 204 1059 582 8093 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 savf$sd
+S 1053 6 4 0 0 7 1054 582 8101 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 savf$p
+S 1054 6 4 0 0 7 1052 582 8108 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 savf$o
+S 1055 22 0 0 0 8 1 582 8115 40000000 1000 0 0 0 1050 0 0 0 0 1052 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 savf$arrdsc
+S 1056 7 6 0 0 207 1 582 8127 10a00014 51 0 0 1059 0 0 0 1061 0 0 0 0 0 0 0 0 1058 0 0 1060 582 0 0 0 0 ub
+S 1057 6 4 0 0 6 1063 582 8130 40800006 0 0 112 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_28
+S 1058 8 4 0 0 210 1065 582 8137 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ub$sd
+S 1059 6 4 0 0 7 1060 582 8143 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ub$p
+S 1060 6 4 0 0 7 1058 582 8148 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ub$o
+S 1061 22 0 0 0 8 1 582 8153 40000000 1000 0 0 0 1056 0 0 0 0 1058 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ub$arrdsc
+S 1062 7 6 0 0 213 1 582 8163 10a00014 51 0 0 1065 0 0 0 1067 0 0 0 0 0 0 0 0 1064 0 0 1066 582 0 0 0 0 wm
+S 1063 6 4 0 0 6 1069 582 8166 40800006 0 0 116 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_29
+S 1064 8 4 0 0 216 1071 582 8173 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wm$sd
+S 1065 6 4 0 0 7 1066 582 8179 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wm$p
+S 1066 6 4 0 0 7 1064 582 8184 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wm$o
+S 1067 22 0 0 0 8 1 582 8189 40000000 1000 0 0 0 1062 0 0 0 0 1064 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wm$arrdsc
+S 1068 7 6 0 0 219 1 582 8199 10a00014 51 0 0 1071 0 0 0 1073 0 0 0 0 0 0 0 0 1070 0 0 1072 582 0 0 0 0 wmtemp
+S 1069 6 4 0 0 6 1075 582 8206 40800006 0 0 120 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_30
+S 1070 8 4 0 0 222 1079 582 8213 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wmtemp$sd
+S 1071 6 4 0 0 7 1072 582 8223 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wmtemp$p
+S 1072 6 4 0 0 7 1070 582 8232 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wmtemp$o
+S 1073 22 0 0 0 8 1 582 8241 40000000 1000 0 0 0 1068 0 0 0 0 1070 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wmtemp$arrdsc
+S 1074 7 6 0 0 225 1 582 8255 10a00014 51 0 0 1079 0 0 0 1081 0 0 0 0 0 0 0 0 1078 0 0 1080 582 0 0 0 0 wscalex
+S 1075 6 4 0 0 6 1076 582 8263 40800006 0 0 124 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_31
+S 1076 6 4 0 0 6 1085 582 8270 40800006 0 0 128 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_32
+S 1077 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 1078 8 4 0 0 228 1087 582 8277 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wscalex$sd
+S 1079 6 4 0 0 7 1080 582 8288 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wscalex$p
+S 1080 6 4 0 0 7 1078 582 8298 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wscalex$o
+S 1081 22 0 0 0 8 1 582 8308 40000000 1000 0 0 0 1074 0 0 0 0 1078 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 wscalex$arrdsc
+S 1082 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 1083 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 1084 7 6 0 0 231 1 582 8323 10a00014 51 0 0 1087 0 0 0 1089 0 0 0 0 0 0 0 0 1086 0 0 1088 582 0 0 0 0 yhnqp2
+S 1085 6 4 0 0 6 1091 582 8330 40800006 0 0 132 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_33
+S 1086 8 4 0 0 234 1093 582 8337 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhnqp2$sd
+S 1087 6 4 0 0 7 1088 582 8347 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhnqp2$p
+S 1088 6 4 0 0 7 1086 582 8356 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhnqp2$o
+S 1089 22 0 0 0 8 1 582 8365 40000000 1000 0 0 0 1084 0 0 0 0 1086 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhnqp2$arrdsc
+S 1090 7 6 0 0 237 1 582 8379 10a00014 51 0 0 1093 0 0 0 1095 0 0 0 0 0 0 0 0 1092 0 0 1094 582 0 0 0 0 yhtemp
+S 1091 6 4 0 0 6 1097 582 8386 40800006 0 0 136 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_34
+S 1092 8 4 0 0 240 1099 582 8393 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhtemp$sd
+S 1093 6 4 0 0 7 1094 582 8403 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhtemp$p
+S 1094 6 4 0 0 7 1092 582 8412 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhtemp$o
+S 1095 22 0 0 0 8 1 582 8421 40000000 1000 0 0 0 1090 0 0 0 0 1092 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 yhtemp$arrdsc
+S 1096 7 6 0 0 243 1 582 8435 10a00014 51 0 0 1099 0 0 0 1101 0 0 0 0 0 0 0 0 1098 0 0 1100 582 0 0 0 0 ymax
+S 1097 6 4 0 0 6 1103 582 8440 40800006 0 0 140 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_35
+S 1098 8 4 0 0 246 1105 582 8447 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ymax$sd
+S 1099 6 4 0 0 7 1100 582 8455 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ymax$p
+S 1100 6 4 0 0 7 1098 582 8462 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ymax$o
+S 1101 22 0 0 0 8 1 582 8469 40000000 1000 0 0 0 1096 0 0 0 0 1098 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ymax$arrdsc
+S 1102 7 6 0 0 249 1 582 8481 10a00014 51 0 0 1105 0 0 0 1107 0 0 0 0 0 0 0 0 1104 0 0 1106 582 0 0 0 0 ynneg
+S 1103 6 4 0 0 6 1109 582 8487 40800006 0 0 144 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_36
+S 1104 8 4 0 0 252 1111 582 8494 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ynneg$sd
+S 1105 6 4 0 0 7 1106 582 8503 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ynneg$p
+S 1106 6 4 0 0 7 1104 582 8511 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ynneg$o
+S 1107 22 0 0 0 8 1 582 8519 40000000 1000 0 0 0 1102 0 0 0 0 1104 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ynneg$arrdsc
+S 1108 7 6 0 0 255 1 582 8532 10a00014 51 0 0 1111 0 0 0 1113 0 0 0 0 0 0 0 0 1110 0 0 1112 582 0 0 0 0 ytemp
+S 1109 6 4 0 0 6 1115 582 8538 40800006 0 0 148 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_37
+S 1110 8 4 0 0 258 1117 582 8545 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ytemp$sd
+S 1111 6 4 0 0 7 1112 582 8554 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ytemp$p
+S 1112 6 4 0 0 7 1110 582 8562 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ytemp$o
+S 1113 22 0 0 0 8 1 582 8570 40000000 1000 0 0 0 1108 0 0 0 0 1110 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ytemp$arrdsc
+S 1114 7 6 0 0 261 1 582 8583 10a00014 51 0 0 1117 0 0 0 1119 0 0 0 0 0 0 0 0 1116 0 0 1118 582 0 0 0 0 dtemp
+S 1115 6 4 0 0 6 1126 582 8589 40800006 0 0 152 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_38
+S 1116 8 4 0 0 264 1128 582 8596 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dtemp$sd
+S 1117 6 4 0 0 7 1118 582 8605 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dtemp$p
+S 1118 6 4 0 0 7 1116 582 8613 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dtemp$o
+S 1119 22 0 0 0 8 1 582 8621 40000000 1000 0 0 0 1114 0 0 0 0 1116 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dtemp$arrdsc
+S 1120 7 4 0 4 267 1121 582 8634 800014 100 0 336 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 el
+S 1121 7 4 0 4 270 1122 582 8637 800014 100 0 448 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ruser
+S 1122 7 4 0 4 273 1123 582 8643 800014 100 0 624 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tau
+S 1123 7 4 0 4 276 1 582 8647 800014 100 0 736 0 0 0 0 0 0 1330 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 tq
+S 1124 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 1125 7 6 0 0 279 1 582 8650 10a00014 51 0 0 1128 0 0 0 1130 0 0 0 0 0 0 0 0 1127 0 0 1129 582 0 0 0 0 bigp
+S 1126 6 4 0 0 6 1132 582 8655 40800006 0 0 156 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_39
+S 1127 8 4 0 0 282 1134 582 8662 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bigp$sd
+S 1128 6 4 0 0 7 1129 582 8670 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bigp$p
+S 1129 6 4 0 0 7 1127 582 8677 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bigp$o
+S 1130 22 0 0 0 8 1 582 8684 40000000 1000 0 0 0 1125 0 0 0 0 1127 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bigp$arrdsc
+S 1131 7 6 0 0 285 1 582 8696 10a00014 51 0 0 1134 0 0 0 1136 0 0 0 0 0 0 0 0 1133 0 0 1135 582 0 0 0 0 bjgp
+S 1132 6 4 0 0 6 1138 582 8701 40800006 0 0 160 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_40
+S 1133 8 4 0 0 288 1140 582 8708 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bjgp$sd
+S 1134 6 4 0 0 7 1135 582 8716 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bjgp$p
+S 1135 6 4 0 0 7 1133 582 8723 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bjgp$o
+S 1136 22 0 0 0 8 1 582 8730 40000000 1000 0 0 0 1131 0 0 0 0 1133 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 bjgp$arrdsc
+S 1137 7 6 0 0 291 1 582 8742 10a00014 51 0 0 1140 0 0 0 1142 0 0 0 0 0 0 0 0 1139 0 0 1141 582 0 0 0 0 ia
+S 1138 6 4 0 0 6 1144 582 8745 40800006 0 0 164 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_41
+S 1139 8 4 0 0 294 1146 582 8752 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ia$sd
+S 1140 6 4 0 0 7 1141 582 8758 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ia$p
+S 1141 6 4 0 0 7 1139 582 8763 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ia$o
+S 1142 22 0 0 0 6 1 582 8768 40000000 1000 0 0 0 1137 0 0 0 0 1139 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ia$arrdsc
+S 1143 7 6 0 0 297 1 582 8778 10a00014 51 0 0 1146 0 0 0 1148 0 0 0 0 0 0 0 0 1145 0 0 1147 582 0 0 0 0 iab
+S 1144 6 4 0 0 6 1150 582 8782 40800006 0 0 168 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_42
+S 1145 8 4 0 0 300 1152 582 8789 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iab$sd
+S 1146 6 4 0 0 7 1147 582 8796 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iab$p
+S 1147 6 4 0 0 7 1145 582 8802 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iab$o
+S 1148 22 0 0 0 6 1 582 8808 40000000 1000 0 0 0 1143 0 0 0 0 1145 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iab$arrdsc
+S 1149 7 6 0 0 303 1 582 8819 10a00014 51 0 0 1152 0 0 0 1154 0 0 0 0 0 0 0 0 1151 0 0 1153 582 0 0 0 0 ian
+S 1150 6 4 0 0 6 1156 582 8823 40800006 0 0 172 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_43
+S 1151 8 4 0 0 306 1158 582 8830 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ian$sd
+S 1152 6 4 0 0 7 1153 582 8837 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ian$p
+S 1153 6 4 0 0 7 1151 582 8843 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ian$o
+S 1154 22 0 0 0 6 1 582 8849 40000000 1000 0 0 0 1149 0 0 0 0 1151 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ian$arrdsc
+S 1155 7 6 0 0 309 1 582 8860 10a00014 51 0 0 1158 0 0 0 1160 0 0 0 0 0 0 0 0 1157 0 0 1159 582 0 0 0 0 icn
+S 1156 6 4 0 0 6 1162 582 8864 40800006 0 0 176 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_44
+S 1157 8 4 0 0 312 1164 582 8871 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 icn$sd
+S 1158 6 4 0 0 7 1159 582 8878 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 icn$p
+S 1159 6 4 0 0 7 1157 582 8884 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 icn$o
+S 1160 22 0 0 0 6 1 582 8890 40000000 1000 0 0 0 1155 0 0 0 0 1157 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 icn$arrdsc
+S 1161 7 6 0 0 315 1 582 8901 10a00014 51 0 0 1164 0 0 0 1166 0 0 0 0 0 0 0 0 1163 0 0 1165 582 0 0 0 0 idx
+S 1162 6 4 0 0 6 1168 582 8905 40800006 0 0 180 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_45
+S 1163 8 4 0 0 318 1170 582 8912 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 idx$sd
+S 1164 6 4 0 0 7 1165 582 8919 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 idx$p
+S 1165 6 4 0 0 7 1163 582 8925 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 idx$o
+S 1166 22 0 0 0 6 1 582 8931 40000000 1000 0 0 0 1161 0 0 0 0 1163 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 idx$arrdsc
+S 1167 7 6 0 0 321 1 582 8942 10a00014 51 0 0 1170 0 0 0 1172 0 0 0 0 0 0 0 0 1169 0 0 1171 582 0 0 0 0 igp
+S 1168 6 4 0 0 6 1174 582 8946 40800006 0 0 184 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_46
+S 1169 8 4 0 0 324 1177 582 8953 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 igp$sd
+S 1170 6 4 0 0 7 1171 582 8960 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 igp$p
+S 1171 6 4 0 0 7 1169 582 8966 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 igp$o
+S 1172 22 0 0 0 6 1 582 8972 40000000 1000 0 0 0 1167 0 0 0 0 1169 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 igp$arrdsc
+S 1173 7 6 0 0 327 1 582 8983 10a00014 51 0 0 1177 0 0 0 1179 0 0 0 0 0 0 0 0 1176 0 0 1178 582 0 0 0 0 ikeep28
+S 1174 6 4 0 0 6 1175 582 8991 40800006 0 0 188 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_47
+S 1175 6 4 0 0 6 1181 582 8998 40800006 0 0 192 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_48
+S 1176 8 4 0 0 330 1184 582 9005 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ikeep28$sd
+S 1177 6 4 0 0 7 1178 582 9016 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ikeep28$p
+S 1178 6 4 0 0 7 1176 582 9026 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ikeep28$o
+S 1179 22 0 0 0 6 1 582 9036 40000000 1000 0 0 0 1173 0 0 0 0 1176 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ikeep28$arrdsc
+S 1180 7 6 0 0 333 1 582 9051 10a00014 51 0 0 1184 0 0 0 1186 0 0 0 0 0 0 0 0 1183 0 0 1185 582 0 0 0 0 iw28
+S 1181 6 4 0 0 6 1182 582 9056 40800006 0 0 196 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_49
+S 1182 6 4 0 0 6 1188 582 9063 40800006 0 0 200 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_50
+S 1183 8 4 0 0 336 1190 582 9070 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iw28$sd
+S 1184 6 4 0 0 7 1185 582 9078 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iw28$p
+S 1185 6 4 0 0 7 1183 582 9085 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iw28$o
+S 1186 22 0 0 0 6 1 582 9092 40000000 1000 0 0 0 1180 0 0 0 0 1183 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iw28$arrdsc
+S 1187 7 6 0 0 339 1 582 9104 10a00014 51 0 0 1190 0 0 0 1192 0 0 0 0 0 0 0 0 1189 0 0 1191 582 0 0 0 0 iwork
+S 1188 6 4 0 0 6 1194 582 9110 40800006 0 0 204 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_51
+S 1189 8 4 0 0 342 1196 582 9117 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwork$sd
+S 1190 6 4 0 0 7 1191 582 9126 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwork$p
+S 1191 6 4 0 0 7 1189 582 9134 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwork$o
+S 1192 22 0 0 0 6 1 582 9142 40000000 1000 0 0 0 1187 0 0 0 0 1189 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwork$arrdsc
+S 1193 7 6 0 0 345 1 582 9155 10a00014 51 0 0 1196 0 0 0 1198 0 0 0 0 0 0 0 0 1195 0 0 1197 582 0 0 0 0 ja
+S 1194 6 4 0 0 6 1200 582 9158 40800006 0 0 208 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_52
+S 1195 8 4 0 0 348 1202 582 9165 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ja$sd
+S 1196 6 4 0 0 7 1197 582 9171 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ja$p
+S 1197 6 4 0 0 7 1195 582 9176 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ja$o
+S 1198 22 0 0 0 6 1 582 9181 40000000 1000 0 0 0 1193 0 0 0 0 1195 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ja$arrdsc
+S 1199 7 6 0 0 351 1 582 9191 10a00014 51 0 0 1202 0 0 0 1204 0 0 0 0 0 0 0 0 1201 0 0 1203 582 0 0 0 0 jab
+S 1200 6 4 0 0 6 1206 582 9195 40800006 0 0 212 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_53
+S 1201 8 4 0 0 354 1208 582 9202 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jab$sd
+S 1202 6 4 0 0 7 1203 582 9209 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jab$p
+S 1203 6 4 0 0 7 1201 582 9215 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jab$o
+S 1204 22 0 0 0 6 1 582 9221 40000000 1000 0 0 0 1199 0 0 0 0 1201 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jab$arrdsc
+S 1205 7 6 0 0 357 1 582 9232 10a00014 51 0 0 1208 0 0 0 1210 0 0 0 0 0 0 0 0 1207 0 0 1209 582 0 0 0 0 jan
+S 1206 6 4 0 0 6 1212 582 9236 40800006 0 0 216 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_54
+S 1207 8 4 0 0 360 1214 582 9243 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jan$sd
+S 1208 6 4 0 0 7 1209 582 9250 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jan$p
+S 1209 6 4 0 0 7 1207 582 9256 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jan$o
+S 1210 22 0 0 0 6 1 582 9262 40000000 1000 0 0 0 1205 0 0 0 0 1207 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jan$arrdsc
+S 1211 7 6 0 0 363 1 582 9273 10a00014 51 0 0 1214 0 0 0 1216 0 0 0 0 0 0 0 0 1213 0 0 1215 582 0 0 0 0 jatemp
+S 1212 6 4 0 0 6 1218 582 9280 40800006 0 0 220 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_55
+S 1213 8 4 0 0 366 1220 582 9287 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jatemp$sd
+S 1214 6 4 0 0 7 1215 582 9297 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jatemp$p
+S 1215 6 4 0 0 7 1213 582 9306 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jatemp$o
+S 1216 22 0 0 0 6 1 582 9315 40000000 1000 0 0 0 1211 0 0 0 0 1213 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jatemp$arrdsc
+S 1217 7 6 0 0 369 1 582 9329 10a00014 51 0 0 1220 0 0 0 1222 0 0 0 0 0 0 0 0 1219 0 0 1221 582 0 0 0 0 jgp
+S 1218 6 4 0 0 6 1224 582 9333 40800006 0 0 224 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_56
+S 1219 8 4 0 0 372 1226 582 9340 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jgp$sd
+S 1220 6 4 0 0 7 1221 582 9347 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jgp$p
+S 1221 6 4 0 0 7 1219 582 9353 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jgp$o
+S 1222 22 0 0 0 6 1 582 9359 40000000 1000 0 0 0 1217 0 0 0 0 1219 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jgp$arrdsc
+S 1223 7 6 0 0 375 1 582 9370 10a00014 51 0 0 1226 0 0 0 1228 0 0 0 0 0 0 0 0 1225 0 0 1227 582 0 0 0 0 jroot
+S 1224 6 4 0 0 6 1230 582 9376 40800006 0 0 228 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_57
+S 1225 8 4 0 0 378 1232 582 9383 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jroot$sd
+S 1226 6 4 0 0 7 1227 582 9392 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jroot$p
+S 1227 6 4 0 0 7 1225 582 9400 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jroot$o
+S 1228 22 0 0 0 6 1 582 9408 40000000 1000 0 0 0 1223 0 0 0 0 1225 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jroot$arrdsc
+S 1229 7 6 0 0 381 1 582 9421 10a00014 51 0 0 1232 0 0 0 1234 0 0 0 0 0 0 0 0 1231 0 0 1233 582 0 0 0 0 jvect
+S 1230 6 4 0 0 6 1236 582 9427 40800006 0 0 232 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_58
+S 1231 8 4 0 0 384 1238 582 9434 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jvect$sd
+S 1232 6 4 0 0 7 1233 582 9443 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jvect$p
+S 1233 6 4 0 0 7 1231 582 9451 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jvect$o
+S 1234 22 0 0 0 6 1 582 9459 40000000 1000 0 0 0 1229 0 0 0 0 1231 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jvect$arrdsc
+S 1235 7 6 0 0 387 1 582 9472 10a00014 51 0 0 1238 0 0 0 1240 0 0 0 0 0 0 0 0 1237 0 0 1239 582 0 0 0 0 subds
+S 1236 6 4 0 0 6 1242 582 9478 40800006 0 0 236 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_59
+S 1237 8 4 0 0 390 1244 582 9485 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 subds$sd
+S 1238 6 4 0 0 7 1239 582 9494 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 subds$p
+S 1239 6 4 0 0 7 1237 582 9502 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 subds$o
+S 1240 22 0 0 0 8 1 582 9510 40000000 1000 0 0 0 1235 0 0 0 0 1237 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 subds$arrdsc
+S 1241 7 6 0 0 393 1 582 9523 10a00014 51 0 0 1244 0 0 0 1246 0 0 0 0 0 0 0 0 1243 0 0 1245 582 0 0 0 0 supds
+S 1242 6 4 0 0 6 1 582 9529 40800006 0 0 240 0 0 0 0 0 0 1329 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 z_b_60
+S 1243 8 4 0 0 396 585 582 9536 40822014 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 supds$sd
+S 1244 6 4 0 0 7 1245 582 9545 40802011 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 supds$p
+S 1245 6 4 0 0 7 1243 582 9553 40802010 1020 0 0 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 supds$o
+S 1246 22 0 0 0 8 1 582 9561 40000000 1000 0 0 0 1241 0 0 0 0 1243 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 supds$arrdsc
+S 1247 7 4 0 4 399 1249 582 9574 800014 100 0 544 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 idisp
+S 1248 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 1249 7 4 0 4 402 1250 582 9580 800014 100 0 560 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iuser
+S 1250 7 4 0 4 405 1251 582 9586 800014 100 0 688 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lnpiv
+S 1251 7 4 0 4 408 1 582 9592 800014 100 0 736 0 0 0 0 0 0 1328 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 lpiv
+S 1252 7 4 0 4 411 1 582 9597 80001c 100 0 96 0 0 0 0 0 0 1332 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mord
+S 1254 27 0 0 0 8 2034 582 9602 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 daxpy_f90
+S 1255 27 0 0 0 8 2044 582 9612 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dcopy_f90
+S 1256 27 0 0 0 8 2053 582 9622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ddot_f90
+S 1257 27 0 0 0 8 2006 582 9631 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dgbfa_f90
+S 1258 27 0 0 0 8 2019 582 9641 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dgbsl_f90
+S 1259 27 0 0 0 8 1982 582 9651 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dgefa_f90
+S 1260 27 0 0 0 8 1993 582 9661 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dgesl_f90
+S 1261 27 0 0 0 8 2063 582 9671 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dscal_f90
+S 1262 27 0 0 0 6 2070 582 9681 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 idamax_f90
+S 1263 27 0 0 0 8 1918 582 9692 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 check_diag
+S 1264 27 0 0 0 8 1709 582 9703 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dacopy
+S 1265 27 0 0 0 8 1740 582 9710 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dewset
+S 1266 27 0 0 0 8 1814 582 9717 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dgroup
+S 1267 27 0 0 0 8 2560 582 9724 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dgroupds
+S 1268 27 0 0 0 8 1927 582 9733 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvcheck
+S 1269 27 0 0 0 8 1569 582 9741 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvhin
+S 1270 27 0 0 0 8 1603 582 9747 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvindy_bnds
+S 1271 27 0 0 0 8 1591 582 9759 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvindy_core
+S 1272 27 0 0 0 8 1684 582 9771 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvjac
+S 1273 27 0 0 0 8 1889 582 9777 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvjacs28
+S 1274 27 0 0 0 8 1651 582 9786 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvjust
+S 1275 27 0 0 0 8 1659 582 9793 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvnlsd
+S 1276 27 0 0 0 8 1857 582 9800 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvnlss28
+S 1277 27 0 0 0 8 1751 582 9809 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvnorm
+S 1278 27 0 0 0 8 1965 582 9816 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvnrdn
+S 1279 27 0 0 0 8 1958 582 9823 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvnrdp
+S 1280 27 0 0 0 8 1972 582 9830 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvnrds
+S 1281 27 0 0 0 8 1556 582 9837 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvode
+S 1282 27 0 0 0 8 1788 582 9843 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvpreps
+S 1283 27 0 0 0 8 1946 582 9851 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvroots
+S 1284 27 0 0 0 8 1649 582 9859 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvset
+S 1285 27 0 0 0 8 1724 582 9865 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvsol
+S 1286 27 0 0 0 8 1882 582 9871 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvsols28
+S 1287 27 0 0 0 8 1733 582 9880 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvsrco
+S 1288 27 0 0 0 8 1622 582 9887 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dvstep
+S 1289 27 0 0 0 8 1371 582 9894 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 gdummy
+S 1290 27 0 0 0 6 1781 582 9901 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iumach
+S 1291 27 0 0 0 6 1775 582 9908 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ixsav
+S 1292 27 0 0 0 6 2570 582 9914 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jacspdb
+S 1293 27 0 0 0 6 1358 582 9922 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 jdummy
+S 1294 27 0 0 0 6 2077 582 9929 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28ad
+S 1295 27 0 0 0 6 2097 582 9936 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28bd
+S 1296 27 0 0 0 6 2139 582 9943 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28cd
+S 1297 27 0 0 0 6 2115 582 9950 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28dd
+S 1298 27 0 0 0 6 2153 582 9957 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma28id
+S 1299 27 0 0 0 6 2176 582 9964 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma30ad
+S 1300 27 0 0 0 6 2213 582 9971 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma30bd
+S 1301 27 0 0 0 6 2229 582 9978 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma30cd
+S 1302 27 0 0 0 6 2202 582 9985 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ma30dd
+S 1303 27 0 0 0 6 2261 582 9992 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc13e
+S 1304 27 0 0 0 6 2370 582 9998 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc19ad
+S 1305 27 0 0 0 6 2276 582 10005 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc20ad
+S 1306 27 0 0 0 6 2287 582 10012 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc20bd
+S 1307 27 0 0 0 6 2296 582 10019 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc21a
+S 1308 27 0 0 0 6 2311 582 10025 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc21b
+S 1309 27 0 0 0 6 2326 582 10031 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc22ad
+S 1310 27 0 0 0 6 2341 582 10038 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc23ad
+S 1311 27 0 0 0 6 2359 582 10045 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 mc24ad
+S 1312 27 0 0 0 8 1911 582 10052 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 set_icn
+S 1313 27 0 0 0 8 1758 582 10060 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 xerrdv
+S 1314 27 0 0 0 8 1769 582 10067 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 xsetf
+S 1315 27 0 0 0 8 1772 582 10073 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 xsetun
+S 1316 27 0 0 0 8 2413 582 10080 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 degr
+S 1317 27 0 0 0 6 2427 582 10085 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 ido
+S 1318 27 0 0 0 6 2449 582 10089 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 numsrt
+S 1319 27 0 0 0 8 2461 582 10096 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 seq
+S 1320 27 0 0 0 8 2477 582 10100 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 setr
+S 1321 27 0 0 0 8 2491 582 10105 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 slo
+S 1322 27 0 0 0 8 2512 582 10109 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 srtdat
+S 1323 27 0 0 0 8 2523 582 10116 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 fdjs
+S 1328 11 0 0 1 8 1 582 10148 40800010 801000 0 5776 0 0 599 1251 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvode_f90_m$4
+S 1329 11 0 0 0 8 1328 582 10162 40800000 801000 0 244 0 0 596 1242 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvode_f90_m$0
+S 1330 11 0 0 1 8 1329 582 10176 40800010 801000 0 776 0 0 666 1123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvode_f90_m$6
+S 1331 11 0 0 0 8 1330 582 10190 40800010 801000 0 40 0 0 778 812 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvode_f90_m$14
+S 1332 11 0 0 1 8 1331 582 10205 40800010 801000 0 104 0 0 840 1252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvode_f90_m$12
+S 1333 23 5 0 0 0 1344 582 5954 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 vode_f90
+S 1334 14 3 0 0 6 1 1333 10220 10000 3000 0 0 0 2 4 0 0 0 0 0 0 0 0 0 0 0 0 2065 0 0 0 0 0 0 f
+F 1334 4 1347 1348 1349 1346
+S 1335 1 3 1 0 6 1 1333 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1336 7 3 0 0 417 1 1333 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1337 1 3 0 0 9 1 1333 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1338 1 3 0 0 9 1 1333 10230 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 tout
+S 1339 1 3 1 0 6 1 1333 10235 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itask
+S 1340 1 3 0 0 6 1 1333 10241 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 istate
+S 1341 1 3 0 0 99 1 1333 10248 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 opts
+S 1342 14 3 0 0 6 1 1333 10253 80010000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 j_fcn
+S 1343 14 3 0 0 6 1 1333 10259 80010000 3000 0 0 0 7 5 0 0 0 0 0 0 0 0 0 0 0 0 2076 0 0 0 0 0 0 g_fcn
+F 1343 5 1352 1353 1354 1355 1351
+S 1344 14 5 0 0 0 1 1333 5954 100 400000 0 0 0 13 10 0 0 0 0 0 0 0 0 0 0 0 0 2041 0 582 0 0 0 0 vode_f90
+F 1344 10 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343
+S 1345 6 1 0 0 6 1 1333 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1346 7 3 2 0 423 1 1334 10273 802204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ydot
+S 1347 6 3 1 0 6 1 1334 10222 802004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1348 1 3 1 0 9 1 1334 10228 2004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1349 7 3 1 0 420 1 1334 10226 802204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1350 6 1 0 0 6 1 1334 10278 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_677
+S 1351 7 3 2 0 429 1 1343 10286 802204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 groot
+S 1352 6 3 1 0 6 1 1343 10222 802004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1353 1 3 1 0 9 1 1343 10228 2004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1354 7 3 1 0 426 1 1343 10226 802204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1355 6 3 1 0 6 1 1343 6172 802004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ng
+S 1356 6 1 0 0 6 1 1343 10292 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_680
+S 1357 6 1 0 0 6 1 1343 10300 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_682
+S 1358 23 5 0 0 0 1366 582 9922 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jdummy
+S 1359 1 3 0 0 6 1 1358 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1360 1 3 1 0 9 1 1358 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1361 7 3 1 0 435 1 1358 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1362 1 3 1 0 6 1 1358 10308 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 1363 1 3 1 0 6 1 1358 10311 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 1364 7 3 0 0 432 1 1358 10314 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pd
+S 1365 6 3 1 0 6 1 1358 10317 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrowpd
+S 1366 14 5 0 0 0 1 1358 9922 310 400000 0 0 0 24 7 0 0 0 0 0 0 0 0 0 0 0 0 2205 0 582 0 0 0 0 jdummy
+F 1366 7 1359 1360 1361 1362 1363 1364 1365
+S 1367 6 1 0 0 6 1 1358 10300 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_682
+S 1368 6 1 0 0 6 1 1358 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1369 6 1 0 0 6 1 1358 10324 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_685
+S 1370 6 1 0 0 6 1 1358 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1371 23 5 0 0 0 1377 582 9894 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gdummy
+S 1372 1 3 1 0 6 1 1371 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1373 1 3 1 0 9 1 1371 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1374 7 3 1 0 441 1 1371 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1375 7 3 2 0 438 1 1371 10340 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gout
+S 1376 1 3 1 0 6 1 1371 6172 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ng
+S 1377 14 5 0 0 0 1 1371 9894 110 400000 0 0 0 32 5 0 0 0 0 0 0 0 0 0 0 0 0 2240 0 582 0 0 0 0 gdummy
+F 1377 5 1372 1373 1374 1376 1375
+S 1378 6 1 0 0 6 1 1371 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1379 6 1 0 0 6 1 1371 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1380 23 5 0 0 0 1384 582 10345 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 set_opts_2
+S 1381 1 3 1 0 9 1 1380 10356 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmax
+S 1382 1 3 1 0 9 1 1380 6293 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmin
+S 1383 1 3 1 0 6 1 1380 6848 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mxstep
+S 1384 14 5 0 0 0 1 1380 10345 0 400000 0 0 0 38 3 0 0 0 0 0 0 0 0 0 0 0 0 2273 0 582 0 0 0 0 set_opts_2
+F 1384 3 1381 1382 1383
+S 1385 23 5 0 0 8 1397 582 10361 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 set_normal_opts
+S 1386 1 3 1 0 16 1 1385 10377 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dense_j
+S 1387 1 3 1 0 16 1 1385 10385 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 banded_j
+S 1388 1 3 1 0 16 1 1385 10394 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sparse_j
+S 1389 1 3 1 0 16 1 1385 10403 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 user_supplied_jacobian
+S 1390 1 3 1 0 6 1 1385 10426 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lower_bandwidth
+S 1391 1 3 1 0 6 1 1385 10442 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 upper_bandwidth
+S 1392 1 3 1 0 9 1 1385 10458 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 relerr
+S 1393 1 3 1 0 9 1 1385 10465 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abserr
+S 1394 7 3 1 0 444 1 1385 10472 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abserr_vector
+S 1395 1 3 1 0 6 1 1385 10486 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nevents
+S 1396 1 3 0 0 99 1 1385 10248 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 opts
+S 1397 14 5 0 0 99 1 1385 10361 20000004 1400000 0 0 0 42 10 0 0 1396 0 0 0 0 0 0 0 0 0 2323 0 582 0 0 0 0 set_normal_opts
+F 1397 10 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395
+S 1398 6 1 0 0 6 1 1385 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1399 6 1 0 0 6 1 1385 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1400 6 1 0 0 6 1 1385 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1401 6 1 0 0 6 1 1385 10510 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_694
+S 1402 23 5 0 0 8 1428 582 10518 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 set_intermediate_opts
+S 1403 1 3 1 0 16 1 1402 10377 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dense_j
+S 1404 1 3 1 0 16 1 1402 10385 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 banded_j
+S 1405 1 3 1 0 16 1 1402 10394 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sparse_j
+S 1406 1 3 1 0 16 1 1402 10403 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 user_supplied_jacobian
+S 1407 1 3 1 0 6 1 1402 10426 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lower_bandwidth
+S 1408 1 3 1 0 6 1 1402 10442 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 upper_bandwidth
+S 1409 1 3 1 0 9 1 1402 10458 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 relerr
+S 1410 1 3 1 0 9 1 1402 10465 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abserr
+S 1411 7 3 1 0 447 1 1402 10472 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abserr_vector
+S 1412 1 3 1 0 9 1 1402 10540 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 tcrit
+S 1413 1 3 1 0 9 1 1402 10546 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h0
+S 1414 1 3 1 0 9 1 1402 10356 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmax
+S 1415 1 3 1 0 6 1 1402 10549 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nzswag
+S 1416 1 3 1 0 16 1 1402 10556 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 user_supplied_sparsity
+S 1417 1 3 1 0 16 1 1402 10579 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28_rps
+S 1418 1 3 1 0 6 1 1402 10486 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nevents
+S 1419 7 3 1 0 456 1 1402 10588 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 constrained
+S 1420 7 3 0 0 450 1 1402 10600 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 clower
+S 1421 7 3 0 0 453 1 1402 10607 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cupper
+S 1422 1 3 1 0 16 1 1402 10614 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 change_only_f77_options
+S 1423 1 3 0 0 99 1 1402 10248 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 opts
+S 1424 1 3 1 0 9 1 1402 6293 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmin
+S 1425 1 3 1 0 6 1 1402 6762 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxord
+S 1426 1 3 1 0 6 1 1402 6848 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mxstep
+S 1427 1 3 1 0 6 1 1402 6841 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mxhnil
+S 1428 14 5 0 0 99 1 1402 10518 20000004 1400000 0 0 0 53 24 0 0 1423 0 0 0 0 0 0 0 0 0 2808 0 582 0 0 0 0 set_intermediate_opts
+F 1428 24 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1424 1425 1426 1427 1415 1416 1417 1418 1419 1420 1421 1422
+S 1429 6 1 0 0 6 1 1402 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1430 6 1 0 0 6 1 1402 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1431 6 1 0 0 6 1 1402 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1432 6 1 0 0 6 1 1402 10638 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_698
+S 1433 6 1 0 0 6 1 1402 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1434 6 1 0 0 6 1 1402 10654 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_6_1
+S 1435 6 1 0 0 6 1 1402 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1436 6 1 0 0 6 1 1402 10670 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_705
+S 1437 6 1 0 0 6 1 1402 10678 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_8_1
+S 1438 6 1 0 0 6 1 1402 10686 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_10_1
+S 1439 6 1 0 0 6 1 1402 10695 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_11_1
+S 1440 6 1 0 0 6 1 1402 10704 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_712
+S 1441 6 1 0 0 6 1 1402 10712 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_12_1
+S 1442 6 1 0 0 6 1 1402 10721 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_14_1
+S 1443 6 1 0 0 6 1 1402 10730 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_15_1
+S 1444 6 1 0 0 6 1 1402 10739 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_719
+S 1445 23 5 0 0 8 1485 582 10747 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 set_opts
+S 1446 1 3 1 0 6 1 1445 10756 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 method_flag
+S 1447 1 3 1 0 16 1 1445 10377 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dense_j
+S 1448 1 3 1 0 16 1 1445 10385 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 banded_j
+S 1449 1 3 1 0 16 1 1445 10394 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sparse_j
+S 1450 1 3 1 0 16 1 1445 10403 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 user_supplied_jacobian
+S 1451 1 3 1 0 16 1 1445 10768 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 save_jacobian
+S 1452 1 3 1 0 16 1 1445 10782 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 constant_jacobian
+S 1453 1 3 1 0 6 1 1445 10426 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lower_bandwidth
+S 1454 1 3 1 0 6 1 1445 10442 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 upper_bandwidth
+S 1455 7 3 1 0 474 1 1445 10800 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sub_diagonals
+S 1456 7 3 1 0 477 1 1445 10814 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sup_diagonals
+S 1457 1 3 1 0 9 1 1445 10458 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 relerr
+S 1458 7 3 1 0 462 1 1445 10828 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 relerr_vector
+S 1459 1 3 1 0 9 1 1445 10465 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abserr
+S 1460 7 3 1 0 459 1 1445 10472 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abserr_vector
+S 1461 1 3 1 0 9 1 1445 10540 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 tcrit
+S 1462 1 3 1 0 9 1 1445 10546 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h0
+S 1463 1 3 1 0 9 1 1445 10356 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmax
+S 1464 1 3 1 0 16 1 1445 10842 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ymagwarn
+S 1465 1 3 1 0 9 1 1445 10851 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 upivot
+S 1466 1 3 1 0 6 1 1445 10549 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nzswag
+S 1467 1 3 1 0 16 1 1445 10556 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 user_supplied_sparsity
+S 1468 1 3 1 0 6 1 1445 10486 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nevents
+S 1469 7 3 1 0 471 1 1445 10588 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 constrained
+S 1470 7 3 0 0 465 1 1445 10600 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 clower
+S 1471 7 3 0 0 468 1 1445 10607 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cupper
+S 1472 1 3 1 0 6 1 1445 10858 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28_elbow_room
+S 1473 1 3 1 0 16 1 1445 10874 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc19_scaling
+S 1474 1 3 1 0 16 1 1445 10887 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28_messages
+S 1475 1 3 1 0 9 1 1445 10901 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28_eps
+S 1476 1 3 1 0 16 1 1445 10579 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28_rps
+S 1477 1 3 1 0 16 1 1445 10614 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 change_only_f77_options
+S 1478 1 3 1 0 16 1 1445 10910 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jacobian_by_jacsp
+S 1479 1 3 0 0 99 1 1445 10248 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 opts
+S 1480 1 3 1 0 9 1 1445 6293 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmin
+S 1481 1 3 1 0 6 1 1445 6762 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxord
+S 1482 1 3 1 0 6 1 1445 6848 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mxstep
+S 1483 1 3 1 0 6 1 1445 6841 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mxhnil
+S 1484 1 3 1 0 9 1 1445 6358 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 seth
+S 1485 14 5 0 0 99 1 1445 10747 20000004 1400000 0 0 0 78 38 0 0 1479 0 0 0 0 0 0 0 0 0 3779 0 582 0 0 0 0 set_opts
+F 1485 38 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1480 1481 1482 1483 1464 1484 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478
+S 1486 6 1 0 0 6 1 1445 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1487 6 1 0 0 6 1 1445 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1488 6 1 0 0 6 1 1445 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1489 6 1 0 0 6 1 1445 10928 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_714
+S 1490 6 1 0 0 6 1 1445 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1491 6 1 0 0 6 1 1445 10654 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_6_1
+S 1492 6 1 0 0 6 1 1445 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1493 6 1 0 0 6 1 1445 10936 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_721
+S 1494 6 1 0 0 6 1 1445 10678 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_8_1
+S 1495 6 1 0 0 6 1 1445 10686 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_10_1
+S 1496 6 1 0 0 6 1 1445 10695 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_11_1
+S 1497 6 1 0 0 6 1 1445 10944 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_728
+S 1498 6 1 0 0 6 1 1445 10712 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_12_1
+S 1499 6 1 0 0 6 1 1445 10721 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_14_1
+S 1500 6 1 0 0 6 1 1445 10730 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_15_1
+S 1501 6 1 0 0 6 1 1445 10952 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_735
+S 1502 6 1 0 0 6 1 1445 10960 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_16_1
+S 1503 6 1 0 0 6 1 1445 10969 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_18_1
+S 1504 6 1 0 0 6 1 1445 10978 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_19_1
+S 1505 6 1 0 0 6 1 1445 10987 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_742
+S 1506 6 1 0 0 6 1 1445 10995 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_20_1
+S 1507 6 1 0 0 6 1 1445 11004 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_22_1
+S 1508 6 1 0 0 6 1 1445 11013 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_23_1
+S 1509 6 1 0 0 6 1 1445 11022 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_749
+S 1510 6 1 0 0 6 1 1445 11030 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_24_1
+S 1511 6 1 0 0 6 1 1445 11039 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_26_1
+S 1512 6 1 0 0 6 1 1445 11048 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_27_1
+S 1513 6 1 0 0 6 1 1445 11057 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_756
+S 1514 23 5 0 0 0 1519 582 5963 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 get_stats
+S 1515 7 3 0 0 480 1 1514 11065 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rstats
+S 1516 7 3 0 0 483 1 1514 11072 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 istats
+S 1517 1 3 1 0 6 1 1514 11079 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numevents
+S 1518 7 3 0 0 486 1 1514 11089 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jroots
+S 1519 14 5 0 0 0 1 1514 5963 20000000 400000 0 0 0 117 4 0 0 0 0 0 0 0 0 0 0 0 0 5185 0 582 0 0 0 0 get_stats
+F 1519 4 1515 1516 1517 1518
+S 1520 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 1521 6 1 0 0 6 1 1514 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1522 6 1 0 0 6 1 1514 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1523 6 1 0 0 6 1 1514 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1524 6 1 0 0 6 1 1514 11096 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_743
+S 1525 23 5 0 0 0 1530 582 6004 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 usersets_iaja
+S 1526 7 3 1 0 489 1 1525 11104 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iauser
+S 1527 6 3 1 0 6 1 1525 11111 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 niauser
+S 1528 7 3 1 0 492 1 1525 11119 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jauser
+S 1529 6 3 1 0 6 1 1525 11126 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 njauser
+S 1530 14 5 0 0 0 1 1525 6004 200 400000 0 0 0 122 4 0 0 0 0 0 0 0 0 0 0 0 0 5330 0 582 0 0 0 0 usersets_iaja
+F 1530 4 1526 1527 1528 1529
+S 1531 6 1 0 0 6 1 1525 10987 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_742
+S 1532 6 1 0 0 6 1 1525 11134 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_744
+S 1533 23 5 0 0 0 1545 582 5995 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 set_iaja
+S 1534 14 3 0 0 8 1 1533 11142 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dfn
+S 1535 6 3 1 0 6 1 1533 10222 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1536 1 3 1 0 9 1 1533 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1537 7 3 0 0 498 1 1533 10226 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1538 1 3 1 0 9 1 1533 11146 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fmin
+S 1539 1 3 1 0 6 1 1533 11151 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nturb
+S 1540 7 3 0 0 495 1 1533 11157 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dturb
+S 1541 7 3 1 0 501 1 1533 11104 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iauser
+S 1542 1 3 1 0 6 1 1533 11111 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 niauser
+S 1543 7 3 1 0 504 1 1533 11119 a0000004 10003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jauser
+S 1544 1 3 1 0 6 1 1533 11126 80000004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 njauser
+S 1545 14 5 0 0 0 1 1533 5995 20000300 400000 0 0 0 127 11 0 0 0 0 0 0 0 0 0 0 0 0 5404 0 582 0 0 0 0 set_iaja
+F 1545 11 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544
+S 1546 6 1 0 0 6 1 1533 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1547 6 1 0 0 6 1 1533 11163 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_747
+S 1548 6 1 0 0 6 1 1533 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1549 6 1 0 0 6 1 1533 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1550 6 1 0 0 6 1 1533 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1551 6 1 0 0 6 1 1533 11171 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_754
+S 1552 6 1 0 0 6 1 1533 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1553 6 1 0 0 6 1 1533 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1554 6 1 0 0 6 1 1533 10678 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_8_1
+S 1555 6 1 0 0 6 1 1533 11187 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_761
+S 1556 23 5 0 0 0 1567 582 9837 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvode
+S 1557 14 3 0 0 8 1 1556 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1558 1 3 1 0 6 1 1556 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1559 7 3 0 0 507 1 1556 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1560 1 3 0 0 9 1 1556 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1561 1 3 0 0 9 1 1556 10230 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 tout
+S 1562 1 3 1 0 6 1 1556 10235 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itask
+S 1563 1 3 0 0 6 1 1556 10241 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 istate
+S 1564 1 3 0 0 99 1 1556 10248 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 opts
+S 1565 14 3 0 0 6 1 1556 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1566 14 3 0 0 8 1 1556 11199 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gfun
+S 1567 14 5 0 0 0 1 1556 9837 110 400000 0 0 0 139 10 0 0 0 0 0 0 0 0 0 0 0 0 5611 0 582 0 0 0 0 dvode
+F 1567 10 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566
+S 1568 6 1 0 0 6 1 1556 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1569 23 5 0 0 0 1584 582 9741 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvhin
+S 1570 1 3 1 0 9 1 1569 11204 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t0
+S 1571 7 3 1 0 516 1 1569 11207 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y0
+S 1572 7 3 0 0 525 1 1569 10273 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ydot
+S 1573 14 3 0 0 8 1 1569 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1574 1 3 1 0 9 1 1569 10230 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 tout
+S 1575 7 3 0 0 522 1 1569 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1576 7 3 0 0 519 1 1569 11210 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 temp
+S 1577 1 3 0 0 9 1 1569 10546 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 h0
+S 1578 1 3 0 0 6 1 1569 11215 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 niter
+S 1579 1 3 0 0 6 1 1569 11221 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ier
+S 1580 1 3 1 0 6 1 1569 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1581 7 3 1 0 513 1 1569 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1582 1 3 1 0 6 1 1569 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1583 7 3 1 0 510 1 1569 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1584 14 5 0 0 0 1 1569 9741 110 400000 0 0 0 150 14 0 0 0 0 0 0 0 0 0 0 0 0 6725 0 582 0 0 0 0 dvhin
+F 1584 14 1580 1570 1571 1572 1573 1574 1581 1582 1583 1575 1576 1577 1578 1579
+S 1585 6 1 0 0 6 1 1569 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1586 6 1 0 0 6 1 1569 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1587 6 1 0 0 6 1 1569 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1588 6 1 0 0 6 1 1569 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1589 6 1 0 0 6 1 1569 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1590 6 1 0 0 6 1 1569 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1591 23 5 0 0 0 1598 582 9759 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvindy_core
+S 1592 1 3 1 0 9 1 1591 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1593 1 3 1 0 6 1 1591 11225 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 k
+S 1594 7 3 0 0 531 1 1591 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1595 6 3 1 0 6 1 1591 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1596 7 3 0 0 528 1 1591 11235 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dky
+S 1597 1 3 0 0 6 1 1591 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 1598 14 5 0 0 0 1 1591 9759 310 400000 0 0 0 165 6 0 0 0 0 0 0 0 0 0 0 0 0 6858 0 582 0 0 0 0 dvindy_core
+F 1598 6 1592 1593 1594 1595 1596 1597
+S 1599 6 1 0 0 6 1 1591 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1600 6 1 0 0 6 1 1591 11245 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_765
+S 1601 6 1 0 0 6 1 1591 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1602 6 1 0 0 6 1 1591 11253 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_768
+S 1603 23 5 0 0 0 1610 582 9747 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvindy_bnds
+S 1604 1 3 1 0 9 1 1603 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1605 1 3 1 0 6 1 1603 11225 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 k
+S 1606 7 3 0 0 537 1 1603 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1607 6 3 1 0 6 1 1603 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1608 7 3 0 0 534 1 1603 11235 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dky
+S 1609 1 3 0 0 6 1 1603 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 1610 14 5 0 0 0 1 1603 9747 310 400000 0 0 0 172 6 0 0 0 0 0 0 0 0 0 0 0 0 6949 0 582 0 0 0 0 dvindy_bnds
+F 1610 6 1604 1605 1606 1607 1608 1609
+S 1611 6 1 0 0 6 1 1603 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1612 6 1 0 0 6 1 1603 11261 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_770
+S 1613 6 1 0 0 6 1 1603 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1614 6 1 0 0 6 1 1603 11269 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_773
+S 1615 23 5 0 0 0 1620 582 5973 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvindy
+S 1616 1 3 1 0 9 1 1615 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 1617 1 3 1 0 6 1 1615 11225 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 k
+S 1618 7 3 0 0 540 1 1615 11235 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dky
+S 1619 1 3 0 0 6 1 1615 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 1620 14 5 0 0 0 1 1615 5973 100 400000 0 0 0 179 4 0 0 0 0 0 0 0 0 0 0 0 0 7063 0 582 0 0 0 0 dvindy
+F 1620 4 1616 1617 1618 1619
+S 1621 6 1 0 0 6 1 1615 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1622 23 5 0 0 0 1637 582 9887 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvstep
+S 1623 7 3 0 0 555 1 1622 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1624 7 3 0 0 558 1 1622 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1625 6 3 1 0 6 1 1622 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1626 7 3 0 0 561 1 1622 11277 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh1
+S 1627 7 3 0 0 567 1 1622 11281 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwm
+S 1628 14 3 0 0 8 1 1622 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1629 14 3 0 0 6 1 1622 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1630 14 3 0 0 8 1 1622 11285 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 vnls
+S 1631 7 3 0 0 546 1 1622 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1632 7 3 0 0 549 1 1622 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1633 7 3 0 0 543 1 1622 7422 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 acor
+S 1634 7 3 0 0 552 1 1622 8163 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wm
+S 1635 7 3 1 0 564 1 1622 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1636 1 3 1 0 6 1 1622 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1637 14 5 0 0 0 1 1622 9887 310 400000 0 0 0 184 14 0 0 0 0 0 0 0 0 0 0 0 0 7137 0 582 0 0 0 0 dvstep
+F 1637 14 1623 1624 1625 1626 1631 1632 1633 1634 1627 1628 1629 1630 1635 1636
+S 1638 6 1 0 0 6 1 1622 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1639 6 1 0 0 6 1 1622 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1640 6 1 0 0 6 1 1622 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1641 6 1 0 0 6 1 1622 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1642 6 1 0 0 6 1 1622 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1643 6 1 0 0 6 1 1622 11290 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_780
+S 1644 6 1 0 0 6 1 1622 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1645 6 1 0 0 6 1 1622 11298 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_783
+S 1646 6 1 0 0 6 1 1622 10654 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_6_1
+S 1647 6 1 0 0 6 1 1622 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1648 6 1 0 0 6 1 1622 10678 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_8_1
+S 1649 23 5 0 0 0 1650 582 9859 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvset
+S 1650 14 5 0 0 0 1 1649 9859 10 400000 0 0 0 199 0 0 0 0 0 0 0 0 0 0 0 0 0 7573 0 582 0 0 0 0 dvset
+F 1650 0
+S 1651 23 5 0 0 0 1655 582 9786 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvjust
+S 1652 7 3 0 0 570 1 1651 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1653 6 3 1 0 6 1 1651 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1654 1 3 1 0 6 1 1651 11306 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iord
+S 1655 14 5 0 0 0 1 1651 9786 310 400000 0 0 0 200 3 0 0 0 0 0 0 0 0 0 0 0 0 7747 0 582 0 0 0 0 dvjust
+F 1655 3 1652 1653 1654
+S 1656 6 1 0 0 6 1 1651 11311 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_787
+S 1657 6 1 0 0 6 1 1651 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1658 6 1 0 0 6 1 1651 11319 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_790
+S 1659 23 5 0 0 0 1673 582 9793 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnlsd
+S 1660 7 3 0 0 585 1 1659 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1661 7 3 0 0 588 1 1659 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1662 6 3 1 0 6 1 1659 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1663 7 3 0 0 594 1 1659 11281 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwm
+S 1664 14 3 0 0 8 1 1659 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1665 14 3 0 0 6 1 1659 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1666 1 3 0 0 6 1 1659 11327 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nflag
+S 1667 7 3 0 0 579 1 1659 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1668 7 3 0 0 576 1 1659 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1669 7 3 0 0 573 1 1659 7422 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 acor
+S 1670 7 3 0 0 582 1 1659 8163 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wm
+S 1671 7 3 1 0 591 1 1659 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1672 1 3 1 0 6 1 1659 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1673 14 5 0 0 0 1 1659 9793 310 400000 0 0 0 204 13 0 0 0 0 0 0 0 0 0 0 0 0 7883 0 582 0 0 0 0 dvnlsd
+F 1673 13 1660 1661 1662 1667 1668 1669 1663 1670 1664 1665 1666 1671 1672
+S 1674 6 1 0 0 6 1 1659 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1675 6 1 0 0 6 1 1659 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1676 6 1 0 0 6 1 1659 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1677 6 1 0 0 6 1 1659 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1678 6 1 0 0 6 1 1659 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1679 6 1 0 0 6 1 1659 11333 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_796
+S 1680 6 1 0 0 6 1 1659 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1681 6 1 0 0 6 1 1659 11341 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_799
+S 1682 6 1 0 0 6 1 1659 10654 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_6_1
+S 1683 6 1 0 0 6 1 1659 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1684 23 5 0 0 0 1698 582 9771 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvjac
+S 1685 7 3 0 0 609 1 1684 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1686 7 3 0 0 612 1 1684 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1687 6 3 1 0 6 1 1684 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1688 7 3 0 0 600 1 1684 11349 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ftem
+S 1689 7 3 0 0 618 1 1684 11281 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwm
+S 1690 14 3 0 0 8 1 1684 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1691 14 3 0 0 6 1 1684 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1692 1 3 0 0 6 1 1684 11354 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ierpj
+S 1693 7 3 0 0 597 1 1684 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1694 7 3 0 0 603 1 1684 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1695 7 3 0 0 606 1 1684 8163 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wm
+S 1696 7 3 1 0 615 1 1684 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1697 1 3 1 0 6 1 1684 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1698 14 5 0 0 0 1 1684 9771 310 400000 0 0 0 218 13 0 0 0 0 0 0 0 0 0 0 0 0 8136 0 582 0 0 0 0 dvjac
+F 1698 13 1685 1686 1687 1693 1688 1694 1695 1689 1690 1691 1692 1696 1697
+S 1699 6 1 0 0 6 1 1684 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1700 6 1 0 0 6 1 1684 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1701 6 1 0 0 6 1 1684 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1702 6 1 0 0 6 1 1684 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1703 6 1 0 0 6 1 1684 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1704 6 1 0 0 6 1 1684 11360 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_807
+S 1705 6 1 0 0 6 1 1684 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1706 6 1 0 0 6 1 1684 11368 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_810
+S 1707 6 1 0 0 6 1 1684 10654 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_6_1
+S 1708 6 1 0 0 6 1 1684 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1709 23 5 0 0 0 1716 582 9703 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dacopy
+S 1710 1 3 1 0 6 1 1709 11376 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrow
+S 1711 6 3 1 0 6 1 1709 11381 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ncol
+S 1712 7 3 1 0 621 1 1709 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 1713 6 3 1 0 6 1 1709 11388 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrowa
+S 1714 7 3 0 0 624 1 1709 11394 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b
+S 1715 6 3 1 0 6 1 1709 11396 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrowb
+S 1716 14 5 0 0 0 1 1709 9703 210 400000 0 0 0 232 6 0 0 0 0 0 0 0 0 0 0 0 0 8626 0 582 0 0 0 0 dacopy
+F 1716 6 1710 1711 1712 1713 1714 1715
+S 1717 6 1 0 0 6 1 1709 11402 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_813
+S 1718 6 1 0 0 6 1 1709 11410 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_814
+S 1719 6 1 0 0 6 1 1709 11418 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_817
+S 1720 6 1 0 0 6 1 1709 11426 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_819
+S 1721 6 1 0 0 6 1 1709 11434 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_821
+S 1722 6 1 0 0 6 1 1709 11442 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_823
+S 1723 6 1 0 0 6 1 1709 11450 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_825
+S 1724 23 5 0 0 0 1729 582 9865 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvsol
+S 1725 7 3 0 0 633 1 1724 11281 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwm
+S 1726 7 3 0 0 630 1 1724 11458 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 1727 1 3 0 0 6 1 1724 11460 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iersl
+S 1728 7 3 0 0 627 1 1724 8163 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wm
+S 1729 14 5 0 0 0 1 1724 9865 110 400000 0 0 0 239 4 0 0 0 0 0 0 0 0 0 0 0 0 8652 0 582 0 0 0 0 dvsol
+F 1729 4 1728 1725 1726 1727
+S 1730 6 1 0 0 6 1 1724 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1731 6 1 0 0 6 1 1724 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1732 6 1 0 0 6 1 1724 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1733 23 5 0 0 0 1737 582 9880 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvsrco
+S 1734 7 3 0 0 636 1 1733 11466 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rsav
+S 1735 7 3 0 0 639 1 1733 11471 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 isav
+S 1736 1 3 1 0 6 1 1733 11476 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 job
+S 1737 14 5 0 0 0 1 1733 9880 110 400000 0 0 0 244 3 0 0 0 0 0 0 0 0 0 0 0 0 8776 0 582 0 0 0 0 dvsrco
+F 1737 3 1734 1735 1736
+S 1738 6 1 0 0 6 1 1733 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1739 6 1 0 0 6 1 1733 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1740 23 5 0 0 0 1747 582 9710 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dewset
+S 1741 7 3 1 0 648 1 1740 11480 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ycur
+S 1742 6 3 1 0 6 1 1740 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1743 1 3 1 0 6 1 1740 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1744 7 3 1 0 645 1 1740 6097 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rtol
+S 1745 7 3 1 0 642 1 1740 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1746 7 3 2 0 651 1 1740 7529 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1747 14 5 0 0 0 1 1740 9710 310 400000 0 0 0 248 6 0 0 0 0 0 0 0 0 0 0 0 0 8935 0 582 0 0 0 0 dewset
+F 1747 6 1742 1743 1744 1745 1741 1746
+S 1748 6 1 0 0 6 1 1740 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1749 6 1 0 0 6 1 1740 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1750 6 1 0 0 6 1 1740 11485 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_830
+S 1751 23 5 0 0 8 1755 582 9809 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnorm
+S 1752 7 3 1 0 654 1 1751 11493 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 v
+S 1753 7 3 1 0 657 1 1751 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 1754 6 3 1 0 6 1 1751 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1755 14 5 0 0 9 1 1751 9809 214 400000 0 0 0 255 3 0 0 1756 0 0 0 0 0 0 0 0 0 8975 0 582 0 0 0 0 dvnorm
+F 1755 3 1754 1752 1753
+S 1756 1 3 0 0 9 1 1751 9809 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnorm
+S 1757 6 1 0 0 6 1 1751 11497 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_832
+S 1758 23 5 0 0 0 1768 582 10060 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 xerrdv
+S 1759 1 3 0 0 28 1 1758 11505 4 43000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 msg
+S 1760 1 3 0 0 6 1 1758 11509 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nerr
+S 1761 1 3 0 0 6 1 1758 11514 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 level
+S 1762 1 3 0 0 6 1 1758 11520 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ni
+S 1763 1 3 0 0 6 1 1758 11523 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i1
+S 1764 1 3 0 0 6 1 1758 11526 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i2
+S 1765 1 3 0 0 6 1 1758 11529 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nr
+S 1766 1 3 0 0 9 1 1758 11532 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r1
+S 1767 1 3 0 0 9 1 1758 11535 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r2
+S 1768 14 5 0 0 0 1 1758 10060 10 400000 0 0 0 259 9 0 0 0 0 0 0 0 0 0 0 0 0 9015 0 582 0 0 0 0 xerrdv
+F 1768 9 1759 1760 1761 1762 1763 1764 1765 1766 1767
+S 1769 23 5 0 0 0 1771 582 10067 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 xsetf
+S 1770 1 3 1 0 6 1 1769 11538 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mflag
+S 1771 14 5 0 0 0 1 1769 10067 10 400000 0 0 0 269 1 0 0 0 0 0 0 0 0 0 0 0 0 9092 0 582 0 0 0 0 xsetf
+F 1771 1 1770
+S 1772 23 5 0 0 0 1774 582 10073 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 xsetun
+S 1773 1 3 0 0 6 1 1772 11544 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lun
+S 1774 14 5 0 0 0 1 1772 10073 10 400000 0 0 0 271 1 0 0 0 0 0 0 0 0 0 0 0 0 9114 0 582 0 0 0 0 xsetun
+F 1774 1 1773
+S 1775 23 5 0 0 6 1779 582 9908 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ixsav
+S 1776 1 3 1 0 6 1 1775 11548 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipar
+S 1777 1 3 1 0 6 1 1775 11553 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ivalue
+S 1778 1 3 1 0 16 1 1775 11560 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iset
+S 1779 14 5 0 0 6 1 1775 9908 14 400000 0 0 0 273 3 0 0 1780 0 0 0 0 0 0 0 0 0 9138 0 582 0 0 0 0 ixsav
+F 1779 3 1776 1777 1778
+S 1780 1 3 0 0 6 1 1775 9908 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ixsav
+S 1781 23 5 0 0 6 1782 582 9901 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iumach
+S 1782 14 5 0 0 6 1 1781 9901 14 400000 0 0 0 277 0 0 0 1783 0 0 0 0 0 0 0 0 0 9196 0 582 0 0 0 0 iumach
+F 1782 0
+S 1783 1 3 0 0 6 1 1781 9901 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iumach
+S 1784 23 5 0 0 0 1787 582 6018 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 check_stat
+S 1785 1 3 1 0 6 1 1784 11221 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ier
+S 1786 1 3 1 0 6 1 1784 11565 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 called_from_where
+S 1787 14 5 0 0 0 1 1784 6018 0 400000 0 0 0 278 2 0 0 0 0 0 0 0 0 0 0 0 0 9220 0 582 0 0 0 0 check_stat
+F 1787 2 1785 1786
+S 1788 23 5 0 0 0 1797 582 9843 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvpreps
+S 1789 1 3 1 0 6 1 1788 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1790 7 3 0 0 663 1 1788 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1791 7 3 1 0 669 1 1788 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1792 6 3 1 0 6 1 1788 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1793 14 3 0 0 8 1 1788 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1794 14 3 0 0 6 1 1788 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1795 7 3 0 0 666 1 1788 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1796 7 3 0 0 660 1 1788 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1797 14 5 0 0 0 1 1788 9843 310 400000 0 0 0 281 8 0 0 0 0 0 0 0 0 0 0 0 0 9248 0 582 0 0 0 0 dvpreps
+F 1797 8 1789 1790 1791 1792 1795 1796 1793 1794
+S 1798 6 1 0 0 6 1 1788 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1799 6 1 0 0 6 1 1788 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1800 6 1 0 0 6 1 1788 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1801 6 1 0 0 6 1 1788 11583 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_837
+S 1802 6 1 0 0 6 1 1788 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1803 6 1 0 0 6 1 1788 11591 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_840
+S 1804 23 5 0 0 0 1810 582 11599 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvrenew
+S 1805 1 3 1 0 6 1 1804 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1806 7 3 0 0 678 1 1804 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1807 14 3 0 0 8 1 1804 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1808 7 3 0 0 675 1 1804 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1809 7 3 0 0 672 1 1804 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1810 14 5 0 0 0 1 1804 11599 100 400000 0 0 0 290 5 0 0 0 0 0 0 0 0 0 0 0 0 9554 0 582 0 0 0 0 dvrenew
+F 1810 5 1805 1806 1808 1809 1807
+S 1811 6 1 0 0 6 1 1804 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1812 6 1 0 0 6 1 1804 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1813 6 1 0 0 6 1 1804 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1814 23 5 0 0 0 1825 582 9717 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dgroup
+S 1815 1 3 0 0 6 1 1814 11607 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrp
+S 1816 7 3 0 0 690 1 1814 11612 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incl
+S 1817 7 3 0 0 693 1 1814 11617 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jdone
+S 1818 1 3 0 0 6 1 1814 11221 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ier
+S 1819 1 3 1 0 6 1 1814 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1820 7 3 1 0 681 1 1814 8742 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ia
+S 1821 7 3 1 0 684 1 1814 9155 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ja
+S 1822 1 3 1 0 6 1 1814 6751 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxg
+S 1823 7 3 0 0 687 1 1814 8942 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 igp
+S 1824 7 3 0 0 696 1 1814 9329 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jgp
+S 1825 14 5 0 0 0 1 1814 9717 110 400000 0 0 0 296 10 0 0 0 0 0 0 0 0 0 0 0 0 9751 0 582 0 0 0 0 dgroup
+F 1825 10 1819 1820 1821 1822 1815 1823 1824 1816 1817 1818
+S 1826 6 1 0 0 6 1 1814 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1827 6 1 0 0 6 1 1814 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1828 6 1 0 0 6 1 1814 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1829 6 1 0 0 6 1 1814 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1830 6 1 0 0 6 1 1814 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1831 6 1 0 0 6 1 1814 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1832 23 5 0 0 0 1839 582 11623 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bgroup
+S 1833 7 3 0 0 702 1 1832 11630 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bja
+S 1834 7 3 0 0 699 1 1832 11634 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bincl
+S 1835 7 3 0 0 705 1 1832 11640 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 bdone
+S 1836 1 3 1 0 6 1 1832 10308 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 1837 1 3 1 0 6 1 1832 10311 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 1838 1 3 1 0 6 1 1832 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1839 14 5 0 0 0 1 1832 11623 100 400000 0 0 0 307 6 0 0 0 0 0 0 0 0 0 0 0 0 9826 0 582 0 0 0 0 bgroup
+F 1839 6 1838 1833 1834 1835 1836 1837
+S 1840 6 1 0 0 6 1 1832 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1841 6 1 0 0 6 1 1832 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1842 6 1 0 0 6 1 1832 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1843 23 5 0 0 0 1847 582 11646 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 banded_iaja
+S 1844 1 3 1 0 6 1 1843 10308 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 1845 1 3 1 0 6 1 1843 10311 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 1846 1 3 1 0 6 1 1843 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1847 14 5 0 0 0 1 1843 11646 0 400000 0 0 0 314 3 0 0 0 0 0 0 0 0 0 0 0 0 10020 0 582 0 0 0 0 banded_iaja
+F 1847 3 1846 1844 1845
+S 1848 23 5 0 0 0 1855 582 11658 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 banded_get_bjnz
+S 1849 1 3 1 0 6 1 1848 10308 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 1850 1 3 1 0 6 1 1848 10311 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 1851 1 3 1 0 6 1 1848 11674 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jcol
+S 1852 7 3 2 0 708 1 1848 11679 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jnz
+S 1853 1 3 2 0 6 1 1848 11683 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nzj
+S 1854 1 3 1 0 6 1 1848 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1855 14 5 0 0 0 1 1848 11658 100 400000 0 0 0 318 6 0 0 0 0 0 0 0 0 0 0 0 0 10182 0 582 0 0 0 0 banded_get_bjnz
+F 1855 6 1854 1849 1850 1851 1852 1853
+S 1856 6 1 0 0 6 1 1848 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1857 23 5 0 0 0 1871 582 9800 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnlss28
+S 1858 7 3 0 0 723 1 1857 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1859 7 3 0 0 726 1 1857 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1860 6 3 1 0 6 1 1857 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1861 7 3 0 0 732 1 1857 11281 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwm
+S 1862 14 3 0 0 8 1 1857 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1863 14 3 0 0 6 1 1857 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1864 1 3 0 0 6 1 1857 11327 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nflag
+S 1865 7 3 0 0 717 1 1857 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1866 7 3 0 0 714 1 1857 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1867 7 3 0 0 711 1 1857 7422 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 acor
+S 1868 7 3 0 0 720 1 1857 8163 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wm
+S 1869 7 3 1 0 729 1 1857 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1870 1 3 1 0 6 1 1857 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1871 14 5 0 0 0 1 1857 9800 310 400000 0 0 0 325 13 0 0 0 0 0 0 0 0 0 0 0 0 10275 0 582 0 0 0 0 dvnlss28
+F 1871 13 1858 1859 1860 1865 1866 1867 1861 1868 1862 1863 1864 1869 1870
+S 1872 6 1 0 0 6 1 1857 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1873 6 1 0 0 6 1 1857 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1874 6 1 0 0 6 1 1857 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1875 6 1 0 0 6 1 1857 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1876 6 1 0 0 6 1 1857 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1877 6 1 0 0 6 1 1857 11687 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_859
+S 1878 6 1 0 0 6 1 1857 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1879 6 1 0 0 6 1 1857 11695 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_862
+S 1880 6 1 0 0 6 1 1857 10654 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_6_1
+S 1881 6 1 0 0 6 1 1857 10662 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_7_1
+S 1882 23 5 0 0 0 1886 582 9871 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvsols28
+S 1883 7 3 0 0 738 1 1882 11458 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 1884 7 3 0 0 735 1 1882 11703 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 tem
+S 1885 1 3 0 0 6 1 1882 11460 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iersl
+S 1886 14 5 0 0 0 1 1882 9871 110 400000 0 0 0 339 3 0 0 0 0 0 0 0 0 0 0 0 0 10536 0 582 0 0 0 0 dvsols28
+F 1886 3 1883 1884 1885
+S 1887 6 1 0 0 6 1 1882 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1888 6 1 0 0 6 1 1882 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1889 23 5 0 0 0 1902 582 9777 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvjacs28
+S 1890 7 3 0 0 750 1 1889 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1891 7 3 0 0 753 1 1889 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1892 6 3 1 0 6 1 1889 11230 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ldyh
+S 1893 14 3 0 0 8 1 1889 10220 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 1894 14 3 0 0 6 1 1889 11195 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jac
+S 1895 1 3 0 0 6 1 1889 11354 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ierpj
+S 1896 7 3 0 0 741 1 1889 7529 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ewt
+S 1897 7 3 0 0 744 1 1889 7677 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ftemp1
+S 1898 7 3 0 0 747 1 1889 8081 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 savf
+S 1899 1 3 1 0 6 1 1889 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1900 7 3 1 0 756 1 1889 6058 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 atol
+S 1901 1 3 1 0 6 1 1889 6162 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itol
+S 1902 14 5 0 0 0 1 1889 9777 310 400000 0 0 0 343 12 0 0 0 0 0 0 0 0 0 0 0 0 10580 0 582 0 0 0 0 dvjacs28
+F 1902 12 1890 1891 1892 1896 1897 1898 1893 1894 1895 1899 1900 1901
+S 1903 6 1 0 0 6 1 1889 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1904 6 1 0 0 6 1 1889 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1905 6 1 0 0 6 1 1889 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1906 6 1 0 0 6 1 1889 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1907 6 1 0 0 6 1 1889 11707 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_871
+S 1908 6 1 0 0 6 1 1889 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1909 6 1 0 0 6 1 1889 11715 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_874
+S 1910 6 1 0 0 6 1 1889 11179 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_5_1
+S 1911 23 5 0 0 0 1915 582 10052 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 set_icn
+S 1912 1 3 1 0 6 1 1911 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1913 7 3 1 0 759 1 1911 8742 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ia
+S 1914 7 3 0 0 762 1 1911 8860 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 1915 14 5 0 0 0 1 1911 10052 110 400000 0 0 0 356 3 0 0 0 0 0 0 0 0 0 0 0 0 11017 0 582 0 0 0 0 set_icn
+F 1915 3 1912 1913 1914
+S 1916 6 1 0 0 6 1 1911 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1917 6 1 0 0 6 1 1911 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1918 23 5 0 0 0 1923 582 9692 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 check_diag
+S 1919 1 3 1 0 6 1 1918 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1920 7 3 1 0 765 1 1918 8742 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ia
+S 1921 7 3 1 0 771 1 1918 9155 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ja
+S 1922 7 3 1 0 768 1 1918 8860 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 1923 14 5 0 0 0 1 1918 9692 110 400000 0 0 0 360 4 0 0 0 0 0 0 0 0 0 0 0 0 11046 0 582 0 0 0 0 check_diag
+F 1923 4 1919 1920 1921 1922
+S 1924 6 1 0 0 6 1 1918 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1925 6 1 0 0 6 1 1918 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1926 6 1 0 0 6 1 1918 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1927 23 5 0 0 0 1938 582 9733 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvcheck
+S 1928 1 3 1 0 6 1 1927 11476 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 job
+S 1929 14 3 0 0 8 1 1927 11723 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g
+S 1930 1 3 1 0 6 1 1927 10222 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 1931 7 3 0 0 783 1 1927 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1932 7 3 0 0 786 1 1927 11227 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yh
+S 1933 1 3 0 0 6 1 1927 11725 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 irt
+S 1934 6 3 1 0 6 1 1927 7021 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nyh
+S 1935 7 3 0 0 774 1 1927 7733 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g0
+S 1936 7 3 0 0 777 1 1927 7769 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g1
+S 1937 7 3 0 0 780 1 1927 7805 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gx
+S 1938 14 5 0 0 0 1 1927 9733 310 400000 0 0 0 365 10 0 0 0 0 0 0 0 0 0 0 0 0 11080 0 582 0 0 0 0 dvcheck
+F 1938 10 1928 1929 1930 1931 1932 1934 1935 1936 1937 1933
+S 1939 6 1 0 0 6 1 1927 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1940 6 1 0 0 6 1 1927 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1941 6 1 0 0 6 1 1927 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 1942 6 1 0 0 6 1 1927 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 1943 6 1 0 0 6 1 1927 11729 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_885
+S 1944 6 1 0 0 6 1 1927 10646 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_4_1
+S 1945 6 1 0 0 6 1 1927 11737 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_888
+S 1946 23 5 0 0 0 1956 582 9851 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvroots
+S 1947 1 3 0 0 6 1 1946 11745 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jflag
+S 1948 1 3 0 0 9 1 1946 11751 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x0
+S 1949 1 3 0 0 9 1 1946 11754 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x1
+S 1950 1 3 0 0 9 1 1946 11458 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 1951 6 3 1 0 6 1 1946 6172 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ng
+S 1952 1 3 1 0 9 1 1946 6293 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmin
+S 1953 7 3 0 0 789 1 1946 7733 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g0
+S 1954 7 3 0 0 792 1 1946 7769 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 g1
+S 1955 7 3 0 0 795 1 1946 7805 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gx
+S 1956 14 5 0 0 0 1 1946 9851 210 400000 0 0 0 376 9 0 0 0 0 0 0 0 0 0 0 0 0 11278 0 582 0 0 0 0 dvroots
+F 1956 9 1951 1952 1947 1948 1949 1953 1954 1955 1950
+S 1957 6 1 0 0 6 1 1946 11757 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_889
+S 1958 23 5 0 0 0 1963 582 9823 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnrdp
+S 1959 7 3 0 0 798 1 1958 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1960 1 3 0 0 6 1 1958 11765 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iydim
+S 1961 1 3 0 0 6 1 1958 11771 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neqn
+S 1962 1 3 0 0 6 1 1958 6947 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nq
+S 1963 14 5 0 0 0 1 1958 9823 110 400000 0 0 0 386 4 0 0 0 0 0 0 0 0 0 0 0 0 11515 0 582 0 0 0 0 dvnrdp
+F 1963 4 1959 1960 1961 1962
+S 1964 6 1 0 0 6 1 1958 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1965 23 5 0 0 0 1970 582 9816 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnrdn
+S 1966 7 3 0 0 801 1 1965 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1967 1 3 0 0 6 1 1965 11765 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iydim
+S 1968 1 3 0 0 6 1 1965 11771 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neqn
+S 1969 1 3 0 0 6 1 1965 6947 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nq
+S 1970 14 5 0 0 0 1 1965 9816 110 400000 0 0 0 391 4 0 0 0 0 0 0 0 0 0 0 0 0 11547 0 582 0 0 0 0 dvnrdn
+F 1970 4 1966 1967 1968 1969
+S 1971 6 1 0 0 6 1 1965 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1972 23 5 0 0 0 1978 582 9830 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvnrds
+S 1973 7 3 0 0 804 1 1972 10226 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 1974 1 3 0 0 6 1 1972 11765 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iydim
+S 1975 1 3 0 0 6 1 1972 11771 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neqn
+S 1976 1 3 0 0 9 1 1972 11776 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rh
+S 1977 1 3 0 0 6 1 1972 6642 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 l
+S 1978 14 5 0 0 0 1 1972 9830 110 400000 0 0 0 396 5 0 0 0 0 0 0 0 0 0 0 0 0 11579 0 582 0 0 0 0 dvnrds
+F 1978 5 1973 1974 1975 1977 1976
+S 1979 6 1 0 0 6 1 1972 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1980 23 5 0 0 0 1981 582 5980 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 release_arrays
+S 1981 14 5 0 0 0 1 1980 5980 0 400000 0 0 0 402 0 0 0 0 0 0 0 0 0 0 0 0 0 11612 0 582 0 0 0 0 release_arrays
+F 1981 0
+S 1982 23 5 0 0 0 1988 582 9651 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dgefa_f90
+S 1983 7 3 0 0 807 1 1982 11386 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 1984 6 3 1 0 6 1 1982 11779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lda
+S 1985 7 3 0 0 810 1 1982 11783 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipvt
+S 1986 1 3 0 0 6 1 1982 11788 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 info
+S 1987 1 3 1 0 6 1 1982 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 1988 14 5 0 0 0 1 1982 9651 300 400000 0 0 0 403 5 0 0 0 0 0 0 0 0 0 0 0 0 11935 0 582 0 0 0 0 dgefa_f90
+F 1988 5 1983 1984 1987 1985 1986
+S 1989 6 1 0 0 6 1 1982 11793 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_894
+S 1990 6 1 0 0 6 1 1982 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 1991 6 1 0 0 6 1 1982 11801 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_897
+S 1992 6 1 0 0 6 1 1982 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 1993 23 5 0 0 0 2000 582 9661 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dgesl_f90
+S 1994 7 3 0 0 813 1 1993 11386 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 1995 6 3 1 0 6 1 1993 11779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lda
+S 1996 7 3 0 0 819 1 1993 11783 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipvt
+S 1997 7 3 0 0 816 1 1993 11394 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b
+S 1998 1 3 1 0 6 1 1993 11476 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 job
+S 1999 1 3 1 0 6 1 1993 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2000 14 5 0 0 0 1 1993 9661 300 400000 0 0 0 409 6 0 0 0 0 0 0 0 0 0 0 0 0 12044 0 582 0 0 0 0 dgesl_f90
+F 2000 6 1994 1995 1999 1996 1997 1998
+S 2001 6 1 0 0 6 1 1993 11809 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_899
+S 2002 6 1 0 0 6 1 1993 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2003 6 1 0 0 6 1 1993 11817 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_902
+S 2004 6 1 0 0 6 1 1993 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2005 6 1 0 0 6 1 1993 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2006 23 5 0 0 0 2014 582 9631 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dgbfa_f90
+S 2007 7 3 0 0 822 1 2006 11825 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abd
+S 2008 6 3 1 0 6 1 2006 11779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lda
+S 2009 1 3 1 0 6 1 2006 10308 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 2010 1 3 1 0 6 1 2006 10311 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 2011 7 3 0 0 825 1 2006 11783 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipvt
+S 2012 1 3 0 0 6 1 2006 11788 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 info
+S 2013 1 3 1 0 6 1 2006 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2014 14 5 0 0 0 1 2006 9631 300 400000 0 0 0 416 7 0 0 0 0 0 0 0 0 0 0 0 0 12160 0 582 0 0 0 0 dgbfa_f90
+F 2014 7 2007 2008 2013 2009 2010 2011 2012
+S 2015 6 1 0 0 6 1 2006 11829 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_905
+S 2016 6 1 0 0 6 1 2006 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2017 6 1 0 0 6 1 2006 11837 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_908
+S 2018 6 1 0 0 6 1 2006 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2019 23 5 0 0 0 2028 582 9641 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dgbsl_f90
+S 2020 7 3 0 0 828 1 2019 11825 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 abd
+S 2021 6 3 1 0 6 1 2019 11779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lda
+S 2022 1 3 1 0 6 1 2019 10308 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 2023 1 3 1 0 6 1 2019 10311 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 2024 7 3 0 0 834 1 2019 11783 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipvt
+S 2025 7 3 0 0 831 1 2019 11394 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 b
+S 2026 1 3 1 0 6 1 2019 11476 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 job
+S 2027 1 3 1 0 6 1 2019 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2028 14 5 0 0 0 1 2019 9641 300 400000 0 0 0 424 8 0 0 0 0 0 0 0 0 0 0 0 0 12333 0 582 0 0 0 0 dgbsl_f90
+F 2028 8 2020 2021 2027 2022 2023 2024 2025 2026
+S 2029 6 1 0 0 6 1 2019 11845 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_910
+S 2030 6 1 0 0 6 1 2019 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2031 6 1 0 0 6 1 2019 11853 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_913
+S 2032 6 1 0 0 6 1 2019 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2033 6 1 0 0 6 1 2019 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2034 23 5 0 0 0 2041 582 9602 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 daxpy_f90
+S 2035 1 3 1 0 9 1 2034 11861 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 da
+S 2036 7 3 1 0 837 1 2034 11864 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dx
+S 2037 1 3 1 0 6 1 2034 11867 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incx
+S 2038 7 3 0 0 840 1 2034 11872 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dy
+S 2039 1 3 1 0 6 1 2034 11875 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incy
+S 2040 1 3 1 0 6 1 2034 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2041 14 5 0 0 0 1 2034 9602 100 400000 0 0 0 433 6 0 0 0 0 0 0 0 0 0 0 0 0 12471 0 582 0 0 0 0 daxpy_f90
+F 2041 6 2040 2035 2036 2037 2038 2039
+S 2042 6 1 0 0 6 1 2034 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2043 6 1 0 0 6 1 2034 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2044 23 5 0 0 0 2050 582 9612 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dcopy_f90
+S 2045 7 3 1 0 843 1 2044 11864 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dx
+S 2046 1 3 1 0 6 1 2044 11867 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incx
+S 2047 7 3 0 0 846 1 2044 11872 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dy
+S 2048 1 3 1 0 6 1 2044 11875 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incy
+S 2049 1 3 1 0 6 1 2044 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2050 14 5 0 0 0 1 2044 9612 100 400000 0 0 0 440 5 0 0 0 0 0 0 0 0 0 0 0 0 12563 0 582 0 0 0 0 dcopy_f90
+F 2050 5 2049 2045 2046 2047 2048
+S 2051 6 1 0 0 6 1 2044 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2052 6 1 0 0 6 1 2044 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2053 23 5 0 0 8 2059 582 9622 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ddot_f90
+S 2054 7 3 1 0 849 1 2053 11864 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dx
+S 2055 1 3 1 0 6 1 2053 11867 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incx
+S 2056 7 3 1 0 852 1 2053 11872 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dy
+S 2057 1 3 1 0 6 1 2053 11875 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incy
+S 2058 1 3 1 0 6 1 2053 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2059 14 5 0 0 9 1 2053 9622 104 400000 0 0 0 446 5 0 0 2060 0 0 0 0 0 0 0 0 0 12656 0 582 0 0 0 0 ddot_f90
+F 2059 5 2058 2054 2055 2056 2057
+S 2060 1 3 0 0 9 1 2053 9622 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ddot_f90
+S 2061 6 1 0 0 6 1 2053 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2062 6 1 0 0 6 1 2053 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2063 23 5 0 0 0 2068 582 9671 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dscal_f90
+S 2064 1 3 1 0 9 1 2063 11861 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 da
+S 2065 7 3 0 0 855 1 2063 11864 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dx
+S 2066 1 3 1 0 6 1 2063 11867 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incx
+S 2067 1 3 1 0 6 1 2063 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2068 14 5 0 0 0 1 2063 9671 100 400000 0 0 0 452 4 0 0 0 0 0 0 0 0 0 0 0 0 12747 0 582 0 0 0 0 dscal_f90
+F 2068 4 2067 2064 2065 2066
+S 2069 6 1 0 0 6 1 2063 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2070 23 5 0 0 6 2074 582 9681 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 idamax_f90
+S 2071 7 3 1 0 858 1 2070 11864 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dx
+S 2072 1 3 1 0 6 1 2070 11867 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 incx
+S 2073 1 3 1 0 6 1 2070 6855 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2074 14 5 0 0 6 1 2070 9681 104 400000 0 0 0 457 3 0 0 2075 0 0 0 0 0 0 0 0 0 12814 0 582 0 0 0 0 idamax_f90
+F 2074 3 2073 2071 2072
+S 2075 1 3 0 0 6 1 2070 9681 4 1003000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 idamax_f90
+S 2076 6 1 0 0 6 1 2070 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2077 23 5 0 0 0 2090 582 9929 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28ad
+S 2078 1 3 0 0 6 1 2077 11880 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nz
+S 2079 7 3 0 0 861 1 2077 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2080 6 3 0 0 6 1 2077 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2081 7 3 0 0 873 1 2077 11888 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 irn
+S 2082 6 3 0 0 6 1 2077 11892 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lirn
+S 2083 1 3 0 0 9 1 2077 11897 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u
+S 2084 7 3 0 0 870 1 2077 11899 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ikeep
+S 2085 7 3 0 0 876 1 2077 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2086 7 3 0 0 864 1 2077 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2087 1 3 0 0 6 1 2077 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 2088 6 3 0 0 6 1 2077 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2089 7 3 0 0 867 1 2077 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2090 14 5 0 0 0 1 2077 9929 210 400000 0 0 0 461 12 0 0 0 0 0 0 0 0 0 0 0 0 12954 0 582 0 0 0 0 ma28ad
+F 2090 12 2088 2078 2079 2080 2081 2082 2089 2083 2084 2085 2086 2087
+S 2091 6 1 0 0 6 1 2077 11908 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_924
+S 2092 6 1 0 0 6 1 2077 11916 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_926
+S 2093 6 1 0 0 6 1 2077 11924 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_928
+S 2094 6 1 0 0 6 1 2077 11932 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_930
+S 2095 6 1 0 0 6 1 2077 11940 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_932
+S 2096 6 1 0 0 6 1 2077 11948 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_934
+S 2097 23 5 0 0 0 2109 582 9936 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28bd
+S 2098 6 3 0 0 6 1 2097 11880 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nz
+S 2099 7 3 0 0 879 1 2097 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2100 6 3 0 0 6 1 2097 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2101 7 3 0 0 891 1 2097 11956 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ivect
+S 2102 7 3 0 0 888 1 2097 11899 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ikeep
+S 2103 7 3 0 0 894 1 2097 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2104 7 3 0 0 882 1 2097 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2105 1 3 0 0 6 1 2097 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 2106 6 3 0 0 6 1 2097 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2107 7 3 0 0 897 1 2097 9421 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jvect
+S 2108 7 3 0 0 885 1 2097 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2109 14 5 0 0 0 1 2097 9936 210 400000 0 0 0 474 11 0 0 0 0 0 0 0 0 0 0 0 0 13323 0 582 0 0 0 0 ma28bd
+F 2109 11 2106 2098 2099 2100 2101 2107 2108 2102 2103 2104 2105
+S 2110 6 1 0 0 6 1 2097 11962 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_933
+S 2111 6 1 0 0 6 1 2097 11970 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_935
+S 2112 6 1 0 0 6 1 2097 11978 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_937
+S 2113 6 1 0 0 6 1 2097 11986 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_939
+S 2114 6 1 0 0 6 1 2097 11994 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_941
+S 2115 23 5 0 0 0 2132 582 9950 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28dd
+S 2116 7 3 0 0 900 1 2115 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2117 6 3 0 0 6 1 2115 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2118 7 3 0 0 912 1 2115 11956 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ivect
+S 2119 6 3 0 0 6 1 2115 11880 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nz
+S 2120 7 3 0 0 927 1 2115 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2121 7 3 0 0 930 1 2115 12007 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenrl
+S 2122 7 3 0 0 924 1 2115 12013 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenoff
+S 2123 7 3 0 0 906 1 2115 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2124 7 3 0 0 909 1 2115 12023 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iq
+S 2125 7 3 0 0 918 1 2115 12026 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw1
+S 2126 7 3 0 0 915 1 2115 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2127 1 3 0 0 9 1 2115 12030 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w1
+S 2128 1 3 0 0 6 1 2115 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 2129 6 3 0 0 6 1 2115 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2130 7 3 0 0 921 1 2115 9421 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jvect
+S 2131 7 3 0 0 903 1 2115 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2132 14 5 0 0 0 1 2115 9950 210 400000 0 0 0 486 16 0 0 0 0 0 0 0 0 0 0 0 0 13450 0 582 0 0 0 0 ma28dd
+F 2132 16 2129 2116 2117 2118 2130 2119 2131 2120 2121 2122 2123 2124 2125 2126 2127 2128
+S 2133 6 1 0 0 6 1 2115 11994 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_941
+S 2134 6 1 0 0 6 1 2115 12033 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_943
+S 2135 6 1 0 0 6 1 2115 12041 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_945
+S 2136 6 1 0 0 6 1 2115 12049 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_947
+S 2137 6 1 0 0 6 1 2115 12057 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_949
+S 2138 6 1 0 0 6 1 2115 12065 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_951
+S 2139 23 5 0 0 0 2148 582 9943 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28cd
+S 2140 7 3 0 0 933 1 2139 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2141 6 3 0 0 6 1 2139 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2142 7 3 0 0 945 1 2139 11899 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ikeep
+S 2143 7 3 0 0 936 1 2139 12073 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rhs
+S 2144 7 3 0 0 939 1 2139 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2145 1 3 0 0 6 1 2139 12077 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mtype
+S 2146 6 3 0 0 6 1 2139 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2147 7 3 0 0 942 1 2139 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2148 14 5 0 0 0 1 2139 9943 210 400000 0 0 0 503 8 0 0 0 0 0 0 0 0 0 0 0 0 13602 0 582 0 0 0 0 ma28cd
+F 2148 8 2146 2140 2141 2147 2142 2143 2144 2145
+S 2149 6 1 0 0 6 1 2139 12083 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_950
+S 2150 6 1 0 0 6 1 2139 12091 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_952
+S 2151 6 1 0 0 6 1 2139 12099 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_954
+S 2152 6 1 0 0 6 1 2139 12107 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_956
+S 2153 23 5 0 0 0 2170 582 9957 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma28id
+S 2154 6 3 0 0 6 1 2153 11880 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nz
+S 2155 7 3 0 0 951 1 2153 12115 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 aorg
+S 2156 7 3 0 0 975 1 2153 12120 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 irnorg
+S 2157 7 3 0 0 969 1 2153 12127 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icnorg
+S 2158 6 3 0 0 6 1 2153 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2159 7 3 0 0 948 1 2153 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2160 7 3 0 0 972 1 2153 11899 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ikeep
+S 2161 7 3 0 0 957 1 2153 12073 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rhs
+S 2162 7 3 0 0 963 1 2153 11458 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 2163 7 3 0 0 954 1 2153 12134 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r
+S 2164 7 3 0 0 960 1 2153 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2165 1 3 0 0 6 1 2153 12077 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mtype
+S 2166 1 3 0 0 9 1 2153 12136 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 prec
+S 2167 1 3 0 0 6 1 2153 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 2168 6 3 0 0 6 1 2153 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2169 7 3 0 0 966 1 2153 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2170 14 5 0 0 0 1 2153 9957 210 400000 0 0 0 512 16 0 0 0 0 0 0 0 0 0 0 0 0 13653 0 582 0 0 0 0 ma28id
+F 2170 16 2168 2154 2155 2156 2157 2158 2159 2169 2160 2161 2162 2163 2164 2165 2166 2167
+S 2171 6 1 0 0 6 1 2153 12107 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_956
+S 2172 6 1 0 0 6 1 2153 12141 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_958
+S 2173 6 1 0 0 6 1 2153 12149 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_960
+S 2174 6 1 0 0 6 1 2153 12157 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_962
+S 2175 6 1 0 0 6 1 2153 12165 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_964
+S 2176 23 5 0 0 0 2198 582 9964 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma30ad
+S 2177 6 3 0 0 6 1 2176 12173 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nn
+S 2178 7 3 0 0 978 1 2176 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2179 6 3 0 0 6 1 2176 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2180 7 3 0 0 1014 1 2176 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2181 7 3 0 0 1017 1 2176 12007 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenrl
+S 2182 7 3 0 0 990 1 2176 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2183 7 3 0 0 999 1 2176 12023 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iq
+S 2184 7 3 0 0 1002 1 2176 11888 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 irn
+S 2185 6 3 0 0 6 1 2176 11892 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lirn
+S 2186 7 3 0 0 1011 1 2176 12176 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenc
+S 2187 7 3 0 0 987 1 2176 12181 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ifirst
+S 2188 7 3 0 0 1008 1 2176 12188 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lastr
+S 2189 7 3 0 0 1023 1 2176 12194 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nextr
+S 2190 7 3 0 0 1005 1 2176 12200 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lastc
+S 2191 7 3 0 0 1020 1 2176 12206 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nextc
+S 2192 7 3 0 0 996 1 2176 12212 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iptr
+S 2193 7 3 0 0 993 1 2176 12217 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipc
+S 2194 1 3 0 0 9 1 2176 11897 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 u
+S 2195 1 3 0 0 6 1 2176 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 2196 7 3 0 0 981 1 2176 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2197 7 3 0 0 984 1 2176 9574 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 idisp
+S 2198 14 5 0 0 0 1 2176 9964 210 400000 0 0 0 529 21 0 0 0 0 0 0 0 0 0 0 0 0 13949 0 582 0 0 0 0 ma30ad
+F 2198 21 2177 2196 2178 2179 2180 2181 2197 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195
+S 2199 6 1 0 0 6 1 2176 12165 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_964
+S 2200 6 1 0 0 6 1 2176 12221 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_966
+S 2201 6 1 0 0 6 1 2176 12229 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_968
+S 2202 23 5 0 0 0 2210 582 9985 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma30dd
+S 2203 7 3 0 0 1026 1 2202 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2204 7 3 0 0 1032 1 2202 12212 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iptr
+S 2205 1 3 0 0 6 1 2202 12237 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iactiv
+S 2206 6 3 0 0 6 1 2202 12244 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 itop
+S 2207 1 3 0 0 16 1 2202 12249 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 reals
+S 2208 7 3 0 0 1029 1 2202 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2209 6 3 0 0 6 1 2202 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2210 14 5 0 0 0 1 2202 9985 210 400000 0 0 0 551 7 0 0 0 0 0 0 0 0 0 0 0 0 15067 0 582 0 0 0 0 ma30dd
+F 2210 7 2203 2208 2204 2209 2205 2206 2207
+S 2211 6 1 0 0 6 1 2202 12255 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_970
+S 2212 6 1 0 0 6 1 2202 12263 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_972
+S 2213 23 5 0 0 0 2226 582 9971 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma30bd
+S 2214 7 3 0 0 1035 1 2213 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2215 6 3 0 0 6 1 2213 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2216 7 3 0 0 1056 1 2213 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2217 7 3 0 0 1059 1 2213 12007 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenrl
+S 2218 7 3 0 0 1047 1 2213 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2219 7 3 0 0 1050 1 2213 12023 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iq
+S 2220 7 3 0 0 1038 1 2213 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2221 7 3 0 0 1053 1 2213 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2222 1 3 0 0 6 1 2213 11239 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iflag
+S 2223 6 3 0 0 6 1 2213 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2224 7 3 0 0 1041 1 2213 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2225 7 3 0 0 1044 1 2213 9574 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 idisp
+S 2226 14 5 0 0 0 1 2213 9971 210 400000 0 0 0 559 12 0 0 0 0 0 0 0 0 0 0 0 0 15125 0 582 0 0 0 0 ma30bd
+F 2226 12 2223 2224 2214 2215 2216 2217 2225 2218 2219 2220 2221 2222
+S 2227 6 1 0 0 6 1 2213 12271 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_974
+S 2228 6 1 0 0 6 1 2213 12279 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_976
+S 2229 23 5 0 0 0 2243 582 9978 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ma30cd
+S 2230 7 3 0 0 1062 1 2229 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2231 6 3 0 0 6 1 2229 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2232 7 3 0 0 1086 1 2229 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2233 7 3 0 0 1089 1 2229 12007 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenrl
+S 2234 7 3 0 0 1083 1 2229 12013 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenoff
+S 2235 7 3 0 0 1077 1 2229 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2236 7 3 0 0 1080 1 2229 12023 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iq
+S 2237 7 3 0 0 1068 1 2229 11458 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 2238 7 3 0 0 1065 1 2229 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2239 1 3 0 0 6 1 2229 12077 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mtype
+S 2240 6 3 0 0 6 1 2229 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2241 7 3 0 0 1071 1 2229 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2242 7 3 0 0 1074 1 2229 9574 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 idisp
+S 2243 14 5 0 0 0 1 2229 9978 210 400000 0 0 0 572 13 0 0 0 0 0 0 0 0 0 0 0 0 15303 0 582 0 0 0 0 ma30cd
+F 2243 13 2240 2241 2230 2231 2232 2233 2234 2242 2235 2236 2237 2238 2239
+S 2244 6 1 0 0 6 1 2229 12287 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_978
+S 2245 6 1 0 0 6 1 2229 12295 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_980
+S 2246 23 5 0 0 0 2256 582 12303 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc13d
+S 2247 6 3 0 0 6 1 2246 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2248 7 3 0 0 1101 1 2246 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2249 7 3 0 0 1107 1 2246 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2250 7 3 0 0 1098 1 2246 2288 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ior
+S 2251 7 3 0 0 1092 1 2246 12309 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ib
+S 2252 7 3 0 0 1104 1 2246 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2253 6 3 0 0 6 1 2246 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2254 7 3 0 0 1095 1 2246 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2255 1 3 0 0 6 1 2246 7011 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 num
+S 2256 14 5 0 0 0 1 2246 12303 200 400000 0 0 0 586 9 0 0 0 0 0 0 0 0 0 0 0 0 15744 0 582 0 0 0 0 mc13d
+F 2256 9 2253 2254 2247 2248 2249 2250 2251 2255 2252
+S 2257 6 1 0 0 6 1 2246 12312 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_982
+S 2258 6 1 0 0 6 1 2246 12320 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_984
+S 2259 6 1 0 0 6 1 2246 12328 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_986
+S 2260 6 1 0 0 6 1 2246 12336 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_988
+S 2261 23 5 0 0 0 2273 582 9992 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc13e
+S 2262 6 3 0 0 6 1 2261 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2263 7 3 0 0 1119 1 2261 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2264 7 3 0 0 1122 1 2261 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2265 7 3 0 0 1110 1 2261 12344 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 arp
+S 2266 7 3 0 0 1113 1 2261 12309 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ib
+S 2267 7 3 0 0 1125 1 2261 12348 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lowl
+S 2268 7 3 0 0 1128 1 2261 12353 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numb
+S 2269 7 3 0 0 1131 1 2261 12358 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 prev
+S 2270 6 3 0 0 6 1 2261 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2271 7 3 0 0 1116 1 2261 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2272 1 3 0 0 6 1 2261 7011 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 num
+S 2273 14 5 0 0 0 1 2261 9992 210 400000 0 0 0 596 11 0 0 0 0 0 0 0 0 0 0 0 0 15762 0 582 0 0 0 0 mc13e
+F 2273 11 2270 2271 2262 2263 2264 2265 2266 2272 2267 2268 2269
+S 2274 6 1 0 0 6 1 2261 12336 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_988
+S 2275 6 1 0 0 6 1 2261 12363 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_990
+S 2276 23 5 0 0 0 2284 582 10005 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc20ad
+S 2277 6 3 0 0 6 1 2276 12371 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nc
+S 2278 6 3 0 0 6 1 2276 12374 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxa
+S 2279 7 3 0 0 1134 1 2276 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2280 7 3 0 0 1137 1 2276 12379 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 inum
+S 2281 7 3 0 0 1143 1 2276 12384 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jptr
+S 2282 7 3 0 0 1140 1 2276 12389 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jnum
+S 2283 1 3 0 0 6 1 2276 12394 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jdisp
+S 2284 14 5 0 0 0 1 2276 10005 210 400000 0 0 0 608 7 0 0 0 0 0 0 0 0 0 0 0 0 15898 0 582 0 0 0 0 mc20ad
+F 2284 7 2277 2278 2279 2280 2281 2282 2283
+S 2285 6 1 0 0 6 1 2276 12400 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_992
+S 2286 6 1 0 0 6 1 2276 12408 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_994
+S 2287 23 5 0 0 0 2293 582 10012 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc20bd
+S 2288 6 3 0 0 6 1 2287 12371 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nc
+S 2289 6 3 0 0 6 1 2287 12374 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxa
+S 2290 7 3 0 0 1146 1 2287 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2291 7 3 0 0 1149 1 2287 12379 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 inum
+S 2292 7 3 0 0 1152 1 2287 12384 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jptr
+S 2293 14 5 0 0 0 1 2287 10012 210 400000 0 0 0 616 5 0 0 0 0 0 0 0 0 0 0 0 0 15977 0 582 0 0 0 0 mc20bd
+F 2293 5 2288 2289 2290 2291 2292
+S 2294 6 1 0 0 6 1 2287 12416 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_996
+S 2295 6 1 0 0 6 1 2287 12424 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_998
+S 2296 23 5 0 0 0 2305 582 10019 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc21a
+S 2297 6 3 0 0 6 1 2296 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2298 7 3 0 0 1158 1 2296 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2299 7 3 0 0 1167 1 2296 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2300 7 3 0 0 1161 1 2296 12432 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iperm
+S 2301 7 3 0 0 1164 1 2296 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2302 6 3 0 0 6 1 2296 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2303 7 3 0 0 1155 1 2296 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2304 1 3 0 0 6 1 2296 7015 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numnz
+S 2305 14 5 0 0 0 1 2296 10019 210 400000 0 0 0 622 8 0 0 0 0 0 0 0 0 0 0 0 0 16026 0 582 0 0 0 0 mc21a
+F 2305 8 2302 2303 2297 2298 2299 2300 2304 2301
+S 2306 6 1 0 0 6 1 2296 12438 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1000
+S 2307 6 1 0 0 6 1 2296 12447 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1002
+S 2308 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 2309 6 1 0 0 6 1 2296 12456 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1005
+S 2310 6 1 0 0 6 1 2296 12465 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1007
+S 2311 23 5 0 0 0 2323 582 10025 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc21b
+S 2312 6 3 0 0 6 1 2311 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2313 7 3 0 0 1179 1 2311 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2314 7 3 0 0 1185 1 2311 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2315 7 3 0 0 1182 1 2311 12432 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iperm
+S 2316 7 3 0 0 1191 1 2311 12474 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pr
+S 2317 7 3 0 0 1170 1 2311 12344 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 arp
+S 2318 7 3 0 0 1173 1 2311 12477 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cv
+S 2319 7 3 0 0 1188 1 2311 12480 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 out
+S 2320 6 3 0 0 6 1 2311 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2321 7 3 0 0 1176 1 2311 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2322 1 3 0 0 6 1 2311 7015 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numnz
+S 2323 14 5 0 0 0 1 2311 10025 210 400000 0 0 0 631 11 0 0 0 0 0 0 0 0 0 0 0 0 16045 0 582 0 0 0 0 mc21b
+F 2323 11 2320 2321 2312 2313 2314 2315 2322 2316 2317 2318 2319
+S 2324 6 1 0 0 6 1 2311 12465 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1007
+S 2325 6 1 0 0 6 1 2311 12484 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1009
+S 2326 23 5 0 0 0 2336 582 10031 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc22ad
+S 2327 7 3 0 0 1194 1 2326 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2328 6 3 0 0 6 1 2326 11880 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nz
+S 2329 7 3 0 0 1212 1 2326 12493 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenrow
+S 2330 7 3 0 0 1200 1 2326 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2331 7 3 0 0 1203 1 2326 12023 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iq
+S 2332 7 3 0 0 1206 1 2326 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2333 7 3 0 0 1209 1 2326 12026 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw1
+S 2334 6 3 0 0 6 1 2326 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2335 7 3 0 0 1197 1 2326 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2336 14 5 0 0 0 1 2326 10031 210 400000 0 0 0 643 9 0 0 0 0 0 0 0 0 0 0 0 0 16170 0 582 0 0 0 0 mc22ad
+F 2336 9 2334 2335 2327 2328 2329 2330 2331 2332 2333
+S 2337 6 1 0 0 6 1 2326 12500 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1011
+S 2338 6 1 0 0 6 1 2326 12509 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1013
+S 2339 6 1 0 0 6 1 2326 12518 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1015
+S 2340 6 1 0 0 6 1 2326 12527 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1017
+S 2341 23 5 0 0 0 2353 582 10038 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc23ad
+S 2342 7 3 0 0 1215 1 2341 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2343 6 3 0 0 6 1 2341 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2344 7 3 0 0 1239 1 2341 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2345 7 3 0 0 1224 1 2341 12020 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ip
+S 2346 7 3 0 0 1227 1 2341 12023 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iq
+S 2347 7 3 0 0 1236 1 2341 12013 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenoff
+S 2348 7 3 0 0 1230 1 2341 11905 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw
+S 2349 7 3 0 0 1233 1 2341 12026 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iw1
+S 2350 6 3 0 0 6 1 2341 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2351 7 3 0 0 1218 1 2341 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2352 7 3 0 0 1221 1 2341 9574 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 idisp
+S 2353 14 5 0 0 0 1 2341 10038 210 400000 0 0 0 653 11 0 0 0 0 0 0 0 0 0 0 0 0 16266 0 582 0 0 0 0 mc23ad
+F 2353 11 2350 2351 2342 2343 2344 2352 2345 2346 2347 2348 2349
+S 2354 6 1 0 0 6 1 2341 12527 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1017
+S 2355 6 1 0 0 6 1 2341 12536 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1019
+S 2356 6 1 0 0 6 1 2341 12545 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1021
+S 2357 6 1 0 0 6 1 2341 12554 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1023
+S 2358 6 1 0 0 6 1 2341 12563 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1025
+S 2359 23 5 0 0 0 2367 582 10045 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc24ad
+S 2360 7 3 0 0 1242 1 2359 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2361 6 3 0 0 6 1 2359 11883 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 licn
+S 2362 7 3 0 0 1251 1 2359 12002 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenr
+S 2363 7 3 0 0 1254 1 2359 12007 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lenrl
+S 2364 7 3 0 0 1245 1 2359 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2365 6 3 0 0 6 1 2359 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2366 7 3 0 0 1248 1 2359 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2367 14 5 0 0 0 1 2359 10045 210 400000 0 0 0 665 7 0 0 0 0 0 0 0 0 0 0 0 0 16480 0 582 0 0 0 0 mc24ad
+F 2367 7 2365 2366 2360 2361 2362 2363 2364
+S 2368 6 1 0 0 6 1 2359 12572 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1024
+S 2369 6 1 0 0 6 1 2359 12581 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1026
+S 2370 23 5 0 0 0 2379 582 9998 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mc19ad
+S 2371 6 3 0 0 6 1 2370 12590 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 na
+S 2372 7 3 0 0 1257 1 2370 11386 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a
+S 2373 7 3 0 0 1272 1 2370 11888 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 irn
+S 2374 7 3 0 0 1263 1 2370 12134 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 r
+S 2375 7 3 0 0 1260 1 2370 12593 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c
+S 2376 7 3 0 0 1266 1 2370 11495 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 w
+S 2377 6 3 0 0 6 1 2370 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2378 7 3 0 0 1269 1 2370 8860 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 icn
+S 2379 14 5 0 0 0 1 2370 9998 210 400000 0 0 0 673 8 0 0 0 0 0 0 0 0 0 0 0 0 16535 0 582 0 0 0 0 mc19ad
+F 2379 8 2377 2371 2372 2373 2378 2374 2375 2376
+S 2380 6 1 0 0 6 1 2370 12595 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1028
+S 2381 6 1 0 0 6 1 2370 12604 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1030
+S 2382 6 1 0 0 6 1 2370 12613 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1032
+S 2383 6 1 0 0 6 1 2370 12622 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1034
+S 2384 23 5 0 0 0 2403 582 6029 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jacsp
+S 2385 14 3 0 0 8 1 2384 12631 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fcn
+S 2386 1 3 0 0 9 1 2384 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 2387 7 3 0 0 1287 1 2384 10226 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 2388 7 3 0 0 1275 1 2384 10220 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 2389 7 3 0 0 1281 1 2384 12635 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fjac
+S 2390 6 3 0 0 6 1 2384 12640 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrfjac
+S 2391 7 3 0 0 1290 1 2384 12647 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yscale
+S 2392 7 3 0 0 1278 1 2384 12654 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fac
+S 2393 7 3 0 0 1284 1 2384 12658 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wk
+S 2394 6 3 0 0 6 1 2384 12661 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lwk
+S 2395 7 3 0 0 1299 1 2384 12665 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwk
+S 2396 6 3 0 0 6 1 2384 12669 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 liwk
+S 2397 1 3 0 0 6 1 2384 12674 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxgrp
+S 2398 7 3 0 0 1305 1 2384 11607 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrp
+S 2399 7 3 0 0 1302 1 2384 12681 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2400 7 3 0 0 1293 1 2384 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2401 6 3 0 0 6 1 2384 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2402 7 3 0 0 1296 1 2384 6167 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iopt
+S 2403 14 5 0 0 0 1 2384 6029 300 400000 0 0 0 682 18 0 0 0 0 0 0 0 0 0 0 0 0 16742 0 582 0 0 0 0 jacsp
+F 2403 18 2385 2401 2386 2387 2388 2389 2390 2391 2392 2402 2393 2394 2395 2396 2397 2398 2399 2400
+S 2404 6 1 0 0 6 1 2384 12694 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1035
+S 2405 6 1 0 0 6 1 2384 12703 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1037
+S 2406 6 1 0 0 6 1 2384 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2407 6 1 0 0 6 1 2384 12712 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1040
+S 2408 6 1 0 0 6 1 2384 12721 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1042
+S 2409 6 1 0 0 6 1 2384 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2410 6 1 0 0 6 1 2384 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2411 6 1 0 0 6 1 2384 12730 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1046
+S 2412 6 1 0 0 6 1 2384 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+S 2413 23 5 0 0 0 2421 582 10080 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 degr
+S 2414 7 3 0 0 1311 1 2413 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2415 7 3 0 0 1320 1 2413 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2416 7 3 0 0 1308 1 2413 12739 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2417 7 3 0 0 1314 1 2413 12746 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipntr
+S 2418 7 3 0 0 1323 1 2413 12752 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ndeg
+S 2419 7 3 0 0 1317 1 2413 12757 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa
+S 2420 6 3 0 0 6 1 2413 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2421 14 5 0 0 0 1 2413 10080 310 400000 0 0 0 701 7 0 0 0 0 0 0 0 0 0 0 0 0 17321 0 582 0 0 0 0 degr
+F 2421 7 2420 2414 2415 2416 2417 2418 2419
+S 2422 6 1 0 0 6 1 2413 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2423 6 1 0 0 6 1 2413 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2424 6 1 0 0 6 1 2413 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2425 6 1 0 0 6 1 2413 12761 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1050
+S 2426 6 1 0 0 6 1 2413 12770 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1052
+S 2427 23 5 0 0 0 2441 582 10085 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ido
+S 2428 6 3 0 0 6 1 2427 12779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 m
+S 2429 7 3 0 0 1329 1 2427 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2430 7 3 0 0 1347 1 2427 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2431 7 3 0 0 1326 1 2427 12739 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2432 7 3 0 0 1332 1 2427 12746 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipntr
+S 2433 7 3 0 0 1353 1 2427 12752 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ndeg
+S 2434 7 3 0 0 1350 1 2427 12781 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 list
+S 2435 1 3 0 0 6 1 2427 12786 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxclq
+S 2436 7 3 0 0 1335 1 2427 12793 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa1
+S 2437 7 3 0 0 1338 1 2427 12798 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa2
+S 2438 7 3 0 0 1341 1 2427 12803 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa3
+S 2439 7 3 0 0 1344 1 2427 12808 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa4
+S 2440 6 3 0 0 6 1 2427 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2441 14 5 0 0 0 1 2427 10085 310 400000 0 0 0 709 13 0 0 0 0 0 0 0 0 0 0 0 0 17407 0 582 0 0 0 0 ido
+F 2441 13 2428 2440 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439
+S 2442 6 1 0 0 6 1 2427 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2443 6 1 0 0 6 1 2427 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2444 6 1 0 0 6 1 2427 12813 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1057
+S 2445 6 1 0 0 6 1 2427 12822 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1060
+S 2446 6 1 0 0 6 1 2427 12831 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1062
+S 2447 6 1 0 0 6 1 2427 12840 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1059
+S 2448 6 1 0 0 6 1 2427 12849 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1065
+S 2449 23 5 0 0 0 2457 582 10089 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numsrt
+S 2450 6 3 0 0 6 1 2449 12858 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nmax
+S 2451 1 3 0 0 6 1 2449 12863 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mode
+S 2452 7 3 0 0 1356 1 2449 3107 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 index
+S 2453 7 3 0 0 1362 1 2449 12868 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 next
+S 2454 6 3 0 0 6 1 2449 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2455 7 3 0 0 1365 1 2449 7011 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 num
+S 2456 7 3 0 0 1359 1 2449 6650 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 last
+S 2457 14 5 0 0 0 1 2449 10089 210 400000 0 0 0 723 7 0 0 0 0 0 0 0 0 0 0 0 0 17622 0 582 0 0 0 0 numsrt
+F 2457 7 2454 2450 2455 2451 2452 2456 2453
+S 2458 6 1 0 0 6 1 2449 12873 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1066
+S 2459 6 1 0 0 6 1 2449 12882 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1068
+S 2460 6 1 0 0 6 1 2449 12891 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1070
+S 2461 23 5 0 0 0 2471 582 10096 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 seq
+S 2462 7 3 0 0 1371 1 2461 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2463 7 3 0 0 1380 1 2461 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2464 7 3 0 0 1368 1 2461 12739 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2465 7 3 0 0 1374 1 2461 12746 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipntr
+S 2466 7 3 0 0 1383 1 2461 12781 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 list
+S 2467 7 3 0 0 1386 1 2461 11607 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrp
+S 2468 1 3 0 0 6 1 2461 12674 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxgrp
+S 2469 7 3 0 0 1377 1 2461 12757 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa
+S 2470 6 3 0 0 6 1 2461 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2471 14 5 0 0 0 1 2461 10096 310 400000 0 0 0 731 9 0 0 0 0 0 0 0 0 0 0 0 0 17713 0 582 0 0 0 0 seq
+F 2471 9 2470 2462 2463 2464 2465 2466 2467 2468 2469
+S 2472 6 1 0 0 6 1 2461 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2473 6 1 0 0 6 1 2461 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2474 6 1 0 0 6 1 2461 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2475 6 1 0 0 6 1 2461 12900 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1074
+S 2476 6 1 0 0 6 1 2461 12909 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1076
+S 2477 23 5 0 0 0 2485 582 10100 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 setr
+S 2478 6 3 0 0 6 1 2477 12779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 m
+S 2479 7 3 0 0 1392 1 2477 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2480 7 3 0 0 1401 1 2477 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2481 7 3 0 0 1389 1 2477 12739 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2482 7 3 0 0 1395 1 2477 12746 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipntr
+S 2483 7 3 0 0 1398 1 2477 12757 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa
+S 2484 6 3 0 0 6 1 2477 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2485 14 5 0 0 0 1 2477 10100 310 400000 0 0 0 741 7 0 0 0 0 0 0 0 0 0 0 0 0 17817 0 582 0 0 0 0 setr
+F 2485 7 2478 2484 2479 2480 2481 2482 2483
+S 2486 6 1 0 0 6 1 2477 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2487 6 1 0 0 6 1 2477 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2488 6 1 0 0 6 1 2477 12918 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1081
+S 2489 6 1 0 0 6 1 2477 12927 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1080
+S 2490 6 1 0 0 6 1 2477 12936 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1085
+S 2491 23 5 0 0 0 2504 582 10105 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 slo
+S 2492 7 3 0 0 1407 1 2491 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2493 7 3 0 0 1425 1 2491 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2494 7 3 0 0 1404 1 2491 12739 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2495 7 3 0 0 1410 1 2491 12746 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipntr
+S 2496 7 3 0 0 1431 1 2491 12752 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ndeg
+S 2497 7 3 0 0 1428 1 2491 12781 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 list
+S 2498 1 3 0 0 6 1 2491 12786 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxclq
+S 2499 7 3 0 0 1413 1 2491 12793 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa1
+S 2500 7 3 0 0 1416 1 2491 12798 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa2
+S 2501 7 3 0 0 1419 1 2491 12803 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa3
+S 2502 7 3 0 0 1422 1 2491 12808 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa4
+S 2503 6 3 0 0 6 1 2491 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2504 14 5 0 0 0 1 2491 10105 310 400000 0 0 0 749 12 0 0 0 0 0 0 0 0 0 0 0 0 17891 0 582 0 0 0 0 slo
+F 2504 12 2503 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502
+S 2505 6 1 0 0 6 1 2491 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2506 6 1 0 0 6 1 2491 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2507 6 1 0 0 6 1 2491 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2508 6 1 0 0 6 1 2491 12945 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1091
+S 2509 6 1 0 0 6 1 2491 12954 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1093
+S 2510 6 1 0 0 6 1 2491 12963 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1090
+S 2511 6 1 0 0 6 1 2491 12972 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1096
+S 2512 23 5 0 0 0 2519 582 10109 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 srtdat
+S 2513 7 3 0 0 1437 1 2512 12687 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2514 7 3 0 0 1434 1 2512 12739 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2515 7 3 0 0 1443 1 2512 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2516 7 3 0 0 1440 1 2512 12757 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa
+S 2517 6 3 0 0 6 1 2512 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2518 6 3 0 0 6 1 2512 6936 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nnz
+S 2519 14 5 0 0 0 1 2512 10109 210 400000 0 0 0 762 6 0 0 0 0 0 0 0 0 0 0 0 0 18076 0 582 0 0 0 0 srtdat
+F 2519 6 2517 2518 2513 2514 2515 2516
+S 2520 6 1 0 0 6 1 2512 12981 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1097
+S 2521 6 1 0 0 6 1 2512 12990 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1099
+S 2522 6 1 0 0 6 1 2512 12999 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1101
+S 2523 23 5 0 0 0 2534 582 10116 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fdjs
+S 2524 6 3 0 0 6 1 2523 12779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 m
+S 2525 1 3 0 0 16 1 2523 13008 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 col
+S 2526 7 3 0 0 1455 1 2523 13012 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ind
+S 2527 7 3 0 0 1461 1 2523 13016 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 npntr
+S 2528 7 3 0 0 1458 1 2523 11607 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrp
+S 2529 1 3 0 0 6 1 2523 13022 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 numgrp
+S 2530 7 3 0 0 1446 1 2523 13029 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 d
+S 2531 7 3 0 0 1452 1 2523 13031 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fjacd
+S 2532 7 3 0 0 1449 1 2523 12635 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fjac
+S 2533 6 3 0 0 6 1 2523 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2534 14 5 0 0 0 1 2523 10116 310 400000 0 0 0 769 10 0 0 0 0 0 0 0 0 0 0 0 0 18173 0 582 0 0 0 0 fdjs
+F 2534 10 2524 2533 2525 2526 2527 2528 2529 2530 2531 2532
+S 2535 6 1 0 0 6 1 2523 13037 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1104
+S 2536 6 1 0 0 6 1 2523 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2537 6 1 0 0 6 1 2523 13046 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1107
+S 2538 6 1 0 0 6 1 2523 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2539 6 1 0 0 6 1 2523 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2540 23 5 0 0 0 2554 582 6035 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dvdsm
+S 2541 6 3 0 0 6 1 2540 12779 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 m
+S 2542 6 3 0 0 6 1 2540 13055 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 npairs
+S 2543 7 3 0 0 1467 1 2540 12687 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2544 7 3 0 0 1464 1 2540 12739 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indcol
+S 2545 7 3 0 0 1479 1 2540 11607 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrp
+S 2546 1 3 0 0 6 1 2540 12674 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxgrp
+S 2547 1 3 0 0 6 1 2540 13062 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mingrp
+S 2548 1 3 0 0 6 1 2540 11788 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 info
+S 2549 7 3 0 0 1470 1 2540 12746 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ipntr
+S 2550 7 3 0 0 1476 1 2540 12681 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2551 7 3 0 0 1473 1 2540 12757 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwa
+S 2552 6 3 0 0 6 1 2540 13069 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 liwa
+S 2553 6 3 0 0 6 1 2540 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2554 14 5 0 0 0 1 2540 6035 200 400000 0 0 0 780 13 0 0 0 0 0 0 0 0 0 0 0 0 18300 0 582 0 0 0 0 dvdsm
+F 2554 13 2541 2553 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552
+S 2555 6 1 0 0 6 1 2540 13074 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1110
+S 2556 6 1 0 0 6 1 2540 13083 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1113
+S 2557 6 1 0 0 6 1 2540 13092 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1115
+S 2558 6 1 0 0 6 1 2540 13101 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1118
+S 2559 6 1 0 0 6 1 2540 13110 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1117
+S 2560 23 5 0 0 0 2566 582 9724 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dgroupds
+S 2561 6 3 1 0 6 1 2560 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2562 6 3 1 0 6 1 2560 4732 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxgrpds
+S 2563 7 3 1 0 1482 1 2560 4911 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrpds
+S 2564 7 3 2 0 1485 1 2560 8942 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 igp
+S 2565 7 3 2 0 1488 1 2560 9329 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jgp
+S 2566 14 5 0 0 0 1 2560 9724 210 400000 0 0 0 794 5 0 0 0 0 0 0 0 0 0 0 0 0 18479 0 582 0 0 0 0 dgroupds
+F 2566 5 2561 2562 2563 2564 2565
+S 2567 6 1 0 0 6 1 2560 13119 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1121
+S 2568 6 1 0 0 6 1 2560 13128 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1123
+S 2569 6 1 0 0 6 1 2560 13137 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1125
+S 2570 23 5 0 0 0 2589 582 9914 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jacspdb
+S 2571 14 3 0 0 8 1 2570 12631 10000 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fcn
+S 2572 1 3 0 0 9 1 2570 10228 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 2573 7 3 0 0 1503 1 2570 10226 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 2574 7 3 0 0 1491 1 2570 10220 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 f
+S 2575 7 3 0 0 1497 1 2570 12635 800304 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fjac
+S 2576 6 3 0 0 6 1 2570 12640 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrfjac
+S 2577 7 3 0 0 1506 1 2570 12647 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yscale
+S 2578 7 3 0 0 1494 1 2570 12654 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fac
+S 2579 7 3 0 0 1500 1 2570 12658 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 wk
+S 2580 6 3 0 0 6 1 2570 12661 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lwk
+S 2581 7 3 0 0 1515 1 2570 12665 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iwk
+S 2582 6 3 0 0 6 1 2570 12669 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 liwk
+S 2583 1 3 0 0 6 1 2570 12674 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 maxgrp
+S 2584 7 3 0 0 1521 1 2570 11607 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ngrp
+S 2585 7 3 0 0 1518 1 2570 12681 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jpntr
+S 2586 7 3 0 0 1509 1 2570 12687 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 indrow
+S 2587 6 3 0 0 6 1 2570 6855 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n
+S 2588 7 3 0 0 1512 1 2570 6167 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 iopt
+S 2589 14 5 0 0 0 1 2570 9914 310 400000 0 0 0 800 18 0 0 0 0 0 0 0 0 0 0 0 0 18527 0 582 0 0 0 0 jacspdb
+F 2589 18 2571 2587 2572 2573 2574 2575 2576 2577 2578 2588 2579 2580 2581 2582 2583 2584 2585 2586
+S 2590 6 1 0 0 6 1 2570 13146 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1128
+S 2591 6 1 0 0 6 1 2570 13155 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1130
+S 2592 6 1 0 0 6 1 2570 10265 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0_1
+S 2593 6 1 0 0 6 1 2570 13164 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1133
+S 2594 6 1 0 0 6 1 2570 13173 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1135
+S 2595 6 1 0 0 6 1 2570 10332 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1_1
+S 2596 6 1 0 0 6 1 2570 10494 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2_1
+S 2597 6 1 0 0 6 1 2570 13182 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_1139
+S 2598 6 1 0 0 6 1 2570 10502 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3_1
+A 12 2 0 0 0 9 578 0 0 0 12 0 0 0 0 0 0 0 0 0
+A 13 2 0 0 0 6 584 0 0 0 13 0 0 0 0 0 0 0 0 0
+A 16 2 0 0 0 6 597 0 0 0 16 0 0 0 0 0 0 0 0 0
+A 17 2 0 0 0 6 602 0 0 0 17 0 0 0 0 0 0 0 0 0
+A 18 1 0 1 0 36 598 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 19 10 0 0 0 6 18 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 20 2 0 0 0 6 603 0 0 0 20 0 0 0 0 0 0 0 0 0
+A 21 10 0 0 19 6 18 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 22 4 0 0 0 6 21 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 23 4 0 0 7 6 19 0 22 0 0 0 0 1 0 0 0 0 0 0
+A 24 2 0 0 0 6 604 0 0 0 24 0 0 0 0 0 0 0 0 0
+A 25 10 0 0 21 6 18 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 26 2 0 0 0 6 605 0 0 0 26 0 0 0 0 0 0 0 0 0
+A 27 10 0 0 25 6 18 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 28 10 0 0 27 6 18 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 30 1 0 1 0 42 608 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 31 10 0 0 0 6 30 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 32 10 0 0 31 6 30 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 33 4 0 0 0 6 32 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 34 4 0 0 0 6 31 0 33 0 0 0 0 1 0 0 0 0 0 0
+A 35 10 0 0 32 6 30 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 36 10 0 0 35 6 30 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 37 10 0 0 36 6 30 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 39 1 0 1 0 48 614 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 40 10 0 0 0 6 39 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 41 10 0 0 40 6 39 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 42 4 0 0 0 6 41 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 43 4 0 0 0 6 40 0 42 0 0 0 0 1 0 0 0 0 0 0
+A 44 10 0 0 41 6 39 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 45 10 0 0 44 6 39 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 46 10 0 0 45 6 39 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 48 1 0 1 0 54 620 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 49 10 0 0 0 6 48 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 50 10 0 0 49 6 48 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 51 4 0 0 0 6 50 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 52 4 0 0 0 6 49 0 51 0 0 0 0 1 0 0 0 0 0 0
+A 53 10 0 0 50 6 48 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 54 10 0 0 53 6 48 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 55 10 0 0 54 6 48 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 57 1 0 1 0 60 626 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 58 10 0 0 0 6 57 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 59 10 0 0 58 6 57 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 60 4 0 0 0 6 59 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 61 4 0 0 0 6 58 0 60 0 0 0 0 1 0 0 0 0 0 0
+A 62 10 0 0 59 6 57 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 63 10 0 0 62 6 57 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 64 10 0 0 63 6 57 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 66 1 0 1 0 66 632 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 67 10 0 0 0 6 66 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 68 10 0 0 67 6 66 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 69 4 0 0 0 6 68 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 70 4 0 0 0 6 67 0 69 0 0 0 0 1 0 0 0 0 0 0
+A 71 10 0 0 68 6 66 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 72 10 0 0 71 6 66 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 73 10 0 0 72 6 66 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 75 1 0 1 14 72 638 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 76 10 0 0 0 6 75 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 77 10 0 0 76 6 75 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 78 4 0 0 0 6 77 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 79 4 0 0 0 6 76 0 78 0 0 0 0 1 0 0 0 0 0 0
+A 80 10 0 0 77 6 75 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 81 10 0 0 80 6 75 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 82 10 0 0 81 6 75 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 84 1 0 1 0 78 644 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 85 10 0 0 84 6 84 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 86 10 0 0 85 6 84 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 87 4 0 0 0 6 86 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 88 4 0 0 0 6 85 0 87 0 0 0 0 1 0 0 0 0 0 0
+A 89 10 0 0 86 6 84 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 90 10 0 0 89 6 84 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 91 10 0 0 90 6 84 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 93 1 0 1 0 84 650 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 94 10 0 0 0 6 93 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 95 10 0 0 94 6 93 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 96 4 0 0 13 6 95 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 97 4 0 0 0 6 94 0 96 0 0 0 0 1 0 0 0 0 0 0
+A 98 10 0 0 95 6 93 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 99 10 0 0 98 6 93 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 100 10 0 0 99 6 93 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 102 1 0 1 0 90 656 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 103 10 0 0 29 6 102 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 104 10 0 0 103 6 102 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 105 4 0 0 0 6 104 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 106 4 0 0 60 6 103 0 105 0 0 0 0 1 0 0 0 0 0 0
+A 107 10 0 0 104 6 102 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 108 10 0 0 107 6 102 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 109 10 0 0 108 6 102 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 111 1 0 1 0 96 662 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 112 10 0 0 0 6 111 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 113 10 0 0 112 6 111 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 114 4 0 0 17 6 113 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 115 4 0 0 0 6 112 0 114 0 0 0 0 1 0 0 0 0 0 0
+A 116 10 0 0 113 6 111 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 117 10 0 0 116 6 111 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 118 10 0 0 117 6 111 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 119 2 0 0 0 16 669 0 0 0 119 0 0 0 0 0 0 0 0 0
+A 121 2 0 0 0 6 671 0 0 0 121 0 0 0 0 0 0 0 0 0
+A 123 2 0 0 0 6 673 0 0 0 123 0 0 0 0 0 0 0 0 0
+A 124 2 0 0 0 6 674 0 0 0 124 0 0 0 0 0 0 0 0 0
+A 127 2 0 0 0 6 677 0 0 0 127 0 0 0 0 0 0 0 0 0
+A 129 2 0 0 0 6 679 0 0 0 129 0 0 0 0 0 0 0 0 0
+A 132 2 0 0 0 6 682 0 0 0 132 0 0 0 0 0 0 0 0 0
+A 135 2 0 0 0 6 685 0 0 0 135 0 0 0 0 0 0 0 0 0
+A 137 2 0 0 0 6 687 0 0 0 137 0 0 0 0 0 0 0 0 0
+A 140 2 0 0 0 6 690 0 0 0 140 0 0 0 0 0 0 0 0 0
+A 142 2 0 0 0 6 692 0 0 0 142 0 0 0 0 0 0 0 0 0
+A 144 2 0 0 0 6 694 0 0 0 144 0 0 0 0 0 0 0 0 0
+A 147 2 0 0 0 6 697 0 0 0 147 0 0 0 0 0 0 0 0 0
+A 149 2 0 0 0 9 699 0 0 0 149 0 0 0 0 0 0 0 0 0
+A 151 2 0 0 0 9 701 0 0 0 151 0 0 0 0 0 0 0 0 0
+A 154 2 0 0 0 9 704 0 0 0 154 0 0 0 0 0 0 0 0 0
+A 156 2 0 0 0 9 706 0 0 0 156 0 0 0 0 0 0 0 0 0
+A 158 2 0 0 0 9 708 0 0 0 158 0 0 0 0 0 0 0 0 0
+A 161 2 0 0 0 9 711 0 0 0 161 0 0 0 0 0 0 0 0 0
+A 164 2 0 0 0 9 714 0 0 0 164 0 0 0 0 0 0 0 0 0
+A 168 2 0 0 0 9 718 0 0 0 168 0 0 0 0 0 0 0 0 0
+A 170 2 0 0 30 9 720 0 0 0 170 0 0 0 0 0 0 0 0 0
+A 172 2 0 0 0 9 722 0 0 0 172 0 0 0 0 0 0 0 0 0
+A 174 2 0 0 0 9 580 0 0 0 174 0 0 0 0 0 0 0 0 0
+A 176 2 0 0 0 9 725 0 0 0 176 0 0 0 0 0 0 0 0 0
+A 178 2 0 0 0 9 727 0 0 0 178 0 0 0 0 0 0 0 0 0
+A 181 2 0 0 0 9 730 0 0 0 181 0 0 0 0 0 0 0 0 0
+A 185 2 0 0 143 9 579 0 0 0 185 0 0 0 0 0 0 0 0 0
+A 190 2 0 0 0 9 738 0 0 0 190 0 0 0 0 0 0 0 0 0
+A 192 2 0 0 0 9 740 0 0 0 192 0 0 0 0 0 0 0 0 0
+A 195 2 0 0 141 9 577 0 0 0 195 0 0 0 0 0 0 0 0 0
+A 198 1 0 1 0 108 756 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 199 10 0 0 155 6 198 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 200 10 0 0 199 6 198 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 201 4 0 0 0 6 200 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 202 4 0 0 0 6 199 0 201 0 0 0 0 1 0 0 0 0 0 0
+A 203 10 0 0 200 6 198 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 204 10 0 0 203 6 198 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 205 10 0 0 204 6 198 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 207 1 0 1 0 114 762 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 208 10 0 0 163 6 207 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 209 10 0 0 208 6 207 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 210 4 0 0 0 6 209 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 211 4 0 0 93 6 208 0 210 0 0 0 0 1 0 0 0 0 0 0
+A 212 10 0 0 209 6 207 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 213 10 0 0 212 6 207 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 214 10 0 0 213 6 207 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 216 1 0 1 0 120 968 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 217 10 0 0 173 6 216 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 218 10 0 0 217 6 216 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 219 4 0 0 207 6 218 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 220 4 0 0 0 6 217 0 219 0 0 0 0 1 0 0 0 0 0 0
+A 221 10 0 0 218 6 216 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 222 10 0 0 221 6 216 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 223 10 0 0 222 6 216 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 225 1 0 1 0 126 974 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 226 10 0 0 0 6 225 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 227 10 0 0 226 6 225 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 228 4 0 0 0 6 227 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 229 4 0 0 0 6 226 0 228 0 0 0 0 1 0 0 0 0 0 0
+A 230 10 0 0 227 6 225 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 231 10 0 0 230 6 225 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 232 10 0 0 231 6 225 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 234 1 0 1 0 132 980 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 235 10 0 0 193 6 234 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 236 10 0 0 235 6 234 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 237 4 0 0 176 6 236 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 238 4 0 0 0 6 235 0 237 0 0 0 0 1 0 0 0 0 0 0
+A 239 10 0 0 236 6 234 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 240 10 0 0 239 6 234 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 241 10 0 0 240 6 234 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 243 1 0 1 0 138 986 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 244 10 0 0 0 6 243 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 245 10 0 0 244 6 243 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 246 4 0 0 0 6 245 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 247 4 0 0 133 6 244 0 246 0 0 0 0 1 0 0 0 0 0 0
+A 248 10 0 0 245 6 243 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 249 10 0 0 248 6 243 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 250 10 0 0 249 6 243 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 252 1 0 1 0 144 992 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 253 10 0 0 0 6 252 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 254 10 0 0 253 6 252 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 255 4 0 0 0 6 254 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 256 4 0 0 0 6 253 0 255 0 0 0 0 1 0 0 0 0 0 0
+A 257 10 0 0 254 6 252 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 258 10 0 0 257 6 252 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 259 10 0 0 258 6 252 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 261 1 0 1 0 150 998 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 262 10 0 0 0 6 261 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 263 10 0 0 262 6 261 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 264 4 0 0 255 6 263 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 265 4 0 0 0 6 262 0 264 0 0 0 0 1 0 0 0 0 0 0
+A 266 10 0 0 263 6 261 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 267 10 0 0 266 6 261 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 268 10 0 0 267 6 261 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 270 1 0 1 0 156 1004 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 271 10 0 0 0 6 270 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 272 10 0 0 271 6 270 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 273 4 0 0 0 6 272 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 274 4 0 0 0 6 271 0 273 0 0 0 0 1 0 0 0 0 0 0
+A 275 10 0 0 272 6 270 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 276 10 0 0 275 6 270 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 277 10 0 0 276 6 270 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 279 1 0 1 0 162 1010 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 280 10 0 0 220 6 279 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 281 10 0 0 280 6 279 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 282 4 0 0 0 6 281 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 283 4 0 0 0 6 280 0 282 0 0 0 0 1 0 0 0 0 0 0
+A 284 10 0 0 281 6 279 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 285 10 0 0 284 6 279 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 286 10 0 0 285 6 279 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 288 1 0 1 0 168 1016 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 289 10 0 0 0 6 288 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 290 10 0 0 289 6 288 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 291 4 0 0 0 6 290 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 292 4 0 0 0 6 289 0 291 0 0 0 0 1 0 0 0 0 0 0
+A 293 10 0 0 290 6 288 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 294 10 0 0 293 6 288 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 295 10 0 0 294 6 288 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 297 1 0 1 33 174 1022 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 298 10 0 0 140 6 297 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 299 10 0 0 298 6 297 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 300 4 0 0 0 6 299 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 301 4 0 0 0 6 298 0 300 0 0 0 0 1 0 0 0 0 0 0
+A 302 10 0 0 299 6 297 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 303 10 0 0 302 6 297 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 304 10 0 0 303 6 297 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 306 1 0 1 0 180 1028 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 307 10 0 0 149 6 306 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 308 10 0 0 307 6 306 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 309 4 0 0 0 6 308 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 310 4 0 0 34 6 307 0 309 0 0 0 0 1 0 0 0 0 0 0
+A 311 10 0 0 308 6 306 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 312 10 0 0 311 6 306 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 313 10 0 0 312 6 306 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 315 1 0 1 0 186 1034 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 316 10 0 0 158 6 315 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 317 10 0 0 316 6 315 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 318 4 0 0 0 6 317 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 319 4 0 0 0 6 316 0 318 0 0 0 0 1 0 0 0 0 0 0
+A 320 10 0 0 317 6 315 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 321 10 0 0 320 6 315 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 322 10 0 0 321 6 315 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 324 1 0 1 0 192 1040 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 325 10 0 0 0 6 324 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 326 10 0 0 325 6 324 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 327 4 0 0 0 6 326 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 328 4 0 0 52 6 325 0 327 0 0 0 0 1 0 0 0 0 0 0
+A 329 10 0 0 326 6 324 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 330 10 0 0 329 6 324 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 331 10 0 0 330 6 324 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 333 1 0 1 0 198 1046 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 334 10 0 0 0 6 333 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 335 10 0 0 334 6 333 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 336 4 0 0 0 6 335 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 337 4 0 0 0 6 334 0 336 0 0 0 0 1 0 0 0 0 0 0
+A 338 10 0 0 335 6 333 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 339 10 0 0 338 6 333 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 340 10 0 0 339 6 333 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 342 1 0 1 0 204 1052 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 343 10 0 0 9 6 342 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 344 10 0 0 343 6 342 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 345 4 0 0 0 6 344 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 346 4 0 0 70 6 343 0 345 0 0 0 0 1 0 0 0 0 0 0
+A 347 10 0 0 344 6 342 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 348 10 0 0 347 6 342 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 349 10 0 0 348 6 342 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 351 1 0 1 0 210 1058 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 352 10 0 0 0 6 351 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 353 10 0 0 352 6 351 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 354 4 0 0 0 6 353 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 355 4 0 0 0 6 352 0 354 0 0 0 0 1 0 0 0 0 0 0
+A 356 10 0 0 353 6 351 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 357 10 0 0 356 6 351 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 358 10 0 0 357 6 351 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 360 1 0 1 0 216 1064 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 361 10 0 0 0 6 360 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 362 10 0 0 361 6 360 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 363 4 0 0 0 6 362 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 364 4 0 0 88 6 361 0 363 0 0 0 0 1 0 0 0 0 0 0
+A 365 10 0 0 362 6 360 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 366 10 0 0 365 6 360 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 367 10 0 0 366 6 360 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 369 1 0 1 295 222 1070 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 370 10 0 0 0 6 369 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 371 10 0 0 370 6 369 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 372 4 0 0 0 6 371 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 373 4 0 0 0 6 370 0 372 0 0 0 0 1 0 0 0 0 0 0
+A 374 10 0 0 371 6 369 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 375 10 0 0 374 6 369 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 376 10 0 0 375 6 369 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 379 2 0 0 138 6 1077 0 0 0 379 0 0 0 0 0 0 0 0 0
+A 380 1 0 3 0 228 1078 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 381 10 0 0 0 6 380 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 382 10 0 0 381 6 380 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 383 4 0 0 0 6 382 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 384 4 0 0 0 6 381 0 383 0 0 0 0 1 0 0 0 0 0 0
+A 385 2 0 0 185 6 1082 0 0 0 385 0 0 0 0 0 0 0 0 0
+A 386 10 0 0 382 6 380 16 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 385
+A 387 10 0 0 386 6 380 19 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 142
+A 388 4 0 0 233 6 387 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 389 4 0 0 0 6 386 0 388 0 0 0 0 1 0 0 0 0 0 0
+A 390 10 0 0 387 6 380 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 391 2 0 0 174 6 1083 0 0 0 391 0 0 0 0 0 0 0 0 0
+A 392 10 0 0 390 6 380 22 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 391
+A 393 10 0 0 392 6 380 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 394 10 0 0 393 6 380 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 396 1 0 1 42 234 1086 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 397 10 0 0 0 6 396 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 398 10 0 0 397 6 396 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 399 4 0 0 0 6 398 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 400 4 0 0 0 6 397 0 399 0 0 0 0 1 0 0 0 0 0 0
+A 401 10 0 0 398 6 396 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 402 10 0 0 401 6 396 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 403 10 0 0 402 6 396 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 405 1 0 1 323 240 1092 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 406 10 0 0 0 6 405 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 407 10 0 0 406 6 405 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 408 4 0 0 0 6 407 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 409 4 0 0 368 6 406 0 408 0 0 0 0 1 0 0 0 0 0 0
+A 410 10 0 0 407 6 405 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 411 10 0 0 410 6 405 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 412 10 0 0 411 6 405 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 414 1 0 1 332 246 1098 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 415 10 0 0 0 6 414 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 416 10 0 0 415 6 414 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 417 4 0 0 0 6 416 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 418 4 0 0 0 6 415 0 417 0 0 0 0 1 0 0 0 0 0 0
+A 419 10 0 0 416 6 414 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 420 10 0 0 419 6 414 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 421 10 0 0 420 6 414 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 423 1 0 1 341 252 1104 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 424 10 0 0 0 6 423 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 425 10 0 0 424 6 423 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 426 4 0 0 0 6 425 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 427 4 0 0 0 6 424 0 426 0 0 0 0 1 0 0 0 0 0 0
+A 428 10 0 0 425 6 423 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 429 10 0 0 428 6 423 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 430 10 0 0 429 6 423 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 432 1 0 1 0 258 1110 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 433 10 0 0 0 6 432 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 434 10 0 0 433 6 432 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 435 4 0 0 28 6 434 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 436 4 0 0 23 6 433 0 435 0 0 0 0 1 0 0 0 0 0 0
+A 437 10 0 0 434 6 432 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 438 10 0 0 437 6 432 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 439 10 0 0 438 6 432 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 441 1 0 1 0 264 1116 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 442 10 0 0 0 6 441 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 443 10 0 0 442 6 441 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 444 4 0 0 0 6 443 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 445 4 0 0 0 6 442 0 444 0 0 0 0 1 0 0 0 0 0 0
+A 446 10 0 0 443 6 441 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 447 10 0 0 446 6 441 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 448 10 0 0 447 6 441 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 449 2 0 0 186 6 1124 0 0 0 449 0 0 0 0 0 0 0 0 0
+A 451 1 0 1 0 282 1127 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 452 10 0 0 0 6 451 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 453 10 0 0 452 6 451 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 454 4 0 0 414 6 453 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 455 4 0 0 219 6 452 0 454 0 0 0 0 1 0 0 0 0 0 0
+A 456 10 0 0 453 6 451 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 457 10 0 0 456 6 451 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 458 10 0 0 457 6 451 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 460 1 0 1 380 288 1133 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 461 10 0 0 346 6 460 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 462 10 0 0 461 6 460 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 463 4 0 0 0 6 462 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 464 4 0 0 0 6 461 0 463 0 0 0 0 1 0 0 0 0 0 0
+A 465 10 0 0 462 6 460 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 466 10 0 0 465 6 460 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 467 10 0 0 466 6 460 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 469 1 0 1 0 294 1139 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 470 10 0 0 383 6 469 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 471 10 0 0 470 6 469 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 472 4 0 0 359 6 471 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 473 4 0 0 327 6 470 0 472 0 0 0 0 1 0 0 0 0 0 0
+A 474 10 0 0 471 6 469 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 475 10 0 0 474 6 469 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 476 10 0 0 475 6 469 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 478 1 0 1 0 300 1145 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 479 10 0 0 0 6 478 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 480 10 0 0 479 6 478 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 481 4 0 0 274 6 480 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 482 4 0 0 159 6 479 0 481 0 0 0 0 1 0 0 0 0 0 0
+A 483 10 0 0 480 6 478 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 484 10 0 0 483 6 478 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 485 10 0 0 484 6 478 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 487 1 0 1 0 306 1151 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 488 10 0 0 102 6 487 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 489 10 0 0 488 6 487 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 490 4 0 0 0 6 489 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 491 4 0 0 426 6 488 0 490 0 0 0 0 1 0 0 0 0 0 0
+A 492 10 0 0 489 6 487 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 493 10 0 0 492 6 487 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 494 10 0 0 493 6 487 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 496 1 0 1 0 312 1157 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 497 10 0 0 0 6 496 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 498 10 0 0 497 6 496 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 499 4 0 0 0 6 498 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 500 4 0 0 144 6 497 0 499 0 0 0 0 1 0 0 0 0 0 0
+A 501 10 0 0 498 6 496 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 502 10 0 0 501 6 496 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 503 10 0 0 502 6 496 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 505 1 0 1 0 318 1163 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 506 10 0 0 0 6 505 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 507 10 0 0 506 6 505 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 508 4 0 0 15 6 507 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 509 4 0 0 38 6 506 0 508 0 0 0 0 1 0 0 0 0 0 0
+A 510 10 0 0 507 6 505 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 511 10 0 0 510 6 505 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 512 10 0 0 511 6 505 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 514 1 0 1 0 324 1169 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 515 10 0 0 0 6 514 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 516 10 0 0 515 6 514 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 517 4 0 0 508 6 516 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 518 4 0 0 0 6 515 0 517 0 0 0 0 1 0 0 0 0 0 0
+A 519 10 0 0 516 6 514 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 520 10 0 0 519 6 514 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 521 10 0 0 520 6 514 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 524 1 0 3 403 330 1176 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 525 10 0 0 0 6 524 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 526 10 0 0 525 6 524 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 527 4 0 0 431 6 526 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 528 4 0 0 0 6 525 0 527 0 0 0 0 1 0 0 0 0 0 0
+A 529 10 0 0 526 6 524 16 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 385
+A 530 10 0 0 529 6 524 19 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 142
+A 531 4 0 0 0 6 530 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 532 4 0 0 224 6 529 0 531 0 0 0 0 1 0 0 0 0 0 0
+A 533 10 0 0 530 6 524 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 534 10 0 0 533 6 524 22 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 391
+A 535 10 0 0 534 6 524 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 536 10 0 0 535 6 524 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 539 1 0 3 0 336 1183 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 540 10 0 0 0 6 539 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 541 10 0 0 540 6 539 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 542 4 0 0 279 6 541 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 543 4 0 0 270 6 540 0 542 0 0 0 0 1 0 0 0 0 0 0
+A 544 10 0 0 541 6 539 16 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 385
+A 545 10 0 0 544 6 539 19 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 142
+A 546 4 0 0 56 6 545 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 547 4 0 0 142 6 544 0 546 0 0 0 0 1 0 0 0 0 0 0
+A 548 10 0 0 545 6 539 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 549 10 0 0 548 6 539 22 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 391
+A 550 10 0 0 549 6 539 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 551 10 0 0 550 6 539 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 553 1 0 1 304 342 1189 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 554 10 0 0 0 6 553 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 555 10 0 0 554 6 553 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 556 4 0 0 468 6 555 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 557 4 0 0 0 6 554 0 556 0 0 0 0 1 0 0 0 0 0 0
+A 558 10 0 0 555 6 553 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 559 10 0 0 558 6 553 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 560 10 0 0 559 6 553 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 562 1 0 1 0 348 1195 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 563 10 0 0 0 6 562 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 564 10 0 0 563 6 562 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 565 4 0 0 0 6 564 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 566 4 0 0 128 6 563 0 565 0 0 0 0 1 0 0 0 0 0 0
+A 567 10 0 0 564 6 562 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 568 10 0 0 567 6 562 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 569 10 0 0 568 6 562 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 571 1 0 1 486 354 1201 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 572 10 0 0 378 6 571 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 573 10 0 0 572 6 571 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 574 4 0 0 495 6 573 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 575 4 0 0 0 6 572 0 574 0 0 0 0 1 0 0 0 0 0 0
+A 576 10 0 0 573 6 571 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 577 10 0 0 576 6 571 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 578 10 0 0 577 6 571 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 580 1 0 1 574 360 1207 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 581 10 0 0 395 6 580 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 582 10 0 0 581 6 580 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 583 4 0 0 0 6 582 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 584 4 0 0 0 6 581 0 583 0 0 0 0 1 0 0 0 0 0 0
+A 585 10 0 0 582 6 580 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 586 10 0 0 585 6 580 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 587 10 0 0 586 6 580 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 589 1 0 1 504 366 1213 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 590 10 0 0 0 6 589 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 591 10 0 0 590 6 589 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 592 4 0 0 522 6 591 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 593 4 0 0 377 6 590 0 592 0 0 0 0 1 0 0 0 0 0 0
+A 594 10 0 0 591 6 589 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 595 10 0 0 594 6 589 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 596 10 0 0 595 6 589 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 598 1 0 1 55 372 1219 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 599 10 0 0 422 6 598 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 600 10 0 0 599 6 598 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 601 4 0 0 131 6 600 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 602 4 0 0 282 6 599 0 601 0 0 0 0 1 0 0 0 0 0 0
+A 603 10 0 0 600 6 598 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 604 10 0 0 603 6 598 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 605 10 0 0 604 6 598 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 607 1 0 1 0 378 1225 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 608 10 0 0 0 6 607 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 609 10 0 0 608 6 607 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 610 4 0 0 195 6 609 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 611 4 0 0 580 6 608 0 610 0 0 0 0 1 0 0 0 0 0 0
+A 612 10 0 0 609 6 607 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 613 10 0 0 612 6 607 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 614 10 0 0 613 6 607 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 616 1 0 1 524 384 1231 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 617 10 0 0 0 6 616 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 618 10 0 0 617 6 616 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 619 4 0 0 150 6 618 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 620 4 0 0 363 6 617 0 619 0 0 0 0 1 0 0 0 0 0 0
+A 621 10 0 0 618 6 616 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 622 10 0 0 621 6 616 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 623 10 0 0 622 6 616 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 625 1 0 1 0 390 1237 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 626 10 0 0 288 6 625 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 627 10 0 0 626 6 625 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 628 4 0 0 482 6 627 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 629 4 0 0 252 6 626 0 628 0 0 0 0 1 0 0 0 0 0 0
+A 630 10 0 0 627 6 625 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 631 10 0 0 630 6 625 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 632 10 0 0 631 6 625 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 634 1 0 1 0 396 1243 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 635 10 0 0 0 6 634 1 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 17
+A 636 10 0 0 635 6 634 4 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 20
+A 637 4 0 0 167 6 636 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 638 4 0 0 0 6 635 0 637 0 0 0 0 1 0 0 0 0 0 0
+A 639 10 0 0 636 6 634 7 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 24
+A 640 10 0 0 639 6 634 10 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 26
+A 641 10 0 0 640 6 634 13 0 0 0 0 0 0 0 0 0 0 0 0
+X 1 13
+A 642 2 0 0 0 6 1248 0 0 0 642 0 0 0 0 0 0 0 0 0
+A 675 1 0 0 181 6 1345 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 676 1 0 0 0 6 1347 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 677 1 0 0 349 6 1350 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 678 1 0 0 0 6 1352 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 679 1 0 0 0 6 1356 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 680 1 0 0 192 6 1355 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 681 1 0 0 0 6 1357 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 682 1 0 0 328 6 1369 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 683 1 0 0 643 6 1365 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 684 1 0 0 273 6 1367 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 685 1 0 0 367 6 1368 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 686 1 0 0 0 6 1370 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 687 1 0 0 324 6 1378 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 688 1 0 0 667 6 1379 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 689 1 0 0 0 6 1400 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 690 1 0 0 671 6 1398 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 691 1 0 0 0 6 1401 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 692 1 0 0 441 6 1399 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 693 1 0 0 430 6 1431 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 694 1 0 0 0 6 1429 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 695 1 0 0 0 6 1432 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 696 1 0 0 336 6 1430 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 697 1 0 0 0 6 1435 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 698 1 0 0 0 6 1433 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 699 1 0 0 647 6 1436 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 700 1 0 0 0 6 1434 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 701 1 0 0 345 6 1439 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 702 1 0 0 651 6 1437 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 703 1 0 0 439 6 1440 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 704 1 0 0 654 6 1438 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 705 1 0 0 0 6 1443 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 706 1 0 0 0 6 1441 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 707 1 0 0 0 6 1444 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 708 1 0 0 0 6 1442 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 709 1 0 0 242 6 1488 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 710 1 0 0 485 6 1486 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 711 1 0 0 211 6 1489 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 712 1 0 0 0 6 1487 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 713 1 0 0 0 6 1492 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 714 1 0 0 0 6 1490 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 715 1 0 0 399 6 1493 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 716 1 0 0 0 6 1491 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 717 1 0 0 0 6 1496 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 718 1 0 0 251 6 1494 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 719 1 0 0 0 6 1497 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 720 1 0 0 494 6 1495 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 721 1 0 0 260 6 1500 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 722 1 0 0 0 6 1498 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 723 1 0 0 0 6 1501 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 724 1 0 0 0 6 1499 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 725 1 0 0 503 6 1504 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 726 1 0 0 408 6 1502 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 727 1 0 0 0 6 1505 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 728 1 0 0 0 6 1503 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 729 1 0 0 0 6 1508 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 730 1 0 0 269 6 1506 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 731 1 0 0 0 6 1509 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 732 1 0 0 0 6 1507 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 733 1 0 0 278 6 1512 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 734 1 0 0 0 6 1510 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 735 1 0 0 512 6 1513 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 736 1 0 0 417 6 1511 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 737 2 0 0 0 6 1520 0 0 0 737 0 0 0 0 0 0 0 0 0
+A 738 1 0 0 0 6 1523 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 739 1 0 0 0 6 1521 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 740 1 0 0 296 6 1524 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 741 1 0 0 521 6 1522 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 742 1 0 0 0 6 1527 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 743 1 0 0 0 6 1531 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 744 1 0 0 435 6 1529 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 745 1 0 0 536 6 1532 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 746 1 0 0 487 6 1546 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 747 1 0 0 0 6 1535 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 748 1 0 0 551 6 1547 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 749 1 0 0 46 6 1550 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 750 1 0 0 454 6 1548 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 751 1 0 0 657 6 1551 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 752 1 0 0 0 6 1549 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 753 1 0 0 423 6 1554 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 754 1 0 0 496 6 1552 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 755 1 0 0 0 6 1555 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 756 1 0 0 0 6 1553 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 757 1 0 0 64 6 1568 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 758 1 0 0 0 6 1585 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 759 1 0 0 82 6 1586 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 760 1 0 0 0 6 1587 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 761 1 0 0 587 6 1588 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 762 1 0 0 75 6 1589 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 763 1 0 0 0 6 1590 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 764 1 0 0 0 6 1599 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 765 1 0 0 517 6 1602 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 766 1 0 0 91 6 1595 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 767 1 0 0 413 6 1600 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 768 1 0 0 0 6 1601 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 769 1 0 0 0 6 1611 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 770 1 0 0 464 6 1614 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 771 1 0 0 0 6 1607 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 772 1 0 0 527 6 1612 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 773 1 0 0 109 6 1613 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 774 1 0 0 0 6 1621 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 775 1 0 0 0 6 1638 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 776 1 0 0 297 6 1639 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 777 1 0 0 460 6 1640 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 778 1 0 0 556 6 1641 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 779 1 0 0 641 6 1642 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 780 1 0 0 0 6 1645 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 781 1 0 0 47 6 1625 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 782 1 0 0 74 6 1643 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 783 1 0 0 0 6 1644 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 784 1 0 0 469 6 1646 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 785 1 0 0 477 6 1647 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 786 1 0 0 396 6 1648 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 787 1 0 0 0 6 1658 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 788 1 0 0 571 6 1653 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 789 1 0 0 0 6 1656 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 790 1 0 0 51 6 1657 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 791 1 0 0 292 6 1674 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 792 1 0 0 69 6 1675 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 793 1 0 0 122 6 1676 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 794 1 0 0 592 6 1677 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 795 1 0 0 523 6 1678 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 796 1 0 0 566 6 1681 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 797 1 0 0 0 6 1662 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 798 1 0 0 337 6 1679 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 799 1 0 0 0 6 1680 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 800 1 0 0 0 6 1682 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 801 1 0 0 0 6 1683 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 802 1 0 0 145 6 1699 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 803 1 0 0 0 6 1700 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 804 1 0 0 146 6 1701 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 805 1 0 0 148 6 1702 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 806 1 0 0 570 6 1703 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 807 1 0 0 152 6 1706 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 808 1 0 0 247 6 1687 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 809 1 0 0 619 6 1704 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 810 1 0 0 0 6 1705 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 811 1 0 0 0 6 1707 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 812 1 0 0 153 6 1708 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 813 1 0 0 114 6 1720 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 814 1 0 0 628 6 1713 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 815 1 0 0 0 6 1717 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 816 1 0 0 157 6 1711 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 817 1 0 0 214 6 1718 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 818 1 0 0 165 6 1719 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 819 1 0 0 169 6 1723 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 820 1 0 0 588 6 1715 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 821 1 0 0 597 6 1721 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 822 1 0 0 637 6 1722 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 823 1 0 0 177 6 1730 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 824 1 0 0 0 6 1731 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 825 1 0 0 179 6 1732 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 826 1 0 0 184 6 1738 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 827 1 0 0 624 6 1739 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 828 1 0 0 196 6 1748 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 829 1 0 0 0 6 1749 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 830 1 0 0 189 6 1742 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 831 1 0 0 0 6 1750 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 832 1 0 0 250 6 1754 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 833 1 0 0 0 6 1757 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 834 1 0 0 0 6 1798 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 835 1 0 0 369 6 1799 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 836 1 0 0 132 6 1800 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 837 1 0 0 135 6 1803 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 838 1 0 0 124 6 1792 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 839 1 0 0 451 6 1801 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 840 1 0 0 539 6 1802 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 841 1 0 0 0 6 1811 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 842 1 0 0 500 6 1812 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 843 1 0 0 0 6 1813 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 844 1 0 0 322 6 1826 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 845 1 0 0 0 6 1827 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 846 1 0 0 18 6 1828 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 847 1 0 0 161 6 1829 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 848 1 0 0 0 6 1830 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 849 1 0 0 0 6 1831 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 850 1 0 0 172 6 1840 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 851 1 0 0 0 6 1841 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 852 1 0 0 0 6 1842 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 853 1 0 0 190 6 1856 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 854 1 0 0 682 6 1872 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 855 1 0 0 686 6 1873 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 856 1 0 0 0 6 1874 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 857 1 0 0 0 6 1875 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 858 1 0 0 234 6 1876 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 859 1 0 0 602 6 1879 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 860 1 0 0 681 6 1860 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 861 1 0 0 653 6 1877 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 862 1 0 0 0 6 1878 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 863 1 0 0 376 6 1880 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 864 1 0 0 687 6 1881 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 865 1 0 0 666 6 1887 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 866 1 0 0 668 6 1888 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 867 1 0 0 689 6 1903 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 868 1 0 0 691 6 1904 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 869 1 0 0 0 6 1905 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 870 1 0 0 309 6 1906 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 871 1 0 0 0 6 1909 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 872 1 0 0 646 6 1892 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 873 1 0 0 616 6 1907 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 874 1 0 0 0 6 1908 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 875 1 0 0 0 6 1910 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 876 1 0 0 412 6 1916 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 877 1 0 0 0 6 1917 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 878 1 0 0 650 6 1924 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 879 1 0 0 421 6 1925 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 880 1 0 0 0 6 1926 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 881 1 0 0 699 6 1939 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 882 1 0 0 702 6 1940 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 883 1 0 0 704 6 1941 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 884 1 0 0 701 6 1942 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 885 1 0 0 708 6 1945 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 886 1 0 0 693 6 1934 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 887 1 0 0 703 6 1943 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 888 1 0 0 706 6 1944 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 889 1 0 0 354 6 1951 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 890 1 0 0 528 6 1957 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 891 1 0 0 575 6 1964 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 892 1 0 0 467 6 1971 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 893 1 0 0 532 6 1979 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 894 1 0 0 709 6 1991 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 895 1 0 0 301 6 1984 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 896 1 0 0 710 6 1989 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 897 1 0 0 712 6 1990 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 898 1 0 0 711 6 1992 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 899 1 0 0 721 6 2003 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 900 1 0 0 713 6 1995 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 901 1 0 0 722 6 2001 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 902 1 0 0 724 6 2002 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 903 1 0 0 723 6 2004 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 904 1 0 0 726 6 2005 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 905 1 0 0 0 6 2017 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 906 1 0 0 727 6 2008 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 907 1 0 0 733 6 2015 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 908 1 0 0 735 6 2016 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 909 1 0 0 0 6 2018 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 910 1 0 0 216 6 2031 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 911 1 0 0 287 6 2021 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 912 1 0 0 0 6 2029 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 913 1 0 0 742 6 2030 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 914 1 0 0 744 6 2032 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 915 1 0 0 305 6 2033 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 916 1 0 0 315 6 2042 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 917 1 0 0 0 6 2043 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 918 1 0 0 750 6 2051 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 919 1 0 0 752 6 2052 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 920 1 0 0 505 6 2061 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 921 1 0 0 598 6 2062 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 922 1 0 0 472 6 2069 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 923 1 0 0 0 6 2076 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 924 1 0 0 73 6 2080 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 925 1 0 0 761 6 2091 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 926 1 0 0 758 6 2088 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 927 1 0 0 762 6 2092 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 928 1 0 0 0 6 2094 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 929 1 0 0 763 6 2093 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 930 1 0 0 578 6 2082 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 931 1 0 0 0 6 2095 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 932 1 0 0 499 6 2096 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 933 1 0 0 596 6 2100 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 934 1 0 0 771 6 2110 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 935 1 0 0 0 6 2106 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 936 1 0 0 0 6 2111 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 937 1 0 0 0 6 2113 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 938 1 0 0 0 6 2112 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 939 1 0 0 766 6 2098 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 940 1 0 0 769 6 2114 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 941 1 0 0 770 6 2117 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 942 1 0 0 0 6 2133 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 943 1 0 0 0 6 2129 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 944 1 0 0 546 6 2134 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 945 1 0 0 531 6 2119 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 946 1 0 0 737 6 2135 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 947 1 0 0 0 6 2137 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 948 1 0 0 632 6 2136 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 949 1 0 0 459 6 2138 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 950 1 0 0 775 6 2141 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 951 1 0 0 784 6 2149 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 952 1 0 0 782 6 2146 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 953 1 0 0 785 6 2150 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 954 1 0 0 83 6 2152 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 955 1 0 0 786 6 2151 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 956 1 0 0 92 6 2158 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 957 1 0 0 583 6 2171 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 958 1 0 0 0 6 2154 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 959 1 0 0 0 6 2172 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 960 1 0 0 589 6 2168 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 961 1 0 0 61 6 2173 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 962 1 0 0 0 6 2175 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 963 1 0 0 513 6 2174 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 964 1 0 0 793 6 2179 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 965 1 0 0 12 6 2199 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 966 1 0 0 791 6 2177 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 967 1 0 0 561 6 2200 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 968 1 0 0 800 6 2185 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 969 1 0 0 391 6 2201 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 970 1 0 0 806 6 2206 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 971 1 0 0 812 6 2211 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 972 1 0 0 807 6 2209 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 973 1 0 0 579 6 2212 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 974 1 0 0 0 6 2215 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 975 1 0 0 0 6 2227 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 976 1 0 0 813 6 2223 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 977 1 0 0 171 6 2228 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 978 1 0 0 0 6 2231 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 979 1 0 0 188 6 2244 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 980 1 0 0 183 6 2240 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 981 1 0 0 830 6 2245 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 982 1 0 0 831 6 2253 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 983 1 0 0 832 6 2257 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 984 1 0 0 57 6 2247 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 985 1 0 0 0 6 2258 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 986 1 0 0 833 6 2260 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 987 1 0 0 0 6 2259 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 988 1 0 0 206 6 2270 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 989 1 0 0 0 6 2274 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 990 1 0 0 0 6 2262 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 991 1 0 0 268 6 2275 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 992 1 0 0 0 6 2278 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 993 1 0 0 261 6 2285 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 994 1 0 0 0 6 2277 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 995 1 0 0 0 6 2286 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 996 1 0 0 265 6 2289 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 997 1 0 0 123 6 2294 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 998 1 0 0 0 6 2288 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 999 1 0 0 838 6 2295 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1000 1 0 0 126 6 2297 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1001 1 0 0 837 6 2306 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1002 1 0 0 835 6 2302 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1003 1 0 0 0 6 2307 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1004 1 0 0 672 6 2310 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1005 2 0 0 877 6 2308 0 0 0 1005 0 0 0 0 0 0 0 0 0
+A 1006 1 0 0 673 6 2309 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1007 1 0 0 313 6 2320 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1008 1 0 0 0 6 2324 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1009 1 0 0 0 6 2312 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1010 1 0 0 154 6 2325 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1011 1 0 0 455 6 2328 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1012 1 0 0 662 6 2337 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1013 1 0 0 849 6 2334 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1014 1 0 0 663 6 2338 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1015 1 0 0 111 6 2340 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1016 1 0 0 664 6 2339 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1017 1 0 0 850 6 2343 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1018 1 0 0 674 6 2354 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1019 1 0 0 655 6 2350 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1020 1 0 0 246 6 2355 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1021 1 0 0 645 6 2357 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1022 1 0 0 677 6 2356 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1023 1 0 0 678 6 2358 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1024 1 0 0 680 6 2361 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1025 1 0 0 0 6 2368 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1026 1 0 0 358 6 2365 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1027 1 0 0 0 6 2369 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1028 1 0 0 683 6 2371 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1029 1 0 0 861 6 2380 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1030 1 0 0 856 6 2377 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1031 1 0 0 862 6 2381 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1032 1 0 0 863 6 2383 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1033 1 0 0 859 6 2382 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1034 1 0 0 0 6 2401 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1035 1 0 0 690 6 2404 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1036 1 0 0 868 6 2407 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1037 1 0 0 865 6 2390 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1038 1 0 0 692 6 2405 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1039 1 0 0 867 6 2406 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1040 1 0 0 394 6 2394 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1041 1 0 0 869 6 2408 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1042 1 0 0 870 6 2409 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1043 1 0 0 873 6 2410 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1044 1 0 0 342 6 2396 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1045 1 0 0 874 6 2411 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1046 1 0 0 871 6 2412 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1047 1 0 0 634 6 2422 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1048 1 0 0 518 6 2423 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1049 1 0 0 0 6 2424 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1050 1 0 0 1005 6 2420 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1051 1 0 0 0 6 2425 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1052 4 0 0 958 6 1050 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1053 1 0 0 0 6 2426 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1054 1 0 0 881 6 2442 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1055 1 0 0 882 6 2443 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1056 1 0 0 879 6 2428 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1057 4 0 0 790 6 1056 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1058 1 0 0 883 6 2444 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1059 1 0 0 700 6 2440 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1060 4 0 0 0 6 1059 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 1061 1 0 0 884 6 2445 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1062 1 0 0 887 6 2446 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1063 1 0 0 888 6 2447 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1064 4 0 0 1060 6 1059 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1065 1 0 0 885 6 2448 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1066 1 0 0 889 6 2454 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1067 1 0 0 0 6 2458 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1068 1 0 0 707 6 2450 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1069 1 0 0 0 6 2459 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1070 1 0 0 890 6 2460 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1071 1 0 0 372 6 2472 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1072 1 0 0 0 6 2473 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1073 1 0 0 892 6 2474 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1074 1 0 0 115 6 2470 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1075 1 0 0 0 6 2475 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1076 4 0 0 792 6 1074 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1077 1 0 0 215 6 2476 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1078 1 0 0 0 6 2486 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1079 1 0 0 895 6 2487 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1080 1 0 0 0 6 2478 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1081 4 0 0 796 6 1080 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1082 1 0 0 388 6 2488 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1083 1 0 0 0 6 2489 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1084 1 0 0 0 6 2484 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1085 4 0 0 538 6 1084 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1086 1 0 0 0 6 2490 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1087 1 0 0 902 6 2505 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1088 1 0 0 899 6 2506 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1089 1 0 0 903 6 2507 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1090 1 0 0 719 6 2503 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1091 4 0 0 552 6 1090 0 3 0 0 0 0 2 0 0 0 0 0 0
+A 1092 1 0 0 904 6 2508 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1093 1 0 0 728 6 2509 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1094 1 0 0 725 6 2510 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1095 4 0 0 1091 6 1090 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1096 1 0 0 906 6 2511 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1097 1 0 0 907 6 2518 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1098 1 0 0 905 6 2520 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1099 1 0 0 736 6 2517 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1100 1 0 0 909 6 2521 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1101 4 0 0 803 6 1099 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1102 1 0 0 0 6 2522 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1103 1 0 0 913 6 2533 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1104 1 0 0 914 6 2535 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1105 1 0 0 915 6 2536 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1106 1 0 0 911 6 2524 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1107 1 0 0 743 6 2537 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1108 1 0 0 745 6 2538 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1109 1 0 0 306 6 2539 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1110 1 0 0 314 6 2542 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1111 1 0 0 919 6 2555 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1112 1 0 0 747 6 2541 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1113 4 0 0 814 6 1112 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1114 1 0 0 749 6 2556 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1115 1 0 0 746 6 2552 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1116 1 0 0 751 6 2557 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1117 1 0 0 748 6 2553 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1118 4 0 0 817 6 1117 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1119 1 0 0 754 6 2558 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1120 1 0 0 756 6 2559 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1121 1 0 0 0 6 2562 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1122 1 0 0 560 6 2567 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1123 4 0 0 822 6 1121 0 3 0 0 0 0 1 0 0 0 0 0 0
+A 1124 1 0 0 120 6 2568 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1125 1 0 0 755 6 2561 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1126 1 0 0 0 6 2569 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1127 1 0 0 0 6 2587 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1128 1 0 0 490 6 2590 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1129 1 0 0 760 6 2593 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1130 1 0 0 569 6 2576 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1131 1 0 0 926 6 2591 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1132 1 0 0 759 6 2592 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1133 1 0 0 638 6 2580 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1134 1 0 0 925 6 2594 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1135 1 0 0 927 6 2595 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1136 1 0 0 929 6 2596 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1137 1 0 0 0 6 2582 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1138 1 0 0 928 6 2597 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 1139 1 0 0 931 6 2598 0 0 0 0 0 0 0 0 0 0 0 0 0
+Z
+Z
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.dat
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.dat	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.dat	(revision 3477)
@@ -0,0 +1,20 @@
+ At t =  0.4000D+00   y =  0.985164D+00  0.338624D-04  0.148020D-01
+ At t =  0.4000D+01   y =  0.905510D+00  0.224034D-04  0.944679D-01
+ At t =  0.4000D+02   y =  0.715801D+00  0.918506D-05  0.284189D+00
+ At t =  0.4000D+03   y =  0.450542D+00  0.322311D-05  0.549455D+00
+ At t =  0.4000D+04   y =  0.183206D+00  0.894285D-06  0.816793D+00
+ At t =  0.4000D+05   y =  0.389805D-01  0.162165D-06  0.961019D+00
+ At t =  0.4000D+06   y =  0.493369D-02  0.198317D-07  0.995066D+00
+ At t =  0.4000D+07   y =  0.516828D-03  0.206837D-08  0.999483D+00
+ At t =  0.4000D+08   y =  0.520449D-04  0.208190D-09  0.999948D+00
+ At t =  0.4000D+09   y =  0.523068D-05  0.209228D-10  0.999995D+00
+ At t =  0.4000D+10   y =  0.520829D-06  0.208332D-11  0.999999D+00
+ At t =  0.4000D+11   y =  0.567917D-07  0.227167D-12  0.100000D+01
+
+  No. steps = 578   No. f-s = 827  No. J-s =  12   No. LU-s = 122
+  No. nonlinear iterations = 822
+  No. nonlinear convergence failures =   0
+  No. error test failures =  33
+
+
+ No errors occurred.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.f90	(revision 3477)
@@ -0,0 +1,116 @@
+    MODULE EXAMPLE1
+
+! DEMONSTRATION PROGRAM FOR THE DVODE_F90 PACKAGE.
+
+! The following is a simple example problem, with the coding
+! needed for its solution by DVODE_F90. The problem is from
+! chemical kinetics, and consists of the following three rate
+! equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+
+! The following coding solves this problem with DVODE_F90,
+! using a user supplied Jacobian and printing results at
+! t = .4, 4.,...,4.d10. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values. At
+! the end of the run, statistical quantities of interest are
+! printed. (See optional output in the full DVODE description
+! below.) Output is written to the file example1.dat.
+
+    CONTAINS
+
+      SUBROUTINE FEX(NEQ,T,Y,YDOT)
+        IMPLICIT NONE
+        INTEGER NEQ
+        DOUBLE PRECISION T, Y, YDOT
+        DIMENSION Y(NEQ), YDOT(NEQ)
+
+        YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
+        YDOT(3) = 3.E7*Y(2)*Y(2)
+        YDOT(2) = -YDOT(1) - YDOT(3)
+        RETURN
+      END SUBROUTINE FEX
+
+      SUBROUTINE JEX(NEQ,T,Y,ML,MU,PD,NRPD)
+        IMPLICIT NONE
+        INTEGER NEQ, ML, MU, NRPD
+        DOUBLE PRECISION PD, T, Y
+        DIMENSION Y(NEQ), PD(NRPD,NEQ)
+
+        PD(1,1) = -.04D0
+        PD(1,2) = 1.D4*Y(3)
+        PD(1,3) = 1.D4*Y(2)
+        PD(2,1) = .04D0
+        PD(2,3) = -PD(1,3)
+        PD(3,2) = 6.E7*Y(2)
+        PD(2,2) = -PD(1,2) - PD(3,2)
+        RETURN
+      END SUBROUTINE JEX
+
+    END MODULE EXAMPLE1
+
+!******************************************************************
+
+    PROGRAM RUNEXAMPLE1
+
+      USE DVODE_F90_M
+      USE EXAMPLE1
+
+      IMPLICIT NONE
+      DOUBLE PRECISION ATOL, RTOL, T, TOUT, Y, RSTATS
+      INTEGER NEQ, ITASK, ISTATE, ISTATS, IOUT, IERROR, I
+      DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31)
+
+      TYPE (VODE_OPTS) :: OPTIONS
+
+      OPEN (UNIT=6,FILE='example1.dat')
+      IERROR = 0
+      NEQ = 3
+      Y(1) = 1.0D0
+      Y(2) = 0.0D0
+      Y(3) = 0.0D0
+      T = 0.0D0
+      TOUT = 0.4D0
+      RTOL = 1.D-4
+      ATOL(1) = 1.D-8
+      ATOL(2) = 1.D-14
+      ATOL(3) = 1.D-6
+      ITASK = 1
+      ISTATE = 1
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR_VECTOR=ATOL,RELERR=RTOL, &
+!       USER_SUPPLIED_JACOBIAN=.TRUE.)
+      OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE.,ABSERR_VECTOR=ATOL,      &
+        RELERR=RTOL,USER_SUPPLIED_JACOBIAN=.TRUE.)
+      DO IOUT = 1, 12
+        CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+        CALL GET_STATS(RSTATS,ISTATS)
+        WRITE (6,90003) T, Y(1), Y(2), Y(3)
+        DO I = 1, NEQ
+          IF (Y(I)<0.0D0) IERROR = 1
+        END DO
+        IF (ISTATE<0) THEN
+          WRITE (6,90004) ISTATE
+          STOP
+        END IF
+        TOUT = TOUT*10.0D0
+      END DO
+      WRITE (6,90000) ISTATS(11), ISTATS(12), ISTATS(13), ISTATS(19), &
+        ISTATS(20), ISTATS(21), ISTATS(22)
+      IF (IERROR==1) THEN
+        WRITE (6,90001)
+      ELSE
+        WRITE (6,90002)
+      END IF
+90000 FORMAT (/'  No. steps =',I4,'   No. f-s =',I4,'  No. J-s =',I4, &
+        '   No. LU-s =',I4/'  No. nonlinear iterations =', &
+        I4/'  No. nonlinear convergence failures =', &
+        I4/'  No. error test failures =',I4/)
+90001 FORMAT (/' An error occurred.')
+90002 FORMAT (/' No errors occurred.')
+90003 FORMAT (' At t =',D12.4,'   y =',3D14.6)
+90004 FORMAT (///' Error halt: ISTATE =',I3)
+      STOP
+    END PROGRAM RUNEXAMPLE1
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.mod
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.mod	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example1.mod	(revision 3477)
@@ -0,0 +1,46 @@
+V24 example1
+12 example1.f90 S582 0
+05/10/2011  17:19:07
+enduse
+D 33 21 9 1 3 13 0 0 1 0 0
+ 0 12 3 3 13 13
+D 36 21 9 1 3 13 0 0 1 0 0
+ 0 12 3 3 13 13
+D 39 21 9 1 3 15 0 0 1 0 0
+ 0 14 3 3 15 15
+D 42 21 9 2 16 19 0 0 1 0 0
+ 0 17 3 3 18 18
+ 0 14 18 3 15 15
+S 582 24 0 0 0 8 1 0 4668 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 example1
+S 583 23 5 0 0 0 588 582 4677 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fex
+S 584 6 3 0 0 6 1 583 4681 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 585 1 3 0 0 9 1 583 4685 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 586 7 3 0 0 33 1 583 4687 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 587 7 3 0 0 36 1 583 4689 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ydot
+S 588 14 5 0 0 0 1 583 4677 200 400000 0 0 0 2 4 0 0 0 0 0 0 0 0 0 0 0 0 25 0 582 0 0 0 0 fex
+F 588 4 584 585 586 587
+S 589 6 1 0 0 6 1 583 4694 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_12
+S 590 23 5 0 0 0 598 582 4701 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jex
+S 591 6 3 0 0 6 1 590 4681 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 592 1 3 0 0 9 1 590 4685 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 593 7 3 0 0 39 1 590 4687 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 594 1 3 0 0 6 1 590 4705 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 595 1 3 0 0 6 1 590 4708 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 596 7 3 0 0 42 1 590 4711 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pd
+S 597 6 3 0 0 6 1 590 4714 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrpd
+S 598 14 5 0 0 0 1 590 4701 200 400000 0 0 0 7 7 0 0 0 0 0 0 0 0 0 0 0 0 37 0 582 0 0 0 0 jex
+F 598 7 591 592 593 594 595 596 597
+S 599 6 1 0 0 6 1 590 4719 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_14
+S 600 6 1 0 0 6 1 590 4726 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_16
+S 601 6 1 0 0 6 1 590 4733 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_18
+S 602 6 1 0 0 6 1 590 4740 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_20
+A 12 1 0 0 0 6 584 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 13 1 0 0 0 6 589 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 14 1 0 0 0 6 591 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 15 1 0 0 0 6 599 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 16 1 0 0 0 6 602 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 17 1 0 0 0 6 597 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 18 1 0 0 0 6 600 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 19 1 0 0 0 6 601 0 0 0 0 0 0 0 0 0 0 0 0 0
+Z
+Z
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example2.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example2.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/example2.f90	(revision 3477)
@@ -0,0 +1,118 @@
+    MODULE EXAMPLE2
+
+! DEMONSTRATION PROGRAM FOR THE DVODE_F90 PACKAGE.
+
+! The following is a modification of the previous example
+! program to illustrate root finding. The problem is from
+! chemical kinetics, and consists of the following three
+! rate equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! In addition, we want to find the values of t, y1, y2,
+! and y3 at which:
+!   (1) y1 reaches the value 1.d-4, and
+!   (2) y3 reaches the value 1.d-2.
+
+! The following coding solves this problem with DVODE_F90
+! using an internally generated dense Jacobian and
+! printing results at t = .4, 4., ..., 4.d10, and at the
+! computed roots. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values.
+! At the end of the run, statistical quantities of interest
+! are printed (see optional outputs in the full description
+! below). Output is written to the file example2.dat.
+
+    CONTAINS
+
+      SUBROUTINE FEX(NEQ,T,Y,YDOT)
+        IMPLICIT NONE
+        INTEGER NEQ
+        DOUBLE PRECISION T, Y, YDOT
+        DIMENSION Y(3), YDOT(3)
+
+        YDOT(1) = -0.04D0*Y(1) + 1.0D4*Y(2)*Y(3)
+        YDOT(3) = 3.0D7*Y(2)*Y(2)
+        YDOT(2) = -YDOT(1) - YDOT(3)
+        RETURN
+      END SUBROUTINE FEX
+
+      SUBROUTINE GEX(NEQ,T,Y,NG,GOUT)
+        IMPLICIT NONE
+        INTEGER NEQ, NG
+        DOUBLE PRECISION T, Y, GOUT
+        DIMENSION Y(3), GOUT(2)
+
+        GOUT(1) = Y(1) - 1.0D-4
+        GOUT(2) = Y(3) - 1.0D-2
+        RETURN
+      END SUBROUTINE GEX
+
+    END MODULE EXAMPLE2
+
+!******************************************************************
+
+    PROGRAM RUNEXAMPLE2
+
+      USE DVODE_F90_M
+      USE EXAMPLE2
+
+      IMPLICIT NONE
+      INTEGER ITASK, ISTATE, NG, NEQ, IOUT, JROOT, ISTATS, IERROR, I
+      DOUBLE PRECISION ATOL, RTOL, RSTATS, T, TOUT, Y
+      DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31), JROOT(2)
+
+      TYPE (VODE_OPTS) :: OPTIONS
+
+      OPEN (UNIT=6,FILE='example2.dat')
+      IERROR = 0
+      NEQ = 3
+      Y(1) = 1.0D0
+      Y(2) = 0.0D0
+      Y(3) = 0.0D0
+      T = 0.0D0
+      TOUT = 0.4D0
+      RTOL = 1.0D-4
+      ATOL(1) = 1.0D-8
+      ATOL(2) = 1.0D-10
+      ATOL(3) = 1.0D-8
+      ITASK = 1
+      ISTATE = 1
+      NG = 2
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL,ABSERR_VECTOR=ATOL, &
+!       NEVENTS=NG)
+      OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE.,RELERR=RTOL,             &
+        ABSERR_VECTOR=ATOL,NEVENTS=NG)
+      DO 20 IOUT = 1, 12
+10      CONTINUE
+        CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+        CALL GET_STATS(RSTATS,ISTATS,NG,JROOT)
+        WRITE (6,90000) T, Y(1), Y(2), Y(3)
+        DO I = 1, NEQ
+          IF (Y(I)<0.0D0) IERROR = 1
+        END DO
+90000   FORMAT (' At t =',D12.4,'   Y =',3D14.6)
+        IF (ISTATE<0) GO TO 30
+        IF (ISTATE==2) GO TO 20
+        WRITE (6,90001) JROOT(1), JROOT(2)
+90001   FORMAT (5X,' The above line is a root, JROOT =',2I5)
+        ISTATE = 2
+        GO TO 10
+20    TOUT = TOUT*10.0D0
+      WRITE (6,90002) ISTATS(11), ISTATS(12), ISTATS(13), ISTATS(10)
+      IF (IERROR==1) THEN
+        WRITE (6,90003)
+      ELSE
+        WRITE (6,90004)
+      END IF
+90002 FORMAT (/' No. steps =',I4,'  No. f-s =',I4,'  No. J-s =',I4, &
+        '  No. g-s =',I4/)
+      STOP
+30    WRITE (6,90005) ISTATE
+90003 FORMAT (/' An error occurred.')
+90004 FORMAT (/' No errors occurred.')
+90005 FORMAT (///' Error halt.. ISTATE =',I3)
+      STOP
+    END PROGRAM RUNEXAMPLE2
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/nonstiffoptions.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/nonstiffoptions.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/nonstiffoptions.f90	(revision 3477)
@@ -0,0 +1,1232 @@
+! DVODE_F90 demonstration program
+
+! Toronto Nonstiff Test Set
+
+! Reference:
+! ALGORITHM 648, COLLECTED ALGORITHMS FROM ACM.
+! TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+! VOL. 13, NO. 1, P. 28
+
+! Caution:
+! This version of the test set is intended for use only
+! in conjunction with this demo program for DVODE_F90.
+! The original test routines are altered in this version.
+! Some subroutine arguments, COMMON variables, and local
+! variables have been moved to the following global header.
+! You should obtain the original test suite from netlib
+! if you plan to use the routines for another solver.
+
+!******************************************************************
+
+    MODULE NONSTIFFSET
+
+! Note:
+! In this version ID is defined in the main program
+! demostiff. The other parameters are obtained by
+! calling IVALU with a modified argument list.
+
+      IMPLICIT NONE
+      INTEGER IWT, N, ID, NFCN
+      DOUBLE PRECISION W
+      DIMENSION W(51)
+
+    CONTAINS
+
+      SUBROUTINE DERIVS(NEQ,T,Y,YDOT)
+        IMPLICIT NONE
+        INTEGER NEQ
+        DOUBLE PRECISION T, Y, YDOT
+        DIMENSION Y(NEQ), YDOT(NEQ)
+
+        CALL FCN(T,Y,YDOT)
+        RETURN
+      END SUBROUTINE DERIVS
+
+      SUBROUTINE IVALU(XSTART,XEND,HBEGIN,HMAX,Y)
+
+!      ROUTINE TO PROVIDE THE INITIAL VALUES REQUIRED TO SPECIFY
+!      THE MATHEMATICAL PROBLEM AS WELL AS VARIOUS PROBLEM
+!      PARAMETERS REQUIRED BY THE TESTING PACKAGE. THE APPROPRIATE
+!      SCALING VECTOR IS ALSO INITIALISED IN CASE THIS OPTION IS
+!      SELECTED.
+
+!      PARAMETERS (OUTPUT)
+!      N      - DIMENSION OF THE PROBLEM
+!      XSTART - INITIAL VALUE OF THE INDEPENDENT VARIABLE
+!      XEND   - FINAL VALUE OF THE INDEPENDENT VARIABLE
+!      HBEGIN - APPROPRIATE STARTING STEPSIZE
+!      Y      - VECTOR OF INITIAL CONDITIONS FOR THE DEPENDENT
+!               VARIABLES
+!      WT     - VECTOR OF WEIGHTS USED TO SCALE THE PROBLEM IF
+!               THIS OPTION IS SELECTED.
+
+!      PARAMETER  (INPUT)
+!      IWT    - FLAG TO INDICATE IF SCALED OPTION IS SELESTED
+!      ID     - FLAG IDENTIFYING WHICH EQUATION IS BEING SOLVED
+
+        IMPLICIT NONE
+
+!     .. Scalar Arguments ..
+        DOUBLE PRECISION HBEGIN, HMAX, XEND, XSTART
+!     INTEGER ID, IWT, N
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(51)
+!     DOUBLE PRECISION W(51)
+!     .. Local Scalars ..
+        DOUBLE PRECISION E, HB, HM, XE, XS
+        INTEGER I, IOUT
+!     .. Data statements ..
+        DATA HM, HB, XS, XE/20.0D0, 1.0D0, 0.0D0, 20.0D0/
+
+!     .. Executable Statements ..
+
+        HMAX = HM
+        HBEGIN = HB
+        XSTART = XS
+        XEND = XE
+!     GOTO (40, 60, 80, 100, 120, 20, 20, 20, 20, 20, 140, 160, 180,    &
+!     200, 220, 20, 20, 20, 20, 20, 240, 280, 320, 360, 400, 20, 20, 20,&
+!     20, 20, 420, 420, 420, 420, 420, 20, 20, 20, 20, 20, 540, 560,    &
+!     580, 600, 620, 20, 20, 20, 20, 20, 640, 660, 680, 700, 720) ID
+        GO TO (20,30,40,50,60,10,10,10,10,10,70,80,90,100,110,10,10,10,10,10, &
+          120,130,140,150,160,10,10,10,10,10,170,170,170,170,170,10,10,10,10, &
+          10,230,240,250,260,270,10,10,10,10,10,280,290,300,310,320) ID
+10      IOUT = 6
+        WRITE (IOUT,FMT=90000) ID
+        STOP
+
+!     PROBLEM CLASS A
+
+!     1:
+20      CONTINUE
+!     PROBLEM A1
+        N = 1
+        W(1) = 0.100D+01
+        Y(1) = 1.0D0
+        GO TO 330
+!     2:
+30      CONTINUE
+!     PROBLEM A2
+        N = 1
+        W(1) = 0.100D+01
+        Y(1) = 1.0D0
+        GO TO 330
+!     3:
+40      CONTINUE
+!     PROBLEM A3
+        N = 1
+        W(1) = 0.271D+01
+        Y(1) = 1.0D0
+        GO TO 330
+!     4:
+50      CONTINUE
+!     PROBLEM A4
+        N = 1
+        W(1) = 0.177D+02
+        Y(1) = 1.0D0
+        GO TO 330
+!     5:
+60      CONTINUE
+!     PROBLEM A5
+        N = 1
+        W(1) = 0.620D+01
+        Y(1) = 4.0D0
+        GO TO 330
+
+!     PROBLEM CLASS B
+
+!     11:
+70      CONTINUE
+!     PROBLEM B1
+        N = 2
+        W(1) = 0.425D+01
+        W(2) = 0.300D+01
+        Y(1) = 1.0D0
+        Y(2) = 3.0D0
+        GO TO 330
+!     12:
+80      CONTINUE
+!     PROBLEM B2
+        N = 3
+        W(1) = 0.200D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        Y(1) = 2.0D0
+        Y(2) = 0.0D0
+        Y(3) = 1.0D0
+        GO TO 330
+!     13:
+90      CONTINUE
+!     PROBLEM B3
+        N = 3
+        W(1) = 0.100D+01
+        W(2) = 0.519D+00
+        W(3) = 0.947D+00
+        Y(1) = 1.0D0
+        Y(2) = 0.0D0
+        Y(3) = 0.0D0
+        GO TO 330
+!     14:
+100     CONTINUE
+!     PROBLEM B4
+        N = 3
+        W(1) = 0.300D+01
+        W(2) = 0.220D+01
+        W(3) = 0.100D+01
+        Y(1) = 3.0D0
+        Y(2) = 0.0D0
+        Y(3) = 0.0D0
+        GO TO 330
+!     15:
+110     CONTINUE
+!     PROBLEM B5
+        N = 3
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        Y(1) = 0.0D0
+        Y(2) = 1.0D0
+        Y(3) = 1.0D0
+        GO TO 330
+
+!     PROBLEM CLASS C
+
+!     21:
+120     CONTINUE
+!     PROBLEM C1
+        N = 10
+        W(1) = 0.100D+01
+        W(2) = 0.368D+00
+        W(3) = 0.271D+00
+        W(4) = 0.224D+00
+        W(5) = 0.195D+00
+        W(6) = 0.175D+00
+        W(7) = 0.161D+00
+        W(8) = 0.149D+00
+        W(9) = 0.139D+00
+        W(10) = 0.998D+00
+        Y(1) = 1.0D0
+        DO I = 2, N
+          Y(I) = 0.0D0
+        END DO
+        GO TO 330
+!     22:
+130     CONTINUE
+!     PROBLEM C2
+        N = 10
+        W(1) = 0.100D+01
+        W(2) = 0.250D+00
+        W(3) = 0.148D+00
+        W(4) = 0.105D+00
+        W(5) = 0.818D-01
+        W(6) = 0.669D-01
+        W(7) = 0.566D-01
+        W(8) = 0.491D-01
+        W(9) = 0.433D-01
+        W(10) = 0.100D+01
+        Y(1) = 1.0D0
+        DO I = 2, N
+          Y(I) = 0.0D0
+        END DO
+        GO TO 330
+!     23:
+140     CONTINUE
+!     PROBLEM C3
+        N = 10
+        W(1) = 0.100D+01
+        W(2) = 0.204D+00
+        W(3) = 0.955D-01
+        W(4) = 0.553D-01
+        W(5) = 0.359D-01
+        W(6) = 0.252D-01
+        W(7) = 0.184D-01
+        W(8) = 0.133D-01
+        W(9) = 0.874D-02
+        W(10) = 0.435D-02
+        Y(1) = 1.0D0
+        DO I = 2, N
+          Y(I) = 0.0D0
+        END DO
+        GO TO 330
+!     24:
+150     CONTINUE
+!     PROBLEM C4
+        N = 51
+        W(1) = 0.100D+01
+        W(2) = 0.204D+00
+        W(3) = 0.955D-01
+        W(4) = 0.553D-01
+        W(5) = 0.359D-01
+        W(6) = 0.252D-01
+        W(7) = 0.186D-01
+        W(8) = 0.143D-01
+        W(9) = 0.113D-01
+        W(10) = 0.918D-02
+        W(11) = 0.760D-02
+        W(12) = 0.622D-02
+        W(13) = 0.494D-02
+        W(14) = 0.380D-02
+        W(15) = 0.284D-02
+        W(16) = 0.207D-02
+        W(17) = 0.146D-02
+        W(18) = 0.101D-02
+        W(19) = 0.678D-03
+        W(20) = 0.444D-03
+        W(21) = 0.283D-03
+        W(22) = 0.177D-03
+        W(23) = 0.107D-03
+        W(24) = 0.637D-04
+        W(25) = 0.370D-04
+        W(26) = 0.210D-04
+        W(27) = 0.116D-04
+        W(28) = 0.631D-05
+        W(29) = 0.335D-05
+        W(30) = 0.174D-05
+        W(31) = 0.884D-06
+        W(32) = 0.440D-06
+        W(33) = 0.215D-06
+        W(34) = 0.103D-06
+        W(35) = 0.481D-07
+        W(36) = 0.221D-07
+        W(37) = 0.996D-08
+        W(38) = 0.440D-08
+        W(39) = 0.191D-08
+        W(40) = 0.814D-09
+        W(41) = 0.340D-09
+        W(42) = 0.140D-09
+        W(43) = 0.564D-10
+        W(44) = 0.224D-10
+        W(45) = 0.871D-11
+        W(46) = 0.334D-11
+        W(47) = 0.126D-11
+        W(48) = 0.465D-12
+        W(49) = 0.169D-12
+        W(50) = 0.600D-13
+        W(51) = 0.189D-13
+        Y(1) = 1.0D0
+        DO I = 2, N
+          Y(I) = 0.0D0
+        END DO
+        GO TO 330
+!     25:
+160     CONTINUE
+!     PROBLEM C5
+        N = 30
+        W(1) = 0.545D+01
+        W(2) = 0.471D+01
+        W(3) = 0.203D+01
+        W(4) = 0.664D+01
+        W(5) = 0.834D+01
+        W(6) = 0.346D+01
+        W(7) = 0.113D+02
+        W(8) = 0.172D+02
+        W(9) = 0.748D+01
+        W(10) = 0.302D+02
+        W(11) = 0.411D+01
+        W(12) = 0.144D+01
+        W(13) = 0.244D+02
+        W(14) = 0.284D+02
+        W(15) = 0.154D+02
+        W(16) = 0.764D+00
+        W(17) = 0.661D+00
+        W(18) = 0.284D+00
+        W(19) = 0.588D+00
+        W(20) = 0.366D+00
+        W(21) = 0.169D+00
+        W(22) = 0.388D+00
+        W(23) = 0.190D+00
+        W(24) = 0.877D-01
+        W(25) = 0.413D-01
+        W(26) = 0.289D+00
+        W(27) = 0.119D+00
+        W(28) = 0.177D+00
+        W(29) = 0.246D+00
+        W(30) = 0.319D-01
+        Y(1) = 3.42947415189D0
+        Y(2) = 3.35386959711D0
+        Y(3) = 1.35494901715D0
+        Y(4) = 6.64145542550D0
+        Y(5) = 5.97156957878D0
+        Y(6) = 2.18231499728D0
+        Y(7) = 11.2630437207D0
+        Y(8) = 14.6952576794D0
+        Y(9) = 6.27960525067D0
+        Y(10) = -30.1552268759D0
+        Y(11) = 1.65699966404D0
+        Y(12) = 1.43785752721D0
+        Y(13) = -21.1238353380D0
+        Y(14) = 28.4465098142D0
+        Y(15) = 15.3882659679D0
+        Y(16) = -.557160570446D0
+        Y(17) = .505696783289D0
+        Y(18) = .230578543901D0
+        Y(19) = -.415570776342D0
+        Y(20) = .365682722812D0
+        Y(21) = .169143213293D0
+        Y(22) = -.325325669158D0
+        Y(23) = .189706021964D0
+        Y(24) = .0877265322780D0
+        Y(25) = -.0240476254170D0
+        Y(26) = -.287659532608D0
+        Y(27) = -.117219543175D0
+        Y(28) = -.176860753121D0
+        Y(29) = -.216393453025D0
+        Y(30) = -.0148647893090D0
+        GO TO 330
+
+!     PROBLEM CLASS D
+
+170     CONTINUE
+!     PROBLEM D1, D2, D3, D4, D5
+        E = .2D0*(REAL(ID)-3.D1) - .1D0
+        N = 4
+        IF (ID/=31) GO TO 180
+        W(1) = 0.110D+01
+        W(2) = 0.995D+00
+        W(3) = 0.101D+01
+        W(4) = 0.111D+01
+180     IF (ID/=32) GO TO 190
+        W(1) = 0.130D+01
+        W(2) = 0.954D+00
+        W(3) = 0.105D+01
+        W(4) = 0.136D+01
+190     IF (ID/=33) GO TO 200
+        W(1) = 0.150D+01
+        W(2) = 0.866D+00
+        W(3) = 0.115D+01
+        W(4) = 0.173D+01
+200     IF (ID/=34) GO TO 210
+        W(1) = 0.170D+01
+        W(2) = 0.714D+00
+        W(3) = 0.140D+01
+        W(4) = 0.238D+01
+210     IF (ID/=35) GO TO 220
+        W(1) = 0.190D+01
+        W(2) = 0.436D+00
+        W(3) = 0.229D+01
+        W(4) = 0.436D+01
+220     CONTINUE
+        Y(1) = 1.0D0 - E
+        Y(2) = 0.0D0
+        Y(3) = 0.0D0
+        Y(4) = SQRT((1.0D0+E)/(1.0D0-E))
+        GO TO 330
+
+!     PROBLEM CLASS E
+
+!     41:
+230     CONTINUE
+!     PROBLEM E1
+        N = 2
+        W(1) = 0.679D+00
+        W(2) = 0.478D+00
+        E = .79788456080286536D0
+        Y(1) = E*.84147098480789651D0
+        Y(2) = E*.11956681346419146D0
+        GO TO 330
+!     42:
+240     CONTINUE
+!     PROBLEM E2
+        N = 2
+        W(1) = 0.201D+01
+        W(2) = 0.268D+01
+        Y(1) = 2.0D0
+        Y(2) = 0.0D0
+        GO TO 330
+!     43:
+250     CONTINUE
+!     PROBLEM E3
+        N = 2
+        W(1) = 0.116D+01
+        W(2) = 0.128D+01
+        Y(1) = 0.0D0
+        Y(2) = 0.0D0
+        GO TO 330
+!     44:
+260     CONTINUE
+!     PROBLEM E4
+        N = 2
+        W(1) = 0.340D+02
+        W(2) = 0.277D+00
+        Y(1) = 3.D1
+        Y(2) = 0.D0
+        GO TO 330
+!     45:
+270     CONTINUE
+!     PROBLEM E5
+        N = 2
+        W(1) = 0.141D+02
+        W(2) = 0.240D+01
+        Y(1) = 0.0D0
+        Y(2) = 0.0D0
+        GO TO 330
+
+!     PROBLEM CLASS F
+
+!     51:
+280     CONTINUE
+!     PROBLEM F1
+        N = 2
+        W(1) = 0.129D+02
+        W(2) = 0.384D+02
+        Y(1) = 0.0D0
+        Y(2) = 0.0D0
+        HMAX = 1.0D0
+        GO TO 330
+!     52:
+290     CONTINUE
+!     PROBLEM F2
+        N = 1
+        W(1) = 0.110D+03
+        Y(1) = 110.0D0
+        HMAX = 1.0D0
+        GO TO 330
+!     53:
+300     CONTINUE
+!     PROBLEM F3
+        N = 2
+        W(1) = 0.131D+01
+        W(2) = 0.737D+00
+        Y(1) = 0.0D0
+        Y(2) = 0.0D0
+        HMAX = 1.0D0
+        HBEGIN = 0.9D0
+        GO TO 330
+!     54:
+310     CONTINUE
+!     PROBLEM F4
+        N = 1
+        W(1) = 0.152D+01
+        Y(1) = 1.0D0
+        HMAX = 10.0D0
+        GO TO 330
+!     55:
+320     CONTINUE
+!     PROBLEM F5
+        N = 1
+        W(1) = 0.100D+01
+        Y(1) = 1.0D0
+        HMAX = 20.0D0
+330     CONTINUE
+        IF (IWT<0.) GO TO 340
+        DO I = 1, N
+          Y(I) = Y(I)/W(I)
+        END DO
+340     CONTINUE
+        RETURN
+
+90000   FORMAT ('AN INVALID INTERNAL PROBLEM ID OF ',I4, &
+          ' WAS FOUND BY THE IVALU ROUTINE',/ &
+          ' RUN TERMINATED. CHECK THE DATA.')
+      END SUBROUTINE IVALU
+
+      SUBROUTINE EVALU(Y)
+
+!     ROUTINE TO PROVIDE THE 'TRUE' SOLUTION OF THE DIFFERENTIAL
+!     EQUATION EVALUATED AT THE ENDPOINT OF THE INTEGRATION.
+
+!     PARAMETER  (OUTPUT)
+!        Y      - THE TRUE SOLUTION VECTOR EVALUATED AT THE ENDPOINT
+
+!     PARAMETERS (INPUT)
+!        N      - DIMENSION OF THE PROBLEM
+!        W      - VECTOR OF WEIGHTS USED TO SCALE THE PROBLEM
+!                 IF THIS OPTION IS SELECTED
+!        IWT    - FLAG USED TO SIGNAL WHEN THE SCALED PROBLEM IS
+!                 BEING SOLVED
+!        ID     - FLAG USED TO INDICATE WHICH EQUATION IS BEING
+!                 SOLVED
+
+        IMPLICIT NONE
+
+!     .. Scalar Arguments ..
+!     INTEGER ID, IWT, N
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(51)
+!     DOUBLE PRECISION W(51)
+!     .. Local Scalars ..
+        INTEGER I
+
+!     .. Executable Statements ..
+
+!     GOTO (20, 40, 60, 80, 100, 620, 620, 620, 620, 620, 120, 140, 160,&
+!     180, 200, 620, 620, 620, 620, 620, 220, 240, 260, 280, 300, 620,  &
+!     620, 620, 620, 620, 320, 340, 360, 380, 400, 620, 620, 620, 620,  &
+!     620, 420, 440, 460, 480, 500, 620, 620, 620, 620, 620, 520, 540,  &
+!     560, 580, 600) ID
+        GO TO (10,20,30,40,50,310,310,310,310,310,60,70,80,90,100,310,310,310, &
+          310,310,110,120,130,140,150,310,310,310,310,310,160,170,180,190,200, &
+          310,310,310,310,310,210,220,230,240,250,310,310,310,310,310,260,270, &
+          280,290,300) ID
+        GO TO 310
+
+!     PROBLEM CLASS A
+
+!     1:
+!        PROBLEM A1
+10      Y(1) = 2.061153353012535D-09
+        GO TO 310
+!     2:
+!        PROBLEM A2
+20      Y(1) = 2.182178902359887D-01
+        GO TO 310
+!     3:
+!        PROBLEM A3
+30      Y(1) = 2.491650271850414D+00
+        GO TO 310
+!     4:
+!        PROBLEM A4
+40      Y(1) = 1.773016648131483D+01
+        GO TO 310
+!     5:
+!        PROBLEM A5
+50      Y(1) = -7.887826688964196D-01
+        GO TO 310
+
+!     PROBLEM CLASS B
+
+!     11:
+!        PROBLEM B1
+60      Y(1) = 6.761876008576667D-01
+        Y(2) = 1.860816099640036D-01
+        GO TO 310
+!     12:
+!        PROBLEM B2
+70      Y(1) = 1.000000001030576D+00
+        Y(2) = 1.000000000000000D+00
+        Y(3) = 9.999999989694235D-01
+        GO TO 310
+!     13:
+!        PROBLEM B3
+80      Y(1) = 2.061153488557776D-09
+        Y(2) = 5.257228022048349D-02
+        Y(3) = 9.474277177183630D-01
+        GO TO 310
+!     14:
+!        PROBLEM B4
+90      Y(1) = 9.826950928005993D-01
+        Y(2) = 2.198447081694832D+00
+        Y(3) = 9.129452507276399D-01
+        GO TO 310
+!     15:
+!        PROBLEM B5
+100     Y(1) = -9.396570798729192D-01
+        Y(2) = -3.421177754000779D-01
+        Y(3) = 7.414126596199957D-01
+        GO TO 310
+
+!     PROBLEM CLASS C
+
+!     21:
+!        PROBLEM C1
+110     Y(1) = 2.061153622240064D-09
+        Y(2) = 4.122307244619555D-08
+        Y(3) = 4.122307244716968D-07
+        Y(4) = 2.748204829855288D-06
+        Y(5) = 1.374102414941961D-05
+        Y(6) = 5.496409659803266D-05
+        Y(7) = 1.832136553274552D-04
+        Y(8) = 5.234675866508716D-04
+        Y(9) = 1.308668966628220D-03
+        Y(10) = 9.979127409508656D-01
+        GO TO 310
+!     22:
+!        PROBLEM C2
+120     Y(1) = 2.061153577984930D-09
+        Y(2) = 2.061153573736588D-09
+        Y(3) = 2.061153569488245D-09
+        Y(4) = 2.061153565239902D-09
+        Y(5) = 2.061153560991560D-09
+        Y(6) = 2.061153556743217D-09
+        Y(7) = 2.061153552494874D-09
+        Y(8) = 2.061153548246532D-09
+        Y(9) = 2.061153543998189D-09
+        Y(10) = 9.999999814496180D-01
+        GO TO 310
+!     23:
+!        PROBLEM C3
+130     Y(1) = 2.948119211022058D-03
+        Y(2) = 5.635380154844266D-03
+        Y(3) = 7.829072515926013D-03
+        Y(4) = 9.348257908594937D-03
+        Y(5) = 1.007943610301970D-02
+        Y(6) = 9.982674171429909D-03
+        Y(7) = 9.088693332766085D-03
+        Y(8) = 7.489115195185912D-03
+        Y(9) = 5.322964130953349D-03
+        Y(10) = 2.762434379029886D-03
+        GO TO 310
+!     24:
+!        PROBLEM C4
+140     Y(1) = 3.124111453721466D-03
+        Y(2) = 6.015416842150318D-03
+        Y(3) = 8.470021834842650D-03
+        Y(4) = 1.033682931733337D-02
+        Y(5) = 1.153249572873923D-02
+        Y(6) = 1.204549525737964D-02
+        Y(7) = 1.192957068015293D-02
+        Y(8) = 1.128883207111195D-02
+        Y(9) = 1.025804501391024D-02
+        Y(10) = 8.982017581934167D-03
+        Y(11) = 7.597500902492453D-03
+        Y(12) = 6.219920556824985D-03
+        Y(13) = 4.935916341009131D-03
+        Y(14) = 3.801432544256119D-03
+        Y(15) = 2.844213677587894D-03
+        Y(16) = 2.069123394222672D-03
+        Y(17) = 1.464687282843915D-03
+        Y(18) = 1.009545263941126D-03
+        Y(19) = 6.779354330227017D-04
+        Y(20) = 4.437815269118510D-04
+        Y(21) = 2.833264542938954D-04
+        Y(22) = 1.765005798796805D-04
+        Y(23) = 1.073342592697238D-04
+        Y(24) = 6.374497601777217D-05
+        Y(25) = 3.698645309704183D-05
+        Y(26) = 2.097466832643746D-05
+        Y(27) = 1.162956710412555D-05
+        Y(28) = 6.306710405783322D-06
+        Y(29) = 3.346286430868515D-06
+        Y(30) = 1.737760074184334D-06
+        Y(31) = 8.835366904275847D-07
+        Y(32) = 4.399520411127637D-07
+        Y(33) = 2.146181897152360D-07
+        Y(34) = 1.025981211654928D-07
+        Y(35) = 4.807864068784215D-08
+        Y(36) = 2.209175152474847D-08
+        Y(37) = 9.956251263138180D-09
+        Y(38) = 4.402193653748924D-09
+        Y(39) = 1.910149382204028D-09
+        Y(40) = 8.135892921473050D-10
+        Y(41) = 3.402477118549235D-10
+        Y(42) = 1.397485617545782D-10
+        Y(43) = 5.638575303049199D-11
+        Y(44) = 2.235459707956947D-11
+        Y(45) = 8.710498036398032D-12
+        Y(46) = 3.336554275346643D-12
+        Y(47) = 1.256679567784939D-12
+        Y(48) = 4.654359053128788D-13
+        Y(49) = 1.693559145599857D-13
+        Y(50) = 5.996593816663054D-14
+        Y(51) = 1.891330702629865D-14
+        GO TO 310
+!     25:
+!        PROBLEM C5
+150     Y(1) = -4.792730224323733D+00
+        Y(2) = -2.420550725448973D+00
+        Y(3) = -9.212509306014886D-01
+        Y(4) = -4.217310404035213D+00
+        Y(5) = 7.356202947498970D+00
+        Y(6) = 3.223785985421212D+00
+        Y(7) = 4.035559443262270D+00
+        Y(8) = 1.719865528670555D+01
+        Y(9) = 7.478910794233703D+00
+        Y(10) = -2.998759326324844D+01
+        Y(11) = -4.107310937550929D+00
+        Y(12) = -9.277008321754407D-01
+        Y(13) = -2.442125302518482D+01
+        Y(14) = 2.381459045746554D+01
+        Y(15) = 1.492096306951359D+01
+        Y(16) = 3.499208963063806D-01
+        Y(17) = -5.748487687912825D-01
+        Y(18) = -2.551694020879149D-01
+        Y(19) = -5.237040978903326D-01
+        Y(20) = -2.493000463579661D-01
+        Y(21) = -8.045341642044464D-02
+        Y(22) = -3.875289237334110D-01
+        Y(23) = 5.648603288767891D-02
+        Y(24) = 3.023606472143342D-02
+        Y(25) = 4.133856546712445D-02
+        Y(26) = -2.862393029841379D-01
+        Y(27) = -1.183032405136207D-01
+        Y(28) = -1.511986457359206D-01
+        Y(29) = -2.460068894318766D-01
+        Y(30) = -3.189687411323877D-02
+        GO TO 310
+
+!     PROBLEM CLASS D
+
+!     31:
+!        PROBLEM D1
+160     Y(1) = 2.198835352008397D-01
+        Y(2) = 9.427076846341813D-01
+        Y(3) = -9.787659841058176D-01
+        Y(4) = 3.287977990962036D-01
+        GO TO 310
+!     32:
+!        PROBLEM D2
+170     Y(1) = -1.777027357140412D-01
+        Y(2) = 9.467784719905892D-01
+        Y(3) = -1.030294163192969D+00
+        Y(4) = 1.211074890053952D-01
+        GO TO 310
+!     33:
+!        PROBLEM D3
+180     Y(1) = -5.780432953035361D-01
+        Y(2) = 8.633840009194193D-01
+        Y(3) = -9.595083730380727D-01
+        Y(4) = -6.504915126712089D-02
+        GO TO 310
+!     34:
+!        PROBLEM D4
+190     Y(1) = -9.538990293416394D-01
+        Y(2) = 6.907409024219432D-01
+        Y(3) = -8.212674270877433D-01
+        Y(4) = -1.539574259125825D-01
+        GO TO 310
+!     35:
+!        PROBLEM D5
+200     Y(1) = -1.295266250987574D+00
+        Y(2) = 4.003938963792321D-01
+        Y(3) = -6.775390924707566D-01
+        Y(4) = -1.270838154278686D-01
+        GO TO 310
+
+!     PROBLEM CLASS E
+
+!     41:
+!        PROBLEM E1
+210     Y(1) = 1.456723600728308D-01
+        Y(2) = -9.883500195574063D-02
+        GO TO 310
+!     42:
+!        PROBLEM E2
+220     Y(1) = 2.008149762174948D+00
+        Y(2) = -4.250887527320057D-02
+        GO TO 310
+!     43:
+!        PROBLEM E3
+230     Y(1) = -1.004178858647128D-01
+        Y(2) = 2.411400132095954D-01
+        GO TO 310
+!     44:
+!        PROBLEM E4
+240     Y(1) = 3.395091444646555D+01
+        Y(2) = 2.767822659672869D-01
+        GO TO 310
+!     45:
+!        PROBLEM E5
+250     Y(1) = 1.411797390542629D+01
+        Y(2) = 2.400000000000002D+00
+        GO TO 310
+
+!     PROBLEM CLASS F
+
+!     51:
+!        PROBLEM F1
+260     Y(1) = -1.294460621213470D1
+        Y(2) = -2.208575158908672D-15
+        GO TO 310
+!     52:
+!        PROBLEM F2
+270     Y(1) = 70.03731057008607D0
+        GO TO 310
+!     53:
+!        PROBLEM F3
+280     Y(1) = -3.726957553088175D-1
+        Y(2) = -6.230137949234190D-1
+        GO TO 310
+!     54:
+!        PROBLEM F4
+290     Y(1) = 9.815017249707434D-11
+        GO TO 310
+!     55:
+!        PROBLEM F5
+300     Y(1) = 1.0D0
+310     CONTINUE
+        IF (IWT<0) GO TO 320
+        DO I = 1, N
+          Y(I) = Y(I)/W(I)
+        END DO
+320     CONTINUE
+        RETURN
+      END SUBROUTINE EVALU
+
+      SUBROUTINE FCN(X,Y,YP)
+
+!     ROUTINE TO EVALUATE THE DERIVATIVE F(X,Y) CORRESPONDING TO
+!     THE DIFFERENTIAL EQUATION:
+!                    DY/DX = F(X,Y) .
+!     THE ROUTINE STORES THE VECTOR OF DERIVATIVES IN YP(*). THE
+!     PARTICULAR EQUATION BEING INTEGRATED IS INDICATED BY THE
+!     VALUE OF THE FLAG ID WHICH IS PASSED THROUGH COMMON. THE
+!     DIFFERENTIAL EQUATION IS SCALED BY THE WEIGHT VECTOR W(*)
+!     IF THIS OPTION HAS BEEN SELECTED (IF SO IT IS SIGNALLED
+!     BY THE FLAG IWT).
+
+        IMPLICIT NONE
+
+!     .. Scalar Arguments ..
+        DOUBLE PRECISION X
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(51), YP(51)
+!     .. Local Scalars ..
+        DOUBLE PRECISION C1, C2, D, EX, K2, M0, P, TEMP
+        INTEGER I, I3, I3M2, ITEMP, J, L, LL, MM
+!     .. Local Arrays ..
+        DOUBLE PRECISION M(5), Q(5,5), R(5), YTEMP(51)
+!     .. Data statements ..
+!     THE FOLLOWING DATA IS FOR PROBLEM C5 AND DEFINES THE MASSES
+!     OF THE 5 OUTER PLANETS ETC. IN SOLAR UNITS.
+!     K2 IS THE GRAVITATIONAL CONSTANT.
+!     THE NEXT DATA IS FOR PROBLEMS F1 AND F5.
+!     C1 IS PI**2 + 0.1**2 AND C2 IS SUM I**(4/3) FOR I=1 TO 19.
+        DATA M0/1.00000597682D0/, M/.954786104043D-3, .285583733151D-3, &
+          .437273164546D-4, .517759138449D-4, .277777777778D-5/
+        DATA K2/2.95912208286D0/
+        DATA EX, C1, C2/.33333333333333333D0, 9.879604401089358D0, &
+          438.4461015267790D0/
+
+!     .. Executable Statements ..
+
+        NFCN = NFCN + 1
+        IF (IWT<0) GO TO 10
+        DO I = 1, N
+          YTEMP(I) = Y(I)
+          Y(I) = Y(I)*W(I)
+        END DO
+10      CONTINUE
+        GO TO (20,30,40,50,60,330,330,330,330,330,70,80,90,100,110,330,330, &
+          330,330,330,120,130,140,150,160,330,330,330,330,330,190,190,190,190, &
+          190,330,330,330,330,330,200,210,220,230,240,330,330,330,330,330,250, &
+          270,290,300,320) ID
+        GO TO 330
+
+!     PROBLEM CLASS A
+
+!     1:
+!        PROBLEM A1
+20      YP(1) = -Y(1)
+        GO TO 330
+!     2:
+!        PROBLEM A2
+30      YP(1) = -.5D0*Y(1)*Y(1)*Y(1)
+        GO TO 330
+!     3:
+!        PROBLEM A3
+40      YP(1) = Y(1)*COS(X)
+        GO TO 330
+!     4:
+!        PROBLEM A4
+50      YP(1) = (1.0D0-Y(1)/20.0D0)*Y(1)/4.D0
+        GO TO 330
+!     5:
+!        PROBLEM A5
+60      YP(1) = (Y(1)-X)/(Y(1)+X)
+        GO TO 330
+
+!     PROBLEM CLASS B
+
+!     11:
+!        PROBLEM B1
+70      D = Y(1) - Y(1)*Y(2)
+        YP(1) = D + D
+        YP(2) = -(Y(2)-Y(1)*Y(2))
+        GO TO 330
+!     12:
+!        PROBLEM B2
+80      YP(1) = -Y(1) + Y(2)
+        YP(3) = Y(2) - Y(3)
+        YP(2) = -YP(1) - YP(3)
+        GO TO 330
+!     13:
+!        PROBLEM B3
+90      D = Y(2)*Y(2)
+        YP(1) = -Y(1)
+        YP(2) = Y(1) - D
+        YP(3) = D
+        GO TO 330
+!     14:
+!        PROBLEM B4
+100     D = SQRT(Y(1)*Y(1)+Y(2)*Y(2))
+        YP(1) = -Y(2) - Y(1)*Y(3)/D
+        YP(2) = Y(1) - Y(2)*Y(3)/D
+        YP(3) = Y(1)/D
+        GO TO 330
+!     15:
+!        PROBLEM B5
+110     YP(1) = Y(2)*Y(3)
+        YP(2) = -Y(1)*Y(3)
+        YP(3) = -.51D0*Y(1)*Y(2)
+        GO TO 330
+
+!     PROBLEM CLASS C
+
+!     21:
+!        PROBLEM C1
+120     YP(1) = -Y(1)
+        DO I = 2, 9
+          YP(I) = Y(I-1) - Y(I)
+        END DO
+        YP(10) = Y(9)
+        GO TO 330
+!     22:
+!        PROBLEM C2
+130     YP(1) = -Y(1)
+        DO I = 2, 9
+          YP(I) = REAL(I-1)*Y(I-1) - REAL(I)*Y(I)
+        END DO
+        YP(10) = 9.0D0*Y(9)
+        GO TO 330
+!     23:
+!        PROBLEM C3
+140     YP(1) = -2.0D0*Y(1) + Y(2)
+        DO I = 2, 9
+          YP(I) = Y(I-1) - 2.0D0*Y(I) + Y(I+1)
+        END DO
+        YP(10) = Y(9) - 2.0D0*Y(10)
+        GO TO 330
+!     24:
+!        PROBLEM C4
+150     YP(1) = -2.0D0*Y(1) + Y(2)
+        DO I = 2, 50
+          YP(I) = Y(I-1) - 2.0D0*Y(I) + Y(I+1)
+        END DO
+        YP(51) = Y(50) - 2.0D0*Y(51)
+        GO TO 330
+!     25:
+!        PROBLEM C5
+160     I = 0
+        DO L = 3, 15, 3
+          I = I + 1
+          P = Y(L-2)**2 + Y(L-1)**2 + Y(L)**2
+          R(I) = 1.0D0/(P*SQRT(P))
+          J = 0
+          DO LL = 3, 15, 3
+            J = J + 1
+            IF (LL/=L) GO TO 170
+            GO TO 180
+!              THEN
+170         P = (Y(L-2)-Y(LL-2))**2 + (Y(L-1)-Y(LL-1))**2 + (Y(L)-Y(LL))**2
+            Q(I,J) = 1.0D0/(P*SQRT(P))
+            Q(J,I) = Q(I,J)
+180         CONTINUE
+          END DO
+        END DO
+        I3 = 0
+        DO I = 1, 5
+          I3 = I3 + 3
+          I3M2 = I3 - 2
+          DO LL = I3M2, I3
+            MM = LL - I3
+            YP(LL) = Y(LL+15)
+            P = 0.0D0
+            DO J = 1, 5
+              MM = MM + 3
+              IF (J/=I) P = P + M(J)*(Y(MM)*(Q(I,J)-R(J))-Y(LL)*Q(I,J))
+            END DO
+            YP(LL+15) = K2*(-(M0+M(I))*Y(LL)*R(I)+P)
+          END DO
+        END DO
+        GO TO 330
+
+!     PROBLEM CLASS D
+
+!     31:32:33:34:35:
+!        PROBLEMS D1, D2, D3, D4, D5
+190     YP(1) = Y(3)
+        YP(2) = Y(4)
+        D = Y(1)*Y(1) + Y(2)*Y(2)
+        D = SQRT(D*D*D)
+        YP(3) = -Y(1)/D
+        YP(4) = -Y(2)/D
+        GO TO 330
+
+!     PROBLEM CLASS E
+
+!     41:
+!        PROBLEM E1
+200     YP(1) = Y(2)
+        YP(2) = -(Y(2)/(X+1.0D0)+(1.0D0-.25D0/(X+1.0D0)**2)*Y(1))
+        GO TO 330
+!     42:
+!        PROBLEM E2
+210     YP(1) = Y(2)
+        YP(2) = (1.0D0-Y(1)*Y(1))*Y(2) - Y(1)
+        GO TO 330
+!     43:
+!        PROBLEM E3
+220     YP(1) = Y(2)
+        YP(2) = Y(1)**3/6.0D0 - Y(1) + 2.0D0*SIN(2.78535D0*X)
+        GO TO 330
+!     44:
+!        PROBLEM E4
+230     YP(1) = Y(2)
+        YP(2) = .032D0 - .4D0*Y(2)*Y(2)
+        GO TO 330
+!     45:
+!        PROBLEM E5
+240     YP(1) = Y(2)
+        YP(2) = SQRT(1.0D0+Y(2)*Y(2))/(25.0D0-X)
+        GO TO 330
+
+!     PROBLEM CLASS F
+
+!     51:
+!        PROBLEM F1
+250     YP(1) = Y(2)
+        YP(2) = .2D0*Y(2) - C1*Y(1)
+        ITEMP = INT(X)
+        IF ((ITEMP/2)*2==ITEMP) GO TO 260
+        YP(2) = YP(2) - 1.0D0
+        GO TO 330
+260     YP(2) = YP(2) + 1.0D0
+        GO TO 330
+!     52:
+!        PROBLEM F2
+270     ITEMP = INT(X)
+        IF ((ITEMP/2)*2==ITEMP) GO TO 280
+        YP(1) = 55.0D0 - .50D0*Y(1)
+        GO TO 330
+280     YP(1) = 55.0D0 - 1.50D0*Y(1)
+        GO TO 330
+!     53:
+!        PROBLEM F3
+290     YP(1) = Y(2)
+        YP(2) = .01D0*Y(2)*(1.0D0-Y(1)**2) - Y(1) - ABS(SIN( &
+          3.1415926535897932D0*X))
+        GO TO 330
+!     54:
+!        PROBLEM F4
+300     IF (X>10.) GO TO 310
+        TEMP = X - 5.0D0
+        YP(1) = -2.0D0/21.0D0 - 120.0D0*TEMP/(1.0D0+4.0D0*TEMP**2)**16
+        GO TO 330
+310     YP(1) = -2.0D0*Y(1)
+        GO TO 330
+!     55:
+!        PROBLEM F5
+320     YP(1) = Y(1)*(4.0D0/(3.0D0*C2))*(SIGN(ABS(X- &
+          1.0D0)**EX,X-1.0D0)+SIGN(ABS(X-2.0D0)**EX,X-2.0D0)+SIGN(ABS(X- &
+          3.0D0)**EX,X-3.0D0)+SIGN(ABS(X-4.0D0)**EX,X-4.0D0)+SIGN(ABS(X- &
+          5.0D0)**EX,X-5.0D0)+SIGN(ABS(X-6.0D0)**EX,X-6.0D0)+SIGN(ABS(X- &
+          7.0D0)**EX,X-7.0D0)+SIGN(ABS(X-8.0D0)**EX,X-8.0D0)+SIGN(ABS(X- &
+          9.0D0)**EX,X-9.0D0)+SIGN(ABS(X-10.0D0)**EX,X-10.0D0)+SIGN(ABS(X- &
+          11.0D0)**EX,X-11.0D0)+SIGN(ABS(X-12.0D0)**EX,X-12.0D0)+SIGN(ABS(X- &
+          13.0D0)**EX,X-13.0D0)+SIGN(ABS(X-14.0D0)**EX,X-14.0D0)+SIGN(ABS(X- &
+          15.0D0)**EX,X-15.0D0)+SIGN(ABS(X-16.0D0)**EX,X-16.0D0)+SIGN(ABS(X- &
+          17.0D0)**EX,X-17.0D0)+SIGN(ABS(X-18.0D0)**EX,X-18.0D0)+SIGN(ABS(X- &
+          19.0D0)**EX,X-19.0D0))
+330     CONTINUE
+        IF (IWT<0) GO TO 340
+        DO I = 1, N
+          YP(I) = YP(I)/W(I)
+          Y(I) = YTEMP(I)
+        END DO
+340     CONTINUE
+        RETURN
+      END SUBROUTINE FCN
+
+    END MODULE NONSTIFFSET
+
+!******************************************************************
+
+    PROGRAM DEMONONSTIFF
+
+      USE NONSTIFFSET
+      USE DVODE_F90_M
+
+      IMPLICIT NONE
+      INTEGER ITASK, ISTATE, ISTATS, NEQ, I, CLASS, PROBLEM, MYID, ITEST, ITOL
+      DOUBLE PRECISION RSTATS, T, TOUT, HBEGIN, HBOUND, TBEGIN, TEND, Y, EPS, &
+        YINIT, YFINAL, RELERR_TOLERANCES, ABSERR_TOLERANCES, AERROR
+      LOGICAL USEW, USEHBEGIN, ERRORS
+      DIMENSION Y(51), RSTATS(22), ISTATS(31), YINIT(51), YFINAL(51), MYID(55)
+      DIMENSION RELERR_TOLERANCES(51), ABSERR_TOLERANCES(51), AERROR(51)
+      TYPE (VODE_OPTS) :: OPTIONS
+      DATA MYID/1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 0, 0, 0, 0, &
+        0, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, 0, 0, 0, 0, &
+        0, 41, 42, 43, 44, 45, 0, 0, 0, 0, 0, 51, 52, 53, 54, 55/
+
+      OPEN (UNIT=6,FILE='nonstiffoptions.dat')
+
+      ERRORS = .FALSE.
+
+      DO ITOL = 4, 10, 2
+      WRITE(6,*) 'Results for ITOL = ', ITOL, ' follow.'
+      DO ITEST = 1, 55
+        ID = MYID(ITEST)
+        IF (ID==0) GO TO 20
+        WRITE (6,90010)
+        CLASS = ID/10
+        PROBLEM = ID - 10*CLASS
+        IF (CLASS==0) THEN
+          WRITE (6,90000) PROBLEM
+        ELSE IF (CLASS==1) THEN
+          WRITE (6,90001) PROBLEM
+        ELSE IF (CLASS==2) THEN
+          WRITE (6,90002) PROBLEM
+        ELSE IF (CLASS==3) THEN
+          WRITE (6,90003) PROBLEM
+        ELSE IF (CLASS==4) THEN
+          WRITE (6,90004) PROBLEM
+        ELSE IF (CLASS==5) THEN
+          WRITE (6,90005) PROBLEM
+        END IF
+!     Scale the odes?
+        USEW = .TRUE.
+!     Use the IVALU starting step size?
+        USEHBEGIN = .TRUE.
+        IWT = -1
+        IF (USEW) IWT = 1
+        CALL IVALU(TBEGIN,TEND,HBEGIN,HBOUND,YINIT)
+        IF (.NOT. USEHBEGIN) HBEGIN = 0.0D0
+        NEQ = N
+        T = TBEGIN
+        TOUT = TEND
+        Y(1:NEQ) = YINIT(1:NEQ)
+        EPS = 1.0D0 / 10.0D0**ITOL
+        RELERR_TOLERANCES(1:NEQ) = EPS
+        ABSERR_TOLERANCES(1:NEQ) = EPS
+        WRITE (6,90007) ID, TBEGIN, TEND, HBEGIN, HBOUND, IWT, N, EPS, Y(1:NEQ)
+        ITASK = 1
+        ISTATE = 1
+        OPTIONS = SET_OPTS(RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ), &
+          ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),MXSTEP=100000,H0=HBEGIN, &
+          HMAX=HBOUND)
+10      CONTINUE
+        CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+        IF (ISTATE<0) THEN
+          WRITE (6,90006) ISTATE
+          ERRORS = .TRUE.
+!         STOP
+        END IF
+        CALL GET_STATS(RSTATS,ISTATS)
+        WRITE (6,90009) ISTATS(11), ISTATS(12)
+        IF (TOUT<TEND) GO TO 10
+        CALL EVALU(YFINAL)
+        DO I = 1, NEQ
+          AERROR(I) = ABS(Y(I)-YFINAL(I))
+        END DO
+        WRITE (6,90008) (I,Y(I),YFINAL(I),AERROR(I),I=1,NEQ)
+20    END DO ! End of ITEST Loop
+      END DO ! End of ITOL Loop
+
+      IF (ERRORS) THEN
+         WRITE(6,90011)
+      ELSE
+         WRITE(6,90012)
+      END IF
+
+!     Format statements for this problem:
+90000 FORMAT (' Class/Problem = A',I1)
+90001 FORMAT (' Class/Problem = B',I1)
+90002 FORMAT (' Class/Problem = C',I1)
+90003 FORMAT (' Class/Problem = D',I1)
+90004 FORMAT (' Class/Problem = E',I1)
+90005 FORMAT (' Class/Problem = F',I1)
+90006 FORMAT (' An error occurred in VODE_F90. ISTATE = ',I3)
+90007 FORMAT (' Problem ID       = ',I3,/,' Initial time     = ',D15.5,/, &
+        ' Final time       = ',D15.5,/,' Initial stepsize = ',D15.5,/, &
+        ' Maximum stepsize = ',D15.5,/,' IWT flag         = ',I3,/, &
+        ' Number of odes   = ',I3,/,' Error tolerance  = ',D15.5,/, &
+        ' Initial solution = ',/,(D15.5))
+90008 FORMAT (' Computed and reference solutions and absolute', &
+        ' errors follow:',/,(I3,3D15.5))
+90009 FORMAT (' Steps = ',I10,' f-s = ',I10)
+90010 FORMAT (' _________________________________________')
+90011 FORMAT (' Errors occurred.')
+90012 FORMAT (' No errors occurred.')
+      STOP
+
+    END PROGRAM DEMONONSTIFF
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffoptions.dat
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffoptions.dat	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffoptions.dat	(revision 3477)
@@ -0,0 +1,125388 @@
+
+
+ To locate the summary results, search on the phrase
+ Summary Statistics Follow in the output file (stiffoptions.dat).
+
+
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        224 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.34133D-06
+  2    0.99999D+00    0.99999D+00    0.34259D-06
+  3    0.99999D+00    0.99999D+00    0.51723D-06
+  4    0.99999D+00    0.99999D+00    0.57532D-06
+  5    0.99999D+00    0.99999D+00    0.39636D-06
+  6    0.10000D+01    0.10000D+01    0.66556D-07
+  7    0.10000D+01    0.10000D+01    0.20715D-06
+  8    0.10000D+01    0.10000D+01    0.26641D-06
+  9    0.10000D+01    0.10000D+01    0.11845D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        152 f-s =        221 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.14992D-07
+  2    0.13685D-01    0.13685D-01    0.17063D-06
+  3    0.19229D+00    0.19229D+00    0.21302D-05
+  4    0.13534D+00    0.13534D+00    0.38420D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87708D-28    0.00000D+00    0.87708D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        520 f-s =        604 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.18462D-04    0.10042D-08    0.18461D-04
+  2   -0.58714D-04    0.20955D-08    0.58717D-04
+  3   -0.23135D-34    0.00000D+00    0.23135D-34
+  4   -0.52263D-34   -0.18767D-79    0.52263D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18968D-09    0.61813D-30    0.18968D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        236 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.40261D-11    0.11886D-21    0.40261D-11
+  2    0.24941D-12   -0.23259D-21    0.24941D-12
+  3    0.41539D-11    0.15179D-34    0.41539D-11
+  4    0.30879D-05    0.20612D-08    0.30858D-05
+  5    0.69917D-04    0.45400D-04    0.24517D-04
+  6    0.13534D+00    0.13534D+00    0.61092D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2551 f-s =       2963 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16202D-04   -0.23669D-13    0.16202D-04
+  2   -0.66245D-05    0.34489D-13    0.66245D-05
+  3    0.18048D-34    0.18049D-34    0.47720D-39
+  4    0.20612D-08    0.20612D-08    0.34557D-16
+  5    0.45400D-04    0.45400D-04    0.55984D-13
+  6    0.13534D+00    0.13534D+00    0.10815D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.37231D-03    0.39247D-03    0.20168D-04
+  2    0.38850D-03    0.38850D-03    0.31524D-08
+  3    0.40000D-03    0.40000D-03    0.70167D-11
+  4    0.20000D-01    0.20000D-01    0.11449D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        191 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.28851D-06
+  2    0.40000D-01    0.40000D-01    0.74441D-07
+  3    0.40016D-01    0.40016D-01    0.44910D-07
+  4    0.40032D-01    0.40032D-01    0.49931D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        180 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.30005D-05
+  2    0.40000D+00    0.40000D+00    0.25814D-05
+  3    0.41600D+00    0.41600D+00    0.25610D-05
+  4    0.43330D+00    0.43331D+00    0.27149D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        114 f-s =        162 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.34585D-08
+  2    0.10000D+01    0.10000D+01    0.10291D-07
+  3    0.10000D+01    0.10000D+01    0.40875D-07
+  4    0.10000D+01    0.10000D+01    0.23601D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        103 f-s =        135 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.22995D-08
+  2    0.10000D+01    0.10000D+01    0.77431D-08
+  3    0.10000D+01    0.10000D+01    0.25669D-07
+  4    0.10008D+01    0.10008D+01    0.67400D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         72 f-s =        136 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99749D+00    0.99741D+00    0.84203D-04
+  2    0.10004D+01    0.10004D+01    0.38677D-04
+  3    0.10000D+01    0.10000D+01    0.14433D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        155 f-s =        226 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41429D-05
+  2    0.25168D+00    0.25166D+00    0.18943D-04
+  3    0.99705D+00    0.99707D+00    0.14539D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        199 f-s =        307 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14472D-05
+  2    0.56309D-02    0.56309D-02    0.28225D-08
+  3    0.10007D+01    0.10007D+01    0.40200D-05
+  4    0.65374D+00    0.65374D+00    0.14949D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =         99 f-s =        156 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59768D+00    0.59765D+00    0.20796D-04
+  2    0.98755D+00    0.98757D+00    0.14645D-04
+  3   -0.51037D+00   -0.51035D+00    0.19521D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         76 f-s =        126 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99961D+00   -0.99964D+00    0.27517D-04
+  2    0.99927D+00    0.99933D+00    0.51238D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        127 f-s =        195 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.39116D-06
+  2    0.99730D+00    0.99730D+00    0.26429D-05
+  3    0.10005D+01    0.10005D+01    0.84746D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        124 f-s =        188 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.10690D-08
+  2   -0.37279D-08   -0.72884D-12    0.37272D-08
+  3    0.19309D-08    0.15348D-11    0.19294D-08
+  4    0.53712D-09   -0.10837D-11    0.53820D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        178 f-s =        245 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57301D+00   -0.57361D+00    0.60070D-03
+  2    0.56512D-01    0.56344D-01    0.16776D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        150 f-s =        273 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.26039D-02    0.26092D-02    0.53611D-05
+  2    0.33174D-02    0.33231D-02    0.57550D-05
+  3    0.99914D+00    0.99911D+00    0.35616D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        253 f-s =        378 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.69446D+00    0.69444D+00    0.11329D-04
+  2   -0.67796D+00   -0.67797D+00    0.11060D-04
+  3    0.21034D-04   -0.14501D-07    0.21049D-04
+  4   -0.20004D-04    0.13789D-07    0.20018D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         74 f-s =        100 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.56626D-05
+  2    0.94673D+00    0.94674D+00    0.51646D-05
+  3    0.99777D+00    0.99777D+00    0.12573D-05
+  4    0.94182D+00    0.94183D+00    0.55455D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        384 f-s =        745 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.42450D-05
+  2    0.15223D-03    0.15223D-03    0.10057D-08
+  3    0.99887D+00    0.99887D+00    0.42135D-05
+  4    0.32420D-02    0.32420D-02    0.83672D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         95 f-s =        137 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.92966D-05
+  2    0.52567D+00    0.52568D+00    0.12491D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        195 f-s =        274 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.27175D-07    0.80898D-07    0.53723D-07
+  2    0.23607D+00    0.23607D+00    0.94184D-07
+  3    0.20413D-04    0.20426D-04    0.13195D-07
+  4    0.99860D+00    0.99860D+00    0.56194D-07
+  5    0.99879D+00    0.99879D+00    0.44042D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        674 f-s =       1045 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.34488D-04    0.37443D-04    0.29554D-05
+  2    0.73900D-03    0.72895D-03    0.10047D-04
+  3    0.93225D-04    0.96463D-04    0.32374D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        183 f-s =        284 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.27808D-09
+  2    0.44958D+00    0.44958D+00    0.67338D-10
+  3    0.99988D+00    0.99988D+00    0.14986D-09
+  4    0.99949D+00    0.99949D+00    0.69479D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        287 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.34119D-06
+  2    0.99999D+00    0.99999D+00    0.34133D-06
+  3    0.99999D+00    0.99999D+00    0.51680D-06
+  4    0.99999D+00    0.99999D+00    0.57503D-06
+  5    0.99999D+00    0.99999D+00    0.39600D-06
+  6    0.10000D+01    0.10000D+01    0.66321D-07
+  7    0.10000D+01    0.10000D+01    0.20739D-06
+  8    0.10000D+01    0.10000D+01    0.26654D-06
+  9    0.10000D+01    0.10000D+01    0.11850D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        152 f-s =        249 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.15147D-07
+  2    0.13685D-01    0.13685D-01    0.17233D-06
+  3    0.19229D+00    0.19229D+00    0.21522D-05
+  4    0.13534D+00    0.13534D+00    0.38212D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        391 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87706D-28    0.00000D+00    0.87706D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        520 f-s =        684 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.18463D-04    0.10042D-08    0.18462D-04
+  2   -0.58716D-04    0.20955D-08    0.58718D-04
+  3   -0.23138D-34    0.00000D+00    0.23138D-34
+  4   -0.52277D-34   -0.18767D-79    0.52277D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        190 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        196 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        302 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.40260D-11    0.11886D-21    0.40260D-11
+  2    0.24954D-12   -0.23259D-21    0.24954D-12
+  3    0.41539D-11    0.15179D-34    0.41539D-11
+  4    0.30879D-05    0.20612D-08    0.30858D-05
+  5    0.69917D-04    0.45400D-04    0.24517D-04
+  6    0.13534D+00    0.13534D+00    0.61093D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2551 f-s =       3551 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16197D-04   -0.23669D-13    0.16197D-04
+  2   -0.66189D-05    0.34489D-13    0.66189D-05
+  3    0.18048D-34    0.18049D-34    0.47720D-39
+  4    0.20612D-08    0.20612D-08    0.34555D-16
+  5    0.45400D-04    0.45400D-04    0.56004D-13
+  6    0.13534D+00    0.13534D+00    0.10827D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        144 f-s =        237 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.39045D-03    0.39247D-03    0.20211D-05
+  2    0.38850D-03    0.38850D-03    0.27513D-08
+  3    0.40000D-03    0.40000D-03    0.18907D-14
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        134 f-s =        210 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.38024D-05
+  2    0.40000D-01    0.40000D-01    0.35167D-07
+  3    0.40016D-01    0.40016D-01    0.14096D-06
+  4    0.40032D-01    0.40032D-01    0.98699D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        198 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.74788D-06
+  2    0.40000D+00    0.40000D+00    0.23855D-06
+  3    0.41600D+00    0.41600D+00    0.14033D-06
+  4    0.43331D+00    0.43331D+00    0.17981D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        107 f-s =        175 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.27031D-06
+  2    0.10000D+01    0.10000D+01    0.59874D-06
+  3    0.10000D+01    0.10000D+01    0.10898D-05
+  4    0.10000D+01    0.10000D+01    0.21357D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =         97 f-s =        158 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.12428D-05
+  2    0.10000D+01    0.10000D+01    0.27612D-05
+  3    0.99999D+00    0.10000D+01    0.54762D-05
+  4    0.10007D+01    0.10008D+01    0.11030D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         72 f-s =        151 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.99749D+00    0.99741D+00    0.83964D-04
+  2    0.10004D+01    0.10004D+01    0.38712D-04
+  3    0.10000D+01    0.10000D+01    0.33307D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        248 f-s =        436 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.42049D-06
+  2    0.25166D+00    0.25166D+00    0.20016D-06
+  3    0.99706D+00    0.99707D+00    0.14727D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        209 f-s =        346 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.35581D-06
+  2    0.56309D-02    0.56309D-02    0.98871D-08
+  3    0.10007D+01    0.10007D+01    0.98823D-06
+  4    0.65374D+00    0.65374D+00    0.35664D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =         97 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59768D+00    0.59765D+00    0.23083D-04
+  2    0.98755D+00    0.98757D+00    0.16256D-04
+  3   -0.51037D+00   -0.51035D+00    0.22488D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         76 f-s =        134 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99961D+00   -0.99964D+00    0.27517D-04
+  2    0.99927D+00    0.99933D+00    0.51238D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        129 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.11770D-05
+  2    0.99729D+00    0.99730D+00    0.79526D-05
+  3    0.10005D+01    0.10005D+01    0.54080D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        124 f-s =        200 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.19644D-08
+  2   -0.39269D-08   -0.72884D-12    0.39261D-08
+  3    0.17084D-08    0.15348D-11    0.17069D-08
+  4    0.63483D-09   -0.10837D-11    0.63591D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        166 f-s =        286 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57293D+00   -0.57361D+00    0.68612D-03
+  2    0.56530D-01    0.56344D-01    0.18554D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        134 f-s =        206 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.26134D-02    0.26092D-02    0.41565D-05
+  2    0.33277D-02    0.33231D-02    0.46013D-05
+  3    0.99912D+00    0.99911D+00    0.18211D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        316 f-s =        521 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.69445D+00    0.69444D+00    0.10294D-04
+  2   -0.67796D+00   -0.67797D+00    0.10178D-04
+  3    0.19004D-04   -0.14501D-07    0.19018D-04
+  4   -0.18512D-04    0.13789D-07    0.18525D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         80 f-s =        140 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.54941D-05
+  2    0.94673D+00    0.94674D+00    0.40348D-05
+  3    0.99777D+00    0.99777D+00    0.12823D-05
+  4    0.94182D+00    0.94183D+00    0.43454D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        260 f-s =        555 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.64518D-05
+  2    0.15225D-03    0.15223D-03    0.17056D-07
+  3    0.99887D+00    0.99887D+00    0.64038D-05
+  4    0.32420D-02    0.32420D-02    0.14198D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         95 f-s =        152 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.92640D-05
+  2    0.52567D+00    0.52568D+00    0.12435D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        184 f-s =        334 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.80905D-07    0.80898D-07    0.70220D-11
+  2    0.23606D+00    0.23607D+00    0.52901D-05
+  3    0.20426D-04    0.20426D-04    0.10795D-09
+  4    0.99861D+00    0.99860D+00    0.52485D-05
+  5    0.99881D+00    0.99879D+00    0.27632D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        658 f-s =       1139 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.35341D-04    0.37443D-04    0.21021D-05
+  2    0.73521D-03    0.72895D-03    0.62567D-05
+  3    0.94301D-04    0.96463D-04    0.21616D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        193 f-s =        341 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.23881D-07
+  2    0.44958D+00    0.44958D+00    0.21452D-07
+  3    0.99988D+00    0.99988D+00    0.47789D-07
+  4    0.99949D+00    0.99949D+00    0.87374D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        224 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.34133D-06
+  2    0.99999D+00    0.99999D+00    0.34259D-06
+  3    0.99999D+00    0.99999D+00    0.51723D-06
+  4    0.99999D+00    0.99999D+00    0.57532D-06
+  5    0.99999D+00    0.99999D+00    0.39636D-06
+  6    0.10000D+01    0.10000D+01    0.66556D-07
+  7    0.10000D+01    0.10000D+01    0.20715D-06
+  8    0.10000D+01    0.10000D+01    0.26641D-06
+  9    0.10000D+01    0.10000D+01    0.11845D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        152 f-s =        221 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.14992D-07
+  2    0.13685D-01    0.13685D-01    0.17063D-06
+  3    0.19229D+00    0.19229D+00    0.21302D-05
+  4    0.13534D+00    0.13534D+00    0.38420D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87708D-28    0.00000D+00    0.87708D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        520 f-s =        604 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.18462D-04    0.10042D-08    0.18461D-04
+  2   -0.58714D-04    0.20955D-08    0.58717D-04
+  3   -0.23135D-34    0.00000D+00    0.23135D-34
+  4   -0.52263D-34   -0.18767D-79    0.52263D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18968D-09    0.61813D-30    0.18968D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        236 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.40261D-11    0.11886D-21    0.40261D-11
+  2    0.24941D-12   -0.23259D-21    0.24941D-12
+  3    0.41539D-11    0.15179D-34    0.41539D-11
+  4    0.30879D-05    0.20612D-08    0.30858D-05
+  5    0.69917D-04    0.45400D-04    0.24517D-04
+  6    0.13534D+00    0.13534D+00    0.61092D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2551 f-s =       2963 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16202D-04   -0.23669D-13    0.16202D-04
+  2   -0.66245D-05    0.34489D-13    0.66245D-05
+  3    0.18048D-34    0.18049D-34    0.47720D-39
+  4    0.20612D-08    0.20612D-08    0.34557D-16
+  5    0.45400D-04    0.45400D-04    0.55984D-13
+  6    0.13534D+00    0.13534D+00    0.10815D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.37231D-03    0.39247D-03    0.20168D-04
+  2    0.38850D-03    0.38850D-03    0.31524D-08
+  3    0.40000D-03    0.40000D-03    0.70167D-11
+  4    0.20000D-01    0.20000D-01    0.11449D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        191 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.28851D-06
+  2    0.40000D-01    0.40000D-01    0.74441D-07
+  3    0.40016D-01    0.40016D-01    0.44910D-07
+  4    0.40032D-01    0.40032D-01    0.49931D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        180 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.30005D-05
+  2    0.40000D+00    0.40000D+00    0.25814D-05
+  3    0.41600D+00    0.41600D+00    0.25610D-05
+  4    0.43330D+00    0.43331D+00    0.27149D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        114 f-s =        162 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.34585D-08
+  2    0.10000D+01    0.10000D+01    0.10291D-07
+  3    0.10000D+01    0.10000D+01    0.40875D-07
+  4    0.10000D+01    0.10000D+01    0.23601D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        103 f-s =        135 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.22995D-08
+  2    0.10000D+01    0.10000D+01    0.77431D-08
+  3    0.10000D+01    0.10000D+01    0.25669D-07
+  4    0.10008D+01    0.10008D+01    0.67400D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         72 f-s =        136 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99749D+00    0.99741D+00    0.84203D-04
+  2    0.10004D+01    0.10004D+01    0.38677D-04
+  3    0.10000D+01    0.10000D+01    0.14433D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        155 f-s =        226 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41429D-05
+  2    0.25168D+00    0.25166D+00    0.18943D-04
+  3    0.99705D+00    0.99707D+00    0.14539D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        199 f-s =        307 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14472D-05
+  2    0.56309D-02    0.56309D-02    0.28225D-08
+  3    0.10007D+01    0.10007D+01    0.40200D-05
+  4    0.65374D+00    0.65374D+00    0.14949D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =         99 f-s =        156 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59768D+00    0.59765D+00    0.20796D-04
+  2    0.98755D+00    0.98757D+00    0.14645D-04
+  3   -0.51037D+00   -0.51035D+00    0.19521D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         76 f-s =        126 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99961D+00   -0.99964D+00    0.27517D-04
+  2    0.99927D+00    0.99933D+00    0.51238D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        127 f-s =        195 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.39116D-06
+  2    0.99730D+00    0.99730D+00    0.26429D-05
+  3    0.10005D+01    0.10005D+01    0.84746D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        124 f-s =        188 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.10690D-08
+  2   -0.37279D-08   -0.72884D-12    0.37272D-08
+  3    0.19309D-08    0.15348D-11    0.19294D-08
+  4    0.53712D-09   -0.10837D-11    0.53820D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        178 f-s =        245 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57301D+00   -0.57361D+00    0.60070D-03
+  2    0.56512D-01    0.56344D-01    0.16776D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        150 f-s =        273 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.26039D-02    0.26092D-02    0.53611D-05
+  2    0.33174D-02    0.33231D-02    0.57550D-05
+  3    0.99914D+00    0.99911D+00    0.35616D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        253 f-s =        378 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.69446D+00    0.69444D+00    0.11329D-04
+  2   -0.67796D+00   -0.67797D+00    0.11060D-04
+  3    0.21034D-04   -0.14501D-07    0.21049D-04
+  4   -0.20004D-04    0.13789D-07    0.20018D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         74 f-s =        100 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.56626D-05
+  2    0.94673D+00    0.94674D+00    0.51646D-05
+  3    0.99777D+00    0.99777D+00    0.12573D-05
+  4    0.94182D+00    0.94183D+00    0.55455D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        384 f-s =        745 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.42450D-05
+  2    0.15223D-03    0.15223D-03    0.10057D-08
+  3    0.99887D+00    0.99887D+00    0.42135D-05
+  4    0.32420D-02    0.32420D-02    0.83672D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         95 f-s =        137 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.92966D-05
+  2    0.52567D+00    0.52568D+00    0.12491D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        195 f-s =        274 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.27175D-07    0.80898D-07    0.53723D-07
+  2    0.23607D+00    0.23607D+00    0.94184D-07
+  3    0.20413D-04    0.20426D-04    0.13195D-07
+  4    0.99860D+00    0.99860D+00    0.56194D-07
+  5    0.99879D+00    0.99879D+00    0.44042D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        674 f-s =       1045 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.34488D-04    0.37443D-04    0.29554D-05
+  2    0.73900D-03    0.72895D-03    0.10047D-04
+  3    0.93225D-04    0.96463D-04    0.32374D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        183 f-s =        284 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.27808D-09
+  2    0.44958D+00    0.44958D+00    0.67338D-10
+  3    0.99988D+00    0.99988D+00    0.14986D-09
+  4    0.99949D+00    0.99949D+00    0.69479D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30489D-06
+  2   -0.90865D-08    0.20612D-08    0.11148D-07
+  3    0.24157D-22    0.28230D-55    0.24157D-22
+  4   -0.15644D-21    0.52358D-51    0.15644D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        206 f-s =        330 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.38582D-05
+  2    0.99999D+00    0.99999D+00    0.38580D-05
+  3    0.99999D+00    0.99999D+00    0.36148D-05
+  4    0.99999D+00    0.99999D+00    0.32319D-05
+  5    0.99999D+00    0.99999D+00    0.27472D-05
+  6    0.99999D+00    0.10000D+01    0.21917D-05
+  7    0.99999D+00    0.10000D+01    0.15990D-05
+  8    0.10000D+01    0.10000D+01    0.10053D-05
+  9    0.10000D+01    0.10000D+01    0.44680D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        206 f-s =        299 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.13323D-08
+  2    0.13685D-01    0.13685D-01    0.14068D-07
+  3    0.19229D+00    0.19229D+00    0.18930D-06
+  4    0.13534D+00    0.13534D+00    0.74264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33848D-18    0.22774D-54    0.33848D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        686 f-s =        795 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.52997D-05    0.10042D-08    0.53007D-05
+  2    0.19335D-04    0.20955D-08    0.19333D-04
+  3   -0.57221D-42    0.00000D+00    0.57221D-42
+  4    0.11111D-41   -0.18767D-79    0.11111D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        276 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22556D-10    0.11886D-21    0.22556D-10
+  2   -0.37063D-10   -0.23259D-21    0.37063D-10
+  3   -0.33232D-14    0.15179D-34    0.33232D-14
+  4    0.13648D-07    0.20612D-08    0.11587D-07
+  5    0.46631D-04    0.45400D-04    0.12312D-05
+  6    0.13534D+00    0.13534D+00    0.92459D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2619 f-s =       3088 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22347D-04   -0.23669D-13    0.22347D-04
+  2   -0.15450D-05    0.34489D-13    0.15450D-05
+  3    0.18048D-34    0.18049D-34    0.31900D-39
+  4    0.20612D-08    0.20612D-08    0.32924D-16
+  5    0.45400D-04    0.45400D-04    0.15320D-13
+  6    0.13534D+00    0.13534D+00    0.95440D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        254 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39226D-03    0.39247D-03    0.20968D-06
+  2    0.38850D-03    0.38850D-03    0.11918D-11
+  3    0.40000D-03    0.40000D-03    0.21684D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        177 f-s =        252 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.55706D-07
+  2    0.40000D-01    0.40000D-01    0.46668D-08
+  3    0.40016D-01    0.40016D-01    0.45689D-08
+  4    0.40032D-01    0.40032D-01    0.45084D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.37237D-07
+  2    0.40000D+00    0.40000D+00    0.35114D-07
+  3    0.41600D+00    0.41600D+00    0.33077D-07
+  4    0.43331D+00    0.43331D+00    0.34506D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        153 f-s =        216 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.33896D-07
+  2    0.10000D+01    0.10000D+01    0.74437D-07
+  3    0.10000D+01    0.10000D+01    0.13199D-06
+  4    0.10000D+01    0.10000D+01    0.24962D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        147 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.92876D-07
+  2    0.10000D+01    0.10000D+01    0.20651D-06
+  3    0.10000D+01    0.10000D+01    0.40174D-06
+  4    0.10008D+01    0.10008D+01    0.83501D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        142 f-s =        237 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99742D+00    0.99741D+00    0.10459D-04
+  2    0.10004D+01    0.10004D+01    0.11006D-04
+  3    0.10000D+01    0.10000D+01    0.33307D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        204 f-s =        321 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.14766D-05
+  2    0.25166D+00    0.25166D+00    0.24455D-06
+  3    0.99707D+00    0.99707D+00    0.51810D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        254 f-s =        365 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.23769D-06
+  2    0.56309D-02    0.56309D-02    0.46371D-09
+  3    0.10007D+01    0.10007D+01    0.66024D-06
+  4    0.65374D+00    0.65374D+00    0.24551D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        110 f-s =        177 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.79363D-06
+  2    0.98757D+00    0.98757D+00    0.55890D-06
+  3   -0.51035D+00   -0.51035D+00    0.59322D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        107 f-s =        179 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99965D+00   -0.99964D+00    0.95448D-05
+  2    0.99932D+00    0.99933D+00    0.50664D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        201 f-s =        299 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.99964D-06
+  2    0.99731D+00    0.99730D+00    0.67543D-05
+  3    0.10005D+01    0.10005D+01    0.21366D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        171 f-s =        245 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23940D-09
+  2   -0.35983D-09   -0.72884D-12    0.35910D-09
+  3   -0.50193D-10    0.15348D-11    0.51728D-10
+  4    0.26402D-09   -0.10837D-11    0.26510D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        228 f-s =        313 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57358D+00   -0.57361D+00    0.37357D-04
+  2    0.56350D-01    0.56344D-01    0.57863D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        195 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.26090D-02    0.26092D-02    0.27101D-06
+  2    0.33229D-02    0.33231D-02    0.20233D-06
+  3    0.99912D+00    0.99911D+00    0.10851D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        282 f-s =        411 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.44440D-06
+  2   -0.67797D+00   -0.67797D+00    0.43458D-06
+  3   -0.84126D-06   -0.14501D-07    0.82676D-06
+  4    0.79931D-06    0.13789D-07    0.78552D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        133 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.13718D-05
+  2    0.94674D+00    0.94674D+00    0.96190D-06
+  3    0.99777D+00    0.99777D+00    0.17383D-06
+  4    0.94183D+00    0.94183D+00    0.10284D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        405 f-s =        728 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.40150D-06
+  2    0.15223D-03    0.15223D-03    0.72353D-09
+  3    0.99887D+00    0.99887D+00    0.39844D-06
+  4    0.32420D-02    0.32420D-02    0.60228D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        108 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.51282D-05
+  2    0.52567D+00    0.52568D+00    0.68819D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        225 f-s =        303 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.75295D-07    0.80898D-07    0.56032D-08
+  2    0.23607D+00    0.23607D+00    0.11868D-06
+  3    0.20425D-04    0.20426D-04    0.14145D-08
+  4    0.99860D+00    0.99860D+00    0.40834D-06
+  5    0.99879D+00    0.99879D+00    0.10033D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        845 f-s =       1297 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.38386D-04    0.37443D-04    0.94309D-06
+  2    0.72738D-03    0.72895D-03    0.15766D-05
+  3    0.97716D-04    0.96463D-04    0.12530D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        276 f-s =        416 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.11401D-08
+  2    0.44958D+00    0.44958D+00    0.13044D-08
+  3    0.99988D+00    0.99988D+00    0.28990D-08
+  4    0.99949D+00    0.99949D+00    0.66486D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        278 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30488D-06
+  2   -0.90858D-08    0.20612D-08    0.11147D-07
+  3    0.24100D-22    0.28230D-55    0.24100D-22
+  4   -0.15607D-21    0.52358D-51    0.15607D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        207 f-s =        410 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.42534D-05
+  2    0.99999D+00    0.99999D+00    0.42532D-05
+  3    0.99999D+00    0.99999D+00    0.39827D-05
+  4    0.99999D+00    0.99999D+00    0.35587D-05
+  5    0.99999D+00    0.99999D+00    0.30230D-05
+  6    0.99999D+00    0.10000D+01    0.24100D-05
+  7    0.99999D+00    0.10000D+01    0.17572D-05
+  8    0.10000D+01    0.10000D+01    0.11043D-05
+  9    0.10000D+01    0.10000D+01    0.49082D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        206 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.26156D-07
+  2    0.13685D-01    0.13685D-01    0.26365D-06
+  3    0.19229D+00    0.19229D+00    0.37164D-05
+  4    0.13533D+00    0.13534D+00    0.26994D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        530 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33857D-18    0.22774D-54    0.33857D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        686 f-s =        899 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.52998D-05    0.10042D-08    0.53008D-05
+  2    0.19335D-04    0.20955D-08    0.19333D-04
+  3   -0.57223D-42    0.00000D+00    0.57223D-42
+  4    0.11112D-41   -0.18767D-79    0.11112D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        231 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        249 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        276 f-s =        433 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22556D-10    0.11886D-21    0.22556D-10
+  2   -0.37063D-10   -0.23259D-21    0.37063D-10
+  3   -0.33230D-14    0.15179D-34    0.33230D-14
+  4    0.13648D-07    0.20612D-08    0.11587D-07
+  5    0.46631D-04    0.45400D-04    0.12312D-05
+  6    0.13534D+00    0.13534D+00    0.92459D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2619 f-s =       3658 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22488D-04   -0.23669D-13    0.22488D-04
+  2   -0.11299D-05    0.34489D-13    0.11299D-05
+  3    0.18048D-34    0.18049D-34    0.31880D-39
+  4    0.20612D-08    0.20612D-08    0.32901D-16
+  5    0.45400D-04    0.45400D-04    0.15283D-13
+  6    0.13534D+00    0.13534D+00    0.96784D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        184 f-s =        298 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39194D-03    0.39247D-03    0.53723D-06
+  2    0.38850D-03    0.38850D-03    0.55884D-10
+  3    0.40000D-03    0.40000D-03    0.53023D-15
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        175 f-s =        286 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.19179D-05
+  2    0.40000D-01    0.40000D-01    0.16999D-06
+  3    0.40016D-01    0.40016D-01    0.15752D-06
+  4    0.40032D-01    0.40032D-01    0.15524D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        173 f-s =        289 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.36349D-06
+  2    0.40000D+00    0.40000D+00    0.33041D-06
+  3    0.41600D+00    0.41600D+00    0.32555D-06
+  4    0.43331D+00    0.43331D+00    0.34782D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        145 f-s =        244 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.77756D-07
+  2    0.10000D+01    0.10000D+01    0.17275D-06
+  3    0.10000D+01    0.10000D+01    0.31553D-06
+  4    0.10000D+01    0.10000D+01    0.62207D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        145 f-s =        222 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.43312D-08
+  2    0.10000D+01    0.10000D+01    0.12939D-07
+  3    0.10000D+01    0.10000D+01    0.29749D-07
+  4    0.10008D+01    0.10008D+01    0.14653D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        140 f-s =        232 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99744D+00    0.99741D+00    0.28008D-04
+  2    0.10004D+01    0.10004D+01    0.20546D-04
+  3    0.10000D+01    0.10000D+01    0.13323D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        243 f-s =        413 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.18961D-05
+  2    0.25166D+00    0.25166D+00    0.22387D-05
+  3    0.99706D+00    0.99707D+00    0.66534D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        231 f-s =        381 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.12471D-06
+  2    0.56309D-02    0.56309D-02    0.24379D-09
+  3    0.10007D+01    0.10007D+01    0.34641D-06
+  4    0.65374D+00    0.65374D+00    0.12882D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        114 f-s =        194 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.37648D-05
+  2    0.98757D+00    0.98757D+00    0.26513D-05
+  3   -0.51034D+00   -0.51035D+00    0.40388D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        117 f-s =        202 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99962D+00   -0.99964D+00    0.17110D-04
+  2    0.99931D+00    0.99933D+00    0.13266D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        205 f-s =        311 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.26315D-07
+  2    0.99730D+00    0.99730D+00    0.17781D-06
+  3    0.10005D+01    0.10005D+01    0.14188D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        171 f-s =        269 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.25677D-09
+  2    0.11572D-08   -0.72884D-12    0.11579D-08
+  3   -0.13905D-08    0.15348D-11    0.13920D-08
+  4    0.59114D-09   -0.10837D-11    0.59222D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        232 f-s =        363 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57350D+00   -0.57361D+00    0.11643D-03
+  2    0.56375D-01    0.56344D-01    0.30322D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        245 f-s =        416 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.26115D-02    0.26092D-02    0.22476D-05
+  2    0.33260D-02    0.33231D-02    0.28699D-05
+  3    0.99912D+00    0.99911D+00    0.10473D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        275 f-s =        449 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.20622D-06
+  2   -0.67797D+00   -0.67797D+00    0.20133D-06
+  3    0.36866D-06   -0.14501D-07    0.38316D-06
+  4   -0.35058D-06    0.13789D-07    0.36437D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        153 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.13700D-05
+  2    0.94674D+00    0.94674D+00    0.11030D-05
+  3    0.99777D+00    0.99777D+00    0.17559D-06
+  4    0.94183D+00    0.94183D+00    0.11779D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        373 f-s =        816 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.24899D-05
+  2    0.15223D-03    0.15223D-03    0.40360D-08
+  3    0.99887D+00    0.99887D+00    0.24717D-05
+  4    0.32420D-02    0.32420D-02    0.33604D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        108 f-s =        175 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.51826D-05
+  2    0.52567D+00    0.52568D+00    0.69564D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        219 f-s =        354 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.80896D-07    0.80898D-07    0.19935D-11
+  2    0.23607D+00    0.23607D+00    0.75528D-07
+  3    0.20426D-04    0.20426D-04    0.72273D-12
+  4    0.99860D+00    0.99860D+00    0.60506D-07
+  5    0.99879D+00    0.99879D+00    0.38004D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        754 f-s =       1272 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.37194D-04    0.37443D-04    0.24933D-06
+  2    0.72913D-03    0.72895D-03    0.17638D-06
+  3    0.96371D-04    0.96463D-04    0.91616D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        257 f-s =        431 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.96308D-09
+  2    0.44958D+00    0.44958D+00    0.85071D-09
+  3    0.99988D+00    0.99988D+00    0.18920D-08
+  4    0.99949D+00    0.99949D+00    0.37712D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30489D-06
+  2   -0.90865D-08    0.20612D-08    0.11148D-07
+  3    0.24157D-22    0.28230D-55    0.24157D-22
+  4   -0.15644D-21    0.52358D-51    0.15644D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        206 f-s =        330 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.38582D-05
+  2    0.99999D+00    0.99999D+00    0.38580D-05
+  3    0.99999D+00    0.99999D+00    0.36148D-05
+  4    0.99999D+00    0.99999D+00    0.32319D-05
+  5    0.99999D+00    0.99999D+00    0.27472D-05
+  6    0.99999D+00    0.10000D+01    0.21917D-05
+  7    0.99999D+00    0.10000D+01    0.15990D-05
+  8    0.10000D+01    0.10000D+01    0.10053D-05
+  9    0.10000D+01    0.10000D+01    0.44680D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        206 f-s =        299 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.13323D-08
+  2    0.13685D-01    0.13685D-01    0.14068D-07
+  3    0.19229D+00    0.19229D+00    0.18930D-06
+  4    0.13534D+00    0.13534D+00    0.74264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33848D-18    0.22774D-54    0.33848D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        686 f-s =        795 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.52997D-05    0.10042D-08    0.53007D-05
+  2    0.19335D-04    0.20955D-08    0.19333D-04
+  3   -0.57221D-42    0.00000D+00    0.57221D-42
+  4    0.11111D-41   -0.18767D-79    0.11111D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        276 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22556D-10    0.11886D-21    0.22556D-10
+  2   -0.37063D-10   -0.23259D-21    0.37063D-10
+  3   -0.33232D-14    0.15179D-34    0.33232D-14
+  4    0.13648D-07    0.20612D-08    0.11587D-07
+  5    0.46631D-04    0.45400D-04    0.12312D-05
+  6    0.13534D+00    0.13534D+00    0.92459D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2619 f-s =       3088 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22347D-04   -0.23669D-13    0.22347D-04
+  2   -0.15450D-05    0.34489D-13    0.15450D-05
+  3    0.18048D-34    0.18049D-34    0.31900D-39
+  4    0.20612D-08    0.20612D-08    0.32924D-16
+  5    0.45400D-04    0.45400D-04    0.15320D-13
+  6    0.13534D+00    0.13534D+00    0.95440D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        254 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39226D-03    0.39247D-03    0.20968D-06
+  2    0.38850D-03    0.38850D-03    0.11918D-11
+  3    0.40000D-03    0.40000D-03    0.21684D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        177 f-s =        252 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.55706D-07
+  2    0.40000D-01    0.40000D-01    0.46668D-08
+  3    0.40016D-01    0.40016D-01    0.45689D-08
+  4    0.40032D-01    0.40032D-01    0.45084D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.37237D-07
+  2    0.40000D+00    0.40000D+00    0.35114D-07
+  3    0.41600D+00    0.41600D+00    0.33077D-07
+  4    0.43331D+00    0.43331D+00    0.34506D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        153 f-s =        216 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.33896D-07
+  2    0.10000D+01    0.10000D+01    0.74437D-07
+  3    0.10000D+01    0.10000D+01    0.13199D-06
+  4    0.10000D+01    0.10000D+01    0.24962D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        147 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.92876D-07
+  2    0.10000D+01    0.10000D+01    0.20651D-06
+  3    0.10000D+01    0.10000D+01    0.40174D-06
+  4    0.10008D+01    0.10008D+01    0.83501D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        142 f-s =        237 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99742D+00    0.99741D+00    0.10459D-04
+  2    0.10004D+01    0.10004D+01    0.11006D-04
+  3    0.10000D+01    0.10000D+01    0.33307D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        204 f-s =        321 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.14766D-05
+  2    0.25166D+00    0.25166D+00    0.24455D-06
+  3    0.99707D+00    0.99707D+00    0.51810D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        254 f-s =        365 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.23769D-06
+  2    0.56309D-02    0.56309D-02    0.46371D-09
+  3    0.10007D+01    0.10007D+01    0.66024D-06
+  4    0.65374D+00    0.65374D+00    0.24551D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        110 f-s =        177 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.79363D-06
+  2    0.98757D+00    0.98757D+00    0.55890D-06
+  3   -0.51035D+00   -0.51035D+00    0.59322D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        107 f-s =        179 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99965D+00   -0.99964D+00    0.95448D-05
+  2    0.99932D+00    0.99933D+00    0.50664D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        201 f-s =        299 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.99964D-06
+  2    0.99731D+00    0.99730D+00    0.67543D-05
+  3    0.10005D+01    0.10005D+01    0.21366D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        171 f-s =        245 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23940D-09
+  2   -0.35983D-09   -0.72884D-12    0.35910D-09
+  3   -0.50193D-10    0.15348D-11    0.51728D-10
+  4    0.26402D-09   -0.10837D-11    0.26510D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        228 f-s =        313 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57358D+00   -0.57361D+00    0.37357D-04
+  2    0.56350D-01    0.56344D-01    0.57863D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        195 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.26090D-02    0.26092D-02    0.27101D-06
+  2    0.33229D-02    0.33231D-02    0.20233D-06
+  3    0.99912D+00    0.99911D+00    0.10851D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        282 f-s =        411 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.44440D-06
+  2   -0.67797D+00   -0.67797D+00    0.43458D-06
+  3   -0.84126D-06   -0.14501D-07    0.82676D-06
+  4    0.79931D-06    0.13789D-07    0.78552D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        133 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.13718D-05
+  2    0.94674D+00    0.94674D+00    0.96190D-06
+  3    0.99777D+00    0.99777D+00    0.17383D-06
+  4    0.94183D+00    0.94183D+00    0.10284D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        405 f-s =        728 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.40150D-06
+  2    0.15223D-03    0.15223D-03    0.72353D-09
+  3    0.99887D+00    0.99887D+00    0.39844D-06
+  4    0.32420D-02    0.32420D-02    0.60228D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        108 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.51282D-05
+  2    0.52567D+00    0.52568D+00    0.68819D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        225 f-s =        303 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.75295D-07    0.80898D-07    0.56032D-08
+  2    0.23607D+00    0.23607D+00    0.11868D-06
+  3    0.20425D-04    0.20426D-04    0.14145D-08
+  4    0.99860D+00    0.99860D+00    0.40834D-06
+  5    0.99879D+00    0.99879D+00    0.10033D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        845 f-s =       1297 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.38386D-04    0.37443D-04    0.94309D-06
+  2    0.72738D-03    0.72895D-03    0.15766D-05
+  3    0.97716D-04    0.96463D-04    0.12530D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        276 f-s =        416 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.11401D-08
+  2    0.44958D+00    0.44958D+00    0.13044D-08
+  3    0.99988D+00    0.99988D+00    0.28990D-08
+  4    0.99949D+00    0.99949D+00    0.66486D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        268 f-s =        421 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.12239D-06
+  2    0.99999D+00    0.99999D+00    0.12237D-06
+  3    0.99999D+00    0.99999D+00    0.11409D-06
+  4    0.99999D+00    0.99999D+00    0.10126D-06
+  5    0.99999D+00    0.99999D+00    0.85334D-07
+  6    0.10000D+01    0.10000D+01    0.67503D-07
+  7    0.10000D+01    0.10000D+01    0.48893D-07
+  8    0.10000D+01    0.10000D+01    0.30592D-07
+  9    0.10000D+01    0.10000D+01    0.13597D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        276 f-s =        385 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.39216D-10
+  2    0.13685D-01    0.13685D-01    0.83753D-10
+  3    0.19229D+00    0.19229D+00    0.55713D-08
+  4    0.13534D+00    0.13534D+00    0.51466D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43440D-08    0.12659D-13    0.43440D-08
+  3    0.40051D-16    0.19115D-41    0.40051D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23570D-80    0.00000D+00    0.23570D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        975 f-s =       1107 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17030D-06    0.10042D-08    0.17130D-06
+  2    0.58479D-06    0.20955D-08    0.58269D-06
+  3    0.68665D-44    0.00000D+00    0.68665D-44
+  4    0.37321D-43   -0.18767D-79    0.37321D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        373 f-s =        461 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.98378D-11    0.11886D-21    0.98378D-11
+  2    0.31375D-10   -0.23259D-21    0.31375D-10
+  3   -0.73055D-17    0.15179D-34    0.73055D-17
+  4    0.16508D-08    0.20612D-08    0.41040D-09
+  5    0.45488D-04    0.45400D-04    0.88396D-07
+  6    0.13534D+00    0.13534D+00    0.82984D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2868 f-s =       3382 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1    0.97125D-07   -0.23669D-13    0.97125D-07
+  2    0.20089D-05    0.34489D-13    0.20089D-05
+  3    0.18048D-34    0.18049D-34    0.13281D-39
+  4    0.20612D-08    0.20612D-08    0.14763D-16
+  5    0.45400D-04    0.45400D-04    0.93105D-14
+  6    0.13534D+00    0.13534D+00    0.10128D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        269 f-s =        352 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39250D-03    0.39247D-03    0.26281D-07
+  2    0.38850D-03    0.38850D-03    0.23703D-14
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        330 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42538D-07
+  2    0.40000D-01    0.40000D-01    0.38015D-08
+  3    0.40016D-01    0.40016D-01    0.34925D-08
+  4    0.40032D-01    0.40032D-01    0.34429D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        332 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.75664D-07
+  2    0.40000D+00    0.40000D+00    0.67634D-07
+  3    0.41600D+00    0.41600D+00    0.67646D-07
+  4    0.43331D+00    0.43331D+00    0.72296D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        207 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.98492D-08
+  2    0.10000D+01    0.10000D+01    0.21530D-07
+  3    0.10000D+01    0.10000D+01    0.37481D-07
+  4    0.10000D+01    0.10000D+01    0.66996D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        196 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.19495D-08
+  2    0.10000D+01    0.10000D+01    0.43368D-08
+  3    0.10000D+01    0.10000D+01    0.86158D-08
+  4    0.10008D+01    0.10008D+01    0.17272D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        193 f-s =        298 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.81574D-06
+  2    0.10004D+01    0.10004D+01    0.45063D-08
+  3    0.10000D+01    0.10000D+01    0.24425D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        334 f-s =        458 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.38169D-06
+  2    0.25166D+00    0.25166D+00    0.57129D-06
+  3    0.99706D+00    0.99707D+00    0.13393D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        314 f-s =        440 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.60693D-07
+  2    0.56309D-02    0.56309D-02    0.11817D-09
+  3    0.10007D+01    0.10007D+01    0.16859D-06
+  4    0.65374D+00    0.65374D+00    0.62692D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        161 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.91746D-06
+  2    0.98757D+00    0.98757D+00    0.64610D-06
+  3   -0.51035D+00   -0.51035D+00    0.10017D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        160 f-s =        254 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99963D+00   -0.99964D+00    0.50711D-05
+  2    0.99932D+00    0.99933D+00    0.57779D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        296 f-s =        402 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.15127D-08
+  2    0.99730D+00    0.99730D+00    0.10221D-07
+  3    0.10005D+01    0.10005D+01    0.28200D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        236 f-s =        342 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.83381D-09
+  2   -0.21815D-09   -0.72884D-12    0.21742D-09
+  3   -0.67345D-09    0.15348D-11    0.67499D-09
+  4    0.33899D-10   -0.10837D-11    0.34982D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        289 f-s =        401 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.88978D-05
+  2    0.56347D-01    0.56344D-01    0.26471D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        314 f-s =        463 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.26090D-02    0.26092D-02    0.23697D-06
+  2    0.33228D-02    0.33231D-02    0.30255D-06
+  3    0.99910D+00    0.99911D+00    0.99478D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        409 f-s =        556 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.15194D-07
+  2   -0.67797D+00   -0.67797D+00    0.14823D-07
+  3   -0.42736D-07   -0.14501D-07    0.28235D-07
+  4    0.40615D-07    0.13789D-07    0.26826D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        119 f-s =        169 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.17151D-06
+  2    0.94674D+00    0.94674D+00    0.84205D-07
+  3    0.99777D+00    0.99777D+00    0.85966D-07
+  4    0.94183D+00    0.94183D+00    0.91992D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        538 f-s =        977 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.89191D-07
+  2    0.15223D-03    0.15223D-03    0.12278D-08
+  3    0.99887D+00    0.99887D+00    0.88531D-07
+  4    0.32420D-02    0.32420D-02    0.10144D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        142 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.52922D-06
+  2    0.52568D+00    0.52568D+00    0.71041D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        346 f-s =        491 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.80901D-07    0.80898D-07    0.35659D-11
+  2    0.23607D+00    0.23607D+00    0.30900D-07
+  3    0.20426D-04    0.20426D-04    0.11815D-11
+  4    0.99860D+00    0.99860D+00    0.14214D-07
+  5    0.99879D+00    0.99879D+00    0.14488D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        937 f-s =       1556 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.37274D-04    0.37443D-04    0.16906D-06
+  2    0.72899D-03    0.72895D-03    0.38067D-07
+  3    0.96376D-04    0.96463D-04    0.86300D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        372 f-s =        544 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.15034D-08
+  2    0.44958D+00    0.44958D+00    0.13491D-08
+  3    0.99988D+00    0.99988D+00    0.30004D-08
+  4    0.99949D+00    0.99949D+00    0.52782D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        340 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        264 f-s =        528 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13796D-06
+  2    0.99999D+00    0.99999D+00    0.13795D-06
+  3    0.99999D+00    0.99999D+00    0.12861D-06
+  4    0.99999D+00    0.99999D+00    0.11414D-06
+  5    0.99999D+00    0.99999D+00    0.96190D-07
+  6    0.10000D+01    0.10000D+01    0.76087D-07
+  7    0.10000D+01    0.10000D+01    0.55109D-07
+  8    0.10000D+01    0.10000D+01    0.34481D-07
+  9    0.10000D+01    0.10000D+01    0.15326D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        276 f-s =        441 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.47026D-10
+  2    0.13685D-01    0.13685D-01    0.46279D-10
+  3    0.19229D+00    0.19229D+00    0.66814D-08
+  4    0.13534D+00    0.13534D+00    0.47194D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        705 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43440D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23570D-80    0.00000D+00    0.23570D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        975 f-s =       1263 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17036D-06    0.10042D-08    0.17137D-06
+  2    0.58484D-06    0.20955D-08    0.58274D-06
+  3    0.68593D-44    0.00000D+00    0.68593D-44
+  4    0.37335D-43   -0.18767D-79    0.37335D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        324 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        373 f-s =        557 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.98378D-11    0.11886D-21    0.98378D-11
+  2    0.31375D-10   -0.23259D-21    0.31375D-10
+  3   -0.73055D-17    0.15179D-34    0.73055D-17
+  4    0.16508D-08    0.20612D-08    0.41040D-09
+  5    0.45488D-04    0.45400D-04    0.88396D-07
+  6    0.13534D+00    0.13534D+00    0.82984D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2868 f-s =       3976 J-s =         76
+ Computed and reference solutions and absolute errors follow:
+  1    0.97425D-07   -0.23669D-13    0.97425D-07
+  2    0.20088D-05    0.34489D-13    0.20088D-05
+  3    0.18048D-34    0.18049D-34    0.13281D-39
+  4    0.20612D-08    0.20612D-08    0.14761D-16
+  5    0.45400D-04    0.45400D-04    0.92869D-14
+  6    0.13534D+00    0.13534D+00    0.11530D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        265 f-s =        405 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.49626D-08
+  2    0.38850D-03    0.38850D-03    0.17099D-13
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        240 f-s =        367 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.49231D-07
+  2    0.40000D-01    0.40000D-01    0.43966D-08
+  3    0.40016D-01    0.40016D-01    0.40424D-08
+  4    0.40032D-01    0.40032D-01    0.39848D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        238 f-s =        367 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.91194D-07
+  2    0.40000D+00    0.40000D+00    0.82497D-07
+  3    0.41600D+00    0.41600D+00    0.81703D-07
+  4    0.43331D+00    0.43331D+00    0.87260D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        195 f-s =        301 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.44353D-07
+  2    0.10000D+01    0.10000D+01    0.98563D-07
+  3    0.10000D+01    0.10000D+01    0.17994D-06
+  4    0.10000D+01    0.10000D+01    0.35465D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        193 f-s =        323 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.50479D-07
+  2    0.10000D+01    0.10000D+01    0.11217D-06
+  3    0.10000D+01    0.10000D+01    0.22267D-06
+  4    0.10008D+01    0.10008D+01    0.44946D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        190 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.26073D-05
+  2    0.10004D+01    0.10004D+01    0.19672D-05
+  3    0.10000D+01    0.10000D+01    0.13323D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        322 f-s =        527 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.16415D-07
+  2    0.25166D+00    0.25166D+00    0.17101D-07
+  3    0.99707D+00    0.99707D+00    0.57601D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        344 f-s =        532 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.31832D-08
+  2    0.56309D-02    0.56309D-02    0.62125D-11
+  3    0.10007D+01    0.10007D+01    0.88421D-08
+  4    0.65374D+00    0.65374D+00    0.32880D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        161 f-s =        257 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.91419D-06
+  2    0.98757D+00    0.98757D+00    0.64380D-06
+  3   -0.51035D+00   -0.51035D+00    0.94864D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        178 f-s =        313 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.10426D-05
+  2    0.99932D+00    0.99933D+00    0.17124D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        276 f-s =        463 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.84921D-08
+  2    0.99730D+00    0.99730D+00    0.57380D-07
+  3    0.10005D+01    0.10005D+01    0.20697D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        255 f-s =        400 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23226D-08
+  2   -0.36031D-07   -0.72884D-12    0.36031D-07
+  3    0.13943D-06    0.15348D-11    0.13943D-06
+  4   -0.14846D-06   -0.10837D-11    0.14846D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        286 f-s =        420 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57360D+00   -0.57361D+00    0.11627D-04
+  2    0.56347D-01    0.56344D-01    0.28542D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        276 f-s =        467 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.26096D-02    0.26092D-02    0.34497D-06
+  2    0.33236D-02    0.33231D-02    0.42881D-06
+  3    0.99910D+00    0.99911D+00    0.20239D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        384 f-s =        613 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.75474D-08
+  2   -0.67797D+00   -0.67797D+00    0.73828D-08
+  3   -0.28528D-07   -0.14501D-07    0.14027D-07
+  4    0.27140D-07    0.13789D-07    0.13351D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        121 f-s =        196 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.18027D-06
+  2    0.94674D+00    0.94674D+00    0.18061D-06
+  3    0.99777D+00    0.99777D+00    0.33278D-08
+  4    0.94183D+00    0.94183D+00    0.18863D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        568 f-s =       1229 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.27678D-06
+  2    0.15223D-03    0.15223D-03    0.52202D-09
+  3    0.99887D+00    0.99887D+00    0.27471D-06
+  4    0.32420D-02    0.32420D-02    0.43456D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        145 f-s =        234 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.63086D-07
+  2    0.52568D+00    0.52568D+00    0.84577D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        292 f-s =        469 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.80869D-07    0.80898D-07    0.29215D-10
+  2    0.23607D+00    0.23607D+00    0.82214D-10
+  3    0.20426D-04    0.20426D-04    0.72636D-11
+  4    0.99860D+00    0.99860D+00    0.29711D-09
+  5    0.99879D+00    0.99879D+00    0.19831D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        973 f-s =       1726 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.37418D-04    0.37443D-04    0.25105D-07
+  2    0.72893D-03    0.72895D-03    0.17648D-07
+  3    0.96422D-04    0.96463D-04    0.40697D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        340 f-s =        550 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.36734D-07
+  2    0.44958D+00    0.44958D+00    0.32966D-07
+  3    0.99988D+00    0.99988D+00    0.73318D-07
+  4    0.99949D+00    0.99949D+00    0.12972D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        268 f-s =        421 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.12239D-06
+  2    0.99999D+00    0.99999D+00    0.12237D-06
+  3    0.99999D+00    0.99999D+00    0.11409D-06
+  4    0.99999D+00    0.99999D+00    0.10126D-06
+  5    0.99999D+00    0.99999D+00    0.85334D-07
+  6    0.10000D+01    0.10000D+01    0.67503D-07
+  7    0.10000D+01    0.10000D+01    0.48893D-07
+  8    0.10000D+01    0.10000D+01    0.30592D-07
+  9    0.10000D+01    0.10000D+01    0.13597D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        276 f-s =        385 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.39216D-10
+  2    0.13685D-01    0.13685D-01    0.83753D-10
+  3    0.19229D+00    0.19229D+00    0.55713D-08
+  4    0.13534D+00    0.13534D+00    0.51466D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43440D-08    0.12659D-13    0.43440D-08
+  3    0.40051D-16    0.19115D-41    0.40051D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23570D-80    0.00000D+00    0.23570D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        975 f-s =       1107 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17030D-06    0.10042D-08    0.17130D-06
+  2    0.58479D-06    0.20955D-08    0.58269D-06
+  3    0.68665D-44    0.00000D+00    0.68665D-44
+  4    0.37321D-43   -0.18767D-79    0.37321D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        373 f-s =        461 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.98378D-11    0.11886D-21    0.98378D-11
+  2    0.31375D-10   -0.23259D-21    0.31375D-10
+  3   -0.73055D-17    0.15179D-34    0.73055D-17
+  4    0.16508D-08    0.20612D-08    0.41040D-09
+  5    0.45488D-04    0.45400D-04    0.88396D-07
+  6    0.13534D+00    0.13534D+00    0.82984D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2868 f-s =       3382 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1    0.97125D-07   -0.23669D-13    0.97125D-07
+  2    0.20089D-05    0.34489D-13    0.20089D-05
+  3    0.18048D-34    0.18049D-34    0.13281D-39
+  4    0.20612D-08    0.20612D-08    0.14763D-16
+  5    0.45400D-04    0.45400D-04    0.93105D-14
+  6    0.13534D+00    0.13534D+00    0.10128D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        269 f-s =        352 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39250D-03    0.39247D-03    0.26281D-07
+  2    0.38850D-03    0.38850D-03    0.23703D-14
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        330 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42538D-07
+  2    0.40000D-01    0.40000D-01    0.38015D-08
+  3    0.40016D-01    0.40016D-01    0.34925D-08
+  4    0.40032D-01    0.40032D-01    0.34429D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        332 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.75664D-07
+  2    0.40000D+00    0.40000D+00    0.67634D-07
+  3    0.41600D+00    0.41600D+00    0.67646D-07
+  4    0.43331D+00    0.43331D+00    0.72296D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        207 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.98492D-08
+  2    0.10000D+01    0.10000D+01    0.21530D-07
+  3    0.10000D+01    0.10000D+01    0.37481D-07
+  4    0.10000D+01    0.10000D+01    0.66996D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        196 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.19495D-08
+  2    0.10000D+01    0.10000D+01    0.43368D-08
+  3    0.10000D+01    0.10000D+01    0.86158D-08
+  4    0.10008D+01    0.10008D+01    0.17272D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        193 f-s =        298 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.81574D-06
+  2    0.10004D+01    0.10004D+01    0.45063D-08
+  3    0.10000D+01    0.10000D+01    0.24425D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        334 f-s =        458 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.38169D-06
+  2    0.25166D+00    0.25166D+00    0.57129D-06
+  3    0.99706D+00    0.99707D+00    0.13393D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        314 f-s =        440 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.60693D-07
+  2    0.56309D-02    0.56309D-02    0.11817D-09
+  3    0.10007D+01    0.10007D+01    0.16859D-06
+  4    0.65374D+00    0.65374D+00    0.62692D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        161 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.91746D-06
+  2    0.98757D+00    0.98757D+00    0.64610D-06
+  3   -0.51035D+00   -0.51035D+00    0.10017D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        160 f-s =        254 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99963D+00   -0.99964D+00    0.50711D-05
+  2    0.99932D+00    0.99933D+00    0.57779D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        296 f-s =        402 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.15127D-08
+  2    0.99730D+00    0.99730D+00    0.10221D-07
+  3    0.10005D+01    0.10005D+01    0.28200D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        236 f-s =        342 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.83381D-09
+  2   -0.21815D-09   -0.72884D-12    0.21742D-09
+  3   -0.67345D-09    0.15348D-11    0.67499D-09
+  4    0.33899D-10   -0.10837D-11    0.34982D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        289 f-s =        401 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.88978D-05
+  2    0.56347D-01    0.56344D-01    0.26471D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        314 f-s =        463 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.26090D-02    0.26092D-02    0.23697D-06
+  2    0.33228D-02    0.33231D-02    0.30255D-06
+  3    0.99910D+00    0.99911D+00    0.99478D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        409 f-s =        556 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.15194D-07
+  2   -0.67797D+00   -0.67797D+00    0.14823D-07
+  3   -0.42736D-07   -0.14501D-07    0.28235D-07
+  4    0.40615D-07    0.13789D-07    0.26826D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        119 f-s =        169 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.17151D-06
+  2    0.94674D+00    0.94674D+00    0.84205D-07
+  3    0.99777D+00    0.99777D+00    0.85966D-07
+  4    0.94183D+00    0.94183D+00    0.91992D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        538 f-s =        977 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.89191D-07
+  2    0.15223D-03    0.15223D-03    0.12278D-08
+  3    0.99887D+00    0.99887D+00    0.88531D-07
+  4    0.32420D-02    0.32420D-02    0.10144D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        142 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.52922D-06
+  2    0.52568D+00    0.52568D+00    0.71041D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        346 f-s =        491 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.80901D-07    0.80898D-07    0.35659D-11
+  2    0.23607D+00    0.23607D+00    0.30900D-07
+  3    0.20426D-04    0.20426D-04    0.11815D-11
+  4    0.99860D+00    0.99860D+00    0.14214D-07
+  5    0.99879D+00    0.99879D+00    0.14488D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        937 f-s =       1556 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.37274D-04    0.37443D-04    0.16906D-06
+  2    0.72899D-03    0.72895D-03    0.38067D-07
+  3    0.96376D-04    0.96463D-04    0.86300D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        372 f-s =        544 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.15034D-08
+  2    0.44958D+00    0.44958D+00    0.13491D-08
+  3    0.99988D+00    0.99988D+00    0.30004D-08
+  4    0.99949D+00    0.99949D+00    0.52782D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        374 f-s =        536 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.11411D-07
+  2    0.99999D+00    0.99999D+00    0.11410D-07
+  3    0.99999D+00    0.99999D+00    0.10638D-07
+  4    0.99999D+00    0.99999D+00    0.94414D-08
+  5    0.99999D+00    0.99999D+00    0.79571D-08
+  6    0.10000D+01    0.10000D+01    0.62945D-08
+  7    0.10000D+01    0.10000D+01    0.45591D-08
+  8    0.10000D+01    0.10000D+01    0.28526D-08
+  9    0.10000D+01    0.10000D+01    0.12677D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        385 f-s =        494 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.44852D-09
+  2    0.13685D-01    0.13685D-01    0.45067D-08
+  3    0.19229D+00    0.19229D+00    0.63728D-07
+  4    0.13534D+00    0.13534D+00    0.47698D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1361 f-s =       1529 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.87787D-07    0.10042D-08    0.86782D-07
+  2   -0.15830D-06    0.20955D-08    0.16039D-06
+  3   -0.28590D-63    0.00000D+00    0.28590D-63
+  4    0.19259D-62   -0.18767D-79    0.19259D-62
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.88001D-22    0.61813D-30    0.88001D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        585 f-s =        725 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.12168D-10    0.11886D-21    0.12168D-10
+  2   -0.12671D-11   -0.23259D-21    0.12671D-11
+  3   -0.13147D-25    0.15179D-34    0.13147D-25
+  4    0.21214D-08    0.20612D-08    0.60284D-10
+  5    0.45410D-04    0.45400D-04    0.10211D-07
+  6    0.13534D+00    0.13534D+00    0.25005D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3239 f-s =       3774 J-s =         59
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11098D-07   -0.23669D-13    0.11098D-07
+  2    0.39550D-06    0.34489D-13    0.39550D-06
+  3    0.18048D-34    0.18049D-34    0.50689D-39
+  4    0.20612D-08    0.20612D-08    0.53771D-16
+  5    0.45400D-04    0.45400D-04    0.36615D-13
+  6    0.13534D+00    0.13534D+00    0.17458D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        367 f-s =        464 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.18517D-08
+  2    0.38850D-03    0.38850D-03    0.23852D-17
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        435 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.58869D-08
+  2    0.40000D-01    0.40000D-01    0.51489D-09
+  3    0.40016D-01    0.40016D-01    0.47755D-09
+  4    0.40032D-01    0.40032D-01    0.47120D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        324 f-s =        413 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47449D-08
+  2    0.40000D+00    0.40000D+00    0.42025D-08
+  3    0.41600D+00    0.41600D+00    0.42316D-08
+  4    0.43331D+00    0.43331D+00    0.45274D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        260 f-s =        356 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42888D-08
+  2    0.10000D+01    0.10000D+01    0.95313D-08
+  3    0.10000D+01    0.10000D+01    0.17401D-07
+  4    0.10000D+01    0.10000D+01    0.34294D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        252 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.90918D-09
+  2    0.10000D+01    0.10000D+01    0.20201D-08
+  3    0.10000D+01    0.10000D+01    0.40088D-08
+  4    0.10008D+01    0.10008D+01    0.80857D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        301 f-s =        467 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.16855D-06
+  2    0.10004D+01    0.10004D+01    0.14654D-06
+  3    0.10000D+01    0.10000D+01    0.23315D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        416 f-s =        593 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.12465D-07
+  2    0.25166D+00    0.25166D+00    0.45985D-08
+  3    0.99707D+00    0.99707D+00    0.43735D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        444 f-s =        577 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14312D-08
+  2    0.56309D-02    0.56309D-02    0.27907D-11
+  3    0.10007D+01    0.10007D+01    0.39755D-08
+  4    0.65374D+00    0.65374D+00    0.14783D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        245 f-s =        358 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.14623D-06
+  2    0.98757D+00    0.98757D+00    0.10298D-06
+  3   -0.51035D+00   -0.51035D+00    0.15173D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        274 f-s =        474 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.25312D-06
+  2    0.99933D+00    0.99933D+00    0.25334D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        539 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13025D-07
+  2    0.99730D+00    0.99730D+00    0.88004D-07
+  3    0.10005D+01    0.10005D+01    0.27903D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        317 f-s =        421 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.91495D-09
+  2   -0.25599D-08   -0.72884D-12    0.25592D-08
+  3    0.23755D-08    0.15348D-11    0.23740D-08
+  4   -0.82493D-09   -0.10837D-11    0.82385D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        398 f-s =        515 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.14853D-05
+  2    0.56345D-01    0.56344D-01    0.40928D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        385 f-s =        531 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.26093D-02    0.26092D-02    0.40721D-07
+  2    0.33232D-02    0.33231D-02    0.50468D-07
+  3    0.99911D+00    0.99911D+00    0.68687D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        558 f-s =        727 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.21329D-08
+  2   -0.67797D+00   -0.67797D+00    0.20836D-08
+  3   -0.10535D-07   -0.14501D-07    0.39659D-08
+  4    0.10022D-07    0.13789D-07    0.37668D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        179 f-s =        254 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.30387D-08
+  2    0.94674D+00    0.94674D+00    0.95841D-08
+  3    0.99777D+00    0.99777D+00    0.43732D-08
+  4    0.94183D+00    0.94183D+00    0.10221D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        720 f-s =       1174 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.98051D-08
+  2    0.15223D-03    0.15223D-03    0.15321D-10
+  3    0.99887D+00    0.99887D+00    0.97327D-08
+  4    0.32420D-02    0.32420D-02    0.12759D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        204 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.54121D-07
+  2    0.52568D+00    0.52568D+00    0.72658D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        414 f-s =        507 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39254D-11
+  2    0.23607D+00    0.23607D+00    0.16556D-08
+  3    0.20426D-04    0.20426D-04    0.11062D-11
+  4    0.99860D+00    0.99860D+00    0.56650D-08
+  5    0.99879D+00    0.99879D+00    0.13436D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1438 f-s =       2398 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.37342D-04    0.37443D-04    0.10143D-06
+  2    0.72901D-03    0.72895D-03    0.60131D-07
+  3    0.96406D-04    0.96463D-04    0.56598D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        500 f-s =        732 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.25413D-08
+  2    0.44958D+00    0.44958D+00    0.22805D-08
+  3    0.99988D+00    0.99988D+00    0.50719D-08
+  4    0.99949D+00    0.99949D+00    0.89435D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        452 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13567D-36    0.28230D-55    0.13567D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        376 f-s =        684 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.15639D-07
+  2    0.99999D+00    0.99999D+00    0.15638D-07
+  3    0.99999D+00    0.99999D+00    0.14581D-07
+  4    0.99999D+00    0.99999D+00    0.12941D-07
+  5    0.99999D+00    0.99999D+00    0.10906D-07
+  6    0.10000D+01    0.10000D+01    0.86272D-08
+  7    0.10000D+01    0.10000D+01    0.62488D-08
+  8    0.10000D+01    0.10000D+01    0.39098D-08
+  9    0.10000D+01    0.10000D+01    0.17377D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        385 f-s =        570 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.44853D-09
+  2    0.13685D-01    0.13685D-01    0.45068D-08
+  3    0.19229D+00    0.19229D+00    0.63730D-07
+  4    0.13534D+00    0.13534D+00    0.47699D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        875 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64762D-65    0.00000D+00    0.64762D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1361 f-s =       1729 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.87726D-07    0.10042D-08    0.86722D-07
+  2   -0.15830D-06    0.20955D-08    0.16040D-06
+  3   -0.28596D-63    0.00000D+00    0.28596D-63
+  4    0.19235D-62   -0.18767D-79    0.19235D-62
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        449 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.87999D-22    0.61813D-30    0.87999D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        474 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        585 f-s =        851 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.12168D-10    0.11886D-21    0.12168D-10
+  2   -0.12674D-11   -0.23259D-21    0.12674D-11
+  3   -0.13148D-25    0.15179D-34    0.13148D-25
+  4    0.21214D-08    0.20612D-08    0.60284D-10
+  5    0.45410D-04    0.45400D-04    0.10211D-07
+  6    0.13534D+00    0.13534D+00    0.25005D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3239 f-s =       4488 J-s =         89
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19884D-07   -0.23669D-13    0.19884D-07
+  2    0.40233D-06    0.34489D-13    0.40233D-06
+  3    0.18048D-34    0.18049D-34    0.50703D-39
+  4    0.20612D-08    0.20612D-08    0.53785D-16
+  5    0.45400D-04    0.45400D-04    0.36621D-13
+  6    0.13534D+00    0.13534D+00    0.15044D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        367 f-s =        520 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.18530D-08
+  2    0.38850D-03    0.38850D-03    0.22226D-17
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        495 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.60414D-08
+  2    0.40000D-01    0.40000D-01    0.53693D-09
+  3    0.40016D-01    0.40016D-01    0.49608D-09
+  4    0.40032D-01    0.40032D-01    0.48925D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        324 f-s =        461 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.32007D-08
+  2    0.40000D+00    0.40000D+00    0.26487D-08
+  3    0.41600D+00    0.41600D+00    0.29466D-08
+  4    0.43331D+00    0.43331D+00    0.31514D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        259 f-s =        392 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14432D-08
+  2    0.10000D+01    0.10000D+01    0.32117D-08
+  3    0.10000D+01    0.10000D+01    0.58648D-08
+  4    0.10000D+01    0.10000D+01    0.11560D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        245 f-s =        370 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.66266D-08
+  2    0.10000D+01    0.10000D+01    0.14731D-07
+  3    0.10000D+01    0.10000D+01    0.29237D-07
+  4    0.10008D+01    0.10008D+01    0.58998D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        397 f-s =        665 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.39249D-06
+  2    0.10004D+01    0.10004D+01    0.31833D-06
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        421 f-s =        679 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.53128D-08
+  2    0.25166D+00    0.25166D+00    0.31233D-08
+  3    0.99707D+00    0.99707D+00    0.18642D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        419 f-s =        657 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.22031D-09
+  2    0.56309D-02    0.56309D-02    0.42959D-12
+  3    0.10007D+01    0.10007D+01    0.61198D-09
+  4    0.65374D+00    0.65374D+00    0.22757D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        244 f-s =        383 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.13329D-06
+  2    0.98757D+00    0.98757D+00    0.93863D-07
+  3   -0.51035D+00   -0.51035D+00    0.13883D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        237 f-s =        449 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.57868D-06
+  2    0.99932D+00    0.99933D+00    0.76780D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        356 f-s =        583 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.98810D-08
+  2    0.99730D+00    0.99730D+00    0.66762D-07
+  3    0.10005D+01    0.10005D+01    0.21117D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        348 f-s =        526 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.12645D-07
+  2    0.29610D-08   -0.72884D-12    0.29617D-08
+  3   -0.16713D-07    0.15348D-11    0.16715D-07
+  4   -0.16557D-07   -0.10837D-11    0.16556D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        402 f-s =        560 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.13671D-05
+  2    0.56345D-01    0.56344D-01    0.35985D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        362 f-s =        573 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.26093D-02    0.26092D-02    0.31425D-07
+  2    0.33232D-02    0.33231D-02    0.39561D-07
+  3    0.99911D+00    0.99911D+00    0.34322D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        540 f-s =        803 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.33274D-08
+  2   -0.67797D+00   -0.67797D+00    0.32507D-08
+  3   -0.20688D-07   -0.14501D-07    0.61869D-08
+  4    0.19667D-07    0.13789D-07    0.58780D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        190 f-s =        296 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.46782D-08
+  2    0.94674D+00    0.94674D+00    0.39818D-08
+  3    0.99777D+00    0.99777D+00    0.95418D-08
+  4    0.94183D+00    0.94183D+00    0.40361D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        686 f-s =       1220 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.38840D-07
+  2    0.15223D-03    0.15223D-03    0.72682D-10
+  3    0.99887D+00    0.99887D+00    0.38564D-07
+  4    0.32420D-02    0.32420D-02    0.60505D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        209 f-s =        304 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.10997D-07
+  2    0.52568D+00    0.52568D+00    0.14767D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        401 f-s =        615 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39671D-11
+  2    0.23607D+00    0.23607D+00    0.71639D-08
+  3    0.20426D-04    0.20426D-04    0.15019D-11
+  4    0.99860D+00    0.99860D+00    0.24491D-07
+  5    0.99879D+00    0.99879D+00    0.58212D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1171 f-s =       2120 J-s =         51
+ Computed and reference solutions and absolute errors follow:
+  1    0.37441D-04    0.37443D-04    0.25190D-08
+  2    0.72892D-03    0.72895D-03    0.29301D-07
+  3    0.96490D-04    0.96463D-04    0.27073D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        409 f-s =        639 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.25374D-09
+  2    0.44958D+00    0.44958D+00    0.22770D-09
+  3    0.99988D+00    0.99988D+00    0.50640D-09
+  4    0.99949D+00    0.99949D+00    0.89264D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        374 f-s =        536 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.11411D-07
+  2    0.99999D+00    0.99999D+00    0.11410D-07
+  3    0.99999D+00    0.99999D+00    0.10638D-07
+  4    0.99999D+00    0.99999D+00    0.94414D-08
+  5    0.99999D+00    0.99999D+00    0.79571D-08
+  6    0.10000D+01    0.10000D+01    0.62945D-08
+  7    0.10000D+01    0.10000D+01    0.45591D-08
+  8    0.10000D+01    0.10000D+01    0.28526D-08
+  9    0.10000D+01    0.10000D+01    0.12677D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        385 f-s =        494 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.44852D-09
+  2    0.13685D-01    0.13685D-01    0.45067D-08
+  3    0.19229D+00    0.19229D+00    0.63728D-07
+  4    0.13534D+00    0.13534D+00    0.47698D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1361 f-s =       1529 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.87787D-07    0.10042D-08    0.86782D-07
+  2   -0.15830D-06    0.20955D-08    0.16039D-06
+  3   -0.28590D-63    0.00000D+00    0.28590D-63
+  4    0.19259D-62   -0.18767D-79    0.19259D-62
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.88001D-22    0.61813D-30    0.88001D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        585 f-s =        725 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.12168D-10    0.11886D-21    0.12168D-10
+  2   -0.12671D-11   -0.23259D-21    0.12671D-11
+  3   -0.13147D-25    0.15179D-34    0.13147D-25
+  4    0.21214D-08    0.20612D-08    0.60284D-10
+  5    0.45410D-04    0.45400D-04    0.10211D-07
+  6    0.13534D+00    0.13534D+00    0.25005D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3239 f-s =       3774 J-s =         59
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11098D-07   -0.23669D-13    0.11098D-07
+  2    0.39550D-06    0.34489D-13    0.39550D-06
+  3    0.18048D-34    0.18049D-34    0.50689D-39
+  4    0.20612D-08    0.20612D-08    0.53771D-16
+  5    0.45400D-04    0.45400D-04    0.36615D-13
+  6    0.13534D+00    0.13534D+00    0.17458D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        367 f-s =        464 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.18517D-08
+  2    0.38850D-03    0.38850D-03    0.23852D-17
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        435 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.58869D-08
+  2    0.40000D-01    0.40000D-01    0.51489D-09
+  3    0.40016D-01    0.40016D-01    0.47755D-09
+  4    0.40032D-01    0.40032D-01    0.47120D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        324 f-s =        413 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47449D-08
+  2    0.40000D+00    0.40000D+00    0.42025D-08
+  3    0.41600D+00    0.41600D+00    0.42316D-08
+  4    0.43331D+00    0.43331D+00    0.45274D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        260 f-s =        356 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42888D-08
+  2    0.10000D+01    0.10000D+01    0.95313D-08
+  3    0.10000D+01    0.10000D+01    0.17401D-07
+  4    0.10000D+01    0.10000D+01    0.34294D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        252 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.90918D-09
+  2    0.10000D+01    0.10000D+01    0.20201D-08
+  3    0.10000D+01    0.10000D+01    0.40088D-08
+  4    0.10008D+01    0.10008D+01    0.80857D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        301 f-s =        467 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.16855D-06
+  2    0.10004D+01    0.10004D+01    0.14654D-06
+  3    0.10000D+01    0.10000D+01    0.23315D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        416 f-s =        593 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.12465D-07
+  2    0.25166D+00    0.25166D+00    0.45985D-08
+  3    0.99707D+00    0.99707D+00    0.43735D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        444 f-s =        577 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14312D-08
+  2    0.56309D-02    0.56309D-02    0.27907D-11
+  3    0.10007D+01    0.10007D+01    0.39755D-08
+  4    0.65374D+00    0.65374D+00    0.14783D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        245 f-s =        358 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.14623D-06
+  2    0.98757D+00    0.98757D+00    0.10298D-06
+  3   -0.51035D+00   -0.51035D+00    0.15173D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        274 f-s =        474 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.25312D-06
+  2    0.99933D+00    0.99933D+00    0.25334D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        539 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13025D-07
+  2    0.99730D+00    0.99730D+00    0.88004D-07
+  3    0.10005D+01    0.10005D+01    0.27903D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        317 f-s =        421 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.91495D-09
+  2   -0.25599D-08   -0.72884D-12    0.25592D-08
+  3    0.23755D-08    0.15348D-11    0.23740D-08
+  4   -0.82493D-09   -0.10837D-11    0.82385D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        398 f-s =        515 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.14853D-05
+  2    0.56345D-01    0.56344D-01    0.40928D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        385 f-s =        531 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.26093D-02    0.26092D-02    0.40721D-07
+  2    0.33232D-02    0.33231D-02    0.50468D-07
+  3    0.99911D+00    0.99911D+00    0.68687D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        558 f-s =        727 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.21329D-08
+  2   -0.67797D+00   -0.67797D+00    0.20836D-08
+  3   -0.10535D-07   -0.14501D-07    0.39659D-08
+  4    0.10022D-07    0.13789D-07    0.37668D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        179 f-s =        254 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.30387D-08
+  2    0.94674D+00    0.94674D+00    0.95841D-08
+  3    0.99777D+00    0.99777D+00    0.43732D-08
+  4    0.94183D+00    0.94183D+00    0.10221D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        720 f-s =       1174 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.98051D-08
+  2    0.15223D-03    0.15223D-03    0.15321D-10
+  3    0.99887D+00    0.99887D+00    0.97327D-08
+  4    0.32420D-02    0.32420D-02    0.12759D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        204 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.54121D-07
+  2    0.52568D+00    0.52568D+00    0.72658D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        414 f-s =        507 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39254D-11
+  2    0.23607D+00    0.23607D+00    0.16556D-08
+  3    0.20426D-04    0.20426D-04    0.11062D-11
+  4    0.99860D+00    0.99860D+00    0.56650D-08
+  5    0.99879D+00    0.99879D+00    0.13436D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1438 f-s =       2398 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.37342D-04    0.37443D-04    0.10143D-06
+  2    0.72901D-03    0.72895D-03    0.60131D-07
+  3    0.96406D-04    0.96463D-04    0.56598D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        500 f-s =        732 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.25413D-08
+  2    0.44958D+00    0.44958D+00    0.22805D-08
+  3    0.99988D+00    0.99988D+00    0.50719D-08
+  4    0.99949D+00    0.99949D+00    0.89435D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        522 f-s =        718 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.24991D-08
+  2    0.99999D+00    0.99999D+00    0.24990D-08
+  3    0.99999D+00    0.99999D+00    0.23298D-08
+  4    0.99999D+00    0.99999D+00    0.20678D-08
+  5    0.99999D+00    0.99999D+00    0.17427D-08
+  6    0.10000D+01    0.10000D+01    0.13785D-08
+  7    0.10000D+01    0.10000D+01    0.99846D-09
+  8    0.10000D+01    0.10000D+01    0.62471D-09
+  9    0.10000D+01    0.10000D+01    0.27766D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        537 f-s =        657 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61667D-10
+  2    0.13685D-01    0.13685D-01    0.61999D-09
+  3    0.19229D+00    0.19229D+00    0.87621D-08
+  4    0.13534D+00    0.13534D+00    0.65233D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19627D-10    0.12659D-13    0.19640D-10
+  3    0.50490D-23    0.19115D-41    0.50490D-23
+  4   -0.40027D-36    0.22774D-54    0.40027D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19246D-70    0.00000D+00    0.19246D-70
+  7    0.18000D-88    0.00000D+00    0.18000D-88
+  8   -0.16260-107    0.00000D+00    0.16260-107
+  9    0.75665-126    0.00000D+00    0.75665-126
+ 10    0.28911-143    0.00000D+00    0.28911-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2034 f-s =       2248 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.33792D-08    0.10042D-08    0.23750D-08
+  2   -0.14988D-08    0.20955D-08    0.35943D-08
+  3    0.15326-119    0.00000D+00    0.15326-119
+  4   -0.31934-119   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67162D-25    0.89637D-30    0.67161D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        798 f-s =        960 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17622D-10    0.11886D-21    0.17622D-10
+  2   -0.21725D-10   -0.23259D-21    0.21725D-10
+  3   -0.34190D-29    0.15179D-34    0.34190D-29
+  4    0.20931D-08    0.20612D-08    0.31954D-10
+  5    0.45404D-04    0.45400D-04    0.42677D-08
+  6    0.13534D+00    0.13534D+00    0.64904D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3790 f-s =       4373 J-s =         69
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28880D-07   -0.23669D-13    0.28880D-07
+  2   -0.59793D-08    0.34489D-13    0.59793D-08
+  3    0.18048D-34    0.18049D-34    0.40443D-39
+  4    0.20612D-08    0.20612D-08    0.43256D-16
+  5    0.45400D-04    0.45400D-04    0.29553D-13
+  6    0.13534D+00    0.13534D+00    0.28894D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.21201D-08
+  2    0.38850D-03    0.38850D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        460 f-s =        573 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.63349D-09
+  2    0.40000D-01    0.40000D-01    0.56293D-10
+  3    0.40016D-01    0.40016D-01    0.52025D-10
+  4    0.40032D-01    0.40032D-01    0.51278D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        468 f-s =        570 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.48844D-09
+  2    0.40000D+00    0.40000D+00    0.43414D-09
+  3    0.41600D+00    0.41600D+00    0.43638D-09
+  4    0.43331D+00    0.43331D+00    0.46644D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        363 f-s =        461 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.15667D-09
+  2    0.10000D+01    0.10000D+01    0.34817D-09
+  3    0.10000D+01    0.10000D+01    0.63562D-09
+  4    0.10000D+01    0.10000D+01    0.12527D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        345 f-s =        443 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.54570D-09
+  2    0.10000D+01    0.10000D+01    0.12127D-08
+  3    0.10000D+01    0.10000D+01    0.24070D-08
+  4    0.10008D+01    0.10008D+01    0.48572D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        489 f-s =        733 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.44446D-08
+  2    0.10004D+01    0.10004D+01    0.28133D-08
+  3    0.10000D+01    0.10000D+01    0.56621D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        525 f-s =        721 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.51527D-08
+  2    0.25166D+00    0.25166D+00    0.54237D-08
+  3    0.99707D+00    0.99707D+00    0.18080D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        593 f-s =        740 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.35274D-09
+  2    0.56309D-02    0.56309D-02    0.68782D-12
+  3    0.10007D+01    0.10007D+01    0.97984D-09
+  4    0.65374D+00    0.65374D+00    0.36436D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        323 f-s =        438 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.10166D-07
+  2    0.98757D+00    0.98757D+00    0.71590D-08
+  3   -0.51035D+00   -0.51035D+00    0.93455D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        365 f-s =        570 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.81592D-07
+  2    0.99933D+00    0.99933D+00    0.80051D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        469 f-s =        645 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.38096D-09
+  2    0.99730D+00    0.99730D+00    0.25741D-08
+  3    0.10005D+01    0.10005D+01    0.81154D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        451 f-s =        572 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.82068D-12
+  2   -0.31989D-11   -0.72884D-12    0.24701D-11
+  3    0.40250D-11    0.15348D-11    0.24902D-11
+  4   -0.21326D-11   -0.10837D-11    0.10489D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        587 f-s =        714 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.40208D-06
+  2    0.56344D-01    0.56344D-01    0.97776D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        522 f-s =        777 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.27744D-08
+  2    0.33231D-02    0.33231D-02    0.35073D-08
+  3    0.99911D+00    0.99911D+00    0.21622D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        766 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.26170D-10
+  2   -0.67797D+00   -0.67797D+00    0.25442D-10
+  3   -0.14549D-07   -0.14501D-07    0.48625D-10
+  4    0.13835D-07    0.13789D-07    0.46011D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        262 f-s =        345 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.43720D-07
+  2    0.94674D+00    0.94674D+00    0.49233D-07
+  3    0.99777D+00    0.99777D+00    0.72614D-08
+  4    0.94183D+00    0.94183D+00    0.51652D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1010 f-s =       1644 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.35698D-09
+  2    0.15223D-03    0.15223D-03    0.57871D-12
+  3    0.99887D+00    0.99887D+00    0.35436D-09
+  4    0.32420D-02    0.32420D-02    0.31327D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        284 f-s =        368 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.21002D-08
+  2    0.52568D+00    0.52568D+00    0.28195D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        598 f-s =        723 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.80903D-07    0.80898D-07    0.48709D-11
+  2    0.23607D+00    0.23607D+00    0.84340D-08
+  3    0.20426D-04    0.20426D-04    0.63907D-12
+  4    0.99860D+00    0.99860D+00    0.28828D-07
+  5    0.99879D+00    0.99879D+00    0.68499D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1685 f-s =       2766 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.37442D-04    0.37443D-04    0.12654D-08
+  2    0.72895D-03    0.72895D-03    0.11617D-08
+  3    0.96463D-04    0.96463D-04    0.93119D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        666 f-s =        993 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.27384D-08
+  2    0.44958D+00    0.44958D+00    0.24574D-08
+  3    0.99988D+00    0.99988D+00    0.54653D-08
+  4    0.99949D+00    0.99949D+00    0.96345D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        618 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        522 f-s =        880 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.26028D-08
+  2    0.99999D+00    0.99999D+00    0.26026D-08
+  3    0.99999D+00    0.99999D+00    0.24263D-08
+  4    0.99999D+00    0.99999D+00    0.21535D-08
+  5    0.99999D+00    0.99999D+00    0.18150D-08
+  6    0.10000D+01    0.10000D+01    0.14357D-08
+  7    0.10000D+01    0.10000D+01    0.10398D-08
+  8    0.10000D+01    0.10000D+01    0.65053D-09
+  9    0.10000D+01    0.10000D+01    0.28913D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        537 f-s =        753 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61669D-10
+  2    0.13685D-01    0.13685D-01    0.61999D-09
+  3    0.19229D+00    0.19229D+00    0.87620D-08
+  4    0.13534D+00    0.13534D+00    0.65233D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =       1293 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19624D-10    0.12659D-13    0.19636D-10
+  3    0.50488D-23    0.19115D-41    0.50488D-23
+  4   -0.40026D-36    0.22774D-54    0.40026D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19244D-70    0.00000D+00    0.19244D-70
+  7    0.17999D-88    0.00000D+00    0.17999D-88
+  8   -0.16259-107    0.00000D+00    0.16259-107
+  9    0.75659-126    0.00000D+00    0.75659-126
+ 10    0.28910-143    0.00000D+00    0.28910-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2034 f-s =       2532 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.33800D-08    0.10042D-08    0.23758D-08
+  2   -0.15016D-08    0.20955D-08    0.35970D-08
+  3    0.15383-119    0.00000D+00    0.15383-119
+  4   -0.31991-119   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        609 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67752D-25
+  2    0.67163D-25    0.89637D-30    0.67162D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        619 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        798 f-s =       1140 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17622D-10    0.11886D-21    0.17622D-10
+  2   -0.21726D-10   -0.23259D-21    0.21726D-10
+  3   -0.34190D-29    0.15179D-34    0.34191D-29
+  4    0.20931D-08    0.20612D-08    0.31954D-10
+  5    0.45404D-04    0.45400D-04    0.42677D-08
+  6    0.13534D+00    0.13534D+00    0.64903D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3790 f-s =       5183 J-s =        102
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28889D-07   -0.23669D-13    0.28889D-07
+  2   -0.60034D-08    0.34489D-13    0.60034D-08
+  3    0.18048D-34    0.18049D-34    0.40443D-39
+  4    0.20612D-08    0.20612D-08    0.43256D-16
+  5    0.45400D-04    0.45400D-04    0.29551D-13
+  6    0.13534D+00    0.13534D+00    0.27228D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        724 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.21699D-08
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        460 f-s =        637 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.63784D-09
+  2    0.40000D-01    0.40000D-01    0.56587D-10
+  3    0.40016D-01    0.40016D-01    0.52296D-10
+  4    0.40032D-01    0.40032D-01    0.51529D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        468 f-s =        639 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47464D-09
+  2    0.40000D+00    0.40000D+00    0.42158D-09
+  3    0.41600D+00    0.41600D+00    0.42380D-09
+  4    0.43331D+00    0.43331D+00    0.45299D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        363 f-s =        527 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.73168D-09
+  2    0.10000D+01    0.10000D+01    0.16260D-08
+  3    0.10000D+01    0.10000D+01    0.29684D-08
+  4    0.10000D+01    0.10000D+01    0.58505D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        347 f-s =        491 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.53738D-09
+  2    0.10000D+01    0.10000D+01    0.11942D-08
+  3    0.10000D+01    0.10000D+01    0.23704D-08
+  4    0.10008D+01    0.10008D+01    0.47832D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        510 f-s =        858 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.18151D-07
+  2    0.10004D+01    0.10004D+01    0.15155D-07
+  3    0.10000D+01    0.10000D+01    0.34417D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        513 f-s =        764 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.22283D-08
+  2    0.25166D+00    0.25166D+00    0.25937D-08
+  3    0.99707D+00    0.99707D+00    0.78188D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        610 f-s =        864 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.12122D-09
+  2    0.56309D-02    0.56309D-02    0.23632D-12
+  3    0.10007D+01    0.10007D+01    0.33671D-09
+  4    0.65374D+00    0.65374D+00    0.12521D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        329 f-s =        521 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.70692D-08
+  2    0.98757D+00    0.98757D+00    0.49783D-08
+  3   -0.51035D+00   -0.51035D+00    0.73218D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        353 f-s =        600 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.52362D-07
+  2    0.99933D+00    0.99933D+00    0.58559D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        469 f-s =        718 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.34373D-09
+  2    0.99730D+00    0.99730D+00    0.23229D-08
+  3    0.10005D+01    0.10005D+01    0.73208D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        451 f-s =        640 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11557D-11
+  2   -0.32461D-11   -0.72884D-12    0.25173D-11
+  3    0.35112D-11    0.15348D-11    0.19763D-11
+  4   -0.18365D-11   -0.10837D-11    0.75274D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        578 f-s =        759 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.24234D-06
+  2    0.56344D-01    0.56344D-01    0.68783D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        508 f-s =        818 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.21931D-08
+  2    0.33231D-02    0.33231D-02    0.27700D-08
+  3    0.99911D+00    0.99911D+00    0.12044D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1244 f-s =       3392 J-s =        198
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.33806D-09
+  2   -0.67797D+00   -0.67797D+00    0.43396D-09
+  3    0.67135D-06   -0.14501D-07    0.68585D-06
+  4    0.66459D-06    0.13789D-07    0.65080D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        239 f-s =        356 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.43756D-07
+  2    0.94674D+00    0.94674D+00    0.46889D-07
+  3    0.99777D+00    0.99777D+00    0.44793D-08
+  4    0.94183D+00    0.94183D+00    0.49339D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        960 f-s =       1748 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.30183D-08
+  2    0.15223D-03    0.15223D-03    0.70044D-10
+  3    0.99887D+00    0.99887D+00    0.29960D-08
+  4    0.32420D-02    0.32420D-02    0.58990D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        288 f-s =        408 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.30650D-08
+  2    0.52568D+00    0.52568D+00    0.41146D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        589 f-s =        882 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.38755D-11
+  2    0.23607D+00    0.23607D+00    0.36959D-09
+  3    0.20426D-04    0.20426D-04    0.99811D-12
+  4    0.99860D+00    0.99860D+00    0.99486D-09
+  5    0.99879D+00    0.99879D+00    0.57345D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1609 f-s =       2925 J-s =         68
+ Computed and reference solutions and absolute errors follow:
+  1    0.37444D-04    0.37443D-04    0.92864D-09
+  2    0.72895D-03    0.72895D-03    0.11713D-08
+  3    0.96468D-04    0.96463D-04    0.48541D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        714 f-s =       1254 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.10103D-08
+  2    0.44958D+00    0.44958D+00    0.90666D-09
+  3    0.99988D+00    0.99988D+00    0.20164D-08
+  4    0.99949D+00    0.99949D+00    0.35549D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        522 f-s =        718 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.24991D-08
+  2    0.99999D+00    0.99999D+00    0.24990D-08
+  3    0.99999D+00    0.99999D+00    0.23298D-08
+  4    0.99999D+00    0.99999D+00    0.20678D-08
+  5    0.99999D+00    0.99999D+00    0.17427D-08
+  6    0.10000D+01    0.10000D+01    0.13785D-08
+  7    0.10000D+01    0.10000D+01    0.99846D-09
+  8    0.10000D+01    0.10000D+01    0.62471D-09
+  9    0.10000D+01    0.10000D+01    0.27766D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        537 f-s =        657 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61667D-10
+  2    0.13685D-01    0.13685D-01    0.61999D-09
+  3    0.19229D+00    0.19229D+00    0.87621D-08
+  4    0.13534D+00    0.13534D+00    0.65233D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19627D-10    0.12659D-13    0.19640D-10
+  3    0.50490D-23    0.19115D-41    0.50490D-23
+  4   -0.40027D-36    0.22774D-54    0.40027D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19246D-70    0.00000D+00    0.19246D-70
+  7    0.18000D-88    0.00000D+00    0.18000D-88
+  8   -0.16260-107    0.00000D+00    0.16260-107
+  9    0.75665-126    0.00000D+00    0.75665-126
+ 10    0.28911-143    0.00000D+00    0.28911-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2034 f-s =       2248 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.33792D-08    0.10042D-08    0.23750D-08
+  2   -0.14988D-08    0.20955D-08    0.35943D-08
+  3    0.15326-119    0.00000D+00    0.15326-119
+  4   -0.31934-119   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67162D-25    0.89637D-30    0.67161D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        798 f-s =        960 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17622D-10    0.11886D-21    0.17622D-10
+  2   -0.21725D-10   -0.23259D-21    0.21725D-10
+  3   -0.34190D-29    0.15179D-34    0.34190D-29
+  4    0.20931D-08    0.20612D-08    0.31954D-10
+  5    0.45404D-04    0.45400D-04    0.42677D-08
+  6    0.13534D+00    0.13534D+00    0.64904D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3790 f-s =       4373 J-s =         69
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28880D-07   -0.23669D-13    0.28880D-07
+  2   -0.59793D-08    0.34489D-13    0.59793D-08
+  3    0.18048D-34    0.18049D-34    0.40443D-39
+  4    0.20612D-08    0.20612D-08    0.43256D-16
+  5    0.45400D-04    0.45400D-04    0.29553D-13
+  6    0.13534D+00    0.13534D+00    0.28894D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.21201D-08
+  2    0.38850D-03    0.38850D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        460 f-s =        573 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.63349D-09
+  2    0.40000D-01    0.40000D-01    0.56293D-10
+  3    0.40016D-01    0.40016D-01    0.52025D-10
+  4    0.40032D-01    0.40032D-01    0.51278D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        468 f-s =        570 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.48844D-09
+  2    0.40000D+00    0.40000D+00    0.43414D-09
+  3    0.41600D+00    0.41600D+00    0.43638D-09
+  4    0.43331D+00    0.43331D+00    0.46644D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        363 f-s =        461 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.15667D-09
+  2    0.10000D+01    0.10000D+01    0.34817D-09
+  3    0.10000D+01    0.10000D+01    0.63562D-09
+  4    0.10000D+01    0.10000D+01    0.12527D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        345 f-s =        443 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.54570D-09
+  2    0.10000D+01    0.10000D+01    0.12127D-08
+  3    0.10000D+01    0.10000D+01    0.24070D-08
+  4    0.10008D+01    0.10008D+01    0.48572D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        489 f-s =        733 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.44446D-08
+  2    0.10004D+01    0.10004D+01    0.28133D-08
+  3    0.10000D+01    0.10000D+01    0.56621D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        525 f-s =        721 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.51527D-08
+  2    0.25166D+00    0.25166D+00    0.54237D-08
+  3    0.99707D+00    0.99707D+00    0.18080D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        593 f-s =        740 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.35274D-09
+  2    0.56309D-02    0.56309D-02    0.68782D-12
+  3    0.10007D+01    0.10007D+01    0.97984D-09
+  4    0.65374D+00    0.65374D+00    0.36436D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        323 f-s =        438 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.10166D-07
+  2    0.98757D+00    0.98757D+00    0.71590D-08
+  3   -0.51035D+00   -0.51035D+00    0.93455D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        365 f-s =        570 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.81592D-07
+  2    0.99933D+00    0.99933D+00    0.80051D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        469 f-s =        645 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.38096D-09
+  2    0.99730D+00    0.99730D+00    0.25741D-08
+  3    0.10005D+01    0.10005D+01    0.81154D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        451 f-s =        572 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.82068D-12
+  2   -0.31989D-11   -0.72884D-12    0.24701D-11
+  3    0.40250D-11    0.15348D-11    0.24902D-11
+  4   -0.21326D-11   -0.10837D-11    0.10489D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        587 f-s =        714 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.40208D-06
+  2    0.56344D-01    0.56344D-01    0.97776D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        522 f-s =        777 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.27744D-08
+  2    0.33231D-02    0.33231D-02    0.35073D-08
+  3    0.99911D+00    0.99911D+00    0.21622D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        766 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.26170D-10
+  2   -0.67797D+00   -0.67797D+00    0.25442D-10
+  3   -0.14549D-07   -0.14501D-07    0.48625D-10
+  4    0.13835D-07    0.13789D-07    0.46011D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        262 f-s =        345 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.43720D-07
+  2    0.94674D+00    0.94674D+00    0.49233D-07
+  3    0.99777D+00    0.99777D+00    0.72614D-08
+  4    0.94183D+00    0.94183D+00    0.51652D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1010 f-s =       1644 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.35698D-09
+  2    0.15223D-03    0.15223D-03    0.57871D-12
+  3    0.99887D+00    0.99887D+00    0.35436D-09
+  4    0.32420D-02    0.32420D-02    0.31327D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        284 f-s =        368 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.21002D-08
+  2    0.52568D+00    0.52568D+00    0.28195D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        598 f-s =        723 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.80903D-07    0.80898D-07    0.48709D-11
+  2    0.23607D+00    0.23607D+00    0.84340D-08
+  3    0.20426D-04    0.20426D-04    0.63907D-12
+  4    0.99860D+00    0.99860D+00    0.28828D-07
+  5    0.99879D+00    0.99879D+00    0.68499D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1685 f-s =       2766 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.37442D-04    0.37443D-04    0.12654D-08
+  2    0.72895D-03    0.72895D-03    0.11617D-08
+  3    0.96463D-04    0.96463D-04    0.93119D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        666 f-s =        993 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.27384D-08
+  2    0.44958D+00    0.44958D+00    0.24574D-08
+  3    0.99988D+00    0.99988D+00    0.54653D-08
+  4    0.99949D+00    0.99949D+00    0.96345D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        713 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91981D-53
+  4    0.81954D-50    0.52358D-51    0.76718D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        735 f-s =        996 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.32399D-09
+  2    0.99999D+00    0.99999D+00    0.32397D-09
+  3    0.99999D+00    0.99999D+00    0.30201D-09
+  4    0.99999D+00    0.99999D+00    0.26803D-09
+  5    0.99999D+00    0.99999D+00    0.22588D-09
+  6    0.10000D+01    0.10000D+01    0.17867D-09
+  7    0.10000D+01    0.10000D+01    0.12941D-09
+  8    0.10000D+01    0.10000D+01    0.80970D-10
+  9    0.10000D+01    0.10000D+01    0.35989D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        760 f-s =        908 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.14914D-11
+  2    0.13685D-01    0.13685D-01    0.15047D-10
+  3    0.19229D+00    0.19229D+00    0.21191D-09
+  4    0.13534D+00    0.13534D+00    0.15259D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10353D-10    0.12659D-13    0.10341D-10
+  3   -0.96722D-30    0.19115D-41    0.96722D-30
+  4    0.36835D-45    0.22774D-54    0.36835D-45
+  5   -0.26039D-66    0.00000D+00    0.26039D-66
+  6   -0.24198D-87    0.00000D+00    0.24198D-87
+  7   -0.55392-112    0.00000D+00    0.55392-112
+  8    0.11561-137    0.00000D+00    0.11561-137
+  9   -0.36661-165    0.00000D+00    0.36661-165
+ 10   -0.13089-187    0.00000D+00    0.13089-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2913 f-s =       3206 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.96983D-09    0.10042D-08    0.34337D-10
+  2    0.16923D-08    0.20955D-08    0.40318D-09
+  3    0.95137-207    0.00000D+00    0.95137-207
+  4   -0.43484-206   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16600D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1106 f-s =       1299 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.36473D-12    0.11886D-21    0.36473D-12
+  2    0.17238D-11   -0.23259D-21    0.17238D-11
+  3    0.97880D-35    0.15179D-34    0.53906D-35
+  4    0.20606D-08    0.20612D-08    0.55352D-12
+  5    0.45400D-04    0.45400D-04    0.33828D-09
+  6    0.13534D+00    0.13534D+00    0.29354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4571 f-s =       5275 J-s =         83
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31884D-08   -0.23669D-13    0.31884D-08
+  2    0.27580D-08    0.34489D-13    0.27580D-08
+  3    0.18048D-34    0.18049D-34    0.51115D-39
+  4    0.20612D-08    0.20612D-08    0.54212D-16
+  5    0.45400D-04    0.45400D-04    0.36983D-13
+  6    0.13534D+00    0.13534D+00    0.28255D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        735 f-s =        888 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.25669D-09
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        661 f-s =        796 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.46526D-09
+  2    0.40000D-01    0.40000D-01    0.41344D-10
+  3    0.40016D-01    0.40016D-01    0.38203D-10
+  4    0.40032D-01    0.40032D-01    0.37657D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        656 f-s =        783 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17845D-09
+  2    0.40000D+00    0.40000D+00    0.15862D-09
+  3    0.41600D+00    0.41600D+00    0.15944D-09
+  4    0.43331D+00    0.43331D+00    0.17042D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        517 f-s =        628 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18391D-10
+  2    0.10000D+01    0.10000D+01    0.40870D-10
+  3    0.10000D+01    0.10000D+01    0.74614D-10
+  4    0.10000D+01    0.10000D+01    0.14706D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        502 f-s =        602 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11046D-10
+  2    0.10000D+01    0.10000D+01    0.24547D-10
+  3    0.10000D+01    0.10000D+01    0.48724D-10
+  4    0.10008D+01    0.10008D+01    0.98321D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        573 f-s =        815 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.36247D-08
+  2    0.10004D+01    0.10004D+01    0.29891D-08
+  3    0.10000D+01    0.10000D+01    0.55511D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        770 f-s =       1094 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.81718D-09
+  2    0.25166D+00    0.25166D+00    0.69674D-09
+  3    0.99707D+00    0.99707D+00    0.28674D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        871 f-s =       1044 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.61416D-11
+  2    0.56309D-02    0.56309D-02    0.11980D-13
+  3    0.10007D+01    0.10007D+01    0.17064D-10
+  4    0.65374D+00    0.65374D+00    0.63445D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        439 f-s =        602 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.41640D-10
+  2    0.98757D+00    0.98757D+00    0.29324D-10
+  3   -0.51035D+00   -0.51035D+00    0.43798D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        533 f-s =        832 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.80270D-08
+  2    0.99933D+00    0.99933D+00    0.87922D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        652 f-s =        934 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.81613D-10
+  2    0.99730D+00    0.99730D+00    0.55119D-09
+  3    0.10005D+01    0.10005D+01    0.17376D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        737 f-s =        917 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.49893D-12
+  2    0.19552D-11   -0.72884D-12    0.26841D-11
+  3   -0.14698D-11    0.15348D-11    0.30046D-11
+  4   -0.11863D-10   -0.10837D-11    0.10779D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        835 f-s =        997 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.38996D-07
+  2    0.56344D-01    0.56344D-01    0.11220D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        642 f-s =        858 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.34928D-09
+  2    0.33231D-02    0.33231D-02    0.44395D-09
+  3    0.99911D+00    0.99911D+00    0.66566D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1208 f-s =       1736 J-s =         73
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.99564D-10
+  2   -0.67797D+00   -0.67797D+00    0.92188D-10
+  3   -0.43676D-08   -0.14501D-07    0.10133D-07
+  4    0.23768D-07    0.13789D-07    0.99787D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        369 f-s =        500 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45188D-07
+  2    0.94674D+00    0.94674D+00    0.51103D-07
+  3    0.99777D+00    0.99777D+00    0.77462D-08
+  4    0.94183D+00    0.94183D+00    0.53601D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1530 f-s =       2359 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.34065D-09
+  2    0.15223D-03    0.15223D-03    0.64298D-12
+  3    0.99887D+00    0.99887D+00    0.33812D-09
+  4    0.32420D-02    0.32420D-02    0.53513D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        398 f-s =        474 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.42979D-09
+  2    0.52568D+00    0.52568D+00    0.57701D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        827 f-s =        967 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39381D-11
+  2    0.23607D+00    0.23607D+00    0.11741D-10
+  3    0.20426D-04    0.20426D-04    0.99271D-12
+  4    0.99860D+00    0.99860D+00    0.39988D-10
+  5    0.99879D+00    0.99879D+00    0.47933D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2127 f-s =       3285 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.43293D-10
+  2    0.72895D-03    0.72895D-03    0.47860D-09
+  3    0.96463D-04    0.96463D-04    0.44708D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        828 f-s =       1178 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.61136D-08
+  2    0.44958D+00    0.44958D+00    0.54862D-08
+  3    0.99988D+00    0.99988D+00    0.12202D-07
+  4    0.99949D+00    0.99949D+00    0.21510D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        789 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92261D-53    0.28230D-55    0.91979D-53
+  4    0.81952D-50    0.52358D-51    0.76717D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        736 f-s =       1252 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.34220D-09
+  2    0.99999D+00    0.99999D+00    0.34220D-09
+  3    0.99999D+00    0.99999D+00    0.31904D-09
+  4    0.99999D+00    0.99999D+00    0.28319D-09
+  5    0.99999D+00    0.99999D+00    0.23867D-09
+  6    0.10000D+01    0.10000D+01    0.18880D-09
+  7    0.10000D+01    0.10000D+01    0.13675D-09
+  8    0.10000D+01    0.10000D+01    0.85568D-10
+  9    0.10000D+01    0.10000D+01    0.38033D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        760 f-s =       1024 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.14882D-11
+  2    0.13685D-01    0.13685D-01    0.15015D-10
+  3    0.19229D+00    0.19229D+00    0.21146D-09
+  4    0.13534D+00    0.13534D+00    0.15226D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1684 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96715D-30    0.19115D-41    0.96715D-30
+  4    0.36841D-45    0.22774D-54    0.36841D-45
+  5   -0.26041D-66    0.00000D+00    0.26041D-66
+  6   -0.24201D-87    0.00000D+00    0.24201D-87
+  7   -0.55398-112    0.00000D+00    0.55398-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36664-165    0.00000D+00    0.36664-165
+ 10   -0.13091-187    0.00000D+00    0.13091-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2913 f-s =       3602 J-s =         77
+ Computed and reference solutions and absolute errors follow:
+  1    0.96982D-09    0.10042D-08    0.34347D-10
+  2    0.16924D-08    0.20955D-08    0.40311D-09
+  3    0.94904-207    0.00000D+00    0.94904-207
+  4   -0.43756-206   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        823 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11778D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        867 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17677D-26   -0.10768D-27    0.16600D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51097D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1106 f-s =       1527 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36411D-12    0.11886D-21    0.36411D-12
+  2    0.17243D-11   -0.23259D-21    0.17243D-11
+  3    0.97878D-35    0.15179D-34    0.53907D-35
+  4    0.20606D-08    0.20612D-08    0.55354D-12
+  5    0.45400D-04    0.45400D-04    0.33829D-09
+  6    0.13534D+00    0.13534D+00    0.29355D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4587 f-s =       6251 J-s =        123
+ Computed and reference solutions and absolute errors follow:
+  1   -0.23026D-09   -0.23669D-13    0.23023D-09
+  2   -0.91895D-10    0.34489D-13    0.91929D-10
+  3    0.18048D-34    0.18049D-34    0.47894D-39
+  4    0.20612D-08    0.20612D-08    0.50859D-16
+  5    0.45400D-04    0.45400D-04    0.34718D-13
+  6    0.13534D+00    0.13534D+00    0.36304D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        734 f-s =       1001 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.10058D-09
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        661 f-s =        900 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.46606D-09
+  2    0.40000D-01    0.40000D-01    0.41421D-10
+  3    0.40016D-01    0.40016D-01    0.38276D-10
+  4    0.40032D-01    0.40032D-01    0.37726D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        652 f-s =        881 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.32244D-10
+  2    0.40000D+00    0.40000D+00    0.28663D-10
+  3    0.41600D+00    0.41600D+00    0.28809D-10
+  4    0.43331D+00    0.43331D+00    0.30794D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        517 f-s =        704 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.24309D-10
+  2    0.10000D+01    0.10000D+01    0.54020D-10
+  3    0.10000D+01    0.10000D+01    0.98622D-10
+  4    0.10000D+01    0.10000D+01    0.19437D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        502 f-s =        678 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.12332D-10
+  2    0.10000D+01    0.10000D+01    0.27405D-10
+  3    0.10000D+01    0.10000D+01    0.54396D-10
+  4    0.10008D+01    0.10008D+01    0.10977D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        578 f-s =        926 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.28838D-08
+  2    0.10004D+01    0.10004D+01    0.23767D-08
+  3    0.10000D+01    0.10000D+01    0.53291D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        751 f-s =       1168 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.10177D-08
+  2    0.25166D+00    0.25166D+00    0.10918D-08
+  3    0.99707D+00    0.99707D+00    0.35710D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        868 f-s =       1206 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.15320D-10
+  2    0.56309D-02    0.56309D-02    0.29856D-13
+  3    0.10007D+01    0.10007D+01    0.42556D-10
+  4    0.65374D+00    0.65374D+00    0.15828D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        424 f-s =        641 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.17163D-08
+  2    0.98757D+00    0.98757D+00    0.12086D-08
+  3   -0.51035D+00   -0.51035D+00    0.18415D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        509 f-s =        834 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.60968D-08
+  2    0.99933D+00    0.99933D+00    0.67064D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        626 f-s =        935 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.95688D-10
+  2    0.99730D+00    0.99730D+00    0.64653D-09
+  3    0.10005D+01    0.10005D+01    0.20397D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        896 f-s =       2210 J-s =        122
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.75643D-09
+  2   -0.45111D-09   -0.72884D-12    0.45039D-09
+  3   -0.76362D-10    0.15348D-11    0.77897D-10
+  4   -0.25644D-11   -0.10837D-11    0.14807D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        833 f-s =       1059 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.42937D-07
+  2    0.56344D-01    0.56344D-01    0.12702D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        616 f-s =        912 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.20162D-09
+  2    0.33231D-02    0.33231D-02    0.25518D-09
+  3    0.99911D+00    0.99911D+00    0.88365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1405 f-s =       2101 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.49845D-10
+  2   -0.67797D+00   -0.67797D+00    0.48615D-10
+  3   -0.14670D-07   -0.14501D-07    0.16934D-09
+  4    0.13804D-07    0.13789D-07    0.15027D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        362 f-s =        560 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45175D-07
+  2    0.94674D+00    0.94674D+00    0.51019D-07
+  3    0.99777D+00    0.99777D+00    0.76684D-08
+  4    0.94183D+00    0.94183D+00    0.53517D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1523 f-s =       2603 J-s =         54
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.14209D-11
+  2    0.15223D-03    0.15223D-03    0.74673D-14
+  3    0.99887D+00    0.99887D+00    0.14275D-11
+  4    0.32420D-02    0.32420D-02    0.76549D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        397 f-s =        505 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.43888D-09
+  2    0.52568D+00    0.52568D+00    0.58912D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        817 f-s =       1151 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.12084D-09
+  3    0.20426D-04    0.20426D-04    0.98486D-12
+  4    0.99860D+00    0.99860D+00    0.44213D-09
+  5    0.99879D+00    0.99879D+00    0.64206D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2055 f-s =       3498 J-s =         79
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.45439D-11
+  2    0.72895D-03    0.72895D-03    0.35346D-10
+  3    0.96463D-04    0.96463D-04    0.68655D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        815 f-s =       1342 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.68049D-09
+  2    0.44958D+00    0.44958D+00    0.61066D-09
+  3    0.99988D+00    0.99988D+00    0.13581D-08
+  4    0.99949D+00    0.99949D+00    0.23942D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        713 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91981D-53
+  4    0.81954D-50    0.52358D-51    0.76718D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        735 f-s =        996 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.32399D-09
+  2    0.99999D+00    0.99999D+00    0.32397D-09
+  3    0.99999D+00    0.99999D+00    0.30201D-09
+  4    0.99999D+00    0.99999D+00    0.26803D-09
+  5    0.99999D+00    0.99999D+00    0.22588D-09
+  6    0.10000D+01    0.10000D+01    0.17867D-09
+  7    0.10000D+01    0.10000D+01    0.12941D-09
+  8    0.10000D+01    0.10000D+01    0.80970D-10
+  9    0.10000D+01    0.10000D+01    0.35989D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        760 f-s =        908 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.14914D-11
+  2    0.13685D-01    0.13685D-01    0.15047D-10
+  3    0.19229D+00    0.19229D+00    0.21191D-09
+  4    0.13534D+00    0.13534D+00    0.15259D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10353D-10    0.12659D-13    0.10341D-10
+  3   -0.96722D-30    0.19115D-41    0.96722D-30
+  4    0.36835D-45    0.22774D-54    0.36835D-45
+  5   -0.26039D-66    0.00000D+00    0.26039D-66
+  6   -0.24198D-87    0.00000D+00    0.24198D-87
+  7   -0.55392-112    0.00000D+00    0.55392-112
+  8    0.11561-137    0.00000D+00    0.11561-137
+  9   -0.36661-165    0.00000D+00    0.36661-165
+ 10   -0.13089-187    0.00000D+00    0.13089-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2913 f-s =       3206 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.96983D-09    0.10042D-08    0.34337D-10
+  2    0.16923D-08    0.20955D-08    0.40318D-09
+  3    0.95137-207    0.00000D+00    0.95137-207
+  4   -0.43484-206   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16600D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1106 f-s =       1299 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.36473D-12    0.11886D-21    0.36473D-12
+  2    0.17238D-11   -0.23259D-21    0.17238D-11
+  3    0.97880D-35    0.15179D-34    0.53906D-35
+  4    0.20606D-08    0.20612D-08    0.55352D-12
+  5    0.45400D-04    0.45400D-04    0.33828D-09
+  6    0.13534D+00    0.13534D+00    0.29354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4571 f-s =       5275 J-s =         83
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31884D-08   -0.23669D-13    0.31884D-08
+  2    0.27580D-08    0.34489D-13    0.27580D-08
+  3    0.18048D-34    0.18049D-34    0.51115D-39
+  4    0.20612D-08    0.20612D-08    0.54212D-16
+  5    0.45400D-04    0.45400D-04    0.36983D-13
+  6    0.13534D+00    0.13534D+00    0.28255D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        735 f-s =        888 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.25669D-09
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        661 f-s =        796 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.46526D-09
+  2    0.40000D-01    0.40000D-01    0.41344D-10
+  3    0.40016D-01    0.40016D-01    0.38203D-10
+  4    0.40032D-01    0.40032D-01    0.37657D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        656 f-s =        783 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17845D-09
+  2    0.40000D+00    0.40000D+00    0.15862D-09
+  3    0.41600D+00    0.41600D+00    0.15944D-09
+  4    0.43331D+00    0.43331D+00    0.17042D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        517 f-s =        628 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18391D-10
+  2    0.10000D+01    0.10000D+01    0.40870D-10
+  3    0.10000D+01    0.10000D+01    0.74614D-10
+  4    0.10000D+01    0.10000D+01    0.14706D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        502 f-s =        602 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11046D-10
+  2    0.10000D+01    0.10000D+01    0.24547D-10
+  3    0.10000D+01    0.10000D+01    0.48724D-10
+  4    0.10008D+01    0.10008D+01    0.98321D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        573 f-s =        815 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.36247D-08
+  2    0.10004D+01    0.10004D+01    0.29891D-08
+  3    0.10000D+01    0.10000D+01    0.55511D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        770 f-s =       1094 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.81718D-09
+  2    0.25166D+00    0.25166D+00    0.69674D-09
+  3    0.99707D+00    0.99707D+00    0.28674D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        871 f-s =       1044 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.61416D-11
+  2    0.56309D-02    0.56309D-02    0.11980D-13
+  3    0.10007D+01    0.10007D+01    0.17064D-10
+  4    0.65374D+00    0.65374D+00    0.63445D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        439 f-s =        602 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.41640D-10
+  2    0.98757D+00    0.98757D+00    0.29324D-10
+  3   -0.51035D+00   -0.51035D+00    0.43798D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        533 f-s =        832 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.80270D-08
+  2    0.99933D+00    0.99933D+00    0.87922D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        652 f-s =        934 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.81613D-10
+  2    0.99730D+00    0.99730D+00    0.55119D-09
+  3    0.10005D+01    0.10005D+01    0.17376D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        737 f-s =        917 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.49893D-12
+  2    0.19552D-11   -0.72884D-12    0.26841D-11
+  3   -0.14698D-11    0.15348D-11    0.30046D-11
+  4   -0.11863D-10   -0.10837D-11    0.10779D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        835 f-s =        997 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.38996D-07
+  2    0.56344D-01    0.56344D-01    0.11220D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        642 f-s =        858 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.34928D-09
+  2    0.33231D-02    0.33231D-02    0.44395D-09
+  3    0.99911D+00    0.99911D+00    0.66566D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1208 f-s =       1736 J-s =         73
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.99564D-10
+  2   -0.67797D+00   -0.67797D+00    0.92188D-10
+  3   -0.43676D-08   -0.14501D-07    0.10133D-07
+  4    0.23768D-07    0.13789D-07    0.99787D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        369 f-s =        500 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45188D-07
+  2    0.94674D+00    0.94674D+00    0.51103D-07
+  3    0.99777D+00    0.99777D+00    0.77462D-08
+  4    0.94183D+00    0.94183D+00    0.53601D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1530 f-s =       2359 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.34065D-09
+  2    0.15223D-03    0.15223D-03    0.64298D-12
+  3    0.99887D+00    0.99887D+00    0.33812D-09
+  4    0.32420D-02    0.32420D-02    0.53513D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        398 f-s =        474 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.42979D-09
+  2    0.52568D+00    0.52568D+00    0.57701D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        827 f-s =        967 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39381D-11
+  2    0.23607D+00    0.23607D+00    0.11741D-10
+  3    0.20426D-04    0.20426D-04    0.99271D-12
+  4    0.99860D+00    0.99860D+00    0.39988D-10
+  5    0.99879D+00    0.99879D+00    0.47933D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2127 f-s =       3285 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.43293D-10
+  2    0.72895D-03    0.72895D-03    0.47860D-09
+  3    0.96463D-04    0.96463D-04    0.44708D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        828 f-s =       1178 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.61136D-08
+  2    0.44958D+00    0.44958D+00    0.54862D-08
+  3    0.99988D+00    0.99988D+00    0.12202D-07
+  4    0.99949D+00    0.99949D+00    0.21510D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1013 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33886D-10
+  2    0.20613D-08    0.20612D-08    0.11428D-12
+  3   -0.18641D-65    0.28230D-55    0.28230D-55
+  4   -0.60003D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1026 f-s =       1326 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.50967D-10
+  2    0.99999D+00    0.99999D+00    0.50966D-10
+  3    0.99999D+00    0.99999D+00    0.47514D-10
+  4    0.99999D+00    0.99999D+00    0.42171D-10
+  5    0.99999D+00    0.99999D+00    0.35541D-10
+  6    0.10000D+01    0.10000D+01    0.28114D-10
+  7    0.10000D+01    0.10000D+01    0.20363D-10
+  8    0.10000D+01    0.10000D+01    0.12741D-10
+  9    0.10000D+01    0.10000D+01    0.56627D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1065 f-s =       1228 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10515D-11
+  2    0.13685D-01    0.13685D-01    0.10608D-10
+  3    0.19229D+00    0.19229D+00    0.14940D-09
+  4    0.13534D+00    0.13534D+00    0.10759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24333D-11    0.12659D-13    0.24207D-11
+  3    0.12344D-37    0.19115D-41    0.12342D-37
+  4    0.29516D-57    0.22774D-54    0.22745D-54
+  5    0.62662D-84    0.00000D+00    0.62662D-84
+  6   -0.11726-113    0.00000D+00    0.11726-113
+  7    0.11345-145    0.00000D+00    0.11345-145
+  8    0.19805-182    0.00000D+00    0.19805-182
+  9    0.19867-214    0.00000D+00    0.19867-214
+ 10   -0.11006-247    0.00000D+00    0.11006-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4319 f-s =       4722 J-s =         78
+ Computed and reference solutions and absolute errors follow:
+  1    0.98293D-09    0.10042D-08    0.21236D-10
+  2    0.20201D-08    0.20955D-08    0.75409D-10
+  3   -0.90579-305    0.00000D+00    0.90579-305
+  4   -0.10666-303   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89031D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1006 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23096D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84672D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1319 f-s =       1544 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28466D-11    0.11886D-21    0.28466D-11
+  2    0.15176D-10   -0.23259D-21    0.15176D-10
+  3    0.66180D-33    0.15179D-34    0.64663D-33
+  4    0.20612D-08    0.20612D-08    0.80782D-13
+  5    0.45400D-04    0.45400D-04    0.24207D-10
+  6    0.13534D+00    0.13534D+00    0.44165D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       5843 f-s =       6685 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.59987D-10   -0.23669D-13    0.60011D-10
+  2   -0.32389D-10    0.34489D-13    0.32423D-10
+  3    0.18048D-34    0.18049D-34    0.38106D-39
+  4    0.20612D-08    0.20612D-08    0.40837D-16
+  5    0.45400D-04    0.45400D-04    0.27897D-13
+  6    0.13534D+00    0.13534D+00    0.12240D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1070 f-s =       1229 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.61172D-11
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        936 f-s =       1090 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17746D-10
+  2    0.40000D-01    0.40000D-01    0.15774D-11
+  3    0.40016D-01    0.40016D-01    0.14574D-11
+  4    0.40032D-01    0.40032D-01    0.14365D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        923 f-s =       1070 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13408D-10
+  2    0.40000D+00    0.40000D+00    0.11918D-10
+  3    0.41600D+00    0.41600D+00    0.11979D-10
+  4    0.43331D+00    0.43331D+00    0.12805D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        736 f-s =        872 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14755D-11
+  2    0.10000D+01    0.10000D+01    0.32792D-11
+  3    0.10000D+01    0.10000D+01    0.59863D-11
+  4    0.10000D+01    0.10000D+01    0.11799D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        717 f-s =        831 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23557D-11
+  2    0.10000D+01    0.10000D+01    0.52353D-11
+  3    0.10000D+01    0.10000D+01    0.10391D-10
+  4    0.10008D+01    0.10008D+01    0.20969D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        769 f-s =       1067 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.55292D-09
+  2    0.10004D+01    0.10004D+01    0.44032D-09
+  3    0.10000D+01    0.10000D+01    0.83267D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        984 f-s =       1326 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.96467D-10
+  2    0.25166D+00    0.25166D+00    0.10458D-09
+  3    0.99707D+00    0.99707D+00    0.33849D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1189 f-s =       1394 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.21838D-12
+  2    0.56309D-02    0.56309D-02    0.42934D-15
+  3    0.10007D+01    0.10007D+01    0.60840D-12
+  4    0.65374D+00    0.65374D+00    0.22504D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        597 f-s =        778 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.16025D-10
+  2    0.98757D+00    0.98757D+00    0.11293D-10
+  3   -0.51035D+00   -0.51035D+00    0.17109D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        721 f-s =       1116 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.87370D-09
+  2    0.99933D+00    0.99933D+00    0.10661D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        874 f-s =       1177 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13529D-10
+  2    0.99730D+00    0.99730D+00    0.91399D-10
+  3    0.10005D+01    0.10005D+01    0.28822D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1142 f-s =       1485 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.29817D-11
+  2   -0.18937D-10   -0.72884D-12    0.18208D-10
+  3   -0.14896D-10    0.15348D-11    0.16431D-10
+  4    0.62419D-11   -0.10837D-11    0.73256D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1197 f-s =       1399 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.75668D-08
+  2    0.56344D-01    0.56344D-01    0.21768D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        823 f-s =       1051 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.17820D-10
+  2    0.33231D-02    0.33231D-02    0.22453D-10
+  3    0.99911D+00    0.99911D+00    0.22316D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       3377 f-s =      10342 J-s =       1029
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.10770D-09
+  2   -0.67797D+00   -0.67797D+00    0.10646D-09
+  3   -0.14875D-07   -0.14501D-07    0.37456D-09
+  4    0.13816D-07    0.13789D-07    0.26791D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        467 f-s =        592 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45442D-07
+  2    0.94674D+00    0.94674D+00    0.51402D-07
+  3    0.99777D+00    0.99777D+00    0.78000D-08
+  4    0.94183D+00    0.94183D+00    0.53915D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2132 f-s =       3065 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.50261D-10
+  2    0.15223D-03    0.15223D-03    0.95039D-13
+  3    0.99887D+00    0.99887D+00    0.49891D-10
+  4    0.32420D-02    0.32420D-02    0.79094D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        563 f-s =        654 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.10430D-09
+  2    0.52568D+00    0.52568D+00    0.14003D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1169 f-s =       1343 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39411D-11
+  2    0.23607D+00    0.23607D+00    0.74385D-11
+  3    0.20426D-04    0.20426D-04    0.99381D-12
+  4    0.99860D+00    0.99860D+00    0.23326D-10
+  5    0.99879D+00    0.99879D+00    0.32693D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2792 f-s =       4086 J-s =         57
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.90021D-11
+  2    0.72895D-03    0.72895D-03    0.74371D-10
+  3    0.96463D-04    0.96463D-04    0.45026D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1137 f-s =       1581 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.43472D-09
+  2    0.44958D+00    0.44958D+00    0.39011D-09
+  3    0.99988D+00    0.99988D+00    0.86760D-09
+  4    0.99949D+00    0.99949D+00    0.15293D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1129 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33883D-10
+  2    0.20613D-08    0.20612D-08    0.11427D-12
+  3   -0.18805D-65    0.28230D-55    0.28230D-55
+  4   -0.61154D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1031 f-s =       1651 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.54345D-10
+  2    0.99999D+00    0.99999D+00    0.54344D-10
+  3    0.99999D+00    0.99999D+00    0.50665D-10
+  4    0.99999D+00    0.99999D+00    0.44968D-10
+  5    0.99999D+00    0.99999D+00    0.37897D-10
+  6    0.10000D+01    0.10000D+01    0.29978D-10
+  7    0.10000D+01    0.10000D+01    0.21713D-10
+  8    0.10000D+01    0.10000D+01    0.13585D-10
+  9    0.10000D+01    0.10000D+01    0.60383D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1065 f-s =       1400 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10665D-11
+  2    0.13685D-01    0.13685D-01    0.10759D-10
+  3    0.19229D+00    0.19229D+00    0.15153D-09
+  4    0.13534D+00    0.13534D+00    0.10912D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       2395 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27667D-09
+  2    0.24331D-11    0.12659D-13    0.24204D-11
+  3    0.12343D-37    0.19115D-41    0.12341D-37
+  4    0.29508D-57    0.22774D-54    0.22745D-54
+  5    0.62633D-84    0.00000D+00    0.62633D-84
+  6   -0.11719-113    0.00000D+00    0.11719-113
+  7    0.11344-145    0.00000D+00    0.11344-145
+  8    0.20330-182    0.00000D+00    0.20330-182
+  9    0.19846-214    0.00000D+00    0.19846-214
+ 10   -0.10997-247    0.00000D+00    0.10997-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4319 f-s =       5322 J-s =        114
+ Computed and reference solutions and absolute errors follow:
+  1    0.98286D-09    0.10042D-08    0.21302D-10
+  2    0.20178D-08    0.20955D-08    0.77730D-10
+  3   -0.65015-305    0.00000D+00    0.65015-305
+  4   -0.10181-303   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =       1136 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90065D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89037D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1204 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24509D-36   -0.10768D-27    0.10768D-27
+  2   -0.23095D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84676D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1319 f-s =       1832 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27686D-11    0.11886D-21    0.27686D-11
+  2    0.15193D-10   -0.23259D-21    0.15193D-10
+  3    0.66251D-33    0.15179D-34    0.64733D-33
+  4    0.20612D-08    0.20612D-08    0.80781D-13
+  5    0.45400D-04    0.45400D-04    0.24207D-10
+  6    0.13534D+00    0.13534D+00    0.44172D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       5843 f-s =       7937 J-s =        156
+ Computed and reference solutions and absolute errors follow:
+  1    0.55627D-10   -0.23669D-13    0.55650D-10
+  2   -0.14811D-10    0.34489D-13    0.14845D-10
+  3    0.18048D-34    0.18049D-34    0.38394D-39
+  4    0.20612D-08    0.20612D-08    0.41136D-16
+  5    0.45400D-04    0.45400D-04    0.28112D-13
+  6    0.13534D+00    0.13534D+00    0.20844D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1070 f-s =       1386 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.61120D-11
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        936 f-s =       1235 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17742D-10
+  2    0.40000D-01    0.40000D-01    0.15770D-11
+  3    0.40016D-01    0.40016D-01    0.14573D-11
+  4    0.40032D-01    0.40032D-01    0.14367D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        923 f-s =       1208 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13238D-10
+  2    0.40000D+00    0.40000D+00    0.11767D-10
+  3    0.41600D+00    0.41600D+00    0.11827D-10
+  4    0.43331D+00    0.43331D+00    0.12640D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        737 f-s =        989 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14568D-11
+  2    0.10000D+01    0.10000D+01    0.32375D-11
+  3    0.10000D+01    0.10000D+01    0.59098D-11
+  4    0.10000D+01    0.10000D+01    0.11648D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        717 f-s =        948 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23589D-11
+  2    0.10000D+01    0.10000D+01    0.52424D-11
+  3    0.10000D+01    0.10000D+01    0.10406D-10
+  4    0.10008D+01    0.10008D+01    0.20998D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        712 f-s =       1117 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.60922D-09
+  2    0.10004D+01    0.10004D+01    0.46788D-09
+  3    0.10000D+01    0.10000D+01    0.38858D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        910 f-s =       1332 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.40262D-10
+  2    0.25166D+00    0.25166D+00    0.44839D-10
+  3    0.99707D+00    0.99707D+00    0.14127D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1213 f-s =       1622 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.55733D-13
+  2    0.56309D-02    0.56309D-02    0.10842D-15
+  3    0.10007D+01    0.10007D+01    0.15277D-12
+  4    0.65374D+00    0.65374D+00    0.56732D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        590 f-s =        851 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.44093D-10
+  2    0.98757D+00    0.98757D+00    0.31060D-10
+  3   -0.51035D+00   -0.51035D+00    0.56216D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        705 f-s =       1136 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.10051D-08
+  2    0.99933D+00    0.99933D+00    0.12698D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        839 f-s =       1244 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13497D-10
+  2    0.99730D+00    0.99730D+00    0.91202D-10
+  3    0.10005D+01    0.10005D+01    0.28767D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1273 f-s =       3339 J-s =        188
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.45519D-13
+  2    0.13991D-12   -0.72884D-12    0.86876D-12
+  3    0.55472D-12    0.15348D-11    0.98009D-12
+  4   -0.19064D-13   -0.10837D-11    0.10646D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1182 f-s =       1479 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.77815D-08
+  2    0.56344D-01    0.56344D-01    0.21912D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        788 f-s =       1083 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.33295D-10
+  2    0.33231D-02    0.33231D-02    0.42277D-10
+  3    0.99911D+00    0.99911D+00    0.72006D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       2844 f-s =      10037 J-s =        678
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.48654D-10
+  2   -0.67797D+00   -0.67797D+00    0.47513D-10
+  3   -0.14592D-07   -0.14501D-07    0.91198D-10
+  4    0.13874D-07    0.13789D-07    0.85234D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        480 f-s =        714 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45450D-07
+  2    0.94674D+00    0.94674D+00    0.51414D-07
+  3    0.99777D+00    0.99777D+00    0.78040D-08
+  4    0.94183D+00    0.94183D+00    0.53927D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2033 f-s =       3441 J-s =         75
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.58758D-10
+  2    0.15223D-03    0.15223D-03    0.11070D-12
+  3    0.99887D+00    0.99887D+00    0.58322D-10
+  4    0.32420D-02    0.32420D-02    0.92123D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        548 f-s =        695 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.98842D-10
+  2    0.52568D+00    0.52568D+00    0.13270D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1173 f-s =       1618 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.86375D-10
+  3    0.20426D-04    0.20426D-04    0.10003D-11
+  4    0.99860D+00    0.99860D+00    0.31057D-09
+  5    0.99879D+00    0.99879D+00    0.59680D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2718 f-s =       4357 J-s =         98
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.20392D-10
+  2    0.72895D-03    0.72895D-03    0.74189D-10
+  3    0.96463D-04    0.96463D-04    0.64783D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1049 f-s =       1685 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.28988D-09
+  2    0.44958D+00    0.44958D+00    0.26013D-09
+  3    0.99988D+00    0.99988D+00    0.57853D-09
+  4    0.99949D+00    0.99949D+00    0.10197D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1013 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33886D-10
+  2    0.20613D-08    0.20612D-08    0.11428D-12
+  3   -0.18641D-65    0.28230D-55    0.28230D-55
+  4   -0.60003D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1026 f-s =       1326 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.50967D-10
+  2    0.99999D+00    0.99999D+00    0.50966D-10
+  3    0.99999D+00    0.99999D+00    0.47514D-10
+  4    0.99999D+00    0.99999D+00    0.42171D-10
+  5    0.99999D+00    0.99999D+00    0.35541D-10
+  6    0.10000D+01    0.10000D+01    0.28114D-10
+  7    0.10000D+01    0.10000D+01    0.20363D-10
+  8    0.10000D+01    0.10000D+01    0.12741D-10
+  9    0.10000D+01    0.10000D+01    0.56627D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1065 f-s =       1228 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10515D-11
+  2    0.13685D-01    0.13685D-01    0.10608D-10
+  3    0.19229D+00    0.19229D+00    0.14940D-09
+  4    0.13534D+00    0.13534D+00    0.10759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24333D-11    0.12659D-13    0.24207D-11
+  3    0.12344D-37    0.19115D-41    0.12342D-37
+  4    0.29516D-57    0.22774D-54    0.22745D-54
+  5    0.62662D-84    0.00000D+00    0.62662D-84
+  6   -0.11726-113    0.00000D+00    0.11726-113
+  7    0.11345-145    0.00000D+00    0.11345-145
+  8    0.19805-182    0.00000D+00    0.19805-182
+  9    0.19867-214    0.00000D+00    0.19867-214
+ 10   -0.11006-247    0.00000D+00    0.11006-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4319 f-s =       4722 J-s =         78
+ Computed and reference solutions and absolute errors follow:
+  1    0.98293D-09    0.10042D-08    0.21236D-10
+  2    0.20201D-08    0.20955D-08    0.75409D-10
+  3   -0.90579-305    0.00000D+00    0.90579-305
+  4   -0.10666-303   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89031D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1006 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23096D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84672D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1319 f-s =       1544 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28466D-11    0.11886D-21    0.28466D-11
+  2    0.15176D-10   -0.23259D-21    0.15176D-10
+  3    0.66180D-33    0.15179D-34    0.64663D-33
+  4    0.20612D-08    0.20612D-08    0.80782D-13
+  5    0.45400D-04    0.45400D-04    0.24207D-10
+  6    0.13534D+00    0.13534D+00    0.44165D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       5843 f-s =       6685 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.59987D-10   -0.23669D-13    0.60011D-10
+  2   -0.32389D-10    0.34489D-13    0.32423D-10
+  3    0.18048D-34    0.18049D-34    0.38106D-39
+  4    0.20612D-08    0.20612D-08    0.40837D-16
+  5    0.45400D-04    0.45400D-04    0.27897D-13
+  6    0.13534D+00    0.13534D+00    0.12240D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1070 f-s =       1229 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.61172D-11
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        936 f-s =       1090 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17746D-10
+  2    0.40000D-01    0.40000D-01    0.15774D-11
+  3    0.40016D-01    0.40016D-01    0.14574D-11
+  4    0.40032D-01    0.40032D-01    0.14365D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        923 f-s =       1070 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13408D-10
+  2    0.40000D+00    0.40000D+00    0.11918D-10
+  3    0.41600D+00    0.41600D+00    0.11979D-10
+  4    0.43331D+00    0.43331D+00    0.12805D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        736 f-s =        872 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14755D-11
+  2    0.10000D+01    0.10000D+01    0.32792D-11
+  3    0.10000D+01    0.10000D+01    0.59863D-11
+  4    0.10000D+01    0.10000D+01    0.11799D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        717 f-s =        831 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23557D-11
+  2    0.10000D+01    0.10000D+01    0.52353D-11
+  3    0.10000D+01    0.10000D+01    0.10391D-10
+  4    0.10008D+01    0.10008D+01    0.20969D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        769 f-s =       1067 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.55292D-09
+  2    0.10004D+01    0.10004D+01    0.44032D-09
+  3    0.10000D+01    0.10000D+01    0.83267D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        984 f-s =       1326 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.96467D-10
+  2    0.25166D+00    0.25166D+00    0.10458D-09
+  3    0.99707D+00    0.99707D+00    0.33849D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1189 f-s =       1394 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.21838D-12
+  2    0.56309D-02    0.56309D-02    0.42934D-15
+  3    0.10007D+01    0.10007D+01    0.60840D-12
+  4    0.65374D+00    0.65374D+00    0.22504D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        597 f-s =        778 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.16025D-10
+  2    0.98757D+00    0.98757D+00    0.11293D-10
+  3   -0.51035D+00   -0.51035D+00    0.17109D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        721 f-s =       1116 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.87370D-09
+  2    0.99933D+00    0.99933D+00    0.10661D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        874 f-s =       1177 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13529D-10
+  2    0.99730D+00    0.99730D+00    0.91399D-10
+  3    0.10005D+01    0.10005D+01    0.28822D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1142 f-s =       1485 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.29817D-11
+  2   -0.18937D-10   -0.72884D-12    0.18208D-10
+  3   -0.14896D-10    0.15348D-11    0.16431D-10
+  4    0.62419D-11   -0.10837D-11    0.73256D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1197 f-s =       1399 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.75668D-08
+  2    0.56344D-01    0.56344D-01    0.21768D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        823 f-s =       1051 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.17820D-10
+  2    0.33231D-02    0.33231D-02    0.22453D-10
+  3    0.99911D+00    0.99911D+00    0.22316D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       3377 f-s =      10342 J-s =       1029
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.10770D-09
+  2   -0.67797D+00   -0.67797D+00    0.10646D-09
+  3   -0.14875D-07   -0.14501D-07    0.37456D-09
+  4    0.13816D-07    0.13789D-07    0.26791D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        467 f-s =        592 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45442D-07
+  2    0.94674D+00    0.94674D+00    0.51402D-07
+  3    0.99777D+00    0.99777D+00    0.78000D-08
+  4    0.94183D+00    0.94183D+00    0.53915D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2132 f-s =       3065 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.50261D-10
+  2    0.15223D-03    0.15223D-03    0.95039D-13
+  3    0.99887D+00    0.99887D+00    0.49891D-10
+  4    0.32420D-02    0.32420D-02    0.79094D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        563 f-s =        654 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.10430D-09
+  2    0.52568D+00    0.52568D+00    0.14003D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1169 f-s =       1343 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39411D-11
+  2    0.23607D+00    0.23607D+00    0.74385D-11
+  3    0.20426D-04    0.20426D-04    0.99381D-12
+  4    0.99860D+00    0.99860D+00    0.23326D-10
+  5    0.99879D+00    0.99879D+00    0.32693D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2792 f-s =       4086 J-s =         57
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.90021D-11
+  2    0.72895D-03    0.72895D-03    0.74371D-10
+  3    0.96463D-04    0.96463D-04    0.45026D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1137 f-s =       1581 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.43472D-09
+  2    0.44958D+00    0.44958D+00    0.39011D-09
+  3    0.99988D+00    0.99988D+00    0.86760D-09
+  4    0.99949D+00    0.99949D+00    0.15293D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46240D-83    0.28230D-55    0.28230D-55
+  4   -0.54017D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1518 f-s =       1898 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13180D-10
+  2    0.99999D+00    0.99999D+00    0.13179D-10
+  3    0.99999D+00    0.99999D+00    0.12287D-10
+  4    0.99999D+00    0.99999D+00    0.10905D-10
+  5    0.99999D+00    0.99999D+00    0.91910D-11
+  6    0.10000D+01    0.10000D+01    0.72703D-11
+  7    0.10000D+01    0.10000D+01    0.52659D-11
+  8    0.10000D+01    0.10000D+01    0.32949D-11
+  9    0.10000D+01    0.10000D+01    0.14644D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1595 f-s =       1812 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.67727D-13
+  2    0.13685D-01    0.13685D-01    0.68361D-12
+  3    0.19229D+00    0.19229D+00    0.96231D-11
+  4    0.13534D+00    0.13534D+00    0.68976D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20548D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13242D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88166-109    0.00000D+00    0.88166-109
+  6   -0.91781-148    0.00000D+00    0.91781-148
+  7   -0.28134-190    0.00000D+00    0.28134-190
+  8    0.74098-237    0.00000D+00    0.74098-237
+  9   -0.38761-283    0.00000D+00    0.38761-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6206 f-s =       6769 J-s =        111
+ Computed and reference solutions and absolute errors follow:
+  1    0.99916D-09    0.10042D-08    0.50040D-11
+  2    0.20868D-08    0.20955D-08    0.86494D-11
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32341D-55    0.61813D-30    0.61813D-30
+  2    0.70205D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82190D-11
+  6    0.13534D+00    0.13534D+00    0.15070D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.74038D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80713D-11
+  6    0.13534D+00    0.13534D+00    0.14461D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2001 f-s =       2293 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.12058D-20    0.11886D-21    0.10870D-20
+  2   -0.21665D-21   -0.23259D-21    0.15943D-22
+  3    0.20709D-34    0.15179D-34    0.55302D-35
+  4    0.20612D-08    0.20612D-08    0.22584D-13
+  5    0.45400D-04    0.45400D-04    0.66490D-11
+  6    0.13534D+00    0.13534D+00    0.14001D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7522 f-s =       8540 J-s =        133
+ Computed and reference solutions and absolute errors follow:
+  1    0.57897D-12   -0.23669D-13    0.60264D-12
+  2    0.37572D-11    0.34489D-13    0.37228D-11
+  3    0.18048D-34    0.18049D-34    0.35107D-39
+  4    0.20612D-08    0.20612D-08    0.37693D-16
+  5    0.45400D-04    0.45400D-04    0.25787D-13
+  6    0.13534D+00    0.13534D+00    0.32613D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1545 f-s =       1746 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.93097D-12
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1384 f-s =       1577 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35293D-11
+  2    0.40000D-01    0.40000D-01    0.31371D-12
+  3    0.40016D-01    0.40016D-01    0.28984D-12
+  4    0.40032D-01    0.40032D-01    0.28566D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1380 f-s =       1568 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11434D-11
+  2    0.40000D+00    0.40000D+00    0.10166D-11
+  3    0.41600D+00    0.41600D+00    0.10217D-11
+  4    0.43331D+00    0.43331D+00    0.10922D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =       1077 f-s =       1225 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20683D-12
+  2    0.10000D+01    0.10000D+01    0.46030D-12
+  3    0.10000D+01    0.10000D+01    0.84011D-12
+  4    0.10000D+01    0.10000D+01    0.16558D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =       1016 f-s =       1165 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35516D-12
+  2    0.10000D+01    0.10000D+01    0.78948D-12
+  3    0.10000D+01    0.10000D+01    0.15675D-11
+  4    0.10008D+01    0.10008D+01    0.31619D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        896 f-s =       1167 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.14691D-09
+  2    0.10004D+01    0.10004D+01    0.11997D-09
+  3    0.10000D+01    0.10000D+01    0.88818D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1204 f-s =       1491 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.17406D-11
+  2    0.25166D+00    0.25166D+00    0.20231D-11
+  3    0.99707D+00    0.99707D+00    0.61038D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1730 f-s =       1984 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.58942D-12
+  2    0.56309D-02    0.56309D-02    0.11467D-14
+  3    0.10007D+01    0.10007D+01    0.16391D-11
+  4    0.65374D+00    0.65374D+00    0.60996D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        788 f-s =        999 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.33100D-10
+  2    0.98757D+00    0.98757D+00    0.23315D-10
+  3   -0.51035D+00   -0.51035D+00    0.34421D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        939 f-s =       1355 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.12166D-09
+  2    0.99933D+00    0.99933D+00    0.12896D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1145 f-s =       1449 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.18814D-11
+  2    0.99730D+00    0.99730D+00    0.12703D-10
+  3    0.10005D+01    0.10005D+01    0.40026D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1690 f-s =       2674 J-s =        142
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13656D-13
+  2    0.10394D-15   -0.72884D-12    0.72895D-12
+  3   -0.53587D-13    0.15348D-11    0.15884D-11
+  4   -0.42764D-13   -0.10837D-11    0.10409D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1749 f-s =       1981 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.11729D-08
+  2    0.56344D-01    0.56344D-01    0.33781D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =       1086 f-s =       1299 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.10044D-10
+  2    0.33231D-02    0.33231D-02    0.12769D-10
+  3    0.99911D+00    0.99911D+00    0.20814D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       4956 f-s =      14098 J-s =       1323
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.13183D-09
+  2   -0.67797D+00   -0.67797D+00    0.12927D-09
+  3   -0.14800D-07   -0.14501D-07    0.29906D-09
+  4    0.13972D-07    0.13789D-07    0.18251D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        669 f-s =        834 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45448D-07
+  2    0.94674D+00    0.94674D+00    0.51423D-07
+  3    0.99777D+00    0.99777D+00    0.78153D-08
+  4    0.94183D+00    0.94183D+00    0.53936D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2895 f-s =       4062 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.91980D-11
+  2    0.15223D-03    0.15223D-03    0.17341D-13
+  3    0.99887D+00    0.99887D+00    0.91304D-11
+  4    0.32420D-02    0.32420D-02    0.14432D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        778 f-s =        894 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.20677D-10
+  2    0.52568D+00    0.52568D+00    0.27760D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1680 f-s =       1900 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.39968D-14
+  3    0.20426D-04    0.20426D-04    0.99390D-12
+  4    0.99860D+00    0.99860D+00    0.11102D-13
+  5    0.99879D+00    0.99879D+00    0.48531D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       3881 f-s =       5628 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.88075D-12
+  2    0.72895D-03    0.72895D-03    0.21217D-10
+  3    0.96463D-04    0.96463D-04    0.17429D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1458 f-s =       1999 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.29548D-09
+  2    0.44958D+00    0.44958D+00    0.26516D-09
+  3    0.99988D+00    0.99988D+00    0.58973D-09
+  4    0.99949D+00    0.99949D+00    0.10400D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1593 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68577D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46116D-83    0.28230D-55    0.28230D-55
+  4   -0.53930D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1523 f-s =       2404 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13297D-10
+  2    0.99999D+00    0.99999D+00    0.13297D-10
+  3    0.99999D+00    0.99999D+00    0.12396D-10
+  4    0.99999D+00    0.99999D+00    0.11003D-10
+  5    0.99999D+00    0.99999D+00    0.92727D-11
+  6    0.10000D+01    0.10000D+01    0.73350D-11
+  7    0.10000D+01    0.10000D+01    0.53126D-11
+  8    0.10000D+01    0.10000D+01    0.33242D-11
+  9    0.10000D+01    0.10000D+01    0.14775D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1603 f-s =       2050 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61293D-13
+  2    0.13685D-01    0.13685D-01    0.61867D-12
+  3    0.19229D+00    0.19229D+00    0.87089D-11
+  4    0.13534D+00    0.13534D+00    0.62417D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       3321 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20544D-10
+  2    0.17334D-13    0.12659D-13    0.46750D-14
+  3    0.13204D-46    0.19115D-41    0.19115D-41
+  4   -0.20126D-75    0.22774D-54    0.22774D-54
+  5    0.87474-109    0.00000D+00    0.87474-109
+  6   -0.91112-148    0.00000D+00    0.91112-148
+  7   -0.27914-190    0.00000D+00    0.27914-190
+  8    0.73439-237    0.00000D+00    0.73439-237
+  9   -0.38509-283    0.00000D+00    0.38509-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6206 f-s =       7597 J-s =        159
+ Computed and reference solutions and absolute errors follow:
+  1    0.99916D-09    0.10042D-08    0.50031D-11
+  2    0.20868D-08    0.20955D-08    0.86476D-11
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1556 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32348D-55    0.61813D-30    0.61813D-30
+  2    0.71849D-56    0.89637D-30    0.89637D-30
+  3    0.19968D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27425D-13
+  5    0.45400D-04    0.45400D-04    0.82192D-11
+  6    0.13534D+00    0.13534D+00    0.15074D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1733 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73977D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14472D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2001 f-s =       2707 J-s =         54
+ Computed and reference solutions and absolute errors follow:
+  1    0.12047D-20    0.11886D-21    0.10859D-20
+  2   -0.21584D-21   -0.23259D-21    0.16750D-22
+  3    0.20708D-34    0.15179D-34    0.55298D-35
+  4    0.20612D-08    0.20612D-08    0.22582D-13
+  5    0.45400D-04    0.45400D-04    0.66484D-11
+  6    0.13534D+00    0.13534D+00    0.13997D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7506 f-s =      10173 J-s =        197
+ Computed and reference solutions and absolute errors follow:
+  1   -0.88593D-11   -0.23669D-13    0.88356D-11
+  2   -0.19996D-10    0.34489D-13    0.20030D-10
+  3    0.18048D-34    0.18049D-34    0.26526D-39
+  4    0.20612D-08    0.20612D-08    0.28814D-16
+  5    0.45400D-04    0.45400D-04    0.19761D-13
+  6    0.13534D+00    0.13534D+00    0.34694D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1545 f-s =       1987 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.99165D-12
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1384 f-s =       1759 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35295D-11
+  2    0.40000D-01    0.40000D-01    0.31373D-12
+  3    0.40016D-01    0.40016D-01    0.28993D-12
+  4    0.40032D-01    0.40032D-01    0.28578D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1380 f-s =       1761 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11307D-11
+  2    0.40000D+00    0.40000D+00    0.10053D-11
+  3    0.41600D+00    0.41600D+00    0.10104D-11
+  4    0.43331D+00    0.43331D+00    0.10800D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =       1077 f-s =       1386 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20850D-12
+  2    0.10000D+01    0.10000D+01    0.46374D-12
+  3    0.10000D+01    0.10000D+01    0.84666D-12
+  4    0.10000D+01    0.10000D+01    0.16690D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =       1016 f-s =       1310 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.38725D-12
+  2    0.10000D+01    0.10000D+01    0.86098D-12
+  3    0.10000D+01    0.10000D+01    0.17092D-11
+  4    0.10008D+01    0.10008D+01    0.34486D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        872 f-s =       1274 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.18243D-09
+  2    0.10004D+01    0.10004D+01    0.15060D-09
+  3    0.10000D+01    0.10000D+01    0.67724D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1208 f-s =       1701 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.83500D-12
+  2    0.25166D+00    0.25166D+00    0.89911D-12
+  3    0.99707D+00    0.99707D+00    0.29291D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1733 f-s =       2263 J-s =         54
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.16909D-12
+  2    0.56309D-02    0.56309D-02    0.32700D-15
+  3    0.10007D+01    0.10007D+01    0.46696D-12
+  4    0.65374D+00    0.65374D+00    0.17408D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        764 f-s =       1054 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.83209D-11
+  2    0.98757D+00    0.98757D+00    0.58624D-11
+  3   -0.51035D+00   -0.51035D+00    0.85114D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =       1009 f-s =       1556 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.11626D-09
+  2    0.99933D+00    0.99933D+00    0.13513D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1157 f-s =       1600 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.19426D-11
+  2    0.99730D+00    0.99730D+00    0.13117D-10
+  3    0.10005D+01    0.10005D+01    0.41331D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1731 f-s =       3293 J-s =        143
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14211D-13
+  2    0.32612D-13   -0.72884D-12    0.76146D-12
+  3   -0.12147D-13    0.15348D-11    0.15470D-11
+  4   -0.58223D-13   -0.10837D-11    0.10255D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1758 f-s =       2138 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.12932D-08
+  2    0.56344D-01    0.56344D-01    0.36665D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =       1079 f-s =       1379 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.10049D-10
+  2    0.33231D-02    0.33231D-02    0.12759D-10
+  3    0.99911D+00    0.99911D+00    0.32006D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       5150 f-s =      21439 J-s =       1518
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.38088D-09
+  2   -0.67797D+00   -0.67797D+00    0.37184D-09
+  3   -0.15209D-07   -0.14501D-07    0.70771D-09
+  4    0.14462D-07    0.13789D-07    0.67295D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        664 f-s =        923 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45448D-07
+  2    0.94674D+00    0.94674D+00    0.51423D-07
+  3    0.99777D+00    0.99777D+00    0.78155D-08
+  4    0.94183D+00    0.94183D+00    0.53936D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2646 f-s =       4201 J-s =         84
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.55835D-11
+  2    0.15223D-03    0.15223D-03    0.10518D-13
+  3    0.99887D+00    0.99887D+00    0.55427D-11
+  4    0.32420D-02    0.32420D-02    0.87560D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        779 f-s =        968 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.16542D-10
+  2    0.52568D+00    0.52568D+00    0.22209D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1674 f-s =       2232 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39535D-11
+  2    0.23607D+00    0.23607D+00    0.11805D-10
+  3    0.20426D-04    0.20426D-04    0.99635D-12
+  4    0.99860D+00    0.99860D+00    0.53804D-10
+  5    0.99879D+00    0.99879D+00    0.91025D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       3815 f-s =       6013 J-s =        137
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.34358D-11
+  2    0.72895D-03    0.72895D-03    0.16975D-10
+  3    0.96463D-04    0.96463D-04    0.94514D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1420 f-s =       2240 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.17662D-09
+  2    0.44958D+00    0.44958D+00    0.15850D-09
+  3    0.99988D+00    0.99988D+00    0.35250D-09
+  4    0.99949D+00    0.99949D+00    0.62130D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46240D-83    0.28230D-55    0.28230D-55
+  4   -0.54017D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1518 f-s =       1898 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13180D-10
+  2    0.99999D+00    0.99999D+00    0.13179D-10
+  3    0.99999D+00    0.99999D+00    0.12287D-10
+  4    0.99999D+00    0.99999D+00    0.10905D-10
+  5    0.99999D+00    0.99999D+00    0.91910D-11
+  6    0.10000D+01    0.10000D+01    0.72703D-11
+  7    0.10000D+01    0.10000D+01    0.52659D-11
+  8    0.10000D+01    0.10000D+01    0.32949D-11
+  9    0.10000D+01    0.10000D+01    0.14644D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1595 f-s =       1812 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.67727D-13
+  2    0.13685D-01    0.13685D-01    0.68361D-12
+  3    0.19229D+00    0.19229D+00    0.96231D-11
+  4    0.13534D+00    0.13534D+00    0.68976D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20548D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13242D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88166-109    0.00000D+00    0.88166-109
+  6   -0.91781-148    0.00000D+00    0.91781-148
+  7   -0.28134-190    0.00000D+00    0.28134-190
+  8    0.74098-237    0.00000D+00    0.74098-237
+  9   -0.38761-283    0.00000D+00    0.38761-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6206 f-s =       6769 J-s =        111
+ Computed and reference solutions and absolute errors follow:
+  1    0.99916D-09    0.10042D-08    0.50040D-11
+  2    0.20868D-08    0.20955D-08    0.86494D-11
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32341D-55    0.61813D-30    0.61813D-30
+  2    0.70205D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82190D-11
+  6    0.13534D+00    0.13534D+00    0.15070D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.74038D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80713D-11
+  6    0.13534D+00    0.13534D+00    0.14461D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2001 f-s =       2293 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.12058D-20    0.11886D-21    0.10870D-20
+  2   -0.21665D-21   -0.23259D-21    0.15943D-22
+  3    0.20709D-34    0.15179D-34    0.55302D-35
+  4    0.20612D-08    0.20612D-08    0.22584D-13
+  5    0.45400D-04    0.45400D-04    0.66490D-11
+  6    0.13534D+00    0.13534D+00    0.14001D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7522 f-s =       8540 J-s =        133
+ Computed and reference solutions and absolute errors follow:
+  1    0.57897D-12   -0.23669D-13    0.60264D-12
+  2    0.37572D-11    0.34489D-13    0.37228D-11
+  3    0.18048D-34    0.18049D-34    0.35107D-39
+  4    0.20612D-08    0.20612D-08    0.37693D-16
+  5    0.45400D-04    0.45400D-04    0.25787D-13
+  6    0.13534D+00    0.13534D+00    0.32613D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1545 f-s =       1746 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.93097D-12
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1384 f-s =       1577 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35293D-11
+  2    0.40000D-01    0.40000D-01    0.31371D-12
+  3    0.40016D-01    0.40016D-01    0.28984D-12
+  4    0.40032D-01    0.40032D-01    0.28566D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1380 f-s =       1568 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11434D-11
+  2    0.40000D+00    0.40000D+00    0.10166D-11
+  3    0.41600D+00    0.41600D+00    0.10217D-11
+  4    0.43331D+00    0.43331D+00    0.10922D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =       1077 f-s =       1225 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20683D-12
+  2    0.10000D+01    0.10000D+01    0.46030D-12
+  3    0.10000D+01    0.10000D+01    0.84011D-12
+  4    0.10000D+01    0.10000D+01    0.16558D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =       1016 f-s =       1165 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35516D-12
+  2    0.10000D+01    0.10000D+01    0.78948D-12
+  3    0.10000D+01    0.10000D+01    0.15675D-11
+  4    0.10008D+01    0.10008D+01    0.31619D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        896 f-s =       1167 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.14691D-09
+  2    0.10004D+01    0.10004D+01    0.11997D-09
+  3    0.10000D+01    0.10000D+01    0.88818D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1204 f-s =       1491 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.17406D-11
+  2    0.25166D+00    0.25166D+00    0.20231D-11
+  3    0.99707D+00    0.99707D+00    0.61038D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1730 f-s =       1984 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.58942D-12
+  2    0.56309D-02    0.56309D-02    0.11467D-14
+  3    0.10007D+01    0.10007D+01    0.16391D-11
+  4    0.65374D+00    0.65374D+00    0.60996D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        788 f-s =        999 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.33100D-10
+  2    0.98757D+00    0.98757D+00    0.23315D-10
+  3   -0.51035D+00   -0.51035D+00    0.34421D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        939 f-s =       1355 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.12166D-09
+  2    0.99933D+00    0.99933D+00    0.12896D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1145 f-s =       1449 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.18814D-11
+  2    0.99730D+00    0.99730D+00    0.12703D-10
+  3    0.10005D+01    0.10005D+01    0.40026D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1690 f-s =       2674 J-s =        142
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13656D-13
+  2    0.10394D-15   -0.72884D-12    0.72895D-12
+  3   -0.53587D-13    0.15348D-11    0.15884D-11
+  4   -0.42764D-13   -0.10837D-11    0.10409D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1749 f-s =       1981 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.11729D-08
+  2    0.56344D-01    0.56344D-01    0.33781D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =       1086 f-s =       1299 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.10044D-10
+  2    0.33231D-02    0.33231D-02    0.12769D-10
+  3    0.99911D+00    0.99911D+00    0.20814D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       4956 f-s =      14098 J-s =       1323
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.13183D-09
+  2   -0.67797D+00   -0.67797D+00    0.12927D-09
+  3   -0.14800D-07   -0.14501D-07    0.29906D-09
+  4    0.13972D-07    0.13789D-07    0.18251D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        669 f-s =        834 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45448D-07
+  2    0.94674D+00    0.94674D+00    0.51423D-07
+  3    0.99777D+00    0.99777D+00    0.78153D-08
+  4    0.94183D+00    0.94183D+00    0.53936D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2895 f-s =       4062 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.91980D-11
+  2    0.15223D-03    0.15223D-03    0.17341D-13
+  3    0.99887D+00    0.99887D+00    0.91304D-11
+  4    0.32420D-02    0.32420D-02    0.14432D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        778 f-s =        894 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.20677D-10
+  2    0.52568D+00    0.52568D+00    0.27760D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1680 f-s =       1900 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.39968D-14
+  3    0.20426D-04    0.20426D-04    0.99390D-12
+  4    0.99860D+00    0.99860D+00    0.11102D-13
+  5    0.99879D+00    0.99879D+00    0.48531D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       3881 f-s =       5628 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.88075D-12
+  2    0.72895D-03    0.72895D-03    0.21217D-10
+  3    0.96463D-04    0.96463D-04    0.17429D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1458 f-s =       1999 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.29548D-09
+  2    0.44958D+00    0.44958D+00    0.26516D-09
+  3    0.99988D+00    0.99988D+00    0.58973D-09
+  4    0.99949D+00    0.99949D+00    0.10400D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+
+
+                     Results for ITOL =   5
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    5          1    0.32471D-05    0.32471D-05    0.32471D-05
+    5          2    0.57532D-06    0.57503D-06    0.57532D-06
+    5          3    0.21302D-05    0.21522D-05    0.21302D-05
+    5          4    0.35755D-04    0.35755D-04    0.35755D-04
+    5         11    0.58717D-04    0.58718D-04    0.58717D-04
+    5         12    0.25783D-05    0.25783D-05    0.25783D-05
+    5         13    0.36548D-06    0.36548D-06    0.36548D-06
+    5         14    0.24517D-04    0.24517D-04    0.24517D-04
+    5         15    0.16202D-04    0.16197D-04    0.16202D-04
+    5         21    0.20168D-04    0.20211D-05    0.20168D-04
+    5         22    0.28851D-06    0.38024D-05    0.28851D-06
+    5         23    0.30005D-05    0.74788D-06    0.30005D-05
+    5         24    0.23601D-05    0.21357D-05    0.23601D-05
+    5         25    0.67400D-06    0.11030D-04    0.67400D-06
+    5         31    0.84203D-04    0.83964D-04    0.84203D-04
+    5         32    0.18943D-04    0.14727D-05    0.18943D-04
+    5         33    0.40200D-05    0.98823D-06    0.40200D-05
+    5         34    0.20796D-04    0.23083D-04    0.20796D-04
+    5         35    0.51238D-04    0.51238D-04    0.51238D-04
+    5         36    0.26429D-05    0.79526D-05    0.26429D-05
+    5         41    0.37272D-08    0.39261D-08    0.37272D-08
+    5         42    0.60070D-03    0.68612D-03    0.60070D-03
+    5         43    0.35616D-04    0.18211D-04    0.35616D-04
+    5         44    0.21049D-04    0.19018D-04    0.21049D-04
+    5         45    0.56626D-05    0.54941D-05    0.56626D-05
+    5         51    0.42450D-05    0.64518D-05    0.42450D-05
+    5         52    0.12491D-04    0.12435D-04    0.12491D-04
+    5         53    0.44042D-06    0.27632D-04    0.44042D-06
+    5         54    0.10047D-04    0.62567D-05    0.10047D-04
+    5         55    0.69479D-09    0.47789D-07    0.69479D-09
+
+
+                     Results for ITOL =   6
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    6          1    0.30489D-06    0.30488D-06    0.30489D-06
+    6          2    0.38582D-05    0.42534D-05    0.38582D-05
+    6          3    0.18930D-06    0.37164D-05    0.18930D-06
+    6          4    0.76940D-06    0.76940D-06    0.76940D-06
+    6         11    0.19333D-04    0.19333D-04    0.19333D-04
+    6         12    0.21619D-05    0.21619D-05    0.21619D-05
+    6         13    0.20675D-05    0.20675D-05    0.20675D-05
+    6         14    0.12312D-05    0.12312D-05    0.12312D-05
+    6         15    0.22347D-04    0.22488D-04    0.22347D-04
+    6         21    0.20968D-06    0.53723D-06    0.20968D-06
+    6         22    0.55706D-07    0.19179D-05    0.55706D-07
+    6         23    0.37237D-07    0.36349D-06    0.37237D-07
+    6         24    0.24962D-06    0.62207D-06    0.24962D-06
+    6         25    0.83501D-06    0.29749D-07    0.83501D-06
+    6         31    0.11006D-04    0.28008D-04    0.11006D-04
+    6         32    0.51810D-05    0.66534D-05    0.51810D-05
+    6         33    0.66024D-06    0.34641D-06    0.66024D-06
+    6         34    0.79363D-06    0.40388D-05    0.79363D-06
+    6         35    0.95448D-05    0.17110D-04    0.95448D-05
+    6         36    0.67543D-05    0.17781D-06    0.67543D-05
+    6         41    0.35910D-09    0.13920D-08    0.35910D-09
+    6         42    0.37357D-04    0.11643D-03    0.37357D-04
+    6         43    0.10851D-04    0.10473D-04    0.10851D-04
+    6         44    0.82676D-06    0.38316D-06    0.82676D-06
+    6         45    0.13718D-05    0.13700D-05    0.13718D-05
+    6         51    0.40150D-06    0.24899D-05    0.40150D-06
+    6         52    0.68819D-05    0.69564D-05    0.68819D-05
+    6         53    0.40834D-06    0.38004D-06    0.40834D-06
+    6         54    0.15766D-05    0.24933D-06    0.15766D-05
+    6         55    0.28990D-08    0.18920D-08    0.28990D-08
+
+
+                     Results for ITOL =   7
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    7          1    0.17939D-06    0.17939D-06    0.17939D-06
+    7          2    0.12239D-06    0.13796D-06    0.12239D-06
+    7          3    0.51466D-07    0.47194D-07    0.51466D-07
+    7          4    0.13268D-06    0.13268D-06    0.13268D-06
+    7         11    0.58269D-06    0.58274D-06    0.58269D-06
+    7         12    0.12318D-06    0.12318D-06    0.12318D-06
+    7         13    0.11735D-06    0.11735D-06    0.11735D-06
+    7         14    0.88396D-07    0.88396D-07    0.88396D-07
+    7         15    0.20089D-05    0.20088D-05    0.20089D-05
+    7         21    0.26281D-07    0.49626D-08    0.26281D-07
+    7         22    0.42538D-07    0.49231D-07    0.42538D-07
+    7         23    0.75664D-07    0.91194D-07    0.75664D-07
+    7         24    0.66996D-07    0.35465D-06    0.66996D-07
+    7         25    0.17272D-07    0.44946D-06    0.17272D-07
+    7         31    0.81574D-06    0.26073D-05    0.81574D-06
+    7         32    0.13393D-05    0.57601D-07    0.13393D-05
+    7         33    0.16859D-06    0.88421D-08    0.16859D-06
+    7         34    0.10017D-05    0.94864D-06    0.10017D-05
+    7         35    0.57779D-05    0.17124D-05    0.57779D-05
+    7         36    0.28200D-07    0.57380D-07    0.28200D-07
+    7         41    0.83381D-09    0.14846D-06    0.83381D-09
+    7         42    0.88978D-05    0.11627D-04    0.88978D-05
+    7         43    0.99478D-06    0.20239D-05    0.99478D-06
+    7         44    0.28235D-07    0.14027D-07    0.28235D-07
+    7         45    0.17151D-06    0.18863D-06    0.17151D-06
+    7         51    0.89191D-07    0.27678D-06    0.89191D-07
+    7         52    0.71041D-06    0.84577D-07    0.71041D-06
+    7         53    0.14488D-06    0.29711D-09    0.14488D-06
+    7         54    0.16906D-06    0.40697D-07    0.16906D-06
+    7         55    0.30004D-08    0.73318D-07    0.30004D-08
+
+
+                     Results for ITOL =   8
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    8          1    0.10373D-07    0.10373D-07    0.10373D-07
+    8          2    0.11411D-07    0.15639D-07    0.11411D-07
+    8          3    0.63728D-07    0.63730D-07    0.63728D-07
+    8          4    0.81042D-08    0.81042D-08    0.81042D-08
+    8         11    0.16039D-06    0.16040D-06    0.16039D-06
+    8         12    0.20557D-07    0.20557D-07    0.20557D-07
+    8         13    0.16174D-07    0.16174D-07    0.16174D-07
+    8         14    0.10211D-07    0.10211D-07    0.10211D-07
+    8         15    0.39550D-06    0.40233D-06    0.39550D-06
+    8         21    0.18517D-08    0.18530D-08    0.18517D-08
+    8         22    0.58869D-08    0.60414D-08    0.58869D-08
+    8         23    0.47449D-08    0.32007D-08    0.47449D-08
+    8         24    0.34294D-07    0.11560D-07    0.34294D-07
+    8         25    0.80857D-08    0.58998D-07    0.80857D-08
+    8         31    0.16855D-06    0.39249D-06    0.16855D-06
+    8         32    0.43735D-07    0.18642D-07    0.43735D-07
+    8         33    0.39755D-08    0.61198D-09    0.39755D-08
+    8         34    0.15173D-06    0.13883D-06    0.15173D-06
+    8         35    0.25334D-06    0.76780D-06    0.25334D-06
+    8         36    0.88004D-07    0.66762D-07    0.88004D-07
+    8         41    0.25592D-08    0.16715D-07    0.25592D-08
+    8         42    0.14853D-05    0.13671D-05    0.14853D-05
+    8         43    0.50468D-07    0.39561D-07    0.50468D-07
+    8         44    0.39659D-08    0.61869D-08    0.39659D-08
+    8         45    0.10221D-07    0.95418D-08    0.10221D-07
+    8         51    0.98051D-08    0.38840D-07    0.98051D-08
+    8         52    0.72658D-07    0.14767D-07    0.72658D-07
+    8         53    0.56650D-08    0.24491D-07    0.56650D-08
+    8         54    0.10143D-06    0.29301D-07    0.10143D-06
+    8         55    0.50719D-08    0.50640D-09    0.50719D-08
+
+
+                     Results for ITOL =   9
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    9          1    0.20958D-08    0.20958D-08    0.20958D-08
+    9          2    0.24991D-08    0.26028D-08    0.24991D-08
+    9          3    0.87621D-08    0.87620D-08    0.87621D-08
+    9          4    0.36942D-09    0.36942D-09    0.36942D-09
+    9         11    0.35943D-08    0.35970D-08    0.35943D-08
+    9         12    0.22293D-08    0.22293D-08    0.22293D-08
+    9         13    0.16949D-08    0.16949D-08    0.16949D-08
+    9         14    0.42677D-08    0.42677D-08    0.42677D-08
+    9         15    0.28880D-07    0.28889D-07    0.28880D-07
+    9         21    0.21201D-08    0.21699D-08    0.21201D-08
+    9         22    0.63349D-09    0.63784D-09    0.63349D-09
+    9         23    0.48844D-09    0.47464D-09    0.48844D-09
+    9         24    0.12527D-08    0.58505D-08    0.12527D-08
+    9         25    0.48572D-08    0.47832D-08    0.48572D-08
+    9         31    0.44446D-08    0.18151D-07    0.44446D-08
+    9         32    0.18080D-07    0.78188D-08    0.18080D-07
+    9         33    0.97984D-09    0.33671D-09    0.97984D-09
+    9         34    0.10166D-07    0.73218D-08    0.10166D-07
+    9         35    0.81592D-07    0.58559D-07    0.81592D-07
+    9         36    0.25741D-08    0.23229D-08    0.25741D-08
+    9         41    0.24902D-11    0.25173D-11    0.24902D-11
+    9         42    0.40208D-06    0.24234D-06    0.40208D-06
+    9         43    0.21622D-07    0.12044D-07    0.21622D-07
+    9         44    0.48625D-10    0.68585D-06    0.48625D-10
+    9         45    0.51652D-07    0.49339D-07    0.51652D-07
+    9         51    0.35698D-09    0.30183D-08    0.35698D-09
+    9         52    0.28195D-08    0.41146D-08    0.28195D-08
+    9         53    0.28828D-07    0.99486D-09    0.28828D-07
+    9         54    0.12654D-08    0.48541D-08    0.12654D-08
+    9         55    0.54653D-08    0.20164D-08    0.54653D-08
+
+
+                     Results for ITOL =  10
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   10          1    0.33624D-09    0.33624D-09    0.33624D-09
+   10          2    0.32399D-09    0.34220D-09    0.32399D-09
+   10          3    0.21191D-09    0.21146D-09    0.21191D-09
+   10          4    0.54749D-09    0.54749D-09    0.54749D-09
+   10         11    0.40318D-09    0.40311D-09    0.40318D-09
+   10         12    0.36754D-09    0.36754D-09    0.36754D-09
+   10         13    0.32141D-09    0.32141D-09    0.32141D-09
+   10         14    0.33828D-09    0.33829D-09    0.33828D-09
+   10         15    0.31884D-08    0.23023D-09    0.31884D-08
+   10         21    0.25669D-09    0.10058D-09    0.25669D-09
+   10         22    0.46526D-09    0.46606D-09    0.46526D-09
+   10         23    0.17845D-09    0.32244D-10    0.17845D-09
+   10         24    0.14706D-09    0.19437D-09    0.14706D-09
+   10         25    0.98321D-10    0.10977D-09    0.98321D-10
+   10         31    0.36247D-08    0.28838D-08    0.36247D-08
+   10         32    0.28674D-08    0.35710D-08    0.28674D-08
+   10         33    0.17064D-10    0.42556D-10    0.17064D-10
+   10         34    0.43798D-10    0.18415D-08    0.43798D-10
+   10         35    0.87922D-08    0.67064D-08    0.87922D-08
+   10         36    0.55119D-09    0.64653D-09    0.55119D-09
+   10         41    0.10779D-10    0.75643D-09    0.10779D-10
+   10         42    0.38996D-07    0.42937D-07    0.38996D-07
+   10         43    0.66566D-09    0.88365D-09    0.66566D-09
+   10         44    0.10133D-07    0.16934D-09    0.10133D-07
+   10         45    0.53601D-07    0.53517D-07    0.53601D-07
+   10         51    0.34065D-09    0.14275D-11    0.34065D-09
+   10         52    0.57701D-09    0.58912D-09    0.57701D-09
+   10         53    0.39988D-10    0.44213D-09    0.39988D-10
+   10         54    0.47860D-09    0.68655D-09    0.47860D-09
+   10         55    0.12202D-07    0.13581D-08    0.12202D-07
+
+
+                     Results for ITOL =  11
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   11          1    0.33886D-10    0.33883D-10    0.33886D-10
+   11          2    0.50967D-10    0.54345D-10    0.50967D-10
+   11          3    0.14940D-09    0.15153D-09    0.14940D-09
+   11          4    0.27668D-09    0.27667D-09    0.27668D-09
+   11         11    0.75409D-10    0.77730D-10    0.75409D-10
+   11         12    0.52756D-10    0.52756D-10    0.52756D-10
+   11         13    0.50269D-10    0.50269D-10    0.50269D-10
+   11         14    0.24207D-10    0.24207D-10    0.24207D-10
+   11         15    0.60011D-10    0.55650D-10    0.60011D-10
+   11         21    0.61172D-11    0.61120D-11    0.61172D-11
+   11         22    0.17746D-10    0.17742D-10    0.17746D-10
+   11         23    0.13408D-10    0.13238D-10    0.13408D-10
+   11         24    0.11799D-10    0.11648D-10    0.11799D-10
+   11         25    0.20969D-10    0.20998D-10    0.20969D-10
+   11         31    0.55292D-09    0.60922D-09    0.55292D-09
+   11         32    0.33849D-09    0.14127D-09    0.33849D-09
+   11         33    0.60840D-12    0.15277D-12    0.60840D-12
+   11         34    0.17109D-10    0.56216D-10    0.17109D-10
+   11         35    0.10661D-08    0.12698D-08    0.10661D-08
+   11         36    0.91399D-10    0.91202D-10    0.91399D-10
+   11         41    0.18208D-10    0.10646D-11    0.18208D-10
+   11         42    0.75668D-08    0.77815D-08    0.75668D-08
+   11         43    0.22316D-09    0.72006D-10    0.22316D-09
+   11         44    0.37456D-09    0.91198D-10    0.37456D-09
+   11         45    0.53915D-07    0.53927D-07    0.53915D-07
+   11         51    0.50261D-10    0.58758D-10    0.50261D-10
+   11         52    0.14003D-09    0.13270D-09    0.14003D-09
+   11         53    0.23326D-10    0.31057D-09    0.23326D-10
+   11         54    0.74371D-10    0.74189D-10    0.74371D-10
+   11         55    0.86760D-09    0.57853D-09    0.86760D-09
+
+
+                     Results for ITOL =  12
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   12          1    0.68578D-11    0.68577D-11    0.68578D-11
+   12          2    0.13180D-10    0.13297D-10    0.13180D-10
+   12          3    0.96231D-11    0.87089D-11    0.96231D-11
+   12          4    0.20548D-10    0.20544D-10    0.20548D-10
+   12         11    0.86494D-11    0.86476D-11    0.86494D-11
+   12         12    0.82190D-11    0.82192D-11    0.82190D-11
+   12         13    0.80713D-11    0.80714D-11    0.80713D-11
+   12         14    0.66490D-11    0.66484D-11    0.66490D-11
+   12         15    0.37228D-11    0.20030D-10    0.37228D-11
+   12         21    0.93097D-12    0.99165D-12    0.93097D-12
+   12         22    0.35293D-11    0.35295D-11    0.35293D-11
+   12         23    0.11434D-11    0.11307D-11    0.11434D-11
+   12         24    0.16558D-11    0.16690D-11    0.16558D-11
+   12         25    0.31619D-11    0.34486D-11    0.31619D-11
+   12         31    0.14691D-09    0.18243D-09    0.14691D-09
+   12         32    0.61038D-11    0.29291D-11    0.61038D-11
+   12         33    0.16391D-11    0.46696D-12    0.16391D-11
+   12         34    0.34421D-10    0.85114D-11    0.34421D-10
+   12         35    0.12896D-09    0.13513D-09    0.12896D-09
+   12         36    0.12703D-10    0.13117D-10    0.12703D-10
+   12         41    0.15884D-11    0.15470D-11    0.15884D-11
+   12         42    0.11729D-08    0.12932D-08    0.11729D-08
+   12         43    0.20814D-10    0.32006D-10    0.20814D-10
+   12         44    0.29906D-09    0.70771D-09    0.29906D-09
+   12         45    0.53936D-07    0.53936D-07    0.53936D-07
+   12         51    0.91980D-11    0.55835D-11    0.91980D-11
+   12         52    0.27760D-10    0.22209D-10    0.27760D-10
+   12         53    0.48531D-11    0.53804D-10    0.48531D-11
+   12         54    0.21217D-10    0.16975D-10    0.21217D-10
+   12         55    0.58973D-09    0.35250D-09    0.58973D-09
+
+
+                     Results for ITOL =   5
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        127       127       127
+        Jacs:           6         5         6
+        Ders:         192       208       192
+  
+    2   Steps:        141       141       141
+        Jacs:           5         6         5
+        Ders:         224       287       224
+  
+    3   Steps:        152       152       152
+        Jacs:           5         6         5
+        Ders:         221       249       221
+  
+    4   Steps:        189       189       189
+        Jacs:           6         8         6
+        Ders:         291       391       291
+  
+   11   Steps:        520       520       520
+        Jacs:          12        16        12
+        Ders:         604       684       604
+  
+   12   Steps:        107       107       107
+        Jacs:           4         5         4
+        Ders:         154       190       154
+  
+   13   Steps:        115       115       115
+        Jacs:           5         5         5
+        Ders:         166       196       166
+  
+   14   Steps:        182       182       182
+        Jacs:           5         8         5
+        Ders:         236       302       236
+  
+   15   Steps:       2551      2551      2551
+        Jacs:          46        72        46
+        Ders:        2963      3551      2963
+  
+   21   Steps:        135       144       135
+        Jacs:           6         6         6
+        Ders:         196       237       196
+  
+   22   Steps:        135       134       135
+        Jacs:           6         5         6
+        Ders:         191       210       191
+  
+   23   Steps:        127       127       127
+        Jacs:           5         5         5
+        Ders:         180       198       180
+  
+   24   Steps:        114       107       114
+        Jacs:           4         5         4
+        Ders:         162       175       162
+  
+   25   Steps:        103        97       103
+        Jacs:           3         5         3
+        Ders:         135       158       135
+  
+   31   Steps:         72        72        72
+        Jacs:           3         4         3
+        Ders:         136       151       136
+  
+   32   Steps:        155       248       155
+        Jacs:           3        11         3
+        Ders:         226       436       226
+  
+   33   Steps:        199       209       199
+        Jacs:           7         8         7
+        Ders:         307       346       307
+  
+   34   Steps:         99        97        99
+        Jacs:           5         5         5
+        Ders:         156       170       156
+  
+   35   Steps:         76        76        76
+        Jacs:           4         4         4
+        Ders:         126       134       126
+  
+   36   Steps:        127       129       127
+        Jacs:           6         5         6
+        Ders:         195       207       195
+  
+   41   Steps:        124       124       124
+        Jacs:           7         5         7
+        Ders:         188       200       188
+  
+   42   Steps:        178       166       178
+        Jacs:           4         8         4
+        Ders:         245       286       245
+  
+   43   Steps:        150       134       150
+        Jacs:           5         5         5
+        Ders:         273       206       273
+  
+   44   Steps:        253       316       253
+        Jacs:           8        13         8
+        Ders:         378       521       378
+  
+   45   Steps:         74        80        74
+        Jacs:           2         5         2
+        Ders:         100       140       100
+  
+   51   Steps:        384       260       384
+        Jacs:          22        20        22
+        Ders:         745       555       745
+  
+   52   Steps:         95        95        95
+        Jacs:           3         5         3
+        Ders:         137       152       137
+  
+   53   Steps:        195       184       195
+        Jacs:           4         8         4
+        Ders:         274       334       274
+  
+   54   Steps:        674       658       674
+        Jacs:          21        34        21
+        Ders:        1045      1139      1045
+  
+   55   Steps:        183       193       183
+        Jacs:           7         8         7
+        Ders:         284       341       284
+  
+
+
+                     Results for ITOL =   6
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        168       168       168
+        Jacs:           7         8         7
+        Ders:         242       278       242
+  
+    2   Steps:        206       207       206
+        Jacs:           7         8         7
+        Ders:         330       410       330
+  
+    3   Steps:        206       206       206
+        Jacs:           6         8         6
+        Ders:         299       337       299
+  
+    4   Steps:        254       254       254
+        Jacs:           8        11         8
+        Ders:         390       530       390
+  
+   11   Steps:        686       686       686
+        Jacs:          16        21        16
+        Ders:         795       899       795
+  
+   12   Steps:        137       137       137
+        Jacs:           5         5         5
+        Ders:         201       231       201
+  
+   13   Steps:        148       148       148
+        Jacs:           5         6         5
+        Ders:         207       249       207
+  
+   14   Steps:        276       276       276
+        Jacs:           7        11         7
+        Ders:         343       433       343
+  
+   15   Steps:       2619      2619      2619
+        Jacs:          49        72        49
+        Ders:        3088      3658      3088
+  
+   21   Steps:        182       184       182
+        Jacs:           7         8         7
+        Ders:         254       298       254
+  
+   22   Steps:        177       175       177
+        Jacs:           8         8         8
+        Ders:         252       286       252
+  
+   23   Steps:        174       173       174
+        Jacs:           7         8         7
+        Ders:         249       289       249
+  
+   24   Steps:        153       145       153
+        Jacs:           5         6         5
+        Ders:         216       244       216
+  
+   25   Steps:        147       145       147
+        Jacs:           5         6         5
+        Ders:         208       222       208
+  
+   31   Steps:        142       140       142
+        Jacs:           3         5         3
+        Ders:         237       232       237
+  
+   32   Steps:        204       243       204
+        Jacs:           4        11         4
+        Ders:         321       413       321
+  
+   33   Steps:        254       231       254
+        Jacs:           8         9         8
+        Ders:         365       381       365
+  
+   34   Steps:        110       114       110
+        Jacs:           7         5         7
+        Ders:         177       194       177
+  
+   35   Steps:        107       117       107
+        Jacs:           5         6         5
+        Ders:         179       202       179
+  
+   36   Steps:        201       205       201
+        Jacs:           8         8         8
+        Ders:         299       311       299
+  
+   41   Steps:        171       171       171
+        Jacs:           8         7         8
+        Ders:         245       269       245
+  
+   42   Steps:        228       232       228
+        Jacs:           5         9         5
+        Ders:         313       363       313
+  
+   43   Steps:        195       245       195
+        Jacs:           7        11         7
+        Ders:         299       416       299
+  
+   44   Steps:        282       275       282
+        Jacs:           9        12         9
+        Ders:         411       449       411
+  
+   45   Steps:         88        88        88
+        Jacs:           3         4         3
+        Ders:         133       153       133
+  
+   51   Steps:        405       373       405
+        Jacs:          23        25        23
+        Ders:         728       816       728
+  
+   52   Steps:        108       108       108
+        Jacs:           5         5         5
+        Ders:         170       175       170
+  
+   53   Steps:        225       219       225
+        Jacs:           5         9         5
+        Ders:         303       354       303
+  
+   54   Steps:        845       754       845
+        Jacs:          23        35        23
+        Ders:        1297      1272      1297
+  
+   55   Steps:        276       257       276
+        Jacs:           9        11         9
+        Ders:         416       431       416
+  
+
+
+                     Results for ITOL =   7
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        229       229       229
+        Jacs:           8         8         8
+        Ders:         308       340       308
+  
+    2   Steps:        268       264       268
+        Jacs:           9        11         9
+        Ders:         421       528       421
+  
+    3   Steps:        276       276       276
+        Jacs:           8        11         8
+        Ders:         385       441       385
+  
+    4   Steps:        358       358       358
+        Jacs:          11        14        11
+        Ders:         535       705       535
+  
+   11   Steps:        975       975       975
+        Jacs:          21        30        21
+        Ders:        1107      1263      1107
+  
+   12   Steps:        201       201       201
+        Jacs:           7         7         7
+        Ders:         282       324       282
+  
+   13   Steps:        219       219       219
+        Jacs:           7         7         7
+        Ders:         301       343       301
+  
+   14   Steps:        373       373       373
+        Jacs:          10        13        10
+        Ders:         461       557       461
+  
+   15   Steps:       2868      2868      2868
+        Jacs:          53        76        53
+        Ders:        3382      3976      3382
+  
+   21   Steps:        269       265       269
+        Jacs:           9        11         9
+        Ders:         352       405       352
+  
+   22   Steps:        239       240       239
+        Jacs:           9         9         9
+        Ders:         330       367       330
+  
+   23   Steps:        239       238       239
+        Jacs:           9         9         9
+        Ders:         332       367       332
+  
+   24   Steps:        207       195       207
+        Jacs:           7         8         7
+        Ders:         277       301       277
+  
+   25   Steps:        196       193       196
+        Jacs:           6         8         6
+        Ders:         291       323       291
+  
+   31   Steps:        193       190       193
+        Jacs:           5         8         5
+        Ders:         298       337       298
+  
+   32   Steps:        334       322       334
+        Jacs:           7        13         7
+        Ders:         458       527       458
+  
+   33   Steps:        314       344       314
+        Jacs:          10        14        10
+        Ders:         440       532       440
+  
+   34   Steps:        161       161       161
+        Jacs:           7         6         7
+        Ders:         242       257       242
+  
+   35   Steps:        160       178       160
+        Jacs:           7         9         7
+        Ders:         254       313       254
+  
+   36   Steps:        296       276       296
+        Jacs:           9        11         9
+        Ders:         402       463       402
+  
+   41   Steps:        236       255       236
+        Jacs:          10        11        10
+        Ders:         342       400       342
+  
+   42   Steps:        289       286       289
+        Jacs:           7        10         7
+        Ders:         401       420       401
+  
+   43   Steps:        314       276       314
+        Jacs:          10        11        10
+        Ders:         463       467       463
+  
+   44   Steps:        409       384       409
+        Jacs:          12        15        12
+        Ders:         556       613       556
+  
+   45   Steps:        119       121       119
+        Jacs:           4         5         4
+        Ders:         169       196       169
+  
+   51   Steps:        538       568       538
+        Jacs:          25        30        25
+        Ders:         977      1229       977
+  
+   52   Steps:        142       145       142
+        Jacs:           5         6         5
+        Ders:         207       234       207
+  
+   53   Steps:        346       292       346
+        Jacs:           7        11         7
+        Ders:         491       469       491
+  
+   54   Steps:        937       973       937
+        Jacs:          27        43        27
+        Ders:        1556      1726      1556
+  
+   55   Steps:        372       340       372
+        Jacs:          11        14        11
+        Ders:         544       550       544
+  
+
+
+                     Results for ITOL =   8
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        302       302       302
+        Jacs:          11        11        11
+        Ders:         408       452       408
+  
+    2   Steps:        374       376       374
+        Jacs:          11        14        11
+        Ders:         536       684       536
+  
+    3   Steps:        385       385       385
+        Jacs:          11        15        11
+        Ders:         494       570       494
+  
+    4   Steps:        495       495       495
+        Jacs:          13        16        13
+        Ders:         685       875       685
+  
+   11   Steps:       1361      1361      1361
+        Jacs:          28        39        28
+        Ders:        1529      1729      1529
+  
+   12   Steps:        281       281       281
+        Jacs:           9        11         9
+        Ders:         371       449       371
+  
+   13   Steps:        305       305       305
+        Jacs:          10        11        10
+        Ders:         402       474       402
+  
+   14   Steps:        585       585       585
+        Jacs:          15        18        15
+        Ders:         725       851       725
+  
+   15   Steps:       3239      3239      3239
+        Jacs:          59        89        59
+        Ders:        3774      4488      3774
+  
+   21   Steps:        367       367       367
+        Jacs:          12        13        12
+        Ders:         464       520       464
+  
+   22   Steps:        336       336       336
+        Jacs:          11        13        11
+        Ders:         435       495       435
+  
+   23   Steps:        324       324       324
+        Jacs:          10        11        10
+        Ders:         413       461       413
+  
+   24   Steps:        260       259       260
+        Jacs:           9        11         9
+        Ders:         356       392       356
+  
+   25   Steps:        252       245       252
+        Jacs:           8        10         8
+        Ders:         337       370       337
+  
+   31   Steps:        301       397       301
+        Jacs:           7        15         7
+        Ders:         467       665       467
+  
+   32   Steps:        416       421       416
+        Jacs:           9        17         9
+        Ders:         593       679       593
+  
+   33   Steps:        444       419       444
+        Jacs:          13        18        13
+        Ders:         577       657       577
+  
+   34   Steps:        245       244       245
+        Jacs:          10        10        10
+        Ders:         358       383       358
+  
+   35   Steps:        274       237       274
+        Jacs:           9        12         9
+        Ders:         474       449       474
+  
+   36   Steps:        375       356       375
+        Jacs:          12        14        12
+        Ders:         539       583       539
+  
+   41   Steps:        317       348       317
+        Jacs:          12        14        12
+        Ders:         421       526       421
+  
+   42   Steps:        398       402       398
+        Jacs:          10        15        10
+        Ders:         515       560       515
+  
+   43   Steps:        385       362       385
+        Jacs:          11        14        11
+        Ders:         531       573       531
+  
+   44   Steps:        558       540       558
+        Jacs:          14        18        14
+        Ders:         727       803       727
+  
+   45   Steps:        179       190       179
+        Jacs:           6         8         6
+        Ders:         254       296       254
+  
+   51   Steps:        720       686       720
+        Jacs:          26        30        26
+        Ders:        1174      1220      1174
+  
+   52   Steps:        204       209       204
+        Jacs:           7         8         7
+        Ders:         277       304       277
+  
+   53   Steps:        414       401       414
+        Jacs:           8        15         8
+        Ders:         507       615       507
+  
+   54   Steps:       1438      1171      1438
+        Jacs:          34        51        34
+        Ders:        2398      2120      2398
+  
+   55   Steps:        500       409       500
+        Jacs:          14        16        14
+        Ders:         732       639       732
+  
+
+
+                     Results for ITOL =   9
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        428       428       428
+        Jacs:          13        16        13
+        Ders:         542       618       542
+  
+    2   Steps:        522       522       522
+        Jacs:          14        16        14
+        Ders:         718       880       718
+  
+    3   Steps:        537       537       537
+        Jacs:          14        19        14
+        Ders:         657       753       657
+  
+    4   Steps:        703       703       703
+        Jacs:          18        26        18
+        Ders:         953      1293       953
+  
+   11   Steps:       2034      2034      2034
+        Jacs:          39        55        39
+        Ders:        2248      2532      2248
+  
+   12   Steps:        390       390       390
+        Jacs:          11        15        11
+        Ders:         495       609       495
+  
+   13   Steps:        426       426       426
+        Jacs:          11        13        11
+        Ders:         529       619       529
+  
+   14   Steps:        798       798       798
+        Jacs:          18        24        18
+        Ders:         960      1140       960
+  
+   15   Steps:       3790      3790      3790
+        Jacs:          69       102        69
+        Ders:        4373      5183      4373
+  
+   21   Steps:        525       525       525
+        Jacs:          16        18        16
+        Ders:         643       724       643
+  
+   22   Steps:        460       460       460
+        Jacs:          14        15        14
+        Ders:         573       637       573
+  
+   23   Steps:        468       468       468
+        Jacs:          13        15        13
+        Ders:         570       639       570
+  
+   24   Steps:        363       363       363
+        Jacs:          11        14        11
+        Ders:         461       527       461
+  
+   25   Steps:        345       347       345
+        Jacs:          11        12        11
+        Ders:         443       491       443
+  
+   31   Steps:        489       510       489
+        Jacs:          11        19        11
+        Ders:         733       858       733
+  
+   32   Steps:        525       513       525
+        Jacs:          11        19        11
+        Ders:         721       764       721
+  
+   33   Steps:        593       610       593
+        Jacs:          17        21        17
+        Ders:         740       864       740
+  
+   34   Steps:        323       329       323
+        Jacs:          11        12        11
+        Ders:         438       521       438
+  
+   35   Steps:        365       353       365
+        Jacs:          11        15        11
+        Ders:         570       600       570
+  
+   36   Steps:        469       469       469
+        Jacs:          14        18        14
+        Ders:         645       718       645
+  
+   41   Steps:        451       451       451
+        Jacs:          15        16        15
+        Ders:         572       640       572
+  
+   42   Steps:        587       578       587
+        Jacs:          12        21        12
+        Ders:         714       759       714
+  
+   43   Steps:        522       508       522
+        Jacs:          15        20        15
+        Ders:         777       818       777
+  
+   44   Steps:        766      1244       766
+        Jacs:          19       198        19
+        Ders:         950      3392       950
+  
+   45   Steps:        262       239       262
+        Jacs:           7         8         7
+        Ders:         345       356       345
+  
+   51   Steps:       1010       960      1010
+        Jacs:          31        41        31
+        Ders:        1644      1748      1644
+  
+   52   Steps:        284       288       284
+        Jacs:          10        12        10
+        Ders:         368       408       368
+  
+   53   Steps:        598       589       598
+        Jacs:          11        22        11
+        Ders:         723       882       723
+  
+   54   Steps:       1685      1609      1685
+        Jacs:          38        68        38
+        Ders:        2766      2925      2766
+  
+   55   Steps:        666       714       666
+        Jacs:          18        29        18
+        Ders:         993      1254       993
+  
+
+
+                     Results for ITOL =  10
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        591       591       591
+        Jacs:          17        18        17
+        Ders:         713       789       713
+  
+    2   Steps:        735       736       735
+        Jacs:          19        24        19
+        Ders:         996      1252       996
+  
+    3   Steps:        760       760       760
+        Jacs:          19        24        19
+        Ders:         908      1024       908
+  
+    4   Steps:        999       999       999
+        Jacs:          22        31        22
+        Ders:        1284      1684      1284
+  
+   11   Steps:       2913      2913      2913
+        Jacs:          55        77        55
+        Ders:        3206      3602      3206
+  
+   12   Steps:        558       558       558
+        Jacs:          15        18        15
+        Ders:         697       823       697
+  
+   13   Steps:        598       598       598
+        Jacs:          16        19        16
+        Ders:         735       867       735
+  
+   14   Steps:       1106      1106      1106
+        Jacs:          24        31        24
+        Ders:        1299      1527      1299
+  
+   15   Steps:       4571      4587      4571
+        Jacs:          83       123        83
+        Ders:        5275      6251      5275
+  
+   21   Steps:        735       734       735
+        Jacs:          19        24        19
+        Ders:         888      1001       888
+  
+   22   Steps:        661       661       661
+        Jacs:          18        22        18
+        Ders:         796       900       796
+  
+   23   Steps:        656       652       656
+        Jacs:          17        20        17
+        Ders:         783       881       783
+  
+   24   Steps:        517       517       517
+        Jacs:          15        17        15
+        Ders:         628       704       628
+  
+   25   Steps:        502       502       502
+        Jacs:          13        16        13
+        Ders:         602       678       602
+  
+   31   Steps:        573       578       573
+        Jacs:          13        22        13
+        Ders:         815       926       815
+  
+   32   Steps:        770       751       770
+        Jacs:          17        29        17
+        Ders:        1094      1168      1094
+  
+   33   Steps:        871       868       871
+        Jacs:          21        30        21
+        Ders:        1044      1206      1044
+  
+   34   Steps:        439       424       439
+        Jacs:          14        15        14
+        Ders:         602       641       602
+  
+   35   Steps:        533       509       533
+        Jacs:          14        19        14
+        Ders:         832       834       832
+  
+   36   Steps:        652       626       652
+        Jacs:          18        22        18
+        Ders:         934       935       934
+  
+   41   Steps:        737       896       737
+        Jacs:          21       122        21
+        Ders:         917      2210       917
+  
+   42   Steps:        835       833       835
+        Jacs:          18        27        18
+        Ders:         997      1059       997
+  
+   43   Steps:        642       616       642
+        Jacs:          17        22        17
+        Ders:         858       912       858
+  
+   44   Steps:       1208      1405      1208
+        Jacs:          73        58        73
+        Ders:        1736      2101      1736
+  
+   45   Steps:        369       362       369
+        Jacs:          10        14        10
+        Ders:         500       560       500
+  
+   51   Steps:       1530      1523      1530
+        Jacs:          35        54        35
+        Ders:        2359      2603      2359
+  
+   52   Steps:        398       397       398
+        Jacs:          12        14        12
+        Ders:         474       505       474
+  
+   53   Steps:        827       817       827
+        Jacs:          15        27        15
+        Ders:         967      1151       967
+  
+   54   Steps:       2127      2055      2127
+        Jacs:          46        79        46
+        Ders:        3285      3498      3285
+  
+   55   Steps:        828       815       828
+        Jacs:          21        31        21
+        Ders:        1178      1342      1178
+  
+
+
+                     Results for ITOL =  11
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        868       868       868
+        Jacs:          21        25        21
+        Ders:        1013      1129      1013
+  
+    2   Steps:       1026      1031      1026
+        Jacs:          25        30        25
+        Ders:        1326      1651      1326
+  
+    3   Steps:       1065      1065      1065
+        Jacs:          23        33        23
+        Ders:        1228      1400      1228
+  
+    4   Steps:       1447      1447      1447
+        Jacs:          31        44        31
+        Ders:        1825      2395      1825
+  
+   11   Steps:       4319      4319      4319
+        Jacs:          78       114        78
+        Ders:        4722      5322      4722
+  
+   12   Steps:        789       789       789
+        Jacs:          19        25        19
+        Ders:         950      1136       950
+  
+   13   Steps:        846       846       846
+        Jacs:          19        26        19
+        Ders:        1006      1204      1006
+  
+   14   Steps:       1319      1319      1319
+        Jacs:          28        38        28
+        Ders:        1544      1832      1544
+  
+   15   Steps:       5843      5843      5843
+        Jacs:         104       156       104
+        Ders:        6685      7937      6685
+  
+   21   Steps:       1070      1070      1070
+        Jacs:          25        32        25
+        Ders:        1229      1386      1229
+  
+   22   Steps:        936       936       936
+        Jacs:          22        29        22
+        Ders:        1090      1235      1090
+  
+   23   Steps:        923       923       923
+        Jacs:          22        28        22
+        Ders:        1070      1208      1070
+  
+   24   Steps:        736       737       736
+        Jacs:          19        24        19
+        Ders:         872       989       872
+  
+   25   Steps:        717       717       717
+        Jacs:          17        23        17
+        Ders:         831       948       831
+  
+   31   Steps:        769       712       769
+        Jacs:          17        26        17
+        Ders:        1067      1117      1067
+  
+   32   Steps:        984       910       984
+        Jacs:          20        31        20
+        Ders:        1326      1332      1326
+  
+   33   Steps:       1189      1213      1189
+        Jacs:          28        38        28
+        Ders:        1394      1622      1394
+  
+   34   Steps:        597       590       597
+        Jacs:          17        20        17
+        Ders:         778       851       778
+  
+   35   Steps:        721       705       721
+        Jacs:          18        26        18
+        Ders:        1116      1136      1116
+  
+   36   Steps:        874       839       874
+        Jacs:          22        28        22
+        Ders:        1177      1244      1177
+  
+   41   Steps:       1142      1273      1142
+        Jacs:          35       188        35
+        Ders:        1485      3339      1485
+  
+   42   Steps:       1197      1182      1197
+        Jacs:          25        36        25
+        Ders:        1399      1479      1399
+  
+   43   Steps:        823       788       823
+        Jacs:          21        25        21
+        Ders:        1051      1083      1051
+  
+   44   Steps:       3377      2844      3377
+        Jacs:        1029       678      1029
+        Ders:       10342     10037     10342
+  
+   45   Steps:        467       480       467
+        Jacs:          12        17        12
+        Ders:         592       714       592
+  
+   51   Steps:       2132      2033      2132
+        Jacs:          45        75        45
+        Ders:        3065      3441      3065
+  
+   52   Steps:        563       548       563
+        Jacs:          15        18        15
+        Ders:         654       695       654
+  
+   53   Steps:       1169      1173      1169
+        Jacs:          21        35        21
+        Ders:        1343      1618      1343
+  
+   54   Steps:       2792      2718      2792
+        Jacs:          57        98        57
+        Ders:        4086      4357      4086
+  
+   55   Steps:       1137      1049      1137
+        Jacs:          29        39        29
+        Ders:        1581      1685      1581
+  
+
+
+                     Results for ITOL =  12
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:       1239      1239      1239
+        Jacs:          28        36        28
+        Ders:        1417      1593      1417
+  
+    2   Steps:       1518      1523      1518
+        Jacs:          33        44        33
+        Ders:        1898      2404      1898
+  
+    3   Steps:       1595      1603      1595
+        Jacs:          33        45        33
+        Ders:        1812      2050      1812
+  
+    4   Steps:       2088      2088      2088
+        Jacs:          42        58        42
+        Ders:        2581      3321      2581
+  
+   11   Steps:       6206      6206      6206
+        Jacs:         111       159       111
+        Ders:        6769      7597      6769
+  
+   12   Steps:       1126      1126      1126
+        Jacs:          24        31        24
+        Ders:        1328      1556      1328
+  
+   13   Steps:       1254      1254      1254
+        Jacs:          27        36        27
+        Ders:        1463      1733      1463
+  
+   14   Steps:       2001      2001      2001
+        Jacs:          39        54        39
+        Ders:        2293      2707      2293
+  
+   15   Steps:       7522      7506      7522
+        Jacs:         133       197       133
+        Ders:        8540     10173      8540
+  
+   21   Steps:       1545      1545      1545
+        Jacs:          34        47        34
+        Ders:        1746      1987      1746
+  
+   22   Steps:       1384      1384      1384
+        Jacs:          31        38        31
+        Ders:        1577      1759      1577
+  
+   23   Steps:       1380      1380      1380
+        Jacs:          30        39        30
+        Ders:        1568      1761      1568
+  
+   24   Steps:       1077      1077      1077
+        Jacs:          24        32        24
+        Ders:        1225      1386      1225
+  
+   25   Steps:       1016      1016      1016
+        Jacs:          24        30        24
+        Ders:        1165      1310      1165
+  
+   31   Steps:        896       872       896
+        Jacs:          20        31        20
+        Ders:        1167      1274      1167
+  
+   32   Steps:       1204      1208      1204
+        Jacs:          24        43        24
+        Ders:        1491      1701      1491
+  
+   33   Steps:       1730      1733      1730
+        Jacs:          38        54        38
+        Ders:        1984      2263      1984
+  
+   34   Steps:        788       764       788
+        Jacs:          21        24        21
+        Ders:         999      1054       999
+  
+   35   Steps:        939      1009       939
+        Jacs:          22        36        22
+        Ders:        1355      1556      1355
+  
+   36   Steps:       1145      1157      1145
+        Jacs:          28        38        28
+        Ders:        1449      1600      1449
+  
+   41   Steps:       1690      1731      1690
+        Jacs:         142       143       142
+        Ders:        2674      3293      2674
+  
+   42   Steps:       1749      1758      1749
+        Jacs:          33        53        33
+        Ders:        1981      2138      1981
+  
+   43   Steps:       1086      1079      1086
+        Jacs:          25        32        25
+        Ders:        1299      1379      1299
+  
+   44   Steps:       4956      5150      4956
+        Jacs:        1323      1518      1323
+        Ders:       14098     21439     14098
+  
+   45   Steps:        669       664       669
+        Jacs:          16        20        16
+        Ders:         834       923       834
+  
+   51   Steps:       2895      2646      2895
+        Jacs:          55        84        55
+        Ders:        4062      4201      4062
+  
+   52   Steps:        778       779       778
+        Jacs:          19        26        19
+        Ders:         894       968       894
+  
+   53   Steps:       1680      1674      1680
+        Jacs:          29        49        29
+        Ders:        1900      2232      1900
+  
+   54   Steps:       3881      3815      3881
+        Jacs:          72       137        72
+        Ders:        5628      6013      5628
+  
+   55   Steps:       1458      1420      1458
+        Jacs:          48        58        48
+        Ders:        1999      2240      1999
+  
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        224 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.31960D-06
+  2    0.99999D+00    0.99999D+00    0.31975D-06
+  3    0.99999D+00    0.99999D+00    0.50136D-06
+  4    0.99999D+00    0.99999D+00    0.56583D-06
+  5    0.99999D+00    0.99999D+00    0.38941D-06
+  6    0.10000D+01    0.10000D+01    0.58933D-07
+  7    0.10000D+01    0.10000D+01    0.21570D-06
+  8    0.10000D+01    0.10000D+01    0.27353D-06
+  9    0.10000D+01    0.10000D+01    0.12162D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        152 f-s =        221 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.14764D-07
+  2    0.13685D-01    0.13685D-01    0.16812D-06
+  3    0.19229D+00    0.19229D+00    0.20977D-05
+  4    0.13534D+00    0.13534D+00    0.38712D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87705D-28    0.00000D+00    0.87705D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44604D-45    0.00000D+00    0.44604D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        520 f-s =        604 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.18464D-04    0.10042D-08    0.18463D-04
+  2   -0.58717D-04    0.20955D-08    0.58719D-04
+  3   -0.23138D-34    0.00000D+00    0.23138D-34
+  4   -0.52283D-34   -0.18767D-79    0.52283D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        236 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.40260D-11    0.11886D-21    0.40260D-11
+  2    0.24944D-12   -0.23259D-21    0.24944D-12
+  3    0.41539D-11    0.15179D-34    0.41539D-11
+  4    0.30879D-05    0.20612D-08    0.30858D-05
+  5    0.69917D-04    0.45400D-04    0.24517D-04
+  6    0.13534D+00    0.13534D+00    0.61092D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2551 f-s =       2963 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16206D-04   -0.23669D-13    0.16206D-04
+  2   -0.66289D-05    0.34489D-13    0.66289D-05
+  3    0.18048D-34    0.18049D-34    0.47720D-39
+  4    0.20612D-08    0.20612D-08    0.34555D-16
+  5    0.45400D-04    0.45400D-04    0.56009D-13
+  6    0.13534D+00    0.13534D+00    0.10830D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.37231D-03    0.39247D-03    0.20165D-04
+  2    0.38850D-03    0.38850D-03    0.31535D-08
+  3    0.40000D-03    0.40000D-03    0.70164D-11
+  4    0.20000D-01    0.20000D-01    0.12143D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        191 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.28851D-06
+  2    0.40000D-01    0.40000D-01    0.74441D-07
+  3    0.40016D-01    0.40016D-01    0.44910D-07
+  4    0.40032D-01    0.40032D-01    0.49931D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        180 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.30005D-05
+  2    0.40000D+00    0.40000D+00    0.25814D-05
+  3    0.41600D+00    0.41600D+00    0.25610D-05
+  4    0.43330D+00    0.43331D+00    0.27149D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        114 f-s =        162 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.34595D-08
+  2    0.10000D+01    0.10000D+01    0.10295D-07
+  3    0.10000D+01    0.10000D+01    0.40867D-07
+  4    0.10000D+01    0.10000D+01    0.23606D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        103 f-s =        135 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.22995D-08
+  2    0.10000D+01    0.10000D+01    0.77431D-08
+  3    0.10000D+01    0.10000D+01    0.25669D-07
+  4    0.10008D+01    0.10008D+01    0.67400D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         72 f-s =        136 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99749D+00    0.99741D+00    0.84092D-04
+  2    0.10004D+01    0.10004D+01    0.38693D-04
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        173 f-s =        266 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.71582D+00    0.71583D+00    0.27899D-05
+  2    0.25166D+00    0.25166D+00    0.32104D-05
+  3    0.99708D+00    0.99707D+00    0.97897D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        200 f-s =        307 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.27697D-06
+  2    0.56309D-02    0.56309D-02    0.50783D-09
+  3    0.10007D+01    0.10007D+01    0.76936D-06
+  4    0.65374D+00    0.65374D+00    0.28704D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =         99 f-s =        159 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59767D+00    0.59765D+00    0.15211D-04
+  2    0.98756D+00    0.98757D+00    0.10712D-04
+  3   -0.51034D+00   -0.51035D+00    0.56129D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         70 f-s =        130 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99961D+00   -0.99964D+00    0.33188D-04
+  2    0.99927D+00    0.99933D+00    0.55601D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        126 f-s =        198 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.77224D-06
+  2    0.99731D+00    0.99730D+00    0.52139D-05
+  3    0.10005D+01    0.10005D+01    0.16966D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        129 f-s =        192 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.39074D-06
+  2    0.12270D-05   -0.72884D-12    0.12270D-05
+  3   -0.12415D-05    0.15348D-11    0.12415D-05
+  4    0.47051D-06   -0.10837D-11    0.47051D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        178 f-s =        245 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57302D+00   -0.57361D+00    0.59786D-03
+  2    0.56511D-01    0.56344D-01    0.16702D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        150 f-s =        273 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.26039D-02    0.26092D-02    0.53308D-05
+  2    0.33174D-02    0.33231D-02    0.57364D-05
+  3    0.99914D+00    0.99911D+00    0.35648D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        241 f-s =        341 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.69445D+00    0.69444D+00    0.60845D-05
+  2   -0.67796D+00   -0.67797D+00    0.59401D-05
+  3    0.11291D-04   -0.14501D-07    0.11306D-04
+  4   -0.10737D-04    0.13789D-07    0.10750D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         73 f-s =        104 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.91935D+00    0.91936D+00    0.73767D-05
+  2    0.94672D+00    0.94674D+00    0.18855D-04
+  3    0.99778D+00    0.99777D+00    0.11419D-04
+  4    0.94183D+00    0.94183D+00    0.27713D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        349 f-s =        664 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.30154D-05
+  2    0.16061D-03    0.15223D-03    0.83831D-05
+  3    0.99887D+00    0.99887D+00    0.29930D-05
+  4    0.32490D-02    0.32420D-02    0.69770D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         95 f-s =        137 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.92975D-05
+  2    0.52567D+00    0.52568D+00    0.12492D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        191 f-s =        270 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.42509D-07    0.80898D-07    0.38389D-07
+  2    0.23608D+00    0.23607D+00    0.70784D-05
+  3    0.20853D-04    0.20426D-04    0.42713D-06
+  4    0.99859D+00    0.99860D+00    0.92601D-05
+  5    0.99878D+00    0.99879D+00    0.13261D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        685 f-s =       1058 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.35941D-04    0.37443D-04    0.15026D-05
+  2    0.73856D-03    0.72895D-03    0.96101D-05
+  3    0.92568D-04    0.96463D-04    0.38946D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        183 f-s =        284 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.57882D-09
+  2    0.44958D+00    0.44958D+00    0.51633D-09
+  3    0.99988D+00    0.99988D+00    0.11483D-08
+  4    0.99949D+00    0.99949D+00    0.13535D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        287 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.34056D-06
+  2    0.99999D+00    0.99999D+00    0.34071D-06
+  3    0.99999D+00    0.99999D+00    0.51633D-06
+  4    0.99999D+00    0.99999D+00    0.57517D-06
+  5    0.99999D+00    0.99999D+00    0.39637D-06
+  6    0.10000D+01    0.10000D+01    0.66298D-07
+  7    0.10000D+01    0.10000D+01    0.20772D-06
+  8    0.10000D+01    0.10000D+01    0.26699D-06
+  9    0.10000D+01    0.10000D+01    0.11871D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        152 f-s =        249 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.14590D-07
+  2    0.13685D-01    0.13685D-01    0.16621D-06
+  3    0.19229D+00    0.19229D+00    0.20731D-05
+  4    0.13534D+00    0.13534D+00    0.38924D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        391 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87705D-28    0.00000D+00    0.87705D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        520 f-s =        684 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.18463D-04    0.10042D-08    0.18462D-04
+  2   -0.58716D-04    0.20955D-08    0.58718D-04
+  3   -0.23138D-34    0.00000D+00    0.23138D-34
+  4   -0.52279D-34   -0.18767D-79    0.52279D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        190 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        196 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        302 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.40258D-11    0.11886D-21    0.40258D-11
+  2    0.24963D-12   -0.23259D-21    0.24963D-12
+  3    0.41539D-11    0.15179D-34    0.41539D-11
+  4    0.30879D-05    0.20612D-08    0.30858D-05
+  5    0.69917D-04    0.45400D-04    0.24517D-04
+  6    0.13534D+00    0.13534D+00    0.61092D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2551 f-s =       3551 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16213D-04   -0.23669D-13    0.16213D-04
+  2   -0.66346D-05    0.34489D-13    0.66346D-05
+  3    0.18048D-34    0.18049D-34    0.47720D-39
+  4    0.20612D-08    0.20612D-08    0.34558D-16
+  5    0.45400D-04    0.45400D-04    0.55975D-13
+  6    0.13534D+00    0.13534D+00    0.10810D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        144 f-s =        237 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.39045D-03    0.39247D-03    0.20198D-05
+  2    0.38850D-03    0.38850D-03    0.27523D-08
+  3    0.40000D-03    0.40000D-03    0.18924D-14
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        134 f-s =        210 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.38024D-05
+  2    0.40000D-01    0.40000D-01    0.35167D-07
+  3    0.40016D-01    0.40016D-01    0.14096D-06
+  4    0.40032D-01    0.40032D-01    0.98699D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        198 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.74788D-06
+  2    0.40000D+00    0.40000D+00    0.23855D-06
+  3    0.41600D+00    0.41600D+00    0.14033D-06
+  4    0.43331D+00    0.43331D+00    0.17981D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        107 f-s =        175 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.27035D-06
+  2    0.10000D+01    0.10000D+01    0.59882D-06
+  3    0.10000D+01    0.10000D+01    0.10899D-05
+  4    0.10000D+01    0.10000D+01    0.21360D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =         97 f-s =        158 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.12431D-05
+  2    0.10000D+01    0.10000D+01    0.27618D-05
+  3    0.99999D+00    0.10000D+01    0.54775D-05
+  4    0.10007D+01    0.10008D+01    0.11033D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         72 f-s =        151 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.99749D+00    0.99741D+00    0.83931D-04
+  2    0.10004D+01    0.10004D+01    0.38716D-04
+  3    0.10000D+01    0.10000D+01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        155 f-s =        267 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71584D+00    0.71583D+00    0.14253D-04
+  2    0.25167D+00    0.25166D+00    0.15227D-04
+  3    0.99702D+00    0.99707D+00    0.50011D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        209 f-s =        346 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.16431D-06
+  2    0.56309D-02    0.56309D-02    0.11425D-07
+  3    0.10007D+01    0.10007D+01    0.45641D-06
+  4    0.65374D+00    0.65374D+00    0.15761D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =         97 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59768D+00    0.59765D+00    0.23338D-04
+  2    0.98755D+00    0.98757D+00    0.16435D-04
+  3   -0.51037D+00   -0.51035D+00    0.22785D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         75 f-s =        142 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99990D+00   -0.99964D+00    0.25685D-03
+  2    0.99958D+00    0.99933D+00    0.25047D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        129 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12233D-05
+  2    0.99729D+00    0.99730D+00    0.82648D-05
+  3    0.10005D+01    0.10005D+01    0.24378D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        124 f-s =        199 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20451D-08
+  2   -0.40738D-08   -0.72884D-12    0.40731D-08
+  3    0.17468D-08    0.15348D-11    0.17453D-08
+  4    0.68347D-09   -0.10837D-11    0.68455D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        166 f-s =        286 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57293D+00   -0.57361D+00    0.68611D-03
+  2    0.56530D-01    0.56344D-01    0.18554D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        134 f-s =        206 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.26134D-02    0.26092D-02    0.41762D-05
+  2    0.33277D-02    0.33231D-02    0.46104D-05
+  3    0.99912D+00    0.99911D+00    0.18213D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        258 f-s =        414 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.10030D-06
+  2   -0.67797D+00   -0.67797D+00    0.97920D-07
+  3    0.17210D-06   -0.14501D-07    0.18660D-06
+  4   -0.16321D-06    0.13789D-07    0.17700D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         80 f-s =        139 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.54950D-05
+  2    0.94673D+00    0.94674D+00    0.40962D-05
+  3    0.99777D+00    0.99777D+00    0.12227D-05
+  4    0.94182D+00    0.94183D+00    0.44063D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        252 f-s =        599 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.75494D-05
+  2    0.15222D-03    0.15223D-03    0.14002D-07
+  3    0.99888D+00    0.99887D+00    0.74935D-05
+  4    0.32420D-02    0.32420D-02    0.11656D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         95 f-s =        152 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.92658D-05
+  2    0.52567D+00    0.52568D+00    0.12438D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        521 f-s =        909 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.80905D-07    0.80898D-07    0.69005D-11
+  2    0.23606D+00    0.23607D+00    0.67522D-05
+  3    0.20426D-04    0.20426D-04    0.16430D-09
+  4    0.99861D+00    0.99860D+00    0.79838D-05
+  5    0.99882D+00    0.99879D+00    0.36554D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        654 f-s =       1147 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.35929D-04    0.37443D-04    0.15141D-05
+  2    0.73555D-03    0.72895D-03    0.65989D-05
+  3    0.94699D-04    0.96463D-04    0.17634D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        193 f-s =        341 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.58759D-09
+  2    0.44958D+00    0.44958D+00    0.59326D-09
+  3    0.99988D+00    0.99988D+00    0.10778D-08
+  4    0.99949D+00    0.99949D+00    0.20250D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        224 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.31960D-06
+  2    0.99999D+00    0.99999D+00    0.31975D-06
+  3    0.99999D+00    0.99999D+00    0.50136D-06
+  4    0.99999D+00    0.99999D+00    0.56583D-06
+  5    0.99999D+00    0.99999D+00    0.38941D-06
+  6    0.10000D+01    0.10000D+01    0.58933D-07
+  7    0.10000D+01    0.10000D+01    0.21570D-06
+  8    0.10000D+01    0.10000D+01    0.27353D-06
+  9    0.10000D+01    0.10000D+01    0.12162D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        152 f-s =        221 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.14764D-07
+  2    0.13685D-01    0.13685D-01    0.16812D-06
+  3    0.19229D+00    0.19229D+00    0.20977D-05
+  4    0.13534D+00    0.13534D+00    0.38712D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87705D-28    0.00000D+00    0.87705D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44604D-45    0.00000D+00    0.44604D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        520 f-s =        604 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.18464D-04    0.10042D-08    0.18463D-04
+  2   -0.58717D-04    0.20955D-08    0.58719D-04
+  3   -0.23138D-34    0.00000D+00    0.23138D-34
+  4   -0.52283D-34   -0.18767D-79    0.52283D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        236 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.40260D-11    0.11886D-21    0.40260D-11
+  2    0.24944D-12   -0.23259D-21    0.24944D-12
+  3    0.41539D-11    0.15179D-34    0.41539D-11
+  4    0.30879D-05    0.20612D-08    0.30858D-05
+  5    0.69917D-04    0.45400D-04    0.24517D-04
+  6    0.13534D+00    0.13534D+00    0.61092D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2551 f-s =       2963 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16206D-04   -0.23669D-13    0.16206D-04
+  2   -0.66289D-05    0.34489D-13    0.66289D-05
+  3    0.18048D-34    0.18049D-34    0.47720D-39
+  4    0.20612D-08    0.20612D-08    0.34555D-16
+  5    0.45400D-04    0.45400D-04    0.56009D-13
+  6    0.13534D+00    0.13534D+00    0.10830D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.37231D-03    0.39247D-03    0.20165D-04
+  2    0.38850D-03    0.38850D-03    0.31535D-08
+  3    0.40000D-03    0.40000D-03    0.70164D-11
+  4    0.20000D-01    0.20000D-01    0.12143D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        135 f-s =        191 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.28851D-06
+  2    0.40000D-01    0.40000D-01    0.74441D-07
+  3    0.40016D-01    0.40016D-01    0.44910D-07
+  4    0.40032D-01    0.40032D-01    0.49931D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        180 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.30005D-05
+  2    0.40000D+00    0.40000D+00    0.25814D-05
+  3    0.41600D+00    0.41600D+00    0.25610D-05
+  4    0.43330D+00    0.43331D+00    0.27149D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        114 f-s =        162 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.34595D-08
+  2    0.10000D+01    0.10000D+01    0.10295D-07
+  3    0.10000D+01    0.10000D+01    0.40867D-07
+  4    0.10000D+01    0.10000D+01    0.23606D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        103 f-s =        135 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.22995D-08
+  2    0.10000D+01    0.10000D+01    0.77431D-08
+  3    0.10000D+01    0.10000D+01    0.25669D-07
+  4    0.10008D+01    0.10008D+01    0.67400D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         72 f-s =        136 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99749D+00    0.99741D+00    0.84092D-04
+  2    0.10004D+01    0.10004D+01    0.38693D-04
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        173 f-s =        266 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.71582D+00    0.71583D+00    0.27899D-05
+  2    0.25166D+00    0.25166D+00    0.32104D-05
+  3    0.99708D+00    0.99707D+00    0.97897D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        200 f-s =        307 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.27697D-06
+  2    0.56309D-02    0.56309D-02    0.50783D-09
+  3    0.10007D+01    0.10007D+01    0.76936D-06
+  4    0.65374D+00    0.65374D+00    0.28704D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =         99 f-s =        159 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59767D+00    0.59765D+00    0.15211D-04
+  2    0.98756D+00    0.98757D+00    0.10712D-04
+  3   -0.51034D+00   -0.51035D+00    0.56129D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         70 f-s =        130 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99961D+00   -0.99964D+00    0.33188D-04
+  2    0.99927D+00    0.99933D+00    0.55601D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        126 f-s =        198 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.77224D-06
+  2    0.99731D+00    0.99730D+00    0.52139D-05
+  3    0.10005D+01    0.10005D+01    0.16966D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        129 f-s =        192 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.39074D-06
+  2    0.12270D-05   -0.72884D-12    0.12270D-05
+  3   -0.12415D-05    0.15348D-11    0.12415D-05
+  4    0.47051D-06   -0.10837D-11    0.47051D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        178 f-s =        245 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57302D+00   -0.57361D+00    0.59786D-03
+  2    0.56511D-01    0.56344D-01    0.16702D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        150 f-s =        273 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.26039D-02    0.26092D-02    0.53308D-05
+  2    0.33174D-02    0.33231D-02    0.57364D-05
+  3    0.99914D+00    0.99911D+00    0.35648D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        241 f-s =        341 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.69445D+00    0.69444D+00    0.60845D-05
+  2   -0.67796D+00   -0.67797D+00    0.59401D-05
+  3    0.11291D-04   -0.14501D-07    0.11306D-04
+  4   -0.10737D-04    0.13789D-07    0.10750D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         73 f-s =        104 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.91935D+00    0.91936D+00    0.73767D-05
+  2    0.94672D+00    0.94674D+00    0.18855D-04
+  3    0.99778D+00    0.99777D+00    0.11419D-04
+  4    0.94183D+00    0.94183D+00    0.27713D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        349 f-s =        664 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.30154D-05
+  2    0.16061D-03    0.15223D-03    0.83831D-05
+  3    0.99887D+00    0.99887D+00    0.29930D-05
+  4    0.32490D-02    0.32420D-02    0.69770D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         95 f-s =        137 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.92975D-05
+  2    0.52567D+00    0.52568D+00    0.12492D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        191 f-s =        270 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.42509D-07    0.80898D-07    0.38389D-07
+  2    0.23608D+00    0.23607D+00    0.70784D-05
+  3    0.20853D-04    0.20426D-04    0.42713D-06
+  4    0.99859D+00    0.99860D+00    0.92601D-05
+  5    0.99878D+00    0.99879D+00    0.13261D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        685 f-s =       1058 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.35941D-04    0.37443D-04    0.15026D-05
+  2    0.73856D-03    0.72895D-03    0.96101D-05
+  3    0.92568D-04    0.96463D-04    0.38946D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        183 f-s =        284 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.57882D-09
+  2    0.44958D+00    0.44958D+00    0.51633D-09
+  3    0.99988D+00    0.99988D+00    0.11483D-08
+  4    0.99949D+00    0.99949D+00    0.13535D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30490D-06
+  2   -0.90870D-08    0.20612D-08    0.11148D-07
+  3    0.24196D-22    0.28230D-55    0.24196D-22
+  4   -0.15669D-21    0.52358D-51    0.15669D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        208 f-s =        321 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.23459D-05
+  2    0.99999D+00    0.99999D+00    0.23458D-05
+  3    0.99999D+00    0.99999D+00    0.22002D-05
+  4    0.99999D+00    0.99999D+00    0.19703D-05
+  5    0.99999D+00    0.99999D+00    0.16776D-05
+  6    0.99999D+00    0.10000D+01    0.13404D-05
+  7    0.10000D+01    0.10000D+01    0.97915D-06
+  8    0.10000D+01    0.10000D+01    0.61606D-06
+  9    0.10000D+01    0.10000D+01    0.27382D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        207 f-s =        301 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.70172D-08
+  2    0.13685D-01    0.13685D-01    0.71839D-07
+  3    0.19229D+00    0.19229D+00    0.99705D-06
+  4    0.13533D+00    0.13534D+00    0.61468D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33859D-18    0.22774D-54    0.33859D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        686 f-s =        795 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.52997D-05    0.10042D-08    0.53007D-05
+  2    0.19335D-04    0.20955D-08    0.19333D-04
+  3   -0.57221D-42    0.00000D+00    0.57221D-42
+  4    0.11111D-41   -0.18767D-79    0.11111D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        276 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22556D-10    0.11886D-21    0.22556D-10
+  2   -0.37063D-10   -0.23259D-21    0.37063D-10
+  3   -0.33230D-14    0.15179D-34    0.33230D-14
+  4    0.13648D-07    0.20612D-08    0.11587D-07
+  5    0.46631D-04    0.45400D-04    0.12312D-05
+  6    0.13534D+00    0.13534D+00    0.92459D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2619 f-s =       3088 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22340D-04   -0.23669D-13    0.22340D-04
+  2   -0.15279D-05    0.34489D-13    0.15279D-05
+  3    0.18048D-34    0.18049D-34    0.31899D-39
+  4    0.20612D-08    0.20612D-08    0.32921D-16
+  5    0.45400D-04    0.45400D-04    0.15297D-13
+  6    0.13534D+00    0.13534D+00    0.96778D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        254 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39226D-03    0.39247D-03    0.20967D-06
+  2    0.38850D-03    0.38850D-03    0.11918D-11
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        177 f-s =        252 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.55706D-07
+  2    0.40000D-01    0.40000D-01    0.46668D-08
+  3    0.40016D-01    0.40016D-01    0.45689D-08
+  4    0.40032D-01    0.40032D-01    0.45084D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.37237D-07
+  2    0.40000D+00    0.40000D+00    0.35114D-07
+  3    0.41600D+00    0.41600D+00    0.33077D-07
+  4    0.43331D+00    0.43331D+00    0.34506D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        153 f-s =        216 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.33900D-07
+  2    0.10000D+01    0.10000D+01    0.74445D-07
+  3    0.10000D+01    0.10000D+01    0.13201D-06
+  4    0.10000D+01    0.10000D+01    0.24967D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        147 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.92876D-07
+  2    0.10000D+01    0.10000D+01    0.20651D-06
+  3    0.10000D+01    0.10000D+01    0.40174D-06
+  4    0.10008D+01    0.10008D+01    0.83501D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        142 f-s =        237 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99742D+00    0.99741D+00    0.10456D-04
+  2    0.10004D+01    0.10004D+01    0.11011D-04
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        185 f-s =        274 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.43546D-06
+  2    0.25166D+00    0.25166D+00    0.43638D-06
+  3    0.99706D+00    0.99707D+00    0.15280D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        234 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14903D-06
+  2    0.56309D-02    0.56309D-02    0.29091D-09
+  3    0.10007D+01    0.10007D+01    0.41396D-06
+  4    0.65374D+00    0.65374D+00    0.15386D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        110 f-s =        177 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.79359D-06
+  2    0.98757D+00    0.98757D+00    0.55887D-06
+  3   -0.51035D+00   -0.51035D+00    0.59317D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        129 f-s =        205 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99969D+00   -0.99964D+00    0.47709D-04
+  2    0.99937D+00    0.99933D+00    0.45580D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        208 f-s =        309 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.21161D-06
+  2    0.99730D+00    0.99730D+00    0.14298D-05
+  3    0.10005D+01    0.10005D+01    0.53410D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        180 f-s =        258 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47729D-07
+  2    0.32649D-07   -0.72884D-12    0.32650D-07
+  3    0.72617D-07    0.15348D-11    0.72615D-07
+  4   -0.69620D-07   -0.10837D-11    0.69619D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        228 f-s =        313 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57358D+00   -0.57361D+00    0.37357D-04
+  2    0.56350D-01    0.56344D-01    0.57863D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        195 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.26095D-02    0.26092D-02    0.22678D-06
+  2    0.33230D-02    0.33231D-02    0.18421D-06
+  3    0.99912D+00    0.99911D+00    0.10902D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        282 f-s =        411 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.44514D-06
+  2   -0.67797D+00   -0.67797D+00    0.43457D-06
+  3   -0.84159D-06   -0.14501D-07    0.82709D-06
+  4    0.80029D-06    0.13789D-07    0.78650D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        106 f-s =        151 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.71901D-06
+  2    0.94674D+00    0.94674D+00    0.57235D-07
+  3    0.99777D+00    0.99777D+00    0.17207D-05
+  4    0.94183D+00    0.94183D+00    0.19244D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        406 f-s =        747 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.34351D-05
+  2    0.15224D-03    0.15223D-03    0.64767D-08
+  3    0.99887D+00    0.99887D+00    0.34097D-05
+  4    0.32420D-02    0.32420D-02    0.53913D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        108 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.51096D-05
+  2    0.52567D+00    0.52568D+00    0.68569D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        225 f-s =        302 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.81162D-07    0.80898D-07    0.26437D-09
+  2    0.23607D+00    0.23607D+00    0.50495D-06
+  3    0.20426D-04    0.20426D-04    0.10205D-09
+  4    0.99861D+00    0.99860D+00    0.17257D-05
+  5    0.99879D+00    0.99879D+00    0.40916D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        805 f-s =       1216 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.36644D-04    0.37443D-04    0.79964D-06
+  2    0.73055D-03    0.72895D-03    0.15970D-05
+  3    0.96083D-04    0.96463D-04    0.37997D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        278 f-s =        419 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.54461D-11
+  2    0.44958D+00    0.44958D+00    0.52479D-11
+  3    0.99988D+00    0.99988D+00    0.11877D-10
+  4    0.99949D+00    0.99949D+00    0.10758D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        278 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30487D-06
+  2   -0.90853D-08    0.20612D-08    0.11146D-07
+  3    0.24062D-22    0.28230D-55    0.24062D-22
+  4   -0.15582D-21    0.52358D-51    0.15582D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        207 f-s =        410 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.42008D-05
+  2    0.99999D+00    0.99999D+00    0.42006D-05
+  3    0.99999D+00    0.99999D+00    0.39339D-05
+  4    0.99999D+00    0.99999D+00    0.35153D-05
+  5    0.99999D+00    0.99999D+00    0.29859D-05
+  6    0.99999D+00    0.10000D+01    0.23803D-05
+  7    0.99999D+00    0.10000D+01    0.17355D-05
+  8    0.10000D+01    0.10000D+01    0.10906D-05
+  9    0.10000D+01    0.10000D+01    0.48475D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        207 f-s =        342 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.85035D-08
+  2    0.13685D-01    0.13685D-01    0.87492D-07
+  3    0.19229D+00    0.19229D+00    0.12082D-05
+  4    0.13533D+00    0.13534D+00    0.70160D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        530 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33848D-18    0.22774D-54    0.33848D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        686 f-s =        899 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.52998D-05    0.10042D-08    0.53008D-05
+  2    0.19335D-04    0.20955D-08    0.19333D-04
+  3   -0.57223D-42    0.00000D+00    0.57223D-42
+  4    0.11111D-41   -0.18767D-79    0.11111D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        231 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        249 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        276 f-s =        433 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22556D-10    0.11886D-21    0.22556D-10
+  2   -0.37064D-10   -0.23259D-21    0.37064D-10
+  3   -0.33232D-14    0.15179D-34    0.33232D-14
+  4    0.13648D-07    0.20612D-08    0.11586D-07
+  5    0.46631D-04    0.45400D-04    0.12312D-05
+  6    0.13534D+00    0.13534D+00    0.92459D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2620 f-s =       3659 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22377D-04   -0.23669D-13    0.22377D-04
+  2   -0.86207D-06    0.34489D-13    0.86207D-06
+  3    0.18048D-34    0.18049D-34    0.31870D-39
+  4    0.20612D-08    0.20612D-08    0.32891D-16
+  5    0.45400D-04    0.45400D-04    0.15272D-13
+  6    0.13534D+00    0.13534D+00    0.97081D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        184 f-s =        298 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39194D-03    0.39247D-03    0.53735D-06
+  2    0.38850D-03    0.38850D-03    0.55904D-10
+  3    0.40000D-03    0.40000D-03    0.53061D-15
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        175 f-s =        286 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.19179D-05
+  2    0.40000D-01    0.40000D-01    0.16999D-06
+  3    0.40016D-01    0.40016D-01    0.15752D-06
+  4    0.40032D-01    0.40032D-01    0.15524D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        173 f-s =        289 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.36350D-06
+  2    0.40000D+00    0.40000D+00    0.33042D-06
+  3    0.41600D+00    0.41600D+00    0.32556D-06
+  4    0.43331D+00    0.43331D+00    0.34782D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        145 f-s =        244 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.77755D-07
+  2    0.10000D+01    0.10000D+01    0.17275D-06
+  3    0.10000D+01    0.10000D+01    0.31552D-06
+  4    0.10000D+01    0.10000D+01    0.62205D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        145 f-s =        222 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.43311D-08
+  2    0.10000D+01    0.10000D+01    0.12939D-07
+  3    0.10000D+01    0.10000D+01    0.29749D-07
+  4    0.10008D+01    0.10008D+01    0.14653D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        140 f-s =        232 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99744D+00    0.99741D+00    0.28008D-04
+  2    0.10004D+01    0.10004D+01    0.20546D-04
+  3    0.10000D+01    0.10000D+01    0.12212D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        241 f-s =        407 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.45712D-06
+  2    0.25166D+00    0.25166D+00    0.52321D-06
+  3    0.99707D+00    0.99707D+00    0.16040D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        235 f-s =        393 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.16767D-05
+  2    0.56308D-02    0.56309D-02    0.32722D-08
+  3    0.10007D+01    0.10007D+01    0.46576D-05
+  4    0.65374D+00    0.65374D+00    0.17320D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        114 f-s =        194 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.38488D-05
+  2    0.98757D+00    0.98757D+00    0.27104D-05
+  3   -0.51034D+00   -0.51035D+00    0.41703D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        133 f-s =        221 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99963D+00   -0.99964D+00    0.83820D-05
+  2    0.99932D+00    0.99933D+00    0.91243D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        240 f-s =        415 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.51853D-06
+  2    0.99730D+00    0.99730D+00    0.35034D-05
+  3    0.10005D+01    0.10005D+01    0.11057D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        170 f-s =        264 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.56587D-08
+  2    0.93977D-08   -0.72884D-12    0.93984D-08
+  3   -0.36957D-08    0.15348D-11    0.36973D-08
+  4   -0.48168D-09   -0.10837D-11    0.48060D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        232 f-s =        363 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57350D+00   -0.57361D+00    0.11643D-03
+  2    0.56375D-01    0.56344D-01    0.30322D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        245 f-s =        416 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.26115D-02    0.26092D-02    0.22469D-05
+  2    0.33260D-02    0.33231D-02    0.28690D-05
+  3    0.99912D+00    0.99911D+00    0.10473D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        276 f-s =        449 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.95690D-07
+  2   -0.67797D+00   -0.67797D+00    0.93419D-07
+  3    0.16330D-06   -0.14501D-07    0.17780D-06
+  4   -0.15528D-06    0.13789D-07    0.16907D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         98 f-s =        169 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.72896D-06
+  2    0.94674D+00    0.94674D+00    0.15627D-05
+  3    0.99777D+00    0.99777D+00    0.40345D-06
+  4    0.94183D+00    0.94183D+00    0.33786D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        340 f-s =        713 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.85278D-06
+  2    0.15223D-03    0.15223D-03    0.16377D-08
+  3    0.99887D+00    0.99887D+00    0.84647D-06
+  4    0.32420D-02    0.32420D-02    0.13633D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        108 f-s =        175 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.51818D-05
+  2    0.52567D+00    0.52568D+00    0.69553D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        220 f-s =        354 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.80901D-07    0.80898D-07    0.37315D-11
+  2    0.23607D+00    0.23607D+00    0.68873D-07
+  3    0.20426D-04    0.20426D-04    0.12294D-10
+  4    0.99860D+00    0.99860D+00    0.55420D-06
+  5    0.99879D+00    0.99879D+00    0.26292D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        834 f-s =       1415 J-s =         37
+ Computed and reference solutions and absolute errors follow:
+  1    0.36570D-04    0.37443D-04    0.87322D-06
+  2    0.73199D-03    0.72895D-03    0.30389D-05
+  3    0.95643D-04    0.96463D-04    0.82019D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        258 f-s =        432 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.75919D-10
+  2    0.44958D+00    0.44958D+00    0.68280D-10
+  3    0.99988D+00    0.99988D+00    0.15185D-09
+  4    0.99949D+00    0.99949D+00    0.30038D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30490D-06
+  2   -0.90870D-08    0.20612D-08    0.11148D-07
+  3    0.24196D-22    0.28230D-55    0.24196D-22
+  4   -0.15669D-21    0.52358D-51    0.15669D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        208 f-s =        321 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.23459D-05
+  2    0.99999D+00    0.99999D+00    0.23458D-05
+  3    0.99999D+00    0.99999D+00    0.22002D-05
+  4    0.99999D+00    0.99999D+00    0.19703D-05
+  5    0.99999D+00    0.99999D+00    0.16776D-05
+  6    0.99999D+00    0.10000D+01    0.13404D-05
+  7    0.10000D+01    0.10000D+01    0.97915D-06
+  8    0.10000D+01    0.10000D+01    0.61606D-06
+  9    0.10000D+01    0.10000D+01    0.27382D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        207 f-s =        301 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.70172D-08
+  2    0.13685D-01    0.13685D-01    0.71839D-07
+  3    0.19229D+00    0.19229D+00    0.99705D-06
+  4    0.13533D+00    0.13534D+00    0.61468D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33859D-18    0.22774D-54    0.33859D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        686 f-s =        795 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.52997D-05    0.10042D-08    0.53007D-05
+  2    0.19335D-04    0.20955D-08    0.19333D-04
+  3   -0.57221D-42    0.00000D+00    0.57221D-42
+  4    0.11111D-41   -0.18767D-79    0.11111D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        276 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22556D-10    0.11886D-21    0.22556D-10
+  2   -0.37063D-10   -0.23259D-21    0.37063D-10
+  3   -0.33230D-14    0.15179D-34    0.33230D-14
+  4    0.13648D-07    0.20612D-08    0.11587D-07
+  5    0.46631D-04    0.45400D-04    0.12312D-05
+  6    0.13534D+00    0.13534D+00    0.92459D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2619 f-s =       3088 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1   -0.22340D-04   -0.23669D-13    0.22340D-04
+  2   -0.15279D-05    0.34489D-13    0.15279D-05
+  3    0.18048D-34    0.18049D-34    0.31899D-39
+  4    0.20612D-08    0.20612D-08    0.32921D-16
+  5    0.45400D-04    0.45400D-04    0.15297D-13
+  6    0.13534D+00    0.13534D+00    0.96778D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        182 f-s =        254 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39226D-03    0.39247D-03    0.20967D-06
+  2    0.38850D-03    0.38850D-03    0.11918D-11
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        177 f-s =        252 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.55706D-07
+  2    0.40000D-01    0.40000D-01    0.46668D-08
+  3    0.40016D-01    0.40016D-01    0.45689D-08
+  4    0.40032D-01    0.40032D-01    0.45084D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.37237D-07
+  2    0.40000D+00    0.40000D+00    0.35114D-07
+  3    0.41600D+00    0.41600D+00    0.33077D-07
+  4    0.43331D+00    0.43331D+00    0.34506D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        153 f-s =        216 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.33900D-07
+  2    0.10000D+01    0.10000D+01    0.74445D-07
+  3    0.10000D+01    0.10000D+01    0.13201D-06
+  4    0.10000D+01    0.10000D+01    0.24967D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        147 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.92876D-07
+  2    0.10000D+01    0.10000D+01    0.20651D-06
+  3    0.10000D+01    0.10000D+01    0.40174D-06
+  4    0.10008D+01    0.10008D+01    0.83501D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        142 f-s =        237 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.99742D+00    0.99741D+00    0.10456D-04
+  2    0.10004D+01    0.10004D+01    0.11011D-04
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        185 f-s =        274 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.43546D-06
+  2    0.25166D+00    0.25166D+00    0.43638D-06
+  3    0.99706D+00    0.99707D+00    0.15280D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        234 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14903D-06
+  2    0.56309D-02    0.56309D-02    0.29091D-09
+  3    0.10007D+01    0.10007D+01    0.41396D-06
+  4    0.65374D+00    0.65374D+00    0.15386D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        110 f-s =        177 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.79359D-06
+  2    0.98757D+00    0.98757D+00    0.55887D-06
+  3   -0.51035D+00   -0.51035D+00    0.59317D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        129 f-s =        205 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99969D+00   -0.99964D+00    0.47709D-04
+  2    0.99937D+00    0.99933D+00    0.45580D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        208 f-s =        309 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.21161D-06
+  2    0.99730D+00    0.99730D+00    0.14298D-05
+  3    0.10005D+01    0.10005D+01    0.53410D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        180 f-s =        258 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47729D-07
+  2    0.32649D-07   -0.72884D-12    0.32650D-07
+  3    0.72617D-07    0.15348D-11    0.72615D-07
+  4   -0.69620D-07   -0.10837D-11    0.69619D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        228 f-s =        313 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57358D+00   -0.57361D+00    0.37357D-04
+  2    0.56350D-01    0.56344D-01    0.57863D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        195 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.26095D-02    0.26092D-02    0.22678D-06
+  2    0.33230D-02    0.33231D-02    0.18421D-06
+  3    0.99912D+00    0.99911D+00    0.10902D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        282 f-s =        411 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.44514D-06
+  2   -0.67797D+00   -0.67797D+00    0.43457D-06
+  3   -0.84159D-06   -0.14501D-07    0.82709D-06
+  4    0.80029D-06    0.13789D-07    0.78650D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        106 f-s =        151 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.71901D-06
+  2    0.94674D+00    0.94674D+00    0.57235D-07
+  3    0.99777D+00    0.99777D+00    0.17207D-05
+  4    0.94183D+00    0.94183D+00    0.19244D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        406 f-s =        747 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.34351D-05
+  2    0.15224D-03    0.15223D-03    0.64767D-08
+  3    0.99887D+00    0.99887D+00    0.34097D-05
+  4    0.32420D-02    0.32420D-02    0.53913D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        108 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39126D+00    0.39127D+00    0.51096D-05
+  2    0.52567D+00    0.52568D+00    0.68569D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        225 f-s =        302 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.81162D-07    0.80898D-07    0.26437D-09
+  2    0.23607D+00    0.23607D+00    0.50495D-06
+  3    0.20426D-04    0.20426D-04    0.10205D-09
+  4    0.99861D+00    0.99860D+00    0.17257D-05
+  5    0.99879D+00    0.99879D+00    0.40916D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        805 f-s =       1216 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.36644D-04    0.37443D-04    0.79964D-06
+  2    0.73055D-03    0.72895D-03    0.15970D-05
+  3    0.96083D-04    0.96463D-04    0.37997D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        278 f-s =        419 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.54461D-11
+  2    0.44958D+00    0.44958D+00    0.52479D-11
+  3    0.99988D+00    0.99988D+00    0.11877D-10
+  4    0.99949D+00    0.99949D+00    0.10758D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        263 f-s =        418 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.91142D-07
+  2    0.99999D+00    0.99999D+00    0.91137D-07
+  3    0.99999D+00    0.99999D+00    0.84950D-07
+  4    0.99999D+00    0.99999D+00    0.75375D-07
+  5    0.99999D+00    0.99999D+00    0.63502D-07
+  6    0.10000D+01    0.10000D+01    0.50215D-07
+  7    0.10000D+01    0.10000D+01    0.36359D-07
+  8    0.10000D+01    0.10000D+01    0.22745D-07
+  9    0.10000D+01    0.10000D+01    0.10109D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        276 f-s =        385 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.39608D-10
+  2    0.13685D-01    0.13685D-01    0.75704D-10
+  3    0.19229D+00    0.19229D+00    0.56270D-08
+  4    0.13534D+00    0.13534D+00    0.51101D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43441D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23569D-80    0.00000D+00    0.23569D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        975 f-s =       1107 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17030D-06    0.10042D-08    0.17130D-06
+  2    0.58479D-06    0.20955D-08    0.58269D-06
+  3    0.68664D-44    0.00000D+00    0.68664D-44
+  4    0.37321D-43   -0.18767D-79    0.37321D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        373 f-s =        461 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.98379D-11    0.11886D-21    0.98379D-11
+  2    0.31375D-10   -0.23259D-21    0.31375D-10
+  3   -0.73055D-17    0.15179D-34    0.73055D-17
+  4    0.16508D-08    0.20612D-08    0.41040D-09
+  5    0.45488D-04    0.45400D-04    0.88396D-07
+  6    0.13534D+00    0.13534D+00    0.82984D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2868 f-s =       3382 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1    0.97315D-07   -0.23669D-13    0.97315D-07
+  2    0.20088D-05    0.34489D-13    0.20088D-05
+  3    0.18048D-34    0.18049D-34    0.13281D-39
+  4    0.20612D-08    0.20612D-08    0.14762D-16
+  5    0.45400D-04    0.45400D-04    0.93005D-14
+  6    0.13534D+00    0.13534D+00    0.10719D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        269 f-s =        352 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39250D-03    0.39247D-03    0.26281D-07
+  2    0.38850D-03    0.38850D-03    0.23706D-14
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        330 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42538D-07
+  2    0.40000D-01    0.40000D-01    0.38015D-08
+  3    0.40016D-01    0.40016D-01    0.34925D-08
+  4    0.40032D-01    0.40032D-01    0.34429D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        332 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.75664D-07
+  2    0.40000D+00    0.40000D+00    0.67634D-07
+  3    0.41600D+00    0.41600D+00    0.67646D-07
+  4    0.43331D+00    0.43331D+00    0.72296D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        207 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.98491D-08
+  2    0.10000D+01    0.10000D+01    0.21530D-07
+  3    0.10000D+01    0.10000D+01    0.37481D-07
+  4    0.10000D+01    0.10000D+01    0.66996D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        196 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20481D-08
+  2    0.10000D+01    0.10000D+01    0.45559D-08
+  3    0.10000D+01    0.10000D+01    0.90500D-08
+  4    0.10008D+01    0.10008D+01    0.18149D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        216 f-s =        330 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.19719D-05
+  2    0.10004D+01    0.10004D+01    0.10872D-05
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        353 f-s =        508 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.13925D-06
+  2    0.25166D+00    0.25166D+00    0.14925D-06
+  3    0.99707D+00    0.99707D+00    0.48861D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        327 f-s =        454 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11314D-11
+  2    0.56309D-02    0.56309D-02    0.92495D-14
+  3    0.10007D+01    0.10007D+01    0.31548D-11
+  4    0.65374D+00    0.65374D+00    0.86631D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        161 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.91746D-06
+  2    0.98757D+00    0.98757D+00    0.64610D-06
+  3   -0.51035D+00   -0.51035D+00    0.10017D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        168 f-s =        273 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.35837D-05
+  2    0.99932D+00    0.99933D+00    0.40834D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        274 f-s =        380 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.51951D-07
+  2    0.99730D+00    0.99730D+00    0.35102D-06
+  3    0.10005D+01    0.10005D+01    0.10998D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        242 f-s =        325 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.37902D-10
+  2   -0.32148D-09   -0.72884D-12    0.32075D-09
+  3    0.11305D-08    0.15348D-11    0.11289D-08
+  4   -0.81371D-09   -0.10837D-11    0.81263D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        289 f-s =        401 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.89271D-05
+  2    0.56347D-01    0.56344D-01    0.26480D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        289 f-s =        423 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.26095D-02    0.26092D-02    0.29638D-06
+  2    0.33235D-02    0.33231D-02    0.36947D-06
+  3    0.99911D+00    0.99911D+00    0.46789D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        416 f-s =        565 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.10119D-07
+  2   -0.67797D+00   -0.67797D+00    0.98792D-08
+  3   -0.33303D-07   -0.14501D-07    0.18802D-07
+  4    0.31669D-07    0.13789D-07    0.17880D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        136 f-s =        184 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.14972D-06
+  2    0.94674D+00    0.94674D+00    0.13649D-06
+  3    0.99777D+00    0.99777D+00    0.29530D-06
+  4    0.94183D+00    0.94183D+00    0.43258D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        607 f-s =       1024 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.24681D-06
+  2    0.15223D-03    0.15223D-03    0.38538D-09
+  3    0.99887D+00    0.99887D+00    0.24498D-06
+  4    0.32420D-02    0.32420D-02    0.32087D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        142 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.52919D-06
+  2    0.52568D+00    0.52568D+00    0.71038D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        351 f-s =        471 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.81539D-07    0.80898D-07    0.64119D-09
+  2    0.23607D+00    0.23607D+00    0.36915D-07
+  3    0.20426D-04    0.20426D-04    0.16227D-09
+  4    0.99860D+00    0.99860D+00    0.33268D-07
+  5    0.99879D+00    0.99879D+00    0.19027D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1018 f-s =       1726 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.37183D-04    0.37443D-04    0.26064D-06
+  2    0.72887D-03    0.72895D-03    0.85195D-07
+  3    0.96495D-04    0.96463D-04    0.31912D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        343 f-s =        511 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.16726D-09
+  2    0.44958D+00    0.44958D+00    0.15010D-09
+  3    0.99988D+00    0.99988D+00    0.33382D-09
+  4    0.99949D+00    0.99949D+00    0.58824D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        340 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        268 f-s =        544 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.95234D-07
+  2    0.99999D+00    0.99999D+00    0.95229D-07
+  3    0.99999D+00    0.99999D+00    0.88783D-07
+  4    0.99999D+00    0.99999D+00    0.78801D-07
+  5    0.99999D+00    0.99999D+00    0.66412D-07
+  6    0.10000D+01    0.10000D+01    0.52535D-07
+  7    0.10000D+01    0.10000D+01    0.38051D-07
+  8    0.10000D+01    0.10000D+01    0.23808D-07
+  9    0.10000D+01    0.10000D+01    0.10582D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        276 f-s =        441 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.42292D-10
+  2    0.13685D-01    0.13685D-01    0.28842D-10
+  3    0.19229D+00    0.19229D+00    0.60083D-08
+  4    0.13534D+00    0.13534D+00    0.49417D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        705 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43441D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23569D-80    0.00000D+00    0.23569D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        975 f-s =       1263 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17036D-06    0.10042D-08    0.17136D-06
+  2    0.58484D-06    0.20955D-08    0.58274D-06
+  3    0.68593D-44    0.00000D+00    0.68593D-44
+  4    0.37335D-43   -0.18767D-79    0.37335D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        324 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        373 f-s =        557 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.98379D-11    0.11886D-21    0.98379D-11
+  2    0.31375D-10   -0.23259D-21    0.31375D-10
+  3   -0.73055D-17    0.15179D-34    0.73055D-17
+  4    0.16508D-08    0.20612D-08    0.41040D-09
+  5    0.45488D-04    0.45400D-04    0.88396D-07
+  6    0.13534D+00    0.13534D+00    0.82984D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2868 f-s =       3976 J-s =         76
+ Computed and reference solutions and absolute errors follow:
+  1    0.97660D-07   -0.23669D-13    0.97660D-07
+  2    0.20087D-05    0.34489D-13    0.20087D-05
+  3    0.18048D-34    0.18049D-34    0.13281D-39
+  4    0.20612D-08    0.20612D-08    0.14763D-16
+  5    0.45400D-04    0.45400D-04    0.93046D-14
+  6    0.13534D+00    0.13534D+00    0.10469D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        265 f-s =        405 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.49625D-08
+  2    0.38850D-03    0.38850D-03    0.17221D-13
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        240 f-s =        367 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.49236D-07
+  2    0.40000D-01    0.40000D-01    0.43971D-08
+  3    0.40016D-01    0.40016D-01    0.40429D-08
+  4    0.40032D-01    0.40032D-01    0.39852D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        238 f-s =        367 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.91194D-07
+  2    0.40000D+00    0.40000D+00    0.82496D-07
+  3    0.41600D+00    0.41600D+00    0.81702D-07
+  4    0.43331D+00    0.43331D+00    0.87260D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        195 f-s =        301 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.44344D-07
+  2    0.10000D+01    0.10000D+01    0.98543D-07
+  3    0.10000D+01    0.10000D+01    0.17990D-06
+  4    0.10000D+01    0.10000D+01    0.35457D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        193 f-s =        323 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.52447D-07
+  2    0.10000D+01    0.10000D+01    0.11654D-06
+  3    0.10000D+01    0.10000D+01    0.23135D-06
+  4    0.10008D+01    0.10008D+01    0.46698D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        206 f-s =        360 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.18508D-05
+  2    0.10004D+01    0.10004D+01    0.11744D-05
+  3    0.10000D+01    0.10000D+01    0.21094D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        338 f-s =        570 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.53435D-06
+  2    0.25166D+00    0.25166D+00    0.56315D-06
+  3    0.99706D+00    0.99707D+00    0.18750D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        344 f-s =        532 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.37800D-08
+  2    0.56309D-02    0.56309D-02    0.73708D-11
+  3    0.10007D+01    0.10007D+01    0.10500D-07
+  4    0.65374D+00    0.65374D+00    0.39046D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        161 f-s =        257 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.91418D-06
+  2    0.98757D+00    0.98757D+00    0.64379D-06
+  3   -0.51035D+00   -0.51035D+00    0.94863D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        156 f-s =        289 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.77260D-06
+  2    0.99932D+00    0.99933D+00    0.92703D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        280 f-s =        465 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.25088D-07
+  2    0.99730D+00    0.99730D+00    0.16951D-06
+  3    0.10005D+01    0.10005D+01    0.46775D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        239 f-s =        356 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.12241D-08
+  2   -0.16627D-08   -0.72884D-12    0.16620D-08
+  3    0.12614D-08    0.15348D-11    0.12598D-08
+  4   -0.38146D-09   -0.10837D-11    0.38038D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        286 f-s =        420 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57360D+00   -0.57361D+00    0.11627D-04
+  2    0.56347D-01    0.56344D-01    0.28544D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        268 f-s =        436 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.26096D-02    0.26092D-02    0.32589D-06
+  2    0.33236D-02    0.33231D-02    0.41417D-06
+  3    0.99911D+00    0.99911D+00    0.27001D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        408 f-s =        658 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.11240D-07
+  2   -0.67797D+00   -0.67797D+00    0.11023D-07
+  3   -0.32280D-07   -0.14501D-07    0.17779D-07
+  4    0.36694D-07    0.13789D-07    0.22905D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        132 f-s =        204 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.14478D-06
+  2    0.94674D+00    0.94674D+00    0.15965D-06
+  3    0.99777D+00    0.99777D+00    0.25505D-06
+  4    0.94183D+00    0.94183D+00    0.41049D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        491 f-s =       1019 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.11446D-06
+  2    0.15223D-03    0.15223D-03    0.21430D-09
+  3    0.99887D+00    0.99887D+00    0.11361D-06
+  4    0.32420D-02    0.32420D-02    0.17840D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        145 f-s =        234 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.63221D-07
+  2    0.52568D+00    0.52568D+00    0.84761D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        289 f-s =        463 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.80916D-07    0.80898D-07    0.18581D-10
+  2    0.23607D+00    0.23607D+00    0.13368D-09
+  3    0.20426D-04    0.20426D-04    0.47038D-11
+  4    0.99860D+00    0.99860D+00    0.59935D-09
+  5    0.99879D+00    0.99879D+00    0.10889D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =        833 f-s =       1482 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.37074D-04    0.37443D-04    0.36883D-06
+  2    0.72907D-03    0.72895D-03    0.12056D-06
+  3    0.96299D-04    0.96463D-04    0.16418D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        364 f-s =        588 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.57489D-10
+  2    0.44958D+00    0.44958D+00    0.51596D-10
+  3    0.99988D+00    0.99988D+00    0.11474D-09
+  4    0.99949D+00    0.99949D+00    0.20335D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        263 f-s =        418 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.91142D-07
+  2    0.99999D+00    0.99999D+00    0.91137D-07
+  3    0.99999D+00    0.99999D+00    0.84950D-07
+  4    0.99999D+00    0.99999D+00    0.75375D-07
+  5    0.99999D+00    0.99999D+00    0.63502D-07
+  6    0.10000D+01    0.10000D+01    0.50215D-07
+  7    0.10000D+01    0.10000D+01    0.36359D-07
+  8    0.10000D+01    0.10000D+01    0.22745D-07
+  9    0.10000D+01    0.10000D+01    0.10109D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        276 f-s =        385 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.39608D-10
+  2    0.13685D-01    0.13685D-01    0.75704D-10
+  3    0.19229D+00    0.19229D+00    0.56270D-08
+  4    0.13534D+00    0.13534D+00    0.51101D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43441D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23569D-80    0.00000D+00    0.23569D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        975 f-s =       1107 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17030D-06    0.10042D-08    0.17130D-06
+  2    0.58479D-06    0.20955D-08    0.58269D-06
+  3    0.68664D-44    0.00000D+00    0.68664D-44
+  4    0.37321D-43   -0.18767D-79    0.37321D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        373 f-s =        461 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.98379D-11    0.11886D-21    0.98379D-11
+  2    0.31375D-10   -0.23259D-21    0.31375D-10
+  3   -0.73055D-17    0.15179D-34    0.73055D-17
+  4    0.16508D-08    0.20612D-08    0.41040D-09
+  5    0.45488D-04    0.45400D-04    0.88396D-07
+  6    0.13534D+00    0.13534D+00    0.82984D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2868 f-s =       3382 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1    0.97315D-07   -0.23669D-13    0.97315D-07
+  2    0.20088D-05    0.34489D-13    0.20088D-05
+  3    0.18048D-34    0.18049D-34    0.13281D-39
+  4    0.20612D-08    0.20612D-08    0.14762D-16
+  5    0.45400D-04    0.45400D-04    0.93005D-14
+  6    0.13534D+00    0.13534D+00    0.10719D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        269 f-s =        352 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39250D-03    0.39247D-03    0.26281D-07
+  2    0.38850D-03    0.38850D-03    0.23706D-14
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        330 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42538D-07
+  2    0.40000D-01    0.40000D-01    0.38015D-08
+  3    0.40016D-01    0.40016D-01    0.34925D-08
+  4    0.40032D-01    0.40032D-01    0.34429D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        239 f-s =        332 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.75664D-07
+  2    0.40000D+00    0.40000D+00    0.67634D-07
+  3    0.41600D+00    0.41600D+00    0.67646D-07
+  4    0.43331D+00    0.43331D+00    0.72296D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        207 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.98491D-08
+  2    0.10000D+01    0.10000D+01    0.21530D-07
+  3    0.10000D+01    0.10000D+01    0.37481D-07
+  4    0.10000D+01    0.10000D+01    0.66996D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        196 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20481D-08
+  2    0.10000D+01    0.10000D+01    0.45559D-08
+  3    0.10000D+01    0.10000D+01    0.90500D-08
+  4    0.10008D+01    0.10008D+01    0.18149D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        216 f-s =        330 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.19719D-05
+  2    0.10004D+01    0.10004D+01    0.10872D-05
+  3    0.10000D+01    0.10000D+01    0.99920D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        353 f-s =        508 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.13925D-06
+  2    0.25166D+00    0.25166D+00    0.14925D-06
+  3    0.99707D+00    0.99707D+00    0.48861D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        327 f-s =        454 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11314D-11
+  2    0.56309D-02    0.56309D-02    0.92495D-14
+  3    0.10007D+01    0.10007D+01    0.31548D-11
+  4    0.65374D+00    0.65374D+00    0.86631D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        161 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.91746D-06
+  2    0.98757D+00    0.98757D+00    0.64610D-06
+  3   -0.51035D+00   -0.51035D+00    0.10017D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        168 f-s =        273 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.35837D-05
+  2    0.99932D+00    0.99933D+00    0.40834D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        274 f-s =        380 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.51951D-07
+  2    0.99730D+00    0.99730D+00    0.35102D-06
+  3    0.10005D+01    0.10005D+01    0.10998D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        242 f-s =        325 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.37902D-10
+  2   -0.32148D-09   -0.72884D-12    0.32075D-09
+  3    0.11305D-08    0.15348D-11    0.11289D-08
+  4   -0.81371D-09   -0.10837D-11    0.81263D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        289 f-s =        401 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.89271D-05
+  2    0.56347D-01    0.56344D-01    0.26480D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        289 f-s =        423 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.26095D-02    0.26092D-02    0.29638D-06
+  2    0.33235D-02    0.33231D-02    0.36947D-06
+  3    0.99911D+00    0.99911D+00    0.46789D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        416 f-s =        565 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.10119D-07
+  2   -0.67797D+00   -0.67797D+00    0.98792D-08
+  3   -0.33303D-07   -0.14501D-07    0.18802D-07
+  4    0.31669D-07    0.13789D-07    0.17880D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        136 f-s =        184 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.14972D-06
+  2    0.94674D+00    0.94674D+00    0.13649D-06
+  3    0.99777D+00    0.99777D+00    0.29530D-06
+  4    0.94183D+00    0.94183D+00    0.43258D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        607 f-s =       1024 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.24681D-06
+  2    0.15223D-03    0.15223D-03    0.38538D-09
+  3    0.99887D+00    0.99887D+00    0.24498D-06
+  4    0.32420D-02    0.32420D-02    0.32087D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        142 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.52919D-06
+  2    0.52568D+00    0.52568D+00    0.71038D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        351 f-s =        471 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.81539D-07    0.80898D-07    0.64119D-09
+  2    0.23607D+00    0.23607D+00    0.36915D-07
+  3    0.20426D-04    0.20426D-04    0.16227D-09
+  4    0.99860D+00    0.99860D+00    0.33268D-07
+  5    0.99879D+00    0.99879D+00    0.19027D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1018 f-s =       1726 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.37183D-04    0.37443D-04    0.26064D-06
+  2    0.72887D-03    0.72895D-03    0.85195D-07
+  3    0.96495D-04    0.96463D-04    0.31912D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        343 f-s =        511 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.16726D-09
+  2    0.44958D+00    0.44958D+00    0.15010D-09
+  3    0.99988D+00    0.99988D+00    0.33382D-09
+  4    0.99949D+00    0.99949D+00    0.58824D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        530 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.24812D-07
+  2    0.99999D+00    0.99999D+00    0.24810D-07
+  3    0.99999D+00    0.99999D+00    0.23131D-07
+  4    0.99999D+00    0.99999D+00    0.20530D-07
+  5    0.99999D+00    0.99999D+00    0.17302D-07
+  6    0.10000D+01    0.10000D+01    0.13687D-07
+  7    0.10000D+01    0.10000D+01    0.99132D-08
+  8    0.10000D+01    0.10000D+01    0.62026D-08
+  9    0.10000D+01    0.10000D+01    0.27568D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        385 f-s =        494 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.44852D-09
+  2    0.13685D-01    0.13685D-01    0.45067D-08
+  3    0.19229D+00    0.19229D+00    0.63728D-07
+  4    0.13534D+00    0.13534D+00    0.47698D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1361 f-s =       1529 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.10574D-06    0.10042D-08    0.10474D-06
+  2   -0.15963D-06    0.20955D-08    0.16172D-06
+  3   -0.12280D-63    0.00000D+00    0.12280D-63
+  4    0.42197D-62   -0.18767D-79    0.42197D-62
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.87998D-22    0.61813D-30    0.87998D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        585 f-s =        725 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.12168D-10    0.11886D-21    0.12168D-10
+  2   -0.12670D-11   -0.23259D-21    0.12670D-11
+  3   -0.13147D-25    0.15179D-34    0.13147D-25
+  4    0.21214D-08    0.20612D-08    0.60284D-10
+  5    0.45410D-04    0.45400D-04    0.10211D-07
+  6    0.13534D+00    0.13534D+00    0.25005D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3238 f-s =       3773 J-s =         59
+ Computed and reference solutions and absolute errors follow:
+  1   -0.39584D-07   -0.23669D-13    0.39584D-07
+  2    0.42399D-06    0.34489D-13    0.42399D-06
+  3    0.18048D-34    0.18049D-34    0.50737D-39
+  4    0.20612D-08    0.20612D-08    0.53822D-16
+  5    0.45400D-04    0.45400D-04    0.36659D-13
+  6    0.13534D+00    0.13534D+00    0.23065D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        367 f-s =        464 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.18517D-08
+  2    0.38850D-03    0.38850D-03    0.24395D-17
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        435 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.58869D-08
+  2    0.40000D-01    0.40000D-01    0.51489D-09
+  3    0.40016D-01    0.40016D-01    0.47755D-09
+  4    0.40032D-01    0.40032D-01    0.47120D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        324 f-s =        413 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47449D-08
+  2    0.40000D+00    0.40000D+00    0.42025D-08
+  3    0.41600D+00    0.41600D+00    0.42316D-08
+  4    0.43331D+00    0.43331D+00    0.45274D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        260 f-s =        356 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42626D-08
+  2    0.10000D+01    0.10000D+01    0.94730D-08
+  3    0.10000D+01    0.10000D+01    0.17294D-07
+  4    0.10000D+01    0.10000D+01    0.34084D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        252 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.90918D-09
+  2    0.10000D+01    0.10000D+01    0.20201D-08
+  3    0.10000D+01    0.10000D+01    0.40088D-08
+  4    0.10008D+01    0.10008D+01    0.80857D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        555 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.24683D-06
+  2    0.10004D+01    0.10004D+01    0.21390D-06
+  3    0.10000D+01    0.10000D+01    0.36637D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        454 f-s =        639 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.88688D-07
+  2    0.25166D+00    0.25166D+00    0.79424D-07
+  3    0.99707D+00    0.99707D+00    0.31120D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        444 f-s =        577 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14170D-08
+  2    0.56309D-02    0.56309D-02    0.27630D-11
+  3    0.10007D+01    0.10007D+01    0.39360D-08
+  4    0.65374D+00    0.65374D+00    0.14636D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        246 f-s =        355 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.79118D-07
+  2    0.98757D+00    0.98757D+00    0.55717D-07
+  3   -0.51035D+00   -0.51035D+00    0.81210D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        215 f-s =        345 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.64733D-06
+  2    0.99932D+00    0.99933D+00    0.70299D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        542 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.42723D-08
+  2    0.99730D+00    0.99730D+00    0.28867D-07
+  3    0.10005D+01    0.10005D+01    0.90582D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        331 f-s =        422 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13083D-09
+  2   -0.40876D-09   -0.72884D-12    0.40803D-09
+  3    0.43128D-09    0.15348D-11    0.42974D-09
+  4   -0.18092D-09   -0.10837D-11    0.17983D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        401 f-s =        518 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.93642D-06
+  2    0.56344D-01    0.56344D-01    0.21113D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        418 f-s =        595 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.14551D-07
+  2    0.33232D-02    0.33231D-02    0.18497D-07
+  3    0.99911D+00    0.99911D+00    0.15033D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        564 f-s =        737 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.13132D-08
+  2   -0.67797D+00   -0.67797D+00    0.12820D-08
+  3   -0.12061D-07   -0.14501D-07    0.24400D-08
+  4    0.11469D-07    0.13789D-07    0.23203D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        250 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.66406D-08
+  2    0.94674D+00    0.94674D+00    0.17136D-07
+  3    0.99777D+00    0.99777D+00    0.39190D-08
+  4    0.94183D+00    0.94183D+00    0.18415D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        725 f-s =       1191 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.35524D-07
+  2    0.15223D-03    0.15223D-03    0.70904D-10
+  3    0.99887D+00    0.99887D+00    0.35261D-07
+  4    0.32420D-02    0.32420D-02    0.59021D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        204 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.54122D-07
+  2    0.52568D+00    0.52568D+00    0.72659D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        422 f-s =        515 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.80900D-07    0.80898D-07    0.17524D-11
+  2    0.23607D+00    0.23607D+00    0.17681D-07
+  3    0.20426D-04    0.20426D-04    0.79556D-12
+  4    0.99860D+00    0.99860D+00    0.60485D-07
+  5    0.99879D+00    0.99879D+00    0.14292D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1237 f-s =       2084 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.37452D-04    0.37443D-04    0.86547D-08
+  2    0.72887D-03    0.72895D-03    0.80383D-07
+  3    0.96511D-04    0.96463D-04    0.48379D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        501 f-s =        733 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.83864D-10
+  2    0.44958D+00    0.44958D+00    0.75259D-10
+  3    0.99988D+00    0.99988D+00    0.16738D-09
+  4    0.99949D+00    0.99949D+00    0.29521D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        452 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        376 f-s =        700 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.11087D-07
+  2    0.99999D+00    0.99999D+00    0.11087D-07
+  3    0.99999D+00    0.99999D+00    0.10336D-07
+  4    0.99999D+00    0.99999D+00    0.91739D-08
+  5    0.99999D+00    0.99999D+00    0.77316D-08
+  6    0.10000D+01    0.10000D+01    0.61159D-08
+  7    0.10000D+01    0.10000D+01    0.44298D-08
+  8    0.10000D+01    0.10000D+01    0.27716D-08
+  9    0.10000D+01    0.10000D+01    0.12319D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        385 f-s =        570 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.44854D-09
+  2    0.13685D-01    0.13685D-01    0.45069D-08
+  3    0.19229D+00    0.19229D+00    0.63731D-07
+  4    0.13534D+00    0.13534D+00    0.47700D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        875 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1361 f-s =       1729 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.87727D-07    0.10042D-08    0.86722D-07
+  2   -0.15830D-06    0.20955D-08    0.16040D-06
+  3   -0.28596D-63    0.00000D+00    0.28596D-63
+  4    0.19235D-62   -0.18767D-79    0.19235D-62
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        449 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.88000D-22    0.61813D-30    0.88000D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        474 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        585 f-s =        851 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.12168D-10    0.11886D-21    0.12168D-10
+  2   -0.12672D-11   -0.23259D-21    0.12672D-11
+  3   -0.13147D-25    0.15179D-34    0.13147D-25
+  4    0.21214D-08    0.20612D-08    0.60284D-10
+  5    0.45410D-04    0.45400D-04    0.10211D-07
+  6    0.13534D+00    0.13534D+00    0.25005D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3239 f-s =       4488 J-s =         89
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19006D-07   -0.23669D-13    0.19006D-07
+  2    0.40166D-06    0.34489D-13    0.40166D-06
+  3    0.18048D-34    0.18049D-34    0.50701D-39
+  4    0.20612D-08    0.20612D-08    0.53785D-16
+  5    0.45400D-04    0.45400D-04    0.36634D-13
+  6    0.13534D+00    0.13534D+00    0.23037D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        367 f-s =        520 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.18530D-08
+  2    0.38850D-03    0.38850D-03    0.22768D-17
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        495 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.60484D-08
+  2    0.40000D-01    0.40000D-01    0.53764D-09
+  3    0.40016D-01    0.40016D-01    0.49671D-09
+  4    0.40032D-01    0.40032D-01    0.48958D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        324 f-s =        461 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.32007D-08
+  2    0.40000D+00    0.40000D+00    0.26488D-08
+  3    0.41600D+00    0.41600D+00    0.29465D-08
+  4    0.43331D+00    0.43331D+00    0.31514D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        259 f-s =        392 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14432D-08
+  2    0.10000D+01    0.10000D+01    0.32118D-08
+  3    0.10000D+01    0.10000D+01    0.58650D-08
+  4    0.10000D+01    0.10000D+01    0.11561D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        245 f-s =        370 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.66267D-08
+  2    0.10000D+01    0.10000D+01    0.14731D-07
+  3    0.10000D+01    0.10000D+01    0.29238D-07
+  4    0.10008D+01    0.10008D+01    0.59000D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        390 f-s =        663 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.80963D-07
+  2    0.10004D+01    0.10004D+01    0.87601D-07
+  3    0.10000D+01    0.10000D+01    0.16653D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        387 f-s =        597 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.37716D-07
+  2    0.25166D+00    0.25166D+00    0.40170D-07
+  3    0.99707D+00    0.99707D+00    0.13234D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        419 f-s =        657 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.30188D-09
+  2    0.56309D-02    0.56309D-02    0.58866D-12
+  3    0.10007D+01    0.10007D+01    0.83857D-09
+  4    0.65374D+00    0.65374D+00    0.31182D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        244 f-s =        383 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.13330D-06
+  2    0.98757D+00    0.98757D+00    0.93870D-07
+  3   -0.51035D+00   -0.51035D+00    0.13884D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        264 f-s =        499 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.75752D-06
+  2    0.99932D+00    0.99933D+00    0.82563D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        354 f-s =        568 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.17038D-07
+  2    0.99730D+00    0.99730D+00    0.11512D-06
+  3    0.10005D+01    0.10005D+01    0.36344D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        324 f-s =        477 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.70193D-09
+  2   -0.10352D-08   -0.72884D-12    0.10345D-08
+  3    0.76396D-08    0.15348D-11    0.76380D-08
+  4    0.62546D-08   -0.10837D-11    0.62557D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        402 f-s =        560 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.13736D-05
+  2    0.56345D-01    0.56344D-01    0.35956D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        352 f-s =        526 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.26093D-02    0.26092D-02    0.35787D-07
+  2    0.33232D-02    0.33231D-02    0.45459D-07
+  3    0.99911D+00    0.99911D+00    0.37349D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        539 f-s =        790 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.41229D-08
+  2   -0.67797D+00   -0.67797D+00    0.40251D-08
+  3   -0.22162D-07   -0.14501D-07    0.76607D-08
+  4    0.21074D-07    0.13789D-07    0.72847D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        193 f-s =        295 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.28957D-08
+  2    0.94674D+00    0.94674D+00    0.42365D-07
+  3    0.99777D+00    0.99777D+00    0.14138D-07
+  4    0.94183D+00    0.94183D+00    0.76051D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        780 f-s =       1456 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.50334D-07
+  2    0.15223D-03    0.15223D-03    0.27044D-09
+  3    0.99887D+00    0.99887D+00    0.49961D-07
+  4    0.32420D-02    0.32420D-02    0.22496D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        209 f-s =        304 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.10995D-07
+  2    0.52568D+00    0.52568D+00    0.14764D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        401 f-s =        612 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39667D-11
+  2    0.23607D+00    0.23607D+00    0.72361D-08
+  3    0.20426D-04    0.20426D-04    0.15085D-11
+  4    0.99860D+00    0.99860D+00    0.24813D-07
+  5    0.99879D+00    0.99879D+00    0.58046D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1294 f-s =       2356 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1    0.37426D-04    0.37443D-04    0.17438D-07
+  2    0.72906D-03    0.72895D-03    0.10454D-06
+  3    0.96390D-04    0.96463D-04    0.72442D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        437 f-s =        674 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.28978D-09
+  2    0.44958D+00    0.44958D+00    0.26004D-09
+  3    0.99988D+00    0.99988D+00    0.57834D-09
+  4    0.99949D+00    0.99949D+00    0.10193D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        530 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.24812D-07
+  2    0.99999D+00    0.99999D+00    0.24810D-07
+  3    0.99999D+00    0.99999D+00    0.23131D-07
+  4    0.99999D+00    0.99999D+00    0.20530D-07
+  5    0.99999D+00    0.99999D+00    0.17302D-07
+  6    0.10000D+01    0.10000D+01    0.13687D-07
+  7    0.10000D+01    0.10000D+01    0.99132D-08
+  8    0.10000D+01    0.10000D+01    0.62026D-08
+  9    0.10000D+01    0.10000D+01    0.27568D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        385 f-s =        494 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.44852D-09
+  2    0.13685D-01    0.13685D-01    0.45067D-08
+  3    0.19229D+00    0.19229D+00    0.63728D-07
+  4    0.13534D+00    0.13534D+00    0.47698D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1361 f-s =       1529 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.10574D-06    0.10042D-08    0.10474D-06
+  2   -0.15963D-06    0.20955D-08    0.16172D-06
+  3   -0.12280D-63    0.00000D+00    0.12280D-63
+  4    0.42197D-62   -0.18767D-79    0.42197D-62
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.87998D-22    0.61813D-30    0.87998D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        585 f-s =        725 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.12168D-10    0.11886D-21    0.12168D-10
+  2   -0.12670D-11   -0.23259D-21    0.12670D-11
+  3   -0.13147D-25    0.15179D-34    0.13147D-25
+  4    0.21214D-08    0.20612D-08    0.60284D-10
+  5    0.45410D-04    0.45400D-04    0.10211D-07
+  6    0.13534D+00    0.13534D+00    0.25005D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3238 f-s =       3773 J-s =         59
+ Computed and reference solutions and absolute errors follow:
+  1   -0.39584D-07   -0.23669D-13    0.39584D-07
+  2    0.42399D-06    0.34489D-13    0.42399D-06
+  3    0.18048D-34    0.18049D-34    0.50737D-39
+  4    0.20612D-08    0.20612D-08    0.53822D-16
+  5    0.45400D-04    0.45400D-04    0.36659D-13
+  6    0.13534D+00    0.13534D+00    0.23065D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        367 f-s =        464 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.18517D-08
+  2    0.38850D-03    0.38850D-03    0.24395D-17
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        435 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.58869D-08
+  2    0.40000D-01    0.40000D-01    0.51489D-09
+  3    0.40016D-01    0.40016D-01    0.47755D-09
+  4    0.40032D-01    0.40032D-01    0.47120D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        324 f-s =        413 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47449D-08
+  2    0.40000D+00    0.40000D+00    0.42025D-08
+  3    0.41600D+00    0.41600D+00    0.42316D-08
+  4    0.43331D+00    0.43331D+00    0.45274D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        260 f-s =        356 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.42626D-08
+  2    0.10000D+01    0.10000D+01    0.94730D-08
+  3    0.10000D+01    0.10000D+01    0.17294D-07
+  4    0.10000D+01    0.10000D+01    0.34084D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        252 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.90918D-09
+  2    0.10000D+01    0.10000D+01    0.20201D-08
+  3    0.10000D+01    0.10000D+01    0.40088D-08
+  4    0.10008D+01    0.10008D+01    0.80857D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        555 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.24683D-06
+  2    0.10004D+01    0.10004D+01    0.21390D-06
+  3    0.10000D+01    0.10000D+01    0.36637D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        454 f-s =        639 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.88688D-07
+  2    0.25166D+00    0.25166D+00    0.79424D-07
+  3    0.99707D+00    0.99707D+00    0.31120D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        444 f-s =        577 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.14170D-08
+  2    0.56309D-02    0.56309D-02    0.27630D-11
+  3    0.10007D+01    0.10007D+01    0.39360D-08
+  4    0.65374D+00    0.65374D+00    0.14636D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        246 f-s =        355 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.79118D-07
+  2    0.98757D+00    0.98757D+00    0.55717D-07
+  3   -0.51035D+00   -0.51035D+00    0.81210D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        215 f-s =        345 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.64733D-06
+  2    0.99932D+00    0.99933D+00    0.70299D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        375 f-s =        542 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.42723D-08
+  2    0.99730D+00    0.99730D+00    0.28867D-07
+  3    0.10005D+01    0.10005D+01    0.90582D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        331 f-s =        422 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13083D-09
+  2   -0.40876D-09   -0.72884D-12    0.40803D-09
+  3    0.43128D-09    0.15348D-11    0.42974D-09
+  4   -0.18092D-09   -0.10837D-11    0.17983D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        401 f-s =        518 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.93642D-06
+  2    0.56344D-01    0.56344D-01    0.21113D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        418 f-s =        595 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.14551D-07
+  2    0.33232D-02    0.33231D-02    0.18497D-07
+  3    0.99911D+00    0.99911D+00    0.15033D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        564 f-s =        737 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.13132D-08
+  2   -0.67797D+00   -0.67797D+00    0.12820D-08
+  3   -0.12061D-07   -0.14501D-07    0.24400D-08
+  4    0.11469D-07    0.13789D-07    0.23203D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        250 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.66406D-08
+  2    0.94674D+00    0.94674D+00    0.17136D-07
+  3    0.99777D+00    0.99777D+00    0.39190D-08
+  4    0.94183D+00    0.94183D+00    0.18415D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        725 f-s =       1191 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.35524D-07
+  2    0.15223D-03    0.15223D-03    0.70904D-10
+  3    0.99887D+00    0.99887D+00    0.35261D-07
+  4    0.32420D-02    0.32420D-02    0.59021D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        204 f-s =        277 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.54122D-07
+  2    0.52568D+00    0.52568D+00    0.72659D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        422 f-s =        515 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.80900D-07    0.80898D-07    0.17524D-11
+  2    0.23607D+00    0.23607D+00    0.17681D-07
+  3    0.20426D-04    0.20426D-04    0.79556D-12
+  4    0.99860D+00    0.99860D+00    0.60485D-07
+  5    0.99879D+00    0.99879D+00    0.14292D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1237 f-s =       2084 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.37452D-04    0.37443D-04    0.86547D-08
+  2    0.72887D-03    0.72895D-03    0.80383D-07
+  3    0.96511D-04    0.96463D-04    0.48379D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        501 f-s =        733 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.83864D-10
+  2    0.44958D+00    0.44958D+00    0.75259D-10
+  3    0.99988D+00    0.99988D+00    0.16738D-09
+  4    0.99949D+00    0.99949D+00    0.29521D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        522 f-s =        731 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.14111D-08
+  2    0.99999D+00    0.99999D+00    0.14110D-08
+  3    0.99999D+00    0.99999D+00    0.13155D-08
+  4    0.99999D+00    0.99999D+00    0.11676D-08
+  5    0.99999D+00    0.99999D+00    0.98403D-09
+  6    0.10000D+01    0.10000D+01    0.77840D-09
+  7    0.10000D+01    0.10000D+01    0.56380D-09
+  8    0.10000D+01    0.10000D+01    0.35276D-09
+  9    0.10000D+01    0.10000D+01    0.15679D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        537 f-s =        657 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61667D-10
+  2    0.13685D-01    0.13685D-01    0.61998D-09
+  3    0.19229D+00    0.19229D+00    0.87620D-08
+  4    0.13534D+00    0.13534D+00    0.65232D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19630D-10    0.12659D-13    0.19642D-10
+  3    0.50491D-23    0.19115D-41    0.50491D-23
+  4   -0.40029D-36    0.22774D-54    0.40029D-36
+  5   -0.12541D-51    0.00000D+00    0.12541D-51
+  6    0.19248D-70    0.00000D+00    0.19248D-70
+  7    0.18002D-88    0.00000D+00    0.18002D-88
+  8   -0.16262-107    0.00000D+00    0.16262-107
+  9    0.75670-126    0.00000D+00    0.75670-126
+ 10    0.28912-143    0.00000D+00    0.28912-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2035 f-s =       2249 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.33939D-08    0.10042D-08    0.23898D-08
+  2   -0.12830D-08    0.20955D-08    0.33785D-08
+  3   -0.54793-120    0.00000D+00    0.54793-120
+  4   -0.35918-119   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67161D-25    0.89637D-30    0.67160D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        798 f-s =        960 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17622D-10    0.11886D-21    0.17622D-10
+  2   -0.21726D-10   -0.23259D-21    0.21726D-10
+  3   -0.34190D-29    0.15179D-34    0.34190D-29
+  4    0.20931D-08    0.20612D-08    0.31954D-10
+  5    0.45404D-04    0.45400D-04    0.42677D-08
+  6    0.13534D+00    0.13534D+00    0.64903D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3790 f-s =       4374 J-s =         69
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28967D-07   -0.23669D-13    0.28967D-07
+  2   -0.62827D-08    0.34489D-13    0.62827D-08
+  3    0.18048D-34    0.18049D-34    0.40448D-39
+  4    0.20612D-08    0.20612D-08    0.43260D-16
+  5    0.45400D-04    0.45400D-04    0.29543D-13
+  6    0.13534D+00    0.13534D+00    0.20706D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.21201D-08
+  2    0.38850D-03    0.38850D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        460 f-s =        573 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.63349D-09
+  2    0.40000D-01    0.40000D-01    0.56293D-10
+  3    0.40016D-01    0.40016D-01    0.52025D-10
+  4    0.40032D-01    0.40032D-01    0.51279D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        468 f-s =        570 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.48844D-09
+  2    0.40000D+00    0.40000D+00    0.43414D-09
+  3    0.41600D+00    0.41600D+00    0.43638D-09
+  4    0.43331D+00    0.43331D+00    0.46644D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        363 f-s =        461 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.15694D-09
+  2    0.10000D+01    0.10000D+01    0.34876D-09
+  3    0.10000D+01    0.10000D+01    0.63670D-09
+  4    0.10000D+01    0.10000D+01    0.12549D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        345 f-s =        443 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.54573D-09
+  2    0.10000D+01    0.10000D+01    0.12127D-08
+  3    0.10000D+01    0.10000D+01    0.24072D-08
+  4    0.10008D+01    0.10008D+01    0.48575D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        493 f-s =        738 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.55273D-08
+  2    0.10004D+01    0.10004D+01    0.53110D-08
+  3    0.10000D+01    0.10000D+01    0.34417D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        534 f-s =        726 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.33962D-08
+  2    0.25166D+00    0.25166D+00    0.32336D-08
+  3    0.99707D+00    0.99707D+00    0.11917D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        593 f-s =        740 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.35272D-09
+  2    0.56309D-02    0.56309D-02    0.68779D-12
+  3    0.10007D+01    0.10007D+01    0.97980D-09
+  4    0.65374D+00    0.65374D+00    0.36434D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        321 f-s =        449 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.98087D-08
+  2    0.98757D+00    0.98757D+00    0.69076D-08
+  3   -0.51035D+00   -0.51035D+00    0.11512D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        425 f-s =        703 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.38554D-07
+  2    0.99933D+00    0.99933D+00    0.42170D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        497 f-s =        717 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.37272D-09
+  2    0.99730D+00    0.99730D+00    0.25184D-08
+  3    0.10005D+01    0.10005D+01    0.79669D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        452 f-s =        563 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.58842D-13
+  2   -0.45772D-12   -0.72884D-12    0.27113D-12
+  3    0.10947D-11    0.15348D-11    0.44010D-12
+  4   -0.78266D-12   -0.10837D-11    0.30105D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        587 f-s =        714 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.40208D-06
+  2    0.56344D-01    0.56344D-01    0.97776D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        510 f-s =        730 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.21124D-08
+  2    0.33231D-02    0.33231D-02    0.26041D-08
+  3    0.99911D+00    0.99911D+00    0.25372D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        769 f-s =        956 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.93511D-09
+  2   -0.67797D+00   -0.67797D+00    0.91292D-09
+  3   -0.16238D-07   -0.14501D-07    0.17375D-08
+  4    0.15441D-07    0.13789D-07    0.16522D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        263 f-s =        350 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.43812D-07
+  2    0.94674D+00    0.94674D+00    0.47788D-07
+  3    0.99777D+00    0.99777D+00    0.53592D-08
+  4    0.94183D+00    0.94183D+00    0.50265D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1013 f-s =       1603 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.33201D-08
+  2    0.15223D-03    0.15223D-03    0.32141D-10
+  3    0.99887D+00    0.99887D+00    0.32956D-08
+  4    0.32420D-02    0.32420D-02    0.26710D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        285 f-s =        359 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.70270D-08
+  2    0.52568D+00    0.52568D+00    0.94341D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        598 f-s =        721 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.80903D-07    0.80898D-07    0.48145D-11
+  2    0.23607D+00    0.23607D+00    0.84626D-08
+  3    0.20426D-04    0.20426D-04    0.62199D-12
+  4    0.99860D+00    0.99860D+00    0.28972D-07
+  5    0.99879D+00    0.99879D+00    0.68275D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1679 f-s =       2745 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1    0.37442D-04    0.37443D-04    0.11007D-08
+  2    0.72895D-03    0.72895D-03    0.51311D-09
+  3    0.96464D-04    0.96463D-04    0.15844D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        639 f-s =        948 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.25650D-09
+  2    0.44958D+00    0.44958D+00    0.23018D-09
+  3    0.99988D+00    0.99988D+00    0.51192D-09
+  4    0.99949D+00    0.99949D+00    0.90262D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        618 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        521 f-s =        895 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.22225D-08
+  2    0.99999D+00    0.99999D+00    0.22223D-08
+  3    0.99999D+00    0.99999D+00    0.20719D-08
+  4    0.99999D+00    0.99999D+00    0.18389D-08
+  5    0.99999D+00    0.99999D+00    0.15498D-08
+  6    0.10000D+01    0.10000D+01    0.12260D-08
+  7    0.10000D+01    0.10000D+01    0.88795D-09
+  8    0.10000D+01    0.10000D+01    0.55558D-09
+  9    0.10000D+01    0.10000D+01    0.24694D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        537 f-s =        753 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61667D-10
+  2    0.13685D-01    0.13685D-01    0.61999D-09
+  3    0.19229D+00    0.19229D+00    0.87621D-08
+  4    0.13534D+00    0.13534D+00    0.65233D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =       1293 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19620D-10    0.12659D-13    0.19632D-10
+  3    0.50487D-23    0.19115D-41    0.50487D-23
+  4   -0.40024D-36    0.22774D-54    0.40024D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19241D-70    0.00000D+00    0.19241D-70
+  7    0.17997D-88    0.00000D+00    0.17997D-88
+  8   -0.16257-107    0.00000D+00    0.16257-107
+  9    0.75653-126    0.00000D+00    0.75653-126
+ 10    0.28909-143    0.00000D+00    0.28909-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2034 f-s =       2532 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.33799D-08    0.10042D-08    0.23758D-08
+  2   -0.15014D-08    0.20955D-08    0.35969D-08
+  3    0.15381-119    0.00000D+00    0.15381-119
+  4   -0.31988-119   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        609 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67161D-25    0.89637D-30    0.67161D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        619 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        798 f-s =       1140 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17622D-10    0.11886D-21    0.17622D-10
+  2   -0.21725D-10   -0.23259D-21    0.21725D-10
+  3   -0.34190D-29    0.15179D-34    0.34190D-29
+  4    0.20931D-08    0.20612D-08    0.31954D-10
+  5    0.45404D-04    0.45400D-04    0.42677D-08
+  6    0.13534D+00    0.13534D+00    0.64904D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3790 f-s =       5184 J-s =        102
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28919D-07   -0.23669D-13    0.28919D-07
+  2   -0.61159D-08    0.34489D-13    0.61160D-08
+  3    0.18048D-34    0.18049D-34    0.40445D-39
+  4    0.20612D-08    0.20612D-08    0.43257D-16
+  5    0.45400D-04    0.45400D-04    0.29548D-13
+  6    0.13534D+00    0.13534D+00    0.25008D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        724 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.21699D-08
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        460 f-s =        637 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.63783D-09
+  2    0.40000D-01    0.40000D-01    0.56587D-10
+  3    0.40016D-01    0.40016D-01    0.52296D-10
+  4    0.40032D-01    0.40032D-01    0.51527D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        468 f-s =        639 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.47465D-09
+  2    0.40000D+00    0.40000D+00    0.42159D-09
+  3    0.41600D+00    0.41600D+00    0.42381D-09
+  4    0.43331D+00    0.43331D+00    0.45301D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        363 f-s =        527 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.73151D-09
+  2    0.10000D+01    0.10000D+01    0.16256D-08
+  3    0.10000D+01    0.10000D+01    0.29677D-08
+  4    0.10000D+01    0.10000D+01    0.58490D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        347 f-s =        491 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.53226D-09
+  2    0.10000D+01    0.10000D+01    0.11828D-08
+  3    0.10000D+01    0.10000D+01    0.23478D-08
+  4    0.10008D+01    0.10008D+01    0.47376D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        513 f-s =        883 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.23834D-07
+  2    0.10004D+01    0.10004D+01    0.16667D-07
+  3    0.10000D+01    0.10000D+01    0.35527D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        569 f-s =        898 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.21758D-08
+  2    0.25166D+00    0.25166D+00    0.23037D-08
+  3    0.99707D+00    0.99707D+00    0.76346D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        610 f-s =        864 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.12119D-09
+  2    0.56309D-02    0.56309D-02    0.23631D-12
+  3    0.10007D+01    0.10007D+01    0.33663D-09
+  4    0.65374D+00    0.65374D+00    0.12518D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        334 f-s =        491 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.11993D-07
+  2    0.98757D+00    0.98757D+00    0.84459D-08
+  3   -0.51035D+00   -0.51035D+00    0.12067D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        366 f-s =        616 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.64258D-07
+  2    0.99933D+00    0.99933D+00    0.71500D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        447 f-s =        665 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.38108D-09
+  2    0.99730D+00    0.99730D+00    0.25749D-08
+  3    0.10005D+01    0.10005D+01    0.81228D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        457 f-s =        642 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18450D-11
+  2    0.14997D-11   -0.72884D-12    0.22286D-11
+  3    0.43952D-12    0.15348D-11    0.10953D-11
+  4   -0.10690D-11   -0.10837D-11    0.14699D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        578 f-s =        759 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.24234D-06
+  2    0.56344D-01    0.56344D-01    0.68783D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        476 f-s =        747 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.12009D-08
+  2    0.33231D-02    0.33231D-02    0.15387D-08
+  3    0.99911D+00    0.99911D+00    0.87503D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        771 f-s =       1087 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.49479D-10
+  2   -0.67797D+00   -0.67797D+00    0.48306D-10
+  3   -0.14593D-07   -0.14501D-07    0.91936D-10
+  4    0.13877D-07    0.13789D-07    0.87424D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        276 f-s =        421 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.43734D-07
+  2    0.94674D+00    0.94674D+00    0.49039D-07
+  3    0.99777D+00    0.99777D+00    0.71385D-08
+  4    0.94183D+00    0.94183D+00    0.51484D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =        980 f-s =       1858 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.47336D-08
+  2    0.15223D-03    0.15223D-03    0.85958D-11
+  3    0.99887D+00    0.99887D+00    0.46986D-08
+  4    0.32420D-02    0.32420D-02    0.92616D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        285 f-s =        402 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.45802D-08
+  2    0.52568D+00    0.52568D+00    0.61490D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        589 f-s =        873 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39162D-11
+  2    0.23607D+00    0.23607D+00    0.73687D-09
+  3    0.20426D-04    0.20426D-04    0.10396D-11
+  4    0.99860D+00    0.99860D+00    0.25205D-08
+  5    0.99879D+00    0.99879D+00    0.60108D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1750 f-s =       3002 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1    0.37440D-04    0.37443D-04    0.30123D-08
+  2    0.72895D-03    0.72895D-03    0.59517D-08
+  3    0.96468D-04    0.96463D-04    0.53805D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        613 f-s =        989 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.49190D-09
+  2    0.44958D+00    0.44958D+00    0.44142D-09
+  3    0.99988D+00    0.99988D+00    0.98173D-09
+  4    0.99949D+00    0.99949D+00    0.17305D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        522 f-s =        731 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.14111D-08
+  2    0.99999D+00    0.99999D+00    0.14110D-08
+  3    0.99999D+00    0.99999D+00    0.13155D-08
+  4    0.99999D+00    0.99999D+00    0.11676D-08
+  5    0.99999D+00    0.99999D+00    0.98403D-09
+  6    0.10000D+01    0.10000D+01    0.77840D-09
+  7    0.10000D+01    0.10000D+01    0.56380D-09
+  8    0.10000D+01    0.10000D+01    0.35276D-09
+  9    0.10000D+01    0.10000D+01    0.15679D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        537 f-s =        657 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.61667D-10
+  2    0.13685D-01    0.13685D-01    0.61998D-09
+  3    0.19229D+00    0.19229D+00    0.87620D-08
+  4    0.13534D+00    0.13534D+00    0.65232D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19630D-10    0.12659D-13    0.19642D-10
+  3    0.50491D-23    0.19115D-41    0.50491D-23
+  4   -0.40029D-36    0.22774D-54    0.40029D-36
+  5   -0.12541D-51    0.00000D+00    0.12541D-51
+  6    0.19248D-70    0.00000D+00    0.19248D-70
+  7    0.18002D-88    0.00000D+00    0.18002D-88
+  8   -0.16262-107    0.00000D+00    0.16262-107
+  9    0.75670-126    0.00000D+00    0.75670-126
+ 10    0.28912-143    0.00000D+00    0.28912-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2035 f-s =       2249 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.33939D-08    0.10042D-08    0.23898D-08
+  2   -0.12830D-08    0.20955D-08    0.33785D-08
+  3   -0.54793-120    0.00000D+00    0.54793-120
+  4   -0.35918-119   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67161D-25    0.89637D-30    0.67160D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        798 f-s =        960 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17622D-10    0.11886D-21    0.17622D-10
+  2   -0.21726D-10   -0.23259D-21    0.21726D-10
+  3   -0.34190D-29    0.15179D-34    0.34190D-29
+  4    0.20931D-08    0.20612D-08    0.31954D-10
+  5    0.45404D-04    0.45400D-04    0.42677D-08
+  6    0.13534D+00    0.13534D+00    0.64903D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3790 f-s =       4374 J-s =         69
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28967D-07   -0.23669D-13    0.28967D-07
+  2   -0.62827D-08    0.34489D-13    0.62827D-08
+  3    0.18048D-34    0.18049D-34    0.40448D-39
+  4    0.20612D-08    0.20612D-08    0.43260D-16
+  5    0.45400D-04    0.45400D-04    0.29543D-13
+  6    0.13534D+00    0.13534D+00    0.20706D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.39248D-03    0.39247D-03    0.21201D-08
+  2    0.38850D-03    0.38850D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        460 f-s =        573 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.63349D-09
+  2    0.40000D-01    0.40000D-01    0.56293D-10
+  3    0.40016D-01    0.40016D-01    0.52025D-10
+  4    0.40032D-01    0.40032D-01    0.51279D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        468 f-s =        570 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.48844D-09
+  2    0.40000D+00    0.40000D+00    0.43414D-09
+  3    0.41600D+00    0.41600D+00    0.43638D-09
+  4    0.43331D+00    0.43331D+00    0.46644D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        363 f-s =        461 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.15694D-09
+  2    0.10000D+01    0.10000D+01    0.34876D-09
+  3    0.10000D+01    0.10000D+01    0.63670D-09
+  4    0.10000D+01    0.10000D+01    0.12549D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        345 f-s =        443 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.54573D-09
+  2    0.10000D+01    0.10000D+01    0.12127D-08
+  3    0.10000D+01    0.10000D+01    0.24072D-08
+  4    0.10008D+01    0.10008D+01    0.48575D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        493 f-s =        738 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.55273D-08
+  2    0.10004D+01    0.10004D+01    0.53110D-08
+  3    0.10000D+01    0.10000D+01    0.34417D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        534 f-s =        726 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.33962D-08
+  2    0.25166D+00    0.25166D+00    0.32336D-08
+  3    0.99707D+00    0.99707D+00    0.11917D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        593 f-s =        740 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.35272D-09
+  2    0.56309D-02    0.56309D-02    0.68779D-12
+  3    0.10007D+01    0.10007D+01    0.97980D-09
+  4    0.65374D+00    0.65374D+00    0.36434D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        321 f-s =        449 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.98087D-08
+  2    0.98757D+00    0.98757D+00    0.69076D-08
+  3   -0.51035D+00   -0.51035D+00    0.11512D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        425 f-s =        703 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.38554D-07
+  2    0.99933D+00    0.99933D+00    0.42170D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        497 f-s =        717 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.37272D-09
+  2    0.99730D+00    0.99730D+00    0.25184D-08
+  3    0.10005D+01    0.10005D+01    0.79669D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        452 f-s =        563 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.58842D-13
+  2   -0.45772D-12   -0.72884D-12    0.27113D-12
+  3    0.10947D-11    0.15348D-11    0.44010D-12
+  4   -0.78266D-12   -0.10837D-11    0.30105D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        587 f-s =        714 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.40208D-06
+  2    0.56344D-01    0.56344D-01    0.97776D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        510 f-s =        730 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.21124D-08
+  2    0.33231D-02    0.33231D-02    0.26041D-08
+  3    0.99911D+00    0.99911D+00    0.25372D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =        769 f-s =        956 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.93511D-09
+  2   -0.67797D+00   -0.67797D+00    0.91292D-09
+  3   -0.16238D-07   -0.14501D-07    0.17375D-08
+  4    0.15441D-07    0.13789D-07    0.16522D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        263 f-s =        350 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.43812D-07
+  2    0.94674D+00    0.94674D+00    0.47788D-07
+  3    0.99777D+00    0.99777D+00    0.53592D-08
+  4    0.94183D+00    0.94183D+00    0.50265D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1013 f-s =       1603 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.33201D-08
+  2    0.15223D-03    0.15223D-03    0.32141D-10
+  3    0.99887D+00    0.99887D+00    0.32956D-08
+  4    0.32420D-02    0.32420D-02    0.26710D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        285 f-s =        359 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.70270D-08
+  2    0.52568D+00    0.52568D+00    0.94341D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        598 f-s =        721 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.80903D-07    0.80898D-07    0.48145D-11
+  2    0.23607D+00    0.23607D+00    0.84626D-08
+  3    0.20426D-04    0.20426D-04    0.62199D-12
+  4    0.99860D+00    0.99860D+00    0.28972D-07
+  5    0.99879D+00    0.99879D+00    0.68275D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       1679 f-s =       2745 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1    0.37442D-04    0.37443D-04    0.11007D-08
+  2    0.72895D-03    0.72895D-03    0.51311D-09
+  3    0.96464D-04    0.96463D-04    0.15844D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        639 f-s =        948 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.25650D-09
+  2    0.44958D+00    0.44958D+00    0.23018D-09
+  3    0.99988D+00    0.99988D+00    0.51192D-09
+  4    0.99949D+00    0.99949D+00    0.90262D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        712 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91982D-53
+  4    0.81954D-50    0.52358D-51    0.76719D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        736 f-s =        990 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.33713D-09
+  2    0.99999D+00    0.99999D+00    0.33711D-09
+  3    0.99999D+00    0.99999D+00    0.31429D-09
+  4    0.99999D+00    0.99999D+00    0.27895D-09
+  5    0.99999D+00    0.99999D+00    0.23509D-09
+  6    0.10000D+01    0.10000D+01    0.18597D-09
+  7    0.10000D+01    0.10000D+01    0.13470D-09
+  8    0.10000D+01    0.10000D+01    0.84278D-10
+  9    0.10000D+01    0.10000D+01    0.37459D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        760 f-s =        908 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.14900D-11
+  2    0.13685D-01    0.13685D-01    0.15033D-10
+  3    0.19229D+00    0.19229D+00    0.21171D-09
+  4    0.13534D+00    0.13534D+00    0.15245D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96718D-30    0.19115D-41    0.96718D-30
+  4    0.36838D-45    0.22774D-54    0.36838D-45
+  5   -0.26040D-66    0.00000D+00    0.26040D-66
+  6   -0.24200D-87    0.00000D+00    0.24200D-87
+  7   -0.55396-112    0.00000D+00    0.55396-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36663-165    0.00000D+00    0.36663-165
+ 10   -0.13090-187    0.00000D+00    0.13090-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2933 f-s =       3230 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.98068D-09    0.10042D-08    0.23487D-10
+  2    0.16677D-08    0.20955D-08    0.42778D-09
+  3    0.22688-208    0.00000D+00    0.22688-208
+  4    0.19330-208   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31673D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16599D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1106 f-s =       1300 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.36453D-12    0.11886D-21    0.36453D-12
+  2    0.17240D-11   -0.23259D-21    0.17240D-11
+  3    0.97879D-35    0.15179D-34    0.53906D-35
+  4    0.20606D-08    0.20612D-08    0.55353D-12
+  5    0.45400D-04    0.45400D-04    0.33829D-09
+  6    0.13534D+00    0.13534D+00    0.29355D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4572 f-s =       5276 J-s =         83
+ Computed and reference solutions and absolute errors follow:
+  1   -0.26611D-08   -0.23669D-13    0.26610D-08
+  2    0.29670D-08    0.34489D-13    0.29670D-08
+  3    0.18048D-34    0.18049D-34    0.51038D-39
+  4    0.20612D-08    0.20612D-08    0.54134D-16
+  5    0.45400D-04    0.45400D-04    0.36945D-13
+  6    0.13534D+00    0.13534D+00    0.38886D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        735 f-s =        888 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.25669D-09
+  2    0.38850D-03    0.38850D-03    0.59631D-18
+  3    0.40000D-03    0.40000D-03    0.37947D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        661 f-s =        796 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.46526D-09
+  2    0.40000D-01    0.40000D-01    0.41344D-10
+  3    0.40016D-01    0.40016D-01    0.38203D-10
+  4    0.40032D-01    0.40032D-01    0.37657D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        656 f-s =        783 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17842D-09
+  2    0.40000D+00    0.40000D+00    0.15859D-09
+  3    0.41600D+00    0.41600D+00    0.15941D-09
+  4    0.43331D+00    0.43331D+00    0.17040D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        517 f-s =        628 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18390D-10
+  2    0.10000D+01    0.10000D+01    0.40866D-10
+  3    0.10000D+01    0.10000D+01    0.74607D-10
+  4    0.10000D+01    0.10000D+01    0.14704D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        502 f-s =        602 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11045D-10
+  2    0.10000D+01    0.10000D+01    0.24545D-10
+  3    0.10000D+01    0.10000D+01    0.48720D-10
+  4    0.10008D+01    0.10008D+01    0.98313D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        609 f-s =        884 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.49973D-08
+  2    0.10004D+01    0.10004D+01    0.42783D-08
+  3    0.10000D+01    0.10000D+01    0.88818D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        723 f-s =       1013 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.78932D-09
+  2    0.25166D+00    0.25166D+00    0.84692D-09
+  3    0.99707D+00    0.99707D+00    0.27697D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        860 f-s =       1031 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.44877D-11
+  2    0.56309D-02    0.56309D-02    0.87482D-14
+  3    0.10007D+01    0.10007D+01    0.12460D-10
+  4    0.65374D+00    0.65374D+00    0.46343D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        427 f-s =        608 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.21289D-09
+  2    0.98757D+00    0.98757D+00    0.14992D-09
+  3   -0.51035D+00   -0.51035D+00    0.21946D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        584 f-s =        931 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.81062D-08
+  2    0.99933D+00    0.99933D+00    0.96201D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        624 f-s =        885 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.95356D-10
+  2    0.99730D+00    0.99730D+00    0.64428D-09
+  3    0.10005D+01    0.10005D+01    0.20329D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        635 f-s =        762 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.64038D-12
+  2    0.41518D-12   -0.72884D-12    0.11440D-11
+  3    0.18750D-13    0.15348D-11    0.15161D-11
+  4   -0.19988D-13   -0.10837D-11    0.10637D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        835 f-s =        997 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.38996D-07
+  2    0.56344D-01    0.56344D-01    0.11220D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        638 f-s =        861 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.22850D-09
+  2    0.33231D-02    0.33231D-02    0.28821D-09
+  3    0.99911D+00    0.99911D+00    0.23672D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1122 f-s =       1337 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.39557D-10
+  2   -0.67797D+00   -0.67797D+00    0.38619D-10
+  3   -0.14574D-07   -0.14501D-07    0.73500D-10
+  4    0.13859D-07    0.13789D-07    0.69892D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        344 f-s =        449 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45480D-07
+  2    0.94674D+00    0.94674D+00    0.51370D-07
+  3    0.99777D+00    0.99777D+00    0.77284D-08
+  4    0.94183D+00    0.94183D+00    0.53885D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1496 f-s =       2279 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.44423D-09
+  2    0.15223D-03    0.15223D-03    0.83889D-12
+  3    0.99887D+00    0.99887D+00    0.44095D-09
+  4    0.32420D-02    0.32420D-02    0.69832D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        388 f-s =        470 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.15823D-08
+  2    0.52568D+00    0.52568D+00    0.21244D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        822 f-s =        960 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.28844D-10
+  3    0.20426D-04    0.20426D-04    0.99592D-12
+  4    0.99860D+00    0.99860D+00    0.98668D-10
+  5    0.99879D+00    0.99879D+00    0.28208D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2337 f-s =       3662 J-s =         50
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.10977D-09
+  2    0.72895D-03    0.72895D-03    0.10080D-08
+  3    0.96464D-04    0.96463D-04    0.86098D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        838 f-s =       1214 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.19531D-10
+  2    0.44958D+00    0.44958D+00    0.17528D-10
+  3    0.99988D+00    0.99988D+00    0.38982D-10
+  4    0.99949D+00    0.99949D+00    0.68912D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        788 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92265D-53    0.28230D-55    0.91982D-53
+  4    0.81954D-50    0.52358D-51    0.76719D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        735 f-s =       1268 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.33385D-09
+  2    0.99999D+00    0.99999D+00    0.33383D-09
+  3    0.99999D+00    0.99999D+00    0.31123D-09
+  4    0.99999D+00    0.99999D+00    0.27623D-09
+  5    0.99999D+00    0.99999D+00    0.23280D-09
+  6    0.10000D+01    0.10000D+01    0.18416D-09
+  7    0.10000D+01    0.10000D+01    0.13338D-09
+  8    0.10000D+01    0.10000D+01    0.83457D-10
+  9    0.10000D+01    0.10000D+01    0.37094D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        760 f-s =       1024 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.14902D-11
+  2    0.13685D-01    0.13685D-01    0.15034D-10
+  3    0.19229D+00    0.19229D+00    0.21173D-09
+  4    0.13534D+00    0.13534D+00    0.15246D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1684 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96719D-30    0.19115D-41    0.96719D-30
+  4    0.36837D-45    0.22774D-54    0.36837D-45
+  5   -0.26040D-66    0.00000D+00    0.26040D-66
+  6   -0.24199D-87    0.00000D+00    0.24199D-87
+  7   -0.55395-112    0.00000D+00    0.55395-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36663-165    0.00000D+00    0.36663-165
+ 10   -0.13090-187    0.00000D+00    0.13090-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2913 f-s =       3602 J-s =         77
+ Computed and reference solutions and absolute errors follow:
+  1    0.96980D-09    0.10042D-08    0.34368D-10
+  2    0.16925D-08    0.20955D-08    0.40296D-09
+  3    0.94382-207    0.00000D+00    0.94382-207
+  4   -0.44305-206   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        823 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11778D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57914D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        867 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16599D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1106 f-s =       1528 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36456D-12    0.11886D-21    0.36456D-12
+  2    0.17239D-11   -0.23259D-21    0.17239D-11
+  3    0.97879D-35    0.15179D-34    0.53906D-35
+  4    0.20606D-08    0.20612D-08    0.55352D-12
+  5    0.45400D-04    0.45400D-04    0.33829D-09
+  6    0.13534D+00    0.13534D+00    0.29354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4584 f-s =       6258 J-s =        123
+ Computed and reference solutions and absolute errors follow:
+  1   -0.33886D-09   -0.23669D-13    0.33883D-09
+  2   -0.41512D-09    0.34489D-13    0.41516D-09
+  3    0.18048D-34    0.18049D-34    0.48183D-39
+  4    0.20612D-08    0.20612D-08    0.51160D-16
+  5    0.45400D-04    0.45400D-04    0.34904D-13
+  6    0.13534D+00    0.13534D+00    0.23481D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        734 f-s =       1001 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.10058D-09
+  2    0.38850D-03    0.38850D-03    0.00000D+00
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        661 f-s =        900 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.46582D-09
+  2    0.40000D-01    0.40000D-01    0.41400D-10
+  3    0.40016D-01    0.40016D-01    0.38252D-10
+  4    0.40032D-01    0.40032D-01    0.37704D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        652 f-s =        881 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.33598D-10
+  2    0.40000D+00    0.40000D+00    0.29866D-10
+  3    0.41600D+00    0.41600D+00    0.30018D-10
+  4    0.43331D+00    0.43331D+00    0.32087D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        517 f-s =        704 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.24311D-10
+  2    0.10000D+01    0.10000D+01    0.54024D-10
+  3    0.10000D+01    0.10000D+01    0.98629D-10
+  4    0.10000D+01    0.10000D+01    0.19439D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        502 f-s =        678 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.12336D-10
+  2    0.10000D+01    0.10000D+01    0.27413D-10
+  3    0.10000D+01    0.10000D+01    0.54412D-10
+  4    0.10008D+01    0.10008D+01    0.10980D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        531 f-s =        856 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.64512D-08
+  2    0.10004D+01    0.10004D+01    0.49462D-08
+  3    0.10000D+01    0.10000D+01    0.16653D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        798 f-s =       1301 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.20236D-09
+  2    0.25166D+00    0.25166D+00    0.22844D-09
+  3    0.99707D+00    0.99707D+00    0.71006D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        868 f-s =       1206 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.15279D-10
+  2    0.56309D-02    0.56309D-02    0.29792D-13
+  3    0.10007D+01    0.10007D+01    0.42447D-10
+  4    0.65374D+00    0.65374D+00    0.15785D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        425 f-s =        642 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.14259D-08
+  2    0.98757D+00    0.98757D+00    0.10041D-08
+  3   -0.51035D+00   -0.51035D+00    0.15828D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        488 f-s =        815 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.73821D-08
+  2    0.99933D+00    0.99933D+00    0.87193D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        600 f-s =        902 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.10279D-09
+  2    0.99730D+00    0.99730D+00    0.69450D-09
+  3    0.10005D+01    0.10005D+01    0.21904D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        738 f-s =       1217 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20204D-08
+  2   -0.47171D-08   -0.72884D-12    0.47164D-08
+  3    0.33187D-08    0.15348D-11    0.33172D-08
+  4   -0.30893D-09   -0.10837D-11    0.30784D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        833 f-s =       1059 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.42937D-07
+  2    0.56344D-01    0.56344D-01    0.12702D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        622 f-s =        892 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.28092D-09
+  2    0.33231D-02    0.33231D-02    0.35613D-09
+  3    0.99911D+00    0.99911D+00    0.95209D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1125 f-s =       1528 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.25605D-10
+  2   -0.67797D+00   -0.67797D+00    0.24997D-10
+  3   -0.14548D-07   -0.14501D-07    0.47575D-10
+  4    0.13834D-07    0.13789D-07    0.45240D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        361 f-s =        556 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45176D-07
+  2    0.94674D+00    0.94674D+00    0.51007D-07
+  3    0.99777D+00    0.99777D+00    0.76560D-08
+  4    0.94183D+00    0.94183D+00    0.53505D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1520 f-s =       2561 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.78980D-09
+  2    0.15223D-03    0.15223D-03    0.13785D-11
+  3    0.99887D+00    0.99887D+00    0.78396D-09
+  4    0.32420D-02    0.32420D-02    0.11478D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        397 f-s =        505 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.43884D-09
+  2    0.52568D+00    0.52568D+00    0.58908D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        811 f-s =       1145 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39400D-11
+  2    0.23607D+00    0.23607D+00    0.33066D-10
+  3    0.20426D-04    0.20426D-04    0.99170D-12
+  4    0.99860D+00    0.99860D+00    0.11303D-09
+  5    0.99879D+00    0.99879D+00    0.21928D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2249 f-s =       3975 J-s =         88
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.18982D-09
+  2    0.72895D-03    0.72895D-03    0.64865D-09
+  3    0.96463D-04    0.96463D-04    0.48551D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        785 f-s =       1263 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.99548D-10
+  2    0.44958D+00    0.44958D+00    0.89333D-10
+  3    0.99988D+00    0.99988D+00    0.19868D-09
+  4    0.99949D+00    0.99949D+00    0.35020D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        712 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91982D-53
+  4    0.81954D-50    0.52358D-51    0.76719D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        736 f-s =        990 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.33713D-09
+  2    0.99999D+00    0.99999D+00    0.33711D-09
+  3    0.99999D+00    0.99999D+00    0.31429D-09
+  4    0.99999D+00    0.99999D+00    0.27895D-09
+  5    0.99999D+00    0.99999D+00    0.23509D-09
+  6    0.10000D+01    0.10000D+01    0.18597D-09
+  7    0.10000D+01    0.10000D+01    0.13470D-09
+  8    0.10000D+01    0.10000D+01    0.84278D-10
+  9    0.10000D+01    0.10000D+01    0.37459D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =        760 f-s =        908 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.14900D-11
+  2    0.13685D-01    0.13685D-01    0.15033D-10
+  3    0.19229D+00    0.19229D+00    0.21171D-09
+  4    0.13534D+00    0.13534D+00    0.15245D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96718D-30    0.19115D-41    0.96718D-30
+  4    0.36838D-45    0.22774D-54    0.36838D-45
+  5   -0.26040D-66    0.00000D+00    0.26040D-66
+  6   -0.24200D-87    0.00000D+00    0.24200D-87
+  7   -0.55396-112    0.00000D+00    0.55396-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36663-165    0.00000D+00    0.36663-165
+ 10   -0.13090-187    0.00000D+00    0.13090-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2933 f-s =       3230 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.98068D-09    0.10042D-08    0.23487D-10
+  2    0.16677D-08    0.20955D-08    0.42778D-09
+  3    0.22688-208    0.00000D+00    0.22688-208
+  4    0.19330-208   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31673D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16599D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1106 f-s =       1300 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.36453D-12    0.11886D-21    0.36453D-12
+  2    0.17240D-11   -0.23259D-21    0.17240D-11
+  3    0.97879D-35    0.15179D-34    0.53906D-35
+  4    0.20606D-08    0.20612D-08    0.55353D-12
+  5    0.45400D-04    0.45400D-04    0.33829D-09
+  6    0.13534D+00    0.13534D+00    0.29355D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4572 f-s =       5276 J-s =         83
+ Computed and reference solutions and absolute errors follow:
+  1   -0.26611D-08   -0.23669D-13    0.26610D-08
+  2    0.29670D-08    0.34489D-13    0.29670D-08
+  3    0.18048D-34    0.18049D-34    0.51038D-39
+  4    0.20612D-08    0.20612D-08    0.54134D-16
+  5    0.45400D-04    0.45400D-04    0.36945D-13
+  6    0.13534D+00    0.13534D+00    0.38886D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =        735 f-s =        888 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.25669D-09
+  2    0.38850D-03    0.38850D-03    0.59631D-18
+  3    0.40000D-03    0.40000D-03    0.37947D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        661 f-s =        796 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.46526D-09
+  2    0.40000D-01    0.40000D-01    0.41344D-10
+  3    0.40016D-01    0.40016D-01    0.38203D-10
+  4    0.40032D-01    0.40032D-01    0.37657D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        656 f-s =        783 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17842D-09
+  2    0.40000D+00    0.40000D+00    0.15859D-09
+  3    0.41600D+00    0.41600D+00    0.15941D-09
+  4    0.43331D+00    0.43331D+00    0.17040D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        517 f-s =        628 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18390D-10
+  2    0.10000D+01    0.10000D+01    0.40866D-10
+  3    0.10000D+01    0.10000D+01    0.74607D-10
+  4    0.10000D+01    0.10000D+01    0.14704D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        502 f-s =        602 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11045D-10
+  2    0.10000D+01    0.10000D+01    0.24545D-10
+  3    0.10000D+01    0.10000D+01    0.48720D-10
+  4    0.10008D+01    0.10008D+01    0.98313D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        609 f-s =        884 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.49973D-08
+  2    0.10004D+01    0.10004D+01    0.42783D-08
+  3    0.10000D+01    0.10000D+01    0.88818D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        723 f-s =       1013 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.78932D-09
+  2    0.25166D+00    0.25166D+00    0.84692D-09
+  3    0.99707D+00    0.99707D+00    0.27697D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        860 f-s =       1031 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.44877D-11
+  2    0.56309D-02    0.56309D-02    0.87482D-14
+  3    0.10007D+01    0.10007D+01    0.12460D-10
+  4    0.65374D+00    0.65374D+00    0.46343D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        427 f-s =        608 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.21289D-09
+  2    0.98757D+00    0.98757D+00    0.14992D-09
+  3   -0.51035D+00   -0.51035D+00    0.21946D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        584 f-s =        931 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.81062D-08
+  2    0.99933D+00    0.99933D+00    0.96201D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        624 f-s =        885 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.95356D-10
+  2    0.99730D+00    0.99730D+00    0.64428D-09
+  3    0.10005D+01    0.10005D+01    0.20329D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        635 f-s =        762 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.64038D-12
+  2    0.41518D-12   -0.72884D-12    0.11440D-11
+  3    0.18750D-13    0.15348D-11    0.15161D-11
+  4   -0.19988D-13   -0.10837D-11    0.10637D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =        835 f-s =        997 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.38996D-07
+  2    0.56344D-01    0.56344D-01    0.11220D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        638 f-s =        861 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.22850D-09
+  2    0.33231D-02    0.33231D-02    0.28821D-09
+  3    0.99911D+00    0.99911D+00    0.23672D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1122 f-s =       1337 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.39557D-10
+  2   -0.67797D+00   -0.67797D+00    0.38619D-10
+  3   -0.14574D-07   -0.14501D-07    0.73500D-10
+  4    0.13859D-07    0.13789D-07    0.69892D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        344 f-s =        449 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45480D-07
+  2    0.94674D+00    0.94674D+00    0.51370D-07
+  3    0.99777D+00    0.99777D+00    0.77284D-08
+  4    0.94183D+00    0.94183D+00    0.53885D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1496 f-s =       2279 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.44423D-09
+  2    0.15223D-03    0.15223D-03    0.83889D-12
+  3    0.99887D+00    0.99887D+00    0.44095D-09
+  4    0.32420D-02    0.32420D-02    0.69832D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        388 f-s =        470 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.15823D-08
+  2    0.52568D+00    0.52568D+00    0.21244D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        822 f-s =        960 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.28844D-10
+  3    0.20426D-04    0.20426D-04    0.99592D-12
+  4    0.99860D+00    0.99860D+00    0.98668D-10
+  5    0.99879D+00    0.99879D+00    0.28208D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2337 f-s =       3662 J-s =         50
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.10977D-09
+  2    0.72895D-03    0.72895D-03    0.10080D-08
+  3    0.96464D-04    0.96463D-04    0.86098D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        838 f-s =       1214 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.19531D-10
+  2    0.44958D+00    0.44958D+00    0.17528D-10
+  3    0.99988D+00    0.99988D+00    0.38982D-10
+  4    0.99949D+00    0.99949D+00    0.68912D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1012 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33879D-10
+  2    0.20613D-08    0.20612D-08    0.11426D-12
+  3   -0.18992D-65    0.28230D-55    0.28230D-55
+  4   -0.62485D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1039 f-s =       1337 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.37573D-10
+  2    0.99999D+00    0.99999D+00    0.37571D-10
+  3    0.99999D+00    0.99999D+00    0.35027D-10
+  4    0.99999D+00    0.99999D+00    0.31089D-10
+  5    0.99999D+00    0.99999D+00    0.26201D-10
+  6    0.10000D+01    0.10000D+01    0.20726D-10
+  7    0.10000D+01    0.10000D+01    0.15012D-10
+  8    0.10000D+01    0.10000D+01    0.93927D-11
+  9    0.10000D+01    0.10000D+01    0.41750D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1065 f-s =       1228 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10682D-11
+  2    0.13685D-01    0.13685D-01    0.10777D-10
+  3    0.19229D+00    0.19229D+00    0.15178D-09
+  4    0.13534D+00    0.13534D+00    0.10931D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24335D-11    0.12659D-13    0.24208D-11
+  3    0.12345D-37    0.19115D-41    0.12343D-37
+  4    0.29523D-57    0.22774D-54    0.22745D-54
+  5    0.62684D-84    0.00000D+00    0.62684D-84
+  6   -0.11731-113    0.00000D+00    0.11731-113
+  7    0.11346-145    0.00000D+00    0.11346-145
+  8    0.19356-182    0.00000D+00    0.19356-182
+  9    0.19884-214    0.00000D+00    0.19884-214
+ 10   -0.11014-247    0.00000D+00    0.11014-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4306 f-s =       4710 J-s =         78
+ Computed and reference solutions and absolute errors follow:
+  1    0.98291D-09    0.10042D-08    0.21257D-10
+  2    0.20197D-08    0.20955D-08    0.75796D-10
+  3    0.99714-304    0.00000D+00    0.99714-304
+  4   -0.51588-303   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89026D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1005 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23098D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84673D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1319 f-s =       1544 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28283D-11    0.11886D-21    0.28283D-11
+  2    0.15162D-10   -0.23259D-21    0.15162D-10
+  3    0.66178D-33    0.15179D-34    0.64660D-33
+  4    0.20612D-08    0.20612D-08    0.80782D-13
+  5    0.45400D-04    0.45400D-04    0.24207D-10
+  6    0.13534D+00    0.13534D+00    0.44176D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       5843 f-s =       6685 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.61144D-10   -0.23669D-13    0.61168D-10
+  2   -0.33637D-10    0.34489D-13    0.33671D-10
+  3    0.18048D-34    0.18049D-34    0.38115D-39
+  4    0.20612D-08    0.20612D-08    0.40848D-16
+  5    0.45400D-04    0.45400D-04    0.27917D-13
+  6    0.13534D+00    0.13534D+00    0.21094D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1070 f-s =       1229 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.61175D-11
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        936 f-s =       1090 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17755D-10
+  2    0.40000D-01    0.40000D-01    0.15782D-11
+  3    0.40016D-01    0.40016D-01    0.14581D-11
+  4    0.40032D-01    0.40032D-01    0.14371D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        923 f-s =       1070 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13406D-10
+  2    0.40000D+00    0.40000D+00    0.11917D-10
+  3    0.41600D+00    0.41600D+00    0.11978D-10
+  4    0.43331D+00    0.43331D+00    0.12803D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        736 f-s =        872 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14750D-11
+  2    0.10000D+01    0.10000D+01    0.32778D-11
+  3    0.10000D+01    0.10000D+01    0.59837D-11
+  4    0.10000D+01    0.10000D+01    0.11793D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        717 f-s =        831 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23572D-11
+  2    0.10000D+01    0.10000D+01    0.52387D-11
+  3    0.10000D+01    0.10000D+01    0.10399D-10
+  4    0.10008D+01    0.10008D+01    0.20983D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        732 f-s =       1029 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.87426D-09
+  2    0.10004D+01    0.10004D+01    0.69670D-09
+  3    0.10000D+01    0.10000D+01    0.77716D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        955 f-s =       1286 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.10964D-09
+  2    0.25166D+00    0.25166D+00    0.11435D-09
+  3    0.99707D+00    0.99707D+00    0.38472D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1186 f-s =       1393 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11409D-11
+  2    0.56309D-02    0.56309D-02    0.22326D-14
+  3    0.10007D+01    0.10007D+01    0.31697D-11
+  4    0.65374D+00    0.65374D+00    0.11756D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        590 f-s =        772 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.44199D-09
+  2    0.98757D+00    0.98757D+00    0.31127D-09
+  3   -0.51035D+00   -0.51035D+00    0.45865D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        734 f-s =       1088 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.11104D-08
+  2    0.99933D+00    0.99933D+00    0.12675D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        888 f-s =       1201 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13321D-10
+  2    0.99730D+00    0.99730D+00    0.90006D-10
+  3    0.10005D+01    0.10005D+01    0.28399D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1152 f-s =       2166 J-s =        159
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.29088D-13
+  2    0.18369D-12   -0.72884D-12    0.91254D-12
+  3    0.53709D-12    0.15348D-11    0.99772D-12
+  4    0.46617D-13   -0.10837D-11    0.11303D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1196 f-s =       1396 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.74475D-08
+  2    0.56344D-01    0.56344D-01    0.21201D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        821 f-s =       1072 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.24912D-10
+  2    0.33231D-02    0.33231D-02    0.31508D-10
+  3    0.99911D+00    0.99911D+00    0.19905D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1586 f-s =       1836 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.41381D-11
+  2   -0.67797D+00   -0.67797D+00    0.40404D-11
+  3   -0.14509D-07   -0.14501D-07    0.76892D-11
+  4    0.13796D-07    0.13789D-07    0.73123D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        475 f-s =        603 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45445D-07
+  2    0.94674D+00    0.94674D+00    0.51409D-07
+  3    0.99777D+00    0.99777D+00    0.78042D-08
+  4    0.94183D+00    0.94183D+00    0.53922D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2097 f-s =       3024 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.55779D-10
+  2    0.15223D-03    0.15223D-03    0.10559D-12
+  3    0.99887D+00    0.99887D+00    0.55367D-10
+  4    0.32420D-02    0.32420D-02    0.87901D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        560 f-s =        670 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.72901D-10
+  2    0.52568D+00    0.52568D+00    0.97876D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1184 f-s =       1373 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39397D-11
+  2    0.23607D+00    0.23607D+00    0.38058D-11
+  3    0.20426D-04    0.20426D-04    0.99366D-12
+  4    0.99860D+00    0.99860D+00    0.13018D-10
+  5    0.99879D+00    0.99879D+00    0.17744D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2972 f-s =       4407 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.16919D-10
+  2    0.72895D-03    0.72895D-03    0.27593D-10
+  3    0.96463D-04    0.96463D-04    0.74297D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1122 f-s =       1731 J-s =         52
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.61287D-10
+  2    0.44958D+00    0.44958D+00    0.54998D-10
+  3    0.99988D+00    0.99988D+00    0.12232D-09
+  4    0.99949D+00    0.99949D+00    0.21578D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1128 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33879D-10
+  2    0.20613D-08    0.20612D-08    0.11426D-12
+  3   -0.18973D-65    0.28230D-55    0.28230D-55
+  4   -0.62350D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1027 f-s =       1655 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.52035D-10
+  2    0.99999D+00    0.99999D+00    0.52032D-10
+  3    0.99999D+00    0.99999D+00    0.48510D-10
+  4    0.99999D+00    0.99999D+00    0.43055D-10
+  5    0.99999D+00    0.99999D+00    0.36286D-10
+  6    0.10000D+01    0.10000D+01    0.28703D-10
+  7    0.10000D+01    0.10000D+01    0.20790D-10
+  8    0.10000D+01    0.10000D+01    0.13008D-10
+  9    0.10000D+01    0.10000D+01    0.57818D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1065 f-s =       1400 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10568D-11
+  2    0.13685D-01    0.13685D-01    0.10662D-10
+  3    0.19229D+00    0.19229D+00    0.15016D-09
+  4    0.13534D+00    0.13534D+00    0.10814D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       2395 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27666D-09
+  2    0.24327D-11    0.12659D-13    0.24201D-11
+  3    0.12340D-37    0.19115D-41    0.12338D-37
+  4    0.29491D-57    0.22774D-54    0.22745D-54
+  5    0.62581D-84    0.00000D+00    0.62581D-84
+  6   -0.11707-113    0.00000D+00    0.11707-113
+  7    0.11343-145    0.00000D+00    0.11343-145
+  8    0.21349-182    0.00000D+00    0.21349-182
+  9    0.19806-214    0.00000D+00    0.19806-214
+ 10   -0.10979-247    0.00000D+00    0.10979-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4319 f-s =       5322 J-s =        114
+ Computed and reference solutions and absolute errors follow:
+  1    0.98287D-09    0.10042D-08    0.21301D-10
+  2    0.20178D-08    0.20955D-08    0.77682D-10
+  3   -0.73084-305    0.00000D+00    0.73084-305
+  4   -0.10316-303   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =       1136 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90068D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89031D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1203 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24509D-36   -0.10768D-27    0.10768D-27
+  2   -0.23094D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84665D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1319 f-s =       1832 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28304D-11    0.11886D-21    0.28304D-11
+  2    0.15161D-10   -0.23259D-21    0.15161D-10
+  3    0.66157D-33    0.15179D-34    0.64639D-33
+  4    0.20612D-08    0.20612D-08    0.80782D-13
+  5    0.45400D-04    0.45400D-04    0.24207D-10
+  6    0.13534D+00    0.13534D+00    0.44174D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       5858 f-s =       7996 J-s =        160
+ Computed and reference solutions and absolute errors follow:
+  1   -0.36005D-10   -0.23669D-13    0.35982D-10
+  2    0.42606D-10    0.34489D-13    0.42571D-10
+  3    0.18048D-34    0.18049D-34    0.40804D-39
+  4    0.20612D-08    0.20612D-08    0.43598D-16
+  5    0.45400D-04    0.45400D-04    0.29794D-13
+  6    0.13534D+00    0.13534D+00    0.33362D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1070 f-s =       1386 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.61119D-11
+  2    0.38850D-03    0.38850D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        936 f-s =       1235 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17735D-10
+  2    0.40000D-01    0.40000D-01    0.15765D-11
+  3    0.40016D-01    0.40016D-01    0.14565D-11
+  4    0.40032D-01    0.40032D-01    0.14356D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        923 f-s =       1208 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13312D-10
+  2    0.40000D+00    0.40000D+00    0.11833D-10
+  3    0.41600D+00    0.41600D+00    0.11894D-10
+  4    0.43331D+00    0.43331D+00    0.12713D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        737 f-s =        989 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14566D-11
+  2    0.10000D+01    0.10000D+01    0.32374D-11
+  3    0.10000D+01    0.10000D+01    0.59097D-11
+  4    0.10000D+01    0.10000D+01    0.11647D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        717 f-s =        948 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23602D-11
+  2    0.10000D+01    0.10000D+01    0.52449D-11
+  3    0.10000D+01    0.10000D+01    0.10411D-10
+  4    0.10008D+01    0.10008D+01    0.21008D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        659 f-s =        997 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.70994D-09
+  2    0.10004D+01    0.10004D+01    0.58146D-09
+  3    0.10000D+01    0.10000D+01    0.67724D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        938 f-s =       1408 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.83356D-12
+  2    0.25166D+00    0.25166D+00    0.90075D-11
+  3    0.99707D+00    0.99707D+00    0.29213D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1205 f-s =       1620 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.62994D-12
+  2    0.56309D-02    0.56309D-02    0.12308D-14
+  3    0.10007D+01    0.10007D+01    0.17435D-11
+  4    0.65374D+00    0.65374D+00    0.64726D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        582 f-s =        836 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.24584D-09
+  2    0.98757D+00    0.98757D+00    0.17314D-09
+  3   -0.51035D+00   -0.51035D+00    0.26183D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        678 f-s =       1053 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.13532D-08
+  2    0.99933D+00    0.99933D+00    0.15231D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        828 f-s =       1210 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12811D-10
+  2    0.99730D+00    0.99730D+00    0.86557D-10
+  3    0.10005D+01    0.10005D+01    0.27298D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1282 f-s =       4261 J-s =        291
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.74829D-13
+  2   -0.43158D-12   -0.72884D-12    0.29727D-12
+  3   -0.48417D-12    0.15348D-11    0.20190D-11
+  4    0.51647D-12   -0.10837D-11    0.16002D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1182 f-s =       1479 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.77815D-08
+  2    0.56344D-01    0.56344D-01    0.21912D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        763 f-s =       1045 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.15238D-10
+  2    0.33231D-02    0.33231D-02    0.19343D-10
+  3    0.99911D+00    0.99911D+00    0.57774D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1585 f-s =       2087 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.33972D-11
+  2   -0.67797D+00   -0.67797D+00    0.33171D-11
+  3   -0.14507D-07   -0.14501D-07    0.63126D-11
+  4    0.13795D-07    0.13789D-07    0.60030D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        495 f-s =        737 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45458D-07
+  2    0.94674D+00    0.94674D+00    0.51419D-07
+  3    0.99777D+00    0.99777D+00    0.78016D-08
+  4    0.94183D+00    0.94183D+00    0.53933D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2076 f-s =       3525 J-s =         74
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.50330D-10
+  2    0.15223D-03    0.15223D-03    0.96006D-13
+  3    0.99887D+00    0.99887D+00    0.49958D-10
+  4    0.32420D-02    0.32420D-02    0.79915D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        537 f-s =        683 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.12401D-09
+  2    0.52568D+00    0.52568D+00    0.16649D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1171 f-s =       1614 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.58559D-11
+  3    0.20426D-04    0.20426D-04    0.99349D-12
+  4    0.99860D+00    0.99860D+00    0.20022D-10
+  5    0.99879D+00    0.99879D+00    0.10825D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2723 f-s =       4382 J-s =        101
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.13152D-12
+  2    0.72895D-03    0.72895D-03    0.10936D-09
+  3    0.96463D-04    0.96463D-04    0.75740D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1128 f-s =       2140 J-s =         71
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.99475D-11
+  2    0.44958D+00    0.44958D+00    0.89269D-11
+  3    0.99988D+00    0.99988D+00    0.19853D-10
+  4    0.99949D+00    0.99949D+00    0.35016D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1012 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33879D-10
+  2    0.20613D-08    0.20612D-08    0.11426D-12
+  3   -0.18992D-65    0.28230D-55    0.28230D-55
+  4   -0.62485D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1039 f-s =       1337 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.37573D-10
+  2    0.99999D+00    0.99999D+00    0.37571D-10
+  3    0.99999D+00    0.99999D+00    0.35027D-10
+  4    0.99999D+00    0.99999D+00    0.31089D-10
+  5    0.99999D+00    0.99999D+00    0.26201D-10
+  6    0.10000D+01    0.10000D+01    0.20726D-10
+  7    0.10000D+01    0.10000D+01    0.15012D-10
+  8    0.10000D+01    0.10000D+01    0.93927D-11
+  9    0.10000D+01    0.10000D+01    0.41750D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1065 f-s =       1228 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10682D-11
+  2    0.13685D-01    0.13685D-01    0.10777D-10
+  3    0.19229D+00    0.19229D+00    0.15178D-09
+  4    0.13534D+00    0.13534D+00    0.10931D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24335D-11    0.12659D-13    0.24208D-11
+  3    0.12345D-37    0.19115D-41    0.12343D-37
+  4    0.29523D-57    0.22774D-54    0.22745D-54
+  5    0.62684D-84    0.00000D+00    0.62684D-84
+  6   -0.11731-113    0.00000D+00    0.11731-113
+  7    0.11346-145    0.00000D+00    0.11346-145
+  8    0.19356-182    0.00000D+00    0.19356-182
+  9    0.19884-214    0.00000D+00    0.19884-214
+ 10   -0.11014-247    0.00000D+00    0.11014-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4306 f-s =       4710 J-s =         78
+ Computed and reference solutions and absolute errors follow:
+  1    0.98291D-09    0.10042D-08    0.21257D-10
+  2    0.20197D-08    0.20955D-08    0.75796D-10
+  3    0.99714-304    0.00000D+00    0.99714-304
+  4   -0.51588-303   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89026D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1005 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23098D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84673D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1319 f-s =       1544 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1   -0.28283D-11    0.11886D-21    0.28283D-11
+  2    0.15162D-10   -0.23259D-21    0.15162D-10
+  3    0.66178D-33    0.15179D-34    0.64660D-33
+  4    0.20612D-08    0.20612D-08    0.80782D-13
+  5    0.45400D-04    0.45400D-04    0.24207D-10
+  6    0.13534D+00    0.13534D+00    0.44176D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       5843 f-s =       6685 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.61144D-10   -0.23669D-13    0.61168D-10
+  2   -0.33637D-10    0.34489D-13    0.33671D-10
+  3    0.18048D-34    0.18049D-34    0.38115D-39
+  4    0.20612D-08    0.20612D-08    0.40848D-16
+  5    0.45400D-04    0.45400D-04    0.27917D-13
+  6    0.13534D+00    0.13534D+00    0.21094D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1070 f-s =       1229 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.61175D-11
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        936 f-s =       1090 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.17755D-10
+  2    0.40000D-01    0.40000D-01    0.15782D-11
+  3    0.40016D-01    0.40016D-01    0.14581D-11
+  4    0.40032D-01    0.40032D-01    0.14371D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        923 f-s =       1070 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.13406D-10
+  2    0.40000D+00    0.40000D+00    0.11917D-10
+  3    0.41600D+00    0.41600D+00    0.11978D-10
+  4    0.43331D+00    0.43331D+00    0.12803D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =        736 f-s =        872 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.14750D-11
+  2    0.10000D+01    0.10000D+01    0.32778D-11
+  3    0.10000D+01    0.10000D+01    0.59837D-11
+  4    0.10000D+01    0.10000D+01    0.11793D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =        717 f-s =        831 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.23572D-11
+  2    0.10000D+01    0.10000D+01    0.52387D-11
+  3    0.10000D+01    0.10000D+01    0.10399D-10
+  4    0.10008D+01    0.10008D+01    0.20983D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        732 f-s =       1029 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.87426D-09
+  2    0.10004D+01    0.10004D+01    0.69670D-09
+  3    0.10000D+01    0.10000D+01    0.77716D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        955 f-s =       1286 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.10964D-09
+  2    0.25166D+00    0.25166D+00    0.11435D-09
+  3    0.99707D+00    0.99707D+00    0.38472D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1186 f-s =       1393 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11409D-11
+  2    0.56309D-02    0.56309D-02    0.22326D-14
+  3    0.10007D+01    0.10007D+01    0.31697D-11
+  4    0.65374D+00    0.65374D+00    0.11756D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        590 f-s =        772 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.44199D-09
+  2    0.98757D+00    0.98757D+00    0.31127D-09
+  3   -0.51035D+00   -0.51035D+00    0.45865D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        734 f-s =       1088 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.11104D-08
+  2    0.99933D+00    0.99933D+00    0.12675D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        888 f-s =       1201 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.13321D-10
+  2    0.99730D+00    0.99730D+00    0.90006D-10
+  3    0.10005D+01    0.10005D+01    0.28399D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1152 f-s =       2166 J-s =        159
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.29088D-13
+  2    0.18369D-12   -0.72884D-12    0.91254D-12
+  3    0.53709D-12    0.15348D-11    0.99772D-12
+  4    0.46617D-13   -0.10837D-11    0.11303D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1196 f-s =       1396 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.74475D-08
+  2    0.56344D-01    0.56344D-01    0.21201D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =        821 f-s =       1072 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.24912D-10
+  2    0.33231D-02    0.33231D-02    0.31508D-10
+  3    0.99911D+00    0.99911D+00    0.19905D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       1586 f-s =       1836 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.41381D-11
+  2   -0.67797D+00   -0.67797D+00    0.40404D-11
+  3   -0.14509D-07   -0.14501D-07    0.76892D-11
+  4    0.13796D-07    0.13789D-07    0.73123D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        475 f-s =        603 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45445D-07
+  2    0.94674D+00    0.94674D+00    0.51409D-07
+  3    0.99777D+00    0.99777D+00    0.78042D-08
+  4    0.94183D+00    0.94183D+00    0.53922D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2097 f-s =       3024 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.55779D-10
+  2    0.15223D-03    0.15223D-03    0.10559D-12
+  3    0.99887D+00    0.99887D+00    0.55367D-10
+  4    0.32420D-02    0.32420D-02    0.87901D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        560 f-s =        670 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.72901D-10
+  2    0.52568D+00    0.52568D+00    0.97876D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1184 f-s =       1373 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39397D-11
+  2    0.23607D+00    0.23607D+00    0.38058D-11
+  3    0.20426D-04    0.20426D-04    0.99366D-12
+  4    0.99860D+00    0.99860D+00    0.13018D-10
+  5    0.99879D+00    0.99879D+00    0.17744D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       2972 f-s =       4407 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.16919D-10
+  2    0.72895D-03    0.72895D-03    0.27593D-10
+  3    0.96463D-04    0.96463D-04    0.74297D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1122 f-s =       1731 J-s =         52
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.61287D-10
+  2    0.44958D+00    0.44958D+00    0.54998D-10
+  3    0.99988D+00    0.99988D+00    0.12232D-09
+  4    0.99949D+00    0.99949D+00    0.21578D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46255D-83    0.28230D-55    0.28230D-55
+  4   -0.54052D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1522 f-s =       1906 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13130D-10
+  2    0.99999D+00    0.99999D+00    0.13129D-10
+  3    0.99999D+00    0.99999D+00    0.12241D-10
+  4    0.99999D+00    0.99999D+00    0.10864D-10
+  5    0.99999D+00    0.99999D+00    0.91562D-11
+  6    0.10000D+01    0.10000D+01    0.72429D-11
+  7    0.10000D+01    0.10000D+01    0.52459D-11
+  8    0.10000D+01    0.10000D+01    0.32825D-11
+  9    0.10000D+01    0.10000D+01    0.14588D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1599 f-s =       1817 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.74685D-13
+  2    0.13685D-01    0.13685D-01    0.75383D-12
+  3    0.19229D+00    0.19229D+00    0.10612D-10
+  4    0.13534D+00    0.13534D+00    0.76071D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20549D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13241D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88157-109    0.00000D+00    0.88157-109
+  6   -0.91772-148    0.00000D+00    0.91772-148
+  7   -0.28131-190    0.00000D+00    0.28131-190
+  8    0.74089-237    0.00000D+00    0.74089-237
+  9   -0.38758-283    0.00000D+00    0.38758-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6205 f-s =       6767 J-s =        111
+ Computed and reference solutions and absolute errors follow:
+  1    0.99918D-09    0.10042D-08    0.49889D-11
+  2    0.20869D-08    0.20955D-08    0.86181D-11
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32339D-55    0.61813D-30    0.61813D-30
+  2    0.69701D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82189D-11
+  6    0.13534D+00    0.13534D+00    0.15064D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73959D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14458D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2001 f-s =       2293 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.12055D-20    0.11886D-21    0.10866D-20
+  2   -0.21641D-21   -0.23259D-21    0.16181D-22
+  3    0.20709D-34    0.15179D-34    0.55301D-35
+  4    0.20612D-08    0.20612D-08    0.22583D-13
+  5    0.45400D-04    0.45400D-04    0.66488D-11
+  6    0.13534D+00    0.13534D+00    0.14007D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7516 f-s =       8566 J-s =        132
+ Computed and reference solutions and absolute errors follow:
+  1    0.76836D-11   -0.23669D-13    0.77073D-11
+  2    0.90379D-11    0.34489D-13    0.90034D-11
+  3    0.18048D-34    0.18049D-34    0.37362D-39
+  4    0.20612D-08    0.20612D-08    0.40078D-16
+  5    0.45400D-04    0.45400D-04    0.27387D-13
+  6    0.13534D+00    0.13534D+00    0.16070D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1545 f-s =       1746 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.93085D-12
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1384 f-s =       1577 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35285D-11
+  2    0.40000D-01    0.40000D-01    0.31367D-12
+  3    0.40016D-01    0.40016D-01    0.28982D-12
+  4    0.40032D-01    0.40032D-01    0.28563D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1380 f-s =       1568 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11453D-11
+  2    0.40000D+00    0.40000D+00    0.10183D-11
+  3    0.41600D+00    0.41600D+00    0.10234D-11
+  4    0.43331D+00    0.43331D+00    0.10940D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =       1077 f-s =       1229 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.21816D-12
+  2    0.10000D+01    0.10000D+01    0.48517D-12
+  3    0.10000D+01    0.10000D+01    0.88574D-12
+  4    0.10000D+01    0.10000D+01    0.17458D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =       1016 f-s =       1165 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.38414D-12
+  2    0.10000D+01    0.10000D+01    0.85376D-12
+  3    0.10000D+01    0.10000D+01    0.16950D-11
+  4    0.10008D+01    0.10008D+01    0.34199D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        899 f-s =       1201 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.16629D-09
+  2    0.10004D+01    0.10004D+01    0.13723D-09
+  3    0.10000D+01    0.10000D+01    0.10769D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1263 f-s =       1607 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.14356D-10
+  2    0.25166D+00    0.25166D+00    0.15429D-10
+  3    0.99707D+00    0.99707D+00    0.50374D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1730 f-s =       1984 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.59996D-12
+  2    0.56309D-02    0.56309D-02    0.11657D-14
+  3    0.10007D+01    0.10007D+01    0.16707D-11
+  4    0.65374D+00    0.65374D+00    0.62239D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        804 f-s =       1022 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.59515D-10
+  2    0.98757D+00    0.98757D+00    0.41917D-10
+  3   -0.51035D+00   -0.51035D+00    0.62474D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        982 f-s =       1415 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.10775D-09
+  2    0.99933D+00    0.99933D+00    0.12467D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1142 f-s =       1445 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.15526D-11
+  2    0.99730D+00    0.99730D+00    0.10510D-10
+  3    0.10005D+01    0.10005D+01    0.33222D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1571 f-s =       2955 J-s =        224
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18097D-13
+  2    0.19761D-15   -0.72884D-12    0.72904D-12
+  3   -0.13069D-13    0.15348D-11    0.15479D-11
+  4    0.77866D-13   -0.10837D-11    0.11616D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1748 f-s =       1980 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.11759D-08
+  2    0.56344D-01    0.56344D-01    0.33888D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =       1064 f-s =       1241 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.65811D-11
+  2    0.33231D-02    0.33231D-02    0.83605D-11
+  3    0.99911D+00    0.99911D+00    0.18109D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       2282 f-s =       2599 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.47351D-12
+  2   -0.67797D+00   -0.67797D+00    0.46285D-12
+  3   -0.14502D-07   -0.14501D-07    0.87967D-12
+  4    0.13790D-07    0.13789D-07    0.83734D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        684 f-s =        834 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45448D-07
+  2    0.94674D+00    0.94674D+00    0.51423D-07
+  3    0.99777D+00    0.99777D+00    0.78154D-08
+  4    0.94183D+00    0.94183D+00    0.53935D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2913 f-s =       4059 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.69398D-11
+  2    0.15223D-03    0.15223D-03    0.13082D-13
+  3    0.99887D+00    0.99887D+00    0.68887D-11
+  4    0.32420D-02    0.32420D-02    0.10889D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        790 f-s =        905 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.11221D-10
+  2    0.52568D+00    0.52568D+00    0.15065D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1676 f-s =       1900 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.46063D-12
+  3    0.20426D-04    0.20426D-04    0.99394D-12
+  4    0.99860D+00    0.99860D+00    0.15975D-11
+  5    0.99879D+00    0.99879D+00    0.52112D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       3815 f-s =       5518 J-s =         74
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.25800D-11
+  2    0.72895D-03    0.72895D-03    0.18871D-10
+  3    0.96463D-04    0.96463D-04    0.15001D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1527 f-s =       2230 J-s =         66
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.15288D-11
+  2    0.44958D+00    0.44958D+00    0.13717D-11
+  3    0.99988D+00    0.99988D+00    0.30504D-11
+  4    0.99949D+00    0.99949D+00    0.52847D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1593 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46242D-83    0.28230D-55    0.28230D-55
+  4   -0.54030D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1522 f-s =       2383 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13253D-10
+  2    0.99999D+00    0.99999D+00    0.13253D-10
+  3    0.99999D+00    0.99999D+00    0.12356D-10
+  4    0.99999D+00    0.99999D+00    0.10966D-10
+  5    0.99999D+00    0.99999D+00    0.92423D-11
+  6    0.10000D+01    0.10000D+01    0.73107D-11
+  7    0.10000D+01    0.10000D+01    0.52953D-11
+  8    0.10000D+01    0.10000D+01    0.33132D-11
+  9    0.10000D+01    0.10000D+01    0.14726D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1594 f-s =       2049 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.77132D-13
+  2    0.13685D-01    0.13685D-01    0.77853D-12
+  3    0.19229D+00    0.19229D+00    0.10959D-10
+  4    0.13534D+00    0.13534D+00    0.78567D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       3321 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20558D-10
+  2    0.17335D-13    0.12659D-13    0.46762D-14
+  3    0.13322D-46    0.19115D-41    0.19115D-41
+  4   -0.20278D-75    0.22774D-54    0.22774D-54
+  5    0.89617-109    0.00000D+00    0.89617-109
+  6   -0.93169-148    0.00000D+00    0.93169-148
+  7   -0.28591-190    0.00000D+00    0.28591-190
+  8    0.75476-237    0.00000D+00    0.75476-237
+  9   -0.39278-283    0.00000D+00    0.39278-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6206 f-s =       7597 J-s =        159
+ Computed and reference solutions and absolute errors follow:
+  1    0.99914D-09    0.10042D-08    0.50289D-11
+  2    0.20868D-08    0.20955D-08    0.87121D-11
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1556 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32350D-55    0.61813D-30    0.61813D-30
+  2    0.72321D-56    0.89637D-30    0.89637D-30
+  3    0.19968D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27425D-13
+  5    0.45400D-04    0.45400D-04    0.82192D-11
+  6    0.13534D+00    0.13534D+00    0.15079D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1733 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73972D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14476D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2001 f-s =       2707 J-s =         54
+ Computed and reference solutions and absolute errors follow:
+  1    0.12046D-20    0.11886D-21    0.10857D-20
+  2   -0.21575D-21   -0.23259D-21    0.16845D-22
+  3    0.20708D-34    0.15179D-34    0.55297D-35
+  4    0.20612D-08    0.20612D-08    0.22582D-13
+  5    0.45400D-04    0.45400D-04    0.66484D-11
+  6    0.13534D+00    0.13534D+00    0.14004D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7542 f-s =      10206 J-s =        199
+ Computed and reference solutions and absolute errors follow:
+  1   -0.29241D-11   -0.23669D-13    0.29004D-11
+  2   -0.13519D-11    0.34489D-13    0.13864D-11
+  3    0.18048D-34    0.18049D-34    0.38737D-39
+  4    0.20612D-08    0.20612D-08    0.41425D-16
+  5    0.45400D-04    0.45400D-04    0.28309D-13
+  6    0.13534D+00    0.13534D+00    0.27200D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1545 f-s =       1987 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.99169D-12
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1384 f-s =       1759 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35303D-11
+  2    0.40000D-01    0.40000D-01    0.31382D-12
+  3    0.40016D-01    0.40016D-01    0.28996D-12
+  4    0.40032D-01    0.40032D-01    0.28579D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1380 f-s =       1761 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11335D-11
+  2    0.40000D+00    0.40000D+00    0.10078D-11
+  3    0.41600D+00    0.41600D+00    0.10129D-11
+  4    0.43331D+00    0.43331D+00    0.10827D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =       1077 f-s =       1386 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.20806D-12
+  2    0.10000D+01    0.10000D+01    0.46307D-12
+  3    0.10000D+01    0.10000D+01    0.84499D-12
+  4    0.10000D+01    0.10000D+01    0.16659D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =       1016 f-s =       1310 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.38780D-12
+  2    0.10000D+01    0.10000D+01    0.86198D-12
+  3    0.10000D+01    0.10000D+01    0.17111D-11
+  4    0.10008D+01    0.10008D+01    0.34526D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        840 f-s =       1197 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.17895D-09
+  2    0.10004D+01    0.10004D+01    0.14742D-09
+  3    0.10000D+01    0.10000D+01    0.82157D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1220 f-s =       1737 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41698D-11
+  2    0.25166D+00    0.25166D+00    0.46828D-11
+  3    0.99707D+00    0.99707D+00    0.14628D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1733 f-s =       2263 J-s =         54
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.16687D-12
+  2    0.56309D-02    0.56309D-02    0.32439D-15
+  3    0.10007D+01    0.10007D+01    0.46252D-12
+  4    0.65374D+00    0.65374D+00    0.17231D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        765 f-s =       1056 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.13749D-10
+  2    0.98757D+00    0.98757D+00    0.96855D-11
+  3   -0.51035D+00   -0.51035D+00    0.14220D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        962 f-s =       1424 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.10145D-09
+  2    0.99933D+00    0.99933D+00    0.11902D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1130 f-s =       1584 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12150D-11
+  2    0.99730D+00    0.99730D+00    0.82102D-11
+  3    0.10005D+01    0.10005D+01    0.25897D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1464 f-s =       2848 J-s =        137
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.99920D-14
+  2    0.64947D-14   -0.72884D-12    0.73534D-12
+  3   -0.33558D-13    0.15348D-11    0.15684D-11
+  4   -0.40810D-13   -0.10837D-11    0.10429D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1758 f-s =       2138 J-s =         53
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.12933D-08
+  2    0.56344D-01    0.56344D-01    0.36666D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =       1071 f-s =       1371 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.43286D-11
+  2    0.33231D-02    0.33231D-02    0.55044D-11
+  3    0.99911D+00    0.99911D+00    0.72027D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       2282 f-s =       2960 J-s =         67
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.41134D-12
+  2   -0.67797D+00   -0.67797D+00    0.40157D-12
+  3   -0.14502D-07   -0.14501D-07    0.76457D-12
+  4    0.13790D-07    0.13789D-07    0.72659D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        675 f-s =        940 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45448D-07
+  2    0.94674D+00    0.94674D+00    0.51423D-07
+  3    0.99777D+00    0.99777D+00    0.78150D-08
+  4    0.94183D+00    0.94183D+00    0.53936D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2719 f-s =       4306 J-s =         89
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.83380D-11
+  2    0.15223D-03    0.15223D-03    0.15712D-13
+  3    0.99887D+00    0.99887D+00    0.82765D-11
+  4    0.32420D-02    0.32420D-02    0.13079D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        780 f-s =        961 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.15206D-10
+  2    0.52568D+00    0.52568D+00    0.20416D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1661 f-s =       2216 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39389D-11
+  2    0.23607D+00    0.23607D+00    0.35250D-14
+  3    0.20426D-04    0.20426D-04    0.99373D-12
+  4    0.99860D+00    0.99860D+00    0.34417D-14
+  5    0.99879D+00    0.99879D+00    0.48481D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       3656 f-s =       5767 J-s =        125
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.17266D-11
+  2    0.72895D-03    0.72895D-03    0.58819D-11
+  3    0.96463D-04    0.96463D-04    0.15722D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1558 f-s =       3010 J-s =        114
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.27719D-10
+  2    0.44958D+00    0.44958D+00    0.24875D-10
+  3    0.99988D+00    0.99988D+00    0.55322D-10
+  4    0.99949D+00    0.99949D+00    0.97655D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46255D-83    0.28230D-55    0.28230D-55
+  4   -0.54052D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =   1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1522 f-s =       1906 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D+00    0.99999D+00    0.13130D-10
+  2    0.99999D+00    0.99999D+00    0.13129D-10
+  3    0.99999D+00    0.99999D+00    0.12241D-10
+  4    0.99999D+00    0.99999D+00    0.10864D-10
+  5    0.99999D+00    0.99999D+00    0.91562D-11
+  6    0.10000D+01    0.10000D+01    0.72429D-11
+  7    0.10000D+01    0.10000D+01    0.52459D-11
+  8    0.10000D+01    0.10000D+01    0.32825D-11
+  9    0.10000D+01    0.10000D+01    0.14588D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.12788D+00
+    0.10000D+01
+ Steps =       1599 f-s =       1817 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.74685D-13
+  2    0.13685D-01    0.13685D-01    0.75383D-12
+  3    0.19229D+00    0.19229D+00    0.10612D-10
+  4    0.13534D+00    0.13534D+00    0.76071D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20549D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13241D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88157-109    0.00000D+00    0.88157-109
+  6   -0.91772-148    0.00000D+00    0.91772-148
+  7   -0.28131-190    0.00000D+00    0.28131-190
+  8    0.74089-237    0.00000D+00    0.74089-237
+  9   -0.38758-283    0.00000D+00    0.38758-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6205 f-s =       6767 J-s =        111
+ Computed and reference solutions and absolute errors follow:
+  1    0.99918D-09    0.10042D-08    0.49889D-11
+  2    0.20869D-08    0.20955D-08    0.86181D-11
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.18767D-79    0.18767D-79
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32339D-55    0.61813D-30    0.61813D-30
+  2    0.69701D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82189D-11
+  6    0.13534D+00    0.13534D+00    0.15064D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73959D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14458D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2001 f-s =       2293 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.12055D-20    0.11886D-21    0.10866D-20
+  2   -0.21641D-21   -0.23259D-21    0.16181D-22
+  3    0.20709D-34    0.15179D-34    0.55301D-35
+  4    0.20612D-08    0.20612D-08    0.22583D-13
+  5    0.45400D-04    0.45400D-04    0.66488D-11
+  6    0.13534D+00    0.13534D+00    0.14007D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76336D+00
+    0.89286D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7516 f-s =       8566 J-s =        132
+ Computed and reference solutions and absolute errors follow:
+  1    0.76836D-11   -0.23669D-13    0.77073D-11
+  2    0.90379D-11    0.34489D-13    0.90034D-11
+  3    0.18048D-34    0.18049D-34    0.37362D-39
+  4    0.20612D-08    0.20612D-08    0.40078D-16
+  5    0.45400D-04    0.45400D-04    0.27387D-13
+  6    0.13534D+00    0.13534D+00    0.16070D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.98039D+00
+    0.97087D+00
+    0.10000D+01
+    0.10000D+01
+ Steps =       1545 f-s =       1746 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.39247D-03    0.39247D-03    0.93085D-12
+  2    0.38850D-03    0.38850D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1384 f-s =       1577 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.35285D-11
+  2    0.40000D-01    0.40000D-01    0.31367D-12
+  3    0.40016D-01    0.40016D-01    0.28982D-12
+  4    0.40032D-01    0.40032D-01    0.28563D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1380 f-s =       1568 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.11453D-11
+  2    0.40000D+00    0.40000D+00    0.10183D-11
+  3    0.41600D+00    0.41600D+00    0.10234D-11
+  4    0.43331D+00    0.43331D+00    0.10940D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.25000D+00
+    0.50000D-01
+    0.23810D-02
+ Steps =       1077 f-s =       1229 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.21816D-12
+  2    0.10000D+01    0.10000D+01    0.48517D-12
+  3    0.10000D+01    0.10000D+01    0.88574D-12
+  4    0.10000D+01    0.10000D+01    0.17458D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.50000D+00
+    0.12500D+00
+    0.73529D-02
+    0.26954D-04
+ Steps =       1016 f-s =       1165 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.38414D-12
+  2    0.10000D+01    0.10000D+01    0.85376D-12
+  3    0.10000D+01    0.10000D+01    0.16950D-11
+  4    0.10008D+01    0.10008D+01    0.34199D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        899 f-s =       1201 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.99741D+00    0.99741D+00    0.16629D-09
+  2    0.10004D+01    0.10004D+01    0.13723D-09
+  3    0.10000D+01    0.10000D+01    0.10769D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1263 f-s =       1607 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.14356D-10
+  2    0.25166D+00    0.25166D+00    0.15429D-10
+  3    0.99707D+00    0.99707D+00    0.50374D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1730 f-s =       1984 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.59996D-12
+  2    0.56309D-02    0.56309D-02    0.11657D-14
+  3    0.10007D+01    0.10007D+01    0.16707D-11
+  4    0.65374D+00    0.65374D+00    0.62239D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.70423D+00
+    0.00000D+00
+ Steps =        804 f-s =       1022 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.59515D-10
+  2    0.98757D+00    0.98757D+00    0.41917D-10
+  3   -0.51035D+00   -0.51035D+00    0.62474D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        982 f-s =       1415 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99964D+00   -0.99964D+00    0.10775D-09
+  2    0.99933D+00    0.99933D+00    0.12467D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1142 f-s =       1445 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.15526D-11
+  2    0.99730D+00    0.99730D+00    0.10510D-10
+  3    0.10005D+01    0.10005D+01    0.33222D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1571 f-s =       2955 J-s =        224
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+01    0.10000D+01    0.18097D-13
+  2    0.19761D-15   -0.72884D-12    0.72904D-12
+  3   -0.13069D-13    0.15348D-11    0.15479D-11
+  4    0.77866D-13   -0.10837D-11    0.11616D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.99010D+00
+    0.00000D+00
+ Steps =       1748 f-s =       1980 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1   -0.57361D+00   -0.57361D+00    0.11759D-08
+  2    0.56344D-01    0.56344D-01    0.33888D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.61350D+00
+    0.62500D+00
+    0.00000D+00
+ Steps =       1064 f-s =       1241 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.26092D-02    0.26092D-02    0.65811D-11
+  2    0.33231D-02    0.33231D-02    0.83605D-11
+  3    0.99911D+00    0.99911D+00    0.18109D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.67797D-01
+   -0.64516D-01
+   -0.61350D-01
+ Steps =       2282 f-s =       2599 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.69444D+00    0.69444D+00    0.47351D-12
+  2   -0.67797D+00   -0.67797D+00    0.46285D-12
+  3   -0.14502D-07   -0.14501D-07    0.87967D-12
+  4    0.13790D-07    0.13789D-07    0.83734D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        684 f-s =        834 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.91936D+00    0.91936D+00    0.45448D-07
+  2    0.94674D+00    0.94674D+00    0.51423D-07
+  3    0.99777D+00    0.99777D+00    0.78154D-08
+  4    0.94183D+00    0.94183D+00    0.53935D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.62893D+00
+    0.00000D+00
+    0.49587D+00
+    0.10000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2913 f-s =       4059 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.10009D+01    0.10009D+01    0.69398D-11
+  2    0.15223D-03    0.15223D-03    0.13082D-13
+  3    0.99887D+00    0.99887D+00    0.68887D-11
+  4    0.32420D-02    0.32420D-02    0.10889D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =   1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        790 f-s =        905 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.11221D-10
+  2    0.52568D+00    0.52568D+00    0.15065D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1676 f-s =       1900 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.80902D-07    0.80898D-07    0.39396D-11
+  2    0.23607D+00    0.23607D+00    0.46063D-12
+  3    0.20426D-04    0.20426D-04    0.99394D-12
+  4    0.99860D+00    0.99860D+00    0.15975D-11
+  5    0.99879D+00    0.99879D+00    0.52112D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =   1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33898D-04
+    0.62147D-03
+    0.12780D-03
+ Nonnegativity will be enforced for this problem.
+ Steps =       3815 f-s =       5518 J-s =         74
+ Computed and reference solutions and absolute errors follow:
+  1    0.37443D-04    0.37443D-04    0.25800D-11
+  2    0.72895D-03    0.72895D-03    0.18871D-10
+  3    0.96463D-04    0.96463D-04    0.15001D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will be scaled.
+  The ODEs will be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =   1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10015D+01
+    0.10001D+01
+    0.26527D+00
+    0.98220D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1527 f-s =       2230 J-s =         66
+ Computed and reference solutions and absolute errors follow:
+  1    0.50999D+00    0.50999D+00    0.15288D-11
+  2    0.44958D+00    0.44958D+00    0.13717D-11
+  3    0.99988D+00    0.99988D+00    0.30504D-11
+  4    0.99949D+00    0.99949D+00    0.52847D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+
+
+                     Results for ITOL =   5
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    5          1    0.32471D-05    0.32471D-05    0.32471D-05
+    5          2    0.56583D-06    0.57517D-06    0.56583D-06
+    5          3    0.20977D-05    0.20731D-05    0.20977D-05
+    5          4    0.35755D-04    0.35755D-04    0.35755D-04
+    5         11    0.58719D-04    0.58718D-04    0.58719D-04
+    5         12    0.25783D-05    0.25783D-05    0.25783D-05
+    5         13    0.36548D-06    0.36548D-06    0.36548D-06
+    5         14    0.24517D-04    0.24517D-04    0.24517D-04
+    5         15    0.16206D-04    0.16213D-04    0.16206D-04
+    5         21    0.20165D-04    0.20198D-05    0.20165D-04
+    5         22    0.28851D-06    0.38024D-05    0.28851D-06
+    5         23    0.30005D-05    0.74788D-06    0.30005D-05
+    5         24    0.23606D-05    0.21360D-05    0.23606D-05
+    5         25    0.67400D-06    0.11033D-04    0.67400D-06
+    5         31    0.84092D-04    0.83931D-04    0.84092D-04
+    5         32    0.97897D-05    0.50011D-04    0.97897D-05
+    5         33    0.76936D-06    0.45641D-06    0.76936D-06
+    5         34    0.15211D-04    0.23338D-04    0.15211D-04
+    5         35    0.55601D-04    0.25685D-03    0.55601D-04
+    5         36    0.52139D-05    0.82648D-05    0.52139D-05
+    5         41    0.12415D-05    0.40731D-08    0.12415D-05
+    5         42    0.59786D-03    0.68611D-03    0.59786D-03
+    5         43    0.35648D-04    0.18213D-04    0.35648D-04
+    5         44    0.11306D-04    0.18660D-06    0.11306D-04
+    5         45    0.18855D-04    0.54950D-05    0.18855D-04
+    5         51    0.83831D-05    0.75494D-05    0.83831D-05
+    5         52    0.12492D-04    0.12438D-04    0.12492D-04
+    5         53    0.92601D-05    0.36554D-04    0.92601D-05
+    5         54    0.96101D-05    0.65989D-05    0.96101D-05
+    5         55    0.11483D-08    0.10778D-08    0.11483D-08
+
+
+                     Results for ITOL =   6
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    6          1    0.30490D-06    0.30487D-06    0.30490D-06
+    6          2    0.23459D-05    0.42008D-05    0.23459D-05
+    6          3    0.99705D-06    0.12082D-05    0.99705D-06
+    6          4    0.76940D-06    0.76940D-06    0.76940D-06
+    6         11    0.19333D-04    0.19333D-04    0.19333D-04
+    6         12    0.21619D-05    0.21619D-05    0.21619D-05
+    6         13    0.20675D-05    0.20675D-05    0.20675D-05
+    6         14    0.12312D-05    0.12312D-05    0.12312D-05
+    6         15    0.22340D-04    0.22377D-04    0.22340D-04
+    6         21    0.20967D-06    0.53735D-06    0.20967D-06
+    6         22    0.55706D-07    0.19179D-05    0.55706D-07
+    6         23    0.37237D-07    0.36350D-06    0.37237D-07
+    6         24    0.24967D-06    0.62205D-06    0.24967D-06
+    6         25    0.83501D-06    0.29749D-07    0.83501D-06
+    6         31    0.11011D-04    0.28008D-04    0.11011D-04
+    6         32    0.15280D-05    0.16040D-05    0.15280D-05
+    6         33    0.41396D-06    0.46576D-05    0.41396D-06
+    6         34    0.79359D-06    0.41703D-05    0.79359D-06
+    6         35    0.47709D-04    0.91243D-05    0.47709D-04
+    6         36    0.14298D-05    0.35034D-05    0.14298D-05
+    6         41    0.72615D-07    0.93984D-08    0.72615D-07
+    6         42    0.37357D-04    0.11643D-03    0.37357D-04
+    6         43    0.10902D-04    0.10473D-04    0.10902D-04
+    6         44    0.82709D-06    0.17780D-06    0.82709D-06
+    6         45    0.19244D-05    0.15627D-05    0.19244D-05
+    6         51    0.34351D-05    0.85278D-06    0.34351D-05
+    6         52    0.68569D-05    0.69553D-05    0.68569D-05
+    6         53    0.17257D-05    0.55420D-06    0.17257D-05
+    6         54    0.15970D-05    0.30389D-05    0.15970D-05
+    6         55    0.11877D-10    0.15185D-09    0.11877D-10
+
+
+                     Results for ITOL =   7
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    7          1    0.17939D-06    0.17939D-06    0.17939D-06
+    7          2    0.91142D-07    0.95234D-07    0.91142D-07
+    7          3    0.51101D-07    0.49417D-07    0.51101D-07
+    7          4    0.13268D-06    0.13268D-06    0.13268D-06
+    7         11    0.58269D-06    0.58274D-06    0.58269D-06
+    7         12    0.12318D-06    0.12318D-06    0.12318D-06
+    7         13    0.11735D-06    0.11735D-06    0.11735D-06
+    7         14    0.88396D-07    0.88396D-07    0.88396D-07
+    7         15    0.20088D-05    0.20087D-05    0.20088D-05
+    7         21    0.26281D-07    0.49625D-08    0.26281D-07
+    7         22    0.42538D-07    0.49236D-07    0.42538D-07
+    7         23    0.75664D-07    0.91194D-07    0.75664D-07
+    7         24    0.66996D-07    0.35457D-06    0.66996D-07
+    7         25    0.18149D-07    0.46698D-06    0.18149D-07
+    7         31    0.19719D-05    0.18508D-05    0.19719D-05
+    7         32    0.48861D-06    0.18750D-05    0.48861D-06
+    7         33    0.31548D-11    0.10500D-07    0.31548D-11
+    7         34    0.10017D-05    0.94863D-06    0.10017D-05
+    7         35    0.40834D-05    0.92703D-06    0.40834D-05
+    7         36    0.35102D-06    0.16951D-06    0.35102D-06
+    7         41    0.11289D-08    0.16620D-08    0.11289D-08
+    7         42    0.89271D-05    0.11627D-04    0.89271D-05
+    7         43    0.46789D-06    0.41417D-06    0.46789D-06
+    7         44    0.18802D-07    0.22905D-07    0.18802D-07
+    7         45    0.43258D-06    0.41049D-06    0.43258D-06
+    7         51    0.24681D-06    0.11446D-06    0.24681D-06
+    7         52    0.71038D-06    0.84761D-07    0.71038D-06
+    7         53    0.19027D-06    0.59935D-09    0.19027D-06
+    7         54    0.26064D-06    0.36883D-06    0.26064D-06
+    7         55    0.33382D-09    0.11474D-09    0.33382D-09
+
+
+                     Results for ITOL =   8
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    8          1    0.10373D-07    0.10373D-07    0.10373D-07
+    8          2    0.24812D-07    0.11087D-07    0.24812D-07
+    8          3    0.63728D-07    0.63731D-07    0.63728D-07
+    8          4    0.81042D-08    0.81042D-08    0.81042D-08
+    8         11    0.16172D-06    0.16040D-06    0.16172D-06
+    8         12    0.20557D-07    0.20557D-07    0.20557D-07
+    8         13    0.16174D-07    0.16174D-07    0.16174D-07
+    8         14    0.10211D-07    0.10211D-07    0.10211D-07
+    8         15    0.42399D-06    0.40166D-06    0.42399D-06
+    8         21    0.18517D-08    0.18530D-08    0.18517D-08
+    8         22    0.58869D-08    0.60484D-08    0.58869D-08
+    8         23    0.47449D-08    0.32007D-08    0.47449D-08
+    8         24    0.34084D-07    0.11561D-07    0.34084D-07
+    8         25    0.80857D-08    0.59000D-07    0.80857D-08
+    8         31    0.24683D-06    0.87601D-07    0.24683D-06
+    8         32    0.31120D-06    0.13234D-06    0.31120D-06
+    8         33    0.39360D-08    0.83857D-09    0.39360D-08
+    8         34    0.81210D-07    0.13884D-06    0.81210D-07
+    8         35    0.70299D-06    0.82563D-06    0.70299D-06
+    8         36    0.28867D-07    0.11512D-06    0.28867D-07
+    8         41    0.42974D-09    0.76380D-08    0.42974D-09
+    8         42    0.93642D-06    0.13736D-05    0.93642D-06
+    8         43    0.18497D-07    0.45459D-07    0.18497D-07
+    8         44    0.24400D-08    0.76607D-08    0.24400D-08
+    8         45    0.18415D-07    0.42365D-07    0.18415D-07
+    8         51    0.35524D-07    0.50334D-07    0.35524D-07
+    8         52    0.72659D-07    0.14764D-07    0.72659D-07
+    8         53    0.60485D-07    0.24813D-07    0.60485D-07
+    8         54    0.80383D-07    0.10454D-06    0.80383D-07
+    8         55    0.16738D-09    0.57834D-09    0.16738D-09
+
+
+                     Results for ITOL =   9
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    9          1    0.20958D-08    0.20958D-08    0.20958D-08
+    9          2    0.14111D-08    0.22225D-08    0.14111D-08
+    9          3    0.87620D-08    0.87621D-08    0.87620D-08
+    9          4    0.36942D-09    0.36942D-09    0.36942D-09
+    9         11    0.33785D-08    0.35969D-08    0.33785D-08
+    9         12    0.22293D-08    0.22293D-08    0.22293D-08
+    9         13    0.16949D-08    0.16949D-08    0.16949D-08
+    9         14    0.42677D-08    0.42677D-08    0.42677D-08
+    9         15    0.28967D-07    0.28919D-07    0.28967D-07
+    9         21    0.21201D-08    0.21699D-08    0.21201D-08
+    9         22    0.63349D-09    0.63783D-09    0.63349D-09
+    9         23    0.48844D-09    0.47465D-09    0.48844D-09
+    9         24    0.12549D-08    0.58490D-08    0.12549D-08
+    9         25    0.48575D-08    0.47376D-08    0.48575D-08
+    9         31    0.55273D-08    0.23834D-07    0.55273D-08
+    9         32    0.11917D-07    0.76346D-08    0.11917D-07
+    9         33    0.97980D-09    0.33663D-09    0.97980D-09
+    9         34    0.11512D-07    0.12067D-07    0.11512D-07
+    9         35    0.42170D-07    0.71500D-07    0.42170D-07
+    9         36    0.25184D-08    0.25749D-08    0.25184D-08
+    9         41    0.44010D-12    0.22286D-11    0.44010D-12
+    9         42    0.40208D-06    0.24234D-06    0.40208D-06
+    9         43    0.25372D-07    0.87503D-08    0.25372D-07
+    9         44    0.17375D-08    0.91936D-10    0.17375D-08
+    9         45    0.50265D-07    0.51484D-07    0.50265D-07
+    9         51    0.33201D-08    0.47336D-08    0.33201D-08
+    9         52    0.94341D-08    0.61490D-08    0.94341D-08
+    9         53    0.28972D-07    0.25205D-08    0.28972D-07
+    9         54    0.15844D-08    0.59517D-08    0.15844D-08
+    9         55    0.51192D-09    0.98173D-09    0.51192D-09
+
+
+                     Results for ITOL =  10
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   10          1    0.33624D-09    0.33624D-09    0.33624D-09
+   10          2    0.33713D-09    0.33385D-09    0.33713D-09
+   10          3    0.21171D-09    0.21173D-09    0.21171D-09
+   10          4    0.54749D-09    0.54749D-09    0.54749D-09
+   10         11    0.42778D-09    0.40296D-09    0.42778D-09
+   10         12    0.36754D-09    0.36754D-09    0.36754D-09
+   10         13    0.32141D-09    0.32141D-09    0.32141D-09
+   10         14    0.33829D-09    0.33829D-09    0.33829D-09
+   10         15    0.29670D-08    0.41516D-09    0.29670D-08
+   10         21    0.25669D-09    0.10058D-09    0.25669D-09
+   10         22    0.46526D-09    0.46582D-09    0.46526D-09
+   10         23    0.17842D-09    0.33598D-10    0.17842D-09
+   10         24    0.14704D-09    0.19439D-09    0.14704D-09
+   10         25    0.98313D-10    0.10980D-09    0.98313D-10
+   10         31    0.49973D-08    0.64512D-08    0.49973D-08
+   10         32    0.27697D-08    0.71006D-09    0.27697D-08
+   10         33    0.12460D-10    0.42447D-10    0.12460D-10
+   10         34    0.21946D-09    0.15828D-08    0.21946D-09
+   10         35    0.96201D-08    0.87193D-08    0.96201D-08
+   10         36    0.64428D-09    0.69450D-09    0.64428D-09
+   10         41    0.15161D-11    0.47164D-08    0.15161D-11
+   10         42    0.38996D-07    0.42937D-07    0.38996D-07
+   10         43    0.23672D-08    0.95209D-09    0.23672D-08
+   10         44    0.73500D-10    0.47575D-10    0.73500D-10
+   10         45    0.53885D-07    0.53505D-07    0.53885D-07
+   10         51    0.44423D-09    0.78980D-09    0.44423D-09
+   10         52    0.21244D-08    0.58908D-09    0.21244D-08
+   10         53    0.98668D-10    0.11303D-09    0.98668D-10
+   10         54    0.10080D-08    0.64865D-09    0.10080D-08
+   10         55    0.38982D-10    0.19868D-09    0.38982D-10
+
+
+                     Results for ITOL =  11
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   11          1    0.33879D-10    0.33879D-10    0.33879D-10
+   11          2    0.37573D-10    0.52035D-10    0.37573D-10
+   11          3    0.15178D-09    0.15016D-09    0.15178D-09
+   11          4    0.27668D-09    0.27666D-09    0.27668D-09
+   11         11    0.75796D-10    0.77682D-10    0.75796D-10
+   11         12    0.52756D-10    0.52756D-10    0.52756D-10
+   11         13    0.50269D-10    0.50269D-10    0.50269D-10
+   11         14    0.24207D-10    0.24207D-10    0.24207D-10
+   11         15    0.61168D-10    0.42571D-10    0.61168D-10
+   11         21    0.61175D-11    0.61119D-11    0.61175D-11
+   11         22    0.17755D-10    0.17735D-10    0.17755D-10
+   11         23    0.13406D-10    0.13312D-10    0.13406D-10
+   11         24    0.11793D-10    0.11647D-10    0.11793D-10
+   11         25    0.20983D-10    0.21008D-10    0.20983D-10
+   11         31    0.87426D-09    0.70994D-09    0.87426D-09
+   11         32    0.38472D-09    0.90075D-11    0.38472D-09
+   11         33    0.31697D-11    0.17435D-11    0.31697D-11
+   11         34    0.45865D-09    0.26183D-09    0.45865D-09
+   11         35    0.12675D-08    0.15231D-08    0.12675D-08
+   11         36    0.90006D-10    0.86557D-10    0.90006D-10
+   11         41    0.11303D-11    0.20190D-11    0.11303D-11
+   11         42    0.74475D-08    0.77815D-08    0.74475D-08
+   11         43    0.19905D-09    0.57774D-10    0.19905D-09
+   11         44    0.76892D-11    0.63126D-11    0.76892D-11
+   11         45    0.53922D-07    0.53933D-07    0.53922D-07
+   11         51    0.55779D-10    0.50330D-10    0.55779D-10
+   11         52    0.97876D-10    0.16649D-09    0.97876D-10
+   11         53    0.13018D-10    0.20022D-10    0.13018D-10
+   11         54    0.74297D-10    0.10936D-09    0.74297D-10
+   11         55    0.12232D-09    0.19853D-10    0.12232D-09
+
+
+                     Results for ITOL =  12
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   12          1    0.68578D-11    0.68578D-11    0.68578D-11
+   12          2    0.13130D-10    0.13253D-10    0.13130D-10
+   12          3    0.10612D-10    0.10959D-10    0.10612D-10
+   12          4    0.20549D-10    0.20558D-10    0.20549D-10
+   12         11    0.86181D-11    0.87121D-11    0.86181D-11
+   12         12    0.82189D-11    0.82192D-11    0.82189D-11
+   12         13    0.80714D-11    0.80714D-11    0.80714D-11
+   12         14    0.66488D-11    0.66484D-11    0.66488D-11
+   12         15    0.90034D-11    0.29004D-11    0.90034D-11
+   12         21    0.93085D-12    0.99169D-12    0.93085D-12
+   12         22    0.35285D-11    0.35303D-11    0.35285D-11
+   12         23    0.11453D-11    0.11335D-11    0.11453D-11
+   12         24    0.17458D-11    0.16659D-11    0.17458D-11
+   12         25    0.34199D-11    0.34526D-11    0.34199D-11
+   12         31    0.16629D-09    0.17895D-09    0.16629D-09
+   12         32    0.50374D-10    0.14628D-10    0.50374D-10
+   12         33    0.16707D-11    0.46252D-12    0.16707D-11
+   12         34    0.62474D-10    0.14220D-10    0.62474D-10
+   12         35    0.12467D-09    0.11902D-09    0.12467D-09
+   12         36    0.10510D-10    0.82102D-11    0.10510D-10
+   12         41    0.15479D-11    0.15684D-11    0.15479D-11
+   12         42    0.11759D-08    0.12933D-08    0.11759D-08
+   12         43    0.18109D-10    0.72027D-11    0.18109D-10
+   12         44    0.87967D-12    0.76457D-12    0.87967D-12
+   12         45    0.53935D-07    0.53936D-07    0.53935D-07
+   12         51    0.69398D-11    0.83380D-11    0.69398D-11
+   12         52    0.15065D-10    0.20416D-10    0.15065D-10
+   12         53    0.52112D-11    0.48481D-11    0.52112D-11
+   12         54    0.18871D-10    0.15722D-10    0.18871D-10
+   12         55    0.30504D-11    0.55322D-10    0.30504D-11
+
+
+                     Results for ITOL =   5
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        127       127       127
+        Jacs:           6         5         6
+        Ders:         192       208       192
+  
+    2   Steps:        141       141       141
+        Jacs:           5         6         5
+        Ders:         224       287       224
+  
+    3   Steps:        152       152       152
+        Jacs:           5         6         5
+        Ders:         221       249       221
+  
+    4   Steps:        189       189       189
+        Jacs:           6         8         6
+        Ders:         291       391       291
+  
+   11   Steps:        520       520       520
+        Jacs:          12        16        12
+        Ders:         604       684       604
+  
+   12   Steps:        107       107       107
+        Jacs:           4         5         4
+        Ders:         154       190       154
+  
+   13   Steps:        115       115       115
+        Jacs:           5         5         5
+        Ders:         166       196       166
+  
+   14   Steps:        182       182       182
+        Jacs:           5         8         5
+        Ders:         236       302       236
+  
+   15   Steps:       2551      2551      2551
+        Jacs:          46        72        46
+        Ders:        2963      3551      2963
+  
+   21   Steps:        135       144       135
+        Jacs:           6         6         6
+        Ders:         196       237       196
+  
+   22   Steps:        135       134       135
+        Jacs:           6         5         6
+        Ders:         191       210       191
+  
+   23   Steps:        127       127       127
+        Jacs:           5         5         5
+        Ders:         180       198       180
+  
+   24   Steps:        114       107       114
+        Jacs:           4         5         4
+        Ders:         162       175       162
+  
+   25   Steps:        103        97       103
+        Jacs:           3         5         3
+        Ders:         135       158       135
+  
+   31   Steps:         72        72        72
+        Jacs:           3         4         3
+        Ders:         136       151       136
+  
+   32   Steps:        173       155       173
+        Jacs:           4         7         4
+        Ders:         266       267       266
+  
+   33   Steps:        200       209       200
+        Jacs:           7         8         7
+        Ders:         307       346       307
+  
+   34   Steps:         99        97        99
+        Jacs:           5         5         5
+        Ders:         159       170       159
+  
+   35   Steps:         70        75        70
+        Jacs:           5         5         5
+        Ders:         130       142       130
+  
+   36   Steps:        126       129       126
+        Jacs:           6         5         6
+        Ders:         198       208       198
+  
+   41   Steps:        129       124       129
+        Jacs:           7         5         7
+        Ders:         192       199       192
+  
+   42   Steps:        178       166       178
+        Jacs:           4         8         4
+        Ders:         245       286       245
+  
+   43   Steps:        150       134       150
+        Jacs:           5         5         5
+        Ders:         273       206       273
+  
+   44   Steps:        241       258       241
+        Jacs:           7        11         7
+        Ders:         341       414       341
+  
+   45   Steps:         73        80        73
+        Jacs:           3         5         3
+        Ders:         104       139       104
+  
+   51   Steps:        349       252       349
+        Jacs:          19        21        19
+        Ders:         664       599       664
+  
+   52   Steps:         95        95        95
+        Jacs:           3         5         3
+        Ders:         137       152       137
+  
+   53   Steps:        191       521       191
+        Jacs:           4        21         4
+        Ders:         270       909       270
+  
+   54   Steps:        685       654       685
+        Jacs:          21        35        21
+        Ders:        1058      1147      1058
+  
+   55   Steps:        183       193       183
+        Jacs:           7         8         7
+        Ders:         284       341       284
+  
+
+
+                     Results for ITOL =   6
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        168       168       168
+        Jacs:           7         8         7
+        Ders:         242       278       242
+  
+    2   Steps:        208       207       208
+        Jacs:           7         8         7
+        Ders:         321       410       321
+  
+    3   Steps:        207       207       207
+        Jacs:           6         8         6
+        Ders:         301       342       301
+  
+    4   Steps:        254       254       254
+        Jacs:           8        11         8
+        Ders:         390       530       390
+  
+   11   Steps:        686       686       686
+        Jacs:          16        21        16
+        Ders:         795       899       795
+  
+   12   Steps:        137       137       137
+        Jacs:           5         5         5
+        Ders:         201       231       201
+  
+   13   Steps:        148       148       148
+        Jacs:           5         6         5
+        Ders:         207       249       207
+  
+   14   Steps:        276       276       276
+        Jacs:           7        11         7
+        Ders:         343       433       343
+  
+   15   Steps:       2619      2620      2619
+        Jacs:          49        72        49
+        Ders:        3088      3659      3088
+  
+   21   Steps:        182       184       182
+        Jacs:           7         8         7
+        Ders:         254       298       254
+  
+   22   Steps:        177       175       177
+        Jacs:           8         8         8
+        Ders:         252       286       252
+  
+   23   Steps:        174       173       174
+        Jacs:           7         8         7
+        Ders:         249       289       249
+  
+   24   Steps:        153       145       153
+        Jacs:           5         6         5
+        Ders:         216       244       216
+  
+   25   Steps:        147       145       147
+        Jacs:           5         6         5
+        Ders:         208       222       208
+  
+   31   Steps:        142       140       142
+        Jacs:           3         5         3
+        Ders:         237       232       237
+  
+   32   Steps:        185       241       185
+        Jacs:           4        11         4
+        Ders:         274       407       274
+  
+   33   Steps:        234       235       234
+        Jacs:           8         9         8
+        Ders:         337       393       337
+  
+   34   Steps:        110       114       110
+        Jacs:           7         5         7
+        Ders:         177       194       177
+  
+   35   Steps:        129       133       129
+        Jacs:           4         6         4
+        Ders:         205       221       205
+  
+   36   Steps:        208       240       208
+        Jacs:           8         9         8
+        Ders:         309       415       309
+  
+   41   Steps:        180       170       180
+        Jacs:           8         7         8
+        Ders:         258       264       258
+  
+   42   Steps:        228       232       228
+        Jacs:           5         9         5
+        Ders:         313       363       313
+  
+   43   Steps:        195       245       195
+        Jacs:           7        11         7
+        Ders:         299       416       299
+  
+   44   Steps:        282       276       282
+        Jacs:           9        12         9
+        Ders:         411       449       411
+  
+   45   Steps:        106        98       106
+        Jacs:           4         5         4
+        Ders:         151       169       151
+  
+   51   Steps:        406       340       406
+        Jacs:          22        24        22
+        Ders:         747       713       747
+  
+   52   Steps:        108       108       108
+        Jacs:           5         5         5
+        Ders:         170       175       170
+  
+   53   Steps:        225       220       225
+        Jacs:           5         9         5
+        Ders:         302       354       302
+  
+   54   Steps:        805       834       805
+        Jacs:          24        37        24
+        Ders:        1216      1415      1216
+  
+   55   Steps:        278       258       278
+        Jacs:           9        11         9
+        Ders:         419       432       419
+  
+
+
+                     Results for ITOL =   7
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        229       229       229
+        Jacs:           8         8         8
+        Ders:         308       340       308
+  
+    2   Steps:        263       268       263
+        Jacs:           9        11         9
+        Ders:         418       544       418
+  
+    3   Steps:        276       276       276
+        Jacs:           8        11         8
+        Ders:         385       441       385
+  
+    4   Steps:        358       358       358
+        Jacs:          11        14        11
+        Ders:         535       705       535
+  
+   11   Steps:        975       975       975
+        Jacs:          21        30        21
+        Ders:        1107      1263      1107
+  
+   12   Steps:        201       201       201
+        Jacs:           7         7         7
+        Ders:         282       324       282
+  
+   13   Steps:        219       219       219
+        Jacs:           7         7         7
+        Ders:         301       343       301
+  
+   14   Steps:        373       373       373
+        Jacs:          10        13        10
+        Ders:         461       557       461
+  
+   15   Steps:       2868      2868      2868
+        Jacs:          53        76        53
+        Ders:        3382      3976      3382
+  
+   21   Steps:        269       265       269
+        Jacs:           9        11         9
+        Ders:         352       405       352
+  
+   22   Steps:        239       240       239
+        Jacs:           9         9         9
+        Ders:         330       367       330
+  
+   23   Steps:        239       238       239
+        Jacs:           9         9         9
+        Ders:         332       367       332
+  
+   24   Steps:        207       195       207
+        Jacs:           7         8         7
+        Ders:         277       301       277
+  
+   25   Steps:        196       193       196
+        Jacs:           6         8         6
+        Ders:         291       323       291
+  
+   31   Steps:        216       206       216
+        Jacs:           5         8         5
+        Ders:         330       360       330
+  
+   32   Steps:        353       338       353
+        Jacs:           8        14         8
+        Ders:         508       570       508
+  
+   33   Steps:        327       344       327
+        Jacs:          10        14        10
+        Ders:         454       532       454
+  
+   34   Steps:        161       161       161
+        Jacs:           7         6         7
+        Ders:         242       257       242
+  
+   35   Steps:        168       156       168
+        Jacs:           8         8         8
+        Ders:         273       289       273
+  
+   36   Steps:        274       280       274
+        Jacs:           9        11         9
+        Ders:         380       465       380
+  
+   41   Steps:        242       239       242
+        Jacs:          10        10        10
+        Ders:         325       356       325
+  
+   42   Steps:        289       286       289
+        Jacs:           7        10         7
+        Ders:         401       420       401
+  
+   43   Steps:        289       268       289
+        Jacs:           9        11         9
+        Ders:         423       436       423
+  
+   44   Steps:        416       408       416
+        Jacs:          12        17        12
+        Ders:         565       658       565
+  
+   45   Steps:        136       132       136
+        Jacs:           4         5         4
+        Ders:         184       204       184
+  
+   51   Steps:        607       491       607
+        Jacs:          23        30        23
+        Ders:        1024      1019      1024
+  
+   52   Steps:        142       145       142
+        Jacs:           5         6         5
+        Ders:         207       234       207
+  
+   53   Steps:        351       289       351
+        Jacs:           7        11         7
+        Ders:         471       463       471
+  
+   54   Steps:       1018       833      1018
+        Jacs:          28        38        28
+        Ders:        1726      1482      1726
+  
+   55   Steps:        343       364       343
+        Jacs:          11        14        11
+        Ders:         511       588       511
+  
+
+
+                     Results for ITOL =   8
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        302       302       302
+        Jacs:          11        11        11
+        Ders:         408       452       408
+  
+    2   Steps:        375       376       375
+        Jacs:          11        15        11
+        Ders:         530       700       530
+  
+    3   Steps:        385       385       385
+        Jacs:          11        15        11
+        Ders:         494       570       494
+  
+    4   Steps:        495       495       495
+        Jacs:          13        16        13
+        Ders:         685       875       685
+  
+   11   Steps:       1361      1361      1361
+        Jacs:          28        39        28
+        Ders:        1529      1729      1529
+  
+   12   Steps:        281       281       281
+        Jacs:           9        11         9
+        Ders:         371       449       371
+  
+   13   Steps:        305       305       305
+        Jacs:          10        11        10
+        Ders:         402       474       402
+  
+   14   Steps:        585       585       585
+        Jacs:          15        18        15
+        Ders:         725       851       725
+  
+   15   Steps:       3238      3239      3238
+        Jacs:          59        89        59
+        Ders:        3773      4488      3773
+  
+   21   Steps:        367       367       367
+        Jacs:          12        13        12
+        Ders:         464       520       464
+  
+   22   Steps:        336       336       336
+        Jacs:          11        13        11
+        Ders:         435       495       435
+  
+   23   Steps:        324       324       324
+        Jacs:          10        11        10
+        Ders:         413       461       413
+  
+   24   Steps:        260       259       260
+        Jacs:           9        11         9
+        Ders:         356       392       356
+  
+   25   Steps:        252       245       252
+        Jacs:           8        10         8
+        Ders:         337       370       337
+  
+   31   Steps:        375       390       375
+        Jacs:           8        16         8
+        Ders:         555       663       555
+  
+   32   Steps:        454       387       454
+        Jacs:           9        16         9
+        Ders:         639       597       639
+  
+   33   Steps:        444       419       444
+        Jacs:          13        18        13
+        Ders:         577       657       577
+  
+   34   Steps:        246       244       246
+        Jacs:          10        10        10
+        Ders:         355       383       355
+  
+   35   Steps:        215       264       215
+        Jacs:          10        11        10
+        Ders:         345       499       345
+  
+   36   Steps:        375       354       375
+        Jacs:          12        14        12
+        Ders:         542       568       542
+  
+   41   Steps:        331       324       331
+        Jacs:          11        11        11
+        Ders:         422       477       422
+  
+   42   Steps:        401       402       401
+        Jacs:           9        15         9
+        Ders:         518       560       518
+  
+   43   Steps:        418       352       418
+        Jacs:          12        13        12
+        Ders:         595       526       595
+  
+   44   Steps:        564       539       564
+        Jacs:          14        18        14
+        Ders:         737       790       737
+  
+   45   Steps:        182       193       182
+        Jacs:           6         8         6
+        Ders:         250       295       250
+  
+   51   Steps:        725       780       725
+        Jacs:          26        34        26
+        Ders:        1191      1456      1191
+  
+   52   Steps:        204       209       204
+        Jacs:           7         8         7
+        Ders:         277       304       277
+  
+   53   Steps:        422       401       422
+        Jacs:           8        15         8
+        Ders:         515       612       515
+  
+   54   Steps:       1237      1294      1237
+        Jacs:          31        53        31
+        Ders:        2084      2356      2084
+  
+   55   Steps:        501       437       501
+        Jacs:          14        16        14
+        Ders:         733       674       733
+  
+
+
+                     Results for ITOL =   9
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        428       428       428
+        Jacs:          13        16        13
+        Ders:         542       618       542
+  
+    2   Steps:        522       521       522
+        Jacs:          15        17        15
+        Ders:         731       895       731
+  
+    3   Steps:        537       537       537
+        Jacs:          14        19        14
+        Ders:         657       753       657
+  
+    4   Steps:        703       703       703
+        Jacs:          18        26        18
+        Ders:         953      1293       953
+  
+   11   Steps:       2035      2034      2035
+        Jacs:          39        55        39
+        Ders:        2249      2532      2249
+  
+   12   Steps:        390       390       390
+        Jacs:          11        15        11
+        Ders:         495       609       495
+  
+   13   Steps:        426       426       426
+        Jacs:          11        13        11
+        Ders:         529       619       529
+  
+   14   Steps:        798       798       798
+        Jacs:          18        24        18
+        Ders:         960      1140       960
+  
+   15   Steps:       3790      3790      3790
+        Jacs:          69       102        69
+        Ders:        4374      5184      4374
+  
+   21   Steps:        525       525       525
+        Jacs:          16        18        16
+        Ders:         643       724       643
+  
+   22   Steps:        460       460       460
+        Jacs:          14        15        14
+        Ders:         573       637       573
+  
+   23   Steps:        468       468       468
+        Jacs:          13        15        13
+        Ders:         570       639       570
+  
+   24   Steps:        363       363       363
+        Jacs:          11        14        11
+        Ders:         461       527       461
+  
+   25   Steps:        345       347       345
+        Jacs:          11        12        11
+        Ders:         443       491       443
+  
+   31   Steps:        493       513       493
+        Jacs:          12        20        12
+        Ders:         738       883       738
+  
+   32   Steps:        534       569       534
+        Jacs:          11        22        11
+        Ders:         726       898       726
+  
+   33   Steps:        593       610       593
+        Jacs:          17        21        17
+        Ders:         740       864       740
+  
+   34   Steps:        321       334       321
+        Jacs:          11        11        11
+        Ders:         449       491       449
+  
+   35   Steps:        425       366       425
+        Jacs:          12        14        12
+        Ders:         703       616       703
+  
+   36   Steps:        497       447       497
+        Jacs:          14        17        14
+        Ders:         717       665       717
+  
+   41   Steps:        452       457       452
+        Jacs:          14        16        14
+        Ders:         563       642       563
+  
+   42   Steps:        587       578       587
+        Jacs:          12        21        12
+        Ders:         714       759       714
+  
+   43   Steps:        510       476       510
+        Jacs:          14        19        14
+        Ders:         730       747       730
+  
+   44   Steps:        769       771       769
+        Jacs:          19        27        19
+        Ders:         956      1087       956
+  
+   45   Steps:        263       276       263
+        Jacs:           7        11         7
+        Ders:         350       421       350
+  
+   51   Steps:       1013       980      1013
+        Jacs:          31        42        31
+        Ders:        1603      1858      1603
+  
+   52   Steps:        285       285       285
+        Jacs:           9        12         9
+        Ders:         359       402       359
+  
+   53   Steps:        598       589       598
+        Jacs:          11        22        11
+        Ders:         721       873       721
+  
+   54   Steps:       1679      1750      1679
+        Jacs:          40        70        40
+        Ders:        2745      3002      2745
+  
+   55   Steps:        639       613       639
+        Jacs:          17        22        17
+        Ders:         948       989       948
+  
+
+
+                     Results for ITOL =  10
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        591       591       591
+        Jacs:          17        18        17
+        Ders:         712       788       712
+  
+    2   Steps:        736       735       736
+        Jacs:          19        25        19
+        Ders:         990      1268       990
+  
+    3   Steps:        760       760       760
+        Jacs:          19        24        19
+        Ders:         908      1024       908
+  
+    4   Steps:        999       999       999
+        Jacs:          22        31        22
+        Ders:        1284      1684      1284
+  
+   11   Steps:       2933      2913      2933
+        Jacs:          56        77        56
+        Ders:        3230      3602      3230
+  
+   12   Steps:        558       558       558
+        Jacs:          15        18        15
+        Ders:         697       823       697
+  
+   13   Steps:        598       598       598
+        Jacs:          16        19        16
+        Ders:         735       867       735
+  
+   14   Steps:       1106      1106      1106
+        Jacs:          24        31        24
+        Ders:        1300      1528      1300
+  
+   15   Steps:       4572      4584      4572
+        Jacs:          83       123        83
+        Ders:        5276      6258      5276
+  
+   21   Steps:        735       734       735
+        Jacs:          19        24        19
+        Ders:         888      1001       888
+  
+   22   Steps:        661       661       661
+        Jacs:          18        22        18
+        Ders:         796       900       796
+  
+   23   Steps:        656       652       656
+        Jacs:          17        20        17
+        Ders:         783       881       783
+  
+   24   Steps:        517       517       517
+        Jacs:          15        17        15
+        Ders:         628       704       628
+  
+   25   Steps:        502       502       502
+        Jacs:          13        16        13
+        Ders:         602       678       602
+  
+   31   Steps:        609       531       609
+        Jacs:          13        20        13
+        Ders:         884       856       884
+  
+   32   Steps:        723       798       723
+        Jacs:          16        32        16
+        Ders:        1013      1301      1013
+  
+   33   Steps:        860       868       860
+        Jacs:          21        30        21
+        Ders:        1031      1206      1031
+  
+   34   Steps:        427       425       427
+        Jacs:          14        15        14
+        Ders:         608       642       608
+  
+   35   Steps:        584       488       584
+        Jacs:          15        18        15
+        Ders:         931       815       931
+  
+   36   Steps:        624       600       624
+        Jacs:          18        22        18
+        Ders:         885       902       885
+  
+   41   Steps:        635       738       635
+        Jacs:          17        39        17
+        Ders:         762      1217       762
+  
+   42   Steps:        835       833       835
+        Jacs:          18        27        18
+        Ders:         997      1059       997
+  
+   43   Steps:        638       622       638
+        Jacs:          17        21        17
+        Ders:         861       892       861
+  
+   44   Steps:       1122      1125      1122
+        Jacs:          24        36        24
+        Ders:        1337      1528      1337
+  
+   45   Steps:        344       361       344
+        Jacs:          10        14        10
+        Ders:         449       556       449
+  
+   51   Steps:       1496      1520      1496
+        Jacs:          36        55        36
+        Ders:        2279      2561      2279
+  
+   52   Steps:        388       397       388
+        Jacs:          11        14        11
+        Ders:         470       505       470
+  
+   53   Steps:        822       811       822
+        Jacs:          15        27        15
+        Ders:         960      1145       960
+  
+   54   Steps:       2337      2249      2337
+        Jacs:          50        88        50
+        Ders:        3662      3975      3662
+  
+   55   Steps:        838       785       838
+        Jacs:          23        28        23
+        Ders:        1214      1263      1214
+  
+
+
+                     Results for ITOL =  11
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        868       868       868
+        Jacs:          21        25        21
+        Ders:        1012      1128      1012
+  
+    2   Steps:       1039      1027      1039
+        Jacs:          24        31        24
+        Ders:        1337      1655      1337
+  
+    3   Steps:       1065      1065      1065
+        Jacs:          23        33        23
+        Ders:        1228      1400      1228
+  
+    4   Steps:       1447      1447      1447
+        Jacs:          31        44        31
+        Ders:        1825      2395      1825
+  
+   11   Steps:       4306      4319      4306
+        Jacs:          78       114        78
+        Ders:        4710      5322      4710
+  
+   12   Steps:        789       789       789
+        Jacs:          19        25        19
+        Ders:         950      1136       950
+  
+   13   Steps:        846       846       846
+        Jacs:          19        26        19
+        Ders:        1005      1203      1005
+  
+   14   Steps:       1319      1319      1319
+        Jacs:          28        38        28
+        Ders:        1544      1832      1544
+  
+   15   Steps:       5843      5858      5843
+        Jacs:         104       160       104
+        Ders:        6685      7996      6685
+  
+   21   Steps:       1070      1070      1070
+        Jacs:          25        32        25
+        Ders:        1229      1386      1229
+  
+   22   Steps:        936       936       936
+        Jacs:          22        29        22
+        Ders:        1090      1235      1090
+  
+   23   Steps:        923       923       923
+        Jacs:          22        28        22
+        Ders:        1070      1208      1070
+  
+   24   Steps:        736       737       736
+        Jacs:          19        24        19
+        Ders:         872       989       872
+  
+   25   Steps:        717       717       717
+        Jacs:          17        23        17
+        Ders:         831       948       831
+  
+   31   Steps:        732       659       732
+        Jacs:          16        24        16
+        Ders:        1029       997      1029
+  
+   32   Steps:        955       938       955
+        Jacs:          20        32        20
+        Ders:        1286      1408      1286
+  
+   33   Steps:       1186      1205      1186
+        Jacs:          28        39        28
+        Ders:        1393      1620      1393
+  
+   34   Steps:        590       582       590
+        Jacs:          17        20        17
+        Ders:         772       836       772
+  
+   35   Steps:        734       678       734
+        Jacs:          18        24        18
+        Ders:        1088      1053      1088
+  
+   36   Steps:        888       828       888
+        Jacs:          22        29        22
+        Ders:        1201      1210      1201
+  
+   41   Steps:       1152      1282      1152
+        Jacs:         159       291       159
+        Ders:        2166      4261      2166
+  
+   42   Steps:       1196      1182      1196
+        Jacs:          25        36        25
+        Ders:        1396      1479      1396
+  
+   43   Steps:        821       763       821
+        Jacs:          21        26        21
+        Ders:        1072      1045      1072
+  
+   44   Steps:       1586      1585      1586
+        Jacs:          33        48        33
+        Ders:        1836      2087      1836
+  
+   45   Steps:        475       495       475
+        Jacs:          13        19        13
+        Ders:         603       737       603
+  
+   51   Steps:       2097      2076      2097
+        Jacs:          43        74        43
+        Ders:        3024      3525      3024
+  
+   52   Steps:        560       537       560
+        Jacs:          15        18        15
+        Ders:         670       683       670
+  
+   53   Steps:       1184      1171      1184
+        Jacs:          21        36        21
+        Ders:        1373      1614      1373
+  
+   54   Steps:       2972      2723      2972
+        Jacs:          58       101        58
+        Ders:        4407      4382      4407
+  
+   55   Steps:       1122      1128      1122
+        Jacs:          52        71        52
+        Ders:        1731      2140      1731
+  
+
+
+                     Results for ITOL =  12
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:       1239      1239      1239
+        Jacs:          28        36        28
+        Ders:        1417      1593      1417
+  
+    2   Steps:       1522      1522      1522
+        Jacs:          33        43        33
+        Ders:        1906      2383      1906
+  
+    3   Steps:       1599      1594      1599
+        Jacs:          33        46        33
+        Ders:        1817      2049      1817
+  
+    4   Steps:       2088      2088      2088
+        Jacs:          42        58        42
+        Ders:        2581      3321      2581
+  
+   11   Steps:       6205      6206      6205
+        Jacs:         111       159       111
+        Ders:        6767      7597      6767
+  
+   12   Steps:       1126      1126      1126
+        Jacs:          24        31        24
+        Ders:        1328      1556      1328
+  
+   13   Steps:       1254      1254      1254
+        Jacs:          27        36        27
+        Ders:        1463      1733      1463
+  
+   14   Steps:       2001      2001      2001
+        Jacs:          39        54        39
+        Ders:        2293      2707      2293
+  
+   15   Steps:       7516      7542      7516
+        Jacs:         132       199       132
+        Ders:        8566     10206      8566
+  
+   21   Steps:       1545      1545      1545
+        Jacs:          34        47        34
+        Ders:        1746      1987      1746
+  
+   22   Steps:       1384      1384      1384
+        Jacs:          31        38        31
+        Ders:        1577      1759      1577
+  
+   23   Steps:       1380      1380      1380
+        Jacs:          30        39        30
+        Ders:        1568      1761      1568
+  
+   24   Steps:       1077      1077      1077
+        Jacs:          25        32        25
+        Ders:        1229      1386      1229
+  
+   25   Steps:       1016      1016      1016
+        Jacs:          24        30        24
+        Ders:        1165      1310      1165
+  
+   31   Steps:        899       840       899
+        Jacs:          21        29        21
+        Ders:        1201      1197      1201
+  
+   32   Steps:       1263      1220      1263
+        Jacs:          25        42        25
+        Ders:        1607      1737      1607
+  
+   33   Steps:       1730      1733      1730
+        Jacs:          38        54        38
+        Ders:        1984      2263      1984
+  
+   34   Steps:        804       765       804
+        Jacs:          21        24        21
+        Ders:        1022      1056      1022
+  
+   35   Steps:        982       962       982
+        Jacs:          23        32        23
+        Ders:        1415      1424      1415
+  
+   36   Steps:       1142      1130      1142
+        Jacs:          28        39        28
+        Ders:        1445      1584      1445
+  
+   41   Steps:       1571      1464      1571
+        Jacs:         224       137       224
+        Ders:        2955      2848      2955
+  
+   42   Steps:       1748      1758      1748
+        Jacs:          33        53        33
+        Ders:        1980      2138      1980
+  
+   43   Steps:       1064      1071      1064
+        Jacs:          24        32        24
+        Ders:        1241      1371      1241
+  
+   44   Steps:       2282      2282      2282
+        Jacs:          44        67        44
+        Ders:        2599      2960      2599
+  
+   45   Steps:        684       675       684
+        Jacs:          16        21        16
+        Ders:         834       940       834
+  
+   51   Steps:       2913      2719      2913
+        Jacs:          56        89        56
+        Ders:        4059      4306      4059
+  
+   52   Steps:        790       780       790
+        Jacs:          19        25        19
+        Ders:         905       961       905
+  
+   53   Steps:       1676      1661      1676
+        Jacs:          29        49        29
+        Ders:        1900      2216      1900
+  
+   54   Steps:       3815      3656      3815
+        Jacs:          74       125        74
+        Ders:        5518      5767      5518
+  
+   55   Steps:       1527      1558      1527
+        Jacs:          66       114        66
+        Ders:        2230      3010      2230
+  
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        249 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+00    0.99999D-01    0.12919D-05
+  2    0.20000D+00    0.20000D+00    0.25836D-05
+  3    0.30000D+00    0.30000D+00    0.36121D-05
+  4    0.40000D+00    0.40000D+00    0.42755D-05
+  5    0.50000D+00    0.50000D+00    0.45095D-05
+  6    0.60000D+00    0.60000D+00    0.42901D-05
+  7    0.70000D+00    0.70000D+00    0.36349D-05
+  8    0.80000D+00    0.80000D+00    0.26047D-05
+  9    0.90000D+00    0.90000D+00    0.13024D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        157 f-s =        226 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.36849D-09
+  2    0.13685D-01    0.13685D-01    0.31753D-08
+  3    0.15037D+01    0.15037D+01    0.40943D-06
+  4    0.13534D+00    0.13534D+00    0.91389D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87708D-28    0.00000D+00    0.87708D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        570 f-s =        713 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.14194D-04    0.10042D-08    0.14193D-04
+  2    0.82077D-04    0.18000D-07    0.82059D-04
+  3    0.51775D-33    0.00000D+00    0.51775D-33
+  4   -0.12039D-30   -0.60430D-78    0.12039D-30
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18968D-09    0.61813D-30    0.18968D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        169 f-s =        223 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19033D-12    0.13312D-21    0.19033D-12
+  2   -0.10521D-10   -0.23259D-21    0.10521D-10
+  3   -0.37707D-10    0.15179D-34    0.37707D-10
+  4    0.76153D-06    0.20612D-08    0.75946D-06
+  5    0.58685D-04    0.45400D-04    0.13286D-04
+  6    0.13534D+00    0.13534D+00    0.51649D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2552 f-s =       3023 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11726D-03   -0.31006D-13    0.11726D-03
+  2   -0.22721D-03    0.38628D-13    0.22721D-03
+  3    0.18048D-34    0.18049D-34    0.50176D-39
+  4    0.20612D-08    0.20612D-08    0.38794D-16
+  5    0.45400D-04    0.45400D-04    0.44911D-13
+  6    0.13534D+00    0.13534D+00    0.97024D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        141 f-s =        199 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.40054D-03    0.40032D-03    0.21725D-06
+  2    0.40016D-03    0.40016D-03    0.54348D-09
+  3    0.40000D-03    0.40000D-03    0.29682D-12
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10060D-06
+  2    0.40000D-01    0.40000D-01    0.26613D-06
+  3    0.40016D-01    0.40016D-01    0.13896D-06
+  4    0.40032D-01    0.40032D-01    0.10179D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        182 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.58233D-05
+  2    0.40000D+00    0.40000D+00    0.25734D-05
+  3    0.41600D+00    0.41600D+00    0.25912D-05
+  4    0.43330D+00    0.43331D+00    0.27705D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        155 f-s =        224 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.20441D-06
+  2    0.40000D+01    0.40000D+01    0.75102D-06
+  3    0.20000D+02    0.20000D+02    0.44356D-05
+  4    0.42000D+03    0.42000D+03    0.12272D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        150 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.44187D-07
+  2    0.80000D+01    0.80000D+01    0.40855D-06
+  3    0.13600D+03    0.13600D+03    0.15833D-04
+  4    0.37128D+05    0.37128D+05    0.26298D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        265 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.22243D+02    0.22242D+02    0.10988D-02
+  2    0.27112D+02    0.27111D+02    0.10756D-02
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        139 f-s =        184 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41589D-05
+  2    0.91852D-01    0.91855D-01    0.32405D-05
+  3    0.28416D+02    0.28416D+02    0.41585D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        201 f-s =        313 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.30056D-05
+  2    0.56309D-02    0.56309D-02    0.52582D-08
+  3    0.36024D+00    0.36024D+00    0.30056D-05
+  4    0.31706D+00    0.31706D+00    0.15055D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         21 f-s =         32 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59763D+00    0.59765D+00    0.22714D-04
+  2    0.14024D+01    0.14023D+01    0.22714D-04
+  3   -0.18934D-05   -0.18934D-05    0.36304D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         70 f-s =        117 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99622D+00   -0.99164D+00    0.45755D-02
+  2    0.98698D+00    0.98334D+00    0.36395D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         52 f-s =         83 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85239D+00    0.85240D+00    0.74222D-05
+  2    0.14761D+00    0.14760D+00    0.74222D-05
+  3    0.57732D-07    0.57731D-07    0.90709D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         72 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.97106D-15
+  2    0.47575D-13   -0.16253D-18    0.47575D-13
+  3   -0.16565D-11    0.20260D-16    0.16566D-11
+  4   -0.50714D-11   -0.18531D-14    0.50696D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        215 f-s =        318 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.78411D-04
+  2    0.43050D+00    0.43047D+00    0.34522D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        189 f-s =        316 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.42734D-02    0.42531D-02    0.20365D-04
+  2    0.53422D-02    0.53170D-02    0.25150D-04
+  3    0.26276D+02    0.26276D+02    0.42416D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        292 f-s =        424 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.52553D-04
+  2   -0.20000D+02   -0.20000D+02    0.52554D-04
+  3    0.52329D-04   -0.22476D-06    0.52554D-04
+  4   -0.52328D-04    0.22476D-06    0.52553D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         10 f-s =         29 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.21577D-02    0.16181D-02    0.53967D-03
+  2   -0.57503D-09    0.13822D-09    0.71325D-09
+  3   -0.25475D-10    0.82516D-11    0.33726D-10
+  4   -0.54955D-09    0.12997D-09    0.67952D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        273 f-s =        474 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.98034D-02
+  2    0.13156D-04    0.12711D-04    0.44521D-06
+  3    0.12086D+04    0.12086D+04    0.97308D-02
+  4    0.32464D-03    0.32420D-03    0.44262D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         81 f-s =        113 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39130D+00    0.39127D+00    0.30169D-04
+  2    0.13301D-02    0.13300D-02    0.10244D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         20 f-s =         34 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.15471D-11    0.32359D-12    0.12235D-11
+  2    0.12675D-06    0.23607D-06    0.10931D-06
+  3    0.87327D-13    0.76393D-13    0.10934D-13
+  4    0.87326D-06    0.76393D-06    0.10933D-06
+  5    0.95128D-05    0.32361D-05    0.62767D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1180 f-s =       1914 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.44200D+01    0.44183D+01    0.17101D-02
+  2    0.12901D+01    0.12902D+01    0.15324D-03
+  3    0.30201D+01    0.30193D+01    0.81082D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         45 f-s =         71 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.24133D-13
+  2    0.37136D-02    0.37136D-02    0.63098D-08
+  3    0.61893D-02    0.61893D-02    0.84776D-08
+  4    0.95451D-05    0.95451D-05    0.24174D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        312 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+00    0.99999D-01    0.12910D-05
+  2    0.20000D+00    0.20000D+00    0.25819D-05
+  3    0.30000D+00    0.30000D+00    0.36097D-05
+  4    0.40000D+00    0.40000D+00    0.42726D-05
+  5    0.50000D+00    0.50000D+00    0.45063D-05
+  6    0.60000D+00    0.60000D+00    0.42870D-05
+  7    0.70000D+00    0.70000D+00    0.36323D-05
+  8    0.80000D+00    0.80000D+00    0.26028D-05
+  9    0.90000D+00    0.90000D+00    0.13015D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        157 f-s =        254 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.34797D-09
+  2    0.13685D-01    0.13685D-01    0.29447D-08
+  3    0.15037D+01    0.15037D+01    0.38662D-06
+  4    0.13534D+00    0.13534D+00    0.91616D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        391 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87706D-28    0.00000D+00    0.87706D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        566 f-s =        811 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.20428D-04    0.10042D-08    0.20429D-04
+  2   -0.16597D-04    0.18000D-07    0.16615D-04
+  3   -0.14376D-39    0.00000D+00    0.14376D-39
+  4    0.12003D-37   -0.60430D-78    0.12003D-37
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        190 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        196 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        169 f-s =        289 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19037D-12    0.13312D-21    0.19037D-12
+  2   -0.10521D-10   -0.23259D-21    0.10521D-10
+  3   -0.37706D-10    0.15179D-34    0.37706D-10
+  4    0.76152D-06    0.20612D-08    0.75946D-06
+  5    0.58685D-04    0.45400D-04    0.13286D-04
+  6    0.13534D+00    0.13534D+00    0.51649D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2552 f-s =       3587 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11726D-03   -0.31006D-13    0.11726D-03
+  2   -0.22721D-03    0.38628D-13    0.22721D-03
+  3    0.18048D-34    0.18049D-34    0.50176D-39
+  4    0.20612D-08    0.20612D-08    0.38794D-16
+  5    0.45400D-04    0.45400D-04    0.44911D-13
+  6    0.13534D+00    0.13534D+00    0.97023D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        138 f-s =        214 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39878D-03    0.40032D-03    0.15396D-05
+  2    0.40016D-03    0.40016D-03    0.23293D-09
+  3    0.40000D-03    0.40000D-03    0.65269D-16
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        136 f-s =        211 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.44573D-05
+  2    0.39999D-01    0.40000D-01    0.52529D-06
+  3    0.40016D-01    0.40016D-01    0.24479D-06
+  4    0.40032D-01    0.40032D-01    0.22382D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        128 f-s =        199 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.13384D-05
+  2    0.40000D+00    0.40000D+00    0.46498D-06
+  3    0.41600D+00    0.41600D+00    0.50369D-06
+  4    0.43331D+00    0.43331D+00    0.54350D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        149 f-s =        237 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31329D-07
+  2    0.40000D+01    0.40000D+01    0.14647D-06
+  3    0.20000D+02    0.20000D+02    0.73913D-05
+  4    0.42000D+03    0.42000D+03    0.15539D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        151 f-s =        236 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.71167D-07
+  2    0.80000D+01    0.80000D+01    0.63269D-06
+  3    0.13600D+03    0.13600D+03    0.21350D-04
+  4    0.37128D+05    0.37128D+05    0.11753D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        146 f-s =        294 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.22243D+02    0.22242D+02    0.68249D-03
+  2    0.27112D+02    0.27111D+02    0.84515D-03
+  3    0.40000D+03    0.40000D+03    0.17053D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        160 f-s =        266 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.71584D+00    0.71583D+00    0.93980D-05
+  2    0.91859D-01    0.91855D-01    0.36574D-05
+  3    0.28415D+02    0.28416D+02    0.93984D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        197 f-s =        320 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.12985D-06
+  2    0.56309D-02    0.56309D-02    0.90679D-10
+  3    0.36024D+00    0.36024D+00    0.12985D-06
+  4    0.31706D+00    0.31706D+00    0.64968D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         21 f-s =         53 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59761D+00    0.59765D+00    0.42350D-04
+  2    0.14024D+01    0.14023D+01    0.42351D-04
+  3   -0.18933D-05   -0.18934D-05    0.12630D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         71 f-s =        121 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99622D+00   -0.99164D+00    0.45789D-02
+  2    0.98699D+00    0.98334D+00    0.36557D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         46 f-s =         93 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.26880D-05
+  2    0.14760D+00    0.14760D+00    0.26880D-05
+  3    0.57731D-07    0.57731D-07    0.34059D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         76 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.97123D-15
+  2    0.47580D-13   -0.16253D-18    0.47580D-13
+  3   -0.16566D-11    0.20260D-16    0.16567D-11
+  4   -0.50806D-11   -0.18531D-14    0.50787D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        205 f-s =        328 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.70042D-04
+  2    0.43047D+00    0.43047D+00    0.29209D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        138 f-s =        223 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.42420D-02    0.42531D-02    0.11018D-04
+  2    0.53043D-02    0.53170D-02    0.12744D-04
+  3    0.26277D+02    0.26276D+02    0.17876D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        287 f-s =        444 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.86248D-06
+  2   -0.20000D+02   -0.20000D+02    0.88552D-06
+  3   -0.96585D-06   -0.22476D-06    0.74109D-06
+  4    0.12322D-05    0.22476D-06    0.10074D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         10 f-s =         65 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.16256D-02    0.16181D-02    0.75382D-05
+  2    0.13947D-09    0.13822D-09    0.12510D-11
+  3    0.82857D-11    0.82516D-11    0.34084D-13
+  4    0.13119D-09    0.12997D-09    0.12169D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        348 f-s =        724 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.90740D-02
+  2    0.54037D-05    0.12711D-04    0.73075D-05
+  3    0.12086D+04    0.12086D+04    0.90079D-02
+  4    0.31692D-03    0.32420D-03    0.72808D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         81 f-s =        130 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39123D+00    0.39127D+00    0.44281D-04
+  2    0.13298D-02    0.13300D-02    0.15040D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         20 f-s =         54 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.15476D-11    0.32359D-12    0.12240D-11
+  2    0.12676D-06    0.23607D-06    0.10931D-06
+  3    0.87325D-13    0.76393D-13    0.10932D-13
+  4    0.87325D-06    0.76393D-06    0.10932D-06
+  5    0.95127D-05    0.32361D-05    0.62766D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1004 f-s =       1864 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1    0.44196D+01    0.44183D+01    0.12704D-02
+  2    0.12901D+01    0.12902D+01    0.11661D-03
+  3    0.30199D+01    0.30193D+01    0.62094D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         88 f-s =        152 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.18684D-15
+  2    0.37136D-02    0.37136D-02    0.41172D-11
+  3    0.61893D-02    0.61893D-02    0.69075D-11
+  4    0.95451D-05    0.95451D-05    0.18709D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        249 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+00    0.99999D-01    0.12919D-05
+  2    0.20000D+00    0.20000D+00    0.25836D-05
+  3    0.30000D+00    0.30000D+00    0.36121D-05
+  4    0.40000D+00    0.40000D+00    0.42755D-05
+  5    0.50000D+00    0.50000D+00    0.45095D-05
+  6    0.60000D+00    0.60000D+00    0.42901D-05
+  7    0.70000D+00    0.70000D+00    0.36349D-05
+  8    0.80000D+00    0.80000D+00    0.26047D-05
+  9    0.90000D+00    0.90000D+00    0.13024D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        157 f-s =        226 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.36849D-09
+  2    0.13685D-01    0.13685D-01    0.31753D-08
+  3    0.15037D+01    0.15037D+01    0.40943D-06
+  4    0.13534D+00    0.13534D+00    0.91389D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87708D-28    0.00000D+00    0.87708D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        570 f-s =        713 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.14194D-04    0.10042D-08    0.14193D-04
+  2    0.82077D-04    0.18000D-07    0.82059D-04
+  3    0.51775D-33    0.00000D+00    0.51775D-33
+  4   -0.12039D-30   -0.60430D-78    0.12039D-30
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18968D-09    0.61813D-30    0.18968D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        169 f-s =        223 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19033D-12    0.13312D-21    0.19033D-12
+  2   -0.10521D-10   -0.23259D-21    0.10521D-10
+  3   -0.37707D-10    0.15179D-34    0.37707D-10
+  4    0.76153D-06    0.20612D-08    0.75946D-06
+  5    0.58685D-04    0.45400D-04    0.13286D-04
+  6    0.13534D+00    0.13534D+00    0.51649D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2552 f-s =       3023 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11726D-03   -0.31006D-13    0.11726D-03
+  2   -0.22721D-03    0.38628D-13    0.22721D-03
+  3    0.18048D-34    0.18049D-34    0.50176D-39
+  4    0.20612D-08    0.20612D-08    0.38794D-16
+  5    0.45400D-04    0.45400D-04    0.44911D-13
+  6    0.13534D+00    0.13534D+00    0.97024D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        141 f-s =        199 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.40054D-03    0.40032D-03    0.21725D-06
+  2    0.40016D-03    0.40016D-03    0.54348D-09
+  3    0.40000D-03    0.40000D-03    0.29682D-12
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10060D-06
+  2    0.40000D-01    0.40000D-01    0.26613D-06
+  3    0.40016D-01    0.40016D-01    0.13896D-06
+  4    0.40032D-01    0.40032D-01    0.10179D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        182 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.58233D-05
+  2    0.40000D+00    0.40000D+00    0.25734D-05
+  3    0.41600D+00    0.41600D+00    0.25912D-05
+  4    0.43330D+00    0.43331D+00    0.27705D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        155 f-s =        224 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.20441D-06
+  2    0.40000D+01    0.40000D+01    0.75102D-06
+  3    0.20000D+02    0.20000D+02    0.44356D-05
+  4    0.42000D+03    0.42000D+03    0.12272D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        150 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.44187D-07
+  2    0.80000D+01    0.80000D+01    0.40855D-06
+  3    0.13600D+03    0.13600D+03    0.15833D-04
+  4    0.37128D+05    0.37128D+05    0.26298D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        265 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.22243D+02    0.22242D+02    0.10988D-02
+  2    0.27112D+02    0.27111D+02    0.10756D-02
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        139 f-s =        184 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41589D-05
+  2    0.91852D-01    0.91855D-01    0.32405D-05
+  3    0.28416D+02    0.28416D+02    0.41585D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        201 f-s =        313 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.30056D-05
+  2    0.56309D-02    0.56309D-02    0.52582D-08
+  3    0.36024D+00    0.36024D+00    0.30056D-05
+  4    0.31706D+00    0.31706D+00    0.15055D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         21 f-s =         32 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59763D+00    0.59765D+00    0.22714D-04
+  2    0.14024D+01    0.14023D+01    0.22714D-04
+  3   -0.18934D-05   -0.18934D-05    0.36304D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         70 f-s =        117 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99622D+00   -0.99164D+00    0.45755D-02
+  2    0.98698D+00    0.98334D+00    0.36395D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         52 f-s =         83 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85239D+00    0.85240D+00    0.74222D-05
+  2    0.14761D+00    0.14760D+00    0.74222D-05
+  3    0.57732D-07    0.57731D-07    0.90709D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         72 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.97106D-15
+  2    0.47575D-13   -0.16253D-18    0.47575D-13
+  3   -0.16565D-11    0.20260D-16    0.16566D-11
+  4   -0.50714D-11   -0.18531D-14    0.50696D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        215 f-s =        318 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.78411D-04
+  2    0.43050D+00    0.43047D+00    0.34522D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        189 f-s =        316 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.42734D-02    0.42531D-02    0.20365D-04
+  2    0.53422D-02    0.53170D-02    0.25150D-04
+  3    0.26276D+02    0.26276D+02    0.42416D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        292 f-s =        424 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.52553D-04
+  2   -0.20000D+02   -0.20000D+02    0.52554D-04
+  3    0.52329D-04   -0.22476D-06    0.52554D-04
+  4   -0.52328D-04    0.22476D-06    0.52553D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         10 f-s =         29 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.21577D-02    0.16181D-02    0.53967D-03
+  2   -0.57503D-09    0.13822D-09    0.71325D-09
+  3   -0.25475D-10    0.82516D-11    0.33726D-10
+  4   -0.54955D-09    0.12997D-09    0.67952D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        273 f-s =        474 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.98034D-02
+  2    0.13156D-04    0.12711D-04    0.44521D-06
+  3    0.12086D+04    0.12086D+04    0.97308D-02
+  4    0.32464D-03    0.32420D-03    0.44262D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         81 f-s =        113 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39130D+00    0.39127D+00    0.30169D-04
+  2    0.13301D-02    0.13300D-02    0.10244D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         20 f-s =         34 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.15471D-11    0.32359D-12    0.12235D-11
+  2    0.12675D-06    0.23607D-06    0.10931D-06
+  3    0.87327D-13    0.76393D-13    0.10934D-13
+  4    0.87326D-06    0.76393D-06    0.10933D-06
+  5    0.95128D-05    0.32361D-05    0.62767D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1180 f-s =       1914 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.44200D+01    0.44183D+01    0.17101D-02
+  2    0.12901D+01    0.12902D+01    0.15324D-03
+  3    0.30201D+01    0.30193D+01    0.81082D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         45 f-s =         71 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.24133D-13
+  2    0.37136D-02    0.37136D-02    0.63098D-08
+  3    0.61893D-02    0.61893D-02    0.84776D-08
+  4    0.95451D-05    0.95451D-05    0.24174D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30489D-06
+  2   -0.90865D-08    0.20612D-08    0.11148D-07
+  3    0.24157D-22    0.28230D-55    0.24157D-22
+  4   -0.15644D-21    0.52358D-51    0.15644D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        195 f-s =        311 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.54992D-07
+  2    0.20000D+00    0.20000D+00    0.10998D-06
+  3    0.30000D+00    0.30000D+00    0.15608D-06
+  4    0.40000D+00    0.40000D+00    0.18851D-06
+  5    0.50000D+00    0.50000D+00    0.20318D-06
+  6    0.60000D+00    0.60000D+00    0.19717D-06
+  7    0.70000D+00    0.70000D+00    0.16972D-06
+  8    0.80000D+00    0.80000D+00    0.12284D-06
+  9    0.90000D+00    0.90000D+00    0.61422D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        210 f-s =        294 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.13921D-07
+  2    0.13685D-01    0.13685D-01    0.14358D-06
+  3    0.15037D+01    0.15037D+01    0.15468D-04
+  4    0.13533D+00    0.13534D+00    0.11139D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33848D-18    0.22774D-54    0.33848D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        763 f-s =        959 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.88645D-06    0.10042D-08    0.88545D-06
+  2   -0.67775D-05    0.18000D-07    0.67955D-05
+  3   -0.21192D-46    0.00000D+00    0.21192D-46
+  4   -0.17966D-43   -0.60430D-78    0.17966D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        303 f-s =        386 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.27743D-10    0.13312D-21    0.27743D-10
+  2    0.47648D-10   -0.23259D-21    0.47648D-10
+  3   -0.20095D-14    0.15179D-34    0.20095D-14
+  4    0.20735D-06    0.20612D-08    0.20528D-06
+  5    0.47184D-04    0.45400D-04    0.17836D-05
+  6    0.13534D+00    0.13534D+00    0.95883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2684 f-s =       3153 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.30968D-05   -0.31006D-13    0.30968D-05
+  2    0.61734D-05    0.38628D-13    0.61734D-05
+  3    0.18048D-34    0.18049D-34    0.52734D-39
+  4    0.20612D-08    0.20612D-08    0.54548D-16
+  5    0.45400D-04    0.45400D-04    0.30391D-13
+  6    0.13534D+00    0.13534D+00    0.88793D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        186 f-s =        255 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.40036D-03    0.40032D-03    0.33301D-07
+  2    0.40016D-03    0.40016D-03    0.11796D-14
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        178 f-s =        253 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21868D-07
+  2    0.40000D-01    0.40000D-01    0.13655D-08
+  3    0.40016D-01    0.40016D-01    0.90119D-09
+  4    0.40032D-01    0.40032D-01    0.88534D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.23894D-07
+  2    0.40000D+00    0.40000D+00    0.35876D-09
+  3    0.41600D+00    0.41600D+00    0.11849D-07
+  4    0.43331D+00    0.43331D+00    0.21393D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        202 f-s =        315 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40081D-07
+  2    0.40000D+01    0.40000D+01    0.17524D-06
+  3    0.20000D+02    0.20000D+02    0.15440D-05
+  4    0.42000D+03    0.42000D+03    0.59623D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        199 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.61338D-07
+  2    0.80000D+01    0.80000D+01    0.51083D-06
+  3    0.13600D+03    0.13600D+03    0.14301D-04
+  4    0.37128D+05    0.37128D+05    0.35452D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        208 f-s =        366 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.13529D-03
+  2    0.27111D+02    0.27111D+02    0.23503D-03
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        263 f-s =        404 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.92475D-06
+  2    0.91855D-01    0.91855D-01    0.17024D-06
+  3    0.28416D+02    0.28416D+02    0.92473D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        265 f-s =        382 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.27665D-06
+  2    0.56309D-02    0.56309D-02    0.48940D-09
+  3    0.36024D+00    0.36024D+00    0.27665D-06
+  4    0.31706D+00    0.31706D+00    0.13857D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         30 f-s =         45 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59766D+00    0.59765D+00    0.50323D-05
+  2    0.14023D+01    0.14023D+01    0.50323D-05
+  3   -0.18934D-05   -0.18934D-05    0.18292D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        146 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99163D+00   -0.99164D+00    0.12630D-04
+  2    0.98332D+00    0.98334D+00    0.13796D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         61 f-s =         97 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.44471D-05
+  2    0.14760D+00    0.14760D+00    0.44471D-05
+  3    0.57730D-07    0.57731D-07    0.57078D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         86 f-s =        138 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.16002D-15
+  2   -0.17694D-13   -0.16253D-18    0.17694D-13
+  3    0.56855D-11    0.20260D-16    0.56855D-11
+  4   -0.10704D-08   -0.18531D-14    0.10704D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        269 f-s =        402 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.77411D-04
+  2    0.43054D+00    0.43047D+00    0.73975D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        210 f-s =        298 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.42518D-02    0.42531D-02    0.12793D-05
+  2    0.53154D-02    0.53170D-02    0.16210D-05
+  3    0.26276D+02    0.26276D+02    0.48663D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        377 f-s =        527 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.96148D-06
+  2   -0.20000D+02   -0.20000D+02    0.96148D-06
+  3    0.73670D-06   -0.22476D-06    0.96146D-06
+  4   -0.73674D-06    0.22476D-06    0.96150D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         15 f-s =         34 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16162D-02    0.16181D-02    0.18276D-05
+  2    0.14133D-09    0.13822D-09    0.31072D-11
+  3    0.84403D-11    0.82516D-11    0.18870D-12
+  4    0.13289D-09    0.12997D-09    0.29185D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        432 f-s =        764 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.14824D-02
+  2    0.12711D-04    0.12711D-04    0.18621D-09
+  3    0.12086D+04    0.12086D+04    0.14713D-02
+  4    0.32420D-03    0.32420D-03    0.18563D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        102 f-s =        141 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39128D+00    0.39127D+00    0.78947D-05
+  2    0.13300D-02    0.13300D-02    0.26820D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         27 f-s =         45 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.00000D+00    0.32359D-12    0.32359D-12
+  2    0.29142D-06    0.23607D-06    0.55353D-07
+  3    0.34530D-12    0.76393D-13    0.26890D-12
+  4    0.70882D-06    0.76393D-06    0.55110D-07
+  5    0.29320D-05    0.32361D-05    0.30404D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1348 f-s =       2337 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.44185D+01    0.44183D+01    0.20587D-03
+  2    0.12902D+01    0.12902D+01    0.19429D-04
+  3    0.30194D+01    0.30193D+01    0.88724D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         70 f-s =        103 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.30230D-13
+  2    0.37136D-02    0.37136D-02    0.50903D-08
+  3    0.61893D-02    0.61893D-02    0.70973D-08
+  4    0.95451D-05    0.95451D-05    0.30292D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        278 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30488D-06
+  2   -0.90858D-08    0.20612D-08    0.11147D-07
+  3    0.24100D-22    0.28230D-55    0.24100D-22
+  4   -0.15607D-21    0.52358D-51    0.15607D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        195 f-s =        391 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.55209D-07
+  2    0.20000D+00    0.20000D+00    0.10988D-06
+  3    0.30000D+00    0.30000D+00    0.15571D-06
+  4    0.40000D+00    0.40000D+00    0.18820D-06
+  5    0.50000D+00    0.50000D+00    0.20257D-06
+  6    0.60000D+00    0.60000D+00    0.19654D-06
+  7    0.70000D+00    0.70000D+00    0.16920D-06
+  8    0.80000D+00    0.80000D+00    0.12248D-06
+  9    0.90000D+00    0.90000D+00    0.61245D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        210 f-s =        334 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.13932D-07
+  2    0.13685D-01    0.13685D-01    0.14370D-06
+  3    0.15037D+01    0.15037D+01    0.15480D-04
+  4    0.13533D+00    0.13534D+00    0.11144D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        530 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33857D-18    0.22774D-54    0.33857D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        763 f-s =       1099 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.88636D-06    0.10042D-08    0.88536D-06
+  2   -0.67739D-05    0.18000D-07    0.67919D-05
+  3   -0.21134D-46    0.00000D+00    0.21134D-46
+  4   -0.17809D-43   -0.60430D-78    0.17809D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        231 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        249 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        303 f-s =        464 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.27743D-10    0.13312D-21    0.27743D-10
+  2    0.47648D-10   -0.23259D-21    0.47648D-10
+  3   -0.20095D-14    0.15179D-34    0.20095D-14
+  4    0.20735D-06    0.20612D-08    0.20528D-06
+  5    0.47184D-04    0.45400D-04    0.17836D-05
+  6    0.13534D+00    0.13534D+00    0.95883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2684 f-s =       3723 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1    0.30963D-05   -0.31006D-13    0.30963D-05
+  2    0.61736D-05    0.38628D-13    0.61736D-05
+  3    0.18048D-34    0.18049D-34    0.52734D-39
+  4    0.20612D-08    0.20612D-08    0.54546D-16
+  5    0.45400D-04    0.45400D-04    0.30369D-13
+  6    0.13534D+00    0.13534D+00    0.90111D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        183 f-s =        301 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.40123D-03    0.40032D-03    0.90321D-06
+  2    0.40016D-03    0.40016D-03    0.76340D-10
+  3    0.40000D-03    0.40000D-03    0.13119D-15
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        177 f-s =        287 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21958D-06
+  2    0.40000D-01    0.40000D-01    0.97446D-08
+  3    0.40016D-01    0.40016D-01    0.90187D-08
+  4    0.40032D-01    0.40032D-01    0.88876D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        173 f-s =        290 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.13264D-05
+  2    0.40000D+00    0.40000D+00    0.63432D-06
+  3    0.41600D+00    0.41600D+00    0.59830D-06
+  4    0.43330D+00    0.43331D+00    0.63800D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        194 f-s =        319 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.57376D-07
+  2    0.40000D+01    0.40000D+01    0.25479D-06
+  3    0.20000D+02    0.20000D+02    0.23238D-05
+  4    0.42000D+03    0.42000D+03    0.96022D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        192 f-s =        322 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10301D-06
+  2    0.80000D+01    0.80000D+01    0.89205D-06
+  3    0.13600D+03    0.13600D+03    0.28227D-04
+  4    0.37128D+05    0.37128D+05    0.13233D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        177 f-s =        325 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.20596D-03
+  2    0.27111D+02    0.27111D+02    0.18306D-03
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        223 f-s =        384 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.11874D-05
+  2    0.91856D-01    0.91855D-01    0.48111D-06
+  3    0.28416D+02    0.28416D+02    0.11874D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        249 f-s =        407 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.56288D-07
+  2    0.56309D-02    0.56309D-02    0.10958D-09
+  3    0.36024D+00    0.36024D+00    0.56288D-07
+  4    0.31706D+00    0.31706D+00    0.28199D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         30 f-s =         54 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.59766D+00    0.59765D+00    0.50882D-05
+  2    0.14023D+01    0.14023D+01    0.50882D-05
+  3   -0.18934D-05   -0.18934D-05    0.17887D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        159 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99163D+00   -0.99164D+00    0.14228D-04
+  2    0.98332D+00    0.98334D+00    0.17239D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         59 f-s =        131 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12928D-05
+  2    0.14760D+00    0.14760D+00    0.12928D-05
+  3    0.57731D-07    0.57731D-07    0.11043D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         87 f-s =        163 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.41251D-15
+  2   -0.67950D-14   -0.16253D-18    0.67948D-14
+  3    0.61930D-11    0.20260D-16    0.61930D-11
+  4   -0.13112D-08   -0.18531D-14    0.13112D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        248 f-s =        387 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.42142D-04
+  2    0.43051D+00    0.43047D+00    0.43792D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        222 f-s =        387 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.42529D-02    0.42531D-02    0.19920D-06
+  2    0.53168D-02    0.53170D-02    0.25011D-06
+  3    0.26276D+02    0.26276D+02    0.12284D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        562 f-s =       1511 J-s =         80
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.38752D-04
+  2   -0.20000D+02   -0.20000D+02    0.38816D-04
+  3   -0.38986D-04   -0.22476D-06    0.38761D-04
+  4    0.39032D-04    0.22476D-06    0.38807D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         14 f-s =         84 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.16055D-02    0.16181D-02    0.12578D-04
+  2    0.12369D-09    0.13822D-09    0.14531D-10
+  3    0.74219D-11    0.82516D-11    0.82967D-12
+  4    0.11627D-09    0.12997D-09    0.13699D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        406 f-s =        801 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.33431D-03
+  2    0.12711D-04    0.12711D-04    0.43433D-10
+  3    0.12086D+04    0.12086D+04    0.33184D-03
+  4    0.32420D-03    0.32420D-03    0.43299D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        102 f-s =        155 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39128D+00    0.39127D+00    0.83441D-05
+  2    0.13300D-02    0.13300D-02    0.28346D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         27 f-s =         65 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.00000D+00    0.32359D-12    0.32359D-12
+  2    0.29136D-06    0.23607D-06    0.55291D-07
+  3    0.34580D-12    0.76393D-13    0.26941D-12
+  4    0.70890D-06    0.76393D-06    0.55036D-07
+  5    0.29338D-05    0.32361D-05    0.30228D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1224 f-s =       2386 J-s =         54
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.64346D-05
+  2    0.12902D+01    0.12902D+01    0.64769D-06
+  3    0.30193D+01    0.30193D+01    0.39711D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        134 f-s =        248 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.14569D-16
+  2    0.37136D-02    0.37136D-02    0.32130D-12
+  3    0.61893D-02    0.61893D-02    0.53584D-12
+  4    0.95451D-05    0.95451D-05    0.14540D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30489D-06
+  2   -0.90865D-08    0.20612D-08    0.11148D-07
+  3    0.24157D-22    0.28230D-55    0.24157D-22
+  4   -0.15644D-21    0.52358D-51    0.15644D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        195 f-s =        311 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.54992D-07
+  2    0.20000D+00    0.20000D+00    0.10998D-06
+  3    0.30000D+00    0.30000D+00    0.15608D-06
+  4    0.40000D+00    0.40000D+00    0.18851D-06
+  5    0.50000D+00    0.50000D+00    0.20318D-06
+  6    0.60000D+00    0.60000D+00    0.19717D-06
+  7    0.70000D+00    0.70000D+00    0.16972D-06
+  8    0.80000D+00    0.80000D+00    0.12284D-06
+  9    0.90000D+00    0.90000D+00    0.61422D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        210 f-s =        294 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.13921D-07
+  2    0.13685D-01    0.13685D-01    0.14358D-06
+  3    0.15037D+01    0.15037D+01    0.15468D-04
+  4    0.13533D+00    0.13534D+00    0.11139D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33848D-18    0.22774D-54    0.33848D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        763 f-s =        959 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.88645D-06    0.10042D-08    0.88545D-06
+  2   -0.67775D-05    0.18000D-07    0.67955D-05
+  3   -0.21192D-46    0.00000D+00    0.21192D-46
+  4   -0.17966D-43   -0.60430D-78    0.17966D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        303 f-s =        386 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.27743D-10    0.13312D-21    0.27743D-10
+  2    0.47648D-10   -0.23259D-21    0.47648D-10
+  3   -0.20095D-14    0.15179D-34    0.20095D-14
+  4    0.20735D-06    0.20612D-08    0.20528D-06
+  5    0.47184D-04    0.45400D-04    0.17836D-05
+  6    0.13534D+00    0.13534D+00    0.95883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2684 f-s =       3153 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.30968D-05   -0.31006D-13    0.30968D-05
+  2    0.61734D-05    0.38628D-13    0.61734D-05
+  3    0.18048D-34    0.18049D-34    0.52734D-39
+  4    0.20612D-08    0.20612D-08    0.54548D-16
+  5    0.45400D-04    0.45400D-04    0.30391D-13
+  6    0.13534D+00    0.13534D+00    0.88793D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        186 f-s =        255 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.40036D-03    0.40032D-03    0.33301D-07
+  2    0.40016D-03    0.40016D-03    0.11796D-14
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        178 f-s =        253 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21868D-07
+  2    0.40000D-01    0.40000D-01    0.13655D-08
+  3    0.40016D-01    0.40016D-01    0.90119D-09
+  4    0.40032D-01    0.40032D-01    0.88534D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.23894D-07
+  2    0.40000D+00    0.40000D+00    0.35876D-09
+  3    0.41600D+00    0.41600D+00    0.11849D-07
+  4    0.43331D+00    0.43331D+00    0.21393D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        202 f-s =        315 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40081D-07
+  2    0.40000D+01    0.40000D+01    0.17524D-06
+  3    0.20000D+02    0.20000D+02    0.15440D-05
+  4    0.42000D+03    0.42000D+03    0.59623D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        199 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.61338D-07
+  2    0.80000D+01    0.80000D+01    0.51083D-06
+  3    0.13600D+03    0.13600D+03    0.14301D-04
+  4    0.37128D+05    0.37128D+05    0.35452D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        208 f-s =        366 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.13529D-03
+  2    0.27111D+02    0.27111D+02    0.23503D-03
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        263 f-s =        404 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.92475D-06
+  2    0.91855D-01    0.91855D-01    0.17024D-06
+  3    0.28416D+02    0.28416D+02    0.92473D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        265 f-s =        382 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.27665D-06
+  2    0.56309D-02    0.56309D-02    0.48940D-09
+  3    0.36024D+00    0.36024D+00    0.27665D-06
+  4    0.31706D+00    0.31706D+00    0.13857D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         30 f-s =         45 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59766D+00    0.59765D+00    0.50323D-05
+  2    0.14023D+01    0.14023D+01    0.50323D-05
+  3   -0.18934D-05   -0.18934D-05    0.18292D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        146 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99163D+00   -0.99164D+00    0.12630D-04
+  2    0.98332D+00    0.98334D+00    0.13796D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         61 f-s =         97 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.44471D-05
+  2    0.14760D+00    0.14760D+00    0.44471D-05
+  3    0.57730D-07    0.57731D-07    0.57078D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         86 f-s =        138 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.16002D-15
+  2   -0.17694D-13   -0.16253D-18    0.17694D-13
+  3    0.56855D-11    0.20260D-16    0.56855D-11
+  4   -0.10704D-08   -0.18531D-14    0.10704D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        269 f-s =        402 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.77411D-04
+  2    0.43054D+00    0.43047D+00    0.73975D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        210 f-s =        298 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.42518D-02    0.42531D-02    0.12793D-05
+  2    0.53154D-02    0.53170D-02    0.16210D-05
+  3    0.26276D+02    0.26276D+02    0.48663D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        377 f-s =        527 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.96148D-06
+  2   -0.20000D+02   -0.20000D+02    0.96148D-06
+  3    0.73670D-06   -0.22476D-06    0.96146D-06
+  4   -0.73674D-06    0.22476D-06    0.96150D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         15 f-s =         34 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16162D-02    0.16181D-02    0.18276D-05
+  2    0.14133D-09    0.13822D-09    0.31072D-11
+  3    0.84403D-11    0.82516D-11    0.18870D-12
+  4    0.13289D-09    0.12997D-09    0.29185D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        432 f-s =        764 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.14824D-02
+  2    0.12711D-04    0.12711D-04    0.18621D-09
+  3    0.12086D+04    0.12086D+04    0.14713D-02
+  4    0.32420D-03    0.32420D-03    0.18563D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        102 f-s =        141 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39128D+00    0.39127D+00    0.78947D-05
+  2    0.13300D-02    0.13300D-02    0.26820D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         27 f-s =         45 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.00000D+00    0.32359D-12    0.32359D-12
+  2    0.29142D-06    0.23607D-06    0.55353D-07
+  3    0.34530D-12    0.76393D-13    0.26890D-12
+  4    0.70882D-06    0.76393D-06    0.55110D-07
+  5    0.29320D-05    0.32361D-05    0.30404D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1348 f-s =       2337 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.44185D+01    0.44183D+01    0.20587D-03
+  2    0.12902D+01    0.12902D+01    0.19429D-04
+  3    0.30194D+01    0.30193D+01    0.88724D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         70 f-s =        103 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.30230D-13
+  2    0.37136D-02    0.37136D-02    0.50903D-08
+  3    0.61893D-02    0.61893D-02    0.70973D-08
+  4    0.95451D-05    0.95451D-05    0.30292D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        251 f-s =        399 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.25829D-07
+  2    0.20000D+00    0.20000D+00    0.51658D-07
+  3    0.30000D+00    0.30000D+00    0.72245D-07
+  4    0.40000D+00    0.40000D+00    0.85497D-07
+  5    0.50000D+00    0.50000D+00    0.90068D-07
+  6    0.60000D+00    0.60000D+00    0.85501D-07
+  7    0.70000D+00    0.70000D+00    0.72253D-07
+  8    0.80000D+00    0.80000D+00    0.51668D-07
+  9    0.90000D+00    0.90000D+00    0.25835D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        290 f-s =        401 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.37284D-09
+  2    0.13685D-01    0.13685D-01    0.37959D-08
+  3    0.15037D+01    0.15037D+01    0.41427D-06
+  4    0.13534D+00    0.13534D+00    0.34738D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43440D-08    0.12659D-13    0.43440D-08
+  3    0.40051D-16    0.19115D-41    0.40051D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23570D-80    0.00000D+00    0.23570D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1094 f-s =       1357 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.92915D-07    0.10042D-08    0.93919D-07
+  2    0.43119D-06    0.18000D-07    0.41319D-06
+  3    0.16872D-46    0.00000D+00    0.16872D-46
+  4    0.31547D-43   -0.60430D-78    0.31547D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        364 f-s =        453 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17323D-10    0.13312D-21    0.17323D-10
+  2   -0.39927D-10   -0.23259D-21    0.39927D-10
+  3   -0.76656D-17    0.15179D-34    0.76656D-17
+  4    0.29890D-08    0.20612D-08    0.92781D-09
+  5    0.45529D-04    0.45400D-04    0.12901D-06
+  6    0.13534D+00    0.13534D+00    0.12839D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2961 f-s =       3451 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.11408D-05   -0.31006D-13    0.11408D-05
+  2   -0.24118D-05    0.38628D-13    0.24118D-05
+  3    0.18048D-34    0.18049D-34    0.51555D-39
+  4    0.20612D-08    0.20612D-08    0.54548D-16
+  5    0.45400D-04    0.45400D-04    0.36455D-13
+  6    0.13534D+00    0.13534D+00    0.70915D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        267 f-s =        354 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.57591D-08
+  2    0.40016D-03    0.40016D-03    0.94916D-15
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        242 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.19503D-07
+  2    0.40000D-01    0.40000D-01    0.85634D-09
+  3    0.40016D-01    0.40016D-01    0.80066D-09
+  4    0.40032D-01    0.40032D-01    0.78917D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        241 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.71641D-07
+  2    0.40000D+00    0.40000D+00    0.31873D-07
+  3    0.41600D+00    0.41600D+00    0.31989D-07
+  4    0.43331D+00    0.43331D+00    0.34204D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        374 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.38473D-07
+  2    0.40000D+01    0.40000D+01    0.17100D-06
+  3    0.20000D+02    0.20000D+02    0.15613D-05
+  4    0.42000D+03    0.42000D+03    0.64642D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        256 f-s =        342 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.37442D-07
+  2    0.80000D+01    0.80000D+01    0.33291D-06
+  3    0.13600D+03    0.13600D+03    0.11234D-04
+  4    0.37128D+05    0.37128D+05    0.61838D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        274 f-s =        420 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.20445D-04
+  2    0.27111D+02    0.27111D+02    0.23586D-04
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        299 f-s =        420 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.25631D-06
+  2    0.91855D-01    0.91855D-01    0.86989D-07
+  3    0.28416D+02    0.28416D+02    0.25632D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        326 f-s =        476 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.65874D-09
+  2    0.56309D-02    0.56309D-02    0.24086D-11
+  3    0.36024D+00    0.36024D+00    0.65874D-09
+  4    0.31706D+00    0.31706D+00    0.33057D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         55 f-s =         81 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.22796D-07
+  2    0.14023D+01    0.14023D+01    0.22809D-07
+  3   -0.18934D-05   -0.18934D-05    0.12122D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        263 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.11003D-05
+  2    0.98334D+00    0.98334D+00    0.13145D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        147 f-s =        245 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.19589D-07
+  2    0.14760D+00    0.14760D+00    0.19589D-07
+  3    0.57731D-07    0.57731D-07    0.24853D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        108 f-s =        172 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.85096D-14
+  2    0.56666D-12   -0.16253D-18    0.56666D-12
+  3   -0.32494D-10    0.20260D-16    0.32494D-10
+  4    0.19435D-08   -0.18531D-14    0.19435D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        364 f-s =        501 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.11002D-04
+  2    0.43048D+00    0.43047D+00    0.11205D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        327 f-s =        514 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.42528D-02    0.42531D-02    0.28951D-06
+  2    0.53167D-02    0.53170D-02    0.35936D-06
+  3    0.26276D+02    0.26276D+02    0.23507D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        552 f-s =        725 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.82983D-08
+  2   -0.20000D+02   -0.20000D+02    0.82987D-08
+  3   -0.21646D-06   -0.22476D-06    0.82990D-08
+  4    0.21647D-06    0.22476D-06    0.82981D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         22 f-s =         42 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16169D-02    0.16181D-02    0.11765D-05
+  2    0.13854D-09    0.13822D-09    0.31150D-12
+  3    0.82751D-11    0.82516D-11    0.23526D-13
+  4    0.13026D-09    0.12997D-09    0.28798D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        610 f-s =       1079 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.32637D-04
+  2    0.12681D-04    0.12711D-04    0.29772D-07
+  3    0.12086D+04    0.12086D+04    0.32384D-04
+  4    0.32417D-03    0.32420D-03    0.29589D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        123 f-s =        192 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.80363D-06
+  2    0.13300D-02    0.13300D-02    0.27288D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         46 f-s =         64 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.73298D-13    0.32359D-12    0.25029D-12
+  2    0.23761D-06    0.23607D-06    0.15378D-08
+  3    0.17406D-12    0.76393D-13    0.97665D-13
+  4    0.76254D-06    0.76393D-06    0.13898D-08
+  5    0.33423D-05    0.32361D-05    0.10621D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1637 f-s =       2695 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.32802D-04
+  2    0.12902D+01    0.12902D+01    0.27986D-05
+  3    0.30193D+01    0.30193D+01    0.89456D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        117 f-s =        197 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.54929D-17
+  2    0.37136D-02    0.37136D-02    0.26523D-12
+  3    0.61893D-02    0.61893D-02    0.85288D-13
+  4    0.95451D-05    0.95451D-05    0.55243D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        340 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        256 f-s =        525 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.55530D-07
+  2    0.20000D+00    0.20000D+00    0.11105D-06
+  3    0.30000D+00    0.30000D+00    0.15529D-06
+  4    0.40000D+00    0.40000D+00    0.18391D-06
+  5    0.50000D+00    0.50000D+00    0.19394D-06
+  6    0.60000D+00    0.60000D+00    0.18427D-06
+  7    0.70000D+00    0.70000D+00    0.15584D-06
+  8    0.80000D+00    0.80000D+00    0.11150D-06
+  9    0.90000D+00    0.90000D+00    0.55753D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        289 f-s =        454 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.22364D-09
+  2    0.13685D-01    0.13685D-01    0.32517D-08
+  3    0.15037D+01    0.15037D+01    0.24850D-06
+  4    0.13534D+00    0.13534D+00    0.75664D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        705 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43440D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23570D-80    0.00000D+00    0.23570D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1094 f-s =       1545 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.92915D-07    0.10042D-08    0.93919D-07
+  2    0.43119D-06    0.18000D-07    0.41319D-06
+  3    0.16989D-46    0.00000D+00    0.16989D-46
+  4    0.31543D-43   -0.60430D-78    0.31543D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        324 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        364 f-s =        549 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17323D-10    0.13312D-21    0.17323D-10
+  2   -0.39927D-10   -0.23259D-21    0.39927D-10
+  3   -0.76656D-17    0.15179D-34    0.76656D-17
+  4    0.29890D-08    0.20612D-08    0.92781D-09
+  5    0.45529D-04    0.45400D-04    0.12901D-06
+  6    0.13534D+00    0.13534D+00    0.12839D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2961 f-s =       4129 J-s =         84
+ Computed and reference solutions and absolute errors follow:
+  1    0.11409D-05   -0.31006D-13    0.11409D-05
+  2   -0.24119D-05    0.38628D-13    0.24119D-05
+  3    0.18048D-34    0.18049D-34    0.51555D-39
+  4    0.20612D-08    0.20612D-08    0.54548D-16
+  5    0.45400D-04    0.45400D-04    0.36454D-13
+  6    0.13534D+00    0.13534D+00    0.72137D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        266 f-s =        409 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.85781D-08
+  2    0.40016D-03    0.40016D-03    0.16881D-13
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        241 f-s =        379 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.41482D-06
+  2    0.40000D-01    0.40000D-01    0.18443D-07
+  3    0.40016D-01    0.40016D-01    0.17034D-07
+  4    0.40032D-01    0.40032D-01    0.16789D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        240 f-s =        369 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.85808D-07
+  2    0.40000D+00    0.40000D+00    0.37821D-07
+  3    0.41600D+00    0.41600D+00    0.38268D-07
+  4    0.43331D+00    0.43331D+00    0.40930D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        412 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.12826D-07
+  2    0.40000D+01    0.40000D+01    0.57010D-07
+  3    0.20000D+02    0.20000D+02    0.52041D-06
+  4    0.42000D+03    0.42000D+03    0.21539D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        258 f-s =        413 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.50106D-08
+  2    0.80000D+01    0.80000D+01    0.44534D-07
+  3    0.13600D+03    0.13600D+03    0.15023D-05
+  4    0.37128D+05    0.37128D+05    0.82646D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        323 f-s =        547 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.16189D-04
+  2    0.27111D+02    0.27111D+02    0.14676D-04
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        268 f-s =        420 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.47019D-07
+  2    0.91855D-01    0.91855D-01    0.10600D-06
+  3    0.28416D+02    0.28416D+02    0.47030D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        310 f-s =        515 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.12084D-06
+  2    0.56309D-02    0.56309D-02    0.23564D-09
+  3    0.36024D+00    0.36024D+00    0.12084D-06
+  4    0.31706D+00    0.31706D+00    0.60540D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         55 f-s =         90 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.22796D-07
+  2    0.14023D+01    0.14023D+01    0.22809D-07
+  3   -0.18934D-05   -0.18934D-05    0.12122D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        150 f-s =        261 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.50192D-05
+  2    0.98333D+00    0.98334D+00    0.56839D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         84 f-s =        163 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.23374D-06
+  2    0.14760D+00    0.14760D+00    0.23374D-06
+  3    0.57731D-07    0.57731D-07    0.19821D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        106 f-s =        190 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.11209D-13
+  2   -0.67171D-12   -0.16253D-18    0.67171D-12
+  3    0.34504D-10    0.20260D-16    0.34504D-10
+  4   -0.22232D-08   -0.18531D-14    0.22232D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        366 f-s =        530 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.66851D-05
+  2    0.43048D+00    0.43047D+00    0.70297D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        327 f-s =        546 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.42533D-02    0.42531D-02    0.27472D-06
+  2    0.53174D-02    0.53170D-02    0.34341D-06
+  3    0.26276D+02    0.26276D+02    0.56879D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        811 f-s =       2010 J-s =         95
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.11932D-05
+  2   -0.20000D+02   -0.20000D+02    0.11980D-05
+  3   -0.14060D-05   -0.22476D-06    0.11812D-05
+  4    0.14348D-05    0.22476D-06    0.12100D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         20 f-s =         72 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16182D-02    0.16181D-02    0.10684D-06
+  2    0.13818D-09    0.13822D-09    0.42949D-13
+  3    0.82495D-11    0.82516D-11    0.20530D-14
+  4    0.12993D-09    0.12997D-09    0.40896D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        529 f-s =       1058 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.24654D-04
+  2    0.12711D-04    0.12711D-04    0.27143D-11
+  3    0.12086D+04    0.12086D+04    0.24467D-04
+  4    0.32420D-03    0.32420D-03    0.27069D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        121 f-s =        195 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.69584D-06
+  2    0.13300D-02    0.13300D-02    0.23621D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         46 f-s =         85 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.33014D-12    0.32359D-12    0.65466D-14
+  2    0.23260D-06    0.23607D-06    0.34637D-08
+  3    0.76755D-13    0.76393D-13    0.36185D-15
+  4    0.76755D-06    0.76393D-06    0.36185D-08
+  5    0.33000D-05    0.32361D-05    0.63975D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1569 f-s =       2747 J-s =         64
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.14950D-04
+  2    0.12902D+01    0.12902D+01    0.11952D-05
+  3    0.30193D+01    0.30193D+01    0.35316D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        109 f-s =        235 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.25752D-15
+  2    0.37136D-02    0.37136D-02    0.56810D-11
+  3    0.61893D-02    0.61893D-02    0.94684D-11
+  4    0.95451D-05    0.95451D-05    0.25751D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        251 f-s =        399 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.25829D-07
+  2    0.20000D+00    0.20000D+00    0.51658D-07
+  3    0.30000D+00    0.30000D+00    0.72245D-07
+  4    0.40000D+00    0.40000D+00    0.85497D-07
+  5    0.50000D+00    0.50000D+00    0.90068D-07
+  6    0.60000D+00    0.60000D+00    0.85501D-07
+  7    0.70000D+00    0.70000D+00    0.72253D-07
+  8    0.80000D+00    0.80000D+00    0.51668D-07
+  9    0.90000D+00    0.90000D+00    0.25835D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        290 f-s =        401 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.37284D-09
+  2    0.13685D-01    0.13685D-01    0.37959D-08
+  3    0.15037D+01    0.15037D+01    0.41427D-06
+  4    0.13534D+00    0.13534D+00    0.34738D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43440D-08    0.12659D-13    0.43440D-08
+  3    0.40051D-16    0.19115D-41    0.40051D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23570D-80    0.00000D+00    0.23570D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1094 f-s =       1357 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.92915D-07    0.10042D-08    0.93919D-07
+  2    0.43119D-06    0.18000D-07    0.41319D-06
+  3    0.16872D-46    0.00000D+00    0.16872D-46
+  4    0.31547D-43   -0.60430D-78    0.31547D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        364 f-s =        453 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17323D-10    0.13312D-21    0.17323D-10
+  2   -0.39927D-10   -0.23259D-21    0.39927D-10
+  3   -0.76656D-17    0.15179D-34    0.76656D-17
+  4    0.29890D-08    0.20612D-08    0.92781D-09
+  5    0.45529D-04    0.45400D-04    0.12901D-06
+  6    0.13534D+00    0.13534D+00    0.12839D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2961 f-s =       3451 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.11408D-05   -0.31006D-13    0.11408D-05
+  2   -0.24118D-05    0.38628D-13    0.24118D-05
+  3    0.18048D-34    0.18049D-34    0.51555D-39
+  4    0.20612D-08    0.20612D-08    0.54548D-16
+  5    0.45400D-04    0.45400D-04    0.36455D-13
+  6    0.13534D+00    0.13534D+00    0.70915D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        267 f-s =        354 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.57591D-08
+  2    0.40016D-03    0.40016D-03    0.94916D-15
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        242 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.19503D-07
+  2    0.40000D-01    0.40000D-01    0.85634D-09
+  3    0.40016D-01    0.40016D-01    0.80066D-09
+  4    0.40032D-01    0.40032D-01    0.78917D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        241 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.71641D-07
+  2    0.40000D+00    0.40000D+00    0.31873D-07
+  3    0.41600D+00    0.41600D+00    0.31989D-07
+  4    0.43331D+00    0.43331D+00    0.34204D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        374 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.38473D-07
+  2    0.40000D+01    0.40000D+01    0.17100D-06
+  3    0.20000D+02    0.20000D+02    0.15613D-05
+  4    0.42000D+03    0.42000D+03    0.64642D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        256 f-s =        342 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.37442D-07
+  2    0.80000D+01    0.80000D+01    0.33291D-06
+  3    0.13600D+03    0.13600D+03    0.11234D-04
+  4    0.37128D+05    0.37128D+05    0.61838D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        274 f-s =        420 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.20445D-04
+  2    0.27111D+02    0.27111D+02    0.23586D-04
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        299 f-s =        420 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.25631D-06
+  2    0.91855D-01    0.91855D-01    0.86989D-07
+  3    0.28416D+02    0.28416D+02    0.25632D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        326 f-s =        476 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.65874D-09
+  2    0.56309D-02    0.56309D-02    0.24086D-11
+  3    0.36024D+00    0.36024D+00    0.65874D-09
+  4    0.31706D+00    0.31706D+00    0.33057D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         55 f-s =         81 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.22796D-07
+  2    0.14023D+01    0.14023D+01    0.22809D-07
+  3   -0.18934D-05   -0.18934D-05    0.12122D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        263 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.11003D-05
+  2    0.98334D+00    0.98334D+00    0.13145D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        147 f-s =        245 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.19589D-07
+  2    0.14760D+00    0.14760D+00    0.19589D-07
+  3    0.57731D-07    0.57731D-07    0.24853D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        108 f-s =        172 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.85096D-14
+  2    0.56666D-12   -0.16253D-18    0.56666D-12
+  3   -0.32494D-10    0.20260D-16    0.32494D-10
+  4    0.19435D-08   -0.18531D-14    0.19435D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        364 f-s =        501 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.11002D-04
+  2    0.43048D+00    0.43047D+00    0.11205D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        327 f-s =        514 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.42528D-02    0.42531D-02    0.28951D-06
+  2    0.53167D-02    0.53170D-02    0.35936D-06
+  3    0.26276D+02    0.26276D+02    0.23507D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        552 f-s =        725 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.82983D-08
+  2   -0.20000D+02   -0.20000D+02    0.82987D-08
+  3   -0.21646D-06   -0.22476D-06    0.82990D-08
+  4    0.21647D-06    0.22476D-06    0.82981D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         22 f-s =         42 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16169D-02    0.16181D-02    0.11765D-05
+  2    0.13854D-09    0.13822D-09    0.31150D-12
+  3    0.82751D-11    0.82516D-11    0.23526D-13
+  4    0.13026D-09    0.12997D-09    0.28798D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        610 f-s =       1079 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.32637D-04
+  2    0.12681D-04    0.12711D-04    0.29772D-07
+  3    0.12086D+04    0.12086D+04    0.32384D-04
+  4    0.32417D-03    0.32420D-03    0.29589D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        123 f-s =        192 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.80363D-06
+  2    0.13300D-02    0.13300D-02    0.27288D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         46 f-s =         64 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.73298D-13    0.32359D-12    0.25029D-12
+  2    0.23761D-06    0.23607D-06    0.15378D-08
+  3    0.17406D-12    0.76393D-13    0.97665D-13
+  4    0.76254D-06    0.76393D-06    0.13898D-08
+  5    0.33423D-05    0.32361D-05    0.10621D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1637 f-s =       2695 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.32802D-04
+  2    0.12902D+01    0.12902D+01    0.27986D-05
+  3    0.30193D+01    0.30193D+01    0.89456D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        117 f-s =        197 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.54929D-17
+  2    0.37136D-02    0.37136D-02    0.26523D-12
+  3    0.61893D-02    0.61893D-02    0.85288D-13
+  4    0.95451D-05    0.95451D-05    0.55243D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        354 f-s =        526 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.27035D-08
+  2    0.20000D+00    0.20000D+00    0.54053D-08
+  3    0.30000D+00    0.30000D+00    0.75586D-08
+  4    0.40000D+00    0.40000D+00    0.89458D-08
+  5    0.50000D+00    0.50000D+00    0.94242D-08
+  6    0.60000D+00    0.60000D+00    0.89457D-08
+  7    0.70000D+00    0.70000D+00    0.75592D-08
+  8    0.80000D+00    0.80000D+00    0.54053D-08
+  9    0.90000D+00    0.90000D+00    0.27028D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        400 f-s =        514 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10797D-09
+  2    0.13685D-01    0.13685D-01    0.10870D-08
+  3    0.15037D+01    0.15037D+01    0.11996D-06
+  4    0.13534D+00    0.13534D+00    0.11264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1510 f-s =       1803 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16803D-07    0.10042D-08    0.17807D-07
+  2    0.81112D-07    0.18000D-07    0.63111D-07
+  3   -0.28797D-66    0.00000D+00    0.28797D-66
+  4    0.23743D-64   -0.60430D-78    0.23743D-64
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.88001D-22    0.61813D-30    0.88001D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        592 f-s =        737 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.14587D-10    0.13312D-21    0.14587D-10
+  2   -0.67278D-11   -0.23259D-21    0.67278D-11
+  3   -0.80778D-24    0.15179D-34    0.80778D-24
+  4    0.22822D-08    0.20612D-08    0.22107D-09
+  5    0.45437D-04    0.45400D-04    0.37012D-07
+  6    0.13534D+00    0.13534D+00    0.43414D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3304 f-s =       3852 J-s =         60
+ Computed and reference solutions and absolute errors follow:
+  1   -0.46625D-07   -0.31006D-13    0.46625D-07
+  2    0.87365D-07    0.38628D-13    0.87365D-07
+  3    0.18048D-34    0.18049D-34    0.49651D-39
+  4    0.20612D-08    0.20612D-08    0.52735D-16
+  5    0.45400D-04    0.45400D-04    0.35925D-13
+  6    0.13534D+00    0.13534D+00    0.23148D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        368 f-s =        463 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.34941D-08
+  2    0.40016D-03    0.40016D-03    0.70473D-18
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        340 f-s =        444 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.56117D-07
+  2    0.40000D-01    0.40000D-01    0.24918D-08
+  3    0.40016D-01    0.40016D-01    0.23024D-08
+  4    0.40032D-01    0.40032D-01    0.22707D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        327 f-s =        415 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.30034D-09
+  2    0.40000D+00    0.40000D+00    0.13360D-09
+  3    0.41600D+00    0.41600D+00    0.13422D-09
+  4    0.43331D+00    0.43331D+00    0.14354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        341 f-s =        445 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10593D-08
+  2    0.40000D+01    0.40000D+01    0.46847D-08
+  3    0.20000D+02    0.20000D+02    0.42415D-07
+  4    0.42000D+03    0.42000D+03    0.17307D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        351 f-s =        460 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.64595D-08
+  2    0.80000D+01    0.80000D+01    0.57420D-07
+  3    0.13600D+03    0.13600D+03    0.19376D-05
+  4    0.37128D+05    0.37128D+05    0.10668D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        418 f-s =        611 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.16291D-05
+  2    0.27111D+02    0.27111D+02    0.17604D-05
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        419 f-s =        596 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.57623D-08
+  2    0.91855D-01    0.91855D-01    0.21016D-08
+  3    0.28416D+02    0.28416D+02    0.57625D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        434 f-s =        580 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.87616D-08
+  2    0.56309D-02    0.56309D-02    0.17084D-10
+  3    0.36024D+00    0.36024D+00    0.87616D-08
+  4    0.31706D+00    0.31706D+00    0.43893D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         65 f-s =        100 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.27091D-06
+  2    0.14023D+01    0.14023D+01    0.27091D-06
+  3   -0.18934D-05   -0.18934D-05    0.26351D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        217 f-s =        335 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.59941D-06
+  2    0.98334D+00    0.98334D+00    0.68338D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        147 f-s =        230 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.34370D-07
+  2    0.14760D+00    0.14760D+00    0.34370D-07
+  3    0.57731D-07    0.57731D-07    0.42851D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        135 f-s =        208 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.24053D-15
+  2   -0.19908D-13   -0.16253D-18    0.19908D-13
+  3    0.14481D-11    0.20260D-16    0.14481D-11
+  4   -0.94768D-10   -0.18531D-14    0.94766D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        531 f-s =        666 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13623D-05
+  2    0.43047D+00    0.43047D+00    0.14174D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        384 f-s =        578 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.20670D-07
+  2    0.53170D-02    0.53170D-02    0.25685D-07
+  3    0.26276D+02    0.26276D+02    0.65369D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        728 f-s =        914 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.59688D-08
+  2   -0.20000D+02   -0.20000D+02    0.59676D-08
+  3   -0.23074D-06   -0.22476D-06    0.59783D-08
+  4    0.23072D-06    0.22476D-06    0.59581D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         26 f-s =         53 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16182D-02    0.16181D-02    0.16166D-06
+  2    0.13827D-09    0.13822D-09    0.47889D-13
+  3    0.82526D-11    0.82516D-11    0.99606D-15
+  4    0.13002D-09    0.12997D-09    0.46893D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        753 f-s =       1289 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.55294D-05
+  2    0.12711D-04    0.12711D-04    0.69181D-12
+  3    0.12086D+04    0.12086D+04    0.54883D-05
+  4    0.32420D-03    0.32420D-03    0.68988D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        166 f-s =        219 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.21761D-07
+  2    0.13300D-02    0.13300D-02    0.73843D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         63 f-s =         87 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.32382D-12    0.32359D-12    0.23205D-15
+  2    0.23609D-06    0.23607D-06    0.17434D-10
+  3    0.76400D-13    0.76393D-13    0.63799D-17
+  4    0.76400D-06    0.76393D-06    0.63324D-10
+  5    0.32361D-05    0.32361D-05    0.29262D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2262 f-s =       3535 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.71240D-05
+  2    0.12902D+01    0.12902D+01    0.61416D-06
+  3    0.30193D+01    0.30193D+01    0.26042D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        161 f-s =        296 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.25184D-16
+  2    0.37136D-02    0.37136D-02    0.55559D-12
+  3    0.61893D-02    0.61893D-02    0.92598D-12
+  4    0.95451D-05    0.95451D-05    0.25194D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        452 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13567D-36    0.28230D-55    0.13567D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        358 f-s =        679 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.50419D-08
+  2    0.20000D+00    0.20000D+00    0.10083D-07
+  3    0.30000D+00    0.30000D+00    0.14099D-07
+  4    0.40000D+00    0.40000D+00    0.16685D-07
+  5    0.50000D+00    0.50000D+00    0.17578D-07
+  6    0.60000D+00    0.60000D+00    0.16686D-07
+  7    0.70000D+00    0.70000D+00    0.14100D-07
+  8    0.80000D+00    0.80000D+00    0.10082D-07
+  9    0.90000D+00    0.90000D+00    0.50416D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        400 f-s =        582 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10796D-09
+  2    0.13685D-01    0.13685D-01    0.10870D-08
+  3    0.15037D+01    0.15037D+01    0.11996D-06
+  4    0.13534D+00    0.13534D+00    0.11264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        875 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64762D-65    0.00000D+00    0.64762D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1544 f-s =       2107 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.12752D-07    0.10042D-08    0.11748D-07
+  2    0.13709D-06    0.18000D-07    0.11909D-06
+  3    0.57296D-75    0.00000D+00    0.57296D-75
+  4   -0.10952D-72   -0.60430D-78    0.10952D-72
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        449 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.87999D-22    0.61813D-30    0.87999D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        474 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        592 f-s =        863 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.14587D-10    0.13312D-21    0.14587D-10
+  2   -0.67278D-11   -0.23259D-21    0.67278D-11
+  3   -0.80778D-24    0.15179D-34    0.80778D-24
+  4    0.22822D-08    0.20612D-08    0.22107D-09
+  5    0.45437D-04    0.45400D-04    0.37012D-07
+  6    0.13534D+00    0.13534D+00    0.43414D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3304 f-s =       4560 J-s =         89
+ Computed and reference solutions and absolute errors follow:
+  1   -0.46625D-07   -0.31006D-13    0.46625D-07
+  2    0.87365D-07    0.38628D-13    0.87365D-07
+  3    0.18048D-34    0.18049D-34    0.49651D-39
+  4    0.20612D-08    0.20612D-08    0.52735D-16
+  5    0.45400D-04    0.45400D-04    0.35926D-13
+  6    0.13534D+00    0.13534D+00    0.23953D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        368 f-s =        519 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.35009D-08
+  2    0.40016D-03    0.40016D-03    0.70473D-18
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        339 f-s =        502 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.65117D-07
+  2    0.40000D-01    0.40000D-01    0.28943D-08
+  3    0.40016D-01    0.40016D-01    0.26739D-08
+  4    0.40032D-01    0.40032D-01    0.26356D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        325 f-s =        462 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.13574D-08
+  2    0.40000D+00    0.40000D+00    0.63557D-09
+  3    0.41600D+00    0.41600D+00    0.60468D-09
+  4    0.43331D+00    0.43331D+00    0.64861D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        509 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.12339D-08
+  2    0.40000D+01    0.40000D+01    0.54840D-08
+  3    0.20000D+02    0.20000D+02    0.50059D-07
+  4    0.42000D+03    0.42000D+03    0.20719D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        346 f-s =        510 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21549D-08
+  2    0.80000D+01    0.80000D+01    0.19154D-07
+  3    0.13600D+03    0.13600D+03    0.64634D-06
+  4    0.37128D+05    0.37128D+05    0.35578D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        380 f-s =        623 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.17090D-05
+  2    0.27111D+02    0.27111D+02    0.93006D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        389 f-s =        627 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.51766D-08
+  2    0.91855D-01    0.91855D-01    0.21859D-08
+  3    0.28416D+02    0.28416D+02    0.51769D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        413 f-s =        654 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.30134D-08
+  2    0.56309D-02    0.56309D-02    0.58766D-11
+  3    0.36024D+00    0.36024D+00    0.30134D-08
+  4    0.31706D+00    0.31706D+00    0.15096D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         66 f-s =        109 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.20539D-06
+  2    0.14023D+01    0.14023D+01    0.20540D-06
+  3   -0.18934D-05   -0.18934D-05    0.97725D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        229 f-s =        415 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.33514D-06
+  2    0.98334D+00    0.98334D+00    0.32594D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        151 f-s =        280 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12788D-07
+  2    0.14760D+00    0.14760D+00    0.12788D-07
+  3    0.57731D-07    0.57731D-07    0.22662D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        141 f-s =        228 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.62574D-14
+  2   -0.45385D-12   -0.16253D-18    0.45385D-12
+  3    0.27985D-10    0.20260D-16    0.27985D-10
+  4   -0.13014D-08   -0.18531D-14    0.13014D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        503 f-s =        699 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13312D-05
+  2    0.43047D+00    0.43047D+00    0.14068D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        410 f-s =        647 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.51242D-07
+  2    0.53171D-02    0.53170D-02    0.63951D-07
+  3    0.26276D+02    0.26276D+02    0.45508D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        870 f-s =       1539 J-s =         50
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.49579D-09
+  2   -0.20000D+02   -0.20000D+02    0.66207D-09
+  3   -0.21995D-06   -0.22476D-06    0.48099D-08
+  4    0.23073D-06    0.22476D-06    0.59677D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         30 f-s =         93 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16180D-02    0.16181D-02    0.99133D-07
+  2    0.13823D-09    0.13822D-09    0.57973D-14
+  3    0.82531D-11    0.82516D-11    0.14941D-14
+  4    0.12998D-09    0.12997D-09    0.42137D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        684 f-s =       1247 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.41407D-04
+  2    0.12711D-04    0.12711D-04    0.55088D-11
+  3    0.12086D+04    0.12086D+04    0.41098D-04
+  4    0.32420D-03    0.32420D-03    0.54918D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        164 f-s =        224 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.82699D-08
+  2    0.13300D-02    0.13300D-02    0.28130D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         63 f-s =        107 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32382D-12    0.32359D-12    0.22656D-15
+  2    0.23609D-06    0.23607D-06    0.17179D-10
+  3    0.76400D-13    0.76393D-13    0.63444D-17
+  4    0.76399D-06    0.76393D-06    0.62981D-10
+  5    0.32361D-05    0.32361D-05    0.31303D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2276 f-s =       3876 J-s =         83
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.62731D-05
+  2    0.12902D+01    0.12902D+01    0.54467D-06
+  3    0.30193D+01    0.30193D+01    0.21295D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        170 f-s =        326 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.37855D-12
+  2    0.37136D-02    0.37136D-02    0.83511D-08
+  3    0.61893D-02    0.61893D-02    0.13918D-07
+  4    0.95451D-05    0.95451D-05    0.37855D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        354 f-s =        526 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.27035D-08
+  2    0.20000D+00    0.20000D+00    0.54053D-08
+  3    0.30000D+00    0.30000D+00    0.75586D-08
+  4    0.40000D+00    0.40000D+00    0.89458D-08
+  5    0.50000D+00    0.50000D+00    0.94242D-08
+  6    0.60000D+00    0.60000D+00    0.89457D-08
+  7    0.70000D+00    0.70000D+00    0.75592D-08
+  8    0.80000D+00    0.80000D+00    0.54053D-08
+  9    0.90000D+00    0.90000D+00    0.27028D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        400 f-s =        514 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10797D-09
+  2    0.13685D-01    0.13685D-01    0.10870D-08
+  3    0.15037D+01    0.15037D+01    0.11996D-06
+  4    0.13534D+00    0.13534D+00    0.11264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1510 f-s =       1803 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1   -0.16803D-07    0.10042D-08    0.17807D-07
+  2    0.81112D-07    0.18000D-07    0.63111D-07
+  3   -0.28797D-66    0.00000D+00    0.28797D-66
+  4    0.23743D-64   -0.60430D-78    0.23743D-64
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.88001D-22    0.61813D-30    0.88001D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        592 f-s =        737 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.14587D-10    0.13312D-21    0.14587D-10
+  2   -0.67278D-11   -0.23259D-21    0.67278D-11
+  3   -0.80778D-24    0.15179D-34    0.80778D-24
+  4    0.22822D-08    0.20612D-08    0.22107D-09
+  5    0.45437D-04    0.45400D-04    0.37012D-07
+  6    0.13534D+00    0.13534D+00    0.43414D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3304 f-s =       3852 J-s =         60
+ Computed and reference solutions and absolute errors follow:
+  1   -0.46625D-07   -0.31006D-13    0.46625D-07
+  2    0.87365D-07    0.38628D-13    0.87365D-07
+  3    0.18048D-34    0.18049D-34    0.49651D-39
+  4    0.20612D-08    0.20612D-08    0.52735D-16
+  5    0.45400D-04    0.45400D-04    0.35925D-13
+  6    0.13534D+00    0.13534D+00    0.23148D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        368 f-s =        463 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.34941D-08
+  2    0.40016D-03    0.40016D-03    0.70473D-18
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        340 f-s =        444 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.56117D-07
+  2    0.40000D-01    0.40000D-01    0.24918D-08
+  3    0.40016D-01    0.40016D-01    0.23024D-08
+  4    0.40032D-01    0.40032D-01    0.22707D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        327 f-s =        415 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.30034D-09
+  2    0.40000D+00    0.40000D+00    0.13360D-09
+  3    0.41600D+00    0.41600D+00    0.13422D-09
+  4    0.43331D+00    0.43331D+00    0.14354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        341 f-s =        445 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10593D-08
+  2    0.40000D+01    0.40000D+01    0.46847D-08
+  3    0.20000D+02    0.20000D+02    0.42415D-07
+  4    0.42000D+03    0.42000D+03    0.17307D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        351 f-s =        460 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.64595D-08
+  2    0.80000D+01    0.80000D+01    0.57420D-07
+  3    0.13600D+03    0.13600D+03    0.19376D-05
+  4    0.37128D+05    0.37128D+05    0.10668D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        418 f-s =        611 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.16291D-05
+  2    0.27111D+02    0.27111D+02    0.17604D-05
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        419 f-s =        596 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.57623D-08
+  2    0.91855D-01    0.91855D-01    0.21016D-08
+  3    0.28416D+02    0.28416D+02    0.57625D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        434 f-s =        580 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.87616D-08
+  2    0.56309D-02    0.56309D-02    0.17084D-10
+  3    0.36024D+00    0.36024D+00    0.87616D-08
+  4    0.31706D+00    0.31706D+00    0.43893D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         65 f-s =        100 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.27091D-06
+  2    0.14023D+01    0.14023D+01    0.27091D-06
+  3   -0.18934D-05   -0.18934D-05    0.26351D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        217 f-s =        335 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.59941D-06
+  2    0.98334D+00    0.98334D+00    0.68338D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        147 f-s =        230 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.34370D-07
+  2    0.14760D+00    0.14760D+00    0.34370D-07
+  3    0.57731D-07    0.57731D-07    0.42851D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        135 f-s =        208 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.24053D-15
+  2   -0.19908D-13   -0.16253D-18    0.19908D-13
+  3    0.14481D-11    0.20260D-16    0.14481D-11
+  4   -0.94768D-10   -0.18531D-14    0.94766D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        531 f-s =        666 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13623D-05
+  2    0.43047D+00    0.43047D+00    0.14174D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        384 f-s =        578 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.20670D-07
+  2    0.53170D-02    0.53170D-02    0.25685D-07
+  3    0.26276D+02    0.26276D+02    0.65369D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        728 f-s =        914 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.59688D-08
+  2   -0.20000D+02   -0.20000D+02    0.59676D-08
+  3   -0.23074D-06   -0.22476D-06    0.59783D-08
+  4    0.23072D-06    0.22476D-06    0.59581D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         26 f-s =         53 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16182D-02    0.16181D-02    0.16166D-06
+  2    0.13827D-09    0.13822D-09    0.47889D-13
+  3    0.82526D-11    0.82516D-11    0.99606D-15
+  4    0.13002D-09    0.12997D-09    0.46893D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        753 f-s =       1289 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.55294D-05
+  2    0.12711D-04    0.12711D-04    0.69181D-12
+  3    0.12086D+04    0.12086D+04    0.54883D-05
+  4    0.32420D-03    0.32420D-03    0.68988D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        166 f-s =        219 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.21761D-07
+  2    0.13300D-02    0.13300D-02    0.73843D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         63 f-s =         87 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.32382D-12    0.32359D-12    0.23205D-15
+  2    0.23609D-06    0.23607D-06    0.17434D-10
+  3    0.76400D-13    0.76393D-13    0.63799D-17
+  4    0.76400D-06    0.76393D-06    0.63324D-10
+  5    0.32361D-05    0.32361D-05    0.29262D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2262 f-s =       3535 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.71240D-05
+  2    0.12902D+01    0.12902D+01    0.61416D-06
+  3    0.30193D+01    0.30193D+01    0.26042D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        161 f-s =        296 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.25184D-16
+  2    0.37136D-02    0.37136D-02    0.55559D-12
+  3    0.61893D-02    0.61893D-02    0.92598D-12
+  4    0.95451D-05    0.95451D-05    0.25194D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        486 f-s =        674 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51193D-09
+  2    0.20000D+00    0.20000D+00    0.10238D-08
+  3    0.30000D+00    0.30000D+00    0.14317D-08
+  4    0.40000D+00    0.40000D+00    0.16941D-08
+  5    0.50000D+00    0.50000D+00    0.17847D-08
+  6    0.60000D+00    0.60000D+00    0.16940D-08
+  7    0.70000D+00    0.70000D+00    0.14315D-08
+  8    0.80000D+00    0.80000D+00    0.10236D-08
+  9    0.90000D+00    0.90000D+00    0.51174D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        554 f-s =        674 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.55030D-10
+  2    0.13685D-01    0.13685D-01    0.55289D-09
+  3    0.15037D+01    0.15037D+01    0.61145D-07
+  4    0.13534D+00    0.13534D+00    0.58582D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19627D-10    0.12659D-13    0.19640D-10
+  3    0.50490D-23    0.19115D-41    0.50490D-23
+  4   -0.40027D-36    0.22774D-54    0.40027D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19246D-70    0.00000D+00    0.19246D-70
+  7    0.18000D-88    0.00000D+00    0.18000D-88
+  8   -0.16260-107    0.00000D+00    0.16260-107
+  9    0.75665-126    0.00000D+00    0.75665-126
+ 10    0.28911-143    0.00000D+00    0.28911-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2234 f-s =       2646 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.13751D-08    0.10042D-08    0.37092D-09
+  2    0.46182D-09    0.18000D-07    0.17538D-07
+  3    0.41812-130    0.00000D+00    0.41812-130
+  4    0.11651-128   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67162D-25    0.89637D-30    0.67161D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        844 f-s =       1015 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.33183D-10    0.13312D-21    0.33183D-10
+  2   -0.18365D-10   -0.23259D-21    0.18365D-10
+  3   -0.25756D-30    0.15179D-34    0.25758D-30
+  4    0.20689D-08    0.20612D-08    0.77617D-11
+  5    0.45401D-04    0.45400D-04    0.84210D-09
+  6    0.13534D+00    0.13534D+00    0.36199D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3856 f-s =       4465 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1    0.68319D-09   -0.31006D-13    0.68322D-09
+  2    0.10516D-07    0.38628D-13    0.10516D-07
+  3    0.18048D-34    0.18049D-34    0.49484D-39
+  4    0.20612D-08    0.20612D-08    0.52562D-16
+  5    0.45400D-04    0.45400D-04    0.35873D-13
+  6    0.13534D+00    0.13534D+00    0.34528D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.32933D-08
+  2    0.40016D-03    0.40016D-03    0.16263D-18
+  3    0.40000D-03    0.40000D-03    0.21684D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        465 f-s =        579 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31902D-09
+  2    0.40000D-01    0.40000D-01    0.14183D-10
+  3    0.40016D-01    0.40016D-01    0.13096D-10
+  4    0.40032D-01    0.40032D-01    0.12910D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        469 f-s =        571 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.94382D-09
+  2    0.40000D+00    0.40000D+00    0.41947D-09
+  3    0.41600D+00    0.41600D+00    0.42161D-09
+  4    0.43331D+00    0.43331D+00    0.45066D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        483 f-s =        605 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.29364D-09
+  2    0.40000D+01    0.40000D+01    0.13051D-08
+  3    0.20000D+02    0.20000D+02    0.11913D-07
+  4    0.42000D+03    0.42000D+03    0.49305D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        478 f-s =        608 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10173D-09
+  2    0.80000D+01    0.80000D+01    0.90426D-09
+  3    0.13600D+03    0.13600D+03    0.30514D-07
+  4    0.37128D+05    0.37128D+05    0.16797D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        574 f-s =        823 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.18208D-06
+  2    0.27111D+02    0.27111D+02    0.14509D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        527 f-s =        755 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.26901D-08
+  2    0.91855D-01    0.91855D-01    0.12786D-08
+  3    0.28416D+02    0.28416D+02    0.26902D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        580 f-s =        727 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11006D-09
+  2    0.56309D-02    0.56309D-02    0.21453D-12
+  3    0.36024D+00    0.36024D+00    0.11006D-09
+  4    0.31706D+00    0.31706D+00    0.55135D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         93 f-s =        163 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.38194D-07
+  2    0.14023D+01    0.14023D+01    0.38196D-07
+  3   -0.18934D-05   -0.18934D-05    0.23352D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        424 f-s =        637 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.50949D-07
+  2    0.98334D+00    0.98334D+00    0.57433D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        231 f-s =        366 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.18072D-08
+  2    0.14760D+00    0.14760D+00    0.18414D-08
+  3    0.57731D-07    0.57731D-07    0.22563D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        269 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.81464D-15
+  2    0.43704D-13   -0.16253D-18    0.43704D-13
+  3   -0.18757D-11    0.20260D-16    0.18757D-11
+  4    0.40561D-10   -0.18531D-14    0.40563D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        726 f-s =        889 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.18099D-06
+  2    0.43047D+00    0.43047D+00    0.18211D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        529 f-s =        771 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.22381D-08
+  2    0.53170D-02    0.53170D-02    0.27809D-08
+  3    0.26276D+02    0.26276D+02    0.20068D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1062 f-s =       1274 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.21182D-09
+  2   -0.20000D+02   -0.20000D+02    0.21105D-09
+  3   -0.22494D-06   -0.22476D-06    0.17678D-09
+  4    0.22501D-06    0.22476D-06    0.24609D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         75 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.51084D-08
+  2    0.13823D-09    0.13822D-09    0.28748D-14
+  3    0.82517D-11    0.82516D-11    0.14515D-15
+  4    0.12997D-09    0.12997D-09    0.27296D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1025 f-s =       1620 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.48443D-06
+  2    0.12711D-04    0.12711D-04    0.30161D-09
+  3    0.12086D+04    0.12086D+04    0.48092D-06
+  4    0.32420D-03    0.32420D-03    0.29961D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        238 f-s =        314 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.28042D-08
+  2    0.13300D-02    0.13300D-02    0.95250D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         69 f-s =         95 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.58916D-13    0.32359D-12    0.26468D-12
+  2    0.23607D-06    0.23607D-06    0.70149D-12
+  3    0.76399D-13    0.76393D-13    0.58240D-17
+  4    0.76393D-06    0.76393D-06    0.51567D-12
+  5    0.32361D-05    0.32361D-05    0.13075D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3019 f-s =       4554 J-s =         60
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.15118D-05
+  2    0.12902D+01    0.12902D+01    0.13071D-06
+  3    0.30193D+01    0.30193D+01    0.60597D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        235 f-s =        416 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.19083D-15
+  2    0.37136D-02    0.37136D-02    0.42098D-11
+  3    0.61893D-02    0.61893D-02    0.70164D-11
+  4    0.95451D-05    0.95451D-05    0.19083D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        618 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        486 f-s =        836 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51277D-09
+  2    0.20000D+00    0.20000D+00    0.10255D-08
+  3    0.30000D+00    0.30000D+00    0.14339D-08
+  4    0.40000D+00    0.40000D+00    0.16969D-08
+  5    0.50000D+00    0.50000D+00    0.17876D-08
+  6    0.60000D+00    0.60000D+00    0.16968D-08
+  7    0.70000D+00    0.70000D+00    0.14338D-08
+  8    0.80000D+00    0.80000D+00    0.10252D-08
+  9    0.90000D+00    0.90000D+00    0.51257D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        554 f-s =        762 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.55046D-10
+  2    0.13685D-01    0.13685D-01    0.55305D-09
+  3    0.15037D+01    0.15037D+01    0.61163D-07
+  4    0.13534D+00    0.13534D+00    0.58600D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =       1293 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19624D-10    0.12659D-13    0.19636D-10
+  3    0.50488D-23    0.19115D-41    0.50488D-23
+  4   -0.40026D-36    0.22774D-54    0.40026D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19244D-70    0.00000D+00    0.19244D-70
+  7    0.17999D-88    0.00000D+00    0.17999D-88
+  8   -0.16259-107    0.00000D+00    0.16259-107
+  9    0.75659-126    0.00000D+00    0.75659-126
+ 10    0.28910-143    0.00000D+00    0.28910-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2234 f-s =       2990 J-s =         65
+ Computed and reference solutions and absolute errors follow:
+  1    0.13751D-08    0.10042D-08    0.37092D-09
+  2    0.46200D-09    0.18000D-07    0.17538D-07
+  3    0.41778-130    0.00000D+00    0.41778-130
+  4    0.11312-128   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        609 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67752D-25
+  2    0.67163D-25    0.89637D-30    0.67162D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        619 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        844 f-s =       1225 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.33184D-10    0.13312D-21    0.33184D-10
+  2   -0.18365D-10   -0.23259D-21    0.18365D-10
+  3   -0.25756D-30    0.15179D-34    0.25758D-30
+  4    0.20689D-08    0.20612D-08    0.77617D-11
+  5    0.45401D-04    0.45400D-04    0.84210D-09
+  6    0.13534D+00    0.13534D+00    0.36199D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3856 f-s =       5305 J-s =        105
+ Computed and reference solutions and absolute errors follow:
+  1    0.68307D-09   -0.31006D-13    0.68311D-09
+  2    0.10516D-07    0.38628D-13    0.10516D-07
+  3    0.18048D-34    0.18049D-34    0.49484D-39
+  4    0.20612D-08    0.20612D-08    0.52561D-16
+  5    0.45400D-04    0.45400D-04    0.35859D-13
+  6    0.13534D+00    0.13534D+00    0.26701D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        724 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.33742D-08
+  2    0.40016D-03    0.40016D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        465 f-s =        643 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.32844D-09
+  2    0.40000D-01    0.40000D-01    0.14638D-10
+  3    0.40016D-01    0.40016D-01    0.13560D-10
+  4    0.40032D-01    0.40032D-01    0.13350D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        469 f-s =        643 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31511D-08
+  2    0.40000D+00    0.40000D+00    0.14004D-08
+  3    0.41600D+00    0.41600D+00    0.14076D-08
+  4    0.43331D+00    0.43331D+00    0.15046D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        480 f-s =        653 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.24469D-09
+  2    0.40000D+01    0.40000D+01    0.10875D-08
+  3    0.20000D+02    0.20000D+02    0.99269D-08
+  4    0.42000D+03    0.42000D+03    0.41085D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        492 f-s =        682 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.14624D-09
+  2    0.80000D+01    0.80000D+01    0.13007D-08
+  3    0.13600D+03    0.13600D+03    0.43962D-07
+  4    0.37128D+05    0.37128D+05    0.24274D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        627 f-s =       1032 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.15107D-06
+  2    0.27111D+02    0.27111D+02    0.15953D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        496 f-s =        772 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.27540D-08
+  2    0.91855D-01    0.91855D-01    0.11234D-08
+  3    0.28416D+02    0.28416D+02    0.27541D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        582 f-s =        824 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.37633D-08
+  2    0.56309D-02    0.56309D-02    0.73378D-11
+  3    0.36024D+00    0.36024D+00    0.37633D-08
+  4    0.31706D+00    0.31706D+00    0.18853D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         87 f-s =        147 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.60457D-08
+  2    0.14023D+01    0.14023D+01    0.60457D-08
+  3   -0.18934D-05   -0.18934D-05    0.28860D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        338 f-s =        540 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.89476D-07
+  2    0.98334D+00    0.98334D+00    0.10623D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        173 f-s =        311 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.44054D-08
+  2    0.14760D+00    0.14760D+00    0.43986D-08
+  3    0.57731D-07    0.57731D-07    0.10328D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        181 f-s =        305 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.63985D-14
+  2    0.22320D-12   -0.16253D-18    0.22320D-12
+  3    0.18815D-11    0.20260D-16    0.18815D-11
+  4   -0.11164D-08   -0.18531D-14    0.11164D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        727 f-s =        948 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.17731D-06
+  2    0.43047D+00    0.43047D+00    0.17704D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        495 f-s =        718 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.15046D-08
+  2    0.53170D-02    0.53170D-02    0.18875D-08
+  3    0.26276D+02    0.26276D+02    0.10500D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1655 f-s =       4104 J-s =        223
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.45326D-08
+  2   -0.20000D+02   -0.20000D+02    0.48380D-08
+  3   -0.22017D-06   -0.22476D-06    0.45916D-08
+  4    0.22966D-06    0.22476D-06    0.48970D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         43 f-s =        107 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.78998D-08
+  2    0.13824D-09    0.13822D-09    0.19846D-13
+  3    0.82527D-11    0.82516D-11    0.11724D-14
+  4    0.12999D-09    0.12997D-09    0.18673D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1039 f-s =       1839 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.23201D-06
+  2    0.12711D-04    0.12711D-04    0.28616D-12
+  3    0.12086D+04    0.12086D+04    0.23056D-06
+  4    0.32420D-03    0.32420D-03    0.20697D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        242 f-s =        346 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.74534D-08
+  2    0.13300D-02    0.13300D-02    0.25318D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         69 f-s =        115 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.55771D-13    0.32359D-12    0.26782D-12
+  2    0.23607D-06    0.23607D-06    0.72039D-12
+  3    0.76400D-13    0.76393D-13    0.63357D-17
+  4    0.76393D-06    0.76393D-06    0.50029D-12
+  5    0.32361D-05    0.32361D-05    0.13375D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2960 f-s =       4976 J-s =        109
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.28223D-06
+  2    0.12902D+01    0.12902D+01    0.24027D-07
+  3    0.30193D+01    0.30193D+01    0.13508D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        207 f-s =        398 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.47639D-16
+  2    0.37136D-02    0.37136D-02    0.10505D-11
+  3    0.61893D-02    0.61893D-02    0.17527D-11
+  4    0.95451D-05    0.95451D-05    0.47641D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        486 f-s =        674 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51193D-09
+  2    0.20000D+00    0.20000D+00    0.10238D-08
+  3    0.30000D+00    0.30000D+00    0.14317D-08
+  4    0.40000D+00    0.40000D+00    0.16941D-08
+  5    0.50000D+00    0.50000D+00    0.17847D-08
+  6    0.60000D+00    0.60000D+00    0.16940D-08
+  7    0.70000D+00    0.70000D+00    0.14315D-08
+  8    0.80000D+00    0.80000D+00    0.10236D-08
+  9    0.90000D+00    0.90000D+00    0.51174D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        554 f-s =        674 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.55030D-10
+  2    0.13685D-01    0.13685D-01    0.55289D-09
+  3    0.15037D+01    0.15037D+01    0.61145D-07
+  4    0.13534D+00    0.13534D+00    0.58582D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19627D-10    0.12659D-13    0.19640D-10
+  3    0.50490D-23    0.19115D-41    0.50490D-23
+  4   -0.40027D-36    0.22774D-54    0.40027D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19246D-70    0.00000D+00    0.19246D-70
+  7    0.18000D-88    0.00000D+00    0.18000D-88
+  8   -0.16260-107    0.00000D+00    0.16260-107
+  9    0.75665-126    0.00000D+00    0.75665-126
+ 10    0.28911-143    0.00000D+00    0.28911-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2234 f-s =       2646 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.13751D-08    0.10042D-08    0.37092D-09
+  2    0.46182D-09    0.18000D-07    0.17538D-07
+  3    0.41812-130    0.00000D+00    0.41812-130
+  4    0.11651-128   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67162D-25    0.89637D-30    0.67161D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        844 f-s =       1015 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.33183D-10    0.13312D-21    0.33183D-10
+  2   -0.18365D-10   -0.23259D-21    0.18365D-10
+  3   -0.25756D-30    0.15179D-34    0.25758D-30
+  4    0.20689D-08    0.20612D-08    0.77617D-11
+  5    0.45401D-04    0.45400D-04    0.84210D-09
+  6    0.13534D+00    0.13534D+00    0.36199D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3856 f-s =       4465 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1    0.68319D-09   -0.31006D-13    0.68322D-09
+  2    0.10516D-07    0.38628D-13    0.10516D-07
+  3    0.18048D-34    0.18049D-34    0.49484D-39
+  4    0.20612D-08    0.20612D-08    0.52562D-16
+  5    0.45400D-04    0.45400D-04    0.35873D-13
+  6    0.13534D+00    0.13534D+00    0.34528D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.32933D-08
+  2    0.40016D-03    0.40016D-03    0.16263D-18
+  3    0.40000D-03    0.40000D-03    0.21684D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        465 f-s =        579 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31902D-09
+  2    0.40000D-01    0.40000D-01    0.14183D-10
+  3    0.40016D-01    0.40016D-01    0.13096D-10
+  4    0.40032D-01    0.40032D-01    0.12910D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        469 f-s =        571 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.94382D-09
+  2    0.40000D+00    0.40000D+00    0.41947D-09
+  3    0.41600D+00    0.41600D+00    0.42161D-09
+  4    0.43331D+00    0.43331D+00    0.45066D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        483 f-s =        605 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.29364D-09
+  2    0.40000D+01    0.40000D+01    0.13051D-08
+  3    0.20000D+02    0.20000D+02    0.11913D-07
+  4    0.42000D+03    0.42000D+03    0.49305D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        478 f-s =        608 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10173D-09
+  2    0.80000D+01    0.80000D+01    0.90426D-09
+  3    0.13600D+03    0.13600D+03    0.30514D-07
+  4    0.37128D+05    0.37128D+05    0.16797D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        574 f-s =        823 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.18208D-06
+  2    0.27111D+02    0.27111D+02    0.14509D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        527 f-s =        755 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.26901D-08
+  2    0.91855D-01    0.91855D-01    0.12786D-08
+  3    0.28416D+02    0.28416D+02    0.26902D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        580 f-s =        727 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11006D-09
+  2    0.56309D-02    0.56309D-02    0.21453D-12
+  3    0.36024D+00    0.36024D+00    0.11006D-09
+  4    0.31706D+00    0.31706D+00    0.55135D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         93 f-s =        163 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.38194D-07
+  2    0.14023D+01    0.14023D+01    0.38196D-07
+  3   -0.18934D-05   -0.18934D-05    0.23352D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        424 f-s =        637 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.50949D-07
+  2    0.98334D+00    0.98334D+00    0.57433D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        231 f-s =        366 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.18072D-08
+  2    0.14760D+00    0.14760D+00    0.18414D-08
+  3    0.57731D-07    0.57731D-07    0.22563D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        269 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.81464D-15
+  2    0.43704D-13   -0.16253D-18    0.43704D-13
+  3   -0.18757D-11    0.20260D-16    0.18757D-11
+  4    0.40561D-10   -0.18531D-14    0.40563D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        726 f-s =        889 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.18099D-06
+  2    0.43047D+00    0.43047D+00    0.18211D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        529 f-s =        771 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.22381D-08
+  2    0.53170D-02    0.53170D-02    0.27809D-08
+  3    0.26276D+02    0.26276D+02    0.20068D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1062 f-s =       1274 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.21182D-09
+  2   -0.20000D+02   -0.20000D+02    0.21105D-09
+  3   -0.22494D-06   -0.22476D-06    0.17678D-09
+  4    0.22501D-06    0.22476D-06    0.24609D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         75 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.51084D-08
+  2    0.13823D-09    0.13822D-09    0.28748D-14
+  3    0.82517D-11    0.82516D-11    0.14515D-15
+  4    0.12997D-09    0.12997D-09    0.27296D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1025 f-s =       1620 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.48443D-06
+  2    0.12711D-04    0.12711D-04    0.30161D-09
+  3    0.12086D+04    0.12086D+04    0.48092D-06
+  4    0.32420D-03    0.32420D-03    0.29961D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        238 f-s =        314 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.28042D-08
+  2    0.13300D-02    0.13300D-02    0.95250D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         69 f-s =         95 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.58916D-13    0.32359D-12    0.26468D-12
+  2    0.23607D-06    0.23607D-06    0.70149D-12
+  3    0.76399D-13    0.76393D-13    0.58240D-17
+  4    0.76393D-06    0.76393D-06    0.51567D-12
+  5    0.32361D-05    0.32361D-05    0.13075D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3019 f-s =       4554 J-s =         60
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.15118D-05
+  2    0.12902D+01    0.12902D+01    0.13071D-06
+  3    0.30193D+01    0.30193D+01    0.60597D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        235 f-s =        416 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.19083D-15
+  2    0.37136D-02    0.37136D-02    0.42098D-11
+  3    0.61893D-02    0.61893D-02    0.70164D-11
+  4    0.95451D-05    0.95451D-05    0.19083D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        713 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91981D-53
+  4    0.81954D-50    0.52358D-51    0.76718D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        700 f-s =        945 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.58657D-10
+  2    0.20000D+00    0.20000D+00    0.11731D-09
+  3    0.30000D+00    0.30000D+00    0.16405D-09
+  4    0.40000D+00    0.40000D+00    0.19414D-09
+  5    0.50000D+00    0.50000D+00    0.20452D-09
+  6    0.60000D+00    0.60000D+00    0.19414D-09
+  7    0.70000D+00    0.70000D+00    0.16405D-09
+  8    0.80000D+00    0.80000D+00    0.11731D-09
+  9    0.90000D+00    0.90000D+00    0.58656D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        787 f-s =        928 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.24105D-11
+  2    0.13685D-01    0.13685D-01    0.24313D-10
+  3    0.15037D+01    0.15037D+01    0.26783D-08
+  4    0.13534D+00    0.13534D+00    0.24717D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10353D-10    0.12659D-13    0.10341D-10
+  3   -0.96722D-30    0.19115D-41    0.96722D-30
+  4    0.36835D-45    0.22774D-54    0.36835D-45
+  5   -0.26039D-66    0.00000D+00    0.26039D-66
+  6   -0.24198D-87    0.00000D+00    0.24198D-87
+  7   -0.55392-112    0.00000D+00    0.55392-112
+  8    0.11561-137    0.00000D+00    0.11561-137
+  9   -0.36661-165    0.00000D+00    0.36661-165
+ 10   -0.13089-187    0.00000D+00    0.13089-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       3262 f-s =       3798 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1    0.98636D-09    0.10042D-08    0.17811D-10
+  2    0.15563D-07    0.18000D-07    0.24371D-08
+  3    0.14111-226    0.00000D+00    0.14111-226
+  4    0.21649-224   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16600D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1129 f-s =       1323 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17084D-11    0.13312D-21    0.17084D-11
+  2    0.29903D-11   -0.23259D-21    0.29903D-11
+  3    0.12799D-34    0.15179D-34    0.23800D-35
+  4    0.20608D-08    0.20612D-08    0.30844D-12
+  5    0.45400D-04    0.45400D-04    0.19133D-09
+  6    0.13534D+00    0.13534D+00    0.16759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4689 f-s =       5407 J-s =         86
+ Computed and reference solutions and absolute errors follow:
+  1    0.51656D-08   -0.31006D-13    0.51657D-08
+  2   -0.43354D-09    0.38628D-13    0.43357D-09
+  3    0.18048D-34    0.18049D-34    0.49621D-39
+  4    0.20612D-08    0.20612D-08    0.52696D-16
+  5    0.45400D-04    0.45400D-04    0.35968D-13
+  6    0.13534D+00    0.13534D+00    0.33862D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        736 f-s =        886 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.25390D-09
+  2    0.40016D-03    0.40016D-03    0.18974D-17
+  3    0.40000D-03    0.40000D-03    0.21684D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        669 f-s =        804 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.79985D-09
+  2    0.40000D-01    0.40000D-01    0.35541D-10
+  3    0.40016D-01    0.40016D-01    0.32837D-10
+  4    0.40032D-01    0.40032D-01    0.32367D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        659 f-s =        791 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.34163D-09
+  2    0.40000D+00    0.40000D+00    0.15184D-09
+  3    0.41600D+00    0.41600D+00    0.15263D-09
+  4    0.43331D+00    0.43331D+00    0.16315D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        694 f-s =        826 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22888D-10
+  2    0.40000D+01    0.40000D+01    0.10173D-09
+  3    0.20000D+02    0.20000D+02    0.92857D-09
+  4    0.42000D+03    0.42000D+03    0.38432D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        839 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.98963D-11
+  2    0.80000D+01    0.80000D+01    0.87970D-10
+  3    0.13600D+03    0.13600D+03    0.29684D-08
+  4    0.37128D+05    0.37128D+05    0.16340D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        728 f-s =        998 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.54675D-07
+  2    0.27111D+02    0.27111D+02    0.54525D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        717 f-s =       1026 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.47143D-09
+  2    0.91855D-01    0.91855D-01    0.20061D-09
+  3    0.28416D+02    0.28416D+02    0.47145D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        836 f-s =        999 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.48293D-10
+  2    0.56309D-02    0.56309D-02    0.94155D-13
+  3    0.36024D+00    0.36024D+00    0.48292D-10
+  4    0.31706D+00    0.31706D+00    0.24192D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        123 f-s =        189 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.12068D-08
+  2    0.14023D+01    0.14023D+01    0.12067D-08
+  3   -0.18934D-05   -0.18934D-05    0.12008D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        561 f-s =        925 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.10014D-07
+  2    0.98334D+00    0.98334D+00    0.11142D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        278 f-s =        462 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.24453D-09
+  2    0.14760D+00    0.14760D+00    0.24453D-09
+  3    0.57731D-07    0.57731D-07    0.30128D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        227 f-s =        342 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.12071D-16
+  2   -0.74956D-15   -0.16253D-18    0.74940D-15
+  3    0.41118D-13    0.20260D-16    0.41097D-13
+  4   -0.19017D-11   -0.18531D-14    0.18998D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1041 f-s =       1214 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.35081D-07
+  2    0.43047D+00    0.43047D+00    0.36829D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        660 f-s =        869 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.31829D-09
+  2    0.53170D-02    0.53170D-02    0.39099D-09
+  3    0.26276D+02    0.26276D+02    0.10193D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       2969 f-s =       9199 J-s =        931
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.45631D-10
+  2   -0.20000D+02   -0.20000D+02    0.23675D-10
+  3   -0.22375D-06   -0.22476D-06    0.10150D-08
+  4    0.22585D-06    0.22476D-06    0.10843D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         66 f-s =        100 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.33732D-08
+  2    0.13825D-09    0.13822D-09    0.22262D-13
+  3    0.82528D-11    0.82516D-11    0.12422D-14
+  4    0.12999D-09    0.12997D-09    0.21019D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1299 f-s =       1994 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.28004D-06
+  2    0.12711D-04    0.12711D-04    0.36764D-13
+  3    0.12086D+04    0.12086D+04    0.27798D-06
+  4    0.32420D-03    0.32420D-03    0.36650D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        323 f-s =        395 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.27797D-09
+  2    0.13300D-02    0.13300D-02    0.94395D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        137 f-s =        182 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32098D-12    0.32359D-12    0.26060D-14
+  2    0.23606D-06    0.23607D-06    0.79045D-11
+  3    0.76470D-13    0.76393D-13    0.77105D-16
+  4    0.76394D-06    0.76393D-06    0.78984D-11
+  5    0.32362D-05    0.32361D-05    0.14171D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       4324 f-s =       6276 J-s =         81
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.12712D-06
+  2    0.12902D+01    0.12902D+01    0.11219D-07
+  3    0.30193D+01    0.30193D+01    0.52407D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        355 f-s =        603 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.15208D-15
+  2    0.37136D-02    0.37136D-02    0.33549D-11
+  3    0.61893D-02    0.61893D-02    0.55915D-11
+  4    0.95451D-05    0.95451D-05    0.15207D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        789 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92261D-53    0.28230D-55    0.91979D-53
+  4    0.81952D-50    0.52358D-51    0.76717D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        700 f-s =       1186 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.65130D-10
+  2    0.20000D+00    0.20000D+00    0.13025D-09
+  3    0.30000D+00    0.30000D+00    0.18215D-09
+  4    0.40000D+00    0.40000D+00    0.21557D-09
+  5    0.50000D+00    0.50000D+00    0.22710D-09
+  6    0.60000D+00    0.60000D+00    0.21558D-09
+  7    0.70000D+00    0.70000D+00    0.18217D-09
+  8    0.80000D+00    0.80000D+00    0.13027D-09
+  9    0.90000D+00    0.90000D+00    0.65144D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        787 f-s =       1056 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.24100D-11
+  2    0.13685D-01    0.13685D-01    0.24308D-10
+  3    0.15037D+01    0.15037D+01    0.26778D-08
+  4    0.13534D+00    0.13534D+00    0.24713D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1684 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96715D-30    0.19115D-41    0.96715D-30
+  4    0.36841D-45    0.22774D-54    0.36841D-45
+  5   -0.26041D-66    0.00000D+00    0.26041D-66
+  6   -0.24201D-87    0.00000D+00    0.24201D-87
+  7   -0.55398-112    0.00000D+00    0.55398-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36664-165    0.00000D+00    0.36664-165
+ 10   -0.13091-187    0.00000D+00    0.13091-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       3264 f-s =       4290 J-s =         94
+ Computed and reference solutions and absolute errors follow:
+  1    0.98635D-09    0.10042D-08    0.17812D-10
+  2    0.15563D-07    0.18000D-07    0.24371D-08
+  3    0.21254-228    0.00000D+00    0.21254-228
+  4    0.60845-226   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        823 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11778D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        867 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17677D-26   -0.10768D-27    0.16600D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51097D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1129 f-s =       1563 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17086D-11    0.13312D-21    0.17086D-11
+  2    0.29899D-11   -0.23259D-21    0.29899D-11
+  3    0.12798D-34    0.15179D-34    0.23801D-35
+  4    0.20608D-08    0.20612D-08    0.30845D-12
+  5    0.45400D-04    0.45400D-04    0.19134D-09
+  6    0.13534D+00    0.13534D+00    0.16759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4689 f-s =       6427 J-s =        128
+ Computed and reference solutions and absolute errors follow:
+  1    0.51656D-08   -0.31006D-13    0.51657D-08
+  2   -0.43353D-09    0.38628D-13    0.43357D-09
+  3    0.18048D-34    0.18049D-34    0.49621D-39
+  4    0.20612D-08    0.20612D-08    0.52697D-16
+  5    0.45400D-04    0.45400D-04    0.35981D-13
+  6    0.13534D+00    0.13534D+00    0.42771D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        736 f-s =       1006 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.24187D-09
+  2    0.40016D-03    0.40016D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.32526D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        669 f-s =        908 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.80670D-09
+  2    0.40000D-01    0.40000D-01    0.35850D-10
+  3    0.40016D-01    0.40016D-01    0.33128D-10
+  4    0.40032D-01    0.40032D-01    0.32641D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        654 f-s =        883 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.11422D-09
+  2    0.40000D+00    0.40000D+00    0.50766D-10
+  3    0.41600D+00    0.41600D+00    0.51026D-10
+  4    0.43331D+00    0.43331D+00    0.54542D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        683 f-s =        944 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22531D-10
+  2    0.40000D+01    0.40000D+01    0.10014D-09
+  3    0.20000D+02    0.20000D+02    0.91408D-09
+  4    0.42000D+03    0.42000D+03    0.37833D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        709 f-s =        950 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18575D-10
+  2    0.80000D+01    0.80000D+01    0.16511D-09
+  3    0.13600D+03    0.13600D+03    0.55715D-08
+  4    0.37128D+05    0.37128D+05    0.30670D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        723 f-s =       1169 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.50348D-07
+  2    0.27111D+02    0.27111D+02    0.50422D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        661 f-s =       1029 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.34172D-09
+  2    0.91855D-01    0.91855D-01    0.13356D-09
+  3    0.28416D+02    0.28416D+02    0.34173D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        833 f-s =       1156 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.10476D-10
+  2    0.56309D-02    0.56309D-02    0.20433D-13
+  3    0.36024D+00    0.36024D+00    0.10476D-10
+  4    0.31706D+00    0.31706D+00    0.52482D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        124 f-s =        218 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.34319D-09
+  2    0.14023D+01    0.14023D+01    0.34321D-09
+  3   -0.18934D-05   -0.18934D-05    0.17254D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        447 f-s =        754 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.93595D-08
+  2    0.98334D+00    0.98334D+00    0.11106D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        228 f-s =        409 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.41084D-09
+  2    0.14760D+00    0.14760D+00    0.41084D-09
+  3    0.57731D-07    0.57731D-07    0.50528D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        237 f-s =        382 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.10285D-15
+  2   -0.79886D-14   -0.16253D-18    0.79885D-14
+  3    0.13456D-14    0.20260D-16    0.13253D-14
+  4    0.14058D-09   -0.18531D-14    0.14058D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1042 f-s =       1313 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.28419D-07
+  2    0.43047D+00    0.43047D+00    0.30750D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        609 f-s =        857 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.85970D-09
+  2    0.53170D-02    0.53170D-02    0.10724D-08
+  3    0.26276D+02    0.26276D+02    0.37776D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       3728 f-s =      16705 J-s =       1213
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.88853D-08
+  2   -0.20000D+02   -0.20000D+02    0.88609D-08
+  3   -0.22571D-06   -0.22476D-06    0.94635D-09
+  4    0.20607D-06    0.22476D-06    0.18693D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         66 f-s =        136 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.32759D-08
+  2    0.13824D-09    0.13822D-09    0.18252D-13
+  3    0.82527D-11    0.82516D-11    0.11519D-14
+  4    0.12999D-09    0.12997D-09    0.17101D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1156 f-s =       2091 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.36814D-06
+  2    0.12711D-04    0.12711D-04    0.47966D-13
+  3    0.12086D+04    0.12086D+04    0.36541D-06
+  4    0.32420D-03    0.32420D-03    0.47820D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        323 f-s =        419 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.28170D-09
+  2    0.13300D-02    0.13300D-02    0.95673D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        131 f-s =        217 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.53504D-12    0.32359D-12    0.21145D-12
+  2    0.23605D-06    0.23607D-06    0.15924D-10
+  3    0.76394D-13    0.76393D-13    0.91999D-18
+  4    0.76395D-06    0.76393D-06    0.15877D-10
+  5    0.32364D-05    0.32361D-05    0.28536D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       4080 f-s =       6552 J-s =        146
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.15492D-06
+  2    0.12902D+01    0.12902D+01    0.13336D-07
+  3    0.30193D+01    0.30193D+01    0.61215D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        333 f-s =        665 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.14378D-15
+  2    0.37136D-02    0.37136D-02    0.31718D-11
+  3    0.61893D-02    0.61893D-02    0.52863D-11
+  4    0.95451D-05    0.95451D-05    0.14377D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        713 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91981D-53
+  4    0.81954D-50    0.52358D-51    0.76718D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        700 f-s =        945 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.58657D-10
+  2    0.20000D+00    0.20000D+00    0.11731D-09
+  3    0.30000D+00    0.30000D+00    0.16405D-09
+  4    0.40000D+00    0.40000D+00    0.19414D-09
+  5    0.50000D+00    0.50000D+00    0.20452D-09
+  6    0.60000D+00    0.60000D+00    0.19414D-09
+  7    0.70000D+00    0.70000D+00    0.16405D-09
+  8    0.80000D+00    0.80000D+00    0.11731D-09
+  9    0.90000D+00    0.90000D+00    0.58656D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        787 f-s =        928 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.24105D-11
+  2    0.13685D-01    0.13685D-01    0.24313D-10
+  3    0.15037D+01    0.15037D+01    0.26783D-08
+  4    0.13534D+00    0.13534D+00    0.24717D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10353D-10    0.12659D-13    0.10341D-10
+  3   -0.96722D-30    0.19115D-41    0.96722D-30
+  4    0.36835D-45    0.22774D-54    0.36835D-45
+  5   -0.26039D-66    0.00000D+00    0.26039D-66
+  6   -0.24198D-87    0.00000D+00    0.24198D-87
+  7   -0.55392-112    0.00000D+00    0.55392-112
+  8    0.11561-137    0.00000D+00    0.11561-137
+  9   -0.36661-165    0.00000D+00    0.36661-165
+ 10   -0.13089-187    0.00000D+00    0.13089-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       3262 f-s =       3798 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1    0.98636D-09    0.10042D-08    0.17811D-10
+  2    0.15563D-07    0.18000D-07    0.24371D-08
+  3    0.14111-226    0.00000D+00    0.14111-226
+  4    0.21649-224   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16600D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1129 f-s =       1323 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17084D-11    0.13312D-21    0.17084D-11
+  2    0.29903D-11   -0.23259D-21    0.29903D-11
+  3    0.12799D-34    0.15179D-34    0.23800D-35
+  4    0.20608D-08    0.20612D-08    0.30844D-12
+  5    0.45400D-04    0.45400D-04    0.19133D-09
+  6    0.13534D+00    0.13534D+00    0.16759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4689 f-s =       5407 J-s =         86
+ Computed and reference solutions and absolute errors follow:
+  1    0.51656D-08   -0.31006D-13    0.51657D-08
+  2   -0.43354D-09    0.38628D-13    0.43357D-09
+  3    0.18048D-34    0.18049D-34    0.49621D-39
+  4    0.20612D-08    0.20612D-08    0.52696D-16
+  5    0.45400D-04    0.45400D-04    0.35968D-13
+  6    0.13534D+00    0.13534D+00    0.33862D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        736 f-s =        886 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.25390D-09
+  2    0.40016D-03    0.40016D-03    0.18974D-17
+  3    0.40000D-03    0.40000D-03    0.21684D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        669 f-s =        804 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.79985D-09
+  2    0.40000D-01    0.40000D-01    0.35541D-10
+  3    0.40016D-01    0.40016D-01    0.32837D-10
+  4    0.40032D-01    0.40032D-01    0.32367D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        659 f-s =        791 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.34163D-09
+  2    0.40000D+00    0.40000D+00    0.15184D-09
+  3    0.41600D+00    0.41600D+00    0.15263D-09
+  4    0.43331D+00    0.43331D+00    0.16315D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        694 f-s =        826 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22888D-10
+  2    0.40000D+01    0.40000D+01    0.10173D-09
+  3    0.20000D+02    0.20000D+02    0.92857D-09
+  4    0.42000D+03    0.42000D+03    0.38432D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        839 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.98963D-11
+  2    0.80000D+01    0.80000D+01    0.87970D-10
+  3    0.13600D+03    0.13600D+03    0.29684D-08
+  4    0.37128D+05    0.37128D+05    0.16340D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        728 f-s =        998 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.54675D-07
+  2    0.27111D+02    0.27111D+02    0.54525D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        717 f-s =       1026 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.47143D-09
+  2    0.91855D-01    0.91855D-01    0.20061D-09
+  3    0.28416D+02    0.28416D+02    0.47145D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        836 f-s =        999 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.48293D-10
+  2    0.56309D-02    0.56309D-02    0.94155D-13
+  3    0.36024D+00    0.36024D+00    0.48292D-10
+  4    0.31706D+00    0.31706D+00    0.24192D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        123 f-s =        189 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.12068D-08
+  2    0.14023D+01    0.14023D+01    0.12067D-08
+  3   -0.18934D-05   -0.18934D-05    0.12008D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        561 f-s =        925 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.10014D-07
+  2    0.98334D+00    0.98334D+00    0.11142D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        278 f-s =        462 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.24453D-09
+  2    0.14760D+00    0.14760D+00    0.24453D-09
+  3    0.57731D-07    0.57731D-07    0.30128D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        227 f-s =        342 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.12071D-16
+  2   -0.74956D-15   -0.16253D-18    0.74940D-15
+  3    0.41118D-13    0.20260D-16    0.41097D-13
+  4   -0.19017D-11   -0.18531D-14    0.18998D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1041 f-s =       1214 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.35081D-07
+  2    0.43047D+00    0.43047D+00    0.36829D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        660 f-s =        869 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.31829D-09
+  2    0.53170D-02    0.53170D-02    0.39099D-09
+  3    0.26276D+02    0.26276D+02    0.10193D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       2969 f-s =       9199 J-s =        931
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.45631D-10
+  2   -0.20000D+02   -0.20000D+02    0.23675D-10
+  3   -0.22375D-06   -0.22476D-06    0.10150D-08
+  4    0.22585D-06    0.22476D-06    0.10843D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         66 f-s =        100 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.33732D-08
+  2    0.13825D-09    0.13822D-09    0.22262D-13
+  3    0.82528D-11    0.82516D-11    0.12422D-14
+  4    0.12999D-09    0.12997D-09    0.21019D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1299 f-s =       1994 J-s =         33
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.28004D-06
+  2    0.12711D-04    0.12711D-04    0.36764D-13
+  3    0.12086D+04    0.12086D+04    0.27798D-06
+  4    0.32420D-03    0.32420D-03    0.36650D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        323 f-s =        395 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.27797D-09
+  2    0.13300D-02    0.13300D-02    0.94395D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        137 f-s =        182 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32098D-12    0.32359D-12    0.26060D-14
+  2    0.23606D-06    0.23607D-06    0.79045D-11
+  3    0.76470D-13    0.76393D-13    0.77105D-16
+  4    0.76394D-06    0.76393D-06    0.78984D-11
+  5    0.32362D-05    0.32361D-05    0.14171D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       4324 f-s =       6276 J-s =         81
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.12712D-06
+  2    0.12902D+01    0.12902D+01    0.11219D-07
+  3    0.30193D+01    0.30193D+01    0.52407D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        355 f-s =        603 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.15208D-15
+  2    0.37136D-02    0.37136D-02    0.33549D-11
+  3    0.61893D-02    0.61893D-02    0.55915D-11
+  4    0.95451D-05    0.95451D-05    0.15207D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1013 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33886D-10
+  2    0.20613D-08    0.20612D-08    0.11428D-12
+  3   -0.18641D-65    0.28230D-55    0.28230D-55
+  4   -0.60003D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        987 f-s =       1318 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.95969D-11
+  2    0.20000D+00    0.20000D+00    0.19193D-10
+  3    0.30000D+00    0.30000D+00    0.26839D-10
+  4    0.40000D+00    0.40000D+00    0.31760D-10
+  5    0.50000D+00    0.50000D+00    0.33458D-10
+  6    0.60000D+00    0.60000D+00    0.31759D-10
+  7    0.70000D+00    0.70000D+00    0.26837D-10
+  8    0.80000D+00    0.80000D+00    0.19190D-10
+  9    0.90000D+00    0.90000D+00    0.95957D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1112 f-s =       1271 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.84807D-12
+  2    0.13685D-01    0.13685D-01    0.85564D-11
+  3    0.15037D+01    0.15037D+01    0.94230D-09
+  4    0.13534D+00    0.13534D+00    0.86729D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24333D-11    0.12659D-13    0.24207D-11
+  3    0.12344D-37    0.19115D-41    0.12342D-37
+  4    0.29516D-57    0.22774D-54    0.22745D-54
+  5    0.62662D-84    0.00000D+00    0.62662D-84
+  6   -0.11726-113    0.00000D+00    0.11726-113
+  7    0.11345-145    0.00000D+00    0.11345-145
+  8    0.19805-182    0.00000D+00    0.19805-182
+  9    0.19867-214    0.00000D+00    0.19867-214
+ 10   -0.11006-247    0.00000D+00    0.11006-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4785 f-s =       5478 J-s =         88
+ Computed and reference solutions and absolute errors follow:
+  1    0.99141D-09    0.10042D-08    0.12753D-10
+  2    0.17675D-07    0.18000D-07    0.32522D-09
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.35581-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89031D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1006 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23096D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84672D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1404 f-s =       1635 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13628D-10    0.13312D-21    0.13628D-10
+  2    0.52820D-10   -0.23259D-21    0.52820D-10
+  3   -0.49380D-33    0.15179D-34    0.50898D-33
+  4    0.20612D-08    0.20612D-08    0.61063D-13
+  5    0.45400D-04    0.45400D-04    0.18400D-10
+  6    0.13534D+00    0.13534D+00    0.34382D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       6016 f-s =       6870 J-s =        107
+ Computed and reference solutions and absolute errors follow:
+  1    0.25725D-10   -0.31006D-13    0.25756D-10
+  2    0.18657D-11    0.38628D-13    0.18271D-11
+  3    0.18048D-34    0.18049D-34    0.44729D-39
+  4    0.20612D-08    0.20612D-08    0.47586D-16
+  5    0.45400D-04    0.45400D-04    0.32492D-13
+  6    0.13534D+00    0.13534D+00    0.28699D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1072 f-s =       1231 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.61056D-11
+  2    0.40016D-03    0.40016D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        947 f-s =       1104 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18913D-10
+  2    0.40000D-01    0.40000D-01    0.84059D-12
+  3    0.40016D-01    0.40016D-01    0.77666D-12
+  4    0.40032D-01    0.40032D-01    0.76546D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        931 f-s =       1077 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.69820D-11
+  2    0.40000D+00    0.40000D+00    0.31032D-11
+  3    0.41600D+00    0.41600D+00    0.31191D-11
+  4    0.43331D+00    0.43331D+00    0.33342D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        993 f-s =       1144 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18263D-11
+  2    0.40000D+01    0.40000D+01    0.81184D-11
+  3    0.20000D+02    0.20000D+02    0.74099D-10
+  4    0.42000D+03    0.42000D+03    0.30669D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1023 f-s =       1189 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.27522D-11
+  2    0.80000D+01    0.80000D+01    0.24468D-10
+  3    0.13600D+03    0.13600D+03    0.82571D-09
+  4    0.37128D+05    0.37128D+05    0.45450D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        898 f-s =       1212 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.91100D-08
+  2    0.27111D+02    0.27111D+02    0.88023D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        931 f-s =       1231 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.17097D-09
+  2    0.91855D-01    0.91855D-01    0.64880D-10
+  3    0.28416D+02    0.28416D+02    0.17097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1167 f-s =       1375 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.54350D-11
+  2    0.56309D-02    0.56309D-02    0.10587D-13
+  3    0.36024D+00    0.36024D+00    0.54354D-11
+  4    0.31706D+00    0.31706D+00    0.27240D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        180 f-s =        309 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.97265D-10
+  2    0.14023D+01    0.14023D+01    0.97267D-10
+  3   -0.18934D-05   -0.18934D-05    0.37311D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        669 f-s =       1022 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.99291D-09
+  2    0.98334D+00    0.98334D+00    0.11972D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        331 f-s =        473 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.23630D-10
+  2    0.14760D+00    0.14760D+00    0.23629D-10
+  3    0.57731D-07    0.57731D-07    0.29069D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        316 f-s =        447 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.32637D-17
+  2    0.17914D-15   -0.16253D-18    0.17930D-15
+  3   -0.78515D-14    0.20260D-16    0.78718D-14
+  4    0.17817D-12   -0.18531D-14    0.18003D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1510 f-s =       1728 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.40074D-08
+  2    0.43047D+00    0.43047D+00    0.44212D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        870 f-s =       1101 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.41602D-10
+  2    0.53170D-02    0.53170D-02    0.51792D-10
+  3    0.26276D+02    0.26276D+02    0.23873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       5489 f-s =      17557 J-s =       1754
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.15371D-08
+  2   -0.20000D+02   -0.20000D+02    0.15373D-08
+  3   -0.22630D-06   -0.22476D-06    0.15374D-08
+  4    0.22630D-06    0.22476D-06    0.15370D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         84 f-s =        130 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.67854D-09
+  2    0.13822D-09    0.13822D-09    0.20557D-15
+  3    0.82516D-11    0.82516D-11    0.36625D-18
+  4    0.12997D-09    0.12997D-09    0.20594D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1742 f-s =       2681 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.40679D-07
+  2    0.12711D-04    0.12711D-04    0.52879D-14
+  3    0.12086D+04    0.12086D+04    0.40379D-07
+  4    0.32420D-03    0.32420D-03    0.52717D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        443 f-s =        534 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.19253D-09
+  2    0.13300D-02    0.13300D-02    0.65394D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        135 f-s =        198 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32652D-12    0.32359D-12    0.29299D-14
+  2    0.23607D-06    0.23607D-06    0.13988D-12
+  3    0.76393D-13    0.76393D-13    0.21806D-18
+  4    0.76393D-06    0.76393D-06    0.13630D-12
+  5    0.32361D-05    0.32361D-05    0.24920D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       5707 f-s =       7825 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.31099D-07
+  2    0.12902D+01    0.12902D+01    0.26903D-08
+  3    0.30193D+01    0.30193D+01    0.12260D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        427 f-s =        694 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.44170D-16
+  2    0.37136D-02    0.37136D-02    0.97442D-12
+  3    0.61893D-02    0.61893D-02    0.16240D-11
+  4    0.95451D-05    0.95451D-05    0.44161D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1129 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33883D-10
+  2    0.20613D-08    0.20612D-08    0.11427D-12
+  3   -0.18805D-65    0.28230D-55    0.28230D-55
+  4   -0.61154D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        986 f-s =       1661 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.91271D-11
+  2    0.20000D+00    0.20000D+00    0.18253D-10
+  3    0.30000D+00    0.30000D+00    0.25527D-10
+  4    0.40000D+00    0.40000D+00    0.30209D-10
+  5    0.50000D+00    0.50000D+00    0.31825D-10
+  6    0.60000D+00    0.60000D+00    0.30210D-10
+  7    0.70000D+00    0.70000D+00    0.25528D-10
+  8    0.80000D+00    0.80000D+00    0.18254D-10
+  9    0.90000D+00    0.90000D+00    0.91271D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1112 f-s =       1451 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.84785D-12
+  2    0.13685D-01    0.13685D-01    0.85542D-11
+  3    0.15037D+01    0.15037D+01    0.94206D-09
+  4    0.13534D+00    0.13534D+00    0.86707D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       2395 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27667D-09
+  2    0.24331D-11    0.12659D-13    0.24204D-11
+  3    0.12343D-37    0.19115D-41    0.12341D-37
+  4    0.29508D-57    0.22774D-54    0.22745D-54
+  5    0.62633D-84    0.00000D+00    0.62633D-84
+  6   -0.11719-113    0.00000D+00    0.11719-113
+  7    0.11344-145    0.00000D+00    0.11344-145
+  8    0.20330-182    0.00000D+00    0.20330-182
+  9    0.19846-214    0.00000D+00    0.19846-214
+ 10   -0.10997-247    0.00000D+00    0.10997-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4784 f-s =       6163 J-s =        130
+ Computed and reference solutions and absolute errors follow:
+  1    0.99141D-09    0.10042D-08    0.12753D-10
+  2    0.17675D-07    0.18000D-07    0.32522D-09
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =       1136 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90065D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89037D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1204 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24509D-36   -0.10768D-27    0.10768D-27
+  2   -0.23095D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84676D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1404 f-s =       1953 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13360D-10    0.13312D-21    0.13360D-10
+  2    0.53140D-10   -0.23259D-21    0.53140D-10
+  3   -0.49307D-33    0.15179D-34    0.50825D-33
+  4    0.20612D-08    0.20612D-08    0.61062D-13
+  5    0.45400D-04    0.45400D-04    0.18400D-10
+  6    0.13534D+00    0.13534D+00    0.34387D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       6016 f-s =       8122 J-s =        158
+ Computed and reference solutions and absolute errors follow:
+  1    0.24865D-10   -0.31006D-13    0.24896D-10
+  2    0.14360D-11    0.38628D-13    0.13974D-11
+  3    0.18048D-34    0.18049D-34    0.44725D-39
+  4    0.20612D-08    0.20612D-08    0.47580D-16
+  5    0.45400D-04    0.45400D-04    0.32478D-13
+  6    0.13534D+00    0.13534D+00    0.22649D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1072 f-s =       1388 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.61009D-11
+  2    0.40016D-03    0.40016D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        947 f-s =       1245 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18912D-10
+  2    0.40000D-01    0.40000D-01    0.84054D-12
+  3    0.40016D-01    0.40016D-01    0.77648D-12
+  4    0.40032D-01    0.40032D-01    0.76502D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        931 f-s =       1214 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.69267D-11
+  2    0.40000D+00    0.40000D+00    0.30789D-11
+  3    0.41600D+00    0.41600D+00    0.30945D-11
+  4    0.43331D+00    0.43331D+00    0.33079D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        993 f-s =       1301 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.16867D-11
+  2    0.40000D+01    0.40000D+01    0.74971D-11
+  3    0.20000D+02    0.20000D+02    0.68429D-10
+  4    0.42000D+03    0.42000D+03    0.28321D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1023 f-s =       1314 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.27349D-11
+  2    0.80000D+01    0.80000D+01    0.24311D-10
+  3    0.13600D+03    0.13600D+03    0.82042D-09
+  4    0.37128D+05    0.37128D+05    0.45160D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        886 f-s =       1327 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.92818D-08
+  2    0.27111D+02    0.27111D+02    0.93494D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1003 f-s =       1526 J-s =         37
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.75875D-11
+  2    0.91855D-01    0.91855D-01    0.32728D-11
+  3    0.28416D+02    0.28416D+02    0.75887D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1147 f-s =       1545 J-s =         37
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18702D-10
+  2    0.56309D-02    0.56309D-02    0.36496D-13
+  3    0.36024D+00    0.36024D+00    0.18704D-10
+  4    0.31706D+00    0.31706D+00    0.93705D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        162 f-s =        296 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.45911D-10
+  2    0.14023D+01    0.14023D+01    0.45919D-10
+  3   -0.18934D-05   -0.18934D-05    0.84356D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        640 f-s =       1011 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.12471D-08
+  2    0.98334D+00    0.98334D+00    0.14287D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        352 f-s =        569 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.39189D-10
+  2    0.14760D+00    0.14760D+00    0.39187D-10
+  3    0.57731D-07    0.57731D-07    0.48237D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        338 f-s =        547 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.86864D-18
+  2    0.47071D-16   -0.16253D-18    0.47233D-16
+  3   -0.54946D-14    0.20260D-16    0.55149D-14
+  4    0.32244D-12   -0.18531D-14    0.32429D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1525 f-s =       1881 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.51991D-08
+  2    0.43047D+00    0.43047D+00    0.55394D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        825 f-s =       1099 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.38945D-10
+  2    0.53170D-02    0.53170D-02    0.48531D-10
+  3    0.26276D+02    0.26276D+02    0.23293D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       5923 f-s =      25091 J-s =       1748
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.46935D-09
+  2   -0.20000D+02   -0.20000D+02    0.46942D-09
+  3   -0.22523D-06   -0.22476D-06    0.46963D-09
+  4    0.22523D-06    0.22476D-06    0.46913D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         86 f-s =        172 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.91000D-09
+  2    0.13822D-09    0.13822D-09    0.10744D-15
+  3    0.82516D-11    0.82516D-11    0.25595D-17
+  4    0.12997D-09    0.12997D-09    0.11007D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1812 f-s =       3086 J-s =         64
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.26661D-07
+  2    0.12711D-04    0.12711D-04    0.34655D-14
+  3    0.12086D+04    0.12086D+04    0.26464D-07
+  4    0.32420D-03    0.32420D-03    0.34548D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        443 f-s =        570 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.19460D-09
+  2    0.13300D-02    0.13300D-02    0.66099D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        157 f-s =        286 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.32172D-12    0.32359D-12    0.18720D-14
+  2    0.23606D-06    0.23607D-06    0.12661D-10
+  3    0.76390D-13    0.76393D-13    0.30240D-17
+  4    0.76391D-06    0.76393D-06    0.25510D-10
+  5    0.32361D-05    0.32361D-05    0.65464D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       5440 f-s =       8178 J-s =        182
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.68204D-08
+  2    0.12902D+01    0.12902D+01    0.58144D-09
+  3    0.30193D+01    0.30193D+01    0.31238D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        454 f-s =        818 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.13385D-16
+  2    0.37136D-02    0.37136D-02    0.29527D-12
+  3    0.61893D-02    0.61893D-02    0.49212D-12
+  4    0.95451D-05    0.95451D-05    0.13378D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1013 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33886D-10
+  2    0.20613D-08    0.20612D-08    0.11428D-12
+  3   -0.18641D-65    0.28230D-55    0.28230D-55
+  4   -0.60003D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        987 f-s =       1318 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.95969D-11
+  2    0.20000D+00    0.20000D+00    0.19193D-10
+  3    0.30000D+00    0.30000D+00    0.26839D-10
+  4    0.40000D+00    0.40000D+00    0.31760D-10
+  5    0.50000D+00    0.50000D+00    0.33458D-10
+  6    0.60000D+00    0.60000D+00    0.31759D-10
+  7    0.70000D+00    0.70000D+00    0.26837D-10
+  8    0.80000D+00    0.80000D+00    0.19190D-10
+  9    0.90000D+00    0.90000D+00    0.95957D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1112 f-s =       1271 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.84807D-12
+  2    0.13685D-01    0.13685D-01    0.85564D-11
+  3    0.15037D+01    0.15037D+01    0.94230D-09
+  4    0.13534D+00    0.13534D+00    0.86729D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24333D-11    0.12659D-13    0.24207D-11
+  3    0.12344D-37    0.19115D-41    0.12342D-37
+  4    0.29516D-57    0.22774D-54    0.22745D-54
+  5    0.62662D-84    0.00000D+00    0.62662D-84
+  6   -0.11726-113    0.00000D+00    0.11726-113
+  7    0.11345-145    0.00000D+00    0.11345-145
+  8    0.19805-182    0.00000D+00    0.19805-182
+  9    0.19867-214    0.00000D+00    0.19867-214
+ 10   -0.11006-247    0.00000D+00    0.11006-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4785 f-s =       5478 J-s =         88
+ Computed and reference solutions and absolute errors follow:
+  1    0.99141D-09    0.10042D-08    0.12753D-10
+  2    0.17675D-07    0.18000D-07    0.32522D-09
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.35581-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89031D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1006 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23096D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84672D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1404 f-s =       1635 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13628D-10    0.13312D-21    0.13628D-10
+  2    0.52820D-10   -0.23259D-21    0.52820D-10
+  3   -0.49380D-33    0.15179D-34    0.50898D-33
+  4    0.20612D-08    0.20612D-08    0.61063D-13
+  5    0.45400D-04    0.45400D-04    0.18400D-10
+  6    0.13534D+00    0.13534D+00    0.34382D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       6016 f-s =       6870 J-s =        107
+ Computed and reference solutions and absolute errors follow:
+  1    0.25725D-10   -0.31006D-13    0.25756D-10
+  2    0.18657D-11    0.38628D-13    0.18271D-11
+  3    0.18048D-34    0.18049D-34    0.44729D-39
+  4    0.20612D-08    0.20612D-08    0.47586D-16
+  5    0.45400D-04    0.45400D-04    0.32492D-13
+  6    0.13534D+00    0.13534D+00    0.28699D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1072 f-s =       1231 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.61056D-11
+  2    0.40016D-03    0.40016D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        947 f-s =       1104 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18913D-10
+  2    0.40000D-01    0.40000D-01    0.84059D-12
+  3    0.40016D-01    0.40016D-01    0.77666D-12
+  4    0.40032D-01    0.40032D-01    0.76546D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        931 f-s =       1077 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.69820D-11
+  2    0.40000D+00    0.40000D+00    0.31032D-11
+  3    0.41600D+00    0.41600D+00    0.31191D-11
+  4    0.43331D+00    0.43331D+00    0.33342D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        993 f-s =       1144 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18263D-11
+  2    0.40000D+01    0.40000D+01    0.81184D-11
+  3    0.20000D+02    0.20000D+02    0.74099D-10
+  4    0.42000D+03    0.42000D+03    0.30669D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1023 f-s =       1189 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.27522D-11
+  2    0.80000D+01    0.80000D+01    0.24468D-10
+  3    0.13600D+03    0.13600D+03    0.82571D-09
+  4    0.37128D+05    0.37128D+05    0.45450D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        898 f-s =       1212 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.91100D-08
+  2    0.27111D+02    0.27111D+02    0.88023D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        931 f-s =       1231 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.17097D-09
+  2    0.91855D-01    0.91855D-01    0.64880D-10
+  3    0.28416D+02    0.28416D+02    0.17097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1167 f-s =       1375 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.54350D-11
+  2    0.56309D-02    0.56309D-02    0.10587D-13
+  3    0.36024D+00    0.36024D+00    0.54354D-11
+  4    0.31706D+00    0.31706D+00    0.27240D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        180 f-s =        309 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.97265D-10
+  2    0.14023D+01    0.14023D+01    0.97267D-10
+  3   -0.18934D-05   -0.18934D-05    0.37311D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        669 f-s =       1022 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.99291D-09
+  2    0.98334D+00    0.98334D+00    0.11972D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        331 f-s =        473 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.23630D-10
+  2    0.14760D+00    0.14760D+00    0.23629D-10
+  3    0.57731D-07    0.57731D-07    0.29069D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        316 f-s =        447 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.32637D-17
+  2    0.17914D-15   -0.16253D-18    0.17930D-15
+  3   -0.78515D-14    0.20260D-16    0.78718D-14
+  4    0.17817D-12   -0.18531D-14    0.18003D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1510 f-s =       1728 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.40074D-08
+  2    0.43047D+00    0.43047D+00    0.44212D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        870 f-s =       1101 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.41602D-10
+  2    0.53170D-02    0.53170D-02    0.51792D-10
+  3    0.26276D+02    0.26276D+02    0.23873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       5489 f-s =      17557 J-s =       1754
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.15371D-08
+  2   -0.20000D+02   -0.20000D+02    0.15373D-08
+  3   -0.22630D-06   -0.22476D-06    0.15374D-08
+  4    0.22630D-06    0.22476D-06    0.15370D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         84 f-s =        130 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.67854D-09
+  2    0.13822D-09    0.13822D-09    0.20557D-15
+  3    0.82516D-11    0.82516D-11    0.36625D-18
+  4    0.12997D-09    0.12997D-09    0.20594D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1742 f-s =       2681 J-s =         38
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.40679D-07
+  2    0.12711D-04    0.12711D-04    0.52879D-14
+  3    0.12086D+04    0.12086D+04    0.40379D-07
+  4    0.32420D-03    0.32420D-03    0.52717D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        443 f-s =        534 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.19253D-09
+  2    0.13300D-02    0.13300D-02    0.65394D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        135 f-s =        198 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32652D-12    0.32359D-12    0.29299D-14
+  2    0.23607D-06    0.23607D-06    0.13988D-12
+  3    0.76393D-13    0.76393D-13    0.21806D-18
+  4    0.76393D-06    0.76393D-06    0.13630D-12
+  5    0.32361D-05    0.32361D-05    0.24920D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       5707 f-s =       7825 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.31099D-07
+  2    0.12902D+01    0.12902D+01    0.26903D-08
+  3    0.30193D+01    0.30193D+01    0.12260D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        427 f-s =        694 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.44170D-16
+  2    0.37136D-02    0.37136D-02    0.97442D-12
+  3    0.61893D-02    0.61893D-02    0.16240D-11
+  4    0.95451D-05    0.95451D-05    0.44161D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46240D-83    0.28230D-55    0.28230D-55
+  4   -0.54017D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1389 f-s =       1746 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.14655D-11
+  2    0.20000D+00    0.20000D+00    0.29309D-11
+  3    0.30000D+00    0.30000D+00    0.40989D-11
+  4    0.40000D+00    0.40000D+00    0.48506D-11
+  5    0.50000D+00    0.50000D+00    0.51101D-11
+  6    0.60000D+00    0.60000D+00    0.48507D-11
+  7    0.70000D+00    0.70000D+00    0.40988D-11
+  8    0.80000D+00    0.80000D+00    0.29310D-11
+  9    0.90000D+00    0.90000D+00    0.14656D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        335
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1661 f-s =       1890 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.87729D-13
+  2    0.13685D-01    0.13685D-01    0.88546D-12
+  3    0.15037D+01    0.15037D+01    0.97478D-10
+  4    0.13534D+00    0.13534D+00    0.89390D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20548D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13242D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88166-109    0.00000D+00    0.88166-109
+  6   -0.91781-148    0.00000D+00    0.91781-148
+  7   -0.28134-190    0.00000D+00    0.28134-190
+  8    0.74098-237    0.00000D+00    0.74098-237
+  9   -0.38761-283    0.00000D+00    0.38761-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        390
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6745 f-s =       7690 J-s =        122
+ Computed and reference solutions and absolute errors follow:
+  1    0.10010D-08    0.10042D-08    0.31773D-11
+  2    0.17951D-07    0.18000D-07    0.49520D-10
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.10634-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32341D-55    0.61813D-30    0.61813D-30
+  2    0.70205D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82190D-11
+  6    0.13534D+00    0.13534D+00    0.15070D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.74038D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80713D-11
+  6    0.13534D+00    0.13534D+00    0.14461D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2020 f-s =       2315 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1    0.22879D-21    0.13312D-21    0.95661D-22
+  2    0.42124D-20   -0.23259D-21    0.44450D-20
+  3    0.19922D-34    0.15179D-34    0.47431D-35
+  4    0.20612D-08    0.20612D-08    0.18487D-13
+  5    0.45400D-04    0.45400D-04    0.55017D-11
+  6    0.13534D+00    0.13534D+00    0.12139D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7698 f-s =       8751 J-s =        136
+ Computed and reference solutions and absolute errors follow:
+  1   -0.15940D-10   -0.31006D-13    0.15909D-10
+  2   -0.52697D-11    0.38628D-13    0.53083D-11
+  3    0.18048D-34    0.18049D-34    0.39252D-39
+  4    0.20612D-08    0.20612D-08    0.42011D-16
+  5    0.45400D-04    0.45400D-04    0.28705D-13
+  6    0.13534D+00    0.13534D+00    0.22593D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        194
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1548 f-s =       1749 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.95595D-12
+  2    0.40016D-03    0.40016D-03    0.16263D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1399 f-s =       1592 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.43547D-11
+  2    0.40000D-01    0.40000D-01    0.19355D-12
+  3    0.40016D-01    0.40016D-01    0.17886D-12
+  4    0.40032D-01    0.40032D-01    0.17628D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1385 f-s =       1573 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22844D-11
+  2    0.40000D+00    0.40000D+00    0.10154D-11
+  3    0.41600D+00    0.41600D+00    0.10207D-11
+  4    0.43331D+00    0.43331D+00    0.10913D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1442 f-s =       1634 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.24203D-12
+  2    0.40000D+01    0.40000D+01    0.10765D-11
+  3    0.20000D+02    0.20000D+02    0.98126D-11
+  4    0.42000D+03    0.42000D+03    0.40643D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1471 f-s =       1668 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40301D-12
+  2    0.80000D+01    0.80000D+01    0.35856D-11
+  3    0.13600D+03    0.13600D+03    0.12108D-09
+  4    0.37128D+05    0.37128D+05    0.66611D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1131 f-s =       1382 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.16952D-08
+  2    0.27111D+02    0.27111D+02    0.16836D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1196 f-s =       1482 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.36513D-11
+  2    0.91855D-01    0.91855D-01    0.17145D-11
+  3    0.28416D+02    0.28416D+02    0.36537D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1657 f-s =       1905 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18641D-12
+  2    0.56309D-02    0.56309D-02    0.36429D-15
+  3    0.36024D+00    0.36024D+00    0.18452D-12
+  4    0.31706D+00    0.31706D+00    0.92426D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        209 f-s =        327 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.84600D-11
+  2    0.14023D+01    0.14023D+01    0.84555D-11
+  3   -0.18934D-05   -0.18934D-05    0.50029D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        982 f-s =       1392 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.14085D-09
+  2    0.98334D+00    0.98334D+00    0.16464D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        470 f-s =        685 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.62341D-11
+  2    0.14760D+00    0.14760D+00    0.62345D-11
+  3    0.57731D-07    0.57731D-07    0.76693D-18
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        429 f-s =        586 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.10913D-18
+  2    0.15167D-16   -0.16253D-18    0.15329D-16
+  3    0.22909D-15    0.20260D-16    0.20883D-15
+  4   -0.94167D-13   -0.18531D-14    0.92314D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       2143 f-s =       2444 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.71436D-09
+  2    0.43047D+00    0.43047D+00    0.77042D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =       1123 f-s =       1294 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.94980D-11
+  2    0.53170D-02    0.53170D-02    0.11860D-10
+  3    0.26276D+02    0.26276D+02    0.20265D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         89
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       6988 f-s =      18983 J-s =       1610
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.73932D-10
+  2   -0.20000D+02   -0.20000D+02    0.73815D-10
+  3   -0.22484D-06   -0.22476D-06    0.73937D-10
+  4    0.22484D-06    0.22476D-06    0.73804D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        103 f-s =        143 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.22400D-09
+  2    0.13822D-09    0.13822D-09    0.13925D-16
+  3    0.82516D-11    0.82516D-11    0.88715D-18
+  4    0.12997D-09    0.12997D-09    0.14812D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       2478 f-s =       3507 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.56027D-08
+  2    0.12711D-04    0.12711D-04    0.72880D-15
+  3    0.12086D+04    0.12086D+04    0.55616D-08
+  4    0.32420D-03    0.32420D-03    0.72658D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        638 f-s =        741 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.32807D-10
+  2    0.13300D-02    0.13300D-02    0.11144D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         66
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        215 f-s =        290 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.58978D-12    0.32359D-12    0.26619D-12
+  2    0.23607D-06    0.23607D-06    0.23707D-11
+  3    0.75758D-13    0.76393D-13    0.63542D-15
+  4    0.76393D-06    0.76393D-06    0.23837D-11
+  5    0.32361D-05    0.32361D-05    0.40680D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        165
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       7855 f-s =      10179 J-s =        141
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.35412D-08
+  2    0.12902D+01    0.12902D+01    0.30483D-09
+  3    0.30193D+01    0.30193D+01    0.14302D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         95
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        553 f-s =        870 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.12012D-14
+  2    0.37136D-02    0.37136D-02    0.26500D-10
+  3    0.61893D-02    0.61893D-02    0.44166D-10
+  4    0.95451D-05    0.95451D-05    0.12012D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1593 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68577D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46116D-83    0.28230D-55    0.28230D-55
+  4   -0.53930D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1400 f-s =       2299 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.19189D-11
+  2    0.20000D+00    0.20000D+00    0.38375D-11
+  3    0.30000D+00    0.30000D+00    0.53667D-11
+  4    0.40000D+00    0.40000D+00    0.63507D-11
+  5    0.50000D+00    0.50000D+00    0.66901D-11
+  6    0.60000D+00    0.60000D+00    0.63507D-11
+  7    0.70000D+00    0.70000D+00    0.53664D-11
+  8    0.80000D+00    0.80000D+00    0.38374D-11
+  9    0.90000D+00    0.90000D+00    0.19189D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        425
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1072
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1654 f-s =       2113 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.63829D-13
+  2    0.13685D-01    0.13685D-01    0.64426D-12
+  3    0.15037D+01    0.15037D+01    0.70922D-10
+  4    0.13534D+00    0.13534D+00    0.65012D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       3321 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20544D-10
+  2    0.17334D-13    0.12659D-13    0.46750D-14
+  3    0.13204D-46    0.19115D-41    0.19115D-41
+  4   -0.20126D-75    0.22774D-54    0.22774D-54
+  5    0.87474-109    0.00000D+00    0.87474-109
+  6   -0.91112-148    0.00000D+00    0.91112-148
+  7   -0.27914-190    0.00000D+00    0.27914-190
+  8    0.73439-237    0.00000D+00    0.73439-237
+  9   -0.38509-283    0.00000D+00    0.38509-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        500
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =       1271
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6814 f-s =       8700 J-s =        180
+ Computed and reference solutions and absolute errors follow:
+  1    0.10008D-08    0.10042D-08    0.33650D-11
+  2    0.17942D-07    0.18000D-07    0.58109D-10
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1556 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32348D-55    0.61813D-30    0.61813D-30
+  2    0.71849D-56    0.89637D-30    0.89637D-30
+  3    0.19968D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27425D-13
+  5    0.45400D-04    0.45400D-04    0.82192D-11
+  6    0.13534D+00    0.13534D+00    0.15074D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1733 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73977D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14472D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2020 f-s =       2747 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.23553D-21    0.13312D-21    0.10240D-21
+  2    0.42175D-20   -0.23259D-21    0.44501D-20
+  3    0.19921D-34    0.15179D-34    0.47421D-35
+  4    0.20612D-08    0.20612D-08    0.18480D-13
+  5    0.45400D-04    0.45400D-04    0.54998D-11
+  6    0.13534D+00    0.13534D+00    0.12131D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7701 f-s =      10385 J-s =        204
+ Computed and reference solutions and absolute errors follow:
+  1   -0.78107D-11   -0.31006D-13    0.77797D-11
+  2    0.59108D-11    0.38628D-13    0.58721D-11
+  3    0.18048D-34    0.18049D-34    0.38800D-39
+  4    0.20612D-08    0.20612D-08    0.41540D-16
+  5    0.45400D-04    0.45400D-04    0.28396D-13
+  6    0.13534D+00    0.13534D+00    0.30337D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        236
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        583
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1548 f-s =       1990 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.95538D-12
+  2    0.40016D-03    0.40016D-03    0.00000D+00
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1399 f-s =       1782 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.43714D-11
+  2    0.40000D-01    0.40000D-01    0.19430D-12
+  3    0.40016D-01    0.40016D-01    0.17954D-12
+  4    0.40032D-01    0.40032D-01    0.17696D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1385 f-s =       1766 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22662D-11
+  2    0.40000D+00    0.40000D+00    0.10075D-11
+  3    0.41600D+00    0.41600D+00    0.10126D-11
+  4    0.43331D+00    0.43331D+00    0.10824D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1438 f-s =       1849 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.25602D-12
+  2    0.40000D+01    0.40000D+01    0.11404D-11
+  3    0.20000D+02    0.20000D+02    0.10399D-10
+  4    0.42000D+03    0.42000D+03    0.43048D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1475 f-s =       1898 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40545D-12
+  2    0.80000D+01    0.80000D+01    0.36069D-11
+  3    0.13600D+03    0.13600D+03    0.12176D-09
+  4    0.37128D+05    0.37128D+05    0.66982D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1147 f-s =       1584 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.22788D-08
+  2    0.27111D+02    0.27111D+02    0.22937D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1149 f-s =       1534 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.42549D-11
+  2    0.91855D-01    0.91855D-01    0.19119D-11
+  3    0.28416D+02    0.28416D+02    0.42574D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1652 f-s =       2169 J-s =         52
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.13595D-11
+  2    0.56309D-02    0.56309D-02    0.26350D-14
+  3    0.36024D+00    0.36024D+00    0.13612D-11
+  4    0.31706D+00    0.31706D+00    0.68467D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        234 f-s =        417 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.31759D-10
+  2    0.14023D+01    0.14023D+01    0.31757D-10
+  3   -0.18934D-05   -0.18934D-05    0.12266D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        921 f-s =       1380 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.16232D-09
+  2    0.98334D+00    0.98334D+00    0.18684D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        467 f-s =        709 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.55376D-11
+  2    0.14760D+00    0.14760D+00    0.55367D-11
+  3    0.57731D-07    0.57731D-07    0.68062D-18
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        607 f-s =       1016 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.51823D-18
+  2   -0.30691D-17   -0.16253D-18    0.29065D-17
+  3    0.61744D-15    0.20260D-16    0.59718D-15
+  4    0.31268D-13   -0.18531D-14    0.33121D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       2175 f-s =       2628 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.68097D-09
+  2    0.43047D+00    0.43047D+00    0.73122D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        183
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =       1140 f-s =       1456 J-s =         37
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.69986D-11
+  2    0.53170D-02    0.53170D-02    0.87279D-11
+  3    0.26276D+02    0.26276D+02    0.30732D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        101
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        256
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       7437 f-s =      26031 J-s =       1620
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.29559D-10
+  2   -0.20000D+02   -0.20000D+02    0.29527D-10
+  3   -0.22479D-06   -0.22476D-06    0.30552D-10
+  4    0.22479D-06    0.22476D-06    0.28529D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        103 f-s =        191 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.23251D-09
+  2    0.13822D-09    0.13822D-09    0.13125D-16
+  3    0.82516D-11    0.82516D-11    0.22272D-18
+  4    0.12997D-09    0.12997D-09    0.13348D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        347
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       2401 f-s =       3904 J-s =         81
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.47503D-08
+  2    0.12711D-04    0.12711D-04    0.61744D-15
+  3    0.12086D+04    0.12086D+04    0.47155D-08
+  4    0.32420D-03    0.32420D-03    0.61556D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        657 f-s =        817 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.18717D-11
+  2    0.13300D-02    0.13300D-02    0.63569D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        185
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        219 f-s =        362 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.32354D-12    0.32359D-12    0.54948D-16
+  2    0.23607D-06    0.23607D-06    0.29011D-13
+  3    0.76393D-13    0.76393D-13    0.12127D-19
+  4    0.76393D-06    0.76393D-06    0.78850D-13
+  5    0.32361D-05    0.32361D-05    0.62705D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        195
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        461
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       7412 f-s =      10737 J-s =        235
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.16820D-08
+  2    0.12902D+01    0.12902D+01    0.14404D-09
+  3    0.30193D+01    0.30193D+01    0.73661D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        259
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        523 f-s =        944 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.25167D-16
+  2    0.37136D-02    0.37136D-02    0.55521D-12
+  3    0.61893D-02    0.61893D-02    0.92535D-12
+  4    0.95451D-05    0.95451D-05    0.25182D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        148
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        351
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46240D-83    0.28230D-55    0.28230D-55
+  4   -0.54017D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1389 f-s =       1746 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.14655D-11
+  2    0.20000D+00    0.20000D+00    0.29309D-11
+  3    0.30000D+00    0.30000D+00    0.40989D-11
+  4    0.40000D+00    0.40000D+00    0.48506D-11
+  5    0.50000D+00    0.50000D+00    0.51101D-11
+  6    0.60000D+00    0.60000D+00    0.48507D-11
+  7    0.70000D+00    0.70000D+00    0.40988D-11
+  8    0.80000D+00    0.80000D+00    0.29310D-11
+  9    0.90000D+00    0.90000D+00    0.14656D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        551
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        109
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1661 f-s =       1890 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.87729D-13
+  2    0.13685D-01    0.13685D-01    0.88546D-12
+  3    0.15037D+01    0.15037D+01    0.97478D-10
+  4    0.13534D+00    0.13534D+00    0.89390D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20548D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13242D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88166-109    0.00000D+00    0.88166-109
+  6   -0.91781-148    0.00000D+00    0.91781-148
+  7   -0.28134-190    0.00000D+00    0.28134-190
+  8    0.74098-237    0.00000D+00    0.74098-237
+  9   -0.38761-283    0.00000D+00    0.38761-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        660
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        111
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6745 f-s =       7690 J-s =        122
+ Computed and reference solutions and absolute errors follow:
+  1    0.10010D-08    0.10042D-08    0.31773D-11
+  2    0.17951D-07    0.18000D-07    0.49520D-10
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.10634-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32341D-55    0.61813D-30    0.61813D-30
+  2    0.70205D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82190D-11
+  6    0.13534D+00    0.13534D+00    0.15070D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.74038D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80713D-11
+  6    0.13534D+00    0.13534D+00    0.14461D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2020 f-s =       2315 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1    0.22879D-21    0.13312D-21    0.95661D-22
+  2    0.42124D-20   -0.23259D-21    0.44450D-20
+  3    0.19922D-34    0.15179D-34    0.47431D-35
+  4    0.20612D-08    0.20612D-08    0.18487D-13
+  5    0.45400D-04    0.45400D-04    0.55017D-11
+  6    0.13534D+00    0.13534D+00    0.12139D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7698 f-s =       8751 J-s =        136
+ Computed and reference solutions and absolute errors follow:
+  1   -0.15940D-10   -0.31006D-13    0.15909D-10
+  2   -0.52697D-11    0.38628D-13    0.53083D-11
+  3    0.18048D-34    0.18049D-34    0.39252D-39
+  4    0.20612D-08    0.20612D-08    0.42011D-16
+  5    0.45400D-04    0.45400D-04    0.28705D-13
+  6    0.13534D+00    0.13534D+00    0.22593D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        284
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1548 f-s =       1749 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.95595D-12
+  2    0.40016D-03    0.40016D-03    0.16263D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1399 f-s =       1592 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.43547D-11
+  2    0.40000D-01    0.40000D-01    0.19355D-12
+  3    0.40016D-01    0.40016D-01    0.17886D-12
+  4    0.40032D-01    0.40032D-01    0.17628D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1385 f-s =       1573 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22844D-11
+  2    0.40000D+00    0.40000D+00    0.10154D-11
+  3    0.41600D+00    0.41600D+00    0.10207D-11
+  4    0.43331D+00    0.43331D+00    0.10913D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1442 f-s =       1634 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.24203D-12
+  2    0.40000D+01    0.40000D+01    0.10765D-11
+  3    0.20000D+02    0.20000D+02    0.98126D-11
+  4    0.42000D+03    0.42000D+03    0.40643D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1471 f-s =       1668 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40301D-12
+  2    0.80000D+01    0.80000D+01    0.35856D-11
+  3    0.13600D+03    0.13600D+03    0.12108D-09
+  4    0.37128D+05    0.37128D+05    0.66611D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1131 f-s =       1382 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.16952D-08
+  2    0.27111D+02    0.27111D+02    0.16836D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1196 f-s =       1482 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.36513D-11
+  2    0.91855D-01    0.91855D-01    0.17145D-11
+  3    0.28416D+02    0.28416D+02    0.36537D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1657 f-s =       1905 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18641D-12
+  2    0.56309D-02    0.56309D-02    0.36429D-15
+  3    0.36024D+00    0.36024D+00    0.18452D-12
+  4    0.31706D+00    0.31706D+00    0.92426D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        209 f-s =        327 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.84600D-11
+  2    0.14023D+01    0.14023D+01    0.84555D-11
+  3   -0.18934D-05   -0.18934D-05    0.50029D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        982 f-s =       1392 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.14085D-09
+  2    0.98334D+00    0.98334D+00    0.16464D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        470 f-s =        685 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.62341D-11
+  2    0.14760D+00    0.14760D+00    0.62345D-11
+  3    0.57731D-07    0.57731D-07    0.76693D-18
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        429 f-s =        586 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.10913D-18
+  2    0.15167D-16   -0.16253D-18    0.15329D-16
+  3    0.22909D-15    0.20260D-16    0.20883D-15
+  4   -0.94167D-13   -0.18531D-14    0.92314D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       2143 f-s =       2444 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.71436D-09
+  2    0.43047D+00    0.43047D+00    0.77042D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         68
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         95
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =       1123 f-s =       1294 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.94980D-11
+  2    0.53170D-02    0.53170D-02    0.11860D-10
+  3    0.26276D+02    0.26276D+02    0.20265D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        107
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       6988 f-s =      18983 J-s =       1610
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.73932D-10
+  2   -0.20000D+02   -0.20000D+02    0.73815D-10
+  3   -0.22484D-06   -0.22476D-06    0.73937D-10
+  4    0.22484D-06    0.22476D-06    0.73804D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        103 f-s =        143 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.22400D-09
+  2    0.13822D-09    0.13822D-09    0.13925D-16
+  3    0.82516D-11    0.82516D-11    0.88715D-18
+  4    0.12997D-09    0.12997D-09    0.14812D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        156
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       2478 f-s =       3507 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.56027D-08
+  2    0.12711D-04    0.12711D-04    0.72880D-15
+  3    0.12086D+04    0.12086D+04    0.55616D-08
+  4    0.32420D-03    0.32420D-03    0.72658D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        638 f-s =        741 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.32807D-10
+  2    0.13300D-02    0.13300D-02    0.11144D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         72
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        215 f-s =        290 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.58978D-12    0.32359D-12    0.26619D-12
+  2    0.23607D-06    0.23607D-06    0.23707D-11
+  3    0.75758D-13    0.76393D-13    0.63542D-15
+  4    0.76393D-06    0.76393D-06    0.23837D-11
+  5    0.32361D-05    0.32361D-05    0.40680D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        225
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        106
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       7855 f-s =      10179 J-s =        141
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.35412D-08
+  2    0.12902D+01    0.12902D+01    0.30483D-09
+  3    0.30193D+01    0.30193D+01    0.14302D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        113
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        100
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for JACSP Jacobian follow.
+  Results for JACSP Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        553 f-s =        870 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.12012D-14
+  2    0.37136D-02    0.37136D-02    0.26500D-10
+  3    0.61893D-02    0.61893D-02    0.44166D-10
+  4    0.95451D-05    0.95451D-05    0.12012D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        103
+
+
+                     Results for ITOL =   5
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    5          1    0.32471D-05    0.32471D-05    0.32471D-05
+    5          2    0.45095D-05    0.45063D-05    0.45095D-05
+    5          3    0.40943D-06    0.38662D-06    0.40943D-06
+    5          4    0.35755D-04    0.35755D-04    0.35755D-04
+    5         11    0.82059D-04    0.20429D-04    0.82059D-04
+    5         12    0.25783D-05    0.25783D-05    0.25783D-05
+    5         13    0.36548D-06    0.36548D-06    0.36548D-06
+    5         14    0.13286D-04    0.13286D-04    0.13286D-04
+    5         15    0.22721D-03    0.22721D-03    0.22721D-03
+    5         21    0.21725D-06    0.15396D-05    0.21725D-06
+    5         22    0.26613D-06    0.44573D-05    0.26613D-06
+    5         23    0.58233D-05    0.13384D-05    0.58233D-05
+    5         24    0.12272D-03    0.15539D-02    0.12272D-03
+    5         25    0.26298D-01    0.11753D-01    0.26298D-01
+    5         31    0.10988D-02    0.84515D-03    0.10988D-02
+    5         32    0.41585D-03    0.93984D-03    0.41585D-03
+    5         33    0.30056D-05    0.12985D-06    0.30056D-05
+    5         34    0.22714D-04    0.42351D-04    0.22714D-04
+    5         35    0.45755D-02    0.45789D-02    0.45755D-02
+    5         36    0.74222D-05    0.26880D-05    0.74222D-05
+    5         41    0.50696D-11    0.50787D-11    0.50696D-11
+    5         42    0.78411D-04    0.70042D-04    0.78411D-04
+    5         43    0.42416D-04    0.17876D-03    0.42416D-04
+    5         44    0.52554D-04    0.10074D-05    0.52554D-04
+    5         45    0.53967D-03    0.75382D-05    0.53967D-03
+    5         51    0.98034D-02    0.90740D-02    0.98034D-02
+    5         52    0.30169D-04    0.44281D-04    0.30169D-04
+    5         53    0.62767D-05    0.62766D-05    0.62767D-05
+    5         54    0.17101D-02    0.12704D-02    0.17101D-02
+    5         55    0.84776D-08    0.69075D-11    0.84776D-08
+
+
+                     Results for ITOL =   6
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    6          1    0.30489D-06    0.30488D-06    0.30489D-06
+    6          2    0.20318D-06    0.20257D-06    0.20318D-06
+    6          3    0.15468D-04    0.15480D-04    0.15468D-04
+    6          4    0.76940D-06    0.76940D-06    0.76940D-06
+    6         11    0.67955D-05    0.67919D-05    0.67955D-05
+    6         12    0.21619D-05    0.21619D-05    0.21619D-05
+    6         13    0.20675D-05    0.20675D-05    0.20675D-05
+    6         14    0.17836D-05    0.17836D-05    0.17836D-05
+    6         15    0.61734D-05    0.61736D-05    0.61734D-05
+    6         21    0.33301D-07    0.90321D-06    0.33301D-07
+    6         22    0.21868D-07    0.21958D-06    0.21868D-07
+    6         23    0.23894D-07    0.13264D-05    0.23894D-07
+    6         24    0.59623D-04    0.96022D-04    0.59623D-04
+    6         25    0.35452D-02    0.13233D-01    0.35452D-02
+    6         31    0.23503D-03    0.20596D-03    0.23503D-03
+    6         32    0.92473D-04    0.11874D-03    0.92473D-04
+    6         33    0.27665D-06    0.56288D-07    0.27665D-06
+    6         34    0.50323D-05    0.50882D-05    0.50323D-05
+    6         35    0.13796D-04    0.17239D-04    0.13796D-04
+    6         36    0.44471D-05    0.12928D-05    0.44471D-05
+    6         41    0.10704D-08    0.13112D-08    0.10704D-08
+    6         42    0.77411D-04    0.43792D-04    0.77411D-04
+    6         43    0.48663D-04    0.12284D-04    0.48663D-04
+    6         44    0.96150D-06    0.38816D-04    0.96150D-06
+    6         45    0.18276D-05    0.12578D-04    0.18276D-05
+    6         51    0.14824D-02    0.33431D-03    0.14824D-02
+    6         52    0.78947D-05    0.83441D-05    0.78947D-05
+    6         53    0.30404D-06    0.30228D-06    0.30404D-06
+    6         54    0.20587D-03    0.64346D-05    0.20587D-03
+    6         55    0.70973D-08    0.53584D-12    0.70973D-08
+
+
+                     Results for ITOL =   7
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    7          1    0.17939D-06    0.17939D-06    0.17939D-06
+    7          2    0.90068D-07    0.19394D-06    0.90068D-07
+    7          3    0.41427D-06    0.24850D-06    0.41427D-06
+    7          4    0.13268D-06    0.13268D-06    0.13268D-06
+    7         11    0.41319D-06    0.41319D-06    0.41319D-06
+    7         12    0.12318D-06    0.12318D-06    0.12318D-06
+    7         13    0.11735D-06    0.11735D-06    0.11735D-06
+    7         14    0.12901D-06    0.12901D-06    0.12901D-06
+    7         15    0.24118D-05    0.24119D-05    0.24118D-05
+    7         21    0.57591D-08    0.85781D-08    0.57591D-08
+    7         22    0.19503D-07    0.41482D-06    0.19503D-07
+    7         23    0.71641D-07    0.85808D-07    0.71641D-07
+    7         24    0.64642D-04    0.21539D-04    0.64642D-04
+    7         25    0.61838D-02    0.82646D-03    0.61838D-02
+    7         31    0.23586D-04    0.16189D-04    0.23586D-04
+    7         32    0.25632D-04    0.47030D-05    0.25632D-04
+    7         33    0.65874D-09    0.12084D-06    0.65874D-09
+    7         34    0.22809D-07    0.22809D-07    0.22809D-07
+    7         35    0.13145D-05    0.56839D-05    0.13145D-05
+    7         36    0.19589D-07    0.23374D-06    0.19589D-07
+    7         41    0.19435D-08    0.22232D-08    0.19435D-08
+    7         42    0.11205D-04    0.70297D-05    0.11205D-04
+    7         43    0.23507D-05    0.56879D-05    0.23507D-05
+    7         44    0.82990D-08    0.12100D-05    0.82990D-08
+    7         45    0.11765D-05    0.10684D-06    0.11765D-05
+    7         51    0.32637D-04    0.24654D-04    0.32637D-04
+    7         52    0.80363D-06    0.69584D-06    0.80363D-06
+    7         53    0.10621D-06    0.63975D-07    0.10621D-06
+    7         54    0.32802D-04    0.14950D-04    0.32802D-04
+    7         55    0.26523D-12    0.94684D-11    0.26523D-12
+
+
+                     Results for ITOL =   8
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    8          1    0.10373D-07    0.10373D-07    0.10373D-07
+    8          2    0.94242D-08    0.17578D-07    0.94242D-08
+    8          3    0.11996D-06    0.11996D-06    0.11996D-06
+    8          4    0.81042D-08    0.81042D-08    0.81042D-08
+    8         11    0.63111D-07    0.11909D-06    0.63111D-07
+    8         12    0.20557D-07    0.20557D-07    0.20557D-07
+    8         13    0.16174D-07    0.16174D-07    0.16174D-07
+    8         14    0.37012D-07    0.37012D-07    0.37012D-07
+    8         15    0.87365D-07    0.87365D-07    0.87365D-07
+    8         21    0.34941D-08    0.35009D-08    0.34941D-08
+    8         22    0.56117D-07    0.65117D-07    0.56117D-07
+    8         23    0.30034D-09    0.13574D-08    0.30034D-09
+    8         24    0.17307D-05    0.20719D-05    0.17307D-05
+    8         25    0.10668D-02    0.35578D-03    0.10668D-02
+    8         31    0.17604D-05    0.17090D-05    0.17604D-05
+    8         32    0.57625D-06    0.51769D-06    0.57625D-06
+    8         33    0.87616D-08    0.30134D-08    0.87616D-08
+    8         34    0.27091D-06    0.20540D-06    0.27091D-06
+    8         35    0.68338D-06    0.33514D-06    0.68338D-06
+    8         36    0.34370D-07    0.12788D-07    0.34370D-07
+    8         41    0.94766D-10    0.13014D-08    0.94766D-10
+    8         42    0.14174D-05    0.14068D-05    0.14174D-05
+    8         43    0.65369D-06    0.45508D-06    0.65369D-06
+    8         44    0.59783D-08    0.59677D-08    0.59783D-08
+    8         45    0.16166D-06    0.99133D-07    0.16166D-06
+    8         51    0.55294D-05    0.41407D-04    0.55294D-05
+    8         52    0.21761D-07    0.82699D-08    0.21761D-07
+    8         53    0.63324D-10    0.62981D-10    0.63324D-10
+    8         54    0.71240D-05    0.62731D-05    0.71240D-05
+    8         55    0.92598D-12    0.13918D-07    0.92598D-12
+
+
+                     Results for ITOL =   9
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    9          1    0.20958D-08    0.20958D-08    0.20958D-08
+    9          2    0.17847D-08    0.17876D-08    0.17847D-08
+    9          3    0.61145D-07    0.61163D-07    0.61145D-07
+    9          4    0.36942D-09    0.36942D-09    0.36942D-09
+    9         11    0.17538D-07    0.17538D-07    0.17538D-07
+    9         12    0.22293D-08    0.22293D-08    0.22293D-08
+    9         13    0.16949D-08    0.16949D-08    0.16949D-08
+    9         14    0.84210D-09    0.84210D-09    0.84210D-09
+    9         15    0.10516D-07    0.10516D-07    0.10516D-07
+    9         21    0.32933D-08    0.33742D-08    0.32933D-08
+    9         22    0.31902D-09    0.32844D-09    0.31902D-09
+    9         23    0.94382D-09    0.31511D-08    0.94382D-09
+    9         24    0.49305D-06    0.41085D-06    0.49305D-06
+    9         25    0.16797D-04    0.24274D-04    0.16797D-04
+    9         31    0.18208D-06    0.15953D-06    0.18208D-06
+    9         32    0.26902D-06    0.27541D-06    0.26902D-06
+    9         33    0.11006D-09    0.37633D-08    0.11006D-09
+    9         34    0.38196D-07    0.60457D-08    0.38196D-07
+    9         35    0.57433D-07    0.10623D-06    0.57433D-07
+    9         36    0.18414D-08    0.44054D-08    0.18414D-08
+    9         41    0.40563D-10    0.11164D-08    0.40563D-10
+    9         42    0.18211D-06    0.17731D-06    0.18211D-06
+    9         43    0.20068D-06    0.10500D-06    0.20068D-06
+    9         44    0.24609D-09    0.48970D-08    0.24609D-09
+    9         45    0.51084D-08    0.78998D-08    0.51084D-08
+    9         51    0.48443D-06    0.23201D-06    0.48443D-06
+    9         52    0.28042D-08    0.74534D-08    0.28042D-08
+    9         53    0.13075D-10    0.13375D-10    0.13075D-10
+    9         54    0.15118D-05    0.28223D-06    0.15118D-05
+    9         55    0.70164D-11    0.17527D-11    0.70164D-11
+
+
+                     Results for ITOL =  10
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   10          1    0.33624D-09    0.33624D-09    0.33624D-09
+   10          2    0.20452D-09    0.22710D-09    0.20452D-09
+   10          3    0.26783D-08    0.26778D-08    0.26783D-08
+   10          4    0.54749D-09    0.54749D-09    0.54749D-09
+   10         11    0.24371D-08    0.24371D-08    0.24371D-08
+   10         12    0.36754D-09    0.36754D-09    0.36754D-09
+   10         13    0.32141D-09    0.32141D-09    0.32141D-09
+   10         14    0.19133D-09    0.19134D-09    0.19133D-09
+   10         15    0.51657D-08    0.51657D-08    0.51657D-08
+   10         21    0.25390D-09    0.24187D-09    0.25390D-09
+   10         22    0.79985D-09    0.80670D-09    0.79985D-09
+   10         23    0.34163D-09    0.11422D-09    0.34163D-09
+   10         24    0.38432D-07    0.37833D-07    0.38432D-07
+   10         25    0.16340D-05    0.30670D-05    0.16340D-05
+   10         31    0.54675D-07    0.50422D-07    0.54675D-07
+   10         32    0.47145D-07    0.34173D-07    0.47145D-07
+   10         33    0.48293D-10    0.10476D-10    0.48293D-10
+   10         34    0.12068D-08    0.34321D-09    0.12068D-08
+   10         35    0.11142D-07    0.11106D-07    0.11142D-07
+   10         36    0.24453D-09    0.41084D-09    0.24453D-09
+   10         41    0.18998D-11    0.14058D-09    0.18998D-11
+   10         42    0.36829D-07    0.30750D-07    0.36829D-07
+   10         43    0.10193D-06    0.37776D-07    0.10193D-06
+   10         44    0.10843D-08    0.18693D-07    0.10843D-08
+   10         45    0.33732D-08    0.32759D-08    0.33732D-08
+   10         51    0.28004D-06    0.36814D-06    0.28004D-06
+   10         52    0.27797D-09    0.28170D-09    0.27797D-09
+   10         53    0.14171D-09    0.28536D-09    0.14171D-09
+   10         54    0.12712D-06    0.15492D-06    0.12712D-06
+   10         55    0.55915D-11    0.52863D-11    0.55915D-11
+
+
+                     Results for ITOL =  11
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   11          1    0.33886D-10    0.33883D-10    0.33886D-10
+   11          2    0.33458D-10    0.31825D-10    0.33458D-10
+   11          3    0.94230D-09    0.94206D-09    0.94230D-09
+   11          4    0.27668D-09    0.27667D-09    0.27668D-09
+   11         11    0.32522D-09    0.32522D-09    0.32522D-09
+   11         12    0.52756D-10    0.52756D-10    0.52756D-10
+   11         13    0.50269D-10    0.50269D-10    0.50269D-10
+   11         14    0.52820D-10    0.53140D-10    0.52820D-10
+   11         15    0.25756D-10    0.24896D-10    0.25756D-10
+   11         21    0.61056D-11    0.61009D-11    0.61056D-11
+   11         22    0.18913D-10    0.18912D-10    0.18913D-10
+   11         23    0.69820D-11    0.69267D-11    0.69820D-11
+   11         24    0.30669D-08    0.28321D-08    0.30669D-08
+   11         25    0.45450D-06    0.45160D-06    0.45450D-06
+   11         31    0.91100D-08    0.93494D-08    0.91100D-08
+   11         32    0.17097D-07    0.75887D-09    0.17097D-07
+   11         33    0.54354D-11    0.18704D-10    0.54354D-11
+   11         34    0.97267D-10    0.45919D-10    0.97267D-10
+   11         35    0.11972D-08    0.14287D-08    0.11972D-08
+   11         36    0.23630D-10    0.39189D-10    0.23630D-10
+   11         41    0.18003D-12    0.32429D-12    0.18003D-12
+   11         42    0.44212D-08    0.55394D-08    0.44212D-08
+   11         43    0.23873D-08    0.23293D-08    0.23873D-08
+   11         44    0.15374D-08    0.46963D-09    0.15374D-08
+   11         45    0.67854D-09    0.91000D-09    0.67854D-09
+   11         51    0.40679D-07    0.26661D-07    0.40679D-07
+   11         52    0.19253D-09    0.19460D-09    0.19253D-09
+   11         53    0.24920D-11    0.65464D-10    0.24920D-11
+   11         54    0.31099D-07    0.68204D-08    0.31099D-07
+   11         55    0.16240D-11    0.49212D-12    0.16240D-11
+
+
+                     Results for ITOL =  12
+
+ Maximum Errors for All Problems Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   12          1    0.68578D-11    0.68577D-11    0.68578D-11
+   12          2    0.51101D-11    0.66901D-11    0.51101D-11
+   12          3    0.97478D-10    0.70922D-10    0.97478D-10
+   12          4    0.20548D-10    0.20544D-10    0.20548D-10
+   12         11    0.49520D-10    0.58109D-10    0.49520D-10
+   12         12    0.82190D-11    0.82192D-11    0.82190D-11
+   12         13    0.80713D-11    0.80714D-11    0.80713D-11
+   12         14    0.55017D-11    0.54998D-11    0.55017D-11
+   12         15    0.15909D-10    0.77797D-11    0.15909D-10
+   12         21    0.95595D-12    0.95538D-12    0.95595D-12
+   12         22    0.43547D-11    0.43714D-11    0.43547D-11
+   12         23    0.22844D-11    0.22662D-11    0.22844D-11
+   12         24    0.40643D-09    0.43048D-09    0.40643D-09
+   12         25    0.66611D-07    0.66982D-07    0.66611D-07
+   12         31    0.16952D-08    0.22937D-08    0.16952D-08
+   12         32    0.36537D-09    0.42574D-09    0.36537D-09
+   12         33    0.18641D-12    0.13612D-11    0.18641D-12
+   12         34    0.84600D-11    0.31759D-10    0.84600D-11
+   12         35    0.16464D-09    0.18684D-09    0.16464D-09
+   12         36    0.62345D-11    0.55376D-11    0.62345D-11
+   12         41    0.92314D-13    0.33121D-13    0.92314D-13
+   12         42    0.77042D-09    0.73122D-09    0.77042D-09
+   12         43    0.20265D-09    0.30732D-09    0.20265D-09
+   12         44    0.73937D-10    0.30552D-10    0.73937D-10
+   12         45    0.22400D-09    0.23251D-09    0.22400D-09
+   12         51    0.56027D-08    0.47503D-08    0.56027D-08
+   12         52    0.32807D-10    0.18717D-11    0.32807D-10
+   12         53    0.40680D-11    0.78850D-13    0.40680D-11
+   12         54    0.35412D-08    0.16820D-08    0.35412D-08
+   12         55    0.44166D-10    0.92535D-12    0.44166D-10
+
+
+                     Results for ITOL =   5
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        127       127       127
+        Jacs:           6         5         6
+        Ders:         192       208       192
+  
+    2   Steps:        153       153       153
+        Jacs:           5         6         5
+        Ders:         249       312       249
+  
+    3   Steps:        157       157       157
+        Jacs:           5         6         5
+        Ders:         226       254       226
+  
+    4   Steps:        189       189       189
+        Jacs:           6         8         6
+        Ders:         291       391       291
+  
+   11   Steps:        570       566       570
+        Jacs:          14        19        14
+        Ders:         713       811       713
+  
+   12   Steps:        107       107       107
+        Jacs:           4         5         4
+        Ders:         154       190       154
+  
+   13   Steps:        115       115       115
+        Jacs:           5         5         5
+        Ders:         166       196       166
+  
+   14   Steps:        169       169       169
+        Jacs:           5         8         5
+        Ders:         223       289       223
+  
+   15   Steps:       2552      2552      2552
+        Jacs:          46        70        46
+        Ders:        3023      3587      3023
+  
+   21   Steps:        141       138       141
+        Jacs:           6         5         6
+        Ders:         199       214       199
+  
+   22   Steps:        137       136       137
+        Jacs:           6         5         6
+        Ders:         196       211       196
+  
+   23   Steps:        127       128       127
+        Jacs:           5         5         5
+        Ders:         182       199       182
+  
+   24   Steps:        155       149       155
+        Jacs:           6         5         6
+        Ders:         224       237       224
+  
+   25   Steps:        150       151       150
+        Jacs:           5         6         5
+        Ders:         207       236       207
+  
+   31   Steps:        153       146       153
+        Jacs:           4         7         4
+        Ders:         265       294       265
+  
+   32   Steps:        139       160       139
+        Jacs:           3         8         3
+        Ders:         184       266       184
+  
+   33   Steps:        201       197       201
+        Jacs:           7         8         7
+        Ders:         313       320       313
+  
+   34   Steps:         21        21        21
+        Jacs:           1         4         1
+        Ders:          32        53        32
+  
+   35   Steps:         70        71        70
+        Jacs:           3         3         3
+        Ders:         117       121       117
+  
+   36   Steps:         52        46        52
+        Jacs:           2         5         2
+        Ders:          83        93        83
+  
+   41   Steps:         42        42        42
+        Jacs:           3         2         3
+        Ders:          72        76        72
+  
+   42   Steps:        215       205       215
+        Jacs:           5         8         5
+        Ders:         318       328       318
+  
+   43   Steps:        189       138       189
+        Jacs:           6         5         6
+        Ders:         316       223       316
+  
+   44   Steps:        292       287       292
+        Jacs:           8        11         8
+        Ders:         424       444       424
+  
+   45   Steps:         10        10        10
+        Jacs:           2         6         2
+        Ders:          29        65        29
+  
+   51   Steps:        273       348       273
+        Jacs:          16        24        16
+        Ders:         474       724       474
+  
+   52   Steps:         81        81        81
+        Jacs:           3         5         3
+        Ders:         113       130       113
+  
+   53   Steps:         20        20        20
+        Jacs:           2         3         2
+        Ders:          34        54        34
+  
+   54   Steps:       1180      1004      1180
+        Jacs:          29        45        29
+        Ders:        1914      1864      1914
+  
+   55   Steps:         45        88        45
+        Jacs:           2         5         2
+        Ders:          71       152        71
+  
+
+
+                     Results for ITOL =   6
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        168       168       168
+        Jacs:           7         8         7
+        Ders:         242       278       242
+  
+    2   Steps:        195       195       195
+        Jacs:           7         8         7
+        Ders:         311       391       311
+  
+    3   Steps:        210       210       210
+        Jacs:           6         8         6
+        Ders:         294       334       294
+  
+    4   Steps:        254       254       254
+        Jacs:           8        11         8
+        Ders:         390       530       390
+  
+   11   Steps:        763       763       763
+        Jacs:          19        27        19
+        Ders:         959      1099       959
+  
+   12   Steps:        137       137       137
+        Jacs:           5         5         5
+        Ders:         201       231       201
+  
+   13   Steps:        148       148       148
+        Jacs:           5         6         5
+        Ders:         207       249       207
+  
+   14   Steps:        303       303       303
+        Jacs:           9        11         9
+        Ders:         386       464       386
+  
+   15   Steps:       2684      2684      2684
+        Jacs:          49        72        49
+        Ders:        3153      3723      3153
+  
+   21   Steps:        186       183       186
+        Jacs:           7         8         7
+        Ders:         255       301       255
+  
+   22   Steps:        178       177       178
+        Jacs:           8         8         8
+        Ders:         253       287       253
+  
+   23   Steps:        174       173       174
+        Jacs:           7         8         7
+        Ders:         249       290       249
+  
+   24   Steps:        202       194       202
+        Jacs:           8         8         8
+        Ders:         315       319       315
+  
+   25   Steps:        199       192       199
+        Jacs:           7         8         7
+        Ders:         299       322       299
+  
+   31   Steps:        208       177       208
+        Jacs:           5         8         5
+        Ders:         366       325       366
+  
+   32   Steps:        263       223       263
+        Jacs:           5         9         5
+        Ders:         404       384       404
+  
+   33   Steps:        265       249       265
+        Jacs:           8        11         8
+        Ders:         382       407       382
+  
+   34   Steps:         30        30        30
+        Jacs:           1         2         1
+        Ders:          45        54        45
+  
+   35   Steps:         88        88        88
+        Jacs:           5         6         5
+        Ders:         146       159       146
+  
+   36   Steps:         61        59        61
+        Jacs:           2         5         2
+        Ders:          97       131        97
+  
+   41   Steps:         86        87        86
+        Jacs:           4         5         4
+        Ders:         138       163       138
+  
+   42   Steps:        269       248       269
+        Jacs:           6        10         6
+        Ders:         402       387       402
+  
+   43   Steps:        210       222       210
+        Jacs:           7         9         7
+        Ders:         298       387       298
+  
+   44   Steps:        377       562       377
+        Jacs:          11        80        11
+        Ders:         527      1511       527
+  
+   45   Steps:         15        14        15
+        Jacs:           2         7         2
+        Ders:          34        84        34
+  
+   51   Steps:        432       406       432
+        Jacs:          21        24        21
+        Ders:         764       801       764
+  
+   52   Steps:        102       102       102
+        Jacs:           3         5         3
+        Ders:         141       155       141
+  
+   53   Steps:         27        27        27
+        Jacs:           2         3         2
+        Ders:          45        65        45
+  
+   54   Steps:       1348      1224      1348
+        Jacs:          35        54        35
+        Ders:        2337      2386      2337
+  
+   55   Steps:         70       134        70
+        Jacs:           2         5         2
+        Ders:         103       248       103
+  
+
+
+                     Results for ITOL =   7
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        229       229       229
+        Jacs:           8         8         8
+        Ders:         308       340       308
+  
+    2   Steps:        251       256       251
+        Jacs:           9        11         9
+        Ders:         399       525       399
+  
+    3   Steps:        290       289       290
+        Jacs:           8        11         8
+        Ders:         401       454       401
+  
+    4   Steps:        358       358       358
+        Jacs:          11        14        11
+        Ders:         535       705       535
+  
+   11   Steps:       1094      1094      1094
+        Jacs:          25        36        25
+        Ders:        1357      1545      1357
+  
+   12   Steps:        201       201       201
+        Jacs:           7         7         7
+        Ders:         282       324       282
+  
+   13   Steps:        219       219       219
+        Jacs:           7         7         7
+        Ders:         301       343       301
+  
+   14   Steps:        364       364       364
+        Jacs:          10        13        10
+        Ders:         453       549       453
+  
+   15   Steps:       2961      2961      2961
+        Jacs:          55        84        55
+        Ders:        3451      4129      3451
+  
+   21   Steps:        267       266       267
+        Jacs:           9        11         9
+        Ders:         354       409       354
+  
+   22   Steps:        242       241       242
+        Jacs:           9        10         9
+        Ders:         334       379       334
+  
+   23   Steps:        241       240       241
+        Jacs:           9         9         9
+        Ders:         334       369       334
+  
+   24   Steps:        254       254       254
+        Jacs:           9        11         9
+        Ders:         374       412       374
+  
+   25   Steps:        256       258       256
+        Jacs:           9        11         9
+        Ders:         342       413       342
+  
+   31   Steps:        274       323       274
+        Jacs:           6        12         6
+        Ders:         420       547       420
+  
+   32   Steps:        299       268       299
+        Jacs:           7        11         7
+        Ders:         420       420       420
+  
+   33   Steps:        326       310       326
+        Jacs:          11        13        11
+        Ders:         476       515       476
+  
+   34   Steps:         55        55        55
+        Jacs:           3         3         3
+        Ders:          81        90        81
+  
+   35   Steps:        153       150       153
+        Jacs:           7         7         7
+        Ders:         263       261       263
+  
+   36   Steps:        147        84       147
+        Jacs:           3         5         3
+        Ders:         245       163       245
+  
+   41   Steps:        108       106       108
+        Jacs:           5         5         5
+        Ders:         172       190       172
+  
+   42   Steps:        364       366       364
+        Jacs:           9        14         9
+        Ders:         501       530       501
+  
+   43   Steps:        327       327       327
+        Jacs:          10        13        10
+        Ders:         514       546       514
+  
+   44   Steps:        552       811       552
+        Jacs:          14        95        14
+        Ders:         725      2010       725
+  
+   45   Steps:         22        20        22
+        Jacs:           2         5         2
+        Ders:          42        72        42
+  
+   51   Steps:        610       529       610
+        Jacs:          22        31        22
+        Ders:        1079      1058      1079
+  
+   52   Steps:        123       121       123
+        Jacs:           5         5         5
+        Ders:         192       195       192
+  
+   53   Steps:         46        46        46
+        Jacs:           2         3         2
+        Ders:          64        85        64
+  
+   54   Steps:       1637      1569      1637
+        Jacs:          39        64        39
+        Ders:        2695      2747      2695
+  
+   55   Steps:        117       109       117
+        Jacs:           4         8         4
+        Ders:         197       235       197
+  
+
+
+                     Results for ITOL =   8
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        302       302       302
+        Jacs:          11        11        11
+        Ders:         408       452       408
+  
+    2   Steps:        354       358       354
+        Jacs:          11        14        11
+        Ders:         526       679       526
+  
+    3   Steps:        400       400       400
+        Jacs:          11        14        11
+        Ders:         514       582       514
+  
+    4   Steps:        495       495       495
+        Jacs:          13        16        13
+        Ders:         685       875       685
+  
+   11   Steps:       1510      1544      1510
+        Jacs:          32        48        32
+        Ders:        1803      2107      1803
+  
+   12   Steps:        281       281       281
+        Jacs:           9        11         9
+        Ders:         371       449       371
+  
+   13   Steps:        305       305       305
+        Jacs:          10        11        10
+        Ders:         402       474       402
+  
+   14   Steps:        592       592       592
+        Jacs:          15        18        15
+        Ders:         737       863       737
+  
+   15   Steps:       3304      3304      3304
+        Jacs:          60        89        60
+        Ders:        3852      4560      3852
+  
+   21   Steps:        368       368       368
+        Jacs:          12        13        12
+        Ders:         463       519       463
+  
+   22   Steps:        340       339       340
+        Jacs:          11        13        11
+        Ders:         444       502       444
+  
+   23   Steps:        327       325       327
+        Jacs:          10        11        10
+        Ders:         415       462       415
+  
+   24   Steps:        341       336       341
+        Jacs:          11        14        11
+        Ders:         445       509       445
+  
+   25   Steps:        351       346       351
+        Jacs:          12        13        12
+        Ders:         460       510       460
+  
+   31   Steps:        418       380       418
+        Jacs:          10        13        10
+        Ders:         611       623       611
+  
+   32   Steps:        419       389       419
+        Jacs:           9        16         9
+        Ders:         596       627       596
+  
+   33   Steps:        434       413       434
+        Jacs:          13        18        13
+        Ders:         580       654       580
+  
+   34   Steps:         65        66        65
+        Jacs:           4         3         4
+        Ders:         100       109       100
+  
+   35   Steps:        217       229       217
+        Jacs:           9        10         9
+        Ders:         335       415       335
+  
+   36   Steps:        147       151       147
+        Jacs:           3         7         3
+        Ders:         230       280       230
+  
+   41   Steps:        135       141       135
+        Jacs:           7         5         7
+        Ders:         208       228       208
+  
+   42   Steps:        531       503       531
+        Jacs:          12        18        12
+        Ders:         666       699       666
+  
+   43   Steps:        384       410       384
+        Jacs:          11        16        11
+        Ders:         578       647       578
+  
+   44   Steps:        728       870       728
+        Jacs:          18        50        18
+        Ders:         914      1539       914
+  
+   45   Steps:         26        30        26
+        Jacs:           2         5         2
+        Ders:          53        93        53
+  
+   51   Steps:        753       684       753
+        Jacs:          25        32        25
+        Ders:        1289      1247      1289
+  
+   52   Steps:        166       164       166
+        Jacs:           5         5         5
+        Ders:         219       224       219
+  
+   53   Steps:         63        63        63
+        Jacs:           2         3         2
+        Ders:          87       107        87
+  
+   54   Steps:       2262      2276      2262
+        Jacs:          47        83        47
+        Ders:        3535      3876      3535
+  
+   55   Steps:        161       170       161
+        Jacs:           5         8         5
+        Ders:         296       326       296
+  
+
+
+                     Results for ITOL =   9
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        428       428       428
+        Jacs:          13        16        13
+        Ders:         542       618       542
+  
+    2   Steps:        486       486       486
+        Jacs:          14        16        14
+        Ders:         674       836       674
+  
+    3   Steps:        554       554       554
+        Jacs:          14        18        14
+        Ders:         674       762       674
+  
+    4   Steps:        703       703       703
+        Jacs:          18        26        18
+        Ders:         953      1293       953
+  
+   11   Steps:       2234      2234      2234
+        Jacs:          44        65        44
+        Ders:        2646      2990      2646
+  
+   12   Steps:        390       390       390
+        Jacs:          11        15        11
+        Ders:         495       609       495
+  
+   13   Steps:        426       426       426
+        Jacs:          11        13        11
+        Ders:         529       619       529
+  
+   14   Steps:        844       844       844
+        Jacs:          19        27        19
+        Ders:        1015      1225      1015
+  
+   15   Steps:       3856      3856      3856
+        Jacs:          70       105        70
+        Ders:        4465      5305      4465
+  
+   21   Steps:        525       525       525
+        Jacs:          16        18        16
+        Ders:         643       724       643
+  
+   22   Steps:        465       465       465
+        Jacs:          14        15        14
+        Ders:         579       643       579
+  
+   23   Steps:        469       469       469
+        Jacs:          13        15        13
+        Ders:         571       643       571
+  
+   24   Steps:        483       480       483
+        Jacs:          14        15        14
+        Ders:         605       653       605
+  
+   25   Steps:        478       492       478
+        Jacs:          14        16        14
+        Ders:         608       682       608
+  
+   31   Steps:        574       627       574
+        Jacs:          14        24        14
+        Ders:         823      1032       823
+  
+   32   Steps:        527       496       527
+        Jacs:          11        19        11
+        Ders:         755       772       755
+  
+   33   Steps:        580       582       580
+        Jacs:          16        20        16
+        Ders:         727       824       727
+  
+   34   Steps:         93        87        93
+        Jacs:           4         5         4
+        Ders:         163       147       163
+  
+   35   Steps:        424       338       424
+        Jacs:          12        14        12
+        Ders:         637       540       637
+  
+   36   Steps:        231       173       231
+        Jacs:           5         7         5
+        Ders:         366       311       366
+  
+   41   Steps:        182       181       182
+        Jacs:           7         8         7
+        Ders:         269       305       269
+  
+   42   Steps:        726       727       726
+        Jacs:          16        23        16
+        Ders:         889       948       889
+  
+   43   Steps:        529       495       529
+        Jacs:          15        17        15
+        Ders:         771       718       771
+  
+   44   Steps:       1062      1655      1062
+        Jacs:          24       223        24
+        Ders:        1274      4104      1274
+  
+   45   Steps:         42        43        42
+        Jacs:           2         5         2
+        Ders:          75       107        75
+  
+   51   Steps:       1025      1039      1025
+        Jacs:          28        42        28
+        Ders:        1620      1839      1620
+  
+   52   Steps:        238       242       238
+        Jacs:           8         9         8
+        Ders:         314       346       314
+  
+   53   Steps:         69        69        69
+        Jacs:           2         3         2
+        Ders:          95       115        95
+  
+   54   Steps:       3019      2960      3019
+        Jacs:          60       109        60
+        Ders:        4554      4976      4554
+  
+   55   Steps:        235       207       235
+        Jacs:           7         8         7
+        Ders:         416       398       416
+  
+
+
+                     Results for ITOL =  10
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        591       591       591
+        Jacs:          17        18        17
+        Ders:         713       789       713
+  
+    2   Steps:        700       700       700
+        Jacs:          19        23        19
+        Ders:         945      1186       945
+  
+    3   Steps:        787       787       787
+        Jacs:          18        25        18
+        Ders:         928      1056       928
+  
+    4   Steps:        999       999       999
+        Jacs:          22        31        22
+        Ders:        1284      1684      1284
+  
+   11   Steps:       3262      3264      3262
+        Jacs:          62        94        62
+        Ders:        3798      4290      3798
+  
+   12   Steps:        558       558       558
+        Jacs:          15        18        15
+        Ders:         697       823       697
+  
+   13   Steps:        598       598       598
+        Jacs:          16        19        16
+        Ders:         735       867       735
+  
+   14   Steps:       1129      1129      1129
+        Jacs:          24        32        24
+        Ders:        1323      1563      1323
+  
+   15   Steps:       4689      4689      4689
+        Jacs:          86       128        86
+        Ders:        5407      6427      5407
+  
+   21   Steps:        736       736       736
+        Jacs:          19        24        19
+        Ders:         886      1006       886
+  
+   22   Steps:        669       669       669
+        Jacs:          18        22        18
+        Ders:         804       908       804
+  
+   23   Steps:        659       654       659
+        Jacs:          18        20        18
+        Ders:         791       883       791
+  
+   24   Steps:        694       683       694
+        Jacs:          18        25        18
+        Ders:         826       944       826
+  
+   25   Steps:        703       709       703
+        Jacs:          18        22        18
+        Ders:         839       950       839
+  
+   31   Steps:        728       723       728
+        Jacs:          17        28        17
+        Ders:         998      1169       998
+  
+   32   Steps:        717       661       717
+        Jacs:          15        26        15
+        Ders:        1026      1029      1026
+  
+   33   Steps:        836       833       836
+        Jacs:          21        29        21
+        Ders:         999      1156       999
+  
+   34   Steps:        123       124       123
+        Jacs:           6         5         6
+        Ders:         189       218       189
+  
+   35   Steps:        561       447       561
+        Jacs:          14        17        14
+        Ders:         925       754       925
+  
+   36   Steps:        278       228       278
+        Jacs:           7        10         7
+        Ders:         462       409       462
+  
+   41   Steps:        227       237       227
+        Jacs:          10        10        10
+        Ders:         342       382       342
+  
+   42   Steps:       1041      1042      1041
+        Jacs:          21        34        21
+        Ders:        1214      1313      1214
+  
+   43   Steps:        660       609       660
+        Jacs:          17        20        17
+        Ders:         869       857       869
+  
+   44   Steps:       2969      3728      2969
+        Jacs:         931      1213       931
+        Ders:        9199     16705      9199
+  
+   45   Steps:         66        66        66
+        Jacs:           1         5         1
+        Ders:         100       136       100
+  
+   51   Steps:       1299      1156      1299
+        Jacs:          33        48        33
+        Ders:        1994      2091      1994
+  
+   52   Steps:        323       323       323
+        Jacs:          10        11        10
+        Ders:         395       419       395
+  
+   53   Steps:        137       131       137
+        Jacs:           3         6         3
+        Ders:         182       217       182
+  
+   54   Steps:       4324      4080      4324
+        Jacs:          81       146        81
+        Ders:        6276      6552      6276
+  
+   55   Steps:        355       333       355
+        Jacs:           9        16         9
+        Ders:         603       665       603
+  
+
+
+                     Results for ITOL =  11
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        868       868       868
+        Jacs:          21        25        21
+        Ders:        1013      1129      1013
+  
+    2   Steps:        987       986       987
+        Jacs:          24        32        24
+        Ders:        1318      1661      1318
+  
+    3   Steps:       1112      1112      1112
+        Jacs:          23        34        23
+        Ders:        1271      1451      1271
+  
+    4   Steps:       1447      1447      1447
+        Jacs:          31        44        31
+        Ders:        1825      2395      1825
+  
+   11   Steps:       4785      4784      4785
+        Jacs:          88       130        88
+        Ders:        5478      6163      5478
+  
+   12   Steps:        789       789       789
+        Jacs:          19        25        19
+        Ders:         950      1136       950
+  
+   13   Steps:        846       846       846
+        Jacs:          19        26        19
+        Ders:        1006      1204      1006
+  
+   14   Steps:       1404      1404      1404
+        Jacs:          29        41        29
+        Ders:        1635      1953      1635
+  
+   15   Steps:       6016      6016      6016
+        Jacs:         107       158       107
+        Ders:        6870      8122      6870
+  
+   21   Steps:       1072      1072      1072
+        Jacs:          25        32        25
+        Ders:        1231      1388      1231
+  
+   22   Steps:        947       947       947
+        Jacs:          23        29        23
+        Ders:        1104      1245      1104
+  
+   23   Steps:        931       931       931
+        Jacs:          22        28        22
+        Ders:        1077      1214      1077
+  
+   24   Steps:        993       993       993
+        Jacs:          23        31        23
+        Ders:        1144      1301      1144
+  
+   25   Steps:       1023      1023      1023
+        Jacs:          25        28        25
+        Ders:        1189      1314      1189
+  
+   31   Steps:        898       886       898
+        Jacs:          20        34        20
+        Ders:        1212      1327      1212
+  
+   32   Steps:        931      1003       931
+        Jacs:          19        37        19
+        Ders:        1231      1526      1231
+  
+   33   Steps:       1167      1147      1167
+        Jacs:          27        37        27
+        Ders:        1375      1545      1375
+  
+   34   Steps:        180       162       180
+        Jacs:           8         7         8
+        Ders:         309       296       309
+  
+   35   Steps:        669       640       669
+        Jacs:          16        23        16
+        Ders:        1022      1011      1022
+  
+   36   Steps:        331       352       331
+        Jacs:           8        14         8
+        Ders:         473       569       473
+  
+   41   Steps:        316       338       316
+        Jacs:          12        15        12
+        Ders:         447       547       447
+  
+   42   Steps:       1510      1525      1510
+        Jacs:          30        48        30
+        Ders:        1728      1881      1728
+  
+   43   Steps:        870       825       870
+        Jacs:          21        27        21
+        Ders:        1101      1099      1101
+  
+   44   Steps:       5489      5923      5489
+        Jacs:        1754      1748      1754
+        Ders:       17557     25091     17557
+  
+   45   Steps:         84        86        84
+        Jacs:           2         6         2
+        Ders:         130       172       130
+  
+   51   Steps:       1742      1812      1742
+        Jacs:          38        64        38
+        Ders:        2681      3086      2681
+  
+   52   Steps:        443       443       443
+        Jacs:          12        15        12
+        Ders:         534       570       534
+  
+   53   Steps:        135       157       135
+        Jacs:           3         8         3
+        Ders:         198       286       198
+  
+   54   Steps:       5707      5440      5707
+        Jacs:         104       182       104
+        Ders:        7825      8178      7825
+  
+   55   Steps:        427       454       427
+        Jacs:          11        17        11
+        Ders:         694       818       694
+  
+
+
+                     Results for ITOL =  12
+
+ Integration Statistics Follow:
+ The JACSP Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:       1239      1239      1239
+        Jacs:          28        36        28
+        Ders:        1417      1593      1417
+  
+    2   Steps:       1389      1400      1389
+        Jacs:          30        45        30
+        Ders:        1746      2299      1746
+  
+    3   Steps:       1661      1654      1661
+        Jacs:          34        45        34
+        Ders:        1890      2113      1890
+  
+    4   Steps:       2088      2088      2088
+        Jacs:          42        58        42
+        Ders:        2581      3321      2581
+  
+   11   Steps:       6745      6814      6745
+        Jacs:         122       180       122
+        Ders:        7690      8700      7690
+  
+   12   Steps:       1126      1126      1126
+        Jacs:          24        31        24
+        Ders:        1328      1556      1328
+  
+   13   Steps:       1254      1254      1254
+        Jacs:          27        36        27
+        Ders:        1463      1733      1463
+  
+   14   Steps:       2020      2020      2020
+        Jacs:          40        56        40
+        Ders:        2315      2747      2315
+  
+   15   Steps:       7698      7701      7698
+        Jacs:         136       204       136
+        Ders:        8751     10385      8751
+  
+   21   Steps:       1548      1548      1548
+        Jacs:          34        47        34
+        Ders:        1749      1990      1749
+  
+   22   Steps:       1399      1399      1399
+        Jacs:          31        39        31
+        Ders:        1592      1782      1592
+  
+   23   Steps:       1385      1385      1385
+        Jacs:          30        39        30
+        Ders:        1573      1766      1573
+  
+   24   Steps:       1442      1438      1442
+        Jacs:          32        43        32
+        Ders:        1634      1849      1634
+  
+   25   Steps:       1471      1475      1471
+        Jacs:          32        44        32
+        Ders:        1668      1898      1668
+  
+   31   Steps:       1131      1147      1131
+        Jacs:          25        41        25
+        Ders:        1382      1584      1382
+  
+   32   Steps:       1196      1149      1196
+        Jacs:          23        39        23
+        Ders:        1482      1534      1482
+  
+   33   Steps:       1657      1652      1657
+        Jacs:          36        52        36
+        Ders:        1905      2169      1905
+  
+   34   Steps:        209       234       209
+        Jacs:           8         9         8
+        Ders:         327       417       327
+  
+   35   Steps:        982       921       982
+        Jacs:          22        32        22
+        Ders:        1392      1380      1392
+  
+   36   Steps:        470       467       470
+        Jacs:          11        16        11
+        Ders:         685       709       685
+  
+   41   Steps:        429       607       429
+        Jacs:          15        29        15
+        Ders:         586      1016       586
+  
+   42   Steps:       2143      2175      2143
+        Jacs:          40        62        40
+        Ders:        2444      2628      2444
+  
+   43   Steps:       1123      1140      1123
+        Jacs:          26        37        26
+        Ders:        1294      1456      1294
+  
+   44   Steps:       6988      7437      6988
+        Jacs:        1610      1620      1610
+        Ders:       18983     26031     18983
+  
+   45   Steps:        103       103       103
+        Jacs:           2         7         2
+        Ders:         143       191       143
+  
+   51   Steps:       2478      2401      2478
+        Jacs:          49        81        49
+        Ders:        3507      3904      3507
+  
+   52   Steps:        638       657       638
+        Jacs:          16        21        16
+        Ders:         741       817       741
+  
+   53   Steps:        215       219       215
+        Jacs:           4         8         4
+        Ders:         290       362       290
+  
+   54   Steps:       7855      7412      7855
+        Jacs:         141       235       141
+        Ders:       10179     10737     10179
+  
+   55   Steps:        553       523       553
+        Jacs:          15        22        15
+        Ders:         870       944       870
+  
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        249 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+00    0.99999D-01    0.12923D-05
+  2    0.20000D+00    0.20000D+00    0.25844D-05
+  3    0.30000D+00    0.30000D+00    0.36132D-05
+  4    0.40000D+00    0.40000D+00    0.42769D-05
+  5    0.50000D+00    0.50000D+00    0.45109D-05
+  6    0.60000D+00    0.60000D+00    0.42915D-05
+  7    0.70000D+00    0.70000D+00    0.36361D-05
+  8    0.80000D+00    0.80000D+00    0.26056D-05
+  9    0.90000D+00    0.90000D+00    0.13029D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        157 f-s =        226 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.32361D-09
+  2    0.13685D-01    0.13685D-01    0.26711D-08
+  3    0.15037D+01    0.15037D+01    0.35956D-06
+  4    0.13534D+00    0.13534D+00    0.91883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87705D-28    0.00000D+00    0.87705D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44604D-45    0.00000D+00    0.44604D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        570 f-s =        713 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.14194D-04    0.10042D-08    0.14193D-04
+  2    0.82072D-04    0.18000D-07    0.82054D-04
+  3    0.51689D-33    0.00000D+00    0.51689D-33
+  4   -0.12036D-30   -0.60430D-78    0.12036D-30
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        169 f-s =        223 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19035D-12    0.13312D-21    0.19035D-12
+  2   -0.10521D-10   -0.23259D-21    0.10521D-10
+  3   -0.37706D-10    0.15179D-34    0.37706D-10
+  4    0.76152D-06    0.20612D-08    0.75946D-06
+  5    0.58685D-04    0.45400D-04    0.13286D-04
+  6    0.13534D+00    0.13534D+00    0.51649D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2552 f-s =       3023 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11725D-03   -0.31006D-13    0.11725D-03
+  2   -0.22722D-03    0.38628D-13    0.22722D-03
+  3    0.18048D-34    0.18049D-34    0.50176D-39
+  4    0.20612D-08    0.20612D-08    0.38795D-16
+  5    0.45400D-04    0.45400D-04    0.44899D-13
+  6    0.13534D+00    0.13534D+00    0.96960D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        141 f-s =        199 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.40054D-03    0.40032D-03    0.21724D-06
+  2    0.40016D-03    0.40016D-03    0.54344D-09
+  3    0.40000D-03    0.40000D-03    0.29683D-12
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10059D-06
+  2    0.40000D-01    0.40000D-01    0.26613D-06
+  3    0.40016D-01    0.40016D-01    0.13896D-06
+  4    0.40032D-01    0.40032D-01    0.10179D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        182 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.58233D-05
+  2    0.40000D+00    0.40000D+00    0.25734D-05
+  3    0.41600D+00    0.41600D+00    0.25912D-05
+  4    0.43330D+00    0.43331D+00    0.27705D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        155 f-s =        224 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.20441D-06
+  2    0.40000D+01    0.40000D+01    0.75101D-06
+  3    0.20000D+02    0.20000D+02    0.44355D-05
+  4    0.42000D+03    0.42000D+03    0.12272D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        150 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.44187D-07
+  2    0.80000D+01    0.80000D+01    0.40855D-06
+  3    0.13600D+03    0.13600D+03    0.15833D-04
+  4    0.37128D+05    0.37128D+05    0.26298D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        154 f-s =        265 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.22243D+02    0.22242D+02    0.94883D-03
+  2    0.27112D+02    0.27111D+02    0.15815D-02
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        139 f-s =        183 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41610D-05
+  2    0.91852D-01    0.91855D-01    0.32288D-05
+  3    0.28416D+02    0.28416D+02    0.41606D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        179 f-s =        276 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.77384D-06
+  2    0.56309D-02    0.56309D-02    0.99464D-09
+  3    0.36024D+00    0.36024D+00    0.77384D-06
+  4    0.31706D+00    0.31706D+00    0.38741D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         21 f-s =         32 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59763D+00    0.59765D+00    0.22714D-04
+  2    0.14024D+01    0.14023D+01    0.22714D-04
+  3   -0.18934D-05   -0.18934D-05    0.36304D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         70 f-s =        117 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99622D+00   -0.99164D+00    0.45754D-02
+  2    0.98698D+00    0.98334D+00    0.36394D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         51 f-s =         84 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85239D+00    0.85240D+00    0.11467D-04
+  2    0.14761D+00    0.14760D+00    0.11467D-04
+  3    0.57733D-07    0.57731D-07    0.18609D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         72 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.10220D-14
+  2    0.48887D-13   -0.16253D-18    0.48887D-13
+  3   -0.16836D-11    0.20260D-16    0.16836D-11
+  4   -0.66697D-11   -0.18531D-14    0.66679D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        215 f-s =        318 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.78507D-04
+  2    0.43050D+00    0.43047D+00    0.34142D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        189 f-s =        316 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.42734D-02    0.42531D-02    0.20356D-04
+  2    0.53422D-02    0.53170D-02    0.25135D-04
+  3    0.26276D+02    0.26276D+02    0.42188D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        288 f-s =        423 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.38158D-04
+  2   -0.20000D+02   -0.20000D+02    0.38158D-04
+  3   -0.38382D-04   -0.22476D-06    0.38158D-04
+  4    0.38382D-04    0.22476D-06    0.38158D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         10 f-s =         29 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.21588D-02    0.16181D-02    0.54075D-03
+  2   -0.57688D-09    0.13822D-09    0.71510D-09
+  3   -0.25543D-10    0.82516D-11    0.33795D-10
+  4   -0.55133D-09    0.12997D-09    0.68131D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        295 f-s =        514 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.66681D-02
+  2    0.14691D-04    0.12711D-04    0.19801D-05
+  3    0.12086D+04    0.12086D+04    0.66184D-02
+  4    0.32617D-03    0.32420D-03    0.19718D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         81 f-s =        116 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39123D+00    0.39127D+00    0.42227D-04
+  2    0.13298D-02    0.13300D-02    0.14327D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         19 f-s =         32 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.00000D+00    0.32359D-12    0.32359D-12
+  2    0.46255D-07    0.23607D-06    0.18981D-06
+  3    0.81580D-11    0.76393D-13    0.80817D-11
+  4    0.94311D-07    0.76393D-06    0.66962D-06
+  5    0.10062D-04    0.32361D-05    0.68255D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1158 f-s =       1963 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.44188D+01    0.44183D+01    0.54195D-03
+  2    0.12902D+01    0.12902D+01    0.46282D-04
+  3    0.30195D+01    0.30193D+01    0.25751D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         45 f-s =         71 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.52655D-13
+  2    0.37136D-02    0.37136D-02    0.57491D-08
+  3    0.61893D-02    0.61893D-02    0.10316D-07
+  4    0.95451D-05    0.95451D-05    0.52597D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        208 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        312 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+00    0.99999D-01    0.12870D-05
+  2    0.20000D+00    0.20000D+00    0.25738D-05
+  3    0.30000D+00    0.30000D+00    0.35983D-05
+  4    0.40000D+00    0.40000D+00    0.42590D-05
+  5    0.50000D+00    0.50000D+00    0.44918D-05
+  6    0.60000D+00    0.60000D+00    0.42729D-05
+  7    0.70000D+00    0.70000D+00    0.36201D-05
+  8    0.80000D+00    0.80000D+00    0.25941D-05
+  9    0.90000D+00    0.90000D+00    0.12971D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        157 f-s =        254 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.38884D-09
+  2    0.13685D-01    0.13685D-01    0.34039D-08
+  3    0.15037D+01    0.15037D+01    0.43204D-06
+  4    0.13534D+00    0.13534D+00    0.91162D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        391 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87705D-28    0.00000D+00    0.87705D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44605D-45    0.00000D+00    0.44605D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        566 f-s =        811 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.20513D-04    0.10042D-08    0.20514D-04
+  2   -0.17682D-04    0.18000D-07    0.17700D-04
+  3   -0.15268D-39    0.00000D+00    0.15268D-39
+  4    0.12048D-37   -0.60430D-78    0.12048D-37
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        190 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        196 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        169 f-s =        289 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19032D-12    0.13312D-21    0.19032D-12
+  2   -0.10521D-10   -0.23259D-21    0.10521D-10
+  3   -0.37706D-10    0.15179D-34    0.37706D-10
+  4    0.76153D-06    0.20612D-08    0.75946D-06
+  5    0.58685D-04    0.45400D-04    0.13286D-04
+  6    0.13534D+00    0.13534D+00    0.51649D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2552 f-s =       3587 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11726D-03   -0.31006D-13    0.11726D-03
+  2   -0.22722D-03    0.38628D-13    0.22722D-03
+  3    0.18048D-34    0.18049D-34    0.50176D-39
+  4    0.20612D-08    0.20612D-08    0.38795D-16
+  5    0.45400D-04    0.45400D-04    0.44902D-13
+  6    0.13534D+00    0.13534D+00    0.96970D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        138 f-s =        214 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39878D-03    0.40032D-03    0.15394D-05
+  2    0.40016D-03    0.40016D-03    0.23294D-09
+  3    0.40000D-03    0.40000D-03    0.65432D-16
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        136 f-s =        211 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.44573D-05
+  2    0.39999D-01    0.40000D-01    0.52529D-06
+  3    0.40016D-01    0.40016D-01    0.24479D-06
+  4    0.40032D-01    0.40032D-01    0.22382D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        128 f-s =        199 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.13384D-05
+  2    0.40000D+00    0.40000D+00    0.46498D-06
+  3    0.41600D+00    0.41600D+00    0.50369D-06
+  4    0.43331D+00    0.43331D+00    0.54350D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        149 f-s =        237 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31326D-07
+  2    0.40000D+01    0.40000D+01    0.14647D-06
+  3    0.20000D+02    0.20000D+02    0.73916D-05
+  4    0.42000D+03    0.42000D+03    0.15540D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        151 f-s =        236 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.71166D-07
+  2    0.80000D+01    0.80000D+01    0.63268D-06
+  3    0.13600D+03    0.13600D+03    0.21350D-04
+  4    0.37128D+05    0.37128D+05    0.11753D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        152 f-s =        281 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.22243D+02    0.22242D+02    0.83322D-03
+  2    0.27112D+02    0.27111D+02    0.14478D-02
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        161 f-s =        266 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.71584D+00    0.71583D+00    0.93195D-05
+  2    0.91859D-01    0.91855D-01    0.36184D-05
+  3    0.28415D+02    0.28416D+02    0.93199D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        206 f-s =        340 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.20905D-05
+  2    0.56308D-02    0.56309D-02    0.52595D-07
+  3    0.36024D+00    0.36024D+00    0.20905D-05
+  4    0.31706D+00    0.31706D+00    0.10189D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         21 f-s =         53 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59761D+00    0.59765D+00    0.42350D-04
+  2    0.14024D+01    0.14023D+01    0.42351D-04
+  3   -0.18933D-05   -0.18934D-05    0.12630D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         71 f-s =        121 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99622D+00   -0.99164D+00    0.45821D-02
+  2    0.98700D+00    0.98334D+00    0.36587D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         46 f-s =         93 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.26993D-05
+  2    0.14760D+00    0.14760D+00    0.26993D-05
+  3    0.57731D-07    0.57731D-07    0.34222D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         76 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.96397D-15
+  2    0.47391D-13   -0.16253D-18    0.47391D-13
+  3   -0.16527D-11    0.20260D-16    0.16527D-11
+  4   -0.48539D-11   -0.18531D-14    0.48520D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        205 f-s =        328 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.69927D-04
+  2    0.43047D+00    0.43047D+00    0.28371D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        138 f-s =        223 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.42420D-02    0.42531D-02    0.11018D-04
+  2    0.53043D-02    0.53170D-02    0.12744D-04
+  3    0.26277D+02    0.26276D+02    0.17876D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        294 f-s =        464 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.13429D-04
+  2   -0.20000D+02   -0.20000D+02    0.13429D-04
+  3   -0.13654D-04   -0.22476D-06    0.13429D-04
+  4    0.13654D-04    0.22476D-06    0.13429D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         10 f-s =         65 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.16256D-02    0.16181D-02    0.75382D-05
+  2    0.13947D-09    0.13822D-09    0.12509D-11
+  3    0.82857D-11    0.82516D-11    0.34090D-13
+  4    0.13119D-09    0.12997D-09    0.12170D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        301 f-s =        647 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.86694D-02
+  2    0.12712D-04    0.12711D-04    0.42343D-09
+  3    0.12086D+04    0.12086D+04    0.86053D-02
+  4    0.32420D-03    0.32420D-03    0.42500D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         81 f-s =        130 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39123D+00    0.39127D+00    0.44278D-04
+  2    0.13298D-02    0.13300D-02    0.15039D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         17 f-s =         61 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.52782D-05    0.32359D-12    0.52782D-05
+  2    0.00000D+00    0.23607D-06    0.23607D-06
+  3    0.00000D+00    0.76393D-13    0.76393D-13
+  4    0.00000D+00    0.76393D-06    0.76393D-06
+  5    0.00000D+00    0.32361D-05    0.32361D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1073 f-s =       1958 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.44200D+01    0.44183D+01    0.16665D-02
+  2    0.12901D+01    0.12902D+01    0.13402D-03
+  3    0.30199D+01    0.30193D+01    0.64597D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         88 f-s =        152 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.44148D-16
+  2    0.37136D-02    0.37136D-02    0.94077D-12
+  3    0.61893D-02    0.61893D-02    0.16224D-11
+  4    0.95451D-05    0.95451D-05    0.44325D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        192 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.47076D-04    0.45400D-04    0.16763D-05
+  2   -0.32451D-05    0.20612D-08    0.32471D-05
+  3    0.22841D-18    0.28230D-55    0.22841D-18
+  4    0.15703D-17    0.52358D-51    0.15703D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        153 f-s =        249 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D+00    0.99999D-01    0.12923D-05
+  2    0.20000D+00    0.20000D+00    0.25844D-05
+  3    0.30000D+00    0.30000D+00    0.36132D-05
+  4    0.40000D+00    0.40000D+00    0.42769D-05
+  5    0.50000D+00    0.50000D+00    0.45109D-05
+  6    0.60000D+00    0.60000D+00    0.42915D-05
+  7    0.70000D+00    0.70000D+00    0.36361D-05
+  8    0.80000D+00    0.80000D+00    0.26056D-05
+  9    0.90000D+00    0.90000D+00    0.13029D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        157 f-s =        226 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.32361D-09
+  2    0.13685D-01    0.13685D-01    0.26711D-08
+  3    0.15037D+01    0.15037D+01    0.35956D-06
+  4    0.13534D+00    0.13534D+00    0.91883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        189 f-s =        291 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.36792D+00    0.36788D+00    0.35755D-04
+  2    0.12636D-06    0.12659D-13    0.12636D-06
+  3   -0.10000D-10    0.19115D-41    0.10000D-10
+  4   -0.10809D-15    0.22774D-54    0.10809D-15
+  5    0.10328D-19    0.00000D+00    0.10328D-19
+  6    0.87705D-28    0.00000D+00    0.87705D-28
+  7    0.18845D-30    0.00000D+00    0.18845D-30
+  8    0.71774D-35    0.00000D+00    0.71774D-35
+  9   -0.21962D-39    0.00000D+00    0.21962D-39
+ 10    0.44604D-45    0.00000D+00    0.44604D-45
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        570 f-s =        713 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.14194D-04    0.10042D-08    0.14193D-04
+  2    0.82072D-04    0.18000D-07    0.82054D-04
+  3    0.51689D-33    0.00000D+00    0.51689D-33
+  4   -0.12036D-30   -0.60430D-78    0.12036D-30
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        107 f-s =        154 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1   -0.18969D-09    0.61813D-30    0.18969D-09
+  2   -0.16812D-08    0.89637D-30    0.16812D-08
+  3    0.25452D-07    0.27384D-26    0.25452D-07
+  4    0.11727D-06    0.20612D-08    0.11521D-06
+  5    0.47978D-04    0.45400D-04    0.25783D-05
+  6    0.13534D+00    0.13534D+00    0.23688D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        115 f-s =        166 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.27832D-08   -0.10768D-27    0.27832D-08
+  2   -0.44455D-09    0.54550D-27    0.44455D-09
+  3    0.31585D-09    0.27385D-26    0.31585D-09
+  4   -0.12067D-06    0.20612D-08    0.12273D-06
+  5    0.45765D-04    0.45400D-04    0.36548D-06
+  6    0.13534D+00    0.13534D+00    0.89097D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        169 f-s =        223 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.19035D-12    0.13312D-21    0.19035D-12
+  2   -0.10521D-10   -0.23259D-21    0.10521D-10
+  3   -0.37706D-10    0.15179D-34    0.37706D-10
+  4    0.76152D-06    0.20612D-08    0.75946D-06
+  5    0.58685D-04    0.45400D-04    0.13286D-04
+  6    0.13534D+00    0.13534D+00    0.51649D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2552 f-s =       3023 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11725D-03   -0.31006D-13    0.11725D-03
+  2   -0.22722D-03    0.38628D-13    0.22722D-03
+  3    0.18048D-34    0.18049D-34    0.50176D-39
+  4    0.20612D-08    0.20612D-08    0.38795D-16
+  5    0.45400D-04    0.45400D-04    0.44899D-13
+  6    0.13534D+00    0.13534D+00    0.96960D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        141 f-s =        199 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.40054D-03    0.40032D-03    0.21724D-06
+  2    0.40016D-03    0.40016D-03    0.54344D-09
+  3    0.40000D-03    0.40000D-03    0.29683D-12
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        196 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10059D-06
+  2    0.40000D-01    0.40000D-01    0.26613D-06
+  3    0.40016D-01    0.40016D-01    0.13896D-06
+  4    0.40032D-01    0.40032D-01    0.10179D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        127 f-s =        182 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.58233D-05
+  2    0.40000D+00    0.40000D+00    0.25734D-05
+  3    0.41600D+00    0.41600D+00    0.25912D-05
+  4    0.43330D+00    0.43331D+00    0.27705D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        155 f-s =        224 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.20441D-06
+  2    0.40000D+01    0.40000D+01    0.75101D-06
+  3    0.20000D+02    0.20000D+02    0.44355D-05
+  4    0.42000D+03    0.42000D+03    0.12272D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        150 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.44187D-07
+  2    0.80000D+01    0.80000D+01    0.40855D-06
+  3    0.13600D+03    0.13600D+03    0.15833D-04
+  4    0.37128D+05    0.37128D+05    0.26298D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        154 f-s =        265 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.22243D+02    0.22242D+02    0.94883D-03
+  2    0.27112D+02    0.27111D+02    0.15815D-02
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        139 f-s =        183 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.41610D-05
+  2    0.91852D-01    0.91855D-01    0.32288D-05
+  3    0.28416D+02    0.28416D+02    0.41606D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        179 f-s =        276 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.77384D-06
+  2    0.56309D-02    0.56309D-02    0.99464D-09
+  3    0.36024D+00    0.36024D+00    0.77384D-06
+  4    0.31706D+00    0.31706D+00    0.38741D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         21 f-s =         32 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59763D+00    0.59765D+00    0.22714D-04
+  2    0.14024D+01    0.14023D+01    0.22714D-04
+  3   -0.18934D-05   -0.18934D-05    0.36304D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         70 f-s =        117 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99622D+00   -0.99164D+00    0.45754D-02
+  2    0.98698D+00    0.98334D+00    0.36394D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         51 f-s =         84 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85239D+00    0.85240D+00    0.11467D-04
+  2    0.14761D+00    0.14760D+00    0.11467D-04
+  3    0.57733D-07    0.57731D-07    0.18609D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         42 f-s =         72 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.10220D-14
+  2    0.48887D-13   -0.16253D-18    0.48887D-13
+  3   -0.16836D-11    0.20260D-16    0.16836D-11
+  4   -0.66697D-11   -0.18531D-14    0.66679D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        215 f-s =        318 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11586D+01   -0.11587D+01    0.78507D-04
+  2    0.43050D+00    0.43047D+00    0.34142D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        189 f-s =        316 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.42734D-02    0.42531D-02    0.20356D-04
+  2    0.53422D-02    0.53170D-02    0.25135D-04
+  3    0.26276D+02    0.26276D+02    0.42188D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        288 f-s =        423 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.38158D-04
+  2   -0.20000D+02   -0.20000D+02    0.38158D-04
+  3   -0.38382D-04   -0.22476D-06    0.38158D-04
+  4    0.38382D-04    0.22476D-06    0.38158D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         10 f-s =         29 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.21588D-02    0.16181D-02    0.54075D-03
+  2   -0.57688D-09    0.13822D-09    0.71510D-09
+  3   -0.25543D-10    0.82516D-11    0.33795D-10
+  4   -0.55133D-09    0.12997D-09    0.68131D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        295 f-s =        514 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.66681D-02
+  2    0.14691D-04    0.12711D-04    0.19801D-05
+  3    0.12086D+04    0.12086D+04    0.66184D-02
+  4    0.32617D-03    0.32420D-03    0.19718D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         81 f-s =        116 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39123D+00    0.39127D+00    0.42227D-04
+  2    0.13298D-02    0.13300D-02    0.14327D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         19 f-s =         32 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.00000D+00    0.32359D-12    0.32359D-12
+  2    0.46255D-07    0.23607D-06    0.18981D-06
+  3    0.81580D-11    0.76393D-13    0.80817D-11
+  4    0.94311D-07    0.76393D-06    0.66962D-06
+  5    0.10062D-04    0.32361D-05    0.68255D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1158 f-s =       1963 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.44188D+01    0.44183D+01    0.54195D-03
+  2    0.12902D+01    0.12902D+01    0.46282D-04
+  3    0.30195D+01    0.30193D+01    0.25751D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             5  follow.
+  Results for ITOL =             5  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-04
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         45 f-s =         71 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.52655D-13
+  2    0.37136D-02    0.37136D-02    0.57491D-08
+  3    0.61893D-02    0.61893D-02    0.10316D-07
+  4    0.95451D-05    0.95451D-05    0.52597D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30490D-06
+  2   -0.90870D-08    0.20612D-08    0.11148D-07
+  3    0.24196D-22    0.28230D-55    0.24196D-22
+  4   -0.15669D-21    0.52358D-51    0.15669D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        195 f-s =        309 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.54848D-07
+  2    0.20000D+00    0.20000D+00    0.10969D-06
+  3    0.30000D+00    0.30000D+00    0.15555D-06
+  4    0.40000D+00    0.40000D+00    0.18793D-06
+  5    0.50000D+00    0.50000D+00    0.20269D-06
+  6    0.60000D+00    0.60000D+00    0.19689D-06
+  7    0.70000D+00    0.70000D+00    0.16963D-06
+  8    0.80000D+00    0.80000D+00    0.12284D-06
+  9    0.90000D+00    0.90000D+00    0.61424D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        210 f-s =        294 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.13975D-07
+  2    0.13685D-01    0.13685D-01    0.14417D-06
+  3    0.15037D+01    0.15037D+01    0.15528D-04
+  4    0.13533D+00    0.13534D+00    0.11159D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33859D-18    0.22774D-54    0.33859D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        763 f-s =        960 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.88738D-06    0.10042D-08    0.88638D-06
+  2   -0.68091D-05    0.18000D-07    0.68271D-05
+  3   -0.22172D-46    0.00000D+00    0.22172D-46
+  4   -0.19566D-43   -0.60430D-78    0.19566D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        303 f-s =        386 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.27743D-10    0.13312D-21    0.27743D-10
+  2    0.47648D-10   -0.23259D-21    0.47648D-10
+  3   -0.20095D-14    0.15179D-34    0.20095D-14
+  4    0.20735D-06    0.20612D-08    0.20528D-06
+  5    0.47184D-04    0.45400D-04    0.17836D-05
+  6    0.13534D+00    0.13534D+00    0.95883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2684 f-s =       3153 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.30953D-05   -0.31006D-13    0.30953D-05
+  2    0.61741D-05    0.38628D-13    0.61741D-05
+  3    0.18048D-34    0.18049D-34    0.52734D-39
+  4    0.20612D-08    0.20612D-08    0.54546D-16
+  5    0.45400D-04    0.45400D-04    0.30370D-13
+  6    0.13534D+00    0.13534D+00    0.90100D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        186 f-s =        255 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.40036D-03    0.40032D-03    0.33301D-07
+  2    0.40016D-03    0.40016D-03    0.11796D-14
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        178 f-s =        253 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21868D-07
+  2    0.40000D-01    0.40000D-01    0.13655D-08
+  3    0.40016D-01    0.40016D-01    0.90119D-09
+  4    0.40032D-01    0.40032D-01    0.88534D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.23894D-07
+  2    0.40000D+00    0.40000D+00    0.35876D-09
+  3    0.41600D+00    0.41600D+00    0.11849D-07
+  4    0.43331D+00    0.43331D+00    0.21393D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        202 f-s =        315 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40078D-07
+  2    0.40000D+01    0.40000D+01    0.17523D-06
+  3    0.20000D+02    0.20000D+02    0.15438D-05
+  4    0.42000D+03    0.42000D+03    0.59616D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        199 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.61337D-07
+  2    0.80000D+01    0.80000D+01    0.51082D-06
+  3    0.13600D+03    0.13600D+03    0.14301D-04
+  4    0.37128D+05    0.37128D+05    0.35452D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        205 f-s =        348 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.13043D-03
+  2    0.27111D+02    0.27111D+02    0.10472D-03
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        253 f-s =        392 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.60123D-06
+  2    0.91857D-01    0.91855D-01    0.12761D-05
+  3    0.28416D+02    0.28416D+02    0.60136D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        248 f-s =        358 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.21535D-06
+  2    0.56309D-02    0.56309D-02    0.42003D-09
+  3    0.36024D+00    0.36024D+00    0.21535D-06
+  4    0.31706D+00    0.31706D+00    0.10787D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         30 f-s =         45 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59766D+00    0.59765D+00    0.50323D-05
+  2    0.14023D+01    0.14023D+01    0.50323D-05
+  3   -0.18934D-05   -0.18934D-05    0.18292D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        146 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99163D+00   -0.99164D+00    0.12629D-04
+  2    0.98332D+00    0.98334D+00    0.13792D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         74 f-s =        136 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.89511D-06
+  2    0.14760D+00    0.14760D+00    0.89511D-06
+  3    0.57731D-07    0.57731D-07    0.11100D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         83 f-s =        137 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.32582D-13
+  2    0.41753D-11   -0.16253D-18    0.41753D-11
+  3   -0.49137D-09    0.20260D-16    0.49137D-09
+  4    0.47668D-07   -0.18531D-14    0.47668D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        266 f-s =        382 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.42191D-04
+  2    0.43051D+00    0.43047D+00    0.39273D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        210 f-s =        298 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.42518D-02    0.42531D-02    0.12780D-05
+  2    0.53154D-02    0.53170D-02    0.16193D-05
+  3    0.26276D+02    0.26276D+02    0.48515D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        380 f-s =        525 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.85324D-07
+  2   -0.20000D+02   -0.20000D+02    0.85324D-07
+  3   -0.31009D-06   -0.22476D-06    0.85324D-07
+  4    0.31009D-06    0.22476D-06    0.85324D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         15 f-s =         34 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16162D-02    0.16181D-02    0.18339D-05
+  2    0.14136D-09    0.13822D-09    0.31334D-11
+  3    0.84424D-11    0.82516D-11    0.19087D-12
+  4    0.13291D-09    0.12997D-09    0.29425D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        385 f-s =        649 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.82423D-03
+  2    0.12707D-04    0.12711D-04    0.40225D-08
+  3    0.12086D+04    0.12086D+04    0.81814D-03
+  4    0.32419D-03    0.32420D-03    0.40067D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        102 f-s =        141 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39128D+00    0.39127D+00    0.78947D-05
+  2    0.13300D-02    0.13300D-02    0.26820D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         27 f-s =         45 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.40159D-07    0.32359D-12    0.40159D-07
+  2    0.13879D-06    0.23607D-06    0.97275D-07
+  3    0.22179D-12    0.76393D-13    0.14539D-12
+  4    0.54377D-06    0.76393D-06    0.22017D-06
+  5    0.39134D-05    0.32361D-05    0.67732D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1308 f-s =       2206 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.44184D+01    0.44183D+01    0.86593D-04
+  2    0.12902D+01    0.12902D+01    0.74589D-05
+  3    0.30193D+01    0.30193D+01    0.54684D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         70 f-s =        103 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.32656D-13
+  2    0.37136D-02    0.37136D-02    0.63884D-08
+  3    0.61893D-02    0.61893D-02    0.42586D-08
+  4    0.95451D-05    0.95451D-05    0.32657D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        278 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30487D-06
+  2   -0.90853D-08    0.20612D-08    0.11146D-07
+  3    0.24062D-22    0.28230D-55    0.24062D-22
+  4   -0.15582D-21    0.52358D-51    0.15582D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        195 f-s =        391 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.55040D-07
+  2    0.20000D+00    0.20000D+00    0.11008D-06
+  3    0.30000D+00    0.30000D+00    0.15603D-06
+  4    0.40000D+00    0.40000D+00    0.18837D-06
+  5    0.50000D+00    0.50000D+00    0.20302D-06
+  6    0.60000D+00    0.60000D+00    0.19706D-06
+  7    0.70000D+00    0.70000D+00    0.16968D-06
+  8    0.80000D+00    0.80000D+00    0.12283D-06
+  9    0.90000D+00    0.90000D+00    0.61419D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        210 f-s =        334 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.13966D-07
+  2    0.13685D-01    0.13685D-01    0.14406D-06
+  3    0.15037D+01    0.15037D+01    0.15518D-04
+  4    0.13533D+00    0.13534D+00    0.11156D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        530 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33848D-18    0.22774D-54    0.33848D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        763 f-s =       1099 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.88635D-06    0.10042D-08    0.88535D-06
+  2   -0.67734D-05    0.18000D-07    0.67914D-05
+  3   -0.21127D-46    0.00000D+00    0.21127D-46
+  4   -0.17787D-43   -0.60430D-78    0.17787D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        231 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        249 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        303 f-s =        464 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.27743D-10    0.13312D-21    0.27743D-10
+  2    0.47648D-10   -0.23259D-21    0.47648D-10
+  3   -0.20095D-14    0.15179D-34    0.20095D-14
+  4    0.20735D-06    0.20612D-08    0.20528D-06
+  5    0.47184D-04    0.45400D-04    0.17836D-05
+  6    0.13534D+00    0.13534D+00    0.95883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2684 f-s =       3723 J-s =         72
+ Computed and reference solutions and absolute errors follow:
+  1    0.32625D-05   -0.31006D-13    0.32625D-05
+  2    0.57991D-05    0.38628D-13    0.57991D-05
+  3    0.18048D-34    0.18049D-34    0.52698D-39
+  4    0.20612D-08    0.20612D-08    0.54509D-16
+  5    0.45400D-04    0.45400D-04    0.30341D-13
+  6    0.13534D+00    0.13534D+00    0.90300D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        183 f-s =        301 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.40123D-03    0.40032D-03    0.90318D-06
+  2    0.40016D-03    0.40016D-03    0.76334D-10
+  3    0.40000D-03    0.40000D-03    0.13786D-15
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        177 f-s =        287 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21958D-06
+  2    0.40000D-01    0.40000D-01    0.97446D-08
+  3    0.40016D-01    0.40016D-01    0.90186D-08
+  4    0.40032D-01    0.40032D-01    0.88875D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        173 f-s =        290 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.13264D-05
+  2    0.40000D+00    0.40000D+00    0.63430D-06
+  3    0.41600D+00    0.41600D+00    0.59829D-06
+  4    0.43330D+00    0.43331D+00    0.63800D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        194 f-s =        319 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.57372D-07
+  2    0.40000D+01    0.40000D+01    0.25477D-06
+  3    0.20000D+02    0.20000D+02    0.23237D-05
+  4    0.42000D+03    0.42000D+03    0.96016D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        192 f-s =        322 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10303D-06
+  2    0.80000D+01    0.80000D+01    0.89222D-06
+  3    0.13600D+03    0.13600D+03    0.28232D-04
+  4    0.37128D+05    0.37128D+05    0.13236D-01
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        196 f-s =        360 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.61789D-05
+  2    0.27111D+02    0.27111D+02    0.46695D-04
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        233 f-s =        412 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.85797D-06
+  2    0.91856D-01    0.91855D-01    0.36329D-06
+  3    0.28416D+02    0.28416D+02    0.85801D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        249 f-s =        406 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.56131D-07
+  2    0.56309D-02    0.56309D-02    0.10936D-09
+  3    0.36024D+00    0.36024D+00    0.56131D-07
+  4    0.31706D+00    0.31706D+00    0.28120D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         30 f-s =         54 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.59766D+00    0.59765D+00    0.50882D-05
+  2    0.14023D+01    0.14023D+01    0.50882D-05
+  3   -0.18934D-05   -0.18934D-05    0.17887D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        159 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99163D+00   -0.99164D+00    0.14223D-04
+  2    0.98332D+00    0.98334D+00    0.17234D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         59 f-s =        131 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12935D-05
+  2    0.14760D+00    0.14760D+00    0.12935D-05
+  3    0.57731D-07    0.57731D-07    0.11044D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         87 f-s =        163 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.99558D-15
+  2    0.15187D-13   -0.16253D-18    0.15187D-13
+  3    0.81755D-11    0.20260D-16    0.81755D-11
+  4   -0.20076D-08   -0.18531D-14    0.20076D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        253 f-s =        406 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.48165D-04
+  2    0.43052D+00    0.43047D+00    0.48535D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        222 f-s =        387 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.42529D-02    0.42531D-02    0.20017D-06
+  2    0.53168D-02    0.53170D-02    0.25054D-06
+  3    0.26276D+02    0.26276D+02    0.12792D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        396 f-s =        620 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.12523D-06
+  2   -0.20000D+02   -0.20000D+02    0.12521D-06
+  3   -0.34995D-06   -0.22476D-06    0.12519D-06
+  4    0.35001D-06    0.22476D-06    0.12525D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         14 f-s =         84 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.16055D-02    0.16181D-02    0.12577D-04
+  2    0.12370D-09    0.13822D-09    0.14525D-10
+  3    0.74221D-11    0.82516D-11    0.82948D-12
+  4    0.11628D-09    0.12997D-09    0.13696D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        334 f-s =        726 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.15384D-02
+  2    0.12711D-04    0.12711D-04    0.36938D-09
+  3    0.12086D+04    0.12086D+04    0.15270D-02
+  4    0.32420D-03    0.32420D-03    0.36814D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        102 f-s =        155 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39128D+00    0.39127D+00    0.83441D-05
+  2    0.13300D-02    0.13300D-02    0.28346D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         27 f-s =         66 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.37454D-07    0.32359D-12    0.37454D-07
+  2    0.13653D-06    0.23607D-06    0.99534D-07
+  3    0.18473D-12    0.76393D-13    0.10834D-12
+  4    0.54060D-06    0.76393D-06    0.22333D-06
+  5    0.39108D-05    0.32361D-05    0.67472D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1144 f-s =       2115 J-s =         50
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.27303D-04
+  2    0.12902D+01    0.12902D+01    0.98022D-06
+  3    0.30193D+01    0.30193D+01    0.10710D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        134 f-s =        247 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.10342D-15
+  2    0.37136D-02    0.37136D-02    0.22807D-11
+  3    0.61893D-02    0.61893D-02    0.38018D-11
+  4    0.95451D-05    0.95451D-05    0.10347D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        168 f-s =        242 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.45705D-04    0.45400D-04    0.30490D-06
+  2   -0.90870D-08    0.20612D-08    0.11148D-07
+  3    0.24196D-22    0.28230D-55    0.24196D-22
+  4   -0.15669D-21    0.52358D-51    0.15669D-21
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        195 f-s =        309 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.54848D-07
+  2    0.20000D+00    0.20000D+00    0.10969D-06
+  3    0.30000D+00    0.30000D+00    0.15555D-06
+  4    0.40000D+00    0.40000D+00    0.18793D-06
+  5    0.50000D+00    0.50000D+00    0.20269D-06
+  6    0.60000D+00    0.60000D+00    0.19689D-06
+  7    0.70000D+00    0.70000D+00    0.16963D-06
+  8    0.80000D+00    0.80000D+00    0.12284D-06
+  9    0.90000D+00    0.90000D+00    0.61424D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        210 f-s =        294 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13533D-02   -0.13534D-02    0.13975D-07
+  2    0.13685D-01    0.13685D-01    0.14417D-06
+  3    0.15037D+01    0.15037D+01    0.15528D-04
+  4    0.13533D+00    0.13534D+00    0.11159D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        390 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.76940D-06
+  2    0.34439D-06    0.12659D-13    0.34439D-06
+  3   -0.44767D-10    0.19115D-41    0.44767D-10
+  4   -0.33859D-18    0.22774D-54    0.33859D-18
+  5   -0.21641D-22    0.00000D+00    0.21641D-22
+  6    0.28625D-31    0.00000D+00    0.28625D-31
+  7   -0.17291D-39    0.00000D+00    0.17291D-39
+  8   -0.77559D-46    0.00000D+00    0.77559D-46
+  9    0.19301D-53    0.00000D+00    0.19301D-53
+ 10    0.40515D-60    0.00000D+00    0.40515D-60
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =        763 f-s =        960 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.88738D-06    0.10042D-08    0.88638D-06
+  2   -0.68091D-05    0.18000D-07    0.68271D-05
+  3   -0.22172D-46    0.00000D+00    0.22172D-46
+  4   -0.19566D-43   -0.60430D-78    0.19566D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        137 f-s =        201 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.13210D-11    0.61813D-30    0.13210D-11
+  2   -0.47809D-12    0.89637D-30    0.47809D-12
+  3    0.17546D-08    0.27384D-26    0.17546D-08
+  4    0.28827D-07    0.20612D-08    0.26765D-07
+  5    0.47562D-04    0.45400D-04    0.21619D-05
+  6    0.13534D+00    0.13534D+00    0.13840D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        148 f-s =        207 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10780D-10   -0.10768D-27    0.10780D-10
+  2   -0.17657D-09    0.54550D-27    0.17657D-09
+  3   -0.25324D-09    0.27385D-26    0.25324D-09
+  4    0.26160D-07    0.20612D-08    0.24099D-07
+  5    0.47467D-04    0.45400D-04    0.20675D-05
+  6    0.13534D+00    0.13534D+00    0.13337D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        303 f-s =        386 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.27743D-10    0.13312D-21    0.27743D-10
+  2    0.47648D-10   -0.23259D-21    0.47648D-10
+  3   -0.20095D-14    0.15179D-34    0.20095D-14
+  4    0.20735D-06    0.20612D-08    0.20528D-06
+  5    0.47184D-04    0.45400D-04    0.17836D-05
+  6    0.13534D+00    0.13534D+00    0.95883D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2684 f-s =       3153 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.30953D-05   -0.31006D-13    0.30953D-05
+  2    0.61741D-05    0.38628D-13    0.61741D-05
+  3    0.18048D-34    0.18049D-34    0.52734D-39
+  4    0.20612D-08    0.20612D-08    0.54546D-16
+  5    0.45400D-04    0.45400D-04    0.30370D-13
+  6    0.13534D+00    0.13534D+00    0.90100D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        186 f-s =        255 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.40036D-03    0.40032D-03    0.33301D-07
+  2    0.40016D-03    0.40016D-03    0.11796D-14
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        178 f-s =        253 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21868D-07
+  2    0.40000D-01    0.40000D-01    0.13655D-08
+  3    0.40016D-01    0.40016D-01    0.90119D-09
+  4    0.40032D-01    0.40032D-01    0.88534D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        174 f-s =        249 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.23894D-07
+  2    0.40000D+00    0.40000D+00    0.35876D-09
+  3    0.41600D+00    0.41600D+00    0.11849D-07
+  4    0.43331D+00    0.43331D+00    0.21393D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        202 f-s =        315 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40078D-07
+  2    0.40000D+01    0.40000D+01    0.17523D-06
+  3    0.20000D+02    0.20000D+02    0.15438D-05
+  4    0.42000D+03    0.42000D+03    0.59616D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        199 f-s =        299 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.61337D-07
+  2    0.80000D+01    0.80000D+01    0.51082D-06
+  3    0.13600D+03    0.13600D+03    0.14301D-04
+  4    0.37128D+05    0.37128D+05    0.35452D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        205 f-s =        348 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.13043D-03
+  2    0.27111D+02    0.27111D+02    0.10472D-03
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        253 f-s =        392 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.60123D-06
+  2    0.91857D-01    0.91855D-01    0.12761D-05
+  3    0.28416D+02    0.28416D+02    0.60136D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        248 f-s =        358 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.21535D-06
+  2    0.56309D-02    0.56309D-02    0.42003D-09
+  3    0.36024D+00    0.36024D+00    0.21535D-06
+  4    0.31706D+00    0.31706D+00    0.10787D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         30 f-s =         45 J-s =          1
+ Computed and reference solutions and absolute errors follow:
+  1    0.59766D+00    0.59765D+00    0.50323D-05
+  2    0.14023D+01    0.14023D+01    0.50323D-05
+  3   -0.18934D-05   -0.18934D-05    0.18292D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =         88 f-s =        146 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99163D+00   -0.99164D+00    0.12629D-04
+  2    0.98332D+00    0.98334D+00    0.13792D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         74 f-s =        136 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.89511D-06
+  2    0.14760D+00    0.14760D+00    0.89511D-06
+  3    0.57731D-07    0.57731D-07    0.11100D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         83 f-s =        137 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.32582D-13
+  2    0.41753D-11   -0.16253D-18    0.41753D-11
+  3   -0.49137D-09    0.20260D-16    0.49137D-09
+  4    0.47668D-07   -0.18531D-14    0.47668D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        266 f-s =        382 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.42191D-04
+  2    0.43051D+00    0.43047D+00    0.39273D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        210 f-s =        298 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.42518D-02    0.42531D-02    0.12780D-05
+  2    0.53154D-02    0.53170D-02    0.16193D-05
+  3    0.26276D+02    0.26276D+02    0.48515D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        380 f-s =        525 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.85324D-07
+  2   -0.20000D+02   -0.20000D+02    0.85324D-07
+  3   -0.31009D-06   -0.22476D-06    0.85324D-07
+  4    0.31009D-06    0.22476D-06    0.85324D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         15 f-s =         34 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16162D-02    0.16181D-02    0.18339D-05
+  2    0.14136D-09    0.13822D-09    0.31334D-11
+  3    0.84424D-11    0.82516D-11    0.19087D-12
+  4    0.13291D-09    0.12997D-09    0.29425D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        385 f-s =        649 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.82423D-03
+  2    0.12707D-04    0.12711D-04    0.40225D-08
+  3    0.12086D+04    0.12086D+04    0.81814D-03
+  4    0.32419D-03    0.32420D-03    0.40067D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        102 f-s =        141 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.39128D+00    0.39127D+00    0.78947D-05
+  2    0.13300D-02    0.13300D-02    0.26820D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         27 f-s =         45 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.40159D-07    0.32359D-12    0.40159D-07
+  2    0.13879D-06    0.23607D-06    0.97275D-07
+  3    0.22179D-12    0.76393D-13    0.14539D-12
+  4    0.54377D-06    0.76393D-06    0.22017D-06
+  5    0.39134D-05    0.32361D-05    0.67732D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1308 f-s =       2206 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.44184D+01    0.44183D+01    0.86593D-04
+  2    0.12902D+01    0.12902D+01    0.74589D-05
+  3    0.30193D+01    0.30193D+01    0.54684D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             6  follow.
+  Results for ITOL =             6  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-05
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =         70 f-s =        103 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.32656D-13
+  2    0.37136D-02    0.37136D-02    0.63884D-08
+  3    0.61893D-02    0.61893D-02    0.42586D-08
+  4    0.95451D-05    0.95451D-05    0.32657D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        258 f-s =        409 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.26735D-07
+  2    0.20000D+00    0.20000D+00    0.53467D-07
+  3    0.30000D+00    0.30000D+00    0.74769D-07
+  4    0.40000D+00    0.40000D+00    0.88478D-07
+  5    0.50000D+00    0.50000D+00    0.93205D-07
+  6    0.60000D+00    0.60000D+00    0.88469D-07
+  7    0.70000D+00    0.70000D+00    0.74754D-07
+  8    0.80000D+00    0.80000D+00    0.53453D-07
+  9    0.90000D+00    0.90000D+00    0.26728D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        289 f-s =        398 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.23063D-09
+  2    0.13685D-01    0.13685D-01    0.33336D-08
+  3    0.15037D+01    0.15037D+01    0.25626D-06
+  4    0.13534D+00    0.13534D+00    0.76074D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43441D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23569D-80    0.00000D+00    0.23569D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1095 f-s =       1360 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.92777D-07    0.10042D-08    0.93781D-07
+  2    0.43161D-06    0.18000D-07    0.41361D-06
+  3    0.27144D-45    0.00000D+00    0.27144D-45
+  4    0.28054D-43   -0.60430D-78    0.28054D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        364 f-s =        453 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17323D-10    0.13312D-21    0.17323D-10
+  2   -0.39927D-10   -0.23259D-21    0.39927D-10
+  3   -0.76656D-17    0.15179D-34    0.76656D-17
+  4    0.29890D-08    0.20612D-08    0.92780D-09
+  5    0.45529D-04    0.45400D-04    0.12901D-06
+  6    0.13534D+00    0.13534D+00    0.12839D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2961 f-s =       3451 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.11407D-05   -0.31006D-13    0.11407D-05
+  2   -0.24117D-05    0.38628D-13    0.24117D-05
+  3    0.18048D-34    0.18049D-34    0.51555D-39
+  4    0.20612D-08    0.20612D-08    0.54547D-16
+  5    0.45400D-04    0.45400D-04    0.36449D-13
+  6    0.13534D+00    0.13534D+00    0.74496D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        267 f-s =        354 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.57592D-08
+  2    0.40016D-03    0.40016D-03    0.94906D-15
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        242 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.19503D-07
+  2    0.40000D-01    0.40000D-01    0.85636D-09
+  3    0.40016D-01    0.40016D-01    0.80068D-09
+  4    0.40032D-01    0.40032D-01    0.78920D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        241 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.71641D-07
+  2    0.40000D+00    0.40000D+00    0.31873D-07
+  3    0.41600D+00    0.41600D+00    0.31989D-07
+  4    0.43331D+00    0.43331D+00    0.34204D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        374 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.38558D-07
+  2    0.40000D+01    0.40000D+01    0.17139D-06
+  3    0.20000D+02    0.20000D+02    0.15648D-05
+  4    0.42000D+03    0.42000D+03    0.64786D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        256 f-s =        342 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.37442D-07
+  2    0.80000D+01    0.80000D+01    0.33291D-06
+  3    0.13600D+03    0.13600D+03    0.11234D-04
+  4    0.37128D+05    0.37128D+05    0.61838D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        298 f-s =        480 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.11522D-04
+  2    0.27111D+02    0.27111D+02    0.11356D-04
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        299 f-s =        418 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.25653D-06
+  2    0.91855D-01    0.91855D-01    0.87235D-07
+  3    0.28416D+02    0.28416D+02    0.25653D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        317 f-s =        444 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18859D-07
+  2    0.56309D-02    0.56309D-02    0.36650D-10
+  3    0.36024D+00    0.36024D+00    0.18859D-07
+  4    0.31706D+00    0.31706D+00    0.94477D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         55 f-s =         81 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.22789D-07
+  2    0.14023D+01    0.14023D+01    0.22800D-07
+  3   -0.18934D-05   -0.18934D-05    0.12126D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        186 f-s =        295 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.11777D-05
+  2    0.98334D+00    0.98334D+00    0.12894D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        109 f-s =        216 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12860D-05
+  2    0.14760D+00    0.14760D+00    0.12860D-05
+  3    0.57731D-07    0.57731D-07    0.15809D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        105 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.37502D-13
+  2   -0.25943D-11   -0.16253D-18    0.25943D-11
+  3    0.14856D-09    0.20260D-16    0.14856D-09
+  4   -0.10966D-07   -0.18531D-14    0.10966D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        377 f-s =        519 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13584D-04
+  2    0.43048D+00    0.43047D+00    0.13161D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        345 f-s =        524 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.70756D-07
+  2    0.53171D-02    0.53170D-02    0.85457D-07
+  3    0.26276D+02    0.26276D+02    0.13106D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        549 f-s =        711 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.10582D-06
+  2   -0.20000D+02   -0.20000D+02    0.10582D-06
+  3   -0.33058D-06   -0.22476D-06    0.10582D-06
+  4    0.33058D-06    0.22476D-06    0.10582D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         22 f-s =         42 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16169D-02    0.16181D-02    0.11756D-05
+  2    0.13855D-09    0.13822D-09    0.32166D-12
+  3    0.82757D-11    0.82516D-11    0.24136D-13
+  4    0.13027D-09    0.12997D-09    0.29741D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        579 f-s =       1014 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.31004D-04
+  2    0.12711D-04    0.12711D-04    0.52301D-11
+  3    0.12086D+04    0.12086D+04    0.30932D-04
+  4    0.32420D-03    0.32420D-03    0.11304D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        123 f-s =        192 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.80369D-06
+  2    0.13300D-02    0.13300D-02    0.27290D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         35 f-s =         55 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.25262D-09    0.32359D-12    0.25230D-09
+  2    0.22204D-06    0.23607D-06    0.14025D-07
+  3    0.72566D-13    0.76393D-13    0.38275D-14
+  4    0.72783D-06    0.76393D-06    0.36100D-07
+  5    0.32784D-05    0.32361D-05    0.42297D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1811 f-s =       2965 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.30100D-04
+  2    0.12902D+01    0.12902D+01    0.26190D-05
+  3    0.30193D+01    0.30193D+01    0.10137D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        117 f-s =        197 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.34724D-16
+  2    0.37136D-02    0.37136D-02    0.90051D-12
+  3    0.61893D-02    0.61893D-02    0.11096D-11
+  4    0.95451D-05    0.95451D-05    0.34735D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        340 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        256 f-s =        532 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.21365D-07
+  2    0.20000D+00    0.20000D+00    0.42728D-07
+  3    0.30000D+00    0.30000D+00    0.59754D-07
+  4    0.40000D+00    0.40000D+00    0.70714D-07
+  5    0.50000D+00    0.50000D+00    0.74497D-07
+  6    0.60000D+00    0.60000D+00    0.70717D-07
+  7    0.70000D+00    0.70000D+00    0.59758D-07
+  8    0.80000D+00    0.80000D+00    0.42731D-07
+  9    0.90000D+00    0.90000D+00    0.21367D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        289 f-s =        454 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.19716D-09
+  2    0.13685D-01    0.13685D-01    0.29412D-08
+  3    0.15037D+01    0.15037D+01    0.21908D-06
+  4    0.13534D+00    0.13534D+00    0.74073D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        705 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43441D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23569D-80    0.00000D+00    0.23569D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1094 f-s =       1545 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.92915D-07    0.10042D-08    0.93919D-07
+  2    0.43119D-06    0.18000D-07    0.41319D-06
+  3    0.16989D-46    0.00000D+00    0.16989D-46
+  4    0.31543D-43   -0.60430D-78    0.31543D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        324 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        343 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        364 f-s =        549 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17323D-10    0.13312D-21    0.17323D-10
+  2   -0.39927D-10   -0.23259D-21    0.39927D-10
+  3   -0.76656D-17    0.15179D-34    0.76656D-17
+  4    0.29890D-08    0.20612D-08    0.92781D-09
+  5    0.45529D-04    0.45400D-04    0.12901D-06
+  6    0.13534D+00    0.13534D+00    0.12839D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2961 f-s =       4129 J-s =         84
+ Computed and reference solutions and absolute errors follow:
+  1    0.11406D-05   -0.31006D-13    0.11406D-05
+  2   -0.24117D-05    0.38628D-13    0.24117D-05
+  3    0.18048D-34    0.18049D-34    0.51555D-39
+  4    0.20612D-08    0.20612D-08    0.54548D-16
+  5    0.45400D-04    0.45400D-04    0.36457D-13
+  6    0.13534D+00    0.13534D+00    0.69361D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        266 f-s =        409 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.85755D-08
+  2    0.40016D-03    0.40016D-03    0.16829D-13
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        241 f-s =        379 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.41483D-06
+  2    0.40000D-01    0.40000D-01    0.18444D-07
+  3    0.40016D-01    0.40016D-01    0.17035D-07
+  4    0.40032D-01    0.40032D-01    0.16789D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        240 f-s =        369 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.85808D-07
+  2    0.40000D+00    0.40000D+00    0.37821D-07
+  3    0.41600D+00    0.41600D+00    0.38268D-07
+  4    0.43331D+00    0.43331D+00    0.40930D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        412 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.12827D-07
+  2    0.40000D+01    0.40000D+01    0.57016D-07
+  3    0.20000D+02    0.20000D+02    0.52047D-06
+  4    0.42000D+03    0.42000D+03    0.21542D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        258 f-s =        413 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.50094D-08
+  2    0.80000D+01    0.80000D+01    0.44523D-07
+  3    0.13600D+03    0.13600D+03    0.15019D-05
+  4    0.37128D+05    0.37128D+05    0.82625D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        326 f-s =        593 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.10963D-04
+  2    0.27111D+02    0.27111D+02    0.11153D-04
+  3    0.40000D+03    0.40000D+03    0.56843D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        268 f-s =        418 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.46943D-07
+  2    0.91855D-01    0.91855D-01    0.10708D-06
+  3    0.28416D+02    0.28416D+02    0.46953D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        309 f-s =        519 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.13443D-06
+  2    0.56309D-02    0.56309D-02    0.26213D-09
+  3    0.36024D+00    0.36024D+00    0.13443D-06
+  4    0.31706D+00    0.31706D+00    0.67344D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         55 f-s =         90 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.22789D-07
+  2    0.14023D+01    0.14023D+01    0.22800D-07
+  3   -0.18934D-05   -0.18934D-05    0.12126D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        154 f-s =        318 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.89716D-06
+  2    0.98334D+00    0.98334D+00    0.91511D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =         84 f-s =        163 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.24077D-06
+  2    0.14760D+00    0.14760D+00    0.24077D-06
+  3    0.57731D-07    0.57731D-07    0.18704D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        106 f-s =        192 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.70422D-14
+  2    0.13271D-11   -0.16253D-18    0.13271D-11
+  3   -0.11234D-09    0.20260D-16    0.11234D-09
+  4   -0.32407D-08   -0.18531D-14    0.32407D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        366 f-s =        530 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.66841D-05
+  2    0.43048D+00    0.43047D+00    0.70261D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        295 f-s =        494 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.70239D-07
+  2    0.53171D-02    0.53170D-02    0.85809D-07
+  3    0.26276D+02    0.26276D+02    0.19326D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        532 f-s =        813 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.13323D-06
+  2   -0.20000D+02   -0.20000D+02    0.13323D-06
+  3   -0.35800D-06   -0.22476D-06    0.13323D-06
+  4    0.35800D-06    0.22476D-06    0.13323D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         20 f-s =         72 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16182D-02    0.16181D-02    0.10684D-06
+  2    0.13818D-09    0.13822D-09    0.42948D-13
+  3    0.82495D-11    0.82516D-11    0.20531D-14
+  4    0.12993D-09    0.12997D-09    0.40897D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        452 f-s =        912 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.41469D-04
+  2    0.12693D-04    0.12711D-04    0.18425D-07
+  3    0.12086D+04    0.12086D+04    0.41151D-04
+  4    0.32418D-03    0.32420D-03    0.18166D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        121 f-s =        195 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.69569D-06
+  2    0.13300D-02    0.13300D-02    0.23616D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         35 f-s =         75 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.25251D-09    0.32359D-12    0.25219D-09
+  2    0.22290D-06    0.23607D-06    0.13169D-07
+  3    0.72793D-13    0.76393D-13    0.36007D-14
+  4    0.73019D-06    0.76393D-06    0.33746D-07
+  5    0.32764D-05    0.32361D-05    0.40358D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1563 f-s =       2714 J-s =         65
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.31403D-04
+  2    0.12902D+01    0.12902D+01    0.26202D-05
+  3    0.30193D+01    0.30193D+01    0.10104D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        109 f-s =        219 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.16332D-16
+  2    0.37136D-02    0.37136D-02    0.36077D-12
+  3    0.61893D-02    0.61893D-02    0.59936D-12
+  4    0.95451D-05    0.95451D-05    0.16332D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        229 f-s =        308 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.45579D-04    0.45400D-04    0.17939D-06
+  2    0.44586D-08    0.20612D-08    0.23974D-08
+  3    0.15376D-27    0.28230D-55    0.15376D-27
+  4    0.19802D-26    0.52358D-51    0.19802D-26
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        258 f-s =        409 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.26735D-07
+  2    0.20000D+00    0.20000D+00    0.53467D-07
+  3    0.30000D+00    0.30000D+00    0.74769D-07
+  4    0.40000D+00    0.40000D+00    0.88478D-07
+  5    0.50000D+00    0.50000D+00    0.93205D-07
+  6    0.60000D+00    0.60000D+00    0.88469D-07
+  7    0.70000D+00    0.70000D+00    0.74754D-07
+  8    0.80000D+00    0.80000D+00    0.53453D-07
+  9    0.90000D+00    0.90000D+00    0.26728D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        289 f-s =        398 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.23063D-09
+  2    0.13685D-01    0.13685D-01    0.33336D-08
+  3    0.15037D+01    0.15037D+01    0.25626D-06
+  4    0.13534D+00    0.13534D+00    0.76074D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        358 f-s =        535 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.13268D-06
+  2   -0.43441D-08    0.12659D-13    0.43441D-08
+  3    0.40050D-16    0.19115D-41    0.40050D-16
+  4   -0.32925D-22    0.22774D-54    0.32925D-22
+  5   -0.39433D-31    0.00000D+00    0.39433D-31
+  6   -0.12327D-41    0.00000D+00    0.12327D-41
+  7   -0.52242D-53    0.00000D+00    0.52242D-53
+  8    0.37414D-64    0.00000D+00    0.37414D-64
+  9    0.13554D-72    0.00000D+00    0.13554D-72
+ 10    0.23569D-80    0.00000D+00    0.23569D-80
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1095 f-s =       1360 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.92777D-07    0.10042D-08    0.93781D-07
+  2    0.43161D-06    0.18000D-07    0.41361D-06
+  3    0.27144D-45    0.00000D+00    0.27144D-45
+  4    0.28054D-43   -0.60430D-78    0.28054D-43
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        201 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10445D-14    0.61813D-30    0.10445D-14
+  2    0.55349D-15    0.89637D-30    0.55349D-15
+  3   -0.31348D-12    0.27384D-26    0.31348D-12
+  4    0.17054D-08    0.20612D-08    0.35571D-09
+  5    0.45523D-04    0.45400D-04    0.12318D-06
+  6    0.13534D+00    0.13534D+00    0.14002D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        219 f-s =        301 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.25085D-12   -0.10768D-27    0.25085D-12
+  2    0.25516D-12    0.54550D-27    0.25516D-12
+  3    0.20234D-13    0.27385D-26    0.20234D-13
+  4    0.32642D-08    0.20612D-08    0.12030D-08
+  5    0.45517D-04    0.45400D-04    0.11735D-06
+  6    0.13534D+00    0.13534D+00    0.12669D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        364 f-s =        453 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17323D-10    0.13312D-21    0.17323D-10
+  2   -0.39927D-10   -0.23259D-21    0.39927D-10
+  3   -0.76656D-17    0.15179D-34    0.76656D-17
+  4    0.29890D-08    0.20612D-08    0.92780D-09
+  5    0.45529D-04    0.45400D-04    0.12901D-06
+  6    0.13534D+00    0.13534D+00    0.12839D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2961 f-s =       3451 J-s =         55
+ Computed and reference solutions and absolute errors follow:
+  1    0.11407D-05   -0.31006D-13    0.11407D-05
+  2   -0.24117D-05    0.38628D-13    0.24117D-05
+  3    0.18048D-34    0.18049D-34    0.51555D-39
+  4    0.20612D-08    0.20612D-08    0.54547D-16
+  5    0.45400D-04    0.45400D-04    0.36449D-13
+  6    0.13534D+00    0.13534D+00    0.74496D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        267 f-s =        354 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.57592D-08
+  2    0.40016D-03    0.40016D-03    0.94906D-15
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        242 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.19503D-07
+  2    0.40000D-01    0.40000D-01    0.85636D-09
+  3    0.40016D-01    0.40016D-01    0.80068D-09
+  4    0.40032D-01    0.40032D-01    0.78920D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        241 f-s =        334 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.71641D-07
+  2    0.40000D+00    0.40000D+00    0.31873D-07
+  3    0.41600D+00    0.41600D+00    0.31989D-07
+  4    0.43331D+00    0.43331D+00    0.34204D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        254 f-s =        374 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.38558D-07
+  2    0.40000D+01    0.40000D+01    0.17139D-06
+  3    0.20000D+02    0.20000D+02    0.15648D-05
+  4    0.42000D+03    0.42000D+03    0.64786D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        256 f-s =        342 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.37442D-07
+  2    0.80000D+01    0.80000D+01    0.33291D-06
+  3    0.13600D+03    0.13600D+03    0.11234D-04
+  4    0.37128D+05    0.37128D+05    0.61838D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        298 f-s =        480 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.11522D-04
+  2    0.27111D+02    0.27111D+02    0.11356D-04
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        299 f-s =        418 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.25653D-06
+  2    0.91855D-01    0.91855D-01    0.87235D-07
+  3    0.28416D+02    0.28416D+02    0.25653D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        317 f-s =        444 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18859D-07
+  2    0.56309D-02    0.56309D-02    0.36650D-10
+  3    0.36024D+00    0.36024D+00    0.18859D-07
+  4    0.31706D+00    0.31706D+00    0.94477D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         55 f-s =         81 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.22789D-07
+  2    0.14023D+01    0.14023D+01    0.22800D-07
+  3   -0.18934D-05   -0.18934D-05    0.12126D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        186 f-s =        295 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.11777D-05
+  2    0.98334D+00    0.98334D+00    0.12894D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        109 f-s =        216 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12860D-05
+  2    0.14760D+00    0.14760D+00    0.12860D-05
+  3    0.57731D-07    0.57731D-07    0.15809D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        105 f-s =        170 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.37502D-13
+  2   -0.25943D-11   -0.16253D-18    0.25943D-11
+  3    0.14856D-09    0.20260D-16    0.14856D-09
+  4   -0.10966D-07   -0.18531D-14    0.10966D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        377 f-s =        519 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13584D-04
+  2    0.43048D+00    0.43047D+00    0.13161D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        345 f-s =        524 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.70756D-07
+  2    0.53171D-02    0.53170D-02    0.85457D-07
+  3    0.26276D+02    0.26276D+02    0.13106D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        549 f-s =        711 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.10582D-06
+  2   -0.20000D+02   -0.20000D+02    0.10582D-06
+  3   -0.33058D-06   -0.22476D-06    0.10582D-06
+  4    0.33058D-06    0.22476D-06    0.10582D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         22 f-s =         42 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16169D-02    0.16181D-02    0.11756D-05
+  2    0.13855D-09    0.13822D-09    0.32166D-12
+  3    0.82757D-11    0.82516D-11    0.24136D-13
+  4    0.13027D-09    0.12997D-09    0.29741D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        579 f-s =       1014 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.31004D-04
+  2    0.12711D-04    0.12711D-04    0.52301D-11
+  3    0.12086D+04    0.12086D+04    0.30932D-04
+  4    0.32420D-03    0.32420D-03    0.11304D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        123 f-s =        192 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.80369D-06
+  2    0.13300D-02    0.13300D-02    0.27290D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         35 f-s =         55 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.25262D-09    0.32359D-12    0.25230D-09
+  2    0.22204D-06    0.23607D-06    0.14025D-07
+  3    0.72566D-13    0.76393D-13    0.38275D-14
+  4    0.72783D-06    0.76393D-06    0.36100D-07
+  5    0.32784D-05    0.32361D-05    0.42297D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       1811 f-s =       2965 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.30100D-04
+  2    0.12902D+01    0.12902D+01    0.26190D-05
+  3    0.30193D+01    0.30193D+01    0.10137D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             7  follow.
+  Results for ITOL =             7  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-06
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        117 f-s =        197 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.34724D-16
+  2    0.37136D-02    0.37136D-02    0.90051D-12
+  3    0.61893D-02    0.61893D-02    0.11096D-11
+  4    0.95451D-05    0.95451D-05    0.34735D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        357 f-s =        520 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51290D-08
+  2    0.20000D+00    0.20000D+00    0.10257D-07
+  3    0.30000D+00    0.30000D+00    0.14345D-07
+  4    0.40000D+00    0.40000D+00    0.16975D-07
+  5    0.50000D+00    0.50000D+00    0.17883D-07
+  6    0.60000D+00    0.60000D+00    0.16975D-07
+  7    0.70000D+00    0.70000D+00    0.14344D-07
+  8    0.80000D+00    0.80000D+00    0.10257D-07
+  9    0.90000D+00    0.90000D+00    0.51289D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        400 f-s =        514 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10796D-09
+  2    0.13685D-01    0.13685D-01    0.10870D-08
+  3    0.15037D+01    0.15037D+01    0.11996D-06
+  4    0.13534D+00    0.13534D+00    0.11264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1507 f-s =       1811 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.13518D-07    0.10042D-08    0.12514D-07
+  2    0.10907D-06    0.18000D-07    0.91067D-07
+  3    0.65628D-70    0.00000D+00    0.65628D-70
+  4    0.55985D-68   -0.60430D-78    0.55985D-68
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.87998D-22    0.61813D-30    0.87998D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        592 f-s =        737 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.14587D-10    0.13312D-21    0.14587D-10
+  2   -0.67278D-11   -0.23259D-21    0.67278D-11
+  3   -0.80777D-24    0.15179D-34    0.80777D-24
+  4    0.22822D-08    0.20612D-08    0.22107D-09
+  5    0.45437D-04    0.45400D-04    0.37012D-07
+  6    0.13534D+00    0.13534D+00    0.43414D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3304 f-s =       3852 J-s =         60
+ Computed and reference solutions and absolute errors follow:
+  1   -0.46627D-07   -0.31006D-13    0.46627D-07
+  2    0.87363D-07    0.38628D-13    0.87363D-07
+  3    0.18048D-34    0.18049D-34    0.49651D-39
+  4    0.20612D-08    0.20612D-08    0.52736D-16
+  5    0.45400D-04    0.45400D-04    0.35928D-13
+  6    0.13534D+00    0.13534D+00    0.24925D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        368 f-s =        463 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.34941D-08
+  2    0.40016D-03    0.40016D-03    0.65052D-18
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        340 f-s =        444 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.56117D-07
+  2    0.40000D-01    0.40000D-01    0.24918D-08
+  3    0.40016D-01    0.40016D-01    0.23024D-08
+  4    0.40032D-01    0.40032D-01    0.22707D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        327 f-s =        415 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.30035D-09
+  2    0.40000D+00    0.40000D+00    0.13360D-09
+  3    0.41600D+00    0.41600D+00    0.13422D-09
+  4    0.43331D+00    0.43331D+00    0.14354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        341 f-s =        445 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10593D-08
+  2    0.40000D+01    0.40000D+01    0.46847D-08
+  3    0.20000D+02    0.20000D+02    0.42415D-07
+  4    0.42000D+03    0.42000D+03    0.17307D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        351 f-s =        460 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.64607D-08
+  2    0.80000D+01    0.80000D+01    0.57430D-07
+  3    0.13600D+03    0.13600D+03    0.19379D-05
+  4    0.37128D+05    0.37128D+05    0.10670D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        419 f-s =        612 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.15293D-05
+  2    0.27111D+02    0.27111D+02    0.16896D-05
+  3    0.40000D+03    0.40000D+03    0.56843D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        418 f-s =        583 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.19803D-07
+  2    0.91855D-01    0.91855D-01    0.65643D-08
+  3    0.28416D+02    0.28416D+02    0.19803D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        434 f-s =        578 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.87250D-08
+  2    0.56309D-02    0.56309D-02    0.17013D-10
+  3    0.36024D+00    0.36024D+00    0.87250D-08
+  4    0.31706D+00    0.31706D+00    0.43710D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         65 f-s =        100 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.27090D-06
+  2    0.14023D+01    0.14023D+01    0.27090D-06
+  3   -0.18934D-05   -0.18934D-05    0.26343D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        231 f-s =        363 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.76078D-06
+  2    0.98334D+00    0.98334D+00    0.83890D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        145 f-s =        236 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.29125D-07
+  2    0.14760D+00    0.14760D+00    0.29125D-07
+  3    0.57731D-07    0.57731D-07    0.36121D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        132 f-s =        215 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.98672D-15
+  2    0.60814D-13   -0.16253D-18    0.60814D-13
+  3   -0.32857D-11    0.20260D-16    0.32857D-11
+  4    0.14738D-09   -0.18531D-14    0.14738D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        531 f-s =        666 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13625D-05
+  2    0.43047D+00    0.43047D+00    0.14176D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        397 f-s =        584 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.16683D-07
+  2    0.53170D-02    0.53170D-02    0.20528D-07
+  3    0.26276D+02    0.26276D+02    0.25055D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        748 f-s =        916 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.25958D-09
+  2   -0.20000D+02   -0.20000D+02    0.25960D-09
+  3   -0.22502D-06   -0.22476D-06    0.25959D-09
+  4    0.22502D-06    0.22476D-06    0.25959D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         29 f-s =         56 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16184D-02    0.16181D-02    0.29771D-06
+  2    0.13819D-09    0.13822D-09    0.31354D-13
+  3    0.82518D-11    0.82516D-11    0.19165D-15
+  4    0.12994D-09    0.12997D-09    0.31545D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        816 f-s =       1339 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.98613D-05
+  2    0.12711D-04    0.12711D-04    0.12592D-11
+  3    0.12086D+04    0.12086D+04    0.97883D-05
+  4    0.32420D-03    0.32420D-03    0.12552D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        166 f-s =        219 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.21761D-07
+  2    0.13300D-02    0.13300D-02    0.73842D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         56 f-s =         83 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.30037D-12    0.32359D-12    0.23225D-13
+  2    0.24926D-06    0.23607D-06    0.13190D-07
+  3    0.79768D-13    0.76393D-13    0.33747D-14
+  4    0.79768D-06    0.76393D-06    0.33747D-07
+  5    0.32002D-05    0.32361D-05    0.35852D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2320 f-s =       3652 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.68297D-05
+  2    0.12902D+01    0.12902D+01    0.56960D-06
+  3    0.30193D+01    0.30193D+01    0.22183D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        161 f-s =        296 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.89537D-16
+  2    0.37136D-02    0.37136D-02    0.19752D-11
+  3    0.61893D-02    0.61893D-02    0.32921D-11
+  4    0.95451D-05    0.95451D-05    0.89538D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        452 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        354 f-s =        675 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.47152D-08
+  2    0.20000D+00    0.20000D+00    0.94299D-08
+  3    0.30000D+00    0.30000D+00    0.13187D-07
+  4    0.40000D+00    0.40000D+00    0.15606D-07
+  5    0.50000D+00    0.50000D+00    0.16440D-07
+  6    0.60000D+00    0.60000D+00    0.15606D-07
+  7    0.70000D+00    0.70000D+00    0.13187D-07
+  8    0.80000D+00    0.80000D+00    0.94298D-08
+  9    0.90000D+00    0.90000D+00    0.47151D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        400 f-s =        582 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10796D-09
+  2    0.13685D-01    0.13685D-01    0.10870D-08
+  3    0.15037D+01    0.15037D+01    0.11996D-06
+  4    0.13534D+00    0.13534D+00    0.11264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        875 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1544 f-s =       2106 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.12751D-07    0.10042D-08    0.11747D-07
+  2    0.13711D-06    0.18000D-07    0.11911D-06
+  3    0.57241D-75    0.00000D+00    0.57241D-75
+  4   -0.10958D-72   -0.60430D-78    0.10958D-72
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        449 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.88000D-22    0.61813D-30    0.88000D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        474 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        592 f-s =        863 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.14587D-10    0.13312D-21    0.14587D-10
+  2   -0.67278D-11   -0.23259D-21    0.67278D-11
+  3   -0.80777D-24    0.15179D-34    0.80777D-24
+  4    0.22822D-08    0.20612D-08    0.22107D-09
+  5    0.45437D-04    0.45400D-04    0.37012D-07
+  6    0.13534D+00    0.13534D+00    0.43414D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3304 f-s =       4560 J-s =         89
+ Computed and reference solutions and absolute errors follow:
+  1   -0.46629D-07   -0.31006D-13    0.46629D-07
+  2    0.87362D-07    0.38628D-13    0.87362D-07
+  3    0.18048D-34    0.18049D-34    0.49651D-39
+  4    0.20612D-08    0.20612D-08    0.52737D-16
+  5    0.45400D-04    0.45400D-04    0.35948D-13
+  6    0.13534D+00    0.13534D+00    0.36832D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        368 f-s =        519 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.35009D-08
+  2    0.40016D-03    0.40016D-03    0.75894D-18
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        339 f-s =        502 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.64005D-07
+  2    0.40000D-01    0.40000D-01    0.28448D-08
+  3    0.40016D-01    0.40016D-01    0.26282D-08
+  4    0.40032D-01    0.40032D-01    0.25905D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        325 f-s =        462 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.13570D-08
+  2    0.40000D+00    0.40000D+00    0.63537D-09
+  3    0.41600D+00    0.41600D+00    0.60447D-09
+  4    0.43331D+00    0.43331D+00    0.64839D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        336 f-s =        509 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.12334D-08
+  2    0.40000D+01    0.40000D+01    0.54816D-08
+  3    0.20000D+02    0.20000D+02    0.50037D-07
+  4    0.42000D+03    0.42000D+03    0.20710D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        346 f-s =        510 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.21712D-08
+  2    0.80000D+01    0.80000D+01    0.19300D-07
+  3    0.13600D+03    0.13600D+03    0.65124D-06
+  4    0.37128D+05    0.37128D+05    0.35850D-03
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        414 f-s =        696 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.19005D-05
+  2    0.27111D+02    0.27111D+02    0.17730D-05
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        387 f-s =        622 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.27717D-07
+  2    0.91855D-01    0.91855D-01    0.12480D-07
+  3    0.28416D+02    0.28416D+02    0.27718D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        413 f-s =        653 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.30057D-08
+  2    0.56309D-02    0.56309D-02    0.58610D-11
+  3    0.36024D+00    0.36024D+00    0.30057D-08
+  4    0.31706D+00    0.31706D+00    0.15058D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         66 f-s =        109 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.20551D-06
+  2    0.14023D+01    0.14023D+01    0.20551D-06
+  3   -0.18934D-05   -0.18934D-05    0.97673D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        210 f-s =        373 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.51653D-06
+  2    0.98334D+00    0.98334D+00    0.59310D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        151 f-s =        282 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.19944D-07
+  2    0.14760D+00    0.14760D+00    0.19944D-07
+  3    0.57731D-07    0.57731D-07    0.24565D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        135 f-s =        221 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.36250D-15
+  2    0.23319D-13   -0.16253D-18    0.23319D-13
+  3   -0.13229D-11    0.20260D-16    0.13230D-11
+  4    0.62884D-10   -0.18531D-14    0.62885D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        508 f-s =        704 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.14090D-05
+  2    0.43047D+00    0.43047D+00    0.14825D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        410 f-s =        647 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.51228D-07
+  2    0.53171D-02    0.53170D-02    0.63933D-07
+  3    0.26276D+02    0.26276D+02    0.45533D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        739 f-s =       1057 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.67201D-08
+  2   -0.20000D+02   -0.20000D+02    0.67201D-08
+  3   -0.21804D-06   -0.22476D-06    0.67201D-08
+  4    0.21804D-06    0.22476D-06    0.67201D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         30 f-s =         93 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16180D-02    0.16181D-02    0.99142D-07
+  2    0.13823D-09    0.13822D-09    0.57590D-14
+  3    0.82531D-11    0.82516D-11    0.14968D-14
+  4    0.12998D-09    0.12997D-09    0.42590D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        735 f-s =       1410 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.21342D-04
+  2    0.12711D-04    0.12711D-04    0.27996D-11
+  3    0.12086D+04    0.12086D+04    0.21184D-04
+  4    0.32420D-03    0.32420D-03    0.27909D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        164 f-s =        224 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.82571D-08
+  2    0.13300D-02    0.13300D-02    0.28086D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         50 f-s =         96 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.19541D-12    0.32359D-12    0.12818D-12
+  2    0.25241D-06    0.23607D-06    0.16344D-07
+  3    0.80570D-13    0.76393D-13    0.41765D-14
+  4    0.80566D-06    0.76393D-06    0.41731D-07
+  5    0.31919D-05    0.32361D-05    0.44211D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2237 f-s =       3832 J-s =         82
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.99637D-06
+  2    0.12902D+01    0.12902D+01    0.86810D-07
+  3    0.30193D+01    0.30193D+01    0.33910D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        156 f-s =        290 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.16128D-16
+  2    0.37136D-02    0.37136D-02    0.35579D-12
+  3    0.61893D-02    0.61893D-02    0.59299D-12
+  4    0.95451D-05    0.95451D-05    0.16128D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        302 f-s =        408 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.45410D-04    0.45400D-04    0.10373D-07
+  2    0.21066D-08    0.20612D-08    0.45434D-10
+  3    0.13566D-36    0.28230D-55    0.13566D-36
+  4   -0.21446D-34    0.52358D-51    0.21446D-34
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        357 f-s =        520 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51290D-08
+  2    0.20000D+00    0.20000D+00    0.10257D-07
+  3    0.30000D+00    0.30000D+00    0.14345D-07
+  4    0.40000D+00    0.40000D+00    0.16975D-07
+  5    0.50000D+00    0.50000D+00    0.17883D-07
+  6    0.60000D+00    0.60000D+00    0.16975D-07
+  7    0.70000D+00    0.70000D+00    0.14344D-07
+  8    0.80000D+00    0.80000D+00    0.10257D-07
+  9    0.90000D+00    0.90000D+00    0.51289D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        400 f-s =        514 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.10796D-09
+  2    0.13685D-01    0.13685D-01    0.10870D-08
+  3    0.15037D+01    0.15037D+01    0.11996D-06
+  4    0.13534D+00    0.13534D+00    0.11264D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        495 f-s =        685 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.30809D-08
+  2    0.81042D-08    0.12659D-13    0.81042D-08
+  3   -0.47930D-16    0.19115D-41    0.47930D-16
+  4    0.16367D-27    0.22774D-54    0.16367D-27
+  5   -0.76092D-39    0.00000D+00    0.76092D-39
+  6   -0.31273D-52    0.00000D+00    0.31273D-52
+  7   -0.64761D-65    0.00000D+00    0.64761D-65
+  8    0.16712D-81    0.00000D+00    0.16712D-81
+  9    0.37406D-92    0.00000D+00    0.37406D-92
+ 10    0.27832-108    0.00000D+00    0.27832-108
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       1507 f-s =       1811 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.13518D-07    0.10042D-08    0.12514D-07
+  2    0.10907D-06    0.18000D-07    0.91067D-07
+  3    0.65628D-70    0.00000D+00    0.65628D-70
+  4    0.55985D-68   -0.60430D-78    0.55985D-68
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        281 f-s =        371 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.87998D-22    0.61813D-30    0.87998D-22
+  2   -0.28787D-19    0.89637D-30    0.28787D-19
+  3    0.24212D-17    0.27384D-26    0.24212D-17
+  4    0.21533D-08    0.20612D-08    0.92104D-10
+  5    0.45420D-04    0.45400D-04    0.20557D-07
+  6    0.13534D+00    0.13534D+00    0.24873D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        305 f-s =        402 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.34875D-16   -0.10768D-27    0.34875D-16
+  2   -0.20762D-15    0.54550D-27    0.20762D-15
+  3   -0.14217D-16    0.27385D-26    0.14217D-16
+  4    0.21473D-08    0.20612D-08    0.86185D-10
+  5    0.45416D-04    0.45400D-04    0.16174D-07
+  6    0.13534D+00    0.13534D+00    0.20554D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        592 f-s =        737 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.14587D-10    0.13312D-21    0.14587D-10
+  2   -0.67278D-11   -0.23259D-21    0.67278D-11
+  3   -0.80777D-24    0.15179D-34    0.80777D-24
+  4    0.22822D-08    0.20612D-08    0.22107D-09
+  5    0.45437D-04    0.45400D-04    0.37012D-07
+  6    0.13534D+00    0.13534D+00    0.43414D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3304 f-s =       3852 J-s =         60
+ Computed and reference solutions and absolute errors follow:
+  1   -0.46627D-07   -0.31006D-13    0.46627D-07
+  2    0.87363D-07    0.38628D-13    0.87363D-07
+  3    0.18048D-34    0.18049D-34    0.49651D-39
+  4    0.20612D-08    0.20612D-08    0.52736D-16
+  5    0.45400D-04    0.45400D-04    0.35928D-13
+  6    0.13534D+00    0.13534D+00    0.24925D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        368 f-s =        463 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.34941D-08
+  2    0.40016D-03    0.40016D-03    0.65052D-18
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        340 f-s =        444 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.56117D-07
+  2    0.40000D-01    0.40000D-01    0.24918D-08
+  3    0.40016D-01    0.40016D-01    0.23024D-08
+  4    0.40032D-01    0.40032D-01    0.22707D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        327 f-s =        415 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.30035D-09
+  2    0.40000D+00    0.40000D+00    0.13360D-09
+  3    0.41600D+00    0.41600D+00    0.13422D-09
+  4    0.43331D+00    0.43331D+00    0.14354D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        341 f-s =        445 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10593D-08
+  2    0.40000D+01    0.40000D+01    0.46847D-08
+  3    0.20000D+02    0.20000D+02    0.42415D-07
+  4    0.42000D+03    0.42000D+03    0.17307D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        351 f-s =        460 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.64607D-08
+  2    0.80000D+01    0.80000D+01    0.57430D-07
+  3    0.13600D+03    0.13600D+03    0.19379D-05
+  4    0.37128D+05    0.37128D+05    0.10670D-02
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        419 f-s =        612 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.15293D-05
+  2    0.27111D+02    0.27111D+02    0.16896D-05
+  3    0.40000D+03    0.40000D+03    0.56843D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        418 f-s =        583 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.19803D-07
+  2    0.91855D-01    0.91855D-01    0.65643D-08
+  3    0.28416D+02    0.28416D+02    0.19803D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        434 f-s =        578 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.87250D-08
+  2    0.56309D-02    0.56309D-02    0.17013D-10
+  3    0.36024D+00    0.36024D+00    0.87250D-08
+  4    0.31706D+00    0.31706D+00    0.43710D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         65 f-s =        100 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.27090D-06
+  2    0.14023D+01    0.14023D+01    0.27090D-06
+  3   -0.18934D-05   -0.18934D-05    0.26343D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        231 f-s =        363 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.76078D-06
+  2    0.98334D+00    0.98334D+00    0.83890D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        145 f-s =        236 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.29125D-07
+  2    0.14760D+00    0.14760D+00    0.29125D-07
+  3    0.57731D-07    0.57731D-07    0.36121D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        132 f-s =        215 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.98672D-15
+  2    0.60814D-13   -0.16253D-18    0.60814D-13
+  3   -0.32857D-11    0.20260D-16    0.32857D-11
+  4    0.14738D-09   -0.18531D-14    0.14738D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        531 f-s =        666 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.13625D-05
+  2    0.43047D+00    0.43047D+00    0.14176D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        397 f-s =        584 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.16683D-07
+  2    0.53170D-02    0.53170D-02    0.20528D-07
+  3    0.26276D+02    0.26276D+02    0.25055D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =        748 f-s =        916 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.25958D-09
+  2   -0.20000D+02   -0.20000D+02    0.25960D-09
+  3   -0.22502D-06   -0.22476D-06    0.25959D-09
+  4    0.22502D-06    0.22476D-06    0.25959D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         29 f-s =         56 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16184D-02    0.16181D-02    0.29771D-06
+  2    0.13819D-09    0.13822D-09    0.31354D-13
+  3    0.82518D-11    0.82516D-11    0.19165D-15
+  4    0.12994D-09    0.12997D-09    0.31545D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        816 f-s =       1339 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.98613D-05
+  2    0.12711D-04    0.12711D-04    0.12592D-11
+  3    0.12086D+04    0.12086D+04    0.97883D-05
+  4    0.32420D-03    0.32420D-03    0.12552D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        166 f-s =        219 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.21761D-07
+  2    0.13300D-02    0.13300D-02    0.73842D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         56 f-s =         83 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.30037D-12    0.32359D-12    0.23225D-13
+  2    0.24926D-06    0.23607D-06    0.13190D-07
+  3    0.79768D-13    0.76393D-13    0.33747D-14
+  4    0.79768D-06    0.76393D-06    0.33747D-07
+  5    0.32002D-05    0.32361D-05    0.35852D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       2320 f-s =       3652 J-s =         49
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.68297D-05
+  2    0.12902D+01    0.12902D+01    0.56960D-06
+  3    0.30193D+01    0.30193D+01    0.22183D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             8  follow.
+  Results for ITOL =             8  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-07
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        161 f-s =        296 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.89537D-16
+  2    0.37136D-02    0.37136D-02    0.19752D-11
+  3    0.61893D-02    0.61893D-02    0.32921D-11
+  4    0.95451D-05    0.95451D-05    0.89538D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        486 f-s =        673 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51302D-09
+  2    0.20000D+00    0.20000D+00    0.10260D-08
+  3    0.30000D+00    0.30000D+00    0.14348D-08
+  4    0.40000D+00    0.40000D+00    0.16979D-08
+  5    0.50000D+00    0.50000D+00    0.17887D-08
+  6    0.60000D+00    0.60000D+00    0.16979D-08
+  7    0.70000D+00    0.70000D+00    0.14348D-08
+  8    0.80000D+00    0.80000D+00    0.10260D-08
+  9    0.90000D+00    0.90000D+00    0.51301D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        554 f-s =        674 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.55048D-10
+  2    0.13685D-01    0.13685D-01    0.55307D-09
+  3    0.15037D+01    0.15037D+01    0.61165D-07
+  4    0.13534D+00    0.13534D+00    0.58603D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19630D-10    0.12659D-13    0.19642D-10
+  3    0.50491D-23    0.19115D-41    0.50491D-23
+  4   -0.40029D-36    0.22774D-54    0.40029D-36
+  5   -0.12541D-51    0.00000D+00    0.12541D-51
+  6    0.19248D-70    0.00000D+00    0.19248D-70
+  7    0.18002D-88    0.00000D+00    0.18002D-88
+  8   -0.16262-107    0.00000D+00    0.16262-107
+  9    0.75670-126    0.00000D+00    0.75670-126
+ 10    0.28912-143    0.00000D+00    0.28912-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2270 f-s =       2668 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1    0.20380D-08    0.10042D-08    0.10338D-08
+  2    0.98186D-08    0.18000D-07    0.81817D-08
+  3   -0.21651-133    0.00000D+00    0.21651-133
+  4    0.15879-131   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67161D-25    0.89637D-30    0.67160D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        844 f-s =       1015 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.33183D-10    0.13312D-21    0.33183D-10
+  2   -0.18365D-10   -0.23259D-21    0.18365D-10
+  3   -0.25756D-30    0.15179D-34    0.25758D-30
+  4    0.20689D-08    0.20612D-08    0.77617D-11
+  5    0.45401D-04    0.45400D-04    0.84210D-09
+  6    0.13534D+00    0.13534D+00    0.36199D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3856 f-s =       4464 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1    0.68300D-09   -0.31006D-13    0.68303D-09
+  2    0.10516D-07    0.38628D-13    0.10516D-07
+  3    0.18048D-34    0.18049D-34    0.49484D-39
+  4    0.20612D-08    0.20612D-08    0.52561D-16
+  5    0.45400D-04    0.45400D-04    0.35866D-13
+  6    0.13534D+00    0.13534D+00    0.31058D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.32933D-08
+  2    0.40016D-03    0.40016D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        465 f-s =        579 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31903D-09
+  2    0.40000D-01    0.40000D-01    0.14183D-10
+  3    0.40016D-01    0.40016D-01    0.13096D-10
+  4    0.40032D-01    0.40032D-01    0.12911D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        469 f-s =        571 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.94382D-09
+  2    0.40000D+00    0.40000D+00    0.41947D-09
+  3    0.41600D+00    0.41600D+00    0.42161D-09
+  4    0.43331D+00    0.43331D+00    0.45066D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        483 f-s =        605 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.29362D-09
+  2    0.40000D+01    0.40000D+01    0.13050D-08
+  3    0.20000D+02    0.20000D+02    0.11912D-07
+  4    0.42000D+03    0.42000D+03    0.49301D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        478 f-s =        608 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10170D-09
+  2    0.80000D+01    0.80000D+01    0.90407D-09
+  3    0.13600D+03    0.13600D+03    0.30507D-07
+  4    0.37128D+05    0.37128D+05    0.16794D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        591 f-s =        851 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.29791D-06
+  2    0.27111D+02    0.27111D+02    0.33049D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        539 f-s =        797 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.32205D-08
+  2    0.91855D-01    0.91855D-01    0.13007D-08
+  3    0.28416D+02    0.28416D+02    0.32206D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        580 f-s =        725 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11107D-09
+  2    0.56309D-02    0.56309D-02    0.21650D-12
+  3    0.36024D+00    0.36024D+00    0.11107D-09
+  4    0.31706D+00    0.31706D+00    0.55643D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         93 f-s =        163 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.38193D-07
+  2    0.14023D+01    0.14023D+01    0.38196D-07
+  3   -0.18934D-05   -0.18934D-05    0.23351D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        359 f-s =        548 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.96444D-07
+  2    0.98334D+00    0.98334D+00    0.11193D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        218 f-s =        354 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.57991D-08
+  2    0.14760D+00    0.14760D+00    0.57991D-08
+  3    0.57731D-07    0.57731D-07    0.71432D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        281 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.25731D-15
+  2   -0.10609D-13   -0.16253D-18    0.10609D-13
+  3    0.18370D-12    0.20260D-16    0.18368D-12
+  4    0.24734D-10   -0.18531D-14    0.24736D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        726 f-s =        889 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.18099D-06
+  2    0.43047D+00    0.43047D+00    0.18211D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        535 f-s =        773 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.29515D-08
+  2    0.53170D-02    0.53170D-02    0.36924D-08
+  3    0.26276D+02    0.26276D+02    0.63616D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1048 f-s =       1267 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.12428D-08
+  2   -0.20000D+02   -0.20000D+02    0.12427D-08
+  3   -0.22352D-06   -0.22476D-06    0.12428D-08
+  4    0.22352D-06    0.22476D-06    0.12427D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         41 f-s =         77 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.13511D-08
+  2    0.13822D-09    0.13822D-09    0.38402D-15
+  3    0.82516D-11    0.82516D-11    0.12070D-16
+  4    0.12997D-09    0.12997D-09    0.37195D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        960 f-s =       1545 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.21504D-05
+  2    0.12711D-04    0.12711D-04    0.27993D-12
+  3    0.12086D+04    0.12086D+04    0.21345D-05
+  4    0.32420D-03    0.32420D-03    0.27906D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        238 f-s =        314 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.28025D-08
+  2    0.13300D-02    0.13300D-02    0.95191D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         76 f-s =        109 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.18753D-12    0.32359D-12    0.13606D-12
+  2    0.23289D-06    0.23607D-06    0.31821D-08
+  3    0.75585D-13    0.76393D-13    0.80851D-15
+  4    0.75585D-06    0.76393D-06    0.80842D-08
+  5    0.32456D-05    0.32361D-05    0.95041D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3208 f-s =       4842 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.15477D-05
+  2    0.12902D+01    0.12902D+01    0.13430D-06
+  3    0.30193D+01    0.30193D+01    0.63800D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        218 f-s =        391 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.41125D-16
+  2    0.37136D-02    0.37136D-02    0.90725D-12
+  3    0.61893D-02    0.61893D-02    0.15121D-11
+  4    0.95451D-05    0.95451D-05    0.41118D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        618 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        486 f-s =        835 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51268D-09
+  2    0.20000D+00    0.20000D+00    0.10253D-08
+  3    0.30000D+00    0.30000D+00    0.14338D-08
+  4    0.40000D+00    0.40000D+00    0.16968D-08
+  5    0.50000D+00    0.50000D+00    0.17876D-08
+  6    0.60000D+00    0.60000D+00    0.16968D-08
+  7    0.70000D+00    0.70000D+00    0.14338D-08
+  8    0.80000D+00    0.80000D+00    0.10253D-08
+  9    0.90000D+00    0.90000D+00    0.51268D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        554 f-s =        762 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.55056D-10
+  2    0.13685D-01    0.13685D-01    0.55314D-09
+  3    0.15037D+01    0.15037D+01    0.61173D-07
+  4    0.13534D+00    0.13534D+00    0.58611D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =       1293 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19620D-10    0.12659D-13    0.19632D-10
+  3    0.50487D-23    0.19115D-41    0.50487D-23
+  4   -0.40024D-36    0.22774D-54    0.40024D-36
+  5   -0.12542D-51    0.00000D+00    0.12542D-51
+  6    0.19241D-70    0.00000D+00    0.19241D-70
+  7    0.17997D-88    0.00000D+00    0.17997D-88
+  8   -0.16257-107    0.00000D+00    0.16257-107
+  9    0.75653-126    0.00000D+00    0.75653-126
+ 10    0.28909-143    0.00000D+00    0.28909-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2244 f-s =       3002 J-s =         66
+ Computed and reference solutions and absolute errors follow:
+  1    0.20380D-08    0.10042D-08    0.10338D-08
+  2    0.98184D-08    0.18000D-07    0.81818D-08
+  3   -0.10374-129    0.00000D+00    0.10374-129
+  4    0.11794-127   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        609 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67161D-25    0.89637D-30    0.67161D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        619 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        844 f-s =       1225 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.33183D-10    0.13312D-21    0.33183D-10
+  2   -0.18365D-10   -0.23259D-21    0.18365D-10
+  3   -0.25756D-30    0.15179D-34    0.25758D-30
+  4    0.20689D-08    0.20612D-08    0.77616D-11
+  5    0.45401D-04    0.45400D-04    0.84210D-09
+  6    0.13534D+00    0.13534D+00    0.36199D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3856 f-s =       5304 J-s =        105
+ Computed and reference solutions and absolute errors follow:
+  1    0.68309D-09   -0.31006D-13    0.68312D-09
+  2    0.10516D-07    0.38628D-13    0.10516D-07
+  3    0.18048D-34    0.18049D-34    0.49484D-39
+  4    0.20612D-08    0.20612D-08    0.52562D-16
+  5    0.45400D-04    0.45400D-04    0.35880D-13
+  6    0.13534D+00    0.13534D+00    0.38636D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        724 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.33742D-08
+  2    0.40016D-03    0.40016D-03    0.16263D-18
+  3    0.40000D-03    0.40000D-03    0.10842D-18
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        465 f-s =        643 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.32843D-09
+  2    0.40000D-01    0.40000D-01    0.14637D-10
+  3    0.40016D-01    0.40016D-01    0.13560D-10
+  4    0.40032D-01    0.40032D-01    0.13349D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        469 f-s =        643 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31507D-08
+  2    0.40000D+00    0.40000D+00    0.14002D-08
+  3    0.41600D+00    0.41600D+00    0.14074D-08
+  4    0.43331D+00    0.43331D+00    0.15044D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        480 f-s =        653 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.24473D-09
+  2    0.40000D+01    0.40000D+01    0.10877D-08
+  3    0.20000D+02    0.20000D+02    0.99285D-08
+  4    0.42000D+03    0.42000D+03    0.41093D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        492 f-s =        682 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.14622D-09
+  2    0.80000D+01    0.80000D+01    0.13006D-08
+  3    0.13600D+03    0.13600D+03    0.43957D-07
+  4    0.37128D+05    0.37128D+05    0.24272D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        592 f-s =        958 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.15611D-06
+  2    0.27111D+02    0.27111D+02    0.14672D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        544 f-s =        879 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.57892D-08
+  2    0.91855D-01    0.91855D-01    0.22649D-08
+  3    0.28416D+02    0.28416D+02    0.57894D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        582 f-s =        823 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.38292D-08
+  2    0.56309D-02    0.56309D-02    0.74667D-11
+  3    0.36024D+00    0.36024D+00    0.38292D-08
+  4    0.31706D+00    0.31706D+00    0.19183D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         87 f-s =        147 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.60451D-08
+  2    0.14023D+01    0.14023D+01    0.60451D-08
+  3   -0.18934D-05   -0.18934D-05    0.28860D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        328 f-s =        513 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.96467D-07
+  2    0.98334D+00    0.98334D+00    0.11257D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        226 f-s =        426 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.12713D-08
+  2    0.14760D+00    0.14760D+00    0.12713D-08
+  3    0.57731D-07    0.57731D-07    0.15672D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        305 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.37297D-15
+  2    0.17195D-13   -0.16253D-18    0.17195D-13
+  3   -0.63531D-12    0.20260D-16    0.63533D-12
+  4    0.91238D-11   -0.18531D-14    0.91256D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        725 f-s =        949 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.18442D-06
+  2    0.43047D+00    0.43047D+00    0.18838D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        495 f-s =        742 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.80286D-09
+  2    0.53170D-02    0.53170D-02    0.99612D-09
+  3    0.26276D+02    0.26276D+02    0.11097D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1047 f-s =       1411 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.69176D-09
+  2   -0.20000D+02   -0.20000D+02    0.69177D-09
+  3   -0.22546D-06   -0.22476D-06    0.69177D-09
+  4    0.22546D-06    0.22476D-06    0.69177D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         43 f-s =        107 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.79010D-08
+  2    0.13824D-09    0.13822D-09    0.19865D-13
+  3    0.82527D-11    0.82516D-11    0.11735D-14
+  4    0.12999D-09    0.12997D-09    0.18691D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1104 f-s =       2015 J-s =         46
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.12477D-05
+  2    0.12711D-04    0.12711D-04    0.16231D-12
+  3    0.12086D+04    0.12086D+04    0.12385D-05
+  4    0.32420D-03    0.32420D-03    0.16181D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        242 f-s =        346 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.74528D-08
+  2    0.13300D-02    0.13300D-02    0.25316D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         77 f-s =        146 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.32436D-12    0.32359D-12    0.76730D-15
+  2    0.23385D-06    0.23607D-06    0.22139D-08
+  3    0.75824D-13    0.76393D-13    0.56875D-15
+  4    0.75824D-06    0.76393D-06    0.56878D-08
+  5    0.32424D-05    0.32361D-05    0.63143D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3105 f-s =       5145 J-s =        112
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.76446D-06
+  2    0.12902D+01    0.12902D+01    0.66173D-07
+  3    0.30193D+01    0.30193D+01    0.30494D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        209 f-s =        402 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.27180D-16
+  2    0.37136D-02    0.37136D-02    0.60152D-12
+  3    0.61893D-02    0.61893D-02    0.99489D-12
+  4    0.95451D-05    0.95451D-05    0.27195D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        428 f-s =        542 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.45402D-04    0.45400D-04    0.20958D-08
+  2    0.20698D-08    0.20612D-08    0.86833D-11
+  3   -0.53753D-44    0.28230D-55    0.53753D-44
+  4   -0.26328D-41    0.52358D-51    0.26328D-41
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        486 f-s =        673 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.51302D-09
+  2    0.20000D+00    0.20000D+00    0.10260D-08
+  3    0.30000D+00    0.30000D+00    0.14348D-08
+  4    0.40000D+00    0.40000D+00    0.16979D-08
+  5    0.50000D+00    0.50000D+00    0.17887D-08
+  6    0.60000D+00    0.60000D+00    0.16979D-08
+  7    0.70000D+00    0.70000D+00    0.14348D-08
+  8    0.80000D+00    0.80000D+00    0.10260D-08
+  9    0.90000D+00    0.90000D+00    0.51301D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        554 f-s =        674 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.55048D-10
+  2    0.13685D-01    0.13685D-01    0.55307D-09
+  3    0.15037D+01    0.15037D+01    0.61165D-07
+  4    0.13534D+00    0.13534D+00    0.58603D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        953 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.36942D-09
+  2   -0.19630D-10    0.12659D-13    0.19642D-10
+  3    0.50491D-23    0.19115D-41    0.50491D-23
+  4   -0.40029D-36    0.22774D-54    0.40029D-36
+  5   -0.12541D-51    0.00000D+00    0.12541D-51
+  6    0.19248D-70    0.00000D+00    0.19248D-70
+  7    0.18002D-88    0.00000D+00    0.18002D-88
+  8   -0.16262-107    0.00000D+00    0.16262-107
+  9    0.75670-126    0.00000D+00    0.75670-126
+ 10    0.28912-143    0.00000D+00    0.28912-143
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       2270 f-s =       2668 J-s =         45
+ Computed and reference solutions and absolute errors follow:
+  1    0.20380D-08    0.10042D-08    0.10338D-08
+  2    0.98186D-08    0.18000D-07    0.81817D-08
+  3   -0.21651-133    0.00000D+00    0.21651-133
+  4    0.15879-131   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        390 f-s =        495 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.67751D-25    0.61813D-30    0.67751D-25
+  2    0.67161D-25    0.89637D-30    0.67160D-25
+  3   -0.11972D-21    0.27384D-26    0.11972D-21
+  4    0.20700D-08    0.20612D-08    0.88533D-11
+  5    0.45402D-04    0.45400D-04    0.22293D-08
+  6    0.13534D+00    0.13534D+00    0.32690D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        426 f-s =        529 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1   -0.44272D-19   -0.10768D-27    0.44272D-19
+  2   -0.17172D-19    0.54550D-27    0.17172D-19
+  3   -0.20650D-22    0.27385D-26    0.20652D-22
+  4    0.20679D-08    0.20612D-08    0.67196D-11
+  5    0.45402D-04    0.45400D-04    0.16949D-08
+  6    0.13534D+00    0.13534D+00    0.25365D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        844 f-s =       1015 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.33183D-10    0.13312D-21    0.33183D-10
+  2   -0.18365D-10   -0.23259D-21    0.18365D-10
+  3   -0.25756D-30    0.15179D-34    0.25758D-30
+  4    0.20689D-08    0.20612D-08    0.77617D-11
+  5    0.45401D-04    0.45400D-04    0.84210D-09
+  6    0.13534D+00    0.13534D+00    0.36199D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       3856 f-s =       4464 J-s =         70
+ Computed and reference solutions and absolute errors follow:
+  1    0.68300D-09   -0.31006D-13    0.68303D-09
+  2    0.10516D-07    0.38628D-13    0.10516D-07
+  3    0.18048D-34    0.18049D-34    0.49484D-39
+  4    0.20612D-08    0.20612D-08    0.52561D-16
+  5    0.45400D-04    0.45400D-04    0.35866D-13
+  6    0.13534D+00    0.13534D+00    0.31058D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        525 f-s =        643 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.40033D-03    0.40032D-03    0.32933D-08
+  2    0.40016D-03    0.40016D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.34694D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        465 f-s =        579 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.31903D-09
+  2    0.40000D-01    0.40000D-01    0.14183D-10
+  3    0.40016D-01    0.40016D-01    0.13096D-10
+  4    0.40032D-01    0.40032D-01    0.12911D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        469 f-s =        571 J-s =         13
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.94382D-09
+  2    0.40000D+00    0.40000D+00    0.41947D-09
+  3    0.41600D+00    0.41600D+00    0.42161D-09
+  4    0.43331D+00    0.43331D+00    0.45066D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        483 f-s =        605 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.29362D-09
+  2    0.40000D+01    0.40000D+01    0.13050D-08
+  3    0.20000D+02    0.20000D+02    0.11912D-07
+  4    0.42000D+03    0.42000D+03    0.49301D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        478 f-s =        608 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.10170D-09
+  2    0.80000D+01    0.80000D+01    0.90407D-09
+  3    0.13600D+03    0.13600D+03    0.30507D-07
+  4    0.37128D+05    0.37128D+05    0.16794D-04
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        591 f-s =        851 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.29791D-06
+  2    0.27111D+02    0.27111D+02    0.33049D-06
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        539 f-s =        797 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.32205D-08
+  2    0.91855D-01    0.91855D-01    0.13007D-08
+  3    0.28416D+02    0.28416D+02    0.32206D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        580 f-s =        725 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.11107D-09
+  2    0.56309D-02    0.56309D-02    0.21650D-12
+  3    0.36024D+00    0.36024D+00    0.11107D-09
+  4    0.31706D+00    0.31706D+00    0.55643D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =         93 f-s =        163 J-s =          4
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.38193D-07
+  2    0.14023D+01    0.14023D+01    0.38196D-07
+  3   -0.18934D-05   -0.18934D-05    0.23351D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        359 f-s =        548 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.96444D-07
+  2    0.98334D+00    0.98334D+00    0.11193D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        218 f-s =        354 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.57991D-08
+  2    0.14760D+00    0.14760D+00    0.57991D-08
+  3    0.57731D-07    0.57731D-07    0.71432D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        182 f-s =        281 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.25731D-15
+  2   -0.10609D-13   -0.16253D-18    0.10609D-13
+  3    0.18370D-12    0.20260D-16    0.18368D-12
+  4    0.24734D-10   -0.18531D-14    0.24736D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =        726 f-s =        889 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.18099D-06
+  2    0.43047D+00    0.43047D+00    0.18211D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        535 f-s =        773 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.29515D-08
+  2    0.53170D-02    0.53170D-02    0.36924D-08
+  3    0.26276D+02    0.26276D+02    0.63616D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1048 f-s =       1267 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.12428D-08
+  2   -0.20000D+02   -0.20000D+02    0.12427D-08
+  3   -0.22352D-06   -0.22476D-06    0.12428D-08
+  4    0.22352D-06    0.22476D-06    0.12427D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         41 f-s =         77 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.13511D-08
+  2    0.13822D-09    0.13822D-09    0.38402D-15
+  3    0.82516D-11    0.82516D-11    0.12070D-16
+  4    0.12997D-09    0.12997D-09    0.37195D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        960 f-s =       1545 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.21504D-05
+  2    0.12711D-04    0.12711D-04    0.27993D-12
+  3    0.12086D+04    0.12086D+04    0.21345D-05
+  4    0.32420D-03    0.32420D-03    0.27906D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        238 f-s =        314 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.28025D-08
+  2    0.13300D-02    0.13300D-02    0.95191D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =         76 f-s =        109 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.18753D-12    0.32359D-12    0.13606D-12
+  2    0.23289D-06    0.23607D-06    0.31821D-08
+  3    0.75585D-13    0.76393D-13    0.80851D-15
+  4    0.75585D-06    0.76393D-06    0.80842D-08
+  5    0.32456D-05    0.32361D-05    0.95041D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3208 f-s =       4842 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.15477D-05
+  2    0.12902D+01    0.12902D+01    0.13430D-06
+  3    0.30193D+01    0.30193D+01    0.63800D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =             9  follow.
+  Results for ITOL =             9  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-08
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        218 f-s =        391 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.41125D-16
+  2    0.37136D-02    0.37136D-02    0.90725D-12
+  3    0.61893D-02    0.61893D-02    0.15121D-11
+  4    0.95451D-05    0.95451D-05    0.41118D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        712 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91982D-53
+  4    0.81954D-50    0.52358D-51    0.76719D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        699 f-s =        919 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.35667D-10
+  2    0.20000D+00    0.20000D+00    0.71330D-10
+  3    0.30000D+00    0.30000D+00    0.99751D-10
+  4    0.40000D+00    0.40000D+00    0.11805D-09
+  5    0.50000D+00    0.50000D+00    0.12436D-09
+  6    0.60000D+00    0.60000D+00    0.11805D-09
+  7    0.70000D+00    0.70000D+00    0.99751D-10
+  8    0.80000D+00    0.80000D+00    0.71329D-10
+  9    0.90000D+00    0.90000D+00    0.35666D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        787 f-s =        928 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.24111D-11
+  2    0.13685D-01    0.13685D-01    0.24319D-10
+  3    0.15037D+01    0.15037D+01    0.26790D-08
+  4    0.13534D+00    0.13534D+00    0.24724D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96718D-30    0.19115D-41    0.96718D-30
+  4    0.36838D-45    0.22774D-54    0.36838D-45
+  5   -0.26040D-66    0.00000D+00    0.26040D-66
+  6   -0.24200D-87    0.00000D+00    0.24200D-87
+  7   -0.55396-112    0.00000D+00    0.55396-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36663-165    0.00000D+00    0.36663-165
+ 10   -0.13090-187    0.00000D+00    0.13090-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       3303 f-s =       3833 J-s =         63
+ Computed and reference solutions and absolute errors follow:
+  1    0.98635D-09    0.10042D-08    0.17812D-10
+  2    0.15563D-07    0.18000D-07    0.24371D-08
+  3   -0.38125-228    0.00000D+00    0.38125-228
+  4    0.11116-226   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31673D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16599D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1129 f-s =       1324 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17084D-11    0.13312D-21    0.17084D-11
+  2    0.29903D-11   -0.23259D-21    0.29903D-11
+  3    0.12799D-34    0.15179D-34    0.23800D-35
+  4    0.20608D-08    0.20612D-08    0.30844D-12
+  5    0.45400D-04    0.45400D-04    0.19133D-09
+  6    0.13534D+00    0.13534D+00    0.16759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4689 f-s =       5406 J-s =         86
+ Computed and reference solutions and absolute errors follow:
+  1    0.51657D-08   -0.31006D-13    0.51657D-08
+  2   -0.43352D-09    0.38628D-13    0.43356D-09
+  3    0.18048D-34    0.18049D-34    0.49621D-39
+  4    0.20612D-08    0.20612D-08    0.52696D-16
+  5    0.45400D-04    0.45400D-04    0.35976D-13
+  6    0.13534D+00    0.13534D+00    0.38664D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        736 f-s =        886 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.25390D-09
+  2    0.40016D-03    0.40016D-03    0.27105D-18
+  3    0.40000D-03    0.40000D-03    0.54210D-18
+  4    0.20000D-01    0.20000D-01    0.17347D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        669 f-s =        804 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.79983D-09
+  2    0.40000D-01    0.40000D-01    0.35540D-10
+  3    0.40016D-01    0.40016D-01    0.32836D-10
+  4    0.40032D-01    0.40032D-01    0.32366D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        659 f-s =        791 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.34159D-09
+  2    0.40000D+00    0.40000D+00    0.15182D-09
+  3    0.41600D+00    0.41600D+00    0.15262D-09
+  4    0.43331D+00    0.43331D+00    0.16313D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        694 f-s =        826 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22898D-10
+  2    0.40000D+01    0.40000D+01    0.10177D-09
+  3    0.20000D+02    0.20000D+02    0.92899D-09
+  4    0.42000D+03    0.42000D+03    0.38450D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        839 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.11017D-10
+  2    0.80000D+01    0.80000D+01    0.97931D-10
+  3    0.13600D+03    0.13600D+03    0.33046D-08
+  4    0.37128D+05    0.37128D+05    0.18191D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        747 f-s =       1062 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.45975D-07
+  2    0.27111D+02    0.27111D+02    0.45746D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        726 f-s =       1019 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.31961D-09
+  2    0.91855D-01    0.91855D-01    0.12741D-09
+  3    0.28416D+02    0.28416D+02    0.31962D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        836 f-s =        997 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.48135D-10
+  2    0.56309D-02    0.56309D-02    0.93844D-13
+  3    0.36024D+00    0.36024D+00    0.48134D-10
+  4    0.31706D+00    0.31706D+00    0.24114D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        123 f-s =        189 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.12091D-08
+  2    0.14023D+01    0.14023D+01    0.12091D-08
+  3   -0.18934D-05   -0.18934D-05    0.11997D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        511 f-s =        782 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.10442D-07
+  2    0.98334D+00    0.98334D+00    0.12008D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        291 f-s =        471 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.17599D-09
+  2    0.14760D+00    0.14760D+00    0.17600D-09
+  3    0.57731D-07    0.57731D-07    0.21649D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        234 f-s =        342 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.45924D-16
+  2   -0.50459D-14   -0.16253D-18    0.50457D-14
+  3    0.59836D-13    0.20260D-16    0.59815D-13
+  4   -0.13093D-10   -0.18531D-14    0.13091D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1041 f-s =       1214 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.35081D-07
+  2    0.43047D+00    0.43047D+00    0.36829D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        671 f-s =        918 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.67982D-09
+  2    0.53170D-02    0.53170D-02    0.84541D-09
+  3    0.26276D+02    0.26276D+02    0.48339D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1525 f-s =       1801 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.12546D-08
+  2   -0.20000D+02   -0.20000D+02    0.12561D-08
+  3   -0.22351D-06   -0.22476D-06    0.12545D-08
+  4    0.22351D-06    0.22476D-06    0.12562D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         61 f-s =         93 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.46690D-08
+  2    0.13822D-09    0.13822D-09    0.97684D-15
+  3    0.82515D-11    0.82516D-11    0.62642D-16
+  4    0.12997D-09    0.12997D-09    0.91420D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1299 f-s =       2016 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.24935D-06
+  2    0.12711D-04    0.12711D-04    0.32486D-13
+  3    0.12086D+04    0.12086D+04    0.24750D-06
+  4    0.32420D-03    0.32420D-03    0.32385D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        318 f-s =        385 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.14619D-08
+  2    0.13300D-02    0.13300D-02    0.49653D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        131 f-s =        182 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32342D-12    0.32359D-12    0.16701D-15
+  2    0.23607D-06    0.23607D-06    0.35734D-12
+  3    0.76394D-13    0.76393D-13    0.42503D-18
+  4    0.76394D-06    0.76393D-06    0.41797D-11
+  5    0.32361D-05    0.32361D-05    0.22604D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3984 f-s =       5659 J-s =         78
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.26443D-06
+  2    0.12902D+01    0.12902D+01    0.22858D-07
+  3    0.30193D+01    0.30193D+01    0.10225D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        374 f-s =        631 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.16876D-15
+  2    0.37136D-02    0.37136D-02    0.37228D-11
+  3    0.61893D-02    0.61893D-02    0.62047D-11
+  4    0.95451D-05    0.95451D-05    0.16874D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        788 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92265D-53    0.28230D-55    0.91982D-53
+  4    0.81954D-50    0.52358D-51    0.76719D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        699 f-s =       1189 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.35663D-10
+  2    0.20000D+00    0.20000D+00    0.71323D-10
+  3    0.30000D+00    0.30000D+00    0.99742D-10
+  4    0.40000D+00    0.40000D+00    0.11804D-09
+  5    0.50000D+00    0.50000D+00    0.12435D-09
+  6    0.60000D+00    0.60000D+00    0.11804D-09
+  7    0.70000D+00    0.70000D+00    0.99742D-10
+  8    0.80000D+00    0.80000D+00    0.71323D-10
+  9    0.90000D+00    0.90000D+00    0.35663D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        787 f-s =       1056 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.24106D-11
+  2    0.13685D-01    0.13685D-01    0.24314D-10
+  3    0.15037D+01    0.15037D+01    0.26784D-08
+  4    0.13534D+00    0.13534D+00    0.24719D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1684 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96719D-30    0.19115D-41    0.96719D-30
+  4    0.36837D-45    0.22774D-54    0.36837D-45
+  5   -0.26040D-66    0.00000D+00    0.26040D-66
+  6   -0.24199D-87    0.00000D+00    0.24199D-87
+  7   -0.55395-112    0.00000D+00    0.55395-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36663-165    0.00000D+00    0.36663-165
+ 10   -0.13090-187    0.00000D+00    0.13090-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       3260 f-s =       4267 J-s =         93
+ Computed and reference solutions and absolute errors follow:
+  1    0.97871D-09    0.10042D-08    0.25457D-10
+  2    0.15533D-07    0.18000D-07    0.24674D-08
+  3    0.12038-228    0.00000D+00    0.12038-228
+  4    0.33073-226   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        823 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31672D-32    0.61813D-30    0.62130D-30
+  2   -0.11778D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57914D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        867 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16599D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1129 f-s =       1564 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17084D-11    0.13312D-21    0.17084D-11
+  2    0.29904D-11   -0.23259D-21    0.29904D-11
+  3    0.12799D-34    0.15179D-34    0.23799D-35
+  4    0.20608D-08    0.20612D-08    0.30844D-12
+  5    0.45400D-04    0.45400D-04    0.19133D-09
+  6    0.13534D+00    0.13534D+00    0.16758D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4689 f-s =       6426 J-s =        128
+ Computed and reference solutions and absolute errors follow:
+  1    0.51657D-08   -0.31006D-13    0.51657D-08
+  2   -0.43351D-09    0.38628D-13    0.43355D-09
+  3    0.18048D-34    0.18049D-34    0.49621D-39
+  4    0.20612D-08    0.20612D-08    0.52696D-16
+  5    0.45400D-04    0.45400D-04    0.35973D-13
+  6    0.13534D+00    0.13534D+00    0.38136D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        736 f-s =       1006 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.24187D-09
+  2    0.40016D-03    0.40016D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        669 f-s =        908 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.80675D-09
+  2    0.40000D-01    0.40000D-01    0.35851D-10
+  3    0.40016D-01    0.40016D-01    0.33123D-10
+  4    0.40032D-01    0.40032D-01    0.32648D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        654 f-s =        883 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.11570D-09
+  2    0.40000D+00    0.40000D+00    0.51425D-10
+  3    0.41600D+00    0.41600D+00    0.51688D-10
+  4    0.43331D+00    0.43331D+00    0.55249D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        683 f-s =        944 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22533D-10
+  2    0.40000D+01    0.40000D+01    0.10015D-09
+  3    0.20000D+02    0.20000D+02    0.91418D-09
+  4    0.42000D+03    0.42000D+03    0.37837D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        709 f-s =        950 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18567D-10
+  2    0.80000D+01    0.80000D+01    0.16504D-09
+  3    0.13600D+03    0.13600D+03    0.55691D-08
+  4    0.37128D+05    0.37128D+05    0.30656D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        741 f-s =       1197 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.36232D-07
+  2    0.27111D+02    0.27111D+02    0.36615D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        661 f-s =       1049 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.66998D-10
+  2    0.91855D-01    0.91855D-01    0.27313D-10
+  3    0.28416D+02    0.28416D+02    0.67000D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        832 f-s =       1146 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.47667D-10
+  2    0.56309D-02    0.56309D-02    0.92943D-13
+  3    0.36024D+00    0.36024D+00    0.47667D-10
+  4    0.31706D+00    0.31706D+00    0.23881D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        124 f-s =        218 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.34334D-09
+  2    0.14023D+01    0.14023D+01    0.34335D-09
+  3   -0.18934D-05   -0.18934D-05    0.17253D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        519 f-s =        876 J-s =         20
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.68345D-08
+  2    0.98334D+00    0.98334D+00    0.80470D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        254 f-s =        443 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.30078D-09
+  2    0.14760D+00    0.14760D+00    0.30078D-09
+  3    0.57731D-07    0.57731D-07    0.37123D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        221 f-s =        359 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.46135D-15
+  2   -0.79499D-14   -0.16253D-18    0.79498D-14
+  3    0.56312D-12    0.20260D-16    0.56310D-12
+  4   -0.68897D-11   -0.18531D-14    0.68879D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1042 f-s =       1313 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.28418D-07
+  2    0.43047D+00    0.43047D+00    0.30748D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        615 f-s =        877 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.51456D-09
+  2    0.53170D-02    0.53170D-02    0.64010D-09
+  3    0.26276D+02    0.26276D+02    0.31999D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1508 f-s =       2015 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.89891D-10
+  2   -0.20000D+02   -0.20000D+02    0.89823D-10
+  3   -0.22485D-06   -0.22476D-06    0.90016D-10
+  4    0.22485D-06    0.22476D-06    0.89691D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         66 f-s =        136 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.32760D-08
+  2    0.13824D-09    0.13822D-09    0.18261D-13
+  3    0.82527D-11    0.82516D-11    0.11523D-14
+  4    0.12999D-09    0.12997D-09    0.17109D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1290 f-s =       2270 J-s =         50
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.28625D-06
+  2    0.12711D-04    0.12711D-04    0.13935D-12
+  3    0.12086D+04    0.12086D+04    0.28413D-06
+  4    0.32420D-03    0.32420D-03    0.13834D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        323 f-s =        419 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.28179D-09
+  2    0.13300D-02    0.13300D-02    0.95704D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        135 f-s =        228 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.32368D-12    0.32359D-12    0.90820D-16
+  2    0.23605D-06    0.23607D-06    0.19222D-10
+  3    0.76396D-13    0.76393D-13    0.26438D-17
+  4    0.76396D-06    0.76393D-06    0.26313D-10
+  5    0.32364D-05    0.32361D-05    0.37499D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       4194 f-s =       6749 J-s =        147
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.13681D-06
+  2    0.12902D+01    0.12902D+01    0.11838D-07
+  3    0.30193D+01    0.30193D+01    0.56910D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        336 f-s =        651 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.11124D-16
+  2    0.37136D-02    0.37136D-02    0.24541D-12
+  3    0.61893D-02    0.61893D-02    0.40902D-12
+  4    0.95451D-05    0.95451D-05    0.11135D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        591 f-s =        712 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33624D-09
+  2    0.20624D-08    0.20612D-08    0.12571D-11
+  3    0.92264D-53    0.28230D-55    0.91982D-53
+  4    0.81954D-50    0.52358D-51    0.76719D-50
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        699 f-s =        919 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.35667D-10
+  2    0.20000D+00    0.20000D+00    0.71330D-10
+  3    0.30000D+00    0.30000D+00    0.99751D-10
+  4    0.40000D+00    0.40000D+00    0.11805D-09
+  5    0.50000D+00    0.50000D+00    0.12436D-09
+  6    0.60000D+00    0.60000D+00    0.11805D-09
+  7    0.70000D+00    0.70000D+00    0.99751D-10
+  8    0.80000D+00    0.80000D+00    0.71329D-10
+  9    0.90000D+00    0.90000D+00    0.35666D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        787 f-s =        928 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.24111D-11
+  2    0.13685D-01    0.13685D-01    0.24319D-10
+  3    0.15037D+01    0.15037D+01    0.26790D-08
+  4    0.13534D+00    0.13534D+00    0.24724D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        999 f-s =       1284 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.54749D-09
+  2    0.10354D-10    0.12659D-13    0.10341D-10
+  3   -0.96718D-30    0.19115D-41    0.96718D-30
+  4    0.36838D-45    0.22774D-54    0.36838D-45
+  5   -0.26040D-66    0.00000D+00    0.26040D-66
+  6   -0.24200D-87    0.00000D+00    0.24200D-87
+  7   -0.55396-112    0.00000D+00    0.55396-112
+  8    0.11562-137    0.00000D+00    0.11562-137
+  9   -0.36663-165    0.00000D+00    0.36663-165
+ 10   -0.13090-187    0.00000D+00    0.13090-187
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       3303 f-s =       3833 J-s =         63
+ Computed and reference solutions and absolute errors follow:
+  1    0.98635D-09    0.10042D-08    0.17812D-10
+  2    0.15563D-07    0.18000D-07    0.24371D-08
+  3   -0.38125-228    0.00000D+00    0.38125-228
+  4    0.11116-226   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        558 f-s =        697 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.31673D-32    0.61813D-30    0.62130D-30
+  2   -0.11777D-32    0.89637D-30    0.89754D-30
+  3    0.28935D-26    0.27384D-26    0.15509D-27
+  4    0.20625D-08    0.20612D-08    0.13589D-11
+  5    0.45400D-04    0.45400D-04    0.36754D-09
+  6    0.13534D+00    0.13534D+00    0.57915D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        598 f-s =        735 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17676D-26   -0.10768D-27    0.16599D-26
+  2    0.10594D-25    0.54550D-27    0.10049D-25
+  3    0.48294D-27    0.27385D-26    0.22556D-26
+  4    0.20623D-08    0.20612D-08    0.11767D-11
+  5    0.45400D-04    0.45400D-04    0.32141D-09
+  6    0.13534D+00    0.13534D+00    0.51098D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1129 f-s =       1324 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.17084D-11    0.13312D-21    0.17084D-11
+  2    0.29903D-11   -0.23259D-21    0.29903D-11
+  3    0.12799D-34    0.15179D-34    0.23800D-35
+  4    0.20608D-08    0.20612D-08    0.30844D-12
+  5    0.45400D-04    0.45400D-04    0.19133D-09
+  6    0.13534D+00    0.13534D+00    0.16759D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       4689 f-s =       5406 J-s =         86
+ Computed and reference solutions and absolute errors follow:
+  1    0.51657D-08   -0.31006D-13    0.51657D-08
+  2   -0.43352D-09    0.38628D-13    0.43356D-09
+  3    0.18048D-34    0.18049D-34    0.49621D-39
+  4    0.20612D-08    0.20612D-08    0.52696D-16
+  5    0.45400D-04    0.45400D-04    0.35976D-13
+  6    0.13534D+00    0.13534D+00    0.38664D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        736 f-s =        886 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.25390D-09
+  2    0.40016D-03    0.40016D-03    0.27105D-18
+  3    0.40000D-03    0.40000D-03    0.54210D-18
+  4    0.20000D-01    0.20000D-01    0.17347D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        669 f-s =        804 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.79983D-09
+  2    0.40000D-01    0.40000D-01    0.35540D-10
+  3    0.40016D-01    0.40016D-01    0.32836D-10
+  4    0.40032D-01    0.40032D-01    0.32366D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        659 f-s =        791 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.34159D-09
+  2    0.40000D+00    0.40000D+00    0.15182D-09
+  3    0.41600D+00    0.41600D+00    0.15262D-09
+  4    0.43331D+00    0.43331D+00    0.16313D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        694 f-s =        826 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22898D-10
+  2    0.40000D+01    0.40000D+01    0.10177D-09
+  3    0.20000D+02    0.20000D+02    0.92899D-09
+  4    0.42000D+03    0.42000D+03    0.38450D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        703 f-s =        839 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.11017D-10
+  2    0.80000D+01    0.80000D+01    0.97931D-10
+  3    0.13600D+03    0.13600D+03    0.33046D-08
+  4    0.37128D+05    0.37128D+05    0.18191D-05
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        747 f-s =       1062 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.45975D-07
+  2    0.27111D+02    0.27111D+02    0.45746D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        726 f-s =       1019 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.31961D-09
+  2    0.91855D-01    0.91855D-01    0.12741D-09
+  3    0.28416D+02    0.28416D+02    0.31962D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        836 f-s =        997 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.48135D-10
+  2    0.56309D-02    0.56309D-02    0.93844D-13
+  3    0.36024D+00    0.36024D+00    0.48134D-10
+  4    0.31706D+00    0.31706D+00    0.24114D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        123 f-s =        189 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.12091D-08
+  2    0.14023D+01    0.14023D+01    0.12091D-08
+  3   -0.18934D-05   -0.18934D-05    0.11997D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        511 f-s =        782 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.10442D-07
+  2    0.98334D+00    0.98334D+00    0.12008D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        291 f-s =        471 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.17599D-09
+  2    0.14760D+00    0.14760D+00    0.17600D-09
+  3    0.57731D-07    0.57731D-07    0.21649D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        234 f-s =        342 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.45924D-16
+  2   -0.50459D-14   -0.16253D-18    0.50457D-14
+  3    0.59836D-13    0.20260D-16    0.59815D-13
+  4   -0.13093D-10   -0.18531D-14    0.13091D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1041 f-s =       1214 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.35081D-07
+  2    0.43047D+00    0.43047D+00    0.36829D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        671 f-s =        918 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.67982D-09
+  2    0.53170D-02    0.53170D-02    0.84541D-09
+  3    0.26276D+02    0.26276D+02    0.48339D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       1525 f-s =       1801 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.12546D-08
+  2   -0.20000D+02   -0.20000D+02    0.12561D-08
+  3   -0.22351D-06   -0.22476D-06    0.12545D-08
+  4    0.22351D-06    0.22476D-06    0.12562D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         61 f-s =         93 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.46690D-08
+  2    0.13822D-09    0.13822D-09    0.97684D-15
+  3    0.82515D-11    0.82516D-11    0.62642D-16
+  4    0.12997D-09    0.12997D-09    0.91420D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1299 f-s =       2016 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.24935D-06
+  2    0.12711D-04    0.12711D-04    0.32486D-13
+  3    0.12086D+04    0.12086D+04    0.24750D-06
+  4    0.32420D-03    0.32420D-03    0.32385D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        318 f-s =        385 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.14619D-08
+  2    0.13300D-02    0.13300D-02    0.49653D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        131 f-s =        182 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.32342D-12    0.32359D-12    0.16701D-15
+  2    0.23607D-06    0.23607D-06    0.35734D-12
+  3    0.76394D-13    0.76393D-13    0.42503D-18
+  4    0.76394D-06    0.76393D-06    0.41797D-11
+  5    0.32361D-05    0.32361D-05    0.22604D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       3984 f-s =       5659 J-s =         78
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.26443D-06
+  2    0.12902D+01    0.12902D+01    0.22858D-07
+  3    0.30193D+01    0.30193D+01    0.10225D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            10  follow.
+  Results for ITOL =            10  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-09
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        374 f-s =        631 J-s =         10
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.16876D-15
+  2    0.37136D-02    0.37136D-02    0.37228D-11
+  3    0.61893D-02    0.61893D-02    0.62047D-11
+  4    0.95451D-05    0.95451D-05    0.16874D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1012 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33879D-10
+  2    0.20613D-08    0.20612D-08    0.11426D-12
+  3   -0.18992D-65    0.28230D-55    0.28230D-55
+  4   -0.62485D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        965 f-s =       1270 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.95203D-11
+  2    0.20000D+00    0.20000D+00    0.19039D-10
+  3    0.30000D+00    0.30000D+00    0.26626D-10
+  4    0.40000D+00    0.40000D+00    0.31509D-10
+  5    0.50000D+00    0.50000D+00    0.33194D-10
+  6    0.60000D+00    0.60000D+00    0.31509D-10
+  7    0.70000D+00    0.70000D+00    0.26626D-10
+  8    0.80000D+00    0.80000D+00    0.19039D-10
+  9    0.90000D+00    0.90000D+00    0.95203D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1112 f-s =       1271 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.84815D-12
+  2    0.13685D-01    0.13685D-01    0.85572D-11
+  3    0.15037D+01    0.15037D+01    0.94239D-09
+  4    0.13534D+00    0.13534D+00    0.86738D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24335D-11    0.12659D-13    0.24208D-11
+  3    0.12345D-37    0.19115D-41    0.12343D-37
+  4    0.29523D-57    0.22774D-54    0.22745D-54
+  5    0.62684D-84    0.00000D+00    0.62684D-84
+  6   -0.11731-113    0.00000D+00    0.11731-113
+  7    0.11346-145    0.00000D+00    0.11346-145
+  8    0.19356-182    0.00000D+00    0.19356-182
+  9    0.19884-214    0.00000D+00    0.19884-214
+ 10   -0.11014-247    0.00000D+00    0.11014-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4822 f-s =       5515 J-s =         88
+ Computed and reference solutions and absolute errors follow:
+  1    0.99105D-09    0.10042D-08    0.13118D-10
+  2    0.17619D-07    0.18000D-07    0.38074D-09
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.11716-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89026D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1005 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23098D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84673D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1404 f-s =       1635 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13668D-10    0.13312D-21    0.13668D-10
+  2    0.52820D-10   -0.23259D-21    0.52820D-10
+  3   -0.49376D-33    0.15179D-34    0.50894D-33
+  4    0.20612D-08    0.20612D-08    0.61063D-13
+  5    0.45400D-04    0.45400D-04    0.18400D-10
+  6    0.13534D+00    0.13534D+00    0.34384D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       6016 f-s =       6869 J-s =        107
+ Computed and reference solutions and absolute errors follow:
+  1    0.25305D-10   -0.31006D-13    0.25336D-10
+  2    0.13852D-11    0.38628D-13    0.13466D-11
+  3    0.18048D-34    0.18049D-34    0.44713D-39
+  4    0.20612D-08    0.20612D-08    0.47568D-16
+  5    0.45400D-04    0.45400D-04    0.32466D-13
+  6    0.13534D+00    0.13534D+00    0.21427D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1072 f-s =       1231 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.61056D-11
+  2    0.40016D-03    0.40016D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        947 f-s =       1104 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18911D-10
+  2    0.40000D-01    0.40000D-01    0.84050D-12
+  3    0.40016D-01    0.40016D-01    0.77655D-12
+  4    0.40032D-01    0.40032D-01    0.76537D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        931 f-s =       1077 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.69813D-11
+  2    0.40000D+00    0.40000D+00    0.31030D-11
+  3    0.41600D+00    0.41600D+00    0.31189D-11
+  4    0.43331D+00    0.43331D+00    0.33339D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        993 f-s =       1144 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18272D-11
+  2    0.40000D+01    0.40000D+01    0.81228D-11
+  3    0.20000D+02    0.20000D+02    0.74142D-10
+  4    0.42000D+03    0.42000D+03    0.30688D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1023 f-s =       1189 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.27527D-11
+  2    0.80000D+01    0.80000D+01    0.24471D-10
+  3    0.13600D+03    0.13600D+03    0.82582D-09
+  4    0.37128D+05    0.37128D+05    0.45457D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        903 f-s =       1203 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.84356D-08
+  2    0.27111D+02    0.27111D+02    0.85188D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        930 f-s =       1234 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.49509D-10
+  2    0.91855D-01    0.91855D-01    0.19533D-10
+  3    0.28416D+02    0.28416D+02    0.49510D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1163 f-s =       1370 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18862D-10
+  2    0.56309D-02    0.56309D-02    0.36774D-13
+  3    0.36024D+00    0.36024D+00    0.18858D-10
+  4    0.31706D+00    0.31706D+00    0.94483D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        182 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.10899D-09
+  2    0.14023D+01    0.14023D+01    0.10899D-09
+  3   -0.18934D-05   -0.18934D-05    0.42517D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        653 f-s =        944 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.14916D-08
+  2    0.98334D+00    0.98334D+00    0.16604D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        334 f-s =        484 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.27951D-10
+  2    0.14760D+00    0.14760D+00    0.27952D-10
+  3    0.57731D-07    0.57731D-07    0.34369D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        390 f-s =        527 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.73232D-17
+  2   -0.33669D-16   -0.16253D-18    0.33506D-16
+  3   -0.13478D-12    0.20260D-16    0.13480D-12
+  4   -0.22915D-10   -0.18531D-14    0.22913D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1504 f-s =       1727 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.53134D-08
+  2    0.43047D+00    0.43047D+00    0.56664D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        841 f-s =       1080 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.50737D-10
+  2    0.53170D-02    0.53170D-02    0.63119D-10
+  3    0.26276D+02    0.26276D+02    0.44747D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       2182 f-s =       2483 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.94680D-11
+  2   -0.20000D+02   -0.20000D+02    0.94538D-11
+  3   -0.22477D-06   -0.22476D-06    0.94527D-11
+  4    0.22477D-06    0.22476D-06    0.94650D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         85 f-s =        127 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.82755D-09
+  2    0.13822D-09    0.13822D-09    0.10294D-15
+  3    0.82516D-11    0.82516D-11    0.56397D-17
+  4    0.12997D-09    0.12997D-09    0.10858D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1881 f-s =       2767 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.41034D-07
+  2    0.12711D-04    0.12711D-04    0.53360D-14
+  3    0.12086D+04    0.12086D+04    0.40730D-07
+  4    0.32420D-03    0.32420D-03    0.53195D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        445 f-s =        533 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.16732D-09
+  2    0.13300D-02    0.13300D-02    0.56834D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        144 f-s =        201 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.21910D-12    0.32359D-12    0.10450D-12
+  2    0.23606D-06    0.23607D-06    0.45997D-11
+  3    0.76399D-13    0.76393D-13    0.59835D-17
+  4    0.76392D-06    0.76393D-06    0.10776D-10
+  5    0.32361D-05    0.32361D-05    0.17536D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       5666 f-s =       7821 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.28879D-07
+  2    0.12902D+01    0.12902D+01    0.25059D-08
+  3    0.30193D+01    0.30193D+01    0.11387D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        429 f-s =        678 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.66978D-16
+  2    0.37136D-02    0.37136D-02    0.14776D-11
+  3    0.61893D-02    0.61893D-02    0.24626D-11
+  4    0.95451D-05    0.95451D-05    0.66982D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1128 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33879D-10
+  2    0.20613D-08    0.20612D-08    0.11426D-12
+  3   -0.18973D-65    0.28230D-55    0.28230D-55
+  4   -0.62350D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        987 f-s =       1640 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.93099D-11
+  2    0.20000D+00    0.20000D+00    0.18619D-10
+  3    0.30000D+00    0.30000D+00    0.26037D-10
+  4    0.40000D+00    0.40000D+00    0.30813D-10
+  5    0.50000D+00    0.50000D+00    0.32460D-10
+  6    0.60000D+00    0.60000D+00    0.30813D-10
+  7    0.70000D+00    0.70000D+00    0.26037D-10
+  8    0.80000D+00    0.80000D+00    0.18619D-10
+  9    0.90000D+00    0.90000D+00    0.93098D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1112 f-s =       1451 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.84928D-12
+  2    0.13685D-01    0.13685D-01    0.85686D-11
+  3    0.15037D+01    0.15037D+01    0.94365D-09
+  4    0.13534D+00    0.13534D+00    0.86854D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       2395 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27666D-09
+  2    0.24327D-11    0.12659D-13    0.24201D-11
+  3    0.12340D-37    0.19115D-41    0.12338D-37
+  4    0.29491D-57    0.22774D-54    0.22745D-54
+  5    0.62581D-84    0.00000D+00    0.62581D-84
+  6   -0.11707-113    0.00000D+00    0.11707-113
+  7    0.11343-145    0.00000D+00    0.11343-145
+  8    0.21349-182    0.00000D+00    0.21349-182
+  9    0.19806-214    0.00000D+00    0.19806-214
+ 10   -0.10979-247    0.00000D+00    0.10979-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4792 f-s =       6182 J-s =        130
+ Computed and reference solutions and absolute errors follow:
+  1    0.99104D-09    0.10042D-08    0.13125D-10
+  2    0.17619D-07    0.18000D-07    0.38080D-09
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.00000D+00   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =       1136 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90068D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89031D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1203 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24509D-36   -0.10768D-27    0.10768D-27
+  2   -0.23094D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84665D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1404 f-s =       1953 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13667D-10    0.13312D-21    0.13667D-10
+  2    0.52821D-10   -0.23259D-21    0.52821D-10
+  3   -0.49376D-33    0.15179D-34    0.50894D-33
+  4    0.20612D-08    0.20612D-08    0.61063D-13
+  5    0.45400D-04    0.45400D-04    0.18400D-10
+  6    0.13534D+00    0.13534D+00    0.34371D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       6014 f-s =       8107 J-s =        157
+ Computed and reference solutions and absolute errors follow:
+  1    0.34430D-10   -0.31006D-13    0.34461D-10
+  2    0.14632D-10    0.38628D-13    0.14593D-10
+  3    0.18048D-34    0.18049D-34    0.44981D-39
+  4    0.20612D-08    0.20612D-08    0.47848D-16
+  5    0.45400D-04    0.45400D-04    0.32657D-13
+  6    0.13534D+00    0.13534D+00    0.21400D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1072 f-s =       1388 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.61009D-11
+  2    0.40016D-03    0.40016D-03    0.00000D+00
+  3    0.40000D-03    0.40000D-03    0.00000D+00
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        947 f-s =       1245 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18915D-10
+  2    0.40000D-01    0.40000D-01    0.84066D-12
+  3    0.40016D-01    0.40016D-01    0.77671D-12
+  4    0.40032D-01    0.40032D-01    0.76554D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        931 f-s =       1214 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.69285D-11
+  2    0.40000D+00    0.40000D+00    0.30794D-11
+  3    0.41600D+00    0.41600D+00    0.30952D-11
+  4    0.43331D+00    0.43331D+00    0.33085D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        993 f-s =       1301 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.16869D-11
+  2    0.40000D+01    0.40000D+01    0.74989D-11
+  3    0.20000D+02    0.20000D+02    0.68443D-10
+  4    0.42000D+03    0.42000D+03    0.28331D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1024 f-s =       1315 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.27398D-11
+  2    0.80000D+01    0.80000D+01    0.24360D-10
+  3    0.13600D+03    0.13600D+03    0.82201D-09
+  4    0.37128D+05    0.37128D+05    0.45246D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        887 f-s =       1253 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.11165D-07
+  2    0.27111D+02    0.27111D+02    0.11150D-07
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        947 f-s =       1419 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.39866D-10
+  2    0.91855D-01    0.91855D-01    0.14378D-10
+  3    0.28416D+02    0.28416D+02    0.39867D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1147 f-s =       1544 J-s =         37
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.19429D-10
+  2    0.56309D-02    0.56309D-02    0.37894D-13
+  3    0.36024D+00    0.36024D+00    0.19432D-10
+  4    0.31706D+00    0.31706D+00    0.97339D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        176 f-s =        310 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.18284D-09
+  2    0.14023D+01    0.14023D+01    0.18284D-09
+  3   -0.18934D-05   -0.18934D-05    0.85269D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        643 f-s =        983 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.13512D-08
+  2    0.98334D+00    0.98334D+00    0.15352D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        355 f-s =        602 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.41518D-10
+  2    0.14760D+00    0.14760D+00    0.41518D-10
+  3    0.57731D-07    0.57731D-07    0.51057D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        363 f-s =        597 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.14383D-17
+  2   -0.40927D-16   -0.16253D-18    0.40764D-16
+  3    0.70832D-14    0.20260D-16    0.70630D-14
+  4   -0.27359D-12   -0.18531D-14    0.27174D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1525 f-s =       1881 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.51991D-08
+  2    0.43047D+00    0.43047D+00    0.55395D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        800 f-s =       1059 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.71342D-10
+  2    0.53170D-02    0.53170D-02    0.88878D-10
+  3    0.26276D+02    0.26276D+02    0.43679D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       2179 f-s =       2813 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.76380D-10
+  2   -0.20000D+02   -0.20000D+02    0.73108D-10
+  3   -0.22469D-06   -0.22476D-06    0.75404D-10
+  4    0.22469D-06    0.22476D-06    0.74071D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         86 f-s =        172 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.91000D-09
+  2    0.13822D-09    0.13822D-09    0.10766D-15
+  3    0.82516D-11    0.82516D-11    0.25663D-17
+  4    0.12997D-09    0.12997D-09    0.11025D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1673 f-s =       2706 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.34577D-07
+  2    0.12711D-04    0.12711D-04    0.45017D-14
+  3    0.12086D+04    0.12086D+04    0.34322D-07
+  4    0.32420D-03    0.32420D-03    0.44878D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        442 f-s =        569 J-s =         15
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.20958D-09
+  2    0.13300D-02    0.13300D-02    0.71186D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        155 f-s =        259 J-s =          6
+ Computed and reference solutions and absolute errors follow:
+  1    0.32168D-12    0.32359D-12    0.19109D-14
+  2    0.23607D-06    0.23607D-06    0.17975D-11
+  3    0.76393D-13    0.76393D-13    0.20232D-18
+  4    0.76394D-06    0.76393D-06    0.62854D-11
+  5    0.32361D-05    0.32361D-05    0.20636D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       5627 f-s =       8589 J-s =        193
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.76714D-08
+  2    0.12902D+01    0.12902D+01    0.65745D-09
+  3    0.30193D+01    0.30193D+01    0.35015D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        457 f-s =        876 J-s =         18
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.47288D-16
+  2    0.37136D-02    0.37136D-02    0.10432D-11
+  3    0.61893D-02    0.61893D-02    0.17387D-11
+  4    0.95451D-05    0.95451D-05    0.47286D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        868 f-s =       1012 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.33879D-10
+  2    0.20613D-08    0.20612D-08    0.11426D-12
+  3   -0.18992D-65    0.28230D-55    0.28230D-55
+  4   -0.62485D-64    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        965 f-s =       1270 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.95203D-11
+  2    0.20000D+00    0.20000D+00    0.19039D-10
+  3    0.30000D+00    0.30000D+00    0.26626D-10
+  4    0.40000D+00    0.40000D+00    0.31509D-10
+  5    0.50000D+00    0.50000D+00    0.33194D-10
+  6    0.60000D+00    0.60000D+00    0.31509D-10
+  7    0.70000D+00    0.70000D+00    0.26626D-10
+  8    0.80000D+00    0.80000D+00    0.19039D-10
+  9    0.90000D+00    0.90000D+00    0.95203D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1112 f-s =       1271 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.84815D-12
+  2    0.13685D-01    0.13685D-01    0.85572D-11
+  3    0.15037D+01    0.15037D+01    0.94239D-09
+  4    0.13534D+00    0.13534D+00    0.86738D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1447 f-s =       1825 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.27668D-09
+  2    0.24335D-11    0.12659D-13    0.24208D-11
+  3    0.12345D-37    0.19115D-41    0.12343D-37
+  4    0.29523D-57    0.22774D-54    0.22745D-54
+  5    0.62684D-84    0.00000D+00    0.62684D-84
+  6   -0.11731-113    0.00000D+00    0.11731-113
+  7    0.11346-145    0.00000D+00    0.11346-145
+  8    0.19356-182    0.00000D+00    0.19356-182
+  9    0.19884-214    0.00000D+00    0.19884-214
+ 10   -0.11014-247    0.00000D+00    0.11014-247
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       4822 f-s =       5515 J-s =         88
+ Computed and reference solutions and absolute errors follow:
+  1    0.99105D-09    0.10042D-08    0.13118D-10
+  2    0.17619D-07    0.18000D-07    0.38074D-09
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4    0.11716-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        789 f-s =        950 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.36739D-43    0.61813D-30    0.61813D-30
+  2   -0.90070D-44    0.89637D-30    0.89637D-30
+  3   -0.23309D-31    0.27384D-26    0.27384D-26
+  4    0.20613D-08    0.20612D-08    0.18168D-12
+  5    0.45400D-04    0.45400D-04    0.52756D-10
+  6    0.13534D+00    0.13534D+00    0.89026D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        846 f-s =       1005 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1   -0.24510D-36   -0.10768D-27    0.10768D-27
+  2   -0.23098D-36    0.54550D-27    0.54550D-27
+  3    0.11218D-31    0.27385D-26    0.27385D-26
+  4    0.20613D-08    0.20612D-08    0.17291D-12
+  5    0.45400D-04    0.45400D-04    0.50269D-10
+  6    0.13534D+00    0.13534D+00    0.84673D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1404 f-s =       1635 J-s =         29
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13668D-10    0.13312D-21    0.13668D-10
+  2    0.52820D-10   -0.23259D-21    0.52820D-10
+  3   -0.49376D-33    0.15179D-34    0.50894D-33
+  4    0.20612D-08    0.20612D-08    0.61063D-13
+  5    0.45400D-04    0.45400D-04    0.18400D-10
+  6    0.13534D+00    0.13534D+00    0.34384D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       6016 f-s =       6869 J-s =        107
+ Computed and reference solutions and absolute errors follow:
+  1    0.25305D-10   -0.31006D-13    0.25336D-10
+  2    0.13852D-11    0.38628D-13    0.13466D-11
+  3    0.18048D-34    0.18049D-34    0.44713D-39
+  4    0.20612D-08    0.20612D-08    0.47568D-16
+  5    0.45400D-04    0.45400D-04    0.32466D-13
+  6    0.13534D+00    0.13534D+00    0.21427D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1072 f-s =       1231 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.61056D-11
+  2    0.40016D-03    0.40016D-03    0.54210D-19
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        947 f-s =       1104 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18911D-10
+  2    0.40000D-01    0.40000D-01    0.84050D-12
+  3    0.40016D-01    0.40016D-01    0.77655D-12
+  4    0.40032D-01    0.40032D-01    0.76537D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        931 f-s =       1077 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.69813D-11
+  2    0.40000D+00    0.40000D+00    0.31030D-11
+  3    0.41600D+00    0.41600D+00    0.31189D-11
+  4    0.43331D+00    0.43331D+00    0.33339D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =        993 f-s =       1144 J-s =         23
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.18272D-11
+  2    0.40000D+01    0.40000D+01    0.81228D-11
+  3    0.20000D+02    0.20000D+02    0.74142D-10
+  4    0.42000D+03    0.42000D+03    0.30688D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1023 f-s =       1189 J-s =         25
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.27527D-11
+  2    0.80000D+01    0.80000D+01    0.24471D-10
+  3    0.13600D+03    0.13600D+03    0.82582D-09
+  4    0.37128D+05    0.37128D+05    0.45457D-06
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        903 f-s =       1203 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.84356D-08
+  2    0.27111D+02    0.27111D+02    0.85188D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        930 f-s =       1234 J-s =         19
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.49509D-10
+  2    0.91855D-01    0.91855D-01    0.19533D-10
+  3    0.28416D+02    0.28416D+02    0.49510D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1163 f-s =       1370 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.18862D-10
+  2    0.56309D-02    0.56309D-02    0.36774D-13
+  3    0.36024D+00    0.36024D+00    0.18858D-10
+  4    0.31706D+00    0.31706D+00    0.94483D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        182 f-s =        337 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.10899D-09
+  2    0.14023D+01    0.14023D+01    0.10899D-09
+  3   -0.18934D-05   -0.18934D-05    0.42517D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        653 f-s =        944 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.14916D-08
+  2    0.98334D+00    0.98334D+00    0.16604D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        334 f-s =        484 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.27951D-10
+  2    0.14760D+00    0.14760D+00    0.27952D-10
+  3    0.57731D-07    0.57731D-07    0.34369D-17
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        390 f-s =        527 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.73232D-17
+  2   -0.33669D-16   -0.16253D-18    0.33506D-16
+  3   -0.13478D-12    0.20260D-16    0.13480D-12
+  4   -0.22915D-10   -0.18531D-14    0.22913D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       1504 f-s =       1727 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.53134D-08
+  2    0.43047D+00    0.43047D+00    0.56664D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        841 f-s =       1080 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.50737D-10
+  2    0.53170D-02    0.53170D-02    0.63119D-10
+  3    0.26276D+02    0.26276D+02    0.44747D-08
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       2182 f-s =       2483 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.94680D-11
+  2   -0.20000D+02   -0.20000D+02    0.94538D-11
+  3   -0.22477D-06   -0.22476D-06    0.94527D-11
+  4    0.22477D-06    0.22476D-06    0.94650D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =         85 f-s =        127 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.82755D-09
+  2    0.13822D-09    0.13822D-09    0.10294D-15
+  3    0.82516D-11    0.82516D-11    0.56397D-17
+  4    0.12997D-09    0.12997D-09    0.10858D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       1881 f-s =       2767 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.41034D-07
+  2    0.12711D-04    0.12711D-04    0.53360D-14
+  3    0.12086D+04    0.12086D+04    0.40730D-07
+  4    0.32420D-03    0.32420D-03    0.53195D-14
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        445 f-s =        533 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.16732D-09
+  2    0.13300D-02    0.13300D-02    0.56834D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        144 f-s =        201 J-s =          3
+ Computed and reference solutions and absolute errors follow:
+  1    0.21910D-12    0.32359D-12    0.10450D-12
+  2    0.23606D-06    0.23607D-06    0.45997D-11
+  3    0.76399D-13    0.76393D-13    0.59835D-17
+  4    0.76392D-06    0.76393D-06    0.10776D-10
+  5    0.32361D-05    0.32361D-05    0.17536D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       5666 f-s =       7821 J-s =        104
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.28879D-07
+  2    0.12902D+01    0.12902D+01    0.25059D-08
+  3    0.30193D+01    0.30193D+01    0.11387D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            11  follow.
+  Results for ITOL =            11  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-10
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        429 f-s =        678 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.66978D-16
+  2    0.37136D-02    0.37136D-02    0.14776D-11
+  3    0.61893D-02    0.61893D-02    0.24626D-11
+  4    0.95451D-05    0.95451D-05    0.66982D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46255D-83    0.28230D-55    0.28230D-55
+  4   -0.54052D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1410 f-s =       1771 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.15778D-11
+  2    0.20000D+00    0.20000D+00    0.31554D-11
+  3    0.30000D+00    0.30000D+00    0.44129D-11
+  4    0.40000D+00    0.40000D+00    0.52221D-11
+  5    0.50000D+00    0.50000D+00    0.55014D-11
+  6    0.60000D+00    0.60000D+00    0.52222D-11
+  7    0.70000D+00    0.70000D+00    0.44128D-11
+  8    0.80000D+00    0.80000D+00    0.31556D-11
+  9    0.90000D+00    0.90000D+00    0.15780D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        290
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1659 f-s =       1884 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.43045D-13
+  2    0.13685D-01    0.13685D-01    0.43450D-12
+  3    0.15037D+01    0.15037D+01    0.47828D-10
+  4    0.13534D+00    0.13534D+00    0.43825D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20549D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13241D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88157-109    0.00000D+00    0.88157-109
+  6   -0.91772-148    0.00000D+00    0.91772-148
+  7   -0.28131-190    0.00000D+00    0.28131-190
+  8    0.74089-237    0.00000D+00    0.74089-237
+  9   -0.38758-283    0.00000D+00    0.38758-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        340
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6934 f-s =       7861 J-s =        124
+ Computed and reference solutions and absolute errors follow:
+  1    0.10008D-08    0.10042D-08    0.33650D-11
+  2    0.17942D-07    0.18000D-07    0.58109D-10
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.68963-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32339D-55    0.61813D-30    0.61813D-30
+  2    0.69701D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82189D-11
+  6    0.13534D+00    0.13534D+00    0.15064D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73959D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14458D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2020 f-s =       2315 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1    0.23656D-21    0.13312D-21    0.10344D-21
+  2    0.42183D-20   -0.23259D-21    0.44509D-20
+  3    0.19920D-34    0.15179D-34    0.47419D-35
+  4    0.20612D-08    0.20612D-08    0.18479D-13
+  5    0.45400D-04    0.45400D-04    0.54995D-11
+  6    0.13534D+00    0.13534D+00    0.12144D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7702 f-s =       8751 J-s =        136
+ Computed and reference solutions and absolute errors follow:
+  1   -0.39985D-11   -0.31006D-13    0.39675D-11
+  2    0.66998D-11    0.38628D-13    0.66611D-11
+  3    0.18048D-34    0.18049D-34    0.38599D-39
+  4    0.20612D-08    0.20612D-08    0.41328D-16
+  5    0.45400D-04    0.45400D-04    0.28238D-13
+  6    0.13534D+00    0.13534D+00    0.21844D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        164
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1548 f-s =       1749 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.95569D-12
+  2    0.40016D-03    0.40016D-03    0.00000D+00
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1399 f-s =       1592 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.43643D-11
+  2    0.40000D-01    0.40000D-01    0.19399D-12
+  3    0.40016D-01    0.40016D-01    0.17924D-12
+  4    0.40032D-01    0.40032D-01    0.17666D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1385 f-s =       1573 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22922D-11
+  2    0.40000D+00    0.40000D+00    0.10189D-11
+  3    0.41600D+00    0.41600D+00    0.10240D-11
+  4    0.43331D+00    0.43331D+00    0.10948D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1438 f-s =       1626 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.24492D-12
+  2    0.40000D+01    0.40000D+01    0.10902D-11
+  3    0.20000D+02    0.20000D+02    0.99512D-11
+  4    0.42000D+03    0.42000D+03    0.41189D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1472 f-s =       1669 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.38991D-12
+  2    0.80000D+01    0.80000D+01    0.34701D-11
+  3    0.13600D+03    0.13600D+03    0.11713D-09
+  4    0.37128D+05    0.37128D+05    0.64443D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1129 f-s =       1372 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.21392D-08
+  2    0.27111D+02    0.27111D+02    0.21066D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1137 f-s =       1382 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.58165D-12
+  2    0.91855D-01    0.91855D-01    0.36550D-12
+  3    0.28416D+02    0.28416D+02    0.58204D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1657 f-s =       1900 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.13811D-12
+  2    0.56309D-02    0.56309D-02    0.26194D-15
+  3    0.36024D+00    0.36024D+00    0.13961D-12
+  4    0.31706D+00    0.31706D+00    0.71276D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        259 f-s =        434 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.26102D-10
+  2    0.14023D+01    0.14023D+01    0.26099D-10
+  3   -0.18934D-05   -0.18934D-05    0.10627D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =       1045 f-s =       1500 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.99028D-10
+  2    0.98334D+00    0.98334D+00    0.11166D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        451 f-s =        628 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.43796D-11
+  2    0.14760D+00    0.14760D+00    0.43804D-11
+  3    0.57731D-07    0.57731D-07    0.53875D-18
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        418 f-s =        559 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.29205D-16
+  2   -0.39393D-15   -0.16253D-18    0.39376D-15
+  3   -0.52729D-14    0.20260D-16    0.52931D-14
+  4    0.50848D-13   -0.18531D-14    0.52701D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       2195 f-s =       2491 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.78175D-09
+  2    0.43047D+00    0.43047D+00    0.83014D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         52
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =       1134 f-s =       1314 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.88912D-11
+  2    0.53170D-02    0.53170D-02    0.11095D-10
+  3    0.26276D+02    0.26276D+02    0.30349D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         74
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       3190 f-s =       3644 J-s =         61
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.55245D-11
+  2   -0.20000D+02   -0.20000D+02    0.55103D-11
+  3   -0.22476D-06   -0.22476D-06    0.55176D-11
+  4    0.22476D-06    0.22476D-06    0.55211D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        105 f-s =        151 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.25207D-09
+  2    0.13822D-09    0.13822D-09    0.33118D-16
+  3    0.82516D-11    0.82516D-11    0.97533D-18
+  4    0.12997D-09    0.12997D-09    0.32142D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        100
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       2298 f-s =       3270 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.42260D-08
+  2    0.12711D-04    0.12711D-04    0.54923D-15
+  3    0.12086D+04    0.12086D+04    0.41946D-08
+  4    0.32420D-03    0.32420D-03    0.54758D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        656 f-s =        775 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.23898D-10
+  2    0.13300D-02    0.13300D-02    0.81175D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         56
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        212 f-s =        298 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.32362D-12    0.32359D-12    0.24242D-16
+  2    0.23607D-06    0.23607D-06    0.27954D-13
+  3    0.76393D-13    0.76393D-13    0.48488D-19
+  4    0.76393D-06    0.76393D-06    0.41758D-13
+  5    0.32361D-05    0.32361D-05    0.20679D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        140
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       7815 f-s =      10298 J-s =        141
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.21857D-08
+  2    0.12902D+01    0.12902D+01    0.18836D-09
+  3    0.30193D+01    0.30193D+01    0.91865D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         80
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for dense Jacobian option follow.
+  Results for dense Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        544 f-s =        859 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.31128D-19
+  2    0.37136D-02    0.37136D-02    0.68782D-15
+  3    0.61893D-02    0.61893D-02    0.11449D-14
+  4    0.95451D-05    0.95451D-05    0.35575D-19
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        108
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1593 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46242D-83    0.28230D-55    0.28230D-55
+  4   -0.54030D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1405 f-s =       2247 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.18770D-11
+  2    0.20000D+00    0.20000D+00    0.37538D-11
+  3    0.30000D+00    0.30000D+00    0.52496D-11
+  4    0.40000D+00    0.40000D+00    0.62124D-11
+  5    0.50000D+00    0.50000D+00    0.65446D-11
+  6    0.60000D+00    0.60000D+00    0.62125D-11
+  7    0.70000D+00    0.70000D+00    0.52496D-11
+  8    0.80000D+00    0.80000D+00    0.37538D-11
+  9    0.90000D+00    0.90000D+00    0.18771D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        380
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        762
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1660 f-s =       2148 J-s =         48
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.48312D-13
+  2    0.13685D-01    0.13685D-01    0.48766D-12
+  3    0.15037D+01    0.15037D+01    0.53681D-10
+  4    0.13534D+00    0.13534D+00    0.49193D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       3321 J-s =         58
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20558D-10
+  2    0.17335D-13    0.12659D-13    0.46762D-14
+  3    0.13322D-46    0.19115D-41    0.19115D-41
+  4   -0.20278D-75    0.22774D-54    0.22774D-54
+  5    0.89617-109    0.00000D+00    0.89617-109
+  6   -0.93169-148    0.00000D+00    0.93169-148
+  7   -0.28591-190    0.00000D+00    0.28591-190
+  8    0.75476-237    0.00000D+00    0.75476-237
+  9   -0.39278-283    0.00000D+00    0.39278-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        450
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        913
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6804 f-s =       8688 J-s =        180
+ Computed and reference solutions and absolute errors follow:
+  1    0.10008D-08    0.10042D-08    0.33650D-11
+  2    0.17942D-07    0.18000D-07    0.58109D-10
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.32836-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1556 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32350D-55    0.61813D-30    0.61813D-30
+  2    0.72321D-56    0.89637D-30    0.89637D-30
+  3    0.19968D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27425D-13
+  5    0.45400D-04    0.45400D-04    0.82192D-11
+  6    0.13534D+00    0.13534D+00    0.15079D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1733 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73972D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14476D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2020 f-s =       2747 J-s =         56
+ Computed and reference solutions and absolute errors follow:
+  1    0.23655D-21    0.13312D-21    0.10343D-21
+  2    0.42183D-20   -0.23259D-21    0.44509D-20
+  3    0.19920D-34    0.15179D-34    0.47419D-35
+  4    0.20612D-08    0.20612D-08    0.18479D-13
+  5    0.45400D-04    0.45400D-04    0.54995D-11
+  6    0.13534D+00    0.13534D+00    0.12136D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7706 f-s =      10399 J-s =        205
+ Computed and reference solutions and absolute errors follow:
+  1    0.20253D-11   -0.31006D-13    0.20563D-11
+  2    0.27197D-11    0.38628D-13    0.26811D-11
+  3    0.18048D-34    0.18049D-34    0.38107D-39
+  4    0.20612D-08    0.20612D-08    0.40812D-16
+  5    0.45400D-04    0.45400D-04    0.27890D-13
+  6    0.13534D+00    0.13534D+00    0.22510D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        206
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        393
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1548 f-s =       1990 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.95546D-12
+  2    0.40016D-03    0.40016D-03    0.10842D-18
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1399 f-s =       1782 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.43787D-11
+  2    0.40000D-01    0.40000D-01    0.19462D-12
+  3    0.40016D-01    0.40016D-01    0.17984D-12
+  4    0.40032D-01    0.40032D-01    0.17723D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1385 f-s =       1766 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22640D-11
+  2    0.40000D+00    0.40000D+00    0.10063D-11
+  3    0.41600D+00    0.41600D+00    0.10112D-11
+  4    0.43331D+00    0.43331D+00    0.10810D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1438 f-s =       1849 J-s =         43
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.25713D-12
+  2    0.40000D+01    0.40000D+01    0.11453D-11
+  3    0.20000D+02    0.20000D+02    0.10441D-10
+  4    0.42000D+03    0.42000D+03    0.43229D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1475 f-s =       1898 J-s =         44
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.40723D-12
+  2    0.80000D+01    0.80000D+01    0.36220D-11
+  3    0.13600D+03    0.13600D+03    0.12224D-09
+  4    0.37128D+05    0.37128D+05    0.67274D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1119 f-s =       1485 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.18072D-08
+  2    0.27111D+02    0.27111D+02    0.18082D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1160 f-s =       1558 J-s =         39
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.24425D-13
+  2    0.91855D-01    0.91855D-01    0.78271D-14
+  3    0.28416D+02    0.28416D+02    0.24372D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1652 f-s =       2167 J-s =         52
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.13697D-11
+  2    0.56309D-02    0.56309D-02    0.26723D-14
+  3    0.36024D+00    0.36024D+00    0.13688D-11
+  4    0.31706D+00    0.31706D+00    0.68556D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        247 f-s =        455 J-s =         11
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.52328D-10
+  2    0.14023D+01    0.14023D+01    0.52328D-10
+  3   -0.18934D-05   -0.18934D-05    0.19997D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =        937 f-s =       1445 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.16560D-09
+  2    0.98334D+00    0.98334D+00    0.18949D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        445 f-s =        686 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.63386D-11
+  2    0.14760D+00    0.14760D+00    0.63392D-11
+  3    0.57731D-07    0.57731D-07    0.77965D-18
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        447 f-s =        674 J-s =         16
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.24123D-15
+  2    0.57112D-14   -0.16253D-18    0.57114D-14
+  3   -0.40630D-13    0.20260D-16    0.40650D-13
+  4   -0.56849D-11   -0.18531D-14    0.56831D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       2175 f-s =       2628 J-s =         62
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.68130D-09
+  2    0.43047D+00    0.43047D+00    0.73155D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         97
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =       1090 f-s =       1402 J-s =         35
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.35989D-11
+  2    0.53170D-02    0.53170D-02    0.44812D-11
+  3    0.26276D+02    0.26276D+02    0.27266D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         86
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        150
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       3130 f-s =       4013 J-s =         89
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.10516D-11
+  2   -0.20000D+02   -0.20000D+02    0.10481D-11
+  3   -0.22476D-06   -0.22476D-06    0.10259D-11
+  4    0.22476D-06    0.22476D-06    0.10748D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        103 f-s =        191 J-s =          7
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.23257D-09
+  2    0.13822D-09    0.13822D-09    0.13127D-16
+  3    0.82516D-11    0.82516D-11    0.22289D-18
+  4    0.12997D-09    0.12997D-09    0.13349D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        120
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        217
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       2396 f-s =       3820 J-s =         83
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.53990D-08
+  2    0.12711D-04    0.12711D-04    0.70187D-15
+  3    0.12086D+04    0.12086D+04    0.53597D-08
+  4    0.32420D-03    0.32420D-03    0.69969D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        649 f-s =        812 J-s =         21
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.13130D-10
+  2    0.13300D-02    0.13300D-02    0.44599D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         99
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        197 f-s =        325 J-s =          8
+ Computed and reference solutions and absolute errors follow:
+  1    0.23780D-12    0.32359D-12    0.85794D-13
+  2    0.23607D-06    0.23607D-06    0.18460D-12
+  3    0.76373D-13    0.76393D-13    0.20189D-16
+  4    0.76393D-06    0.76393D-06    0.47308D-12
+  5    0.32361D-05    0.32361D-05    0.44082D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        170
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        303
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       7617 f-s =      11111 J-s =        242
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.18689D-08
+  2    0.12902D+01    0.12902D+01    0.16076D-09
+  3    0.30193D+01    0.30193D+01    0.80423D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        153
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for sparse Jacobian option follow.
+  Results for sparse Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        571 f-s =       1046 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.31132D-16
+  2    0.37136D-02    0.37136D-02    0.68679D-12
+  3    0.61893D-02    0.61893D-02    0.11446D-11
+  4    0.95451D-05    0.95451D-05    0.31132D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        128
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =        221
+ ____________________________________________________________
+ Class/Problem = A1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   1
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1239 f-s =       1417 J-s =         28
+ Computed and reference solutions and absolute errors follow:
+  1    0.45400D-04    0.45400D-04    0.68578D-11
+  2    0.20612D-08    0.20612D-08    0.22718D-13
+  3    0.46255D-83    0.28230D-55    0.28230D-55
+  4   -0.54052D-81    0.52358D-51    0.52358D-51
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   2
+ Initial time     =     0.00000D+00
+ Final time       =     0.12000D+03
+ Initial stepsize =     0.50000D-03
+ Maximum stepsize =     0.12000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   9
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1410 f-s =       1771 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.99999D-01    0.99999D-01    0.15778D-11
+  2    0.20000D+00    0.20000D+00    0.31554D-11
+  3    0.30000D+00    0.30000D+00    0.44129D-11
+  4    0.40000D+00    0.40000D+00    0.52221D-11
+  5    0.50000D+00    0.50000D+00    0.55014D-11
+  6    0.60000D+00    0.60000D+00    0.52222D-11
+  7    0.70000D+00    0.70000D+00    0.44128D-11
+  8    0.80000D+00    0.80000D+00    0.31556D-11
+  9    0.90000D+00    0.90000D+00    0.15780D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        506
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         39
+ ____________________________________________________________
+ Class/Problem = A3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   3
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1659 f-s =       1884 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1   -0.13534D-02   -0.13534D-02    0.43045D-13
+  2    0.13685D-01    0.13685D-01    0.43450D-12
+  3    0.15037D+01    0.15037D+01    0.47828D-10
+  4    0.13534D+00    0.13534D+00    0.43825D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = A4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =   4
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =  10
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2088 f-s =       2581 J-s =         42
+ Computed and reference solutions and absolute errors follow:
+  1    0.36788D+00    0.36788D+00    0.20549D-10
+  2    0.17334D-13    0.12659D-13    0.46754D-14
+  3    0.13241D-46    0.19115D-41    0.19115D-41
+  4   -0.20177D-75    0.22774D-54    0.22774D-54
+  5    0.88157-109    0.00000D+00    0.88157-109
+  6   -0.91772-148    0.00000D+00    0.91772-148
+  7   -0.28131-190    0.00000D+00    0.28131-190
+  8    0.74089-237    0.00000D+00    0.74089-237
+  9   -0.38758-283    0.00000D+00    0.38758-283
+ 10    0.00000D+00    0.00000D+00    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        610
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = B1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  11
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.70000D-02
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.10000D+01
+    0.00000D+00
+ Steps =       6934 f-s =       7861 J-s =        124
+ Computed and reference solutions and absolute errors follow:
+  1    0.10008D-08    0.10042D-08    0.33650D-11
+  2    0.17942D-07    0.18000D-07    0.58109D-10
+  3    0.00000D+00    0.00000D+00    0.00000D+00
+  4   -0.68963-306   -0.60430D-78    0.60430D-78
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = B2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  12
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1126 f-s =       1328 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.32339D-55    0.61813D-30    0.61813D-30
+  2    0.69701D-56    0.89637D-30    0.89637D-30
+  3    0.19970D-34    0.27384D-26    0.27384D-26
+  4    0.20612D-08    0.20612D-08    0.27424D-13
+  5    0.45400D-04    0.45400D-04    0.82189D-11
+  6    0.13534D+00    0.13534D+00    0.15064D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  13
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1254 f-s =       1463 J-s =         27
+ Computed and reference solutions and absolute errors follow:
+  1   -0.10535D-48   -0.10768D-27    0.10768D-27
+  2    0.73959D-50    0.54550D-27    0.54550D-27
+  3    0.21256D-34    0.27385D-26    0.27385D-26
+  4    0.20612D-08    0.20612D-08    0.26897D-13
+  5    0.45400D-04    0.45400D-04    0.80714D-11
+  6    0.13534D+00    0.13534D+00    0.14458D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  14
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       2020 f-s =       2315 J-s =         40
+ Computed and reference solutions and absolute errors follow:
+  1    0.23656D-21    0.13312D-21    0.10344D-21
+  2    0.42183D-20   -0.23259D-21    0.44509D-20
+  3    0.19920D-34    0.15179D-34    0.47419D-35
+  4    0.20612D-08    0.20612D-08    0.18479D-13
+  5    0.45400D-04    0.45400D-04    0.54995D-11
+  6    0.13534D+00    0.13534D+00    0.12144D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = B5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  15
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   6
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       7702 f-s =       8751 J-s =        136
+ Computed and reference solutions and absolute errors follow:
+  1   -0.39985D-11   -0.31006D-13    0.39675D-11
+  2    0.66998D-11    0.38628D-13    0.66611D-11
+  3    0.18048D-34    0.18049D-34    0.38599D-39
+  4    0.20612D-08    0.20612D-08    0.41328D-16
+  5    0.45400D-04    0.45400D-04    0.28238D-13
+  6    0.13534D+00    0.13534D+00    0.21844D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        254
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = C1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  21
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1548 f-s =       1749 J-s =         34
+ Computed and reference solutions and absolute errors follow:
+  1    0.40032D-03    0.40032D-03    0.95569D-12
+  2    0.40016D-03    0.40016D-03    0.00000D+00
+  3    0.40000D-03    0.40000D-03    0.54210D-19
+  4    0.20000D-01    0.20000D-01    0.00000D+00
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  22
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1399 f-s =       1592 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.43643D-11
+  2    0.40000D-01    0.40000D-01    0.19399D-12
+  3    0.40016D-01    0.40016D-01    0.17924D-12
+  4    0.40032D-01    0.40032D-01    0.17666D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  23
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1385 f-s =       1573 J-s =         30
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.22922D-11
+  2    0.40000D+00    0.40000D+00    0.10189D-11
+  3    0.41600D+00    0.41600D+00    0.10240D-11
+  4    0.43331D+00    0.43331D+00    0.10948D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  24
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1438 f-s =       1626 J-s =         31
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.24492D-12
+  2    0.40000D+01    0.40000D+01    0.10902D-11
+  3    0.20000D+02    0.20000D+02    0.99512D-11
+  4    0.42000D+03    0.42000D+03    0.41189D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = C5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  25
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+    0.10000D+01
+ Steps =       1472 f-s =       1669 J-s =         32
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+01    0.20000D+01    0.38991D-12
+  2    0.80000D+01    0.80000D+01    0.34701D-11
+  3    0.13600D+03    0.13600D+03    0.11713D-09
+  4    0.37128D+05    0.37128D+05    0.64443D-07
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  31
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+03
+ Initial stepsize =     0.17000D-01
+ Maximum stepsize =     0.40000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =       1129 f-s =       1372 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1    0.22242D+02    0.22242D+02    0.21392D-08
+  2    0.27111D+02    0.27111D+02    0.21066D-08
+  3    0.40000D+03    0.40000D+03    0.11369D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  32
+ Initial time     =     0.00000D+00
+ Final time       =     0.40000D+02
+ Initial stepsize =     0.10000D-04
+ Maximum stepsize =     0.40000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1137 f-s =       1382 J-s =         22
+ Computed and reference solutions and absolute errors follow:
+  1    0.71583D+00    0.71583D+00    0.58165D-12
+  2    0.91855D-01    0.91855D-01    0.36550D-12
+  3    0.28416D+02    0.28416D+02    0.58204D-10
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  33
+ Initial time     =     0.00000D+00
+ Final time       =     0.20000D+02
+ Initial stepsize =     0.25000D-04
+ Maximum stepsize =     0.20000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =       1657 f-s =       1900 J-s =         36
+ Computed and reference solutions and absolute errors follow:
+  1    0.63976D+00    0.63976D+00    0.13811D-12
+  2    0.56309D-02    0.56309D-02    0.26194D-15
+  3    0.36024D+00    0.36024D+00    0.13961D-12
+  4    0.31706D+00    0.31706D+00    0.71276D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = D4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  34
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+02
+ Initial stepsize =     0.29000D-03
+ Maximum stepsize =     0.50000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =        259 f-s =        434 J-s =          9
+ Computed and reference solutions and absolute errors follow:
+  1    0.59765D+00    0.59765D+00    0.26102D-10
+  2    0.14023D+01    0.14023D+01    0.26099D-10
+  3   -0.18934D-05   -0.18934D-05    0.10627D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = D5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  35
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+ Steps =       1045 f-s =       1500 J-s =         24
+ Computed and reference solutions and absolute errors follow:
+  1   -0.99164D+00   -0.99164D+00    0.99028D-10
+  2    0.98334D+00    0.98334D+00    0.11166D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = D6
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  36
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.33000D-07
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+    0.00000D+00
+ Steps =        451 f-s =        628 J-s =         12
+ Computed and reference solutions and absolute errors follow:
+  1    0.85240D+00    0.85240D+00    0.43796D-11
+  2    0.14760D+00    0.14760D+00    0.43804D-11
+  3    0.57731D-07    0.57731D-07    0.53875D-18
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  41
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+01
+ Initial stepsize =     0.68000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        418 f-s =        559 J-s =         14
+ Computed and reference solutions and absolute errors follow:
+  1    0.10000D-07    0.10000D-07    0.29205D-16
+  2   -0.39393D-15   -0.16253D-18    0.39376D-15
+  3   -0.52729D-14    0.20260D-16    0.52931D-14
+  4    0.50848D-13   -0.18531D-14    0.52701D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  42
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+02
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+02
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.20000D+01
+    0.00000D+00
+ Steps =       2195 f-s =       2491 J-s =         41
+ Computed and reference solutions and absolute errors follow:
+  1   -0.11587D+01   -0.11587D+01    0.78175D-09
+  2    0.43047D+00    0.43047D+00    0.83014D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         58
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         32
+ ____________________________________________________________
+ Class/Problem = E3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  43
+ Initial time     =     0.00000D+00
+ Final time       =     0.50000D+03
+ Initial stepsize =     0.20000D-01
+ Maximum stepsize =     0.50000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.10000D+01
+    0.00000D+00
+ Steps =       1134 f-s =       1314 J-s =         26
+ Computed and reference solutions and absolute errors follow:
+  1    0.42531D-02    0.42531D-02    0.88912D-11
+  2    0.53170D-02    0.53170D-02    0.11095D-10
+  3    0.26276D+02    0.26276D+02    0.30349D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         92
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         33
+ ____________________________________________________________
+ Class/Problem = E4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  44
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.00000D+00
+   -0.20000D+01
+   -0.10000D+01
+   -0.10000D+01
+ Steps =       3190 f-s =       3644 J-s =         61
+ Computed and reference solutions and absolute errors follow:
+  1    0.20000D+02    0.20000D+02    0.55245D-11
+  2   -0.20000D+02   -0.20000D+02    0.55103D-11
+  3   -0.22476D-06   -0.22476D-06    0.55176D-11
+  4    0.22476D-06    0.22476D-06    0.55211D-11
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = E5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  45
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.50000D-04
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.17600D-02
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Steps =        105 f-s =        151 J-s =          2
+ Computed and reference solutions and absolute errors follow:
+  1    0.16181D-02    0.16181D-02    0.25207D-09
+  2    0.13822D-09    0.13822D-09    0.33118D-16
+  3    0.82516D-11    0.82516D-11    0.97533D-18
+  4    0.12997D-09    0.12997D-09    0.32142D-16
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        136
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F1
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  51
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+04
+ Initial stepsize =     0.10000D-03
+ Maximum stepsize =     0.10000D+04
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.76100D+03
+    0.00000D+00
+    0.60000D+03
+    0.10000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =       2298 f-s =       3270 J-s =         47
+ Computed and reference solutions and absolute errors follow:
+  1    0.12111D+04    0.12111D+04    0.42260D-08
+  2    0.12711D-04    0.12711D-04    0.54923D-15
+  3    0.12086D+04    0.12086D+04    0.41946D-08
+  4    0.32420D-03    0.32420D-03    0.54758D-15
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+ ____________________________________________________________
+ Class/Problem = F2
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  52
+ Initial time     =     0.00000D+00
+ Final time       =     0.24000D+03
+ Initial stepsize =     0.10000D-01
+ Maximum stepsize =     0.24000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   2
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.10000D+01
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        656 f-s =        775 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.39127D+00    0.39127D+00    0.23898D-10
+  2    0.13300D-02    0.13300D-02    0.81175D-13
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         62
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         34
+ ____________________________________________________________
+ Class/Problem = F3
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  53
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-09
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   5
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D-05
+    0.10000D-05
+    0.00000D+00
+    0.00000D+00
+    0.00000D+00
+ Nonnegativity will be enforced for this problem.
+ Steps =        212 f-s =        298 J-s =          5
+ Computed and reference solutions and absolute errors follow:
+  1    0.32362D-12    0.32359D-12    0.24242D-16
+  2    0.23607D-06    0.23607D-06    0.27954D-13
+  3    0.76393D-13    0.76393D-13    0.48488D-19
+  4    0.76393D-06    0.76393D-06    0.41758D-13
+  5    0.32361D-05    0.32361D-05    0.20679D-12
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        200
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         40
+ ____________________________________________________________
+ Class/Problem = F4
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  54
+ Initial time     =     0.00000D+00
+ Final time       =     0.30000D+03
+ Initial stepsize =     0.10000D-02
+ Maximum stepsize =     0.10000D+01
+ IWT flag         =  -1
+ Number of ODEs   =   3
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.40000D+01
+    0.11000D+01
+    0.40000D+01
+ Nonnegativity will be enforced for this problem.
+ Steps =       7815 f-s =      10298 J-s =        141
+ Computed and reference solutions and absolute errors follow:
+  1    0.44183D+01    0.44183D+01    0.21857D-08
+  2    0.12902D+01    0.12902D+01    0.18836D-09
+  3    0.30193D+01    0.30193D+01    0.91865D-09
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =         98
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         36
+ ____________________________________________________________
+ Class/Problem = F5
+  Results for ITOL =            12  follow.
+  Results for ITOL =            12  follow.
+  Results for VODE Jacobian follow.
+  Results for VODE Jacobian follow.
+  The ODEs will not be scaled.
+  The ODEs will not be scaled.
+  Results for user supplied sparse pointers follow.
+  Results for user supplied sparse pointers follow.
+  Results for banded Jacobian option follow.
+  Results for banded Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for non-constant Jacobian option follow.
+  Results for numerical Jacobian option follow.
+  Results for numerical Jacobian option follow.
+ Problem ID       =  55
+ Initial time     =     0.00000D+00
+ Final time       =     0.10000D+03
+ Initial stepsize =     0.10000D-06
+ Maximum stepsize =     0.10000D+03
+ IWT flag         =  -1
+ Number of ODEs   =   4
+ Error tolerance  =     0.10000D-11
+ Initial solution = 
+    0.33650D-06
+    0.82610D-02
+    0.16420D-02
+    0.93800D-05
+ Nonnegativity will be enforced for this problem.
+ Steps =        544 f-s =        859 J-s =         17
+ Computed and reference solutions and absolute errors follow:
+  1    0.17136D-06    0.17136D-06    0.31128D-19
+  2    0.37136D-02    0.37136D-02    0.68782D-15
+  3    0.61893D-02    0.61893D-02    0.11449D-14
+  4    0.95451D-05    0.95451D-05    0.35575D-19
+ I1 = Total length of REAL arrays used.                                          
+In the above message, I1 =        144
+ I1 = Total length of INTEGER arrays used.                                       
+In the above message, I1 =         38
+
+
+                     Results for ITOL =   5
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    5          1    0.32471D-05    0.32471D-05    0.32471D-05
+    5          2    0.45109D-05    0.44918D-05    0.45109D-05
+    5          3    0.35956D-06    0.43204D-06    0.35956D-06
+    5          4    0.35755D-04    0.35755D-04    0.35755D-04
+    5         11    0.82054D-04    0.20514D-04    0.82054D-04
+    5         12    0.25783D-05    0.25783D-05    0.25783D-05
+    5         13    0.36548D-06    0.36548D-06    0.36548D-06
+    5         14    0.13286D-04    0.13286D-04    0.13286D-04
+    5         15    0.22722D-03    0.22722D-03    0.22722D-03
+    5         21    0.21724D-06    0.15394D-05    0.21724D-06
+    5         22    0.26613D-06    0.44573D-05    0.26613D-06
+    5         23    0.58233D-05    0.13384D-05    0.58233D-05
+    5         24    0.12272D-03    0.15540D-02    0.12272D-03
+    5         25    0.26298D-01    0.11753D-01    0.26298D-01
+    5         31    0.15815D-02    0.14478D-02    0.15815D-02
+    5         32    0.41606D-03    0.93199D-03    0.41606D-03
+    5         33    0.77384D-06    0.20905D-05    0.77384D-06
+    5         34    0.22714D-04    0.42351D-04    0.22714D-04
+    5         35    0.45754D-02    0.45821D-02    0.45754D-02
+    5         36    0.11467D-04    0.26993D-05    0.11467D-04
+    5         41    0.66679D-11    0.48520D-11    0.66679D-11
+    5         42    0.78507D-04    0.69927D-04    0.78507D-04
+    5         43    0.42188D-04    0.17876D-03    0.42188D-04
+    5         44    0.38158D-04    0.13429D-04    0.38158D-04
+    5         45    0.54075D-03    0.75382D-05    0.54075D-03
+    5         51    0.66681D-02    0.86694D-02    0.66681D-02
+    5         52    0.42227D-04    0.44278D-04    0.42227D-04
+    5         53    0.68255D-05    0.52782D-05    0.68255D-05
+    5         54    0.54195D-03    0.16665D-02    0.54195D-03
+    5         55    0.10316D-07    0.16224D-11    0.10316D-07
+
+
+                     Results for ITOL =   6
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    6          1    0.30490D-06    0.30487D-06    0.30490D-06
+    6          2    0.20269D-06    0.20302D-06    0.20269D-06
+    6          3    0.15528D-04    0.15518D-04    0.15528D-04
+    6          4    0.76940D-06    0.76940D-06    0.76940D-06
+    6         11    0.68271D-05    0.67914D-05    0.68271D-05
+    6         12    0.21619D-05    0.21619D-05    0.21619D-05
+    6         13    0.20675D-05    0.20675D-05    0.20675D-05
+    6         14    0.17836D-05    0.17836D-05    0.17836D-05
+    6         15    0.61741D-05    0.57991D-05    0.61741D-05
+    6         21    0.33301D-07    0.90318D-06    0.33301D-07
+    6         22    0.21868D-07    0.21958D-06    0.21868D-07
+    6         23    0.23894D-07    0.13264D-05    0.23894D-07
+    6         24    0.59616D-04    0.96016D-04    0.59616D-04
+    6         25    0.35452D-02    0.13236D-01    0.35452D-02
+    6         31    0.13043D-03    0.46695D-04    0.13043D-03
+    6         32    0.60136D-04    0.85801D-04    0.60136D-04
+    6         33    0.21535D-06    0.56131D-07    0.21535D-06
+    6         34    0.50323D-05    0.50882D-05    0.50323D-05
+    6         35    0.13792D-04    0.17234D-04    0.13792D-04
+    6         36    0.89511D-06    0.12935D-05    0.89511D-06
+    6         41    0.47668D-07    0.20076D-08    0.47668D-07
+    6         42    0.42191D-04    0.48535D-04    0.42191D-04
+    6         43    0.48515D-04    0.12792D-04    0.48515D-04
+    6         44    0.85324D-07    0.12525D-06    0.85324D-07
+    6         45    0.18339D-05    0.12577D-04    0.18339D-05
+    6         51    0.82423D-03    0.15384D-02    0.82423D-03
+    6         52    0.78947D-05    0.83441D-05    0.78947D-05
+    6         53    0.67732D-06    0.67472D-06    0.67732D-06
+    6         54    0.86593D-04    0.27303D-04    0.86593D-04
+    6         55    0.63884D-08    0.38018D-11    0.63884D-08
+
+
+                     Results for ITOL =   7
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    7          1    0.17939D-06    0.17939D-06    0.17939D-06
+    7          2    0.93205D-07    0.74497D-07    0.93205D-07
+    7          3    0.25626D-06    0.21908D-06    0.25626D-06
+    7          4    0.13268D-06    0.13268D-06    0.13268D-06
+    7         11    0.41361D-06    0.41319D-06    0.41361D-06
+    7         12    0.12318D-06    0.12318D-06    0.12318D-06
+    7         13    0.11735D-06    0.11735D-06    0.11735D-06
+    7         14    0.12901D-06    0.12901D-06    0.12901D-06
+    7         15    0.24117D-05    0.24117D-05    0.24117D-05
+    7         21    0.57592D-08    0.85755D-08    0.57592D-08
+    7         22    0.19503D-07    0.41483D-06    0.19503D-07
+    7         23    0.71641D-07    0.85808D-07    0.71641D-07
+    7         24    0.64786D-04    0.21542D-04    0.64786D-04
+    7         25    0.61838D-02    0.82625D-03    0.61838D-02
+    7         31    0.11522D-04    0.11153D-04    0.11522D-04
+    7         32    0.25653D-04    0.46953D-05    0.25653D-04
+    7         33    0.18859D-07    0.13443D-06    0.18859D-07
+    7         34    0.22800D-07    0.22800D-07    0.22800D-07
+    7         35    0.12894D-05    0.91511D-06    0.12894D-05
+    7         36    0.12860D-05    0.24077D-06    0.12860D-05
+    7         41    0.10966D-07    0.32407D-08    0.10966D-07
+    7         42    0.13584D-04    0.70261D-05    0.13584D-04
+    7         43    0.13106D-04    0.19326D-04    0.13106D-04
+    7         44    0.10582D-06    0.13323D-06    0.10582D-06
+    7         45    0.11756D-05    0.10684D-06    0.11756D-05
+    7         51    0.31004D-04    0.41469D-04    0.31004D-04
+    7         52    0.80369D-06    0.69569D-06    0.80369D-06
+    7         53    0.42297D-07    0.40358D-07    0.42297D-07
+    7         54    0.30100D-04    0.31403D-04    0.30100D-04
+    7         55    0.11096D-11    0.59936D-12    0.11096D-11
+
+
+                     Results for ITOL =   8
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    8          1    0.10373D-07    0.10373D-07    0.10373D-07
+    8          2    0.17883D-07    0.16440D-07    0.17883D-07
+    8          3    0.11996D-06    0.11996D-06    0.11996D-06
+    8          4    0.81042D-08    0.81042D-08    0.81042D-08
+    8         11    0.91067D-07    0.11911D-06    0.91067D-07
+    8         12    0.20557D-07    0.20557D-07    0.20557D-07
+    8         13    0.16174D-07    0.16174D-07    0.16174D-07
+    8         14    0.37012D-07    0.37012D-07    0.37012D-07
+    8         15    0.87363D-07    0.87362D-07    0.87363D-07
+    8         21    0.34941D-08    0.35009D-08    0.34941D-08
+    8         22    0.56117D-07    0.64005D-07    0.56117D-07
+    8         23    0.30035D-09    0.13570D-08    0.30035D-09
+    8         24    0.17307D-05    0.20710D-05    0.17307D-05
+    8         25    0.10670D-02    0.35850D-03    0.10670D-02
+    8         31    0.16896D-05    0.19005D-05    0.16896D-05
+    8         32    0.19803D-05    0.27718D-05    0.19803D-05
+    8         33    0.87250D-08    0.30057D-08    0.87250D-08
+    8         34    0.27090D-06    0.20551D-06    0.27090D-06
+    8         35    0.83890D-06    0.59310D-06    0.83890D-06
+    8         36    0.29125D-07    0.19944D-07    0.29125D-07
+    8         41    0.14738D-09    0.62885D-10    0.14738D-09
+    8         42    0.14176D-05    0.14825D-05    0.14176D-05
+    8         43    0.25055D-06    0.45533D-06    0.25055D-06
+    8         44    0.25960D-09    0.67201D-08    0.25960D-09
+    8         45    0.29771D-06    0.99142D-07    0.29771D-06
+    8         51    0.98613D-05    0.21342D-04    0.98613D-05
+    8         52    0.21761D-07    0.82571D-08    0.21761D-07
+    8         53    0.35852D-07    0.44211D-07    0.35852D-07
+    8         54    0.68297D-05    0.99637D-06    0.68297D-05
+    8         55    0.32921D-11    0.59299D-12    0.32921D-11
+
+
+                     Results for ITOL =   9
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+    9          1    0.20958D-08    0.20958D-08    0.20958D-08
+    9          2    0.17887D-08    0.17876D-08    0.17887D-08
+    9          3    0.61165D-07    0.61173D-07    0.61165D-07
+    9          4    0.36942D-09    0.36942D-09    0.36942D-09
+    9         11    0.81817D-08    0.81818D-08    0.81817D-08
+    9         12    0.22293D-08    0.22293D-08    0.22293D-08
+    9         13    0.16949D-08    0.16949D-08    0.16949D-08
+    9         14    0.84210D-09    0.84210D-09    0.84210D-09
+    9         15    0.10516D-07    0.10516D-07    0.10516D-07
+    9         21    0.32933D-08    0.33742D-08    0.32933D-08
+    9         22    0.31903D-09    0.32843D-09    0.31903D-09
+    9         23    0.94382D-09    0.31507D-08    0.94382D-09
+    9         24    0.49301D-06    0.41093D-06    0.49301D-06
+    9         25    0.16794D-04    0.24272D-04    0.16794D-04
+    9         31    0.33049D-06    0.15611D-06    0.33049D-06
+    9         32    0.32206D-06    0.57894D-06    0.32206D-06
+    9         33    0.11107D-09    0.38292D-08    0.11107D-09
+    9         34    0.38196D-07    0.60451D-08    0.38196D-07
+    9         35    0.11193D-06    0.11257D-06    0.11193D-06
+    9         36    0.57991D-08    0.12713D-08    0.57991D-08
+    9         41    0.24736D-10    0.91256D-11    0.24736D-10
+    9         42    0.18211D-06    0.18838D-06    0.18211D-06
+    9         43    0.63616D-07    0.11097D-06    0.63616D-07
+    9         44    0.12428D-08    0.69177D-09    0.12428D-08
+    9         45    0.13511D-08    0.79010D-08    0.13511D-08
+    9         51    0.21504D-05    0.12477D-05    0.21504D-05
+    9         52    0.28025D-08    0.74528D-08    0.28025D-08
+    9         53    0.95041D-08    0.63143D-08    0.95041D-08
+    9         54    0.15477D-05    0.76446D-06    0.15477D-05
+    9         55    0.15121D-11    0.99489D-12    0.15121D-11
+
+
+                     Results for ITOL =  10
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   10          1    0.33624D-09    0.33624D-09    0.33624D-09
+   10          2    0.12436D-09    0.12435D-09    0.12436D-09
+   10          3    0.26790D-08    0.26784D-08    0.26790D-08
+   10          4    0.54749D-09    0.54749D-09    0.54749D-09
+   10         11    0.24371D-08    0.24674D-08    0.24371D-08
+   10         12    0.36754D-09    0.36754D-09    0.36754D-09
+   10         13    0.32141D-09    0.32141D-09    0.32141D-09
+   10         14    0.19133D-09    0.19133D-09    0.19133D-09
+   10         15    0.51657D-08    0.51657D-08    0.51657D-08
+   10         21    0.25390D-09    0.24187D-09    0.25390D-09
+   10         22    0.79983D-09    0.80675D-09    0.79983D-09
+   10         23    0.34159D-09    0.11570D-09    0.34159D-09
+   10         24    0.38450D-07    0.37837D-07    0.38450D-07
+   10         25    0.18191D-05    0.30656D-05    0.18191D-05
+   10         31    0.45975D-07    0.36615D-07    0.45975D-07
+   10         32    0.31962D-07    0.67000D-08    0.31962D-07
+   10         33    0.48135D-10    0.47667D-10    0.48135D-10
+   10         34    0.12091D-08    0.34335D-09    0.12091D-08
+   10         35    0.12008D-07    0.80470D-08    0.12008D-07
+   10         36    0.17600D-09    0.30078D-09    0.17600D-09
+   10         41    0.13091D-10    0.68879D-11    0.13091D-10
+   10         42    0.36829D-07    0.30748D-07    0.36829D-07
+   10         43    0.48339D-07    0.31999D-07    0.48339D-07
+   10         44    0.12562D-08    0.90016D-10    0.12562D-08
+   10         45    0.46690D-08    0.32760D-08    0.46690D-08
+   10         51    0.24935D-06    0.28625D-06    0.24935D-06
+   10         52    0.14619D-08    0.28179D-09    0.14619D-08
+   10         53    0.22604D-10    0.37499D-09    0.22604D-10
+   10         54    0.26443D-06    0.13681D-06    0.26443D-06
+   10         55    0.62047D-11    0.40902D-12    0.62047D-11
+
+
+                     Results for ITOL =  11
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   11          1    0.33879D-10    0.33879D-10    0.33879D-10
+   11          2    0.33194D-10    0.32460D-10    0.33194D-10
+   11          3    0.94239D-09    0.94365D-09    0.94239D-09
+   11          4    0.27668D-09    0.27666D-09    0.27668D-09
+   11         11    0.38074D-09    0.38080D-09    0.38074D-09
+   11         12    0.52756D-10    0.52756D-10    0.52756D-10
+   11         13    0.50269D-10    0.50269D-10    0.50269D-10
+   11         14    0.52820D-10    0.52821D-10    0.52820D-10
+   11         15    0.25336D-10    0.34461D-10    0.25336D-10
+   11         21    0.61056D-11    0.61009D-11    0.61056D-11
+   11         22    0.18911D-10    0.18915D-10    0.18911D-10
+   11         23    0.69813D-11    0.69285D-11    0.69813D-11
+   11         24    0.30688D-08    0.28331D-08    0.30688D-08
+   11         25    0.45457D-06    0.45246D-06    0.45457D-06
+   11         31    0.85188D-08    0.11165D-07    0.85188D-08
+   11         32    0.49510D-08    0.39867D-08    0.49510D-08
+   11         33    0.18862D-10    0.19432D-10    0.18862D-10
+   11         34    0.10899D-09    0.18284D-09    0.10899D-09
+   11         35    0.16604D-08    0.15352D-08    0.16604D-08
+   11         36    0.27952D-10    0.41518D-10    0.27952D-10
+   11         41    0.22913D-10    0.27174D-12    0.22913D-10
+   11         42    0.56664D-08    0.55395D-08    0.56664D-08
+   11         43    0.44747D-08    0.43679D-08    0.44747D-08
+   11         44    0.94680D-11    0.76380D-10    0.94680D-11
+   11         45    0.82755D-09    0.91000D-09    0.82755D-09
+   11         51    0.41034D-07    0.34577D-07    0.41034D-07
+   11         52    0.16732D-09    0.20958D-09    0.16732D-09
+   11         53    0.17536D-10    0.62854D-11    0.17536D-10
+   11         54    0.28879D-07    0.76714D-08    0.28879D-07
+   11         55    0.24626D-11    0.17387D-11    0.24626D-11
+
+
+                     Results for ITOL =  12
+
+ Maximum Errors for All Problems Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+           Maximum Errors for Individual Problems Follow:
+
+Tolerance   Problem    Dense          Sparse         Banded
+   12          1    0.68578D-11    0.68578D-11    0.68578D-11
+   12          2    0.55014D-11    0.65446D-11    0.55014D-11
+   12          3    0.47828D-10    0.53681D-10    0.47828D-10
+   12          4    0.20549D-10    0.20558D-10    0.20549D-10
+   12         11    0.58109D-10    0.58109D-10    0.58109D-10
+   12         12    0.82189D-11    0.82192D-11    0.82189D-11
+   12         13    0.80714D-11    0.80714D-11    0.80714D-11
+   12         14    0.54995D-11    0.54995D-11    0.54995D-11
+   12         15    0.66611D-11    0.26811D-11    0.66611D-11
+   12         21    0.95569D-12    0.95546D-12    0.95569D-12
+   12         22    0.43643D-11    0.43787D-11    0.43643D-11
+   12         23    0.22922D-11    0.22640D-11    0.22922D-11
+   12         24    0.41189D-09    0.43229D-09    0.41189D-09
+   12         25    0.64443D-07    0.67274D-07    0.64443D-07
+   12         31    0.21392D-08    0.18082D-08    0.21392D-08
+   12         32    0.58204D-10    0.24372D-11    0.58204D-10
+   12         33    0.13961D-12    0.13697D-11    0.13961D-12
+   12         34    0.26102D-10    0.52328D-10    0.26102D-10
+   12         35    0.11166D-09    0.18949D-09    0.11166D-09
+   12         36    0.43804D-11    0.63392D-11    0.43804D-11
+   12         41    0.52701D-13    0.56831D-11    0.52701D-13
+   12         42    0.83014D-09    0.73155D-09    0.83014D-09
+   12         43    0.30349D-09    0.27266D-09    0.30349D-09
+   12         44    0.55245D-11    0.10748D-11    0.55245D-11
+   12         45    0.25207D-09    0.23257D-09    0.25207D-09
+   12         51    0.42260D-08    0.53990D-08    0.42260D-08
+   12         52    0.23898D-10    0.13130D-10    0.23898D-10
+   12         53    0.20679D-12    0.47308D-12    0.20679D-12
+   12         54    0.21857D-08    0.18689D-08    0.21857D-08
+   12         55    0.11449D-14    0.11446D-11    0.11449D-14
+
+
+                     Results for ITOL =   5
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        127       127       127
+        Jacs:           6         5         6
+        Ders:         192       208       192
+  
+    2   Steps:        153       153       153
+        Jacs:           5         6         5
+        Ders:         249       312       249
+  
+    3   Steps:        157       157       157
+        Jacs:           5         6         5
+        Ders:         226       254       226
+  
+    4   Steps:        189       189       189
+        Jacs:           6         8         6
+        Ders:         291       391       291
+  
+   11   Steps:        570       566       570
+        Jacs:          14        19        14
+        Ders:         713       811       713
+  
+   12   Steps:        107       107       107
+        Jacs:           4         5         4
+        Ders:         154       190       154
+  
+   13   Steps:        115       115       115
+        Jacs:           5         5         5
+        Ders:         166       196       166
+  
+   14   Steps:        169       169       169
+        Jacs:           5         8         5
+        Ders:         223       289       223
+  
+   15   Steps:       2552      2552      2552
+        Jacs:          46        70        46
+        Ders:        3023      3587      3023
+  
+   21   Steps:        141       138       141
+        Jacs:           6         5         6
+        Ders:         199       214       199
+  
+   22   Steps:        137       136       137
+        Jacs:           6         5         6
+        Ders:         196       211       196
+  
+   23   Steps:        127       128       127
+        Jacs:           5         5         5
+        Ders:         182       199       182
+  
+   24   Steps:        155       149       155
+        Jacs:           6         5         6
+        Ders:         224       237       224
+  
+   25   Steps:        150       151       150
+        Jacs:           5         6         5
+        Ders:         207       236       207
+  
+   31   Steps:        154       152       154
+        Jacs:           3         6         3
+        Ders:         265       281       265
+  
+   32   Steps:        139       161       139
+        Jacs:           3         8         3
+        Ders:         183       266       183
+  
+   33   Steps:        179       206       179
+        Jacs:           7         8         7
+        Ders:         276       340       276
+  
+   34   Steps:         21        21        21
+        Jacs:           1         4         1
+        Ders:          32        53        32
+  
+   35   Steps:         70        71        70
+        Jacs:           3         3         3
+        Ders:         117       121       117
+  
+   36   Steps:         51        46        51
+        Jacs:           2         5         2
+        Ders:          84        93        84
+  
+   41   Steps:         42        42        42
+        Jacs:           3         2         3
+        Ders:          72        76        72
+  
+   42   Steps:        215       205       215
+        Jacs:           5         8         5
+        Ders:         318       328       318
+  
+   43   Steps:        189       138       189
+        Jacs:           6         5         6
+        Ders:         316       223       316
+  
+   44   Steps:        288       294       288
+        Jacs:           8        12         8
+        Ders:         423       464       423
+  
+   45   Steps:         10        10        10
+        Jacs:           2         6         2
+        Ders:          29        65        29
+  
+   51   Steps:        295       301       295
+        Jacs:          17        22        17
+        Ders:         514       647       514
+  
+   52   Steps:         81        81        81
+        Jacs:           3         5         3
+        Ders:         116       130       116
+  
+   53   Steps:         19        17        19
+        Jacs:           2         4         2
+        Ders:          32        61        32
+  
+   54   Steps:       1158      1073      1158
+        Jacs:          29        48        29
+        Ders:        1963      1958      1963
+  
+   55   Steps:         45        88        45
+        Jacs:           2         5         2
+        Ders:          71       152        71
+  
+
+
+                     Results for ITOL =   6
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        168       168       168
+        Jacs:           7         8         7
+        Ders:         242       278       242
+  
+    2   Steps:        195       195       195
+        Jacs:           7         8         7
+        Ders:         309       391       309
+  
+    3   Steps:        210       210       210
+        Jacs:           6         8         6
+        Ders:         294       334       294
+  
+    4   Steps:        254       254       254
+        Jacs:           8        11         8
+        Ders:         390       530       390
+  
+   11   Steps:        763       763       763
+        Jacs:          19        27        19
+        Ders:         960      1099       960
+  
+   12   Steps:        137       137       137
+        Jacs:           5         5         5
+        Ders:         201       231       201
+  
+   13   Steps:        148       148       148
+        Jacs:           5         6         5
+        Ders:         207       249       207
+  
+   14   Steps:        303       303       303
+        Jacs:           9        11         9
+        Ders:         386       464       386
+  
+   15   Steps:       2684      2684      2684
+        Jacs:          49        72        49
+        Ders:        3153      3723      3153
+  
+   21   Steps:        186       183       186
+        Jacs:           7         8         7
+        Ders:         255       301       255
+  
+   22   Steps:        178       177       178
+        Jacs:           8         8         8
+        Ders:         253       287       253
+  
+   23   Steps:        174       173       174
+        Jacs:           7         8         7
+        Ders:         249       290       249
+  
+   24   Steps:        202       194       202
+        Jacs:           8         8         8
+        Ders:         315       319       315
+  
+   25   Steps:        199       192       199
+        Jacs:           7         8         7
+        Ders:         299       322       299
+  
+   31   Steps:        205       196       205
+        Jacs:           5         8         5
+        Ders:         348       360       348
+  
+   32   Steps:        253       233       253
+        Jacs:           5        11         5
+        Ders:         392       412       392
+  
+   33   Steps:        248       249       248
+        Jacs:           8        11         8
+        Ders:         358       406       358
+  
+   34   Steps:         30        30        30
+        Jacs:           1         2         1
+        Ders:          45        54        45
+  
+   35   Steps:         88        88        88
+        Jacs:           5         6         5
+        Ders:         146       159       146
+  
+   36   Steps:         74        59        74
+        Jacs:           2         5         2
+        Ders:         136       131       136
+  
+   41   Steps:         83        87        83
+        Jacs:           4         5         4
+        Ders:         137       163       137
+  
+   42   Steps:        266       253       266
+        Jacs:           6        11         6
+        Ders:         382       406       382
+  
+   43   Steps:        210       222       210
+        Jacs:           7         9         7
+        Ders:         298       387       298
+  
+   44   Steps:        380       396       380
+        Jacs:          11        16        11
+        Ders:         525       620       525
+  
+   45   Steps:         15        14        15
+        Jacs:           2         7         2
+        Ders:          34        84        34
+  
+   51   Steps:        385       334       385
+        Jacs:          19        23        19
+        Ders:         649       726       649
+  
+   52   Steps:        102       102       102
+        Jacs:           3         5         3
+        Ders:         141       155       141
+  
+   53   Steps:         27        27        27
+        Jacs:           2         3         2
+        Ders:          45        66        45
+  
+   54   Steps:       1308      1144      1308
+        Jacs:          34        50        34
+        Ders:        2206      2115      2206
+  
+   55   Steps:         70       134        70
+        Jacs:           2         5         2
+        Ders:         103       247       103
+  
+
+
+                     Results for ITOL =   7
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        229       229       229
+        Jacs:           8         8         8
+        Ders:         308       340       308
+  
+    2   Steps:        258       256       258
+        Jacs:           9        11         9
+        Ders:         409       532       409
+  
+    3   Steps:        289       289       289
+        Jacs:           8        11         8
+        Ders:         398       454       398
+  
+    4   Steps:        358       358       358
+        Jacs:          11        14        11
+        Ders:         535       705       535
+  
+   11   Steps:       1095      1094      1095
+        Jacs:          25        36        25
+        Ders:        1360      1545      1360
+  
+   12   Steps:        201       201       201
+        Jacs:           7         7         7
+        Ders:         282       324       282
+  
+   13   Steps:        219       219       219
+        Jacs:           7         7         7
+        Ders:         301       343       301
+  
+   14   Steps:        364       364       364
+        Jacs:          10        13        10
+        Ders:         453       549       453
+  
+   15   Steps:       2961      2961      2961
+        Jacs:          55        84        55
+        Ders:        3451      4129      3451
+  
+   21   Steps:        267       266       267
+        Jacs:           9        11         9
+        Ders:         354       409       354
+  
+   22   Steps:        242       241       242
+        Jacs:           9        10         9
+        Ders:         334       379       334
+  
+   23   Steps:        241       240       241
+        Jacs:           9         9         9
+        Ders:         334       369       334
+  
+   24   Steps:        254       254       254
+        Jacs:           9        11         9
+        Ders:         374       412       374
+  
+   25   Steps:        256       258       256
+        Jacs:           9        11         9
+        Ders:         342       413       342
+  
+   31   Steps:        298       326       298
+        Jacs:           7        14         7
+        Ders:         480       593       480
+  
+   32   Steps:        299       268       299
+        Jacs:           7        11         7
+        Ders:         418       418       418
+  
+   33   Steps:        317       309       317
+        Jacs:          10        14        10
+        Ders:         444       519       444
+  
+   34   Steps:         55        55        55
+        Jacs:           3         3         3
+        Ders:          81        90        81
+  
+   35   Steps:        186       154       186
+        Jacs:           7        10         7
+        Ders:         295       318       295
+  
+   36   Steps:        109        84       109
+        Jacs:           3         5         3
+        Ders:         216       163       216
+  
+   41   Steps:        105       106       105
+        Jacs:           5         5         5
+        Ders:         170       192       170
+  
+   42   Steps:        377       366       377
+        Jacs:           9        14         9
+        Ders:         519       530       519
+  
+   43   Steps:        345       295       345
+        Jacs:          11        11        11
+        Ders:         524       494       524
+  
+   44   Steps:        549       532       549
+        Jacs:          14        19        14
+        Ders:         711       813       711
+  
+   45   Steps:         22        20        22
+        Jacs:           2         5         2
+        Ders:          42        72        42
+  
+   51   Steps:        579       452       579
+        Jacs:          22        27        22
+        Ders:        1014       912      1014
+  
+   52   Steps:        123       121       123
+        Jacs:           5         5         5
+        Ders:         192       195       192
+  
+   53   Steps:         35        35        35
+        Jacs:           2         3         2
+        Ders:          55        75        55
+  
+   54   Steps:       1811      1563      1811
+        Jacs:          41        65        41
+        Ders:        2965      2714      2965
+  
+   55   Steps:        117       109       117
+        Jacs:           4         6         4
+        Ders:         197       219       197
+  
+
+
+                     Results for ITOL =   8
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        302       302       302
+        Jacs:          11        11        11
+        Ders:         408       452       408
+  
+    2   Steps:        357       354       357
+        Jacs:          11        14        11
+        Ders:         520       675       520
+  
+    3   Steps:        400       400       400
+        Jacs:          11        14        11
+        Ders:         514       582       514
+  
+    4   Steps:        495       495       495
+        Jacs:          13        16        13
+        Ders:         685       875       685
+  
+   11   Steps:       1507      1544      1507
+        Jacs:          32        48        32
+        Ders:        1811      2106      1811
+  
+   12   Steps:        281       281       281
+        Jacs:           9        11         9
+        Ders:         371       449       371
+  
+   13   Steps:        305       305       305
+        Jacs:          10        11        10
+        Ders:         402       474       402
+  
+   14   Steps:        592       592       592
+        Jacs:          15        18        15
+        Ders:         737       863       737
+  
+   15   Steps:       3304      3304      3304
+        Jacs:          60        89        60
+        Ders:        3852      4560      3852
+  
+   21   Steps:        368       368       368
+        Jacs:          12        13        12
+        Ders:         463       519       463
+  
+   22   Steps:        340       339       340
+        Jacs:          11        13        11
+        Ders:         444       502       444
+  
+   23   Steps:        327       325       327
+        Jacs:          10        11        10
+        Ders:         415       462       415
+  
+   24   Steps:        341       336       341
+        Jacs:          11        14        11
+        Ders:         445       509       445
+  
+   25   Steps:        351       346       351
+        Jacs:          12        13        12
+        Ders:         460       510       460
+  
+   31   Steps:        419       414       419
+        Jacs:          10        16        10
+        Ders:         612       696       612
+  
+   32   Steps:        418       387       418
+        Jacs:           9        16         9
+        Ders:         583       622       583
+  
+   33   Steps:        434       413       434
+        Jacs:          13        18        13
+        Ders:         578       653       578
+  
+   34   Steps:         65        66        65
+        Jacs:           4         3         4
+        Ders:         100       109       100
+  
+   35   Steps:        231       210       231
+        Jacs:           8        12         8
+        Ders:         363       373       363
+  
+   36   Steps:        145       151       145
+        Jacs:           3         7         3
+        Ders:         236       282       236
+  
+   41   Steps:        132       135       132
+        Jacs:           7         5         7
+        Ders:         215       221       215
+  
+   42   Steps:        531       508       531
+        Jacs:          12        18        12
+        Ders:         666       704       666
+  
+   43   Steps:        397       410       397
+        Jacs:          12        16        12
+        Ders:         584       647       584
+  
+   44   Steps:        748       739       748
+        Jacs:          18        25        18
+        Ders:         916      1057       916
+  
+   45   Steps:         29        30        29
+        Jacs:           2         5         2
+        Ders:          56        93        56
+  
+   51   Steps:        816       735       816
+        Jacs:          25        36        25
+        Ders:        1339      1410      1339
+  
+   52   Steps:        166       164       166
+        Jacs:           5         5         5
+        Ders:         219       224       219
+  
+   53   Steps:         56        50        56
+        Jacs:           2         3         2
+        Ders:          83        96        83
+  
+   54   Steps:       2320      2237      2320
+        Jacs:          49        82        49
+        Ders:        3652      3832      3652
+  
+   55   Steps:        161       156       161
+        Jacs:           5         6         5
+        Ders:         296       290       296
+  
+
+
+                     Results for ITOL =   9
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        428       428       428
+        Jacs:          13        16        13
+        Ders:         542       618       542
+  
+    2   Steps:        486       486       486
+        Jacs:          14        16        14
+        Ders:         673       835       673
+  
+    3   Steps:        554       554       554
+        Jacs:          14        18        14
+        Ders:         674       762       674
+  
+    4   Steps:        703       703       703
+        Jacs:          18        26        18
+        Ders:         953      1293       953
+  
+   11   Steps:       2270      2244      2270
+        Jacs:          45        66        45
+        Ders:        2668      3002      2668
+  
+   12   Steps:        390       390       390
+        Jacs:          11        15        11
+        Ders:         495       609       495
+  
+   13   Steps:        426       426       426
+        Jacs:          11        13        11
+        Ders:         529       619       529
+  
+   14   Steps:        844       844       844
+        Jacs:          19        27        19
+        Ders:        1015      1225      1015
+  
+   15   Steps:       3856      3856      3856
+        Jacs:          70       105        70
+        Ders:        4464      5304      4464
+  
+   21   Steps:        525       525       525
+        Jacs:          16        18        16
+        Ders:         643       724       643
+  
+   22   Steps:        465       465       465
+        Jacs:          14        15        14
+        Ders:         579       643       579
+  
+   23   Steps:        469       469       469
+        Jacs:          13        15        13
+        Ders:         571       643       571
+  
+   24   Steps:        483       480       483
+        Jacs:          14        15        14
+        Ders:         605       653       605
+  
+   25   Steps:        478       492       478
+        Jacs:          14        16        14
+        Ders:         608       682       608
+  
+   31   Steps:        591       592       591
+        Jacs:          14        23        14
+        Ders:         851       958       851
+  
+   32   Steps:        539       544       539
+        Jacs:          11        21        11
+        Ders:         797       879       797
+  
+   33   Steps:        580       582       580
+        Jacs:          16        20        16
+        Ders:         725       823       725
+  
+   34   Steps:         93        87        93
+        Jacs:           4         5         4
+        Ders:         163       147       163
+  
+   35   Steps:        359       328       359
+        Jacs:          10        15        10
+        Ders:         548       513       548
+  
+   36   Steps:        218       226       218
+        Jacs:           5        10         5
+        Ders:         354       426       354
+  
+   41   Steps:        182       182       182
+        Jacs:           7         8         7
+        Ders:         281       305       281
+  
+   42   Steps:        726       725       726
+        Jacs:          16        23        16
+        Ders:         889       949       889
+  
+   43   Steps:        535       495       535
+        Jacs:          15        18        15
+        Ders:         773       742       773
+  
+   44   Steps:       1048      1047      1048
+        Jacs:          23        31        23
+        Ders:        1267      1411      1267
+  
+   45   Steps:         41        43        41
+        Jacs:           2         5         2
+        Ders:          77       107        77
+  
+   51   Steps:        960      1104       960
+        Jacs:          29        46        29
+        Ders:        1545      2015      1545
+  
+   52   Steps:        238       242       238
+        Jacs:           8         9         8
+        Ders:         314       346       314
+  
+   53   Steps:         76        77        76
+        Jacs:           2         5         2
+        Ders:         109       146       109
+  
+   54   Steps:       3208      3105      3208
+        Jacs:          62       112        62
+        Ders:        4842      5145      4842
+  
+   55   Steps:        218       209       218
+        Jacs:           7         8         7
+        Ders:         391       402       391
+  
+
+
+                     Results for ITOL =  10
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        591       591       591
+        Jacs:          17        18        17
+        Ders:         712       788       712
+  
+    2   Steps:        699       699       699
+        Jacs:          18        24        18
+        Ders:         919      1189       919
+  
+    3   Steps:        787       787       787
+        Jacs:          18        25        18
+        Ders:         928      1056       928
+  
+    4   Steps:        999       999       999
+        Jacs:          22        31        22
+        Ders:        1284      1684      1284
+  
+   11   Steps:       3303      3260      3303
+        Jacs:          63        93        63
+        Ders:        3833      4267      3833
+  
+   12   Steps:        558       558       558
+        Jacs:          15        18        15
+        Ders:         697       823       697
+  
+   13   Steps:        598       598       598
+        Jacs:          16        19        16
+        Ders:         735       867       735
+  
+   14   Steps:       1129      1129      1129
+        Jacs:          24        32        24
+        Ders:        1324      1564      1324
+  
+   15   Steps:       4689      4689      4689
+        Jacs:          86       128        86
+        Ders:        5406      6426      5406
+  
+   21   Steps:        736       736       736
+        Jacs:          19        24        19
+        Ders:         886      1006       886
+  
+   22   Steps:        669       669       669
+        Jacs:          18        22        18
+        Ders:         804       908       804
+  
+   23   Steps:        659       654       659
+        Jacs:          18        20        18
+        Ders:         791       883       791
+  
+   24   Steps:        694       683       694
+        Jacs:          18        25        18
+        Ders:         826       944       826
+  
+   25   Steps:        703       709       703
+        Jacs:          18        22        18
+        Ders:         839       950       839
+  
+   31   Steps:        747       741       747
+        Jacs:          17        29        17
+        Ders:        1062      1197      1062
+  
+   32   Steps:        726       661       726
+        Jacs:          15        26        15
+        Ders:        1019      1049      1019
+  
+   33   Steps:        836       832       836
+        Jacs:          21        28        21
+        Ders:         997      1146       997
+  
+   34   Steps:        123       124       123
+        Jacs:           6         5         6
+        Ders:         189       218       189
+  
+   35   Steps:        511       519       511
+        Jacs:          15        20        15
+        Ders:         782       876       782
+  
+   36   Steps:        291       254       291
+        Jacs:           8        10         8
+        Ders:         471       443       471
+  
+   41   Steps:        234       221       234
+        Jacs:          10         9        10
+        Ders:         342       359       342
+  
+   42   Steps:       1041      1042      1041
+        Jacs:          21        34        21
+        Ders:        1214      1313      1214
+  
+   43   Steps:        671       615       671
+        Jacs:          17        21        17
+        Ders:         918       877       918
+  
+   44   Steps:       1525      1508      1525
+        Jacs:          32        48        32
+        Ders:        1801      2015      1801
+  
+   45   Steps:         61        66        61
+        Jacs:           2         5         2
+        Ders:          93       136        93
+  
+   51   Steps:       1299      1290      1299
+        Jacs:          32        50        32
+        Ders:        2016      2270      2016
+  
+   52   Steps:        318       323       318
+        Jacs:          10        11        10
+        Ders:         385       419       385
+  
+   53   Steps:        131       135       131
+        Jacs:           3         6         3
+        Ders:         182       228       182
+  
+   54   Steps:       3984      4194      3984
+        Jacs:          78       147        78
+        Ders:        5659      6749      5659
+  
+   55   Steps:        374       336       374
+        Jacs:          10        14        10
+        Ders:         631       651       631
+  
+
+
+                     Results for ITOL =  11
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:        868       868       868
+        Jacs:          21        25        21
+        Ders:        1012      1128      1012
+  
+    2   Steps:        965       987       965
+        Jacs:          23        31        23
+        Ders:        1270      1640      1270
+  
+    3   Steps:       1112      1112      1112
+        Jacs:          23        34        23
+        Ders:        1271      1451      1271
+  
+    4   Steps:       1447      1447      1447
+        Jacs:          31        44        31
+        Ders:        1825      2395      1825
+  
+   11   Steps:       4822      4792      4822
+        Jacs:          88       130        88
+        Ders:        5515      6182      5515
+  
+   12   Steps:        789       789       789
+        Jacs:          19        25        19
+        Ders:         950      1136       950
+  
+   13   Steps:        846       846       846
+        Jacs:          19        26        19
+        Ders:        1005      1203      1005
+  
+   14   Steps:       1404      1404      1404
+        Jacs:          29        41        29
+        Ders:        1635      1953      1635
+  
+   15   Steps:       6016      6014      6016
+        Jacs:         107       157       107
+        Ders:        6869      8107      6869
+  
+   21   Steps:       1072      1072      1072
+        Jacs:          25        32        25
+        Ders:        1231      1388      1231
+  
+   22   Steps:        947       947       947
+        Jacs:          23        29        23
+        Ders:        1104      1245      1104
+  
+   23   Steps:        931       931       931
+        Jacs:          22        28        22
+        Ders:        1077      1214      1077
+  
+   24   Steps:        993       993       993
+        Jacs:          23        31        23
+        Ders:        1144      1301      1144
+  
+   25   Steps:       1023      1024      1023
+        Jacs:          25        28        25
+        Ders:        1189      1315      1189
+  
+   31   Steps:        903       887       903
+        Jacs:          21        30        21
+        Ders:        1203      1253      1203
+  
+   32   Steps:        930       947       930
+        Jacs:          19        34        19
+        Ders:        1234      1419      1234
+  
+   33   Steps:       1163      1147      1163
+        Jacs:          27        37        27
+        Ders:        1370      1544      1370
+  
+   34   Steps:        182       176       182
+        Jacs:           8         8         8
+        Ders:         337       310       337
+  
+   35   Steps:        653       643       653
+        Jacs:          16        23        16
+        Ders:         944       983       944
+  
+   36   Steps:        334       355       334
+        Jacs:           9        14         9
+        Ders:         484       602       484
+  
+   41   Steps:        390       363       390
+        Jacs:          12        15        12
+        Ders:         527       597       527
+  
+   42   Steps:       1504      1525      1504
+        Jacs:          30        48        30
+        Ders:        1727      1881      1727
+  
+   43   Steps:        841       800       841
+        Jacs:          21        25        21
+        Ders:        1080      1059      1080
+  
+   44   Steps:       2182      2179      2182
+        Jacs:          43        62        43
+        Ders:        2483      2813      2483
+  
+   45   Steps:         85        86        85
+        Jacs:           2         6         2
+        Ders:         127       172       127
+  
+   51   Steps:       1881      1673      1881
+        Jacs:          39        56        39
+        Ders:        2767      2706      2767
+  
+   52   Steps:        445       442       445
+        Jacs:          12        15        12
+        Ders:         533       569       533
+  
+   53   Steps:        144       155       144
+        Jacs:           3         6         3
+        Ders:         201       259       201
+  
+   54   Steps:       5666      5627      5666
+        Jacs:         104       193       104
+        Ders:        7821      8589      7821
+  
+   55   Steps:        429       457       429
+        Jacs:          12        18        12
+        Ders:         678       876       678
+  
+
+
+                     Results for ITOL =  12
+
+ Integration Statistics Follow:
+ The original VODE Jacobian was used.
+ The ODEs were not scaled.
+
+ Problem            Dense    Sparse    Banded
+    1   Steps:       1239      1239      1239
+        Jacs:          28        36        28
+        Ders:        1417      1593      1417
+  
+    2   Steps:       1410      1405      1410
+        Jacs:          31        42        31
+        Ders:        1771      2247      1771
+  
+    3   Steps:       1659      1660      1659
+        Jacs:          34        48        34
+        Ders:        1884      2148      1884
+  
+    4   Steps:       2088      2088      2088
+        Jacs:          42        58        42
+        Ders:        2581      3321      2581
+  
+   11   Steps:       6934      6804      6934
+        Jacs:         124       180       124
+        Ders:        7861      8688      7861
+  
+   12   Steps:       1126      1126      1126
+        Jacs:          24        31        24
+        Ders:        1328      1556      1328
+  
+   13   Steps:       1254      1254      1254
+        Jacs:          27        36        27
+        Ders:        1463      1733      1463
+  
+   14   Steps:       2020      2020      2020
+        Jacs:          40        56        40
+        Ders:        2315      2747      2315
+  
+   15   Steps:       7702      7706      7702
+        Jacs:         136       205       136
+        Ders:        8751     10399      8751
+  
+   21   Steps:       1548      1548      1548
+        Jacs:          34        47        34
+        Ders:        1749      1990      1749
+  
+   22   Steps:       1399      1399      1399
+        Jacs:          31        39        31
+        Ders:        1592      1782      1592
+  
+   23   Steps:       1385      1385      1385
+        Jacs:          30        39        30
+        Ders:        1573      1766      1573
+  
+   24   Steps:       1438      1438      1438
+        Jacs:          31        43        31
+        Ders:        1626      1849      1626
+  
+   25   Steps:       1472      1475      1472
+        Jacs:          32        44        32
+        Ders:        1669      1898      1669
+  
+   31   Steps:       1129      1119      1129
+        Jacs:          24        35        24
+        Ders:        1372      1485      1372
+  
+   32   Steps:       1137      1160      1137
+        Jacs:          22        39        22
+        Ders:        1382      1558      1382
+  
+   33   Steps:       1657      1652      1657
+        Jacs:          36        52        36
+        Ders:        1900      2167      1900
+  
+   34   Steps:        259       247       259
+        Jacs:           9        11         9
+        Ders:         434       455       434
+  
+   35   Steps:       1045       937      1045
+        Jacs:          24        34        24
+        Ders:        1500      1445      1500
+  
+   36   Steps:        451       445       451
+        Jacs:          12        16        12
+        Ders:         628       686       628
+  
+   41   Steps:        418       447       418
+        Jacs:          14        16        14
+        Ders:         559       674       559
+  
+   42   Steps:       2195      2175      2195
+        Jacs:          41        62        41
+        Ders:        2491      2628      2491
+  
+   43   Steps:       1134      1090      1134
+        Jacs:          26        35        26
+        Ders:        1314      1402      1314
+  
+   44   Steps:       3190      3130      3190
+        Jacs:          61        89        61
+        Ders:        3644      4013      3644
+  
+   45   Steps:        105       103       105
+        Jacs:           2         7         2
+        Ders:         151       191       151
+  
+   51   Steps:       2298      2396      2298
+        Jacs:          47        83        47
+        Ders:        3270      3820      3270
+  
+   52   Steps:        656       649       656
+        Jacs:          17        21        17
+        Ders:         775       812       775
+  
+   53   Steps:        212       197       212
+        Jacs:           5         8         5
+        Ders:         298       325       298
+  
+   54   Steps:       7815      7617      7815
+        Jacs:         141       242       141
+        Ders:       10298     11111     10298
+  
+   55   Steps:        544       571       544
+        Jacs:          17        28        17
+        Ders:         859      1046       859
+  
+
+
+
+                    Summary Statistics Follow
+ ____________________________________________________________
+ Class/Problem = A1
+
+ Problem No. =   1
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.32471D-05    0.32471D-05
+ Sparse: JACSP - VODE:     0.32471D-05    0.32471D-05
+ Banded: JACSP - VODE:     0.32471D-05    0.32471D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     127    127    192    192      6      6
+ Sparse SDJ:     127    127    208    208      5      5
+ Banded SDJ:     127    127    192    192      6      6
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32471D-05    0.32471D-05
+ Sparse: JACSP - VODE:     0.32471D-05    0.32471D-05
+ Banded: JACSP - VODE:     0.32471D-05    0.32471D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     127    127    192    192      6      6
+ Sparse SDJ:     127    127    208    208      5      5
+ Banded SDJ:     127    127    192    192      6      6
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.30489D-06    0.30490D-06
+ Sparse: JACSP - VODE:     0.30488D-06    0.30487D-06
+ Banded: JACSP - VODE:     0.30489D-06    0.30490D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     168    168    242    242      7      7
+ Sparse SDJ:     168    168    278    278      8      8
+ Banded SDJ:     168    168    242    242      7      7
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.30489D-06    0.30490D-06
+ Sparse: JACSP - VODE:     0.30488D-06    0.30487D-06
+ Banded: JACSP - VODE:     0.30489D-06    0.30490D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     168    168    242    242      7      7
+ Sparse SDJ:     168    168    278    278      8      8
+ Banded SDJ:     168    168    242    242      7      7
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17939D-06    0.17939D-06
+ Sparse: JACSP - VODE:     0.17939D-06    0.17939D-06
+ Banded: JACSP - VODE:     0.17939D-06    0.17939D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     229    229    308    308      8      8
+ Sparse SDJ:     229    229    340    340      8      8
+ Banded SDJ:     229    229    308    308      8      8
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17939D-06    0.17939D-06
+ Sparse: JACSP - VODE:     0.17939D-06    0.17939D-06
+ Banded: JACSP - VODE:     0.17939D-06    0.17939D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     229    229    308    308      8      8
+ Sparse SDJ:     229    229    340    340      8      8
+ Banded SDJ:     229    229    308    308      8      8
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10373D-07    0.10373D-07
+ Sparse: JACSP - VODE:     0.10373D-07    0.10373D-07
+ Banded: JACSP - VODE:     0.10373D-07    0.10373D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     302    302    408    408     11     11
+ Sparse SDJ:     302    302    452    452     11     11
+ Banded SDJ:     302    302    408    408     11     11
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10373D-07    0.10373D-07
+ Sparse: JACSP - VODE:     0.10373D-07    0.10373D-07
+ Banded: JACSP - VODE:     0.10373D-07    0.10373D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     302    302    408    408     11     11
+ Sparse SDJ:     302    302    452    452     11     11
+ Banded SDJ:     302    302    408    408     11     11
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20958D-08    0.20958D-08
+ Sparse: JACSP - VODE:     0.20958D-08    0.20958D-08
+ Banded: JACSP - VODE:     0.20958D-08    0.20958D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     428    428    542    542     13     13
+ Sparse SDJ:     428    428    618    618     16     16
+ Banded SDJ:     428    428    542    542     13     13
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20958D-08    0.20958D-08
+ Sparse: JACSP - VODE:     0.20958D-08    0.20958D-08
+ Banded: JACSP - VODE:     0.20958D-08    0.20958D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     428    428    542    542     13     13
+ Sparse SDJ:     428    428    618    618     16     16
+ Banded SDJ:     428    428    542    542     13     13
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.33624D-09    0.33624D-09
+ Sparse: JACSP - VODE:     0.33624D-09    0.33624D-09
+ Banded: JACSP - VODE:     0.33624D-09    0.33624D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     591    591    713    712     17     17
+ Sparse SDJ:     591    591    789    788     18     18
+ Banded SDJ:     591    591    713    712     17     17
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.33624D-09    0.33624D-09
+ Sparse: JACSP - VODE:     0.33624D-09    0.33624D-09
+ Banded: JACSP - VODE:     0.33624D-09    0.33624D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     591    591    713    712     17     17
+ Sparse SDJ:     591    591    789    788     18     18
+ Banded SDJ:     591    591    713    712     17     17
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.33886D-10    0.33879D-10
+ Sparse: JACSP - VODE:     0.33883D-10    0.33879D-10
+ Banded: JACSP - VODE:     0.33886D-10    0.33879D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     868    868   1013   1012     21     21
+ Sparse SDJ:     868    868   1129   1128     25     25
+ Banded SDJ:     868    868   1013   1012     21     21
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.33886D-10    0.33879D-10
+ Sparse: JACSP - VODE:     0.33883D-10    0.33879D-10
+ Banded: JACSP - VODE:     0.33886D-10    0.33879D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     868    868   1013   1012     21     21
+ Sparse SDJ:     868    868   1129   1128     25     25
+ Banded SDJ:     868    868   1013   1012     21     21
+ ____________________________________________________________
+
+ Problem No. =   1
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.68578D-11    0.68578D-11
+ Sparse: JACSP - VODE:     0.68577D-11    0.68578D-11
+ Banded: JACSP - VODE:     0.68578D-11    0.68578D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1239   1239   1417   1417     28     28
+ Sparse SDJ:    1239   1239   1593   1593     36     36
+ Banded SDJ:    1239   1239   1417   1417     28     28
+ ____________________________________________________________
+ Problem No. =   1
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.68578D-11    0.68578D-11
+ Sparse: JACSP - VODE:     0.68577D-11    0.68578D-11
+ Banded: JACSP - VODE:     0.68578D-11    0.68578D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1239   1239   1417   1417     28     28
+ Sparse SDJ:    1239   1239   1593   1593     36     36
+ Banded SDJ:    1239   1239   1417   1417     28     28
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = A2
+
+ Problem No. =   2
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.57532D-06    0.56583D-06
+ Sparse: JACSP - VODE:     0.57503D-06    0.57517D-06
+ Banded: JACSP - VODE:     0.57532D-06    0.56583D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     141    141    224    224      5      5
+ Sparse SDJ:     141    141    287    287      6      6
+ Banded SDJ:     141    141    224    224      5      5
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.45095D-05    0.45109D-05
+ Sparse: JACSP - VODE:     0.45063D-05    0.44918D-05
+ Banded: JACSP - VODE:     0.45095D-05    0.45109D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     153    153    249    249      5      5
+ Sparse SDJ:     153    153    312    312      6      6
+ Banded SDJ:     153    153    249    249      5      5
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.38582D-05    0.23459D-05
+ Sparse: JACSP - VODE:     0.42534D-05    0.42008D-05
+ Banded: JACSP - VODE:     0.38582D-05    0.23459D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     206    208    330    321      7      7
+ Sparse SDJ:     207    207    410    410      8      8
+ Banded SDJ:     206    208    330    321      7      7
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20318D-06    0.20269D-06
+ Sparse: JACSP - VODE:     0.20257D-06    0.20302D-06
+ Banded: JACSP - VODE:     0.20318D-06    0.20269D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     195    195    311    309      7      7
+ Sparse SDJ:     195    195    391    391      8      8
+ Banded SDJ:     195    195    311    309      7      7
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12239D-06    0.91142D-07
+ Sparse: JACSP - VODE:     0.13796D-06    0.95234D-07
+ Banded: JACSP - VODE:     0.12239D-06    0.91142D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     268    263    421    418      9      9
+ Sparse SDJ:     264    268    528    544     11     11
+ Banded SDJ:     268    263    421    418      9      9
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.90068D-07    0.93205D-07
+ Sparse: JACSP - VODE:     0.19394D-06    0.74497D-07
+ Banded: JACSP - VODE:     0.90068D-07    0.93205D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     251    258    399    409      9      9
+ Sparse SDJ:     256    256    525    532     11     11
+ Banded SDJ:     251    258    399    409      9      9
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.11411D-07    0.24812D-07
+ Sparse: JACSP - VODE:     0.15639D-07    0.11087D-07
+ Banded: JACSP - VODE:     0.11411D-07    0.24812D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     374    375    536    530     11     11
+ Sparse SDJ:     376    376    684    700     14     15
+ Banded SDJ:     374    375    536    530     11     11
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.94242D-08    0.17883D-07
+ Sparse: JACSP - VODE:     0.17578D-07    0.16440D-07
+ Banded: JACSP - VODE:     0.94242D-08    0.17883D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     354    357    526    520     11     11
+ Sparse SDJ:     358    354    679    675     14     14
+ Banded SDJ:     354    357    526    520     11     11
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.24991D-08    0.14111D-08
+ Sparse: JACSP - VODE:     0.26028D-08    0.22225D-08
+ Banded: JACSP - VODE:     0.24991D-08    0.14111D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     522    522    718    731     14     15
+ Sparse SDJ:     522    521    880    895     16     17
+ Banded SDJ:     522    522    718    731     14     15
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17847D-08    0.17887D-08
+ Sparse: JACSP - VODE:     0.17876D-08    0.17876D-08
+ Banded: JACSP - VODE:     0.17847D-08    0.17887D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     486    486    674    673     14     14
+ Sparse SDJ:     486    486    836    835     16     16
+ Banded SDJ:     486    486    674    673     14     14
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.32399D-09    0.33713D-09
+ Sparse: JACSP - VODE:     0.34220D-09    0.33385D-09
+ Banded: JACSP - VODE:     0.32399D-09    0.33713D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     735    736    996    990     19     19
+ Sparse SDJ:     736    735   1252   1268     24     25
+ Banded SDJ:     735    736    996    990     19     19
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20452D-09    0.12436D-09
+ Sparse: JACSP - VODE:     0.22710D-09    0.12435D-09
+ Banded: JACSP - VODE:     0.20452D-09    0.12436D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     700    699    945    919     19     18
+ Sparse SDJ:     700    699   1186   1189     23     24
+ Banded SDJ:     700    699    945    919     19     18
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.50967D-10    0.37573D-10
+ Sparse: JACSP - VODE:     0.54345D-10    0.52035D-10
+ Banded: JACSP - VODE:     0.50967D-10    0.37573D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1026   1039   1326   1337     25     24
+ Sparse SDJ:    1031   1027   1651   1655     30     31
+ Banded SDJ:    1026   1039   1326   1337     25     24
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.33458D-10    0.33194D-10
+ Sparse: JACSP - VODE:     0.31825D-10    0.32460D-10
+ Banded: JACSP - VODE:     0.33458D-10    0.33194D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     987    965   1318   1270     24     23
+ Sparse SDJ:     986    987   1661   1640     32     31
+ Banded SDJ:     987    965   1318   1270     24     23
+ ____________________________________________________________
+
+ Problem No. =   2
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.13180D-10    0.13130D-10
+ Sparse: JACSP - VODE:     0.13297D-10    0.13253D-10
+ Banded: JACSP - VODE:     0.13180D-10    0.13130D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1518   1522   1898   1906     33     33
+ Sparse SDJ:    1523   1522   2404   2383     44     43
+ Banded SDJ:    1518   1522   1898   1906     33     33
+ ____________________________________________________________
+ Problem No. =   2
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.51101D-11    0.55014D-11
+ Sparse: JACSP - VODE:     0.66901D-11    0.65446D-11
+ Banded: JACSP - VODE:     0.51101D-11    0.55014D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1389   1410   1746   1771     30     31
+ Sparse SDJ:    1400   1405   2299   2247     45     42
+ Banded SDJ:    1389   1410   1746   1771     30     31
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = A3
+
+ Problem No. =   3
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21302D-05    0.20977D-05
+ Sparse: JACSP - VODE:     0.21522D-05    0.20731D-05
+ Banded: JACSP - VODE:     0.21302D-05    0.20977D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     152    152    221    221      5      5
+ Sparse SDJ:     152    152    249    249      6      6
+ Banded SDJ:     152    152    221    221      5      5
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.40943D-06    0.35956D-06
+ Sparse: JACSP - VODE:     0.38662D-06    0.43204D-06
+ Banded: JACSP - VODE:     0.40943D-06    0.35956D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     157    157    226    226      5      5
+ Sparse SDJ:     157    157    254    254      6      6
+ Banded SDJ:     157    157    226    226      5      5
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.18930D-06    0.99705D-06
+ Sparse: JACSP - VODE:     0.37164D-05    0.12082D-05
+ Banded: JACSP - VODE:     0.18930D-06    0.99705D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     206    207    299    301      6      6
+ Sparse SDJ:     206    207    337    342      8      8
+ Banded SDJ:     206    207    299    301      6      6
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.15468D-04    0.15528D-04
+ Sparse: JACSP - VODE:     0.15480D-04    0.15518D-04
+ Banded: JACSP - VODE:     0.15468D-04    0.15528D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     210    210    294    294      6      6
+ Sparse SDJ:     210    210    334    334      8      8
+ Banded SDJ:     210    210    294    294      6      6
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.51466D-07    0.51101D-07
+ Sparse: JACSP - VODE:     0.47194D-07    0.49417D-07
+ Banded: JACSP - VODE:     0.51466D-07    0.51101D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     276    276    385    385      8      8
+ Sparse SDJ:     276    276    441    441     11     11
+ Banded SDJ:     276    276    385    385      8      8
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.41427D-06    0.25626D-06
+ Sparse: JACSP - VODE:     0.24850D-06    0.21908D-06
+ Banded: JACSP - VODE:     0.41427D-06    0.25626D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     290    289    401    398      8      8
+ Sparse SDJ:     289    289    454    454     11     11
+ Banded SDJ:     290    289    401    398      8      8
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.63728D-07    0.63728D-07
+ Sparse: JACSP - VODE:     0.63730D-07    0.63731D-07
+ Banded: JACSP - VODE:     0.63728D-07    0.63728D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     385    385    494    494     11     11
+ Sparse SDJ:     385    385    570    570     15     15
+ Banded SDJ:     385    385    494    494     11     11
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11996D-06    0.11996D-06
+ Sparse: JACSP - VODE:     0.11996D-06    0.11996D-06
+ Banded: JACSP - VODE:     0.11996D-06    0.11996D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     400    400    514    514     11     11
+ Sparse SDJ:     400    400    582    582     14     14
+ Banded SDJ:     400    400    514    514     11     11
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.87621D-08    0.87620D-08
+ Sparse: JACSP - VODE:     0.87620D-08    0.87621D-08
+ Banded: JACSP - VODE:     0.87621D-08    0.87620D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     537    537    657    657     14     14
+ Sparse SDJ:     537    537    753    753     19     19
+ Banded SDJ:     537    537    657    657     14     14
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.61145D-07    0.61165D-07
+ Sparse: JACSP - VODE:     0.61163D-07    0.61173D-07
+ Banded: JACSP - VODE:     0.61145D-07    0.61165D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     554    554    674    674     14     14
+ Sparse SDJ:     554    554    762    762     18     18
+ Banded SDJ:     554    554    674    674     14     14
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21191D-09    0.21171D-09
+ Sparse: JACSP - VODE:     0.21146D-09    0.21173D-09
+ Banded: JACSP - VODE:     0.21191D-09    0.21171D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     760    760    908    908     19     19
+ Sparse SDJ:     760    760   1024   1024     24     24
+ Banded SDJ:     760    760    908    908     19     19
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.26783D-08    0.26790D-08
+ Sparse: JACSP - VODE:     0.26778D-08    0.26784D-08
+ Banded: JACSP - VODE:     0.26783D-08    0.26790D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     787    787    928    928     18     18
+ Sparse SDJ:     787    787   1056   1056     25     25
+ Banded SDJ:     787    787    928    928     18     18
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.14940D-09    0.15178D-09
+ Sparse: JACSP - VODE:     0.15153D-09    0.15016D-09
+ Banded: JACSP - VODE:     0.14940D-09    0.15178D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1065   1065   1228   1228     23     23
+ Sparse SDJ:    1065   1065   1400   1400     33     33
+ Banded SDJ:    1065   1065   1228   1228     23     23
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.94230D-09    0.94239D-09
+ Sparse: JACSP - VODE:     0.94206D-09    0.94365D-09
+ Banded: JACSP - VODE:     0.94230D-09    0.94239D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1112   1112   1271   1271     23     23
+ Sparse SDJ:    1112   1112   1451   1451     34     34
+ Banded SDJ:    1112   1112   1271   1271     23     23
+ ____________________________________________________________
+
+ Problem No. =   3
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.96231D-11    0.10612D-10
+ Sparse: JACSP - VODE:     0.87089D-11    0.10959D-10
+ Banded: JACSP - VODE:     0.96231D-11    0.10612D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1595   1599   1812   1817     33     33
+ Sparse SDJ:    1603   1594   2050   2049     45     46
+ Banded SDJ:    1595   1599   1812   1817     33     33
+ ____________________________________________________________
+ Problem No. =   3
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.97478D-10    0.47828D-10
+ Sparse: JACSP - VODE:     0.70922D-10    0.53681D-10
+ Banded: JACSP - VODE:     0.97478D-10    0.47828D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1661   1659   1890   1884     34     34
+ Sparse SDJ:    1654   1660   2113   2148     45     48
+ Banded SDJ:    1661   1659   1890   1884     34     34
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = A4
+
+ Problem No. =   4
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.35755D-04    0.35755D-04
+ Sparse: JACSP - VODE:     0.35755D-04    0.35755D-04
+ Banded: JACSP - VODE:     0.35755D-04    0.35755D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     189    189    291    291      6      6
+ Sparse SDJ:     189    189    391    391      8      8
+ Banded SDJ:     189    189    291    291      6      6
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.35755D-04    0.35755D-04
+ Sparse: JACSP - VODE:     0.35755D-04    0.35755D-04
+ Banded: JACSP - VODE:     0.35755D-04    0.35755D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     189    189    291    291      6      6
+ Sparse SDJ:     189    189    391    391      8      8
+ Banded SDJ:     189    189    291    291      6      6
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.76940D-06    0.76940D-06
+ Sparse: JACSP - VODE:     0.76940D-06    0.76940D-06
+ Banded: JACSP - VODE:     0.76940D-06    0.76940D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     254    254    390    390      8      8
+ Sparse SDJ:     254    254    530    530     11     11
+ Banded SDJ:     254    254    390    390      8      8
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.76940D-06    0.76940D-06
+ Sparse: JACSP - VODE:     0.76940D-06    0.76940D-06
+ Banded: JACSP - VODE:     0.76940D-06    0.76940D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     254    254    390    390      8      8
+ Sparse SDJ:     254    254    530    530     11     11
+ Banded SDJ:     254    254    390    390      8      8
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.13268D-06    0.13268D-06
+ Sparse: JACSP - VODE:     0.13268D-06    0.13268D-06
+ Banded: JACSP - VODE:     0.13268D-06    0.13268D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     358    358    535    535     11     11
+ Sparse SDJ:     358    358    705    705     14     14
+ Banded SDJ:     358    358    535    535     11     11
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.13268D-06    0.13268D-06
+ Sparse: JACSP - VODE:     0.13268D-06    0.13268D-06
+ Banded: JACSP - VODE:     0.13268D-06    0.13268D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     358    358    535    535     11     11
+ Sparse SDJ:     358    358    705    705     14     14
+ Banded SDJ:     358    358    535    535     11     11
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.81042D-08    0.81042D-08
+ Sparse: JACSP - VODE:     0.81042D-08    0.81042D-08
+ Banded: JACSP - VODE:     0.81042D-08    0.81042D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     495    495    685    685     13     13
+ Sparse SDJ:     495    495    875    875     16     16
+ Banded SDJ:     495    495    685    685     13     13
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.81042D-08    0.81042D-08
+ Sparse: JACSP - VODE:     0.81042D-08    0.81042D-08
+ Banded: JACSP - VODE:     0.81042D-08    0.81042D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     495    495    685    685     13     13
+ Sparse SDJ:     495    495    875    875     16     16
+ Banded SDJ:     495    495    685    685     13     13
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.36942D-09    0.36942D-09
+ Sparse: JACSP - VODE:     0.36942D-09    0.36942D-09
+ Banded: JACSP - VODE:     0.36942D-09    0.36942D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     703    703    953    953     18     18
+ Sparse SDJ:     703    703   1293   1293     26     26
+ Banded SDJ:     703    703    953    953     18     18
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.36942D-09    0.36942D-09
+ Sparse: JACSP - VODE:     0.36942D-09    0.36942D-09
+ Banded: JACSP - VODE:     0.36942D-09    0.36942D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     703    703    953    953     18     18
+ Sparse SDJ:     703    703   1293   1293     26     26
+ Banded SDJ:     703    703    953    953     18     18
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.54749D-09    0.54749D-09
+ Sparse: JACSP - VODE:     0.54749D-09    0.54749D-09
+ Banded: JACSP - VODE:     0.54749D-09    0.54749D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     999    999   1284   1284     22     22
+ Sparse SDJ:     999    999   1684   1684     31     31
+ Banded SDJ:     999    999   1284   1284     22     22
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.54749D-09    0.54749D-09
+ Sparse: JACSP - VODE:     0.54749D-09    0.54749D-09
+ Banded: JACSP - VODE:     0.54749D-09    0.54749D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     999    999   1284   1284     22     22
+ Sparse SDJ:     999    999   1684   1684     31     31
+ Banded SDJ:     999    999   1284   1284     22     22
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.27668D-09    0.27668D-09
+ Sparse: JACSP - VODE:     0.27667D-09    0.27666D-09
+ Banded: JACSP - VODE:     0.27668D-09    0.27668D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1447   1447   1825   1825     31     31
+ Sparse SDJ:    1447   1447   2395   2395     44     44
+ Banded SDJ:    1447   1447   1825   1825     31     31
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.27668D-09    0.27668D-09
+ Sparse: JACSP - VODE:     0.27667D-09    0.27666D-09
+ Banded: JACSP - VODE:     0.27668D-09    0.27668D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1447   1447   1825   1825     31     31
+ Sparse SDJ:    1447   1447   2395   2395     44     44
+ Banded SDJ:    1447   1447   1825   1825     31     31
+ ____________________________________________________________
+
+ Problem No. =   4
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20548D-10    0.20549D-10
+ Sparse: JACSP - VODE:     0.20544D-10    0.20558D-10
+ Banded: JACSP - VODE:     0.20548D-10    0.20549D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    2088   2088   2581   2581     42     42
+ Sparse SDJ:    2088   2088   3321   3321     58     58
+ Banded SDJ:    2088   2088   2581   2581     42     42
+ ____________________________________________________________
+ Problem No. =   4
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20548D-10    0.20549D-10
+ Sparse: JACSP - VODE:     0.20544D-10    0.20558D-10
+ Banded: JACSP - VODE:     0.20548D-10    0.20549D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    2088   2088   2581   2581     42     42
+ Sparse SDJ:    2088   2088   3321   3321     58     58
+ Banded SDJ:    2088   2088   2581   2581     42     42
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = B1
+
+ Problem No. =  11
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.58717D-04    0.58719D-04
+ Sparse: JACSP - VODE:     0.58718D-04    0.58718D-04
+ Banded: JACSP - VODE:     0.58717D-04    0.58719D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     520    520    604    604     12     12
+ Sparse SDJ:     520    520    684    684     16     16
+ Banded SDJ:     520    520    604    604     12     12
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.82059D-04    0.82054D-04
+ Sparse: JACSP - VODE:     0.20429D-04    0.20514D-04
+ Banded: JACSP - VODE:     0.82059D-04    0.82054D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     570    570    713    713     14     14
+ Sparse SDJ:     566    566    811    811     19     19
+ Banded SDJ:     570    570    713    713     14     14
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.19333D-04    0.19333D-04
+ Sparse: JACSP - VODE:     0.19333D-04    0.19333D-04
+ Banded: JACSP - VODE:     0.19333D-04    0.19333D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     686    686    795    795     16     16
+ Sparse SDJ:     686    686    899    899     21     21
+ Banded SDJ:     686    686    795    795     16     16
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.67955D-05    0.68271D-05
+ Sparse: JACSP - VODE:     0.67919D-05    0.67914D-05
+ Banded: JACSP - VODE:     0.67955D-05    0.68271D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     763    763    959    960     19     19
+ Sparse SDJ:     763    763   1099   1099     27     27
+ Banded SDJ:     763    763    959    960     19     19
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.58269D-06    0.58269D-06
+ Sparse: JACSP - VODE:     0.58274D-06    0.58274D-06
+ Banded: JACSP - VODE:     0.58269D-06    0.58269D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     975    975   1107   1107     21     21
+ Sparse SDJ:     975    975   1263   1263     30     30
+ Banded SDJ:     975    975   1107   1107     21     21
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.41319D-06    0.41361D-06
+ Sparse: JACSP - VODE:     0.41319D-06    0.41319D-06
+ Banded: JACSP - VODE:     0.41319D-06    0.41361D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:    1094   1095   1357   1360     25     25
+ Sparse SDJ:    1094   1094   1545   1545     36     36
+ Banded SDJ:    1094   1095   1357   1360     25     25
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16039D-06    0.16172D-06
+ Sparse: JACSP - VODE:     0.16040D-06    0.16040D-06
+ Banded: JACSP - VODE:     0.16039D-06    0.16172D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:    1361   1361   1529   1529     28     28
+ Sparse SDJ:    1361   1361   1729   1729     39     39
+ Banded SDJ:    1361   1361   1529   1529     28     28
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.63111D-07    0.91067D-07
+ Sparse: JACSP - VODE:     0.11909D-06    0.11911D-06
+ Banded: JACSP - VODE:     0.63111D-07    0.91067D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    1510   1507   1803   1811     32     32
+ Sparse SDJ:    1544   1544   2107   2106     48     48
+ Banded SDJ:    1510   1507   1803   1811     32     32
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.35943D-08    0.33785D-08
+ Sparse: JACSP - VODE:     0.35970D-08    0.35969D-08
+ Banded: JACSP - VODE:     0.35943D-08    0.33785D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    2034   2035   2248   2249     39     39
+ Sparse SDJ:    2034   2034   2532   2532     55     55
+ Banded SDJ:    2034   2035   2248   2249     39     39
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17538D-07    0.81817D-08
+ Sparse: JACSP - VODE:     0.17538D-07    0.81818D-08
+ Banded: JACSP - VODE:     0.17538D-07    0.81817D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    2234   2270   2646   2668     44     45
+ Sparse SDJ:    2234   2244   2990   3002     65     66
+ Banded SDJ:    2234   2270   2646   2668     44     45
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.40318D-09    0.42778D-09
+ Sparse: JACSP - VODE:     0.40311D-09    0.40296D-09
+ Banded: JACSP - VODE:     0.40318D-09    0.42778D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    2913   2933   3206   3230     55     56
+ Sparse SDJ:    2913   2913   3602   3602     77     77
+ Banded SDJ:    2913   2933   3206   3230     55     56
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.24371D-08    0.24371D-08
+ Sparse: JACSP - VODE:     0.24371D-08    0.24674D-08
+ Banded: JACSP - VODE:     0.24371D-08    0.24371D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    3262   3303   3798   3833     62     63
+ Sparse SDJ:    3264   3260   4290   4267     94     93
+ Banded SDJ:    3262   3303   3798   3833     62     63
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.75409D-10    0.75796D-10
+ Sparse: JACSP - VODE:     0.77730D-10    0.77682D-10
+ Banded: JACSP - VODE:     0.75409D-10    0.75796D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    4319   4306   4722   4710     78     78
+ Sparse SDJ:    4319   4319   5322   5322    114    114
+ Banded SDJ:    4319   4306   4722   4710     78     78
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32522D-09    0.38074D-09
+ Sparse: JACSP - VODE:     0.32522D-09    0.38080D-09
+ Banded: JACSP - VODE:     0.32522D-09    0.38074D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    4785   4822   5478   5515     88     88
+ Sparse SDJ:    4784   4792   6163   6182    130    130
+ Banded SDJ:    4785   4822   5478   5515     88     88
+ ____________________________________________________________
+
+ Problem No. =  11
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.86494D-11    0.86181D-11
+ Sparse: JACSP - VODE:     0.86476D-11    0.87121D-11
+ Banded: JACSP - VODE:     0.86494D-11    0.86181D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    6206   6205   6769   6767    111    111
+ Sparse SDJ:    6206   6206   7597   7597    159    159
+ Banded SDJ:    6206   6205   6769   6767    111    111
+ ____________________________________________________________
+ Problem No. =  11
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.49520D-10    0.58109D-10
+ Sparse: JACSP - VODE:     0.58109D-10    0.58109D-10
+ Banded: JACSP - VODE:     0.49520D-10    0.58109D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    6745   6934   7690   7861    122    124
+ Sparse SDJ:    6814   6804   8700   8688    180    180
+ Banded SDJ:    6745   6934   7690   7861    122    124
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = B2
+
+ Problem No. =  12
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.25783D-05    0.25783D-05
+ Sparse: JACSP - VODE:     0.25783D-05    0.25783D-05
+ Banded: JACSP - VODE:     0.25783D-05    0.25783D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     107    107    154    154      4      4
+ Sparse SDJ:     107    107    190    190      5      5
+ Banded SDJ:     107    107    154    154      4      4
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.25783D-05    0.25783D-05
+ Sparse: JACSP - VODE:     0.25783D-05    0.25783D-05
+ Banded: JACSP - VODE:     0.25783D-05    0.25783D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     107    107    154    154      4      4
+ Sparse SDJ:     107    107    190    190      5      5
+ Banded SDJ:     107    107    154    154      4      4
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21619D-05    0.21619D-05
+ Sparse: JACSP - VODE:     0.21619D-05    0.21619D-05
+ Banded: JACSP - VODE:     0.21619D-05    0.21619D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     137    137    201    201      5      5
+ Sparse SDJ:     137    137    231    231      5      5
+ Banded SDJ:     137    137    201    201      5      5
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.21619D-05    0.21619D-05
+ Sparse: JACSP - VODE:     0.21619D-05    0.21619D-05
+ Banded: JACSP - VODE:     0.21619D-05    0.21619D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     137    137    201    201      5      5
+ Sparse SDJ:     137    137    231    231      5      5
+ Banded SDJ:     137    137    201    201      5      5
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12318D-06    0.12318D-06
+ Sparse: JACSP - VODE:     0.12318D-06    0.12318D-06
+ Banded: JACSP - VODE:     0.12318D-06    0.12318D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     201    201    282    282      7      7
+ Sparse SDJ:     201    201    324    324      7      7
+ Banded SDJ:     201    201    282    282      7      7
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.12318D-06    0.12318D-06
+ Sparse: JACSP - VODE:     0.12318D-06    0.12318D-06
+ Banded: JACSP - VODE:     0.12318D-06    0.12318D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     201    201    282    282      7      7
+ Sparse SDJ:     201    201    324    324      7      7
+ Banded SDJ:     201    201    282    282      7      7
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20557D-07    0.20557D-07
+ Sparse: JACSP - VODE:     0.20557D-07    0.20557D-07
+ Banded: JACSP - VODE:     0.20557D-07    0.20557D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     281    281    371    371      9      9
+ Sparse SDJ:     281    281    449    449     11     11
+ Banded SDJ:     281    281    371    371      9      9
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20557D-07    0.20557D-07
+ Sparse: JACSP - VODE:     0.20557D-07    0.20557D-07
+ Banded: JACSP - VODE:     0.20557D-07    0.20557D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     281    281    371    371      9      9
+ Sparse SDJ:     281    281    449    449     11     11
+ Banded SDJ:     281    281    371    371      9      9
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.22293D-08    0.22293D-08
+ Sparse: JACSP - VODE:     0.22293D-08    0.22293D-08
+ Banded: JACSP - VODE:     0.22293D-08    0.22293D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     390    390    495    495     11     11
+ Sparse SDJ:     390    390    609    609     15     15
+ Banded SDJ:     390    390    495    495     11     11
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.22293D-08    0.22293D-08
+ Sparse: JACSP - VODE:     0.22293D-08    0.22293D-08
+ Banded: JACSP - VODE:     0.22293D-08    0.22293D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     390    390    495    495     11     11
+ Sparse SDJ:     390    390    609    609     15     15
+ Banded SDJ:     390    390    495    495     11     11
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.36754D-09    0.36754D-09
+ Sparse: JACSP - VODE:     0.36754D-09    0.36754D-09
+ Banded: JACSP - VODE:     0.36754D-09    0.36754D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     558    558    697    697     15     15
+ Sparse SDJ:     558    558    823    823     18     18
+ Banded SDJ:     558    558    697    697     15     15
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.36754D-09    0.36754D-09
+ Sparse: JACSP - VODE:     0.36754D-09    0.36754D-09
+ Banded: JACSP - VODE:     0.36754D-09    0.36754D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     558    558    697    697     15     15
+ Sparse SDJ:     558    558    823    823     18     18
+ Banded SDJ:     558    558    697    697     15     15
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.52756D-10    0.52756D-10
+ Sparse: JACSP - VODE:     0.52756D-10    0.52756D-10
+ Banded: JACSP - VODE:     0.52756D-10    0.52756D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     789    789    950    950     19     19
+ Sparse SDJ:     789    789   1136   1136     25     25
+ Banded SDJ:     789    789    950    950     19     19
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.52756D-10    0.52756D-10
+ Sparse: JACSP - VODE:     0.52756D-10    0.52756D-10
+ Banded: JACSP - VODE:     0.52756D-10    0.52756D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     789    789    950    950     19     19
+ Sparse SDJ:     789    789   1136   1136     25     25
+ Banded SDJ:     789    789    950    950     19     19
+ ____________________________________________________________
+
+ Problem No. =  12
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.82190D-11    0.82189D-11
+ Sparse: JACSP - VODE:     0.82192D-11    0.82192D-11
+ Banded: JACSP - VODE:     0.82190D-11    0.82189D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1126   1126   1328   1328     24     24
+ Sparse SDJ:    1126   1126   1556   1556     31     31
+ Banded SDJ:    1126   1126   1328   1328     24     24
+ ____________________________________________________________
+ Problem No. =  12
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.82190D-11    0.82189D-11
+ Sparse: JACSP - VODE:     0.82192D-11    0.82192D-11
+ Banded: JACSP - VODE:     0.82190D-11    0.82189D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1126   1126   1328   1328     24     24
+ Sparse SDJ:    1126   1126   1556   1556     31     31
+ Banded SDJ:    1126   1126   1328   1328     24     24
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = B3
+
+ Problem No. =  13
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.36548D-06    0.36548D-06
+ Sparse: JACSP - VODE:     0.36548D-06    0.36548D-06
+ Banded: JACSP - VODE:     0.36548D-06    0.36548D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     115    115    166    166      5      5
+ Sparse SDJ:     115    115    196    196      5      5
+ Banded SDJ:     115    115    166    166      5      5
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.36548D-06    0.36548D-06
+ Sparse: JACSP - VODE:     0.36548D-06    0.36548D-06
+ Banded: JACSP - VODE:     0.36548D-06    0.36548D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     115    115    166    166      5      5
+ Sparse SDJ:     115    115    196    196      5      5
+ Banded SDJ:     115    115    166    166      5      5
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20675D-05    0.20675D-05
+ Sparse: JACSP - VODE:     0.20675D-05    0.20675D-05
+ Banded: JACSP - VODE:     0.20675D-05    0.20675D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     148    148    207    207      5      5
+ Sparse SDJ:     148    148    249    249      6      6
+ Banded SDJ:     148    148    207    207      5      5
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20675D-05    0.20675D-05
+ Sparse: JACSP - VODE:     0.20675D-05    0.20675D-05
+ Banded: JACSP - VODE:     0.20675D-05    0.20675D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     148    148    207    207      5      5
+ Sparse SDJ:     148    148    249    249      6      6
+ Banded SDJ:     148    148    207    207      5      5
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.11735D-06    0.11735D-06
+ Sparse: JACSP - VODE:     0.11735D-06    0.11735D-06
+ Banded: JACSP - VODE:     0.11735D-06    0.11735D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     219    219    301    301      7      7
+ Sparse SDJ:     219    219    343    343      7      7
+ Banded SDJ:     219    219    301    301      7      7
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11735D-06    0.11735D-06
+ Sparse: JACSP - VODE:     0.11735D-06    0.11735D-06
+ Banded: JACSP - VODE:     0.11735D-06    0.11735D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     219    219    301    301      7      7
+ Sparse SDJ:     219    219    343    343      7      7
+ Banded SDJ:     219    219    301    301      7      7
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16174D-07    0.16174D-07
+ Sparse: JACSP - VODE:     0.16174D-07    0.16174D-07
+ Banded: JACSP - VODE:     0.16174D-07    0.16174D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     305    305    402    402     10     10
+ Sparse SDJ:     305    305    474    474     11     11
+ Banded SDJ:     305    305    402    402     10     10
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16174D-07    0.16174D-07
+ Sparse: JACSP - VODE:     0.16174D-07    0.16174D-07
+ Banded: JACSP - VODE:     0.16174D-07    0.16174D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     305    305    402    402     10     10
+ Sparse SDJ:     305    305    474    474     11     11
+ Banded SDJ:     305    305    402    402     10     10
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16949D-08    0.16949D-08
+ Sparse: JACSP - VODE:     0.16949D-08    0.16949D-08
+ Banded: JACSP - VODE:     0.16949D-08    0.16949D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     426    426    529    529     11     11
+ Sparse SDJ:     426    426    619    619     13     13
+ Banded SDJ:     426    426    529    529     11     11
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16949D-08    0.16949D-08
+ Sparse: JACSP - VODE:     0.16949D-08    0.16949D-08
+ Banded: JACSP - VODE:     0.16949D-08    0.16949D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     426    426    529    529     11     11
+ Sparse SDJ:     426    426    619    619     13     13
+ Banded SDJ:     426    426    529    529     11     11
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.32141D-09    0.32141D-09
+ Sparse: JACSP - VODE:     0.32141D-09    0.32141D-09
+ Banded: JACSP - VODE:     0.32141D-09    0.32141D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     598    598    735    735     16     16
+ Sparse SDJ:     598    598    867    867     19     19
+ Banded SDJ:     598    598    735    735     16     16
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32141D-09    0.32141D-09
+ Sparse: JACSP - VODE:     0.32141D-09    0.32141D-09
+ Banded: JACSP - VODE:     0.32141D-09    0.32141D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     598    598    735    735     16     16
+ Sparse SDJ:     598    598    867    867     19     19
+ Banded SDJ:     598    598    735    735     16     16
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.50269D-10    0.50269D-10
+ Sparse: JACSP - VODE:     0.50269D-10    0.50269D-10
+ Banded: JACSP - VODE:     0.50269D-10    0.50269D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     846    846   1006   1005     19     19
+ Sparse SDJ:     846    846   1204   1203     26     26
+ Banded SDJ:     846    846   1006   1005     19     19
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.50269D-10    0.50269D-10
+ Sparse: JACSP - VODE:     0.50269D-10    0.50269D-10
+ Banded: JACSP - VODE:     0.50269D-10    0.50269D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     846    846   1006   1005     19     19
+ Sparse SDJ:     846    846   1204   1203     26     26
+ Banded SDJ:     846    846   1006   1005     19     19
+ ____________________________________________________________
+
+ Problem No. =  13
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.80713D-11    0.80714D-11
+ Sparse: JACSP - VODE:     0.80714D-11    0.80714D-11
+ Banded: JACSP - VODE:     0.80713D-11    0.80714D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1254   1254   1463   1463     27     27
+ Sparse SDJ:    1254   1254   1733   1733     36     36
+ Banded SDJ:    1254   1254   1463   1463     27     27
+ ____________________________________________________________
+ Problem No. =  13
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.80713D-11    0.80714D-11
+ Sparse: JACSP - VODE:     0.80714D-11    0.80714D-11
+ Banded: JACSP - VODE:     0.80713D-11    0.80714D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1254   1254   1463   1463     27     27
+ Sparse SDJ:    1254   1254   1733   1733     36     36
+ Banded SDJ:    1254   1254   1463   1463     27     27
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = B4
+
+ Problem No. =  14
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.24517D-04    0.24517D-04
+ Sparse: JACSP - VODE:     0.24517D-04    0.24517D-04
+ Banded: JACSP - VODE:     0.24517D-04    0.24517D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     182    182    236    236      5      5
+ Sparse SDJ:     182    182    302    302      8      8
+ Banded SDJ:     182    182    236    236      5      5
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.13286D-04    0.13286D-04
+ Sparse: JACSP - VODE:     0.13286D-04    0.13286D-04
+ Banded: JACSP - VODE:     0.13286D-04    0.13286D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     169    169    223    223      5      5
+ Sparse SDJ:     169    169    289    289      8      8
+ Banded SDJ:     169    169    223    223      5      5
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12312D-05    0.12312D-05
+ Sparse: JACSP - VODE:     0.12312D-05    0.12312D-05
+ Banded: JACSP - VODE:     0.12312D-05    0.12312D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     276    276    343    343      7      7
+ Sparse SDJ:     276    276    433    433     11     11
+ Banded SDJ:     276    276    343    343      7      7
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17836D-05    0.17836D-05
+ Sparse: JACSP - VODE:     0.17836D-05    0.17836D-05
+ Banded: JACSP - VODE:     0.17836D-05    0.17836D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     303    303    386    386      9      9
+ Sparse SDJ:     303    303    464    464     11     11
+ Banded SDJ:     303    303    386    386      9      9
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.88396D-07    0.88396D-07
+ Sparse: JACSP - VODE:     0.88396D-07    0.88396D-07
+ Banded: JACSP - VODE:     0.88396D-07    0.88396D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     373    373    461    461     10     10
+ Sparse SDJ:     373    373    557    557     13     13
+ Banded SDJ:     373    373    461    461     10     10
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.12901D-06    0.12901D-06
+ Sparse: JACSP - VODE:     0.12901D-06    0.12901D-06
+ Banded: JACSP - VODE:     0.12901D-06    0.12901D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     364    364    453    453     10     10
+ Sparse SDJ:     364    364    549    549     13     13
+ Banded SDJ:     364    364    453    453     10     10
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10211D-07    0.10211D-07
+ Sparse: JACSP - VODE:     0.10211D-07    0.10211D-07
+ Banded: JACSP - VODE:     0.10211D-07    0.10211D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     585    585    725    725     15     15
+ Sparse SDJ:     585    585    851    851     18     18
+ Banded SDJ:     585    585    725    725     15     15
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.37012D-07    0.37012D-07
+ Sparse: JACSP - VODE:     0.37012D-07    0.37012D-07
+ Banded: JACSP - VODE:     0.37012D-07    0.37012D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     592    592    737    737     15     15
+ Sparse SDJ:     592    592    863    863     18     18
+ Banded SDJ:     592    592    737    737     15     15
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.42677D-08    0.42677D-08
+ Sparse: JACSP - VODE:     0.42677D-08    0.42677D-08
+ Banded: JACSP - VODE:     0.42677D-08    0.42677D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     798    798    960    960     18     18
+ Sparse SDJ:     798    798   1140   1140     24     24
+ Banded SDJ:     798    798    960    960     18     18
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.84210D-09    0.84210D-09
+ Sparse: JACSP - VODE:     0.84210D-09    0.84210D-09
+ Banded: JACSP - VODE:     0.84210D-09    0.84210D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     844    844   1015   1015     19     19
+ Sparse SDJ:     844    844   1225   1225     27     27
+ Banded SDJ:     844    844   1015   1015     19     19
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.33828D-09    0.33829D-09
+ Sparse: JACSP - VODE:     0.33829D-09    0.33829D-09
+ Banded: JACSP - VODE:     0.33828D-09    0.33829D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1106   1106   1299   1300     24     24
+ Sparse SDJ:    1106   1106   1527   1528     31     31
+ Banded SDJ:    1106   1106   1299   1300     24     24
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.19133D-09    0.19133D-09
+ Sparse: JACSP - VODE:     0.19134D-09    0.19133D-09
+ Banded: JACSP - VODE:     0.19133D-09    0.19133D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1129   1129   1323   1324     24     24
+ Sparse SDJ:    1129   1129   1563   1564     32     32
+ Banded SDJ:    1129   1129   1323   1324     24     24
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.24207D-10    0.24207D-10
+ Sparse: JACSP - VODE:     0.24207D-10    0.24207D-10
+ Banded: JACSP - VODE:     0.24207D-10    0.24207D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1319   1319   1544   1544     28     28
+ Sparse SDJ:    1319   1319   1832   1832     38     38
+ Banded SDJ:    1319   1319   1544   1544     28     28
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.52820D-10    0.52820D-10
+ Sparse: JACSP - VODE:     0.53140D-10    0.52821D-10
+ Banded: JACSP - VODE:     0.52820D-10    0.52820D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1404   1404   1635   1635     29     29
+ Sparse SDJ:    1404   1404   1953   1953     41     41
+ Banded SDJ:    1404   1404   1635   1635     29     29
+ ____________________________________________________________
+
+ Problem No. =  14
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.66490D-11    0.66488D-11
+ Sparse: JACSP - VODE:     0.66484D-11    0.66484D-11
+ Banded: JACSP - VODE:     0.66490D-11    0.66488D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    2001   2001   2293   2293     39     39
+ Sparse SDJ:    2001   2001   2707   2707     54     54
+ Banded SDJ:    2001   2001   2293   2293     39     39
+ ____________________________________________________________
+ Problem No. =  14
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.55017D-11    0.54995D-11
+ Sparse: JACSP - VODE:     0.54998D-11    0.54995D-11
+ Banded: JACSP - VODE:     0.55017D-11    0.54995D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    2020   2020   2315   2315     40     40
+ Sparse SDJ:    2020   2020   2747   2747     56     56
+ Banded SDJ:    2020   2020   2315   2315     40     40
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = B5
+
+ Problem No. =  15
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16202D-04    0.16206D-04
+ Sparse: JACSP - VODE:     0.16197D-04    0.16213D-04
+ Banded: JACSP - VODE:     0.16202D-04    0.16206D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:    2551   2551   2963   2963     46     46
+ Sparse SDJ:    2551   2551   3551   3551     72     72
+ Banded SDJ:    2551   2551   2963   2963     46     46
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.22721D-03    0.22722D-03
+ Sparse: JACSP - VODE:     0.22721D-03    0.22722D-03
+ Banded: JACSP - VODE:     0.22721D-03    0.22722D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:    2552   2552   3023   3023     46     46
+ Sparse SDJ:    2552   2552   3587   3587     70     70
+ Banded SDJ:    2552   2552   3023   3023     46     46
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.22347D-04    0.22340D-04
+ Sparse: JACSP - VODE:     0.22488D-04    0.22377D-04
+ Banded: JACSP - VODE:     0.22347D-04    0.22340D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:    2619   2619   3088   3088     49     49
+ Sparse SDJ:    2619   2620   3658   3659     72     72
+ Banded SDJ:    2619   2619   3088   3088     49     49
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.61734D-05    0.61741D-05
+ Sparse: JACSP - VODE:     0.61736D-05    0.57991D-05
+ Banded: JACSP - VODE:     0.61734D-05    0.61741D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:    2684   2684   3153   3153     49     49
+ Sparse SDJ:    2684   2684   3723   3723     72     72
+ Banded SDJ:    2684   2684   3153   3153     49     49
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20089D-05    0.20088D-05
+ Sparse: JACSP - VODE:     0.20088D-05    0.20087D-05
+ Banded: JACSP - VODE:     0.20089D-05    0.20088D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:    2868   2868   3382   3382     53     53
+ Sparse SDJ:    2868   2868   3976   3976     76     76
+ Banded SDJ:    2868   2868   3382   3382     53     53
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.24118D-05    0.24117D-05
+ Sparse: JACSP - VODE:     0.24119D-05    0.24117D-05
+ Banded: JACSP - VODE:     0.24118D-05    0.24117D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:    2961   2961   3451   3451     55     55
+ Sparse SDJ:    2961   2961   4129   4129     84     84
+ Banded SDJ:    2961   2961   3451   3451     55     55
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.39550D-06    0.42399D-06
+ Sparse: JACSP - VODE:     0.40233D-06    0.40166D-06
+ Banded: JACSP - VODE:     0.39550D-06    0.42399D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:    3239   3238   3774   3773     59     59
+ Sparse SDJ:    3239   3239   4488   4488     89     89
+ Banded SDJ:    3239   3238   3774   3773     59     59
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.87365D-07    0.87363D-07
+ Sparse: JACSP - VODE:     0.87365D-07    0.87362D-07
+ Banded: JACSP - VODE:     0.87365D-07    0.87363D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    3304   3304   3852   3852     60     60
+ Sparse SDJ:    3304   3304   4560   4560     89     89
+ Banded SDJ:    3304   3304   3852   3852     60     60
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28880D-07    0.28967D-07
+ Sparse: JACSP - VODE:     0.28889D-07    0.28919D-07
+ Banded: JACSP - VODE:     0.28880D-07    0.28967D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    3790   3790   4373   4374     69     69
+ Sparse SDJ:    3790   3790   5183   5184    102    102
+ Banded SDJ:    3790   3790   4373   4374     69     69
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10516D-07    0.10516D-07
+ Sparse: JACSP - VODE:     0.10516D-07    0.10516D-07
+ Banded: JACSP - VODE:     0.10516D-07    0.10516D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    3856   3856   4465   4464     70     70
+ Sparse SDJ:    3856   3856   5305   5304    105    105
+ Banded SDJ:    3856   3856   4465   4464     70     70
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.31884D-08    0.29670D-08
+ Sparse: JACSP - VODE:     0.23023D-09    0.41516D-09
+ Banded: JACSP - VODE:     0.31884D-08    0.29670D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    4571   4572   5275   5276     83     83
+ Sparse SDJ:    4587   4584   6251   6258    123    123
+ Banded SDJ:    4571   4572   5275   5276     83     83
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.51657D-08    0.51657D-08
+ Sparse: JACSP - VODE:     0.51657D-08    0.51657D-08
+ Banded: JACSP - VODE:     0.51657D-08    0.51657D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    4689   4689   5407   5406     86     86
+ Sparse SDJ:    4689   4689   6427   6426    128    128
+ Banded SDJ:    4689   4689   5407   5406     86     86
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.60011D-10    0.61168D-10
+ Sparse: JACSP - VODE:     0.55650D-10    0.42571D-10
+ Banded: JACSP - VODE:     0.60011D-10    0.61168D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    5843   5843   6685   6685    104    104
+ Sparse SDJ:    5843   5858   7937   7996    156    160
+ Banded SDJ:    5843   5843   6685   6685    104    104
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.25756D-10    0.25336D-10
+ Sparse: JACSP - VODE:     0.24896D-10    0.34461D-10
+ Banded: JACSP - VODE:     0.25756D-10    0.25336D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    6016   6016   6870   6869    107    107
+ Sparse SDJ:    6016   6014   8122   8107    158    157
+ Banded SDJ:    6016   6016   6870   6869    107    107
+ ____________________________________________________________
+
+ Problem No. =  15
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.37228D-11    0.90034D-11
+ Sparse: JACSP - VODE:     0.20030D-10    0.29004D-11
+ Banded: JACSP - VODE:     0.37228D-11    0.90034D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    7522   7516   8540   8566    133    132
+ Sparse SDJ:    7506   7542  10173  10206    197    199
+ Banded SDJ:    7522   7516   8540   8566    133    132
+ ____________________________________________________________
+ Problem No. =  15
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.15909D-10    0.66611D-11
+ Sparse: JACSP - VODE:     0.77797D-11    0.26811D-11
+ Banded: JACSP - VODE:     0.15909D-10    0.66611D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    7698   7702   8751   8751    136    136
+ Sparse SDJ:    7701   7706  10385  10399    204    205
+ Banded SDJ:    7698   7702   8751   8751    136    136
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = C1
+
+ Problem No. =  21
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20168D-04    0.20165D-04
+ Sparse: JACSP - VODE:     0.20211D-05    0.20198D-05
+ Banded: JACSP - VODE:     0.20168D-04    0.20165D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     135    135    196    196      6      6
+ Sparse SDJ:     144    144    237    237      6      6
+ Banded SDJ:     135    135    196    196      6      6
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.21725D-06    0.21724D-06
+ Sparse: JACSP - VODE:     0.15396D-05    0.15394D-05
+ Banded: JACSP - VODE:     0.21725D-06    0.21724D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     141    141    199    199      6      6
+ Sparse SDJ:     138    138    214    214      5      5
+ Banded SDJ:     141    141    199    199      6      6
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20968D-06    0.20967D-06
+ Sparse: JACSP - VODE:     0.53723D-06    0.53735D-06
+ Banded: JACSP - VODE:     0.20968D-06    0.20967D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     182    182    254    254      7      7
+ Sparse SDJ:     184    184    298    298      8      8
+ Banded SDJ:     182    182    254    254      7      7
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.33301D-07    0.33301D-07
+ Sparse: JACSP - VODE:     0.90321D-06    0.90318D-06
+ Banded: JACSP - VODE:     0.33301D-07    0.33301D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     186    186    255    255      7      7
+ Sparse SDJ:     183    183    301    301      8      8
+ Banded SDJ:     186    186    255    255      7      7
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.26281D-07    0.26281D-07
+ Sparse: JACSP - VODE:     0.49626D-08    0.49625D-08
+ Banded: JACSP - VODE:     0.26281D-07    0.26281D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     269    269    352    352      9      9
+ Sparse SDJ:     265    265    405    405     11     11
+ Banded SDJ:     269    269    352    352      9      9
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.57591D-08    0.57592D-08
+ Sparse: JACSP - VODE:     0.85781D-08    0.85755D-08
+ Banded: JACSP - VODE:     0.57591D-08    0.57592D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     267    267    354    354      9      9
+ Sparse SDJ:     266    266    409    409     11     11
+ Banded SDJ:     267    267    354    354      9      9
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.18517D-08    0.18517D-08
+ Sparse: JACSP - VODE:     0.18530D-08    0.18530D-08
+ Banded: JACSP - VODE:     0.18517D-08    0.18517D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     367    367    464    464     12     12
+ Sparse SDJ:     367    367    520    520     13     13
+ Banded SDJ:     367    367    464    464     12     12
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.34941D-08    0.34941D-08
+ Sparse: JACSP - VODE:     0.35009D-08    0.35009D-08
+ Banded: JACSP - VODE:     0.34941D-08    0.34941D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     368    368    463    463     12     12
+ Sparse SDJ:     368    368    519    519     13     13
+ Banded SDJ:     368    368    463    463     12     12
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21201D-08    0.21201D-08
+ Sparse: JACSP - VODE:     0.21699D-08    0.21699D-08
+ Banded: JACSP - VODE:     0.21201D-08    0.21201D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     525    525    643    643     16     16
+ Sparse SDJ:     525    525    724    724     18     18
+ Banded SDJ:     525    525    643    643     16     16
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32933D-08    0.32933D-08
+ Sparse: JACSP - VODE:     0.33742D-08    0.33742D-08
+ Banded: JACSP - VODE:     0.32933D-08    0.32933D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     525    525    643    643     16     16
+ Sparse SDJ:     525    525    724    724     18     18
+ Banded SDJ:     525    525    643    643     16     16
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.25669D-09    0.25669D-09
+ Sparse: JACSP - VODE:     0.10058D-09    0.10058D-09
+ Banded: JACSP - VODE:     0.25669D-09    0.25669D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     735    735    888    888     19     19
+ Sparse SDJ:     734    734   1001   1001     24     24
+ Banded SDJ:     735    735    888    888     19     19
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.25390D-09    0.25390D-09
+ Sparse: JACSP - VODE:     0.24187D-09    0.24187D-09
+ Banded: JACSP - VODE:     0.25390D-09    0.25390D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     736    736    886    886     19     19
+ Sparse SDJ:     736    736   1006   1006     24     24
+ Banded SDJ:     736    736    886    886     19     19
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.61172D-11    0.61175D-11
+ Sparse: JACSP - VODE:     0.61120D-11    0.61119D-11
+ Banded: JACSP - VODE:     0.61172D-11    0.61175D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1070   1070   1229   1229     25     25
+ Sparse SDJ:    1070   1070   1386   1386     32     32
+ Banded SDJ:    1070   1070   1229   1229     25     25
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.61056D-11    0.61056D-11
+ Sparse: JACSP - VODE:     0.61009D-11    0.61009D-11
+ Banded: JACSP - VODE:     0.61056D-11    0.61056D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1072   1072   1231   1231     25     25
+ Sparse SDJ:    1072   1072   1388   1388     32     32
+ Banded SDJ:    1072   1072   1231   1231     25     25
+ ____________________________________________________________
+
+ Problem No. =  21
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.93097D-12    0.93085D-12
+ Sparse: JACSP - VODE:     0.99165D-12    0.99169D-12
+ Banded: JACSP - VODE:     0.93097D-12    0.93085D-12
+                   J      V      J      V      J      V
+ Dense  SDJ:    1545   1545   1746   1746     34     34
+ Sparse SDJ:    1545   1545   1987   1987     47     47
+ Banded SDJ:    1545   1545   1746   1746     34     34
+ ____________________________________________________________
+ Problem No. =  21
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.95595D-12    0.95569D-12
+ Sparse: JACSP - VODE:     0.95538D-12    0.95546D-12
+ Banded: JACSP - VODE:     0.95595D-12    0.95569D-12
+                   J      V      J      V      J      V
+ Dense  SDJ:    1548   1548   1749   1749     34     34
+ Sparse SDJ:    1548   1548   1990   1990     47     47
+ Banded SDJ:    1548   1548   1749   1749     34     34
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = C2
+
+ Problem No. =  22
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28851D-06    0.28851D-06
+ Sparse: JACSP - VODE:     0.38024D-05    0.38024D-05
+ Banded: JACSP - VODE:     0.28851D-06    0.28851D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     135    135    191    191      6      6
+ Sparse SDJ:     134    134    210    210      5      5
+ Banded SDJ:     135    135    191    191      6      6
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.26613D-06    0.26613D-06
+ Sparse: JACSP - VODE:     0.44573D-05    0.44573D-05
+ Banded: JACSP - VODE:     0.26613D-06    0.26613D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     137    137    196    196      6      6
+ Sparse SDJ:     136    136    211    211      5      5
+ Banded SDJ:     137    137    196    196      6      6
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.55706D-07    0.55706D-07
+ Sparse: JACSP - VODE:     0.19179D-05    0.19179D-05
+ Banded: JACSP - VODE:     0.55706D-07    0.55706D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     177    177    252    252      8      8
+ Sparse SDJ:     175    175    286    286      8      8
+ Banded SDJ:     177    177    252    252      8      8
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.21868D-07    0.21868D-07
+ Sparse: JACSP - VODE:     0.21958D-06    0.21958D-06
+ Banded: JACSP - VODE:     0.21868D-07    0.21868D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     178    178    253    253      8      8
+ Sparse SDJ:     177    177    287    287      8      8
+ Banded SDJ:     178    178    253    253      8      8
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.42538D-07    0.42538D-07
+ Sparse: JACSP - VODE:     0.49231D-07    0.49236D-07
+ Banded: JACSP - VODE:     0.42538D-07    0.42538D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     239    239    330    330      9      9
+ Sparse SDJ:     240    240    367    367      9      9
+ Banded SDJ:     239    239    330    330      9      9
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.19503D-07    0.19503D-07
+ Sparse: JACSP - VODE:     0.41482D-06    0.41483D-06
+ Banded: JACSP - VODE:     0.19503D-07    0.19503D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     242    242    334    334      9      9
+ Sparse SDJ:     241    241    379    379     10     10
+ Banded SDJ:     242    242    334    334      9      9
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.58869D-08    0.58869D-08
+ Sparse: JACSP - VODE:     0.60414D-08    0.60484D-08
+ Banded: JACSP - VODE:     0.58869D-08    0.58869D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     336    336    435    435     11     11
+ Sparse SDJ:     336    336    495    495     13     13
+ Banded SDJ:     336    336    435    435     11     11
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.56117D-07    0.56117D-07
+ Sparse: JACSP - VODE:     0.65117D-07    0.64005D-07
+ Banded: JACSP - VODE:     0.56117D-07    0.56117D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     340    340    444    444     11     11
+ Sparse SDJ:     339    339    502    502     13     13
+ Banded SDJ:     340    340    444    444     11     11
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.63349D-09    0.63349D-09
+ Sparse: JACSP - VODE:     0.63784D-09    0.63783D-09
+ Banded: JACSP - VODE:     0.63349D-09    0.63349D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     460    460    573    573     14     14
+ Sparse SDJ:     460    460    637    637     15     15
+ Banded SDJ:     460    460    573    573     14     14
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.31902D-09    0.31903D-09
+ Sparse: JACSP - VODE:     0.32844D-09    0.32843D-09
+ Banded: JACSP - VODE:     0.31902D-09    0.31903D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     465    465    579    579     14     14
+ Sparse SDJ:     465    465    643    643     15     15
+ Banded SDJ:     465    465    579    579     14     14
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.46526D-09    0.46526D-09
+ Sparse: JACSP - VODE:     0.46606D-09    0.46582D-09
+ Banded: JACSP - VODE:     0.46526D-09    0.46526D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     661    661    796    796     18     18
+ Sparse SDJ:     661    661    900    900     22     22
+ Banded SDJ:     661    661    796    796     18     18
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.79985D-09    0.79983D-09
+ Sparse: JACSP - VODE:     0.80670D-09    0.80675D-09
+ Banded: JACSP - VODE:     0.79985D-09    0.79983D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     669    669    804    804     18     18
+ Sparse SDJ:     669    669    908    908     22     22
+ Banded SDJ:     669    669    804    804     18     18
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17746D-10    0.17755D-10
+ Sparse: JACSP - VODE:     0.17742D-10    0.17735D-10
+ Banded: JACSP - VODE:     0.17746D-10    0.17755D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     936    936   1090   1090     22     22
+ Sparse SDJ:     936    936   1235   1235     29     29
+ Banded SDJ:     936    936   1090   1090     22     22
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18913D-10    0.18911D-10
+ Sparse: JACSP - VODE:     0.18912D-10    0.18915D-10
+ Banded: JACSP - VODE:     0.18913D-10    0.18911D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     947    947   1104   1104     23     23
+ Sparse SDJ:     947    947   1245   1245     29     29
+ Banded SDJ:     947    947   1104   1104     23     23
+ ____________________________________________________________
+
+ Problem No. =  22
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.35293D-11    0.35285D-11
+ Sparse: JACSP - VODE:     0.35295D-11    0.35303D-11
+ Banded: JACSP - VODE:     0.35293D-11    0.35285D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1384   1384   1577   1577     31     31
+ Sparse SDJ:    1384   1384   1759   1759     38     38
+ Banded SDJ:    1384   1384   1577   1577     31     31
+ ____________________________________________________________
+ Problem No. =  22
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.43547D-11    0.43643D-11
+ Sparse: JACSP - VODE:     0.43714D-11    0.43787D-11
+ Banded: JACSP - VODE:     0.43547D-11    0.43643D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1399   1399   1592   1592     31     31
+ Sparse SDJ:    1399   1399   1782   1782     39     39
+ Banded SDJ:    1399   1399   1592   1592     31     31
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = C3
+
+ Problem No. =  23
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.30005D-05    0.30005D-05
+ Sparse: JACSP - VODE:     0.74788D-06    0.74788D-06
+ Banded: JACSP - VODE:     0.30005D-05    0.30005D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     127    127    180    180      5      5
+ Sparse SDJ:     127    127    198    198      5      5
+ Banded SDJ:     127    127    180    180      5      5
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.58233D-05    0.58233D-05
+ Sparse: JACSP - VODE:     0.13384D-05    0.13384D-05
+ Banded: JACSP - VODE:     0.58233D-05    0.58233D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     127    127    182    182      5      5
+ Sparse SDJ:     128    128    199    199      5      5
+ Banded SDJ:     127    127    182    182      5      5
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.37237D-07    0.37237D-07
+ Sparse: JACSP - VODE:     0.36349D-06    0.36350D-06
+ Banded: JACSP - VODE:     0.37237D-07    0.37237D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     174    174    249    249      7      7
+ Sparse SDJ:     173    173    289    289      8      8
+ Banded SDJ:     174    174    249    249      7      7
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.23894D-07    0.23894D-07
+ Sparse: JACSP - VODE:     0.13264D-05    0.13264D-05
+ Banded: JACSP - VODE:     0.23894D-07    0.23894D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     174    174    249    249      7      7
+ Sparse SDJ:     173    173    290    290      8      8
+ Banded SDJ:     174    174    249    249      7      7
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.75664D-07    0.75664D-07
+ Sparse: JACSP - VODE:     0.91194D-07    0.91194D-07
+ Banded: JACSP - VODE:     0.75664D-07    0.75664D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     239    239    332    332      9      9
+ Sparse SDJ:     238    238    367    367      9      9
+ Banded SDJ:     239    239    332    332      9      9
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.71641D-07    0.71641D-07
+ Sparse: JACSP - VODE:     0.85808D-07    0.85808D-07
+ Banded: JACSP - VODE:     0.71641D-07    0.71641D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     241    241    334    334      9      9
+ Sparse SDJ:     240    240    369    369      9      9
+ Banded SDJ:     241    241    334    334      9      9
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.47449D-08    0.47449D-08
+ Sparse: JACSP - VODE:     0.32007D-08    0.32007D-08
+ Banded: JACSP - VODE:     0.47449D-08    0.47449D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     324    324    413    413     10     10
+ Sparse SDJ:     324    324    461    461     11     11
+ Banded SDJ:     324    324    413    413     10     10
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.30034D-09    0.30035D-09
+ Sparse: JACSP - VODE:     0.13574D-08    0.13570D-08
+ Banded: JACSP - VODE:     0.30034D-09    0.30035D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     327    327    415    415     10     10
+ Sparse SDJ:     325    325    462    462     11     11
+ Banded SDJ:     327    327    415    415     10     10
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.48844D-09    0.48844D-09
+ Sparse: JACSP - VODE:     0.47464D-09    0.47465D-09
+ Banded: JACSP - VODE:     0.48844D-09    0.48844D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     468    468    570    570     13     13
+ Sparse SDJ:     468    468    639    639     15     15
+ Banded SDJ:     468    468    570    570     13     13
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.94382D-09    0.94382D-09
+ Sparse: JACSP - VODE:     0.31511D-08    0.31507D-08
+ Banded: JACSP - VODE:     0.94382D-09    0.94382D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     469    469    571    571     13     13
+ Sparse SDJ:     469    469    643    643     15     15
+ Banded SDJ:     469    469    571    571     13     13
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17845D-09    0.17842D-09
+ Sparse: JACSP - VODE:     0.32244D-10    0.33598D-10
+ Banded: JACSP - VODE:     0.17845D-09    0.17842D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     656    656    783    783     17     17
+ Sparse SDJ:     652    652    881    881     20     20
+ Banded SDJ:     656    656    783    783     17     17
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.34163D-09    0.34159D-09
+ Sparse: JACSP - VODE:     0.11422D-09    0.11570D-09
+ Banded: JACSP - VODE:     0.34163D-09    0.34159D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     659    659    791    791     18     18
+ Sparse SDJ:     654    654    883    883     20     20
+ Banded SDJ:     659    659    791    791     18     18
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.13408D-10    0.13406D-10
+ Sparse: JACSP - VODE:     0.13238D-10    0.13312D-10
+ Banded: JACSP - VODE:     0.13408D-10    0.13406D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     923    923   1070   1070     22     22
+ Sparse SDJ:     923    923   1208   1208     28     28
+ Banded SDJ:     923    923   1070   1070     22     22
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.69820D-11    0.69813D-11
+ Sparse: JACSP - VODE:     0.69267D-11    0.69285D-11
+ Banded: JACSP - VODE:     0.69820D-11    0.69813D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     931    931   1077   1077     22     22
+ Sparse SDJ:     931    931   1214   1214     28     28
+ Banded SDJ:     931    931   1077   1077     22     22
+ ____________________________________________________________
+
+ Problem No. =  23
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.11434D-11    0.11453D-11
+ Sparse: JACSP - VODE:     0.11307D-11    0.11335D-11
+ Banded: JACSP - VODE:     0.11434D-11    0.11453D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1380   1380   1568   1568     30     30
+ Sparse SDJ:    1380   1380   1761   1761     39     39
+ Banded SDJ:    1380   1380   1568   1568     30     30
+ ____________________________________________________________
+ Problem No. =  23
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.22844D-11    0.22922D-11
+ Sparse: JACSP - VODE:     0.22662D-11    0.22640D-11
+ Banded: JACSP - VODE:     0.22844D-11    0.22922D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1385   1385   1573   1573     30     30
+ Sparse SDJ:    1385   1385   1766   1766     39     39
+ Banded SDJ:    1385   1385   1573   1573     30     30
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = C4
+
+ Problem No. =  24
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.23601D-05    0.23606D-05
+ Sparse: JACSP - VODE:     0.21357D-05    0.21360D-05
+ Banded: JACSP - VODE:     0.23601D-05    0.23606D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     114    114    162    162      4      4
+ Sparse SDJ:     107    107    175    175      5      5
+ Banded SDJ:     114    114    162    162      4      4
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.12272D-03    0.12272D-03
+ Sparse: JACSP - VODE:     0.15539D-02    0.15540D-02
+ Banded: JACSP - VODE:     0.12272D-03    0.12272D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:     155    155    224    224      6      6
+ Sparse SDJ:     149    149    237    237      5      5
+ Banded SDJ:     155    155    224    224      6      6
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.24962D-06    0.24967D-06
+ Sparse: JACSP - VODE:     0.62207D-06    0.62205D-06
+ Banded: JACSP - VODE:     0.24962D-06    0.24967D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     153    153    216    216      5      5
+ Sparse SDJ:     145    145    244    244      6      6
+ Banded SDJ:     153    153    216    216      5      5
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.59623D-04    0.59616D-04
+ Sparse: JACSP - VODE:     0.96022D-04    0.96016D-04
+ Banded: JACSP - VODE:     0.59623D-04    0.59616D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     202    202    315    315      8      8
+ Sparse SDJ:     194    194    319    319      8      8
+ Banded SDJ:     202    202    315    315      8      8
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.66996D-07    0.66996D-07
+ Sparse: JACSP - VODE:     0.35465D-06    0.35457D-06
+ Banded: JACSP - VODE:     0.66996D-07    0.66996D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     207    207    277    277      7      7
+ Sparse SDJ:     195    195    301    301      8      8
+ Banded SDJ:     207    207    277    277      7      7
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.64642D-04    0.64786D-04
+ Sparse: JACSP - VODE:     0.21539D-04    0.21542D-04
+ Banded: JACSP - VODE:     0.64642D-04    0.64786D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     254    254    374    374      9      9
+ Sparse SDJ:     254    254    412    412     11     11
+ Banded SDJ:     254    254    374    374      9      9
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.34294D-07    0.34084D-07
+ Sparse: JACSP - VODE:     0.11560D-07    0.11561D-07
+ Banded: JACSP - VODE:     0.34294D-07    0.34084D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     260    260    356    356      9      9
+ Sparse SDJ:     259    259    392    392     11     11
+ Banded SDJ:     260    260    356    356      9      9
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17307D-05    0.17307D-05
+ Sparse: JACSP - VODE:     0.20719D-05    0.20710D-05
+ Banded: JACSP - VODE:     0.17307D-05    0.17307D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     341    341    445    445     11     11
+ Sparse SDJ:     336    336    509    509     14     14
+ Banded SDJ:     341    341    445    445     11     11
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12527D-08    0.12549D-08
+ Sparse: JACSP - VODE:     0.58505D-08    0.58490D-08
+ Banded: JACSP - VODE:     0.12527D-08    0.12549D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     363    363    461    461     11     11
+ Sparse SDJ:     363    363    527    527     14     14
+ Banded SDJ:     363    363    461    461     11     11
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.49305D-06    0.49301D-06
+ Sparse: JACSP - VODE:     0.41085D-06    0.41093D-06
+ Banded: JACSP - VODE:     0.49305D-06    0.49301D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     483    483    605    605     14     14
+ Sparse SDJ:     480    480    653    653     15     15
+ Banded SDJ:     483    483    605    605     14     14
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.14706D-09    0.14704D-09
+ Sparse: JACSP - VODE:     0.19437D-09    0.19439D-09
+ Banded: JACSP - VODE:     0.14706D-09    0.14704D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     517    517    628    628     15     15
+ Sparse SDJ:     517    517    704    704     17     17
+ Banded SDJ:     517    517    628    628     15     15
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.38432D-07    0.38450D-07
+ Sparse: JACSP - VODE:     0.37833D-07    0.37837D-07
+ Banded: JACSP - VODE:     0.38432D-07    0.38450D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     694    694    826    826     18     18
+ Sparse SDJ:     683    683    944    944     25     25
+ Banded SDJ:     694    694    826    826     18     18
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.11799D-10    0.11793D-10
+ Sparse: JACSP - VODE:     0.11648D-10    0.11647D-10
+ Banded: JACSP - VODE:     0.11799D-10    0.11793D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     736    736    872    872     19     19
+ Sparse SDJ:     737    737    989    989     24     24
+ Banded SDJ:     736    736    872    872     19     19
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.30669D-08    0.30688D-08
+ Sparse: JACSP - VODE:     0.28321D-08    0.28331D-08
+ Banded: JACSP - VODE:     0.30669D-08    0.30688D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     993    993   1144   1144     23     23
+ Sparse SDJ:     993    993   1301   1301     31     31
+ Banded SDJ:     993    993   1144   1144     23     23
+ ____________________________________________________________
+
+ Problem No. =  24
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16558D-11    0.17458D-11
+ Sparse: JACSP - VODE:     0.16690D-11    0.16659D-11
+ Banded: JACSP - VODE:     0.16558D-11    0.17458D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1077   1077   1225   1229     24     25
+ Sparse SDJ:    1077   1077   1386   1386     32     32
+ Banded SDJ:    1077   1077   1225   1229     24     25
+ ____________________________________________________________
+ Problem No. =  24
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.40643D-09    0.41189D-09
+ Sparse: JACSP - VODE:     0.43048D-09    0.43229D-09
+ Banded: JACSP - VODE:     0.40643D-09    0.41189D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1442   1438   1634   1626     32     31
+ Sparse SDJ:    1438   1438   1849   1849     43     43
+ Banded SDJ:    1442   1438   1634   1626     32     31
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = C5
+
+ Problem No. =  25
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.67400D-06    0.67400D-06
+ Sparse: JACSP - VODE:     0.11030D-04    0.11033D-04
+ Banded: JACSP - VODE:     0.67400D-06    0.67400D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     103    103    135    135      3      3
+ Sparse SDJ:      97     97    158    158      5      5
+ Banded SDJ:     103    103    135    135      3      3
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.26298D-01    0.26298D-01
+ Sparse: JACSP - VODE:     0.11753D-01    0.11753D-01
+ Banded: JACSP - VODE:     0.26298D-01    0.26298D-01
+                   J      V      J      V      J      V
+ Dense  SDJ:     150    150    207    207      5      5
+ Sparse SDJ:     151    151    236    236      6      6
+ Banded SDJ:     150    150    207    207      5      5
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.83501D-06    0.83501D-06
+ Sparse: JACSP - VODE:     0.29749D-07    0.29749D-07
+ Banded: JACSP - VODE:     0.83501D-06    0.83501D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     147    147    208    208      5      5
+ Sparse SDJ:     145    145    222    222      6      6
+ Banded SDJ:     147    147    208    208      5      5
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.35452D-02    0.35452D-02
+ Sparse: JACSP - VODE:     0.13233D-01    0.13236D-01
+ Banded: JACSP - VODE:     0.35452D-02    0.35452D-02
+                   J      V      J      V      J      V
+ Dense  SDJ:     199    199    299    299      7      7
+ Sparse SDJ:     192    192    322    322      8      8
+ Banded SDJ:     199    199    299    299      7      7
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17272D-07    0.18149D-07
+ Sparse: JACSP - VODE:     0.44946D-06    0.46698D-06
+ Banded: JACSP - VODE:     0.17272D-07    0.18149D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     196    196    291    291      6      6
+ Sparse SDJ:     193    193    323    323      8      8
+ Banded SDJ:     196    196    291    291      6      6
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.61838D-02    0.61838D-02
+ Sparse: JACSP - VODE:     0.82646D-03    0.82625D-03
+ Banded: JACSP - VODE:     0.61838D-02    0.61838D-02
+                   J      V      J      V      J      V
+ Dense  SDJ:     256    256    342    342      9      9
+ Sparse SDJ:     258    258    413    413     11     11
+ Banded SDJ:     256    256    342    342      9      9
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.80857D-08    0.80857D-08
+ Sparse: JACSP - VODE:     0.58998D-07    0.59000D-07
+ Banded: JACSP - VODE:     0.80857D-08    0.80857D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     252    252    337    337      8      8
+ Sparse SDJ:     245    245    370    370     10     10
+ Banded SDJ:     252    252    337    337      8      8
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10668D-02    0.10670D-02
+ Sparse: JACSP - VODE:     0.35578D-03    0.35850D-03
+ Banded: JACSP - VODE:     0.10668D-02    0.10670D-02
+                   J      V      J      V      J      V
+ Dense  SDJ:     351    351    460    460     12     12
+ Sparse SDJ:     346    346    510    510     13     13
+ Banded SDJ:     351    351    460    460     12     12
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.48572D-08    0.48575D-08
+ Sparse: JACSP - VODE:     0.47832D-08    0.47376D-08
+ Banded: JACSP - VODE:     0.48572D-08    0.48575D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     345    345    443    443     11     11
+ Sparse SDJ:     347    347    491    491     12     12
+ Banded SDJ:     345    345    443    443     11     11
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16797D-04    0.16794D-04
+ Sparse: JACSP - VODE:     0.24274D-04    0.24272D-04
+ Banded: JACSP - VODE:     0.16797D-04    0.16794D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     478    478    608    608     14     14
+ Sparse SDJ:     492    492    682    682     16     16
+ Banded SDJ:     478    478    608    608     14     14
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.98321D-10    0.98313D-10
+ Sparse: JACSP - VODE:     0.10977D-09    0.10980D-09
+ Banded: JACSP - VODE:     0.98321D-10    0.98313D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     502    502    602    602     13     13
+ Sparse SDJ:     502    502    678    678     16     16
+ Banded SDJ:     502    502    602    602     13     13
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16340D-05    0.18191D-05
+ Sparse: JACSP - VODE:     0.30670D-05    0.30656D-05
+ Banded: JACSP - VODE:     0.16340D-05    0.18191D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     703    703    839    839     18     18
+ Sparse SDJ:     709    709    950    950     22     22
+ Banded SDJ:     703    703    839    839     18     18
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20969D-10    0.20983D-10
+ Sparse: JACSP - VODE:     0.20998D-10    0.21008D-10
+ Banded: JACSP - VODE:     0.20969D-10    0.20983D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     717    717    831    831     17     17
+ Sparse SDJ:     717    717    948    948     23     23
+ Banded SDJ:     717    717    831    831     17     17
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.45450D-06    0.45457D-06
+ Sparse: JACSP - VODE:     0.45160D-06    0.45246D-06
+ Banded: JACSP - VODE:     0.45450D-06    0.45457D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:    1023   1023   1189   1189     25     25
+ Sparse SDJ:    1023   1024   1314   1315     28     28
+ Banded SDJ:    1023   1023   1189   1189     25     25
+ ____________________________________________________________
+
+ Problem No. =  25
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.31619D-11    0.34199D-11
+ Sparse: JACSP - VODE:     0.34486D-11    0.34526D-11
+ Banded: JACSP - VODE:     0.31619D-11    0.34199D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1016   1016   1165   1165     24     24
+ Sparse SDJ:    1016   1016   1310   1310     30     30
+ Banded SDJ:    1016   1016   1165   1165     24     24
+ ____________________________________________________________
+ Problem No. =  25
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.66611D-07    0.64443D-07
+ Sparse: JACSP - VODE:     0.66982D-07    0.67274D-07
+ Banded: JACSP - VODE:     0.66611D-07    0.64443D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    1471   1472   1668   1669     32     32
+ Sparse SDJ:    1475   1475   1898   1898     44     44
+ Banded SDJ:    1471   1472   1668   1669     32     32
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = D1
+
+ Problem No. =  31
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.84203D-04    0.84092D-04
+ Sparse: JACSP - VODE:     0.83964D-04    0.83931D-04
+ Banded: JACSP - VODE:     0.84203D-04    0.84092D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      72     72    136    136      3      3
+ Sparse SDJ:      72     72    151    151      4      4
+ Banded SDJ:      72     72    136    136      3      3
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10988D-02    0.15815D-02
+ Sparse: JACSP - VODE:     0.84515D-03    0.14478D-02
+ Banded: JACSP - VODE:     0.10988D-02    0.15815D-02
+                   J      V      J      V      J      V
+ Dense  SDJ:     153    154    265    265      4      3
+ Sparse SDJ:     146    152    294    281      7      6
+ Banded SDJ:     153    154    265    265      4      3
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.11006D-04    0.11011D-04
+ Sparse: JACSP - VODE:     0.28008D-04    0.28008D-04
+ Banded: JACSP - VODE:     0.11006D-04    0.11011D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     142    142    237    237      3      3
+ Sparse SDJ:     140    140    232    232      5      5
+ Banded SDJ:     142    142    237    237      3      3
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.23503D-03    0.13043D-03
+ Sparse: JACSP - VODE:     0.20596D-03    0.46695D-04
+ Banded: JACSP - VODE:     0.23503D-03    0.13043D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:     208    205    366    348      5      5
+ Sparse SDJ:     177    196    325    360      8      8
+ Banded SDJ:     208    205    366    348      5      5
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.81574D-06    0.19719D-05
+ Sparse: JACSP - VODE:     0.26073D-05    0.18508D-05
+ Banded: JACSP - VODE:     0.81574D-06    0.19719D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     193    216    298    330      5      5
+ Sparse SDJ:     190    206    337    360      8      8
+ Banded SDJ:     193    216    298    330      5      5
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.23586D-04    0.11522D-04
+ Sparse: JACSP - VODE:     0.16189D-04    0.11153D-04
+ Banded: JACSP - VODE:     0.23586D-04    0.11522D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     274    298    420    480      6      7
+ Sparse SDJ:     323    326    547    593     12     14
+ Banded SDJ:     274    298    420    480      6      7
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16855D-06    0.24683D-06
+ Sparse: JACSP - VODE:     0.39249D-06    0.87601D-07
+ Banded: JACSP - VODE:     0.16855D-06    0.24683D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     301    375    467    555      7      8
+ Sparse SDJ:     397    390    665    663     15     16
+ Banded SDJ:     301    375    467    555      7      8
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17604D-05    0.16896D-05
+ Sparse: JACSP - VODE:     0.17090D-05    0.19005D-05
+ Banded: JACSP - VODE:     0.17604D-05    0.16896D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     418    419    611    612     10     10
+ Sparse SDJ:     380    414    623    696     13     16
+ Banded SDJ:     418    419    611    612     10     10
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.44446D-08    0.55273D-08
+ Sparse: JACSP - VODE:     0.18151D-07    0.23834D-07
+ Banded: JACSP - VODE:     0.44446D-08    0.55273D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     489    493    733    738     11     12
+ Sparse SDJ:     510    513    858    883     19     20
+ Banded SDJ:     489    493    733    738     11     12
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18208D-06    0.33049D-06
+ Sparse: JACSP - VODE:     0.15953D-06    0.15611D-06
+ Banded: JACSP - VODE:     0.18208D-06    0.33049D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     574    591    823    851     14     14
+ Sparse SDJ:     627    592   1032    958     24     23
+ Banded SDJ:     574    591    823    851     14     14
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.36247D-08    0.49973D-08
+ Sparse: JACSP - VODE:     0.28838D-08    0.64512D-08
+ Banded: JACSP - VODE:     0.36247D-08    0.49973D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     573    609    815    884     13     13
+ Sparse SDJ:     578    531    926    856     22     20
+ Banded SDJ:     573    609    815    884     13     13
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.54675D-07    0.45975D-07
+ Sparse: JACSP - VODE:     0.50422D-07    0.36615D-07
+ Banded: JACSP - VODE:     0.54675D-07    0.45975D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     728    747    998   1062     17     17
+ Sparse SDJ:     723    741   1169   1197     28     29
+ Banded SDJ:     728    747    998   1062     17     17
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.55292D-09    0.87426D-09
+ Sparse: JACSP - VODE:     0.60922D-09    0.70994D-09
+ Banded: JACSP - VODE:     0.55292D-09    0.87426D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     769    732   1067   1029     17     16
+ Sparse SDJ:     712    659   1117    997     26     24
+ Banded SDJ:     769    732   1067   1029     17     16
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.91100D-08    0.85188D-08
+ Sparse: JACSP - VODE:     0.93494D-08    0.11165D-07
+ Banded: JACSP - VODE:     0.91100D-08    0.85188D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     898    903   1212   1203     20     21
+ Sparse SDJ:     886    887   1327   1253     34     30
+ Banded SDJ:     898    903   1212   1203     20     21
+ ____________________________________________________________
+
+ Problem No. =  31
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.14691D-09    0.16629D-09
+ Sparse: JACSP - VODE:     0.18243D-09    0.17895D-09
+ Banded: JACSP - VODE:     0.14691D-09    0.16629D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     896    899   1167   1201     20     21
+ Sparse SDJ:     872    840   1274   1197     31     29
+ Banded SDJ:     896    899   1167   1201     20     21
+ ____________________________________________________________
+ Problem No. =  31
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16952D-08    0.21392D-08
+ Sparse: JACSP - VODE:     0.22937D-08    0.18082D-08
+ Banded: JACSP - VODE:     0.16952D-08    0.21392D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1131   1129   1382   1372     25     24
+ Sparse SDJ:    1147   1119   1584   1485     41     35
+ Banded SDJ:    1131   1129   1382   1372     25     24
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = D2
+
+ Problem No. =  32
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.18943D-04    0.97897D-05
+ Sparse: JACSP - VODE:     0.14727D-05    0.50011D-04
+ Banded: JACSP - VODE:     0.18943D-04    0.97897D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     155    173    226    266      3      4
+ Sparse SDJ:     248    155    436    267     11      7
+ Banded SDJ:     155    173    226    266      3      4
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.41585D-03    0.41606D-03
+ Sparse: JACSP - VODE:     0.93984D-03    0.93199D-03
+ Banded: JACSP - VODE:     0.41585D-03    0.41606D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:     139    139    184    183      3      3
+ Sparse SDJ:     160    161    266    266      8      8
+ Banded SDJ:     139    139    184    183      3      3
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.51810D-05    0.15280D-05
+ Sparse: JACSP - VODE:     0.66534D-05    0.16040D-05
+ Banded: JACSP - VODE:     0.51810D-05    0.15280D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     204    185    321    274      4      4
+ Sparse SDJ:     243    241    413    407     11     11
+ Banded SDJ:     204    185    321    274      4      4
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.92473D-04    0.60136D-04
+ Sparse: JACSP - VODE:     0.11874D-03    0.85801D-04
+ Banded: JACSP - VODE:     0.92473D-04    0.60136D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     263    253    404    392      5      5
+ Sparse SDJ:     223    233    384    412      9     11
+ Banded SDJ:     263    253    404    392      5      5
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.13393D-05    0.48861D-06
+ Sparse: JACSP - VODE:     0.57601D-07    0.18750D-05
+ Banded: JACSP - VODE:     0.13393D-05    0.48861D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     334    353    458    508      7      8
+ Sparse SDJ:     322    338    527    570     13     14
+ Banded SDJ:     334    353    458    508      7      8
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.25632D-04    0.25653D-04
+ Sparse: JACSP - VODE:     0.47030D-05    0.46953D-05
+ Banded: JACSP - VODE:     0.25632D-04    0.25653D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     299    299    420    418      7      7
+ Sparse SDJ:     268    268    420    418     11     11
+ Banded SDJ:     299    299    420    418      7      7
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.43735D-07    0.31120D-06
+ Sparse: JACSP - VODE:     0.18642D-07    0.13234D-06
+ Banded: JACSP - VODE:     0.43735D-07    0.31120D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     416    454    593    639      9      9
+ Sparse SDJ:     421    387    679    597     17     16
+ Banded SDJ:     416    454    593    639      9      9
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.57625D-06    0.19803D-05
+ Sparse: JACSP - VODE:     0.51769D-06    0.27718D-05
+ Banded: JACSP - VODE:     0.57625D-06    0.19803D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     419    418    596    583      9      9
+ Sparse SDJ:     389    387    627    622     16     16
+ Banded SDJ:     419    418    596    583      9      9
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.18080D-07    0.11917D-07
+ Sparse: JACSP - VODE:     0.78188D-08    0.76346D-08
+ Banded: JACSP - VODE:     0.18080D-07    0.11917D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     525    534    721    726     11     11
+ Sparse SDJ:     513    569    764    898     19     22
+ Banded SDJ:     525    534    721    726     11     11
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.26902D-06    0.32206D-06
+ Sparse: JACSP - VODE:     0.27541D-06    0.57894D-06
+ Banded: JACSP - VODE:     0.26902D-06    0.32206D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     527    539    755    797     11     11
+ Sparse SDJ:     496    544    772    879     19     21
+ Banded SDJ:     527    539    755    797     11     11
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28674D-08    0.27697D-08
+ Sparse: JACSP - VODE:     0.35710D-08    0.71006D-09
+ Banded: JACSP - VODE:     0.28674D-08    0.27697D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     770    723   1094   1013     17     16
+ Sparse SDJ:     751    798   1168   1301     29     32
+ Banded SDJ:     770    723   1094   1013     17     16
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.47145D-07    0.31962D-07
+ Sparse: JACSP - VODE:     0.34173D-07    0.67000D-08
+ Banded: JACSP - VODE:     0.47145D-07    0.31962D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     717    726   1026   1019     15     15
+ Sparse SDJ:     661    661   1029   1049     26     26
+ Banded SDJ:     717    726   1026   1019     15     15
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.33849D-09    0.38472D-09
+ Sparse: JACSP - VODE:     0.14127D-09    0.90075D-11
+ Banded: JACSP - VODE:     0.33849D-09    0.38472D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     984    955   1326   1286     20     20
+ Sparse SDJ:     910    938   1332   1408     31     32
+ Banded SDJ:     984    955   1326   1286     20     20
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17097D-07    0.49510D-08
+ Sparse: JACSP - VODE:     0.75887D-09    0.39867D-08
+ Banded: JACSP - VODE:     0.17097D-07    0.49510D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     931    930   1231   1234     19     19
+ Sparse SDJ:    1003    947   1526   1419     37     34
+ Banded SDJ:     931    930   1231   1234     19     19
+ ____________________________________________________________
+
+ Problem No. =  32
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.61038D-11    0.50374D-10
+ Sparse: JACSP - VODE:     0.29291D-11    0.14628D-10
+ Banded: JACSP - VODE:     0.61038D-11    0.50374D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1204   1263   1491   1607     24     25
+ Sparse SDJ:    1208   1220   1701   1737     43     42
+ Banded SDJ:    1204   1263   1491   1607     24     25
+ ____________________________________________________________
+ Problem No. =  32
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.36537D-09    0.58204D-10
+ Sparse: JACSP - VODE:     0.42574D-09    0.24372D-11
+ Banded: JACSP - VODE:     0.36537D-09    0.58204D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1196   1137   1482   1382     23     22
+ Sparse SDJ:    1149   1160   1534   1558     39     39
+ Banded SDJ:    1196   1137   1482   1382     23     22
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = D3
+
+ Problem No. =  33
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.40200D-05    0.76936D-06
+ Sparse: JACSP - VODE:     0.98823D-06    0.45641D-06
+ Banded: JACSP - VODE:     0.40200D-05    0.76936D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     199    200    307    307      7      7
+ Sparse SDJ:     209    209    346    346      8      8
+ Banded SDJ:     199    200    307    307      7      7
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.30056D-05    0.77384D-06
+ Sparse: JACSP - VODE:     0.12985D-06    0.20905D-05
+ Banded: JACSP - VODE:     0.30056D-05    0.77384D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     201    179    313    276      7      7
+ Sparse SDJ:     197    206    320    340      8      8
+ Banded SDJ:     201    179    313    276      7      7
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.66024D-06    0.41396D-06
+ Sparse: JACSP - VODE:     0.34641D-06    0.46576D-05
+ Banded: JACSP - VODE:     0.66024D-06    0.41396D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     254    234    365    337      8      8
+ Sparse SDJ:     231    235    381    393      9      9
+ Banded SDJ:     254    234    365    337      8      8
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.27665D-06    0.21535D-06
+ Sparse: JACSP - VODE:     0.56288D-07    0.56131D-07
+ Banded: JACSP - VODE:     0.27665D-06    0.21535D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     265    248    382    358      8      8
+ Sparse SDJ:     249    249    407    406     11     11
+ Banded SDJ:     265    248    382    358      8      8
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16859D-06    0.31548D-11
+ Sparse: JACSP - VODE:     0.88421D-08    0.10500D-07
+ Banded: JACSP - VODE:     0.16859D-06    0.31548D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     314    327    440    454     10     10
+ Sparse SDJ:     344    344    532    532     14     14
+ Banded SDJ:     314    327    440    454     10     10
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.65874D-09    0.18859D-07
+ Sparse: JACSP - VODE:     0.12084D-06    0.13443D-06
+ Banded: JACSP - VODE:     0.65874D-09    0.18859D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     326    317    476    444     11     10
+ Sparse SDJ:     310    309    515    519     13     14
+ Banded SDJ:     326    317    476    444     11     10
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.39755D-08    0.39360D-08
+ Sparse: JACSP - VODE:     0.61198D-09    0.83857D-09
+ Banded: JACSP - VODE:     0.39755D-08    0.39360D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     444    444    577    577     13     13
+ Sparse SDJ:     419    419    657    657     18     18
+ Banded SDJ:     444    444    577    577     13     13
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.87616D-08    0.87250D-08
+ Sparse: JACSP - VODE:     0.30134D-08    0.30057D-08
+ Banded: JACSP - VODE:     0.87616D-08    0.87250D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     434    434    580    578     13     13
+ Sparse SDJ:     413    413    654    653     18     18
+ Banded SDJ:     434    434    580    578     13     13
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.97984D-09    0.97980D-09
+ Sparse: JACSP - VODE:     0.33671D-09    0.33663D-09
+ Banded: JACSP - VODE:     0.97984D-09    0.97980D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     593    593    740    740     17     17
+ Sparse SDJ:     610    610    864    864     21     21
+ Banded SDJ:     593    593    740    740     17     17
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11006D-09    0.11107D-09
+ Sparse: JACSP - VODE:     0.37633D-08    0.38292D-08
+ Banded: JACSP - VODE:     0.11006D-09    0.11107D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     580    580    727    725     16     16
+ Sparse SDJ:     582    582    824    823     20     20
+ Banded SDJ:     580    580    727    725     16     16
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17064D-10    0.12460D-10
+ Sparse: JACSP - VODE:     0.42556D-10    0.42447D-10
+ Banded: JACSP - VODE:     0.17064D-10    0.12460D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     871    860   1044   1031     21     21
+ Sparse SDJ:     868    868   1206   1206     30     30
+ Banded SDJ:     871    860   1044   1031     21     21
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.48293D-10    0.48135D-10
+ Sparse: JACSP - VODE:     0.10476D-10    0.47667D-10
+ Banded: JACSP - VODE:     0.48293D-10    0.48135D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     836    836    999    997     21     21
+ Sparse SDJ:     833    832   1156   1146     29     28
+ Banded SDJ:     836    836    999    997     21     21
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.60840D-12    0.31697D-11
+ Sparse: JACSP - VODE:     0.15277D-12    0.17435D-11
+ Banded: JACSP - VODE:     0.60840D-12    0.31697D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1189   1186   1394   1393     28     28
+ Sparse SDJ:    1213   1205   1622   1620     38     39
+ Banded SDJ:    1189   1186   1394   1393     28     28
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.54354D-11    0.18862D-10
+ Sparse: JACSP - VODE:     0.18704D-10    0.19432D-10
+ Banded: JACSP - VODE:     0.54354D-11    0.18862D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1167   1163   1375   1370     27     27
+ Sparse SDJ:    1147   1147   1545   1544     37     37
+ Banded SDJ:    1167   1163   1375   1370     27     27
+ ____________________________________________________________
+
+ Problem No. =  33
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16391D-11    0.16707D-11
+ Sparse: JACSP - VODE:     0.46696D-12    0.46252D-12
+ Banded: JACSP - VODE:     0.16391D-11    0.16707D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1730   1730   1984   1984     38     38
+ Sparse SDJ:    1733   1733   2263   2263     54     54
+ Banded SDJ:    1730   1730   1984   1984     38     38
+ ____________________________________________________________
+ Problem No. =  33
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18641D-12    0.13961D-12
+ Sparse: JACSP - VODE:     0.13612D-11    0.13697D-11
+ Banded: JACSP - VODE:     0.18641D-12    0.13961D-12
+                   J      V      J      V      J      V
+ Dense  SDJ:    1657   1657   1905   1900     36     36
+ Sparse SDJ:    1652   1652   2169   2167     52     52
+ Banded SDJ:    1657   1657   1905   1900     36     36
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = D4
+
+ Problem No. =  34
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20796D-04    0.15211D-04
+ Sparse: JACSP - VODE:     0.23083D-04    0.23338D-04
+ Banded: JACSP - VODE:     0.20796D-04    0.15211D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      99     99    156    159      5      5
+ Sparse SDJ:      97     97    170    170      5      5
+ Banded SDJ:      99     99    156    159      5      5
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.22714D-04    0.22714D-04
+ Sparse: JACSP - VODE:     0.42351D-04    0.42351D-04
+ Banded: JACSP - VODE:     0.22714D-04    0.22714D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      21     21     32     32      1      1
+ Sparse SDJ:      21     21     53     53      4      4
+ Banded SDJ:      21     21     32     32      1      1
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.79363D-06    0.79359D-06
+ Sparse: JACSP - VODE:     0.40388D-05    0.41703D-05
+ Banded: JACSP - VODE:     0.79363D-06    0.79359D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     110    110    177    177      7      7
+ Sparse SDJ:     114    114    194    194      5      5
+ Banded SDJ:     110    110    177    177      7      7
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.50323D-05    0.50323D-05
+ Sparse: JACSP - VODE:     0.50882D-05    0.50882D-05
+ Banded: JACSP - VODE:     0.50323D-05    0.50323D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:      30     30     45     45      1      1
+ Sparse SDJ:      30     30     54     54      2      2
+ Banded SDJ:      30     30     45     45      1      1
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10017D-05    0.10017D-05
+ Sparse: JACSP - VODE:     0.94864D-06    0.94863D-06
+ Banded: JACSP - VODE:     0.10017D-05    0.10017D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     161    161    242    242      7      7
+ Sparse SDJ:     161    161    257    257      6      6
+ Banded SDJ:     161    161    242    242      7      7
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.22809D-07    0.22800D-07
+ Sparse: JACSP - VODE:     0.22809D-07    0.22800D-07
+ Banded: JACSP - VODE:     0.22809D-07    0.22800D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:      55     55     81     81      3      3
+ Sparse SDJ:      55     55     90     90      3      3
+ Banded SDJ:      55     55     81     81      3      3
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.15173D-06    0.81210D-07
+ Sparse: JACSP - VODE:     0.13883D-06    0.13884D-06
+ Banded: JACSP - VODE:     0.15173D-06    0.81210D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     245    246    358    355     10     10
+ Sparse SDJ:     244    244    383    383     10     10
+ Banded SDJ:     245    246    358    355     10     10
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.27091D-06    0.27090D-06
+ Sparse: JACSP - VODE:     0.20540D-06    0.20551D-06
+ Banded: JACSP - VODE:     0.27091D-06    0.27090D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:      65     65    100    100      4      4
+ Sparse SDJ:      66     66    109    109      3      3
+ Banded SDJ:      65     65    100    100      4      4
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10166D-07    0.11512D-07
+ Sparse: JACSP - VODE:     0.73218D-08    0.12067D-07
+ Banded: JACSP - VODE:     0.10166D-07    0.11512D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     323    321    438    449     11     11
+ Sparse SDJ:     329    334    521    491     12     11
+ Banded SDJ:     323    321    438    449     11     11
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.38196D-07    0.38196D-07
+ Sparse: JACSP - VODE:     0.60457D-08    0.60451D-08
+ Banded: JACSP - VODE:     0.38196D-07    0.38196D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:      93     93    163    163      4      4
+ Sparse SDJ:      87     87    147    147      5      5
+ Banded SDJ:      93     93    163    163      4      4
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.43798D-10    0.21946D-09
+ Sparse: JACSP - VODE:     0.18415D-08    0.15828D-08
+ Banded: JACSP - VODE:     0.43798D-10    0.21946D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     439    427    602    608     14     14
+ Sparse SDJ:     424    425    641    642     15     15
+ Banded SDJ:     439    427    602    608     14     14
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.12068D-08    0.12091D-08
+ Sparse: JACSP - VODE:     0.34321D-09    0.34335D-09
+ Banded: JACSP - VODE:     0.12068D-08    0.12091D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     123    123    189    189      6      6
+ Sparse SDJ:     124    124    218    218      5      5
+ Banded SDJ:     123    123    189    189      6      6
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17109D-10    0.45865D-09
+ Sparse: JACSP - VODE:     0.56216D-10    0.26183D-09
+ Banded: JACSP - VODE:     0.17109D-10    0.45865D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     597    590    778    772     17     17
+ Sparse SDJ:     590    582    851    836     20     20
+ Banded SDJ:     597    590    778    772     17     17
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.97267D-10    0.10899D-09
+ Sparse: JACSP - VODE:     0.45919D-10    0.18284D-09
+ Banded: JACSP - VODE:     0.97267D-10    0.10899D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     180    182    309    337      8      8
+ Sparse SDJ:     162    176    296    310      7      8
+ Banded SDJ:     180    182    309    337      8      8
+ ____________________________________________________________
+
+ Problem No. =  34
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.34421D-10    0.62474D-10
+ Sparse: JACSP - VODE:     0.85114D-11    0.14220D-10
+ Banded: JACSP - VODE:     0.34421D-10    0.62474D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     788    804    999   1022     21     21
+ Sparse SDJ:     764    765   1054   1056     24     24
+ Banded SDJ:     788    804    999   1022     21     21
+ ____________________________________________________________
+ Problem No. =  34
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.84600D-11    0.26102D-10
+ Sparse: JACSP - VODE:     0.31759D-10    0.52328D-10
+ Banded: JACSP - VODE:     0.84600D-11    0.26102D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     209    259    327    434      8      9
+ Sparse SDJ:     234    247    417    455      9     11
+ Banded SDJ:     209    259    327    434      8      9
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = D5
+
+ Problem No. =  35
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.51238D-04    0.55601D-04
+ Sparse: JACSP - VODE:     0.51238D-04    0.25685D-03
+ Banded: JACSP - VODE:     0.51238D-04    0.55601D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      76     70    126    130      4      5
+ Sparse SDJ:      76     75    134    142      4      5
+ Banded SDJ:      76     70    126    130      4      5
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.45755D-02    0.45754D-02
+ Sparse: JACSP - VODE:     0.45789D-02    0.45821D-02
+ Banded: JACSP - VODE:     0.45755D-02    0.45754D-02
+                   J      V      J      V      J      V
+ Dense  SDJ:      70     70    117    117      3      3
+ Sparse SDJ:      71     71    121    121      3      3
+ Banded SDJ:      70     70    117    117      3      3
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.95448D-05    0.47709D-04
+ Sparse: JACSP - VODE:     0.17110D-04    0.91243D-05
+ Banded: JACSP - VODE:     0.95448D-05    0.47709D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     107    129    179    205      5      4
+ Sparse SDJ:     117    133    202    221      6      6
+ Banded SDJ:     107    129    179    205      5      4
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.13796D-04    0.13792D-04
+ Sparse: JACSP - VODE:     0.17239D-04    0.17234D-04
+ Banded: JACSP - VODE:     0.13796D-04    0.13792D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      88     88    146    146      5      5
+ Sparse SDJ:      88     88    159    159      6      6
+ Banded SDJ:      88     88    146    146      5      5
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.57779D-05    0.40834D-05
+ Sparse: JACSP - VODE:     0.17124D-05    0.92703D-06
+ Banded: JACSP - VODE:     0.57779D-05    0.40834D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     160    168    254    273      7      8
+ Sparse SDJ:     178    156    313    289      9      8
+ Banded SDJ:     160    168    254    273      7      8
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.13145D-05    0.12894D-05
+ Sparse: JACSP - VODE:     0.56839D-05    0.91511D-06
+ Banded: JACSP - VODE:     0.13145D-05    0.12894D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     153    186    263    295      7      7
+ Sparse SDJ:     150    154    261    318      7     10
+ Banded SDJ:     153    186    263    295      7      7
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.25334D-06    0.70299D-06
+ Sparse: JACSP - VODE:     0.76780D-06    0.82563D-06
+ Banded: JACSP - VODE:     0.25334D-06    0.70299D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     274    215    474    345      9     10
+ Sparse SDJ:     237    264    449    499     12     11
+ Banded SDJ:     274    215    474    345      9     10
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.68338D-06    0.83890D-06
+ Sparse: JACSP - VODE:     0.33514D-06    0.59310D-06
+ Banded: JACSP - VODE:     0.68338D-06    0.83890D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     217    231    335    363      9      8
+ Sparse SDJ:     229    210    415    373     10     12
+ Banded SDJ:     217    231    335    363      9      8
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.81592D-07    0.42170D-07
+ Sparse: JACSP - VODE:     0.58559D-07    0.71500D-07
+ Banded: JACSP - VODE:     0.81592D-07    0.42170D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     365    425    570    703     11     12
+ Sparse SDJ:     353    366    600    616     15     14
+ Banded SDJ:     365    425    570    703     11     12
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.57433D-07    0.11193D-06
+ Sparse: JACSP - VODE:     0.10623D-06    0.11257D-06
+ Banded: JACSP - VODE:     0.57433D-07    0.11193D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     424    359    637    548     12     10
+ Sparse SDJ:     338    328    540    513     14     15
+ Banded SDJ:     424    359    637    548     12     10
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.87922D-08    0.96201D-08
+ Sparse: JACSP - VODE:     0.67064D-08    0.87193D-08
+ Banded: JACSP - VODE:     0.87922D-08    0.96201D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     533    584    832    931     14     15
+ Sparse SDJ:     509    488    834    815     19     18
+ Banded SDJ:     533    584    832    931     14     15
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11142D-07    0.12008D-07
+ Sparse: JACSP - VODE:     0.11106D-07    0.80470D-08
+ Banded: JACSP - VODE:     0.11142D-07    0.12008D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     561    511    925    782     14     15
+ Sparse SDJ:     447    519    754    876     17     20
+ Banded SDJ:     561    511    925    782     14     15
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10661D-08    0.12675D-08
+ Sparse: JACSP - VODE:     0.12698D-08    0.15231D-08
+ Banded: JACSP - VODE:     0.10661D-08    0.12675D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     721    734   1116   1088     18     18
+ Sparse SDJ:     705    678   1136   1053     26     24
+ Banded SDJ:     721    734   1116   1088     18     18
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11972D-08    0.16604D-08
+ Sparse: JACSP - VODE:     0.14287D-08    0.15352D-08
+ Banded: JACSP - VODE:     0.11972D-08    0.16604D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     669    653   1022    944     16     16
+ Sparse SDJ:     640    643   1011    983     23     23
+ Banded SDJ:     669    653   1022    944     16     16
+ ____________________________________________________________
+
+ Problem No. =  35
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12896D-09    0.12467D-09
+ Sparse: JACSP - VODE:     0.13513D-09    0.11902D-09
+ Banded: JACSP - VODE:     0.12896D-09    0.12467D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     939    982   1355   1415     22     23
+ Sparse SDJ:    1009    962   1556   1424     36     32
+ Banded SDJ:     939    982   1355   1415     22     23
+ ____________________________________________________________
+ Problem No. =  35
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16464D-09    0.11166D-09
+ Sparse: JACSP - VODE:     0.18684D-09    0.18949D-09
+ Banded: JACSP - VODE:     0.16464D-09    0.11166D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     982   1045   1392   1500     22     24
+ Sparse SDJ:     921    937   1380   1445     32     34
+ Banded SDJ:     982   1045   1392   1500     22     24
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = D6
+
+ Problem No. =  36
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.26429D-05    0.52139D-05
+ Sparse: JACSP - VODE:     0.79526D-05    0.82648D-05
+ Banded: JACSP - VODE:     0.26429D-05    0.52139D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     127    126    195    198      6      6
+ Sparse SDJ:     129    129    207    208      5      5
+ Banded SDJ:     127    126    195    198      6      6
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.74222D-05    0.11467D-04
+ Sparse: JACSP - VODE:     0.26880D-05    0.26993D-05
+ Banded: JACSP - VODE:     0.74222D-05    0.11467D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      52     51     83     84      2      2
+ Sparse SDJ:      46     46     93     93      5      5
+ Banded SDJ:      52     51     83     84      2      2
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.67543D-05    0.14298D-05
+ Sparse: JACSP - VODE:     0.17781D-06    0.35034D-05
+ Banded: JACSP - VODE:     0.67543D-05    0.14298D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     201    208    299    309      8      8
+ Sparse SDJ:     205    240    311    415      8      9
+ Banded SDJ:     201    208    299    309      8      8
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.44471D-05    0.89511D-06
+ Sparse: JACSP - VODE:     0.12928D-05    0.12935D-05
+ Banded: JACSP - VODE:     0.44471D-05    0.89511D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:      61     74     97    136      2      2
+ Sparse SDJ:      59     59    131    131      5      5
+ Banded SDJ:      61     74     97    136      2      2
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28200D-07    0.35102D-06
+ Sparse: JACSP - VODE:     0.57380D-07    0.16951D-06
+ Banded: JACSP - VODE:     0.28200D-07    0.35102D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     296    274    402    380      9      9
+ Sparse SDJ:     276    280    463    465     11     11
+ Banded SDJ:     296    274    402    380      9      9
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.19589D-07    0.12860D-05
+ Sparse: JACSP - VODE:     0.23374D-06    0.24077D-06
+ Banded: JACSP - VODE:     0.19589D-07    0.12860D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     147    109    245    216      3      3
+ Sparse SDJ:      84     84    163    163      5      5
+ Banded SDJ:     147    109    245    216      3      3
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.88004D-07    0.28867D-07
+ Sparse: JACSP - VODE:     0.66762D-07    0.11512D-06
+ Banded: JACSP - VODE:     0.88004D-07    0.28867D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     375    375    539    542     12     12
+ Sparse SDJ:     356    354    583    568     14     14
+ Banded SDJ:     375    375    539    542     12     12
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.34370D-07    0.29125D-07
+ Sparse: JACSP - VODE:     0.12788D-07    0.19944D-07
+ Banded: JACSP - VODE:     0.34370D-07    0.29125D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     147    145    230    236      3      3
+ Sparse SDJ:     151    151    280    282      7      7
+ Banded SDJ:     147    145    230    236      3      3
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.25741D-08    0.25184D-08
+ Sparse: JACSP - VODE:     0.23229D-08    0.25749D-08
+ Banded: JACSP - VODE:     0.25741D-08    0.25184D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     469    497    645    717     14     14
+ Sparse SDJ:     469    447    718    665     18     17
+ Banded SDJ:     469    497    645    717     14     14
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18414D-08    0.57991D-08
+ Sparse: JACSP - VODE:     0.44054D-08    0.12713D-08
+ Banded: JACSP - VODE:     0.18414D-08    0.57991D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     231    218    366    354      5      5
+ Sparse SDJ:     173    226    311    426      7     10
+ Banded SDJ:     231    218    366    354      5      5
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.55119D-09    0.64428D-09
+ Sparse: JACSP - VODE:     0.64653D-09    0.69450D-09
+ Banded: JACSP - VODE:     0.55119D-09    0.64428D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     652    624    934    885     18     18
+ Sparse SDJ:     626    600    935    902     22     22
+ Banded SDJ:     652    624    934    885     18     18
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.24453D-09    0.17600D-09
+ Sparse: JACSP - VODE:     0.41084D-09    0.30078D-09
+ Banded: JACSP - VODE:     0.24453D-09    0.17600D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     278    291    462    471      7      8
+ Sparse SDJ:     228    254    409    443     10     10
+ Banded SDJ:     278    291    462    471      7      8
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.91399D-10    0.90006D-10
+ Sparse: JACSP - VODE:     0.91202D-10    0.86557D-10
+ Banded: JACSP - VODE:     0.91399D-10    0.90006D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     874    888   1177   1201     22     22
+ Sparse SDJ:     839    828   1244   1210     28     29
+ Banded SDJ:     874    888   1177   1201     22     22
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.23630D-10    0.27952D-10
+ Sparse: JACSP - VODE:     0.39189D-10    0.41518D-10
+ Banded: JACSP - VODE:     0.23630D-10    0.27952D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     331    334    473    484      8      9
+ Sparse SDJ:     352    355    569    602     14     14
+ Banded SDJ:     331    334    473    484      8      9
+ ____________________________________________________________
+
+ Problem No. =  36
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12703D-10    0.10510D-10
+ Sparse: JACSP - VODE:     0.13117D-10    0.82102D-11
+ Banded: JACSP - VODE:     0.12703D-10    0.10510D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1145   1142   1449   1445     28     28
+ Sparse SDJ:    1157   1130   1600   1584     38     39
+ Banded SDJ:    1145   1142   1449   1445     28     28
+ ____________________________________________________________
+ Problem No. =  36
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.62345D-11    0.43804D-11
+ Sparse: JACSP - VODE:     0.55376D-11    0.63392D-11
+ Banded: JACSP - VODE:     0.62345D-11    0.43804D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     470    451    685    628     11     12
+ Sparse SDJ:     467    445    709    686     16     16
+ Banded SDJ:     470    451    685    628     11     12
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = E1
+
+ Problem No. =  41
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.37272D-08    0.12415D-05
+ Sparse: JACSP - VODE:     0.39261D-08    0.40731D-08
+ Banded: JACSP - VODE:     0.37272D-08    0.12415D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     124    129    188    192      7      7
+ Sparse SDJ:     124    124    200    199      5      5
+ Banded SDJ:     124    129    188    192      7      7
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.50696D-11    0.66679D-11
+ Sparse: JACSP - VODE:     0.50787D-11    0.48520D-11
+ Banded: JACSP - VODE:     0.50696D-11    0.66679D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:      42     42     72     72      3      3
+ Sparse SDJ:      42     42     76     76      2      2
+ Banded SDJ:      42     42     72     72      3      3
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.35910D-09    0.72615D-07
+ Sparse: JACSP - VODE:     0.13920D-08    0.93984D-08
+ Banded: JACSP - VODE:     0.35910D-09    0.72615D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     171    180    245    258      8      8
+ Sparse SDJ:     171    170    269    264      7      7
+ Banded SDJ:     171    180    245    258      8      8
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10704D-08    0.47668D-07
+ Sparse: JACSP - VODE:     0.13112D-08    0.20076D-08
+ Banded: JACSP - VODE:     0.10704D-08    0.47668D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:      86     83    138    137      4      4
+ Sparse SDJ:      87     87    163    163      5      5
+ Banded SDJ:      86     83    138    137      4      4
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.83381D-09    0.11289D-08
+ Sparse: JACSP - VODE:     0.14846D-06    0.16620D-08
+ Banded: JACSP - VODE:     0.83381D-09    0.11289D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     236    242    342    325     10     10
+ Sparse SDJ:     255    239    400    356     11     10
+ Banded SDJ:     236    242    342    325     10     10
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.19435D-08    0.10966D-07
+ Sparse: JACSP - VODE:     0.22232D-08    0.32407D-08
+ Banded: JACSP - VODE:     0.19435D-08    0.10966D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     108    105    172    170      5      5
+ Sparse SDJ:     106    106    190    192      5      5
+ Banded SDJ:     108    105    172    170      5      5
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.25592D-08    0.42974D-09
+ Sparse: JACSP - VODE:     0.16715D-07    0.76380D-08
+ Banded: JACSP - VODE:     0.25592D-08    0.42974D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     317    331    421    422     12     11
+ Sparse SDJ:     348    324    526    477     14     11
+ Banded SDJ:     317    331    421    422     12     11
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.94766D-10    0.14738D-09
+ Sparse: JACSP - VODE:     0.13014D-08    0.62885D-10
+ Banded: JACSP - VODE:     0.94766D-10    0.14738D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     135    132    208    215      7      7
+ Sparse SDJ:     141    135    228    221      5      5
+ Banded SDJ:     135    132    208    215      7      7
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.24902D-11    0.44010D-12
+ Sparse: JACSP - VODE:     0.25173D-11    0.22286D-11
+ Banded: JACSP - VODE:     0.24902D-11    0.44010D-12
+                   J      V      J      V      J      V
+ Dense  SDJ:     451    452    572    563     15     14
+ Sparse SDJ:     451    457    640    642     16     16
+ Banded SDJ:     451    452    572    563     15     14
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.40563D-10    0.24736D-10
+ Sparse: JACSP - VODE:     0.11164D-08    0.91256D-11
+ Banded: JACSP - VODE:     0.40563D-10    0.24736D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     182    182    269    281      7      7
+ Sparse SDJ:     181    182    305    305      8      8
+ Banded SDJ:     182    182    269    281      7      7
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10779D-10    0.15161D-11
+ Sparse: JACSP - VODE:     0.75643D-09    0.47164D-08
+ Banded: JACSP - VODE:     0.10779D-10    0.15161D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     737    635    917    762     21     17
+ Sparse SDJ:     896    738   2210   1217    122     39
+ Banded SDJ:     737    635    917    762     21     17
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18998D-11    0.13091D-10
+ Sparse: JACSP - VODE:     0.14058D-09    0.68879D-11
+ Banded: JACSP - VODE:     0.18998D-11    0.13091D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     227    234    342    342     10     10
+ Sparse SDJ:     237    221    382    359     10      9
+ Banded SDJ:     227    234    342    342     10     10
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.18208D-10    0.11303D-11
+ Sparse: JACSP - VODE:     0.10646D-11    0.20190D-11
+ Banded: JACSP - VODE:     0.18208D-10    0.11303D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1142   1152   1485   2166     35    159
+ Sparse SDJ:    1273   1282   3339   4261    188    291
+ Banded SDJ:    1142   1152   1485   2166     35    159
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18003D-12    0.22913D-10
+ Sparse: JACSP - VODE:     0.32429D-12    0.27174D-12
+ Banded: JACSP - VODE:     0.18003D-12    0.22913D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     316    390    447    527     12     12
+ Sparse SDJ:     338    363    547    597     15     15
+ Banded SDJ:     316    390    447    527     12     12
+ ____________________________________________________________
+
+ Problem No. =  41
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.15884D-11    0.15479D-11
+ Sparse: JACSP - VODE:     0.15470D-11    0.15684D-11
+ Banded: JACSP - VODE:     0.15884D-11    0.15479D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1690   1571   2674   2955    142    224
+ Sparse SDJ:    1731   1464   3293   2848    143    137
+ Banded SDJ:    1690   1571   2674   2955    142    224
+ ____________________________________________________________
+ Problem No. =  41
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.92314D-13    0.52701D-13
+ Sparse: JACSP - VODE:     0.33121D-13    0.56831D-11
+ Banded: JACSP - VODE:     0.92314D-13    0.52701D-13
+                   J      V      J      V      J      V
+ Dense  SDJ:     429    418    586    559     15     14
+ Sparse SDJ:     607    447   1016    674     29     16
+ Banded SDJ:     429    418    586    559     15     14
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = E2
+
+ Problem No. =  42
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.60070D-03    0.59786D-03
+ Sparse: JACSP - VODE:     0.68612D-03    0.68611D-03
+ Banded: JACSP - VODE:     0.60070D-03    0.59786D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:     178    178    245    245      4      4
+ Sparse SDJ:     166    166    286    286      8      8
+ Banded SDJ:     178    178    245    245      4      4
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.78411D-04    0.78507D-04
+ Sparse: JACSP - VODE:     0.70042D-04    0.69927D-04
+ Banded: JACSP - VODE:     0.78411D-04    0.78507D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     215    215    318    318      5      5
+ Sparse SDJ:     205    205    328    328      8      8
+ Banded SDJ:     215    215    318    318      5      5
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.37357D-04    0.37357D-04
+ Sparse: JACSP - VODE:     0.11643D-03    0.11643D-03
+ Banded: JACSP - VODE:     0.37357D-04    0.37357D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     228    228    313    313      5      5
+ Sparse SDJ:     232    232    363    363      9      9
+ Banded SDJ:     228    228    313    313      5      5
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.77411D-04    0.42191D-04
+ Sparse: JACSP - VODE:     0.43792D-04    0.48535D-04
+ Banded: JACSP - VODE:     0.77411D-04    0.42191D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     269    266    402    382      6      6
+ Sparse SDJ:     248    253    387    406     10     11
+ Banded SDJ:     269    266    402    382      6      6
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.88978D-05    0.89271D-05
+ Sparse: JACSP - VODE:     0.11627D-04    0.11627D-04
+ Banded: JACSP - VODE:     0.88978D-05    0.89271D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     289    289    401    401      7      7
+ Sparse SDJ:     286    286    420    420     10     10
+ Banded SDJ:     289    289    401    401      7      7
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11205D-04    0.13584D-04
+ Sparse: JACSP - VODE:     0.70297D-05    0.70261D-05
+ Banded: JACSP - VODE:     0.11205D-04    0.13584D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     364    377    501    519      9      9
+ Sparse SDJ:     366    366    530    530     14     14
+ Banded SDJ:     364    377    501    519      9      9
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.14853D-05    0.93642D-06
+ Sparse: JACSP - VODE:     0.13671D-05    0.13736D-05
+ Banded: JACSP - VODE:     0.14853D-05    0.93642D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     398    401    515    518     10      9
+ Sparse SDJ:     402    402    560    560     15     15
+ Banded SDJ:     398    401    515    518     10      9
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.14174D-05    0.14176D-05
+ Sparse: JACSP - VODE:     0.14068D-05    0.14825D-05
+ Banded: JACSP - VODE:     0.14174D-05    0.14176D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     531    531    666    666     12     12
+ Sparse SDJ:     503    508    699    704     18     18
+ Banded SDJ:     531    531    666    666     12     12
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.40208D-06    0.40208D-06
+ Sparse: JACSP - VODE:     0.24234D-06    0.24234D-06
+ Banded: JACSP - VODE:     0.40208D-06    0.40208D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     587    587    714    714     12     12
+ Sparse SDJ:     578    578    759    759     21     21
+ Banded SDJ:     587    587    714    714     12     12
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18211D-06    0.18211D-06
+ Sparse: JACSP - VODE:     0.17731D-06    0.18838D-06
+ Banded: JACSP - VODE:     0.18211D-06    0.18211D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     726    726    889    889     16     16
+ Sparse SDJ:     727    725    948    949     23     23
+ Banded SDJ:     726    726    889    889     16     16
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.38996D-07    0.38996D-07
+ Sparse: JACSP - VODE:     0.42937D-07    0.42937D-07
+ Banded: JACSP - VODE:     0.38996D-07    0.38996D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     835    835    997    997     18     18
+ Sparse SDJ:     833    833   1059   1059     27     27
+ Banded SDJ:     835    835    997    997     18     18
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.36829D-07    0.36829D-07
+ Sparse: JACSP - VODE:     0.30750D-07    0.30748D-07
+ Banded: JACSP - VODE:     0.36829D-07    0.36829D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    1041   1041   1214   1214     21     21
+ Sparse SDJ:    1042   1042   1313   1313     34     34
+ Banded SDJ:    1041   1041   1214   1214     21     21
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.75668D-08    0.74475D-08
+ Sparse: JACSP - VODE:     0.77815D-08    0.77815D-08
+ Banded: JACSP - VODE:     0.75668D-08    0.74475D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1197   1196   1399   1396     25     25
+ Sparse SDJ:    1182   1182   1479   1479     36     36
+ Banded SDJ:    1197   1196   1399   1396     25     25
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.44212D-08    0.56664D-08
+ Sparse: JACSP - VODE:     0.55394D-08    0.55395D-08
+ Banded: JACSP - VODE:     0.44212D-08    0.56664D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1510   1504   1728   1727     30     30
+ Sparse SDJ:    1525   1525   1881   1881     48     48
+ Banded SDJ:    1510   1504   1728   1727     30     30
+ ____________________________________________________________
+
+ Problem No. =  42
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.11729D-08    0.11759D-08
+ Sparse: JACSP - VODE:     0.12932D-08    0.12933D-08
+ Banded: JACSP - VODE:     0.11729D-08    0.11759D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1749   1748   1981   1980     33     33
+ Sparse SDJ:    1758   1758   2138   2138     53     53
+ Banded SDJ:    1749   1748   1981   1980     33     33
+ ____________________________________________________________
+ Problem No. =  42
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.77042D-09    0.83014D-09
+ Sparse: JACSP - VODE:     0.73122D-09    0.73155D-09
+ Banded: JACSP - VODE:     0.77042D-09    0.83014D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    2143   2195   2444   2491     40     41
+ Sparse SDJ:    2175   2175   2628   2628     62     62
+ Banded SDJ:    2143   2195   2444   2491     40     41
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = E3
+
+ Problem No. =  43
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.35616D-04    0.35648D-04
+ Sparse: JACSP - VODE:     0.18211D-04    0.18213D-04
+ Banded: JACSP - VODE:     0.35616D-04    0.35648D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     150    150    273    273      5      5
+ Sparse SDJ:     134    134    206    206      5      5
+ Banded SDJ:     150    150    273    273      5      5
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.42416D-04    0.42188D-04
+ Sparse: JACSP - VODE:     0.17876D-03    0.17876D-03
+ Banded: JACSP - VODE:     0.42416D-04    0.42188D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     189    189    316    316      6      6
+ Sparse SDJ:     138    138    223    223      5      5
+ Banded SDJ:     189    189    316    316      6      6
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10851D-04    0.10902D-04
+ Sparse: JACSP - VODE:     0.10473D-04    0.10473D-04
+ Banded: JACSP - VODE:     0.10851D-04    0.10902D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     195    195    299    299      7      7
+ Sparse SDJ:     245    245    416    416     11     11
+ Banded SDJ:     195    195    299    299      7      7
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.48663D-04    0.48515D-04
+ Sparse: JACSP - VODE:     0.12284D-04    0.12792D-04
+ Banded: JACSP - VODE:     0.48663D-04    0.48515D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     210    210    298    298      7      7
+ Sparse SDJ:     222    222    387    387      9      9
+ Banded SDJ:     210    210    298    298      7      7
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.99478D-06    0.46789D-06
+ Sparse: JACSP - VODE:     0.20239D-05    0.41417D-06
+ Banded: JACSP - VODE:     0.99478D-06    0.46789D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     314    289    463    423     10      9
+ Sparse SDJ:     276    268    467    436     11     11
+ Banded SDJ:     314    289    463    423     10      9
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.23507D-05    0.13106D-04
+ Sparse: JACSP - VODE:     0.56879D-05    0.19326D-04
+ Banded: JACSP - VODE:     0.23507D-05    0.13106D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     327    345    514    524     10     11
+ Sparse SDJ:     327    295    546    494     13     11
+ Banded SDJ:     327    345    514    524     10     11
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.50468D-07    0.18497D-07
+ Sparse: JACSP - VODE:     0.39561D-07    0.45459D-07
+ Banded: JACSP - VODE:     0.50468D-07    0.18497D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     385    418    531    595     11     12
+ Sparse SDJ:     362    352    573    526     14     13
+ Banded SDJ:     385    418    531    595     11     12
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.65369D-06    0.25055D-06
+ Sparse: JACSP - VODE:     0.45508D-06    0.45533D-06
+ Banded: JACSP - VODE:     0.65369D-06    0.25055D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     384    397    578    584     11     12
+ Sparse SDJ:     410    410    647    647     16     16
+ Banded SDJ:     384    397    578    584     11     12
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21622D-07    0.25372D-07
+ Sparse: JACSP - VODE:     0.12044D-07    0.87503D-08
+ Banded: JACSP - VODE:     0.21622D-07    0.25372D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     522    510    777    730     15     14
+ Sparse SDJ:     508    476    818    747     20     19
+ Banded SDJ:     522    510    777    730     15     14
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20068D-06    0.63616D-07
+ Sparse: JACSP - VODE:     0.10500D-06    0.11097D-06
+ Banded: JACSP - VODE:     0.20068D-06    0.63616D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     529    535    771    773     15     15
+ Sparse SDJ:     495    495    718    742     17     18
+ Banded SDJ:     529    535    771    773     15     15
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.66566D-09    0.23672D-08
+ Sparse: JACSP - VODE:     0.88365D-09    0.95209D-09
+ Banded: JACSP - VODE:     0.66566D-09    0.23672D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     642    638    858    861     17     17
+ Sparse SDJ:     616    622    912    892     22     21
+ Banded SDJ:     642    638    858    861     17     17
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10193D-06    0.48339D-07
+ Sparse: JACSP - VODE:     0.37776D-07    0.31999D-07
+ Banded: JACSP - VODE:     0.10193D-06    0.48339D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     660    671    869    918     17     17
+ Sparse SDJ:     609    615    857    877     20     21
+ Banded SDJ:     660    671    869    918     17     17
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.22316D-09    0.19905D-09
+ Sparse: JACSP - VODE:     0.72006D-10    0.57774D-10
+ Banded: JACSP - VODE:     0.22316D-09    0.19905D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     823    821   1051   1072     21     21
+ Sparse SDJ:     788    763   1083   1045     25     26
+ Banded SDJ:     823    821   1051   1072     21     21
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.23873D-08    0.44747D-08
+ Sparse: JACSP - VODE:     0.23293D-08    0.43679D-08
+ Banded: JACSP - VODE:     0.23873D-08    0.44747D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     870    841   1101   1080     21     21
+ Sparse SDJ:     825    800   1099   1059     27     25
+ Banded SDJ:     870    841   1101   1080     21     21
+ ____________________________________________________________
+
+ Problem No. =  43
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.20814D-10    0.18109D-10
+ Sparse: JACSP - VODE:     0.32006D-10    0.72027D-11
+ Banded: JACSP - VODE:     0.20814D-10    0.18109D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1086   1064   1299   1241     25     24
+ Sparse SDJ:    1079   1071   1379   1371     32     32
+ Banded SDJ:    1086   1064   1299   1241     25     24
+ ____________________________________________________________
+ Problem No. =  43
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20265D-09    0.30349D-09
+ Sparse: JACSP - VODE:     0.30732D-09    0.27266D-09
+ Banded: JACSP - VODE:     0.20265D-09    0.30349D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1123   1134   1294   1314     26     26
+ Sparse SDJ:    1140   1090   1456   1402     37     35
+ Banded SDJ:    1123   1134   1294   1314     26     26
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = E4
+
+ Problem No. =  44
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21049D-04    0.11306D-04
+ Sparse: JACSP - VODE:     0.19018D-04    0.18660D-06
+ Banded: JACSP - VODE:     0.21049D-04    0.11306D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     253    241    378    341      8      7
+ Sparse SDJ:     316    258    521    414     13     11
+ Banded SDJ:     253    241    378    341      8      7
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.52554D-04    0.38158D-04
+ Sparse: JACSP - VODE:     0.10074D-05    0.13429D-04
+ Banded: JACSP - VODE:     0.52554D-04    0.38158D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     292    288    424    423      8      8
+ Sparse SDJ:     287    294    444    464     11     12
+ Banded SDJ:     292    288    424    423      8      8
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.82676D-06    0.82709D-06
+ Sparse: JACSP - VODE:     0.38316D-06    0.17780D-06
+ Banded: JACSP - VODE:     0.82676D-06    0.82709D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     282    282    411    411      9      9
+ Sparse SDJ:     275    276    449    449     12     12
+ Banded SDJ:     282    282    411    411      9      9
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.96150D-06    0.85324D-07
+ Sparse: JACSP - VODE:     0.38816D-04    0.12525D-06
+ Banded: JACSP - VODE:     0.96150D-06    0.85324D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     377    380    527    525     11     11
+ Sparse SDJ:     562    396   1511    620     80     16
+ Banded SDJ:     377    380    527    525     11     11
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28235D-07    0.18802D-07
+ Sparse: JACSP - VODE:     0.14027D-07    0.22905D-07
+ Banded: JACSP - VODE:     0.28235D-07    0.18802D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     409    416    556    565     12     12
+ Sparse SDJ:     384    408    613    658     15     17
+ Banded SDJ:     409    416    556    565     12     12
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.82990D-08    0.10582D-06
+ Sparse: JACSP - VODE:     0.12100D-05    0.13323D-06
+ Banded: JACSP - VODE:     0.82990D-08    0.10582D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     552    549    725    711     14     14
+ Sparse SDJ:     811    532   2010    813     95     19
+ Banded SDJ:     552    549    725    711     14     14
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.39659D-08    0.24400D-08
+ Sparse: JACSP - VODE:     0.61869D-08    0.76607D-08
+ Banded: JACSP - VODE:     0.39659D-08    0.24400D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     558    564    727    737     14     14
+ Sparse SDJ:     540    539    803    790     18     18
+ Banded SDJ:     558    564    727    737     14     14
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.59783D-08    0.25960D-09
+ Sparse: JACSP - VODE:     0.59677D-08    0.67201D-08
+ Banded: JACSP - VODE:     0.59783D-08    0.25960D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     728    748    914    916     18     18
+ Sparse SDJ:     870    739   1539   1057     50     25
+ Banded SDJ:     728    748    914    916     18     18
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.48625D-10    0.17375D-08
+ Sparse: JACSP - VODE:     0.68585D-06    0.91936D-10
+ Banded: JACSP - VODE:     0.48625D-10    0.17375D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     766    769    950    956     19     19
+ Sparse SDJ:    1244    771   3392   1087    198     27
+ Banded SDJ:     766    769    950    956     19     19
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.24609D-09    0.12428D-08
+ Sparse: JACSP - VODE:     0.48970D-08    0.69177D-09
+ Banded: JACSP - VODE:     0.24609D-09    0.12428D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1062   1048   1274   1267     24     23
+ Sparse SDJ:    1655   1047   4104   1411    223     31
+ Banded SDJ:    1062   1048   1274   1267     24     23
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10133D-07    0.73500D-10
+ Sparse: JACSP - VODE:     0.16934D-09    0.47575D-10
+ Banded: JACSP - VODE:     0.10133D-07    0.73500D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1208   1122   1736   1337     73     24
+ Sparse SDJ:    1405   1125   2101   1528     58     36
+ Banded SDJ:    1208   1122   1736   1337     73     24
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10843D-08    0.12562D-08
+ Sparse: JACSP - VODE:     0.18693D-07    0.90016D-10
+ Banded: JACSP - VODE:     0.10843D-08    0.12562D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    2969   1525   9199   1801    931     32
+ Sparse SDJ:    3728   1508  16705   2015   1213     48
+ Banded SDJ:    2969   1525   9199   1801    931     32
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.37456D-09    0.76892D-11
+ Sparse: JACSP - VODE:     0.91198D-10    0.63126D-11
+ Banded: JACSP - VODE:     0.37456D-09    0.76892D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    3377   1586  10342   1836   1029     33
+ Sparse SDJ:    2844   1585  10037   2087    678     48
+ Banded SDJ:    3377   1586  10342   1836   1029     33
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.15374D-08    0.94680D-11
+ Sparse: JACSP - VODE:     0.46963D-09    0.76380D-10
+ Banded: JACSP - VODE:     0.15374D-08    0.94680D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    5489   2182  17557   2483   1754     43
+ Sparse SDJ:    5923   2179  25091   2813   1748     62
+ Banded SDJ:    5489   2182  17557   2483   1754     43
+ ____________________________________________________________
+
+ Problem No. =  44
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.29906D-09    0.87967D-12
+ Sparse: JACSP - VODE:     0.70771D-09    0.76457D-12
+ Banded: JACSP - VODE:     0.29906D-09    0.87967D-12
+                   J      V      J      V      J      V
+ Dense  SDJ:    4956   2282  14098   2599   1323     44
+ Sparse SDJ:    5150   2282  21439   2960   1518     67
+ Banded SDJ:    4956   2282  14098   2599   1323     44
+ ____________________________________________________________
+ Problem No. =  44
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.73937D-10    0.55245D-11
+ Sparse: JACSP - VODE:     0.30552D-10    0.10748D-11
+ Banded: JACSP - VODE:     0.73937D-10    0.55245D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    6988   3190  18983   3644   1610     61
+ Sparse SDJ:    7437   3130  26031   4013   1620     89
+ Banded SDJ:    6988   3190  18983   3644   1610     61
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = E5
+
+ Problem No. =  45
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.56626D-05    0.18855D-04
+ Sparse: JACSP - VODE:     0.54941D-05    0.54950D-05
+ Banded: JACSP - VODE:     0.56626D-05    0.18855D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      74     73    100    104      2      3
+ Sparse SDJ:      80     80    140    139      5      5
+ Banded SDJ:      74     73    100    104      2      3
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.53967D-03    0.54075D-03
+ Sparse: JACSP - VODE:     0.75382D-05    0.75382D-05
+ Banded: JACSP - VODE:     0.53967D-03    0.54075D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:      10     10     29     29      2      2
+ Sparse SDJ:      10     10     65     65      6      6
+ Banded SDJ:      10     10     29     29      2      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.13718D-05    0.19244D-05
+ Sparse: JACSP - VODE:     0.13700D-05    0.15627D-05
+ Banded: JACSP - VODE:     0.13718D-05    0.19244D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:      88    106    133    151      3      4
+ Sparse SDJ:      88     98    153    169      4      5
+ Banded SDJ:      88    106    133    151      3      4
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.18276D-05    0.18339D-05
+ Sparse: JACSP - VODE:     0.12578D-04    0.12577D-04
+ Banded: JACSP - VODE:     0.18276D-05    0.18339D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:      15     15     34     34      2      2
+ Sparse SDJ:      14     14     84     84      7      7
+ Banded SDJ:      15     15     34     34      2      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.17151D-06    0.43258D-06
+ Sparse: JACSP - VODE:     0.18863D-06    0.41049D-06
+ Banded: JACSP - VODE:     0.17151D-06    0.43258D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     119    136    169    184      4      4
+ Sparse SDJ:     121    132    196    204      5      5
+ Banded SDJ:     119    136    169    184      4      4
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.11765D-05    0.11756D-05
+ Sparse: JACSP - VODE:     0.10684D-06    0.10684D-06
+ Banded: JACSP - VODE:     0.11765D-05    0.11756D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:      22     22     42     42      2      2
+ Sparse SDJ:      20     20     72     72      5      5
+ Banded SDJ:      22     22     42     42      2      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10221D-07    0.18415D-07
+ Sparse: JACSP - VODE:     0.95418D-08    0.42365D-07
+ Banded: JACSP - VODE:     0.10221D-07    0.18415D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     179    182    254    250      6      6
+ Sparse SDJ:     190    193    296    295      8      8
+ Banded SDJ:     179    182    254    250      6      6
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16166D-06    0.29771D-06
+ Sparse: JACSP - VODE:     0.99133D-07    0.99142D-07
+ Banded: JACSP - VODE:     0.16166D-06    0.29771D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:      26     29     53     56      2      2
+ Sparse SDJ:      30     30     93     93      5      5
+ Banded SDJ:      26     29     53     56      2      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.51652D-07    0.50265D-07
+ Sparse: JACSP - VODE:     0.49339D-07    0.51484D-07
+ Banded: JACSP - VODE:     0.51652D-07    0.50265D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     262    263    345    350      7      7
+ Sparse SDJ:     239    276    356    421      8     11
+ Banded SDJ:     262    263    345    350      7      7
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.51084D-08    0.13511D-08
+ Sparse: JACSP - VODE:     0.78998D-08    0.79010D-08
+ Banded: JACSP - VODE:     0.51084D-08    0.13511D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:      42     41     75     77      2      2
+ Sparse SDJ:      43     43    107    107      5      5
+ Banded SDJ:      42     41     75     77      2      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.53601D-07    0.53885D-07
+ Sparse: JACSP - VODE:     0.53517D-07    0.53505D-07
+ Banded: JACSP - VODE:     0.53601D-07    0.53885D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     369    344    500    449     10     10
+ Sparse SDJ:     362    361    560    556     14     14
+ Banded SDJ:     369    344    500    449     10     10
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.33732D-08    0.46690D-08
+ Sparse: JACSP - VODE:     0.32759D-08    0.32760D-08
+ Banded: JACSP - VODE:     0.33732D-08    0.46690D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:      66     61    100     93      1      2
+ Sparse SDJ:      66     66    136    136      5      5
+ Banded SDJ:      66     61    100     93      1      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.53915D-07    0.53922D-07
+ Sparse: JACSP - VODE:     0.53927D-07    0.53933D-07
+ Banded: JACSP - VODE:     0.53915D-07    0.53922D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     467    475    592    603     12     13
+ Sparse SDJ:     480    495    714    737     17     19
+ Banded SDJ:     467    475    592    603     12     13
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.67854D-09    0.82755D-09
+ Sparse: JACSP - VODE:     0.91000D-09    0.91000D-09
+ Banded: JACSP - VODE:     0.67854D-09    0.82755D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:      84     85    130    127      2      2
+ Sparse SDJ:      86     86    172    172      6      6
+ Banded SDJ:      84     85    130    127      2      2
+ ____________________________________________________________
+
+ Problem No. =  45
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.53936D-07    0.53935D-07
+ Sparse: JACSP - VODE:     0.53936D-07    0.53936D-07
+ Banded: JACSP - VODE:     0.53936D-07    0.53935D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     669    684    834    834     16     16
+ Sparse SDJ:     664    675    923    940     20     21
+ Banded SDJ:     669    684    834    834     16     16
+ ____________________________________________________________
+ Problem No. =  45
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.22400D-09    0.25207D-09
+ Sparse: JACSP - VODE:     0.23251D-09    0.23257D-09
+ Banded: JACSP - VODE:     0.22400D-09    0.25207D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     103    105    143    151      2      2
+ Sparse SDJ:     103    103    191    191      7      7
+ Banded SDJ:     103    105    143    151      2      2
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = F1
+
+ Problem No. =  51
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.42450D-05    0.83831D-05
+ Sparse: JACSP - VODE:     0.64518D-05    0.75494D-05
+ Banded: JACSP - VODE:     0.42450D-05    0.83831D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     384    349    745    664     22     19
+ Sparse SDJ:     260    252    555    599     20     21
+ Banded SDJ:     384    349    745    664     22     19
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.98034D-02    0.66681D-02
+ Sparse: JACSP - VODE:     0.90740D-02    0.86694D-02
+ Banded: JACSP - VODE:     0.98034D-02    0.66681D-02
+                   J      V      J      V      J      V
+ Dense  SDJ:     273    295    474    514     16     17
+ Sparse SDJ:     348    301    724    647     24     22
+ Banded SDJ:     273    295    474    514     16     17
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.40150D-06    0.34351D-05
+ Sparse: JACSP - VODE:     0.24899D-05    0.85278D-06
+ Banded: JACSP - VODE:     0.40150D-06    0.34351D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     405    406    728    747     23     22
+ Sparse SDJ:     373    340    816    713     25     24
+ Banded SDJ:     405    406    728    747     23     22
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.14824D-02    0.82423D-03
+ Sparse: JACSP - VODE:     0.33431D-03    0.15384D-02
+ Banded: JACSP - VODE:     0.14824D-02    0.82423D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:     432    385    764    649     21     19
+ Sparse SDJ:     406    334    801    726     24     23
+ Banded SDJ:     432    385    764    649     21     19
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.89191D-07    0.24681D-06
+ Sparse: JACSP - VODE:     0.27678D-06    0.11446D-06
+ Banded: JACSP - VODE:     0.89191D-07    0.24681D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     538    607    977   1024     25     23
+ Sparse SDJ:     568    491   1229   1019     30     30
+ Banded SDJ:     538    607    977   1024     25     23
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32637D-04    0.31004D-04
+ Sparse: JACSP - VODE:     0.24654D-04    0.41469D-04
+ Banded: JACSP - VODE:     0.32637D-04    0.31004D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:     610    579   1079   1014     22     22
+ Sparse SDJ:     529    452   1058    912     31     27
+ Banded SDJ:     610    579   1079   1014     22     22
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.98051D-08    0.35524D-07
+ Sparse: JACSP - VODE:     0.38840D-07    0.50334D-07
+ Banded: JACSP - VODE:     0.98051D-08    0.35524D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     720    725   1174   1191     26     26
+ Sparse SDJ:     686    780   1220   1456     30     34
+ Banded SDJ:     720    725   1174   1191     26     26
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.55294D-05    0.98613D-05
+ Sparse: JACSP - VODE:     0.41407D-04    0.21342D-04
+ Banded: JACSP - VODE:     0.55294D-05    0.98613D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     753    816   1289   1339     25     25
+ Sparse SDJ:     684    735   1247   1410     32     36
+ Banded SDJ:     753    816   1289   1339     25     25
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.35698D-09    0.33201D-08
+ Sparse: JACSP - VODE:     0.30183D-08    0.47336D-08
+ Banded: JACSP - VODE:     0.35698D-09    0.33201D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1010   1013   1644   1603     31     31
+ Sparse SDJ:     960    980   1748   1858     41     42
+ Banded SDJ:    1010   1013   1644   1603     31     31
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.48443D-06    0.21504D-05
+ Sparse: JACSP - VODE:     0.23201D-06    0.12477D-05
+ Banded: JACSP - VODE:     0.48443D-06    0.21504D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:    1025    960   1620   1545     28     29
+ Sparse SDJ:    1039   1104   1839   2015     42     46
+ Banded SDJ:    1025    960   1620   1545     28     29
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.34065D-09    0.44423D-09
+ Sparse: JACSP - VODE:     0.14275D-11    0.78980D-09
+ Banded: JACSP - VODE:     0.34065D-09    0.44423D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1530   1496   2359   2279     35     36
+ Sparse SDJ:    1523   1520   2603   2561     54     55
+ Banded SDJ:    1530   1496   2359   2279     35     36
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.28004D-06    0.24935D-06
+ Sparse: JACSP - VODE:     0.36814D-06    0.28625D-06
+ Banded: JACSP - VODE:     0.28004D-06    0.24935D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:    1299   1299   1994   2016     33     32
+ Sparse SDJ:    1156   1290   2091   2270     48     50
+ Banded SDJ:    1299   1299   1994   2016     33     32
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.50261D-10    0.55779D-10
+ Sparse: JACSP - VODE:     0.58758D-10    0.50330D-10
+ Banded: JACSP - VODE:     0.50261D-10    0.55779D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    2132   2097   3065   3024     45     43
+ Sparse SDJ:    2033   2076   3441   3525     75     74
+ Banded SDJ:    2132   2097   3065   3024     45     43
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.40679D-07    0.41034D-07
+ Sparse: JACSP - VODE:     0.26661D-07    0.34577D-07
+ Banded: JACSP - VODE:     0.40679D-07    0.41034D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    1742   1881   2681   2767     38     39
+ Sparse SDJ:    1812   1673   3086   2706     64     56
+ Banded SDJ:    1742   1881   2681   2767     38     39
+ ____________________________________________________________
+
+ Problem No. =  51
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.91980D-11    0.69398D-11
+ Sparse: JACSP - VODE:     0.55835D-11    0.83380D-11
+ Banded: JACSP - VODE:     0.91980D-11    0.69398D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    2895   2913   4062   4059     55     56
+ Sparse SDJ:    2646   2719   4201   4306     84     89
+ Banded SDJ:    2895   2913   4062   4059     55     56
+ ____________________________________________________________
+ Problem No. =  51
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.56027D-08    0.42260D-08
+ Sparse: JACSP - VODE:     0.47503D-08    0.53990D-08
+ Banded: JACSP - VODE:     0.56027D-08    0.42260D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    2478   2298   3507   3270     49     47
+ Sparse SDJ:    2401   2396   3904   3820     81     83
+ Banded SDJ:    2478   2298   3507   3270     49     47
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = F2
+
+ Problem No. =  52
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12491D-04    0.12492D-04
+ Sparse: JACSP - VODE:     0.12435D-04    0.12438D-04
+ Banded: JACSP - VODE:     0.12491D-04    0.12492D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      95     95    137    137      3      3
+ Sparse SDJ:      95     95    152    152      5      5
+ Banded SDJ:      95     95    137    137      3      3
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.30169D-04    0.42227D-04
+ Sparse: JACSP - VODE:     0.44281D-04    0.44278D-04
+ Banded: JACSP - VODE:     0.30169D-04    0.42227D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:      81     81    113    116      3      3
+ Sparse SDJ:      81     81    130    130      5      5
+ Banded SDJ:      81     81    113    116      3      3
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.68819D-05    0.68569D-05
+ Sparse: JACSP - VODE:     0.69564D-05    0.69553D-05
+ Banded: JACSP - VODE:     0.68819D-05    0.68569D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     108    108    170    170      5      5
+ Sparse SDJ:     108    108    175    175      5      5
+ Banded SDJ:     108    108    170    170      5      5
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.78947D-05    0.78947D-05
+ Sparse: JACSP - VODE:     0.83441D-05    0.83441D-05
+ Banded: JACSP - VODE:     0.78947D-05    0.78947D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     102    102    141    141      3      3
+ Sparse SDJ:     102    102    155    155      5      5
+ Banded SDJ:     102    102    141    141      3      3
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.71041D-06    0.71038D-06
+ Sparse: JACSP - VODE:     0.84577D-07    0.84761D-07
+ Banded: JACSP - VODE:     0.71041D-06    0.71038D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     142    142    207    207      5      5
+ Sparse SDJ:     145    145    234    234      6      6
+ Banded SDJ:     142    142    207    207      5      5
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.80363D-06    0.80369D-06
+ Sparse: JACSP - VODE:     0.69584D-06    0.69569D-06
+ Banded: JACSP - VODE:     0.80363D-06    0.80369D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     123    123    192    192      5      5
+ Sparse SDJ:     121    121    195    195      5      5
+ Banded SDJ:     123    123    192    192      5      5
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.72658D-07    0.72659D-07
+ Sparse: JACSP - VODE:     0.14767D-07    0.14764D-07
+ Banded: JACSP - VODE:     0.72658D-07    0.72659D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     204    204    277    277      7      7
+ Sparse SDJ:     209    209    304    304      8      8
+ Banded SDJ:     204    204    277    277      7      7
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.21761D-07    0.21761D-07
+ Sparse: JACSP - VODE:     0.82699D-08    0.82571D-08
+ Banded: JACSP - VODE:     0.21761D-07    0.21761D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     166    166    219    219      5      5
+ Sparse SDJ:     164    164    224    224      5      5
+ Banded SDJ:     166    166    219    219      5      5
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28195D-08    0.94341D-08
+ Sparse: JACSP - VODE:     0.41146D-08    0.61490D-08
+ Banded: JACSP - VODE:     0.28195D-08    0.94341D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     284    285    368    359     10      9
+ Sparse SDJ:     288    285    408    402     12     12
+ Banded SDJ:     284    285    368    359     10      9
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.28042D-08    0.28025D-08
+ Sparse: JACSP - VODE:     0.74534D-08    0.74528D-08
+ Banded: JACSP - VODE:     0.28042D-08    0.28025D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     238    238    314    314      8      8
+ Sparse SDJ:     242    242    346    346      9      9
+ Banded SDJ:     238    238    314    314      8      8
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.57701D-09    0.21244D-08
+ Sparse: JACSP - VODE:     0.58912D-09    0.58908D-09
+ Banded: JACSP - VODE:     0.57701D-09    0.21244D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     398    388    474    470     12     11
+ Sparse SDJ:     397    397    505    505     14     14
+ Banded SDJ:     398    388    474    470     12     11
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.27797D-09    0.14619D-08
+ Sparse: JACSP - VODE:     0.28170D-09    0.28179D-09
+ Banded: JACSP - VODE:     0.27797D-09    0.14619D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     323    318    395    385     10     10
+ Sparse SDJ:     323    323    419    419     11     11
+ Banded SDJ:     323    318    395    385     10     10
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.14003D-09    0.97876D-10
+ Sparse: JACSP - VODE:     0.13270D-09    0.16649D-09
+ Banded: JACSP - VODE:     0.14003D-09    0.97876D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     563    560    654    670     15     15
+ Sparse SDJ:     548    537    695    683     18     18
+ Banded SDJ:     563    560    654    670     15     15
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.19253D-09    0.16732D-09
+ Sparse: JACSP - VODE:     0.19460D-09    0.20958D-09
+ Banded: JACSP - VODE:     0.19253D-09    0.16732D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     443    445    534    533     12     12
+ Sparse SDJ:     443    442    570    569     15     15
+ Banded SDJ:     443    445    534    533     12     12
+ ____________________________________________________________
+
+ Problem No. =  52
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.27760D-10    0.15065D-10
+ Sparse: JACSP - VODE:     0.22209D-10    0.20416D-10
+ Banded: JACSP - VODE:     0.27760D-10    0.15065D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     778    790    894    905     19     19
+ Sparse SDJ:     779    780    968    961     26     25
+ Banded SDJ:     778    790    894    905     19     19
+ ____________________________________________________________
+ Problem No. =  52
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32807D-10    0.23898D-10
+ Sparse: JACSP - VODE:     0.18717D-11    0.13130D-10
+ Banded: JACSP - VODE:     0.32807D-10    0.23898D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     638    656    741    775     16     17
+ Sparse SDJ:     657    649    817    812     21     21
+ Banded SDJ:     638    656    741    775     16     17
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = F3
+
+ Problem No. =  53
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.44042D-06    0.92601D-05
+ Sparse: JACSP - VODE:     0.27632D-04    0.36554D-04
+ Banded: JACSP - VODE:     0.44042D-06    0.92601D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     195    191    274    270      4      4
+ Sparse SDJ:     184    521    334    909      8     21
+ Banded SDJ:     195    191    274    270      4      4
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.62767D-05    0.68255D-05
+ Sparse: JACSP - VODE:     0.62766D-05    0.52782D-05
+ Banded: JACSP - VODE:     0.62767D-05    0.68255D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:      20     19     34     32      2      2
+ Sparse SDJ:      20     17     54     61      3      4
+ Banded SDJ:      20     19     34     32      2      2
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.40834D-06    0.17257D-05
+ Sparse: JACSP - VODE:     0.38004D-06    0.55420D-06
+ Banded: JACSP - VODE:     0.40834D-06    0.17257D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     225    225    303    302      5      5
+ Sparse SDJ:     219    220    354    354      9      9
+ Banded SDJ:     225    225    303    302      5      5
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.30404D-06    0.67732D-06
+ Sparse: JACSP - VODE:     0.30228D-06    0.67472D-06
+ Banded: JACSP - VODE:     0.30404D-06    0.67732D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:      27     27     45     45      2      2
+ Sparse SDJ:      27     27     65     66      3      3
+ Banded SDJ:      27     27     45     45      2      2
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.14488D-06    0.19027D-06
+ Sparse: JACSP - VODE:     0.29711D-09    0.59935D-09
+ Banded: JACSP - VODE:     0.14488D-06    0.19027D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     346    351    491    471      7      7
+ Sparse SDJ:     292    289    469    463     11     11
+ Banded SDJ:     346    351    491    471      7      7
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.10621D-06    0.42297D-07
+ Sparse: JACSP - VODE:     0.63975D-07    0.40358D-07
+ Banded: JACSP - VODE:     0.10621D-06    0.42297D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:      46     35     64     55      2      2
+ Sparse SDJ:      46     35     85     75      3      3
+ Banded SDJ:      46     35     64     55      2      2
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.56650D-08    0.60485D-07
+ Sparse: JACSP - VODE:     0.24491D-07    0.24813D-07
+ Banded: JACSP - VODE:     0.56650D-08    0.60485D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     414    422    507    515      8      8
+ Sparse SDJ:     401    401    615    612     15     15
+ Banded SDJ:     414    422    507    515      8      8
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.63324D-10    0.35852D-07
+ Sparse: JACSP - VODE:     0.62981D-10    0.44211D-07
+ Banded: JACSP - VODE:     0.63324D-10    0.35852D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:      63     56     87     83      2      2
+ Sparse SDJ:      63     50    107     96      3      3
+ Banded SDJ:      63     56     87     83      2      2
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28828D-07    0.28972D-07
+ Sparse: JACSP - VODE:     0.99486D-09    0.25205D-08
+ Banded: JACSP - VODE:     0.28828D-07    0.28972D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:     598    598    723    721     11     11
+ Sparse SDJ:     589    589    882    873     22     22
+ Banded SDJ:     598    598    723    721     11     11
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.13075D-10    0.95041D-08
+ Sparse: JACSP - VODE:     0.13375D-10    0.63143D-08
+ Banded: JACSP - VODE:     0.13075D-10    0.95041D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:      69     76     95    109      2      2
+ Sparse SDJ:      69     77    115    146      3      5
+ Banded SDJ:      69     76     95    109      2      2
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.39988D-10    0.98668D-10
+ Sparse: JACSP - VODE:     0.44213D-09    0.11303D-09
+ Banded: JACSP - VODE:     0.39988D-10    0.98668D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     827    822    967    960     15     15
+ Sparse SDJ:     817    811   1151   1145     27     27
+ Banded SDJ:     827    822    967    960     15     15
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.14171D-09    0.22604D-10
+ Sparse: JACSP - VODE:     0.28536D-09    0.37499D-09
+ Banded: JACSP - VODE:     0.14171D-09    0.22604D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     137    131    182    182      3      3
+ Sparse SDJ:     131    135    217    228      6      6
+ Banded SDJ:     137    131    182    182      3      3
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.23326D-10    0.13018D-10
+ Sparse: JACSP - VODE:     0.31057D-09    0.20022D-10
+ Banded: JACSP - VODE:     0.23326D-10    0.13018D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    1169   1184   1343   1373     21     21
+ Sparse SDJ:    1173   1171   1618   1614     35     36
+ Banded SDJ:    1169   1184   1343   1373     21     21
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.24920D-11    0.17536D-10
+ Sparse: JACSP - VODE:     0.65464D-10    0.62854D-11
+ Banded: JACSP - VODE:     0.24920D-11    0.17536D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     135    144    198    201      3      3
+ Sparse SDJ:     157    155    286    259      8      6
+ Banded SDJ:     135    144    198    201      3      3
+ ____________________________________________________________
+
+ Problem No. =  53
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.48531D-11    0.52112D-11
+ Sparse: JACSP - VODE:     0.53804D-10    0.48481D-11
+ Banded: JACSP - VODE:     0.48531D-11    0.52112D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1680   1676   1900   1900     29     29
+ Sparse SDJ:    1674   1661   2232   2216     49     49
+ Banded SDJ:    1680   1676   1900   1900     29     29
+ ____________________________________________________________
+ Problem No. =  53
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.40680D-11    0.20679D-12
+ Sparse: JACSP - VODE:     0.78850D-13    0.47308D-12
+ Banded: JACSP - VODE:     0.40680D-11    0.20679D-12
+                   J      V      J      V      J      V
+ Dense  SDJ:     215    212    290    298      4      5
+ Sparse SDJ:     219    197    362    325      8      8
+ Banded SDJ:     215    212    290    298      4      5
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = F4
+
+ Problem No. =  54
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10047D-04    0.96101D-05
+ Sparse: JACSP - VODE:     0.62567D-05    0.65989D-05
+ Banded: JACSP - VODE:     0.10047D-04    0.96101D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     674    685   1045   1058     21     21
+ Sparse SDJ:     658    654   1139   1147     34     35
+ Banded SDJ:     674    685   1045   1058     21     21
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.17101D-02    0.54195D-03
+ Sparse: JACSP - VODE:     0.12704D-02    0.16665D-02
+ Banded: JACSP - VODE:     0.17101D-02    0.54195D-03
+                   J      V      J      V      J      V
+ Dense  SDJ:    1180   1158   1914   1963     29     29
+ Sparse SDJ:    1004   1073   1864   1958     45     48
+ Banded SDJ:    1180   1158   1914   1963     29     29
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.15766D-05    0.15970D-05
+ Sparse: JACSP - VODE:     0.24933D-06    0.30389D-05
+ Banded: JACSP - VODE:     0.15766D-05    0.15970D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:     845    805   1297   1216     23     24
+ Sparse SDJ:     754    834   1272   1415     35     37
+ Banded SDJ:     845    805   1297   1216     23     24
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.20587D-03    0.86593D-04
+ Sparse: JACSP - VODE:     0.64346D-05    0.27303D-04
+ Banded: JACSP - VODE:     0.20587D-03    0.86593D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:    1348   1308   2337   2206     35     34
+ Sparse SDJ:    1224   1144   2386   2115     54     50
+ Banded SDJ:    1348   1308   2337   2206     35     34
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.16906D-06    0.26064D-06
+ Sparse: JACSP - VODE:     0.40697D-07    0.36883D-06
+ Banded: JACSP - VODE:     0.16906D-06    0.26064D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:     937   1018   1556   1726     27     28
+ Sparse SDJ:     973    833   1726   1482     43     38
+ Banded SDJ:     937   1018   1556   1726     27     28
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.32802D-04    0.30100D-04
+ Sparse: JACSP - VODE:     0.14950D-04    0.31403D-04
+ Banded: JACSP - VODE:     0.32802D-04    0.30100D-04
+                   J      V      J      V      J      V
+ Dense  SDJ:    1637   1811   2695   2965     39     41
+ Sparse SDJ:    1569   1563   2747   2714     64     65
+ Banded SDJ:    1637   1811   2695   2965     39     41
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.10143D-06    0.80383D-07
+ Sparse: JACSP - VODE:     0.29301D-07    0.10454D-06
+ Banded: JACSP - VODE:     0.10143D-06    0.80383D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    1438   1237   2398   2084     34     31
+ Sparse SDJ:    1171   1294   2120   2356     51     53
+ Banded SDJ:    1438   1237   2398   2084     34     31
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.71240D-05    0.68297D-05
+ Sparse: JACSP - VODE:     0.62731D-05    0.99637D-06
+ Banded: JACSP - VODE:     0.71240D-05    0.68297D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:    2262   2320   3535   3652     47     49
+ Sparse SDJ:    2276   2237   3876   3832     83     82
+ Banded SDJ:    2262   2320   3535   3652     47     49
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12654D-08    0.15844D-08
+ Sparse: JACSP - VODE:     0.48541D-08    0.59517D-08
+ Banded: JACSP - VODE:     0.12654D-08    0.15844D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    1685   1679   2766   2745     38     40
+ Sparse SDJ:    1609   1750   2925   3002     68     70
+ Banded SDJ:    1685   1679   2766   2745     38     40
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.15118D-05    0.15477D-05
+ Sparse: JACSP - VODE:     0.28223D-06    0.76446D-06
+ Banded: JACSP - VODE:     0.15118D-05    0.15477D-05
+                   J      V      J      V      J      V
+ Dense  SDJ:    3019   3208   4554   4842     60     62
+ Sparse SDJ:    2960   3105   4976   5145    109    112
+ Banded SDJ:    3019   3208   4554   4842     60     62
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.47860D-09    0.10080D-08
+ Sparse: JACSP - VODE:     0.68655D-09    0.64865D-09
+ Banded: JACSP - VODE:     0.47860D-09    0.10080D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    2127   2337   3285   3662     46     50
+ Sparse SDJ:    2055   2249   3498   3975     79     88
+ Banded SDJ:    2127   2337   3285   3662     46     50
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.12712D-06    0.26443D-06
+ Sparse: JACSP - VODE:     0.15492D-06    0.13681D-06
+ Banded: JACSP - VODE:     0.12712D-06    0.26443D-06
+                   J      V      J      V      J      V
+ Dense  SDJ:    4324   3984   6276   5659     81     78
+ Sparse SDJ:    4080   4194   6552   6749    146    147
+ Banded SDJ:    4324   3984   6276   5659     81     78
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.74371D-10    0.74297D-10
+ Sparse: JACSP - VODE:     0.74189D-10    0.10936D-09
+ Banded: JACSP - VODE:     0.74371D-10    0.74297D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    2792   2972   4086   4407     57     58
+ Sparse SDJ:    2718   2723   4357   4382     98    101
+ Banded SDJ:    2792   2972   4086   4407     57     58
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.31099D-07    0.28879D-07
+ Sparse: JACSP - VODE:     0.68204D-08    0.76714D-08
+ Banded: JACSP - VODE:     0.31099D-07    0.28879D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:    5707   5666   7825   7821    104    104
+ Sparse SDJ:    5440   5627   8178   8589    182    193
+ Banded SDJ:    5707   5666   7825   7821    104    104
+ ____________________________________________________________
+
+ Problem No. =  54
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.21217D-10    0.18871D-10
+ Sparse: JACSP - VODE:     0.16975D-10    0.15722D-10
+ Banded: JACSP - VODE:     0.21217D-10    0.18871D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:    3881   3815   5628   5518     72     74
+ Sparse SDJ:    3815   3656   6013   5767    137    125
+ Banded SDJ:    3881   3815   5628   5518     72     74
+ ____________________________________________________________
+ Problem No. =  54
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.35412D-08    0.21857D-08
+ Sparse: JACSP - VODE:     0.16820D-08    0.18689D-08
+ Banded: JACSP - VODE:     0.35412D-08    0.21857D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:    7855   7815  10179  10298    141    141
+ Sparse SDJ:    7412   7617  10737  11111    235    242
+ Banded SDJ:    7855   7815  10179  10298    141    141
+ ____________________________________________________________
+ ____________________________________________________________
+ Class/Problem = F5
+
+ Problem No. =  55
+ ITOL =   5
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.69479D-09    0.11483D-08
+ Sparse: JACSP - VODE:     0.47789D-07    0.10778D-08
+ Banded: JACSP - VODE:     0.69479D-09    0.11483D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:     183    183    284    284      7      7
+ Sparse SDJ:     193    193    341    341      8      8
+ Banded SDJ:     183    183    284    284      7      7
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =   5
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.84776D-08    0.10316D-07
+ Sparse: JACSP - VODE:     0.69075D-11    0.16224D-11
+ Banded: JACSP - VODE:     0.84776D-08    0.10316D-07
+                   J      V      J      V      J      V
+ Dense  SDJ:      45     45     71     71      2      2
+ Sparse SDJ:      88     88    152    152      5      5
+ Banded SDJ:      45     45     71     71      2      2
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =   6
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.28990D-08    0.11877D-10
+ Sparse: JACSP - VODE:     0.18920D-08    0.15185D-09
+ Banded: JACSP - VODE:     0.28990D-08    0.11877D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     276    278    416    419      9      9
+ Sparse SDJ:     257    258    431    432     11     11
+ Banded SDJ:     276    278    416    419      9      9
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =   6
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.70973D-08    0.63884D-08
+ Sparse: JACSP - VODE:     0.53584D-12    0.38018D-11
+ Banded: JACSP - VODE:     0.70973D-08    0.63884D-08
+                   J      V      J      V      J      V
+ Dense  SDJ:      70     70    103    103      2      2
+ Sparse SDJ:     134    134    248    247      5      5
+ Banded SDJ:      70     70    103    103      2      2
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =   7
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.30004D-08    0.33382D-09
+ Sparse: JACSP - VODE:     0.73318D-07    0.11474D-09
+ Banded: JACSP - VODE:     0.30004D-08    0.33382D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     372    343    544    511     11     11
+ Sparse SDJ:     340    364    550    588     14     14
+ Banded SDJ:     372    343    544    511     11     11
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =   7
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.26523D-12    0.11096D-11
+ Sparse: JACSP - VODE:     0.94684D-11    0.59936D-12
+ Banded: JACSP - VODE:     0.26523D-12    0.11096D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     117    117    197    197      4      4
+ Sparse SDJ:     109    109    235    219      8      6
+ Banded SDJ:     117    117    197    197      4      4
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =   8
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.50719D-08    0.16738D-09
+ Sparse: JACSP - VODE:     0.50640D-09    0.57834D-09
+ Banded: JACSP - VODE:     0.50719D-08    0.16738D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     500    501    732    733     14     14
+ Sparse SDJ:     409    437    639    674     16     16
+ Banded SDJ:     500    501    732    733     14     14
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =   8
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.92598D-12    0.32921D-11
+ Sparse: JACSP - VODE:     0.13918D-07    0.59299D-12
+ Banded: JACSP - VODE:     0.92598D-12    0.32921D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     161    161    296    296      5      5
+ Sparse SDJ:     170    156    326    290      8      6
+ Banded SDJ:     161    161    296    296      5      5
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =   9
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.54653D-08    0.51192D-09
+ Sparse: JACSP - VODE:     0.20164D-08    0.98173D-09
+ Banded: JACSP - VODE:     0.54653D-08    0.51192D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:     666    639    993    948     18     17
+ Sparse SDJ:     714    613   1254    989     29     22
+ Banded SDJ:     666    639    993    948     18     17
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =   9
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.70164D-11    0.15121D-11
+ Sparse: JACSP - VODE:     0.17527D-11    0.99489D-12
+ Banded: JACSP - VODE:     0.70164D-11    0.15121D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     235    218    416    391      7      7
+ Sparse SDJ:     207    209    398    402      8      8
+ Banded SDJ:     235    218    416    391      7      7
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =  10
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.12202D-07    0.38982D-10
+ Sparse: JACSP - VODE:     0.13581D-08    0.19868D-09
+ Banded: JACSP - VODE:     0.12202D-07    0.38982D-10
+                   J      V      J      V      J      V
+ Dense  SDJ:     828    838   1178   1214     21     23
+ Sparse SDJ:     815    785   1342   1263     31     28
+ Banded SDJ:     828    838   1178   1214     21     23
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =  10
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.55915D-11    0.62047D-11
+ Sparse: JACSP - VODE:     0.52863D-11    0.40902D-12
+ Banded: JACSP - VODE:     0.55915D-11    0.62047D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     355    374    603    631      9     10
+ Sparse SDJ:     333    336    665    651     16     14
+ Banded SDJ:     355    374    603    631      9     10
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =  11
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.86760D-09    0.12232D-09
+ Sparse: JACSP - VODE:     0.57853D-09    0.19853D-10
+ Banded: JACSP - VODE:     0.86760D-09    0.12232D-09
+                   J      V      J      V      J      V
+ Dense  SDJ:    1137   1122   1581   1731     29     52
+ Sparse SDJ:    1049   1128   1685   2140     39     71
+ Banded SDJ:    1137   1122   1581   1731     29     52
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =  11
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.16240D-11    0.24626D-11
+ Sparse: JACSP - VODE:     0.49212D-12    0.17387D-11
+ Banded: JACSP - VODE:     0.16240D-11    0.24626D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:     427    429    694    678     11     12
+ Sparse SDJ:     454    457    818    876     17     18
+ Banded SDJ:     427    429    694    678     11     12
+ ____________________________________________________________
+
+ Problem No. =  55
+ ITOL =  12
+ Scaled ODEs             Absolute Errors
+ Dense : JACSP - VODE:     0.58973D-09    0.30504D-11
+ Sparse: JACSP - VODE:     0.35250D-09    0.55322D-10
+ Banded: JACSP - VODE:     0.58973D-09    0.30504D-11
+                   J      V      J      V      J      V
+ Dense  SDJ:    1458   1527   1999   2230     48     66
+ Sparse SDJ:    1420   1558   2240   3010     58    114
+ Banded SDJ:    1458   1527   1999   2230     48     66
+ ____________________________________________________________
+ Problem No. =  55
+ ITOL =  12
+ Unscaled ODEs                  Absolute Errors
+ Dense : JACSP - VODE:     0.44166D-10    0.11449D-14
+ Sparse: JACSP - VODE:     0.92535D-12    0.11446D-11
+ Banded: JACSP - VODE:     0.44166D-10    0.11449D-14
+                   J      V      J      V      J      V
+ Dense  SDJ:     553    544    870    859     15     17
+ Sparse SDJ:     523    571    944   1046     22     28
+ Banded SDJ:     553    544    870    859     15     17
+ ____________________________________________________________
+
+ Total number of solutions performed =  2880
+ ____________________________________________________________
+
+ Tolerance          Total Execution Time
+        5                   0
+        6                   0
+        7                   0
+        8                   0
+        9                   0
+       10                   0
+       11                   0
+       12                   1
+ ____________________________________________________________
+
+
+ To locate the summary results, search on the phrase
+ Summary Statistics Follow in the output file (stiffoptions.dat).
+
+
+
+ No errors occurred.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffoptions.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffoptions.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffoptions.f90	(revision 3477)
@@ -0,0 +1,2217 @@
+! DVODE_F90 demonstration program
+! Enforces nonnegativity on the Class F problems
+
+! Toronto Stiff Test Set
+
+! This program solves each of the thirty problems for several error
+! tolerances using each of the dense, banded, and sparse solution
+! options and with the numerical Jacobians formed using each of the
+! original VODE algorithm and Doug Salane's JACSP. The ODEs are
+! solved both in scaled and unscaled form. Scalar error tolerances
+! are used for all problems even though this is not appropriate in
+! some cases. The program takes 10-15 minutes to run because several
+! thousand integrations are performed in all. Details of each
+! integration are written to the output file 'stiffoptions.dat'.
+! Summaries of the integration statistics may be found by searching
+! on the string 'Individual'. There are several blocks of such summaries.
+! When you run the program, the last line in the output file should
+! read: 'No errors occurred.' Please contact one of the authors if
+! any errors do occur.
+
+! Reference:
+! ALGORITHM 648, COLLECTED ALGORITHMS FROM ACM.
+! TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+! VOL. 13, NO. 1, P. 28
+
+! Caution:
+! The original test routines are altered in this version.
+! Some subroutine arguments, COMMON variables, and local
+! variables have been moved to the following global header.
+! You should obtain the original test suite from netlib
+! if you plan to use the routines for other purposes.
+
+    MODULE STIFFSET
+
+! Note:
+! In this version ID and IID are defined in the main
+! program demostiff (not in the Toronto routines).
+! The other parameters are obtained by calling IVALU
+! with a modified argument list.
+
+      IMPLICIT NONE
+      INTEGER IWT, N, ID, IID, NFCN, NJAC, NLUD
+      DOUBLE PRECISION W, DY
+      DIMENSION W(20), DY(400)
+
+    CONTAINS
+
+      SUBROUTINE DERIVS(NEQ,T,Y,YDOT)
+!       Define the system derivatives.
+        IMPLICIT NONE
+        INTEGER NEQ
+        DOUBLE PRECISION T, Y, YDOT
+        DIMENSION Y(NEQ), YDOT(NEQ)
+        CALL FCN(T,Y,YDOT)
+        RETURN
+      END SUBROUTINE DERIVS
+
+      SUBROUTINE JACD(NEQ,T,Y,ML,MU,PD,NROWPD)
+!       Load the Jacobian as a dense matrix.
+        IMPLICIT NONE
+        INTEGER NEQ, ML, MU, NROWPD, I, J
+        DOUBLE PRECISION T, Y, PD
+        DIMENSION Y(NEQ), PD(NROWPD,NEQ)
+        CALL PDERV(T,Y)
+        DO J = 1, NEQ
+          DO I = 1, NEQ
+            PD(I,J) = DY(I+(J-1)*NROWPD)
+          END DO
+        END DO
+        RETURN
+      END SUBROUTINE JACD
+
+      SUBROUTINE JACB(NEQ,T,Y,ML,MU,PD,NROWPD)
+!       Load the Jacobian as a banded matrix.
+        IMPLICIT NONE
+        INTEGER NEQ, ML, MU, NROWPD, I, J, K
+        DOUBLE PRECISION T, Y, PD
+        DIMENSION Y(NEQ), PD(NROWPD,NEQ)
+        CALL PDERV(T,Y)
+        DO J = 1, NEQ
+           DO I = 1, NEQ
+              K = I - J + MU + 1
+              PD(K,J) = DY(I+(J-1)*NEQ)
+           END DO
+        END DO
+      END SUBROUTINE JACB
+
+      SUBROUTINE JACS(NEQ,T,Y,IA,JA,NZ,P)
+!       Load the Jacobian as a sparse matrix.
+        IMPLICIT NONE
+        INTEGER NEQ, IA, JA, NZ, ML, MU, COL, ROW, I, NROWPD
+!       INTEGER NZSAVE
+        DOUBLE PRECISION T, Y, P
+        DIMENSION Y(*), IA(*), JA(*), P(*)
+        IF (NZ<=0) THEN
+          NZ = NEQ*NEQ
+          RETURN
+        END IF
+        ML = NEQ - 1
+        MU = NEQ - 1
+        NROWPD = NEQ
+        CALL JACD(NEQ,T,Y,ML,MU,P,NROWPD)
+        IA(1) = 1
+        DO I = 1, NEQ
+          IA(I+1) = IA(I) + NEQ
+        END DO
+        I = 0
+        DO COL = 1, NEQ
+          I = NEQ*(COL-1)
+          DO ROW = 1, NEQ
+            I = I + 1
+            JA(I) = ROW
+          END DO
+        END DO
+        RETURN
+      END SUBROUTINE JACS
+
+      SUBROUTINE IVALU(XSTART,XEND,HBEGIN,HMAX,Y)
+
+!      ROUTINE TO PROVIDE THE INITIAL VALUES REQUIRED TO SPECIFY
+!      THE MATHEMATICAL PROBLEM AS WELL AS VARIOUS PROBLEM
+!      PARAMETERS REQUIRED BY THE TESTING PACKAGE. THE APPROPRIATE
+!      SCALING VECTOR IS ALSO INITIALISED IN CASE THIS OPTION IS
+!      SELECTED.
+
+!      PARAMETERS (OUTPUT)
+!         N      - DIMENSION OF THE PROBLEM
+!         XSTART - INITIAL VALUE OF THE INDEPENDENT VARIABLE
+!         XEND   - FINAL VALUE OF THE INDEPENDENT VARIABLE
+!         HBEGIN - APPROPRIATE STARTING STEPSIZE
+!         Y      - VECTOR OF INITIAL CONDITIONS FOR THE DEPENDENT
+!                  VARIABLES
+!         W      - VECTOR OF WEIGHTS USED TO SCALE THE PROBLEM IF
+!                  THIS OPTION IS SELECTED.
+
+!      PARAMETER  (INPUT)
+!         IWT    - FLAG TO INDICATE IF SCALED OPTION IS SELECTED
+!         ID     - FLAG IDENTIFYING WHICH EQUATION IS BEING SOLVED
+
+        IMPLICIT NONE
+
+!     .. Scalar Arguments ..
+        DOUBLE PRECISION HBEGIN, HMAX, XEND, XSTART
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(20)
+!     .. Local Scalars ..
+        DOUBLE PRECISION XS
+        INTEGER I, IOUT, ITMP
+!     .. Data statements ..
+        DATA XS/0.D0/
+
+!     .. Executable Statements ..
+
+        XSTART = XS
+!     GOTO (40, 80, 120, 160, 20, 20, 20, 20, 20, 20, 200, 220, 220,    &
+!     220, 220, 20, 20, 20, 20, 20, 360, 400, 400, 400, 400, 20, 20, 20,&
+!     20, 20, 540, 580, 600, 640, 660, 680, 20, 20, 20, 20, 700, 740,   &
+!     760, 780, 800, 20, 20, 20, 20, 20, 840, 860, 880, 900, 920) ID
+        GOTO (20,30,40,50,10,10,10,10,10,10,60,70,70,70,70,10,10,10,10,10, &
+          130,140,140,140,140,10,10,10,10,10,200,210,220,230,240,250,10,10,10, &
+          10,260,270,280,290,300,10,10,10,10,10,310,320,330,340,350) ID
+10      IOUT = 6
+        WRITE (IOUT,FMT=90000) ID
+        STOP
+
+!     PROBLEM CLASS A - LINEAR WITH REAL EIGENVALUES
+
+20      CONTINUE
+!     PROBLEM A1
+        N = 4
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        XEND = 20.D0
+        HBEGIN = 1.0D-2
+        HMAX = 20.D0
+        DO I = 1, N
+          Y(I) = 1.0D0
+        END DO
+        GOTO 360
+
+30      CONTINUE
+!     PROBLEM A2
+        N = 9
+        W(1) = 0.100D+00
+        W(2) = 0.200D+00
+        W(3) = 0.300D+00
+        W(4) = 0.400D+00
+        W(5) = 0.500D+00
+        W(6) = 0.600D+00
+        W(7) = 0.700D+00
+        W(8) = 0.800D+00
+        W(9) = 0.900D+00
+        XEND = 120.D0
+        HBEGIN = 5.D-4
+        HMAX = 120.D0
+        DO I = 1, N
+          Y(I) = 0.D0
+        END DO
+        GOTO 360
+
+40      CONTINUE
+!     PROBLEM A3
+        N = 4
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.782D+01
+        W(4) = 0.100D+01
+        HBEGIN = 1.D-5
+        XEND = 20.D0
+        HMAX = 20.D0
+        DO I = 1, N
+          Y(I) = 1.D0
+        END DO
+        GOTO 360
+
+50      CONTINUE
+!     PROBLEM A4
+        N = 10
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        W(5) = 0.100D+01
+        W(6) = 0.100D+01
+        W(7) = 0.100D+01
+        W(8) = 0.100D+01
+        W(9) = 0.100D+01
+        W(10) = 0.100D+01
+        XEND = 1.D0
+        HBEGIN = 1.D-5
+        HMAX = 1.D0
+        DO I = 1, N
+          Y(I) = 1.D0
+        END DO
+        GOTO 360
+
+!     PROBLEM CLASS B - LINEAR WITH NON-REAL EIGENVALUES
+
+60      CONTINUE
+!     PROBLEM B1
+        N = 4
+        W(1) = 0.100D+01
+        W(2) = 0.859D+01
+        W(3) = 0.100D+01
+        W(4) = 0.322D+02
+        XEND = 20.D0
+        HBEGIN = 7.D-3
+        HMAX = 20.D0
+        Y(1) = 1.D0
+        Y(2) = 0.D0
+        Y(3) = 1.D0
+        Y(4) = 0.D0
+        GOTO 360
+
+70      CONTINUE
+!     PROBLEM B2, B3, B4, B5
+        N = 6
+        ITMP = IID - 1
+        GOTO (80,90,100,110) ITMP
+80      CONTINUE
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        W(5) = 0.100D+01
+        W(6) = 0.100D+01
+        GOTO 120
+90      CONTINUE
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        W(5) = 0.100D+01
+        W(6) = 0.100D+01
+        GOTO 120
+100     CONTINUE
+        W(1) = 0.112D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        W(5) = 0.100D+01
+        W(6) = 0.100D+01
+        GOTO 120
+110     CONTINUE
+        W(1) = 0.131D+01
+        W(2) = 0.112D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        W(5) = 0.100D+01
+        W(6) = 0.100D+01
+120     CONTINUE
+        XEND = 20.D0
+        HBEGIN = 1.D-2
+        HMAX = 20.D0
+        DO I = 1, N
+          Y(I) = 1.D0
+        END DO
+        GOTO 360
+
+!     PROBLEM CLASS C - NON-LINEAR COUPLING FROM
+!                       STEADY STATE TO TRANSIENT
+
+130     CONTINUE
+!     PROBLEM C1
+        N = 4
+        W(1) = 0.102D+01
+        W(2) = 0.103D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        XEND = 20.D0
+        HBEGIN = 1.D-2
+        HMAX = 20.D0
+        DO I = 1, N
+          Y(I) = 1.D0
+        END DO
+        GOTO 360
+
+140     CONTINUE
+!     PROBLEM C2, C3, C4, C5
+        N = 4
+        ITMP = IID - 1
+        GOTO (150,160,170,180) ITMP
+150     CONTINUE
+        W(1) = 0.200D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        GOTO 190
+160     CONTINUE
+        W(1) = 0.200D+01
+        W(2) = 0.100D+01
+        W(3) = 0.100D+01
+        W(4) = 0.100D+01
+        GOTO 190
+170     CONTINUE
+        W(1) = 0.200D+01
+        W(2) = 0.400D+01
+        W(3) = 0.200D+02
+        W(4) = 0.420D+03
+        GOTO 190
+180     CONTINUE
+        W(1) = 0.200D+01
+        W(2) = 0.800D+01
+        W(3) = 0.136D+03
+        W(4) = 0.371D+05
+190     CONTINUE
+        XEND = 20.D0
+        HBEGIN = 1.D-2
+        HMAX = 20.D0
+        DO I = 1, N
+          Y(I) = 1.D0
+        END DO
+        GOTO 360
+
+!     PROBLEM CLASS D - NON-LINEAR WITH REAL EIGENVALUES
+
+200     CONTINUE
+!     PROBLEM D1
+        N = 3
+        W(1) = 0.223D+02
+        W(2) = 0.271D+02
+        W(3) = 0.400D+03
+        XEND = 400.D0
+        HBEGIN = 1.7D-2
+        HMAX = 400.D0
+        DO I = 1, N
+          Y(I) = 0.D0
+        END DO
+        GOTO 360
+
+210     CONTINUE
+!     PROBLEM D2
+        N = 3
+        W(1) = 0.100D+01
+        W(2) = 0.365D+00
+        W(3) = 0.285D+02
+        XEND = 40.D0
+        HBEGIN = 1.D-5
+        HMAX = 40.D0
+        Y(1) = 1.D0
+        Y(2) = 0.D0
+        Y(3) = 0.D0
+        GOTO 360
+
+220     CONTINUE
+!     PROBLEM D3
+        N = 4
+        W(1) = 0.100D+01
+        W(2) = 0.100D+01
+        W(3) = 0.360D+00
+        W(4) = 0.485D+00
+        XEND = 20.D0
+        HBEGIN = 2.5D-5
+        HMAX = 20.D0
+        DO I = 1, 2
+          Y(I) = 1.D0
+          Y(I+2) = 0.D0
+        END DO
+        GOTO 360
+
+230     CONTINUE
+!     PROBLEM D4
+        N = 3
+        W(1) = 0.100D+01
+        W(2) = 0.142D+01
+        W(3) = 0.371D-05
+        XEND = 50.D0
+        HBEGIN = 2.9D-4
+        HMAX = 50.D0
+        Y(1) = 1.D0
+        Y(2) = 1.D0
+        Y(3) = 0.D0
+        GOTO 360
+
+240     CONTINUE
+!     PROBLEM D5
+        N = 2
+        W(1) = 0.992D+00
+        W(2) = 0.984D+00
+        XEND = 1.D2
+        HBEGIN = 1.D-4
+        HMAX = 1.D2
+        Y(1) = 0.D0
+        Y(2) = 0.D0
+        GOTO 360
+
+250     CONTINUE
+!     PROBLEM D6
+        N = 3
+        W(1) = 0.100D+01
+        W(2) = 0.148D+00
+        W(3) = 0.577D-07
+        XEND = 1.D0
+        HBEGIN = 3.3D-8
+        HMAX = 1.D0
+        Y(1) = 1.D0
+        Y(2) = 0.D0
+        Y(3) = 0.D0
+        GOTO 360
+
+!     PROBLEM CLASS E - NON-LINEAR WITH NON-REAL EIGENVALUES
+
+260     CONTINUE
+!     PROBLEM E1
+        N = 4
+        W(1) = 0.100D-07
+        W(2) = 0.223D-06
+        W(3) = 0.132D-04
+        W(4) = 0.171D-02
+        XEND = 1.D0
+        HBEGIN = 6.8D-3
+        HMAX = 1.D0
+        DO I = 1, N
+          Y(I) = 0.D0
+        END DO
+        GOTO 360
+
+270     CONTINUE
+!     PROBLEM E2
+        N = 2
+        W(1) = 0.202D+01
+        W(2) = 0.764D+01
+        XEND = 1.D1
+        HBEGIN = 1.D-3
+        HMAX = 1.D1
+        Y(1) = 2.D0
+        Y(2) = 0.D0
+        GOTO 360
+
+280     CONTINUE
+!     PROBLEM E3
+        N = 3
+        W(1) = 0.163D+01
+        W(2) = 0.160D+01
+        W(3) = 0.263D+02
+        XEND = 5.D2
+        HBEGIN = .2D-1
+        HMAX = 5.D2
+        Y(1) = 1.D0
+        Y(2) = 1.D0
+        Y(3) = 0.D0
+        GOTO 360
+
+290     CONTINUE
+!     PROBLEM E4
+        N = 4
+        W(1) = 0.288D+02
+        W(2) = 0.295D+02
+        W(3) = 0.155D+02
+        W(4) = 0.163D+02
+        XEND = 1.D3
+        HBEGIN = 1.D-3
+        HMAX = 1.D3
+        Y(1) = 0.D0
+        Y(2) = -2.D0
+        Y(3) = -1.D0
+        Y(4) = -1.D0
+        GOTO 360
+
+300     CONTINUE
+!     PROBLEM E5
+        N = 4
+        W(1) = 0.176D-02
+        W(2) = 0.146D-09
+        W(3) = 0.827D-11
+        W(4) = 0.138D-09
+        XEND = 1.D3
+        HBEGIN = 5.D-5
+        HMAX = 1.D3
+        Y(1) = 1.76D-3
+        DO I = 2, N
+          Y(I) = 0.D0
+        END DO
+        GOTO 360
+
+!     PROBLEM CLASS F - CHEMICAL KINETICS EQUATIONS
+
+310     CONTINUE
+!     PROBLEM F1
+        N = 4
+        W(1) = 0.121D+04
+        W(2) = 0.835D-01
+        W(3) = 0.121D+04
+        W(4) = 0.100D+00
+        HMAX = 1.D3
+        HBEGIN = 1.D-4
+        XEND = 1.D3
+        Y(1) = 761.D0
+        Y(2) = 0.D0
+        Y(3) = 600.D0
+        Y(4) = .1D0
+        GOTO 360
+
+320     CONTINUE
+!     PROBLEM F2
+        N = 2
+        W(1) = 0.100D+01
+        W(2) = 0.253D-02
+        HMAX = 240.D0
+        HBEGIN = 1.D-2
+        XEND = 240.D0
+        Y(1) = 1.0D0
+        Y(2) = 0.D0
+        GOTO 360
+
+330     CONTINUE
+!     PROBLEM F3
+        N = 5
+        W(1) = 0.400D-05
+        W(2) = 0.100D-05
+        W(3) = 0.374D-08
+        W(4) = 0.765D-06
+        W(5) = 0.324D-05
+        HBEGIN = 1.D-6
+        HBEGIN = 1.D-10
+        HMAX = 100.D0
+        XEND = 100.D0
+        Y(1) = 4.D-6
+        Y(2) = 1.D-6
+        Y(3) = 0.0D0
+        Y(4) = 0.0D0
+        Y(5) = 0.0D0
+        GOTO 360
+
+340     CONTINUE
+!     PROBLEM F4
+        N = 3
+        W(1) = 0.118D+06
+        W(2) = 0.177D+04
+        W(3) = 0.313D+05
+        HBEGIN = 1.D-3
+!       HMAX = 50.D0
+        HMAX = 1.D0
+        XEND = 300.D0
+        Y(1) = 4.D0
+        Y(2) = 1.1D0
+        Y(3) = 4.D0
+        GOTO 360
+
+350     CONTINUE
+!     PROBLEM F5
+        N = 4
+        W(1) = 0.336D-06
+        W(2) = 0.826D-02
+        W(3) = 0.619D-02
+        W(4) = 0.955D-05
+        HBEGIN = 1.D-7
+        HMAX = 100.D0
+        XEND = 100.D0
+        Y(1) = 3.365D-7
+        Y(2) = 8.261D-3
+        Y(3) = 1.642D-3
+        Y(4) = 9.380D-6
+360     CONTINUE
+        IF (IWT<0) GOTO 370
+        DO I = 1, N
+          Y(I) = Y(I)/W(I)
+        END DO
+370     CONTINUE
+        RETURN
+
+90000   FORMAT (' AN INVALID INTERNAL PROBLEM ID OF ',I4, &
+          ' WAS FOUND BY THE IVALU ROUTINE',' RUN TERMINATED. CHECK THE DATA.' &
+          )
+      END SUBROUTINE IVALU
+
+      SUBROUTINE EVALU(Y)
+
+!     ROUTINE TO PROVIDE THE 'TRUE' SOLUTION OF THE DIFFERENTIAL
+!     EQUATION EVALUATED AT THE ENDPOINT OF THE INTEGRATION.
+
+!     1986 REVISION:  SOME VERY SMALL CONSTANTS HAVE BEEN RECAST IN THE
+!     (NOT SO SMALL CONST)/(1.E38) TO AVOID COMPILE-TIME UNDERFLOW ERROR
+!     IT IS ASSUMED 1E+38 WON'T OVERFLOW.
+!     PARAMETER  (OUTPUT)
+!        Y      - THE TRUE SOLUTION VECTOR EVALUATED AT THE ENDPOINT
+
+!     PARAMETERS (INPUT)
+!        N      - DIMENSION OF THE PROBLEM
+!        W      - VECTOR OF WEIGHTS USED TO SCALE THE PROBLEM
+!                 IF THIS OPTION IS SELECTED
+!        IWT    - FLAG USED TO SIGNAL WHEN THE SCALED PROBLEM IS
+!                 BEING SOLVED
+!        ID     - FLAG USED TO INDICATE WHICH EQUATION IS BEING
+!                 SOLVED
+
+        IMPLICIT NONE
+
+!     .. Parameters ..
+        DOUBLE PRECISION TENE38
+        PARAMETER (TENE38=1.D38)
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(20)
+!     .. Local Scalars ..
+        INTEGER I
+
+!     .. Executable Statements ..
+
+!     GOTO (20, 40, 60, 80, 620, 620, 620, 620, 620, 620, 100, 120, 140,&
+!     160, 180, 620, 620, 620, 620, 620, 200, 220, 240, 260, 280, 620,  &
+!     620, 620, 620, 620, 300, 320, 340, 360, 380, 400, 620, 620, 620,  &
+!     620, 420, 440, 460, 480, 500, 620, 620, 620, 620, 620, 520, 540,  &
+!     560, 580, 600, 620, 620, 620, 620, 620) ID
+        GOTO (10,20,30,40,310,310,310,310,310,310,50,60,70,80,90,310,310,310, &
+          310,310,100,110,120,130,140,310,310,310,310,310,150,160,170,180,190, &
+          200,310,310,310,310,210,220,230,240,250,310,310,310,310,310,260,270, &
+          280,290,300,310,310,310,310,310) ID
+        GOTO 310
+
+!     PROBLEM CLASS A
+
+!     PROBLEM A1
+10      Y(1) = 4.539992969929191D-05
+        Y(2) = 2.061153036149920D-09
+        Y(3) = 2.823006338263857D-18/TENE38
+        Y(4) = 5.235792540515384D-14/TENE38
+        GOTO 310
+
+!     PROBLEM A2
+20      Y(1) = 9.999912552999704D-02
+        Y(2) = 1.999982511586291D-01
+        Y(3) = 2.999975543202422D-01
+        Y(4) = 3.999971057541257D-01
+        Y(5) = 4.999969509963023D-01
+        Y(6) = 5.999971057569546D-01
+        Y(7) = 6.999975543256127D-01
+        Y(8) = 7.999982511659962D-01
+        Y(9) = 8.999991255386128D-01
+        GOTO 310
+
+!     PROBLEM A3
+30      Y(1) = -1.353352661867235D-03
+        Y(2) = 1.368526917891521D-02
+        Y(3) = 1.503725348455117D+00
+        Y(4) = 1.353352832366099D-01
+        GOTO 310
+
+!     PROBLEM A4
+40      Y(1) = 3.678794411714325D-01
+        Y(2) = 1.265870722340194D-14
+        Y(3) = 1.911533219339204D-04/TENE38
+        Y(4) = 2.277441666729596D-17/TENE38
+        Y(5) = 0.0D0
+        Y(6) = 0.0D0
+        Y(7) = 0.0D0
+        Y(8) = 0.0D0
+        Y(9) = 0.0D0
+        Y(10) = 0.0D0
+        GOTO 310
+
+!     PROBLEM CLASS B
+
+!     PROBLEM B1
+50      Y(1) = 1.004166730990124D-09
+        Y(2) = 1.800023280346500D-08
+        Y(3) = 0.0D0
+        Y(4) = -6.042962877027475D-03/TENE38/TENE38
+        GOTO 310
+
+!     PROBLEM B2
+60      Y(1) = 6.181330838820067D-31
+        Y(2) = 8.963657877626303D-31
+        Y(3) = 2.738406773453261D-27
+        Y(4) = 2.061153063164016D-09
+        Y(5) = 4.539992973654118D-05
+        Y(6) = 1.353352832365270D-01
+        GOTO 310
+
+!     PROBLEM B3
+70      Y(1) = -1.076790816984970D-28
+        Y(2) = 5.455007683862160D-28
+        Y(3) = 2.738539964946867D-27
+        Y(4) = 2.061153071123456D-09
+        Y(5) = 4.539992974611305D-05
+        Y(6) = 1.353352832365675D-01
+        GOTO 310
+
+!     PROBLEM B4
+80      Y(1) = 1.331242472678293D-22
+        Y(2) = -2.325916064237926D-22
+        Y(3) = 1.517853928534857D-35
+        Y(4) = 2.061152428936651D-09
+        Y(5) = 4.539992963392291D-05
+        Y(6) = 1.353352832363442D-01
+        GOTO 310
+
+!     PROBLEM B5
+90      Y(1) = -3.100634584292190D-14
+        Y(2) = 3.862788998076547D-14
+        Y(3) = 1.804851385304217D-35
+        Y(4) = 2.061153622425655D-09
+        Y(5) = 4.539992976246673D-05
+        Y(6) = 1.353352832366126D-01
+        GOTO 310
+
+!     PROBLEM CLASS C
+
+!     PROBLEM C1
+100     Y(1) = 4.003223925456179D-04
+        Y(2) = 4.001600000000000D-04
+        Y(3) = 4.000000000000000D-04
+        Y(4) = 2.000000000000000D-02
+        GOTO 310
+
+!     PROBLEM C2
+110     Y(1) = 1.999999997938994D+00
+        Y(2) = 3.999999990839974D-02
+        Y(3) = 4.001599991537078D-02
+        Y(4) = 4.003201271914461D-02
+        GOTO 310
+
+!     PROBLEM C3
+120     Y(1) = 1.999999997939167D+00
+        Y(2) = 3.999999990840744D-01
+        Y(3) = 4.159999990793773D-01
+        Y(4) = 4.333055990159567D-01
+        GOTO 310
+
+!     PROBLEM C4
+130     Y(1) = 1.999999997938846D+00
+        Y(2) = 3.999999990839318D+00
+        Y(3) = 1.999999991637941D+01
+        Y(4) = 4.199999965390368D+02
+        GOTO 310
+
+!     PROBLEM C5
+140     Y(1) = 1.999999997938846D+00
+        Y(2) = 7.999999981678634D+00
+        Y(3) = 1.359999993817714D+02
+        Y(4) = 3.712799965967762D+04
+        GOTO 310
+
+!     PROBLEM CLASS D
+
+!     PROBLEM D1
+150     Y(1) = 2.224222010616901D+01
+        Y(2) = 2.711071334484136D+01
+        Y(3) = 3.999999999999999D+02
+        GOTO 310
+
+!     PROBLEM D2
+160     Y(1) = 7.158270687193941D-01
+        Y(2) = 9.185534764557338D-02
+        Y(3) = 2.841637457458413D+01
+        GOTO 310
+
+!     PROBLEM D3
+170     Y(1) = 6.397604446889910D-01
+        Y(2) = 5.630850708287990D-03
+        Y(3) = 3.602395553110090D-01
+        Y(4) = 3.170647969903515D-01
+        GOTO 310
+
+!     PROBLEM D4
+180     Y(1) = 5.976546980673215D-01
+        Y(2) = 1.402343408546138D+00
+        Y(3) = -1.893386540441913D-06
+        GOTO 310
+
+!     PROBLEM D5
+190     Y(1) = -9.916420698713913D-01
+        Y(2) = 9.833363588544478D-01
+        GOTO 310
+
+!     PROBLEM D6
+200     Y(1) = 8.523995440749948D-01
+        Y(2) = 1.476003981941319D-01
+        Y(3) = 5.773087333950041D-08
+        GOTO 310
+
+!     PROBLEM CLASS E
+
+!     PROBLEM E1
+210     Y(1) = 1.000000000000012D-08
+        Y(2) = -1.625323873316817D-19
+        Y(3) = 2.025953375595861D-17
+        Y(4) = -1.853149807630002D-15
+        GOTO 310
+
+!     PROBLEM E2
+220     Y(1) = -1.158701266031984D+00
+        Y(2) = 4.304698089780476D-01
+        GOTO 310
+
+!     PROBLEM E3
+230     Y(1) = 4.253052197643089D-03
+        Y(2) = 5.317019548450387D-03
+        Y(3) = 2.627647748753926D+01
+        GOTO 310
+
+!     PROBLEM E4
+240     Y(1) = 1.999999977523654D+01
+        Y(2) = -2.000000022476345D+01
+        Y(3) = -2.247634567084293D-07
+        Y(4) = 2.247634567084293D-07
+        GOTO 310
+
+!     PROBLEM E5
+250     Y(1) = 1.618076919919600D-03
+        Y(2) = 1.382236955418478D-10
+        Y(3) = 8.251573436034144D-12
+        Y(4) = 1.299721221058136D-10
+        GOTO 310
+
+!     PROBLEM CLASS F
+
+!     PROBLEM F1
+260     Y(1) = 1.211129474696585D+03
+        Y(2) = 1.271123619113051D-05
+        Y(3) = 1.208637804660361D+03
+        Y(4) = 3.241981171933418D-04
+        GOTO 310
+
+!     PROBLEM F2
+270     Y(1) = 3.912699122292088D-01
+        Y(2) = 1.329964166084866D-03
+        GOTO 310
+
+!     PROBLEM F3
+280     Y(1) = 3.235910070806680D-13
+        Y(2) = 2.360679774997897D-07
+        Y(3) = 7.639319089351045D-14
+        Y(4) = 7.639319461070194D-07
+        Y(5) = 3.236067653908783D-06
+        GOTO 310
+
+!     PROBLEM F4
+290     Y(1) = 4.418303324022590D+00
+        Y(2) = 1.290244712916425D+00
+        Y(3) = 3.019282584050490D+00
+        GOTO 310
+
+!     PROBLEM F5
+300     Y(1) = 1.713564284690712D-07
+        Y(2) = 3.713563071160676D-03
+        Y(3) = 6.189271785267793D-03
+        Y(4) = 9.545143571530929D-06
+310     CONTINUE
+        IF (IWT<0) GOTO 320
+        DO I = 1, N
+          Y(I) = Y(I)/W(I)
+        END DO
+320     CONTINUE
+        RETURN
+      END SUBROUTINE EVALU
+
+      SUBROUTINE FCN(X,Y,YP)
+
+!     ROUTINE TO EVALUATE THE DERIVATIVE F(X,Y) CORRESPONDING TO
+!     THE DIFFERENTIAL EQUATION:
+!                    DY/DX = F(X,Y) .
+!     THE ROUTINE STORES THE VECTOR OF DERIVATIVES IN YP(*). THE
+!     PARTICULAR EQUATION BEING INTEGRATED IS INDICATED BY THE
+!     VALUE OF THE FLAG ID WHICH IS PASSED THROUGH COMMON. THE
+!     DIFFERENTIAL EQUATION IS SCALED BY THE WEIGHT VECTOR W(*)
+!     IF THIS OPTION HAS BEEN SELECTED (IF SO IT IS SIGNALLED
+!     BY THE FLAG IWT).
+
+        IMPLICIT NONE
+
+!     .. Scalar Arguments ..
+        DOUBLE PRECISION X
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(20), YP(20)
+!     .. Local Scalars ..
+        DOUBLE PRECISION F, Q, S, SUM, T, TEMP, XTEMP
+        INTEGER I
+!     .. Local Arrays ..
+        DOUBLE PRECISION BPARM(4), CPARM(4), VECT1(4), VECT2(4), YTEMP(20)
+!     .. Data statements ..
+        DATA BPARM/3.D0, 8.D0, 25.D0, 1.D2/
+        DATA CPARM/1.D-1, 1.D0, 1.D1, 2.D1/
+
+!     .. Executable Statements ..
+
+        NFCN = NFCN + 1
+        IF (IWT<0) GOTO 10
+        DO I = 1, N
+          YTEMP(I) = Y(I)
+          Y(I) = Y(I)*W(I)
+        END DO
+10      CONTINUE
+        GOTO (20,30,40,50,260,260,260,260,260,260,60,70,70,70,70,260,260,260, &
+          260,260,80,90,90,90,90,260,260,260,260,260,100,110,120,130,140,150, &
+          260,260,260,260,160,170,180,190,200,260,260,260,260,260,210,220,230, &
+          240,250) ID
+        GOTO 260
+
+!     PROBLEM CLASS A - LINEAR WITH REAL EIGENVALUES
+
+!     PROBLEM A1
+20      YP(1) = -.5D0*Y(1)
+        YP(2) = -1.D0*Y(2)
+        YP(3) = -1.D2*Y(3)
+        YP(4) = -9.D1*Y(4)
+        GOTO 260
+
+!     PROBLEM A2
+30      YP(1) = -1.8D3*Y(1) + 9.D2*Y(2)
+        DO I = 2, 8
+          YP(I) = Y(I-1) - 2.D0*Y(I) + Y(I+1)
+        END DO
+        YP(9) = 1.D3*Y(8) - 2.D3*Y(9) + 1.D3
+        GOTO 260
+
+!     PROBLEM A3
+40      YP(1) = -1.D4*Y(1) + 1.D2*Y(2) - 1.D1*Y(3) + 1.D0*Y(4)
+        YP(2) = -1.D3*Y(2) + 1.D1*Y(3) - 1.D1*Y(4)
+        YP(3) = -1.D0*Y(3) + 1.D1*Y(4)
+        YP(4) = -1.D-1*Y(4)
+        GOTO 260
+
+!     PROBLEM A4
+50      DO I = 1, 10
+          YP(I) = -REAL(I)**5*Y(I)
+        END DO
+        GOTO 260
+
+!     PROBLEM CLASS B - LINEAR WITH NON-REAL EIGENVALUES
+
+!     PROBLEM B1
+60      YP(1) = -Y(1) + Y(2)
+        YP(2) = -1.D2*Y(1) - Y(2)
+        YP(3) = -1.D2*Y(3) + Y(4)
+        YP(4) = -1.D4*Y(3) - 1.D2*Y(4)
+        GOTO 260
+
+!     PROBLEMS B2, B3, B4, B5
+70      YP(1) = -1.D1*Y(1) + BPARM(IID-1)*Y(2)
+        YP(2) = -BPARM(IID-1)*Y(1) - 1.D1*Y(2)
+        YP(3) = -4.D0*Y(3)
+        YP(4) = -1.D0*Y(4)
+        YP(5) = -.5D0*Y(5)
+        YP(6) = -.1D0*Y(6)
+        GOTO 260
+
+!     PROBLEM CLASS C - NON-LINEAR COUPLING FROM
+!                       STEADY STATE TO TRANSIENT
+
+!     PROBLEM C1
+80      YP(1) = -Y(1) + (Y(2)*Y(2)+Y(3)*Y(3)+Y(4)*Y(4))
+        YP(2) = -1.D1*Y(2) + 1.D1*(Y(3)*Y(3)+Y(4)*Y(4))
+        YP(3) = -4.D1*Y(3) + 4.D1*Y(4)*Y(4)
+        YP(4) = -1.D2*Y(4) + 2.D0
+        GOTO 260
+
+!     PROBLEMS C2, C3, C4, C5
+90      YP(1) = -Y(1) + 2.D0
+        YP(2) = -1.D1*Y(2) + CPARM(IID-1)*Y(1)*Y(1)
+        YP(3) = -4.D1*Y(3) + (Y(1)*Y(1)+Y(2)*Y(2))*CPARM(IID-1)*4.D0
+        YP(4) = (Y(1)*Y(1)+Y(2)*Y(2)+Y(3)*Y(3))*CPARM(IID-1)*1.D1 - 1.D2*Y(4)
+        GOTO 260
+
+!     PROBLEM CLASS D - NON-LINEAR WITH REAL EIGENVALUES
+
+!     PROBLEM D1
+100     YP(1) = .2D0*Y(2) - .2D0*Y(1)
+        YP(2) = 1.D1*Y(1) - (6.D1-.125D0*Y(3))*Y(2) + .125D0*Y(3)
+        YP(3) = 1.D0
+        GOTO 260
+
+!     PROBLEM D2
+110     YP(1) = -.04D0*Y(1) + .01D0*Y(2)*Y(3)
+        YP(2) = 4.D2*Y(1) - 1.D2*Y(2)*Y(3) - 3.D3*Y(2)**2
+        YP(3) = 3.D1*Y(2)**2
+        GOTO 260
+
+!     PROBLEM D3
+120     YP(1) = Y(3) - 1.D2*Y(1)*Y(2)
+        YP(3) = -YP(1)
+        YP(4) = -Y(4) + 1.D4*Y(2)**2
+        YP(2) = YP(1) - YP(4) + Y(4) - 1.D4*Y(2)**2
+        GOTO 260
+
+!     PROBLEM D4
+130     YP(1) = -.013D0*Y(1) - 1.D3*Y(1)*Y(3)
+        YP(2) = -2.5D3*Y(2)*Y(3)
+        YP(3) = YP(1) + YP(2)
+        GOTO 260
+
+!     PROBLEM D5
+140     XTEMP = .01D0 + Y(1) + Y(2)
+        YP(1) = .01D0 - XTEMP*(1.D0+(Y(1)+1.D3)*(Y(1)+1.D0))
+        YP(2) = .01D0 - XTEMP*(1.D0+Y(2)**2)
+        GOTO 260
+
+!     PROBLEM D6
+150     YP(1) = -Y(1) + 1.D8*Y(3)*(1.D0-Y(1))
+        YP(2) = -1.D1*Y(2) + 3.D7*Y(3)*(1.D0-Y(2))
+        YP(3) = -YP(1) - YP(2)
+        GOTO 260
+
+!     PROBLEM CLASS E - NON-LINEAR WITH NON-REAL EIGENVALUES
+
+!     PROBLEM E1
+160     YP(1) = Y(2)
+        YP(2) = Y(3)
+        YP(3) = Y(4)
+        YP(4) = (Y(1)**2-SIN(Y(1))-1.D8)*Y(1) + (Y(2)*Y(3)/(Y(1)**2+1.D0)-4.D6 &
+          )*Y(2) + (1.D0-6.D4)*Y(3) + (1.D1*EXP(-Y(4)**2)-4.D2)*Y(4) + 1.D0
+        GOTO 260
+
+!     PROBLEM E2
+170     YP(1) = Y(2)
+        YP(2) = 5.D0*Y(2) - 5.D0*Y(1)*Y(1)*Y(2) - Y(1)
+        GOTO 260
+
+!     PROBLEM E3
+180     YP(1) = -55.D0*Y(1) - Y(3)*Y(1) + 65.D0*Y(2)
+        YP(2) = .785D-1*Y(1) - .785D-1*Y(2)
+        YP(3) = .1D0*Y(1)
+        GOTO 260
+
+!     PROBLEM E4
+190     SUM = Y(1) + Y(2) + Y(3) + Y(4)
+        DO I = 1, 4
+          VECT2(I) = -Y(I) + .5D0*SUM
+        END DO
+        VECT1(1) = .5D0*(VECT2(1)**2-VECT2(2)**2)
+        VECT1(2) = VECT2(1)*VECT2(2)
+        VECT1(3) = VECT2(3)**2
+        VECT1(4) = VECT2(4)**2
+        TEMP = -1.D1*VECT2(1) - 1.D1*VECT2(2)
+        VECT2(2) = 1.D1*VECT2(1) - 1.D1*VECT2(2)
+        VECT2(1) = TEMP
+        VECT2(3) = 1.D3*VECT2(3)
+        VECT2(4) = 1.D-2*VECT2(4)
+        SUM = 0.D0
+        DO I = 1, 4
+          SUM = SUM + VECT1(I) - VECT2(I)
+        END DO
+        DO I = 1, 4
+          YP(I) = VECT2(I) - VECT1(I) + .5D0*SUM
+        END DO
+        GOTO 260
+
+!     PROBLEM E5
+200     XTEMP = -7.89D-10*Y(1)
+        YP(1) = XTEMP - 1.1D7*Y(1)*Y(3)
+        YP(2) = -XTEMP - 1.13D9*Y(2)*Y(3)
+        YP(4) = 1.1D7*Y(1)*Y(3) - 1.13D3*Y(4)
+        YP(3) = YP(2) - YP(4)
+        GOTO 260
+
+!     PROBLEM CLASS F - CHEMICAL KINETICS EQUATIONS
+
+!     PROBLEM F1
+210     TEMP = 6.D-3*EXP(20.7D0-1.5D4/Y(1))
+        YP(1) = 1.3D0*(Y(3)-Y(1)) + 1.04D4*TEMP*Y(2)
+        YP(2) = 1.88D3*(Y(4)-Y(2)*(1.D0+TEMP))
+        YP(3) = 1752.D0 - 269.D0*Y(3) + 267.D0*Y(1)
+        YP(4) = .1D0 + 320.D0*Y(2) - 321.D0*Y(4)
+        GOTO 260
+
+!     PROBLEM F2
+220     YP(1) = -Y(1) - Y(1)*Y(2) + 294.D0*Y(2)
+        YP(2) = Y(1)*(1.D0-Y(2))/98.D0 - 3.D0*Y(2)
+        GOTO 260
+
+!     PROBLEM F3
+230     YP(1) = -1.0D7*Y(2)*Y(1) + 1.D1*Y(3)
+        YP(2) = -1.0D7*Y(2)*Y(1) - 1.D7*Y(2)*Y(5) + 1.D1*Y(3) + 1.D1*Y(4)
+        YP(3) = 1.0D7*Y(2)*Y(1) - 1.001D4*Y(3) + 1.D-3*Y(4)
+        YP(4) = 1.D4*Y(3) - 1.0001D1*Y(4) + 1.D7*Y(2)*Y(5)
+        YP(5) = 1.D1*Y(4) - 1.D7*Y(2)*Y(5)
+        GOTO 260
+
+!     PROBLEM F4
+240     S = 77.27D0
+        T = 0.161D0
+        Q = 8.375D-6
+        F = 1.D0
+        YP(1) = S*(Y(2)-Y(1)*Y(2)+Y(1)-Q*Y(1)*Y(1))
+        YP(2) = (-Y(2)-Y(1)*Y(2)+F*Y(3))/S
+        YP(3) = T*(Y(1)-Y(3))
+        GOTO 260
+
+!     PROBLEM F5
+250     YP(1) = -3.D11*Y(1)*Y(2) + 1.2D8*Y(4) - 9.D11*Y(1)*Y(3)
+        YP(2) = -3.D11*Y(1)*Y(2) + 2.D7*Y(4)
+        YP(3) = -9.D11*Y(1)*Y(3) + 1.D8*Y(4)
+        YP(4) = 3.D11*Y(1)*Y(2) - 1.2D8*Y(4) + 9.D11*Y(1)*Y(3)
+260     CONTINUE
+        IF (IWT<0) GOTO 270
+        DO I = 1, N
+          YP(I) = YP(I)/W(I)
+          Y(I) = YTEMP(I)
+        END DO
+270     CONTINUE
+        RETURN
+      END SUBROUTINE FCN
+
+      SUBROUTINE PDERV(X,Y)
+
+!     ROUTINE TO EVALUATE THE JACOBIAN MATRIX OF PARTIAL DERIVATIVES
+!     CORRESPONDING TO THE DIFFERENTIAL EQUATION:
+!                   DY/DX = F(X,Y).
+!     THE N**2 ELEMENTS OF THE ARRAY DY(*) ARE ASSIGNED THE VALUE OF
+!     THE JACOBIAN MATRIX WITH ELEMENT I+(J-1)*N BEING ASSIGNED THE
+!     VALUE OF DF(I)/DY(J). THE PARTICULAR EQUATION BEING INTEGRATED
+!     IS INDICATED BY THE VALUE OF THE FLAG ID WHICH IS PASSED THROUGH
+!     COMMON. IF A SCALED DIFFERENTIAL EQUATION IS BEING SOLVED (AS
+!     SIGNALLED IWT) THE ELEMENTS OF THE JACOBIAN ARE SCALED ACCORDING-
+!     LY BY THE WEIGHT VECTOR W(*).
+
+        IMPLICIT NONE
+
+!     .. Scalar Arguments ..
+        DOUBLE PRECISION X
+!     .. Array Arguments ..
+        DOUBLE PRECISION Y(20)
+!     .. Local Scalars ..
+        DOUBLE PRECISION F, Q, S, SUM, T, TEMP, XTEMP1, XTEMP2, XTEMP3
+        INTEGER I, ITMP, J, L
+!     .. Local Arrays ..
+        DOUBLE PRECISION BPARM(4), CPARM(4), VECT2(4), YTEMP(20)
+!     .. Data statements ..
+        DATA BPARM/3.D0, 8.D0, 25.D0, 1.D2/
+        DATA CPARM/1.D-1, 1.D0, 1.D1, 2.D1/
+
+!     .. Executable Statements ..
+
+        NJAC = NJAC + 1
+        IF (IWT<0) GOTO 10
+        DO I = 1, N
+          YTEMP(I) = Y(I)
+          Y(I) = Y(I)*W(I)
+        END DO
+10      CONTINUE
+        GOTO (20,30,40,50,260,260,260,260,260,260,60,70,70,70,70,260,260,260, &
+          260,260,80,90,90,90,90,260,260,260,260,260,100,110,120,130,140,150, &
+          260,260,260,260,160,170,180,190,200,260,260,260,260,260,210,220,230, &
+          240,250) ID
+        GOTO 260
+
+!     PROBLEM CLASS A - LINEAR WITH REAL EIGENVALUES
+
+!     PROBLEM A1
+20      DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(1) = -.5D0
+        DY(6) = -1.D0
+        DY(11) = -1.D2
+        DY(16) = -9.D1
+        GOTO 260
+
+!     PROBLEM A2
+30      DO I = 1, 81
+          DY(I) = 0.D0
+        END DO
+        DO I = 2, 62, 10
+          DY(I) = 1.D0
+          DY(I+9) = -2.D0
+          DY(I+18) = 1.D0
+        END DO
+        DY(1) = -1.8D3
+        DY(10) = 9.D2
+        DY(72) = 1.D3
+        DY(81) = -2.D3
+        GOTO 260
+
+!     PROBLEM A3
+40      DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(1) = -1.D4
+        DY(5) = 1.D2
+        DY(6) = -1.D3
+        DY(9) = -1.D1
+        DY(10) = 1.D1
+        DY(11) = -1.D0
+        DY(13) = 1.D0
+        DY(14) = -1.D1
+        DY(15) = 1.D1
+        DY(16) = -1.D-1
+        GOTO 260
+
+!     PROBLEM A4
+50      DO I = 1, 100
+          DY(I) = 0.D0
+        END DO
+        DO I = 1, 10
+          DY((I-1)*10+I) = -REAL(I)**5
+        END DO
+        GOTO 260
+
+!     PROBLEM CLASS B - LINEAR WITH NON-REAL EIGENVALUES
+
+!     PROBLEM B1
+60      DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(1) = -1.D0
+        DY(2) = -1.D2
+        DY(5) = 1.D0
+        DY(6) = -1.D0
+        DY(11) = -1.D2
+        DY(12) = -1.D4
+        DY(15) = 1.D0
+        DY(16) = -1.D2
+        GOTO 260
+
+!     PROBLEMS B2, B3, B4, B5
+70      DO I = 1, 36
+          DY(I) = 0.D0
+        END DO
+        DY(1) = -1.D1
+        DY(2) = -BPARM(IID-1)
+        DY(7) = BPARM(IID-1)
+        DY(8) = -1.D1
+        DY(15) = -4.D0
+        DY(22) = -1.D0
+        DY(29) = -.5D0
+        DY(36) = -.1D0
+        GOTO 260
+
+!     PROBLEM CLASS C - NON-LINEAR COUPLING FROM
+!                       STEADY STATE TO TRANSIENT
+
+!     PROBLEM C1
+80      DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(1) = -1.D0
+        DY(5) = 2.D0*Y(2)
+        DY(6) = -1.D1
+        DY(9) = 2.D0*Y(3)
+        DY(10) = 2.D1*Y(3)
+        DY(11) = -4.D1
+        DY(13) = 2.D0*Y(4)
+        DY(14) = 2.D1*Y(4)
+        DY(15) = 8.D1*Y(4)
+        DY(16) = -1.D2
+        GOTO 260
+
+!     PROBLEMS C2, C3, C4, C5
+90      DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(1) = -1.D0
+        DY(2) = 2.D0*Y(1)*CPARM(IID-1)
+        DY(3) = 8.D0*Y(1)*CPARM(IID-1)
+        DY(4) = 2.D1*Y(1)*CPARM(IID-1)
+        DY(6) = -1.D1
+        DY(7) = 8.D0*Y(2)*CPARM(IID-1)
+        DY(8) = 2.D1*Y(2)*CPARM(IID-1)
+        DY(11) = -4.D1
+        DY(12) = 2.D1*Y(3)*CPARM(IID-1)
+        DY(16) = -1.D2
+        GOTO 260
+
+!     PROBLEM CLASS D - NON-LINEAR WITH REAL EIGENVALUES
+
+!     PROBLEM D1
+100     DY(1) = -.2D0
+        DY(2) = 1.D1
+        DY(3) = 0.D0
+        DY(4) = .2D0
+        DY(5) = -6.D1 + .125D0*Y(3)
+        DY(6) = 0.D0
+        DY(7) = 0.D0
+        DY(8) = .125D0*Y(2) + .125D0
+        DY(9) = 0.D0
+        GOTO 260
+
+!     PROBLEM D2
+110     DY(1) = -4.D-2
+        DY(2) = 4.D2
+        DY(3) = 0.D0
+        DY(4) = 1.D-2*Y(3)
+        DY(5) = -1.D2*Y(3) - 6.D3*Y(2)
+        DY(6) = 6.D1*Y(2)
+        DY(7) = .1D-1*Y(2)
+        DY(8) = -1.D2*Y(2)
+        DY(9) = 0.D0
+        GOTO 260
+
+!     PROBLEM D3
+120     DY(1) = -1.D2*Y(2)
+        DY(2) = DY(1)
+        DY(3) = -DY(1)
+        DY(4) = 0.D0
+        DY(5) = -1.D2*Y(1)
+        DY(7) = -DY(5)
+        DY(8) = 2.D4*Y(2)
+        DY(6) = DY(5) - DY(8)
+        DY(6) = DY(6) - 2.D4*Y(2)
+        DY(9) = 1.D0
+        DY(10) = 1.D0
+        DY(11) = -1.D0
+        DY(12) = 0.D0
+        DY(13) = 0.D0
+        DY(14) = 2.D0
+        DY(15) = 0.D0
+        DY(16) = -1.D0
+        GOTO 260
+
+!     PROBLEM D4
+130     DY(1) = -.013D0 - 1.D3*Y(3)
+        DY(2) = 0.D0
+        DY(4) = 0.D0
+        DY(5) = -2.5D3*Y(3)
+        DY(7) = -1.D3*Y(1)
+        DY(8) = -2.5D3*Y(2)
+        DO I = 3, 9, 3
+          DY(I) = DY(I-1) + DY(I-2)
+        END DO
+        GOTO 260
+
+!     PROBLEM D5
+140     XTEMP1 = Y(1) + 1.D3
+        XTEMP2 = Y(1) + 1.D0
+        XTEMP3 = .01D0 + Y(1) + Y(2)
+        DY(2) = -(1.D0+Y(2)**2)
+        DY(3) = -(1.D0+XTEMP1*XTEMP2)
+        DY(1) = -(-DY(3)+XTEMP3*(XTEMP1+XTEMP2))
+        DY(4) = -(2.D0*XTEMP3*Y(2)-DY(2))
+        GOTO 260
+
+!     PROBLEM D6
+150     DY(1) = -1.D0 - 1.D8*Y(3)
+        DY(2) = 0.D0
+        DY(4) = 0.D0
+        DY(5) = -1.D1 - 3.D7*Y(3)
+        DY(7) = 1.D8*(1.D0-Y(1))
+        DY(8) = 3.D7*(1.D0-Y(2))
+        DO I = 3, 9, 3
+          DY(I) = -DY(I-2) - DY(I-1)
+        END DO
+        GOTO 260
+
+!     PROBLEM CLASS E - NON-LINEAR WITH NON-REAL EIGENVALUES
+
+!     PROBLEM E1
+160     DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(5) = 1.D0
+        DY(10) = 1.D0
+        DY(15) = 1.D0
+        XTEMP1 = Y(1)
+        XTEMP2 = Y(2)/(XTEMP1**2+1.D0)**2
+        DY(4) = 3.D0*XTEMP1**2 - XTEMP1*COS(XTEMP1) - SIN(XTEMP1) - 1.D8 - &
+          2.D0*XTEMP1*Y(2)*Y(3)*XTEMP2
+        DY(8) = 2.D0*Y(3)*Y(2)/(1.D0+Y(1)**2) - 4.D6
+        DY(12) = Y(2)*Y(2)/(1.D0+Y(1)**2) + 1.D0 - 6.D4
+        DY(16) = 1.D1*EXP(-Y(4)**2)*(1.D0-2.D0*Y(4)**2) - 4.D2
+        GOTO 260
+
+!     PROBLEM E2
+170     DY(1) = 0.D0
+        DY(2) = -1.D1*Y(1)*Y(2) - 1.D0
+        DY(3) = 1.D0
+        DY(4) = 5.D0 - 5.D0*Y(1)*Y(1)
+        GOTO 260
+
+!     PROBLEM E3
+180     DY(1) = -55.D0 - Y(3)
+        DY(2) = .785D-1
+        DY(3) = 0.1D0
+        DY(4) = 65.D0
+        DY(5) = -.785D-1
+        DY(6) = 0.D0
+        DY(7) = -Y(1)
+        DY(8) = 0.D0
+        DY(9) = 0.D0
+        GOTO 260
+
+!     PROBLEM E4
+190     SUM = Y(1) + Y(2) + Y(3) + Y(4)
+        DO I = 1, 4
+          VECT2(I) = -Y(I) + .5D0*SUM
+        END DO
+        DO I = 1, 16
+          DY(I) = 0.D0
+        END DO
+        DY(1) = VECT2(1) + 1.D1
+        DY(2) = VECT2(2) - 1.D1
+        DY(5) = -DY(2)
+        DY(6) = DY(1)
+        DY(11) = 2.D0*VECT2(3) - 1.D3
+        DY(16) = 2.D0*VECT2(4) - 1.D-2
+        DO I = 1, 4
+          SUM = 0.D0
+          DO J = 1, 4
+            L = I + (J-1)*4
+            SUM = SUM + DY(L)
+          END DO
+          DO J = 1, 4
+            L = I + (J-1)*4
+            DY(L) = -DY(L) + .5D0*SUM
+          END DO
+        END DO
+        DO J = 1, 4
+          SUM = 0.D0
+          DO I = 1, 4
+            L = I + (J-1)*4
+            SUM = SUM + DY(L)
+          END DO
+          DO I = 1, 4
+            L = I + (J-1)*4
+            DY(L) = -DY(L) + .5D0*SUM
+          END DO
+        END DO
+        GOTO 260
+
+!     PROBLEM E5
+200     DY(1) = -7.89D-10 - 1.1D7*Y(3)
+        DY(2) = 7.89D-10
+        DY(4) = 1.1D7*Y(3)
+        DY(5) = 0.D0
+        DY(6) = -1.13D9*Y(3)
+        DY(8) = 0.D0
+        DY(9) = -1.1D7*Y(1)
+        DY(10) = -1.13D9*Y(2)
+        DY(12) = -DY(9)
+        DY(13) = 0.D0
+        DY(14) = 0.D0
+        DY(16) = -1.13D3
+        DO I = 3, 15, 4
+          DY(I) = DY(I-1) - DY(I+1)
+        END DO
+        GOTO 260
+
+!     PROBLEM CLASS F - CHEMICAL KINETICS EQUATIONS
+
+!     PROBLEM F1
+210     TEMP = 90.D0*EXP(20.7D0-1.5D4/Y(1))/Y(1)**2
+        DY(1) = -1.3D0 + 1.04D4*TEMP*Y(2)
+        DY(2) = -1.88D3*Y(2)*TEMP
+        DY(3) = 267.D0
+        DY(4) = 0.D0
+        TEMP = 6.D-3*EXP(20.7D0-1.5D4/Y(1))
+        DY(5) = 1.04D4*TEMP
+        DY(6) = -1.88D3*(1.D0+TEMP)
+        DY(7) = 0.D0
+        DY(8) = 320.D0
+        DY(9) = 1.3D0
+        DY(10) = 0.D0
+        DY(11) = -269.D0
+        DY(12) = 0.0D0
+        DY(13) = 0.0D0
+        DY(14) = 1.88D3
+        DY(15) = 0.0D0
+        DY(16) = -321.0D0
+        GOTO 260
+
+!     PROBLEM F2
+220     DY(1) = -1.D0 - Y(2)
+        DY(2) = (1.D0-Y(2))/98.D0
+        DY(3) = -Y(1) + 294.D0
+        DY(4) = -Y(1)/98.D0 - 3.D0
+        GOTO 260
+
+!     PROBLEM F3
+230     DY(1) = -1.D7*Y(2)
+        DY(2) = -1.D7*Y(2)
+        DY(3) = 1.D7*Y(2)
+        DY(4) = 0.0D0
+        DY(5) = 0.0D0
+        DY(6) = -1.D7*Y(1)
+        DY(7) = -1.D7*Y(1) - 1.D7*Y(5)
+        DY(8) = 1.D7*Y(1)
+        DY(9) = 1.D7*Y(5)
+        DY(10) = -1.D7*Y(5)
+        DY(11) = 1.D1
+        DY(12) = 1.D1
+        DY(13) = -1.001D4
+        DY(14) = 1.D4
+        DY(15) = 0.0D0
+        DY(16) = 0.0D0
+        DY(17) = 1.D1
+        DY(18) = 1.D-3
+        DY(19) = -1.0001D1
+        DY(20) = 1.D1
+        DY(21) = 0.0D0
+        DY(22) = -1.D7*Y(2)
+        DY(23) = 0.0D0
+        DY(24) = 1.D7*Y(2)
+        DY(25) = -1.0D7*Y(2)
+        GOTO 260
+
+!     PROBLEM F4
+240     S = 77.27D0
+        T = 0.161D0
+        Q = 8.375D-6
+        F = 1.D0
+        DY(1) = S*(-Y(2)+1.D0-2.D0*Q*Y(1))
+        DY(2) = -Y(2)/S
+        DY(3) = T
+        DY(4) = S*(1.D0-Y(1))
+        DY(5) = (-1.D0-Y(1))/S
+        DY(6) = 0.D0
+        DY(7) = 0.D0
+        DY(8) = F/S
+        DY(9) = -T
+        GOTO 260
+
+!     PROBLEM F5
+250     DY(1) = -3.D11*Y(2) - 9.D11*Y(3)
+        DY(2) = -3.D11*Y(2)
+        DY(3) = -9.D11*Y(3)
+        DY(4) = 3.D11*Y(2) + 9.D11*Y(3)
+        DY(5) = -3.D11*Y(1)
+        DY(6) = -3.D11*Y(1)
+        DY(7) = 0.0D0
+        DY(8) = 3.D11*Y(1)
+        DY(9) = -9.D11*Y(1)
+        DY(10) = 0.0D0
+        DY(11) = -9.D11*Y(1)
+        DY(12) = 9.D11*Y(1)
+        DY(13) = 1.2D8
+        DY(14) = 2.D7
+        DY(15) = 1.D8
+        DY(16) = -1.2D8
+260     CONTINUE
+        IF (IWT<0) GOTO 270
+        DO I = 1, N
+          Y(I) = YTEMP(I)
+          DO J = 1, N
+            ITMP = I + (J-1)*N
+            DY(ITMP) = DY(ITMP)*W(J)/W(I)
+          END DO
+        END DO
+270     CONTINUE
+        RETURN
+      END SUBROUTINE PDERV
+
+    END MODULE STIFFSET
+
+!******************************************************************
+
+    PROGRAM DEMOSTIFF
+
+      USE STIFFSET
+      USE DVODE_F90_M
+
+      IMPLICIT NONE
+      INTEGER ITASK, ISTATE, ISTATS, NEQ, I, CLASS, PROBLEM, MYID, ITEST, ISTR, &
+        IJAC, JTYPE, CONSTANTJ, ITOL, IADIM, IA, JADIM, JA, ROW, COL, ML, MU,   &
+        IJACSP , NUM_S, NUM_J, NUM_D, Total_Solutions, ISCALE, ITIME, COMPS,    &
+        METHOD, WHICH_PROBS, WHICH_TOLS, COUNTS
+      DOUBLE PRECISION RSTATS, T, TOUT, HBEGIN, HBOUND, TBEGIN, TEND, Y, EPS,   &
+        YINIT, YFINAL, RELERR_TOLERANCES, ABSERR_TOLERANCES, AERROR, ERRMAX,    &
+        ERSTATS, LBOUNDS, UBOUNDS, ERSTATS2
+      REAL DVTIME, DVTIME1, DVTIME2, EXECUTION_TIMES 
+      DIMENSION Y(20), RSTATS(22), ISTATS(31), YINIT(20), YFINAL(20), MYID(55)
+      DIMENSION RELERR_TOLERANCES(20), ABSERR_TOLERANCES(20), AERROR(20),       &
+        IA(21), JA(400), ERSTATS(12,55,3), NUM_S(12,55,3), NUM_J(12,55,3),      &
+        NUM_D(12,55,3), EXECUTION_TIMES(12), COMPS(20), LBOUNDS(20),            &
+        UBOUNDS(20), ERSTATS2(2,12,55,6), WHICH_PROBS(55), WHICH_TOLS(12),      &
+        COUNTS(2,12,55,6,3)
+      LOGICAL J_IS_CONSTANT, ANALYTIC_JACOBIAN, ERRORS, SUPPLY_STRUCTURE,       &
+        TOLVEC, USE_JACSP, BOUNDS, USEW, USEHBEGIN
+      INTRINSIC ABS, MAX, MAXVAL, EPSILON
+      TYPE (VODE_OPTS) :: OPTIONS
+      DATA MYID/1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15,  0, 0, 0, 0,  &
+        0, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, 0, 0, 0,  &
+        0, 41, 42, 43, 44, 45, 0, 0, 0, 0, 0, 51, 52, 53, 54, 55/
+
+      OPEN (UNIT=6,FILE='stiffoptions.dat')
+
+!     Initialize the cumulative solutions total.
+      Total_Solutions = 0
+
+!     Use vector tolerances (same solution in either case)?
+      TOLVEC = .FALSE.
+      
+!     Initialize the flag to indicate whether any errors occurred.
+      ERRORS = .FALSE.
+
+!     Execution times per tolerance.
+      EXECUTION_TIMES(1:12) = 0.0E0
+      ERSTATS2(1:2,1:12,1:55,1:6) = 0.0D0
+      WHICH_PROBS(1:55) = 0
+      WHICH_TOLS(1:12) = 0
+      COUNTS(1:2,1:12,1:55,1:6,1:3) = 0
+
+      WRITE(6,90032)
+
+!     Enter the scale equations loop.
+!        1 = the ODEs will be scaled
+!        2 = the ODEs will not be scaled
+      DO ISCALE = 1 , 2
+      USEW = .TRUE.
+      IF (ISCALE == 2) USEW = .FALSE.
+
+!     Enter the numerical Jacobian formation loop.
+!        1 = use Doug's JACSP for Jacobian
+!        2 = use original VODE Jacobian algorithm
+      DO IJACSP = 1, 2
+      USE_JACSP = .TRUE.
+      IF (IJACSP == 2) USE_JACSP = .FALSE. 
+
+!     Initialize the max error array for this value of IJACSP.
+      ERSTATS(1:12,1:15,1:3) = 0.0D0
+
+!     Initialize the stats arrays.
+      NUM_S(1:12,1:15,1:3) = 0
+      NUM_J(1:12,1:15,1:3) = 0
+      NUM_D(1:12,1:15,1:3) = 0
+
+!     Enter the sparsity structure loop.
+!        1 = numerically determined sparse pointer arrays
+!        2 = supplied pointer arrays
+!     Make this a one-trip loop (1 to 1 or 2 to 2) for stats to be meaningful:
+      DO ISTR = 2, 2
+      SUPPLY_STRUCTURE = .FALSE.
+      IF (ISTR == 2) SUPPLY_STRUCTURE = .TRUE.
+
+!     Enter the error tolerance loop.
+!        Error tolerance = 10^(-ITOL)
+      DO ITOL = 5, 12, 1
+
+      WHICH_TOLS(ITOL) = 1
+
+!     Enter the linear algebra type loop.
+!        1 = dense Jacobian
+!        2 = sparse Jacobian
+!        3 = banded Jacobian
+      DO JTYPE = 1, 3
+
+!     Enter the constant Jacobian loop.
+!        1 = Jacobian is not constant
+!        2 = Jacobian is constant for classes 0 and 1
+!     Make this a one-trip loop (1 to 1 or 2 to 2) for stats to be meaningful:
+      DO CONSTANTJ = 1, 1
+
+!     Enter the numerical or analytical Jacobian loop.
+!        1 = numerical Jacobian
+!        2 = analytical Jacobian
+!     Make this a one-trip loop (1 to 1 or 2 to 2) for stats to be meaningful:
+      DO IJAC = 1, 1
+      ANALYTIC_JACOBIAN = .TRUE.
+      IF (IJAC == 1) ANALYTIC_JACOBIAN = .FALSE.
+
+      IF (JTYPE==1 .AND. IJACSP==1) METHOD = 1
+      IF (JTYPE==2 .AND. IJACSP==1) METHOD = 2
+      IF (JTYPE==3 .AND. IJACSP==1) METHOD = 3
+      IF (JTYPE==1 .AND. IJACSP==2) METHOD = 4
+      IF (JTYPE==2 .AND. IJACSP==2) METHOD = 5
+      IF (JTYPE==3 .AND. IJACSP==2) METHOD = 6
+
+!     Enter the problem test loop.
+      DO ITEST = 1, 55
+
+!       JACS supplies the full matrix in the analytic Jacobian case.
+        IF (IJAC == 2 .AND. ISTR == 1) GOTO 20
+        ID = MYID(ITEST)
+        IF (ID == 0) GOTO 20
+        WHICH_PROBS(ITEST) = 1
+        IID = MOD(ID,10)
+        WRITE (6,90010)
+        CLASS = ID/10
+        PROBLEM = ID - 10*CLASS
+        J_IS_CONSTANT = .FALSE.
+        IF ((CLASS==0 .OR. CLASS==1) .AND. CONSTANTJ==2) J_IS_CONSTANT = .TRUE.
+
+!       Output header.
+        IF (CLASS == 0) THEN
+          WRITE (6,90000) PROBLEM
+        ELSE IF (CLASS == 1) THEN
+          WRITE (6,90001) PROBLEM
+        ELSE IF (CLASS == 2) THEN
+          WRITE (6,90002) PROBLEM
+        ELSE IF (CLASS == 3) THEN
+          WRITE (6,90003) PROBLEM
+        ELSE IF (CLASS == 4) THEN
+          WRITE (6,90004) PROBLEM
+        ELSE IF (CLASS == 5) THEN
+          WRITE (6,90005) PROBLEM
+        END IF
+        WRITE(6,*)    ' Results for ITOL = ', ITOL, ' follow.'
+        PRINT *,      ' Results for ITOL = ', ITOL, ' follow.'
+        IF (IJACSP == 1) THEN
+           WRITE(6,*) ' Results for JACSP Jacobian follow.'
+           PRINT *,   ' Results for JACSP Jacobian follow.'
+        ELSE
+           WRITE(6,*) ' Results for VODE Jacobian follow.'
+           PRINT *,   ' Results for VODE Jacobian follow.'
+        END IF
+        IF (ISCALE == 1) THEN
+           WRITE(6,*) ' The ODEs will be scaled.'
+           PRINT *,   ' The ODEs will be scaled.'
+        ELSE
+           WRITE(6,*) ' The ODEs will not be scaled.'
+           PRINT *,   ' The ODEs will not be scaled.'
+        END IF
+        IF (ISTR == 1) THEN
+           WRITE(6,*) ' Results for numerically determined sparse pointers follow.'
+           PRINT *,   ' Results for numerically determined sparse pointers follow.'
+        ELSE
+           WRITE(6,*) ' Results for user supplied sparse pointers follow.'
+           PRINT *,   ' Results for user supplied sparse pointers follow.'
+        END IF
+        IF (JTYPE == 1) THEN
+           WRITE(6,*) ' Results for dense Jacobian option follow.'
+           PRINT *,   ' Results for dense Jacobian option follow.'
+        END IF
+        IF (JTYPE == 2) THEN
+           WRITE(6,*) ' Results for sparse Jacobian option follow.'
+           PRINT *,   ' Results for sparse Jacobian option follow.'
+        END IF
+        IF (JTYPE == 3) THEN
+           WRITE(6,*) ' Results for banded Jacobian option follow.'
+           PRINT *,   ' Results for banded Jacobian option follow.'
+        END IF
+        IF (CONSTANTJ == 1) THEN
+           WRITE(6,*) ' Results for non-constant Jacobian option follow.'
+           PRINT *,   ' Results for non-constant Jacobian option follow.'
+        ELSE
+           WRITE(6,*) ' Results for constant Jacobian option follow.'
+           PRINT *,   ' Results for constant Jacobian option follow.'
+        END IF
+        IF (IJAC == 1) THEN
+           WRITE(6,*) ' Results for numerical Jacobian option follow.'
+           PRINT *,   ' Results for numerical Jacobian option follow.'
+        ELSE
+           WRITE(6,*) ' Results for analytical Jacobian option follow.'
+           PRINT *,   ' Results for analytical Jacobian option follow.'
+        END IF
+
+!       Initialize the problem.
+!       Scale the ODEs?
+!         USEW = .TRUE.
+          IWT = -1
+          IF (USEW) IWT = 1
+!       Get the problem information.
+          CALL IVALU(TBEGIN,TEND,HBEGIN,HBOUND,YINIT)
+!       Use the IVALU starting step size?
+          USEHBEGIN = .TRUE.
+          IF (.NOT. USEHBEGIN) HBEGIN = 0.0D0
+!       Define the number of ODEs.
+          NEQ = N
+!       Use the full matrix for the banded solution.
+          ML = NEQ - 1
+          MU = NEQ - 1
+!       Initial and final integration times.
+          T = TBEGIN
+          TOUT = TEND
+!       Initial solution.
+          Y(1:NEQ) = YINIT(1:NEQ)
+!       Error tolerances.
+          EPS = 1.0D0 / 10.0D0**ITOL
+          RELERR_TOLERANCES(1:NEQ) = EPS
+          ABSERR_TOLERANCES(1:NEQ) = EPS
+          WRITE (6,90007) ID,TBEGIN,TEND,HBEGIN,HBOUND,IWT,N,EPS,Y(1:NEQ)
+          BOUNDS = .FALSE.
+!         Force nonnegativity for the chemical kinetics problems in Class F.
+          IF (ITEST >= 51) THEN
+             BOUNDS = .TRUE.
+             COMPS(1) = 1
+             COMPS(2) = 2
+             COMPS(3) = 3
+             DO I = 1, NEQ
+                COMPS(I) = I
+             END DO
+             LBOUNDS(1:NEQ) = 0.0D0
+             UBOUNDS(1:NEQ) = 1.0D50
+          END IF
+        IF (BOUNDS) WRITE(6,90040)
+!       Initialize the integration flags.
+          ITASK = 1
+          ISTATE = 1
+
+!       Use the full matrix for sparsity structure.
+        IF (JTYPE == 2 .AND. SUPPLY_STRUCTURE) THEN
+           IADIM = NEQ + 1
+           JADIM = NEQ * NEQ
+           IA(1) = 1
+           DO I = 1, NEQ
+             IA(I+1) = IA(I) + NEQ
+           END DO
+           I = 0
+           DO COL = 1, NEQ
+             I = NEQ*(COL-1)
+             DO ROW = 1, NEQ
+               I = I + 1
+               JA(I) = ROW
+             END DO
+           END DO
+        END IF
+
+        CALL CPU_TIME(DVTIME1)
+
+!       Set the integration options.
+        IF (JTYPE == 1) THEN
+!          Dense solution ...
+           IF (TOLVEC) THEN
+!             Supply vectors of tolerances.
+              IF (BOUNDS) THEN
+                 OPTIONS = SET_OPTS(DENSE_J=.TRUE.,                          &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ),     &
+                                 ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),     &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 CONSTRAINED=COMPS(1:NEQ),                   &
+                                 CLOWER=LBOUNDS(1:NEQ),CUPPER=UBOUNDS(1:NEQ))
+              ELSE
+                 OPTIONS = SET_OPTS(DENSE_J=.TRUE.,                          &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ),     &
+                                 ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),     &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP)
+              END IF
+           ELSE
+!             Supply scalar tolerances.
+              IF (BOUNDS) THEN
+                 OPTIONS = SET_OPTS(DENSE_J=.TRUE.,                          &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR=EPS,ABSERR=EPS,                      &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 CONSTRAINED=COMPS(1:NEQ),                   &
+                                 CLOWER=LBOUNDS(1:NEQ),CUPPER=UBOUNDS(1:NEQ))
+              ELSE
+                 OPTIONS = SET_OPTS(DENSE_J=.TRUE.,                          &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR=EPS,ABSERR=EPS,                      &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP)
+              END IF
+           END IF
+        END IF
+
+        IF (JTYPE == 2) THEN
+!          Sparse solution ...
+           IF (TOLVEC) THEN
+!             Supply vectors of tolerances.
+              IF (BOUNDS) THEN
+                 OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,                         &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ),     &
+                                 ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),     &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE,    &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 MA28_RPS=.TRUE.,CONSTRAINED=COMPS(1:NEQ),   &
+                                 CLOWER=LBOUNDS(1:NEQ),CUPPER=UBOUNDS(1:NEQ))
+              ELSE
+                 OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,                         &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ),     &
+                                 ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),     &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE,    &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 MA28_RPS=.TRUE.)
+              END IF
+           ELSE
+!             Supply scalar tolerances.
+              IF (BOUNDS) THEN
+                 OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,                         &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR=EPS,ABSERR=EPS,                      &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE,    &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 MA28_RPS=.TRUE.,CONSTRAINED=COMPS(1:NEQ),   &
+                                 CLOWER=LBOUNDS(1:NEQ),CUPPER=UBOUNDS(1:NEQ))
+              ELSE
+                 OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,                         &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR=EPS,ABSERR=EPS,                      &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE,    &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 MA28_RPS=.TRUE.)
+              END IF
+           END IF
+        END IF
+
+        IF (JTYPE == 3) THEN
+!          Banded solution ...
+           IF (TOLVEC) THEN
+!             Supply vectors of tolerances.
+              IF (BOUNDS) THEN
+                 OPTIONS = SET_OPTS(BANDED_J=.TRUE.,                         &
+                                 LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU,      &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ),     &
+                                 ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),     &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 CONSTRAINED=COMPS(1:NEQ),                   &
+                                 CLOWER=LBOUNDS(1:NEQ),CUPPER=UBOUNDS(1:NEQ))
+              ELSE
+                 OPTIONS = SET_OPTS(BANDED_J=.TRUE.,                         &
+                                 LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU,      &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR_VECTOR=RELERR_TOLERANCES(1:NEQ),     &
+                                 ABSERR_VECTOR=ABSERR_TOLERANCES(1:NEQ),     &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP)
+              END IF
+           ELSE
+!             Supply scalar tolerances.
+              IF (BOUNDS) THEN
+                 OPTIONS = SET_OPTS(BANDED_J=.TRUE.,                         &
+                                 LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU,      &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR=EPS,ABSERR=EPS,                      &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP,                &
+                                 CONSTRAINED=COMPS(1:NEQ),                   &
+                                 CLOWER=LBOUNDS(1:NEQ),CUPPER=UBOUNDS(1:NEQ))
+              ELSE
+                 OPTIONS = SET_OPTS(BANDED_J=.TRUE.,                         &
+                                 LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU,      &
+                                 USER_SUPPLIED_JACOBIAN=ANALYTIC_JACOBIAN,   &
+                                 RELERR=EPS,ABSERR=EPS,                      &
+                                 MXSTEP=100000,H0=HBEGIN,HMAX=HBOUND,        &
+                                 CONSTANT_JACOBIAN=J_IS_CONSTANT,            &
+                                 JACOBIAN_BY_JACSP=USE_JACSP)
+              END IF
+           END IF
+        END IF
+
+!       Supply the sparse structure arrays directly.
+        IF (JTYPE==2 .AND. SUPPLY_STRUCTURE) THEN
+           CALL USERSETS_IAJA(IA(1:IADIM),IADIM,JA(1:JADIM),JADIM)
+        END IF
+
+!       Perform the integration.
+        IF (JTYPE == 1) THEN
+           CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JACD)
+        END IF
+        IF (JTYPE == 2) THEN
+           CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JACS)
+        END IF
+        IF (JTYPE == 3) THEN
+           CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JACB)
+        END IF
+
+        CALL CPU_TIME(DVTIME2)
+        DVTIME = DVTIME2 - DVTIME1
+        EXECUTION_TIMES(ITOL) = EXECUTION_TIMES(ITOL) + DVTIME
+
+        Total_Solutions = Total_Solutions + 1
+
+!       Check if an error occurred.
+        IF (ISTATE < 0) THEN
+          WRITE (6,90006) ISTATE
+          ERRORS = .TRUE.
+        END IF
+
+!       Gather the integration statistics.
+        CALL GET_STATS(RSTATS,ISTATS)
+        WRITE (6,90009) ISTATS(11), ISTATS(12), ISTATS(13)
+        NUM_S(ITOL,ITEST,JTYPE) = ISTATS(11)
+        NUM_D(ITOL,ITEST,JTYPE) = ISTATS(12)
+        NUM_J(ITOL,ITEST,JTYPE) = ISTATS(13)
+
+!       Calculate the error in the final solution.
+        CALL EVALU(YFINAL)
+        DO I = 1, NEQ
+          AERROR(I) = ABS(Y(I)-YFINAL(I))
+        END DO
+        ERRMAX = MAXVAL(AERROR(1:NEQ))
+        ERSTATS(ITOL,ITEST,JTYPE) = ERRMAX
+        ERSTATS2(ISCALE,ITOL,ITEST,METHOD) = ERRMAX
+        COUNTS(ISCALE,ITOL,ITEST,METHOD,1) = ISTATS(11)
+        COUNTS(ISCALE,ITOL,ITEST,METHOD,2) = ISTATS(12)
+        COUNTS(ISCALE,ITOL,ITEST,METHOD,3) = ISTATS(13)
+        WRITE (6,90008) (I,Y(I),YFINAL(I),AERROR(I),I=1,NEQ)
+
+!       Release the work arrays and determine how much storage was required.
+        CALL RELEASE_ARRAYS
+
+20    CONTINUE
+      END DO ! End of ITEST Loop
+      END DO ! End of IJAC Loop
+      END DO ! End of JTYPE Loop
+      END DO ! End of CONSTANTJ Loop
+      END DO ! End of ITOL Loop
+      END DO ! End of ISTR Loop
+
+!     Print the maximum errors for this value of IJACSP.
+      DO ITOL = 5, 12, 1
+         WRITE(6,90016) ITOL
+         WRITE(6,90020)
+         IF (IJACSP == 1) WRITE(6,90023)
+         IF (IJACSP == 2) WRITE(6,90022)
+         IF (ISCALE == 1) WRITE(6,90030)
+         IF (ISCALE == 2) WRITE(6,90031)
+         WRITE(6,90021)
+         WRITE(6,90015)
+         DO ITEST = 1, 55
+            IF (WHICH_PROBS(ITEST) == 1) THEN
+               ID = MYID(ITEST)
+               IF (ID /= 0) WRITE(6,90014) ITOL, ITEST,         &
+                            (ERSTATS(ITOL,ITEST,JTYPE),JTYPE=1,3)
+            END IF
+         END DO
+      END DO 
+
+!     Print the integration stats for this value of IJACSP.
+      DO ITOL = 5, 12, 1
+         WRITE(6,90016) ITOL
+         WRITE(6,90024)
+         IF (IJACSP == 1) WRITE(6,90023)
+         IF (IJACSP == 2) WRITE(6,90022)
+         IF (ISCALE == 1) WRITE(6,90030)
+         IF (ISCALE == 2) WRITE(6,90031)
+         WRITE(6,90029)
+         DO ITEST = 1, 55
+            IF (WHICH_PROBS(ITEST) == 1) THEN
+               ID = MYID(ITEST)
+               IF (ID /= 0) THEN
+                  WRITE(6,90026) ITEST, (NUM_S(ITOL,ITEST,JTYPE),JTYPE=1,3)
+                  WRITE(6,90027)        (NUM_J(ITOL,ITEST,JTYPE),JTYPE=1,3)
+                  WRITE(6,90028)        (NUM_D(ITOL,ITEST,JTYPE),JTYPE=1,3)
+                  WRITE(6,*) ' '
+               END IF
+            END IF
+         END DO
+      END DO 
+
+      END DO ! End of IJACSP Loop
+      END DO ! End of ISCALE Loop
+
+      WRITE(6,90045)
+
+      DO ITEST = 1, 55
+         IF (WHICH_PROBS(ITEST) == 1) THEN
+            ID = MYID(ITEST)
+            IID = MOD(ID,10)
+            WRITE (6,90010)
+            CLASS = ID/10
+            PROBLEM = ID - 10*CLASS
+            IF (CLASS == 0) THEN
+              WRITE (6,90000) PROBLEM
+            ELSE IF (CLASS == 1) THEN
+              WRITE (6,90001) PROBLEM
+            ELSE IF (CLASS == 2) THEN
+              WRITE (6,90002) PROBLEM
+            ELSE IF (CLASS == 3) THEN
+              WRITE (6,90003) PROBLEM
+            ELSE IF (CLASS == 4) THEN
+              WRITE (6,90004) PROBLEM
+            ELSE IF (CLASS == 5) THEN
+              WRITE (6,90005) PROBLEM
+            END IF
+            DO ITOL = 5, 12, 1
+               IF (WHICH_TOLS(ITOL) == 1) THEN
+                  DO ISCALE = 1,  2
+                     IF (ISCALE == 1) WRITE(6,90035) ITEST, ITOL
+                     IF (ISCALE == 2) WRITE(6,90036) ITEST, ITOL
+                     WRITE(6,90037) ERSTATS2(ISCALE,ITOL,ITEST,1), &
+                                    ERSTATS2(ISCALE,ITOL,ITEST,4)
+                     WRITE(6,90038) ERSTATS2(ISCALE,ITOL,ITEST,2), &
+                                    ERSTATS2(ISCALE,ITOL,ITEST,5)
+                     WRITE(6,90039) ERSTATS2(ISCALE,ITOL,ITEST,3), &
+                                    ERSTATS2(ISCALE,ITOL,ITEST,6)
+                     WRITE(6,90044)
+                     WRITE(6,90041) COUNTS(ISCALE,ITOL,ITEST,1,1), &
+                                    COUNTS(ISCALE,ITOL,ITEST,4,1), &
+                                    COUNTS(ISCALE,ITOL,ITEST,1,2), &
+                                    COUNTS(ISCALE,ITOL,ITEST,4,2), &
+                                    COUNTS(ISCALE,ITOL,ITEST,1,3), &
+                                    COUNTS(ISCALE,ITOL,ITEST,4,3)
+                     WRITE(6,90042) COUNTS(ISCALE,ITOL,ITEST,2,1), &
+                                    COUNTS(ISCALE,ITOL,ITEST,5,1), &
+                                    COUNTS(ISCALE,ITOL,ITEST,2,2), &
+                                    COUNTS(ISCALE,ITOL,ITEST,5,2), &
+                                    COUNTS(ISCALE,ITOL,ITEST,2,3), &
+                                    COUNTS(ISCALE,ITOL,ITEST,5,3)
+                     WRITE(6,90043) COUNTS(ISCALE,ITOL,ITEST,3,1), &
+                                    COUNTS(ISCALE,ITOL,ITEST,6,1), &
+                                    COUNTS(ISCALE,ITOL,ITEST,3,2), &
+                                    COUNTS(ISCALE,ITOL,ITEST,6,2), &
+                                    COUNTS(ISCALE,ITOL,ITEST,3,3), &
+                                    COUNTS(ISCALE,ITOL,ITEST,6,3)
+                     WRITE (6,90010)
+                  END DO
+               END IF
+            END DO
+         END IF
+      END DO
+
+!     Total number of solutions performed.
+      WRITE(6,90025) Total_Solutions
+      WRITE (6,90010)
+
+!     Execution Times.
+      WRITE(6,90033)
+      DO ITOL = 5, 12, 1
+         ITIME = INT(EXECUTION_TIMES(ITOL))
+         WRITE(6,90034) ITOL, ITIME
+      END DO
+      WRITE (6,90010)
+
+!     Where to search in output file.
+      WRITE(6,90032)
+
+!     Indicate whether any DVODE_F90 made any error returns.
+      IF (ERRORS) THEN
+         WRITE(6,90011)
+      ELSE
+         WRITE(6,90012)
+      END IF
+
+!     Format statements follow.
+90000 FORMAT (' Class/Problem = A',I1)
+90001 FORMAT (' Class/Problem = B',I1)
+90002 FORMAT (' Class/Problem = C',I1)
+90003 FORMAT (' Class/Problem = D',I1)
+90004 FORMAT (' Class/Problem = E',I1)
+90005 FORMAT (' Class/Problem = F',I1)
+90006 FORMAT (' An error occurred in VODE_F90. ISTATE = ',I3)
+90007 FORMAT (' Problem ID       = ',I3,/,   ' Initial time     = ',D15.5,/, &
+              ' Final time       = ',D15.5,/,' Initial stepsize = ',D15.5,/, &
+              ' Maximum stepsize = ',D15.5,/,' IWT flag         = ',I3,/,    &
+              ' Number of ODEs   = ',I3,/,   ' Error tolerance  = ',D15.5,/, &
+              ' Initial solution = ',/,(D15.5))
+90008 FORMAT (' Computed and reference solutions and absolute' &
+              ' errors follow:',/,(I3,3D15.5))
+90009 FORMAT (' Steps = ',I10,' f-s = ',I10,' J-s = ',I10)
+90010 FORMAT (' ____________________________________________________________')
+90011 FORMAT (/,' Errors occurred. (Search on ISTATE.)')
+90012 FORMAT (/,' No errors occurred.')
+90013 FORMAT (' For ITOL = ', I3,' Dense  max. observed error = ',D15.5)
+90014 FORMAT (I5,6X,I5,3D15.5)
+90015 FORMAT (/,'Tolerance',3X,'Problem',4X,'Dense',10X,'Sparse',9X,'Banded')
+90016 FORMAT (//,20X,' Results for ITOL = ',I3)
+90017 FORMAT (' For ITOL = ', I3,' Sparse max. observed error = ',D15.5)
+90018 FORMAT (' For ITOL = ', I3,' Banded max. observed error = ',D15.5)
+90019 FORMAT (' The dense and banded results are not identical.')
+90020 FORMAT (/,' Maximum Errors for All Problems Follow:')
+90021 FORMAT (/,10X,' Maximum Errors for Individual Problems Follow:')
+90022 FORMAT (' The original VODE Jacobian was used.')
+90023 FORMAT (' The JACSP Jacobian was used.')
+90024 FORMAT (/,' Integration Statistics Follow:')
+90025 FORMAT (/,' Total number of solutions performed = ',I5)
+90026 FORMAT (I5,'   Steps: ',3I10)
+90027 FORMAT (5X,'   Jacs:  ',3I10)
+90028 FORMAT (5X,'   Ders:  ',3I10)
+90029 FORMAT (/,' Problem',12X,'Dense',4X,'Sparse',4X,'Banded')
+90030 FORMAT (' The ODEs were scaled.')
+90031 FORMAT (' The ODEs were not scaled.')
+90032 FORMAT (//,' To locate the summary results, search on the phrase',/ &
+                 ' Summary Statistics Follow in the output file',         &
+                 ' (stiffoptions.dat).',//)
+90033 FORMAT (/,' Tolerance', 10X, 'Total Execution Time')
+90034 FORMAT ((4X,I5,10X,I10))
+90035 FORMAT (/,' Problem No. = ',I3,/,' ITOL = ',I3,/,' Scaled ODEs', &
+              13X,'Absolute Errors')
+90036 FORMAT (' Problem No. = ',I3,/,' ITOL = ',I3,/,' Unscaled ODEs', &
+              18X,'Absolute Errors')
+90037 FORMAT (' Dense : JACSP - VODE: ',2D15.5)
+90038 FORMAT (' Sparse: JACSP - VODE: ',2D15.5)
+90039 FORMAT (' Banded: JACSP - VODE: ',2D15.5)
+90040 FORMAT (' Nonnegativity will be enforced for this problem.')
+90041 FORMAT (' Dense  SDJ: ',6I7)
+90042 FORMAT (' Sparse SDJ: ',6I7)
+90043 FORMAT (' Banded SDJ: ',6I7)
+90044 FORMAT (19X,'J',6X,'V',6X,'J',6X,'V',6X,'J',6X,'V')
+90045 FORMAT (///,20X,'Summary Statistics Follow')
+
+      STOP
+    END PROGRAM DEMOSTIFF
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffset.mod
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffset.mod	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/stiffset.mod	(revision 3477)
@@ -0,0 +1,149 @@
+V24 stiffset
+16 stiffoptions.f90 S582 0
+05/10/2011  17:18:32
+enduse
+D 33 21 9 1 3 12 0 0 0 0 0
+ 0 12 3 3 12 12
+D 36 21 9 1 3 13 0 0 0 0 0
+ 0 13 3 3 13 13
+D 39 21 9 1 3 15 0 0 1 0 0
+ 0 14 3 3 15 15
+D 42 21 9 1 3 15 0 0 1 0 0
+ 0 14 3 3 15 15
+D 45 21 9 1 3 17 0 0 1 0 0
+ 0 16 3 3 17 17
+D 48 21 9 2 18 21 0 0 1 0 0
+ 0 19 3 3 20 20
+ 0 16 20 3 17 17
+D 51 21 9 1 3 23 0 0 1 0 0
+ 0 22 3 3 23 23
+D 54 21 9 2 24 27 0 0 1 0 0
+ 0 25 3 3 26 26
+ 0 22 26 3 23 23
+D 57 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 28
+D 60 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 29
+D 63 21 6 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 30
+D 66 21 9 1 3 0 0 0 0 1 0
+ 0 0 3 3 0 31
+D 69 21 9 1 3 12 0 0 0 0 0
+ 0 12 3 3 12 12
+D 72 21 9 1 3 12 0 0 0 0 0
+ 0 12 3 3 12 12
+D 75 21 9 1 3 12 0 0 0 0 0
+ 0 12 3 3 12 12
+D 78 21 9 1 3 12 0 0 0 0 0
+ 0 12 3 3 12 12
+D 81 21 9 1 3 12 0 0 0 0 0
+ 0 12 3 3 12 12
+S 582 24 0 0 0 8 1 0 4668 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 0 0 0 0 0 0 stiffset
+S 583 6 4 0 0 6 584 582 4677 4 0 0 0 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iwt
+S 584 6 4 0 0 6 585 582 4681 4 0 0 4 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 n
+S 585 6 4 0 0 6 586 582 4683 4 0 0 8 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 id
+S 586 6 4 0 0 6 587 582 4686 4 0 0 12 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 iid
+S 587 6 4 0 0 6 588 582 4690 4 0 0 16 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nfcn
+S 588 6 4 0 0 6 589 582 4695 4 0 0 20 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 njac
+S 589 6 4 0 0 6 1 582 4700 4 0 0 24 0 0 0 0 0 0 594 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 nlud
+S 590 7 4 0 4 33 591 582 4705 800004 100 0 0 0 0 0 0 0 0 595 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 w
+S 591 7 4 0 4 36 1 582 4707 800004 100 0 160 0 0 0 0 0 0 595 0 0 0 0 0 0 0 0 0 0 582 0 0 0 0 dy
+S 592 3 0 0 0 6 1 1 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 593 3 0 0 0 6 0 1 0 0 0 0 0 0 0 0 400 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6
+S 594 11 0 0 0 8 1 582 4710 40800000 801000 0 28 0 0 583 589 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 stiffset$0
+S 595 11 0 0 1 8 594 582 4721 40800000 801000 0 3360 0 0 590 591 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 stiffset$2
+S 596 23 5 0 0 0 601 582 4732 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 derivs
+S 597 6 3 0 0 6 1 596 4739 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 598 1 3 0 0 9 1 596 4743 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 599 7 3 0 0 39 1 596 4745 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 600 7 3 0 0 42 1 596 4747 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ydot
+S 601 14 5 0 0 0 1 596 4732 200 400000 0 0 0 2 4 0 0 0 0 0 0 0 0 0 0 0 0 48 0 582 0 0 0 0 derivs
+F 601 4 597 598 599 600
+S 602 6 1 0 0 6 1 596 4752 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_14
+S 603 23 5 0 0 0 611 582 4759 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jacd
+S 604 6 3 0 0 6 1 603 4739 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 605 1 3 0 0 9 1 603 4743 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 606 7 3 0 0 45 1 603 4745 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 607 1 3 0 0 6 1 603 4764 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 608 1 3 0 0 6 1 603 4767 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 609 7 3 0 0 48 1 603 4770 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pd
+S 610 6 3 0 0 6 1 603 4773 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrowpd
+S 611 14 5 0 0 0 1 603 4759 200 400000 0 0 0 7 7 0 0 0 0 0 0 0 0 0 0 0 0 58 0 582 0 0 0 0 jacd
+F 611 7 604 605 606 607 608 609 610
+S 612 6 1 0 0 6 1 603 4780 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_16
+S 613 6 1 0 0 6 1 603 4787 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_18
+S 614 6 1 0 0 6 1 603 4794 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_20
+S 615 6 1 0 0 6 1 603 4801 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_22
+S 616 23 5 0 0 0 624 582 4808 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jacb
+S 617 6 3 0 0 6 1 616 4739 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 618 1 3 0 0 9 1 616 4743 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 619 7 3 0 0 51 1 616 4745 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 620 1 3 0 0 6 1 616 4764 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ml
+S 621 1 3 0 0 6 1 616 4767 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 mu
+S 622 7 3 0 0 54 1 616 4770 800204 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pd
+S 623 6 3 0 0 6 1 616 4773 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nrowpd
+S 624 14 5 0 0 0 1 616 4808 200 400000 0 0 0 15 7 0 0 0 0 0 0 0 0 0 0 0 0 73 0 582 0 0 0 0 jacb
+F 624 7 617 618 619 620 621 622 623
+S 625 6 1 0 0 6 1 616 4801 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_22
+S 626 6 1 0 0 6 1 616 4813 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_24
+S 627 6 1 0 0 6 1 616 4820 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_26
+S 628 6 1 0 0 6 1 616 4827 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_e_28
+S 629 23 5 0 0 0 637 582 4834 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 jacs
+S 630 1 3 0 0 6 1 629 4739 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 neq
+S 631 1 3 0 0 9 1 629 4743 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 t
+S 632 7 3 0 0 57 1 629 4745 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 633 7 3 0 0 60 1 629 4839 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ia
+S 634 7 3 0 0 63 1 629 4842 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ja
+S 635 1 3 0 0 6 1 629 4845 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 nz
+S 636 7 3 0 0 66 1 629 4848 800104 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 p
+S 637 14 5 0 0 0 1 629 4834 100 400000 0 0 0 23 7 0 0 0 0 0 0 0 0 0 0 0 0 88 0 582 0 0 0 0 jacs
+F 637 7 630 631 632 633 634 635 636
+S 638 6 1 0 0 6 1 629 4850 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_0
+S 639 6 1 0 0 6 1 629 4856 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_1
+S 640 6 1 0 0 6 1 629 4862 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_2
+S 641 6 1 0 0 6 1 629 4868 40800006 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 z_b_3
+S 642 23 5 0 0 0 648 582 4874 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ivalu
+S 643 1 3 0 0 9 1 642 4880 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 xstart
+S 644 1 3 0 0 9 1 642 4887 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 xend
+S 645 1 3 0 0 9 1 642 4892 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hbegin
+S 646 1 3 0 0 9 1 642 4899 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 hmax
+S 647 7 3 0 0 69 1 642 4745 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 648 14 5 0 0 0 1 642 4874 0 400000 0 0 0 31 5 0 0 0 0 0 0 0 0 0 0 0 0 118 0 582 0 0 0 0 ivalu
+F 648 5 643 644 645 646 647
+S 649 23 5 0 0 0 651 582 4904 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 evalu
+S 650 7 3 0 0 72 1 649 4745 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 651 14 5 0 0 0 1 649 4904 0 400000 0 0 0 37 1 0 0 0 0 0 0 0 0 0 0 0 0 609 0 582 0 0 0 0 evalu
+F 651 1 650
+S 652 23 5 0 0 0 656 582 4910 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 fcn
+S 653 1 3 0 0 9 1 652 4914 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 654 7 3 0 0 75 1 652 4745 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 655 7 3 0 0 78 1 652 4916 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 yp
+S 656 14 5 0 0 0 1 652 4910 0 400000 0 0 0 39 3 0 0 0 0 0 0 0 0 0 0 0 0 889 0 582 0 0 0 0 fcn
+F 656 3 653 654 655
+S 657 23 5 0 0 0 660 582 4919 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 pderv
+S 658 1 3 0 0 9 1 657 4914 4 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 x
+S 659 7 3 0 0 81 1 657 4745 800004 3000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 y
+S 660 14 5 0 0 0 1 657 4919 0 400000 0 0 0 43 2 0 0 0 0 0 0 0 0 0 0 0 0 1135 0 582 0 0 0 0 pderv
+F 660 2 658 659
+A 12 2 0 0 0 6 592 0 0 0 12 0 0 0 0 0 0 0 0 0
+A 13 2 0 0 0 6 593 0 0 0 13 0 0 0 0 0 0 0 0 0
+A 14 1 0 0 0 6 597 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 15 1 0 0 0 6 602 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 16 1 0 0 0 6 604 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 17 1 0 0 0 6 612 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 18 1 0 0 0 6 615 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 19 1 0 0 0 6 610 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 20 1 0 0 0 6 613 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 21 1 0 0 0 6 614 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 22 1 0 0 0 6 617 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 23 1 0 0 0 6 625 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 24 1 0 0 0 6 628 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 25 1 0 0 0 6 623 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 26 1 0 0 0 6 626 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 27 1 0 0 0 6 627 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 28 1 0 0 0 6 638 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 29 1 0 0 0 6 639 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 30 1 0 0 0 6 640 0 0 0 0 0 0 0 0 0 0 0 0 0
+A 31 1 0 0 0 6 641 0 0 0 0 0 0 0 0 0 0 0 0 0
+Z
+Z
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/test.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/test.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/DVODE/test.f90	(revision 3477)
@@ -0,0 +1,3 @@
+program vig
+print*,'cici'
+end
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_lsodes.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_lsodes.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_lsodes.def	(revision 3477)
@@ -0,0 +1,19 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN FULL
+#DOUBLE ON 
+#INTFILE atm_lsodes
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=1.D-12
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_lsodes.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_lsodes.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_lsodes.f	(revision 3477)
@@ -0,0 +1,5474 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      PARAMETER ( LRW=20+3*1500+16*NVAR )
+      PARAMETER ( LIW=60 )
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      KPP_REAL RWORK(LRW)
+      INTEGER IWORK(LIW)
+
+      STEPCUT = 0.
+      MAXORD = 5
+      IBEGIN = 1
+      ITOL=4
+
+C ---- NORMAL COMPUTATION ---
+      ITASK=1
+      ISTATE=1
+C ---- USE OPTIONAL INPUT ---
+      IOPT=1
+
+      IWORK(5) = MAXORD    ! MAX ORD
+      IWORK(6) = 20000
+      IWORK(7) = 0
+      RWORK(6) = STEPMAX   ! STEP MAX
+      RWORK(7) = STEPMIN   ! STEP MIN
+      RWORK(5) = STEPMIN   ! INITIAL STEP
+
+C ----- SIGNAL FOR STIFF CASE, FULL JACOBIAN, INTERN (22) or SUPPLIED (21)
+      MF = 121
+
+      CALL atmlsodes (FUNC_CHEM, NVAR, VAR, TIN, TOUT, ITOL, RTOL, ATOL,
+     !            ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW,
+     !            JAC_CHEM, MF)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'LSODES: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+      subroutine atmlsodes (f, neq, y, t, tout, itol, RelTol, AbsTol,
+     1       itask, istate, iopt, rwork, lrw, iwork, liw, jac, mf)
+      external f, jac
+      integer neq, itol, itask, istate, iopt, lrw, iwork, liw, mf
+      KPP_REAL y, t, tout, RelTol, AbsTol, rwork
+      dimension neq(1), y(1), RelTol(1), AbsTol(1),
+     1          rwork(lrw), iwork(liw)
+c-----------------------------------------------------------------------
+c this is the march 30, 1987 version of
+c lsodes.. livermore solver for ordinary differential equations
+c          with general sparse jacobian matrices.
+c this version is in KPP_REAL.
+c
+c lsodes solves the initial value problem for stiff or nonstiff
+c systems of first order ode-s,
+c     dy/dt = f(t,y) ,  or, in component form,
+c     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(neq)) (i = 1,...,neq).
+c lsodes is a variant of the lsode package, and is intended for
+c problems in which the jacobian matrix df/dy has an arbitrary
+c sparse structure (when the problem is stiff).
+c
+c authors..      alan c. hindmarsh,
+c                computing and mathematics research division, l-316
+c                lawrence livermore national laboratory
+c                livermore, ca 94550.
+c
+c and            andrew h. sherman
+c                j. s. nolen and associates
+c                houston, tx 77084
+c-----------------------------------------------------------------------
+c references..
+c 1.  alan c. hindmarsh,  odepack, a systematized collection of ode
+c     solvers, in scientific computing, r. s. stepleman et al. (eds.),
+c     north-holland, amsterdam, 1983, pp. 55-64.
+c
+c 2.  s. c. eisenstat, m. c. gursky, m. h. schultz, and a. h. sherman,
+c     yale sparse matrix package.. i. the symmetric codes,
+c     int. j. num. meth. eng., 18 (1982), pp. 1145-1151.
+c
+c 3.  s. c. eisenstat, m. c. gursky, m. h. schultz, and a. h. sherman,
+c     yale sparse matrix package.. ii. the nonsymmetric codes,
+c     research report no. 114, dept. of computer sciences, yale
+c     university, 1977.
+c-----------------------------------------------------------------------
+c summary of usage.
+c
+c communication between the user and the lsodes package, for normal
+c situations, is summarized here.  this summary describes only a subset
+c of the full set of options available.  see the full description for
+c details, including optional communication, nonstandard options,
+c and instructions for special situations.  see also the example
+c problem (with program and output) following this summary.
+c
+c a. first provide a subroutine of the form..
+c               subroutine f (neq, t, y, ydot)
+c               dimension y(neq), ydot(neq)
+c which supplies the vector function f by loading ydot(i) with f(i).
+c
+c b. next determine (or guess) whether or not the problem is stiff.
+c stiffness occurs when the jacobian matrix df/dy has an eigenvalue
+c whose real part is negative and large in magnitude, compared to the
+c reciprocal of the t span of interest.  if the problem is nonstiff,
+c use a method flag mf = 10.  if it is stiff, there are two standard
+c for the method flag, mf = 121 and mf = 222.  in both cases, lsodes
+c requires the jacobian matrix in some form, and it treats this matrix
+c in general sparse form, with sparsity structure determined internally.
+c (for options where the user supplies the sparsity structure, see
+c the full description of mf below.)
+c
+c c. if the problem is stiff, you are encouraged to supply the jacobian
+c directly (mf = 121), but if this is not feasible, lsodes will
+c compute it internally by difference quotients (mf = 222).
+c if you are supplying the jacobian, provide a subroutine of the form..
+c               subroutine jac (neq, t, y, j, ian, jan, pdj)
+c               dimension y(1), ian(1), jan(1), pdj(1)
+c here neq, t, y, and j are input arguments, and the jac routine is to
+c load the array pdj (of length neq) with the j-th column of df/dy.
+c i.e., load pdj(i) with df(i)/dy(j) for all relevant values of i.
+c the arguments ian and jan should be ignored for normal situations.
+c lsodes will CALL the jac routine with j = 1,2,...,neq.
+c only nonzero elements need be loaded.  usually, a crude approximation
+c to df/dy, possibly with fewer nonzero elements, will suffice.
+c
+c d. write a main program which calls subroutine lsodes once for
+c each point at which answers are desired.  this should also provide
+c for possible use of logical unit 6 for output of error messages
+c by lsodes.  on the first CALL to lsodes, supply arguments as follows..
+c f      = name of subroutine for right-hand side vector f.
+c          this name must be declared external in calling program.
+c neq    = number of first order ode-s.
+c y      = array of initial values, of length neq.
+c t      = the initial value of the independent variable.
+c tout   = first point where output is desired (.ne. t).
+c itol   = 1 or 2 according as AbsTol (below) is a scalar or array.
+c RelTol   = relative tolerance parameter (scalar).
+c AbsTol   = absolute tolerance parameter (scalar or array).
+c          the estimated local error in y(i) will be controlled so as
+c          to be roughly less (in magnitude) than
+c             ewt(i) = RelTol*abs(y(i)) + AbsTol     if itol = 1, or
+c             ewt(i) = RelTol*abs(y(i)) + AbsTol(i)  if itol = 2.
+c          thus the local error test passes if, in each component,
+c          either the absolute error is less than AbsTol (or AbsTol(i)),
+c          or the relative error is less than RelTol.
+c          use RelTol = 0.0 for pure absolute error control, and
+c          use AbsTol = 0.0 (or AbsTol(i) = 0.0) for pure relative error
+c          control.  caution.. actual (global) errors may exceed these
+c          local tolerances, so choose them conservatively.
+c itask  = 1 for normal computation of output values of y at t = tout.
+c istate = integer flag (input and output).  set istate = 1.
+c iopt   = 0 to indicate no optional inputs used.
+c rwork  = real work array of length at least..
+c             20 + 16*neq            for mf = 10,
+c             20 + (2 + 1./lenrat)*nnz + (11 + 9./lenrat)*neq
+c                                    for mf = 121 or 222,
+c          where..
+c          nnz    = the number of nonzero elements in the sparse
+c                   jacobian (if this is unknown, use an estimate), and
+c          lenrat = the real to integer wordlength ratio (usually 1 in
+c                   single precision and 2 in KPP_REAL).
+c          in any case, the required size of rwork cannot generally
+c          be predicted in advance if mf = 121 or 222, and the value
+c          above is a rough estimate of a crude lower bound.  some
+c          experimentation with this size may be necessary.
+c          (when known, the correct required length is an optional
+c          output, available in iwork(17).)
+c lrw    = declared length of rwork (in user-s dimension).
+c iwork  = integer work array of length at least 30.
+c liw    = declared length of iwork (in user-s dimension).
+c jac    = name of subroutine for jacobian matrix (mf = 121).
+c          if used, this name must be declared external in calling
+c          program.  if not used, pass a dummy name.
+c mf     = method flag.  standard values are..
+c          10  for nonstiff (adams) method, no jacobian used.
+c          121 for stiff (bdf) method, user-supplied sparse jacobian.
+c          222 for stiff method, internally generated sparse jacobian.
+c note that the main program must declare arrays y, rwork, iwork,
+c and possibly AbsTol.
+c
+c e. the output from the first CALL (or any call) is..
+c      y = array of computed values of y(t) vector.
+c      t = corresponding value of independent variable (normally tout).
+c istate = 2  if lsodes was successful, negative otherwise.
+c          -1 means excess work done on this CALL (perhaps wrong mf).
+c          -2 means excess accuracy requested (tolerances too small).
+c          -3 means illegal input detected (see printed message).
+c          -4 means repeated error test failures (check all inputs).
+c          -5 means repeated convergence failures (perhaps bad jacobian
+c             supplied or wrong choice of mf or tolerances).
+c          -6 means error weight became zero during problem. (solution
+c             component i vanished, and AbsTol or AbsTol(i) = 0.)
+c          -7 means a fatal error return flag came from the sparse
+c             solver cdrv by way of prjs or slss.  should never happen.
+c          a return with istate = -1, -4, or -5 may result from using
+c          an inappropriate sparsity structure, one that is quite
+c          different from the initial structure.  consider calling
+c          lsodes again with istate = 3 to force the structure to be
+c          reevaluated.  see the full description of istate below.
+c
+c f. to continue the integration after a successful return, simply
+c reset tout and CALL lsodes again.  no other parameters need be reset.
+c
+c-----------------------------------------------------------------------
+c example problem.
+c
+c the following is a simple example problem, with the coding
+c needed for its solution by lsodes.  the problem is from chemical
+c kinetics, and consists of the following 12 rate equations..
+c    dy1/dt  = -rk1*y1
+c    dy2/dt  = rk1*y1 + rk11*rk14*y4 + rk19*rk14*y5
+c                - rk3*y2*y3 - rk15*y2*y12 - rk2*y2
+c    dy3/dt  = rk2*y2 - rk5*y3 - rk3*y2*y3 - rk7*y10*y3
+c                + rk11*rk14*y4 + rk12*rk14*y6
+c    dy4/dt  = rk3*y2*y3 - rk11*rk14*y4 - rk4*y4
+c    dy5/dt  = rk15*y2*y12 - rk19*rk14*y5 - rk16*y5
+c    dy6/dt  = rk7*y10*y3 - rk12*rk14*y6 - rk8*y6
+c    dy7/dt  = rk17*y10*y12 - rk20*rk14*y7 - rk18*y7
+c    dy8/dt  = rk9*y10 - rk13*rk14*y8 - rk10*y8
+c    dy9/dt  = rk4*y4 + rk16*y5 + rk8*y6 + rk18*y7
+c    dy10/dt = rk5*y3 + rk12*rk14*y6 + rk20*rk14*y7
+c                + rk13*rk14*y8 - rk7*y10*y3 - rk17*y10*y12
+c                - rk6*y10 - rk9*y10
+c    dy11/dt = rk10*y8
+c    dy12/dt = rk6*y10 + rk19*rk14*y5 + rk20*rk14*y7
+c                - rk15*y2*y12 - rk17*y10*y12
+c
+c with rk1 = rk5 = 0.1,  rk4 = rk8 = rk16 = rk18 = 2.5,
+c      rk10 = 5.0,  rk2 = rk6 = 10.0,  rk14 = 30.0,
+c      rk3 = rk7 = rk9 = rk11 = rk12 = rk13 = rk19 = rk20 = 50.0,
+c      rk15 = rk17 = 100.0.
+c
+c the t interval is from 0 to 1000, and the initial conditions
+c are y1 = 1, y2 = y3 = ... = y12 = 0.  the problem is stiff.
+c
+c the following coding solves this problem with lsodes, using mf = 121
+c and printing results at t = .1, 1., 10., 100., 1000.  it uses
+c itol = 1 and mixed relative/absolute tolerance controls.
+c during the run and at the end, statistical quantities of interest
+c are printed (see optional outputs in the full description below).
+c
+c     external fex, jex
+c     KPP_REAL AbsTol, RelTol, rwork, t, tout, y
+c     dimension y(12), rwork(500), iwork(30)
+c     data lrw/500/, liw/30/
+c     neq = 12
+c     do 10 i = 1,neq
+c 10    y(i) = 0.0d0
+c     y(1) = 1.0d0
+c     t = 0.0d0
+c     tout = 0.1d0
+c     itol = 1
+c     RelTol = 1.0d-4
+c     AbsTol = 1.0d-6
+c     itask = 1
+c     istate = 1
+c     iopt = 0
+c     mf = 121
+c     do 40 iout = 1,5
+c       CALL lsodes (fex, neq, y, t, tout, itol, RelTol, AbsTol,
+c    1     itask, istate, iopt, rwork, lrw, iwork, liw, jex, mf)
+c       write(6,30)t,iwork(11),rwork(11),(y(i),i=1,neq)
+c 30    format(//7h at t =,e11.3,4x,
+c    1    12h no. steps =,i5,4x,12h last step =,e11.3/
+c    2    13h  y array =  ,4e14.5/13x,4e14.5/13x,4e14.5)
+c       if (istate .lt. 0) go to 80
+c       tout = tout*10.0d0
+c 40    continue
+c     lenrw = iwork(17)
+c     leniw = iwork(18)
+c     nst = iwork(11)
+c     nfe = iwork(12)
+c     nje = iwork(13)
+c     nlu = iwork(21)
+c     nnz = iwork(19)
+c     nnzlu = iwork(25) + iwork(26) + neq
+c     write (6,70) lenrw,leniw,nst,nfe,nje,nlu,nnz,nnzlu
+c 70  format(//22h required rwork size =,i4,15h   iwork size =,i4/
+c    1   12h no. steps =,i4,12h   no. f-s =,i4,12h   no. j-s =,i4,
+c    2   13h   no. lu-s =,i4/23h no. of nonzeros in j =,i5,
+c    3   26h   no. of nonzeros in lu =,i5)
+c     stop
+c 80  write(6,90)istate
+c 90  format(///22h error halt.. istate =,i3)
+c     stop
+c     end
+c
+c     subroutine fex (neq, t, y, ydot)
+c     KPP_REAL t, y, ydot
+c     KPP_REAL rk1, rk2, rk3, rk4, rk5, rk6, rk7, rk8, rk9,
+c    1   rk10, rk11, rk12, rk13, rk14, rk15, rk16, rk17
+c     dimension y(12), ydot(12)
+c     data rk1/0.1d0/, rk2/10.0d0/, rk3/50.0d0/, rk4/2.5d0/, rk5/0.1d0/,
+c    1   rk6/10.0d0/, rk7/50.0d0/, rk8/2.5d0/, rk9/50.0d0/, rk10/5.0d0/,
+c    2   rk11/50.0d0/, rk12/50.0d0/, rk13/50.0d0/, rk14/30.0d0/,
+c    3   rk15/100.0d0/, rk16/2.5d0/, rk17/100.0d0/, rk18/2.5d0/,
+c    4   rk19/50.0d0/, rk20/50.0d0/
+c     ydot(1)  = -rk1*y(1)
+c     ydot(2)  = rk1*y(1) + rk11*rk14*y(4) + rk19*rk14*y(5)
+c    1           - rk3*y(2)*y(3) - rk15*y(2)*y(12) - rk2*y(2)
+c     ydot(3)  = rk2*y(2) - rk5*y(3) - rk3*y(2)*y(3) - rk7*y(10)*y(3)
+c    1           + rk11*rk14*y(4) + rk12*rk14*y(6)
+c     ydot(4)  = rk3*y(2)*y(3) - rk11*rk14*y(4) - rk4*y(4)
+c     ydot(5)  = rk15*y(2)*y(12) - rk19*rk14*y(5) - rk16*y(5)
+c     ydot(6)  = rk7*y(10)*y(3) - rk12*rk14*y(6) - rk8*y(6)
+c     ydot(7)  = rk17*y(10)*y(12) - rk20*rk14*y(7) - rk18*y(7)
+c     ydot(8)  = rk9*y(10) - rk13*rk14*y(8) - rk10*y(8)
+c     ydot(9)  = rk4*y(4) + rk16*y(5) + rk8*y(6) + rk18*y(7)
+c     ydot(10) = rk5*y(3) + rk12*rk14*y(6) + rk20*rk14*y(7)
+c    1           + rk13*rk14*y(8) - rk7*y(10)*y(3) - rk17*y(10)*y(12)
+c    2           - rk6*y(10) - rk9*y(10)
+c     ydot(11) = rk10*y(8)
+c     ydot(12) = rk6*y(10) + rk19*rk14*y(5) + rk20*rk14*y(7)
+c    1           - rk15*y(2)*y(12) - rk17*y(10)*y(12)
+c     return
+c     end
+c
+c     subroutine jex (neq, t, y, j, ia, ja, pdj)
+c     KPP_REAL t, y, pdj
+c     KPP_REAL rk1, rk2, rk3, rk4, rk5, rk6, rk7, rk8, rk9,
+c    1   rk10, rk11, rk12, rk13, rk14, rk15, rk16, rk17
+c     dimension y(1), ia(1), ja(1), pdj(1)
+c     data rk1/0.1d0/, rk2/10.0d0/, rk3/50.0d0/, rk4/2.5d0/, rk5/0.1d0/,
+c    1   rk6/10.0d0/, rk7/50.0d0/, rk8/2.5d0/, rk9/50.0d0/, rk10/5.0d0/,
+c    2   rk11/50.0d0/, rk12/50.0d0/, rk13/50.0d0/, rk14/30.0d0/,
+c    3   rk15/100.0d0/, rk16/2.5d0/, rk17/100.0d0/, rk18/2.5d0/,
+c    4   rk19/50.0d0/, rk20/50.0d0/
+c     go to (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), j
+c 1   pdj(1) = -rk1
+c     pdj(2) = rk1
+c     return
+c 2   pdj(2) = -rk3*y(3) - rk15*y(12) - rk2
+c     pdj(3) = rk2 - rk3*y(3)
+c     pdj(4) = rk3*y(3)
+c     pdj(5) = rk15*y(12)
+c     pdj(12) = -rk15*y(12)
+c     return
+c 3   pdj(2) = -rk3*y(2)
+c     pdj(3) = -rk5 - rk3*y(2) - rk7*y(10)
+c     pdj(4) = rk3*y(2)
+c     pdj(6) = rk7*y(10)
+c     pdj(10) = rk5 - rk7*y(10)
+c     return
+c 4   pdj(2) = rk11*rk14
+c     pdj(3) = rk11*rk14
+c     pdj(4) = -rk11*rk14 - rk4
+c     pdj(9) = rk4
+c     return
+c 5   pdj(2) = rk19*rk14
+c     pdj(5) = -rk19*rk14 - rk16
+c     pdj(9) = rk16
+c     pdj(12) = rk19*rk14
+c     return
+c 6   pdj(3) = rk12*rk14
+c     pdj(6) = -rk12*rk14 - rk8
+c     pdj(9) = rk8
+c     pdj(10) = rk12*rk14
+c     return
+c 7   pdj(7) = -rk20*rk14 - rk18
+c     pdj(9) = rk18
+c     pdj(10) = rk20*rk14
+c     pdj(12) = rk20*rk14
+c     return
+c 8   pdj(8) = -rk13*rk14 - rk10
+c     pdj(10) = rk13*rk14
+c     pdj(11) = rk10
+c 9   return
+c 10  pdj(3) = -rk7*y(3)
+c     pdj(6) = rk7*y(3)
+c     pdj(7) = rk17*y(12)
+c     pdj(8) = rk9
+c     pdj(10) = -rk7*y(3) - rk17*y(12) - rk6 - rk9
+c     pdj(12) = rk6 - rk17*y(12)
+c 11  return
+c 12  pdj(2) = -rk15*y(2)
+c     pdj(5) = rk15*y(2)
+c     pdj(7) = rk17*y(10)
+c     pdj(10) = -rk17*y(10)
+c     pdj(12) = -rk15*y(2) - rk17*y(10)
+c     return
+c     end
+c
+c the output of this program (on a cray-1 in single precision)
+c is as follows..
+c
+c
+c at t =  1.000e-01     no. steps =   12     last step =  1.515e-02
+c  y array =     9.90050e-01   6.28228e-03   3.65313e-03   7.51934e-07
+c                1.12167e-09   1.18458e-09   1.77291e-12   3.26476e-07
+c                5.46720e-08   9.99500e-06   4.48483e-08   2.76398e-06
+c
+c
+c at t =  1.000e+00     no. steps =   33     last step =  7.880e-02
+c  y array =     9.04837e-01   9.13105e-03   8.20622e-02   2.49177e-05
+c                1.85055e-06   1.96797e-06   1.46157e-07   2.39557e-05
+c                3.26306e-05   7.21621e-04   5.06433e-05   3.05010e-03
+c
+c
+c at t =  1.000e+01     no. steps =   48     last step =  1.239e+00
+c  y array =     3.67876e-01   3.68958e-03   3.65133e-01   4.48325e-05
+c                6.10798e-05   4.33148e-05   5.90211e-05   1.18449e-04
+c                3.15235e-03   3.56531e-03   4.15520e-03   2.48741e-01
+c
+c
+c at t =  1.000e+02     no. steps =   91     last step =  3.764e+00
+c  y array =     4.44981e-05   4.42666e-07   4.47273e-04  -3.53257e-11
+c                2.81577e-08  -9.67741e-11   2.77615e-07   1.45322e-07
+c                1.56230e-02   4.37394e-06   1.60104e-02   9.52246e-01
+c
+c
+c at t =  1.000e+03     no. steps =  111     last step =  4.156e+02
+c  y array =    -2.65492e-13   2.60539e-14  -8.59563e-12   6.29355e-14
+c               -1.78066e-13   5.71471e-13  -1.47561e-12   4.58078e-15
+c                1.56314e-02   1.37878e-13   1.60184e-02   9.52719e-01
+c
+c
+c required rwork size = 442   iwork size =  30
+c no. steps = 111   no. f-s = 142   no. j-s =   2   no. lu-s =  20
+c no. of nonzeros in j =   44   no. of nonzeros in lu =   50
+c-----------------------------------------------------------------------
+c full description of user interface to lsodes.
+c
+c the user interface to lsodes consists of the following parts.
+c
+c i.   the CALL sequence to subroutine lsodes, which is a driver
+c      routine for the solver.  this includes descriptions of both
+c      the CALL sequence arguments and of user-supplied routines.
+c      following these descriptions is a description of
+c      optional inputs available through the CALL sequence, and then
+c      a description of optional outputs (in the work arrays).
+c
+c ii.  descriptions of other routines in the lsodes package that may be
+c      (optionally) called by the user.  these provide the ability to
+c      alter error message handling, save and restore the internal
+c      common, and obtain specified derivatives of the solution y(t).
+c
+c iii. descriptions of common blocks to be declared in overlay
+c      or similar environments, or to be saved when doing an interrupt
+c      of the problem and continued solution later.
+c
+c iv.  description of two routines in the lsodes package, either of
+c      which the user may replace with his own version, if desired.
+c      these relate to the measurement of errors.
+c
+c-----------------------------------------------------------------------
+c part i.  CALL sequence.
+c
+c the CALL sequence parameters used for input only are
+c     f, neq, tout, itol, RelTol, AbsTol, itask, iopt, lrw, liw, jac, mf,
+c and those used for both input and output are
+c     y, t, istate.
+c the work arrays rwork and iwork are also used for conditional and
+c optional inputs and optional outputs.  (the term output here refers
+c to the return from subroutine lsodes to the user-s calling program.)
+c
+c the legality of input parameters will be thoroughly checked on the
+c initial CALL for the problem, but not checked thereafter unless a
+c change in input parameters is flagged by istate = 3 on input.
+c
+c the descriptions of the CALL arguments are as follows.
+c
+c f      = the name of the user-supplied subroutine defining the
+c          ode system.  the system must be put in the first-order
+c          form dy/dt = f(t,y), where f is a vector-valued function
+c          of the scalar t and the vector y.  subroutine f is to
+c          compute the function f.  it is to have the form
+c               subroutine f (neq, t, y, ydot)
+c               dimension y(1), ydot(1)
+c          where neq, t, and y are input, and the array ydot = f(t,y)
+c          is output.  y and ydot are arrays of length neq.
+c          (in the dimension statement above, 1 is a dummy
+c          dimension.. it can be replaced by any value.)
+c          subroutine f should not alter y(1),...,y(neq).
+c          f must be declared external in the calling program.
+c
+c          subroutine f may access user-defined quantities in
+c          neq(2),... and/or in y(neq(1)+1),... if neq is an array
+c          (dimensioned in f) and/or y has length exceeding neq(1).
+c          see the descriptions of neq and y below.
+c
+c          if quantities computed in the f routine are needed
+c          externally to lsodes, an extra CALL to f should be made
+c          for this purpose, for consistent and accurate results.
+c          if only the derivative dy/dt is needed, use intdy instead.
+c
+c neq    = the size of the ode system (number of first order
+c          ordinary differential equations).  used only for input.
+c          neq may be decreased, but not increased, during the problem.
+c          if neq is decreased (with istate = 3 on input), the
+c          remaining components of y should be left undisturbed, if
+c          these are to be accessed in f and/or jac.
+c
+c          normally, neq is a scalar, and it is generally referred to
+c          as a scalar in this user interface description.  however,
+c          neq may be an array, with neq(1) set to the system size.
+c          (the lsodes package accesses only neq(1).)  in either case,
+c          this parameter is passed as the neq argument in all calls
+c          to f and jac.  hence, if it is an array, locations
+c          neq(2),... may be used to store other integer data and pass
+c          it to f and/or jac.  subroutines f and/or jac must include
+c          neq in a dimension statement in that case.
+c
+c y      = a real array for the vector of dependent variables, of
+c          length neq or more.  used for both input and output on the
+c          first CALL (istate = 1), and only for output on other calls.
+c          on the first call, y must contain the vector of initial
+c          values.  on output, y contains the computed solution vector,
+c          evaluated at t.  if desired, the y array may be used
+c          for other purposes between calls to the solver.
+c
+c          this array is passed as the y argument in all calls to
+c          f and jac.  hence its length may exceed neq, and locations
+c          y(neq+1),... may be used to store other real data and
+c          pass it to f and/or jac.  (the lsodes package accesses only
+c          y(1),...,y(neq).)
+c
+c t      = the independent variable.  on input, t is used only on the
+c          first call, as the initial point of the integration.
+c          on output, after each call, t is the value at which a
+c          computed solution y is evaluated (usually the same as tout).
+c          on an error return, t is the farthest point reached.
+c
+c tout   = the next value of t at which a computed solution is desired.
+c          used only for input.
+c
+c          when starting the problem (istate = 1), tout may be equal
+c          to t for one call, then should .ne. t for the next call.
+c          for the initial t, an input value of tout .ne. t is used
+c          in order to determine the direction of the integration
+c          (i.e. the algebraic sign of the step sizes) and the rough
+c          scale of the problem.  integration in either direction
+c          (forward or backward in t) is permitted.
+c
+c          if itask = 2 or 5 (one-step modes), tout is ignored after
+c          the first CALL (i.e. the first CALL with tout .ne. t).
+c          otherwise, tout is required on every call.
+c
+c          if itask = 1, 3, or 4, the values of tout need not be
+c          monotone, but a value of tout which backs up is limited
+c          to the current internal t interval, whose endpoints are
+c          tcur - hu and tcur (see optional outputs, below, for
+c          tcur and hu).
+c
+c itol   = an indicator for the type of error control.  see
+c          description below under AbsTol.  used only for input.
+c
+c RelTol   = a relative error tolerance parameter, either a scalar or
+c          an array of length neq.  see description below under AbsTol.
+c          input only.
+c
+c AbsTol   = an absolute error tolerance parameter, either a scalar or
+c          an array of length neq.  input only.
+c
+c             the input parameters itol, RelTol, and AbsTol determine
+c          the error control performed by the solver.  the solver will
+c          control the vector e = (e(i)) of estimated local errors
+c          in y, according to an inequality of the form
+c                      rms-norm of ( e(i)/ewt(i) )   .le.   1,
+c          where       ewt(i) = RelTol(i)*abs(y(i)) + AbsTol(i),
+c          and the rms-norm (root-mean-square norm) here is
+c          rms-norm(v) = sqrt(sum v(i)**2 / neq).  here ewt = (ewt(i))
+c          is a vector of weights which must always be positive, and
+c          the values of RelTol and AbsTol should all be non-negative.
+c          the following table gives the types (scalar/array) of
+c          RelTol and AbsTol, and the corresponding form of ewt(i).
+c
+c             itol    RelTol       AbsTol          ewt(i)
+c              1     scalar     scalar     RelTol*abs(y(i)) + AbsTol
+c              2     scalar     array      RelTol*abs(y(i)) + AbsTol(i)
+c              3     array      scalar     RelTol(i)*abs(y(i)) + AbsTol
+c              4     array      array      RelTol(i)*abs(y(i)) + AbsTol(i)
+c
+c          when either of these parameters is a scalar, it need not
+c          be dimensioned in the user-s calling program.
+c
+c          if none of the above choices (with itol, RelTol, and AbsTol
+c          fixed throughout the problem) is suitable, more general
+c          error controls can be obtained by substituting
+c          user-supplied routines for the setting of ewt and/or for
+c          the norm calculation.  see part iv below.
+c
+c          if global errors are to be estimated by making a repeated
+c          run on the same problem with smaller tolerances, then all
+c          components of RelTol and AbsTol (i.e. of ewt) should be scaled
+c          down uniformly.
+c
+c itask  = an index specifying the task to be performed.
+c          input only.  itask has the following values and meanings.
+c          1  means normal computation of output values of y(t) at
+c             t = tout (by overshooting and interpolating).
+c          2  means take one step only and return.
+c          3  means stop at the first internal mesh point at or
+c             beyond t = tout and return.
+c          4  means normal computation of output values of y(t) at
+c             t = tout but without overshooting t = tcrit.
+c             tcrit must be input as rwork(1).  tcrit may be equal to
+c             or beyond tout, but not behind it in the direction of
+c             integration.  this option is useful if the problem
+c             has a singularity at or beyond t = tcrit.
+c          5  means take one step, without passing tcrit, and return.
+c             tcrit must be input as rwork(1).
+c
+c          note..  if itask = 4 or 5 and the solver reaches tcrit
+c          (within roundoff), it will return t = tcrit (exactly) to
+c          indicate this (unless itask = 4 and tout comes before tcrit,
+c          in which case answers at t = tout are returned first).
+c
+c istate = an index used for input and output to specify the
+c          the state of the calculation.
+c
+c          on input, the values of istate are as follows.
+c          1  means this is the first CALL for the problem
+c             (initializations will be done).  see note below.
+c          2  means this is not the first call, and the calculation
+c             is to continue normally, with no change in any input
+c             parameters except possibly tout and itask.
+c             (if itol, RelTol, and/or AbsTol are changed between calls
+c             with istate = 2, the new values will be used but not
+c             tested for legality.)
+c          3  means this is not the first call, and the
+c             calculation is to continue normally, but with
+c             a change in input parameters other than
+c             tout and itask.  changes are allowed in
+c             neq, itol, RelTol, AbsTol, iopt, lrw, liw, mf,
+c             the conditional inputs ia and ja,
+c             and any of the optional inputs except h0.
+c             in particular, if miter = 1 or 2, a CALL with istate = 3
+c             will cause the sparsity structure of the problem to be
+c             recomputed (or reread from ia and ja if moss = 0).
+c          note..  a preliminary CALL with tout = t is not counted
+c          as a first CALL here, as no initialization or checking of
+c          input is done.  (such a CALL is sometimes useful for the
+c          purpose of outputting the initial conditions.)
+c          thus the first CALL for which tout .ne. t requires
+c          istate = 1 on input.
+c
+c          on output, istate has the following values and meanings.
+c           1  means nothing was done, as tout was equal to t with
+c              istate = 1 on input.  (however, an internal counter was
+c              set to detect and prevent repeated calls of this type.)
+c           2  means the integration was performed successfully.
+c          -1  means an excessive amount of work (more than mxstep
+c              steps) was done on this call, before completing the
+c              requested task, but the integration was otherwise
+c              successful as far as t.  (mxstep is an optional input
+c              and is normally 500.)  to continue, the user may
+c              simply reset istate to a value .gt. 1 and CALL again
+c              (the excess work step counter will be reset to 0).
+c              in addition, the user may increase mxstep to avoid
+c              this error return (see below on optional inputs).
+c          -2  means too much accuracy was requested for the precision
+c              of the machine being used.  this was detected before
+c              completing the requested task, but the integration
+c              was successful as far as t.  to continue, the tolerance
+c              parameters must be reset, and istate must be set
+c              to 3.  the optional output tolsf may be used for this
+c              purpose.  (note.. if this condition is detected before
+c              taking any steps, then an illegal input return
+c              (istate = -3) occurs instead.)
+c          -3  means illegal input was detected, before taking any
+c              integration steps.  see written message for details.
+c              note..  if the solver detects an infinite loop of calls
+c              to the solver with illegal input, it will cause
+c              the run to stop.
+c          -4  means there were repeated error test failures on
+c              one attempted step, before completing the requested
+c              task, but the integration was successful as far as t.
+c              the problem may have a singularity, or the input
+c              may be inappropriate.
+c          -5  means there were repeated convergence test failures on
+c              one attempted step, before completing the requested
+c              task, but the integration was successful as far as t.
+c              this may be caused by an inaccurate jacobian matrix,
+c              if one is being used.
+c          -6  means ewt(i) became zero for some i during the
+c              integration.  pure relative error control (AbsTol(i)=0.0)
+c              was requested on a variable which has now vanished.
+c              the integration was successful as far as t.
+c          -7  means a fatal error return flag came from the sparse
+c              solver cdrv by way of prjs or slss (numerical
+c              factorization or backsolve).  this should never happen.
+c              the integration was successful as far as t.
+c
+c          note.. an error return with istate = -1, -4, or -5 and with
+c          miter = 1 or 2 may mean that the sparsity structure of the
+c          problem has changed significantly since it was last
+c          determined (or input).  in that case, one can attempt to
+c          complete the integration by setting istate = 3 on the next
+c          call, so that a new structure determination is done.
+c
+c          note..  since the normal output value of istate is 2,
+c          it does not need to be reset for normal continuation.
+c          also, since a negative input value of istate will be
+c          regarded as illegal, a negative output value requires the
+c          user to change it, and possibly other inputs, before
+c          calling the solver again.
+c
+c iopt   = an integer flag to specify whether or not any optional
+c          inputs are being used on this call.  input only.
+c          the optional inputs are listed separately below.
+c          iopt = 0 means no optional inputs are being used.
+c                   default values will be used in all cases.
+c          iopt = 1 means one or more optional inputs are being used.
+c
+c rwork  = a work array used for a mixture of real (KPP_REAL)
+c          and integer work space.
+c          the length of rwork (in real words) must be at least
+c             20 + nyh*(maxord + 1) + 3*neq + lwm    where
+c          nyh    = the initial value of neq,
+c          maxord = 12 (if meth = 1) or 5 (if meth = 2) (unless a
+c                   smaller value is given as an optional input),
+c          lwm = 0                                    if miter = 0,
+c          lwm = 2*nnz + 2*neq + (nnz+9*neq)/lenrat   if miter = 1,
+c          lwm = 2*nnz + 2*neq + (nnz+10*neq)/lenrat  if miter = 2,
+c          lwm = neq + 2                              if miter = 3.
+c          in the above formulas,
+c          nnz    = number of nonzero elements in the jacobian matrix.
+c          lenrat = the real to integer wordlength ratio (usually 1 in
+c                   single precision and 2 in KPP_REAL).
+c          (see the mf description for meth and miter.)
+c          thus if maxord has its default value and neq is constant,
+c          the minimum length of rwork is..
+c             20 + 16*neq        for mf = 10,
+c             20 + 16*neq + lwm  for mf = 11, 111, 211, 12, 112, 212,
+c             22 + 17*neq        for mf = 13,
+c             20 +  9*neq        for mf = 20,
+c             20 +  9*neq + lwm  for mf = 21, 121, 221, 22, 122, 222,
+c             22 + 10*neq        for mf = 23.
+c          if miter = 1 or 2, the above formula for lwm is only a
+c          crude lower bound.  the required length of rwork cannot
+c          be readily predicted in general, as it depends on the
+c          sparsity structure of the problem.  some experimentation
+c          may be necessary.
+c
+c          the first 20 words of rwork are reserved for conditional
+c          and optional inputs and optional outputs.
+c
+c          the following word in rwork is a conditional input..
+c            rwork(1) = tcrit = critical value of t which the solver
+c                       is not to overshoot.  required if itask is
+c                       4 or 5, and ignored otherwise.  (see itask.)
+c
+c lrw    = the length of the array rwork, as declared by the user.
+c          (this will be checked by the solver.)
+c
+c iwork  = an integer work array.  the length of iwork must be at least
+c             31 + neq + nnz   if moss = 0 and miter = 1 or 2, or
+c             30               otherwise.
+c          (nnz is the number of nonzero elements in df/dy.)
+c
+c          in lsodes, iwork is used only for conditional and
+c          optional inputs and optional outputs.
+c
+c          the following two blocks of words in iwork are conditional
+c          inputs, required if moss = 0 and miter = 1 or 2, but not
+c          otherwise (see the description of mf for moss).
+c            iwork(30+j) = ia(j)     (j=1,...,neq+1)
+c            iwork(31+neq+k) = ja(k) (k=1,...,nnz)
+c          the two arrays ia and ja describe the sparsity structure
+c          to be assumed for the jacobian matrix.  ja contains the row
+c          indices where nonzero elements occur, reading in columnwise
+c          order, and ia contains the starting locations in ja of the
+c          descriptions of columns 1,...,neq, in that order, with
+c          ia(1) = 1.  thus, for each column index j = 1,...,neq, the
+c          values of the row index i in column j where a nonzero
+c          element may occur are given by
+c            i = ja(k),  where   ia(j) .le. k .lt. ia(j+1).
+c          if nnz is the total number of nonzero locations assumed,
+c          then the length of the ja array is nnz, and ia(neq+1) must
+c          be nnz + 1.  duplicate entries are not allowed.
+c
+c liw    = the length of the array iwork, as declared by the user.
+c          (this will be checked by the solver.)
+c
+c note..  the work arrays must not be altered between calls to lsodes
+c for the same problem, except possibly for the conditional and
+c optional inputs, and except for the last 3*neq words of rwork.
+c the latter space is used for internal scratch space, and so is
+c available for use by the user outside lsodes between calls, if
+c desired (but not for use by f or jac).
+c
+c jac    = name of user-supplied routine (miter = 1 or moss = 1) to
+c          compute the jacobian matrix, df/dy, as a function of
+c          the scalar t and the vector y.  it is to have the form
+c               subroutine jac (neq, t, y, j, ian, jan, pdj)
+c               dimension y(1), ian(1), jan(1), pdj(1)
+c          where neq, t, y, j, ian, and jan are input, and the array
+c          pdj, of length neq, is to be loaded with column j
+c          of the jacobian on output.  thus df(i)/dy(j) is to be
+c          loaded into pdj(i) for all relevant values of i.
+c          here t and y have the same meaning as in subroutine f,
+c          and j is a column index (1 to neq).  ian and jan are
+c          undefined in calls to jac for structure determination
+c          (moss = 1).  otherwise, ian and jan are structure
+c          descriptors, as defined under optional outputs below, and
+c          so can be used to determine the relevant row indices i, if
+c          desired.  (in the dimension statement above, 1 is a
+c          dummy dimension.. it can be replaced by any value.)
+c               jac need not provide df/dy exactly.  a crude
+c          approximation (possibly with greater sparsity) will do.
+c               in any case, pdj is preset to zero by the solver,
+c          so that only the nonzero elements need be loaded by jac.
+c          calls to jac are made with j = 1,...,neq, in that order, and
+c          each such set of calls is preceded by a CALL to f with the
+c          same arguments neq, t, and y.  thus to gain some efficiency,
+c          intermediate quantities shared by both calculations may be
+c          saved in a user common block by f and not recomputed by jac,
+c          if desired.  jac must not alter its input arguments.
+c          jac must be declared external in the calling program.
+c               subroutine jac may access user-defined quantities in
+c          neq(2),... and y(neq(1)+1),... if neq is an array
+c          (dimensioned in jac) and y has length exceeding neq(1).
+c          see the descriptions of neq and y above.
+c
+c mf     = the method flag.  used only for input.
+c          mf has three decimal digits-- moss, meth, miter--
+c             mf = 100*moss + 10*meth + miter.
+c          moss indicates the method to be used to obtain the sparsity
+c          structure of the jacobian matrix if miter = 1 or 2..
+c            moss = 0 means the user has supplied ia and ja
+c                     (see descriptions under iwork above).
+c            moss = 1 means the user has supplied jac (see below)
+c                     and the structure will be obtained from neq
+c                     initial calls to jac.
+c            moss = 2 means the structure will be obtained from neq+1
+c                     initial calls to f.
+c          meth indicates the basic linear multistep method..
+c            meth = 1 means the implicit adams method.
+c            meth = 2 means the method based on backward
+c                     differentiation formulas (bdf-s).
+c          miter indicates the corrector iteration method..
+c            miter = 0 means functional iteration (no jacobian matrix
+c                      is involved).
+c            miter = 1 means chord iteration with a user-supplied
+c                      sparse jacobian, given by subroutine jac.
+c            miter = 2 means chord iteration with an internally
+c                      generated (difference quotient) sparse jacobian
+c                      (using ngp extra calls to f per df/dy value,
+c                      where ngp is an optional output described below.)
+c            miter = 3 means chord iteration with an internally
+c                      generated diagonal jacobian approximation.
+c                      (using 1 extra CALL to f per df/dy evaluation).
+c          if miter = 1 or moss = 1, the user must supply a subroutine
+c          jac (the name is arbitrary) as described above under jac.
+c          otherwise, a dummy argument can be used.
+c
+c          the standard choices for mf are..
+c            mf = 10  for a nonstiff problem,
+c            mf = 21 or 22 for a stiff problem with ia/ja supplied
+c                     (21 if jac is supplied, 22 if not),
+c            mf = 121 for a stiff problem with jac supplied,
+c                     but not ia/ja,
+c            mf = 222 for a stiff problem with neither ia/ja nor
+c                     jac supplied.
+c          the sparseness structure can be changed during the
+c          problem by making a CALL to lsodes with istate = 3.
+c-----------------------------------------------------------------------
+c optional inputs.
+c
+c the following is a list of the optional inputs provided for in the
+c CALL sequence.  (see also part ii.)  for each such input variable,
+c this table lists its name as used in this documentation, its
+c location in the CALL sequence, its meaning, and the default value.
+c the use of any of these inputs requires iopt = 1, and in that
+c case all of these inputs are examined.  a value of zero for any
+c of these optional inputs will cause the default value to be used.
+c thus to use a subset of the optional inputs, simply preload
+c locations 5 to 10 in rwork and iwork to 0.0 and 0 respectively, and
+c then set those of interest to nonzero values.
+c
+c name    location      meaning and default value
+c
+c h0      rwork(5)  the step size to be attempted on the first step.
+c                   the default value is determined by the solver.
+c
+c hmax    rwork(6)  the maximum absolute step size allowed.
+c                   the default value is infinite.
+c
+c hmin    rwork(7)  the minimum absolute step size allowed.
+c                   the default value is 0.  (this lower bound is not
+c                   enforced on the final step before reaching tcrit
+c                   when itask = 4 or 5.)
+c
+c seth    rwork(8)  the element threshhold for sparsity determination
+c                   when moss = 1 or 2.  if the absolute value of
+c                   an estimated jacobian element is .le. seth, it
+c                   will be assumed to be absent in the structure.
+c                   the default value of seth is 0.
+c
+c maxord  iwork(5)  the maximum order to be allowed.  the default
+c                   value is 12 if meth = 1, and 5 if meth = 2.
+c                   if maxord exceeds the default value, it will
+c                   be reduced to the default value.
+c                   if maxord is changed during the problem, it may
+c                   cause the current order to be reduced.
+c
+c mxstep  iwork(6)  maximum number of (internally defined) steps
+c                   allowed during one CALL to the solver.
+c                   the default value is 500.
+c
+c mxhnil  iwork(7)  maximum number of messages printed (per problem)
+c                   warning that t + h = t on a step (h = step size).
+c                   this must be positive to result in a non-default
+c                   value.  the default value is 10.
+c-----------------------------------------------------------------------
+c optional outputs.
+c
+c as optional additional output from lsodes, the variables listed
+c below are quantities related to the performance of lsodes
+c which are available to the user.  these are communicated by way of
+c the work arrays, but also have internal mnemonic names as shown.
+c except where stated otherwise, all of these outputs are defined
+c on any successful return from lsodes, and on any return with
+c istate = -1, -2, -4, -5, or -6.  on an illegal input return
+c (istate = -3), they will be unchanged from their existing values
+c (if any), except possibly for tolsf, lenrw, and leniw.
+c on any error return, outputs relevant to the error will be defined,
+c as noted below.
+c
+c name    location      meaning
+c
+c hu      rwork(11) the step size in t last used (successfully).
+c
+c hcur    rwork(12) the step size to be attempted on the next step.
+c
+c tcur    rwork(13) the current value of the independent variable
+c                   which the solver has actually reached, i.e. the
+c                   current internal mesh point in t.  on output, tcur
+c                   will always be at least as far as the argument
+c                   t, but may be farther (if interpolation was done).
+c
+c tolsf   rwork(14) a tolerance scale factor, greater than 1.0,
+c                   computed when a request for too much accuracy was
+c                   detected (istate = -3 if detected at the start of
+c                   the problem, istate = -2 otherwise).  if itol is
+c                   left unaltered but RelTol and AbsTol are uniformly
+c                   scaled up by a factor of tolsf for the next call,
+c                   then the solver is deemed likely to succeed.
+c                   (the user may also ignore tolsf and alter the
+c                   tolerance parameters in any other way appropriate.)
+c
+c nst     iwork(11) the number of steps taken for the problem so far.
+c
+c nfe     iwork(12) the number of f evaluations for the problem so far,
+c                   excluding those for structure determination
+c                   (moss = 2).
+c
+c nje     iwork(13) the number of jacobian evaluations for the problem
+c                   so far, excluding those for structure determination
+c                   (moss = 1).
+c
+c nqu     iwork(14) the method order last used (successfully).
+c
+c nqcur   iwork(15) the order to be attempted on the next step.
+c
+c imxer   iwork(16) the index of the component of largest magnitude in
+c                   the weighted local error vector ( e(i)/ewt(i) ),
+c                   on an error return with istate = -4 or -5.
+c
+c lenrw   iwork(17) the length of rwork actually required.
+c                   this is defined on normal returns and on an illegal
+c                   input return for insufficient storage.
+c
+c leniw   iwork(18) the length of iwork actually required.
+c                   this is defined on normal returns and on an illegal
+c                   input return for insufficient storage.
+c
+c nnz     iwork(19) the number of nonzero elements in the jacobian
+c                   matrix, including the diagonal (miter = 1 or 2).
+c                   (this may differ from that given by ia(neq+1)-1
+c                   if moss = 0, because of added diagonal entries.)
+c
+c ngp     iwork(20) the number of groups of column indices, used in
+c                   difference quotient jacobian aproximations if
+c                   miter = 2.  this is also the number of extra f
+c                   evaluations needed for each jacobian evaluation.
+c
+c nlu     iwork(21) the number of sparse lu decompositions for the
+c                   problem so far.
+c
+c lyh     iwork(22) the base address in rwork of the history array yh,
+c                   described below in this list.
+c
+c ipian   iwork(23) the base address of the structure descriptor array
+c                   ian, described below in this list.
+c
+c ipjan   iwork(24) the base address of the structure descriptor array
+c                   jan, described below in this list.
+c
+c nzl     iwork(25) the number of nonzero elements in the strict lower
+c                   triangle of the lu factorization used in the chord
+c                   iteration (miter = 1 or 2).
+c
+c nzu     iwork(26) the number of nonzero elements in the strict upper
+c                   triangle of the lu factorization used in the chord
+c                   iteration (miter = 1 or 2).
+c                   the total number of nonzeros in the factorization
+c                   is therefore nzl + nzu + neq.
+c
+c the following four arrays are segments of the rwork array which
+c may also be of interest to the user as optional outputs.
+c for each array, the table below gives its internal name,
+c its base address, and its description.
+c for yh and acor, the base addresses are in rwork (a real array).
+c the integer arrays ian and jan are to be obtained by declaring an
+c integer array iwk and identifying iwk(1) with rwork(21), using either
+c an equivalence statement or a subroutine call.  then the base
+c addresses ipian (of ian) and ipjan (of jan) in iwk are to be obtained
+c as optional outputs iwork(23) and iwork(24), respectively.
+c thus ian(1) is iwk(ipian), etc.
+c
+c name    base address      description
+c
+c ian    ipian (in iwk)  structure descriptor array of size neq + 1.
+c jan    ipjan (in iwk)  structure descriptor array of size nnz.
+c         (see above)    ian and jan together describe the sparsity
+c                        structure of the jacobian matrix, as used by
+c                        lsodes when miter = 1 or 2.
+c                        jan contains the row indices of the nonzero
+c                        locations, reading in columnwise order, and
+c                        ian contains the starting locations in jan of
+c                        the descriptions of columns 1,...,neq, in
+c                        that order, with ian(1) = 1.  thus for each
+c                        j = 1,...,neq, the row indices i of the
+c                        nonzero locations in column j are
+c                        i = jan(k),  ian(j) .le. k .lt. ian(j+1).
+c                        note that ian(neq+1) = nnz + 1.
+c                        (if moss = 0, ian/jan may differ from the
+c                        input ia/ja because of a different ordering
+c                        in each column, and added diagonal entries.)
+c
+c yh      lyh            the nordsieck history array, of size nyh by
+c          (optional     (nqcur + 1), where nyh is the initial value
+c          output)       of neq.  for j = 0,1,...,nqcur, column j+1
+c                        of yh contains hcur**j/factorial(j) times
+c                        the j-th derivative of the interpolating
+c                        polynomial currently representing the solution,
+c                        evaluated at t = tcur.  the base address lyh
+c                        is another optional output, listed above.
+c
+c acor     lenrw-neq+1   array of size neq used for the accumulated
+c                        corrections on each step, scaled on output
+c                        to represent the estimated local error in y
+c                        on the last step.  this is the vector e in
+c                        the description of the error control.  it is
+c                        defined only on a successful return from
+c                        lsodes.
+c
+c-----------------------------------------------------------------------
+c part ii.  other routines callable.
+c
+c the following are optional calls which the user may make to
+c gain additional capabilities in conjunction with lsodes.
+c (the routines xsetun and xsetf are designed to conform to the
+c slatec error handling package.)
+c
+c     form of CALL                  function
+c   CALL xsetun(lun)          set the logical unit number, lun, for
+c                             output of messages from lsodes, if
+c                             the default is not desired.
+c                             the default value of lun is 6.
+c
+c   CALL xsetf(mflag)         set a flag to control the printing of
+c                             messages by lsodes.
+c                             mflag = 0 means do not print. (danger..
+c                             this risks losing valuable information.)
+c                             mflag = 1 means print (the default).
+c
+c                             either of the above calls may be made at
+c                             any time and will take effect immediately.
+c
+c   CALL srcms(rsav,isav,job) saves and restores the contents of
+c                             the internal common blocks used by
+c                             lsodes (see part iii below).
+c                             rsav must be a real array of length 224
+c                             or more, and isav must be an integer
+c                             array of length 75 or more.
+c                             job=1 means save common into rsav/isav.
+c                             job=2 means restore common from rsav/isav.
+c                                srcms is useful if one is
+c                             interrupting a run and restarting
+c                             later, or alternating between two or
+c                             more problems solved with lsodes.
+c
+c   CALL intdy(,,,,,)         provide derivatives of y, of various
+c        (see below)          orders, at a specified point t, if
+c                             desired.  it may be called only after
+c                             a successful return from lsodes.
+c
+c the detailed instructions for using intdy are as follows.
+c the form of the CALL is..
+c
+c   lyh = iwork(22)
+c   CALL intdy (t, k, rwork(lyh), nyh, dky, iflag)
+c
+c the input parameters are..
+c
+c t         = value of independent variable where answers are desired
+c             (normally the same as the t last returned by lsodes).
+c             for valid results, t must lie between tcur - hu and tcur.
+c             (see optional outputs for tcur and hu.)
+c k         = integer order of the derivative desired.  k must satisfy
+c             0 .le. k .le. nqcur, where nqcur is the current order
+c             (see optional outputs).  the capability corresponding
+c             to k = 0, i.e. computing y(t), is already provided
+c             by lsodes directly.  since nqcur .ge. 1, the first
+c             derivative dy/dt is always available with intdy.
+c lyh       = the base address of the history array yh, obtained
+c             as an optional output as shown above.
+c nyh       = column length of yh, equal to the initial value of neq.
+c
+c the output parameters are..
+c
+c dky       = a real array of length neq containing the computed value
+c             of the k-th derivative of y(t).
+c iflag     = integer flag, returned as 0 if k and t were legal,
+c             -1 if k was illegal, and -2 if t was illegal.
+c             on an error return, a message is also written.
+c-----------------------------------------------------------------------
+c part iii.  common blocks.
+c
+c if lsodes is to be used in an overlay situation, the user
+c must declare, in the primary overlay, the variables in..
+c   (1) the CALL sequence to lsodes,
+c   (2) the three internal common blocks
+c         /ls0001/  of length  257  (218 KPP_REAL words
+c                         followed by 39 integer words),
+c         /lss001/  of length  40    ( 6 KPP_REAL words
+c                         followed by 34 integer words),
+c         /eh0001/  of length  2 (integer words).
+c
+c if lsodes is used on a system in which the contents of internal
+c common blocks are not preserved between calls, the user should
+c declare the above three common blocks in his main program to insure
+c that their contents are preserved.
+c
+c if the solution of a given problem by lsodes is to be interrupted
+c and then later continued, such as when restarting an interrupted run
+c or alternating between two or more problems, the user should save,
+c following the return from the last lsodes CALL prior to the
+c interruption, the contents of the CALL sequence variables and the
+c internal common blocks, and later restore these values before the
+c next lsodes CALL for that problem.  to save and restore the common
+c blocks, use subroutine srcms (see part ii above).
+c
+c-----------------------------------------------------------------------
+c part iv.  optionally replaceable solver routines.
+c
+c below are descriptions of two routines in the lsodes package which
+c relate to the measurement of errors.  either routine can be
+c replaced by a user-supplied version, if desired.  however, since such
+c a replacement may have a major impact on performance, it should be
+c done only when absolutely necessary, and only with great caution.
+c (note.. the means by which the package version of a routine is
+c superseded by the user-s version may be system-dependent.)
+c
+c (a) ewset.
+c the following subroutine is called just before each internal
+c integration step, and sets the array of error weights, ewt, as
+c described under itol/RelTol/AbsTol above..
+c     subroutine ewset (neq, itol, RelTol, AbsTol, ycur, ewt)
+c where neq, itol, RelTol, and AbsTol are as in the lsodes CALL sequence,
+c ycur contains the current dependent variable vector, and
+c ewt is the array of weights set by ewset.
+c
+c if the user supplies this subroutine, it must return in ewt(i)
+c (i = 1,...,neq) a positive quantity suitable for comparing errors
+c in y(i) to.  the ewt array returned by ewset is passed to the
+c vnorm routine (see below), and also used by lsodes in the computation
+c of the optional output imxer, the diagonal jacobian approximation,
+c and the increments for difference quotient jacobians.
+c
+c in the user-supplied version of ewset, it may be desirable to use
+c the current values of derivatives of y.  derivatives up to order nq
+c are available from the history array yh, described above under
+c optional outputs.  in ewset, yh is identical to the ycur array,
+c extended to nq + 1 columns with a column length of nyh and scale
+c factors of h**j/factorial(j).  on the first CALL for the problem,
+c given by nst = 0, nq is 1 and h is temporarily set to 1.0.
+c the quantities nq, nyh, h, and nst can be obtained by including
+c in ewset the statements..
+c     KPP_REAL h, rls
+c     common /ls0001/ rls(218),ils(39)
+c     nq = ils(35)
+c     nyh = ils(14)
+c     nst = ils(36)
+c     h = rls(212)
+c thus, for example, the current value of dy/dt can be obtained as
+c ycur(nyh+i)/h  (i=1,...,neq)  (and the division by h is
+c unnecessary when nst = 0).
+c
+c (b) vnorm.
+c the following is a real function routine which computes the weighted
+c root-mean-square norm of a vector v..
+c     d = vnorm (n, v, w)
+c where..
+c   n = the length of the vector,
+c   v = real array of length n containing the vector,
+c   w = real array of length n containing weights,
+c   d = sqrt( (1/n) * sum(v(i)*w(i))**2 ).
+c vnorm is called with n = neq and with w(i) = 1.0/ewt(i), where
+c ewt is as set by subroutine ewset.
+c
+c if the user supplies this function, it should return a non-negative
+c value of vnorm suitable for use in the error control in lsodes.
+c none of the arguments should be altered by vnorm.
+c for example, a user-supplied vnorm routine might..
+c   -substitute a max-norm of (v(i)*w(i)) for the rms-norm, or
+c   -ignore some components of v in the norm, with the effect of
+c    suppressing the error control on those components of y.
+c-----------------------------------------------------------------------
+c-----------------------------------------------------------------------
+c other routines in the lsodes package.
+c
+c in addition to subroutine lsodes, the lsodes package includes the
+c following subroutines and function routines..
+c  iprep    acts as an iterface between lsodes and prep, and also does
+c           adjusting of work space pointers and work arrays.
+c  prep     is called by iprep to compute sparsity and do sparse matrix
+c           preprocessing if miter = 1 or 2.
+c  jgroup   is called by prep to compute groups of jacobian column
+c           indices for use when miter = 2.
+c  adjlr    adjusts the length of required sparse matrix work space.
+c           it is called by prep.
+c  cntnzu   is called by prep and counts the nonzero elements in the
+c           strict upper triangle of j + j-transpose, where j = df/dy.
+c  intdy    computes an interpolated value of the y vector at t = tout.
+c  stode    is the core integrator, which does one step of the
+c           integration and the associated error control.
+c  cfode    sets all method coefficients and test constants.
+c  prjs     computes and preprocesses the jacobian matrix j = df/dy
+c           and the newton iteration matrix p = i - h*l0*j.
+c  slss     manages solution of linear system in chord iteration.
+c  ewset    sets the error weight vector ewt before each step.
+c  vnorm    computes the weighted r.m.s. norm of a vector.
+c  srcms    is a user-callable routine to save and restore
+c           the contents of the internal common blocks.
+c  odrv     constructs a reordering of the rows and columns of
+c           a matrix by the minimum degree algorithm.  odrv is a
+c           driver routine which calls subroutines md, mdi, mdm,
+c           mdp, mdu, and sro.  see ref. 2 for details.  (the odrv
+c           module has been modified since ref. 2, however.)
+c  cdrv     performs reordering, symbolic factorization, numerical
+c           factorization, or linear system solution operations,
+c           depending on a path argument ipath.  cdrv is a
+c           driver routine which calls subroutines nroc, nsfc,
+c           nnfc, nnsc, and nntc.  see ref. 3 for details.
+c           lsodes uses cdrv to solve linear systems in which the
+c           coefficient matrix is  p = i - con*j, where i is the
+c           identity, con is a scalar, and j is an approximation to
+c           the jacobian df/dy.  because cdrv deals with rowwise
+c           sparsity descriptions, cdrv works with p-transpose, not p.
+c  d1mach   computes the unit roundoff in a machine-independent manner.
+c  xerrwv, xsetun, and xsetf   handle the printing of all error
+c           messages and warnings.  xerrwv is machine-dependent.
+c note..  vnorm and d1mach are function routines.
+c all the others are subroutines.
+c
+c the intrinsic and external routines used by lsodes are..
+c dabs, DMAX1, dmin1, dfloat, max0, min0, mod, DSIGN, DSQRT, and write.
+c
+c a block data subprogram is also included with the package,
+c for loading some of the variables in internal common.
+c
+c-----------------------------------------------------------------------
+c the following card is for optimized compilation on lll compilers.
+clll. optimize
+c-----------------------------------------------------------------------
+      external prjs, slss
+      integer illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     1   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns
+      integer icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     1   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, i1, i2, iflag, imax, imul, imxer, ipflag, ipgo, irem,
+     1   j, kgo, lenrat, lenyht, leniw, lenrw, lf0, lia, lja,
+     2   lrtem, lwtem, lyhd, lyhn, mf1, mord, mxhnl0, mxstp0, ncolm
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL con0, conmin, ccmxj, psmall, rbig, seth
+      KPP_REAL AbsToli, ayi, big, ewti, h0, hmax, hmx, rh, RelToli,
+     1   tcrit, tdist, tnext, tol, tolsf, tp, size, sum, w0,
+     2   d1mach, vnorm
+      dimension mord(2)
+      logical ihit
+c-----------------------------------------------------------------------
+c the following two internal common blocks contain
+c (a) variables which are local to any subroutine but whose values must
+c     be preserved between calls to the routine (own variables), and
+c (b) variables which are communicated between subroutines.
+c the structure of each block is as follows..  all real variables are
+c listed first, followed by all integers.  within each type, the
+c variables are grouped with those local to subroutine lsodes first,
+c then those local to subroutine stode or subroutine prjs
+c (no other routines have own variables), and finally those used
+c for communication.  the block ls0001 is declared in subroutines
+c lsodes, iprep, prep, intdy, stode, prjs, and slss.  the block lss001
+c is declared in subroutines lsodes, iprep, prep, prjs, and slss.
+c groups of variables are replaced by dummy arrays in the common
+c declarations in routines where those variables are not used.
+c-----------------------------------------------------------------------
+      common /ls0001/ rowns(209),
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     2   illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     3   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+c
+      common /lss001/ con0, conmin, ccmxj, psmall, rbig, seth,
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c
+      data mord(1),mord(2)/12,5/, mxstp0/500/, mxhnl0/10/
+c-----------------------------------------------------------------------
+c in the data statement below, set lenrat equal to the ratio of
+c the wordlength for a real number to that for an integer.  usually,
+c lenrat = 1 for single precision and 2 for KPP_REAL.  if the
+c true ratio is not an integer, use the next smaller integer (.ge. 1).
+c-----------------------------------------------------------------------
+      data lenrat/2/
+c-----------------------------------------------------------------------
+c block a.
+c this code block is executed on every call.
+c it tests istate and itask for legality and branches appropriately.
+c if istate .gt. 1 but the flag init shows that initialization has
+c not yet been done, an error return occurs.
+c if istate = 1 and tout = t, jump to block g and return immediately.
+c-----------------------------------------------------------------------
+      if (istate .lt. 1 .or. istate .gt. 3) go to 601
+      if (itask .lt. 1 .or. itask .gt. 5) go to 602
+      if (istate .eq. 1) go to 10
+      if (init .eq. 0) go to 603
+      if (istate .eq. 2) go to 200
+      go to 20
+ 10   init = 0
+      if (tout .eq. t) go to 430
+ 20   ntrep = 0
+c-----------------------------------------------------------------------
+c block b.
+c the next code block is executed for the initial CALL (istate = 1),
+c or for a continuation CALL with parameter changes (istate = 3).
+c it contains checking of all inputs and various initializations.
+c if istate = 1, the final setting of work space pointers, the matrix
+c preprocessing, and other initializations are done in block c.
+c
+c first check legality of the non-optional inputs neq, itol, iopt,
+c mf, ml, and mu.
+c-----------------------------------------------------------------------
+      if (neq(1) .le. 0) go to 604
+      if (istate .eq. 1) go to 25
+      if (neq(1) .gt. n) go to 605
+ 25   n = neq(1)
+      if (itol .lt. 1 .or. itol .gt. 4) go to 606
+      if (iopt .lt. 0 .or. iopt .gt. 1) go to 607
+      moss = mf/100
+      mf1 = mf - 100*moss
+      meth = mf1/10
+      miter = mf1 - 10*meth
+      if (moss .lt. 0 .or. moss .gt. 2) go to 608
+      if (meth .lt. 1 .or. meth .gt. 2) go to 608
+      if (miter .lt. 0 .or. miter .gt. 3) go to 608
+      if (miter .eq. 0 .or. miter .eq. 3) moss = 0
+c next process and check the optional inputs. --------------------------
+      if (iopt .eq. 1) go to 40
+      maxord = mord(meth)
+      mxstep = mxstp0
+      mxhnil = mxhnl0
+      if (istate .eq. 1) h0 = 0.0d0
+      hmxi = 0.0d0
+      hmin = 0.0d0
+      seth = 0.0d0
+      go to 60
+ 40   maxord = iwork(5)
+      if (maxord .lt. 0) go to 611
+      if (maxord .eq. 0) maxord = 100
+      maxord = min0(maxord,mord(meth))
+      mxstep = iwork(6)
+      if (mxstep .lt. 0) go to 612
+      if (mxstep .eq. 0) mxstep = mxstp0
+      mxhnil = iwork(7)
+      if (mxhnil .lt. 0) go to 613
+      if (mxhnil .eq. 0) mxhnil = mxhnl0
+      if (istate .ne. 1) go to 50
+      h0 = rwork(5)
+      if ((tout - t)*h0 .lt. 0.0d0) go to 614
+ 50   hmax = rwork(6)
+      if (hmax .lt. 0.0d0) go to 615
+      hmxi = 0.0d0
+      if (hmax .gt. 0.0d0) hmxi = 1.0d0/hmax
+      hmin = rwork(7)
+      if (hmin .lt. 0.0d0) go to 616
+      seth = rwork(8)
+      if (seth .lt. 0.0d0) go to 609
+c check RelTol and AbsTol for legality. ------------------------------------
+ 60   RelToli = RelTol(1)
+      AbsToli = AbsTol(1)
+      do 65 i = 1,n
+        if (itol .ge. 3) RelToli = RelTol(i)
+        if (itol .eq. 2 .or. itol .eq. 4) AbsToli = AbsTol(i)
+        if (RelToli .lt. 0.0d0) go to 619
+        if (AbsToli .lt. 0.0d0) go to 620
+ 65     continue
+c-----------------------------------------------------------------------
+c compute required work array lengths, as far as possible, and test
+c these against lrw and liw.  then set tentative pointers for work
+c arrays.  pointers to rwork/iwork segments are named by prefixing l to
+c the name of the segment.  e.g., the segment yh starts at rwork(lyh).
+c segments of rwork (in order) are denoted  wm, yh, savf, ewt, acor.
+c if miter = 1 or 2, the required length of the matrix work space wm
+c is not yet known, and so a crude minimum value is used for the
+c initial tests of lrw and liw, and yh is temporarily stored as far
+c to the right in rwork as possible, to leave the maximum amount
+c of space for wm for matrix preprocessing.  thus if miter = 1 or 2
+c and moss .ne. 2, some of the segments of rwork are temporarily
+c omitted, as they are not needed in the preprocessing.  these
+c omitted segments are.. acor if istate = 1, ewt and acor if istate = 3
+c and moss = 1, and savf, ewt, and acor if istate = 3 and moss = 0.
+c-----------------------------------------------------------------------
+      lrat = lenrat
+      if (istate .eq. 1) nyh = n
+      lwmin = 0
+      if (miter .eq. 1) lwmin = 4*n + 10*n/lrat
+      if (miter .eq. 2) lwmin = 4*n + 11*n/lrat
+      if (miter .eq. 3) lwmin = n + 2
+      lenyh = (maxord+1)*nyh
+      lrest = lenyh + 3*n
+      lenrw = 20 + lwmin + lrest
+      iwork(17) = lenrw
+      leniw = 30
+      if (moss .eq. 0 .and. miter .ne. 0 .and. miter .ne. 3)
+     1   leniw = leniw + n + 1
+      iwork(18) = leniw
+      if (lenrw .gt. lrw) go to 617
+      if (leniw .gt. liw) go to 618
+      lia = 31
+      if (moss .eq. 0 .and. miter .ne. 0 .and. miter .ne. 3)
+     1   leniw = leniw + iwork(lia+n) - 1
+      iwork(18) = leniw
+      if (leniw .gt. liw) go to 618
+      lja = lia + n + 1
+      lia = min0(lia,liw)
+      lja = min0(lja,liw)
+      lwm = 21
+      if (istate .eq. 1) nq = 1
+      ncolm = min0(nq+1,maxord+2)
+      lenyhm = ncolm*nyh
+      lenyht = lenyh
+      if (miter .eq. 1 .or. miter .eq. 2) lenyht = lenyhm
+      imul = 2
+      if (istate .eq. 3) imul = moss
+      if (moss .eq. 2) imul = 3
+      lrtem = lenyht + imul*n
+      lwtem = lwmin
+      if (miter .eq. 1 .or. miter .eq. 2) lwtem = lrw - 20 - lrtem
+      lenwk = lwtem
+      lyhn = lwm + lwtem
+      lsavf = lyhn + lenyht
+      lewt = lsavf + n
+      lacor = lewt + n
+      istatc = istate
+      if (istate .eq. 1) go to 100
+c-----------------------------------------------------------------------
+c istate = 3.  move yh to its new location.
+c note that only the part of yh needed for the next step, namely
+c min(nq+1,maxord+2) columns, is actually moved.
+c a temporary error weight array ewt is loaded if moss = 2.
+c sparse matrix processing is done in iprep/prep if miter = 1 or 2.
+c if maxord was reduced below nq, then the pointers are finally set
+c so that savf is identical to yh(*,maxord+2).
+c-----------------------------------------------------------------------
+      lyhd = lyh - lyhn
+      imax = lyhn - 1 + lenyhm
+c move yh.  branch for move right, no move, or move left. --------------
+      if (lyhd) 70,80,74
+ 70   do 72 i = lyhn,imax
+        j = imax + lyhn - i
+ 72     rwork(j) = rwork(j+lyhd)
+      go to 80
+ 74   do 76 i = lyhn,imax
+ 76     rwork(i) = rwork(i+lyhd)
+ 80   lyh = lyhn
+      iwork(22) = lyh
+      if (miter .eq. 0 .or. miter .eq. 3) go to 92
+      if (moss .ne. 2) go to 85
+c temporarily load ewt if miter = 1 or 2 and moss = 2. -----------------
+      CALL ewset (n, itol, RelTol, AbsTol, rwork(lyh), rwork(lewt))
+      do 82 i = 1,n
+        if (rwork(i+lewt-1) .le. 0.0d0) go to 621
+ 82     rwork(i+lewt-1) = 1.0d0/rwork(i+lewt-1)
+ 85   continue
+c iprep and prep do sparse matrix preprocessing if miter = 1 or 2. -----
+      lsavf = min0(lsavf,lrw)
+      lewt = min0(lewt,lrw)
+      lacor = min0(lacor,lrw)
+      CALL iprep (neq, y, rwork, iwork(lia), iwork(lja), ipflag, f, jac)
+      lenrw = lwm - 1 + lenwk + lrest
+      iwork(17) = lenrw
+      if (ipflag .ne. -1) iwork(23) = ipian
+      if (ipflag .ne. -1) iwork(24) = ipjan
+      ipgo = -ipflag + 1
+      go to (90, 628, 629, 630, 631, 632, 633), ipgo
+ 90   iwork(22) = lyh
+      if (lenrw .gt. lrw) go to 617
+c set flag to signal parameter changes to stode. -----------------------
+ 92   jstart = -1
+      if (n .eq. nyh) go to 200
+c neq was reduced.  zero part of yh to avoid undefined references. -----
+      i1 = lyh + l*nyh
+      i2 = lyh + (maxord + 1)*nyh - 1
+      if (i1 .gt. i2) go to 200
+      do 95 i = i1,i2
+ 95     rwork(i) = 0.0d0
+      go to 200
+c-----------------------------------------------------------------------
+c block c.
+c the next block is for the initial CALL only (istate = 1).
+c it contains all remaining initializations, the initial CALL to f,
+c the sparse matrix preprocessing (miter = 1 or 2), and the
+c calculation of the initial step size.
+c the error weights in ewt are inverted after being loaded.
+c-----------------------------------------------------------------------
+ 100  continue
+      lyh = lyhn
+      iwork(22) = lyh
+      tn = t
+      nst = 0
+      h = 1.0d0
+      nnz = 0
+      ngp = 0
+      nzl = 0
+      nzu = 0
+c load the initial value vector in yh. ---------------------------------
+      do 105 i = 1,n
+ 105    rwork(i+lyh-1) = y(i)
+c initial CALL to f.  (lf0 points to yh(*,2).) -------------------------
+      lf0 = lyh + nyh
+      CALL f (neq, t, y, rwork(lf0))
+      nfe = 1
+c load and invert the ewt array.  (h is temporarily set to 1.0.) -------
+      CALL ewset (n, itol, RelTol, AbsTol, rwork(lyh), rwork(lewt))
+      do 110 i = 1,n
+        if (rwork(i+lewt-1) .le. 0.0d0) go to 621
+ 110    rwork(i+lewt-1) = 1.0d0/rwork(i+lewt-1)
+      if (miter .eq. 0 .or. miter .eq. 3) go to 120
+c iprep and prep do sparse matrix preprocessing if miter = 1 or 2. -----
+      lacor = min0(lacor,lrw)
+      CALL iprep (neq, y, rwork, iwork(lia), iwork(lja), ipflag, f, jac)
+      lenrw = lwm - 1 + lenwk + lrest
+      iwork(17) = lenrw
+      if (ipflag .ne. -1) iwork(23) = ipian
+      if (ipflag .ne. -1) iwork(24) = ipjan
+      ipgo = -ipflag + 1
+      go to (115, 628, 629, 630, 631, 632, 633), ipgo
+ 115  iwork(22) = lyh
+      if (lenrw .gt. lrw) go to 617
+c check tcrit for legality (itask = 4 or 5). ---------------------------
+ 120  continue
+      if (itask .ne. 4 .and. itask .ne. 5) go to 125
+      tcrit = rwork(1)
+      if ((tcrit - tout)*(tout - t) .lt. 0.0d0) go to 625
+      if (h0 .ne. 0.0d0 .and. (t + h0 - tcrit)*h0 .gt. 0.0d0)
+     1   h0 = tcrit - t
+c initialize all remaining parameters. ---------------------------------
+ 125  uround = d1mach(4)
+      jstart = 0
+      if (miter .ne. 0) rwork(lwm) = DSQRT(uround)
+      msbj = 50
+      nslj = 0
+      ccmxj = 0.2d0
+      psmall = 1000.0d0*uround
+      rbig = 0.01d0/psmall
+      nhnil = 0
+      nje = 0
+      nlu = 0
+      nslast = 0
+      hu = 0.0d0
+      nqu = 0
+      ccmax = 0.3d0
+      maxcor = 3
+      msbp = 20
+      mxncf = 10
+c-----------------------------------------------------------------------
+c the coding below computes the step size, h0, to be attempted on the
+c first step, unless the user has supplied a value for this.
+c first check that tout - t differs significantly from zero.
+c a scalar tolerance quantity tol is computed, as max(RelTol(i))
+c if this is positive, or max(AbsTol(i)/abs(y(i))) otherwise, adjusted
+c so as to be between 100*uround and 1.0e-3.
+c then the computed value h0 is given by..
+c                                      neq
+c   h0**2 = tol / ( w0**-2 + (1/neq) * sum ( f(i)/ywt(i) )**2  )
+c                                       1
+c where   w0     = max ( abs(t), abs(tout) ),
+c         f(i)   = i-th component of initial value of f,
+c         ywt(i) = ewt(i)/tol  (a weight for y(i)).
+c the sign of h0 is inferred from the initial values of tout and t.
+c-----------------------------------------------------------------------
+      lf0 = lyh + nyh
+      if (h0 .ne. 0.0d0) go to 180
+      tdist = dabs(tout - t)
+      w0 = DMAX1(dabs(t),dabs(tout))
+      if (tdist .lt. 2.0d0*uround*w0) go to 622
+      tol = RelTol(1)
+      if (itol .le. 2) go to 140
+      do 130 i = 1,n
+ 130    tol = DMAX1(tol,RelTol(i))
+ 140  if (tol .gt. 0.0d0) go to 160
+      AbsToli = AbsTol(1)
+      do 150 i = 1,n
+        if (itol .eq. 2 .or. itol .eq. 4) AbsToli = AbsTol(i)
+        ayi = dabs(y(i))
+        if (ayi .ne. 0.0d0) tol = DMAX1(tol,AbsToli/ayi)
+ 150    continue
+ 160  tol = DMAX1(tol,100.0d0*uround)
+      tol = dmin1(tol,0.001d0)
+      sum = vnorm (n, rwork(lf0), rwork(lewt))
+      sum = 1.0d0/(tol*w0*w0) + tol*sum**2
+      h0 = 1.0d0/DSQRT(sum)
+      h0 = dmin1(h0,tdist)
+      h0 = DSIGN(h0,tout-t)
+c adjust h0 if necessary to meet hmax bound. ---------------------------
+ 180  rh = dabs(h0)*hmxi
+      if (rh .gt. 1.0d0) h0 = h0/rh
+c load h with h0 and scale yh(*,2) by h0. ------------------------------
+      h = h0
+      do 190 i = 1,n
+ 190    rwork(i+lf0-1) = h0*rwork(i+lf0-1)
+      go to 270
+c-----------------------------------------------------------------------
+c block d.
+c the next code block is for continuation calls only (istate = 2 or 3)
+c and is to check stop conditions before taking a step.
+c-----------------------------------------------------------------------
+ 200  nslast = nst
+      go to (210, 250, 220, 230, 240), itask
+ 210  if ((tn - tout)*h .lt. 0.0d0) go to 250
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      if (iflag .ne. 0) go to 627
+      t = tout
+      go to 420
+ 220  tp = tn - hu*(1.0d0 + 100.0d0*uround)
+      if ((tp - tout)*h .gt. 0.0d0) go to 623
+      if ((tn - tout)*h .lt. 0.0d0) go to 250
+      go to 400
+ 230  tcrit = rwork(1)
+      if ((tn - tcrit)*h .gt. 0.0d0) go to 624
+      if ((tcrit - tout)*h .lt. 0.0d0) go to 625
+      if ((tn - tout)*h .lt. 0.0d0) go to 245
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      if (iflag .ne. 0) go to 627
+      t = tout
+      go to 420
+ 240  tcrit = rwork(1)
+      if ((tn - tcrit)*h .gt. 0.0d0) go to 624
+ 245  hmx = dabs(tn) + dabs(h)
+      ihit = dabs(tn - tcrit) .le. 100.0d0*uround*hmx
+      if (ihit) go to 400
+      tnext = tn + h*(1.0d0 + 4.0d0*uround)
+      if ((tnext - tcrit)*h .le. 0.0d0) go to 250
+      h = (tcrit - tn)*(1.0d0 - 4.0d0*uround)
+      if (istate .eq. 2) jstart = -2
+c-----------------------------------------------------------------------
+c block e.
+c the next block is normally executed for all calls and contains
+c the CALL to the one-step core integrator stode.
+c
+c this is a looping point for the integration steps.
+c
+c first check for too many steps being taken, update ewt (if not at
+c start of problem), check for too much accuracy being requested, and
+c check for h below the roundoff level in t.
+c-----------------------------------------------------------------------
+ 250  continue
+      if ((nst-nslast) .ge. mxstep) go to 500
+      CALL ewset (n, itol, RelTol, AbsTol, rwork(lyh), rwork(lewt))
+      do 260 i = 1,n
+        if (rwork(i+lewt-1) .le. 0.0d0) go to 510
+ 260    rwork(i+lewt-1) = 1.0d0/rwork(i+lewt-1)
+ 270  tolsf = uround*vnorm (n, rwork(lyh), rwork(lewt))
+      if (tolsf .le. 1.0d0) go to 280
+      tolsf = tolsf*2.0d0
+      if (nst .eq. 0) go to 626
+      go to 520
+ 280  if ((tn + h) .ne. tn) go to 290
+      nhnil = nhnil + 1
+      if (nhnil .gt. mxhnil) go to 290
+      CALL xerrwv(50hlsodes-- warning..internal t (=r1) and h (=r2) are,
+     1   50, 101, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h      such that in the machine, t + h = t on the next step  ,
+     1   60, 101, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      (h = step size). solver will continue anyway,
+     1   50, 101, 0, 0, 0, 0, 2, tn, h)
+      if (nhnil .lt. mxhnil) go to 290
+      CALL xerrwv(50hlsodes-- above warning has been issued i1 times.  ,
+     1   50, 102, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      it will not be issued again for this problem,
+     1   50, 102, 0, 1, mxhnil, 0, 0, 0.0d0, 0.0d0)
+ 290  continue
+c-----------------------------------------------------------------------
+c    CALL stode(neq,y,yh,nyh,yh,ewt,savf,acor,wm,wm,f,jac,prjs,slss)
+c-----------------------------------------------------------------------
+      CALL stode (neq, y, rwork(lyh), nyh, rwork(lyh), rwork(lewt),
+     1   rwork(lsavf), rwork(lacor), rwork(lwm), rwork(lwm),
+     2   f, jac, prjs, slss)
+      kgo = 1 - kflag
+      go to (300, 530, 540, 550), kgo
+c-----------------------------------------------------------------------
+c block f.
+c the following block handles the case of a successful return from the
+c core integrator (kflag = 0).  test for stop conditions.
+c-----------------------------------------------------------------------
+ 300  init = 1
+      go to (310, 400, 330, 340, 350), itask
+c itask = 1.  if tout has been reached, interpolate. -------------------
+ 310  if ((tn - tout)*h .lt. 0.0d0) go to 250
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      t = tout
+      go to 420
+c itask = 3.  jump to exit if tout was reached. ------------------------
+ 330  if ((tn - tout)*h .ge. 0.0d0) go to 400
+      go to 250
+c itask = 4.  see if tout or tcrit was reached.  adjust h if necessary.
+ 340  if ((tn - tout)*h .lt. 0.0d0) go to 345
+      CALL intdy (tout, 0, rwork(lyh), nyh, y, iflag)
+      t = tout
+      go to 420
+ 345  hmx = dabs(tn) + dabs(h)
+      ihit = dabs(tn - tcrit) .le. 100.0d0*uround*hmx
+      if (ihit) go to 400
+      tnext = tn + h*(1.0d0 + 4.0d0*uround)
+      if ((tnext - tcrit)*h .le. 0.0d0) go to 250
+      h = (tcrit - tn)*(1.0d0 - 4.0d0*uround)
+      jstart = -2
+      go to 250
+c itask = 5.  see if tcrit was reached and jump to exit. ---------------
+ 350  hmx = dabs(tn) + dabs(h)
+      ihit = dabs(tn - tcrit) .le. 100.0d0*uround*hmx
+c-----------------------------------------------------------------------
+c block g.
+c the following block handles all successful returns from lsodes.
+c if itask .ne. 1, y is loaded from yh and t is set accordingly.
+c istate is set to 2, the illegal input counter is zeroed, and the
+c optional outputs are loaded into the work arrays before returning.
+c if istate = 1 and tout = t, there is a return with no action taken,
+c except that if this has happened repeatedly, the run is terminated.
+c-----------------------------------------------------------------------
+ 400  do 410 i = 1,n
+ 410    y(i) = rwork(i+lyh-1)
+      t = tn
+      if (itask .ne. 4 .and. itask .ne. 5) go to 420
+      if (ihit) t = tcrit
+ 420  istate = 2
+      illin = 0
+      rwork(11) = hu
+      rwork(12) = h
+      rwork(13) = tn
+      iwork(11) = nst
+      iwork(12) = nfe
+      iwork(13) = nje
+      iwork(14) = nqu
+      iwork(15) = nq
+      iwork(19) = nnz
+      iwork(20) = ngp
+      iwork(21) = nlu
+      iwork(25) = nzl
+      iwork(26) = nzu
+      return
+c
+ 430  ntrep = ntrep + 1
+      if (ntrep .lt. 5) return
+      CALL xerrwv(
+     1  60hlsodes-- repeated calls with istate = 1 and tout = t (=r1)  ,
+     1   60, 301, 0, 0, 0, 0, 1, t, 0.0d0)
+      go to 800
+c-----------------------------------------------------------------------
+c block h.
+c the following block handles all unsuccessful returns other than
+c those for illegal input.  first the error message routine is called.
+c if there was an error test or convergence test failure, imxer is set.
+c then y is loaded from yh, t is set to tn, and the illegal input
+c counter illin is set to 0.  the optional outputs are loaded into
+c the work arrays before returning.
+c-----------------------------------------------------------------------
+c the maximum number of steps was taken before reaching tout. ----------
+ 500  CALL xerrwv(50hlsodes-- at current t (=r1), mxstep (=i1) steps   ,
+     1   50, 201, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      taken on this CALL before reaching tout     ,
+     1   50, 201, 0, 1, mxstep, 0, 1, tn, 0.0d0)
+      istate = -1
+      go to 580
+c ewt(i) .le. 0.0 for some i (not at start of problem). ----------------
+ 510  ewti = rwork(lewt+i-1)
+      CALL xerrwv(50hlsodes-- at t (=r1), ewt(i1) has become r2 .le. 0.,
+     1   50, 202, 0, 1, i, 0, 2, tn, ewti)
+      istate = -6
+      go to 580
+c too much accuracy requested for machine precision. -------------------
+ 520  CALL xerrwv(50hlsodes-- at t (=r1), too much accuracy requested  ,
+     1   50, 203, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      for precision of machine..  see tolsf (=r2) ,
+     1   50, 203, 0, 0, 0, 0, 2, tn, tolsf)
+      rwork(14) = tolsf
+      istate = -2
+      go to 580
+c kflag = -1.  error test failed repeatedly or with abs(h) = hmin. -----
+ 530  CALL xerrwv(50hlsodes-- at t(=r1) and step size h(=r2), the error,
+     1   50, 204, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      test failed repeatedly or with abs(h) = hmin,
+     1   50, 204, 0, 0, 0, 0, 2, tn, h)
+      istate = -4
+      go to 560
+c kflag = -2.  convergence failed repeatedly or with abs(h) = hmin. ----
+ 540  CALL xerrwv(50hlsodes-- at t (=r1) and step size h (=r2), the    ,
+     1   50, 205, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      corrector convergence failed repeatedly     ,
+     1   50, 205, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(30h      or with abs(h) = hmin   ,
+     1   30, 205, 0, 0, 0, 0, 2, tn, h)
+      istate = -5
+      go to 560
+c kflag = -3.  fatal error flag returned by prjs or slss (cdrv). -------
+ 550  CALL xerrwv(50hlsodes-- at t (=r1) and step size h (=r2), a fatal,
+     1   50, 207, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(50h      error flag was returned by cdrv (by way of  ,
+     1   50, 207, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(30h      subroutine prjs or slss),
+     1   30, 207, 0, 0, 0, 0, 2, tn, h)
+      istate = -7
+      go to 580
+c compute imxer if relevant. -------------------------------------------
+ 560  big = 0.0d0
+      imxer = 1
+      do 570 i = 1,n
+        size = dabs(rwork(i+lacor-1)*rwork(i+lewt-1))
+        if (big .ge. size) go to 570
+        big = size
+        imxer = i
+ 570    continue
+      iwork(16) = imxer
+c set y vector, t, illin, and optional outputs. ------------------------
+ 580  do 590 i = 1,n
+ 590    y(i) = rwork(i+lyh-1)
+      t = tn
+      illin = 0
+      rwork(11) = hu
+      rwork(12) = h
+      rwork(13) = tn
+      iwork(11) = nst
+      iwork(12) = nfe
+      iwork(13) = nje
+      iwork(14) = nqu
+      iwork(15) = nq
+      iwork(19) = nnz
+      iwork(20) = ngp
+      iwork(21) = nlu
+      iwork(25) = nzl
+      iwork(26) = nzu
+      return
+c-----------------------------------------------------------------------
+c block i.
+c the following block handles all error returns due to illegal input
+c (istate = -3), as detected before calling the core integrator.
+c first the error message routine is called.  then if there have been
+c 5 consecutive such returns just before this CALL to the solver,
+c the run is halted.
+c-----------------------------------------------------------------------
+ 601  CALL xerrwv(30hlsodes-- istate (=i1) illegal ,
+     1   30, 1, 0, 1, istate, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 602  CALL xerrwv(30hlsodes-- itask (=i1) illegal  ,
+     1   30, 2, 0, 1, itask, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 603  CALL xerrwv(50hlsodes-- istate .gt. 1 but lsodes not initialized ,
+     1   50, 3, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 604  CALL xerrwv(30hlsodes-- neq (=i1) .lt. 1     ,
+     1   30, 4, 0, 1, neq(1), 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 605  CALL xerrwv(50hlsodes-- istate = 3 and neq increased (i1 to i2)  ,
+     1   50, 5, 0, 2, n, neq(1), 0, 0.0d0, 0.0d0)
+      go to 700
+ 606  CALL xerrwv(30hlsodes-- itol (=i1) illegal   ,
+     1   30, 6, 0, 1, itol, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 607  CALL xerrwv(30hlsodes-- iopt (=i1) illegal   ,
+     1   30, 7, 0, 1, iopt, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 608  CALL xerrwv(30hlsodes-- mf (=i1) illegal     ,
+     1   30, 8, 0, 1, mf, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 609  CALL xerrwv(30hlsodes-- seth (=r1) .lt. 0.0  ,
+     1   30, 9, 0, 0, 0, 0, 1, seth, 0.0d0)
+      go to 700
+ 611  CALL xerrwv(30hlsodes-- maxord (=i1) .lt. 0  ,
+     1   30, 11, 0, 1, maxord, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 612  CALL xerrwv(30hlsodes-- mxstep (=i1) .lt. 0  ,
+     1   30, 12, 0, 1, mxstep, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 613  CALL xerrwv(30hlsodes-- mxhnil (=i1) .lt. 0  ,
+     1   30, 13, 0, 1, mxhnil, 0, 0, 0.0d0, 0.0d0)
+      go to 700
+ 614  CALL xerrwv(40hlsodes-- tout (=r1) behind t (=r2)      ,
+     1   40, 14, 0, 0, 0, 0, 2, tout, t)
+      CALL xerrwv(50h      integration direction is given by h0 (=r1)  ,
+     1   50, 14, 0, 0, 0, 0, 1, h0, 0.0d0)
+      go to 700
+ 615  CALL xerrwv(30hlsodes-- hmax (=r1) .lt. 0.0  ,
+     1   30, 15, 0, 0, 0, 0, 1, hmax, 0.0d0)
+      go to 700
+ 616  CALL xerrwv(30hlsodes-- hmin (=r1) .lt. 0.0  ,
+     1   30, 16, 0, 0, 0, 0, 1, hmin, 0.0d0)
+      go to 700
+ 617  CALL xerrwv(50hlsodes-- rwork length is insufficient to proceed. ,
+     1   50, 17, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 17, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 618  CALL xerrwv(50hlsodes-- iwork length is insufficient to proceed. ,
+     1   50, 18, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. leniw (=i1), exceeds liw (=i2),
+     1   60, 18, 0, 2, leniw, liw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 619  CALL xerrwv(40hlsodes-- RelTol(i1) is r1 .lt. 0.0        ,
+     1   40, 19, 0, 1, i, 0, 1, RelToli, 0.0d0)
+      go to 700
+ 620  CALL xerrwv(40hlsodes-- AbsTol(i1) is r1 .lt. 0.0        ,
+     1   40, 20, 0, 1, i, 0, 1, AbsToli, 0.0d0)
+      go to 700
+ 621  ewti = rwork(lewt+i-1)
+      CALL xerrwv(40hlsodes-- ewt(i1) is r1 .le. 0.0         ,
+     1   40, 21, 0, 1, i, 0, 1, ewti, 0.0d0)
+      go to 700
+ 622  CALL xerrwv(
+     1  60hlsodes-- tout (=r1) too close to t(=r2) to start integration,
+     1   60, 22, 0, 0, 0, 0, 2, tout, t)
+      go to 700
+ 623  CALL xerrwv(
+     1  60hlsodes-- itask = i1 and tout (=r1) behind tcur - hu (= r2)  ,
+     1   60, 23, 0, 1, itask, 0, 2, tout, tp)
+      go to 700
+ 624  CALL xerrwv(
+     1  60hlsodes-- itask = 4 or 5 and tcrit (=r1) behind tcur (=r2)   ,
+     1   60, 24, 0, 0, 0, 0, 2, tcrit, tn)
+      go to 700
+ 625  CALL xerrwv(
+     1  60hlsodes-- itask = 4 or 5 and tcrit (=r1) behind tout (=r2)   ,
+     1   60, 25, 0, 0, 0, 0, 2, tcrit, tout)
+      go to 700
+ 626  CALL xerrwv(50hlsodes-- at start of problem, too much accuracy   ,
+     1   50, 26, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h      requested for precision of machine..  see tolsf (=r1) ,
+     1   60, 26, 0, 0, 0, 0, 1, tolsf, 0.0d0)
+      rwork(14) = tolsf
+      go to 700
+ 627  CALL xerrwv(50hlsodes-- trouble from intdy. itask = i1, tout = r1,
+     1   50, 27, 0, 1, itask, 0, 1, tout, 0.0d0)
+      go to 700
+ 628  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine prep).   ,
+     1   60, 28, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 28, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 629  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine jgroup). ,
+     1   60, 29, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 29, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 630  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine odrv).   ,
+     1   60, 30, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 30, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 631  CALL xerrwv(
+     1  60hlsodes-- error from odrv in yale sparse matrix package      ,
+     1   60, 31, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      imul = (iys - 1)/n
+      irem = iys - imul*n
+      CALL xerrwv(
+     1  60h      at t (=r1), odrv returned error flag = i1*neq + i2.   ,
+     1   60, 31, 0, 2, imul, irem, 1, tn, 0.0d0)
+      go to 700
+ 632  CALL xerrwv(
+     1  60hlsodes-- rwork length insufficient (for subroutine cdrv).   ,
+     1   60, 32, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      CALL xerrwv(
+     1  60h        length needed is .ge. lenrw (=i1), exceeds lrw (=i2),
+     1   60, 32, 0, 2, lenrw, lrw, 0, 0.0d0, 0.0d0)
+      go to 700
+ 633  CALL xerrwv(
+     1  60hlsodes-- error from cdrv in yale sparse matrix package      ,
+     1   60, 33, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      imul = (iys - 1)/n
+      irem = iys - imul*n
+      CALL xerrwv(
+     1  60h      at t (=r1), cdrv returned error flag = i1*neq + i2.   ,
+     1   60, 33, 0, 2, imul, irem, 1, tn, 0.0d0)
+      if (imul .eq. 2) CALL xerrwv(
+     1  60h        duplicate entry in sparsity structure descriptors   ,
+     1   60, 33, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      if (imul .eq. 3 .or. imul .eq. 6) CALL xerrwv(
+     1  60h        insufficient storage for nsfc (called by cdrv)      ,
+     1   60, 33, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+c
+ 700  if (illin .eq. 5) go to 710
+      illin = illin + 1
+      istate = -3
+      return
+ 710  CALL xerrwv(50hlsodes-- repeated occurrences of illegal input    ,
+     1   50, 302, 0, 0, 0, 0, 0, 0.0d0, 0.0d0)
+c
+ 800  CALL xerrwv(50hlsodes-- run aborted.. apparent infinite loop     ,
+     1   50, 303, 2, 0, 0, 0, 0, 0.0d0, 0.0d0)
+      return
+c----------------------- end of subroutine lsodes ----------------------
+      end
+      subroutine iprep (neq, y, rwork, ia, ja, ipflag, f, jac)
+clll. optimize
+      external f, jac
+      integer neq, ia, ja, ipflag
+      integer illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     1   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns
+      integer icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     1   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, imax, lewtn, lyhd, lyhn
+      KPP_REAL y, rwork
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL rlss
+      dimension neq(1), y(1), rwork(1), ia(1), ja(1)
+      common /ls0001/ rowns(209),
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     2   illin, init, lyh, lewt, lacor, lsavf, lwm, liwm,
+     3   mxstep, mxhnil, nhnil, ntrep, nslast, nyh, iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ rlss(6),
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c this routine serves as an interface between the driver and
+c subroutine prep.  it is called only if miter is 1 or 2.
+c tasks performed here are..
+c  * CALL prep,
+c  * reset the required wm segment length lenwk,
+c  * move yh back to its final location (following wm in rwork),
+c  * reset pointers for yh, savf, ewt, and acor, and
+c  * move ewt to its new position if istate = 1.
+c ipflag is an output error indication flag.  ipflag = 0 if there was
+c no trouble, and ipflag is the value of the prep error flag ipper
+c if there was trouble in subroutine prep.
+c-----------------------------------------------------------------------
+      ipflag = 0
+c CALL prep to do matrix preprocessing operations. ---------------------
+c      CALL prep (neq, y, rwork(lyh), rwork(lsavf), rwork(lewt),
+c     1   rwork(lacor), ia, ja, rwork(lwm), rwork(lwm), ipflag, f, jac)
+      CALL prep (neq, y, rwork(lyh), rwork(lsavf), rwork(lewt),
+     1   rwork(lacor), ia, ja, rwork(lwm), rwork(lwm), ipflag, f, jac)
+      lenwk = max0(lreq,lwmin)
+      if (ipflag .lt. 0) return
+c if prep was successful, move yh to end of required space for wm. -----
+      lyhn = lwm + lenwk
+      if (lyhn .gt. lyh) return
+      lyhd = lyh - lyhn
+      if (lyhd .eq. 0) go to 20
+      imax = lyhn - 1 + lenyhm
+      do 10 i = lyhn,imax
+ 10     rwork(i) = rwork(i+lyhd)
+      lyh = lyhn
+c reset pointers for savf, ewt, and acor. ------------------------------
+ 20   lsavf = lyh + lenyh
+      lewtn = lsavf + n
+      lacor = lewtn + n
+      if (istatc .eq. 3) go to 40
+c if istate = 1, move ewt (left) to its new position. ------------------
+      if (lewtn .gt. lewt) return
+      do 30 i = 1,n
+ 30     rwork(i+lewtn-1) = rwork(i+lewt-1)
+ 40   lewt = lewtn
+      return
+c----------------------- end of subroutine iprep -----------------------
+      end
+      subroutine slss (wk, iwk, x, tem)
+clll. optimize
+      integer iwk
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i
+      KPP_REAL wk, x, tem
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL rlss
+      KPP_REAL di, hl0, phl0, r
+      dimension wk(*), iwk(*), x(*), tem(*)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ rlss(6),
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c this routine manages the solution of the linear system arising from
+c a chord iteration.  it is called if miter .ne. 0.
+c if miter is 1 or 2, it calls cdrv to accomplish this.
+c if miter = 3 it updates the coefficient h*el0 in the diagonal
+c matrix, and then computes the solution.
+c communication with slss uses the following variables..
+c wk    = real work space containing the inverse diagonal matrix if
+c         miter = 3 and the lu decomposition of the matrix otherwise.
+c         storage of matrix elements starts at wk(3).
+c         wk also contains the following matrix-related data..
+c         wk(1) = sqrt(uround) (not used here),
+c         wk(2) = hl0, the previous value of h*el0, used if miter = 3.
+c iwk   = integer work space for matrix-related data, assumed to
+c         be equivalenced to wk.  in addition, wk(iprsp) and iwk(ipisp)
+c         are assumed to have identical locations.
+c x     = the right-hand side vector on input, and the solution vector
+c         on output, of length n.
+c tem   = vector of work space of length n, not used in this version.
+c iersl = output flag (in common).
+c         iersl = 0  if no trouble occurred.
+c         iersl = -1 if cdrv returned an error flag (miter = 1 or 2).
+c                    this should never occur and is considered fatal.
+c         iersl = 1  if a singular matrix arose with miter = 3.
+c this routine also uses other variables in common.
+c-----------------------------------------------------------------------
+      iersl = 0
+      go to (100, 100, 300), miter
+ 100  CALL cdrv (n,iwk(ipr),iwk(ipc),iwk(ipic),iwk(ipian),iwk(ipjan),
+     1   wk(ipa),x,x,nsp,iwk(ipisp),wk(iprsp),iesp,4,iersl)
+      if (iersl .ne. 0) iersl = -1
+      return
+c
+ 300  phl0 = wk(2)
+      hl0 = h*el0
+      wk(2) = hl0
+      if (hl0 .eq. phl0) go to 330
+      r = hl0/phl0
+      do 320 i = 1,n
+        di = 1.0d0 - r*(1.0d0 - 1.0d0/wk(i+2))
+        if (dabs(di) .eq. 0.0d0) go to 390
+ 320    wk(i+2) = 1.0d0/di
+ 330  do 340 i = 1,n
+ 340    x(i) = wk(i+2)*x(i)
+      return
+ 390  iersl = 1
+      return
+c
+c----------------------- end of subroutine slss ------------------------
+      end
+      subroutine intdy (t, k, yh, nyh, dky, iflag)
+clll. optimize
+      integer k, nyh, iflag
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer i, ic, j, jb, jb2, jj, jj1, jp1
+      KPP_REAL t, yh, dky
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL c, r, s, tp
+      dimension yh(nyh,1), dky(1)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+c-----------------------------------------------------------------------
+c intdy computes interpolated values of the k-th derivative of the
+c dependent variable vector y, and stores it in dky.  this routine
+c is called within the package with k = 0 and t = tout, but may
+c also be called by the user for any k up to the current order.
+c (see detailed instructions in the usage documentation.)
+c-----------------------------------------------------------------------
+c the computed values in dky are gotten by interpolation using the
+c nordsieck history array yh.  this array corresponds uniquely to a
+c vector-valued polynomial of degree nqcur or less, and dky is set
+c to the k-th derivative of this polynomial at t.
+c the formula for dky is..
+c              q
+c  dky(i)  =  sum  c(j,k) * (t - tn)**(j-k) * h**(-j) * yh(i,j+1)
+c             j=k
+c where  c(j,k) = j*(j-1)*...*(j-k+1), q = nqcur, tn = tcur, h = hcur.
+c the quantities  nq = nqcur, l = nq+1, n = neq, tn, and h are
+c communicated by common.  the above sum is done in reverse order.
+c iflag is returned negative if either k or t is out of bounds.
+c-----------------------------------------------------------------------
+      iflag = 0
+      if (k .lt. 0 .or. k .gt. nq) go to 80
+      tp = tn - hu -  100.0d0*uround*(tn + hu)
+      if ((t-tp)*(t-tn) .gt. 0.0d0) go to 90
+c
+      s = (t - tn)/h
+      ic = 1
+      if (k .eq. 0) go to 15
+      jj1 = l - k
+      do 10 jj = jj1,nq
+ 10     ic = ic*jj
+ 15   c = dfloat(ic)
+      do 20 i = 1,n
+ 20     dky(i) = c*yh(i,l)
+      if (k .eq. nq) go to 55
+      jb2 = nq - k
+      do 50 jb = 1,jb2
+        j = nq - jb
+        jp1 = j + 1
+        ic = 1
+        if (k .eq. 0) go to 35
+        jj1 = jp1 - k
+        do 30 jj = jj1,j
+ 30       ic = ic*jj
+ 35     c = dfloat(ic)
+        do 40 i = 1,n
+ 40       dky(i) = c*yh(i,jp1) + s*dky(i)
+ 50     continue
+      if (k .eq. 0) return
+ 55   r = h**(-k)
+      do 60 i = 1,n
+ 60     dky(i) = r*dky(i)
+      return
+c
+ 80   CALL xerrwv(30hintdy--  k (=i1) illegal      ,
+     1   30, 51, 0, 1, k, 0, 0, 0.0d0, 0.0d0)
+      iflag = -1
+      return
+ 90   CALL xerrwv(30hintdy--  t (=r1) illegal      ,
+     1   30, 52, 0, 0, 0, 0, 1, t, 0.0d0)
+      CALL xerrwv(
+     1  60h      t not in interval tcur - hu (= r1) to tcur (=r2)      ,
+     1   60, 52, 0, 0, 0, 0, 2, tp, tn)
+      iflag = -2
+      return
+c----------------------- end of subroutine intdy -----------------------
+      end
+      subroutine prjs (neq,y,yh,nyh,ewt,ftem,savf,wk,iwk,f,jac)
+clll. optimize
+      external f,jac
+      integer neq, nyh, iwk
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, imul, j, jj, jok, jmax, jmin, k, kmax, kmin, ng
+      KPP_REAL JJJ(n,n)
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL con0, conmin, ccmxj, psmall, rbig, seth
+      KPP_REAL con, di, fac, hl0, pij, r, r0, rcon, rcont,
+     1   srur, vnorm
+      dimension neq(*), iwk(*)
+      KPP_REAL y(*), yh(nyh,*), ewt(*), ftem(*), savf(*), wk(*)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ con0, conmin, ccmxj, psmall, rbig, seth,
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c prjs is called to compute and process the matrix
+c p = i - h*el(1)*j , where j is an approximation to the jacobian.
+c j is computed by columns, either by the user-supplied routine jac
+c if miter = 1, or by finite differencing if miter = 2.
+c if miter = 3, a diagonal approximation to j is used.
+c if miter = 1 or 2, and if the existing value of the jacobian
+c (as contained in p) is considered acceptable, then a new value of
+c p is reconstructed from the old value.  in any case, when miter
+c is 1 or 2, the p matrix is subjected to lu decomposition in cdrv.
+c p and its lu decomposition are stored (separately) in wk.
+c
+c in addition to variables described previously, communication
+c with prjs uses the following..
+c y     = array containing predicted values on entry.
+c ftem  = work array of length n (acor in stode).
+c savf  = array containing f evaluated at predicted y.
+c wk    = real work space for matrices.  on output it contains the
+c         inverse diagonal matrix if miter = 3, and p and its sparse
+c         lu decomposition if miter is 1 or 2.
+c         storage of matrix elements starts at wk(3).
+c         wk also contains the following matrix-related data..
+c         wk(1) = sqrt(uround), used in numerical jacobian increments.
+c         wk(2) = h*el0, saved for later use if miter = 3.
+c iwk   = integer work space for matrix-related data, assumed to
+c         be equivalenced to wk.  in addition, wk(iprsp) and iwk(ipisp)
+c         are assumed to have identical locations.
+c el0   = el(1) (input).
+c ierpj = output error flag (in common).
+c       = 0 if no error.
+c       = 1  if zero pivot found in cdrv.
+c       = 2  if a singular matrix arose with miter = 3.
+c       = -1 if insufficient storage for cdrv (should not occur here).
+c       = -2 if other error found in cdrv (should not occur here).
+c jcur  = output flag = 1 to indicate that the jacobian matrix
+c         (or approximation) is now current.
+c this routine also uses other variables in common.
+c-----------------------------------------------------------------------
+      hl0 = h*el0
+      con = -hl0
+      if (miter .eq. 3) go to 300
+c see whether j should be reevaluated (jok = 0) or not (jok = 1). ------
+      jok = 1
+      if (nst .eq. 0 .or. nst .ge. nslj+msbj) jok = 0
+      if (icf .eq. 1 .and. dabs(rc - 1.0d0) .lt. ccmxj) jok = 0
+      if (icf .eq. 2) jok = 0
+      if (jok .eq. 1) go to 250
+c
+c miter = 1 or 2, and the jacobian is to be reevaluated. ---------------
+ 20   jcur = 1
+      nje = nje + 1
+      nslj = nst
+      iplost = 0
+      conmin = dabs(con)
+      go to (100, 200), miter
+c
+c if miter = 1, call jac_chem, multiply by scalar, and add identity. --------
+ 100  continue
+      kmin = iwk(ipian)
+      call jac_chem (neq, tn, y, JJJ, j, iwk(ipian), iwk(ipjan))
+      do 130 j = 1, n
+        kmax = iwk(ipian+j) - 1
+        do 110 i = 1,n
+ 110      ftem(i) = 0.0d0
+C        call jac_chem (neq, tn, y, ftem, j, iwk(ipian), iwk(ipjan))
+        do k=1,n
+          ftem(k) = JJJ(k,j)
+        end do
+        do 120 k = kmin, kmax
+          i = iwk(ibjan+k)
+          wk(iba+k) = ftem(i)*con
+          if (i .eq. j) wk(iba+k) = wk(iba+k) + 1.0d0
+ 120      continue
+        kmin = kmax + 1
+ 130    continue
+      go to 290
+c
+c if miter = 2, make ngp calls to f to approximate j and p. ------------
+ 200  continue
+      fac = vnorm(n, savf, ewt)
+      r0 = 1000.0d0 * dabs(h) * uround * dfloat(n) * fac
+      if (r0 .eq. 0.0d0) r0 = 1.0d0
+      srur = wk(1)
+      jmin = iwk(ipigp)
+      do 240 ng = 1,ngp
+        jmax = iwk(ipigp+ng) - 1
+        do 210 j = jmin,jmax
+          jj = iwk(ibjgp+j)
+          r = DMAX1(srur*dabs(y(jj)),r0/ewt(jj))
+ 210      y(jj) = y(jj) + r
+        CALL f (neq, tn, y, ftem)
+        do 230 j = jmin,jmax
+          jj = iwk(ibjgp+j)
+          y(jj) = yh(jj,1)
+          r = DMAX1(srur*dabs(y(jj)),r0/ewt(jj))
+          fac = -hl0/r
+          kmin =iwk(ibian+jj)
+          kmax =iwk(ibian+jj+1) - 1
+          do 220 k = kmin,kmax
+            i = iwk(ibjan+k)
+            wk(iba+k) = (ftem(i) - savf(i))*fac
+            if (i .eq. jj) wk(iba+k) = wk(iba+k) + 1.0d0
+ 220        continue
+ 230      continue
+        jmin = jmax + 1
+ 240    continue
+      nfe = nfe + ngp
+      go to 290
+c
+c if jok = 1, reconstruct new p from old p. ----------------------------
+ 250  jcur = 0
+      rcon = con/con0
+      rcont = dabs(con)/conmin
+      if (rcont .gt. rbig .and. iplost .eq. 1) go to 20
+      kmin = iwk(ipian)
+      do 275 j = 1,n
+        kmax = iwk(ipian+j) - 1
+        do 270 k = kmin,kmax
+          i = iwk(ibjan+k)
+          pij = wk(iba+k)
+          if (i .ne. j) go to 260
+          pij = pij - 1.0d0
+          if (dabs(pij) .ge. psmall) go to 260
+            iplost = 1
+            conmin = dmin1(dabs(con0),conmin)
+ 260      pij = pij*rcon
+          if (i .eq. j) pij = pij + 1.0d0
+          wk(iba+k) = pij
+ 270      continue
+        kmin = kmax + 1
+ 275    continue
+c
+c do numerical factorization of p matrix. ------------------------------
+ 290  nlu = nlu + 1
+      con0 = con
+      ierpj = 0
+      do 295 i = 1,n
+ 295    ftem(i) = 0.0d0
+      CALL cdrv (n,iwk(ipr),iwk(ipc),iwk(ipic),iwk(ipian),iwk(ipjan),
+     1   wk(ipa),ftem,ftem,nsp,iwk(ipisp),wk(iprsp),iesp,2,iys)
+      if (iys .eq. 0) return
+      imul = (iys - 1)/n
+      ierpj = -2
+      if (imul .eq. 8) ierpj = 1
+      if (imul .eq. 10) ierpj = -1
+      return
+c
+c if miter = 3, construct a diagonal approximation to j and p. ---------
+ 300  continue
+      jcur = 1
+      nje = nje + 1
+      wk(2) = hl0
+      ierpj = 0
+      r = el0*0.1d0
+      do 310 i = 1,n
+ 310    y(i) = y(i) + r*(h*savf(i) - yh(i,2))
+      CALL f (neq, tn, y, wk(3))
+      nfe = nfe + 1
+      do 320 i = 1,n
+        r0 = h*savf(i) - yh(i,2)
+        di = 0.1d0*r0 - h*(wk(i+2) - savf(i))
+        wk(i+2) = 1.0d0
+        if (dabs(r0) .lt. uround/ewt(i)) go to 320
+        if (dabs(di) .eq. 0.0d0) go to 330
+        wk(i+2) = 0.1d0*r0/di
+ 320    continue
+      return
+ 330  ierpj = 2
+      return
+c----------------------- end of subroutine prjs ------------------------
+      end
+      subroutine stode (neq, y, yh, nyh, yh1, ewt, savf, acor,
+     1   wm, iwm, f, jac, pjac, slvs)
+clll. optimize
+      external f, jac, pjac, slvs
+      integer neq, nyh, iwm
+      integer iownd, ialth, ipup, lmax, meo, nqnyh, nslp,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer i, i1, iredo, iret, j, jb, m, ncf, newq
+      KPP_REAL y, yh, yh1, ewt, savf, acor, wm
+      KPP_REAL conit, crate, el, elco, hold, rmax, tesco,
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL dcon, ddn, del, delp, dsm, dup, exdn, exsm, exup,
+     1   r, rh, rhdn, rhsm, rhup, told, vnorm
+      dimension neq(*), y(*), yh(nyh,*), yh1(*), ewt(*), savf(*),
+     1   acor(*), wm(*), iwm(*)
+      common /ls0001/ conit, crate, el(13), elco(13,12),
+     1   hold, rmax, tesco(3,12),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround, iownd(14),
+     3   ialth, ipup, lmax, meo, nqnyh, nslp,
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+c-----------------------------------------------------------------------
+c stode performs one step of the integration of an initial value
+c problem for a system of ordinary differential equations.
+c note.. stode is independent of the value of the iteration method
+c indicator miter, when this is .ne. 0, and hence is independent
+c of the type of chord method used, or the jacobian structure.
+c communication with stode is done with the following variables..
+c
+c neq    = integer array containing problem size in neq(1), and
+c          passed as the neq argument in all calls to f and jac.
+c y      = an array of length .ge. n used as the y argument in
+c          all calls to f and jac.
+c yh     = an nyh by lmax array containing the dependent variables
+c          and their approximate scaled derivatives, where
+c          lmax = maxord + 1.  yh(i,j+1) contains the approximate
+c          j-th derivative of y(i), scaled by h**j/factorial(j)
+c          (j = 0,1,...,nq).  on entry for the first step, the first
+c          two columns of yh must be set from the initial values.
+c nyh    = a constant integer .ge. n, the first dimension of yh.
+c yh1    = a one-dimensional array occupying the same space as yh.
+c ewt    = an array of length n containing multiplicative weights
+c          for local error measurements.  local errors in y(i) are
+c          compared to 1.0/ewt(i) in various error tests.
+c savf   = an array of working storage, of length n.
+c          also used for input of yh(*,maxord+2) when jstart = -1
+c          and maxord .lt. the current order nq.
+c acor   = a work array of length n, used for the accumulated
+c          corrections.  on a successful return, acor(i) contains
+c          the estimated one-step local error in y(i).
+c wm,iwm = real and integer work arrays associated with matrix
+c          operations in chord iteration (miter .ne. 0).
+c pjac   = name of routine to evaluate and preprocess jacobian matrix
+c          and p = i - h*el0*jac, if a chord method is being used.
+c slvs   = name of routine to solve linear system in chord iteration.
+c ccmax  = maximum relative change in h*el0 before pjac is called.
+c h      = the step size to be attempted on the next step.
+c          h is altered by the error control algorithm during the
+c          problem.  h can be either positive or negative, but its
+c          sign must remain constant throughout the problem.
+c hmin   = the minimum absolute value of the step size h to be used.
+c hmxi   = inverse of the maximum absolute value of h to be used.
+c          hmxi = 0.0 is allowed and corresponds to an infinite hmax.
+c          hmin and hmxi may be changed at any time, but will not
+c          take effect until the next change of h is considered.
+c tn     = the independent variable. tn is updated on each step taken.
+c jstart = an integer used for input only, with the following
+c          values and meanings..
+c               0  perform the first step.
+c           .gt.0  take a new step continuing from the last.
+c              -1  take the next step with a new value of h, maxord,
+c                    n, meth, miter, and/or matrix parameters.
+c              -2  take the next step with a new value of h,
+c                    but with other inputs unchanged.
+c          on return, jstart is set to 1 to facilitate continuation.
+c kflag  = a completion code with the following meanings..
+c               0  the step was succesful.
+c              -1  the requested error could not be achieved.
+c              -2  corrector convergence could not be achieved.
+c              -3  fatal error in pjac or slvs.
+c          a return with kflag = -1 or -2 means either
+c          abs(h) = hmin or 10 consecutive failures occurred.
+c          on a return with kflag negative, the values of tn and
+c          the yh array are as of the beginning of the last
+c          step, and h is the last step size attempted.
+c maxord = the maximum order of integration method to be allowed.
+c maxcor = the maximum number of corrector iterations allowed.
+c msbp   = maximum number of steps between pjac calls (miter .gt. 0).
+c mxncf  = maximum number of convergence failures allowed.
+c meth/miter = the method flags.  see description in driver.
+c n      = the number of first-order differential equations.
+c-----------------------------------------------------------------------
+      kflag = 0
+      told = tn
+      ncf = 0
+      ierpj = 0
+      iersl = 0
+      jcur = 0
+      icf = 0
+      delp = 0.0d0
+      if (jstart .gt. 0) go to 200
+      if (jstart .eq. -1) go to 100
+      if (jstart .eq. -2) go to 160
+c-----------------------------------------------------------------------
+c on the first call, the order is set to 1, and other variables are
+c initialized.  rmax is the maximum ratio by which h can be increased
+c in a single step.  it is initially 1.e4 to compensate for the small
+c initial h, but then is normally equal to 10.  if a failure
+c occurs (in corrector convergence or error test), rmax is set at 2
+c for the next increase.
+c-----------------------------------------------------------------------
+      lmax = maxord + 1
+      nq = 1
+      l = 2
+      ialth = 2
+      rmax = 10000.0d0
+      rc = 0.0d0
+      el0 = 1.0d0
+      crate = 0.7d0
+      hold = h
+      meo = meth
+      nslp = 0
+      ipup = miter
+      iret = 3
+      go to 140
+c-----------------------------------------------------------------------
+c the following block handles preliminaries needed when jstart = -1.
+c ipup is set to miter to force a matrix update.
+c if an order increase is about to be considered (ialth = 1),
+c ialth is reset to 2 to postpone consideration one more step.
+c if the caller has changed meth, cfode is called to reset
+c the coefficients of the method.
+c if the caller has changed maxord to a value less than the current
+c order nq, nq is reduced to maxord, and a new h chosen accordingly.
+c if h is to be changed, yh must be rescaled.
+c if h or meth is being changed, ialth is reset to l = nq + 1
+c to prevent further changes in h for that many steps.
+c-----------------------------------------------------------------------
+ 100  ipup = miter
+      lmax = maxord + 1
+      if (ialth .eq. 1) ialth = 2
+      if (meth .eq. meo) go to 110
+      CALL cfode (meth, elco, tesco)
+      meo = meth
+      if (nq .gt. maxord) go to 120
+      ialth = l
+      iret = 1
+      go to 150
+ 110  if (nq .le. maxord) go to 160
+ 120  nq = maxord
+      l = lmax
+      do 125 i = 1,l
+ 125    el(i) = elco(i,nq)
+      nqnyh = nq*nyh
+      rc = rc*el(1)/el0
+      el0 = el(1)
+      conit = 0.5d0/dfloat(nq+2)
+      ddn = vnorm (n, savf, ewt)/tesco(1,l)
+      exdn = 1.0d0/dfloat(l)
+      rhdn = 1.0d0/(1.3d0*ddn**exdn + 0.0000013d0)
+      rh = dmin1(rhdn,1.0d0)
+      iredo = 3
+      if (h .eq. hold) go to 170
+      rh = dmin1(rh,dabs(h/hold))
+      h = hold
+      go to 175
+c-----------------------------------------------------------------------
+c cfode is called to get all the integration coefficients for the
+c current meth.  then the el vector and related constants are reset
+c whenever the order nq is changed, or at the start of the problem.
+c-----------------------------------------------------------------------
+ 140  CALL cfode (meth, elco, tesco)
+ 150  do 155 i = 1,l
+ 155    el(i) = elco(i,nq)
+      nqnyh = nq*nyh
+      rc = rc*el(1)/el0
+      el0 = el(1)
+      conit = 0.5d0/dfloat(nq+2)
+      go to (160, 170, 200), iret
+c-----------------------------------------------------------------------
+c if h is being changed, the h ratio rh is checked against
+c rmax, hmin, and hmxi, and the yh array rescaled.  ialth is set to
+c l = nq + 1 to prevent a change of h for that many steps, unless
+c forced by a convergence or error test failure.
+c-----------------------------------------------------------------------
+ 160  if (h .eq. hold) go to 200
+      rh = h/hold
+      h = hold
+      iredo = 3
+      go to 175
+ 170  rh = DMAX1(rh,hmin/dabs(h))
+ 175  rh = dmin1(rh,rmax)
+      rh = rh/DMAX1(1.0d0,dabs(h)*hmxi*rh)
+      r = 1.0d0
+      do 180 j = 2,l
+        r = r*rh
+        do 180 i = 1,n
+ 180      yh(i,j) = yh(i,j)*r
+      h = h*rh
+      rc = rc*rh
+      ialth = l
+      if (iredo .eq. 0) go to 690
+c-----------------------------------------------------------------------
+c this section computes the predicted values by effectively
+c multiplying the yh array by the pascal triangle matrix.
+c rc is the ratio of new to old values of the coefficient  h*el(1).
+c when rc differs from 1 by more than ccmax, ipup is set to miter
+c to force pjac to be called, if a jacobian is involved.
+c in any case, pjac is called at least every msbp steps.
+c-----------------------------------------------------------------------
+ 200  if (dabs(rc-1.0d0) .gt. ccmax) ipup = miter
+      if (nst .ge. nslp+msbp) ipup = miter
+      tn = tn + h
+      i1 = nqnyh + 1
+      do 215 jb = 1,nq
+        i1 = i1 - nyh
+cdir$ ivdep
+        do 210 i = i1,nqnyh
+ 210      yh1(i) = yh1(i) + yh1(i+nyh)
+ 215    continue
+c-----------------------------------------------------------------------
+c up to maxcor corrector iterations are taken.  a convergence test is
+c made on the r.m.s. norm of each correction, weighted by the error
+c weight vector ewt.  the sum of the corrections is accumulated in the
+c vector acor(i).  the yh array is not altered in the corrector loop.
+c-----------------------------------------------------------------------
+ 220  m = 0
+      do 230 i = 1,n
+ 230    y(i) = yh(i,1)
+      CALL f (neq, tn, y, savf)
+      nfe = nfe + 1
+      if (ipup .le. 0) go to 250
+c-----------------------------------------------------------------------
+c if indicated, the matrix p = i - h*el(1)*j is reevaluated and
+c preprocessed before starting the corrector iteration.  ipup is set
+c to 0 as an indicator that this has been done.
+c-----------------------------------------------------------------------
+      CALL pjac (neq, y, yh, nyh, ewt, acor, savf, wm, iwm, f, jac)
+      ipup = 0
+      rc = 1.0d0
+      nslp = nst
+      crate = 0.7d0
+      if (ierpj .ne. 0) go to 430
+ 250  do 260 i = 1,n
+ 260    acor(i) = 0.0d0
+ 270  if (miter .ne. 0) go to 350
+c-----------------------------------------------------------------------
+c in the case of functional iteration, update y directly from
+c the result of the last function evaluation.
+c-----------------------------------------------------------------------
+      do 290 i = 1,n
+        savf(i) = h*savf(i) - yh(i,2)
+ 290    y(i) = savf(i) - acor(i)
+      del = vnorm (n, y, ewt)
+      do 300 i = 1,n
+        y(i) = yh(i,1) + el(1)*savf(i)
+ 300    acor(i) = savf(i)
+      go to 400
+c-----------------------------------------------------------------------
+c in the case of the chord method, compute the corrector error,
+c and solve the linear system with that as right-hand side and
+c p as coefficient matrix.
+c-----------------------------------------------------------------------
+ 350  do 360 i = 1,n
+ 360    y(i) = h*savf(i) - (yh(i,2) + acor(i))
+      CALL slvs (wm, iwm, y, savf)
+      if (iersl .lt. 0) go to 430
+      if (iersl .gt. 0) go to 410
+      del = vnorm (n, y, ewt)
+      do 380 i = 1,n
+        acor(i) = acor(i) + y(i)
+ 380    y(i) = yh(i,1) + el(1)*acor(i)
+c-----------------------------------------------------------------------
+c test for convergence.  if m.gt.0, an estimate of the convergence
+c rate constant is stored in crate, and this is used in the test.
+c-----------------------------------------------------------------------
+ 400  if (m .ne. 0) crate = DMAX1(0.2d0*crate,del/delp)
+      dcon = del*dmin1(1.0d0,1.5d0*crate)/(tesco(2,nq)*conit)
+      if (dcon .le. 1.0d0) go to 450
+      m = m + 1
+      if (m .eq. maxcor) go to 410
+      if (m .ge. 2 .and. del .gt. 2.0d0*delp) go to 410
+      delp = del
+      CALL f (neq, tn, y, savf)
+      nfe = nfe + 1
+      go to 270
+c-----------------------------------------------------------------------
+c the corrector iteration failed to converge.
+c if miter .ne. 0 and the jacobian is out of date, pjac is called for
+c the next try.  otherwise the yh array is retracted to its values
+c before prediction, and h is reduced, if possible.  if h cannot be
+c reduced or mxncf failures have occurred, exit with kflag = -2.
+c-----------------------------------------------------------------------
+ 410  if (miter .eq. 0 .or. jcur .eq. 1) go to 430
+      icf = 1
+      ipup = miter
+      go to 220
+ 430  icf = 2
+      ncf = ncf + 1
+      rmax = 2.0d0
+      tn = told
+      i1 = nqnyh + 1
+      do 445 jb = 1,nq
+        i1 = i1 - nyh
+cdir$ ivdep
+        do 440 i = i1,nqnyh
+ 440      yh1(i) = yh1(i) - yh1(i+nyh)
+ 445    continue
+      if (ierpj .lt. 0 .or. iersl .lt. 0) go to 680
+      if (dabs(h) .le. hmin*1.00001d0) go to 670
+      if (ncf .eq. mxncf) go to 670
+      rh = 0.25d0
+      ipup = miter
+      iredo = 1
+      go to 170
+c-----------------------------------------------------------------------
+c the corrector has converged.  jcur is set to 0
+c to signal that the jacobian involved may need updating later.
+c the local error test is made and control passes to statement 500
+c if it fails.
+c-----------------------------------------------------------------------
+ 450  jcur = 0
+      if (m .eq. 0) dsm = del/tesco(2,nq)
+      if (m .gt. 0) dsm = vnorm (n, acor, ewt)/tesco(2,nq)
+      if (dsm .gt. 1.0d0) go to 500
+c-----------------------------------------------------------------------
+c after a successful step, update the yh array.
+c consider changing h if ialth = 1.  otherwise decrease ialth by 1.
+c if ialth is then 1 and nq .lt. maxord, then acor is saved for
+c use in a possible order increase on the next step.
+c if a change in h is considered, an increase or decrease in order
+c by one is considered also.  a change in h is made only if it is by a
+c factor of at least 1.1.  if not, ialth is set to 3 to prevent
+c testing for that many steps.
+c-----------------------------------------------------------------------
+      kflag = 0
+      iredo = 0
+      nst = nst + 1
+      hu = h
+      nqu = nq
+      do 470 j = 1,l
+        do 470 i = 1,n
+ 470      yh(i,j) = yh(i,j) + el(j)*acor(i)
+      ialth = ialth - 1
+      if (ialth .eq. 0) go to 520
+      if (ialth .gt. 1) go to 700
+      if (l .eq. lmax) go to 700
+      do 490 i = 1,n
+ 490    yh(i,lmax) = acor(i)
+      go to 700
+c-----------------------------------------------------------------------
+c the error test failed.  kflag keeps track of multiple failures.
+c restore tn and the yh array to their previous values, and prepare
+c to try the step again.  compute the optimum step size for this or
+c one lower order.  after 2 or more failures, h is forced to decrease
+c by a factor of 0.2 or less.
+c-----------------------------------------------------------------------
+ 500  kflag = kflag - 1
+      tn = told
+      i1 = nqnyh + 1
+      do 515 jb = 1,nq
+        i1 = i1 - nyh
+cdir$ ivdep
+        do 510 i = i1,nqnyh
+ 510      yh1(i) = yh1(i) - yh1(i+nyh)
+ 515    continue
+      rmax = 2.0d0
+      if (dabs(h) .le. hmin*1.00001d0) go to 660
+      if (kflag .le. -3) go to 640
+      iredo = 2
+      rhup = 0.0d0
+      go to 540
+c-----------------------------------------------------------------------
+c regardless of the success or failure of the step, factors
+c rhdn, rhsm, and rhup are computed, by which h could be multiplied
+c at order nq - 1, order nq, or order nq + 1, respectively.
+c in the case of failure, rhup = 0.0 to avoid an order increase.
+c the largest of these is determined and the new order chosen
+c accordingly.  if the order is to be increased, we compute one
+c additional scaled derivative.
+c-----------------------------------------------------------------------
+ 520  rhup = 0.0d0
+      if (l .eq. lmax) go to 540
+      do 530 i = 1,n
+ 530    savf(i) = acor(i) - yh(i,lmax)
+      dup = vnorm (n, savf, ewt)/tesco(3,nq)
+      exup = 1.0d0/dfloat(l+1)
+      rhup = 1.0d0/(1.4d0*dup**exup + 0.0000014d0)
+ 540  exsm = 1.0d0/dfloat(l)
+      rhsm = 1.0d0/(1.2d0*dsm**exsm + 0.0000012d0)
+      rhdn = 0.0d0
+      if (nq .eq. 1) go to 560
+      ddn = vnorm (n, yh(1,l), ewt)/tesco(1,nq)
+      exdn = 1.0d0/dfloat(nq)
+      rhdn = 1.0d0/(1.3d0*ddn**exdn + 0.0000013d0)
+ 560  if (rhsm .ge. rhup) go to 570
+      if (rhup .gt. rhdn) go to 590
+      go to 580
+ 570  if (rhsm .lt. rhdn) go to 580
+      newq = nq
+      rh = rhsm
+      go to 620
+ 580  newq = nq - 1
+      rh = rhdn
+      if (kflag .lt. 0 .and. rh .gt. 1.0d0) rh = 1.0d0
+      go to 620
+ 590  newq = l
+      rh = rhup
+      if (rh .lt. 1.1d0) go to 610
+      r = el(l)/dfloat(l)
+      do 600 i = 1,n
+ 600    yh(i,newq+1) = acor(i)*r
+      go to 630
+ 610  ialth = 3
+      go to 700
+ 620  if ((kflag .eq. 0) .and. (rh .lt. 1.1d0)) go to 610
+      if (kflag .le. -2) rh = dmin1(rh,0.2d0)
+c-----------------------------------------------------------------------
+c if there is a change of order, reset nq, l, and the coefficients.
+c in any case h is reset according to rh and the yh array is rescaled.
+c then exit from 690 if the step was ok, or redo the step otherwise.
+c-----------------------------------------------------------------------
+      if (newq .eq. nq) go to 170
+ 630  nq = newq
+      l = nq + 1
+      iret = 2
+      go to 150
+c-----------------------------------------------------------------------
+c control reaches this section if 3 or more failures have occured.
+c if 10 failures have occurred, exit with kflag = -1.
+c it is assumed that the derivatives that have accumulated in the
+c yh array have errors of the wrong order.  hence the first
+c derivative is recomputed, and the order is set to 1.  then
+c h is reduced by a factor of 10, and the step is retried,
+c until it succeeds or h reaches hmin.
+c-----------------------------------------------------------------------
+ 640  if (kflag .eq. -10) go to 660
+      rh = 0.1d0
+      rh = DMAX1(hmin/dabs(h),rh)
+      h = h*rh
+      do 645 i = 1,n
+ 645    y(i) = yh(i,1)
+      CALL f (neq, tn, y, savf)
+      nfe = nfe + 1
+      do 650 i = 1,n
+ 650    yh(i,2) = h*savf(i)
+      ipup = miter
+      ialth = 5
+      if (nq .eq. 1) go to 200
+      nq = 1
+      l = 2
+      iret = 3
+      go to 150
+c-----------------------------------------------------------------------
+c all returns are made through this section.  h is saved in hold
+c to allow the caller to change h on the next step.
+c-----------------------------------------------------------------------
+ 660  kflag = -1
+      go to 720
+ 670  kflag = -2
+      go to 720
+ 680  kflag = -3
+      go to 720
+ 690  rmax = 10.0d0
+ 700  r = 1.0d0/tesco(2,nqu)
+      do 710 i = 1,n
+ 710    acor(i) = acor(i)*r
+ 720  hold = h
+      jstart = 1
+      return
+c----------------------- end of subroutine stode -----------------------
+      end
+      subroutine xerrwv (msg, nmes, nerr, level, ni, i1, i2, nr, r1, r2)
+      integer msg, nmes, nerr, level, ni, i1, i2, nr,
+     1   i, lun, lunit, mesflg, ncpw, nch, nwds
+      KPP_REAL r1, r2
+      dimension msg(nmes)
+c-----------------------------------------------------------------------
+c subroutines xerrwv, xsetf, and xsetun, as given here, constitute
+c a simplified version of the slatec error handling package.
+c written by a. c. hindmarsh at llnl.  version of march 30, 1987.
+c this version is in KPP_REAL.
+c
+c all arguments are input arguments.
+c
+c msg    = the message (hollerith literal or integer array).
+c nmes   = the length of msg (number of characters).
+c nerr   = the error number (not used).
+c level  = the error level..
+c          0 or 1 means recoverable (control returns to caller).
+c          2 means fatal (run is aborted--see note below).
+c ni     = number of integers (0, 1, or 2) to be printed with message.
+c i1,i2  = integers to be printed, depending on ni.
+c nr     = number of reals (0, 1, or 2) to be printed with message.
+c r1,r2  = reals to be printed, depending on nr.
+c
+c note..  this routine is machine-dependent and specialized for use
+c in limited context, in the following ways..
+c 1. the number of hollerith characters stored per word, denoted
+c    by ncpw below, is a data-loaded constant.
+c 2. the value of nmes is assumed to be at most 60.
+c    (multi-line messages are generated by repeated calls.)
+c 3. if level = 2, control passes to the statement   stop
+c    to abort the run.  this statement may be machine-dependent.
+c 4. r1 and r2 are assumed to be in KPP_REAL and are printed
+c    in d21.13 format.
+c 5. the common block /eh0001/ below is data-loaded (a machine-
+c    dependent feature) with default values.
+c    this block is needed for proper retention of parameters used by
+c    this routine which the user can reset by calling xsetf or xsetun.
+c    the variables in this block are as follows..
+c       mesflg = print control flag..
+c                1 means print all messages (the default).
+c                0 means no printing.
+c       lunit  = logical unit number for messages.
+c                the default is 6 (machine-dependent).
+c-----------------------------------------------------------------------
+c the following are instructions for installing this routine
+c in different machine environments.
+c
+c to change the default output unit, change the data statement
+c in the block data subprogram below.
+c
+c for a different number of characters per word, change the
+c data statement setting ncpw below, and format 10.  alternatives for
+c various computers are shown in comment cards.
+c
+c for a different run-abort command, change the statement following
+c statement 100 at the end.
+c-----------------------------------------------------------------------
+      common /eh0001/ mesflg, lunit
+c-----------------------------------------------------------------------
+c the following data-loaded value of ncpw is valid for the cdc-6600
+c and cdc-7600 computers.
+c     data ncpw/10/
+c the following is valid for the cray-1 computer.
+c     data ncpw/8/
+c the following is valid for the burroughs 6700 and 7800 computers.
+c     data ncpw/6/
+c the following is valid for the pdp-10 computer.
+c     data ncpw/5/
+c the following is valid for the vax computer with 4 bytes per integer,
+c and for the ibm-360, ibm-370, ibm-303x, and ibm-43xx computers.
+      data ncpw/4/
+c the following is valid for the pdp-11, or vax with 2-byte integers.
+c     data ncpw/2/
+c-----------------------------------------------------------------------
+      if (mesflg .eq. 0) go to 100
+c get logical unit number. ---------------------------------------------
+      lun = lunit
+c get number of words in message. --------------------------------------
+      nch = min0(nmes,60)
+      nwds = nch/ncpw
+      if (nch .ne. nwds*ncpw) nwds = nwds + 1
+c write the message. ---------------------------------------------------
+      write (lun, 10) (msg(i),i=1,nwds)
+c-----------------------------------------------------------------------
+c the following format statement is to have the form
+c 10  format(1x,mmann)
+c where nn = ncpw and mm is the smallest integer .ge. 60/ncpw.
+c the following is valid for ncpw = 10.
+c 10  format(1x,6a10)
+c the following is valid for ncpw = 8.
+c 10  format(1x,8a8)
+c the following is valid for ncpw = 6.
+c 10  format(1x,10a6)
+c the following is valid for ncpw = 5.
+c 10  format(1x,12a5)
+c the following is valid for ncpw = 4.
+  10  format(1x,15a4)
+c the following is valid for ncpw = 2.
+c 10  format(1x,30a2)
+c-----------------------------------------------------------------------
+      if (ni .eq. 1) write (lun, 20) i1
+ 20   format(6x,23hin above message,  i1 =,i10)
+      if (ni .eq. 2) write (lun, 30) i1,i2
+ 30   format(6x,23hin above message,  i1 =,i10,3x,4hi2 =,i10)
+      if (nr .eq. 1) write (lun, 40) r1
+ 40   format(6x,23hin above message,  r1 =,d21.13)
+      if (nr .eq. 2) write (lun, 50) r1,r2
+ 50   format(6x,15hin above,  r1 =,d21.13,3x,4hr2 =,d21.13)
+c abort the run if level = 2. ------------------------------------------
+ 100  if (level .ne. 2) return
+      stop
+c----------------------- end of subroutine xerrwv ----------------------
+      end
+      KPP_REAL function vnorm (n, v, w)
+clll. optimize
+c-----------------------------------------------------------------------
+c this function routine computes the weighted root-mean-square norm
+c of the vector of length n contained in the array v, with weights
+c contained in the array w of length n..
+c   vnorm = sqrt( (1/n) * sum( v(i)*w(i) )**2 )
+c-----------------------------------------------------------------------
+      integer n,   i
+      KPP_REAL v, w,   sum
+      dimension v(n), w(n)
+      sum = 0.0d0
+      do 10 i = 1,n
+ 10     sum = sum + (v(i)*w(i))**2
+      vnorm = DSQRT(sum/dfloat(n))
+      return
+c----------------------- end of function vnorm -------------------------
+      end
+      subroutine ewset (n, itol, RelTol, AbsTol, ycur, ewt)
+clll. optimize
+c-----------------------------------------------------------------------
+c this subroutine sets the error weight vector ewt according to
+c     ewt(i) = RelTol(i)*abs(ycur(i)) + AbsTol(i),  i = 1,...,n,
+c with the subscript on RelTol and/or AbsTol possibly replaced by 1 above,
+c depending on the value of itol.
+c-----------------------------------------------------------------------
+      integer n, itol
+      integer i
+      KPP_REAL RelTol, AbsTol, ycur, ewt
+      dimension RelTol(1), AbsTol(1), ycur(n), ewt(n)
+c
+      go to (10, 20, 30, 40), itol
+ 10   continue
+      do 15 i = 1,n
+ 15     ewt(i) = RelTol(1)*dabs(ycur(i)) + AbsTol(1)
+      return
+ 20   continue
+      do 25 i = 1,n
+ 25     ewt(i) = RelTol(1)*dabs(ycur(i)) + AbsTol(i)
+      return
+ 30   continue
+      do 35 i = 1,n
+ 35     ewt(i) = RelTol(i)*dabs(ycur(i)) + AbsTol(1)
+      return
+ 40   continue
+      do 45 i = 1,n
+ 45     ewt(i) = RelTol(i)*dabs(ycur(i)) + AbsTol(i)
+      return
+c----------------------- end of subroutine ewset -----------------------
+      end
+      subroutine cfode (meth, elco, tesco)
+clll. optimize
+      integer meth
+      integer i, ib, nq, nqm1, nqp1
+      KPP_REAL elco, tesco
+      KPP_REAL agamq, fnq, fnqm1, pc, pint, ragq,
+     1   rqfac, rq1fac, tsign, xpin
+      dimension elco(13,12), tesco(3,12)
+c-----------------------------------------------------------------------
+c cfode is called by the integrator routine to set coefficients
+c needed there.  the coefficients for the current method, as
+c given by the value of meth, are set for all orders and saved.
+c the maximum order assumed here is 12 if meth = 1 and 5 if meth = 2.
+c (a smaller value of the maximum order is also allowed.)
+c cfode is called once at the beginning of the problem,
+c and is not called again unless and until meth is changed.
+c
+c the elco array contains the basic method coefficients.
+c the coefficients el(i), 1 .le. i .le. nq+1, for the method of
+c order nq are stored in elco(i,nq).  they are given by a genetrating
+c polynomial, i.e.,
+c     l(x) = el(1) + el(2)*x + ... + el(nq+1)*x**nq.
+c for the implicit adams methods, l(x) is given by
+c     dl/dx = (x+1)*(x+2)*...*(x+nq-1)/factorial(nq-1),    l(-1) = 0.
+c for the bdf methods, l(x) is given by
+c     l(x) = (x+1)*(x+2)* ... *(x+nq)/k,
+c where         k = factorial(nq)*(1 + 1/2 + ... + 1/nq).
+c
+c the tesco array contains test constants used for the
+c local error test and the selection of step size and/or order.
+c at order nq, tesco(k,nq) is used for the selection of step
+c size at order nq - 1 if k = 1, at order nq if k = 2, and at order
+c nq + 1 if k = 3.
+c-----------------------------------------------------------------------
+      dimension pc(12)
+c
+      go to (100, 200), meth
+c
+ 100  elco(1,1) = 1.0d0
+      elco(2,1) = 1.0d0
+      tesco(1,1) = 0.0d0
+      tesco(2,1) = 2.0d0
+      tesco(1,2) = 1.0d0
+      tesco(3,12) = 0.0d0
+      pc(1) = 1.0d0
+      rqfac = 1.0d0
+      do 140 nq = 2,12
+c-----------------------------------------------------------------------
+c the pc array will contain the coefficients of the polynomial
+c     p(x) = (x+1)*(x+2)*...*(x+nq-1).
+c initially, p(x) = 1.
+c-----------------------------------------------------------------------
+        rq1fac = rqfac
+        rqfac = rqfac/dfloat(nq)
+        nqm1 = nq - 1
+        fnqm1 = dfloat(nqm1)
+        nqp1 = nq + 1
+c form coefficients of p(x)*(x+nq-1). ----------------------------------
+        pc(nq) = 0.0d0
+        do 110 ib = 1,nqm1
+          i = nqp1 - ib
+ 110      pc(i) = pc(i-1) + fnqm1*pc(i)
+        pc(1) = fnqm1*pc(1)
+c compute integral, -1 to 0, of p(x) and x*p(x). -----------------------
+        pint = pc(1)
+        xpin = pc(1)/2.0d0
+        tsign = 1.0d0
+        do 120 i = 2,nq
+          tsign = -tsign
+          pint = pint + tsign*pc(i)/dfloat(i)
+ 120      xpin = xpin + tsign*pc(i)/dfloat(i+1)
+c store coefficients in elco and tesco. --------------------------------
+        elco(1,nq) = pint*rq1fac
+        elco(2,nq) = 1.0d0
+        do 130 i = 2,nq
+ 130      elco(i+1,nq) = rq1fac*pc(i)/dfloat(i)
+        agamq = rqfac*xpin
+        ragq = 1.0d0/agamq
+        tesco(2,nq) = ragq
+        if (nq .lt. 12) tesco(1,nqp1) = ragq*rqfac/dfloat(nqp1)
+        tesco(3,nqm1) = ragq
+ 140    continue
+      return
+c
+ 200  pc(1) = 1.0d0
+      rq1fac = 1.0d0
+      do 230 nq = 1,5
+c-----------------------------------------------------------------------
+c the pc array will contain the coefficients of the polynomial
+c     p(x) = (x+1)*(x+2)*...*(x+nq).
+c initially, p(x) = 1.
+c-----------------------------------------------------------------------
+        fnq = dfloat(nq)
+        nqp1 = nq + 1
+c form coefficients of p(x)*(x+nq). ------------------------------------
+        pc(nqp1) = 0.0d0
+        do 210 ib = 1,nq
+          i = nq + 2 - ib
+ 210      pc(i) = pc(i-1) + fnq*pc(i)
+        pc(1) = fnq*pc(1)
+c store coefficients in elco and tesco. --------------------------------
+        do 220 i = 1,nqp1
+ 220      elco(i,nq) = pc(i)/pc(2)
+        elco(2,nq) = 1.0d0
+        tesco(1,nq) = rq1fac
+        tesco(2,nq) = dfloat(nqp1)/elco(1,nq)
+        tesco(3,nq) = dfloat(nq+2)/elco(1,nq)
+        rq1fac = rq1fac/fnq
+ 230    continue
+      return
+c----------------------- end of subroutine cfode -----------------------
+      end
+      subroutine cdrv
+     *     (n, r,c,ic, ia,ja,a, b, z, nsp,isp,rsp,esp, path, flag)
+clll. optimize
+c*** subroutine cdrv
+c*** driver for subroutines for solving sparse nonsymmetric systems of
+c       linear equations (compressed pointer storage)
+c
+c
+c    parameters
+c    class abbreviations are--
+c       n - integer variable
+c       f - real variable
+c       v - supplies a value to the driver
+c       r - returns a result from the driver
+c       i - used internally by the driver
+c       a - array
+c
+c class - parameter
+c ------+----------
+c       -
+c         the nonzero entries of the coefficient matrix m are stored
+c    row-by-row in the array a.  to identify the individual nonzero
+c    entries in each row, we need to know in which column each entry
+c    lies.  the column indices which correspond to the nonzero entries
+c    of m are stored in the array ja.  i.e., if  a(k) = m(i,j),  then
+c    ja(k) = j.  in addition, we need to know where each row starts and
+c    how long it is.  the index positions in ja and a where the rows of
+c    m begin are stored in the array ia.  i.e., if m(i,j) is the first
+c    nonzero entry (stored) in the i-th row and a(k) = m(i,j),  then
+c    ia(i) = k.  moreover, the index in ja and a of the first location
+c    following the last element in the last row is stored in ia(n+1).
+c    thus, the number of entries in the i-th row is given by
+c    ia(i+1) - ia(i),  the nonzero entries of the i-th row are stored
+c    consecutively in
+c            a(ia(i)),  a(ia(i)+1),  ..., a(ia(i+1)-1),
+c    and the corresponding column indices are stored consecutively in
+c            ja(ia(i)), ja(ia(i)+1), ..., ja(ia(i+1)-1).
+c    for example, the 5 by 5 matrix
+c                ( 1. 0. 2. 0. 0.)
+c                ( 0. 3. 0. 0. 0.)
+c            m = ( 0. 4. 5. 6. 0.)
+c                ( 0. 0. 0. 7. 0.)
+c                ( 0. 0. 0. 8. 9.)
+c    would be stored as
+c               - 1  2  3  4  5  6  7  8  9
+c            ---+--------------------------
+c            ia - 1  3  4  7  8 10
+c            ja - 1  3  2  2  3  4  4  4  5
+c             a - 1. 2. 3. 4. 5. 6. 7. 8. 9.         .
+c
+c nv    - n     - number of variables/equations.
+c fva   - a     - nonzero entries of the coefficient matrix m, stored
+c       -           by rows.
+c       -           size = number of nonzero entries in m.
+c nva   - ia    - pointers to delimit the rows in a.
+c       -           size = n+1.
+c nva   - ja    - column numbers corresponding to the elements of a.
+c       -           size = size of a.
+c fva   - b     - right-hand side b.  b and z can the same array.
+c       -           size = n.
+c fra   - z     - solution x.  b and z can be the same array.
+c       -           size = n.
+c
+c         the rows and columns of the original matrix m can be
+c    reordered (e.g., to reduce fillin or ensure numerical stability)
+c    before calling the driver.  if no reordering is done, then set
+c    r(i) = c(i) = ic(i) = i  for i=1,...,n.  the solution z is returned
+c    in the original order.
+c         if the columns have been reordered (i.e.,  c(i).ne.i  for some
+c    i), then the driver will CALL a subroutine (nroc) which rearranges
+c    each row of ja and a, leaving the rows in the original order, but
+c    placing the elements of each row in increasing order with respect
+c    to the new ordering.  if  path.ne.1,  then nroc is assumed to have
+c    been called already.
+c
+c nva   - r     - ordering of the rows of m.
+c       -           size = n.
+c nva   - c     - ordering of the columns of m.
+c       -           size = n.
+c nva   - ic    - inverse of the ordering of the columns of m.  i.e.,
+c       -           ic(c(i)) = i  for i=1,...,n.
+c       -           size = n.
+c
+c         the solution of the system of linear equations is divided into
+c    three stages --
+c      nsfc -- the matrix m is processed symbolically to determine where
+c               fillin will occur during the numeric factorization.
+c      nnfc -- the matrix m is factored numerically into the product ldu
+c               of a unit lower triangular matrix l, a diagonal matrix
+c               d, and a unit upper triangular matrix u, and the system
+c               mx = b  is solved.
+c      nnsc -- the linear system  mx = b  is solved using the ldu
+c  or           factorization from nnfc.
+c      nntc -- the transposed linear system  mt x = b  is solved using
+c               the ldu factorization from nnf.
+c    for several systems whose coefficient matrices have the same
+c    nonzero structure, nsfc need be done only once (for the first
+c    system).  then nnfc is done once for each additional system.  for
+c    several systems with the same coefficient matrix, nsfc and nnfc
+c    need be done only once (for the first system).  then nnsc or nntc
+c    is done once for each additional right-hand side.
+c
+c nv    - path  - path specification.  values and their meanings are --
+c       -           1  perform nroc, nsfc, and nnfc.
+c       -           2  perform nnfc only  (nsfc is assumed to have been
+c       -               done in a manner compatible with the storage
+c       -               allocation used in the driver).
+c       -           3  perform nnsc only  (nsfc and nnfc are assumed to
+c       -               have been done in a manner compatible with the
+c       -               storage allocation used in the driver).
+c       -           4  perform nntc only  (nsfc and nnfc are assumed to
+c       -               have been done in a manner compatible with the
+c       -               storage allocation used in the driver).
+c       -           5  perform nroc and nsfc.
+c
+c         various errors are detected by the driver and the individual
+c    subroutines.
+c
+c nr    - flag  - error flag.  values and their meanings are --
+c       -             0     no errors detected
+c       -             n+k   null row in a  --  row = k
+c       -            2n+k   duplicate entry in a  --  row = k
+c       -            3n+k   insufficient storage in nsfc  --  row = k
+c       -            4n+1   insufficient storage in nnfc
+c       -            5n+k   null pivot  --  row = k
+c       -            6n+k   insufficient storage in nsfc  --  row = k
+c       -            7n+1   insufficient storage in nnfc
+c       -            8n+k   zero pivot  --  row = k
+c       -           10n+1   insufficient storage in cdrv
+c       -           11n+1   illegal path specification
+c
+c         working storage is needed for the factored form of the matrix
+c    m plus various temporary vectors.  the arrays isp and rsp should be
+c    equivalenced.  integer storage is allocated from the beginning of
+c    isp and real storage from the end of rsp.
+c
+c nv    - nsp   - declared dimension of rsp.  nsp generally must
+c       -           be larger than  8n+2 + 2k  (where  k = (number of
+c       -           nonzero entries in m)).
+c nvira - isp   - integer working storage divided up into various arrays
+c       -           needed by the subroutines.  isp and rsp should be
+c       -           equivalenced.
+c       -           size = lratio*nsp.
+c fvira - rsp   - real working storage divided up into various arrays
+c       -           needed by the subroutines.  isp and rsp should be
+c       -           equivalenced.
+c       -           size = nsp.
+c nr    - esp   - if sufficient storage was available to perform the
+c       -           symbolic factorization (nsfc), then esp is set to
+c       -           the amount of excess storage provided (negative if
+c       -           insufficient storage was available to perform the
+c       -           numeric factorization (nnfc)).
+c
+c
+c  conversion to KPP_REAL
+c
+c    to convert these routines for KPP_REAL arrays..
+c    (1) use the KPP_REAL declarations in place of the real
+c    declarations in each subprogram, as given in comment cards.
+c    (2) change the data-loaded value of the integer  lratio
+c    in subroutine cdrv, as indicated below.
+c    (3) change e0 to d0 in the constants in statement number 10
+c    in subroutine nnfc and the line following that.
+c
+      integer  r(1), c(1), ic(1),  ia(1), ja(1),  isp(1), esp,  path,
+     *   flag,  d, u, q, row, tmp, ar,  umax
+      KPP_REAL  a(1), b(1), z(1), rsp(1)
+c
+c  set lratio equal to the ratio between the length of floating point
+c  and integer array data.  e. g., lratio = 1 for (real, integer),
+c  lratio = 2 for (KPP_REAL, integer)
+c
+      data lratio/2/
+c
+      if (path.lt.1 .or. 5.lt.path)  go to 111
+c******initialize and divide up temporary storage  *******************
+      il   = 1
+      ijl  = il  + (n+1)
+      iu   = ijl +   n
+      iju  = iu  + (n+1)
+      irl  = iju +   n
+      jrl  = irl +   n
+      jl   = jrl +   n
+c
+c  ******  reorder a if necessary, CALL nsfc if flag is set  ***********
+      if ((path-1) * (path-5) .ne. 0)  go to 5
+        max = (lratio*nsp + 1 - jl) - (n+1) - 5*n
+        jlmax = max/2
+        q     = jl   + jlmax
+        ira   = q    + (n+1)
+        jra   = ira  +   n
+        irac  = jra  +   n
+        iru   = irac +   n
+        jru   = iru  +   n
+        jutmp = jru  +   n
+        jumax = lratio*nsp  + 1 - jutmp
+        esp = max/lratio
+        if (jlmax.le.0 .or. jumax.le.0)  go to 110
+c
+        do 1 i=1,n
+          if (c(i).ne.i)  go to 2
+   1      continue
+        go to 3
+   2    ar = nsp + 1 - n
+        CALL  nroc
+     *     (n, ic, ia,ja,a, isp(il), rsp(ar), isp(iu), flag)
+        if (flag.ne.0)  go to 100
+c
+   3    CALL  nsfc
+     *     (n, r, ic, ia,ja,
+     *      jlmax, isp(il), isp(jl), isp(ijl),
+     *      jumax, isp(iu), isp(jutmp), isp(iju),
+     *      isp(q), isp(ira), isp(jra), isp(irac),
+     *      isp(irl), isp(jrl), isp(iru), isp(jru),  flag)
+        if(flag .ne. 0)  go to 100
+c  ******  move ju next to jl  *****************************************
+        jlmax = isp(ijl+n-1)
+        ju    = jl + jlmax
+        jumax = isp(iju+n-1)
+        if (jumax.le.0)  go to 5
+        do 4 j=1,jumax
+   4      isp(ju+j-1) = isp(jutmp+j-1)
+c
+c  ******  CALL remaining subroutines  *********************************
+   5  jlmax = isp(ijl+n-1)
+      ju    = jl  + jlmax
+      jumax = isp(iju+n-1)
+      l     = (ju + jumax - 2 + lratio)  /  lratio    +    1
+      lmax  = isp(il+n) - 1
+      d     = l   + lmax
+      u     = d   + n
+      row   = nsp + 1 - n
+      tmp   = row - n
+      umax  = tmp - u
+      esp   = umax - (isp(iu+n) - 1)
+c
+      if ((path-1) * (path-2) .ne. 0)  go to 6
+        if (umax.lt.0)  go to 110
+        CALL nnfc
+     *     (n,  r, c, ic,  ia, ja, a, z, b,
+     *      lmax, isp(il), isp(jl), isp(ijl), rsp(l),  rsp(d),
+     *      umax, isp(iu), isp(ju), isp(iju), rsp(u),
+     *      rsp(row), rsp(tmp),  isp(irl), isp(jrl),  flag)
+        if(flag .ne. 0)  go to 100
+c
+   6  if ((path-3) .ne. 0)  go to 7
+        CALL nnsc
+     *     (n,  r, c,  isp(il), isp(jl), isp(ijl), rsp(l),
+     *      rsp(d),    isp(iu), isp(ju), isp(iju), rsp(u),
+     *      z, b,  rsp(tmp))
+c
+   7  if ((path-4) .ne. 0)  go to 8
+        CALL nntc
+     *     (n,  r, c,  isp(il), isp(jl), isp(ijl), rsp(l),
+     *      rsp(d),    isp(iu), isp(ju), isp(iju), rsp(u),
+     *      z, b,  rsp(tmp))
+   8  return
+c
+c ** error.. error detected in nroc, nsfc, nnfc, or nnsc
+ 100  return
+c ** error.. insufficient storage
+ 110  flag = 10*n + 1
+      return
+c ** error.. illegal path specification
+ 111  flag = 11*n + 1
+      return
+      end
+      subroutine prep (neq, y, yh, savf, ewt, ftem, ia, ja,
+     1                     wk, iwk, ipper, f, jac)
+clll. optimize
+      external f,jac
+      integer neq(*), ia(*), ja(*), iwk(*), ipper
+      integer iownd, iowns,
+     1   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     2   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      integer iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     1   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     2   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     3   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+      integer i, ibr, ier, ipil, ipiu, iptt1, iptt2, j, jfound, k,
+     1   knew, kmax, kmin, ldif, lenigp, liwk, maxg, np1, nzsut
+      KPP_REAL y(*), yh(*), savf(*), ewt(*), ftem(*), wk(*)
+      KPP_REAL rowns,
+     1   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround
+      KPP_REAL con0, conmin, ccmxj, psmall, rbig, seth
+      KPP_REAL dq, dyj, erwt, fac, yj, JJJ(n,n)
+      common /ls0001/ rowns(209),
+     2   ccmax, el0, h, hmin, hmxi, hu, rc, tn, uround,
+     3   iownd(14), iowns(6),
+     4   icf, ierpj, iersl, jcur, jstart, kflag, l, meth, miter,
+     5   maxord, maxcor, msbp, mxncf, n, nq, nst, nfe, nje, nqu
+      common /lss001/ con0, conmin, ccmxj, psmall, rbig, seth,
+     1   iplost, iesp, istatc, iys, iba, ibian, ibjan, ibjgp,
+     2   ipian, ipjan, ipjgp, ipigp, ipr, ipc, ipic, ipisp, iprsp, ipa,
+     3   lenyh, lenyhm, lenwk, lreq, lrat, lrest, lwmin, moss, msbj,
+     4   nslj, ngp, nlu, nnz, nsp, nzl, nzu
+c-----------------------------------------------------------------------
+c this routine performs preprocessing related to the sparse linear
+c systems that must be solved if miter = 1 or 2.
+c the operations that are performed here are..
+c  * compute sparseness structure of jacobian according to moss,
+c  * compute grouping of column indices (miter = 2),
+c  * compute a new ordering of rows and columns of the matrix,
+c  * reorder ja corresponding to the new ordering,
+c  * perform a symbolic lu factorization of the matrix, and
+c  * set pointers for segments of the iwk/wk array.
+c in addition to variables described previously, prep uses the
+c following for communication..
+c yh     = the history array.  only the first column, containing the
+c          current y vector, is used.  used only if moss .ne. 0.
+c savf   = a work array of length neq, used only if moss .ne. 0.
+c ewt    = array of length neq containing (inverted) error weights.
+c          used only if moss = 2 or if istate = moss = 1.
+c ftem   = a work array of length neq, identical to acor in the driver,
+c          used only if moss = 2.
+c wk     = a real work array of length lenwk, identical to wm in
+c          the driver.
+c iwk    = integer work array, assumed to occupy the same space as wk.
+c lenwk  = the length of the work arrays wk and iwk.
+c istatc = a copy of the driver input argument istate (= 1 on the
+c          first call, = 3 on a continuation call).
+c iys    = flag value from odrv or cdrv.
+c ipper  = output error flag with the following values and meanings..
+c          0  no error.
+c         -1  insufficient storage for internal structure pointers.
+c         -2  insufficient storage for jgroup.
+c         -3  insufficient storage for odrv.
+c         -4  other error flag from odrv (should never occur).
+c         -5  insufficient storage for cdrv.
+c         -6  other error flag from cdrv.
+c-----------------------------------------------------------------------
+      ibian = lrat*2
+      ipian = ibian + 1
+      np1 = n + 1
+      ipjan = ipian + np1
+      ibjan = ipjan - 1
+      liwk = lenwk*lrat
+      if (ipjan+n-1 .gt. liwk) go to 210
+      if (moss .eq. 0) go to 30
+c
+      if (istatc .eq. 3) go to 20
+c istate = 1 and moss .ne. 0.  perturb y for structure determination. --
+      do 10 i = 1,n
+        erwt = 1.0d0/ewt(i)
+        fac = 1.0d0 + 1.0d0/(dfloat(i)+1.0d0)
+        y(i) = y(i) + fac*DSIGN(erwt,y(i))
+ 10     continue
+      go to (70, 100), moss
+c
+ 20   continue
+c istate = 3 and moss .ne. 0.  load y from yh(*,1). --------------------
+      do 25 i = 1,n
+ 25     y(i) = yh(i)
+      go to (70, 100), moss
+c
+c moss = 0.  process user-s ia,ja.  add diagonal entries if necessary. -
+ 30   knew = ipjan
+      kmin = ia(1)
+      iwk(ipian) = 1
+      do 60 j = 1,n
+        jfound = 0
+        kmax = ia(j+1) - 1
+        if (kmin .gt. kmax) go to 45
+        do 40 k = kmin,kmax
+          i = ja(k)
+          if (i .eq. j) jfound = 1
+          if (knew .gt. liwk) go to 210
+          iwk(knew) = i
+          knew = knew + 1
+ 40       continue
+        if (jfound .eq. 1) go to 50
+ 45     if (knew .gt. liwk) go to 210
+        iwk(knew) = j
+        knew = knew + 1
+ 50     iwk(ipian+j) = knew + 1 - ipjan
+        kmin = kmax + 1
+ 60     continue
+      go to 140
+c
+c moss = 1.  compute structure from user-supplied jacobian routine jac.
+ 70   continue
+c a dummy CALL to f allows user to create temporaries for use in jac. --
+      CALL f (neq, tn, y, savf)
+      k = ipjan
+      iwk(ipian) = 1
+      call jac_chem (neq, tn, y, JJJ, j, iwk(ipian), iwk(ipjan))
+      do 90 j = 1,n
+        if (k .gt. liwk) go to 210
+        iwk(k) = j
+        k = k + 1
+        do 75 i = 1,n
+ 75       savf(i) = 0.0d0
+C        call jac_chem (neq, tn, y, j, iwk(ipian), iwk(ipjan), savf)
+        do i=1,n
+           savf(i) = JJJ(i,j)
+        end do
+        do 80 i = 1,n
+          if (dabs(savf(i)) .le. seth) go to 80
+          if (i .eq. j) go to 80
+          if (k .gt. liwk) go to 210
+          iwk(k) = i
+          k = k + 1
+ 80       continue
+        iwk(ipian+j) = k + 1 - ipjan
+ 90     continue
+      go to 140
+c
+c moss = 2.  compute structure from results of n + 1 calls to f. -------
+ 100  k = ipjan
+      iwk(ipian) = 1
+      CALL f (neq, tn, y, savf)
+      do 120 j = 1,n
+        if (k .gt. liwk) go to 210
+        iwk(k) = j
+        k = k + 1
+        yj = y(j)
+        erwt = 1.0d0/ewt(j)
+        dyj = DSIGN(erwt,yj)
+        y(j) = yj + dyj
+        CALL f (neq, tn, y, ftem)
+        y(j) = yj
+        do 110 i = 1,n
+          dq = (ftem(i) - savf(i))/dyj
+          if (dabs(dq) .le. seth) go to 110
+          if (i .eq. j) go to 110
+          if (k .gt. liwk) go to 210
+          iwk(k) = i
+          k = k + 1
+ 110      continue
+        iwk(ipian+j) = k + 1 - ipjan
+ 120    continue
+c
+ 140  continue
+      if (moss .eq. 0 .or. istatc .ne. 1) go to 150
+c if istate = 1 and moss .ne. 0, restore y from yh. --------------------
+      do 145 i = 1,n
+ 145    y(i) = yh(i)
+ 150  nnz = iwk(ipian+n) - 1
+      lenigp = 0
+      ipigp = ipjan + nnz
+      if (miter .ne. 2) go to 160
+c
+c compute grouping of column indices (miter = 2). ----------------------
+      maxg = np1
+      ipjgp = ipjan + nnz
+      ibjgp = ipjgp - 1
+      ipigp = ipjgp + n
+      iptt1 = ipigp + np1
+      iptt2 = iptt1 + n
+      lreq = iptt2 + n - 1
+      if (lreq .gt. liwk) go to 220
+      CALL jgroup (n, iwk(ipian), iwk(ipjan), maxg, ngp, iwk(ipigp),
+     1   iwk(ipjgp), iwk(iptt1), iwk(iptt2), ier)
+      if (ier .ne. 0) go to 220
+      lenigp = ngp + 1
+c
+c compute new ordering of rows/columns of jacobian. --------------------
+ 160  ipr = ipigp + lenigp
+      ipc = ipr
+      ipic = ipc + n
+      ipisp = ipic + n
+      iprsp = (ipisp - 2)/lrat + 2
+      iesp = lenwk + 1 - iprsp
+      if (iesp .lt. 0) go to 230
+      ibr = ipr - 1
+      do 170 i = 1,n
+ 170    iwk(ibr+i) = i
+      nsp = liwk + 1 - ipisp
+      CALL odrv (n, iwk(ipian), iwk(ipjan), wk, iwk(ipr), iwk(ipic),
+     1   nsp, iwk(ipisp), 1, iys)
+      if (iys .eq. 11*n+1) go to 240
+      if (iys .ne. 0) go to 230
+c
+c reorder jan and do symbolic lu factorization of matrix. --------------
+      ipa = lenwk + 1 - nnz
+      nsp = ipa - iprsp
+      lreq = max0(12*n/lrat, 6*n/lrat+2*n+nnz) + 3
+      lreq = lreq + iprsp - 1 + nnz
+      if (lreq .gt. lenwk) go to 250
+      iba = ipa - 1
+      do 180 i = 1,nnz
+ 180    wk(iba+i) = 0.0d0
+      ipisp = lrat*(iprsp - 1) + 1
+      CALL cdrv (n,iwk(ipr),iwk(ipc),iwk(ipic),iwk(ipian),iwk(ipjan),
+     1   wk(ipa),wk(ipa),wk(ipa),nsp,iwk(ipisp),wk(iprsp),iesp,5,iys)
+      lreq = lenwk - iesp
+      if (iys .eq. 10*n+1) go to 250
+      if (iys .ne. 0) go to 260
+      ipil = ipisp
+      ipiu = ipil + 2*n + 1
+      nzu = iwk(ipil+n) - iwk(ipil)
+      nzl = iwk(ipiu+n) - iwk(ipiu)
+      if (lrat .gt. 1) go to 190
+      CALL adjlr (n, iwk(ipisp), ldif)
+      lreq = lreq + ldif
+ 190  continue
+      if (lrat .eq. 2 .and. nnz .eq. n) lreq = lreq + 1
+      nsp = nsp + lreq - lenwk
+      ipa = lreq + 1 - nnz
+      iba = ipa - 1
+      ipper = 0
+      return
+c
+ 210  ipper = -1
+      lreq = 2 + (2*n + 1)/lrat
+      lreq = max0(lenwk+1,lreq)
+      return
+c
+ 220  ipper = -2
+      lreq = (lreq - 1)/lrat + 1
+      return
+c
+ 230  ipper = -3
+      CALL cntnzu (n, iwk(ipian), iwk(ipjan), nzsut)
+      lreq = lenwk - iesp + (3*n + 4*nzsut - 1)/lrat + 1
+      return
+c
+ 240  ipper = -4
+      return
+c
+ 250  ipper = -5
+      return
+c
+ 260  ipper = -6
+      lreq = lenwk
+      return
+c----------------------- end of subroutine prep ------------------------
+      end
+      subroutine cntnzu (n, ia, ja, nzsut)
+      integer n, ia, ja, nzsut
+      dimension ia(1), ja(1)
+c-----------------------------------------------------------------------
+c this routine counts the number of nonzero elements in the strict
+c upper triangle of the matrix m + m(transpose), where the sparsity
+c structure of m is given by pointer arrays ia and ja.
+c this is needed to compute the storage requirements for the
+c sparse matrix reordering operation in odrv.
+c-----------------------------------------------------------------------
+      integer ii, jj, j, jmin, jmax, k, kmin, kmax, num
+c
+      num = 0
+      do 50 ii = 1,n
+        jmin = ia(ii)
+        jmax = ia(ii+1) - 1
+        if (jmin .gt. jmax) go to 50
+        do 40 j = jmin,jmax
+          if (ja(j) - ii) 10, 40, 30
+ 10       jj =ja(j)
+          kmin = ia(jj)
+          kmax = ia(jj+1) - 1
+          if (kmin .gt. kmax) go to 30
+          do 20 k = kmin,kmax
+            if (ja(k) .eq. ii) go to 40
+ 20         continue
+ 30       num = num + 1
+ 40       continue
+ 50     continue
+      nzsut = num
+      return
+c----------------------- end of subroutine cntnzu ----------------------
+      end
+      subroutine nntc
+     *     (n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, z, b, tmp)
+clll. optimize
+c*** subroutine nntc
+c*** numeric solution of the transpose of a sparse nonsymmetric system
+c      of linear equations given lu-factorization (compressed pointer
+c      storage)
+c
+c
+c       input variables..  n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, b
+c       output variables.. z
+c
+c       parameters used internally..
+c fia   - tmp   - temporary vector which gets result of solving ut y = b
+c       -           size = n.
+c
+c  internal variables..
+c    jmin, jmax - indices of the first and last positions in a row of
+c      u or l  to be used.
+c
+      integer r(1), c(1), il(1), jl(1), ijl(1), iu(1), ju(1), iju(1)
+      KPP_REAL l(1), d(1), u(1), b(1), z(1), tmp(1), tmpk,sum
+c
+c  ******  set tmp to reordered b  *************************************
+      do 1 k=1,n
+   1    tmp(k) = b(c(k))
+c  ******  solve  ut y = b  by forward substitution  *******************
+      do 3 k=1,n
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        tmpk = -tmp(k)
+        if (jmin .gt. jmax) go to 3
+        mu = iju(k) - jmin
+        do 2 j=jmin,jmax
+   2      tmp(ju(mu+j)) = tmp(ju(mu+j)) + tmpk * u(j)
+   3    continue
+c  ******  solve  lt x = y  by back substitution  **********************
+      k = n
+      do 6 i=1,n
+        sum = -tmp(k)
+        jmin = il(k)
+        jmax = il(k+1) - 1
+        if (jmin .gt. jmax) go to 5
+        ml = ijl(k) - jmin
+        do 4 j=jmin,jmax
+   4      sum = sum + l(j) * tmp(jl(ml+j))
+   5    tmp(k) = -sum * d(k)
+        z(r(k)) = tmp(k)
+        k = k - 1
+   6    continue
+      return
+      end
+      subroutine nnsc
+     *     (n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, z, b, tmp)
+clll. optimize
+c*** subroutine nnsc
+c*** numerical solution of sparse nonsymmetric system of linear
+c      equations given ldu-factorization (compressed pointer storage)
+c
+c
+c       input variables..  n, r, c, il, jl, ijl, l, d, iu, ju, iju, u, b
+c       output variables.. z
+c
+c       parameters used internally..
+c fia   - tmp   - temporary vector which gets result of solving  ly = b.
+c       -           size = n.
+c
+c  internal variables..
+c    jmin, jmax - indices of the first and last positions in a row of
+c      u or l  to be used.
+c
+      integer r(1), c(1), il(1), jl(1), ijl(1), iu(1), ju(1), iju(1)
+      KPP_REAL  l(1), d(1), u(1), b(1), z(1), tmp(1), tmpk,sum
+c
+c  ******  set tmp to reordered b  *************************************
+      do 1 k=1,n
+   1    tmp(k) = b(r(k))
+c  ******  solve  ly = b  by forward substitution  *********************
+      do 3 k=1,n
+        jmin = il(k)
+        jmax = il(k+1) - 1
+        tmpk = -d(k) * tmp(k)
+        tmp(k) = -tmpk
+        if (jmin .gt. jmax) go to 3
+        ml = ijl(k) - jmin
+        do 2 j=jmin,jmax
+   2      tmp(jl(ml+j)) = tmp(jl(ml+j)) + tmpk * l(j)
+   3    continue
+c  ******  solve  ux = y  by back substitution  ************************
+      k = n
+      do 6 i=1,n
+        sum = -tmp(k)
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        if (jmin .gt. jmax) go to 5
+        mu = iju(k) - jmin
+        do 4 j=jmin,jmax
+   4      sum = sum + u(j) * tmp(ju(mu+j))
+   5    tmp(k) = -sum
+        z(c(k)) = -sum
+        k = k - 1
+   6    continue
+      return
+      end
+      subroutine nroc (n, ic, ia, ja, a, jar, ar, p, flag)
+clll. optimize
+c
+c       ----------------------------------------------------------------
+c
+c               yale sparse matrix package - nonsymmetric codes
+c                    solving the system of equations mx = b
+c
+c    i.   calling sequences
+c         the coefficient matrix can be processed by an ordering routine
+c    (e.g., to reduce fillin or ensure numerical stability) before using
+c    the remaining subroutines.  if no reordering is done, then set
+c    r(i) = c(i) = ic(i) = i  for i=1,...,n.  if an ordering subroutine
+c    is used, then nroc should be used to reorder the coefficient matrix
+c    the calling sequence is --
+c        (       (matrix ordering))
+c        (nroc   (matrix reordering))
+c         nsfc   (symbolic factorization to determine where fillin will
+c                  occur during numeric factorization)
+c         nnfc   (numeric factorization into product ldu of unit lower
+c                  triangular matrix l, diagonal matrix d, and unit
+c                  upper triangular matrix u, and solution of linear
+c                  system)
+c         nnsc   (solution of linear system for additional right-hand
+c                  side using ldu factorization from nnfc)
+c    (if only one system of equations is to be solved, then the
+c    subroutine trk should be used.)
+c
+c    ii.  storage of sparse matrices
+c         the nonzero entries of the coefficient matrix m are stored
+c    row-by-row in the array a.  to identify the individual nonzero
+c    entries in each row, we need to know in which column each entry
+c    lies.  the column indices which correspond to the nonzero entries
+c    of m are stored in the array ja.  i.e., if  a(k) = m(i,j),  then
+c    ja(k) = j.  in addition, we need to know where each row starts and
+c    how long it is.  the index positions in ja and a where the rows of
+c    m begin are stored in the array ia.  i.e., if m(i,j) is the first
+c    (leftmost) entry in the i-th row and  a(k) = m(i,j),  then
+c    ia(i) = k.  moreover, the index in ja and a of the first location
+c    following the last element in the last row is stored in ia(n+1).
+c    thus, the number of entries in the i-th row is given by
+c    ia(i+1) - ia(i),  the nonzero entries of the i-th row are stored
+c    consecutively in
+c            a(ia(i)),  a(ia(i)+1),  ..., a(ia(i+1)-1),
+c    and the corresponding column indices are stored consecutively in
+c            ja(ia(i)), ja(ia(i)+1), ..., ja(ia(i+1)-1).
+c    for example, the 5 by 5 matrix
+c                ( 1. 0. 2. 0. 0.)
+c                ( 0. 3. 0. 0. 0.)
+c            m = ( 0. 4. 5. 6. 0.)
+c                ( 0. 0. 0. 7. 0.)
+c                ( 0. 0. 0. 8. 9.)
+c    would be stored as
+c               - 1  2  3  4  5  6  7  8  9
+c            ---+--------------------------
+c            ia - 1  3  4  7  8 10
+c            ja - 1  3  2  2  3  4  4  4  5
+c             a - 1. 2. 3. 4. 5. 6. 7. 8. 9.         .
+c
+c         the strict upper (lower) triangular portion of the matrix
+c    u (l) is stored in a similar fashion using the arrays  iu, ju, u
+c    (il, jl, l)  except that an additional array iju (ijl) is used to
+c    compress storage of ju (jl) by allowing some sequences of column
+c    (row) indices to used for more than one row (column)  (n.b., l is
+c    stored by columns).  iju(k) (ijl(k)) points to the starting
+c    location in ju (jl) of entries for the kth row (column).
+c    compression in ju (jl) occurs in two ways.  first, if a row
+c    (column) i was merged into the current row (column) k, and the
+c    number of elements merged in from (the tail portion of) row
+c    (column) i is the same as the final length of row (column) k, then
+c    the kth row (column) and the tail of row (column) i are identical
+c    and iju(k) (ijl(k)) points to the start of the tail.  second, if
+c    some tail portion of the (k-1)st row (column) is identical to the
+c    head of the kth row (column), then iju(k) (ijl(k)) points to the
+c    start of that tail portion.  for example, the nonzero structure of
+c    the strict upper triangular part of the matrix
+c            d 0 x x x
+c            0 d 0 x x
+c            0 0 d x 0
+c            0 0 0 d x
+c            0 0 0 0 d
+c    would be represented as
+c                - 1 2 3 4 5 6
+c            ----+------------
+c             iu - 1 4 6 7 8 8
+c             ju - 3 4 5 4
+c            iju - 1 2 4 3           .
+c    the diagonal entries of l and u are assumed to be equal to one and
+c    are not stored.  the array d contains the reciprocals of the
+c    diagonal entries of the matrix d.
+c
+c    iii. additional storage savings
+c         in nsfc, r and ic can be the same array in the calling
+c    sequence if no reordering of the coefficient matrix has been done.
+c         in nnfc, r, c, and ic can all be the same array if no
+c    reordering has been done.  if only the rows have been reordered,
+c    then c and ic can be the same array.  if the row and column
+c    orderings are the same, then r and c can be the same array.  z and
+c    row can be the same array.
+c         in nnsc or nntc, r and c can be the same array if no
+c    reordering has been done or if the row and column orderings are the
+c    same.  z and b can be the same array.  however, then b will be
+c    destroyed.
+c
+c    iv.  parameters
+c         following is a list of parameters to the programs.  names are
+c    uniform among the various subroutines.  class abbreviations are --
+c       n - integer variable
+c       f - real variable
+c       v - supplies a value to a subroutine
+c       r - returns a result from a subroutine
+c       i - used internally by a subroutine
+c       a - array
+c
+c class - parameter
+c ------+----------
+c fva   - a     - nonzero entries of the coefficient matrix m, stored
+c       -           by rows.
+c       -           size = number of nonzero entries in m.
+c fva   - b     - right-hand side b.
+c       -           size = n.
+c nva   - c     - ordering of the columns of m.
+c       -           size = n.
+c fvra  - d     - reciprocals of the diagonal entries of the matrix d.
+c       -           size = n.
+c nr    - flag  - error flag.  values and their meanings are --
+c       -            0     no errors detected
+c       -            n+k   null row in a  --  row = k
+c       -           2n+k   duplicate entry in a  --  row = k
+c       -           3n+k   insufficient storage for jl  --  row = k
+c       -           4n+1   insufficient storage for l
+c       -           5n+k   null pivot  --  row = k
+c       -           6n+k   insufficient storage for ju  --  row = k
+c       -           7n+1   insufficient storage for u
+c       -           8n+k   zero pivot  --  row = k
+c nva   - ia    - pointers to delimit the rows of a.
+c       -           size = n+1.
+c nvra  - ijl   - pointers to the first element in each column in jl,
+c       -           used to compress storage in jl.
+c       -           size = n.
+c nvra  - iju   - pointers to the first element in each row in ju, used
+c       -           to compress storage in ju.
+c       -           size = n.
+c nvra  - il    - pointers to delimit the columns of l.
+c       -           size = n+1.
+c nvra  - iu    - pointers to delimit the rows of u.
+c       -           size = n+1.
+c nva   - ja    - column numbers corresponding to the elements of a.
+c       -           size = size of a.
+c nvra  - jl    - row numbers corresponding to the elements of l.
+c       -           size = jlmax.
+c nv    - jlmax - declared dimension of jl.  jlmax must be larger than
+c       -           the number of nonzeros in the strict lower triangle
+c       -           of m plus fillin minus compression.
+c nvra  - ju    - column numbers corresponding to the elements of u.
+c       -           size = jumax.
+c nv    - jumax - declared dimension of ju.  jumax must be larger than
+c       -           the number of nonzeros in the strict upper triangle
+c       -           of m plus fillin minus compression.
+c fvra  - l     - nonzero entries in the strict lower triangular portion
+c       -           of the matrix l, stored by columns.
+c       -           size = lmax.
+c nv    - lmax  - declared dimension of l.  lmax must be larger than
+c       -           the number of nonzeros in the strict lower triangle
+c       -           of m plus fillin  (il(n+1)-1 after nsfc).
+c nv    - n     - number of variables/equations.
+c nva   - r     - ordering of the rows of m.
+c       -           size = n.
+c fvra  - u     - nonzero entries in the strict upper triangular portion
+c       -           of the matrix u, stored by rows.
+c       -           size = umax.
+c nv    - umax  - declared dimension of u.  umax must be larger than
+c       -           the number of nonzeros in the strict upper triangle
+c       -           of m plus fillin  (iu(n+1)-1 after nsfc).
+c fra   - z     - solution x.
+c       -           size = n.
+c
+c       ----------------------------------------------------------------
+c
+c*** subroutine nroc
+c*** reorders rows of a, leaving row order unchanged
+c
+c
+c       input parameters.. n, ic, ia, ja, a
+c       output parameters.. ja, a, flag
+c
+c       parameters used internally..
+c nia   - p     - at the kth step, p is a linked list of the reordered
+c       -           column indices of the kth row of a.  p(n+1) points
+c       -           to the first entry in the list.
+c       -           size = n+1.
+c nia   - jar   - at the kth step,jar contains the elements of the
+c       -           reordered column indices of a.
+c       -           size = n.
+c fia   - ar    - at the kth step, ar contains the elements of the
+c       -           reordered row of a.
+c       -           size = n.
+c
+      integer  ic(1), ia(1), ja(1), jar(1), p(1), flag
+      KPP_REAL  a(1), ar(1)
+c
+c  ******  for each nonempty row  *******************************
+      do 5 k=1,n
+        jmin = ia(k)
+        jmax = ia(k+1) - 1
+        if(jmin .gt. jmax) go to 5
+        p(n+1) = n + 1
+c  ******  insert each element in the list  *********************
+        do 3 j=jmin,jmax
+          newj = ic(ja(j))
+          i = n + 1
+   1      if(p(i) .ge. newj) go to 2
+            i = p(i)
+            go to 1
+   2      if(p(i) .eq. newj) go to 102
+          p(newj) = p(i)
+          p(i) = newj
+          jar(newj) = ja(j)
+          ar(newj) = a(j)
+   3      continue
+c  ******  replace old row in ja and a  *************************
+        i = n + 1
+        do 4 j=jmin,jmax
+          i = p(i)
+          ja(j) = jar(i)
+   4      a(j) = ar(i)
+   5    continue
+      flag = 0
+      return
+c
+c ** error.. duplicate entry in a
+ 102  flag = n + k
+      return
+      end
+      subroutine adjlr (n, isp, ldif)
+      integer n, isp, ldif
+      dimension isp(1)
+c-----------------------------------------------------------------------
+c this routine computes an adjustment, ldif, to the required
+c integer storage space in iwk (sparse matrix work space).
+c it is called only if the word length ratio is lrat = 1.
+c this is to account for the possibility that the symbolic lu phase
+c may require more storage than the numerical lu and solution phases.
+c-----------------------------------------------------------------------
+      integer ip, jlmax, jumax, lnfc, lsfc, nzlu
+c
+      ip = 2*n + 1
+c get jlmax = ijl(n) and jumax = iju(n) (sizes of jl and ju). ----------
+      jlmax = isp(ip)
+      jumax = isp(ip+ip)
+c nzlu = (size of l) + (size of u) = (il(n+1)-il(1)) + (iu(n+1)-iu(1)).
+      nzlu = isp(n+1) - isp(1) + isp(ip+n+1) - isp(ip+1)
+      lsfc = 12*n + 3 + 2*max0(jlmax,jumax)
+      lnfc = 9*n + 2 + jlmax + jumax + nzlu
+      ldif = max0(0, lsfc - lnfc)
+      return
+c----------------------- end of subroutine adjlr -----------------------
+      end
+      subroutine odrv
+     *     (n, ia,ja,a, p,ip, nsp,isp, path, flag)
+clll. optimize
+c                                                                 5/2/83
+c***********************************************************************
+c  odrv -- driver for sparse matrix reordering routines
+c***********************************************************************
+c
+c  description
+c
+c    odrv finds a minimum degree ordering of the rows and columns
+c    of a matrix m stored in (ia,ja,a) format (see below).  for the
+c    reordered matrix, the work and storage required to perform
+c    gaussian elimination is (usually) significantly less.
+c
+c    note.. odrv and its subordinate routines have been modified to
+c    compute orderings for general matrices, not necessarily having any
+c    symmetry.  the miminum degree ordering is computed for the
+c    structure of the symmetric matrix  m + m-transpose.
+c    modifications to the original odrv module have been made in
+c    the coding in subroutine mdi, and in the initial comments in
+c    subroutines odrv and md.
+c
+c    if only the nonzero entries in the upper triangle of m are being
+c    stored, then odrv symmetrically reorders (ia,ja,a), (optionally)
+c    with the diagonal entries placed first in each row.  this is to
+c    ensure that if m(i,j) will be in the upper triangle of m with
+c    respect to the new ordering, then m(i,j) is stored in row i (and
+c    thus m(j,i) is not stored),  whereas if m(i,j) will be in the
+c    strict lower triangle of m, then m(j,i) is stored in row j (and
+c    thus m(i,j) is not stored).
+c
+c
+c  storage of sparse matrices
+c
+c    the nonzero entries of the matrix m are stored row-by-row in the
+c    array a.  to identify the individual nonzero entries in each row,
+c    we need to know in which column each entry lies.  these column
+c    indices are stored in the array ja.  i.e., if  a(k) = m(i,j),  then
+c    ja(k) = j.  to identify the individual rows, we need to know where
+c    each row starts.  these row pointers are stored in the array ia.
+c    i.e., if m(i,j) is the first nonzero entry (stored) in the i-th row
+c    and  a(k) = m(i,j),  then  ia(i) = k.  moreover, ia(n+1) points to
+c    the first location following the last element in the last row.
+c    thus, the number of entries in the i-th row is  ia(i+1) - ia(i),
+c    the nonzero entries in the i-th row are stored consecutively in
+c
+c            a(ia(i)),  a(ia(i)+1),  ..., a(ia(i+1)-1),
+c
+c    and the corresponding column indices are stored consecutively in
+c
+c            ja(ia(i)), ja(ia(i)+1), ..., ja(ia(i+1)-1).
+c
+c    since the coefficient matrix is symmetric, only the nonzero entries
+c    in the upper triangle need be stored.  for example, the matrix
+c
+c             ( 1  0  2  3  0 )
+c             ( 0  4  0  0  0 )
+c         m = ( 2  0  5  6  0 )
+c             ( 3  0  6  7  8 )
+c             ( 0  0  0  8  9 )
+c
+c    could be stored as
+c
+c            - 1  2  3  4  5  6  7  8  9 10 11 12 13
+c         ---+--------------------------------------
+c         ia - 1  4  5  8 12 14
+c         ja - 1  3  4  2  1  3  4  1  3  4  5  4  5
+c          a - 1  2  3  4  2  5  6  3  6  7  8  8  9
+c
+c    or (symmetrically) as
+c
+c            - 1  2  3  4  5  6  7  8  9
+c         ---+--------------------------
+c         ia - 1  4  5  7  9 10
+c         ja - 1  3  4  2  3  4  4  5  5
+c          a - 1  2  3  4  5  6  7  8  9          .
+c
+c
+c  parameters
+c
+c    n    - order of the matrix
+c
+c    ia   - integer one-dimensional array containing pointers to delimit
+c           rows in ja and a.  dimension = n+1
+c
+c    ja   - integer one-dimensional array containing the column indices
+c           corresponding to the elements of a.  dimension = number of
+c           nonzero entries in (the upper triangle of) m
+c
+c    a    - real one-dimensional array containing the nonzero entries in
+c           (the upper triangle of) m, stored by rows.  dimension =
+c           number of nonzero entries in (the upper triangle of) m
+c
+c    p    - integer one-dimensional array used to return the permutation
+c           of the rows and columns of m corresponding to the minimum
+c           degree ordering.  dimension = n
+c
+c    ip   - integer one-dimensional array used to return the inverse of
+c           the permutation returned in p.  dimension = n
+c
+c    nsp  - declared dimension of the one-dimensional array isp.  nsp
+c           must be at least  3n+4k,  where k is the number of nonzeroes
+c           in the strict upper triangle of m
+c
+c    isp  - integer one-dimensional array used for working storage.
+c           dimension = nsp
+c
+c    path - integer path specification.  values and their meanings are -
+c             1  find minimum degree ordering only
+c             2  find minimum degree ordering and reorder symmetrically
+c                  stored matrix (used when only the nonzero entries in
+c                  the upper triangle of m are being stored)
+c             3  reorder symmetrically stored matrix as specified by
+c                  input permutation (used when an ordering has already
+c                  been determined and only the nonzero entries in the
+c                  upper triangle of m are being stored)
+c             4  same as 2 but put diagonal entries at start of each row
+c             5  same as 3 but put diagonal entries at start of each row
+c
+c    flag - integer error flag.  values and their meanings are -
+c               0    no errors detected
+c              9n+k  insufficient storage in md
+c             10n+1  insufficient storage in odrv
+c             11n+1  illegal path specification
+c
+c
+c  conversion from real to KPP_REAL
+c
+c    change the real declarations in odrv and sro to KPP_REAL
+c    declarations.
+c
+c-----------------------------------------------------------------------
+c
+      integer  ia(1), ja(1),  p(1), ip(1),  isp(1),  path,  flag,
+     *   v, l, head,  tmp, q
+      KPP_REAL  a(1)
+      logical  dflag
+c
+c----initialize error flag and validate path specification
+      flag = 0
+      if (path.lt.1 .or. 5.lt.path)  go to 111
+c
+c----allocate storage and find minimum degree ordering
+      if ((path-1) * (path-2) * (path-4) .ne. 0)  go to 1
+        max = (nsp-n)/2
+        v    = 1
+        l    = v     +  max
+        head = l     +  max
+        next = head  +  n
+        if (max.lt.n)  go to 110
+c
+        CALL  md
+     *     (n, ia,ja, max,isp(v),isp(l), isp(head),p,ip, isp(v), flag)
+        if (flag.ne.0)  go to 100
+c
+c----allocate storage and symmetrically reorder matrix
+   1  if ((path-2) * (path-3) * (path-4) * (path-5) .ne. 0)  go to 2
+        tmp = (nsp+1) -      n
+        q   = tmp     - (ia(n+1)-1)
+        if (q.lt.1)  go to 110
+c
+        dflag = path.eq.4 .or. path.eq.5
+        CALL sro
+     *     (n,  ip,  ia, ja, a,  isp(tmp),  isp(q),  dflag)
+c
+   2  return
+c
+c ** error -- error detected in md
+ 100  return
+c ** error -- insufficient storage
+ 110  flag = 10*n + 1
+      return
+c ** error -- illegal path specified
+ 111  flag = 11*n + 1
+      return
+      end
+      subroutine nnfc
+     *     (n, r,c,ic, ia,ja,a, z, b,
+     *      lmax,il,jl,ijl,l, d, umax,iu,ju,iju,u,
+     *      row, tmp, irl,jrl, flag)
+clll. optimize
+c*** subroutine nnfc
+c*** numerical ldu-factorization of sparse nonsymmetric matrix and
+c      solution of system of linear equations (compressed pointer
+c      storage)
+c
+c
+c       input variables..  n, r, c, ic, ia, ja, a, b,
+c                          il, jl, ijl, lmax, iu, ju, iju, umax
+c       output variables.. z, l, d, u, flag
+c
+c       parameters used internally..
+c nia   - irl,  - vectors used to find the rows of  l.  at the kth step
+c nia   - jrl       of the factorization,  jrl(k)  points to the head
+c       -           of a linked list in  jrl  of column indices j
+c       -           such j .lt. k and  l(k,j)  is nonzero.  zero
+c       -           indicates the end of the list.  irl(j)  (j.lt.k)
+c       -           points to the smallest i such that i .ge. k and
+c       -           l(i,j)  is nonzero.
+c       -           size of each = n.
+c fia   - row   - holds intermediate values in calculation of  u and l.
+c       -           size = n.
+c fia   - tmp   - holds new right-hand side  b*  for solution of the
+c       -           equation ux = b*.
+c       -           size = n.
+c
+c  internal variables..
+c    jmin, jmax - indices of the first and last positions in a row to
+c      be examined.
+c    sum - used in calculating  tmp.
+c
+      integer rk,umax
+      integer  r(1), c(1), ic(1), ia(1), ja(1), il(1), jl(1), ijl(1)
+      integer  iu(1), ju(1), iju(1), irl(1), jrl(1), flag
+      KPP_REAL  a(1), l(1), d(1), u(1), z(1), b(1), row(1)
+      KPP_REAL  tmp(1), lki, sum, dk
+c
+c  ******  initialize pointers and test storage  ***********************
+      if(il(n+1)-1 .gt. lmax) go to 104
+      if(iu(n+1)-1 .gt. umax) go to 107
+      do 1 k=1,n
+        irl(k) = il(k)
+        jrl(k) = 0
+   1    continue
+c
+c  ******  for each row  ***********************************************
+      do 19 k=1,n
+c  ******  reverse jrl and zero row where kth row of l will fill in  ***
+        row(k) = 0
+        i1 = 0
+        if (jrl(k) .eq. 0) go to 3
+        i = jrl(k)
+   2    i2 = jrl(i)
+        jrl(i) = i1
+        i1 = i
+        row(i) = 0
+        i = i2
+        if (i .ne. 0) go to 2
+c  ******  set row to zero where u will fill in  ***********************
+   3    jmin = iju(k)
+        jmax = jmin + iu(k+1) - iu(k) - 1
+        if (jmin .gt. jmax) go to 5
+        do 4 j=jmin,jmax
+   4      row(ju(j)) = 0
+c  ******  place kth row of a in row  **********************************
+   5    rk = r(k)
+        jmin = ia(rk)
+        jmax = ia(rk+1) - 1
+        do 6 j=jmin,jmax
+          row(ic(ja(j))) = a(j)
+   6      continue
+c  ******  initialize sum, and link through jrl  ***********************
+        sum = b(rk)
+        i = i1
+        if (i .eq. 0) go to 10
+c  ******  assign the kth row of l and adjust row, sum  ****************
+   7      lki = -row(i)
+c  ******  if l is not required, then comment out the following line  **
+          l(irl(i)) = -lki
+          sum = sum + lki * tmp(i)
+          jmin = iu(i)
+          jmax = iu(i+1) - 1
+          if (jmin .gt. jmax) go to 9
+          mu = iju(i) - jmin
+          do 8 j=jmin,jmax
+   8        row(ju(mu+j)) = row(ju(mu+j)) + lki * u(j)
+   9      i = jrl(i)
+          if (i .ne. 0) go to 7
+c
+c  ******  assign kth row of u and diagonal d, set tmp(k)  *************
+  10    if (row(k) .eq. 0.0d0) go to 108
+        dk = 1.0d0 / row(k)
+        d(k) = dk
+        tmp(k) = sum * dk
+        if (k .eq. n) go to 19
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        if (jmin .gt. jmax)  go to 12
+        mu = iju(k) - jmin
+        do 11 j=jmin,jmax
+  11      u(j) = row(ju(mu+j)) * dk
+  12    continue
+c
+c  ******  update irl and jrl, keeping jrl in decreasing order  ********
+        i = i1
+        if (i .eq. 0) go to 18
+  14    irl(i) = irl(i) + 1
+        i1 = jrl(i)
+        if (irl(i) .ge. il(i+1)) go to 17
+        ijlb = irl(i) - il(i) + ijl(i)
+        j = jl(ijlb)
+  15    if (i .gt. jrl(j)) go to 16
+          j = jrl(j)
+          go to 15
+  16    jrl(i) = jrl(j)
+        jrl(j) = i
+  17    i = i1
+        if (i .ne. 0) go to 14
+  18    if (irl(k) .ge. il(k+1)) go to 19
+        j = jl(ijl(k))
+        jrl(k) = jrl(j)
+        jrl(j) = k
+  19    continue
+c
+c  ******  solve  ux = tmp  by back substitution  **********************
+      k = n
+      do 22 i=1,n
+        sum =  tmp(k)
+        jmin = iu(k)
+        jmax = iu(k+1) - 1
+        if (jmin .gt. jmax)  go to 21
+        mu = iju(k) - jmin
+        do 20 j=jmin,jmax
+  20      sum = sum - u(j) * tmp(ju(mu+j))
+  21    tmp(k) =  sum
+        z(c(k)) =  sum
+  22    k = k-1
+      flag = 0
+      return
+c
+c ** error.. insufficient storage for l
+ 104  flag = 4*n + 1
+      return
+c ** error.. insufficient storage for u
+ 107  flag = 7*n + 1
+      return
+c ** error.. zero pivot
+ 108  flag = 8*n + k
+      return
+      end
+      subroutine jgroup (n,ia,ja,maxg,ngrp,igp,jgp,incl,jdone,ier)
+clll. optimize
+      integer n, ia, ja, maxg, ngrp, igp, jgp, incl, jdone, ier
+      dimension ia(1), ja(1), igp(1), jgp(n), incl(n), jdone(n)
+c-----------------------------------------------------------------------
+c this subroutine constructs groupings of the column indices of
+c the jacobian matrix, used in the numerical evaluation of the
+c jacobian by finite differences.
+c
+c input..
+c n      = the order of the matrix.
+c ia,ja  = sparse structure descriptors of the matrix by rows.
+c maxg   = length of available storate in the igp array.
+c
+c output..
+c ngrp   = number of groups.
+c jgp    = array of length n containing the column indices by groups.
+c igp    = pointer array of length ngrp + 1 to the locations in jgp
+c          of the beginning of each group.
+c ier    = error indicator.  ier = 0 if no error occurred, or 1 if
+c          maxg was insufficient.
+c
+c incl and jdone are working arrays of length n.
+c-----------------------------------------------------------------------
+      integer i, j, k, kmin, kmax, ncol, ng
+c
+      ier = 0
+      do 10 j = 1,n
+ 10     jdone(j) = 0
+      ncol = 1
+      do 60 ng = 1,maxg
+        igp(ng) = ncol
+        do 20 i = 1,n
+ 20       incl(i) = 0
+        do 50 j = 1,n
+c reject column j if it is already in a group.--------------------------
+          if (jdone(j) .eq. 1) go to 50
+          kmin = ia(j)
+          kmax = ia(j+1) - 1
+          do 30 k = kmin,kmax
+c reject column j if it overlaps any column already in this group.------
+            i = ja(k)
+            if (incl(i) .eq. 1) go to 50
+ 30         continue
+c accept column j into group ng.----------------------------------------
+          jgp(ncol) = j
+          ncol = ncol + 1
+          jdone(j) = 1
+          do 40 k = kmin,kmax
+            i = ja(k)
+ 40         incl(i) = 1
+ 50       continue
+c stop if this group is empty (grouping is complete).-------------------
+        if (ncol .eq. igp(ng)) go to 70
+ 60     continue
+c error return if not all columns were chosen (maxg too small).---------
+      if (ncol .le. n) go to 80
+      ng = maxg
+ 70   ngrp = ng - 1
+      return
+ 80   ier = 1
+      return
+c----------------------- end of subroutine jgroup ----------------------
+      end
+      subroutine nsfc
+     *      (n, r, ic, ia,ja, jlmax,il,jl,ijl, jumax,iu,ju,iju,
+     *       q, ira,jra, irac, irl,jrl, iru,jru, flag)
+clll. optimize
+c*** subroutine nsfc
+c*** symbolic ldu-factorization of nonsymmetric sparse matrix
+c      (compressed pointer storage)
+c
+c
+c       input variables.. n, r, ic, ia, ja, jlmax, jumax.
+c       output variables.. il, jl, ijl, iu, ju, iju, flag.
+c
+c       parameters used internally..
+c nia   - q     - suppose  m*  is the result of reordering  m.  if
+c       -           processing of the ith row of  m*  (hence the ith
+c       -           row of  u) is being done,  q(j)  is initially
+c       -           nonzero if  m*(i,j) is nonzero (j.ge.i).  since
+c       -           values need not be stored, each entry points to the
+c       -           next nonzero and  q(n+1)  points to the first.  n+1
+c       -           indicates the end of the list.  for example, if n=9
+c       -           and the 5th row of  m*  is
+c       -              0 x x 0 x 0 0 x 0
+c       -           then  q  will initially be
+c       -              a a a a 8 a a 10 5           (a - arbitrary).
+c       -           as the algorithm proceeds, other elements of  q
+c       -           are inserted in the list because of fillin.
+c       -           q  is used in an analogous manner to compute the
+c       -           ith column of  l.
+c       -           size = n+1.
+c nia   - ira,  - vectors used to find the columns of  m.  at the kth
+c nia   - jra,      step of the factorization,  irac(k)  points to the
+c nia   - irac      head of a linked list in  jra  of row indices i
+c       -           such that i .ge. k and  m(i,k)  is nonzero.  zero
+c       -           indicates the end of the list.  ira(i)  (i.ge.k)
+c       -           points to the smallest j such that j .ge. k and
+c       -           m(i,j)  is nonzero.
+c       -           size of each = n.
+c nia   - irl,  - vectors used to find the rows of  l.  at the kth step
+c nia   - jrl       of the factorization,  jrl(k)  points to the head
+c       -           of a linked list in  jrl  of column indices j
+c       -           such j .lt. k and  l(k,j)  is nonzero.  zero
+c       -           indicates the end of the list.  irl(j)  (j.lt.k)
+c       -           points to the smallest i such that i .ge. k and
+c       -           l(i,j)  is nonzero.
+c       -           size of each = n.
+c nia   - iru,  - vectors used in a manner analogous to  irl and jrl
+c nia   - jru       to find the columns of  u.
+c       -           size of each = n.
+c
+c  internal variables..
+c    jlptr - points to the last position used in  jl.
+c    juptr - points to the last position used in  ju.
+c    jmin,jmax - are the indices in  a or u  of the first and last
+c                elements to be examined in a given row.
+c                for example,  jmin=ia(k), jmax=ia(k+1)-1.
+c
+      integer cend, qm, rend, rk, vj
+      integer ia(1), ja(1), ira(1), jra(1), il(1), jl(1), ijl(1)
+      integer iu(1), ju(1), iju(1), irl(1), jrl(1), iru(1), jru(1)
+      integer r(1), ic(1), q(1), irac(1), flag
+c
+c  ******  initialize pointers  ****************************************
+      np1 = n + 1
+      jlmin = 1
+      jlptr = 0
+      il(1) = 1
+      jumin = 1
+      juptr = 0
+      iu(1) = 1
+      do 1 k=1,n
+        irac(k) = 0
+        jra(k) = 0
+        jrl(k) = 0
+   1    jru(k) = 0
+c  ******  initialize column pointers for a  ***************************
+      do 2 k=1,n
+        rk = r(k)
+        iak = ia(rk)
+        if (iak .ge. ia(rk+1))  go to 101
+        jaiak = ic(ja(iak))
+        if (jaiak .gt. k)  go to 105
+        jra(k) = irac(jaiak)
+        irac(jaiak) = k
+   2    ira(k) = iak
+c
+c  ******  for each column of l and row of u  **************************
+      do 41 k=1,n
+c
+c  ******  initialize q for computing kth column of l  *****************
+        q(np1) = np1
+        luk = -1
+c  ******  by filling in kth column of a  ******************************
+        vj = irac(k)
+        if (vj .eq. 0)  go to 5
+   3      qm = np1
+   4      m = qm
+          qm =  q(m)
+          if (qm .lt. vj)  go to 4
+          if (qm .eq. vj)  go to 102
+            luk = luk + 1
+            q(m) = vj
+            q(vj) = qm
+            vj = jra(vj)
+            if (vj .ne. 0)  go to 3
+c  ******  link through jru  *******************************************
+   5    lastid = 0
+        lasti = 0
+        ijl(k) = jlptr
+        i = k
+   6      i = jru(i)
+          if (i .eq. 0)  go to 10
+          qm = np1
+          jmin = irl(i)
+          jmax = ijl(i) + il(i+1) - il(i) - 1
+          long = jmax - jmin
+          if (long .lt. 0)  go to 6
+          jtmp = jl(jmin)
+          if (jtmp .ne. k)  long = long + 1
+          if (jtmp .eq. k)  r(i) = -r(i)
+          if (lastid .ge. long)  go to 7
+            lasti = i
+            lastid = long
+c  ******  and merge the corresponding columns into the kth column  ****
+   7      do 9 j=jmin,jmax
+            vj = jl(j)
+   8        m = qm
+            qm = q(m)
+            if (qm .lt. vj)  go to 8
+            if (qm .eq. vj)  go to 9
+              luk = luk + 1
+              q(m) = vj
+              q(vj) = qm
+              qm = vj
+   9        continue
+            go to 6
+c  ******  lasti is the longest column merged into the kth  ************
+c  ******  see if it equals the entire kth column  *********************
+  10    qm = q(np1)
+        if (qm .ne. k)  go to 105
+        if (luk .eq. 0)  go to 17
+        if (lastid .ne. luk)  go to 11
+c  ******  if so, jl can be compressed  ********************************
+        irll = irl(lasti)
+        ijl(k) = irll + 1
+        if (jl(irll) .ne. k)  ijl(k) = ijl(k) - 1
+        go to 17
+c  ******  if not, see if kth column can overlap the previous one  *****
+  11    if (jlmin .gt. jlptr)  go to 15
+        qm = q(qm)
+        do 12 j=jlmin,jlptr
+          if (jl(j) - qm)  12, 13, 15
+  12      continue
+        go to 15
+  13    ijl(k) = j
+        do 14 i=j,jlptr
+          if (jl(i) .ne. qm)  go to 15
+          qm = q(qm)
+          if (qm .gt. n)  go to 17
+  14      continue
+        jlptr = j - 1
+c  ******  move column indices from q to jl, update vectors  ***********
+  15    jlmin = jlptr + 1
+        ijl(k) = jlmin
+        if (luk .eq. 0)  go to 17
+        jlptr = jlptr + luk
+        if (jlptr .gt. jlmax)  go to 103
+          qm = q(np1)
+          do 16 j=jlmin,jlptr
+            qm = q(qm)
+  16        jl(j) = qm
+  17    irl(k) = ijl(k)
+        il(k+1) = il(k) + luk
+c
+c  ******  initialize q for computing kth row of u  ********************
+        q(np1) = np1
+        luk = -1
+c  ******  by filling in kth row of reordered a  ***********************
+        rk = r(k)
+        jmin = ira(k)
+        jmax = ia(rk+1) - 1
+        if (jmin .gt. jmax)  go to 20
+        do 19 j=jmin,jmax
+          vj = ic(ja(j))
+          qm = np1
+  18      m = qm
+          qm = q(m)
+          if (qm .lt. vj)  go to 18
+          if (qm .eq. vj)  go to 102
+            luk = luk + 1
+            q(m) = vj
+            q(vj) = qm
+  19      continue
+c  ******  link through jrl,  ******************************************
+  20    lastid = 0
+        lasti = 0
+        iju(k) = juptr
+        i = k
+        i1 = jrl(k)
+  21      i = i1
+          if (i .eq. 0)  go to 26
+          i1 = jrl(i)
+          qm = np1
+          jmin = iru(i)
+          jmax = iju(i) + iu(i+1) - iu(i) - 1
+          long = jmax - jmin
+          if (long .lt. 0)  go to 21
+          jtmp = ju(jmin)
+          if (jtmp .eq. k)  go to 22
+c  ******  update irl and jrl, *****************************************
+            long = long + 1
+            cend = ijl(i) + il(i+1) - il(i)
+            irl(i) = irl(i) + 1
+            if (irl(i) .ge. cend)  go to 22
+              j = jl(irl(i))
+              jrl(i) = jrl(j)
+              jrl(j) = i
+  22      if (lastid .ge. long)  go to 23
+            lasti = i
+            lastid = long
+c  ******  and merge the corresponding rows into the kth row  **********
+  23      do 25 j=jmin,jmax
+            vj = ju(j)
+  24        m = qm
+            qm = q(m)
+            if (qm .lt. vj)  go to 24
+            if (qm .eq. vj)  go to 25
+              luk = luk + 1
+              q(m) = vj
+              q(vj) = qm
+              qm = vj
+  25        continue
+          go to 21
+c  ******  update jrl(k) and irl(k)  ***********************************
+  26    if (il(k+1) .le. il(k))  go to 27
+          j = jl(irl(k))
+          jrl(k) = jrl(j)
+          jrl(j) = k
+c  ******  lasti is the longest row merged into the kth  ***************
+c  ******  see if it equals the entire kth row  ************************
+  27    qm = q(np1)
+        if (qm .ne. k)  go to 105
+        if (luk .eq. 0)  go to 34
+        if (lastid .ne. luk)  go to 28
+c  ******  if so, ju can be compressed  ********************************
+        irul = iru(lasti)
+        iju(k) = irul + 1
+        if (ju(irul) .ne. k)  iju(k) = iju(k) - 1
+        go to 34
+c  ******  if not, see if kth row can overlap the previous one  ********
+  28    if (jumin .gt. juptr)  go to 32
+        qm = q(qm)
+        do 29 j=jumin,juptr
+          if (ju(j) - qm)  29, 30, 32
+  29      continue
+        go to 32
+  30    iju(k) = j
+        do 31 i=j,juptr
+          if (ju(i) .ne. qm)  go to 32
+          qm = q(qm)
+          if (qm .gt. n)  go to 34
+  31      continue
+        juptr = j - 1
+c  ******  move row indices from q to ju, update vectors  **************
+  32    jumin = juptr + 1
+        iju(k) = jumin
+        if (luk .eq. 0)  go to 34
+        juptr = juptr + luk
+        if (juptr .gt. jumax)  go to 106
+          qm = q(np1)
+          do 33 j=jumin,juptr
+            qm = q(qm)
+  33        ju(j) = qm
+  34    iru(k) = iju(k)
+        iu(k+1) = iu(k) + luk
+c
+c  ******  update iru, jru  ********************************************
+        i = k
+  35      i1 = jru(i)
+          if (r(i) .lt. 0)  go to 36
+          rend = iju(i) + iu(i+1) - iu(i)
+          if (iru(i) .ge. rend)  go to 37
+            j = ju(iru(i))
+            jru(i) = jru(j)
+            jru(j) = i
+            go to 37
+  36      r(i) = -r(i)
+  37      i = i1
+          if (i .eq. 0)  go to 38
+          iru(i) = iru(i) + 1
+          go to 35
+c
+c  ******  update ira, jra, irac  **************************************
+  38    i = irac(k)
+        if (i .eq. 0)  go to 41
+  39      i1 = jra(i)
+          ira(i) = ira(i) + 1
+          if (ira(i) .ge. ia(r(i)+1))  go to 40
+          irai = ira(i)
+          jairai = ic(ja(irai))
+          if (jairai .gt. i)  go to 40
+          jra(i) = irac(jairai)
+          irac(jairai) = i
+  40      i = i1
+          if (i .ne. 0)  go to 39
+  41    continue
+c
+      ijl(n) = jlptr
+      iju(n) = juptr
+      flag = 0
+      return
+c
+c ** error.. null row in a
+ 101  flag = n + rk
+      return
+c ** error.. duplicate entry in a
+ 102  flag = 2*n + rk
+      return
+c ** error.. insufficient storage for jl
+ 103  flag = 3*n + k
+      return
+c ** error.. null pivot
+ 105  flag = 5*n + k
+      return
+c ** error.. insufficient storage for ju
+ 106  flag = 6*n + k
+      return
+      end
+      subroutine sro
+     *     (n, ip, ia,ja,a, q, r, dflag)
+clll. optimize
+c***********************************************************************
+c  sro -- symmetric reordering of sparse symmetric matrix
+c***********************************************************************
+c
+c  description
+c
+c    the nonzero entries of the matrix m are assumed to be stored
+c    symmetrically in (ia,ja,a) format (i.e., not both m(i,j) and m(j,i)
+c    are stored if i ne j).
+c
+c    sro does not rearrange the order of the rows, but does move
+c    nonzeroes from one row to another to ensure that if m(i,j) will be
+c    in the upper triangle of m with respect to the new ordering, then
+c    m(i,j) is stored in row i (and thus m(j,i) is not stored),  whereas
+c    if m(i,j) will be in the strict lower triangle of m, then m(j,i) is
+c    stored in row j (and thus m(i,j) is not stored).
+c
+c
+c  additional parameters
+c
+c    q     - integer one-dimensional work array.  dimension = n
+c
+c    r     - integer one-dimensional work array.  dimension = number of
+c            nonzero entries in the upper triangle of m
+c
+c    dflag - logical variable.  if dflag = .true., then store nonzero
+c            diagonal elements at the beginning of the row
+c
+c-----------------------------------------------------------------------
+c
+      integer  ip(1),  ia(1), ja(1),  q(1), r(1)
+      KPP_REAL  a(1),  ak
+      logical  dflag
+c
+c
+c--phase 1 -- find row in which to store each nonzero
+c----initialize count of nonzeroes to be stored in each row
+      do 1 i=1,n
+  1     q(i) = 0
+c
+c----for each nonzero element a(j)
+      do 3 i=1,n
+        jmin = ia(i)
+        jmax = ia(i+1) - 1
+        if (jmin.gt.jmax)  go to 3
+        do 2 j=jmin,jmax
+c
+c--------find row (=r(j)) and column (=ja(j)) in which to store a(j) ...
+          k = ja(j)
+          if (ip(k).lt.ip(i))  ja(j) = i
+          if (ip(k).ge.ip(i))  k = i
+          r(j) = k
+c
+c--------... and increment count of nonzeroes (=q(r(j)) in that row
+  2       q(k) = q(k) + 1
+  3     continue
+c
+c
+c--phase 2 -- find new ia and permutation to apply to (ja,a)
+c----determine pointers to delimit rows in permuted (ja,a)
+      do 4 i=1,n
+        ia(i+1) = ia(i) + q(i)
+  4     q(i) = ia(i+1)
+c
+c----determine where each (ja(j),a(j)) is stored in permuted (ja,a)
+c----for each nonzero element (in reverse order)
+      ilast = 0
+      jmin = ia(1)
+      jmax = ia(n+1) - 1
+      j = jmax
+      do 6 jdummy=jmin,jmax
+        i = r(j)
+        if (.not.dflag .or. ja(j).ne.i .or. i.eq.ilast)  go to 5
+c
+c------if dflag, then put diagonal nonzero at beginning of row
+          r(j) = ia(i)
+          ilast = i
+          go to 6
+c
+c------put (off-diagonal) nonzero in last unused location in row
+  5       q(i) = q(i) - 1
+          r(j) = q(i)
+c
+  6     j = j-1
+c
+c
+c--phase 3 -- permute (ja,a) to upper triangular form (wrt new ordering)
+      do 8 j=jmin,jmax
+  7     if (r(j).eq.j)  go to 8
+          k = r(j)
+          r(j) = r(k)
+          r(k) = k
+          jak = ja(k)
+          ja(k) = ja(j)
+          ja(j) = jak
+          ak = a(k)
+          a(k) = a(j)
+          a(j) = ak
+          go to 7
+  8     continue
+c
+      return
+      end
+      subroutine md
+     *     (n, ia,ja, max, v,l, head,last,next, mark, flag)
+clll. optimize
+c***********************************************************************
+c  md -- minimum degree algorithm (based on element model)
+c***********************************************************************
+c
+c  description
+c
+c    md finds a minimum degree ordering of the rows and columns of a
+c    general sparse matrix m stored in (ia,ja,a) format.
+c    when the structure of m is nonsymmetric, the ordering is that
+c    obtained for the symmetric matrix  m + m-transpose.
+c
+c
+c  additional parameters
+c
+c    max  - declared dimension of the one-dimensional arrays v and l.
+c           max must be at least  n+2k,  where k is the number of
+c           nonzeroes in the strict upper triangle of m + m-transpose
+c
+c    v    - integer one-dimensional work array.  dimension = max
+c
+c    l    - integer one-dimensional work array.  dimension = max
+c
+c    head - integer one-dimensional work array.  dimension = n
+c
+c    last - integer one-dimensional array used to return the permutation
+c           of the rows and columns of m corresponding to the minimum
+c           degree ordering.  dimension = n
+c
+c    next - integer one-dimensional array used to return the inverse of
+c           the permutation returned in last.  dimension = n
+c
+c    mark - integer one-dimensional work array (may be the same as v).
+c           dimension = n
+c
+c    flag - integer error flag.  values and their meanings are -
+c             0     no errors detected
+c             9n+k  insufficient storage in md
+c
+c
+c  definitions of internal parameters
+c
+c    ---------+---------------------------------------------------------
+c    v(s)     - value field of list entry
+c    ---------+---------------------------------------------------------
+c    l(s)     - link field of list entry  (0 =) end of list)
+c    ---------+---------------------------------------------------------
+c    l(vi)    - pointer to element list of uneliminated vertex vi
+c    ---------+---------------------------------------------------------
+c    l(ej)    - pointer to boundary list of active element ej
+c    ---------+---------------------------------------------------------
+c    head(d)  - vj =) vj head of d-list d
+c             -  0 =) no vertex in d-list d
+c
+c
+c             -                  vi uneliminated vertex
+c             -          vi in ek           -       vi not in ek
+c    ---------+-----------------------------+---------------------------
+c    next(vi) - undefined but nonnegative   - vj =) vj next in d-list
+c             -                             -  0 =) vi tail of d-list
+c    ---------+-----------------------------+---------------------------
+c    last(vi) - (not set until mdp)         - -d =) vi head of d-list d
+c             --vk =) compute degree        - vj =) vj last in d-list
+c             - ej =) vi prototype of ej    -  0 =) vi not in any d-list
+c             -  0 =) do not compute degree -
+c    ---------+-----------------------------+---------------------------
+c    mark(vi) - mark(vk)                    - nonneg. tag .lt. mark(vk)
+c
+c
+c             -                   vi eliminated vertex
+c             -      ei active element      -           otherwise
+c    ---------+-----------------------------+---------------------------
+c    next(vi) - -j =) vi was j-th vertex    - -j =) vi was j-th vertex
+c             -       to be eliminated      -       to be eliminated
+c    ---------+-----------------------------+---------------------------
+c    last(vi) -  m =) size of ei = m        - undefined
+c    ---------+-----------------------------+---------------------------
+c    mark(vi) - -m =) overlap count of ei   - undefined
+c             -       with ek = m           -
+c             - otherwise nonnegative tag   -
+c             -       .lt. mark(vk)         -
+c
+c-----------------------------------------------------------------------
+c
+      integer  ia(1), ja(1),  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1),  flag,  tag, dmin, vk,ek, tail
+      equivalence  (vk,ek)
+c
+c----initialization
+      tag = 0
+      CALL  mdi
+     *   (n, ia,ja, max,v,l, head,last,next, mark,tag, flag)
+      if (flag.ne.0)  return
+c
+      k = 0
+      dmin = 1
+c
+c----while  k .lt. n  do
+   1  if (k.ge.n)  go to 4
+c
+c------search for vertex of minimum degree
+   2    if (head(dmin).gt.0)  go to 3
+          dmin = dmin + 1
+          go to 2
+c
+c------remove vertex vk of minimum degree from degree list
+   3    vk = head(dmin)
+        head(dmin) = next(vk)
+        if (head(dmin).gt.0)  last(head(dmin)) = -dmin
+c
+c------number vertex vk, adjust tag, and tag vk
+        k = k+1
+        next(vk) = -k
+        last(ek) = dmin - 1
+        tag = tag + last(ek)
+        mark(vk) = tag
+c
+c------form element ek from uneliminated neighbors of vk
+        CALL  mdm
+     *     (vk,tail, v,l, last,next, mark)
+c
+c------purge inactive elements and do mass elimination
+        CALL  mdp
+     *     (k,ek,tail, v,l, head,last,next, mark)
+c
+c------update degrees of uneliminated vertices in ek
+        CALL  mdu
+     *     (ek,dmin, v,l, head,last,next, mark)
+c
+        go to 1
+c
+c----generate inverse permutation from permutation
+   4  do 5 k=1,n
+        next(k) = -next(k)
+   5    last(next(k)) = k
+c
+      return
+      end
+      subroutine mdi
+     *     (n, ia,ja, max,v,l, head,last,next, mark,tag, flag)
+clll. optimize
+c***********************************************************************
+c  mdi -- initialization
+c***********************************************************************
+      integer  ia(1), ja(1),  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1), tag,  flag,  sfs, vi,dvi, vj
+c
+c----initialize degrees, element lists, and degree lists
+      do 1 vi=1,n
+        mark(vi) = 1
+        l(vi) = 0
+   1    head(vi) = 0
+      sfs = n+1
+c
+c----create nonzero structure
+c----for each nonzero entry a(vi,vj)
+      do 6 vi=1,n
+        jmin = ia(vi)
+        jmax = ia(vi+1) - 1
+        if (jmin.gt.jmax)  go to 6
+        do 5 j=jmin,jmax
+          vj = ja(j)
+          if (vj-vi) 2, 5, 4
+c
+c------if a(vi,vj) is in strict lower triangle
+c------check for previous occurrence of a(vj,vi)
+   2      lvk = vi
+          kmax = mark(vi) - 1
+          if (kmax .eq. 0) go to 4
+          do 3 k=1,kmax
+            lvk = l(lvk)
+            if (v(lvk).eq.vj) go to 5
+   3        continue
+c----for unentered entries a(vi,vj)
+   4        if (sfs.ge.max)  go to 101
+c
+c------enter vj in element list for vi
+            mark(vi) = mark(vi) + 1
+            v(sfs) = vj
+            l(sfs) = l(vi)
+            l(vi) = sfs
+            sfs = sfs+1
+c
+c------enter vi in element list for vj
+            mark(vj) = mark(vj) + 1
+            v(sfs) = vi
+            l(sfs) = l(vj)
+            l(vj) = sfs
+            sfs = sfs+1
+   5      continue
+   6    continue
+c
+c----create degree lists and initialize mark vector
+      do 7 vi=1,n
+        dvi = mark(vi)
+        next(vi) = head(dvi)
+        head(dvi) = vi
+        last(vi) = -dvi
+        nextvi = next(vi)
+        if (nextvi.gt.0)  last(nextvi) = vi
+   7    mark(vi) = tag
+c
+      return
+c
+c ** error-  insufficient storage
+ 101  flag = 9*n + vi
+      return
+      end
+      subroutine mdm
+     *     (vk,tail, v,l, last,next, mark)
+clll. optimize
+c***********************************************************************
+c  mdm -- form element from uneliminated neighbors of vk
+c***********************************************************************
+      integer  vk, tail,  v(1), l(1),   last(1), next(1),   mark(1),
+     *   tag, s,ls,vs,es, b,lb,vb, blp,blpmax
+      equivalence  (vs, es)
+c
+c----initialize tag and list of uneliminated neighbors
+      tag = mark(vk)
+      tail = vk
+c
+c----for each vertex/element vs/es in element list of vk
+      ls = l(vk)
+   1  s = ls
+      if (s.eq.0)  go to 5
+        ls = l(s)
+        vs = v(s)
+        if (next(vs).lt.0)  go to 2
+c
+c------if vs is uneliminated vertex, then tag and append to list of
+c------uneliminated neighbors
+          mark(vs) = tag
+          l(tail) = s
+          tail = s
+          go to 4
+c
+c------if es is active element, then ...
+c--------for each vertex vb in boundary list of element es
+   2      lb = l(es)
+          blpmax = last(es)
+          do 3 blp=1,blpmax
+            b = lb
+            lb = l(b)
+            vb = v(b)
+c
+c----------if vb is untagged vertex, then tag and append to list of
+c----------uneliminated neighbors
+            if (mark(vb).ge.tag)  go to 3
+              mark(vb) = tag
+              l(tail) = b
+              tail = b
+   3        continue
+c
+c--------mark es inactive
+          mark(es) = tag
+c
+   4    go to 1
+c
+c----terminate list of uneliminated neighbors
+   5  l(tail) = 0
+c
+      return
+      end
+      subroutine mdp
+     *     (k,ek,tail, v,l, head,last,next, mark)
+clll. optimize
+c***********************************************************************
+c  mdp -- purge inactive elements and do mass elimination
+c***********************************************************************
+      integer  ek, tail,  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1),  tag, free, li,vi,lvi,evi, s,ls,es, ilp,ilpmax
+c
+c----initialize tag
+      tag = mark(ek)
+c
+c----for each vertex vi in ek
+      li = ek
+      ilpmax = last(ek)
+      if (ilpmax.le.0)  go to 12
+      do 11 ilp=1,ilpmax
+        i = li
+        li = l(i)
+        vi = v(li)
+c
+c------remove vi from degree list
+        if (last(vi).eq.0)  go to 3
+          if (last(vi).gt.0)  go to 1
+            head(-last(vi)) = next(vi)
+            go to 2
+   1        next(last(vi)) = next(vi)
+   2      if (next(vi).gt.0)  last(next(vi)) = last(vi)
+c
+c------remove inactive items from element list of vi
+   3    ls = vi
+   4    s = ls
+        ls = l(s)
+        if (ls.eq.0)  go to 6
+          es = v(ls)
+          if (mark(es).lt.tag)  go to 5
+            free = ls
+            l(s) = l(ls)
+            ls = s
+   5      go to 4
+c
+c------if vi is interior vertex, then remove from list and eliminate
+   6    lvi = l(vi)
+        if (lvi.ne.0)  go to 7
+          l(i) = l(li)
+          li = i
+c
+          k = k+1
+          next(vi) = -k
+          last(ek) = last(ek) - 1
+          go to 11
+c
+c------else ...
+c--------classify vertex vi
+   7      if (l(lvi).ne.0)  go to 9
+            evi = v(lvi)
+            if (next(evi).ge.0)  go to 9
+              if (mark(evi).lt.0)  go to 8
+c
+c----------if vi is prototype vertex, then mark as such, initialize
+c----------overlap count for corresponding element, and move vi to end
+c----------of boundary list
+                last(vi) = evi
+                mark(evi) = -1
+                l(tail) = li
+                tail = li
+                l(i) = l(li)
+                li = i
+                go to 10
+c
+c----------else if vi is duplicate vertex, then mark as such and adjust
+c----------overlap count for corresponding element
+   8            last(vi) = 0
+                mark(evi) = mark(evi) - 1
+                go to 10
+c
+c----------else mark vi to compute degree
+   9            last(vi) = -ek
+c
+c--------insert ek in element list of vi
+  10      v(free) = ek
+          l(free) = l(vi)
+          l(vi) = free
+  11    continue
+c
+c----terminate boundary list
+  12  l(tail) = 0
+c
+      return
+      end
+      subroutine mdu
+     *     (ek,dmin, v,l, head,last,next, mark)
+clll. optimize
+c***********************************************************************
+c  mdu -- update degrees of uneliminated vertices in ek
+c***********************************************************************
+      integer  ek, dmin,  v(1), l(1),  head(1), last(1), next(1),
+     *   mark(1),  tag, vi,evi,dvi, s,vs,es, b,vb, ilp,ilpmax,
+     *   blp,blpmax
+      equivalence  (vs, es)
+c
+c----initialize tag
+      tag = mark(ek) - last(ek)
+c
+c----for each vertex vi in ek
+      i = ek
+      ilpmax = last(ek)
+      if (ilpmax.le.0)  go to 11
+      do 10 ilp=1,ilpmax
+        i = l(i)
+        vi = v(i)
+        if (last(vi))  1, 10, 8
+c
+c------if vi neither prototype nor duplicate vertex, then merge elements
+c------to compute degree
+   1      tag = tag + 1
+          dvi = last(ek)
+c
+c--------for each vertex/element vs/es in element list of vi
+          s = l(vi)
+   2      s = l(s)
+          if (s.eq.0)  go to 9
+            vs = v(s)
+            if (next(vs).lt.0)  go to 3
+c
+c----------if vs is uneliminated vertex, then tag and adjust degree
+              mark(vs) = tag
+              dvi = dvi + 1
+              go to 5
+c
+c----------if es is active element, then expand
+c------------check for outmatched vertex
+   3          if (mark(es).lt.0)  go to 6
+c
+c------------for each vertex vb in es
+              b = es
+              blpmax = last(es)
+              do 4 blp=1,blpmax
+                b = l(b)
+                vb = v(b)
+c
+c--------------if vb is untagged, then tag and adjust degree
+                if (mark(vb).ge.tag)  go to 4
+                  mark(vb) = tag
+                  dvi = dvi + 1
+   4            continue
+c
+   5        go to 2
+c
+c------else if vi is outmatched vertex, then adjust overlaps but do not
+c------compute degree
+   6      last(vi) = 0
+          mark(es) = mark(es) - 1
+   7      s = l(s)
+          if (s.eq.0)  go to 10
+            es = v(s)
+            if (mark(es).lt.0)  mark(es) = mark(es) - 1
+            go to 7
+c
+c------else if vi is prototype vertex, then calculate degree by
+c------inclusion/exclusion and reset overlap count
+   8      evi = last(vi)
+          dvi = last(ek) + last(evi) + mark(evi)
+          mark(evi) = 0
+c
+c------insert vi in appropriate degree list
+   9    next(vi) = head(dvi)
+        head(dvi) = vi
+        last(vi) = -dvi
+        if (next(vi).gt.0)  last(next(vi)) = vi
+        if (dvi.lt.dmin)  dmin = dvi
+c
+  10    continue
+c
+  11  return
+      end
+      KPP_REAL FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C This routine computes the unit roundoff of the machine.
+C This is defined as the smallest positive machine number
+C u such that  1.0 + u .ne. 1.0
+C
+C Subroutines/functions called by D1MACH.. None
+C-----------------------------------------------------------------------
+      KPP_REAL U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- End of Function D1MACH ------------------------
+      END
+
+        SUBROUTINE FUNC_CHEM (N, T, V, FCT)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), FCT(NVAR)
+	KPP_REAL T,TOLD
+	INTEGER N
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V, FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE JAC_CHEM (N, T, V, JV, j, ian, jan)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), JV(NVAR,NVAR)
+	KPP_REAL T,TOLD
+        INTEGER N, j, ian(1), jan(1), ii, jj
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+
+        DO ii=1,NVAR
+          DO jj=1,NVAR
+              JV(ii,jj) = 0.D0
+          END DO
+        END DO
+        call Jac(V, FIX, RCONST, JV)
+
+        RETURN
+        END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_odessa_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_odessa_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_odessa_ddm.def	(revision 3477)
@@ -0,0 +1,42 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN FULL
+#DOUBLE ON 
+#INTFILE atm_odessa_ddm
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
+#INLINE C_GLOBAL
+extern int Autonomous;
+extern double STEPSTART;
+#ENDINLINE
+
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+
+
+#INLINE C_INIT
+        STEPMIN=0.0001;
+        STEPMAX=3600.0;
+        Autonomous = 0;
+        STEPSTART=STEPMIN;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_odessa_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_odessa_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_odessa_ddm.f	(revision 3477)
@@ -0,0 +1,4398 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      REAL*8 TIN
+C TOUT - End Time
+      REAL*8 TOUT
+C Concentrations and Sensitivities
+      REAL*8 Y(NVAR,NSENSIT+1), PARAMS(NSENSIT)
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+      INTEGER i
+
+      INTEGER LIW, LRW
+C      PARAMETER (LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+C      PARAMETER (LIW = 21 + NVAR + NSENSIT)
+C      REAL*8 RWORK(LRW)
+C      INTEGER IWORK(LIW)
+C Note: the following dynamic allocation is not standard F77 and may not work on
+C       some systems. Declare LRW, LIW parameters as above with some upper bound
+C       used for NSENSIT
+      REAL*8 RWORK(22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+      INTEGER IWORK(21 + NVAR + NSENSIT)
+
+      INTEGER IOPT(3), NEQ(2)
+
+      EXTERNAL FUNC_CHEM,JAC,DFUNC_CHEMDPAR
+
+      MF = 21    ! --- BDF plus user-supplied Jacobian
+
+      LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR
+      LIW = 21 + NVAR + NSENSIT
+
+      NEQ(1) = NVAR ! --- No. of Variables
+      NEQ(2) = NSENSIT ! --- No of parameters
+
+      ITOL=1     ! --- 1=Scalar Tolerances; 4 = VECTOR TOLERANCES
+      ITASK=1    ! --- Normal Output
+      ISTATE=1
+      IOPT(1)=1  ! --- 0= No optional parameters, 1=Optional parameters
+      IOPT(2)=1  ! --- 1=Perform sensitivity analysis; 0 if not
+      IOPT(3)=0  ! --- DFUNC_CHEMDPAR supplied by the user;
+                 ! --- 0 if finite differences are to be used
+C --- Set optional parameters
+      DO 10 i=1,LRW
+        RWORK(i) = 0.0D0
+ 10   CONTINUE
+      DO 20 i=1,LIW
+        IWORK(i) = 0
+ 20   CONTINUE
+
+      RWORK(5) = STEPMIN   ! 	THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+      RWORK(6) = STEPMAX     ! THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+      RWORK(7) = 0.0D0       ! THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+      IWORK(6) = 5000        !  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+
+      CALL ODESSA( FUNC_CHEM,DFUNC_CHEMDPAR,NEQ,Y,PARAMS,TIN,TOUT,
+     &              ITOL,RTOL,ATOL,
+     1              ITASK,ISTATE,IOPT,RWORK,LRW,IWORK,LIW,
+     &              JAC,MF)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'ODESSA: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+
+        SUBROUTINE FUNC_CHEM (N, T, V, PARAMS, FCT)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        DIMENSION V(NVAR), PARAMS(*), FCT(NVAR)
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V,  FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE DFUNC_CHEMDPAR (N, T, V, PARAMS, DFCT, JPAR)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        DIMENSION V(NVAR), PARAMS(*), DFCT(NVAR)
+	INTEGER JPAR, i
+C This setting is required for sensitivities w.r.t. initial conditions
+        DO i=1,NVAR
+	  DFCT(i) = 0.d0
+	END DO
+        RETURN
+        END
+
+        SUBROUTINE JAC (N, T, V, PARAMS, ML, MU, JV, NROWPD)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        REAL*8 V(NVAR), PARAMS(*), JV(NVAR,NVAR)
+	INTEGER ML, MU, NROWPD
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        DO i=1,NVAR
+           DO j=1,NVAR
+              JV(i,j) = 0.D0
+           END DO
+        END DO
+        CALL Jac(V,  FIX, RCONST, JV)
+        RETURN
+        END
+!
+
+C      ALGORITHM 658, COLLECTED ALGORITHMS FROM ACM.
+C      THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+C      VOL. 14, NO. 1, P.61.
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE..  LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS.  SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY DIFFERENTIA
+C     EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS SENSITIVITY ANALYSIS.
+C     SUBMITTED TO ACM TRANS. MATH. SOFTWARE, (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C PROBLEM STATEMENT..
+C
+C THE ODESSA MODIFICATION OF THE LSODE PACKAGE PROVIDES THE OPTION TO
+C CALCULATE FIRST-ORDER SENSITIVITY COEFFICIENTS FOR A SYSTEM OF STIFF
+C OR NON-STIFF EXPLICIT ORDINARY DIFFERENTIAL EQUATIONS OF THE GENERAL
+C FORM :
+C
+C                  DY/DT = F(Y,T;P)     (1)
+C
+C WHERE Y IS AN N-DIMENSIONAL DEPENDENT VARIABLE VECTOR, T IS THE
+C INDEPENDENT INTEGRATION VARIABLE, AND P IS AN NPAR-DIMENSIONAL
+C CONSTANT VECTOR. THE GOVERNING EQUATIONS FOR THE FIRST-ORDER
+C SENSITIVITY COEFFICIENTS ARE GIVEN BY :
+C
+C                  S'(T) = J(T)*S(T) + DF/DP     (2)
+C
+C WHERE
+C
+C                  S(T)  = DY(T)/DP (= SENSITIVITY FUNCTIONS)
+C                  S'(T) = D(DY(T)/DP)/DT
+C                  J(T)  = DF(Y,T;P)/DY(T) (= JACOBIAN MATRIX)
+C AND              DF/DP = DF(Y,T;P)/DP (= INHOMOGENEITY MATRIX)
+C
+C SOLUTION OF EQUATIONS (1) AND (2) PROCEEDS SIMULTANEOUSLY VIA AN
+C EXTENSION OF THE LSODE PACKAGE AS DESCRIBED IN [1].
+C----------------------------------------------------------------------
+C ACKNOWLEDGEMENT : THE FOLLOWING ODESSA PACKAGE DOCUMENTATION IS A
+C                   MODIFICATION OF THE LSODE DOCUMENTATION WHICH
+C                   ACCOMPANIES THE LSODE PACKAGE CODE.
+C----------------------------------------------------------------------
+C SUMMARY OF USAGE.
+C
+C COMMUNICATION BETWEEN THE USER AND THE ODESSA PACKAGE, FOR NORMAL
+C SITUATIONS, IS SUMMARIZED HERE. THIS SUMMARY DESCRIBES ONLY A SUBSET
+C OF THE FULL SET OF OPTIONS AVAILABLE.  SEE THE FULL DESCRIPTION FOR
+C DETAILS, INCLUDING OPTIONAL COMMUNICATION, NONSTANDARD OPTIONS,
+C AND INSTRUCTIONS FOR SPECIAL SITUATIONS.  SEE ALSO THE EXAMPLE
+C PROBLEM (WITH PROGRAM AND OUTPUT) FOLLOWING THIS SUMMARY.
+C
+C A. FIRST PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE F (N, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(N), YDOT(N), PAR(NPAR)
+C WHICH SUPPLIES THE VECTOR FUNCTION F BY LOADING YDOT(I) WITH F(I).
+C N IS THE NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS IN THE
+C ABOVE MODEL. NPAR IS THE NUMBER OF MODEL PARAMETERS FOR WHICH
+C VECTOR SENSITIVITY FUNCTIONS ARE DESIRED. YOU ARE ALSO ENCOURAGED
+C TO PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE DF (N, T, Y, PAR, DFDP, JPAR)
+C              DOUBLE PRECISION T, Y, PAR, DFDP
+C              DIMENSION Y(N), PAR(NPAR), DFDP(N)
+C              GO TO (1,...,NPAR) JPAR
+C         1    DFDP(1) = DF(1)/DP(1)
+C              .
+C              DFDP(I) = DF(I)/DP(1)
+C              .
+C              DFDP(N) = DF(N)/DP(1)
+C              RETURN
+C         2    DFDP(1) = DF(1)/DP(2)
+C              .
+C              DFDP(I) = DF(I)/DP(2)
+C              .
+C              DFDP(N) = DF(N)/DP(2)
+C              RETURN
+C         .    .
+C         .    .
+C              RETURN
+C       NPAR   DFDP(1) = DF(1)/DP(NPAR)
+C              .
+C              DFDP(I) = DF(I)/DP(NPAR)
+C              .
+C              DFDP(N) = DF(N)/DP(NPAR)
+C              RETURN
+C              END
+C ONLY NONZERO ELEMENTS NEED BE LOADED. IF THIS IS NOT FEASIBLE,
+C ODESSA WILL GENERATE THIS MATRIX INTERNALLY BY DIFFERENCE QUOTIENTS.
+C
+C B. NEXT DETERMINE (OR GUESS) WHETHER OR NOT THE PROBLEM IS STIFF.
+C STIFFNESS OCCURS WHEN THE JACOBIAN MATRIX DF/DY HAS AN EIGENVALUE
+C WHOSE REAL PART IS NEGATIVE AND LARGE IN MAGNITUDE, COMPARED TO THE
+C RECIPROCAL OF THE T SPAN OF INTEREST.  IF THE PROBLEM IS NONSTIFF,
+C USE METH = 10.  IF IT IS STIFF, USE METH = 20. THE USER IS REQUIRED
+C TO INPUT THE METHOD FLAG MF = 10*METH + MITER. THERE ARE FOUR
+C STANDARD CHOICES FOR MITER WHEN A SENSITIVITY ANALYSIS IS DESIRED,
+C AND ODESSA REQUIRES THE JACOBIAN MATRIX IN SOME FORM.
+C THIS MATRIX IS REGARDED EITHER AS FULL (MITER = 1 OR 2),
+C OR BANDED (MITER = 4 OR 5). IN THE BANDED CASE, ODESSA REQUIRES TWO
+C HALF-BANDWIDTH PARAMETERS ML AND MU.  THESE ARE, RESPECTIVELY, THE
+C WIDTHS OF THE LOWER AND UPPER PARTS OF THE BAND, EXCLUDING THE MAIN
+C DIAGONAL.  THUS THE BAND CONSISTS OF THE LOCATIONS (I,J) WITH
+C I-ML .LE. J .LE. I+MU, AND THE FULL BANDWIDTH IS ML+MU+1.
+C
+C C. YOU ARE ENCOURAGED TO SUPPLY THE JACOBIAN DIRECTLY (MF = 11, 14,
+C 21, OR 24), BUT IF THIS IS NOT FEASIBLE, ODESSA WILL COMPUTE IT
+C INTERNALLY BY DIFFERENCE QUOTIENTS (MF = 12, 15, 22, OR 25). IF YOU
+C ARE SUPPLYING THE JACOBIAN, PROVIDE A SUBROUTINE OF THE FORM..
+C         SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C         DOUBLE PRECISION T, Y, PAR, PD
+C         DIMENSION Y(N), PD(NROWPD,N), PAR(NPAR)
+C WHICH SUPPLIES DF/DY BY LOADING PD AS FOLLOWS..
+C  FOR A FULL JACOBIAN (MF = 11, OR 21), LOAD PD(I,J) WITH DF(I)/DY(J),
+C  THE PARTIAL DERIVATIVE OF F(I) WITH RESPECT TO Y(J).  (IGNORE THE
+C  ML AND MU ARGUMENTS IN THIS CASE.)
+C  FOR A BANDED JACOBIAN (MF = 14, OR 24), LOAD PD(I-J+MU+1,J) WITH
+C  DF(I)/DY(J), I.E. LOAD THE DIAGONAL LINES OF DF/DY INTO THE ROWS OF
+C  PD FROM THE TOP DOWN.
+C IN EITHER CASE, ONLY NONZERO ELEMENTS NEED BE LOADED.
+C
+C D. WRITE A MAIN PROGRAM WHICH CALLS SUBROUTINE ODESSA ONCE FOR
+C EACH POINT AT WHICH ANSWERS ARE DESIRED.  THIS SHOULD ALSO PROVIDE
+C FOR POSSIBLE USE OF LOGICAL UNIT 6 FOR OUTPUT OF ERROR MESSAGES BY
+C ODESSA.  ON THE FIRST CALL TO ODESSA, SUPPLY ARGUMENTS AS FOLLOWS..
+C F     = NAME OF SUBROUTINE FOR RIGHT-HAND SIDE VECTOR F (MODEL).
+C         THIS NAME MUST BE DECLARED EXTERNAL IN CALLING PROGRAM.
+C DF    = NAME OF SUBROUTINE FOR INHOMOGENEITY MATRIX DF/DP.
+C         IF USED (IDF = 1), THIS NAME MUST BE DECLARED EXTERNAL IN
+C         CALLING PROGRAM. IF NOT USED (IDF = 0), PASS A DUMMY NAME.
+C N     = NUMBER OF FIRST ORDER ODE-S IN MODEL; LOAD INTO NEQ(1).
+C NPAR  = NUMBER OF MODEL PARAMETERS OF INTEREST; LOAD INTO NEQ(2).
+C Y     = AN (N) BY (NPAR+1) REAL ARRAY OF INITIAL VALUES..
+C         Y(I,1) , I = 1,N , CONTAIN THE STATE, OR MODEL, DEPENDENT
+C                            VARIABLES,
+C         Y(I,J) , J = 2,NPAR , CONTAIN THE DEPENDENT SENSITIVITY
+C                               COEFFICIENTS.
+C PAR   = A REAL ARRAY OF LENGTH NPAR CONTAINING MODEL PARAMETERS
+C         OF INTEREST.
+C T     = THE INITIAL VALUE OF THE INDEPENDENT VARIABLE.
+C TOUT  = FIRST POINT WHERE OUTPUT IS DESIRED (.NE. T).
+C ITOL  = 1, 2, 3, OR 4 ACCORDING AS RTOL, ATOL (BELOW) ARE  SCALARS
+C         OR ARRAYS.
+C RTOL  = RELATIVE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C ATOL  = ABSOLUTE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C         THE ESTIMATED LOCAL ERROR IN Y(I,J) WILL BE CONTROLLED SO AS
+C         TO BE ROUGHLY LESS (IN MAGNITUDE) THAN
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL          IF ITOL = 1,
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL(I,J)     IF ITOL = 2,
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL      IF ITOL = 3, OR
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL(I,J) IF ITOL = 4.
+C         THUS THE LOCAL ERROR TEST PASSES IF, IN EACH COMPONENT,
+C         EITHER THE ABSOLUTE ERROR IS LESS THAN ATOL (OR ATOL(I,J)),
+C         OR THE RELATIVE ERROR IS LESS THAN RTOL (OR RTOL(I,J)).
+C         USE RTOL = 0.0 FOR PURE ABSOLUTE ERROR CONTROL, AND
+C         USE ATOL = 0.0 FOR PURE RELATIVE ERROR CONTROL.
+C         CAUTION.. ACTUAL (GLOBAL) ERRORS MAY EXCEED THESE LOCAL
+C         TOLERANCES, SO CHOOSE THEM CONSERVATIVELY.
+C ITASK = 1 FOR NORMAL COMPUTATION OF OUTPUT VALUES OF Y AT T = TOUT.
+C ISTATE = INTEGER FLAG (INPUT AND OUTPUT).  SET ISTATE = 1.
+C IOPT  = 0, TO INDICATE NO OPTIONAL INPUTS FOR INTEGRATION;
+C          LOAD INTO IOPT(1).
+C ISOPT = 1, TO INDICATE SENSITIVITY ANALYSIS, = 0, TO INDICATE
+C          NO SENSITIVITY ANALYSIS; LOAD INTO IOPT(2).
+C IDF   = 1, IF SUBROUTINE DF (ABOVE) IS SUPPLIED BY THE USER,
+C          = 0, OTHERWISE; LOAD INTO IOPT(3).
+C RWORK = REAL WORK ARRAY OF LENGTH AT LEAST..
+C           22 + 16*N + N**2           FOR MF = 11 OR 12,
+C           22 + 17*N + (2*ML + MU)*N  FOR MF = 14 OR 15,
+C           22 +  9*N + N**2           FOR MF = 21 OR 22,
+C           22 + 10*N + (2*ML + MU)*N  FOR MF = 24 OR 25,
+C         IF ISOPT = 0, OR..
+C           22 + 15*(NPAR+1)*N + N**2 + N           FOR MF = 11 OR 12,
+C           24 + 15*(NPAR+1)*N + (2*ML+MU+2)*N + N  FOR MF = 14 OR 15,
+C           22 + 8*(NPAR+1)*N + N**2 + N            FOR MF = 21 OR 22,
+C           24 + 8*(NPAR+1)*N + (2*ML+MU+2)*N + N   FOR MF = 24 OR 25,
+C         IF ISOPT = 1.
+C LRW   = DECLARED LENGTH OF RWORK (IN USER-S DIMENSION STATEMENT).
+C IWORK = INTEGER WORK ARRAY OF LENGTH AT LEAST..
+C          20 + N         IF ISOPT = 0,
+C          21 + N + NPAR  IF ISOPT = 1.
+C        IF MITER = 4 OR 5, INPUT IN IWORK(1),IWORK(2) THE LOWER
+C        AND UPPER HALF-BANDWIDTHS ML,MU (EXCLUDING MAIN DIAGONAL).
+C LIW  = DECLARED LENGTH OF IWORK (IN USER-S DIMENSION STATEMENT).
+C JAC  = NAME OF SUBROUTINE FOR JACOBIAN MATRIX.
+C        IF USED, THIS NAME MUST BE DECLARED EXTERNAL IN CALLING
+C        PROGRAM.  IF NOT USED, PASS A DUMMY NAME.
+C MF   = METHOD FLAG.  STANDARD VALUES FOR ISOPT = 0 ARE..
+C         10 FOR NONSTIFF (ADAMS) METHOD, NO JACOBIAN USED.
+C         21 FOR STIFF (BDF) METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         22 FOR STIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         24 FOR STIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         25 FOR STIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C        IF ISOPT = 1, MF = 10 IS ILLEGAL AND CAN BE REPLACED BY..
+C         11 FOR NONSTIFF METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         12 FOR NONSTIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         14 FOR NONSTIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         15 FOR NONSTIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C NOTE THAT THE MAIN PROGRAM MUST DECLARE ARRAYS Y, RWORK, IWORK, AND
+C POSSIBLY ATOL AND RTOL, AS WELL AS NEQ, IOPT, AND PAR IF ISOPT = 1.
+C
+C E. THE OUTPUT FROM THE FIRST CALL (OR ANY CALL) IS..
+C     Y = ARRAY OF COMPUTED VALUES OF Y(T) VECTOR.
+C     T = CORRESPONDING VALUE OF INDEPENDENT VARIABLE (NORMALLY TOUT).
+C ISTATE = 2  IF ODESSA WAS SUCCESSFUL, NEGATIVE OTHERWISE.
+C         -1 MEANS EXCESS WORK DONE ON THIS CALL (PERHAPS WRONG MF).
+C         -2 MEANS EXCESS ACCURACY REQUESTED (TOLERANCES TOO SMALL).
+C         -3 MEANS ILLEGAL INPUT DETECTED (SEE PRINTED MESSAGE).
+C         -4 MEANS REPEATED ERROR TEST FAILURES (CHECK ALL INPUTS).
+C         -5 MEANS REPEATED CONVERGENCE FAILURES (PERHAPS BAD JACOBIAN
+C            SUPPLIED OR WRONG CHOICE OF MF OR TOLERANCES).
+C         -6 MEANS ERROR WEIGHT BECAME ZERO DURING PROBLEM. (SOLUTION
+C            COMPONENT I,J VANISHED, AND ATOL OR ATOL(I,J) = 0.0)
+C
+C F. TO CONTINUE THE INTEGRATION AFTER A SUCCESSFUL RETURN, SIMPLY
+C RESET TOUT AND CALL ODESSA AGAIN. NO OTHER PARAMETERS NEED BE RESET.
+C----------------------------------------------------------------------
+C EXAMPLE PROBLEM.
+C
+C THE FOLLOWING IS A SIMPLE EXAMPLE PROBLEM, WITH THE CODING
+C NEEDED FOR ITS SOLUTION BY ODESSA.  THE PROBLEM IS FROM CHEMICAL
+C KINETICS, AND CONSISTS OF THE FOLLOWING THREE RATE EQUATIONS..
+C    DY1/DT = -PAR(1)*Y1 + PAR(2)*Y2*Y3 ; PAR(1) = .04, PAR(2) = 1.E4
+C    DY2/DT = PAR(1)*Y1 - PAR(2)*Y2*Y3 - PAR(3)*Y2**2 ; PAR(3) = 3.E7
+C    DY3/DT = PAR(3)*Y2**2
+C ON THE INTERVAL FROM T = 0.0 TO T = 4.E10, WITH INITIAL CONDITIONS
+C Y1 = 1.0, Y2 = Y3 = 0, AND S(I,J) = 0, I = 1,3, J = 1,3.
+C THE PROBLEM IS STIFF.
+C
+C THE FOLLOWING CODING KppSolveS THIS PROBLEM WITH ODESSA, USING
+C MF = 21 AND PRINTING RESULTS AT T = .4, 4., ..., 4.E10.
+C IT USES ITOL = 4 AND ATOL MUCH SMALLER FOR Y2 THAN Y1 OR Y3,
+C BECAUSE Y2 HAS MUCH SMALLER VALUES. LESS STRINGENT TOLERANCES
+C ARE ASSIGNED FOR THE SENSITIVITIES TO ACHIEVE GREATER EFFICIENCY.
+C AT THE END OF THE RUN, STATISTICAL QUANTITIES OF INTEREST ARE
+C PRINTED (SEE OPTIONAL OUTPUTS IN THE FULL DESCRIPTION BELOW).
+C
+C      DOUBLE PRECISION ATOL, RWORK, RTOL, T, TOUT, Y, PAR
+C      EXTERNAL FEX, JEX, DFEX
+C      DIMENSION Y(3,4), PAR(3), ATOL(3,4), RTOL(3,4), RWORK(130),
+C     1  IWORK(27), NEQ(2), IOPT(3)
+C      N = 3
+C      NPAR = 3
+C      NEQ(1) = N
+C      NEQ(2) = NPAR
+C      NSV = NPAR+1
+C      DO 10 I = 1,N
+C      DO 10 J = 1,NSV
+C 10     Y(I,J) = 0.0D0
+C      Y(1,1) = 1.0D0
+C      PAR(1) = 0.04D0
+C      PAR(2) = 1.0D4
+C      PAR(3) = 3.0D7
+C      T = 0.D0
+C      TOUT = .4D0
+C      ITOL = 4
+C      ATOL(1,1) = 1.D-6
+C      ATOL(2,1) = 1.D-10
+C      ATOL(3,1) = 1.D-6
+C      DO 20 I = 1,N
+C        RTOL(I,1) = 1.D-4
+C        DO 15 J = 2,NSV
+C          RTOL(I,J) = 1.D-3
+C 15       ATOL(I,J) = 1.D2 * ATOL(I,1)
+C 20   CONTINUE
+C      ITASK = 1
+C      ISTATE = 1
+C      IOPT(1) = 0
+C      IOPT(2) = 1
+C      IOPT(3) = 1
+C      LRW = 130
+C      LIW = 27
+C      MF = 21
+C      DO 60 IOUT = 1,12
+C        CALL ODESSA(FEX,DFEX,NEQ,Y,PAR,T,TOUT,ITOL,RTOL,ATOL,
+C     1    ITASK,ISTATE, IOPT,RWORK,LRW,IWORK,LIW,JEX,MF)
+C        WRITE(6,30)T,Y(1,1),Y(2,1),Y(3,1)
+C 30     FORMAT(1X,7H AT T =,E12.4,6H   Y =,3E14.6)
+C        DO 50 J = 2,NSV
+C          JPAR = J-1
+C          WRITE(6,40)JPAR,Y(1,J),Y(2,J),Y(3,J)
+C 40       FORMAT(20X,2HS(,I1,3H) =,3E14.6)
+C 50     CONTINUE
+C        IF (ISTATE .LT. 0) GO TO 80
+C 60     TOUT = TOUT*10.D0
+C      WRITE(6,70)IWORK(11),IWORK(12),IWORK(13),IWORK(19)
+C 70   FORMAT(1X,/,12H NO. STEPS =,I4,11H  NO. F-S =,I4,11H  NO. J-S =,
+C     1  I4,12H  NO. DF-S =,I4)
+C      STOP
+C 80   WRITE(6,90)ISTATE
+C 90   FORMAT(///22H ERROR HALT.. ISTATE =,I3)
+C      STOP
+C      END
+C
+C      SUBROUTINE FEX (NEQ, T, Y, PAR, YDOT)
+C      DOUBLE PRECISION T, Y, YDOT, PAR
+C      DIMENSION Y(3), YDOT(3), PAR(3)
+C      YDOT(1) = -PAR(1)*Y(1) + PAR(2)*Y(2)*Y(3)
+C      YDOT(3) = PAR(3)*Y(2)*Y(2)
+C      YDOT(2) = -YDOT(1) - YDOT(3)
+C      RETURN
+C      END
+C
+C      SUBROUTINE JEX (NEQ, T, Y, PAR, ML, MU, PD, NRPD)
+C      DOUBLE PRECISION PD, T, Y, PAR
+C      DIMENSION Y(3), PD(NRPD,3), PAR(3)
+C      PD(1,1) = -PAR(1)
+C      PD(1,2) = PAR(2)*Y(3)
+C      PD(1,3) = PAR(2)*Y(2)
+C      PD(2,1) = PAR(1)
+C      PD(2,3) = -PD(1,3)
+C      PD(3,2) = 2.D0*PAR(3)*Y(2)
+C      PD(2,2) = -PD(1,2) - PD(3,2)
+C      RETURN
+C      END
+C
+C      SUBROUTINE DFEX (NEQ, T, Y, PAR, DFDP, JPAR)
+C      DOUBLE PRECISION T, Y, PAR, DFDP
+C      DIMENSION Y(3), PAR(3), DFDP(3)
+C      GO TO (1,2,3), JPAR
+C  1   DFDP(1) = -Y(1)
+C      DFDP(2) = Y(1)
+C      RETURN
+C  2   DFDP(1) = Y(2)*Y(3)
+C      DFDP(2) = -Y(2)*Y(3)
+C      RETURN
+C  3   DFDP(2) = -Y(2)*Y(2)
+C      DFDP(3) = Y(2)*Y(2)
+C      RETURN
+C      END
+C
+C  THE OUTPUT OF THIS PROGRAM (ON A DATA GENERAL MV-8000 IN
+C  DOUBLE PRECISION IS AS FOLLOWS:
+C
+C AT T =   .4000E+00   Y =   .985173E+00   .338641E-04   .147930E-01
+C                   S(1) =  -.355914E+00   .390261E-03   .355524E+00
+C                   S(2) =   .955150E-07  -.213065E-09  -.953019E-07
+C                   S(3) =  -.158466E-10  -.529012E-12   .163756E-10
+C AT T =   .4000E+01   Y =   .905516E+00   .224044E-04   .944615E-01
+C                   S(1) =  -.187621E+01   .179197E-03   .187603E+01
+C                   S(2) =   .296093E-05  -.583104E-09  -.296034E-05
+C                   S(3) =  -.493267E-09  -.276246E-12   .493544E-09
+C AT T =   .4000E+02   Y =   .715848E+00   .918628E-05   .284143E+00
+C                   S(1) =  -.424730E+01   .459360E-04   .424726E+01
+C                   S(2) =   .137294E-04  -.235815E-09  -.137291E-04
+C                   S(3) =  -.228818E-08  -.113803E-12   .228829E-08
+C AT T =   .4000E+03   Y =   .450526E+00   .322299E-05   .549471E+00
+C                   S(1) =  -.595837E+01   .354310E-05   .595836E+01
+C                   S(2) =   .227380E-04  -.226041E-10  -.227380E-04
+C                   S(3) =  -.378971E-08  -.499501E-13   .378976E-08
+C AT T =   .4000E+04   Y =   .183185E+00   .894131E-06   .816814E+00
+C                   S(1) =  -.475006E+01  -.599504E-05   .475007E+01
+C                   S(2) =   .188089E-04   .231330E-10  -.188089E-04
+C                   S(3) =  -.313478E-08  -.187575E-13   .313480E-08
+C AT T =   .4000E+05   Y =   .389733E-01   .162133E-06   .961027E+00
+C                   S(1) =  -.157477E+01  -.276199E-05   .157477E+01
+C                   S(2) =   .628668E-05   .110026E-10  -.628670E-05
+C                   S(3) =  -.104776E-08  -.453588E-14   .104776E-08
+C AT T =   .4000E+06   Y =   .493609E-02   .198411E-07   .995064E+00
+C                   S(1) =  -.236244E+00  -.458262E-06   .236244E+00
+C                   S(2) =   .944669E-06   .183193E-11  -.944671E-06
+C                   S(3) =  -.157441E-09  -.635990E-15   .157442E-09
+C AT T =   .4000E+07   Y =   .516087E-03   .206540E-08   .999484E+00
+C                   S(1) =  -.256277E-01  -.509808E-07   .256278E-01
+C                   S(2) =   .102506E-06   .203905E-12  -.102506E-06
+C                   S(3) =  -.170825E-10  -.684002E-16   .170826E-10
+C AT T =   .4000E+08   Y =   .519314E-04   .207736E-09   .999948E+00
+C                   S(1) =  -.259316E-02  -.518029E-08   .259316E-02
+C                   S(2) =   .103726E-07   .207209E-13  -.103726E-07
+C                   S(3) =  -.172845E-11  -.691450E-17   .172845E-11
+C AT T =   .4000E+09   Y =   .544710E-05   .217885E-10   .999995E+00
+C                   S(1) =  -.271637E-03  -.541849E-09   .271638E-03
+C                   S(2) =   .108655E-08   .216739E-14  -.108655E-08
+C                   S(3) =  -.180902E-12  -.723615E-18   .180902E-12
+C AT T =   .4000E+10   Y =   .446748E-06   .178699E-11   .100000E+01
+C                   S(1) =  -.322322E-04  -.842541E-10   .322323E-04
+C                   S(2) =   .128929E-09   .337016E-15  -.128929E-09
+C                   S(3) =  -.209715E-13  -.838859E-19   .209715E-13
+C AT T =   .4000E+11   Y =  -.363960E-07  -.145584E-12   .100000E+01
+C                   S(1) =  -.164109E-06  -.429604E-11   .164113E-06
+C                   S(2) =   .656436E-12   .171842E-16  -.656451E-12
+C                   S(3) =  -.689361E-15  -.275745E-20   .689363E-15
+C
+C NO. STEPS = 340  NO. F-S = 412  NO. J-S = 343  NO. DF-S =1023
+C----------------------------------------------------------------------
+C FULL DESCRIPTION OF USER INTERFACE TO ODESSA.
+C
+C THE USER INTERFACE TO ODESSA CONSISTS OF THE FOLLOWING PARTS.
+C
+C I.  THE CALL SEQUENCE TO SUBROUTINE ODESSA, WHICH IS A DRIVER
+C     ROUTINE FOR THE KppSolveR.  THIS INCLUDES DESCRIPTIONS OF BOTH
+C     THE CALL SEQUENCE ARGUMENTS AND OF USER-SUPPLIED ROUTINES.
+C     FOLLOWING THESE DESCRIPTIONS IS A DESCRIPTION OF
+C     OPTIONAL INPUTS AVAILABLE THROUGH THE CALL SEQUENCE, AND THEN
+C     A DESCRIPTION OF OPTIONAL OUTPUTS (IN THE WORK ARRAYS).
+C
+C II.  DESCRIPTIONS OF OTHER ROUTINES IN THE ODESSA PACKAGE THAT MAY
+C     BE (OPTIONALLY) CALLED BY THE USER.  THESE PROVIDE THE ABILITY
+C     TO ALTER ERROR MESSAGE HANDLING, SAVE AND RESTORE THE INTERNAL
+C     COMMON, AND OBTAIN SPECIFIED DERIVATIVES OF THE SOLUTION Y(T).
+C
+C III. DESCRIPTIONS OF COMMON BLOCKS TO BE DECLARED IN OVERLAY
+C     OR SIMILAR ENVIRONMENTS, OR TO BE SAVED WHEN DOING AN INTERRUPT
+C     OF THE PROBLEM AND CONTINUED SOLUTION LATER.
+C
+C IV.  DESCRIPTION OF TWO SUBROUTINES IN THE ODESSA PACKAGE, EITHER OF
+C     WHICH THE USER MAY REPLACE WITH HIS OWN VERSION, IF DESIRED.
+C     THESE RELATE TO THE MEASUREMENT OF ERRORS.
+C
+C V.   GENERAL REMARKS WHICH HIGHLIGHT DIFFERENCES BETWEEN THE LSODE
+C     PACKAGE AND THE ODESSA PACKAGE.
+C----------------------------------------------------------------------
+C PART I.  CALL SEQUENCE.
+C
+C THE CALL SEQUENCE PARAMETERS USED FOR INPUT ONLY ARE..
+C    F, DF, NEQ, PAR, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, LRW, LIW,
+C    JAC, MF,
+C AND THOSE USED FOR BOTH INPUT AND OUTPUT ARE
+C    Y, T, ISTATE.
+C THE WORK ARRAYS RWORK AND IWORK ARE ALSO USED FOR CONDITIONAL AND
+C OPTIONAL INPUTS AND OPTIONAL OUTPUTS.  (THE TERM OUTPUT HERE REFERS
+C TO THE RETURN FROM SUBROUTINE ODESSA TO THE USER-S CALLING PROGRAM.)
+C
+C THE LEGALITY OF INPUT PARAMETERS WILL BE THOROUGHLY CHECKED ON THE
+C INITIAL CALL FOR THE PROBLEM, BUT NOT CHECKED THEREAFTER UNLESS A
+C CHANGE IN INPUT PARAMETERS IS FLAGGED BY ISTATE = 3 ON INPUT.
+C
+C THE DESCRIPTIONS OF THE CALL ARGUMENTS ARE AS FOLLOWS.
+C
+C F     = THE NAME OF THE USER-SUPPLIED SUBROUTINE DEFINING THE
+C         ODE MODEL. THIS SYSTEM MUST BE PUT IN THE FIRST-ORDER
+C         FORM DY/DT = F(Y,T;P), WHERE F IS A VECTOR-VALUED FUNCTION
+C         OF THE SCALAR T AND VECTORS Y, AND PAR.  SUBROUTINE F IS TO
+C         COMPUTE THE FUNCTION F.  IT IS TO HAVE THE FORM..
+C              SUBROUTINE F (NEQ, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(1), PAR(1), YDOT(1)
+C         WHERE NEQ, T, Y, AND PAR ARE INPUT, AND YDOT = F(Y,T;P)
+C         IS OUTPUT.  Y AND YDOT ARE ARRAYS OF LENGTH N (= NEQ(1)).
+C         (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C         F SHOULD NOT ALTER ARRAY Y, OR PAR(1),...,PAR(NPAR).
+C         F MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C
+C         SUBROUTINE F MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN F) AND PAR HAS LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR BELOW.
+C
+C DF    = THE NAME OF THE USER-SUPPLIED ROUTINE (IDF = 1) TO COMPUTE
+C         THE INHOMOGENEITY MATRIX, DF/DP, AS A FUNCTION OF THE SCALAR
+C         T, AND THE VECTORS Y, AND PAR. IT IS TO HAVE THE FORM
+C                SUBROUTINE DF (NEQ, T, Y, PAR, DFDP, JPAR)
+C                DOUBLE PRECISION T, Y, PAR, DFDP
+C                DIMENSION Y(1), PAR(1), DFDP(1)
+C                GO TO (1,2,...,NPAR) JPAR
+C            1   DFDP(1) = DF(1)/DP(1)
+C                .
+C                DFDP(I) = DF(I)/DP(1)
+C                .
+C                DFDP(N) = DF(N)/DP(1)
+C                RETURN
+C            2   DFDP(1) = DF(1)/DP(2)
+C                .
+C                DFDP(I) = DF(I)/DP(2)
+C                .
+C                DFDP(N) = DF(N)/DP(2)
+C                .
+C                RETURN
+C            .   .
+C            .   .
+C          NPAR  DFDP(1) = DF(1)/DP(NPAR)
+C                .
+C                DFDP(I) = DF(I)/DP(NPAR)
+C                .
+C                DFDP(N) = DF(N)/DP(NPAR)
+C                RETURN
+C                END
+C         WHERE NEQ, T, Y, PAR, AND JPAR ARE INPUT AND THE VECTOR
+C         DFDP(*,JPAR) IS TO BE LOADED WITH THE PARTIAL DERIVATIVES
+C         DF(Y,T;PAR)/DP(JPAR) ON OUTPUT. ONLY NONZERO ELEMENTS NEED
+C         BE LOADED.  T, Y, AND PAR HAVE THE SAME MEANING AS IN
+C         SUBROUTINE F. (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE).
+C
+C         DFDP(*,JPAR) IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY
+C         THE NONZERO ELEMENTS NEED BE LOADED BY DF. SUBROUTINE DF
+C         MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM IF USED.
+C         IF IDF = 0 (OR ISOPT = 0), A DUMMY ARGUMENT CAN BE USED.
+C
+C         SUBROUTINE DF MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN DF) AND PAR HAS A LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR (BELOW).
+C
+C NEQ   = THE SIZE OF THE ODE SYSTEM (NUMBER OF FIRST ORDER ORDINARY
+C         DIFFERENTIAL EQUATIONS (N) IN THE MODEL).  USED ONLY FOR
+C         INPUT.  NEQ MAY NOT BE CHANGED DURING THE PROBLEM.
+C
+C         FOR ISOPT = 0, NEQ IS NORMALLY A SCALAR.  HOWEVER, NEQ MAY
+C         BE AN ARRAY, WITH NEQ(1) SET TO THE SYSTEM SIZE (N), IN WHICH
+C         CASE THE ODESSA PACKAGE ACCESSES ONLY NEQ(1). HOWEVER,
+C         THIS PARAMETER IS PASSED AS THE NEQ ARGUMENT IN ALL CALLS
+C         TO F, DF, AND JAC.  HENCE, IF IT IS AN ARRAY, LOCATIONS
+C         NEQ(2),... MAY BE USED TO STORE OTHER INTEGER DATA AND PASS
+C         IT TO F, DF, AND/OR JAC.  FOR ISOPT = 1, NPAR MUST BE LOADED
+C         INTO NEQ(2), AND IS NOT ALLOWED TO CHANGE DURING THE PROBLEM.
+C         IN THESE CASES, SUBROUTINES F, DF, AND/OR JAC MUST INCLUDE
+C         NEQ IN A DIMENSION STATEMENT.
+C
+C Y     = A REAL ARRAY FOR THE VECTOR OF DEPENDENT VARIABLES, OF
+C         DIMENSION (N) BY (NPAR+1).  USED FOR BOTH INPUT AND
+C         OUTPUT ON THE FIRST CALL (ISTATE = 1), AND ONLY FOR
+C         OUTPUT ON OTHER CALLS. ON THE FIRST CALL, Y MUST CONTAIN
+C         THE VECTORS OF INITIAL VALUES.  ON OUTPUT, Y CONTAINS THE
+C         COMPUTED SOLUTION VECTORS, EVALUATED AT T.
+C
+C PAR   = A REAL ARRAY FOR THE VECTOR OF CONSTANT MODEL PARAMETERS
+C         OF INTEREST IN THE SENSITIVITY ANALYSIS, OF LENGTH NPAR
+C         OR MORE. PAR IS PASSED AS AN ARGUMENT IN ALL CALLS TO F,
+C         DF, AND JAC. HENCE LOCATIONS PAR(NPAR+1),... MAY BE USED
+C         TO STORE OTHER REAL DATA AND PASS IT TO F, DF, AND/OR JAC.
+C         LOCATIONS PAR(1),...,PAR(NPAR) ARE USED AS INPUT ONLY,
+C         AND MUST NOT BE CHANGED DURING THE PROBLEM.
+C
+C T     = THE INDEPENDENT VARIABLE.  ON INPUT, T IS USED ONLY ON THE
+C         FIRST CALL, AS THE INITIAL POINT OF THE INTEGRATION.
+C         ON OUTPUT, AFTER EACH CALL, T IS THE VALUE AT WHICH A
+C         COMPUTED SOLUTION Y IS EVALUATED (USUALLY THE SAME AS TOUT).
+C         ON AN ERROR RETURN, T IS THE FARTHEST POINT REACHED.
+C
+C TOUT  = THE NEXT VALUE OF T AT WHICH A COMPUTED SOLUTION IS DESIRED.
+C         USED ONLY FOR INPUT.
+C
+C         WHEN STARTING THE PROBLEM (ISTATE = 1), TOUT MAY BE EQUAL
+C         TO T FOR ONE CALL, THEN SHOULD .NE. T FOR THE NEXT CALL.
+C         FOR THE INITIAL T, AN INPUT VALUE OF TOUT .NE. T IS USED
+C         IN ORDER TO DETERMINE THE DIRECTION OF THE INTEGRATION
+C         (I.E. THE ALGEBRAIC SIGN OF THE STEP SIZES) AND THE ROUGH
+C         SCALE OF THE PROBLEM.  INTEGRATION IN EITHER DIRECTION
+C         (FORWARD OR BACKWARD IN T) IS PERMITTED.
+C
+C         IF ITASK = 2 OR 5 (ONE-STEP MODES), TOUT IS IGNORED AFTER
+C         THE FIRST CALL (I.E. THE FIRST CALL WITH TOUT .NE. T).
+C         OTHERWISE, TOUT IS REQUIRED ON EVERY CALL.
+C
+C         IF ITASK = 1, 3, OR 4, THE VALUES OF TOUT NEED NOT BE
+C         MONOTONE, BUT A VALUE OF TOUT WHICH BACKS UP IS LIMITED
+C         TO THE CURRENT INTERNAL T INTERVAL, WHOSE ENDPOINTS ARE
+C         TCUR - HU AND TCUR (SEE OPTIONAL OUTPUTS, BELOW, FOR
+C         TCUR AND HU).
+C
+C ITOL  = AN INDICATOR FOR THE TYPE OF ERROR CONTROL.  SEE
+C         DESCRIPTION BELOW UNDER ATOL.  USED ONLY FOR INPUT.
+C
+C RTOL  = A RELATIVE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  SEE DESCRIPTION BELOW
+C         UNDER ATOL. INPUT ONLY.
+C
+C ATOL  = AN ABSOLUTE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  INPUT ONLY.
+C
+C            THE INPUT PARAMETERS ITOL, RTOL, AND ATOL DETERMINE
+C         THE ERROR CONTROL PERFORMED BY THE KppSolveR.  THE KppSolveR WILL
+C         CONTROL THE VECTOR E = (E(I,J)) OF ESTIMATED LOCAL ERRORS
+C         IN Y, ACCORDING TO AN INEQUALITY OF THE FORM
+C                   RMS-NORM OF ( E(I,J)/EWT(I,J) )   .LE.   1,
+C         WHERE     EWT(I,J) = RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J),
+C         AND THE RMS-NORM (ROOT-MEAN-SQUARE NORM) HERE IS
+C         RMS-NORM(V) = SQRT ( (1/N) * SUM (V(I,J)**2) ); I =1,...,N.
+C         HERE EWT = (EWT(I,J)) IS A VECTOR OF WEIGHTS WHICH MUST
+C         ALWAYS BE POSITIVE, AND THE VALUES OF RTOL AND ATOL SHOULD
+C         ALL BE NON-NEGATIVE.  THE FOLLOWING TABLE GIVES THE TYPES
+C         (SCALAR/ARRAY) OF RTOL AND ATOL, AND THE CORRESPONDING FORM
+C         OF EWT(I,J).
+C
+C          ITOL   RTOL      ATOL           EWT(I,J)
+C           1    SCALAR    SCALAR   RTOL*ABS(Y(I,J)) + ATOL
+C           2    SCALAR    ARRAY    RTOL*ABS(Y(I,J)) + ATOL(I,J)
+C           3    ARRAY     SCALAR   RTOL(I,J)*ABS(Y(I,J)) + ATOL
+C           4    ARRAY     ARRAY    RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J)
+C
+C         WHEN EITHER OF THESE PARAMETERS IS A SCALAR, IT NEED NOT
+C         BE DIMENSIONED IN THE USER-S CALLING PROGRAM.
+C
+C         THE TOTAL NUMBER OF ERROR TEST FAILURES DUE TO THE SENSITIVITY
+C         ANALYSIS, AND WHICH REQUIRE AN INTEGRATION STEP TO BE
+C         REPEATED, ARE ACCUMULATED IN THE LAST NPAR+1 LOCATIONS OF THE
+C         INTEGER WORK ARRAY IWORK (SEE OPTIONAL OUTPUTS BELOW).
+C         THIS INFORMATION MAY BE OF VALUE IN DETERMINING APPROPRIATE
+C         ERROR TOLERANCES TO BE APPLIED TO THE SENSITIVITY FUNCTIONS.
+C
+C         IF NONE OF THE ABOVE CHOICES (WITH ITOL, RTOL, AND ATOL
+C         FIXED THROUGHOUT THE PROBLEM) IS SUITABLE, MORE GENERAL
+C         ERROR CONTROLS CAN BE OBTAINED BY SUBSTITUTING
+C         USER-SUPPLIED ROUTINES FOR THE SETTING OF EWT AND/OR FOR
+C         THE NORM CALCULATION.  SEE PART IV BELOW.
+C
+C         IF GLOBAL ERRORS ARE TO BE ESTIMATED BY MAKING A REPEATED
+C         RUN ON THE SAME PROBLEM WITH SMALLER TOLERANCES, THEN ALL
+C         COMPONENTS OF RTOL AND ATOL (I.E. OF EWT) SHOULD BE SCALED
+C         DOWN UNIFORMLY.
+C
+C ITASK  = AN INDEX SPECIFYING THE TASK TO BE PERFORMED.
+C         INPUT ONLY.  ITASK HAS THE FOLLOWING VALUES AND MEANINGS.
+C         1  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT (BY OVERSHOOTING AND INTERPOLATING).
+C         2  MEANS TAKE ONE STEP ONLY AND RETURN.
+C         3  MEANS STOP AT THE FIRST INTERNAL MESH POINT AT OR
+C            BEYOND T = TOUT AND RETURN.
+C         4  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT BUT WITHOUT OVERSHOOTING T = TCRIT.
+C            TCRIT MUST BE INPUT AS RWORK(1).  TCRIT MAY BE EQUAL TO
+C            OR BEYOND TOUT, BUT NOT BEHIND IT IN THE DIRECTION OF
+C            INTEGRATION.  THIS OPTION IS USEFUL IF THE PROBLEM
+C            HAS A SINGULARITY AT OR BEYOND T = TCRIT.
+C         5  MEANS TAKE ONE STEP, WITHOUT PASSING TCRIT, AND RETURN.
+C            TCRIT MUST BE INPUT AS RWORK(1).
+C
+C         NOTE..  IF ITASK = 4 OR 5 AND THE KppSolveR REACHES TCRIT
+C         (WITHIN ROUNDOFF), IT WILL RETURN T = TCRIT (EXACTLY) TO
+C         INDICATE THIS (UNLESS ITASK = 4 AND TOUT COMES BEFORE TCRIT,
+C         IN WHICH CASE ANSWERS AT T = TOUT ARE RETURNED FIRST).
+C
+C ISTATE = AN INDEX USED FOR INPUT AND OUTPUT TO SPECIFY THE
+C         THE STATE OF THE CALCULATION.
+C
+C         ON INPUT, THE VALUES OF ISTATE ARE AS FOLLOWS.
+C         1  MEANS THIS IS THE FIRST CALL FOR THE PROBLEM
+C            (INITIALIZATIONS WILL BE DONE).  SEE NOTE BELOW.
+C         2  MEANS THIS IS NOT THE FIRST CALL, AND THE CALCULATION
+C            IS TO CONTINUE NORMALLY, WITH NO CHANGE IN ANY INPUT
+C            PARAMETERS EXCEPT POSSIBLY TOUT AND ITASK.
+C            (IF ITOL, RTOL, AND/OR ATOL ARE CHANGED BETWEEN CALLS
+C            WITH ISTATE = 2, THE NEW VALUES WILL BE USED BUT NOT
+C            TESTED FOR LEGALITY.)
+C         3  MEANS THIS IS NOT THE FIRST CALL, AND THE
+C            CALCULATION IS TO CONTINUE NORMALLY, BUT WITH
+C            A CHANGE IN INPUT PARAMETERS OTHER THAN
+C            TOUT AND ITASK.  CHANGES ARE ALLOWED IN
+C            ITOL, RTOL, ATOL, IOPT, LRW, LIW, MF, ML, MU,
+C            AND ANY OF THE OPTIONAL INPUTS EXCEPT H0.
+C            (SEE IWORK DESCRIPTION FOR ML AND MU.)
+C         NOTE..  A PRELIMINARY CALL WITH TOUT = T IS NOT COUNTED
+C         AS A FIRST CALL HERE, AS NO INITIALIZATION OR CHECKING OF
+C         INPUT IS DONE.  (SUCH A CALL IS SOMETIMES USEFUL FOR THE
+C         PURPOSE OF OUTPUTTING THE INITIAL CONDITIONS.)
+C         THUS THE FIRST CALL FOR WHICH TOUT .NE. T REQUIRES
+C         ISTATE = 1 ON INPUT.
+C
+C         ON OUTPUT, ISTATE HAS THE FOLLOWING VALUES AND MEANINGS.
+C          1  MEANS NOTHING WAS DONE, AS TOUT WAS EQUAL TO T WITH
+C             ISTATE = 1 ON INPUT.  (HOWEVER, AN INTERNAL COUNTER WAS
+C             SET TO DETECT AND PREVENT REPEATED CALLS OF THIS TYPE.)
+C          2  MEANS THE INTEGRATION WAS PERFORMED SUCCESSFULLY.
+C         -1  MEANS AN EXCESSIVE AMOUNT OF WORK (MORE THAN MXSTEP
+C             STEPS) WAS DONE ON THIS CALL, BEFORE COMPLETING THE
+C             REQUESTED TASK, BUT THE INTEGRATION WAS OTHERWISE
+C             SUCCESSFUL AS FAR AS T.  (MXSTEP IS AN OPTIONAL INPUT
+C             AND IS NORMALLY 500.)  TO CONTINUE, THE USER MAY
+C             SIMPLY RESET ISTATE TO A VALUE .GT. 1 AND CALL AGAIN
+C             (THE EXCESS WORK STEP COUNTER WILL BE RESET TO 0).
+C             IN ADDITION, THE USER MAY INCREASE MXSTEP TO AVOID
+C             THIS ERROR RETURN (SEE BELOW ON OPTIONAL INPUTS).
+C         -2  MEANS TOO MUCH ACCURACY WAS REQUESTED FOR THE PRECISION
+C             OF THE MACHINE BEING USED.  THIS WAS DETECTED BEFORE
+C             COMPLETING THE REQUESTED TASK, BUT THE INTEGRATION
+C             WAS SUCCESSFUL AS FAR AS T.  TO CONTINUE, THE TOLERANCE
+C             PARAMETERS MUST BE RESET, AND ISTATE MUST BE SET
+C             TO 3.  THE OPTIONAL OUTPUT TOLSF MAY BE USED FOR THIS
+C             PURPOSE.  (NOTE.. IF THIS CONDITION IS DETECTED BEFORE
+C             TAKING ANY STEPS, THEN AN ILLEGAL INPUT RETURN
+C             (ISTATE = -3) OCCURS INSTEAD.)
+C         -3  MEANS ILLEGAL INPUT WAS DETECTED, BEFORE TAKING ANY
+C             INTEGRATION STEPS.  SEE WRITTEN MESSAGE FOR DETAILS.
+C             NOTE..  IF THE KppSolveR DETECTS AN INFINITE LOOP OF CALLS
+C             TO THE KppSolveR WITH ILLEGAL INPUT, IT WILL CAUSE
+C             THE RUN TO STOP.
+C         -4  MEANS THERE WERE REPEATED ERROR TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THE PROBLEM MAY HAVE A SINGULARITY, OR THE INPUT
+C             MAY BE INAPPROPRIATE.
+C         -5  MEANS THERE WERE REPEATED CONVERGENCE TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THIS MAY BE CAUSED BY AN INACCURATE JACOBIAN MATRIX,
+C             IF ONE IS BEING USED.
+C         -6  MEANS EWT(I,J) BECAME ZERO FOR SOME I,J DURING THE
+C             INTEGRATION.  PURE RELATIVE ERROR CONTROL (ATOL(I,J)=0.0)
+C             WAS REQUESTED ON A VARIABLE WHICH HAS NOW VANISHED.
+C             THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C
+C         NOTE..  SINCE THE NORMAL OUTPUT VALUE OF ISTATE IS 2,
+C         IT DOES NOT NEED TO BE RESET FOR NORMAL CONTINUATION.
+C         ALSO, SINCE A NEGATIVE INPUT VALUE OF ISTATE WILL BE
+C         REGARDED AS ILLEGAL, A NEGATIVE OUTPUT VALUE REQUIRES THE
+C         USER TO CHANGE IT, AND POSSIBLY OTHER INPUTS, BEFORE
+C         CALLING THE KppSolveR AGAIN.
+C
+C IOPT  = AN INTEGER ARRAY FLAG TO SPECIFY WHETHER OR NOT ANY OPTIONAL
+C         INPUTS ARE BEING USED ON THIS CALL.  INPUT ONLY.
+C         THE OPTIONAL INPUTS ARE LISTED SEPARATELY BELOW.
+C         IOPT(1) = 0 MEANS NO OPTIONAL INPUTS FOR THE KppSolveR WILL BE
+C                   USED. DEFAULT VALUES WILL BE USED IN ALL CASES.
+C                 = 1 MEANS ONE OR MORE OPTIONAL INPUTS FOR THE
+C                   KppSolveR ARE BEING USED.
+C                   NOTE : IOPT(1) IS INDEPENDENT OF ISOPT AND IDF.
+C         IOPT(2) = 0 MEANS NO SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                 = 1 MEANS A SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                   NOTE : IOPT(2) IS RENAMED TO ISOPT IN ODESSA.
+C                 = 0 MEANS DF/DP WILL BE CALCULATED BY FINITE
+C                   DIFFERENCE WITHIN ODESSA.
+C         IOPT(3) = 1 MEANS DF/DP WILL BE CALCULATED BY A USER-SUPPLIED
+C                   ROUTINE.
+C                   NOTE : IOPT(3) IS RENAMED TO IDF IN ODESSA.
+C                          IF IDF = 1, THE USER MUST SUPPLY A
+C                          SUBROUTINE DF (THE NAME IS ARBITRARY) AS
+C                          DESCRIBED BELOW UNDER DF. FOR IDF = 0,
+C                          A DUMMY ARGUMENT CAN BE USED.
+C
+C RWORK  = A REAL WORKING ARRAY (DOUBLE PRECISION).
+C         FOR ISOPT = 0, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 3*NEQ + LWM
+C         FOR ISOPT = 1, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 2*NYH + LWM + N
+C         WHERE..
+C         NYH    = THE TOTAL NUMBER OF DEPENDENT VARIABLES;
+C                  (= N IF ISOPT = 0, AND N*(NPAR+1) IF ISOPT = 1).
+C         MAXORD = 12 (IF METH = 1) OR 5 (IF METH = 2) (UNLESS A
+C                  SMALLER VALUE IS GIVEN AS AN OPTIONAL INPUT),
+C         LWM    = 0                  IF MITER = 0,
+C         LWM    = N**2 + 2           IF MITER IS 1 OR 2,
+C         LWM    = N + 2              IF MITER = 3, AND
+C         LWM    = (2*ML+MU+1)*N + 2  IF MITER IS 4 OR 5.
+C         (SEE THE MF DESCRIPTION FOR METH AND MITER.)
+C
+C         THE FIRST 20 WORDS OF RWORK ARE RESERVED FOR CONDITIONAL
+C         AND OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING WORD IN RWORK IS A CONDITIONAL INPUT..
+C           RWORK(1) = TCRIT = CRITICAL VALUE OF T WHICH THE KppSolveR
+C                      IS NOT TO OVERSHOOT.  REQUIRED IF ITASK IS
+C                      4 OR 5, AND IGNORED OTHERWISE.  (SEE ITASK.)
+C
+C LRW   = THE LENGTH OF THE ARRAY RWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C IWORK  = AN INTEGER WORK ARRAY. THE LENGTH MUST BE AT LEAST..
+C            20      IF MITER = 0 OR 3 (MF = 10, 13, 20, 23), OR
+C            20 + N  OTHERWISE (MF = 11, 12, 14, 15, 21, 22, 24, 25).
+C          FOR ISOPT = 0, OR..
+C            21 + N + NPAR
+C          FOR ISOPT = 1.
+C         THE FIRST FEW WORDS OF IWORK ARE USED FOR CONDITIONAL AND
+C         OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING 2 WORDS IN IWORK ARE CONDITIONAL INPUTS..
+C           IWORK(1) = ML     THESE ARE THE LOWER AND UPPER
+C           IWORK(2) = MU     HALF-BANDWIDTHS, RESPECTIVELY, OF THE
+C                      BANDED JACOBIAN, EXCLUDING THE MAIN DIAGONAL.
+C                      THE BAND IS DEFINED BY THE MATRIX LOCATIONS
+C                      (I,J) WITH I-ML .LE. J .LE. I+MU.  ML AND MU
+C                      MUST SATISFY  0 .LE.  ML,MU  .LE. NEQ-1.
+C                      THESE ARE REQUIRED IF MITER IS 4 OR 5, AND
+C                      IGNORED OTHERWISE.  ML AND MU MAY IN FACT BE
+C                      THE BAND PARAMETERS FOR A MATRIX TO WHICH
+C                      DF/DY IS ONLY APPROXIMATELY EQUAL.
+*
+C
+C LIW   = THE LENGTH OF THE ARRAY IWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C NOTE..  THE WORK ARRAYS MUST NOT BE ALTERED BETWEEN CALLS TO ODESSA
+C FOR THE SAME PROBLEM, EXCEPT POSSIBLY FOR THE CONDITIONAL AND
+C OPTIONAL INPUTS, AND EXCEPT FOR THE LAST 2*NYH + N WORDS OF RWORK.
+C THE LATTER SPACE IS USED FOR INTERNAL SCRATCH SPACE, AND SO IS
+C AVAILABLE FOR USE BY THE USER OUTSIDE ODESSA BETWEEN CALLS, IF
+C DESIRED (BUT NOT FOR USE BY F, DF, OR JAC).
+C
+C JAC   = THE NAME OF THE USER-SUPPLIED ROUTINE (MITER = 1 OR 4) TO
+C         COMPUTE THE JACOBIAN MATRIX, DF/DY, AS A FUNCTION OF THE
+C         SCALAR T AND THE VECTORS Y, AND PAR.  IT IS TO HAVE THE FORM
+C              SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C              DOUBLE PRECISION T, Y, PAR, PD
+C              DIMENSION Y(1), PAR(1), PD(NROWPD,1)
+C         WHERE NEQ, T, Y, PAR, ML, MU, AND NROWPD ARE INPUT AND THE
+C         ARRAY PD IS TO BE LOADED WITH PARTIAL DERIVATIVES (ELEMENTS
+C         OF THE JACOBIAN MATRIX) ON OUTPUT.  PD MUST BE GIVEN A FIRST
+C         DIMENSION OF NROWPD.  T, Y, AND PAR HAVE THE SAME MEANING AS
+C         IN SUBROUTINE F.  (IN THE DIMENSION STATEMENT ABOVE, 1 IS A
+C         DUMMY DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C              IN THE FULL MATRIX CASE (MITER = 1), ML AND MU ARE
+C         IGNORED, AND THE JACOBIAN IS TO BE LOADED INTO PD IN
+C         COLUMNWISE MANNER, WITH DF(I)/DY(J) LOADED INTO PD(I,J).
+C              IN THE BAND MATRIX CASE (MITER = 4), THE ELEMENTS
+C         WITHIN THE BAND ARE TO BE LOADED INTO PD IN COLUMNWISE
+C         MANNER, WITH DIAGONAL LINES OF DF/DY LOADED INTO THE ROWS
+C         OF PD.  THUS DF(I)/DY(J) IS TO BE LOADED INTO PD(I-J+MU+1,J).
+C         ML AND MU ARE THE HALF-BANDWIDTH PARAMETERS (SEE IWORK).
+C         THE LOCATIONS IN PD IN THE TWO TRIANGULAR AREAS WHICH
+C         CORRESPOND TO NONEXISTENT MATRIX ELEMENTS CAN BE IGNORED
+C         OR LOADED ARBITRARILY, AS THEY ARE OVERWRITTEN BY ODESSA.
+C              PD IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY THE
+C         NONZERO ELEMENTS NEED BE LOADED BY JAC. EACH CALL TO JAC IS
+C         PRECEDED BY A CALL TO F WITH THE SAME ARGUMENTS NEQ, T, Y,
+C         AND PAR. THUS TO GAIN SOME EFFICIENCY, INTERMEDIATE
+C         QUANTITIES SHARED BY BOTH CALCULATIONS MAY BE SAVED IN A
+C         USER COMMON BLOCK BY F AND NOT RECOMPUTED BY JAC, IF
+C         DESIRED.  ALSO, JAC MAY ALTER THE Y ARRAY, IF DESIRED.
+C         JAC MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C              SUBROUTINE JAC MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),.... SEE THE DESCRIPTIONS OF
+C         NEQ (ABOVE) AND PAR (BELOW).
+C
+C MF    = THE METHOD FLAG.  USED ONLY FOR INPUT.  THE LEGAL VALUES OF
+C         MF ARE 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, AND 25.
+C         MF HAS DECIMAL DIGITS METH AND MITER.. MF = 10*METH + MITER.
+C         METH INDICATES THE BASIC LINEAR MULTISTEP METHOD..
+C           METH = 1 MEANS THE IMPLICIT ADAMS METHOD.
+*
+C           METH = 2 MEANS THE METHOD BASED ON BACKWARD
+C                    DIFFERENTIATION FORMULAS (BDF-S).
+C         MITER INDICATES THE CORRECTOR ITERATION METHOD..
+C           MITER = 0 MEANS FUNCTIONAL ITERATION (NO JACOBIAN MATRIX
+C                     IS INVOLVED).
+C           MITER = 1 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     FULL (NEQ BY NEQ) JACOBIAN.
+C           MITER = 2 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED (DIFFERENCE QUOTIENT) FULL JACOBIAN
+C                     (USING NEQ EXTRA CALLS TO F PER DF/DY VALUE).
+C           MITER = 3 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED DIAGONAL JACOBIAN APPROXIMATION.
+C                     (USING 1 EXTRA CALL TO F PER DF/DY EVALUATION).
+C           MITER = 4 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     BANDED JACOBIAN.
+C           MITER = 5 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED BANDED JACOBIAN (USING ML+MU+1 EXTRA
+C                     CALLS TO F PER DF/DY EVALUATION).
+C         IF MITER = 1 OR 4, THE USER MUST SUPPLY A SUBROUTINE JAC
+C         (THE NAME IS ARBITRARY) AS DESCRIBED ABOVE UNDER JAC.
+C         FOR OTHER VALUES OF MITER, A DUMMY ARGUMENT CAN BE USED.
+C
+C         IF A SENSITIVITY ANLYSIS IS DESIRED (ISOPT = 1), MITER = 0
+C         AND 3 ARE DISALLOWED. IN THESE CASES, THE USER IS RECOMMENDED
+C         TO SUPPLY AN ANALYTICAL JACOBIAN (MITER = 1 OR 4) AND AN
+C         ANALYTICAL INHOMOGENEITY MATRIX (IDF = 1).
+C----------------------------------------------------------------------
+C OPTIONAL INPUTS.
+C
+C THE FOLLOWING IS A LIST OF THE OPTIONAL INPUTS PROVIDED FOR IN THE
+C CALL SEQUENCE.  (SEE ALSO PART II.)  FOR EACH SUCH INPUT VARIABLE,
+C THIS TABLE LISTS ITS NAME AS USED IN THIS DOCUMENTATION, ITS
+C LOCATION IN THE CALL SEQUENCE, ITS MEANING, AND THE DEFAULT VALUE.
+C THE USE OF ANY OF THESE INPUTS REQUIRES IOPT(1) = 1, AND IN THAT
+C CASE ALL OF THESE INPUTS ARE EXAMINED.  A VALUE OF ZERO FOR ANY
+C OF THESE OPTIONAL INPUTS WILL CAUSE THE DEFAULT VALUE TO BE USED.
+C THUS TO USE A SUBSET OF THE OPTIONAL INPUTS, SIMPLY PRELOAD
+C LOCATIONS 5 TO 10 IN RWORK AND IWORK TO 0.0 AND 0 RESPECTIVELY, AND
+C THEN SET THOSE OF INTEREST TO NONZERO VALUES.
+C
+C NAME   LOCATION      MEANING AND DEFAULT VALUE
+C
+C H0     RWORK(5)  THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+C                  THE DEFAULT VALUE IS DETERMINED BY THE KppSolveR.
+C
+C HMAX   RWORK(6)  THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS INFINITE.
+C
+C HMIN   RWORK(7)  THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS 0.  (THIS LOWER BOUND IS NOT
+C                  ENFORCED ON THE FINAL STEP BEFORE REACHING TCRIT
+C                  WHEN ITASK = 4 OR 5.)
+C
+C MAXORD  IWORK(5)  THE MAXIMUM ORDER TO BE ALLOWED.  THE DEFAULT
+C                  VALUE IS 12 IF METH = 1, AND 5 IF METH = 2.
+C                  IF MAXORD EXCEEDS THE DEFAULT VALUE, IT WILL
+C                  BE REDUCED TO THE DEFAULT VALUE.
+C                  IF MAXORD IS CHANGED DURING THE PROBLEM, IT MAY
+C                  CAUSE THE CURRENT ORDER TO BE REDUCED.
+C
+C MXSTEP  IWORK(6)  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+C                  ALLOWED DURING ONE CALL TO THE KppSolveR.
+C                  THE DEFAULT VALUE IS 500.
+C
+C MXHNIL  IWORK(7)  MAXIMUM NUMBER OF MESSAGES PRINTED (PER PROBLEM)
+C                  WARNING THAT T + H = T ON A STEP (H = STEP SIZE).
+C                  THIS MUST BE POSITIVE TO RESULT IN A NON-DEFAULT
+C                  VALUE.  THE DEFAULT VALUE IS 10.
+C----------------------------------------------------------------------
+C OPTIONAL OUTPUTS.
+C
+C AS OPTIONAL ADDITIONAL OUTPUT FROM ODESSA, THE VARIABLES LISTED
+C BELOW ARE QUANTITIES RELATED TO THE PERFORMANCE OF ODESSA
+C WHICH ARE AVAILABLE TO THE USER.  THESE ARE COMMUNICATED BY WAY OF
+C THE WORK ARRAYS, BUT ALSO HAVE INTERNAL MNEMONIC NAMES AS SHOWN.
+C EXCEPT WHERE STATED OTHERWISE, ALL OF THESE OUTPUTS ARE DEFINED
+C ON ANY SUCCESSFUL RETURN FROM ODESSA, AND ON ANY RETURN WITH
+C ISTATE = -1, -2, -4, -5, OR -6.  ON AN ILLEGAL INPUT RETURN
+C (ISTATE = -3), THEY WILL BE UNCHANGED FROM THEIR EXISTING VALUES
+C (IF ANY), EXCEPT POSSIBLY FOR TOLSF, LENRW, AND LENIW.
+C ON ANY ERROR RETURN, OUTPUTS RELEVANT TO THE ERROR WILL BE DEFINED,
+C AS NOTED BELOW.
+C
+C NAME   LOCATION      MEANING
+C
+C HU     RWORK(11) THE STEP SIZE IN T LAST USED (SUCCESSFULLY).
+C
+C HCUR   RWORK(12) THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C TCUR   RWORK(13) THE CURRENT VALUE OF THE INDEPENDENT VARIABLE
+C                  WHICH THE KppSolveR HAS ACTUALLY REACHED, I.E. THE
+C                  CURRENT INTERNAL MESH POINT IN T.  ON OUTPUT, TCUR
+C                  WILL ALWAYS BE AT LEAST AS FAR AS THE ARGUMENT
+C                  T, BUT MAY BE FARTHER (IF INTERPOLATION WAS DONE).
+C
+C TOLSF  RWORK(14) A TOLERANCE SCALE FACTOR, GREATER THAN 1.0,
+C                  COMPUTED WHEN A REQUEST FOR TOO MUCH ACCURACY WAS
+C                  DETECTED (ISTATE = -3 IF DETECTED AT THE START OF
+C                  THE PROBLEM, ISTATE = -2 OTHERWISE).  IF ITOL IS
+C                  LEFT UNALTERED BUT RTOL AND ATOL ARE UNIFORMLY
+C                  SCALED UP BY A FACTOR OF TOLSF FOR THE NEXT CALL,
+C                  THEN THE KppSolveR IS DEEMED LIKELY TO SUCCEED.
+C                  (THE USER MAY ALSO IGNORE TOLSF AND ALTER THE
+C                  TOLERANCE PARAMETERS IN ANY OTHER WAY APPROPRIATE.)
+C
+C NST    IWORK(11) THE NUMBER OF STEPS TAKEN FOR THE PROBLEM SO FAR.
+C
+C NFE    IWORK(12) THE NUMBER OF F EVALUATIONS FOR THE PROBLEM SO FAR.
+C
+C NJE    IWORK(13) THE NUMBER OF JACOBIAN EVALUATIONS (AND OF MATRIX
+C                  LU DECOMPOSITIONS IF ISOPT = 0) FOR THE PROBLEM SO
+C                  FAR. IF ISOPT = 1, THE NUMBER OF LU DECOMPOSITIONS
+C                  IS EQUAL TO NJE - NSPE (SEE BELOW).
+C
+C NQU    IWORK(14) THE METHOD ORDER LAST USED (SUCCESSFULLY).
+C
+C NQCUR  IWORK(15) THE ORDER TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C IMXER  IWORK(16) THE INDEX OF THE COMPONENT OF LARGEST MAGNITUDE IN
+C                  THE WEIGHTED LOCAL ERROR VECTOR (E(I,J)/EWT(I,J)),
+C                  ON AN ERROR RETURN WITH ISTATE = -4 OR -5.
+C
+C LENRW  IWORK(17) THE LENGTH OF RWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C LENIW  IWORK(18) THE LENGTH OF IWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C NDFE   IWORK(19) THE NUMBER OF DF/DP (VECTOR) EVALUATIONS.
+C
+C NSPE   IWORK(20) THE NUMBER OF CALLS TO SUBROUTINE SPRIME. EACH CALL
+C                  TO SPRIME REQUIRES A JACOBIAN EVALUATION, BUT NOT
+C                  AN LU DECOMPOSITION.
+C
+C THE FOLLOWING ARRAYS ARE SEGMENTS OF THE RWORK AND IWORK ARRAYS
+C WHICH MAY ALSO BE OF INTEREST TO THE USER AS OPTIONAL OUTPUTS.
+C FOR EACH ARRAY, THE TABLE BELOW GIVES ITS INTERNAL NAME, ITS BASE
+C ADDRESS IN RWORK OR IWORK, AND ITS DESCRIPTION.
+C
+C NAME   BASE ADDRESS      DESCRIPTION
+C
+C YH     21 IN RWORK    THE NORDSIECK HISTORY ARRAY, OF SIZE NYH BY
+C                       (NQCUR + 1). FOR J = 0,1,...,NQCUR, COLUMN J+1
+C                       OF YH CONTAINS HCUR**J/FACTORIAL(J) TIMES
+C                       THE J-TH DERIVATIVE OF THE INTERPOLATING
+C                       POLYNOMIAL CURRENTLY REPRESENTING THE SOLUTION,
+C                       EVALUATED AT T = TCUR.
+C
+C ACOR    LENRW-NYH+1   ARRAY OF SIZE NYH USED FOR THE ACCUMULATED
+C         IN RWORK      CORRECTIONS ON EACH STEP, SCALED ON OUTPUT
+C                       TO REPRESENT THE ESTIMATED LOCAL ERROR IN Y
+C                       ON THE LAST STEP.  THIS IS THE VECTOR E IN
+C                       THE DESCRIPTION OF THE ERROR CONTROL.
+C                       IT IS DEFINED ONLY ON A SUCCESSFUL RETURN
+C                       FROM ODESSA.
+C NRS     LENIW-NPAR    ARRAY OF SIZE NPAR+1, USED TO STORE THE
+C         IN IWORK      ACCUMULATED NUMBER OF REPEATED STEPS DUE TO
+C                       THE SENSITIVITY ANALYSIS..
+C                         NRS(1) = TOTAL NUMBER OF REPEATED STEPS,
+C                         NRS(2),... = NUMBER OF REPEATED STEPS DUE TO
+C                                      MODEL PARAMETER 1,...
+C
+C----------------------------------------------------------------------
+C PART II.  OTHER ROUTINES CALLABLE.
+C
+C THE FOLLOWING ARE OPTIONAL CALLS WHICH THE USER MAY MAKE TO
+C GAIN ADDITIONAL CAPABILITIES IN CONJUNCTION WITH ODESSA.
+C (THE ROUTINES XSETUN AND XSETF ARE DESIGNED TO CONFORM TO THE
+C SLATEC ERROR HANDLING PACKAGE.)
+C
+C    FORM OF CALL                  FUNCTION
+C  CALL XSETUN(LUN)          SET THE LOGICAL UNIT NUMBER, LUN, FOR
+C                            OUTPUT OF MESSAGES FROM ODESSA, IF
+C                            THE DEFAULT IS NOT DESIRED.
+C                            THE DEFAULT VALUE OF LUN IS 6.
+C
+C  CALL XSETF(MFLAG)         SET A FLAG TO CONTROL THE PRINTING OF
+C                            MESSAGES BY ODESSA..
+C                            MFLAG = 0 MEANS DO NOT PRINT. (DANGER..
+C                            THIS RISKS LOSING VALUABLE INFORMATION.)
+C                            MFLAG = 1 MEANS PRINT (THE DEFAULT).
+C
+C                            EITHER OF THE ABOVE CALLS MAY BE MADE AT
+C                            ANY TIME AND WILL TAKE EFFECT IMMEDIATELY.
+C
+C  CALL SVCOM (RSAV, ISAV)   STORE IN RSAV AND ISAV THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA (SEE PART III BELOW).
+C                            RSAV MUST BE A REAL ARRAY OF LENGTH 222
+C                            OR MORE, AND ISAV MUST BE AN INTEGER
+C                            ARRAY OF LENGTH 54 OR MORE.
+C
+C  CALL RSCOM (RSAV, ISAV)   RESTORE, FROM RSAV AND ISAV, THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA.  PRESUMES A PRIOR CALL TO SVCOM
+C                            WITH THE SAME ARGUMENTS.
+C
+C                            SVCOM AND RSCOM ARE USEFUL IF
+C                            INTERRUPTING A RUN AND RESTARTING
+C                            LATER, OR ALTERNATING BETWEEN TWO OR
+C                            MORE PROBLEMS KppSolveD WITH ODESSA.
+C
+C  CALL INTDY(,,,,,)         PROVIDE DERIVATIVES OF Y, OF VARIOUS
+C       (SEE BELOW)          ORDERS, AT A SPECIFIED POINT T, IF
+C                            DESIRED.  IT MAY BE CALLED ONLY AFTER
+C                            A SUCCESSFUL RETURN FROM ODESSA.
+C
+C THE DETAILED INSTRUCTIONS FOR USING INTDY ARE AS FOLLOWS.
+C THE FORM OF THE CALL IS..
+C
+C  CALL INTDY (T, K, RWORK(21), NYH, DKY, IFLAG)
+C
+C THE INPUT PARAMETERS ARE..
+C
+C T        = VALUE OF INDEPENDENT VARIABLE WHERE ANSWERS ARE DESIRED
+C            (NORMALLY THE SAME AS THE T LAST RETURNED BY ODESSA).
+C            FOR VALID RESULTS, T MUST LIE BETWEEN TCUR - HU AND TCUR.
+C            (SEE OPTIONAL OUTPUTS FOR TCUR AND HU.)
+C K        = INTEGER ORDER OF THE DERIVATIVE DESIRED.  K MUST SATISFY
+C            0 .LE. K .LE. NQCUR, WHERE NQCUR IS THE CURRENT ORDER
+C            (SEE OPTIONAL OUTPUTS).  THE CAPABILITY CORRESPONDING
+C            TO K = 0, I.E. COMPUTING Y(T), IS ALREADY PROVIDED
+C            BY ODESSA DIRECTLY.  SINCE NQCUR .GE. 1, THE FIRST
+C            DERIVATIVE DY/DT IS ALWAYS AVAILABLE WITH INTDY.
+C RWORK(21) = THE BASE ADDRESS OF THE HISTORY ARRAY YH.
+C NYH      = COLUMN LENGTH OF YH, EQUAL TO THE TOTAL NUMBER OF
+C            DEPENDENT VARIABLES. IF ISOPT = 0, NYH = N. IF ISOPT = 1,
+C            NYH = N * (NPAR + 1).
+C
+C THE OUTPUT PARAMETERS ARE..
+C
+C DKY      = A REAL ARRAY OF LENGTH NYH CONTAINING THE COMPUTED VALUE
+C            OF THE K-TH DERIVATIVE OF Y(T).
+C IFLAG    = INTEGER FLAG, RETURNED AS 0 IF K AND T WERE LEGAL,
+C            -1 IF K WAS ILLEGAL, AND -2 IF T WAS ILLEGAL.
+C            ON AN ERROR RETURN, A MESSAGE IS ALSO WRITTEN.
+C----------------------------------------------------------------------
+C PART III.  COMMON BLOCKS.
+C
+C IF ODESSA IS TO BE USED IN AN OVERLAY SITUATION, THE USER
+C MUST DECLARE, IN THE PRIMARY OVERLAY, THE VARIABLES IN..
+C  (1) THE CALL SEQUENCE TO ODESSA,
+C  (2) THE THREE INTERNAL COMMON BLOCKS
+C        /ODE001/  OF LENGTH  258  (219 DOUBLE PRECISION WORDS
+C                        FOLLOWED BY 39 INTEGER WORDS),
+C        /ODE002/  OF LENGTH 14 (3 DOUBLE PRECISION WORDS FOLLOWED
+C                        BY 11 INTEGER WORDS),
+C        /EH0001/  OF LENGTH  2 (INTEGER WORDS).
+C
+C IF ODESSA IS USED ON A SYSTEM IN WHICH THE CONTENTS OF INTERNAL
+C COMMON BLOCKS ARE NOT PRESERVED BETWEEN CALLS, THE USER SHOULD
+C DECLARE THE ABOVE THREE COMMON BLOCKS IN HIS MAIN PROGRAM TO INSURE
+C THAT THEIR CONTENTS ARE PRESERVED.
+C
+C IF THE SOLUTION OF A GIVEN PROBLEM BY ODESSA IS TO BE INTERRUPTED
+C AND THEN LATER CONTINUED, SUCH AS WHEN RESTARTING AN INTERRUPTED RUN
+C OR ALTERNATING BETWEEN TWO OR MORE PROBLEMS, THE USER SHOULD SAVE,
+C FOLLOWING THE RETURN FROM THE LAST ODESSA CALL PRIOR TO THE
+C INTERRUPTION, THE CONTENTS OF THE CALL SEQUENCE VARIABLES AND THE
+C INTERNAL COMMON BLOCKS, AND LATER RESTORE THESE VALUES BEFORE THE
+C NEXT ODESSA CALL FOR THAT PROBLEM.  TO SAVE AND RESTORE THE COMMON
+C BLOCKS, USE SUBROUTINES SVCOM AND RSCOM (SEE PART II ABOVE).
+C
+C----------------------------------------------------------------------
+C PART IV.  OPTIONALLY REPLACEABLE KppSolveR ROUTINES.
+C
+C BELOW ARE DESCRIPTIONS OF TWO ROUTINES IN THE ODESSA PACKAGE WHICH
+C RELATE TO THE MEASUREMENT OF ERRORS.  EITHER ROUTINE CAN BE
+C REPLACED BY A USER-SUPPLIED VERSION, IF DESIRED. HOWEVER, SINCE SUCH
+C A REPLACEMENT MAY HAVE A MAJOR IMPACT ON PERFORMANCE, IT SHOULD BE
+C DONE ONLY WHEN ABSOLUTELY NECESSARY, AND ONLY WITH GREAT CAUTION.
+C (NOTE.. THE MEANS BY WHICH THE PACKAGE VERSION OF A ROUTINE IS
+C SUPERSEDED BY THE USER-S VERSION MAY BE SYSTEM-DEPENDENT.)
+C
+C (A) EWSET.
+C THE FOLLOWING SUBROUTINE IS CALLED JUST BEFORE EACH INTERNAL
+C INTEGRATION STEP, AND SETS THE ARRAY OF ERROR WEIGHTS, EWT, AS
+C DESCRIBED UNDER ITOL/RTOL/ATOL ABOVE..
+C    SUBROUTINE EWSET (NYH, ITOL, RTOL, ATOL, YCUR, EWT)
+C WHERE NEQ, ITOL, RTOL, AND ATOL ARE AS IN THE ODESSA CALL SEQUENCE,
+C YCUR CONTAINS THE CURRENT DEPENDENT VARIABLE VECTOR, AND
+C EWT IS THE ARRAY OF WEIGHTS SET BY EWSET.
+C
+C IF THE USER SUPPLIES THIS SUBROUTINE, IT MUST RETURN IN EWT(I)
+C (I = 1,...,NYH) A POSITIVE QUANTITY SUITABLE FOR COMPARING ERRORS
+C IN Y(I) TO.  THE EWT ARRAY RETURNED BY EWSET IS PASSED TO THE
+C VNORM ROUTINE (SEE BELOW), AND ALSO USED BY ODESSA IN THE COMPUTATION
+C OF THE OPTIONAL OUTPUT IMXER, THE DIAGONAL JACOBIAN APPROXIMATION,
+C AND THE INCREMENTS FOR DIFFERENCE QUOTIENT JACOBIANS.
+C
+C IN THE USER-SUPPLIED VERSION OF EWSET, IT MAY BE DESIRABLE TO USE
+C THE CURRENT VALUES OF DERIVATIVES OF Y.  DERIVATIVES UP TO ORDER NQ
+C ARE AVAILABLE FROM THE HISTORY ARRAY YH, DESCRIBED ABOVE UNDER
+C OPTIONAL OUTPUTS.  IN EWSET, YH IS IDENTICAL TO THE YCUR ARRAY,
+C EXTENDED TO NQ + 1 COLUMNS WITH A COLUMN LENGTH OF NYH AND SCALE
+C FACTORS OF H**J/FACTORIAL(J).  ON THE FIRST CALL FOR THE PROBLEM,
+C GIVEN BY NST = 0, NQ IS 1 AND H IS TEMPORARILY SET TO 1.0.
+C THE QUANTITIES NQ, NYH, H, AND NST CAN BE OBTAINED BY INCLUDING
+C IN EWSET THE STATEMENTS..
+C    DOUBLE PRECISION H, RLS
+C    COMMON /ODE001/ RLS(219),ILS(39)
+C    NQ = ILS(35)
+C    NYH = ILS(14)
+C    NST = ILS(36)
+C    H = RLS(213)
+C THUS, FOR EXAMPLE, THE CURRENT VALUE OF DY/DT CAN BE OBTAINED AS
+C YCUR(NYH+I)/H  (I=1,...,N)  (AND THE DIVISION BY H IS
+C UNNECESSARY WHEN NST = 0).
+C
+C (B) VNORM.
+C THE FOLLOWING IS A REAL FUNCTION ROUTINE WHICH COMPUTES THE WEIGHTED
+C ROOT-MEAN-SQUARE NORM OF A VECTOR V..
+C    D = VNORM (LV, V, W)
+C WHERE..
+C  LV = THE LENGTH OF THE VECTOR,
+C  V = REAL ARRAY OF LENGTH N CONTAINING THE VECTOR,
+C  W = REAL ARRAY OF LENGTH N CONTAINING WEIGHTS,
+C  D = SQRT( (1/N) * SUM(V(I)*W(I))**2 ).
+C VNORM IS CALLED WITH LV = N AND WITH W(I) = 1.0/EWT(I), WHERE
+C EWT IS AS SET BY SUBROUTINE EWSET.
+C
+C IF THE USER SUPPLIES THIS FUNCTION, IT SHOULD RETURN A NON-NEGATIVE
+C VALUE OF VNORM SUITABLE FOR USE IN THE ERROR CONTROL IN ODESSA.
+C NONE OF THE ARGUMENTS SHOULD BE ALTERED BY VNORM.
+C FOR EXAMPLE, A USER-SUPPLIED VNORM ROUTINE MIGHT..
+C  -SUBSTITUTE A MAX-NORM OF (V(I)*W(I)) FOR THE RMS-NORM, OR
+C  -IGNORE SOME COMPONENTS OF V IN THE NORM, WITH THE EFFECT OF
+C   SUPPRESSING THE ERROR CONTROL ON THOSE COMPONENTS OF Y.
+C----------------------------------------------------------------------
+C OTHER ROUTINES IN THE ODESSA PACKAGE.
+C
+C IN ADDITION TO SUBROUTINE ODESSA, THE ODESSA PACKAGE INCLUDES THE
+C FOLLOWING SUBROUTINES AND FUNCTION ROUTINES..
+C  INTDY   COMPUTES AN INTERPOLATED VALUE OF THE Y VECTOR AT T = TOUT.
+C  STODE   IS THE CORE INTEGRATOR, WHICH DOES ONE STEP OF THE
+C          INTEGRATION AND THE ASSOCIATED ERROR CONTROL.
+C  STESA   MANAGES THE SOLUTION OF THE SENSITIVITY FUNCTIONS.
+C  CFODE   SETS ALL METHOD COEFFICIENTS AND TEST CONSTANTS.
+C  PREPJ   COMPUTES AND PREPROCESSES THE JACOBIAN MATRIX J = DF/DY
+C          AND THE NEWTON ITERATION MATRIX P = I - H*L0*J.
+C          IT IS ALSO CALLED BY SPRIME (WITH JOPT = 1) TO JUST
+C          COMPUTE THE JACOBIAN MATRIX.
+C  PREPDF  COMPUTES THE INHOMOGENEITY MATRIX DF/DP.
+C  SPRIME  DEFINES THE SYSTEM OF SENSITIVITY EQUATIONS.
+C  SOLSY   MANAGES SOLUTION OF LINEAR SYSTEM IN CHORD ITERATION.
+C  EWSET   SETS THE ERROR WEIGHT VECTOR EWT BEFORE EACH STEP.
+C  VNORM   COMPUTES THE WEIGHTED R.M.S. NORM OF A VECTOR.
+C  SVCOM AND RSCOM  ARE USER-CALLABLE ROUTINES TO SAVE AND RESTORE,
+C          RESPECTIVELY, THE CONTENTS OF THE INTERNAL COMMON BLOCKS.
+C  DGEFA AND DGESL  ARE ROUTINES FROM LINPACK FOR SOLVING FULL
+C          SYSTEMS OF LINEAR ALGEBRAIC EQUATIONS.
+C  DGBFA AND DGBSL  ARE ROUTINES FROM LINPACK FOR SOLVING BANDED
+C          LINEAR SYSTEMS.
+C  DAXPY, DSCAL, IDAMAX, AND DDOT  ARE BASIC LINEAR ALGEBRA MODULES
+C          (BLAS) USED BY THE ABOVE LINPACK ROUTINES.
+C  D1MACH  COMPUTES THE UNIT ROUNDOFF IN A MACHINE-INDEPENDENT MANNER.
+C  XERR, XSETUN, AND XSETF  HANDLE THE PRINTING OF ALL ERROR
+C          MESSAGES AND WARNINGS.
+C NOTE..  VNORM, IDAMAX, DDOT, AND D1MACH ARE FUNCTION ROUTINES.
+C ALL THE OTHERS ARE SUBROUTINES.
+C
+C THE FORTRAN GENERIC INTRINSIC FUNCTIONS USED BY ODESSA ARE..
+C ABS, MAX, MIN, REAL, MOD, SIGN, SQRT, AND WRITE
+C
+C A BLOCK DATA SUBPROGRAM IS ALSO INCLUDED WITH THE PACKAGE,
+C FOR LOADING SOME OF THE VARIABLES IN INTERNAL COMMON.
+C
+C----------------------------------------------------------------------
+C PART V.  GENERAL REMARKS
+C
+C THIS SECTION HIGHLIGHTS THE BASIC DIFFERENCES BETWEEN THE ORIGINAL
+C LSODE PACKAGE AND THE ODESSA MODIFICATION. THIS IS PROVIDED AS A
+C SERVICE TO EXPERIENCED LSODE USERS TO EXPEDITE FAMILIARIZATION WITH
+C ODESSA.
+C
+C (A). ORIGINAL SUBROUTINES AND FUNCTIONS.
+C
+C      OF THE ORIGINAL 22 SUBROUTINES AND FUNCTIONS USED IN THE LSODE
+C      PACKAGE, ALL ARE USED BY ODESSA, WITH THE FOLLOWING HAVING BEEN
+C      MODIFIED..
+C
+C      LSODE  THE ORIGINAL DRIVER SUBROUTINE FOR THE LSODE PACKAGE IS
+C             EXTENSIVELY MODIFIED AND RENAMED ODESSA, WHICH NOW
+C             CONTAINS A CALL TO SPRIME TO ESTABLISH INITIAL CONDITIONS
+C             FOR THE SENSITIVITY CALCULATIONS.
+C
+C      STODE  THE ONE STEP INTEGRATOR IS SLIGHTLY MODIFIED AND RETAINS
+C             ITS ORIGINAL NAME. IT NOW CONTAINS THE CALL TO STESA,
+C             AND ALSO CALLS SPRIME IF KFLAG .LE. -3.
+C
+C      PREPJ  ALSO NAMED PREPJ IN ODESSA IS SLIGHTLY MODIFIED TO ALLOW
+C             FOR THE CALCULATION OF JACOBIAN WITH NO PREPROCESSING
+C             (JOPT = 1).
+C
+C (B). NEW SUBROUTINES.
+C
+C      IN ADDITION TO THE CHANGES NOTED ABOVE, THREE NEW SUBROUTINES
+C      HAVE BEEN INTRODUCED (SEE STESA, SPRIME, AND PREPDF AS DESCRIBED
+C      IN PART IV. ABOVE).
+C
+C (C). COMMON BLOCKS.
+C
+C      /LS0001/  RETAINS THE SAME LENGTH AND IS RENAMED /ODE001/;
+C                HOWEVER THE REAL ARRAY ROWNS(209) IS SHORTENED TO A
+C                LENGTH OF (173) REAL WORDS, ALLOWING THE REMOVAL OF
+C                TESCO(3,12) WHICH IS NOW PASSED FROM STODE TO STESA.
+C                IN ADDITION, THE INTEGER ARRAY IOWNS(6) IS SHORTENED
+C                TO A LENGTH OF (4) INTEGER WORDS, ALLOWING THE REMOVAL
+C                OF IALTH AND LMAX WHICH ARE NOW PASSED FROM STODE TO
+C                STESA.
+C
+C      /ODE002/  ADDED COMMON BLOCK FOR VARIABLES IMPORTANT TO
+C                SENSITIVITY ANALYSIS (SEE PART III. ABOVE). A BLOCK
+C                DATA PROGRAM IS NOT REQUIRED FOR THIS COMMON BLOCK.
+C
+C      SVCOM,RSCOM  THESE TWO SUBROUTINES ARE MODIFIED TO HANDLE
+C                   COMMON BLOCK /ODE002/ AS WELL.
+C
+C (D). OPTIONAL INPUTS.
+C
+C      THE FULL SET OF OPTIONAL INPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA, WITH THE EXCEPTION THAT THE NUMBER OF ODE'S
+C      IN THE MODEL (NEQ(1)), MAY NOT BE CHANGED DURING THE PROBLEM.
+C      IN ODESSA, NYH NOW REFERS TO THE TOTAL NUMBER OF FIRST-ORDER
+C      ODE'S (MODEL AND SENSITIVITY EQUATIONS) WHICH IS EQUAL TO
+C      NEQ(1) IF ISOPT = 0, OR NEQ(1)*(NEQ(2)+1) IF ISOPT = 1.
+C      NEQ(1), NEQ(2), AND NYH ARE NOT ALLOWED TO CHANGE DURING
+C      THE COURSE OF AN INTEGRATION.
+C
+C (E). OPTIONAL OUTPUTS.
+C
+C      THE FULL SET OF OPTIONAL OUTPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA. IN ADDITION, IWORK(19) AND IWORK(20) ARE
+C      LOADED WITH NDFE AND NSPE, RESPECTIVELY, UPON OUTPUT. THE TOTAL
+C      NUMBER OF LU DECOMPOSITIONS OF THE PROCESSED JACOBIAN IS EQUAL
+C      TO NJE - NSPE.
+C-----------------------------------------------------------------------
+      SUBROUTINE ODESSA (F, DF, NEQ, Y, PAR, T, TOUT, ITOL, RTOL, ATOL,
+     1   ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      LOGICAL IHIT
+      EXTERNAL F, DF, JAC, PREPJ, SOLSY, PREPDF
+      DIMENSION NEQ(*), Y(*), PAR(*), RTOL(*), ATOL(*), IOPT(*),
+     1   RWORK(LRW), IWORK(LIW), MORD(2)
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE.. LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY(T)/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY
+C     DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C     SENSITIVITY ANALYSIS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE.
+C     (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C THE FOLLOWING INTERNAL COMMON BLOCKS CONTAIN
+C (A) VARIABLES WHICH ARE LOCAL TO ANY SUBROUTINE BUT WHOSE VALUES MUST
+C    BE PRESERVED BETWEEN CALLS TO THE ROUTINE (OWN VARIABLES), AND
+C (B) VARIABLES WHICH ARE COMMUNICATED BETWEEN SUBROUTINES.
+C THE STRUCTURE OF THE BLOCKS ARE AS FOLLOWS..  ALL REAL VARIABLES ARE
+C LISTED FIRST, FOLLOWED BY ALL INTEGERS.  WITHIN EACH TYPE, THE
+C VARIABLES ARE GROUPED WITH THOSE LOCAL TO SUBROUTINE ODESSA FIRST,
+C THEN THOSE LOCAL TO SUBROUTINE STODE, AND FINALLY THOSE USED
+C FOR COMMUNICATION.  THE BLOCKS ARE DECLARED IN SUBROUTINES ODESSA
+C INTDY, STODE, STESA, PREPJ, PREPDF, AND SOLSY.  GROUPS OF VARIABLES
+C ARE REPLACED BY DUMMY ARRAYS IN THE COMMON DECLARATIONS IN ROUTINES
+C WHERE THOSE VARIABLES ARE NOT USED.
+C-----------------------------------------------------------------------
+      COMMON /ODE001/ TRET, ROWNS(173),
+     1   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     2   ILLIN, INIT, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     3   MXSTEP, MXHNIL, NHNIL, NTREP, NSLAST, NYH, IOWNS(4),
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   NPAR, LDFDP, LNRS,
+     2   ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0,TWO=2.0D0,FOUR=4.0D0)
+      DATA  MORD(1),MORD(2)/12,5/, MXSTP0/500/, MXHNL0/10/
+C-----------------------------------------------------------------------
+C BLOCK A.
+C THIS CODE BLOCK IS EXECUTED ON EVERY CALL.
+C IT TESTS ISTATE AND ITASK FOR LEGALITY AND BRANCHES APPROPIATELY.
+C IF ISTATE .GT. 1 BUT THE FLAG INIT SHOWS THAT INITIALIZATION HAS
+C NOT YET BEEN DONE, AN ERROR RETURN OCCURS.
+C IF ISTATE = 1 AND TOUT = T, JUMP TO BLOCK G AND RETURN IMMEDIATELY.
+C-----------------------------------------------------------------------
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602
+      IF (ISTATE .EQ. 1) GO TO 10
+      IF (INIT .EQ. 0) GO TO 603
+      IF (ISTATE .EQ. 2) GO TO 200
+      GO TO 20
+ 10   INIT = 0
+      IF (TOUT .EQ. T) GO TO 430
+ 20   NTREP = 0
+C-----------------------------------------------------------------------
+C BLOCK B.
+C THE NEXT CODE BLOCK IS EXECUTED FOR THE INITIAL CALL (ISTATE = 1),
+C OR FOR A CONTINUATION CALL WITH PARAMETER CHANGES (ISTATE = 3).
+C IT CONTAINS CHECKING OF ALL INPUTS AND VARIOUS INITIALIZATIONS.
+C
+C FIRST CHECK LEGALITY OF THE NON-OPTIONAL INPUTS NEQ, ITOL, IOPT,
+C MF, ML, AND MU.
+C-----------------------------------------------------------------------
+      IF (NEQ(1) .LE. 0) GO TO 604
+      IF (ISTATE .EQ. 1) GO TO 25
+      IF (NEQ(1) .NE. N) GO TO 605
+ 25   N = NEQ(1)
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606
+      DO 26 I = 1,3
+ 26     IF (IOPT(I) .LT. 0 .OR. IOPT(I) .GT. 1) GO TO 607
+      ISOPT = IOPT(2)
+      IDF = IOPT(3)
+      NYH = N
+      NSV = 1
+      METH = MF/10
+      MITER = MF - 10*METH
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608
+      IF (MITER .LE. 3) GO TO 30
+      ML = IWORK(1)
+      MU = IWORK(2)
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610
+ 30   IF (ISOPT .EQ. 0) GO TO 32
+C CHECK LEGALITY OF THE NON-OPTIONAL INPUTS ISOPT, NPAR.
+C COMPUTE NUMBER OF SOLUTION VECTORS AND TOTAL NUMBER OF EQUATIONS.
+      IF (NEQ(2) .LE. 0) GO TO 628
+      IF (ISTATE .EQ. 1) GO TO 31
+      IF (NEQ(2) .NE. NPAR) GO TO 629
+ 31   NPAR = NEQ(2)
+      NSV = NPAR + 1
+      NYH = NSV * N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) GO TO 630
+C NEXT PROCESS AND CHECK THE OPTIONAL INPUTS. --------------------------
+ 32   IF (IOPT(1) .EQ. 1) GO TO 40
+      MAXORD = MORD(METH)
+      MXSTEP = MXSTP0
+      MXHNIL = MXHNL0
+      IF (ISTATE .EQ. 1) H0 = ZERO
+      HMXI = ZERO
+      HMIN = ZERO
+      GO TO 60
+ 40   MAXORD = IWORK(5)
+      IF (MAXORD .LT. 0) GO TO 611
+      IF (MAXORD .EQ. 0) MAXORD = 100
+      MAXORD = MIN(MAXORD,MORD(METH))
+      MXSTEP = IWORK(6)
+      IF (MXSTEP .LT. 0) GO TO 612
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0
+      MXHNIL = IWORK(7)
+      IF (MXHNIL .LT. 0) GO TO 613
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0
+      IF (ISTATE .NE. 1) GO TO 50
+      H0 = RWORK(5)
+      IF ((TOUT - T)*H0 .LT. ZERO) GO TO 614
+ 50   HMAX = RWORK(6)
+      IF (HMAX .LT. ZERO) GO TO 615
+      HMXI = ZERO
+      IF (HMAX .GT. ZERO) HMXI = ONE/HMAX
+      HMIN = RWORK(7)
+      IF (HMIN .LT. ZERO) GO TO 616
+C-----------------------------------------------------------------------
+C SET WORK ARRAY POINTERS AND CHECK LENGTHS LRW AND LIW.
+C POINTERS TO SEGMENTS OF RWORK AND IWORK ARE NAMED BY PREFIXING L TO
+C THE NAME OF THE SEGMENT.  E.G., THE SEGMENT YH STARTS AT RWORK(LYH).
+C SEGMENTS OF RWORK (IN ORDER) ARE DENOTED  YH, WM, EWT, SAVF, ACOR.
+C WORK SPACE FOR DFDP IS CONTAINED IN ACOR.
+C-----------------------------------------------------------------------
+ 60   LYH = 21
+      LWM = LYH + (MAXORD + 1)*NYH
+      IF (MITER .EQ. 0) LENWM = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) LENWM = N*N + 2
+      IF (MITER .EQ. 3) LENWM = N + 2
+      IF (MITER .GE. 4) LENWM = (2*ML + MU + 1)*N + 2
+      LEWT = LWM + LENWM
+      LSAVF = LEWT + NYH
+      LACOR = LSAVF + N
+      LDFDP = LACOR + N
+      LENRW = LACOR + NYH - 1
+      IWORK(17) = LENRW
+      LIWM = 1
+      LENIW = 20 + N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 20
+      LNRS = LENIW + LIWM
+      IF (ISOPT .EQ. 1) LENIW = LNRS + NPAR
+      IWORK(18) = LENIW
+      IF (LENRW .GT. LRW) GO TO 617
+      IF (LENIW .GT. LIW) GO TO 618
+C CHECK RTOL AND ATOL FOR LEGALITY. ------------------------------------
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 70 I = 1,NYH
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        IF (RTOLI .LT. ZERO) GO TO 619
+        IF (ATOLI .LT. ZERO) GO TO 620
+ 70     CONTINUE
+      IF (ISTATE .EQ. 1) GO TO 100
+C IF ISTATE = 3, SET FLAG TO SIGNAL PARAMETER CHANGES TO STODE. --------
+      JSTART = -1
+      IF (NQ .LE. MAXORD) GO TO 90
+C MAXORD WAS REDUCED BELOW NQ.  COPY YH(*,MAXORD+2) INTO SAVF. ---------
+      DO 80 I = 1,N
+ 80     RWORK(I+LSAVF-1) = RWORK(I+LWM-1)
+C RELOAD WM(1) = RWORK(LWM), SINCE LWM MAY HAVE CHANGED. ---------------
+ 90   IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      GO TO 200
+C-----------------------------------------------------------------------
+C BLOCK C.
+C THE NEXT BLOCK IS FOR THE INITIAL CALL ONLY (ISTATE = 1).
+C IT CONTAINS ALL REMAINING INITIALIZATIONS, THE INITIAL CALL TO F,
+C THE INITIAL CALL TO SPRIME IF ISOPT = 1,
+C AND THE CALCULATION OF THE INITIAL STEP SIZE.
+C THE ERROR WEIGHTS IN EWT ARE INVERTED AFTER BEING LOADED.
+C-----------------------------------------------------------------------
+ 100  UROUND = D1MACH(4)
+      TN = T
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 105
+      TCRIT = RWORK(1)
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. ZERO) GO TO 625
+      IF (H0 .NE. ZERO .AND. (T + H0 - TCRIT)*H0 .GT. ZERO)
+     1   H0 = TCRIT - T
+ 105  JSTART = 0
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      NHNIL = 0
+      NST = 0
+      NJE = 0
+      NSLAST = 0
+      HU = ZERO
+      NQU = 0
+      CCMAX = 0.3D0
+      MAXCOR = 3
+      IF (ISOPT .EQ. 1) MAXCOR = 4
+      MSBP = 20
+      MXNCF = 10
+C INITIAL CALL TO F.  (LF0 POINTS TO YH(1,2) AND LOADS IN VALUES).
+      LF0 = LYH + NYH
+      CALL F (NEQ, T, Y, PAR, RWORK(LF0))
+      NFE = 1
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      NDFE = 0
+      NSPE = 0
+      IF (ISOPT .EQ. 0) GO TO 114
+C INITIALIZE COUNTS FOR REPEATED STEPS DUE TO SENSITIVITY ANALYSIS.
+      DO 110 J = 1,NSV
+ 110    IWORK(J + LNRS - 1) = 0
+C LOAD THE INITIAL VALUE VECTOR IN YH. ---------------------------------
+ 114  DO 115 I = 1,NYH
+ 115    RWORK(I+LYH-1) = Y(I)
+C LOAD AND INVERT THE EWT ARRAY.  (H IS TEMPORARILY SET TO ONE.) -------
+      NQ = 1
+      H = ONE
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 120 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 621
+ 120    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+      IF (ISOPT .EQ. 0) GO TO 125
+C CALL SPRIME TO LOAD FIRST-ORDER SENSITIVITY DERIVATIVES INTO
+C REMAINING YH(*,2) POSITIONS.
+      CALL SPRIME (NEQ, Y, RWORK(LYH), NYH, N, NSV, RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LF0), RWORK(LACOR),
+     2   RWORK(LDFDP), PAR, F, JAC, DF, PREPJ, PREPDF)
+      IF (IERSP .EQ. -1) GO TO 631
+      IF (IERSP .EQ. -2) GO TO 632
+C-----------------------------------------------------------------------
+C THE CODING BELOW COMPUTES THE STEP SIZE, H0, TO BE ATTEMPTED ON THE
+C FIRST STEP, UNLESS THE USER HAS SUPPLIED A VALUE FOR THIS.
+C FIRST CHECK THAT TOUT - T DIFFERS SIGNIFICANTLY FROM ZERO.
+C A SCALAR TOLERANCE QUANTITY TOL IS COMPUTED, AS MAX(RTOL(I))
+C IF THIS IS POSITIVE, OR MAX(ATOL(I)/ABS(Y(I))) OTHERWISE, ADJUSTED
+C SO AS TO BE BETWEEN 100*UROUND AND 1.0E-3. ONLY THE ORIGINAL
+C SOLUTION VECTOR IS CONSIDERED IN THIS CALCULATION (ISOPT = 0 OR 1).
+C THEN THE COMPUTED VALUE H0 IS GIVEN BY..
+C                                     NEQ
+C  H0**2 = TOL / ( W0**-2 + (1/NEQ) * SUM ( F(I)/YWT(I) )**2  )
+C                                      1
+C WHERE  W0     = MAX ( ABS(T), ABS(TOUT) ),
+C        F(I)   = I-TH COMPONENT OF INITIAL VALUE OF F,
+C        YWT(I) = EWT(I)/TOL  (A WEIGHT FOR Y(I)).
+C THE SIGN OF H0 IS INFERRED FROM THE INITIAL VALUES OF TOUT AND T.
+C-----------------------------------------------------------------------
+ 125  IF (H0 .NE. ZERO) GO TO 180
+      TDIST = ABS(TOUT - T)
+      W0 = MAX(ABS(T),ABS(TOUT))
+      IF (TDIST .LT. TWO*UROUND*W0) GO TO 622
+      TOL = RTOL(1)
+      IF (ITOL .LE. 2) GO TO 140
+      DO 130 I = 1,N
+ 130    TOL = MAX(TOL,RTOL(I))
+ 140   IF (TOL .GT. ZERO) GO TO 160
+      ATOLI = ATOL(1)
+      DO 150 I = 1,N
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        AYI = ABS(Y(I))
+        IF (AYI .NE. ZERO) TOL = MAX(TOL,ATOLI/AYI)
+ 150    CONTINUE
+ 160   TOL = MAX(TOL,100.0D0*UROUND)
+      TOL = MIN(TOL,0.001D0)
+      SUM = VNORM (N, RWORK(LF0), RWORK(LEWT))
+      SUM = ONE/(TOL*W0*W0) + TOL*SUM**2
+      H0 = ONE/SQRT(SUM)
+      H0 = MIN(H0,TDIST)
+      H0 = SIGN(H0,TOUT-T)
+C ADJUST H0 IF NECESSARY TO MEET HMAX BOUND. ---------------------------
+ 180   RH = ABS(H0)*HMXI
+      IF (RH .GT. ONE) H0 = H0/RH
+C LOAD H WITH H0 AND SCALE YH(*,2) BY H0. ------------------------------
+      H = H0
+      DO 190 I = 1,NYH
+ 190    RWORK(I+LF0-1) = H0*RWORK(I+LF0-1)
+      GO TO 270
+C-----------------------------------------------------------------------
+C BLOCK D.
+C THE NEXT CODE BLOCK IS FOR CONTINUATION CALLS ONLY (ISTATE = 2 OR 3)
+C AND IS TO CHECK STOP CONDITIONS BEFORE TAKING A STEP.
+C-----------------------------------------------------------------------
+ 200   NSLAST = NST
+      GO TO (210, 250, 220, 230, 240), ITASK
+ 210   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 220   TP = TN - HU*(ONE + 100.0D0*UROUND)
+      IF ((TP - TOUT)*H .GT. ZERO) GO TO 623
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      GO TO 400
+ 230   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+      IF ((TCRIT - TOUT)*H .LT. ZERO) GO TO 625
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 245
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 240   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+ 245   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      IF (ISTATE .EQ. 2) JSTART = -2
+C-----------------------------------------------------------------------
+C BLOCK E.
+C THE NEXT BLOCK IS NORMALLY EXECUTED FOR ALL CALLS AND CONTAINS
+C THE CALL TO THE ONE-STEP CORE INTEGRATOR STODE.
+C
+C THIS IS A LOOPING POINT FOR THE INTEGRATION STEPS.
+C
+C FIRST CHECK FOR TOO MANY STEPS BEING TAKEN, UPDATE EWT (IF NOT AT
+C START OF PROBLEM), CHECK FOR TOO MUCH ACCURACY BEING REQUESTED, AND
+C CHECK FOR H BELOW THE ROUNDOFF LEVEL IN T.
+C TOLSF IS CALCULATED CONSIDERING ALL SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 250   CONTINUE
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 260 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 510
+ 260    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+ 270   TOLSF = UROUND*VNORM (NYH, RWORK(LYH), RWORK(LEWT))
+      IF (TOLSF .LE. ONE) GO TO 280
+      TOLSF = TOLSF*2.0D0
+      IF (NST .EQ. 0) GO TO 626
+      GO TO 520
+ 280   IF (ADDX(TN,H) .NE. TN) GO TO 290
+      NHNIL = NHNIL + 1
+      IF (NHNIL .GT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - WARNING..INTERNAL T (=R1) AND H (=R2) ARE',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('SUCH THAT IN THE MACHINE, T + H = T ON THE NEXT STEP',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('(H = STEP SIZE). KppSolveR WILL CONTINUE ANYWAY',
+     1   101, 1, 0, 0, 0, 2, TN, H)
+      IF (NHNIL .LT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - ABOVE WARNING HAS BEEN ISSUED I1 TIMES.',
+     1   102, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('IT WILL NOT BE ISSUED AGAIN FOR THIS PROBLEM',
+     1   102, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+ 290   CONTINUE
+C-----------------------------------------------------------------------
+C     CALL STODE(NEQ,Y,YH,NYH,YH,WM,IWM,EWT,SAVF,ACOR,PAR,NRS,
+C    1   F,JAC,DF,PREPJ,PREPDF,SOLSY)
+C-----------------------------------------------------------------------
+      CALL STODE (NEQ, Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LSAVF), RWORK(LACOR),
+     2   PAR, IWORK(LNRS), F, JAC, DF, PREPJ, PREPDF, SOLSY)
+      KGO = 1 - KFLAG
+      GO TO (300, 530, 540, 633), KGO
+C-----------------------------------------------------------------------
+C BLOCK F.
+C THE FOLLOWING BLOCK HANDLES THE CASE OF A SUCCESSFUL RETURN FROM THE
+C CORE INTEGRATOR (KFLAG = 0).  TEST FOR STOP CONDITIONS.
+C-----------------------------------------------------------------------
+ 300   INIT = 1
+      GO TO (310, 400, 330, 340, 350), ITASK
+C ITASK = 1.  IF TOUT HAS BEEN REACHED, INTERPOLATE. -------------------
+ 310   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+C ITASK = 3.  JUMP TO EXIT IF TOUT WAS REACHED. ------------------------
+ 330   IF ((TN - TOUT)*H .GE. ZERO) GO TO 400
+      GO TO 250
+C ITASK = 4.  SEE IF TOUT OR TCRIT WAS REACHED.  ADJUST H IF NECESSARY.
+ 340   IF ((TN - TOUT)*H .LT. ZERO) GO TO 345
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+ 345   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      JSTART = -2
+      GO TO 250
+C ITASK = 5.  SEE IF TCRIT WAS REACHED AND JUMP TO EXIT. ---------------
+ 350   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+C-----------------------------------------------------------------------
+C BLOCK G.
+C THE FOLLOWING BLOCK HANDLES ALL SUCCESSFUL RETURNS FROM ODESSA.
+C IF ITASK .NE. 1, Y IS LOADED FROM YH AND T IS SET ACCORDINGLY.
+C ISTATE IS SET TO 2, THE ILLEGAL INPUT COUNTER IS ZEROED, AND THE
+C OPTIONAL OUTPUTS ARE LOADED INTO THE WORK ARRAYS BEFORE RETURNING.
+C IF ISTATE = 1 AND TOUT = T, THERE IS A RETURN WITH NO ACTION TAKEN,
+C EXCEPT THAT IF THIS HAS HAPPENED REPEATEDLY, THE RUN IS TERMINATED.
+C-----------------------------------------------------------------------
+ 400  DO 410 I = 1,NYH
+ 410    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420
+      IF (IHIT) T = TCRIT
+ 420   ISTATE = 2
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+ 430   NTREP = NTREP + 1
+      IF (NTREP .LT. 5) RETURN
+      CALL XERR ('ODESSA -- REPEATED CALLS WITH ISTATE = 1 AND
+     1TOUT = T (=R1)', 301, 1, 0, 0, 0, 1, T, ZERO)
+      GO TO 800
+C-----------------------------------------------------------------------
+C BLOCK H.
+C THE FOLLOWING BLOCK HANDLES ALL UNSUCCESSFUL RETURNS OTHER THAN
+C THOSE FOR ILLEGAL INPUT.  FIRST THE ERROR MESSAGE ROUTINE IS CALLED.
+C IF THERE WAS AN ERROR TEST OR CONVERGENCE TEST FAILURE, IMXER IS SET.
+C THEN Y IS LOADED FROM YH, T IS SET TO TN, AND THE ILLEGAL INPUT
+C COUNTER ILLIN IS SET TO 0.  THE OPTIONAL OUTPUTS ARE LOADED INTO
+C THE WORK ARRAYS BEFORE RETURNING.
+C-----------------------------------------------------------------------
+C THE MAXIMUM NUMBER OF STEPS WAS TAKEN BEFORE REACHING TOUT. ----------
+ 500  CALL XERR ('ODESSA - AT CURRENT T (=R1), MXSTEP (=I1) STEPS',
+     1   201, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('TAKEN ON THIS CALL BEFORE REACHING TOUT',
+     1   201, 1, 1, MXSTEP, 0, 1, TN, ZERO)
+      ISTATE = -1
+      GO TO 580
+C EWT(I) .LE. 0.0 FOR SOME I (NOT AT START OF PROBLEM). ----------------
+ 510   EWTI = RWORK(LEWT+I-1)
+      CALL XERR ('ODESSA - AT T (=R1), EWT(I1) HAS BECOME R2 .LE. 0.',
+     1   202, 1, 1, I, 0, 2, TN, EWTI)
+      ISTATE = -6
+      GO TO 580
+C TOO MUCH ACCURACY REQUESTED FOR MACHINE PRECISION. -------------------
+ 520  CALL XERR ('ODESSA - AT T (=R1), TOO MUCH ACCURACY REQUESTED',
+     1  203, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('FOR PRECISION OF MACHINE..  SEE TOLSF (=R2)',
+     1  203, 1, 0, 0, 0, 2, TN, TOLSF)
+      RWORK(14) = TOLSF
+      ISTATE = -2
+      GO TO 580
+C KFLAG = -1.  ERROR TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN. -----
+ 530  CALL XERR ('ODESSA - AT T(=R1) AND STEP SIZE H(=R2), THE ERROR',
+     1  204, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN',
+     1  204, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -4
+      GO TO 560
+C KFLAG = -2.  CONVERGENCE FAILED REPEATEDLY OR WITH ABS(H) = HMIN. ----
+ 540  CALL XERR ('ODESSA - AT T (=R1) AND STEP SIZE H (=R2), THE',
+     1  205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('CORRECTOR CONVERGENCE FAILED REPEATEDLY',
+     1   205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('OR WITH ABS(H) = HMIN',
+     1   205, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -5
+C COMPUTE IMXER IF RELEVANT. -------------------------------------------
+ 560   BIG = ZERO
+      IMXER = 1
+      DO 570 I = 1,NYH
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1))
+        IF (BIG .GE. SIZE) GO TO 570
+        BIG = SIZE
+        IMXER = I
+ 570    CONTINUE
+      IWORK(16) = IMXER
+C SET Y VECTOR, T, ILLIN, AND OPTIONAL OUTPUTS. ------------------------
+ 580   DO 590 I = 1,NYH
+ 590    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+C-----------------------------------------------------------------------
+C BLOCK I.
+C THE FOLLOWING BLOCK HANDLES ALL ERROR RETURNS DUE TO ILLEGAL INPUT
+C (ISTATE = -3), AS DETECTED BEFORE CALLING THE CORE INTEGRATOR.
+C FIRST THE ERROR MESSAGE ROUTINE IS CALLED.  THEN IF THERE HAVE BEEN
+C 5 CONSECUTIVE SUCH RETURNS JUST BEFORE THIS CALL TO THE KppSolveR,
+C THE RUN IS HALTED.
+C-----------------------------------------------------------------------
+ 601   CALL XERR ('ODESSA - ISTATE (=I1) ILLEGAL',
+     1  1, 1, 1, ISTATE, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 602   CALL XERR ('ODESSA - ITASK (=I1) ILLEGAL',
+     1  2, 1, 1, ITASK, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 603  CALL XERR ('ODESSA - ISTATE .GT. 1 BUT ODESSA NOT INITIALIZED',
+     1  3, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 604   CALL XERR ('ODESSA - NEQ (=I1) .LT. 1',
+     1  4, 1, 1, NEQ(1), 0, 0, ZERO,ZERO)
+      GO TO 700
+ 605  CALL XERR ('ODESSA - ISTATE = 3 AND NEQ CHANGED.  (I1 TO I2)',
+     1  5, 1, 2, N, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 606   CALL XERR ('ODESSA - ITOL (=I1) ILLEGAL',
+     1  6, 1, 1, ITOL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 607   CALL XERR ('ODESSA - IOPT (=I1) ILLEGAL',
+     1   7, 1, 1, IOPT, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 608   CALL XERR('ODESSA - MF (=I1) ILLEGAL',
+     1   8, 1, 1, MF, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 609  CALL XERR('ODESSA - ML (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   9, 1, 2, ML, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 610  CALL XERR('ODESSA - MU (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   10, 1, 2, MU, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 611   CALL XERR('ODESSA - MAXORD (=I1) .LT. 0',
+     1   11, 1, 1, MAXORD, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 612   CALL XERR('ODESSA - MXSTEP (=I1) .LT. 0',
+     1   12, 1, 1, MXSTEP, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 613   CALL XERR('ODESSA - MXHNIL (=I1) .LT. 0',
+     1   13, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 614   CALL XERR('ODESSA - TOUT (=R1) BEHIND T (=R2)',
+     1   14, 1, 0, 0, 0, 2, TOUT, T)
+      CALL XERR('INTEGRATION DIRECTION IS GIVEN BY H0 (=R1)',
+     1   14, 1, 0, 0, 0, 1, H0, ZERO)
+      GO TO 700
+ 615   CALL XERR('ODESSA - HMAX (=R1) .LT. 0.0',
+     1   15, 1, 0, 0, 0, 1, HMAX, ZERO)
+      GO TO 700
+ 616   CALL XERR('ODESSA - HMIN (=R1) .LT. 0.0',
+     1   16, 1, 0, 0, 0, 1, HMIN, ZERO)
+      GO TO 700
+ 617  CALL XERR('ODESSA - RWORK LENGTH NEEDED, LENRW (=I1), EXCEEDS
+     1 LRW (=I2)', 17, 1, 2, LENRW, LRW, 0, ZERO,ZERO)
+      GO TO 700
+ 618  CALL XERR('ODESSA - IWORK LENGTH NEEDED, LENIW (=I1), EXCEEDS
+     1 LIW (=I2)', 18, 1, 2, LENIW, LIW, 0, ZERO,ZERO)
+      GO TO 700
+ 619   CALL XERR('ODESSA - RTOL(I1) IS R1 .LT. 0.0',
+     1   19, 1, 1, I, 0, 1, RTOLI, ZREO)
+      GO TO 700
+ 620   CALL XERR('ODESSA - ATOL(I1) IS R1 .LT. 0.0',
+     1   20, 1, 1, I, 0, 1, ATOLI, ZERO)
+      GO TO 700
+*
+ 621   EWTI = RWORK(LEWT+I-1)
+      CALL XERR('ODESSA - EWT(I1) IS R1 .LE. 0.0',
+     1   21, 1, 1, I, 0, 1, EWTI, ZERO)
+      GO TO 700
+ 622  CALL XERR('ODESSA - TOUT (=R1) TOO CLOSE TO T(=R2) TO START
+     1 INTEGRATION', 22, 1, 0, 0, 0, 2, TOUT, T)
+      GO TO 700
+ 623  CALL XERR('ODESSA - ITASK = I1 AND TOUT (=R1) BEHIND TCUR - HU
+     1 (= R2)', 23, 1, 1, ITASK, 0, 2, TOUT, TP)
+      GO TO 700
+ 624  CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TCUR
+     1 (=R2)', 24, 1, 0, 0, 0, 2, TCRIT, TN)
+      GO TO 700
+ 625   CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TOUT
+     1 (=R2)', 25, 1, 0, 0, 0, 2, TCRIT, TOUT)
+      GO TO 700
+ 626  CALL XERR('ODESSA - AT START OF PROBLEM, TOO MUCH ACCURACY',
+     1   26, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR('REQUESTED FOR PRECISION OF MACHINE. SEE TOLSF (=R1)',
+     1   26, 1, 0, 0, 0, 1, TOLSF, ZERO)
+      RWORK(14) = TOLSF
+      GO TO 700
+ 627  CALL XERR('ODESSA - TROUBLE FROM INTDY. ITASK = I1, TOUT = R1',
+     1   27, 1, 1, ITASK, 0, 1, TOUT, ZERO)
+      GO TO 700
+C ERROR STATEMENTS ASSOCIATED WITH SENSITIVITY ANALYSIS.
+ 628  CALL XERR('ODESSA - NPAR (=I1) .LT. 1',
+     1   28, 1, 1, NPAR, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 629  CALL XERR('ODESSA - ISTATE = 3 AND NPAR CHANGED (I1 TO I2)',
+     1   29, 1, 2, NP, NPAR, 0, ZERO,ZERO)
+      GO TO 700
+ 630  CALL XERR('ODESSA - MITER (=I1) ILLEGAL',
+     1   30, 1, 1, MITER, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 631  CALL XERR('ODESSA - TROUBLE IN SPRIME (IERPJ)',
+     1   31, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 632  CALL XERR('ODESSA - TROUBLE IN SPRIME (MITER)',
+     1   32, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 633  CALL XERR('ODESSA - FATAL ERROR IN STODE (KFLAG = -3)',
+     1   33, 2, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 801
+C
+ 700   IF (ILLIN .EQ. 5) GO TO 710
+      ILLIN = ILLIN + 1
+      ISTATE = -3
+      RETURN
+ 710  CALL XERR('ODESSA - REPEATED OCCURRENCES OF ILLEGAL INPUT',
+     1   302, 1, 0, 0, 0, 0, ZERO,ZERO)
+C
+ 800  CALL XERR('ODESSA - RUN ABORTED.. APPARENT INFINITE LOOP',
+     1   303, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+ 801  CALL XERR('ODESSA - RUN ABORTED',
+     1   304, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+C-------------------- END OF SUBROUTINE ODESSA -------------------------
+      END
+      DOUBLE PRECISION FUNCTION ADDX(A,B)
+      DOUBLE PRECISION A,B
+C
+C  THIS FUNCTION IS NECESSARY TO FORCE OPTIMIZING COMPILERS TO
+C  EXECUTE AND STORE A SUM, FOR SUCCESSFUL EXECUTION OF THE
+C  TEST A + B = B.
+C
+      ADDX = A + B
+      RETURN
+C-------------------- END OF FUNCTION SUM ------------------------------
+      END
+      SUBROUTINE SPRIME (NEQ, Y, YH, NYH, NROW, NCOL, WM, IWM,
+     1  EWT, SAVF, FTEM, DFDP, PAR, F, JAC, DF, PJAC, PDF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION NEQ(*), Y(*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1  EWT(*), SAVF(*), FTEM(*), DFDP(NROW,*), PAR(*)
+      EXTERNAL F, JAC, DF, PJAC, PDF
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1  RDUM1(37),EL0, H, RDUM2(6),
+     2  IOWND1(14), IOWNS(4),
+     3  IDUM1(3), IERPJ, IDUM2(6),
+     4  MITER, IDUM3(4), N, IDUM4(5)
+      COMMON /ODE002/ RDUM3(3),
+     1  IOWND2(3), IDUM5, NSV, IDUM6, NSPE, IDUM7, IERSP, JOPT, IDUM8
+C-----------------------------------------------------------------------
+C SPRIME IS CALLED BY ODESSA TO INITIALIZE THE YH ARRAY. IT IS ALSO
+C CALLED BY STODE TO REEVALUATE FIRST ORDER DERIVATIVES WHEN KFLAG
+C .LE. -3. SPRIME COMPUTES THE FIRST DERIVATIVES OF THE SENSITIVITY
+C COEFFICIENTS WITH RESPECT TO THE INDEPENDENT VARIABLE T...
+C
+C        SPRIME = D(DY/DP)/DT = JAC*DY/DP + DF/DP
+C                   WHERE JAC = JACOBIAN MATRIX
+C                       DY/DP = SENSITIVITY MATRIX
+C                       DF/DP = INHOMOGENEITY MATRIX
+C THIS ROUTINE USES THE COMMON VARIABLES EL0, H, IERPJ, MITER, N,
+C NSV, NSPE, IERSP, JOPT
+C-----------------------------------------------------------------------
+C CALL PREPJ WITH JOPT = 1.
+C IF MITER = 2 OR 5, EL0 IS TEMPORARILY SET TO -1.0 AND H IS
+C TEMPORARILY SET TO 1.0D0.
+C-----------------------------------------------------------------------
+      NSPE = NSPE + 1
+      JOPT = 1
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 10
+      HTEMP = H
+      ETEMP = EL0
+      H = ONE
+      EL0 = -ONE
+ 10   CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 300
+      JOPT = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 20
+      H = HTEMP
+      EL0 = ETEMP
+C-----------------------------------------------------------------------
+C CALL PREPDF AND LOAD DFDP(*,JPAR).
+C-----------------------------------------------------------------------
+ 20   DO 30 J = 2,NSV
+        JPAR = J - 1
+        CALL PDF (NEQ, Y, WM, SAVF, FTEM, DFDP(1,JPAR), PAR,
+     1     F, DF, JPAR)
+ 30   CONTINUE
+C-----------------------------------------------------------------------
+C COMPUTE JAC*DY/DP AND STORE RESULTS IN YH(*,*,2).
+C-----------------------------------------------------------------------
+      GO TO (40,40,310,100,100) MITER
+C THE JACOBIAN IS FULL.------------------------------------------------
+C FOR EACH ROW OF THE JACOBIAN..
+ 40   DO 70 IROW = 1,N
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+        DO 60 J = 2,NSV
+          SUM = ZERO
+C TAKE THE VECTOR DOT PRODUCT..
+          DO 50 I = 1,N
+            IPD = IROW + N*(I-1) + 2
+            SUM = SUM + WM(IPD)*YH(I,J,1)
+ 50       CONTINUE
+          YH(IROW,J,2) = SUM
+ 60     CONTINUE
+ 70   CONTINUE
+      GO TO 200
+C THE JACOBIAN IS BANDED.-----------------------------------------------
+ 100  ML = IWM(1)
+      MU = IWM(2)
+      ICOUNT = 1
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      NMU = N - MU
+      ML1 = ML + 1
+C FOR EACH ROW OF THE JACOBIAN..
+      DO 160 IROW = 1,N
+        IF (IROW .GT. ML1) GO TO 110
+        IPD = MBAND + IROW + 1
+        IYH = 1
+        LBAND = MU + IROW
+        GO TO 120
+ 110    ICOUNT = ICOUNT + 1
+        IPD = ICOUNT*MEBAND + 2
+        IYH = IYH + 1
+        LBAND = LBAND - 1
+        IF (IROW .LE. NMU) LBAND = MBAND
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+ 120    DO 150 J = 2,NSV
+          SUM = ZERO
+          I1 = IPD
+          I2 = IYH
+C TAKE THE VECTOR DOT PRODUCT.
+          DO 140 I = 1,LBAND
+            SUM = SUM + WM(I1)*YH(I2,J,1)
+            I1 = I1 + MEBAND - 1
+            I2 = I2 + 1
+ 140      CONTINUE
+          YH(IROW,J,2) = SUM
+ 150    CONTINUE
+ 160  CONTINUE
+C-----------------------------------------------------------------------
+C ADD THE INHOMOGENEITY TERM, I.E., ADD DFDP(*,JPAR) TO YH(*,JPAR+1,2).
+C-----------------------------------------------------------------------
+ 200  DO 220 J = 2,NSV
+        JPAR = J - 1
+        DO 210 I = 1,N
+          YH(I,J,2) = YH(I,J,2) + DFDP(I,JPAR)
+ 210    CONTINUE
+ 220  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C ERROR RETURNS.
+C-----------------------------------------------------------------------
+ 300  IERSP = -1
+      RETURN
+ 310  IERSP = -2
+      RETURN
+C------------------------END OF SUBROUTINE SPRIME-----------------------
+      END
+      SUBROUTINE PREPJ (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, F, JAC, JOPT)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), FTEM(*), PAR(*)
+      EXTERNAL F, JAC
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(4), TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(3), IERPJ, IDUM2, JCUR, IDUM3(4),
+     5   MITER, IDUM4(4), N, IDUM5(2), NFE, NJE, IDUM6
+C-----------------------------------------------------------------------
+C PREPJ IS CALLED BY STODE TO COMPUTE AND PROCESS THE MATRIX
+C P = I - H*EL(1)*J , WHERE J IS AN APPROXIMATION TO THE JACOBIAN.
+C IF ISOPT = 1, PREPJ IS ALSO CALLED BY SPRIME WITH JOPT = 1.
+C HERE J IS COMPUTED BY THE USER-SUPPLIED ROUTINE JAC IF
+C MITER = 1 OR 4, OR BY FINITE DIFFERENCING IF MITER = 2, 3, OR 5.
+C IF MITER = 3, A DIAGONAL APPROXIMATION TO J IS USED.
+C J IS STORED IN WM AND REPLACED BY P.  IF MITER .NE. 3, P IS THEN
+C SUBJECTED TO LU DECOMPOSITION (JOPT = 0) IN PREPARATION FOR LATER
+C SOLUTION OF LINEAR SYSTEMS WITH P AS COEFFICIENT MATRIX. THIS IS
+C DONE BY DGEFA IF MITER = 1 OR 2, AND BY DGBFA IF MITER = 4 OR 5.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH PREPJ USES THE FOLLOWING..
+C Y     = ARRAY CONTAINING PREDICTED VALUES ON ENTRY.
+C FTEM  = WORK ARRAY OF LENGTH N (ACOR IN STODE).
+C SAVF  = ARRAY CONTAINING F EVALUATED AT PREDICTED Y.
+C WM    = REAL WORK SPACE FOR MATRICES.  ON OUTPUT IT CONTAINS THE
+C         INVERSE DIAGONAL MATRIX IF MITER = 3 AND THE LU DECOMPOSITION
+C         OF P IF MITER IS 1, 2 , 4, OR 5.
+C         STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C         WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C         WM(1) = SQRT(UROUND), USED IN NUMERICAL JACOBIAN INCREMENTS.
+C         WM(2) = H*EL0, SAVED FOR LATER USE IF MITER = 3.
+C IWM   = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C         IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C         PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C EL0   = EL(1) (INPUT).
+C IERPJ = OUTPUT ERROR FLAG,  = 0 IF NO TROUBLE, .GT. 0 IF
+C         P MATRIX FOUND TO BE SINGULAR.
+C JCUR  = OUTPUT FLAG = 1 TO INDICATE THAT THE JACOBIAN MATRIX
+C         (OR APPROXIMATION) IS NOW CURRENT.
+C JOPT  = INPUT JACOBIAN OPTION, = 1 IF JAC IS DESIRED ONLY.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, UROUND,
+C IERPJ, JCUR, MITER, N, NFE, AND NJE.
+C-----------------------------------------------------------------------
+      NJE = NJE + 1
+      IERPJ = 0
+      JCUR = 1
+      HL0 = H*EL0
+      GO TO (100, 200, 300, 400, 500), MITER
+C IF MITER = 1, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+ 100   LENP = N*N
+      DO 110 I = 1,LENP
+ 110    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, 0, 0, WM(3), N)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 120 I = 1,LENP
+ 120    WM(I+2) = WM(I+2)*CON
+      GO TO 240
+C IF MITER = 2, MAKE N CALLS TO F TO APPROXIMATE J. --------------------
+ 200   FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      SRUR = WM(1)
+      J1 = 2
+      DO 230 J = 1,N
+        YJ = Y(J)
+        R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+        Y(J) = Y(J) + R
+        FAC = -HL0/R
+        CALL F (NEQ, TN, Y, PAR, FTEM)
+        DO 220 I = 1,N
+ 220      WM(I+J1) = (FTEM(I) - SAVF(I))*FAC
+        Y(J) = YJ
+        J1 = J1 + N
+ 230    CONTINUE
+      NFE = NFE + N
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 240   J = 3
+      DO 250 I = 1,N
+        WM(J) = WM(J) + ONE
+ 250    J = J + (N + 1)
+C DO LU DECOMPOSITION ON P. --------------------------------------------
+      CALL DGEFA (WM(3), N, N, IWM(21), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C IF MITER = 3, CONSTRUCT A DIAGONAL APPROXIMATION TO J AND P. ---------
+ 300   WM(2) = HL0
+      R = EL0*0.1D0
+      DO 310 I = 1,N
+ 310    Y(I) = Y(I) + R*(H*SAVF(I) - YH(I,2))
+      CALL F (NEQ, TN, Y, PAR, WM(3))
+      NFE = NFE + 1
+      DO 320 I = 1,N
+        R0 = H*SAVF(I) - YH(I,2)
+        DI = 0.1D0*R0 - H*(WM(I+2) - SAVF(I))
+        WM(I+2) = 1.0D0
+        IF (ABS(R0) .LT. UROUND/EWT(I)) GO TO 320
+        IF (ABS(DI) .EQ. ZERO) GO TO 330
+        WM(I+2) = 0.1D0*R0/DI
+ 320    CONTINUE
+      RETURN
+ 330   IERPJ = 1
+      RETURN
+C IF MITER = 4, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      ML3 = ML + 3
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      LENP = MEBAND*N
+      DO 410 I = 1,LENP
+ 410    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, ML, MU, WM(ML3), MEBAND)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 420 I = 1,LENP
+ 420    WM(I+2) = WM(I+2)*CON
+      GO TO 570
+C IF MITER = 5, MAKE MBAND CALLS TO F TO APPROXIMATE J. ----------------
+ 500   ML = IWM(1)
+      MU = IWM(2)
+      MBAND = ML + MU + 1
+      MBA = MIN(MBAND,N)
+      MEBAND = MBAND + ML
+      MEB1 = MEBAND - 1
+      SRUR = WM(1)
+      FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      DO 560 J = 1,MBA
+        DO 530 I = J,N,MBAND
+          YI = Y(I)
+          R = MAX(SRUR*ABS(YI),R0/EWT(I))
+ 530      Y(I) = Y(I) + R
+        CALL F (NEQ, TN, Y, PAR, FTEM)
+        DO 550 JJ = J,N,MBAND
+          Y(JJ) = YH(JJ,1)
+          YJJ = Y(JJ)
+          R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+          FAC = -HL0/R
+          I1 = MAX(JJ-MU,1)
+          I2 = MIN(JJ+ML,N)
+          II = JJ*MEB1 - ML + 2
+          DO 540 I = I1,I2
+ 540        WM(II+I) = (FTEM(I) - SAVF(I))*FAC
+ 550      CONTINUE
+ 560    CONTINUE
+      NFE = NFE + MBA
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 570   II = MBAND + 2
+      DO 580 I = 1,N
+        WM(II) = WM(II) + ONE
+ 580    II = II + MEBAND
+C DO LU DECOMPOSITION OF P. --------------------------------------------
+      CALL DGBFA (WM(3), MEBAND, N, ML, MU, IWM(21), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C----------------------- END OF SUBROUTINE PREPJ -----------------------
+      END
+      SUBROUTINE PREPDF (NEQ, Y, SRUR, SAVF, FTEM, DFDP, PAR,
+     1   F, DF, JPAR)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, DF
+      DIMENSION NEQ(*), Y(*), SAVF(*), FTEM(*), DFDP(*), PAR(*)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   RDUM1(43), TN, RDUM2,
+     2   IOWND1(14), IOWNS(4),
+     3   IDUM1(10), MITER, IDUM2(4), N, IDUM3(2), NFE, IDUM4(2)
+      COMMON /ODE002/ RDUM3(3),
+     1   IOWND2(3), IDUM5(2), NDFE, IDUM6, IDF, IDUM7(3)
+C-----------------------------------------------------------------------
+C PREPDF IS CALLED BY SPRIME AND STESA TO COMPUTE THE INHOMOGENEITY
+C VECTORS DF(I)/DP(JPAR). HERE DF/DP IS COMPUTED BY THE USER-SUPPLIED
+C ROUTINE DF IF IDF = 1, OR BY FINITE DIFFERENCING IF IDF = 0.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION WITH
+C PREPDF USES THE FOLLOWING..
+C Y     = REAL ARRAY OF LENGTH NYH CONTAINING DEPENDENT VARIABLES.
+C         PREPDF USES ONLY THE FIRST N ENTRIES OF Y(*).
+C SRUR  = SQRT(UROUND) (= WM(1)).
+C SAVF  = REAL ARRAY OF LENGTH N CONTAINING DERIVATIVES DY/DT.
+C FTEM  = REAL ARRAY OF LENGTH N USED TO TEMPORARILY STORE DY/DT FOR
+C         NUMERICAL DIFFERENTIATION.
+C DFDP  = REAL ARRAY OF LENGTH N USED TO STORE DF(I)/DP(JPAR), I = 1,N.
+C PAR   = REAL ARRAY OF LENGTH NPAR CONTAINING EQUATION PARAMETERS
+C         OF INTEREST.
+C JPAR  = INPUT PARAMETER, 2 .LE. JPAR .LE. NSV, DESIGNATING THE
+C         APPROPRIATE SOLUTION VECTOR CORRESPONDING TO PAR(JPAR).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES TN, MITER, N, NFE, NDFE,
+C AND IDF.
+C-----------------------------------------------------------------------
+      NDFE = NDFE + 1
+      IDF1 = IDF + 1
+      GO TO (100, 200), IDF1
+C IDF = 0, CALL F TO APPROXIMATE DFDP. ---------------------------------
+ 100  RPAR = PAR(JPAR)
+      R = MAX(SRUR*ABS(RPAR),SRUR)
+      PAR(JPAR) = RPAR + R
+      FAC = 1.0D0/R
+      CALL F (NEQ, TN, Y, PAR, FTEM)
+      DO 110 I = 1,N
+ 110    DFDP(I) = (FTEM(I) - SAVF(I))*FAC
+      PAR(JPAR) = RPAR
+      NFE = NFE + 1
+      RETURN
+C IDF = 1, CALL USER SUPPLIED DF. --------------------------------------
+ 200  DO 210 I = 1,N
+ 210    DFDP(I) = 0.0D0
+      CALL DF (NEQ, TN, Y, PAR, DFDP, JPAR)
+      RETURN
+C -------------------- END OF SUBROUTINE PREPDF ------------------------
+      END
+      SUBROUTINE INTDY (T, K, YH, NYH, DKY, IFLAG)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION YH(NYH,1), DKY(1)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(38),H, RDUM2(2), HU, RDUM3, TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(8), L, IDUM2,
+     5   IDUM3(5), N, NQ, IDUM4(4)
+C-----------------------------------------------------------------------
+C INTDY COMPUTES INTERPOLATED VALUES OF THE K-TH DERIVATIVE OF THE
+C DEPENDENT VARIABLE VECTOR Y, AND STORES IT IN DKY.  THIS ROUTINE
+C IS CALLED WITHIN THE PACKAGE WITH K = 0 AND T = TOUT, BUT MAY
+C ALSO BE CALLED BY THE USER FOR ANY K UP TO THE CURRENT ORDER.
+C (SEE DETAILED INSTRUCTIONS IN THE USAGE DOCUMENTATION.)
+C-----------------------------------------------------------------------
+C THE COMPUTED VALUES IN DKY ARE GOTTEN BY INTERPOLATION USING THE
+C NORDSIECK HISTORY ARRAY YH.  THIS ARRAY CORRESPONDS UNIQUELY TO A
+C VECTOR-VALUED POLYNOMIAL OF DEGREE NQCUR OR LESS, AND DKY IS SET
+C TO THE K-TH DERIVATIVE OF THIS POLYNOMIAL AT T.
+C THE FORMULA FOR DKY IS..
+C             Q
+C  DKY(I)  =  SUM  C(J,K) * (T - TN)**(J-K) * H**(-J) * YH(I,J+1)
+C            J=K
+C WHERE  C(J,K) = J*(J-1)*...*(J-K+1), Q = NQCUR, TN = TCUR, H = HCUR.
+C THE QUANTITIES  NQ = NQCUR, L = NQ+1, N = NEQ, TN, AND H ARE
+C COMMUNICATED BY COMMON.  THE ABOVE SUM IS DONE IN REVERSE ORDER.
+C IFLAG IS RETURNED NEGATIVE IF EITHER K OR T IS OUT OF BOUNDS.
+C-----------------------------------------------------------------------
+      IFLAG = 0
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
+      TP = TN - HU*(1.0D0 + 100.0D0*UROUND)
+      IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90
+C
+      S = (T - TN)/H
+      IC = 1
+      IF (K .EQ. 0) GO TO 15
+      JJ1 = L - K
+      DO 10 JJ = JJ1,NQ
+ 10     IC = IC*JJ
+ 15   C = REAL(IC)
+      DO 20 I = 1,NYH
+ 20     DKY(I) = C*YH(I,L)
+      IF (K .EQ. NQ) GO TO 55
+      JB2 = NQ - K
+      DO 50 JB = 1,JB2
+        J = NQ - JB
+        JP1 = J + 1
+        IC = 1
+        IF (K .EQ. 0) GO TO 35
+        JJ1 = JP1 - K
+        DO 30 JJ = JJ1,J
+ 30       IC = IC*JJ
+ 35     C = REAL(IC)
+        DO 40 I = 1,NYH
+ 40       DKY(I) = C*YH(I,JP1) + S*DKY(I)
+ 50     CONTINUE
+      IF (K .EQ. 0) RETURN
+ 55   R = H**(-K)
+      DO 60 I = 1,NYH
+ 60     DKY(I) = R*DKY(I)
+      RETURN
+C
+ 80   CALL XERR('INTDY--  K (=I1) ILLEGAL',
+     1  51, 1, 1, K, 0, 0, ZERO,ZERO)
+      IFLAG = -1
+      RETURN
+ 90   CALL XERR ('INTDY--  T (=R1) ILLEGAL',
+     1   52, 1, 0, 0, 0, 1, T, ZERO)
+      CALL XERR('T NOT IN INTERVAL TCUR - HU (= R1) TO TCUR (=R2)',
+     1   52, 1, 0, 0, 0, 2, TP, TN)
+      IFLAG = -2
+      RETURN
+C----------------------- END OF SUBROUTINE INTDY -----------------------
+      END
+      SUBROUTINE STESA (NEQ, Y, NROW, NCOL, YH, WM, IWM, EWT, SAVF,
+     1   ACOR, PAR, NRS, F, JAC, DF, PJAC, PDF, KppSolve)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, KppSolve
+      DIMENSION NEQ(*), Y(NROW,*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1   EWT(NROW,*), SAVF(*), ACOR(NROW,*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   TESCO(3,12), RDUM1, EL0, H, RDUM2(4), TN, RDUM3,
+     2   IOWND1(14), IOWNS(4),
+     3   IALTH, LMAX, IDUM1, IERPJ, IERSL, JCUR, IDUM2, KFLAG, L, IDUM3,
+     4   MITER, IDUM4(4), N, NQ, IDUM5, NFE, IDUM6(2)
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), IDUM7, NSV, IDUM8(2), IDF, IDUM9, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STESA IS CALLED BY STODE TO PERFORM AN EXPLICIT CALCULATION FOR THE
+C FIRST-ORDER SENSITIVITY COEFFICIENTS DY(I)/DP(J), I = 1,N; J = 1,NPAR.
+C
+C IN ADDITION TO THE VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH STESA USES THE FOLLOWING..
+C Y      = AN NROW (=N) BY NCOL (=NSV) REAL ARRAY CONTAINING THE
+C          CORRECTED DEPENDENT VARIABLES ON OUTPUT..
+C                  Y(I,1) , I = 1,N = STATE VARIABLES (INPUT);
+C                  Y(I,J) , I = 1,N , J = 2,NSV ,
+C                           = SENSITIVITY COEFFICIENTS, DY(I)/DP(J).
+C YH     = AN N BY NSV BY LMAX REAL ARRAY CONTAINING THE PREDICTED
+C          DEPENDENT VARIABLES AND THEIR APPROXIMATE SCALED DERIVATIVES.
+C SAVF   = A REAL ARRAY OF LENGTH N USED TO STORE FIRST DERIVATIVES
+C          OF DEPENDENT VARIABLES IF MITER = 2 OR 5.
+C PAR    = A REAL ARRAY OF LENGTH NPAR CONTAINING THE EQUATION
+C          PARAMETERS OF INTEREST.
+C NRS    = AN INTEGER ARRAY OF LENGTH NPAR + 1 CONTAINING THE NUMBER
+C          OF REPEATED STEPS (KFLAGS .LT. 0) DUE TO THE SENSITIVITY
+C          CALCULATIONS..
+C                  NRS(1) = TOTAL NUMBER OF REPEATED STEPS
+C                  NRS(I) , I = 2,NPAR = NUMBER OF REPEATED STEPS DUE
+C                                        TO PARAMETER I.
+C NSV    = NUMBER OF SOLUTION VECTORS = NPAR + 1.
+C KFLAGS = LOCAL ERROR TEST FLAG, = 0 IF TEST PASSES, .LT. 0 IF TEST
+C          FAILS, AND STEP NEEDS TO BE REPEATED. ERROR TEST IS APPLIED
+C          TO EACH SOLUTION VECTOR INDEPENDENTLY.
+C DUPS, DSMS, DDNS = REAL SCALARS USED FOR COMPUTING RHUP, RHSM, RHDN,
+C                    ON RETURN TO STODE (IALTH .EQ. 1).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, IALTH, LMAX,
+C IERPJ, IERSL, JCUR, KFLAG, L, MITER, N, NQ, NFE, AND JOPT.
+C-----------------------------------------------------------------------
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      HL0 = H*EL0
+      EL0I = ONE/EL0
+      TI2 = ONE/TESCO(2,NQ)
+      TI3 = ONE/TESCO(3,NQ)
+C IF MITER = 2 OR 5 (OR IDF = 0), SUPPLY DERIVATIVES AT CORRECTED
+C Y(*,1) VALUES FOR NUMERICAL DIFFERENTIATION IN PJAC AND/OR PDF.
+      IF (MITER .EQ. 2  .OR.  MITER .EQ. 5  .OR.  IDF .EQ. 0)  GO TO 10
+      GO TO 15
+ 10   CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+C IF JCUR = 0, UPDATE THE JACOBIAN MATRIX.
+C IF MITER = 5, LOAD CORRECTED Y(*,1) VALUES INTO Y(*,2).
+ 15   IF (JCUR .EQ. 1) GO TO 30
+      IF (MITER .NE. 5) GO TO 25
+      DO 20 I = 1,N
+ 20     Y(I,2) = Y(I,1)
+ 25   CALL PJAC (NEQ, Y, Y(1,2), N, WM, IWM, EWT, SAVF, ACOR(1,2),
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) RETURN
+C-----------------------------------------------------------------------
+C THIS IS A LOOPING POINT FOR THE SENSITIVITY CALCULATIONS.
+C-----------------------------------------------------------------------
+C FOR EACH PARAMETER PAR(*), A SENSITIVITY SOLUTION VECTOR IS COMPUTED
+C USING THE SAME STEP SIZE (H) AND ORDER (NQ) AS IN STODE.
+C A LOCAL ERROR TEST IS APPLIED INDEPENDENTLY TO EACH SOLUTION VECTOR.
+C-----------------------------------------------------------------------
+ 30   DO 100 J = 2,NSV
+        JPAR = J - 1
+C EVALUATE INHOMOGENEITY TERM, TEMPORARILY LOAD INTO Y(*,JPAR+1). ------
+        CALL PDF(NEQ, Y, WM, SAVF, ACOR(1,J), Y(1,J), PAR,
+     1     F, DF, JPAR)
+C-----------------------------------------------------------------------
+C LOAD RHS OF SENSITIVITY SOLUTION (CORRECTOR) EQUATION..
+C
+C       RHS = DY/DP - EL(1)*H*D(DY/DP)/DT + EL(1)*H*DF/DP
+C
+C-----------------------------------------------------------------------
+        DO 40 I = 1,N
+ 40       Y(I,J) = YH(I,J,1) - EL0*YH(I,J,2) + HL0*Y(I,J)
+C-----------------------------------------------------------------------
+C KppSolve CORRECTOR EQUATION: THE SOLUTIONS ARE LOCATED IN Y(*,JPAR+1).
+C THE EXPLICIT FORMULA IS..
+C
+C       (I - EL(1)*H*JAC) * DY/DP(CORRECTED) = RHS
+C
+C-----------------------------------------------------------------------
+        CALL KppSolve (WM, IWM, Y(1,J), DUM)
+        IF (IERSL .NE. 0) RETURN
+C ESTIMATE LOCAL TRUNCATION ERROR. -------------------------------------
+        DO 50 I = 1,N
+ 50       ACOR(I,J) = (Y(I,J) - YH(I,J,1))*EL0I
+        ERR = VNORM(N, ACOR(1,J), EWT(1,J))*TI2
+        IF (ERR .GT. ONE) GO TO 200
+C-----------------------------------------------------------------------
+C LOCAL ERROR TEST PASSED. SET KFLAGS TO 0 TO INDICATE THIS.
+C IF IALTH = 1, COMPUTE DSMS, DDNS, AND DUPS (IF L .LT. LMAX).
+C-----------------------------------------------------------------------
+        KFLAGS = 0
+        IF (IALTH .GT. 1) GO TO 100
+        IF (L .EQ. LMAX) GO TO 70
+        DO 60 I= 1,N
+ 60       Y(I,J) = ACOR(I,J) - YH(I,J,LMAX)
+        DUPS = MAX(DUPS,VNORM(N,Y(1,J),EWT(1,J))*TI3)
+ 70     DSMS = MAX(DSMS,ERR)
+ 100  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C THIS SECTION IS REACHED IF THE ERROR TOLERANCE FOR SENSITIVITY
+C SOLUTION VECTOR JPAR HAS BEEN VIOLATED. KFLAGS IS MADE NEGATIVE TO
+C INDICATE THIS. IF KFLAGS = -1, SET KFLAG EQUAL TO ZERO SO THAT KFLAG
+C IS SET TO -1 ON RETURN TO STODE BEFORE REPEATING THE STEP.
+C INCREMENT NRS(1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO ALL
+C SENSITIVITY SOLUTION VECTORS) BY ONE.
+C INCREMENT NRS(JPAR+1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO
+C SOLUTION VECTOR JPAR+1) BY ONE.
+C LOAD DSMS FOR RH CALCULATION IN STODE.
+C-----------------------------------------------------------------------
+ 200  KFLAGS = KFLAGS - 1
+      IF (KFLAGS .EQ. -1) KFLAG = 0
+      NRS(1) = NRS(1) + 1
+      NRS(J) = NRS(J) + 1
+      DSMS = ERR
+      RETURN
+C------------------------ END OF SUBROUTINE STESA ----------------------
+      END
+      SUBROUTINE STODE (NEQ, Y, YH, NYH, YH1, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, SLVS
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), YH1(*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), ACOR(*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND,
+     1   CONIT, CRATE, EL(13), ELCO(13,12), HOLD, RMAX,
+     2   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     3   IOWND1(14), IPUP, MEO, NQNYH, NSLP,
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STODE PERFORMS ONE STEP OF THE INTEGRATION OF AN INITIAL VALUE
+C PROBLEM FOR A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS.
+C NOTE.. STODE IS INDEPENDENT OF THE VALUE OF THE ITERATION METHOD
+C INDICATOR MITER, WHEN THIS IS .NE. 0, AND HENCE IS INDEPENDENT
+C OF THE TYPE OF CHORD METHOD USED, OR THE JACOBIAN STRUCTURE.
+C FOR ISOPT = 1, STODE CALLS STESA FOR SENSITIVITY CALCULATIONS.
+C VARIABLES USED FOR COMMUNICATION WITH STESA ARE DESCRIBED IN STESA.
+C COMMUNICATION WITH STODE IS DONE WITH THE FOLLOWING VARIABLES..
+C
+C NEQ   = INTEGER ARRAY CONTAINING PROBLEM SIZE IN NEQ(1), AND
+C         NUMBER OF PARAMETERS TO BE CONSIDERED IN THE SENSITIVITY
+C         ANALYSIS NEQ(2) (FOR ISOPT = 1), AND PASSED AS THE
+C         NEQ ARGUMENT IN ALL CALLS TO F,  JAC, AND DF.
+C Y     = AN ARRAY OF LENGTH .GE. N USED AS THE Y ARGUMENT IN
+C         ALL CALLS TO F, JAC, AND DF.
+C YH    = AN NYH BY LMAX ARRAY CONTAINING THE DEPENDENT VARIABLES
+C         AND THEIR APPROXIMATE SCALED DERIVATIVES, WHERE
+C         LMAX = MAXORD + 1.  YH(I,J+1) CONTAINS THE APPROXIMATE
+C         J-TH DERIVATIVE OF Y(I), SCALED BY H**J/FACTORIAL(J)
+C         (J = 0,1,...,NQ).  ON ENTRY FOR THE FIRST STEP, THE FIRST
+C         TWO COLUMNS OF YH MUST BE SET FROM THE INITIAL VALUES.
+C NYH   = A CONSTANT INTEGER .GE. N, THE FIRST DIMENSION OF YH.
+C         THE TOTAL NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS..
+C         NYH = N, ISOPT = 0,
+C         NYH = N * (NPAR + 1), ISOPT = 1
+C YH1   = A ONE-DIMENSIONAL ARRAY OCCUPYING THE SAME SPACE AS YH.
+C EWT   = AN ARRAY OF LENGTH NYH CONTAINING MULTIPLICATIVE WEIGHTS
+C         FOR LOCAL ERROR MEASUREMENTS.  LOCAL ERRORS IN Y(I) ARE
+C         COMPARED TO 1.0/EWT(I) IN VARIOUS ERROR TESTS.
+C SAVF  = AN ARRAY OF WORKING STORAGE, OF LENGTH N.
+C         ALSO USED FOR INPUT OF YH(*,MAXORD+2) WHEN JSTART = -1
+C         AND MAXORD .LT. THE CURRENT ORDER NQ.
+C ACOR  = A WORK ARRAY OF LENGTH NYH, USED FOR THE ACCUMULATED
+C         CORRECTIONS.  ON A SUCCESSFUL RETURN, ACOR(I) CONTAINS
+C         THE ESTIMATED ONE-STEP LOCAL ERROR IN Y(I).
+C WM,IWM = REAL AND INTEGER WORK ARRAYS ASSOCIATED WITH MATRIX
+C         OPERATIONS IN CHORD ITERATION (MITER .NE. 0).
+C PJAC  = NAME OF ROUTINE TO EVALUATE AND PREPROCESS JACOBIAN MATRIX
+C         AND P = I - H*EL0*JAC, IF A CHORD METHOD IS BEING USED.
+C         IF ISOPT = 1, PJAC CAN BE CALLED TO CALCULATE JAC BY
+C         SETTING JOPT = 1.
+C SLVS  = NAME OF ROUTINE TO KppSolve LINEAR SYSTEM IN CHORD ITERATION.
+C CCMAX  = MAXIMUM RELATIVE CHANGE IN H*EL0 BEFORE PJAC IS CALLED.
+C H     = THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C         H IS ALTERED BY THE ERROR CONTROL ALGORITHM DURING THE
+C         PROBLEM.  H CAN BE EITHER POSITIVE OR NEGATIVE, BUT ITS
+C         SIGN MUST REMAIN CONSTANT THROUGHOUT THE PROBLEM.
+C HMIN  = THE MINIMUM ABSOLUTE VALUE OF THE STEP SIZE H TO BE USED.
+C HMXI  = INVERSE OF THE MAXIMUM ABSOLUTE VALUE OF H TO BE USED.
+C         HMXI = 0.0 IS ALLOWED AND CORRESPONDS TO AN INFINITE HMAX.
+C         HMIN AND HMXI MAY BE CHANGED AT ANY TIME, BUT WILL NOT
+C         TAKE EFFECT UNTIL THE NEXT CHANGE OF H IS CONSIDERED.
+C TN    = THE INDEPENDENT VARIABLE. TN IS UPDATED ON EACH STEP TAKEN.
+C JSTART = AN INTEGER USED FOR INPUT ONLY, WITH THE FOLLOWING
+C         VALUES AND MEANINGS..
+C              0  PERFORM THE FIRST STEP.
+C          .GT.0  TAKE A NEW STEP CONTINUING FROM THE LAST.
+C             -1  TAKE THE NEXT STEP WITH A NEW VALUE OF H, MAXORD,
+C                   N, METH, OR MITER.
+C             -2  TAKE THE NEXT STEP WITH A NEW VALUE OF H,
+C                   BUT WITH OTHER INPUTS UNCHANGED.
+C         ON RETURN, JSTART IS SET TO 1 TO FACILITATE CONTINUATION.
+C KFLAG  = A COMPLETION CODE WITH THE FOLLOWING MEANINGS..
+C              0  THE STEP WAS SUCCESFUL.
+C             -1  THE REQUESTED ERROR COULD NOT BE ACHIEVED.
+C             -2  CORRECTOR CONVERGENCE COULD NOT BE ACHIEVED.
+C             -3  FATAL ERROR IN PJAC, OR SLVS, (OR STESA).
+C         A RETURN WITH KFLAG = -1 OR -2 MEANS EITHER
+C         ABS(H) = HMIN OR 10 CONSECUTIVE FAILURES OCCURRED.
+C         ON A RETURN WITH KFLAG NEGATIVE, THE VALUES OF TN AND
+C         THE YH ARRAY ARE AS OF THE BEGINNING OF THE LAST
+C         STEP, AND H IS THE LAST STEP SIZE ATTEMPTED.
+C MAXORD = THE MAXIMUM ORDER OF INTEGRATION METHOD TO BE ALLOWED.
+C MAXCOR = THE MAXIMUM NUMBER OF CORRECTOR ITERATIONS ALLOWED.
+C          (= 3, IF ISOPT = 0)
+C          (= 4, IF ISOPT = 1)
+C MSBP  = MAXIMUM NUMBER OF STEPS BETWEEN PJAC CALLS (MITER .GT. 0).
+C         IF ISOPT = 1, PJAC IS CALLED AT LEAST ONCE EVERY STEP.
+C MXNCF  = MAXIMUM NUMBER OF CONVERGENCE FAILURES ALLOWED.
+C METH/MITER = THE METHOD FLAGS.  SEE DESCRIPTION IN DRIVER.
+C N     = THE NUMBER OF FIRST-ORDER MODEL DIFFERENTIAL EQUATIONS.
+C-----------------------------------------------------------------------
+      KFLAG = 0
+      KFLAGS = 0
+      TOLD = TN
+      NCF = 0
+      IERPJ = 0
+      IERSL = 0
+      JCUR = 0
+      ICF = 0
+      IF (JSTART .GT. 0) GO TO 200
+      IF (JSTART .EQ. -1) GO TO 100
+      IF (JSTART .EQ. -2) GO TO 160
+C-----------------------------------------------------------------------
+C ON THE FIRST CALL, THE ORDER IS SET TO 1, AND OTHER VARIABLES ARE
+C INITIALIZED.  RMAX IS THE MAXIMUM RATIO BY WHICH H CAN BE INCREASED
+C IN A SINGLE STEP.  IT IS INITIALLY 1.E4 TO COMPENSATE FOR THE SMALL
+C INITIAL H, BUT THEN IS NORMALLY EQUAL TO 10.  IF A FAILURE
+C OCCURS (IN CORRECTOR CONVERGENCE OR ERROR TEST), RMAX IS SET AT 2
+C FOR THE NEXT INCREASE.
+C THESE COMPUTATIONS CONSIDER ONLY THE ORIGINAL SOLUTION VECTOR.
+C THE SENSITIVITY SOLUTION VECTORS ARE CONSIDERED IN STESA (ISOPT = 1).
+C-----------------------------------------------------------------------
+      LMAX = MAXORD + 1
+      NQ = 1
+      L = 2
+      IALTH = 2
+      RMAX = 10000.0D0
+      RC = ZERO
+      EL0 = ONE
+      CRATE = 0.7D0
+      DELP = ZERO
+      HOLD = H
+      MEO = METH
+      NSLP = 0
+      IPUP = MITER
+      IRET = 3
+      GO TO 140
+C-----------------------------------------------------------------------
+C THE FOLLOWING BLOCK HANDLES PRELIMINARIES NEEDED WHEN JSTART = -1.
+C IPUP IS SET TO MITER TO FORCE A MATRIX UPDATE.
+C IF AN ORDER INCREASE IS ABOUT TO BE CONSIDERED (IALTH = 1),
+C IALTH IS RESET TO 2 TO POSTPONE CONSIDERATION ONE MORE STEP.
+C IF THE CALLER HAS CHANGED METH, CFODE IS CALLED TO RESET
+C THE COEFFICIENTS OF THE METHOD.
+C IF THE CALLER HAS CHANGED MAXORD TO A VALUE LESS THAN THE CURRENT
+C ORDER NQ, NQ IS REDUCED TO MAXORD, AND A NEW H CHOSEN ACCORDINGLY.
+C IF H IS TO BE CHANGED, YH MUST BE RESCALED.
+C IF H OR METH IS BEING CHANGED, IALTH IS RESET TO L = NQ + 1
+C TO PREVENT FURTHER CHANGES IN H FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 100   IPUP = MITER
+      LMAX = MAXORD + 1
+      IF (IALTH .EQ. 1) IALTH = 2
+      IF (METH .EQ. MEO) GO TO 110
+      CALL CFODE (METH, ELCO, TESCO)
+      MEO = METH
+      IF (NQ .GT. MAXORD) GO TO 120
+      IALTH = L
+      IRET = 1
+      GO TO 150
+ 110   IF (NQ .LE. MAXORD) GO TO 160
+ 120   NQ = MAXORD
+      L = LMAX
+      DO 125 I = 1,L
+ 125    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      DDN = VNORM (N, SAVF, EWT)/TESCO(1,L)
+      EXDN = ONE/REAL(L)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+      RH = MIN(RHDN,ONE)
+      IREDO = 3
+      IF (H .EQ. HOLD) GO TO 170
+      RH = MIN(RH,ABS(H/HOLD))
+      H = HOLD
+      GO TO 175
+C-----------------------------------------------------------------------
+C CFODE IS CALLED TO GET ALL THE INTEGRATION COEFFICIENTS FOR THE
+C CURRENT METH.  THEN THE EL VECTOR AND RELATED CONSTANTS ARE RESET
+C WHENEVER THE ORDER NQ IS CHANGED, OR AT THE START OF THE PROBLEM.
+C-----------------------------------------------------------------------
+ 140   CALL CFODE (METH, ELCO, TESCO)
+ 150   DO 155 I = 1,L
+ 155    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      GO TO (160, 170, 200), IRET
+C-----------------------------------------------------------------------
+C IF H IS BEING CHANGED, THE H RATIO RH IS CHECKED AGAINST
+C RMAX, HMIN, AND HMXI, AND THE YH ARRAY RESCALED.  IALTH IS SET TO
+C L = NQ + 1 TO PREVENT A CHANGE OF H FOR THAT MANY STEPS, UNLESS
+C FORCED BY A CONVERGENCE OR ERROR TEST FAILURE.
+C-----------------------------------------------------------------------
+ 160  IF (H .EQ. HOLD) GO TO 200
+      RH = H/HOLD
+      H = HOLD
+      IREDO = 3
+      GO TO 175
+ 170   RH = MAX(RH,HMIN/ABS(H))
+ 175   RH = MIN(RH,RMAX)
+      RH = RH/MAX(ONE,ABS(H)*HMXI*RH)
+      R = ONE
+      DO 180 J = 2,L
+        R = R*RH
+        DO 180 I = 1,NYH
+ 180      YH(I,J) = YH(I,J)*R
+      H = H*RH
+      RC = RC*RH
+      IALTH = L
+      IF (IREDO .EQ. 0) GO TO 690
+C-----------------------------------------------------------------------
+C THIS SECTION COMPUTES THE PREDICTED VALUES BY EFFECTIVELY
+C MULTIPLYING THE YH ARRAY BY THE PASCAL TRIANGLE MATRIX.
+C RC IS THE RATIO OF NEW TO OLD VALUES OF THE COEFFICIENT  H*EL(1).
+C WHEN RC DIFFERS FROM 1 BY MORE THAN CCMAX, IPUP IS SET TO MITER
+C TO FORCE PJAC TO BE CALLED, IF A JACOBIAN IS INVOLVED.
+C IN ANY CASE, PJAC IS CALLED AT LEAST EVERY MSBP STEPS FOR ISOPT = 0,
+C AND AT LEAST ONCE EVERY STEP FOR ISOPT = 1.
+C-----------------------------------------------------------------------
+ 200  IF (ABS(RC-ONE) .GT. CCMAX) IPUP = MITER
+      IF (NST .GE. NSLP+MSBP) IPUP = MITER
+      TN = TN + H
+      I1 = NQNYH + 1
+      DO 215 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 210 I = I1,NQNYH
+ 210      YH1(I) = YH1(I) + YH1(I+NYH)
+ 215    CONTINUE
+C-----------------------------------------------------------------------
+C UP TO MAXCOR CORRECTOR ITERATIONS ARE TAKEN.  (= 3, FOR ISOPT = 0;
+C = 4, FOR ISOPT = 1).  A CONVERGENCE TEST IS MADE ON THE R.M.S. NORM
+C OF EACH CORRECTION, WEIGHTED BY THE ERROR WEIGHT VECTOR EWT.  THE SUM
+C OF THE CORRECTIONS IS ACCUMULATED IN THE VECTOR ACOR(I), I = 1,N.
+C (ACOR(I), I = N+1,NYH IS LOADED IN SUBROUTINE STESA (ISOPT = 1).)
+C THE YH ARRAY IS NOT ALTERED IN THE CORRECTOR LOOP.
+C-----------------------------------------------------------------------
+ 220  M = 0
+      DO 230 I = 1,N
+ 230    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (IPUP .LE. 0) GO TO 250
+C-----------------------------------------------------------------------
+C IF INDICATED, THE MATRIX P = I - H*EL(1)*J IS REEVALUATED AND
+C PREPROCESSED BEFORE STARTING THE CORRECTOR ITERATION.  IPUP IS SET
+C TO 0 AS AN INDICATOR THAT THIS HAS BEEN DONE.
+C-----------------------------------------------------------------------
+      IPUP = 0
+      RC = ONE
+      NSLP = NST
+      CRATE = 0.7D0
+      CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, ACOR, PAR,
+     1   F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 430
+ 250   DO 260 I = 1,N
+ 260    ACOR(I) = ZERO
+ 270   IF (MITER .NE. 0) GO TO 350
+C-----------------------------------------------------------------------
+C IN THE CASE OF FUNCTIONAL ITERATION, UPDATE Y DIRECTLY FROM
+C THE RESULT OF THE LAST FUNCTION EVALUATION.
+C (IF ISOPT = 1, FUNCTIONAL ITERATION IS NOT ALLOWED.)
+C-----------------------------------------------------------------------
+      DO 290 I = 1,N
+        SAVF(I) = H*SAVF(I) - YH(I,2)
+ 290    Y(I) = SAVF(I) - ACOR(I)
+      DEL = VNORM (N, Y, EWT)
+      DO 300 I = 1,N
+        Y(I) = YH(I,1) + EL(1)*SAVF(I)
+ 300    ACOR(I) = SAVF(I)
+      GO TO 400
+C-----------------------------------------------------------------------
+C IN THE CASE OF THE CHORD METHOD, COMPUTE THE CORRECTOR ERROR,
+C AND KppSolve THE LINEAR SYSTEM WITH THAT AS RIGHT-HAND SIDE AND
+C P AS COEFFICIENT MATRIX.
+C-----------------------------------------------------------------------
+ 350   DO 360 I = 1,N
+ 360    Y(I) = H*SAVF(I) - (YH(I,2) + ACOR(I))
+      CALL SLVS (WM, IWM, Y, SAVF)
+      IF (IERSL .LT. 0) GO TO 430
+      IF (IERSL .GT. 0) GO TO 410
+      DEL = VNORM (N, Y, EWT)
+      DO 380 I = 1,N
+        ACOR(I) = ACOR(I) + Y(I)
+ 380    Y(I) = YH(I,1) + EL(1)*ACOR(I)
+C-----------------------------------------------------------------------
+C TEST FOR CONVERGENCE.  IF M.GT.0, AN ESTIMATE OF THE CONVERGENCE
+C RATE CONSTANT IS STORED IN CRATE, AND THIS IS USED IN THE TEST.
+C-----------------------------------------------------------------------
+ 400   IF (M .NE. 0) CRATE = MAX(0.2D0*CRATE,DEL/DELP)
+      DCON = DEL*MIN(ONE,1.5D0*CRATE)/(TESCO(2,NQ)*CONIT)
+      IF (DCON .LE. ONE) GO TO 450
+      M = M + 1
+      IF (M .EQ. MAXCOR) GO TO 410
+      IF (M .GE. 2 .AND. DEL .GT. 2.0D0*DELP) GO TO 410
+      DELP = DEL
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      GO TO 270
+C-----------------------------------------------------------------------
+C THE CORRECTOR ITERATION FAILED TO CONVERGE IN MAXCOR TRIES.
+C IF MITER .NE. 0 AND THE JACOBIAN IS OUT OF DATE, PJAC IS CALLED FOR
+C THE NEXT TRY.  OTHERWISE THE YH ARRAY IS RETRACTED TO ITS VALUES
+C BEFORE PREDICTION, AND H IS REDUCED, IF POSSIBLE.  IF H CANNOT BE
+C REDUCED OR MXNCF FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -2.
+C-----------------------------------------------------------------------
+ 410   IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430
+      ICF = 1
+      IPUP = MITER
+      GO TO 220
+ 430   ICF = 2
+      NCF = NCF + 1
+      RMAX = 2.0D0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 445 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 440 I = I1,NQNYH
+ 440      YH1(I) = YH1(I) - YH1(I+NYH)
+ 445    CONTINUE
+      IF (IERPJ .LT. 0 .OR. IERSL .LT. 0) GO TO 680
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 670
+      IF (NCF .EQ. MXNCF) GO TO 670
+      RH = 0.25D0
+      IPUP = MITER
+      IREDO = 1
+      GO TO 170
+C-----------------------------------------------------------------------
+C THE CORRECTOR HAS CONVERGED.
+C THE LOCAL ERROR TEST IS MADE AND CONTROL PASSES TO STATEMENT 500
+C IF IT FAILS. OTHERWISE, STESA IS CALLED (ISOPT = 1) TO PERFORM
+C SENSITIVITY CALCULATIONS AT CURRENT STEP SIZE AND ORDER.
+C-----------------------------------------------------------------------
+ 450   CONTINUE
+      IF (M .EQ. 0) DSM = DEL/TESCO(2,NQ)
+      IF (M .GT. 0) DSM = VNORM (N, ACOR, EWT)/TESCO(2,NQ)
+      IF (DSM .GT. ONE) GO TO 500
+C
+      IF (ISOPT .EQ. 0) GO TO 460
+C-----------------------------------------------------------------------
+C CALL STESA TO PERFORM EXPLICIT SENSITIVITY ANALYSIS.
+C IF THE LOCAL ERROR TEST FAILS (WITHIN STESA) FOR ANY SOLUTION VECTOR,
+C KFLAGS IS SET .LT. 0 AND CONTROL PASSES TO STATEMENT 500 UPON RETURN.
+C IN EITHER CASE, JCUR IS SET TO ZERO TO SIGNAL THAT THE JACOBIAN MAY
+C NEED UPDATING LATER.
+C-----------------------------------------------------------------------
+      CALL STESA (NEQ, Y, N, NSV, YH, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IF (IERPJ .NE. 0 .OR. IERSL .NE. 0) GO TO 680
+      IF (KFLAGS .LT. 0) GO TO 500
+C-----------------------------------------------------------------------
+C AFTER A SUCCESSFUL STEP, UPDATE THE YH ARRAY.
+C CONSIDER CHANGING H IF IALTH = 1.  OTHERWISE DECREASE IALTH BY 1.
+C IF IALTH IS THEN 1 AND NQ .LT. MAXORD, THEN ACOR IS SAVED FOR
+C USE IN A POSSIBLE ORDER INCREASE ON THE NEXT STEP.
+C IF A CHANGE IN H IS CONSIDERED, AN INCREASE OR DECREASE IN ORDER
+C BY ONE IS CONSIDERED ALSO.  A CHANGE IN H IS MADE ONLY IF IT IS BY A
+C FACTOR OF AT LEAST 1.1.  IF NOT, IALTH IS SET TO 3 TO PREVENT
+C TESTING FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 460   JCUR = 0
+      KFLAG = 0
+      IREDO = 0
+      NST = NST + 1
+      HU = H
+      NQU = NQ
+      DO 470 J = 1,L
+        DO 470 I = 1,NYH
+ 470      YH(I,J) = YH(I,J) + EL(J)*ACOR(I)
+      IALTH = IALTH - 1
+      IF (IALTH .EQ. 0) GO TO 520
+      IF (IALTH .GT. 1) GO TO 700
+      IF (L .EQ. LMAX) GO TO 700
+      DO 490 I = 1,NYH
+ 490    YH(I,LMAX) = ACOR(I)
+      GO TO 700
+C-----------------------------------------------------------------------
+C THE ERROR TEST FAILED IN EITHER STODE OR STESA.
+C KFLAG KEEPS TRACK OF MULTIPLE FAILURES.
+C RESTORE TN AND THE YH ARRAY TO THEIR PREVIOUS VALUES, AND PREPARE
+C TO TRY THE STEP AGAIN.  COMPUTE THE OPTIMUM STEP SIZE FOR THIS OR
+C ONE LOWER ORDER.  AFTER 2 OR MORE FAILURES, H IS FORCED TO DECREASE
+C BY A FACTOR OF 0.2 OR LESS.
+C-----------------------------------------------------------------------
+ 500  KFLAG = KFLAG - 1
+      JCUR = 0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 515 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 510 I = I1,NQNYH
+ 510      YH1(I) = YH1(I) - YH1(I+NYH)
+ 515    CONTINUE
+      RMAX = 2.0D0
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 660
+      IF (KFLAG .LE. -3) GO TO 640
+      IREDO = 2
+      RHUP = ZERO
+      GO TO 540
+C-----------------------------------------------------------------------
+*
+C REGARDLESS OF THE SUCCESS OR FAILURE OF THE STEP, FACTORS
+C RHDN, RHSM, AND RHUP ARE COMPUTED, BY WHICH H COULD BE MULTIPLIED
+C AT ORDER NQ - 1, ORDER NQ, OR ORDER NQ + 1, RESPECTIVELY.
+C IN THE CASE OF FAILURE, RHUP = 0.0 TO AVOID AN ORDER INCREASE.
+C THE LARGEST OF THESE IS DETERMINED AND THE NEW ORDER CHOSEN
+C ACCORDINGLY.  IF THE ORDER IS TO BE INCREASED, WE COMPUTE ONE
+C ADDITIONAL SCALED DERIVATIVE.
+C FOR ISOPT = 1, DUPS AND DSMS ARE LOADED WITH THE LARGEST RMS-NORMS
+C OBTAINED BY CONSIDERING SEPARATELY THE SENSITIVITY SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 520   RHUP = ZERO
+      IF (L .EQ. LMAX) GO TO 540
+      DO 530 I = 1,N
+ 530    SAVF(I) = ACOR(I) - YH(I,LMAX)
+      DUP = VNORM (N, SAVF, EWT)/TESCO(3,NQ)
+      DUP = MAX(DUP,DUPS)
+      EXUP = ONE/REAL(L+1)
+      RHUP = ONE/(1.4D0*DUP**EXUP + 0.0000014D0)
+ 540   EXSM = ONE/REAL(L)
+      DSM = MAX(DSM,DSMS)
+      RHSM = ONE/(1.2D0*DSM**EXSM + 0.0000012D0)
+      RHDN = ZERO
+      IF (NQ .EQ. 1) GO TO 560
+      JPOINT = 1
+      DO 550 J = 1,NSV
+        DDN = VNORM (N, YH(JPOINT,L), EWT(JPOINT))/TESCO(1,NQ)
+        DDNS = MAX(DDNS,DDN)
+        JPOINT = JPOINT + N
+ 550  CONTINUE
+      DDN = DDNS
+      DDNS = ZERO
+      EXDN = ONE/REAL(NQ)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+ 560   IF (RHSM .GE. RHUP) GO TO 570
+      IF (RHUP .GT. RHDN) GO TO 590
+      GO TO 580
+ 570   IF (RHSM .LT. RHDN) GO TO 580
+      NEWQ = NQ
+      RH = RHSM
+      GO TO 620
+ 580   NEWQ = NQ - 1
+      RH = RHDN
+      IF (KFLAG .LT. 0 .AND. RH .GT. ONE) RH = ONE
+      GO TO 620
+ 590   NEWQ = L
+      RH = RHUP
+      IF (RH .LT. 1.1D0) GO TO 610
+      R = EL(L)/REAL(L)
+      DO 600 I = 1,NYH
+ 600    YH(I,NEWQ+1) = ACOR(I)*R
+      GO TO 630
+ 610   IALTH = 3
+      GO TO 700
+ 620   IF ((KFLAG .EQ. 0) .AND. (RH .LT. 1.1D0)) GO TO 610
+      IF (KFLAG .LE. -2) RH = MIN(RH,0.2D0)
+C-----------------------------------------------------------------------
+C IF THERE IS A CHANGE OF ORDER, RESET NQ, L, AND THE COEFFICIENTS.
+C IN ANY CASE H IS RESET ACCORDING TO RH AND THE YH ARRAY IS RESCALED.
+C THEN EXIT FROM 690 IF THE STEP WAS OK, OR REDO THE STEP OTHERWISE.
+C-----------------------------------------------------------------------
+      IF (NEWQ .EQ. NQ) GO TO 170
+ 630   NQ = NEWQ
+      L = NQ + 1
+      IRET = 2
+      GO TO 150
+C-----------------------------------------------------------------------
+C CONTROL REACHES THIS SECTION IF 3 OR MORE FAILURES HAVE OCCURED.
+C IF 10 FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -1.
+C IT IS ASSUMED THAT THE DERIVATIVES THAT HAVE ACCUMULATED IN THE
+C YH ARRAY HAVE ERRORS OF THE WRONG ORDER.  HENCE THE FIRST
+C DERIVATIVE IS RECOMPUTED, AND THE ORDER IS SET TO 1.  THEN
+C H IS REDUCED BY A FACTOR OF 10, AND THE STEP IS RETRIED,
+C UNTIL IT SUCCEEDS OR H REACHES HMIN.
+C-----------------------------------------------------------------------
+ 640   IF (KFLAG .EQ. -10) GO TO 660
+      RH = 0.1D0
+      RH = MAX(HMIN/ABS(H),RH)
+      H = H*RH
+      DO 645 I = 1,NYH
+ 645    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (ISOPT .EQ. 0) GO TO 649
+      CALL SPRIME (NEQ, Y, YH, NYH, N, NSV, WM, IWM, EWT, SAVF, ACOR,
+     1   ACOR(N+1), PAR, F, JAC, DF, PJAC, PDF)
+      IF (IERSP .LT. 0) GO TO 680
+      DO 646 I = N+1,NYH
+ 646    YH(I,2) = H*YH(I,2)
+ 649  DO 650 I = 1,N
+ 650    YH(I,2) = H*SAVF(I)
+      IPUP = MITER
+      IALTH = 5
+      IF (NQ .EQ. 1) GO TO 200
+      NQ = 1
+      L = 2
+      IRET = 3
+      GO TO 150
+C-----------------------------------------------------------------------
+C ALL RETURNS ARE MADE THROUGH THIS SECTION.  H IS SAVED IN HOLD
+C TO ALLOW THE CALLER TO CHANGE H ON THE NEXT STEP.
+C-----------------------------------------------------------------------
+ 660   KFLAG = -1
+      GO TO 720
+ 670   KFLAG = -2
+      GO TO 720
+ 680   KFLAG = -3
+      GO TO 720
+ 690   RMAX = 10.0D0
+ 700   R = ONE/TESCO(2,NQU)
+      DO 710 I = 1,NYH
+ 710    ACOR(I) = ACOR(I)*R
+ 720   HOLD = H
+      JSTART = 1
+      RETURN
+C----------------------- END OF SUBROUTINE STODE -----------------------
+      END
+      SUBROUTINE CFODE (METH, ELCO, TESCO)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION ELCO(13,12), TESCO(3,12)
+C-----------------------------------------------------------------------
+C CFODE IS CALLED BY THE INTEGRATOR ROUTINE TO SET COEFFICIENTS
+C NEEDED THERE.  THE COEFFICIENTS FOR THE CURRENT METHOD, AS
+C GIVEN BY THE VALUE OF METH, ARE SET FOR ALL ORDERS AND SAVED.
+C THE MAXIMUM ORDER ASSUMED HERE IS 12 IF METH = 1 AND 5 IF METH = 2.
+C (A SMALLER VALUE OF THE MAXIMUM ORDER IS ALSO ALLOWED.)
+C CFODE IS CALLED ONCE AT THE BEGINNING OF THE PROBLEM,
+C AND IS NOT CALLED AGAIN UNLESS AND UNTIL METH IS CHANGED.
+C
+C THE ELCO ARRAY CONTAINS THE BASIC METHOD COEFFICIENTS.
+C THE COEFFICIENTS EL(I), 1 .LE. I .LE. NQ+1, FOR THE METHOD OF
+C ORDER NQ ARE STORED IN ELCO(I,NQ).  THEY ARE GIVEN BY A GENETRATING
+C POLYNOMIAL, I.E.,
+C    L(X) = EL(1) + EL(2)*X + ... + EL(NQ+1)*X**NQ.
+C FOR THE IMPLICIT ADAMS METHODS, L(X) IS GIVEN BY
+C    DL/DX = (X+1)*(X+2)*...*(X+NQ-1)/FACTORIAL(NQ-1),    L(-1) = 0.
+C FOR THE BDF METHODS, L(X) IS GIVEN BY
+C    L(X) = (X+1)*(X+2)* ... *(X+NQ)/K,
+C WHERE        K = FACTORIAL(NQ)*(1 + 1/2 + ... + 1/NQ).
+C
+C THE TESCO ARRAY CONTAINS TEST CONSTANTS USED FOR THE
+C LOCAL ERROR TEST AND THE SELECTION OF STEP SIZE AND/OR ORDER.
+C AT ORDER NQ, TESCO(K,NQ) IS USED FOR THE SELECTION OF STEP
+C SIZE AT ORDER NQ - 1 IF K = 1, AT ORDER NQ IF K = 2, AND AT ORDER
+C NQ + 1 IF K = 3.
+C-----------------------------------------------------------------------
+      DIMENSION PC(12)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+C
+      GO TO (100, 200), METH
+C
+ 100   ELCO(1,1) = ONE
+      ELCO(2,1) = ONE
+      TESCO(1,1) = ZERO
+      TESCO(2,1) = 2.0D0
+      TESCO(1,2) = ONE
+      TESCO(3,12) = ZERO
+      PC(1) = ONE
+      RQFAC = ONE
+      DO 140 NQ = 2,12
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ-1).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        RQ1FAC = RQFAC
+        RQFAC = RQFAC/REAL(NQ)
+        NQM1 = NQ - 1
+        FNQM1 = REAL(NQM1)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ-1). ----------------------------------
+        PC(NQ) = ZERO
+        DO 110 IB = 1,NQM1
+          I = NQP1 - IB
+ 110      PC(I) = PC(I-1) + FNQM1*PC(I)
+        PC(1) = FNQM1*PC(1)
+C COMPUTE INTEGRAL, -1 TO 0, OF P(X) AND X*P(X). -----------------------
+        PINT = PC(1)
+        XPIN = PC(1)/2.0D0
+        TSIGN = ONE
+        DO 120 I = 2,NQ
+          TSIGN = -TSIGN
+          PINT = PINT + TSIGN*PC(I)/REAL(I)
+ 120      XPIN = XPIN + TSIGN*PC(I)/REAL(I+1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        ELCO(1,NQ) = PINT*RQ1FAC
+        ELCO(2,NQ) = ONE
+        DO 130 I = 2,NQ
+ 130      ELCO(I+1,NQ) = RQ1FAC*PC(I)/REAL(I)
+        AGAMQ = RQFAC*XPIN
+        RAGQ = ONE/AGAMQ
+        TESCO(2,NQ) = RAGQ
+        IF (NQ .LT. 12) TESCO(1,NQP1) = RAGQ*RQFAC/REAL(NQP1)
+        TESCO(3,NQM1) = RAGQ
+ 140    CONTINUE
+      RETURN
+C
+ 200   PC(1) = ONE
+      RQ1FAC = ONE
+      DO 230 NQ = 1,5
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        FNQ = REAL(NQ)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ). ------------------------------------
+        PC(NQP1) = ZERO
+        DO 210 IB = 1,NQ
+          I = NQ + 2 - IB
+ 210      PC(I) = PC(I-1) + FNQ*PC(I)
+        PC(1) = FNQ*PC(1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        DO 220 I = 1,NQP1
+ 220      ELCO(I,NQ) = PC(I)/PC(2)
+        ELCO(2,NQ) = ONE
+        TESCO(1,NQ) = RQ1FAC
+        TESCO(2,NQ) = REAL(NQP1)/ELCO(1,NQ)
+        TESCO(3,NQ) = REAL(NQ+2)/ELCO(1,NQ)
+        RQ1FAC = RQ1FAC/FNQ
+ 230    CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE CFODE -----------------------
+      END
+      SUBROUTINE SOLSY (WM, IWM, X, TEM)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION WM(*), IWM(*), X(*), TEM(*)
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(6),
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(4), IERSL, IDUM2(5),
+     5   MITER, IDUM3(4), N, IDUM4(5)
+C-----------------------------------------------------------------------
+C THIS ROUTINE MANAGES THE SOLUTION OF THE LINEAR SYSTEM ARISING FROM
+C A CHORD ITERATION.  IT IS CALLED IF MITER .NE. 0.
+C IF MITER IS 1 OR 2, IT CALLS DGESL TO ACCOMPLISH THIS.
+C IF MITER = 3 IT UPDATES THE COEFFICIENT H*EL0 IN THE DIAGONAL
+C MATRIX, AND THEN COMPUTES THE SOLUTION.
+C IF MITER IS 4 OR 5, IT CALLS DGBSL.
+C COMMUNICATION WITH SOLSY USES THE FOLLOWING VARIABLES..
+C WM   = REAL WORK SPACE CONTAINING THE INVERSE DIAGONAL MATRIX IF
+C        MITER = 3 AND THE LU DECOMPOSITION OF THE MATRIX OTHERWISE.
+C        STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C        WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C        WM(1) = SQRT(UROUND) (NOT USED HERE),
+C        WM(2) = HL0, THE PREVIOUS VALUE OF H*EL0, USED IF MITER = 3.
+C IWM  = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C        IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C        PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C X    = THE RIGHT-HAND SIDE VECTOR ON INPUT, AND THE SOLUTION VECTOR
+C        ON OUTPUT, OF LENGTH N.
+C TEM  = VECTOR OF WORK SPACE OF LENGTH N, NOT USED IN THIS VERSION.
+C IERSL = OUTPUT FLAG (IN COMMON).  IERSL = 0 IF NO TROUBLE OCCURRED.
+C        IERSL = 1 IF A SINGULAR MATRIX AROSE WITH MITER = 3.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, MITER, AND N.
+C-----------------------------------------------------------------------
+      IERSL = 0
+      GO TO (100, 100, 300, 400, 400), MITER
+ 100   CALL DGESL (WM(3), N, N, IWM(21), X, 0)
+      RETURN
+C
+ 300   PHL0 = WM(2)
+      HL0 = H*EL0
+      WM(2) = HL0
+      IF (HL0 .EQ. PHL0) GO TO 330
+      R = HL0/PHL0
+      DO 320 I = 1,N
+        DI = ONE - R*(ONE - ONE/WM(I+2))
+        IF (ABS(DI) .EQ. ZERO) GO TO 390
+ 320    WM(I+2) = ONE/DI
+ 330   DO 340 I = 1,N
+ 340    X(I) = WM(I+2)*X(I)
+      RETURN
+ 390   IERSL = 1
+      RETURN
+C
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      MEBAND = 2*ML + MU + 1
+      CALL DGBSL (WM(3), MEBAND, N, ML, MU, IWM(21), X, 0)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLSY -----------------------
+      END
+      SUBROUTINE EWSET (N, ITOL, RTOL, ATOL, YCUR, EWT)
+C-----------------------------------------------------------------------
+C THIS SUBROUTINE SETS THE ERROR WEIGHT VECTOR EWT ACCORDING TO
+C    EWT(I) = RTOL(I)*ABS(YCUR(I)) + ATOL(I),  I = 1,...,N,
+C WITH THE SUBSCRIPT ON RTOL AND/OR ATOL POSSIBLY REPLACED BY 1 ABOVE,
+C DEPENDING ON THE VALUE OF ITOL.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RTOL(*), ATOL(*), YCUR(N), EWT(N)
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 10 I = 1,N
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        EWT(I) = RTOLI*ABS(YCUR(I)) + ATOLI
+ 10     CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE EWSET -----------------------
+      END
+      DOUBLE PRECISION FUNCTION VNORM (N, V, W)
+C-----------------------------------------------------------------------
+C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED ROOT-MEAN-SQUARE NORM
+C OF THE VECTOR OF LENGTH N CONTAINED IN THE ARRAY V, WITH WEIGHTS
+C CONTAINED IN THE ARRAY W OF LENGTH N..
+C  VNORM = SQRT( (1/N) * SUM( V(I)*W(I) )**2 )
+C PROTECTION FOR UNDERFLOW/OVERFLOW IS ACCOMPLISHED USING TWO
+C CONSTANTS WHICH ARE HOPEFULLY APPLICABLE FOR ALL MACHINES.
+C THESE ARE:
+C     CUTLO = maximum of SQRT(U/EPS)  over all known machines
+C     CUTHI = minimum of SQRT(Z)      over all known machines
+C WHERE
+C     EPS = smallest number s.t. EPS + 1 .GT. 1
+C     U   = smallest positive number (underflow limit)
+C     Z   = largest number (overflow limit)
+C
+C DETAILS OF THE ALGORITHM AND OF VALUES OF CUTLO AND CUTHI ARE
+C FOUND IN THE BLAS ROUTINE SNRM2 (SEE ALSO ALGORITHM 539, TRANS.
+C MATH. SOFTWARE, VOL. 5 NO. 3, 1979, 308-323.
+C FOR SINGLE PRECISION, THE FOLLOWING VALUES SHOULD BE UNIVERSAL:
+C     DATA CUTLO,CUTHI /4.441E-16,1.304E19/
+C FOR DOUBLE PRECISION, USE
+C     DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INTEGER NEXT,I,J,N
+      DIMENSION V(N),W(N)
+      DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+      DATA ZERO,ONE/0.0D0,1.0D0/
+C  BLAS ALGORITHM
+      NEXT = 1
+      SUM = ZERO
+      I = 1
+20    SX = V(I)*W(I)
+      GO TO (30,40,70,80),NEXT
+30    IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 2
+      XMAX = ZERO
+40    IF (SX.EQ.ZERO) GO TO 130
+      IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 3
+      GO TO 60
+50    I=J
+      NEXT = 4
+      SUM = (SUM/SX)/SX
+60    XMAX = ABS(SX)
+      GO TO 90
+70    IF(ABS(SX).GT.CUTLO) GO TO 100
+80    IF(ABS(SX).LE.XMAX) GO TO 90
+      SUM = ONE + SUM * (XMAX/SX)**2
+      XMAX = ABS(SX)
+      GO TO 130
+90    SUM = SUM + (SX/XMAX)**2
+      GO TO 130
+100   SUM = (SUM*XMAX)*XMAX
+110   HITEST = CUTHI/REAL(N)
+      DO 120 J = I,N
+         SX = V(J)*W(J)
+         IF(ABS(SX).GE.HITEST) GO TO 50
+         SUM = SUM + SX**2
+120   CONTINUE
+      VNORM = SQRT(SUM)
+      GO TO 140
+130   CONTINUE
+      I = I + 1
+      IF (I.LE.N) GO TO 20
+      VNORM = XMAX * SQRT(SUM)
+140   CONTINUE
+      RETURN
+C----------------------- END OF FUNCTION VNORM -------------------------
+      END
+      SUBROUTINE SVCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE STORES IN RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSA
+C PACKAGE.
+C RSAV = REAL ARRAY OF LENGTH 222 OR MORE.
+C ISAV = INTEGER ARRAY OF LENGTH 52 OR MORE.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RSAV(I) = RODE1(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RSAV(J) = RODE2(I)
+      DO 30 I = 1,LIODE1
+ 30     ISAV(I) = IODE1(I)
+      DO 40 I = 1,LIODE2
+        J = LIODE1 + I
+ 40     ISAV(J) = IODE2(I)
+      ISAV(LIODE1+LIODE2+1) = IEH(1)
+      ISAV(LIODE1+LIODE2+2) = IEH(2)
+      RETURN
+C----------------------- END OF SUBROUTINE SVCOM -----------------------
+      END
+      SUBROUTINE RSCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE RESTORES FROM RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSSA
+C PACKAGE.  THIS PRESUMES THAT RSAV AND ISAV WERE LOADED BY MEANS
+C OF SUBROUTINE SVCOM OR THE EQUIVALENT.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RODE1(I) = RSAV(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RODE2(I) = RSAV(J)
+      DO 30 I = 1,LIODE1
+ 30     IODE1(I) = ISAV(I)
+      DO 40 I = 1,LODE2
+        J = LIODE1 + I
+ 40     IODE2(I) = ISAV(J)
+      IEH(1) = ISAV(LIODE1+LIODE2+1)
+      IEH(2) = ISAV(LIODE1+LIODE2+2)
+      RETURN
+C----------------------- END OF SUBROUTINE RSCOM -----------------------
+      END
+      SUBROUTINE DGEFA(A,LDA,N,IPVT,INFO)
+      INTEGER LDA,N,IPVT(*),INFO
+      DOUBLE PRECISION A(LDA,*)
+C
+C    DGEFA FACTORS A DOUBLE PRECISION MATRIX BY GAUSSIAN ELIMINATION.
+C
+C    DGEFA IS USUALLY CALLED BY DGECO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C    (TIME FOR DGECO) = (1 + 9/N)*(TIME FOR DGEFA) .
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE MATRIX TO BE FACTORED.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C    ON RETURN
+C
+C       A       AN UPPER TRIANGULAR MATRIX AND THE MULTIPLIERS
+C               WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGESL OR DGEDI WILL DIVIDE BY ZERO
+C                    IF CALLED.  USE  RCOND  IN DGECO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER IDAMAX,J,K,KP1,L,NM1
+C
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      INFO = 0
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 70
+      DO 60 K = 1, NM1
+         KP1 = K + 1
+C
+C        FIND L = PIVOT INDEX
+C
+         L = IDAMAX(N-K+1,A(K,K),1) + K - 1
+         IPVT(K) = L
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (A(L,K) .EQ. 0.0D0) GO TO 40
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. K) GO TO 10
+               T = A(L,K)
+               A(L,K) = A(K,K)
+               A(K,K) = T
+  10        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T  = -1.0D0/A(K,K)
+            CALL DSCAL(N-K,T,A(K+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            DO 30 J = KP1, N
+               T = A(L,J)
+               IF (L .EQ. K) GO TO 20
+                  A(L,J) = A(K,J)
+                  A(K,J) = T
+  20           CONTINUE
+               CALL DAXPY(N-K,T,A(K+1,K),1,A(K+1,J),1)
+  30        CONTINUE
+         GO TO 50
+  40     CONTINUE
+            INFO = K
+  50     CONTINUE
+  60  CONTINUE
+  70  CONTINUE
+      IPVT(N) = N
+      IF (A(N,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGESL(A,LDA,N,IPVT,B,JOB)
+      INTEGER LDA,N,IPVT(*),JOB
+      DOUBLE PRECISION A(LDA,*),B(*)
+C
+C     DGESL KppSolveS THE DOUBLE PRECISION SYSTEM
+C     A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGECO OR DGEFA.
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGECO OR DGEFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGECO OR DGEFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B  WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGECO HAS SET RCOND .GT. 0.0
+C       OR DGEFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGESL(A,LDA,N,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,NM1
+C
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve  L*Y = B
+C
+         IF (NM1 .LT. 1) GO TO 30
+         DO 20 K = 1, NM1
+            L = IPVT(K)
+            T = B(L)
+            IF (L .EQ. K) GO TO 10
+               B(L) = B(K)
+               B(K) = T
+  10        CONTINUE
+            CALL DAXPY(N-K,T,A(K+1,K),1,B(K+1),1)
+  20     CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/A(K,K)
+            T = -B(K)
+            CALL DAXPY(K-1,T,A(1,K),1,B(1),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            T = DDOT(K-1,A(1,K),1,B(1),1)
+            B(K) = (B(K) - T)/A(K,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (NM1 .LT. 1) GO TO 90
+         DO 80 KB = 1, NM1
+            K = N - KB
+            B(K) = B(K) + DDOT(N-K,A(K+1,K),1,B(K+1),1)
+            L = IPVT(K)
+            IF (L .EQ. K) GO TO 70
+               T = B(L)
+               B(L) = B(K)
+               B(K) = T
+  70        CONTINUE
+  80     CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DGBFA(ABD,LDA,N,ML,MU,IPVT,INFO)
+      INTEGER LDA,N,ML,MU,IPVT(*),INFO
+      DOUBLE PRECISION ABD(LDA,*)
+C
+C    DGBFA FACTORS A DOUBLE PRECISION BAND MATRIX BY ELIMINATION.
+C
+C    DGBFA IS USUALLY CALLED BY DGBCO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               CONTAINS THE MATRIX IN BAND STORAGE.  THE COLUMNS
+C               OF THE MATRIX ARE STORED IN THE COLUMNS OF  ABD  AND
+C               THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C               ML+1 THROUGH 2*ML+MU+1 OF  ABD .
+C               SEE THE COMMENTS BELOW FOR DETAILS.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C               LDA MUST BE .GE. 2*ML + MU + 1 .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C               0 .LE. ML .LT. N .
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C               0 .LE. MU .LT. N .
+C               MORE EFFICIENT IF  ML .LE. MU .
+C    ON RETURN
+C
+C       ABD     AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C               THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGBSL WILL DIVIDE BY ZERO IF
+C                    CALLED.  USE  RCOND  IN DGBCO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    BAND STORAGE
+C
+C          IF  A  IS A BAND MATRIX, THE FOLLOWING PROGRAM SEGMENT
+C          WILL SET UP THE INPUT.
+C
+C                  ML = (BAND WIDTH BELOW THE DIAGONAL)
+C                  MU = (BAND WIDTH ABOVE THE DIAGONAL)
+C                  M = ML + MU + 1
+C                  DO 20 J = 1, N
+C                     I1 = MAX0(1, J-MU)
+C                     I2 = MIN0(N, J+ML)
+C                     DO 10 I = I1, I2
+C                        K = I - J + M
+C                        ABD(K,J) = A(I,J)
+C               10    CONTINUE
+C               20 CONTINUE
+C
+C          THIS USES ROWS  ML+1  THROUGH  2*ML+MU+1  OF  ABD .
+C          IN ADDITION, THE FIRST  ML  ROWS IN  ABD  ARE USED FOR
+C          ELEMENTS GENERATED DURING THE TRIANGULARIZATION.
+C          THE TOTAL NUMBER OF ROWS NEEDED IN  ABD  IS  2*ML+MU+1 .
+C          THE  ML+MU BY ML+MU  UPPER LEFT TRIANGLE AND THE
+C          ML BY ML  LOWER RIGHT TRIANGLE ARE NOT REFERENCED.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C    FORTRAN MAX0,MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER I,IDAMAX,I0,J,JU,JZ,J0,J1,K,KP1,L,LM,M,MM,NM1
+C
+C
+      M = ML + MU + 1
+      INFO = 0
+C
+C     ZERO INITIAL FILL-IN COLUMNS
+C
+      J0 = MU + 2
+      J1 = MIN0(N,M) - 1
+      IF (J1 .LT. J0) GO TO 30
+      DO 20 JZ = J0, J1
+         I0 = M + 1 - JZ
+         DO 10 I = I0, ML
+            ABD(I,JZ) = 0.0D0
+  10     CONTINUE
+  20  CONTINUE
+  30  CONTINUE
+      JZ = J1
+      JU = 0
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 130
+      DO 120 K = 1, NM1
+         KP1 = K + 1
+C
+C        ZERO NEXT FILL-IN COLUMN
+C
+         JZ = JZ + 1
+         IF (JZ .GT. N) GO TO 50
+         IF (ML .LT. 1) GO TO 50
+            DO 40 I = 1, ML
+               ABD(I,JZ) = 0.0D0
+  40        CONTINUE
+  50     CONTINUE
+C
+C        FIND L = PIVOT INDEX
+C
+         LM = MIN0(ML,N-K)
+         L = IDAMAX(LM+1,ABD(M,K),1) + M - 1
+         IPVT(K) = L + K - M
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (ABD(L,K) .EQ. 0.0D0) GO TO 100
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. M) GO TO 60
+               T = ABD(L,K)
+               ABD(L,K) = ABD(M,K)
+               ABD(M,K) = T
+  60        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T = -1.0D0/ABD(M,K)
+            CALL DSCAL(LM,T,ABD(M+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            JU = MIN0(MAX0(JU,MU+IPVT(K)),N)
+            MM = M
+            IF (JU .LT. KP1) GO TO 90
+            DO 80 J = KP1, JU
+               L = L - 1
+               MM = MM - 1
+               T = ABD(L,J)
+               IF (L .EQ. MM) GO TO 70
+                  ABD(L,J) = ABD(MM,J)
+                  ABD(MM,J) = T
+  70           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+  80        CONTINUE
+  90        CONTINUE
+         GO TO 110
+  100    CONTINUE
+            INFO = K
+  110    CONTINUE
+  120  CONTINUE
+  130  CONTINUE
+      IPVT(N) = N
+      IF (ABD(M,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGBSL(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+      INTEGER LDA,N,ML,MU,IPVT(*),JOB
+      DOUBLE PRECISION ABD(LDA,*),B(*)
+C
+C    DGBSL KppSolveS THE DOUBLE PRECISION BAND SYSTEM
+C    A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGBCO OR DGBFA.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGBCO OR DGBFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGBCO OR DGBFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B , WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGBCO HAS SET RCOND .GT. 0.0
+C       OR DGBFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGBSL(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C    FORTRAN MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,LA,LB,LM,M,NM1
+C
+      M = MU + ML + 1
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve L*Y = B
+C
+         IF (ML .EQ. 0) GO TO 30
+         IF (NM1 .LT. 1) GO TO 30
+            DO 20 K = 1, NM1
+               LM = MIN0(ML,N-K)
+               L = IPVT(K)
+               T = B(L)
+               IF (L .EQ. K) GO TO 10
+                  B(L) = B(K)
+                  B(K) = T
+  10           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,B(K+1),1)
+  20        CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/ABD(M,K)
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = -B(K)
+            CALL DAXPY(LM,T,ABD(LA,K),1,B(LB),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = DDOT(LM,ABD(LA,K),1,B(LB),1)
+            B(K) = (B(K) - T)/ABD(M,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (ML .EQ. 0) GO TO 90
+         IF (NM1 .LT. 1) GO TO 90
+            DO 80 KB = 1, NM1
+               K = N - KB
+               LM = MIN0(ML,N-K)
+               B(K) = B(K) + DDOT(LM,ABD(M+1,K),1,B(K+1),1)
+               L = IPVT(K)
+               IF (L .EQ. K) GO TO 70
+                  T = B(L)
+                  B(L) = B(K)
+                  B(K) = T
+  70           CONTINUE
+  80        CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
+C
+C     CONSTANT TIMES A VECTOR PLUS A VECTOR.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DA
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      IF(N.LE.0)RETURN
+      IF (DA .EQ. 0.0D0) RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DY(IY) = DY(IY) + DA*DX(IX)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,4)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DY(I) = DY(I) + DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 4 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,4
+        DY(I) = DY(I) + DA*DX(I)
+        DY(I + 1) = DY(I + 1) + DA*DX(I + 1)
+        DY(I + 2) = DY(I + 2) + DA*DX(I + 2)
+        DY(I + 3) = DY(I + 3) + DA*DX(I + 3)
+  50  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DSCAL(N,DA,DX,INCX)
+C
+C     SCALES A VECTOR BY A CONSTANT.
+C     USES UNROLLED LOOPS FOR INCREMENT EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DA,DX(*)
+      INTEGER I,INCX,M,MP1,N,NINCX
+C
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+*
+C
+      NINCX = N*INCX
+      DO 10 I = 1,NINCX,INCX
+        DX(I) = DA*DX(I)
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DX(I) = DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DX(I) = DA*DX(I)
+        DX(I + 1) = DA*DX(I + 1)
+        DX(I + 2) = DA*DX(I + 2)
+        DX(I + 3) = DA*DX(I + 3)
+        DX(I + 4) = DA*DX(I + 4)
+  50  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
+C
+C     FORMS THE DOT PRODUCT OF TWO VECTORS.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DTEMP
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      DDOT = 0.0D0
+      DTEMP = 0.0D0
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DTEMP = DTEMP + DX(IX)*DY(IY)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      DDOT = DTEMP
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DTEMP = DTEMP + DX(I)*DY(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) GO TO 60
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DTEMP = DTEMP + DX(I)*DY(I) + DX(I + 1)*DY(I + 1) +
+     *   DX(I + 2)*DY(I + 2) + DX(I + 3)*DY(I + 3) + DX(I + 4)*DY(I + 4)
+  50  CONTINUE
+  60  DDOT = DTEMP
+      RETURN
+      END
+      INTEGER FUNCTION IDAMAX(N,DX,INCX)
+C
+C     FINDS THE INDEX OF ELEMENT HAVING MAX. ABSOLUTE VALUE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DMAX
+      INTEGER I,INCX,IX,N
+C
+      IDAMAX = 0
+      IF( N .LT. 1 ) RETURN
+      IDAMAX = 1
+      IF(N.EQ.1)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+C
+      IX = 1
+      DMAX = DABS(DX(1))
+      IX = IX + INCX
+      DO 10 I = 2,N
+         IF(DABS(DX(IX)).LE.DMAX) GO TO 5
+         IDAMAX = I
+         DMAX = DABS(DX(IX))
+   5     IX = IX + INCX
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+  20  DMAX = DABS(DX(1))
+      DO 30 I = 2,N
+         IF(DABS(DX(I)).LE.DMAX) GO TO 30
+         IDAMAX = I
+         DMAX = DABS(DX(I))
+  30  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C THIS ROUTINE COMPUTES THE UNIT ROUNDOFF OF THE MACHINE IN DOUBLE
+C PRECISION.  THIS IS DEFINED AS THE SMALLEST POSITIVE MACHINE NUMBER
+C U SUCH THAT  1.0D0 + U .NE. 1.0D0 (IN DOUBLE PRECISION).
+C-----------------------------------------------------------------------
+      DOUBLE PRECISION U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- END OF FUNCTION D1MACH ------------------------
+      END
+      SUBROUTINE XERR (MSG, NERR, IERT, NI, I1, I2, NR, R1, R2)
+      INTEGER NERR, IERT, NI, I1, I2, NR,
+     1   LUN, LUNIT, MESFLG
+      DOUBLE PRECISION R1, R2
+      CHARACTER*(*) MSG
+C-------------------------------------------------------------------
+C
+C ALL ARGUMENTS ARE INPUT ARGUMENTS.
+C
+C MSG   = THE MESSAGE (CHARACTER VARIABLE)
+C NERR  = THE ERROR NUMBER (NOT USED).
+C IERT  = THE ERROR TYPE..
+C         1 MEANS RECOVERABLE (CONTROL RETURNS TO CALLER).
+C         2 MEANS FATAL (RUN IS ABORTED--SEE NOTE BELOW).
+C NI    = NUMBER OF INTEGERS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C I1,I2  = INTEGERS TO BE PRINTED, DEPENDING ON NI.
+C NR    = NUMBER OF REALS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C R1,R2  = REALS TO BE PRINTED, DEPENDING ON NR.
+C
+C  NOTES:
+C 1. THE DIMENSION OF MSG IS ASSUMED TO BE AT MOST 60.
+C   (MULTI-LINE MESSAGES ARE GENERATED BY REPEATED CALLS.)
+C 2. IF IERT = 2, CONTROL PASSES TO THE STATEMENT  STOP
+C   TO ABORT THE RUN.  THIS STATEMENT MAY BE MACHINE-DEPENDENT.
+C 3. R1 AND R2 ARE ASSUMED TO BE IN DOUBLE PRECISION AND ARE PRINTED
+C   IN D21.13 FORMAT.
+C 4. THE COMMON BLOCK /EH0001/ BELOW IS DATA-LOADED (A MACHINE-
+C   DEPENDENT FEATURE) WITH DEFAULT VALUES.
+C   THIS BLOCK IS NEEDED FOR PROPER RETENTION OF PARAMETERS USED BY
+C   THIS ROUTINE WHICH THE USER CAN RESET BY CALLING XSETF OR XSETUN.
+C   THE VARIABLES IN THIS BLOCK ARE AS FOLLOWS..
+C      MESFLG = PRINT CONTROL FLAG..
+C               1 MEANS PRINT ALL MESSAGES (THE DEFAULT).
+C               0 MEANS NO PRINTING.
+C      LUNIT  = LOGICAL UNIT NUMBER FOR MESSAGES.
+C               THE DEFAULT IS 6 (MACHINE-DEPENDENT).
+C 5. TO CHANGE THE DEFAULT OUTPUT UNIT, CHANGE THE DATA STATEMENT
+C  IN THE BLOCK DATA SUBPROGRAM BELOW.
+C
+C FOR A DIFFERENT RUN-ABORT COMMAND, CHANGE THE STATEMENT FOLLOWING
+C STATEMENT 100 AT THE END.
+C-----------------------------------------------------------------------
+      COMMON /EH0001/ MESFLG, LUNIT
+      IF (MESFLG .EQ. 0) GO TO 100
+C GET LOGICAL UNIT NUMBER. ---------------------------------------------
+      LUN = LUNIT
+C WRITE THE MESSAGE. ---------------------------------------------------
+      WRITE (LUN, 10) MSG
+ 10   FORMAT(1X,A)
+C-----------------------------------------------------------------------
+      IF (NI .EQ. 1) WRITE (LUN, 20) I1
+ 20   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10)
+      IF (NI .EQ. 2) WRITE (LUN, 30) I1,I2
+ 30   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10,3X,'I2 = ',I10)
+      IF (NR .EQ. 1) WRITE (LUN, 40) R1
+ 40   FORMAT(6X,'IN ABOVE MESSAGE,  R1 = ',D21.13)
+      IF (NR .EQ. 2) WRITE (LUN, 50) R1,R2
+ 50   FORMAT(6X,'IN ABOVE,  R1 = ',D21.13,3X,'R2 = ',D21.13)
+C ABORT THE RUN IF IERT = 2. -------------------------------------------
+ 100   IF (IERT .NE. 2) RETURN
+      STOP
+C----------------------- END OF SUBROUTINE XERR ----------------------
+      END
+      SUBROUTINE XSETF (MFLAG)
+C
+C THIS ROUTINE RESETS THE PRINT CONTROL FLAG MFLAG.
+C
+      INTEGER MFLAG, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) MESFLG = MFLAG
+      RETURN
+C----------------------- END OF SUBROUTINE XSETF -----------------------
+      END
+      SUBROUTINE XSETUN (LUN)
+C
+C THIS ROUTINE RESETS THE LOGICAL UNIT NUMBER FOR MESSAGES.
+C
+      INTEGER LUN, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (LUN .GT. 0) LUNIT = LUN
+      RETURN
+C----------------------- END OF SUBROUTINE XSETUN ----------------------
+      END
+      BLOCK DATA
+C-----------------------------------------------------------------------
+C THIS DATA SUBPROGRAM LOADS VARIABLES INTO THE INTERNAL COMMON
+C BLOCKS USED BY ODESSA AND ITS VARIANTS.  THE VARIABLES ARE
+C DEFINED AS FOLLOWS..
+C  ILLIN  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ILLEGAL INPUT.  THE RUN IS STOPPED WHEN
+C           ILLIN REACHES 5.
+C  NTREP  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ISTATE = 1 AND TOUT = T.  THE RUN IS
+C           STOPPED WHEN NTREP REACHES 5.
+C  MESFLG = FLAG TO CONTROL PRINTING OF ERROR MESSAGES.  1 MEANS PRINT,
+C           0 MEANS NO PRINTING.
+C  LUNIT  = DEFAULT VALUE OF LOGICAL UNIT NUMBER FOR PRINTING OF ERROR
+C           MESSAGES.
+C-----------------------------------------------------------------------
+      INTEGER ILLIN, IDUMA, NTREP, IDUMB, IOWNS, ICOMM, MESFLG, LUNIT
+      DOUBLE PRECISION ROWND, ROWNS, RCOMM
+      COMMON /ODE001/ ROWND, ROWNS(173), RCOMM(45),
+     1   ILLIN, IDUMA(10), NTREP, IDUMB(2), IOWNS(4), ICOMM(21)
+      COMMON /EH0001/ MESFLG, LUNIT
+      DATA ILLIN/0/, NTREP/0/
+      DATA MESFLG/1/, LUNIT/6/
+C
+C------------------------ END OF BLOCK DATA ----------------------------
+      END
+C-----------------------------------------------------------------------
+C INSTRUCTIONS FOR INSTALLING THE ODESSA PACKAGE. (see @ below.)
+C
+C ODESSA is an enhanced version of the widely disseminated ODE solver
+C LSODE, and as such retains the same properties regarding portability.
+C The notes below, adapted from the installation instructions for LSODE,
+C are intended to facilitate the installation of the ODESSA package in
+C the user's software library.
+C
+C 1. Both a single and a double precision version of ODESSA are
+C provided in this release.  It is expected that most users will
+C utilize the double precision version, except in the case of
+C extended word-length computers. Most routines used by ODESSA
+C are named the same regardless of whether they are single or
+C double precision.  The exceptions are the LINPAK and BLAS
+C routines that follow the LINPAK/BLAS naming conventions, i.e.
+C D--- for a double precision routine, and S--- for a single
+C precision routine.  Thus, care should be taken if both single
+C and double precision versions are stored in the same library.
+C
+C 2. Several routines in ODESSA have the same names as the LSODE
+C routines from which they were derived, although they contain
+C different code.  These are: INTDY, STODE, PREPJ, SVCOM, and
+C RSCOM.  If ODESSA is added to a subroutine library of which
+C LSODE is already a member, these routine names must be changed
+C in one of the two programs.  Also see the note regarding BLOCK
+C DATA subroutines below.
+C
+C 3.  In many cases, ODESSA uses unaltered LSODE routines and
+C common library routines that may already reside on your system.
+C The installation of ODESSA should be done so that identical routines
+C are shared rather than kept as duplicate copies.
+C a.  Normally, the user calls only subroutine ODESSA, but for optional
+C     capabilities the user may also CALL XSETUN, XSETF, SVCOM, RSCOM,
+C     or INTDY, as described in Part II of the Full Description in the
+C     User Documentation (ODESSA.DOC, see below).  Except for INTDY,
+C     none of these are called from within the package.
+C b.  Two routines, EWSET and VNORM, are optionally replaceable by the
+C     user if the package version is unsuitable.  Hence, the install-
+C     ation of the package should be done so that the user's version
+C     for either routine overrides the package version.
+C c.  The function routine D1MACH is provided to compute the unit
+C     roundoff of the machine and precision in use, in a manner com-
+C     patible with machine parameter routines developed at Bell Lab-
+C     oratories.  If such a routine has already been installed on
+C     your system, the version supplied here may be discarded.
+C d.  Linear algebraic systems are solved with routines from the
+C     LINPACK collection, in conjunction with routines from the Basic
+C     Linear Algebra module collection (BLAS).  In double precision,
+C     the names are DGEFA, DGESL, DGBFA, and DGBSL (from LINPACK), and
+C     DAXPY, DSCAL, IDAMAX, and DDOT (from BLAS). If these routines
+C     have already been installed on your system, copies supplied with
+C     ODESSA may be discarded.  The single precision versions of these
+C     routines are used in the single precision version.
+C
+C 4. There are four integer variables, in the two labeled COMMON
+C blocks /ODE001/ and /EH0001/, which need to be loaded with DATA
+C statements.  They can vary during execution, and are in common to
+C assure their retention between calls.  This is legal in ANSI Fortran
+C only if done in a BLOCK DATA subprogram, and this package has a
+C BLOCK DATA for this purpose.  However, BLOCK DATA subprograms can be
+C difficult to install in libraries, and many compilers allow such DATA
+C statements in subroutines.  If your system allows this, the location
+C of the DATA statements are just after the initial type and common
+C declarations in subroutines ODESSA and XERR.  In ODESSA, ILLIN and
+C NTREP are DATA-loaded as 0.  In XERR, MESFLG is loaded as 1 and
+C LUNIT is loaded as the appropriate default logical unit number.
+C
+C 5. The ODESSA package contains subscript expressions which may not
+C be accepted by some compilers.  Subscripts of the form I + J, I - J,
+C etc., occur in various routines.  If any of these forms are
+C unacceptable to your compiler, an extra line of code setting the
+C subscript to a dummy integer value should be added for each subscipt.
+C
+C 6. User documentation is provided in a two-level structure
+C to accommmodate both the casual and serious user.  The novice or
+C casual user should need to read only the Summary of Usage and the
+C Example Problem located at the beginning of the documentation.  More
+C experienced users, requiring the full set of available options,
+C should read the Full Description which follows the Example Problem.
+C
+C 7. The user documentation may need corrections in the following ways:
+C a.  If subroutine names have been changed to avoid conflicts between
+C     the LSODE and ODESSA packages, the corresponding name changes
+C     should be made in the documentation.
+C b.  In the Summary of Usage, and in the description of XSETUN under
+C     Part II of the Full Description, the default logical unit number
+C     should be corrected if it is not 6.
+C c.  In the Summary of Usage, users should be instructed to execute
+C     CALL XSETF(1) before the first CALL to ODESSA, if this is neces-
+C     sary for proper error message handling.  (see note 2(e) above.)
+C d.  In the description of the subroutines DF and JAC in the Summary
+C     of Usage and in Part I of the Full Description, it is stated
+C     that dummy names may be passed if these two routines are not user
+C     supplied.  Your system may require the user to supply a dummy
+C     subroutine instead.
+C e.  The ODESSA package treats the arguments NEQ, RTOL, and ATOL as
+C     arrays (possibly of length 1), while the usage documentation
+C     states that these arguments may be either arrays or scalars.
+C     If your system does not allow such a mismatch, then the
+C     documentation should be changed to reflect this.
+C 8.  A demonstration program is provided with the package for
+C     verification.
+C
+C
+C     Jorge R. Leis and Mark A. Kramer
+C     Department of Chemical Engineering
+C     Massachusetts Institute of Technology
+C     Cambridge, Massachusetts  02139
+C     U.S.A.
+C
+C     Current address of J.R. Leis (Jan. 1988):
+C
+C     Shell Development Company
+C     Westhollow Research Center
+C     Houston, TX
+C
+C  @ Adapted from 'Instructions for Installing LSODE', written by
+C    Alan C. Hindmarsh, Mathematics & Statistics Division, L-316,
+C    Lawrence Livermore National Laboratory, Livermore, CA. 94550
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_radau5.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_radau5.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_radau5.def	(revision 3477)
@@ -0,0 +1,19 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN FULL
+#DOUBLE ON 
+#INTFILE atm_radau5
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_radau5.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_radau5.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/atm_radau5.f	(revision 3477)
@@ -0,0 +1,4572 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT, H
+      SAVE H
+      DATA H /0.0d0/
+      INTEGER Nfun, Njac, Nstp, Nacc, Nrej, Ndec, Nsol
+      SAVE Nstp, Nacc, Nrej
+      DATA Nstp /0/
+      DATA Nacc /0/
+      DATA Nrej /0/
+      INTEGER i
+
+      PARAMETER (LWORK=5*NVAR*NVAR+12*NVAR+20,LIWORK=3*NVAR+20)
+      PARAMETER (LRCONT=4*NVAR+4)
+
+      KPP_REAL WORK(LWORK), RPAR(1)
+      INTEGER IWORK(LIWORK), IPAR(1)
+      COMMON /CONT/ ICONT(4),RCONT(LRCONT)
+      EXTERNAL FUNC_CHEM,JAC_CHEM,SOLOUT
+
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MLMAS=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUMAS=NVAR ! --- JACOBIAN IS A FULL MATRIX
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      IWORK(3) = 8    !  Max no. of Newton iterations
+      IWORK(4) = 0    !  Starting values for Newton are interpolated (0) or zero (1)
+      IWORK(8) = 2    ! Gustaffson (1) or classic(2) controller
+      WORK(2)  = 0.9  ! Safety factor
+
+      CALL RADAU5(NVAR,FUNC_CHEM,TIN,VAR,TOUT,H,
+     &                  RTOL,ATOL,ITOL,
+     &                  JAC_CHEM ,IJAC,MLJAC,MUJAC,
+     &                  FUNC_CHEM ,IMAS,MLMAS,MUMAS,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,RPAR,IPAR,IDID)
+
+
+       Nfun = Nfun + IWORK(14)
+       Njac = Njac + IWORK(15)
+       Nstp = Nstp + IWORK(16)
+       Nacc = Nacc + IWORK(17)
+       Nrej = Nrej + IWORK(18)
+       Ndec = Ndec + IWORK(19)
+       Nsol = Nsol + IWORK(20)
+
+       print("('Nstep=',I5,' Nacc=',I6,' Nrej=',I6)"),Nstp, Nacc, Nrej
+
+      IF (IDID.LT.0) THEN
+        print *,'RADAU: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE RADAU5(N,FCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,
+     &                  MAS ,IMAS,MLMAS,MUMAS,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,RPAR,IPAR,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS
+C                     M*Y'=F(X,Y).
+C     THE SYSTEM CAN BE (LINEARLY) IMPLICIT (MASS-MATRIX M .NE. I)
+C     OR EXPLICIT (M=I).
+C     THE METHOD USED IS AN IMPLICIT RUNGE-KUTTA METHOD (RADAU IIA)
+C     OF ORDER 5 WITH STEP SIZE CONTROL AND CONTINUOUS OUTPUT.
+C     C.F. SECTION IV.8
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND
+C              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+C
+C     THIS CODE IS PART OF THE BOOK:
+C         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+C         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+C         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+C         SPRINGER-VERLAG (1991)
+C
+C     VERSION OF SEPTEMBER 30, 1995
+C
+C     INPUT PARAMETERS
+C     ----------------
+C     N           DIMENSION OF THE SYSTEM
+C
+C     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+C                 VALUE OF F(X,Y):
+C                    SUBROUTINE FCN(N,X,Y,F,RPAR,IPAR)
+C                    KPP_REAL X,Y(N),F(N)
+C                    F(1)=...   ETC.
+C                 RPAR, IPAR (SEE BELOW)
+C
+C     X           INITIAL X-VALUE
+C
+C     Y(N)        INITIAL VALUES FOR Y
+C
+C     XEND        FINAL X-VALUE (XEND-X MAY BE POSITIVE OR NEGATIVE)
+C
+C     H           INITIAL STEP SIZE GUESS;
+C                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT,
+C                 H=1.D0/(NORM OF F'), USUALLY 1.D-3 OR 1.D-5, IS GOOD.
+C                 THIS CHOICE IS NOT VERY IMPORTANT, THE STEP SIZE IS
+C                 QUICKLY ADAPTED. (IF H=0.D0, THE CODE PUTS H=1.D-6).
+C
+C     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+C                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+C
+C     ITOL        SWITCH FOR RelTol AND AbsTol:
+C                   ITOL=0: BOTH RelTol AND AbsTol ARE SCALARS.
+C                     THE CODE KEEPS, ROUGHLY, THE LOCAL ERROR OF
+C                     Y(I) BELOW RelTol*ABS(Y(I))+AbsTol
+C                   ITOL=1: BOTH RelTol AND AbsTol ARE VECTORS.
+C                     THE CODE KEEPS THE LOCAL ERROR OF Y(I) BELOW
+C                     RelTol(I)*ABS(Y(I))+AbsTol(I).
+C
+C     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO Y
+C                 (THIS ROUTINE IS ONLY CALLED IF IJAC=1; SUPPLY
+C                 A DUMMY SUBROUTINE IN THE CASE IJAC=0).
+C                 FOR IJAC=1, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE JAC(N,X,Y,DFY,LDFY,RPAR,IPAR)
+C                    KPP_REAL X,Y(N),DFY(LDFY,N)
+C                    DFY(1,1)= ...
+C                 LDFY, THE COLUMN-LENGTH OF THE ARRAY, IS
+C                 FURNISHED BY THE CALLING PROGRAM.
+C                 IF (MLJAC.EQ.N) THE JACOBIAN IS SUPPOSED TO
+C                    BE FULL AND THE PARTIAL DERIVATIVES ARE
+C                    STORED IN DFY AS
+C                       DFY(I,J) = PARTIAL F(I) / PARTIAL Y(J)
+C                 ELSE, THE JACOBIAN IS TAKEN AS BANDED AND
+C                    THE PARTIAL DERIVATIVES ARE STORED
+C                    DIAGONAL-WISE AS
+C                       DFY(I-J+MUJAC+1,J) = PARTIAL F(I) / PARTIAL Y(J).
+C
+C     IJAC        SWITCH FOR THE COMPUTATION OF THE JACOBIAN:
+C                    IJAC=0: JACOBIAN IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "JAC" IS NEVER CALLED.
+C                    IJAC=1: JACOBIAN IS SUPPLIED BY SUBROUTINE JAC.
+C
+C     MLJAC       SWITCH FOR THE BANDED STRUCTURE OF THE JACOBIAN:
+C                    MLJAC=N: JACOBIAN IS A FULL MATRIX. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLJAC<N: MLJAC IS THE LOWER BANDWITH OF JACOBIAN
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C
+C     MUJAC       UPPER BANDWITH OF JACOBIAN  MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLJAC=N.
+C
+C     ----   MAS,IMAS,MLMAS, AND MUMAS HAVE ANALOG MEANINGS      -----
+C     ----   FOR THE "MASS MATRIX" (THE MATRIX "M" OF SECTION IV.8): -
+C
+C     MAS         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE MASS-
+C                 MATRIX M.
+C                 IF IMAS=0, THIS MATRIX IS ASSUMED TO BE THE IDENTITY
+C                 MATRIX AND NEEDS NOT TO BE DEFINED;
+C                 SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C                 IF IMAS=1, THE SUBROUTINE MAS IS OF THE FORM
+C                    SUBROUTINE MAS(N,AM,LMAS,RPAR,IPAR)
+C                    KPP_REAL AM(LMAS,N)
+C                    AM(1,1)= ....
+C                    IF (MLMAS.EQ.N) THE MASS-MATRIX IS STORED
+C                    AS FULL MATRIX LIKE
+C                         AM(I,J) = M(I,J)
+C                    ELSE, THE MATRIX IS TAKEN AS BANDED AND STORED
+C                    DIAGONAL-WISE AS
+C                         AM(I-J+MUMAS+1,J) = M(I,J).
+C
+C     IMAS       GIVES INFORMATION ON THE MASS-MATRIX:
+C                    IMAS=0: M IS SUPPOSED TO BE THE IDENTITY
+C                       MATRIX, MAS IS NEVER CALLED.
+C                    IMAS=1: MASS-MATRIX  IS SUPPLIED.
+C
+C     MLMAS       SWITCH FOR THE BANDED STRUCTURE OF THE MASS-MATRIX:
+C                    MLMAS=N: THE FULL MATRIX CASE. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLMAS<N: MLMAS IS THE LOWER BANDWITH OF THE
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C                 MLMAS IS SUPPOSED TO BE .LE. MLJAC.
+C
+C     MUMAS       UPPER BANDWITH OF MASS-MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLMAS=N.
+C                 MUMAS IS SUPPOSED TO BE .LE. MUJAC.
+C
+C     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+C                 NUMERICAL SOLUTION DURING INTEGRATION.
+C                 IF IOUT=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+C                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0.
+C                 IT MUST HAVE THE FORM
+C                    SUBROUTINE SOLOUT (NR,XOLD,X,Y,CONT,LRC,N,
+C                                       RPAR,IPAR,IRTRN)
+C                    KPP_REAL X,Y(N),CONT(LRC)
+C                    ....
+C                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+C                    GRID-POINT "X" (THEREBY THE INITIAL VALUE IS
+C                    THE FIRST GRID-POINT).
+C                 "XOLD" IS THE PRECEEDING GRID-POINT.
+C                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+C                    IS SET <0, RADAU5 RETURNS TO THE CALLING PROGRAM.
+C
+C          -----  CONTINUOUS OUTPUT: -----
+C                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+C                 FOR THE INTERVAL [XOLD,X] IS AVAILABLE THROUGH
+C                 THE FUNCTION
+C                        >>>   CONTR5(I,S,CONT,LRC)   <<<
+C                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+C                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+C                 S SHOULD LIE IN THE INTERVAL [XOLD,X].
+C                 DO NOT CHANGE THE ENTRIES OF CONT(LRC), IF THE
+C                 DENSE OUTPUT FUNCTION IS USED.
+C
+C     IOUT        SWITCH FOR CALLING THE SUBROUTINE SOLOUT:
+C                    IOUT=0: SUBROUTINE IS NEVER CALLED
+C                    IOUT=1: SUBROUTINE IS AVAILABLE FOR OUTPUT.
+C
+C     WORK        ARRAY OF WORKING SPACE OF LENGTH "LWORK".
+C                 WORK(1), WORK(2),.., WORK(20) SERVE AS PARAMETERS
+C                 FOR THE CODE. FOR STANDARD USE OF THE CODE
+C                 WORK(1),..,WORK(20) MUST BE SET TO ZERO BEFORE
+C                 CALLING. SEE BELOW FOR A MORE SOPHISTICATED USE.
+C                 WORK(21),..,WORK(LWORK) SERVE AS WORKING SPACE
+C                 FOR ALL VECTORS AND MATRICES.
+C                 "LWORK" MUST BE AT LEAST
+C                             N*(LJAC+LMAS+3*LE+12)+20
+C                 WHERE
+C                    LJAC=N              IF MLJAC=N (FULL JACOBIAN)
+C                    LJAC=MLJAC+MUJAC+1  IF MLJAC<N (BANDED JAC.)
+C                 AND
+C                    LMAS=0              IF IMAS=0
+C                    LMAS=N              IF IMAS=1 AND MLMAS=N (FULL)
+C                    LMAS=MLMAS+MUMAS+1  IF MLMAS<N (BANDED MASS-M.)
+C                 AND
+C                    LE=N               IF MLJAC=N (FULL JACOBIAN)
+C                    LE=2*MLJAC+MUJAC+1 IF MLJAC<N (BANDED JAC.)
+C
+C                 IN THE USUAL CASE WHERE THE JACOBIAN IS FULL AND THE
+C                 MASS-MATRIX IS THE INDENTITY (IMAS=0), THE MINIMUM
+C                 STORAGE REQUIREMENT IS
+C                             LWORK = 4*N*N+12*N+20.
+C                 IF IWORK(9)=M1>0 THEN "LWORK" MUST BE AT LEAST
+C                          N*(LJAC+12)+(N-M1)*(LMAS+3*LE)+20
+C                 WHERE IN THE DEFINITIONS OF LJAC, LMAS AND LE THE
+C                 NUMBER N CAN BE REPLACED BY N-M1.
+C
+C     LWORK       DECLARED LENGTH OF ARRAY "WORK".
+C
+C     IWORK       INTEGER WORKING SPACE OF LENGTH "LIWORK".
+C                 IWORK(1),IWORK(2),...,IWORK(20) SERVE AS PARAMETERS
+C                 FOR THE CODE. FOR STANDARD USE, SET IWORK(1),..,
+C                 IWORK(20) TO ZERO BEFORE CALLING.
+C                 IWORK(21),...,IWORK(LIWORK) SERVE AS WORKING AREA.
+C                 "LIWORK" MUST BE AT LEAST 3*N+20.
+C
+C     LIWORK      DECLARED LENGTH OF ARRAY "IWORK".
+C
+C     RPAR, IPAR  REAL AND INTEGER PARAMETERS (OR PARAMETER ARRAYS) WHICH
+C                 CAN BE USED FOR COMMUNICATION BETWEEN YOUR CALLING
+C                 PROGRAM AND THE FCN, JAC, MAS, SOLOUT SUBROUTINES.
+C
+C ----------------------------------------------------------------------
+C
+C     SOPHISTICATED SETTING OF PARAMETERS
+C     -----------------------------------
+C              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT WORK
+C              WELL. THEY MAY BE DEFINED BY SETTING WORK(1),...
+C              AS WELL AS IWORK(1),... DIFFERENT FROM ZERO.
+C              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+C
+C    IWORK(1)  IF IWORK(1).NE.0, THE CODE TRANSFORMS THE JACOBIAN
+C              MATRIX TO HESSENBERG FORM. THIS IS PARTICULARLY
+C              ADVANTAGEOUS FOR LARGE SYSTEMS WITH FULL JACOBIAN.
+C              IT DOES NOT WORK FOR BANDED JACOBIAN (MLJAC<N)
+C              AND NOT FOR IMPLICIT SYSTEMS (IMAS=1).
+C
+C    IWORK(2)  THIS IS THE MAXIMAL NUMBER OF ALLOWED STEPS.
+C              THE DEFAULT VALUE (FOR IWORK(2)=0) IS 100000.
+C
+C    IWORK(3)  THE MAXIMUM NUMBER OF NEWTON ITERATIONS FOR THE
+C              SOLUTION OF THE IMPLICIT SYSTEM IN EACH STEP.
+C              THE DEFAULT VALUE (FOR IWORK(3)=0) IS 7.
+C
+C    IWORK(4)  IF IWORK(4).EQ.0 THE EXTRAPOLATED COLLOCATION SOLUTION
+C              IS TAKEN AS STARTING VALUE FOR NEWTON'S METHOD.
+C              IF IWORK(4).NE.0 ZERO STARTING VALUES ARE USED.
+C              THE LATTER IS RECOMMENDED IF NEWTON'S METHOD HAS
+C              DIFFICULTIES WITH CONVERGENCE (THIS IS THE CASE WHEN
+C              NSTEP IS LARGER THAN NACCPT + NREJCT; SEE OUTPUT PARAM.).
+C              DEFAULT IS IWORK(4)=0.
+C
+C       THE FOLLOWING 3 PARAMETERS ARE IMPORTANT FOR
+C       DIFFERENTIAL-ALGEBRAIC SYSTEMS OF INDEX > 1.
+C       THE FUNCTION-SUBROUTINE SHOULD BE WRITTEN SUCH THAT
+C       THE INDEX 1,2,3 VARIABLES APPEAR IN THIS ORDER.
+C       IN ESTIMATING THE ERROR THE INDEX 2 VARIABLES ARE
+C       MULTIPLIED BY H, THE INDEX 3 VARIABLES BY H**2.
+C
+C    IWORK(5)  DIMENSION OF THE INDEX 1 VARIABLES (MUST BE > 0). FOR
+C              ODE'S THIS EQUALS THE DIMENSION OF THE SYSTEM.
+C              DEFAULT IWORK(5)=N.
+C
+C    IWORK(6)  DIMENSION OF THE INDEX 2 VARIABLES. DEFAULT IWORK(6)=0.
+C
+C    IWORK(7)  DIMENSION OF THE INDEX 3 VARIABLES. DEFAULT IWORK(7)=0.
+C
+C    IWORK(8)  SWITCH FOR STEP SIZE STRATEGY
+C              IF IWORK(8).EQ.1  MOD. PREDICTIVE CONTROLLER (GUSTAFSSON)
+C              IF IWORK(8).EQ.2  CLASSICAL STEP SIZE CONTROL
+C              THE DEFAULT VALUE (FOR IWORK(8)=0) IS IWORK(8)=1.
+C              THE CHOICE IWORK(8).EQ.1 SEEMS TO PRODUCE SAFER RESULTS;
+C              FOR SIMPLE PROBLEMS, THE CHOICE IWORK(8).EQ.2 PRODUCES
+C              OFTEN SLIGHTLY FASTER RUNS
+C
+C       IF THE DIFFERENTIAL SYSTEM HAS THE SPECIAL STRUCTURE THAT
+C            Y(I)' = Y(I+M2)   FOR  I=1,...,M1,
+C       WITH M1 A MULTIPLE OF M2, A SUBSTANTIAL GAIN IN COMPUTERTIME
+C       CAN BE ACHIEVED BY SETTING THE FOLLOWING TWO PARAMETERS. E.G.,
+C       FOR SECOND ORDER SYSTEMS P'=V, V'=G(P,V), WHERE P AND V ARE
+C       VECTORS OF DIMENSION N/2, ONE HAS TO PUT M1=M2=N/2.
+C       FOR M1>0 SOME OF THE INPUT PARAMETERS HAVE DIFFERENT MEANINGS:
+C       - JAC: ONLY THE ELEMENTS OF THE NON-TRIVIAL PART OF THE
+C              JACOBIAN HAVE TO BE STORED
+C              IF (MLJAC.EQ.N-M1) THE JACOBIAN IS SUPPOSED TO BE FULL
+C                 DFY(I,J) = PARTIAL F(I+M1) / PARTIAL Y(J)
+C                FOR I=1,N-M1 AND J=1,N.
+C              ELSE, THE JACOBIAN IS BANDED ( M1 = M2 * MM )
+C                 DFY(I-J+MUJAC+1,J+K*M2) = PARTIAL F(I+M1) / PARTIAL Y(J+K*M2)
+C                FOR I=1,MLJAC+MUJAC+1 AND J=1,M2 AND K=0,MM.
+C       - MLJAC: MLJAC=N-M1: IF THE NON-TRIVIAL PART OF THE JACOBIAN IS FULL
+C                0<=MLJAC<N-M1: IF THE (MM+1) SUBMATRICES (FOR K=0,MM)
+C                     PARTIAL F(I+M1) / PARTIAL Y(J+K*M2),  I,J=1,M2
+C                    ARE BANDED, MLJAC IS THE MAXIMAL LOWER BANDWIDTH
+C                    OF THESE MM+1 SUBMATRICES
+C       - MUJAC: MAXIMAL UPPER BANDWIDTH OF THESE MM+1 SUBMATRICES
+C                NEED NOT BE DEFINED IF MLJAC=N-M1
+C       - MAS: IF IMAS=0 THIS MATRIX IS ASSUMED TO BE THE IDENTITY AND
+C              NEED NOT BE DEFINED. SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C              IT IS ASSUMED THAT ONLY THE ELEMENTS OF RIGHT LOWER BLOCK OF
+C              DIMENSION N-M1 DIFFER FROM THAT OF THE IDENTITY MATRIX.
+C              IF (MLMAS.EQ.N-M1) THIS SUBMATRIX IS SUPPOSED TO BE FULL
+C                 AM(I,J) = M(I+M1,J+M1)     FOR I=1,N-M1 AND J=1,N-M1.
+C              ELSE, THE MASS MATRIX IS BANDED
+C                 AM(I-J+MUMAS+1,J) = M(I+M1,J+M1)
+C       - MLMAS: MLMAS=N-M1: IF THE NON-TRIVIAL PART OF M IS FULL
+C                0<=MLMAS<N-M1: LOWER BANDWIDTH OF THE MASS MATRIX
+C       - MUMAS: UPPER BANDWIDTH OF THE MASS MATRIX
+C                NEED NOT BE DEFINED IF MLMAS=N-M1
+C
+C    IWORK(9)  THE VALUE OF M1.  DEFAULT M1=0.
+C
+C    IWORK(10) THE VALUE OF M2.  DEFAULT M2=M1.
+C
+C ----------
+C
+C    WORK(1)   UROUND, THE ROUNDING UNIT, DEFAULT 1.D-16.
+C
+C    WORK(2)   THE SAFETY FACTOR IN STEP SIZE PREDICTION,
+C              DEFAULT 0.9D0.
+C
+C    WORK(3)   DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+C              INCREASE WORK(3), TO 0.1 SAY, WHEN JACOBIAN EVALUATIONS
+C              ARE COSTLY. FOR SMALL SYSTEMS WORK(3) SHOULD BE SMALLER
+C              (0.001D0, SAY). NEGATIV WORK(3) FORCES THE CODE TO
+C              COMPUTE THE JACOBIAN AFTER EVERY ACCEPTED STEP.
+C              DEFAULT 0.001D0.
+C
+C    WORK(4)   STOPPING CRITERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+C              SMALLER VALUES OF WORK(4) MAKE THE CODE SLOWER, BUT SAFER.
+C              DEFAULT 0.03D0.
+C
+C    WORK(5) AND WORK(6) : IF WORK(5) < HNEW/HOLD < WORK(6), THEN THE
+C              STEP SIZE IS NOT CHANGED. THIS SAVES, TOGETHER WITH A
+C              LARGE WORK(3), LU-DECOMPOSITIONS AND COMPUTING TIME FOR
+C              LARGE SYSTEMS. FOR SMALL SYSTEMS ONE MAY HAVE
+C              WORK(5)=1.D0, WORK(6)=1.2D0, FOR LARGE FULL SYSTEMS
+C              WORK(5)=0.99D0, WORK(6)=2.D0 MIGHT BE GOOD.
+C              DEFAULTS WORK(5)=1.D0, WORK(6)=1.2D0 .
+C
+C    WORK(7)   MAXIMAL STEP SIZE, DEFAULT XEND-X.
+C
+C    WORK(8), WORK(9)   PARAMETERS FOR STEP SIZE SELECTION
+C              THE NEW STEP SIZE IS CHOSEN SUBJECT TO THE RESTRICTION
+C                 WORK(8) <= HNEW/HOLD <= WORK(9)
+C              DEFAULT VALUES: WORK(8)=0.2D0, WORK(9)=8.D0
+C
+C-----------------------------------------------------------------------
+C
+C     OUTPUT PARAMETERS
+C     -----------------
+C     X           X-VALUE FOR WHICH THE SOLUTION HAS BEEN COMPUTED
+C                 (AFTER SUCCESSFUL RETURN X=XEND).
+C
+C     Y(N)        NUMERICAL SOLUTION AT X
+C
+C     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+C
+C     IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+C                   IDID= 1  COMPUTATION SUCCESSFUL,
+C                   IDID= 2  COMPUT. SUCCESSFUL (INTERRUPTED BY SOLOUT)
+C                   IDID=-1  INPUT IS NOT CONSISTENT,
+C                   IDID=-2  LARGER NMAX IS NEEDED,
+C                   IDID=-3  STEP SIZE BECOMES TOO SMALL,
+C                   IDID=-4  MATRIX IS REPEATEDLY SINGULAR.
+C
+C   IWORK(14)  NFCN    NUMBER OF FUNCTION EVALUATIONS (THOSE FOR NUMERICAL
+C                      EVALUATION OF THE JACOBIAN ARE NOT COUNTED)
+C   IWORK(15)  NJAC    NUMBER OF JACOBIAN EVALUATIONS (EITHER ANALYTICALLY
+C                      OR NUMERICALLY)
+C   IWORK(16)  NSTEP   NUMBER OF COMPUTED STEPS
+C   IWORK(17)  NACCPT  NUMBER OF ACCEPTED STEPS
+C   IWORK(18)  NREJCT  NUMBER OF REJECTED STEPS (DUE TO ERROR TEST),
+C                      (STEP REJECTIONS IN THE FIRST STEP ARE NOT COUNTED)
+C   IWORK(19)  NDEC    NUMBER OF LU-DECOMPOSITIONS OF BOTH MATRICES
+C   IWORK(20)  NSOL    NUMBER OF FORWARD-BACKWARD SUBSTITUTIONS, OF BOTH
+C                      SYSTEMS; THE NSTEP FORWARD-BACKWARD SUBSTITUTIONS,
+C                      NEEDED FOR STEP SIZE SELECTION, ARE NOT COUNTED
+C-----------------------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(*),RelTol(*),WORK(LWORK),IWORK(LIWORK)
+      DIMENSION RPAR(*),IPAR(*)
+      LOGICAL IMPLCT,JBAND,ARRET,STARTN,PRED
+      EXTERNAL FCN,JAC,MAS,SOLOUT
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS
+C *** *** *** *** *** *** ***
+       NFCN=0
+       NJAC=0
+       NSTEP=0
+       NACCPT=0
+       NREJCT=0
+       NDEC=0
+       NSOL=0
+       ARRET=.FALSE.
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF (IWORK(2).EQ.0) THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF (NMAX.LE.0) THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NIT    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF (IWORK(3).EQ.0) THEN
+         NIT=7
+      ELSE
+         NIT=IWORK(3)
+         IF (NIT.LE.0) THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- STARTN  SWITCH FOR STARTING VALUES OF NEWTON ITERATIONS
+      IF(IWORK(4).EQ.0)THEN
+         STARTN=.FALSE.
+      ELSE
+         STARTN=.TRUE.
+      END IF
+C -------- PARAMETER FOR DIFFERENTIAL-ALGEBRAIC COMPONENTS
+      NIND1=IWORK(5)
+      NIND2=IWORK(6)
+      NIND3=IWORK(7)
+      IF (NIND1.EQ.0) NIND1=N
+      IF (NIND1+NIND2+NIND3.NE.N) THEN
+       WRITE(6,*)' CURIOUS INPUT FOR IWORK(5,6,7)=',NIND1,NIND2,NIND3
+       ARRET=.TRUE.
+      END IF
+C -------- PRED   STEP SIZE CONTROL
+      IF(IWORK(8).LE.1)THEN
+         PRED=.TRUE.
+      ELSE
+         PRED=.FALSE.
+      END IF
+C -------- PARAMETER FOR SECOND ORDER EQUATIONS
+      M1=IWORK(9)
+      M2=IWORK(10)
+      NM1=N-M1
+      IF (M1.EQ.0) M2=N
+      IF (M2.EQ.0) M2=M1
+      IF (M1.LT.0.OR.M2.LT.0.OR.M1+M2.GT.N) THEN
+       WRITE(6,*)' CURIOUS INPUT FOR IWORK(9,10)=',M1,M2
+       ARRET=.TRUE.
+      END IF
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.0D0+UROUND>1.0D0
+      IF (WORK(1).EQ.0.0D0) THEN
+         UROUND=1.0D-16
+      ELSE
+         UROUND=WORK(1)
+         IF (UROUND.LE.1.0D-19.OR.UROUND.GE.1.0D0) THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 20 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      IF (WORK(2).EQ.0.0D0) THEN
+         SAFE=0.9D0
+      ELSE
+         SAFE=WORK(2)
+         IF (SAFE.LE.0.001D0.OR.SAFE.GE.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(2)=',WORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF (WORK(3).EQ.0.D0) THEN
+         THET=0.001D0
+      ELSE
+         THET=WORK(3)
+         IF (THET.LE.0.0D0.OR.THET.GE.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(3)=',WORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --- FNEWT   STOPPING CRIERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+      IF (WORK(4).EQ.0.D0) THEN
+         FNEWT=0.03D0
+      ELSE
+         FNEWT=WORK(4)
+         IF (FNEWT.LE.UROUND) THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(4)=',WORK(4)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --- QUOT1 AND QUOT2: IF QUOT1 < HNEW/HOLD < QUOT2, STEP SIZE = CONST.
+      IF (WORK(5).EQ.0.D0) THEN
+         QUOT1=1.D0
+      ELSE
+         QUOT1=WORK(5)
+      END IF
+      IF (WORK(6).EQ.0.D0) THEN
+         QUOT2=1.2D0
+      ELSE
+         QUOT2=WORK(6)
+      END IF
+      IF (QUOT1.GT.1.0D0.OR.QUOT2.LT.1.0D0) THEN
+         WRITE(6,*)' CURIOUS INPUT FOR WORK(5,6)=',QUOT1,QUOT2
+         ARRET=.TRUE.
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF (WORK(7).EQ.0.D0) THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(7)
+      END IF
+C -------  FACL,FACR     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(8).EQ.0.D0)THEN
+         FACL=5.D0
+      ELSE
+         FACL=1.D0/WORK(8)
+      END IF
+      IF(WORK(9).EQ.0.D0)THEN
+         FACR=1.D0/8.0D0
+      ELSE
+         FACR=1.D0/WORK(9)
+      END IF
+      IF (FACL.LT.1.0D0.OR.FACR.GT.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT WORK(8,9)=',WORK(8),WORK(9)
+            ARRET=.TRUE.
+         END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+          END DO
+      END IF
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- IMPLICIT, BANDED OR NOT ?
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.LT.NM1
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN  AND  MATRICES E1, E2
+      IF (JBAND) THEN
+         LDJAC=MLJAC+MUJAC+1
+         LDE1=MLJAC+LDJAC
+      ELSE
+         MLJAC=NM1
+         MUJAC=NM1
+         LDJAC=NM1
+         LDE1=NM1
+      END IF
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          IF (MLMAS.NE.NM1) THEN
+              LDMAS=MLMAS+MUMAS+1
+              IF (JBAND) THEN
+                 IJOB=4
+              ELSE
+                 IJOB=3
+              END IF
+          ELSE
+              LDMAS=NM1
+              IJOB=5
+          END IF
+C ------ BANDWITH OF "MAS" NOT SMALLER THAN BANDWITH OF "JAC"
+          IF (MLMAS.GT.MLJAC.OR.MUMAS.GT.MUJAC) THEN
+             WRITE (6,*) 'BANDWITH OF "MAS" NOT SMALLER THAN BANDWITH OF
+     & "JAC"'
+            ARRET=.TRUE.
+          END IF
+      ELSE
+          LDMAS=0
+          IF (JBAND) THEN
+             IJOB=2
+          ELSE
+             IJOB=1
+             IF (N.GT.2.AND.IWORK(1).NE.0) IJOB=7
+          END IF
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------ HESSENBERG OPTION ONLY FOR EXPLICIT EQU. WITH FULL JACOBIAN
+      IF ((IMPLCT.OR.JBAND).AND.IJOB.EQ.7) THEN
+         WRITE(6,*)' HESSENBERG OPTION ONLY FOR EXPLICIT EQUATIONS WITH
+     &FULL JACOBIAN'
+         ARRET=.TRUE.
+      END IF
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEZ1=21
+      IEZ2=IEZ1+N
+      IEZ3=IEZ2+N
+      IEY0=IEZ3+N
+      IESCAL=IEY0+N
+      IEF1=IESCAL+N
+      IEF2=IEF1+N
+      IEF3=IEF2+N
+      IECON=IEF3+N
+      IEJAC=IECON+4*N
+      IEMAS=IEJAC+N*LDJAC
+      IEE1=IEMAS+NM1*LDMAS
+      IEE2R=IEE1+NM1*LDE1
+      IEE2I=IEE2R+NM1*LDE1
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE2I+NM1*LDE1-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP1=21
+      IEIP2=IEIP1+NM1
+      IEIPH=IEIP2+NM1
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEIPH+NM1-1
+      IF (ISTORE.GT.LIWORK) THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL RADCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,IJOB,STARTN,
+     &   NIND1,NIND2,NIND3,PRED,FACL,FACR,M1,M2,NM1,
+     &   IMPLCT,JBAND,LDJAC,LDE1,LDMAS2,WORK(IEZ1),WORK(IEZ2),
+     &   WORK(IEZ3),WORK(IEY0),WORK(IESCAL),WORK(IEF1),WORK(IEF2),
+     &   WORK(IEF3),WORK(IEJAC),WORK(IEE1),WORK(IEE2R),WORK(IEE2I),
+     &   WORK(IEMAS),IWORK(IEIP1),IWORK(IEIP2),IWORK(IEIPH),
+     &   WORK(IECON),NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL,RPAR,IPAR)
+      IWORK(14)=NFCN
+      IWORK(15)=NJAC
+      IWORK(16)=NSTEP
+      IWORK(17)=NACCPT
+      IWORK(18)=NREJCT
+      IWORK(19)=NDEC
+      IWORK(20)=NSOL
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C     END OF SUBROUTINE RADAU5
+C
+C ***********************************************************
+C
+      SUBROUTINE RADCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,IJOB,STARTN,
+     &   NIND1,NIND2,NIND3,PRED,FACL,FACR,M1,M2,NM1,
+     &   IMPLCT,BANDED,LDJAC,LDE1,LDMAS,Z1,Z2,Z3,
+     &   Y0,SCAL,F1,F2,F3,FJAC,E1,E2R,E2I,FMAS,IP1,IP2,IPHES,
+     &   CONT,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL,RPAR,IPAR)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR RADAU5
+C     PARAMETERS SAME AS IN RADAU5 WITH WORKSPACE ADDED
+C ----------------------------------------------------------
+C         DECLARATIONS
+C ----------------------------------------------------------
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),Z1(N),Z2(N),Z3(N),Y0(N),SCAL(N),F1(N),F2(N),F3(N)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),CONT(4*N)
+      DIMENSION E1(LDE1,NM1),E2R(LDE1,NM1),E2I(LDE1,NM1)
+      DIMENSION AbsTol(*),RelTol(*),RPAR(*),IPAR(*)
+      INTEGER IP1(NM1),IP2(NM1),IPHES(NM1)
+      COMMON /CONRA5/NN,NN2,NN3,NN4,XSOL,HSOL,C2M1,C1M1
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      LOGICAL REJECT,FIRST,IMPLCT,BANDED,CALJAC,STARTN,CALHES
+      LOGICAL INDEX1,INDEX2,INDEX3,LAST,PRED
+      EXTERNAL FCN, JAC, MAS, SOLOUT
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+C --------- DUPLIFY N FOR COMMON BLOCK CONT -----
+      NN=N
+      NN2=2*N
+      NN3=3*N
+      LRC=4*N
+C -------- CHECK THE INDEX OF THE PROBLEM -----
+      INDEX1=NIND1.NE.0
+      INDEX2=NIND2.NE.0
+      INDEX3=NIND3.NE.0
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF (IMPLCT) CALL MAS(NM1,FMAS,LDMAS,RPAR,IPAR)
+C ---------- CONSTANTS ---------
+      SQ6=DSQRT(6.D0)
+      C1=(4.D0-SQ6)/10.D0
+      C2=(4.D0+SQ6)/10.D0
+      C1M1=C1-1.D0
+      C2M1=C2-1.D0
+      C1MC2=C1-C2
+      DD1=-(13.D0+7.D0*SQ6)/3.D0
+      DD2=(-13.D0+7.D0*SQ6)/3.D0
+      DD3=-1.D0/3.D0
+      U1=(6.D0+81.D0**(1.D0/3.D0)-9.D0**(1.D0/3.D0))/30.D0
+      ALPH=(12.D0-81.D0**(1.D0/3.D0)+9.D0**(1.D0/3.D0))/60.D0
+      BETA=(81.D0**(1.D0/3.D0)+9.D0**(1.D0/3.D0))*DSQRT(3.D0)/60.D0
+      CNO=ALPH**2+BETA**2
+      U1=1.0D0/U1
+      ALPH=ALPH/CNO
+      BETA=BETA/CNO
+      T11=9.1232394870892942792D-02
+      T12=-0.14125529502095420843D0
+      T13=-3.0029194105147424492D-02
+      T21=0.24171793270710701896D0
+      T22=0.20412935229379993199D0
+      T23=0.38294211275726193779D0
+      T31=0.96604818261509293619D0
+      TI11=4.3255798900631553510D0
+      TI12=0.33919925181580986954D0
+      TI13=0.54177053993587487119D0
+      TI21=-4.1787185915519047273D0
+      TI22=-0.32768282076106238708D0
+      TI23=0.47662355450055045196D0
+      TI31=-0.50287263494578687595D0
+      TI32=2.5719269498556054292D0
+      TI33=-0.59603920482822492497D0
+      IF (M1.GT.0) IJOB=IJOB+10
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAXN=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAXN)
+      H=SIGN(H,POSNEG)
+      HOLD=H
+      REJECT=.FALSE.
+      FIRST=.TRUE.
+      LAST=.FALSE.
+      IF ((X+H*1.0001D0-XEND)*POSNEG.GE.0.D0) THEN
+         H=XEND-X
+         LAST=.TRUE.
+      END IF
+      FACCON=1.D0
+      CFAC=SAFE*(1+2*NIT)
+      NSING=0
+      XOLD=X
+      IF (IOUT.NE.0) THEN
+          IRTRN=1
+          NRSOL=1
+          XOSOL=XOLD
+          XSOL=X
+          DO I=1,N
+             CONT(I)=Y(I)
+          END DO
+          NSOLU=N
+          HSOL=HOLD
+          CALL SOLOUT(NRSOL,XOSOL,XSOL,Y,CONT,LRC,NSOLU,
+     &                RPAR,IPAR,IRTRN)
+          IF (IRTRN.LT.0) GOTO 179
+      END IF
+      MLE=MLJAC
+      MUE=MUJAC
+      MBJAC=MLJAC+MUJAC+1
+      MBB=MLMAS+MUMAS+1
+      MDIAG=MLE+MUE+1
+      MDIFF=MLE+MUE-MUMAS
+      MBDIAG=MUMAS+1
+      N2=2*N
+      N3=3*N
+      IF (ITOL.EQ.0) THEN
+          DO I=1,N
+             SCAL(I)=AbsTol(1)+RelTol(1)*ABS(Y(I))
+          END DO
+      ELSE
+          DO I=1,N
+             SCAL(I)=AbsTol(I)+RelTol(I)*ABS(Y(I))
+          END DO
+      END IF
+      HHFAC=H
+      CALL FCN(N,X,Y,Y0,RPAR,IPAR)
+      NFCN=NFCN+1
+C --- BASIC INTEGRATION STEP
+  10  CONTINUE
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      IF (IJAC.EQ.0) THEN
+C --- COMPUTE JACOBIAN MATRIX NUMERICALLY
+         IF (BANDED) THEN
+C --- JACOBIAN IS BANDED
+            MUJACP=MUJAC+1
+            MD=MIN(MBJAC,M2)
+            DO MM=1,M1/M2+1
+               DO K=1,MD
+                  J=K+(MM-1)*M2
+ 12               F1(J)=Y(J)
+                  F2(J)=DSQRT(UROUND*MAX(1.D-5,ABS(Y(J))))
+                  Y(J)=Y(J)+F2(J)
+                  J=J+MD
+                  IF (J.LE.MM*M2) GOTO 12
+                  CALL FCN(N,X,Y,CONT,RPAR,IPAR)
+                  J=K+(MM-1)*M2
+                  J1=K
+                  LBEG=MAX(1,J1-MUJAC)+M1
+ 14               LEND=MIN(M2,J1+MLJAC)+M1
+                  Y(J)=F1(J)
+                  MUJACJ=MUJACP-J1-M1
+                  DO L=LBEG,LEND
+                     FJAC(L+MUJACJ,J)=(CONT(L)-Y0(L))/F2(J)
+                  END DO
+                  J=J+MD
+                  J1=J1+MD
+                  LBEG=LEND+1
+                  IF (J.LE.MM*M2) GOTO 14
+               END DO
+            END DO
+         ELSE
+C --- JACOBIAN IS FULL
+            DO I=1,N
+               YSAFE=Y(I)
+               DELT=DSQRT(UROUND*MAX(1.D-5,ABS(YSAFE)))
+               Y(I)=YSAFE+DELT
+               CALL FCN(N,X,Y,CONT,RPAR,IPAR)
+               DO J=M1+1,N
+                 FJAC(J-M1,I)=(CONT(J)-Y0(J))/DELT
+               END DO
+               Y(I)=YSAFE
+            END DO
+         END IF
+      ELSE
+C --- COMPUTE JACOBIAN MATRIX ANALYTICALLY
+      CALL JAC_CHEM(N,X,Y,FJAC,LDJAC,RPAR,IPAR)
+      END IF
+      CALJAC=.TRUE.
+      CALHES=.TRUE.
+  20  CONTINUE
+C --- COMPUTE THE MATRICES E1 AND E2 AND THEIR DECOMPOSITIONS
+      FAC1=U1/H
+      ALPHN=ALPH/H
+      BETAN=BETA/H
+      CALL DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC1,E1,LDE1,IP1,IER,IJOB,CALHES,IPHES)
+      IF (IER.NE.0) GOTO 78
+      CALL DECOMC(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,ALPHN,BETAN,E2R,E2I,LDE1,IP2,IER,IJOB)
+      IF (IER.NE.0) GOTO 78
+      NDEC=NDEC+1
+  30  CONTINUE
+      NSTEP=NSTEP+1
+      IF (NSTEP.GT.NMAX) GOTO 178
+      IF (0.1D0*ABS(H).LE.ABS(X)*UROUND) GOTO 177
+          IF (INDEX2) THEN
+             DO I=NIND1+1,NIND1+NIND2
+                SCAL(I)=SCAL(I)/HHFAC
+             END DO
+          END IF
+          IF (INDEX3) THEN
+             DO I=NIND1+NIND2+1,NIND1+NIND2+NIND3
+                SCAL(I)=SCAL(I)/(HHFAC*HHFAC)
+             END DO
+          END IF
+      XPH=X+H
+C *** *** *** *** *** *** ***
+C  STARTING VALUES FOR NEWTON ITERATION
+C *** *** *** *** *** *** ***
+      IF (FIRST.OR.STARTN) THEN
+         DO I=1,N
+            Z1(I)=0.D0
+            Z2(I)=0.D0
+            Z3(I)=0.D0
+            F1(I)=0.D0
+            F2(I)=0.D0
+            F3(I)=0.D0
+         END DO
+      ELSE
+         C3Q=H/HOLD
+         C1Q=C1*C3Q
+         C2Q=C2*C3Q
+         DO I=1,N
+            AK1=CONT(I+N)
+            AK2=CONT(I+N2)
+            AK3=CONT(I+N3)
+            Z1I=C1Q*(AK1+(C1Q-C2M1)*(AK2+(C1Q-C1M1)*AK3))
+            Z2I=C2Q*(AK1+(C2Q-C2M1)*(AK2+(C2Q-C1M1)*AK3))
+            Z3I=C3Q*(AK1+(C3Q-C2M1)*(AK2+(C3Q-C1M1)*AK3))
+            Z1(I)=Z1I
+            Z2(I)=Z2I
+            Z3(I)=Z3I
+            F1(I)=TI11*Z1I+TI12*Z2I+TI13*Z3I
+            F2(I)=TI21*Z1I+TI22*Z2I+TI23*Z3I
+            F3(I)=TI31*Z1I+TI32*Z2I+TI33*Z3I
+         END DO
+      END IF
+C *** *** *** *** *** *** ***
+C  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+C *** *** *** *** *** *** ***
+            NEWT=0
+            FACCON=MAX(FACCON,UROUND)**0.8D0
+            THETA=ABS(THET)
+  40        CONTINUE
+            IF (NEWT.GE.NIT) GOTO 78
+C ---     COMPUTE THE RIGHT-HAND SIDE
+            DO I=1,N
+               CONT(I)=Y(I)+Z1(I)
+            END DO
+            CALL FCN(N,X+C1*H,CONT,Z1,RPAR,IPAR)
+            DO I=1,N
+               CONT(I)=Y(I)+Z2(I)
+            END DO
+            CALL FCN(N,X+C2*H,CONT,Z2,RPAR,IPAR)
+            DO I=1,N
+               CONT(I)=Y(I)+Z3(I)
+            END DO
+            CALL FCN(N,XPH,CONT,Z3,RPAR,IPAR)
+            NFCN=NFCN+3
+C ---     KppSolve THE LINEAR SYSTEMS
+           DO I=1,N
+              A1=Z1(I)
+              A2=Z2(I)
+              A3=Z3(I)
+              Z1(I)=TI11*A1+TI12*A2+TI13*A3
+              Z2(I)=TI21*A1+TI22*A2+TI23*A3
+              Z3(I)=TI31*A1+TI32*A2+TI33*A3
+           END DO
+        CALL SLVRAD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,ALPHN,BETAN,E1,E2R,E2I,LDE1,Z1,Z2,Z3,
+     &          F1,F2,F3,CONT,IP1,IP2,IPHES,IER,IJOB)
+            NSOL=NSOL+1
+            NEWT=NEWT+1
+            DYNO=0.D0
+            DO I=1,N
+               DENOM=SCAL(I)
+               DYNO=DYNO+(Z1(I)/DENOM)**2+(Z2(I)/DENOM)**2
+     &          +(Z3(I)/DENOM)**2
+            END DO
+            DYNO=DSQRT(DYNO/N3)
+C ---     BAD CONVERGENCE OR NUMBER OF ITERATIONS TO LARGE
+            IF (NEWT.GT.1.AND.NEWT.LT.NIT) THEN
+                THQ=DYNO/DYNOLD
+                IF (NEWT.EQ.2) THEN
+                   THETA=THQ
+                ELSE
+                   THETA=SQRT(THQ*THQOLD)
+                END IF
+                THQOLD=THQ
+                IF (THETA.LT.0.99D0) THEN
+                    FACCON=THETA/(1.0D0-THETA)
+                    DYTH=FACCON*DYNO*THETA**(NIT-1-NEWT)/FNEWT
+                    IF (DYTH.GE.1.0D0) THEN
+                         QNEWT=DMAX1(1.0D-4,DMIN1(20.0D0,DYTH))
+                         HHFAC=.8D0*QNEWT**(-1.0D0/(4.0D0+NIT-1-NEWT))
+                         H=HHFAC*H
+                         REJECT=.TRUE.
+                         LAST=.FALSE.
+                         IF (CALJAC) GOTO 20
+                         GOTO 10
+                    END IF
+                ELSE
+                    GOTO 78
+                END IF
+            END IF
+            DYNOLD=MAX(DYNO,UROUND)
+            DO I=1,N
+               F1I=F1(I)+Z1(I)
+               F2I=F2(I)+Z2(I)
+               F3I=F3(I)+Z3(I)
+               F1(I)=F1I
+               F2(I)=F2I
+               F3(I)=F3I
+               Z1(I)=T11*F1I+T12*F2I+T13*F3I
+               Z2(I)=T21*F1I+T22*F2I+T23*F3I
+               Z3(I)=T31*F1I+    F2I
+            END DO
+            IF (FACCON*DYNO.GT.FNEWT) GOTO 40
+C --- ERROR ESTIMATION
+      CALL ESTRAD (N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          H,DD1,DD2,DD3,FCN,NFCN,Y0,Y,IJOB,X,M1,M2,NM1,
+     &          E1,LDE1,Z1,Z2,Z3,CONT,F1,F2,IP1,IPHES,SCAL,ERR,
+     &          FIRST,REJECT,FAC1,RPAR,IPAR)
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .2<=HNEW/H<=8.
+      FAC=MIN(SAFE,CFAC/(NEWT+2*NIT))
+      QUOT=MAX(FACR,MIN(FACL,ERR**.25D0/FAC))
+      HNEW=H/QUOT
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LT.1.D0) THEN
+C --- STEP IS ACCEPTED
+         FIRST=.FALSE.
+         NACCPT=NACCPT+1
+         IF (PRED) THEN
+C       --- PREDICTIVE CONTROLLER OF GUSTAFSSON
+            IF (NACCPT.GT.1) THEN
+               FACGUS=(HACC/H)*(ERR**2/ERRACC)**0.25D0/SAFE
+               FACGUS=MAX(FACR,MIN(FACL,FACGUS))
+               QUOT=MAX(QUOT,FACGUS)
+               HNEW=H/QUOT
+            END IF
+            HACC=H
+            ERRACC=MAX(1.0D-2,ERR)
+         END IF
+         XOLD=X
+         HOLD=H
+         X=XPH
+         DO I=1,N
+            Y(I)=Y(I)+Z3(I)
+            Z2I=Z2(I)
+            Z1I=Z1(I)
+            CONT(I+N)=(Z2I-Z3(I))/C2M1
+            AK=(Z1I-Z2I)/C1MC2
+            ACONT3=Z1I/C1
+            ACONT3=(AK-ACONT3)/C2
+            CONT(I+N2)=(AK-CONT(I+N))/C1M1
+            CONT(I+N3)=CONT(I+N2)-ACONT3
+         END DO
+         IF (ITOL.EQ.0) THEN
+             DO I=1,N
+                SCAL(I)=AbsTol(1)+RelTol(1)*ABS(Y(I))
+             END DO
+         ELSE
+             DO I=1,N
+                SCAL(I)=AbsTol(I)+RelTol(I)*ABS(Y(I))
+             END DO
+         END IF
+         IF (IOUT.NE.0) THEN
+             NRSOL=NACCPT+1
+             XSOL=X
+             XOSOL=XOLD
+             DO I=1,N
+                CONT(I)=Y(I)
+             END DO
+             NSOLU=N
+             HSOL=HOLD
+             CALL SOLOUT(NRSOL,XOSOL,XSOL,Y,CONT,LRC,NSOLU,
+     &                   RPAR,IPAR,IRTRN)
+             IF (IRTRN.LT.0) GOTO 179
+         END IF
+         CALJAC=.FALSE.
+         IF (LAST) THEN
+            H=HOPT
+            IDID=1
+            RETURN
+         END IF
+         CALL FCN(N,X,Y,Y0,RPAR,IPAR)
+         NFCN=NFCN+1
+         HNEW=POSNEG*MIN(ABS(HNEW),HMAXN)
+         HOPT=HNEW
+         HOPT=MIN(H,HNEW)
+         IF (REJECT) HNEW=POSNEG*MIN(ABS(HNEW),ABS(H))
+         REJECT=.FALSE.
+         IF ((X+HNEW/QUOT1-XEND)*POSNEG.GE.0.D0) THEN
+            H=XEND-X
+            LAST=.TRUE.
+         ELSE
+            QT=HNEW/H
+            HHFAC=H
+            IF (THETA.LE.THET.AND.QT.GE.QUOT1.AND.QT.LE.QUOT2) GOTO 30
+            H=HNEW
+         END IF
+         HHFAC=H
+         IF (THETA.LE.THET) GOTO 20
+         GOTO 10
+      ELSE
+C --- STEP IS REJECTED
+         REJECT=.TRUE.
+         LAST=.FALSE.
+         IF (FIRST) THEN
+             H=H*0.1D0
+             HHFAC=0.1D0
+         ELSE
+             HHFAC=HNEW/H
+             H=HNEW
+         END IF
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         IF (CALJAC) GOTO 20
+         GOTO 10
+      END IF
+C --- UNEXPECTED STEP-REJECTION
+  78  CONTINUE
+      IF (IER.NE.0) THEN
+          NSING=NSING+1
+          IF (NSING.GE.5) GOTO 176
+      END IF
+      H=H*0.5D0
+      HHFAC=0.5D0
+      REJECT=.TRUE.
+      LAST=.FALSE.
+      IF (CALJAC) GOTO 20
+      GOTO 10
+C --- FAIL EXIT
+ 176  CONTINUE
+      WRITE(6,979)X
+      WRITE(6,*) ' MATRIX IS REPEATEDLY SINGULAR, IER=',IER
+      IDID=-4
+      RETURN
+ 177  CONTINUE
+      WRITE(6,979)X
+      WRITE(6,*) ' STEP SIZE T0O SMALL, H=',H
+      IDID=-3
+      RETURN
+ 178  CONTINUE
+      WRITE(6,979)X
+      WRITE(6,*) ' MORE THAN NMAX =',NMAX,'STEPS ARE NEEDED'
+      IDID=-2
+      RETURN
+C --- EXIT CAUSED BY SOLOUT
+ 179  CONTINUE
+      WRITE(6,979)X
+ 979  FORMAT(' EXIT OF RADAU5 AT X=',E18.4)
+      IDID=2
+      RETURN
+      END
+C
+C     END OF SUBROUTINE RADCOR
+C
+C ***********************************************************
+C
+      KPP_REAL FUNCTION CONTR5(I,X,CONT,LRC)
+C ----------------------------------------------------------
+C     THIS FUNCTION CAN BE USED FOR CONINUOUS OUTPUT. IT PROVIDES AN
+C     APPROXIMATION TO THE I-TH COMPONENT OF THE SOLUTION AT X.
+C     IT GIVES THE VALUE OF THE COLLOCATION POLYNOMIAL, DEFINED FOR
+C     THE LAST SUCCESSFULLY COMPUTED STEP (BY RADAU5).
+C ----------------------------------------------------------
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION CONT(LRC)
+      COMMON /CONRA5/NN,NN2,NN3,NN4,XSOL,HSOL,C2M1,C1M1
+      S=(X-XSOL)/HSOL
+      CONTR5=CONT(I)+S*(CONT(I+NN)+(S-C2M1)*(CONT(I+NN2)
+     &     +(S-C1M1)*CONT(I+NN3)))
+      RETURN
+      END
+C
+C     END OF FUNCTION CONTR5
+C
+C ***********************************************************
+C ******************************************
+C     VERSION OF SEPTEMBER 18, 1995
+C ******************************************
+C
+      SUBROUTINE DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC1,E1,LDE1,IP1,IER,IJOB,CALHES,IPHES)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),
+     &          IP1(NM1),IPHES(N)
+      LOGICAL CALHES
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO  I=1,N
+            E1(I,J)=-FJAC(I,J)
+         END DO
+         E1(J,J)=E1(J,J)+FAC1
+      END DO
+      CALL DEC (N,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E1(I,J)=-FJAC(I,JM1)
+         END DO
+         E1(J,J)=E1(J,J)+FAC1
+      END DO
+ 45   MM=M1/M2
+      DO J=1,M2
+         DO I=1,NM1
+            SUM=0.D0
+            DO K=0,MM-1
+               SUM=(SUM+FJAC(I,J+K*M2))/FAC1
+            END DO
+            E1(I,J)=E1(I,J)-SUM
+         END DO
+      END DO
+      CALL DEC (NM1,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,J)
+         END DO
+         E1(MDIAG,J)=E1(MDIAG,J)+FAC1
+      END DO
+      CALL DECB (N,LDE1,E1,MLE,MUE,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,JM1)
+         END DO
+         E1(MDIAG,J)=E1(MDIAG,J)+FAC1
+      END DO
+  46  MM=M1/M2
+      DO J=1,M2
+         DO I=1,MBJAC
+            SUM=0.D0
+            DO K=0,MM-1
+               SUM=(SUM+FJAC(I,J+K*M2))/FAC1
+            END DO
+            E1(I+MLE,J)=E1(I+MLE,J)-SUM
+         END DO
+      END DO
+      CALL DECB (NM1,LDE1,E1,MLE,MUE,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            E1(I,J)=-FJAC(I,J)
+         END DO
+         DO I=MAX(1,J-MUMAS),MIN(N,J+MLMAS)
+            E1(I,J)=E1(I,J)+FAC1*FMAS(I-J+MBDIAG,J)
+         END DO
+      END DO
+      CALL DEC (N,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E1(I,J)=-FJAC(I,JM1)
+         END DO
+         DO I=MAX(1,J-MUMAS),MIN(NM1,J+MLMAS)
+            E1(I,J)=E1(I,J)+FAC1*FMAS(I-J+MBDIAG,J)
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,J)
+         END DO
+         DO I=1,MBB
+            IB=I+MDIFF
+            E1(IB,J)=E1(IB,J)+FAC1*FMAS(I,J)
+         END DO
+      END DO
+      CALL DECB (N,LDE1,E1,MLE,MUE,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  14  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E1(I+MLE,J)=-FJAC(I,JM1)
+         END DO
+         DO I=1,MBB
+            IB=I+MDIFF
+            E1(IB,J)=E1(IB,J)+FAC1*FMAS(I,J)
+         END DO
+      END DO
+      GOTO 46
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            E1(I,J)=FMAS(I,J)*FAC1-FJAC(I,J)
+         END DO
+      END DO
+      CALL DEC (N,LDE1,E1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E1(I,J)=FMAS(I,J)*FAC1-FJAC(I,JM1)
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      IF (CALHES) CALL Elmhes (LDJAC,N,1,N,FJAC,IPHES)
+      CALHES=.FALSE.
+      DO J=1,N-1
+         J1=J+1
+         E1(J1,J)=-FJAC(J1,J)
+      END DO
+      DO J=1,N
+         DO I=1,J
+            E1(I,J)=-FJAC(I,J)
+         END DO
+         E1(J,J)=E1(J,J)+FAC1
+      END DO
+      CALL DECH(N,LDE1,E1,1,IP1,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE DECOMR
+C
+C ***********************************************************
+C
+      SUBROUTINE DECOMC(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,ALPHN,BETAN,E2R,E2I,LDE1,IP2,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),
+     &          E2R(LDE1,NM1),E2I(LDE1,NM1),IP2(NM1)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            E2R(I,J)=-FJAC(I,J)
+            E2I(I,J)=0.D0
+         END DO
+         E2R(J,J)=E2R(J,J)+ALPHN
+         E2I(J,J)=BETAN
+      END DO
+      CALL DECC (N,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E2R(I,J)=-FJAC(I,JM1)
+            E2I(I,J)=0.D0
+         END DO
+         E2R(J,J)=E2R(J,J)+ALPHN
+         E2I(J,J)=BETAN
+      END DO
+  45  MM=M1/M2
+      ABNO=ALPHN**2+BETAN**2
+      ALP=ALPHN/ABNO
+      BET=BETAN/ABNO
+      DO J=1,M2
+         DO I=1,NM1
+            SUMR=0.D0
+            SUMI=0.D0
+            DO K=0,MM-1
+               SUMS=SUMR+FJAC(I,J+K*M2)
+               SUMR=SUMS*ALP+SUMI*BET
+               SUMI=SUMI*ALP-SUMS*BET
+            END DO
+            E2R(I,J)=E2R(I,J)-SUMR
+            E2I(I,J)=E2I(I,J)-SUMI
+         END DO
+      END DO
+      CALL DECC (NM1,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            IMLE=I+MLE
+            E2R(IMLE,J)=-FJAC(I,J)
+            E2I(IMLE,J)=0.D0
+         END DO
+         E2R(MDIAG,J)=E2R(MDIAG,J)+ALPHN
+         E2I(MDIAG,J)=BETAN
+      END DO
+      CALL DECBC (N,LDE1,E2R,E2I,MLE,MUE,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E2R(I+MLE,J)=-FJAC(I,JM1)
+            E2I(I+MLE,J)=0.D0
+         END DO
+         E2R(MDIAG,J)=E2R(MDIAG,J)+ALPHN
+         E2I(MDIAG,J)=E2I(MDIAG,J)+BETAN
+      END DO
+  46  MM=M1/M2
+      ABNO=ALPHN**2+BETAN**2
+      ALP=ALPHN/ABNO
+      BET=BETAN/ABNO
+      DO J=1,M2
+         DO I=1,MBJAC
+            SUMR=0.D0
+            SUMI=0.D0
+            DO K=0,MM-1
+               SUMS=SUMR+FJAC(I,J+K*M2)
+               SUMR=SUMS*ALP+SUMI*BET
+               SUMI=SUMI*ALP-SUMS*BET
+            END DO
+            IMLE=I+MLE
+            E2R(IMLE,J)=E2R(IMLE,J)-SUMR
+            E2I(IMLE,J)=E2I(IMLE,J)-SUMI
+         END DO
+      END DO
+      CALL DECBC (NM1,LDE1,E2R,E2I,MLE,MUE,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO  J=1,N
+         DO  I=1,N
+            E2R(I,J)=-FJAC(I,J)
+            E2I(I,J)=0.D0
+         END DO
+      END DO
+      DO J=1,N
+         DO I=MAX(1,J-MUMAS),MIN(N,J+MLMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            E2R(I,J)=E2R(I,J)+ALPHN*BB
+            E2I(I,J)=BETAN*BB
+         END DO
+      END DO
+      CALL DECC(N,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E2R(I,J)=-FJAC(I,JM1)
+            E2I(I,J)=0.D0
+         END DO
+         DO I=MAX(1,J-MUMAS),MIN(NM1,J+MLMAS)
+            FFMA=FMAS(I-J+MBDIAG,J)
+            E2R(I,J)=E2R(I,J)+ALPHN*FFMA
+            E2I(I,J)=E2I(I,J)+BETAN*FFMA
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO J=1,N
+         DO I=1,MBJAC
+            IMLE=I+MLE
+            E2R(IMLE,J)=-FJAC(I,J)
+            E2I(IMLE,J)=0.D0
+         END DO
+         DO I=MAX(1,MUMAS+2-J),MIN(MBB,MUMAS+1-J+N)
+            IB=I+MDIFF
+            BB=FMAS(I,J)
+            E2R(IB,J)=E2R(IB,J)+ALPHN*BB
+            E2I(IB,J)=BETAN*BB
+         END DO
+      END DO
+      CALL DECBC (N,LDE1,E2R,E2I,MLE,MUE,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  14  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,MBJAC
+            E2R(I+MLE,J)=-FJAC(I,JM1)
+            E2I(I+MLE,J)=0.D0
+         END DO
+         DO I=1,MBB
+            IB=I+MDIFF
+            FFMA=FMAS(I,J)
+            E2R(IB,J)=E2R(IB,J)+ALPHN*FFMA
+            E2I(IB,J)=E2I(IB,J)+BETAN*FFMA
+         END DO
+      END DO
+      GOTO 46
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO J=1,N
+         DO I=1,N
+            BB=FMAS(I,J)
+            E2R(I,J)=BB*ALPHN-FJAC(I,J)
+            E2I(I,J)=BB*BETAN
+         END DO
+      END DO
+      CALL DECC(N,LDE1,E2R,E2I,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO J=1,NM1
+         JM1=J+M1
+         DO I=1,NM1
+            E2R(I,J)=ALPHN*FMAS(I,J)-FJAC(I,JM1)
+            E2I(I,J)=BETAN*FMAS(I,J)
+         END DO
+      END DO
+      GOTO 45
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO J=1,N-1
+         J1=J+1
+         E2R(J1,J)=-FJAC(J1,J)
+         E2I(J1,J)=0.D0
+      END DO
+      DO J=1,N
+         DO I=1,J
+            E2I(I,J)=0.D0
+            E2R(I,J)=-FJAC(I,J)
+         END DO
+         E2R(J,J)=E2R(J,J)+ALPHN
+         E2I(J,J)=BETAN
+      END DO
+      CALL DECHC(N,LDE1,E2R,E2I,1,IP2,IER)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE DECOMC
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVRAR(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E1,LDE1,Z1,F1,IP1,IPHES,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),
+     &          IP1(NM1),IPHES(N),Z1(N),F1(N)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+ 48   CONTINUE
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               Z1(IM1)=Z1(IM1)+FJAC(I,JKM)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,Z1(M1+1),IP1)
+ 49   CONTINUE
+      DO I=M1,1,-1
+         Z1(I)=(Z1(I)+Z1(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+  45  CONTINUE
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               Z1(IM1)=Z1(IM1)+FJAC(I+MUJAC+1-J,JKM)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,Z1(M1+1),IP1)
+      GOTO 49
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            S1=S1-FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            S1=S1-FMAS(I-J+MBDIAG,J)*F1(J+M1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+      END DO
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S1=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            S1=S1-FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         DO J=1,N
+            S1=S1-FMAS(I,J)*F1(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         DO J=1,NM1
+            S1=S1-FMAS(I,J)*F1(J+M1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+      END DO
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         Z1(I)=Z1(I)-F1(I)*FAC1
+      END DO
+      DO MM=N-2,1,-1
+          MP=N-MM
+          MP1=MP-1
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 746
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+ 746      CONTINUE
+          DO I=MP+1,N
+             Z1(I)=Z1(I)-FJAC(I,MP1)*Z1(MP)
+          END DO
+       END DO
+       CALL SOLH(N,LDE1,E1,1,Z1,IP1)
+       DO MM=1,N-2
+          MP=N-MM
+          MP1=MP-1
+          DO I=MP+1,N
+             Z1(I)=Z1(I)+FJAC(I,MP1)*Z1(MP)
+          END DO
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 750
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+ 750      CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVRAR
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVRAI(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,ALPHN,BETAN,E2R,E2I,LDE1,Z2,Z3,
+     &          F2,F3,CONT,IP2,IPHES,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),
+     &          IP2(NM1),IPHES(N),Z2(N),Z3(N),F2(N),F3(N)
+      DIMENSION E2R(LDE1,NM1),E2I(LDE1,NM1)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLC (N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+ 48   ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=1,NM1
+               IM1=I+M1
+               Z2(IM1)=Z2(IM1)+FJAC(I,JKM)*SUM2
+               Z3(IM1)=Z3(IM1)+FJAC(I,JKM)*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOLC (NM1,LDE1,E2R,E2I,Z2(M1+1),Z3(M1+1),IP2)
+ 49   CONTINUE
+      DO I=M1,1,-1
+         MPI=M2+I
+         Z2I=Z2(I)+Z2(MPI)
+         Z3I=Z3(I)+Z3(MPI)
+         Z3(I)=(Z3I*ALPHN-Z2I*BETAN)/ABNO
+         Z2(I)=(Z2I*ALPHN+Z3I*BETAN)/ABNO
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLBC (N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+  45  ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               IIMU=I+MUJAC+1-J
+               Z2(IM1)=Z2(IM1)+FJAC(IIMU,JKM)*SUM2
+               Z3(IM1)=Z3(IM1)+FJAC(IIMU,JKM)*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOLBC (NM1,LDE1,E2R,E2I,MLE,MUE,Z2(M1+1),Z3(M1+1),IP2)
+      GOTO 49
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            JM1=J+M1
+            BB=FMAS(I-J+MBDIAG,J)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLBC(N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,N
+            BB=FMAS(I,J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,NM1
+            JM1=J+M1
+            BB=FMAS(I,J)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO MM=N-2,1,-1
+          MP=N-MM
+          MP1=MP-1
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 746
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 746      CONTINUE
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z2(I)=Z2(I)-E1IMP*Z2(MP)
+             Z3(I)=Z3(I)-E1IMP*Z3(MP)
+          END DO
+       END DO
+       CALL SOLHC(N,LDE1,E2R,E2I,1,Z2,Z3,IP2)
+       DO MM=1,N-2
+          MP=N-MM
+          MP1=MP-1
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z2(I)=Z2(I)+E1IMP*Z2(MP)
+             Z3(I)=Z3(I)+E1IMP*Z3(MP)
+          END DO
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 750
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 750      CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVRAI
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVRAD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,ALPHN,BETAN,E1,E2R,E2I,LDE1,Z1,Z2,Z3,
+     &          F1,F2,F3,CONT,IP1,IP2,IPHES,IER,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),
+     &          E2R(LDE1,NM1),E2I(LDE1,NM1),IP1(NM1),IP2(NM1),
+     &          IPHES(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N),F3(N)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      CALL SOLC (N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+ 48   ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=1,NM1
+               IM1=I+M1
+               Z1(IM1)=Z1(IM1)+FJAC(I,JKM)*SUM1
+               Z2(IM1)=Z2(IM1)+FJAC(I,JKM)*SUM2
+               Z3(IM1)=Z3(IM1)+FJAC(I,JKM)*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,Z1(M1+1),IP1)
+      CALL SOLC (NM1,LDE1,E2R,E2I,Z2(M1+1),Z3(M1+1),IP2)
+ 49   CONTINUE
+      DO I=M1,1,-1
+         MPI=M2+I
+         Z1(I)=(Z1(I)+Z1(MPI))/FAC1
+         Z2I=Z2(I)+Z2(MPI)
+         Z3I=Z3(I)+Z3(MPI)
+         Z3(I)=(Z3I*ALPHN-Z2I*BETAN)/ABNO
+         Z2(I)=(Z2I*ALPHN+Z3I*BETAN)/ABNO
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      CALL SOLBC (N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+  45  ABNO=ALPHN**2+BETAN**2
+      MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         SUM2=0.D0
+         SUM3=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM1=(Z1(JKM)+SUM1)/FAC1
+            SUMH=(Z2(JKM)+SUM2)/ABNO
+            SUM3=(Z3(JKM)+SUM3)/ABNO
+            SUM2=SUMH*ALPHN+SUM3*BETAN
+            SUM3=SUM3*ALPHN-SUMH*BETAN
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               FFJA=FJAC(I+MUJAC+1-J,JKM)
+               Z1(IM1)=Z1(IM1)+FFJA*SUM1
+               Z2(IM1)=Z2(IM1)+FFJA*SUM2
+               Z3(IM1)=Z3(IM1)+FFJA*SUM3
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,Z1(M1+1),IP1)
+      CALL SOLBC (NM1,LDE1,E2R,E2I,MLE,MUE,Z2(M1+1),Z3(M1+1),IP2)
+      GOTO 49
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S1=S1-BB*F1(J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         J1B=MAX(1,I-MLMAS)
+         J2B=MIN(NM1,I+MUMAS)
+         DO J=J1B,J2B
+            JM1=J+M1
+            BB=FMAS(I-J+MBDIAG,J)
+            S1=S1-BB*F1(JM1)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            BB=FMAS(I-J+MBDIAG,J)
+            S1=S1-BB*F1(J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,Z1,IP1)
+      CALL SOLBC(N,LDE1,E2R,E2I,MLE,MUE,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,N
+            BB=FMAS(I,J)
+            S1=S1-BB*F1(J)
+            S2=S2-BB*F2(J)
+            S3=S3-BB*F3(J)
+         END DO
+         Z1(I)=Z1(I)+S1*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      CALL SOL (N,LDE1,E1,Z1,IP1)
+      CALL SOLC(N,LDE1,E2R,E2I,Z2,Z3,IP2)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO I=1,NM1
+         IM1=I+M1
+         S1=0.0D0
+         S2=0.0D0
+         S3=0.0D0
+         DO J=1,NM1
+            JM1=J+M1
+            BB=FMAS(I,J)
+            S1=S1-BB*F1(JM1)
+            S2=S2-BB*F2(JM1)
+            S3=S3-BB*F3(JM1)
+         END DO
+         Z1(IM1)=Z1(IM1)+S1*FAC1
+         Z2(IM1)=Z2(IM1)+S2*ALPHN-S3*BETAN
+         Z3(IM1)=Z3(IM1)+S3*ALPHN+S2*BETAN
+      END DO
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         S2=-F2(I)
+         S3=-F3(I)
+         Z1(I)=Z1(I)-F1(I)*FAC1
+         Z2(I)=Z2(I)+S2*ALPHN-S3*BETAN
+         Z3(I)=Z3(I)+S3*ALPHN+S2*BETAN
+      END DO
+      DO MM=N-2,1,-1
+          MP=N-MM
+          MP1=MP-1
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 746
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 746      CONTINUE
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z1(I)=Z1(I)-E1IMP*Z1(MP)
+             Z2(I)=Z2(I)-E1IMP*Z2(MP)
+             Z3(I)=Z3(I)-E1IMP*Z3(MP)
+          END DO
+       END DO
+       CALL SOLH(N,LDE1,E1,1,Z1,IP1)
+       CALL SOLHC(N,LDE1,E2R,E2I,1,Z2,Z3,IP2)
+       DO MM=1,N-2
+          MP=N-MM
+          MP1=MP-1
+          DO I=MP+1,N
+             E1IMP=FJAC(I,MP1)
+             Z1(I)=Z1(I)+E1IMP*Z1(MP)
+             Z2(I)=Z2(I)+E1IMP*Z2(MP)
+             Z3(I)=Z3(I)+E1IMP*Z3(MP)
+          END DO
+          I=IPHES(MP)
+          IF (I.EQ.MP) GOTO 750
+          ZSAFE=Z1(MP)
+          Z1(MP)=Z1(I)
+          Z1(I)=ZSAFE
+          ZSAFE=Z2(MP)
+          Z2(MP)=Z2(I)
+          Z2(I)=ZSAFE
+          ZSAFE=Z3(MP)
+          Z3(MP)=Z3(I)
+          Z3(I)=ZSAFE
+ 750      CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVRAD
+C
+C ***********************************************************
+C
+      SUBROUTINE ESTRAD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          H,DD1,DD2,DD3,FCN,NFCN,Y0,Y,IJOB,X,M1,M2,NM1,
+     &          E1,LDE1,Z1,Z2,Z3,CONT,F1,F2,IP1,IPHES,SCAL,ERR,
+     &          FIRST,REJECT,FAC1,RPAR,IPAR)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),IP1(NM1),
+     &     SCAL(N),IPHES(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N),Y0(N),Y(N)
+      DIMENSION CONT(N),RPAR(1),IPAR(1)
+      LOGICAL FIRST,REJECT
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      EXTERNAL FCN
+      HEE1=DD1/H
+      HEE2=DD2/H
+      HEE3=DD3/H
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+   1  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO  I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  11  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+  48  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   2  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  12  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+  45  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   3  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         F2(I)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  13  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J+M1)
+         END DO
+         IM1=I+M1
+         F2(IM1)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   4  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO I=1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J)
+         END DO
+         F2(I)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  14  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO I=1,M1
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*F1(J+M1)
+         END DO
+         IM1=I+M1
+         F2(IM1)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 45
+C
+   5  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=1,N
+            SUM=SUM+FMAS(I,J)*F1(J)
+         END DO
+         F2(I)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  15  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO I=1,M1
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         F1(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=1,NM1
+            SUM=SUM+FMAS(I,J)*F1(J+M1)
+         END DO
+         IM1=I+M1
+         F2(IM1)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   6  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ------  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+   7  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO I=1,N
+         F2(I)=HEE1*Z1(I)+HEE2*Z2(I)+HEE3*Z3(I)
+         CONT(I)=F2(I)+Y0(I)
+      END DO
+      DO MM=N-2,1,-1
+         MP=N-MM
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 310
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 310     CONTINUE
+         DO I=MP+1,N
+            CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+         END DO
+      END DO
+      CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+      DO MM=1,N-2
+         MP=N-MM
+         DO I=MP+1,N
+            CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+         END DO
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 440
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 440     CONTINUE
+      END DO
+C
+C --------------------------------------
+C
+  77  CONTINUE
+      ERR=0.D0
+      DO  I=1,N
+         ERR=ERR+(CONT(I)/SCAL(I))**2
+      END DO
+      ERR=MAX(SQRT(ERR/N),1.D-10)
+C
+      IF (ERR.LT.1.D0) RETURN
+      IF (FIRST.OR.REJECT) THEN
+          DO I=1,N
+             CONT(I)=Y(I)+CONT(I)
+          END DO
+          CALL FCN(N,X,CONT,F1,RPAR,IPAR)
+          NFCN=NFCN+1
+          DO I=1,N
+             CONT(I)=F1(I)+F2(I)
+          END DO
+          GOTO (31,32,31,32,31,32,33,55,55,55,41,42,41,42,41), IJOB
+C ------ FULL MATRIX OPTION
+  31      CONTINUE
+          CALL SOL(N,LDE1,E1,CONT,IP1)
+          GOTO 88
+C ------ FULL MATRIX OPTION, SECOND ORDER
+ 41      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=1,NM1
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOL(NM1,LDE1,E1,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+         GOTO 88
+C ------ BANDED MATRIX OPTION
+ 32      CONTINUE
+         CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+         GOTO 88
+C ------ BANDED MATRIX OPTION, SECOND ORDER
+ 42      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+          GOTO 88
+C ------ HESSENBERG MATRIX OPTION
+  33      CONTINUE
+          DO MM=N-2,1,-1
+             MP=N-MM
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 510
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 510         CONTINUE
+             DO I=MP+1,N
+                CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+             END DO
+          END DO
+          CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+          DO MM=1,N-2
+             MP=N-MM
+             DO I=MP+1,N
+                CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+             END DO
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 640
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 640         CONTINUE
+          END DO
+C -----------------------------------
+   88     CONTINUE
+          ERR=0.D0
+          DO I=1,N
+             ERR=ERR+(CONT(I)/SCAL(I))**2
+          END DO
+          ERR=MAX(SQRT(ERR/N),1.D-10)
+       END IF
+       RETURN
+C -----------------------------------------------------------
+  55   CONTINUE
+       RETURN
+       END
+C
+C     END OF SUBROUTINE ESTRAD
+C
+C ***********************************************************
+C
+      SUBROUTINE ESTRAV(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          H,DD,FCN,NFCN,Y0,Y,IJOB,X,M1,M2,NM1,NS,NNS,
+     &          E1,LDE1,ZZ,CONT,FF,IP1,IPHES,SCAL,ERR,
+     &          FIRST,REJECT,FAC1,RPAR,IPAR)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E1(LDE1,NM1),IP1(NM1),
+     &     SCAL(N),IPHES(N),ZZ(NNS),FF(NNS),Y0(N),Y(N)
+      DIMENSION DD(NS),CONT(N),RPAR(1),IPAR(1)
+      LOGICAL FIRST,REJECT
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      EXTERNAL FCN
+
+      GOTO (1,2,3,4,5,6,7,55,55,55,11,12,13,14,15), IJOB
+C
+   1  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  11  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+  48  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE1,E1,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   2  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  12  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+  45  MM=M1/M2
+      DO J=1,M2
+         SUM1=0.D0
+         DO K=MM-1,0,-1
+            SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+      DO I=M1,1,-1
+         CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+      END DO
+      GOTO 77
+C
+   3  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J)
+         END DO
+         FF(I+N)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  13  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO  I=1,M1
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J+M1)
+         END DO
+         IM1=I+M1
+         FF(IM1+N)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   4  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J)
+         END DO
+         FF(I+N)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+      GOTO 77
+C
+  14  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      DO  I=1,M1
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*FF(J+M1)
+         END DO
+         IM1=I+M1
+         FF(IM1+N)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 45
+C
+   5  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      DO I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,N
+         SUM=0.D0
+         DO J=1,N
+            SUM=SUM+FMAS(I,J)*FF(J)
+         END DO
+         FF(I+N)=SUM
+         CONT(I)=SUM+Y0(I)
+      END DO
+      CALL SOL (N,LDE1,E1,CONT,IP1)
+      GOTO 77
+C
+  15  CONTINUE
+C ------  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      DO  I=1,M1
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO I=M1+1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I)=SUM/H
+      END DO
+      DO I=1,NM1
+         SUM=0.D0
+         DO J=1,NM1
+            SUM=SUM+FMAS(I,J)*FF(J+M1)
+         END DO
+         IM1=I+M1
+         FF(IM1+N)=SUM
+         CONT(IM1)=SUM+Y0(IM1)
+      END DO
+      GOTO 48
+C
+   6  CONTINUE
+C ------  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ------  THIS OPTION IS NOT PROVIDED
+      RETURN
+C
+   7  CONTINUE
+C ------  B=IDENTITY, JACOBIAN A FULL MATRIX, HESSENBERG-OPTION
+      DO  I=1,N
+         SUM=0.D0
+         DO K=1,NS
+            SUM=SUM+DD(K)*ZZ(I+(K-1)*N)
+         END DO
+         FF(I+N)=SUM/H
+         CONT(I)=FF(I+N)+Y0(I)
+      END DO
+      DO MM=N-2,1,-1
+         MP=N-MM
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 310
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 310     CONTINUE
+         DO I=MP+1,N
+            CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+         END DO
+      END DO
+      CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+      DO MM=1,N-2
+         MP=N-MM
+         DO I=MP+1,N
+            CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+         END DO
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 440
+         ZSAFE=CONT(MP)
+         CONT(MP)=CONT(I)
+         CONT(I)=ZSAFE
+ 440     CONTINUE
+      END DO
+C
+C --------------------------------------
+C
+  77  CONTINUE
+      ERR=0.D0
+      DO  I=1,N
+         ERR=ERR+(CONT(I)/SCAL(I))**2
+      END DO
+      ERR=MAX(SQRT(ERR/N),1.D-10)
+C
+      IF (ERR.LT.1.D0) RETURN
+      IF (FIRST.OR.REJECT) THEN
+          DO I=1,N
+             CONT(I)=Y(I)+CONT(I)
+          END DO
+          CALL FCN(N,X,CONT,FF,RPAR,IPAR)
+          NFCN=NFCN+1
+          DO I=1,N
+             CONT(I)=FF(I)+FF(I+N)
+          END DO
+          GOTO (31,32,31,32,31,32,33,55,55,55,41,42,41,42,41), IJOB
+C ------ FULL MATRIX OPTION
+ 31      CONTINUE
+         CALL SOL (N,LDE1,E1,CONT,IP1)
+          GOTO 88
+C ------ FULL MATRIX OPTION, SECOND ORDER
+ 41      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=1,NM1
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOL (NM1,LDE1,E1,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+          GOTO 88
+C ------ BANDED MATRIX OPTION
+ 32      CONTINUE
+         CALL SOLB (N,LDE1,E1,MLE,MUE,CONT,IP1)
+          GOTO 88
+C ------ BANDED MATRIX OPTION, SECOND ORDER
+ 42      CONTINUE
+         DO J=1,M2
+            SUM1=0.D0
+            DO K=MM-1,0,-1
+               SUM1=(CONT(J+K*M2)+SUM1)/FAC1
+               DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+                  IM1=I+M1
+                  CONT(IM1)=CONT(IM1)+FJAC(I+MUJAC+1-J,J+K*M2)*SUM1
+               END DO
+            END DO
+         END DO
+         CALL SOLB (NM1,LDE1,E1,MLE,MUE,CONT(M1+1),IP1)
+         DO I=M1,1,-1
+            CONT(I)=(CONT(I)+CONT(M2+I))/FAC1
+         END DO
+          GOTO 88
+C ------ HESSENBERG MATRIX OPTION
+  33      CONTINUE
+          DO MM=N-2,1,-1
+             MP=N-MM
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 510
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 510         CONTINUE
+             DO I=MP+1,N
+                CONT(I)=CONT(I)-FJAC(I,MP-1)*CONT(MP)
+             END DO
+          END DO
+          CALL SOLH(N,LDE1,E1,1,CONT,IP1)
+          DO MM=1,N-2
+             MP=N-MM
+             DO I=MP+1,N
+                CONT(I)=CONT(I)+FJAC(I,MP-1)*CONT(MP)
+             END DO
+             I=IPHES(MP)
+             IF (I.EQ.MP) GOTO 640
+             ZSAFE=CONT(MP)
+             CONT(MP)=CONT(I)
+             CONT(I)=ZSAFE
+ 640         CONTINUE
+          END DO
+C -----------------------------------
+  88      CONTINUE
+          ERR=0.D0
+          DO I=1,N
+             ERR=ERR+(CONT(I)/SCAL(I))**2
+          END DO
+          ERR=MAX(SQRT(ERR/N),1.D-10)
+       END IF
+       RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+       END
+C
+C     END OF SUBROUTINE ESTRAV
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E,LDE,IP,DY,AK,FX,YNEW,HD,IJOB,STAGE1)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E(LDE,NM1),
+     &          IP(NM1),DY(N),AK(N),FX(N),YNEW(N)
+      LOGICAL STAGE1
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      IF (HD.EQ.0.D0) THEN
+         DO  I=1,N
+           AK(I)=DY(I)
+         END DO
+      ELSE
+         DO I=1,N
+            AK(I)=DY(I)+HD*FX(I)
+         END DO
+      END IF
+C
+      GOTO (1,2,3,4,5,6,55,55,55,55,11,12,13,13,15), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+      CALL SOL (N,LDE,E,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+ 48   MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(AK(JKM)+SUM)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               AK(IM1)=AK(IM1)+FJAC(I,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE,E,AK(M1+1),IP)
+      DO I=M1,1,-1
+         AK(I)=(AK(I)+AK(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+      CALL SOLB (N,LDE,E,MLE,MUE,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+  45  MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(AK(JKM)+SUM)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               AK(IM1)=AK(IM1)+FJAC(I+MUJAC+1-J,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE,E,MLE,MUE,AK(M1+1),IP)
+      DO I=M1,1,-1
+         AK(I)=(AK(I)+AK(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   3  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+      DO  I=1,N
+         SUM=0.D0
+         DO  J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*YNEW(J)
+         END DO
+         AK(I)=AK(I)+SUM
+      END DO
+      END IF
+      CALL SOL (N,LDE,E,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  13  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,M1
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+         DO I=1,NM1
+            SUM=0.D0
+            DO J=MAX(1,I-MLMAS),MIN(NM1,I+MUMAS)
+                SUM=SUM+FMAS(I-J+MBDIAG,J)*YNEW(J+M1)
+            END DO
+            IM1=I+M1
+            AK(IM1)=AK(IM1)+SUM
+         END DO
+      END IF
+      IF (IJOB.EQ.14) GOTO 45
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   4  CONTINUE
+C ---  B IS A BANDED MATRIX, JACOBIAN A BANDED MATRIX
+      IF (STAGE1) THEN
+      DO I=1,N
+         SUM=0.D0
+         DO J=MAX(1,I-MLMAS),MIN(N,I+MUMAS)
+            SUM=SUM+FMAS(I-J+MBDIAG,J)*YNEW(J)
+         END DO
+         AK(I)=AK(I)+SUM
+      END DO
+      END IF
+      CALL SOLB (N,LDE,E,MLE,MUE,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   5  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+      DO I=1,N
+         SUM=0.D0
+         DO J=1,N
+            SUM=SUM+FMAS(I,J)*YNEW(J)
+         END DO
+         AK(I)=AK(I)+SUM
+      END DO
+      END IF
+      CALL SOL (N,LDE,E,AK,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  15  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A FULL MATRIX, SECOND ORDER
+      IF (STAGE1) THEN
+         DO I=1,M1
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+         DO I=1,NM1
+            SUM=0.D0
+            DO J=1,NM1
+               SUM=SUM+FMAS(I,J)*YNEW(J+M1)
+            END DO
+            IM1=I+M1
+            AK(IM1)=AK(IM1)+SUM
+         END DO
+      END IF
+      GOTO 48
+C
+C -----------------------------------------------------------
+C
+   6  CONTINUE
+C ---  B IS A FULL MATRIX, JACOBIAN A BANDED MATRIX
+C ---  THIS OPTION IS NOT PROVIDED
+      IF (STAGE1) THEN
+      DO 624 I=1,N
+         SUM=0.D0
+         DO 623 J=1,N
+  623       SUM=SUM+FMAS(I,J)*YNEW(J)
+  624    AK(I)=AK(I)+SUM
+      CALL SOLB (N,LDE,E,MLE,MUE,AK,IP)
+      END IF
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVROD
+C
+C
+C ***********************************************************
+C
+      SUBROUTINE SLVSEU(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E,LDE,IP,IPHES,DEL,IJOB)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION FJAC(LDJAC,N),FMAS(LDMAS,NM1),E(LDE,NM1),DEL(N)
+      DIMENSION IP(NM1),IPHES(N)
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      GOTO (1,2,1,2,1,55,7,55,55,55,11,12,11,12,11), IJOB
+C
+C -----------------------------------------------------------
+C
+   1  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      CALL SOL (N,LDE,E,DEL,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  11  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX, SECOND ORDER
+      MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(DEL(JKM)+SUM)/FAC1
+            DO I=1,NM1
+               IM1=I+M1
+               DEL(IM1)=DEL(IM1)+FJAC(I,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOL (NM1,LDE,E,DEL(M1+1),IP)
+      DO I=M1,1,-1
+         DEL(I)=(DEL(I)+DEL(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   2  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX
+      CALL SOLB (N,LDE,E,MLE,MUE,DEL,IP)
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  12  CONTINUE
+C ---  B=IDENTITY, JACOBIAN A BANDED MATRIX, SECOND ORDER
+      MM=M1/M2
+      DO J=1,M2
+         SUM=0.D0
+         DO K=MM-1,0,-1
+            JKM=J+K*M2
+            SUM=(DEL(JKM)+SUM)/FAC1
+            DO I=MAX(1,J-MUJAC),MIN(NM1,J+MLJAC)
+               IM1=I+M1
+               DEL(IM1)=DEL(IM1)+FJAC(I+MUJAC+1-J,JKM)*SUM
+            END DO
+         END DO
+      END DO
+      CALL SOLB (NM1,LDE,E,MLE,MUE,DEL(M1+1),IP)
+      DO I=M1,1,-1
+         DEL(I)=(DEL(I)+DEL(M2+I))/FAC1
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+   7  CONTINUE
+C ---  HESSENBERG OPTION
+      DO MMM=N-2,1,-1
+         MP=N-MMM
+         MP1=MP-1
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 110
+         ZSAFE=DEL(MP)
+         DEL(MP)=DEL(I)
+         DEL(I)=ZSAFE
+ 110     CONTINUE
+         DO I=MP+1,N
+            DEL(I)=DEL(I)-FJAC(I,MP1)*DEL(MP)
+         END DO
+      END DO
+      CALL SOLH(N,LDE,E,1,DEL,IP)
+      DO MMM=1,N-2
+         MP=N-MMM
+         MP1=MP-1
+         DO I=MP+1,N
+            DEL(I)=DEL(I)+FJAC(I,MP1)*DEL(MP)
+         END DO
+         I=IPHES(MP)
+         IF (I.EQ.MP) GOTO 240
+         ZSAFE=DEL(MP)
+         DEL(MP)=DEL(I)
+         DEL(I)=ZSAFE
+ 240     CONTINUE
+      END DO
+      RETURN
+C
+C -----------------------------------------------------------
+C
+  55  CONTINUE
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVSEU
+C
+      SUBROUTINE DEC (N, NDIM, A, IP, IER)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION.
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAY  A .
+C     A = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     A(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U .
+C     A(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(1,1)*A(2,2)*...*A(N,N).
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        DO 10 I = KP1,N
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        T = A(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(K,K)
+        A(K,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = KP1,N
+ 30       A(I,K) = -A(I,K)*T
+        DO 50 J = KP1,N
+          T = A(M,J)
+          A(M,J) = A(K,J)
+          A(K,J) = T
+          IF (T .EQ. 0.D0) GO TO 45
+          DO 40 I = KP1,N
+ 40         A(I,J) = A(I,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(N,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DEC -------------------------
+      END
+C
+C
+      SUBROUTINE SOL (N, NDIM, A, B, IP)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAY  A .
+C    A = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    B = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        DO 10 I = KP1,N
+ 10       B(I) = B(I) + A(I,K)*T
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        B(K) = B(K)/A(K,K)
+        T = -B(K)
+        DO 30 I = 1,KM1
+ 30       B(I) = B(I) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(1,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOL -------------------------
+      END
+c
+c
+      SUBROUTINE DECH (N, NDIM, A, LB, IP, IER)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J,LB,NA
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION OF A HESSENBERG
+C  MATRIX WITH LOWER BANDWIDTH LB
+C  INPUT..
+C     N = ORDER OF MATRIX A.
+C     NDIM = DECLARED DIMENSION OF ARRAY  A .
+C     A = MATRIX TO BE TRIANGULARIZED.
+C     LB = LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED, LB.GE.1).
+C  OUTPUT..
+C     A(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U .
+C     A(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOLH  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(1,1)*A(2,2)*...*A(N,N).
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     THIS IS A SLIGHT MODIFICATION OF
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        NA = MIN0(N,LB+K)
+        DO 10 I = KP1,NA
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        T = A(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(K,K)
+        A(K,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = KP1,NA
+ 30       A(I,K) = -A(I,K)*T
+        DO 50 J = KP1,N
+          T = A(M,J)
+          A(M,J) = A(K,J)
+          A(K,J) = T
+          IF (T .EQ. 0.D0) GO TO 45
+          DO 40 I = KP1,NA
+ 40         A(I,J) = A(I,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(N,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECH ------------------------
+      END
+C
+C
+      SUBROUTINE SOLH (N, NDIM, A, LB, B, IP)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1,LB,NA
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX A.
+C    NDIM = DECLARED DIMENSION OF ARRAY  A .
+C    A = TRIANGULARIZED MATRIX OBTAINED FROM DECH.
+C    LB = LOWER BANDWIDTH OF A.
+C    B = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DECH HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        NA = MIN0(N,LB+K)
+        DO 10 I = KP1,NA
+ 10       B(I) = B(I) + A(I,K)*T
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        B(K) = B(K)/A(K,K)
+        T = -B(K)
+        DO 30 I = 1,KM1
+ 30       B(I) = B(I) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(1,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLH ------------------------
+      END
+C
+      SUBROUTINE DECC (N, NDIM, AR, AI, IP, IER)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      DIMENSION AR(NDIM,N), AI(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION
+C  ------ MODIFICATION FOR COMPLEX MATRICES --------
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI .
+C     (AR, AI) = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     AR(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; REAL PART.
+C     AI(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; IMAGINARY PART.
+C     AR(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    REAL PART.
+C     AI(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    IMAGINARY PART.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        DO 10 I = KP1,N
+          IF (DABS(AR(I,K))+DABS(AI(I,K)) .GT.
+     &          DABS(AR(M,K))+DABS(AI(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        TR = AR(M,K)
+        TI = AI(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        AR(M,K) = AR(K,K)
+        AI(M,K) = AI(K,K)
+        AR(K,K) = TR
+        AI(K,K) = TI
+ 20     CONTINUE
+        IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 80
+        DEN=TR*TR+TI*TI
+        TR=TR/DEN
+        TI=-TI/DEN
+        DO 30 I = KP1,N
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          AR(I,K)=-PRODR
+          AI(I,K)=-PRODI
+ 30       CONTINUE
+        DO 50 J = KP1,N
+          TR = AR(M,J)
+          TI = AI(M,J)
+          AR(M,J) = AR(K,J)
+          AI(M,J) = AI(K,J)
+          AR(K,J) = TR
+          AI(K,J) = TI
+          IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 48
+          IF (TI .EQ. 0.D0) THEN
+            DO 40 I = KP1,N
+            PRODR=AR(I,K)*TR
+            PRODI=AI(I,K)*TR
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 40         CONTINUE
+            GO TO 48
+          END IF
+          IF (TR .EQ. 0.D0) THEN
+            DO 45 I = KP1,N
+            PRODR=-AI(I,K)*TI
+            PRODI=AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 45         CONTINUE
+            GO TO 48
+          END IF
+          DO 47 I = KP1,N
+            PRODR=AR(I,K)*TR-AI(I,K)*TI
+            PRODI=AI(I,K)*TR+AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 47         CONTINUE
+ 48       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (DABS(AR(N,N))+DABS(AI(N,N)) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECC ------------------------
+      END
+C
+C
+      SUBROUTINE SOLC (N, NDIM, AR, AI, BR, BI, IP)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      DIMENSION AR(NDIM,N), AI(NDIM,N), BR(N), BI(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI.
+C    (AR,AI) = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    (BR,BI) = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    (BR,BI) = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        TR = BR(M)
+        TI = BI(M)
+        BR(M) = BR(K)
+        BI(M) = BI(K)
+        BR(K) = TR
+        BI(K) = TI
+        DO 10 I = KP1,N
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 10       CONTINUE
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        DEN=AR(K,K)*AR(K,K)+AI(K,K)*AI(K,K)
+        PRODR=BR(K)*AR(K,K)+BI(K)*AI(K,K)
+        PRODI=BI(K)*AR(K,K)-BR(K)*AI(K,K)
+        BR(K)=PRODR/DEN
+        BI(K)=PRODI/DEN
+        TR = -BR(K)
+        TI = -BI(K)
+        DO 30 I = 1,KM1
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 30       CONTINUE
+ 40     CONTINUE
+ 50     CONTINUE
+        DEN=AR(1,1)*AR(1,1)+AI(1,1)*AI(1,1)
+        PRODR=BR(1)*AR(1,1)+BI(1)*AI(1,1)
+        PRODI=BI(1)*AR(1,1)-BR(1)*AI(1,1)
+        BR(1)=PRODR/DEN
+        BI(1)=PRODI/DEN
+      RETURN
+C----------------------- END OF SUBROUTINE SOLC ------------------------
+      END
+C
+C
+      SUBROUTINE DECHC (N, NDIM, AR, AI, LB, IP, IER)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      DIMENSION AR(NDIM,N), AI(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION
+C  ------ MODIFICATION FOR COMPLEX MATRICES --------
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI .
+C     (AR, AI) = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     AR(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; REAL PART.
+C     AI(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U ; IMAGINARY PART.
+C     AR(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    REAL PART.
+C     AI(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C                                                    IMAGINARY PART.
+C     LB = LOWER BANDWIDTH OF A (DIAGONAL NOT COUNTED), LB.GE.1.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (LB .EQ. 0) GO TO 70
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        NA = MIN0(N,LB+K)
+        DO 10 I = KP1,NA
+          IF (DABS(AR(I,K))+DABS(AI(I,K)) .GT.
+     &          DABS(AR(M,K))+DABS(AI(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M
+        TR = AR(M,K)
+        TI = AI(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        AR(M,K) = AR(K,K)
+        AI(M,K) = AI(K,K)
+        AR(K,K) = TR
+        AI(K,K) = TI
+ 20     CONTINUE
+        IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 80
+        DEN=TR*TR+TI*TI
+        TR=TR/DEN
+        TI=-TI/DEN
+        DO 30 I = KP1,NA
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          AR(I,K)=-PRODR
+          AI(I,K)=-PRODI
+ 30       CONTINUE
+        DO 50 J = KP1,N
+          TR = AR(M,J)
+          TI = AI(M,J)
+          AR(M,J) = AR(K,J)
+          AI(M,J) = AI(K,J)
+          AR(K,J) = TR
+          AI(K,J) = TI
+          IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 48
+          IF (TI .EQ. 0.D0) THEN
+            DO 40 I = KP1,NA
+            PRODR=AR(I,K)*TR
+            PRODI=AI(I,K)*TR
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 40         CONTINUE
+            GO TO 48
+          END IF
+          IF (TR .EQ. 0.D0) THEN
+            DO 45 I = KP1,NA
+            PRODR=-AI(I,K)*TI
+            PRODI=AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 45         CONTINUE
+            GO TO 48
+          END IF
+          DO 47 I = KP1,NA
+            PRODR=AR(I,K)*TR-AI(I,K)*TI
+            PRODI=AI(I,K)*TR+AR(I,K)*TI
+            AR(I,J) = AR(I,J) + PRODR
+            AI(I,J) = AI(I,J) + PRODI
+ 47         CONTINUE
+ 48       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (DABS(AR(N,N))+DABS(AI(N,N)) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECHC -----------------------
+      END
+C
+C
+      SUBROUTINE SOLHC (N, NDIM, AR, AI, LB, BR, BI, IP)
+C VERSION COMPLEX KPP_REAL
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      DIMENSION AR(NDIM,N), AI(NDIM,N), BR(N), BI(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAYS  AR AND AI.
+C    (AR,AI) = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    (BR,BI) = RIGHT HAND SIDE VECTOR.
+C    LB = LOWER BANDWIDTH OF A.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    (BR,BI) = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      IF (LB .EQ. 0) GO TO 25
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        TR = BR(M)
+        TI = BI(M)
+        BR(M) = BR(K)
+        BI(M) = BI(K)
+        BR(K) = TR
+        BI(K) = TI
+        DO 10 I = KP1,MIN0(N,LB+K)
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 10       CONTINUE
+ 20     CONTINUE
+ 25     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        DEN=AR(K,K)*AR(K,K)+AI(K,K)*AI(K,K)
+        PRODR=BR(K)*AR(K,K)+BI(K)*AI(K,K)
+        PRODI=BI(K)*AR(K,K)-BR(K)*AI(K,K)
+        BR(K)=PRODR/DEN
+        BI(K)=PRODI/DEN
+        TR = -BR(K)
+        TI = -BI(K)
+        DO 30 I = 1,KM1
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(I) = BR(I) + PRODR
+          BI(I) = BI(I) + PRODI
+ 30       CONTINUE
+ 40     CONTINUE
+ 50     CONTINUE
+        DEN=AR(1,1)*AR(1,1)+AI(1,1)*AI(1,1)
+        PRODR=BR(1)*AR(1,1)+BI(1)*AI(1,1)
+        PRODI=BI(1)*AR(1,1)-BR(1)*AI(1,1)
+        BR(1)=PRODR/DEN
+        BI(1)=PRODI/DEN
+      RETURN
+C----------------------- END OF SUBROUTINE SOLHC -----------------------
+      END
+C
+      SUBROUTINE DECB (N, NDIM, A, ML, MU, IP, IER)
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION OF A BANDED
+C  MATRIX WITH LOWER BANDWIDTH ML AND UPPER BANDWIDTH MU
+C  INPUT..
+C     N       ORDER OF THE ORIGINAL MATRIX A.
+C     NDIM    DECLARED DIMENSION OF ARRAY  A.
+C     A       CONTAINS THE MATRIX IN BAND STORAGE.   THE COLUMNS
+C                OF THE MATRIX ARE STORED IN THE COLUMNS OF  A  AND
+C                THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C                ML+1 THROUGH 2*ML+MU+1 OF  A.
+C     ML      LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C     MU      UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C  OUTPUT..
+C     A       AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C                THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C     IP      INDEX VECTOR OF PIVOT INDICES.
+C     IP(N)   (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER     = 0 IF MATRIX A IS NONSINGULAR, OR  = K IF FOUND TO BE
+C                SINGULAR AT STAGE K.
+C  USE  SOLB  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(MD,1)*A(MD,2)*...*A(MD,N)  WITH MD=ML+MU+1.
+C  IF IP(N)=O, A IS SINGULAR, SOLB WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     THIS IS A MODIFICATION OF
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      JU = 0
+      IF (ML .EQ. 0) GO TO 70
+      IF (N .EQ. 1) GO TO 70
+      IF (N .LT. MU+2) GO TO 7
+      DO 5 J = MU+2,N
+      DO 5 I = 1,ML
+  5   A(I,J) = 0.D0
+  7   NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = MD
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M + K - MD
+        T = A(M,K)
+        IF (M .EQ. MD) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(MD,K)
+        A(MD,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = MD1,MDL
+ 30       A(I,K) = -A(I,K)*T
+        JU = MIN0(MAX0(JU,MU+IP(K)),N)
+        MM = MD
+        IF (JU .LT. KP1) GO TO 55
+        DO 50 J = KP1,JU
+          M = M - 1
+          MM = MM - 1
+          T = A(M,J)
+          IF (M .EQ. MM) GO TO 35
+          A(M,J) = A(MM,J)
+          A(MM,J) = T
+ 35       CONTINUE
+          IF (T .EQ. 0.D0) GO TO 45
+          JK = J - K
+          DO 40 I = MD1,MDL
+            IJK = I - JK
+ 40         A(IJK,J) = A(IJK,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 55     CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(MD,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECB ------------------------
+      END
+C
+C
+      SUBROUTINE SOLB (N, NDIM, A, ML, MU, B, IP)
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N      ORDER OF MATRIX A.
+C    NDIM   DECLARED DIMENSION OF ARRAY  A .
+C    A      TRIANGULARIZED MATRIX OBTAINED FROM DECB.
+C    ML     LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    MU     UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    B      RIGHT HAND SIDE VECTOR.
+C    IP     PIVOT VECTOR OBTAINED FROM DECB.
+C  DO NOT USE IF DECB HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B      SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      MDM = MD - 1
+      NM1 = N - 1
+      IF (ML .EQ. 0) GO TO 25
+      IF (N .EQ. 1) GO TO 50
+      DO 20 K = 1,NM1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IMD = I + K - MD
+ 10       B(IMD) = B(IMD) + A(I,K)*T
+ 20     CONTINUE
+ 25   CONTINUE
+      DO 40 KB = 1,NM1
+        K = N + 1 - KB
+        B(K) = B(K)/A(MD,K)
+        T = -B(K)
+        KMD = MD - K
+        LM = MAX0(1,KMD+1)
+        DO 30 I = LM,MDM
+          IMD = I - KMD
+ 30       B(IMD) = B(IMD) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(MD,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLB ------------------------
+      END
+C
+      SUBROUTINE DECBC (N, NDIM, AR, AI, ML, MU, IP, IER)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION AR(NDIM,N), AI(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION OF A BANDED COMPLEX
+C  MATRIX WITH LOWER BANDWIDTH ML AND UPPER BANDWIDTH MU
+C  INPUT..
+C     N       ORDER OF THE ORIGINAL MATRIX A.
+C     NDIM    DECLARED DIMENSION OF ARRAY  A.
+C     AR, AI     CONTAINS THE MATRIX IN BAND STORAGE.   THE COLUMNS
+C                OF THE MATRIX ARE STORED IN THE COLUMNS OF  AR (REAL
+C                PART) AND AI (IMAGINARY PART)  AND
+C                THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C                ML+1 THROUGH 2*ML+MU+1 OF  AR AND AI.
+C     ML      LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C     MU      UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C  OUTPUT..
+C     AR, AI  AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C                THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C     IP      INDEX VECTOR OF PIVOT INDICES.
+C     IP(N)   (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER     = 0 IF MATRIX A IS NONSINGULAR, OR  = K IF FOUND TO BE
+C                SINGULAR AT STAGE K.
+C  USE  SOLBC  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(MD,1)*A(MD,2)*...*A(MD,N)  WITH MD=ML+MU+1.
+C  IF IP(N)=O, A IS SINGULAR, SOLBC WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     THIS IS A MODIFICATION OF
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      JU = 0
+      IF (ML .EQ. 0) GO TO 70
+      IF (N .EQ. 1) GO TO 70
+      IF (N .LT. MU+2) GO TO 7
+      DO 5 J = MU+2,N
+      DO 5 I = 1,ML
+      AR(I,J) = 0.D0
+      AI(I,J) = 0.D0
+  5   CONTINUE
+  7   NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = MD
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IF (DABS(AR(I,K))+DABS(AI(I,K)) .GT.
+     &          DABS(AR(M,K))+DABS(AI(M,K))) M = I
+ 10     CONTINUE
+        IP(K) = M + K - MD
+        TR = AR(M,K)
+        TI = AI(M,K)
+        IF (M .EQ. MD) GO TO 20
+        IP(N) = -IP(N)
+        AR(M,K) = AR(MD,K)
+        AI(M,K) = AI(MD,K)
+        AR(MD,K) = TR
+        AI(MD,K) = TI
+ 20     IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 80
+        DEN=TR*TR+TI*TI
+        TR=TR/DEN
+        TI=-TI/DEN
+        DO 30 I = MD1,MDL
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          AR(I,K)=-PRODR
+          AI(I,K)=-PRODI
+ 30       CONTINUE
+        JU = MIN0(MAX0(JU,MU+IP(K)),N)
+        MM = MD
+        IF (JU .LT. KP1) GO TO 55
+        DO 50 J = KP1,JU
+          M = M - 1
+          MM = MM - 1
+          TR = AR(M,J)
+          TI = AI(M,J)
+          IF (M .EQ. MM) GO TO 35
+          AR(M,J) = AR(MM,J)
+          AI(M,J) = AI(MM,J)
+          AR(MM,J) = TR
+          AI(MM,J) = TI
+ 35       CONTINUE
+          IF (DABS(TR)+DABS(TI) .EQ. 0.D0) GO TO 48
+          JK = J - K
+          IF (TI .EQ. 0.D0) THEN
+            DO 40 I = MD1,MDL
+            IJK = I - JK
+            PRODR=AR(I,K)*TR
+            PRODI=AI(I,K)*TR
+            AR(IJK,J) = AR(IJK,J) + PRODR
+            AI(IJK,J) = AI(IJK,J) + PRODI
+ 40         CONTINUE
+            GO TO 48
+          END IF
+          IF (TR .EQ. 0.D0) THEN
+            DO 45 I = MD1,MDL
+            IJK = I - JK
+            PRODR=-AI(I,K)*TI
+            PRODI=AR(I,K)*TI
+            AR(IJK,J) = AR(IJK,J) + PRODR
+            AI(IJK,J) = AI(IJK,J) + PRODI
+ 45         CONTINUE
+            GO TO 48
+          END IF
+          DO 47 I = MD1,MDL
+            IJK = I - JK
+            PRODR=AR(I,K)*TR-AI(I,K)*TI
+            PRODI=AI(I,K)*TR+AR(I,K)*TI
+            AR(IJK,J) = AR(IJK,J) + PRODR
+            AI(IJK,J) = AI(IJK,J) + PRODI
+ 47         CONTINUE
+ 48       CONTINUE
+ 50       CONTINUE
+ 55     CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (DABS(AR(MD,N))+DABS(AI(MD,N)) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DECBC ------------------------
+      END
+C
+C
+      SUBROUTINE SOLBC (N, NDIM, AR, AI, ML, MU, BR, BI, IP)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION AR(NDIM,N), AI(NDIM,N), BR(N), BI(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B ,
+C                  VERSION BANDED AND COMPLEX-KPP_REAL.
+C  INPUT..
+C    N      ORDER OF MATRIX A.
+C    NDIM   DECLARED DIMENSION OF ARRAY  A .
+C    AR, AI TRIANGULARIZED MATRIX OBTAINED FROM DECB (REAL AND IMAG. PART).
+C    ML     LOWER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    MU     UPPER BANDWIDTH OF A (DIAGONAL IS NOT COUNTED).
+C    BR, BI RIGHT HAND SIDE VECTOR (REAL AND IMAG. PART).
+C    IP     PIVOT VECTOR OBTAINED FROM DECBC.
+C  DO NOT USE IF DECB HAS SET IER .NE. 0.
+C  OUTPUT..
+C    BR, BI SOLUTION VECTOR, X (REAL AND IMAG. PART).
+C-----------------------------------------------------------------------
+      MD = ML + MU + 1
+      MD1 = MD + 1
+      MDM = MD - 1
+      NM1 = N - 1
+      IF (ML .EQ. 0) GO TO 25
+      IF (N .EQ. 1) GO TO 50
+      DO 20 K = 1,NM1
+        M = IP(K)
+        TR = BR(M)
+        TI = BI(M)
+        BR(M) = BR(K)
+        BI(M) = BI(K)
+        BR(K) = TR
+        BI(K) = TI
+        MDL = MIN(ML,N-K) + MD
+        DO 10 I = MD1,MDL
+          IMD = I + K - MD
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(IMD) = BR(IMD) + PRODR
+          BI(IMD) = BI(IMD) + PRODI
+ 10     CONTINUE
+ 20     CONTINUE
+ 25     CONTINUE
+      DO 40 KB = 1,NM1
+        K = N + 1 - KB
+        DEN=AR(MD,K)*AR(MD,K)+AI(MD,K)*AI(MD,K)
+        PRODR=BR(K)*AR(MD,K)+BI(K)*AI(MD,K)
+        PRODI=BI(K)*AR(MD,K)-BR(K)*AI(MD,K)
+        BR(K)=PRODR/DEN
+        BI(K)=PRODI/DEN
+        TR = -BR(K)
+        TI = -BI(K)
+        KMD = MD - K
+        LM = MAX0(1,KMD+1)
+        DO 30 I = LM,MDM
+          IMD = I - KMD
+          PRODR=AR(I,K)*TR-AI(I,K)*TI
+          PRODI=AI(I,K)*TR+AR(I,K)*TI
+          BR(IMD) = BR(IMD) + PRODR
+          BI(IMD) = BI(IMD) + PRODI
+ 30       CONTINUE
+ 40     CONTINUE
+        DEN=AR(MD,1)*AR(MD,1)+AI(MD,1)*AI(MD,1)
+        PRODR=BR(1)*AR(MD,1)+BI(1)*AI(MD,1)
+        PRODI=BI(1)*AR(MD,1)-BR(1)*AI(MD,1)
+        BR(1)=PRODR/DEN
+        BI(1)=PRODI/DEN
+ 50   CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE SOLBC ------------------------
+      END
+c
+C
+      subroutine Elmhes(nm,n,low,igh,a,int)
+C
+      integer i,j,m,n,la,nm,igh,kp1,low,mm1,mp1
+      real*8 a(nm,n)
+      real*8 x,y
+      real*8 dabs
+      integer int(igh)
+C
+C     this subroutine is a translation of the algol procedure elmhes,
+C     num. math. 12, 349-368(1968) by martin and wilkinson.
+C     handbook for auto. comp., vol.ii-linear algebra, 339-358(1971).
+C
+C     given a real general matrix, this subroutine
+C     reduces a submatrix situated in rows and columns
+C     low through igh to upper hessenberg form by
+C     stabilized elementary similarity transformations.
+C
+C     on input:
+C
+C      nm must be set to the row dimension of two-dimensional
+C        array parameters as declared in the calling program
+C        dimension statement;
+C
+C      n is the order of the matrix;
+C
+C      low and igh are integers determined by the balancing
+C        subroutine  balanc.      if  balanc  has not been used,
+C        set low=1, igh=n;
+C
+C      a contains the input matrix.
+C
+C     on output:
+C
+C      a contains the hessenberg matrix.  the multipliers
+C        which were used in the reduction are stored in the
+C        remaining triangle under the hessenberg matrix;
+C
+C      int contains information on the rows and columns
+C        interchanged in the reduction.
+C        only elements low through igh are used.
+C
+C     questions and comments should be directed to b. s. garbow,
+C     applied mathematics division, argonne national laboratory
+C
+C     ------------------------------------------------------------------
+C
+      la = igh - 1
+      kp1 = low + 1
+      if (la .lt. kp1) go to 200
+C
+      do 180 m = kp1, la
+       mm1 = m - 1
+       x = 0.0d0
+       i = m
+C
+       do 100 j = m, igh
+          if (dabs(a(j,mm1)) .le. dabs(x)) go to 100
+          x = a(j,mm1)
+          i = j
+  100   continue
+C
+       int(m) = i
+       if (i .eq. m) go to 130
+C    :::::::::: interchange rows and columns of a ::::::::::
+       do 110 j = mm1, n
+          y = a(i,j)
+          a(i,j) = a(m,j)
+          a(m,j) = y
+  110   continue
+C
+       do 120 j = 1, igh
+          y = a(j,i)
+          a(j,i) = a(j,m)
+          a(j,m) = y
+  120   continue
+C    :::::::::: end interchange ::::::::::
+  130   if (x .eq. 0.0d0) go to 180
+       mp1 = m + 1
+C
+       do 160 i = mp1, igh
+          y = a(i,mm1)
+          if (y .eq. 0.0d0) go to 160
+          y = y / x
+          a(i,mm1) = y
+C
+          do 140 j = m, n
+  140      a(i,j) = a(i,j) - y * a(m,j)
+C
+          do 150 j = 1, igh
+  150      a(j,m) = a(j,m) + y * a(j,i)
+C
+  160   continue
+C
+  180 continue
+C
+  200 return
+C    :::::::::: last card of elmhes ::::::::::
+      end
+
+        SUBROUTINE SOLOUT (NR,XOLD,X,Y,CONT,LRC,N,RPAR,IPAR,IRTRN)
+C --- PRINTS SOLUTION AT EQUIDISTANT OUTPUT-POINTS BY USING "CONTR5"
+        IMPLICIT KPP_REAL (A-H,O-Z)
+        DIMENSION Y(N),CONT(LRC)
+        COMMON /INTERN/XOUT
+        IF (NR.EQ.1) THEN
+           WRITE (6,99) X,Y(1),Y(2),NR-1
+           XOUT=0.2D0
+        ELSE
+ 10        CONTINUE
+           IF (X.GE.XOUT) THEN
+C --- CONTINUOUS OUTPUT FOR RADAU5
+              WRITE (6,99) XOUT,CONTR5(1,XOUT,CONT,LRC),
+     &                     CONTR5(2,XOUT,CONT,LRC),NR-1
+              XOUT=XOUT+0.2D0
+              GOTO 10
+           END IF
+        END IF
+ 99     FORMAT(1X,'X =',F5.2,'    Y =',2E18.10,'    NSTEP =',I4)
+        RETURN
+        END
+
+        SUBROUTINE FUNC_CHEM (N, T, V, FCT, RPAR, IPAR)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), FCT(NVAR)
+	KPP_REAL T, TOLD, RPAR(1)
+	INTEGER N, IPAR(1)
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V,  FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE JAC_CHEM (N, T, V, JV, NROWPD, RPAR, IPAR)
+	IMPLICIT NONE
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        KPP_REAL V(NVAR), JV(NVAR,NVAR)
+	KPP_REAL T, TOLD, RPAR(1)
+	INTEGER N, IPAR(1), NROWPD, i, j
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        DO i=1,NVAR
+           DO j=1,NVAR
+              JV(i,j) = 0.D0
+           END DO
+        END DO
+        CALL Jac(V,  FIX, RCONST, JV)
+        RETURN
+        END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.c	(revision 3477)
@@ -0,0 +1,53 @@
+void StochasticRates( double RCT[], double Volume, double SCT[] );   
+void Propensity ( int V[], int F[], double SCT[], double A[] );
+void MoleculeChange ( int j, int NmlcV[] );
+double CellMass(double T); 
+void Update_RCONST();
+
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+void Gillespie(int Nevents, double Volume, double* T, int NmlcV[], int NmlcF[]) 
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+    
+      int i, m=0, event;
+      double r1, r2;
+      double A[NREACT], SCT[NREACT], x;
+
+     /* Compute the stochastic reaction rates */
+      Update_RCONST();
+      StochasticRates( RCONST, Volume, SCT );   
+   
+      for (event = 1; event <= Nevents; event++) {
+
+          /* Uniformly distributed ranfor (m numbers */
+          r1 = (double)rand()/(double)RAND_MAX;
+          r2 = (double)rand()/(double)RAND_MAX;
+
+	  /* Avoid log of zero */
+	  r2 = (r2-1.0e-14) ? r2 : 1.0e-14;
+	  
+          /* Propensity vector */
+	  TIME = *T;
+	  Propensity ( NmlcV, NmlcF, SCT, A );
+	  
+          /* Cumulative sum of propensities */
+	  for (i=1; i<NREACT; i++)
+            A[i] = A[i-1]+A[i];
+          
+	  /* Index of next reaction */
+	  x = r1*A[NREACT-1];
+	  for ( i = 0; i<NREACT; i++)
+	    if (A[i] >= x) {
+              m = i+1;
+	      break;
+	    }
+	  
+          /* Update T with time to next reaction */
+          *T = *T - log(r2)/A[NREACT-1];
+
+          /* Update state vector after reaction m */
+	  MoleculeChange( m, NmlcV );
+	  
+     } /* for event */
+    
+} /* Gillespie */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.def	(revision 3477)
@@ -0,0 +1,10 @@
+ 
+#FUNCTION   aggregate
+#JACOBIAN   SPARSE_LU_ROW
+#DOUBLE     on 
+#STOCHASTIC on 
+#INTFILE    gillespie
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/gillespie.f90	(revision 3477)
@@ -0,0 +1,86 @@
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Parameters, ONLY : NVAR, NFIX, NREACT 
+  USE KPP_ROOT_Global, ONLY : TIME, RCONST, Volume 
+  USE KPP_ROOT_Stoichiom  
+  USE KPP_ROOT_Stochastic
+  USE KPP_ROOT_Rates
+  IMPLICIT NONE
+
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gillespie(Nevents, T, SCT, NmlcV, NmlcF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!   Gillespie stochastic integration
+!   INPUT:
+!       Nevents = no. of individual reaction events to be simulated
+!       SCT     = stochastic rate constants
+!       T       = time
+!       NmlcV, NmlcF = no. of molecules for variable and fixed species
+!   OUTPUT:
+!       T       = updated time (after Nevents reactions)
+!       NmlcV   = updated no. of molecules for variable species
+!      
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      KPP_REAL:: T
+      INTEGER :: Nevents     
+      INTEGER :: NmlcV(NVAR), NmlcF(NFIX)
+      INTEGER :: i, m, issa
+      REAL   :: r1, r2
+      KPP_REAL :: A(NREACT), SCT(NREACT), x
+   
+      DO issa = 1, Nevents
+
+          ! Uniformly distributed random numbers
+          CALL RANDOM_NUMBER(r1)
+          CALL RANDOM_NUMBER(r2)
+          ! Avoid log of zero
+          r2 = MAX(r2,1.e-14)
+          
+          ! Propensity vector
+          CALL  Propensity ( NmlcV, NmlcF, SCT, A )
+          ! Cumulative sum of propensities
+          DO i = 2, NREACT
+            A(i) = A(i-1)+A(i);
+          END DO
+          
+          ! Index of next reaction
+          x = r1*A(NREACT)
+          DO i = 1, NREACT
+            IF (A(i)>=x) THEN
+              m = i;
+              EXIT
+            END IF
+          END DO
+          
+          ! Update time with time to next reaction
+          T = T - LOG(r2)/A(NREACT);
+
+          ! Update state vector
+          CALL MoleculeChange( m, NmlcV )
+        
+     END DO
+    
+  CONTAINS
+
+    SUBROUTINE PropensityTemplate( T, NmlcV, NmlcF, Prop )
+      KPP_REAL, INTENT(IN)  :: T
+      INTEGER, INTENT(IN)   :: NmlcV(NVAR), NmlcF(NFIX)
+      KPP_REAL, INTENT(OUT) :: Prop(NREACT)
+      KPP_REAL :: Tsave, SCT(NREACT)
+    ! Update the stochastic reaction rates, which may be time dependent 
+      Tsave = TIME
+      TIME = T
+      CALL Update_RCONST()
+      CALL StochasticRates( RCONST, Volume, SCT )   
+      CALL Propensity ( NmlcV, NmlcF, SCT, Prop )
+      TIME = Tsave
+    END SUBROUTINE PropensityTemplate    
+    
+  END SUBROUTINE Gillespie
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.def	(revision 3477)
@@ -0,0 +1,14 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_dvode
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f	(revision 3477)
@@ -0,0 +1,3850 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      PARAMETER (LRW=2*NVAR*NVAR+9*NVAR+25,LIW=NVAR+35)
+      PARAMETER (LRCONT=4*NVAR+4+10)
+      COMMON /CONT/ICONT(4),RCONT(LRCONT)
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      COMMON /VERWER/ IVERWER, IBEGIN, STEPCUT
+      EXTERNAL VODE_FSPLIT_VAR, VODE_Jac_SP
+
+      KPP_REAL RWORK(LRW)
+      INTEGER IWORK(LIW)
+
+      STEPCUT = 0.
+      MAXORD = 5
+      IBEGIN = 1
+      ITOL=4
+
+C ---- NORMAL COMPUTATION ---
+      ITASK=1
+      ISTATE=1
+C ---- USE OPTIONAL INPUT ---
+      IOPT=1
+      IWORK(5) = MAXORD    ! MAX ORD
+      IWORK(6) = 20000
+      IWORK(7) = 0
+      RWORK(6) = STEPMAX   ! STEP MAX
+      RWORK(7) = STEPMIN   ! STEP MIN
+      RWORK(5) = STEPMIN   ! INITIAL STEP
+
+C ----- SIGNAL FOR STIFF CASE, FULL JACOBIAN, INTERN (22) or SUPPLIED (21)
+      MF = 21
+
+      CALL DVODE (VODE_FSPLIT_VAR, NVAR, VAR, TIN, TOUT, ITOL,
+     *            RTOL, ATOL, ITASK,
+     *            ISTATE, IOPT, RWORK, LRW, IWORK, LIW,
+     *            VODE_Jac_SP, MF, RPAR, IPAR)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'ATMDVODE: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+C -- This version has JAC sparse, FCN aggregate --
+
+      SUBROUTINE DVODE (F, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,
+     1            ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF,
+     2            RPAR, IPAR)
+
+      KPP_REAL Y, T, TOUT, RelTol, AbsTol, RWORK, RPAR
+      INTEGER NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, IWORK, LIW,
+     1        MF, IPAR
+      DIMENSION Y(*), RelTol(*), AbsTol(*), RWORK(LRW), IWORK(LIW),
+     1          RPAR(*), IPAR(*)
+C-----------------------------------------------------------------------
+C DVODE.. Variable-coefficient Ordinary Differential Equation solver,
+C with fixed-leading coefficient implementation.
+C This version is in KPP_REAL.
+C
+C DVODE solves the initial value problem for stiff or nonstiff
+C systems of first order ODEs,
+C     dy/dt = f(t,y) ,  or, in component form,
+C     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+C DVODE is a package based on the EPISODE and EPISODEB packages, and
+C on the ODEPACK user interface standard, with minor modifications.
+C-----------------------------------------------------------------------
+C Revision History (YYMMDD)
+C   890615  Date Written
+C   890922  Added interrupt/restart ability, minor changes throughout.
+C   910228  Minor revisions in line format,  prologue, etc.
+C   920227  Modifications by D. Pang:
+C           (1) Applied subgennam to get generic intrinsic names.
+C           (2) Changed intrinsic names to generic in comments.
+C           (3) Added *DECK lines before each routine.
+C   920721  Names of routines and labeled Common blocks changed, so as
+C           to be unique in combined single/KPP_REAL code (ACH).
+C   920722  Minor revisions to prologue (ACH).
+C   920831  Conversion to KPP_REAL done (ACH).
+C-----------------------------------------------------------------------
+C References..
+C
+C 1. P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, "VODE: A Variable
+C    Coefficient ODE Solver," SIAM J. Sci. Stat. Comput., 10 (1989),
+C    pp. 1038-1051.  Also, LLNL Report UCRL-98412, June 1988.
+C 2. G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the
+C    Numerical Solution of Ordinary Differential Equations,"
+C    ACM Trans. Math. Software, 1 (1975), pp. 71-96.
+C 3. A. C. Hindmarsh and G. D. Byrne, "EPISODE: An Effective Package
+C    for the Integration of Systems of Ordinary Differential
+C    Equations," LLNL Report UCID-30112, Rev. 1, April 1977.
+C 4. G. D. Byrne and A. C. Hindmarsh, "EPISODEB: An Experimental
+C    Package for the Integration of Systems of Ordinary Differential
+C    Equations with Banded Jacobians," LLNL Report UCID-30132, April
+C    1976.
+C 5. A. C. Hindmarsh, "ODEPACK, a Systematized Collection of ODE
+C    Solvers," in Scientific Computing, R. S. Stepleman et al., eds.,
+C    North-Holland, Amsterdam, 1983, pp. 55-64.
+C 6. K. R. Jackson and R. Sacks-Davis, "An Alternative Implementation
+C    of Variable Step-Size Multistep Formulas for Stiff ODEs," ACM
+C    Trans. Math. Software, 6 (1980), pp. 295-318.
+C-----------------------------------------------------------------------
+C Authors..
+C
+C               Peter N. Brown and Alan C. Hindmarsh
+C               Computing and Mathematics Research Division, L-316
+C               Lawrence Livermore National Laboratory
+C               Livermore, CA 94550
+C and
+C               George D. Byrne
+C               Exxon Research and Engineering Co.
+C               Clinton Township
+C               Route 22 East
+C               Annandale, NJ 08801
+C-----------------------------------------------------------------------
+C Summary of usage.
+C
+C Communication between the user and the DVODE package, for normal
+C situations, is summarized here.  This summary describes only a subset
+C of the full set of options available.  See the full description for
+C details, including optional communication, nonstandard options,
+C and instructions for special situations.  See also the example
+C problem (with program and output) following this summary.
+C
+C A. First provide a subroutine of the form..
+C
+C           SUBROUTINE F (NEQ, T, Y, YDOT, RPAR, IPAR)
+C           KPP_REAL T, Y, YDOT, RPAR
+C           DIMENSION Y(NEQ), YDOT(NEQ)
+C
+C which supplies the vector function f by loading YDOT(i) with f(i).
+C
+C B. Next determine (or guess) whether or not the problem is stiff.
+C Stiffness occurs when the Jacobian matrix df/dy has an eigenvalue
+C whose real part is negative and large in magnitude, compared to the
+C reciprocal of the t span of interest.  If the problem is nonstiff,
+C use a method flag MF = 10.  If it is stiff, there are four standard
+C choices for MF (21, 22, 24, 25), and DVODE requires the Jacobian
+C matrix in some form.  In these cases (MF .gt. 0), DVODE will use a
+C saved copy of the Jacobian matrix.  If this is undesirable because of
+C storage limitations, set MF to the corresponding negative value
+C (-21, -22, -24, -25).  (See full description of MF below.)
+C The Jacobian matrix is regarded either as full (MF = 21 or 22),
+C or banded (MF = 24 or 25).  In the banded case, DVODE requires two
+C half-bandwidth parameters ML and MU.  These are, respectively, the
+C widths of the lower and upper parts of the band, excluding the main
+C diagonal.  Thus the band consists of the locations (i,j) with
+C i-ML .le. j .le. i+MU, and the full bandwidth is ML+MU+1.
+C
+C C. If the problem is stiff, you are encouraged to supply the Jacobian
+C directly (MF = 21 or 24), but if this is not feasible, DVODE will
+C compute it internally by difference quotients (MF = 22 or 25).
+C If you are supplying the Jacobian, provide a subroutine of the form..
+C
+C           SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD, RPAR, IPAR)
+C           KPP_REAL T, Y, PD, RPAR
+C           DIMENSION Y(NEQ), PD(NROWPD,NEQ)
+C
+C which supplies df/dy by loading PD as follows..
+C     For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+C the partial derivative of f(i) with respect to y(j).  (Ignore the
+C ML and MU arguments in this case.)
+C     For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with
+C df(i)/dy(j), i.e. load the diagonal lines of df/dy into the rows of
+C PD from the top down.
+C     In either case, only nonzero elements need be loaded.
+C
+C D. Write a main program which calls subroutine DVODE once for
+C each point at which answers are desired.  This should also provide
+C for possible use of logical unit 6 for output of error messages
+C by DVODE.  On the first CALL to DVODE, supply arguments as follows..
+C F    = Name of subroutine for right-hand side vector f.
+C          This name must be declared external in calling program.
+C NEQ    = Number of first order ODE-s.
+C Y      = Array of initial values, of length NEQ.
+C T      = The initial value of the independent variable.
+C TOUT   = First point where output is desired (.ne. T).
+C ITOL   = 1 or 2 according as AbsTol (below) is a scalar or array.
+C RelTol   = Relative tolerance parameter (scalar).
+C AbsTol   = Absolute tolerance parameter (scalar or array).
+C          The estimated local error in Y(i) will be controlled so as
+C          to be roughly less (in magnitude) than
+C             EWT(i) = RelTol*abs(Y(i)) + AbsTol     if ITOL = 1, or
+C             EWT(i) = RelTol*abs(Y(i)) + AbsTol(i)  if ITOL = 2.
+C          Thus the local error test passes if, in each component,
+C          either the absolute error is less than AbsTol (or AbsTol(i)),
+C          or the relative error is less than RelTol.
+C          Use RelTol = 0.0 for pure absolute error control, and
+C          use AbsTol = 0.0 (or AbsTol(i) = 0.0) for pure relative error
+C          control.  Caution.. Actual (global) errors may exceed these
+C          local tolerances, so choose them conservatively.
+C ITASK  = 1 for normal computation of output values of Y at t = TOUT.
+C ISTATE = Integer flag (input and output).  Set ISTATE = 1.
+C IOPT   = 0 to indicate no optional input used.
+C RWORK  = Real work array of length at least..
+C             20 + 16*NEQ                      for MF = 10,
+C             22 +  9*NEQ + 2*NEQ**2           for MF = 21 or 22,
+C             22 + 11*NEQ + (3*ML + 2*MU)*NEQ  for MF = 24 or 25.
+C LRW    = Declared length of RWORK (in user's DIMENSION statement).
+C IWORK  = Integer work array of length at least..
+C             30        for MF = 10,
+C             30 + NEQ  for MF = 21, 22, 24, or 25.
+C          If MF = 24 or 25, input in IWORK(1),IWORK(2) the lower
+C          and upper half-bandwidths ML,MU.
+C LIW    = Declared length of IWORK (in user's DIMENSION).
+C JAC    = Name of subroutine for Jacobian matrix (MF = 21 or 24).
+C          If used, this name must be declared external in calling
+C          program.  If not used, pass a dummy name.
+C MF     = Method flag.  Standard values are..
+C          10 for nonstiff (Adams) method, no Jacobian used.
+C          21 for stiff (BDF) method, user-supplied full Jacobian.
+C          22 for stiff method, internally generated full Jacobian.
+C          24 for stiff method, user-supplied banded Jacobian.
+C          25 for stiff method, internally generated banded Jacobian.
+C RPAR,IPAR = user-defined real and integer arrays passed to F and JAC.
+C Note that the main program must declare arrays Y, RWORK, IWORK,
+C and possibly AbsTol, RPAR, and IPAR.
+C
+C E. The output from the first CALL (or any call) is..
+C      Y = Array of computed values of y(t) vector.
+C      T = Corresponding value of independent variable (normally TOUT).
+C ISTATE = 2  if DVODE was successful, negative otherwise.
+C          -1 means excess work done on this call. (Perhaps wrong MF.)
+C          -2 means excess accuracy requested. (Tolerances too small.)
+C          -3 means illegal input detected. (See printed message.)
+C          -4 means repeated error test failures. (Check all input.)
+C          -5 means repeated convergence failures. (Perhaps bad
+C             Jacobian supplied or wrong choice of MF or tolerances.)
+C          -6 means error weight became zero during problem. (Solution
+C             component i vanished, and AbsTol or AbsTol(i) = 0.)
+C
+C F. To continue the integration after a successful return, simply
+C reset TOUT and CALL DVODE again.  No other parameters need be reset.
+C
+C-----------------------------------------------------------------------
+C EXAMPLE PROBLEM
+C
+C The following is a simple example problem, with the coding
+C needed for its solution by DVODE.  The problem is from chemical
+C kinetics, and consists of the following three rate equations..
+C     dy1/dt = -.04*y1 + 1.e4*y2*y3
+C     dy2/dt = .04*y1 - 1.e4*y2*y3 - 3.e7*y2**2
+C     dy3/dt = 3.e7*y2**2
+C on the interval from t = 0.0 to t = 4.e10, with initial conditions
+C y1 = 1.0, y2 = y3 = 0.  The problem is stiff.
+C
+C The following coding solves this problem with DVODE, using MF = 21
+C and printing results at t = .4, 4., ..., 4.e10.  It uses
+C ITOL = 2 and AbsTol much smaller for y2 than y1 or y3 because
+C y2 has much smaller values.
+C At the end of the run, statistical quantities of interest are
+C printed. (See optional output in the full description below.)
+C To generate Fortran source code, replace C in column 1 with a blank
+C in the coding below.
+C
+C     EXTERNAL FEX, JEX
+C     KPP_REAL AbsTol, RPAR, RelTol, RWORK, T, TOUT, Y
+C     DIMENSION Y(3), AbsTol(3), RWORK(67), IWORK(33)
+C     NEQ = 3
+C     Y(1) = 1.0D0
+C     Y(2) = 0.0D0
+C     Y(3) = 0.0D0
+C     T = 0.0D0
+C     TOUT = 0.4D0
+C     ITOL = 2
+C     RelTol = 1.D-4
+C     AbsTol(1) = 1.D-8
+C     AbsTol(2) = 1.D-14
+C     AbsTol(3) = 1.D-6
+C     ITASK = 1
+C     ISTATE = 1
+C     IOPT = 0
+C     LRW = 67
+C     LIW = 33
+C     MF = 21
+C     DO 40 IOUT = 1,12
+C       CALL DVODE(FEX,NEQ,Y,T,TOUT,ITOL,RelTol,AbsTol,ITASK,ISTATE,
+C    1            IOPT,RWORK,LRW,IWORK,LIW,JEX,MF,RPAR,IPAR)
+C       WRITE(6,20)T,Y(1),Y(2),Y(3)
+C 20    FORMAT(' At t =',D12.4,'   y =',3D14.6)
+C       IF (ISTATE .LT. 0) GO TO 80
+C 40    TOUT = TOUT*10.
+C     WRITE(6,60) IWORK(11),IWORK(12),IWORK(13),IWORK(19),
+C    1            IWORK(20),IWORK(21),IWORK(22)
+C 60  FORMAT(/' No. steps =',I4,'   No. f-s =',I4,
+C    1       '   No. J-s =',I4,'   No. LU-s =',I4/
+C    2       '  No. nonlinear iterations =',I4/
+C    3       '  No. nonlinear convergence failures =',I4/
+C    4       '  No. error test failures =',I4/)
+C     STOP
+C 80  WRITE(6,90)ISTATE
+C 90  FORMAT(///' Error halt.. ISTATE =',I3)
+C     STOP
+C     END
+C
+C     SUBROUTINE FEX (NEQ, T, Y, YDOT, RPAR, IPAR)
+C     KPP_REAL RPAR, T, Y, YDOT
+C     DIMENSION Y(NEQ), YDOT(NEQ)
+C     YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
+C     YDOT(3) = 3.D7*Y(2)*Y(2)
+C     YDOT(2) = -YDOT(1) - YDOT(3)
+C     RETURN
+C     END
+C
+C     SUBROUTINE JEX (NEQ, T, Y, ML, MU, PD, NRPD, RPAR, IPAR)
+C     KPP_REAL PD, RPAR, T, Y
+C     DIMENSION Y(NEQ), PD(NRPD,NEQ)
+C     PD(1,1) = -.04D0
+C     PD(1,2) = 1.D4*Y(3)
+C     PD(1,3) = 1.D4*Y(2)
+C     PD(2,1) = .04D0
+C     PD(2,3) = -PD(1,3)
+C     PD(3,2) = 6.D7*Y(2)
+C     PD(2,2) = -PD(1,2) - PD(3,2)
+C     RETURN
+C     END
+C
+C The following output was obtained from the above program on a
+C Cray-1 computer with the CFT compiler.
+C
+C At t =  4.0000e-01   y =  9.851680e-01  3.386314e-05  1.479817e-02
+C At t =  4.0000e+00   y =  9.055255e-01  2.240539e-05  9.445214e-02
+C At t =  4.0000e+01   y =  7.158108e-01  9.184883e-06  2.841800e-01
+C At t =  4.0000e+02   y =  4.505032e-01  3.222940e-06  5.494936e-01
+C At t =  4.0000e+03   y =  1.832053e-01  8.942690e-07  8.167938e-01
+C At t =  4.0000e+04   y =  3.898560e-02  1.621875e-07  9.610142e-01
+C At t =  4.0000e+05   y =  4.935882e-03  1.984013e-08  9.950641e-01
+C At t =  4.0000e+06   y =  5.166183e-04  2.067528e-09  9.994834e-01
+C At t =  4.0000e+07   y =  5.201214e-05  2.080593e-10  9.999480e-01
+C At t =  4.0000e+08   y =  5.213149e-06  2.085271e-11  9.999948e-01
+C At t =  4.0000e+09   y =  5.183495e-07  2.073399e-12  9.999995e-01
+C At t =  4.0000e+10   y =  5.450996e-08  2.180399e-13  9.999999e-01
+C
+C No. steps = 595   No. f-s = 832   No. J-s =  13   No. LU-s = 112
+C  No. nonlinear iterations = 831
+C  No. nonlinear convergence failures =   0
+C  No. error test failures =  22
+C-----------------------------------------------------------------------
+C Full description of user interface to DVODE.
+C
+C The user interface to DVODE consists of the following parts.
+C
+C i.   The CALL sequence to subroutine DVODE, which is a driver
+C      routine for the solver.  This includes descriptions of both
+C      the CALL sequence arguments and of user-supplied routines.
+C      Following these descriptions is
+C        * a description of optional input available through the
+C          CALL sequence,
+C        * a description of optional output (in the work arrays), and
+C        * instructions for interrupting and restarting a solution.
+C
+C ii.  Descriptions of other routines in the DVODE package that may be
+C      (optionally) called by the user.  These provide the ability to
+C      alter error message handling, save and restore the internal
+C      COMMON, and obtain specified derivatives of the solution y(t).
+C
+C iii. Descriptions of COMMON blocks to be declared in overlay
+C      or similar environments.
+C
+C iv.  Description of two routines in the DVODE package, either of
+C      which the user may replace with his own version, if desired.
+C      these relate to the measurement of errors.
+C
+C-----------------------------------------------------------------------
+C Part i.  Call Sequence.
+C
+C The CALL sequence parameters used for input only are
+C     F, NEQ, TOUT, ITOL, RelTol, AbsTol, ITASK, IOPT, LRW, LIW, JAC, MF,
+C and those used for both input and output are
+C     Y, T, ISTATE.
+C The work arrays RWORK and IWORK are also used for conditional and
+C optional input and optional output.  (The term output here refers
+C to the return from subroutine DVODE to the user's calling program.)
+C
+C The legality of input parameters will be thoroughly checked on the
+C initial CALL for the problem, but not checked thereafter unless a
+C change in input parameters is flagged by ISTATE = 3 in the input.
+C
+C The descriptions of the CALL arguments are as follows.
+C
+C F    = The name of the user-supplied subroutine defining the
+C          ODE system.  The system must be put in the first-order
+C          form dy/dt = f(t,y), where f is a vector-valued function
+C          of the scalar t and the vector y.  Subroutine F is to
+C          compute the function f.  It is to have the form
+C               SUBROUTINE F (NEQ, T, Y, YDOT, RPAR, IPAR)
+C               KPP_REAL T, Y, YDOT, RPAR
+C               DIMENSION Y(NEQ), YDOT(NEQ)
+C          where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+C          is output.  Y and YDOT are arrays of length NEQ.
+C          (In the DIMENSION statement above, NEQ  can be replaced by
+C          *  to make  Y  and  YDOT  assumed size arrays.)
+C          Subroutine F should not alter Y(1),...,Y(NEQ).
+C          F must be declared EXTERNAL in the calling program.
+C
+C          Subroutine F may access user-defined real and integer
+C          work arrays RPAR and IPAR, which are to be dimensioned
+C          in the main program.
+C
+C          If quantities computed in the F routine are needed
+C          externally to DVODE, an extra CALL to F should be made
+C          for this purpose, for consistent and accurate results.
+C          If only the derivative dy/dt is needed, use DVINDY instead.
+C
+C NEQ    = The size of the ODE system (number of first order
+C          ordinary differential equations).  Used only for input.
+C          NEQ may not be increased during the problem, but
+C          can be decreased (with ISTATE = 3 in the input).
+C
+C Y      = A real array for the vector of dependent variables, of
+C          length NEQ or more.  Used for both input and output on the
+C          first CALL (ISTATE = 1), and only for output on other calls.
+C          On the first call, Y must contain the vector of initial
+C          values.  In the output, Y contains the computed solution
+C          evaluated at T.  If desired, the Y array may be used
+C          for other purposes between calls to the solver.
+C
+C          This array is passed as the Y argument in all calls to
+C          F and JAC.
+C
+C T      = The independent variable.  In the input, T is used only on
+C          the first call, as the initial point of the integration.
+C          In the output, after each call, T is the value at which a
+C          computed solution Y is evaluated (usually the same as TOUT).
+C          On an error return, T is the farthest point reached.
+C
+C TOUT   = The next value of t at which a computed solution is desired.
+C          Used only for input.
+C
+C          When starting the problem (ISTATE = 1), TOUT may be equal
+C          to T for one call, then should .ne. T for the next call.
+C          For the initial T, an input value of TOUT .ne. T is used
+C          in order to determine the direction of the integration
+C          (i.e. the algebraic sign of the step sizes) and the rough
+C          scale of the problem.  Integration in either direction
+C          (forward or backward in t) is permitted.
+C
+C          If ITASK = 2 or 5 (one-step modes), TOUT is ignored after
+C          the first CALL (i.e. the first CALL with TOUT .ne. T).
+C          Otherwise, TOUT is required on every call.
+C
+C          If ITASK = 1, 3, or 4, the values of TOUT need not be
+C          monotone, but a value of TOUT which backs up is limited
+C          to the current internal t interval, whose endpoints are
+C          TCUR - HU and TCUR.  (See optional output, below, for
+C          TCUR and HU.)
+C
+C ITOL   = An indicator for the type of error control.  See
+C          description below under AbsTol.  Used only for input.
+C
+C RelTol   = A relative error tolerance parameter, either a scalar or
+C          an array of length NEQ.  See description below under AbsTol.
+C          Input only.
+C
+C AbsTol   = An absolute error tolerance parameter, either a scalar or
+C          an array of length NEQ.  Input only.
+C
+C          The input parameters ITOL, RelTol, and AbsTol determine
+C          the error control performed by the solver.  The solver will
+C          control the vector e = (e(i)) of estimated local errors
+C          in Y, according to an inequality of the form
+C                      rms-norm of ( e(i)/EWT(i) )   .le.   1,
+C          where       EWT(i) = RelTol(i)*abs(Y(i)) + AbsTol(i),
+C          and the rms-norm (root-mean-square norm) here is
+C          rms-norm(v) = sqrt(sum v(i)**2 / NEQ).  Here EWT = (EWT(i))
+C          is a vector of weights which must always be positive, and
+C          the values of RelTol and AbsTol should all be non-negative.
+C          The following table gives the types (scalar/array) of
+C          RelTol and AbsTol, and the corresponding form of EWT(i).
+C
+C             ITOL    RelTol       AbsTol          EWT(i)
+C              1     scalar     scalar     RelTol*ABS(Y(i)) + AbsTol
+C              2     scalar     array      RelTol*ABS(Y(i)) + AbsTol(i)
+C              3     array      scalar     RelTol(i)*ABS(Y(i)) + AbsTol
+C              4     array      array      RelTol(i)*ABS(Y(i)) + AbsTol(i)
+C
+C          When either of these parameters is a scalar, it need not
+C          be dimensioned in the user's calling program.
+C
+C          If none of the above choices (with ITOL, RelTol, and AbsTol
+C          fixed throughout the problem) is suitable, more general
+C          error controls can be obtained by substituting
+C          user-supplied routines for the setting of EWT and/or for
+C          the norm calculation.  See Part iv below.
+C
+C          If global errors are to be estimated by making a repeated
+C          run on the same problem with smaller tolerances, then all
+C          components of RelTol and AbsTol (i.e. of EWT) should be scaled
+C          down uniformly.
+C
+C ITASK  = An index specifying the task to be performed.
+C          Input only.  ITASK has the following values and meanings.
+C          1  means normal computation of output values of y(t) at
+C             t = TOUT (by overshooting and interpolating).
+C          2  means take one step only and return.
+C          3  means stop at the first internal mesh point at or
+C             beyond t = TOUT and return.
+C          4  means normal computation of output values of y(t) at
+C             t = TOUT but without overshooting t = TCRIT.
+C             TCRIT must be input as RWORK(1).  TCRIT may be equal to
+C             or beyond TOUT, but not behind it in the direction of
+C             integration.  This option is useful if the problem
+C             has a singularity at or beyond t = TCRIT.
+C          5  means take one step, without passing TCRIT, and return.
+C             TCRIT must be input as RWORK(1).
+C
+C          Note..  If ITASK = 4 or 5 and the solver reaches TCRIT
+C          (within roundoff), it will return T = TCRIT (exactly) to
+C          indicate this (unless ITASK = 4 and TOUT comes before TCRIT,
+C          in which case answers at T = TOUT are returned first).
+C
+C ISTATE = an index used for input and output to specify the
+C          the state of the calculation.
+C
+C          In the input, the values of ISTATE are as follows.
+C          1  means this is the first CALL for the problem
+C             (initializations will be done).  See note below.
+C          2  means this is not the first call, and the calculation
+C             is to continue normally, with no change in any input
+C             parameters except possibly TOUT and ITASK.
+C             (If ITOL, RelTol, and/or AbsTol are changed between calls
+C             with ISTATE = 2, the new values will be used but not
+C             tested for legality.)
+C          3  means this is not the first call, and the
+C             calculation is to continue normally, but with
+C             a change in input parameters other than
+C             TOUT and ITASK.  Changes are allowed in
+C             NEQ, ITOL, RelTol, AbsTol, IOPT, LRW, LIW, MF, ML, MU,
+C             and any of the optional input except H0.
+C             (See IWORK description for ML and MU.)
+C          Note..  A preliminary CALL with TOUT = T is not counted
+C          as a first CALL here, as no initialization or checking of
+C          input is done.  (Such a CALL is sometimes useful to include
+C          the initial conditions in the output.)
+C          Thus the first CALL for which TOUT .ne. T requires
+C          ISTATE = 1 in the input.
+C
+C          In the output, ISTATE has the following values and meanings.
+C           1  means nothing was done, as TOUT was equal to T with
+C              ISTATE = 1 in the input.
+C           2  means the integration was performed successfully.
+C          -1  means an excessive amount of work (more than MXSTEP
+C              steps) was done on this call, before completing the
+C              requested task, but the integration was otherwise
+C              successful as far as T.  (MXSTEP is an optional input
+C              and is normally 500.)  To continue, the user may
+C              simply reset ISTATE to a value .gt. 1 and CALL again.
+C              (The excess work step counter will be reset to 0.)
+C              In addition, the user may increase MXSTEP to avoid
+C              this error return.  (See optional input below.)
+C          -2  means too much accuracy was requested for the precision
+C              of the machine being used.  This was detected before
+C              completing the requested task, but the integration
+C              was successful as far as T.  To continue, the tolerance
+C              parameters must be reset, and ISTATE must be set
+C              to 3.  The optional output TOLSF may be used for this
+C              purpose.  (Note.. If this condition is detected before
+C              taking any steps, then an illegal input return
+C              (ISTATE = -3) occurs instead.)
+C          -3  means illegal input was detected, before taking any
+C              integration steps.  See written message for details.
+C              Note..  If the solver detects an infinite loop of calls
+C              to the solver with illegal input, it will cause
+C              the run to stop.
+C          -4  means there were repeated error test failures on
+C              one attempted step, before completing the requested
+C              task, but the integration was successful as far as T.
+C              The problem may have a singularity, or the input
+C              may be inappropriate.
+C          -5  means there were repeated convergence test failures on
+C              one attempted step, before completing the requested
+C              task, but the integration was successful as far as T.
+C              This may be caused by an inaccurate Jacobian matrix,
+C              if one is being used.
+C          -6  means EWT(i) became zero for some i during the
+C              integration.  Pure relative error control (AbsTol(i)=0.0)
+C              was requested on a variable which has now vanished.
+C              The integration was successful as far as T.
+C
+C          Note..  Since the normal output value of ISTATE is 2,
+C          it does not need to be reset for normal continuation.
+C          Also, since a negative input value of ISTATE will be
+C          regarded as illegal, a negative output value requires the
+C          user to change it, and possibly other input, before
+C          calling the solver again.
+C
+C IOPT   = An integer flag to specify whether or not any optional
+C          input is being used on this call.  Input only.
+C          The optional input is listed separately below.
+C          IOPT = 0 means no optional input is being used.
+C                   Default values will be used in all cases.
+C          IOPT = 1 means optional input is being used.
+C
+C RWORK  = A real working array (KPP_REAL).
+C          The length of RWORK must be at least
+C             20 + NYH*(MAXORD + 1) + 3*NEQ + LWM    where
+C          NYH    = the initial value of NEQ,
+C          MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a
+C                   smaller value is given as an optional input),
+C          LWM = length of work space for matrix-related data..
+C          LWM = 0             if MITER = 0,
+C          LWM = 2*NEQ**2 + 2  if MITER = 1 or 2, and MF.gt.0,
+C          LWM = NEQ**2 + 2    if MITER = 1 or 2, and MF.lt.0,
+C          LWM = NEQ + 2       if MITER = 3,
+C          LWM = (3*ML+2*MU+2)*NEQ + 2 if MITER = 4 or 5, and MF.gt.0,
+C          LWM = (2*ML+MU+1)*NEQ + 2   if MITER = 4 or 5, and MF.lt.0.
+C          (See the MF description for METH and MITER.)
+C          Thus if MAXORD has its default value and NEQ is constant,
+C          this length is..
+C             20 + 16*NEQ                    for MF = 10,
+C             22 + 16*NEQ + 2*NEQ**2         for MF = 11 or 12,
+C             22 + 16*NEQ + NEQ**2           for MF = -11 or -12,
+C             22 + 17*NEQ                    for MF = 13,
+C             22 + 18*NEQ + (3*ML+2*MU)*NEQ  for MF = 14 or 15,
+C             22 + 17*NEQ + (2*ML+MU)*NEQ    for MF = -14 or -15,
+C             20 +  9*NEQ                    for MF = 20,
+C             22 +  9*NEQ + 2*NEQ**2         for MF = 21 or 22,
+C             22 +  9*NEQ + NEQ**2           for MF = -21 or -22,
+C             22 + 10*NEQ                    for MF = 23,
+C             22 + 11*NEQ + (3*ML+2*MU)*NEQ  for MF = 24 or 25.
+C             22 + 10*NEQ + (2*ML+MU)*NEQ    for MF = -24 or -25.
+C          The first 20 words of RWORK are reserved for conditional
+C          and optional input and optional output.
+C
+C          The following word in RWORK is a conditional input..
+C            RWORK(1) = TCRIT = critical value of t which the solver
+C                       is not to overshoot.  Required if ITASK is
+C                       4 or 5, and ignored otherwise.  (See ITASK.)
+C
+C LRW    = The length of the array RWORK, as declared by the user.
+C          (This will be checked by the solver.)
+C
+C IWORK  = An integer work array.  The length of IWORK must be at least
+C             30        if MITER = 0 or 3 (MF = 10, 13, 20, 23), or
+C             30 + NEQ  otherwise (abs(MF) = 11,12,14,15,21,22,24,25).
+C          The first 30 words of IWORK are reserved for conditional and
+C          optional input and optional output.
+C
+C          The following 2 words in IWORK are conditional input..
+C            IWORK(1) = ML     These are the lower and upper
+C            IWORK(2) = MU     half-bandwidths, respectively, of the
+C                       banded Jacobian, excluding the main diagonal.
+C                       The band is defined by the matrix locations
+C                       (i,j) with i-ML .le. j .le. i+MU.  ML and MU
+C                       must satisfy  0 .le.  ML,MU  .le. NEQ-1.
+C                       These are required if MITER is 4 or 5, and
+C                       ignored otherwise.  ML and MU may in fact be
+C                       the band parameters for a matrix to which
+C                       df/dy is only approximately equal.
+C
+C LIW    = the length of the array IWORK, as declared by the user.
+C          (This will be checked by the solver.)
+C
+C Note..  The work arrays must not be altered between calls to DVODE
+C for the same problem, except possibly for the conditional and
+C optional input, and except for the last 3*NEQ words of RWORK.
+C The latter space is used for internal scratch space, and so is
+C available for use by the user outside DVODE between calls, if
+C desired (but not for use by F or JAC).
+C
+C JAC    = The name of the user-supplied routine (MITER = 1 or 4) to
+C          compute the Jacobian matrix, df/dy, as a function of
+C          the scalar t and the vector y.  It is to have the form
+C               SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD,
+C                               RPAR, IPAR)
+C               KPP_REAL T, Y, PD, RPAR
+C               DIMENSION Y(NEQ), PD(NROWPD, NEQ)
+C          where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+C          PD is to be loaded with partial derivatives (elements of the
+C          Jacobian matrix) in the output.  PD must be given a first
+C          dimension of NROWPD.  T and Y have the same meaning as in
+C          Subroutine F.  (In the DIMENSION statement above, NEQ can
+C          be replaced by  *  to make Y and PD assumed size arrays.)
+C               In the full matrix case (MITER = 1), ML and MU are
+C          ignored, and the Jacobian is to be loaded into PD in
+C          columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+C               In the band matrix case (MITER = 4), the elements
+C          within the band are to be loaded into PD in columnwise
+C          manner, with diagonal lines of df/dy loaded into the rows
+C          of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+C          ML and MU are the half-bandwidth parameters. (See IWORK).
+C          The locations in PD in the two triangular areas which
+C          correspond to nonexistent matrix elements can be ignored
+C          or loaded arbitrarily, as they are overwritten by DVODE.
+C               JAC need not provide df/dy exactly.  A crude
+C          approximation (possibly with a smaller bandwidth) will do.
+C               In either case, PD is preset to zero by the solver,
+C          so that only the nonzero elements need be loaded by JAC.
+C          Each CALL to JAC is preceded by a CALL to F with the same
+C          arguments NEQ, T, and Y.  Thus to gain some efficiency,
+C          intermediate quantities shared by both calculations may be
+C          saved in a user COMMON block by F and not recomputed by JAC,
+C          if desired.  Also, JAC may alter the Y array, if desired.
+C          JAC must be declared external in the calling program.
+C               Subroutine JAC may access user-defined real and integer
+C          work arrays, RPAR and IPAR, whose dimensions are set by the
+C          user in the main program.
+C
+C MF     = The method flag.  Used only for input.  The legal values of
+C          MF are 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25,
+C          -11, -12, -14, -15, -21, -22, -24, -25.
+C          MF is a signed two-digit integer, MF = JSV*(10*METH + MITER).
+C          JSV = SIGN(MF) indicates the Jacobian-saving strategy..
+C            JSV =  1 means a copy of the Jacobian is saved for reuse
+C                     in the corrector iteration algorithm.
+C            JSV = -1 means a copy of the Jacobian is not saved
+C                     (valid only for MITER = 1, 2, 4, or 5).
+C          METH indicates the basic linear multistep method..
+C            METH = 1 means the implicit Adams method.
+C            METH = 2 means the method based on backward
+C                     differentiation formulas (BDF-s).
+C          MITER indicates the corrector iteration method..
+C            MITER = 0 means functional iteration (no Jacobian matrix
+C                      is involved).
+C            MITER = 1 means chord iteration with a user-supplied
+C                      full (NEQ by NEQ) Jacobian.
+C            MITER = 2 means chord iteration with an internally
+C                      generated (difference quotient) full Jacobian
+C                      (using NEQ extra calls to F per df/dy value).
+C            MITER = 3 means chord iteration with an internally
+C                      generated diagonal Jacobian approximation
+C                      (using 1 extra CALL to F per df/dy evaluation).
+C            MITER = 4 means chord iteration with a user-supplied
+C                      banded Jacobian.
+C            MITER = 5 means chord iteration with an internally
+C                      generated banded Jacobian (using ML+MU+1 extra
+C                      calls to F per df/dy evaluation).
+C          If MITER = 1 or 4, the user must supply a subroutine JAC
+C          (the name is arbitrary) as described above under JAC.
+C          For other values of MITER, a dummy argument can be used.
+C
+C RPAR     User-specified array used to communicate real parameters
+C          to user-supplied subroutines.  If RPAR is a vector, then
+C          it must be dimensioned in the user's main program.  If it
+C          is unused or it is a scalar, then it need not be
+C          dimensioned.
+C
+C IPAR     User-specified array used to communicate integer parameter
+C          to user-supplied subroutines.  The comments on dimensioning
+C          RPAR apply to IPAR.
+C-----------------------------------------------------------------------
+C Optional Input.
+C
+C The following is a list of the optional input provided for in the
+C CALL sequence.  (See also Part ii.)  For each such input variable,
+C this table lists its name as used in this documentation, its
+C location in the CALL sequence, its meaning, and the default value.
+C The use of any of this input requires IOPT = 1, and in that
+C case all of this input is examined.  A value of zero for any
+C of these optional input variables will cause the default value to be
+C used.  Thus to use a subset of the optional input, simply preload
+C locations 5 to 10 in RWORK and IWORK to 0.0 and 0 respectively, and
+C then set those of interest to nonzero values.
+C
+C NAME    LOCATION      MEANING AND DEFAULT VALUE
+C
+C H0      RWORK(5)  The step size to be attempted on the first step.
+C                   The default value is determined by the solver.
+C
+C HMAX    RWORK(6)  The maximum absolute step size allowed.
+C                   The default value is infinite.
+C
+C HMIN    RWORK(7)  The minimum absolute step size allowed.
+C                   The default value is 0.  (This lower bound is not
+C                   enforced on the final step before reaching TCRIT
+C                   when ITASK = 4 or 5.)
+C
+C MAXORD  IWORK(5)  The maximum order to be allowed.  The default
+C                   value is 12 if METH = 1, and 5 if METH = 2.
+C                   If MAXORD exceeds the default value, it will
+C                   be reduced to the default value.
+C                   If MAXORD is changed during the problem, it may
+C                   cause the current order to be reduced.
+C
+C MXSTEP  IWORK(6)  Maximum number of (internally defined) steps
+C                   allowed during one CALL to the solver.
+C                   The default value is 500.
+C
+C MXHNIL  IWORK(7)  Maximum number of messages printed (per problem)
+C                   warning that T + H = T on a step (H = step size).
+C                   This must be positive to result in a non-default
+C                   value.  The default value is 10.
+C
+C-----------------------------------------------------------------------
+C Optional Output.
+C
+C As optional additional output from DVODE, the variables listed
+C below are quantities related to the performance of DVODE
+C which are available to the user.  These are communicated by way of
+C the work arrays, but also have internal mnemonic names as shown.
+C Except where stated otherwise, all of this output is defined
+C on any successful return from DVODE, and on any return with
+C ISTATE = -1, -2, -4, -5, or -6.  On an illegal input return
+C (ISTATE = -3), they will be unchanged from their existing values
+C (if any), except possibly for TOLSF, LENRW, and LENIW.
+C On any error return, output relevant to the error will be defined,
+C as noted below.
+C
+C NAME    LOCATION      MEANING
+C
+C HU      RWORK(11) The step size in t last used (successfully).
+C
+C HCUR    RWORK(12) The step size to be attempted on the next step.
+C
+C TCUR    RWORK(13) The current value of the independent variable
+C                   which the solver has actually reached, i.e. the
+C                   current internal mesh point in t.  In the output,
+C                   TCUR will always be at least as far from the
+C                   initial value of t as the current argument T,
+C                   but may be farther (if interpolation was done).
+C
+C TOLSF   RWORK(14) A tolerance scale factor, greater than 1.0,
+C                   computed when a request for too much accuracy was
+C                   detected (ISTATE = -3 if detected at the start of
+C                   the problem, ISTATE = -2 otherwise).  If ITOL is
+C                   left unaltered but RelTol and AbsTol are uniformly
+C                   scaled up by a factor of TOLSF for the next call,
+C                   then the solver is deemed likely to succeed.
+C                   (The user may also ignore TOLSF and alter the
+C                   tolerance parameters in any other way appropriate.)
+C
+C NST     IWORK(11) The number of steps taken for the problem so far.
+C
+C NFE     IWORK(12) The number of f evaluations for the problem so far.
+C
+C NJE     IWORK(13) The number of Jacobian evaluations so far.
+C
+C NQU     IWORK(14) The method order last used (successfully).
+C
+C NQCUR   IWORK(15) The order to be attempted on the next step.
+C
+C IMXER   IWORK(16) The index of the component of largest magnitude in
+C                   the weighted local error vector ( e(i)/EWT(i) ),
+C                   on an error return with ISTATE = -4 or -5.
+C
+C LENRW   IWORK(17) The length of RWORK actually required.
+C                   This is defined on normal returns and on an illegal
+C                   input return for insufficient storage.
+C
+C LENIW   IWORK(18) The length of IWORK actually required.
+C                   This is defined on normal returns and on an illegal
+C                   input return for insufficient storage.
+C
+C NLU     IWORK(19) The number of matrix LU decompositions so far.
+C
+C NNI     IWORK(20) The number of nonlinear (Newton) iterations so far.
+C
+C NCFN    IWORK(21) The number of convergence failures of the nonlinear
+C                   solver so far.
+C
+C NETF    IWORK(22) The number of error test failures of the integrator
+C                   so far.
+C
+C The following two arrays are segments of the RWORK array which
+C may also be of interest to the user as optional output.
+C For each array, the table below gives its internal name,
+C its base address in RWORK, and its description.
+C
+C NAME    BASE ADDRESS      DESCRIPTION
+C
+C YH      21             The Nordsieck history array, of size NYH by
+C                        (NQCUR + 1), where NYH is the initial value
+C                        of NEQ.  For j = 0,1,...,NQCUR, column j+1
+C                        of YH contains HCUR**j/factorial(j) times
+C                        the j-th derivative of the interpolating
+C                        polynomial currently representing the
+C                        solution, evaluated at t = TCUR.
+C
+C ACOR     LENRW-NEQ+1   Array of size NEQ used for the accumulated
+C                        corrections on each step, scaled in the output
+C                        to represent the estimated local error in Y
+C                        on the last step.  This is the vector e in
+C                        the description of the error control.  It is
+C                        defined only on a successful return from DVODE.
+C
+C-----------------------------------------------------------------------
+C Interrupting and Restarting
+C
+C If the integration of a given problem by DVODE is to be
+C interrupted and then later continued, such as when restarting
+C an interrupted run or alternating between two or more ODE problems,
+C the user should save, following the return from the last DVODE call
+C prior to the interruption, the contents of the CALL sequence
+C variables and internal COMMON blocks, and later restore these
+C values before the next DVODE CALL for that problem.  To save
+C and restore the COMMON blocks, use subroutine DVSRCO, as
+C described below in part ii.
+C
+C In addition, if non-default values for either LUN or MFLAG are
+C desired, an extra CALL to XSETUN and/or XSETF should be made just
+C before continuing the integration.  See Part ii below for details.
+C
+C-----------------------------------------------------------------------
+C Part ii.  Other Routines Callable.
+C
+C The following are optional calls which the user may make to
+C gain additional capabilities in conjunction with DVODE.
+C (The routines XSETUN and XSETF are designed to conform to the
+C SLATEC error handling package.)
+C
+C     FORM OF CALL                  FUNCTION
+C  CALL XSETUN(LUN)           Set the logical unit number, LUN, for
+C                             output of messages from DVODE, if
+C                             the default is not desired.
+C                             The default value of LUN is 6.
+C
+C  CALL XSETF(MFLAG)          Set a flag to control the printing of
+C                             messages by DVODE.
+C                             MFLAG = 0 means do not print. (Danger..
+C                             This risks losing valuable information.)
+C                             MFLAG = 1 means print (the default).
+C
+C                             Either of the above calls may be made at
+C                             any time and will take effect immediately.
+C
+C  CALL DVSRCO(RSAV,ISAV,JOB) Saves and restores the contents of
+C                             the internal COMMON blocks used by
+C                             DVODE. (See Part iii below.)
+C                             RSAV must be a real array of length 49
+C                             or more, and ISAV must be an integer
+C                             array of length 40 or more.
+C                             JOB=1 means save COMMON into RSAV/ISAV.
+C                             JOB=2 means restore COMMON from RSAV/ISAV.
+C                                DVSRCO is useful if one is
+C                             interrupting a run and restarting
+C                             later, or alternating between two or
+C                             more problems solved with DVODE.
+C
+C  CALL DVINDY(,,,,,)         Provide derivatives of y, of various
+C        (See below.)         orders, at a specified point T, if
+C                             desired.  It may be called only after
+C                             a successful return from DVODE.
+C
+C The detailed instructions for using DVINDY are as follows.
+C The form of the CALL is..
+C
+C  CALL DVINDY (T, K, RWORK(21), NYH, DKY, IFLAG)
+C
+C The input parameters are..
+C
+C T         = Value of independent variable where answers are desired
+C             (normally the same as the T last returned by DVODE).
+C             For valid results, T must lie between TCUR - HU and TCUR.
+C             (See optional output for TCUR and HU.)
+C K         = Integer order of the derivative desired.  K must satisfy
+C             0 .le. K .le. NQCUR, where NQCUR is the current order
+C             (see optional output).  The capability corresponding
+C             to K = 0, i.e. computing y(T), is already provided
+C             by DVODE directly.  Since NQCUR .ge. 1, the first
+C             derivative dy/dt is always available with DVINDY.
+C RWORK(21) = The base address of the history array YH.
+C NYH       = Column length of YH, equal to the initial value of NEQ.
+C
+C The output parameters are..
+C
+C DKY       = A real array of length NEQ containing the computed value
+C             of the K-th derivative of y(t).
+C IFLAG     = Integer flag, returned as 0 if K and T were legal,
+C             -1 if K was illegal, and -2 if T was illegal.
+C             On an error return, a message is also written.
+C-----------------------------------------------------------------------
+C Part iii.  COMMON Blocks.
+C If DVODE is to be used in an overlay situation, the user
+C must declare, in the primary overlay, the variables in..
+C   (1) the CALL sequence to DVODE,
+C   (2) the two internal COMMON blocks
+C         /DVOD01/  of length  81  (48 KPP_REAL words
+C                         followed by 33 integer words),
+C         /DVOD02/  of length  9  (1 KPP_REAL word
+C                         followed by 8 integer words),
+C
+C If DVODE is used on a system in which the contents of internal
+C COMMON blocks are not preserved between calls, the user should
+C declare the above two COMMON blocks in his main program to insure
+C that their contents are preserved.
+C
+C-----------------------------------------------------------------------
+C Part iv.  Optionally Replaceable Solver Routines.
+C
+C Below are descriptions of two routines in the DVODE package which
+C relate to the measurement of errors.  Either routine can be
+C replaced by a user-supplied version, if desired.  However, since such
+C a replacement may have a major impact on performance, it should be
+C done only when absolutely necessary, and only with great caution.
+C (Note.. The means by which the package version of a routine is
+C superseded by the user's version may be system-dependent.)
+C
+C (a) DEWSET.
+C The following subroutine is called just before each internal
+C integration step, and sets the array of error weights, EWT, as
+C described under ITOL/RelTol/AbsTol above..
+C     SUBROUTINE DEWSET (NEQ, ITOL, RelTol, AbsTol, YCUR, EWT)
+C where NEQ, ITOL, RelTol, and AbsTol are as in the DVODE CALL sequence,
+C YCUR contains the current dependent variable vector, and
+C EWT is the array of weights set by DEWSET.
+C
+C If the user supplies this subroutine, it must return in EWT(i)
+C (i = 1,...,NEQ) a positive quantity suitable for comparison with
+C errors in Y(i).  The EWT array returned by DEWSET is passed to the
+C DVNORM routine (See below.), and also used by DVODE in the computation
+C of the optional output IMXER, the diagonal Jacobian approximation,
+C and the increments for difference quotient Jacobians.
+C
+C In the user-supplied version of DEWSET, it may be desirable to use
+C the current values of derivatives of y.  Derivatives up to order NQ
+C are available from the history array YH, described above under
+C Optional Output.  In DEWSET, YH is identical to the YCUR array,
+C extended to NQ + 1 columns with a column length of NYH and scale
+C factors of h**j/factorial(j).  On the first CALL for the problem,
+C given by NST = 0, NQ is 1 and H is temporarily set to 1.0.
+C NYH is the initial value of NEQ.  The quantities NQ, H, and NST
+C can be obtained by including in DEWSET the statements..
+C     KPP_REAL RVOD, H, HU
+C     COMMON /DVOD01/ RVOD(48), IVOD(33)
+C     COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C     NQ = IVOD(28)
+C     H = RVOD(21)
+C Thus, for example, the current value of dy/dt can be obtained as
+C YCUR(NYH+i)/H  (i=1,...,NEQ)  (and the division by H is
+C unnecessary when NST = 0).
+C
+C (b) DVNORM.
+C The following is a real function routine which computes the weighted
+C root-mean-square norm of a vector v..
+C     D = DVNORM (N, V, W)
+C where..
+C   N = the length of the vector,
+C   V = real array of length N containing the vector,
+C   W = real array of length N containing weights,
+C   D = sqrt( (1/N) * sum(V(i)*W(i))**2 ).
+C DVNORM is called with N = NEQ and with W(i) = 1.0/EWT(i), where
+C EWT is as set by subroutine DEWSET.
+C
+C If the user supplies this function, it should return a non-negative
+C value of DVNORM suitable for use in the error control in DVODE.
+C None of the arguments should be altered by DVNORM.
+C For example, a user-supplied DVNORM routine might..
+C   -substitute a max-norm of (V(i)*W(i)) for the rms-norm, or
+C   -ignore some components of V in the norm, with the effect of
+C    suppressing the error control on those components of Y.
+C-----------------------------------------------------------------------
+C Other Routines in the DVODE Package.
+C
+C In addition to subroutine DVODE, the DVODE package includes the
+C following subroutines and function routines..
+C  DVHIN     computes an approximate step size for the initial step.
+C  DVINDY    computes an interpolated value of the y vector at t = TOUT.
+C  DVSTEP    is the core integrator, which does one step of the
+C            integration and the associated error control.
+C  DVSET     sets all method coefficients and test constants.
+C  DVNLSD    solves the underlying nonlinear system -- the corrector.
+C  DVJAC     computes and preprocesses the Jacobian matrix J = df/dy
+C            and the Newton iteration matrix P = I - (h/l1)*J.
+C  DVSOL     manages solution of linear system in chord iteration.
+C  DVJUST    adjusts the history array on a change of order.
+C  DEWSET    sets the error weight vector EWT before each step.
+C  DVNORM    computes the weighted r.m.s. norm of a vector.
+C  DVSRCO    is a user-callable routines to save and restore
+C            the contents of the internal COMMON blocks.
+C  DACOPY    is a routine to copy one two-dimensional array to another.
+C  DGEFA and DGESL   are routines from LINPACK for solving full
+C            systems of linear algebraic equations.
+C  DGBFA and DGBSL   are routines from LINPACK for solving banded
+C            linear systems.
+C  DAXPY, DSCAL, and DCOPY are basic linear algebra modules (BLAS).
+C  D1MACH    sets the unit roundoff of the machine.
+C  XERRWD, XSETUN, XSETF, LUNSAV, and MFLGSV handle the printing of all
+C            error messages and warnings.  XERRWD is machine-dependent.
+C Note..  DVNORM, D1MACH, LUNSAV, and MFLGSV are function routines.
+C All the others are subroutines.
+C
+C The intrinsic and external routines used by the DVODE package are..
+C ABS, MAX, MIN, REAL, SIGN, SQRT, and WRITE.
+C
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      EXTERNAL DVNLSD, F, JAC
+      LOGICAL IHIT
+      KPP_REAL AbsTolI, BIG, EWTI, FOUR, H0, HMAX, HMX, HUN, ONE,
+     1   PT2, RH, RelTolI, SIZE, TCRIT, TNEXT, TOLSF, TP, TWO, ZERO
+      INTEGER I, IER, IFLAG, IMXER, JCO, KGO, LENIW, LENJ, LENP, LENRW,
+     1   LENWM, LF0, MBAND, ML, MORD, MU, MXHNL0, MXSTP0, NITER, NSLAST
+      CHARACTER*80 MSG
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL D1MACH, DVNORM
+C
+      DIMENSION MORD(2)
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to DVODE.
+C-----------------------------------------------------------------------
+      SAVE MORD, MXHNL0, MXSTP0
+      SAVE ZERO, ONE, TWO, FOUR, PT2, HUN
+C-----------------------------------------------------------------------
+C The following internal COMMON blocks contain variables which are
+C communicated between subroutines in the DVODE package, or which are
+C to be saved between calls to DVODE.
+C In each block, real variables precede integers.
+C The block /DVOD01/ appears in subroutines DVODE, DVINDY, DVSTEP,
+C DVSET, DVNLSD, DVJAC, DVSOL, DVJUST and DVSRCO.
+C The block /DVOD02/ appears in subroutines DVODE, DVINDY, DVSTEP,
+C DVNLSD, DVJAC, and DVSRCO.
+C
+C The variables stored in the internal COMMON blocks are as follows..
+C
+C ACNRM  = Weighted r.m.s. norm of accumulated correction vectors.
+C CCMXJ  = Threshhold on DRC for updating the Jacobian. (See DRC.)
+C CONP   = The saved value of TQ(5).
+C CRATE  = Estimated corrector convergence rate constant.
+C DRC    = Relative change in H*RL1 since last DVJAC call.
+C EL     = Real array of integration coefficients.  See DVSET.
+C ETA    = Saved tentative ratio of new to old H.
+C ETAMAX = Saved maximum value of ETA to be allowed.
+C H      = The step size.
+C HMIN   = The minimum absolute value of the step size H to be used.
+C HMXI   = Inverse of the maximum absolute value of H to be used.
+C          HMXI = 0.0 is allowed and corresponds to an infinite HMAX.
+C HNEW   = The step size to be attempted on the next step.
+C HSCAL  = Stepsize in scaling of YH array.
+C PRL1   = The saved value of RL1.
+C RC     = Ratio of current H*RL1 to value on last DVJAC call.
+C RL1    = The reciprocal of the coefficient EL(1).
+C TAU    = Real vector of past NQ step sizes, length 13.
+C TQ     = A real vector of length 5 in which DVSET stores constants
+C          used for the convergence test, the error test, and the
+C          selection of H at a new order.
+C TN     = The independent variable, updated on each step taken.
+C UROUND = The machine unit roundoff.  The smallest positive real number
+C          such that  1.0 + UROUND .ne. 1.0
+C ICF    = Integer flag for convergence failure in DVNLSD..
+C            0 means no failures.
+C            1 means convergence failure with out of date Jacobian
+C                   (recoverable error).
+C            2 means convergence failure with current Jacobian or
+C                   singular matrix (unrecoverable error).
+C INIT   = Saved integer flag indicating whether initialization of the
+C          problem has been done (INIT = 1) or not.
+C IPUP   = Saved flag to signal updating of Newton matrix.
+C JCUR   = Output flag from DVJAC showing Jacobian status..
+C            JCUR = 0 means J is not current.
+C            JCUR = 1 means J is current.
+C JSTART = Integer flag used as input to DVSTEP..
+C            0  means perform the first step.
+C            1  means take a new step continuing from the last.
+C            -1 means take the next step with a new value of MAXORD,
+C                  HMIN, HMXI, N, METH, MITER, and/or matrix parameters.
+C          On return, DVSTEP sets JSTART = 1.
+C JSV    = Integer flag for Jacobian saving, = sign(MF).
+C KFLAG  = A completion code from DVSTEP with the following meanings..
+C               0      the step was succesful.
+C              -1      the requested error could not be achieved.
+C              -2      corrector convergence could not be achieved.
+C              -3, -4  fatal error in VNLS (can not occur here).
+C KUTH   = Input flag to DVSTEP showing whether H was reduced by the
+C          driver.  KUTH = 1 if H was reduced, = 0 otherwise.
+C L      = Integer variable, NQ + 1, current order plus one.
+C LMAX   = MAXORD + 1 (used for dimensioning).
+C LOCJS  = A pointer to the saved Jacobian, whose storage starts at
+C          WM(LOCJS), if JSV = 1.
+C LYH, LEWT, LACOR, LSAVF, LWM, LIWM = Saved integer pointers
+C          to segments of RWORK and IWORK.
+C MAXORD = The maximum order of integration method to be allowed.
+C METH/MITER = The method flags.  See MF.
+C MSBJ   = The maximum number of steps between J evaluations, = 50.
+C MXHNIL = Saved value of optional input MXHNIL.
+C MXSTEP = Saved value of optional input MXSTEP.
+C N      = The number of first-order ODEs, = NEQ.
+C NEWH   = Saved integer to flag change of H.
+C NEWQ   = The method order to be used on the next step.
+C NHNIL  = Saved counter for occurrences of T + H = T.
+C NQ     = Integer variable, the current integration method order.
+C NQNYH  = Saved value of NQ*NYH.
+C NQWAIT = A counter controlling the frequency of order changes.
+C          An order change is about to be considered if NQWAIT = 1.
+C NSLJ   = The number of steps taken as of the last Jacobian update.
+C NSLP   = Saved value of NST as of last Newton matrix update.
+C NYH    = Saved value of the initial value of NEQ.
+C HU     = The step size in t last used.
+C NCFN   = Number of nonlinear convergence failures so far.
+C NETF   = The number of error test failures of the integrator so far.
+C NFE    = The number of f evaluations for the problem so far.
+C NJE    = The number of Jacobian evaluations so far.
+C NLU    = The number of matrix LU decompositions so far.
+C NNI    = Number of nonlinear iterations so far.
+C NQU    = The method order last used.
+C NST    = The number of steps taken for the problem so far.
+C-----------------------------------------------------------------------
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+
+      DATA  MORD(1) /12/, MORD(2) /5/, MXSTP0 /500/, MXHNL0 /10/
+      DATA ZERO /0.0D0/, ONE /1.0D0/, TWO /2.0D0/, FOUR /4.0D0/,
+     1     PT2 /0.2D0/, HUN /100.0D0/
+C-----------------------------------------------------------------------
+C Block A.
+C This code block is executed on every call.
+C It tests ISTATE and ITASK for legality and branches appropriately.
+C If ISTATE .gt. 1 but the flag INIT shows that initialization has
+C not yet been done, an error return occurs.
+C If ISTATE = 1 and TOUT = T, return immediately.
+C-----------------------------------------------------------------------
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602
+      IF (ISTATE .EQ. 1) GO TO 10
+      IF (INIT .NE. 1) GO TO 603
+      IF (ISTATE .EQ. 2) GO TO 200
+      GO TO 20
+ 10   INIT = 0
+      IF (TOUT .EQ. T) RETURN
+C-----------------------------------------------------------------------
+C Block B.
+C The next code block is executed for the initial CALL (ISTATE = 1),
+C or for a continuation CALL with parameter changes (ISTATE = 3).
+C It contains checking of all input and various initializations.
+C
+C First check legality of the non-optional input NEQ, ITOL, IOPT,
+C MF, ML, and MU.
+C-----------------------------------------------------------------------
+ 20   IF (NEQ .LE. 0) GO TO 604
+      IF (ISTATE .EQ. 1) GO TO 25
+      IF (NEQ .GT. N) GO TO 605
+ 25   N = NEQ
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606
+      IF (IOPT .LT. 0 .OR. IOPT .GT. 1) GO TO 607
+      JSV = SIGN(1,MF)
+      MF = ABS(MF)
+      METH = MF/10
+      MITER = MF - 10*METH
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608
+      IF (MITER .LE. 3) GO TO 30
+      ML = IWORK(1)
+      MU = IWORK(2)
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610
+ 30   CONTINUE
+C Next process and check the optional input. ---------------------------
+      IF (IOPT .EQ. 1) GO TO 40
+      MAXORD = MORD(METH)
+      MXSTEP = MXSTP0
+      MXHNIL = MXHNL0
+      IF (ISTATE .EQ. 1) H0 = ZERO
+      HMXI = ZERO
+      HMIN = ZERO
+      GO TO 60
+ 40   MAXORD = IWORK(5)
+      IF (MAXORD .LT. 0) GO TO 611
+      IF (MAXORD .EQ. 0) MAXORD = 100
+      MAXORD = MIN(MAXORD,MORD(METH))
+      MXSTEP = IWORK(6)
+      IF (MXSTEP .LT. 0) GO TO 612
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0
+      MXHNIL = IWORK(7)
+      IF (MXHNIL .LT. 0) GO TO 613
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0
+      IF (ISTATE .NE. 1) GO TO 50
+      H0 = RWORK(5)
+      IF ((TOUT - T)*H0 .LT. ZERO) GO TO 614
+ 50   HMAX = RWORK(6)
+      IF (HMAX .LT. ZERO) GO TO 615
+      HMXI = ZERO
+      IF (HMAX .GT. ZERO) HMXI = ONE/HMAX
+      HMIN = RWORK(7)
+      IF (HMIN .LT. ZERO) GO TO 616
+C-----------------------------------------------------------------------
+C Set work array pointers and check lengths LRW and LIW.
+C Pointers to segments of RWORK and IWORK are named by prefixing L to
+C the name of the segment.  E.g., the segment YH starts at RWORK(LYH).
+C Segments of RWORK (in order) are denoted  YH, WM, EWT, SAVF, ACOR.
+C Within WM, LOCJS is the location of the saved Jacobian (JSV .gt. 0).
+C-----------------------------------------------------------------------
+ 60   LYH = 21
+      IF (ISTATE .EQ. 1) NYH = N
+      LWM = LYH + (MAXORD + 1)*NYH
+      JCO = MAX(0,JSV)
+      IF (MITER .EQ. 0) LENWM = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) THEN
+        LENWM = 2 + (1 + JCO)*N*N
+        LOCJS = N*N + 3
+      ENDIF
+      IF (MITER .EQ. 3) LENWM = 2 + N
+      IF (MITER .EQ. 4 .OR. MITER .EQ. 5) THEN
+        MBAND = ML + MU + 1
+        LENP = (MBAND + ML)*N
+        LENJ = MBAND*N
+        LENWM = 2 + LENP + JCO*LENJ
+        LOCJS = LENP + 3
+        ENDIF
+      LEWT = LWM + LENWM
+      LSAVF = LEWT + N
+      LACOR = LSAVF + N
+      LENRW = LACOR + N - 1
+      IWORK(17) = LENRW
+      LIWM = 1
+      LENIW = 30 + N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 30
+      IWORK(18) = LENIW
+      IF (LENRW .GT. LRW) GO TO 617
+      IF (LENIW .GT. LIW) GO TO 618
+C Check RelTol and AbsTol for legality. ------------------------------------
+      RelTolI = RelTol(1)
+      AbsTolI = AbsTol(1)
+      DO 70 I = 1,N
+        IF (ITOL .GE. 3) RelTolI = RelTol(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I)
+        IF (RelTolI .LT. ZERO) GO TO 619
+        IF (AbsTolI .LT. ZERO) GO TO 620
+ 70     CONTINUE
+      IF (ISTATE .EQ. 1) GO TO 100
+C If ISTATE = 3, set flag to signal parameter changes to DVSTEP. -------
+      JSTART = -1
+      IF (NQ .LE. MAXORD) GO TO 90
+C MAXORD was reduced below NQ.  Copy YH(*,MAXORD+2) into SAVF. ---------
+      CALL DCOPY (N, RWORK(LWM), 1, RWORK(LSAVF), 1)
+C Reload WM(1) = RWORK(LWM), since LWM may have changed. ---------------
+ 90   IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+C-----------------------------------------------------------------------
+C Block C.
+C The next block is for the initial CALL only (ISTATE = 1).
+C It contains all remaining initializations, the initial CALL to F,
+C and the calculation of the initial step size.
+C The error weights in EWT are inverted after being loaded.
+C-----------------------------------------------------------------------
+ 100  UROUND = D1MACH(4)
+      TN = T
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 110
+      TCRIT = RWORK(1)
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. ZERO) GO TO 625
+      IF (H0 .NE. ZERO .AND. (T + H0 - TCRIT)*H0 .GT. ZERO)
+     1   H0 = TCRIT - T
+ 110  JSTART = 0
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      CCMXJ = PT2
+      MSBJ = 50
+      NHNIL = 0
+      NST = 0
+      NJE = 0
+      NNI = 0
+      NCFN = 0
+      NETF = 0
+      NLU = 0
+      NSLJ = 0
+      NSLAST = 0
+      HU = ZERO
+      NQU = 0
+C Initial CALL to F.  (LF0 points to YH(*,2).) -------------------------
+      LF0 = LYH + NYH
+      CALL F (N, T, Y, RWORK(LF0))
+      NFE = 1
+C Load the initial value vector in YH. ---------------------------------
+      CALL DCOPY (N, Y, 1, RWORK(LYH), 1)
+C Load and invert the EWT array.  (H is temporarily set to 1.0.) -------
+      NQ = 1
+      H = ONE
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT))
+      DO 120 I = 1,N
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 621
+ 120    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+      IF (H0 .NE. ZERO) GO TO 180
+C Call DVHIN to set initial step size H0 to be attempted. --------------
+      CALL DVHIN (N, T, RWORK(LYH), RWORK(LF0), F, RPAR, IPAR, TOUT,
+     1   UROUND, RWORK(LEWT), ITOL, AbsTol, Y, RWORK(LACOR), H0,
+     2   NITER, IER)
+      NFE = NFE + NITER
+      IF (IER .NE. 0) GO TO 622
+C Adjust H0 if necessary to meet HMAX bound. ---------------------------
+ 180  RH = ABS(H0)*HMXI
+      IF (RH .GT. ONE) H0 = H0/RH
+C Load H with H0 and scale YH(*,2) by H0. ------------------------------
+      H = H0
+      CALL DSCAL (N, H0, RWORK(LF0), 1)
+      GO TO 270
+C-----------------------------------------------------------------------
+C Block D.
+C The next code block is for continuation calls only (ISTATE = 2 or 3)
+C and is to check stop conditions before taking a step.
+C-----------------------------------------------------------------------
+ 200  NSLAST = NST
+      KUTH = 0
+      GO TO (210, 250, 220, 230, 240), ITASK
+ 210  IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 220  TP = TN - HU*(ONE + HUN*UROUND)
+      IF ((TP - TOUT)*H .GT. ZERO) GO TO 623
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      GO TO 400
+ 230  TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+      IF ((TCRIT - TOUT)*H .LT. ZERO) GO TO 625
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 245
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 240  TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+ 245  HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. HUN*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + HNEW*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      KUTH = 1
+C-----------------------------------------------------------------------
+C Block E.
+C The next block is normally executed for all calls and contains
+C the CALL to the one-step core integrator DVSTEP.
+C
+C This is a looping point for the integration steps.
+C
+C First check for too many steps being taken, update EWT (if not at
+C start of problem), check for too much accuracy being requested, and
+C check for H below the roundoff level in T.
+C-----------------------------------------------------------------------
+ 250  CONTINUE
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT))
+      DO 260 I = 1,N
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 510
+ 260    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+ 270  TOLSF = UROUND*DVNORM (N, RWORK(LYH), RWORK(LEWT))
+      IF (TOLSF .LE. ONE) GO TO 280
+      TOLSF = TOLSF*TWO
+      IF (NST .EQ. 0) GO TO 626
+      GO TO 520
+ 280  IF ((TN + H) .NE. TN) GO TO 290
+      NHNIL = NHNIL + 1
+      IF (NHNIL .GT. MXHNIL) GO TO 290
+      MSG = 'DVODE--  Warning..internal T (=R1) and H (=R2) are'
+      CALL XERRWD (MSG, 50, 101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG='      such that in the machine, T + H = T on the next step  '
+      CALL XERRWD (MSG, 60, 101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      (H = step size). solver will continue anyway'
+      CALL XERRWD (MSG, 50, 101, 1, 0, 0, 0, 2, TN, H)
+      IF (NHNIL .LT. MXHNIL) GO TO 290
+      MSG = 'DVODE--  Above warning has been issued I1 times.  '
+      CALL XERRWD (MSG, 50, 102, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      it will not be issued again for this problem'
+      CALL XERRWD (MSG, 50, 102, 1, 1, MXHNIL, 0, 0, ZERO, ZERO)
+ 290  CONTINUE
+C-----------------------------------------------------------------------
+C CALL DVSTEP (Y, YH, NYH, YH, EWT, SAVF, VSAV, ACOR,
+C              WM, IWM, F, JAC, F, DVNLSD, RPAR, IPAR)
+C-----------------------------------------------------------------------
+      CALL DVSTEP (Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LEWT),
+     1   RWORK(LSAVF), Y, RWORK(LACOR), RWORK(LWM), IWORK(LIWM),
+     2   F, JAC, F, DVNLSD, RPAR, IPAR)
+      KGO = 1 - KFLAG
+C Branch on KFLAG.  Note..In this version, KFLAG can not be set to -3.
+C  KFLAG .eq. 0,   -1,  -2
+      GO TO (300, 530, 540), KGO
+C-----------------------------------------------------------------------
+C Block F.
+C The following block handles the case of a successful return from the
+C core integrator (KFLAG = 0).  Test for stop conditions.
+C-----------------------------------------------------------------------
+ 300  INIT = 1
+      KUTH = 0
+      GO TO (310, 400, 330, 340, 350), ITASK
+C ITASK = 1.  If TOUT has been reached, interpolate. -------------------
+ 310  IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+C ITASK = 3.  Jump to exit if TOUT was reached. ------------------------
+ 330  IF ((TN - TOUT)*H .GE. ZERO) GO TO 400
+      GO TO 250
+C ITASK = 4.  See if TOUT or TCRIT was reached.  Adjust H if necessary.
+ 340  IF ((TN - TOUT)*H .LT. ZERO) GO TO 345
+      CALL DVINDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+ 345  HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. HUN*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + HNEW*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      KUTH = 1
+      GO TO 250
+C ITASK = 5.  See if TCRIT was reached and jump to exit. ---------------
+ 350  HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. HUN*UROUND*HMX
+C-----------------------------------------------------------------------
+C Block G.
+C The following block handles all successful returns from DVODE.
+C If ITASK .ne. 1, Y is loaded from YH and T is set accordingly.
+C ISTATE is set to 2, and the optional output is loaded into the work
+C arrays before returning.
+C-----------------------------------------------------------------------
+ 400  CONTINUE
+      CALL DCOPY (N, RWORK(LYH), 1, Y, 1)
+      T = TN
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420
+      IF (IHIT) T = TCRIT
+ 420  ISTATE = 2
+      RWORK(11) = HU
+      RWORK(12) = HNEW
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NEWQ
+      IWORK(19) = NLU
+      IWORK(20) = NNI
+      IWORK(21) = NCFN
+      IWORK(22) = NETF
+      RETURN
+C-----------------------------------------------------------------------
+C Block H.
+C The following block handles all unsuccessful returns other than
+C those for illegal input.  First the error message routine is called.
+C if there was an error test or convergence test failure, IMXER is set.
+C Then Y is loaded from YH, T is set to TN, and the illegal input
+C The optional output is loaded into the work arrays before returning.
+C-----------------------------------------------------------------------
+C The maximum number of steps was taken before reaching TOUT. ----------
+ 500  MSG = 'DVODE--  At current T (=R1), MXSTEP (=I1) steps   '
+      CALL XERRWD (MSG, 50, 201, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      taken on this CALL before reaching TOUT     '
+      CALL XERRWD (MSG, 50, 201, 1, 1, MXSTEP, 0, 1, TN, ZERO)
+      ISTATE = -1
+      GO TO 580
+C EWT(i) .le. 0.0 for some i (not at start of problem). ----------------
+ 510  EWTI = RWORK(LEWT+I-1)
+      MSG = 'DVODE--  At T (=R1), EWT(I1) has become R2 .le. 0.'
+      CALL XERRWD (MSG, 50, 202, 1, 1, I, 0, 2, TN, EWTI)
+      ISTATE = -6
+      GO TO 580
+C Too much accuracy requested for machine precision. -------------------
+ 520  MSG = 'DVODE--  At T (=R1), too much accuracy requested  '
+      CALL XERRWD (MSG, 50, 203, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      for precision of machine..  see TOLSF (=R2) '
+      CALL XERRWD (MSG, 50, 203, 1, 0, 0, 0, 2, TN, TOLSF)
+      RWORK(14) = TOLSF
+      ISTATE = -2
+      GO TO 580
+C KFLAG = -1.  Error test failed repeatedly or with ABS(H) = HMIN. -----
+ 530  MSG = 'DVODE--  At T(=R1) and step size H(=R2), the error'
+      CALL XERRWD (MSG, 50, 204, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      test failed repeatedly or with abs(H) = HMIN'
+      CALL XERRWD (MSG, 50, 204, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -4
+      GO TO 560
+C KFLAG = -2.  Convergence failed repeatedly or with abs(H) = HMIN. ----
+ 540  MSG = 'DVODE--  At T (=R1) and step size H (=R2), the    '
+      CALL XERRWD (MSG, 50, 205, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      corrector convergence failed repeatedly     '
+      CALL XERRWD (MSG, 50, 205, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG = '      or with abs(H) = HMIN   '
+      CALL XERRWD (MSG, 30, 205, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -5
+C Compute IMXER if relevant. -------------------------------------------
+ 560  BIG = ZERO
+      IMXER = 1
+      DO 570 I = 1,N
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1))
+        IF (BIG .GE. SIZE) GO TO 570
+        BIG = SIZE
+        IMXER = I
+ 570    CONTINUE
+      IWORK(16) = IMXER
+C Set Y vector, T, and optional output. --------------------------------
+ 580  CONTINUE
+      CALL DCOPY (N, RWORK(LYH), 1, Y, 1)
+      T = TN
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IWORK(19) = NLU
+      IWORK(20) = NNI
+      IWORK(21) = NCFN
+      IWORK(22) = NETF
+      RETURN
+C-----------------------------------------------------------------------
+C Block I.
+C The following block handles all error returns due to illegal input
+C (ISTATE = -3), as detected before calling the core integrator.
+C First the error message routine is called.   If the illegal input
+C is a negative ISTATE, the run is aborted (apparent infinite loop).
+C-----------------------------------------------------------------------
+ 601  MSG = 'DVODE--  ISTATE (=I1) illegal '
+      CALL XERRWD (MSG, 30, 1, 1, 1, ISTATE, 0, 0, ZERO, ZERO)
+      IF (ISTATE .LT. 0) GO TO 800
+      GO TO 700
+ 602  MSG = 'DVODE--  ITASK (=I1) illegal  '
+      CALL XERRWD (MSG, 30, 2, 1, 1, ITASK, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 603  MSG='DVODE--  ISTATE (=I1) .gt. 1 but DVODE not initialized      '
+      CALL XERRWD (MSG, 60, 3, 1, 1, ISTATE, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 604  MSG = 'DVODE--  NEQ (=I1) .lt. 1     '
+      CALL XERRWD (MSG, 30, 4, 1, 1, NEQ, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 605  MSG = 'DVODE--  ISTATE = 3 and NEQ increased (I1 to I2)  '
+      CALL XERRWD (MSG, 50, 5, 1, 2, N, NEQ, 0, ZERO, ZERO)
+      GO TO 700
+ 606  MSG = 'DVODE--  ITOL (=I1) illegal   '
+      CALL XERRWD (MSG, 30, 6, 1, 1, ITOL, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 607  MSG = 'DVODE--  IOPT (=I1) illegal   '
+      CALL XERRWD (MSG, 30, 7, 1, 1, IOPT, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 608  MSG = 'DVODE--  MF (=I1) illegal     '
+      CALL XERRWD (MSG, 30, 8, 1, 1, MF, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 609  MSG = 'DVODE--  ML (=I1) illegal.. .lt.0 or .ge.NEQ (=I2)'
+      CALL XERRWD (MSG, 50, 9, 1, 2, ML, NEQ, 0, ZERO, ZERO)
+      GO TO 700
+ 610  MSG = 'DVODE--  MU (=I1) illegal.. .lt.0 or .ge.NEQ (=I2)'
+      CALL XERRWD (MSG, 50, 10, 1, 2, MU, NEQ, 0, ZERO, ZERO)
+      GO TO 700
+ 611  MSG = 'DVODE--  MAXORD (=I1) .lt. 0  '
+      CALL XERRWD (MSG, 30, 11, 1, 1, MAXORD, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 612  MSG = 'DVODE--  MXSTEP (=I1) .lt. 0  '
+      CALL XERRWD (MSG, 30, 12, 1, 1, MXSTEP, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 613  MSG = 'DVODE--  MXHNIL (=I1) .lt. 0  '
+      CALL XERRWD (MSG, 30, 13, 1, 1, MXHNIL, 0, 0, ZERO, ZERO)
+      GO TO 700
+ 614  MSG = 'DVODE--  TOUT (=R1) behind T (=R2)      '
+      CALL XERRWD (MSG, 40, 14, 1, 0, 0, 0, 2, TOUT, T)
+      MSG = '      integration direction is given by H0 (=R1)  '
+      CALL XERRWD (MSG, 50, 14, 1, 0, 0, 0, 1, H0, ZERO)
+      GO TO 700
+ 615  MSG = 'DVODE--  HMAX (=R1) .lt. 0.0  '
+      CALL XERRWD (MSG, 30, 15, 1, 0, 0, 0, 1, HMAX, ZERO)
+      GO TO 700
+ 616  MSG = 'DVODE--  HMIN (=R1) .lt. 0.0  '
+      CALL XERRWD (MSG, 30, 16, 1, 0, 0, 0, 1, HMIN, ZERO)
+      GO TO 700
+ 617  CONTINUE
+      MSG='DVODE--  RWORK length needed, LENRW (=I1), exceeds LRW (=I2)'
+      CALL XERRWD (MSG, 60, 17, 1, 2, LENRW, LRW, 0, ZERO, ZERO)
+      GO TO 700
+ 618  CONTINUE
+      MSG='DVODE--  IWORK length needed, LENIW (=I1), exceeds LIW (=I2)'
+      CALL XERRWD (MSG, 60, 18, 1, 2, LENIW, LIW, 0, ZERO, ZERO)
+      GO TO 700
+ 619  MSG = 'DVODE--  RelTol(I1) is R1 .lt. 0.0        '
+      CALL XERRWD (MSG, 40, 19, 1, 1, I, 0, 1, RelTolI, ZERO)
+      GO TO 700
+ 620  MSG = 'DVODE--  AbsTol(I1) is R1 .lt. 0.0        '
+      CALL XERRWD (MSG, 40, 20, 1, 1, I, 0, 1, AbsTolI, ZERO)
+      GO TO 700
+ 621  EWTI = RWORK(LEWT+I-1)
+      MSG = 'DVODE--  EWT(I1) is R1 .le. 0.0         '
+      CALL XERRWD (MSG, 40, 21, 1, 1, I, 0, 1, EWTI, ZERO)
+      GO TO 700
+ 622  CONTINUE
+      MSG='DVODE--  TOUT (=R1) too close to T(=R2) to start integration'
+      CALL XERRWD (MSG, 60, 22, 1, 0, 0, 0, 2, TOUT, T)
+      GO TO 700
+ 623  CONTINUE
+      MSG='DVODE--  ITASK = I1 and TOUT (=R1) behind TCUR - HU (= R2)  '
+      CALL XERRWD (MSG, 60, 23, 1, 1, ITASK, 0, 2, TOUT, TP)
+      GO TO 700
+ 624  CONTINUE
+      MSG='DVODE--  ITASK = 4 or 5 and TCRIT (=R1) behind TCUR (=R2)   '
+      CALL XERRWD (MSG, 60, 24, 1, 0, 0, 0, 2, TCRIT, TN)
+      GO TO 700
+ 625  CONTINUE
+      MSG='DVODE--  ITASK = 4 or 5 and TCRIT (=R1) behind TOUT (=R2)   '
+      CALL XERRWD (MSG, 60, 25, 1, 0, 0, 0, 2, TCRIT, TOUT)
+      GO TO 700
+ 626  MSG = 'DVODE--  At start of problem, too much accuracy   '
+      CALL XERRWD (MSG, 50, 26, 1, 0, 0, 0, 0, ZERO, ZERO)
+      MSG='      requested for precision of machine..  see TOLSF (=R1) '
+      CALL XERRWD (MSG, 60, 26, 1, 0, 0, 0, 1, TOLSF, ZERO)
+      RWORK(14) = TOLSF
+      GO TO 700
+ 627  MSG='DVODE--  Trouble from DVINDY.  ITASK = I1, TOUT = R1.       '
+      CALL XERRWD (MSG, 60, 27, 1, 1, ITASK, 0, 1, TOUT, ZERO)
+C
+ 700  CONTINUE
+      ISTATE = -3
+      RETURN
+C
+ 800  MSG = 'DVODE--  Run aborted.. apparent infinite loop     '
+      CALL XERRWD (MSG, 50, 303, 2, 0, 0, 0, 0, ZERO, ZERO)
+      RETURN
+C----------------------- End of Subroutine DVODE -----------------------
+      END
+*DECK DVHIN
+      SUBROUTINE DVHIN (N, T0, Y0, YDOT, F, RPAR, IPAR, TOUT, UROUND,
+     1   EWT, ITOL, AbsTol, Y, TEMP, H0, NITER, IER)
+      EXTERNAL F
+      KPP_REAL T0, Y0, YDOT, RPAR, TOUT, UROUND, EWT, AbsTol, Y,
+     1   TEMP, H0
+      INTEGER N, IPAR, ITOL, NITER, IER
+      DIMENSION Y0(*), YDOT(*), EWT(*), AbsTol(*), Y(*),
+     1   TEMP(*), RPAR(*), IPAR(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- N, T0, Y0, YDOT, F, RPAR, IPAR, TOUT, UROUND,
+C                        EWT, ITOL, AbsTol, Y, TEMP
+C Call sequence output -- H0, NITER, IER
+C COMMON block variables accessed -- None
+C
+C Subroutines called by DVHIN.. F
+C Function routines called by DVHIN.. DVNORM
+C-----------------------------------------------------------------------
+C This routine computes the step size, H0, to be attempted on the
+C first step, when the user has not supplied a value for this.
+C
+C First we check that TOUT - T0 differs significantly from zero.  Then
+C an iteration is done to approximate the initial second derivative
+C and this is used to define h from w.r.m.s.norm(h**2 * yddot / 2) = 1.
+C A bias factor of 1/2 is applied to the resulting h.
+C The sign of H0 is inferred from the initial values of TOUT and T0.
+C
+C Communication with DVHIN is done with the following variables..
+C
+C N      = Size of ODE system, input.
+C T0     = Initial value of independent variable, input.
+C Y0     = Vector of initial conditions, input.
+C YDOT   = Vector of initial first derivatives, input.
+C F      = Name of subroutine for right-hand side f(t,y), input.
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C TOUT   = First output value of independent variable
+C UROUND = Machine unit roundoff
+C EWT, ITOL, AbsTol = Error weights and tolerance parameters
+C                   as described in the driver routine, input.
+C Y, TEMP = Work arrays of length N.
+C H0     = Step size to be attempted, output.
+C NITER  = Number of iterations (and of f evaluations) to compute H0,
+C          output.
+C IER    = The error flag, returned with the value
+C          IER = 0  if no trouble occurred, or
+C          IER = -1 if TOUT and T0 are considered too close to proceed.
+C-----------------------------------------------------------------------
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL AFI, AbsTolI, DELYI, HALF, HG, HLB, HNEW, HRAT,
+     1     HUB, HUN, PT1, T1, TDIST, TROUND, TWO, YDDNRM
+      INTEGER I, ITER
+
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE HALF, HUN, PT1, TWO
+      DATA HALF /0.5D0/, HUN /100.0D0/, PT1 /0.1D0/, TWO /2.0D0/
+C
+      NITER = 0
+      TDIST = ABS(TOUT - T0)
+      TROUND = UROUND*MAX(ABS(T0),ABS(TOUT))
+      IF (TDIST .LT. TWO*TROUND) GO TO 100
+C
+C Set a lower bound on h based on the roundoff level in T0 and TOUT. ---
+      HLB = HUN*TROUND
+C Set an upper bound on h based on TOUT-T0 and the initial Y and YDOT. -
+      HUB = PT1*TDIST
+      AbsTolI = AbsTol(1)
+      DO 10 I = 1, N
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I)
+        DELYI = PT1*ABS(Y0(I)) + AbsTolI
+        AFI = ABS(YDOT(I))
+        IF (AFI*HUB .GT. DELYI) HUB = DELYI/AFI
+ 10     CONTINUE
+C
+C Set initial guess for h as geometric mean of upper and lower bounds. -
+      ITER = 0
+      HG = SQRT(HLB*HUB)
+C If the bounds have crossed, exit with the mean value. ----------------
+      IF (HUB .LT. HLB) THEN
+        H0 = HG
+        GO TO 90
+      ENDIF
+C
+C Looping point for iteration. -----------------------------------------
+ 50   CONTINUE
+C Estimate the second derivative as a difference quotient in f. --------
+      T1 = T0 + HG
+      DO 60 I = 1, N
+ 60     Y(I) = Y0(I) + HG*YDOT(I)
+      CALL F (N, T1, Y, TEMP)
+      DO 70 I = 1, N
+ 70     TEMP(I) = (TEMP(I) - YDOT(I))/HG
+      YDDNRM = DVNORM (N, TEMP, EWT)
+C Get the corresponding new value of h. --------------------------------
+      IF (YDDNRM*HUB*HUB .GT. TWO) THEN
+        HNEW = SQRT(TWO/YDDNRM)
+      ELSE
+        HNEW = SQRT(HG*HUB)
+      ENDIF
+      ITER = ITER + 1
+C-----------------------------------------------------------------------
+C Test the stopping conditions.
+C Stop if the new and previous h values differ by a factor of .lt. 2.
+C Stop if four iterations have been done.  Also, stop with previous h
+C if HNEW/HG .gt. 2 after first iteration, as this probably means that
+C the second derivative value is bad because of cancellation error.
+C-----------------------------------------------------------------------
+      IF (ITER .GE. 4) GO TO 80
+      HRAT = HNEW/HG
+C AICI
+      IF ( (HRAT .GT. HALF) .AND. (HRAT .LT. TWO) ) GO TO 80
+      IF ( (ITER .GE. 2) .AND. (HNEW .GT. TWO*HG) ) THEN
+        HNEW = HG
+        GO TO 80
+      ENDIF
+      HG = HNEW
+      GO TO 50
+C
+C Iteration done.  Apply bounds, bias factor, and sign.  Then exit. ----
+ 80   H0 = HNEW*HALF
+      IF (H0 .LT. HLB) H0 = HLB
+      IF (H0 .GT. HUB) H0 = HUB
+ 90   H0 = SIGN(H0, TOUT - T0)
+      NITER = ITER
+      IER = 0
+      RETURN
+C Error return for TOUT - T0 too small. --------------------------------
+ 100  IER = -1
+      RETURN
+C----------------------- End of Subroutine DVHIN -----------------------
+      END
+*DECK DVINDY
+      SUBROUTINE DVINDY (T, K, YH, LDYH, DKY, IFLAG)
+      KPP_REAL T, YH, DKY
+      INTEGER K, LDYH, IFLAG
+      DIMENSION YH(LDYH,*), DKY(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- T, K, YH, LDYH
+C Call sequence output -- DKY, IFLAG
+C COMMON block variables accessed..
+C     /DVOD01/ --  H, TN, UROUND, L, N, NQ
+C     /DVOD02/ --  HU
+C
+C Subroutines called by DVINDY.. DSCAL, XERRWD
+C Function routines called by DVINDY.. None
+C-----------------------------------------------------------------------
+C DVINDY computes interpolated values of the K-th derivative of the
+C dependent variable vector y, and stores it in DKY.  This routine
+C is called within the package with K = 0 and T = TOUT, but may
+C also be called by the user for any K up to the current order.
+C (See detailed instructions in the usage documentation.)
+C-----------------------------------------------------------------------
+C The computed values in DKY are gotten by interpolation using the
+C Nordsieck history array YH.  This array corresponds uniquely to a
+C vector-valued polynomial of degree NQCUR or less, and DKY is set
+C to the K-th derivative of this polynomial at T.
+C The formula for DKY is..
+C              q
+C  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+C             j=K
+C where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+C The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+C communicated by COMMON.  The above sum is done in reverse order.
+C IFLAG is returned negative if either K or T is out of bounds.
+C
+C Discussion above and comments in driver explain all variables.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL C, HUN, R, S, TFUZZ, TN1, TP, ZERO
+      INTEGER I, IC, J, JB, JB2, JJ, JJ1, JP1
+      CHARACTER*80 MSG
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE HUN, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      DATA HUN /100.0D0/, ZERO /0.0D0/
+C
+      IFLAG = 0
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
+      TFUZZ = HUN*UROUND*(TN + HU)
+      TP = TN - HU - TFUZZ
+      TN1 = TN + TFUZZ
+      IF ((T-TP)*(T-TN1) .GT. ZERO) GO TO 90
+C
+      S = (T - TN)/H
+      IC = 1
+      IF (K .EQ. 0) GO TO 15
+      JJ1 = L - K
+      DO 10 JJ = JJ1, NQ
+ 10     IC = IC*JJ
+ 15   C = REAL(IC)
+      DO 20 I = 1, N
+ 20     DKY(I) = C*YH(I,L)
+      IF (K .EQ. NQ) GO TO 55
+      JB2 = NQ - K
+      DO 50 JB = 1, JB2
+        J = NQ - JB
+        JP1 = J + 1
+        IC = 1
+        IF (K .EQ. 0) GO TO 35
+        JJ1 = JP1 - K
+        DO 30 JJ = JJ1, J
+ 30       IC = IC*JJ
+ 35     C = REAL(IC)
+        DO 40 I = 1, N
+ 40       DKY(I) = C*YH(I,JP1) + S*DKY(I)
+ 50     CONTINUE
+      IF (K .EQ. 0) RETURN
+ 55   R = H**(-K)
+      CALL DSCAL (N, R, DKY, 1)
+      RETURN
+C
+ 80   MSG = 'DVINDY-- K (=I1) illegal      '
+      CALL XERRWD (MSG, 30, 51, 1, 1, K, 0, 0, ZERO, ZERO)
+      IFLAG = -1
+      RETURN
+ 90   MSG = 'DVINDY-- T (=R1) illegal      '
+      CALL XERRWD (MSG, 30, 52, 1, 0, 0, 0, 1, T, ZERO)
+      MSG='      T not in interval TCUR - HU (= R1) to TCUR (=R2)      '
+      CALL XERRWD (MSG, 60, 52, 1, 0, 0, 0, 2, TP, TN)
+      IFLAG = -2
+      RETURN
+C----------------------- End of Subroutine DVINDY ----------------------
+      END
+*DECK DVSTEP
+      SUBROUTINE DVSTEP (Y, YH, LDYH, YH1, EWT, SAVF, VSAV, ACOR,
+     1                  WM, IWM, F, JAC, PSOL, VNLS, RPAR, IPAR)
+      EXTERNAL F, JAC, PSOL, VNLS
+      KPP_REAL Y, YH, YH1, EWT, SAVF, VSAV, ACOR, WM, RPAR
+      INTEGER LDYH, IWM, IPAR
+      DIMENSION Y(*), YH(LDYH,*), YH1(*), EWT(*), SAVF(*), VSAV(*),
+     1   ACOR(*), WM(*), IWM(*), RPAR(*), IPAR(*)
+
+C-----------------------------------------------------------------------
+C Call sequence input -- Y, YH, LDYH, YH1, EWT, SAVF, VSAV,
+C                        ACOR, WM, IWM, F, JAC, PSOL, VNLS, RPAR, IPAR
+C Call sequence output -- YH, ACOR, WM, IWM
+C COMMON block variables accessed..
+C     /DVOD01/  ACNRM, EL(13), H, HMIN, HMXI, HNEW, HSCAL, RC, TAU(13),
+C               TQ(5), TN, JCUR, JSTART, KFLAG, KUTH,
+C               L, LMAX, MAXORD, MITER, N, NEWQ, NQ, NQWAIT
+C     /DVOD02/  HU, NCFN, NETF, NFE, NQU, NST
+C
+C Subroutines called by DVSTEP.. F, DAXPY, DCOPY, DSCAL,
+C                               DVJUST, VNLS, DVSET
+C Function routines called by DVSTEP.. DVNORM
+C-----------------------------------------------------------------------
+C DVSTEP performs one step of the integration of an initial value
+C problem for a system of ordinary differential equations.
+C DVSTEP calls subroutine VNLS for the solution of the nonlinear system
+C arising in the time step.  Thus it is independent of the problem
+C Jacobian structure and the type of nonlinear system solution method.
+C DVSTEP returns a completion flag KFLAG (in COMMON).
+C A return with KFLAG = -1 or -2 means either ABS(H) = HMIN or 10
+C consecutive failures occurred.  On a return with KFLAG negative,
+C the values of TN and the YH array are as of the beginning of the last
+C step, and H is the last step size attempted.
+C
+C Communication with DVSTEP is done with the following variables..
+C
+C Y      = An array of length N used for the dependent variable vector.
+C YH     = An LDYH by LMAX array containing the dependent variables
+C          and their approximate scaled derivatives, where
+C          LMAX = MAXORD + 1.  YH(i,j+1) contains the approximate
+C          j-th derivative of y(i), scaled by H**j/factorial(j)
+C          (j = 0,1,...,NQ).  On entry for the first step, the first
+C          two columns of YH must be set from the initial values.
+C LDYH   = A constant integer .ge. N, the first dimension of YH.
+C          N is the number of ODEs in the system.
+C YH1    = A one-dimensional array occupying the same space as YH.
+C EWT    = An array of length N containing multiplicative weights
+C          for local error measurements.  Local errors in y(i) are
+C          compared to 1.0/EWT(i) in various error tests.
+C SAVF   = An array of working storage, of length N.
+C          also used for input of YH(*,MAXORD+2) when JSTART = -1
+C          and MAXORD .lt. the current order NQ.
+C VSAV   = A work array of length N passed to subroutine VNLS.
+C ACOR   = A work array of length N, used for the accumulated
+C          corrections.  On a successful return, ACOR(i) contains
+C          the estimated one-step local error in y(i).
+C WM,IWM = Real and integer work arrays associated with matrix
+C          operations in VNLS.
+C F      = Dummy name for the user supplied subroutine for f.
+C JAC    = Dummy name for the user supplied Jacobian subroutine.
+C PSOL   = Dummy name for the subroutine passed to VNLS, for
+C          possible use there.
+C VNLS   = Dummy name for the nonlinear system solving subroutine,
+C          whose real name is dependent on the method used.
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL ADDON, BIAS1,BIAS2,BIAS3, CNQUOT, DDN, DSM, DUP,
+     1     ETACF, ETAMIN, ETAMX1, ETAMX2, ETAMX3, ETAMXF,
+     2     ETAQ, ETAQM1, ETAQP1, FLOTL, ONE, ONEPSM,
+     3     R, THRESH, TOLD, ZERO
+      INTEGER I, I1, I2, IBACK, J, JB, KFC, KFH, MXNCF, NCF, NFLAG
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE ADDON, BIAS1, BIAS2, BIAS3,
+     1     ETACF, ETAMIN, ETAMX1, ETAMX2, ETAMX3, ETAMXF,
+     2     KFC, KFH, MXNCF, ONEPSM, THRESH, ONE, ZERO
+C-----------------------------------------------------------------------
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      DATA KFC/-3/, KFH/-7/, MXNCF/10/
+      DATA ADDON  /1.0D-6/,    BIAS1  /6.0D0/,     BIAS2  /6.0D0/,
+     1     BIAS3  /10.0D0/,    ETACF  /0.25D0/,    ETAMIN /0.1D0/,
+     2     ETAMXF /0.2D0/,     ETAMX1 /1.0D4/,     ETAMX2 /10.0D1/,
+     3     ETAMX3 /10.0D1/,    ONEPSM /1.00001D0/, THRESH /1.5D0/
+
+      DATA ONE/1.0D0/, ZERO/0.0D0/
+C
+      ETAQ   = ETAMX1
+      ETAQM1 = ETAMX1
+      ETAQP1 = ETAMX1
+      KFLAG = 0
+      TOLD = TN
+      NCF = 0
+      JCUR = 0
+      NFLAG = 0
+      IF (JSTART .GT. 0) GO TO 20
+      IF (JSTART .EQ. -1) GO TO 100
+C-----------------------------------------------------------------------
+C On the first call, the order is set to 1, and other variables are
+C initialized.  ETAMAX is the maximum ratio by which H can be increased
+C in a single step.  It is normally 1.5, but is larger during the
+C first 10 steps to compensate for the small initial H.  If a failure
+C occurs (in corrector convergence or error test), ETAMAX is set to 1
+C for the next increase.
+C-----------------------------------------------------------------------
+      LMAX = MAXORD + 1
+      NQ = 1
+      L = 2
+      NQNYH = NQ*LDYH
+      TAU(1) = H
+      PRL1 = ONE
+      RC = ZERO
+      ETAMAX = ETAMX1
+      NQWAIT = 2
+      HSCAL = H
+      GO TO 200
+C-----------------------------------------------------------------------
+C Take preliminary actions on a normal continuation step (JSTART.GT.0).
+C If the driver changed H, then ETA must be reset and NEWH set to 1.
+C If a change of order was dictated on the previous step, then
+C it is done here and appropriate adjustments in the history are made.
+C On an order decrease, the history array is adjusted by DVJUST.
+C On an order increase, the history array is augmented by a column.
+C On a change of step size H, the history array YH is rescaled.
+C-----------------------------------------------------------------------
+ 20   CONTINUE
+      IF (KUTH .EQ. 1) THEN
+        ETA = MIN(ETA,H/HSCAL)
+        NEWH = 1
+        ENDIF
+ 50   IF (NEWH .EQ. 0) GO TO 200
+      IF (NEWQ .EQ. NQ) GO TO 150
+      IF (NEWQ .LT. NQ) THEN
+        CALL DVJUST (YH, LDYH, -1)
+        NQ = NEWQ
+        L = NQ + 1
+        NQWAIT = L
+        GO TO 150
+        ENDIF
+      IF (NEWQ .GT. NQ) THEN
+        CALL DVJUST (YH, LDYH, 1)
+        NQ = NEWQ
+        L = NQ + 1
+        NQWAIT = L
+        GO TO 150
+      ENDIF
+C-----------------------------------------------------------------------
+C The following block handles preliminaries needed when JSTART = -1.
+C If N was reduced, zero out part of YH to avoid undefined references.
+C If MAXORD was reduced to a value less than the tentative order NEWQ,
+C then NQ is set to MAXORD, and a new H ratio ETA is chosen.
+C Otherwise, we take the same preliminary actions as for JSTART .gt. 0.
+C In any case, NQWAIT is reset to L = NQ + 1 to prevent further
+C changes in order for that many steps.
+C The new H ratio ETA is limited by the input H if KUTH = 1,
+C by HMIN if KUTH = 0, and by HMXI in any case.
+C Finally, the history array YH is rescaled.
+C-----------------------------------------------------------------------
+ 100  CONTINUE
+      LMAX = MAXORD + 1
+      IF (N .EQ. LDYH) GO TO 120
+      I1 = 1 + (NEWQ + 1)*LDYH
+      I2 = (MAXORD + 1)*LDYH
+      IF (I1 .GT. I2) GO TO 120
+      DO 110 I = I1, I2
+ 110    YH1(I) = ZERO
+ 120  IF (NEWQ .LE. MAXORD) GO TO 140
+      FLOTL = REAL(LMAX)
+      IF (MAXORD .LT. NQ-1) THEN
+        DDN = DVNORM (N, SAVF, EWT)/TQ(1)
+        ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL) + ADDON)
+        ENDIF
+      IF (MAXORD .EQ. NQ .AND. NEWQ .EQ. NQ+1) ETA = ETAQ
+      IF (MAXORD .EQ. NQ-1 .AND. NEWQ .EQ. NQ+1) THEN
+        ETA = ETAQM1
+        CALL DVJUST (YH, LDYH, -1)
+        ENDIF
+      IF (MAXORD .EQ. NQ-1 .AND. NEWQ .EQ. NQ) THEN
+        DDN = DVNORM (N, SAVF, EWT)/TQ(1)
+        ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL) + ADDON)
+        CALL DVJUST (YH, LDYH, -1)
+        ENDIF
+      ETA = MIN(ETA,ONE)
+      NQ = MAXORD
+      L = LMAX
+ 140  IF (KUTH .EQ. 1) ETA = MIN(ETA,ABS(H/HSCAL))
+      IF (KUTH .EQ. 0) ETA = MAX(ETA,HMIN/ABS(HSCAL))
+      ETA = ETA/MAX(ONE,ABS(HSCAL)*HMXI*ETA)
+      NEWH = 1
+      NQWAIT = L
+      IF (NEWQ .LE. MAXORD) GO TO 50
+C Rescale the history array for a change in H by a factor of ETA. ------
+ 150  R = ONE
+      DO 180 J = 2, L
+        R = R*ETA
+        CALL DSCAL (N, R, YH(1,J), 1 )
+ 180    CONTINUE
+      H = HSCAL*ETA
+      HSCAL = H
+      RC = RC*ETA
+      NQNYH = NQ*LDYH
+C-----------------------------------------------------------------------
+C This section computes the predicted values by effectively
+C multiplying the YH array by the Pascal triangle matrix.
+C DVSET is called to calculate all integration coefficients.
+C RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+C-----------------------------------------------------------------------
+ 200  TN = TN + H
+      I1 = NQNYH + 1
+      DO 220 JB = 1, NQ
+        I1 = I1 - LDYH
+        DO 210 I = I1, NQNYH
+ 210      YH1(I) = YH1(I) + YH1(I+LDYH)
+ 220  CONTINUE
+      CALL DVSET
+      RL1 = ONE/EL(2)
+      RC = RC*(RL1/PRL1)
+      PRL1 = RL1
+C
+C Call the nonlinear system solver. ------------------------------------
+C
+      CALL VNLS (Y, YH, LDYH, VSAV, SAVF, EWT, ACOR, IWM, WM,
+     1           F, JAC, PSOL, NFLAG, RPAR, IPAR)
+C
+      IF ((NFLAG .EQ. 0).OR.(H.LE.1.2*HMIN)) GO TO 450
+C-----------------------------------------------------------------------
+C The VNLS routine failed to achieve convergence (NFLAG .NE. 0).
+C The YH array is retracted to its values before prediction.
+C The step size H is reduced and the step is retried, if possible.
+C Otherwise, an error exit is taken.
+C-----------------------------------------------------------------------
+        NCF = NCF + 1
+        NCFN = NCFN + 1
+        ETAMAX = ONE
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO 430 JB = 1, NQ
+          I1 = I1 - LDYH
+          DO 420 I = I1, NQNYH
+ 420        YH1(I) = YH1(I) - YH1(I+LDYH)
+ 430      CONTINUE
+        IF (NFLAG .LT. -1) GO TO 680
+        IF (ABS(H) .LE. HMIN*ONEPSM) GO TO 670
+        IF (NCF .EQ. MXNCF) GO TO 670
+        ETA = ETACF
+        ETA = MAX(ETA,HMIN/ABS(H))
+        NFLAG = -1
+        GO TO 150
+C-----------------------------------------------------------------------
+C The corrector has converged (NFLAG = 0).  The local error test is
+C made and control passes to statement 500 if it fails.
+C-----------------------------------------------------------------------
+ 450  CONTINUE
+      DSM = ACNRM/TQ(2)
+      IF ( (DSM .GT. ONE).and.(H.GT.HMIN) ) GO TO 500
+C-----------------------------------------------------------------------
+C After a successful step, update the YH and TAU arrays and decrement
+C NQWAIT.  If NQWAIT is then 1 and NQ .lt. MAXORD, then ACOR is saved
+C for use in a possible order increase on the next step.
+C If ETAMAX = 1 (a failure occurred this step), keep NQWAIT .ge. 2.
+C-----------------------------------------------------------------------
+      KFLAG = 0
+      NST = NST + 1
+      HU = H
+      NQU = NQ
+      DO 470 IBACK = 1, NQ
+        I = L - IBACK
+ 470    TAU(I+1) = TAU(I)
+      TAU(1) = H
+      DO 480 J = 1, L
+        CALL DAXPY (N, EL(J), ACOR, 1, YH(1,J), 1 )
+ 480    CONTINUE
+      NQWAIT = NQWAIT - 1
+      IF ((L .EQ. LMAX) .OR. (NQWAIT .NE. 1)) GO TO 490
+      CALL DCOPY (N, ACOR, 1, YH(1,LMAX), 1 )
+      CONP = TQ(5)
+ 490  IF (ETAMAX .NE. ONE) GO TO 560
+      IF (NQWAIT .LT. 2) NQWAIT = 2
+      NEWQ = NQ
+      NEWH = 0
+      ETA = ONE
+      HNEW = H
+      GO TO 690
+C-----------------------------------------------------------------------
+C The error test failed.  KFLAG keeps track of multiple failures.
+C Restore TN and the YH array to their previous values, and prepare
+C to try the step again.  Compute the optimum step size for the
+C same order.  After repeated failures, H is forced to decrease
+C more rapidly.
+C-----------------------------------------------------------------------
+ 500  KFLAG = KFLAG - 1
+      NETF = NETF + 1
+      NFLAG = -2
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 520 JB = 1, NQ
+        I1 = I1 - LDYH
+        DO 510 I = I1, NQNYH
+ 510      YH1(I) = YH1(I) - YH1(I+LDYH)
+ 520  CONTINUE
+      IF (ABS(H) .LE. HMIN*ONEPSM) GO TO 660
+      ETAMAX = ONE
+      IF (KFLAG .LE. KFC) GO TO 530
+C Compute ratio of new H to current H at the current order. ------------
+      FLOTL = REAL(L)
+      ETA = ONE/((BIAS2*DSM)**(ONE/FLOTL) + ADDON)
+      ETA = MAX(ETA,HMIN/ABS(H),ETAMIN)
+      IF ((KFLAG .LE. -2) .AND. (ETA .GT. ETAMXF)) ETA = ETAMXF
+      GO TO 150
+C-----------------------------------------------------------------------
+C Control reaches this section if 3 or more consecutive failures
+C have occurred.  It is assumed that the elements of the YH array
+C have accumulated errors of the wrong order.  The order is reduced
+C by one, if possible.  Then H is reduced by a factor of 0.1 and
+C the step is retried.  After a total of 7 consecutive failures,
+C an exit is taken with KFLAG = -1.
+C-----------------------------------------------------------------------
+ 530  IF (KFLAG .EQ. KFH) GO TO 660
+      IF (NQ .EQ. 1) GO TO 540
+      ETA = MAX(ETAMIN,HMIN/ABS(H))
+      CALL DVJUST (YH, LDYH, -1)
+      L = NQ
+      NQ = NQ - 1
+      NQWAIT = L
+      GO TO 150
+ 540  ETA = MAX(ETAMIN,HMIN/ABS(H))
+      H = H*ETA
+      HSCAL = H
+      TAU(1) = H
+      CALL F (N, TN, Y, SAVF)
+      NFE = NFE + 1
+      DO 550 I = 1, N
+ 550    YH(I,2) = H*SAVF(I)
+      NQWAIT = 10
+      GO TO 200
+C-----------------------------------------------------------------------
+C If NQWAIT = 0, an increase or decrease in order by one is considered.
+C Factors ETAQ, ETAQM1, ETAQP1 are computed by which H could
+C be multiplied at order q, q-1, or q+1, respectively.
+C The largest of these is determined, and the new order and
+C step size set accordingly.
+C A change of H or NQ is made only if H increases by at least a
+C factor of THRESH.  If an order change is considered and rejected,
+C then NQWAIT is set to 2 (reconsider it after 2 steps).
+C-----------------------------------------------------------------------
+C Compute ratio of new H to current H at the current order. ------------
+ 560  FLOTL = REAL(L)
+      ETAQ = ONE/((BIAS2*DSM)**(ONE/FLOTL) + ADDON)
+      IF (NQWAIT .NE. 0) GO TO 600
+      NQWAIT = 2
+      ETAQM1 = ZERO
+      IF (NQ .EQ. 1) GO TO 570
+C Compute ratio of new H to current H at the current order less one. ---
+      DDN = DVNORM (N, YH(1,L), EWT)/TQ(1)
+      ETAQM1 = ONE/((BIAS1*DDN)**(ONE/(FLOTL - ONE)) + ADDON)
+ 570  ETAQP1 = ZERO
+      IF (L .EQ. LMAX) GO TO 580
+C Compute ratio of new H to current H at current order plus one. -------
+      CNQUOT = (TQ(5)/CONP)*(H/TAU(2))**L
+      DO 575 I = 1, N
+ 575    SAVF(I) = ACOR(I) - CNQUOT*YH(I,LMAX)
+      DUP = DVNORM (N, SAVF, EWT)/TQ(3)
+      ETAQP1 = ONE/((BIAS3*DUP)**(ONE/(FLOTL + ONE)) + ADDON)
+ 580  IF (ETAQ .GE. ETAQP1) GO TO 590
+      IF (ETAQP1 .GT. ETAQM1) GO TO 620
+      GO TO 610
+ 590  IF (ETAQ .LT. ETAQM1) GO TO 610
+ 600  ETA = ETAQ
+      NEWQ = NQ
+      GO TO 630
+ 610  ETA = ETAQM1
+      NEWQ = NQ - 1
+      GO TO 630
+ 620  ETA = ETAQP1
+      NEWQ = NQ + 1
+      CALL DCOPY (N, ACOR, 1, YH(1,LMAX), 1)
+C Test tentative new H against THRESH, ETAMAX, and HMXI, then exit. ----
+ 630  IF (ETA .LT. THRESH .OR. ETAMAX .EQ. ONE) GO TO 640
+      ETA = MIN(ETA,ETAMAX)
+      ETA = ETA/MAX(ONE,ABS(H)*HMXI*ETA)
+      NEWH = 1
+      HNEW = H*ETA
+      GO TO 690
+ 640  NEWQ = NQ
+      NEWH = 0
+      ETA = ONE
+      HNEW = H
+      GO TO 690
+C-----------------------------------------------------------------------
+C All returns are made through this section.
+C On a successful return, ETAMAX is reset and ACOR is scaled.
+C-----------------------------------------------------------------------
+ 660  KFLAG = -1
+      GO TO 720
+ 670  KFLAG = -2
+      GO TO 720
+ 680  IF (NFLAG .EQ. -2) KFLAG = -3
+      IF (NFLAG .EQ. -3) KFLAG = -4
+      GO TO 720
+ 690  ETAMAX = ETAMX3
+      IF (NST .LE. 10) ETAMAX = ETAMX2
+ 700  R = ONE/TQ(2)
+      CALL DSCAL (N, R, ACOR, 1)
+ 720  JSTART = 1
+      RETURN
+C----------------------- End of Subroutine DVSTEP ----------------------
+      END
+*DECK DVSET
+      SUBROUTINE DVSET
+C-----------------------------------------------------------------------
+C Call sequence communication.. None
+C COMMON block variables accessed..
+C     /DVOD01/ -- EL(13), H, TAU(13), TQ(5), L(= NQ + 1),
+C                 METH, NQ, NQWAIT
+C
+C Subroutines called by DVSET.. None
+C Function routines called by DVSET.. None
+C-----------------------------------------------------------------------
+C DVSET is called by DVSTEP and sets coefficients for use there.
+C
+C For each order NQ, the coefficients in EL are calculated by use of
+C  the generating polynomial lambda(x), with coefficients EL(i).
+C      lambda(x) = EL(1) + EL(2)*x + ... + EL(NQ+1)*(x**NQ).
+C For the backward differentiation formulas,
+C                                     NQ-1
+C      lambda(x) = (1 + x/xi*(NQ)) * product (1 + x/xi(i) ) .
+C                                     i = 1
+C For the Adams formulas,
+C                              NQ-1
+C      (d/dx) lambda(x) = c * product (1 + x/xi(i) ) ,
+C                              i = 1
+C      lambda(-1) = 0,    lambda(0) = 1,
+C where c is a normalization constant.
+C In both cases, xi(i) is defined by
+C      H*xi(i) = t sub n  -  t sub (n-i)
+C              = H + TAU(1) + TAU(2) + ... TAU(i-1).
+C
+C
+C In addition to variables described previously, communication
+C with DVSET uses the following..
+C   TAU    = A vector of length 13 containing the past NQ values
+C            of H.
+C   EL     = A vector of length 13 in which vset stores the
+C            coefficients for the corrector formula.
+C   TQ     = A vector of length 5 in which vset stores constants
+C            used for the convergence test, the error test, and the
+C            selection of H at a new order.
+C   METH   = The basic method indicator.
+C   NQ     = The current order.
+C   L      = NQ + 1, the length of the vector stored in EL, and
+C            the number of columns of the YH array being used.
+C   NQWAIT = A counter controlling the frequency of order changes.
+C            An order change is about to be considered if NQWAIT = 1.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL AHATN0, ALPH0, CNQM1, CORTES, CSUM, ELP, EM,
+     1     EM0, FLOTI, FLOTL, FLOTNQ, HSUM, ONE, RXI, RXIS, S, SIX,
+     2     T1, T2, T3, T4, T5, T6, TWO, XI, ZERO
+      INTEGER I, IBACK, J, JP1, NQM1, NQM2
+C
+      DIMENSION EM(13)
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE CORTES, ONE, SIX, TWO, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+C
+      DATA CORTES /0.1D0/
+      DATA ONE  /1.0D0/, SIX /6.0D0/, TWO /2.0D0/, ZERO /0.0D0/
+C
+      FLOTL = REAL(L)
+      NQM1 = NQ - 1
+      NQM2 = NQ - 2
+      GO TO (100, 200), METH
+C
+C Set coefficients for Adams methods. ----------------------------------
+ 100  IF (NQ .NE. 1) GO TO 110
+      EL(1) = ONE
+      EL(2) = ONE
+      TQ(1) = ONE
+      TQ(2) = TWO
+      TQ(3) = SIX*TQ(2)
+      TQ(5) = ONE
+      GO TO 300
+ 110  HSUM = H
+      EM(1) = ONE
+      FLOTNQ = FLOTL - ONE
+      DO 115 I = 2, L
+ 115    EM(I) = ZERO
+      DO 150 J = 1, NQM1
+        IF ((J .NE. NQM1) .OR. (NQWAIT .NE. 1)) GO TO 130
+        S = ONE
+        CSUM = ZERO
+        DO 120 I = 1, NQM1
+          CSUM = CSUM + S*EM(I)/REAL(I+1)
+ 120      S = -S
+        TQ(1) = EM(NQM1)/(FLOTNQ*CSUM)
+ 130    RXI = H/HSUM
+        DO 140 IBACK = 1, J
+          I = (J + 2) - IBACK
+ 140      EM(I) = EM(I) + EM(I-1)*RXI
+        HSUM = HSUM + TAU(J)
+ 150    CONTINUE
+C Compute integral from -1 to 0 of polynomial and of x times it. -------
+      S = ONE
+      EM0 = ZERO
+      CSUM = ZERO
+      DO 160 I = 1, NQ
+        FLOTI = REAL(I)
+        EM0 = EM0 + S*EM(I)/FLOTI
+        CSUM = CSUM + S*EM(I)/(FLOTI+ONE)
+ 160    S = -S
+C In EL, form coefficients of normalized integrated polynomial. --------
+      S = ONE/EM0
+      EL(1) = ONE
+      DO 170 I = 1, NQ
+ 170    EL(I+1) = S*EM(I)/REAL(I)
+      XI = HSUM/H
+      TQ(2) = XI*EM0/CSUM
+      TQ(5) = XI/EL(L)
+      IF (NQWAIT .NE. 1) GO TO 300
+C For higher order control constant, multiply polynomial by 1+x/xi(q). -
+      RXI = ONE/XI
+      DO 180 IBACK = 1, NQ
+        I = (L + 1) - IBACK
+ 180    EM(I) = EM(I) + EM(I-1)*RXI
+C Compute integral of polynomial. --------------------------------------
+      S = ONE
+      CSUM = ZERO
+      DO 190 I = 1, L
+        CSUM = CSUM + S*EM(I)/REAL(I+1)
+ 190    S = -S
+      TQ(3) = FLOTL*EM0/CSUM
+      GO TO 300
+C
+C Set coefficients for BDF methods. ------------------------------------
+ 200  DO 210 I = 3, L
+ 210    EL(I) = ZERO
+      EL(1) = ONE
+      EL(2) = ONE
+      ALPH0 = -ONE
+      AHATN0 = -ONE
+      HSUM = H
+      RXI = ONE
+      RXIS = ONE
+      IF (NQ .EQ. 1) GO TO 240
+      DO 230 J = 1, NQM2
+C In EL, construct coefficients of (1+x/xi(1))*...*(1+x/xi(j+1)). ------
+        HSUM = HSUM + TAU(J)
+        RXI = H/HSUM
+        JP1 = J + 1
+        ALPH0 = ALPH0 - ONE/REAL(JP1)
+        DO 220 IBACK = 1, JP1
+          I = (J + 3) - IBACK
+ 220      EL(I) = EL(I) + EL(I-1)*RXI
+ 230    CONTINUE
+      ALPH0 = ALPH0 - ONE/REAL(NQ)
+      RXIS = -EL(2) - ALPH0
+      HSUM = HSUM + TAU(NQM1)
+      RXI = H/HSUM
+      AHATN0 = -EL(2) - RXI
+      DO 235 IBACK = 1, NQ
+        I = (NQ + 2) - IBACK
+ 235    EL(I) = EL(I) + EL(I-1)*RXIS
+ 240  T1 = ONE - AHATN0 + ALPH0
+      T2 = ONE + REAL(NQ)*T1
+      TQ(2) = ABS(ALPH0*T2/T1)
+      TQ(5) = ABS(T2/(EL(L)*RXI/RXIS))
+      IF (NQWAIT .NE. 1) GO TO 300
+      CNQM1 = RXIS/EL(L)
+      T3 = ALPH0 + ONE/REAL(NQ)
+      T4 = AHATN0 + RXI
+      ELP = T3/(ONE - T4 + T3)
+      TQ(1) = ABS(ELP/CNQM1)
+      HSUM = HSUM + TAU(NQ)
+      RXI = H/HSUM
+      T5 = ALPH0 - ONE/REAL(NQ+1)
+      T6 = AHATN0 - RXI
+      ELP = T2/(ONE - T6 + T5)
+      TQ(3) = ABS(ELP*RXI*(FLOTL + ONE)*T5)
+ 300  TQ(4) = CORTES*TQ(2)
+      RETURN
+C----------------------- End of Subroutine DVSET -----------------------
+      END
+*DECK DVJUST
+      SUBROUTINE DVJUST (YH, LDYH, IORD)
+      KPP_REAL YH
+      INTEGER LDYH, IORD
+      DIMENSION YH(LDYH,*)
+C-----------------------------------------------------------------------
+C Call sequence input -- YH, LDYH, IORD
+C Call sequence output -- YH
+C COMMON block input -- NQ, METH, LMAX, HSCAL, TAU(13), N
+C COMMON block variables accessed..
+C     /DVOD01/ -- HSCAL, TAU(13), LMAX, METH, N, NQ,
+C
+C Subroutines called by DVJUST.. DAXPY
+C Function routines called by DVJUST.. None
+C-----------------------------------------------------------------------
+C This subroutine adjusts the YH array on reduction of order,
+C and also when the order is increased for the stiff option (METH = 2).
+C Communication with DVJUST uses the following..
+C IORD  = An integer flag used when METH = 2 to indicate an order
+C         increase (IORD = +1) or an order decrease (IORD = -1).
+C HSCAL = Step size H used in scaling of Nordsieck array YH.
+C         (If IORD = +1, DVJUST assumes that HSCAL = TAU(1).)
+C See References 1 and 2 for details.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL ALPH0, ALPH1, HSUM, ONE, PROD, T1, XI,XIOLD, ZERO
+      INTEGER I, IBACK, J, JP1, LP1, NQM1, NQM2, NQP1
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE ONE, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+C
+      DATA ONE /1.0D0/, ZERO /0.0D0/
+C
+      IF ((NQ .EQ. 2) .AND. (IORD .NE. 1)) RETURN
+      NQM1 = NQ - 1
+      NQM2 = NQ - 2
+      GO TO (100, 200), METH
+C-----------------------------------------------------------------------
+C Nonstiff option...
+C Check to see if the order is being increased or decreased.
+C-----------------------------------------------------------------------
+ 100  CONTINUE
+      IF (IORD .EQ. 1) GO TO 180
+C Order decrease. ------------------------------------------------------
+      DO 110 J = 1, LMAX
+ 110    EL(J) = ZERO
+      EL(2) = ONE
+      HSUM = ZERO
+      DO 130 J = 1, NQM2
+C Construct coefficients of x*(x+xi(1))*...*(x+xi(j)). -----------------
+        HSUM = HSUM + TAU(J)
+        XI = HSUM/HSCAL
+        JP1 = J + 1
+        DO 120 IBACK = 1, JP1
+          I = (J + 3) - IBACK
+ 120      EL(I) = EL(I)*XI + EL(I-1)
+ 130    CONTINUE
+C Construct coefficients of integrated polynomial. ---------------------
+      DO 140 J = 2, NQM1
+ 140    EL(J+1) = REAL(NQ)*EL(J)/REAL(J)
+C Subtract correction terms from YH array. -----------------------------
+      DO 170 J = 3, NQ
+        DO 160 I = 1, N
+ 160      YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+ 170    CONTINUE
+      RETURN
+C Order increase. ------------------------------------------------------
+C Zero out next column in YH array. ------------------------------------
+ 180  CONTINUE
+      LP1 = L + 1
+      DO 190 I = 1, N
+ 190    YH(I,LP1) = ZERO
+      RETURN
+C-----------------------------------------------------------------------
+C Stiff option...
+C Check to see if the order is being increased or decreased.
+C-----------------------------------------------------------------------
+ 200  CONTINUE
+      IF (IORD .EQ. 1) GO TO 300
+C Order decrease. ------------------------------------------------------
+      DO 210 J = 1, LMAX
+ 210    EL(J) = ZERO
+      EL(3) = ONE
+      HSUM = ZERO
+      DO 230 J = 1,NQM2
+C Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)). ---------------
+        HSUM = HSUM + TAU(J)
+        XI = HSUM/HSCAL
+        JP1 = J + 1
+        DO 220 IBACK = 1, JP1
+          I = (J + 4) - IBACK
+ 220      EL(I) = EL(I)*XI + EL(I-1)
+ 230    CONTINUE
+C Subtract correction terms from YH array. -----------------------------
+      DO 250 J = 3,NQ
+        DO 240 I = 1, N
+ 240      YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+ 250    CONTINUE
+      RETURN
+C Order increase. ------------------------------------------------------
+ 300  DO 310 J = 1, LMAX
+ 310    EL(J) = ZERO
+      EL(3) = ONE
+      ALPH0 = -ONE
+      ALPH1 = ONE
+      PROD = ONE
+      XIOLD = ONE
+      HSUM = HSCAL
+      IF (NQ .EQ. 1) GO TO 340
+      DO 330 J = 1, NQM1
+C Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)). ---------------
+        JP1 = J + 1
+        HSUM = HSUM + TAU(JP1)
+        XI = HSUM/HSCAL
+        PROD = PROD*XI
+        ALPH0 = ALPH0 - ONE/REAL(JP1)
+        ALPH1 = ALPH1 + ONE/XI
+        DO 320 IBACK = 1, JP1
+          I = (J + 4) - IBACK
+ 320      EL(I) = EL(I)*XIOLD + EL(I-1)
+        XIOLD = XI
+ 330    CONTINUE
+ 340  CONTINUE
+      T1 = (-ALPH0 - ALPH1)/PROD
+C Load column L + 1 in YH array. ---------------------------------------
+      LP1 = L + 1
+      DO 350 I = 1, N
+ 350    YH(I,LP1) = T1*YH(I,LMAX)
+C Add correction terms to YH array. ------------------------------------
+      NQP1 = NQ + 1
+      DO 370 J = 3, NQP1
+        CALL DAXPY (N, EL(J), YH(1,LP1), 1, YH(1,J), 1 )
+ 370  CONTINUE
+      RETURN
+C----------------------- End of Subroutine DVJUST ----------------------
+      END
+*DECK DVNLSD
+      SUBROUTINE DVNLSD (Y, YH, LDYH, VSAV, SAVF, EWT, ACOR, IWM, WM,
+     1                 F, JAC, PDUM, NFLAG, RPAR, IPAR)
+      EXTERNAL F, JAC, PDUM
+      KPP_REAL Y, YH, VSAV, SAVF, EWT, ACOR, WM, RPAR
+      INTEGER LDYH, IWM, NFLAG, IPAR
+      DIMENSION Y(*), YH(LDYH,*), VSAV(*), SAVF(*), EWT(*), ACOR(*),
+     1          IWM(*), WM(*), RPAR(*), IPAR(*)
+
+C-----------------------------------------------------------------------
+C Call sequence input -- Y, YH, LDYH, SAVF, EWT, ACOR, IWM, WM,
+C                        F, JAC, NFLAG, RPAR, IPAR
+C Call sequence output -- YH, ACOR, WM, IWM, NFLAG
+C COMMON block variables accessed..
+C     /DVOD01/ ACNRM, CRATE, DRC, H, RC, RL1, TQ(5), TN, ICF,
+C                JCUR, METH, MITER, N, NSLP
+C     /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Subroutines called by DVNLSD.. F, DAXPY, DCOPY, DSCAL, DVJAC, DVSOL
+C Function routines called by DVNLSD.. DVNORM
+C-----------------------------------------------------------------------
+C Subroutine DVNLSD is a nonlinear system solver, which uses functional
+C iteration or a chord (modified Newton) method.  For the chord method
+C direct linear algebraic system solvers are used.  Subroutine DVNLSD
+C then handles the corrector phase of this integration package.
+C
+C Communication with DVNLSD is done with the following variables. (For
+C more details, please see the comments in the driver subroutine.)
+C
+C Y          = The dependent variable, a vector of length N, input.
+C YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+C              and output.  On input, it contains predicted values.
+C LDYH       = A constant .ge. N, the first dimension of YH, input.
+C VSAV       = Unused work array.
+C SAVF       = A work array of length N.
+C EWT        = An error weight vector of length N, input.
+C ACOR       = A work array of length N, used for the accumulated
+C              corrections to the predicted y vector.
+C WM,IWM     = Real and integer work arrays associated with matrix
+C              operations in chord iteration (MITER .ne. 0).
+C F          = Dummy name for user supplied routine for f.
+C JAC        = Dummy name for user supplied Jacobian routine.
+C PDUM       = Unused dummy subroutine name.  Included for uniformity
+C              over collection of integrators.
+C NFLAG      = Input/output flag, with values and meanings as follows..
+C              INPUT
+C                  0 first CALL for this time step.
+C                 -1 convergence failure in previous CALL to DVNLSD.
+C                 -2 error test failure in DVSTEP.
+C              OUTPUT
+C                  0 successful completion of nonlinear solver.
+C                 -1 convergence failure or singular matrix.
+C                 -2 unrecoverable error in matrix preprocessing
+C                    (cannot occur here).
+C                 -3 unrecoverable error in solution (cannot occur
+C                    here).
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C
+C IPUP       = Own variable flag with values and meanings as follows..
+C              0,            do not update the Newton matrix.
+C              MITER .ne. 0, update Newton matrix, because it is the
+C                            initial step, order was changed, the error
+C                            test failed, or an update is indicated by
+C                            the scalar RC or step counter NST.
+C
+C For more details, see comments in driver subroutine.
+C-----------------------------------------------------------------------
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL CCMAX, CRDOWN, CSCALE, DCON, DEL, DELP, ONE,
+     1     RDIV, TWO, ZERO
+      INTEGER I, IERPJ, IERSL, M, MAXCOR, MSBP
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM, STEPCUT
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE CCMAX, CRDOWN, MAXCOR, MSBP, RDIV, ONE, TWO, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      COMMON /VERWER/ IVERWER, IBEGIN, STEPCUT
+      DATA CCMAX /0.3D0/, CRDOWN /0.3D0/, MAXCOR /3/, MSBP /20/,
+     1     RDIV  /2.0D0/
+      DATA ONE /1.0D0/, TWO /2.0D0/, ZERO /0.0D0/
+C-----------------------------------------------------------------------
+C On the first step, on a change of method order, or after a
+C nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+C to force a Jacobian update when MITER .ne. 0.
+C-----------------------------------------------------------------------
+      if ( (h.lt.stepcut).and.(IBEGIN.eq.1) ) then
+c      if (h.lt.stepcut) then
+         iverwer = 1
+      else
+         ibegin = 0
+         iverwer = 0
+      end if
+      IF (JSTART .EQ. 0) NSLP = 0
+      IF (NFLAG .EQ. 0) ICF = 0
+      IF (NFLAG .EQ. -2) IPUP = MITER
+      IF ( (JSTART .EQ. 0) .OR. (JSTART .EQ. -1) ) IPUP = MITER
+C If this is functional iteration, set CRATE .eq. 1 and drop to 220
+      IF (MITER .EQ. 0) THEN
+        CRATE = ONE
+        GO TO 220
+      ENDIF
+C-----------------------------------------------------------------------
+C RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+C When RC differs from 1 by more than CCMAX, IPUP is set to MITER
+C to force DVJAC to be called, if a Jacobian is involved.
+C In any case, DVJAC is called at least every MSBP steps.
+C-----------------------------------------------------------------------
+      DRC = ABS(RC-ONE)
+      IF (DRC .GT. CCMAX .OR. NST .GE. NSLP+MSBP) IPUP = MITER
+C-----------------------------------------------------------------------
+C Up to MAXCOR corrector iterations are taken.  A convergence test is
+C made on the r.m.s. norm of each correction, weighted by the error
+C weight vector EWT.  The sum of the corrections is accumulated in the
+C vector ACOR(i).  The YH array is not altered in the corrector loop.
+C-----------------------------------------------------------------------
+ 220  M = 0
+      DELP = ZERO
+      CALL DCOPY (N, YH(1,1), 1, Y, 1 )
+      CALL F (N, TN, Y, SAVF)
+      NFE = NFE + 1
+      IF (IPUP .LE. 0) GO TO 250
+C-----------------------------------------------------------------------
+C If indicated, the matrix P = I - h*rl1*J is reevaluated and
+C preprocessed before starting the corrector iteration.  IPUP is set
+C to 0 as an indicator that this has been done.
+C-----------------------------------------------------------------------
+      IF (IVERWER.EQ.0) THEN
+      CALL DVJAC (Y, YH, LDYH, EWT, ACOR, SAVF, WM, IWM, F, JAC, IERPJ,
+     1           RPAR, IPAR)
+      ELSE
+        IERPJ = 0
+      END IF
+      IPUP = 0
+      RC = ONE
+      DRC = ZERO
+      CRATE = ONE
+      NSLP = NST
+C If matrix is singular, take error return to force cut in step size. --
+      IF (IERPJ .NE. 0) GO TO 430
+ 250  DO 260 I = 1,N
+ 260    ACOR(I) = ZERO
+C This is a looping point for the corrector iteration. -----------------
+ 270  IF (MITER .NE. 0) GO TO 350
+C-----------------------------------------------------------------------
+C In the case of functional iteration, update Y directly from
+C the result of the last function evaluation.
+C-----------------------------------------------------------------------
+      DO 280 I = 1,N
+ 280    SAVF(I) = RL1*(H*SAVF(I) - YH(I,2))
+      DO 290 I = 1,N
+ 290    Y(I) = SAVF(I) - ACOR(I)
+      DEL = DVNORM (N, Y, EWT)
+      DO 300 I = 1,N
+ 300    Y(I) = YH(I,1) + SAVF(I)
+      CALL DCOPY (N, SAVF, 1, ACOR, 1)
+      GO TO 400
+C-----------------------------------------------------------------------
+C In the case of the chord method, compute the corrector error,
+C and solve the linear system with that as right-hand side and
+C P as coefficient matrix.  The correction is scaled by the factor
+C 2/(1+RC) to account for changes in h*rl1 since the last DVJAC call.
+C-----------------------------------------------------------------------
+ 350  continue
+      if (IVERWER.EQ.1) then
+      CRATE = 1
+      DO  I = 1,N
+        Y(I) = SAVF(I) - ACOR(I)
+      end do
+      DEL = DVNORM (N, Y, EWT)
+      DO  I = 1,N
+         Y(I) = YH(I,1) + SAVF(I)
+      end do
+      CALL DCOPY (N, SAVF, 1, ACOR, 1)
+      GO TO 400
+      end if
+      DO 360 I = 1,N
+ 360    Y(I) = (RL1*H)*SAVF(I) - (RL1*YH(I,2) + ACOR(I))
+        CALL DVSOL (WM, IWM, Y, IERSL)
+      NNI = NNI + 1
+      IF (IERSL .GT. 0) GO TO 410
+      IF (METH .EQ. 2 .AND. RC .NE. ONE) THEN
+        CSCALE = TWO/(ONE + RC)
+        CALL DSCAL (N, CSCALE, Y, 1)
+      ENDIF
+      DEL = DVNORM (N, Y, EWT)
+      CALL DAXPY (N, ONE, Y, 1, ACOR, 1)
+      DO 380 I = 1,N
+ 380    Y(I) = YH(I,1) + ACOR(I)
+C-----------------------------------------------------------------------
+C Test for convergence.  If M .gt. 0, an estimate of the convergence
+C rate constant is stored in CRATE, and this is used in the test.
+C-----------------------------------------------------------------------
+ 400  IF (M .NE. 0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+      DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+      IF (DCON .LE. ONE) GO TO 450
+      M = M + 1
+      IF (M .EQ. MAXCOR) GO TO 410
+      IF (M .GE. 2 .AND. DEL .GT. RDIV*DELP) GO TO 410
+      DELP = DEL
+      CALL F (N, TN, Y, SAVF)
+      NFE = NFE + 1
+      GO TO 270
+C
+ 410  IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430
+      ICF = 1
+      IPUP = MITER
+      GO TO 220
+C
+ 430  CONTINUE
+      NFLAG = -1
+      ICF = 2
+      IPUP = MITER
+      RETURN
+C
+C Return for successful step. ------------------------------------------
+ 450  NFLAG = 0
+      JCUR = 0
+      ICF = 0
+      IF (M .EQ. 0) ACNRM = DEL
+      IF (M .GT. 0) ACNRM = DVNORM (N, ACOR, EWT)
+      RETURN
+C----------------------- End of Subroutine DVNLSD ----------------------
+      END
+
+*DECK DVJAC
+      SUBROUTINE DVJAC (Y, YH, LDYH, EWT, FTEM, SAVF, WM, IWM, FUN, JAC,
+     1                 IERPJ, RPAR, IPAR)
+C       IMPLICIT KPP_REAL (A-H, O-Z)
+       INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      EXTERNAL FUN, JAC
+      KPP_REAL Y, YH, EWT, FTEM, SAVF, WM, RPAR
+      INTEGER LDYH, IWM, IERPJ, IPAR
+      DIMENSION Y(*), YH(LDYH,*), EWT(*), FTEM(*), SAVF(*),
+     1   WM(*), IWM(*), RPAR(*), IPAR(*)
+
+C-----------------------------------------------------------------------
+C Call sequence input -- Y, YH, LDYH, EWT, FTEM, SAVF, WM, IWM,
+C                        FUN, JAC, RPAR, IPAR
+C Call sequence output -- WM, IWM, IERPJ
+C COMMON block variables accessed..
+C     /DVOD01/  CCMXJ, DRC, H, RL1, TN, UROUND, ICF, JCUR, LOCJS,
+C               MSBJ, NSLJ
+C     /DVOD02/  NFE, NST, NJE, NLU
+C
+C Subroutines called by DVJAC.. FUN, JAC, DACOPY, DCOPY, DGBFA, DGEFA,
+C                              DSCAL
+C Function routines called by DVJAC.. DVNORM
+C-----------------------------------------------------------------------
+C DVJAC is called by DVSTEP to compute and process the matrix
+C P = I - h*rl1*J , where J is an approximation to the Jacobian.
+C Here J is computed by the user-supplied routine JAC if
+C MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.
+C If MITER = 3, a diagonal approximation to J is used.
+C If JSV = -1, J is computed from scratch in all cases.
+C If JSV = 1 and MITER = 1, 2, 4, or 5, and if the saved value of J is
+C considered acceptable, then P is constructed from the saved J.
+C J is stored in wm and replaced by P.  If MITER .ne. 3, P is then
+C subjected to LU decomposition in preparation for later solution
+C of linear systems with P as coefficient matrix. This is done
+C by DGEFA if MITER = 1 or 2, and by DGBFA if MITER = 4 or 5.
+C
+C Communication with DVJAC is done with the following variables.  (For
+C more details, please see the comments in the driver subroutine.)
+C Y          = Vector containing predicted values on entry.
+C YH         = The Nordsieck array, an LDYH by LMAX array, input.
+C LDYH       = A constant .ge. N, the first dimension of YH, input.
+C EWT        = An error weight vector of length N.
+C SAVF       = Array containing f evaluated at predicted y, input.
+C WM         = Real work space for matrices.  In the output, it containS
+C              the inverse diagonal matrix if MITER = 3 and the LU
+C              decomposition of P if MITER is 1, 2 , 4, or 5.
+C              Storage of matrix elements starts at WM(3).
+C              Storage of the saved Jacobian starts at WM(LOCJS).
+C              WM also contains the following matrix-related data..
+C              WM(1) = SQRT(UROUND), used in numerical Jacobian step.
+C              WM(2) = H*RL1, saved for later use if MITER = 3.
+C IWM        = Integer work space containing pivot information,
+C              starting at IWM(31), if MITER is 1, 2, 4, or 5.
+C              IWM also contains band parameters ML = IWM(1) and
+C              MU = IWM(2) if MITER is 4 or 5.
+C FUN          = Dummy name for the user supplied subroutine for f.
+C JAC        = Dummy name for the user supplied Jacobian subroutine.
+C RPAR, IPAR = Dummy names for user's real and integer work arrays.
+C RL1        = 1/EL(2) (input).
+C IERPJ      = Output error flag,  = 0 if no trouble, 1 if the P
+C              matrix is found to be singular.
+C JCUR       = Output flag to indicate whether the Jacobian matrix
+C              (or approximation) is now current.
+C              JCUR = 0 means J is not current.
+C              JCUR = 1 means J is current.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for labeled COMMON block DVOD02 --------------------
+C
+      KPP_REAL HU
+      INTEGER NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+C Type declarations for local variables --------------------------------
+C
+      KPP_REAL CON, DI, FAC, HRL1, ONE, PT1, R, R0, SRUR, THOU,
+     1     YI, YJ, YJJ, ZERO
+      INTEGER I, I1, I2, IER, II, J, J1, JJ, JOK, LENP, MBA, MBAND,
+     1        MEB1, MEBAND, ML, ML3, MU, NP1
+C
+C Type declaration for function subroutines called ---------------------
+C
+      KPP_REAL DVNORM
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this subroutine.
+C-----------------------------------------------------------------------
+      SAVE ONE, PT1, THOU, ZERO
+C-----------------------------------------------------------------------
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+      COMMON /DVOD02/ HU, NCFN, NETF, NFE, NJE, NLU, NNI, NQU, NST
+C
+      DATA ONE /1.0D0/, THOU /1000.0D0/, ZERO /0.0D0/, PT1 /0.1D0/
+C
+      IER = 0
+      IERPJ = 0
+      HRL1 = H*RL1
+C See whether J should be evaluated (JOK = -1) or not (JOK = 1). -------
+      JOK = JSV
+      IF (JSV .EQ. 1) THEN
+        IF (NST .EQ. 0 .OR. NST .GT. NSLJ+MSBJ) JOK = -1
+        IF (ICF .EQ. 1 .AND. DRC .LT. CCMXJ) JOK = -1
+        IF (ICF .EQ. 2) JOK = -1
+      ENDIF
+C End of setting JOK. --------------------------------------------------
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 1) THEN
+C If JOK = -1 and MITER = 1, CALL JAC to evaluate Jacobian. ------------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      LENP = LU_NONZERO
+      DO 110 I = 1,LENP
+ 110    WM(I+2) = ZERO
+
+c      CALL Update_SUN(TN)
+c      CALL Update_RCONST()
+      CALL JAC (N, TN, Y, WM(3))
+      IF (JSV .EQ. 1) CALL DCOPY (LENP, WM(3), 1, WM(LOCJS), 1)
+      ENDIF
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 2) THEN
+C If MITER = 2, make N calls to FUN to approximate the Jacobian. ---------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      FAC = DVNORM (N, SAVF, EWT)
+      R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      SRUR = WM(1)
+      J1 = 2
+      DO 230 J = 1,N
+        YJ = Y(J)
+        R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+        Y(J) = Y(J) + R
+        FAC = ONE/R
+        CALL FUN (N, TN, Y, FTEM)
+        DO 220 I = 1,N
+ 220      WM(I+J1) = (FTEM(I) - SAVF(I))*FAC
+        Y(J) = YJ
+        J1 = J1 + N
+ 230    CONTINUE
+      NFE = NFE + N
+      LENP = LU_NONZERO
+      IF (JSV .EQ. 1) CALL DCOPY (LENP, WM(3), 1, WM(LOCJS), 1)
+      ENDIF
+C
+      IF (JOK .EQ. 1 .AND. (MITER .EQ. 1 .OR. MITER .EQ. 2)) THEN
+      JCUR = 0
+      LENP = LU_NONZERO
+      CALL DCOPY (LENP, WM(LOCJS), 1, WM(3), 1)
+      ENDIF
+C
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) THEN
+C Multiply Jacobian by scalar, add identity, and do LU decomposition. --
+      CON = -HRL1
+      CALL DSCAL (LENP, CON, WM(3), 1)
+      J = 3
+      NP1 = N + 1
+      DO 250 I = 1,N
+        WM(2+LU_DIAG(i)) = WM(2+LU_DIAG(i)) + ONE
+ 250  CONTINUE
+      NLU = NLU + 1
+C      CALL DGEFA (WM(3), N, N, IWM(31), IER)
+      CALL KppDecomp ( WM(3), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+      ENDIF
+C End of code block for MITER = 1 or 2. --------------------------------
+C
+      IF (MITER .EQ. 3) THEN
+C If MITER = 3, construct a diagonal approximation to J and P. ---------
+      NJE = NJE + 1
+      JCUR = 1
+      WM(2) = HRL1
+      R = RL1*PT1
+      DO 310 I = 1,N
+ 310    Y(I) = Y(I) + R*(H*SAVF(I) - YH(I,2))
+      CALL FUN (N, TN, Y, WM(3))
+      NFE = NFE + 1
+      DO 320 I = 1,N
+        R0 = H*SAVF(I) - YH(I,2)
+        DI = PT1*R0 - H*(WM(I+2) - SAVF(I))
+        WM(I+2) = ONE
+        IF (ABS(R0) .LT. UROUND/EWT(I)) GO TO 320
+        IF (ABS(DI) .EQ. ZERO) GO TO 330
+        WM(I+2) = PT1*R0/DI
+ 320    CONTINUE
+      RETURN
+ 330  IERPJ = 1
+      RETURN
+      ENDIF
+C End of code block for MITER = 3. -------------------------------------
+C
+C Set constants for MITER = 4 or 5. ------------------------------------
+      ML = IWM(1)
+      MU = IWM(2)
+      ML3 = ML + 3
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      LENP = MEBAND*N
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 4) THEN
+C If JOK = -1 and MITER = 4, CALL JAC to evaluate Jacobian. ------------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      DO 410 I = 1,LENP
+ 410    WM(I+2) = ZERO
+
+c      CALL Update_SUN(TN)
+c      CALL Update_RCONST()
+      CALL JAC (N, TN, Y, WM(ML3))
+      IF (JSV .EQ. 1)
+     1   CALL DACOPY (MBAND, N, WM(ML3), MEBAND, WM(LOCJS), MBAND)
+      ENDIF
+C
+      IF (JOK .EQ. -1 .AND. MITER .EQ. 5) THEN
+C If MITER = 5, make N calls to FUN to approximate the Jacobian. ---------
+      NJE = NJE + 1
+      NSLJ = NST
+      JCUR = 1
+      MBA = MIN(MBAND,N)
+      MEB1 = MEBAND - 1
+      SRUR = WM(1)
+      FAC = DVNORM (N, SAVF, EWT)
+      R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      DO 560 J = 1,MBA
+        DO 530 I = J,N,MBAND
+          YI = Y(I)
+          R = MAX(SRUR*ABS(YI),R0/EWT(I))
+ 530      Y(I) = Y(I) + R
+        CALL FUN (N, TN, Y, FTEM)
+        DO 550 JJ = J,N,MBAND
+          Y(JJ) = YH(JJ,1)
+          YJJ = Y(JJ)
+          R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+          FAC = ONE/R
+          I1 = MAX(JJ-MU,1)
+          I2 = MIN(JJ+ML,N)
+          II = JJ*MEB1 - ML + 2
+          DO 540 I = I1,I2
+ 540        WM(II+I) = (FTEM(I) - SAVF(I))*FAC
+ 550      CONTINUE
+ 560    CONTINUE
+      NFE = NFE + MBA
+      IF (JSV .EQ. 1)
+     1   CALL DACOPY (MBAND, N, WM(ML3), MEBAND, WM(LOCJS), MBAND)
+      ENDIF
+C
+      IF (JOK .EQ. 1) THEN
+      JCUR = 0
+      CALL DACOPY (MBAND, N, WM(LOCJS), MBAND, WM(ML3), MEBAND)
+      ENDIF
+C
+C Multiply Jacobian by scalar, add identity, and do LU decomposition.
+      CON = -HRL1
+      CALL DSCAL (LENP, CON, WM(3), 1 )
+      II = MBAND + 2
+      DO 580 I = 1,N
+        WM(II) = WM(II) + ONE
+ 580    II = II + MEBAND
+      NLU = NLU + 1
+C      CALL DGBFA (WM(3), MEBAND, N, ML, MU, IWM(31), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C End of code block for MITER = 4 or 5. --------------------------------
+C
+C----------------------- End of Subroutine DVJAC -----------------------
+      END
+*DECK DACOPY
+      SUBROUTINE DACOPY (NROW, NCOL, A, NROWA, B, NROWB)
+      KPP_REAL A, B
+      INTEGER NROW, NCOL, NROWA, NROWB
+      DIMENSION A(NROWA,NCOL), B(NROWB,NCOL)
+C-----------------------------------------------------------------------
+C Call sequence input -- NROW, NCOL, A, NROWA, NROWB
+C Call sequence output -- B
+C COMMON block variables accessed -- None
+C
+C Subroutines called by DACOPY.. DCOPY
+C Function routines called by DACOPY.. None
+C-----------------------------------------------------------------------
+C This routine copies one rectangular array, A, to another, B,
+C where A and B may have different row dimensions, NROWA and NROWB.
+C The data copied consists of NROW rows and NCOL columns.
+C-----------------------------------------------------------------------
+      INTEGER IC
+C
+      DO 20 IC = 1,NCOL
+        CALL DCOPY (NROW, A(1,IC), 1, B(1,IC), 1)
+ 20     CONTINUE
+C
+      RETURN
+C----------------------- End of Subroutine DACOPY ----------------------
+      END
+*DECK DVSOL
+      SUBROUTINE DVSOL (WM, IWM, X, IERSL)
+      KPP_REAL WM, X
+      INTEGER IWM, IERSL
+      DIMENSION WM(*), IWM(*), X(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- WM, IWM, X
+C Call sequence output -- X, IERSL
+C COMMON block variables accessed..
+C     /DVOD01/ -- H, RL1, MITER, N
+C
+C Subroutines called by DVSOL.. DGESL, DGBSL
+C Function routines called by DVSOL.. None
+C-----------------------------------------------------------------------
+C This routine manages the solution of the linear system arising from
+C a chord iteration.  It is called if MITER .ne. 0.
+C If MITER is 1 or 2, it calls DGESL to accomplish this.
+C If MITER = 3 it updates the coefficient H*RL1 in the diagonal
+C matrix, and then computes the solution.
+C If MITER is 4 or 5, it calls DGBSL.
+C Communication with DVSOL uses the following variables..
+C WM    = Real work space containing the inverse diagonal matrix if
+C         MITER = 3 and the LU decomposition of the matrix otherwise.
+C         Storage of matrix elements starts at WM(3).
+C         WM also contains the following matrix-related data..
+C         WM(1) = SQRT(UROUND) (not used here),
+C         WM(2) = HRL1, the previous value of H*RL1, used if MITER = 3.
+C IWM   = Integer work space containing pivot information, starting at
+C         IWM(31), if MITER is 1, 2, 4, or 5.  IWM also contains band
+C         parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.
+C X     = The right-hand side vector on input, and the solution vector
+C         on output, of length N.
+C IERSL = Output flag.  IERSL = 0 if no trouble occurred.
+C         IERSL = 1 if a singular matrix arose with MITER = 3.
+C-----------------------------------------------------------------------
+C
+C Type declarations for labeled COMMON block DVOD01 --------------------
+C
+      KPP_REAL ACNRM, CCMXJ, CONP, CRATE, DRC, EL,
+     1     ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2     RC, RL1, TAU, TQ, TN, UROUND
+      INTEGER ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     1        L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     2        LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     3        N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     4        NSLP, NYH
+C
+C Type declarations for local variables --------------------------------
+C
+      INTEGER I, MEBAND, ML, MU
+      KPP_REAL DI, HRL1, ONE, PHRL1, R, ZERO
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE ONE, ZERO
+C
+      COMMON /DVOD01/ ACNRM, CCMXJ, CONP, CRATE, DRC, EL(13),
+     1                ETA, ETAMAX, H, HMIN, HMXI, HNEW, HSCAL, PRL1,
+     2                RC, RL1, TAU(13), TQ(5), TN, UROUND,
+     3                ICF, INIT, IPUP, JCUR, JSTART, JSV, KFLAG, KUTH,
+     4                L, LMAX, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     5                LOCJS, MAXORD, METH, MITER, MSBJ, MXHNIL, MXSTEP,
+     6                N, NEWH, NEWQ, NHNIL, NQ, NQNYH, NQWAIT, NSLJ,
+     7                NSLP, NYH
+C
+      DATA ONE /1.0D0/, ZERO /0.0D0/
+C
+      IERSL = 0
+      GO TO (100, 100, 300, 400, 400), MITER
+C 100  CALL DGESL (WM(3), N, N, IWM(31), X, 0)
+ 100  CALL KppSolve (WM(3), X)
+      RETURN
+C
+ 300  PHRL1 = WM(2)
+      HRL1 = H*RL1
+      WM(2) = HRL1
+      IF (HRL1 .EQ. PHRL1) GO TO 330
+      R = HRL1/PHRL1
+      DO 320 I = 1,N
+        DI = ONE - R*(ONE - ONE/WM(I+2))
+        IF (ABS(DI) .EQ. ZERO) GO TO 390
+ 320    WM(I+2) = ONE/DI
+C
+ 330  DO 340 I = 1,N
+ 340    X(I) = WM(I+2)*X(I)
+      RETURN
+ 390  IERSL = 1
+      RETURN
+C
+ 400  ML = IWM(1)
+      MU = IWM(2)
+      MEBAND = 2*ML + MU + 1
+      CALL KppSolve (WM(3), X)
+      RETURN
+C----------------------- End of Subroutine DVSOL -----------------------
+      END
+*DECK DVSRCO
+      SUBROUTINE DVSRCO (RSAV, ISAV, JOB)
+      KPP_REAL RSAV
+      INTEGER ISAV, JOB
+      DIMENSION RSAV(*), ISAV(*)
+C-----------------------------------------------------------------------
+C Call sequence input -- RSAV, ISAV, JOB
+C Call sequence output -- RSAV, ISAV
+C COMMON block variables accessed -- All of /DVOD01/ and /DVOD02/
+C
+C Subroutines/functions called by DVSRCO.. None
+C-----------------------------------------------------------------------
+C This routine saves or restores (depending on JOB) the contents of the
+C COMMON blocks DVOD01 and DVOD02, which are used internally by DVODE.
+C
+C RSAV = real array of length 49 or more.
+C ISAV = integer array of length 41 or more.
+C JOB  = flag indicating to save or restore the COMMON blocks..
+C        JOB  = 1 if COMMON is to be saved (written to RSAV/ISAV).
+C        JOB  = 2 if COMMON is to be restored (read from RSAV/ISAV).
+C        A CALL with JOB = 2 presumes a prior CALL with JOB = 1.
+C-----------------------------------------------------------------------
+      KPP_REAL RVOD1, RVOD2
+      INTEGER IVOD1, IVOD2
+      INTEGER I, LENIV1, LENIV2, LENRV1, LENRV2
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE LENRV1, LENIV1, LENRV2, LENIV2
+C
+      COMMON /DVOD01/ RVOD1(48), IVOD1(33)
+      COMMON /DVOD02/ RVOD2(1), IVOD2(8)
+      DATA LENRV1/48/, LENIV1/33/, LENRV2/1/, LENIV2/8/
+C
+      IF (JOB .EQ. 2) GO TO 100
+      DO 10 I = 1,LENRV1
+ 10     RSAV(I) = RVOD1(I)
+      DO 15 I = 1,LENRV2
+ 15     RSAV(LENRV1+I) = RVOD2(I)
+C
+      DO 20 I = 1,LENIV1
+ 20     ISAV(I) = IVOD1(I)
+      DO 25 I = 1,LENIV2
+ 25     ISAV(LENIV1+I) = IVOD2(I)
+C
+      RETURN
+C
+ 100  CONTINUE
+      DO 110 I = 1,LENRV1
+ 110     RVOD1(I) = RSAV(I)
+      DO 115 I = 1,LENRV2
+ 115     RVOD2(I) = RSAV(LENRV1+I)
+C
+      DO 120 I = 1,LENIV1
+ 120     IVOD1(I) = ISAV(I)
+      DO 125 I = 1,LENIV2
+ 125     IVOD2(I) = ISAV(LENIV1+I)
+C
+      RETURN
+C----------------------- End of Subroutine DVSRCO ----------------------
+      END
+*DECK DEWSET
+      SUBROUTINE DEWSET (N, ITOL, RelTol, AbsTol, YCUR, EWT)
+      KPP_REAL RelTol, AbsTol, YCUR, EWT
+      INTEGER N, ITOL
+      DIMENSION RelTol(*), AbsTol(*), YCUR(N), EWT(N)
+C-----------------------------------------------------------------------
+C Call sequence input -- N, ITOL, RelTol, AbsTol, YCUR
+C Call sequence output -- EWT
+C COMMON block variables accessed -- None
+C
+C Subroutines/functions called by DEWSET.. None
+C-----------------------------------------------------------------------
+C This subroutine sets the error weight vector EWT according to
+C     EWT(i) = RelTol(i)*abs(YCUR(i)) + AbsTol(i),  i = 1,...,N,
+C with the subscript on RelTol and/or AbsTol possibly replaced by 1 above,
+C depending on the value of ITOL.
+C-----------------------------------------------------------------------
+      INTEGER I
+C
+      GO TO (10, 20, 30, 40), ITOL
+ 10   CONTINUE
+      DO 15 I = 1, N
+ 15     EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(1)
+      RETURN
+ 20   CONTINUE
+      DO 25 I = 1, N
+ 25     EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(I)
+      RETURN
+ 30   CONTINUE
+      DO 35 I = 1, N
+ 35     EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(1)
+      RETURN
+ 40   CONTINUE
+      DO 45 I = 1, N
+ 45     EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(I)
+      RETURN
+C----------------------- End of Subroutine DEWSET ----------------------
+      END
+*DECK DVNORM
+      KPP_REAL FUNCTION DVNORM (N, V, W)
+      KPP_REAL V, W
+      INTEGER N
+      DIMENSION V(N), W(N)
+C-----------------------------------------------------------------------
+C Call sequence input -- N, V, W
+C Call sequence output -- None
+C COMMON block variables accessed -- None
+C
+C Subroutines/functions called by DVNORM.. None
+C-----------------------------------------------------------------------
+C This function routine computes the weighted root-mean-square norm
+C of the vector of length N contained in the array V, with weights
+C contained in the array W of length N..
+C   DVNORM = sqrt( (1/N) * sum( V(i)*W(i) )**2 )
+C
+C  LOOP UNROLLING BY ADRIAN SANDU, AUG 2, 1995
+C
+C-----------------------------------------------------------------------
+      KPP_REAL SUM
+      INTEGER I
+C
+      SUM = 0.0D0
+
+   20 m = mod(n,7)
+      if( m .eq. 0 ) go to 40
+      do 30 i = 1,m
+        SUM =  SUM + (V(I)*W(I))**2
+   30 continue
+      if( n .lt. 7 ) return
+   40 mp1 = m + 1
+      do 50 i = mp1,n,7
+        SUM =  SUM + (V(I)*W(I))**2
+        SUM =  SUM + (V(I + 1)*W(I + 1))**2
+        SUM =  SUM + (V(I + 2)*W(I + 2))**2
+        SUM =  SUM + (V(I + 3)*W(I + 3))**2
+        SUM =  SUM + (V(I + 4)*W(I + 4))**2
+        SUM =  SUM + (V(I + 5)*W(I + 5))**2
+        SUM =  SUM + (V(I + 6)*W(I + 6))**2
+   50 continue
+
+      DVNORM = SQRT(SUM/REAL(N))
+      RETURN
+C----------------------- End of Function DVNORM ------------------------
+      END
+
+*DECK D1MACH
+      KPP_REAL FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C This routine computes the unit roundoff of the machine.
+C This is defined as the smallest positive machine number
+C u such that  1.0 + u .ne. 1.0
+C
+C Subroutines/functions called by D1MACH.. None
+C-----------------------------------------------------------------------
+      KPP_REAL U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- End of Function D1MACH ------------------------
+      END
+*DECK XERRWD
+      SUBROUTINE XERRWD (MSG, NMES, NERR, LEVEL, NI, I1, I2, NR, R1, R2)
+      KPP_REAL R1, R2
+      INTEGER NMES, NERR, LEVEL, NI, I1, I2, NR
+      CHARACTER*1 MSG(NMES)
+C-----------------------------------------------------------------------
+C Subroutines XERRWD, XSETF, XSETUN, and the two function routines
+C MFLGSV and LUNSAV, as given here, constitute a simplified version of
+C the SLATEC error handling package.
+C Written by A. C. Hindmarsh and P. N. Brown at LLNL.
+C Version of 13 April, 1989.
+C This version is in KPP_REAL.
+C
+C All arguments are input arguments.
+C
+C MSG    = The message (character array).
+C NMES   = The length of MSG (number of characters).
+C NERR   = The error number (not used).
+C LEVEL  = The error level..
+C          0 or 1 means recoverable (control returns to caller).
+C          2 means fatal (run is aborted--see note below).
+C NI     = Number of integers (0, 1, or 2) to be printed with message.
+C I1,I2  = Integers to be printed, depending on NI.
+C NR     = Number of reals (0, 1, or 2) to be printed with message.
+C R1,R2  = Reals to be printed, depending on NR.
+C
+C Note..  this routine is machine-dependent and specialized for use
+C in limited context, in the following ways..
+C 1. The argument MSG is assumed to be of type CHARACTER, and
+C    the message is printed with a format of (1X,80A1).
+C 2. The message is assumed to take only one line.
+C    Multi-line messages are generated by repeated calls.
+C 3. If LEVEL = 2, control passes to the statement   STOP
+C    to abort the run.  This statement may be machine-dependent.
+C 4. R1 and R2 are assumed to be in KPP_REAL and are printed
+C    in D21.13 format.
+C
+C For a different default logical unit number, change the data
+C statement in function routine LUNSAV.
+C For a different run-abort command, change the statement following
+C statement 100 at the end.
+C-----------------------------------------------------------------------
+C Subroutines called by XERRWD.. None
+C Function routines called by XERRWD.. MFLGSV, LUNSAV
+C-----------------------------------------------------------------------
+C
+      INTEGER I, LUNIT, LUNSAV, MESFLG, MFLGSV
+C
+C Get message print flag and logical unit number. ----------------------
+      MESFLG = MFLGSV (0,.FALSE.)
+      LUNIT = LUNSAV (0,.FALSE.)
+      IF (MESFLG .EQ. 0) GO TO 100
+C Write the message. ---------------------------------------------------
+      WRITE (LUNIT,10) (MSG(I),I=1,NMES)
+ 10   FORMAT(1X,80A1)
+      IF (NI .EQ. 1) WRITE (LUNIT, 20) I1
+ 20   FORMAT(6X,'In above message,  I1 =',I10)
+      IF (NI .EQ. 2) WRITE (LUNIT, 30) I1,I2
+ 30   FORMAT(6X,'In above message,  I1 =',I10,3X,'I2 =',I10)
+      IF (NR .EQ. 1) WRITE (LUNIT, 40) R1
+ 40   FORMAT(6X,'In above message,  R1 =',D21.13)
+      IF (NR .EQ. 2) WRITE (LUNIT, 50) R1,R2
+ 50   FORMAT(6X,'In above,  R1 =',D21.13,3X,'R2 =',D21.13)
+C Abort the run if LEVEL = 2. ------------------------------------------
+ 100  IF (LEVEL .NE. 2) RETURN
+      STOP
+C----------------------- End of Subroutine XERRWD ----------------------
+      END
+*DECK XSETF
+      SUBROUTINE XSETF (MFLAG)
+C-----------------------------------------------------------------------
+C This routine resets the print control flag MFLAG.
+C
+C Subroutines called by XSETF.. None
+C Function routines called by XSETF.. MFLGSV
+C-----------------------------------------------------------------------
+      INTEGER MFLAG, JUNK, MFLGSV
+C
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) JUNK = MFLGSV (MFLAG,.TRUE.)
+      RETURN
+C----------------------- End of Subroutine XSETF -----------------------
+      END
+*DECK XSETUN
+      SUBROUTINE XSETUN (LUN)
+C-----------------------------------------------------------------------
+C This routine resets the logical unit number for messages.
+C
+C Subroutines called by XSETUN.. None
+C Function routines called by XSETUN.. LUNSAV
+C-----------------------------------------------------------------------
+      INTEGER LUN, JUNK, LUNSAV
+C
+      IF (LUN .GT. 0) JUNK = LUNSAV (LUN,.TRUE.)
+      RETURN
+C----------------------- End of Subroutine XSETUN ----------------------
+      END
+*DECK MFLGSV
+      INTEGER FUNCTION MFLGSV (IVALUE, ISET)
+      LOGICAL ISET
+      INTEGER IVALUE
+C-----------------------------------------------------------------------
+C MFLGSV saves and recalls the parameter MESFLG which controls the
+C printing of the error messages.
+C
+C Saved local variable..
+C
+C   MESFLG = Print control flag..
+C            1 means print all messages (the default).
+C            0 means no printing.
+C
+C On input..
+C
+C   IVALUE = The value to be set for the MESFLG parameter,
+C            if ISET is .TRUE. .
+C
+C   ISET   = Logical flag to indicate whether to read or write.
+C            If ISET=.TRUE., the MESFLG parameter will be given
+C            the value IVALUE.  If ISET=.FALSE., the MESFLG
+C            parameter will be unchanged, and IVALUE is a dummy
+C            parameter.
+C
+C On return..
+C
+C   The (old) value of the MESFLG parameter will be returned
+C   in the function value, MFLGSV.
+C
+C This is a modification of the SLATEC library routine J4SAVE.
+C
+C Subroutines/functions called by MFLGSV.. None
+C-----------------------------------------------------------------------
+      INTEGER MESFLG
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE MESFLG
+      DATA MESFLG/1/
+C
+      MFLGSV = MESFLG
+      IF (ISET) MESFLG = IVALUE
+      RETURN
+C----------------------- End of Function MFLGSV ------------------------
+      END
+*DECK LUNSAV
+      INTEGER FUNCTION LUNSAV (IVALUE, ISET)
+      LOGICAL ISET
+      INTEGER IVALUE
+C-----------------------------------------------------------------------
+C LUNSAV saves and recalls the parameter LUNIT which is the logical
+C unit number to which error messages are printed.
+C
+C Saved local variable..
+C
+C  LUNIT   = Logical unit number for messages.
+C            The default is 6 (machine-dependent).
+C
+C On input..
+C
+C   IVALUE = The value to be set for the LUNIT parameter,
+C            if ISET is .TRUE. .
+C
+C   ISET   = Logical flag to indicate whether to read or write.
+C            If ISET=.TRUE., the LUNIT parameter will be given
+C            the value IVALUE.  If ISET=.FALSE., the LUNIT
+C            parameter will be unchanged, and IVALUE is a dummy
+C            parameter.
+C
+C On return..
+C
+C   The (old) value of the LUNIT parameter will be returned
+C   in the function value, LUNSAV.
+C
+C This is a modification of the SLATEC library routine J4SAVE.
+C
+C Subroutines/functions called by LUNSAV.. None
+C-----------------------------------------------------------------------
+      INTEGER LUNIT
+C-----------------------------------------------------------------------
+C The following Fortran-77 declaration is to cause the values of the
+C listed (local) variables to be saved between calls to this integrator.
+C-----------------------------------------------------------------------
+      SAVE LUNIT
+      DATA LUNIT/6/
+C
+      LUNSAV = LUNIT
+      IF (ISET) LUNIT = IVALUE
+      RETURN
+C----------------------- End of Function LUNSAV ------------------------
+      END
+
+        SUBROUTINE VODE_FSPLIT_VAR(N, T, Y, PR)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        INTEGER N
+        REAL*8 Told, T
+        REAL*8 Y(NVAR), PR(NVAR)
+
+        Told = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        CALL Fun( Y,  FIX, RCONST, PR )
+        TIME = Told
+        RETURN
+        END
+
+        SUBROUTINE VODE_Jac_SP(N, T, Y, J)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+        INTEGER N
+        REAL*8 Told, T
+        REAL*8 Y(NVAR), J(LU_NONZERO)
+
+        Told = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        CALL Jac_SP( Y,  FIX, RCONST, J )
+        TIME = Told
+        RETURN
+        END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f90	(revision 3477)
@@ -0,0 +1,19107 @@
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME, ATOL, RTOL
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve, &
+               Set2zero, WLAMCH
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  !~~~>  Statistics on the work performed by the VODE method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4,  &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihexit=2
+ 
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-8:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -8
+    'Step size too small                               ', & ! -7
+    'No of steps exceeds maximum bound                 ', & ! -6
+    'Improper tolerance values                         ', & ! -5
+    'FacMin/FacMax/FacRej must be positive             ', & ! -4
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3
+    'Improper value for maximal no of Newton iterations', & ! -2
+    'Improper value for maximal no of steps            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+
+! BEGINNING OF DVODE_F90_M PRIVATE SECTION.
+! Note: This global information is used throughout DVODE_F90.
+!_______________________________________________________________________
+! JACSPDB arrays and parameters.
+  LOGICAL, PRIVATE :: USE_JACSP, LIKE_ORIGINAL_VODE
+  INTEGER, PRIVATE :: INFODS, LIWADS, MAXGRPDS, MINGRPDS, NRFJACDS,    &
+    NCFJACDS, LWKDS, LIWKDS
+  INTEGER, ALLOCATABLE, PRIVATE :: INDROWDS(:), INDCOLDS(:),           &
+    NGRPDS(:), IPNTRDS(:), JPNTRDS(:), IWADS(:), IWKDS(:), IOPTDS(:)
+  KPP_REAL, ALLOCATABLE, PRIVATE :: YSCALEDS(:), WKDS(:), FACDS(:)
+  KPP_REAL, PRIVATE :: U125, U325
+!_______________________________________________________________________
+  LOGICAL, PARAMETER, PRIVATE :: USE_MA48_FOR_SPARSE=.FALSE.
+!_______________________________________________________________________
+! *****MA48 build change point. Replace the above statement.
+  LOGICAL, PARAMETER, PRIVATE :: USE_MA48_FOR_SPARSE=.TRUE.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+! MA48 type declarations:
+ TYPE(ZD01_TYPE) MATRIX
+ TYPE(MA48_CONTROL) CONTROL
+ TYPE(MA48_FACTORS) FACTORS
+ TYPE(MA48_AINFO) AINFO
+ TYPE(MA48_FINFO) FINFO
+ TYPE(MA48_SINFO) SINFO
+!_______________________________________________________________________
+! .. Parameters ..
+!     IPCUTH_MAX - maximum number of times the solver will halve the
+!                  stepsize to prevent an infeasible prediction if
+!                  solution bounds are used
+!     KFC        - maximum number of consecutive convergence failures
+!                  before crashing the order
+!     KFH        - maximum number of consecutive error test failures
+!                  before giving up (changed from 7 to 15)
+!     MAXCOR     - maximum number of corrections
+!     MSBP       - maximum number of steps before forming new P matrix
+!     MXNCF      - maximum number of consecutive convergence failures
+!                  before giving up
+!     MXHNLO     - maximum number of T+H=T messages
+!     MXSTP0     - maximum number of integration steps
+!     L*****     - lengths and pointers for some internal arrays
+!     INTEGER, PARAMETER, PRIVATE :: KFC = -3, KFH = -7, LENIV1 = 33,    &
+      INTEGER, PARAMETER, PRIVATE :: IPCUTH_MAX = 100, KFC = -3,         &
+        KFH = -15, LENIV1 = 33,                                          &
+        LENIV2 = 8, LENRV1 = 48, LENRV2 = 1, LIWUSER = 30, LRWUSER = 22, &
+        MAXCOR = 3, MAX_ARRAY_SIZE = 900000000, MSBP = 20, MXHNL0 = 10,  &
+        MXNCF = 10, MXSTP0 = 5000
+!_______________________________________________________________________
+! *****LAPACK build change point. Use .TRUE. for LAPACK.
+!     LOGICAL, PARAMETER, PRIVATE :: USE_LAPACK = .TRUE.
+!_______________________________________________________________________
+      KPP_REAL, PARAMETER, PRIVATE :: ADDON = 1.0E-6_dp
+      KPP_REAL, PARAMETER, PRIVATE :: BIAS1 = 6.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: BIAS2 = 6.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: BIAS3 = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: CCMAX = 0.3_dp
+      KPP_REAL, PARAMETER, PRIVATE :: CORTES = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: CRDOWN = 0.3_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETACF = 0.25_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMIN = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMX1 = 1.0E4_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMX2 = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMX3 = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMXF = 0.2_dp
+      KPP_REAL, PARAMETER, PRIVATE :: FIVE = 5.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: FOUR = 4.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: HALF = 0.5_dp
+      KPP_REAL, PARAMETER, PRIVATE :: HUN = 100.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: HUNDRETH = 0.01_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ONE = 1.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ONEPSM = 1.00001_dp
+      KPP_REAL, PARAMETER, PRIVATE :: PT1 = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: PT2 = 0.2_dp
+      KPP_REAL, PARAMETER, PRIVATE :: RDIV = 2.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: SIX = 6.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: TEN = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: TENTH = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: THOU = 1000.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: THRESH = 1.5_dp
+      KPP_REAL, PARAMETER, PRIVATE :: TWO = 2.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ZERO = 0.0_dp
+
+! Beginning of DVODE_F90 interface.
+! ..
+! .. Generic Interface Blocks ..
+      INTERFACE DVODE_F90
+
+!         VODE_F90 is the interface subroutine that is actually invoked
+!         when the user calls DVODE_F90. It in turn calls subroutine
+!         DVODE which is the driver that directs all the work.
+          MODULE PROCEDURE VODE_F90
+!         GET_STATS can be called to gather integration statistics.
+          MODULE PROCEDURE GET_STATS
+!         DVINDY can be called to interpolate the solution and derivative.
+          MODULE PROCEDURE DVINDY
+!         RELEASE_ARRAYS can be called to release/deallocate the work arrays.
+          MODULE PROCEDURE RELEASE_ARRAYS
+!         SET_IAJA can be called to set sparse matrix descriptor arrays.
+          MODULE PROCEDURE SET_IAJA
+!         USERSETS_IAJA can be called to set sparse matrix descriptor arrays.
+          MODULE PROCEDURE USERSETS_IAJA
+!         CHECK_STAT can be called to stop if a storage allocation or
+!         deallocation error occurs.
+          MODULE PROCEDURE CHECK_STAT
+!         JACSP can be called to calculate a Jacobian using Doug Salane's
+!         algoritm 
+          MODULE PROCEDURE JACSP
+!         DVDSM can be called to calculate sparse pointer arrays needed
+!         by JACSP
+          MODULE PROCEDURE DVDSM
+
+      END INTERFACE
+! ..
+! .. Derived Type Declarations ..
+      TYPE, PUBLIC :: VODE_OPTS
+        KPP_REAL, DIMENSION (:), POINTER :: ATOL, RTOL
+        INTEGER :: MF, METH, MITER, MOSS, ITOL, IOPT, NG
+        LOGICAL :: DENSE, BANDED, SPARSE
+      END TYPE VODE_OPTS
+! ..
+! .. Local Scalars ..
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!     For communication with subroutine ma48_control_array:
+      KPP_REAL, PUBLIC :: COPY_OF_U_PIVOT
+!_______________________________________________________________________
+      KPP_REAL, PRIVATE :: ACNRM, ALPHA, BIG, BIG1, CCMXJ, CGCE, CONP, CRATE,  &
+        DRC, DRES, DXMAX, EPS, ERRMAX, ETA, ETAMAX, FRACINT, FRACSUB, H, HMIN,  &
+        HMXI, HNEW, HSCAL, HU, MEPS, MRESID, MRMIN, PRL1, RC, RESID, RL1,       &
+        RMIN, SETH, T0ST, THEMAX, TLAST, TN, TOL, TOL1, TOUTC, UMAX, UROUND,    &
+        U_PIVOT, X2, WM1, WM2
+      INTEGER, PRIVATE :: ADDTOJA, ADDTONNZ, CONSECUTIVE_CFAILS,                &
+        CONSECUTIVE_EFAILS, ELBOW_ROOM, IADIM, IANPIV, IAVPIV,                  &
+        ICF, ICNCP, IFAIL, IMAX, IMIN, INEWJ, INIT, IPUP, IRANK, IRFND, IRNCP,  &
+        ISTART, ISTATC, ITASKC, JADIM, JCUR, JMIN, JSTART, JSV, KFLAG, KOUNTL,  &
+        KUTH, L, LARGE, LAST, LENIGP, LICN_ALL, LIRN_ALL, LIW, LIWM, LMAX,      &
+        LOCJS, LP, LRW, LWM, LWMDIM, LWMTEMP, LYH, LYHTEMP, MANPIV, MAPIV, MAXG,&
+        MAXIT, MAXORD, MB28, MB48, METH, MICN, MICNCP, MINICN, MINIRN, MIRANK,  &
+        MIRN, MIRNCP, MITER, MLP, MOSS, MP, MSBG, MSBJ, MXHNIL, MXSTEP, N, NZB, &
+        NCFN, NDROP, NDROP1, NDX, NETF, NEWH, NEWQ, NFE, NGC, NGE, NGP, NHNIL,  &
+        NJE, NLP, NLU, NNI, NNZ, NOITER, NQ, NQNYH, NQU, NQWAIT, NSLG, NSLJ,    &
+        NSLP, NSRCH, NSRCH1, NST, NSUBS, NSUPS, NUM, NUMNZ, NYH, NZ_ALL,        &
+        NZ_SWAG, PREVIOUS_MAXORD, WPD, WPS, MA28AD_CALLS, MA28BD_CALLS,         &
+        MA28CD_CALLS, MC19AD_CALLS, MAX_MINIRN, MAX_MINICN, MAX_NNZ, BNGRP
+        MA48AD_CALLS, MA48BD_CALLS, MA48CD_CALLS
+! *****MA48 build change point. Insert the above line.
+      LOGICAL, PRIVATE :: ABORT, ABORT1, ABORT2, ABORT3, ABORTA, ABORTB,        &
+        ALLOW_DEFAULT_TOLS, BUILD_IAJA, BOUNDS, CHANGED_ACOR, GROW, IAJA_CALLED,&
+        J_HAS_BEEN_COMPUTED, J_IS_CONSTANT, LBIG, LBIG1, LBLOCK, MA48_WAS_USED, &
+        OK_TO_CALL_MA28, SUBS, SUPS, OPTS_CALLED, REDO_PIVOT_SEQUENCE,          &
+        SCALE_MATRIX, SPARSE, USE_FAST_FACTOR, YMAXWARN  
+! ..
+! .. Local Arrays ..
+      KPP_REAL, ALLOCATABLE, PRIVATE :: ACOR(:), CSCALEX(:), EWT(:),           &
+        FPTEMP(:), FTEMP(:), FTEMP1(:), G0(:), G1(:), GX(:), JMAT(:),           &
+        LB(:), PMAT(:), RSCALEX(:), RWORK(:), SAVF(:), UB(:), WM(:),            &
+        WMTEMP(:), WSCALEX(:,:), YHNQP2(:), YHTEMP(:), YMAX(:), YNNEG(:),       &
+        YTEMP(:), DTEMP(:)
+      KPP_REAL, PRIVATE :: EL(13), RUSER(22), TAU(13), TQ(5)
+      INTEGER, ALLOCATABLE, PRIVATE :: BIGP(:), BJGP(:), IA(:), IAB(:), IAN(:), &
+        ICN(:), IDX(:), IGP(:), IKEEP28(:,:), IW28(:,:), IWORK(:), JA(:),       &
+        JAB(:), JAN(:), JATEMP(:), JGP(:), JROOT(:), JVECT(:), SUBDS(:), SUPDS(:)
+      INTEGER, PRIVATE :: IDISP(2), IUSER(30), LNPIV(10), LPIV(10)
+      INTEGER, PRIVATE :: MORD(2) = (/ 12, 5 /)
+! ..
+! .. Public Subroutines and Functions ..
+  PUBLIC ::                                                        &
+  DAXPY_F90, DCOPY_F90, DDOT_F90, DGBFA_F90, DGBSL_F90, DGEFA_F90, &
+  DGESL_F90, DSCAL_F90, IDAMAX_F90
+! ..
+! .. Private Subroutines and Functions ..
+  PRIVATE ::                                                       &
+  CHECK_DIAG    , DACOPY        , DEWSET        , DGROUP        ,  &
+  DGROUPDS      , DVCHECK       , DVHIN         , DVINDY_BNDS   ,  &
+  DVINDY_CORE   , DVJAC         , DVJACS28      , DVJUST        ,  &
+  DVNLSD        , DVNLSS28      , DVNORM        , DVNRDN        ,  &
+  DVNRDP        , DVNRDS        , DVODE         , DVPREPS       ,  &
+  DVROOTS       , DVSET         , DVSOL         , DVSOLS28      ,  &
+  DVSRCO        , DVSTEP        , GDUMMY        , IUMACH        ,  &
+  IXSAV         , JACSPDB       , JDUMMY        , MA28AD        ,  &
+  MA28BD        , MA28CD        , MA28DD        , MA28ID        ,  &
+  MA30AD        , MA30BD        , MA30CD        , MA30DD        ,  &
+  MC13E         , MC19AD        , MC20AD        , MC20BD        ,  &
+  MC21A         , MC21B         , MC22AD        , MC23AD        ,  &
+  MC24AD        , SET_ICN       , XERRDV        , XSETF         ,  &
+  XSETUN        , DEGR          , IDO           , NUMSRT        ,  &
+  SEQ           , SETR          , SLO           , SRTDAT        ,  &
+  FDJS
+  DVJACS48      , DVNLSS48      , DVPREPS48     , DVSOLS48
+!_______________________________________________________________________
+! *****MA48 build change point. Insert the above line.
+!_______________________________________________________________________
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC KIND
+! ..
+! .. Data Statements ..
+      DATA OPTS_CALLED/ .FALSE./
+      DATA MP/6/, NLP/6/, MLP/6/, NSRCH/32768/, ISTART/0/, MAXIT/16/, &
+        LBIG/ .FALSE./, LBLOCK/ .TRUE./, GROW/ .TRUE./,               &
+        TOL/0.0_dp/, CGCE/0.5_dp/, BIG/0.0_dp/, ABORT1/ .TRUE./,      &
+        ABORT2/ .TRUE./, ABORT3/ .FALSE./, ABORT/ .FALSE./, MIRN/0/,  &
+        MICN/0/, MIRNCP/0/, MICNCP/0/, MIRANK/0/, NDROP1/0/,          &
+        MRMIN/0.0D0/, MRESID/0/, OK_TO_CALL_MA28/.FALSE./
+! ..
+! END OF DVODE_F90 PRIVATE SECTION.
+!_______________________________________________________________________
+
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+!!$   INTEGER, SAVE :: Ntotal = 0
+   TYPE(VODE_OPTS) :: OPTIONS
+   INTEGER :: ISTATE, ITASK
+   KPP_REAL :: MAXH, T1, T2
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+
+    OPTIONS = SET_OPTS(USER_SUPPLIED_JACOBIAN=.TRUE., SPARSE_J=.TRUE.,             &
+              ABSERR_VECTOR=ATOL, RELERR_VECTOR=RTOL, MXSTEP=100000,               &
+              NZSWAG=LU_NONZERO,   METHOD_FLAG=26,                                 &
+              MA28_ELBOW_ROOM=10, MC19_SCALING=.TRUE., MA28_MESSAGES=.FALSE.,      &
+              MA28_EPS=1.0D-4, MA28_RPS=.TRUE.,                                    &
+              USER_SUPPLIED_SPARSITY=.TRUE.)
+
+   CALL USERSETS_IAJA(LU_IROW,LU_NONZERO,LU_ICOL,LU_NONZERO)
+   ISTATE = 1
+   ITASK  = 1
+   T1 = TIN
+   T2 = TOUT
+   CALL DVODE_F90(FUN_CHEM,NVAR,VAR,T1,T2,ITASK,ISTATE,OPTIONS,J_FCN=JAC_CHEM)
+
+   STEPMIN = RSTATUS(ihexit) ! Save last step
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(1:20)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(1:20)
+   IF (PRESENT(IERR_U)) THEN
+     IF (IERR==2) THEN ! DLSODE returns "2" after successful completion
+       IERR_U = 1 ! IERR_U will return "1" for successful completion
+     ELSE
+       IERR_U = IERR
+     ENDIF
+   ENDIF
+
+   END SUBROUTINE INTEGRATE
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM(N, T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      INTEGER :: N
+      KPP_REAL :: V(NVAR), FCT(NVAR), T
+      
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+
+      CALL Fun(V, FIX, RCONST, FCT)
+      
+      !Nfun=Nfun+1
+
+      END SUBROUTINE FUN_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM (N,T,V,IA,JA,NNZ,JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_JacobianSP
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      KPP_REAL :: V(NVAR), T
+      INTEGER, INTENT(IN)  :: N
+      INTEGER, INTENT(OUT) :: NNZ
+#ifdef FULL_ALGEBRA    
+      INTEGER :: I, J
+      KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+#else
+      KPP_REAL :: JF(LU_NONZERO)
+      INTEGER  :: IA(LU_NONZERO), JA(LU_NONZERO)
+#endif   
+  
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+    
+#ifdef FULL_ALGEBRA    
+      CALL Jac_SP(V, FIX, RCONST, JV)
+      DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+      END DO
+#else
+      CALL Jac_SP(V, FIX, RCONST, JF) 
+      NNZ = LU_NONZERO
+      IA = LU_IROW
+      JA = LU_ICOL
+#endif   
+      !Njac=Njac+1
+   
+   END SUBROUTINE JAC_CHEM 
+
+!   MODULE DVODE
+
+! This version is the December 2005 release.
+! Last change: 01/01/08
+! _____________________________________________________________________
+! Working Precision
+!  IMPLICIT NONE
+! Define the working precision for DVODE_F90. Change D0 to E0 in the
+! next statement to convert to single precision.
+!  INTEGER, PARAMETER, PRIVATE :: WP = KIND(1.0D0)
+! ______________________________________________________________________
+! Overview
+
+! The f77 ordinary differential equation solver VODE.f is applicable to
+! nonstiff systems of odes and to stiff systems having dense or banded
+! Jacobians. DVODE_F90 is a Fortran 90 extension of VODE.f. While
+! retaining all of the features available in VODE.f, we have
+! incorporated several new options in DVODE_F90 including:
+!   1. the ability to solve stiff systems with sparse Jacobians
+!   2. internal management of storage and work arrays
+!   3. specification of options via optional keywords
+!   4. the ability to perform root finding or "event detection"
+!   5. various new diagnostic and warning messages
+!   6. the ability to impose solution bounds
+!   7. several specialized options for dealing with sparsity
+! ______________________________________________________________________
+! Version Information
+
+! This is DVODE_F90, the double precision FORTRAN 90 extension of the
+! f77 DVODE.f ordinary differential equation solver. This version uses
+! MA28 for sparse Jacobians. This file and related information can be
+! obtained at the following support page:
+!
+!     http://www.radford.edu/~thompson/vodef90web/
+!
+! We are indebted to Richard Cox (ORNL) for providing us with his
+! implementation of MA28 in LSOD28.f (a variant of Alan Hindmarsh's
+! lsodes.f). We are indebted to Alan Hindmarsh for numerous contributions.
+! In particular, we borrowed liberally from the f77 solvers VODE.f,
+! LSODAR.f, and LSODES.f while developing DVODE_F90. We are indebted
+! to Doug Salane for providing us with his JACSP Jacobian routines.
+!
+! If you find a bug or encounter a problem with DVODE_F90, please
+! contact one of us:
+!    G.D. Byrne (gbyrne@wi.rr.com)
+!    S. Thompson (thompson@radford.edu)
+! A set of quick start instructions is provided below.
+! ______________________________________________________________________
+! Note on F90/F95 Compilers
+
+! To date we have used DVODE_F90 successfully with all F90/F95 compilers
+! to which we have access. In particular, we have used it with the Lahey
+! F90 and Lahey-Fujitsu F95 compilers, the Compaq Visual F90 compiler,
+! the g90 compiler, and the INTEL, Portland, Salford, and SUN compilers.
+! It should be noted that compilers such as Salford's FTN95 complain
+! about uninitialized arrays passed as subroutine arguments and the use of
+! slices of two dimensional arrays as one dimensional vectors, and will
+! not run using the strictest compiler options. It is perfectly safe to
+! use the /-CHECK compiler option to avoid these FTN95 runtime checks.
+! DVODE_F90 does not use any variable for numerical purposes until it
+! has been assigned an appropriate value.
+! ______________________________________________________________________
+! Quick Start Instructions
+
+! (1) Compile this file. Then compile, link, and execute the program
+!     example1.f90. The output is written to the file example1.dat.
+!     Verify that the last line of the output is the string
+!     'No errors occurred.'
+! (2) Repeat this process for the program example2.f90.
+!
+! Other test programs you may wish to run to verify your installation
+! of DVODE_F90 are:
+!
+! (3) Run the test programs nonstiffoptions.f90 and stiffoptions.f90
+!     and verify that the last line in the output files produced is
+!     'No errors occurred.' They solve the problems in the Toronto
+!     test suites using several different error tolerances and various
+!     solution options. Note that stiffoptions.f90 takes several
+!     minutes to run because it performs several thousand separate
+!     integrations.
+! (4) Locate the file robertson.f90 in the demo programs and look at
+!     how options are set using SET_OPTS, how DVODE_F90 is called to
+!     obtain the solution at desired output times, and how the
+!     derivative and Jacobian routines are supplied. Note too the
+!     manner in which the solution is constrained to be nonnegative.
+! (5) Locate demoharmonic.f90 and look at how root finding options
+!     are set and how the event residual routine is supplied to
+!     DVODE_F90.
+! (6) The other demo programs available from the DVODE_F90 support
+!     page illustrate various other solution options available in
+!     DVODE_F90. The demo programs may be obtained from
+!
+!        http://www.radford.edu/~thompson/vodef90web/index.html
+! ______________________________________________________________________
+! DVODE_F90 Full Documentation Prologue
+
+! Section 1.  Setting Options in DVODE_F90
+! Section 2.  Calling DVODE_F90
+! Section 3.  Choosing Error Tolerances
+! Section 4.  Choosing the Method of Integration
+! Section 5.  Interpolation of the Solution and Derivatives
+! Section 6.  Handling Events (Root Finding)
+! Section 7.  Gathering Integration Statistics
+! Section 8.  Determining Jacobian Sparsity Structure Arrays
+! Section 9.  Original DVODE Documentation Prologue
+! Section 10. Example Usage
+
+! Note: Search on the string 'Section' to locate these sections. You
+! may wish to refer to the support page which has the sections broken
+! into smaller pieces.
+! ______________________________________________________________________
+! Section 1.  Setting Options in DVODE_F90
+!
+! You can use any of three options routines:
+!
+! SET_NORMAL_OPTS
+! SET_INTERMEDIATE_OPTS
+! SET_OPTS
+
+! OPTIONS = SET_NORMAL_OPTS(DENSE_J, BANDED_J, SPARSE_J,               &
+!   USER_SUPPLIED_JACOBIAN, LOWER_BANDWIDTH, UPPER_BANDWIDTH,          &
+!   RELERR, ABSERR, ABSERR_VECTOR, NEVENTS)
+
+! OPTIONS = SET_INTERMEDIATE_OPTS(DENSE_J, BANDED_J, SPARSE_J,         &
+!   USER_SUPPLIED_JACOBIAN,LOWER_BANDWIDTH, UPPER_BANDWIDTH,           &
+!   RELERR, ABSERR, ABSERR_VECTOR,TCRIT, H0, HMAX, HMIN, MAXORD,       &
+!   MXSTEP, MXHNIL, NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS,          &
+!   NEVENTS, CONSTRAINED, CLOWER, CUPPER, CHANGE_ONLY_f77_OPTIONS)     &
+
+! OPTIONS = SET_OPTS(METHOD_FLAG, DENSE_J, BANDED_J, SPARSE_J,         &
+!   USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN, CONSTANT_JACOBIAN,          &
+!   LOWER_BANDWIDTH, UPPER_BANDWIDTH, SUB_DIAGONALS, SUP_DIAGONALS,    &
+!   RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR, TCRIT, H0, HMAX,     &
+!   HMIN, MAXORD, MXSTEP, MXHNIL, YMAGWARN, SETH, UPIVOT, NZSWAG,      &
+!   USER_SUPPLIED_SPARSITY, NEVENTS, CONSTRAINED, CLOWER, CUPPER,      &
+!   MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES, MA28_EPS,            &
+!   MA28_RPS, CHANGE_ONLY_f77_OPTIONS, JACOBIAN_BY_JACSP)
+
+! Please refer to the documentation prologue for each of these functions
+! to see what options may be used with each. Note that input to each is
+! via keyword and all variables except error tolerances are optional.
+! Defaults are used for unspecified options. If an option is available
+! in SET_NORMAL OPTS, it is available and has the same meaning in
+! SET_INTERMEDIATE_OPTS and SET_OPTS. Similarly, if an option is available
+! in SET_INTERMEDIATE_OPTS, it is available and has the same meaning in
+! SET_OPTS.
+
+! The first two functions are provided merely for convenience.
+! SET_NORMAL_OPTS is available simply to relieve you of reading the
+! documentation for SET_OPTS and to use default values for all but
+! the most common options. SET_INTERMEDIATE_OPTS is available to allow
+! you more control of the integration while still using default values
+! for less commonly used options. SET_OPTS allows you to specify any
+! of the options available in DVODE_F90.
+
+! Roughly, SET_NORMAL_OPTS is intended to provide for dense, banded,
+! and numerical sparse Jacobians without the need to specify other
+! specialized options. SET_INTERMEDIATE_OPTIONS is intended to allow
+! more general sparse Jacobian options. SET_OPTS is intended to provide
+
+! access to all options in DVODE_F90.
+
+! Please note that SET_INTERMEDIATE_OPTS can be invoked using the same
+! arguments as SET_NORMAL_OPTS; and SET_OPTS can be invoked using the
+! same arguments as either SET_NORMAL_OPTS or SET_INTERMEDIATE_OPTS.
+! If you wish you can simply delete SET_NORMAL_OPTS as well as
+! SET_INTERMEDIATE_OPTS and use only SET_OPTS for all problems. If you
+! do so, you need only include the options that you wish to use when
+! you invoke SET_OPTIONS.
+
+! In the following description any reference to SET_OPTS applies equally
+! to SET_NORMAL_OPTS and SET_INTERMEDIATE OPTS.
+
+! Before calling DVODE_F90 for the first time, SET_OPTS must be invoked.
+! Typically, SET_OPTS is called once to set the desired integration
+! options and parameters. DVODE_F90 is then called in an output loop to
+! obtain the solution for the desired times. A detailed description of
+! the DVODE_F90 arguments is given in a section below. Detailed descriptions
+! of the options available via SET_OPTS are given in the documentation prologue.
+! Although each option available in the f77 version of DVODE as well as
+! several additional ones are available in DVODE_F90 via SET_OPTS,
+! several of the available options are not relevant for most problems
+! and need not be specified. Refer to the accompanying demonstration
+! programs for specific examples of each usage. Note that after any call
+! to DVODE_F90, you may call GET_STATS to gather relevant integration
+! statistics. After your problem has completed, you may call
+! RELEASE_ARRAYS to deallocate any internal arrays allocated by
+! DVODE_F90 and to determine how much storage was used by DVODE_F90.
+!
+! To communicate with DVODE_F90 you will need to include the following
+! statement in your calling program:
+!    USE DVODE_F90_M
+! and include the following statement in your type declarations section:
+!    TYPE(VODE_OPTS) :: OPTIONS
+! Below are brief summaries of typical uses of SET_OPTS.
+! Nonstiff Problems:
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR=ATOL)
+!    The above use of SET_OPTS will integrate your system of odes
+!    using the nonstiff Adams methods while using a relative error
+!    tolerance of RTOL and an absolute error tolerance of ATOL.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR=ATOL,NEVENTS=NG)
+!    If you wish to do root finding, SET_OPTS can be used as above.
+!    Here, NEVENTS is the desired number of root finding functions.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=G)
+!    Here F is the name of your derivative subroutine and G is the
+!    name of your subroutine to evaluate residuals of the root
+!    finding functions.
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR_VECTOR=ATOL)
+!    This use of SET_OPTS indicates that a scalar relative error
+!    tolerance and a vector of absolute error tolerances will be
+!    used.
+! Stiff Problems, internally generated dense Jacobian:
+! OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL,ABSERR=ATOL)
+!    This use of DENSE_J=.TRUE. indicates that DVODE_F90 will
+!    use the stiffly stable BDF methods and will approximate
+!    the Jacobian, considered to be a dense matrix, using
+!    finite differences. Your subsequent call to DVODE_F90
+!    might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+! OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL, &
+!                    USER_SUPPLIED_JACOBIAN=.TRUE.)
+!    If you know the Jacobian and wish to supply subroutine JAC
+!    as described in the documentation for DVODE_F90, the options
+!    call could look like the above.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F1,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC)
+!    Here, JAC is the name of the subroutine that you provide to
+!    evaluate the known Jacobian.
+! Stiff Problems, internally generated banded Jacobian:
+! OPTIONS = SET_OPTS(BANDED_J=.TRUE.,RELERR=RTOL,ABSERR=ATOL, &
+!                       LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU)
+!    This use of BANDED_J=.TRUE. indicates that DVODE_F90 will
+!    use the stiffly stable BDF methods and will approximate the
+!    Jacobian, considered to be a banded matrix, using finite
+!    differences. Here ML is the lower bandwidth of the Jacobian
+!    and ML is the upper bandwidth of the Jacobian.
+! Stiff Problems, internally generated sparse Jacobian:
+! OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    This use of SET_OPTS indicates that the Jacobian is a sparse
+!    matrix. Its structure will be approximated internally by
+!    making calls to your derivative routine. If you know the
+!    structure before hand, you may provide it directly in a
+!    variety of ways as described in the documentation prologue
+!    for SET_OPTS. In addition, several other options related
+!    to sparsity are available.
+! More complicated common usage:
+!    Suppose you need to solve a stiff problem with a sparse Jacobian.
+!    After some time, the structure of the Jacobian changes and you
+!    wish to have DVODE_F90 recalculate the structure before continuing
+!    the integration. Suppose that initially you want to use an absolute
+!    error tolerance of 1.0D-5 and that when the Jacobian structure is
+!    changed you wish to reduce the error tolerance 1.0D-7. Your calls
+!    might look like this.
+!    RTOL = ...
+!    ATOL = 1.0D-5
+!    OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    Output loop:
+!       CALL DVODE_F90(FCN,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+!       At desired time:
+!       ISTATE = 3
+!       ATOL = 1.0D-7
+!       OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    End of output loop
+
+! In the following we have summarized and described how some of the demonstration
+! programs set options and call DVODE_F90. In each case the necessary parameters
+! are defined before invoking SET_OPTS. The call to DVODE_F90 is in a loop in
+! which the output time is successively updated. The actual programs are available
+! from the web support page
+!
+!    http://www.radford. edu/~thompson/vodef90web/index.html/
+!
+!                              Problem Summary
+!
+! Problem                  NEQ      Jacobian            Features Illustrated
+!
+! Prologue Example 1        3        Dense               Basic
+!
+! Prologue Example 2        3        Dense               Root finding
+!
+! Robertson                 3        Dense               Solution bounds
+!
+! Harmonic Oscillator       4        Nonstiff            Root finding
+!
+! Flow Equations         5-1800      Sparse              Automatic determination
+!                                                        of sparsity arrays
+!
+! Diurnal Kinetics      50-5000      Sparse or banded    Sparsity options
+!
+!                       Options Used and DVODE_F90 Call
+!
+! Prologue Example 1
+!
+!    OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE., ABSERR_VECTOR=ATOL, RELERR=RTOL,     &
+!              USER_SUPPLIED_JACOBIAN=.TRUE.)
+!    CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+!
+!    The problem consists of a stiff system of NEQ=3 equations. The dense
+!    Jacobian option (DENSE_J) is used. A vector ATOL(*) of error tolerances
+!    is used. A scalar relative error tolerance RTOL is used. Subroutine JEX
+!    is provided to evaluate the analytical Jacobian. If the last argument
+!    J_FCN=JEX is omitted (as in Example 2), a numerical Jacobian will
+!    be used.
+!
+! Prologue Example 2
+!
+!    OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE., RELERR=RTOL, ABSERR_VECTOR=ATOL,     &
+!              NEVENTS=NG)
+!    CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!
+!    The system in Example 1 is used to illustrate root finding. It is
+!    desired to locate the times at which two of the solution components
+!    attain prescribed values. NEVENTS=2 informs the solver that two such
+!    functions are used. Subroutine GEX is used to calculate the residuals
+!    for these two functions. A dense numerical Jacobian is used.
+!
+! Robertson Problem
+!
+!    OPTIONS = SET_INTERMEDIATE_OPTS(DENSE_J=.TRUE., RELERR_VECTOR=RTOL,            &
+!              ABSERR_VECTOR=ABSERR_TOLERANCES, CONSTRAINED=BOUNDED_COMPONENTS,     &
+!              CLOWER=LOWER_BOUNDS, CUPPER=UPPER_BOUNDS)
+!
+!    CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JACD)
+!    The system used in Examples 1 and 2 is solved over a much larger
+!    time interval. The solution is constrained to be nonegative. This
+!    is done by prescribing the components to be constrained (BOUNDED_COMPONENTS).
+!    Artificially large values are used to impose upper bounds (UPPER_BOUNDS)
+!    and lower bounds of zero are used to force a nonnegative solution.
+!
+! Harmonic Oscillator Problem
+!
+!    OPTIONS = SET_NORMAL_OPTS(RELERR=RTOL, ABSERR=ATOL, NEVENTS=NG)
+!    CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEVENTS)
+!
+!    A nonstiff system of NEQ=4 equations is solved. The nonstiff option is
+!    used because neither DENSE_ nor BANDED_J nor SPARSE_J is present. It is
+!    desired to find the times at which Y(2) or Y(3) is equal to 0. Residuals
+!    for the two corresponding event functions are calculated in subroutine
+!    GEVENTS.
+!
+! Flow Equations Problem
+!
+!    OPTIONS = SET_OPTS(SPARSE_J=SPARSE, ABSERR=ATOL(1), RELERR=RTOL(1),            &
+!              MXSTEP=100000, NZSWAG=20000)
+!    CALL DVODE_F90(FCN,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+!
+!    This is a stiff system of equations resulting a method of lines
+!    discretization. The Jacobian is sparse. Scalar absolute and relative
+!    error tolerances are used. The Jacobian structure and a numerical
+!    Jacobian are used. The solver is limited to a maximum of MXSTEP steps.
+!    NZSWAG is the amount by which allocated array sizes will be increased.
+!    The accompanying test program may be used to illutrate several other
+!    solution options.
+!
+! Diurnal Kinetics Problem
+!
+!    OPTIONS = SET_OPTS(SPARSE_J=SPARSE, BANDED_J=BANDED, DENSE_J=DENSE,            &
+!              ABSERR_VECTOR=ATOL(1:NEQ), RELERR=RTOL(1), MXSTEP=100000,            &
+!              NZSWAG=50000, HMAX=MAXH, LOWER_BANDWIDTH=ML, UPPER_BANDWIDTH=MU,     &
+!              MA28_ELBOW_ROOM=10, MC19_SCALING=.TRUE., MA28_MESSAGES=.FALSE.,      &
+!              MA28_EPS=1.0D-4, MA28_RPS=.TRUE.,                                    &
+!              USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE)
+!   CALL USERSETS_IAJA(IA, IADIM, JA, JADIM)
+!   CALL DVODE_F90(FCN, NEQ, Y, T, TOUT, ITASK, ISTATE, OPTIONS)
+!
+!   This problem can be used to illustrate most solution options. Here, dense,
+!   banded, or sparse Jacobians are used depending on the values of the first
+!   three parameters. A vector error tolerance is used and a scalar relative
+!   error tolerance is used. If a banded solution is desired, it is necessary
+!   to supply the bandwidths ML and MU. If a sparse solution is desired,
+!   several special options are used. The most important one is MA28_RPS to
+!   force the solver to update the partial pivoting sequence when singular
+!   iteration matrices are encountered. The sparsity pattern is determined
+!   numerically if SUPPLY_STRUCTURE is FALSE. Otherwise the user will supply
+!   the pattern by calling subroutine USERSETS_IAJA.
+! ______________________________________________________________________
+! Section 2.  Calling DVODE_F90
+!
+! DVODE_F90 solves the initial value problem for stiff or nonstiff
+! systems of first order ODEs,
+!     dy/dt = f(t,y), or, in component form,
+!     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+! DVODE_F90 is a package based on the EPISODE and EPISODEB packages,
+! and on the ODEPACK user interface standard. It was developed from
+! the f77 solver DVODE developed by Brown, Byrne, and Hindmarsh.
+! DVODE_F90 also provides for the solution of sparse systems in a
+! fashion similar to LSODES and LSOD28. Currently, MA28 is used
+! to perform the necessary sparse linear algebra. DVODE_F90 also
+! contains the provision to do root finding in a fashion similar
+! to the LSODAR solver from ODEPACK.
+
+! Communication between the user and the DVODE_F90 package, for normal
+! situations, is summarized here. This summary describes only a subset
+! of the full set of options available. See the full description for
+! details, including optional communication, nonstandard options, and
+! instructions for special situations.
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC,G_FCN=GEX)
+!    The arguments in the call list to DVODE_F90 have the following
+!    meanings.
+! F       = The name of the user-supplied subroutine defining the
+!           ODE system. The system must be put in the first-order
+!           form dy/dt = f(t,y), where f is a vector-valued function
+!           of the scalar t and the vector y. Subroutine F is to
+!           compute the function f. It is to have the form
+!                SUBROUTINE F(NEQ,T,Y,YDOT)
+!                DOUBLE PRECISION T,Y(NEQ),YDOT(NEQ)
+!           where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+!           is output. Y and YDOT are arrays of length NEQ.
+!           Subroutine F should not alter Y(1),...,Y(NEQ).
+!           If F (and JAC) are not contained in a module available to
+!           your calling program, you must declare F to be EXTERNAL
+!           in the calling program.
+! NEQ     = The size of the ODE system (number of first order
+!           ordinary differential equations).
+! Y       = A double precision array for the vector of dependent variables,
+!           of length NEQ or more. Used for both input and output on the
+!           first call (ISTATE = 1), and only for output on other calls.
+!           On the first call, Y must contain the vector of initial
+!           values. In the output, Y contains the computed solution
+!           evaluated at T.
+! T       = The independent variable. In the input, T is used only on
+!           the first call, as the initial point of the integration.
+!           In the output, after each call, T is the value at which a
+!           computed solution Y is evaluated (usually the same as TOUT).
+!           On an error return, T is the farthest point reached.
+! TOUT    = The next value of t at which a computed solution is desired.
+!           TOUT is Used only for input. When starting the problem
+!           (ISTATE = 1), TOUT may be equal to T for one call, then
+!           should not equal T for the next call. For the initial T,
+!           an input value of TOUT unequal to T is used in order to
+!           determine the direction of the integration (i.e. the
+!           algebraic sign of the step sizes) and the rough scale
+!           of the problem. Integration in either direction (forward
+!           or backward in t) is permitted. If ITASK = 2 or 5 (one-step
+!           modes), TOUT is ignored after the first call (i.e. the
+!           first call with TOUT \= T). Otherwise, TOUT is required
+!           on every call. If ITASK = 1, 3, or 4, the values of TOUT
+!           need not be monotone, but a value of TOUT which backs up
+!           is limited to the current internal t interval, whose
+!           endpoints are TCUR - HU and TCUR. (Refer to the description
+!           of GET_STATS for a description of TCUR and HU.)
+! ITASK   = An index specifying the task to be performed.
+!           Input only. ITASK has the following values and meanings.
+!           1  means normal computation of output values of y(t) at
+!              t = TOUT (by overshooting and interpolating).
+!           2  means take one step only and return.
+!           3  means stop at the first internal mesh point at or
+!              beyond t = TOUT and return.
+!           4  means normal computation of output values of y(t) at
+!              t = TOUT but without overshooting t = TCRIT.
+!              TCRIT must be specified in your SET_OPTS call. TCRIT
+!              may be equal to or beyond TOUT, but not behind it in
+!              the direction of integration. This option is useful
+!              if the problem has a singularity at or beyond t = TCRIT.
+!           5  means take one step, without passing TCRIT, and return.
+!              TCRIT must be specified in your SET_OPTS call.
+!           If ITASK = 4 or 5 and the solver reaches TCRIT (within
+!           roundoff), it will return T = TCRIT(exactly) to indicate
+!           this (unless ITASK = 4 and TOUT comes before TCRIT, in
+!           which case answers at T = TOUT are returned first).
+! ISTATE  = an index used for input and output to specify the
+!           the state of the calculation.
+!           In the input, the values of ISTATE are as follows.
+!           1  means this is the first call for the problem
+!              (initializations will be done). See note below.
+!           2  means this is not the first call, and the calculation
+!              is to continue normally, with no change in any input
+!              parameters except possibly TOUT and ITASK.
+!           3  means this is not the first call, and the
+!              calculation is to continue normally, but with
+!              a change in input parameters other than
+!              TOUT and ITASK. Desired changes require SET_OPTS
+!              be called prior to calling DVODE_F90 again.
+!           A preliminary call with TOUT = T is not counted as a
+!           first call here, as no initialization or checking of
+!           input is done. (Such a call is sometimes useful to
+!           include the initial conditions in the output.)
+!           Thus the first call for which TOUT is unequal to T
+!           requires ISTATE = 1 in the input.
+!           In the output, ISTATE has the following values and meanings.
+!            1  means nothing was done, as TOUT was equal to T with
+!               ISTATE = 1 in the input.
+!            2  means the integration was performed successfully.
+!            3  means a root of one of your root finding functions
+!               has been located.
+!           A negative value of ISTATE indicates that DVODE_F90
+!           encountered an error as described in the printed error
+!           message. Since the normal output value of ISTATE is 2,
+!           it does not need to be reset for normal continuation.
+!           Also, since a negative input value of ISTATE will be
+!           regarded as illegal, a negative output value requires
+!           the user to change it, and possibly other input, before
+!           calling the solver again.
+! OPTIONS = The options structure produced by your call to SET_OPTS.
+! JAC     = The name of the user-supplied routine (MITER = 1 or 4 or 6)
+!           If you do not specify that a stiff method is to be used
+!           in your call to SET_OPTS, you need not include JAC in
+!           your call to DVODE_F90. If you specify a stiff method and
+!           that a user supplied Jacobian will be supplied, JAC must
+!           compute the Jacobian matrix, df/dy, as a function of the
+!           scalar t and the vector y. It is to have the form:
+!              SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!              DOUBLE PRECISION T, Y(NEQ), PD(NROWPD,NEQ)
+!           where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+!           PD is to be loaded with partial derivatives (elements of the
+!           Jacobian matrix) in the output. PD must be given a first
+!           dimension of NROWPD. T and Y have the same meaning as in
+!           Subroutine F.
+!           In the full matrix case (MITER = 1), ML and MU are
+!           ignored, and the Jacobian is to be loaded into PD in
+!           columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+!           In the band matrix case (MITER = 4), the elements
+!           within the band are to be loaded into PD in columnwise
+!           manner, with diagonal lines of df/dy loaded into the rows
+!           of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+!           ML and MU are the half-bandwidth parameters. (See IUSER).
+!           The locations in PD in the two triangular areas which
+!           correspond to nonexistent matrix elements can be ignored
+!           or loaded arbitrarily, as they are overwritten by DVODE_F90.
+!           In the sparse matrix case the elements of the matrix
+!           are determined by the sparsity structure given by the
+!           IA and JA pointer arrays. Refer to the documentation
+!           prologue for SET_OPTS for a description of the arguments
+!           for JAC since they differ from the dense and banded cases.
+!           JAC need not provide df/dy exactly. A crude
+!           approximation (possibly with a smaller bandwidth) will do.
+!           In either case, PD is preset to zero by the solver,
+!           so that only the nonzero elements need be loaded by JAC.
+!           In the sparse matrix case, JAC has a different form:
+!                SUBROUTINE JAC (N, T, Y, IA, JA, NZ, PD)
+!           Given the number of odes N, the current time T, and the
+!           current solution vector Y, JAC must do the following:
+!              If NZ = 0 on input:
+!              Replace NZ by the number of nonzero elements in the
+!              Jacobian. The diagonal of the Jacobian must be included.
+!              Do NOT define the arrays IA, JA, PD at this time.
+!              Once JAC has been called with NZ = 0 and you have
+!              defined the value of NZ, future calls to JAC will use
+!              this value of NZ.
+!              When a call is made with NZ unequal to 0, you must
+!              define the sparsity structure arrays IA and JA, and
+!              the sparse Jacobian PD.
+!                 IA defines the number of nonzeros including the
+!                 diagonal in each column of the Jacobian. Define
+!                 IA(1) = 1 and for J = 1,..., N,
+!                 IA(J+1) = IA(J) + number of nonzeros in column J.
+!                 Diagonal elements must be included even if they are
+!                 zero. You should check to ensure that IA(N+1)-1 = NZ.
+!                 JA defines the rows in which the nonzeros occur.
+!                 For I = 1,...,NZ, JA(I) is the row in which the Ith
+!                 element of the Jacobian occurs. JA must also include
+!                 the diagonal elements of the Jacobian.
+!                 PD defines the numerical value of the Jacobian
+!                 elements. For I = 1,...,NZ, PD(I) is the numerical
+!                 value of the Ith element in the Jacobian. PD must
+!                 also include the diagonal elements of the Jacobian.
+! GFUN    = the name of the subroutine to evaluate the residuals for
+!           event functions. If you do not specify that events are
+!           present (by specifying NEVENTS > 0 in SET_OPTS), you
+!           need not include GFUN in your call list for DVODE_F90.
+!           If GFUN is not contained in a module available to your
+!           calling program, you must declare GFUN to be EXTERNAL
+!           in your calling program.
+! To continue the integration after a successful return, simply
+! reset TOUT and call DVODE_F90 again. No other parameters need
+! be reset unless ISTATE=3 in which case, reset it to 2 before
+! calling DVODE_F90 again.
+! ______________________________________________________________________
+! Section 3.  Choosing Error Tolerances
+!
+! This is the most important aspect of solving odes numerically.
+! You may supply any of four keywords and values. If you wish to
+! use scalar error tolerances, you should supply ABSERR and RELERR.
+! For a good many problems, it is advisable to supply a vector of
+! absolute error tolerances ABSERR_VECTOR = desired vector. This
+! allows you to use different tolerances for each component of
+! the solution. If ABSERR_VECTOR is supplied, it must be a vector
+! of length NEQ where NEQ is the number of odes in your system.
+! Similarly, you may supply a vector of relative error tolerances,
+! RELERR_VECTOR. If no tolerances are specified, DVODE_F90 will use
+! default error tolerances ABSERR=1D-6 and RELERR=1D-4; but it is
+! strongly recommended that you supply values that are appropriate
+! for your problem. In the event you do not supply error tolerances,
+! DVODE_F90 will print a reminder that the default error tolerances
+! are not appropriate for all problems.
+!
+! RELERR can be set to a scalar value as follows.
+! Determine the number of significant digits of accuracy desired, 
+! which will be a positive integer, say, N.
+! Then set RELERR = 10**-(N+1). 
+! The authors recommend that RELERR be no larger than 10**-4.
+! The authors recommend a vector valued absolute error tolerance,
+! which can be set as follows.
+! For the I-th component of the solution vector, Y(I), determine
+! the positive number FLOOR(I) at which ABS(Y(I)) becomes
+! negligible for the problem at hand. FLOOR(I) is sometimes called
+! the problem zero or the floor value for the I-th component and is
+! problem dependent. For a given problem that is not scaled, these
+! floor values may well vary by up to 9 orders of magnitude.
+! Set ABSERR(I) = FLOOR(I) or to be conservative
+! ABSERR_VECTOR(I) = 0.1*FLOOR(I). There is no variable FLOOR in
+! DVODE_F90. If it is difficult to divine the components of ABSERR,
+! (or FLOOR) make a reasonable guess, run the problem, then set that
+! ABSERR_VECTOR so for I = 1, 2,...NEQ,
+! ABSERR_VECTOR(I) = 1D-6*RELERR*MAX{ABS(Y(I,TOUT): for all TOUT}.
+! The correct choices for RELERR and ABSERR can and do have
+! significant impact on both the quality of the solution and run
+! time. Counter intuitively, error tolerances that are too loose
+! can and do increase run time significantly and the quality of
+! the solution may be seriously compromised.
+! Examples:
+! 1. OPTIONS = SET_OPTS(DENSE_J=.TRUE., ABSERR=1D-8,RELERR=1D-8)
+!    This will yield MF = 22. Both the relative error tolerance
+!    and the absolute error tolerance will equal 1D-8.
+! 2. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=1D-5, &
+!                       ABSERR_VECTOR=(/1D-6,1D-8/))
+!    For a system with NEQ=2 odes, this will yield MF = 22. A scalar
+!    relative error tolerance equal to 1D-5 will be used. Component 1
+!    of the solution will use an absolute error tolerance of 1D-6
+!    while component 2 will use an absolute error tolerance of 1D-8.
+! ______________________________________________________________________
+! Section 4.  Choosing the Method of Integration
+!
+! If you wish to specify a numerical value for METHOD_FLAG, it can equal
+! any of the legal values of MF for DVODE or LSODES. (See below.) If
+! you do not wish to specify a numerical value for METHOD_FLAG, you
+! may specify any combination of the five logical keywords DENSE_J,
+! BANDED_J, SPARSE_J, USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN that you
+! wish. Appropriate values will be used in DVODE_F90 for any variables
+! that are not present. The first three flags indicate the type of
+! Jacobian, dense, banded, or sparse. If USER_SUPPLIED_JACOBIAN=.TRUE.,
+! the Jacobian will be determined using the subroutine JAC you supply
+! in your call to DVODE_F90. Otherwise, an internal Jacobian will be
+! generated using finite differences.
+! Examples:
+! 1. OPTIONS = SET_OPTS(METHOD_FLAG=22,...)
+!    DVODE will use the value MF=22 as described in the documentation
+!    prologue. In this case, the stiff BDF methods will be used with
+!    a dense, internally generated Jacobian.
+! 2. OPTIONS = SET_OPTS(METHOD_FLAG=21,...)
+!    This is the same an Example 1 except that a user supplied dense
+!    Jacobian will be used and DVODE will use MF=21.
+! 3. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,...)
+!    This will yield MF = 22 as in Example 1, provided
+!    USER_SUPPLIED_JACOBIAN and SAVE_JACOBIAN are not present, or if
+!    present are set to their default
+!     values of .FALSE. and .TRUE., respectively.
+! 4. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,&
+!                       USER_SUPPLIED_JACOBIAN=.TRUE.,...)
+!    This will yield MF = 21 as in Example 2, provided SAVE_JACOBIAN
+!    is not present, or if present is set to its default value .FALSE.
+! Notes:
+! 1. If you specify more than one of DENSE_J, BANDED_J, and SPARSE_J,
+!    DENSE_J takes precedence over BANDED_J which in turn takes
+!    precedence over SPARSE_J.
+! 2. By default, DVODE_F90 saves a copy of the Jacobian and reuses the
+!    copy when necessary. For problems in which storage requirements
+!    are acute, you may wish to override this default and have
+!    DVODE_F90 recalculate the Jacobian rather than use a saved copy.
+!    You can do this by specifying SAVE_JACOBIAN=.FALSE. It is
+!    recommended that you not do this unless necessary since it can
+!    have a significant impact on the efficiency of DVODE_F90. (For
+!    example, when solving a linear problem only one evaluation of
+!    the Jacobian is required with the default option.)
+! 3. If you choose BANDED_J = .TRUE. or if you supply a value of MF
+!    that corresponds to a banded Jacobian, you must also supply the
+!    lower  bandwidth ML and the upper bandwidth of the Jacobian MU
+!    by including the keywords
+!    LOWER_BANDWIDTH = value of ML and UPPER_BANDWIDTH = value of M
+!                   More on Method Selection
+! The keyword options available in SET_OPTS are intended to replace
+! the original method indicator flag MF. However, if you wish to
+! retain the flexibility of the original solver, you may specify MF
+! directly in your call to SET_OPTS. This is done by using the
+! keyword METHOD_FLAG=MF in your SET_OPTS where MF has any of the
+! values in the following description. Refer to the demonstration
+! program demosp.f90 for an example in which this is done.
+! MF     = The method flag. Used only for input. The legal values of
+!          MF are:
+!          10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26,
+!          27, -11, -12, -14, -15, -21, -22, -24, -25, -26, -27.
+!          MF is a signed two-digit integer, MF = JSV*(10*METH+MITER).
+!          JSV = SIGN(MF) indicates the Jacobian-saving strategy:
+!            JSV =  1 means a copy of the Jacobian is saved for reuse
+!                     in the corrector iteration algorithm.
+!            JSV = -1 means a copy of the Jacobian is not saved
+!                     (valid only for MITER = 1, 2, 4, or 5).
+!          METH indicates the basic linear multistep method:
+!            METH = 1 means the implicit Adams method.
+!            METH = 2 means the method based on backward
+!                     differentiation formulas (BDF-s).
+!          MITER indicates the corrector iteration method:
+!            MITER = 0 means functional iteration (no Jacobian matrix
+!                      is involved).
+!            MITER = 1 means chord iteration with a user-supplied
+!                      full (NEQ by NEQ) Jacobian.
+!            MITER = 2 means chord iteration with an internally
+!                      generated (difference quotient) full Jacobian
+!                      (using NEQ extra calls to F per df/dy value).
+!            MITER = 4 means chord iteration with a user-supplied
+!                      banded Jacobian.
+!            MITER = 5 means chord iteration with an internally
+!                      generated banded Jacobian (using ML+MU+1 extra
+!                      calls to F per df/dy evaluation).
+!            MITER = 6 means chord iteration with a user-supplied
+!                      sparse Jacobian.
+!            MITER = 7 means chord iteration with an internally
+!                      generated sparse Jacobian
+!          If MITER = 1, 4, or 6 the user must supply a subroutine
+!          JAC(the name is arbitrary) as described above under JAC.
+!          For other values of MITER, JAC need not be provided.
+! ______________________________________________________________________
+! Section 5.  Interpolation of the Solution and Derivative
+!
+! Following a successful return from DVODE_F90, you may call
+! subroutine DVINDY to interpolate the solution or derivative.
+! SUBROUTINE DVINDY(T, K, DKY, IFLAG)
+! DVINDY computes interpolated values of the K-th derivative of the
+! dependent variable vector y, and stores it in DKY. This routine
+! is called with K = 0 or K = 1 and T = TOUT. In either case, the
+! results are returned in the array DKY of length at least NEQ which
+! must be declared and dimensioned in your calling program. The
+! computed values in DKY are obtained by interpolation using the
+! Nordsieck history array.
+! ______________________________________________________________________
+! Section 6.  Handling Events (Root Finding)
+!
+!    DVODE_F90 contains root finding provisions. It attempts to
+!    locates the roots of a set of functions
+!         g(i) = g(i,t,y(1),...,y(NEQ))  (i = 1,...,ng).
+!    To use root finding include NEVENTS=NG in your call to SET_OPTS
+!    where NG is the number of root finding functions. You must then
+!    supply subroutine GFUN in your call to DVODE_F90 using
+!    G_FCN=GFUN as the last argument. GFUN must has the form
+!               SUBROUTINE GFUN(NEQ, T, Y, NG, GOUT)
+!    where NEQ, T, Y, and NG are input, and the array GOUT is output.
+!    NEQ, T, and Y have the same meaning as in the F routine, and
+!    GOUT is an array of length NG. For i = 1,...,NG, this routine is
+!    to load into GOUT(i) the value at (T,Y) of the i-th constraint
+!    function g(i). DVODE_F90 will find roots of the g(i) of odd
+!    multiplicity (i.e. sign changes) as they occur during the
+!    integration. GFUN must be declared EXTERNAL in the calling
+!    program. Note that because of numerical errors in the functions
+!    g(i) due to roundoff and integration error, DVODE_F90 may return
+!    false roots, or return the same root at two or more nearly equal
+!    values of t. This is particularly true for problems in which the
+!    integration is restarted (ISTATE = 1) at a root. If such false
+!    roots are suspected, you should consider smaller error tolerances
+!    and/or higher precision in the evaluation of the g(i). Note
+!    further that if a root of some g(i) defines the end of the
+!    problem, the input to DVODE_F90 should nevertheless allow
+!    integration to a point slightly past that root, so that DVODE_F90
+!    can locate the root by interpolation. Each time DVODE_F90 locates
+!    a root of one of your event functions it makes a return to the
+!    calling program with ISTATE = 3. When such a return is made and
+!    you have processed the results, simply change ISTATE = 2 and call
+!    DVODE_F90 again without making other changes.
+! ______________________________________________________________________
+! Section 7.  Gathering Integration Statistics
+!
+! SUBROUTINE GET_STATS(RSTATS, ISTATS, NUMEVENTS, JROOTS)
+! Caution:
+! RSTATS and ISTATS must be declared and dimensioned in your
+! main program. The minimum dimensions are:
+! DIMENSION RSTATS(22), ISTATS(31)
+! This subroutine returns the user portions of the original DVODE
+! RUSER and IUSER arrays, and if root finding is being done, it
+! returns the original LSODAR JROOT vector. NUMEVENTS and JROOTS
+! are optional parameters. NUMEVENTS is the number of root functions
+! and JROOTS is an integer array of length NUMEVENTS.
+! Available Integration Statistics:
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (E(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! MA28AD_CALLS      IUSER(23) The number of calls made to MA28AD
+! MA28BD_CALLS      IUSER(24) The number of calls made to MA28BD
+! MA28CD_CALLS      IUSER(25) The number of calls made to MA28CD
+! MC19AD_CALLS      IUSER(26) The number of calls made to MC19AD
+! IRNCP             IUSER(27) The number of compressions done on array JAN
+! ICNCP             IUSER(28) The number of compressions done on array ICN
+! MINIRN            IUSER(29) Minimum size for JAN array
+! MINICN            IUSER(30) Minimum size for ICN array
+! MINNZ             IUSER(31) Number of nonzeros in sparse Jacobian
+! JROOTS  JROOTS    Optional array of component indices for components
+!                   having a zero at the current time
+! ______________________________________________________________________
+! Section 8.  Determining Jacobian Sparsity Structure Arrays
+!
+! If you are solving a problem with a sparse Jacobian, the arrays
+! that define the sparsity structure are needed. The arrays may
+! be determined in any of several ways.
+! 1. If you choose the default mode by indicating SPARSE=.TRUE.,
+!    the sparsity arrays will be determined internally by DVODE_F90
+!    by making calls to your derivative subroutine. This mode is
+!    equivalent to using the integration method flag MF = 227.
+! 2. The DVODE_F90 method flag MF is defined to be
+!    MF = 100*MOSS + 10*METH + MITER. If you supply MF = 227 (or 217),
+!    the sparse Jacobian will be determined using finite differences;
+!    and the sparsity arrays will be determined by calling your
+!    derivative subroutine.
+! 3. If you supply MF = 126 (or 116), you must supply the Jacobian
+!    subroutine JAC to define the exact Jacobian. JAC must have the
+!    following form:
+!           SUBROUTINE JAC (N, T, Y, IA, JA, NZ, PD)
+!    Given the number of odes N, the current time T, and the current
+!    solution vector Y, JAC must do the following:
+!    -  If NZ = 0 on input:
+!       Replace NZ by the number of nonzero elements in the Jacobian.
+!       The diagonal of the Jacobian must be included.
+!       Do NOT define the arrays IA, JA, PD at this time.
+!       Once JAC has been called with NZ = 0 and you have defined the
+!       value of NZ, future calls to JAC will use this value of NZ.
+!    -  When a call is made with NZ unequal to 0, you must define the
+!       sparsity structure arrays IA and JA, and the sparse Jacobian
+!       PD.
+!         - IA defines the number of nonzeros including the diagonal
+!           in each column of the Jacobian. Define IA(1) = 1 and for
+!           J = 1,..., N,
+!           IA(J+1) = IA(J) + number of nonzeros in column J.
+!           Diagonal elements must be include even if they are zero.
+!           You should check to ensure that IA(N+1)-1 = NZ.
+!         - JA defines the rows in which the nonzeros occur. For
+!           I = 1,...,NZ, JA(I) is the row in which the Ith element
+!           of the Jacobian occurs. JA must also include the diagonal
+!           elements of the Jacobian.
+!         - PD defines the numerical value of the Jacobian elements.
+!           For I = 1,...,NZ, PD(I) is the numerical value of the
+!           Ith element in the Jacobian. PD must also include the
+!           diagonal elements of the Jacobian.
+! 4. If you wish to supply the IA and JA arrays directly, use
+!    MF = 27. In this case, after calling SET_OPTS, you must call
+!    SET_IAJA supplying the arrays IAUSER and JAUSER described in
+!    the documentation prologue for SET_IAJA. These arrays will be
+!    used when approximate Jacobians are determined using finite
+!    differences.
+! There are two user callable sparsity structure subroutines:
+! USERSETS_IAJA may be used if you wish to supply the sparsity
+! structure directly.
+! SUBROUTINE USERSETS_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!     Caution:
+!     If it is called, USERSETS_IAJA must be called after the
+!     call to SET_OPTS.
+!     Usage:
+!     CALL SET_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!     Arguments:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+! The second subroutine allows you to approximate the sparsity
+! structure using derivative differences. It allows more flexibility
+! in the determination of perturbation increments used.
+! SUBROUTINE SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER, &
+!   NIAUSER, JAUSER, NJAUSER)
+!     Caution:
+!     If it is called, SET_IAJA must be called after the call to
+!     SET_OPTS.
+!     Usage:
+!     SET_IAJA may be called in one of two ways:
+
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB)
+!       In this case IA and JA will be determined using calls
+!       to your derivative routine DFN.
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+!       JAUSER, NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!       T, Y, FMIN, NTURB, and DTURB will be ignored (though
+!       they must be present in the argument list).
+!     Arguments:
+!     DFN     = DVODE derivative subroutine
+!     NEQ     = Number of odes
+!     T       = independent variable t
+!     Y       = solution y(t)
+!     FMIN    = Jacobian threshold value. Elements of the Jacobian
+!               with magnitude smaller than FMIN will be ignored.
+!               FMIN will be ignored if it is less than or equal
+!               to ZERO.
+!     NTURB   = Perturbation flag. If NTURB=1, component I of Y
+!               will be perturbed by 1.01D0.
+!               If NTURB=NEQ, component I of Y will be perturbed
+!               by ONE + DTURB(I).
+!     DTURB   = perturbation vector of length 1 or NEQ.
+!     If these four optional parameters are present, IAUSER and JAUSER
+!     will be copied to IA and JA rather than making derivative calls
+!     to approximate IA and JA:
+!        IAUSER  = user supplied IA array
+!        NIAUSER = length of IAUSER array
+!        JAUSER  = user supplied JA vector
+!        NJAUSER = length of JAUSER array
+! ______________________________________________________________________
+! Section 9.  Original DVODE.F Documentation Prologue
+!
+! SUBROUTINE DVODE(F, NEQ, Y, T, TOUT, ITASK, ISTATE, OPTS, JAC, GFUN)
+! DVODE: Variable-coefficient Ordinary Differential Equation solver,
+! with fixed-leading-coefficient implementation.
+! Note:
+! Numerous changes have been made in the documentation and the code
+! from the original Fortran 77 DVODE solver. With regard to the new
+! F90 version, if you choose options that correspond to options
+! available in the original f77 solver, you should obtain the same
+! results. In all testing, identical results have been obtained
+! between this version and a simple F90 translation of the original
+! solver.
+! DVODE solves the initial value problem for stiff or nonstiff
+! systems of first order ODEs,
+!     dy/dt = f(t,y), or, in component form,
+!     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+! DVODE is a package based on the EPISODE and EPISODEB packages, and
+! on the ODEPACK user interface standard, with minor modifications.
+! This version is based also on elements of LSODES and LSODAR.
+! Authors:
+!               Peter N. Brown and Alan C. Hindmarsh
+!               Center for Applied Scientific Computing, L-561
+!               Lawrence Livermore National Laboratory
+!               Livermore, CA 94551
+!               George D. Byrne
+!               Illinois Institute of Technology
+!               Chicago, IL 60616
+! References:
+! 1. P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, "VODE: A Variable
+!    Coefficient ODE Solver," SIAM J. Sci. Stat. Comput., 10 (1989),
+!    pp. 1038-1051. Also, LLNL Report UCRL-98412, June 1988.
+! 2. G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the
+!    Numerical Solution of Ordinary Differential Equations,"
+!    ACM Trans. Math. Software, 1 (1975), pp. 71-96.
+! 3. A. C. Hindmarsh and G. D. Byrne, "EPISODE: An Effective Package
+!    for the Integration of Systems of Ordinary Differential
+!    Equations," LLNL Report UCID/30112, Rev. 1, April 1977.
+! 4. G. D. Byrne and A. C. Hindmarsh, "EPISODEB: An Experimental
+!    Package for the Integration of Systems of Ordinary Differential
+!    Equations with Banded Jacobians," LLNL Report UCID/30132, April
+!    1976.
+! 5. A. C. Hindmarsh, "ODEPACK, a Systematized Collection of ODE
+!    Solvers," in Scientific Computing, R. S. Stepleman et al., eds.,
+!    North-Holland, Amsterdam, 1983, pp. 55-64.
+! 6. K. R. Jackson and R. Sacks-Davis, "An Alternative Implementation
+!    of Variable Step-Size Multistep Formulas for Stiff ODEs," ACM
+!    Trans. Math. Software, 6 (1980), pp. 295-318.
+!                     Summary of Usage
+! Communication between the user and the DVODE package, for normal
+! situations, is summarized here. This summary describes only a subset
+! of the full set of options available. See the full description for
+! details, including optional communication, nonstandard options,
+! and instructions for special situations. See also the example
+! problem (with program and output) following this summary.
+! A. First provide a subroutine of the form:
+!           SUBROUTINE F(NEQ, T, Y, YDOT)
+!           REAL(KIND=WP) T, Y(NEQ), YDOT(NEQ)
+! which supplies the vector function f by loading YDOT(i) with f(i).
+! B. Next determine (or guess) whether or not the problem is stiff.
+! Stiffness occurs when the Jacobian matrix df/dy has an eigenvalue
+! whose real part is negative and large in magnitude, compared to the
+! reciprocal of the t span of interest. If the problem is nonstiff,
+! use a method flag MF = 10. If it is stiff, there are four standard
+! choices for MF(21, 22, 24, 25), and DVODE requires the Jacobian
+! matrix in some form. In these cases (MF > 0), DVODE will use a
+! saved copy of the Jacobian matrix. If this is undesirable because of
+! storage limitations, set MF to the corresponding negative value
+! (-21, -22, -24, -25). (See full description of MF below.)
+! The Jacobian matrix is regarded either as full (MF = 21 or 22),
+! or banded (MF = 24 or 25). In the banded case, DVODE requires two
+! half-bandwidth parameters ML and MU. These are, respectively, the
+! widths of the lower and upper parts of the band, excluding the main
+! diagonal. Thus the band consists of the locations (i,j) with
+! i-ML <= j <= i+MU, and the full bandwidth is ML+MU+1.
+! C. If the problem is stiff, you are encouraged to supply the Jacobian
+! directly (MF = 21 or 24), but if this is not feasible, DVODE will
+! compute it internally by difference quotients (MF = 22 or 25).
+! If you are supplying the Jacobian, provide a subroutine of the form:
+!           SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!           REAL(KIND=WP) T, Y(NEQ), PD(NROWPD,NEQ)
+! which supplies df/dy by loading PD as follows:
+!     For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+! the partial derivative of f(i) with respect to y(j). (Ignore the
+! ML and MU arguments in this case.)
+!     For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with
+! df(i)/dy(j), i.e. load the diagonal lines of df/dy into the rows of
+! PD from the top down.
+!     In either case, only nonzero elements need be loaded.
+! D. Write a main program which calls subroutine DVODE once for
+! each point at which answers are desired. This should also provide
+! for possible use of logical unit 6 for output of error messages
+! by DVODE. On the first call to DVODE, supply arguments as follows:
+! F      = Name of subroutine for right-hand side vector f.
+!          This name must be declared external in calling program.
+! NEQ    = Number of first order ODEs.
+! Y      = Array of initial values, of length NEQ.
+! T      = The initial value of the independent variable.
+! TOUT   = First point where output is desired (/= T).
+! ITOL   = 1 or 2 according as ATOL(below) is a scalar or array.
+! RTOL   = Relative tolerance parameter (scalar).
+! ATOL   = Absolute tolerance parameter (scalar or array).
+!          The estimated local error in Y(i) will be controlled so as
+!          to be roughly less (in magnitude) than
+!             EWT(i) = RTOL*ABS(Y(i)) + ATOL     if ITOL = 1, or
+!             EWT(i) = RTOL*ABS(Y(i)) + ATOL(i)  if ITOL = 2.
+!          Thus the local error test passes if, in each component,
+!          either the absolute error is less than ATOL(or ATOL(i)),
+!          or the relative error is less than RTOL.
+!          Use RTOL = 0.0 for pure absolute error control, and
+!          use ATOL = 0.0 (or ATOL(i) = 0.0) for pure relative error
+!          control. Caution: Actual (global) errors may exceed these
+!          local tolerances, so choose them conservatively.
+! ITASK  = 1 for normal computation of output values of Y at t = TOUT.
+! ISTATE = Integer flag (input and output). Set ISTATE = 1.
+! IOPT   = 0 to indicate no optional input used.
+! JAC    = Name of subroutine for Jacobian matrix (MF = 21 or 24).
+!          If used, this name must be declared external in calling
+!          program. If not used, pass a dummy name.
+! MF     = Method flag. Standard values are:
+!          10 for nonstiff (Adams) method, no Jacobian used.
+!          21 for stiff (BDF) method, user-supplied full Jacobian.
+!          22 for stiff method, internally generated full Jacobian.
+!          24 for stiff method, user-supplied banded Jacobian.
+!          25 for stiff method, internally generated banded Jacobian.
+! E. The output from the first call (or any call) is:
+!      Y = Array of computed values of y(t) vector.
+!      T = Corresponding value of independent variable (normally TOUT).
+! ISTATE = 2  if DVODE was successful, negative otherwise.
+!          -1 means excess work done on this call. (Perhaps wrong MF.)
+!          -2 means excess accuracy requested. (Tolerances too small.)
+!          -3 means illegal input detected. (See printed message.)
+!          -4 means repeated error test failures. (Check all input.)
+!          -5 means repeated convergence failures. (Perhaps bad
+!             Jacobian supplied or wrong choice of MF or tolerances.)
+!          -6 means error weight became zero during problem. (Solution
+!             component I vanished, and ATOL or ATOL(I) = 0.)
+! F. To continue the integration after a successful return, simply
+! reset TOUT and call DVODE again. No other parameters need be reset.
+!         Full Description of User Interface to DVODE
+! The user interface to DVODE consists of the following parts.
+! i.  The call sequence to subroutine DVODE, which is a driver
+!      routine for the solver. This includes descriptions of both
+!      the call sequence arguments and of user-supplied routines.
+!      Following these descriptions is
+!        * a description of optional input available through the
+!          call sequence,
+!        * a description of optional output (in the work arrays), and
+!        * instructions for interrupting and restarting a solution.
+! ii. Descriptions of other routines in the DVODE package that may be
+!      (optionally) called by the user. These provide the ability to
+!      alter error message handling, save and restore the internal
+!      PRIVATE variables, and obtain specified derivatives of the
+!      solution y(t).
+! iii. Descriptions of PRIVATE variables to be declared in overlay
+!      or similar environments.
+! iv. Description of two routines in the DVODE package, either of
+!      which the user may replace with his own version, if desired.
+!      these relate to the measurement of errors.
+! Part i. Call Sequence.
+! The call sequence parameters used for input only are
+!     F, NEQ, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, JAC, MF,
+! and those used for both input and output are
+!     Y, T, ISTATE.
+! The work arrays RUSER and IUSER are used for conditional and
+! optional input and optional output. (The term output here refers
+! to the return from subroutine DVODE to the user's calling program.)
+! The legality of input parameters will be thoroughly checked on the
+! initial call for the problem, but not checked thereafter unless a
+! change in input parameters is flagged by ISTATE = 3 in the input.
+! The descriptions of the call arguments are as follows.
+! F      = The name of the user-supplied subroutine defining the
+!          ODE system. The system must be put in the first-order
+!          form dy/dt = f(t,y), where f is a vector-valued function
+!          of the scalar t and the vector y. Subroutine F is to
+!          compute the function f. It is to have the form
+!               SUBROUTINE F(NEQ, T, Y, YDOT)
+!               REAL(KIND=WP) T, Y(NEQ), YDOT(NEQ)
+!          where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+!          is output. Y and YDOT are arrays of length NEQ.
+!          Subroutine F should not alter Y(1),...,Y(NEQ).
+!          F must be declared EXTERNAL in the calling program.
+
+!          If quantities computed in the F routine are needed
+!          externally to DVODE, an extra call to F should be made
+!          for this purpose, for consistent and accurate results.
+!          If only the derivative dy/dt is needed, use DVINDY instead.
+! NEQ    = The size of the ODE system (number of first order
+!          ordinary differential equations). Used only for input.
+!          NEQ may not be increased during the problem, but
+!          can be decreased (with ISTATE = 3 in the input).
+! Y      = A real array for the vector of dependent variables, of
+!          length NEQ or more. Used for both input and output on the
+!          first call (ISTATE = 1), and only for output on other calls.
+!          On the first call, Y must contain the vector of initial
+!          values. In the output, Y contains the computed solution
+!          evaluated at T. If desired, the Y array may be used
+!          for other purposes between calls to the solver.
+!          This array is passed as the Y argument in all calls to
+!          F and JAC.
+! T      = The independent variable. In the input, T is used only on
+!          the first call, as the initial point of the integration.
+!          In the output, after each call, T is the value at which a
+!          computed solution Y is evaluated (usually the same as TOUT).
+!          On an error return, T is the farthest point reached.
+! TOUT   = The next value of t at which a computed solution is desired.
+!          Used only for input.
+!          When starting the problem (ISTATE = 1), TOUT may be equal
+!          to T for one call, then should /= T for the next call.
+!          For the initial T, an input value of TOUT /= T is used
+!          in order to determine the direction of the integration
+!          (i.e. the algebraic sign of the step sizes) and the rough
+!          scale of the problem. Integration in either direction
+!          (forward or backward in t) is permitted.
+!          If ITASK = 2 or 5 (one-step modes), TOUT is ignored after
+!          the first call (i.e. the first call with TOUT /= T).
+!          Otherwise, TOUT is required on every call.
+!          If ITASK = 1, 3, or 4, the values of TOUT need not be
+!          monotone, but a value of TOUT which backs up is limited
+!          to the current internal t interval, whose endpoints are
+!          TCUR - HU and TCUR. (See optional output, below, for
+!          TCUR and HU.)
+! ITOL   = An indicator for the type of error control. See
+!          description below under ATOL. Used only for input.
+! RTOL   = A relative error tolerance parameter, either a scalar or
+!          an array of length NEQ. See description below under ATOL.
+!          Input only.
+! ATOL   = An absolute error tolerance parameter, either a scalar or
+!          an array of length NEQ. Input only.
+!          The input parameters ITOL, RTOL, and ATOL determine
+!          the error control performed by the solver. The solver will
+!          control the vector e = (e(i)) of estimated local errors
+!          in Y, according to an inequality of the form
+!                      rms-norm of (E(i)/EWT(i)) <= 1,
+!          where       EWT(i) = RTOL(i)*ABS(Y(i)) + ATOL(i),
+!          and the rms-norm (root-mean-square norm) here is
+!          rms-norm(v) = sqrt(sum v(i)**2 / NEQ). Here EWT
+!          is a vector of weights which must always be positive, and
+!          the values of RTOL and ATOL should all be nonnegative.
+!          The following table gives the types (scalar/array) of
+!          RTOL and ATOL, and the corresponding form of EWT(i).
+!           ITOL    RTOL       ATOL          EWT(i)
+!            1     scalar     scalar     RTOL*ABS(Y(i)) + ATOL
+!            2     scalar     array      RTOL*ABS(Y(i)) + ATOL(i)
+!            3     array      scalar     RTOL(i)*ABS(Y(i)) + ATOL
+!            4     array      array      RTOL(i)*ABS(Y(i)) + ATOL(i)
+!          When either of these parameters is a scalar, it need not
+!          be dimensioned in the user's calling program.
+!          If none of the above choices (with ITOL, RTOL, and ATOL
+!          fixed throughout the problem) is suitable, more general
+!          error controls can be obtained by substituting
+!          user-supplied routines for the setting of EWT and/or for
+!          the norm calculation. See Part iv below.
+!          If global errors are to be estimated by making a repeated
+!          run on the same problem with smaller tolerances, then all
+!          components of RTOL and ATOL(i.e. of EWT) should be scaled
+!          down uniformly.
+! ITASK  = An index specifying the task to be performed.
+!          Input only. ITASK has the following values and meanings.
+!          1  means normal computation of output values of y(t) at
+!             t = TOUT(by overshooting and interpolating).
+!          2  means take one step only and return.
+!          3  means stop at the first internal mesh point at or
+!             beyond t = TOUT and return.
+!          4  means normal computation of output values of y(t) at
+!             t = TOUT but without overshooting t = TCRIT.
+!             TCRIT must be input as RUSER(1). TCRIT may be equal to
+!             or beyond TOUT, but not behind it in the direction of
+!             integration. This option is useful if the problem
+!             has a singularity at or beyond t = TCRIT.
+!          5  means take one step, without passing TCRIT, and return.
+!             TCRIT must be input as RUSER(1).
+!          Note:  If ITASK = 4 or 5 and the solver reaches TCRIT
+!          (within roundoff), it will return T = TCRIT(exactly) to
+!          indicate this (unless ITASK = 4 and TOUT comes before TCRIT,
+!          in which case answers at T = TOUT are returned first).
+! ISTATE = an index used for input and output to specify the
+!          the state of the calculation.
+!          In the input, the values of ISTATE are as follows.
+!          1  means this is the first call for the problem
+!             (initializations will be done). See note below.
+!          2  means this is not the first call, and the calculation
+!             is to continue normally, with no change in any input
+!             parameters except possibly TOUT and ITASK.
+!             (If ITOL, RTOL, and/or ATOL are changed between calls
+!             with ISTATE = 2, the new values will be used but not
+!             tested for legality.)
+!          3  means this is not the first call, and the
+
+!             calculation is to continue normally, but with
+!             a change in input parameters other than
+!             TOUT and ITASK. Changes are allowed in
+!             NEQ, ITOL, RTOL, ATOL, IOPT, MF, ML, MU,
+!             and any of the optional input except H0.
+!             (See IUSER description for ML and MU.)
+!          Caution:
+!          If you make a call to DVODE_F90 with ISTATE=3, you will
+!          first need to call SET_OPTS again, supplying the new
+!          necessary option values.
+!          Note:  A preliminary call with TOUT = T is not counted
+!          as a first call here, as no initialization or checking of
+!          input is done. (Such a call is sometimes useful to include
+!          the initial conditions in the output.)
+!          Thus the first call for which TOUT /= T requires
+!          ISTATE = 1 in the input.
+!          In the output, ISTATE has the following values and meanings.
+!           1  means nothing was done, as TOUT was equal to T with
+!              ISTATE = 1 in the input.
+!           2  means the integration was performed successfully.
+!          -1  means an excessive amount of work (more than MXSTEP
+!              steps) was done on this call, before completing the
+!              requested task, but the integration was otherwise
+!              successful as far as T. (MXSTEP is an optional input
+!              and is normally 5000.)  To continue, the user may
+!              simply reset ISTATE to a value > 1 and call again.
+!              (The excess work step counter will be reset to 0.)
+!              In addition, the user may increase MXSTEP to avoid
+!              this error return. (See optional input below.)
+!          -2  means too much accuracy was requested for the precision
+!              of the machine being used. This was detected before
+!              completing the requested task, but the integration
+!              was successful as far as T. To continue, the tolerance
+!              parameters must be reset, and ISTATE must be set
+!              to 3. The optional output TOLSF may be used for this
+!              purpose. (Note: If this condition is detected before
+!              taking any steps, then an illegal input return
+!              (ISTATE = -3) occurs instead.)
+!          -3  means illegal input was detected, before taking any
+!              integration steps. See written message for details.
+!              Note:  If the solver detects an infinite loop of calls
+!              to the solver with illegal input, it will cause
+!              the run to stop.
+!          -4  means there were repeated error test failures on
+!              one attempted step, before completing the requested
+!              task, but the integration was successful as far as T.
+!              The problem may have a singularity, or the input
+!              may be inappropriate.
+!          -5  means there were repeated convergence test failures on
+!              one attempted step, before completing the requested
+!              task, but the integration was successful as far as T.
+!              This may be caused by an inaccurate Jacobian matrix,
+!              if one is being used.
+!          -6  means EWT(i) became zero for some i during the
+!              integration. Pure relative error control (ATOL(i)=0.0)
+!              was requested on a variable which has now vanished.
+!              The integration was successful as far as T.
+!          Note:  Since the normal output value of ISTATE is 2,
+!          it does not need to be reset for normal continuation.
+!          Also, since a negative input value of ISTATE will be
+!          regarded as illegal, a negative output value requires the
+!          user to change it, and possibly other input, before
+!          calling the solver again.
+! IOPT   = An integer flag to specify whether or not any optional
+!          input is being used on this call. Input only.
+!          The optional input is listed separately below.
+!          IOPT = 0 means no optional input is being used.
+!                   Default values will be used in all cases.
+!          IOPT = 1 means optional input is being used.
+! RUSER  = A real working array (KPP_REAL).
+!          The length of RUSER must be at least 22
+!             20 + NYH * (MAXORD + 1) where
+!          NYH    = the initial value of NEQ,
+!          MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a
+!                   smaller value is given as an optional input),
+!          The first 22 words of RUSER are reserved for conditional
+!          and optional input and optional output.
+
+!          The following word in RUSER is a conditional input:
+!            RUSER(1) = TCRIT = critical value of t which the solver
+!                       is not to overshoot. Required if ITASK is
+!                       4 or 5, and ignored otherwise. (See ITASK.)
+! IUSER  = An integer work array. The length of IUSER must be at least 30.
+!             30        if MITER = 0 or 3 (MF = 10, 13, 20, 23), or
+!             30 + NEQ  otherwise (ABS(MF) = 11,12,14,15,16,17,21,22,
+!             24,25,26,27).
+!          The first 30 words of IUSER are reserved for conditional and
+!          optional input and optional output.
+
+!          The following 2 words in IUSER are conditional input:
+!            IUSER(1) = ML  These are the lower and upper
+!            IUSER(2) = MU  half-bandwidths, respectively, of the
+!                       banded Jacobian, excluding the main diagonal.
+!                       The band is defined by the matrix locations
+!                       (i,j) with i-ML <= j <= i+MU. ML and MU
+!                       must satisfy  0 <= ML,MU  <= NEQ-1.
+!                       These are required if MITER is 4 or 5, and
+!                       ignored otherwise. ML and MU may in fact be
+!                       the band parameters for a matrix to which
+!                       df/dy is only approximately equal.
+! Note:  The work arrays must not be altered between calls to DVODE
+! for the same problem, except possibly for the conditional and
+! optional input, and except for the last 3*NEQ words of RUSER.
+! The latter space is used for internal scratch space, and so is
+! available for use by the user outside DVODE between calls, if
+! desired (but not for use by F or JAC).
+! JAC    = The name of the user-supplied routine (MITER = 1 or 4 or 6)
+!          to compute the Jacobian matrix, df/dy, as a function of
+!          the scalar t and the vector y. It is to have the form
+!               SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!               REAL(KIND=WP) T, Y(NEQ), PD(NROWPD,NEQ)
+!          where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+!          PD is to be loaded with partial derivatives (elements of the
+!          Jacobian matrix) in the output. PD must be given a first
+!          dimension of NROWPD. T and Y have the same meaning as in
+!          Subroutine F.
+!               In the full matrix case (MITER = 1), ML and MU are
+!          ignored, and the Jacobian is to be loaded into PD in
+!          columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+!               In the band matrix case (MITER = 4), the elements
+!          within the band are to be loaded into PD in columnwise
+!          manner, with diagonal lines of df/dy loaded into the rows
+!          of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+!          ML and MU are the half-bandwidth parameters. (See IUSER).
+!          The locations in PD in the two triangular areas which
+!          correspond to nonexistent matrix elements can be ignored
+!          or loaded arbitrarily, as they are overwritten by DVODE.
+!               In the sparse matrix case the elements of the matrix
+!          are determined by the sparsity structure given by the
+!          IA and JA pointer arrays. Refer to the documentation
+!          prologue for SET_OPTS for a description of the arguments
+!          for JAC since they differ from the dense and banded cases.
+!               JAC need not provide df/dy exactly. A crude
+!          approximation (possibly with a smaller bandwidth) will do.
+!               In either case, PD is preset to zero by the solver,
+!          so that only the nonzero elements need be loaded by JAC.
+!          Each call to JAC is preceded by a call to F with the same
+!          arguments NEQ, T, and Y. Thus to gain some efficiency,
+!          intermediate quantities shared by both calculations may be
+!          saved in a user common block by F and not recomputed by JAC,
+!          if desired. Also, JAC may alter the Y array, if desired.
+!          JAC must be declared external in the calling program.
+! MF     = The method flag. Used only for input. The legal values of
+!          MF are 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24,
+!          25, 26, 27, -11, -12, -14, -15, -21, -22, -24, -25, -26,
+!          -27.
+!          MF is a signed two-digit integer, MF = JSV*(10*METH+MITER).
+!          JSV = SIGN(MF) indicates the Jacobian-saving strategy:
+!            JSV =  1 means a copy of the Jacobian is saved for reuse
+!                     in the corrector iteration algorithm.
+!            JSV = -1 means a copy of the Jacobian is not saved
+!                     (valid only for MITER = 1, 2, 4, or 5).
+!          METH indicates the basic linear multistep method:
+!            METH = 1 means the implicit Adams method.
+!            METH = 2 means the method based on backward
+!                     differentiation formulas (BDF-s).
+!          MITER indicates the corrector iteration method:
+!            MITER = 0 means functional iteration (no Jacobian matrix
+!                      is involved).
+!            MITER = 1 means chord iteration with a user-supplied
+!                      full (NEQ by NEQ) Jacobian.
+!            MITER = 2 means chord iteration with an internally
+!                      generated (difference quotient) full Jacobian
+!                      (using NEQ extra calls to F per df/dy value).
+!            MITER = 3 means chord iteration with an internally
+!                      generated diagonal Jacobian approximation
+!                      (using 1 extra call to F per df/dy evaluation).
+!            MITER = 4 means chord iteration with a user-supplied
+!                      banded Jacobian.
+!            MITER = 5 means chord iteration with an internally
+!                      generated banded Jacobian (using ML+MU+1 extra
+!                      calls to F per df/dy evaluation).
+!            MITER = 6 means chord iteration with a user-supplied
+!                      sparse Jacobian.
+!            MITER = 7 means chord iteration with an internally
+!                      generated sparse Jacobian
+!          If MITER = 1, 4, or 6 the user must supply a subroutine
+!          JAC(the name is arbitrary) as described above under JAC.
+!          For other values of MITER, a dummy argument can be used.
+!                         Optional Input
+! The following is a list of the optional input provided for in the
+! call sequence. (See also Part ii.)  For each such input variable,
+! this table lists its name as used in this documentation, its
+! location in the call sequence, its meaning, and the default value.
+! The use of any of this input requires IOPT = 1, and in that
+! case all of this input is examined. A value of zero for any of
+! these optional input variables will cause the default value to be
+! used. Thus to use a subset of the optional input, simply preload
+! locations 5 to 10 in RUSER and IUSER to 0.0 and 0, respectively,
+! and then set those of interest to nonzero values.
+! NAME    LOCATION      MEANING AND DEFAULT VALUE
+! H0      RUSER(5)  The step size to be attempted on the first step.
+!                   The default value is determined by the solver.
+! HMAX    RUSER(6)  The maximum absolute step size allowed.
+!                   The default value is infinite.
+! HMIN    RUSER(7)  The minimum absolute step size allowed.
+!                   The default value is 0. (This lower bound is not
+!                   enforced on the final step before reaching TCRIT
+!                   when ITASK = 4 or 5.)
+! MAXORD  IUSER(5)  The maximum order to be allowed. The default
+!                   value is 12 if METH = 1, and 5 if METH = 2.
+!                   If MAXORD exceeds the default value, it will
+!                   be reduced to the default value.
+!                   If MAXORD is changed during the problem, it may
+!                   cause the current order to be reduced.
+! MXSTEP  IUSER(6)  Maximum number of (internally defined) steps
+!                   allowed during one call to the solver.
+!                   The default value is 5000.
+! MXHNIL  IUSER(7)  Maximum number of messages printed (per problem)
+!                   warning that T + H = T on a step (H = step size).
+!                   This must be positive to result in a non-default
+!                   value. The default value is 10.
+!                          Optional Output
+! As optional additional output from DVODE, the variables listed
+! below are quantities related to the performance of DVODE
+! which are available to the user. These are communicated by way of
+! the work arrays, but also have internal mnemonic names as shown.
+! Except where stated otherwise, all of this output is defined
+! on any successful return from DVODE, and on any return with
+! ISTATE = -1, -2, -4, -5, or -6. On an illegal input return
+! (ISTATE = -3), they will be unchanged from their existing values
+! (if any), except possibly for TOLSF, LENRW, and LENIW.
+! On any error return, output relevant to the error will be defined,
+! as noted below.
+! NAME    LOCATION      MEANING
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (e(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! The following two arrays are segments of the RUSER array which
+! may also be of interest to the user as optional output.
+! For each array, the table below gives its internal name,
+! its base address in RUSER, and its description.
+!                  Interrupting and Restarting
+! If the integration of a given problem by DVODE is to be interrupted
+! and then later continued, such as when restarting an interrupted run
+! or alternating between two or more ODE problems, the user should save,
+! following the return from the last DVODE call prior to the
+! interruption, the contents of the call sequence variables and
+! internal PRIVATE variables, and later restore these values before the
+! next DVODE call for that problem. To save and restore the PRIVATE
+! variables, use subroutine DVSRCO, as described below in part ii.
+! In addition, if non-default values for either LUN or MFLAG are
+! desired, an extra call to XSETUN and/or XSETF should be made just
+! before continuing the integration. See Part ii below for details.
+! Part ii. Other Routines Callable.
+! The following are optional calls which the user may make to
+! gain additional capabilities in conjunction with DVODE.
+! (The routines XSETUN and XSETF are designed to conform to the
+! SLATEC error handling package.)
+!     FORM OF CALL                  FUNCTION
+!  CALL XSETUN(LUN)           Set the logical unit number, LUN, for
+!                             output of messages from DVODE, if
+!                             the default is not desired.
+!                             The default value of LUN is 6.
+!  CALL XSETF(MFLAG)          Set a flag to control the printing of
+!                             messages by DVODE.
+!                             MFLAG = 0 means do not print. (Danger:
+!                             This risks losing valuable information.)
+!                             Either of the above calls may be made at
+!                             any time and will take effect immediately.
+!  CALL DVINDY(...)           Provide derivatives of y, of various
+!                             orders, at a specified point T, if
+!                             desired. It may be called only after
+!                             a successful return from DVODE.
+! The detailed instructions for using DVINDY are as follows.
+! The form of the call is:
+!      CALL DVINDY(T,K,DKY,IFLAG)
+! The input parameters are:
+! T         = Value of independent variable where answers are desired
+!             (normally the same as the T last returned by DVODE).
+!             For valid results, T must lie between TCUR - HU and TCUR.
+!             (See optional output for TCUR and HU.)
+! K         = Integer order of the derivative desired. K must satisfy
+!             0 <= K <= NQCUR, where NQCUR is the current order
+!             (see optional output). The capability corresponding
+!             to K = 0, i.e. computing y(T), is already provided
+!             by DVODE directly. Since NQCUR >= 1, the first
+!             derivative dy/dt is always available with DVINDY.
+! The output parameters are:
+! DKY       = A real array of length NEQ containing the computed value
+!             of the K-th derivative of y(t).
+! IFLAG     = Integer flag, returned as 0 if K and T were legal,
+!             -1 if K was illegal, and -2 if T was illegal.
+!             On an error return, a message is also written.
+! Part iii. Optionally Replaceable Solver Routines.
+! Below are descriptions of two routines in the DVODE package which
+! relate to the measurement of errors. Either routine can be
+! replaced by a user-supplied version, if desired. However, since such
+! a replacement may have a major impact on performance, it should be
+! done only when absolutely necessary, and only with great caution.
+! (Note: The means by which the package version of a routine is
+! superseded by the user's version may be system-dependent.)
+! (a) DEWSET.
+! The following subroutine is called just before each internal
+! integration step, and sets the array of error weights, EWT, as
+! described under ITOL/RTOL/ATOL above:
+!     SUBROUTINE DEWSET(NEQ, ITOL, RTOL, ATOL, YCUR, EWT)
+! where NEQ, ITOL, RTOL, and ATOL are as in the DVODE call sequence,
+! YCUR contains the current dependent variable vector, and
+! EWT is the array of weights set by DEWSET.
+! If the user supplies this subroutine, it must return in EWT(i)
+! (i = 1,...,NEQ) a positive quantity suitable for comparison with
+! errors in Y(i). The EWT array returned by DEWSET is passed to the
+! DVNORM function (See below.), and also used by DVODE in the
+! computation of the optional output IMXER, the diagonal Jacobian
+! approximation, and the increments for difference quotient Jacobians.
+! In the user-supplied version of DEWSET, it may be desirable to use
+! the current values of derivatives of y. Derivatives up to order NQ
+! are available from the history array YH, described above under
+! Optional Output. In DEWSET, YH is identical to the YCUR array,
+! extended to NQ + 1 columns with a column length of NYH and scale
+! factors of h**j/factorial(j). On the first call for the problem,
+! given by NST = 0, NQ is 1 and H is temporarily set to 1.0.
+! NYH is the initial value of NEQ. Thus, for example, the current
+! value of dy/dt can be obtained as YCUR(NYH+i)/H  (i=1,...,NEQ)
+! (and the division by H is unnecessary when NST = 0).
+! (b) DVNORM.
+! The following is a function which computes the weighted
+! root-mean-square norm of a vector v:
+!     D = DVNORM(N, V, W)
+! where:
+!   N = the length of the vector,
+!   V = real array of length N containing the vector,
+!   W = real array of length N containing weights,
+!   D = sqrt((1/N) * sum(V(i)*W(i))**2).
+! DVNORM is called with N = NEQ and with W(i) = 1.0/EWT(i), where
+! EWT is as set by subroutine DEWSET.
+! If the user supplies this routine, it should return a nonnegative
+! value of DVNORM suitable for use in the error control in DVODE.
+! None of the arguments should be altered by DVNORM.
+! For example, a user-supplied DVNORM function might:
+!   -substitute a max-norm of (V(i)*W(i)) for the rms-norm, or
+!   -ignore some components of V in the norm, with the effect of
+!    suppressing the error control on those components of Y.
+!_______________________________________________________________________
+! Other Routines in the DVODE Package
+
+! In addition to subroutine DVODE, the DVODE package includes the
+! following subroutines and function routines (not user callable):
+!  DVHIN       computes an approximate step size for the initial step.
+!  DVINDY_CORE computes an interpolated value of the y vector at t=TOUT.
+!  DVINDY      computes an interpolated value of the y vector at t=TOUT.
+!              (user callable)
+!  DVSTEP      is the core integrator, which does one step of the
+!              integration and the associated error control.
+!  DVSET       sets all method coefficients and test constants.
+!  DVNLSD,     solves the underlying nonlinear system -- the corrector.
+!  DVNLSS28
+!  DVJAC,      computes and preprocesses the Jacobian matrix J = df/dy
+!  DVJACS28    and the Newton iteration matrix P = I - (h/l1)*J.
+!  DVSOL,      manages solution of linear system in chord iteration.
+!  DVSOLS28
+!  DVJUST      adjusts the history array on a change of order.
+!  DEWSET      sets the error weight vector EWT before each step.
+!  DVNORM      computes the weighted r.m.s. norm of a vector.
+!  DACOPY      is a routine to copy a two-dimensional array to another.
+!  DGEFA_F90 and DGESL_F90 are routines from LINPACK for solving full
+!              systems of linear algebraic equations.
+!  DGBFA_F90 and DGBSL_F90 are routines from LINPACK for solving banded
+!              linear systems.
+!  DAXPY_F90, DSCAL_F90, and DCOPY_F90 are basic linear algebra modules
+!              (BLAS).
+!  DVCHECK     does preliminary checking for roots, and serves as an
+!              interface between subroutine DVODE_F90 and subroutine
+!              DVROOTS.
+!  DVROOTS     finds the leftmost root of a set of functions.
+! ______________________________________________________________________
+! Section 10.  Example Usage
+!
+! MODULE example1
+! The following is a simple example problem, with the coding
+! needed for its solution by DVODE_F90. The problem is from
+! chemical kinetics, and consists of the following three rate
+! equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! The following coding solves this problem with DVODE_F90,
+! using a user supplied Jacobian and printing results at
+! t = .4, 4.,...,4.d10. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values. At
+! the end of the run, statistical quantities of interest are
+! printed. (See optional output in the full DVODE description
+! below.) Output is written to the file example1.dat.
+! CONTAINS
+!     SUBROUTINE FEX(NEQ, T, Y, YDOT)
+!     IMPLICIT NONE
+!     INTEGER NEQ
+!     DOUBLE PRECISION T, Y, YDOT
+!     DIMENSION Y(NEQ), YDOT(NEQ)
+!     YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
+!     YDOT(3) = 3.E7*Y(2)*Y(2)
+!     YDOT(2) = -YDOT(1) - YDOT(3)
+!     RETURN
+!     END SUBROUTINE FEX
+!     SUBROUTINE JEX(NEQ, T, Y, ML, MU, PD, NRPD)
+!     IMPLICIT NONE
+!     INTEGER NEQ,ML,MU,NRPD
+!     DOUBLE PRECISION PD, T, Y
+!     DIMENSION Y(NEQ), PD(NRPD,NEQ)
+!     PD(1,1) = -.04D0
+!     PD(1,2) = 1.D4*Y(3)
+!     PD(1,3) = 1.D4*Y(2)
+!     PD(2,1) = .04D0
+!     PD(2,3) = -PD(1,3)
+!     PD(3,2) = 6.E7*Y(2)
+!     PD(2,2) = -PD(1,2) - PD(3,2)
+!     RETURN
+!     END SUBROUTINE JEX
+! END MODULE example1
+!******************************************************************
+
+!     PROGRAM runexample1
+!     USE DVODE_F90_M
+!     USE example1
+!     IMPLICIT NONE
+!     DOUBLE PRECISION ATOL, RTOL, T, TOUT, Y, RSTATS
+!     INTEGER NEQ, ITASK, ISTATE, ISTATS, IOUT, IERROR, I
+!     DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     OPEN(UNIT=6, FILE = 'example1.dat')
+!     IERROR = 0
+!     NEQ = 3
+!     Y(1) = 1.0D0
+!     Y(2) = 0.0D0
+!     Y(3) = 0.0D0
+!     T = 0.0D0
+!     TOUT = 0.4D0
+!     RTOL = 1.D-4
+!     ATOL(1) = 1.D-8
+!     ATOL(2) = 1.D-14
+!     ATOL(3) = 1.D-6
+!     ITASK = 1
+!     ISTATE = 1
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR_VECTOR=ATOL, &
+!       RELERR=RTOL, USER_SUPPLIED_JACOBIAN=.TRUE.)
+!     DO IOUT = 1,12
+!       CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+!       CALL GET_STATS(RSTATS,ISTATS)
+!       WRITE(6,63)T,Y(1),Y(2),Y(3)
+!       DO I = 1, NEQ
+!          IF (Y(I) < 0.0D0) IERROR = 1
+!       END DO
+!       IF (ISTATE < 0) THEN
+!          WRITE(6,64)ISTATE
+!          STOP
+!       END IF
+!       TOUT = TOUT*10.0D0
+!     END DO
+!     WRITE(6,60) ISTATS(11),ISTATS(12),ISTATS(13),ISTATS(19), &
+!                 ISTATS(20),ISTATS(21),ISTATS(22)
+!     IF (IERROR == 1) THEN
+!        WRITE(6,61)
+!     ELSE
+!        WRITE(6,62)
+!     END IF
+! 60  FORMAT(/'  No. steps =',I4,'   No. f-s =',I4,        &
+!             '  No. J-s =',I4,'   No. LU-s =',I4/         &
+!             '  No. nonlinear iterations =',I4/           &
+!             '  No. nonlinear convergence failures =',I4/ &
+!             '  No. error test failures =',I4/)
+! 61  FORMAT(/' An error occurred.')
+! 62  FORMAT(/' No errors occurred.')
+! 63  FORMAT(' At t =',D12.4,'   y =',3D14.6)
+! 64  FORMAT(///' Error halt: ISTATE =',I3)
+!     STOP
+!     END PROGRAM runexample1
+!
+! MODULE example2
+! The following is a modification of the previous example
+! program to illustrate root finding. The problem is from
+! chemical kinetics, and consists of the following three
+! rate equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! In addition, we want to find the values of t, y1, y2,
+! and y3 at which:
+!   (1) y1 reaches the value 1.d-4, and
+!   (2) y3 reaches the value 1.d-2.
+! The following coding solves this problem with DVODE_F90
+! using an internally generated dense Jacobian and
+! printing results at t = .4, 4., ..., 4.d10, and at the
+! computed roots. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values.
+! At the end of the run, statistical quantities of interest
+! are printed (see optional outputs in the full description
+! below). Output is written to the file example2.dat.
+! CONTAINS
+!     SUBROUTINE FEX (NEQ, T, Y, YDOT)
+!     IMPLICIT NONE
+!     INTEGER NEQ
+!     DOUBLE PRECISION T, Y, YDOT
+!     DIMENSION Y(3), YDOT(3)
+!     YDOT(1) = -0.04D0*Y(1) + 1.0D4*Y(2)*Y(3)
+!     YDOT(3) = 3.0D7*Y(2)*Y(2)
+!     YDOT(2) = -YDOT(1) - YDOT(3)
+!     RETURN
+!     END SUBROUTINE FEX
+!     SUBROUTINE GEX (NEQ, T, Y, NG, GOUT)
+!     IMPLICIT NONE
+!     INTEGER NEQ, NG
+!     DOUBLE PRECISION T, Y, GOUT
+!     DIMENSION Y(3), GOUT(2)
+!     GOUT(1) = Y(1) - 1.0D-4
+!     GOUT(2) = Y(3) - 1.0D-2
+!     RETURN
+!     END SUBROUTINE GEX
+! END MODULE example2
+!******************************************************************
+!     PROGRAM runexample2
+!     USE DVODE_F90_M
+!     USE example2
+!     IMPLICIT NONE
+!     INTEGER ITASK, ISTATE, NG, NEQ, IOUT, JROOT, ISTATS, &
+!     IERROR, I
+!     DOUBLE PRECISION ATOL, RTOL, RSTATS, T, TOUT, Y
+!     DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31), JROOT(2)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     OPEN (UNIT=6, FILE='example2.dat')
+!     IERROR = 0
+!     NEQ = 3
+!     Y(1) = 1.0D0
+!     Y(2) = 0.0D0
+!     Y(3) = 0.0D0
+!     T = 0.0D0
+!     TOUT = 0.4D0
+!     RTOL = 1.0D-4
+!     ATOL(1) = 1.0D-8
+!     ATOL(2) = 1.0D-12
+!     ATOL(3) = 1.0D-8
+!     ITASK = 1
+!     ISTATE = 1
+!     NG = 2
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL, &
+!       ABSERR_VECTOR=ATOL,NEVENTS=NG)
+!     DO 40 IOUT = 1,12
+! 10    CONTINUE
+!       CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!       CALL GET_STATS(RSTATS, ISTATS, NG, JROOT)
+!       WRITE(6,20) T, Y(1), Y(2), Y(3)
+!       DO I = 1, NEQ
+!          IF (Y(I) < 0.0D0) IERROR = 1
+!       END DO
+! 20    FORMAT(' At t =',D12.4,'   Y =',3D14.6)
+!       IF (ISTATE < 0) GOTO 60
+!       IF (ISTATE == 2) GOTO 40
+!       WRITE(6,30) JROOT(1),JROOT(2)
+! 30    FORMAT(5X,' The above line is a root, JROOT =',2I5)
+!       ISTATE = 2
+!       GOTO 10
+! 40  TOUT = TOUT*10.0D0
+!     WRITE(6,50) ISTATS(11), ISTATS(12), ISTATS(13), ISTATS(10)
+!     IF (IERROR == 1) THEN
+!        WRITE(6,61)
+!     ELSE
+!        WRITE(6,62)
+!     END IF
+! 50  FORMAT(/' No. steps =',I4,'  No. f-s =',I4,'  No. J-s =',I4, &
+!     '  No. g-s =',I4/)
+!     STOP
+! 60  WRITE(6,70) ISTATE
+! 61  FORMAT(/' An error occurred.')
+! 62  FORMAT(/' No errors occurred.')
+! 70  FORMAT(///' Error halt.. ISTATE =',I3)
+!     STOP
+!     END PROGRAM runexample2
+!_______________________________________________________________________
+
+
+      SUBROUTINE VODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,G_FCN)
+! ..
+! This is an interface for DVODE to allow JAC and GFUN to be
+! OPTIONAL arguments.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Structure Arguments ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (INOUT) :: T, TOUT
+        INTEGER, INTENT (INOUT) :: ISTATE
+        INTEGER, INTENT (IN) :: ITASK, NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: Y(*)
+! ..
+! .. Subroutine Arguments ..
+        OPTIONAL :: G_FCN, J_FCN
+!        EXTERNAL J_FCN
+! ..
+! .. Subroutine Interfaces ..
+     INTERFACE
+       SUBROUTINE F(NEQ,T,Y,YDOT)
+         USE KPP_ROOT_Precision
+         INTEGER, PARAMETER :: WP = KIND(1.0D0)
+         INTEGER NEQ
+         KPP_REAL T
+         KPP_REAL, DIMENSION(NEQ) :: Y, YDOT
+         INTENT(IN)  :: NEQ, T, Y
+         INTENT(OUT) :: YDOT
+       END SUBROUTINE F
+     END INTERFACE
+
+     INTERFACE
+       SUBROUTINE G_FCN(NEQ,T,Y,NG,GROOT)
+         USE KPP_ROOT_Precision
+         INTEGER, PARAMETER :: WP = KIND(1.0D0)
+         INTEGER NEQ, NG
+         KPP_REAL T
+         KPP_REAL, DIMENSION(NEQ) :: Y
+         KPP_REAL, DIMENSION(NG) :: GROOT(NG)
+         INTENT(IN)  :: NEQ, T, Y, NG
+         INTENT(OUT) :: GROOT
+       END SUBROUTINE G_FCN
+     END INTERFACE
+
+!    Note:
+!    The best we can do here is to declare J_FCN to be
+!    external. The interface for a sparse problem differs
+!    from that for a banded or dense problem. The following
+!    would suffuce for a banded or dense problem.
+!    INTERFACE
+!      SUBROUTINE J_FCN(NEQ,T,Y,ML,MU,PD,NROWPD)
+!        INTEGER, PARAMETER :: WP = KIND(1.0D0)
+!        INTEGER NEQ, ML, MU, NROWPD
+!        KPP_REAL T
+!        KPP_REAL, DIMENSION(NEQ) :: Y
+!        KPP_REAL, DIMENSION(NEQ) :: PD(NROWPD,NEQ)
+!        INTENT(IN)  :: NEQ, T, Y, ML, MU, NROWPD
+!        INTENT(INOUT) :: PD
+!      END SUBROUTINE J_FCN
+!    END INTERFACE
+!    The following would suffice for a sparse problem.
+    INTERFACE
+      SUBROUTINE J_FCN(NEQ,T,Y,IA,JA,NZ,P)
+        USE KPP_ROOT_Precision
+        INTEGER NEQ, NZ
+        KPP_REAL T
+        KPP_REAL Y(NEQ), P(NEQ)
+        INTEGER IA(*), JA(*)
+        INTENT(IN) :: NEQ, T, Y
+        INTENT(INOUT) IA, JA, NZ, P
+      END SUBROUTINE J_FCN
+    END INTERFACE
+! ..
+! .. Local Scalars ..
+        INTEGER :: HOWCALL, METH, MFA, MITER, MOSS, NG
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT VODE_F90
+! ..
+!       Check that SET_OPTS has been called.
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,10,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling DVODE_F90 the first time.'
+          CALL XERRDV(MSG,10,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Check that JAC is present if it is needed.
+        IF (PRESENT(J_FCN)) THEN
+        ELSE
+!         Note:
+!         MOSS is irrelevant. OPTS%MF is two digits after the
+!         call to SET_OPTS.
+          MFA = ABS(OPTS%MF)
+          MOSS = MFA/100
+          METH = (MFA-100*MOSS)/10
+          MITER = MFA - 100*MOSS - 10*METH
+          IF (MITER==1 .OR. MITER==4 .OR. MITER==6) THEN
+            MSG = 'You have specified a value of the integration'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'method flag MF which requires that you supply'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'a Jacobian subroutine JAC; but FAC is not'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'present in the argument list.'
+            CALL XERRDV(MSG,20,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Check that GFUN is present if it is needed.
+
+        IF (PRESENT(G_FCN)) THEN
+        ELSE
+          NG = OPTS%NG
+          IF (NG>0) THEN
+            MSG = 'You have indicated that events are present but'
+            CALL XERRDV(MSG,30,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'you have not supplied a GFUN subroutine.'
+            CALL XERRDV(MSG,30,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!     Determine how DVODE will be called.
+
+!     HOWCALL = 1: JDUMMY, GDUMMY
+!               2: JAC, GFUN
+!               3: JAC, GDUMMY
+!               4: JDUMMY, GFUN
+        HOWCALL = 1
+        IF (PRESENT(J_FCN)) THEN
+          IF (PRESENT(G_FCN)) THEN
+            HOWCALL = 2
+          ELSE
+            HOWCALL = 3
+          END IF
+        ELSE
+          IF (PRESENT(G_FCN)) THEN
+            HOWCALL = 4
+          ELSE
+            HOWCALL = 1
+          END IF
+        END IF
+
+!       Call DVODE to do the integration.
+
+        IF (HOWCALL==1) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JDUMMY,GDUMMY)
+        ELSE IF (HOWCALL==2) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,G_FCN)
+        ELSE IF (HOWCALL==3) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,GDUMMY)
+        ELSE IF (HOWCALL==4) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JDUMMY,G_FCN)
+        END IF
+        RETURN
+
+      END SUBROUTINE VODE_F90
+!_______________________________________________________________________
+
+      SUBROUTINE JDUMMY(NEQ,T,Y,ML,MU,PD,NROWPD)
+! ..
+! This is a dummy Jacobian subroutine for VODE_F90 (never called).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: T
+        INTEGER :: ML, MU, NEQ, NROWPD, I
+        LOGICAL DUMMY
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: PD(NROWPD,*), Y(*)
+! ..
+      INTENT(IN) T, Y, ML, MU, NROWPD
+      INTENT(INOUT) PD
+! ..
+! .. FIRST EXECUTABLE STATEMENT JDUMMY
+! ..
+!       Get rid of some needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          I = NEQ
+          I = ML
+          I = MU
+          I = NROWPD
+          PD(1,1) = T
+          PD(1,1) = Y(1)
+          PD(1,1) = DBLE(REAL(I))
+        END IF
+        RETURN
+
+      END SUBROUTINE JDUMMY
+!_______________________________________________________________________
+
+      SUBROUTINE GDUMMY(NEQ,T,Y,NG,GOUT)
+! ..
+! This is a dummy event subroutine for VODE_F90 (never called).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: T
+        INTEGER :: NEQ, NG, I
+        LOGICAL DUMMY
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: GOUT(*), Y(*)
+! ..
+      INTENT(IN) NEQ, T, Y, NG
+      INTENT(OUT) GOUT
+! ..
+! .. FIRST EXECUTABLE STATEMENT JDUMMY
+! ..
+!       Get rid of some needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          I = NEQ
+          I = NG
+          GOUT(1) = T
+          GOUT(1) = Y(1)
+          GOUT(1) = DBLE(REAL(I))
+        END IF
+        RETURN
+
+      END SUBROUTINE GDUMMY
+!_______________________________________________________________________
+
+  SUBROUTINE SET_OPTS_2(HMAX,HMIN,MXSTEP)
+! ..
+! Allow the maximum step size, the minimum step size, and the maximum
+! number of steps to be changed without restarting the integration.
+! ..
+!                     Quick Summary of Options
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MXSTEP                 - Maximum number of integration steps in DVODE
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: HMAX, HMIN
+        INTEGER, OPTIONAL, INTENT (IN) :: MXSTEP
+! ..
+! .. Local Scalars ..
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_OPTS_2
+! ..
+!       Check that SET_OPTS has been called:
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,40,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling subroutine SET_OPTS_2.'
+          CALL XERRDV(MSG,40,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          MSG = 'HMAX changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,50,1,0,0,0,1,HMAX,ZERO)
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          MSG = 'HMIN changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,60,1,0,0,0,1,HMIN,ZERO)
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          MSG = 'MXSTEP changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,70,1,1,MXSTEP,0,0,ZERO,ZERO)
+        END IF
+
+  END SUBROUTINE SET_OPTS_2
+!_______________________________________________________________________
+
+  FUNCTION SET_NORMAL_OPTS(DENSE_J, BANDED_J, SPARSE_J,                &
+    USER_SUPPLIED_JACOBIAN, LOWER_BANDWIDTH, UPPER_BANDWIDTH,          &
+    RELERR, ABSERR, ABSERR_VECTOR, NEVENTS) RESULT(OPTS)
+
+! FUNCTION SET_NORMAL_OPTS:
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH,UPPER_BANDWIDTH
+!    Error tolerances:
+!       RELERR, ABSERR, ABSERR_VECTOR
+!    Rootfinding:
+!       NEVENTS
+! RESULT(OPTS)
+
+! Note:
+! Invoking SET_NORMAL_OPTS causes an integration restart. A common
+! situation is one in which all you wish to change is one of the
+! vode.f77 optional parameters HMAX, HMIN, or MXSTEP. Once the
+! integration is started and this is all you wish to do, you can
+! change any of these parameters without restarting the integration
+! simply by calling subroutine SET_OPTS_2:
+!      CALL SET_OPTS_2(HMAX,HMIN,MXSTEP)
+! Each of the three arguments is optional and only the ones actually
+! supplied will be used. Changes will take effect in the same manner
+! as in the VODE.f77 solver.
+!
+! NORMAL_OPTIONS sets user parameters for DVODE via keywords.
+! Values that are defined herein will be used internally by
+! DVODE. All option keywords are OPTIONAL and order is not
+! important. These options should be adequate for most problems.
+! If you wish to use more specialized options, you must use
+! SET_INTERMEDIATE_OPTS or SET_OPTS rather than NORMAL_OPTS.
+! If you wish to use SET_INTERMEDIATE_OPTS or SET_OPTS, you
+! may use any of the SET_NORMAL_OPTS keywords or any of the
+! keywords available for these two functions. Of course, you
+! may opt to simply use SET_OPTS for all problems.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+!
+! Important Note:
+! If feasible, you should use the dense or banded option; but
+! SET_NORMAL_OPTS allows you to use a sparse internal Jacobian
+! (i.e., one that is determined using finite differences) and
+! structure pointere array that are determined internally
+! using finite differences. If any of the following are true
+!    (1) DVODE_F90 doesn't perform satisfactorily for
+!        your problem,
+!    (2) you are solving a very large problem,
+!    (3) you wish to supply the sparse pointer arrays
+!        directly,
+!    (4) you wish to supply an analytical sparse Jacobian,
+! or
+!    (5) you wish to use one of the specialized sparse
+!        Jacobian options,
+! you are encouraged to use SET_OPTS which contains several
+! provisions for solving sparse problems more efficiently.
+
+! Option Types:
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! RELERR                 - KPP_REAL scalar
+! ABSERR                 - KPP_REAL scalar
+! ABSERR_VECTOR          - KPP_REAL vector
+! NEVENTS                - integer
+! Options:
+! ABSERR                 = Absolute error tolerance
+! ABSERR_VECTOR          = Vector of absolute error tolerances
+! RELERR                 = Scalar relative error tolerance
+! NEVENTS                = Number of event functions (requires
+!                          user-supplied GFUN)
+! DENSE_J                = Use dense linear algebra if .TRUE.
+! BANDED_J               = Use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH      = Lower bandwidth of the Jacobian
+!                          (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH      = Upper bandwidth of the Jacobian
+!                          (required if BANDED_J = .TRUE.)
+! SPARSE_J               = Use sparse linear algebra if .TRUE.
+! USER_SUPPLIED_JACOBIAN = Exact Jacobian option
+!                          (requires user-supplied JAC;
+!                          ignored for SPARSE_J=.TRUE.)
+!
+! Note: DENSE_J takes precedence over BANDED_J which in turn
+! takes precedence over SPARSE_J if more than one is supplied.
+! If neither of the three flags is present, the nonstiff Adams
+! option will be used. Similiarly, ABSERR_VECTOR takes
+! precedence over ABSERR.
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR,RELERR
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH,   &
+          NEVENTS,UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, DENSE_J, &
+          SPARSE_J, USER_SUPPLIED_JACOBIAN
+! ..
+! .. Array Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IER,IOPT,METH,MF,MFA,MFSIGN,MITER,ML,MOSS, &
+          MU,NAE,NG,NRE
+        LOGICAL :: BANDED,DENSE,SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_NORMAL_OPTS
+! ..
+        RUSER(1:LRWUSER) = ZERO
+        IUSER(1:LIWUSER) = 0
+        
+!       Allow default error tolerances?
+        ALLOW_DEFAULT_TOLS = .FALSE.
+
+!       Maximum number of consecutive error test failures?
+        CONSECUTIVE_EFAILS = KFH
+
+!       Maximum number of consecutive corrector iteration failures?
+        CONSECUTIVE_CFAILS = MXNCF
+
+!       Use JACSP to approximate Jacobian?
+        USE_JACSP = .FALSE.
+
+!       Set the flag to indicate that SET_NORMAL_OPTS has been called.
+        OPTS_CALLED = .TRUE.
+
+!       Set the MA48 storage cleanup flag.
+        MA48_WAS_USED = .FALSE.
+
+!       Set the fast factor option for MA48,
+        USE_FAST_FACTOR = .TRUE.
+
+!       Set the constant Jacobian flags.
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!       Determine the working precision and define the value for UMAX
+!       expected by MA28. Note that it is different for single and
+!       double precision.
+        WPD = KIND(1.0D0)
+        WPS = KIND(1.0E0)
+        IF (WPD/=dp .AND. WPS/=dp) THEN
+          MSG = 'Illegal working precision in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,80,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (WPD==dp) THEN
+!       Working precision is double.
+          UMAX = 0.999999999_dp
+        ELSE
+!       Working precision is single.
+          UMAX = 0.9999_dp
+        END IF
+
+        MA28AD_CALLS = 0
+        MA28BD_CALLS = 0
+        MA28CD_CALLS = 0
+        MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       MA48AD_CALLS = 0
+!       MA48BD_CALLS = 0
+!       MA48CD_CALLS = 0
+!_______________________________________________________________________
+        IRNCP = 0
+        ICNCP = 0
+        MINIRN = 0
+        MINICN = 0
+        MAX_MINIRN = 0
+        MAX_MINICN = 0
+        MAX_NNZ = 0
+
+!       Set the flag to warn the user if |(y(t)| < abserr.
+        YMAXWARN = .FALSE.
+
+!       Load defaults for the optional input arrays for DVODE.
+        IUSER(1:8) = 0
+        RUSER(1:8) = ZERO
+
+!       Set the method flag.
+        MF = 10
+        IF (PRESENT(SPARSE_J)) THEN
+          IF (SPARSE_J) THEN
+             MF = 227
+             IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+               MSG = 'You have indicated you wish to supply an'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'exact sparse Jacobian in function'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'SET_NORMAL_OPTS. In order to do this,'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'you must use SET_OPTS. Execution will'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'continue.'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+             END IF
+          END IF
+        END IF
+
+        IF (PRESENT(BANDED_J)) THEN
+          IF (BANDED_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 24
+              ELSE
+                MF = 25
+              END IF
+            ELSE
+              MF = 25
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(DENSE_J)) THEN
+          IF (DENSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 21
+              ELSE
+                MF = 22
+              END IF
+            ELSE
+              MF = 22
+            END IF
+          END IF
+        END IF
+
+!       Check for errors in MF.
+        MFA = IABS(MF)
+        MOSS = MFA/100
+        METH = (MFA-100*MOSS)/10
+        MITER = MFA - 100*MOSS - 10*METH
+        IF (METH<1 .OR. METH>2) THEN
+          MSG = 'Illegal value of METH in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,100,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MITER<0 .OR. MITER>7) THEN
+          MSG = 'Illegal value of MITER in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,110,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MOSS<0 .OR. MOSS>2) THEN
+          MSG = 'Illegal value of MOSS in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,120,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Reset MF, now that MOSS is known.
+        MFSIGN = SIGN(1,MF)
+        MF = MF - 100*MOSS*MFSIGN
+
+        IF (MITER==0) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==1 .OR. MITER==2) THEN
+          DENSE = .TRUE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==3) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==4 .OR. MITER==5) THEN
+          DENSE = .FALSE.
+          BANDED = .TRUE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==6 .OR. MITER==7) THEN
+          DENSE  = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .TRUE.
+        END IF
+
+!       Define the banded Jacobian band widths.
+        IF (BANDED) THEN
+          IF (PRESENT(LOWER_BANDWIDTH)) THEN
+            ML = LOWER_BANDWIDTH
+            IUSER(1) = ML
+          ELSE
+            MSG = 'In SET_NORMAL_OPTS you have indicated a'
+            CALL XERRDV(MSG,130,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not supplied'
+            CALL XERRDV(MSG,130,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'the lower bandwidth.'
+            CALL XERRDV(MSG,130,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(UPPER_BANDWIDTH)) THEN
+            MU = UPPER_BANDWIDTH
+            IUSER(2) = MU
+          ELSE
+            MSG = 'In SET_NORMAL_OPTS you have indicated a'
+            CALL XERRDV(MSG,140,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not supplied'
+            CALL XERRDV(MSG,140,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'the upper bandwidth.'
+            CALL XERRDV(MSG,140,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Define the sparse Jacobian options.
+        IF (SPARSE) THEN
+!         Set the MA28 message flag.
+          LP = 0
+!         Set the MA28 pivot sequence frequency flag.
+          REDO_PIVOT_SEQUENCE = .FALSE.
+!         Set the MA28 singularity threshold.
+          EPS = 1.0E-4_dp
+!         Use scaling of the iteration matrix.
+          SCALE_MATRIX = .TRUE.
+!         Define the elbow room factor for the MA28 sparse work arrays.
+          ELBOW_ROOM = 2
+!         NZSWAG is a swag for the number of nonzeros in the Jacobian.
+          NZ_SWAG = 0
+!         Use partial pivoting.
+          U_PIVOT = ONE
+!         Indicate that SET_IAJA has not yet been called successfully.
+          IAJA_CALLED = .FALSE.
+!         Check for illegal method flags.
+          IF (MOSS==2 .AND. MITER/=7) THEN
+            MSG = 'In SET_NORMAL_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,150,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (MOSS==1 .AND. MITER/=6) THEN
+            MSG = 'In SET_NORMAL_OPTS MOSS=1 but MITER is not 6.'
+            CALL XERRDV(MSG,160,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         IF (MOSS==0 .AND. MITER/=7) THEN
+!           MSG = 'In SET_NORMAL_OPTS MOSS=0 but MITER is not 7.'
+!           CALL XERRDV(MSG,170,2,0,0,0,0,ZERO,ZERO)
+!         END IF
+        END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       No solution bounds will be imposed.
+        BOUNDS = .FALSE.
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+        IOPT = 1
+        OPTS%IOPT = IOPT
+
+!       Process the error tolerances.
+
+!       Relative error tolerance.
+        NRE = 1
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,10)
+        IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,180,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_dp
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,200,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerance(s).
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,210,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,210,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,20)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,220,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,240,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,240,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,240,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+           OPTS%ITOL = 2
+        ELSE
+           OPTS%ITOL = 1
+        END IF
+        RETURN
+
+  END FUNCTION SET_NORMAL_OPTS
+!_______________________________________________________________________
+
+  FUNCTION SET_INTERMEDIATE_OPTS(DENSE_J, BANDED_J, SPARSE_J,          &
+    USER_SUPPLIED_JACOBIAN,                                            &
+    LOWER_BANDWIDTH, UPPER_BANDWIDTH,                                  &
+    RELERR, ABSERR, ABSERR_VECTOR,                                     &
+    TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL,                     &
+    NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS,                          &
+    NEVENTS, CONSTRAINED, CLOWER, CUPPER, CHANGE_ONLY_f77_OPTIONS)     &
+  RESULT(OPTS)
+
+! FUNCTION SET_INTERMEDIATE_OPTS:
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH, UPPER_BANDWIDTH
+!    Error tolerances:
+!       RELERR, ABSERR, ABSERR_VECTOR
+!    VODE.f77 optional parameters:
+!       TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL
+!    Sparse flags:
+!       NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS
+!    Rootfinding:
+!       NEVENTS
+!    Impose bounds on solution:
+!       CONSTRAINED, CLOWER, CUPPER
+!    Change one or more of HMAX, HMIN, TCRIT, MXSTEP, MXHNIL, MAXORD
+!       CHANGE_ONLY_f77_OPTIONS
+! RESULT(OPTS)
+
+! SET_OPTIONS sets user parameters for DVODE via keywords. Values
+! that are defined herein will be used internally by DVODE.
+! All option keywords are OPTIONAL and order is not important.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+
+!                     Quick Summary of Options
+
+! DENSE_J                - Jacobian is sparse alternative to MF
+! BANDED_J               - Jacobian is banded alternative to MF 
+! SPARSE_J               - Jacobian is sparse alternative to MF   
+! USER_SUPPLIED_JACOBIAN - User will supply Jacobian subroutine
+!                          (user supplied subroutine JAC required)
+! LOWER_BANDWIDTH        - Lower bandwidth ML in DVODE
+! UPPER_BANDWIDTH        - Upper bandwidth MU in DVODE
+! RELERR                 - Scalar relative error tolerance in DVODE
+! ABSERR                 - Scalar absolute error tolerance in DVODE
+! ABSERR_VECTOR          - Vector absolute error tolerance in DVODE
+! TCRIT                  - Critical time TCRIT in DVODE
+! H0                     - Starting step size in DVODE
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MAXORD                 - Maximum integration order in DVODE
+! MXSTEP                 - Maximum number of integration steps
+!                          in DVODE
+! MXHNIL                 - Maximum number of T+H=T messages in DVODE
+! NZSWAG                 - guess for the number of nonzeros in sparse
+!                          Jacobian
+! USER_SUPPLIED_SPARSITY - user will supply sparsity structure
+!                          arrays by calling USERSETS_IAJA 
+! MA28_RPS               - Redo MA28AD pivot sequence if a singularity
+!                          is encountered
+! NEVENTS                - number of user defined root finding functions
+!                          (user supplied subroutine G required)
+! CONSTRAINED,           - array of solution component indices that
+! CLOWER,                  are to be constrained by the lower and
+! CUPPER                   upper bound arrays CLOWER and CUPPER so that
+!                          CLOWER(I) <= Y(CONSTRAINED(I)) <= CUPPER(I)
+!                     Options Types
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! RELERR                 - KPP_REAL scalar
+! ABSERR                 - KPP_REAL scalar
+! ABSERR_VECTOR          - KPP_REAL vector
+! TCRIT                  - KPP_REAL scalar
+! H0                     - KPP_REAL scalar
+! HMAX                   - KPP_REAL scalar
+! HMIN                   - KPP_REAL scalar
+! MAXORD                 - integer
+! MXSTEP                 - integer
+! MXHNIL                 - integer
+! NZSWAG                 - integer
+! USER_SUPPLIED_SPARSITY - logical
+! MA28_RPS               - logical
+! NEVENTS                - integer
+! CONSTRAINED            - integer array
+! CLOWER                 - KPP_REAL array
+! CUPPER                 - KPP_REAL array
+! CHANGE_ONLY_f77_OPTIONS- logical
+! Argument list parameters:
+! ABSERR                   = scalar absolute error tolerance
+! ABSERR_VECTOR            = vector of absolute error tolerances
+! RELERR                   = scalar relative error tolerance
+! NEVENTS                  = Number of event functions (requires
+!                            user-supplied GFUN)
+! DENSE_J                  = use dense linear algebra if .TRUE.
+! BANDED_J                 = use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH        = lower bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH        = upper bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+! SPARSE_J                 = use sparse linear algebra if .TRUE.
+!
+!   NZSWAG                 = If you wish you may supply a guess,
+!                            NZSWAG, at the number of nonzeros
+!                            in the Jacobian matrix. In some cases
+!                            this will speed up the determination
+!                            of the necessary storage.
+!   USER_SUPPLIED_SPARSITY = .TRUE. if you wish to supply the sparsity
+!                            structure arrays directly by calling
+!   MA28_RPS               = .TRUE. to force MA28AD to calculate a new
+!                            pivot sequence for use in MA28BD if a
+!                            singular iteration matrix is encountered
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+! USER_SUPPLIED_JACOBIAN   = exact Jacobian option
+!                            (requires user-supplied JAC)
+! TCRIT                    = critical time
+! H0                       = initial step size to try
+! HMAX                     = maximum allowable step size
+! HMIN                     = minimum allowable step size
+! MAXORD                   = maximum allowable integration order
+! MXSTEP                   = maximum number of integration steps
+!                            between calls to DVODE
+! MXHNIL                   = maximum number of printed messages
+!                            if the T+H=T condition occurs
+! CONSTRAINED              = array containing the indices of
+!                            solution components which are to be
+!                            be constrained by CLOWER and CUPPER.
+!                            The size of CONSTRAINED must be
+!                            positive and not exceed NEQ, the
+!                            number of ODEs. Each component of
+!                            CONSTRAINED must be between 1 and NEQ.
+!   CLOWER, CUPPER         = lower and upper bound arrays for the.
+!                            solution. Each must be the same size
+!                            as the CONSTRAINED vector.
+!
+!   User-callable Routines:
+!   The following routines may be called by the user:
+!   SET_INTERMEDIATE_OPTS      : Used to set options for DVODE_F90
+!   GET_STATS     : Used to gather summary integration
+!                   statistics following a successful
+!                   return from DVODE_F90
+!   DVINDY        : Used if the user wishes to interpolate
+!                   solution or derivative following a
+!                   successful return from DVODE_F90
+!   USERSETS_IAJA : Used if the user wishes to supply the
+!                   sparsity structure directly
+!   Detailed Description of SET_INTERMEDIATE_OPTS
+!   The following are defined in SET_INTERMEDIATE_OPTS:
+!   OPTS%MF     = Integration method flag (MF)
+!   OPTS%METH   = Integration family flag (METH)
+!   OPTS%MITER  = Iteration type flag (MITER)
+!   OPTS%MOSS   = Sparsity array type flag (MOSS)
+!   OPTS%ITOL   = Error tolerance flag (ITOL) (ITOL)
+!   OPTS%ATOL   = Absolute error tolerance(s) (ATOL)
+!   OPTS%RTOL   = Relative error tolerance(s) (RTOL)
+!   OPTS%DENSE  = Use dense linear algebra
+!   OPTS%BANDED = Use banded linear algebra 
+!   OPTS%SPARSE = Use sparse linear algebra 
+!   OPTS%IOPT   = DVODE optional parameter input flag (IOPT)
+!   OPTS%NG     = Number of event functions
+!   RUSER(1)    = TCRIT (don't step past)
+!   IUSER(1)    = Jacobian lower bandwidth (ML)
+!   IUSER(2)    = Jacobian upper bandwidth (MU)
+!   RUSER(5)    = Initial step size to try (H0)
+!   RUSER(6)    = Maximum allowable step size (HMAX)
+!   RUSER(7)    = Minimum allowable step size (HMIN)
+!   IUSER(5)    = Maximum allowable integration order (MAXORD)
+!   IUSER(6)    = Maximum number of integration steps (MXSTEP)
+!   IUSER(7)    = Maximum number of T+H=T messages (MXHNIL)
+!   NZ_SWAG     = Guess for the number of nonzeros in the
+!                 sparse Jacobian
+!   NG          = Number of user event functions
+!   BOUNDS,     = Nonnegativity information
+!   NDX, IDX
+!   YMAXWARN    = Warning flag for |y(t)| < abserr
+!   MA28_ELBOW_ROOM = Integer multiple by which to increase
+!                     the elbow room in the MA28 sparse work
+!                     arrays
+!   MC19_SCALING    = logical flag to control MC19 sparse
+!                     scaling of the Jacobian
+!   MA28_MESSAGES   = logical flag to control printing of MA28
+!                     messages.
+!   MA28_EPS        = KPP_REAL MA28 singularity threshold
+!
+!                         All Options
+!
+! METHOD_FLAG
+!
+! Default:   Not used
+! Change to: No need to specify if use one of next three parameters
+!            but can be changed to any value of the MF method flag
+!            in dvode.f77
+!
+! DENSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for dense linear algebra
+!
+! BANDED_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for banded linear algebra
+!
+! SPARSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for sparse linear algebra
+
+! USER_SUPPLIED_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if want to supply subroutine JAC to DVODE_F90
+!
+! LOWER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Lower bandwidth if BANDED_J = .TRUE.
+!
+! UPPER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Upper bandwidth if BANDED_J = .TRUE.
+!
+! RELERR
+!
+! Default:   None
+! Change to: Specify a nonzero relative error tolerance
+!
+! ABSERR
+!
+! Default:   None
+! Change to: Specify a scalar absolute error tolerance or
+!            a vector of absolute error tolerances
+!
+! ABSERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of absolute error tolerances
+!
+! TCRIT
+!
+! Default:   Not used
+! Change to: Value of T which DVODE_F90 is not to step past
+!
+!     H0
+!
+! Default:   Determined by DVODE_F90
+! Change to: Guess for initial step size
+!
+! HMAX
+!
+! Default:   Infinity
+! Change to: Maximum allowable step size
+!
+! HMIN
+!
+! Default:   0.0D0
+! Change to: Minimum allowable step size
+!
+! MAXORD
+!
+! Default:   Determined by DVODE_F90
+! Change to: Maximum integration order
+!
+! MXSTEP
+!
+! Default:   5000
+!     Change to: Maximum number of steps between output points
+!
+! MXHNIL
+!
+! Default:   10
+! Change to: Maximum number of times T+H=T message will be printed
+!
+! NZSWAG
+!
+! Default:   Determined by DVODE_F90
+! Change to: Amount by which to increment sizes of sparse arrays
+!
+! USER_SUPPLIED_SPARSITY
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to call subroutine USERSETS_IAJA to
+!            define the sparse structure array pointers directly
+!
+! NEVENTS
+!
+! Default:   0
+! Change to: Number of event functions if wish to supply subroutine
+!            GFUN to DVODE_F90
+!
+! CONSTRAINED
+!
+! Default:   Bounds not imposed on solution
+! Change to: Array of indices for components on which to impose
+!            solution bounds
+!
+! CLOWER
+!
+! Default:   Not used
+! Change to: Vector containing lower bounds corresponding to
+!            CONSTRAINED
+!
+! CUPPER
+!
+! Default:   Not used
+! Change to: Vector containing upper bounds corresponding to
+!            CONSTRAINED
+!
+! MA28_RPS
+!
+! Default:   .FALSE.
+! Change to: Redo the MA28AD sparse pivoting sequence any time
+!            MA28BD considers the iteration matrix to be
+!            numerically singularity
+!
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+! For a sparse Jacobian, IA(J+1)-IA(J) is the number
+! of nonzeros in column change. JA(I) indicates the
+! rows in which the nonzeros occur. For column J,
+! the nonzeros occurs in rows I=JA(K) for K=I1,...,I2
+! where I1=IA(J) and I2= IA(J+1)-1. Load DF(I)/DY(J)
+! in PD(I). Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = IA(J)
+!       I2 = IA(J+1) - 1
+!       DO K = I1, I2
+!          I = JA(K)
+!          PD(I) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+!                    More on Sparsity Options
+!
+! Two facts of life regarding the use of direct sparse solvers are
+! (1) significant improvements are possible, and (2) the use of
+! direct sparse solvers often is more demanding of the user.
+! Although SET_NORMAL_OPTS provides modest provisions for solving
+! problems with sparse Jacobians, using SET_INTERMEDIATE_OPTS rather than
+! SET_NORMAL_OPTS provides several advanced options. These options
+! are described below. The recommended manner in which to use
+! these options is also provided. Note that each of these optional
+! parameters have default values and need not be specified in your
+! call to SET_INTERMEDIATE_OPTS if you wish to use the default values. Note
+! also that the order in which the options are specified in a call
+! to SET_INTERMEDIATE_OPTS is not important.
+!
+!  (1) First determine if it is feasible to use either the BANDED
+!      or DENSE Jacobian option.
+!         Recommendation:
+!         Use the DENSE or BANDED option if possible. They do
+!         not require use of most of the options described here.
+!    
+!  (2) The Jacobian is approximated internally using differences
+!      if you do not provide an analytic Jacobian. The option
+!      USER_SUPPLIED_JACOBIAN=.TRUE. may be used if you wish to
+!      provide an analytic Jacobian.
+!         Recommendation:
+!         Use an internally generated Jacobian for most problems
+!         but consider providing an analytic Jacobian if it not
+!         too much trouble.
+!
+!  (3) If you do not provide the sparse structure arrays, they
+!      are approximated internally by making NEQ calls to your
+!      derivative subroutine and using differences to approximate
+!      the structure of the Jacobian. The option
+!      USER_SUPPLIED_SPARSITY and a call to USERSETS_IAJA can
+!      be used to supply the arrays directly. You can also use
+!      subroutine SET_IAJA to approximate the structure using
+!      different perturbation factors than those used in DVODE_F90.
+!         Recommendations:
+!         Although allowing DVODE_F90 to approximate the Jacobian
+!         structure suffices for most problems, if you know the
+!         sparsity pattern provide it directly. This eliminates
+!         the possibility that an important element that happens
+!         to be 0 when the sparsity pattern is approximated is
+!         later nonzero; and it avoids the NEQ extra calls to
+!         your derivative subroutine to approximate the structure.
+!         Note that a nemesis for any sparse ode solver is a
+!         problem in which the sparsity pattern actually changes
+!         during the integration. An example of such a problem
+!         is provided in the demohum21.f90 demonstration program.
+!         If you know the sparsity pattern changes or if you
+!         suspect it does because DVODE_F90 is generating
+!         nonconvergence error messages, consider having DVODE_F90
+!         re-approximate the structure by calling SET_INTERMEDIATE_OPTS and
+!         forcing an integration restart when control is returned
+!         to your calling program. Please do not do this at every
+!         output point since it will be extremely time consuming
+!         and inefficient if it is not needed.
+!
+!  (4) The optional parameter NZSWAG may/should be used to speed
+!      up the determination of acceptable array sizes for the
+!      internal sparse working arrays and the sparse Jacobian.
+!      Initially, DVODE_F90 allocates arrays of length
+!      max(10*NEQ,NSZSWAG) and increases this amount by
+!      max(10*NEQ,ELBOW_ROOM*NSZSWAG) as necessary. NZSWAG
+!      has a default value of 1000 and ELBOW_ROOM has a default
+!      value of 2.
+!         Recommendation:
+!         Provide a larger value for NZSWAG particularly if NEQ
+!         is large and you suspect considerable fill-in due to
+!         partial pivoting.
+!
+!  (5) MA28BD uses the pivot sequence initially determined by
+!      MA28AD. When a singularity is diagnosed, the internal
+!      procedure used by the DENSE and BANDED options is used
+!      to reduce the step size and re-calulate the iteration
+!      matrix. This works fine for most problems; but particularly
+!      for badly scaled problems, the solution may be unsuccessful
+!      or it may drag along using small step sizes. This is due
+!      to the fact MA28BD will continue to use the out-of-date pivot
+!      sequence until singularity is again diagnosed. An option not
+!      available in previous sparse ode solvers may be used to
+!      instruct DVODE_F90 to force MA28AD to calculate a new pivot
+!      sequence when MA28BD encounters a singularity. Although
+!      MA28AD is considerably slower than MA28BD, the additional
+!      calls to MA28AD ensure that the pivot sequence is more
+!      up to date. This can increase both the accuracy and the
+!      efficiency very dramatically. The demodirn.f90 demonstration
+!      program provides an illustration of the dramatic improvement
+!      that is possible. The optional parameter MA28_RPS may be set
+!      .TRUE. to force these pivot sequence updates.
+!         Recommendation:
+!         Use the default value MA28_RPS=.FALSE; but if DVODE_F90
+!         encounters nonconvergence, use MA28_RPS=.TRUE. to force
+!         pivot sequence updates.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR, H0, HMAX, HMIN,         &
+        RELERR, TCRIT
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH, MAXORD,          &
+          MXHNIL, MXSTEP, NEVENTS, NZSWAG, UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, CHANGE_ONLY_f77_OPTIONS,&
+          DENSE_J, MA28_RPS, SPARSE_J, USER_SUPPLIED_JACOBIAN,              &
+          USER_SUPPLIED_SPARSITY
+! ..
+! .. Array Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:)
+        KPP_REAL, OPTIONAL :: CLOWER(:), CUPPER(:)
+        INTEGER, OPTIONAL, INTENT (IN) :: CONSTRAINED(:)
+! ..
+! .. Local Scalars ..
+        INTEGER ::  IER, IOPT, METH, MF, MFA, MFSIGN, MITER, ML, MOSS, MU,  &
+          NAE, NG, NRE
+        LOGICAL :: BANDED, DENSE, SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_INTERMEDIATE_OPTS
+! ..
+    RUSER(1:LRWUSER) = ZERO
+    IUSER(1:LIWUSER) = 0
+    
+!   Allow default error tolerances?
+    ALLOW_DEFAULT_TOLS = .FALSE.
+
+!   Maximum number of consecutive error test failures?
+    CONSECUTIVE_EFAILS = KFH
+
+!   Maximum number of consecutive corrector iteration failures?
+    CONSECUTIVE_CFAILS = MXNCF
+
+!   Use JACSP to approximate Jacobian?
+    USE_JACSP = .FALSE.
+
+!   If only f77 options are to be changed, do it and return.
+    IF (PRESENT(CHANGE_ONLY_f77_OPTIONS)) THEN
+       IF (CHANGE_ONLY_f77_OPTIONS) THEN
+          IF (.NOT.OPTS_CALLED) THEN
+             MSG = 'You have not previously called SET_OPTS before attempting'
+             CALL XERRDV(MSG,250,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'to change one or more of the vode.f77 optional parameters.'
+             CALL XERRDV(MSG,250,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(HMAX)) THEN
+             IOPT = 1
+             RUSER(6) = HMAX
+             MSG = 'HMAX changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,260,1,0,0,0,1,HMAX,ZERO)
+          END IF
+          IF (PRESENT(HMIN)) THEN
+             IOPT = 1
+             RUSER(7) = HMIN
+             MSG = 'HMIN changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,270,1,0,0,0,1,HMIN,ZERO)
+          END IF
+          IF (PRESENT(TCRIT)) THEN
+             IOPT = 1
+             RUSER(1) = TCRIT
+             MSG = 'TCRIT changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,280,1,0,0,0,1,TCRIT,ZERO)
+          END IF
+          IF (PRESENT(MXSTEP)) THEN
+             IOPT = 1
+             IUSER(6) = MXSTEP
+             MSG = 'MXSTEP changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,290,1,1,MXSTEP,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MAXORD)) THEN
+             IOPT = 1
+             IUSER(5) = MAXORD
+             MSG = 'MAXORD changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,300,1,1,MAXORD,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MXHNIL)) THEN
+             IOPT = 1
+             IUSER(7) = MXHNIL
+             MSG = 'MXHNIL changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,310,1,1,MXHNIL,0,0,ZERO,ZERO)
+          END IF
+       END IF
+       RETURN
+    END IF
+
+!       Set the flag to indicate that SET_INTERMEDIATE_OPTS has been called.
+        OPTS_CALLED = .TRUE.
+
+!       Set the MA48 storage cleanup flag.
+        MA48_WAS_USED = .FALSE.
+
+!       Set the fast factor option for MA48,
+        USE_FAST_FACTOR = .TRUE.
+
+!       Determine the working precision and define the value for UMAX
+!       expected by MA28. Note that it is different for single and
+!       double precision.
+        WPD = KIND(1.0D0)
+        WPS = KIND(1.0E0)
+        IF (WPD/=dp .AND. WPS/=dp) THEN
+          MSG = 'Illegal working precision in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,320,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (WPD==dp) THEN
+!       Working precision is double.
+          UMAX = 0.999999999_dp
+        ELSE
+!       Working precision is single.
+          UMAX = 0.9999_dp
+        END IF
+
+!       Set the MA28 message flag.
+        LP = 0
+
+!       Set the MA28 singularity threshold.
+        EPS = 1.0E-4_dp
+
+!       Set the MA28 pivot sequence frequency flag.
+        IF (PRESENT(MA28_RPS)) THEN
+           IF (MA28_RPS) THEN
+              REDO_PIVOT_SEQUENCE = MA28_RPS
+           ELSE
+              REDO_PIVOT_SEQUENCE = .FALSE.
+           END IF
+        ELSE
+           REDO_PIVOT_SEQUENCE = .FALSE.
+        END IF
+
+        MA28AD_CALLS = 0
+        MA28BD_CALLS = 0
+        MA28CD_CALLS = 0
+        MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       MA48AD_CALLS = 0
+!       MA48BD_CALLS = 0
+!       MA48CD_CALLS = 0
+!_______________________________________________________________________
+        IRNCP = 0
+        ICNCP = 0
+        MINIRN = 0
+        MINICN = 0
+        MAX_MINIRN = 0
+        MAX_MINICN = 0
+        MAX_NNZ = 0
+
+!       Set the flag to warn the user if |(y(t)| < abserr.
+        YMAXWARN = .FALSE.
+
+!       Load defaults for the optional input arrays for DVODE.
+        IUSER(1:8) = 0
+        RUSER(1:8) = ZERO
+
+        IF (PRESENT(SPARSE_J)) THEN
+          IF (SPARSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 126
+              ELSE
+                MF = 227
+              END IF
+            ELSE
+              MF = 227
+            END IF
+            IF (PRESENT(USER_SUPPLIED_SPARSITY)) THEN
+              IF (USER_SUPPLIED_SPARSITY) THEN
+                MF = MF - 100*(MF/100)
+              END IF
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(BANDED_J)) THEN
+          IF (BANDED_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 24
+              ELSE
+                MF = 25
+              END IF
+            ELSE
+              MF = 25
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(DENSE_J)) THEN
+          IF (DENSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 21
+              ELSE
+                MF = 22
+              END IF
+            ELSE
+              MF = 22
+            END IF
+          END IF
+        END IF
+
+!       Check for errors in MF.
+        MFA = IABS(MF)
+        MOSS = MFA/100
+        METH = (MFA-100*MOSS)/10
+        MITER = MFA - 100*MOSS - 10*METH
+        IF (METH<1 .OR. METH>2) THEN
+          MSG = 'Illegal value of METH in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,330,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MITER<0 .OR. MITER>7) THEN
+          MSG = 'Illegal value of MITER in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,340,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MOSS<0 .OR. MOSS>2) THEN
+          MSG = 'Illegal value of MOSS in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,350,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Reset MF, now that MOSS is known.
+        MFSIGN = SIGN(1,MF)
+        MF = MF - 100*MOSS*MFSIGN
+
+        IF (MITER==0) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==1 .OR. MITER==2) THEN
+          DENSE = .TRUE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==3) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==4 .OR. MITER==5) THEN
+          DENSE = .FALSE.
+          BANDED = .TRUE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==6 .OR. MITER==7) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .TRUE.
+        END IF
+
+!       Define the banded Jacobian band widths.
+        IF (BANDED) THEN
+          IF (PRESENT(LOWER_BANDWIDTH)) THEN
+            ML = LOWER_BANDWIDTH
+            IUSER(1) = ML
+          ELSE
+            MSG = 'In SET_INTERMEDIATE_OPTS you have indicated a'
+            CALL XERRDV(MSG,360,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not'
+            CALL XERRDV(MSG,360,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'supplied the lower bandwidth.'
+            CALL XERRDV(MSG,360,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(UPPER_BANDWIDTH)) THEN
+            MU = UPPER_BANDWIDTH
+            IUSER(2) = MU
+          ELSE
+            MSG = 'In SET_INTERMEDIATE_OPTS you have indicated a'
+            CALL XERRDV(MSG,370,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not'
+            CALL XERRDV(MSG,370,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'supplied the upper bandwidth.'
+            CALL XERRDV(MSG,370,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Define the nonzero diagonals.
+          BNGRP = 0
+          SUBS = .FALSE.
+          SUPS = .FALSE.
+          NSUBS  = 0
+          NSUPS = 0
+        END IF
+
+!       Define the sparse Jacobian options.
+        SCALE_MATRIX = .FALSE.
+        ELBOW_ROOM = 2
+        IF (SPARSE) THEN
+!         NZSWAG for the number of nonzeros in the Jacobian.
+          IF (PRESENT(NZSWAG)) THEN
+            NZ_SWAG = MAX(NZSWAG,0)
+          ELSE
+            NZ_SWAG = 0
+          END IF
+!         Indicate that SET_IAJA has not yet been called successfully.
+          IAJA_CALLED = .FALSE.
+!         Check for illegal method flags.
+          IF (MOSS==2 .AND. MITER/=7) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,380,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (MOSS==1 .AND. MITER/=6) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS MOSS=1 but MITER is not 6.'
+            CALL XERRDV(MSG,390,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         IF (MOSS==0 .AND. MITER/=7) THEN
+!           MSG = 'In SET_INTERMEDIATE_OPTS MOSS=0 but MITER is not 7.'
+!           CALL XERRDV(MSG,400,2,0,0,0,0,ZERO,ZERO)
+!         END IF
+!         Allow MC19 scaling for the Jacobian.
+          SCALE_MATRIX = .FALSE.
+        END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       Process the constrained solution components.
+        IF (PRESENT(CONSTRAINED)) THEN
+          NDX = SIZE(CONSTRAINED)
+          IF (NDX<1) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the size of CONSTRAINED < 1.'
+            CALL XERRDV(MSG,410,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (.NOT.(PRESENT(CLOWER)) .OR. .NOT.(PRESENT(CUPPER))) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the arrays CLOWER and CUPPER'
+            CALL XERRDV(MSG,420,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'are not present.'
+            CALL XERRDV(MSG,420,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (SIZE(CLOWER)/=NDX .OR. SIZE(CUPPER)/=NDX) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the size of the solution bound'
+            CALL XERRDV(MSG,430,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'arrays must be the same as the CONSTRAINED array.'
+            CALL XERRDV(MSG,430,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Note: The contents of CONSTRAINED will be checked
+!         in subroutine DVODE after NEQ is known.
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,30)
+          END IF
+          ALLOCATE (IDX(NDX),LB(NDX),UB(NDX),STAT=IER)
+          CALL CHECK_STAT(IER,40)
+          IDX(1:NDX) = CONSTRAINED(1:NDX)
+          LB(1:NDX) = CLOWER(1:NDX)
+          UB(1:NDX) = CUPPER(1:NDX)
+          BOUNDS = .TRUE.
+        ELSE
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,50)
+          END IF
+          NDX = 0
+          BOUNDS = .FALSE.
+        END IF
+
+!       Is the Jacobian constant?
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+!       Process the miscellaneous options.
+
+!       Don't step past TCRIT variable.
+        IF (PRESENT(TCRIT)) THEN
+          RUSER(1) = TCRIT
+        ELSE
+          RUSER(1) = ZERO
+        END IF
+
+!       DVODE optional parameters.
+        IOPT = 1
+        IF (PRESENT(MAXORD)) THEN
+          IUSER(5) = MAXORD
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXHNIL)) THEN
+          IUSER(7) = MXHNIL
+          IOPT = 1
+        END IF
+        IF (PRESENT(H0)) THEN
+          RUSER(5) = H0
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          IOPT = 1
+        END IF
+        U_PIVOT = ONE
+        OPTS%IOPT = IOPT
+
+!       Define the error tolerances.
+
+!       Relative error tolerances.
+        NRE = 1
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,60)
+        IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,440,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_dp
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,460,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerances.
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,460,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,460,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,70)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,470,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,490,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,490,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,490,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+!            3   array    scalar  RTOL(i)*ABS(Y(i)) + ATOL
+!            4   array    array   RTOL(i)*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ITOL = 2
+        ELSE
+          OPTS%ITOL = 1
+        END IF
+        RETURN
+
+  END FUNCTION SET_INTERMEDIATE_OPTS
+!_______________________________________________________________________
+
+  FUNCTION SET_OPTS(METHOD_FLAG, DENSE_J, BANDED_J, SPARSE_J,          &
+    USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN, CONSTANT_JACOBIAN,          &
+    LOWER_BANDWIDTH, UPPER_BANDWIDTH, SUB_DIAGONALS, SUP_DIAGONALS,    &
+    RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR, TCRIT, H0, HMAX,     &
+    HMIN, MAXORD, MXSTEP, MXHNIL, YMAGWARN, SETH, UPIVOT, NZSWAG,      &
+    USER_SUPPLIED_SPARSITY, NEVENTS, CONSTRAINED, CLOWER, CUPPER,      &
+    MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES, MA28_EPS,            &
+    MA28_RPS, CHANGE_ONLY_f77_OPTIONS,JACOBIAN_BY_JACSP)               &
+  RESULT(OPTS)
+
+! FUNCTION SET_OPTS:
+!    VODE.f77 method flag:
+!       METHOD_FLAG
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    Jacobian options:
+!       SAVE_JACOBIAN, CONSTANT_JACOBIAN. JACOBIAN_BY_JACSP
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH, UPPER_BANDWIDTH
+!    If specify the nonzero diagonals for banded Jacobian:
+!       SUB_DIAGONALS, SUP_DIAGONALS
+!    Error tolerances:
+!       RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR
+!    VODE.f77 optional parameters:
+!       TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL
+!    Solution smaller than absolute error tolerance:
+!       YMAGWARN
+!    Sparse flags:
+!       SETH, UPIVOT, NZSWAG, USER_SUPPLIED_SPARSITY
+!       MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES
+!       MA28_EPS, MA28_RPS
+!    Rootfinding:
+!       NEVENTS
+!    Impose bounds on solution:
+!       CONSTRAINED, CLOWER, CUPPER
+!    Change one or more of HMAX, HMIN, TCRIT, MXSTEP, MXHNIL, MAXORD
+!       CHANGE_ONLY_f77_OPTIONS
+! RESULT(OPTS)
+
+! SET_OPTIONS sets user parameters for DVODE via keywords. Values that
+! are defined herein will be used internally by DVODE. All option
+! keywords are OPTIONAL and order is not important.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+
+!                     Quick Summary of Options
+
+! METHOD_FLAG            - any legal value of MF as in DVODE
+! DENSE_J                - Jacobian is sparse alternative to MF
+! BANDED_J               - Jacobian is banded alternative to MF 
+! SPARSE_J               - Jacobian is sparse alternative to MF   
+! USER_SUPPLIED_JACOBIAN - User will supply Jacobian subroutine
+!                          (user supplied subroutine JAC required)
+! SAVE_JACOBIAN          - Jacobian will be saved and reused
+! CONSTANT_JACOBIAN      - Jacobian is constant
+! JACOBIAN_BY_JACSP      - Use Doug Salane's approximate Jacobian
+!                          algorithm
+! LOWER_BANDWIDTH        - Lower bandwidth ML in DVODE
+! UPPER_BANDWIDTH        - Upper bandwidth MU in DVODE
+! SUB_DIAGONALS          - Nonzero sub diagonals in Jacobian
+! SUP_DIAGONALS          - Nonzero super diagonals in Jacobian
+! RELERR                 - Scalar relative error tolerance in DVODE
+! RELERR_VECTOR          - Vector relative error tolerance in DVODE
+! ABSERR                 - Scalar absolute error tolerance in DVODE
+! ABSERR_VECTOR          - Vector absolute error tolerance in DVODE
+! TCRIT                  - Critical time TCRIT in DVODE
+! H0                     - Starting step size in DVODE
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MAXORD                 - Maximum integration order in DVODE
+! MXSTEP                 - Maximum number of integration steps
+!                          in DVODE
+! MXHNIL                 - Maximum number of T+H=T messages in DVODE
+! YMAGWARN               - Warn if magnitude of solution is smaller
+!                          than absolute error tolerance
+! SETH                   - Sparse Jacobian element threshold value
+! UPIVOT                 - MA28 partial pivoting parameter
+! NZSWAG                 - guess for the number of nonzeros in sparse
+!                          Jacobian
+! USER_SUPPLIED_SPARSITY - user will supply sparsity structure
+!                          arrays by calling USERSETS_IAJA 
+! MA28_ELBOW_ROOM        - Supply an integer greater than 2 if you
+!                          wish to increase the elbow room in the
+!                          MA28 work arrays (by MA28_ELBOW_ROOM * NZA).
+! MC19_SCALING           - .TRUE. if you wish to invoke sparse scaling
+!                           of the Jacobian.
+! MA28_MESSAGES          - Control printing of MA28 messages
+! MA28_RPS               - Redo MA28AD pivot sequence if a singularity
+!                          is encountered
+! NEVENTS                - number of user defined root finding functions
+!                          (user supplied subroutine G required)
+! CONSTRAINED,           - array of solution component indices that
+! CLOWER,                  are to be constrained by the lower and
+! CUPPER                   upper bound arrays CLOWER and CUPPER so that
+!                          CLOWER(I) <= Y(CONSTRAINED(I)) <= CUPPER(I)
+! CHANGE_ONLY_f77_OPTIONS- flag to indicate whether to only change any
+!                          of the parameters MXSTEP, MXHNIL, MAXORD,
+!                          HMAX, HMIN, TCRIT
+!                     Options Types
+! METHOD_FLAG            - integer
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! SAVE_JACOBIAN          - logical
+! CONSTANT_JACOBIAN      - logical
+! JACOBIAN_BY_JACSP      - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! SUB_DIAGONALS          - integer array
+! SUP_DIAGONALS          - integer array
+! RELERR                 - KPP_REAL scalar
+! RELERR_VECTOR          - KPP_REAL vector
+! ABSERR                 - KPP_REAL scalar
+! ABSERR_VECTOR          - KPP_REAL vector
+! TCRIT                  - KPP_REAL scalar
+! H0                     - KPP_REAL scalar
+! HMAX                   - KPP_REAL scalar
+! HMIN                   - KPP_REAL scalar
+! MAXORD                 - integer
+! MXSTEP                 - integer
+! MXHNIL                 - integer
+! YMAGWARN               - logical
+! SETH                   - KPP_REAL scalar
+! UPIVOT                 - KPP_REAL scalar
+! NZSWAG                 - integer
+! USER_SUPPLIED_SPARSITY - logical
+! NEVENTS                - integer
+! CONSTRAINED            - integer array
+! CLOWER                 - KPP_REAL array
+! CUPPER                 - KPP_REAL array
+! CHANGE_ONLY_f77_OPTIONS- logical
+
+! Argument list parameters:
+! METHOD_FLAG              = integration method flag
+! ABSERR                   = scalar absolute error tolerance
+! ABSERR_VECTOR            = vector of absolute error tolerances
+! RELERR                   = scalar relative error tolerance
+! RELERR_VECTOR            = vector of relative error tolerances
+! NEVENTS                  = Number of event functions (requires
+!                            user-supplied GFUN)
+! DENSE_J                  = use dense linear algebra if .TRUE.
+! BANDED_J                 = use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH        = lower bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH        = upper bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   SUB_DIAGONALS          = starting row numbers of nonzero sub
+!                            diagonals counting up from the lowest
+!                            sub diagonal
+!   SUP_DIAGONALS          = starting column numbers of nonzero
+!                            super diagonals counting up from the
+!                            lowest super diagonal
+! SPARSE_J                 = use sparse linear algebra if .TRUE.
+!   UPIVOT                 = partial pivot control flag (default=ONE)
+!                          = 0.0D0 for no partial pivoting
+!                          = ONE for (full) partial pivoting
+!                            Values between 0.0D0 and ONE yield
+!                            MA28 (partial) partial pivoting.
+!   NZSWAG                 = If you wish you may supply a guess,
+!                            NZSWAG, at the number of nonzeros
+!                            in the Jacobian matrix. In some cases
+!                            this will speed up the determination
+!                            of the necessary storage.
+!   USER_SUPPLIED_SPARSITY = .TRUE. if you wish to supply the sparsity
+!                            structure arrays directly by calling
+!                            USERSETS_IAJA
+!   MA28_ELBOW_ROOM        = Supply an integer greater than 2 if you
+!                            wish to increase the elbow room in the
+!                            MA28 work arrays (by MA28_ELBOW_ROOM * NZA).
+!   MC19_SCALING           = .TRUE. if you wish to invoke sparse scaling
+!                            of the Jacobian.
+!   MA28_MESSAGES          = .TRUE. to print all MA28 messages.
+!   MA28_EPS               = MA28 singularity threshold. If MA28BD
+!                            determines that the ratio of the current
+!                            pivot to the largest element in the row
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+!   MA28_RPS               = .TRUE. to force MA28AD to calculate a new
+!                            pivot sequence for use in MA28BD if a
+!                            singular iteration matrix is encountered
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+! USER_SUPPLIED_JACOBIAN   = exact Jacobian option
+!                            (requires user-supplied JAC)
+! SAVE_JACOBIAN            = reuse saved Jacobians
+! JACOBIAN_BY_JACSP        = use Doug Salane's Jacobian algorithm
+! TCRIT                    = critical time
+! H0                       = initial step size to try
+! HMAX                     = maximum allowable step size
+! HMIN                     = minimum allowable step size
+! MAXORD                   = maximum allowable integration order
+! MXSTEP                   = maximum number of integration steps
+!                            between calls to DVODE
+! MXHNIL                   = maximum number of printed messages
+!                            if the T+H=T condition occurs
+! CONSTRAINED              = array containing the indices of
+!                            solution components which are to be
+!                            be constrained by CLOWER and CUPPER.
+!                            The size of CONSTRAINED must be
+!                            positive and not exceed NEQ, the
+!                            number of ODEs. Each component of
+!                            CONSTRAINED must be between 1 and NEQ.
+! CLOWER, CUPPER           = lower and upper bound arrays for the.
+!                            solution. Each must be the same size
+!                            as the CONSTRAINED vector.
+! YMAGWARN                 = If .TRUE., a warning will be issued
+!                            before any return from DVODE for any
+!                            solution component whose magnitude
+!                            is smaller than the absolute error
+!                            tolerance for that component.
+!   User-callable Routines:
+!   The following routines may be called by the user:
+!   SET_OPTS      : Used to set options for DVODE_F90
+!   GET_STATS     : Used to gather summary integration
+!                   statistics following a successful
+!                   return from DVODE_F90
+!   DVINDY        : Used if the user wishes to interpolate
+!                   solution or derivative following a
+!                   successful return from DVODE_F90
+!   USERSETS_IAJA : Used if the user wishes to supply the
+!                   sparsity structure directly
+!   Detailed Description of SET_OPTS
+!   The following are defined in SET_OPTS:
+!   OPTS%MF     = Integration method flag (MF)
+!   OPTS%METH   = Integration family flag (METH)
+!   OPTS%MITER  = Iteration type flag (MITER)
+!   OPTS%MOSS   = Sparsity array type flag (MOSS)
+!   OPTS%ITOL   = Error tolerance flag (ITOL) (ITOL)
+!   OPTS%ATOL   = Absolute error tolerance(s) (ATOL)
+!   OPTS%RTOL   = Relative error tolerance(s) (RTOL)
+!   OPTS%DENSE  = Use dense linear algebra
+!   OPTS%BANDED = Use banded linear algebra 
+!   OPTS%SPARSE = Use sparse linear algebra 
+!   OPTS%IOPT   = DVODE optional parameter input flag (IOPT)
+!   OPTS%NG     = Number of event functions
+!   RUSER(1)    = TCRIT (don't step past)
+!   IUSER(1)    = Jacobian lower bandwidth (ML)
+!   IUSER(2)    = Jacobian upper bandwidth (MU)
+!   RUSER(5)    = Initial step size to try (H0)
+!   RUSER(6)    = Maximum allowable step size (HMAX)
+!   RUSER(7)    = Minimum allowable step size (HMIN)
+!   IUSER(5)    = Maximum allowable integration order (MAXORD)
+!   IUSER(6)    = Maximum number of integration steps (MXSTEP)
+!   IUSER(7)    = Maximum number of T+H=T messages (MXHNIL)
+!   NZ_SWAG     = Guess for the number of nonzeros in the
+!                 sparse Jacobian
+!   NG          = Number of user event functions
+!   BOUNDS,     = Nonnegativity information
+!   NDX, IDX
+!   YMAXWARN    = Warning flag for |y(t)| < abserr
+!   MA28_ELBOW_ROOM = Integer multiple by which to increase
+!                     the elbow room in the MA28 sparse work
+!                     arrays
+!   MC19_SCALING    = logical flag to control MC19 sparse
+!                     scaling of the Jacobian
+!   MA28_MESSAGES   = logical flag to control printing of MA28
+!                     messages.
+!   MA28_EPS        = KPP_REAL MA28 singularity threshold
+!
+!                         All Options
+!
+! METHOD_FLAG
+!
+! Default:   Not used
+! Change to: No need to specify if use one of next three parameters
+!            but can be changed to any value of the MF method flag
+!            in dvode.f77
+!
+! DENSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for dense linear algebra
+!
+! BANDED_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for banded linear algebra
+!
+! SPARSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for sparse linear algebra
+
+! USER_SUPPLIED_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if want to supply subroutine JAC to DVODE_F90
+!
+! SAVE_JACOBIAN
+!
+! Default:   .TRUE.
+! Change to: .FALSE. if do not want DVODE_F90 to reuse saved
+!            Jacobians
+!
+! JACOBIAN_BY_JACSP
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to approximate the Jacobian using Doug Salane's
+!            JACSP Jacobian subroutine
+!
+! CONSTANT_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if Jacobian is constant
+!
+! LOWER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Lower bandwidth if BANDED_J = .TRUE.
+!
+! UPPER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Upper bandwidth if BANDED_J = .TRUE.
+!
+! SUB_DIAGONALS
+!
+! Default:   Not used
+! Change to: Starting row locations for sub diagonals in
+!            banded Jacobian
+!
+! SUP_DIAGONALS
+!
+! Default:   Not used
+! Change to: Starting columns locations for super diagonals
+!            in banded Jacobian
+!
+! RELERR
+!
+! Default:   None
+! Change to: Specify a nonzero relative error tolerance
+!
+! RELERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of relative error tolerances
+!
+! ABSERR
+!
+! Default:   None
+! Change to: Specify a scalar absolute error tolerance or
+!            a vector of absolute error tolerances
+!
+! ABSERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of absolute error tolerances
+!
+! TCRIT
+!
+! Default:   Not used
+! Change to: Value of T which DVODE_F90 is not to step past
+!
+!     H0
+!
+! Default:   Determined by DVODE_F90
+! Change to: Guess for initial step size
+!
+! HMAX
+!
+! Default:   Infinity
+! Change to: Maximum allowable step size
+!
+! HMIN
+!
+! Default:   0.0D0
+! Change to: Minimum allowable step size
+!
+! MAXORD
+!
+! Default:   Determined by DVODE_F90
+! Change to: Maximum integration order
+!
+! MXSTEP
+!
+! Default:   5000
+!     Change to: Maximum number of steps between output points
+!
+! MXHNIL
+!
+! Default:   10
+! Change to: Maximum number of times T+H=T message will be printed
+!
+! YMAGWARN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to be warned when the magnitude of the
+!            solution is smaller than the absolute error tolerance
+!
+! SETH
+!
+! Default:   0.0D0
+! Change to: Threshold value below which Jacobian elements in the
+!            sparse Jacobian are considered to be zero
+!
+! UPIVOT
+!
+! Default:   1.0D0
+! Change to: partial pivoting factor between 0.0d0 and 1.0d0 to
+!            control the degree of partial pivoting used in sparse
+!            Gaussian Elimination
+!
+! NZSWAG
+!
+! Default:   Determined by DVODE_F90
+! Change to: Amount by which to increment sizes of sparse arrays
+!
+! USER_SUPPLIED_SPARSITY
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to call subroutine USERSETS_IAJA to
+!            define the sparse structure array pointers directly
+!
+! NEVENTS
+!
+! Default:   0
+! Change to: Number of event functions if wish to supply subroutine
+!            GFUN to DVODE_F90
+!
+! CONSTRAINED
+!
+! Default:   Bounds not imposed on solution
+! Change to: Array of indices for components on which to impose
+!            solution bounds
+!
+! CLOWER
+!
+! Default:   Not used
+! Change to: Vector containing lower bounds corresponding to
+!            CONSTRAINED
+!
+! CUPPER
+!
+! Default:   Not used
+! Change to: Vector containing upper bounds corresponding to
+!            CONSTRAINED
+!
+! MA28_ELBOW_ROOM
+!
+! Default:   2
+! Change to: Larger value to allow the sparse arrays more
+!            elbow room
+!
+! MC19_SCALING
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to invoke scaling of the sparse solution
+!
+! MA28_MESSAGES
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to have MA28 diagnostic messages written
+!            to unit 6
+!
+! MA28_EPS
+!
+! Default:   1.0D-4
+! Change to: Smaller positive value to allow the ratio of the
+!            magnitude of pivot elements and remaining row
+!            entries to be smaller before the iteration matrix
+!            is considered to be numerically singularity
+!
+! MA28_RPS
+!
+! Default:   .FALSE.
+! Change to: Redo the MA28AD sparse pivoting sequence any time
+!            MA28BD considers the iteration matrix to be
+!            numerically singularity
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+! For a sparse Jacobian, IA(J+1)-IA(J) is the number
+! of nonzeros in column change. JA(I) indicates the
+! rows in which the nonzeros occur. For column J,
+! the nonzeros occurs in rows I=JA(K) for K=I1,...,I2
+! where I1=IA(J) and I2= IA(J+1)-1. Load DF(I)/DY(J)
+! in PD(I). Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = IA(J)
+!       I2 = IA(J+1) - 1
+!       DO K = I1, I2
+!          I = JA(K)
+!          PD(I) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+!                    More on Sparsity Options
+!
+! Two facts of life regarding the use of direct sparse solvers are
+! (1) significant improvements are possible, and (2) the use of
+! direct sparse solvers often is more demanding of the user.
+! Although SET_NORMAL_OPTS provides modest provisions for solving
+! problems with sparse Jacobians, using SET_OPTS rather than
+! SET_NORMAL_OPTS provides several advanced options. These options
+! are described below. The recommended manner in which to use
+! these options is also provided. Note that each of these optional
+! parameters have default values and need not be specified in your
+! call to SET_OPTS if you wish to use the default values. Note
+! also that the order in which the options are specified in a call
+! to SET_OPTS is not important.
+!
+!  (1) First determine if it is feasible to use either the BANDED
+!      or DENSE Jacobian option.
+!         Recommendation:
+!         Use the DENSE or BANDED option if possible. They do
+!         not require use of most of the options described here.
+!    
+!  (2) The Jacobian is approximated internally using differences
+!      if you do not provide an analytic Jacobian. The option
+!      USER_SUPPLIED_JACOBIAN=.TRUE. may be used if you wish to
+!      provide an analytic Jacobian.
+!         Recommendation:
+!         Use an internally generated Jacobian for most problems
+!         but consider providing an analytic Jacobian if it not
+!         too much trouble.
+!
+!  (3) If you do not provide the sparse structure arrays, they
+!      are approximated internally by making NEQ calls to your
+!      derivative subroutine and using differences to approximate
+!      the structure of the Jacobian. The option
+!      USER_SUPPLIED_SPARSITY and a call to USERSETS_IAJA can
+!      be used to supply the arrays directly. You can also use
+!      subroutine SET_IAJA to approximate the structure using
+!      different perturbation factors than those used in DVODE_F90.
+!         Recommendations:
+!         Although allowing DVODE_F90 to approximate the Jacobian
+!         structure suffices for most problems, if you know the
+!         sparsity pattern provide it directly. This eliminates
+!         the possibility that an important element that happens
+!         to be 0 when the sparsity pattern is approximated is
+!         later nonzero; and it avoids the NEQ extra calls to
+!         your derivative subroutine to approximate the structure.
+!         Note that a nemesis for any sparse ode solver is a
+!         problem in which the sparsity pattern actually changes
+!         during the integration. An example of such a problem
+!         is provided in the demohum21.f90 demonstration program.
+!         If you know the sparsity pattern changes or if you
+!         suspect it does because DVODE_F90 is generating
+!         nonconvergence error messages, consider having DVODE_F90
+!         re-approximate the structure by calling SET_OPTS and
+!         forcing an integration restart when control is returned
+!         to your calling program. Please do not do this at every
+!         output point since it will be extremely time consuming
+!         and inefficient if it is not needed.
+!
+!  (4) The optional parameter UPIVOT is used to control the type
+!      of partial pivoting pivoting in MA28AD. UPIVOT=0.0D0
+!      corresponds to no pivoting; and UPIVOT=1.0D0 corresponds
+!      to partial pivoting. UPIVOT may be assigned any value
+!      between 0 and 1. The pivoting strategy used in MA28AD is
+!      to accept a pivot for which the magnitude of the pivot
+!      element is greater than or equal to UPIVOT times the
+!      magnitude of the largest remaining element in the pivot
+!      row. The default value is UPIVOT=1.DO
+!         Recommendation:
+!         Use the default value UPIVOT=1.0D0.
+!
+!  (5) The optional parameter NZSWAG may/should be used to speed
+!      up the determination of acceptable array sizes for the
+!      internal sparse working arrays and the sparse Jacobian.
+!      Initially, DVODE_F90 allocates arrays of length
+!      max(10*NEQ,NSZSWAG) and increases this amount by
+!      max(10*NEQ,ELBOW_ROOM*NSZSWAG) as necessary. NZSWAG
+!      has a default value of 1000 and ELBOW_ROOM has a default
+!      value of 2.
+!         Recommendation:
+!         Provide a larger value for NZSWAG particularly if NEQ
+!         is large and you suspect considerable fill-in due to
+!         partial pivoting.
+!
+!  (6) The optional parameter ELBOW_ROOM may be used to control
+!      the amount of "elbow room" needed in the MA28 sparse arrays.
+!      The default value is 2 but a larger value can sometimes
+!      speed up the determination of sparse array sizes.
+!         Recommendation:
+!         MA28 error and diagnostic messages are turned off by
+!         default. The optional parameter MA28_MESSAGES may be
+!         used to turn them on if it is assigned a nonzero value.
+!         If you see several messages that state that LIRN_ALL
+!         or LICN_ALL is too small and that additional storage
+!         is being allocated for another try, and you have
+!         provided a large value for NZSWAG, increase the size
+!         of ELBOW_ROOM.
+!
+!  (7) The optional parameter SETH may be assigned a nonzero value
+!      that represents a threshhold value for the magitude of
+!      elements in the Jacobian below which the element will be
+!      treated as being zero. The default value is SETH=0.0D0.
+!         Recommendation:
+!         Use the default value SETH=0.0D0.
+!
+!  (8) MA28AD determines the pivot sequence to be used in subsequent
+!      calls to MA28BD. When MA28BD is called it considers the
+!      iteration matrix to be numerically singular if the magnitude
+!      of the ratio of the largest remaining element in the pivot
+!      row to the pivot element is less than EPS. This condition
+!      can arise since MA28BD is using an out-of-date pivot sequence.
+!      The default value used is EPS=1.0D-4. A smaller value
+!      of EPS may be appropriate for some problems. The optional
+!      parameter MA28_EPS may be used to change the default value.
+!         Recommendation:
+!         Use the default value EPS=1.0D-4.
+!
+!  (9) Badly scaled Jacobians can cause problems for sparse solvers.
+!      The parameter MA28_SCALING may be set .TRUE. to instruct
+!      DVODE_F90 to scale the iteration matrix using MC19AD. This
+!      can positively impact the performance of MA28AD. The default
+!      setting is MA28_SCALING=.FALSE.
+!         Recommendation:
+!         Unless the solution is not successful, use the default
+!         setting for MA29_SCALING; but consider using scaling
+!         if you know the problem is badly scaled (e.g., if the
+!         magnitudes of the components differ greatly).
+!
+! (10) As mentioned above, MA28BD uses the pivot sequence initially
+!      determined by MA28AD. When a singularity is diagnosed, the
+!      internal procedure used by the DENSE and BANDED options is
+!      used to reduce the step size and re-calulate the iteration
+!      matrix. This works fine for most problems; but particularly
+!      for badly scaled problems, the solution may be unsuccessful
+!      or it may drag along using small step sizes. This is due
+!      to the fact MA28BD will continue to use the out-of-date pivot
+!      sequence until singularity is again diagnosed. An option not
+!      available in previous sparse ode solvers may be used to
+!      instruct DVODE_F90 to force MA28AD to calculate a new pivot
+!      sequence when MA28BD encounters a singularity. Although
+!      MA28AD is considerably slower than MA28BD, the additional
+!      calls to MA28AD ensure that the pivot sequence is more
+!      up to date. This can increase both the accuracy and the
+!      efficiency very dramatically. The demodirn.f90 demonstration
+!      program provides an illustration of the dramatic improvement
+!      that is possible. The optional parameter MA28_RPS may be set
+!      .TRUE. to force these pivot sequence updates.
+!         Recommendation:
+!         Use the default value MA28_RPS=.FALSE; but if DVODE_F90
+!         encounters nonconvergence, use MA28_RPS=.TRUE. to force
+!         pivot sequence updates. Note that use of this option
+!         will usually obviate the necessity to use the other
+!         options described above. Note that we decided not to
+!         use MA28_RPS=.TRUE. as default simply because other
+!         sparse ode solvers are averse to calling MA28AD more
+!         than is absolutely necessary for a given problem.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR, H0, HMAX, HMIN,         &
+        MA28_EPS, RELERR, SETH, TCRIT, UPIVOT
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH, MAXORD,          &
+          MA28_ELBOW_ROOM, METHOD_FLAG, MXHNIL, MXSTEP, NEVENTS, NZSWAG,    &
+          UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, CHANGE_ONLY_f77_OPTIONS,&
+          CONSTANT_JACOBIAN, DENSE_J, JACOBIAN_BY_JACSP, MA28_MESSAGES,     &
+          MA28_RPS, MC19_SCALING, SAVE_JACOBIAN, SPARSE_J,                  &
+          USER_SUPPLIED_JACOBIAN, USER_SUPPLIED_SPARSITY, YMAGWARN
+! ..
+! .. Array Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:), RELERR_VECTOR(:)
+        KPP_REAL, OPTIONAL :: CLOWER(:), CUPPER(:)
+        INTEGER, OPTIONAL, INTENT (IN) :: CONSTRAINED(:), SUB_DIAGONALS(:), &
+        SUP_DIAGONALS(:)
+! ..
+! .. Local Scalars ..
+        INTEGER ::  IER, IOPT, METH, MF, MFA, MFSIGN, MITER, ML, MOSS, MU,  &
+          NAE, NG, NRE
+        LOGICAL :: BANDED, DENSE, SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_OPTS
+! ..
+    RUSER(1:LRWUSER) = ZERO
+    IUSER(1:LIWUSER) = 0
+    
+!   Allow default error tolerances?
+    ALLOW_DEFAULT_TOLS = .FALSE.
+
+!   Maximum number of consecutive error test failures?
+    CONSECUTIVE_EFAILS = KFH
+
+!   Maximum number of consecutive corrector iteration failures?
+    CONSECUTIVE_CFAILS = MXNCF
+
+!   Use JACSP to approximate Jacobian?
+    USE_JACSP = .FALSE.
+    IF (PRESENT(JACOBIAN_BY_JACSP)) THEN
+       IF (JACOBIAN_BY_JACSP) USE_JACSP = .TRUE.
+    END IF
+
+!   If only f77 options are to be changed, do it and return.
+    IF (PRESENT(CHANGE_ONLY_f77_OPTIONS)) THEN
+       IF (CHANGE_ONLY_f77_OPTIONS) THEN
+          IF (.NOT.OPTS_CALLED) THEN
+             MSG = 'You have not previously called SET_OPTS before attempting'
+             CALL XERRDV(MSG,500,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'to change one or more of the vode.f77 optional parameters.'
+             CALL XERRDV(MSG,500,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(HMAX)) THEN
+             IOPT = 1
+             RUSER(6) = HMAX
+             MSG = 'HMAX changed in SET_OPTS.'
+             CALL XERRDV(MSG,510,1,0,0,0,1,HMAX,ZERO)
+          END IF
+          IF (PRESENT(HMIN)) THEN
+             IOPT = 1
+             RUSER(7) = HMIN
+             MSG = 'HMIN changed in SET_OPTS.'
+             CALL XERRDV(MSG,520,1,0,0,0,1,HMIN,ZERO)
+          END IF
+          IF (PRESENT(TCRIT)) THEN
+             IOPT = 1
+             RUSER(1) = TCRIT
+             MSG = 'TCRIT changed in SET_OPTS.'
+             CALL XERRDV(MSG,530,1,0,0,0,1,TCRIT,ZERO)
+          END IF
+          IF (PRESENT(MXSTEP)) THEN
+             IOPT = 1
+             IUSER(6) = MXSTEP
+             MSG = 'MXSTEP changed in SET_OPTS.'
+             CALL XERRDV(MSG,530,1,1,MXSTEP,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MAXORD)) THEN
+             IOPT = 1
+             IUSER(5) = MAXORD
+             MSG = 'MAXORD changed in SET_OPTS.'
+             CALL XERRDV(MSG,540,1,1,MAXORD,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MXHNIL)) THEN
+             IOPT = 1
+             IUSER(7) = MXHNIL
+             MSG = 'MXHNIL changed in SET_OPTS.'
+             CALL XERRDV(MSG,550,1,1,MXHNIL,0,0,ZERO,ZERO)
+          END IF
+       END IF
+       RETURN
+    END IF
+
+!   Set the flag to indicate that SET_OPTS has been called.
+    OPTS_CALLED = .TRUE.
+
+!   Set the MA48 storage cleanup flag.
+    MA48_WAS_USED = .FALSE.
+
+!   Set the fast factor option for MA48,
+    USE_FAST_FACTOR = .TRUE.
+
+!   Determine the working precision and define the value for UMAX
+!   expected by MA28. Note that it is different for single and
+!   double precision.
+    WPD = KIND(1.0D0)
+    WPS = KIND(1.0E0)
+    IF (WPD/=dp .AND. WPS/=dp) THEN
+      MSG = 'Illegal working precision in SET_OPTS.'
+      CALL XERRDV(MSG,560,2,0,0,0,0,ZERO,ZERO)
+    END IF
+    IF (WPD==dp) THEN
+!   Working precision is double.
+      UMAX = 0.999999999_dp
+    ELSE
+!     Working precision is single.
+      UMAX = 0.9999_dp
+    END IF
+
+!   Set the MA28 message flag.
+    IF (PRESENT(MA28_MESSAGES)) THEN
+       LP = 0
+       IF (MA28_MESSAGES) LP = 6
+    ELSE
+       LP = 0
+    END IF
+
+!   Set the MA28 singularity threshold.
+    IF (PRESENT(MA28_EPS)) THEN
+       IF (MA28_EPS > ZERO) THEN
+          EPS = MA28_EPS
+       ELSE
+          EPS = 1.0E-4_dp
+       END IF
+     ELSE
+       EPS = 1.0E-4_dp
+     END IF
+
+!   Set the MA28 pivot sequence frequency flag.
+    IF (PRESENT(MA28_RPS)) THEN
+       IF (MA28_RPS) THEN
+          REDO_PIVOT_SEQUENCE = MA28_RPS
+       ELSE
+          REDO_PIVOT_SEQUENCE = .FALSE.
+       END IF
+     ELSE
+       REDO_PIVOT_SEQUENCE = .FALSE.
+     END IF
+
+     MA28AD_CALLS = 0
+     MA28BD_CALLS = 0
+     MA28CD_CALLS = 0
+     MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!    MA48AD_CALLS = 0
+!    MA48BD_CALLS = 0
+!    MA48CD_CALLS = 0
+!_______________________________________________________________________
+     IRNCP = 0
+     ICNCP = 0
+     MINIRN = 0
+     MINICN = 0
+     MAX_MINIRN = 0
+     MAX_MINICN = 0
+     MAX_NNZ = 0
+
+!   Set the flag to warn the user if |(y(t)| < abserr.
+     IF (PRESENT(YMAGWARN)) THEN
+       IF (YMAGWARN) THEN
+         YMAXWARN = .TRUE.
+       ELSE
+         YMAXWARN = .FALSE.
+       END IF
+     ELSE
+       YMAXWARN = .FALSE.
+     END IF
+
+!    Load defaults for the optional input arrays for DVODE.
+     IUSER(1:8) = 0
+     RUSER(1:8) = ZERO
+
+!    Set the method flag.
+     IF (.NOT.(PRESENT(METHOD_FLAG))) THEN
+       MF = 10
+       IF (PRESENT(SPARSE_J)) THEN
+         IF (SPARSE_J) THEN
+           IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+             IF (USER_SUPPLIED_JACOBIAN) THEN
+               MF = 126
+             ELSE
+               MF = 227
+             END IF
+           ELSE
+             MF = 227
+           END IF
+           IF (PRESENT(USER_SUPPLIED_SPARSITY)) THEN
+             IF (USER_SUPPLIED_SPARSITY) THEN
+               MF = MF - 100*(MF/100)
+             END IF
+           END IF
+           IF (PRESENT(SAVE_JACOBIAN)) THEN
+             IF (.NOT.SAVE_JACOBIAN) THEN
+               MF = -MF
+             END IF
+           END IF
+          END IF
+          END IF
+
+          IF (PRESENT(BANDED_J)) THEN
+            IF (BANDED_J) THEN
+              IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+                IF (USER_SUPPLIED_JACOBIAN) THEN
+                  MF = 24
+                ELSE
+                  MF = 25
+                END IF
+              ELSE
+                MF = 25
+              END IF
+              IF (PRESENT(SAVE_JACOBIAN)) THEN
+                IF (.NOT.SAVE_JACOBIAN) THEN
+                  MF = -MF
+                END IF
+              END IF
+            END IF
+          END IF
+
+          IF (PRESENT(DENSE_J)) THEN
+            IF (DENSE_J) THEN
+              IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+                IF (USER_SUPPLIED_JACOBIAN) THEN
+                  MF = 21
+                ELSE
+                  MF = 22
+                END IF
+              ELSE
+                MF = 22
+              END IF
+              IF (PRESENT(SAVE_JACOBIAN)) THEN
+                IF (.NOT.SAVE_JACOBIAN) THEN
+                  MF = -MF
+                END IF
+              END IF
+            END IF
+          END IF
+     ELSE
+       MF = METHOD_FLAG
+     END IF
+
+!    Check for errors in MF.
+     MFA = IABS(MF)
+     MOSS = MFA/100
+     METH = (MFA-100*MOSS)/10
+     MITER = MFA - 100*MOSS - 10*METH
+     IF (METH<1 .OR. METH>2) THEN
+       MSG = 'Illegal value of METH in SET_OPTS.'
+       CALL XERRDV(MSG,570,2,0,0,0,0,ZERO,ZERO)
+     END IF
+     IF (MITER<0 .OR. MITER>7) THEN
+       MSG = 'Illegal value of MITER in SET_OPTS.'
+       CALL XERRDV(MSG,580,2,0,0,0,0,ZERO,ZERO)
+     END IF
+     IF (MOSS<0 .OR. MOSS>2) THEN
+       MSG = 'Illegal value of MOSS in SET_OPTS.'
+       CALL XERRDV(MSG,580,2,0,0,0,0,ZERO,ZERO)
+     END IF
+
+!    Reset MF, now that MOSS is known.
+     MFSIGN = SIGN(1,MF)
+     MF = MF - 100*MOSS*MFSIGN
+
+     IF (MITER==0) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==1 .OR. MITER==2) THEN
+       DENSE = .TRUE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==3) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==4 .OR. MITER==5) THEN
+       DENSE = .FALSE.
+       BANDED = .TRUE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==6 .OR. MITER==7) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .TRUE.
+     END IF
+
+!    Define the banded Jacobian band widths.
+     IF (BANDED) THEN
+       IF (PRESENT(LOWER_BANDWIDTH)) THEN
+         ML = LOWER_BANDWIDTH
+         IUSER(1) = ML
+       ELSE
+         MSG = 'In SET_OPTS you have indicated a'
+         CALL XERRDV(MSG,590,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'banded Jacobian but you have not'
+         CALL XERRDV(MSG,590,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'supplied the lower bandwidth.'
+         CALL XERRDV(MSG,590,2,0,0,0,0,ZERO,ZERO)
+       END IF
+       IF (PRESENT(UPPER_BANDWIDTH)) THEN
+         MU = UPPER_BANDWIDTH
+         IUSER(2) = MU
+       ELSE
+         MSG = 'In SET_OPTS you have indicated a'
+         CALL XERRDV(MSG,600,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'banded Jacobian but you have not'
+         CALL XERRDV(MSG,600,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'supplied the upper bandwidth.'
+         CALL XERRDV(MSG,600,2,0,0,0,0,ZERO,ZERO)
+       END IF
+!      Define the nonzero diagonals.
+       BNGRP = 0
+       SUBS = .FALSE.
+       SUPS = .FALSE.
+       NSUBS  = 0
+       NSUPS = 0
+       IF (PRESENT(SUB_DIAGONALS)) THEN
+         SUBS = .TRUE.
+         NSUBS = SIZE(SUB_DIAGONALS)
+         IF (NSUBS > 0) THEN
+            IF (ALLOCATED(SUBDS)) THEN
+               DEALLOCATE(SUBDS,STAT=IER)
+               CALL CHECK_STAT(IER,80)
+            END IF
+            ALLOCATE(SUBDS(NSUBS),STAT=IER)
+            CALL CHECK_STAT(IER,90)
+            SUBDS(1:NSUBS) = SUB_DIAGONALS(1:NSUBS)
+         ELSE
+            IF (ML > 0) THEN
+               MSG = 'You must indicated that the lower bandwidth'
+               CALL XERRDV(MSG,610,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'is positive but you have not specified the'
+               CALL XERRDV(MSG,610,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'indices for the lower sub diagonals.'
+               CALL XERRDV(MSG,610,2,0,0,0,0,ZERO,ZERO)
+            END IF
+         END IF
+       END IF
+       IF (PRESENT(SUP_DIAGONALS)) THEN
+         SUPS = .TRUE.
+         NSUPS = SIZE(SUP_DIAGONALS)
+         IF (NSUPS > 0) THEN
+            IF (ALLOCATED(SUPDS)) THEN
+               DEALLOCATE(SUPDS,STAT=IER)
+               CALL CHECK_STAT(IER,100)
+            END IF
+            ALLOCATE(SUPDS(NSUPS),STAT=IER)
+            CALL CHECK_STAT(IER,110)
+            SUPDS(1:NSUPS) = SUP_DIAGONALS(1:NSUPS)
+         ELSE
+            IF (ML > 0) THEN
+               MSG = 'You must indicated that the upper bandwidth'
+               CALL XERRDV(MSG,620,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'is positive but you have not specified the'
+               CALL XERRDV(MSG,620,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'indices for the upper sub diagonals.'
+               CALL XERRDV(MSG,620,2,0,0,0,0,ZERO,ZERO)
+            END IF
+         END IF
+       END IF
+     END IF
+
+!    Define the sparse Jacobian options.
+     SCALE_MATRIX = .FALSE.
+     ELBOW_ROOM = 2
+     IF (SPARSE) THEN
+!      NZSWAG for the number of nonzeros in the Jacobian.
+       IF (PRESENT(NZSWAG)) THEN
+         NZ_SWAG = MAX(NZSWAG,0)
+
+       ELSE
+         NZ_SWAG = 0
+       END IF
+!      Indicate that SET_IAJA has not yet been called successfully.
+       IAJA_CALLED = .FALSE.
+!      Check for illegal method flags.
+       IF (MOSS==2 .AND. MITER/=7) THEN
+         MSG = 'In SET_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,630,2,0,0,0,0,ZERO,ZERO)
+         END IF
+         IF (MOSS==1 .AND. MITER/=6) THEN
+           MSG = 'In SET_OPTS MOSS=1 but MITER is not 6.'
+           CALL XERRDV(MSG,640,2,0,0,0,0,ZERO,ZERO)
+         END IF
+!        IF (MOSS==0 .AND. MITER/=7) THEN
+!          MSG = 'In SET_OPTS MOSS=0 but MITER is not 7.'
+!          CALL XERRDV(MSG,650,2,0,0,0,0,ZERO,ZERO)
+!        END IF
+!        Allow the work array elbow room to be increased.
+         IF (PRESENT(MA28_ELBOW_ROOM)) THEN
+            ELBOW_ROOM = MAX(MA28_ELBOW_ROOM, ELBOW_ROOM)
+         END IF
+!      Allow MC19 scaling for the Jacobian.
+       SCALE_MATRIX = .FALSE.
+       IF (PRESENT(MC19_SCALING)) THEN
+          IF (MC19_SCALING) THEN
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!         IF (USE_MA48_FOR_SPARSE) THEN
+!            MSG = 'MC29AD scaling is not available at this time.'
+!            CALL XERRDV(MSG,660,1,0,0,0,0,ZERO,ZERO)
+!            MSG = 'Execution will continue.'
+!            CALL XERRDV(MSG,660,1,0,0,0,0,ZERO,ZERO)
+!         END IF
+!_______________________________________________________________________
+             SCALE_MATRIX = MC19_SCALING
+!            SCALE_MATRIX = .FALSE.
+          END IF
+       END IF
+
+!_______________________________________________________________________
+! *****MA48 build change point. Replace above with these statements.
+!      IF (PRESENT(MC19_SCALING)) THEN
+!         IF (MC19_SCALING) THEN
+!            IF (USE_MA48_FOR_SPARSE) THEN
+!               MSG = 'Please note that this version uses MC19AD rather'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!               MSG = 'than MC29AD to sacle the iteration matrix.'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!               MSG = 'Execution will continue.'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!            END IF
+!            SCALE_MATRIX = MC19_SCALING
+!         END IF
+!       END IF
+!_______________________________________________________________________
+
+       END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       Process the constrained solution components.
+        IF (PRESENT(CONSTRAINED)) THEN
+          NDX = SIZE(CONSTRAINED)
+          IF (NDX<1) THEN
+            MSG = 'In SET_OPTS the size of CONSTRAINED < 1.'
+            CALL XERRDV(MSG,680,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (.NOT.(PRESENT(CLOWER)) .OR. .NOT.(PRESENT(CUPPER))) THEN
+            MSG = 'In SET_OPTS the arrays CLOWER and CUPPER are'
+            CALL XERRDV(MSG,690,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'not present.'
+            CALL XERRDV(MSG,690,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (SIZE(CLOWER)/=NDX .OR. SIZE(CUPPER)/=NDX) THEN
+            MSG = 'In SET_OPTS the size of the solution bound arrays'
+            CALL XERRDV(MSG,700,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'must be the same as the CONSTRAINED array.'
+            CALL XERRDV(MSG,700,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Note: The contents of CONSTRAINED will be checked
+!         in subroutine DVODE after NEQ is known.
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,120)
+          END IF
+          ALLOCATE (IDX(NDX),LB(NDX),UB(NDX),STAT=IER)
+          CALL CHECK_STAT(IER,130)
+          IDX(1:NDX) = CONSTRAINED(1:NDX)
+          LB(1:NDX) = CLOWER(1:NDX)
+          UB(1:NDX) = CUPPER(1:NDX)
+          BOUNDS = .TRUE.
+        ELSE
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,140)
+          END IF
+          NDX = 0
+          BOUNDS = .FALSE.
+        END IF
+
+!       Is the Jacobian constant?
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!_______________________________________________________________________
+        IF (PRESENT(CONSTANT_JACOBIAN)) THEN
+           IF (CONSTANT_JACOBIAN) THEN
+              J_IS_CONSTANT = .TRUE.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+              IF (USE_MA48_FOR_SPARSE .AND. SPARSE) THEN
+                 MSG = 'The constant Jacobian option is not yet available'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'with the sparse MA48 solution option. Execution'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'will continue.'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 J_IS_CONSTANT = .FALSE.
+              END IF
+!_______________________________________________________________________
+           END IF
+        END IF
+! *****MA48 build change point. Replace above with these statements.
+!       IF (PRESENT(CONSTANT_JACOBIAN)) THEN
+!          IF (CONSTANT_JACOBIAN) THEN
+!             IF (USE_MA48_FOR_SPARSE) THEN
+!                MSG = 'The constant Jacobian option is not yet available'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!                MSG = 'with the sparse MA48 solution option. Execution'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!                MSG = 'will continue.'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!             END IF
+!          ELSE
+!             J_IS_CONSTANT = .TRUE.
+!          END IF
+!       END IF
+!_______________________________________________________________________
+        IF (J_IS_CONSTANT) THEN
+           IF (PRESENT(SAVE_JACOBIAN)) THEN
+              IF (.NOT.SAVE_JACOBIAN) THEN
+                 MSG = 'You have specified that the Jacobian is constant.'
+                 CALL XERRDV(MSG,730,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'In this case you cannot also specify that'
+                 CALL XERRDV(MSG,730,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'SAVE_JACOBIAN=.FALSE.'
+                 CALL XERRDV(MSG,730,2,0,0,0,0,ZERO,ZERO)
+              END IF
+           END IF
+           IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN .AND. SPARSE) THEN
+                 MSG = 'You have specified that the Jacobian is constant'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'and that you wish to supply an analytic Jacobian'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'for a sparse problem. In this case your request'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'to use a constant Jacobian will be ignored.'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'Execution will continue.'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+              END IF
+           END IF
+        END IF
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+!       Process the miscellaneous options.
+
+!       Don't step past TCRIT variable.
+        IF (PRESENT(TCRIT)) THEN
+          RUSER(1) = TCRIT
+        ELSE
+          RUSER(1) = ZERO
+        END IF
+
+!       DVODE optional parameters.
+        IOPT = 1
+        IF (PRESENT(MAXORD)) THEN
+          IUSER(5) = MAXORD
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXHNIL)) THEN
+          IUSER(7) = MXHNIL
+          IOPT = 1
+        END IF
+        IF (PRESENT(H0)) THEN
+          RUSER(5) = H0
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          IOPT = 1
+        END IF
+        IF (PRESENT(SETH)) THEN
+          RUSER(8) = SETH
+          IOPT = 1
+        END IF
+        IF (PRESENT(UPIVOT)) THEN
+          U_PIVOT = UPIVOT
+          IF (U_PIVOT<ZERO) U_PIVOT = ZERO
+          IF (U_PIVOT>ONE) U_PIVOT = ONE
+        ELSE
+          U_PIVOT = ONE
+        END IF
+!_______________________________________________________________________
+! *****MA48 build change point. Insert this statement.
+!       COPY_OF_U_PIVOT = U_PIVOT
+!_______________________________________________________________________
+        OPTS%IOPT = IOPT
+
+!       Define the error tolerances.
+
+!       Relative error tolerances.
+        IF (PRESENT(RELERR_VECTOR)) THEN
+          IF (MINVAL(RELERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of RELERR_VECTOR must'
+            CALL XERRDV(MSG,750,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,750,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NRE = SIZE(RELERR_VECTOR)
+        ELSE
+          NRE = 1
+        END IF
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,150)
+        IF (PRESENT(RELERR_VECTOR)) THEN
+          OPTS%RTOL = RELERR_VECTOR
+        ELSE IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,760,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_dp
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,780,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerances.
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,790,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,790,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,160)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,800,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,820,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,820,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,820,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+!            3   array    scalar  RTOL(i)*ABS(Y(i)) + ATOL
+!            4   array    array   RTOL(i)*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (PRESENT(RELERR_VECTOR)) THEN
+            OPTS%ITOL = 4
+          ELSE
+            OPTS%ITOL = 2
+          END IF
+        ELSE
+          IF (PRESENT(RELERR_VECTOR)) THEN
+            OPTS%ITOL = 3
+          ELSE
+            OPTS%ITOL = 1
+          END IF
+        END IF
+        RETURN
+
+  END FUNCTION SET_OPTS
+!_______________________________________________________________________
+
+      SUBROUTINE GET_STATS(RSTATS,ISTATS,NUMEVENTS,JROOTS)
+! ..
+! Return the user portions of the DVODE RUSER and IUSER arrays;
+! and if root finding is being done, return the JROOT vector
+! (not called by DVODE_F90).
+! ..
+! Available Integration Statistics.
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (e(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! MA28AD_CALLS      IUSER(23) The number of calls made to MA28AD
+! MA28BD_CALLS      IUSER(24) The number of calls made to MA28BD
+! MA28CD_CALLS      IUSER(25) The number of calls made to MA28CD
+! MC19AD_CALLS      IUSER(26) The number of calls made to MC19AD
+! IRNCP             IUSER(27) The number of compressions done on array JAN
+! ICNCP             IUSER(28) The number of compressions done on array ICN
+! MINIRN            IUSER(29) Minimum size for JAN array
+! MINICN            IUSER(30) Minimum size for ICN array
+! JROOTS  JROOTS    Optional array of component indices for components
+!                   having a zero at the current time
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, OPTIONAL, INTENT (IN) :: NUMEVENTS
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: RSTATS(22)
+        INTEGER, INTENT (INOUT) :: ISTATS(31)
+        INTEGER, OPTIONAL, INTENT (INOUT) :: JROOTS(:)
+! ..
+! .. Local Scalars ..
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, PRESENT, SIZE
+! ..
+!   Caution:
+!   It is assumed that the size of RSTATS is 22.
+!   It is assumed that the size of ISTATS is 31.
+!   Refer to the documentation prologue for a description
+!   the optional output contained in RUSER and IUSER.
+! ..
+! .. FIRST EXECUTABLE STATEMENT GET_STATS
+! ..
+!       Check if DVODE_F90 has been called yet.
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have called GET_STATS before'
+          CALL XERRDV(MSG,830,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling DVODE_F90 the first time.'
+          CALL XERRDV(MSG,830,1,0,0,0,0,ZERO,ZERO)
+          RETURN
+        END IF
+
+!       Check that the arrays are large enough to hold the statistics.
+!       Some compilers don't like this use of SIZE.
+!       IF (SIZE(RSTATS)<LRWUSER) THEN
+!       IF (SIZE(RSTATS)<31) THEN
+!         MSG = 'In GET_STATS, RSTATS array is too small.'
+!         CALL XERRDV(MSG,840,1,0,0,0,0,ZERO,ZERO)
+!         RETURN
+!       END IF
+!       IF (SIZE(ISTATS)<LIWUSER) THEN
+!       IF (SIZE(ISTATS)<31) THEN
+!         MSG = 'In GET_STATS, ISTATS array is too small.'
+!         CALL XERRDV(MSG,850,1,0,0,0,0,ZERO,ZERO)
+!         RETURN
+!       END IF
+
+!       Copy the statistics.
+        RSTATS(1:LRWUSER) = RUSER(1:LRWUSER)
+!       ISTATS(1:LIWUSER) = IUSER(1:LIWUSER)
+        ISTATS(1:22) = IUSER(1:22)
+        ISTATS(23) = MA28AD_CALLS
+        ISTATS(24) = MA28BD_CALLS
+        ISTATS(25) = MA28CD_CALLS
+!_______________________________________________________________________
+! *****MA48 build change point.Replace the three previous statements
+!      with these statements.
+!       IF (USE_MA48_FOR_SPARSE) THEN
+!          ISTATS(23) = MA48AD_CALLS
+!          ISTATS(24) = MA48BD_CALLS
+!          ISTATS(25) = MA48CD_CALLS
+!       ELSE
+!          ISTATS(23) = MA28AD_CALLS
+!          ISTATS(24) = MA28BD_CALLS
+!          ISTATS(25) = MA28CD_CALLS
+!       END IF
+!_______________________________________________________________________
+        ISTATS(26) = MC19AD_CALLS
+        ISTATS(27) = IRNCP
+        ISTATS(28) = ICNCP
+!       ISTATS(29) = MINIRN
+!       ISTATS(30) = MINICN
+!       ISTATS(31) = NZ_ALL
+        ISTATS(29) = MAX_MINIRN
+        ISTATS(30) = MAX_MINICN
+        ISTATS(31) = MAX_NNZ
+!       If root finding is being used return the JROOT vector.
+        IF (PRESENT(NUMEVENTS)) THEN
+          IF (PRESENT(JROOTS)) THEN
+            IF (ALLOCATED(JROOT)) THEN
+              JROOTS(1:NUMEVENTS) = JROOT(1:NUMEVENTS)
+            END IF
+          END IF
+        END IF
+        RETURN
+
+      END SUBROUTINE GET_STATS
+!_______________________________________________________________________
+
+      SUBROUTINE USERSETS_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+! ..
+! Approximate or allow the user to supply the sparse Jacobian
+! structure pointer arrays IA and JA directly for DVODE_F90
+! (not called by DVODE_F90).
+! ..
+! Used if the user wishes to supply the sparsity structure
+! directly.
+!     Caution:
+!     If it is called, USERSETS_IAJA must be called after the
+!     call to SET_OPTS.
+!     Usage:
+!     CALL (IAUSER,NIAUSER,JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!     Arguments:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+!     Results:
+!     IA(IADIM), IADIM, JA(JADIM), JAMIN, SPARSE
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NIAUSER, NJAUSER
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IAUSER(NIAUSER), JAUSER(NJAUSER)
+! ..
+! .. Local Scalars ..
+        INTEGER :: JER
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED
+! ..
+! .. FIRST EXECUTABLE STATEMENT USERSETS_IAJA
+! ..
+!       Check that SET_OPTS has been called:
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,860,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling USERSETS_IAJA.'
+          CALL XERRDV(MSG,860,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        SPARSE = .FALSE.
+        IAJA_CALLED = .FALSE.
+        IADIM = NIAUSER
+        JADIM = NJAUSER
+        IF (ALLOCATED(IA)) THEN
+          DEALLOCATE (IA,JA,STAT=JER)
+          CALL CHECK_STAT(JER,170)
+        END IF
+        ALLOCATE (IA(IADIM),JA(JADIM),STAT=JER)
+        IF (JER/=0) THEN
+          MSG = 'Check your values of NIAUSER and NJAUSER'
+          CALL XERRDV(MSG,870,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'in your call to USERSETS_IAJA.'
+          CALL XERRDV(MSG,870,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        CALL CHECK_STAT(JER,180)
+        IA(1:IADIM) = IAUSER(1:IADIM)
+        JA(1:JADIM) = JAUSER(1:JADIM)
+!       Set the flags to indicate to DVODE_F90 that IA and JA have
+!       been loaded successfully.
+        SPARSE = .TRUE.
+        IAJA_CALLED = .TRUE.
+        RETURN
+
+      END SUBROUTINE USERSETS_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+        JAUSER,NJAUSER)
+! ..
+!     Approximate or allow the user to supply the sparse Jacobian
+!     structure pointer arrays IA and JA for DVODE_F90 (not called
+!     by DVODE_F90).
+! ..
+!     Caution:
+!     If it is called, SET_IAJA must be called after the call to
+!     SET_OPTS.
+!     Usage:
+!     SET_IAJA may be called in one of two ways:
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB)
+!       In this case IA and JA will be determined using calls
+!       to your derivative routine DFN.
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+!       JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!       T, Y, FMIN, NTURB, and DTURB will be ignored (though
+!       they must be present in the argument list).
+!
+!     Arguments:
+!     DFN     = VODE derivative subroutine
+!     NEQ     = Number of odes
+!     T       = independent variable t
+!     Y       = solution y(t)
+!     FMIN    = Jacobian threshold value. Elements of the Jacobian
+!               with magnitude smaller than FMIN will be ignored.
+!               FMIN will be ignored if it is less than or equal
+!               to ZERO.
+!     NTURB   = Perturbation flag. If NTURB=1, component I of Y
+!               will be perturbed by by 1.01D0.
+!               If NTURB=NEQ, component I of Y will be perturbed
+!               by ONE + DTURB(I).
+!     DTURB   = perturbation vector of length 1 or NEQ.
+!     If these four optional parameters are present, IAUSER and JAUSER
+!     will be copied to IA and JA rather than making derivative calls
+!     to approximate IA and JA:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+!     Results:
+!     IA(IADIM), IADIM, IMIN, JA(JADIM), JAMIN, JMIN, SPARSE
+!     Allocated but free for further use by DVODE_F90:
+!     FTEMP(NEQ), FPTEMP(NEQ)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: FMIN, T
+        INTEGER, INTENT (IN) :: NEQ, NTURB
+        INTEGER, OPTIONAL, INTENT (IN) :: NIAUSER, NJAUSER
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DTURB(*), Y(NEQ)
+        INTEGER, OPTIONAL, INTENT (IN) :: IAUSER(:), JAUSER(:)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL DFN
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AIJ, DTRB, EMIN, RJ, YJ, YJSAVE, YPJ
+        INTEGER :: I, J, JER, JP1, K, MTURB
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, EPSILON, MAX, MIN, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_IAJA
+! ..
+        SPARSE = .FALSE.
+        IAJA_CALLED = .FALSE.
+        IF (NEQ<1) GOTO 30
+
+!       Check if the user is supplying the IA and JA arrays.
+        IF (PRESENT(IAUSER)) THEN
+!         If IAUSER is present, so must be NIAUSER, JAUSER,
+!         and NJAUSER.
+          IF (.NOT.(PRESENT(NIAUSER))) GOTO 30
+          IF (.NOT.(PRESENT(JAUSER))) GOTO 30
+          IF (.NOT.(PRESENT(NJAUSER))) GOTO 30
+          IF (NIAUSER<NEQ+1 .OR. NJAUSER<1) GOTO 30
+          IADIM = MIN(NIAUSER,NEQ+1)
+          IMIN = IADIM
+          JADIM = NJAUSER
+          JMIN = NJAUSER
+          IF (ALLOCATED(IA)) THEN
+            DEALLOCATE (IA,JA,FTEMP,FPTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,190)
+          END IF
+          ALLOCATE (IA(IADIM),JA(JADIM),FTEMP(NEQ),FPTEMP(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,200)
+          IA(1:IADIM) = IAUSER(1:IADIM)
+          JA(1:JADIM) = JAUSER(1:JADIM)
+          GOTO 40
+        END IF
+
+!       Determine IA and JA using derivative calls.
+
+!       Jacobian element magnitude threshold value.
+        IF (FMIN>ZERO) THEN
+          EMIN = MAX(FMIN,ZERO)
+        ELSE
+          EMIN = ZERO
+        END IF
+
+!       Solution perturbation factors.
+        IF (NTURB>0) THEN
+          IF (NTURB<1 .OR. (NTURB>1 .AND. NTURB/=NEQ)) GOTO 30
+          IF (NTURB==NEQ) THEN
+            DO I = 1, NEQ
+              DTURB(I) = MAX(DTURB(I),HUNDRETH)
+            END DO
+          ELSE
+            MTURB = 1
+            DTRB = MAX(DTURB(1),HUNDRETH)
+          END IF
+        ELSE
+          MTURB = 1
+          DTRB = HUNDRETH
+        END IF
+
+        JADIM = MIN(NEQ*NEQ,MAX(1000,NZ_SWAG))
+        ADDTOJA = MAX(1000,NZ_SWAG)
+!       Loop point for array allocation.
+10      CONTINUE
+        IF (ALLOCATED(IA)) THEN
+          DEALLOCATE (IA,JA,FTEMP,FPTEMP,STAT=JER)
+          CALL CHECK_STAT(JER,210)
+        END IF
+        IMIN = NEQ + 1
+        IADIM = NEQ + 1
+        JMIN = 0
+        JADIM = JADIM + ADDTOJA
+        IF (JADIM>MAX_ARRAY_SIZE) THEN
+          MSG = 'Maximum array size exceeded. Stopping.'
+          CALL XERRDV(MSG,880,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        ALLOCATE (IA(IADIM),JA(JADIM),FTEMP(NEQ),FPTEMP(NEQ),STAT=JER)
+        CALL CHECK_STAT(JER,220)
+
+!       f = y'(t,y).
+        CALL DFN(NEQ,T,Y,FTEMP)
+        IA(1) = 1
+        K = 1
+
+!       Calculate unit roundoff and powers of it used if JACSP
+!       is used.
+        UROUND = EPSILON(ONE)
+
+!       Successively perturb each of the solution components and
+!       calculate the corresponding derivatives.
+        DO J = 1, NEQ
+          IF (MTURB==NEQ) DTRB = DTURB(J)
+          YJ = Y(J)
+          YJSAVE = YJ
+          IF (ABS(YJ)<=ZERO) YJ = HUN*UROUND
+          YPJ = YJ*(ONE+DTRB)
+          RJ = ABS(YPJ-YJ)
+          IF (ABS(RJ)<=ZERO) RJ = HUN*UROUND
+          IF (ABS(RJ)<=ZERO) GOTO 30
+          Y(J) = YPJ
+          CALL DFN(NEQ,T,Y,FPTEMP)
+          DO 20 I = 1, NEQ
+!           Estimate the Jacobian element.
+            AIJ = ABS(FPTEMP(I)-FTEMP(I))/RJ
+            IF ((AIJ<=EMIN) .AND. (I/=J)) GOTO 20
+!           Need more storage for JA.
+            IF (K>JADIM) GOTO 10
+            JMIN = K
+            JA(K) = I
+            K = K + 1
+20        CONTINUE
+          JP1 = J + 1
+          IA(JP1) = K
+          Y(J) = YJSAVE
+        END DO
+        GOTO 40
+30      CONTINUE
+        MSG = 'An error occurred in subroutine SET_IAJA.'
+        CALL XERRDV(MSG,890,2,0,0,0,0,ZERO,ZERO)
+
+40      CONTINUE
+!       Set the flags to indicate to DVODE_F90 that IA and JA have
+!       been calculated successfully.
+        SPARSE = .TRUE.
+        IAJA_CALLED = .TRUE.
+
+!       Trim JA.
+        ALLOCATE (JATEMP(JMIN),STAT=JER)
+        CALL CHECK_STAT(JER,230)
+        JATEMP(1:JMIN) = JA(1:JMIN)
+        DEALLOCATE (JA,STAT=JER)
+        CALL CHECK_STAT(JER,240)
+        ALLOCATE (JA(JMIN),STAT=JER)
+        CALL CHECK_STAT(JER,250)
+        JA(1:JMIN) = JATEMP(1:JMIN)
+        DEALLOCATE (JATEMP,STAT=JER)
+        CALL CHECK_STAT(JER,260)
+        JADIM = JMIN
+        RETURN
+
+      END SUBROUTINE SET_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JAC,GFUN)
+! ..
+! This is the core driver (modified original DVODE.F driver).
+! ..
+! The documentation prologue was moved nearer the top of the file.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Structure Arguments ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (INOUT) :: T, TOUT
+        INTEGER, INTENT (INOUT) :: ISTATE
+        INTEGER, INTENT (IN) :: ITASK, NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: Y(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, GFUN, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ATOLI, BIG, EWTI, H0, HMAX, HMX, RH, RTOLI, SIZEST, &
+          TCRIT, TNEXT, TOLSF, TP
+        INTEGER :: I, IER, IFLAG, IMXER, IOPT, IPCUTH, IRFP, IRT, ITOL, JCO, &
+          JER, KGO, LENIW, LENJ, LENP, LENRW, LENWM, LF0, MBAND, MF, MFA, ML, &
+          MU, NG, NITER, NSLAST
+        LOGICAL :: IHIT
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! The following internal PRIVATE variable blocks contain variables which
+! are communicated between subroutines in the DVODE package, or which
+! are to be saved between calls to DVODE.
+! In each block, real variables precede integers.
+! The variables stored in the internal PRIVATE variable blocks are as
+! follows:
+! ACNRM  = Weighted r.m.s. norm of accumulated correction vectors.
+! CCMXJ  = Threshhold on DRC for updating the Jacobian. (See DRC.)
+! CONP   = The saved value of TQ(5).
+! CRATE  = Estimated corrector convergence rate constant.
+! DRC    = Relative change in H*RL1 since last DVJAC call.
+! EL     = Real array of integration coefficients. See DVSET.
+! ETA    = Saved tentative ratio of new to old H.
+! ETAMAX = Saved maximum value of ETA to be allowed.
+! H      = The step size.
+! HMIN   = The minimum absolute value of the step size H to be used.
+! HMXI   = Inverse of the maximum absolute value of H to be used.
+!          HMXI = 0.0 is allowed and corresponds to an infinite HMAX.
+! HNEW   = The step size to be attempted on the next step.
+! HSCAL  = Stepsize in scaling of YH array.
+! PRL1   = The saved value of RL1.
+! RC     = Ratio of current H*RL1 to value on last DVJAC call.
+! RL1    = The reciprocal of the coefficient EL(2).
+! TAU    = Real vector of past NQ step sizes, length 13.
+! TQ     = A real vector of length 5 in which DVSET stores constants
+!          used for the convergence test, the error test, and the
+!          selection of H at a new order.
+! TN     = The independent variable, updated on each step taken.
+! UROUND = The machine unit roundoff. The smallest positive real number
+!          such that  1.0 + UROUND /= 1.0
+! ICF    = Integer flag for convergence failure in DVNLSD:
+!            0 means no failures.
+!            1 means convergence failure with out of date Jacobian
+!                   (recoverable error).
+!            2 means convergence failure with current Jacobian or
+!                   singular matrix (unrecoverable error).
+! INIT   = Saved integer flag indicating whether initialization of the
+!          problem has been done (INIT = 1) or not.
+! IPUP   = Saved flag to signal updating of Newton matrix.
+! JCUR   = Output flag from DVJAC showing Jacobian status:
+!            JCUR = 0 means J is not current.
+!            JCUR = 1 means J is current.
+! JSTART = Integer flag used as input to DVSTEP:
+!            0  means perform the first step.
+!            1  means take a new step continuing from the last.
+!           -1  means take the next step with a new value of MAXORD,
+!               HMIN, HMXI, N, METH, MITER, and/or matrix parameters.
+!          On return, DVSTEP sets JSTART = 1.
+! JSV    = Integer flag for Jacobian saving, = sign(MF).
+! KFLAG  = A completion code from DVSTEP with the following meanings:
+!               0      the step was successful.
+!              -1      the requested error could not be achieved.
+!              -2      corrector convergence could not be achieved.
+!              -3, -4  fatal error in DVNLSD(can not occur here).
+! KUTH   = Input flag to DVSTEP showing whether H was reduced by the
+!          driver. KUTH = 1 if H was reduced, = 0 otherwise.
+! L      = Integer variable, NQ + 1, current order plus one.
+! LMAX   = MAXORD + 1 (used for dimensioning).
+! LOCJS  = A pointer to the saved Jacobian, whose storage starts at
+!          WM(LOCJS), if JSV = 1.
+! LYH    = Saved integer pointer to segments of RWORK and IWORK.
+! MAXORD = The maximum order of integration method to be allowed.
+! METH/MITER = The method flags. See MF.
+! MSBJ   = The maximum number of steps between J evaluations, = 50.
+! MXHNIL = Saved value of optional input MXHNIL.
+! MXSTEP = Saved value of optional input MXSTEP.
+! N      = The number of first-order ODEs, = NEQ.
+! NEWH   = Saved integer to flag change of H.
+! NEWQ   = The method order to be used on the next step.
+! NHNIL  = Saved counter for occurrences of T + H = T.
+! NQ     = Integer variable, the current integration method order.
+! NQNYH  = Saved value of NQ*NYH.
+! NQWAIT = A counter controlling the frequency of order changes.
+!          An order change is about to be considered if NQWAIT = 1.
+! NSLJ   = The number of steps taken as of the last Jacobian update.
+! NSLP   = Saved value of NST as of last Newton matrix update.
+! NYH    = Saved value of the initial value of NEQ.
+! HU     = The step size in t last used.
+! NCFN   = Number of nonlinear convergence failures so far.
+! NETF   = The number of error test failures of the integrator so far.
+! NFE    = The number of f evaluations for the problem so far.
+! NJE    = The number of Jacobian evaluations so far.
+! NLU    = The number of matrix LU decompositions so far.
+! NNI    = Number of nonlinear iterations so far.
+! NQU    = The method order last used.
+! NST    = The number of steps taken for the problem so far.
+! Block 0.
+! Retrieve the necessary flags from the OPTIONS structure and manage
+! the storage allocation.
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVODE
+! ..
+!       Retrieve the local flags from the options structure.
+        IOPT = OPTS%IOPT
+        ITOL = OPTS%ITOL
+        MF = OPTS%MF
+        METH = OPTS%METH
+        MITER = OPTS%MITER
+        MOSS = OPTS%MOSS
+        NG = OPTS%NG
+
+!       Allocate the necessary storage for RWORK and IWORK. (Assume that
+!       both or neither of the arrays are allocated.)
+
+!       If we are starting a new problem, deallocate the old RWORK and
+!       IWORK arrays if they were allocated in a previous call. Also
+!       manage the event residual arrays.
+
+        IF (ISTATE==1) THEN
+          IF (ALLOCATED(DTEMP)) THEN
+            DEALLOCATE (DTEMP,YTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,270)
+          END IF
+          IF (ALLOCATED(RWORK)) THEN
+            DEALLOCATE (RWORK,IWORK,ACOR,SAVF,EWT,WM,STAT=JER)
+            CALL CHECK_STAT(JER,280)
+          END IF
+          IF (ALLOCATED(JROOT)) THEN
+            DEALLOCATE (JROOT,G0,G1,GX,STAT=JER)
+            CALL CHECK_STAT(JER,290)
+          END IF
+          IF (ALLOCATED(YMAX)) THEN
+            DEALLOCATE (YMAX,STAT=JER)
+            CALL CHECK_STAT(JER,300)
+          END IF
+        END IF
+
+!       If the user has made changes and called DVODE_F90 with ISTATE=3,
+!       temporarily save the necessary portion of the Nordsieck array
+!       and then release RWORK and IWORK. Also, save the contents of
+!       the WM array and release WM. Note: ACOR, SAVF, and EWT do not
+!       need to be saved.
+
+        IF (ISTATE==3) THEN
+          IF (IOPT/=1) THEN
+            MAXORD = MORD(METH)
+          ELSE
+            MAXORD = IUSER(5)
+            IF (MAXORD<0) GOTO 520
+            IF (MAXORD==0) MAXORD = 100
+            MAXORD = MIN(MAXORD,MORD(METH))
+          END IF
+          IF (MAXORD<NQ) THEN
+!           If MAXORD is less than NQ, save column NQ+2 of YH for
+!           later use.
+            IF (ALLOCATED(YHNQP2)) THEN
+              DEALLOCATE (YHNQP2,STAT=JER)
+              CALL CHECK_STAT(JER,310)
+            END IF
+            ALLOCATE (YHNQP2(NEQ),STAT=JER)
+            CALL CHECK_STAT(JER,320)
+            CALL DCOPY_F90(NEQ,RWORK(LYH+NYH*(MAXORD+1)),1,YHNQP2,1)
+          END IF
+          LYHTEMP = MIN((PREVIOUS_MAXORD+1)*NYH+LYH-1,(MAXORD+1)*NYH+LYH-1)
+          ALLOCATE (YHTEMP(LYHTEMP),STAT=JER)
+          CALL CHECK_STAT(JER,330)
+!         Save YH.
+          YHTEMP(1:LYHTEMP) = RWORK(1:LYHTEMP)
+!         Save WM.
+          LWMTEMP = LWMDIM
+          ALLOCATE (WMTEMP(LWMTEMP),STAT=JER)
+          CALL CHECK_STAT(JER,340)
+          WMTEMP(1:LWMTEMP) = WM(1:LWMTEMP)
+          IF (ALLOCATED(DTEMP)) THEN
+             DEALLOCATE (DTEMP,YTEMP,STAT=JER)
+             CALL CHECK_STAT(JER,350)
+          END IF
+          DEALLOCATE (RWORK,IWORK,YMAX,ACOR,SAVF,EWT,WM,STAT=JER)
+          CALL CHECK_STAT(JER,360)
+        END IF
+
+!     Allocate the RWORK and WM work arrays if they haven't already
+!     been allocated in a previous call.
+!     LRW = 20 + (MAXORD + 1) * NEQ
+!     LWMDIM =     
+!            0                        for MF = 10,
+!            2 * NEQ**2               for MF = 11 or 12,
+!            NEQ**2                   for MF = -11 or -12,
+!            NEQ                      for MF = 13,
+!            (3*ML + 2*MU + 2) * NEQ  for MF = 14 or 15,
+!            (2*ML + MU + 1) * NEQ    for MF = -14 or -15,
+!            0                        for MF = 16 or 17,
+!            0                        for MF = -16 or -17,
+!            0                        for MF = 20,
+!            2 * NEQ**2               for MF = 21 or 22,
+!            NEQ**2                   for MF = -21 or -22,
+!            NEQ                      for MF = 23,
+!            (3*ML + 2*MU + 2) * NEQ  for MF = 24 or 25,
+!            (2*ML + MU + 1) * NEQ    for MF = -24 or -25,
+!            0                        for MF = 26 or 27,
+!            0                        for MF = -26 or -27.
+        IF (ALLOCATED(RWORK)) THEN
+        ELSE
+          MFA = ABS(MF)
+          IF (IOPT/=1) THEN
+            MAXORD = MORD(METH)
+          ELSE
+            MAXORD = IUSER(5)
+            IF (MAXORD<0) GOTO 520
+            IF (MAXORD==0) MAXORD = 100
+            MAXORD = MIN(MAXORD,MORD(METH))
+          END IF
+          LRW = LRWUSER + (MAXORD+1)*NEQ
+!        IF (MITER == 0) LRW = LRW - 2
+          LRW = LRW - 2
+          IF (MF==10) THEN
+            LWMDIM = 0
+          ELSE IF (MF==11 .OR. MF==12) THEN
+            LWMDIM = 2*NEQ**2
+          ELSE IF (MF==-11 .OR. MF==-12) THEN
+            LWMDIM = NEQ**2
+          ELSE IF (MF==13) THEN
+            LWMDIM = NEQ
+          ELSE IF (MF==14 .OR. MF==15) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (3*ML+2*MU+2)*NEQ
+          ELSE IF (MF==-14 .OR. MF==-15) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (2*ML+MU+1)*NEQ
+          ELSE IF (MF==16 .OR. MF==17) THEN
+            LWMDIM = 0
+          ELSE IF (MF==-16 .OR. MF==-17) THEN
+            LWMDIM = 0
+          ELSE IF (MF==20) THEN
+            LWMDIM = 0
+          ELSE IF (MF==21 .OR. MF==22) THEN
+            LWMDIM = 2*NEQ**2
+          ELSE IF (MF==-21 .OR. MF==-22) THEN
+            LWMDIM = NEQ**2
+          ELSE IF (MF==23) THEN
+            LWMDIM = NEQ
+          ELSE IF (MF==24 .OR. MF==25) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (3*ML+2*MU+2)*NEQ
+          ELSE IF (MF==-24 .OR. MF==-25) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (2*ML+MU+1)*NEQ
+          ELSE IF (MF==26 .OR. MF==27) THEN
+            LWMDIM = 0
+          ELSE IF (MF==-26 .OR. MF==-27) THEN
+            LWMDIM = 0
+          END IF
+!         LWMDIM = LWMDIM + 2
+          ALLOCATE (RWORK(LRW),WM(LWMDIM),STAT=JER)
+          CALL CHECK_STAT(JER,370)
+          RWORK(1:LRW) = ZERO
+          WM(1:LWMDIM) = ZERO
+          IF (.NOT.ALLOCATED(DTEMP)) THEN
+             ALLOCATE (DTEMP(NEQ),YTEMP(NEQ),STAT=JER)
+             CALL CHECK_STAT(JER,380)
+          END IF
+          ALLOCATE (ACOR(NEQ),SAVF(NEQ),EWT(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,390)
+!         If necessary, reload the saved portion of the Nordsieck
+!         array and the WM array, saved above.
+          IF (ISTATE==3) THEN
+            RWORK(1:LYHTEMP) = YHTEMP(1:LYHTEMP)
+            I = MIN(LWMTEMP,LWMDIM)
+!           WM(1:LWMTEMP) = WMTEMP(1:LWMTEMP)
+            WM(1:I) = WMTEMP(1:I)
+            DEALLOCATE (YHTEMP,WMTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,400)
+          END IF
+          RWORK(1:LRWUSER) = RUSER(1:LRWUSER)
+!         IUSER: = LIWUSER if MITER = 0 or 3 (MF = 10, 13, 20, 23)
+!                = LIWUSER + NEQ otherwise
+!                  (ABS(MF) = 11,12,14,15,16,17,21,22,24,25,26,27).
+          LIW = LIWUSER + NEQ
+          IF (MITER==0 .OR. MITER==3) LIW = LIWUSER
+          ALLOCATE (IWORK(LIW),STAT=JER)
+          CALL CHECK_STAT(JER,410)
+          IWORK(1:LIWUSER) = IUSER(1:LIWUSER)
+!         Allocate the YMAX vector.
+          ALLOCATE (YMAX(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,420)
+        END IF
+!       Allocate the event arrays if they haven't already been allocated
+!       in a previous call.
+        IF (ALLOCATED(JROOT)) THEN
+        ELSE
+          IF (NG>0) THEN
+            ALLOCATE (JROOT(NG),G0(NG),G1(NG),GX(NG),STAT=JER)
+            CALL CHECK_STAT(JER,430)
+          END IF
+        END IF
+
+! Block A.
+! This code block is executed on every call. It tests ISTATE and
+! ITASK for legality and branches appropriately.
+! If ISTATE > 1 but the flag INIT shows that initialization has
+! not yet been done, an error return occurs.
+! If ISTATE = 1 and TOUT = T, return immediately.
+! The user portion of RWORK and IWORK are reloaded since something
+! may have changed since the previous visit.
+
+        RWORK(1:LRWUSER) = RUSER(1:LRWUSER)
+        IWORK(1:LIWUSER) = IUSER(1:LIWUSER)
+        IF (ISTATE<1 .OR. ISTATE>3) GOTO 420
+        IF (ITASK<1 .OR. ITASK>5) GOTO 430
+        ITASKC = ITASK
+        IF (ISTATE==1) GOTO 10
+        IF (INIT/=1) GOTO 440
+        IF (ISTATE==2) GOTO 130
+        GOTO 20
+10      INIT = 0
+        IF (ABS(TOUT-T)<=ZERO) THEN
+          RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+          IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+          RETURN
+        END IF
+
+! Block B.
+! The next code block is executed for the initial call (ISTATE = 1),
+! or for a continuation call with parameter changes (ISTATE = 3).
+! It contains checking of all input and various initializations.
+
+!       First check legality of the non-optional input NEQ, ITOL, IOPT,
+!       MF, ML, and MU.
+
+20      IF (NEQ<=0) GOTO 450
+        IF (ISTATE==1) GOTO 30
+        IF (NEQ>N) GOTO 460
+        IF (NEQ/=N) GOTO 465
+30      N = NEQ
+        IF (ITOL<1 .OR. ITOL>4) GOTO 470
+        IF (IOPT<0 .OR. IOPT>1) GOTO 480
+        JSV = SIGN(1,MF)
+        INEWJ = (1-JSV)/2
+        MFA = ABS(MF)
+        METH = MFA/10
+        MITER = MFA - 10*METH
+        IF (METH<1 .OR. METH>2) GOTO 490
+        IF (MITER<0 .OR. MITER>7) GOTO 490
+        IF (MITER<=3) GOTO 40
+        IF (MITER<=5) THEN
+          ML = IWORK(1)
+          MU = IWORK(2)
+          IF (ML<0 .OR. ML>=N) GOTO 500
+          IF (MU<0 .OR. MU>=N) GOTO 510
+        END IF
+40      CONTINUE
+        IF (NG<0) GOTO 700
+        IF (ISTATE==1) GOTO 50
+        IF (IRFND==0 .AND. NG/=NGC) GOTO 710
+50      NGC = NG
+!       Next process and check the optional input.
+        IF (IOPT==1) GOTO 60
+        MAXORD = MORD(METH)
+        MXSTEP = MXSTP0
+        MXHNIL = MXHNL0
+        IF (ISTATE==1) H0 = ZERO
+        HMXI = ZERO
+        HMIN = ZERO
+        GOTO 80
+60      MAXORD = IWORK(5)
+        IF (MAXORD<0) GOTO 520
+        IF (MAXORD==0) MAXORD = 100
+        MAXORD = MIN(MAXORD,MORD(METH))
+        MXSTEP = IWORK(6)
+        IF (MXSTEP<0) GOTO 530
+        IF (MXSTEP==0) MXSTEP = MXSTP0
+        MXHNIL = IWORK(7)
+        IF (MXHNIL<0) GOTO 540
+        IF (MXHNIL==0) MXHNIL = MXHNL0
+        IF (ISTATE/=1) GOTO 70
+        H0 = RWORK(5)
+        IF ((TOUT-T)*H0<ZERO) GOTO 550
+70      HMAX = RWORK(6)
+        IF (HMAX<ZERO) GOTO 560
+        HMXI = ZERO
+        IF (HMAX>ZERO) HMXI = ONE/HMAX
+        HMIN = RWORK(7)
+        IF (HMIN<ZERO) GOTO 570
+        SETH = RWORK(8)
+        IF (SETH<ZERO) GOTO 690
+!       Check the nonnegativity information.
+        IF (BOUNDS) THEN
+          IF (NDX<1 .OR. NDX>NEQ) THEN
+            MSG = 'The size of the CONSTRAINED vector'
+            CALL XERRDV(MSG,900,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'must be between 1 and NEQ.'
+            CALL XERRDV(MSG,900,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DO I = 1, NDX
+            IF (IDX(I)<1 .OR. IDX(I)>N) THEN
+              MSG = 'Each component of THE CONSTRAINED'
+              CALL XERRDV(MSG,910,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'vector must be between 1 and N.'
+              CALL XERRDV(MSG,910,2,0,0,0,0,ZERO,ZERO)
+            END IF
+          END DO
+        END IF
+!       Check the sub diagonal and super diagonal arrays.
+        IF (MITER==4 .OR. MITER==5) THEN
+           IF (SUBS) THEN
+              DO I = 1, NSUBS
+                 IF (SUBDS(I) < 2 .OR. SUBDS(I) > ML+1) THEN
+                    MSG = 'Each element of SUB_DIAGONALS'
+                    CALL XERRDV(MSG,920,1,0,0,0,0,ZERO,ZERO)
+                    MSG = 'must be between 2 and ML + 1.'
+                    CALL XERRDV(MSG,920,2,0,0,0,0,ZERO,ZERO)
+                 END IF
+              END DO
+           END IF
+           IF (SUPS) THEN
+              DO I = 1, NSUPS
+                 IF (SUPDS(I) < 2 .OR. SUPDS(I) > MU + 1) THEN
+                    MSG = 'Each element of SUP_DIAGONALS'
+                    CALL XERRDV(MSG,930,1,0,0,0,0,ZERO,ZERO)
+                    MSG = 'must be between 2 and MU + 1.'
+                    CALL XERRDV(MSG,930,2,0,0,0,0,ZERO,ZERO)
+                 END IF
+              END DO
+           END IF
+!          Compute the banded column grouping.
+           IF (SUBS .OR. SUPS) THEN
+             CALL BGROUP(N,EWT,ACOR,YMAX,ML,MU)
+             BUILD_IAJA = .FALSE.
+             BUILD_IAJA = .TRUE.
+             IF (BUILD_IAJA) THEN
+                CALL BANDED_IAJA(N,ML,MU)
+                NZB = IAB(N+1) - 1
+             END IF
+           END IF
+        END IF
+
+        IF ((MITER==2 .OR. MITER==5) .AND. USE_JACSP) THEN
+!         Allocate the arrays needed by DVJAC/JACSPD.
+          IF (ALLOCATED(INDROWDS)) THEN
+             DEALLOCATE (INDROWDS, INDCOLDS, NGRPDS, IPNTRDS, JPNTRDS, &
+               IWADS, IWKDS, IOPTDS, YSCALEDS, WKDS, FACDS)
+             CALL CHECK_STAT(IER,440)
+          END IF
+          ALLOCATE (INDROWDS(1), INDCOLDS(1), NGRPDS(1), IPNTRDS(1),   &
+            JPNTRDS(1), IWADS(1), IWKDS(50+N), IOPTDS(5), YSCALEDS(N), &
+            WKDS(3*N), FACDS(N), STAT=IER)
+          CALL CHECK_STAT(IER,450)
+!         For use in DVJAC:
+          IOPTDS(4) = 0
+        END IF
+
+! Set work array pointers and check lengths LRW and LIW. Pointers
+! to segments of RWORK and IWORK are named by prefixing L to the
+! name of the segment. e.g., the segment YH starts at RWORK(LYH).
+! Within WM, LOCJS is the location of the saved Jacobian (JSV > 0).
+
+80      LYH = 21
+        IF (ISTATE==1) NYH = N
+        LENRW = LYH + (MAXORD+1)*NYH - 1
+        IWORK(17) = LENRW
+        IF (LENRW>LRW) GOTO 580
+        IF (LENRW/=LRW) GOTO 580
+        LWM = 1
+!       Save MAXORD in case the calling program calls with ISTATE=3.
+        PREVIOUS_MAXORD = MAXORD
+        JCO = MAX(0,JSV)
+!       IF (MITER==0) LENWM = 2
+        IF (MITER==0) LENWM = 0
+        IF (MITER==1 .OR. MITER==2) THEN
+!         LENWM = 2 + (1+JCO)*N*N
+!         LOCJS = N*N + 3
+          LENWM = (1+JCO)*N*N
+          LOCJS = N*N + 1
+        END IF
+!       IF (MITER==3) LENWM = N + 2
+        IF (MITER==3) LENWM = N
+        IF (MITER==4 .OR. MITER==5) THEN
+          MBAND = ML + MU + 1
+          LENP = (MBAND+ML)*N
+          LENJ = MBAND*N
+!         LENWM = 2 + LENP + JCO*LENJ
+!         LOCJS = LENP + 3
+          LENWM = LENP + JCO*LENJ
+          LOCJS = LENP + 1
+        END IF
+        IF (MITER==6 .OR. MITER==7) THEN
+!         LENWM = 2
+          LENWM = 0
+        END IF
+        IF (LENWM>LWMDIM) GOTO 730
+        IF (LENWM/=LWMDIM) GOTO 730
+        LIWM = 1
+        LENIW = 30 + N
+        IF (MITER==0 .OR. MITER==3) LENIW = 30
+        IWORK(18) = LENIW
+        IF (LENIW>LIW) GOTO 590
+!       Check RTOL and ATOL for legality.
+        RTOLI = OPTS%RTOL(1)
+        ATOLI = OPTS%ATOL(1)
+        DO I = 1, N
+          IF (ITOL>=3) RTOLI = OPTS%RTOL(I)
+          IF (ITOL==2 .OR. ITOL==4) ATOLI = OPTS%ATOL(I)
+          IF (RTOLI<ZERO) GOTO 600
+          IF (ATOLI<ZERO) GOTO 610
+        END DO
+        IF (ISTATE==1) GOTO 100
+!       If ISTATE = 3, set flag to signal parameter changes to DVSTEP.
+        JSTART = -1
+        IF (NQ<=MAXORD) GOTO 90
+!       MAXORD was reduced below NQ. Copy YH(*,MAXORD+2) into SAVF.
+!       YH(*,MAXORD+2) was copied to the YHNQP2 array at the
+!       beginning of DVODE when the ISTATE=3 call was made.
+        CALL DCOPY_F90(N,YHNQP2,1,SAVF,1)
+!       Reload WM1 since LWM may have changed.
+90      IF (MITER>0) WM1 = SQRT(UROUND)
+!       ISTATC controls the determination of the sparsity arrays
+!       if the sparse solution option is used.
+        ISTATC = ISTATE
+        GOTO 130
+
+! Block C.
+! The next block is for the initial call only (ISTATE = 1).
+! It contains all remaining initializations, the initial call to F,
+! and the calculation of the initial step size.
+! The error weights in EWT are inverted after being loaded.
+
+100     UROUND = EPSILON(ONE)
+        U125 = UROUND ** 0.125_dp
+        U325 = UROUND ** 0.325_dp
+!       ISTATC controls the determination of the sparsity arrays if
+!       the sparse solution option is used.
+        ISTATC = ISTATE
+        TN = T
+        IF (ITASK/=4 .AND. ITASK/=5) GOTO 110
+        TCRIT = RWORK(1)
+        IF ((TCRIT-TOUT)*(TOUT-T)<ZERO) GOTO 660
+        IF (ABS(H0)>ZERO .AND. (T+H0-TCRIT)*H0>ZERO) H0 = TCRIT - T
+110     JSTART = 0
+        IF (MITER>0) WM1 = SQRT(UROUND)
+        CCMXJ = PT2
+        MSBJ = 50
+        MSBG = 75
+        NHNIL = 0
+        NST = 0
+        NJE = 0
+        NNI = 0
+        NCFN = 0
+        NETF = 0
+        NLU = 0
+        NSLJ = 0
+        NSLAST = 0
+        HU = ZERO
+        NQU = 0
+        MB28 = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert this statement.
+!       MB48 = 0
+!_______________________________________________________________________
+        NSLG = 0
+        NGE = 0
+!       Initial call to F. (LF0 points to YH(*,2).)
+        LF0 = LYH + NYH
+        CALL F(N,T,Y,RWORK(LF0))
+        NFE = 1
+!       Load the initial value vector in YH.
+        CALL DCOPY_F90(N,Y,1,RWORK(LYH),1)
+!       Load and invert the EWT array. (H is temporarily set to 1.0.)
+        NQ = 1
+        H = ONE
+        CALL DEWSET(N,ITOL,OPTS%RTOL,OPTS%ATOL,RWORK(LYH),EWT)
+        DO I = 1, N
+          IF (EWT(I)<=ZERO) GOTO 620
+          EWT(I) = ONE/EWT(I)
+        END DO
+        NNZ = 0
+        NGP = 0
+        IF (OPTS%SPARSE) THEN
+          ISTATC = ISTATE
+        END IF
+        IF (ABS(H0)>ZERO) GOTO 120
+!       Call DVHIN to set initial step size H0 to be attempted.
+        CALL DVHIN(N,T,RWORK(LYH),RWORK(LF0),F,TOUT,EWT,ITOL,OPTS%ATOL,Y,ACOR, &
+          H0,NITER,IER)
+        NFE = NFE + NITER
+        IF (IER/=0) GOTO 630
+!       Adjust H0 if necessary to meet HMAX bound.
+120     RH = ABS(H0)*HMXI
+        IF (RH>ONE) H0 = H0/RH
+!       Load H with H0 and scale YH(*,2) by H0.
+        H = H0
+        CALL DSCAL_F90(N,H0,RWORK(LF0),1)
+!       GOTO 270
+!       Check for a zero of g at T.
+        IRFND = 0
+        TOUTC = TOUT
+        IF (NGC==0) GOTO 210
+        CALL DVCHECK(1,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT==0) GOTO 210
+        GOTO 720
+
+! Block D.
+! The next code block is for continuation calls only (ISTATE = 2 or 3)
+! and is to check stop conditions before taking a step.
+
+130     NSLAST = NST
+        IRFP = IRFND
+        IF (NGC==0) GOTO 140
+        IF (ITASK==1 .OR. ITASK==4) TOUTC = TOUT
+        CALL DVCHECK(2,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT/=1) GOTO 140
+        IRFND = 1
+        ISTATE = 3
+        T = T0ST
+        GOTO 330
+140     CONTINUE
+        IRFND = 0
+        IF (IRFP==1 .AND. (ABS(TLAST-TN)>ZERO) .AND. ITASK==2) GOTO 310
+        KUTH = 0
+        GOTO (150,200,160,170,180) ITASK
+150     IF ((TN-TOUT)*H<ZERO) GOTO 200
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (IFLAG/=0) GOTO 680
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+160     TP = TN - HU*(ONE+HUN*UROUND)
+        IF ((TP-TOUT)*H>ZERO) GOTO 640
+        IF ((TN-TOUT)*H<ZERO) GOTO 200
+        GOTO 310
+170     TCRIT = RWORK(1)
+        IF ((TN-TCRIT)*H>ZERO) GOTO 650
+        IF ((TCRIT-TOUT)*H<ZERO) GOTO 660
+        IF ((TN-TOUT)*H<ZERO) GOTO 190
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (IFLAG/=0) GOTO 680
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+180     TCRIT = RWORK(1)
+        IF ((TN-TCRIT)*H>ZERO) GOTO 650
+190     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+        IF (IHIT) GOTO 310
+        TNEXT = TN + HNEW*(ONE+FOUR*UROUND)
+        IF ((TNEXT-TCRIT)*H<=ZERO) GOTO 200
+        H = (TCRIT-TN)*(ONE-FOUR*UROUND)
+        KUTH = 1
+
+! Block E.
+! The next block is normally executed for all calls and contains
+! the call to the one-step core integrator DVSTEP. This is a
+! looping point for the integration steps.
+! First check for too many steps being taken, update EWT(if not
+! at start of problem), check for too much accuracy being
+! requested, and check for H below the roundoff level in T.
+
+200     CONTINUE
+        IF ((NST-NSLAST)>=MXSTEP) GOTO 340
+        CALL DEWSET(N,ITOL,OPTS%RTOL,OPTS%ATOL,RWORK(LYH),EWT)
+        DO I = 1, N
+          IF (EWT(I)<=ZERO) GOTO 350
+          EWT(I) = ONE/EWT(I)
+        END DO
+210     TOLSF = UROUND*DVNORM(N,RWORK(LYH),EWT)
+        IPCUTH = -1
+        IF (TOLSF<=ONE) GOTO 220
+        TOLSF = TOLSF*TWO
+        IF (NST==0) GOTO 670
+        GOTO 360
+220     CONTINUE
+        IPCUTH = IPCUTH + 1
+        IF (IPCUTH>=IPCUTH_MAX) THEN
+          MSG = 'Too many step reductions to prevent'
+          CALL XERRDV(MSG,940,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'an infeasible prediction.'
+          CALL XERRDV(MSG,940,1,0,0,0,0,ZERO,ZERO)
+!         Retract the solution to TN:
+          CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+          ACOR(1:N) = ZERO
+          ISTATE = -7
+          GOTO 410
+        END IF
+        IF (ABS((TN+H)-TN)>ZERO) GOTO 230
+        NHNIL = NHNIL + 1
+        IF (NHNIL>MXHNIL) GOTO 230
+        MSG = 'Warning: internal T(=R1) and H(=R2) are such that'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'in the machine, T + H = T on the next step.'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = '(H = step size). The solver will continue anyway.'
+        CALL XERRDV(MSG,950,1,0,0,0,2,TN,H)
+        IF (NHNIL<MXHNIL) GOTO 230
+        MSG = 'The above warning has been issued I1 times.'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'It will not be issued again for this problem.'
+        CALL XERRDV(MSG,950,1,1,MXHNIL,0,0,ZERO,ZERO)
+230     CONTINUE
+        IF (BOUNDS) THEN
+!         Check positive components for infeasible prediction; reduce 
+!         step size if infeasible prediction will occur in DVNLSD.
+          ACOR(1:N) = RWORK(LYH:LYH+N-1)
+!         Predict:
+          CALL DVNRDP(RWORK(LYH:LRW),NYH,N,NQ)
+          DO I = 1, NDX
+            IF ((ACOR(IDX(I))>LB(I) .AND. RWORK(LYH+ &
+                IDX(I)-1)<LB(I)) .OR. (ACOR(IDX(I))<UB(I) .AND. RWORK(LYH+ &
+                IDX(I)-1)>UB(I))) THEN
+!              Retract:
+              CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+              H = HALF*H
+              ETA = HALF
+!              Rescale:
+              CALL DVNRDS(RWORK(LYH),NYH,N,L,ETA)
+              GOTO 220
+            END IF
+          END DO
+!         Retract:
+          CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+          ACOR(1:N) = ZERO
+        END IF
+
+!       CALL DVSTEP(Y,YH,LDYH,YH1,EWT,SAVF,ACOR,WM,IWM,F,JAC, &
+!         VNLS,OPTS%ATOL,ITOL)
+!_______________________________________________________________________
+
+        IF (MITER/=6 .AND. MITER/=7) THEN
+          CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+            IWORK(LIWM),F,JAC,DVNLSD,OPTS%ATOL,ITOL)
+        ELSE
+          CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+            IWORK(LIWM),F,JAC,DVNLSS28,OPTS%ATOL,ITOL)
+        END IF
+! *****MA48 build change point. Replace above with these statements.
+!     IF (MITER /= 6 .AND. MITER /= 7) THEN
+!        CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!          IWORK(LIWM),F,JAC,DVNLSD,OPTS%ATOL,ITOL)
+!     ELSE
+!        IF (USE_MA48_FOR_SPARSE) THEN
+!           CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!             IWORK(LIWM), F, JAC, DVNLSS48,OPTS%ATOL,ITOL)
+!        ELSE
+!           CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!           IWORK(LIWM),F,JAC,DVNLSS28,OPTS%ATOL,ITOL)
+!        END IF
+!     END IF
+!_______________________________________________________________________
+
+        KGO = 1 - KFLAG
+!       Branch on KFLAG. Note: In this version, KFLAG can not be set to
+!                            -3; KFLAG = 0, -1, -2.
+        GOTO (240,370,380) KGO
+
+! Block F.
+! The following block handles the case of a successful return from the
+! core integrator (KFLAG = 0). Test for stop conditions.
+
+240     INIT = 1
+        KUTH = 0
+        GOTO (250,310,270,280,300) ITASK
+!       ITASK = 1. If TOUT has been reached, interpolate.
+250     CONTINUE
+        IF (NGC==0) GOTO 260
+        CALL DVCHECK(3,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT/=1) GOTO 260
+        IRFND = 1
+        ISTATE = 3
+        T = T0ST
+        GOTO 330
+260     CONTINUE
+        IF ((TN-TOUT)*H<ZERO) GOTO 200
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+!       ITASK = 3. Jump to exit if TOUT was reached.
+270     IF ((TN-TOUT)*H>=ZERO) GOTO 310
+        GOTO 200
+!       ITASK = 4. See if TOUT or TCRIT was reached. Adjust H if necessary.
+280     IF ((TN-TOUT)*H<ZERO) GOTO 290
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+290     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+        IF (IHIT) GOTO 310
+        TNEXT = TN + HNEW*(ONE+FOUR*UROUND)
+        IF ((TNEXT-TCRIT)*H<=ZERO) GOTO 200
+        H = (TCRIT-TN)*(ONE-FOUR*UROUND)
+        KUTH = 1
+        GOTO 200
+!       ITASK = 5. See if TCRIT was reached and jump to exit.
+300     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+
+! Block G.
+! The following block handles all successful returns from DVODE.
+! If ITASK /= 1, Y is loaded from YH and T is set accordingly.
+! ISTATE is set to 2, and the optional output is loaded into the
+! work arrays before returning.
+
+310     CONTINUE
+        CALL DCOPY_F90(N,RWORK(LYH),1,Y,1)
+        T = TN
+        IF (ITASK/=4 .AND. ITASK/=5) GOTO 320
+        IF (IHIT) T = TCRIT
+320     ISTATE = 2
+330     CONTINUE
+        RWORK(11) = HU
+        RWORK(12) = HNEW
+        RWORK(13) = TN
+        IWORK(10) = NGE
+        IWORK(11) = NST
+        IWORK(12) = NFE
+        IWORK(13) = NJE
+        IWORK(14) = NQU
+        IWORK(15) = NEWQ
+        IWORK(19) = NLU
+        IWORK(20) = NNI
+        IWORK(21) = NCFN
+        IWORK(22) = NETF
+        TLAST = T
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+!       Warn the user if |y(t)| < ATOL:
+        IF (ISTATE==2 .OR. ISTATE==3) THEN
+          IF (YMAXWARN) THEN
+            ATOLI = OPTS%ATOL(1)
+            DO I = 1, N
+              IF (ITOL==2 .OR. ITOL==4) ATOLI = OPTS%ATOL(I)
+              IF (ABS(Y(I))<ATOLI) THEN
+                MSG = 'Warning: Component I1 of the solution is'
+                CALL XERRDV(MSG,960,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'smaller in magnitude than component I1'
+                CALL XERRDV(MSG,960,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'of the absolute error tolerance vector.'
+                CALL XERRDV(MSG,960,1,1,I,0,0,ZERO,ZERO)
+              END IF
+            END DO
+          END IF
+        END IF
+        RETURN
+
+! Block H.
+! The following block handles all unsuccessful returns other than
+! those for illegal input. First the error message routine is called.
+! if there was an error test or convergence test failure, IMXER is set.
+! Then Y is loaded from YH, and T is set to TN. The optional output
+! is loaded into the work arrays before returning.
+
+!       The maximum number of steps was taken before reaching TOUT.
+340     MSG = 'At current T(=R1), MXSTEP(=I1) steps'
+        CALL XERRDV(MSG,970,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'taken on this call before reaching TOUT.'
+        CALL XERRDV(MSG,970,1,1,MXSTEP,0,1,TN,ZERO)
+        ISTATE = -1
+        GOTO 410
+!       EWT(i) <= 0.0 for some i (not at start of problem).
+350     EWTI = EWT(I)
+        MSG = 'At T(=R1), EWT(I1) has become R2 <= 0.'
+        CALL XERRDV(MSG,980,1,1,I,0,2,TN,EWTI)
+        ISTATE = -6
+        GOTO 410
+!       Too much accuracy requested for machine precision.
+360     MSG = 'At T(=R1), too much accuracy was requested'
+        CALL XERRDV(MSG,990,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'for precision of machine:   see TOLSF(=R2).'
+        CALL XERRDV(MSG,990,1,0,0,0,2,TN,TOLSF)
+        RWORK(14) = TOLSF
+        ISTATE = -2
+        GOTO 410
+!       KFLAG = -1. Error test failed repeatedly or with ABS(H) = HMIN.
+370     MSG = 'At T(=R1) and step size H(=R2), the error'
+        CALL XERRDV(MSG,1000,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'test failed repeatedly or with ABS(H) = HMIN.'
+        CALL XERRDV(MSG,1000,1,0,0,0,2,TN,H)
+        ISTATE = -4
+        GOTO 390
+!       KFLAG = -2. Convergence failed repeatedly or with ABS(H) = HMIN.
+380     MSG = 'At T(=R1) and step size H(=R2), the'
+        CALL XERRDV(MSG,1010,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'corrector convergence failed repeatedly'
+        CALL XERRDV(MSG,1010,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'or with ABS(H) = HMIN.'
+        CALL XERRDV(MSG,1010,1,0,0,0,2,TN,H)
+        ISTATE = -5
+!       Compute IMXER if relevant.
+390     BIG = ZERO
+        IMXER = 1
+        DO 400 I = 1, N
+          SIZEST = ABS(ACOR(I)*EWT(I))
+          IF (BIG>=SIZEST) GOTO 400
+          BIG = SIZEST
+          IMXER = I
+400     END DO
+        IWORK(16) = IMXER
+!       Set Y vector, T, and optional output.
+410     CONTINUE
+        CALL DCOPY_F90(N,RWORK(LYH),1,Y,1)
+        T = TN
+        RWORK(11) = HU
+        RWORK(12) = H
+        RWORK(13) = TN
+        IWORK(10) = NGE
+        IWORK(11) = NST
+        IWORK(12) = NFE
+        IWORK(13) = NJE
+        IWORK(14) = NQU
+        IWORK(15) = NQ
+        IWORK(19) = NLU
+        IWORK(20) = NNI
+        IWORK(21) = NCFN
+        IWORK(22) = NETF
+        TLAST = T
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+! Block I.
+! The following block handles all error returns due to illegal input
+! (ISTATE = -3), as detected before calling the core integrator.
+! First the error message routine is called. If the illegal input
+! is a negative ISTATE, the run is aborted (apparent infinite loop).
+
+420     MSG = 'ISTATE(=I1) is illegal.'
+        CALL XERRDV(MSG,1020,1,1,ISTATE,0,0,ZERO,ZERO)
+        IF (ISTATE<0) GOTO 750
+        GOTO 740
+430     MSG = 'ITASK(=I1) is illegal.'
+        CALL XERRDV(MSG,1030,1,1,ITASK,0,0,ZERO,ZERO)
+        GOTO 740
+440     MSG = 'ISTATE(=I1) > 1 but DVODE is not initialized.'
+        CALL XERRDV(MSG,1040,1,1,ISTATE,0,0,ZERO,ZERO)
+        GOTO 740
+450     MSG = 'NEQ (=I1) < 1.'
+        CALL XERRDV(MSG,1050,1,1,NEQ,0,0,ZERO,ZERO)
+        GOTO 740
+460     MSG = 'ISTATE = 3 and NEQ increased (I1 to I2).'
+        CALL XERRDV(MSG,1060,1,2,N,NEQ,0,ZERO,ZERO)
+        GOTO 740
+465     MSG = 'This version of DVODE requires does not allow NEQ to be reduced.'
+        CALL XERRDV(MSG,1070,2,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+470     MSG = 'ITOL(=I1) is illegal.'
+        CALL XERRDV(MSG,1080,1,1,ITOL,0,0,ZERO,ZERO)
+        GOTO 740
+480     MSG = 'IOPT(=I1) is illegal.'
+        CALL XERRDV(MSG,1090,1,1,IOPT,0,0,ZERO,ZERO)
+        GOTO 740
+490     MSG = 'MF(=I1) is illegal.'
+        CALL XERRDV(MSG,1100,1,1,MF,0,0,ZERO,ZERO)
+        GOTO 740
+500     MSG = 'ML(=I1) illegal: < 0 or >= NEQ (=I2)'
+        CALL XERRDV(MSG,1110,1,2,ML,NEQ,0,ZERO,ZERO)
+        GOTO 740
+510     MSG = 'MU(=I1) illegal: < 0 or >= NEQ (=I2)'
+        CALL XERRDV(MSG,1120,1,2,MU,NEQ,0,ZERO,ZERO)
+        GOTO 740
+520     MSG = 'MAXORD(=I1) < 0.'
+        CALL XERRDV(MSG,1130,1,1,MAXORD,0,0,ZERO,ZERO)
+        GOTO 740
+530     MSG = 'MXSTEP(=I1) < 0.'
+        CALL XERRDV(MSG,1140,1,1,MXSTEP,0,0,ZERO,ZERO)
+        GOTO 740
+540     MSG = 'MXHNIL(=I1) < 0.'
+        CALL XERRDV(MSG,1150,1,1,MXHNIL,0,0,ZERO,ZERO)
+        GOTO 740
+550     MSG = 'TOUT(=R1) is behind T(=R2).'
+        CALL XERRDV(MSG,1160,1,0,0,0,2,TOUT,T)
+        MSG = 'The integration direction is given by H0 (=R1).'
+        CALL XERRDV(MSG,1160,1,0,0,0,1,H0,ZERO)
+        GOTO 740
+560     MSG = 'HMAX(=R1) < 0.'
+        CALL XERRDV(MSG,1170,1,0,0,0,1,HMAX,ZERO)
+        GOTO 740
+570     MSG = 'HMIN(=R1) < 0.'
+        CALL XERRDV(MSG,1180,1,0,0,0,1,HMIN,ZERO)
+        GOTO 740
+580     CONTINUE
+        MSG = 'RWORK length needed, LENRW(=I1) > LRW(=I2)'
+        CALL XERRDV(MSG,1190,1,2,LENRW,LRW,0,ZERO,ZERO)
+        GOTO 740
+590     CONTINUE
+        MSG = 'IWORK length needed, LENIW(=I1) > LIW(=I2)'
+        CALL XERRDV(MSG,1200,1,2,LENIW,LIW,0,ZERO,ZERO)
+        GOTO 740
+600     MSG = 'RTOL(I1) is R1 < 0.'
+        CALL XERRDV(MSG,1210,1,1,I,0,1,RTOLI,ZERO)
+        GOTO 740
+610     MSG = 'ATOL(I1) is R1 < 0.'
+        CALL XERRDV(MSG,1220,1,1,I,0,1,ATOLI,ZERO)
+        GOTO 740
+620     EWTI = EWT(I)
+        MSG = 'EWT(I1) is R1 <= 0.'
+        CALL XERRDV(MSG,1230,1,1,I,0,1,EWTI,ZERO)
+        GOTO 740
+630     CONTINUE
+        MSG = 'TOUT(=R1) too close to T(=R2) to start.'
+        CALL XERRDV(MSG,1240,1,0,0,0,2,TOUT,T)
+        GOTO 740
+640     CONTINUE
+        MSG = 'ITASK = I1 and TOUT(=R1) < TCUR - HU(=R2).'
+        CALL XERRDV(MSG,1250,1,1,ITASK,0,2,TOUT,TP)
+        GOTO 740
+650     CONTINUE
+        MSG = 'ITASK = 4 or 5 and TCRIT(=R1) < TCUR(=R2).'
+        CALL XERRDV(MSG,1260,1,0,0,0,2,TCRIT,TN)
+        GOTO 740
+660     CONTINUE
+        MSG = 'ITASK = 4 or 5 and TCRIT(=R1) < TOUT(=R2).'
+        CALL XERRDV(MSG,1270,1,0,0,0,2,TCRIT,TOUT)
+        GOTO 740
+670     MSG = 'At the start of the problem, too much'
+        CALL XERRDV(MSG,1280,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'accuracy was requested for precision'
+        CALL XERRDV(MSG,1280,1,0,0,0,1,TOLSF,ZERO)
+        MSG = 'of machine: see TOLSF(=R1).'
+        CALL XERRDV(MSG,1280,1,0,0,0,1,TOLSF,ZERO)
+        RWORK(14) = TOLSF
+        GOTO 740
+680     MSG = 'Trouble from DVINDY. ITASK = I1, TOUT = R1.'
+        CALL XERRDV(MSG,1290,1,1,ITASK,0,1,TOUT,ZERO)
+        GOTO 740
+690     MSG = 'SETH must be nonnegative.'
+        CALL XERRDV(MSG,1300,1,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+700     MSG = 'NG(=I1) < 0.'
+        CALL XERRDV(MSG,1310,0,1,NG,0,0,ZERO,ZERO)
+        GOTO 740
+710     MSG = 'NG changed (from I1 to I2) illegally, i.e.,'
+        CALL XERRDV(MSG,1320,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'not immediately after a root was found.'
+        CALL XERRDV(MSG,1320,1,2,NGC,NG,0,ZERO,ZERO)
+        GOTO 740
+720     MSG = 'One or more components of g has a root'
+        CALL XERRDV(MSG,1330,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'too near to the initial point.'
+        CALL XERRDV(MSG,1330,1,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+730     CONTINUE
+        MSG = 'WM length needed, LENWM(=I1) > LWMDIM(=I2)'
+        CALL XERRDV(MSG,1340,1,2,LENWM,LWMDIM,0,ZERO,ZERO)
+
+740     CONTINUE
+        ISTATE = -3
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+750     MSG = 'Run aborted:  apparent infinite loop.'
+        CALL XERRDV(MSG,1350,2,0,0,0,0,ZERO,ZERO)
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+      END SUBROUTINE DVODE
+!_______________________________________________________________________
+
+      SUBROUTINE DVHIN(N,T0,Y0,YDOT,F,TOUT,EWT,ITOL,ATOL,Y,TEMP,H0, &
+        NITER,IER)
+! ..
+! Calculate the initial step size.
+! ..
+! This routine computes the step size, H0, to be attempted on the
+! first step, when the user has not supplied a value for this.
+! First we check that TOUT - T0 differs significantly from zero. Then
+! an iteration is done to approximate the initial second derivative
+! and this is used to define h from w.r.m.s.norm(h**2 * yddot / 2) = 1.
+! A bias factor of 1/2 is applied to the resulting h.
+! The sign of H0 is inferred from the initial values of TOUT and T0.
+! Communication with DVHIN is done with the following variables:
+! N      = Size of ODE system, input.
+! T0     = Initial value of independent variable, input.
+! Y0     = Vector of initial conditions, input.
+! YDOT   = Vector of initial first derivatives, input.
+! F      = Name of subroutine for right-hand side f(t,y), input.
+! TOUT   = First output value of independent variable
+! UROUND = Machine unit roundoff
+! EWT, ITOL, ATOL = Error weights and tolerance parameters
+!                   as described in the driver routine, input.
+! Y, TEMP = Work arrays of length N.
+! H0     = Step size to be attempted, output.
+! NITER  = Number of iterations (and of f evaluations) to compute H0,
+!          output.
+! IER    = The error flag, returned with the value
+!          IER = 0  if no trouble occurred, or
+!          IER = -1 if TOUT and T0 are considered too close to proceed.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (INOUT) :: H0
+        KPP_REAL, INTENT (IN) :: T0, TOUT
+        INTEGER :: IER
+        INTEGER, INTENT (IN) :: ITOL, N
+        INTEGER, INTENT (INOUT) :: NITER
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: ATOL(*), EWT(*), Y0(*)
+        KPP_REAL, INTENT (INOUT) :: TEMP(*), Y(*), YDOT(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AFI, ATOLI, DELYI, H, HG, HLB, HNEW, HRAT, HUB, T1, &
+          TDIST, TROUND, YDDNRM
+        INTEGER :: I, ITER
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, SIGN, SQRT
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVHIN
+! ..
+        NITER = 0
+        TDIST = ABS(TOUT-T0)
+        TROUND = UROUND*MAX(ABS(T0),ABS(TOUT))
+        IF (TDIST<TWO*TROUND) GOTO 40
+
+!       Set a lower bound on H based on the roundoff level in T0
+!       and TOUT.
+        HLB = HUN*TROUND
+!       Set an upper bound on H based on TOUT-T0 and the initial
+!       Y and YDOT.
+        HUB = PT1*TDIST
+        ATOLI = ATOL(1)
+        DO I = 1, N
+          IF (ITOL==2 .OR. ITOL==4) ATOLI = ATOL(I)
+          DELYI = PT1*ABS(Y0(I)) + ATOLI
+          AFI = ABS(YDOT(I))
+          IF (AFI*HUB>DELYI) HUB = DELYI/AFI
+        END DO
+!       Set initial guess for H as geometric mean of upper and
+!       lower bounds.
+        ITER = 0
+        HG = SQRT(HLB*HUB)
+!       If the bounds have crossed, exit with the mean value.
+        IF (HUB<HLB) THEN
+          H0 = HG
+          GOTO 30
+        END IF
+
+!       Looping point for iteration.
+10      CONTINUE
+!       Estimate the second derivative as a difference quotient in f.
+        H = SIGN(HG,TOUT-T0)
+        T1 = T0 + H
+        Y(1:N) = Y0(1:N) + H*YDOT(1:N)
+        CALL F(N,T1,Y,TEMP)
+        NFE = NFE + 1
+        TEMP(1:N) = (TEMP(1:N)-YDOT(1:N))/H
+        YDDNRM = DVNORM(N,TEMP,EWT)
+!       Get the corresponding new value of h.
+        IF (YDDNRM*HUB*HUB>TWO) THEN
+          HNEW = SQRT(TWO/YDDNRM)
+        ELSE
+          HNEW = SQRT(HG*HUB)
+        END IF
+        ITER = ITER + 1
+
+! Test the stopping conditions.
+! Stop if the new and previous h values differ by a factor of < 2.
+! Stop if four iterations have been done. Also, stop with previous h
+! if HNEW/HG > 2 after first iteration, as this probably means that
+! the second derivative value is bad because of cancellation error.
+
+        IF (ITER>=4) GOTO 20
+        HRAT = HNEW/HG
+        IF ((HRAT>HALF) .AND. (HRAT<TWO)) GOTO 20
+        IF ((ITER>=2) .AND. (HNEW>TWO*HG)) THEN
+          HNEW = HG
+          GOTO 20
+        END IF
+        HG = HNEW
+        GOTO 10
+
+!       Iteration done. Apply bounds, bias factor, and sign. Then exit.
+20      H0 = HNEW*HALF
+        IF (H0<HLB) H0 = HLB
+        IF (H0>HUB) H0 = HUB
+30      H0 = SIGN(H0,TOUT-T0)
+        NITER = ITER
+        IER = 0
+        RETURN
+!       Error return for TOUT - T0 too small.
+40      IER = -1
+        RETURN
+
+      END SUBROUTINE DVHIN
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY_CORE(T,K,YH,LDYH,DKY,IFLAG)
+! ..
+! Interpolate the solution and derivative.
+! ..
+! DVINDY_CORE computes interpolated values of the K-th derivative
+! of the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! The formula for DKY is:
+!              q
+!  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+!             j=K
+! where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+! The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+! communicated by PRIVATE variables. The above sum is done in reverse
+! order.
+! IFLAG is returned negative if either K or T is out of bounds.
+! Discussion above and comments in driver explain all variables.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K, LDYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DKY(*), YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: C, R, S, TFUZZ, TN1, TP
+        INTEGER :: IC, J, JB, JB2, JJ, JJ1, JP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY_CORE
+! ..
+        IFLAG = 0
+        IF (K<0 .OR. K>NQ) GOTO 40
+!       TFUZZ = HUN * UROUND * (TN + HU)
+        TFUZZ = HUN*UROUND*SIGN(ABS(TN)+ABS(HU),HU)
+        TP = TN - HU - TFUZZ
+        TN1 = TN + TFUZZ
+        IF ((T-TP)*(T-TN1)>ZERO) GOTO 50
+        S = (T-TN)/H
+        IC = 1
+        IF (K==0) GOTO 10
+        JJ1 = L - K
+        DO JJ = JJ1, NQ
+          IC = IC*JJ
+        END DO
+10      C = REAL(IC)
+        DKY(1:N) = C*YH(1:N,L)
+        IF (K==NQ) GOTO 30
+        JB2 = NQ - K
+        DO JB = 1, JB2
+          J = NQ - JB
+          JP1 = J + 1
+          IC = 1
+          IF (K==0) GOTO 20
+          JJ1 = JP1 - K
+          DO JJ = JJ1, J
+            IC = IC*JJ
+          END DO
+20        C = REAL(IC)
+          DKY(1:N) = C*YH(1:N,JP1) + S*DKY(1:N)
+        END DO
+30      R = H**(-K)
+        CALL DSCAL_F90(N,R,DKY,1)
+        RETURN
+40      MSG = 'Error in DVINDY, K(=I1) is illegal.'
+        CALL XERRDV(MSG,1360,1,1,K,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+50      MSG = 'Error in DVINDY, T(=R1) is illegal. T is not'
+        CALL XERRDV(MSG,1370,1,0,0,0,1,T,ZERO)
+        MSG = 'in interval TCUR - HU(= R1) to TCUR(=R2)'
+        CALL XERRDV(MSG,1370,1,0,0,0,2,TP,TN)
+        IFLAG = -2
+        RETURN
+
+      END SUBROUTINE DVINDY_CORE
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY_BNDS(T,K,YH,LDYH,DKY,IFLAG)
+! ..
+! Interpolate the solution and derivative and enforce nonnegativity
+! (used only if user calls DVINDY and the BOUNDS option is in
+! use).
+! ..
+! This version of DVINDY_CORE enforces nonnegativity and is called
+! only by DVINDY (which is called only by the user). It uses the
+! private YNNEG array produced by a call to DVINDY_CORE from DVINDY
+! to enforce nonnegativity.
+! DVINDY_BNDS computes interpolated values of the K-th derivative
+! of the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! The formula for DKY is:
+!              q
+!  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+!             j=K
+! where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+! The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+! communicated by PRIVATE variables. The above sum is done in reverse
+! order.
+! IFLAG is returned negative if either K or T is out of bounds.
+! Discussion above and comments in driver explain all variables.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K, LDYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DKY(*), YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: C, R, S, TFUZZ, TN1, TP
+        INTEGER :: I, IC, J, JB, JB2, JJ, JJ1, JP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY_BNDS
+! ..
+        IFLAG = 0
+        IF (K==0) GOTO 50
+        IF (K<0 .OR. K>NQ) GOTO 40
+!       TFUZZ = HUN * UROUND * (TN + HU)
+        TFUZZ = HUN*UROUND*SIGN(ABS(TN)+ABS(HU),HU)
+        TP = TN - HU - TFUZZ
+        TN1 = TN + TFUZZ
+        IF ((T-TP)*(T-TN1)>ZERO) GOTO 60
+        S = (T-TN)/H
+        IC = 1
+        IF (K==0) GOTO 10
+        JJ1 = L - K
+        DO JJ = JJ1, NQ
+          IC = IC*JJ
+        END DO
+10      C = REAL(IC)
+        DKY(1:N) = C*YH(1:N,L)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (YNNEG(IDX(I))<LB(I) .OR. YNNEG(IDX(I))>UB(I)) DKY(IDX(I)) &
+              = ZERO
+          END DO
+        END IF
+        IF (K==NQ) GOTO 30
+        JB2 = NQ - K
+        DO JB = 1, JB2
+          J = NQ - JB
+          JP1 = J + 1
+          IC = 1
+          IF (K==0) GOTO 20
+          JJ1 = JP1 - K
+          DO JJ = JJ1, J
+            IC = IC*JJ
+          END DO
+20        C = REAL(IC)
+          DKY(1:N) = C*YH(1:N,JP1) + S*DKY(1:N)
+          IF (BOUNDS) THEN
+            DO I = 1, NDX
+              IF (YNNEG(IDX(I))<LB(I) .OR. YNNEG(IDX(I))>UB(I)) DKY(IDX(I)) &
+                = ZERO
+            END DO
+          END IF
+        END DO
+30      R = H**(-K)
+        CALL DSCAL_F90(N,R,DKY,1)
+        RETURN
+40      MSG = 'Error in DVINDY, K(=I1) is illegal.'
+        CALL XERRDV(MSG,1380,1,1,K,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+50      MSG = 'DVINDY_BNDS cannot be called with k = 0.'
+        CALL XERRDV(MSG,1390,1,0,0,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+60      MSG = 'Error in DVINDY, T(=R1) is illegal. T is not'
+        CALL XERRDV(MSG,1400,1,0,0,0,1,T,ZERO)
+        MSG = 'not in interval TCUR - HU(= R1) to TCUR(=R2)'
+        CALL XERRDV(MSG,1400,1,0,0,0,2,TP,TN)
+        IFLAG = -2
+        RETURN
+
+      END SUBROUTINE DVINDY_BNDS
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY(T,K,DKY,IFLAG)
+! ..
+! This is a dummy interface to allow the user to interpolate the
+! solution and the derivative (not called by DVODE_F90).
+! ..
+! May be used if the user wishes to interpolate solution or
+! derivative following a successful return from DVODE_F90
+! DVINDY computes interpolated values of the K-th derivative of
+! the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! IFLAG is returned negative if either K or T is out of bounds.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DKY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IER
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY
+! ..
+        CALL DVINDY_CORE(T,K,RWORK(LYH),N,DKY,IFLAG)
+        IF (.NOT.BOUNDS) RETURN
+
+        IF (K==0) THEN
+!         Interpolate only the solution.
+          CALL DVINDY_CORE(T,K,RWORK(LYH),N,DKY,IFLAG)
+!         Enforce bounds.
+          DO I = 1, NDX
+            IF (DKY(IDX(I))<LB(I)) DKY(IDX(I)) = LB(I)
+            IF (DKY(IDX(I))>UB(I)) DKY(IDX(I)) = UB(I)
+          END DO
+          RETURN
+        END IF
+
+!       k > 0 - derivatives requested.
+
+!       Make sure space is available for the interpolated solution.
+        IF (ALLOCATED(YNNEG)) THEN
+          IF (SIZE(YNNEG)<N) THEN
+            DEALLOCATE (YNNEG,STAT=IER)
+            CALL CHECK_STAT(IER,460)
+            ALLOCATE (YNNEG(N),STAT=IER)
+            CALL CHECK_STAT(IER,470)
+          END IF
+        ELSE
+          ALLOCATE (YNNEG(N),STAT=IER)
+          CALL CHECK_STAT(IER,480)
+        END IF
+!       Interpolate the solution; do not enforce bounds.
+        CALL DVINDY_CORE(T,0,RWORK(LYH),N,YNNEG,IFLAG)
+!       Now interpolate the derivative using YNNEG to enforce
+!       nonnegativity.
+        CALL DVINDY_BNDS(T,K,RWORK(LYH),N,DKY,IFLAG)
+        RETURN
+
+      END SUBROUTINE DVINDY
+!_______________________________________________________________________
+
+      SUBROUTINE DVSTEP(Y,YH,LDYH,YH1,EWT,SAVF,ACOR,WM,IWM,F,JAC, &
+        VNLS,ATOL,ITOL)
+! ..
+! This is the core step integrator for nonstiff and for dense, banded,
+! and sparse solutions.
+! ..
+! DVSTEP performs one step of the integration of an initial value
+! problem for a system of ordinary differential equations. It
+! calls subroutine DVNLSD for the solution of the nonlinear system
+! arising in the time step. Thus it is independent of the problem
+! Jacobian structure and the type of nonlinear system solution method.
+! DVSTEP returns a completion flag KFLAG (in PRIVATE variables block).
+! A return with KFLAG = -1 or -2 means either ABS(H) = HMIN or 10
+! consecutive failures occurred. On a return with KFLAG negative,
+! the values of TN and the YH array are as of the beginning of the last
+! step, and H is the last step size attempted.
+! Communication with DVSTEP is done with the following variables:
+! Y      = An array of length N used for the dependent variable vector.
+! YH     = An LDYH by LMAX array containing the dependent variables
+!          and their approximate scaled derivatives, where
+!          LMAX = MAXORD + 1. YH(i,j+1) contains the approximate
+!          j-th derivative of y(i), scaled by H**j/factorial(j)
+!          (j = 0,1,...,NQ). On entry for the first step, the first
+!          two columns of YH must be set from the initial values.
+! LDYH   = A constant integer >= N, the first dimension of YH.
+!          N is the number of ODEs in the system.
+! YH1    = A one-dimensional array occupying the same space as YH.
+! EWT    = An array of length N containing multiplicative weights
+!          for local error measurements. Local errors in y(i) are
+!          compared to 1.0/EWT(i) in various error tests.
+! SAVF   = An array of working storage, of length N.
+!          also used for input of YH(*,MAXORD+2) when JSTART = -1
+!          and MAXORD < the current order NQ.
+! ACOR   = A work array of length N, used for the accumulated
+!          corrections. On a successful return, ACOR(i) contains
+!          the estimated one-step local error in y(i).
+! WM,IWM = Real and integer work arrays associated with matrix
+!          operations in DVNLSD.
+! F      = Dummy name for the user supplied subroutine for f.
+! JAC    = Dummy name for the user supplied Jacobian subroutine.
+! DVNLSD = Dummy name for the nonlinear system solving subroutine,
+!          whose real name is dependent on the method used.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: LDYH, ITOL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*), YH1(*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC, VNLS
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CNQUOT, DDN, DSM, DUP, ETAQ, ETAQM1, ETAQP1, FLOTL, R, &
+          TOLD
+        INTEGER :: I, I1, I2, IBACK, J, JB, NCF, NFLAG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSTEP
+! ..
+        KFLAG = 0
+        TOLD = TN
+        NCF = 0
+        JCUR = 0
+        NFLAG = 0
+        IF (JSTART>0) GOTO 10
+        IF (JSTART==-1) GOTO 30
+
+! On the first call, the order is set to 1, and other variables are
+! initialized. ETAMAX is the maximum ratio by which H can be increased
+! in a single step. It is normally 10, but is larger during the first
+! step to compensate for the small initial H. If a failure occurs
+! (in corrector convergence or error test), ETAMAX is set to 1 for
+! the next increase.
+
+        LMAX = MAXORD + 1
+        NQ = 1
+        L = 2
+        NQNYH = NQ*LDYH
+        TAU(1) = H
+        PRL1 = ONE
+        RC = ZERO
+        ETAMAX = ETAMX1
+        NQWAIT = 2
+        HSCAL = H
+        GOTO 70
+
+! Take preliminary actions on a normal continuation step (JSTART > 0).
+! If the driver changed H, then ETA must be reset and NEWH set to 1.
+! If a change of order was dictated on the previous step, then it is
+! done here and appropriate adjustments in the history are made.
+! On an order decrease, the history array is adjusted by DVJUST.
+! On an order increase, the history array is augmented by a column.
+! On a change of step size H, the history array YH is rescaled.
+
+10      CONTINUE
+        IF (KUTH==1) THEN
+          ETA = MIN(ETA,H/HSCAL)
+          NEWH = 1
+        END IF
+20      IF (NEWH==0) GOTO 70
+        IF (NEWQ==NQ) GOTO 60
+        IF (NEWQ<NQ) THEN
+          CALL DVJUST(YH,LDYH,-1)
+          NQ = NEWQ
+          L = NQ + 1
+          NQWAIT = L
+          GOTO 60
+        END IF
+        IF (NEWQ>NQ) THEN
+          CALL DVJUST(YH,LDYH,1)
+          NQ = NEWQ
+          L = NQ + 1
+          NQWAIT = L
+          GOTO 60
+        END IF
+
+! The following block handles preliminaries needed when JSTART = -1.
+! If N was reduced, zero out part of YH to avoid undefined references.
+! If MAXORD was reduced to a value less than the tentative order NEWQ,
+! then NQ is set to MAXORD, and a new H ratio ETA is chosen.
+! Otherwise, we take the same preliminary actions as for JSTART > 0.
+! In any case, NQWAIT is reset to L = NQ + 1 to prevent further
+! changes in order for that many steps. The new H ratio ETA is
+! limited by the input H if KUTH = 1, by HMIN if KUTH = 0, and by
+! HMXI in any case. Finally, the history array YH is rescaled.
+
+30      CONTINUE
+        LMAX = MAXORD + 1
+        IF (N==LDYH) GOTO 40
+        I1 = 1 + (NEWQ+1)*LDYH
+        I2 = (MAXORD+1)*LDYH
+        IF (I1>I2) GOTO 40
+        YH1(I1:I2) = ZERO
+40      IF (NEWQ<=MAXORD) GOTO 50
+        FLOTL = REAL(LMAX)
+        IF (MAXORD<NQ-1) THEN
+          DDN = DVNORM(N,SAVF,EWT)/TQ(1)
+          ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL)+ADDON)
+        END IF
+        IF (MAXORD==NQ .AND. NEWQ==NQ+1) ETA = ETAQ
+        IF (MAXORD==NQ-1 .AND. NEWQ==NQ+1) THEN
+          ETA = ETAQM1
+          CALL DVJUST(YH,LDYH,-1)
+        END IF
+        IF (MAXORD==NQ-1 .AND. NEWQ==NQ) THEN
+          DDN = DVNORM(N,SAVF,EWT)/TQ(1)
+          ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL)+ADDON)
+          CALL DVJUST(YH,LDYH,-1)
+        END IF
+        ETA = MIN(ETA,ONE)
+        NQ = MAXORD
+        L = LMAX
+50      IF (KUTH==1) ETA = MIN(ETA,ABS(H/HSCAL))
+        IF (KUTH==0) ETA = MAX(ETA,HMIN/ABS(HSCAL))
+        ETA = ETA/MAX(ONE,ABS(HSCAL)*HMXI*ETA)
+        NEWH = 1
+        NQWAIT = L
+        IF (NEWQ<=MAXORD) GOTO 20
+!       Rescale the history array for a change in H by a factor of ETA.
+60      R = ONE
+        DO J = 2, L
+          R = R*ETA
+! Original:
+!         CALL DSCAL_F90(N,R,YH(1,J),1)
+          CALL DSCAL_F90(N,R,YH(1:N,J),1)
+        END DO
+        H = HSCAL*ETA
+        HSCAL = H
+        RC = RC*ETA
+        NQNYH = NQ*LDYH
+
+! This section computes the predicted values by effectively
+! multiplying the YH array by the Pascal triangle matrix.
+! DVSET is called to calculate all integration coefficients.
+! RC is the ratio of new to old values of the coefficient
+! H/EL(2)=h/l1.
+
+70      TN = TN + H
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) + YH1(I+LDYH)
+          END DO
+        END DO
+        CALL DVSET
+        RL1 = ONE/EL(2)
+        RC = RC*(RL1/PRL1)
+        PRL1 = RL1
+
+!       Call the nonlinear system solver.
+
+        CALL VNLS(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC,NFLAG, &
+          ATOL,ITOL)
+
+        IF (NFLAG==0) GOTO 80
+
+! The DVNLSD routine failed to achieve convergence (NFLAG /= 0).
+! The YH array is retracted to its values before prediction.
+! The step size H is reduced and the step is retried, if possible.
+! Otherwise, an error exit is taken.
+
+        NCF = NCF + 1
+        NCFN = NCFN + 1
+        ETAMAX = ONE
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) - YH1(I+LDYH)
+          END DO
+        END DO
+        IF (NFLAG<-1) GOTO 240
+        IF (ABS(H)<=HMIN*ONEPSM) GOTO 230
+!       IF (NCF==MXNCF) GOTO 230
+        IF (NCF==CONSECUTIVE_CFAILS) GOTO 230
+        ETA = ETACF
+        ETA = MAX(ETA,HMIN/ABS(H))
+        NFLAG = -1
+        GOTO 60
+
+! The corrector has converged (NFLAG = 0). The local error test is
+! made and control passes to statement 500 if it fails.
+
+80      CONTINUE
+        DSM = ACNRM/TQ(2)
+        IF (DSM>ONE) GOTO 100
+
+! After a successful step, update the YH and TAU arrays and decrement
+! NQWAIT. If NQWAIT is then 1 and NQ < MAXORD, then ACOR is saved
+! for use in a possible order increase on the next step.
+! If ETAMAX = 1 (a failure occurred this step), keep NQWAIT >= 2.
+
+        KFLAG = 0
+        NST = NST + 1
+        HU = H
+        NQU = NQ
+        DO IBACK = 1, NQ
+          I = L - IBACK
+          TAU(I+1) = TAU(I)
+        END DO
+        TAU(1) = H
+
+        IF (BOUNDS) THEN
+! Original:
+!         CALL DAXPY_F90(N,EL(1),ACOR,1,YH(1,1),1)
+!         CALL DAXPY_F90(N,EL(2),ACOR,1,YH(1,2),1)
+          CALL DAXPY_F90(N,EL(1),ACOR,1,YH(1:N,1),1)
+          CALL DAXPY_F90(N,EL(2),ACOR,1,YH(1:N,2),1)
+!         Take care of roundoff causing y(t) to be slightly unequal
+!         to the constraint bound.
+          DO J = 1, NDX
+            YH(IDX(J),1) = MAX(YH(IDX(J),1),LB(J))
+            Y(IDX(J)) = MAX(Y(IDX(J)),LB(J))
+            YH(IDX(J),1) = MIN(YH(IDX(J),1),UB(J))
+            Y(IDX(J)) = MIN(Y(IDX(J)),UB(J))
+          END DO
+!         Update the higher derivatives and project to zero if necessary.
+          IF (L>2) THEN
+            DO J = 3, L
+! Original:
+!             CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1,J),1)
+              CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1:N,J),1)
+            END DO
+          END IF
+        ELSE
+!         Proceed as usual.
+          DO J = 1, L
+! Original:
+!           CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1,J),1)
+            CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1:N,J),1)
+          END DO
+        END IF
+
+        NQWAIT = NQWAIT - 1
+        IF ((L==LMAX) .OR. (NQWAIT/=1)) GOTO 90
+! Original:
+!       CALL DCOPY_F90(N,ACOR,1,YH(1,LMAX),1)
+        CALL DCOPY_F90(N,ACOR,1,YH(1:N,LMAX),1)
+        CONP = TQ(5)
+90      IF (ABS(ETAMAX-ONE)>0) GOTO 130
+        IF (NQWAIT<2) NQWAIT = 2
+        NEWQ = NQ
+        NEWH = 0
+        ETA = ONE
+        HNEW = H
+        GOTO 250
+
+! The error test failed. KFLAG keeps track of multiple failures.
+! Restore TN and the YH array to their previous values, and prepare
+! to try the step again. Compute the optimum step size for the
+! same order. After repeated failures, H is forced to decrease
+! more rapidly.
+
+100     KFLAG = KFLAG - 1
+        NETF = NETF + 1
+        NFLAG = -2
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) - YH1(I+LDYH)
+          END DO
+        END DO
+        IF (ABS(H)<=HMIN*ONEPSM) GOTO 220
+        ETAMAX = ONE
+        IF (KFLAG<=KFC) GOTO 110
+!       Compute ratio of new H to current H at the current order.
+        FLOTL = REAL(L)
+        ETA = ONE/((BIAS2*DSM)**(ONE/FLOTL)+ADDON)
+        ETA = MAX(ETA,HMIN/ABS(H),ETAMIN)
+        IF ((KFLAG<=-2) .AND. (ETA>ETAMXF)) ETA = ETAMXF
+        GOTO 60
+
+! Control reaches this section if 3 or more consecutive failures
+! have occurred. It is assumed that the elements of the YH array
+! have accumulated errors of the wrong order. The order is reduced
+! by one, if possible. Then H is reduced by a factor of 0.1 and
+! the step is retried. After a total of 7 consecutive failures,
+! an exit is taken with KFLAG = -1.
+
+!110     IF (KFLAG==KFH) GOTO 220
+110     IF (KFLAG==CONSECUTIVE_EFAILS) GOTO 220
+        IF (NQ==1) GOTO 120
+        ETA = MAX(ETAMIN,HMIN/ABS(H))
+        CALL DVJUST(YH,LDYH,-1)
+        L = NQ
+        NQ = NQ - 1
+        NQWAIT = L
+        GOTO 60
+120     ETA = MAX(ETAMIN,HMIN/ABS(H))
+        H = H*ETA
+        HSCAL = H
+        TAU(1) = H
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        YH(1:N,2) = H*SAVF(1:N)
+        NQWAIT = 10
+        GOTO 70
+
+! If NQWAIT = 0, an increase or decrease in order by one is considered.
+! Factors ETAQ, ETAQM1, ETAQP1 are computed by which H could be
+! multiplied at order q, q-1, or q+1, respectively. The largest of
+! these is determined, and the new order and step size set accordingly.
+! A change of H or NQ is made only if H increases by at least a factor
+! of THRESH. If an order change is considered and rejected, then NQWAIT
+! is set to 2 (reconsider it after 2 steps).
+
+!       Compute ratio of new H to current H at the current order.
+130     FLOTL = REAL(L)
+        ETAQ = ONE/((BIAS2*DSM)**(ONE/FLOTL)+ADDON)
+        IF (NQWAIT/=0) GOTO 170
+        NQWAIT = 2
+        ETAQM1 = ZERO
+        IF (NQ==1) GOTO 140
+!       Compute ratio of new H to current H at the current order
+!       less one.
+! Original:
+!       DDN = DVNORM(N,YH(1,L),EWT)/TQ(1)
+        DDN = DVNORM(N,YH(1:N,L),EWT)/TQ(1)
+        ETAQM1 = ONE/((BIAS1*DDN)**(ONE/(FLOTL-ONE))+ADDON)
+140     ETAQP1 = ZERO
+        IF (L==LMAX) GOTO 150
+!       Compute ratio of new H to current H at current order plus one.
+        CNQUOT = (TQ(5)/CONP)*(H/TAU(2))**L
+        SAVF(1:N) = ACOR(1:N) - CNQUOT*YH(1:N,LMAX)
+        DUP = DVNORM(N,SAVF,EWT)/TQ(3)
+        ETAQP1 = ONE/((BIAS3*DUP)**(ONE/(FLOTL+ONE))+ADDON)
+150     IF (ETAQ>=ETAQP1) GOTO 160
+        IF (ETAQP1>ETAQM1) GOTO 190
+        GOTO 180
+160     IF (ETAQ<ETAQM1) GOTO 180
+170     ETA = ETAQ
+        NEWQ = NQ
+        GOTO 200
+180     ETA = ETAQM1
+        NEWQ = NQ - 1
+        GOTO 200
+190     ETA = ETAQP1
+        NEWQ = NQ + 1
+! Original:
+!       CALL DCOPY_F90(N,ACOR,1,YH(1,LMAX),1)
+        CALL DCOPY_F90(N,ACOR,1,YH(1:N,LMAX),1)
+!       Test tentative new H against THRESH, ETAMAX, and HMXI and
+!       then exit.
+200     IF (ETA<THRESH .OR. ABS(ETAMAX-ONE)<=ZERO) GOTO 210
+        ETA = MIN(ETA,ETAMAX)
+        ETA = ETA/MAX(ONE,ABS(H)*HMXI*ETA)
+        NEWH = 1
+        HNEW = H*ETA
+        GOTO 250
+210     NEWQ = NQ
+        NEWH = 0
+        ETA = ONE
+        HNEW = H
+        GOTO 250
+
+! All returns are made through this section.
+! On a successful return, ETAMAX is reset and ACOR is scaled.
+
+220     KFLAG = -1
+        GOTO 260
+230     KFLAG = -2
+        GOTO 260
+240     IF (NFLAG==-2) KFLAG = -3
+        IF (NFLAG==-3) KFLAG = -4
+        GOTO 260
+250     ETAMAX = ETAMX3
+        IF (NST<=10) ETAMAX = ETAMX2
+        R = ONE/TQ(2)
+
+        CALL DSCAL_F90(N,R,ACOR,1)
+260     JSTART = 1
+        RETURN
+
+      END SUBROUTINE DVSTEP
+!_______________________________________________________________________
+
+      SUBROUTINE DVSET
+! ..
+! Set the integration coefficients for DVSTEP.
+! ..
+! For each order NQ, the coefficients in EL are calculated by use
+! of the generating polynomial lambda(x), with coefficients EL(i).
+!      lambda(x) = EL(1) + EL(2)*x + ... + EL(NQ+1)*(x**NQ).
+! For the backward differentiation formulas,
+!                                     NQ-1
+!      lambda(x) = (1 + x/xi*(NQ)) * product (1 + x/xi(i)) .
+!                                     i = 1
+! For the Adams formulas,
+!                              NQ-1
+!      (d/dx) lambda(x) = c * product (1 + x/xi(i)),
+!                              i = 1
+!      lambda(-1) = 0,    lambda(0) = 1,
+! where c is a normalization constant.
+! In both cases, xi(i) is defined by
+!      H*xi(i) = t sub n - t sub (n-i)
+!              = H + TAU(1) + TAU(2) + ... TAU(i-1).
+! In addition to variables described previously, communication
+! with DVSET uses the following:
+!   TAU    = A vector of length 13 containing the past NQ values
+!            of H.
+!   EL     = A vector of length 13 in which vset stores the
+!            coefficients for the corrector formula.
+!   TQ     = A vector of length 5 in which vset stores constants
+!            used for the convergence test, the error test, and the
+!            selection of H at a new order.
+!   METH   = The basic method indicator.
+!   NQ     = The current order.
+!   L      = NQ + 1, the length of the vector stored in EL, and
+!            the number of columns of the YH array being used.
+!   NQWAIT = A counter controlling the frequency of order changes.
+!            An order change is about to be considered if NQWAIT = 1.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AHATN0, ALPH0, CNQM1, CSUM, ELP, EM0, FLOTI, FLOTL, &
+          FLOTNQ, HSUM, RXI, RXIS, S, T1, T2, T3, T4, T5, T6, XI
+        INTEGER :: I, IBACK, J, JP1, NQM1, NQM2
+! ..
+! .. Local Arrays ..
+        KPP_REAL :: EM(13)
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSET
+! ..
+        FLOTL = REAL(L)
+        NQM1 = NQ - 1
+        NQM2 = NQ - 2
+        GOTO (10,40) METH
+
+!       Set coefficients for Adams methods.
+10      IF (NQ/=1) GOTO 20
+        EL(1) = ONE
+        EL(2) = ONE
+        TQ(1) = ONE
+        TQ(2) = TWO
+        TQ(3) = SIX*TQ(2)
+        TQ(5) = ONE
+        GOTO 60
+20      HSUM = H
+        EM(1) = ONE
+        FLOTNQ = FLOTL - ONE
+        EM(2:L) = ZERO
+        DO J = 1, NQM1
+          IF ((J/=NQM1) .OR. (NQWAIT/=1)) GOTO 30
+          S = ONE
+          CSUM = ZERO
+          DO I = 1, NQM1
+            CSUM = CSUM + S*EM(I)/REAL(I+1)
+            S = -S
+          END DO
+          TQ(1) = EM(NQM1)/(FLOTNQ*CSUM)
+30        RXI = H/HSUM
+          DO IBACK = 1, J
+            I = (J+2) - IBACK
+            EM(I) = EM(I) + EM(I-1)*RXI
+          END DO
+          HSUM = HSUM + TAU(J)
+        END DO
+!       Compute integral from -1 to 0 of polynomial and of x times it.
+        S = ONE
+        EM0 = ZERO
+        CSUM = ZERO
+        DO I = 1, NQ
+          FLOTI = REAL(I)
+          EM0 = EM0 + S*EM(I)/FLOTI
+          CSUM = CSUM + S*EM(I)/(FLOTI+ONE)
+          S = -S
+        END DO
+!       In EL, form coefficients of normalized integrated polynomial.
+        S = ONE/EM0
+        EL(1) = ONE
+        DO I = 1, NQ
+          EL(I+1) = S*EM(I)/REAL(I)
+        END DO
+        XI = HSUM/H
+        TQ(2) = XI*EM0/CSUM
+        TQ(5) = XI/EL(L)
+        IF (NQWAIT/=1) GOTO 60
+!       For higher order control constant, multiply polynomial by
+!       1+x/xi(q).
+        RXI = ONE/XI
+        DO IBACK = 1, NQ
+          I = (L+1) - IBACK
+          EM(I) = EM(I) + EM(I-1)*RXI
+        END DO
+!       Compute integral of polynomial.
+        S = ONE
+        CSUM = ZERO
+        DO I = 1, L
+          CSUM = CSUM + S*EM(I)/REAL(I+1)
+          S = -S
+        END DO
+        TQ(3) = FLOTL*EM0/CSUM
+        GOTO 60
+
+!       Set coefficients for BDF methods.
+40      EL(3:L) = ZERO
+        EL(1) = ONE
+        EL(2) = ONE
+        ALPH0 = -ONE
+        AHATN0 = -ONE
+        HSUM = H
+        RXI = ONE
+        RXIS = ONE
+        IF (NQ==1) GOTO 50
+        DO J = 1, NQM2
+!       In EL, construct coefficients of (1+x/xi(1))*...*(1+x/xi(j+1)).
+          HSUM = HSUM + TAU(J)
+          RXI = H/HSUM
+          JP1 = J + 1
+          ALPH0 = ALPH0 - ONE/REAL(JP1)
+          DO IBACK = 1, JP1
+            I = (J+3) - IBACK
+            EL(I) = EL(I) + EL(I-1)*RXI
+          END DO
+        END DO
+        ALPH0 = ALPH0 - ONE/REAL(NQ)
+        RXIS = -EL(2) - ALPH0
+        HSUM = HSUM + TAU(NQM1)
+        RXI = H/HSUM
+        AHATN0 = -EL(2) - RXI
+        DO IBACK = 1, NQ
+          I = (NQ+2) - IBACK
+          EL(I) = EL(I) + EL(I-1)*RXIS
+        END DO
+50      T1 = ONE - AHATN0 + ALPH0
+        T2 = ONE + REAL(NQ)*T1
+        TQ(2) = ABS(ALPH0*T2/T1)
+        TQ(5) = ABS(T2/(EL(L)*RXI/RXIS))
+        IF (NQWAIT/=1) GOTO 60
+        CNQM1 = RXIS/EL(L)
+        T3 = ALPH0 + ONE/REAL(NQ)
+        T4 = AHATN0 + RXI
+        ELP = T3/(ONE-T4+T3)
+        TQ(1) = ABS(ELP/CNQM1)
+        HSUM = HSUM + TAU(NQ)
+        RXI = H/HSUM
+        T5 = ALPH0 - ONE/REAL(NQ+1)
+        T6 = AHATN0 - RXI
+        ELP = T2/(ONE-T6+T5)
+        TQ(3) = ABS(ELP*RXI*(FLOTL+ONE)*T5)
+60      TQ(4) = CORTES*TQ(2)
+        RETURN
+
+      END SUBROUTINE DVSET
+!_______________________________________________________________________
+
+      SUBROUTINE DVJUST(YH,LDYH,IORD)
+! ..
+! Adjust the Nordsieck array.
+! ..
+! This subroutine adjusts the YH array on reduction of order, and
+! also when the order is increased for the stiff option (METH = 2).
+! Communication with DVJUST uses the following:
+! IORD  = An integer flag used when METH = 2 to indicate an order
+!         increase (IORD = +1) or an order decrease (IORD = -1).
+! HSCAL = Step size H used in scaling of Nordsieck array YH.
+!         (If IORD = +1, DVJUST assumes that HSCAL = TAU(1).)
+! See References 1 and 2 for details.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: IORD, LDYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ALPH0, ALPH1, HSUM, PROD, T1, XI, XIOLD
+        INTEGER :: I, IBACK, J, JP1, LP1, NQM1, NQM2, NQP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJUST
+! ..
+        IF ((NQ==2) .AND. (IORD/=1)) RETURN
+        NQM1 = NQ - 1
+        NQM2 = NQ - 2
+        GOTO (10,30) METH
+
+!       Nonstiff option.
+
+!       Check to see if the order is being increased or decreased.
+10      CONTINUE
+        IF (IORD==1) GOTO 20
+!       Order decrease.
+        EL(1:LMAX) = ZERO
+        EL(2) = ONE
+        HSUM = ZERO
+        DO J = 1, NQM2
+!         Construct coefficients of x*(x+xi(1))*...*(x+xi(j)).
+          HSUM = HSUM + TAU(J)
+          XI = HSUM/HSCAL
+          JP1 = J + 1
+          DO IBACK = 1, JP1
+            I = (J+3) - IBACK
+            EL(I) = EL(I)*XI + EL(I-1)
+          END DO
+        END DO
+!       Construct coefficients of integrated polynomial.
+        DO J = 2, NQM1
+          EL(J+1) = REAL(NQ)*EL(J)/REAL(J)
+        END DO
+!       Subtract correction terms from YH array.
+        DO J = 3, NQ
+          DO I = 1, N
+            YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+          END DO
+        END DO
+        RETURN
+!       Order increase.
+!       Zero out next column in YH array.
+20      CONTINUE
+        LP1 = L + 1
+        YH(1:N,LP1) = ZERO
+        RETURN
+
+!       Stiff option.
+
+!       Check to see if the order is being increased or decreased.
+30      CONTINUE
+        IF (IORD==1) GOTO 40
+!       Order decrease.
+        EL(1:LMAX) = ZERO
+        EL(3) = ONE
+        HSUM = ZERO
+        DO J = 1, NQM2
+!     Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)).
+          HSUM = HSUM + TAU(J)
+          XI = HSUM/HSCAL
+          JP1 = J + 1
+          DO IBACK = 1, JP1
+            I = (J+4) - IBACK
+            EL(I) = EL(I)*XI + EL(I-1)
+          END DO
+        END DO
+!       Subtract correction terms from YH array.
+        DO J = 3, NQ
+          YH(1:N,J) = YH(1:N,J) - YH(1:N,L)*EL(J)
+        END DO
+        RETURN
+!       Order increase.
+40      EL(1:LMAX) = ZERO
+        EL(3) = ONE
+        ALPH0 = -ONE
+        ALPH1 = ONE
+        PROD = ONE
+        XIOLD = ONE
+        HSUM = HSCAL
+        IF (NQ==1) GOTO 50
+        DO J = 1, NQM1
+!       Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)).
+          JP1 = J + 1
+          HSUM = HSUM + TAU(JP1)
+          XI = HSUM/HSCAL
+          PROD = PROD*XI
+          ALPH0 = ALPH0 - ONE/REAL(JP1)
+          ALPH1 = ALPH1 + ONE/XI
+          DO IBACK = 1, JP1
+            I = (J+4) - IBACK
+            EL(I) = EL(I)*XIOLD + EL(I-1)
+          END DO
+          XIOLD = XI
+        END DO
+50      CONTINUE
+        T1 = (-ALPH0-ALPH1)/PROD
+!       Load column L+1 in YH array.
+        LP1 = L + 1
+        YH(1:N,LP1) = T1*YH(1:N,LMAX)
+!       Add correction terms to YH array.
+        NQP1 = NQ + 1
+        DO J = 3, NQP1
+! Original:
+!         CALL DAXPY_F90(N,EL(J),YH(1,LP1),1,YH(1,J),1)
+          CALL DAXPY_F90(N,EL(J),YH(1:N,LP1),1,YH(1:N,J),1)
+        END DO
+        RETURN
+
+      END SUBROUTINE DVJUST
+!_______________________________________________________________________
+
+      SUBROUTINE DVNLSD(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC,NFLAG,&
+        ATOL,ITOL)
+! ..
+! This is the nonlinear system solver for dense and banded solutions.
+! ..
+! Subroutine DVNLSD is a nonlinear system solver which uses functional
+! iteration or a chord (modified Newton) method. For the chord method
+! direct linear algebraic system solvers are used. Subroutine DVNLSD
+! then handles the corrector phase of this integration package.
+! Communication with DVNLSD is done with the following variables. (For
+! more details, please see the comments in the driver subroutine.)
+! Y          = The dependent variable, a vector of length N, input.
+! YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+!              and output. On input, it contains predicted values.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! SAVF       = A work array of length N.
+! EWT        = An error weight vector of length N, input.
+! ACOR       = A work array of length N, used for the accumulated
+!              corrections to the predicted y vector.
+! WM,IWM     = Real and integer work arrays associated with matrix
+!              operations in chord iteration (MITER /= 0).
+! F          = Dummy name for user supplied routine for f.
+! JAC        = Dummy name for user supplied Jacobian routine.
+! NFLAG      = Input/output flag, with values and meanings as follows:
+!              INPUT
+!                  0 first call for this time step.
+!                 -1 convergence failure in previous call to DVNLSD.
+!                 -2 error test failure in DVSTEP.
+!              OUTPUT
+!                  0 successful completion of nonlinear solver.
+!                 -1 convergence failure or singular matrix.
+!                 -2 unrecoverable error in matrix preprocessing
+!                    (cannot occur here).
+!                 -3 unrecoverable error in solution (cannot occur
+!                    here).
+! IPUP       = Own variable flag with values and meanings as follows:
+!              0,          do not update the Newton matrix.
+!              MITER /= 0  update Newton matrix, because it is the
+!                          initial step, order was changed, the error
+!                          test failed, or an update is indicated by
+!                          the scalar RC or step counter NST.
+! For more details, see comments in driver subroutine.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, LDYH
+        INTEGER, INTENT (INOUT) :: NFLAG
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACNRMNEW, CSCALE, DCON, DEL, DELP
+        INTEGER :: I, IERPJ, IERSL, M
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNLSD
+! ..
+! On the first step, on a change of method order, or after a
+! nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+! to force a Jacobian update when MITER /= 0.
+        IF (JSTART==0) NSLP = 0
+        IF (NFLAG==0) ICF = 0
+        IF (NFLAG==-2) IPUP = MITER
+        IF ((JSTART==0) .OR. (JSTART==-1)) IPUP = MITER
+!     If this is functional iteration, set CRATE = 1 and drop to 220
+        IF (MITER==0) THEN
+          CRATE = ONE
+          GOTO 10
+        END IF
+
+! RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER to
+! force DVJAC to be called, if a Jacobian is involved. In any case,
+! DVJAC is called at least every MSBP steps.
+
+        DRC = ABS(RC-ONE)
+        IF (DRC>CCMAX .OR. NST>=NSLP+MSBP) IPUP = MITER
+
+! Up to MAXCOR corrector iterations are taken. A convergence test is
+! made on the r.m.s. norm of each correction, weighted by the error
+! weight vector EWT. The sum of the corrections is accumulated in the
+! vector ACOR(i). The YH array is not altered in the corrector loop.
+
+10      M = 0
+        DELP = ZERO
+! Original:
+!       CALL DCOPY_F90(N,YH(1,1),1,Y,1)
+        CALL DCOPY_F90(N,YH(1:N,1),1,Y(1:N),1)
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+               MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+               MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        IF (IPUP<=0) GOTO 20
+
+! If indicated, the matrix P = I - h*rl1*J is reevaluated and
+! preprocessed before starting the corrector iteration. IPUP
+! is set to 0 as an indicator that this has been done.
+
+        CALL DVJAC(Y,YH,LDYH,EWT,ACOR,SAVF,WM,IWM,F,JAC,IERPJ, &
+          ATOL,ITOL)
+        IPUP = 0
+        RC = ONE
+        DRC = ZERO
+        CRATE = ONE
+        NSLP = NST
+!       If matrix is singular, take error return to force cut in
+!       step size.
+        IF (IERPJ/=0) GOTO 70
+20      ACOR(1:N) = ZERO
+!       This is a looping point for the corrector iteration.
+30      IF (MITER/=0) GOTO 40
+
+! In the case of functional iteration, update Y directly from
+! the result of the last function evaluation.
+
+        SAVF(1:N) = RL1*(H*SAVF(1:N)-YH(1:N,2))
+        Y(1:N) = SAVF(1:N) - ACOR(1:N)
+        DEL = DVNORM(N,Y,EWT)
+        Y(1:N) = YH(1:N,1) + SAVF(1:N)
+        CALL DCOPY_F90(N,SAVF,1,ACOR,1)
+        GOTO 50
+
+! In the case of the chord method, compute the corrector error, and
+! solve the linear system with that as right-hand side and P as
+! coefficient matrix. The correction is scaled by the factor
+! 2/(1+RC) to account for changes in h*rl1 since the last DVJAC call.
+
+40      Y(1:N) = (RL1*H)*SAVF(1:N) - (RL1*YH(1:N,2)+ACOR(1:N))
+        CALL DVSOL(WM,IWM,Y,IERSL)
+        NNI = NNI + 1
+        IF (IERSL>0) GOTO 60
+        IF (METH==2 .AND. ABS(RC-ONE)>ZERO) THEN
+          CSCALE = TWO/(ONE+RC)
+          CALL DSCAL_F90(N,CSCALE,Y,1)
+        END IF
+        DEL = DVNORM(N,Y,EWT)
+        CALL DAXPY_F90(N,ONE,Y,1,ACOR,1)
+        Y(1:N) = YH(1:N,1) + ACOR(1:N)
+
+! Test for convergence. If M > 0, an estimate of the convergence
+! rate constant is stored in CRATE, and this is used in the test.
+
+50      IF (M/=0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+        DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+        IF (DCON<=ONE) GOTO 80
+        M = M + 1
+        IF (M==MAXCOR) GOTO 60
+        IF (M>=2 .AND. DEL>RDIV*DELP) GOTO 60
+        DELP = DEL
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+               MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+               MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        GOTO 30
+
+60      IF (MITER==0 .OR. JCUR==1) GOTO 70
+        ICF = 1
+        IPUP = MITER
+        GOTO 10
+
+70      CONTINUE
+        NFLAG = -1
+        ICF = 2
+        IPUP = MITER
+        RETURN
+
+!       Return for successful step.
+80      CONTINUE
+
+!       Enforce bounds.
+        IF (BOUNDS) THEN
+          CHANGED_ACOR = .FALSE.
+          IF (M==0) THEN
+            ACNRM = DEL
+          ELSE
+            ACNRM = DVNORM(N,ACOR,EWT)
+          END IF
+          IF (MITER/=0) THEN
+!           Since Y(:) = YH(:,1) + ACOR(:) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+              IF (Y(IDX(I))>UB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+            END DO
+          ELSE
+!           Since Y(:) = YH(:,1) + SAVF(:) and
+!           since CALL DCOPY_F90(N,SAVF,1,ACOR,1) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+              END IF
+              IF (Y(IDX(I))>UB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+              END IF
+            END DO
+          END IF
+          IF (CHANGED_ACOR) THEN
+            IF (M==0) THEN
+              ACNRMNEW = DEL
+            ELSE
+              ACNRMNEW = DVNORM(N,ACOR,EWT)
+            END IF
+!           ACNRM = ACNRMNEW
+            ACNRM = MAX(ACNRM,ACNRMNEW)
+          ELSE
+          END IF
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+        ELSE
+!         No projections are required.
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+          IF (M==0) ACNRM = DEL
+          IF (M>0) ACNRM = DVNORM(N,ACOR,EWT)
+        END IF
+        RETURN
+
+      END SUBROUTINE DVNLSD
+!_______________________________________________________________________
+
+      SUBROUTINE DVJAC(Y,YH,LDYH,EWT,FTEM,SAVF,WM,IWM,F,JAC,IERPJ, &
+        ATOL,ITOL)
+! ..
+! Compute and process the matrix P = I - h*rl1*J, where J is an
+! approximation to the Jacobian for dense and banded solutions.
+! ..
+! This is a version of DVJAC that allows use of the known nonzero
+! diagonals if it is available.
+! DVJAC is called by DVNLSD to compute and process the matrix
+! P = I - h*rl1*J, where J is an approximation to the Jacobian.
+! Here J is computed by the user-supplied routine JAC if
+! MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.
+! If MITER = 3, a diagonal approximation to J is used.
+! If JSV = -1, J is computed from scratch in all cases.
+! If JSV = 1 and MITER = 1, 2, 4, or 5, and if the saved value of J is
+! considered acceptable, then P is constructed from the saved J.
+! J is stored in wm and replaced by P. If MITER /= 3, P is then
+! subjected to LU decomposition in preparation for later solution
+! of linear systems with P as coefficient matrix. This is done
+! by DGEFA_F90 if MITER = 1 or 2, and by DGBFA_F90 if MITER = 4 or 5.
+! Communication with DVJAC is done with the following variables.
+! (For more details, please see the comments in the driver subroutine.)
+! Y          = Vector containing predicted values on entry.
+! YH         = The Nordsieck array, an LDYH by LMAX array, input.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! EWT        = An error weight vector of length N.
+! SAVF       = Array containing f evaluated at predicted y, input.
+! WM         = Real work space for matrices. In the output, it contains
+!              the inverse diagonal matrix if MITER = 3 and the LU
+!              decomposition of P if MITER is 1, 2, 4, or 5.
+!              Storage of matrix elements starts at WM(1).
+!              Storage of the saved Jacobian starts at WM(LOCJS).
+! IWM        = Integer work space containing pivot information,
+!              starting at IWM(31), if MITER is 1, 2, 4, or 5.
+!              IWM also contains band parameters ML = IWM(1) and
+!              MU = IWM(2) if MITER is 4 or 5.
+! F          = Dummy name for the user supplied subroutine for f.
+! JAC        = Dummy name for the user supplied Jacobian subroutine.
+! RL1        = 1/EL(2) (input).
+! IERPJ      = Output error flag, = 0 if no trouble, 1 if the P
+!              matrix is found to be singular.
+! JCUR       = Output flag to indicate whether the Jacobian matrix
+!              (or approximation) is now current.
+!              JCUR = 0 means J is not current.
+!              JCUR = 1 means J is current.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERPJ
+        INTEGER, INTENT (IN) :: LDYH, ITOL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), FTEM(*), SAVF(*), WM(*), &
+          Y(*),YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CON, DI, FAC, HRL1, R, R0, SRUR, YI, YJ, YJJ
+        INTEGER :: I, I1, I2, IER, II, J, J1, JJ, JJ1, JJ2, JOK, K,   &
+          K1, K2, LENP, MBA, MBAND, MEB1, MEBAND, ML, ML1, MU, NG, NP1
+!         K1, K2, LENP, MBA, MBAND, MEB1, MEBAND, ML, ML3, MU, NG, NP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJAC
+! ..
+        IERPJ = 0
+        HRL1 = H*RL1
+!       See whether J should be evaluated (JOK = -1) or not (JOK = 1).
+        JOK = JSV
+        IF (JSV==1) THEN
+          IF (NST==0 .OR. NST>NSLJ+MSBJ) JOK = -1
+          IF (ICF==1 .AND. DRC<CCMXJ) JOK = -1
+          IF (ICF==2) JOK = -1
+        END IF
+        IF (J_IS_CONSTANT .AND. J_HAS_BEEN_COMPUTED) JOK = 1
+!       End of setting JOK.
+
+        IF (JOK==-1 .AND. MITER==1) THEN
+!         If JOK = -1 and MITER = 1, call JAC to evaluate Jacobian.
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+          LENP = N*N
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+!         CALL JAC(N,TN,Y,0,0,WM(3),N)
+          CALL JAC(N,TN,Y,0,0,WM(1),N)
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+!         IF (JSV==1) CALL DCOPY_F90(LENP,WM(3),1,WM(LOCJS),1)
+          IF (JSV==1) CALL DCOPY_F90(LENP,WM(1),1,WM(LOCJS),1)
+        END IF
+
+!       Set flag to indicate how the YSCALE vector will be set for
+!       JACSP.
+        LIKE_ORIGINAL_VODE = .FALSE.
+
+        IF (JOK==-1 .AND. MITER==2) THEN
+           IF (USE_JACSP) THEN
+!             Approximate the Jacobian using Doug Salane's JACSP.
+              NSLJ = NST
+              JCUR = 1
+              IOPTDS(1) = 0
+              IOPTDS(2) = 0
+              IOPTDS(3) = 1
+              IOPTDS(5) = 0
+!             INFORDS(4) was initialized in DVODE.
+              LWKDS  = 3 * N
+              LIWKDS = 50 + N
+              NRFJACDS = N
+              NCFJACDS = N
+              MAXGRPDS = N
+!             Calculate the YSCALEDS vector for JACSPDV.
+              IF (LIKE_ORIGINAL_VODE) THEN
+                 FAC = DVNORM(N,SAVF,EWT)
+!                JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                 R0 = THOU*ABS(H)*REAL(N)*FAC
+                 IF (ABS(R0)<=ZERO) R0 = ONE
+                 SRUR = WM1
+                 DO J = 1, N
+!                   JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                   R = MAX(ABS(Y(J)),R0/EWT(J))
+                    R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                    YSCALEDS(J) = R
+                 END DO
+              ELSE
+                 IF (ITOL == 1 .OR. ITOL == 3) THEN
+                    DO J = 1, N
+                       YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                    END DO
+                 ELSE
+                    DO J = 1, N
+                       YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                    END DO
+                 END IF
+              END IF
+
+              CALL JACSPDB(F,N,TN,Y,SAVF,WM(1),NRFJACDS, &
+                YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS, &
+                MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+              NFE = NFE + IWKDS(7)
+              NJE = NJE + 1
+           ELSE
+!             If MITER = 2, make N calls to F to approximate the Jacobian.
+              NSLJ = NST
+              JCUR = 1
+              FAC = DVNORM(N,SAVF,EWT)
+              R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+              IF (ABS(R0)<=ZERO) R0 = ONE
+              SRUR = WM1
+!             J1 = 2
+              J1 = 0
+              DO J = 1, N
+                 YJ = Y(J)
+                 R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+                 Y(J) = Y(J) + R
+                 FAC = ONE/R
+                 CALL F(N,TN,Y,FTEM)
+                 DO I = 1, N
+                   WM(I+J1) = (FTEM(I)-SAVF(I))*FAC
+                 END DO
+                 Y(J) = YJ
+                 J1 = J1 + N
+              END DO
+              NFE = NFE + N
+              NJE = NJE + 1
+           END IF
+           LENP = N*N
+!          IF (JSV==1) CALL DCOPY_F90(LENP,WM(3),1,WM(LOCJS),1)
+           IF (JSV==1) CALL DCOPY_F90(LENP,WM(1),1,WM(LOCJS),1)
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+        END IF
+
+        IF (JOK==1 .AND. (MITER==1 .OR. MITER==2)) THEN
+          JCUR = 0
+          LENP = N*N
+!         CALL DCOPY_F90(LENP,WM(LOCJS),1,WM(3),1)
+          CALL DCOPY_F90(LENP,WM(LOCJS),1,WM(1),1)
+        END IF
+
+        IF (MITER==1 .OR. MITER==2) THEN
+!         Multiply Jacobian by scalar, add identity, and do LU
+!         decomposition.
+          CON = -HRL1
+!         CALL DSCAL_F90(LENP,CON,WM(3),1)
+          CALL DSCAL_F90(LENP,CON,WM(1),1)
+!         J = 3
+          J = 1
+          NP1 = N + 1
+          DO I = 1, N
+            WM(J) = WM(J) + ONE
+            J = J + NP1
+          END DO
+          NLU = NLU + 1
+! ______________________________________________________________________
+
+!         CALL DGEFA_F90(WM(3),N,N,IWM(31),IER)
+          CALL DGEFA_F90(WM(1),N,N,IWM(31),IER)
+          IF (IER/=0) IERPJ = 1
+! *****LAPACK build change point. Replace above with these statements.
+!        IF (.NOT.USE_LAPACK) THEN
+!!         CALL DGEFA_f90(WM(3),N,N,IWM(31),IER)
+!          CALL DGEFA_f90(WM(1),N,N,IWM(31),IER)
+!          IF (IER /= 0) IERPJ = 1
+!        ELSE
+!!         CALL DGETRF(N,N,WM(3),N,IWM(31),IER)
+!          CALL DGETRF(N,N,WM(1),N,IWM(31),IER)
+!          IF (IER /= 0) IERPJ = 1
+!        END IF
+! ______________________________________________________________________
+
+          RETURN
+        END IF
+!       End of code block for MITER = 1 or 2.
+
+        IF (MITER==3) THEN
+!         If MITER = 3, construct a diagonal approximation to
+!         J and P.
+          NJE = NJE + 1
+          JCUR = 1
+          WM2 = HRL1
+          R = RL1*PT1
+          Y(1:N) = Y(1:N) + R*(H*SAVF(1:N)-YH(1:N,2))
+!         CALL F(N,TN,Y,WM(3))
+          CALL F(N,TN,Y,WM(1))
+          NFE = NFE + 1
+          DO 10 I = 1, N
+            R0 = H*SAVF(I) - YH(I,2)
+!           DI = PT1*R0 - H*(WM(I+2)-SAVF(I))
+            DI = PT1*R0 - H*(WM(I)-SAVF(I))
+!           WM(I+2) = ONE
+            WM(I) = ONE
+            IF (ABS(R0)<UROUND/EWT(I)) GOTO 10
+            IF (ABS(DI)<=ZERO) GOTO 20
+!           WM(I+2) = PT1*R0/DI
+            WM(I) = PT1*R0/DI
+10        END DO
+          RETURN
+20        IERPJ = 1
+          RETURN
+        END IF
+!       End of code block for MITER = 3.
+
+!       Set constants for MITER = 4 or 5.
+        ML = IWM(1)
+        MU = IWM(2)
+!       ML3 = ML + 3
+        ML1 = ML + 1
+        MBAND = ML + MU + 1
+        MEBAND = MBAND + ML
+        LENP = MEBAND*N
+
+        IF (JOK==-1 .AND. MITER==4) THEN
+!       If JOK = -1 and MITER = 4, call JAC to evaluate Jacobian.
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+!         CALL JAC(N,TN,Y,ML,MU,WM(ML3),MEBAND)
+          CALL JAC(N,TN,Y,ML,MU,WM(ML1),MEBAND)
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+!         IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML3),MEBAND,WM(LOCJS),MBAND)
+          IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML1),MEBAND,WM(LOCJS),MBAND)
+        END IF
+
+        IF (JOK==-1 .AND. MITER==5) THEN
+!       If MITER = 5, make ML+MU+1 calls to F to approximate the Jacobian
+!       unless the user has specified which sub and super diagonals are
+!       nonzero. In the latter case NSUBS+NSUPS+1 calls will be made.
+
+!         If the subdiagonals are known, use that information to build
+!         the Jacobian matrix.
+          IF ((SUBS .OR. SUPS) .OR. BNGRP >= MBAND) GOTO 60
+
+!         Otherwise, use the original algorithm.
+          IF (USE_JACSP) THEN
+!            Approximate the Jacobian using Doug Salane's JACSP.
+             NSLJ = NST
+             JCUR = 1
+             WM(1:LENP) = ZERO
+             IOPTDS(1) = 1
+             IOPTDS(2) = MBAND
+             IOPTDS(3) = 1
+             IOPTDS(5) = ML
+!            INFORDS(4) was initialized in DVODE.
+             LWKDS  = 3 * N
+             LIWKDS = 50 + N
+!            NRFJACDS = MEBAND*N
+!            NCFJACDS = 1
+             NRFJACDS = MEBAND
+             NCFJACDS = N
+             MBA = MIN(MBAND,N)
+             MAXGRPDS = MBA
+!            Calculate the YSCALEDS vector for JACSPDV.
+             IF (LIKE_ORIGINAL_VODE) THEN
+                FAC = DVNORM(N,SAVF,EWT)
+!               JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!               R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                R0 = THOU*ABS(H)*REAL(N)*FAC
+                IF (ABS(R0)<=ZERO) R0 = ONE
+                SRUR = WM1
+                DO J = 1, N
+!                  JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                  R = MAX(ABS(Y(J)),R0/EWT(J))
+                   R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                   YSCALEDS(J) = R
+                END DO
+             ELSE
+                IF (ITOL == 1 .OR. ITOL == 3) THEN
+                   DO J = 1, N
+                      YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                   END DO
+                ELSE
+                   DO J = 1, N
+                      YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                   END DO
+                END IF
+             END IF
+             CALL JACSPDB(F,N,TN,Y,SAVF,WM(1),NRFJACDS, &
+               YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS,  &
+               MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+             NFE = NFE + IWKDS(7)
+             NJE = NJE + 1
+          ELSE
+             NSLJ = NST
+             JCUR = 1
+             MBA = MIN(MBAND,N)
+             MEB1 = MEBAND - 1
+             SRUR = WM1
+             FAC = DVNORM(N,SAVF,EWT)
+             R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+             IF (ABS(R0)<=ZERO) R0 = ONE
+             DO J = 1, MBA
+               DO I = J, N, MBAND
+                 YI = Y(I)
+                 R = MAX(SRUR*ABS(YI),R0/EWT(I))
+                 Y(I) = Y(I) + R
+               END DO
+               CALL F(N,TN,Y,FTEM)
+               DO JJ = J, N, MBAND
+                 Y(JJ) = YH(JJ,1)
+                 YJJ = Y(JJ)
+                 R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+                 FAC = ONE/R
+                 I1 = MAX(JJ-MU,1)
+                 I2 = MIN(JJ+ML,N)
+!                II = JJ*MEB1 - ML + 2
+                 II = JJ*MEB1 - ML
+                 DO I = I1, I2
+                   WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                 END DO
+               END DO
+             END DO
+             NFE = NFE + MBA
+             NJE = NJE + 1
+          END IF
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+          GOTO 90
+   60     CONTINUE
+
+!         User supplied diagonals information is available.
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+          MBA = MIN(MBAND,N)
+          MEB1 = MEBAND - 1
+          SRUR = WM1
+          FAC = DVNORM(N,SAVF,EWT)
+          R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+          IF (ABS(R0)<=ZERO) R0 = ONE
+!         For each group of columns...
+          DO NG = 1, BNGRP
+!            Find the first and last columns in the group.
+             JJ1 = BIGP(NG)
+             JJ2 = BIGP(NG+1) - 1
+!            For each column in this group...
+             DO JJ = JJ1, JJ2
+                J = BJGP(JJ)
+                R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                Y(J) = Y(J) + R
+             END DO
+             CALL F(N,TN,Y,FTEM)
+!            For each column in this group...
+             DO JJ = JJ1, JJ2
+                 J = BJGP(JJ)
+                 Y(J) = YH(J,1)
+                 R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                 FAC = ONE/R
+                 IF (BUILD_IAJA) THEN
+!                   Use the IAB, JAB sparse structure arrays to
+!                   determine the first and last nonzeros in
+!                   column J.
+                    K1 = IAB(J)
+                    K2 = IAB(J+1) - 1
+                 ELSE
+!                   Extract the positions of the first and
+!                   last nonzeros in this column directly.
+                    CALL BANDED_GET_BJNZ(N,ML,MU,J,IWM(31),I)
+                    DO K = 1, N
+                       IF (IWM(30+K) /= 0) THEN
+                          K1 = K
+                          GOTO 70
+                       END IF
+                    END DO
+   70               CONTINUE
+                    DO K = N, 1, -1
+                       IF (IWM(30+K) /= 0) THEN
+                          K2 = K
+                          GOTO 80
+                       END IF
+                    END DO
+   80               CONTINUE
+                 END IF
+!                Load the nonzeros for column J in the banded matrix.
+                 IF (BUILD_IAJA) THEN
+                    DO K = K1, K2
+                       I = JAB(K)
+!                      II = J * MEB1 - ML + 2
+                       II = J * MEB1 - ML
+                       WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                    END DO
+                 ELSE
+                    DO K = K1, K2
+                       I = IWM(30+K)
+                       IF (I /= 0) THEN
+!                         II = J * MEB1 - ML + 2
+                          II = J * MEB1 - ML
+                          WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                       END IF
+                    END DO
+                 END IF
+             END DO
+          END DO
+          NFE = NFE + BNGRP
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+   90     CONTINUE
+!         IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML3),MEBAND,WM(LOCJS),MBAND)
+          IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML1),MEBAND,WM(LOCJS),MBAND)
+        END IF
+
+        IF (JOK==1) THEN
+          JCUR = 0
+!         CALL DACOPY(MBAND,N,WM(LOCJS),MBAND,WM(ML3),MEBAND)
+          CALL DACOPY(MBAND,N,WM(LOCJS),MBAND,WM(ML1),MEBAND)
+        END IF
+
+!       Multiply Jacobian by scalar, add identity, and do LU
+!       decomposition.
+        CON = -HRL1
+!       CALL DSCAL_F90(LENP,CON,WM(3),1)
+        CALL DSCAL_F90(LENP,CON,WM(1),1)
+!       II = MBAND + 2
+        II = MBAND
+        DO I = 1, N
+          WM(II) = WM(II) + ONE
+          II = II + MEBAND
+        END DO
+        NLU = NLU + 1
+! ______________________________________________________________________
+
+!       CALL DGBFA_F90(WM(3),MEBAND,N,ML,MU,IWM(31),IER)
+        CALL DGBFA_F90(WM(1),MEBAND,N,ML,MU,IWM(31),IER)
+        IF (IER/=0) IERPJ = 1
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!        CALL DGBFA_f90(WM(3),MEBAND,N,ML,MU,IWM(31),IER)
+!         CALL DGBFA_f90(WM(1),MEBAND,N,ML,MU,IWM(31),IER)
+!         IF (IER /= 0) IERPJ = 1
+!       ELSE
+!!        CALL DGBTRF(N,N,ML,MU,WM(3),MEBAND,IWM(31),IER)
+!         CALL DGBTRF(N,N,ML,MU,WM(1),MEBAND,IWM(31),IER)
+!         IF (IER /= 0) IERPJ = 1
+!       END IF
+! ______________________________________________________________________
+       RETURN
+!      End of code block for MITER = 4 or 5.
+
+      END SUBROUTINE DVJAC
+!_______________________________________________________________________
+
+      SUBROUTINE DACOPY(NROW,NCOL,A,NROWA,B,NROWB)
+! ..
+! Copy one array to another.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NCOL, NROW, NROWA, NROWB
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: A(NROWA,NCOL)
+        KPP_REAL, INTENT (INOUT) :: B(NROWB,NCOL)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IC
+! ..
+! .. FIRST EXECUTABLE STATEMENT DACOPY
+! ..
+        DO IC = 1, NCOL
+          CALL DCOPY_F90(NROW,A(1,IC),1,B(1,IC),1)
+        END DO
+        RETURN
+
+      END SUBROUTINE DACOPY
+!_______________________________________________________________________
+
+      SUBROUTINE DVSOL(WM,IWM,X,IERSL)
+! ..
+! Manage the solution of the linear system arising from a chord
+! iteration for dense and banded solutions.
+! ..
+! This routine manages the solution of the linear system arising from
+! a chord iteration. It is called if MITER /= 0.
+! If MITER is 1 or 2, it calls DGESL_F90 to accomplish this.
+! If MITER = 3 it updates the coefficient H*RL1 in the diagonal
+! matrix, and then computes the solution.
+! If MITER is 4 or 5, it calls DGBSL_F90.
+! Communication with DVSOL uses the following variables:
+! WM    = Real work space containing the inverse diagonal matrix if
+!         MITER = 3 and the LU decomposition of the matrix otherwise.
+!         Storage of matrix elements starts at WM(1).
+!         WM also contains the following matrix-related data:
+!         WM1 = SQRT(UROUND) (not used here),
+!         WM2 = HRL1, the previous value of H*RL1, used if MITER = 3.
+! IWM   = Integer work space containing pivot information, starting at
+!         IWM(31), if MITER is 1, 2, 4, or 5. IWM also contains band
+!         parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.
+! X     = The right-hand side vector on input, and the solution vector
+!         on output, of length N.
+! IERSL = Output flag. IERSL = 0 if no trouble occurred.
+!         IERSL = 1 if a singular matrix arose with MITER = 3.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERSL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: WM(*), X(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DI, HRL1, PHRL1, R
+        INTEGER :: I, MEBAND, ML, MU
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! ______________________________________________________________________
+
+! *****LAPACK build change point. Insert this statement.
+!       INTEGER INFO
+!       CHARACTER*1 TRANS
+! ______________________________________________________________________
+
+! .. FIRST EXECUTABLE STATEMENT DVSOL
+! ..
+        IERSL = 0
+        GOTO (10,10,20,50,50) MITER
+
+10      CONTINUE
+! ______________________________________________________________________
+
+!       CALL DGESL_F90(WM(3),N,N,IWM(31),X,0)
+        CALL DGESL_F90(WM(1),N,N,IWM(31),X,0)
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!         CALL DGESL_f90(WM(3),N,N,IWM(31),X,0)
+!          CALL DGESL_f90(WM(1),N,N,IWM(31),X,0)
+!       ELSE
+!          TRANS = 'N'
+!!         CALL DGETRS(TRANS,N,1,WM(3),N,IWM(31),X,N,INFO)
+!          CALL DGETRS(TRANS,N,1,WM(1),N,IWM(31),X,N,INFO)
+!          IF (INFO /= 0) THEN
+!             WRITE(6,*) 'Stopping in DVSOL with INFO = ', INFO
+!             STOP
+!          END IF
+!       END IF
+! ______________________________________________________________________
+
+        RETURN
+
+20      PHRL1 = WM2
+        HRL1 = H*RL1
+        WM2 = HRL1
+        IF (ABS(HRL1-PHRL1)<=ZERO) GOTO 30
+        R = HRL1/PHRL1
+        DO I = 1, N
+!         DI = ONE - R*(ONE-ONE/WM(I+2))
+          DI = ONE - R*(ONE-ONE/WM(I))
+          IF (ABS(DI)<=ZERO) GOTO 40
+!         WM(I+2) = ONE/DI
+          WM(I) = ONE/DI
+        END DO
+
+30      DO I = 1, N
+!         X(I) = WM(I+2)*X(I)
+          X(I) = WM(I)*X(I)
+        END DO
+        RETURN
+40      IERSL = 1
+        RETURN
+
+50      ML = IWM(1)
+        MU = IWM(2)
+        MEBAND = 2*ML + MU + 1
+! ______________________________________________________________________
+
+!       CALL DGBSL_F90(WM(3),MEBAND,N,ML,MU,IWM(31),X,0)
+        CALL DGBSL_F90(WM(1),MEBAND,N,ML,MU,IWM(31),X,0)
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!        CALL DGBSL_F90(WM(3),MEBAND,N,ML,MU,IWM(31),X,0)
+!         CALL DGBSL_F90(WM(1),MEBAND,N,ML,MU,IWM(31),X,0)
+!       ELSE
+!         TRANS = 'N'
+!!        CALL DGBTRS(TRANS,N,ML,MU,1,WM(3),MEBAND,IWM(31),X,N,INFO)
+!         CALL DGBTRS(TRANS,N,ML,MU,1,WM(1),MEBAND,IWM(31),X,N,INFO)
+!         IF (INFO /= 0) THEN
+!           WRITE(6,*) 'Stopping in DVSOL with INFO = ', INFO
+!           STOP
+!         END IF
+!       END IF
+! ______________________________________________________________________
+
+      RETURN
+
+      END SUBROUTINE DVSOL
+!_______________________________________________________________________
+
+      SUBROUTINE DVSRCO(RSAV,ISAV,JOB)
+! ..
+! Save or restore (depending on JOB) the contents of the PRIVATE
+! variable blocks, which are used internally by DVODE (not called
+! by DVODE_F90).
+! ..
+! RSAV = real array of length 49 or more.
+! ISAV = integer array of length 41 or more.
+! JOB  = flag indicating to save or restore the PRIVATE variable
+!        blocks:
+!        JOB  = 1 if PRIVATE variables is to be saved
+!                 (written to RSAV/ISAV).
+!        JOB  = 2 if PRIVATE variables is to be restored
+!                 (read from RSAV/ISAV).
+!        A call with JOB = 2 presumes a prior call with JOB = 1.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: RSAV(*)
+        INTEGER, INTENT (INOUT) :: ISAV(*)
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSRCO
+! ..
+        IF (JOB/=2) THEN
+!         Save the contents of the PRIVATE blocks.
+          RSAV(1) = ACNRM
+          RSAV(2) = CCMXJ
+          RSAV(3) = CONP
+          RSAV(4) = CRATE
+          RSAV(5) = DRC
+          RSAV(6:18) = EL(1:13)
+          RSAV(19) = ETA
+          RSAV(20) = ETAMAX
+          RSAV(21) = H
+          RSAV(22) = HMIN
+          RSAV(23) = HMXI
+          RSAV(24) = HNEW
+          RSAV(25) = HSCAL
+          RSAV(26) = PRL1
+          RSAV(27) = RC
+          RSAV(28) = RL1
+          RSAV(29:41) = TAU(1:13)
+          RSAV(42:46) = TQ(1:5)
+          RSAV(47) = TN
+          RSAV(48) = UROUND
+          RSAV(LENRV1+1) = HU
+          ISAV(1) = ICF
+          ISAV(2) = INIT
+          ISAV(3) = IPUP
+          ISAV(4) = JCUR
+          ISAV(5) = JSTART
+          ISAV(6) = JSV
+          ISAV(7) = KFLAG
+          ISAV(8) = KUTH
+          ISAV(9) = L
+          ISAV(10) = LMAX
+          ISAV(11) = LYH
+          ISAV(12) = 0
+          ISAV(13) = 0
+          ISAV(14) = 0
+          ISAV(15) = LWM
+          ISAV(16) = LIWM
+          ISAV(17) = LOCJS
+          ISAV(18) = MAXORD
+          ISAV(19) = METH
+          ISAV(20) = MITER
+          ISAV(21) = MSBJ
+          ISAV(22) = MXHNIL
+          ISAV(23) = MXSTEP
+          ISAV(24) = N
+          ISAV(25) = NEWH
+          ISAV(26) = NEWQ
+          ISAV(27) = NHNIL
+          ISAV(28) = NQ
+          ISAV(29) = NQNYH
+          ISAV(30) = NQWAIT
+          ISAV(31) = NSLJ
+          ISAV(32) = NSLP
+          ISAV(33) = NYH
+          ISAV(LENIV1+1) = NCFN
+          ISAV(LENIV1+2) = NETF
+          ISAV(LENIV1+3) = NFE
+          ISAV(LENIV1+4) = NJE
+          ISAV(LENIV1+5) = NLU
+          ISAV(LENIV1+6) = NNI
+          ISAV(LENIV1+7) = NQU
+          ISAV(LENIV1+8) = NST
+          RETURN
+        ELSE
+!         Replace the contents of the PRIVATE blocks.
+          ACNRM = RSAV(1)
+          CCMXJ = RSAV(2)
+          CONP = RSAV(3)
+          CRATE = RSAV(4)
+          DRC = RSAV(5)
+          EL(1:13) = RSAV(6:18)
+          ETA = RSAV(19)
+          ETAMAX = RSAV(20)
+          H = RSAV(21)
+          HMIN = RSAV(22)
+          HMXI = RSAV(23)
+          HNEW = RSAV(24)
+          HSCAL = RSAV(25)
+          PRL1 = RSAV(26)
+          RC = RSAV(27)
+          RL1 = RSAV(28)
+          TAU(1:13) = RSAV(29:41)
+          TQ(1:5) = RSAV(42:46)
+          TN = RSAV(47)
+          UROUND = RSAV(48)
+          HU = RSAV(LENRV1+1)
+          ICF = ISAV(1)
+          INIT = ISAV(2)
+          IPUP = ISAV(3)
+          JCUR = ISAV(4)
+          JSTART = ISAV(5)
+          JSV = ISAV(6)
+          KFLAG = ISAV(7)
+          KUTH = ISAV(8)
+          L = ISAV(9)
+          LMAX = ISAV(10)
+          LYH = ISAV(11)
+          LWM = ISAV(15)
+          LIWM = ISAV(16)
+          LOCJS = ISAV(17)
+          MAXORD = ISAV(18)
+          METH = ISAV(19)
+          MITER = ISAV(20)
+          MSBJ = ISAV(21)
+          MXHNIL = ISAV(22)
+          MXSTEP = ISAV(23)
+          N = ISAV(24)
+          NEWH = ISAV(25)
+          NEWQ = ISAV(26)
+          NHNIL = ISAV(27)
+          NQ = ISAV(28)
+          NQNYH = ISAV(29)
+          NQWAIT = ISAV(30)
+          NSLJ = ISAV(31)
+          NSLP = ISAV(32)
+          NYH = ISAV(33)
+          NCFN = ISAV(LENIV1+1)
+          NETF = ISAV(LENIV1+2)
+          NFE = ISAV(LENIV1+3)
+          NJE = ISAV(LENIV1+4)
+          NLU = ISAV(LENIV1+5)
+          NNI = ISAV(LENIV1+6)
+          NQU = ISAV(LENIV1+7)
+          NST = ISAV(LENIV1+8)
+          RETURN
+        END IF
+
+      END SUBROUTINE DVSRCO
+!_______________________________________________________________________
+
+      SUBROUTINE DEWSET(N,ITOL,RTOL,ATOL,YCUR,EWT)
+! ..
+! Set the error weight vector.
+! ..
+! This subroutine sets the error weight vector EWT according to
+! EWT(i) = RTOL(i)*ABS(YCUR(i)) + ATOL(i), i = 1,...,N,
+! with the subscript on RTOL and/or ATOL possibly replaced by 1
+! above, depending on the value of ITOL.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: ATOL(*), RTOL(*), YCUR(N)
+        KPP_REAL, INTENT (OUT) :: EWT(N)
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT DEWSET
+! ..
+        GOTO (10,20,30,40) ITOL
+10      CONTINUE
+        EWT(1:N) = RTOL(1)*ABS(YCUR(1:N)) + ATOL(1)
+        RETURN
+20      CONTINUE
+        EWT(1:N) = RTOL(1)*ABS(YCUR(1:N)) + ATOL(1:N)
+        RETURN
+30      CONTINUE
+        EWT(1:N) = RTOL(1:N)*ABS(YCUR(1:N)) + ATOL(1)
+        RETURN
+40      CONTINUE
+        EWT(1:N) = RTOL(1:N)*ABS(YCUR(1:N)) + ATOL(1:N)
+        RETURN
+
+      END SUBROUTINE DEWSET
+!_______________________________________________________________________
+
+      FUNCTION DVNORM(N,V,W)
+! ..
+! Calculate weighted root-mean-square (rms) vector norm.
+! ..
+! This routine computes the weighted root-mean-square norm
+! of the vector of length N contained in the array V, with
+! weights contained in the array W of length N.
+! DVNORM = SQRT((1/N) * SUM(V(i)*W(i))**2)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        KPP_REAL :: DVNORM
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: V(N), W(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: SUM
+        INTEGER :: I
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC SQRT
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNORM
+! ..
+        SUM = ZERO
+        DO I = 1, N
+          SUM = SUM + (V(I)*W(I))**2
+        END DO
+        DVNORM = SQRT(SUM/N)
+        RETURN
+
+      END FUNCTION DVNORM
+!_______________________________________________________________________
+
+! The modified SLATEC error handling routines begin here.
+      SUBROUTINE XERRDV(MSG,NERR,LEVEL,NI,I1,I2,NR,R1,R2)
+! ..
+! Write error messages with values.
+! ..
+! This is an adaptation of subroutine XERRWD (NMES eliminated).
+! Subroutines XERRDV, XSETF, XSETUN, and Functions IXSAV
+! as given here, constitute a simplified version of the SLATEC
+! error handling package.
+!
+! All arguments are input arguments.
+! MSG    = The message (character array).
+! NERR   = The error number (not used).
+! LEVEL  = The error level
+!          0 or 1 means recoverable (control returns to caller).
+!          2 means fatal (run is aborted--see note below).
+! NI     = Number of integers (0, 1, or 2) to be printed with message.
+! I1,I2  = Integers to be printed, depending on NI.
+! NR     = Number of reals (0, 1, or 2) to be printed with message.
+! R1,R2  = Reals to be printed, depending on NR.
+! Note: This routine is machine-dependent and specialized for use
+! in limited context, in the following ways:
+!  1. The argument MSG is assumed to be of type CHARACTER, and
+!     the message is printed with a format of (1X,A).
+!  2. The message is assumed to take only one line.
+!     Multi-line messages are generated by repeated calls.
+!  3. If LEVEL = 2, control passes to the statement: STOP
+!     to abort the run. This statement may be machine-dependent.
+!  4. R1 and R2 are assumed to be in KPP_REAL and are printed
+!     in D21.13 format.
+! Internal Notes:
+! For a different default logical unit number, IXSAV(or a subsidiary
+! function that it calls) will need to be modified.
+! For a different run-abort command, change the statement following
+! statement 100 at the end.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: R1, R2
+        INTEGER :: I1, I2, LEVEL, NERR, NI, NR
+        CHARACTER (*) :: MSG
+        LOGICAL PRINT_NERR
+! ..
+! .. Local Scalars ..
+        INTEGER :: LUNIT, MESFLG
+! ..
+! .. FIRST EXECUTABLE STATEMENT XERRDV
+! ..
+!       Get logical unit number and message print flag.
+        LUNIT = IXSAV(1,0,.FALSE.)
+        MESFLG = IXSAV(2,0,.FALSE.)
+        IF (MESFLG==0) GOTO 10
+
+        PRINT_NERR = .FALSE.
+        IF (PRINT_NERR) PRINT *, MSG, 'Message number = ', NERR
+
+!       Write the message.
+        WRITE (LUNIT,90000) MSG
+90000   FORMAT (1X,A)
+        IF (NI==1) WRITE (LUNIT,90001) I1
+90001   FORMAT ('In the above message, I1 = ',I10)
+        IF (NI==2) WRITE (LUNIT,90002) I1, I2
+90002   FORMAT ('In the above message, I1 = ',I10,3X,'I2 = ',I10)
+        IF (NR==1) WRITE (LUNIT,90003) R1
+90003   FORMAT ('In the above message, R1 = ',D21.13)
+        IF (NR==2) WRITE (LUNIT,90004) R1, R2
+90004   FORMAT ('In the above message, R1 = ',D21.13,3X,'R2 = ',D21.13)
+
+!       Abort the run if LEVEL = 2.
+10      IF (LEVEL/=2) RETURN
+        WRITE (LUNIT,90005)
+90005   FORMAT ('LEVEL = 2 in XERRDV. Stopping.')
+        STOP
+
+      END SUBROUTINE XERRDV
+!_______________________________________________________________________
+
+      SUBROUTINE XSETF(MFLAG)
+! ..
+!     Reset the error print control flag.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: MFLAG
+! ..
+! .. Local Scalars ..
+        INTEGER :: JUNK
+! ..
+! .. FIRST EXECUTABLE STATEMENT XSETF
+! ..
+        IF (MFLAG==0 .OR. MFLAG==1) JUNK = IXSAV(2,MFLAG,.TRUE.)
+!       Get rid of a compiler warning message:
+        IF (JUNK/=JUNK) STOP
+        RETURN
+
+      END SUBROUTINE XSETF
+!_______________________________________________________________________
+
+      SUBROUTINE XSETUN(LUN)
+! ..
+!     Reset the logical unit number for error messages.
+! ..
+!     XSETUN sets the logical unit number for error messages to LUN.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LUN
+! ..
+! .. Local Scalars ..
+        INTEGER :: JUNK
+! ..
+! .. FIRST EXECUTABLE STATEMENT XSETUN
+! ..
+        IF (LUN>0) JUNK = IXSAV(1,LUN,.TRUE.)
+!       Get rid of a compiler warning message:
+        IF (JUNK/=JUNK) STOP
+        RETURN
+
+      END SUBROUTINE XSETUN
+!_______________________________________________________________________
+
+      FUNCTION IXSAV(IPAR,IVALUE,ISET)
+! ..
+! Save and recall error message control parameters.
+! ..
+! IXSAV saves and recalls one of two error message parameters:
+!  LUNIT, the logical unit number to which messages are printed,
+!  and MESFLG, the message print flag.
+! This is a modification of the SLATEC library routine J4SAVE.
+! Saved local variables:
+!  LUNIT  = Logical unit number for messages. The default is
+!           obtained by a call to IUMACH(may be machine-dependent).
+!  MESFLG = Print control flag:
+!           1 means print all messages (the default).
+!           0 means no printing.
+! On input:
+!  IPAR   = Parameter indicator (1 for LUNIT, 2 for MESFLG).
+!  IVALUE = The value to be set for the parameter, if ISET = .TRUE.
+!  ISET   = Logical flag to indicate whether to read or write.
+!           If ISET = .TRUE., the parameter will be given
+!           the value IVALUE. If ISET = .FALSE., the parameter
+!           will be unchanged, and IVALUE is a dummy argument.
+! On return:
+!   IXSAV = The (old) value of the parameter.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        INTEGER :: IXSAV
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: IPAR, IVALUE
+        LOGICAL, INTENT (IN) :: ISET
+! ..
+! .. Local Scalars ..
+        INTEGER, SAVE :: LUNIT, MESFLG
+! ..
+! .. Data Statements ..
+        DATA LUNIT/ -1/, MESFLG/1/
+! ..
+! .. FIRST EXECUTABLE STATEMENT IXSAV
+! ..
+        IF (IPAR==1) THEN
+          IF (LUNIT==-1) LUNIT = IUMACH()
+!  i       Get rid of a compiler warning message:
+          IF (LUNIT/=LUNIT) STOP
+          IXSAV = LUNIT
+          IF (ISET) LUNIT = IVALUE
+        END IF
+
+        IF (IPAR==2) THEN
+          IXSAV = MESFLG
+          IF (ISET) MESFLG = IVALUE
+        END IF
+        RETURN
+
+      END FUNCTION IXSAV
+!_______________________________________________________________________
+
+      FUNCTION IUMACH()
+! ..
+!     Provide the standard output unit number.
+! ..
+!     INTEGER LOUT, IUMACH
+!     LOUT = IUMACH()
+!     Function Return Values:
+!     LOUT: the standard logical unit for Fortran output.
+!     Internal Notes:
+!     The built-in value of 6 is standard on a wide range
+!     of Fortran systems. This may be machine-dependent.
+! ..
+! .. Function Return Value ..
+        INTEGER :: IUMACH
+! ..
+! .. FIRST EXECUTABLE STATEMENT IUMACH
+! ..
+        IUMACH = 6
+        RETURN
+
+      END FUNCTION IUMACH
+! The modified error handling routines end here.
+!_______________________________________________________________________
+
+      SUBROUTINE CHECK_STAT(IER,CALLED_FROM_WHERE)
+! ..
+! Print an error message if a storage allocation error
+! occurred.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: CALLED_FROM_WHERE, IER
+! ..
+! .. Local Scalars ..
+        INTEGER :: I1
+        CHARACTER (80) :: MSG
+! ..
+! .. FIRST EXECUTABLE STATEMENT CHECK_STAT
+! ..
+        IF (IER/=0) THEN
+          I1 = CALLED_FROM_WHERE
+          MSG = 'A storage allocation error occurred.'
+          CALL XERRDV(MSG,1410,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'The error occurred at location I1.'
+          CALL XERRDV(MSG,1410,2,1,I1,0,0,ZERO,ZERO)
+        END IF
+        RETURN
+
+      END SUBROUTINE CHECK_STAT
+!_______________________________________________________________________
+
+      SUBROUTINE DVPREPS(NEQ,Y,YH,LDYH,SAVF,EWT,F,JAC)
+! ..
+! Determine the sparsity structure and allocate the necessary arrays
+! for MA28 based sparse solutions.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: LDYH, NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), Y(*)
+        KPP_REAL :: SAVF(*)
+        KPP_REAL, INTENT (IN) :: YH(LDYH,*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DQ, DYJ, ERWT, FAC, YJ
+        INTEGER :: I, IER, J, JFOUND, K, KMAX, KMIN, KNEW, NP1, NZ
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, MAX, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVPREPS
+! ..
+        NZ_SWAG = MAX(MAX(1000,NZ_SWAG),10*N)
+        NP1 = N + 1
+        NZ_ALL = NZ_SWAG
+!       ADDTONNZ = MAX(1000,NZ_SWAG)
+        ADDTONNZ = NZ_SWAG
+10      CONTINUE
+        IF (ALLOCATED(IAN)) THEN
+          DEALLOCATE (IAN,JAN,IGP,JGP,FTEMP1,IKEEP28,IW28,ICN,PMAT, &
+            JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,490)
+          IF (ALLOCATED(JMAT)) THEN
+            DEALLOCATE (JMAT,STAT=IER)
+            CALL CHECK_STAT(IER,500)
+          END IF
+        END IF
+        NZ_ALL = NZ_ALL + ADDTONNZ
+        LICN_ALL = ELBOW_ROOM * NZ_ALL
+        LIRN_ALL = ELBOW_ROOM * NZ_ALL
+        IF (LICN_ALL>MAX_ARRAY_SIZE .OR. LIRN_ALL>MAX_ARRAY_SIZE) THEN
+          MSG = 'Maximum array size exceeded. Stopping.'
+          CALL XERRDV(MSG,1420,2,0,0,0,0,ZERO,ZERO)
+        END IF
+!       Note: ICN may need to be reallocated in DVJACS28.
+        ALLOCATE (IAN(NP1),JAN(LIRN_ALL),IGP(NP1),JGP(N),FTEMP1(N), &
+          IKEEP28(N,5),IW28(N,8),ICN(LICN_ALL),PMAT(LICN_ALL),      &
+          JVECT(LIRN_ALL),STAT=IER)
+        CALL CHECK_STAT(IER,510)
+        IF (JSV==1) THEN
+          ALLOCATE (JMAT(NZ_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,520)
+          JMAT(1:NZ_ALL) = ZERO
+        END IF
+
+        IF (MOSS==0) GOTO 30
+        IF (ISTATC==3) GOTO 20
+
+!       ISTATE = 1 and MOSS /= 0.
+
+!       Perturb Y for structure determination:
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        GOTO (60,70) MOSS
+
+20      CONTINUE
+!       ISTATE = 3 and MOSS /= 0.
+
+!       Load Y from YH(*,1):
+        Y(1:N) = YH(1:N,1)
+        GOTO (60,70) MOSS
+
+!       MOSS = 0
+
+!       Process user's IA,JA. Add diagonal entries if necessary:
+30      CONTINUE
+        IF (IAJA_CALLED) THEN
+        ELSE
+          MSG = 'You have indicated that you wish to supply the'
+          CALL XERRDV(MSG,1430,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'sparsity arrays IA and JA directly but you did'
+          CALL XERRDV(MSG,1430,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'not call SET_IAJA after calling SET_OPTS.'
+          CALL XERRDV(MSG,1430,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        KNEW = 1
+        KMIN = IA(1)
+        IAN(1) = 1
+        DO J = 1, N
+          JFOUND = 0
+          KMAX = IA(J+1) - 1
+          IF (KMIN>KMAX) GOTO 40
+          DO K = KMIN, KMAX
+            I = JA(K)
+            IF (I==J) JFOUND = 1
+            IF (KNEW>NZ_ALL) THEN
+               IF (LP /= 0) THEN
+                  MSG = 'NZ_ALL (=I1) is not large enough.'
+                  CALL XERRDV(MSG,1440,1,0,0,0,0,ZERO,ZERO)
+                  MSG = 'Allocating more space for another try.'
+                  CALL XERRDV(MSG,1440,1,1,NZ_ALL,0,0,ZERO,ZERO)
+               END IF
+               GOTO 10
+            END IF
+            JAN(KNEW) = I
+            KNEW = KNEW + 1
+          END DO
+          IF (JFOUND==1) GOTO 50
+40        IF (KNEW>NZ_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'NZ_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1450,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1450,1,1,NZ_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          JAN(KNEW) = J
+          KNEW = KNEW + 1
+50        IAN(J+1) = KNEW
+          KMIN = KMAX + 1
+        END DO
+        GOTO 90
+
+60      CONTINUE
+
+!       MOSS = 1.
+
+!       Compute structure from user-supplied Jacobian routine JAC.
+        NZ = 0
+        CALL JAC(NEQ,TN,Y,IAN,JAN,NZ,PMAT)
+        IF (NZ<=0) THEN
+          MSG = 'Illegal value of NZ from JAC in DVPREPS.'
+          CALL XERRDV(MSG,1460,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (NZ>NZ_ALL) THEN
+           IF (LP /= 0) THEN
+              MSG = 'NZ_ALL (=I1) is not large enough.'
+              CALL XERRDV(MSG,1470,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'Allocating more space for another try.'
+              CALL XERRDV(MSG,1470,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           END IF
+           GOTO 10
+        END IF
+        CALL JAC(NEQ,TN,Y,IAN,JAN,NZ,PMAT)
+        CALL SET_ICN(N,IAN,ICN)
+        CALL CHECK_DIAG(N,IAN,JAN,ICN)
+        GOTO 90
+
+!       MOSS = 2.
+
+!       Compute structure from results of N+1 calls to F.
+70      K = 1
+        IAN(1) = 1
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        CALL F(NEQ,TN,Y,SAVF)
+        NFE = NFE + 1
+        DO J = 1, N
+          IF (K>NZ_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'NZ_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1480,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1480,1,1,NZ_ALL,0,0,ZERO,ZERO)
+
+             END IF
+             GOTO 10
+          END IF
+          YJ = Y(J)
+          ERWT = ONE/EWT(J)
+          DYJ = SIGN(ERWT,YJ)
+          Y(J) = YJ + DYJ
+          CALL F(NEQ,TN,Y,FTEMP1)
+          NFE = NFE + 1
+          Y(J) = YJ
+          DO 80 I = 1, N
+            DQ = (FTEMP1(I)-SAVF(I))/DYJ
+            IF ((ABS(DQ)<=SETH) .AND. (I/=J)) GOTO 80
+            JAN(K) = I
+            K = K + 1
+80        END DO
+          IAN(J+1) = K
+        END DO
+90      CONTINUE
+        IF (MOSS==0 .OR. ISTATC/=1) GOTO 100
+!       If ISTATE = 1 and MOSS /= 0, restore Y from YH.
+        Y(1:N) = YH(1:N,1)
+100     NNZ = IAN(NP1) - 1
+        LENIGP = 0
+        MAXG = 0
+        IF (MITER==7) THEN
+!         Compute grouping of column indices.
+          MAXG = NP1
+          CALL DGROUP(N,IAN,JAN,MAXG,NGP,IGP,JGP,IKEEP28(1,1), &
+            IKEEP28(1,2),IER)
+          IF (IER/=0) THEN
+            MSG = 'An error occurred in DGROUP.'
+            CALL XERRDV(MSG,1490,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          LENIGP = NGP + 1
+        END IF
+
+        IF (USE_JACSP .AND. MITER==7) THEN
+!         Use Doug Salane's Jacobian routines to determine the column
+!         grouping; and allocate and initialize the necessary arrays
+!         for use in DVJACS48.
+          IF (ALLOCATED(INDROWDS)) THEN
+             DEALLOCATE (INDROWDS, INDCOLDS, NGRPDS, IPNTRDS, JPNTRDS, IWADS, &
+               IWKDS, IOPTDS, YSCALEDS, WKDS, FACDS)
+             CALL CHECK_STAT(IER,530)
+          END IF
+!         We could delete IWADS and use IW28 array.
+          ALLOCATE (INDROWDS(NNZ), INDCOLDS(NNZ), NGRPDS(N+1), IPNTRDS(N+1), &
+            JPNTRDS(N+1), IWADS(6*N), IWKDS(50+N), IOPTDS(5), YSCALEDS(N),  &
+            WKDS(3*N), FACDS(N) ,STAT=IER)
+          CALL CHECK_STAT(IER,540)
+          INDROWDS(1:NNZ) = JAN(1:NNZ)
+          CALL SET_ICN(N,IAN,INDCOLDS)
+          CALL CHECK_DIAG(N,IAN,INDROWDS,INDCOLDS)
+          LIWADS = 6 * N
+          CALL DVDSM(N,N,NNZ,INDROWDS,INDCOLDS,NGRPDS,MAXGRPDS,MINGRPDS,      &
+            INFODS,IPNTRDS,JPNTRDS,IWADS,LIWADS)
+          IF (INFODS /= 1) THEN
+             MSG = 'An error occurred in subroutine DSM. INFO = I1.'
+               CALL XERRDV(MSG,1500,2,1,INFODS,0,0,ZERO,ZERO)
+          END IF
+!         For use in DVJACS28:
+          IOPTDS(4) = 0
+!         Define the IGP and JGP arrays needed by DVJACS28.
+          CALL DGROUPDS(N,MAXGRPDS,NGRPDS,IGP,JGP)
+          NGP = MAXGRPDS
+          LENIGP = MAXGRPDS + 1
+        END IF
+
+!       Trim the arrays to the final sizes.
+
+        IF (NZ_ALL>NNZ) THEN
+          NZ_ALL = NNZ
+          MAX_NNZ = MAX(MAX_NNZ,NNZ)
+          LIRN_ALL = ELBOW_ROOM * NNZ
+          ICN(1:NNZ) = JAN(1:NNZ)
+          DEALLOCATE (JAN,STAT=IER)
+          CALL CHECK_STAT(IER,550)
+          ALLOCATE (JAN(LIRN_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,560)
+          JAN(1:NNZ) = ICN(1:NNZ)
+          CALL CHECK_STAT(IER,570)
+          DEALLOCATE (ICN,PMAT,JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,580)
+          IF (ALLOCATED(JMAT)) THEN
+            DEALLOCATE (JMAT,STAT=IER)
+            CALL CHECK_STAT(IER,590)
+          END IF
+          LICN_ALL = ELBOW_ROOM * NNZ
+          ALLOCATE (ICN(LICN_ALL),PMAT(LICN_ALL),JVECT(LIRN_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,600)
+          IF (JSV==1) THEN
+            ALLOCATE (JMAT(NNZ),STAT=IER)
+            CALL CHECK_STAT(IER,610)
+            JMAT(1:NNZ) = ZERO
+          END IF
+          IF (MITER==7) THEN
+            JVECT(1:LENIGP) = IGP(1:LENIGP)
+            DEALLOCATE (IGP,STAT=IER)
+            CALL CHECK_STAT(IER,620)
+            ALLOCATE (IGP(LENIGP),STAT=IER)
+            CALL CHECK_STAT(IER,630)
+            IGP(1:LENIGP) = JVECT(1:LENIGP)
+          END IF
+        END IF
+        IF (SCALE_MATRIX) THEN
+           IF (ALLOCATED(CSCALEX)) THEN
+              DEALLOCATE (CSCALEX,RSCALEX,WSCALEX,STAT=IER)
+              CALL CHECK_STAT(IER,640)
+              ALLOCATE (CSCALEX(N),RSCALEX(N),WSCALEX(N,5),STAT=IER)
+              CALL CHECK_STAT(IER,650)
+           ELSE
+              ALLOCATE (CSCALEX(N),RSCALEX(N),WSCALEX(N,5),STAT=IER)
+              CALL CHECK_STAT(IER,660)
+           END IF
+        END IF
+        IF (LP /= 0) THEN
+           MSG = 'The final DVPRPEPS storage allocations are:'
+           CALL XERRDV(MSG,1510,1,0,0,0,0,ZERO,ZERO)
+           MSG = '   NZ_ALL (=I1):'
+           CALL XERRDV(MSG,1510,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           MSG = '   LIRN_ALL (=I1) and LICN_ALL (=I2):'
+           CALL XERRDV(MSG,1510,1,2,LIRN_ALL,LICN_ALL,0,ZERO,ZERO)
+         END IF
+        RETURN
+
+      END SUBROUTINE DVPREPS
+!_______________________________________________________________________
+
+      SUBROUTINE DVRENEW(NEQ,Y,SAVF,EWT,F)
+! ..
+! In the event MA28BD encounters a zero pivot in the LU factorization
+! of the iteration matrix due to an out-of-date MA28AD pivot sequence,
+! re-calculate the sparsity structure using finite differences.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), SAVF(*), Y(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DQ, DYJ, ERWT, FAC, YJ
+        INTEGER :: ADDTONZ, I, IER, J, K, KVAL, NP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, MAX, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVRENEW
+! ..
+! .. Caution:
+!    This routine must not be called before DVPREPS has been called.
+!
+!    Note:
+!    On entry to DVRENEW, the allocated array sizes of arrays that
+!    may change size are:
+!      ICN, PMAT  = length LICN_ALL
+!      JAN, JVECT = length LIRN_ALL
+!      JMAT       = length NZ_ALL
+!      IGP        = length LENIGP on first entry; N+1 thereafter
+
+!       Check if a numerical Jacobian is being used and stop if
+!       it is not.
+        IF (MITER /= 7) THEN
+          MSG = 'DVRENEW can be used only if MITER = 7.'
+          CALL XERRDV(MSG,1520,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Save Y and SAVF.
+        IF (.NOT.ALLOCATED(YTEMP)) THEN
+           ALLOCATE (YTEMP(N),DTEMP(N),STAT=IER)
+           CALL CHECK_STAT(IER,670)
+        END IF
+        YTEMP(1:N) = Y(1:N)
+        DTEMP(1:N) = SAVF(1:N)
+
+!       Define the amount to be added to the array lengths
+!       if necessary.
+        NP1 = N + 1
+        NNZ = IAN(NP1) - 1
+        ADDTONZ = ELBOW_ROOM * NNZ
+
+!       Just change the size of IGP to N+1 if have not already
+!       done so.
+        IF (SIZE(IGP) /= NP1) THEN
+           DEALLOCATE (IAN,STAT=IER)
+           CALL CHECK_STAT(IER,680)
+           ALLOCATE (IAN(NP1),STAT=IER)
+           CALL CHECK_STAT(IER,690)
+        END IF
+
+!       Go to the differencing section to determine the new
+!       sparsity structure.
+        GOTO 20
+
+10      CONTINUE
+
+!       Reallocate the arrays if necessary.
+        IF (KVAL > LIRN_ALL) THEN
+!          Note: JAN and JVECT may need to be reallocated in DVJACS28.
+           LIRN_ALL = LIRN_ALL + ADDTONZ
+           IF (LIRN_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+             CALL XERRDV(MSG,1530,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (JAN,JVECT,STAT=IER)
+           CALL CHECK_STAT(IER,700)
+           ALLOCATE (JAN(LIRN_ALL),JVECT(LIRN_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,710)
+        END IF
+        IF (KVAL > LICN_ALL) THEN
+!          Note: ICN and PMAT may need to be reallocated in DVJACS28.
+           LICN_ALL = LICN_ALL + ADDTONZ
+           IF (LICN_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+             CALL XERRDV(MSG,1540,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (ICN,PMAT,STAT=IER)
+           CALL CHECK_STAT(IER,720)
+           ALLOCATE (ICN(LICN_ALL),PMAT(LICN_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,730)
+        END IF
+
+   20   CONTINUE
+
+!       Perturb Y for structure determination:
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+
+!       Compute structure from results of N+1 calls to F.
+        K = 1
+        IAN(1) = 1
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        CALL F(NEQ,TN,Y,SAVF)
+        NFE = NFE + 1
+        DO J = 1, N
+          KVAL = K
+          IF (KVAL > LIRN_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'LIRN_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1550,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1550,1,1,LIRN_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          IF (KVAL > LICN_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'LICN_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1560,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1560,1,1,LICN_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          YJ = Y(J)
+          ERWT = ONE/EWT(J)
+          DYJ = SIGN(ERWT,YJ)
+          Y(J) = YJ + DYJ
+          CALL F(NEQ,TN,Y,FTEMP1)
+          NFE = NFE + 1
+          Y(J) = YJ
+          DO 80 I = 1, N
+            DQ = (FTEMP1(I)-SAVF(I))/DYJ
+            IF ((ABS(DQ)<=SETH) .AND. (I/=J)) GOTO 80
+            JAN(K) = I
+            K = K + 1
+80        END DO
+          IAN(J+1) = K
+        END DO
+
+        NNZ = IAN(NP1) - 1
+        IF (NNZ > NZ_ALL .AND. JSV == 1) THEN
+!          Increase the size of JMAT if necessary.
+           NZ_ALL = NNZ
+           IF (LP /= 0) THEN
+              MSG = 'NZ_ALL (=I1) is not large enough.'
+              CALL XERRDV(MSG,1570,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'Allocating more space for another try.'
+              CALL XERRDV(MSG,1570,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           END IF
+           IF (NZ_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+              CALL XERRDV(MSG,1580,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (JMAT,STAT=IER)
+           CALL CHECK_STAT(IER,740)
+           ALLOCATE (JMAT(NZ_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,750)
+           JMAT(1:NZ_ALL) = ZERO
+        END IF
+
+!       Compute grouping of column indices.
+
+        LENIGP = 0
+        MAXG = 0
+        MAXG = NP1
+        CALL DGROUP(N,IAN,JAN,MAXG,NGP,IGP,JGP,IKEEP28(1,1), &
+          IKEEP28(1,2),IER)
+        IF (IER/=0) THEN
+          MSG = 'An error occurred in DGROUP.'
+          CALL XERRDV(MSG,1590,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        LENIGP = NGP + 1
+
+!       Restore Y and SAVF.
+        Y(1:N) = YTEMP(1:N)
+        SAVF(1:N) = DTEMP(1:N)
+        RETURN
+
+      END SUBROUTINE DVRENEW
+!_______________________________________________________________________
+
+      SUBROUTINE DGROUP(N,IA,JA,MAXG,NGRP,IGP,JGP,INCL,JDONE,IER)
+! ..
+! Construct groupings of the column indices of the Jacobian matrix,
+! used in the numerical evaluation of the Jacobian by finite
+! differences for sparse solutions.
+! ..
+!     Input:
+!     N      = the order of the matrix
+!     IA,JA  = sparse structure descriptors of the matrix by rows
+!     MAXG   = length of available storage in the IGP array
+!     INCL and JDONE are working arrays of length N.
+!     Output:
+!     NGRP   = number of groups
+!     JGP    = array of length N containing the column indices by
+!              groups
+!     IGP    = pointer array of length NGRP + 1 to the locations
+!              in JGP of the beginning of each group
+!     IER    = error indicator. IER = 0 if no error occurred, or
+!              1 if MAXG was insufficient
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IER, NGRP
+        INTEGER, INTENT (IN) :: MAXG, N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*), JA(*)
+        INTEGER, INTENT (INOUT) :: IGP(*), INCL(*), JDONE(*), JGP(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, K, KMAX, KMIN, NCOL, NG
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGROUP
+! ..
+        IER = 0
+        JDONE(1:N) = 0
+        NCOL = 1
+        DO NG = 1, MAXG
+          IGP(NG) = NCOL
+          INCL(1:N) = 0
+          DO 20 J = 1, N
+!           Reject column J if it is already in a group.
+            IF (JDONE(J)==1) GOTO 20
+            KMIN = IA(J)
+            KMAX = IA(J+1) - 1
+            DO 10 K = KMIN, KMAX
+!           Reject column J if it overlaps any column already
+!           in this group.
+              I = JA(K)
+              IF (INCL(I)==1) GOTO 20
+10          END DO
+!           Accept column J into group NG.
+            JGP(NCOL) = J
+            NCOL = NCOL + 1
+            JDONE(J) = 1
+            DO K = KMIN, KMAX
+              I = JA(K)
+              INCL(I) = 1
+            END DO
+20        END DO
+!         Stop if this group is empty (grouping is complete).
+          IF (NCOL==IGP(NG)) GOTO 30
+        END DO
+!       Error return if not all columns were chosen (MAXG too small).
+        IF (NCOL<=N) GOTO 40
+        NG = MAXG
+30      NGRP = NG - 1
+        RETURN
+40      IER = 1
+        RETURN
+
+      END SUBROUTINE DGROUP
+!_______________________________________________________________________
+
+      SUBROUTINE BGROUP(N,BJA,BINCL,BDONE,ML,MU)
+! ..
+! Construct groupings of the column indices of the Jacobian
+! matrix, used in the numerical evaluation of the Jacobian
+! by finite differences for banded solutions when the nonzero
+! sub and super diagonals are known. BGROUP is similar to
+! DGROUP but it does not require the sparse structure arrays
+! and it uses real rather than integer work arrays.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       BINCL   = real working array of length N
+!       BJA     = real working array of length N
+!       BDONE   = real working array of length N
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!
+!     Output: (PRIVATE information used in DVJAC)
+!
+!       BNGRP   = integer number of groups
+!       BJGP    = integer array of length N containing the
+!                 column indices by groups
+!       BIGP    = integer pointer array of length BNGRP + 1
+!                 to the locations in BJGP of the beginning
+!                 of each group
+!
+!       Note:
+!          On output:
+!             For I = 1, ..., BNGRP:
+!                Start of group I:
+!                  J = BIGP(I)
+!                Number of columns in group I:
+!                  K = BIGP(I+1) - BIGP(I)
+!                Columns in group I:
+!                  BJGP(J-1+L), L=1, ..., K
+!
+!    Note:
+!    The three arrays BJA, BINCL, and BDONE are REAL to avoid the
+!    necessity to allocate three new INTEGER arrays. BGROUP can
+!    be called only at an integration start or restart because
+!    DVODE_F90 work arrays are used for these arrays.
+!
+!    Note:
+!    The PRIVATE banded information SUBDS, NSUBDS, SUPDS, NSUPS,
+!    ML, and MU must be defined before calling BGROUP.
+!       ML        = lower bandwidth
+!       MU        = upper bandwidth
+!       NSUBS     = number of strict sub diagonals
+!       SUBDS(I)  = row in which the Ith sub diagonal
+!                   begins, I=1, ..., NSUBS
+!       NSUPS     = number of strict super diagonals
+!       SUPDS(I)  = column in which the Ith super diagonal
+!                   begins, I=1, ..., NSUPS
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: BINCL(*), BJA(*), BDONE(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IBDONE, IBINCL, IER, J, K, KBEGIN, KFINI, &
+          KI, KJ, MAXG, NCOL, NG
+        KPP_REAL :: FUDGE, ONE_PLUS_FUDGE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC INT, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT BGROUP
+! ..
+!       Storage for the column grouping information.
+        IF (ALLOCATED(BIGP)) THEN
+           DEALLOCATE (BIGP,BJGP,STAT=IER)
+           CALL CHECK_STAT(IER,760)
+        END IF
+        ALLOCATE (BIGP(N+1),BJGP(N),STAT=IER)
+        CALL CHECK_STAT(IER,770)
+
+        FUDGE = 0.4_dp
+        ONE_PLUS_FUDGE = 1.0_dp + FUDGE
+        MAXG = N + 1
+!       BDONE(1:N) = 0 ...
+        BDONE(1:N) = FUDGE
+        NCOL = 1
+        DO NG = 1, MAXG
+           BIGP(NG) = NCOL
+!          BINCL(1:N) = 0 ...
+           BINCL(1:N) = FUDGE
+           DO 30 J = 1, N
+!             Reject column J if it is already in a group.
+!             IF (BDONE(J) == 1) GOTO 30 ...
+              IBDONE = INT(BDONE(J))
+              IF (IBDONE == 1) GOTO 30
+!             Vertical extent of band = KBEGIN to KFINI.
+!             KJ = number of nonzeros in column J.
+!             BJA(K) = K implies nonzero at (k,j).
+              KBEGIN = MAX(J-MU,1)
+              KFINI = MIN(J+ML,N)
+              KJ = 0
+!             BJA(1:N) = 0 ...
+              BJA(1:N) = FUDGE
+!             Locate the row positions of the nonzeros in column J.
+!             Restrict attention to the band:
+              DO 10 K = KBEGIN, KFINI
+                 IF (K < J) THEN
+                    IF (NSUPS > 0) THEN
+                       DO I = NSUPS, 1, -1
+!                         KI = SUPDS(I) + J - 1
+                          KI = J + 1 - SUPDS(I)
+                          IF (K == KI) THEN
+                             KJ = KJ + 1
+!                            BJA(K) = K ...
+                             BJA(K) = REAL(K) + FUDGE
+                          END IF
+                       END DO
+                    END IF
+                 ELSEIF (K == J) THEN
+                    KJ = KJ + 1
+!                   BJA(K) = K ...
+                    BJA(K) = REAL(K) + FUDGE
+                 ELSE
+                    IF (NSUBS > 0) THEN
+                       DO I = NSUBS, 1, -1
+                          KI = SUBDS(I) + J -1
+                          IF (K == KI) THEN
+                             KJ = KJ + 1
+!                            BJA(K) = K ...
+                             BJA(K) = REAL(K) + FUDGE
+                          END IF
+                       END DO
+                    END IF
+              END IF
+ 10           CONTINUE
+!             At this point BJA contains the row numbers for
+!             the nonzeros in column J.
+              DO 20 K = KBEGIN, KFINI
+!                Reject column J if it overlaps any column
+!                already in this group.
+!                I = BJA(K)
+                 I = INT(BJA(K))
+                 IBINCL = INT(BINCL(I))
+!                IF (BINCL(I) == 1 .AND. I == K) GOTO 30
+                 IF (IBINCL == 1 .AND. I == K) GOTO 30
+ 20           END DO
+!             Accept column J into group NG.
+              BJGP(NCOL) = J
+              NCOL = NCOL + 1
+!             BDONE(J) = 1 ...
+              BDONE(J) = ONE_PLUS_FUDGE
+              DO K = 1, N
+!                IF (I == K) BINCL(I) = 1 ...
+                 I = INT(BJA(K))
+                 IF (I == K) BINCL(I) = ONE_PLUS_FUDGE
+              END DO
+ 30        END DO
+!          Done if this group is empty (grouping is complete).
+           IF (NCOL == BIGP(NG)) GOTO 40
+        END DO
+
+!       Should not get here since MAXG = N + 1.
+!       Terminal error if not all columns were chosen
+!       because MAXG too small.
+        IF (NCOL <= N) THEN
+           MSG = 'An impossible error occurred in subroutine BGROUP.'
+           CALL XERRDV(MSG,1600,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+        NG = MAXG
+ 40     BNGRP = NG - 1
+
+!       Trim BIGP to it's actual size if necessary.
+        IF (NG < MAXG) THEN
+!          BJA(1:NG) = BIGP(1:NG) ...
+           DO I = 1, NG
+              BJA(I) = REAL(BIGP(I)) + FUDGE
+           END DO
+           DEALLOCATE (BIGP,STAT=IER)
+           CALL CHECK_STAT(IER,780)
+           ALLOCATE (BIGP(NG),STAT=IER)
+           CALL CHECK_STAT(IER,790)
+!          BIGP(1:NG) = BJA(1:NG) ...
+           DO I = 1, NG
+              BIGP(I) = INT(BJA(I))
+           END DO
+        END IF
+        RETURN
+
+      END SUBROUTINE BGROUP
+!_______________________________________________________________________
+
+      SUBROUTINE BANDED_IAJA(N,ML,MU)
+! ..
+! Build the sparse structure descriptor arrays for a banded
+! matrix if the nonzero diagonals are known.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!
+!     Output: (PRIVATE information used in DVJAC)
+!
+!       IAB     = IA descriptor array
+!       JAB     = JA descriptor array
+!
+!    Note:
+!    The PRIVATE banded information SUBDS, NSUBS, SUPDS, NSUPS,
+!    ML, and MU must be defined before calling BANDED_IAJA.
+!       ML        = lower bandwidth
+!       MU        = upper bandwidth
+!       NSUBS     = number of strict sub diagonals
+!       SUBDS(I)  = row in which the Ith sub diagonal
+!                   begins, I=1, ..., NSUBS
+!       NSUPS     = number of strict super diagonals
+!       SUPDS(I)  = column in which the Ith super diagonal
+!                   begins, I=1, ..., NSUPS
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IER, J, K, KBEGIN, KFINI, KI, KJ, &
+          NP1, NZBB
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC ALLOCATED, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT BANDED_IAJA
+! ..
+!    Check for errors.
+
+     IF (.NOT.BUILD_IAJA) THEN
+        MSG = 'BANDED_IAJA cannot be called with BUILD_IAJA = .FALSE.'
+        CALL XERRDV(MSG,1610,2,0,0,0,0,ZERO,ZERO)
+     END IF
+
+     IF (NSUBS < 0) THEN
+        MSG = 'NSUBS < 0 in BANDED_IAJA.'
+        CALL XERRDV(MSG,1620,2,0,0,0,0,ZERO,ZERO)
+     ELSE
+        IF (NSUBS > 0) THEN
+           IF (NSUBS /= SIZE(SUBDS)) THEN
+              MSG = 'The size of the SUBDS array must'
+              CALL XERRDV(MSG,1630,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'equal NSUBS in BANDED_IAJA.'
+              CALL XERRDV(MSG,1630,2,0,0,0,0,ZERO,ZERO)
+           END IF
+        END IF
+     END IF
+
+     IF (NSUPS < 0) THEN
+        MSG = 'NSUPS < 0 in BANDED_IAJA.'
+        CALL XERRDV(MSG,1640,2,0,0,0,0,ZERO,ZERO)
+     ELSE
+        IF (NSUPS > 0) THEN
+           IF (NSUPS /= SIZE(SUPDS)) THEN
+              MSG = 'The size of the SUPDS array must'
+              CALL XERRDV(MSG,1650,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'equal NSUPS in BANDED_IAJA.'
+              CALL XERRDV(MSG,1650,2,0,0,0,0,ZERO,ZERO)
+           END IF
+        END IF
+     END IF
+
+!    Allocate the necessary storage for the descriptor arrays.
+
+!    Define the total number of elements in all diagonals.
+     NP1 = N + 1
+     NZB = (NSUBS + NSUPS + 1) * NP1 - 1
+     IF (NSUBS /= 0) THEN
+        DO I = 1, NSUBS
+           NZB = NZB - SUBDS(I)
+        END DO
+     END IF
+     IF (NSUPS /= 0) THEN
+        DO I = 1, NSUPS
+           NZB = NZB - SUPDS(I)
+        END DO
+     END IF
+     IF (ALLOCATED(IAB)) THEN
+        DEALLOCATE(IAB,JAB,STAT=IER)
+        CALL CHECK_STAT(IER,800)
+     END IF
+     ALLOCATE(IAB(NP1),JAB(NZB),STAT=IER)
+     CALL CHECK_STAT(IER,810)
+     IAB(1) = 1
+     NZBB = 0
+
+!    For each column in the matrix...
+     DO J = 1, N
+!       Vertical extent of band = KBEGIN to KFINI.
+!       KJ = number of nonzeros in column J.
+        KBEGIN = MAX(J-MU,1)
+        KFINI = MIN(J+ML,N)
+        KJ = 0
+!       Locate the row positions of the nonzeros in column J.
+!       (Restrict attention to the band.)
+        IAB(J+1) = IAB(J)
+!       For each row in the intersection of the band with
+!       this column ...
+        DO K = KBEGIN, KFINI
+!          Does column J intersect a super diagonal at (K,J)?
+           IF (K < J) THEN
+              DO I = NSUPS, 1, -1
+                 KI = J + 1 - SUPDS(I)
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    IAB(J+1) = IAB(J+1) + 1
+                    NZBB = NZBB + 1
+                    JAB(NZBB) = K
+                    GOTO 10
+                 END IF
+              END DO
+           ELSEIF (K == J) THEN
+!             We are on the main diagonal.
+              KJ = KJ + 1
+              IAB(J+1) = IAB(J+1) + 1
+              NZBB = NZBB + 1
+              JAB(NZBB) = K
+              GOTO 10
+           ELSE
+!             Does column J intersect a sub diagonal at (K,J)?
+              DO I = NSUBS, 1, -1
+                 KI = SUBDS(I) + J - 1
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    IAB(J+1) = IAB(J+1) + 1
+                    NZBB = NZBB + 1
+                    JAB(NZBB) = K
+                    GOTO 10
+                 END IF
+              END DO
+           END IF
+10         CONTINUE
+        END DO
+     END DO
+
+     IF (NZBB /= NZB) THEN
+        MSG = 'NZBB (I1) is not equal to NZB (I2)'
+        CALL XERRDV(MSG,1660,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'in BANDED_IAJA.'
+        CALL XERRDV(MSG,1660,2,2,NZBB,NZB,0,ZERO,ZERO)
+     END IF
+     RETURN
+
+   END SUBROUTINE BANDED_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE BANDED_GET_BJNZ(N,ML,MU,JCOL,JNZ,NZJ)
+! ..
+! Locate the nonzeros in a given column of a sparse banded matrix
+! with known diagonals. This is a version of BANDED_IAJA modified
+! to do only one column.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!       JCOL    = column number between 1 and N
+!       JZ      = integer array of length N
+!
+!     Output:
+!
+!       JNZ    = integer array of length N. If
+!                 JNZ(K) is not 0, there is a
+!                 nonzero at position (K,JCOL)
+!       NZJ     = number of nozeros in column JCOL
+!
+!    Caution:
+!    No parameter checking is done since this subroutine
+!    will be called many times. Note that a number of
+!    PRIVATE parameters must be set before calling this
+!    subroutine.
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU, JCOL
+        INTEGER, INTENT (OUT) :: NZJ
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (OUT) :: JNZ(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, K, KBEGIN, KFINI, KI, KJ
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT BANDED_GET_BJNZ
+! ..
+        JNZ(1:N) = 0
+        J = JCOL
+
+!       Locate the row positions of the nonzeros in column J.
+
+!       Vertical extent of band = KBEGIN to KFINI.
+        KBEGIN = MAX(J-MU,1)
+        KFINI = MIN(J+ML,N)
+!       KJ = number of nonzeros in column J.
+        KJ = 0
+!       For each row in the intersection of the band with
+!       this column ...
+        DO K = KBEGIN, KFINI
+!          Does column J intersect a super diagonal at (K,J)?
+           IF (K < J) THEN
+              DO I = NSUPS, 1, -1
+                 KI = J + 1 - SUPDS(I)
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    JNZ(KJ) = K
+                    GOTO 10
+                 END IF
+              END DO
+           ELSEIF (K == J) THEN
+!             We are on the main diagonal.
+              KJ = KJ + 1
+              JNZ(KJ) = K
+              GOTO 10
+           ELSE
+!             Does column J intersect a sub diagonal at (K,J)?
+              DO I = NSUBS, 1, -1
+                 KI = SUBDS(I) + J - 1
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    JNZ(KJ) = K
+                    GOTO 10
+                 END IF
+              END DO
+           END IF
+10         CONTINUE
+        END DO
+        NZJ = KJ
+     RETURN
+
+   END SUBROUTINE BANDED_GET_BJNZ
+!_______________________________________________________________________
+
+! Beginning of Jacobian related routines that use MA28
+
+      SUBROUTINE DVNLSS28(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC, &
+        NFLAG,ATOL,ITOL)
+! ..
+! This is the nonlinear system solver for MA28 based sparse solutions.
+! ..
+! Subroutine DVNLSS28 is a nonlinear system solver, which uses functional
+! iteration or a chord (modified Newton) method. For the chord method
+! direct linear algebraic system solvers are used. Subroutine DVNLSS28
+! then handles the corrector phase of this integration package.
+! Communication with DVNLSS28 is done with the following variables. (For
+! more details, please see the comments in the driver subroutine.)
+! Y          = The dependent variable, a vector of length N, input.
+! YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+!              and output. On input, it contains predicted values.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! SAVF       = A work array of length N.
+! EWT        = An error weight vector of length N, input.
+! ACOR       = A work array of length N, used for the accumulated
+!              corrections to the predicted y vector.
+! WM,IWM     = Real and integer work arrays associated with matrix
+!              operations in chord iteration (MITER /= 0).
+! F          = Dummy name for user supplied routine for f.
+! JAC        = Dummy name for user supplied Jacobian routine.
+! NFLAG      = Input/output flag, with values and meanings as follows:
+!              INPUT
+!                  0 first call for this time step.
+!                 -1 convergence failure in previous call to DVNLSS28.
+!                 -2 error test failure in DVSTEP.
+!              OUTPUT
+!                  0 successful completion of nonlinear solver.
+!                 -1 convergence failure or singular matrix.
+!                 -2 unrecoverable error in matrix preprocessing
+!                    (cannot occur here).
+!                 -3 unrecoverable error in solution (cannot occur
+!                    here).
+! IPUP       = Own variable flag with values and meanings as follows:
+!              0,          do not update the Newton matrix.
+!              MITER \= 0  update Newton matrix, because it is the
+!                          initial step, order was changed, the error
+!                          test failed, or an update is indicated by
+!                          the scalar RC or step counter NST.
+! For more details, see comments in driver subroutine.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, LDYH
+        INTEGER, INTENT (INOUT) :: NFLAG
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER IWM(*)
+        LOGICAL DUMMY
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACNRMNEW, CSCALE, DCON, DEL, DELP
+        INTEGER :: I, IERPJ, IERSL, M
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNLSS28
+! ..
+! Get rid of a couple of needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          WM(1) = ZERO
+          IWM(1) = 0
+        END IF  
+! On the first step, on a change of method order, or after a
+! nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+! to force a Jacobian update when MITER /= 0.
+        IF (JSTART==0) NSLP = 0
+        IF (NFLAG==0) ICF = 0
+        IF (NFLAG==-2) IPUP = MITER
+        IF ((JSTART==0) .OR. (JSTART==-1)) IPUP = MITER
+!       If this is functional iteration, set CRATE = 1 and drop
+!       to 220.
+        IF (MITER==0) THEN
+          CRATE = ONE
+          GOTO 10
+        END IF
+
+! RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER
+! to force DVJACS28 to be called, if a Jacobian is involved. In any
+! case, DVJACS28 is called at least every MSBP steps.
+
+        DRC = ABS(RC-ONE)
+        IF (DRC>CCMAX .OR. NST>=NSLP+MSBP) IPUP = MITER
+
+! Up to MAXCOR corrector iterations are taken. A convergence test is
+! made on the r.m.s. norm of each correction, weighted by the error
+! weight vector EWT. The sum of the corrections is accumulated in the
+! vector ACOR(i). The YH array is not altered in the corrector loop.
+
+10      M = 0
+        DELP = ZERO
+! Original:
+!       CALL DCOPY_F90(N,YH(1,1),1,Y,1)
+        CALL DCOPY_F90(N,YH(1:N,1),1,Y(1:N),1)
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        IF (IPUP<=0) GOTO 20
+
+! If indicated, the matrix P = I - h*rl1*J is reevaluated and
+! preprocessed before starting the corrector iteration. IPUP
+! is set to 0 as an indicator that this has been done.
+
+        CALL DVJACS28(Y,YH,LDYH,EWT,ACOR,SAVF,F,JAC,IERPJ,N, &
+          ATOL,ITOL)
+        IPUP = 0
+        RC = ONE
+        DRC = ZERO
+        CRATE = ONE
+        NSLP = NST
+!     If matrix is singular, take error return to force cut in
+!     step size.
+        IF (IERPJ/=0) GOTO 70
+20      ACOR(1:N) = ZERO
+!       This is a looping point for the corrector iteration.
+30      IF (MITER/=0) GOTO 40
+
+! In the case of functional iteration, update Y directly from
+! the result of the last function evaluation.
+
+        SAVF(1:N) = RL1*(H*SAVF(1:N)-YH(1:N,2))
+        Y(1:N) = SAVF(1:N) - ACOR(1:N)
+        DEL = DVNORM(N,Y,EWT)
+        Y(1:N) = YH(1:N,1) + SAVF(1:N)
+        CALL DCOPY_F90(N,SAVF,1,ACOR,1)
+        GOTO 50
+
+! In the case of the chord method, compute the corrector error,
+! and solve the linear system with that as right-hand side and
+! P as coefficient matrix. The correction is scaled by the factor
+! 2/(1+RC) to account for changes in h*rl1 since the last
+! DVJACS28 call.
+
+40      Y(1:N) = (RL1*H)*SAVF(1:N) - (RL1*YH(1:N,2)+ACOR(1:N))
+        CALL DVSOLS28(Y,SAVF,IERSL)
+        NNI = NNI + 1
+        IF (IERSL>0) GOTO 60
+        IF (METH==2 .AND. ABS(RC-ONE)>ZERO) THEN
+          CSCALE = TWO/(ONE+RC)
+          CALL DSCAL_F90(N,CSCALE,Y,1)
+        END IF
+        DEL = DVNORM(N,Y,EWT)
+        CALL DAXPY_F90(N,ONE,Y,1,ACOR,1)
+        Y(1:N) = YH(1:N,1) + ACOR(1:N)
+
+! Test for convergence. If M > 0, an estimate of the convergence
+! rate constant is stored in CRATE, and this is used in the test.
+
+50      IF (M/=0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+        DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+        IF (DCON<=ONE) GOTO 80
+        M = M + 1
+        IF (M==MAXCOR) GOTO 60
+        IF (M>=2 .AND. DEL>RDIV*DELP) GOTO 60
+        DELP = DEL
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(I),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(I),ZERO)
+          END DO
+        END IF
+        GOTO 30
+
+60      IF (MITER==0 .OR. JCUR==1) GOTO 70
+        ICF = 1
+        IPUP = MITER
+        GOTO 10
+
+70      CONTINUE
+        NFLAG = -1
+        ICF = 2
+        IPUP = MITER
+        RETURN
+
+!       Return for successful step.
+80      NFLAG = 0
+
+!       Enforce bounds.
+        IF (BOUNDS) THEN
+          CHANGED_ACOR = .FALSE.
+          IF (M==0) THEN
+            ACNRM = DEL
+          ELSE
+            ACNRM = DVNORM(N,ACOR,EWT)
+          END IF
+          IF (MITER/=0) THEN
+!           Since Y(:) = YH(:,1) + ACOR(:):
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+              IF (Y(IDX(I))>UB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+            END DO
+          ELSE
+!           Since Y(:) = YH(:,1) + SAVF(:) and
+!           since CALL DCOPY_F90(N, SAVF, 1, ACOR, 1) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+              END IF
+              IF (Y(IDX(I))>UB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+              END IF
+            END DO
+          END IF
+          IF (CHANGED_ACOR) THEN
+            IF (M==0) THEN
+              ACNRMNEW = DEL
+            ELSE
+              ACNRMNEW = DVNORM(N,ACOR,EWT)
+            END IF
+            ACNRM = MAX(ACNRM,ACNRMNEW)
+          ELSE
+          END IF
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+        ELSE
+!         No projections are required.
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+          IF (M==0) ACNRM = DEL
+          IF (M>0) ACNRM = DVNORM(N,ACOR,EWT)
+        END IF
+        RETURN
+
+      END SUBROUTINE DVNLSS28
+!_______________________________________________________________________
+
+      SUBROUTINE DVSOLS28(X,TEM,IERSL)
+! ..
+! Manage the solution of the MA28 based sparse linear system arising
+! from a chord iteration.
+! ..
+! This routine solves the sparse linear system arising from a chord
+! iteration. If MITER is 6 or 7, it calls MA28CD to accomplish this.
+! Communication with DVSOLS28 uses the following variables:
+! X = The right-hand side vector on input, and the solution vector
+!     on output, of length N.
+! TEM (=SAVF(*))
+! IERSL = Output flag. IERSL = 0 if no trouble occurred.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERSL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: TEM(*), X(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSOLS28
+! ..
+        IF (SCALE_MATRIX) THEN
+           DO I = 1, N
+              X(I) = X(I) * RSCALEX(I)
+           END DO
+        END IF
+        IERSL = 0
+        CALL MA28CD(N,PMAT,LICN_ALL,ICN,IKEEP28,X,TEM,1)
+        MA28CD_CALLS = MA28CD_CALLS + 1
+        IF (SCALE_MATRIX) THEN
+           DO I = 1, N
+              X(I) = X(I) * CSCALEX(I)
+           END DO
+        END IF
+        RETURN
+
+      END SUBROUTINE DVSOLS28
+!_______________________________________________________________________
+
+      SUBROUTINE DVJACS28(Y,YH,LDYH,EWT,FTEMP1,SAVF,F,JAC,IERPJ,N, &
+        ATOL,ITOL)
+! ..
+! Compute and process P = I - H*RL1*J, where J is an approximation to
+! the MA28 based sparse Jacobian.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERPJ
+        INTEGER, INTENT (IN) :: LDYH, N, ITOL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), FTEMP1(*), SAVF(*), Y(*), YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CON, FAC, HRL1, R, R0, SRUR
+        INTEGER :: I, IER, J, JER, JJ, JJ1, JJ2, K, K1, K2, MA28,       &
+          MA28SAVE, MB28SAVE, NG, NZ
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, EXP, MAX, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJACS28
+! ..
+        IERPJ = 0
+
+!       Structure determination
+
+!       Calculate the sparsity structure if this is the first call to
+!       DVJACS28 with ISTATE = 1 or if it is a continuation call with
+!       ISTATE = 3.
+        IF (ISTATC==1 .OR. ISTATC==3) THEN
+          CALL DVPREPS(N,Y,YH,LDYH,DTEMP,EWT,F,JAC)
+          ISTATC = 0
+        END IF
+        JCUR = 0
+        HRL1 = H*RL1
+        CON = -HRL1
+
+!       If MA28 = 4 the saved copy of the Jacobian will be used
+!       to restore PMAT. If MA28 = 1,2,3 the Jacobian will be
+!       recomputed. If MA28 = 1,2 the JVECT and ICN pointer arrays
+!       will be defined and MA28AD will be called to decompose
+!       PMAT. If MA28 = 3 the JVECT pointer array will be defined
+!       and MA28BD will be called to decompose PMAT using the ICN
+!       pointer array returned in the last call to MA28AD.
+
+        MA28 = 4
+        IF (INEWJ==1 .OR. MB28==0) MA28 = 3
+        IF (NST>=NSLJ+MSBJ) MA28 = 3
+!       IF (ICF==1 .OR. ICF==2) MA28 = 3
+        IF (ICF==1 .AND. DRC<CCMXJ) MA28 = 3
+        IF (ICF==2) MA28 = 3
+        IF (NST>=NSLG+MSBG) MA28 = 2
+        IF (JSTART==0 .OR. JSTART==-1) MA28 = 1
+        JSTART = 1
+10      IF (MA28<=2) NSLG = NST
+        IF (MA28<=3) NSLJ = NST
+
+!       Analytical Sparse Jacobian
+
+!       If MITER = 6, call JAC to evaluate J analytically, multiply
+!       J by CON = -H*EL(1), and add the identity matrix to form P.
+        IF (MITER==6) THEN
+          IF (MA28==4) THEN
+!           Reuse the saved Jacobian.
+            NZ = IAN(N+1) - 1
+            PMAT(1:NZ) = CON*JMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==JVECT(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 90
+          END IF
+          JCUR = 1
+          NJE = NJE + 1
+          IF (MA28==1 .OR. MA28==2) THEN
+            NZ = IAN(N+1) - 1
+            CALL JAC(N,TN,Y,IAN,JAN,NZ,PMAT)
+            NZ = IAN(N+1) - 1
+            IF (NZ>NZ_ALL) THEN
+              MSG = 'DVODE_F90-- NZ > NZ_ALL in DVJACS28.'
+              CALL XERRDV(MSG,1670,2,0,0,0,0,ZERO,ZERO)
+            END IF
+!           Define column pointers for MA28AD.
+            CALL SET_ICN(N,IAN,ICN)
+            CALL CHECK_DIAG(N,IAN,JAN,ICN)
+            PMAT(1:NZ) = CON*PMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==ICN(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 80
+          ELSE
+!           MA28 = 3...
+            NZ = IAN(N+1) - 1
+            CALL JAC(N,TN,Y,IAN,JAN,NZ,PMAT)
+            NZ = IAN(N+1) - 1
+            IF (NZ>NZ_ALL) THEN
+              MSG = 'DVODE_F90-- NZ > NZ_ALL in DVJACS28.'
+              CALL XERRDV(MSG,1680,2,0,0,0,0,ZERO,ZERO)
+            END IF
+!           Define column pointers for MA28AD.
+            CALL SET_ICN(N,IAN,JVECT)
+            CALL CHECK_DIAG(N,IAN,JAN,JVECT)
+            IF (INEWJ/=1) JMAT(1:NZ) = PMAT(1:NZ)
+            PMAT(1:NZ) = CON*PMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==JVECT(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 90
+          END IF
+        END IF
+
+!       Finite Difference Sparse Jacobian
+
+!       If MITER = 7, evaluate J numerically, multiply J by
+!       CON, and add the identity matrix to form P.
+        IF (MITER==7) THEN
+          IF (MA28==4) THEN
+!           Reuse the saved constant Jacobian.
+            NZ = IAN(N+1) - 1
+            PMAT(1:NZ) = CON*JMAT(1:NZ)
+            DO J = 1, N
+              K1 = IAN(J)
+              K2 = IAN(J+1) - 1
+              DO K = K1, K2
+                I = JAN(K)
+                IF (I==J) PMAT(K) = PMAT(K) + ONE
+              END DO
+            END DO
+            GOTO 90
+          ELSE
+            NZ = IAN(N+1) - 1
+            JCUR = 1
+            IF (.NOT.(J_IS_CONSTANT.AND.J_HAS_BEEN_COMPUTED)) THEN
+               IF (USE_JACSP) THEN
+!                 Approximate the Jacobian using Doug Salane's JACSP.
+!                 The JPNTRDS and INDROWDS pointer arrays were defined
+!                 in DVPREPS (and altered in DSM).
+                  IOPTDS(1) = 2
+                  IOPTDS(2) = 0
+                  IOPTDS(3) = 1
+                  IOPTDS(5) = 0
+!                 INFORDS(4) was initialized in DVPREPS (and altered in
+!                 the first call to JACSP).
+                  LWKDS  = 3 * N
+                  LIWKDS = 50 + N
+                  NRFJACDS = NZ
+                  NCFJACDS = 1
+
+!                 Set flag to indicate how the YSCALE vector will be
+!                 set for JACSP.
+                  LIKE_ORIGINAL_VODE = .FALSE.
+!                 Calculate the YSCALEDS vector for JACSPDV.
+                  IF (LIKE_ORIGINAL_VODE) THEN
+                     FAC = DVNORM(N,SAVF,EWT)
+!                    JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                    R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                     R0 = THOU*ABS(H)*REAL(N)*FAC
+                     IF (ABS(R0)<=ZERO) R0 = ONE
+!                    SRUR = WM1
+                     DO J = 1, N
+!                       JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                       R = MAX(ABS(Y(J)),R0/EWT(J))
+                        R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                        YSCALEDS(J) = R
+                     END DO
+                  ELSE
+                     IF (ITOL == 1 .OR. ITOL == 3) THEN
+                        DO J = 1, N
+                           YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                        END DO
+                     ELSE
+                        DO J = 1, N
+                          YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                        END DO
+                     END IF
+                  END IF
+
+                  CALL JACSPDB(F,N,TN,Y,SAVF,PMAT(1),NRFJACDS, &
+                    YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS, &
+                    MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+                  NFE = NFE + IWKDS(7)
+                  NJE = NJE + 1
+
+                  DO NG = 1, MAXGRPDS
+                    JJ1 = IGP(NG)
+                    JJ2 = IGP(NG+1) - 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      K1 = IAN(J)
+                      K2 = IAN(J+1) - 1
+                      DO K = K1, K2
+                        I = JAN(K)
+                        GOTO (17,17,18) MA28
+!                       Define the row pointers for MA28AD.
+17                      JVECT(K) = I
+!                       Define the column pointers for MA28AD.
+                        ICN(K) = J
+                        GOTO 19
+!                       Define the column pointers for MA28AD.
+18                      JVECT(K) = J
+19                      CONTINUE
+                        IF (INEWJ==0) JMAT(K) = PMAT(K)
+                        PMAT(K) = CON*PMAT(K)
+                        IF (I==J) PMAT(K) = PMAT(K) + ONE
+                      END DO
+                    END DO
+                  END DO
+                  NFE = NFE + MAXGRPDS
+               ELSE
+                  FAC = DVNORM(N,SAVF,EWT)
+                  R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                  IF (ABS(R0)<=ZERO) R0 = ONE
+                  SRUR = WM1
+                  DO NG = 1, NGP
+                    JJ1 = IGP(NG)
+                    JJ2 = IGP(NG+1) - 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                      Y(J) = Y(J) + R
+                    END DO
+                    CALL F(N,TN,Y,FTEMP1)
+                    NFE = NFE + 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      Y(J) = YH(J,1)
+                      R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                      FAC = ONE / R
+                      K1 = IAN(J)
+                      K2 = IAN(J+1) - 1
+                      DO K = K1, K2
+                        I = JAN(K)
+                        GOTO (20,20,30) MA28
+!                       Define row pointers for MA28AD.
+20                      JVECT(K) = I
+!                       Define column pointers for MA28AD.
+                        ICN(K) = J
+                        GOTO 40
+!                       Define column pointers for MA28AD.
+30                      JVECT(K) = J
+40                      PMAT(K) = (FTEMP1(I)-SAVF(I)) * FAC
+                        IF (INEWJ==0) JMAT(K) = PMAT(K)
+                        PMAT(K) = CON*PMAT(K)
+                        IF (I==J) PMAT(K) = PMAT(K) + ONE
+                      END DO
+                    END DO
+                  END DO
+                  NFE = NFE + NGP
+                  NJE = NJE + 1
+               END IF
+               IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+            ELSE
+!              Do not recompute the constant Jacobian.
+!              Reuse the saved Jacobian.
+               NZ = IAN(N+1) - 1
+               PMAT(1:NZ) = CON*JMAT(1:NZ)
+               DO J = 1, N
+                 K1 = IAN(J)
+                 K2 = IAN(J+1) - 1
+                 DO K = K1, K2
+                   I = JAN(K)
+                   IF (I==J) PMAT(K) = PMAT(K) + ONE
+                   GOTO (50,50,60) MA28
+!                  Define row pointers for MA28AD.
+50                 JVECT(K) = I
+!                  Define column pointers for MA28AD.
+                   ICN(K) = J
+                   GOTO 70
+!                  Define column pointers for MA28AD.
+60                 JVECT(K) = J
+70                 CONTINUE
+                 END DO
+               END DO
+            END IF
+            GOTO (80,80,90) MA28
+          END IF
+        END IF
+
+!       MA28AD does an LU factorization based on a pivotal strategy
+!       designed to compromise between maintaining sparsity and
+!       controlling loss of accuracy due to roundoff error. Unless
+!       magnitudes of Jacobian elements change so as to invalidate
+!       choice of pivots, MA28AD need only be called at beginning
+!       of the integration.
+
+80      CONTINUE
+        IF (SCALE_MATRIX) THEN
+!          MA19AD computes scaling factors for the iteration matrix.
+           CALL MC19AD(N,NZ,PMAT,JAN,ICN,RSCALEX,CSCALEX,WSCALEX)
+           MC19AD_CALLS = MC19AD_CALLS + 1
+           DO I =1, N
+              RSCALEX(I) = EXP(RSCALEX(I))
+              CSCALEX(I) = EXP(CSCALEX(I))
+           END DO
+           DO K = 1, NZ
+              I = JAN(K)
+              J = ICN(K)
+              PMAT(K) = PMAT(K) * RSCALEX(I) * CSCALEX(J)
+           END DO
+        END IF
+        OK_TO_CALL_MA28 = .TRUE.
+        CALL MA28AD(N,NZ,PMAT,LICN_ALL,JAN,LIRN_ALL,ICN,U_PIVOT, &
+          IKEEP28,IW28,FTEMP1,IER)
+        OK_TO_CALL_MA28 = .FALSE.
+        MA28AD_CALLS = MA28AD_CALLS + 1
+        MA28SAVE = MA28
+        MB28SAVE = MB28
+        MB28 = 0
+        NLU = NLU + 1
+        MAX_MINIRN = MAX(MAX_MINIRN,MINIRN)
+        MAX_MINICN = MAX(MAX_MINICN,MINICN)
+!       IER = -1: Numerically singular Jacobian
+!       IER = -2: Structurally singular Jacobian
+        IF (IER==-1 .OR. IER==-2) IERPJ = 1
+        IF (IER==-3) THEN
+!         LIRN_ALL is not large enough.
+          IF (LP /= 0) THEN
+             MSG = 'LIRN_ALL (=I1) is not large enough.'
+             CALL XERRDV(MSG,1690,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Allocating more space for another try.'
+             CALL XERRDV(MSG,1690,1,1,LIRN_ALL,0,0,ZERO,ZERO)
+          END IF
+!         Allocate more space for JAN and JVECT and try again.
+          LIRN_ALL = LIRN_ALL + MAX(MAX(1000,ELBOW_ROOM*NZ_SWAG),10*N)
+          LIRN_ALL = MAX(LIRN_ALL,(11*MINIRN)/10)
+          IF (LIRN_ALL>MAX_ARRAY_SIZE) THEN
+            MSG = 'Maximum array size exceeded. Stopping.'
+            CALL XERRDV(MSG,1700,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DEALLOCATE (JAN,STAT=JER)
+          CALL CHECK_STAT(JER,820)
+          ALLOCATE (JAN(LIRN_ALL),STAT=JER)
+          CALL CHECK_STAT(JER,830)
+          IF (MITER==7) THEN
+            JAN(1:NZ) = JVECT(1:NZ)
+          END IF
+          DEALLOCATE (JVECT,STAT=JER)
+          CALL CHECK_STAT(JER,840)
+          ALLOCATE (JVECT(LIRN_ALL),STAT=JER)
+          CALL CHECK_STAT(JER,850)
+          IF (MITER==7) THEN
+            JVECT(1:NZ) = JAN(1:NZ)
+          END IF
+          MA28 = MA28SAVE
+          MB28 = MB28SAVE
+          NLU = NLU - 1
+!         Since PMAT has changed, it must be restored:
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+          GOTO 10
+        END IF
+        IF (IER==-4 .OR. IER==-5 .OR. IER==-6) THEN
+!         LICN_ALL is not large enough.
+          IF (LP /= 0) THEN
+             MSG = 'LICN_ALL (=I1) is not large enough.'
+             CALL XERRDV(MSG,1710,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Allocating more space for another try.'
+             CALL XERRDV(MSG,1710,1,1,LICN_ALL,0,0,ZERO,ZERO)
+          END IF
+!         Allocate more space for JAN and JVECT and try again.
+          LICN_ALL = LICN_ALL + MAX(MAX(1000,ELBOW_ROOM*NZ_SWAG),10*N)
+          LICN_ALL = MAX(LICN_ALL,(11*MINICN)/10)
+          IF (LICN_ALL>MAX_ARRAY_SIZE) THEN
+            MSG = 'Maximum array size exceeded. Stopping.'
+            CALL XERRDV(MSG,1720,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DEALLOCATE (PMAT,ICN,STAT=JER)
+          CALL CHECK_STAT(JER,860)
+          ALLOCATE (PMAT(LICN_ALL),ICN(LICN_ALL),STAT=JER)
+          PMAT(1:LICN_ALL) = ZERO
+          CALL CHECK_STAT(JER,870)
+          IF (MITER==7) THEN
+            JAN(1:NZ) = JVECT(1:NZ)
+          END IF
+          MA28 = MA28SAVE
+          MB28 = MB28SAVE
+          NLU = NLU - 1
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+          GOTO 10
+        END IF
+        IF (MITER/=7) RETURN
+        JAN(1:NZ) = JVECT(1:NZ)
+        RETURN
+
+!       MA28BD uses the pivot sequence generated by an earlier call
+!       to MA28AD to factor a new matrix of the same structure.
+
+90      CONTINUE
+
+        IF (SCALE_MATRIX) THEN
+           DO K =1, NZ
+              I = JAN(K)
+              J = JVECT(K)
+              PMAT(K) = PMAT(K) * RSCALEX(I) * CSCALEX(J)
+           END DO
+        END IF
+        CALL MA28BD(N,NZ,PMAT,LICN_ALL,JAN,JVECT,ICN,IKEEP28,IW28, &
+          FTEMP1,IER)
+        MA28BD_CALLS = MA28BD_CALLS + 1
+        MB28 = 1
+        NLU = NLU + 1
+!       IER = -2 : The matrix is numerically singular. The MA28AD
+!                  pivot sequence leads to a zero pivot, that is,
+!                  to one for which the ratio of it to the smallest
+!                  element in the row is less than EPS.
+!       IER = -13: The matrix is structurally singular.
+
+        IF (REDO_PIVOT_SEQUENCE) THEN
+!          Force MA28AD to calculate a new pivot sequence.
+           IF (IER/=-13 .AND. IER/=-2 .AND. IER<=0) RETURN
+           IF (IER==-2) MA28 = 1
+           IF (IER==-13) MA28 = 1
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        ELSE
+           IF (IER==-2) IERPJ = 1
+           IF (IER/=-13 .AND. IER<=0) RETURN
+           IF (IER==-13) MA28 = 1
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        END IF
+        IF (IER>0) MA28 = 2
+        IF (IER==-13 .AND. MITER==7 .AND. MOSS==2) THEN
+!          Recompute the sparsity structure.
+           CALL DVRENEW(N,Y,SAVF,EWT,F)
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        END IF
+        GOTO 10
+
+      END SUBROUTINE DVJACS28
+! End of Jacobian related routines that use MA28
+!_______________________________________________________________________
+
+      SUBROUTINE SET_ICN(N,IA,ICN)
+! ..
+! Define the column locations of nonzero elements for a sparse
+! matrix.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*)
+        INTEGER, INTENT (INOUT) :: ICN(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, KMAX, KMIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_ICN
+! ..
+        KMIN = 1
+        DO J = 1, N
+          KMAX = IA(J+1) - 1
+          ICN(KMIN:KMAX) = J
+          KMIN = KMAX + 1
+        END DO
+
+      END SUBROUTINE SET_ICN
+!_______________________________________________________________________
+
+      SUBROUTINE CHECK_DIAG(N,IA,JA,ICN)
+! ..
+! Check that the diagonal is included in the sparse matrix
+! description arrays.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*), ICN(*), JA(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, K, KMAX, KMIN
+        CHARACTER (80) :: MSG
+! ..
+! .. FIRST EXECUTABLE STATEMENT CHECK_DIAG
+! ..
+        KMIN = 1
+        DO J = 1, N
+          KMAX = IA(J+1) - 1
+          DO K = KMIN, KMAX
+            IF (JA(K)==ICN(K)) GOTO 10
+          END DO
+          MSG = 'In CHECK_DIAG, the diagonal is not present.'
+          CALL XERRDV(MSG,1730,2,0,0,0,0,ZERO,ZERO)
+10        CONTINUE
+          KMIN = KMAX + 1
+        END DO
+
+      END SUBROUTINE CHECK_DIAG
+!_______________________________________________________________________
+
+      SUBROUTINE DVCHECK(JOB,G,NEQ,Y,YH,NYH,G0,G1,GX,IRT)
+! ..
+! Check for the presence of a root in the vicinity of the current T,
+! in a manner depending on the input flag JOB, and call DVROOTS to
+! locate the root as precisely as possible.
+! ..
+! This subroutine is essentially DRCHEK from LSODAR.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IRT
+        INTEGER, INTENT (IN) :: JOB, NEQ, NYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: G0(*), G1(*), GX(*), Y(*), YH(NYH,*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL G
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: HMING, T1, TEMP1, TEMP2, X
+        INTEGER :: I, IFLAG, JFLAG
+        LOGICAL :: ZROOT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, SIGN
+! ..
+! In addition to variables described previously, DVCHECK
+! uses the following for communication:
+! JOB    = integer flag indicating type of call:
+!          JOB = 1 means the problem is being initialized, and DVCHECK
+!                  is to look for a root at or very near the initial T.
+!          JOB = 2 means a continuation call to the solver was just
+!                  made, and DVCHECK is to check for a root in the
+!                  relevant part of the step last taken.
+!          JOB = 3 means a successful step was just taken, and DVCHECK
+!                  is to look for a root in the interval of the step.
+! G0     = array of length NG, containing the value of g at T = T0ST.
+!          G0 is input for JOB >= 2, and output in all cases.
+! G1,GX  = arrays of length NG for work space.
+! IRT    = completion flag:
+!          IRT = 0  means no root was found.
+!          IRT = -1 means JOB = 1 and a root was found too near to T.
+!          IRT = 1  means a legitimate root was found (JOB = 2 or 3).
+!                   On return, T0ST is the root location, and Y is the
+!                   corresponding solution vector.
+! T0ST   = value of T at one endpoint of interval of interest. Only
+!          roots beyond T0ST in the direction of integration are sought.
+!          T0ST is input if JOB >= 2, and output in all cases.
+!          T0ST is updated by DVCHECK, whether a root is found or not.
+! TLAST  = last value of T returned by the solver (input only).
+! TOUTC  = copy of TOUT(input only).
+! IRFND  = input flag showing whether the last step taken had a root.
+!          IRFND = 1 if it did, = 0 if not.
+! ITASKC = copy of ITASK (input only).
+! NGC    = copy of NG (input only).
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVCHECK
+! ..
+        IRT = 0
+        JROOT(1:NGC) = 0
+        HMING = (ABS(TN)+ABS(H))*UROUND*HUN
+
+        GOTO (10,30,80) JOB
+
+!       Evaluate g at initial T, and check for zero values.
+10      CONTINUE
+        T0ST = TN
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 20
+!       g has a zero at T. Look at g at T + (small increment).
+!       TEMP1 = SIGN(HMING, H)
+!       T0ST = T0ST + TEMP1
+!       TEMP2 = TEMP1 / H
+        TEMP2 = MAX(HMING/ABS(H),TENTH)
+        TEMP1 = TEMP2*H
+        T0ST = T0ST + TEMP1
+        Y(1:N) = Y(1:N) + TEMP2*YH(1:N,2)
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 20
+!       g has a zero at T and also close to T. Take error return.
+        IRT = -1
+        RETURN
+
+20      CONTINUE
+        RETURN
+
+30      CONTINUE
+        IF (IRFND==0) GOTO 70
+!       If a root was found on the previous step, evaluate G0 = g(T0ST).
+        CALL DVINDY_CORE(T0ST,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 70
+!       g has a zero at T0ST. Look at g at T + (small increment).
+        TEMP1 = SIGN(HMING,H)
+        T0ST = T0ST + TEMP1
+        IF ((T0ST-TN)*H<ZERO) GOTO 40
+        TEMP2 = TEMP1/H
+        Y(1:N) = Y(1:N) + TEMP2*YH(1:N,2)
+        GOTO 50
+40      CALL DVINDY_CORE(T0ST,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+50      CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO 60 I = 1, NGC
+          IF (ABS(G0(I))>ZERO) GOTO 60
+          JROOT(I) = 1
+          ZROOT = .TRUE.
+60      END DO
+        IF (.NOT.ZROOT) GOTO 70
+!       g has a zero at T0ST and also close to T0ST. Return root.
+        IRT = 1
+        RETURN
+!       G0 has no zero components. Proceed to check relevant interval.
+70      IF (ABS(TN-TLAST)<=ZERO) GOTO 130
+
+80      CONTINUE
+!       Set T1 to TN or TOUTC, whichever comes first, and get g at T1.
+        IF (ITASKC==2 .OR. ITASKC==3 .OR. ITASKC==5) GOTO 90
+        IF ((TOUTC-TN)*H>=ZERO) GOTO 90
+        T1 = TOUTC
+        IF ((T1-T0ST)*H<=ZERO) GOTO 130
+        CALL DVINDY_CORE(T1,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        GOTO 100
+90      T1 = TN
+        DO I = 1, N
+          Y(I) = YH(I,1)
+        END DO
+100     CALL G(NEQ,T1,Y,NGC,G1)
+        NGE = NGE + 1
+!       Call DVROOTS to search for root in interval from T0ST to T1.
+        JFLAG = 0
+110     CONTINUE
+        CALL DVROOTS(NGC,HMING,JFLAG,T0ST,T1,G0,G1,GX,X)
+        IF (JFLAG>1) GOTO 120
+        CALL DVINDY_CORE(X,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        CALL G(NEQ,X,Y,NGC,GX)
+        NGE = NGE + 1
+        GOTO 110
+120     T0ST = X
+        CALL DCOPY_F90(NGC,GX,1,G0,1)
+        IF (JFLAG==4) GOTO 130
+!       Found a root. Interpolate to X and return.
+        CALL DVINDY_CORE(X,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        IRT = 1
+        RETURN
+130     CONTINUE
+        RETURN
+
+      END SUBROUTINE DVCHECK
+!_______________________________________________________________________
+
+      SUBROUTINE DVROOTS(NG,HMIN,JFLAG,X0,X1,G0,G1,GX,X)
+! ..
+! Perform root finding for DVODE_F90.
+! ..
+! This is essentially subroutine DROOTS from LSODAR.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: HMIN
+        KPP_REAL, INTENT (INOUT) :: X, X0, X1
+        INTEGER, INTENT (INOUT) :: JFLAG
+        INTEGER, INTENT (IN) :: NG
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: G0(NG), G1(NG), GX(NG)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T2, TMAX
+        INTEGER :: I, IMXOLD, NXLAST
+        LOGICAL :: SGNCHG, XROOT, ZROOT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, SIGN
+! ..
+! This subroutine finds the leftmost root of a set of arbitrary
+! functions gi(x) (i = 1,...,NG) in an interval (X0,X1). Only roots
+! of odd multiplicity (i.e. changes of sign of the gi) are found.
+! Here the sign of X1 - X0 is arbitrary, but is constant for a given
+! problem, and 'leftmost' means nearest to X0.The values of the
+! vector-valued function g(x) = (gi, i=1...NG) are communicated
+! through the call sequence of DVROOTS. The method used is the
+! Illinois algorithm.
+
+! Reference:
+! Kathie L. Hiebert and Lawrence F. Shampine, Implicitly Defined
+! Output Points for Solutions of ODEs, Sandia Report SAND/80-0180,
+! February 1980.
+
+! Description of parameters.
+
+! NG     = number of functions gi, or the number of components of
+!          the vector valued function g(x). Input only.
+
+! HMIN   = resolution parameter in X. Input only. When a root is
+!          found, it is located only to within an error of HMIN in X.
+!          Typically, HMIN should be set to something on the order of
+!               100 * UROUND * MAX(ABS(X0),ABS(X1)),
+!          where UROUND is the unit roundoff of the machine.
+
+! JFLAG  = integer flag for input and output communication.
+
+!          On input, set JFLAG = 0 on the first call for the problem,
+!          and leave it unchanged until the problem is completed.
+!          (The problem is completed when JFLAG >= 2 on return.)
+
+!          On output, JFLAG has the following values and meanings:
+!          JFLAG = 1 means DVROOTS needs a value of g(x). Set GX = g(X)
+!                    and call DVROOTS again.
+!          JFLAG = 2 means a root has been found. The root is
+!                    at X, and GX contains g(X). (Actually, X is the
+!                    rightmost approximation to the root on an interval
+!                    (X0,X1) of size HMIN or less.)
+!          JFLAG = 3 means X = X1 is a root, with one or more of the gi
+!                    being zero at X1 and no sign changes in (X0,X1).
+!                    GX contains g(X) on output.
+!          JFLAG = 4 means no roots (of odd multiplicity) were
+!                    found in (X0,X1) (no sign changes).
+
+! X0,X1  = endpoints of the interval where roots are sought.
+!          X1 and X0 are input when JFLAG = 0 (first call), and
+!          must be left unchanged between calls until the problem is
+!          completed. X0 and X1 must be distinct, but X1 - X0 may be
+!          of either sign. However, the notion of 'left' and 'right'
+!          will be used to mean nearer to X0 or X1, respectively.
+!          When JFLAG >= 2 on return, X0 and X1 are output, and
+!          are the endpoints of the relevant interval.
+
+! G0,G1  = arrays of length NG containing the vectors g(X0) and g(X1),
+!          respectively. When JFLAG = 0, G0 and G1 are input and
+!          none of the G0(i) should be zero.
+!          When JFLAG >= 2 on return, G0 and G1 are output.
+
+! GX     = array of length NG containing g(X). GX is input
+!          when JFLAG = 1, and output when JFLAG >= 2.
+
+! X      = independent variable value. Output only.
+!          When JFLAG = 1 on output, X is the point at which g(x)
+!          is to be evaluated and loaded into GX.
+!          When JFLAG = 2 or 3, X is the root.
+!          When JFLAG = 4, X is the right endpoint of the interval, X1.
+
+! JROOT  = integer array of length NG. Output only.
+!          When JFLAG = 2 or 3, JROOT indicates which components
+!          of g(x) have a root at X. JROOT(i) is 1 if the i-th
+!          component has a root, and JROOT(i) = 0 otherwise.
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVROOTS
+! ..
+        IF (JFLAG==1) GOTO 90
+!       JFLAG /= 1. Check for change in sign of g or zero at X1.
+        IMAX = 0
+        TMAX = ZERO
+        ZROOT = .FALSE.
+        DO 20 I = 1, NG
+          IF (ABS(G1(I))>ZERO) GOTO 10
+          ZROOT = .TRUE.
+          GOTO 20
+!         At this point, G0(i) has been checked and cannot be zero.
+10        IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,G1(I)))<=ZERO) GOTO 20
+          T2 = ABS(G1(I)/(G1(I)-G0(I)))
+          IF (T2<=TMAX) GOTO 20
+          TMAX = T2
+          IMAX = I
+20      END DO
+        IF (IMAX>0) GOTO 30
+        SGNCHG = .FALSE.
+        GOTO 40
+30      SGNCHG = .TRUE.
+40      IF (.NOT.SGNCHG) GOTO 200
+!       There is a sign change. Find the first root in the interval.
+        XROOT = .FALSE.
+        NXLAST = 0
+        LAST = 1
+
+!       Repeat until the first root in the interval is found. Loop point.
+50      CONTINUE
+        IF (XROOT) GOTO 170
+        IF (NXLAST==LAST) GOTO 60
+        ALPHA = ONE
+        GOTO 80
+60      IF (LAST==0) GOTO 70
+        ALPHA = HALF*ALPHA
+        GOTO 80
+70      ALPHA = TWO*ALPHA
+80      X2 = X1 - (X1-X0)*G1(IMAX)/(G1(IMAX)-ALPHA*G0(IMAX))
+!       IF ((ABS(X2 - X0) < HMIN) .AND. (ABS(X1 - X0) > TEN * &
+!       HMIN)) X2 = X0 + PT1 * (X1 - X0)
+
+!       If X2 is too close to X0 or X1, adjust it inward,
+!       by a fractional distance that is between 0.1 and 0.5.
+        IF (ABS(X2-X0)<HALF*HMIN) THEN
+          FRACINT = ABS(X1-X0)/HMIN
+          FRACSUB = TENTH
+          IF (FRACINT<=FIVE) FRACSUB = HALF/FRACINT
+          X2 = X0 + FRACSUB*(X1-X0)
+        END IF
+        IF (ABS(X1-X2)<HALF*HMIN) THEN
+          FRACINT = ABS(X1-X0)/HMIN
+          FRACSUB = TENTH
+          IF (FRACINT<=FIVE) FRACSUB = HALF/FRACINT
+          X2 = X1 - FRACSUB*(X1-X0)
+        END IF
+
+        JFLAG = 1
+        X = X2
+!       Return to the calling routine to get a value of GX = g(X).
+        RETURN
+!       Check to see in which interval g changes sign.
+90      IMXOLD = IMAX
+        IMAX = 0
+        TMAX = ZERO
+        ZROOT = .FALSE.
+        DO 110 I = 1, NG
+          IF (ABS(GX(I))>ZERO) GOTO 100
+          ZROOT = .TRUE.
+          GOTO 110
+!         Neither G0(i) nor GX(i) can be zero at this point.
+100       IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,GX(I)))<=ZERO) GOTO 110
+          T2 = ABS(GX(I)/(GX(I)-G0(I)))
+          IF (T2<=TMAX) GOTO 110
+          TMAX = T2
+          IMAX = I
+110     END DO
+        IF (IMAX>0) GOTO 120
+        SGNCHG = .FALSE.
+        IMAX = IMXOLD
+        GOTO 130
+120     SGNCHG = .TRUE.
+130     NXLAST = LAST
+        IF (.NOT.SGNCHG) GOTO 140
+!       Sign change between X0 and X2, so replace X1 with X2.
+        X1 = X2
+        CALL DCOPY_F90(NG,GX,1,G1,1)
+        LAST = 1
+        XROOT = .FALSE.
+        GOTO 160
+140     IF (.NOT.ZROOT) GOTO 150
+!       Zero value at X2 and no sign change in (X0,X2), so X2 is a root.
+        X1 = X2
+        CALL DCOPY_F90(NG,GX,1,G1,1)
+        XROOT = .TRUE.
+        GOTO 160
+!       No sign change between X0 and X2. Replace X0 with X2.
+150     CONTINUE
+        CALL DCOPY_F90(NG,GX,1,G0,1)
+        X0 = X2
+        LAST = 0
+        XROOT = .FALSE.
+160     IF (ABS(X1-X0)<=HMIN) XROOT = .TRUE.
+        GOTO 50
+
+!       Return with X1 as the root. Set JROOT. Set X = X1 and GX = G1.
+170     JFLAG = 2
+        X = X1
+        CALL DCOPY_F90(NG,G1,1,GX,1)
+        DO 190 I = 1, NG
+          JROOT(I) = 0
+          IF (ABS(G1(I))>ZERO) GOTO 180
+          JROOT(I) = 1
+          GOTO 190
+180       IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,G1(I)))>ZERO) JROOT(I) = 1
+190     END DO
+        RETURN
+
+!       No sign change in the interval. Check for zero at right endpoint.
+200     IF (.NOT.ZROOT) GOTO 210
+
+!       Zero value at X1 and no sign change in (X0,X1). Return JFLAG = 3.
+        X = X1
+        CALL DCOPY_F90(NG,G1,1,GX,1)
+        DO I = 1, NG
+          JROOT(I) = 0
+          IF (ABS(G1(I))<=ZERO) JROOT(I) = 1
+        END DO
+        JFLAG = 3
+        RETURN
+
+!       No sign changes in this interval. Set X = X1, return JFLAG = 4.
+210     CALL DCOPY_F90(NG,G1,1,GX,1)
+        X = X1
+        JFLAG = 4
+        RETURN
+
+      END SUBROUTINE DVROOTS
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDP(Y,IYDIM,NEQN,NQ)
+! ..
+! Retract the Nordsieck array (undo prediction).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IYDIM, NEQN, NQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: Y(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, J1, J2
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDP
+! ..
+        DO J1 = 1, NQ
+          DO J2 = J1, NQ
+            J = (NQ+J1) - J2
+            DO I = 1, NEQN
+! Original:
+!             Y(I,J) = Y(I,J) + Y(I,J+1)
+              Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM) + Y(I+J*IYDIM)
+            END DO
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDP
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDN(Y,IYDIM,NEQN,NQ)
+! ..
+! Apply the Nordsieck array (predict).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IYDIM, NEQN, NQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: Y(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, J1, J2
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDN
+! ..
+        DO J1 = 1, NQ
+          DO J2 = J1, NQ
+            J = (NQ+J1) - J2
+            DO I = 1, NEQN
+! Original:
+!             Y(I,J) = Y(I,J) - Y(I,J+1)
+              Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM) - Y(I+J*IYDIM)
+            END DO
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDN
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDS(Y,IYDIM,NEQN,L,RH)
+! ..
+! Scale the Nordsieck array.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: RH
+        INTEGER :: IYDIM, L, NEQN
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: Y(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: R1
+        INTEGER :: I, J
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDS
+! ..
+        R1 = ONE
+        DO J = 2, L
+          R1 = R1*RH
+          DO I = 1, NEQN
+! Original:
+!           Y(I,J) = Y(I,J)*R1
+            Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM)*R1
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDS
+!_______________________________________________________________________
+
+      SUBROUTINE RELEASE_ARRAYS
+! ..
+! Deallocate any allocated arrays and determine how much storage was
+! used (not called by DVODE_F90).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Local Scalars ..
+        INTEGER :: IER, II, IR
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, SIZE
+! ..
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!     INTEGER INFO
+!     INTEGER ISIZE
+!     COMMON /MA48SIZE/ ISIZE
+!_______________________________________________________________________
+! ..
+! .. FIRST EXECUTABLE STATEMENT RELEASE_ARRAYS
+! ..
+        IR = 0
+        IF (ALLOCATED(ACOR)) THEN
+          IR = IR + SIZE(ACOR)
+          DEALLOCATE (ACOR,STAT=IER)
+          CALL CHECK_STAT(IER,880)
+        END IF
+        IF (ALLOCATED(CSCALEX)) THEN
+          IR = IR + SIZE(CSCALEX) + SIZE(RSCALEX) + SIZE(WSCALEX)
+          DEALLOCATE (CSCALEX,RSCALEX,WSCALEX,STAT=IER)
+          CALL CHECK_STAT(IER,890)
+        END IF
+        IF (ALLOCATED(DTEMP)) THEN
+          IR = IR + SIZE(DTEMP)
+          DEALLOCATE (DTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,900)
+        END IF
+        IF (ALLOCATED(EWT)) THEN
+          IR = IR + SIZE(EWT)
+          DEALLOCATE (EWT,STAT=IER)
+          CALL CHECK_STAT(IER,910)
+        END IF
+        IF (ALLOCATED(FACDS)) THEN
+          IR = IR + SIZE(FACDS)
+          DEALLOCATE (FACDS,STAT=IER)
+          CALL CHECK_STAT(IER,920)
+        END IF
+        IF (ALLOCATED(FPTEMP)) THEN
+          IR = IR + SIZE(FPTEMP)
+          DEALLOCATE (FPTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,930)
+        END IF
+        IF (ALLOCATED(FTEMP)) THEN
+          IR = IR + SIZE(FTEMP)
+          DEALLOCATE (FTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,940)
+        END IF
+        IF (ALLOCATED(FTEMP1)) THEN
+          IR = IR + SIZE(FTEMP1)
+          DEALLOCATE (FTEMP1,STAT=IER)
+          CALL CHECK_STAT(IER,950)
+        END IF
+        IF (ALLOCATED(G0)) THEN
+          IR = IR + SIZE(G0)
+          DEALLOCATE (G0,STAT=IER)
+          CALL CHECK_STAT(IER,960)
+        END IF
+        IF (ALLOCATED(G1)) THEN
+          IR = IR + SIZE(G1)
+          DEALLOCATE (G1,STAT=IER)
+          CALL CHECK_STAT(IER,970)
+        END IF
+        IF (ALLOCATED(GX)) THEN
+          IR = IR + SIZE(GX)
+          DEALLOCATE (GX,STAT=IER)
+          CALL CHECK_STAT(IER,980)
+        END IF
+        IF (ALLOCATED(JMAT)) THEN
+          IR = IR + SIZE(JMAT)
+          DEALLOCATE (JMAT,STAT=IER)
+          CALL CHECK_STAT(IER,990)
+        END IF
+        IF (ALLOCATED(LB)) THEN
+          IR = IR + SIZE(LB)
+          DEALLOCATE (LB,STAT=IER)
+          CALL CHECK_STAT(IER,1000)
+        END IF
+        IF (ALLOCATED(UB)) THEN
+          IR = IR + SIZE(UB)
+          DEALLOCATE (UB,STAT=IER)
+          CALL CHECK_STAT(IER,1000)
+        END IF
+        IF (ALLOCATED(PMAT)) THEN
+          IR = IR + SIZE(PMAT)
+          DEALLOCATE (PMAT,STAT=IER)
+          CALL CHECK_STAT(IER,1010)
+        END IF
+        IF (ALLOCATED(RWORK)) THEN
+          IR = IR + SIZE(RWORK)
+          DEALLOCATE (RWORK,STAT=IER)
+          CALL CHECK_STAT(IER,1020)
+        END IF
+        IF (ALLOCATED(SAVF)) THEN
+          IR = IR + SIZE(SAVF)
+          DEALLOCATE (SAVF,STAT=IER)
+          CALL CHECK_STAT(IER,1030)
+        END IF
+        IF (ALLOCATED(YMAX)) THEN
+          IR = IR + SIZE(YMAX)
+          DEALLOCATE (YMAX,STAT=IER)
+          CALL CHECK_STAT(IER,1040)
+        END IF
+        IF (ALLOCATED(WM)) THEN
+          IR = IR + SIZE(WM)
+          DEALLOCATE (WM,STAT=IER)
+          CALL CHECK_STAT(IER,1050)
+        END IF
+        IF (ALLOCATED(YHNQP2)) THEN
+          IR = IR + SIZE(YHNQP2)
+          DEALLOCATE (YHNQP2,STAT=IER)
+          CALL CHECK_STAT(IER,1060)
+        END IF
+        IF (ALLOCATED(YHTEMP)) THEN
+          IR = IR + SIZE(YHTEMP)
+          DEALLOCATE (YHTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1070)
+        END IF
+        IF (ALLOCATED(YMAX)) THEN
+          IR = IR + SIZE(YMAX)
+          DEALLOCATE (YMAX,STAT=IER)
+          CALL CHECK_STAT(IER,1080)
+        END IF
+        IF (ALLOCATED(YNNEG)) THEN
+          IR = IR + SIZE(YNNEG)
+          DEALLOCATE (YNNEG,STAT=IER)
+          CALL CHECK_STAT(IER,1090)
+        END IF
+        IF (ALLOCATED(YSCALEDS)) THEN
+          IR = IR + SIZE(YSCALEDS)
+          DEALLOCATE (YSCALEDS,STAT=IER)
+          CALL CHECK_STAT(IER,1100)
+        END IF
+        IF (ALLOCATED(YTEMP)) THEN
+          IR = IR + SIZE(YTEMP)
+          DEALLOCATE (YTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1110)
+        END IF
+        IF (ALLOCATED(WKDS)) THEN
+          IR = IR + SIZE(WKDS)
+          DEALLOCATE (WKDS,STAT=IER)
+          CALL CHECK_STAT(IER,1120)
+        END IF
+        II = 0
+        IF (ALLOCATED(BIGP)) THEN
+          II = II + SIZE(BIGP)
+          DEALLOCATE (BIGP,STAT=IER)
+          CALL CHECK_STAT(IER,1130)
+        END IF
+        IF (ALLOCATED(BJGP)) THEN
+          II = II + SIZE(BJGP)
+          DEALLOCATE (BJGP,STAT=IER)
+          CALL CHECK_STAT(IER,1140)
+        END IF
+        IF (ALLOCATED(IA)) THEN
+          II = II + SIZE(IA)
+          DEALLOCATE (IA,STAT=IER)
+          CALL CHECK_STAT(IER,1150)
+        END IF
+        IF (ALLOCATED(IAB)) THEN
+          II = II + SIZE(IAB)
+          DEALLOCATE (IAB,STAT=IER)
+          CALL CHECK_STAT(IER,1160)
+        END IF
+        IF (ALLOCATED(IAN)) THEN
+          II = II + SIZE(IAN)
+          DEALLOCATE (IAN,STAT=IER)
+          CALL CHECK_STAT(IER,1170)
+        END IF
+        IF (ALLOCATED(ICN)) THEN
+          II = II + SIZE(ICN)
+          DEALLOCATE (ICN,STAT=IER)
+          CALL CHECK_STAT(IER,1180)
+        END IF
+        IF (ALLOCATED(IDX)) THEN
+          II = II + SIZE(IDX)
+          DEALLOCATE (IDX,STAT=IER)
+          CALL CHECK_STAT(IER,1190)
+        END IF
+        IF (ALLOCATED(IGP)) THEN
+          II = II + SIZE(IGP)
+          DEALLOCATE (IGP,STAT=IER)
+          CALL CHECK_STAT(IER,1200)
+        END IF
+        IF (ALLOCATED(IKEEP28)) THEN
+          II = II + SIZE(IKEEP28,1)*SIZE(IKEEP28,2)
+          DEALLOCATE (IKEEP28,STAT=IER)
+          CALL CHECK_STAT(IER,1210)
+        END IF
+        IF (ALLOCATED(INDCOLDS)) THEN
+          II = II + SIZE(INDCOLDS)
+          DEALLOCATE (INDCOLDS,STAT=IER)
+          CALL CHECK_STAT(IER,1220)
+        END IF
+        IF (ALLOCATED(INDROWDS)) THEN
+
+          II = II + SIZE(INDROWDS)
+          DEALLOCATE (INDROWDS,STAT=IER)
+          CALL CHECK_STAT(IER,1230)
+        END IF
+        IF (ALLOCATED(IOPTDS)) THEN
+          II = II + SIZE(IOPTDS)
+          DEALLOCATE (IOPTDS,STAT=IER)
+          CALL CHECK_STAT(IER,1240)
+        END IF
+        IF (ALLOCATED(IPNTRDS)) THEN
+          II = II + SIZE(IPNTRDS)
+          DEALLOCATE (IPNTRDS,STAT=IER)
+          CALL CHECK_STAT(IER,1250)
+        END IF
+        IF (ALLOCATED(IWADS)) THEN
+          II = II + SIZE(IWADS)
+          DEALLOCATE (IWADS,STAT=IER)
+          CALL CHECK_STAT(IER,1260)
+        END IF
+        IF (ALLOCATED(IWKDS)) THEN
+          II = II + SIZE(IWKDS)
+          DEALLOCATE (IWKDS,STAT=IER)
+          CALL CHECK_STAT(IER,1270)
+        END IF
+        IF (ALLOCATED(IWORK)) THEN
+          II = II + SIZE(IWORK)
+          DEALLOCATE (IWORK,STAT=IER)
+          CALL CHECK_STAT(IER,1280)
+        END IF
+        IF (ALLOCATED(IW28)) THEN
+          II = II + SIZE(IW28,1)*SIZE(IW28,2)
+          DEALLOCATE (IW28,STAT=IER)
+          CALL CHECK_STAT(IER,1290)
+        END IF
+        IF (ALLOCATED(JA)) THEN
+          II = II + SIZE(JA)
+          DEALLOCATE (JA,STAT=IER)
+          CALL CHECK_STAT(IER,1300)
+        END IF
+        IF (ALLOCATED(JAB)) THEN
+          II = II + SIZE(JAB)
+          DEALLOCATE (JAB,STAT=IER)
+          CALL CHECK_STAT(IER,1310)
+        END IF
+        IF (ALLOCATED(JAN)) THEN
+          II = II + SIZE(JAN)
+          DEALLOCATE (JAN,STAT=IER)
+          CALL CHECK_STAT(IER,1320)
+        END IF
+        IF (ALLOCATED(JATEMP)) THEN
+          II = II + SIZE(JATEMP)
+          DEALLOCATE (JATEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1330)
+        END IF
+        IF (ALLOCATED(JGP)) THEN
+          II = II + SIZE(JGP)
+          DEALLOCATE (JGP,STAT=IER)
+          CALL CHECK_STAT(IER,1340)
+        END IF
+        IF (ALLOCATED(JPNTRDS)) THEN
+          II = II + SIZE(JPNTRDS)
+          DEALLOCATE (JPNTRDS,STAT=IER)
+          CALL CHECK_STAT(IER,1350)
+        END IF
+        IF (ALLOCATED(JROOT)) THEN
+          II = II + SIZE(JROOT)
+          DEALLOCATE (JROOT,STAT=IER)
+          CALL CHECK_STAT(IER,1360)
+        END IF
+        IF (ALLOCATED(JVECT)) THEN
+          II = II + SIZE(JVECT)
+          DEALLOCATE (JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,1370)
+        END IF
+        IF (ALLOCATED(NGRPDS)) THEN
+          II = II + SIZE(NGRPDS)
+          DEALLOCATE (NGRPDS,STAT=IER)
+          CALL CHECK_STAT(IER,1380)
+        END IF
+        IF (ALLOCATED(SUBDS)) THEN
+          II = II + SIZE(SUBDS)
+          DEALLOCATE (SUBDS,STAT=IER)
+          CALL CHECK_STAT(IER,1390)
+        END IF
+        IF (ALLOCATED(SUPDS)) THEN
+          II = II + SIZE(SUPDS)
+          DEALLOCATE (SUPDS,STAT=IER)
+          CALL CHECK_STAT(IER,1400)
+        END IF
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       IF (MA48_WAS_USED) THEN
+!          CALL MA48_FINALIZE(FACTORS,CONTROL,INFO)
+!          IF (INFO /= 0) THEN
+!             MSG = 'The call to MA48_FINALIZE FAILED.'
+!             CALL XERRDV(MSG,1740,1,1,II,0,0,ZERO,ZERO)
+!          END IF
+!          MSG = 'Size of MA48 deallocated arrays (I1) = '
+!          CALL XERRDV(MSG,1750,1,1,ISIZE,0,0,ZERO,ZERO)
+!       END IF
+!_______________________________________________________________________
+
+!       Print the amount of storage used.
+        MSG = 'I1 = Total length of REAL arrays used.'
+        CALL XERRDV(MSG,1760,1,1,IR,0,0,ZERO,ZERO)
+        MSG = 'I1 = Total length of INTEGER arrays used.'
+        CALL XERRDV(MSG,1760,1,1,II,0,0,ZERO,ZERO)
+
+!       In case DVODE_F90 is subsequently called:
+        OPTS_CALLED = .FALSE.
+        RETURN
+
+      END SUBROUTINE RELEASE_ARRAYS
+! End of DVODE_F90 subroutines
+!_______________________________________________________________________
+
+! Beginning of LINPACK and BLAS subroutines
+      SUBROUTINE DGEFA_F90(A,LDA,N,IPVT,INFO)
+! ..
+! Factor a matrix using Gaussian elimination.
+! ..
+!     DGEFA_F90 factors a KPP_REAL matrix by Gaussian elimination.
+!     DGEFA_F90 is usually called by DGECO, but it can be called
+!     directly with a saving in time if RCOND is not needed.
+!     (Time for DGECO) = (1 + 9/N)*(Time for DGEFA_F90).
+!     On Entry
+!        A       REAL(KIND=WP)(LDA, N)
+!                the matrix to be factored.
+!        LDA     INTEGER
+!                the leading dimension of the array A.
+!        N       INTEGER
+!                the order of the matrix A.
+!     On Return
+!        A       an upper triangular matrix and the multipliers
+!                which were used to obtain it.
+!                The factorization can be written A = L*U where
+!                L is a product of permutation and unit lower
+!                triangular matrices and U is upper triangular.
+!        IPVT    INTEGER(N)
+!                an integer vector of pivot indices.
+!        INFO    INTEGER
+!                = 0  normal value.
+!                = K  if U(K,K) == 0.0. This is not an error
+!                     condition for this subroutine, but it does
+!                     indicate that DGESL_F90 or DGEDI will divide
+!                     by zero if called. Use RCOND in DGECO for a
+!                     reliable indication of singularity.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: INFO
+        INTEGER, INTENT (IN) :: LDA, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: A(LDA,*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: J, K, KP1, L, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGEFA_F90
+! ..
+        INFO = 0
+        NM1 = N - 1
+        IF (NM1<1) GOTO 50
+        DO K = 1, NM1
+          KP1 = K + 1
+
+!         Find L = pivot index.
+
+! Original:
+!         L = IDAMAX_F90(N-K+1,A(K,K),1) + K - 1
+          L = IDAMAX_F90(N-K+1,A(K:N,K),1) + K - 1
+          IPVT(K) = L
+
+!         Zero pivot implies this column already triangularized.
+
+!         IF (A(L, K) == ZERO) GOTO 40
+          IF (ABS(A(L,K))<=ZERO) GOTO 30
+
+!         Interchange if necessary.
+
+          IF (L==K) GOTO 10
+          T = A(L,K)
+          A(L,K) = A(K,K)
+          A(K,K) = T
+10        CONTINUE
+
+!         Compute multipliers.
+
+          T = -ONE/A(K,K)
+! Original:          
+!         CALL DSCAL_F90(N-K,T,A(K+1,K),1)         
+          CALL DSCAL_F90(N-K,T,A(K+1:N,K),1)
+
+!         Row elimination with column indexing.
+
+          DO J = KP1, N
+            T = A(L,J)
+            IF (L==K) GOTO 20
+            A(L,J) = A(K,J)
+            A(K,J) = T
+20          CONTINUE
+! Original:            
+!           CALL DAXPY_F90(N-K,T,A(K+1,K),1,A(K+1,J),1)
+            CALL DAXPY_F90(N-K,T,A(K+1:N,K),1,A(K+1:N,J),1)
+          END DO
+          GOTO 40
+30        CONTINUE
+          INFO = K
+40        CONTINUE
+        END DO
+50      CONTINUE
+        IPVT(N) = N
+!       IF (A(N, N) == ZERO) INFO = N
+        IF (ABS(A(N,N))<=ZERO) INFO = N
+        RETURN
+
+      END SUBROUTINE DGEFA_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGESL_F90(A,LDA,N,IPVT,B,JOB)
+! ..
+! Solve the real system A*X=B or TRANS(A)*X=B using the factors
+! computed by DGECO or DGEFA_F90.
+! ..
+!     DGESL_F90 solves the KPP_REAL system
+!     A * X = B or TRANS(A) * X = B
+!     using the factors computed by DGECO or DGEFA_F90.
+!     On Entry
+!        A       REAL(KIND=WP)(LDA, N)
+!                the output from DGECO or DGEFA_F90.
+!        LDA     INTEGER
+!                the leading dimension of the array A.
+!        N       INTEGER
+!                the order of the matrix A.
+!        IPVT    INTEGER(N)
+!                the pivot vector from DGECO or DGEFA_F90.
+!        B       REAL(KIND=WP)(N)
+!                the right hand side vector.
+!        JOB     INTEGER
+!                = 0         to solve A*X = B,
+
+!                = nonzero   to solve TRANS(A)*X = B where
+!                            TRANS(A)is the transpose.
+!     On Return
+!        B       the solution vector X.
+!     Error Condition
+!        A division by zero will occur if the input factor contains a
+!        zero on the diagonal. Technically this indicates singularity
+!        but it is often caused by improper arguments or improper
+!        setting of LDA. It will not occur if the subroutines are
+!        called correctly and if DGECO has set RCOND > 0.0 or
+!        DGEFA_F90 has set INFO == 0.
+!     To compute INVERSE(A) * C where C is a matrix
+!     with P columns
+!           CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+!           IF (RCOND is too small) GOTO
+!           DO J = 1, P
+!              CALL DGESL_F90(A,LDA,N,IPVT,C(1,J),0)
+!           END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB, LDA, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: A(LDA,*), B(*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: K, KB, L, NM1
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGESL_F90
+! ..
+        NM1 = N - 1
+        IF (JOB/=0) GOTO 30
+
+!       JOB = 0, solve A*X = B.
+!       First solve L*Y = B.
+
+        IF (NM1<1) GOTO 20
+        DO K = 1, NM1
+          L = IPVT(K)
+          T = B(L)
+          IF (L==K) GOTO 10
+          B(L) = B(K)
+          B(K) = T
+10        CONTINUE
+! Original:
+!         CALL DAXPY_F90(N-K,T,A(K+1,K),1,B(K+1),1)
+          CALL DAXPY_F90(N-K,T,A(K+1:N,K),1,B(K+1:N),1)
+        END DO
+20      CONTINUE
+
+!       Now solve U*X = Y.
+
+        DO KB = 1, N
+          K = N + 1 - KB
+          B(K) = B(K)/A(K,K)
+          T = -B(K)
+! Original:
+!         CALL DAXPY_F90(K-1,T,A(1,K),1,B(1),1)
+          CALL DAXPY_F90(K-1,T,A(1:K-1,K),1,B(1:K-1),1)
+        END DO
+        GOTO 60
+30      CONTINUE
+
+!       JOB /= 0, solve TRANS(A)*X = B.
+!       First solve TRANS(U)*Y = B.
+
+        DO K = 1, N
+          T = DDOT_F90(K-1,A(1,K),1,B(1),1)
+          B(K) = (B(K)-T)/A(K,K)
+        END DO
+
+!       Now solve TRANS(L)*X = Y.
+
+        IF (NM1<1) GOTO 50
+        DO KB = 1, NM1
+          K = N - KB
+          B(K) = B(K) + DDOT_F90(N-K,A(K+1,K),1,B(K+1),1)
+          L = IPVT(K)
+          IF (L==K) GOTO 40
+          T = B(L)
+          B(L) = B(K)
+          B(K) = T
+40        CONTINUE
+        END DO
+50      CONTINUE
+60      CONTINUE
+        RETURN
+
+      END SUBROUTINE DGESL_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGBFA_F90(ABD,LDA,N,ML,MU,IPVT,INFO)
+! ..
+! Factor a banded matrix using Gaussian elimination.
+! ..
+!     DGBFA_F90 factors a KPP_REAL band matrix by elimination.
+!     DGBFA_F90 is usually called by DGBCO, but it can be called
+!     directly with a saving in time if RCOND is not needed.
+!     On Entry
+!        ABD     REAL(KIND=WP)(LDA, N)
+!                contains the matrix in band storage. The columns
+!                of the matrix are stored in the columns of ABD and
+!                the diagonals of the matrix are stored in rows
+!                ML+1 through 2*ML+MU+1 of ABD.
+!                See the comments below for details.
+!        LDA     INTEGER
+!                the leading dimension of the array ABD.
+!                LDA must be >= 2*ML + MU + 1.
+!        N       INTEGER
+!                the order of the original matrix.
+!        ML      INTEGER
+!                number of diagonals below the main diagonal.
+!                0 <= ML < N.
+!        MU      INTEGER
+!                number of diagonals above the main diagonal.
+!                0 <= MU < N.
+!                More efficient if ML <= MU.
+!     On Return
+!        ABD     an upper triangular matrix in band storage and
+!                the multipliers which were used to obtain it.
+!                The factorization can be written A = L*U where
+!                L is a product of permutation and unit lower
+!                triangular matrices and U is upper triangular.
+!        IPVT    INTEGER(N)
+!                an integer vector of pivot indices.
+!        INFO    INTEGER
+!                = 0  normal value.
+!                = K  if U(K,K) == 0.0. This is not an error
+!                     condition for this subroutine, but it does
+!                     indicate that DGBSL_F90 will divide by zero
+!                     if called. Use RCOND in DGBCO for a reliable
+!                     indication of singularity.
+!     Band Storage
+!           If A is a band matrix, the following program segment
+!           will set up the input.
+!                   ML = (band width below the diagonal)
+!                   MU = (band width above the diagonal)
+!                   M = ML + MU + 1
+!                   DO J = 1, N
+!                      I1 = MAX(1, J-MU)
+!                      I2 = MIN(N, J+ML)
+!                      DO 10 I = I1, I2
+!                         K = I - J + M
+!                         ABD(K,J) = A(I,J)
+!                      END DO
+!                   END DO
+!           This uses rows ML+1 through 2*ML+MU+1 of ABD.
+!           In addition, the first ML rows in ABD are used for
+!           elements generated during the triangularization.
+!           The total number of rows needed in ABD is 2*ML+MU+1.
+!           The ML+MU by ML+MU upper left triangle and the
+!           ML by ML lower right triangle are not referenced.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: INFO
+        INTEGER, INTENT (IN) :: LDA, ML, MU, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ABD(LDA,*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: I0, J, J0, J1, JU, JZ, K, KP1, L, LM, M, MM, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGBFA_F90
+! ..
+        M = ML + MU + 1
+        INFO = 0
+
+!       Zero initial fill-in columns.
+
+        J0 = MU + 2
+        J1 = MIN(N,M) - 1
+        IF (J1<J0) GOTO 10
+        DO JZ = J0, J1
+          I0 = M + 1 - JZ
+          ABD(I0:ML,JZ) = ZERO
+        END DO
+10      CONTINUE
+        JZ = J1
+        JU = 0
+
+!       Gaussian elimination with partial pivoting.
+
+        NM1 = N - 1
+        IF (NM1<1) GOTO 80
+        DO K = 1, NM1
+          KP1 = K + 1
+
+!         Zero next fill-in column.
+
+          JZ = JZ + 1
+          IF (JZ>N) GOTO 20
+          IF (ML<1) GOTO 20
+          ABD(1:ML,JZ) = ZERO
+20        CONTINUE
+
+!         Find L = pivot index.
+
+          LM = MIN(ML,N-K)
+! Original:
+!         L = IDAMAX_F90(LM+1,ABD(M,K),1) + M - 1
+          L = IDAMAX_F90(LM+1,ABD(M:M+LM,K),1) + M - 1
+
+          IPVT(K) = L + K - M
+
+!         Zero pivot implies this column already triangularized.
+
+!         IF (ABD(L, K) == ZERO) GOTO 100
+          IF (ABS(ABD(L,K))<=ZERO) GOTO 60
+
+!         Interchange if necessary.
+
+          IF (L==M) GOTO 30
+          T = ABD(L,K)
+          ABD(L,K) = ABD(M,K)
+          ABD(M,K) = T
+30        CONTINUE
+
+!         Compute multipliers.
+
+          T = -ONE/ABD(M,K)
+! Original:
+!         CALL DSCAL_F90(LM,T,ABD(M+1,K),1)
+          CALL DSCAL_F90(LM,T,ABD(M+1:M+LM,K),1)
+
+!         Row elimination with column indexing.
+
+          JU = MIN(MAX(JU,MU+IPVT(K)),N)
+          MM = M
+          IF (JU<KP1) GOTO 50
+          DO J = KP1, JU
+            L = L - 1
+            MM = MM - 1
+            T = ABD(L,J)
+            IF (L==MM) GOTO 40
+            ABD(L,J) = ABD(MM,J)
+            ABD(MM,J) = T
+40          CONTINUE
+! Original:
+!           CALL DAXPY_F90(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+            CALL DAXPY_F90(LM,T,ABD(M+1:M+LM,K),1,ABD(MM+1:M+LM,J),1)
+          END DO
+50        CONTINUE
+          GOTO 70
+60        CONTINUE
+          INFO = K
+70        CONTINUE
+        END DO
+80      CONTINUE
+        IPVT(N) = N
+!       IF (ABD(M, N) == ZERO) INFO = N
+        IF (ABS(ABD(M,N))<=ZERO) INFO = N
+        RETURN
+
+      END SUBROUTINE DGBFA_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGBSL_F90(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+! ..
+! Solve the real band system A*X=B or TRANS(A)*X=B using the factors
+! computed by DGBCO or DGBFA_F90.
+! ..
+!     DGBSL_F90 solves the KPP_REAL band system
+!     A * X = B or TRANS(A) * X = B
+!     using the factors computed by DGBCO or DGBFA_F90.
+!     On Entry
+!        ABD     REAL(KIND=WP)(LDA, N)
+!                the output from DGBCO or DGBFA_F90.
+!        LDA     INTEGER
+!                the leading dimension of the array ABD.
+!        N       INTEGER
+!                the order of the original matrix.
+!        ML      INTEGER
+!                number of diagonals below the main diagonal.
+!        MU      INTEGER
+!                number of diagonals above the main diagonal.
+!        IPVT    INTEGER(N)
+!                the pivot vector from DGBCO or DGBFA_F90.
+!        B       REAL(KIND=WP)(N)
+!                the right hand side vector.
+!        JOB     INTEGER
+!                = 0         to solve A*X = B,
+!                = nonzero   to solve TRANS(A)*X = B, where
+!                            TRANS(A) is the transpose.
+!     On Return
+!        B       the solution vector X.
+!     Error Condition
+!        A division by zero will occur if the input factor contains a
+!        zero on the diagonal. Technically this indicates singularity
+!        but it is often caused by improper arguments or improper
+!        setting of LDA. It will not occur if the subroutines are
+!        called correctly and if DGBCO has set RCOND > 0.0
+!        or DGBFA_F90 has set INFO == 0 .
+!     To compute INVERSE(A) * C where C is a matrix
+!     with P columns
+!           CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+!           IF (RCOND is too small) GOTO ...
+!           DO J = 1, P
+!              CALL DGBSL_F90(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+!           END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB, LDA, ML, MU, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ABD(LDA,*), B(*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: K, KB, L, LA, LB, LM, M, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGBSL_F90
+! ..
+        M = MU + ML + 1
+        NM1 = N - 1
+        IF (JOB/=0) GOTO 30
+
+!       JOB = 0, solve A*X = B.
+!       First solve L*Y = B.
+
+        IF (ML==0) GOTO 20
+        IF (NM1<1) GOTO 20
+        DO K = 1, NM1
+          LM = MIN(ML,N-K)
+          L = IPVT(K)
+          T = B(L)
+          IF (L==K) GOTO 10
+          B(L) = B(K)
+          B(K) = T
+10        CONTINUE
+! Original:
+!         CALL DAXPY_F90(LM,T,ABD(M+1,K),1,B(K+1),1)
+          CALL DAXPY_F90(LM,T,ABD(M+1:M+LM,K),1,B(K+1:K+LM),1)
+        END DO
+20      CONTINUE
+
+!       Now solve U*X = Y.
+
+        DO KB = 1, N
+          K = N + 1 - KB
+          B(K) = B(K)/ABD(M,K)
+          LM = MIN(K,M) - 1
+          LA = M - LM
+          LB = K - LM
+          T = -B(K)
+! Original:
+!         CALL DAXPY_F90(LM,T,ABD(LA,K),1,B(LB),1)
+          CALL DAXPY_F90(LM,T,ABD(LA:LA+LM-1,K),1,B(LB:LB+LM-1),1)
+        END DO
+        GOTO 60
+30      CONTINUE
+
+!       JOB /= 0, solve TRANS(A)*X = B.
+
+!       First solve TRANS(U)*Y = B.
+
+        DO K = 1, N
+          LM = MIN(K,M) - 1
+          LA = M - LM
+          LB = K - LM
+! Original:
+!         T = DDOT_F90(LM,ABD(LA,K),1,B(LB),1)
+          T = DDOT_F90(LM,ABD(LA:LA+LM-1,K),1,B(LB:LB+LM-1),1)
+          B(K) = (B(K)-T)/ABD(M,K)
+        END DO
+
+!       Now solve TRANS(L)*X = Y.
+
+        IF (ML==0) GOTO 50
+        IF (NM1<1) GOTO 50
+        DO KB = 1, NM1
+          K = N - KB
+          LM = MIN(ML,N-K)
+! Original:
+!         B(K) = B(K) + DDOT_F90(LM,ABD(M+1,K),1,B(K+1),1)
+          B(K) = B(K) + DDOT_F90(LM,ABD(M+1:M+LM,K),1,B(K+1:K+LM),1)
+          L = IPVT(K)
+          IF (L==K) GOTO 40
+          T = B(L)
+          B(L) = B(K)
+          B(K) = T
+40        CONTINUE
+        END DO
+50      CONTINUE
+60      CONTINUE
+        RETURN
+
+      END SUBROUTINE DGBSL_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DAXPY_F90(N,DA,DX,INCX,DY,INCY)
+! ..
+! Compute a constant times a vector plus a vector.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DA   - KPP_REAL scalar multiplier
+!     DX   - KPP_REAL vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - KPP_REAL vector with N elements
+!     INCY -  storage spacing between elements of DY
+!     Output:
+!     DY - KPP_REAL result (unchanged if N <= 0)
+!     Overwrite KPP_REAL DY with KPP_REAL DA*DX + DY.
+!     For I = 0 to N-1, replace  DY(LY+I*INCY) with
+!     DA*DX(LX+I*INCX) + DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX,
+!     and LY is defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: DA
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*)
+        KPP_REAL, INTENT (INOUT) :: DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DAXPY_F90
+! ..
+!       IF (N <= 0 .OR. DA == ZERO) RETURN
+        IF (N<=0 .OR. ABS(DA)<=ZERO) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DY(IY) = DY(IY) + DA*DX(IX)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 4.
+
+20      M = MOD(N,4)
+        IF (M==0) GOTO 30
+        DY(1:M) = DY(1:M) + DA*DX(1:M)
+        IF (N<4) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 4
+          DY(I) = DY(I) + DA*DX(I)
+          DY(I+1) = DY(I+1) + DA*DX(I+1)
+          DY(I+2) = DY(I+2) + DA*DX(I+2)
+          DY(I+3) = DY(I+3) + DA*DX(I+3)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DY(I) = DA*DX(I) + DY(I)
+        END DO
+        RETURN
+
+      END SUBROUTINE DAXPY_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DCOPY_F90(N,DX,INCX,DY,INCY)
+! ..
+! Copy a vector to another vector.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - KPP_REAL vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - KPP_REAL vector with N elements
+!     INCY - storage spacing between elements of DY
+!     Output:
+!     DY - copy of vector DX(unchanged if N <= 0)
+!     Copy KPP_REAL DX to KPP_REAL DY.
+!     For I = 0 to N-1, copy DX(LX+I*INCX) to DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX,
+!     and LY is defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*)
+        KPP_REAL, INTENT (INOUT) :: DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DCOPY_F90
+! ..
+        IF (N<=0) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DY(IY) = DX(IX)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 7.
+
+20      M = MOD(N,7)
+        IF (M==0) GOTO 30
+        DO I = 1, M
+          DY(I) = DX(I)
+        END DO
+        IF (N<7) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 7
+          DY(I) = DX(I)
+          DY(I+1) = DX(I+1)
+          DY(I+2) = DX(I+2)
+          DY(I+3) = DX(I+3)
+          DY(I+4) = DX(I+4)
+          DY(I+5) = DX(I+5)
+          DY(I+6) = DX(I+6)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DY(I) = DX(I)
+        END DO
+        RETURN
+
+      END SUBROUTINE DCOPY_F90
+!_______________________________________________________________________
+
+      FUNCTION DDOT_F90(N,DX,INCX,DY,INCY)
+! ..
+! Compute the inner product of two vectors.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - KPP_REAL vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - KPP_REAL vector with N elements
+!     INCY - storage spacing between elements of DY
+!     Output:
+!     DDOT_F90 - KPP_REAL dot product (zero if N <= 0)
+!     Returns the dot product of KPP_REAL DX and DY.
+!     DDOT_F90 = sum for I = 0 to N-1 of  DX(LX+I*INCX) * DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is
+!     defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        KPP_REAL :: DDOT_F90
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*), DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DDOT_F90
+! ..
+        DDOT_F90 = ZERO
+        IF (N<=0) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DDOT_F90 = DDOT_F90 + DX(IX)*DY(IY)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 5.
+
+20      M = MOD(N,5)
+        IF (M==0) GOTO 30
+        DO I = 1, M
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I)
+        END DO
+        IF (N<5) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 5
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I) + DX(I+1)*DY(I+1) + &
+            DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I)
+        END DO
+        RETURN
+
+      END FUNCTION DDOT_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DSCAL_F90(N,DA,DX,INCX)
+! ..
+! Multiply a vector by a constant.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DA   - KPP_REAL scale factor
+!     DX   - KPP_REAL vector with N elements
+!     INCX - storage spacing between elements of DX
+!     Output:
+!     DX - KPP_REAL result (unchanged if N <= 0)
+!     Replace KPP_REAL DX by KPP_REAL DA*DX.
+!     For I = 0 to N-1, replace DX(IX+I*INCX) with DA * DX(IX+I*INCX),
+!     where IX = 1 if INCX >= 0, else IX = 1+(1-N)*INCX.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: DA
+        INTEGER, INTENT (IN) :: INCX, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DX(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, M, MP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DSCAL_F90
+! ..
+        IF (N<=0) RETURN
+        IF (INCX==1) GOTO 10
+
+!       Code for increment not equal to 1.
+
+        IX = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        DO I = 1, N
+          DX(IX) = DA*DX(IX)
+          IX = IX + INCX
+        END DO
+        RETURN
+
+!       Code for increment equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 5.
+
+10      M = MOD(N,5)
+        IF (M==0) GOTO 20
+        DX(1:M) = DA*DX(1:M)
+        IF (N<5) RETURN
+20      MP1 = M + 1
+        DO I = MP1, N, 5
+          DX(I) = DA*DX(I)
+          DX(I+1) = DA*DX(I+1)
+          DX(I+2) = DA*DX(I+2)
+          DX(I+3) = DA*DX(I+3)
+          DX(I+4) = DA*DX(I+4)
+        END DO
+        RETURN
+
+      END SUBROUTINE DSCAL_F90
+!_______________________________________________________________________
+
+      FUNCTION IDAMAX_F90(N,DX,INCX)
+! ..
+! Find the smallest index of that component of a vector
+! having the maximum magnitude.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - KPP_REAL vector with N elements
+!     INCX - storage spacing between elements of DX
+!     Output:
+!     IDAMAX_F90 - smallest index (zero if N <= 0)
+!     Find smallest index of maximum magnitude of KPP_REAL DX.
+!     IDAMAX_F90 = first I, I = 1 to N, to maximize
+!     ABS(DX(IX+(I-1)*INCX)), where IX = 1 if INCX >= 0,
+!     else IX = 1+(1-N)*INCX.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        INTEGER :: IDAMAX_F90
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DMAX, XMAG
+        INTEGER :: I, IX
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT IDAMAX_F90
+! ..
+        IDAMAX_F90 = 0
+        IF (N<=0) RETURN
+        IDAMAX_F90 = 1
+        IF (N==1) RETURN
+
+        IF (INCX==1) GOTO 10
+
+!       Code for increments not equal to 1.
+
+        IX = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        DMAX = ABS(DX(IX))
+        IX = IX + INCX
+        DO I = 2, N
+          XMAG = ABS(DX(IX))
+          IF (XMAG>DMAX) THEN
+            IDAMAX_F90 = I
+            DMAX = XMAG
+          END IF
+          IX = IX + INCX
+        END DO
+        RETURN
+
+!       Code for increments equal to 1.
+
+10      DMAX = ABS(DX(1))
+        DO I = 2, N
+          XMAG = ABS(DX(I))
+          IF (XMAG>DMAX) THEN
+            IDAMAX_F90 = I
+            DMAX = XMAG
+          END IF
+        END DO
+        RETURN
+
+      END FUNCTION IDAMAX_F90
+! End of LINPACK and BLAS subroutines
+!_______________________________________________________________________
+
+! Beginning of MA28 subroutines
+! THIS IS A FORTRAN 90 TRANSLATION OF HSL'S F77 MA28. IT IS INTENDED
+! ONLY FOR USE IN CONJUNCTION WITH THE ODE SOLVER DVODE_F90 AND IS
+! NOT FUNCTIONAL IN A STANDALONE MANNER. PLEASE NOTE THAT MA28 IS NOT
+! PUBLIC DOMAIN SOFTWARE BUT HAS BEEN MADE AVAILABLE TO THE NUMERICAL
+! ANALYSIS COMMUNITY BY HARWELL. FOR OTHER USE PLEASE CONTACT HARWELL
+! AT HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM IF YOU
+! WISH TO SOLVE GENERAL SPARSE LINEAR SYSTEMS. IF YOU FIND A BUG OR
+! ENCOUNTER A PROBLEM WITH THE USE OF MA28 WITH DVODE.F90, PLEASE
+! CONTACT ONE OF THE AUTHORS OF DVODE_F90:
+!           G.D. Byrne (gbyrne@wi.rr.com)
+!           S. Thompson, thompson@radford.edu
+! NUMEROUS CHANGES WERE MADE IN CONNECTION WITH DVODE_F90 USAGE. THESE
+! INCLUDE USING METCALF'S CONVERTER TO TRANSLATE THE ORIGINAL f77 CODE
+! TO F90, MOVING INITIALIZATIONS TO THE DVODE_F90 PRIVATE SECTION,
+! ELIMINATION OF HOLLERITHS IN FORMAT STATEMENTS, ELIMINATION OF
+! BLOCKDATA, CHANGES IN ARITHMETICAL OPERATOR SYNTAX, AND CONVERSION
+! TO UPPER CASE. THIS VERSION OF MA28 IS INTENDED ONLY FOR USE WITH
+! DVODE_F90. PLEASE DO NOT MODIFY IT FOR ANY OTHER PURPOSE. IF YOU
+! HAVE LICENSED ACCESS TO THE HSL LIBRARY, AN ALTERNATE VERSION OF
+! DVODE_F90 BASED ON THE SUCCESSOR TO MA28, MA48, IS AVAILABLE FROM
+! THE AUTHORS. PLEASE NOTE THAT THE ALTERNATE VERSION OF DVODE_F90
+! IS NOT SELF CONTAINED SINCE MA48 IS NOT DISTRIBUTED WITH DVODE_F90.
+!******************************************************************
+!             *****MA28 COPYRIGHT NOTICE*****
+! COPYRIGHT (C) 2001 COUNCIL FOR THE CENTRAL LABORATORY
+!               OF THE RESEARCH COUNCILS
+! ALL RIGHTS RESERVED.
+
+! NONE OF THE COMMENTS IN THIS COPYRIGHT NOTICE BETWEEN THE LINES
+! OF ASTERISKS SHALL BE REMOVED OR ALTERED IN ANY WAY.
+
+! THIS PACKAGE IS INTENDED FOR COMPILATION WITHOUT MODIFICATION,
+! SO MOST OF THE EMBEDDED COMMENTS HAVE BEEN REMOVED.
+
+! ALL USE IS SUBJECT TO LICENCE. IF YOU NEED FURTHER CLARIFICATION,
+! PLEASE SEE HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM
+
+! PLEASE NOTE THAT:
+
+! 1. THE PACKAGES MAY ONLY BE USED FOR THE PURPOSES SPECIFIED IN THE
+!    LICENCE AGREEMENT AND MUST NOT BE COPIED BY THE LICENSEE FOR
+!    USE BY ANY OTHER PERSONS. USE OF THE PACKAGES IN ANY COMMERCIAL
+!    APPLICATION SHALL BE SUBJECT TO PRIOR WRITTEN AGREEMENT BETWEEN
+!    HYPROTECH UK LIMITED AND THE LICENSEE ON SUITABLE TERMS AND
+!    CONDITIONS, WHICH WILL INCLUDE FINANCIAL CONDITIONS.
+! 2. ALL INFORMATION ON THE PACKAGE IS PROVIDED TO THE LICENSEE ON
+!    THE UNDERSTANDING THAT THE DETAILS THEREOF ARE CONFIDENTIAL.
+! 3. ALL PUBLICATIONS ISSUED BY THE LICENSEE THAT INCLUDE RESULTS
+!    OBTAINED WITH THE HELP OF ONE OR MORE OF THE PACKAGES SHALL
+!    ACKNOWLEDGE THE USE OF THE PACKAGES. THE LICENSEE WILL NOTIFY
+!    HSL@HYPROTECH.COM OR HYPROTECH UK LIMITED OF ANY SUCH PUBLICATION.
+! 4. THE PACKAGES MAY BE MODIFIED BY OR ON BEHALF OF THE LICENSEE
+!    FOR SUCH USE IN RESEARCH APPLICATIONS BUT AT NO TIME SHALL SUCH
+!    PACKAGES OR MODIFICATIONS THEREOF BECOME THE PROPERTY OF THE
+!    LICENSEE. THE LICENSEE SHALL MAKE AVAILABLE FREE OF CHARGE TO THE
+!    COPYRIGHT HOLDER FOR ANY PURPOSE ALL INFORMATION RELATING TO
+!    ANY MODIFICATION.
+! 5. NEITHER COUNCIL FOR THE CENTRAL LABORATORY OF THE RESEARCH
+!    COUNCILS NOR HYPROTECH UK LIMITED SHALL BE LIABLE FOR ANY
+!    DIRECT OR CONSEQUENTIAL LOSS OR DAMAGE WHATSOEVER ARISING OUT OF
+!    THE USE OF PACKAGES BY THE LICENSEE.
+!******************************************************************
+
+      SUBROUTINE MA28AD(N,NZ,A,LICN,IRN,LIRN,ICN,U,IKEEP,IW,W,IFLAG)
+! ..
+! This subroutine performs the LU factorization of A.
+! ..
+! The parameters are as follows:
+! N     Order of matrix. Not altered by subroutine.
+! NZ    Number of non-zeros in input matrix. Not altered by subroutine.
+! A     Array of length LICN. Holds non-zeros of matrix
+!       on entry and non-zeros of factors on exit. Reordered by
+!       MA20AD and MC23AD and altered by MA30AD.
+! LICN  Length of arrays A and ICN. Not altered by subroutine.
+! IRN   Array of length LIRN. Holds row indices on input.
+!       Used as workspace by MA30AD to hold column orientation of
+!       matrix.
+! LIRN  Length of array IRN. Not altered by the subroutine.
+! ICN   Array of length LICN. Holds column indices on entry
+!       and column indices of decomposed matrix on exit. Reordered
+!       by MA20AD and MC23AD and altered by MA30AD.
+! U     Variable set by user to control bias towards numeric or
+!       sparsity pivoting. U = 1.0 gives partial pivoting
+!       while U = 0. does not check multipliers at all. Values of U
+!       greater than one are treated as one while negative values
+!       are treated as zero. Not altered by subroutine.
+! IKEEP Array of length 5*N used as workspace by MA28AD.
+!       (See later comments.) It is not required to be set on entry
+!       and, on exit, it contains information about the decomposition.
+!       It should be preserved between this call and subsequent calls
+!       to MA28BD or MA30CD.
+!       IKEEP(I,1),I = 1,N holds the total length of the part of row
+!       I in the diagonal block.
+!       Row IKEEP(I,2),I = 1,N of the input matrix is the Ith row in
+!       pivot order.
+!       Column IKEEP(I,3),I = 1,N of the input matrix is the Ith
+!       Column in pivot order.
+!       IKEEP(I,4),I = 1,N holds the length of the part of row I in
+!       the L part of the LU decomposition.
+!       IKEEP(I,5),I = 1,N holds the length of the part of row I in
+!       the off-diagonal blocks. If there is only one diagonal block,
+!       IKEEP(1,5) will be set to -1.
+! IW    Array of length 8*N. If the option NSRCH <= N is used, then
+!       the length of array IW can be reduced to 7*N.
+! W     Array length N. Used by MC24AD both as workspace and to return
+!       growth estimate in W(1). The use of this array by MA28AD is
+!       thus optional depending on logical variable GROW.
+! IFLAG Variable used as error flag by subroutine. A positive or
+!       zero value on exit indicates success. Possible negative
+!       values are -1 through -14.
+
+! Private Variable Information.
+! LP, MP Default value 6 (line printer). Unit number for error
+!     messages and duplicate element warning, respectively.
+! NLP, MLP INTEGER. Unit number for messages from MA30AD and
+!     MC23AD. Set by MA28AD to the value of LP.
+! LBLOCK Logical variable with default value .TRUE. If .TRUE.,
+!     MC23AD is used to first permute the matrix to block lower
+!     triangular form.
+! GROW Logical variable with default value .TRUE. If .TRUE., then
+!     an estimate of the increase in size of matrix elements during
+!     LU decomposition is given by MC24AD.
+! EPS, RMIN, RESID. Variables not referenced by MA28AD.
+! IRNCP, ICNCP INTEGER. Set to number of compresses on arrays IRN
+!     and ICN/A, respectively.
+! MINIRN, MINICN INTEGER. Minimum length of arrays IRN and ICN/A,
+!     respectively, for success on future runs.
+! IRANK INTEGER. Estimated rank of matrix.
+! MIRNCP, MICNCP, MIRANK, MIRN, MICN INTEGER. Variables used to
+!     communicate between MA30FD and MA28FD values of
+!     abovenamed variables with somewhat similar names.
+! ABORT1, ABORT2 LOGICAL. Variables with default value .TRUE.
+!     If .FALSE., then decomposition will be performed even
+!     if the matrix is structurally or numerically singular,
+!     respectively.
+! ABORTA, ABORTB LOGICAL. Variables used to communicate values
+!     of ABORT1 and ABORT2 to MA30AD.
+! ABORT Logical variable used to communicate value of ABORT1
+!     to MC23AD.
+! ABORT3 Logical variable. Not referenced by MA28AD.
+! IDISP Array of length 2. Used to communicate information
+!     on decomposition between this call to MA28AD and subsequent
+!     calls to MA28BD and MA30CD. On exit, IDISP(1) and
+!     IDISP(2) indicate position in arrays A and ICN of the
+!     first and last elements in the LU decomposition of the
+!     diagonal blocks, respectively.
+! NUMNZ Structural rank of matrix.
+! NUM   Number of diagonal blocks.
+! LARGE Size of largest diagonal block.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: U
+        INTEGER :: IFLAG, LICN, LIRN, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5), IRN(LIRN), IW(N,8)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: UPRIV
+        INTEGER :: I, I1, IEND, II, J, J1, J2, JAY, JJ, KNUM, LENGTH, MOVE, &
+          NEWJ1, NEWPOS
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28AD
+! ..
+!       Check that this call was made from DVODE_F90 and, if not, stop.
+        IF (.NOT.OK_TO_CALL_MA28) THEN
+          MSG = 'This version of MA28 may be used only in conjunction with DVODE_F90.'
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'Please refer to the following HSL copyright notice for MA28.'
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '******************************************************************     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '             *****MA28 COPYRIGHT NOTICE*****                           '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' COPYRIGHT (C) 2001 COUNCIL FOR THE CENTRAL LABORATORY                 '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '               OF THE RESEARCH COUNCILS                                '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' ALL RIGHTS RESERVED.                                                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' NONE OF THE COMMENTS IN THIS COPYRIGHT NOTICE BETWEEN THE LINES       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' OF ASTERISKS SHALL BE REMOVED OR ALTERED IN ANY WAY.                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' THIS PACKAGE IS INTENDED FOR COMPILATION WITHOUT MODIFICATION,        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' SO MOST OF THE EMBEDDED COMMENTS HAVE BEEN REMOVED.                   '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' ALL USE IS SUBJECT TO LICENCE. IF YOU NEED FURTHER CLARIFICATION,     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' PLEASE SEE HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' PLEASE NOTE THAT:                                                     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 1. THE PACKAGES MAY ONLY BE USED FOR THE PURPOSES SPECIFIED IN THE    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    LICENCE AGREEMENT AND MUST NOT BE COPIED BY THE LICENSEE FOR       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    USE BY ANY OTHER PERSONS. USE OF THE PACKAGES IN ANY COMMERCIAL    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    APPLICATION SHALL BE SUBJECT TO PRIOR WRITTEN AGREEMENT BETWEEN    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    HYPROTECH UK LIMITED AND THE LICENSEE ON SUITABLE TERMS AND        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    CONDITIONS, WHICH WILL INCLUDE FINANCIAL CONDITIONS.               '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 2. ALL INFORMATION ON THE PACKAGE IS PROVIDED TO THE LICENSEE ON      '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    THE UNDERSTANDING THAT THE DETAILS THEREOF ARE CONFIDENTIAL.       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 3. ALL PUBLICATIONS ISSUED BY THE LICENSEE THAT INCLUDE RESULTS       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    OBTAINED WITH THE HELP OF ONE OR MORE OF THE PACKAGES SHALL        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    ACKNOWLEDGE THE USE OF THE PACKAGES. THE LICENSEE WILL NOTIFY      '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    HSL@HYPROTECH.COM OR HYPROTECH UK LIMITED OF ANY SUCH PUBLICATION. '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 4. THE PACKAGES MAY BE MODIFIED BY OR ON BEHALF OF THE LICENSEE       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    FOR SUCH USE IN RESEARCH APPLICATIONS BUT AT NO TIME SHALL SUCH    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    PACKAGES OR MODIFICATIONS THEREOF BECOME THE PROPERTY OF THE       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    LICENSEE. THE LICENSEE SHALL MAKE AVAILABLE FREE OF CHARGE TO THE  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    COPYRIGHT HOLDER FOR ANY PURPOSE ALL INFORMATION RELATING TO       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    ANY MODIFICATION.                                                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 5. NEITHER COUNCIL FOR THE CENTRAL LABORATORY OF THE RESEARCH         '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    COUNCILS NOR HYPROTECH UK LIMITED SHALL BE LIABLE FOR ANY          '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    DIRECT OR CONSEQUENTIAL LOSS OR DAMAGE WHATSOEVER ARISING OUT OF   '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    THE USE OF PACKAGES BY THE LICENSEE.                               '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '******************************************************************     '
+          CALL XERRDV(MSG,1770,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Some initialization and transfer of information between
+!       common blocks (see earlier comments).
+        IFLAG = 0
+        ABORTA = ABORT1
+        ABORTB = ABORT2
+        ABORT = ABORT1
+        MLP = LP
+        NLP = LP
+        TOL1 = TOL
+        LBIG1 = LBIG
+        NSRCH1 = NSRCH
+!       UPRIV private copy of U is used in case it is outside
+!       range zero to one and is thus altered by MA30AD.
+        UPRIV = U
+!       Simple data check on input variables and array dimensions.
+        IF (N>0) GOTO 10
+        IFLAG = -8
+        IF (LP/=0) WRITE (LP,90000) N
+        GOTO 170
+10      IF (NZ>0) GOTO 20
+        IFLAG = -9
+        IF (LP/=0) WRITE (LP,90001) NZ
+        GOTO 170
+20      IF (LICN>=NZ) GOTO 30
+        IFLAG = -10
+        IF (LP/=0) WRITE (LP,90002) LICN
+        GOTO 170
+30      IF (LIRN>=NZ) GOTO 40
+        IFLAG = -11
+        IF (LP/=0) WRITE (LP,90003) LIRN
+        GOTO 170
+
+!       Data check to see if all indices lie between 1 and N.
+40      DO 50 I = 1, NZ
+          IF (IRN(I)>0 .AND. IRN(I)<=N .AND. ICN(I)>0 .AND. ICN(I)<=N) &
+            GOTO 50
+          IF (IFLAG==0 .AND. LP/=0) WRITE (LP,90004)
+          IFLAG = -12
+          IF (LP/=0) WRITE (LP,90005) I, A(I), IRN(I), ICN(I)
+50      END DO
+        IF (IFLAG<0) GOTO 180
+
+!       Sort matrix into row order.
+        CALL MC20AD(N,NZ,A,ICN,IW(1,1),IRN,0)
+!       Part of IKEEP is used here as a work-array. IKEEP(I,2) is
+!       the last row to have a non-zero in column I. IKEEP(I,3)
+!       is the off-set of column I from the start of the row.
+        IKEEP(1:N,2) = 0
+        IKEEP(1:N,1) = 0
+
+!       Check for duplicate elements summing any such entries
+!       and printing a warning message on unit MP.
+!       MOVE is equal to the number of duplicate elements found.
+        MOVE = 0
+!       The loop also calculates the largest element in the matrix,
+!       THEMAX.
+        THEMAX = ZERO
+!       J1 is position in arrays of first non-zero in row.
+        J1 = IW(1,1)
+        DO 90 I = 1, N
+          IEND = NZ + 1
+          IF (I/=N) IEND = IW(I+1,1)
+          LENGTH = IEND - J1
+          IF (LENGTH==0) GOTO 90
+          J2 = IEND - 1
+          NEWJ1 = J1 - MOVE
+          DO 80 JJ = J1, J2
+            J = ICN(JJ)
+            THEMAX = MAX(THEMAX,ABS(A(JJ)))
+            IF (IKEEP(J,2)==I) GOTO 70
+!           First time column has ocurred in current row.
+            IKEEP(J,2) = I
+            IKEEP(J,3) = JJ - MOVE - NEWJ1
+            IF (MOVE==0) GOTO 80
+!           Shift necessary because of previous duplicate element.
+            NEWPOS = JJ - MOVE
+            A(NEWPOS) = A(JJ)
+            ICN(NEWPOS) = ICN(JJ)
+            GOTO 80
+!           Duplicate element.
+70          MOVE = MOVE + 1
+            LENGTH = LENGTH - 1
+            JAY = IKEEP(J,3) + NEWJ1
+            IF (MP/=0) WRITE (MP,90006) I, J, A(JJ)
+            A(JAY) = A(JAY) + A(JJ)
+            THEMAX = MAX(THEMAX,ABS(A(JAY)))
+80        END DO
+          IKEEP(I,1) = LENGTH
+          J1 = IEND
+90      END DO
+
+!       KNUM is actual number of non-zeros in matrix with any multiple
+!       entries counted only once.
+        KNUM = NZ - MOVE
+        IF (.NOT.LBLOCK) GOTO 100
+
+!       Perform block triangularisation.
+        CALL MC23AD(N,ICN,A,LICN,IKEEP(1,1),IDISP,IKEEP(1,2),IKEEP(1,3), &
+          IKEEP(1,5),IW(1,3),IW)
+        IF (IDISP(1)>0) GOTO 130
+        IFLAG = -7
+        IF (IDISP(1)==-1) IFLAG = -1
+        IF (LP/=0) WRITE (LP,90007)
+        GOTO 170
+
+!       Block triangularization not requested.
+!       Move structure to end of data arrays in preparation for MA30AD.
+!       Also set LENOFF(1) to -1 and set permutation arrays.
+100     DO I = 1, KNUM
+          II = KNUM - I + 1
+          NEWPOS = LICN - I + 1
+          ICN(NEWPOS) = ICN(II)
+          A(NEWPOS) = A(II)
+        END DO
+        IDISP(1) = 1
+        IDISP(2) = LICN - KNUM + 1
+        DO I = 1, N
+          IKEEP(I,2) = I
+          IKEEP(I,3) = I
+        END DO
+        IKEEP(1,5) = -1
+130     IF (LBIG) BIG1 = THEMAX
+        IF (NSRCH<=N) GOTO 140
+
+!       Perform LU decomposition on diagonal blocks.
+        CALL MA30AD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2),       &
+          IKEEP(1,3),IRN,LIRN,IW(1,2),IW(1,3),IW(1,4),IW(1,5),IW(1,6),IW(1,7), &
+          IW(1,8),IW,UPRIV,IFLAG)
+        GOTO 150
+!       This call if used if NSRCH has been set less than or equal to N.
+!       In this case, two integer work arrays of length can be saved.
+140     CALL MA30AD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2),       &
+          IKEEP(1,3),IRN,LIRN,IW(1,2),IW(1,3),IW(1,4),IW(1,5),IW,IW,IW(1,6),IW,&
+          UPRIV,IFLAG)
+
+!       Transfer private variable information.
+!150    MINIRN = MAX(MIRN,NZ)
+!       MINICN = MAX(MICN,NZ)
+150     MINIRN = MAX(MINIRN,NZ)
+        MINICN = MAX(MINICN,NZ)
+!       IRNCP = MIRNCP
+!       ICNCP = MICNCP
+!       IRANK = MIRANK
+!       NDROP = NDROP1
+        IF (LBIG) BIG = BIG1
+        IF (IFLAG>=0) GOTO 160
+        IF (LP/=0) WRITE (LP,90008)
+        GOTO 170
+
+!       Reorder off-diagonal blocks according to pivot permutation.
+160     I1 = IDISP(1) - 1
+        IF (I1/=0) CALL MC22AD(N,ICN,A,I1,IKEEP(1,5),IKEEP(1,2), &
+          IKEEP(1,3),IW,IRN)
+        I1 = IDISP(1)
+        IEND = LICN - I1 + 1
+
+!       Optionally calculate element growth estimate.
+        IF (GROW) CALL MC24AD(N,ICN,A(I1),IEND,IKEEP,IKEEP(1,4),W)
+!       Increment growth estimate by original maximum element.
+        IF (GROW) W(1) = W(1) + THEMAX
+        IF (GROW .AND. N>1) W(2) = THEMAX
+!       Set flag if the only error is due to duplicate elements.
+        IF (IFLAG>=0 .AND. MOVE/=0) IFLAG = -14
+        GOTO 180
+170     IF (LP/=0) WRITE (LP,90009)
+180     RETURN
+90000   FORMAT (' N is out of range = ',I10)
+90001   FORMAT (' NZ is non positive = ',I10)
+90002   FORMAT (' LICN is too small = ',I10)
+90003   FORMAT (' LIRN is too small = ',I10)
+90004   FORMAT (' Error return from MA28AD because indices found out', &
+          ' of range')
+90005   FORMAT (1X,I6,'The element with value ',1P,D22.14, &
+          ' is out of range with indices ',I8,',',I8)
+90006   FORMAT (' Duplicate element in position ',I8,',',I8,' with value ',1P, &
+          D22.14)
+90007   FORMAT (' Error return from MC23AD')
+90008   FORMAT (' Error return from MA30AD')
+90009   FORMAT (' Error return from MA28AD')
+
+      END SUBROUTINE MA28AD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28BD(N,NZ,A,LICN,IVECT,JVECT,ICN,IKEEP,IW,W,IFLAG)
+! ..
+! This subroutine factorizes a matrix of a similar sparsity
+! pattern to that previously factorized by MA28AD.
+! ..
+! The parameters are as follows:
+! N            Order of matrix. Not altered by subroutine.
+! NZ           Number of non-zeros in input matrix. Not
+!              altered by subroutine.
+! A            Array of length LICN. Holds non-zeros of
+!              matrix on entry and non-zeros of factors on exit.
+!              Reordered by MA28DD and altered by MA30BD.
+! LICN         Length of arrays A and ICN. Not altered by
+!              subroutine.
+! IVECT, JVECT Arrays of length NZ. Hold row and column
+!              indices of non-zeros, respectively. Not altered
+!              by subroutine.
+! ICN          Array of length LICN. Same array as output
+!              from MA28AD. Unchanged by MA28BD.
+! IKEEP        Array of length 5*N. Same array as output
+!              from MA28AD. Unchanged by MA28BD.
+! IW           Array length 5*N. Used as workspace by
+!              MA28DD and MA30BD.
+! W            Array of length N. Used as workspace by
+!              MA28DD, MA30BD and (optionally) MC24AD.
+! IFLAG        Integer used as error flag, with positive
+!              or zero value indicating success.
+
+! Private Variable Information.
+! Unless otherwise stated private variables are as in MA28AD.
+! Those variables referenced by MA28BD are mentioned below.
+! LP, MP     Integers used as in MA28AD as unit number for error
+!            and warning messages, respectively.
+! NLP        Integer variable used to give value of LP to MA30ED.
+! EPS        MA30BD will output a positive value
+!            for IFLAG if any modulus of the ratio of pivot element
+!            to the largest element in its row (U part only) is less
+!            than EPS (unless EPS is greater than 1.0 when no action
+!            takes place).
+! RMIN       Variable equal to the value of this minimum ratio in
+!            cases where EPS is less than or equal to 1.0.
+! MEPS,MRMIN Variables used by the subroutine to communicate between
+!            MA28FD and MA30GD.
+! IDISP      Integer array of length 2. The same as that used by
+!            MA28AD. Unchanged by MA28BD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IFLAG, LICN, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5), IVECT(NZ), IW(N,5), JVECT(NZ)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I1, IDUP, IEND
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28BD
+! ..
+!       Check to see if elements were dropped in previous MA28AD call.
+        IF (NDROP==0) GOTO 10
+        IFLAG = -15
+        IF (LP/=0) WRITE (LP,90000) IFLAG, NDROP
+        GOTO 70
+10      IFLAG = 0
+        MEPS = EPS
+        NLP = LP
+!       Simple data check on variables.
+        IF (N>0) GOTO 20
+        IFLAG = -11
+        IF (LP/=0) WRITE (LP,90001) N
+        GOTO 60
+20      IF (NZ>0) GOTO 30
+        IFLAG = -10
+        IF (LP/=0) WRITE (LP,90002) NZ
+        GOTO 60
+30      IF (LICN>=NZ) GOTO 40
+        IFLAG = -9
+        IF (LP/=0) WRITE (LP,90003) LICN
+        GOTO 60
+
+40      CALL MA28DD(N,A,LICN,IVECT,JVECT,NZ,ICN,IKEEP(1,1),IKEEP(1,4), &
+          IKEEP(1,5),IKEEP(1,2),IKEEP(1,3),IW(1,3),IW,W(1),IFLAG)
+!       THEMAX is largest element in matrix.
+        THEMAX = W(1)
+        IF (LBIG) BIG1 = THEMAX
+!       IDUP equals one if there were duplicate elements, zero otherwise.
+        IDUP = 0
+        IF (IFLAG==(N+1)) IDUP = 1
+        IF (IFLAG<0) GOTO 60
+
+!       Perform row Gauss elimination on the structure received from MA28DD.
+        CALL MA30BD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2), &
+          IKEEP(1,3),W,IW,IFLAG)
+
+!       Transfer private variable information.
+        IF (LBIG) BIG1 = BIG
+!       RMIN = MRMIN
+        IF (IFLAG>=0) GOTO 50
+        IFLAG = -2
+        IF (LP/=0) WRITE (LP,90004)
+        GOTO 60
+
+!       Optionally calculate the growth parameter.
+50      I1 = IDISP(1)
+        IEND = LICN - I1 + 1
+        IF (GROW) CALL MC24AD(N,ICN,A(I1),IEND,IKEEP,IKEEP(1,4),W)
+!       Increment estimate by largest element in input matrix.
+        IF (GROW) W(1) = W(1) + THEMAX
+        IF (GROW .AND. N>1) W(2) = THEMAX
+!       Set flag if the only error is due to duplicate elements.
+        IF (IDUP==1 .AND. IFLAG>=0) IFLAG = -14
+        GOTO 70
+60      IF (LP/=0) WRITE (LP,90005)
+70      RETURN
+90000   FORMAT (' Error return from MA28BD with IFLAG = ',I4/I7, &
+          ' Entries dropped from structure by MA28AD')
+90001   FORMAT (' N is out of range = ',I10)
+90002   FORMAT (' NZ is non positive = ',I10)
+90003   FORMAT (' LICN is too small = ',I10)
+90004   FORMAT (' Error return from MA30BD')
+90005   FORMAT (' + Error return from MA28BD')
+
+      END SUBROUTINE MA28BD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28DD(N,A,LICN,IVECT,JVECT,NZ,ICN,LENR,LENRL,LENOFF, &
+        IP,IQ,IW1,IW,W1,IFLAG)
+! ..
+! This subroutine need never be called by the user directly. It sorts
+! the user's matrix into the structure of the decomposed form and checks
+! for the presence of duplicate entries or non-zeros lying outside the
+! sparsity pattern of the decomposition. It also calculates the largest
+! element in the input matrix.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: W1
+        INTEGER :: IFLAG, LICN, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN)
+        INTEGER :: ICN(LICN), IP(N), IQ(N), IVECT(NZ), IW(N,2), IW1(N,3), &
+          JVECT(NZ), LENOFF(N), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AA
+        INTEGER :: I, IBLOCK, IDISP2, IDUMMY, II, INEW, IOLD, J1, J2, JCOMP, &
+          JDUMMY, JJ, JNEW, JOLD, MIDPT
+        LOGICAL :: BLOCKL
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28DD
+! ..
+        BLOCKL = LENOFF(1) >= 0
+!       IW1(I,3) is set to the block in which row I lies and the
+!       inverse permutations to IP and IQ are set in IW1(:,1) and
+!       IW1(:,2), respectively.
+!       Pointers to beginning of the part of row I in diagonal and
+!       off-diagonal blocks are set in IW(I,2) and IW(I,1),
+!       respectively.
+        IBLOCK = 1
+        IW(1,1) = 1
+        IW(1,2) = IDISP(1)
+        DO 10 I = 1, N
+          IW1(I,3) = IBLOCK
+          IF (IP(I)<0) IBLOCK = IBLOCK + 1
+          II = IABS(IP(I)+0)
+!         II = IABS(IP(I))
+          IW1(II,1) = I
+          JJ = IQ(I)
+          JJ = IABS(JJ)
+          IW1(JJ,2) = I
+          IF (I==1) GOTO 10
+          IF (BLOCKL) IW(I,1) = IW(I-1,1) + LENOFF(I-1)
+          IW(I,2) = IW(I-1,2) + LENR(I-1)
+10      END DO
+!       Place each non-zero in turn into its correct location in
+!       the A/ICN array.
+        IDISP2 = IDISP(2)
+        DO 170 I = 1, NZ
+!         Necessary to avoid reference to unassigned element of ICN.
+          IF (I>IDISP2) GOTO 20
+          IF (ICN(I)<0) GOTO 170
+20        IOLD = IVECT(I)
+          JOLD = JVECT(I)
+          AA = A(I)
+!         This is a dummy loop for following a chain of interchanges.
+!         It will be executed NZ TIMES in total.
+          DO IDUMMY = 1, NZ
+!           Perform some validity checks on IOLD and JOLD.
+            IF (IOLD<=N .AND. IOLD>0 .AND. JOLD<=N .AND. JOLD>0) GOTO 30
+            IF (LP/=0) WRITE (LP,90000) I, A(I), IOLD, JOLD
+            IFLAG = -12
+            GOTO 180
+30          INEW = IW1(IOLD,1)
+            JNEW = IW1(JOLD,2)
+!           Are we in a valid block and is it diagonal or off-diagonal?
+!           IF (IW1(INEW,3)-IW1(JNEW,3)) 40, 60, 50
+!40         IFLAG = -13
+            IF (IW1(INEW,3)-IW1(JNEW,3) == 0) GOTO 60
+            IF (IW1(INEW,3)-IW1(JNEW,3) > 0) GOTO 50
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90001) IOLD, JOLD
+            GOTO 180
+50          J1 = IW(INEW,1)
+            J2 = J1 + LENOFF(INEW) - 1
+            GOTO 110
+!           Element is in diagonal block.
+60          J1 = IW(INEW,2)
+            IF (INEW>JNEW) GOTO 70
+            J2 = J1 + LENR(INEW) - 1
+            J1 = J1 + LENRL(INEW)
+            GOTO 110
+70          J2 = J1 + LENRL(INEW)
+!           Binary search of ordered list. Element in L part of row.
+            DO 100 JDUMMY = 1, N
+              MIDPT = (J1+J2)/2
+              JCOMP = IABS(ICN(MIDPT)+0)
+!             JCOMP = IABS(ICN(MIDPT))
+!             IF (JNEW-JCOMP) 80, 130, 90
+!80           J2 = MIDPT
+              IF (JNEW-JCOMP == 0) GOTO 130
+              IF (JNEW-JCOMP > 0) GOTO 90
+              J2 = MIDPT
+              GOTO 100
+90            J1 = MIDPT
+100         END DO
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90002) IOLD, JOLD
+            GOTO 180
+!           Linear search. Element in L part of row or off-diagonal blocks.
+110         DO MIDPT = J1, J2
+              IF (IABS(ICN(MIDPT)+0)==JNEW) GOTO 130
+!             IF (IABS(ICN(MIDPT))==JNEW) GOTO 130
+            END DO
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90002) IOLD, JOLD
+            GOTO 180
+!           Equivalent element of ICN is in position MIDPT.
+130         IF (ICN(MIDPT)<0) GOTO 160
+            IF (MIDPT>NZ .OR. MIDPT<=I) GOTO 150
+            W1 = A(MIDPT)
+            A(MIDPT) = AA
+            AA = W1
+            IOLD = IVECT(MIDPT)
+            JOLD = JVECT(MIDPT)
+            ICN(MIDPT) = -ICN(MIDPT)
+          END DO
+150       A(MIDPT) = AA
+          ICN(MIDPT) = -ICN(MIDPT)
+          GOTO 170
+160       A(MIDPT) = A(MIDPT) + AA
+!        Set flag for duplicate elements.
+          iflag = n + 1
+170     END DO
+!       Reset ICN array and zero elements in LU but not in A.
+!       Also calculate the maximum element of A.
+180     W1 = ZERO
+        DO 200 I = 1, IDISP2
+          IF (ICN(I)<0) GOTO 190
+          A(I) = ZERO
+          GOTO 200
+190       ICN(I) = -ICN(I)
+          W1 = MAX(W1,ABS(A(I)))
+200     END DO
+        RETURN
+90000   FORMAT (' Element ',I6,' with value ',D22.14,' has indices ',I8, &
+          ','/I8,' indices out of range')
+90001   FORMAT (' Non-zero ',I7,',',I6,' in zero off-diagonal',' block')
+90002   FORMAT (' Element ',I6,',',I6,' was not in LU pattern')
+
+      END SUBROUTINE MA28DD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28CD(N,A,LICN,ICN,IKEEP,RHS,W,MTYPE)
+! ..
+! This subroutine uses the factors from MA28AD or MA28BD to solve a
+! system of equations without iterative refinement.
+! ..
+! The parameters are:
+! N     Order of matrix. Not altered by subroutine.
+! A     array of length LICN. the same array as
+!       was used in the most recent call to MA28AD or MA28BD.
+! LICN  Length of arrays A and ICN. Not altered by subroutine.
+! ICN   Array of length LICN. Same array as output from
+!       MA28AD. Unchanged by MA30CD.
+! IKEEP Array of length 5*N. Same array as output from
+!       MA28AD. Unchanged by MA30CD.
+! RHS   Array of length N. On entry, it holds the
+!       right hand side, on exit, the solution vector.
+! W     Array of length N. Used as workspace by MA30CD.
+! MTYPE Integer used to tell MA30CD to solve the direct
+!       equation (MTYPE = 1) or its transpose (MTYPE /= 1).
+
+! Private Variable Information.
+! Unless otherwise stated private variables are as in MA28AD.
+! Those variables referenced by MA30CD are mentioned below.
+! RESID   Variable which returns maximum residual of
+!         equations where pivot was zero.
+! MRESID  Variable used by MA30CD to communicate between
+!         MA28FD and MA30HD.
+! IDISP   Integer array of length 2. The same as that used
+!         by MA28AD. Unchanged by MA28BD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, MTYPE, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), RHS(N), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28CD
+! ..
+!       This call performs the solution of the set of equations.
+        CALL MA30CD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IKEEP(1,5),IDISP, &
+          IKEEP(1,2),IKEEP(1,3),RHS,W,MTYPE)
+!       Transfer private variable information.
+        RESID = MRESID
+        RETURN
+
+      END SUBROUTINE MA28CD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28ID(N,NZ,AORG,IRNORG,ICNORG,LICN,A,ICN,IKEEP,RHS, &
+        X,R,W,MTYPE,PREC,IFLAG)
+! ..
+! This subroutine uses the factors from an earlier call to MA28AD or
+! MA28BD to solve the system of equations with iterative refinement.
+! ..
+! The parameters are:
+! N      Order of the matrix. Not altered by the subroutine.
+! NZ     Number of entries in the original matrix. Not altered by
+!        the subroutine.
+!        For this entry the original matrix must have been saved in
+!        AORG, IRNORG, ICNORG where entry AORG(K) is in row IRNORG(K)
+!        and column ICNORG(K),K = 1,...,NZ. Information about the
+!        factors of A is communicated to this subroutine via the
+!        parameters LICN, A, ICN and IKEEP where:
+! AORG   Array of length NZ. Not altered by MA28ID.
+! IRNORG Array of length NZ. Not altered by MA28ID.
+! ICNORG Array of length NZ. Not altered by MA28ID.
+! LICN   Length of arrays A and ICN. Not altered by the subroutine.
+! A      Array of length LICN. It must be unchanged since the
+!        last call to MA28AD or MA28BD. Not altered by the
+!        subroutine.
+! ICN, IKEEP are the arrays (of lengths LICN and 5*N, respectively)
+!        of the same names as in the previous all to MA28AD. They
+!        should be unchanged since this earlier call and they are
+!        not altered by MA28ID.
+! The other parameters are as follows:
+! RHS    Array of length N. The user must set RHS(I) to contain
+!        the value of the Ith component of the right hand side.
+!        Not altered by MA28ID.
+! X      Array of length N. If an initial guess of the solution
+!        is given (ISTART equal to 1), then the user must set X(I)
+!        to contain the value of the Ith component of the estimated
+!        solution. On exit, X(I) contains the Ith component of the
+!        solution vector.
+! R      Array of length N. It need not be set on entry. On exit,
+!        R(I) contains the Ith component of an estimate of the error
+!        if MAXIT is greater than 0.
+! W      Array of length N. Used as workspace by MA28ID.
+! MTYPE  Must be set to determine whether MA28ID will solve A*X = RHS
+!        (MTYPE = 1) or AT*X = RHS (MTYPE /= 1). Not altered by MA28ID.
+! PREC   Should be set by the user to the relative accuracy required.
+!        The iterative refinement will terminate if the magnitude of
+!        the largest component of the estimated error relative to the
+!        largest component in the solution is less than PREC.
+!        Not altered by MA28ID.
+! IFLAG  Diagnostic flag which will be set to zero on successful
+!        exit from MA28ID. Otherwise it will have a non-zero value.
+!        The non-zero value IFLAG can have on exit from MA28ID are
+!        -16 indicating that more than MAXIT iteartions are required.
+!        -17 indicating that more convergence was too slow.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: PREC
+        INTEGER :: IFLAG, LICN, MTYPE, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), AORG(NZ), R(N), RHS(N), W(N), X(N)
+        INTEGER :: ICN(LICN), ICNORG(NZ), IKEEP(N,5), IRNORG(NZ)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CONVER, D, DD
+        INTEGER :: I, ITERAT, NCOL, NROW
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28ID
+! ..
+!       Initialization of NOITER, ERRMAX, and IFLAG.
+        NOITER = 0
+        ERRMAX = ZERO
+        IFLAG = 0
+
+!       Jump if a starting vector has been supplied by the user.
+
+        IF (ISTART==1) GOTO 20
+
+!       Make a copy of the right-hand side vector.
+
+        X(1:N) = RHS(1:N)
+
+!       Find the first solution.
+
+        CALL MA28CD(N,A,LICN,ICN,IKEEP,X,W,MTYPE)
+
+!       Stop the computations if MAXIT = 0.
+
+20      IF (MAXIT==0) GOTO 160
+
+!       Calculate the max-norm of the first solution.
+
+        DD = 0.0
+        DO I = 1, N
+          DD = MAX(DD,ABS(X(I)))
+        END DO
+        DXMAX = DD
+
+!       Begin the iterative process.
+
+        DO 120 ITERAT = 1, MAXIT
+          D = DD
+
+!         Calculate the residual vector.
+
+          R(1:N) = RHS(1:N)
+          IF (MTYPE==1) GOTO 60
+          DO I = 1, NZ
+            NROW = IRNORG(I)
+            NCOL = ICNORG(I)
+            R(NCOL) = R(NCOL) - AORG(I)*X(NROW)
+          END DO
+          GOTO 80
+!         MTYPE = 1.
+60        DO I = 1, NZ
+            NROW = IRNORG(I)
+            NCOL = ICNORG(I)
+            R(NROW) = R(NROW) - AORG(I)*X(NCOL)
+          END DO
+80        DRES = 0.0
+
+!         Find the max-norm of the residual vector.
+
+          DO I = 1, N
+            DRES = MAX(DRES,ABS(R(I)))
+          END DO
+
+!         Stop the calculations if the max-norm of
+!         the residual vector is zero.
+
+!         IF (DRES == 0.0) GOTO 150
+          IF (ABS(DRES)<=ZERO) GOTO 150
+
+!         Calculate the correction vector.
+
+          NOITER = NOITER + 1
+          CALL MA28CD(N,A,LICN,ICN,IKEEP,R,W,MTYPE)
+
+!         Find the max-norm of the correction vector.
+
+          DD = 0.0
+          DO I = 1, N
+            DD = MAX(DD,ABS(R(I)))
+          END DO
+
+!         Check the convergence.
+
+          IF (DD>D*CGCE .AND. ITERAT>=2) GOTO 130
+          IF (ABS((DXMAX*TEN+DD)-(DXMAX*TEN))<=ZERO) GOTO 140
+
+!         Attempt to improve the solution.
+
+          DXMAX = 0.0
+          DO I = 1, N
+            X(I) = X(I) + R(I)
+            DXMAX = MAX(DXMAX,ABS(X(I)))
+          END DO
+
+!         Check the stopping criterion.
+ 
+          IF (DD<PREC*DXMAX) GOTO 140
+120     END DO
+!       More than MAXIT iterations required.
+        IFLAG = -16
+        WRITE (LP,90000) IFLAG, MAXIT
+        GOTO 140
+!       Convergence rate unacceptably slow.
+130     IFLAG = -17
+        CONVER = DD/D
+        WRITE (LP,90001) IFLAG, CONVER, CGCE
+
+!       The iterative process is terminated.
+
+140     ERRMAX = DD
+150     CONTINUE
+160     RETURN
+90000   FORMAT (' Error return from MA28ID with IFLAG = ',I3/' More than ', &
+          I5,' iterations required')
+90001   FORMAT (' Error return from MA28I with IFLAG = ', &
+          I3/' Convergence rate of ',1P,E9.2,' too slow'/ &
+          ' Maximum acceptable rate set to ',1P,E9.2)
+
+      END SUBROUTINE MA28ID
+!_______________________________________________________________________
+
+! Private Variable Information.
+! LP, MP are used by the subroutine as the unit numbers for its warning
+!     and diagnostic messages. Default value for both is 6 (for line
+!     printer output). The user can either reset them to a different
+!     stream number or suppress the output by setting them to zero.
+!     While LP directs the output of error diagnostics from the
+!     principal subroutines and internally called subroutines, MP
+!     controls only the output of a message which warns the user that
+!     he has input two or more non-zeros A(I),. .,A(K) with the same
+!     row and column indices. The action taken in this case is to
+!     proceed using a numerical value of A(I)+...+A(K). In the absence
+!     of other errors, IFLAG will equal -14 on exit.
+! LBLOCK Is a logical variable which controls an option of first
+!     preordering the matrix to block lower triangular form (using
+!     Harwell subroutine MC23A). The preordering is performed if LBLOCK
+!     is equal to its default value of .TRUE. If LBLOCK is set to
+!     .FALSE., the option is not invoked and the space allocated to
+!     IKEEP can be reduced to 4*N+1.
+! GROW is a logical variable. If it is left at its default value of
+!     .TRUE., then on return from MA28AD or MA28BD, W(1) will give
+!     an estimate (an upper bound) of the increase in size of elements
+!     encountered during the decomposition. If the matrix is well
+!     scaled, then a high value for W(1), relative to the largest entry
+!     in the input matrix, indicates that the LU decomposition may be
+!     inaccurate and the user should be wary of his results and perhaps
+!     increase U for subsequent runs. We would like to emphasise that
+!     this value only relates to the accuracy of our LU decomposition
+!     and gives no indication as to the singularity of the matrix or the
+!     accuracy of the solution. This upper bound can be a significant
+!     overestimate particularly if the matrix is badly scaled. If an
+!     accurate value for the growth is required, LBIG(Q.V.) should be
+!     set to .TRUE.
+! EPS, RMIN If, on entry to MA28BD, EPS is less than one, then RMIN
+!     will give the smallest ratio of the pivot to the largest element
+!     in the corresponding row of the upper triangular factor thus
+!     monitoring the stability of successive factorizations. If RMIN
+!     becomes very large and W(1) from MA28BD is also very large, it
+!     may be advisable to perform a new decomposition using MA28AD.
+! RESID Variable which on exit from MA30CD gives the value of the
+!     maximum residual over all the equations unsatisfied because
+!     of dependency (zero pivots).
+! IRNCP, ICNCP Variables which monitor the adequacy of "elbow room"
+!     in IRN and A/ICN, respectively. If either is quite large (say
+!     greater than N/10), it will probably pay to increase the size of
+!     the corresponding array for subsequent runs. If either is very low
+!     or zero, then one can perhaps save storage by reducing the size of
+!     the corresponding array.
+! MINIRN, MINICN Integer variables which, in the event of a successful
+!     return (IFLAG >= 0 or IFLAG = -14) give the minimum size of IRN
+!     and A/ICN, respectively which would enable a successful run on
+!     an identical matrix. On an exit with IFLAG equal to -5, MINICN
+!     gives the minimum value of ICN for success on subsequent runs on
+!     an identical matrix. In the event of failure with IFLAG = -6,-4,
+!     -3,-2, OR -1, then MINICN and MINIRN give the minimum value of
+!     LICN and LIRN, respectively which would be required for a
+!     successful decomposition up to the point at which the failure
+!     occurred.
+! IRANK Integer variable which gives an upper bound on the rank of
+!     the matrix.
+! ABORT1 is a logical variable with default value .TRUE. If ABORT1 is
+!     set to .FALSE., then MA28AD will decompose structurally singular
+!     matrices (including rectangular ones).
+! ABORT2 is a logical variable with default value .TRUE. If ABORT2 is
+!     set to .FALSE., then MA28AD will decompose numerically singular
+!     matrices.
+! IDISP is an integer array of length 2. On output from MA28AD, The
+!     indices of the diagonal blocks of the factors lie in positions
+!     IDISP(1) to IDISP(2) of A/ICN. This array must be preserved
+!     between a call to MA28AD and subsequent calls to MA28BD,
+!     MA30CD or MA28ID.
+! TOL If set to a positive value, then any non-zero whose modulus is
+!     less than TOL will be dropped from the factorization. The
+!     factorization will then require less storage but will be
+!     inaccurate. After a run of MA28AD with TOL positive it is not
+!     possible to use MA28BD and the user is recommended to use
+!     MA28ID to obtain the solution. The default value for TOL is 0.0.
+! THEMAX On exit from MA28AD, THEMAX will hold the largest entry of
+!     the original matrix.
+! BIG If LBIG has been set to .TRUE., BIG will hold the largest entry
+!     encountered during the factorization by MA28AD or MA28BD.
+! DXMAX On exit from MA28ID, DXMAX will be set to the largest component
+!     of the solution.
+! ERRMAX If MAXIT is positive, ERRMAX will be set to the largest
+!     component in the estimate of the error.
+! DRES On exit from MA28ID, if MAXIT is positive, DRES will be set to
+!     the largest component of the residual.
+! CGCE Used by MA28ID to check the convergence rate. If the ratio of
+!     successive corrections is not less than CGCE, then we terminate
+!     since the convergence rate is adjudged too slow.
+! NDROP If TOL has been set positive on exit from MA28AD, NDROP will
+!     hold the number of entries dropped from the data structure.
+! MAXIT Maximum number of iterations performed by MA28ID. Default = 16.
+! NOITER Set by MA28ID to the number of iterative refinement iterations
+!     actually used.
+! NSRCH If NSRCH is set to a value less than N, then a different pivot
+!     option will be employed by MA28AD. This may result in different
+!     fill-in and execution time for MA28AD. If NSRCH is less than or
+!     equal to N, the workspace array IW can be reduced in length. The
+!     default value for NSRCH is 32768.
+! ISTART If ISTART is set to a value other than zero, then the user
+!     must supply an estimate of the solution to MA28ID. The default
+!     value for istart is zero.
+! LBIG If LBIG is set to .TRUE., the value of the largest element
+!     encountered in the factorization by MA28AD or MA28BD is returned
+!     in BIG. Setting LBIG to .TRUE. will increase the time for MA28AD
+!     marginally and that for MA28BD by about 20%. The default value
+!     for LBIG is .FALSE.
+!_______________________________________________________________________
+
+      SUBROUTINE MA30AD(NN,ICN,A,LICN,LENR,LENRL,IDISP,IP,IQ,IRN,LIRN, &
+        LENC,IFIRST,LASTR,NEXTR,LASTC,NEXTC,IPTR,IPC,U,IFLAG)
+! ..
+!     If the user requires a more convenient data interface then the
+!     MA28 package should be used. The MA28 subroutines call the MA30
+!     subroutines after checking the user's input data and optionally
+!     using MC23AD to permute the matrix to block triangular form.
+!     This package of subroutines (MA30AD, MA30BD, MA30CD, and MA30DD)
+!     performs operations pertinent to the solution of a general
+!     sparse N by N system of linear equations (i.e., solve
+!     AX = B). Structually singular matrices are permitted including
+!     those with row or columns consisting entirely of zeros (i.e.,
+!     including rectangular matrices). It is assumed that the
+!     non-zeros of the matrix A do not differ widely in size. If
+!     necessary a prior call of the scaling subroutine MA19AD may be
+!     made.
+!     A discussion of the design of these subroutines is given by Duff
+!     and Reid (ACM TRANS MATH SOFTWARE 5 PP 18-35, 1979(CSS 48)) while
+!     fuller details of the implementation are given in duff (HARWELL
+!     REPORT AERE-R 8730, 1977). The additional pivoting option in
+!     ma30ad and the use of drop tolerances (see private variables for
+!     MA30ID) were added to the package after joint work with Reid,
+!     Schaumburg, Wasniewski and Zlatev (Duff, Reid, Schaumburg,
+!     Wasniewski and Zlatev, HARWELL REPORT CSS 135, 1983).
+
+!     MA30AD performs the LU decomposition of the diagonal blocks of
+!     the permutation PAQ of a sparse matrix A, where input permutations
+!     P1 and Q1 are used to define the diagonal blocks. There may be
+!     non-zeros in the off-diagonal blocks but they are unaffected by
+!     MA30AD. P and P1 differ only within blocks as do Q and Q1. The
+!     permutations P1 and Q1 may be found by calling MC23AD or the
+!     matrix may be treated as a single block by using P1 = Q1 = I. The
+!     matrix non-zeros should be held compactly by rows, although it
+!     should be noted that the user can supply the matrix by columns
+!     to get the LU decomposition of A transpose.
+
+!     This description should also be consulted for further information
+!     on most of the parameters of MA30BD and MA30CD.
+!     The parameters are:
+! N   is an integer variable which must be set by the user to the order
+!     of the matrix. It is not altered by MA30AD.
+! ICN is an integer array of length LICN. Positions IDISP(2) to
+!     LICN must be set by the user to contain the column indices of
+!     the non-zeros in the diagonal blocks of P1*A*Q1. Those belonging
+!     to a single row must be contiguous but the ordering of column
+!     indices with each row is unimportant. The non-zeros of row I
+!     precede those of row I+1,I = 1,...,N-1 and no wasted space is
+!     allowed between the rows. On output the column indices of the
+!     LU decomposition of PAQ are held in positions IDISP(1) to
+!     IDISP(2), the rows are in pivotal order, and the column indices
+!     of the L Part of each row are in pivotal order and precede those
+!     of U. Again there is no wasted space either within a row or
+!     between the rows. ICN(1) to ICN(IDISP(1)-1), are neither
+!     required nor altered. If MC23AD has been called, these will hold
+!     information about the off-diagonal blocks.
+! A   Array of length LICN whose entries IDISP(2) to LICN must be set
+!     by the user to the values of the non-zero entries of the matrix
+!     in the order indicated by ICN. On output A will hold the LU
+!     factors of the matrix where again the position in the matrix
+!     is determined by the corresponding values in ICN.
+!     A(1) to A(IDISP(1)-1) are neither required nor altered.
+! LICN is an integer variable which must be set by the user to the
+!     length of arrays ICN and A. It must be big enough for A and ICN
+!     to hold all the non-zeros of L and U and leave some "elbow
+!     room". It is possible to calculate a minimum value for LICN by
+!     a preliminary run of MA30AD. The adequacy of the elbow room
+!     can be judged by the size of the private variable ICNCP.
+!     It is not altered by MA30AD.
+! LENR is an integer array of length N. On input, LENR(I) should
+!     equal the number of non-zeros in row I,I = 1,...,N of the
+!     diagonal blocks of P1*A*Q1. On output, LENR(I) will equal the
+!     total number of non-zeros in row I of L and row I of U.
+! LENRL is an integer array of length N. On output from MA30AD,
+!     LENRL(I) will hold the number of non-zeros in row I of L.
+! IDISP is an integer array of length 2. The user should set IDISP(1)
+!     to be the first available position in A/ICN for the LU
+!     decomposition while IDISP(2) is set to the position in A/ICN of
+!     the first non-zero in the diagonal blocks of P1*A*Q1. On output,
+!     IDISP(1) will be unaltered while IDISP(2) will be set to the
+!     position in A/ICN of the last non-zero of the LU decomposition.
+! IP  is an integer array of length N which holds a permutation of
+!     the integers 1 to N. On input to MA30AD, the absolute value of
+!     IP(I) must be set to the row of A which is row I of P1*A*Q1. A
+!     negative value for IP(I) indicates that row I is at the end of a
+!     diagonal block. On output from MA30AD, IP(I) indicates the row
+!     of A which is the Ith row in PAQ. IP(I) will still be negative
+!     for the last row of each block (except the last).
+! IQ  is an integer array of length N which again holds a
+!     permutation of the integers 1 to N. On input to MA30AD, IQ(J)
+!     must be set to the column of A which is column J of P1*A*Q1. On
+!     output from MA30AD, the absolute value of IQ(J) indicates the
+!     column of A which is the Jth in PAQ. For rows, I say, in which
+!     structural or numerical singularity is detected IQ(I) is
+!     negated.
+! IRN is an integer array of length LIRN used as workspace by
+!     MA30AD.
+! LIRN is an integer variable. It should be greater than the
+!     largest number of non-zeros in a diagonal block of P1*A*Q1 but
+!     need not be as large as LICN. It is the length of array IRN and
+!     should be large enough to hold the active part of any block,
+!     plus some "elbow room", the a posteriori adequacy of which can
+!     be estimated by examining the size of private variable
+!     IRNCP.
+! LENC, FIRST, LASTR, NEXTR, LASTC, NEXTC are all integer arrays of
+!     length N which are used as workspace by MA30AD. If NSRCH is
+!     set to a value less than or equal to N, then arrays LASTC and
+!     NEXTC are not referenced by MA30AD and so can be dummied in
+!     the call to MA30AD.
+! IPTR, IPC are integer arrays of length N which are used as
+!     workspace by MA30AD.
+! U   is a real(kind=wp) variable which should be set by the user
+!     to a value between 0. and 1.0. If less than zero it is reset
+!     to zero and if its value is 1.0 or greater it is reset to
+!     0.9999 (0.999999999 in D version). It determines the balance
+!     between pivoting for sparsity and for stability, values near
+!     zero emphasizing sparsity and values near one emphasizing
+!     stability. We recommend U = 0.1 as a posible first trial value.
+!     The stability can be judged by a later call to MC24AD or by
+!     setting LBIG to .TRUE.
+! IFLAG is an integer variable. It will have a non-negative value
+!     if MA30AD is successful. Negative values indicate error
+!     conditions while positive values indicate that the matrix has
+!     been successfully decomposed but is singular. For each non-zero
+!     value, an appropriate message is output on unit LP. Possible
+!     non-zero values for IFLAG are
+! -1  THe matrix is structurally singular with rank given by IRANK
+!     in private variables for MA30FD.
+! +1  If, however, the user wants the LU decomposition of a
+!     structurally singular matrix and sets the private variable
+!     ABORT1 to .FALSE., then, in the event of singularity and a
+!     successful decomposition, Iflag is returned with the value +1
+!     and no message is output.
+! -2  The matrix is numerically singular (it may also be structurally
+!     singular) with estimated rank given by IRANK in private variables
+!     for MA30FD.
+! +2  THE user can choose to continue the decomposition even when a
+!     zero pivot is encountered by setting private variable
+!     ABORT2 TO .FALSE. If a singularity is encountered, IFLAG will
+!     then return with a value of +2, and no message is output if
+!     the decomposition has been completed successfully.
+! -3  LIRN has not been large enough to continue with the
+!     decomposition. If the stage was zero then private variable
+!     MINIRN gives the length sufficient to start the decomposition on
+!     this block. FOr a successful decomposition on this block the
+!     user should make LIRN slightly (say about N/2) greater than this
+!     value.
+! -4  LICN is not large enough to continue with the decomposition.
+! -5  The decomposition has been completed but some of the LU factors
+!     have been discarded to create enough room in A/ICN to continue
+!     the decomposition. The variable MINICN in private variables for
+!     MA30FD. Then gives the size that LICN should be to enable the
+!     factorization to be successful. If the user sets private
+!     variable ABORT3 to .TRUE., then the subroutine will exit
+!     immediately instead of destroying any factors and continuing.
+! -6  Both LICN and LIRN are too small. Termination has been caused
+!     by lack of space in IRN (see error IFLAG = -3), but already
+!     some of the LU factors in A/ICN have been lost (see error
+!     IFLAG = -5). MINICN gives the minimum amount of space
+!     required in A/ICN for decomposition up to this point.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: U
+        INTEGER :: IFLAG, LICN, LIRN, NN
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN)
+        INTEGER :: ICN(LICN), IDISP(2), IFIRST(NN), IP(NN), IPC(NN), &
+          IPTR(NN), IQ(NN), IRN(LIRN), LASTC(NN), LASTR(NN),         &
+          LENC(NN), LENR(NN), LENRL(NN), NEXTC(NN), NEXTR(NN)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AANEW, AMAX, ANEW, AU, PIVR, PIVRAT, SCALE
+        INTEGER :: COLUPD, DISPC, I, I1, I2, IACTIV, IBEG, IDISPC,   &
+          IDROP, IDUMMY, IEND, IFILL, IFIR, II, III, IJFIR, IJP1,    &
+          IJPOS, ILAST, INDROW, IOP, IPIV, IPOS, IROWS, ISING, ISRCH,&
+          ISTART, ISW, ISW1, ITOP, J, J1, J2, JBEG, JCOST, JCOUNT,   &
+          JDIFF, JDUMMY, JEND, JJ, JMORE, JNEW, JNPOS, JOLD, JPIV,   &
+          JPOS, JROOM, JVAL, JZER, JZERO, K, KCOST, KDROP, L, LC,    &
+          LENPIV, LENPP, LL, LR, MOREI, MSRCH, N, NBLOCK, NC, NNM1,  &
+          NR, NUM, NZ, NZ2, NZCOL, NZMIN, NZPC, NZROW, OLDEND,       &
+          OLDPIV, PIVEND, PIVOT, PIVROW, ROWI
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30AD
+! ..
+        MSRCH = NSRCH
+        NDROP = 0
+        LNPIV(1:10) = 0
+        LPIV(1:10) = 0
+        MAPIV = 0
+        MANPIV = 0
+        IAVPIV = 0
+        IANPIV = 0
+        KOUNTL = 0
+        MINIRN = 0
+        MINICN = IDISP(1) - 1
+        MOREI = 0
+        IRANK = NN
+        IRNCP = 0
+        ICNCP = 0
+        IFLAG = 0
+!       Reset U if necessary.
+        U = MIN(U,UMAX)
+!       IBEG is the position of the next pivot row after elimination
+!       step using it.
+        U = MAX(U,ZERO)
+        IBEG = IDISP(1)
+!       IACTIV is the position of the first entry in the active part
+!       of A/ICN.
+        IACTIV = IDISP(2)
+!       NZROW is current number of non-zeros in active and unprocessed
+!       part of row file ICN.
+        NZROW = LICN - IACTIV + 1
+        MINICN = NZROW + MINICN
+
+!       Count the number of diagonal blocks and set up pointers to the
+!       beginnings of the rows. NUM is the number of diagonal blocks.
+        NUM = 1
+        IPTR(1) = IACTIV
+        IF (NN==1) GOTO 30
+        NNM1 = NN - 1
+        DO I = 1, NNM1
+          IF (IP(I)<0) NUM = NUM + 1
+          IPTR(I+1) = IPTR(I) + LENR(I)
+        END DO
+!       ILAST is the last row in the previous block.
+30      ILAST = 0
+
+! ***********************************************
+! ****    LU decomposition of block NBLOCK   ****
+! ***********************************************
+
+!       Each pass through this loop performs LU decomposition on one
+!       of the diagonal blocks.
+        DO 1070 NBLOCK = 1, NUM
+          ISTART = ILAST + 1
+          DO IROWS = ISTART, NN
+            IF (IP(IROWS)<0) GOTO 50
+          END DO
+          IROWS = NN
+50        ILAST = IROWS
+!         N is the number of rows in the current block.
+!         ISTART is the index of the first row in the current block.
+!         ILAST is the index of the last row in the current block.
+!         IACTIV is the position of the first entry in the block.
+!         ITOP is the position of the last entry in the block.
+          N = ILAST - ISTART + 1
+          IF (N/=1) GOTO 100
+
+!         Code for dealing WITH 1x1 block.
+          LENRL(ILAST) = 0
+          ISING = ISTART
+          IF (LENR(ILAST)/=0) GOTO 60
+!         Block is structurally singular.
+          IRANK = IRANK - 1
+          ISING = -ISING
+          IF (IFLAG/=2 .AND. IFLAG/=-5) IFLAG = 1
+          IF (.NOT.ABORT1) GOTO 90
+          IDISP(2) = IACTIV
+          IFLAG = -1
+          IF (LP/=0) WRITE (LP,90000)
+!         RETURN
+          GOTO 1190
+60        SCALE = ABS(A(IACTIV))
+          IF (ABS(SCALE)<=ZERO) GOTO 70
+          IF (LBIG) BIG = MAX(BIG,SCALE)
+          GOTO 80
+70        ISING = -ISING
+          IRANK = IRANK - 1
+          IPTR(ILAST) = 0
+          IF (IFLAG/=-5) IFLAG = 2
+          IF (.NOT.ABORT2) GOTO 80
+          IDISP(2) = IACTIV
+          IFLAG = -2
+          IF (LP/=0) WRITE (LP,90001)
+          GOTO 1190
+80        A(IBEG) = A(IACTIV)
+          ICN(IBEG) = ICN(IACTIV)
+          IACTIV = IACTIV + 1
+          IPTR(ISTART) = 0
+          IBEG = IBEG + 1
+          NZROW = NZROW - 1
+90        LASTR(ISTART) = ISTART
+          IPC(ISTART) = -ISING
+          GOTO 1070
+
+!         Non-trivial block.
+100       ITOP = LICN
+          IF (ILAST/=NN) ITOP = IPTR(ILAST+1) - 1
+
+!         Set up column oriented storage.
+          LENRL(ISTART:ILAST) = 0
+          LENC(ISTART:ILAST) = 0
+          IF (ITOP-IACTIV<LIRN) GOTO 120
+          MINIRN = ITOP - IACTIV + 1
+          PIVOT = ISTART - 1
+          GOTO 1170
+
+!         Calculate column counts.
+120       DO II = IACTIV, ITOP
+            I = ICN(II)
+            LENC(I) = LENC(I) + 1
+          END DO
+!         Set up column pointers so that IPC(J) points to position
+!         after end of column J in column file.
+          IPC(ILAST) = LIRN + 1
+          J1 = ISTART + 1
+          DO JJ = J1, ILAST
+            J = ILAST - JJ + J1 - 1
+            IPC(J) = IPC(J+1) - LENC(J+1)
+          END DO
+          DO 160 INDROW = ISTART, ILAST
+            J1 = IPTR(INDROW)
+            J2 = J1 + LENR(INDROW) - 1
+            IF (J1>J2) GOTO 160
+            DO JJ = J1, J2
+              J = ICN(JJ)
+              IPOS = IPC(J) - 1
+              IRN(IPOS) = INDROW
+              IPC(J) = IPOS
+            END DO
+160       END DO
+!         DISPC is the lowest indexed active location in the column file.
+          DISPC = IPC(ISTART)
+          NZCOL = LIRN - DISPC + 1
+          MINIRN = MAX(NZCOL,MINIRN)
+          NZMIN = 1
+
+!         Initialize array IFIRST. IFIRST(I) = +/- K indicates that
+!         row/col K has I non-zeros. If IFIRST(I) = 0, there is no
+!         row or column with I non-zeros.
+          IFIRST(1:N) = 0
+
+!         Compute ordering of row and column counts.
+!         First run through columns (from column N to column 1).
+          DO 190 JJ = ISTART, ILAST
+            J = ILAST - JJ + ISTART
+            NZ = LENC(J)
+            IF (NZ/=0) GOTO 180
+            IPC(J) = 0
+            GOTO 190
+180         IF (NSRCH<=NN) GOTO 190
+            ISW = IFIRST(NZ)
+            IFIRST(NZ) = -J
+            LASTC(J) = 0
+            NEXTC(J) = -ISW
+            ISW1 = IABS(ISW)
+            IF (ISW/=0) LASTC(ISW1) = J
+190       END DO
+!        Now run through rows (again from N to 1).
+          DO 220 II = ISTART, ILAST
+               I = ILAST - II + ISTART
+            NZ = LENR(I)
+            IF (NZ/=0) GOTO 200
+            IPTR(I) = 0
+            LASTR(I) = 0
+            GOTO 220
+200         ISW = IFIRST(NZ)
+            IFIRST(NZ) = I
+            IF (ISW>0) GOTO 210
+            NEXTR(I) = 0
+            LASTR(I) = ISW
+            GOTO 220
+210         NEXTR(I) = ISW
+            LASTR(I) = LASTR(ISW)
+            LASTR(ISW) = I
+220       END DO
+
+! **********************************************
+! ****    Start of main elimination loop    ****
+! **********************************************
+          DO 1050 PIVOT = ISTART, ILAST
+
+!           First find the pivot using MARKOWITZ criterion with
+!           stability control.
+!           JCOST is the Markowitz cost of the best pivot so far.
+!           This pivot is in row IPIV and column JPIV.
+            NZ2 = NZMIN
+            JCOST = N*N
+
+!           Examine rows/columns in order of ascending count.
+            DO L = 1, 2
+              PIVRAT = ZERO
+              ISRCH = 1
+              LL = L
+!             A pass with L equal to 2 is only performed in the
+!             case of singularity.
+              DO 340 NZ = NZ2, N
+                IF (JCOST<=(NZ-1)**2) GOTO 430
+                IJFIR = IFIRST(NZ)
+!               IF (IJFIR) 240, 230, 250
+!230            IF (LL==1) NZMIN = NZ + 1
+                IF (IJFIR < 0) GOTO 240
+                IF (IJFIR > 0) GOTO 250
+                IF (LL==1) NZMIN = NZ + 1
+                GOTO 340
+240             LL = 2
+                IJFIR = -IJFIR
+                GOTO 300
+250             LL = 2
+!               Scan rows with NZ non-zeros.
+                DO IDUMMY = 1, N
+                  IF (JCOST<=(NZ-1)**2) GOTO 430
+                  IF (ISRCH>MSRCH) GOTO 430
+                  IF (IJFIR==0) GOTO 290
+!                 Row IJFIR is now examined.
+                  I = IJFIR
+                  IJFIR = NEXTR(I)
+!                 First calculate multiplier threshold level.
+                  AMAX = ZERO
+                  J1 = IPTR(I) + LENRL(I)
+                  J2 = IPTR(I) + LENR(I) - 1
+                  DO JJ = J1, J2
+                    AMAX = MAX(AMAX,ABS(A(JJ)))
+                  END DO
+                  AU = AMAX*U
+                  ISRCH = ISRCH + 1
+!                 Scan row for possible pivots.
+                  DO 270 JJ = J1, J2
+                    IF (ABS(A(JJ))<=AU .AND. L==1) GOTO 270
+                    J = ICN(JJ)
+                    KCOST = (NZ-1)*(LENC(J)-1)
+                    IF (KCOST>JCOST) GOTO 270
+                    PIVR = ZERO
+                    IF (ABS(AMAX)>ZERO) PIVR = ABS(A(JJ))/AMAX
+                    IF (KCOST==JCOST .AND. (PIVR<=PIVRAT .OR. NSRCH>NN+1)) &
+                      GOTO 270
+!                   Best pivot so far is found.
+                    JCOST = KCOST
+                    IJPOS = JJ
+                    IPIV = I
+                    JPIV = J
+                    IF (MSRCH>NN+1 .AND. JCOST<=(NZ-1)**2) GOTO 430
+                    PIVRAT = PIVR
+270               END DO
+                END DO
+
+!               Columns with NZ non-zeros now examined.
+290             IJFIR = IFIRST(NZ)
+                IJFIR = -LASTR(IJFIR)
+300             IF (JCOST<=NZ*(NZ-1)) GOTO 430
+                IF (MSRCH<=NN) GOTO 340
+                DO 330 IDUMMY = 1, N
+                  IF (IJFIR==0) GOTO 340
+                  J = IJFIR
+                  IJFIR = NEXTC(IJFIR)
+                  I1 = IPC(J)
+                  I2 = I1 + NZ - 1
+!                 Scan column J.
+                  DO 320 II = I1, I2
+                    I = IRN(II)
+                    KCOST = (NZ-1)*(LENR(I)-LENRL(I)-1)
+                    IF (KCOST>=JCOST) GOTO 320
+!                   Pivot has best Markowitz count so far. Now
+!                   check its suitability on numeric grounds by
+!                   examining the other non-zeros in its row.
+                    J1 = IPTR(I) + LENRL(I)
+                    J2 = IPTR(I) + LENR(I) - 1
+!                   We need a stability check on singleton columns
+!                   because of possible problems with
+!                   underdetermined systems.
+                    AMAX = ZERO
+                    DO JJ = J1, J2
+                      AMAX = MAX(AMAX,ABS(A(JJ)))
+                      IF (ICN(JJ)==J) JPOS = JJ
+                    END DO
+                    IF (ABS(A(JPOS))<=AMAX*U .AND. L==1) GOTO 320
+                    JCOST = KCOST
+                    IPIV = I
+                    JPIV = J
+                    IJPOS = JPOS
+                    IF (ABS(AMAX)>ZERO) PIVRAT = ABS(A(JPOS))/AMAX
+                    IF (JCOST<=NZ*(NZ-1)) GOTO 430
+320               END DO
+330             END DO
+340           END DO
+!             In the event of singularity, we must make sure all
+!             rows and columns are tested.
+              MSRCH = N
+
+!             Matrix is numerically or structurally singular. Which
+!             it is will be diagnosed later.
+              IRANK = IRANK - 1
+            END DO
+!           Assign rest of rows and columns to ordering array.
+!           Matrix is structurally singular.
+            IF (IFLAG/=2 .AND. IFLAG/=-5) IFLAG = 1
+            IRANK = IRANK - ILAST + PIVOT + 1
+            IF (.NOT.ABORT1) GOTO 360
+            IDISP(2) = IACTIV
+            IFLAG = -1
+            IF (LP/=0) WRITE (LP,90000)
+            GOTO 1190
+360         K = PIVOT - 1
+            DO 400 I = ISTART, ILAST
+              IF (LASTR(I)/=0) GOTO 400
+              K = K + 1
+              LASTR(I) = K
+              IF (LENRL(I)==0) GOTO 390
+              MINICN = MAX(MINICN,NZROW+IBEG-1+MOREI+LENRL(I))
+              IF (IACTIV-IBEG>=LENRL(I)) GOTO 370
+              CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+!             Check now to see if MA30DD has created enough
+!             available space.
+              IF (IACTIV-IBEG>=LENRL(I)) GOTO 370
+!             Create more space by destroying previously created
+!             LU factors.
+              MOREI = MOREI + IBEG - IDISP(1)
+              IBEG = IDISP(1)
+              IF (LP/=0) WRITE (LP,90002)
+              IFLAG = -5
+              IF (ABORT3) GOTO 1160
+370           J1 = IPTR(I)
+              J2 = J1 + LENRL(I) - 1
+              IPTR(I) = 0
+              DO JJ = J1, J2
+                A(IBEG) = A(JJ)
+                ICN(IBEG) = ICN(JJ)
+                ICN(JJ) = 0
+                IBEG = IBEG + 1
+              END DO
+              NZROW = NZROW - LENRL(I)
+390           IF (K==ILAST) GOTO 410
+400         END DO
+410         K = PIVOT - 1
+            DO 420 I = ISTART, ILAST
+              IF (IPC(I)/=0) GOTO 420
+              K = K + 1
+              IPC(I) = K
+              IF (K==ILAST) GOTO 1060
+420         END DO
+
+!           The pivot has now been found in position (IPIV,JPIV)
+!           in location IJPOS in row file.
+!           Update column and row ordering arrays to correspond
+!           with removal of the active part of the matrix.
+430         ISING = PIVOT
+            IF (ABS(A(IJPOS))>ZERO) GOTO 440
+!           Numerical singularity is recorded here.
+            ISING = -ISING
+            IF (IFLAG/=-5) IFLAG = 2
+            IF (.NOT.ABORT2) GOTO 440
+            IDISP(2) = IACTIV
+            IFLAG = -2
+            IF (LP/=0) WRITE (LP,90001)
+            GOTO 1190
+440         OLDPIV = IPTR(IPIV) + LENRL(IPIV)
+            OLDEND = IPTR(IPIV) + LENR(IPIV) - 1
+!           Changes to column ordering.
+            IF (NSRCH<=NN) GOTO 470
+            COLUPD = NN + 1
+            LENPP = OLDEND - OLDPIV + 1
+            IF (LENPP<4) LPIV(1) = LPIV(1) + 1
+            IF (LENPP>=4 .AND. LENPP<=6) LPIV(2) = LPIV(2) + 1
+            IF (LENPP>=7 .AND. LENPP<=10) LPIV(3) = LPIV(3) + 1
+            IF (LENPP>=11 .AND. LENPP<=15) LPIV(4) = LPIV(4) + 1
+            IF (LENPP>=16 .AND. LENPP<=20) LPIV(5) = LPIV(5) + 1
+            IF (LENPP>=21 .AND. LENPP<=30) LPIV(6) = LPIV(6) + 1
+            IF (LENPP>=31 .AND. LENPP<=50) LPIV(7) = LPIV(7) + 1
+            IF (LENPP>=51 .AND. LENPP<=70) LPIV(8) = LPIV(8) + 1
+            IF (LENPP>=71 .AND. LENPP<=100) LPIV(9) = LPIV(9) + 1
+            IF (LENPP>=101) LPIV(10) = LPIV(10) + 1
+            MAPIV = MAX(MAPIV,LENPP)
+            IAVPIV = IAVPIV + LENPP
+            DO 460 JJ = OLDPIV, OLDEND
+              J = ICN(JJ)
+              LC = LASTC(J)
+              NC = NEXTC(J)
+              NEXTC(J) = -COLUPD
+              IF (JJ/=IJPOS) COLUPD = J
+              IF (NC/=0) LASTC(NC) = LC
+              IF (LC==0) GOTO 450
+              NEXTC(LC) = NC
+              GOTO 460
+450           NZ = LENC(J)
+              ISW = IFIRST(NZ)
+              IF (ISW>0) LASTR(ISW) = -NC
+              IF (ISW<0) IFIRST(NZ) = -NC
+460         END DO
+!           Changes to row ordering.
+470         I1 = IPC(JPIV)
+            I2 = I1 + LENC(JPIV) - 1
+            DO 490 II = I1, I2
+              I = IRN(II)
+              LR = LASTR(I)
+              NR = NEXTR(I)
+              IF (NR/=0) LASTR(NR) = LR
+              IF (LR<=0) GOTO 480
+              NEXTR(LR) = NR
+              GOTO 490
+480           NZ = LENR(I) - LENRL(I)
+              IF (NR/=0) IFIRST(NZ) = NR
+              IF (NR==0) IFIRST(NZ) = LR
+490         END DO
+
+!           Move pivot to position LENRL+1 in pivot row and move pivot
+!           row to the beginning of the available storage. The L part
+!           and the pivot in the old copy of the pivot row is nullified
+!           while, in the strictly upper triangular part, the column
+!           indices, J say, are overwritten by the corresponding entry
+!           of IQ (IQ(J)) and IQ(J) is set to the negative of the
+!           displacement of the column index from the pivot entry.
+            IF (OLDPIV==IJPOS) GOTO 500
+            AU = A(OLDPIV)
+            A(OLDPIV) = A(IJPOS)
+            A(IJPOS) = AU
+            ICN(IJPOS) = ICN(OLDPIV)
+            ICN(OLDPIV) = JPIV
+!           Check to see if there is space immediately available in
+!           A/ICN to hold new copy of pivot row.
+500         MINICN = MAX(MINICN,NZROW+IBEG-1+MOREI+LENR(IPIV))
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+            CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+            OLDPIV = IPTR(IPIV) + LENRL(IPIV)
+            OLDEND = IPTR(IPIV) + LENR(IPIV) - 1
+!           Check now to see if MA30DD has created enough
+!           available space.
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+!           Create more space by destroying previously created
+!           LU factors.
+            MOREI = MOREI + IBEG - IDISP(1)
+            IBEG = IDISP(1)
+            IF (LP/=0) WRITE (LP,90002)
+            IFLAG = -5
+            IF (ABORT3) GOTO 1160
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+!           There is still not enough room in A/ICN.
+            IFLAG = -4
+            GOTO 1160
+!           Copy pivot row and set up IQ array.
+510         IJPOS = 0
+            J1 = IPTR(IPIV)
+
+            DO JJ = J1, OLDEND
+              A(IBEG) = A(JJ)
+              ICN(IBEG) = ICN(JJ)
+              IF (IJPOS/=0) GOTO 520
+              IF (ICN(JJ)==JPIV) IJPOS = IBEG
+              ICN(JJ) = 0
+              GOTO 530
+520           K = IBEG - IJPOS
+              J = ICN(JJ)
+              ICN(JJ) = IQ(J)
+              IQ(J) = -K
+530           IBEG = IBEG + 1
+            END DO
+
+            IJP1 = IJPOS + 1
+            PIVEND = IBEG - 1
+            LENPIV = PIVEND - IJPOS
+            NZROW = NZROW - LENRL(IPIV) - 1
+            IPTR(IPIV) = OLDPIV + 1
+            IF (LENPIV==0) IPTR(IPIV) = 0
+
+!           Remove pivot row (including pivot) from column
+!           oriented file.
+            DO JJ = IJPOS, PIVEND
+              J = ICN(JJ)
+              I1 = IPC(J)
+              LENC(J) = LENC(J) - 1
+!             I2 is last position in new column.
+              I2 = IPC(J) + LENC(J) - 1
+              IF (I2<I1) GOTO 560
+              DO 550 II = I1, I2
+                IF (IRN(II)/=IPIV) GOTO 550
+                IRN(II) = IRN(I2+1)
+                GOTO 560
+550           END DO
+560           IRN(I2+1) = 0
+            END DO
+            NZCOL = NZCOL - LENPIV - 1
+
+!           Go down the pivot column and for each row with a
+!           non-zero add the appropriate multiple of the pivot
+!           row to it. We loop on the number of non-zeros in
+!           the pivot column since MA30DD may change its
+!           actual position.
+
+            NZPC = LENC(JPIV)
+            IF (NZPC==0) GOTO 940
+            DO 880 III = 1, NZPC
+              II = IPC(JPIV) + III - 1
+              I = IRN(II)
+!             Search row I For non-zero to be eliminated,
+!             calculate multiplier, and place it in position
+!             LENRL+1 in its row. IDROP is the number of
+!             non-zero entries dropped from row I because
+!             these fall beneath tolerance level.
+              IDROP = 0
+              J1 = IPTR(I) + LENRL(I)
+              IEND = IPTR(I) + LENR(I) - 1
+              DO 580 JJ = J1, IEND
+                IF (ICN(JJ)/=JPIV) GOTO 580
+!               IF pivot is zero, rest of column is and so
+!               multiplier is zero.
+                AU = ZERO
+                IF (ABS(A(IJPOS))>ZERO) AU = -A(JJ)/A(IJPOS)
+                IF (LBIG) BIG = MAX(BIG,ABS(AU))
+                A(JJ) = A(J1)
+                A(J1) = AU
+                ICN(JJ) = ICN(J1)
+                ICN(J1) = JPIV
+                LENRL(I) = LENRL(I) + 1
+                GOTO 590
+580           END DO
+!             JUMP if pivot row is a singleton.
+590           IF (LENPIV==0) GOTO 880
+!             Now perform necessary operations on rest of non-pivot
+!             row I.
+              ROWI = J1 + 1
+              IOP = 0
+!             Jump if all the pivot row causes fill-in.
+              IF (ROWI>IEND) GOTO 670
+!             Perform operations on current non-zeros in row I.
+!             Innermost loop.
+              LENPP = IEND - ROWI + 1
+              IF (LENPP<4) LNPIV(1) = LNPIV(1) + 1
+              IF (LENPP>=4 .AND. LENPP<=6) LNPIV(2) = LNPIV(2) + 1
+              IF (LENPP>=7 .AND. LENPP<=10) LNPIV(3) = LNPIV(3) + 1
+              IF (LENPP>=11 .AND. LENPP<=15) LNPIV(4) = LNPIV(4) + 1
+              IF (LENPP>=16 .AND. LENPP<=20) LNPIV(5) = LNPIV(5) + 1
+              IF (LENPP>=21 .AND. LENPP<=30) LNPIV(6) = LNPIV(6) + 1
+              IF (LENPP>=31 .AND. LENPP<=50) LNPIV(7) = LNPIV(7) + 1
+              IF (LENPP>=51 .AND. LENPP<=70) LNPIV(8) = LNPIV(8) + 1
+              IF (LENPP>=71 .AND. LENPP<=100) LNPIV(9) = LNPIV(9) + 1
+              IF (LENPP>=101) LNPIV(10) = LNPIV(10) + 1
+              MANPIV = MAX(MANPIV,LENPP)
+              IANPIV = IANPIV + LENPP
+              KOUNTL = KOUNTL + 1
+              DO 600 JJ = ROWI, IEND
+                J = ICN(JJ)
+                IF (IQ(J)>0) GOTO 600
+                IOP = IOP + 1
+                PIVROW = IJPOS - IQ(J)
+                A(JJ) = A(JJ) + AU*A(PIVROW)
+                IF (LBIG) BIG = MAX(ABS(A(JJ)),BIG)
+                ICN(PIVROW) = -ICN(PIVROW)
+                IF (ABS(A(JJ))<TOL) IDROP = IDROP + 1
+600           END DO
+
+!             JUMP if no non-zeros in non-pivot row have been removed
+!             because these are beneath the drop-tolerance TOL.
+
+              IF (IDROP==0) GOTO 670
+
+!             Run through non-pivot row compressing row so that only
+!             non-zeros greater than TOL are stored. All non-zeros
+!             less than TOL are also removed from the column structure.
+
+              JNEW = ROWI
+              DO 650 JJ = ROWI, IEND
+                IF (ABS(A(JJ))<TOL) GOTO 610
+                A(JNEW) = A(JJ)
+                ICN(JNEW) = ICN(JJ)
+                JNEW = JNEW + 1
+                GOTO 650
+
+!               Remove non-zero entry from column structure.
+
+610             J = ICN(JJ)
+                I1 = IPC(J)
+                I2 = I1 + LENC(J) - 1
+                DO II = I1, I2
+                  IF (IRN(II)==I) GOTO 630
+                END DO
+630             IRN(II) = IRN(I2)
+                IRN(I2) = 0
+                LENC(J) = LENC(J) - 1
+                IF (NSRCH<=NN) GOTO 650
+!               Remove column from column chain and place in
+!               update chain.
+                IF (NEXTC(J)<0) GOTO 650
+!               JUMP if column already in update chain.
+                LC = LASTC(J)
+                NC = NEXTC(J)
+                NEXTC(J) = -COLUPD
+                COLUPD = J
+                IF (NC/=0) LASTC(NC) = LC
+                IF (LC==0) GOTO 640
+                NEXTC(LC) = NC
+                GOTO 650
+640             NZ = LENC(J) + 1
+                ISW = IFIRST(NZ)
+                IF (ISW>0) LASTR(ISW) = -NC
+                IF (ISW<0) IFIRST(NZ) = -NC
+650           END DO
+              ICN(JNEW:IEND) = 0
+!             The value of IDROP might be different from that
+!             calculated earlier because we may now have dropped
+!             some non-zeros which were not modified by the pivot
+!             row.
+              IDROP = IEND + 1 - JNEW
+              IEND = JNEW - 1
+              LENR(I) = LENR(I) - IDROP
+              NZROW = NZROW - IDROP
+              NZCOL = NZCOL - IDROP
+              NDROP = NDROP + IDROP
+670           IFILL = LENPIV - IOP
+!             Jump is if there is no fill-in.
+              IF (IFILL==0) GOTO 770
+!             Now for the fill-in.
+              MINICN = MAX(MINICN,MOREI+IBEG-1+NZROW+IFILL+LENR(I))
+!             See if there is room for fill-in.
+!             Get maximum space for row I in situ.
+              DO JDIFF = 1, IFILL
+                JNPOS = IEND + JDIFF
+                IF (JNPOS>LICN) GOTO 690
+                IF (ICN(JNPOS)/=0) GOTO 690
+              END DO
+!             There is room for all the fill-in after the end of the
+!             row so it can be left in situ.
+!             Next available space for fill-in.
+              IEND = IEND + 1
+              GOTO 770
+!             JMORE spaces for fill-in are required in front of row.
+690           JMORE = IFILL - JDIFF + 1
+              I1 = IPTR(I)
+!             We now look in front of the row to see if there is space
+!             for the rest of the fill-in.
+              DO JDIFF = 1, JMORE
+                JNPOS = I1 - JDIFF
+                IF (JNPOS<IACTIV) GOTO 710
+                IF (ICN(JNPOS)/=0) GOTO 720
+              END DO
+710           JNPOS = I1 - JMORE
+              GOTO 730
+!             Whole row must be moved to the beginning of available
+!             storage.
+720           JNPOS = IACTIV - LENR(I) - IFILL
+!             Jump if there is space immediately available for the
+!             shifted row.
+730           IF (JNPOS>=IBEG) GOTO 750
+              CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+              I1 = IPTR(I)
+              IEND = I1 + LENR(I) - 1
+              JNPOS = IACTIV - LENR(I) - IFILL
+              IF (JNPOS>=IBEG) GOTO 750
+!             No space available so try to create some by throwing
+!             away previous LU decomposition.
+              MOREI = MOREI + IBEG - IDISP(1) - LENPIV - 1
+              IF (LP/=0) WRITE (LP,90002)
+              IFLAG = -5
+              IF (ABORT3) GOTO 1160
+!             Keep record of current pivot row.
+              IBEG = IDISP(1)
+              ICN(IBEG) = JPIV
+              A(IBEG) = A(IJPOS)
+              IJPOS = IBEG
+              DO JJ = IJP1, PIVEND
+                IBEG = IBEG + 1
+                A(IBEG) = A(JJ)
+                ICN(IBEG) = ICN(JJ)
+              END DO
+              IJP1 = IJPOS + 1
+              PIVEND = IBEG
+              IBEG = IBEG + 1
+              IF (JNPOS>=IBEG) GOTO 750
+!             This still does not give enough room.
+              IFLAG = -4
+              GOTO 1160
+750           IACTIV = MIN(IACTIV,JNPOS)
+!             Move non-pivot row I.
+              IPTR(I) = JNPOS
+              DO JJ = I1, IEND
+                A(JNPOS) = A(JJ)
+                ICN(JNPOS) = ICN(JJ)
+                JNPOS = JNPOS + 1
+                ICN(JJ) = 0
+              END DO
+!             First new available space.
+              IEND = JNPOS
+770           NZROW = NZROW + IFILL
+!             Innermost fill-in loop which also resets ICN.
+              IDROP = 0
+              DO 850 JJ = IJP1, PIVEND
+                J = ICN(JJ)
+                IF (J<0) GOTO 840
+                ANEW = AU*A(JJ)
+                AANEW = ABS(ANEW)
+                IF (AANEW>=TOL) GOTO 780
+                IDROP = IDROP + 1
+                NDROP = NDROP + 1
+                NZROW = NZROW - 1
+                MINICN = MINICN - 1
+                IFILL = IFILL - 1
+                GOTO 850
+780             IF (LBIG) BIG = MAX(AANEW,BIG)
+                A(IEND) = ANEW
+                ICN(IEND) = J
+                IEND = IEND + 1
+
+!               Put new entry in column file.
+                MINIRN = MAX(MINIRN,NZCOL+LENC(J)+1)
+                JEND = IPC(J) + LENC(J)
+                JROOM = NZPC - III + 1 + LENC(J)
+                IF (JEND>LIRN) GOTO 790
+                IF (IRN(JEND)==0) GOTO 830
+790             IF (JROOM<DISPC) GOTO 800
+!               Compress column file to obtain space for new
+!               copy of column.
+                CALL MA30DD(A,IRN,IPC(ISTART),N,DISPC,LIRN,.FALSE.)
+                IF (JROOM<DISPC) GOTO 800
+                JROOM = DISPC - 1
+                IF (JROOM>=LENC(J)+1) GOTO 800
+!               Column file is not large enough.
+                GOTO 1170
+!               Copy column to beginning of file.
+800             JBEG = IPC(J)
+                JEND = IPC(J) + LENC(J) - 1
+                JZERO = DISPC - 1
+                DISPC = DISPC - JROOM
+                IDISPC = DISPC
+                DO II = JBEG, JEND
+                  IRN(IDISPC) = IRN(II)
+                  IRN(II) = 0
+                  IDISPC = IDISPC + 1
+                END DO
+                IPC(J) = DISPC
+                JEND = IDISPC
+                IRN(JEND:JZERO) = 0
+830             IRN(JEND) = I
+                NZCOL = NZCOL + 1
+                LENC(J) = LENC(J) + 1
+!               End of adjustment to column file.
+                GOTO 850
+840             ICN(JJ) = -J
+850           END DO
+              IF (IDROP==0) GOTO 870
+              DO KDROP = 1, IDROP
+                ICN(IEND) = 0
+                IEND = IEND + 1
+              END DO
+870           LENR(I) = LENR(I) + IFILL
+!             End of scan of pivot column.
+880         END DO
+
+!           Remove pivot column from column oriented storage
+!           and update row ordering arrays.
+            I1 = IPC(JPIV)
+            I2 = IPC(JPIV) + LENC(JPIV) - 1
+            NZCOL = NZCOL - LENC(JPIV)
+            DO 930 II = I1, I2
+              I = IRN(II)
+              IRN(II) = 0
+              NZ = LENR(I) - LENRL(I)
+              IF (NZ/=0) GOTO 890
+              LASTR(I) = 0
+              GOTO 930
+890           IFIR = IFIRST(NZ)
+              IFIRST(NZ) = I
+!             IF (IFIR) 900, 920, 910
+!900          LASTR(I) = IFIR
+              IF (IFIR == 0) GOTO 920
+              IF (IFIR > 0) GOTO 910
+              LASTR(I) = IFIR
+              NEXTR(I) = 0
+              GOTO 930
+910           LASTR(I) = LASTR(IFIR)
+              NEXTR(I) = IFIR
+              LASTR(IFIR) = I
+              GOTO 930
+920           LASTR(I) = 0
+              NEXTR(I) = 0
+              NZMIN = MIN(NZMIN,NZ)
+930         END DO
+!           Restore IQ and nullify U part of old pivot row.
+!           Record the column permutation in LASTC(JPIV) and
+!           the row permutation in LASTR(IPIV).
+940         IPC(JPIV) = -ISING
+            LASTR(IPIV) = PIVOT
+            IF (LENPIV==0) GOTO 1050
+            NZROW = NZROW - LENPIV
+            JVAL = IJP1
+            JZER = IPTR(IPIV)
+            IPTR(IPIV) = 0
+            DO JCOUNT = 1, LENPIV
+              J = ICN(JVAL)
+              IQ(J) = ICN(JZER)
+              ICN(JZER) = 0
+              JVAL = JVAL + 1
+              JZER = JZER + 1
+            END DO
+!           Adjust column ordering arrays.
+            IF (NSRCH>NN) GOTO 980
+            DO 970 JJ = IJP1, PIVEND
+              J = ICN(JJ)
+              NZ = LENC(J)
+              IF (NZ/=0) GOTO 960
+              IPC(J) = 0
+              GOTO 970
+960           NZMIN = MIN(NZMIN,NZ)
+970         END DO
+            GOTO 1050
+980         JJ = COLUPD
+            DO 1040 JDUMMY = 1, NN
+              J = JJ
+              IF (J==NN+1) GOTO 1050
+              JJ = -NEXTC(J)
+              NZ = LENC(J)
+              IF (NZ/=0) GOTO 990
+              IPC(J) = 0
+              GOTO 1040
+990           IFIR = IFIRST(NZ)
+              LASTC(J) = 0
+!             IF (IFIR) 1000, 1010, 1020
+!1000         IFIRST(NZ) = -J
+              IF (IFIR == 0) GOTO 1010
+              IF (IFIR > 0) GOTO 1020
+              IFIRST(NZ) = -J
+              IFIR = -IFIR
+              LASTC(IFIR) = J
+              NEXTC(J) = IFIR
+              GOTO 1040
+1010          IFIRST(NZ) = -J
+              NEXTC(J) = 0
+              GOTO 1030
+1020          LC = -LASTR(IFIR)
+              LASTR(IFIR) = -J
+              NEXTC(J) = LC
+              IF (LC/=0) LASTC(LC) = J
+1030          NZMIN = MIN(NZMIN,NZ)
+1040        END DO
+1050      END DO
+! ********************************************
+! ****    End of main elimination loop    ****
+! ********************************************
+
+!         Reset IACTIV to point to the beginning of the
+!         next block.
+1060      IF (ILAST/=NN) IACTIV = IPTR(ILAST+1)
+1070    END DO
+
+! ********************************************
+! ****    End of deomposition of block    ****
+! ********************************************
+
+!     Record singularity (if any) in IQ array.
+        IF (IRANK==NN) GOTO 1090
+        DO 1080 I = 1, NN
+          IF (IPC(I)<0) GOTO 1080
+          ISING = IPC(I)
+          IQ(ISING) = -IQ(ISING)
+          IPC(I) = -ISING
+1080    END DO
+
+!       Run through LU decomposition changing column indices
+!       to that of new order and permuting LENR and LENRL
+!       arrays according to pivot permutations.
+1090    ISTART = IDISP(1)
+        IEND = IBEG - 1
+        IF (IEND<ISTART) GOTO 1110
+        DO JJ = ISTART, IEND
+          JOLD = ICN(JJ)
+          ICN(JJ) = -IPC(JOLD)
+        END DO
+1110    DO II = 1, NN
+          I = LASTR(II)
+          NEXTR(I) = LENR(II)
+          IPTR(I) = LENRL(II)
+        END DO
+        LENRL(1:NN) = IPTR(1:NN)
+        LENR(1:NN) = NEXTR(1:NN)
+
+!       Update permutation arrays IP and IQ.
+        DO II = 1, NN
+          I = LASTR(II)
+          J = -IPC(II)
+          NEXTR(I) = IABS(IP(II)+0)
+          IPTR(J) = IABS(IQ(II)+0)
+!         NEXTR(I) = IABS(IP(II))
+!         IPTR(J) = IABS(IQ(II))
+        END DO
+        DO I = 1, NN
+          IF (IP(I)<0) NEXTR(I) = -NEXTR(I)
+          IP(I) = NEXTR(I)
+          IF (IQ(I)<0) IPTR(I) = -IPTR(I)
+          IQ(I) = IPTR(I)
+        END DO
+        IP(NN) = IABS(IP(NN)+0)
+!       IP(NN) = IABS(IP(NN))
+        IDISP(2) = IEND
+        GOTO 1190
+
+!       Error returns
+1160    IDISP(2) = IACTIV
+        IF (LP==0) GOTO 1190
+        WRITE (LP,90003)
+        GOTO 1180
+1170    IF (IFLAG==-5) IFLAG = -6
+        IF (IFLAG/=-6) IFLAG = -3
+        IDISP(2) = IACTIV
+        IF (LP==0) GOTO 1190
+        IF (IFLAG==-3) WRITE (LP,90004)
+        IF (IFLAG==-6) WRITE (LP,90005)
+1180    PIVOT = PIVOT - ISTART + 1
+        WRITE (LP,90006) PIVOT, NBLOCK, ISTART, ILAST
+        IF (PIVOT==0) WRITE (LP,90007) MINIRN
+
+1190    RETURN
+90000   FORMAT (' Error return from MA30AD because matrix is', &
+          ' structurally singular')
+90001   FORMAT (' Error return from MA30AD because matrix is', &
+          ' numerically singular')
+90002   FORMAT (' LU decomposition destroyed to create more space')
+90003   FORMAT (' Error return from MA30AD because LICN is not big enough')
+90004   FORMAT (' Error return from MA30AD because LIRN is not big enough')
+90005   FORMAT (' Error return from MA30AD LIRN and LICN are too small')
+90006   FORMAT (' At stage ',I5,' in block ',I5,' with first row ',I5, &
+          ' and last row ',I5)
+90007   FORMAT (' To continue set LIRN to at least ',I8)
+
+      END SUBROUTINE MA30AD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30DD(A,ICN,IPTR,N,IACTIV,ITOP,REALS)
+! ..
+! This subroutine performs garbage collection operations on the arrays
+! A, ICN, and IRN.
+! ..
+! IACTIV is the first position in arrays A/ICN from which the compress
+! starts. On exit, IACTIV equals the position of the first entry.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IACTIV, ITOP, N
+        LOGICAL :: REALS
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(ITOP)
+        INTEGER :: ICN(ITOP), IPTR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, JPOS, K, KL, KN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30DD
+! ..
+        IF (REALS) ICNCP = ICNCP + 1
+        IF (.NOT.REALS) IRNCP = IRNCP + 1
+!       Set the first non-zero entry in each row to the negative of the
+!       row/col number and hold this row/col index in the row/col
+!       pointer. This is so that the beginning of each row/col can
+!       be recognized in the subsequent scan.
+        DO 10 J = 1, N
+          K = IPTR(J)
+          IF (K<IACTIV) GOTO 10
+          IPTR(J) = ICN(K)
+          ICN(K) = -J
+10      END DO
+        KN = ITOP + 1
+        KL = ITOP - IACTIV + 1
+!       Go through arrays in reverse order compressing to the back so
+!       that there are no zeros held in positions IACTIV to ITOP in ICN.
+!       Reset first entry of each row/col and pointer array IPTR.
+        DO 30 K = 1, KL
+          JPOS = ITOP - K + 1
+          IF (ICN(JPOS)==0) GOTO 30
+          KN = KN - 1
+          IF (REALS) A(KN) = A(JPOS)
+          IF (ICN(JPOS)>=0) GOTO 20
+!         First non-zero of row/col has been located.
+          J = -ICN(JPOS)
+          ICN(JPOS) = IPTR(J)
+          IPTR(J) = KN
+20        ICN(KN) = ICN(JPOS)
+30      END DO
+        IACTIV = KN
+        RETURN
+
+      END SUBROUTINE MA30DD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30BD(N,ICN,A,LICN,LENR,LENRL,IDISP,IP,IQ,W,IW,IFLAG)
+! ..
+! MA30BD performs the LU decomposition of the diagonal blocks of
+! a new matrix PAQ of the same sparsity pattern, using information
+! from a previous call to MA30AD. THe entries of the input matrix
+! must already be in their final positions in the LU decomposition
+! structure. This routine executes about five times faster than
+! MA30AD.
+! ..
+! We now describe the argument list for MA30BD. Consult MA30AD for
+!     further information on these parameters.
+! N   is an integer variable set to the order of the matrix.
+! ICN is an integer array of length LICN. It should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30BD.
+! A   is a real(kind=wp) array of length LICN. The user must set
+!     entries IDISP(1) to IDISP(2) to contain the entries in the
+!     diagonal blocks of the matrix PAQ whose column numbers are
+!     held in ICN, using corresponding positions. Note that some
+!     zeros may need to be held explicitly. On output entries
+!     IDISP(1) to IDISP(2) of array A contain the LU decomposition
+!     of the diagonal blocks of PAQ. Entries A(1) to A(IDISP(1)-1)
+!     are neither required nor altered by MA30BD.
+! LICN is an integer variable which must be set by the user to the
+!     length of arrays A and ICN. it is not altered by MA30BD.
+! LENR, LENRL are integer arrays of length N. They should be
+!     unchanged since the last call to MA30AD. They are not
+!     altered by MA30BD.
+! IDISP is an integer array of length 2. It should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30BD.
+! IP, IQ are integer arrays of length N. They should be unchanged
+!     since the last call to MA30AD. They are not altered by
+!     MA30BD.
+! W   is a REAL(KIND=WP) array of length N which is used as
+!     workspace by MA30BD.
+! IW  is an integer array of length N which is used as workspace
+!     by MA30BD.
+! IFLAG is an integer variable. On output from MA30BD, IFLAG has
+!     the value zero if the factorization was successful, has the
+!     value I if pivot I was very small and has the value -I if
+!     an unexpected singularity was detected at stage I of the
+!     decomposition.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IFLAG, LICN, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), IW(N), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AU, ROWMAX
+        INTEGER :: I, IFIN, ILEND, IPIVJ, ISING, ISTART, J, JAY, JAYJAY, JFIN, &
+          JJ, PIVPOS
+        LOGICAL :: STAB
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30BD
+! ..
+        STAB = EPS <= ONE
+        RMIN = EPS
+        ISING = 0
+        IFLAG = 0
+        W(1:N) = ZERO
+!       Set up pointers to the beginning of the rows.
+        IW(1) = IDISP(1)
+        IF (N==1) GOTO 30
+        DO I = 2, N
+          IW(I) = IW(I-1) + LENR(I-1)
+        END DO
+
+!       Start of main loop.
+!       At step I, row I of A is transformed to row I of LU by
+!       adding appropriate multiples of rows 1 TO I-1 using row
+!       Gauss elimination.
+30      DO 170 I = 1, N
+!         ISTART is beginning of row I of A and row I of L.
+          ISTART = IW(I)
+!         IFIN is end of row I of A and row I of U.
+          IFIN = ISTART + LENR(I) - 1
+!         ILEND is end of row I of L.
+          ILEND = ISTART + LENRL(I) - 1
+          IF (ISTART>ILEND) GOTO 100
+!         Load row I of A into vector W.
+          DO JJ = ISTART, IFIN
+            J = ICN(JJ)
+            W(J) = A(JJ)
+          END DO
+
+!         Add multiples of appropriate rows of I to I-1 to row I.
+          DO 80 JJ = ISTART, ILEND
+            J = ICN(JJ)
+!           IPIVJ is position of pivot in row J.
+            IPIVJ = IW(J) + LENRL(J)
+!           Form multiplier AU.
+            AU = -W(J)/A(IPIVJ)
+            IF (LBIG) BIG = MAX(ABS(AU),BIG)
+            W(J) = AU
+!           AU * ROW J (U part) is added to row I.
+            IPIVJ = IPIVJ + 1
+            JFIN = IW(J) + LENR(J) - 1
+            IF (IPIVJ>JFIN) GOTO 80
+!           Innermost loop.
+            IF (LBIG) GOTO 60
+            DO JAYJAY = IPIVJ, JFIN
+              JAY = ICN(JAYJAY)
+              W(JAY) = W(JAY) + AU*A(JAYJAY)
+            END DO
+            GOTO 80
+60          DO JAYJAY = IPIVJ, JFIN
+              JAY = ICN(JAYJAY)
+              W(JAY) = W(JAY) + AU*A(JAYJAY)
+              BIG = MAX(ABS(W(JAY)),BIG)
+            END DO
+80        END DO
+
+!         Reload W back into A (now LU).
+          DO JJ = ISTART, IFIN
+            J = ICN(JJ)
+            A(JJ) = W(J)
+            W(J) = ZERO
+          END DO
+!         We now perform the stability checks.
+100       PIVPOS = ILEND + 1
+          IF (IQ(I)>0) GOTO 150
+!         Matrix had singularity at this point in MA30AD.
+!         Is it the first such pivot in current block?
+          IF (ISING==0) ISING = I
+!         Does current matrix have a singularity in the same place?
+          IF (PIVPOS>IFIN) GOTO 110
+          IF (ABS(A(PIVPOS))>ZERO) GOTO 180
+!         It does, so set ising if it is not the end of the current
+!         block. Check to see that appropriate part of LU is zero
+!         or null.
+110       IF (ISTART>IFIN) GOTO 130
+          DO 120 JJ = ISTART, IFIN
+            IF (ICN(JJ)<ISING) GOTO 120
+            IF (ABS(A(JJ))>ZERO) GOTO 180
+120       END DO
+130       IF (PIVPOS<=IFIN) A(PIVPOS) = ONE
+          IF (IP(I)>0 .AND. I/=N) GOTO 170
+!         End of current block. Reset zero pivots and ISING.
+          DO 140 J = ISING, I
+            IF ((LENR(J)-LENRL(J))==0) GOTO 140
+            JJ = IW(J) + LENRL(J)
+            A(JJ) = ZERO
+140       END DO
+          ISING = 0
+          GOTO 170
+!         Matrix had non-zero pivot in MA30AD at this stage.
+150       IF (PIVPOS>IFIN) GOTO 180
+          IF (ABS(A(PIVPOS))<=ZERO) GOTO 180
+          IF (.NOT.STAB) GOTO 170
+          ROWMAX = ZERO
+          DO JJ = PIVPOS, IFIN
+            ROWMAX = MAX(ROWMAX,ABS(A(JJ)))
+          END DO
+          IF (ABS(A(PIVPOS))/ROWMAX>=RMIN) GOTO 170
+          IFLAG = I
+          RMIN = ABS(A(PIVPOS))/ROWMAX
+!         End of main loop.
+170     END DO
+
+        GOTO 190
+!       Error return
+180     IF (LP/=0) WRITE (LP,90000) I
+        IFLAG = -I
+
+190     RETURN
+90000   FORMAT (' Error return from MA30BD; Singularity detected in',' row', &
+          I8)
+
+      END SUBROUTINE MA30BD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30CD(N,ICN,A,LICN,LENR,LENRL,LENOFF,IDISP,IP,IQ,X, &
+        W,MTYPE)
+! ..
+! MA30CD uses the factors produced by MA30AD or MA30BD to solve
+! AX = B or A TRANSPOSE X = B when the matrix P1*A*Q1(PAQ) is
+! block lower triangular (including the case of only one diagonal
+! block).
+! ..
+! We now describe the argument list for MA30CD.
+! N   is an integer variable set to the order of the matrix. It is
+!     not altered by the subroutine.
+! ICN is an integer array of length LICN. Entries IDISP(1) to
+!     IDISP(2) should be unchanged since the last call to MA30AD. If
+!     the matrix has more than one diagonal block, then column indices
+!     corresponding to non-zeros in sub-diagonal blocks of PAQ must
+!     appear in positions 1 to IDISP(1)-1. For the same row those
+!     entries must be contiguous, with those in row I preceding those
+!     in row I+1 (I=1,...,N-1) and no wasted space between rows.
+!     Entries may be in any order within each row. It is not altered
+!     by MA30CD.
+! A   is a REAL(KIND=WP) array of length LICN. Entries IDISP(1) to
+!     IDISP(2) should be unchanged since the last call to MA30AD or
+!     MA30BD. If the matrix has more than one diagonal block, then
+!     the values of the non-zeros in sub-diagonal blocks must be in
+!     positions 1 to IDISP(1)-1 in the order given by ICN. It is not
+!     altered by MA30CD.
+! LICN is an integer variable set to the size of arrays ICN and A.
+!     It is not altered by MA30CD.
+! LENR, LENRL are integer arrays of length N which should be
+!     unchanged since the last call to MA30AD. They are not
+!     altered by MA30CD.
+! LENOFF is an integer array of length N. If the matrix PAQ (or
+!     P1*A*Q1) has more than one diagonal block, then LENOFF(I),
+!     I=1,...,N should be set to the number of non-zeros in row I of
+!     the matrix PAQ which are in sub-diagonal blocks. If there is
+!     only one diagonal block then LENOFF(1) may be set TO -1, in
+!     which case the other entries of LENOFF are never accessed.
+!     It is not altered by ma30cd.
+! IDISP is an integer array of length 2 which should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30CD.
+! IP, IQ are integer arrays of length N which should be unchanged
+!     since the last call to MA30AD. They are not altered by
+!     MA30CD.
+! X   is a REAL(KIND=WP) array of length N. It must be set by the
+!     user to the values of the right hand side vector B for the
+!     equations being solved. ON exit from MA30CD it will be equal
+!     to the solution X required.
+! W   is a REAL(KIND=WP) array of length N which is used as
+!     workspace by MA30CD.
+! MTYPE is an integer variable which must be set by the user. If
+!     MTYPE = 1, then the solution to the system AX = B is returned.
+!     Any other value for mtype will return the solution to the
+!     system A TRANSPOSE X = B. It is not altered by MA30CD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, MTYPE, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N), X(N)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), LENOFF(N), LENR(N), &
+          LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: WI, WII
+        INTEGER :: I, IB, IBACK, IBLEND, IBLOCK, IEND, IFIRST, II, III,   &
+          ILAST, J, J1, J2, J3, JJ, JPIV, JPIVP1, K, LJ1, LJ2, LT, LTEND, &
+          NUMBLK
+        LOGICAL :: NEG, NOBLOC
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30CD
+! ..
+!       The final value of RESID is the maximum residual for an
+!       inconsistent set of equations.
+        RESID = ZERO
+!       NOBLOC is .TRUE. if subroutine block has been used
+!       previously and is .FALSE. otherwise. The value .FALSE.
+!       means that LENOFF will not be subsequently accessed.
+        NOBLOC = LENOFF(1) < 0
+        IF (MTYPE/=1) GOTO 140
+
+!       We now solve  A * X = B.
+!       NEG is used to indicate when the last row in a block
+!       has been reached. It is then set to .TRUE. whereafter
+!       back substitution is performed on the block.
+        NEG = .FALSE.
+!       IP(N) is negated so that the last row of the last
+!       block can be recognised. It is reset to its positive
+!       value on exit.
+        IP(N) = -IP(N)
+!       Preorder VECTOR ... W(I) = X(IP(I))
+        DO II = 1, N
+          I = IP(II)
+          I = IABS(I)
+          W(II) = X(I)
+        END DO
+!       LT holds the position of the first non-zero in the current
+!       row of the off-diagonal blocks.
+        LT = 1
+!       IFIRST holds the index of the first row in the current block.
+        IFIRST = 1
+!       IBLOCK holds the position of the first non-zero in the current
+!       row of the LU decomposition of the diagonal blocks.
+        IBLOCK = IDISP(1)
+!       If I is not the last row of a block, then a pass through this
+!       loop adds the inner product of row I of the off-diagonal blocks
+!       and W to W and performs forward elimination using row I of the
+!       LU decomposition. If I is the last row of a block then, after
+!       performing these aforementioned operations, back substitution
+!       is performed using the rows of the block.
+        DO 120 I = 1, N
+          WI = W(I)
+          IF (NOBLOC) GOTO 30
+          IF (LENOFF(I)==0) GOTO 30
+!         Operations using lower triangular blocks.
+!         LTEND is the end of row I in the off-diagonal blocks.
+          LTEND = LT + LENOFF(I) - 1
+          DO JJ = LT, LTEND
+            J = ICN(JJ)
+            WI = WI - A(JJ)*W(J)
+          END DO
+!         LT is set the beginning of the next off-diagonal row.
+          LT = LTEND + 1
+!         Set NEG to .TRUE. if we are on the last row of the block.
+30        IF (IP(I)<0) NEG = .TRUE.
+          IF (LENRL(I)==0) GOTO 50
+!         Forward elimination phase.
+!         IEND is the end of the L part of row I in the LU decomposition.
+          IEND = IBLOCK + LENRL(I) - 1
+          DO JJ = IBLOCK, IEND
+            J = ICN(JJ)
+            WI = WI + A(JJ)*W(J)
+          END DO
+!         IBLOCK is adjusted to point to the start of the next row.
+50        IBLOCK = IBLOCK + LENR(I)
+          W(I) = WI
+          IF (.NOT.NEG) GOTO 120
+!         Back substitution phase.
+!         J1 is position in A/ICN after end of block beginning in
+!         row IFIRST and ending in row I.
+          J1 = IBLOCK
+!         Are there any singularities in this block? If not, continue
+!         with the back substitution.
+          IB = I
+          IF (IQ(I)>0) GOTO 70
+          DO III = IFIRST, I
+            IB = I - III + IFIRST
+            IF (IQ(IB)>0) GOTO 70
+            J1 = J1 - LENR(IB)
+            RESID = MAX(RESID,ABS(W(IB)))
+            W(IB) = ZERO
+          END DO
+!         Entire block is singular.
+          GOTO 110
+!         Each pass through this loop performs the back substitution
+!         operations for a single row, starting at the end of the
+!         block and working through it in reverse order.
+70        DO III = IFIRST, IB
+            II = IB - III + IFIRST
+!           J2 is end of row II.
+            J2 = J1 - 1
+!           J1 is beginning of row II.
+            J1 = J1 - LENR(II)
+!           JPIV is the position of the pivot in row II.
+            JPIV = J1 + LENRL(II)
+            JPIVP1 = JPIV + 1
+!           JUMP if row II of U has no non-zeros.
+            IF (J2<JPIVP1) GOTO 90
+            WII = W(II)
+            DO JJ = JPIVP1, J2
+              J = ICN(JJ)
+              WII = WII - A(JJ)*W(J)
+            END DO
+            W(II) = WII
+90          W(II) = W(II)/A(JPIV)
+          END DO
+110       IFIRST = I + 1
+          NEG = .FALSE.
+120     END DO
+
+!       Reorder solution vector, X(I) = W(IQINVERSE(I)).
+        DO II = 1, N
+          I = IQ(II)
+          I = IABS(I)
+          X(I) = W(II)
+        END DO
+        IP(N) = -IP(N)
+        GOTO 320
+
+!       WE now solve ATRANSPOSE * X = B.
+!       Preorder vector, W(I) = X(IQ(I)).
+140     DO II = 1, N
+          I = IQ(II)
+          I = IABS(I)
+          W(II) = X(I)
+        END DO
+!       LJ1 points to the beginning the current row in the off-diagonal
+!       blocks.
+        LJ1 = IDISP(1)
+!       IBLOCK is initialized to point to the beginning of the block
+!       after the last one.
+        IBLOCK = IDISP(2) + 1
+!       ILAST is the last row in the current block.
+        ILAST = N
+!       IBLEND points to the position after the last non-zero in the
+!       current block.
+        IBLEND = IBLOCK
+!       Each pass through this loop operates with one diagonal block and
+!       the off-diagonal part of the matrix corresponding to the rows
+!       of this block. The blocks are taken in reverse order and the
+!       number of times the loop is entered is MIN(N, NO. BLOCKS+1).
+        DO NUMBLK = 1, N
+          IF (ILAST==0) GOTO 300
+          IBLOCK = IBLOCK - LENR(ILAST)
+!         This loop finds the index of the first row in the current
+!         block. It is FIRST and IBLOCK is set to the position of
+!         the beginning of this first row.
+          DO K = 1, N
+            II = ILAST - K
+            IF (II==0) GOTO 170
+            IF (IP(II)<0) GOTO 170
+            IBLOCK = IBLOCK - LENR(II)
+          END DO
+170       IFIRST = II + 1
+!         J1 points to the position of the beginning of row I (LT part)
+!         or pivot.
+          J1 = IBLOCK
+!         Forward elimination.
+!         Each pass through this loop performs the operations for one row
+!         of the block. If the corresponding entry of W is zero then the
+!         operations can be avoided.
+          DO I = IFIRST, ILAST
+            IF (ABS(W(I))<=ZERO) GOTO 200
+!           JUMP IF ROW I SINGULAR.
+            IF (IQ(I)<0) GOTO 220
+!           J2 first points to the pivot in row I and then is made
+!           to point to the first non-zero in the U TRANSPOSE part
+!           of the row.
+            J2 = J1 + LENRL(I)
+            WI = W(I)/A(J2)
+            IF (LENR(I)-LENRL(I)==1) GOTO 190
+            J2 = J2 + 1
+!           J3 points to the end of row I.
+            J3 = J1 + LENR(I) - 1
+            DO JJ = J2, J3
+              J = ICN(JJ)
+              W(J) = W(J) - A(JJ)*WI
+            END DO
+190         W(I) = WI
+200         J1 = J1 + LENR(I)
+          END DO
+          GOTO 240
+!         Deal with rest of block which is singular.
+220       DO II = I, ILAST
+            RESID = MAX(RESID,ABS(W(II)))
+            W(II) = ZERO
+          END DO
+!         Back substitution.
+!         This loop does the back substitution on the rows of the
+!         block in the reverse order doing it simultaneously on
+!         the L TRANSPOSE part of the diagonal blocks and the
+!         off-diagonal blocks.
+240       J1 = IBLEND
+          DO 280 IBACK = IFIRST, ILAST
+            I = ILAST - IBACK + IFIRST
+!           J1 points to the beginning of row I.
+            J1 = J1 - LENR(I)
+            IF (LENRL(I)==0) GOTO 260
+!           J2 points to the end of the L TRANSPOSE part of row I.
+            J2 = J1 + LENRL(I) - 1
+            DO JJ = J1, J2
+              J = ICN(JJ)
+              W(J) = W(J) + A(JJ)*W(I)
+            END DO
+260         IF (NOBLOC) GOTO 280
+!           Operations using lower triangular blocks.
+            IF (LENOFF(I)==0) GOTO 280
+!           LJ2 points to the end of row I of the off-diagonal blocks.
+            LJ2 = LJ1 - 1
+!           LJ1 points to the beginning of row I of the off-diagonal
+!           blocks.
+            LJ1 = LJ1 - LENOFF(I)
+            DO JJ = LJ1, LJ2
+              J = ICN(JJ)
+              W(J) = W(J) - A(JJ)*W(I)
+            END DO
+280       END DO
+          IBLEND = J1
+          ILAST = IFIRST - 1
+        END DO
+!       Reorder solution vector, X(I) = W(IPINVERSE(I)).
+300     DO II = 1, N
+          I = IP(II)
+          I = IABS(I)
+          X(I) = W(II)
+        END DO
+
+320     RETURN
+
+      END SUBROUTINE MA30CD
+!_______________________________________________________________________
+
+! Private Variable Information.
+! Private variables for MA30ED hold control parameters.
+!     Original : COMMON /MA30ED/ LP,ABORT1,ABORT2,ABORT3
+! The integer LP is the unit number to which the error messages are
+!     sent. LP has a default value of 6. This default value can be
+!     reset by the user, if desired. A value of 0 suppresses all
+!     messages.
+! The logical variables ABORT1, ABORT2, ABORT3 are used to control
+!     the conditions under which the subroutine will terminate.
+! If ABORT1 iS .TRUE. then the subroutine will exit immediately on
+!     detecting structural singularity.
+! If ABORT2 iS .TRUE. then the subroutine will exit immediately on
+!     detecting numerical singularity.
+! If ABORT3 iS .TRUE. then the subroutine will exit immediately when
+!     the available space in A/ICN is filled up by the previously
+!     decomposed, active, and undecomposed parts of the matrix.
+! The default values for ABORT1, ABORT2, ABORT3 are set to .TRUE.,
+!     .TRUE., and .FALSE., respectively.
+
+! The private variables for MA30FD are used to provide the user with
+! information on the decomposition.
+!     Original : COMMON /MA30FD/ IRNCP,ICNCP,IRANK,MINIRN,MINICN
+! IRNCP AND ICNCP are integer variables used to monitor the adequacy
+!     of the allocated space in arrays IRN and A/ICN, respectively,
+!     by taking account of the number of data management compresses
+!     required on these arrays. If IRNCP or ICNCP is fairly large (say
+!     greater than N/10), It may be advantageous to increase the size
+!     of the corresponding array(s). IRNCP and ICNCP are initialized
+!     to zero on entry to MA30AD and are incremented each time the
+!     compressing routine MA30DD is entered.
+! ICNCP is the number of compresses on A/ICN.
+! IRNCP is the number of compresses on IRN.
+! IRANK is an integer variable which gives an estimate (actually an
+!     upper bound) of the rank of the matrix. On an exit with IFLAG
+!     equal to 0, this will be equal to N.
+! MINIRN is an integer variable which, after a successful call to
+!     MA30AD, indicates the minimum length to which IRN can be
+!     reduced while still permitting a successful decomposition
+!     of the same matrix. If, however, the user were to decrease the
+!     length of IRN to that size, the number of compresses (IRNCP)
+!     may be very high and quite costly. If LIRN is not large enough
+!     to begin the decomposition on a diagonal block, MINIRN will be
+!     equal to the value required to continue the decomposition and
+!     IFLAG will be set to -3 or -6. A value of LIRN slightly greater
+!     than this (say about N/2) will usually provide enough space to
+!     complete the decomposition on that block. In the event of any
+!     other failure minirn gives the minimum size of IRN required
+!     for a successful decomposition up to that point.
+! MINICN is an integer variable which after a successful call to
+!     MA30AD, indicates the minimum size of LICN required to enable
+!     a successful decomposition. In the event of failure with
+!     IFLAG = -5, MINICN will, if ABORT3 is left set to .FALSE.,
+!     indicate the minimum length that would be sufficient to
+!     prevent this error in a subsequent run on an identical matrix.
+!     Again the user may prefer to use a value of icn slightly
+!     greater than MINICN for subsequent runs to avoid too many
+!     conpresses (ICNCP). In the event of failure with IFLAG equal
+!     to any negative value except -4, minicn will give the minimum
+!     length to which licn could be reduced to enable a successful
+!     decomposition to the point at which failure occurred. Notice
+!     that, on a successful entry IDISP(2) gives the amount of space
+!     in A/ICN required for the decomposition while MINICN will
+!     usually be slightly greater because of the need for
+!     "elbow room". If the user is very unsure how large to make
+!     LICN, the variable MINICN can be used to provide that
+!     information. A preliminary run should be performed with ABORT3
+!     left set to .FALSE. and LICN about 3/2 times as big as the
+!     number of non-zeros in the original matrix. Unless the initial
+!     problem is very sparse (when the run will be successful) or
+!     fills in extremely badly (giving an error return with
+!     IFLAG = -4), an error return with IFLAG = -5 should result and
+!     MINICN will give the amount of space required for a successful
+!     decomposition.
+
+! The private variables for MA30GD are used by the MA30BD entry only.
+!     Original : COMMON /MA30GD/ EPS,RMIN
+! EPS is a REAL(KIND=WP) variable. It is used to test for small
+!     pivots. Its default value is 1.0D-4 (1.0E-4 in E version).
+!     If the user sets EPS to any value greater than 1.0, then no
+!     check is made on the size of the pivots. Although the absence
+!     of such a check would fail to warn the user of bad instability,
+!     its absence will enable MA30BD to run slightly faster. An a
+!     posteriori check on the stability of the factorization can
+!     be obtained from MC24AD.
+! RMIN is a REAL(KIND=WP) variable which gives the user some
+!     information about the stability of the decomposition. At each
+!     stage of the LU decomposition the magnitude of the pivot APIV
+!     is compared with the largest off-diagonal entry currently in
+!     its row (row of U), ROWMAX say. If the ratio
+!                       MIN(APIV/ROWMAX)
+!     where the minimum is taken over all the rows, is less than EPS
+!     then RMIN is set to this minimum value and IFLAG is returned
+!     with the value +I where I is the row in which this minimum
+!     occurs. If the user sets EPS greater than one, then this test
+!     is not performed. In this case, and when there are no small
+!     pivots rmin will be set equal to EPS.
+
+! The private variables for MA30HD are used by MA30CD only.
+!     Original : COMMON /MA30HD/ RESID
+! RESID is a REAL(KIND=WP) variable. In the case of singular or
+!     rectangular matrices its final value will be equal to the
+!     maximum residual for the unsatisfied equations; otherwise
+!     its value will be set to zero.
+
+!  MA30ID private variables control the use of drop tolerances,
+!     the modified pivot option and the calculation of the largest
+!     entry in the factorization process. These private variables
+!     were added to the MA30 package in February, 1983.
+!     Original : COMMON /MA30ID/ TOL,BIG,NDROP,NSRCH,LBIG
+! TOL is a REAL(KIND=WP) variable. If it is set to a positive
+!     value, then MA30AD will drop from the factors any non-zero
+!     whose modulus is less than TOL. The factorization will then
+!     require less storage but will be inaccurate. After a run of
+!     MA30AD where entries have been dropped, MA30BD should not
+!     be called. The default value for TOL is 0.0.
+! BIG is a REAL(KIND=WP) variable. If LBIG has been set to .TRUE.,
+!     BIG will be set to the largest entry encountered during the
+!     factorization.
+! NDROP is an integer variable. If TOL has been set positive, on
+!     exit from MA30AD, NDROP will hold the number of entries
+!     dropped from the data structure.
+! NSRCH is an integer variable. If NSRCH is set to a value less
+!     than or equal to N, then a different pivot option will be
+!     employed by MA30AD. This may result in different fill-in
+!     and execution time for MA30AD. If NSRCH is less than or
+!     equal to N, the workspace arrays LASTC and NEXTC are not
+!     referenced by MA30AD. The default value for NSRCH is 32768.
+! LBIG is a logical variable. If LBIG is set to .TRUE., the value
+!     of the largest entry encountered in the factorization by
+!     MA30AD is returned in BIG. Setting LBIG to .TRUE. will
+!     marginally increase the factorization time for MA30AD and
+!     will increase that for MA30BD by about 20%. The default
+!     value for LBIG is .FALSE.
+!_______________________________________________________________________
+
+      SUBROUTINE MC13D(N,ICN,LICN,IP,LENR,IOR,IB,NUM,IW)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUM
+! ..
+! .. Array Arguments ..
+        INTEGER :: IB(N), ICN(LICN), IOR(N), IP(N), IW(N,3), LENR(N)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA13D
+! ..
+        CALL MC13E(N,ICN,LICN,IP,LENR,IOR,IB,NUM,IW(1,1),IW(1,2),IW(1,3))
+        RETURN
+
+      END SUBROUTINE MC13D
+!_______________________________________________________________________
+
+      SUBROUTINE MC13E(N,ICN,LICN,IP,LENR,ARP,IB,NUM,LOWL,NUMB,PREV)
+! ..
+! ARP(I) is one less than the number of unsearched edges leaving
+!     node I. At the end of the algorithm it is set to a
+!     permutation which puts the matrix in block lower
+!     triangular form.
+! IB(I) is the position in the ordering of the start of the Ith
+!     block. IB(N+1-I) holds the node number of the Ith node
+!     on the stack.
+! LOWL(I) is the smallest stack position of any node to which a
+!     path from node I has been found. It is set to N+1 when
+!     node I is removed from the stack.
+! NUMB(I) is the position of node I in the stack if it is on
+!     the stack. It is the permuted order of node I for those
+!     nodes whose final position has been found and is otherwise
+!     zero.
+! PREV(I) is the node at the end of the path when node I was
+!     placed on the stack.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUM
+! ..
+! .. Array Arguments ..
+        INTEGER :: ARP(N), IB(N), ICN(LICN), IP(N), LENR(N), LOWL(N),  &
+          NUMB(N), PREV(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: DUMMY, I, I1, I2, ICNT, II, ISN, IST, IST1, IV, IW, &
+          J, K, LCNT, NNM1, STP
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA13E
+! ..
+!       ICNT is the number of nodes whose positions in final ordering
+!       have been found.
+        ICNT = 0
+!       NUM is the number of blocks that have been found.
+        NUM = 0
+        NNM1 = N + N - 1
+
+!       Initialization of arrays.
+        DO J = 1, N
+          NUMB(J) = 0
+          ARP(J) = LENR(J) - 1
+        END DO
+
+        DO 90 ISN = 1, N
+!         Look for a starting node.
+          IF (NUMB(ISN)/=0) GOTO 90
+          IV = ISN
+!         IST is the number of nodes on the stack. It is the
+!         stack pointer.
+          IST = 1
+!         Put node IV at beginning of stack.
+          LOWL(IV) = 1
+          NUMB(IV) = 1
+          IB(N) = IV
+
+!         The body of this loop puts a new node on the stack
+!         or backtracks.
+          DO 80 DUMMY = 1, NNM1
+            I1 = ARP(IV)
+!           Have all edges leaving node iv been searched?
+            IF (I1<0) GOTO 30
+            I2 = IP(IV) + LENR(IV) - 1
+            I1 = I2 - I1
+
+!           Look at edges leaving node iv until one enters a
+!           new node or all edges are exhausted.
+            DO 20 II = I1, I2
+              IW = ICN(II)
+!             Has node iw been on stack already?
+              IF (NUMB(IW)==0) GOTO 70
+!             Update value of LOWL(IV) if necessary.
+20          LOWL(IV) = MIN(LOWL(IV),LOWL(IW))
+
+!           There are no more edges leaving node IV.
+            ARP(IV) = -1
+!           Is node IV the root of a block.
+30          IF (LOWL(IV)<NUMB(IV)) GOTO 60
+
+!           Order nodes in a block.
+            NUM = NUM + 1
+            IST1 = N + 1 - IST
+            LCNT = ICNT + 1
+!           Peel block off the top of the stack starting at the
+!           top and working down to the root of the block.
+            DO STP = IST1, N
+              IW = IB(STP)
+              LOWL(IW) = N + 1
+              ICNT = ICNT + 1
+              NUMB(IW) = ICNT
+              IF (IW==IV) GOTO 50
+            END DO
+50          IST = N - STP
+            IB(NUM) = LCNT
+!           Are there any nodes left on the stack?
+            IF (IST/=0) GOTO 60
+!           Have all the nodes been ordered?
+            IF (ICNT<N) GOTO 90
+            GOTO 100
+
+!           Backtrack to previous node on path.
+60          IW = IV
+            IV = PREV(IV)
+!           Update value of LOWL(IV) if necessary.
+            LOWL(IV) = MIN(LOWL(IV),LOWL(IW))
+            GOTO 80
+
+!           Put new node on the stack.
+70          ARP(IV) = I2 - II - 1
+            PREV(IW) = IV
+            IV = IW
+            IST = IST + 1
+            LOWL(IV) = IST
+            NUMB(IV) = IST
+            K = N + 1 - IST
+            IB(K) = IV
+80        END DO
+
+90      END DO
+
+!       Put permutation in the required form.
+100     DO I = 1, N
+          II = NUMB(I)
+          ARP(II) = I
+        END DO
+        RETURN
+
+      END SUBROUTINE MC13E
+!_______________________________________________________________________
+
+      SUBROUTINE MC20AD(NC,MAXA,A,INUM,JPTR,JNUM,JDISP)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+! ..
+        INTEGER :: JDISP, MAXA, NC
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(MAXA)
+        INTEGER :: INUM(MAXA), JNUM(MAXA), JPTR(NC)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACE, ACEP
+        INTEGER :: I, ICE, ICEP, J, JA, JB, JCE, JCEP, K, KR, LOC, MYNULL
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA20AD
+! ..
+        MYNULL = -JDISP
+!       CLEAR JPTR
+        JPTR(1:NC) = 0
+!       Count the number of elements in each column.
+        DO K = 1, MAXA
+          J = JNUM(K) + JDISP
+          JPTR(J) = JPTR(J) + 1
+        END DO
+!       SET THE JPTR ARRAY.
+        K = 1
+        DO J = 1, NC
+          KR = K + JPTR(J)
+          JPTR(J) = K
+          K = KR
+        END DO
+
+!       Reorder the elements into column order. The algorithm is an
+!       in-place sort and is of order MAXA.
+        DO 50 I = 1, MAXA
+!         Establish the current entry.
+          JCE = JNUM(I) + JDISP
+          IF (JCE==0) GOTO 50
+          ACE = A(I)
+          ICE = INUM(I)
+!         Clear the location vacated.
+          JNUM(I) = MYNULL
+!         Chain from current entry to store items.
+          DO 40 J = 1, MAXA
+!           Current entry not in correct position. Determine the
+!           correct position to store entry.
+            LOC = JPTR(JCE)
+            JPTR(JCE) = JPTR(JCE) + 1
+!           Save contents of that location.
+            ACEP = A(LOC)
+            ICEP = INUM(LOC)
+            JCEP = JNUM(LOC)
+!           Store current entry.
+            A(LOC) = ACE
+            INUM(LOC) = ICE
+            JNUM(LOC) = MYNULL
+!           Check if next current entry needs to be processed.
+            IF (JCEP==MYNULL) GOTO 50
+!           It does. Copy into current entry.
+            ACE = ACEP
+            ICE = ICEP
+40        JCE = JCEP + JDISP
+
+50      END DO
+
+!       Reset JPTR vector.
+        JA = 1
+        DO J = 1, NC
+          JB = JPTR(J)
+          JPTR(J) = JA
+          JA = JB
+        END DO
+        RETURN
+
+      END SUBROUTINE MC20AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC20BD(NC,MAXA,A,INUM,JPTR)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: MAXA, NC
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(MAXA)
+        INTEGER :: INUM(MAXA), JPTR(NC)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACE
+        INTEGER :: ICE, IK, J, JJ, K, KDUMMY, KLO, KMAX, KOR
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC IABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA20BD
+! ..
+        KMAX = MAXA
+        DO JJ = 1, NC
+          J = NC + 1 - JJ
+          KLO = JPTR(J) + 1
+          IF (KLO>KMAX) GOTO 40
+          KOR = KMAX
+          DO KDUMMY = KLO, KMAX
+!           Items KOR,KOR+1,...,KMAX are in order.
+            ACE = A(KOR-1)
+            ICE = INUM(KOR-1)
+            DO K = KOR, KMAX
+              IK = INUM(K)
+              IF (IABS(ICE)<=IABS(IK)) GOTO 20
+              INUM(K-1) = IK
+              A(K-1) = A(K)
+            END DO
+            K = KMAX + 1
+20          INUM(K-1) = ICE
+            A(K-1) = ACE
+            KOR = KOR - 1
+          END DO
+!         Next column.
+40        KMAX = KLO - 2
+        END DO
+        RETURN
+
+      END SUBROUTINE MC20BD
+!_______________________________________________________________________
+
+      SUBROUTINE MC21A(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,IW)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUMNZ
+! ..
+! .. Array Arguments ..
+        INTEGER :: ICN(LICN), IP(N), IPERM(N), IW(N,4), LENR(N)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA21A
+! ..
+        CALL MC21B(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,IW(1,1),IW(1,2), &
+          IW(1,3),IW(1,4))
+        RETURN
+
+      END SUBROUTINE MC21A
+!_______________________________________________________________________
+
+      SUBROUTINE MC21B(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,PR,ARP,CV,OUT)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+! ..
+        INTEGER :: LICN, N, NUMNZ
+! ..
+! .. Array Arguments ..
+        INTEGER :: ARP(N), CV(N), ICN(LICN), IP(N), IPERM(N), LENR(N), &
+          OUT(N), PR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, II, IN1, IN2, IOUTK, J, J1, JORD, K, KK
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA21B
+! ..
+! PR(I) is the previous row to I in the depth first search.
+!    It is used as a work array in the sorting algorithm.
+!    Elements (IPERM(I),I) I=1,...,N are non-zero at the
+!    end of the algorithm unless N assignments have not
+!    been made, in which case (IPERM(I),I) will be zero
+!    for N-NUMNZ entries.
+! CV(I) is the most recent row extension at which column I
+!    was visited.
+! ARP(I) is one less than the number of non-zeros in row I
+!    which have not been scanned when looking for a cheap
+!    assignment.
+! OUT(I) is one less than the number of non-zeros in row I
+!    which have not been scanned during one pass through
+!    the main loop.
+
+!       Initialization of arrays.
+        DO I = 1, N
+          ARP(I) = LENR(I) - 1
+          CV(I) = 0
+          IPERM(I) = 0
+        END DO
+        NUMNZ = 0
+
+!       Main loop.
+!       Each pass round this loop either results in a new
+!       assignment or gives a row with no assignment.
+        DO 100 JORD = 1, N
+          J = JORD
+          PR(J) = -1
+          DO 70 K = 1, JORD
+!           Look for a cheap assignment.
+            IN1 = ARP(J)
+            IF (IN1<0) GOTO 30
+            IN2 = IP(J) + LENR(J) - 1
+            IN1 = IN2 - IN1
+            DO II = IN1, IN2
+              I = ICN(II)
+              IF (IPERM(I)==0) GOTO 80
+            END DO
+!           No cheap assignment in row.
+            ARP(J) = -1
+!           Begin looking for assignment chain starting with row J.
+30          OUT(J) = LENR(J) - 1
+!           Inner loop. Extends chain by one or backtracks.
+            DO KK = 1, JORD
+              IN1 = OUT(J)
+              IF (IN1<0) GOTO 50
+              IN2 = IP(J) + LENR(J) - 1
+              IN1 = IN2 - IN1
+!             Forward scan.
+              DO 40 II = IN1, IN2
+                I = ICN(II)
+                IF (CV(I)==JORD) GOTO 40
+!               Column I has not yet been accessed during this pass.
+                J1 = J
+                J = IPERM(I)
+                CV(I) = JORD
+                PR(J) = J1
+                OUT(J1) = IN2 - II - 1
+                GOTO 70
+40            END DO
+
+!             Backtracking step.
+50            J = PR(J)
+              IF (J==-1) GOTO 100
+            END DO
+
+70        END DO
+
+!         New assignment is made.
+80        IPERM(I) = J
+          ARP(J) = IN2 - II - 1
+          NUMNZ = NUMNZ + 1
+          DO K = 1, JORD
+            J = PR(J)
+            IF (J==-1) GOTO 100
+            II = IP(J) + LENR(J) - OUT(J) - 2
+            I = ICN(II)
+            IPERM(I) = J
+          END DO
+
+100     END DO
+
+!       If matrix is structurally singular, we now complete the
+!       permutation IPERM.
+        IF (NUMNZ==N) RETURN
+        ARP(1:N) = 0
+        K = 0
+        DO 130 I = 1, N
+          IF (IPERM(I)/=0) GOTO 120
+          K = K + 1
+          OUT(K) = I
+          GOTO 130
+120       J = IPERM(I)
+          ARP(J) = I
+130     END DO
+        K = 0
+        DO 140 I = 1, N
+          IF (ARP(I)/=0) GOTO 140
+          K = K + 1
+          IOUTK = OUT(K)
+          IPERM(IOUTK) = I
+140     END DO
+        RETURN
+
+      END SUBROUTINE MC21B
+!_______________________________________________________________________
+
+      SUBROUTINE MC22AD(N,ICN,A,NZ,LENROW,IP,IQ,IW,IW1)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(NZ)
+        INTEGER :: ICN(NZ), IP(N), IQ(N), IW(N,2), IW1(NZ), LENROW(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AVAL
+        INTEGER :: I, ICHAIN, IOLD, IPOS, J, J2, JJ, JNUM, JVAL, LENGTH, &
+          NEWPOS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC IABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA22AD
+! ..
+        IF (NZ<=0) GOTO 90
+        IF (N<=0) GOTO 90
+!       Set start of row I in IW(I,1) and LENROW(I) in IW(I,2)
+        IW(1,1) = 1
+        IW(1,2) = LENROW(1)
+        DO I = 2, N
+          IW(I,1) = IW(I-1,1) + LENROW(I-1)
+          IW(I,2) = LENROW(I)
+        END DO
+!       Permute LENROW according to IP. Set off-sets for new
+!       position of row IOLD in IW(IOLD,1) and put old row
+!       indices in IW1 in positions corresponding to the new
+!       position of this row in A/ICN.
+        JJ = 1
+        DO 30 I = 1, N
+          IOLD = IP(I)
+          IOLD = IABS(IOLD)
+          LENGTH = IW(IOLD,2)
+          LENROW(I) = LENGTH
+          IF (LENGTH==0) GOTO 30
+          IW(IOLD,1) = IW(IOLD,1) - JJ
+          J2 = JJ + LENGTH - 1
+          DO 20 J = JJ, J2
+20        IW1(J) = IOLD
+          JJ = J2 + 1
+30      END DO
+!       Set inverse permutation to IQ in IW(:,2).
+        DO I = 1, N
+          IOLD = IQ(I)
+          IOLD = IABS(IOLD)
+          IW(IOLD,2) = I
+        END DO
+!       Permute A and ICN in place, changing to new column numbers.
+!       Main loop.
+!       Each pass through this loop places a closed chain of
+!       column indices in their new (and final) positions.
+!       This is recorded by setting the iw1 entry to zero so
+!       that any which are subsequently encountered during
+!       this major scan can be bypassed.
+        DO 80 I = 1, NZ
+          IOLD = IW1(I)
+          IF (IOLD==0) GOTO 80
+          IPOS = I
+          JVAL = ICN(I)
+!         If row IOLD is in same positions after permutation,
+!         GOTO 150.
+          IF (IW(IOLD,1)==0) GOTO 70
+          AVAL = A(I)
+!         Chain loop.
+!         Each pass through this loop places one(permuted) column
+!         index in its final position, viz. IPOS.
+          DO ICHAIN = 1, NZ
+!           NEWPOS is the original position in A/ICN of the
+!           element to be placed in position IPOS. It is also
+!           the position of the next element in the chain.
+            NEWPOS = IPOS + IW(IOLD,1)
+!           Is chain complete?
+            IF (NEWPOS==I) GOTO 60
+            A(IPOS) = A(NEWPOS)
+            JNUM = ICN(NEWPOS)
+            ICN(IPOS) = IW(JNUM,2)
+            IPOS = NEWPOS
+            IOLD = IW1(IPOS)
+            IW1(IPOS) = 0
+!           End of chain loop.
+          END DO
+60        A(IPOS) = AVAL
+70        ICN(IPOS) = IW(JVAL,2)
+!         END OF MAIN LOOP
+80      END DO
+90      RETURN
+
+      END SUBROUTINE MC22AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC23AD(N,ICN,A,LICN,LENR,IDISP,IP,IQ,LENOFF,IW,IW1)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), IW(N,5), IW1(N,2), &
+          LENOFF(N), LENR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, I1, I2, IBEG, IBLOCK, IEND, II, ILEND, INEW, IOLD, &
+          IROWB, IROWE, J, JJ, JNEW, JNPOS, JOLD, K, LENI, NZ
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA23AD
+! ..
+!     Input ... N,ICN ... A,ICN,LENR ...
+!     Set up pointers IW(:,1) to the beginning of the rows
+!     and set LENOFF equal to LENR.
+        IW1(1,1) = 1
+        LENOFF(1) = LENR(1)
+        IF (N==1) GOTO 20
+        DO I = 2, N
+          LENOFF(I) = LENR(I)
+          IW1(I,1) = IW1(I-1,1) + LENR(I-1)
+        END DO
+!       IDISP(1) points to the first position in A/ICN after
+!       the off-diagonal blocks and untreated rows.
+20      IDISP(1) = IW1(N,1) + LENR(N)
+
+!       Find row permutation ip to make diagonal zero-free.
+        CALL MC21A(N,ICN,LICN,IW1(1,1),LENR,IP,NUMNZ,IW(1,1))
+
+!       Possible error return for structurally singular matrices.
+        IF (NUMNZ/=N .AND. ABORT) GOTO 170
+
+!       IW1(:,2) and LENR are permutations of IW1(:,1) and
+!       LENR/LENOFF suitable for entry to MC13D since matrix
+!       with these row pointer and length arrays has maximum
+!       number of non-zeros on the diagonal.
+        DO II = 1, N
+          I = IP(II)
+          IW1(II,2) = IW1(I,1)
+          LENR(II) = LENOFF(I)
+        END DO
+
+!       Find symmetric permutation IQ to block lower triangular form.
+        CALL MC13D(N,ICN,LICN,IW1(1,2),LENR,IQ,IW(1,4),NUM,IW)
+
+        IF (NUM/=1) GOTO 60
+
+!       Action taken if matrix is irreducible: The
+!       whole matrix is just moved to the end of the storage.
+        DO I = 1, N
+          LENR(I) = LENOFF(I)
+          IP(I) = I
+          IQ(I) = I
+        END DO
+        LENOFF(1) = -1
+!       IDISP(1) is the first position after the last element in
+!       the off-diagonal blocks and untreated rows.
+        NZ = IDISP(1) - 1
+        IDISP(1) = 1
+!       IDISP(2) Is the position in A/ICN of the first element
+!       in the diagonal blocks.
+        IDISP(2) = LICN - NZ + 1
+        LARGE = N
+        IF (NZ==LICN) GOTO 200
+        DO K = 1, NZ
+          J = NZ - K + 1
+          JJ = LICN - K + 1
+          A(JJ) = A(J)
+          ICN(JJ) = ICN(J)
+        END DO
+        GOTO 200
+
+!       Data structure reordered.
+
+!       Form composite row permutation, IP(I) = IP(IQ(I)).
+60      DO II = 1, N
+          I = IQ(II)
+          IW(II,1) = IP(I)
+        END DO
+        DO I = 1, N
+          IP(I) = IW(I,1)
+        END DO
+
+!       Run through blocks in reverse order separating diagonal
+!       blocks which are moved to the end of the storage. Elements
+!       in off-diagonal blocks are left in place unless a compress
+!       is necessary.
+
+!       IBEG indicates the lowest value of J for which ICN(J) has
+!       been set to zero when element in position J was moved to
+!       the diagonal block part of storage.
+        IBEG = LICN + 1
+!       IEND is the position of the first element of those treated
+!       rows which are in diagonal blocks.
+        IEND = LICN + 1
+!       LARGE is the dimension of the largest block encountered
+!       so far.
+        LARGE = 0
+
+!       NUM is the number of diagonal blocks.
+        DO K = 1, NUM
+          IBLOCK = NUM - K + 1
+!         I1 is first row (in permuted form) of block IBLOCK.
+!         I2 is last row (in permuted form) of block IBLOCK.
+          I1 = IW(IBLOCK,4)
+          I2 = N
+          IF (K/=1) I2 = IW(IBLOCK+1,4) - 1
+          LARGE = MAX(LARGE,I2-I1+1)
+!         Go through the rows of block IBLOCK in the reverse order.
+          DO II = I1, I2
+            INEW = I2 - II + I1
+!           We now deal with row inew in permuted form (row IOLD
+!           in original matrix).
+            IOLD = IP(INEW)
+!           If there is space to move up diagonal block portion
+!           of row GOTO 110.
+            IF (IEND-IDISP(1)>=LENOFF(IOLD)) GOTO 110
+
+!           In-line compress.
+!           Moves separated off-diagonal elements and untreated
+!           rows to front of storage.
+            JNPOS = IBEG
+            ILEND = IDISP(1) - 1
+            IF (ILEND<IBEG) GOTO 180
+            DO 90 J = IBEG, ILEND
+              IF (ICN(J)==0) GOTO 90
+              ICN(JNPOS) = ICN(J)
+              A(JNPOS) = A(J)
+              JNPOS = JNPOS + 1
+90          END DO
+            IDISP(1) = JNPOS
+            IF (IEND-JNPOS<LENOFF(IOLD)) GOTO 180
+            IBEG = LICN + 1
+!           Reset pointers to the beginning of the rows.
+            DO 100 I = 2, N
+100         IW1(I,1) = IW1(I-1,1) + LENOFF(I-1)
+
+!           Row IOLD is now split into diagonal and off-diagonal parts.
+110         IROWB = IW1(IOLD,1)
+            LENI = 0
+            IROWE = IROWB + LENOFF(IOLD) - 1
+!           Backward scan of whole of row IOLD (in original matrix).
+            IF (IROWE<IROWB) GOTO 130
+            DO 120 JJ = IROWB, IROWE
+              J = IROWE - JJ + IROWB
+              JOLD = ICN(J)
+!             IW(:,2) holds the inverse permutation to IQ.
+!             It was set to this in MC13D.
+              JNEW = IW(JOLD,2)
+!             IF (JNEW < I1) THEN ...
+!             Element is in off-diagonal block and so is
+!             left in situ.
+              IF (JNEW<I1) GOTO 120
+!             Element is in diagonal block and is moved to
+!             the end of the storage.
+              IEND = IEND - 1
+              A(IEND) = A(J)
+              ICN(IEND) = JNEW
+              IBEG = MIN(IBEG,J)
+              ICN(J) = 0
+              LENI = LENI + 1
+120         END DO
+
+            LENOFF(IOLD) = LENOFF(IOLD) - LENI
+130         LENR(INEW) = LENI
+          END DO
+
+          IP(I2) = -IP(I2)
+        END DO
+!       Resets IP(N) to positive value.
+        IP(N) = -IP(N)
+!       IDISP(2) is position of first element in diagonal blocks.
+        IDISP(2) = IEND
+
+!       This compress is used to move all off-diagonal elements
+!       to the front of the storage.
+        IF (IBEG>LICN) GOTO 200
+        JNPOS = IBEG
+        ILEND = IDISP(1) - 1
+        DO 160 J = IBEG, ILEND
+          IF (ICN(J)==0) GOTO 160
+          ICN(JNPOS) = ICN(J)
+          A(JNPOS) = A(J)
+          JNPOS = JNPOS + 1
+160     END DO
+!       IDISP(1) is first position after last element of
+!       off-diagonal blocks.
+        IDISP(1) = JNPOS
+        GOTO 200
+
+!       Error return
+170     IF (LP/=0) WRITE (LP,90000) NUMNZ
+90000   FORMAT (' Matrix is structurally singular, rank = ',I6)
+        IDISP(1) = -1
+        GOTO 190
+180     IF (LP/=0) WRITE (LP,90001) N
+90001   FORMAT (' LICN is not big enough; increase by ',I6)
+        IDISP(1) = -2
+190     IF (LP/=0) WRITE (LP,90002)
+90002   FORMAT (' + Error return from MC23AD')
+200     RETURN
+
+      END SUBROUTINE MC23AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC24AD(N,ICN,A,LICN,LENR,LENRL,W)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AMAXL, AMAXU, WROWL
+        INTEGER :: I, J, J0, J1, J2, JJ
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA24AD
+! ..
+        AMAXL = ZERO
+        W(1:N) = ZERO
+        J0 = 1
+        DO 60 I = 1, N
+          IF (LENR(I)==0) GOTO 60
+          J2 = J0 + LENR(I) - 1
+          IF (LENRL(I)==0) GOTO 30
+!         Calculation of 1-norm of L.
+          J1 = J0 + LENRL(I) - 1
+          WROWL = ZERO
+          DO 20 JJ = J0, J1
+20        WROWL = WROWL + ABS(A(JJ))
+!         AMAXL is the maximum norm of columns of L so far found.
+          AMAXL = MAX(AMAXL,WROWL)
+          J0 = J1 + 1
+!         Calculation of norms of columns of U(MAX-NORMS).
+30        J0 = J0 + 1
+          IF (J0>J2) GOTO 50
+          DO 40 JJ = J0, J2
+            J = ICN(JJ)
+40        W(J) = MAX(ABS(A(JJ)),W(J))
+50        J0 = J2 + 1
+60      END DO
+!       AMAXU is set to maximum max-norm of columns of U.
+        AMAXU = ZERO
+        DO I = 1, N
+          AMAXU = MAX(AMAXU,W(I))
+        END DO
+!       GROFAC is MAX U max-norm times MAX L 1-norm.
+        W(1) = AMAXL*AMAXU
+        RETURN
+
+      END SUBROUTINE MC24AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC19AD(N,NA,A,IRN,ICN,R,C,W)
+! ..
+!     MC19A was altered to use same precision for R, C,
+!     and W as is used for other variables in program.
+! ..
+!     REAL A(NA),R(N),C(N),W(N,5)
+!     R(I) is used to return log(scaling factor for row I).
+!     C(J) is used to return log(scaling factor for col J).
+!     W(I,1), W(I,2) hold row,col non-zero counts.
+!     W(J,3) holds - COL J LOG during execution.
+!     W(J,4) holds 2-iteration change in W(J,3).
+!     W(I,5) is used to save average element log for row I.
+!     INTEGER*2 IRN(NA), ICN(NA)
+!     IRN(K) gives row number of element in A(K).
+!     ICN(K) gives col number of element in A(K).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: N, NA
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(NA), C(N), R(N), W(N,5)
+        INTEGER :: ICN(NA), IRN(NA)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: E, E1, EM, Q, Q1, QM, S, S1, SM, SMIN, U, V
+        INTEGER :: I, I1, I2, ITER, J, K, MAXIT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, LOG, REAL
+! ..
+! .. Data Statements ..
+!       MAXIT is the maximal permitted number of iterations.
+!       SMIN is used in a convergence test on (residual norm)**2.
+        DATA MAXIT/100/, SMIN/0.1/
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA19AD
+! ..
+!       Check scalar data.
+        IFAIL = 1
+        IF (N<1) GOTO 210
+        IFAIL = 2
+!       IF (N > 32767)GOTO 230
+        IFAIL = 2
+        IFAIL = 0
+
+!       Initialise for accumulation of sums and products.
+        C(1:N) = ZERO
+        R(1:N) = ZERO
+        W(1:N,1:4) = ZERO
+        IF (NA<=0) GOTO 220
+        DO 40 K = 1, NA
+          U = ABS(A(K))
+!         IF (U == ZERO) GOTO 30
+          IF (ABS(U-ZERO)<=ZERO) GOTO 40
+          U = LOG(U)
+          I1 = IRN(K)
+          I2 = ICN(K)
+          IF (I1>=1 .AND. I1<=N .AND. I2>=1 .AND. I2<=N) GOTO 30
+          IF (LP>0) WRITE (LP,90000) K, I1, I2
+90000     FORMAT (' MC19 error. Element ',I5,' is in row ',I5,' and column ', &
+            I5)
+          IFAIL = 3
+          GOTO 40
+!         Count row/col non-zeros and compute rhs vectors.
+30        W(I1,1) = W(I1,1) + 1.
+          W(I2,2) = W(I2,2) + 1.
+          R(I1) = R(I1) + U
+          W(I2,3) = W(I2,3) + U
+40      END DO
+        IF (IFAIL==3) GOTO 210
+
+!       Divide rhs by diagonal matrices.
+        DO I = 1, N
+!        IF (W(I,1) == ZERO) W(I,1) = 1.
+          IF (ABS(W(I,1))<=ZERO) W(I,1) = ONE
+          R(I) = R(I)/W(I,1)
+!         SAVE R(I) FOR USE AT END.
+          W(I,5) = R(I)
+!         IF (W(I,2) == ZERO) W(I,2) = 1.
+          IF (ABS(W(I,2))<=ZERO) W(I,2) = ONE
+          W(I,3) = W(I,3)/W(I,2)
+        END DO
+!       SM = SMIN*FLOAT(NA)
+        SM = SMIN*REAL(NA)
+!       Sweep to compute initial residual vector.
+        DO 60 K = 1, NA
+!         IF (A(K) == ZERO) GOTO 80
+          IF (ABS(A(K))<=ZERO) GOTO 60
+          I = IRN(K)
+          J = ICN(K)
+          R(I) = R(I) - W(J,3)/W(I,1)
+60      END DO
+
+!       Initialise iteration.
+        E = ZERO
+        Q = 1.
+        S = ZERO
+        DO I = 1, N
+          S = S + W(I,1)*R(I)**2
+        END DO
+        IF (S<=SM) GOTO 160
+
+!       Iteration loop.
+        DO ITER = 1, MAXIT
+!         Sweep through matrix to update residual vector.
+          DO 80 K = 1, NA
+!           IF (A(K) == ZERO) GOTO 130
+            IF (ABS(A(K))<=ZERO) GOTO 80
+            I = ICN(K)
+            J = IRN(K)
+            C(I) = C(I) + R(J)
+80        END DO
+          S1 = S
+          S = ZERO
+          DO I = 1, N
+            V = -C(I)/Q
+            C(I) = V/W(I,2)
+            S = S + V*C(I)
+          END DO
+          E1 = E
+          E = Q*S/S1
+          Q = 1. - E
+          IF (S<=SM) E = ZERO
+!         Update residual.
+          DO I = 1, N
+            R(I) = R(I)*E*W(I,1)
+          END DO
+          IF (S<=SM) GOTO 180
+          EM = E*E1
+!         Sweep through matrix to update residual vector.
+          DO 110 K = 1, NA
+!           IF (A(K) == ZERO) GOTO 152
+            IF (ABS(A(K))<=ZERO) GOTO 110
+            I = IRN(K)
+            J = ICN(K)
+            R(I) = R(I) + C(J)
+110       END DO
+          S1 = S
+          S = ZERO
+          DO I = 1, N
+            V = -R(I)/Q
+            R(I) = V/W(I,1)
+            S = S + V*R(I)
+          END DO
+          E1 = E
+          E = Q*S/S1
+          Q1 = Q
+          Q = 1. - E
+!         Special fixup for last iteration.
+          IF (S<=SM) Q = 1.
+!         Update colulm scaling powers.
+          QM = Q*Q1
+          DO I = 1, N
+            W(I,4) = (EM*W(I,4)+C(I))/QM
+            W(I,3) = W(I,3) + W(I,4)
+          END DO
+          IF (S<=SM) GOTO 160
+!         Update residual.
+          DO I = 1, N
+            C(I) = C(I)*E*W(I,2)
+          END DO
+        END DO
+160     DO I = 1, N
+          R(I) = R(I)*W(I,1)
+        END DO
+
+!       Sweep through matrix to prepare to get row scaling powers.
+180     DO 190 K = 1, NA
+!         IF (A(K) == ZERO) GOTO 200
+          IF (ABS(A(K))<=ZERO) GOTO 190
+          I = IRN(K)
+          J = ICN(K)
+          R(I) = R(I) + W(J,3)
+190     END DO
+
+!       Final conversion to output values.
+        DO I = 1, N
+          R(I) = R(I)/W(I,1) - W(I,5)
+          C(I) = -W(I,3)
+        END DO
+        GOTO 220
+210     IF (LP>0) WRITE (LP,90001) IFAIL
+90001   FORMAT (' Error return ',I2,' from MC19')
+220     RETURN
+      END SUBROUTINE MC19AD
+! End of  MA28 subroutines.
+!_______________________________________________________________________
+! Beginning of JACSP routines.
+! Change Record:
+! ST 09-01-05
+!   Convert to F90 using Metcalf converter
+!   Trim trailing blanks using trimem.pl
+!   Convert arithmetic operators to F90
+!   Replace R1MACH by EPSILON
+!   Run through nag tools suite
+! ST 09-17-05
+!   Delete RDUM and IDUM
+!   Change FCN argument list
+! ST 09-18-05
+!   Add subroutine DGROUPDS to define the IGP and JGP arrays for JACSP
+! ST 09-20-05
+!   Modify JACSP to produce JACSPDB for sparse, dense, and
+!   banded Jacobians
+!_______________________________________________________________________
+
+    SUBROUTINE JACSP(FCN,N,T,Y,F,FJAC,NRFJAC,YSCALE,FAC,IOPT,WK, &
+      LWK,IWK,LIWK,MAXGRP,NGRP,JPNTR,INDROW)
+
+! BEGIN PROLOGUE JACSP
+! DATE WRITTEN 850415
+! CATEGORY NO. D4
+! KEYWORDS NUMERICAL DIFFERENCING, SPARSE JACOBIANS
+! AUTHOR SALANE, DOUGLAS E., SANDIA NATIONAL LABORATORIES
+!        NUMERICAL MATHEMATICS DIVISION,1642
+!        ALBUQUERQUE, NM 87185
+
+! SUBROUTINE JACSP USES FINITE DIFFERENCES TO COMPUTE THE JACOBIAN OF
+! A SPARSE SYSTEM OF N EQUATIONS AND N UNKNOWNS. JACSP IS DESIGNED FOR
+! USE IN NUMERICAL METHODS FOR SOLVING NONLINEAR PROBLEMS WHERE THE
+! JACOBIAN IS EVALUATED REPEATEDLY AND OFTEN AT NEIGHBORING ARGUMENTS
+! (E.G., NEWTON'S METHOD OR A BDF METHOD FOR SOVING STIFF ORDINARY
+! DIFFERENTIAL EQUATIONS). JACSP IS INTENDED FOR APPLICATIONS IN WHICH
+! THE REQUIRED JACOBIANS ARE LARGE AND SPARSE.
+
+! TAKING ADVANTAGE OF SPARSITY.
+
+! SUBROUTINE JACSP TAKES ADVANTAGE OF THE SPARSITY OF A MATRIX TO REDUCE
+! THE NUMBER OF FUNCTION EVALUATIONS REQUIRED TO COMPUTE THE JACOBIAN.
+! TO REALIZE THIS ADVANTAGE, THE USER MUST PROVIDE JACSP WITH A COLUMN
+! GROUPING. THIS MEANS THE USER MUST ASSIGN COLUMNS OF THE JACOBIAN TO
+! MUTUALLY EXCLUSIVE GROUPS BASED ON THE SPARSITY OF THE COLUMNS.THE
+! DIFFERENCES REQUIRED TO COMPUTE THE NONZERO ELEMENTS IN ALL COLUMNS IN
+! A GROUP ARE FORMED USING ONLY ONE ADDITIONAL FUNCTION EVALUATION. FOR
+! MORE DETAILS, THE USER IS REFERRED TO THE REPORT BY D.E. SALANE AND
+! L.F. SHAMPINE (REF. 1).
+
+! THE SUBROUTINE DVDSM (REF 2.) IS THE WAY MOST USERS WILL DETERMINE A
+! COLUMN GROUPING FOR JACSP. THE USE OF DSM AND JACSP IS DESCRIBED
+! LATER IN THE PROLOGUE.
+
+! STORAGE.
+
+! JACSP REQUIRES THE USER TO PROVIDE A SPARSE DATA STRUCTURE FOR THE
+! JACOBIAN TO BE COMPUTED. JACSP REQUIRES THE USER TO SPECIFY THE
+! INDICES OF THE NONZERO ELEMENTS IN A COLUMN PACKED SPARSE DATA
+! STRUCTURE (SEE REF.1). THE SUBROUTINE DVDSM( REF 2.) CAN BE USED TO
+! ESTABLISH THE SPARSE DATA STRUCTURE REQUIRED BY JACSP. THE USE OF
+! JACSP AND DSM IS DESCRIBED LATER IN THE PROLOGUE.
+
+! ON OUTPUT, SUBROUTINE JACSP WILL RETURN THE JACOBIAN IN ANY ONE OF
+! THE FOLLOWING THREE FORMATS SPECIFIED BY THE USER.
+
+! (1) FULL STORAGE FORMAT.......THE COMPUTED JACOBIAN IS STORED IN
+!      AN ARRAY WHOSE ROW AND COLUMN DIMENSIONS ARE THE NUMBER OF
+!      EQUATIONS.
+
+! (2) BANDED STORAGE FORMAT.....THE COMPUTED MATRIX IS STORED IN A TWO
+!      DIMENSIONAL ARRAY WHOSE ROW DIMENSION IS
+!      2*(NUMBER OF LOWER DIAGONALS) + (THE NUMBER OF UPPER DIAGONALS)
+!      + 1. THE COLUMN DIMENSION OF THIS ARRAY IS THE NUMBER OF
+!      EQUATIONS. THIS STORAGE FORMAT IS COMPATIBLE WITH THE LINPACK
+!      GENERAL BAND MATRIX EQUATION SOLVER.
+
+! (3) SPARSE STORAGE FORMAT.....THE COMPUTED JACOBIAN IS STORED IN A
+!      ONE DIMENSIONAL ARRAY WHOSE LENGTH IS THE NUMBER OF NONZERO
+!      ELEMENTS IN THE JACOBIAN.
+
+! DESCRIPTION
+
+!  SUBROUTINE PARAMETERS
+
+!  FCN()......A USER-PROVIDED FUNCTION (SEE SUBROUTINE DESCRIPTION).
+!  N..........THE NUMBER OF EQUATIONS.
+!  T..........A SCALAR VARIABLE. T IS PROVIDED SO USERS CAN PASS THE
+!             VALUE OF AN INDEPENDENT VARIALBE TO THE FUNCTION
+!             EVALUATION ROUTINE.
+!  Y(*).......AN ARRAY OF DIMENSION N. THE POINT AT WHICH THE
+!             JACOBIAN IS TO BE EVALUATED.
+!  F(*).......AN ARRAY OF DIMENSION N. THE EQUATIONS EVALUATED AT
+!             THE POINT Y.
+!  FJAC(*,*)..AN ARRAY OF WHOSE DIMENSIONS DEPEND ON THE STORAGE
+!      FORMAT SELECTED BY THE USER. THE ROW AND COLUMN DIMENSIONS ARE
+!      SET BY THE USER. IF THE SPARSE MATRIX FORMAT IS SELECTED, FJAC
+!      SHOULD BE TREATED AS A ONE DIMENSIONAL ARRAY BY THE CALLING
+!      PROGRAM. FOR FURTHER DETAILS, SEE THE DESCRIPTION OF THE
+!      PARAMETER IOPT(1) WHICH CONTROLS THE STORAGE FORMAT.
+
+!      NOTE THAT IF THE BANDED OR FULL OPTION IS USED,THE USER SHOULD
+!      ZERO OUT THOSE POSITIONS OF FJAC THAT WILL NOT BE ACCESSED BY
+!      JACSP. JACSP DOES NOT ZERO OUT THE MATRIX FJAC BEFORE
+!      COMPUTING THE JACOBIAN. POSITIONS OF FJAC THAT ARE NOT ASSIGNED
+!      VALUES BY JACSP WILL BE THE SAME ON EXIT AS ON ENTRY TO JACSP.
+
+!  NRFJAC.....THE NUMBER OF ROWS IN FJAC AND THE LEADING DIMENSION
+!             OF FJAC (SEE IOPT(1)).
+!  NCFJAC.....THE NUMBER OF COLUMNS IN FJAC AND THE COLUMN DIMENSION
+!             OF FJAC (SEE IOPT(1)).
+!  YSCALE(*)..AN ARRAY OF DIMENSION N. YSCALE(I) CONTAINS A
+!     REPRESENTATIVE MAGNITUDE FOR Y(I). YSCALE(I) MUST BE POSITIVE.
+!     YSCALE IS AN OPTIONAL FEATURE OF THE ROUTINE. IF THE USER DOES
+!     NOT WISH TO PROVIDE YSCALE, IT CAN BE TREATED AS A DUMMY SCALAR
+!     VARIABLE (SEE IOPT(3)).
+
+!  FAC(*).....AN ARRAY OF DIMENSION N. FAC CONTAINS A PERCENTAGE FOR
+!     USE IN COMPUTING THE INCREMENT.
+
+!     THE NORMAL WAY TO USE THE CODE IS TO LET JACSP ADJUST FAC VALUES.
+!     IN THIS CASE FAC IS INITIALIZED BY JACSP. ALSO, THE USER MUST
+!     NOT ALTER FAC VALUES BETWEEN CALLS TO JACSP.
+
+!     THE USER MAY PROVIDE FAC VALUES IF DESIRED (SEE IOPT(4) FOR
+!     DETAILS). IF THE USER PROVIDES FAC VALUES, FAC(I) SHOULD BE
+!     SHOULD BE SET TO A VALUE BETWEEN O AND 1. JACSP WILL NOT PERMIT
+!     FAC(I) TO BE SET TO A VALUE THAT RESULTS IN TOO SMALL AN
+!     INCREMENT. JACSP ENSURES THAT
+!                     FACMIN <= FAC(I) <= FACMAX.
+!     FOR FURTHER DETAILS ON FACMIN AND FACMAX SEE
+!     THE REPORT(REF.3).
+
+!  IOPT(*)....AN INTEGER ARRAY OF LENGTH 5 FOR USER SELECTED OPTIONS.
+
+!          IOPT(1) CONTROLS THE STORAGE FORMAT.
+
+!             IOPT(1) = 0 INDICATES FULL STORAGE FORMAT. SET BOTH
+!             NRFJAC = N AMD NCFJAC = N.
+
+!             IOPT(1) = 1 INDICATES BANDED STORAGE FORMAT. SET
+!             NRFJAC = 2 * ML + MU + 1 WHERE
+!             ML = NUMBER OF SUB-DIAGONALS BELOW THE MAIN DIAGONAL AND
+!             MU = NUMBER OF SUPER-DIAGONALS ABOVE THE MAIN DIAGONAL.
+!             SET NCFJAC = N.
+
+!             IOPT(1) = 2 INDICATES SPARSE STORAGE FORMAT. SET
+!             NRFJAC = TO THE NUMBER OF NONZEROS IN THE JACOBIAN AND
+!             SET NCFJAC = 1.
+
+!          IOPT(2) MUST BE SET TO THE BANDWIDTH OF THE MATRIX.
+!          IOPT(2) NEED ONLY BE PROVIDED IF BANDED STORAGE
+!          FORMAT IS REQUESTED(I.E., IOPT(1) = 1).
+
+!          IOPT(3) ALLOWS THE USER TO PROVIDE TYPICAL VALUES
+!          TO BE USED IN COMPUTING INCREMENTS FOR DIFFERENCING.
+
+!             IOPT(3) = 0 INDICATES Y VALUES ARE USED IN COMPUTING
+!             INCREMENTS. IF IOPT(3) = 0, NO STORAGE IS REQUIRED FOR
+!             YSCALE AND IT MAY BE TREATED AS A DUMMY VARIABLE.
+
+!             IOPT(3) = 1 INDICATES THAT YSCALE VALUES ARE TO BE USED.
+!             IF IOPT(3) = 1, THE USER MUST PROVIDE AN ARRAY OF NONZERO
+!             VALUES IN YSCALE.
+
+!          IOPT(4) ALLOWS THE USER TO PROVIDE THE VALUES USED
+!          IN THE FAC ARRAY TO COMPUTE INCREMENTS FOR DIFFERENCING.
+
+!             IF IOPT(4) = 0, EACH COMPONENT OF FAC IS
+!             SET TO THE SQUARE ROOT OF MACHINE UNIT ROUNDOFF ON THE
+!             FIRST CALL TO JACSP. IOPT(4) IS SET TO ONE ON RETURN.
+
+!             IF IOPT(4) = 1, EACH COMPONENT OF FAC MUST BE SET
+!             BY THE CALLING ROUTINE. UNLESS THE USER WISHES TO
+!             INITIALIZE FAC, THE FAC ARRAY SHOULD NOT BE ALTERED
+!             BETWEEN SUBSEQUENT CALLS TO JACSP. ALSO, THE USER
+!             SHOULD NOT CHANGE THE VALUE OF IOPT(4) RETURNED BY
+!             JACSP.
+
+!          IOPT(5) IS NOT USED IN JACSP.
+
+!  WK(*)......A WORK ARRAY OF DIMENSION AT LEAST 3*N
+!  LWK........THE LENGTH OF THE WORK ARRAY. LWK IS AT LEAST 3*N.
+!  IWK(*)...AN INTEGER ARRAY OF LENGTH LIWK = 50 + N WHICH GIVES
+!      DIAGNOSTIC INFORMATION IN POSITIONS 1 THROUGH 50. POSITIONS 51
+!      THROUGH 50 + N ARE USED AS INTEGER WORKSPACE.
+
+!      IWK(1) GIVES THE NUMBER OF TIMES THE INCREMENT FOR DIFFERENCING
+!      (DEL) WAS COMPUTED AND HAD TO BE INCREASED BECAUSE (Y(JCOL)+DEL)
+!      -Y(JCOL)) WAS TOO SMALL RELATIVE TO Y(JCOL) OR YSCALE(JCOL).
+
+!      IWK(2) GIVES THE NUMBER OF COLUMNS IN WHICH THREE ATTEMPTS WERE
+!      MADE TO INCREASE A PERCENTAGE FACTOR FOR DIFFERENCING (I.E., A
+!      COMPONENT IN THE FAC ARRAY) BUT THE COMPUTED DEL REMAINED
+!      UNACCEPTABLY SMALL RELATIVE TO Y(JCOL) OR YSCALE(JCOL). IN SUCH
+!      CASES THE PERCENTAGE FACTOR IS SET TO THE SQUARE ROOT OF THE UNIT
+!      ROUNDOFF OF THE MACHINE. THE FIRST 10 COLUMNS ARE GIVEN IN
+!      IWK(21),...,IWK(30).
+
+!      IWK(3) GIVES THE NUMBER OF COLUMNS IN WHICH THE COMPUTED DEL WAS
+!      ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) OR YSCALE(JCOL) WAS
+!      ZERO. IN SUCH CASES DEL IS SET TO THE SQUARE ROOT OF THE UNIT
+!      ROUNDOFF.
+
+!      IWK(4) GIVES THE NUMBER OF COLUMNS WHICH HAD TO BE RECOMPUTED
+!      BECAUSE THE LARGEST DIFFERENCE FORMED IN THE COLUMN WAS VERY
+!      CLOSE TO ZERO RELATIVE TO SCALE WHERE
+
+!                    SCALE = MAX(F(Y),F(Y+DEL))
+!                                 I     I
+
+!      AND I DENOTES THE ROW INDEX OF THE LARGEST DIFFERENCE IN THE
+!      COLUMN CURRENTLY BEING PROCESSED. IWK(31),...,IWK(40) GIVES THE
+!      FIRST 10 OF THESE COLUMNS.
+
+!      IWK(5) GIVES THE NUMBER OF COLUMNS WHOSE LARGEST DIFFERENCE IS
+!      CLOSE TO ZERO RELATIVE TO SCALE AFTER THE COLUMN HAS BEEN
+!      RECOMPUTED. THE FIRST 10 OF THESE COLUMNS ARE GIVEN IN POSITIONS
+!      IWK(41)...IWK(50).
+!      IWK(6) GIVES THE NUMBER OF TIMES SCALE INFORMATION WAS NOT
+!      AVAILABLE FOR USE IN THE ROUNDOFF AND TRUNCATION ERROR TESTS.
+!      THIS OCCURS WHEN
+!                    MIN(F(Y),F(Y+DEL)) = 0.
+!                          I     I
+!      WHERE I IS THE INDEX OF THE LARGEST DIFFERENCE FOR THE COLUMN
+!      CURRENTLY BEING PROCESSED.
+!      IWK(7) GIVES THE NUMBER OF TIMES THE FUNCTION EVALUATION ROUTINE
+!      WAS CALLED.
+!      IWK(8) GIVES THE NUMBER OF TIMES A COMPONENT OF THE FAC ARRAY WAS
+!      REDUCED BECAUSE CHANGES IN FUNCTION VALUES WERE LARGE AND EXCESS
+!      TRUNCATION ERROR WAS SUSPECTED. IWK(11),...,IWK(20) GIVES THE FIRST
+!      10 OF THESE COLUMNS.
+!      IWK(9) AND IWK(10) ARE NOT USED IN JACSP.
+!  LIWK.....THE LENGTH OF THE ARRAY IWK. LIWK = 50 + N.
+!      THE FOLLOWING PARAMETERS MAY BE PROVIDED BY THE USER OR
+!      INITIALIZED BY THE SUBROUTINE DVDSM (SEE LONG DESCRIPTION
+!      SECTION OF THE PROLOGUE).
+!  PARAMETERS CONTAINING COLUMN GROUPING:
+!  MAXGRP.....THE NUMBER OF DIFFERENT GROUPS TO WHICH THE COLUMNS
+!             HAVE BEEN ASSIGNED.
+!  NGRP(*)....AN ARRAY OF LENGTH N THAT CONTAINS THE COLUMN GROUPING.
+!             NGRP(I) IS THE GROUP TO WHICH THE I-TH COLUMN HAS BEEN
+!             ASSIGNED.
+!             (SEE USE OF DSM AND JACSP FOR DETERMINING MAXGRP AND NGRP)
+!  PARAMETERS CONTAINING THE SPARSE DATA STRUCTURE:
+!  JPNTR(*)...AN ARRAY OF LENGTH N+1 THAT CONTAINS POINTERS TO
+!             THE ROW INDICES IN INDROW (SEE INDROW).
+!  INDROW(*)..AN ARRAY WHOSE LENGTH IS THE NUMBER OF NONZERO ELEMENTS
+!             IN THE JACOBIAN. INDROW CONTAINS THE ROW INDICES
+!             STORED IN COLUMN PACKED FORMAT. IN OTHER WORDS, THE
+!             ROW INDICES OF THE NONZERO ELEMENTS OF A GIVEN
+!             COLUMN OF THE JACOBIAN ARE STORED CONTIGUOUSLY IN
+!             INDROW. JPNTR(JCOL) POINTS TO THE ROW INDEX OF THE FIRST
+!             NONZERO ELEMENT IN THE COLUMN JCOL. JPNTR(JCOL+1) - 1
+!             POINTS TO THE ROW INDEX OF THE LAST NONZERO ELEMENT IN
+!             THE COLUMN JCOL.
+!             (SEE USE OF DSM AND JACSP FOR DETERMINING INDROW AND JPNTR)
+!  REQUIRED SUBROUTINES: SUBROUTINE FCN(N,T,Y,F)
+!     T......AN INDEPENDENT SCALAR VARIABLE WHICH MAY BE USED
+!           IN EVALUATING F(E.G., F(Y(T),T)).
+!     Y(*)...AN ARRAY OF DIMENSION N WHICH CONTAINS THE POINT AT
+!            WHICH THE EQUATIONS ARE TO BE EVALUATED.
+!     F(*)...AN ARRAY OF DIMENSION N WHICH ON RETURN FROM FCN
+!            CONTAINS THE EQUATIONS EVALUATED AT Y.
+
+! LONG DESCRIPTION
+
+! ROUNDOFF AND TRUNCATION ERRORS.
+! SUBROUTINE JACSP TAKES ADVANTAGE OF THE WAY IN WHICH THE JACOBIAN
+! IS EVALUATED TO ADJUST INCREMENTS FOR DIFFERENCING TO CONTROL
+! ROUNDOFF AND TRUNCATION ERRORS. THE ROUTINE SELDOM REQUIRES MORE
+! THAN ONE ADDITIONAL FUNCTION EVALUATION TO COMPUTE A COLUMN OF THE
+! JACOBIAN. ALSO, THE ROUTINE RETURNS A VARIETY OF ERROR DIAGNOSTICS
+! TO WARN USERS WHEN COMPUTED DERIVATIVES MAY NOT BE ACCURATE.
+! WARNING: JACSP CAN NOT GUARANTEE THE ACCURACY OF THE COMPUTED
+! DERIVATIVES. IN ORDER O SAVE ON FUNCTION EVALUATIONS, HEURISTIC
+! TECNIQUES FOR INCREMENT ADJUSTMENT AND SAFEGUARDING INCREMENTS ARE
+! USED. THESE USUALLY WORK WELL.
+
+! WARNING: SOME OF THE DIAGNOSTICS RETURNED CAN ONLY BE INTERPRETED
+! WITH A DETAILED KNOWLEDGE OF THE ROUTINE. NEVERTHELESS, THEY ARE
+! PROVIDED TO GIVE USERS FULL ACCESS TO THE INFORMATION PRODUCED BY
+! THE SUBROUTINE.
+! USE OF DSM AND JACSP.
+! SUBROUTINE DVDSM CAN BE USED TO DETERMINE THE COLUMN GROUPING (MAXGRP
+! AND NGRP(*)) AND THE SPARSE DATA STRUCTURE VARIABLES (JPNTR(*) AND
+! INDROW(*)). THE USER CAN CALL DVDSM ONCE TO INITIALIZE
+! MAXGRP,NGRP,JPNTR AND INDROW. JACSP MAY THEN BE CALLED REPEATEDLY TO
+! EVALUATE THE JACOBIAN. THE FOLLOWING ARE THE IMPORTANT VARIABLES IN
+! THE DSM CALLING SEQUENCE.
+! SUBROUTINE DVDSM(...,INDROW,INDCOL,NGRP,MAXGRP,..,JPNTR,...)
+! ON INPUT, THE USER MUST PROVIDE DSM WITH THE INTEGER ARRAYS INDROW AND
+! INDCOL. THE PAIR
+!                  (INDROW(I),INDCOL(I))
+! PROVIDES THE INDEX OF A NONZERO ELEMENT OF THE JACOBIAN. THE LENGTH OF
+! INDROW AND INDCOL IS THE NUMBER OF NONZERO ELEMENTS IN THE JACOBIAN.
+! NO ORDERING OF THE INDICES FOR NONZERO ELEMENTS IS REQUIRED IN THE
+! ARRAYS INDROW AND INDCOL.
+! ON RETURN FROM DSM, MAXGRP,NGRP,INDROW,JPNTR ARE INITIALIZED
+! FOR INPUT TO JACSP. THE USER MUST NOT CHANGE MAXGRP,NGRP,JPNTR OR
+! INDROW AFTER CALLING DSM.
+! WE REFER THE READER TO THE IN CODE DOCUMENTATION FOR DSM OR THE REPORT
+! BY MORE AND COLEMAN (REF 2.) FOR FURTHER DETAILS.
+! REFERENCES
+!  (1) D.E. SALANE AND L. F. SHAMPINE
+!      "AN ECONOMICAL AND EFFICIENT ROUTINE FOR COMPUTING
+!      SPARSE JACOBIANS", REPORT NO. SAND85-0977, SANDIA NATIONAL
+!      LABORATORIES, ALBUQUERQUE,NM,87185.
+!  (2) T.F. COLEMAN AND J.J. MORE
+!      "SOFTWARE FOR ESTIMATING SPARSE JACOBIAN MATRICES" ACM TOMS,
+!      V10.,N0.3,SEPT. 1984.
+!  (3) D.E. SALANE AND L. F. SHAMPINE
+!      "THREE ADAPTIVE ROUTINES FOR FORMING JACOBIANS NUMERICALLY,"
+!       REPORT NO. SAND86- ****, SANDIA NATIONAL LABORATORIES,
+!       ALBUQUERQUE, NM, 87185.
+!  REQUIRED FORTRAN INTRINSIC FUNCTIONS: MAX,MIN,ABS,SIGN
+!  MACHINE DEPENDENT CONSTANT: U (MACHINE UNIT ROUNDOFF)
+!  JACSP SETS THE REQUIRED MACHINE CONSTANT USING THE F90
+!  INTRINSIC EPSILON.
+!  END PROLOGUE JACSP
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      KPP_REAL :: T
+      INTEGER :: LIWK, LWK, MAXGRP, N, NRFJAC
+! ..
+! .. Array Arguments ..
+      KPP_REAL :: F(N), FAC(N), FJAC(NRFJAC,*), WK(LWK), Y(N), YSCALE(*)
+      INTEGER :: INDROW(*), IOPT(5), IWK(LIWK), JPNTR(*), NGRP(N)
+! ..
+! .. Subroutine Arguments ..
+      EXTERNAL FCN
+! ..
+! .. Local Scalars ..
+      KPP_REAL :: ADIFF, AY, DEL, DELM, DFMJ, DIFF, DMAX, EXPFMN, FACMAX, &
+        FACMIN, FJACL, FMJ, ONE, P125, P25, P75, P875, PERT, RDEL, RMNFDF, &
+        RMXFDF, SDF, SF, SGN, T1, T2, U, U3QRT, U7EGT, UEGT, UMEGT, UQRT, &
+        USQT, ZERO
+      INTEGER :: IDXL, IDXU, IFLAG1, IFLAG2, IRCMP, IRDEL, IROW, IROWB, &
+        IROWMX, ITRY, J, JCOL, KT1, KT2, KT3, KT4, KT5, L, NID1, NID2, NID3, &
+        NID4, NID5, NID6, NIFAC, NT2, NUMGRP
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC ABS, EPSILON, KIND, MAX, MIN, SIGN, SQRT
+      INTRINSIC ABS, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! .. Data Statements ..
+      DATA PERT/2.0E+0_dp/, FACMAX/1.E-1_dp/, EXPFMN/.75E+0_dp/
+      DATA ONE/1.0E0_dp/, ZERO/0.0E0_dp/
+      DATA P125/.125E+0_dp/, P25/.25E+0_dp/, P75/.75E+0_dp/, P875/.875E+0_dp/
+      DATA NIFAC/3/, NID1/10/, NID2/20/, NID3/30/, NID4/40/, NID5/50/
+! ..
+!     COMPUTE ALGORITHM AND MACHINE CONSTANTS.
+! ..
+! ..  FIRST EXECUTABLE STATEMENT JACSP
+! ..
+      U = EPSILON(ONE)
+      USQT = SQRT(U)
+      UEGT = U**P125
+      UMEGT = ONE/UEGT
+      UQRT = U**P25
+      U3QRT = U**P75
+      U7EGT = U**P875
+      FACMIN = U**EXPFMN
+
+      IF (IOPT(4) == 0) THEN
+        IOPT(4) = 1
+        DO 10 J = 1, N
+          FAC(J) = USQT
+10      CONTINUE
+      END IF
+      DO 20 J = 1, 50
+        IWK(J) = 0
+20    CONTINUE
+      KT1 = NID1
+      KT2 = NID2
+      KT3 = NID3
+      KT4 = NID4
+      KT5 = NID5
+      NID6 = LIWK
+      NT2 = 2*N
+      DO NUMGRP = 1, MAXGRP
+!       COMPUTE AND SAVE THE INCREMENTS FOR THE COLUMNS IN GROUP NUMGRP.
+        IRCMP = 0
+        ITRY = 0
+        DO 30 J = NID5 + 1, NID6
+          IWK(J) = 0
+30      CONTINUE
+40      CONTINUE
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            WK(N+JCOL) = Y(JCOL)
+!           COMPUTE DEL. IF DEL IS TOO SMALL INCREASE FAC(JCOL) AND RECOMPUTE
+!           DEL. NIFAC ATTEMPTS ARE MADE TO INCREASE FAC(JCOL) AND FIND AN
+!           APPROPRIATE DEL. IF DEL CANT BE FOUND IN THIS MANNER, DEL IS COMPUTED
+!           WITH FAC(JCOL) SET TO THE SQUARE ROOT OF THE MACHINE PRECISION (USQT).
+!           IF DEL IS ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) IS ZERO OR
+!           YSCALE(JCOL) IS ZERO, DEL IS SET TO USQT.
+            SGN = SIGN(ONE,F(JCOL))
+            IRDEL = 0
+            IF (IOPT(3) == 1) THEN
+              AY = ABS(YSCALE(JCOL))
+            ELSE
+              AY = ABS(Y(JCOL))
+            END IF
+            DELM = U7EGT*AY
+
+            DO 50 J = 1, NIFAC
+              DEL = FAC(JCOL)*AY*SGN
+!             IF (DEL == ZERO) THEN
+              IF (ABS(DEL) <= ZERO) THEN
+
+                DEL = USQT*SGN
+                IF (ITRY == 0) IWK(3) = IWK(3) + 1
+              END IF
+              T1 = Y(JCOL) + DEL
+              DEL = T1 - Y(JCOL)
+              IF (ABS(DEL) < DELM) THEN
+                IF (J >= NIFAC) GOTO 50
+                IF (IRDEL == 0) THEN
+                  IRDEL = 1
+                  IWK(1) = IWK(1) + 1
+                END IF
+                T1 = FAC(JCOL)*UMEGT
+                FAC(JCOL) = MIN(T1,FACMAX)
+              ELSE
+                GOTO 60
+              END IF
+50          END DO
+
+            FAC(JCOL) = USQT
+            DEL = USQT*AY*SGN
+            IWK(2) = IWK(2) + 1
+            IF (KT2 < NID3) THEN
+              KT2 = KT2 + 1
+              IWK(KT2) = JCOL
+            END IF
+
+60          CONTINUE
+            WK(NT2+JCOL) = DEL
+            Y(JCOL) = Y(JCOL) + DEL
+          END IF
+        END DO
+
+        IWK(7) = IWK(7) + 1
+        CALL FCN(N,T,Y,WK)
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) Y(JCOL) = WK(N+JCOL)
+        END DO
+
+!       COMPUTE THE JACOBIAN ENTRIES FOR ALL COLUMNS IN NUMGRP.
+!       STORE ENTRIES ACCORDING TO SELECTED STORAGE FORMAT.
+!       USE LARGEST ELEMENTS IN A COLUMN TO DETERMINE SCALING
+!       INFORMATION FOR ROUNDOFF AND TRUNCATION ERROR TESTS.
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            IDXL = JPNTR(JCOL)
+            IDXU = JPNTR(JCOL+1) - 1
+            DMAX = ZERO
+            RDEL = ONE/WK(NT2+JCOL)
+            IROWMX = 1
+            DO L = IDXL, IDXU
+              IROW = INDROW(L)
+              DIFF = WK(IROW) - F(IROW)
+              ADIFF = ABS(DIFF)
+              IF (ADIFF >= DMAX) THEN
+                IROWMX = IROW
+                DMAX = ADIFF
+                SF = F(IROW)
+                SDF = WK(IROW)
+              END IF
+              FJACL = DIFF*RDEL
+              IF (ITRY == 1) WK(IROW) = FJACL
+
+              IF (IOPT(1) == 0) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROW,JCOL)
+                FJAC(IROW,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 1) THEN
+                IROWB = IROW - JCOL + IOPT(2)
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,JCOL)
+                FJAC(IROWB,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 2) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(L,1)
+                FJAC(L,1) = FJACL
+              END IF
+            END DO
+
+!           IF A COLUMN IS BEING RECOMPUTED (ITRY=1),THIS SECTION OF THE
+!           CODE PERFORMS AN EXTRAPOLATION TEST TO ENABLE THE CODE TO
+!           COMPUTE SMALL DERIVATIVES MORE ACCURATELY. THIS TEST IS ONLY
+!           PERFORMED ON THOSE COLUMNS WHOSE LARGEST DIFFERENCE IS CLOSE
+!           TO ZERO RELATIVE TO SCALE.
+            IF (ITRY == 1) THEN
+              IFLAG1 = 0
+              IFLAG2 = 0
+              DO 100 J = NID5 + 1, NID6
+                IF (IWK(J) == JCOL) IFLAG1 = 1
+100           CONTINUE
+              IF (IFLAG1 == 1) THEN
+                IFLAG1 = 0
+                T1 = WK(IROWMX+N)
+                T2 = WK(IROWMX)*FAC(JCOL)
+                IF (ABS(T2) < ABS(T1)*PERT) IFLAG2 = 1
+              END IF
+
+              IF (IFLAG2 == 1) THEN
+                IFLAG2 = 0
+                T1 = FAC(JCOL)*FAC(JCOL)
+                FAC(JCOL) = MAX(T1,FACMIN)
+                DO L = IDXL, IDXU
+                  IROW = INDROW(L)
+                  FJACL = WK(IROW+N)
+                  IF (IOPT(1) == 0) FJAC(IROW,JCOL) = FJACL
+                  IF (IOPT(1) == 1) THEN
+                    IROWB = IROW - JCOL + IOPT(2)
+                    FJAC(IROWB,JCOL) = FJACL
+                  END IF
+                  IF (IOPT(1) == 2) FJAC(L,1) = FJACL
+                END DO
+              END IF
+            END IF
+
+            FMJ = ABS(SF)
+            DFMJ = ABS(SDF)
+            RMXFDF = MAX(FMJ,DFMJ)
+            RMNFDF = MIN(FMJ,DFMJ)
+
+!           IF SCALE INFORMATION IS NOT AVAILABLE, PERFORM NO ROUNDOFF
+!           OR TRUNCATION ERROR TESTS. IF THE EXTRAPOLATION TEST HAS
+!           CAUSED FAC(JCOL) TO BE RESET TO ITS PREVIOUS VALUE (IAJAC=1)
+!           THEN NO FURTHER ROUNDOFF OR TRUNCATION ERROR TESTS ARE
+!           PERFORMED.
+!           IF (RMNFDF/=ZERO) THEN
+            IF (ABS(RMNFDF) > ZERO) THEN
+!             TEST FOR POSSIBLE ROUNDOFF ERROR (FIRST TEST)
+!             AND ALSO FOR POSSIBLE SERIOUS ROUNDOFF ERROR (SECOND TEST).
+              IF (DMAX <= (U3QRT*RMXFDF)) THEN
+                IF (DMAX <= (U7EGT*RMXFDF)) THEN
+                  IF (ITRY == 0) THEN
+                    T1 = SQRT(FAC(JCOL))
+                    FAC(JCOL) = MIN(T1,FACMAX)
+                    IRCMP = 1
+                    IF (KT5 < NID6) THEN
+                      KT5 = KT5 + 1
+                      IWK(KT5) = JCOL
+                    END IF
+                    IWK(4) = IWK(4) + 1
+                    IF (KT3 < NID4) THEN
+                      KT3 = KT3 + 1
+                      IWK(KT3) = JCOL
+                    END IF
+                  ELSE
+                    IWK(5) = IWK(5) + 1
+                    IF (KT4 < NID5) THEN
+                      KT4 = KT4 + 1
+                      IWK(KT4) = JCOL
+                    END IF
+                  END IF
+                ELSE
+                  T1 = UMEGT*FAC(JCOL)
+                  FAC(JCOL) = MIN(T1,FACMAX)
+                END IF
+              END IF
+!             TEST FOR POSSIBLE TRUNCATION ERROR.
+              IF (DMAX > UQRT*RMXFDF) THEN
+                T1 = FAC(JCOL)*UEGT
+                FAC(JCOL) = MAX(T1,FACMIN)
+                IWK(8) = IWK(8) + 1
+                IF (KT1 < NID2) THEN
+                  KT1 = KT1 + 1
+                  IWK(KT1) = JCOL
+                END IF
+              END IF
+            ELSE
+              IWK(6) = IWK(6) + 1
+            END IF
+          END IF
+        END DO
+
+!       IF SERIOUS ROUNDOFF ERROR IS SUSPECTED, RECOMPUTE ALL
+!       COLUMNS IN GROUP NUMGRP.
+        IF (IRCMP == 1) THEN
+          IRCMP = 0
+          ITRY = 1
+          GOTO 40
+        END IF
+        ITRY = 0
+      END DO
+      RETURN
+
+    END SUBROUTINE JACSP
+!_______________________________________________________________________
+
+    SUBROUTINE DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,IWA)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A,
+!     THIS SUBROUTINE DETERMINES THE DEGREE SEQUENCE FOR
+!     THE INTERSECTION GRAPH OF THE COLUMNS OF A.
+!     IN GRAPH-THEORY TERMINOLOGY, THE INTERSECTION GRAPH OF
+!     THE COLUMNS OF A IS THE LOOPLESS GRAPH G WITH VERTICES
+!     A(J), J = 1,2,...,N WHERE A(J) IS THE J-TH COLUMN OF A
+!     AND WITH EDGE (A(I),A(J)) IF AND ONLY IF COLUMNS I AND J
+!     HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY DEGR AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH
+!         SPECIFIES THE DEGREE SEQUENCE. THE DEGREE OF THE
+!         J-TH COLUMN OF A IS NDEG(J).
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA(N), JPNTR(N+1), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT DEGR
+! ..
+!     INITIALIZATION BLOCK.
+      NDEG(1:N) = 0
+      IWA(1:N) = 0
+
+!     COMPUTE THE DEGREE SEQUENCE BY DETERMINING THE CONTRIBUTIONS
+!     TO THE DEGREES FROM THE CURRENT (JCOL) COLUMN AND FURTHER
+!     COLUMNS WHICH HAVE NOT YET BEEN CONSIDERED.
+      DO JCOL = 2, N
+        IWA(JCOL) = N
+!       DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!       TO NON-ZEROES IN THE MATRIX.
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+!         FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!         WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+          DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+            IC = INDCOL(IP)
+!           ARRAY IWA MARKS COLUMNS WHICH HAVE CONTRIBUTED TO
+!           THE DEGREE COUNT OF COLUMN JCOL. UPDATE THE DEGREE
+!           COUNTS OF THESE COLUMNS AS WELL AS COLUMN JCOL.
+            IF (IWA(IC) < JCOL) THEN
+              IWA(IC) = JCOL
+              NDEG(IC) = NDEG(IC) + 1
+              NDEG(JCOL) = NDEG(JCOL) + 1
+            END IF
+          END DO
+        END DO
+      END DO
+      RETURN
+
+    END SUBROUTINE DEGR
+!_______________________________________________________________________
+
+    SUBROUTINE IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,MAXCLQ, &
+      IWA1,IWA2,IWA3,IWA4)
+
+!     SUBROUTINE IDO
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES AN INCIDENCE-DEGREE ORDERING OF THE
+!     COLUMNS OF A.
+!     THE INCIDENCE-DEGREE ORDERING IS DEFINED FOR THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE (A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     THE INCIDENCE-DEGREE ORDERING IS DETERMINED RECURSIVELY BY
+!     LETTING LIST(K), K = 1,...,N BE A COLUMN WITH MAXIMAL
+!     INCIDENCE TO THE SUBGRAPH SPANNED BY THE ORDERED COLUMNS.
+!     AMONG ALL THE COLUMNS OF MAXIMAL INCIDENCE, IDO CHOOSES A
+!     COLUMN OF MAXIMAL DEGREE.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,
+!                      MAXCLQ,IWA1,IWA2,IWA3,IWA4)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE DEGREE SEQUENCE. THE DEGREE OF THE J-TH COLUMN
+!         OF A IS NDEG(J).
+!       LIST IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE INCIDENCE-DEGREE ORDERING OF THE COLUMNS OF A. THE J-TH
+!         COLUMN IN THIS ORDER IS LIST(J).
+!       MAXCLQ IS AN INTEGER OUTPUT VARIABLE SET TO THE SIZE
+!         OF THE LARGEST CLIQUE FOUND DURING THE ORDERING.
+!       IWA1,IWA2,IWA3, AND IWA4 ARE INTEGER WORK ARRAYS OF LENGTH N.
+!     SUBPROGRAMS CALLED
+!       MINPACK-SUPPLIED ... NUMSRT
+!       INTRINSIC ... MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: M, MAXCLQ, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(M+1), IWA1(0:N-1), IWA2(N), &
+        IWA3(N), IWA4(N), JPNTR(N+1), LIST(N), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP, MAXINC, MAXLST, NCOMP, NUMINC, NUMLST, &
+        NUMORD, NUMWGT
+! ..
+! .. External Subroutines ..
+!     EXTERNAL NUMSRT
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT IDO
+! ..
+!     SORT THE DEGREE SEQUENCE.
+      CALL NUMSRT(N,N-1,NDEG,-1,IWA4,IWA2,IWA3)
+
+!     INITIALIZATION BLOCK.
+
+!     CREATE A DOUBLY-LINKED LIST TO ACCESS THE INCIDENCES OF THE
+!     COLUMNS. THE POINTERS FOR THE LINKED LIST ARE AS FOLLOWS.
+
+!     EACH UNORDERED COLUMN IC IS IN A LIST (THE INCIDENCE LIST)
+!     OF COLUMNS WITH THE SAME INCIDENCE.
+
+!     IWA1(NUMINC) IS THE FIRST COLUMN IN THE NUMINC LIST
+!     UNLESS IWA1(NUMINC) = 0. IN THIS CASE THERE ARE
+!     NO COLUMNS IN THE NUMINC LIST.
+
+!     IWA2(IC) IS THE COLUMN BEFORE IC IN THE INCIDENCE LIST
+!     UNLESS IWA2(IC) = 0. IN THIS CASE IC IS THE FIRST
+!     COLUMN IN THIS INCIDENCE LIST.
+
+!     IWA3(IC) IS THE COLUMN AFTER IC IN THE INCIDENCE LIST
+!     UNLESS IWA3(IC) = 0. IN THIS CASE IC IS THE LAST
+!     COLUMN IN THIS INCIDENCE LIST.
+
+!     IF IC IS AN UN-ORDERED COLUMN, THEN LIST(IC) IS THE
+!     INCIDENCE OF IC TO THE GRAPH INDUCED BY THE ORDERED
+!     COLUMNS. IF JCOL IS AN ORDERED COLUMN, THEN LIST(JCOL)
+!     IS THE INCIDENCE-DEGREE ORDER OF COLUMN JCOL.
+
+      MAXINC = 0
+      DO JP = N, 1, -1
+        IC = IWA4(JP)
+        IWA1(N-JP) = 0
+        IWA2(IC) = 0
+        IWA3(IC) = IWA1(0)
+        IF (IWA1(0) > 0) IWA2(IWA1(0)) = IC
+        IWA1(0) = IC
+        IWA4(JP) = 0
+        LIST(JP) = 0
+      END DO
+
+!     DETERMINE THE MAXIMAL SEARCH LENGTH FOR THE LIST
+!     OF COLUMNS OF MAXIMAL INCIDENCE.
+      MAXLST = 0
+      DO IR = 1, M
+        MAXLST = MAXLST + (IPNTR(IR+1)-IPNTR(IR))**2
+      END DO
+      MAXLST = MAXLST/N
+      MAXCLQ = 0
+      NUMORD = 1
+
+!     BEGINNING OF ITERATION LOOP.
+
+30    CONTINUE
+
+!     UPDATE THE SIZE OF THE LARGEST CLIQUE
+!     FOUND DURING THE ORDERING.
+      IF (MAXINC == 0) NCOMP = 0
+      NCOMP = NCOMP + 1
+      IF (MAXINC+1 == NCOMP) MAXCLQ = MAX(MAXCLQ,NCOMP)
+
+!     CHOOSE A COLUMN JCOL OF MAXIMAL DEGREE AMONG THE
+!     COLUMNS OF MAXIMAL INCIDENCE MAXINC.
+40    CONTINUE
+      JP = IWA1(MAXINC)
+      IF (JP > 0) GOTO 50
+      MAXINC = MAXINC - 1
+      GOTO 40
+50    CONTINUE
+      NUMWGT = -1
+      DO NUMLST = 1, MAXLST
+        IF (NDEG(JP) > NUMWGT) THEN
+          NUMWGT = NDEG(JP)
+          JCOL = JP
+        END IF
+        JP = IWA3(JP)
+        IF (JP <= 0) GOTO 70
+      END DO
+70    CONTINUE
+      LIST(JCOL) = NUMORD
+      NUMORD = NUMORD + 1
+
+!     TERMINATION TEST.
+      IF (NUMORD > N) GOTO 100
+
+!     DELETE COLUMN JCOL FROM THE MAXINC LIST.
+      IF (IWA2(JCOL) == 0) THEN
+        IWA1(MAXINC) = IWA3(JCOL)
+      ELSE
+        IWA3(IWA2(JCOL)) = IWA3(JCOL)
+      END IF
+      IF (IWA3(JCOL) > 0) IWA2(IWA3(JCOL)) = IWA2(JCOL)
+
+!     FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+      IWA4(JCOL) = N
+
+!     DETERMINE ALL POSITIONS(IR,JCOL) WHICH CORRESPOND
+!     TO NON-ZEROES IN THE MATRIX.
+      DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+        IR = INDROW(JP)
+!       FOR EACH ROW IR, DETERMINE ALL POSITIONS(IR,IC)
+!       WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+        DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+          IC = INDCOL(IP)
+!         ARRAY IWA4 MARKS COLUMNS WHICH ARE ADJACENT TO
+!         COLUMN JCOL.
+          IF (IWA4(IC) < NUMORD) THEN
+            IWA4(IC) = NUMORD
+!           UPDATE THE POINTERS TO THE CURRENT INCIDENCE LISTS.
+            NUMINC = LIST(IC)
+            LIST(IC) = LIST(IC) + 1
+            MAXINC = MAX(MAXINC,LIST(IC))
+!           DELETE COLUMN IC FROM THE NUMINC LIST.
+            IF (IWA2(IC) == 0) THEN
+              IWA1(NUMINC) = IWA3(IC)
+            ELSE
+              IWA3(IWA2(IC)) = IWA3(IC)
+            END IF
+            IF (IWA3(IC) > 0) IWA2(IWA3(IC)) = IWA2(IC)
+!           ADD COLUMN IC TO THE NUMINC+1 LIST.
+            IWA2(IC) = 0
+            IWA3(IC) = IWA1(NUMINC+1)
+            IF (IWA1(NUMINC+1) > 0) IWA2(IWA1(NUMINC+1)) = IC
+            IWA1(NUMINC+1) = IC
+          END IF
+        END DO
+      END DO
+!     END OF ITERATION LOOP.
+      GOTO 30
+100   CONTINUE
+!     INVERT THE ARRAY LIST.
+      DO JCOL = 1, N
+        IWA2(LIST(JCOL)) = JCOL
+      END DO
+      LIST(1:N) = IWA2(1:N)
+      RETURN
+
+    END SUBROUTINE IDO
+!_______________________________________________________________________
+
+    SUBROUTINE NUMSRT(N,NMAX,NUM,MODE,INDEX,LAST,NEXT)
+
+!     GIVEN A SEQUENCE OF INTEGERS, THIS SUBROUTINE GROUPS TOGETHER THOSE
+!     INDICES WITH THE SAME SEQUENCE VALUE AND, OPTIONALLY, SORTS THE
+!     SEQUENCE INTO EITHER ASCENDING OR DESCENDING ORDER. THE SEQUENCE
+!     OF INTEGERS IS DEFINED BY THE ARRAY NUM, AND IT IS ASSUMED THAT THE
+!     INTEGERS ARE EACH FROM THE SET 0,1,...,NMAX. ON OUTPUT THE INDICES
+!     K SUCH THAT NUM(K) = L FOR ANY L = 0,1,...,NMAX CAN BE OBTAINED
+!     FROM THE ARRAYS LAST AND NEXT AS FOLLOWS.
+!           K = LAST(L)
+!           WHILE(K /= 0) K = NEXT(K)
+!     OPTIONALLY, THE SUBROUTINE PRODUCES AN ARRAY INDEX SO THAT
+!     THE SEQUENCE NUM(INDEX(I)), I = 1,2,...,N IS SORTED.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE NUMSRT(N,NMAX,NUM,MODE,INDEX,LAST,NEXT)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE.
+!       NMAX IS A POSITIVE INTEGER INPUT VARIABLE.
+!       NUM IS AN INPUT ARRAY OF LENGTH N WHICH CONTAINS THE
+!         SEQUENCE OF INTEGERS TO BE GROUPED AND SORTED. IT
+!         IS ASSUMED THAT THE INTEGERS ARE EACH FROM THE SET
+!         0,1,...,NMAX.
+!       MODE IS AN INTEGER INPUT VARIABLE. THE SEQUENCE NUM IS
+!         SORTED IN ASCENDING ORDER IF MODE IS POSITIVE AND IN
+!         DESCENDING ORDER IF MODE IS NEGATIVE. IF MODE IS 0,
+!         NO SORTING IS DONE.
+!       INDEX IS AN INTEGER OUTPUT ARRAY OF LENGTH N SET SO
+!         THAT THE SEQUENCE
+!               NUM(INDEX(I)), I = 1,2,...,N
+!         IS SORTED ACCORDING TO THE SETTING OF MODE. IF MODE
+!         IS 0, INDEX IS NOT REFERENCED.
+!       LAST IS AN INTEGER OUTPUT ARRAY OF LENGTH NMAX + 1. THE
+!         INDEX OF NUM FOR THE LAST OCCURRENCE OF L IS LAST(L)
+!         FOR ANY L = 0,1,...,NMAX UNLESS LAST(L) = 0. IN
+!         THIS CASE L DOES NOT APPEAR IN NUM.
+!       NEXT IS AN INTEGER OUTPUT ARRAY OF LENGTH N. IF
+!         NUM(K) = L, THEN THE INDEX OF NUM FOR THE PREVIOUS
+!         OCCURRENCE OF L IS NEXT(K) FOR ANY L = 0,1,...,NMAX
+!         UNLESS NEXT(K) = 0. IN THIS CASE THERE IS NO PREVIOUS
+!         OCCURRENCE OF L IN NUM.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+      IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MODE, N, NMAX
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDEX(N), LAST(0:NMAX), NEXT(N), NUM(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, J, JINC, JL, JU, K, L
+! ..
+! ..  FIRST EXECUTABLE STATEMENT NUMSRT
+! ..
+!     DETERMINE THE ARRAYS NEXT AND LAST.
+      LAST(0:NMAX) = 0
+      DO K = 1, N
+        L = NUM(K)
+        NEXT(K) = LAST(L)
+        LAST(L) = K
+      END DO
+      IF (MODE == 0) RETURN
+
+!     STORE THE POINTERS TO THE SORTED ARRAY IN INDEX.
+      I = 1
+      IF (MODE > 0) THEN
+        JL = 0
+        JU = NMAX
+        JINC = 1
+      ELSE
+        JL = NMAX
+        JU = 0
+        JINC = -1
+      END IF
+      DO J = JL, JU, JINC
+        K = LAST(J)
+30      CONTINUE
+        IF (K == 0) GOTO 40
+        INDEX(I) = K
+        I = I + 1
+        K = NEXT(K)
+        GOTO 30
+40      CONTINUE
+      END DO
+      RETURN
+
+    END SUBROUTINE NUMSRT
+!_______________________________________________________________________
+
+    SUBROUTINE SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,LIST,NGRP,MAXGRP,IWA)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES A CONSISTENT PARTITION OF THE
+!     COLUMNS OF A BY A SEQUENTIAL ALGORITHM.
+!     A CONSISTENT PARTITION IS DEFINED IN TERMS OF THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE(A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     A PARTITION OF THE COLUMNS OF A INTO GROUPS IS CONSISTENT
+!     IF THE COLUMNS IN ANY GROUP ARE NOT ADJACENT IN THE GRAPH G.
+!     IN GRAPH-THEORY TERMINOLOGY, A CONSISTENT PARTITION OF THE
+!     COLUMNS OF A CORRESPONDS TO A COLORING OF THE GRAPH G.
+!     THE SUBROUTINE EXAMINES THE COLUMNS IN THE ORDER SPECIFIED
+!     BY THE ARRAY LIST, AND ASSIGNS THE CURRENT COLUMN TO THE
+!     GROUP WITH THE SMALLEST POSSIBLE NUMBER.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SEQ AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!     SUBROUTINE SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,LIST,NGRP,MAXGRP,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       LIST IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE ORDER TO BE USED BY THE SEQUENTIAL ALGORITHM.
+!         THE J-TH COLUMN IN THIS ORDER IS LIST(J).
+!       NGRP IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF A. COLUMN JCOL BELONGS
+!         TO GROUP NGRP(JCOL).
+!       MAXGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES THE
+!         NUMBER OF GROUPS IN THE PARTITION OF THE COLUMNS OF A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MAXGRP, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA(N), JPNTR(N+1), &
+        LIST(N), NGRP(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, J, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SEQ
+! ..
+!     INITIALIZATION BLOCK.
+      MAXGRP = 0
+      NGRP(1:N) = N
+      IWA(1:N) = 0
+
+!     BEGINNING OF ITERATION LOOP.
+
+      DO J = 1, N
+        JCOL = LIST(J)
+!       FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+!       DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!       TO NON-ZEROES IN THE MATRIX.
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+!         FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!         WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+          DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+            IC = INDCOL(IP)
+!           ARRAY IWA MARKS THE GROUP NUMBERS OF THE
+!           COLUMNS WHICH ARE ADJACENT TO COLUMN JCOL.
+            IWA(NGRP(IC)) = J
+          END DO
+        END DO
+!       ASSIGN THE SMALLEST UN-MARKED GROUP NUMBER TO JCOL.
+        DO JP = 1, MAXGRP
+          IF (IWA(JP)/=J) GOTO 50
+        END DO
+        MAXGRP = MAXGRP + 1
+50      CONTINUE
+        NGRP(JCOL) = JP
+      END DO
+
+!     END OF ITERATION LOOP.
+
+      RETURN
+
+    END SUBROUTINE SEQ
+!_______________________________________________________________________
+
+    SUBROUTINE SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+
+!     GIVEN A COLUMN-ORIENTED DEFINITION OF THE SPARSITY PATTERN
+!     OF AN M BY N MATRIX A, THIS SUBROUTINE DETERMINES A
+!     ROW-ORIENTED DEFINITION OF THE SPARSITY PATTERN OF A.
+!     ON INPUT THE COLUMN-ORIENTED DEFINITION IS SPECIFIED BY
+!     THE ARRAYS INDROW AND JPNTR. ON OUTPUT THE ROW-ORIENTED
+!     DEFINITION IS SPECIFIED BY THE ARRAYS INDCOL AND IPNTR.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER OUTPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(1) IS SET TO 1 AND THAT IPNTR(M+1)-1 IS
+!         THEN THE NUMBER OF NON-ZERO ELEMENTS OF THE MATRIX A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH M.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: M, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(M+1), IWA(M), JPNTR(N+1)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IR, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SETR
+! ..
+!     STORE IN ARRAY IWA THE COUNTS OF NON-ZEROES IN THE ROWS.
+      IWA(1:M) = 0
+      DO JP = 1, JPNTR(N+1) - 1
+        IWA(INDROW(JP)) = IWA(INDROW(JP)) + 1
+      END DO
+
+!     SET POINTERS TO THE START OF THE ROWS IN INDCOL.
+      IPNTR(1) = 1
+      DO IR = 1, M
+        IPNTR(IR+1) = IPNTR(IR) + IWA(IR)
+        IWA(IR) = IPNTR(IR)
+      END DO
+
+!     FILL INDCOL.
+      DO JCOL = 1, N
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+          INDCOL(IWA(IR)) = JCOL
+          IWA(IR) = IWA(IR) + 1
+        END DO
+      END DO
+      RETURN
+
+    END SUBROUTINE SETR
+!_______________________________________________________________________
+
+    SUBROUTINE SLO(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,MAXCLQ,IWA1,IWA2, &
+        IWA3,IWA4)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES THE SMALLEST-LAST ORDERING OF THE
+!     COLUMNS OF A.
+!     THE SMALLEST-LAST ORDERING IS DEFINED FOR THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE(A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     THE SMALLEST-LAST ORDERING IS DETERMINED RECURSIVELY BY
+!     LETTING LIST(K), K = N,...,1 BE A COLUMN WITH LEAST DEGREE
+!     IN THE SUBGRAPH SPANNED BY THE UN-ORDERED COLUMNS.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SLO AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!     SUBROUTINE SLO(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST, &
+!                    MAXCLQ,IWA1,IWA2,IWA3,IWA4)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE DEGREE SEQUENCE. THE DEGREE OF THE J-TH COLUMN
+!         OF A IS NDEG(J).
+!       LIST IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE SMALLEST-LAST ORDERING OF THE COLUMNS OF A. THE J-TH
+!         COLUMN IN THIS ORDER IS LIST(J).
+!       MAXCLQ IS AN INTEGER OUTPUT VARIABLE SET TO THE SIZE
+!         OF THE LARGEST CLIQUE FOUND DURING THE ORDERING.
+!       IWA1,IWA2,IWA3, AND IWA4 ARE INTEGER WORK ARRAYS OF LENGTH N.
+!     SUBPROGRAMS CALLED
+!       INTRINSIC ... MIN
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MAXCLQ, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA1(0:N-1), IWA2(N), &
+        IWA3(N), IWA4(N), JPNTR(N+1), LIST(N), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP, MINDEG, NUMDEG, NUMORD
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MIN
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SLO
+! ..
+!     INITIALIZATION BLOCK.
+      MINDEG = N
+      DO JP = 1, N
+        IWA1(JP-1) = 0
+        IWA4(JP) = N
+        LIST(JP) = NDEG(JP)
+        MINDEG = MIN(MINDEG,NDEG(JP))
+      END DO
+
+!     CREATE A DOUBLY-LINKED LIST TO ACCESS THE DEGREES OF THE
+!     COLUMNS. THE POINTERS FOR THE LINKED LIST ARE AS FOLLOWS.
+
+!     EACH UN-ORDERED COLUMN IC IS IN A LIST (THE DEGREE LIST)
+!     OF COLUMNS WITH THE SAME DEGREE.
+
+!     IWA1(NUMDEG) IS THE FIRST COLUMN IN THE NUMDEG LIST
+!     UNLESS IWA1(NUMDEG) = 0. IN THIS CASE THERE ARE
+!     NO COLUMNS IN THE NUMDEG LIST.
+
+!     IWA2(IC) IS THE COLUMN BEFORE IC IN THE DEGREE LIST
+!     UNLESS IWA2(IC) = 0. IN THIS CASE IC IS THE FIRST
+!     COLUMN IN THIS DEGREE LIST.
+
+!     IWA3(IC) IS THE COLUMN AFTER IC IN THE DEGREE LIST
+!     UNLESS IWA3(IC) = 0. IN THIS CASE IC IS THE LAST
+!     COLUMN IN THIS DEGREE LIST.
+
+!     IF IC IS AN UN-ORDERED COLUMN, THEN LIST(IC) IS THE
+!     DEGREE OF IC IN THE GRAPH INDUCED BY THE UN-ORDERED
+!     COLUMNS. IF JCOL IS AN ORDERED COLUMN, THEN LIST(JCOL)
+!     IS THE SMALLEST-LAST ORDER OF COLUMN JCOL.
+
+      DO JP = 1, N
+        NUMDEG = NDEG(JP)
+        IWA2(JP) = 0
+        IWA3(JP) = IWA1(NUMDEG)
+        IF (IWA1(NUMDEG) > 0) IWA2(IWA1(NUMDEG)) = JP
+        IWA1(NUMDEG) = JP
+      END DO
+      MAXCLQ = 0
+      NUMORD = N
+
+!     BEGINNING OF ITERATION LOOP.
+
+30    CONTINUE
+
+!     MARK THE SIZE OF THE LARGEST CLIQUE
+!     FOUND DURING THE ORDERING.
+      IF (MINDEG+1 == NUMORD .AND. MAXCLQ == 0) MAXCLQ = NUMORD
+
+!     CHOOSE A COLUMN JCOL OF MINIMAL DEGREE MINDEG.
+40    CONTINUE
+      JCOL = IWA1(MINDEG)
+      IF (JCOL > 0) GOTO 50
+      MINDEG = MINDEG + 1
+      GOTO 40
+50    CONTINUE
+      LIST(JCOL) = NUMORD
+      NUMORD = NUMORD - 1
+
+!     TERMINATION TEST.
+      IF (NUMORD == 0) GOTO 80
+
+!     DELETE COLUMN JCOL FROM THE MINDEG LIST.
+      IWA1(MINDEG) = IWA3(JCOL)
+      IF (IWA3(JCOL) > 0) IWA2(IWA3(JCOL)) = 0
+
+!     FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+      IWA4(JCOL) = 0
+
+!     DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!     TO NON-ZEROES IN THE MATRIX.
+      DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+        IR = INDROW(JP)
+!       FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!       WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+        DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+          IC = INDCOL(IP)
+!         ARRAY IWA4 MARKS COLUMNS WHICH ARE ADJACENT TO
+!         COLUMN JCOL.
+
+          IF (IWA4(IC) > NUMORD) THEN
+            IWA4(IC) = NUMORD
+!           UPDATE THE POINTERS TO THE CURRENT DEGREE LISTS.
+            NUMDEG = LIST(IC)
+            LIST(IC) = LIST(IC) - 1
+            MINDEG = MIN(MINDEG,LIST(IC))
+!           DELETE COLUMN IC FROM THE NUMDEG LIST.
+            IF (IWA2(IC) == 0) THEN
+              IWA1(NUMDEG) = IWA3(IC)
+            ELSE
+              IWA3(IWA2(IC)) = IWA3(IC)
+            END IF
+            IF (IWA3(IC) > 0) IWA2(IWA3(IC)) = IWA2(IC)
+!           ADD COLUMN IC TO THE NUMDEG-1 LIST.
+            IWA2(IC) = 0
+            IWA3(IC) = IWA1(NUMDEG-1)
+            IF (IWA1(NUMDEG-1) > 0) IWA2(IWA1(NUMDEG-1)) = IC
+            IWA1(NUMDEG-1) = IC
+          END IF
+        END DO
+      END DO
+!     END OF ITERATION LOOP.
+
+      GOTO 30
+80    CONTINUE
+
+!     INVERT THE ARRAY LIST.
+      DO JCOL = 1, N
+        IWA2(LIST(JCOL)) = JCOL
+      END DO
+      LIST(1:N) = IWA2(1:N)
+      RETURN
+
+    END SUBROUTINE SLO
+!_______________________________________________________________________
+
+    SUBROUTINE SRTDAT(N,NNZ,INDROW,INDCOL,JPNTR,IWA)
+
+!     GIVEN THE NON-ZERO ELEMENTS OF AN M BY N MATRIX A IN ARBITRARY
+!     ORDER AS SPECIFIED BY THEIR ROW AND COLUMN INDICES, THIS SUBROUTINE
+!     PERMUTES THESE ELEMENTS SO THAT THEIR COLUMN INDICES ARE IN
+!     NON-DECREASING ORDER. ON INPUT IT IS ASSUMED THAT THE ELEMENTS ARE
+!     SPECIFIED IN
+!           INDROW(K),INDCOL(K), K = 1,...,NNZ.
+!     ON OUTPUT THE ELEMENTS ARE PERMUTED SO THAT INDCOL IS IN
+!     NON-DECREASING ORDER. IN ADDITION, THE ARRAY JPNTR IS SET SO THAT
+!     THE ROW INDICES FOR COLUMN J ARE
+!           INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SRTDAT AND IS THEREFORE
+!     NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE SRTDAT(N,NNZ,INDROW,INDCOL,JPNTR,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       NNZ IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF NON-ZERO ELEMENTS OF A.
+!       INDROW IS AN INTEGER ARRAY OF LENGTH NNZ. ON INPUT INDROW
+!         MUST CONTAIN THE ROW INDICES OF THE NON-ZERO ELEMENTS OF A.
+!         ON OUTPUT INDROW IS PERMUTED SO THAT THE CORRESPONDING
+!         COLUMN INDICES OF INDCOL ARE IN NON-DECREASING ORDER.
+!       INDCOL IS AN INTEGER ARRAY OF LENGTH NNZ. ON INPUT INDCOL
+!         MUST CONTAIN THE COLUMN INDICES OF THE NON-ZERO ELEMENTS
+!         OF A. ON OUTPUT INDCOL IS PERMUTED SO THAT THESE INDICES
+!         ARE IN NON-DECREASING ORDER.
+!       JPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN THE OUTPUT
+!         INDROW. THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(1) IS SET TO 1 AND THAT JPNTR(N+1)-1
+!         IS THEN NNZ.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     SUBPROGRAMS CALLED - NONE
+!     INTRINSIC - MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: N, NNZ
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(NNZ), INDROW(NNZ), IWA(N), JPNTR(N+1)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, J, K, L
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SRTDAT
+! ..
+!     STORE IN ARRAY IWA THE COUNTS OF NON-ZEROES IN THE COLUMNS.
+      IWA(1:N) = 0
+      DO K = 1, NNZ
+        IWA(INDCOL(K)) = IWA(INDCOL(K)) + 1
+      END DO
+
+!     SET POINTERS TO THE START OF THE COLUMNS IN INDROW.
+      JPNTR(1) = 1
+      DO J = 1, N
+        JPNTR(J+1) = JPNTR(J) + IWA(J)
+        IWA(J) = JPNTR(J)
+      END DO
+      K = 1
+
+!     BEGIN IN-PLACE SORT.
+40    CONTINUE
+      J = INDCOL(K)
+      IF (K >= JPNTR(J)) THEN
+!        CURRENT ELEMENT IS IN POSITION. NOW EXAMINE THE
+!        NEXT ELEMENT OR THE FIRST UN-SORTED ELEMENT IN
+!        THE J-TH GROUP.
+        K = MAX(K+1,IWA(J))
+      ELSE
+!       CURRENT ELEMENT IS NOT IN POSITION. PLACE ELEMENT
+!       IN POSITION AND MAKE THE DISPLACED ELEMENT THE
+!       CURRENT ELEMENT.
+        L = IWA(J)
+        IWA(J) = IWA(J) + 1
+        I = INDROW(K)
+        INDROW(K) = INDROW(L)
+        INDCOL(K) = INDCOL(L)
+        INDROW(L) = I
+        INDCOL(L) = J
+      END IF
+      IF (K <= NNZ) GOTO 40
+      RETURN
+
+    END SUBROUTINE SRTDAT
+!_______________________________________________________________________
+
+    SUBROUTINE FDJS(M,N,COL,IND,NPNTR,NGRP,NUMGRP,D,FJACD,FJAC)
+
+!     GIVEN A CONSISTENT PARTITION OF THE COLUMNS OF AN M BY N
+!     JACOBIAN MATRIX INTO GROUPS, THIS SUBROUTINE COMPUTES
+!     APPROXIMATIONS TO THOSE COLUMNS IN A GIVEN GROUP. THE
+!     APPROXIMATIONS ARE STORED INTO EITHER A COLUMN-ORIENTED
+!     OR A ROW-ORIENTED PATTERN.
+!     A PARTITION IS CONSISTENT IF THE COLUMNS IN ANY GROUP
+!     DO NOT HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     APPROXIMATIONS TO THE COLUMNS OF THE JACOBIAN MATRIX IN A
+!     GIVEN GROUP CAN BE OBTAINED BY SPECIFYING A DIFFERENCE
+!     PARAMETER ARRAY D WITH D(JCOL) NON-ZERO IF AND ONLY IF
+!     JCOL IS A COLUMN IN THE GROUP, AND AN APPROXIMATION TO
+!     JAC*D WHERE JAC DENOTES THE JACOBIAN MATRIX OF A MAPPING F.
+!     D CAN BE DEFINED WITH THE FOLLOWING SEGMENT OF CODE.
+!           DO 10 JCOL = 1, N
+!             D(JCOL) = 0.0
+!             IF (NGRP(JCOL) == NUMGRP) D(JCOL) = ETA(JCOL)
+!        10 CONTINUE
+!     IN THE ABOVE CODE NUMGRP IS THE GIVEN GROUP NUMBER,
+!     NGRP(JCOL) IS THE GROUP NUMBER OF COLUMN JCOL, AND
+!     ETA(JCOL) IS THE DIFFERENCE PARAMETER USED TO
+!     APPROXIMATE COLUMN JCOL OF THE JACOBIAN MATRIX.
+!     SUITABLE VALUES FOR THE ARRAY ETA MUST BE PROVIDED.
+!     AS MENTIONED ABOVE, AN APPROXIMATION TO JAC*D MUST
+!     ALSO BE PROVIDED. FOR EXAMPLE, THE APPROXIMATION
+!           F(X+D) - F(X)
+!     CORRESPONDS TO THE FORWARD DIFFERENCE FORMULA AT X.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE FDJS(M,N,COL,IND,NPNTR,NGRP,NUMGRP,D,FJACD,FJAC)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF THE JACOBIAN MATRIX.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF THE JACOBIAN MATRIX.
+!       COL IS A LOGICAL INPUT VARIABLE. IF COL IS SET TRUE, THEN THE
+!         JACOBIAN APPROXIMATIONS ARE STORED INTO A COLUMN-ORIENTED
+!         PATTERN. IF COL IS SET FALSE, THEN THE JACOBIAN
+!         APPROXIMATIONS ARE STORED INTO A ROW-ORIENTED PATTERN.
+!       IND IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE JACOBIAN MATRIX
+!         IF COL IS TRUE, AND CONTAINS THE COLUMN INDICES FOR
+!         THE NON-ZEROES IN THE JACOBIAN MATRIX IF COL IS FALSE.
+!       NPNTR IS AN INTEGER INPUT ARRAY WHICH SPECIFIES THE
+!         LOCATIONS OF THE ROW INDICES IN IND IF COL IS TRUE, AND
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN IND IF
+!         COL IS FALSE. IF COL IS TRUE, THE INDICES FOR COLUMN J ARE
+!               IND(K), K = NPNTR(J),...,NPNTR(J+1)-1.
+!         IF COL IS FALSE, THE INDICES FOR ROW I ARE
+!               IND(K), K = NPNTR(I),...,NPNTR(I+1)-1.
+!         NOTE THAT NPNTR(N+1)-1 IF COL IS TRUE, OR NPNTR(M+1)-1
+!         IF COL IS FALSE, IS THEN THE NUMBER OF NON-ZERO ELEMENTS
+!         OF THE JACOBIAN MATRIX.
+!       NGRP IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF THE JACOBIAN MATRIX.
+!         COLUMN JCOL BELONGS TO GROUP NGRP(JCOL).
+!       NUMGRP IS A POSITIVE INTEGER INPUT VARIABLE SET TO A GROUP
+!         NUMBER IN THE PARTITION. THE COLUMNS OF THE JACOBIAN
+!         MATRIX IN THIS GROUP ARE TO BE ESTIMATED ON THIS CALL.
+!       D IS AN INPUT ARRAY OF LENGTH N WHICH CONTAINS THE
+!         DIFFERENCE PARAMETER VECTOR FOR THE ESTIMATE OF
+!         THE JACOBIAN MATRIX COLUMNS IN GROUP NUMGRP.
+!       FJACD IS AN INPUT ARRAY OF LENGTH M WHICH CONTAINS
+!         AN APPROXIMATION TO THE DIFFERENCE VECTOR JAC*D,
+!         WHERE JAC DENOTES THE JACOBIAN MATRIX.
+!       FJAC IS AN OUTPUT ARRAY OF LENGTH NNZ, WHERE NNZ IS THE
+!         NUMBER OF ITS NON-ZERO ELEMENTS. AT EACH CALL OF FDJS,
+!         FJAC IS UPDATED TO INCLUDE THE NON-ZERO ELEMENTS OF THE
+!         JACOBIAN MATRIX FOR THOSE COLUMNS IN GROUP NUMGRP. FJAC
+!         SHOULD NOT BE ALTERED BETWEEN SUCCESSIVE CALLS TO FDJS.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      INTEGER :: M, N, NUMGRP
+      LOGICAL :: COL
+! ..
+! .. Array Arguments ..
+      KPP_REAL :: D(N), FJAC(*), FJACD(M)
+      INTEGER :: IND(*), NGRP(N), NPNTR(*)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IP, IROW, JCOL, JP
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC KIND
+! ..
+! ..  FIRST EXECUTABLE STATEMENT FDJS
+! ..
+!     COMPUTE ESTIMATES OF JACOBIAN MATRIX COLUMNS IN GROUP
+!     NUMGRP. THE ARRAY FJACD MUST CONTAIN AN APPROXIMATION
+!     TO JAC*D, WHERE JAC DENOTES THE JACOBIAN MATRIX AND D
+!     IS A DIFFERENCE PARAMETER VECTOR WITH D(JCOL) NON-ZERO
+!     IF AND ONLY IF JCOL IS A COLUMN IN GROUP NUMGRP.
+      IF (COL) THEN
+!       COLUMN ORIENTATION.
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            DO JP = NPNTR(JCOL), NPNTR(JCOL+1) - 1
+              IROW = IND(JP)
+              FJAC(JP) = FJACD(IROW)/D(JCOL)
+            END DO
+          END IF
+        END DO
+      ELSE
+!       ROW ORIENTATION.
+        DO IROW = 1, M
+          DO IP = NPNTR(IROW), NPNTR(IROW+1) - 1
+            JCOL = IND(IP)
+            IF (NGRP(JCOL) == NUMGRP) THEN
+              FJAC(IP) = FJACD(IROW)/D(JCOL)
+              GOTO 40
+            END IF
+          END DO
+40        CONTINUE
+        END DO
+      END IF
+      RETURN
+
+    END SUBROUTINE FDJS
+!_______________________________________________________________________
+
+    SUBROUTINE DVDSM(M,N,NPAIRS,INDROW,INDCOL,NGRP,MAXGRP,MINGRP,INFO, &
+        IPNTR, JPNTR,IWA,LIWA)
+
+!     THE PURPOSE OF DSM IS TO DETERMINE AN OPTIMAL OR NEAR-
+!     OPTIMAL CONSISTENT PARTITION OF THE COLUMNS OF A SPARSE
+!     M BY N MATRIX A.
+!     THE SPARSITY PATTERN OF THE MATRIX A IS SPECIFIED BY
+!     THE ARRAYS INDROW AND INDCOL. ON INPUT THE INDICES
+!     FOR THE NON-ZERO ELEMENTS OF A ARE
+!           INDROW(K),INDCOL(K), K = 1,2,...,NPAIRS.
+!     THE(INDROW,INDCOL) PAIRS MAY BE SPECIFIED IN ANY ORDER.
+!     DUPLICATE INPUT PAIRS ARE PERMITTED, BUT THE SUBROUTINE
+!     ELIMINATES THEM.
+!     THE SUBROUTINE PARTITIONS THE COLUMNS OF A INTO GROUPS
+!     SUCH THAT COLUMNS IN THE SAME GROUP DO NOT HAVE A
+!     NON-ZERO IN THE SAME ROW POSITION. A PARTITION OF THE
+!     COLUMNS OF A WITH THIS PROPERTY IS CONSISTENT WITH THE
+!     DIRECT DETERMINATION OF A.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE DVDSM(M,N,NPAIRS,INDROW,INDCOL,NGRP,MAXGRP,MINGRP,
+!                      INFO,IPNTR,JPNTR,IWA,LIWA)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       NPAIRS IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE
+!         NUMBER OF (INDROW,INDCOL) PAIRS USED TO DESCRIBE THE
+!         SPARSITY PATTERN OF A.
+!       INDROW IS AN INTEGER ARRAY OF LENGTH NPAIRS. ON INPUT INDROW
+!         MUST CONTAIN THE ROW INDICES OF THE NON-ZERO ELEMENTS OF A.
+!         ON OUTPUT INDROW IS PERMUTED SO THAT THE CORRESPONDING
+!         COLUMN INDICES ARE IN NON-DECREASING ORDER. THE COLUMN
+!         INDICES CAN BE RECOVERED FROM THE ARRAY JPNTR.
+!       INDCOL IS AN INTEGER ARRAY OF LENGTH NPAIRS. ON INPUT INDCOL
+!         MUST CONTAIN THE COLUMN INDICES OF THE NON-ZERO ELEMENTS OF
+!         A. ON OUTPUT INDCOL IS PERMUTED SO THAT THE CORRESPONDING
+!         ROW INDICES ARE IN NON-DECREASING ORDER. THE ROW INDICES
+!         CAN BE RECOVERED FROM THE ARRAY IPNTR.
+!       NGRP IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF A. COLUMN JCOL BELONGS
+!         TO GROUP NGRP(JCOL).
+!       MAXGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES THE
+!         NUMBER OF GROUPS IN THE PARTITION OF THE COLUMNS OF A.
+!       MINGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES A LOWER
+!         BOUND FOR THE NUMBER OF GROUPS IN ANY CONSISTENT PARTITION
+!         OF THE COLUMNS OF A.
+!       INFO IS AN INTEGER OUTPUT VARIABLE SET AS FOLLOWS. FOR
+!         NORMAL TERMINATION INFO = 1. IF M, N, OR NPAIRS IS NOT
+!         POSITIVE OR LIWA IS LESS THAN MAX(M,6*N), THEN INFO = 0.
+!         IF THE K-TH ELEMENT OF INDROW IS NOT AN INTEGER BETWEEN
+!         1 AND M OR THE K-TH ELEMENT OF INDCOL IS NOT AN INTEGER
+!         BETWEEN 1 AND N, THEN INFO = -K.
+!       IPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       JPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH LIWA.
+!       LIWA IS A POSITIVE INTEGER INPUT VARIABLE NOT LESS THAN
+!         MAX(M,6*N).
+!       MINPACK-SUPPLIED ... DEGR,IDO,NUMSRT,SEQ,SETR,SLO,SRTDAT
+!       INTRINSIC - MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: INFO, LIWA, M, MAXGRP, MINGRP, N, NPAIRS
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(NPAIRS), INDROW(NPAIRS), IPNTR(M+1), IWA(LIWA), &
+        JPNTR(N+1), NGRP(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, IR, J, JP, K, MAXCLQ, NNZ, NUMGRP
+! ..
+! .. External Subroutines ..
+!     EXTERNAL DEGR, IDO, NUMSRT, SEQ, SETR, SLO, SRTDAT
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT DSM
+! ..
+!     CHECK THE INPUT DATA.
+      INFO = 0
+      IF (M<1 .OR. N<1 .OR. NPAIRS<1 .OR. LIWA<MAX(M,6*N)) RETURN
+      DO K = 1, NPAIRS
+        INFO = -K
+        IF (INDROW(K)<1 .OR. INDROW(K)>M .OR. INDCOL(K)<1 .OR. INDCOL(K)>N) &
+          RETURN
+      END DO
+      INFO = 1
+
+!     SORT THE DATA STRUCTURE BY COLUMNS.
+      CALL SRTDAT(N,NPAIRS,INDROW,INDCOL,JPNTR,IWA)
+
+!     COMPRESS THE DATA AND DETERMINE THE NUMBER OF
+!     NON-ZERO ELEMENTS OF A.
+      IWA(1:M) =  0
+      NNZ = 1
+      DO J = 1, N
+        K = NNZ
+        DO JP = JPNTR(J), JPNTR(J+1) - 1
+          IR = INDROW(JP)
+          IF (IWA(IR)/=J) THEN
+            INDROW(NNZ) = IR
+            NNZ = NNZ + 1
+            IWA(IR) = J
+          END IF
+        END DO
+        JPNTR(J) = K
+      END DO
+      JPNTR(N+1) = NNZ
+
+!     EXTEND THE DATA STRUCTURE TO ROWS.
+      CALL SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+
+!     DETERMINE A LOWER BOUND FOR THE NUMBER OF GROUPS.
+      MINGRP = 0
+      DO I = 1, M
+        MINGRP = MAX(MINGRP,IPNTR(I+1)-IPNTR(I))
+      END DO
+
+!     DETERMINE THE DEGREE SEQUENCE FOR THE INTERSECTION
+!     GRAPH OF THE COLUMNS OF A.
+      CALL DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(N+1))
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE SMALLEST-LAST (SL) ORDERING.
+      CALL SLO(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(4*N+1),MAXCLQ, &
+        IWA(1),IWA(N+1),IWA(2*N+1),IWA(3*N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),NGRP,MAXGRP,IWA(N+1))
+      MINGRP = MAX(MINGRP,MAXCLQ)
+
+!     EXIT IF THE SMALLEST-LAST ORDERING IS OPTIMAL.
+
+      IF (MAXGRP == MINGRP) RETURN
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE INCIDENCE-DEGREE(ID) ORDERING.
+      CALL IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(4*N+1),MAXCLQ, &
+        IWA(1),IWA(N+1),IWA(2*N+1),IWA(3*N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),IWA(1),NUMGRP,IWA(N+1))
+      MINGRP = MAX(MINGRP,MAXCLQ)
+
+!     RETAIN THE BETTER OF THE TWO ORDERINGS SO FAR.
+      IF (NUMGRP < MAXGRP) THEN
+        MAXGRP = NUMGRP
+        NGRP(1:N) = IWA(1:N)
+
+!       EXIT IF THE INCIDENCE-DEGREE ORDERING IS OPTIMAL.
+        IF (MAXGRP == MINGRP) RETURN
+      END IF
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE LARGEST-FIRST (LF) ORDERING.
+      CALL NUMSRT(N,N-1,IWA(5*N+1),-1,IWA(4*N+1),IWA(2*N+1),IWA(N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),IWA(1),NUMGRP,IWA(N+1))
+
+!     RETAIN THE BEST OF THE THREE ORDERINGS AND EXIT.
+      IF (NUMGRP < MAXGRP) THEN
+        MAXGRP = NUMGRP
+        NGRP(1:N) = IWA(1:N)
+      END IF
+      RETURN
+
+    END SUBROUTINE DVDSM
+!_______________________________________________________________________
+
+      SUBROUTINE DGROUPDS(N,MAXGRPDS,NGRPDS,IGP,JGP)
+! ..
+! Construct the column grouping arrays IGP anf JGP needed by DVJACS28
+! from the DSM array NGRPDS.
+! ..
+!     Input:
+!
+!     N        = the order of the matrix
+!     MAXGRPDS = number of groups (from DSM)
+!     NGRPDS   = DSM output array
+!     Output:
+!     JGP      = array of length N containing the column
+!                indices by groups
+!     IGP      = pointer array of length NGRP + 1 to the
+!                locations in JGP of the beginning of
+!                each group
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, MAXGRPDS
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: NGRPDS(MAXGRPDS)
+        INTEGER, INTENT (OUT) :: IGP(MAXGRPDS+1), JGP(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IGRP, INDEX, JCOL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGROUPDS
+! ..
+        IGP(1) = 1
+        INDEX =  0
+        DO IGRP = 1, MAXGRPDS
+           IGP(IGRP+1) = IGP(IGRP)
+           DO JCOL = 1, N
+              IF (NGRPDS(JCOL) == IGRP) THEN
+                 IGP(IGRP+1) = IGP(IGRP+1) + 1
+                 INDEX = INDEX + 1
+                 JGP(INDEX) = JCOL
+              END IF
+           END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DGROUPDS
+!_______________________________________________________________________
+
+    SUBROUTINE JACSPDB(FCN,N,T,Y,F,FJAC,NRFJAC,YSCALE,FAC,IOPT, &
+      WK,LWK,IWK,LIWK,MAXGRP,NGRP,JPNTR,INDROW)
+
+! This is a modified version of JACSP which does not require the NGRP,
+! JPNTR and INDROW sparse pointer arrays in the event a dense or a
+! banded matrix is being processed.
+
+! Refer to the documentation for JACSP for a description of the
+! parameters. If the banded option is used, IOPT(5) is used to
+! input the lower bandwidth ML in this version.
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      KPP_REAL :: T
+      INTEGER :: LIWK, LWK, MAXGRP, N, NRFJAC
+! ..
+! .. Array Arguments ..
+      KPP_REAL :: F(N), FAC(N), FJAC(NRFJAC,*), WK(LWK), Y(N), YSCALE(*)
+      INTEGER :: INDROW(*), IOPT(5), IWK(LIWK), JPNTR(*), NGRP(N)
+! ..
+! .. Subroutine Arguments ..
+      EXTERNAL FCN
+! ..
+! .. Local Scalars ..
+      KPP_REAL :: ADIFF, AY, DEL, DELM, DFMJ, DIFF, DMAX, EXPFMN, FACMAX, &
+        FACMIN, FJACL, FMJ, ONE, P125, P25, P75, P875, PERT, RDEL, RMNFDF, &
+        RMXFDF, SDF, SF, SGN, T1, T2, U, U3QRT, U7EGT, UEGT, UMEGT, UQRT,  &
+        USQT, ZERO
+      INTEGER :: IDXL, IDXU, IFLAG1, IFLAG2, IRCMP, IRDEL, IROW, IROWB,    &
+        IROWMX, ITRY, J, JCOL, JFIRST, JINC, JLAST, KT1, KT2, KT3, KT4,    &
+        KT5, L, MBAND, ML, MU, NID1, NID2, NID3, NID4, NID5, NID6,         &
+        NIFAC, NT2, NUMGRP
+!       KT5, L, MBAND, MEB1, ML, MU, NID1, NID2, NID3, NID4, NID5, NID6,   &
+      LOGICAL :: DOTHISBLOCK
+      CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC ABS, EPSILON, KIND, MAX, MIN, SIGN, SQRT
+      INTRINSIC ABS, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! .. Data Statements ..
+      DATA PERT/2.0E+0_dp/, FACMAX/1.E-1_dp/, EXPFMN/.75E+0_dp/
+      DATA ONE/1.0E0_dp/, ZERO/0.0E0_dp/
+      DATA P125/.125E+0_dp/, P25/.25E+0_dp/, P75/.75E+0_dp/, P875/.875E+0_dp/
+      DATA NIFAC/3/, NID1/10/, NID2/20/, NID3/30/, NID4/40/, NID5/50/
+! ..
+!     COMPUTE ALGORITHM AND MACHINE CONSTANTS.
+! ..
+! ..  FIRST EXECUTABLE STATEMENT JACSPDB
+! ..
+      IF (IOPT(1) == 0 .AND. MAXGRP /= N) THEN
+         MSG = 'JACSPDB requires that MAXGRP=N for a dense matrix.'
+         CALL XERRDV(MSG,1800,2,0,0,0,0,ZERO,ZERO)
+      END IF
+
+      IF (IOPT(1) == 1) THEN
+         MBAND = IOPT(2)
+         ML = IOPT(5)
+         MU = MBAND - ML - 1
+!        MEB1 = 2*ML + MU
+      END IF
+
+      U = EPSILON(ONE)
+      USQT = SQRT(U)
+      UEGT = U**P125
+      UMEGT = ONE/UEGT
+      UQRT = U**P25
+      U3QRT = U**P75
+      U7EGT = U**P875
+      FACMIN = U**EXPFMN
+
+      IF (IOPT(4) == 0) THEN
+        IOPT(4) = 1
+        DO 10 J = 1, N
+          FAC(J) = USQT
+10      CONTINUE
+      END IF
+      DO 20 J = 1, 50
+        IWK(J) = 0
+20    CONTINUE
+      KT1 = NID1
+      KT2 = NID2
+      KT3 = NID3
+      KT4 = NID4
+      KT5 = NID5
+      NID6 = LIWK
+      NT2 = 2*N
+
+      DO NUMGRP = 1, MAXGRP
+!       COMPUTE AND SAVE THE INCREMENTS FOR THE COLUMNS IN GROUP NUMGRP.
+        IRCMP = 0
+        ITRY = 0
+        DO 30 J = NID5 + 1, NID6
+          IWK(J) = 0
+30      CONTINUE
+40      CONTINUE
+
+!       Note: For banded in DVJAC:
+!       mba = min(mband,n)
+!          Groups: j=1,...,mba
+!             Columns in group j: jj=j,...,n by mband
+!                Rows in column jj: i1=max(jj-mu,1),...,i2=min(jj+ml,n)       
+
+        IF (IOPT(1) == 0 .OR. IOPT(1) == 2) THEN
+          JFIRST = 1
+          JLAST = N
+          JINC = 1
+        ELSE
+          JFIRST = NUMGRP
+          JLAST = N
+          JINC = MBAND
+        END IF
+        DO JCOL = JFIRST, JLAST, JINC
+          DOTHISBLOCK = .FALSE.
+          IF (IOPT(1) == 2) THEN
+            IF (NGRP(JCOL) == NUMGRP) DOTHISBLOCK = .TRUE.
+          ELSE
+            IF (IOPT(1) == 0) THEN
+              IF (JCOL == NUMGRP) DOTHISBLOCK = .TRUE.
+            ELSE
+              IF (IOPT(1) == 1) THEN
+                DOTHISBLOCK = .TRUE.
+              END IF
+            END IF
+          END IF
+
+          IF (DOTHISBLOCK) THEN
+            WK(N+JCOL) = Y(JCOL)
+!           COMPUTE DEL. IF DEL IS TOO SMALL INCREASE FAC(JCOL) AND RECOMPUTE
+!           DEL. NIFAC ATTEMPTS ARE MADE TO INCREASE FAC(JCOL) AND FIND AN
+!           APPROPRIATE DEL. IF DEL CANT BE FOUND IN THIS MANNER, DEL IS COMPUTED
+!           WITH FAC(JCOL) SET TO THE SQUARE ROOT OF THE MACHINE PRECISION (USQT).
+!           IF DEL IS ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) IS ZERO OR
+!           YSCALE(JCOL) IS ZERO, DEL IS SET TO USQT.
+            SGN = SIGN(ONE,F(JCOL))
+            IRDEL = 0
+            IF (IOPT(3) == 1) THEN
+              AY = ABS(YSCALE(JCOL))
+            ELSE
+              AY = ABS(Y(JCOL))
+            END IF
+            DELM = U7EGT*AY
+
+            DO 50 J = 1, NIFAC
+              DEL = FAC(JCOL)*AY*SGN
+              IF (ABS(DEL) <= ZERO) THEN
+                DEL = USQT*SGN
+                IF (ITRY == 0) IWK(3) = IWK(3) + 1
+              END IF
+              T1 = Y(JCOL) + DEL
+              DEL = T1 - Y(JCOL)
+              IF (ABS(DEL) < DELM) THEN
+                IF (J >= NIFAC) GOTO 50
+                IF (IRDEL == 0) THEN
+                  IRDEL = 1
+                  IWK(1) = IWK(1) + 1
+                END IF
+                T1 = FAC(JCOL)*UMEGT
+                FAC(JCOL) = MIN(T1,FACMAX)
+              ELSE
+                GOTO 60
+              END IF
+50          END DO
+
+            FAC(JCOL) = USQT
+            DEL = USQT*AY*SGN
+            IWK(2) = IWK(2) + 1
+            IF (KT2 < NID3) THEN
+              KT2 = KT2 + 1
+              IWK(KT2) = JCOL
+            END IF
+
+60          CONTINUE
+            WK(NT2+JCOL) = DEL
+            Y(JCOL) = Y(JCOL) + DEL
+          END IF
+        END DO
+
+        IWK(7) = IWK(7) + 1
+        CALL FCN(N,T,Y,WK)
+
+        DO JCOL = JFIRST, JLAST, JINC
+          IF (IOPT(1) == 2) THEN
+             IF (NGRP(JCOL) == NUMGRP) Y(JCOL) = WK(N+JCOL)
+          ELSE
+             IF (IOPT(1) == 0) THEN
+                IF (JCOL == NUMGRP) Y(JCOL) = WK(N+JCOL)
+             ELSE
+                IF (IOPT(1) == 1) Y(JCOL) = WK(N+JCOL) 
+             END IF
+          END IF
+        END DO
+
+!       COMPUTE THE JACOBIAN ENTRIES FOR ALL COLUMNS IN NUMGRP.
+!       STORE ENTRIES ACCORDING TO SELECTED STORAGE FORMAT.
+!       USE LARGEST ELEMENTS IN A COLUMN TO DETERMINE SCALING
+!       INFORMATION FOR ROUNDOFF AND TRUNCATION ERROR TESTS.
+
+        DO JCOL = JFIRST, JLAST, JINC
+          DOTHISBLOCK = .FALSE.
+          IF (IOPT(1) == 2) THEN
+             IF (NGRP(JCOL) == NUMGRP) DOTHISBLOCK = .TRUE.
+          ELSE
+             IF (IOPT(1) == 0) THEN
+                IF (JCOL == NUMGRP) DOTHISBLOCK = .TRUE.
+             ELSE
+                IF(IOPT(1) == 1) DOTHISBLOCK = .TRUE. 
+             END IF
+          END IF
+          IF (DOTHISBLOCK) THEN
+            IF (IOPT(1) == 2) THEN
+              IDXL = JPNTR(JCOL)
+              IDXU = JPNTR(JCOL+1) - 1
+            ELSE
+              IF (IOPT(1) == 0) THEN
+                IDXL = 1
+                IDXU = N
+              ELSE
+                IF (IOPT(1) == 1) THEN
+                  IDXL = MAX(JCOL-MU,1)
+                  IDXU = MIN(JCOL+ML,N)
+                END IF
+              END IF
+            END IF
+            DMAX = ZERO
+            RDEL = ONE/WK(NT2+JCOL)
+            IROWMX = 1
+            DO L = IDXL, IDXU
+              IF (IOPT(1) == 2) THEN
+                 IROW = INDROW(L)
+              ELSE
+                 IF (IOPT(1)==0 .OR. IOPT(1)==1) IROW = L
+              END IF
+              DIFF = WK(IROW) - F(IROW)
+              ADIFF = ABS(DIFF)
+              IF (ADIFF >= DMAX) THEN
+                IROWMX = IROW
+                DMAX = ADIFF
+                SF = F(IROW)
+                SDF = WK(IROW)
+              END IF
+              FJACL = DIFF*RDEL
+              IF (ITRY == 1) WK(IROW) = FJACL
+
+              IF (IOPT(1) == 0) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROW,JCOL)
+                FJAC(IROW,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 1) THEN
+                IROWB = IROW - JCOL + IOPT(2)
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,JCOL)
+                FJAC(IROWB,JCOL) = FJACL
+!               IROWB = JCOL * MEB1 - ML + L
+!               IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,1)
+!               FJAC(IROWB,1) = FJACL
+              END IF
+              IF (IOPT(1) == 2) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(L,1)
+                FJAC(L,1) = FJACL
+              END IF
+            END DO
+
+!           IF A COLUMN IS BEING RECOMPUTED (ITRY=1),THIS SECTION OF THE
+!           CODE PERFORMS AN EXTRAPOLATION TEST TO ENABLE THE CODE TO
+!           COMPUTE SMALL DERIVATIVES MORE ACCURATELY. THIS TEST IS ONLY
+!           PERFORMED ON THOSE COLUMNS WHOSE LARGEST DIFFERENCE IS CLOSE
+!           TO ZERO RELATIVE TO SCALE.
+            IF (ITRY == 1) THEN
+              IFLAG1 = 0
+              IFLAG2 = 0
+              DO 100 J = NID5 + 1, NID6
+                IF (IWK(J) == JCOL) IFLAG1 = 1
+100           CONTINUE
+              IF (IFLAG1 == 1) THEN
+                IFLAG1 = 0
+                T1 = WK(IROWMX+N)
+                T2 = WK(IROWMX)*FAC(JCOL)
+                IF (ABS(T2) < ABS(T1)*PERT) IFLAG2 = 1
+              END IF
+
+              IF (IFLAG2 == 1) THEN
+                IFLAG2 = 0
+                T1 = FAC(JCOL)*FAC(JCOL)
+                FAC(JCOL) = MAX(T1,FACMIN)
+                DO L = IDXL, IDXU
+                  IF (IOPT(1) == 2) THEN
+                     IROW = INDROW(L)
+                  ELSE
+                     IF (IOPT(1)==0 .OR. IOPT(1)==1) IROW = L
+                  END IF
+                  FJACL = WK(IROW+N)
+                  IF (IOPT(1) == 0) FJAC(IROW,JCOL) = FJACL
+                  IF (IOPT(1) == 1) THEN
+                    IROWB = IROW - JCOL + IOPT(2)
+                    FJAC(IROWB,JCOL) = FJACL
+!                   IROWB = JCOL * MEB1 - ML + L
+!                   FJAC(IROWB,1) = FJACL
+                  END IF
+                  IF (IOPT(1) == 2) FJAC(L,1) = FJACL
+              END DO
+              END IF
+            END IF
+
+            FMJ = ABS(SF)
+            DFMJ = ABS(SDF)
+            RMXFDF = MAX(FMJ,DFMJ)
+            RMNFDF = MIN(FMJ,DFMJ)
+
+!           IF SCALE INFORMATION IS NOT AVAILABLE, PERFORM NO ROUNDOFF
+!           OR TRUNCATION ERROR TESTS. IF THE EXTRAPOLATION TEST HAS
+!           CAUSED FAC(JCOL) TO BE RESET TO ITS PREVIOUS VALUE (IAJAC=1)
+!           THEN NO FURTHER ROUNDOFF OR TRUNCATION ERROR TESTS ARE
+!           PERFORMED.
+!           IF (RMNFDF/=ZERO) THEN
+            IF (ABS(RMNFDF) > ZERO) THEN
+!             TEST FOR POSSIBLE ROUNDOFF ERROR (FIRST TEST)
+!             AND ALSO FOR POSSIBLE SERIOUS ROUNDOFF ERROR (SECOND TEST).
+              IF (DMAX <= (U3QRT*RMXFDF)) THEN
+                IF (DMAX <= (U7EGT*RMXFDF)) THEN
+                  IF (ITRY == 0) THEN
+                    T1 = SQRT(FAC(JCOL))
+                    FAC(JCOL) = MIN(T1,FACMAX)
+                    IRCMP = 1
+                    IF (KT5 < NID6) THEN
+                      KT5 = KT5 + 1
+                      IWK(KT5) = JCOL
+                    END IF
+                    IWK(4) = IWK(4) + 1
+                    IF (KT3 < NID4) THEN
+                      KT3 = KT3 + 1
+                      IWK(KT3) = JCOL
+                    END IF
+                  ELSE
+                    IWK(5) = IWK(5) + 1
+                    IF (KT4 < NID5) THEN
+                      KT4 = KT4 + 1
+                      IWK(KT4) = JCOL
+                    END IF
+                  END IF
+                ELSE
+                  T1 = UMEGT*FAC(JCOL)
+                  FAC(JCOL) = MIN(T1,FACMAX)
+                END IF
+              END IF
+!             TEST FOR POSSIBLE TRUNCATION ERROR.
+              IF (DMAX > UQRT*RMXFDF) THEN
+                T1 = FAC(JCOL)*UEGT
+                FAC(JCOL) = MAX(T1,FACMIN)
+                IWK(8) = IWK(8) + 1
+                IF (KT1 < NID2) THEN
+                  KT1 = KT1 + 1
+                  IWK(KT1) = JCOL
+                END IF
+              END IF
+            ELSE
+              IWK(6) = IWK(6) + 1
+            END IF
+          END IF
+        END DO
+
+!       IF SERIOUS ROUNDOFF ERROR IS SUSPECTED, RECOMPUTE ALL
+!       COLUMNS IN GROUP NUMGRP.
+        IF (IRCMP == 1) THEN
+          IRCMP = 0
+          ITRY = 1
+          GOTO 40
+        END IF
+        ITRY = 0
+      END DO
+      RETURN
+
+    END SUBROUTINE JACSPDB
+
+! End of JACSP routines.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert the MA48 Jacobian related
+! routines DVNLSS48, DVSOLS48, DVPREPS48, and DVJACS48 here.
+! filename = jacobian_for_ma48.f90. Insert the following line
+! after the first line of this file:
+! USE hsl_ma48_double
+!_______________________________________________________________________
+
+! *****LAPACK build change point. Insert the following line after the
+! first line of this file:
+! USE lapackd_f90_m
+! Include the module lapackd_f90_m.f90 at the beginning of this file
+! or as an external module.
+!_______________________________________________________________________
+
+!    END MODULE DVODE
+
+
+    END MODULE KPP_ROOT_Integrator
+!_______________________________________________________________________
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f90.save
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f90.save	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_dvode.f90.save	(revision 3477)
@@ -0,0 +1,19107 @@
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME, ATOL, RTOL
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve, &
+               Set2zero, WLAMCH
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  !~~~>  Statistics on the work performed by the VODE method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4,  &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihexit=2
+ 
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-8:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -8
+    'Step size too small                               ', & ! -7
+    'No of steps exceeds maximum bound                 ', & ! -6
+    'Improper tolerance values                         ', & ! -5
+    'FacMin/FacMax/FacRej must be positive             ', & ! -4
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3
+    'Improper value for maximal no of Newton iterations', & ! -2
+    'Improper value for maximal no of steps            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+!!$   INTEGER, SAVE :: Ntotal = 0
+   TYPE(VODE_OPTS) :: OPTIONS
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   ICNTRL(5) = 2 ! maximal order
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+    OPTIONS = SET_OPTS(SPARSE_J=SPARSE,            &
+              ABSERR_VECTOR=ATOL, RELERR=RTOL, MXSTEP=100000,                      &
+              NZSWAG=LU_NONZERO, HMAX=MAXH, LOWER_BANDWIDTH=ML, UPPER_BANDWIDTH=MU,&
+              MA28_ELBOW_ROOM=10, MC19_SCALING=.TRUE., MA28_MESSAGES=.FALSE.,      &
+              MA28_EPS=1.0D-4, MA28_RPS=.TRUE.,                                    &
+              USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE)
+
+   ISTATE = 1
+   NG = 0
+   ITASK = 1
+   CALL DVODE_F90(FUN_CHEM,NVAR,VAR,TIN,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC_CHEM)
+
+   STEPMIN = RSTATUS(ihexit) ! Save last step
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(1:20)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(1:20)
+   IF (PRESENT(IERR_U)) THEN
+     IF (IERR==2) THEN ! DLSODE returns "2" after successful completion
+       IERR_U = 1 ! IERR_U will return "1" for successful completion
+     ELSE
+       IERR_U = IERR
+     ENDIF
+   ENDIF
+
+   END SUBROUTINE INTEGRATE
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM(N, T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      INTEGER :: N
+      KPP_REAL :: V(NVAR), FCT(NVAR), T
+      
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+
+      CALL Fun(V, FIX, RCONST, FCT)
+      
+      !Nfun=Nfun+1
+
+      END SUBROUTINE FUN_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM (N,T,V,IA,JA,NNZ,JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_JacobianSP
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      KPP_REAL :: V(NVAR), T
+      INTEGER, INTENT(IN)  :: N
+      INTEGER, INTENT(OUT) :: NNZ
+#ifdef FULL_ALGEBRA    
+      INTEGER :: I, J
+      KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+#else
+      KPP_REAL :: JF(LU_NONZERO)
+      INTEGER  :: IA(LU_NONZERO), JA(LU_NONZERO)
+#endif   
+  
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+    
+#ifdef FULL_ALGEBRA    
+      CALL Jac_SP(V, FIX, RCONST, JV)
+      DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+      END DO
+#else
+      CALL Jac_SP(V, FIX, RCONST, JF) 
+      NNZ = LU_NONZERO
+      IA = LU_IROW
+      JA = LU_ICOL
+#endif   
+      !Njac=Njac+1
+   
+   END SUBROUTINE JAC_CHEM (N,T,V,IA,JA,NNZ,JF)
+
+   MODULE DVODE
+
+! This version is the December 2005 release.
+! Last change: 01/01/08
+! _____________________________________________________________________
+! Working Precision
+!  IMPLICIT NONE
+! Define the working precision for DVODE_F90. Change D0 to E0 in the
+! next statement to convert to single precision.
+!  INTEGER, PARAMETER, PRIVATE :: WP = KIND(1.0D0)
+! ______________________________________________________________________
+! Overview
+
+! The f77 ordinary differential equation solver VODE.f is applicable to
+! nonstiff systems of odes and to stiff systems having dense or banded
+! Jacobians. DVODE_F90 is a Fortran 90 extension of VODE.f. While
+! retaining all of the features available in VODE.f, we have
+! incorporated several new options in DVODE_F90 including:
+!   1. the ability to solve stiff systems with sparse Jacobians
+!   2. internal management of storage and work arrays
+!   3. specification of options via optional keywords
+!   4. the ability to perform root finding or "event detection"
+!   5. various new diagnostic and warning messages
+!   6. the ability to impose solution bounds
+!   7. several specialized options for dealing with sparsity
+! ______________________________________________________________________
+! Version Information
+
+! This is DVODE_F90, the double precision FORTRAN 90 extension of the
+! f77 DVODE.f ordinary differential equation solver. This version uses
+! MA28 for sparse Jacobians. This file and related information can be
+! obtained at the following support page:
+!
+!     http://www.radford.edu/~thompson/vodef90web/
+!
+! We are indebted to Richard Cox (ORNL) for providing us with his
+! implementation of MA28 in LSOD28.f (a variant of Alan Hindmarsh's
+! lsodes.f). We are indebted to Alan Hindmarsh for numerous contributions.
+! In particular, we borrowed liberally from the f77 solvers VODE.f,
+! LSODAR.f, and LSODES.f while developing DVODE_F90. We are indebted
+! to Doug Salane for providing us with his JACSP Jacobian routines.
+!
+! If you find a bug or encounter a problem with DVODE_F90, please
+! contact one of us:
+!    G.D. Byrne (gbyrne@wi.rr.com)
+!    S. Thompson (thompson@radford.edu)
+! A set of quick start instructions is provided below.
+! ______________________________________________________________________
+! Note on F90/F95 Compilers
+
+! To date we have used DVODE_F90 successfully with all F90/F95 compilers
+! to which we have access. In particular, we have used it with the Lahey
+! F90 and Lahey-Fujitsu F95 compilers, the Compaq Visual F90 compiler,
+! the g90 compiler, and the INTEL, Portland, Salford, and SUN compilers.
+! It should be noted that compilers such as Salford's FTN95 complain
+! about uninitialized arrays passed as subroutine arguments and the use of
+! slices of two dimensional arrays as one dimensional vectors, and will
+! not run using the strictest compiler options. It is perfectly safe to
+! use the /-CHECK compiler option to avoid these FTN95 runtime checks.
+! DVODE_F90 does not use any variable for numerical purposes until it
+! has been assigned an appropriate value.
+! ______________________________________________________________________
+! Quick Start Instructions
+
+! (1) Compile this file. Then compile, link, and execute the program
+!     example1.f90. The output is written to the file example1.dat.
+!     Verify that the last line of the output is the string
+!     'No errors occurred.'
+! (2) Repeat this process for the program example2.f90.
+!
+! Other test programs you may wish to run to verify your installation
+! of DVODE_F90 are:
+!
+! (3) Run the test programs nonstiffoptions.f90 and stiffoptions.f90
+!     and verify that the last line in the output files produced is
+!     'No errors occurred.' They solve the problems in the Toronto
+!     test suites using several different error tolerances and various
+!     solution options. Note that stiffoptions.f90 takes several
+!     minutes to run because it performs several thousand separate
+!     integrations.
+! (4) Locate the file robertson.f90 in the demo programs and look at
+!     how options are set using SET_OPTS, how DVODE_F90 is called to
+!     obtain the solution at desired output times, and how the
+!     derivative and Jacobian routines are supplied. Note too the
+!     manner in which the solution is constrained to be nonnegative.
+! (5) Locate demoharmonic.f90 and look at how root finding options
+!     are set and how the event residual routine is supplied to
+!     DVODE_F90.
+! (6) The other demo programs available from the DVODE_F90 support
+!     page illustrate various other solution options available in
+!     DVODE_F90. The demo programs may be obtained from
+!
+!        http://www.radford.edu/~thompson/vodef90web/index.html
+! ______________________________________________________________________
+! DVODE_F90 Full Documentation Prologue
+
+! Section 1.  Setting Options in DVODE_F90
+! Section 2.  Calling DVODE_F90
+! Section 3.  Choosing Error Tolerances
+! Section 4.  Choosing the Method of Integration
+! Section 5.  Interpolation of the Solution and Derivatives
+! Section 6.  Handling Events (Root Finding)
+! Section 7.  Gathering Integration Statistics
+! Section 8.  Determining Jacobian Sparsity Structure Arrays
+! Section 9.  Original DVODE Documentation Prologue
+! Section 10. Example Usage
+
+! Note: Search on the string 'Section' to locate these sections. You
+! may wish to refer to the support page which has the sections broken
+! into smaller pieces.
+! ______________________________________________________________________
+! Section 1.  Setting Options in DVODE_F90
+!
+! You can use any of three options routines:
+!
+! SET_NORMAL_OPTS
+! SET_INTERMEDIATE_OPTS
+! SET_OPTS
+
+! OPTIONS = SET_NORMAL_OPTS(DENSE_J, BANDED_J, SPARSE_J,               &
+!   USER_SUPPLIED_JACOBIAN, LOWER_BANDWIDTH, UPPER_BANDWIDTH,          &
+!   RELERR, ABSERR, ABSERR_VECTOR, NEVENTS)
+
+! OPTIONS = SET_INTERMEDIATE_OPTS(DENSE_J, BANDED_J, SPARSE_J,         &
+!   USER_SUPPLIED_JACOBIAN,LOWER_BANDWIDTH, UPPER_BANDWIDTH,           &
+!   RELERR, ABSERR, ABSERR_VECTOR,TCRIT, H0, HMAX, HMIN, MAXORD,       &
+!   MXSTEP, MXHNIL, NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS,          &
+!   NEVENTS, CONSTRAINED, CLOWER, CUPPER, CHANGE_ONLY_f77_OPTIONS)     &
+
+! OPTIONS = SET_OPTS(METHOD_FLAG, DENSE_J, BANDED_J, SPARSE_J,         &
+!   USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN, CONSTANT_JACOBIAN,          &
+!   LOWER_BANDWIDTH, UPPER_BANDWIDTH, SUB_DIAGONALS, SUP_DIAGONALS,    &
+!   RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR, TCRIT, H0, HMAX,     &
+!   HMIN, MAXORD, MXSTEP, MXHNIL, YMAGWARN, SETH, UPIVOT, NZSWAG,      &
+!   USER_SUPPLIED_SPARSITY, NEVENTS, CONSTRAINED, CLOWER, CUPPER,      &
+!   MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES, MA28_EPS,            &
+!   MA28_RPS, CHANGE_ONLY_f77_OPTIONS, JACOBIAN_BY_JACSP)
+
+! Please refer to the documentation prologue for each of these functions
+! to see what options may be used with each. Note that input to each is
+! via keyword and all variables except error tolerances are optional.
+! Defaults are used for unspecified options. If an option is available
+! in SET_NORMAL OPTS, it is available and has the same meaning in
+! SET_INTERMEDIATE_OPTS and SET_OPTS. Similarly, if an option is available
+! in SET_INTERMEDIATE_OPTS, it is available and has the same meaning in
+! SET_OPTS.
+
+! The first two functions are provided merely for convenience.
+! SET_NORMAL_OPTS is available simply to relieve you of reading the
+! documentation for SET_OPTS and to use default values for all but
+! the most common options. SET_INTERMEDIATE_OPTS is available to allow
+! you more control of the integration while still using default values
+! for less commonly used options. SET_OPTS allows you to specify any
+! of the options available in DVODE_F90.
+
+! Roughly, SET_NORMAL_OPTS is intended to provide for dense, banded,
+! and numerical sparse Jacobians without the need to specify other
+! specialized options. SET_INTERMEDIATE_OPTIONS is intended to allow
+! more general sparse Jacobian options. SET_OPTS is intended to provide
+
+! access to all options in DVODE_F90.
+
+! Please note that SET_INTERMEDIATE_OPTS can be invoked using the same
+! arguments as SET_NORMAL_OPTS; and SET_OPTS can be invoked using the
+! same arguments as either SET_NORMAL_OPTS or SET_INTERMEDIATE_OPTS.
+! If you wish you can simply delete SET_NORMAL_OPTS as well as
+! SET_INTERMEDIATE_OPTS and use only SET_OPTS for all problems. If you
+! do so, you need only include the options that you wish to use when
+! you invoke SET_OPTIONS.
+
+! In the following description any reference to SET_OPTS applies equally
+! to SET_NORMAL_OPTS and SET_INTERMEDIATE OPTS.
+
+! Before calling DVODE_F90 for the first time, SET_OPTS must be invoked.
+! Typically, SET_OPTS is called once to set the desired integration
+! options and parameters. DVODE_F90 is then called in an output loop to
+! obtain the solution for the desired times. A detailed description of
+! the DVODE_F90 arguments is given in a section below. Detailed descriptions
+! of the options available via SET_OPTS are given in the documentation prologue.
+! Although each option available in the f77 version of DVODE as well as
+! several additional ones are available in DVODE_F90 via SET_OPTS,
+! several of the available options are not relevant for most problems
+! and need not be specified. Refer to the accompanying demonstration
+! programs for specific examples of each usage. Note that after any call
+! to DVODE_F90, you may call GET_STATS to gather relevant integration
+! statistics. After your problem has completed, you may call
+! RELEASE_ARRAYS to deallocate any internal arrays allocated by
+! DVODE_F90 and to determine how much storage was used by DVODE_F90.
+!
+! To communicate with DVODE_F90 you will need to include the following
+! statement in your calling program:
+!    USE DVODE_F90_M
+! and include the following statement in your type declarations section:
+!    TYPE(VODE_OPTS) :: OPTIONS
+! Below are brief summaries of typical uses of SET_OPTS.
+! Nonstiff Problems:
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR=ATOL)
+!    The above use of SET_OPTS will integrate your system of odes
+!    using the nonstiff Adams methods while using a relative error
+!    tolerance of RTOL and an absolute error tolerance of ATOL.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR=ATOL,NEVENTS=NG)
+!    If you wish to do root finding, SET_OPTS can be used as above.
+!    Here, NEVENTS is the desired number of root finding functions.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=G)
+!    Here F is the name of your derivative subroutine and G is the
+!    name of your subroutine to evaluate residuals of the root
+!    finding functions.
+! OPTIONS = SET_OPTS(RELERR=RTOL,ABSERR_VECTOR=ATOL)
+!    This use of SET_OPTS indicates that a scalar relative error
+!    tolerance and a vector of absolute error tolerances will be
+!    used.
+! Stiff Problems, internally generated dense Jacobian:
+! OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL,ABSERR=ATOL)
+!    This use of DENSE_J=.TRUE. indicates that DVODE_F90 will
+!    use the stiffly stable BDF methods and will approximate
+!    the Jacobian, considered to be a dense matrix, using
+!    finite differences. Your subsequent call to DVODE_F90
+!    might look like:
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+! OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL, &
+!                    USER_SUPPLIED_JACOBIAN=.TRUE.)
+!    If you know the Jacobian and wish to supply subroutine JAC
+!    as described in the documentation for DVODE_F90, the options
+!    call could look like the above.
+!    Your subsequent call to DVODE_F90 might look like:
+!    CALL DVODE_F90(F1,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC)
+!    Here, JAC is the name of the subroutine that you provide to
+!    evaluate the known Jacobian.
+! Stiff Problems, internally generated banded Jacobian:
+! OPTIONS = SET_OPTS(BANDED_J=.TRUE.,RELERR=RTOL,ABSERR=ATOL, &
+!                       LOWER_BANDWIDTH=ML,UPPER_BANDWIDTH=MU)
+!    This use of BANDED_J=.TRUE. indicates that DVODE_F90 will
+!    use the stiffly stable BDF methods and will approximate the
+!    Jacobian, considered to be a banded matrix, using finite
+!    differences. Here ML is the lower bandwidth of the Jacobian
+!    and ML is the upper bandwidth of the Jacobian.
+! Stiff Problems, internally generated sparse Jacobian:
+! OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    This use of SET_OPTS indicates that the Jacobian is a sparse
+!    matrix. Its structure will be approximated internally by
+!    making calls to your derivative routine. If you know the
+!    structure before hand, you may provide it directly in a
+!    variety of ways as described in the documentation prologue
+!    for SET_OPTS. In addition, several other options related
+!    to sparsity are available.
+! More complicated common usage:
+!    Suppose you need to solve a stiff problem with a sparse Jacobian.
+!    After some time, the structure of the Jacobian changes and you
+!    wish to have DVODE_F90 recalculate the structure before continuing
+!    the integration. Suppose that initially you want to use an absolute
+!    error tolerance of 1.0D-5 and that when the Jacobian structure is
+!    changed you wish to reduce the error tolerance 1.0D-7. Your calls
+!    might look like this.
+!    RTOL = ...
+!    ATOL = 1.0D-5
+!    OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    Output loop:
+!       CALL DVODE_F90(FCN,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+!       At desired time:
+!       ISTATE = 3
+!       ATOL = 1.0D-7
+!       OPTIONS = SET_OPTS(SPARSE_J=.TRUE.,ABSERR=ATOL,RELERR=RTOL)
+!    End of output loop
+
+! In the following we have summarized and described how some of the demonstration
+! programs set options and call DVODE_F90. In each case the necessary parameters
+! are defined before invoking SET_OPTS. The call to DVODE_F90 is in a loop in
+! which the output time is successively updated. The actual programs are available
+! from the web support page
+!
+!    http://www.radford. edu/~thompson/vodef90web/index.html/
+!
+!                              Problem Summary
+!
+! Problem                  NEQ      Jacobian            Features Illustrated
+!
+! Prologue Example 1        3        Dense               Basic
+!
+! Prologue Example 2        3        Dense               Root finding
+!
+! Robertson                 3        Dense               Solution bounds
+!
+! Harmonic Oscillator       4        Nonstiff            Root finding
+!
+! Flow Equations         5-1800      Sparse              Automatic determination
+!                                                        of sparsity arrays
+!
+! Diurnal Kinetics      50-5000      Sparse or banded    Sparsity options
+!
+!                       Options Used and DVODE_F90 Call
+!
+! Prologue Example 1
+!
+!    OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE., ABSERR_VECTOR=ATOL, RELERR=RTOL,     &
+!              USER_SUPPLIED_JACOBIAN=.TRUE.)
+!    CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+!
+!    The problem consists of a stiff system of NEQ=3 equations. The dense
+!    Jacobian option (DENSE_J) is used. A vector ATOL(*) of error tolerances
+!    is used. A scalar relative error tolerance RTOL is used. Subroutine JEX
+!    is provided to evaluate the analytical Jacobian. If the last argument
+!    J_FCN=JEX is omitted (as in Example 2), a numerical Jacobian will
+!    be used.
+!
+! Prologue Example 2
+!
+!    OPTIONS = SET_NORMAL_OPTS(DENSE_J=.TRUE., RELERR=RTOL, ABSERR_VECTOR=ATOL,     &
+!              NEVENTS=NG)
+!    CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!
+!    The system in Example 1 is used to illustrate root finding. It is
+!    desired to locate the times at which two of the solution components
+!    attain prescribed values. NEVENTS=2 informs the solver that two such
+!    functions are used. Subroutine GEX is used to calculate the residuals
+!    for these two functions. A dense numerical Jacobian is used.
+!
+! Robertson Problem
+!
+!    OPTIONS = SET_INTERMEDIATE_OPTS(DENSE_J=.TRUE., RELERR_VECTOR=RTOL,            &
+!              ABSERR_VECTOR=ABSERR_TOLERANCES, CONSTRAINED=BOUNDED_COMPONENTS,     &
+!              CLOWER=LOWER_BOUNDS, CUPPER=UPPER_BOUNDS)
+!
+!    CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JACD)
+!    The system used in Examples 1 and 2 is solved over a much larger
+!    time interval. The solution is constrained to be nonegative. This
+!    is done by prescribing the components to be constrained (BOUNDED_COMPONENTS).
+!    Artificially large values are used to impose upper bounds (UPPER_BOUNDS)
+!    and lower bounds of zero are used to force a nonnegative solution.
+!
+! Harmonic Oscillator Problem
+!
+!    OPTIONS = SET_NORMAL_OPTS(RELERR=RTOL, ABSERR=ATOL, NEVENTS=NG)
+!    CALL DVODE_F90(DERIVS,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEVENTS)
+!
+!    A nonstiff system of NEQ=4 equations is solved. The nonstiff option is
+!    used because neither DENSE_ nor BANDED_J nor SPARSE_J is present. It is
+!    desired to find the times at which Y(2) or Y(3) is equal to 0. Residuals
+!    for the two corresponding event functions are calculated in subroutine
+!    GEVENTS.
+!
+! Flow Equations Problem
+!
+!    OPTIONS = SET_OPTS(SPARSE_J=SPARSE, ABSERR=ATOL(1), RELERR=RTOL(1),            &
+!              MXSTEP=100000, NZSWAG=20000)
+!    CALL DVODE_F90(FCN,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS)
+!
+!    This is a stiff system of equations resulting a method of lines
+!    discretization. The Jacobian is sparse. Scalar absolute and relative
+!    error tolerances are used. The Jacobian structure and a numerical
+!    Jacobian are used. The solver is limited to a maximum of MXSTEP steps.
+!    NZSWAG is the amount by which allocated array sizes will be increased.
+!    The accompanying test program may be used to illutrate several other
+!    solution options.
+!
+! Diurnal Kinetics Problem
+!
+!    OPTIONS = SET_OPTS(SPARSE_J=SPARSE, BANDED_J=BANDED, DENSE_J=DENSE,            &
+!              ABSERR_VECTOR=ATOL(1:NEQ), RELERR=RTOL(1), MXSTEP=100000,            &
+!              NZSWAG=50000, HMAX=MAXH, LOWER_BANDWIDTH=ML, UPPER_BANDWIDTH=MU,     &
+!              MA28_ELBOW_ROOM=10, MC19_SCALING=.TRUE., MA28_MESSAGES=.FALSE.,      &
+!              MA28_EPS=1.0D-4, MA28_RPS=.TRUE.,                                    &
+!              USER_SUPPLIED_SPARSITY=SUPPLY_STRUCTURE)
+!   CALL USERSETS_IAJA(IA, IADIM, JA, JADIM)
+!   CALL DVODE_F90(FCN, NEQ, Y, T, TOUT, ITASK, ISTATE, OPTIONS)
+!
+!   This problem can be used to illustrate most solution options. Here, dense,
+!   banded, or sparse Jacobians are used depending on the values of the first
+!   three parameters. A vector error tolerance is used and a scalar relative
+!   error tolerance is used. If a banded solution is desired, it is necessary
+!   to supply the bandwidths ML and MU. If a sparse solution is desired,
+!   several special options are used. The most important one is MA28_RPS to
+!   force the solver to update the partial pivoting sequence when singular
+!   iteration matrices are encountered. The sparsity pattern is determined
+!   numerically if SUPPLY_STRUCTURE is FALSE. Otherwise the user will supply
+!   the pattern by calling subroutine USERSETS_IAJA.
+! ______________________________________________________________________
+! Section 2.  Calling DVODE_F90
+!
+! DVODE_F90 solves the initial value problem for stiff or nonstiff
+! systems of first order ODEs,
+!     dy/dt = f(t,y), or, in component form,
+!     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+! DVODE_F90 is a package based on the EPISODE and EPISODEB packages,
+! and on the ODEPACK user interface standard. It was developed from
+! the f77 solver DVODE developed by Brown, Byrne, and Hindmarsh.
+! DVODE_F90 also provides for the solution of sparse systems in a
+! fashion similar to LSODES and LSOD28. Currently, MA28 is used
+! to perform the necessary sparse linear algebra. DVODE_F90 also
+! contains the provision to do root finding in a fashion similar
+! to the LSODAR solver from ODEPACK.
+
+! Communication between the user and the DVODE_F90 package, for normal
+! situations, is summarized here. This summary describes only a subset
+! of the full set of options available. See the full description for
+! details, including optional communication, nonstandard options, and
+! instructions for special situations.
+!    CALL DVODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JAC,G_FCN=GEX)
+!    The arguments in the call list to DVODE_F90 have the following
+!    meanings.
+! F       = The name of the user-supplied subroutine defining the
+!           ODE system. The system must be put in the first-order
+!           form dy/dt = f(t,y), where f is a vector-valued function
+!           of the scalar t and the vector y. Subroutine F is to
+!           compute the function f. It is to have the form
+!                SUBROUTINE F(NEQ,T,Y,YDOT)
+!                DOUBLE PRECISION T,Y(NEQ),YDOT(NEQ)
+!           where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+!           is output. Y and YDOT are arrays of length NEQ.
+!           Subroutine F should not alter Y(1),...,Y(NEQ).
+!           If F (and JAC) are not contained in a module available to
+!           your calling program, you must declare F to be EXTERNAL
+!           in the calling program.
+! NEQ     = The size of the ODE system (number of first order
+!           ordinary differential equations).
+! Y       = A double precision array for the vector of dependent variables,
+!           of length NEQ or more. Used for both input and output on the
+!           first call (ISTATE = 1), and only for output on other calls.
+!           On the first call, Y must contain the vector of initial
+!           values. In the output, Y contains the computed solution
+!           evaluated at T.
+! T       = The independent variable. In the input, T is used only on
+!           the first call, as the initial point of the integration.
+!           In the output, after each call, T is the value at which a
+!           computed solution Y is evaluated (usually the same as TOUT).
+!           On an error return, T is the farthest point reached.
+! TOUT    = The next value of t at which a computed solution is desired.
+!           TOUT is Used only for input. When starting the problem
+!           (ISTATE = 1), TOUT may be equal to T for one call, then
+!           should not equal T for the next call. For the initial T,
+!           an input value of TOUT unequal to T is used in order to
+!           determine the direction of the integration (i.e. the
+!           algebraic sign of the step sizes) and the rough scale
+!           of the problem. Integration in either direction (forward
+!           or backward in t) is permitted. If ITASK = 2 or 5 (one-step
+!           modes), TOUT is ignored after the first call (i.e. the
+!           first call with TOUT \= T). Otherwise, TOUT is required
+!           on every call. If ITASK = 1, 3, or 4, the values of TOUT
+!           need not be monotone, but a value of TOUT which backs up
+!           is limited to the current internal t interval, whose
+!           endpoints are TCUR - HU and TCUR. (Refer to the description
+!           of GET_STATS for a description of TCUR and HU.)
+! ITASK   = An index specifying the task to be performed.
+!           Input only. ITASK has the following values and meanings.
+!           1  means normal computation of output values of y(t) at
+!              t = TOUT (by overshooting and interpolating).
+!           2  means take one step only and return.
+!           3  means stop at the first internal mesh point at or
+!              beyond t = TOUT and return.
+!           4  means normal computation of output values of y(t) at
+!              t = TOUT but without overshooting t = TCRIT.
+!              TCRIT must be specified in your SET_OPTS call. TCRIT
+!              may be equal to or beyond TOUT, but not behind it in
+!              the direction of integration. This option is useful
+!              if the problem has a singularity at or beyond t = TCRIT.
+!           5  means take one step, without passing TCRIT, and return.
+!              TCRIT must be specified in your SET_OPTS call.
+!           If ITASK = 4 or 5 and the solver reaches TCRIT (within
+!           roundoff), it will return T = TCRIT(exactly) to indicate
+!           this (unless ITASK = 4 and TOUT comes before TCRIT, in
+!           which case answers at T = TOUT are returned first).
+! ISTATE  = an index used for input and output to specify the
+!           the state of the calculation.
+!           In the input, the values of ISTATE are as follows.
+!           1  means this is the first call for the problem
+!              (initializations will be done). See note below.
+!           2  means this is not the first call, and the calculation
+!              is to continue normally, with no change in any input
+!              parameters except possibly TOUT and ITASK.
+!           3  means this is not the first call, and the
+!              calculation is to continue normally, but with
+!              a change in input parameters other than
+!              TOUT and ITASK. Desired changes require SET_OPTS
+!              be called prior to calling DVODE_F90 again.
+!           A preliminary call with TOUT = T is not counted as a
+!           first call here, as no initialization or checking of
+!           input is done. (Such a call is sometimes useful to
+!           include the initial conditions in the output.)
+!           Thus the first call for which TOUT is unequal to T
+!           requires ISTATE = 1 in the input.
+!           In the output, ISTATE has the following values and meanings.
+!            1  means nothing was done, as TOUT was equal to T with
+!               ISTATE = 1 in the input.
+!            2  means the integration was performed successfully.
+!            3  means a root of one of your root finding functions
+!               has been located.
+!           A negative value of ISTATE indicates that DVODE_F90
+!           encountered an error as described in the printed error
+!           message. Since the normal output value of ISTATE is 2,
+!           it does not need to be reset for normal continuation.
+!           Also, since a negative input value of ISTATE will be
+!           regarded as illegal, a negative output value requires
+!           the user to change it, and possibly other input, before
+!           calling the solver again.
+! OPTIONS = The options structure produced by your call to SET_OPTS.
+! JAC     = The name of the user-supplied routine (MITER = 1 or 4 or 6)
+!           If you do not specify that a stiff method is to be used
+!           in your call to SET_OPTS, you need not include JAC in
+!           your call to DVODE_F90. If you specify a stiff method and
+!           that a user supplied Jacobian will be supplied, JAC must
+!           compute the Jacobian matrix, df/dy, as a function of the
+!           scalar t and the vector y. It is to have the form:
+!              SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!              DOUBLE PRECISION T, Y(NEQ), PD(NROWPD,NEQ)
+!           where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+!           PD is to be loaded with partial derivatives (elements of the
+!           Jacobian matrix) in the output. PD must be given a first
+!           dimension of NROWPD. T and Y have the same meaning as in
+!           Subroutine F.
+!           In the full matrix case (MITER = 1), ML and MU are
+!           ignored, and the Jacobian is to be loaded into PD in
+!           columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+!           In the band matrix case (MITER = 4), the elements
+!           within the band are to be loaded into PD in columnwise
+!           manner, with diagonal lines of df/dy loaded into the rows
+!           of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+!           ML and MU are the half-bandwidth parameters. (See IUSER).
+!           The locations in PD in the two triangular areas which
+!           correspond to nonexistent matrix elements can be ignored
+!           or loaded arbitrarily, as they are overwritten by DVODE_F90.
+!           In the sparse matrix case the elements of the matrix
+!           are determined by the sparsity structure given by the
+!           IA and JA pointer arrays. Refer to the documentation
+!           prologue for SET_OPTS for a description of the arguments
+!           for JAC since they differ from the dense and banded cases.
+!           JAC need not provide df/dy exactly. A crude
+!           approximation (possibly with a smaller bandwidth) will do.
+!           In either case, PD is preset to zero by the solver,
+!           so that only the nonzero elements need be loaded by JAC.
+!           In the sparse matrix case, JAC has a different form:
+!                SUBROUTINE JAC (N, T, Y, IA, JA, NZ, PD)
+!           Given the number of odes N, the current time T, and the
+!           current solution vector Y, JAC must do the following:
+!              If NZ = 0 on input:
+!              Replace NZ by the number of nonzero elements in the
+!              Jacobian. The diagonal of the Jacobian must be included.
+!              Do NOT define the arrays IA, JA, PD at this time.
+!              Once JAC has been called with NZ = 0 and you have
+!              defined the value of NZ, future calls to JAC will use
+!              this value of NZ.
+!              When a call is made with NZ unequal to 0, you must
+!              define the sparsity structure arrays IA and JA, and
+!              the sparse Jacobian PD.
+!                 IA defines the number of nonzeros including the
+!                 diagonal in each column of the Jacobian. Define
+!                 IA(1) = 1 and for J = 1,..., N,
+!                 IA(J+1) = IA(J) + number of nonzeros in column J.
+!                 Diagonal elements must be included even if they are
+!                 zero. You should check to ensure that IA(N+1)-1 = NZ.
+!                 JA defines the rows in which the nonzeros occur.
+!                 For I = 1,...,NZ, JA(I) is the row in which the Ith
+!                 element of the Jacobian occurs. JA must also include
+!                 the diagonal elements of the Jacobian.
+!                 PD defines the numerical value of the Jacobian
+!                 elements. For I = 1,...,NZ, PD(I) is the numerical
+!                 value of the Ith element in the Jacobian. PD must
+!                 also include the diagonal elements of the Jacobian.
+! GFUN    = the name of the subroutine to evaluate the residuals for
+!           event functions. If you do not specify that events are
+!           present (by specifying NEVENTS > 0 in SET_OPTS), you
+!           need not include GFUN in your call list for DVODE_F90.
+!           If GFUN is not contained in a module available to your
+!           calling program, you must declare GFUN to be EXTERNAL
+!           in your calling program.
+! To continue the integration after a successful return, simply
+! reset TOUT and call DVODE_F90 again. No other parameters need
+! be reset unless ISTATE=3 in which case, reset it to 2 before
+! calling DVODE_F90 again.
+! ______________________________________________________________________
+! Section 3.  Choosing Error Tolerances
+!
+! This is the most important aspect of solving odes numerically.
+! You may supply any of four keywords and values. If you wish to
+! use scalar error tolerances, you should supply ABSERR and RELERR.
+! For a good many problems, it is advisable to supply a vector of
+! absolute error tolerances ABSERR_VECTOR = desired vector. This
+! allows you to use different tolerances for each component of
+! the solution. If ABSERR_VECTOR is supplied, it must be a vector
+! of length NEQ where NEQ is the number of odes in your system.
+! Similarly, you may supply a vector of relative error tolerances,
+! RELERR_VECTOR. If no tolerances are specified, DVODE_F90 will use
+! default error tolerances ABSERR=1D-6 and RELERR=1D-4; but it is
+! strongly recommended that you supply values that are appropriate
+! for your problem. In the event you do not supply error tolerances,
+! DVODE_F90 will print a reminder that the default error tolerances
+! are not appropriate for all problems.
+!
+! RELERR can be set to a scalar value as follows.
+! Determine the number of significant digits of accuracy desired, 
+! which will be a positive integer, say, N.
+! Then set RELERR = 10**-(N+1). 
+! The authors recommend that RELERR be no larger than 10**-4.
+! The authors recommend a vector valued absolute error tolerance,
+! which can be set as follows.
+! For the I-th component of the solution vector, Y(I), determine
+! the positive number FLOOR(I) at which ABS(Y(I)) becomes
+! negligible for the problem at hand. FLOOR(I) is sometimes called
+! the problem zero or the floor value for the I-th component and is
+! problem dependent. For a given problem that is not scaled, these
+! floor values may well vary by up to 9 orders of magnitude.
+! Set ABSERR(I) = FLOOR(I) or to be conservative
+! ABSERR_VECTOR(I) = 0.1*FLOOR(I). There is no variable FLOOR in
+! DVODE_F90. If it is difficult to divine the components of ABSERR,
+! (or FLOOR) make a reasonable guess, run the problem, then set that
+! ABSERR_VECTOR so for I = 1, 2,...NEQ,
+! ABSERR_VECTOR(I) = 1D-6*RELERR*MAX{ABS(Y(I,TOUT): for all TOUT}.
+! The correct choices for RELERR and ABSERR can and do have
+! significant impact on both the quality of the solution and run
+! time. Counter intuitively, error tolerances that are too loose
+! can and do increase run time significantly and the quality of
+! the solution may be seriously compromised.
+! Examples:
+! 1. OPTIONS = SET_OPTS(DENSE_J=.TRUE., ABSERR=1D-8,RELERR=1D-8)
+!    This will yield MF = 22. Both the relative error tolerance
+!    and the absolute error tolerance will equal 1D-8.
+! 2. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=1D-5, &
+!                       ABSERR_VECTOR=(/1D-6,1D-8/))
+!    For a system with NEQ=2 odes, this will yield MF = 22. A scalar
+!    relative error tolerance equal to 1D-5 will be used. Component 1
+!    of the solution will use an absolute error tolerance of 1D-6
+!    while component 2 will use an absolute error tolerance of 1D-8.
+! ______________________________________________________________________
+! Section 4.  Choosing the Method of Integration
+!
+! If you wish to specify a numerical value for METHOD_FLAG, it can equal
+! any of the legal values of MF for DVODE or LSODES. (See below.) If
+! you do not wish to specify a numerical value for METHOD_FLAG, you
+! may specify any combination of the five logical keywords DENSE_J,
+! BANDED_J, SPARSE_J, USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN that you
+! wish. Appropriate values will be used in DVODE_F90 for any variables
+! that are not present. The first three flags indicate the type of
+! Jacobian, dense, banded, or sparse. If USER_SUPPLIED_JACOBIAN=.TRUE.,
+! the Jacobian will be determined using the subroutine JAC you supply
+! in your call to DVODE_F90. Otherwise, an internal Jacobian will be
+! generated using finite differences.
+! Examples:
+! 1. OPTIONS = SET_OPTS(METHOD_FLAG=22,...)
+!    DVODE will use the value MF=22 as described in the documentation
+!    prologue. In this case, the stiff BDF methods will be used with
+!    a dense, internally generated Jacobian.
+! 2. OPTIONS = SET_OPTS(METHOD_FLAG=21,...)
+!    This is the same an Example 1 except that a user supplied dense
+!    Jacobian will be used and DVODE will use MF=21.
+! 3. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,...)
+!    This will yield MF = 22 as in Example 1, provided
+!    USER_SUPPLIED_JACOBIAN and SAVE_JACOBIAN are not present, or if
+!    present are set to their default
+!     values of .FALSE. and .TRUE., respectively.
+! 4. OPTIONS = SET_OPTS(DENSE_J=.TRUE.,&
+!                       USER_SUPPLIED_JACOBIAN=.TRUE.,...)
+!    This will yield MF = 21 as in Example 2, provided SAVE_JACOBIAN
+!    is not present, or if present is set to its default value .FALSE.
+! Notes:
+! 1. If you specify more than one of DENSE_J, BANDED_J, and SPARSE_J,
+!    DENSE_J takes precedence over BANDED_J which in turn takes
+!    precedence over SPARSE_J.
+! 2. By default, DVODE_F90 saves a copy of the Jacobian and reuses the
+!    copy when necessary. For problems in which storage requirements
+!    are acute, you may wish to override this default and have
+!    DVODE_F90 recalculate the Jacobian rather than use a saved copy.
+!    You can do this by specifying SAVE_JACOBIAN=.FALSE. It is
+!    recommended that you not do this unless necessary since it can
+!    have a significant impact on the efficiency of DVODE_F90. (For
+!    example, when solving a linear problem only one evaluation of
+!    the Jacobian is required with the default option.)
+! 3. If you choose BANDED_J = .TRUE. or if you supply a value of MF
+!    that corresponds to a banded Jacobian, you must also supply the
+!    lower  bandwidth ML and the upper bandwidth of the Jacobian MU
+!    by including the keywords
+!    LOWER_BANDWIDTH = value of ML and UPPER_BANDWIDTH = value of M
+!                   More on Method Selection
+! The keyword options available in SET_OPTS are intended to replace
+! the original method indicator flag MF. However, if you wish to
+! retain the flexibility of the original solver, you may specify MF
+! directly in your call to SET_OPTS. This is done by using the
+! keyword METHOD_FLAG=MF in your SET_OPTS where MF has any of the
+! values in the following description. Refer to the demonstration
+! program demosp.f90 for an example in which this is done.
+! MF     = The method flag. Used only for input. The legal values of
+!          MF are:
+!          10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26,
+!          27, -11, -12, -14, -15, -21, -22, -24, -25, -26, -27.
+!          MF is a signed two-digit integer, MF = JSV*(10*METH+MITER).
+!          JSV = SIGN(MF) indicates the Jacobian-saving strategy:
+!            JSV =  1 means a copy of the Jacobian is saved for reuse
+!                     in the corrector iteration algorithm.
+!            JSV = -1 means a copy of the Jacobian is not saved
+!                     (valid only for MITER = 1, 2, 4, or 5).
+!          METH indicates the basic linear multistep method:
+!            METH = 1 means the implicit Adams method.
+!            METH = 2 means the method based on backward
+!                     differentiation formulas (BDF-s).
+!          MITER indicates the corrector iteration method:
+!            MITER = 0 means functional iteration (no Jacobian matrix
+!                      is involved).
+!            MITER = 1 means chord iteration with a user-supplied
+!                      full (NEQ by NEQ) Jacobian.
+!            MITER = 2 means chord iteration with an internally
+!                      generated (difference quotient) full Jacobian
+!                      (using NEQ extra calls to F per df/dy value).
+!            MITER = 4 means chord iteration with a user-supplied
+!                      banded Jacobian.
+!            MITER = 5 means chord iteration with an internally
+!                      generated banded Jacobian (using ML+MU+1 extra
+!                      calls to F per df/dy evaluation).
+!            MITER = 6 means chord iteration with a user-supplied
+!                      sparse Jacobian.
+!            MITER = 7 means chord iteration with an internally
+!                      generated sparse Jacobian
+!          If MITER = 1, 4, or 6 the user must supply a subroutine
+!          JAC(the name is arbitrary) as described above under JAC.
+!          For other values of MITER, JAC need not be provided.
+! ______________________________________________________________________
+! Section 5.  Interpolation of the Solution and Derivative
+!
+! Following a successful return from DVODE_F90, you may call
+! subroutine DVINDY to interpolate the solution or derivative.
+! SUBROUTINE DVINDY(T, K, DKY, IFLAG)
+! DVINDY computes interpolated values of the K-th derivative of the
+! dependent variable vector y, and stores it in DKY. This routine
+! is called with K = 0 or K = 1 and T = TOUT. In either case, the
+! results are returned in the array DKY of length at least NEQ which
+! must be declared and dimensioned in your calling program. The
+! computed values in DKY are obtained by interpolation using the
+! Nordsieck history array.
+! ______________________________________________________________________
+! Section 6.  Handling Events (Root Finding)
+!
+!    DVODE_F90 contains root finding provisions. It attempts to
+!    locates the roots of a set of functions
+!         g(i) = g(i,t,y(1),...,y(NEQ))  (i = 1,...,ng).
+!    To use root finding include NEVENTS=NG in your call to SET_OPTS
+!    where NG is the number of root finding functions. You must then
+!    supply subroutine GFUN in your call to DVODE_F90 using
+!    G_FCN=GFUN as the last argument. GFUN must has the form
+!               SUBROUTINE GFUN(NEQ, T, Y, NG, GOUT)
+!    where NEQ, T, Y, and NG are input, and the array GOUT is output.
+!    NEQ, T, and Y have the same meaning as in the F routine, and
+!    GOUT is an array of length NG. For i = 1,...,NG, this routine is
+!    to load into GOUT(i) the value at (T,Y) of the i-th constraint
+!    function g(i). DVODE_F90 will find roots of the g(i) of odd
+!    multiplicity (i.e. sign changes) as they occur during the
+!    integration. GFUN must be declared EXTERNAL in the calling
+!    program. Note that because of numerical errors in the functions
+!    g(i) due to roundoff and integration error, DVODE_F90 may return
+!    false roots, or return the same root at two or more nearly equal
+!    values of t. This is particularly true for problems in which the
+!    integration is restarted (ISTATE = 1) at a root. If such false
+!    roots are suspected, you should consider smaller error tolerances
+!    and/or higher precision in the evaluation of the g(i). Note
+!    further that if a root of some g(i) defines the end of the
+!    problem, the input to DVODE_F90 should nevertheless allow
+!    integration to a point slightly past that root, so that DVODE_F90
+!    can locate the root by interpolation. Each time DVODE_F90 locates
+!    a root of one of your event functions it makes a return to the
+!    calling program with ISTATE = 3. When such a return is made and
+!    you have processed the results, simply change ISTATE = 2 and call
+!    DVODE_F90 again without making other changes.
+! ______________________________________________________________________
+! Section 7.  Gathering Integration Statistics
+!
+! SUBROUTINE GET_STATS(RSTATS, ISTATS, NUMEVENTS, JROOTS)
+! Caution:
+! RSTATS and ISTATS must be declared and dimensioned in your
+! main program. The minimum dimensions are:
+! DIMENSION RSTATS(22), ISTATS(31)
+! This subroutine returns the user portions of the original DVODE
+! RUSER and IUSER arrays, and if root finding is being done, it
+! returns the original LSODAR JROOT vector. NUMEVENTS and JROOTS
+! are optional parameters. NUMEVENTS is the number of root functions
+! and JROOTS is an integer array of length NUMEVENTS.
+! Available Integration Statistics:
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (E(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! MA28AD_CALLS      IUSER(23) The number of calls made to MA28AD
+! MA28BD_CALLS      IUSER(24) The number of calls made to MA28BD
+! MA28CD_CALLS      IUSER(25) The number of calls made to MA28CD
+! MC19AD_CALLS      IUSER(26) The number of calls made to MC19AD
+! IRNCP             IUSER(27) The number of compressions done on array JAN
+! ICNCP             IUSER(28) The number of compressions done on array ICN
+! MINIRN            IUSER(29) Minimum size for JAN array
+! MINICN            IUSER(30) Minimum size for ICN array
+! MINNZ             IUSER(31) Number of nonzeros in sparse Jacobian
+! JROOTS  JROOTS    Optional array of component indices for components
+!                   having a zero at the current time
+! ______________________________________________________________________
+! Section 8.  Determining Jacobian Sparsity Structure Arrays
+!
+! If you are solving a problem with a sparse Jacobian, the arrays
+! that define the sparsity structure are needed. The arrays may
+! be determined in any of several ways.
+! 1. If you choose the default mode by indicating SPARSE=.TRUE.,
+!    the sparsity arrays will be determined internally by DVODE_F90
+!    by making calls to your derivative subroutine. This mode is
+!    equivalent to using the integration method flag MF = 227.
+! 2. The DVODE_F90 method flag MF is defined to be
+!    MF = 100*MOSS + 10*METH + MITER. If you supply MF = 227 (or 217),
+!    the sparse Jacobian will be determined using finite differences;
+!    and the sparsity arrays will be determined by calling your
+!    derivative subroutine.
+! 3. If you supply MF = 126 (or 116), you must supply the Jacobian
+!    subroutine JAC to define the exact Jacobian. JAC must have the
+!    following form:
+!           SUBROUTINE JAC (N, T, Y, IA, JA, NZ, PD)
+!    Given the number of odes N, the current time T, and the current
+!    solution vector Y, JAC must do the following:
+!    -  If NZ = 0 on input:
+!       Replace NZ by the number of nonzero elements in the Jacobian.
+!       The diagonal of the Jacobian must be included.
+!       Do NOT define the arrays IA, JA, PD at this time.
+!       Once JAC has been called with NZ = 0 and you have defined the
+!       value of NZ, future calls to JAC will use this value of NZ.
+!    -  When a call is made with NZ unequal to 0, you must define the
+!       sparsity structure arrays IA and JA, and the sparse Jacobian
+!       PD.
+!         - IA defines the number of nonzeros including the diagonal
+!           in each column of the Jacobian. Define IA(1) = 1 and for
+!           J = 1,..., N,
+!           IA(J+1) = IA(J) + number of nonzeros in column J.
+!           Diagonal elements must be include even if they are zero.
+!           You should check to ensure that IA(N+1)-1 = NZ.
+!         - JA defines the rows in which the nonzeros occur. For
+!           I = 1,...,NZ, JA(I) is the row in which the Ith element
+!           of the Jacobian occurs. JA must also include the diagonal
+!           elements of the Jacobian.
+!         - PD defines the numerical value of the Jacobian elements.
+!           For I = 1,...,NZ, PD(I) is the numerical value of the
+!           Ith element in the Jacobian. PD must also include the
+!           diagonal elements of the Jacobian.
+! 4. If you wish to supply the IA and JA arrays directly, use
+!    MF = 27. In this case, after calling SET_OPTS, you must call
+!    SET_IAJA supplying the arrays IAUSER and JAUSER described in
+!    the documentation prologue for SET_IAJA. These arrays will be
+!    used when approximate Jacobians are determined using finite
+!    differences.
+! There are two user callable sparsity structure subroutines:
+! USERSETS_IAJA may be used if you wish to supply the sparsity
+! structure directly.
+! SUBROUTINE USERSETS_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!     Caution:
+!     If it is called, USERSETS_IAJA must be called after the
+!     call to SET_OPTS.
+!     Usage:
+!     CALL SET_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!     Arguments:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+! The second subroutine allows you to approximate the sparsity
+! structure using derivative differences. It allows more flexibility
+! in the determination of perturbation increments used.
+! SUBROUTINE SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER, &
+!   NIAUSER, JAUSER, NJAUSER)
+!     Caution:
+!     If it is called, SET_IAJA must be called after the call to
+!     SET_OPTS.
+!     Usage:
+!     SET_IAJA may be called in one of two ways:
+
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB)
+!       In this case IA and JA will be determined using calls
+!       to your derivative routine DFN.
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+!       JAUSER, NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!       T, Y, FMIN, NTURB, and DTURB will be ignored (though
+!       they must be present in the argument list).
+!     Arguments:
+!     DFN     = DVODE derivative subroutine
+!     NEQ     = Number of odes
+!     T       = independent variable t
+!     Y       = solution y(t)
+!     FMIN    = Jacobian threshold value. Elements of the Jacobian
+!               with magnitude smaller than FMIN will be ignored.
+!               FMIN will be ignored if it is less than or equal
+!               to ZERO.
+!     NTURB   = Perturbation flag. If NTURB=1, component I of Y
+!               will be perturbed by 1.01D0.
+!               If NTURB=NEQ, component I of Y will be perturbed
+!               by ONE + DTURB(I).
+!     DTURB   = perturbation vector of length 1 or NEQ.
+!     If these four optional parameters are present, IAUSER and JAUSER
+!     will be copied to IA and JA rather than making derivative calls
+!     to approximate IA and JA:
+!        IAUSER  = user supplied IA array
+!        NIAUSER = length of IAUSER array
+!        JAUSER  = user supplied JA vector
+!        NJAUSER = length of JAUSER array
+! ______________________________________________________________________
+! Section 9.  Original DVODE.F Documentation Prologue
+!
+! SUBROUTINE DVODE(F, NEQ, Y, T, TOUT, ITASK, ISTATE, OPTS, JAC, GFUN)
+! DVODE: Variable-coefficient Ordinary Differential Equation solver,
+! with fixed-leading-coefficient implementation.
+! Note:
+! Numerous changes have been made in the documentation and the code
+! from the original Fortran 77 DVODE solver. With regard to the new
+! F90 version, if you choose options that correspond to options
+! available in the original f77 solver, you should obtain the same
+! results. In all testing, identical results have been obtained
+! between this version and a simple F90 translation of the original
+! solver.
+! DVODE solves the initial value problem for stiff or nonstiff
+! systems of first order ODEs,
+!     dy/dt = f(t,y), or, in component form,
+!     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
+! DVODE is a package based on the EPISODE and EPISODEB packages, and
+! on the ODEPACK user interface standard, with minor modifications.
+! This version is based also on elements of LSODES and LSODAR.
+! Authors:
+!               Peter N. Brown and Alan C. Hindmarsh
+!               Center for Applied Scientific Computing, L-561
+!               Lawrence Livermore National Laboratory
+!               Livermore, CA 94551
+!               George D. Byrne
+!               Illinois Institute of Technology
+!               Chicago, IL 60616
+! References:
+! 1. P. N. Brown, G. D. Byrne, and A. C. Hindmarsh, "VODE: A Variable
+!    Coefficient ODE Solver," SIAM J. Sci. Stat. Comput., 10 (1989),
+!    pp. 1038-1051. Also, LLNL Report UCRL-98412, June 1988.
+! 2. G. D. Byrne and A. C. Hindmarsh, "A Polyalgorithm for the
+!    Numerical Solution of Ordinary Differential Equations,"
+!    ACM Trans. Math. Software, 1 (1975), pp. 71-96.
+! 3. A. C. Hindmarsh and G. D. Byrne, "EPISODE: An Effective Package
+!    for the Integration of Systems of Ordinary Differential
+!    Equations," LLNL Report UCID/30112, Rev. 1, April 1977.
+! 4. G. D. Byrne and A. C. Hindmarsh, "EPISODEB: An Experimental
+!    Package for the Integration of Systems of Ordinary Differential
+!    Equations with Banded Jacobians," LLNL Report UCID/30132, April
+!    1976.
+! 5. A. C. Hindmarsh, "ODEPACK, a Systematized Collection of ODE
+!    Solvers," in Scientific Computing, R. S. Stepleman et al., eds.,
+!    North-Holland, Amsterdam, 1983, pp. 55-64.
+! 6. K. R. Jackson and R. Sacks-Davis, "An Alternative Implementation
+!    of Variable Step-Size Multistep Formulas for Stiff ODEs," ACM
+!    Trans. Math. Software, 6 (1980), pp. 295-318.
+!                     Summary of Usage
+! Communication between the user and the DVODE package, for normal
+! situations, is summarized here. This summary describes only a subset
+! of the full set of options available. See the full description for
+! details, including optional communication, nonstandard options,
+! and instructions for special situations. See also the example
+! problem (with program and output) following this summary.
+! A. First provide a subroutine of the form:
+!           SUBROUTINE F(NEQ, T, Y, YDOT)
+!           REAL(KIND=WP) T, Y(NEQ), YDOT(NEQ)
+! which supplies the vector function f by loading YDOT(i) with f(i).
+! B. Next determine (or guess) whether or not the problem is stiff.
+! Stiffness occurs when the Jacobian matrix df/dy has an eigenvalue
+! whose real part is negative and large in magnitude, compared to the
+! reciprocal of the t span of interest. If the problem is nonstiff,
+! use a method flag MF = 10. If it is stiff, there are four standard
+! choices for MF(21, 22, 24, 25), and DVODE requires the Jacobian
+! matrix in some form. In these cases (MF > 0), DVODE will use a
+! saved copy of the Jacobian matrix. If this is undesirable because of
+! storage limitations, set MF to the corresponding negative value
+! (-21, -22, -24, -25). (See full description of MF below.)
+! The Jacobian matrix is regarded either as full (MF = 21 or 22),
+! or banded (MF = 24 or 25). In the banded case, DVODE requires two
+! half-bandwidth parameters ML and MU. These are, respectively, the
+! widths of the lower and upper parts of the band, excluding the main
+! diagonal. Thus the band consists of the locations (i,j) with
+! i-ML <= j <= i+MU, and the full bandwidth is ML+MU+1.
+! C. If the problem is stiff, you are encouraged to supply the Jacobian
+! directly (MF = 21 or 24), but if this is not feasible, DVODE will
+! compute it internally by difference quotients (MF = 22 or 25).
+! If you are supplying the Jacobian, provide a subroutine of the form:
+!           SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!           REAL(KIND=WP) T, Y(NEQ), PD(NROWPD,NEQ)
+! which supplies df/dy by loading PD as follows:
+!     For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+! the partial derivative of f(i) with respect to y(j). (Ignore the
+! ML and MU arguments in this case.)
+!     For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with
+! df(i)/dy(j), i.e. load the diagonal lines of df/dy into the rows of
+! PD from the top down.
+!     In either case, only nonzero elements need be loaded.
+! D. Write a main program which calls subroutine DVODE once for
+! each point at which answers are desired. This should also provide
+! for possible use of logical unit 6 for output of error messages
+! by DVODE. On the first call to DVODE, supply arguments as follows:
+! F      = Name of subroutine for right-hand side vector f.
+!          This name must be declared external in calling program.
+! NEQ    = Number of first order ODEs.
+! Y      = Array of initial values, of length NEQ.
+! T      = The initial value of the independent variable.
+! TOUT   = First point where output is desired (/= T).
+! ITOL   = 1 or 2 according as ATOL(below) is a scalar or array.
+! RTOL   = Relative tolerance parameter (scalar).
+! ATOL   = Absolute tolerance parameter (scalar or array).
+!          The estimated local error in Y(i) will be controlled so as
+!          to be roughly less (in magnitude) than
+!             EWT(i) = RTOL*ABS(Y(i)) + ATOL     if ITOL = 1, or
+!             EWT(i) = RTOL*ABS(Y(i)) + ATOL(i)  if ITOL = 2.
+!          Thus the local error test passes if, in each component,
+!          either the absolute error is less than ATOL(or ATOL(i)),
+!          or the relative error is less than RTOL.
+!          Use RTOL = 0.0 for pure absolute error control, and
+!          use ATOL = 0.0 (or ATOL(i) = 0.0) for pure relative error
+!          control. Caution: Actual (global) errors may exceed these
+!          local tolerances, so choose them conservatively.
+! ITASK  = 1 for normal computation of output values of Y at t = TOUT.
+! ISTATE = Integer flag (input and output). Set ISTATE = 1.
+! IOPT   = 0 to indicate no optional input used.
+! JAC    = Name of subroutine for Jacobian matrix (MF = 21 or 24).
+!          If used, this name must be declared external in calling
+!          program. If not used, pass a dummy name.
+! MF     = Method flag. Standard values are:
+!          10 for nonstiff (Adams) method, no Jacobian used.
+!          21 for stiff (BDF) method, user-supplied full Jacobian.
+!          22 for stiff method, internally generated full Jacobian.
+!          24 for stiff method, user-supplied banded Jacobian.
+!          25 for stiff method, internally generated banded Jacobian.
+! E. The output from the first call (or any call) is:
+!      Y = Array of computed values of y(t) vector.
+!      T = Corresponding value of independent variable (normally TOUT).
+! ISTATE = 2  if DVODE was successful, negative otherwise.
+!          -1 means excess work done on this call. (Perhaps wrong MF.)
+!          -2 means excess accuracy requested. (Tolerances too small.)
+!          -3 means illegal input detected. (See printed message.)
+!          -4 means repeated error test failures. (Check all input.)
+!          -5 means repeated convergence failures. (Perhaps bad
+!             Jacobian supplied or wrong choice of MF or tolerances.)
+!          -6 means error weight became zero during problem. (Solution
+!             component I vanished, and ATOL or ATOL(I) = 0.)
+! F. To continue the integration after a successful return, simply
+! reset TOUT and call DVODE again. No other parameters need be reset.
+!         Full Description of User Interface to DVODE
+! The user interface to DVODE consists of the following parts.
+! i.  The call sequence to subroutine DVODE, which is a driver
+!      routine for the solver. This includes descriptions of both
+!      the call sequence arguments and of user-supplied routines.
+!      Following these descriptions is
+!        * a description of optional input available through the
+!          call sequence,
+!        * a description of optional output (in the work arrays), and
+!        * instructions for interrupting and restarting a solution.
+! ii. Descriptions of other routines in the DVODE package that may be
+!      (optionally) called by the user. These provide the ability to
+!      alter error message handling, save and restore the internal
+!      PRIVATE variables, and obtain specified derivatives of the
+!      solution y(t).
+! iii. Descriptions of PRIVATE variables to be declared in overlay
+!      or similar environments.
+! iv. Description of two routines in the DVODE package, either of
+!      which the user may replace with his own version, if desired.
+!      these relate to the measurement of errors.
+! Part i. Call Sequence.
+! The call sequence parameters used for input only are
+!     F, NEQ, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, JAC, MF,
+! and those used for both input and output are
+!     Y, T, ISTATE.
+! The work arrays RUSER and IUSER are used for conditional and
+! optional input and optional output. (The term output here refers
+! to the return from subroutine DVODE to the user's calling program.)
+! The legality of input parameters will be thoroughly checked on the
+! initial call for the problem, but not checked thereafter unless a
+! change in input parameters is flagged by ISTATE = 3 in the input.
+! The descriptions of the call arguments are as follows.
+! F      = The name of the user-supplied subroutine defining the
+!          ODE system. The system must be put in the first-order
+!          form dy/dt = f(t,y), where f is a vector-valued function
+!          of the scalar t and the vector y. Subroutine F is to
+!          compute the function f. It is to have the form
+!               SUBROUTINE F(NEQ, T, Y, YDOT)
+!               REAL(KIND=WP) T, Y(NEQ), YDOT(NEQ)
+!          where NEQ, T, and Y are input, and the array YDOT = f(t,y)
+!          is output. Y and YDOT are arrays of length NEQ.
+!          Subroutine F should not alter Y(1),...,Y(NEQ).
+!          F must be declared EXTERNAL in the calling program.
+
+!          If quantities computed in the F routine are needed
+!          externally to DVODE, an extra call to F should be made
+!          for this purpose, for consistent and accurate results.
+!          If only the derivative dy/dt is needed, use DVINDY instead.
+! NEQ    = The size of the ODE system (number of first order
+!          ordinary differential equations). Used only for input.
+!          NEQ may not be increased during the problem, but
+!          can be decreased (with ISTATE = 3 in the input).
+! Y      = A real array for the vector of dependent variables, of
+!          length NEQ or more. Used for both input and output on the
+!          first call (ISTATE = 1), and only for output on other calls.
+!          On the first call, Y must contain the vector of initial
+!          values. In the output, Y contains the computed solution
+!          evaluated at T. If desired, the Y array may be used
+!          for other purposes between calls to the solver.
+!          This array is passed as the Y argument in all calls to
+!          F and JAC.
+! T      = The independent variable. In the input, T is used only on
+!          the first call, as the initial point of the integration.
+!          In the output, after each call, T is the value at which a
+!          computed solution Y is evaluated (usually the same as TOUT).
+!          On an error return, T is the farthest point reached.
+! TOUT   = The next value of t at which a computed solution is desired.
+!          Used only for input.
+!          When starting the problem (ISTATE = 1), TOUT may be equal
+!          to T for one call, then should /= T for the next call.
+!          For the initial T, an input value of TOUT /= T is used
+!          in order to determine the direction of the integration
+!          (i.e. the algebraic sign of the step sizes) and the rough
+!          scale of the problem. Integration in either direction
+!          (forward or backward in t) is permitted.
+!          If ITASK = 2 or 5 (one-step modes), TOUT is ignored after
+!          the first call (i.e. the first call with TOUT /= T).
+!          Otherwise, TOUT is required on every call.
+!          If ITASK = 1, 3, or 4, the values of TOUT need not be
+!          monotone, but a value of TOUT which backs up is limited
+!          to the current internal t interval, whose endpoints are
+!          TCUR - HU and TCUR. (See optional output, below, for
+!          TCUR and HU.)
+! ITOL   = An indicator for the type of error control. See
+!          description below under ATOL. Used only for input.
+! RTOL   = A relative error tolerance parameter, either a scalar or
+!          an array of length NEQ. See description below under ATOL.
+!          Input only.
+! ATOL   = An absolute error tolerance parameter, either a scalar or
+!          an array of length NEQ. Input only.
+!          The input parameters ITOL, RTOL, and ATOL determine
+!          the error control performed by the solver. The solver will
+!          control the vector e = (e(i)) of estimated local errors
+!          in Y, according to an inequality of the form
+!                      rms-norm of (E(i)/EWT(i)) <= 1,
+!          where       EWT(i) = RTOL(i)*ABS(Y(i)) + ATOL(i),
+!          and the rms-norm (root-mean-square norm) here is
+!          rms-norm(v) = sqrt(sum v(i)**2 / NEQ). Here EWT
+!          is a vector of weights which must always be positive, and
+!          the values of RTOL and ATOL should all be nonnegative.
+!          The following table gives the types (scalar/array) of
+!          RTOL and ATOL, and the corresponding form of EWT(i).
+!           ITOL    RTOL       ATOL          EWT(i)
+!            1     scalar     scalar     RTOL*ABS(Y(i)) + ATOL
+!            2     scalar     array      RTOL*ABS(Y(i)) + ATOL(i)
+!            3     array      scalar     RTOL(i)*ABS(Y(i)) + ATOL
+!            4     array      array      RTOL(i)*ABS(Y(i)) + ATOL(i)
+!          When either of these parameters is a scalar, it need not
+!          be dimensioned in the user's calling program.
+!          If none of the above choices (with ITOL, RTOL, and ATOL
+!          fixed throughout the problem) is suitable, more general
+!          error controls can be obtained by substituting
+!          user-supplied routines for the setting of EWT and/or for
+!          the norm calculation. See Part iv below.
+!          If global errors are to be estimated by making a repeated
+!          run on the same problem with smaller tolerances, then all
+!          components of RTOL and ATOL(i.e. of EWT) should be scaled
+!          down uniformly.
+! ITASK  = An index specifying the task to be performed.
+!          Input only. ITASK has the following values and meanings.
+!          1  means normal computation of output values of y(t) at
+!             t = TOUT(by overshooting and interpolating).
+!          2  means take one step only and return.
+!          3  means stop at the first internal mesh point at or
+!             beyond t = TOUT and return.
+!          4  means normal computation of output values of y(t) at
+!             t = TOUT but without overshooting t = TCRIT.
+!             TCRIT must be input as RUSER(1). TCRIT may be equal to
+!             or beyond TOUT, but not behind it in the direction of
+!             integration. This option is useful if the problem
+!             has a singularity at or beyond t = TCRIT.
+!          5  means take one step, without passing TCRIT, and return.
+!             TCRIT must be input as RUSER(1).
+!          Note:  If ITASK = 4 or 5 and the solver reaches TCRIT
+!          (within roundoff), it will return T = TCRIT(exactly) to
+!          indicate this (unless ITASK = 4 and TOUT comes before TCRIT,
+!          in which case answers at T = TOUT are returned first).
+! ISTATE = an index used for input and output to specify the
+!          the state of the calculation.
+!          In the input, the values of ISTATE are as follows.
+!          1  means this is the first call for the problem
+!             (initializations will be done). See note below.
+!          2  means this is not the first call, and the calculation
+!             is to continue normally, with no change in any input
+!             parameters except possibly TOUT and ITASK.
+!             (If ITOL, RTOL, and/or ATOL are changed between calls
+!             with ISTATE = 2, the new values will be used but not
+!             tested for legality.)
+!          3  means this is not the first call, and the
+
+!             calculation is to continue normally, but with
+!             a change in input parameters other than
+!             TOUT and ITASK. Changes are allowed in
+!             NEQ, ITOL, RTOL, ATOL, IOPT, MF, ML, MU,
+!             and any of the optional input except H0.
+!             (See IUSER description for ML and MU.)
+!          Caution:
+!          If you make a call to DVODE_F90 with ISTATE=3, you will
+!          first need to call SET_OPTS again, supplying the new
+!          necessary option values.
+!          Note:  A preliminary call with TOUT = T is not counted
+!          as a first call here, as no initialization or checking of
+!          input is done. (Such a call is sometimes useful to include
+!          the initial conditions in the output.)
+!          Thus the first call for which TOUT /= T requires
+!          ISTATE = 1 in the input.
+!          In the output, ISTATE has the following values and meanings.
+!           1  means nothing was done, as TOUT was equal to T with
+!              ISTATE = 1 in the input.
+!           2  means the integration was performed successfully.
+!          -1  means an excessive amount of work (more than MXSTEP
+!              steps) was done on this call, before completing the
+!              requested task, but the integration was otherwise
+!              successful as far as T. (MXSTEP is an optional input
+!              and is normally 5000.)  To continue, the user may
+!              simply reset ISTATE to a value > 1 and call again.
+!              (The excess work step counter will be reset to 0.)
+!              In addition, the user may increase MXSTEP to avoid
+!              this error return. (See optional input below.)
+!          -2  means too much accuracy was requested for the precision
+!              of the machine being used. This was detected before
+!              completing the requested task, but the integration
+!              was successful as far as T. To continue, the tolerance
+!              parameters must be reset, and ISTATE must be set
+!              to 3. The optional output TOLSF may be used for this
+!              purpose. (Note: If this condition is detected before
+!              taking any steps, then an illegal input return
+!              (ISTATE = -3) occurs instead.)
+!          -3  means illegal input was detected, before taking any
+!              integration steps. See written message for details.
+!              Note:  If the solver detects an infinite loop of calls
+!              to the solver with illegal input, it will cause
+!              the run to stop.
+!          -4  means there were repeated error test failures on
+!              one attempted step, before completing the requested
+!              task, but the integration was successful as far as T.
+!              The problem may have a singularity, or the input
+!              may be inappropriate.
+!          -5  means there were repeated convergence test failures on
+!              one attempted step, before completing the requested
+!              task, but the integration was successful as far as T.
+!              This may be caused by an inaccurate Jacobian matrix,
+!              if one is being used.
+!          -6  means EWT(i) became zero for some i during the
+!              integration. Pure relative error control (ATOL(i)=0.0)
+!              was requested on a variable which has now vanished.
+!              The integration was successful as far as T.
+!          Note:  Since the normal output value of ISTATE is 2,
+!          it does not need to be reset for normal continuation.
+!          Also, since a negative input value of ISTATE will be
+!          regarded as illegal, a negative output value requires the
+!          user to change it, and possibly other input, before
+!          calling the solver again.
+! IOPT   = An integer flag to specify whether or not any optional
+!          input is being used on this call. Input only.
+!          The optional input is listed separately below.
+!          IOPT = 0 means no optional input is being used.
+!                   Default values will be used in all cases.
+!          IOPT = 1 means optional input is being used.
+! RUSER  = A real working array (real(wp)).
+!          The length of RUSER must be at least 22
+!             20 + NYH * (MAXORD + 1) where
+!          NYH    = the initial value of NEQ,
+!          MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a
+!                   smaller value is given as an optional input),
+!          The first 22 words of RUSER are reserved for conditional
+!          and optional input and optional output.
+
+!          The following word in RUSER is a conditional input:
+!            RUSER(1) = TCRIT = critical value of t which the solver
+!                       is not to overshoot. Required if ITASK is
+!                       4 or 5, and ignored otherwise. (See ITASK.)
+! IUSER  = An integer work array. The length of IUSER must be at least 30.
+!             30        if MITER = 0 or 3 (MF = 10, 13, 20, 23), or
+!             30 + NEQ  otherwise (ABS(MF) = 11,12,14,15,16,17,21,22,
+!             24,25,26,27).
+!          The first 30 words of IUSER are reserved for conditional and
+!          optional input and optional output.
+
+!          The following 2 words in IUSER are conditional input:
+!            IUSER(1) = ML  These are the lower and upper
+!            IUSER(2) = MU  half-bandwidths, respectively, of the
+!                       banded Jacobian, excluding the main diagonal.
+!                       The band is defined by the matrix locations
+!                       (i,j) with i-ML <= j <= i+MU. ML and MU
+!                       must satisfy  0 <= ML,MU  <= NEQ-1.
+!                       These are required if MITER is 4 or 5, and
+!                       ignored otherwise. ML and MU may in fact be
+!                       the band parameters for a matrix to which
+!                       df/dy is only approximately equal.
+! Note:  The work arrays must not be altered between calls to DVODE
+! for the same problem, except possibly for the conditional and
+! optional input, and except for the last 3*NEQ words of RUSER.
+! The latter space is used for internal scratch space, and so is
+! available for use by the user outside DVODE between calls, if
+! desired (but not for use by F or JAC).
+! JAC    = The name of the user-supplied routine (MITER = 1 or 4 or 6)
+!          to compute the Jacobian matrix, df/dy, as a function of
+!          the scalar t and the vector y. It is to have the form
+!               SUBROUTINE JAC(NEQ, T, Y, ML, MU, PD, NROWPD)
+!               REAL(KIND=WP) T, Y(NEQ), PD(NROWPD,NEQ)
+!          where NEQ, T, Y, ML, MU, and NROWPD are input and the array
+!          PD is to be loaded with partial derivatives (elements of the
+!          Jacobian matrix) in the output. PD must be given a first
+!          dimension of NROWPD. T and Y have the same meaning as in
+!          Subroutine F.
+!               In the full matrix case (MITER = 1), ML and MU are
+!          ignored, and the Jacobian is to be loaded into PD in
+!          columnwise manner, with df(i)/dy(j) loaded into PD(i,j).
+!               In the band matrix case (MITER = 4), the elements
+!          within the band are to be loaded into PD in columnwise
+!          manner, with diagonal lines of df/dy loaded into the rows
+!          of PD. Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).
+!          ML and MU are the half-bandwidth parameters. (See IUSER).
+!          The locations in PD in the two triangular areas which
+!          correspond to nonexistent matrix elements can be ignored
+!          or loaded arbitrarily, as they are overwritten by DVODE.
+!               In the sparse matrix case the elements of the matrix
+!          are determined by the sparsity structure given by the
+!          IA and JA pointer arrays. Refer to the documentation
+!          prologue for SET_OPTS for a description of the arguments
+!          for JAC since they differ from the dense and banded cases.
+!               JAC need not provide df/dy exactly. A crude
+!          approximation (possibly with a smaller bandwidth) will do.
+!               In either case, PD is preset to zero by the solver,
+!          so that only the nonzero elements need be loaded by JAC.
+!          Each call to JAC is preceded by a call to F with the same
+!          arguments NEQ, T, and Y. Thus to gain some efficiency,
+!          intermediate quantities shared by both calculations may be
+!          saved in a user common block by F and not recomputed by JAC,
+!          if desired. Also, JAC may alter the Y array, if desired.
+!          JAC must be declared external in the calling program.
+! MF     = The method flag. Used only for input. The legal values of
+!          MF are 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24,
+!          25, 26, 27, -11, -12, -14, -15, -21, -22, -24, -25, -26,
+!          -27.
+!          MF is a signed two-digit integer, MF = JSV*(10*METH+MITER).
+!          JSV = SIGN(MF) indicates the Jacobian-saving strategy:
+!            JSV =  1 means a copy of the Jacobian is saved for reuse
+!                     in the corrector iteration algorithm.
+!            JSV = -1 means a copy of the Jacobian is not saved
+!                     (valid only for MITER = 1, 2, 4, or 5).
+!          METH indicates the basic linear multistep method:
+!            METH = 1 means the implicit Adams method.
+!            METH = 2 means the method based on backward
+!                     differentiation formulas (BDF-s).
+!          MITER indicates the corrector iteration method:
+!            MITER = 0 means functional iteration (no Jacobian matrix
+!                      is involved).
+!            MITER = 1 means chord iteration with a user-supplied
+!                      full (NEQ by NEQ) Jacobian.
+!            MITER = 2 means chord iteration with an internally
+!                      generated (difference quotient) full Jacobian
+!                      (using NEQ extra calls to F per df/dy value).
+!            MITER = 3 means chord iteration with an internally
+!                      generated diagonal Jacobian approximation
+!                      (using 1 extra call to F per df/dy evaluation).
+!            MITER = 4 means chord iteration with a user-supplied
+!                      banded Jacobian.
+!            MITER = 5 means chord iteration with an internally
+!                      generated banded Jacobian (using ML+MU+1 extra
+!                      calls to F per df/dy evaluation).
+!            MITER = 6 means chord iteration with a user-supplied
+!                      sparse Jacobian.
+!            MITER = 7 means chord iteration with an internally
+!                      generated sparse Jacobian
+!          If MITER = 1, 4, or 6 the user must supply a subroutine
+!          JAC(the name is arbitrary) as described above under JAC.
+!          For other values of MITER, a dummy argument can be used.
+!                         Optional Input
+! The following is a list of the optional input provided for in the
+! call sequence. (See also Part ii.)  For each such input variable,
+! this table lists its name as used in this documentation, its
+! location in the call sequence, its meaning, and the default value.
+! The use of any of this input requires IOPT = 1, and in that
+! case all of this input is examined. A value of zero for any of
+! these optional input variables will cause the default value to be
+! used. Thus to use a subset of the optional input, simply preload
+! locations 5 to 10 in RUSER and IUSER to 0.0 and 0, respectively,
+! and then set those of interest to nonzero values.
+! NAME    LOCATION      MEANING AND DEFAULT VALUE
+! H0      RUSER(5)  The step size to be attempted on the first step.
+!                   The default value is determined by the solver.
+! HMAX    RUSER(6)  The maximum absolute step size allowed.
+!                   The default value is infinite.
+! HMIN    RUSER(7)  The minimum absolute step size allowed.
+!                   The default value is 0. (This lower bound is not
+!                   enforced on the final step before reaching TCRIT
+!                   when ITASK = 4 or 5.)
+! MAXORD  IUSER(5)  The maximum order to be allowed. The default
+!                   value is 12 if METH = 1, and 5 if METH = 2.
+!                   If MAXORD exceeds the default value, it will
+!                   be reduced to the default value.
+!                   If MAXORD is changed during the problem, it may
+!                   cause the current order to be reduced.
+! MXSTEP  IUSER(6)  Maximum number of (internally defined) steps
+!                   allowed during one call to the solver.
+!                   The default value is 5000.
+! MXHNIL  IUSER(7)  Maximum number of messages printed (per problem)
+!                   warning that T + H = T on a step (H = step size).
+!                   This must be positive to result in a non-default
+!                   value. The default value is 10.
+!                          Optional Output
+! As optional additional output from DVODE, the variables listed
+! below are quantities related to the performance of DVODE
+! which are available to the user. These are communicated by way of
+! the work arrays, but also have internal mnemonic names as shown.
+! Except where stated otherwise, all of this output is defined
+! on any successful return from DVODE, and on any return with
+! ISTATE = -1, -2, -4, -5, or -6. On an illegal input return
+! (ISTATE = -3), they will be unchanged from their existing values
+! (if any), except possibly for TOLSF, LENRW, and LENIW.
+! On any error return, output relevant to the error will be defined,
+! as noted below.
+! NAME    LOCATION      MEANING
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (e(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! The following two arrays are segments of the RUSER array which
+! may also be of interest to the user as optional output.
+! For each array, the table below gives its internal name,
+! its base address in RUSER, and its description.
+!                  Interrupting and Restarting
+! If the integration of a given problem by DVODE is to be interrupted
+! and then later continued, such as when restarting an interrupted run
+! or alternating between two or more ODE problems, the user should save,
+! following the return from the last DVODE call prior to the
+! interruption, the contents of the call sequence variables and
+! internal PRIVATE variables, and later restore these values before the
+! next DVODE call for that problem. To save and restore the PRIVATE
+! variables, use subroutine DVSRCO, as described below in part ii.
+! In addition, if non-default values for either LUN or MFLAG are
+! desired, an extra call to XSETUN and/or XSETF should be made just
+! before continuing the integration. See Part ii below for details.
+! Part ii. Other Routines Callable.
+! The following are optional calls which the user may make to
+! gain additional capabilities in conjunction with DVODE.
+! (The routines XSETUN and XSETF are designed to conform to the
+! SLATEC error handling package.)
+!     FORM OF CALL                  FUNCTION
+!  CALL XSETUN(LUN)           Set the logical unit number, LUN, for
+!                             output of messages from DVODE, if
+!                             the default is not desired.
+!                             The default value of LUN is 6.
+!  CALL XSETF(MFLAG)          Set a flag to control the printing of
+!                             messages by DVODE.
+!                             MFLAG = 0 means do not print. (Danger:
+!                             This risks losing valuable information.)
+!                             Either of the above calls may be made at
+!                             any time and will take effect immediately.
+!  CALL DVINDY(...)           Provide derivatives of y, of various
+!                             orders, at a specified point T, if
+!                             desired. It may be called only after
+!                             a successful return from DVODE.
+! The detailed instructions for using DVINDY are as follows.
+! The form of the call is:
+!      CALL DVINDY(T,K,DKY,IFLAG)
+! The input parameters are:
+! T         = Value of independent variable where answers are desired
+!             (normally the same as the T last returned by DVODE).
+!             For valid results, T must lie between TCUR - HU and TCUR.
+!             (See optional output for TCUR and HU.)
+! K         = Integer order of the derivative desired. K must satisfy
+!             0 <= K <= NQCUR, where NQCUR is the current order
+!             (see optional output). The capability corresponding
+!             to K = 0, i.e. computing y(T), is already provided
+!             by DVODE directly. Since NQCUR >= 1, the first
+!             derivative dy/dt is always available with DVINDY.
+! The output parameters are:
+! DKY       = A real array of length NEQ containing the computed value
+!             of the K-th derivative of y(t).
+! IFLAG     = Integer flag, returned as 0 if K and T were legal,
+!             -1 if K was illegal, and -2 if T was illegal.
+!             On an error return, a message is also written.
+! Part iii. Optionally Replaceable Solver Routines.
+! Below are descriptions of two routines in the DVODE package which
+! relate to the measurement of errors. Either routine can be
+! replaced by a user-supplied version, if desired. However, since such
+! a replacement may have a major impact on performance, it should be
+! done only when absolutely necessary, and only with great caution.
+! (Note: The means by which the package version of a routine is
+! superseded by the user's version may be system-dependent.)
+! (a) DEWSET.
+! The following subroutine is called just before each internal
+! integration step, and sets the array of error weights, EWT, as
+! described under ITOL/RTOL/ATOL above:
+!     SUBROUTINE DEWSET(NEQ, ITOL, RTOL, ATOL, YCUR, EWT)
+! where NEQ, ITOL, RTOL, and ATOL are as in the DVODE call sequence,
+! YCUR contains the current dependent variable vector, and
+! EWT is the array of weights set by DEWSET.
+! If the user supplies this subroutine, it must return in EWT(i)
+! (i = 1,...,NEQ) a positive quantity suitable for comparison with
+! errors in Y(i). The EWT array returned by DEWSET is passed to the
+! DVNORM function (See below.), and also used by DVODE in the
+! computation of the optional output IMXER, the diagonal Jacobian
+! approximation, and the increments for difference quotient Jacobians.
+! In the user-supplied version of DEWSET, it may be desirable to use
+! the current values of derivatives of y. Derivatives up to order NQ
+! are available from the history array YH, described above under
+! Optional Output. In DEWSET, YH is identical to the YCUR array,
+! extended to NQ + 1 columns with a column length of NYH and scale
+! factors of h**j/factorial(j). On the first call for the problem,
+! given by NST = 0, NQ is 1 and H is temporarily set to 1.0.
+! NYH is the initial value of NEQ. Thus, for example, the current
+! value of dy/dt can be obtained as YCUR(NYH+i)/H  (i=1,...,NEQ)
+! (and the division by H is unnecessary when NST = 0).
+! (b) DVNORM.
+! The following is a function which computes the weighted
+! root-mean-square norm of a vector v:
+!     D = DVNORM(N, V, W)
+! where:
+!   N = the length of the vector,
+!   V = real array of length N containing the vector,
+!   W = real array of length N containing weights,
+!   D = sqrt((1/N) * sum(V(i)*W(i))**2).
+! DVNORM is called with N = NEQ and with W(i) = 1.0/EWT(i), where
+! EWT is as set by subroutine DEWSET.
+! If the user supplies this routine, it should return a nonnegative
+! value of DVNORM suitable for use in the error control in DVODE.
+! None of the arguments should be altered by DVNORM.
+! For example, a user-supplied DVNORM function might:
+!   -substitute a max-norm of (V(i)*W(i)) for the rms-norm, or
+!   -ignore some components of V in the norm, with the effect of
+!    suppressing the error control on those components of Y.
+!_______________________________________________________________________
+! Other Routines in the DVODE Package
+
+! In addition to subroutine DVODE, the DVODE package includes the
+! following subroutines and function routines (not user callable):
+!  DVHIN       computes an approximate step size for the initial step.
+!  DVINDY_CORE computes an interpolated value of the y vector at t=TOUT.
+!  DVINDY      computes an interpolated value of the y vector at t=TOUT.
+!              (user callable)
+!  DVSTEP      is the core integrator, which does one step of the
+!              integration and the associated error control.
+!  DVSET       sets all method coefficients and test constants.
+!  DVNLSD,     solves the underlying nonlinear system -- the corrector.
+!  DVNLSS28
+!  DVJAC,      computes and preprocesses the Jacobian matrix J = df/dy
+!  DVJACS28    and the Newton iteration matrix P = I - (h/l1)*J.
+!  DVSOL,      manages solution of linear system in chord iteration.
+!  DVSOLS28
+!  DVJUST      adjusts the history array on a change of order.
+!  DEWSET      sets the error weight vector EWT before each step.
+!  DVNORM      computes the weighted r.m.s. norm of a vector.
+!  DACOPY      is a routine to copy a two-dimensional array to another.
+!  DGEFA_F90 and DGESL_F90 are routines from LINPACK for solving full
+!              systems of linear algebraic equations.
+!  DGBFA_F90 and DGBSL_F90 are routines from LINPACK for solving banded
+!              linear systems.
+!  DAXPY_F90, DSCAL_F90, and DCOPY_F90 are basic linear algebra modules
+!              (BLAS).
+!  DVCHECK     does preliminary checking for roots, and serves as an
+!              interface between subroutine DVODE_F90 and subroutine
+!              DVROOTS.
+!  DVROOTS     finds the leftmost root of a set of functions.
+! ______________________________________________________________________
+! Section 10.  Example Usage
+!
+! MODULE example1
+! The following is a simple example problem, with the coding
+! needed for its solution by DVODE_F90. The problem is from
+! chemical kinetics, and consists of the following three rate
+! equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! The following coding solves this problem with DVODE_F90,
+! using a user supplied Jacobian and printing results at
+! t = .4, 4.,...,4.d10. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values. At
+! the end of the run, statistical quantities of interest are
+! printed. (See optional output in the full DVODE description
+! below.) Output is written to the file example1.dat.
+! CONTAINS
+!     SUBROUTINE FEX(NEQ, T, Y, YDOT)
+!     IMPLICIT NONE
+!     INTEGER NEQ
+!     DOUBLE PRECISION T, Y, YDOT
+!     DIMENSION Y(NEQ), YDOT(NEQ)
+!     YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
+!     YDOT(3) = 3.E7*Y(2)*Y(2)
+!     YDOT(2) = -YDOT(1) - YDOT(3)
+!     RETURN
+!     END SUBROUTINE FEX
+!     SUBROUTINE JEX(NEQ, T, Y, ML, MU, PD, NRPD)
+!     IMPLICIT NONE
+!     INTEGER NEQ,ML,MU,NRPD
+!     DOUBLE PRECISION PD, T, Y
+!     DIMENSION Y(NEQ), PD(NRPD,NEQ)
+!     PD(1,1) = -.04D0
+!     PD(1,2) = 1.D4*Y(3)
+!     PD(1,3) = 1.D4*Y(2)
+!     PD(2,1) = .04D0
+!     PD(2,3) = -PD(1,3)
+!     PD(3,2) = 6.E7*Y(2)
+!     PD(2,2) = -PD(1,2) - PD(3,2)
+!     RETURN
+!     END SUBROUTINE JEX
+! END MODULE example1
+!******************************************************************
+
+!     PROGRAM runexample1
+!     USE DVODE_F90_M
+!     USE example1
+!     IMPLICIT NONE
+!     DOUBLE PRECISION ATOL, RTOL, T, TOUT, Y, RSTATS
+!     INTEGER NEQ, ITASK, ISTATE, ISTATS, IOUT, IERROR, I
+!     DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     OPEN(UNIT=6, FILE = 'example1.dat')
+!     IERROR = 0
+!     NEQ = 3
+!     Y(1) = 1.0D0
+!     Y(2) = 0.0D0
+!     Y(3) = 0.0D0
+!     T = 0.0D0
+!     TOUT = 0.4D0
+!     RTOL = 1.D-4
+!     ATOL(1) = 1.D-8
+!     ATOL(2) = 1.D-14
+!     ATOL(3) = 1.D-6
+!     ITASK = 1
+!     ISTATE = 1
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,ABSERR_VECTOR=ATOL, &
+!       RELERR=RTOL, USER_SUPPLIED_JACOBIAN=.TRUE.)
+!     DO IOUT = 1,12
+!       CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
+!       CALL GET_STATS(RSTATS,ISTATS)
+!       WRITE(6,63)T,Y(1),Y(2),Y(3)
+!       DO I = 1, NEQ
+!          IF (Y(I) < 0.0D0) IERROR = 1
+!       END DO
+!       IF (ISTATE < 0) THEN
+!          WRITE(6,64)ISTATE
+!          STOP
+!       END IF
+!       TOUT = TOUT*10.0D0
+!     END DO
+!     WRITE(6,60) ISTATS(11),ISTATS(12),ISTATS(13),ISTATS(19), &
+!                 ISTATS(20),ISTATS(21),ISTATS(22)
+!     IF (IERROR == 1) THEN
+!        WRITE(6,61)
+!     ELSE
+!        WRITE(6,62)
+!     END IF
+! 60  FORMAT(/'  No. steps =',I4,'   No. f-s =',I4,        &
+!             '  No. J-s =',I4,'   No. LU-s =',I4/         &
+!             '  No. nonlinear iterations =',I4/           &
+!             '  No. nonlinear convergence failures =',I4/ &
+!             '  No. error test failures =',I4/)
+! 61  FORMAT(/' An error occurred.')
+! 62  FORMAT(/' No errors occurred.')
+! 63  FORMAT(' At t =',D12.4,'   y =',3D14.6)
+! 64  FORMAT(///' Error halt: ISTATE =',I3)
+!     STOP
+!     END PROGRAM runexample1
+!
+! MODULE example2
+! The following is a modification of the previous example
+! program to illustrate root finding. The problem is from
+! chemical kinetics, and consists of the following three
+! rate equations:
+!     dy1/dt = -.04d0*y1 + 1.d4*y2*y3
+!     dy2/dt = .04d0*y1 - 1.d4*y2*y3 - 3.d7*y2**2
+!     dy3/dt = 3.d7*y2**2
+! on the interval from t = 0.0d0 to t = 4.d10, with initial
+! conditions y1 = 1.0d0, y2 = y3 = 0.0d0. The problem is stiff.
+! In addition, we want to find the values of t, y1, y2,
+! and y3 at which:
+!   (1) y1 reaches the value 1.d-4, and
+!   (2) y3 reaches the value 1.d-2.
+! The following coding solves this problem with DVODE_F90
+! using an internally generated dense Jacobian and
+! printing results at t = .4, 4., ..., 4.d10, and at the
+! computed roots. It uses ITOL = 2 and ATOL much smaller
+! for y2 than y1 or y3 because y2 has much smaller values.
+! At the end of the run, statistical quantities of interest
+! are printed (see optional outputs in the full description
+! below). Output is written to the file example2.dat.
+! CONTAINS
+!     SUBROUTINE FEX (NEQ, T, Y, YDOT)
+!     IMPLICIT NONE
+!     INTEGER NEQ
+!     DOUBLE PRECISION T, Y, YDOT
+!     DIMENSION Y(3), YDOT(3)
+!     YDOT(1) = -0.04D0*Y(1) + 1.0D4*Y(2)*Y(3)
+!     YDOT(3) = 3.0D7*Y(2)*Y(2)
+!     YDOT(2) = -YDOT(1) - YDOT(3)
+!     RETURN
+!     END SUBROUTINE FEX
+!     SUBROUTINE GEX (NEQ, T, Y, NG, GOUT)
+!     IMPLICIT NONE
+!     INTEGER NEQ, NG
+!     DOUBLE PRECISION T, Y, GOUT
+!     DIMENSION Y(3), GOUT(2)
+!     GOUT(1) = Y(1) - 1.0D-4
+!     GOUT(2) = Y(3) - 1.0D-2
+!     RETURN
+!     END SUBROUTINE GEX
+! END MODULE example2
+!******************************************************************
+!     PROGRAM runexample2
+!     USE DVODE_F90_M
+!     USE example2
+!     IMPLICIT NONE
+!     INTEGER ITASK, ISTATE, NG, NEQ, IOUT, JROOT, ISTATS, &
+!     IERROR, I
+!     DOUBLE PRECISION ATOL, RTOL, RSTATS, T, TOUT, Y
+!     DIMENSION Y(3), ATOL(3), RSTATS(22), ISTATS(31), JROOT(2)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     OPEN (UNIT=6, FILE='example2.dat')
+!     IERROR = 0
+!     NEQ = 3
+!     Y(1) = 1.0D0
+!     Y(2) = 0.0D0
+!     Y(3) = 0.0D0
+!     T = 0.0D0
+!     TOUT = 0.4D0
+!     RTOL = 1.0D-4
+!     ATOL(1) = 1.0D-8
+!     ATOL(2) = 1.0D-12
+!     ATOL(3) = 1.0D-8
+!     ITASK = 1
+!     ISTATE = 1
+!     NG = 2
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL, &
+!       ABSERR_VECTOR=ATOL,NEVENTS=NG)
+!     DO 40 IOUT = 1,12
+! 10    CONTINUE
+!       CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!       CALL GET_STATS(RSTATS, ISTATS, NG, JROOT)
+!       WRITE(6,20) T, Y(1), Y(2), Y(3)
+!       DO I = 1, NEQ
+!          IF (Y(I) < 0.0D0) IERROR = 1
+!       END DO
+! 20    FORMAT(' At t =',D12.4,'   Y =',3D14.6)
+!       IF (ISTATE < 0) GOTO 60
+!       IF (ISTATE == 2) GOTO 40
+!       WRITE(6,30) JROOT(1),JROOT(2)
+! 30    FORMAT(5X,' The above line is a root, JROOT =',2I5)
+!       ISTATE = 2
+!       GOTO 10
+! 40  TOUT = TOUT*10.0D0
+!     WRITE(6,50) ISTATS(11), ISTATS(12), ISTATS(13), ISTATS(10)
+!     IF (IERROR == 1) THEN
+!        WRITE(6,61)
+!     ELSE
+!        WRITE(6,62)
+!     END IF
+! 50  FORMAT(/' No. steps =',I4,'  No. f-s =',I4,'  No. J-s =',I4, &
+!     '  No. g-s =',I4/)
+!     STOP
+! 60  WRITE(6,70) ISTATE
+! 61  FORMAT(/' An error occurred.')
+! 62  FORMAT(/' No errors occurred.')
+! 70  FORMAT(///' Error halt.. ISTATE =',I3)
+!     STOP
+!     END PROGRAM runexample2
+!_______________________________________________________________________
+! BEGINNING OF DVODE_F90_M PRIVATE SECTION.
+! Note: This global information is used throughout DVODE_F90.
+!_______________________________________________________________________
+! JACSPDB arrays and parameters.
+  LOGICAL, PRIVATE :: USE_JACSP, LIKE_ORIGINAL_VODE
+  INTEGER, PRIVATE :: INFODS, LIWADS, MAXGRPDS, MINGRPDS, NRFJACDS,    &
+    NCFJACDS, LWKDS, LIWKDS
+  INTEGER, ALLOCATABLE, PRIVATE :: INDROWDS(:), INDCOLDS(:),           &
+    NGRPDS(:), IPNTRDS(:), JPNTRDS(:), IWADS(:), IWKDS(:), IOPTDS(:)
+  KPP_REAL, ALLOCATABLE, PRIVATE :: YSCALEDS(:), WKDS(:), FACDS(:)
+  KPP_REAL, PRIVATE :: U125, U325
+!_______________________________________________________________________
+  LOGICAL, PARAMETER, PRIVATE :: USE_MA48_FOR_SPARSE=.FALSE.
+!_______________________________________________________________________
+! *****MA48 build change point. Replace the above statement.
+! LOGICAL, PARAMETER, PRIVATE :: USE_MA48_FOR_SPARSE=.TRUE.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+! MA48 type declarations:
+! TYPE(ZD01_TYPE) MATRIX
+! TYPE(MA48_CONTROL) CONTROL
+! TYPE(MA48_FACTORS) FACTORS
+! TYPE(MA48_AINFO) AINFO
+! TYPE(MA48_FINFO) FINFO
+! TYPE(MA48_SINFO) SINFO
+!_______________________________________________________________________
+! .. Parameters ..
+!     IPCUTH_MAX - maximum number of times the solver will halve the
+!                  stepsize to prevent an infeasible prediction if
+!                  solution bounds are used
+!     KFC        - maximum number of consecutive convergence failures
+!                  before crashing the order
+!     KFH        - maximum number of consecutive error test failures
+!                  before giving up (changed from 7 to 15)
+!     MAXCOR     - maximum number of corrections
+!     MSBP       - maximum number of steps before forming new P matrix
+!     MXNCF      - maximum number of consecutive convergence failures
+!                  before giving up
+!     MXHNLO     - maximum number of T+H=T messages
+!     MXSTP0     - maximum number of integration steps
+!     L*****     - lengths and pointers for some internal arrays
+!     INTEGER, PARAMETER, PRIVATE :: KFC = -3, KFH = -7, LENIV1 = 33,    &
+      INTEGER, PARAMETER, PRIVATE :: IPCUTH_MAX = 100, KFC = -3,         &
+        KFH = -15, LENIV1 = 33,                                          &
+        LENIV2 = 8, LENRV1 = 48, LENRV2 = 1, LIWUSER = 30, LRWUSER = 22, &
+        MAXCOR = 3, MAX_ARRAY_SIZE = 900000000, MSBP = 20, MXHNL0 = 10,  &
+        MXNCF = 10, MXSTP0 = 5000
+!_______________________________________________________________________
+! *****LAPACK build change point. Use .TRUE. for LAPACK.
+!     LOGICAL, PARAMETER, PRIVATE :: USE_LAPACK = .TRUE.
+!_______________________________________________________________________
+      KPP_REAL, PARAMETER, PRIVATE :: ADDON = 1.0E-6_dp
+      KPP_REAL, PARAMETER, PRIVATE :: BIAS1 = 6.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: BIAS2 = 6.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: BIAS3 = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: CCMAX = 0.3_dp
+      KPP_REAL, PARAMETER, PRIVATE :: CORTES = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: CRDOWN = 0.3_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETACF = 0.25_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMIN = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMX1 = 1.0E4_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMX2 = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMX3 = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ETAMXF = 0.2_dp
+      KPP_REAL, PARAMETER, PRIVATE :: FIVE = 5.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: FOUR = 4.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: HALF = 0.5_dp
+      KPP_REAL, PARAMETER, PRIVATE :: HUN = 100.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: HUNDRETH = 0.01_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ONE = 1.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ONEPSM = 1.00001_dp
+      KPP_REAL, PARAMETER, PRIVATE :: PT1 = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: PT2 = 0.2_dp
+      KPP_REAL, PARAMETER, PRIVATE :: RDIV = 2.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: SIX = 6.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: TEN = 10.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: TENTH = 0.1_dp
+      KPP_REAL, PARAMETER, PRIVATE :: THOU = 1000.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: THRESH = 1.5_dp
+      KPP_REAL, PARAMETER, PRIVATE :: TWO = 2.0_dp
+      KPP_REAL, PARAMETER, PRIVATE :: ZERO = 0.0_dp
+
+! Beginning of DVODE_F90 interface.
+! ..
+! .. Generic Interface Blocks ..
+      INTERFACE DVODE_F90
+
+!         VODE_F90 is the interface subroutine that is actually invoked
+!         when the user calls DVODE_F90. It in turn calls subroutine
+!         DVODE which is the driver that directs all the work.
+          MODULE PROCEDURE VODE_F90
+
+!         GET_STATS can be called to gather integration statistics.
+          MODULE PROCEDURE GET_STATS
+
+!         DVINDY can be called to interpolate the solution and derivative.
+          MODULE PROCEDURE DVINDY
+
+!         RELEASE_ARRAYS can be called to release/deallocate the work arrays.
+          MODULE PROCEDURE RELEASE_ARRAYS
+
+!         SET_IAJA can be called to set sparse matrix descriptor arrays.
+          MODULE PROCEDURE SET_IAJA
+
+!         USERSETS_IAJA can be called to set sparse matrix descriptor arrays.
+          MODULE PROCEDURE USERSETS_IAJA
+
+!         CHECK_STAT can be called to stop if a storage allocation or
+!         deallocation error occurs.
+          MODULE PROCEDURE CHECK_STAT
+
+!         JACSP can be called to calculate a Jacobian using Doug Salane's
+!         algoritm 
+          MODULE PROCEDURE JACSP
+
+!         DVDSM can be called to calculate sparse pointer arrays needed
+!         by JACSP
+          MODULE PROCEDURE DVDSM
+
+      END INTERFACE
+! ..
+! .. Derived Type Declarations ..
+      TYPE, PUBLIC :: VODE_OPTS
+        KPP_REAL, DIMENSION (:), POINTER :: ATOL, RTOL
+        INTEGER :: MF, METH, MITER, MOSS, ITOL, IOPT, NG
+        LOGICAL :: DENSE, BANDED, SPARSE
+      END TYPE VODE_OPTS
+! ..
+! .. Local Scalars ..
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!     For communication with subroutine ma48_control_array:
+!     KPP_REAL, PUBLIC :: COPY_OF_U_PIVOT
+!_______________________________________________________________________
+      KPP_REAL, PRIVATE :: ACNRM, ALPHA, BIG, BIG1, CCMXJ, CGCE, CONP, CRATE,  &
+        DRC, DRES, DXMAX, EPS, ERRMAX, ETA, ETAMAX, FRACINT, FRACSUB, H, HMIN,  &
+        HMXI, HNEW, HSCAL, HU, MEPS, MRESID, MRMIN, PRL1, RC, RESID, RL1,       &
+        RMIN, SETH, T0ST, THEMAX, TLAST, TN, TOL, TOL1, TOUTC, UMAX, UROUND,    &
+        U_PIVOT, X2, WM1, WM2
+      INTEGER, PRIVATE :: ADDTOJA, ADDTONNZ, CONSECUTIVE_CFAILS,                &
+        CONSECUTIVE_EFAILS, ELBOW_ROOM, IADIM, IANPIV, IAVPIV,                  &
+        ICF, ICNCP, IFAIL, IMAX, IMIN, INEWJ, INIT, IPUP, IRANK, IRFND, IRNCP,  &
+        ISTART, ISTATC, ITASKC, JADIM, JCUR, JMIN, JSTART, JSV, KFLAG, KOUNTL,  &
+        KUTH, L, LARGE, LAST, LENIGP, LICN_ALL, LIRN_ALL, LIW, LIWM, LMAX,      &
+        LOCJS, LP, LRW, LWM, LWMDIM, LWMTEMP, LYH, LYHTEMP, MANPIV, MAPIV, MAXG,&
+        MAXIT, MAXORD, MB28, MB48, METH, MICN, MICNCP, MINICN, MINIRN, MIRANK,  &
+        MIRN, MIRNCP, MITER, MLP, MOSS, MP, MSBG, MSBJ, MXHNIL, MXSTEP, N, NZB, &
+        NCFN, NDROP, NDROP1, NDX, NETF, NEWH, NEWQ, NFE, NGC, NGE, NGP, NHNIL,  &
+        NJE, NLP, NLU, NNI, NNZ, NOITER, NQ, NQNYH, NQU, NQWAIT, NSLG, NSLJ,    &
+        NSLP, NSRCH, NSRCH1, NST, NSUBS, NSUPS, NUM, NUMNZ, NYH, NZ_ALL,        &
+        NZ_SWAG, PREVIOUS_MAXORD, WPD, WPS, MA28AD_CALLS, MA28BD_CALLS,         &
+        MA28CD_CALLS, MC19AD_CALLS, MAX_MINIRN, MAX_MINICN, MAX_NNZ, BNGRP
+!       MA48AD_CALLS, MA48BD_CALLS, MA48CD_CALLS
+! *****MA48 build change point. Insert the above line.
+      LOGICAL, PRIVATE :: ABORT, ABORT1, ABORT2, ABORT3, ABORTA, ABORTB,        &
+        ALLOW_DEFAULT_TOLS, BUILD_IAJA, BOUNDS, CHANGED_ACOR, GROW, IAJA_CALLED,&
+        J_HAS_BEEN_COMPUTED, J_IS_CONSTANT, LBIG, LBIG1, LBLOCK, MA48_WAS_USED, &
+        OK_TO_CALL_MA28, SUBS, SUPS, OPTS_CALLED, REDO_PIVOT_SEQUENCE,          &
+        SCALE_MATRIX, SPARSE, USE_FAST_FACTOR, YMAXWARN  
+! ..
+! .. Local Arrays ..
+      KPP_REAL, ALLOCATABLE, PRIVATE :: ACOR(:), CSCALEX(:), EWT(:),           &
+        FPTEMP(:), FTEMP(:), FTEMP1(:), G0(:), G1(:), GX(:), JMAT(:),           &
+        LB(:), PMAT(:), RSCALEX(:), RWORK(:), SAVF(:), UB(:), WM(:),            &
+        WMTEMP(:), WSCALEX(:,:), YHNQP2(:), YHTEMP(:), YMAX(:), YNNEG(:),       &
+        YTEMP(:), DTEMP(:)
+      KPP_REAL, PRIVATE :: EL(13), RUSER(22), TAU(13), TQ(5)
+      INTEGER, ALLOCATABLE, PRIVATE :: BIGP(:), BJGP(:), IA(:), IAB(:), IAN(:), &
+        ICN(:), IDX(:), IGP(:), IKEEP28(:,:), IW28(:,:), IWORK(:), JA(:),       &
+        JAB(:), JAN(:), JATEMP(:), JGP(:), JROOT(:), JVECT(:), SUBDS(:), SUPDS(:)
+      INTEGER, PRIVATE :: IDISP(2), IUSER(30), LNPIV(10), LPIV(10)
+      INTEGER, PRIVATE :: MORD(2) = (/ 12, 5 /)
+! ..
+! .. Public Subroutines and Functions ..
+  PUBLIC ::                                                        &
+  DAXPY_F90, DCOPY_F90, DDOT_F90, DGBFA_F90, DGBSL_F90, DGEFA_F90, &
+  DGESL_F90, DSCAL_F90, IDAMAX_F90
+! ..
+! .. Private Subroutines and Functions ..
+  PRIVATE ::                                                       &
+  CHECK_DIAG    , DACOPY        , DEWSET        , DGROUP        ,  &
+  DGROUPDS      , DVCHECK       , DVHIN         , DVINDY_BNDS   ,  &
+  DVINDY_CORE   , DVJAC         , DVJACS28      , DVJUST        ,  &
+  DVNLSD        , DVNLSS28      , DVNORM        , DVNRDN        ,  &
+  DVNRDP        , DVNRDS        , DVODE         , DVPREPS       ,  &
+  DVROOTS       , DVSET         , DVSOL         , DVSOLS28      ,  &
+  DVSRCO        , DVSTEP        , GDUMMY        , IUMACH        ,  &
+  IXSAV         , JACSPDB       , JDUMMY        , MA28AD        ,  &
+  MA28BD        , MA28CD        , MA28DD        , MA28ID        ,  &
+  MA30AD        , MA30BD        , MA30CD        , MA30DD        ,  &
+  MC13E         , MC19AD        , MC20AD        , MC20BD        ,  &
+  MC21A         , MC21B         , MC22AD        , MC23AD        ,  &
+  MC24AD        , SET_ICN       , XERRDV        , XSETF         ,  &
+  XSETUN        , DEGR          , IDO           , NUMSRT        ,  &
+  SEQ           , SETR          , SLO           , SRTDAT        ,  &
+  FDJS
+! DVJACS48      , DVNLSS48      , DVPREPS48     , DVSOLS48
+!_______________________________________________________________________
+! *****MA48 build change point. Insert the above line.
+!_______________________________________________________________________
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC KIND
+! ..
+! .. Data Statements ..
+      DATA OPTS_CALLED/ .FALSE./
+      DATA MP/6/, NLP/6/, MLP/6/, NSRCH/32768/, ISTART/0/, MAXIT/16/, &
+        LBIG/ .FALSE./, LBLOCK/ .TRUE./, GROW/ .TRUE./,               &
+        TOL/0.0_dp/, CGCE/0.5_dp/, BIG/0.0_dp/, ABORT1/ .TRUE./,      &
+        ABORT2/ .TRUE./, ABORT3/ .FALSE./, ABORT/ .FALSE./, MIRN/0/,  &
+        MICN/0/, MIRNCP/0/, MICNCP/0/, MIRANK/0/, NDROP1/0/,          &
+        MRMIN/0.0D0/, MRESID/0/, OK_TO_CALL_MA28/.FALSE./
+! ..
+! END OF DVODE_F90 PRIVATE SECTION.
+!_______________________________________________________________________
+
+    CONTAINS
+
+      SUBROUTINE VODE_F90(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,G_FCN)
+! ..
+! This is an interface for DVODE to allow JAC and GFUN to be
+! OPTIONAL arguments.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Structure Arguments ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (INOUT) :: T, TOUT
+        INTEGER, INTENT (INOUT) :: ISTATE
+        INTEGER, INTENT (IN) :: ITASK, NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: Y(*)
+! ..
+! .. Subroutine Arguments ..
+        OPTIONAL :: G_FCN, J_FCN
+        EXTERNAL J_FCN
+! ..
+! .. Subroutine Interfaces ..
+     INTERFACE
+       SUBROUTINE F(NEQ,T,Y,YDOT)
+         INTEGER, PARAMETER :: WP = KIND(1.0D0)
+         INTEGER NEQ
+         REAL(WP) T
+         REAL(WP), DIMENSION(NEQ) :: Y, YDOT
+         INTENT(IN)  :: NEQ, T, Y
+         INTENT(OUT) :: YDOT
+       END SUBROUTINE F
+     END INTERFACE
+
+     INTERFACE
+       SUBROUTINE G_FCN(NEQ,T,Y,NG,GROOT)
+         INTEGER, PARAMETER :: WP = KIND(1.0D0)
+         INTEGER NEQ, NG
+         REAL(WP) T
+         REAL(WP), DIMENSION(NEQ) :: Y
+         REAL(WP), DIMENSION(NG) :: GROOT(NG)
+         INTENT(IN)  :: NEQ, T, Y, NG
+         INTENT(OUT) :: GROOT
+       END SUBROUTINE G_FCN
+     END INTERFACE
+
+!    Note:
+!    The best we can do here is to declare J_FCN to be
+!    external. The interface for a sparse problem differs
+!    from that for a banded or dense problem. The following
+!    would suffuce for a banded or dense problem.
+!    INTERFACE
+!      SUBROUTINE J_FCN(NEQ,T,Y,ML,MU,PD,NROWPD)
+!        INTEGER, PARAMETER :: WP = KIND(1.0D0)
+!        INTEGER NEQ, ML, MU, NROWPD
+!        REAL(WP) T
+!        REAL(WP), DIMENSION(NEQ) :: Y
+!        REAL(WP), DIMENSION(NEQ) :: PD(NROWPD,NEQ)
+!        INTENT(IN)  :: NEQ, T, Y, ML, MU, NROWPD
+!        INTENT(INOUT) :: PD
+!      END SUBROUTINE J_FCN
+!    END INTERFACE
+!    The following would suffice for a sparse problem.
+    INTERFACE
+      SUBROUTINE J_FCN(NEQ,T,Y,IA,JA,NZ,P)
+        INTEGER, PARAMETER :: WP = KIND(1.0D0)
+        INTEGER NEQ, NZ
+        REAL(WP) T
+        REAL(WP), DIMENSION Y(*), P(*)
+        INTEGER, DIMENSION IA(*), JA(*)
+        INTENT(IN) :: NEQ, T, Y
+        INTENT(INOUT) IA, JA, NZ, P
+      END SUBROUTINE J_FCN
+    END INTERFACE
+! ..
+! .. Local Scalars ..
+        INTEGER :: HOWCALL, METH, MFA, MITER, MOSS, NG
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT VODE_F90
+! ..
+!       Check that SET_OPTS has been called.
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,10,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling DVODE_F90 the first time.'
+          CALL XERRDV(MSG,10,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Check that JAC is present if it is needed.
+        IF (PRESENT(J_FCN)) THEN
+        ELSE
+!         Note:
+!         MOSS is irrelevant. OPTS%MF is two digits after the
+!         call to SET_OPTS.
+          MFA = ABS(OPTS%MF)
+          MOSS = MFA/100
+          METH = (MFA-100*MOSS)/10
+          MITER = MFA - 100*MOSS - 10*METH
+          IF (MITER==1 .OR. MITER==4 .OR. MITER==6) THEN
+            MSG = 'You have specified a value of the integration'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'method flag MF which requires that you supply'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'a Jacobian subroutine JAC; but FAC is not'
+            CALL XERRDV(MSG,20,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'present in the argument list.'
+            CALL XERRDV(MSG,20,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Check that GFUN is present if it is needed.
+
+        IF (PRESENT(G_FCN)) THEN
+        ELSE
+          NG = OPTS%NG
+          IF (NG>0) THEN
+            MSG = 'You have indicated that events are present but'
+            CALL XERRDV(MSG,30,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'you have not supplied a GFUN subroutine.'
+            CALL XERRDV(MSG,30,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!     Determine how DVODE will be called.
+
+!     HOWCALL = 1: JDUMMY, GDUMMY
+!               2: JAC, GFUN
+!               3: JAC, GDUMMY
+!               4: JDUMMY, GFUN
+        HOWCALL = 1
+        IF (PRESENT(J_FCN)) THEN
+          IF (PRESENT(G_FCN)) THEN
+            HOWCALL = 2
+          ELSE
+            HOWCALL = 3
+          END IF
+        ELSE
+          IF (PRESENT(G_FCN)) THEN
+            HOWCALL = 4
+          ELSE
+            HOWCALL = 1
+          END IF
+        END IF
+
+!       Call DVODE to do the integration.
+
+        IF (HOWCALL==1) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JDUMMY,GDUMMY)
+        ELSE IF (HOWCALL==2) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,G_FCN)
+        ELSE IF (HOWCALL==3) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,J_FCN,GDUMMY)
+        ELSE IF (HOWCALL==4) THEN
+          CALL DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JDUMMY,G_FCN)
+        END IF
+        RETURN
+
+      END SUBROUTINE VODE_F90
+!_______________________________________________________________________
+
+      SUBROUTINE JDUMMY(NEQ,T,Y,ML,MU,PD,NROWPD)
+! ..
+! This is a dummy Jacobian subroutine for VODE_F90 (never called).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: T
+        INTEGER :: ML, MU, NEQ, NROWPD, I
+        LOGICAL DUMMY
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: PD(NROWPD,*), Y(*)
+! ..
+      INTENT(IN) T, Y, ML, MU, NROWPD
+      INTENT(INOUT) PD
+! ..
+! .. FIRST EXECUTABLE STATEMENT JDUMMY
+! ..
+!       Get rid of some needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          I = NEQ
+          I = ML
+          I = MU
+          I = NROWPD
+          PD(1,1) = T
+          PD(1,1) = Y(1)
+          PD(1,1) = DBLE(REAL(I))
+        END IF
+        RETURN
+
+      END SUBROUTINE JDUMMY
+!_______________________________________________________________________
+
+      SUBROUTINE GDUMMY(NEQ,T,Y,NG,GOUT)
+! ..
+! This is a dummy event subroutine for VODE_F90 (never called).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: T
+        INTEGER :: NEQ, NG, I
+        LOGICAL DUMMY
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: GOUT(*), Y(*)
+! ..
+      INTENT(IN) NEQ, T, Y, NG
+      INTENT(OUT) GOUT
+! ..
+! .. FIRST EXECUTABLE STATEMENT JDUMMY
+! ..
+!       Get rid of some needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          I = NEQ
+          I = NG
+          GOUT(1) = T
+          GOUT(1) = Y(1)
+          GOUT(1) = DBLE(REAL(I))
+        END IF
+        RETURN
+
+      END SUBROUTINE GDUMMY
+!_______________________________________________________________________
+
+  SUBROUTINE SET_OPTS_2(HMAX,HMIN,MXSTEP)
+! ..
+! Allow the maximum step size, the minimum step size, and the maximum
+! number of steps to be changed without restarting the integration.
+! ..
+!                     Quick Summary of Options
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MXSTEP                 - Maximum number of integration steps in DVODE
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: HMAX, HMIN
+        INTEGER, OPTIONAL, INTENT (IN) :: MXSTEP
+! ..
+! .. Local Scalars ..
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_OPTS_2
+! ..
+!       Check that SET_OPTS has been called:
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,40,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling subroutine SET_OPTS_2.'
+          CALL XERRDV(MSG,40,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          MSG = 'HMAX changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,50,1,0,0,0,1,HMAX,ZERO)
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          MSG = 'HMIN changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,60,1,0,0,0,1,HMIN,ZERO)
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          MSG = 'MXSTEP changed in SET_OPTS_2.'
+          CALL XERRDV(MSG,70,1,1,MXSTEP,0,0,ZERO,ZERO)
+        END IF
+
+  END SUBROUTINE SET_OPTS_2
+!_______________________________________________________________________
+
+  FUNCTION SET_NORMAL_OPTS(DENSE_J, BANDED_J, SPARSE_J,                &
+    USER_SUPPLIED_JACOBIAN, LOWER_BANDWIDTH, UPPER_BANDWIDTH,          &
+    RELERR, ABSERR, ABSERR_VECTOR, NEVENTS) RESULT(OPTS)
+
+! FUNCTION SET_NORMAL_OPTS:
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH,UPPER_BANDWIDTH
+!    Error tolerances:
+!       RELERR, ABSERR, ABSERR_VECTOR
+!    Rootfinding:
+!       NEVENTS
+! RESULT(OPTS)
+
+! Note:
+! Invoking SET_NORMAL_OPTS causes an integration restart. A common
+! situation is one in which all you wish to change is one of the
+! vode.f77 optional parameters HMAX, HMIN, or MXSTEP. Once the
+! integration is started and this is all you wish to do, you can
+! change any of these parameters without restarting the integration
+! simply by calling subroutine SET_OPTS_2:
+!      CALL SET_OPTS_2(HMAX,HMIN,MXSTEP)
+! Each of the three arguments is optional and only the ones actually
+! supplied will be used. Changes will take effect in the same manner
+! as in the VODE.f77 solver.
+!
+! NORMAL_OPTIONS sets user parameters for DVODE via keywords.
+! Values that are defined herein will be used internally by
+! DVODE. All option keywords are OPTIONAL and order is not
+! important. These options should be adequate for most problems.
+! If you wish to use more specialized options, you must use
+! SET_INTERMEDIATE_OPTS or SET_OPTS rather than NORMAL_OPTS.
+! If you wish to use SET_INTERMEDIATE_OPTS or SET_OPTS, you
+! may use any of the SET_NORMAL_OPTS keywords or any of the
+! keywords available for these two functions. Of course, you
+! may opt to simply use SET_OPTS for all problems.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+!
+! Important Note:
+! If feasible, you should use the dense or banded option; but
+! SET_NORMAL_OPTS allows you to use a sparse internal Jacobian
+! (i.e., one that is determined using finite differences) and
+! structure pointere array that are determined internally
+! using finite differences. If any of the following are true
+!    (1) DVODE_F90 doesn't perform satisfactorily for
+!        your problem,
+!    (2) you are solving a very large problem,
+!    (3) you wish to supply the sparse pointer arrays
+!        directly,
+!    (4) you wish to supply an analytical sparse Jacobian,
+! or
+!    (5) you wish to use one of the specialized sparse
+!        Jacobian options,
+! you are encouraged to use SET_OPTS which contains several
+! provisions for solving sparse problems more efficiently.
+
+! Option Types:
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! RELERR                 - real(wp) scalar
+! ABSERR                 - real(wp) scalar
+! ABSERR_VECTOR          - real(wp) vector
+! NEVENTS                - integer
+! Options:
+! ABSERR                 = Absolute error tolerance
+! ABSERR_VECTOR          = Vector of absolute error tolerances
+! RELERR                 = Scalar relative error tolerance
+! NEVENTS                = Number of event functions (requires
+!                          user-supplied GFUN)
+! DENSE_J                = Use dense linear algebra if .TRUE.
+! BANDED_J               = Use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH      = Lower bandwidth of the Jacobian
+!                          (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH      = Upper bandwidth of the Jacobian
+!                          (required if BANDED_J = .TRUE.)
+! SPARSE_J               = Use sparse linear algebra if .TRUE.
+! USER_SUPPLIED_JACOBIAN = Exact Jacobian option
+!                          (requires user-supplied JAC;
+!                          ignored for SPARSE_J=.TRUE.)
+!
+! Note: DENSE_J takes precedence over BANDED_J which in turn
+! takes precedence over SPARSE_J if more than one is supplied.
+! If neither of the three flags is present, the nonstiff Adams
+! option will be used. Similiarly, ABSERR_VECTOR takes
+! precedence over ABSERR.
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR,RELERR
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH,   &
+          NEVENTS,UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, DENSE_J, &
+          SPARSE_J, USER_SUPPLIED_JACOBIAN
+! ..
+! .. Array Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IER,IOPT,METH,MF,MFA,MFSIGN,MITER,ML,MOSS, &
+          MU,NAE,NG,NRE
+        LOGICAL :: BANDED,DENSE,SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_NORMAL_OPTS
+! ..
+        RUSER(1:LRWUSER) = ZERO
+        IUSER(1:LIWUSER) = 0
+        
+!       Allow default error tolerances?
+        ALLOW_DEFAULT_TOLS = .FALSE.
+
+!       Maximum number of consecutive error test failures?
+        CONSECUTIVE_EFAILS = KFH
+
+!       Maximum number of consecutive corrector iteration failures?
+        CONSECUTIVE_CFAILS = MXNCF
+
+!       Use JACSP to approximate Jacobian?
+        USE_JACSP = .FALSE.
+
+!       Set the flag to indicate that SET_NORMAL_OPTS has been called.
+        OPTS_CALLED = .TRUE.
+
+!       Set the MA48 storage cleanup flag.
+        MA48_WAS_USED = .FALSE.
+
+!       Set the fast factor option for MA48,
+        USE_FAST_FACTOR = .TRUE.
+
+!       Set the constant Jacobian flags.
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!       Determine the working precision and define the value for UMAX
+!       expected by MA28. Note that it is different for single and
+!       double precision.
+        WPD = KIND(1.0D0)
+        WPS = KIND(1.0E0)
+        IF (WPD/=WP .AND. WPS/=WP) THEN
+          MSG = 'Illegal working precision in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,80,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (WPD==WP) THEN
+!       Working precision is double.
+          UMAX = 0.999999999_dp
+        ELSE
+!       Working precision is single.
+          UMAX = 0.9999_dp
+        END IF
+
+        MA28AD_CALLS = 0
+        MA28BD_CALLS = 0
+        MA28CD_CALLS = 0
+        MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       MA48AD_CALLS = 0
+!       MA48BD_CALLS = 0
+!       MA48CD_CALLS = 0
+!_______________________________________________________________________
+        IRNCP = 0
+        ICNCP = 0
+        MINIRN = 0
+        MINICN = 0
+        MAX_MINIRN = 0
+        MAX_MINICN = 0
+        MAX_NNZ = 0
+
+!       Set the flag to warn the user if |(y(t)| < abserr.
+        YMAXWARN = .FALSE.
+
+!       Load defaults for the optional input arrays for DVODE.
+        IUSER(1:8) = 0
+        RUSER(1:8) = ZERO
+
+!       Set the method flag.
+        MF = 10
+        IF (PRESENT(SPARSE_J)) THEN
+          IF (SPARSE_J) THEN
+             MF = 227
+             IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+               MSG = 'You have indicated you wish to supply an'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'exact sparse Jacobian in function'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'SET_NORMAL_OPTS. In order to do this,'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'you must use SET_OPTS. Execution will'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'continue.'
+               CALL XERRDV(MSG,90,1,0,0,0,0,ZERO,ZERO)
+             END IF
+          END IF
+        END IF
+
+        IF (PRESENT(BANDED_J)) THEN
+          IF (BANDED_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 24
+              ELSE
+                MF = 25
+              END IF
+            ELSE
+              MF = 25
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(DENSE_J)) THEN
+          IF (DENSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 21
+              ELSE
+                MF = 22
+              END IF
+            ELSE
+              MF = 22
+            END IF
+          END IF
+        END IF
+
+!       Check for errors in MF.
+        MFA = IABS(MF)
+        MOSS = MFA/100
+        METH = (MFA-100*MOSS)/10
+        MITER = MFA - 100*MOSS - 10*METH
+        IF (METH<1 .OR. METH>2) THEN
+          MSG = 'Illegal value of METH in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,100,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MITER<0 .OR. MITER>7) THEN
+          MSG = 'Illegal value of MITER in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,110,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MOSS<0 .OR. MOSS>2) THEN
+          MSG = 'Illegal value of MOSS in SET_NORMAL_OPTS.'
+          CALL XERRDV(MSG,120,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Reset MF, now that MOSS is known.
+        MFSIGN = SIGN(1,MF)
+        MF = MF - 100*MOSS*MFSIGN
+
+        IF (MITER==0) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==1 .OR. MITER==2) THEN
+          DENSE = .TRUE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==3) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==4 .OR. MITER==5) THEN
+          DENSE = .FALSE.
+          BANDED = .TRUE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==6 .OR. MITER==7) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .TRUE.
+        END IF
+
+!       Define the banded Jacobian band widths.
+        IF (BANDED) THEN
+          IF (PRESENT(LOWER_BANDWIDTH)) THEN
+            ML = LOWER_BANDWIDTH
+            IUSER(1) = ML
+          ELSE
+            MSG = 'In SET_NORMAL_OPTS you have indicated a'
+            CALL XERRDV(MSG,130,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not supplied'
+            CALL XERRDV(MSG,130,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'the lower bandwidth.'
+            CALL XERRDV(MSG,130,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(UPPER_BANDWIDTH)) THEN
+            MU = UPPER_BANDWIDTH
+            IUSER(2) = MU
+          ELSE
+            MSG = 'In SET_NORMAL_OPTS you have indicated a'
+            CALL XERRDV(MSG,140,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not supplied'
+            CALL XERRDV(MSG,140,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'the upper bandwidth.'
+            CALL XERRDV(MSG,140,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Define the sparse Jacobian options.
+        IF (SPARSE) THEN
+!         Set the MA28 message flag.
+          LP = 0
+!         Set the MA28 pivot sequence frequency flag.
+          REDO_PIVOT_SEQUENCE = .FALSE.
+!         Set the MA28 singularity threshold.
+          EPS = 1.0E-4_dp
+!         Use scaling of the iteration matrix.
+          SCALE_MATRIX = .TRUE.
+!         Define the elbow room factor for the MA28 sparse work arrays.
+          ELBOW_ROOM = 2
+!         NZSWAG is a swag for the number of nonzeros in the Jacobian.
+          NZ_SWAG = 0
+!         Use partial pivoting.
+          U_PIVOT = ONE
+!         Indicate that SET_IAJA has not yet been called successfully.
+          IAJA_CALLED = .FALSE.
+!         Check for illegal method flags.
+          IF (MOSS==2 .AND. MITER/=7) THEN
+            MSG = 'In SET_NORMAL_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,150,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (MOSS==1 .AND. MITER/=6) THEN
+            MSG = 'In SET_NORMAL_OPTS MOSS=1 but MITER is not 6.'
+            CALL XERRDV(MSG,160,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         IF (MOSS==0 .AND. MITER/=7) THEN
+!           MSG = 'In SET_NORMAL_OPTS MOSS=0 but MITER is not 7.'
+!           CALL XERRDV(MSG,170,2,0,0,0,0,ZERO,ZERO)
+!         END IF
+        END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       No solution bounds will be imposed.
+        BOUNDS = .FALSE.
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+        IOPT = 1
+        OPTS%IOPT = IOPT
+
+!       Process the error tolerances.
+
+!       Relative error tolerance.
+        NRE = 1
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,10)
+        IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,180,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_dp
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,190,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,200,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerance(s).
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,210,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,210,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,20)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,220,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,230,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,240,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,240,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,240,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+           OPTS%ITOL = 2
+        ELSE
+           OPTS%ITOL = 1
+        END IF
+        RETURN
+
+  END FUNCTION SET_NORMAL_OPTS
+!_______________________________________________________________________
+
+  FUNCTION SET_INTERMEDIATE_OPTS(DENSE_J, BANDED_J, SPARSE_J,          &
+    USER_SUPPLIED_JACOBIAN,                                            &
+    LOWER_BANDWIDTH, UPPER_BANDWIDTH,                                  &
+    RELERR, ABSERR, ABSERR_VECTOR,                                     &
+    TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL,                     &
+    NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS,                          &
+    NEVENTS, CONSTRAINED, CLOWER, CUPPER, CHANGE_ONLY_f77_OPTIONS)     &
+  RESULT(OPTS)
+
+! FUNCTION SET_INTERMEDIATE_OPTS:
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH, UPPER_BANDWIDTH
+!    Error tolerances:
+!       RELERR, ABSERR, ABSERR_VECTOR
+!    VODE.f77 optional parameters:
+!       TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL
+!    Sparse flags:
+!       NZSWAG, USER_SUPPLIED_SPARSITY, MA28_RPS
+!    Rootfinding:
+!       NEVENTS
+!    Impose bounds on solution:
+!       CONSTRAINED, CLOWER, CUPPER
+!    Change one or more of HMAX, HMIN, TCRIT, MXSTEP, MXHNIL, MAXORD
+!       CHANGE_ONLY_f77_OPTIONS
+! RESULT(OPTS)
+
+! SET_OPTIONS sets user parameters for DVODE via keywords. Values
+! that are defined herein will be used internally by DVODE.
+! All option keywords are OPTIONAL and order is not important.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+
+!                     Quick Summary of Options
+
+! DENSE_J                - Jacobian is sparse alternative to MF
+! BANDED_J               - Jacobian is banded alternative to MF 
+! SPARSE_J               - Jacobian is sparse alternative to MF   
+! USER_SUPPLIED_JACOBIAN - User will supply Jacobian subroutine
+!                          (user supplied subroutine JAC required)
+! LOWER_BANDWIDTH        - Lower bandwidth ML in DVODE
+! UPPER_BANDWIDTH        - Upper bandwidth MU in DVODE
+! RELERR                 - Scalar relative error tolerance in DVODE
+! ABSERR                 - Scalar absolute error tolerance in DVODE
+! ABSERR_VECTOR          - Vector absolute error tolerance in DVODE
+! TCRIT                  - Critical time TCRIT in DVODE
+! H0                     - Starting step size in DVODE
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MAXORD                 - Maximum integration order in DVODE
+! MXSTEP                 - Maximum number of integration steps
+!                          in DVODE
+! MXHNIL                 - Maximum number of T+H=T messages in DVODE
+! NZSWAG                 - guess for the number of nonzeros in sparse
+!                          Jacobian
+! USER_SUPPLIED_SPARSITY - user will supply sparsity structure
+!                          arrays by calling USERSETS_IAJA 
+! MA28_RPS               - Redo MA28AD pivot sequence if a singularity
+!                          is encountered
+! NEVENTS                - number of user defined root finding functions
+!                          (user supplied subroutine G required)
+! CONSTRAINED,           - array of solution component indices that
+! CLOWER,                  are to be constrained by the lower and
+! CUPPER                   upper bound arrays CLOWER and CUPPER so that
+!                          CLOWER(I) <= Y(CONSTRAINED(I)) <= CUPPER(I)
+!                     Options Types
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! RELERR                 - real(wp) scalar
+! ABSERR                 - real(wp) scalar
+! ABSERR_VECTOR          - real(wp) vector
+! TCRIT                  - real(wp) scalar
+! H0                     - real(wp) scalar
+! HMAX                   - real(wp) scalar
+! HMIN                   - real(wp) scalar
+! MAXORD                 - integer
+! MXSTEP                 - integer
+! MXHNIL                 - integer
+! NZSWAG                 - integer
+! USER_SUPPLIED_SPARSITY - logical
+! MA28_RPS               - logical
+! NEVENTS                - integer
+! CONSTRAINED            - integer array
+! CLOWER                 - real(wp) array
+! CUPPER                 - real(wp) array
+! CHANGE_ONLY_f77_OPTIONS- logical
+! Argument list parameters:
+! ABSERR                   = scalar absolute error tolerance
+! ABSERR_VECTOR            = vector of absolute error tolerances
+! RELERR                   = scalar relative error tolerance
+! NEVENTS                  = Number of event functions (requires
+!                            user-supplied GFUN)
+! DENSE_J                  = use dense linear algebra if .TRUE.
+! BANDED_J                 = use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH        = lower bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH        = upper bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+! SPARSE_J                 = use sparse linear algebra if .TRUE.
+!
+!   NZSWAG                 = If you wish you may supply a guess,
+!                            NZSWAG, at the number of nonzeros
+!                            in the Jacobian matrix. In some cases
+!                            this will speed up the determination
+!                            of the necessary storage.
+!   USER_SUPPLIED_SPARSITY = .TRUE. if you wish to supply the sparsity
+!                            structure arrays directly by calling
+!   MA28_RPS               = .TRUE. to force MA28AD to calculate a new
+!                            pivot sequence for use in MA28BD if a
+!                            singular iteration matrix is encountered
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+! USER_SUPPLIED_JACOBIAN   = exact Jacobian option
+!                            (requires user-supplied JAC)
+! TCRIT                    = critical time
+! H0                       = initial step size to try
+! HMAX                     = maximum allowable step size
+! HMIN                     = minimum allowable step size
+! MAXORD                   = maximum allowable integration order
+! MXSTEP                   = maximum number of integration steps
+!                            between calls to DVODE
+! MXHNIL                   = maximum number of printed messages
+!                            if the T+H=T condition occurs
+! CONSTRAINED              = array containing the indices of
+!                            solution components which are to be
+!                            be constrained by CLOWER and CUPPER.
+!                            The size of CONSTRAINED must be
+!                            positive and not exceed NEQ, the
+!                            number of ODEs. Each component of
+!                            CONSTRAINED must be between 1 and NEQ.
+!   CLOWER, CUPPER         = lower and upper bound arrays for the.
+!                            solution. Each must be the same size
+!                            as the CONSTRAINED vector.
+!
+!   User-callable Routines:
+!   The following routines may be called by the user:
+!   SET_INTERMEDIATE_OPTS      : Used to set options for DVODE_F90
+!   GET_STATS     : Used to gather summary integration
+!                   statistics following a successful
+!                   return from DVODE_F90
+!   DVINDY        : Used if the user wishes to interpolate
+!                   solution or derivative following a
+!                   successful return from DVODE_F90
+!   USERSETS_IAJA : Used if the user wishes to supply the
+!                   sparsity structure directly
+!   Detailed Description of SET_INTERMEDIATE_OPTS
+!   The following are defined in SET_INTERMEDIATE_OPTS:
+!   OPTS%MF     = Integration method flag (MF)
+!   OPTS%METH   = Integration family flag (METH)
+!   OPTS%MITER  = Iteration type flag (MITER)
+!   OPTS%MOSS   = Sparsity array type flag (MOSS)
+!   OPTS%ITOL   = Error tolerance flag (ITOL) (ITOL)
+!   OPTS%ATOL   = Absolute error tolerance(s) (ATOL)
+!   OPTS%RTOL   = Relative error tolerance(s) (RTOL)
+!   OPTS%DENSE  = Use dense linear algebra
+!   OPTS%BANDED = Use banded linear algebra 
+!   OPTS%SPARSE = Use sparse linear algebra 
+!   OPTS%IOPT   = DVODE optional parameter input flag (IOPT)
+!   OPTS%NG     = Number of event functions
+!   RUSER(1)    = TCRIT (don't step past)
+!   IUSER(1)    = Jacobian lower bandwidth (ML)
+!   IUSER(2)    = Jacobian upper bandwidth (MU)
+!   RUSER(5)    = Initial step size to try (H0)
+!   RUSER(6)    = Maximum allowable step size (HMAX)
+!   RUSER(7)    = Minimum allowable step size (HMIN)
+!   IUSER(5)    = Maximum allowable integration order (MAXORD)
+!   IUSER(6)    = Maximum number of integration steps (MXSTEP)
+!   IUSER(7)    = Maximum number of T+H=T messages (MXHNIL)
+!   NZ_SWAG     = Guess for the number of nonzeros in the
+!                 sparse Jacobian
+!   NG          = Number of user event functions
+!   BOUNDS,     = Nonnegativity information
+!   NDX, IDX
+!   YMAXWARN    = Warning flag for |y(t)| < abserr
+!   MA28_ELBOW_ROOM = Integer multiple by which to increase
+!                     the elbow room in the MA28 sparse work
+!                     arrays
+!   MC19_SCALING    = logical flag to control MC19 sparse
+!                     scaling of the Jacobian
+!   MA28_MESSAGES   = logical flag to control printing of MA28
+!                     messages.
+!   MA28_EPS        = real(wp) MA28 singularity threshold
+!
+!                         All Options
+!
+! METHOD_FLAG
+!
+! Default:   Not used
+! Change to: No need to specify if use one of next three parameters
+!            but can be changed to any value of the MF method flag
+!            in dvode.f77
+!
+! DENSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for dense linear algebra
+!
+! BANDED_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for banded linear algebra
+!
+! SPARSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for sparse linear algebra
+
+! USER_SUPPLIED_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if want to supply subroutine JAC to DVODE_F90
+!
+! LOWER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Lower bandwidth if BANDED_J = .TRUE.
+!
+! UPPER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Upper bandwidth if BANDED_J = .TRUE.
+!
+! RELERR
+!
+! Default:   None
+! Change to: Specify a nonzero relative error tolerance
+!
+! ABSERR
+!
+! Default:   None
+! Change to: Specify a scalar absolute error tolerance or
+!            a vector of absolute error tolerances
+!
+! ABSERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of absolute error tolerances
+!
+! TCRIT
+!
+! Default:   Not used
+! Change to: Value of T which DVODE_F90 is not to step past
+!
+!     H0
+!
+! Default:   Determined by DVODE_F90
+! Change to: Guess for initial step size
+!
+! HMAX
+!
+! Default:   Infinity
+! Change to: Maximum allowable step size
+!
+! HMIN
+!
+! Default:   0.0D0
+! Change to: Minimum allowable step size
+!
+! MAXORD
+!
+! Default:   Determined by DVODE_F90
+! Change to: Maximum integration order
+!
+! MXSTEP
+!
+! Default:   5000
+!     Change to: Maximum number of steps between output points
+!
+! MXHNIL
+!
+! Default:   10
+! Change to: Maximum number of times T+H=T message will be printed
+!
+! NZSWAG
+!
+! Default:   Determined by DVODE_F90
+! Change to: Amount by which to increment sizes of sparse arrays
+!
+! USER_SUPPLIED_SPARSITY
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to call subroutine USERSETS_IAJA to
+!            define the sparse structure array pointers directly
+!
+! NEVENTS
+!
+! Default:   0
+! Change to: Number of event functions if wish to supply subroutine
+!            GFUN to DVODE_F90
+!
+! CONSTRAINED
+!
+! Default:   Bounds not imposed on solution
+! Change to: Array of indices for components on which to impose
+!            solution bounds
+!
+! CLOWER
+!
+! Default:   Not used
+! Change to: Vector containing lower bounds corresponding to
+!            CONSTRAINED
+!
+! CUPPER
+!
+! Default:   Not used
+! Change to: Vector containing upper bounds corresponding to
+!            CONSTRAINED
+!
+! MA28_RPS
+!
+! Default:   .FALSE.
+! Change to: Redo the MA28AD sparse pivoting sequence any time
+!            MA28BD considers the iteration matrix to be
+!            numerically singularity
+!
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+! For a sparse Jacobian, IA(J+1)-IA(J) is the number
+! of nonzeros in column change. JA(I) indicates the
+! rows in which the nonzeros occur. For column J,
+! the nonzeros occurs in rows I=JA(K) for K=I1,...,I2
+! where I1=IA(J) and I2= IA(J+1)-1. Load DF(I)/DY(J)
+! in PD(I). Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = IA(J)
+!       I2 = IA(J+1) - 1
+!       DO K = I1, I2
+!          I = JA(K)
+!          PD(I) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+!                    More on Sparsity Options
+!
+! Two facts of life regarding the use of direct sparse solvers are
+! (1) significant improvements are possible, and (2) the use of
+! direct sparse solvers often is more demanding of the user.
+! Although SET_NORMAL_OPTS provides modest provisions for solving
+! problems with sparse Jacobians, using SET_INTERMEDIATE_OPTS rather than
+! SET_NORMAL_OPTS provides several advanced options. These options
+! are described below. The recommended manner in which to use
+! these options is also provided. Note that each of these optional
+! parameters have default values and need not be specified in your
+! call to SET_INTERMEDIATE_OPTS if you wish to use the default values. Note
+! also that the order in which the options are specified in a call
+! to SET_INTERMEDIATE_OPTS is not important.
+!
+!  (1) First determine if it is feasible to use either the BANDED
+!      or DENSE Jacobian option.
+!         Recommendation:
+!         Use the DENSE or BANDED option if possible. They do
+!         not require use of most of the options described here.
+!    
+!  (2) The Jacobian is approximated internally using differences
+!      if you do not provide an analytic Jacobian. The option
+!      USER_SUPPLIED_JACOBIAN=.TRUE. may be used if you wish to
+!      provide an analytic Jacobian.
+!         Recommendation:
+!         Use an internally generated Jacobian for most problems
+!         but consider providing an analytic Jacobian if it not
+!         too much trouble.
+!
+!  (3) If you do not provide the sparse structure arrays, they
+!      are approximated internally by making NEQ calls to your
+!      derivative subroutine and using differences to approximate
+!      the structure of the Jacobian. The option
+!      USER_SUPPLIED_SPARSITY and a call to USERSETS_IAJA can
+!      be used to supply the arrays directly. You can also use
+!      subroutine SET_IAJA to approximate the structure using
+!      different perturbation factors than those used in DVODE_F90.
+!         Recommendations:
+!         Although allowing DVODE_F90 to approximate the Jacobian
+!         structure suffices for most problems, if you know the
+!         sparsity pattern provide it directly. This eliminates
+!         the possibility that an important element that happens
+!         to be 0 when the sparsity pattern is approximated is
+!         later nonzero; and it avoids the NEQ extra calls to
+!         your derivative subroutine to approximate the structure.
+!         Note that a nemesis for any sparse ode solver is a
+!         problem in which the sparsity pattern actually changes
+!         during the integration. An example of such a problem
+!         is provided in the demohum21.f90 demonstration program.
+!         If you know the sparsity pattern changes or if you
+!         suspect it does because DVODE_F90 is generating
+!         nonconvergence error messages, consider having DVODE_F90
+!         re-approximate the structure by calling SET_INTERMEDIATE_OPTS and
+!         forcing an integration restart when control is returned
+!         to your calling program. Please do not do this at every
+!         output point since it will be extremely time consuming
+!         and inefficient if it is not needed.
+!
+!  (4) The optional parameter NZSWAG may/should be used to speed
+!      up the determination of acceptable array sizes for the
+!      internal sparse working arrays and the sparse Jacobian.
+!      Initially, DVODE_F90 allocates arrays of length
+!      max(10*NEQ,NSZSWAG) and increases this amount by
+!      max(10*NEQ,ELBOW_ROOM*NSZSWAG) as necessary. NZSWAG
+!      has a default value of 1000 and ELBOW_ROOM has a default
+!      value of 2.
+!         Recommendation:
+!         Provide a larger value for NZSWAG particularly if NEQ
+!         is large and you suspect considerable fill-in due to
+!         partial pivoting.
+!
+!  (5) MA28BD uses the pivot sequence initially determined by
+!      MA28AD. When a singularity is diagnosed, the internal
+!      procedure used by the DENSE and BANDED options is used
+!      to reduce the step size and re-calulate the iteration
+!      matrix. This works fine for most problems; but particularly
+!      for badly scaled problems, the solution may be unsuccessful
+!      or it may drag along using small step sizes. This is due
+!      to the fact MA28BD will continue to use the out-of-date pivot
+!      sequence until singularity is again diagnosed. An option not
+!      available in previous sparse ode solvers may be used to
+!      instruct DVODE_F90 to force MA28AD to calculate a new pivot
+!      sequence when MA28BD encounters a singularity. Although
+!      MA28AD is considerably slower than MA28BD, the additional
+!      calls to MA28AD ensure that the pivot sequence is more
+!      up to date. This can increase both the accuracy and the
+!      efficiency very dramatically. The demodirn.f90 demonstration
+!      program provides an illustration of the dramatic improvement
+!      that is possible. The optional parameter MA28_RPS may be set
+!      .TRUE. to force these pivot sequence updates.
+!         Recommendation:
+!         Use the default value MA28_RPS=.FALSE; but if DVODE_F90
+!         encounters nonconvergence, use MA28_RPS=.TRUE. to force
+!         pivot sequence updates.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR, H0, HMAX, HMIN,         &
+        RELERR, TCRIT
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH, MAXORD,          &
+          MXHNIL, MXSTEP, NEVENTS, NZSWAG, UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, CHANGE_ONLY_f77_OPTIONS,&
+          DENSE_J, MA28_RPS, SPARSE_J, USER_SUPPLIED_JACOBIAN,              &
+          USER_SUPPLIED_SPARSITY
+! ..
+! .. Array Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:)
+        KPP_REAL, OPTIONAL :: CLOWER(:), CUPPER(:)
+        INTEGER, OPTIONAL, INTENT (IN) :: CONSTRAINED(:)
+! ..
+! .. Local Scalars ..
+        INTEGER ::  IER, IOPT, METH, MF, MFA, MFSIGN, MITER, ML, MOSS, MU,  &
+          NAE, NG, NRE
+        LOGICAL :: BANDED, DENSE, SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_INTERMEDIATE_OPTS
+! ..
+    RUSER(1:LRWUSER) = ZERO
+    IUSER(1:LIWUSER) = 0
+    
+!   Allow default error tolerances?
+    ALLOW_DEFAULT_TOLS = .FALSE.
+
+!   Maximum number of consecutive error test failures?
+    CONSECUTIVE_EFAILS = KFH
+
+!   Maximum number of consecutive corrector iteration failures?
+    CONSECUTIVE_CFAILS = MXNCF
+
+!   Use JACSP to approximate Jacobian?
+    USE_JACSP = .FALSE.
+
+!   If only f77 options are to be changed, do it and return.
+    IF (PRESENT(CHANGE_ONLY_f77_OPTIONS)) THEN
+       IF (CHANGE_ONLY_f77_OPTIONS) THEN
+          IF (.NOT.OPTS_CALLED) THEN
+             MSG = 'You have not previously called SET_OPTS before attempting'
+             CALL XERRDV(MSG,250,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'to change one or more of the vode.f77 optional parameters.'
+             CALL XERRDV(MSG,250,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(HMAX)) THEN
+             IOPT = 1
+             RUSER(6) = HMAX
+             MSG = 'HMAX changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,260,1,0,0,0,1,HMAX,ZERO)
+          END IF
+          IF (PRESENT(HMIN)) THEN
+             IOPT = 1
+             RUSER(7) = HMIN
+             MSG = 'HMIN changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,270,1,0,0,0,1,HMIN,ZERO)
+          END IF
+          IF (PRESENT(TCRIT)) THEN
+             IOPT = 1
+             RUSER(1) = TCRIT
+             MSG = 'TCRIT changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,280,1,0,0,0,1,TCRIT,ZERO)
+          END IF
+          IF (PRESENT(MXSTEP)) THEN
+             IOPT = 1
+             IUSER(6) = MXSTEP
+             MSG = 'MXSTEP changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,290,1,1,MXSTEP,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MAXORD)) THEN
+             IOPT = 1
+             IUSER(5) = MAXORD
+             MSG = 'MAXORD changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,300,1,1,MAXORD,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MXHNIL)) THEN
+             IOPT = 1
+             IUSER(7) = MXHNIL
+             MSG = 'MXHNIL changed in SET_INTERMEDIATE_OPTS.'
+             CALL XERRDV(MSG,310,1,1,MXHNIL,0,0,ZERO,ZERO)
+          END IF
+       END IF
+       RETURN
+    END IF
+
+!       Set the flag to indicate that SET_INTERMEDIATE_OPTS has been called.
+        OPTS_CALLED = .TRUE.
+
+!       Set the MA48 storage cleanup flag.
+        MA48_WAS_USED = .FALSE.
+
+!       Set the fast factor option for MA48,
+        USE_FAST_FACTOR = .TRUE.
+
+!       Determine the working precision and define the value for UMAX
+!       expected by MA28. Note that it is different for single and
+!       double precision.
+        WPD = KIND(1.0D0)
+        WPS = KIND(1.0E0)
+        IF (WPD/=WP .AND. WPS/=WP) THEN
+          MSG = 'Illegal working precision in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,320,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (WPD==WP) THEN
+!       Working precision is double.
+          UMAX = 0.999999999_dp
+        ELSE
+!       Working precision is single.
+          UMAX = 0.9999_dp
+        END IF
+
+!       Set the MA28 message flag.
+        LP = 0
+
+!       Set the MA28 singularity threshold.
+        EPS = 1.0E-4_dp
+
+!       Set the MA28 pivot sequence frequency flag.
+        IF (PRESENT(MA28_RPS)) THEN
+           IF (MA28_RPS) THEN
+              REDO_PIVOT_SEQUENCE = MA28_RPS
+           ELSE
+              REDO_PIVOT_SEQUENCE = .FALSE.
+           END IF
+        ELSE
+           REDO_PIVOT_SEQUENCE = .FALSE.
+        END IF
+
+        MA28AD_CALLS = 0
+        MA28BD_CALLS = 0
+        MA28CD_CALLS = 0
+        MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       MA48AD_CALLS = 0
+!       MA48BD_CALLS = 0
+!       MA48CD_CALLS = 0
+!_______________________________________________________________________
+        IRNCP = 0
+        ICNCP = 0
+        MINIRN = 0
+        MINICN = 0
+        MAX_MINIRN = 0
+        MAX_MINICN = 0
+        MAX_NNZ = 0
+
+!       Set the flag to warn the user if |(y(t)| < abserr.
+        YMAXWARN = .FALSE.
+
+!       Load defaults for the optional input arrays for DVODE.
+        IUSER(1:8) = 0
+        RUSER(1:8) = ZERO
+
+        IF (PRESENT(SPARSE_J)) THEN
+          IF (SPARSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 126
+              ELSE
+                MF = 227
+              END IF
+            ELSE
+              MF = 227
+            END IF
+            IF (PRESENT(USER_SUPPLIED_SPARSITY)) THEN
+              IF (USER_SUPPLIED_SPARSITY) THEN
+                MF = MF - 100*(MF/100)
+              END IF
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(BANDED_J)) THEN
+          IF (BANDED_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 24
+              ELSE
+                MF = 25
+              END IF
+            ELSE
+              MF = 25
+            END IF
+          END IF
+        END IF
+
+        IF (PRESENT(DENSE_J)) THEN
+          IF (DENSE_J) THEN
+            IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN) THEN
+                MF = 21
+              ELSE
+                MF = 22
+              END IF
+            ELSE
+              MF = 22
+            END IF
+          END IF
+        END IF
+
+!       Check for errors in MF.
+        MFA = IABS(MF)
+        MOSS = MFA/100
+        METH = (MFA-100*MOSS)/10
+        MITER = MFA - 100*MOSS - 10*METH
+        IF (METH<1 .OR. METH>2) THEN
+          MSG = 'Illegal value of METH in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,330,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MITER<0 .OR. MITER>7) THEN
+          MSG = 'Illegal value of MITER in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,340,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (MOSS<0 .OR. MOSS>2) THEN
+          MSG = 'Illegal value of MOSS in SET_INTERMEDIATE_OPTS.'
+          CALL XERRDV(MSG,350,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Reset MF, now that MOSS is known.
+        MFSIGN = SIGN(1,MF)
+        MF = MF - 100*MOSS*MFSIGN
+
+        IF (MITER==0) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==1 .OR. MITER==2) THEN
+          DENSE = .TRUE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==3) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==4 .OR. MITER==5) THEN
+          DENSE = .FALSE.
+          BANDED = .TRUE.
+          SPARSE = .FALSE.
+        ELSE IF (MITER==6 .OR. MITER==7) THEN
+          DENSE = .FALSE.
+          BANDED = .FALSE.
+          SPARSE = .TRUE.
+        END IF
+
+!       Define the banded Jacobian band widths.
+        IF (BANDED) THEN
+          IF (PRESENT(LOWER_BANDWIDTH)) THEN
+            ML = LOWER_BANDWIDTH
+            IUSER(1) = ML
+          ELSE
+            MSG = 'In SET_INTERMEDIATE_OPTS you have indicated a'
+            CALL XERRDV(MSG,360,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not'
+            CALL XERRDV(MSG,360,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'supplied the lower bandwidth.'
+            CALL XERRDV(MSG,360,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(UPPER_BANDWIDTH)) THEN
+            MU = UPPER_BANDWIDTH
+            IUSER(2) = MU
+          ELSE
+            MSG = 'In SET_INTERMEDIATE_OPTS you have indicated a'
+            CALL XERRDV(MSG,370,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'banded Jacobian but you have not'
+            CALL XERRDV(MSG,370,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'supplied the upper bandwidth.'
+            CALL XERRDV(MSG,370,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Define the nonzero diagonals.
+          BNGRP = 0
+          SUBS = .FALSE.
+          SUPS = .FALSE.
+          NSUBS  = 0
+          NSUPS = 0
+        END IF
+
+!       Define the sparse Jacobian options.
+        SCALE_MATRIX = .FALSE.
+        ELBOW_ROOM = 2
+        IF (SPARSE) THEN
+!         NZSWAG for the number of nonzeros in the Jacobian.
+          IF (PRESENT(NZSWAG)) THEN
+            NZ_SWAG = MAX(NZSWAG,0)
+          ELSE
+            NZ_SWAG = 0
+          END IF
+!         Indicate that SET_IAJA has not yet been called successfully.
+          IAJA_CALLED = .FALSE.
+!         Check for illegal method flags.
+          IF (MOSS==2 .AND. MITER/=7) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,380,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (MOSS==1 .AND. MITER/=6) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS MOSS=1 but MITER is not 6.'
+            CALL XERRDV(MSG,390,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         IF (MOSS==0 .AND. MITER/=7) THEN
+!           MSG = 'In SET_INTERMEDIATE_OPTS MOSS=0 but MITER is not 7.'
+!           CALL XERRDV(MSG,400,2,0,0,0,0,ZERO,ZERO)
+!         END IF
+!         Allow MC19 scaling for the Jacobian.
+          SCALE_MATRIX = .FALSE.
+        END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       Process the constrained solution components.
+        IF (PRESENT(CONSTRAINED)) THEN
+          NDX = SIZE(CONSTRAINED)
+          IF (NDX<1) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the size of CONSTRAINED < 1.'
+            CALL XERRDV(MSG,410,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (.NOT.(PRESENT(CLOWER)) .OR. .NOT.(PRESENT(CUPPER))) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the arrays CLOWER and CUPPER'
+            CALL XERRDV(MSG,420,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'are not present.'
+            CALL XERRDV(MSG,420,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (SIZE(CLOWER)/=NDX .OR. SIZE(CUPPER)/=NDX) THEN
+            MSG = 'In SET_INTERMEDIATE_OPTS the size of the solution bound'
+            CALL XERRDV(MSG,430,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'arrays must be the same as the CONSTRAINED array.'
+            CALL XERRDV(MSG,430,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Note: The contents of CONSTRAINED will be checked
+!         in subroutine DVODE after NEQ is known.
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,30)
+          END IF
+          ALLOCATE (IDX(NDX),LB(NDX),UB(NDX),STAT=IER)
+          CALL CHECK_STAT(IER,40)
+          IDX(1:NDX) = CONSTRAINED(1:NDX)
+          LB(1:NDX) = CLOWER(1:NDX)
+          UB(1:NDX) = CUPPER(1:NDX)
+          BOUNDS = .TRUE.
+        ELSE
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,50)
+          END IF
+          NDX = 0
+          BOUNDS = .FALSE.
+        END IF
+
+!       Is the Jacobian constant?
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+!       Process the miscellaneous options.
+
+!       Don't step past TCRIT variable.
+        IF (PRESENT(TCRIT)) THEN
+          RUSER(1) = TCRIT
+        ELSE
+          RUSER(1) = ZERO
+        END IF
+
+!       DVODE optional parameters.
+        IOPT = 1
+        IF (PRESENT(MAXORD)) THEN
+          IUSER(5) = MAXORD
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXHNIL)) THEN
+          IUSER(7) = MXHNIL
+          IOPT = 1
+        END IF
+        IF (PRESENT(H0)) THEN
+          RUSER(5) = H0
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          IOPT = 1
+        END IF
+        U_PIVOT = ONE
+        OPTS%IOPT = IOPT
+
+!       Define the error tolerances.
+
+!       Relative error tolerances.
+        NRE = 1
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,60)
+        IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,440,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_dp
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,450,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,460,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerances.
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,460,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,460,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,70)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,470,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,480,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,490,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,490,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,490,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+!            3   array    scalar  RTOL(i)*ABS(Y(i)) + ATOL
+!            4   array    array   RTOL(i)*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ITOL = 2
+        ELSE
+          OPTS%ITOL = 1
+        END IF
+        RETURN
+
+  END FUNCTION SET_INTERMEDIATE_OPTS
+!_______________________________________________________________________
+
+  FUNCTION SET_OPTS(METHOD_FLAG, DENSE_J, BANDED_J, SPARSE_J,          &
+    USER_SUPPLIED_JACOBIAN, SAVE_JACOBIAN, CONSTANT_JACOBIAN,          &
+    LOWER_BANDWIDTH, UPPER_BANDWIDTH, SUB_DIAGONALS, SUP_DIAGONALS,    &
+    RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR, TCRIT, H0, HMAX,     &
+    HMIN, MAXORD, MXSTEP, MXHNIL, YMAGWARN, SETH, UPIVOT, NZSWAG,      &
+    USER_SUPPLIED_SPARSITY, NEVENTS, CONSTRAINED, CLOWER, CUPPER,      &
+    MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES, MA28_EPS,            &
+    MA28_RPS, CHANGE_ONLY_f77_OPTIONS,JACOBIAN_BY_JACSP)               &
+  RESULT(OPTS)
+
+! FUNCTION SET_OPTS:
+!    VODE.f77 method flag:
+!       METHOD_FLAG
+!    Jacobian type:
+!       DENSE_J, BANDED_J, SPARSE_J
+!    Analytic Jacobian:
+!       USER_SUPPLIED_JACOBIAN
+!    Jacobian options:
+!       SAVE_JACOBIAN, CONSTANT_JACOBIAN. JACOBIAN_BY_JACSP
+!    If banded Jacobian:
+!       LOWER_BANDWIDTH, UPPER_BANDWIDTH
+!    If specify the nonzero diagonals for banded Jacobian:
+!       SUB_DIAGONALS, SUP_DIAGONALS
+!    Error tolerances:
+!       RELERR, RELERR_VECTOR, ABSERR, ABSERR_VECTOR
+!    VODE.f77 optional parameters:
+!       TCRIT, H0, HMAX, HMIN, MAXORD, MXSTEP, MXHNIL
+!    Solution smaller than absolute error tolerance:
+!       YMAGWARN
+!    Sparse flags:
+!       SETH, UPIVOT, NZSWAG, USER_SUPPLIED_SPARSITY
+!       MA28_ELBOW_ROOM, MC19_SCALING, MA28_MESSAGES
+!       MA28_EPS, MA28_RPS
+!    Rootfinding:
+!       NEVENTS
+!    Impose bounds on solution:
+!       CONSTRAINED, CLOWER, CUPPER
+!    Change one or more of HMAX, HMIN, TCRIT, MXSTEP, MXHNIL, MAXORD
+!       CHANGE_ONLY_f77_OPTIONS
+! RESULT(OPTS)
+
+! SET_OPTIONS sets user parameters for DVODE via keywords. Values that
+! are defined herein will be used internally by DVODE. All option
+! keywords are OPTIONAL and order is not important.
+
+! Note that DVODE_F90 requires that one of SET_NORMAL_OPTS or
+! SET_INTERMEDIATE_OPTS or SET_OPTS is called before the first
+! time DVODE_F90 is called.
+
+!                     Quick Summary of Options
+
+! METHOD_FLAG            - any legal value of MF as in DVODE
+! DENSE_J                - Jacobian is sparse alternative to MF
+! BANDED_J               - Jacobian is banded alternative to MF 
+! SPARSE_J               - Jacobian is sparse alternative to MF   
+! USER_SUPPLIED_JACOBIAN - User will supply Jacobian subroutine
+!                          (user supplied subroutine JAC required)
+! SAVE_JACOBIAN          - Jacobian will be saved and reused
+! CONSTANT_JACOBIAN      - Jacobian is constant
+! JACOBIAN_BY_JACSP      - Use Doug Salane's approximate Jacobian
+!                          algorithm
+! LOWER_BANDWIDTH        - Lower bandwidth ML in DVODE
+! UPPER_BANDWIDTH        - Upper bandwidth MU in DVODE
+! SUB_DIAGONALS          - Nonzero sub diagonals in Jacobian
+! SUP_DIAGONALS          - Nonzero super diagonals in Jacobian
+! RELERR                 - Scalar relative error tolerance in DVODE
+! RELERR_VECTOR          - Vector relative error tolerance in DVODE
+! ABSERR                 - Scalar absolute error tolerance in DVODE
+! ABSERR_VECTOR          - Vector absolute error tolerance in DVODE
+! TCRIT                  - Critical time TCRIT in DVODE
+! H0                     - Starting step size in DVODE
+! HMAX                   - Maximum step size in DVODE 
+! HMIN                   - Minimum step size in DVODE 
+! MAXORD                 - Maximum integration order in DVODE
+! MXSTEP                 - Maximum number of integration steps
+!                          in DVODE
+! MXHNIL                 - Maximum number of T+H=T messages in DVODE
+! YMAGWARN               - Warn if magnitude of solution is smaller
+!                          than absolute error tolerance
+! SETH                   - Sparse Jacobian element threshold value
+! UPIVOT                 - MA28 partial pivoting parameter
+! NZSWAG                 - guess for the number of nonzeros in sparse
+!                          Jacobian
+! USER_SUPPLIED_SPARSITY - user will supply sparsity structure
+!                          arrays by calling USERSETS_IAJA 
+! MA28_ELBOW_ROOM        - Supply an integer greater than 2 if you
+!                          wish to increase the elbow room in the
+!                          MA28 work arrays (by MA28_ELBOW_ROOM * NZA).
+! MC19_SCALING           - .TRUE. if you wish to invoke sparse scaling
+!                           of the Jacobian.
+! MA28_MESSAGES          - Control printing of MA28 messages
+! MA28_RPS               - Redo MA28AD pivot sequence if a singularity
+!                          is encountered
+! NEVENTS                - number of user defined root finding functions
+!                          (user supplied subroutine G required)
+! CONSTRAINED,           - array of solution component indices that
+! CLOWER,                  are to be constrained by the lower and
+! CUPPER                   upper bound arrays CLOWER and CUPPER so that
+!                          CLOWER(I) <= Y(CONSTRAINED(I)) <= CUPPER(I)
+! CHANGE_ONLY_f77_OPTIONS- flag to indicate whether to only change any
+!                          of the parameters MXSTEP, MXHNIL, MAXORD,
+!                          HMAX, HMIN, TCRIT
+!                     Options Types
+! METHOD_FLAG            - integer
+! DENSE_J                - logical
+! BANDED_J               - logical
+! SPARSE_J               - logical
+! USER_SUPPLIED_JACOBIAN - logical
+! SAVE_JACOBIAN          - logical
+! CONSTANT_JACOBIAN      - logical
+! JACOBIAN_BY_JACSP      - logical
+! LOWER_BANDWIDTH        - integer
+! UPPER_BANDWIDTH        - integer
+! SUB_DIAGONALS          - integer array
+! SUP_DIAGONALS          - integer array
+! RELERR                 - real(wp) scalar
+! RELERR_VECTOR          - real(wp) vector
+! ABSERR                 - real(wp) scalar
+! ABSERR_VECTOR          - real(wp) vector
+! TCRIT                  - real(wp) scalar
+! H0                     - real(wp) scalar
+! HMAX                   - real(wp) scalar
+! HMIN                   - real(wp) scalar
+! MAXORD                 - integer
+! MXSTEP                 - integer
+! MXHNIL                 - integer
+! YMAGWARN               - logical
+! SETH                   - real(wp) scalar
+! UPIVOT                 - real(wp) scalar
+! NZSWAG                 - integer
+! USER_SUPPLIED_SPARSITY - logical
+! NEVENTS                - integer
+! CONSTRAINED            - integer array
+! CLOWER                 - real(wp) array
+! CUPPER                 - real(wp) array
+! CHANGE_ONLY_f77_OPTIONS- logical
+
+! Argument list parameters:
+! METHOD_FLAG              = integration method flag
+! ABSERR                   = scalar absolute error tolerance
+! ABSERR_VECTOR            = vector of absolute error tolerances
+! RELERR                   = scalar relative error tolerance
+! RELERR_VECTOR            = vector of relative error tolerances
+! NEVENTS                  = Number of event functions (requires
+!                            user-supplied GFUN)
+! DENSE_J                  = use dense linear algebra if .TRUE.
+! BANDED_J                 = use banded linear algebra if .TRUE.
+!   LOWER_BANDWIDTH        = lower bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   UPPER_BANDWIDTH        = upper bandwidth of the Jacobian
+!                            (required if BANDED_J = .TRUE.)
+!   SUB_DIAGONALS          = starting row numbers of nonzero sub
+!                            diagonals counting up from the lowest
+!                            sub diagonal
+!   SUP_DIAGONALS          = starting column numbers of nonzero
+!                            super diagonals counting up from the
+!                            lowest super diagonal
+! SPARSE_J                 = use sparse linear algebra if .TRUE.
+!   UPIVOT                 = partial pivot control flag (default=ONE)
+!                          = 0.0D0 for no partial pivoting
+!                          = ONE for (full) partial pivoting
+!                            Values between 0.0D0 and ONE yield
+!                            MA28 (partial) partial pivoting.
+!   NZSWAG                 = If you wish you may supply a guess,
+!                            NZSWAG, at the number of nonzeros
+!                            in the Jacobian matrix. In some cases
+!                            this will speed up the determination
+!                            of the necessary storage.
+!   USER_SUPPLIED_SPARSITY = .TRUE. if you wish to supply the sparsity
+!                            structure arrays directly by calling
+!                            USERSETS_IAJA
+!   MA28_ELBOW_ROOM        = Supply an integer greater than 2 if you
+!                            wish to increase the elbow room in the
+!                            MA28 work arrays (by MA28_ELBOW_ROOM * NZA).
+!   MC19_SCALING           = .TRUE. if you wish to invoke sparse scaling
+!                            of the Jacobian.
+!   MA28_MESSAGES          = .TRUE. to print all MA28 messages.
+!   MA28_EPS               = MA28 singularity threshold. If MA28BD
+!                            determines that the ratio of the current
+!                            pivot to the largest element in the row
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+!   MA28_RPS               = .TRUE. to force MA28AD to calculate a new
+!                            pivot sequence for use in MA28BD if a
+!                            singular iteration matrix is encountered
+!                            is smaller than EPS, it will flag the
+!                            Jacobian as singular and force MA28AD
+!                            to calculate a new pivot sequence.
+! USER_SUPPLIED_JACOBIAN   = exact Jacobian option
+!                            (requires user-supplied JAC)
+! SAVE_JACOBIAN            = reuse saved Jacobians
+! JACOBIAN_BY_JACSP        = use Doug Salane's Jacobian algorithm
+! TCRIT                    = critical time
+! H0                       = initial step size to try
+! HMAX                     = maximum allowable step size
+! HMIN                     = minimum allowable step size
+! MAXORD                   = maximum allowable integration order
+! MXSTEP                   = maximum number of integration steps
+!                            between calls to DVODE
+! MXHNIL                   = maximum number of printed messages
+!                            if the T+H=T condition occurs
+! CONSTRAINED              = array containing the indices of
+!                            solution components which are to be
+!                            be constrained by CLOWER and CUPPER.
+!                            The size of CONSTRAINED must be
+!                            positive and not exceed NEQ, the
+!                            number of ODEs. Each component of
+!                            CONSTRAINED must be between 1 and NEQ.
+! CLOWER, CUPPER           = lower and upper bound arrays for the.
+!                            solution. Each must be the same size
+!                            as the CONSTRAINED vector.
+! YMAGWARN                 = If .TRUE., a warning will be issued
+!                            before any return from DVODE for any
+!                            solution component whose magnitude
+!                            is smaller than the absolute error
+!                            tolerance for that component.
+!   User-callable Routines:
+!   The following routines may be called by the user:
+!   SET_OPTS      : Used to set options for DVODE_F90
+!   GET_STATS     : Used to gather summary integration
+!                   statistics following a successful
+!                   return from DVODE_F90
+!   DVINDY        : Used if the user wishes to interpolate
+!                   solution or derivative following a
+!                   successful return from DVODE_F90
+!   USERSETS_IAJA : Used if the user wishes to supply the
+!                   sparsity structure directly
+!   Detailed Description of SET_OPTS
+!   The following are defined in SET_OPTS:
+!   OPTS%MF     = Integration method flag (MF)
+!   OPTS%METH   = Integration family flag (METH)
+!   OPTS%MITER  = Iteration type flag (MITER)
+!   OPTS%MOSS   = Sparsity array type flag (MOSS)
+!   OPTS%ITOL   = Error tolerance flag (ITOL) (ITOL)
+!   OPTS%ATOL   = Absolute error tolerance(s) (ATOL)
+!   OPTS%RTOL   = Relative error tolerance(s) (RTOL)
+!   OPTS%DENSE  = Use dense linear algebra
+!   OPTS%BANDED = Use banded linear algebra 
+!   OPTS%SPARSE = Use sparse linear algebra 
+!   OPTS%IOPT   = DVODE optional parameter input flag (IOPT)
+!   OPTS%NG     = Number of event functions
+!   RUSER(1)    = TCRIT (don't step past)
+!   IUSER(1)    = Jacobian lower bandwidth (ML)
+!   IUSER(2)    = Jacobian upper bandwidth (MU)
+!   RUSER(5)    = Initial step size to try (H0)
+!   RUSER(6)    = Maximum allowable step size (HMAX)
+!   RUSER(7)    = Minimum allowable step size (HMIN)
+!   IUSER(5)    = Maximum allowable integration order (MAXORD)
+!   IUSER(6)    = Maximum number of integration steps (MXSTEP)
+!   IUSER(7)    = Maximum number of T+H=T messages (MXHNIL)
+!   NZ_SWAG     = Guess for the number of nonzeros in the
+!                 sparse Jacobian
+!   NG          = Number of user event functions
+!   BOUNDS,     = Nonnegativity information
+!   NDX, IDX
+!   YMAXWARN    = Warning flag for |y(t)| < abserr
+!   MA28_ELBOW_ROOM = Integer multiple by which to increase
+!                     the elbow room in the MA28 sparse work
+!                     arrays
+!   MC19_SCALING    = logical flag to control MC19 sparse
+!                     scaling of the Jacobian
+!   MA28_MESSAGES   = logical flag to control printing of MA28
+!                     messages.
+!   MA28_EPS        = real(wp) MA28 singularity threshold
+!
+!                         All Options
+!
+! METHOD_FLAG
+!
+! Default:   Not used
+! Change to: No need to specify if use one of next three parameters
+!            but can be changed to any value of the MF method flag
+!            in dvode.f77
+!
+! DENSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for dense linear algebra
+!
+! BANDED_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for banded linear algebra
+!
+! SPARSE_J
+!
+! Default:   .FALSE.
+! Change to: .TRUE. for sparse linear algebra
+
+! USER_SUPPLIED_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if want to supply subroutine JAC to DVODE_F90
+!
+! SAVE_JACOBIAN
+!
+! Default:   .TRUE.
+! Change to: .FALSE. if do not want DVODE_F90 to reuse saved
+!            Jacobians
+!
+! JACOBIAN_BY_JACSP
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to approximate the Jacobian using Doug Salane's
+!            JACSP Jacobian subroutine
+!
+! CONSTANT_JACOBIAN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if Jacobian is constant
+!
+! LOWER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Lower bandwidth if BANDED_J = .TRUE.
+!
+! UPPER_BANDWIDTH
+!
+! Default:   Not used
+! Change to: Upper bandwidth if BANDED_J = .TRUE.
+!
+! SUB_DIAGONALS
+!
+! Default:   Not used
+! Change to: Starting row locations for sub diagonals in
+!            banded Jacobian
+!
+! SUP_DIAGONALS
+!
+! Default:   Not used
+! Change to: Starting columns locations for super diagonals
+!            in banded Jacobian
+!
+! RELERR
+!
+! Default:   None
+! Change to: Specify a nonzero relative error tolerance
+!
+! RELERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of relative error tolerances
+!
+! ABSERR
+!
+! Default:   None
+! Change to: Specify a scalar absolute error tolerance or
+!            a vector of absolute error tolerances
+!
+! ABSERR_VECTOR
+!
+! Default:   Not used
+! Change to: Vector of absolute error tolerances
+!
+! TCRIT
+!
+! Default:   Not used
+! Change to: Value of T which DVODE_F90 is not to step past
+!
+!     H0
+!
+! Default:   Determined by DVODE_F90
+! Change to: Guess for initial step size
+!
+! HMAX
+!
+! Default:   Infinity
+! Change to: Maximum allowable step size
+!
+! HMIN
+!
+! Default:   0.0D0
+! Change to: Minimum allowable step size
+!
+! MAXORD
+!
+! Default:   Determined by DVODE_F90
+! Change to: Maximum integration order
+!
+! MXSTEP
+!
+! Default:   5000
+!     Change to: Maximum number of steps between output points
+!
+! MXHNIL
+!
+! Default:   10
+! Change to: Maximum number of times T+H=T message will be printed
+!
+! YMAGWARN
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to be warned when the magnitude of the
+!            solution is smaller than the absolute error tolerance
+!
+! SETH
+!
+! Default:   0.0D0
+! Change to: Threshold value below which Jacobian elements in the
+!            sparse Jacobian are considered to be zero
+!
+! UPIVOT
+!
+! Default:   1.0D0
+! Change to: partial pivoting factor between 0.0d0 and 1.0d0 to
+!            control the degree of partial pivoting used in sparse
+!            Gaussian Elimination
+!
+! NZSWAG
+!
+! Default:   Determined by DVODE_F90
+! Change to: Amount by which to increment sizes of sparse arrays
+!
+! USER_SUPPLIED_SPARSITY
+!
+! Default:   .FALSE.
+! Change to: .TRUE. if wish to call subroutine USERSETS_IAJA to
+!            define the sparse structure array pointers directly
+!
+! NEVENTS
+!
+! Default:   0
+! Change to: Number of event functions if wish to supply subroutine
+!            GFUN to DVODE_F90
+!
+! CONSTRAINED
+!
+! Default:   Bounds not imposed on solution
+! Change to: Array of indices for components on which to impose
+!            solution bounds
+!
+! CLOWER
+!
+! Default:   Not used
+! Change to: Vector containing lower bounds corresponding to
+!            CONSTRAINED
+!
+! CUPPER
+!
+! Default:   Not used
+! Change to: Vector containing upper bounds corresponding to
+!            CONSTRAINED
+!
+! MA28_ELBOW_ROOM
+!
+! Default:   2
+! Change to: Larger value to allow the sparse arrays more
+!            elbow room
+!
+! MC19_SCALING
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to invoke scaling of the sparse solution
+!
+! MA28_MESSAGES
+!
+! Default:   .FALSE.
+! Change to: .TRUE. to have MA28 diagnostic messages written
+!            to unit 6
+!
+! MA28_EPS
+!
+! Default:   1.0D-4
+! Change to: Smaller positive value to allow the ratio of the
+!            magnitude of pivot elements and remaining row
+!            entries to be smaller before the iteration matrix
+!            is considered to be numerically singularity
+!
+! MA28_RPS
+!
+! Default:   .FALSE.
+! Change to: Redo the MA28AD sparse pivoting sequence any time
+!            MA28BD considers the iteration matrix to be
+!            numerically singularity
+!
+! Note on Jacobian Storage Formats:
+!
+! If you supply an analytic Jacobian PD, load the
+! Jacobian elements DF(I)/DY(J), the partial
+! derivative of F(I) with respect to Y(J), using
+! the following formats. Here, Y is the solution,
+! F is the derivative, and PD is the Jacobian.
+!
+! For a full Jacobian, load PD(I,J) with DF(I)/DY(J).
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       DO I = 1, NEQ
+!          PD(I,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO       
+!
+! For a banded Jacobian, load PD(I-J+MU+1,J) with
+! DF(I)/DY(J) where ML is the lower bandwidth
+! and MU is the upper bandwidth of the Jacobian.
+! Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = MAX(1,J-ML)
+!       I2 = MIN(N,J+MU)
+!       DO I = I1, I2
+!          K = I-J+MU+1
+!          PD(K,J) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+! For a sparse Jacobian, IA(J+1)-IA(J) is the number
+! of nonzeros in column change. JA(I) indicates the
+! rows in which the nonzeros occur. For column J,
+! the nonzeros occurs in rows I=JA(K) for K=I1,...,I2
+! where I1=IA(J) and I2= IA(J+1)-1. Load DF(I)/DY(J)
+! in PD(I). Your code might look like this:
+!    DO J = 1, NEQ
+!       I1 = IA(J)
+!       I2 = IA(J+1) - 1
+!       DO K = I1, I2
+!          I = JA(K)
+!          PD(I) = ... DF(I)/DY(J)
+!       END DO
+!    END DO
+!
+!                    More on Sparsity Options
+!
+! Two facts of life regarding the use of direct sparse solvers are
+! (1) significant improvements are possible, and (2) the use of
+! direct sparse solvers often is more demanding of the user.
+! Although SET_NORMAL_OPTS provides modest provisions for solving
+! problems with sparse Jacobians, using SET_OPTS rather than
+! SET_NORMAL_OPTS provides several advanced options. These options
+! are described below. The recommended manner in which to use
+! these options is also provided. Note that each of these optional
+! parameters have default values and need not be specified in your
+! call to SET_OPTS if you wish to use the default values. Note
+! also that the order in which the options are specified in a call
+! to SET_OPTS is not important.
+!
+!  (1) First determine if it is feasible to use either the BANDED
+!      or DENSE Jacobian option.
+!         Recommendation:
+!         Use the DENSE or BANDED option if possible. They do
+!         not require use of most of the options described here.
+!    
+!  (2) The Jacobian is approximated internally using differences
+!      if you do not provide an analytic Jacobian. The option
+!      USER_SUPPLIED_JACOBIAN=.TRUE. may be used if you wish to
+!      provide an analytic Jacobian.
+!         Recommendation:
+!         Use an internally generated Jacobian for most problems
+!         but consider providing an analytic Jacobian if it not
+!         too much trouble.
+!
+!  (3) If you do not provide the sparse structure arrays, they
+!      are approximated internally by making NEQ calls to your
+!      derivative subroutine and using differences to approximate
+!      the structure of the Jacobian. The option
+!      USER_SUPPLIED_SPARSITY and a call to USERSETS_IAJA can
+!      be used to supply the arrays directly. You can also use
+!      subroutine SET_IAJA to approximate the structure using
+!      different perturbation factors than those used in DVODE_F90.
+!         Recommendations:
+!         Although allowing DVODE_F90 to approximate the Jacobian
+!         structure suffices for most problems, if you know the
+!         sparsity pattern provide it directly. This eliminates
+!         the possibility that an important element that happens
+!         to be 0 when the sparsity pattern is approximated is
+!         later nonzero; and it avoids the NEQ extra calls to
+!         your derivative subroutine to approximate the structure.
+!         Note that a nemesis for any sparse ode solver is a
+!         problem in which the sparsity pattern actually changes
+!         during the integration. An example of such a problem
+!         is provided in the demohum21.f90 demonstration program.
+!         If you know the sparsity pattern changes or if you
+!         suspect it does because DVODE_F90 is generating
+!         nonconvergence error messages, consider having DVODE_F90
+!         re-approximate the structure by calling SET_OPTS and
+!         forcing an integration restart when control is returned
+!         to your calling program. Please do not do this at every
+!         output point since it will be extremely time consuming
+!         and inefficient if it is not needed.
+!
+!  (4) The optional parameter UPIVOT is used to control the type
+!      of partial pivoting pivoting in MA28AD. UPIVOT=0.0D0
+!      corresponds to no pivoting; and UPIVOT=1.0D0 corresponds
+!      to partial pivoting. UPIVOT may be assigned any value
+!      between 0 and 1. The pivoting strategy used in MA28AD is
+!      to accept a pivot for which the magnitude of the pivot
+!      element is greater than or equal to UPIVOT times the
+!      magnitude of the largest remaining element in the pivot
+!      row. The default value is UPIVOT=1.DO
+!         Recommendation:
+!         Use the default value UPIVOT=1.0D0.
+!
+!  (5) The optional parameter NZSWAG may/should be used to speed
+!      up the determination of acceptable array sizes for the
+!      internal sparse working arrays and the sparse Jacobian.
+!      Initially, DVODE_F90 allocates arrays of length
+!      max(10*NEQ,NSZSWAG) and increases this amount by
+!      max(10*NEQ,ELBOW_ROOM*NSZSWAG) as necessary. NZSWAG
+!      has a default value of 1000 and ELBOW_ROOM has a default
+!      value of 2.
+!         Recommendation:
+!         Provide a larger value for NZSWAG particularly if NEQ
+!         is large and you suspect considerable fill-in due to
+!         partial pivoting.
+!
+!  (6) The optional parameter ELBOW_ROOM may be used to control
+!      the amount of "elbow room" needed in the MA28 sparse arrays.
+!      The default value is 2 but a larger value can sometimes
+!      speed up the determination of sparse array sizes.
+!         Recommendation:
+!         MA28 error and diagnostic messages are turned off by
+!         default. The optional parameter MA28_MESSAGES may be
+!         used to turn them on if it is assigned a nonzero value.
+!         If you see several messages that state that LIRN_ALL
+!         or LICN_ALL is too small and that additional storage
+!         is being allocated for another try, and you have
+!         provided a large value for NZSWAG, increase the size
+!         of ELBOW_ROOM.
+!
+!  (7) The optional parameter SETH may be assigned a nonzero value
+!      that represents a threshhold value for the magitude of
+!      elements in the Jacobian below which the element will be
+!      treated as being zero. The default value is SETH=0.0D0.
+!         Recommendation:
+!         Use the default value SETH=0.0D0.
+!
+!  (8) MA28AD determines the pivot sequence to be used in subsequent
+!      calls to MA28BD. When MA28BD is called it considers the
+!      iteration matrix to be numerically singular if the magnitude
+!      of the ratio of the largest remaining element in the pivot
+!      row to the pivot element is less than EPS. This condition
+!      can arise since MA28BD is using an out-of-date pivot sequence.
+!      The default value used is EPS=1.0D-4. A smaller value
+!      of EPS may be appropriate for some problems. The optional
+!      parameter MA28_EPS may be used to change the default value.
+!         Recommendation:
+!         Use the default value EPS=1.0D-4.
+!
+!  (9) Badly scaled Jacobians can cause problems for sparse solvers.
+!      The parameter MA28_SCALING may be set .TRUE. to instruct
+!      DVODE_F90 to scale the iteration matrix using MC19AD. This
+!      can positively impact the performance of MA28AD. The default
+!      setting is MA28_SCALING=.FALSE.
+!         Recommendation:
+!         Unless the solution is not successful, use the default
+!         setting for MA29_SCALING; but consider using scaling
+!         if you know the problem is badly scaled (e.g., if the
+!         magnitudes of the components differ greatly).
+!
+! (10) As mentioned above, MA28BD uses the pivot sequence initially
+!      determined by MA28AD. When a singularity is diagnosed, the
+!      internal procedure used by the DENSE and BANDED options is
+!      used to reduce the step size and re-calulate the iteration
+!      matrix. This works fine for most problems; but particularly
+!      for badly scaled problems, the solution may be unsuccessful
+!      or it may drag along using small step sizes. This is due
+!      to the fact MA28BD will continue to use the out-of-date pivot
+!      sequence until singularity is again diagnosed. An option not
+!      available in previous sparse ode solvers may be used to
+!      instruct DVODE_F90 to force MA28AD to calculate a new pivot
+!      sequence when MA28BD encounters a singularity. Although
+!      MA28AD is considerably slower than MA28BD, the additional
+!      calls to MA28AD ensure that the pivot sequence is more
+!      up to date. This can increase both the accuracy and the
+!      efficiency very dramatically. The demodirn.f90 demonstration
+!      program provides an illustration of the dramatic improvement
+!      that is possible. The optional parameter MA28_RPS may be set
+!      .TRUE. to force these pivot sequence updates.
+!         Recommendation:
+!         Use the default value MA28_RPS=.FALSE; but if DVODE_F90
+!         encounters nonconvergence, use MA28_RPS=.TRUE. to force
+!         pivot sequence updates. Note that use of this option
+!         will usually obviate the necessity to use the other
+!         options described above. Note that we decided not to
+!         use MA28_RPS=.TRUE. as default simply because other
+!         sparse ode solvers are averse to calling MA28AD more
+!         than is absolutely necessary for a given problem.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR, H0, HMAX, HMIN,         &
+        MA28_EPS, RELERR, SETH, TCRIT, UPIVOT
+        INTEGER, OPTIONAL, INTENT (IN) :: LOWER_BANDWIDTH, MAXORD,          &
+          MA28_ELBOW_ROOM, METHOD_FLAG, MXHNIL, MXSTEP, NEVENTS, NZSWAG,    &
+          UPPER_BANDWIDTH
+        LOGICAL, OPTIONAL, INTENT (IN) :: BANDED_J, CHANGE_ONLY_f77_OPTIONS,&
+          CONSTANT_JACOBIAN, DENSE_J, JACOBIAN_BY_JACSP, MA28_MESSAGES,     &
+          MA28_RPS, MC19_SCALING, SAVE_JACOBIAN, SPARSE_J,                  &
+          USER_SUPPLIED_JACOBIAN, USER_SUPPLIED_SPARSITY, YMAGWARN
+! ..
+! .. Array Arguments ..
+        KPP_REAL, OPTIONAL, INTENT (IN) :: ABSERR_VECTOR(:), RELERR_VECTOR(:)
+        KPP_REAL, OPTIONAL :: CLOWER(:), CUPPER(:)
+        INTEGER, OPTIONAL, INTENT (IN) :: CONSTRAINED(:), SUB_DIAGONALS(:), &
+        SUP_DIAGONALS(:)
+! ..
+! .. Local Scalars ..
+        INTEGER ::  IER, IOPT, METH, MF, MFA, MFSIGN, MITER, ML, MOSS, MU,  &
+          NAE, NG, NRE
+        LOGICAL :: BANDED, DENSE, SPARSE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, IABS, MAX, MINVAL, PRESENT, SIGN, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_OPTS
+! ..
+    RUSER(1:LRWUSER) = ZERO
+    IUSER(1:LIWUSER) = 0
+    
+!   Allow default error tolerances?
+    ALLOW_DEFAULT_TOLS = .FALSE.
+
+!   Maximum number of consecutive error test failures?
+    CONSECUTIVE_EFAILS = KFH
+
+!   Maximum number of consecutive corrector iteration failures?
+    CONSECUTIVE_CFAILS = MXNCF
+
+!   Use JACSP to approximate Jacobian?
+    USE_JACSP = .FALSE.
+    IF (PRESENT(JACOBIAN_BY_JACSP)) THEN
+       IF (JACOBIAN_BY_JACSP) USE_JACSP = .TRUE.
+    END IF
+
+!   If only f77 options are to be changed, do it and return.
+    IF (PRESENT(CHANGE_ONLY_f77_OPTIONS)) THEN
+       IF (CHANGE_ONLY_f77_OPTIONS) THEN
+          IF (.NOT.OPTS_CALLED) THEN
+             MSG = 'You have not previously called SET_OPTS before attempting'
+             CALL XERRDV(MSG,500,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'to change one or more of the vode.f77 optional parameters.'
+             CALL XERRDV(MSG,500,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(HMAX)) THEN
+             IOPT = 1
+             RUSER(6) = HMAX
+             MSG = 'HMAX changed in SET_OPTS.'
+             CALL XERRDV(MSG,510,1,0,0,0,1,HMAX,ZERO)
+          END IF
+          IF (PRESENT(HMIN)) THEN
+             IOPT = 1
+             RUSER(7) = HMIN
+             MSG = 'HMIN changed in SET_OPTS.'
+             CALL XERRDV(MSG,520,1,0,0,0,1,HMIN,ZERO)
+          END IF
+          IF (PRESENT(TCRIT)) THEN
+             IOPT = 1
+             RUSER(1) = TCRIT
+             MSG = 'TCRIT changed in SET_OPTS.'
+             CALL XERRDV(MSG,530,1,0,0,0,1,TCRIT,ZERO)
+          END IF
+          IF (PRESENT(MXSTEP)) THEN
+             IOPT = 1
+             IUSER(6) = MXSTEP
+             MSG = 'MXSTEP changed in SET_OPTS.'
+             CALL XERRDV(MSG,530,1,1,MXSTEP,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MAXORD)) THEN
+             IOPT = 1
+             IUSER(5) = MAXORD
+             MSG = 'MAXORD changed in SET_OPTS.'
+             CALL XERRDV(MSG,540,1,1,MAXORD,0,0,ZERO,ZERO)
+          END IF
+          IF (PRESENT(MXHNIL)) THEN
+             IOPT = 1
+             IUSER(7) = MXHNIL
+             MSG = 'MXHNIL changed in SET_OPTS.'
+             CALL XERRDV(MSG,550,1,1,MXHNIL,0,0,ZERO,ZERO)
+          END IF
+       END IF
+       RETURN
+    END IF
+
+!   Set the flag to indicate that SET_OPTS has been called.
+    OPTS_CALLED = .TRUE.
+
+!   Set the MA48 storage cleanup flag.
+    MA48_WAS_USED = .FALSE.
+
+!   Set the fast factor option for MA48,
+    USE_FAST_FACTOR = .TRUE.
+
+!   Determine the working precision and define the value for UMAX
+!   expected by MA28. Note that it is different for single and
+!   double precision.
+    WPD = KIND(1.0D0)
+    WPS = KIND(1.0E0)
+    IF (WPD/=WP .AND. WPS/=WP) THEN
+      MSG = 'Illegal working precision in SET_OPTS.'
+      CALL XERRDV(MSG,560,2,0,0,0,0,ZERO,ZERO)
+    END IF
+    IF (WPD==WP) THEN
+!   Working precision is double.
+      UMAX = 0.999999999_dp
+    ELSE
+!     Working precision is single.
+      UMAX = 0.9999_dp
+    END IF
+
+!   Set the MA28 message flag.
+    IF (PRESENT(MA28_MESSAGES)) THEN
+       LP = 0
+       IF (MA28_MESSAGES) LP = 6
+    ELSE
+       LP = 0
+    END IF
+
+!   Set the MA28 singularity threshold.
+    IF (PRESENT(MA28_EPS)) THEN
+       IF (MA28_EPS > ZERO) THEN
+          EPS = MA28_EPS
+       ELSE
+          EPS = 1.0E-4_dp
+       END IF
+     ELSE
+       EPS = 1.0E-4_dp
+     END IF
+
+!   Set the MA28 pivot sequence frequency flag.
+    IF (PRESENT(MA28_RPS)) THEN
+       IF (MA28_RPS) THEN
+          REDO_PIVOT_SEQUENCE = MA28_RPS
+       ELSE
+          REDO_PIVOT_SEQUENCE = .FALSE.
+       END IF
+     ELSE
+       REDO_PIVOT_SEQUENCE = .FALSE.
+     END IF
+
+     MA28AD_CALLS = 0
+     MA28BD_CALLS = 0
+     MA28CD_CALLS = 0
+     MC19AD_CALLS = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!    MA48AD_CALLS = 0
+!    MA48BD_CALLS = 0
+!    MA48CD_CALLS = 0
+!_______________________________________________________________________
+     IRNCP = 0
+     ICNCP = 0
+     MINIRN = 0
+     MINICN = 0
+     MAX_MINIRN = 0
+     MAX_MINICN = 0
+     MAX_NNZ = 0
+
+!   Set the flag to warn the user if |(y(t)| < abserr.
+     IF (PRESENT(YMAGWARN)) THEN
+       IF (YMAGWARN) THEN
+         YMAXWARN = .TRUE.
+       ELSE
+         YMAXWARN = .FALSE.
+       END IF
+     ELSE
+       YMAXWARN = .FALSE.
+     END IF
+
+!    Load defaults for the optional input arrays for DVODE.
+     IUSER(1:8) = 0
+     RUSER(1:8) = ZERO
+
+!    Set the method flag.
+     IF (.NOT.(PRESENT(METHOD_FLAG))) THEN
+       MF = 10
+       IF (PRESENT(SPARSE_J)) THEN
+         IF (SPARSE_J) THEN
+           IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+             IF (USER_SUPPLIED_JACOBIAN) THEN
+               MF = 126
+             ELSE
+               MF = 227
+             END IF
+           ELSE
+             MF = 227
+           END IF
+           IF (PRESENT(USER_SUPPLIED_SPARSITY)) THEN
+             IF (USER_SUPPLIED_SPARSITY) THEN
+               MF = MF - 100*(MF/100)
+             END IF
+           END IF
+           IF (PRESENT(SAVE_JACOBIAN)) THEN
+             IF (.NOT.SAVE_JACOBIAN) THEN
+               MF = -MF
+             END IF
+           END IF
+          END IF
+          END IF
+
+          IF (PRESENT(BANDED_J)) THEN
+            IF (BANDED_J) THEN
+              IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+                IF (USER_SUPPLIED_JACOBIAN) THEN
+                  MF = 24
+                ELSE
+                  MF = 25
+                END IF
+              ELSE
+                MF = 25
+              END IF
+              IF (PRESENT(SAVE_JACOBIAN)) THEN
+                IF (.NOT.SAVE_JACOBIAN) THEN
+                  MF = -MF
+                END IF
+              END IF
+            END IF
+          END IF
+
+          IF (PRESENT(DENSE_J)) THEN
+            IF (DENSE_J) THEN
+              IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+                IF (USER_SUPPLIED_JACOBIAN) THEN
+                  MF = 21
+                ELSE
+                  MF = 22
+                END IF
+              ELSE
+                MF = 22
+              END IF
+              IF (PRESENT(SAVE_JACOBIAN)) THEN
+                IF (.NOT.SAVE_JACOBIAN) THEN
+                  MF = -MF
+                END IF
+              END IF
+            END IF
+          END IF
+     ELSE
+       MF = METHOD_FLAG
+     END IF
+
+!    Check for errors in MF.
+     MFA = IABS(MF)
+     MOSS = MFA/100
+     METH = (MFA-100*MOSS)/10
+     MITER = MFA - 100*MOSS - 10*METH
+     IF (METH<1 .OR. METH>2) THEN
+       MSG = 'Illegal value of METH in SET_OPTS.'
+       CALL XERRDV(MSG,570,2,0,0,0,0,ZERO,ZERO)
+     END IF
+     IF (MITER<0 .OR. MITER>7) THEN
+       MSG = 'Illegal value of MITER in SET_OPTS.'
+       CALL XERRDV(MSG,580,2,0,0,0,0,ZERO,ZERO)
+     END IF
+     IF (MOSS<0 .OR. MOSS>2) THEN
+       MSG = 'Illegal value of MOSS in SET_OPTS.'
+       CALL XERRDV(MSG,580,2,0,0,0,0,ZERO,ZERO)
+     END IF
+
+!    Reset MF, now that MOSS is known.
+     MFSIGN = SIGN(1,MF)
+     MF = MF - 100*MOSS*MFSIGN
+
+     IF (MITER==0) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==1 .OR. MITER==2) THEN
+       DENSE = .TRUE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==3) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==4 .OR. MITER==5) THEN
+       DENSE = .FALSE.
+       BANDED = .TRUE.
+       SPARSE = .FALSE.
+     ELSE IF (MITER==6 .OR. MITER==7) THEN
+       DENSE = .FALSE.
+       BANDED = .FALSE.
+       SPARSE = .TRUE.
+     END IF
+
+!    Define the banded Jacobian band widths.
+     IF (BANDED) THEN
+       IF (PRESENT(LOWER_BANDWIDTH)) THEN
+         ML = LOWER_BANDWIDTH
+         IUSER(1) = ML
+       ELSE
+         MSG = 'In SET_OPTS you have indicated a'
+         CALL XERRDV(MSG,590,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'banded Jacobian but you have not'
+         CALL XERRDV(MSG,590,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'supplied the lower bandwidth.'
+         CALL XERRDV(MSG,590,2,0,0,0,0,ZERO,ZERO)
+       END IF
+       IF (PRESENT(UPPER_BANDWIDTH)) THEN
+         MU = UPPER_BANDWIDTH
+         IUSER(2) = MU
+       ELSE
+         MSG = 'In SET_OPTS you have indicated a'
+         CALL XERRDV(MSG,600,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'banded Jacobian but you have not'
+         CALL XERRDV(MSG,600,1,0,0,0,0,ZERO,ZERO)
+         MSG = 'supplied the upper bandwidth.'
+         CALL XERRDV(MSG,600,2,0,0,0,0,ZERO,ZERO)
+       END IF
+!      Define the nonzero diagonals.
+       BNGRP = 0
+       SUBS = .FALSE.
+       SUPS = .FALSE.
+       NSUBS  = 0
+       NSUPS = 0
+       IF (PRESENT(SUB_DIAGONALS)) THEN
+         SUBS = .TRUE.
+         NSUBS = SIZE(SUB_DIAGONALS)
+         IF (NSUBS > 0) THEN
+            IF (ALLOCATED(SUBDS)) THEN
+               DEALLOCATE(SUBDS,STAT=IER)
+               CALL CHECK_STAT(IER,80)
+            END IF
+            ALLOCATE(SUBDS(NSUBS),STAT=IER)
+            CALL CHECK_STAT(IER,90)
+            SUBDS(1:NSUBS) = SUB_DIAGONALS(1:NSUBS)
+         ELSE
+            IF (ML > 0) THEN
+               MSG = 'You must indicated that the lower bandwidth'
+               CALL XERRDV(MSG,610,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'is positive but you have not specified the'
+               CALL XERRDV(MSG,610,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'indices for the lower sub diagonals.'
+               CALL XERRDV(MSG,610,2,0,0,0,0,ZERO,ZERO)
+            END IF
+         END IF
+       END IF
+       IF (PRESENT(SUP_DIAGONALS)) THEN
+         SUPS = .TRUE.
+         NSUPS = SIZE(SUP_DIAGONALS)
+         IF (NSUPS > 0) THEN
+            IF (ALLOCATED(SUPDS)) THEN
+               DEALLOCATE(SUPDS,STAT=IER)
+               CALL CHECK_STAT(IER,100)
+            END IF
+            ALLOCATE(SUPDS(NSUPS),STAT=IER)
+            CALL CHECK_STAT(IER,110)
+            SUPDS(1:NSUPS) = SUP_DIAGONALS(1:NSUPS)
+         ELSE
+            IF (ML > 0) THEN
+               MSG = 'You must indicated that the upper bandwidth'
+               CALL XERRDV(MSG,620,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'is positive but you have not specified the'
+               CALL XERRDV(MSG,620,1,0,0,0,0,ZERO,ZERO)
+               MSG = 'indices for the upper sub diagonals.'
+               CALL XERRDV(MSG,620,2,0,0,0,0,ZERO,ZERO)
+            END IF
+         END IF
+       END IF
+     END IF
+
+!    Define the sparse Jacobian options.
+     SCALE_MATRIX = .FALSE.
+     ELBOW_ROOM = 2
+     IF (SPARSE) THEN
+!      NZSWAG for the number of nonzeros in the Jacobian.
+       IF (PRESENT(NZSWAG)) THEN
+         NZ_SWAG = MAX(NZSWAG,0)
+
+       ELSE
+         NZ_SWAG = 0
+       END IF
+!      Indicate that SET_IAJA has not yet been called successfully.
+       IAJA_CALLED = .FALSE.
+!      Check for illegal method flags.
+       IF (MOSS==2 .AND. MITER/=7) THEN
+         MSG = 'In SET_OPTS MOSS=2 but MITER is not 7.'
+            CALL XERRDV(MSG,630,2,0,0,0,0,ZERO,ZERO)
+         END IF
+         IF (MOSS==1 .AND. MITER/=6) THEN
+           MSG = 'In SET_OPTS MOSS=1 but MITER is not 6.'
+           CALL XERRDV(MSG,640,2,0,0,0,0,ZERO,ZERO)
+         END IF
+!        IF (MOSS==0 .AND. MITER/=7) THEN
+!          MSG = 'In SET_OPTS MOSS=0 but MITER is not 7.'
+!          CALL XERRDV(MSG,650,2,0,0,0,0,ZERO,ZERO)
+!        END IF
+!        Allow the work array elbow room to be increased.
+         IF (PRESENT(MA28_ELBOW_ROOM)) THEN
+            ELBOW_ROOM = MAX(MA28_ELBOW_ROOM, ELBOW_ROOM)
+         END IF
+!      Allow MC19 scaling for the Jacobian.
+       SCALE_MATRIX = .FALSE.
+       IF (PRESENT(MC19_SCALING)) THEN
+          IF (MC19_SCALING) THEN
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!         IF (USE_MA48_FOR_SPARSE) THEN
+!            MSG = 'MC29AD scaling is not available at this time.'
+!            CALL XERRDV(MSG,660,1,0,0,0,0,ZERO,ZERO)
+!            MSG = 'Execution will continue.'
+!            CALL XERRDV(MSG,660,1,0,0,0,0,ZERO,ZERO)
+!         END IF
+!_______________________________________________________________________
+             SCALE_MATRIX = MC19_SCALING
+!            SCALE_MATRIX = .FALSE.
+          END IF
+       END IF
+
+!_______________________________________________________________________
+! *****MA48 build change point. Replace above with these statements.
+!      IF (PRESENT(MC19_SCALING)) THEN
+!         IF (MC19_SCALING) THEN
+!            IF (USE_MA48_FOR_SPARSE) THEN
+!               MSG = 'Please note that this version uses MC19AD rather'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!               MSG = 'than MC29AD to sacle the iteration matrix.'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!               MSG = 'Execution will continue.'
+!               CALL XERRDV(MSG,670,1,0,0,0,0,ZERO,ZERO)
+!            END IF
+!            SCALE_MATRIX = MC19_SCALING
+!         END IF
+!       END IF
+!_______________________________________________________________________
+
+       END IF
+
+!       Define the number of event functions.
+        IF (PRESENT(NEVENTS)) THEN
+          IF (NEVENTS>0) THEN
+            NG = NEVENTS
+          ELSE
+            NG = 0
+          END IF
+        ELSE
+          NG = 0
+        END IF
+
+!       Process the constrained solution components.
+        IF (PRESENT(CONSTRAINED)) THEN
+          NDX = SIZE(CONSTRAINED)
+          IF (NDX<1) THEN
+            MSG = 'In SET_OPTS the size of CONSTRAINED < 1.'
+            CALL XERRDV(MSG,680,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (.NOT.(PRESENT(CLOWER)) .OR. .NOT.(PRESENT(CUPPER))) THEN
+            MSG = 'In SET_OPTS the arrays CLOWER and CUPPER are'
+            CALL XERRDV(MSG,690,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'not present.'
+            CALL XERRDV(MSG,690,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          IF (SIZE(CLOWER)/=NDX .OR. SIZE(CUPPER)/=NDX) THEN
+            MSG = 'In SET_OPTS the size of the solution bound arrays'
+            CALL XERRDV(MSG,700,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'must be the same as the CONSTRAINED array.'
+            CALL XERRDV(MSG,700,2,0,0,0,0,ZERO,ZERO)
+          END IF
+!         Note: The contents of CONSTRAINED will be checked
+!         in subroutine DVODE after NEQ is known.
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,120)
+          END IF
+          ALLOCATE (IDX(NDX),LB(NDX),UB(NDX),STAT=IER)
+          CALL CHECK_STAT(IER,130)
+          IDX(1:NDX) = CONSTRAINED(1:NDX)
+          LB(1:NDX) = CLOWER(1:NDX)
+          UB(1:NDX) = CUPPER(1:NDX)
+          BOUNDS = .TRUE.
+        ELSE
+          IF (ALLOCATED(IDX)) THEN
+            DEALLOCATE (IDX,LB,UB,STAT=IER)
+            CALL CHECK_STAT(IER,140)
+          END IF
+          NDX = 0
+          BOUNDS = .FALSE.
+        END IF
+
+!       Is the Jacobian constant?
+        J_IS_CONSTANT = .FALSE.
+        J_HAS_BEEN_COMPUTED = .FALSE.
+
+!_______________________________________________________________________
+        IF (PRESENT(CONSTANT_JACOBIAN)) THEN
+           IF (CONSTANT_JACOBIAN) THEN
+              J_IS_CONSTANT = .TRUE.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+              IF (USE_MA48_FOR_SPARSE .AND. SPARSE) THEN
+                 MSG = 'The constant Jacobian option is not yet available'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'with the sparse MA48 solution option. Execution'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'will continue.'
+                 CALL XERRDV(MSG,710,1,0,0,0,0,ZERO,ZERO)
+                 J_IS_CONSTANT = .FALSE.
+              END IF
+!_______________________________________________________________________
+           END IF
+        END IF
+! *****MA48 build change point. Replace above with these statements.
+!       IF (PRESENT(CONSTANT_JACOBIAN)) THEN
+!          IF (CONSTANT_JACOBIAN) THEN
+!             IF (USE_MA48_FOR_SPARSE) THEN
+!                MSG = 'The constant Jacobian option is not yet available'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!                MSG = 'with the sparse MA48 solution option. Execution'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!                MSG = 'will continue.'
+!                CALL XERRDV(MSG,720,1,0,0,0,0,ZERO,ZERO)
+!             END IF
+!          ELSE
+!             J_IS_CONSTANT = .TRUE.
+!          END IF
+!       END IF
+!_______________________________________________________________________
+        IF (J_IS_CONSTANT) THEN
+           IF (PRESENT(SAVE_JACOBIAN)) THEN
+              IF (.NOT.SAVE_JACOBIAN) THEN
+                 MSG = 'You have specified that the Jacobian is constant.'
+                 CALL XERRDV(MSG,730,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'In this case you cannot also specify that'
+                 CALL XERRDV(MSG,730,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'SAVE_JACOBIAN=.FALSE.'
+                 CALL XERRDV(MSG,730,2,0,0,0,0,ZERO,ZERO)
+              END IF
+           END IF
+           IF (PRESENT(USER_SUPPLIED_JACOBIAN)) THEN
+              IF (USER_SUPPLIED_JACOBIAN .AND. SPARSE) THEN
+                 MSG = 'You have specified that the Jacobian is constant'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'and that you wish to supply an analytic Jacobian'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'for a sparse problem. In this case your request'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'to use a constant Jacobian will be ignored.'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+                 MSG = 'Execution will continue.'
+                 CALL XERRDV(MSG,740,1,0,0,0,0,ZERO,ZERO)
+              END IF
+           END IF
+        END IF
+
+!       Load the user options into the solution structure.
+        OPTS%MF = MF
+        OPTS%METH = METH
+        OPTS%MITER = MITER
+        OPTS%MOSS = MOSS
+        OPTS%DENSE = DENSE
+        OPTS%BANDED = BANDED
+        OPTS%SPARSE = SPARSE
+        OPTS%NG = NG
+
+!       Process the miscellaneous options.
+
+!       Don't step past TCRIT variable.
+        IF (PRESENT(TCRIT)) THEN
+          RUSER(1) = TCRIT
+        ELSE
+          RUSER(1) = ZERO
+        END IF
+
+!       DVODE optional parameters.
+        IOPT = 1
+        IF (PRESENT(MAXORD)) THEN
+          IUSER(5) = MAXORD
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXSTEP)) THEN
+          IUSER(6) = MXSTEP
+          IOPT = 1
+        END IF
+        IF (PRESENT(MXHNIL)) THEN
+          IUSER(7) = MXHNIL
+          IOPT = 1
+        END IF
+        IF (PRESENT(H0)) THEN
+          RUSER(5) = H0
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMAX)) THEN
+          RUSER(6) = HMAX
+          IOPT = 1
+        END IF
+        IF (PRESENT(HMIN)) THEN
+          RUSER(7) = HMIN
+          IOPT = 1
+        END IF
+        IF (PRESENT(SETH)) THEN
+          RUSER(8) = SETH
+          IOPT = 1
+        END IF
+        IF (PRESENT(UPIVOT)) THEN
+          U_PIVOT = UPIVOT
+          IF (U_PIVOT<ZERO) U_PIVOT = ZERO
+          IF (U_PIVOT>ONE) U_PIVOT = ONE
+        ELSE
+          U_PIVOT = ONE
+        END IF
+!_______________________________________________________________________
+! *****MA48 build change point. Insert this statement.
+!       COPY_OF_U_PIVOT = U_PIVOT
+!_______________________________________________________________________
+        OPTS%IOPT = IOPT
+
+!       Define the error tolerances.
+
+!       Relative error tolerances.
+        IF (PRESENT(RELERR_VECTOR)) THEN
+          IF (MINVAL(RELERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of RELERR_VECTOR must'
+            CALL XERRDV(MSG,750,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,750,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NRE = SIZE(RELERR_VECTOR)
+        ELSE
+          NRE = 1
+        END IF
+        ALLOCATE (OPTS%RTOL(NRE),STAT=IER)
+        CALL CHECK_STAT(IER,150)
+        IF (PRESENT(RELERR_VECTOR)) THEN
+          OPTS%RTOL = RELERR_VECTOR
+        ELSE IF (PRESENT(RELERR)) THEN
+          IF (RELERR<ZERO) THEN
+            MSG = 'RELERR must be nonnegative.'
+            CALL XERRDV(MSG,760,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%RTOL = RELERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%RTOL = 1.0E-4_dp
+             MSG = 'By not specifying RELERR, you have elected to use a default'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'relative error tolerance equal to 1.0D-4. Please be aware a'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,770,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a nonzero relative error tolerance.'
+             CALL XERRDV(MSG,780,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       Absolute error tolerances.
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (MINVAL(ABSERR_VECTOR)<ZERO) THEN
+            MSG = 'All components of ABSERR_VECTOR must'
+            CALL XERRDV(MSG,790,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'be nonnegative.'
+            CALL XERRDV(MSG,790,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          NAE = SIZE(ABSERR_VECTOR)
+        ELSE
+          NAE = 1
+        END IF
+        ALLOCATE (OPTS%ATOL(NAE),STAT=IER)
+        CALL CHECK_STAT(IER,160)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          OPTS%ATOL = ABSERR_VECTOR
+        ELSE IF (PRESENT(ABSERR)) THEN
+          IF (ABSERR<ZERO) THEN
+            MSG = 'ABSERR must be nonnegative.'
+            CALL XERRDV(MSG,800,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          OPTS%ATOL = ABSERR
+        ELSE
+          IF (ALLOW_DEFAULT_TOLS) THEN
+             OPTS%ATOL = 1D-6
+             MSG = 'By not specifying ABSERR, you have elected to use a default'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'absolute error tolerance equal to 1.0D-6. Please be aware a'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'tolerance this large is not appropriate for all problems.'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Execution will continue'
+             CALL XERRDV(MSG,810,1,0,0,0,0,ZERO,ZERO)
+          ELSE
+             MSG = 'You must specify a vector of absolute error tolerances or'
+             CALL XERRDV(MSG,820,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a scalar error tolerance. It is recommended that you use'
+             CALL XERRDV(MSG,820,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'a vector of absolute error tolerances.'
+             CALL XERRDV(MSG,820,2,0,0,0,0,ZERO,ZERO)
+          END IF
+        END IF
+
+!       ITOL error tolerance flag.
+!          ITOL   RTOL     ATOL            EWT(i)
+!            1   scalar   scalar  RTOL*ABS(Y(i)) + ATOL
+!            2   scalar   array   RTOL*ABS(Y(i)) + ATOL(i)
+!            3   array    scalar  RTOL(i)*ABS(Y(i)) + ATOL
+!            4   array    array   RTOL(i)*ABS(Y(i)) + ATOL(i)
+        IF (PRESENT(ABSERR_VECTOR)) THEN
+          IF (PRESENT(RELERR_VECTOR)) THEN
+            OPTS%ITOL = 4
+          ELSE
+            OPTS%ITOL = 2
+          END IF
+        ELSE
+          IF (PRESENT(RELERR_VECTOR)) THEN
+            OPTS%ITOL = 3
+          ELSE
+            OPTS%ITOL = 1
+          END IF
+        END IF
+        RETURN
+
+  END FUNCTION SET_OPTS
+!_______________________________________________________________________
+
+      SUBROUTINE GET_STATS(RSTATS,ISTATS,NUMEVENTS,JROOTS)
+! ..
+! Return the user portions of the DVODE RUSER and IUSER arrays;
+! and if root finding is being done, return the JROOT vector
+! (not called by DVODE_F90).
+! ..
+! Available Integration Statistics.
+! HU      RUSER(11) The step size in t last used (successfully).
+! HCUR    RUSER(12) The step size to be attempted on the next step.
+! TCUR    RUSER(13) The current value of the independent variable
+!                   which the solver has actually reached, i.e. the
+!                   current internal mesh point in t. In the output,
+!                   TCUR will always be at least as far from the
+!                   initial value of t as the current argument T,
+!                   but may be farther (if interpolation was done).
+! TOLSF   RUSER(14) A tolerance scale factor, greater than 1.0,
+!                   computed when a request for too much accuracy was
+!                   detected (ISTATE = -3 if detected at the start of
+!                   the problem, ISTATE = -2 otherwise). If ITOL is
+!                   left unaltered but RTOL and ATOL are uniformly
+!                   scaled up by a factor of TOLSF for the next call,
+!                   then the solver is deemed likely to succeed.
+!                   (The user may also ignore TOLSF and alter the
+!                   tolerance parameters in any other way appropriate.)
+! NST     IUSER(11) The number of steps taken for the problem so far.
+! NFE     IUSER(12) The number of f evaluations for the problem so far.
+! NJE     IUSER(13) The number of Jacobian evaluations so far.
+! NQU     IUSER(14) The method order last used (successfully).
+! NQCUR   IUSER(15) The order to be attempted on the next step.
+! IMXER   IUSER(16) The index of the component of largest magnitude in
+!                   the weighted local error vector (e(i)/EWT(i)),
+!                   on an error return with ISTATE = -4 or -5.
+! LENRW   IUSER(17) The length of RUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! LENIW   IUSER(18) The length of IUSER actually required.
+!                   This is defined on normal returns and on an illegal
+!                   input return for insufficient storage.
+! NLU     IUSER(19) The number of matrix LU decompositions so far.
+! NNI     IUSER(20) The number of nonlinear (Newton) iterations so far.
+! NCFN    IUSER(21) The number of convergence failures of the nonlinear
+!                   solver so far.
+! NETF    IUSER(22) The number of error test failures of the integrator
+!                   so far.
+! MA28AD_CALLS      IUSER(23) The number of calls made to MA28AD
+! MA28BD_CALLS      IUSER(24) The number of calls made to MA28BD
+! MA28CD_CALLS      IUSER(25) The number of calls made to MA28CD
+! MC19AD_CALLS      IUSER(26) The number of calls made to MC19AD
+! IRNCP             IUSER(27) The number of compressions done on array JAN
+! ICNCP             IUSER(28) The number of compressions done on array ICN
+! MINIRN            IUSER(29) Minimum size for JAN array
+! MINICN            IUSER(30) Minimum size for ICN array
+! JROOTS  JROOTS    Optional array of component indices for components
+!                   having a zero at the current time
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, OPTIONAL, INTENT (IN) :: NUMEVENTS
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: RSTATS(22)
+        INTEGER, INTENT (INOUT) :: ISTATS(31)
+        INTEGER, OPTIONAL, INTENT (INOUT) :: JROOTS(:)
+! ..
+! .. Local Scalars ..
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, PRESENT, SIZE
+! ..
+!   Caution:
+!   It is assumed that the size of RSTATS is 22.
+!   It is assumed that the size of ISTATS is 31.
+!   Refer to the documentation prologue for a description
+!   the optional output contained in RUSER and IUSER.
+! ..
+! .. FIRST EXECUTABLE STATEMENT GET_STATS
+! ..
+!       Check if DVODE_F90 has been called yet.
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have called GET_STATS before'
+          CALL XERRDV(MSG,830,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling DVODE_F90 the first time.'
+          CALL XERRDV(MSG,830,1,0,0,0,0,ZERO,ZERO)
+          RETURN
+        END IF
+
+!       Check that the arrays are large enough to hold the statistics.
+!       Some compilers don't like this use of SIZE.
+!       IF (SIZE(RSTATS)<LRWUSER) THEN
+!       IF (SIZE(RSTATS)<31) THEN
+!         MSG = 'In GET_STATS, RSTATS array is too small.'
+!         CALL XERRDV(MSG,840,1,0,0,0,0,ZERO,ZERO)
+!         RETURN
+!       END IF
+!       IF (SIZE(ISTATS)<LIWUSER) THEN
+!       IF (SIZE(ISTATS)<31) THEN
+!         MSG = 'In GET_STATS, ISTATS array is too small.'
+!         CALL XERRDV(MSG,850,1,0,0,0,0,ZERO,ZERO)
+!         RETURN
+!       END IF
+
+!       Copy the statistics.
+        RSTATS(1:LRWUSER) = RUSER(1:LRWUSER)
+!       ISTATS(1:LIWUSER) = IUSER(1:LIWUSER)
+        ISTATS(1:22) = IUSER(1:22)
+        ISTATS(23) = MA28AD_CALLS
+        ISTATS(24) = MA28BD_CALLS
+        ISTATS(25) = MA28CD_CALLS
+!_______________________________________________________________________
+! *****MA48 build change point.Replace the three previous statements
+!      with these statements.
+!       IF (USE_MA48_FOR_SPARSE) THEN
+!          ISTATS(23) = MA48AD_CALLS
+!          ISTATS(24) = MA48BD_CALLS
+!          ISTATS(25) = MA48CD_CALLS
+!       ELSE
+!          ISTATS(23) = MA28AD_CALLS
+!          ISTATS(24) = MA28BD_CALLS
+!          ISTATS(25) = MA28CD_CALLS
+!       END IF
+!_______________________________________________________________________
+        ISTATS(26) = MC19AD_CALLS
+        ISTATS(27) = IRNCP
+        ISTATS(28) = ICNCP
+!       ISTATS(29) = MINIRN
+!       ISTATS(30) = MINICN
+!       ISTATS(31) = NZ_ALL
+        ISTATS(29) = MAX_MINIRN
+        ISTATS(30) = MAX_MINICN
+        ISTATS(31) = MAX_NNZ
+!       If root finding is being used return the JROOT vector.
+        IF (PRESENT(NUMEVENTS)) THEN
+          IF (PRESENT(JROOTS)) THEN
+            IF (ALLOCATED(JROOT)) THEN
+              JROOTS(1:NUMEVENTS) = JROOT(1:NUMEVENTS)
+            END IF
+          END IF
+        END IF
+        RETURN
+
+      END SUBROUTINE GET_STATS
+!_______________________________________________________________________
+
+      SUBROUTINE USERSETS_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+! ..
+! Approximate or allow the user to supply the sparse Jacobian
+! structure pointer arrays IA and JA directly for DVODE_F90
+! (not called by DVODE_F90).
+! ..
+! Used if the user wishes to supply the sparsity structure
+! directly.
+!     Caution:
+!     If it is called, USERSETS_IAJA must be called after the
+!     call to SET_OPTS.
+!     Usage:
+!     CALL SET_IAJA(IAUSER,NIAUSER,JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!     Arguments:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+!     Results:
+!     IA(IADIM), IADIM, JA(JADIM), JAMIN, SPARSE
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NIAUSER, NJAUSER
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IAUSER(NIAUSER), JAUSER(NJAUSER)
+! ..
+! .. Local Scalars ..
+        INTEGER :: JER
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED
+! ..
+! .. FIRST EXECUTABLE STATEMENT USERSETS_IAJA
+! ..
+!       Check that SET_OPTS has been called:
+        IF (.NOT.OPTS_CALLED) THEN
+          MSG = 'You have not called SET_OPTS before'
+          CALL XERRDV(MSG,860,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'calling USERSETS_IAJA.'
+          CALL XERRDV(MSG,860,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        SPARSE = .FALSE.
+        IAJA_CALLED = .FALSE.
+        IADIM = NIAUSER
+        JADIM = NJAUSER
+        IF (ALLOCATED(IA)) THEN
+          DEALLOCATE (IA,JA,STAT=JER)
+          CALL CHECK_STAT(JER,170)
+        END IF
+        ALLOCATE (IA(IADIM),JA(JADIM),STAT=JER)
+        IF (JER/=0) THEN
+          MSG = 'Check your values of NIAUSER and NJAUSER'
+          CALL XERRDV(MSG,870,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'in your call to USERSETS_IAJA.'
+          CALL XERRDV(MSG,870,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        CALL CHECK_STAT(JER,180)
+        IA(1:IADIM) = IAUSER(1:IADIM)
+        JA(1:JADIM) = JAUSER(1:JADIM)
+!       Set the flags to indicate to DVODE_F90 that IA and JA have
+!       been loaded successfully.
+        SPARSE = .TRUE.
+        IAJA_CALLED = .TRUE.
+        RETURN
+
+      END SUBROUTINE USERSETS_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+        JAUSER,NJAUSER)
+! ..
+!     Approximate or allow the user to supply the sparse Jacobian
+!     structure pointer arrays IA and JA for DVODE_F90 (not called
+!     by DVODE_F90).
+! ..
+!     Caution:
+!     If it is called, SET_IAJA must be called after the call to
+!     SET_OPTS.
+!     Usage:
+!     SET_IAJA may be called in one of two ways:
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB)
+!       In this case IA and JA will be determined using calls
+!       to your derivative routine DFN.
+!     CALL SET_IAJA(DFN,NEQ,T,Y,FMIN,NTURB,DTURB,IAUSER,NIAUSER, &
+!       JAUSER,NJAUSER)
+!       In this case, IAUSER of length NIAUSER will be used for
+!       IA; and JAUSER of length NJAUSER will be used for JA.
+!       T, Y, FMIN, NTURB, and DTURB will be ignored (though
+!       they must be present in the argument list).
+!
+!     Arguments:
+!     DFN     = VODE derivative subroutine
+!     NEQ     = Number of odes
+!     T       = independent variable t
+!     Y       = solution y(t)
+!     FMIN    = Jacobian threshold value. Elements of the Jacobian
+!               with magnitude smaller than FMIN will be ignored.
+!               FMIN will be ignored if it is less than or equal
+!               to ZERO.
+!     NTURB   = Perturbation flag. If NTURB=1, component I of Y
+!               will be perturbed by by 1.01D0.
+!               If NTURB=NEQ, component I of Y will be perturbed
+!               by ONE + DTURB(I).
+!     DTURB   = perturbation vector of length 1 or NEQ.
+!     If these four optional parameters are present, IAUSER and JAUSER
+!     will be copied to IA and JA rather than making derivative calls
+!     to approximate IA and JA:
+!     IAUSER  = user supplied IA array
+!     NIAUSER = length of IAUSER array
+!     JAUSER  = user supplied JA vector
+!     NJAUSER = length of JAUSER array
+!     Results:
+!     IA(IADIM), IADIM, IMIN, JA(JADIM), JAMIN, JMIN, SPARSE
+!     Allocated but free for further use by DVODE_F90:
+!     FTEMP(NEQ), FPTEMP(NEQ)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: FMIN, T
+        INTEGER, INTENT (IN) :: NEQ, NTURB
+        INTEGER, OPTIONAL, INTENT (IN) :: NIAUSER, NJAUSER
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DTURB(*), Y(NEQ)
+        INTEGER, OPTIONAL, INTENT (IN) :: IAUSER(:), JAUSER(:)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL DFN
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AIJ, DTRB, EMIN, RJ, YJ, YJSAVE, YPJ
+        INTEGER :: I, J, JER, JP1, K, MTURB
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, EPSILON, MAX, MIN, PRESENT
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_IAJA
+! ..
+        SPARSE = .FALSE.
+        IAJA_CALLED = .FALSE.
+        IF (NEQ<1) GOTO 30
+
+!       Check if the user is supplying the IA and JA arrays.
+        IF (PRESENT(IAUSER)) THEN
+!         If IAUSER is present, so must be NIAUSER, JAUSER,
+!         and NJAUSER.
+          IF (.NOT.(PRESENT(NIAUSER))) GOTO 30
+          IF (.NOT.(PRESENT(JAUSER))) GOTO 30
+          IF (.NOT.(PRESENT(NJAUSER))) GOTO 30
+          IF (NIAUSER<NEQ+1 .OR. NJAUSER<1) GOTO 30
+          IADIM = MIN(NIAUSER,NEQ+1)
+          IMIN = IADIM
+          JADIM = NJAUSER
+          JMIN = NJAUSER
+          IF (ALLOCATED(IA)) THEN
+            DEALLOCATE (IA,JA,FTEMP,FPTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,190)
+          END IF
+          ALLOCATE (IA(IADIM),JA(JADIM),FTEMP(NEQ),FPTEMP(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,200)
+          IA(1:IADIM) = IAUSER(1:IADIM)
+          JA(1:JADIM) = JAUSER(1:JADIM)
+          GOTO 40
+        END IF
+
+!       Determine IA and JA using derivative calls.
+
+!       Jacobian element magnitude threshold value.
+        IF (FMIN>ZERO) THEN
+          EMIN = MAX(FMIN,ZERO)
+        ELSE
+          EMIN = ZERO
+        END IF
+
+!       Solution perturbation factors.
+        IF (NTURB>0) THEN
+          IF (NTURB<1 .OR. (NTURB>1 .AND. NTURB/=NEQ)) GOTO 30
+          IF (NTURB==NEQ) THEN
+            DO I = 1, NEQ
+              DTURB(I) = MAX(DTURB(I),HUNDRETH)
+            END DO
+          ELSE
+            MTURB = 1
+            DTRB = MAX(DTURB(1),HUNDRETH)
+          END IF
+        ELSE
+          MTURB = 1
+          DTRB = HUNDRETH
+        END IF
+
+        JADIM = MIN(NEQ*NEQ,MAX(1000,NZ_SWAG))
+        ADDTOJA = MAX(1000,NZ_SWAG)
+!       Loop point for array allocation.
+10      CONTINUE
+        IF (ALLOCATED(IA)) THEN
+          DEALLOCATE (IA,JA,FTEMP,FPTEMP,STAT=JER)
+          CALL CHECK_STAT(JER,210)
+        END IF
+        IMIN = NEQ + 1
+        IADIM = NEQ + 1
+        JMIN = 0
+        JADIM = JADIM + ADDTOJA
+        IF (JADIM>MAX_ARRAY_SIZE) THEN
+          MSG = 'Maximum array size exceeded. Stopping.'
+          CALL XERRDV(MSG,880,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        ALLOCATE (IA(IADIM),JA(JADIM),FTEMP(NEQ),FPTEMP(NEQ),STAT=JER)
+        CALL CHECK_STAT(JER,220)
+
+!       f = y'(t,y).
+        CALL DFN(NEQ,T,Y,FTEMP)
+        IA(1) = 1
+        K = 1
+
+!       Calculate unit roundoff and powers of it used if JACSP
+!       is used.
+        UROUND = EPSILON(ONE)
+
+!       Successively perturb each of the solution components and
+!       calculate the corresponding derivatives.
+        DO J = 1, NEQ
+          IF (MTURB==NEQ) DTRB = DTURB(J)
+          YJ = Y(J)
+          YJSAVE = YJ
+          IF (ABS(YJ)<=ZERO) YJ = HUN*UROUND
+          YPJ = YJ*(ONE+DTRB)
+          RJ = ABS(YPJ-YJ)
+          IF (ABS(RJ)<=ZERO) RJ = HUN*UROUND
+          IF (ABS(RJ)<=ZERO) GOTO 30
+          Y(J) = YPJ
+          CALL DFN(NEQ,T,Y,FPTEMP)
+          DO 20 I = 1, NEQ
+!           Estimate the Jacobian element.
+            AIJ = ABS(FPTEMP(I)-FTEMP(I))/RJ
+            IF ((AIJ<=EMIN) .AND. (I/=J)) GOTO 20
+!           Need more storage for JA.
+            IF (K>JADIM) GOTO 10
+            JMIN = K
+            JA(K) = I
+            K = K + 1
+20        CONTINUE
+          JP1 = J + 1
+          IA(JP1) = K
+          Y(J) = YJSAVE
+        END DO
+        GOTO 40
+30      CONTINUE
+        MSG = 'An error occurred in subroutine SET_IAJA.'
+        CALL XERRDV(MSG,890,2,0,0,0,0,ZERO,ZERO)
+
+40      CONTINUE
+!       Set the flags to indicate to DVODE_F90 that IA and JA have
+!       been calculated successfully.
+        SPARSE = .TRUE.
+        IAJA_CALLED = .TRUE.
+
+!       Trim JA.
+        ALLOCATE (JATEMP(JMIN),STAT=JER)
+        CALL CHECK_STAT(JER,230)
+        JATEMP(1:JMIN) = JA(1:JMIN)
+        DEALLOCATE (JA,STAT=JER)
+        CALL CHECK_STAT(JER,240)
+        ALLOCATE (JA(JMIN),STAT=JER)
+        CALL CHECK_STAT(JER,250)
+        JA(1:JMIN) = JATEMP(1:JMIN)
+        DEALLOCATE (JATEMP,STAT=JER)
+        CALL CHECK_STAT(JER,260)
+        JADIM = JMIN
+        RETURN
+
+      END SUBROUTINE SET_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE DVODE(F,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTS,JAC,GFUN)
+! ..
+! This is the core driver (modified original DVODE.F driver).
+! ..
+! The documentation prologue was moved nearer the top of the file.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Structure Arguments ..
+        TYPE (VODE_OPTS) :: OPTS
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (INOUT) :: T, TOUT
+        INTEGER, INTENT (INOUT) :: ISTATE
+        INTEGER, INTENT (IN) :: ITASK, NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: Y(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, GFUN, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ATOLI, BIG, EWTI, H0, HMAX, HMX, RH, RTOLI, SIZEST, &
+          TCRIT, TNEXT, TOLSF, TP
+        INTEGER :: I, IER, IFLAG, IMXER, IOPT, IPCUTH, IRFP, IRT, ITOL, JCO, &
+          JER, KGO, LENIW, LENJ, LENP, LENRW, LENWM, LF0, MBAND, MF, MFA, ML, &
+          MU, NG, NITER, NSLAST
+        LOGICAL :: IHIT
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! The following internal PRIVATE variable blocks contain variables which
+! are communicated between subroutines in the DVODE package, or which
+! are to be saved between calls to DVODE.
+! In each block, real variables precede integers.
+! The variables stored in the internal PRIVATE variable blocks are as
+! follows:
+! ACNRM  = Weighted r.m.s. norm of accumulated correction vectors.
+! CCMXJ  = Threshhold on DRC for updating the Jacobian. (See DRC.)
+! CONP   = The saved value of TQ(5).
+! CRATE  = Estimated corrector convergence rate constant.
+! DRC    = Relative change in H*RL1 since last DVJAC call.
+! EL     = Real array of integration coefficients. See DVSET.
+! ETA    = Saved tentative ratio of new to old H.
+! ETAMAX = Saved maximum value of ETA to be allowed.
+! H      = The step size.
+! HMIN   = The minimum absolute value of the step size H to be used.
+! HMXI   = Inverse of the maximum absolute value of H to be used.
+!          HMXI = 0.0 is allowed and corresponds to an infinite HMAX.
+! HNEW   = The step size to be attempted on the next step.
+! HSCAL  = Stepsize in scaling of YH array.
+! PRL1   = The saved value of RL1.
+! RC     = Ratio of current H*RL1 to value on last DVJAC call.
+! RL1    = The reciprocal of the coefficient EL(2).
+! TAU    = Real vector of past NQ step sizes, length 13.
+! TQ     = A real vector of length 5 in which DVSET stores constants
+!          used for the convergence test, the error test, and the
+!          selection of H at a new order.
+! TN     = The independent variable, updated on each step taken.
+! UROUND = The machine unit roundoff. The smallest positive real number
+!          such that  1.0 + UROUND /= 1.0
+! ICF    = Integer flag for convergence failure in DVNLSD:
+!            0 means no failures.
+!            1 means convergence failure with out of date Jacobian
+!                   (recoverable error).
+!            2 means convergence failure with current Jacobian or
+!                   singular matrix (unrecoverable error).
+! INIT   = Saved integer flag indicating whether initialization of the
+!          problem has been done (INIT = 1) or not.
+! IPUP   = Saved flag to signal updating of Newton matrix.
+! JCUR   = Output flag from DVJAC showing Jacobian status:
+!            JCUR = 0 means J is not current.
+!            JCUR = 1 means J is current.
+! JSTART = Integer flag used as input to DVSTEP:
+!            0  means perform the first step.
+!            1  means take a new step continuing from the last.
+!           -1  means take the next step with a new value of MAXORD,
+!               HMIN, HMXI, N, METH, MITER, and/or matrix parameters.
+!          On return, DVSTEP sets JSTART = 1.
+! JSV    = Integer flag for Jacobian saving, = sign(MF).
+! KFLAG  = A completion code from DVSTEP with the following meanings:
+!               0      the step was successful.
+!              -1      the requested error could not be achieved.
+!              -2      corrector convergence could not be achieved.
+!              -3, -4  fatal error in DVNLSD(can not occur here).
+! KUTH   = Input flag to DVSTEP showing whether H was reduced by the
+!          driver. KUTH = 1 if H was reduced, = 0 otherwise.
+! L      = Integer variable, NQ + 1, current order plus one.
+! LMAX   = MAXORD + 1 (used for dimensioning).
+! LOCJS  = A pointer to the saved Jacobian, whose storage starts at
+!          WM(LOCJS), if JSV = 1.
+! LYH    = Saved integer pointer to segments of RWORK and IWORK.
+! MAXORD = The maximum order of integration method to be allowed.
+! METH/MITER = The method flags. See MF.
+! MSBJ   = The maximum number of steps between J evaluations, = 50.
+! MXHNIL = Saved value of optional input MXHNIL.
+! MXSTEP = Saved value of optional input MXSTEP.
+! N      = The number of first-order ODEs, = NEQ.
+! NEWH   = Saved integer to flag change of H.
+! NEWQ   = The method order to be used on the next step.
+! NHNIL  = Saved counter for occurrences of T + H = T.
+! NQ     = Integer variable, the current integration method order.
+! NQNYH  = Saved value of NQ*NYH.
+! NQWAIT = A counter controlling the frequency of order changes.
+!          An order change is about to be considered if NQWAIT = 1.
+! NSLJ   = The number of steps taken as of the last Jacobian update.
+! NSLP   = Saved value of NST as of last Newton matrix update.
+! NYH    = Saved value of the initial value of NEQ.
+! HU     = The step size in t last used.
+! NCFN   = Number of nonlinear convergence failures so far.
+! NETF   = The number of error test failures of the integrator so far.
+! NFE    = The number of f evaluations for the problem so far.
+! NJE    = The number of Jacobian evaluations so far.
+! NLU    = The number of matrix LU decompositions so far.
+! NNI    = Number of nonlinear iterations so far.
+! NQU    = The method order last used.
+! NST    = The number of steps taken for the problem so far.
+! Block 0.
+! Retrieve the necessary flags from the OPTIONS structure and manage
+! the storage allocation.
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVODE
+! ..
+!       Retrieve the local flags from the options structure.
+        IOPT = OPTS%IOPT
+        ITOL = OPTS%ITOL
+        MF = OPTS%MF
+        METH = OPTS%METH
+        MITER = OPTS%MITER
+        MOSS = OPTS%MOSS
+        NG = OPTS%NG
+
+!       Allocate the necessary storage for RWORK and IWORK. (Assume that
+!       both or neither of the arrays are allocated.)
+
+!       If we are starting a new problem, deallocate the old RWORK and
+!       IWORK arrays if they were allocated in a previous call. Also
+!       manage the event residual arrays.
+
+        IF (ISTATE==1) THEN
+          IF (ALLOCATED(DTEMP)) THEN
+            DEALLOCATE (DTEMP,YTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,270)
+          END IF
+          IF (ALLOCATED(RWORK)) THEN
+            DEALLOCATE (RWORK,IWORK,ACOR,SAVF,EWT,WM,STAT=JER)
+            CALL CHECK_STAT(JER,280)
+          END IF
+          IF (ALLOCATED(JROOT)) THEN
+            DEALLOCATE (JROOT,G0,G1,GX,STAT=JER)
+            CALL CHECK_STAT(JER,290)
+          END IF
+          IF (ALLOCATED(YMAX)) THEN
+            DEALLOCATE (YMAX,STAT=JER)
+            CALL CHECK_STAT(JER,300)
+          END IF
+        END IF
+
+!       If the user has made changes and called DVODE_F90 with ISTATE=3,
+!       temporarily save the necessary portion of the Nordsieck array
+!       and then release RWORK and IWORK. Also, save the contents of
+!       the WM array and release WM. Note: ACOR, SAVF, and EWT do not
+!       need to be saved.
+
+        IF (ISTATE==3) THEN
+          IF (IOPT/=1) THEN
+            MAXORD = MORD(METH)
+          ELSE
+            MAXORD = IUSER(5)
+            IF (MAXORD<0) GOTO 520
+            IF (MAXORD==0) MAXORD = 100
+            MAXORD = MIN(MAXORD,MORD(METH))
+          END IF
+          IF (MAXORD<NQ) THEN
+!           If MAXORD is less than NQ, save column NQ+2 of YH for
+!           later use.
+            IF (ALLOCATED(YHNQP2)) THEN
+              DEALLOCATE (YHNQP2,STAT=JER)
+              CALL CHECK_STAT(JER,310)
+            END IF
+            ALLOCATE (YHNQP2(NEQ),STAT=JER)
+            CALL CHECK_STAT(JER,320)
+            CALL DCOPY_F90(NEQ,RWORK(LYH+NYH*(MAXORD+1)),1,YHNQP2,1)
+          END IF
+          LYHTEMP = MIN((PREVIOUS_MAXORD+1)*NYH+LYH-1,(MAXORD+1)*NYH+LYH-1)
+          ALLOCATE (YHTEMP(LYHTEMP),STAT=JER)
+          CALL CHECK_STAT(JER,330)
+!         Save YH.
+          YHTEMP(1:LYHTEMP) = RWORK(1:LYHTEMP)
+!         Save WM.
+          LWMTEMP = LWMDIM
+          ALLOCATE (WMTEMP(LWMTEMP),STAT=JER)
+          CALL CHECK_STAT(JER,340)
+          WMTEMP(1:LWMTEMP) = WM(1:LWMTEMP)
+          IF (ALLOCATED(DTEMP)) THEN
+             DEALLOCATE (DTEMP,YTEMP,STAT=JER)
+             CALL CHECK_STAT(JER,350)
+          END IF
+          DEALLOCATE (RWORK,IWORK,YMAX,ACOR,SAVF,EWT,WM,STAT=JER)
+          CALL CHECK_STAT(JER,360)
+        END IF
+
+!     Allocate the RWORK and WM work arrays if they haven't already
+!     been allocated in a previous call.
+!     LRW = 20 + (MAXORD + 1) * NEQ
+!     LWMDIM =     
+!            0                        for MF = 10,
+!            2 * NEQ**2               for MF = 11 or 12,
+!            NEQ**2                   for MF = -11 or -12,
+!            NEQ                      for MF = 13,
+!            (3*ML + 2*MU + 2) * NEQ  for MF = 14 or 15,
+!            (2*ML + MU + 1) * NEQ    for MF = -14 or -15,
+!            0                        for MF = 16 or 17,
+!            0                        for MF = -16 or -17,
+!            0                        for MF = 20,
+!            2 * NEQ**2               for MF = 21 or 22,
+!            NEQ**2                   for MF = -21 or -22,
+!            NEQ                      for MF = 23,
+!            (3*ML + 2*MU + 2) * NEQ  for MF = 24 or 25,
+!            (2*ML + MU + 1) * NEQ    for MF = -24 or -25,
+!            0                        for MF = 26 or 27,
+!            0                        for MF = -26 or -27.
+        IF (ALLOCATED(RWORK)) THEN
+        ELSE
+          MFA = ABS(MF)
+          IF (IOPT/=1) THEN
+            MAXORD = MORD(METH)
+          ELSE
+            MAXORD = IUSER(5)
+            IF (MAXORD<0) GOTO 520
+            IF (MAXORD==0) MAXORD = 100
+            MAXORD = MIN(MAXORD,MORD(METH))
+          END IF
+          LRW = LRWUSER + (MAXORD+1)*NEQ
+!        IF (MITER == 0) LRW = LRW - 2
+          LRW = LRW - 2
+          IF (MF==10) THEN
+            LWMDIM = 0
+          ELSE IF (MF==11 .OR. MF==12) THEN
+            LWMDIM = 2*NEQ**2
+          ELSE IF (MF==-11 .OR. MF==-12) THEN
+            LWMDIM = NEQ**2
+          ELSE IF (MF==13) THEN
+            LWMDIM = NEQ
+          ELSE IF (MF==14 .OR. MF==15) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (3*ML+2*MU+2)*NEQ
+          ELSE IF (MF==-14 .OR. MF==-15) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (2*ML+MU+1)*NEQ
+          ELSE IF (MF==16 .OR. MF==17) THEN
+            LWMDIM = 0
+          ELSE IF (MF==-16 .OR. MF==-17) THEN
+            LWMDIM = 0
+          ELSE IF (MF==20) THEN
+            LWMDIM = 0
+          ELSE IF (MF==21 .OR. MF==22) THEN
+            LWMDIM = 2*NEQ**2
+          ELSE IF (MF==-21 .OR. MF==-22) THEN
+            LWMDIM = NEQ**2
+          ELSE IF (MF==23) THEN
+            LWMDIM = NEQ
+          ELSE IF (MF==24 .OR. MF==25) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (3*ML+2*MU+2)*NEQ
+          ELSE IF (MF==-24 .OR. MF==-25) THEN
+            ML = IUSER(1)
+            MU = IUSER(2)
+            IF (ML<0 .OR. ML>=NEQ) GOTO 500
+            IF (MU<0 .OR. MU>=NEQ) GOTO 510
+            LWMDIM = (2*ML+MU+1)*NEQ
+          ELSE IF (MF==26 .OR. MF==27) THEN
+            LWMDIM = 0
+          ELSE IF (MF==-26 .OR. MF==-27) THEN
+            LWMDIM = 0
+          END IF
+!         LWMDIM = LWMDIM + 2
+          ALLOCATE (RWORK(LRW),WM(LWMDIM),STAT=JER)
+          CALL CHECK_STAT(JER,370)
+          RWORK(1:LRW) = ZERO
+          WM(1:LWMDIM) = ZERO
+          IF (.NOT.ALLOCATED(DTEMP)) THEN
+             ALLOCATE (DTEMP(NEQ),YTEMP(NEQ),STAT=JER)
+             CALL CHECK_STAT(JER,380)
+          END IF
+          ALLOCATE (ACOR(NEQ),SAVF(NEQ),EWT(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,390)
+!         If necessary, reload the saved portion of the Nordsieck
+!         array and the WM array, saved above.
+          IF (ISTATE==3) THEN
+            RWORK(1:LYHTEMP) = YHTEMP(1:LYHTEMP)
+            I = MIN(LWMTEMP,LWMDIM)
+!           WM(1:LWMTEMP) = WMTEMP(1:LWMTEMP)
+            WM(1:I) = WMTEMP(1:I)
+            DEALLOCATE (YHTEMP,WMTEMP,STAT=JER)
+            CALL CHECK_STAT(JER,400)
+          END IF
+          RWORK(1:LRWUSER) = RUSER(1:LRWUSER)
+!         IUSER: = LIWUSER if MITER = 0 or 3 (MF = 10, 13, 20, 23)
+!                = LIWUSER + NEQ otherwise
+!                  (ABS(MF) = 11,12,14,15,16,17,21,22,24,25,26,27).
+          LIW = LIWUSER + NEQ
+          IF (MITER==0 .OR. MITER==3) LIW = LIWUSER
+          ALLOCATE (IWORK(LIW),STAT=JER)
+          CALL CHECK_STAT(JER,410)
+          IWORK(1:LIWUSER) = IUSER(1:LIWUSER)
+!         Allocate the YMAX vector.
+          ALLOCATE (YMAX(NEQ),STAT=JER)
+          CALL CHECK_STAT(JER,420)
+        END IF
+!       Allocate the event arrays if they haven't already been allocated
+!       in a previous call.
+        IF (ALLOCATED(JROOT)) THEN
+        ELSE
+          IF (NG>0) THEN
+            ALLOCATE (JROOT(NG),G0(NG),G1(NG),GX(NG),STAT=JER)
+            CALL CHECK_STAT(JER,430)
+          END IF
+        END IF
+
+! Block A.
+! This code block is executed on every call. It tests ISTATE and
+! ITASK for legality and branches appropriately.
+! If ISTATE > 1 but the flag INIT shows that initialization has
+! not yet been done, an error return occurs.
+! If ISTATE = 1 and TOUT = T, return immediately.
+! The user portion of RWORK and IWORK are reloaded since something
+! may have changed since the previous visit.
+
+        RWORK(1:LRWUSER) = RUSER(1:LRWUSER)
+        IWORK(1:LIWUSER) = IUSER(1:LIWUSER)
+        IF (ISTATE<1 .OR. ISTATE>3) GOTO 420
+        IF (ITASK<1 .OR. ITASK>5) GOTO 430
+        ITASKC = ITASK
+        IF (ISTATE==1) GOTO 10
+        IF (INIT/=1) GOTO 440
+        IF (ISTATE==2) GOTO 130
+        GOTO 20
+10      INIT = 0
+        IF (ABS(TOUT-T)<=ZERO) THEN
+          RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+          IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+          RETURN
+        END IF
+
+! Block B.
+! The next code block is executed for the initial call (ISTATE = 1),
+! or for a continuation call with parameter changes (ISTATE = 3).
+! It contains checking of all input and various initializations.
+
+!       First check legality of the non-optional input NEQ, ITOL, IOPT,
+!       MF, ML, and MU.
+
+20      IF (NEQ<=0) GOTO 450
+        IF (ISTATE==1) GOTO 30
+        IF (NEQ>N) GOTO 460
+        IF (NEQ/=N) GOTO 465
+30      N = NEQ
+        IF (ITOL<1 .OR. ITOL>4) GOTO 470
+        IF (IOPT<0 .OR. IOPT>1) GOTO 480
+        JSV = SIGN(1,MF)
+        INEWJ = (1-JSV)/2
+        MFA = ABS(MF)
+        METH = MFA/10
+        MITER = MFA - 10*METH
+        IF (METH<1 .OR. METH>2) GOTO 490
+        IF (MITER<0 .OR. MITER>7) GOTO 490
+        IF (MITER<=3) GOTO 40
+        IF (MITER<=5) THEN
+          ML = IWORK(1)
+          MU = IWORK(2)
+          IF (ML<0 .OR. ML>=N) GOTO 500
+          IF (MU<0 .OR. MU>=N) GOTO 510
+        END IF
+40      CONTINUE
+        IF (NG<0) GOTO 700
+        IF (ISTATE==1) GOTO 50
+        IF (IRFND==0 .AND. NG/=NGC) GOTO 710
+50      NGC = NG
+!       Next process and check the optional input.
+        IF (IOPT==1) GOTO 60
+        MAXORD = MORD(METH)
+        MXSTEP = MXSTP0
+        MXHNIL = MXHNL0
+        IF (ISTATE==1) H0 = ZERO
+        HMXI = ZERO
+        HMIN = ZERO
+        GOTO 80
+60      MAXORD = IWORK(5)
+        IF (MAXORD<0) GOTO 520
+        IF (MAXORD==0) MAXORD = 100
+        MAXORD = MIN(MAXORD,MORD(METH))
+        MXSTEP = IWORK(6)
+        IF (MXSTEP<0) GOTO 530
+        IF (MXSTEP==0) MXSTEP = MXSTP0
+        MXHNIL = IWORK(7)
+        IF (MXHNIL<0) GOTO 540
+        IF (MXHNIL==0) MXHNIL = MXHNL0
+        IF (ISTATE/=1) GOTO 70
+        H0 = RWORK(5)
+        IF ((TOUT-T)*H0<ZERO) GOTO 550
+70      HMAX = RWORK(6)
+        IF (HMAX<ZERO) GOTO 560
+        HMXI = ZERO
+        IF (HMAX>ZERO) HMXI = ONE/HMAX
+        HMIN = RWORK(7)
+        IF (HMIN<ZERO) GOTO 570
+        SETH = RWORK(8)
+        IF (SETH<ZERO) GOTO 690
+!       Check the nonnegativity information.
+        IF (BOUNDS) THEN
+          IF (NDX<1 .OR. NDX>NEQ) THEN
+            MSG = 'The size of the CONSTRAINED vector'
+            CALL XERRDV(MSG,900,1,0,0,0,0,ZERO,ZERO)
+            MSG = 'must be between 1 and NEQ.'
+            CALL XERRDV(MSG,900,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DO I = 1, NDX
+            IF (IDX(I)<1 .OR. IDX(I)>N) THEN
+              MSG = 'Each component of THE CONSTRAINED'
+              CALL XERRDV(MSG,910,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'vector must be between 1 and N.'
+              CALL XERRDV(MSG,910,2,0,0,0,0,ZERO,ZERO)
+            END IF
+          END DO
+        END IF
+!       Check the sub diagonal and super diagonal arrays.
+        IF (MITER==4 .OR. MITER==5) THEN
+           IF (SUBS) THEN
+              DO I = 1, NSUBS
+                 IF (SUBDS(I) < 2 .OR. SUBDS(I) > ML+1) THEN
+                    MSG = 'Each element of SUB_DIAGONALS'
+                    CALL XERRDV(MSG,920,1,0,0,0,0,ZERO,ZERO)
+                    MSG = 'must be between 2 and ML + 1.'
+                    CALL XERRDV(MSG,920,2,0,0,0,0,ZERO,ZERO)
+                 END IF
+              END DO
+           END IF
+           IF (SUPS) THEN
+              DO I = 1, NSUPS
+                 IF (SUPDS(I) < 2 .OR. SUPDS(I) > MU + 1) THEN
+                    MSG = 'Each element of SUP_DIAGONALS'
+                    CALL XERRDV(MSG,930,1,0,0,0,0,ZERO,ZERO)
+                    MSG = 'must be between 2 and MU + 1.'
+                    CALL XERRDV(MSG,930,2,0,0,0,0,ZERO,ZERO)
+                 END IF
+              END DO
+           END IF
+!          Compute the banded column grouping.
+           IF (SUBS .OR. SUPS) THEN
+             CALL BGROUP(N,EWT,ACOR,YMAX,ML,MU)
+             BUILD_IAJA = .FALSE.
+             BUILD_IAJA = .TRUE.
+             IF (BUILD_IAJA) THEN
+                CALL BANDED_IAJA(N,ML,MU)
+                NZB = IAB(N+1) - 1
+             END IF
+           END IF
+        END IF
+
+        IF ((MITER==2 .OR. MITER==5) .AND. USE_JACSP) THEN
+!         Allocate the arrays needed by DVJAC/JACSPD.
+          IF (ALLOCATED(INDROWDS)) THEN
+             DEALLOCATE (INDROWDS, INDCOLDS, NGRPDS, IPNTRDS, JPNTRDS, &
+               IWADS, IWKDS, IOPTDS, YSCALEDS, WKDS, FACDS)
+             CALL CHECK_STAT(IER,440)
+          END IF
+          ALLOCATE (INDROWDS(1), INDCOLDS(1), NGRPDS(1), IPNTRDS(1),   &
+            JPNTRDS(1), IWADS(1), IWKDS(50+N), IOPTDS(5), YSCALEDS(N), &
+            WKDS(3*N), FACDS(N), STAT=IER)
+          CALL CHECK_STAT(IER,450)
+!         For use in DVJAC:
+          IOPTDS(4) = 0
+        END IF
+
+! Set work array pointers and check lengths LRW and LIW. Pointers
+! to segments of RWORK and IWORK are named by prefixing L to the
+! name of the segment. e.g., the segment YH starts at RWORK(LYH).
+! Within WM, LOCJS is the location of the saved Jacobian (JSV > 0).
+
+80      LYH = 21
+        IF (ISTATE==1) NYH = N
+        LENRW = LYH + (MAXORD+1)*NYH - 1
+        IWORK(17) = LENRW
+        IF (LENRW>LRW) GOTO 580
+        IF (LENRW/=LRW) GOTO 580
+        LWM = 1
+!       Save MAXORD in case the calling program calls with ISTATE=3.
+        PREVIOUS_MAXORD = MAXORD
+        JCO = MAX(0,JSV)
+!       IF (MITER==0) LENWM = 2
+        IF (MITER==0) LENWM = 0
+        IF (MITER==1 .OR. MITER==2) THEN
+!         LENWM = 2 + (1+JCO)*N*N
+!         LOCJS = N*N + 3
+          LENWM = (1+JCO)*N*N
+          LOCJS = N*N + 1
+        END IF
+!       IF (MITER==3) LENWM = N + 2
+        IF (MITER==3) LENWM = N
+        IF (MITER==4 .OR. MITER==5) THEN
+          MBAND = ML + MU + 1
+          LENP = (MBAND+ML)*N
+          LENJ = MBAND*N
+!         LENWM = 2 + LENP + JCO*LENJ
+!         LOCJS = LENP + 3
+          LENWM = LENP + JCO*LENJ
+          LOCJS = LENP + 1
+        END IF
+        IF (MITER==6 .OR. MITER==7) THEN
+!         LENWM = 2
+          LENWM = 0
+        END IF
+        IF (LENWM>LWMDIM) GOTO 730
+        IF (LENWM/=LWMDIM) GOTO 730
+        LIWM = 1
+        LENIW = 30 + N
+        IF (MITER==0 .OR. MITER==3) LENIW = 30
+        IWORK(18) = LENIW
+        IF (LENIW>LIW) GOTO 590
+!       Check RTOL and ATOL for legality.
+        RTOLI = OPTS%RTOL(1)
+        ATOLI = OPTS%ATOL(1)
+        DO I = 1, N
+          IF (ITOL>=3) RTOLI = OPTS%RTOL(I)
+          IF (ITOL==2 .OR. ITOL==4) ATOLI = OPTS%ATOL(I)
+          IF (RTOLI<ZERO) GOTO 600
+          IF (ATOLI<ZERO) GOTO 610
+        END DO
+        IF (ISTATE==1) GOTO 100
+!       If ISTATE = 3, set flag to signal parameter changes to DVSTEP.
+        JSTART = -1
+        IF (NQ<=MAXORD) GOTO 90
+!       MAXORD was reduced below NQ. Copy YH(*,MAXORD+2) into SAVF.
+!       YH(*,MAXORD+2) was copied to the YHNQP2 array at the
+!       beginning of DVODE when the ISTATE=3 call was made.
+        CALL DCOPY_F90(N,YHNQP2,1,SAVF,1)
+!       Reload WM1 since LWM may have changed.
+90      IF (MITER>0) WM1 = SQRT(UROUND)
+!       ISTATC controls the determination of the sparsity arrays
+!       if the sparse solution option is used.
+        ISTATC = ISTATE
+        GOTO 130
+
+! Block C.
+! The next block is for the initial call only (ISTATE = 1).
+! It contains all remaining initializations, the initial call to F,
+! and the calculation of the initial step size.
+! The error weights in EWT are inverted after being loaded.
+
+100     UROUND = EPSILON(ONE)
+        U125 = UROUND ** 0.125_dp
+        U325 = UROUND ** 0.325_dp
+!       ISTATC controls the determination of the sparsity arrays if
+!       the sparse solution option is used.
+        ISTATC = ISTATE
+        TN = T
+        IF (ITASK/=4 .AND. ITASK/=5) GOTO 110
+        TCRIT = RWORK(1)
+        IF ((TCRIT-TOUT)*(TOUT-T)<ZERO) GOTO 660
+        IF (ABS(H0)>ZERO .AND. (T+H0-TCRIT)*H0>ZERO) H0 = TCRIT - T
+110     JSTART = 0
+        IF (MITER>0) WM1 = SQRT(UROUND)
+        CCMXJ = PT2
+        MSBJ = 50
+        MSBG = 75
+        NHNIL = 0
+        NST = 0
+        NJE = 0
+        NNI = 0
+        NCFN = 0
+        NETF = 0
+        NLU = 0
+        NSLJ = 0
+        NSLAST = 0
+        HU = ZERO
+        NQU = 0
+        MB28 = 0
+!_______________________________________________________________________
+! *****MA48 build change point. Insert this statement.
+!       MB48 = 0
+!_______________________________________________________________________
+        NSLG = 0
+        NGE = 0
+!       Initial call to F. (LF0 points to YH(*,2).)
+        LF0 = LYH + NYH
+        CALL F(N,T,Y,RWORK(LF0))
+        NFE = 1
+!       Load the initial value vector in YH.
+        CALL DCOPY_F90(N,Y,1,RWORK(LYH),1)
+!       Load and invert the EWT array. (H is temporarily set to 1.0.)
+        NQ = 1
+        H = ONE
+        CALL DEWSET(N,ITOL,OPTS%RTOL,OPTS%ATOL,RWORK(LYH),EWT)
+        DO I = 1, N
+          IF (EWT(I)<=ZERO) GOTO 620
+          EWT(I) = ONE/EWT(I)
+        END DO
+        NNZ = 0
+        NGP = 0
+        IF (OPTS%SPARSE) THEN
+          ISTATC = ISTATE
+        END IF
+        IF (ABS(H0)>ZERO) GOTO 120
+!       Call DVHIN to set initial step size H0 to be attempted.
+        CALL DVHIN(N,T,RWORK(LYH),RWORK(LF0),F,TOUT,EWT,ITOL,OPTS%ATOL,Y,ACOR, &
+          H0,NITER,IER)
+        NFE = NFE + NITER
+        IF (IER/=0) GOTO 630
+!       Adjust H0 if necessary to meet HMAX bound.
+120     RH = ABS(H0)*HMXI
+        IF (RH>ONE) H0 = H0/RH
+!       Load H with H0 and scale YH(*,2) by H0.
+        H = H0
+        CALL DSCAL_F90(N,H0,RWORK(LF0),1)
+!       GOTO 270
+!       Check for a zero of g at T.
+        IRFND = 0
+        TOUTC = TOUT
+        IF (NGC==0) GOTO 210
+        CALL DVCHECK(1,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT==0) GOTO 210
+        GOTO 720
+
+! Block D.
+! The next code block is for continuation calls only (ISTATE = 2 or 3)
+! and is to check stop conditions before taking a step.
+
+130     NSLAST = NST
+        IRFP = IRFND
+        IF (NGC==0) GOTO 140
+        IF (ITASK==1 .OR. ITASK==4) TOUTC = TOUT
+        CALL DVCHECK(2,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT/=1) GOTO 140
+        IRFND = 1
+        ISTATE = 3
+        T = T0ST
+        GOTO 330
+140     CONTINUE
+        IRFND = 0
+        IF (IRFP==1 .AND. (ABS(TLAST-TN)>ZERO) .AND. ITASK==2) GOTO 310
+        KUTH = 0
+        GOTO (150,200,160,170,180) ITASK
+150     IF ((TN-TOUT)*H<ZERO) GOTO 200
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (IFLAG/=0) GOTO 680
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+160     TP = TN - HU*(ONE+HUN*UROUND)
+        IF ((TP-TOUT)*H>ZERO) GOTO 640
+        IF ((TN-TOUT)*H<ZERO) GOTO 200
+        GOTO 310
+170     TCRIT = RWORK(1)
+        IF ((TN-TCRIT)*H>ZERO) GOTO 650
+        IF ((TCRIT-TOUT)*H<ZERO) GOTO 660
+        IF ((TN-TOUT)*H<ZERO) GOTO 190
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (IFLAG/=0) GOTO 680
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+180     TCRIT = RWORK(1)
+        IF ((TN-TCRIT)*H>ZERO) GOTO 650
+190     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+        IF (IHIT) GOTO 310
+        TNEXT = TN + HNEW*(ONE+FOUR*UROUND)
+        IF ((TNEXT-TCRIT)*H<=ZERO) GOTO 200
+        H = (TCRIT-TN)*(ONE-FOUR*UROUND)
+        KUTH = 1
+
+! Block E.
+! The next block is normally executed for all calls and contains
+! the call to the one-step core integrator DVSTEP. This is a
+! looping point for the integration steps.
+! First check for too many steps being taken, update EWT(if not
+! at start of problem), check for too much accuracy being
+! requested, and check for H below the roundoff level in T.
+
+200     CONTINUE
+        IF ((NST-NSLAST)>=MXSTEP) GOTO 340
+        CALL DEWSET(N,ITOL,OPTS%RTOL,OPTS%ATOL,RWORK(LYH),EWT)
+        DO I = 1, N
+          IF (EWT(I)<=ZERO) GOTO 350
+          EWT(I) = ONE/EWT(I)
+        END DO
+210     TOLSF = UROUND*DVNORM(N,RWORK(LYH),EWT)
+        IPCUTH = -1
+        IF (TOLSF<=ONE) GOTO 220
+        TOLSF = TOLSF*TWO
+        IF (NST==0) GOTO 670
+        GOTO 360
+220     CONTINUE
+        IPCUTH = IPCUTH + 1
+        IF (IPCUTH>=IPCUTH_MAX) THEN
+          MSG = 'Too many step reductions to prevent'
+          CALL XERRDV(MSG,940,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'an infeasible prediction.'
+          CALL XERRDV(MSG,940,1,0,0,0,0,ZERO,ZERO)
+!         Retract the solution to TN:
+          CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+          ACOR(1:N) = ZERO
+          ISTATE = -7
+          GOTO 410
+        END IF
+        IF (ABS((TN+H)-TN)>ZERO) GOTO 230
+        NHNIL = NHNIL + 1
+        IF (NHNIL>MXHNIL) GOTO 230
+        MSG = 'Warning: internal T(=R1) and H(=R2) are such that'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'in the machine, T + H = T on the next step.'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = '(H = step size). The solver will continue anyway.'
+        CALL XERRDV(MSG,950,1,0,0,0,2,TN,H)
+        IF (NHNIL<MXHNIL) GOTO 230
+        MSG = 'The above warning has been issued I1 times.'
+        CALL XERRDV(MSG,950,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'It will not be issued again for this problem.'
+        CALL XERRDV(MSG,950,1,1,MXHNIL,0,0,ZERO,ZERO)
+230     CONTINUE
+        IF (BOUNDS) THEN
+!         Check positive components for infeasible prediction; reduce 
+!         step size if infeasible prediction will occur in DVNLSD.
+          ACOR(1:N) = RWORK(LYH:LYH+N-1)
+!         Predict:
+          CALL DVNRDP(RWORK(LYH:LRW),NYH,N,NQ)
+          DO I = 1, NDX
+            IF ((ACOR(IDX(I))>LB(I) .AND. RWORK(LYH+ &
+                IDX(I)-1)<LB(I)) .OR. (ACOR(IDX(I))<UB(I) .AND. RWORK(LYH+ &
+                IDX(I)-1)>UB(I))) THEN
+!              Retract:
+              CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+              H = HALF*H
+              ETA = HALF
+!              Rescale:
+              CALL DVNRDS(RWORK(LYH),NYH,N,L,ETA)
+              GOTO 220
+            END IF
+          END DO
+!         Retract:
+          CALL DVNRDN(RWORK(LYH),NYH,N,NQ)
+          ACOR(1:N) = ZERO
+        END IF
+
+!       CALL DVSTEP(Y,YH,LDYH,YH1,EWT,SAVF,ACOR,WM,IWM,F,JAC, &
+!         VNLS,OPTS%ATOL,ITOL)
+!_______________________________________________________________________
+
+        IF (MITER/=6 .AND. MITER/=7) THEN
+          CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+            IWORK(LIWM),F,JAC,DVNLSD,OPTS%ATOL,ITOL)
+        ELSE
+          CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+            IWORK(LIWM),F,JAC,DVNLSS28,OPTS%ATOL,ITOL)
+        END IF
+! *****MA48 build change point. Replace above with these statements.
+!     IF (MITER /= 6 .AND. MITER /= 7) THEN
+!        CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!          IWORK(LIWM),F,JAC,DVNLSD,OPTS%ATOL,ITOL)
+!     ELSE
+!        IF (USE_MA48_FOR_SPARSE) THEN
+!           CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!             IWORK(LIWM), F, JAC, DVNLSS48,OPTS%ATOL,ITOL)
+!        ELSE
+!           CALL DVSTEP(Y,RWORK(LYH),NYH,RWORK(LYH),EWT,SAVF,ACOR,WM, &
+!           IWORK(LIWM),F,JAC,DVNLSS28,OPTS%ATOL,ITOL)
+!        END IF
+!     END IF
+!_______________________________________________________________________
+
+        KGO = 1 - KFLAG
+!       Branch on KFLAG. Note: In this version, KFLAG can not be set to
+!                            -3; KFLAG = 0, -1, -2.
+        GOTO (240,370,380) KGO
+
+! Block F.
+! The following block handles the case of a successful return from the
+! core integrator (KFLAG = 0). Test for stop conditions.
+
+240     INIT = 1
+        KUTH = 0
+        GOTO (250,310,270,280,300) ITASK
+!       ITASK = 1. If TOUT has been reached, interpolate.
+250     CONTINUE
+        IF (NGC==0) GOTO 260
+        CALL DVCHECK(3,GFUN,NEQ,Y,RWORK(LYH),NYH,G0,G1,GX,IRT)
+        IF (IRT/=1) GOTO 260
+        IRFND = 1
+        ISTATE = 3
+        T = T0ST
+        GOTO 330
+260     CONTINUE
+        IF ((TN-TOUT)*H<ZERO) GOTO 200
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+!       ITASK = 3. Jump to exit if TOUT was reached.
+270     IF ((TN-TOUT)*H>=ZERO) GOTO 310
+        GOTO 200
+!       ITASK = 4. See if TOUT or TCRIT was reached. Adjust H if necessary.
+280     IF ((TN-TOUT)*H<ZERO) GOTO 290
+        CALL DVINDY_CORE(TOUT,0,RWORK(LYH),NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        T = TOUT
+        GOTO 320
+290     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+        IF (IHIT) GOTO 310
+        TNEXT = TN + HNEW*(ONE+FOUR*UROUND)
+        IF ((TNEXT-TCRIT)*H<=ZERO) GOTO 200
+        H = (TCRIT-TN)*(ONE-FOUR*UROUND)
+        KUTH = 1
+        GOTO 200
+!       ITASK = 5. See if TCRIT was reached and jump to exit.
+300     HMX = ABS(TN) + ABS(H)
+        IHIT = ABS(TN-TCRIT) <= HUN*UROUND*HMX
+
+! Block G.
+! The following block handles all successful returns from DVODE.
+! If ITASK /= 1, Y is loaded from YH and T is set accordingly.
+! ISTATE is set to 2, and the optional output is loaded into the
+! work arrays before returning.
+
+310     CONTINUE
+        CALL DCOPY_F90(N,RWORK(LYH),1,Y,1)
+        T = TN
+        IF (ITASK/=4 .AND. ITASK/=5) GOTO 320
+        IF (IHIT) T = TCRIT
+320     ISTATE = 2
+330     CONTINUE
+        RWORK(11) = HU
+        RWORK(12) = HNEW
+        RWORK(13) = TN
+        IWORK(10) = NGE
+        IWORK(11) = NST
+        IWORK(12) = NFE
+        IWORK(13) = NJE
+        IWORK(14) = NQU
+        IWORK(15) = NEWQ
+        IWORK(19) = NLU
+        IWORK(20) = NNI
+        IWORK(21) = NCFN
+        IWORK(22) = NETF
+        TLAST = T
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+!       Warn the user if |y(t)| < ATOL:
+        IF (ISTATE==2 .OR. ISTATE==3) THEN
+          IF (YMAXWARN) THEN
+            ATOLI = OPTS%ATOL(1)
+            DO I = 1, N
+              IF (ITOL==2 .OR. ITOL==4) ATOLI = OPTS%ATOL(I)
+              IF (ABS(Y(I))<ATOLI) THEN
+                MSG = 'Warning: Component I1 of the solution is'
+                CALL XERRDV(MSG,960,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'smaller in magnitude than component I1'
+                CALL XERRDV(MSG,960,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'of the absolute error tolerance vector.'
+                CALL XERRDV(MSG,960,1,1,I,0,0,ZERO,ZERO)
+              END IF
+            END DO
+          END IF
+        END IF
+        RETURN
+
+! Block H.
+! The following block handles all unsuccessful returns other than
+! those for illegal input. First the error message routine is called.
+! if there was an error test or convergence test failure, IMXER is set.
+! Then Y is loaded from YH, and T is set to TN. The optional output
+! is loaded into the work arrays before returning.
+
+!       The maximum number of steps was taken before reaching TOUT.
+340     MSG = 'At current T(=R1), MXSTEP(=I1) steps'
+        CALL XERRDV(MSG,970,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'taken on this call before reaching TOUT.'
+        CALL XERRDV(MSG,970,1,1,MXSTEP,0,1,TN,ZERO)
+        ISTATE = -1
+        GOTO 410
+!       EWT(i) <= 0.0 for some i (not at start of problem).
+350     EWTI = EWT(I)
+        MSG = 'At T(=R1), EWT(I1) has become R2 <= 0.'
+        CALL XERRDV(MSG,980,1,1,I,0,2,TN,EWTI)
+        ISTATE = -6
+        GOTO 410
+!       Too much accuracy requested for machine precision.
+360     MSG = 'At T(=R1), too much accuracy was requested'
+        CALL XERRDV(MSG,990,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'for precision of machine:   see TOLSF(=R2).'
+        CALL XERRDV(MSG,990,1,0,0,0,2,TN,TOLSF)
+        RWORK(14) = TOLSF
+        ISTATE = -2
+        GOTO 410
+!       KFLAG = -1. Error test failed repeatedly or with ABS(H) = HMIN.
+370     MSG = 'At T(=R1) and step size H(=R2), the error'
+        CALL XERRDV(MSG,1000,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'test failed repeatedly or with ABS(H) = HMIN.'
+        CALL XERRDV(MSG,1000,1,0,0,0,2,TN,H)
+        ISTATE = -4
+        GOTO 390
+!       KFLAG = -2. Convergence failed repeatedly or with ABS(H) = HMIN.
+380     MSG = 'At T(=R1) and step size H(=R2), the'
+        CALL XERRDV(MSG,1010,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'corrector convergence failed repeatedly'
+        CALL XERRDV(MSG,1010,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'or with ABS(H) = HMIN.'
+        CALL XERRDV(MSG,1010,1,0,0,0,2,TN,H)
+        ISTATE = -5
+!       Compute IMXER if relevant.
+390     BIG = ZERO
+        IMXER = 1
+        DO 400 I = 1, N
+          SIZEST = ABS(ACOR(I)*EWT(I))
+          IF (BIG>=SIZEST) GOTO 400
+          BIG = SIZEST
+          IMXER = I
+400     END DO
+        IWORK(16) = IMXER
+!       Set Y vector, T, and optional output.
+410     CONTINUE
+        CALL DCOPY_F90(N,RWORK(LYH),1,Y,1)
+        T = TN
+        RWORK(11) = HU
+        RWORK(12) = H
+        RWORK(13) = TN
+        IWORK(10) = NGE
+        IWORK(11) = NST
+        IWORK(12) = NFE
+        IWORK(13) = NJE
+        IWORK(14) = NQU
+        IWORK(15) = NQ
+        IWORK(19) = NLU
+        IWORK(20) = NNI
+        IWORK(21) = NCFN
+        IWORK(22) = NETF
+        TLAST = T
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+! Block I.
+! The following block handles all error returns due to illegal input
+! (ISTATE = -3), as detected before calling the core integrator.
+! First the error message routine is called. If the illegal input
+! is a negative ISTATE, the run is aborted (apparent infinite loop).
+
+420     MSG = 'ISTATE(=I1) is illegal.'
+        CALL XERRDV(MSG,1020,1,1,ISTATE,0,0,ZERO,ZERO)
+        IF (ISTATE<0) GOTO 750
+        GOTO 740
+430     MSG = 'ITASK(=I1) is illegal.'
+        CALL XERRDV(MSG,1030,1,1,ITASK,0,0,ZERO,ZERO)
+        GOTO 740
+440     MSG = 'ISTATE(=I1) > 1 but DVODE is not initialized.'
+        CALL XERRDV(MSG,1040,1,1,ISTATE,0,0,ZERO,ZERO)
+        GOTO 740
+450     MSG = 'NEQ (=I1) < 1.'
+        CALL XERRDV(MSG,1050,1,1,NEQ,0,0,ZERO,ZERO)
+        GOTO 740
+460     MSG = 'ISTATE = 3 and NEQ increased (I1 to I2).'
+        CALL XERRDV(MSG,1060,1,2,N,NEQ,0,ZERO,ZERO)
+        GOTO 740
+465     MSG = 'This version of DVODE requires does not allow NEQ to be reduced.'
+        CALL XERRDV(MSG,1070,2,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+470     MSG = 'ITOL(=I1) is illegal.'
+        CALL XERRDV(MSG,1080,1,1,ITOL,0,0,ZERO,ZERO)
+        GOTO 740
+480     MSG = 'IOPT(=I1) is illegal.'
+        CALL XERRDV(MSG,1090,1,1,IOPT,0,0,ZERO,ZERO)
+        GOTO 740
+490     MSG = 'MF(=I1) is illegal.'
+        CALL XERRDV(MSG,1100,1,1,MF,0,0,ZERO,ZERO)
+        GOTO 740
+500     MSG = 'ML(=I1) illegal: < 0 or >= NEQ (=I2)'
+        CALL XERRDV(MSG,1110,1,2,ML,NEQ,0,ZERO,ZERO)
+        GOTO 740
+510     MSG = 'MU(=I1) illegal: < 0 or >= NEQ (=I2)'
+        CALL XERRDV(MSG,1120,1,2,MU,NEQ,0,ZERO,ZERO)
+        GOTO 740
+520     MSG = 'MAXORD(=I1) < 0.'
+        CALL XERRDV(MSG,1130,1,1,MAXORD,0,0,ZERO,ZERO)
+        GOTO 740
+530     MSG = 'MXSTEP(=I1) < 0.'
+        CALL XERRDV(MSG,1140,1,1,MXSTEP,0,0,ZERO,ZERO)
+        GOTO 740
+540     MSG = 'MXHNIL(=I1) < 0.'
+        CALL XERRDV(MSG,1150,1,1,MXHNIL,0,0,ZERO,ZERO)
+        GOTO 740
+550     MSG = 'TOUT(=R1) is behind T(=R2).'
+        CALL XERRDV(MSG,1160,1,0,0,0,2,TOUT,T)
+        MSG = 'The integration direction is given by H0 (=R1).'
+        CALL XERRDV(MSG,1160,1,0,0,0,1,H0,ZERO)
+        GOTO 740
+560     MSG = 'HMAX(=R1) < 0.'
+        CALL XERRDV(MSG,1170,1,0,0,0,1,HMAX,ZERO)
+        GOTO 740
+570     MSG = 'HMIN(=R1) < 0.'
+        CALL XERRDV(MSG,1180,1,0,0,0,1,HMIN,ZERO)
+        GOTO 740
+580     CONTINUE
+        MSG = 'RWORK length needed, LENRW(=I1) > LRW(=I2)'
+        CALL XERRDV(MSG,1190,1,2,LENRW,LRW,0,ZERO,ZERO)
+        GOTO 740
+590     CONTINUE
+        MSG = 'IWORK length needed, LENIW(=I1) > LIW(=I2)'
+        CALL XERRDV(MSG,1200,1,2,LENIW,LIW,0,ZERO,ZERO)
+        GOTO 740
+600     MSG = 'RTOL(I1) is R1 < 0.'
+        CALL XERRDV(MSG,1210,1,1,I,0,1,RTOLI,ZERO)
+        GOTO 740
+610     MSG = 'ATOL(I1) is R1 < 0.'
+        CALL XERRDV(MSG,1220,1,1,I,0,1,ATOLI,ZERO)
+        GOTO 740
+620     EWTI = EWT(I)
+        MSG = 'EWT(I1) is R1 <= 0.'
+        CALL XERRDV(MSG,1230,1,1,I,0,1,EWTI,ZERO)
+        GOTO 740
+630     CONTINUE
+        MSG = 'TOUT(=R1) too close to T(=R2) to start.'
+        CALL XERRDV(MSG,1240,1,0,0,0,2,TOUT,T)
+        GOTO 740
+640     CONTINUE
+        MSG = 'ITASK = I1 and TOUT(=R1) < TCUR - HU(=R2).'
+        CALL XERRDV(MSG,1250,1,1,ITASK,0,2,TOUT,TP)
+        GOTO 740
+650     CONTINUE
+        MSG = 'ITASK = 4 or 5 and TCRIT(=R1) < TCUR(=R2).'
+        CALL XERRDV(MSG,1260,1,0,0,0,2,TCRIT,TN)
+        GOTO 740
+660     CONTINUE
+        MSG = 'ITASK = 4 or 5 and TCRIT(=R1) < TOUT(=R2).'
+        CALL XERRDV(MSG,1270,1,0,0,0,2,TCRIT,TOUT)
+        GOTO 740
+670     MSG = 'At the start of the problem, too much'
+        CALL XERRDV(MSG,1280,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'accuracy was requested for precision'
+        CALL XERRDV(MSG,1280,1,0,0,0,1,TOLSF,ZERO)
+        MSG = 'of machine: see TOLSF(=R1).'
+        CALL XERRDV(MSG,1280,1,0,0,0,1,TOLSF,ZERO)
+        RWORK(14) = TOLSF
+        GOTO 740
+680     MSG = 'Trouble from DVINDY. ITASK = I1, TOUT = R1.'
+        CALL XERRDV(MSG,1290,1,1,ITASK,0,1,TOUT,ZERO)
+        GOTO 740
+690     MSG = 'SETH must be nonnegative.'
+        CALL XERRDV(MSG,1300,1,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+700     MSG = 'NG(=I1) < 0.'
+        CALL XERRDV(MSG,1310,0,1,NG,0,0,ZERO,ZERO)
+        GOTO 740
+710     MSG = 'NG changed (from I1 to I2) illegally, i.e.,'
+        CALL XERRDV(MSG,1320,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'not immediately after a root was found.'
+        CALL XERRDV(MSG,1320,1,2,NGC,NG,0,ZERO,ZERO)
+        GOTO 740
+720     MSG = 'One or more components of g has a root'
+        CALL XERRDV(MSG,1330,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'too near to the initial point.'
+        CALL XERRDV(MSG,1330,1,0,0,0,0,ZERO,ZERO)
+        GOTO 740
+730     CONTINUE
+        MSG = 'WM length needed, LENWM(=I1) > LWMDIM(=I2)'
+        CALL XERRDV(MSG,1340,1,2,LENWM,LWMDIM,0,ZERO,ZERO)
+
+740     CONTINUE
+        ISTATE = -3
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+750     MSG = 'Run aborted:  apparent infinite loop.'
+        CALL XERRDV(MSG,1350,2,0,0,0,0,ZERO,ZERO)
+        RUSER(1:LRWUSER) = RWORK(1:LRWUSER)
+        IUSER(1:LIWUSER) = IWORK(1:LIWUSER)
+        RETURN
+
+      END SUBROUTINE DVODE
+!_______________________________________________________________________
+
+      SUBROUTINE DVHIN(N,T0,Y0,YDOT,F,TOUT,EWT,ITOL,ATOL,Y,TEMP,H0, &
+        NITER,IER)
+! ..
+! Calculate the initial step size.
+! ..
+! This routine computes the step size, H0, to be attempted on the
+! first step, when the user has not supplied a value for this.
+! First we check that TOUT - T0 differs significantly from zero. Then
+! an iteration is done to approximate the initial second derivative
+! and this is used to define h from w.r.m.s.norm(h**2 * yddot / 2) = 1.
+! A bias factor of 1/2 is applied to the resulting h.
+! The sign of H0 is inferred from the initial values of TOUT and T0.
+! Communication with DVHIN is done with the following variables:
+! N      = Size of ODE system, input.
+! T0     = Initial value of independent variable, input.
+! Y0     = Vector of initial conditions, input.
+! YDOT   = Vector of initial first derivatives, input.
+! F      = Name of subroutine for right-hand side f(t,y), input.
+! TOUT   = First output value of independent variable
+! UROUND = Machine unit roundoff
+! EWT, ITOL, ATOL = Error weights and tolerance parameters
+!                   as described in the driver routine, input.
+! Y, TEMP = Work arrays of length N.
+! H0     = Step size to be attempted, output.
+! NITER  = Number of iterations (and of f evaluations) to compute H0,
+!          output.
+! IER    = The error flag, returned with the value
+!          IER = 0  if no trouble occurred, or
+!          IER = -1 if TOUT and T0 are considered too close to proceed.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (INOUT) :: H0
+        KPP_REAL, INTENT (IN) :: T0, TOUT
+        INTEGER :: IER
+        INTEGER, INTENT (IN) :: ITOL, N
+        INTEGER, INTENT (INOUT) :: NITER
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: ATOL(*), EWT(*), Y0(*)
+        KPP_REAL, INTENT (INOUT) :: TEMP(*), Y(*), YDOT(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AFI, ATOLI, DELYI, H, HG, HLB, HNEW, HRAT, HUB, T1, &
+          TDIST, TROUND, YDDNRM
+        INTEGER :: I, ITER
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, SIGN, SQRT
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVHIN
+! ..
+        NITER = 0
+        TDIST = ABS(TOUT-T0)
+        TROUND = UROUND*MAX(ABS(T0),ABS(TOUT))
+        IF (TDIST<TWO*TROUND) GOTO 40
+
+!       Set a lower bound on H based on the roundoff level in T0
+!       and TOUT.
+        HLB = HUN*TROUND
+!       Set an upper bound on H based on TOUT-T0 and the initial
+!       Y and YDOT.
+        HUB = PT1*TDIST
+        ATOLI = ATOL(1)
+        DO I = 1, N
+          IF (ITOL==2 .OR. ITOL==4) ATOLI = ATOL(I)
+          DELYI = PT1*ABS(Y0(I)) + ATOLI
+          AFI = ABS(YDOT(I))
+          IF (AFI*HUB>DELYI) HUB = DELYI/AFI
+        END DO
+!       Set initial guess for H as geometric mean of upper and
+!       lower bounds.
+        ITER = 0
+        HG = SQRT(HLB*HUB)
+!       If the bounds have crossed, exit with the mean value.
+        IF (HUB<HLB) THEN
+          H0 = HG
+          GOTO 30
+        END IF
+
+!       Looping point for iteration.
+10      CONTINUE
+!       Estimate the second derivative as a difference quotient in f.
+        H = SIGN(HG,TOUT-T0)
+        T1 = T0 + H
+        Y(1:N) = Y0(1:N) + H*YDOT(1:N)
+        CALL F(N,T1,Y,TEMP)
+        NFE = NFE + 1
+        TEMP(1:N) = (TEMP(1:N)-YDOT(1:N))/H
+        YDDNRM = DVNORM(N,TEMP,EWT)
+!       Get the corresponding new value of h.
+        IF (YDDNRM*HUB*HUB>TWO) THEN
+          HNEW = SQRT(TWO/YDDNRM)
+        ELSE
+          HNEW = SQRT(HG*HUB)
+        END IF
+        ITER = ITER + 1
+
+! Test the stopping conditions.
+! Stop if the new and previous h values differ by a factor of < 2.
+! Stop if four iterations have been done. Also, stop with previous h
+! if HNEW/HG > 2 after first iteration, as this probably means that
+! the second derivative value is bad because of cancellation error.
+
+        IF (ITER>=4) GOTO 20
+        HRAT = HNEW/HG
+        IF ((HRAT>HALF) .AND. (HRAT<TWO)) GOTO 20
+        IF ((ITER>=2) .AND. (HNEW>TWO*HG)) THEN
+          HNEW = HG
+          GOTO 20
+        END IF
+        HG = HNEW
+        GOTO 10
+
+!       Iteration done. Apply bounds, bias factor, and sign. Then exit.
+20      H0 = HNEW*HALF
+        IF (H0<HLB) H0 = HLB
+        IF (H0>HUB) H0 = HUB
+30      H0 = SIGN(H0,TOUT-T0)
+        NITER = ITER
+        IER = 0
+        RETURN
+!       Error return for TOUT - T0 too small.
+40      IER = -1
+        RETURN
+
+      END SUBROUTINE DVHIN
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY_CORE(T,K,YH,LDYH,DKY,IFLAG)
+! ..
+! Interpolate the solution and derivative.
+! ..
+! DVINDY_CORE computes interpolated values of the K-th derivative
+! of the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! The formula for DKY is:
+!              q
+!  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+!             j=K
+! where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+! The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+! communicated by PRIVATE variables. The above sum is done in reverse
+! order.
+! IFLAG is returned negative if either K or T is out of bounds.
+! Discussion above and comments in driver explain all variables.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K, LDYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DKY(*), YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: C, R, S, TFUZZ, TN1, TP
+        INTEGER :: IC, J, JB, JB2, JJ, JJ1, JP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY_CORE
+! ..
+        IFLAG = 0
+        IF (K<0 .OR. K>NQ) GOTO 40
+!       TFUZZ = HUN * UROUND * (TN + HU)
+        TFUZZ = HUN*UROUND*SIGN(ABS(TN)+ABS(HU),HU)
+        TP = TN - HU - TFUZZ
+        TN1 = TN + TFUZZ
+        IF ((T-TP)*(T-TN1)>ZERO) GOTO 50
+        S = (T-TN)/H
+        IC = 1
+        IF (K==0) GOTO 10
+        JJ1 = L - K
+        DO JJ = JJ1, NQ
+          IC = IC*JJ
+        END DO
+10      C = REAL(IC)
+        DKY(1:N) = C*YH(1:N,L)
+        IF (K==NQ) GOTO 30
+        JB2 = NQ - K
+        DO JB = 1, JB2
+          J = NQ - JB
+          JP1 = J + 1
+          IC = 1
+          IF (K==0) GOTO 20
+          JJ1 = JP1 - K
+          DO JJ = JJ1, J
+            IC = IC*JJ
+          END DO
+20        C = REAL(IC)
+          DKY(1:N) = C*YH(1:N,JP1) + S*DKY(1:N)
+        END DO
+30      R = H**(-K)
+        CALL DSCAL_F90(N,R,DKY,1)
+        RETURN
+40      MSG = 'Error in DVINDY, K(=I1) is illegal.'
+        CALL XERRDV(MSG,1360,1,1,K,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+50      MSG = 'Error in DVINDY, T(=R1) is illegal. T is not'
+        CALL XERRDV(MSG,1370,1,0,0,0,1,T,ZERO)
+        MSG = 'in interval TCUR - HU(= R1) to TCUR(=R2)'
+        CALL XERRDV(MSG,1370,1,0,0,0,2,TP,TN)
+        IFLAG = -2
+        RETURN
+
+      END SUBROUTINE DVINDY_CORE
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY_BNDS(T,K,YH,LDYH,DKY,IFLAG)
+! ..
+! Interpolate the solution and derivative and enforce nonnegativity
+! (used only if user calls DVINDY and the BOUNDS option is in
+! use).
+! ..
+! This version of DVINDY_CORE enforces nonnegativity and is called
+! only by DVINDY (which is called only by the user). It uses the
+! private YNNEG array produced by a call to DVINDY_CORE from DVINDY
+! to enforce nonnegativity.
+! DVINDY_BNDS computes interpolated values of the K-th derivative
+! of the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! The formula for DKY is:
+!              q
+!  DKY(i)  =  sum  c(j,K) * (T - TN)**(j-K) * H**(-j) * YH(i,j+1)
+!             j=K
+! where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, TN = TCUR, H = HCUR.
+! The quantities  NQ = NQCUR, L = NQ+1, N, TN, and H are
+! communicated by PRIVATE variables. The above sum is done in reverse
+! order.
+! IFLAG is returned negative if either K or T is out of bounds.
+! Discussion above and comments in driver explain all variables.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K, LDYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DKY(*), YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: C, R, S, TFUZZ, TN1, TP
+        INTEGER :: I, IC, J, JB, JB2, JJ, JJ1, JP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY_BNDS
+! ..
+        IFLAG = 0
+        IF (K==0) GOTO 50
+        IF (K<0 .OR. K>NQ) GOTO 40
+!       TFUZZ = HUN * UROUND * (TN + HU)
+        TFUZZ = HUN*UROUND*SIGN(ABS(TN)+ABS(HU),HU)
+        TP = TN - HU - TFUZZ
+        TN1 = TN + TFUZZ
+        IF ((T-TP)*(T-TN1)>ZERO) GOTO 60
+        S = (T-TN)/H
+        IC = 1
+        IF (K==0) GOTO 10
+        JJ1 = L - K
+        DO JJ = JJ1, NQ
+          IC = IC*JJ
+        END DO
+10      C = REAL(IC)
+        DKY(1:N) = C*YH(1:N,L)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (YNNEG(IDX(I))<LB(I) .OR. YNNEG(IDX(I))>UB(I)) DKY(IDX(I)) &
+              = ZERO
+          END DO
+        END IF
+        IF (K==NQ) GOTO 30
+        JB2 = NQ - K
+        DO JB = 1, JB2
+          J = NQ - JB
+          JP1 = J + 1
+          IC = 1
+          IF (K==0) GOTO 20
+          JJ1 = JP1 - K
+          DO JJ = JJ1, J
+            IC = IC*JJ
+          END DO
+20        C = REAL(IC)
+          DKY(1:N) = C*YH(1:N,JP1) + S*DKY(1:N)
+          IF (BOUNDS) THEN
+            DO I = 1, NDX
+              IF (YNNEG(IDX(I))<LB(I) .OR. YNNEG(IDX(I))>UB(I)) DKY(IDX(I)) &
+                = ZERO
+            END DO
+          END IF
+        END DO
+30      R = H**(-K)
+        CALL DSCAL_F90(N,R,DKY,1)
+        RETURN
+40      MSG = 'Error in DVINDY, K(=I1) is illegal.'
+        CALL XERRDV(MSG,1380,1,1,K,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+50      MSG = 'DVINDY_BNDS cannot be called with k = 0.'
+        CALL XERRDV(MSG,1390,1,0,0,0,0,ZERO,ZERO)
+        IFLAG = -1
+        RETURN
+60      MSG = 'Error in DVINDY, T(=R1) is illegal. T is not'
+        CALL XERRDV(MSG,1400,1,0,0,0,1,T,ZERO)
+        MSG = 'not in interval TCUR - HU(= R1) to TCUR(=R2)'
+        CALL XERRDV(MSG,1400,1,0,0,0,2,TP,TN)
+        IFLAG = -2
+        RETURN
+
+      END SUBROUTINE DVINDY_BNDS
+!_______________________________________________________________________
+
+      SUBROUTINE DVINDY(T,K,DKY,IFLAG)
+! ..
+! This is a dummy interface to allow the user to interpolate the
+! solution and the derivative (not called by DVODE_F90).
+! ..
+! May be used if the user wishes to interpolate solution or
+! derivative following a successful return from DVODE_F90
+! DVINDY computes interpolated values of the K-th derivative of
+! the dependent variable vector y, and stores it in DKY. This
+! routine is called within the package with K = 0 and T = TOUT,
+! but may also be called by the user for any K up to the current
+! order. (See detailed instructions in the usage documentation.)
+! The computed values in DKY are gotten by interpolation using the
+! Nordsieck history array YH. This array corresponds uniquely to a
+! vector-valued polynomial of degree NQCUR or less, and DKY is set
+! to the K-th derivative of this polynomial at T.
+! IFLAG is returned negative if either K or T is out of bounds.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: T
+        INTEGER, INTENT (INOUT) :: IFLAG
+        INTEGER, INTENT (IN) :: K
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DKY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IER
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, SIZE
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVINDY
+! ..
+        CALL DVINDY_CORE(T,K,RWORK(LYH),N,DKY,IFLAG)
+        IF (.NOT.BOUNDS) RETURN
+
+        IF (K==0) THEN
+!         Interpolate only the solution.
+          CALL DVINDY_CORE(T,K,RWORK(LYH),N,DKY,IFLAG)
+!         Enforce bounds.
+          DO I = 1, NDX
+            IF (DKY(IDX(I))<LB(I)) DKY(IDX(I)) = LB(I)
+            IF (DKY(IDX(I))>UB(I)) DKY(IDX(I)) = UB(I)
+          END DO
+          RETURN
+        END IF
+
+!       k > 0 - derivatives requested.
+
+!       Make sure space is available for the interpolated solution.
+        IF (ALLOCATED(YNNEG)) THEN
+          IF (SIZE(YNNEG)<N) THEN
+            DEALLOCATE (YNNEG,STAT=IER)
+            CALL CHECK_STAT(IER,460)
+            ALLOCATE (YNNEG(N),STAT=IER)
+            CALL CHECK_STAT(IER,470)
+          END IF
+        ELSE
+          ALLOCATE (YNNEG(N),STAT=IER)
+          CALL CHECK_STAT(IER,480)
+        END IF
+!       Interpolate the solution; do not enforce bounds.
+        CALL DVINDY_CORE(T,0,RWORK(LYH),N,YNNEG,IFLAG)
+!       Now interpolate the derivative using YNNEG to enforce
+!       nonnegativity.
+        CALL DVINDY_BNDS(T,K,RWORK(LYH),N,DKY,IFLAG)
+        RETURN
+
+      END SUBROUTINE DVINDY
+!_______________________________________________________________________
+
+      SUBROUTINE DVSTEP(Y,YH,LDYH,YH1,EWT,SAVF,ACOR,WM,IWM,F,JAC, &
+        VNLS,ATOL,ITOL)
+! ..
+! This is the core step integrator for nonstiff and for dense, banded,
+! and sparse solutions.
+! ..
+! DVSTEP performs one step of the integration of an initial value
+! problem for a system of ordinary differential equations. It
+! calls subroutine DVNLSD for the solution of the nonlinear system
+! arising in the time step. Thus it is independent of the problem
+! Jacobian structure and the type of nonlinear system solution method.
+! DVSTEP returns a completion flag KFLAG (in PRIVATE variables block).
+! A return with KFLAG = -1 or -2 means either ABS(H) = HMIN or 10
+! consecutive failures occurred. On a return with KFLAG negative,
+! the values of TN and the YH array are as of the beginning of the last
+! step, and H is the last step size attempted.
+! Communication with DVSTEP is done with the following variables:
+! Y      = An array of length N used for the dependent variable vector.
+! YH     = An LDYH by LMAX array containing the dependent variables
+!          and their approximate scaled derivatives, where
+!          LMAX = MAXORD + 1. YH(i,j+1) contains the approximate
+!          j-th derivative of y(i), scaled by H**j/factorial(j)
+!          (j = 0,1,...,NQ). On entry for the first step, the first
+!          two columns of YH must be set from the initial values.
+! LDYH   = A constant integer >= N, the first dimension of YH.
+!          N is the number of ODEs in the system.
+! YH1    = A one-dimensional array occupying the same space as YH.
+! EWT    = An array of length N containing multiplicative weights
+!          for local error measurements. Local errors in y(i) are
+!          compared to 1.0/EWT(i) in various error tests.
+! SAVF   = An array of working storage, of length N.
+!          also used for input of YH(*,MAXORD+2) when JSTART = -1
+!          and MAXORD < the current order NQ.
+! ACOR   = A work array of length N, used for the accumulated
+!          corrections. On a successful return, ACOR(i) contains
+!          the estimated one-step local error in y(i).
+! WM,IWM = Real and integer work arrays associated with matrix
+!          operations in DVNLSD.
+! F      = Dummy name for the user supplied subroutine for f.
+! JAC    = Dummy name for the user supplied Jacobian subroutine.
+! DVNLSD = Dummy name for the nonlinear system solving subroutine,
+!          whose real name is dependent on the method used.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: LDYH, ITOL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*), YH1(*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC, VNLS
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CNQUOT, DDN, DSM, DUP, ETAQ, ETAQM1, ETAQP1, FLOTL, R, &
+          TOLD
+        INTEGER :: I, I1, I2, IBACK, J, JB, NCF, NFLAG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSTEP
+! ..
+        KFLAG = 0
+        TOLD = TN
+        NCF = 0
+        JCUR = 0
+        NFLAG = 0
+        IF (JSTART>0) GOTO 10
+        IF (JSTART==-1) GOTO 30
+
+! On the first call, the order is set to 1, and other variables are
+! initialized. ETAMAX is the maximum ratio by which H can be increased
+! in a single step. It is normally 10, but is larger during the first
+! step to compensate for the small initial H. If a failure occurs
+! (in corrector convergence or error test), ETAMAX is set to 1 for
+! the next increase.
+
+        LMAX = MAXORD + 1
+        NQ = 1
+        L = 2
+        NQNYH = NQ*LDYH
+        TAU(1) = H
+        PRL1 = ONE
+        RC = ZERO
+        ETAMAX = ETAMX1
+        NQWAIT = 2
+        HSCAL = H
+        GOTO 70
+
+! Take preliminary actions on a normal continuation step (JSTART > 0).
+! If the driver changed H, then ETA must be reset and NEWH set to 1.
+! If a change of order was dictated on the previous step, then it is
+! done here and appropriate adjustments in the history are made.
+! On an order decrease, the history array is adjusted by DVJUST.
+! On an order increase, the history array is augmented by a column.
+! On a change of step size H, the history array YH is rescaled.
+
+10      CONTINUE
+        IF (KUTH==1) THEN
+          ETA = MIN(ETA,H/HSCAL)
+          NEWH = 1
+        END IF
+20      IF (NEWH==0) GOTO 70
+        IF (NEWQ==NQ) GOTO 60
+        IF (NEWQ<NQ) THEN
+          CALL DVJUST(YH,LDYH,-1)
+          NQ = NEWQ
+          L = NQ + 1
+          NQWAIT = L
+          GOTO 60
+        END IF
+        IF (NEWQ>NQ) THEN
+          CALL DVJUST(YH,LDYH,1)
+          NQ = NEWQ
+          L = NQ + 1
+          NQWAIT = L
+          GOTO 60
+        END IF
+
+! The following block handles preliminaries needed when JSTART = -1.
+! If N was reduced, zero out part of YH to avoid undefined references.
+! If MAXORD was reduced to a value less than the tentative order NEWQ,
+! then NQ is set to MAXORD, and a new H ratio ETA is chosen.
+! Otherwise, we take the same preliminary actions as for JSTART > 0.
+! In any case, NQWAIT is reset to L = NQ + 1 to prevent further
+! changes in order for that many steps. The new H ratio ETA is
+! limited by the input H if KUTH = 1, by HMIN if KUTH = 0, and by
+! HMXI in any case. Finally, the history array YH is rescaled.
+
+30      CONTINUE
+        LMAX = MAXORD + 1
+        IF (N==LDYH) GOTO 40
+        I1 = 1 + (NEWQ+1)*LDYH
+        I2 = (MAXORD+1)*LDYH
+        IF (I1>I2) GOTO 40
+        YH1(I1:I2) = ZERO
+40      IF (NEWQ<=MAXORD) GOTO 50
+        FLOTL = REAL(LMAX)
+        IF (MAXORD<NQ-1) THEN
+          DDN = DVNORM(N,SAVF,EWT)/TQ(1)
+          ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL)+ADDON)
+        END IF
+        IF (MAXORD==NQ .AND. NEWQ==NQ+1) ETA = ETAQ
+        IF (MAXORD==NQ-1 .AND. NEWQ==NQ+1) THEN
+          ETA = ETAQM1
+          CALL DVJUST(YH,LDYH,-1)
+        END IF
+        IF (MAXORD==NQ-1 .AND. NEWQ==NQ) THEN
+          DDN = DVNORM(N,SAVF,EWT)/TQ(1)
+          ETA = ONE/((BIAS1*DDN)**(ONE/FLOTL)+ADDON)
+          CALL DVJUST(YH,LDYH,-1)
+        END IF
+        ETA = MIN(ETA,ONE)
+        NQ = MAXORD
+        L = LMAX
+50      IF (KUTH==1) ETA = MIN(ETA,ABS(H/HSCAL))
+        IF (KUTH==0) ETA = MAX(ETA,HMIN/ABS(HSCAL))
+        ETA = ETA/MAX(ONE,ABS(HSCAL)*HMXI*ETA)
+        NEWH = 1
+        NQWAIT = L
+        IF (NEWQ<=MAXORD) GOTO 20
+!       Rescale the history array for a change in H by a factor of ETA.
+60      R = ONE
+        DO J = 2, L
+          R = R*ETA
+! Original:
+!         CALL DSCAL_F90(N,R,YH(1,J),1)
+          CALL DSCAL_F90(N,R,YH(1:N,J),1)
+        END DO
+        H = HSCAL*ETA
+        HSCAL = H
+        RC = RC*ETA
+        NQNYH = NQ*LDYH
+
+! This section computes the predicted values by effectively
+! multiplying the YH array by the Pascal triangle matrix.
+! DVSET is called to calculate all integration coefficients.
+! RC is the ratio of new to old values of the coefficient
+! H/EL(2)=h/l1.
+
+70      TN = TN + H
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) + YH1(I+LDYH)
+          END DO
+        END DO
+        CALL DVSET
+        RL1 = ONE/EL(2)
+        RC = RC*(RL1/PRL1)
+        PRL1 = RL1
+
+!       Call the nonlinear system solver.
+
+        CALL VNLS(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC,NFLAG, &
+          ATOL,ITOL)
+
+        IF (NFLAG==0) GOTO 80
+
+! The DVNLSD routine failed to achieve convergence (NFLAG /= 0).
+! The YH array is retracted to its values before prediction.
+! The step size H is reduced and the step is retried, if possible.
+! Otherwise, an error exit is taken.
+
+        NCF = NCF + 1
+        NCFN = NCFN + 1
+        ETAMAX = ONE
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) - YH1(I+LDYH)
+          END DO
+        END DO
+        IF (NFLAG<-1) GOTO 240
+        IF (ABS(H)<=HMIN*ONEPSM) GOTO 230
+!       IF (NCF==MXNCF) GOTO 230
+        IF (NCF==CONSECUTIVE_CFAILS) GOTO 230
+        ETA = ETACF
+        ETA = MAX(ETA,HMIN/ABS(H))
+        NFLAG = -1
+        GOTO 60
+
+! The corrector has converged (NFLAG = 0). The local error test is
+! made and control passes to statement 500 if it fails.
+
+80      CONTINUE
+        DSM = ACNRM/TQ(2)
+        IF (DSM>ONE) GOTO 100
+
+! After a successful step, update the YH and TAU arrays and decrement
+! NQWAIT. If NQWAIT is then 1 and NQ < MAXORD, then ACOR is saved
+! for use in a possible order increase on the next step.
+! If ETAMAX = 1 (a failure occurred this step), keep NQWAIT >= 2.
+
+        KFLAG = 0
+        NST = NST + 1
+        HU = H
+        NQU = NQ
+        DO IBACK = 1, NQ
+          I = L - IBACK
+          TAU(I+1) = TAU(I)
+        END DO
+        TAU(1) = H
+
+        IF (BOUNDS) THEN
+! Original:
+!         CALL DAXPY_F90(N,EL(1),ACOR,1,YH(1,1),1)
+!         CALL DAXPY_F90(N,EL(2),ACOR,1,YH(1,2),1)
+          CALL DAXPY_F90(N,EL(1),ACOR,1,YH(1:N,1),1)
+          CALL DAXPY_F90(N,EL(2),ACOR,1,YH(1:N,2),1)
+!         Take care of roundoff causing y(t) to be slightly unequal
+!         to the constraint bound.
+          DO J = 1, NDX
+            YH(IDX(J),1) = MAX(YH(IDX(J),1),LB(J))
+            Y(IDX(J)) = MAX(Y(IDX(J)),LB(J))
+            YH(IDX(J),1) = MIN(YH(IDX(J),1),UB(J))
+            Y(IDX(J)) = MIN(Y(IDX(J)),UB(J))
+          END DO
+!         Update the higher derivatives and project to zero if necessary.
+          IF (L>2) THEN
+            DO J = 3, L
+! Original:
+!             CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1,J),1)
+              CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1:N,J),1)
+            END DO
+          END IF
+        ELSE
+!         Proceed as usual.
+          DO J = 1, L
+! Original:
+!           CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1,J),1)
+            CALL DAXPY_F90(N,EL(J),ACOR,1,YH(1:N,J),1)
+          END DO
+        END IF
+
+        NQWAIT = NQWAIT - 1
+        IF ((L==LMAX) .OR. (NQWAIT/=1)) GOTO 90
+! Original:
+!       CALL DCOPY_F90(N,ACOR,1,YH(1,LMAX),1)
+        CALL DCOPY_F90(N,ACOR,1,YH(1:N,LMAX),1)
+        CONP = TQ(5)
+90      IF (ABS(ETAMAX-ONE)>0) GOTO 130
+        IF (NQWAIT<2) NQWAIT = 2
+        NEWQ = NQ
+        NEWH = 0
+        ETA = ONE
+        HNEW = H
+        GOTO 250
+
+! The error test failed. KFLAG keeps track of multiple failures.
+! Restore TN and the YH array to their previous values, and prepare
+! to try the step again. Compute the optimum step size for the
+! same order. After repeated failures, H is forced to decrease
+! more rapidly.
+
+100     KFLAG = KFLAG - 1
+        NETF = NETF + 1
+        NFLAG = -2
+        TN = TOLD
+        I1 = NQNYH + 1
+        DO JB = 1, NQ
+          I1 = I1 - LDYH
+          DO I = I1, NQNYH
+            YH1(I) = YH1(I) - YH1(I+LDYH)
+          END DO
+        END DO
+        IF (ABS(H)<=HMIN*ONEPSM) GOTO 220
+        ETAMAX = ONE
+        IF (KFLAG<=KFC) GOTO 110
+!       Compute ratio of new H to current H at the current order.
+        FLOTL = REAL(L)
+        ETA = ONE/((BIAS2*DSM)**(ONE/FLOTL)+ADDON)
+        ETA = MAX(ETA,HMIN/ABS(H),ETAMIN)
+        IF ((KFLAG<=-2) .AND. (ETA>ETAMXF)) ETA = ETAMXF
+        GOTO 60
+
+! Control reaches this section if 3 or more consecutive failures
+! have occurred. It is assumed that the elements of the YH array
+! have accumulated errors of the wrong order. The order is reduced
+! by one, if possible. Then H is reduced by a factor of 0.1 and
+! the step is retried. After a total of 7 consecutive failures,
+! an exit is taken with KFLAG = -1.
+
+!110     IF (KFLAG==KFH) GOTO 220
+110     IF (KFLAG==CONSECUTIVE_EFAILS) GOTO 220
+        IF (NQ==1) GOTO 120
+        ETA = MAX(ETAMIN,HMIN/ABS(H))
+        CALL DVJUST(YH,LDYH,-1)
+        L = NQ
+        NQ = NQ - 1
+        NQWAIT = L
+        GOTO 60
+120     ETA = MAX(ETAMIN,HMIN/ABS(H))
+        H = H*ETA
+        HSCAL = H
+        TAU(1) = H
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        YH(1:N,2) = H*SAVF(1:N)
+        NQWAIT = 10
+        GOTO 70
+
+! If NQWAIT = 0, an increase or decrease in order by one is considered.
+! Factors ETAQ, ETAQM1, ETAQP1 are computed by which H could be
+! multiplied at order q, q-1, or q+1, respectively. The largest of
+! these is determined, and the new order and step size set accordingly.
+! A change of H or NQ is made only if H increases by at least a factor
+! of THRESH. If an order change is considered and rejected, then NQWAIT
+! is set to 2 (reconsider it after 2 steps).
+
+!       Compute ratio of new H to current H at the current order.
+130     FLOTL = REAL(L)
+        ETAQ = ONE/((BIAS2*DSM)**(ONE/FLOTL)+ADDON)
+        IF (NQWAIT/=0) GOTO 170
+        NQWAIT = 2
+        ETAQM1 = ZERO
+        IF (NQ==1) GOTO 140
+!       Compute ratio of new H to current H at the current order
+!       less one.
+! Original:
+!       DDN = DVNORM(N,YH(1,L),EWT)/TQ(1)
+        DDN = DVNORM(N,YH(1:N,L),EWT)/TQ(1)
+        ETAQM1 = ONE/((BIAS1*DDN)**(ONE/(FLOTL-ONE))+ADDON)
+140     ETAQP1 = ZERO
+        IF (L==LMAX) GOTO 150
+!       Compute ratio of new H to current H at current order plus one.
+        CNQUOT = (TQ(5)/CONP)*(H/TAU(2))**L
+        SAVF(1:N) = ACOR(1:N) - CNQUOT*YH(1:N,LMAX)
+        DUP = DVNORM(N,SAVF,EWT)/TQ(3)
+        ETAQP1 = ONE/((BIAS3*DUP)**(ONE/(FLOTL+ONE))+ADDON)
+150     IF (ETAQ>=ETAQP1) GOTO 160
+        IF (ETAQP1>ETAQM1) GOTO 190
+        GOTO 180
+160     IF (ETAQ<ETAQM1) GOTO 180
+170     ETA = ETAQ
+        NEWQ = NQ
+        GOTO 200
+180     ETA = ETAQM1
+        NEWQ = NQ - 1
+        GOTO 200
+190     ETA = ETAQP1
+        NEWQ = NQ + 1
+! Original:
+!       CALL DCOPY_F90(N,ACOR,1,YH(1,LMAX),1)
+        CALL DCOPY_F90(N,ACOR,1,YH(1:N,LMAX),1)
+!       Test tentative new H against THRESH, ETAMAX, and HMXI and
+!       then exit.
+200     IF (ETA<THRESH .OR. ABS(ETAMAX-ONE)<=ZERO) GOTO 210
+        ETA = MIN(ETA,ETAMAX)
+        ETA = ETA/MAX(ONE,ABS(H)*HMXI*ETA)
+        NEWH = 1
+        HNEW = H*ETA
+        GOTO 250
+210     NEWQ = NQ
+        NEWH = 0
+        ETA = ONE
+        HNEW = H
+        GOTO 250
+
+! All returns are made through this section.
+! On a successful return, ETAMAX is reset and ACOR is scaled.
+
+220     KFLAG = -1
+        GOTO 260
+230     KFLAG = -2
+        GOTO 260
+240     IF (NFLAG==-2) KFLAG = -3
+        IF (NFLAG==-3) KFLAG = -4
+        GOTO 260
+250     ETAMAX = ETAMX3
+        IF (NST<=10) ETAMAX = ETAMX2
+        R = ONE/TQ(2)
+
+        CALL DSCAL_F90(N,R,ACOR,1)
+260     JSTART = 1
+        RETURN
+
+      END SUBROUTINE DVSTEP
+!_______________________________________________________________________
+
+      SUBROUTINE DVSET
+! ..
+! Set the integration coefficients for DVSTEP.
+! ..
+! For each order NQ, the coefficients in EL are calculated by use
+! of the generating polynomial lambda(x), with coefficients EL(i).
+!      lambda(x) = EL(1) + EL(2)*x + ... + EL(NQ+1)*(x**NQ).
+! For the backward differentiation formulas,
+!                                     NQ-1
+!      lambda(x) = (1 + x/xi*(NQ)) * product (1 + x/xi(i)) .
+!                                     i = 1
+! For the Adams formulas,
+!                              NQ-1
+!      (d/dx) lambda(x) = c * product (1 + x/xi(i)),
+!                              i = 1
+!      lambda(-1) = 0,    lambda(0) = 1,
+! where c is a normalization constant.
+! In both cases, xi(i) is defined by
+!      H*xi(i) = t sub n - t sub (n-i)
+!              = H + TAU(1) + TAU(2) + ... TAU(i-1).
+! In addition to variables described previously, communication
+! with DVSET uses the following:
+!   TAU    = A vector of length 13 containing the past NQ values
+!            of H.
+!   EL     = A vector of length 13 in which vset stores the
+!            coefficients for the corrector formula.
+!   TQ     = A vector of length 5 in which vset stores constants
+!            used for the convergence test, the error test, and the
+!            selection of H at a new order.
+!   METH   = The basic method indicator.
+!   NQ     = The current order.
+!   L      = NQ + 1, the length of the vector stored in EL, and
+!            the number of columns of the YH array being used.
+!   NQWAIT = A counter controlling the frequency of order changes.
+!            An order change is about to be considered if NQWAIT = 1.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AHATN0, ALPH0, CNQM1, CSUM, ELP, EM0, FLOTI, FLOTL, &
+          FLOTNQ, HSUM, RXI, RXIS, S, T1, T2, T3, T4, T5, T6, XI
+        INTEGER :: I, IBACK, J, JP1, NQM1, NQM2
+! ..
+! .. Local Arrays ..
+        KPP_REAL :: EM(13)
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSET
+! ..
+        FLOTL = REAL(L)
+        NQM1 = NQ - 1
+        NQM2 = NQ - 2
+        GOTO (10,40) METH
+
+!       Set coefficients for Adams methods.
+10      IF (NQ/=1) GOTO 20
+        EL(1) = ONE
+        EL(2) = ONE
+        TQ(1) = ONE
+        TQ(2) = TWO
+        TQ(3) = SIX*TQ(2)
+        TQ(5) = ONE
+        GOTO 60
+20      HSUM = H
+        EM(1) = ONE
+        FLOTNQ = FLOTL - ONE
+        EM(2:L) = ZERO
+        DO J = 1, NQM1
+          IF ((J/=NQM1) .OR. (NQWAIT/=1)) GOTO 30
+          S = ONE
+          CSUM = ZERO
+          DO I = 1, NQM1
+            CSUM = CSUM + S*EM(I)/REAL(I+1)
+            S = -S
+          END DO
+          TQ(1) = EM(NQM1)/(FLOTNQ*CSUM)
+30        RXI = H/HSUM
+          DO IBACK = 1, J
+            I = (J+2) - IBACK
+            EM(I) = EM(I) + EM(I-1)*RXI
+          END DO
+          HSUM = HSUM + TAU(J)
+        END DO
+!       Compute integral from -1 to 0 of polynomial and of x times it.
+        S = ONE
+        EM0 = ZERO
+        CSUM = ZERO
+        DO I = 1, NQ
+          FLOTI = REAL(I)
+          EM0 = EM0 + S*EM(I)/FLOTI
+          CSUM = CSUM + S*EM(I)/(FLOTI+ONE)
+          S = -S
+        END DO
+!       In EL, form coefficients of normalized integrated polynomial.
+        S = ONE/EM0
+        EL(1) = ONE
+        DO I = 1, NQ
+          EL(I+1) = S*EM(I)/REAL(I)
+        END DO
+        XI = HSUM/H
+        TQ(2) = XI*EM0/CSUM
+        TQ(5) = XI/EL(L)
+        IF (NQWAIT/=1) GOTO 60
+!       For higher order control constant, multiply polynomial by
+!       1+x/xi(q).
+        RXI = ONE/XI
+        DO IBACK = 1, NQ
+          I = (L+1) - IBACK
+          EM(I) = EM(I) + EM(I-1)*RXI
+        END DO
+!       Compute integral of polynomial.
+        S = ONE
+        CSUM = ZERO
+        DO I = 1, L
+          CSUM = CSUM + S*EM(I)/REAL(I+1)
+          S = -S
+        END DO
+        TQ(3) = FLOTL*EM0/CSUM
+        GOTO 60
+
+!       Set coefficients for BDF methods.
+40      EL(3:L) = ZERO
+        EL(1) = ONE
+        EL(2) = ONE
+        ALPH0 = -ONE
+        AHATN0 = -ONE
+        HSUM = H
+        RXI = ONE
+        RXIS = ONE
+        IF (NQ==1) GOTO 50
+        DO J = 1, NQM2
+!       In EL, construct coefficients of (1+x/xi(1))*...*(1+x/xi(j+1)).
+          HSUM = HSUM + TAU(J)
+          RXI = H/HSUM
+          JP1 = J + 1
+          ALPH0 = ALPH0 - ONE/REAL(JP1)
+          DO IBACK = 1, JP1
+            I = (J+3) - IBACK
+            EL(I) = EL(I) + EL(I-1)*RXI
+          END DO
+        END DO
+        ALPH0 = ALPH0 - ONE/REAL(NQ)
+        RXIS = -EL(2) - ALPH0
+        HSUM = HSUM + TAU(NQM1)
+        RXI = H/HSUM
+        AHATN0 = -EL(2) - RXI
+        DO IBACK = 1, NQ
+          I = (NQ+2) - IBACK
+          EL(I) = EL(I) + EL(I-1)*RXIS
+        END DO
+50      T1 = ONE - AHATN0 + ALPH0
+        T2 = ONE + REAL(NQ)*T1
+        TQ(2) = ABS(ALPH0*T2/T1)
+        TQ(5) = ABS(T2/(EL(L)*RXI/RXIS))
+        IF (NQWAIT/=1) GOTO 60
+        CNQM1 = RXIS/EL(L)
+        T3 = ALPH0 + ONE/REAL(NQ)
+        T4 = AHATN0 + RXI
+        ELP = T3/(ONE-T4+T3)
+        TQ(1) = ABS(ELP/CNQM1)
+        HSUM = HSUM + TAU(NQ)
+        RXI = H/HSUM
+        T5 = ALPH0 - ONE/REAL(NQ+1)
+        T6 = AHATN0 - RXI
+        ELP = T2/(ONE-T6+T5)
+        TQ(3) = ABS(ELP*RXI*(FLOTL+ONE)*T5)
+60      TQ(4) = CORTES*TQ(2)
+        RETURN
+
+      END SUBROUTINE DVSET
+!_______________________________________________________________________
+
+      SUBROUTINE DVJUST(YH,LDYH,IORD)
+! ..
+! Adjust the Nordsieck array.
+! ..
+! This subroutine adjusts the YH array on reduction of order, and
+! also when the order is increased for the stiff option (METH = 2).
+! Communication with DVJUST uses the following:
+! IORD  = An integer flag used when METH = 2 to indicate an order
+!         increase (IORD = +1) or an order decrease (IORD = -1).
+! HSCAL = Step size H used in scaling of Nordsieck array YH.
+!         (If IORD = +1, DVJUST assumes that HSCAL = TAU(1).)
+! See References 1 and 2 for details.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: IORD, LDYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: YH(LDYH,*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ALPH0, ALPH1, HSUM, PROD, T1, XI, XIOLD
+        INTEGER :: I, IBACK, J, JP1, LP1, NQM1, NQM2, NQP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJUST
+! ..
+        IF ((NQ==2) .AND. (IORD/=1)) RETURN
+        NQM1 = NQ - 1
+        NQM2 = NQ - 2
+        GOTO (10,30) METH
+
+!       Nonstiff option.
+
+!       Check to see if the order is being increased or decreased.
+10      CONTINUE
+        IF (IORD==1) GOTO 20
+!       Order decrease.
+        EL(1:LMAX) = ZERO
+        EL(2) = ONE
+        HSUM = ZERO
+        DO J = 1, NQM2
+!         Construct coefficients of x*(x+xi(1))*...*(x+xi(j)).
+          HSUM = HSUM + TAU(J)
+          XI = HSUM/HSCAL
+          JP1 = J + 1
+          DO IBACK = 1, JP1
+            I = (J+3) - IBACK
+            EL(I) = EL(I)*XI + EL(I-1)
+          END DO
+        END DO
+!       Construct coefficients of integrated polynomial.
+        DO J = 2, NQM1
+          EL(J+1) = REAL(NQ)*EL(J)/REAL(J)
+        END DO
+!       Subtract correction terms from YH array.
+        DO J = 3, NQ
+          DO I = 1, N
+            YH(I,J) = YH(I,J) - YH(I,L)*EL(J)
+          END DO
+        END DO
+        RETURN
+!       Order increase.
+!       Zero out next column in YH array.
+20      CONTINUE
+        LP1 = L + 1
+        YH(1:N,LP1) = ZERO
+        RETURN
+
+!       Stiff option.
+
+!       Check to see if the order is being increased or decreased.
+30      CONTINUE
+        IF (IORD==1) GOTO 40
+!       Order decrease.
+        EL(1:LMAX) = ZERO
+        EL(3) = ONE
+        HSUM = ZERO
+        DO J = 1, NQM2
+!     Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)).
+          HSUM = HSUM + TAU(J)
+          XI = HSUM/HSCAL
+          JP1 = J + 1
+          DO IBACK = 1, JP1
+            I = (J+4) - IBACK
+            EL(I) = EL(I)*XI + EL(I-1)
+          END DO
+        END DO
+!       Subtract correction terms from YH array.
+        DO J = 3, NQ
+          YH(1:N,J) = YH(1:N,J) - YH(1:N,L)*EL(J)
+        END DO
+        RETURN
+!       Order increase.
+40      EL(1:LMAX) = ZERO
+        EL(3) = ONE
+        ALPH0 = -ONE
+        ALPH1 = ONE
+        PROD = ONE
+        XIOLD = ONE
+        HSUM = HSCAL
+        IF (NQ==1) GOTO 50
+        DO J = 1, NQM1
+!       Construct coefficients of x*x*(x+xi(1))*...*(x+xi(j)).
+          JP1 = J + 1
+          HSUM = HSUM + TAU(JP1)
+          XI = HSUM/HSCAL
+          PROD = PROD*XI
+          ALPH0 = ALPH0 - ONE/REAL(JP1)
+          ALPH1 = ALPH1 + ONE/XI
+          DO IBACK = 1, JP1
+            I = (J+4) - IBACK
+            EL(I) = EL(I)*XIOLD + EL(I-1)
+          END DO
+          XIOLD = XI
+        END DO
+50      CONTINUE
+        T1 = (-ALPH0-ALPH1)/PROD
+!       Load column L+1 in YH array.
+        LP1 = L + 1
+        YH(1:N,LP1) = T1*YH(1:N,LMAX)
+!       Add correction terms to YH array.
+        NQP1 = NQ + 1
+        DO J = 3, NQP1
+! Original:
+!         CALL DAXPY_F90(N,EL(J),YH(1,LP1),1,YH(1,J),1)
+          CALL DAXPY_F90(N,EL(J),YH(1:N,LP1),1,YH(1:N,J),1)
+        END DO
+        RETURN
+
+      END SUBROUTINE DVJUST
+!_______________________________________________________________________
+
+      SUBROUTINE DVNLSD(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC,NFLAG,&
+        ATOL,ITOL)
+! ..
+! This is the nonlinear system solver for dense and banded solutions.
+! ..
+! Subroutine DVNLSD is a nonlinear system solver which uses functional
+! iteration or a chord (modified Newton) method. For the chord method
+! direct linear algebraic system solvers are used. Subroutine DVNLSD
+! then handles the corrector phase of this integration package.
+! Communication with DVNLSD is done with the following variables. (For
+! more details, please see the comments in the driver subroutine.)
+! Y          = The dependent variable, a vector of length N, input.
+! YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+!              and output. On input, it contains predicted values.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! SAVF       = A work array of length N.
+! EWT        = An error weight vector of length N, input.
+! ACOR       = A work array of length N, used for the accumulated
+!              corrections to the predicted y vector.
+! WM,IWM     = Real and integer work arrays associated with matrix
+!              operations in chord iteration (MITER /= 0).
+! F          = Dummy name for user supplied routine for f.
+! JAC        = Dummy name for user supplied Jacobian routine.
+! NFLAG      = Input/output flag, with values and meanings as follows:
+!              INPUT
+!                  0 first call for this time step.
+!                 -1 convergence failure in previous call to DVNLSD.
+!                 -2 error test failure in DVSTEP.
+!              OUTPUT
+!                  0 successful completion of nonlinear solver.
+!                 -1 convergence failure or singular matrix.
+!                 -2 unrecoverable error in matrix preprocessing
+!                    (cannot occur here).
+!                 -3 unrecoverable error in solution (cannot occur
+!                    here).
+! IPUP       = Own variable flag with values and meanings as follows:
+!              0,          do not update the Newton matrix.
+!              MITER /= 0  update Newton matrix, because it is the
+!                          initial step, order was changed, the error
+!                          test failed, or an update is indicated by
+!                          the scalar RC or step counter NST.
+! For more details, see comments in driver subroutine.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, LDYH
+        INTEGER, INTENT (INOUT) :: NFLAG
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACNRMNEW, CSCALE, DCON, DEL, DELP
+        INTEGER :: I, IERPJ, IERSL, M
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNLSD
+! ..
+! On the first step, on a change of method order, or after a
+! nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+! to force a Jacobian update when MITER /= 0.
+        IF (JSTART==0) NSLP = 0
+        IF (NFLAG==0) ICF = 0
+        IF (NFLAG==-2) IPUP = MITER
+        IF ((JSTART==0) .OR. (JSTART==-1)) IPUP = MITER
+!     If this is functional iteration, set CRATE = 1 and drop to 220
+        IF (MITER==0) THEN
+          CRATE = ONE
+          GOTO 10
+        END IF
+
+! RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER to
+! force DVJAC to be called, if a Jacobian is involved. In any case,
+! DVJAC is called at least every MSBP steps.
+
+        DRC = ABS(RC-ONE)
+        IF (DRC>CCMAX .OR. NST>=NSLP+MSBP) IPUP = MITER
+
+! Up to MAXCOR corrector iterations are taken. A convergence test is
+! made on the r.m.s. norm of each correction, weighted by the error
+! weight vector EWT. The sum of the corrections is accumulated in the
+! vector ACOR(i). The YH array is not altered in the corrector loop.
+
+10      M = 0
+        DELP = ZERO
+! Original:
+!       CALL DCOPY_F90(N,YH(1,1),1,Y,1)
+        CALL DCOPY_F90(N,YH(1:N,1),1,Y(1:N),1)
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+               MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+               MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        IF (IPUP<=0) GOTO 20
+
+! If indicated, the matrix P = I - h*rl1*J is reevaluated and
+! preprocessed before starting the corrector iteration. IPUP
+! is set to 0 as an indicator that this has been done.
+
+        CALL DVJAC(Y,YH,LDYH,EWT,ACOR,SAVF,WM,IWM,F,JAC,IERPJ, &
+          ATOL,ITOL)
+        IPUP = 0
+        RC = ONE
+        DRC = ZERO
+        CRATE = ONE
+        NSLP = NST
+!       If matrix is singular, take error return to force cut in
+!       step size.
+        IF (IERPJ/=0) GOTO 70
+20      ACOR(1:N) = ZERO
+!       This is a looping point for the corrector iteration.
+30      IF (MITER/=0) GOTO 40
+
+! In the case of functional iteration, update Y directly from
+! the result of the last function evaluation.
+
+        SAVF(1:N) = RL1*(H*SAVF(1:N)-YH(1:N,2))
+        Y(1:N) = SAVF(1:N) - ACOR(1:N)
+        DEL = DVNORM(N,Y,EWT)
+        Y(1:N) = YH(1:N,1) + SAVF(1:N)
+        CALL DCOPY_F90(N,SAVF,1,ACOR,1)
+        GOTO 50
+
+! In the case of the chord method, compute the corrector error, and
+! solve the linear system with that as right-hand side and P as
+! coefficient matrix. The correction is scaled by the factor
+! 2/(1+RC) to account for changes in h*rl1 since the last DVJAC call.
+
+40      Y(1:N) = (RL1*H)*SAVF(1:N) - (RL1*YH(1:N,2)+ACOR(1:N))
+        CALL DVSOL(WM,IWM,Y,IERSL)
+        NNI = NNI + 1
+        IF (IERSL>0) GOTO 60
+        IF (METH==2 .AND. ABS(RC-ONE)>ZERO) THEN
+          CSCALE = TWO/(ONE+RC)
+          CALL DSCAL_F90(N,CSCALE,Y,1)
+        END IF
+        DEL = DVNORM(N,Y,EWT)
+        CALL DAXPY_F90(N,ONE,Y,1,ACOR,1)
+        Y(1:N) = YH(1:N,1) + ACOR(1:N)
+
+! Test for convergence. If M > 0, an estimate of the convergence
+! rate constant is stored in CRATE, and this is used in the test.
+
+50      IF (M/=0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+        DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+        IF (DCON<=ONE) GOTO 80
+        M = M + 1
+        IF (M==MAXCOR) GOTO 60
+        IF (M>=2 .AND. DEL>RDIV*DELP) GOTO 60
+        DELP = DEL
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+               MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+               MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        GOTO 30
+
+60      IF (MITER==0 .OR. JCUR==1) GOTO 70
+        ICF = 1
+        IPUP = MITER
+        GOTO 10
+
+70      CONTINUE
+        NFLAG = -1
+        ICF = 2
+        IPUP = MITER
+        RETURN
+
+!       Return for successful step.
+80      CONTINUE
+
+!       Enforce bounds.
+        IF (BOUNDS) THEN
+          CHANGED_ACOR = .FALSE.
+          IF (M==0) THEN
+            ACNRM = DEL
+          ELSE
+            ACNRM = DVNORM(N,ACOR,EWT)
+          END IF
+          IF (MITER/=0) THEN
+!           Since Y(:) = YH(:,1) + ACOR(:) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+              IF (Y(IDX(I))>UB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+            END DO
+          ELSE
+!           Since Y(:) = YH(:,1) + SAVF(:) and
+!           since CALL DCOPY_F90(N,SAVF,1,ACOR,1) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+              END IF
+              IF (Y(IDX(I))>UB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+              END IF
+            END DO
+          END IF
+          IF (CHANGED_ACOR) THEN
+            IF (M==0) THEN
+              ACNRMNEW = DEL
+            ELSE
+              ACNRMNEW = DVNORM(N,ACOR,EWT)
+            END IF
+!           ACNRM = ACNRMNEW
+            ACNRM = MAX(ACNRM,ACNRMNEW)
+          ELSE
+          END IF
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+        ELSE
+!         No projections are required.
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+          IF (M==0) ACNRM = DEL
+          IF (M>0) ACNRM = DVNORM(N,ACOR,EWT)
+        END IF
+        RETURN
+
+      END SUBROUTINE DVNLSD
+!_______________________________________________________________________
+
+      SUBROUTINE DVJAC(Y,YH,LDYH,EWT,FTEM,SAVF,WM,IWM,F,JAC,IERPJ, &
+        ATOL,ITOL)
+! ..
+! Compute and process the matrix P = I - h*rl1*J, where J is an
+! approximation to the Jacobian for dense and banded solutions.
+! ..
+! This is a version of DVJAC that allows use of the known nonzero
+! diagonals if it is available.
+! DVJAC is called by DVNLSD to compute and process the matrix
+! P = I - h*rl1*J, where J is an approximation to the Jacobian.
+! Here J is computed by the user-supplied routine JAC if
+! MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.
+! If MITER = 3, a diagonal approximation to J is used.
+! If JSV = -1, J is computed from scratch in all cases.
+! If JSV = 1 and MITER = 1, 2, 4, or 5, and if the saved value of J is
+! considered acceptable, then P is constructed from the saved J.
+! J is stored in wm and replaced by P. If MITER /= 3, P is then
+! subjected to LU decomposition in preparation for later solution
+! of linear systems with P as coefficient matrix. This is done
+! by DGEFA_F90 if MITER = 1 or 2, and by DGBFA_F90 if MITER = 4 or 5.
+! Communication with DVJAC is done with the following variables.
+! (For more details, please see the comments in the driver subroutine.)
+! Y          = Vector containing predicted values on entry.
+! YH         = The Nordsieck array, an LDYH by LMAX array, input.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! EWT        = An error weight vector of length N.
+! SAVF       = Array containing f evaluated at predicted y, input.
+! WM         = Real work space for matrices. In the output, it contains
+!              the inverse diagonal matrix if MITER = 3 and the LU
+!              decomposition of P if MITER is 1, 2, 4, or 5.
+!              Storage of matrix elements starts at WM(1).
+!              Storage of the saved Jacobian starts at WM(LOCJS).
+! IWM        = Integer work space containing pivot information,
+!              starting at IWM(31), if MITER is 1, 2, 4, or 5.
+!              IWM also contains band parameters ML = IWM(1) and
+!              MU = IWM(2) if MITER is 4 or 5.
+! F          = Dummy name for the user supplied subroutine for f.
+! JAC        = Dummy name for the user supplied Jacobian subroutine.
+! RL1        = 1/EL(2) (input).
+! IERPJ      = Output error flag, = 0 if no trouble, 1 if the P
+!              matrix is found to be singular.
+! JCUR       = Output flag to indicate whether the Jacobian matrix
+!              (or approximation) is now current.
+!              JCUR = 0 means J is not current.
+!              JCUR = 1 means J is current.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERPJ
+        INTEGER, INTENT (IN) :: LDYH, ITOL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), FTEM(*), SAVF(*), WM(*), &
+          Y(*),YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CON, DI, FAC, HRL1, R, R0, SRUR, YI, YJ, YJJ
+        INTEGER :: I, I1, I2, IER, II, J, J1, JJ, JJ1, JJ2, JOK, K,   &
+          K1, K2, LENP, MBA, MBAND, MEB1, MEBAND, ML, ML1, MU, NG, NP1
+!         K1, K2, LENP, MBA, MBAND, MEB1, MEBAND, ML, ML3, MU, NG, NP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJAC
+! ..
+        IERPJ = 0
+        HRL1 = H*RL1
+!       See whether J should be evaluated (JOK = -1) or not (JOK = 1).
+        JOK = JSV
+        IF (JSV==1) THEN
+          IF (NST==0 .OR. NST>NSLJ+MSBJ) JOK = -1
+          IF (ICF==1 .AND. DRC<CCMXJ) JOK = -1
+          IF (ICF==2) JOK = -1
+        END IF
+        IF (J_IS_CONSTANT .AND. J_HAS_BEEN_COMPUTED) JOK = 1
+!       End of setting JOK.
+
+        IF (JOK==-1 .AND. MITER==1) THEN
+!         If JOK = -1 and MITER = 1, call JAC to evaluate Jacobian.
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+          LENP = N*N
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+!         CALL JAC(N,TN,Y,0,0,WM(3),N)
+          CALL JAC(N,TN,Y,0,0,WM(1),N)
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+!         IF (JSV==1) CALL DCOPY_F90(LENP,WM(3),1,WM(LOCJS),1)
+          IF (JSV==1) CALL DCOPY_F90(LENP,WM(1),1,WM(LOCJS),1)
+        END IF
+
+!       Set flag to indicate how the YSCALE vector will be set for
+!       JACSP.
+        LIKE_ORIGINAL_VODE = .FALSE.
+
+        IF (JOK==-1 .AND. MITER==2) THEN
+           IF (USE_JACSP) THEN
+!             Approximate the Jacobian using Doug Salane's JACSP.
+              NSLJ = NST
+              JCUR = 1
+              IOPTDS(1) = 0
+              IOPTDS(2) = 0
+              IOPTDS(3) = 1
+              IOPTDS(5) = 0
+!             INFORDS(4) was initialized in DVODE.
+              LWKDS  = 3 * N
+              LIWKDS = 50 + N
+              NRFJACDS = N
+              NCFJACDS = N
+              MAXGRPDS = N
+!             Calculate the YSCALEDS vector for JACSPDV.
+              IF (LIKE_ORIGINAL_VODE) THEN
+                 FAC = DVNORM(N,SAVF,EWT)
+!                JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                 R0 = THOU*ABS(H)*REAL(N)*FAC
+                 IF (ABS(R0)<=ZERO) R0 = ONE
+                 SRUR = WM1
+                 DO J = 1, N
+!                   JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                   R = MAX(ABS(Y(J)),R0/EWT(J))
+                    R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                    YSCALEDS(J) = R
+                 END DO
+              ELSE
+                 IF (ITOL == 1 .OR. ITOL == 3) THEN
+                    DO J = 1, N
+                       YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                    END DO
+                 ELSE
+                    DO J = 1, N
+                       YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                    END DO
+                 END IF
+              END IF
+
+              CALL JACSPDB(F,N,TN,Y,SAVF,WM(1),NRFJACDS, &
+                YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS, &
+                MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+              NFE = NFE + IWKDS(7)
+              NJE = NJE + 1
+           ELSE
+!             If MITER = 2, make N calls to F to approximate the Jacobian.
+              NSLJ = NST
+              JCUR = 1
+              FAC = DVNORM(N,SAVF,EWT)
+              R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+              IF (ABS(R0)<=ZERO) R0 = ONE
+              SRUR = WM1
+!             J1 = 2
+              J1 = 0
+              DO J = 1, N
+                 YJ = Y(J)
+                 R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+                 Y(J) = Y(J) + R
+                 FAC = ONE/R
+                 CALL F(N,TN,Y,FTEM)
+                 DO I = 1, N
+                   WM(I+J1) = (FTEM(I)-SAVF(I))*FAC
+                 END DO
+                 Y(J) = YJ
+                 J1 = J1 + N
+              END DO
+              NFE = NFE + N
+              NJE = NJE + 1
+           END IF
+           LENP = N*N
+!          IF (JSV==1) CALL DCOPY_F90(LENP,WM(3),1,WM(LOCJS),1)
+           IF (JSV==1) CALL DCOPY_F90(LENP,WM(1),1,WM(LOCJS),1)
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+        END IF
+
+        IF (JOK==1 .AND. (MITER==1 .OR. MITER==2)) THEN
+          JCUR = 0
+          LENP = N*N
+!         CALL DCOPY_F90(LENP,WM(LOCJS),1,WM(3),1)
+          CALL DCOPY_F90(LENP,WM(LOCJS),1,WM(1),1)
+        END IF
+
+        IF (MITER==1 .OR. MITER==2) THEN
+!         Multiply Jacobian by scalar, add identity, and do LU
+!         decomposition.
+          CON = -HRL1
+!         CALL DSCAL_F90(LENP,CON,WM(3),1)
+          CALL DSCAL_F90(LENP,CON,WM(1),1)
+!         J = 3
+          J = 1
+          NP1 = N + 1
+          DO I = 1, N
+            WM(J) = WM(J) + ONE
+            J = J + NP1
+          END DO
+          NLU = NLU + 1
+! ______________________________________________________________________
+
+!         CALL DGEFA_F90(WM(3),N,N,IWM(31),IER)
+          CALL DGEFA_F90(WM(1),N,N,IWM(31),IER)
+          IF (IER/=0) IERPJ = 1
+! *****LAPACK build change point. Replace above with these statements.
+!        IF (.NOT.USE_LAPACK) THEN
+!!         CALL DGEFA_f90(WM(3),N,N,IWM(31),IER)
+!          CALL DGEFA_f90(WM(1),N,N,IWM(31),IER)
+!          IF (IER /= 0) IERPJ = 1
+!        ELSE
+!!         CALL DGETRF(N,N,WM(3),N,IWM(31),IER)
+!          CALL DGETRF(N,N,WM(1),N,IWM(31),IER)
+!          IF (IER /= 0) IERPJ = 1
+!        END IF
+! ______________________________________________________________________
+
+          RETURN
+        END IF
+!       End of code block for MITER = 1 or 2.
+
+        IF (MITER==3) THEN
+!         If MITER = 3, construct a diagonal approximation to
+!         J and P.
+          NJE = NJE + 1
+          JCUR = 1
+          WM2 = HRL1
+          R = RL1*PT1
+          Y(1:N) = Y(1:N) + R*(H*SAVF(1:N)-YH(1:N,2))
+!         CALL F(N,TN,Y,WM(3))
+          CALL F(N,TN,Y,WM(1))
+          NFE = NFE + 1
+          DO 10 I = 1, N
+            R0 = H*SAVF(I) - YH(I,2)
+!           DI = PT1*R0 - H*(WM(I+2)-SAVF(I))
+            DI = PT1*R0 - H*(WM(I)-SAVF(I))
+!           WM(I+2) = ONE
+            WM(I) = ONE
+            IF (ABS(R0)<UROUND/EWT(I)) GOTO 10
+            IF (ABS(DI)<=ZERO) GOTO 20
+!           WM(I+2) = PT1*R0/DI
+            WM(I) = PT1*R0/DI
+10        END DO
+          RETURN
+20        IERPJ = 1
+          RETURN
+        END IF
+!       End of code block for MITER = 3.
+
+!       Set constants for MITER = 4 or 5.
+        ML = IWM(1)
+        MU = IWM(2)
+!       ML3 = ML + 3
+        ML1 = ML + 1
+        MBAND = ML + MU + 1
+        MEBAND = MBAND + ML
+        LENP = MEBAND*N
+
+        IF (JOK==-1 .AND. MITER==4) THEN
+!       If JOK = -1 and MITER = 4, call JAC to evaluate Jacobian.
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+!         CALL JAC(N,TN,Y,ML,MU,WM(ML3),MEBAND)
+          CALL JAC(N,TN,Y,ML,MU,WM(ML1),MEBAND)
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+!         IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML3),MEBAND,WM(LOCJS),MBAND)
+          IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML1),MEBAND,WM(LOCJS),MBAND)
+        END IF
+
+        IF (JOK==-1 .AND. MITER==5) THEN
+!       If MITER = 5, make ML+MU+1 calls to F to approximate the Jacobian
+!       unless the user has specified which sub and super diagonals are
+!       nonzero. In the latter case NSUBS+NSUPS+1 calls will be made.
+
+!         If the subdiagonals are known, use that information to build
+!         the Jacobian matrix.
+          IF ((SUBS .OR. SUPS) .OR. BNGRP >= MBAND) GOTO 60
+
+!         Otherwise, use the original algorithm.
+          IF (USE_JACSP) THEN
+!            Approximate the Jacobian using Doug Salane's JACSP.
+             NSLJ = NST
+             JCUR = 1
+             WM(1:LENP) = ZERO
+             IOPTDS(1) = 1
+             IOPTDS(2) = MBAND
+             IOPTDS(3) = 1
+             IOPTDS(5) = ML
+!            INFORDS(4) was initialized in DVODE.
+             LWKDS  = 3 * N
+             LIWKDS = 50 + N
+!            NRFJACDS = MEBAND*N
+!            NCFJACDS = 1
+             NRFJACDS = MEBAND
+             NCFJACDS = N
+             MBA = MIN(MBAND,N)
+             MAXGRPDS = MBA
+!            Calculate the YSCALEDS vector for JACSPDV.
+             IF (LIKE_ORIGINAL_VODE) THEN
+                FAC = DVNORM(N,SAVF,EWT)
+!               JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!               R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                R0 = THOU*ABS(H)*REAL(N)*FAC
+                IF (ABS(R0)<=ZERO) R0 = ONE
+                SRUR = WM1
+                DO J = 1, N
+!                  JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                  R = MAX(ABS(Y(J)),R0/EWT(J))
+                   R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                   YSCALEDS(J) = R
+                END DO
+             ELSE
+                IF (ITOL == 1 .OR. ITOL == 3) THEN
+                   DO J = 1, N
+                      YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                   END DO
+                ELSE
+                   DO J = 1, N
+                      YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                   END DO
+                END IF
+             END IF
+             CALL JACSPDB(F,N,TN,Y,SAVF,WM(1),NRFJACDS, &
+               YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS,  &
+               MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+             NFE = NFE + IWKDS(7)
+             NJE = NJE + 1
+          ELSE
+             NSLJ = NST
+             JCUR = 1
+             MBA = MIN(MBAND,N)
+             MEB1 = MEBAND - 1
+             SRUR = WM1
+             FAC = DVNORM(N,SAVF,EWT)
+             R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+             IF (ABS(R0)<=ZERO) R0 = ONE
+             DO J = 1, MBA
+               DO I = J, N, MBAND
+                 YI = Y(I)
+                 R = MAX(SRUR*ABS(YI),R0/EWT(I))
+                 Y(I) = Y(I) + R
+               END DO
+               CALL F(N,TN,Y,FTEM)
+               DO JJ = J, N, MBAND
+                 Y(JJ) = YH(JJ,1)
+                 YJJ = Y(JJ)
+                 R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+                 FAC = ONE/R
+                 I1 = MAX(JJ-MU,1)
+                 I2 = MIN(JJ+ML,N)
+!                II = JJ*MEB1 - ML + 2
+                 II = JJ*MEB1 - ML
+                 DO I = I1, I2
+                   WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                 END DO
+               END DO
+             END DO
+             NFE = NFE + MBA
+             NJE = NJE + 1
+          END IF
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+          GOTO 90
+   60     CONTINUE
+
+!         User supplied diagonals information is available.
+!         WM(3:LENP+2) = ZERO
+          WM(1:LENP) = ZERO
+          NJE = NJE + 1
+          NSLJ = NST
+          JCUR = 1
+          MBA = MIN(MBAND,N)
+          MEB1 = MEBAND - 1
+          SRUR = WM1
+          FAC = DVNORM(N,SAVF,EWT)
+          R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+          IF (ABS(R0)<=ZERO) R0 = ONE
+!         For each group of columns...
+          DO NG = 1, BNGRP
+!            Find the first and last columns in the group.
+             JJ1 = BIGP(NG)
+             JJ2 = BIGP(NG+1) - 1
+!            For each column in this group...
+             DO JJ = JJ1, JJ2
+                J = BJGP(JJ)
+                R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                Y(J) = Y(J) + R
+             END DO
+             CALL F(N,TN,Y,FTEM)
+!            For each column in this group...
+             DO JJ = JJ1, JJ2
+                 J = BJGP(JJ)
+                 Y(J) = YH(J,1)
+                 R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                 FAC = ONE/R
+                 IF (BUILD_IAJA) THEN
+!                   Use the IAB, JAB sparse structure arrays to
+!                   determine the first and last nonzeros in
+!                   column J.
+                    K1 = IAB(J)
+                    K2 = IAB(J+1) - 1
+                 ELSE
+!                   Extract the positions of the first and
+!                   last nonzeros in this column directly.
+                    CALL BANDED_GET_BJNZ(N,ML,MU,J,IWM(31),I)
+                    DO K = 1, N
+                       IF (IWM(30+K) /= 0) THEN
+                          K1 = K
+                          GOTO 70
+                       END IF
+                    END DO
+   70               CONTINUE
+                    DO K = N, 1, -1
+                       IF (IWM(30+K) /= 0) THEN
+                          K2 = K
+                          GOTO 80
+                       END IF
+                    END DO
+   80               CONTINUE
+                 END IF
+!                Load the nonzeros for column J in the banded matrix.
+                 IF (BUILD_IAJA) THEN
+                    DO K = K1, K2
+                       I = JAB(K)
+!                      II = J * MEB1 - ML + 2
+                       II = J * MEB1 - ML
+                       WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                    END DO
+                 ELSE
+                    DO K = K1, K2
+                       I = IWM(30+K)
+                       IF (I /= 0) THEN
+!                         II = J * MEB1 - ML + 2
+                          II = J * MEB1 - ML
+                          WM(II+I) = (FTEM(I)-SAVF(I))*FAC
+                       END IF
+                    END DO
+                 END IF
+             END DO
+          END DO
+          NFE = NFE + BNGRP
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+   90     CONTINUE
+!         IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML3),MEBAND,WM(LOCJS),MBAND)
+          IF (JSV==1) CALL DACOPY(MBAND,N,WM(ML1),MEBAND,WM(LOCJS),MBAND)
+        END IF
+
+        IF (JOK==1) THEN
+          JCUR = 0
+!         CALL DACOPY(MBAND,N,WM(LOCJS),MBAND,WM(ML3),MEBAND)
+          CALL DACOPY(MBAND,N,WM(LOCJS),MBAND,WM(ML1),MEBAND)
+        END IF
+
+!       Multiply Jacobian by scalar, add identity, and do LU
+!       decomposition.
+        CON = -HRL1
+!       CALL DSCAL_F90(LENP,CON,WM(3),1)
+        CALL DSCAL_F90(LENP,CON,WM(1),1)
+!       II = MBAND + 2
+        II = MBAND
+        DO I = 1, N
+          WM(II) = WM(II) + ONE
+          II = II + MEBAND
+        END DO
+        NLU = NLU + 1
+! ______________________________________________________________________
+
+!       CALL DGBFA_F90(WM(3),MEBAND,N,ML,MU,IWM(31),IER)
+        CALL DGBFA_F90(WM(1),MEBAND,N,ML,MU,IWM(31),IER)
+        IF (IER/=0) IERPJ = 1
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!        CALL DGBFA_f90(WM(3),MEBAND,N,ML,MU,IWM(31),IER)
+!         CALL DGBFA_f90(WM(1),MEBAND,N,ML,MU,IWM(31),IER)
+!         IF (IER /= 0) IERPJ = 1
+!       ELSE
+!!        CALL DGBTRF(N,N,ML,MU,WM(3),MEBAND,IWM(31),IER)
+!         CALL DGBTRF(N,N,ML,MU,WM(1),MEBAND,IWM(31),IER)
+!         IF (IER /= 0) IERPJ = 1
+!       END IF
+! ______________________________________________________________________
+       RETURN
+!      End of code block for MITER = 4 or 5.
+
+      END SUBROUTINE DVJAC
+!_______________________________________________________________________
+
+      SUBROUTINE DACOPY(NROW,NCOL,A,NROWA,B,NROWB)
+! ..
+! Copy one array to another.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NCOL, NROW, NROWA, NROWB
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: A(NROWA,NCOL)
+        KPP_REAL, INTENT (INOUT) :: B(NROWB,NCOL)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IC
+! ..
+! .. FIRST EXECUTABLE STATEMENT DACOPY
+! ..
+        DO IC = 1, NCOL
+          CALL DCOPY_F90(NROW,A(1,IC),1,B(1,IC),1)
+        END DO
+        RETURN
+
+      END SUBROUTINE DACOPY
+!_______________________________________________________________________
+
+      SUBROUTINE DVSOL(WM,IWM,X,IERSL)
+! ..
+! Manage the solution of the linear system arising from a chord
+! iteration for dense and banded solutions.
+! ..
+! This routine manages the solution of the linear system arising from
+! a chord iteration. It is called if MITER /= 0.
+! If MITER is 1 or 2, it calls DGESL_F90 to accomplish this.
+! If MITER = 3 it updates the coefficient H*RL1 in the diagonal
+! matrix, and then computes the solution.
+! If MITER is 4 or 5, it calls DGBSL_F90.
+! Communication with DVSOL uses the following variables:
+! WM    = Real work space containing the inverse diagonal matrix if
+!         MITER = 3 and the LU decomposition of the matrix otherwise.
+!         Storage of matrix elements starts at WM(1).
+!         WM also contains the following matrix-related data:
+!         WM1 = SQRT(UROUND) (not used here),
+!         WM2 = HRL1, the previous value of H*RL1, used if MITER = 3.
+! IWM   = Integer work space containing pivot information, starting at
+!         IWM(31), if MITER is 1, 2, 4, or 5. IWM also contains band
+!         parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.
+! X     = The right-hand side vector on input, and the solution vector
+!         on output, of length N.
+! IERSL = Output flag. IERSL = 0 if no trouble occurred.
+!         IERSL = 1 if a singular matrix arose with MITER = 3.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERSL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: WM(*), X(*)
+        INTEGER, INTENT (INOUT) :: IWM(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DI, HRL1, PHRL1, R
+        INTEGER :: I, MEBAND, ML, MU
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! ______________________________________________________________________
+
+! *****LAPACK build change point. Insert this statement.
+!       INTEGER INFO
+!       CHARACTER*1 TRANS
+! ______________________________________________________________________
+
+! .. FIRST EXECUTABLE STATEMENT DVSOL
+! ..
+        IERSL = 0
+        GOTO (10,10,20,50,50) MITER
+
+10      CONTINUE
+! ______________________________________________________________________
+
+!       CALL DGESL_F90(WM(3),N,N,IWM(31),X,0)
+        CALL DGESL_F90(WM(1),N,N,IWM(31),X,0)
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!         CALL DGESL_f90(WM(3),N,N,IWM(31),X,0)
+!          CALL DGESL_f90(WM(1),N,N,IWM(31),X,0)
+!       ELSE
+!          TRANS = 'N'
+!!         CALL DGETRS(TRANS,N,1,WM(3),N,IWM(31),X,N,INFO)
+!          CALL DGETRS(TRANS,N,1,WM(1),N,IWM(31),X,N,INFO)
+!          IF (INFO /= 0) THEN
+!             WRITE(6,*) 'Stopping in DVSOL with INFO = ', INFO
+!             STOP
+!          END IF
+!       END IF
+! ______________________________________________________________________
+
+        RETURN
+
+20      PHRL1 = WM2
+        HRL1 = H*RL1
+        WM2 = HRL1
+        IF (ABS(HRL1-PHRL1)<=ZERO) GOTO 30
+        R = HRL1/PHRL1
+        DO I = 1, N
+!         DI = ONE - R*(ONE-ONE/WM(I+2))
+          DI = ONE - R*(ONE-ONE/WM(I))
+          IF (ABS(DI)<=ZERO) GOTO 40
+!         WM(I+2) = ONE/DI
+          WM(I) = ONE/DI
+        END DO
+
+30      DO I = 1, N
+!         X(I) = WM(I+2)*X(I)
+          X(I) = WM(I)*X(I)
+        END DO
+        RETURN
+40      IERSL = 1
+        RETURN
+
+50      ML = IWM(1)
+        MU = IWM(2)
+        MEBAND = 2*ML + MU + 1
+! ______________________________________________________________________
+
+!       CALL DGBSL_F90(WM(3),MEBAND,N,ML,MU,IWM(31),X,0)
+        CALL DGBSL_F90(WM(1),MEBAND,N,ML,MU,IWM(31),X,0)
+! *****LAPACK build change point. Replace above with these statements.
+!       IF (.NOT.USE_LAPACK) THEN
+!!        CALL DGBSL_F90(WM(3),MEBAND,N,ML,MU,IWM(31),X,0)
+!         CALL DGBSL_F90(WM(1),MEBAND,N,ML,MU,IWM(31),X,0)
+!       ELSE
+!         TRANS = 'N'
+!!        CALL DGBTRS(TRANS,N,ML,MU,1,WM(3),MEBAND,IWM(31),X,N,INFO)
+!         CALL DGBTRS(TRANS,N,ML,MU,1,WM(1),MEBAND,IWM(31),X,N,INFO)
+!         IF (INFO /= 0) THEN
+!           WRITE(6,*) 'Stopping in DVSOL with INFO = ', INFO
+!           STOP
+!         END IF
+!       END IF
+! ______________________________________________________________________
+
+      RETURN
+
+      END SUBROUTINE DVSOL
+!_______________________________________________________________________
+
+      SUBROUTINE DVSRCO(RSAV,ISAV,JOB)
+! ..
+! Save or restore (depending on JOB) the contents of the PRIVATE
+! variable blocks, which are used internally by DVODE (not called
+! by DVODE_F90).
+! ..
+! RSAV = real array of length 49 or more.
+! ISAV = integer array of length 41 or more.
+! JOB  = flag indicating to save or restore the PRIVATE variable
+!        blocks:
+!        JOB  = 1 if PRIVATE variables is to be saved
+!                 (written to RSAV/ISAV).
+!        JOB  = 2 if PRIVATE variables is to be restored
+!                 (read from RSAV/ISAV).
+!        A call with JOB = 2 presumes a prior call with JOB = 1.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: RSAV(*)
+        INTEGER, INTENT (INOUT) :: ISAV(*)
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSRCO
+! ..
+        IF (JOB/=2) THEN
+!         Save the contents of the PRIVATE blocks.
+          RSAV(1) = ACNRM
+          RSAV(2) = CCMXJ
+          RSAV(3) = CONP
+          RSAV(4) = CRATE
+          RSAV(5) = DRC
+          RSAV(6:18) = EL(1:13)
+          RSAV(19) = ETA
+          RSAV(20) = ETAMAX
+          RSAV(21) = H
+          RSAV(22) = HMIN
+          RSAV(23) = HMXI
+          RSAV(24) = HNEW
+          RSAV(25) = HSCAL
+          RSAV(26) = PRL1
+          RSAV(27) = RC
+          RSAV(28) = RL1
+          RSAV(29:41) = TAU(1:13)
+          RSAV(42:46) = TQ(1:5)
+          RSAV(47) = TN
+          RSAV(48) = UROUND
+          RSAV(LENRV1+1) = HU
+          ISAV(1) = ICF
+          ISAV(2) = INIT
+          ISAV(3) = IPUP
+          ISAV(4) = JCUR
+          ISAV(5) = JSTART
+          ISAV(6) = JSV
+          ISAV(7) = KFLAG
+          ISAV(8) = KUTH
+          ISAV(9) = L
+          ISAV(10) = LMAX
+          ISAV(11) = LYH
+          ISAV(12) = 0
+          ISAV(13) = 0
+          ISAV(14) = 0
+          ISAV(15) = LWM
+          ISAV(16) = LIWM
+          ISAV(17) = LOCJS
+          ISAV(18) = MAXORD
+          ISAV(19) = METH
+          ISAV(20) = MITER
+          ISAV(21) = MSBJ
+          ISAV(22) = MXHNIL
+          ISAV(23) = MXSTEP
+          ISAV(24) = N
+          ISAV(25) = NEWH
+          ISAV(26) = NEWQ
+          ISAV(27) = NHNIL
+          ISAV(28) = NQ
+          ISAV(29) = NQNYH
+          ISAV(30) = NQWAIT
+          ISAV(31) = NSLJ
+          ISAV(32) = NSLP
+          ISAV(33) = NYH
+          ISAV(LENIV1+1) = NCFN
+          ISAV(LENIV1+2) = NETF
+          ISAV(LENIV1+3) = NFE
+          ISAV(LENIV1+4) = NJE
+          ISAV(LENIV1+5) = NLU
+          ISAV(LENIV1+6) = NNI
+          ISAV(LENIV1+7) = NQU
+          ISAV(LENIV1+8) = NST
+          RETURN
+        ELSE
+!         Replace the contents of the PRIVATE blocks.
+          ACNRM = RSAV(1)
+          CCMXJ = RSAV(2)
+          CONP = RSAV(3)
+          CRATE = RSAV(4)
+          DRC = RSAV(5)
+          EL(1:13) = RSAV(6:18)
+          ETA = RSAV(19)
+          ETAMAX = RSAV(20)
+          H = RSAV(21)
+          HMIN = RSAV(22)
+          HMXI = RSAV(23)
+          HNEW = RSAV(24)
+          HSCAL = RSAV(25)
+          PRL1 = RSAV(26)
+          RC = RSAV(27)
+          RL1 = RSAV(28)
+          TAU(1:13) = RSAV(29:41)
+          TQ(1:5) = RSAV(42:46)
+          TN = RSAV(47)
+          UROUND = RSAV(48)
+          HU = RSAV(LENRV1+1)
+          ICF = ISAV(1)
+          INIT = ISAV(2)
+          IPUP = ISAV(3)
+          JCUR = ISAV(4)
+          JSTART = ISAV(5)
+          JSV = ISAV(6)
+          KFLAG = ISAV(7)
+          KUTH = ISAV(8)
+          L = ISAV(9)
+          LMAX = ISAV(10)
+          LYH = ISAV(11)
+          LWM = ISAV(15)
+          LIWM = ISAV(16)
+          LOCJS = ISAV(17)
+          MAXORD = ISAV(18)
+          METH = ISAV(19)
+          MITER = ISAV(20)
+          MSBJ = ISAV(21)
+          MXHNIL = ISAV(22)
+          MXSTEP = ISAV(23)
+          N = ISAV(24)
+          NEWH = ISAV(25)
+          NEWQ = ISAV(26)
+          NHNIL = ISAV(27)
+          NQ = ISAV(28)
+          NQNYH = ISAV(29)
+          NQWAIT = ISAV(30)
+          NSLJ = ISAV(31)
+          NSLP = ISAV(32)
+          NYH = ISAV(33)
+          NCFN = ISAV(LENIV1+1)
+          NETF = ISAV(LENIV1+2)
+          NFE = ISAV(LENIV1+3)
+          NJE = ISAV(LENIV1+4)
+          NLU = ISAV(LENIV1+5)
+          NNI = ISAV(LENIV1+6)
+          NQU = ISAV(LENIV1+7)
+          NST = ISAV(LENIV1+8)
+          RETURN
+        END IF
+
+      END SUBROUTINE DVSRCO
+!_______________________________________________________________________
+
+      SUBROUTINE DEWSET(N,ITOL,RTOL,ATOL,YCUR,EWT)
+! ..
+! Set the error weight vector.
+! ..
+! This subroutine sets the error weight vector EWT according to
+! EWT(i) = RTOL(i)*ABS(YCUR(i)) + ATOL(i), i = 1,...,N,
+! with the subscript on RTOL and/or ATOL possibly replaced by 1
+! above, depending on the value of ITOL.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: ATOL(*), RTOL(*), YCUR(N)
+        KPP_REAL, INTENT (OUT) :: EWT(N)
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT DEWSET
+! ..
+        GOTO (10,20,30,40) ITOL
+10      CONTINUE
+        EWT(1:N) = RTOL(1)*ABS(YCUR(1:N)) + ATOL(1)
+        RETURN
+20      CONTINUE
+        EWT(1:N) = RTOL(1)*ABS(YCUR(1:N)) + ATOL(1:N)
+        RETURN
+30      CONTINUE
+        EWT(1:N) = RTOL(1:N)*ABS(YCUR(1:N)) + ATOL(1)
+        RETURN
+40      CONTINUE
+        EWT(1:N) = RTOL(1:N)*ABS(YCUR(1:N)) + ATOL(1:N)
+        RETURN
+
+      END SUBROUTINE DEWSET
+!_______________________________________________________________________
+
+      FUNCTION DVNORM(N,V,W)
+! ..
+! Calculate weighted root-mean-square (rms) vector norm.
+! ..
+! This routine computes the weighted root-mean-square norm
+! of the vector of length N contained in the array V, with
+! weights contained in the array W of length N.
+! DVNORM = SQRT((1/N) * SUM(V(i)*W(i))**2)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        KPP_REAL :: DVNORM
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: V(N), W(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: SUM
+        INTEGER :: I
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC SQRT
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNORM
+! ..
+        SUM = ZERO
+        DO I = 1, N
+          SUM = SUM + (V(I)*W(I))**2
+        END DO
+        DVNORM = SQRT(SUM/N)
+        RETURN
+
+      END FUNCTION DVNORM
+!_______________________________________________________________________
+
+! The modified SLATEC error handling routines begin here.
+      SUBROUTINE XERRDV(MSG,NERR,LEVEL,NI,I1,I2,NR,R1,R2)
+! ..
+! Write error messages with values.
+! ..
+! This is an adaptation of subroutine XERRWD (NMES eliminated).
+! Subroutines XERRDV, XSETF, XSETUN, and Functions IXSAV
+! as given here, constitute a simplified version of the SLATEC
+! error handling package.
+!
+! All arguments are input arguments.
+! MSG    = The message (character array).
+! NERR   = The error number (not used).
+! LEVEL  = The error level
+!          0 or 1 means recoverable (control returns to caller).
+!          2 means fatal (run is aborted--see note below).
+! NI     = Number of integers (0, 1, or 2) to be printed with message.
+! I1,I2  = Integers to be printed, depending on NI.
+! NR     = Number of reals (0, 1, or 2) to be printed with message.
+! R1,R2  = Reals to be printed, depending on NR.
+! Note: This routine is machine-dependent and specialized for use
+! in limited context, in the following ways:
+!  1. The argument MSG is assumed to be of type CHARACTER, and
+!     the message is printed with a format of (1X,A).
+!  2. The message is assumed to take only one line.
+!     Multi-line messages are generated by repeated calls.
+!  3. If LEVEL = 2, control passes to the statement: STOP
+!     to abort the run. This statement may be machine-dependent.
+!  4. R1 and R2 are assumed to be in real(wp) and are printed
+!     in D21.13 format.
+! Internal Notes:
+! For a different default logical unit number, IXSAV(or a subsidiary
+! function that it calls) will need to be modified.
+! For a different run-abort command, change the statement following
+! statement 100 at the end.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: R1, R2
+        INTEGER :: I1, I2, LEVEL, NERR, NI, NR
+        CHARACTER (*) :: MSG
+        LOGICAL PRINT_NERR
+! ..
+! .. Local Scalars ..
+        INTEGER :: LUNIT, MESFLG
+! ..
+! .. FIRST EXECUTABLE STATEMENT XERRDV
+! ..
+!       Get logical unit number and message print flag.
+        LUNIT = IXSAV(1,0,.FALSE.)
+        MESFLG = IXSAV(2,0,.FALSE.)
+        IF (MESFLG==0) GOTO 10
+
+        PRINT_NERR = .FALSE.
+        IF (PRINT_NERR) PRINT *, MSG, 'Message number = ', NERR
+
+!       Write the message.
+        WRITE (LUNIT,90000) MSG
+90000   FORMAT (1X,A)
+        IF (NI==1) WRITE (LUNIT,90001) I1
+90001   FORMAT ('In the above message, I1 = ',I10)
+        IF (NI==2) WRITE (LUNIT,90002) I1, I2
+90002   FORMAT ('In the above message, I1 = ',I10,3X,'I2 = ',I10)
+        IF (NR==1) WRITE (LUNIT,90003) R1
+90003   FORMAT ('In the above message, R1 = ',D21.13)
+        IF (NR==2) WRITE (LUNIT,90004) R1, R2
+90004   FORMAT ('In the above message, R1 = ',D21.13,3X,'R2 = ',D21.13)
+
+!       Abort the run if LEVEL = 2.
+10      IF (LEVEL/=2) RETURN
+        WRITE (LUNIT,90005)
+90005   FORMAT ('LEVEL = 2 in XERRDV. Stopping.')
+        STOP
+
+      END SUBROUTINE XERRDV
+!_______________________________________________________________________
+
+      SUBROUTINE XSETF(MFLAG)
+! ..
+!     Reset the error print control flag.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: MFLAG
+! ..
+! .. Local Scalars ..
+        INTEGER :: JUNK
+! ..
+! .. FIRST EXECUTABLE STATEMENT XSETF
+! ..
+        IF (MFLAG==0 .OR. MFLAG==1) JUNK = IXSAV(2,MFLAG,.TRUE.)
+!       Get rid of a compiler warning message:
+        IF (JUNK/=JUNK) STOP
+        RETURN
+
+      END SUBROUTINE XSETF
+!_______________________________________________________________________
+
+      SUBROUTINE XSETUN(LUN)
+! ..
+!     Reset the logical unit number for error messages.
+! ..
+!     XSETUN sets the logical unit number for error messages to LUN.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LUN
+! ..
+! .. Local Scalars ..
+        INTEGER :: JUNK
+! ..
+! .. FIRST EXECUTABLE STATEMENT XSETUN
+! ..
+        IF (LUN>0) JUNK = IXSAV(1,LUN,.TRUE.)
+!       Get rid of a compiler warning message:
+        IF (JUNK/=JUNK) STOP
+        RETURN
+
+      END SUBROUTINE XSETUN
+!_______________________________________________________________________
+
+      FUNCTION IXSAV(IPAR,IVALUE,ISET)
+! ..
+! Save and recall error message control parameters.
+! ..
+! IXSAV saves and recalls one of two error message parameters:
+!  LUNIT, the logical unit number to which messages are printed,
+!  and MESFLG, the message print flag.
+! This is a modification of the SLATEC library routine J4SAVE.
+! Saved local variables:
+!  LUNIT  = Logical unit number for messages. The default is
+!           obtained by a call to IUMACH(may be machine-dependent).
+!  MESFLG = Print control flag:
+!           1 means print all messages (the default).
+!           0 means no printing.
+! On input:
+!  IPAR   = Parameter indicator (1 for LUNIT, 2 for MESFLG).
+!  IVALUE = The value to be set for the parameter, if ISET = .TRUE.
+!  ISET   = Logical flag to indicate whether to read or write.
+!           If ISET = .TRUE., the parameter will be given
+!           the value IVALUE. If ISET = .FALSE., the parameter
+!           will be unchanged, and IVALUE is a dummy argument.
+! On return:
+!   IXSAV = The (old) value of the parameter.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        INTEGER :: IXSAV
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: IPAR, IVALUE
+        LOGICAL, INTENT (IN) :: ISET
+! ..
+! .. Local Scalars ..
+        INTEGER, SAVE :: LUNIT, MESFLG
+! ..
+! .. Data Statements ..
+        DATA LUNIT/ -1/, MESFLG/1/
+! ..
+! .. FIRST EXECUTABLE STATEMENT IXSAV
+! ..
+        IF (IPAR==1) THEN
+          IF (LUNIT==-1) LUNIT = IUMACH()
+!  i       Get rid of a compiler warning message:
+          IF (LUNIT/=LUNIT) STOP
+          IXSAV = LUNIT
+          IF (ISET) LUNIT = IVALUE
+        END IF
+
+        IF (IPAR==2) THEN
+          IXSAV = MESFLG
+          IF (ISET) MESFLG = IVALUE
+        END IF
+        RETURN
+
+      END FUNCTION IXSAV
+!_______________________________________________________________________
+
+      FUNCTION IUMACH()
+! ..
+!     Provide the standard output unit number.
+! ..
+!     INTEGER LOUT, IUMACH
+!     LOUT = IUMACH()
+!     Function Return Values:
+!     LOUT: the standard logical unit for Fortran output.
+!     Internal Notes:
+!     The built-in value of 6 is standard on a wide range
+!     of Fortran systems. This may be machine-dependent.
+! ..
+! .. Function Return Value ..
+        INTEGER :: IUMACH
+! ..
+! .. FIRST EXECUTABLE STATEMENT IUMACH
+! ..
+        IUMACH = 6
+        RETURN
+
+      END FUNCTION IUMACH
+! The modified error handling routines end here.
+!_______________________________________________________________________
+
+      SUBROUTINE CHECK_STAT(IER,CALLED_FROM_WHERE)
+! ..
+! Print an error message if a storage allocation error
+! occurred.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: CALLED_FROM_WHERE, IER
+! ..
+! .. Local Scalars ..
+        INTEGER :: I1
+        CHARACTER (80) :: MSG
+! ..
+! .. FIRST EXECUTABLE STATEMENT CHECK_STAT
+! ..
+        IF (IER/=0) THEN
+          I1 = CALLED_FROM_WHERE
+          MSG = 'A storage allocation error occurred.'
+          CALL XERRDV(MSG,1410,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'The error occurred at location I1.'
+          CALL XERRDV(MSG,1410,2,1,I1,0,0,ZERO,ZERO)
+        END IF
+        RETURN
+
+      END SUBROUTINE CHECK_STAT
+!_______________________________________________________________________
+
+      SUBROUTINE DVPREPS(NEQ,Y,YH,LDYH,SAVF,EWT,F,JAC)
+! ..
+! Determine the sparsity structure and allocate the necessary arrays
+! for MA28 based sparse solutions.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: LDYH, NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), Y(*)
+        KPP_REAL :: SAVF(*)
+        KPP_REAL, INTENT (IN) :: YH(LDYH,*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DQ, DYJ, ERWT, FAC, YJ
+        INTEGER :: I, IER, J, JFOUND, K, KMAX, KMIN, KNEW, NP1, NZ
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, MAX, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVPREPS
+! ..
+        NZ_SWAG = MAX(MAX(1000,NZ_SWAG),10*N)
+        NP1 = N + 1
+        NZ_ALL = NZ_SWAG
+!       ADDTONNZ = MAX(1000,NZ_SWAG)
+        ADDTONNZ = NZ_SWAG
+10      CONTINUE
+        IF (ALLOCATED(IAN)) THEN
+          DEALLOCATE (IAN,JAN,IGP,JGP,FTEMP1,IKEEP28,IW28,ICN,PMAT, &
+            JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,490)
+          IF (ALLOCATED(JMAT)) THEN
+            DEALLOCATE (JMAT,STAT=IER)
+            CALL CHECK_STAT(IER,500)
+          END IF
+        END IF
+        NZ_ALL = NZ_ALL + ADDTONNZ
+        LICN_ALL = ELBOW_ROOM * NZ_ALL
+        LIRN_ALL = ELBOW_ROOM * NZ_ALL
+        IF (LICN_ALL>MAX_ARRAY_SIZE .OR. LIRN_ALL>MAX_ARRAY_SIZE) THEN
+          MSG = 'Maximum array size exceeded. Stopping.'
+          CALL XERRDV(MSG,1420,2,0,0,0,0,ZERO,ZERO)
+        END IF
+!       Note: ICN may need to be reallocated in DVJACS28.
+        ALLOCATE (IAN(NP1),JAN(LIRN_ALL),IGP(NP1),JGP(N),FTEMP1(N), &
+          IKEEP28(N,5),IW28(N,8),ICN(LICN_ALL),PMAT(LICN_ALL),      &
+          JVECT(LIRN_ALL),STAT=IER)
+        CALL CHECK_STAT(IER,510)
+        IF (JSV==1) THEN
+          ALLOCATE (JMAT(NZ_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,520)
+          JMAT(1:NZ_ALL) = ZERO
+        END IF
+
+        IF (MOSS==0) GOTO 30
+        IF (ISTATC==3) GOTO 20
+
+!       ISTATE = 1 and MOSS /= 0.
+
+!       Perturb Y for structure determination:
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        GOTO (60,70) MOSS
+
+20      CONTINUE
+!       ISTATE = 3 and MOSS /= 0.
+
+!       Load Y from YH(*,1):
+        Y(1:N) = YH(1:N,1)
+        GOTO (60,70) MOSS
+
+!       MOSS = 0
+
+!       Process user's IA,JA. Add diagonal entries if necessary:
+30      CONTINUE
+        IF (IAJA_CALLED) THEN
+        ELSE
+          MSG = 'You have indicated that you wish to supply the'
+          CALL XERRDV(MSG,1430,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'sparsity arrays IA and JA directly but you did'
+          CALL XERRDV(MSG,1430,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'not call SET_IAJA after calling SET_OPTS.'
+          CALL XERRDV(MSG,1430,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        KNEW = 1
+        KMIN = IA(1)
+        IAN(1) = 1
+        DO J = 1, N
+          JFOUND = 0
+          KMAX = IA(J+1) - 1
+          IF (KMIN>KMAX) GOTO 40
+          DO K = KMIN, KMAX
+            I = JA(K)
+            IF (I==J) JFOUND = 1
+            IF (KNEW>NZ_ALL) THEN
+               IF (LP /= 0) THEN
+                  MSG = 'NZ_ALL (=I1) is not large enough.'
+                  CALL XERRDV(MSG,1440,1,0,0,0,0,ZERO,ZERO)
+                  MSG = 'Allocating more space for another try.'
+                  CALL XERRDV(MSG,1440,1,1,NZ_ALL,0,0,ZERO,ZERO)
+               END IF
+               GOTO 10
+            END IF
+            JAN(KNEW) = I
+            KNEW = KNEW + 1
+          END DO
+          IF (JFOUND==1) GOTO 50
+40        IF (KNEW>NZ_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'NZ_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1450,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1450,1,1,NZ_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          JAN(KNEW) = J
+          KNEW = KNEW + 1
+50        IAN(J+1) = KNEW
+          KMIN = KMAX + 1
+        END DO
+        GOTO 90
+
+60      CONTINUE
+
+!       MOSS = 1.
+
+!       Compute structure from user-supplied Jacobian routine JAC.
+        NZ = 0
+        CALL JAC(NEQ,TN,Y,IAN,JAN,NZ,PMAT)
+        IF (NZ<=0) THEN
+          MSG = 'Illegal value of NZ from JAC in DVPREPS.'
+          CALL XERRDV(MSG,1460,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        IF (NZ>NZ_ALL) THEN
+           IF (LP /= 0) THEN
+              MSG = 'NZ_ALL (=I1) is not large enough.'
+              CALL XERRDV(MSG,1470,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'Allocating more space for another try.'
+              CALL XERRDV(MSG,1470,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           END IF
+           GOTO 10
+        END IF
+        CALL JAC(NEQ,TN,Y,IAN,JAN,NZ,PMAT)
+        CALL SET_ICN(N,IAN,ICN)
+        CALL CHECK_DIAG(N,IAN,JAN,ICN)
+        GOTO 90
+
+!       MOSS = 2.
+
+!       Compute structure from results of N+1 calls to F.
+70      K = 1
+        IAN(1) = 1
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        CALL F(NEQ,TN,Y,SAVF)
+        NFE = NFE + 1
+        DO J = 1, N
+          IF (K>NZ_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'NZ_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1480,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1480,1,1,NZ_ALL,0,0,ZERO,ZERO)
+
+             END IF
+             GOTO 10
+          END IF
+          YJ = Y(J)
+          ERWT = ONE/EWT(J)
+          DYJ = SIGN(ERWT,YJ)
+          Y(J) = YJ + DYJ
+          CALL F(NEQ,TN,Y,FTEMP1)
+          NFE = NFE + 1
+          Y(J) = YJ
+          DO 80 I = 1, N
+            DQ = (FTEMP1(I)-SAVF(I))/DYJ
+            IF ((ABS(DQ)<=SETH) .AND. (I/=J)) GOTO 80
+            JAN(K) = I
+            K = K + 1
+80        END DO
+          IAN(J+1) = K
+        END DO
+90      CONTINUE
+        IF (MOSS==0 .OR. ISTATC/=1) GOTO 100
+!       If ISTATE = 1 and MOSS /= 0, restore Y from YH.
+        Y(1:N) = YH(1:N,1)
+100     NNZ = IAN(NP1) - 1
+        LENIGP = 0
+        MAXG = 0
+        IF (MITER==7) THEN
+!         Compute grouping of column indices.
+          MAXG = NP1
+          CALL DGROUP(N,IAN,JAN,MAXG,NGP,IGP,JGP,IKEEP28(1,1), &
+            IKEEP28(1,2),IER)
+          IF (IER/=0) THEN
+            MSG = 'An error occurred in DGROUP.'
+            CALL XERRDV(MSG,1490,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          LENIGP = NGP + 1
+        END IF
+
+        IF (USE_JACSP .AND. MITER==7) THEN
+!         Use Doug Salane's Jacobian routines to determine the column
+!         grouping; and allocate and initialize the necessary arrays
+!         for use in DVJACS48.
+          IF (ALLOCATED(INDROWDS)) THEN
+             DEALLOCATE (INDROWDS, INDCOLDS, NGRPDS, IPNTRDS, JPNTRDS, IWADS, &
+               IWKDS, IOPTDS, YSCALEDS, WKDS, FACDS)
+             CALL CHECK_STAT(IER,530)
+          END IF
+!         We could delete IWADS and use IW28 array.
+          ALLOCATE (INDROWDS(NNZ), INDCOLDS(NNZ), NGRPDS(N+1), IPNTRDS(N+1), &
+            JPNTRDS(N+1), IWADS(6*N), IWKDS(50+N), IOPTDS(5), YSCALEDS(N),  &
+            WKDS(3*N), FACDS(N) ,STAT=IER)
+          CALL CHECK_STAT(IER,540)
+          INDROWDS(1:NNZ) = JAN(1:NNZ)
+          CALL SET_ICN(N,IAN,INDCOLDS)
+          CALL CHECK_DIAG(N,IAN,INDROWDS,INDCOLDS)
+          LIWADS = 6 * N
+          CALL DVDSM(N,N,NNZ,INDROWDS,INDCOLDS,NGRPDS,MAXGRPDS,MINGRPDS,      &
+            INFODS,IPNTRDS,JPNTRDS,IWADS,LIWADS)
+          IF (INFODS /= 1) THEN
+             MSG = 'An error occurred in subroutine DSM. INFO = I1.'
+               CALL XERRDV(MSG,1500,2,1,INFODS,0,0,ZERO,ZERO)
+          END IF
+!         For use in DVJACS28:
+          IOPTDS(4) = 0
+!         Define the IGP and JGP arrays needed by DVJACS28.
+          CALL DGROUPDS(N,MAXGRPDS,NGRPDS,IGP,JGP)
+          NGP = MAXGRPDS
+          LENIGP = MAXGRPDS + 1
+        END IF
+
+!       Trim the arrays to the final sizes.
+
+        IF (NZ_ALL>NNZ) THEN
+          NZ_ALL = NNZ
+          MAX_NNZ = MAX(MAX_NNZ,NNZ)
+          LIRN_ALL = ELBOW_ROOM * NNZ
+          ICN(1:NNZ) = JAN(1:NNZ)
+          DEALLOCATE (JAN,STAT=IER)
+          CALL CHECK_STAT(IER,550)
+          ALLOCATE (JAN(LIRN_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,560)
+          JAN(1:NNZ) = ICN(1:NNZ)
+          CALL CHECK_STAT(IER,570)
+          DEALLOCATE (ICN,PMAT,JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,580)
+          IF (ALLOCATED(JMAT)) THEN
+            DEALLOCATE (JMAT,STAT=IER)
+            CALL CHECK_STAT(IER,590)
+          END IF
+          LICN_ALL = ELBOW_ROOM * NNZ
+          ALLOCATE (ICN(LICN_ALL),PMAT(LICN_ALL),JVECT(LIRN_ALL),STAT=IER)
+          CALL CHECK_STAT(IER,600)
+          IF (JSV==1) THEN
+            ALLOCATE (JMAT(NNZ),STAT=IER)
+            CALL CHECK_STAT(IER,610)
+            JMAT(1:NNZ) = ZERO
+          END IF
+          IF (MITER==7) THEN
+            JVECT(1:LENIGP) = IGP(1:LENIGP)
+            DEALLOCATE (IGP,STAT=IER)
+            CALL CHECK_STAT(IER,620)
+            ALLOCATE (IGP(LENIGP),STAT=IER)
+            CALL CHECK_STAT(IER,630)
+            IGP(1:LENIGP) = JVECT(1:LENIGP)
+          END IF
+        END IF
+        IF (SCALE_MATRIX) THEN
+           IF (ALLOCATED(CSCALEX)) THEN
+              DEALLOCATE (CSCALEX,RSCALEX,WSCALEX,STAT=IER)
+              CALL CHECK_STAT(IER,640)
+              ALLOCATE (CSCALEX(N),RSCALEX(N),WSCALEX(N,5),STAT=IER)
+              CALL CHECK_STAT(IER,650)
+           ELSE
+              ALLOCATE (CSCALEX(N),RSCALEX(N),WSCALEX(N,5),STAT=IER)
+              CALL CHECK_STAT(IER,660)
+           END IF
+        END IF
+        IF (LP /= 0) THEN
+           MSG = 'The final DVPRPEPS storage allocations are:'
+           CALL XERRDV(MSG,1510,1,0,0,0,0,ZERO,ZERO)
+           MSG = '   NZ_ALL (=I1):'
+           CALL XERRDV(MSG,1510,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           MSG = '   LIRN_ALL (=I1) and LICN_ALL (=I2):'
+           CALL XERRDV(MSG,1510,1,2,LIRN_ALL,LICN_ALL,0,ZERO,ZERO)
+         END IF
+        RETURN
+
+      END SUBROUTINE DVPREPS
+!_______________________________________________________________________
+
+      SUBROUTINE DVRENEW(NEQ,Y,SAVF,EWT,F)
+! ..
+! In the event MA28BD encounters a zero pivot in the LU factorization
+! of the iteration matrix due to an out-of-date MA28AD pivot sequence,
+! re-calculate the sparsity structure using finite differences.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: NEQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), SAVF(*), Y(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DQ, DYJ, ERWT, FAC, YJ
+        INTEGER :: ADDTONZ, I, IER, J, K, KVAL, NP1
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, ALLOCATED, MAX, SIGN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVRENEW
+! ..
+! .. Caution:
+!    This routine must not be called before DVPREPS has been called.
+!
+!    Note:
+!    On entry to DVRENEW, the allocated array sizes of arrays that
+!    may change size are:
+!      ICN, PMAT  = length LICN_ALL
+!      JAN, JVECT = length LIRN_ALL
+!      JMAT       = length NZ_ALL
+!      IGP        = length LENIGP on first entry; N+1 thereafter
+
+!       Check if a numerical Jacobian is being used and stop if
+!       it is not.
+        IF (MITER /= 7) THEN
+          MSG = 'DVRENEW can be used only if MITER = 7.'
+          CALL XERRDV(MSG,1520,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Save Y and SAVF.
+        IF (.NOT.ALLOCATED(YTEMP)) THEN
+           ALLOCATE (YTEMP(N),DTEMP(N),STAT=IER)
+           CALL CHECK_STAT(IER,670)
+        END IF
+        YTEMP(1:N) = Y(1:N)
+        DTEMP(1:N) = SAVF(1:N)
+
+!       Define the amount to be added to the array lengths
+!       if necessary.
+        NP1 = N + 1
+        NNZ = IAN(NP1) - 1
+        ADDTONZ = ELBOW_ROOM * NNZ
+
+!       Just change the size of IGP to N+1 if have not already
+!       done so.
+        IF (SIZE(IGP) /= NP1) THEN
+           DEALLOCATE (IAN,STAT=IER)
+           CALL CHECK_STAT(IER,680)
+           ALLOCATE (IAN(NP1),STAT=IER)
+           CALL CHECK_STAT(IER,690)
+        END IF
+
+!       Go to the differencing section to determine the new
+!       sparsity structure.
+        GOTO 20
+
+10      CONTINUE
+
+!       Reallocate the arrays if necessary.
+        IF (KVAL > LIRN_ALL) THEN
+!          Note: JAN and JVECT may need to be reallocated in DVJACS28.
+           LIRN_ALL = LIRN_ALL + ADDTONZ
+           IF (LIRN_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+             CALL XERRDV(MSG,1530,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (JAN,JVECT,STAT=IER)
+           CALL CHECK_STAT(IER,700)
+           ALLOCATE (JAN(LIRN_ALL),JVECT(LIRN_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,710)
+        END IF
+        IF (KVAL > LICN_ALL) THEN
+!          Note: ICN and PMAT may need to be reallocated in DVJACS28.
+           LICN_ALL = LICN_ALL + ADDTONZ
+           IF (LICN_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+             CALL XERRDV(MSG,1540,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (ICN,PMAT,STAT=IER)
+           CALL CHECK_STAT(IER,720)
+           ALLOCATE (ICN(LICN_ALL),PMAT(LICN_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,730)
+        END IF
+
+   20   CONTINUE
+
+!       Perturb Y for structure determination:
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+
+!       Compute structure from results of N+1 calls to F.
+        K = 1
+        IAN(1) = 1
+        DO I = 1, N
+          ERWT = ONE/EWT(I)
+          FAC = ONE + ONE/(I+ONE)
+          Y(I) = Y(I) + FAC*SIGN(ERWT,Y(I))
+        END DO
+        CALL F(NEQ,TN,Y,SAVF)
+        NFE = NFE + 1
+        DO J = 1, N
+          KVAL = K
+          IF (KVAL > LIRN_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'LIRN_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1550,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1550,1,1,LIRN_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          IF (KVAL > LICN_ALL) THEN
+             IF (LP /= 0) THEN
+                MSG = 'LICN_ALL (=I1) is not large enough.'
+                CALL XERRDV(MSG,1560,1,0,0,0,0,ZERO,ZERO)
+                MSG = 'Allocating more space for another try.'
+                CALL XERRDV(MSG,1560,1,1,LICN_ALL,0,0,ZERO,ZERO)
+             END IF
+             GOTO 10
+          END IF
+          YJ = Y(J)
+          ERWT = ONE/EWT(J)
+          DYJ = SIGN(ERWT,YJ)
+          Y(J) = YJ + DYJ
+          CALL F(NEQ,TN,Y,FTEMP1)
+          NFE = NFE + 1
+          Y(J) = YJ
+          DO 80 I = 1, N
+            DQ = (FTEMP1(I)-SAVF(I))/DYJ
+            IF ((ABS(DQ)<=SETH) .AND. (I/=J)) GOTO 80
+            JAN(K) = I
+            K = K + 1
+80        END DO
+          IAN(J+1) = K
+        END DO
+
+        NNZ = IAN(NP1) - 1
+        IF (NNZ > NZ_ALL .AND. JSV == 1) THEN
+!          Increase the size of JMAT if necessary.
+           NZ_ALL = NNZ
+           IF (LP /= 0) THEN
+              MSG = 'NZ_ALL (=I1) is not large enough.'
+              CALL XERRDV(MSG,1570,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'Allocating more space for another try.'
+              CALL XERRDV(MSG,1570,1,1,NZ_ALL,0,0,ZERO,ZERO)
+           END IF
+           IF (NZ_ALL>MAX_ARRAY_SIZE) THEN
+              MSG = 'Maximum array size exceeded. Stopping in DVRENEW.'
+              CALL XERRDV(MSG,1580,2,0,0,0,0,ZERO,ZERO)
+           END IF
+           DEALLOCATE (JMAT,STAT=IER)
+           CALL CHECK_STAT(IER,740)
+           ALLOCATE (JMAT(NZ_ALL),STAT=IER)
+           CALL CHECK_STAT(IER,750)
+           JMAT(1:NZ_ALL) = ZERO
+        END IF
+
+!       Compute grouping of column indices.
+
+        LENIGP = 0
+        MAXG = 0
+        MAXG = NP1
+        CALL DGROUP(N,IAN,JAN,MAXG,NGP,IGP,JGP,IKEEP28(1,1), &
+          IKEEP28(1,2),IER)
+        IF (IER/=0) THEN
+          MSG = 'An error occurred in DGROUP.'
+          CALL XERRDV(MSG,1590,2,0,0,0,0,ZERO,ZERO)
+        END IF
+        LENIGP = NGP + 1
+
+!       Restore Y and SAVF.
+        Y(1:N) = YTEMP(1:N)
+        SAVF(1:N) = DTEMP(1:N)
+        RETURN
+
+      END SUBROUTINE DVRENEW
+!_______________________________________________________________________
+
+      SUBROUTINE DGROUP(N,IA,JA,MAXG,NGRP,IGP,JGP,INCL,JDONE,IER)
+! ..
+! Construct groupings of the column indices of the Jacobian matrix,
+! used in the numerical evaluation of the Jacobian by finite
+! differences for sparse solutions.
+! ..
+!     Input:
+!     N      = the order of the matrix
+!     IA,JA  = sparse structure descriptors of the matrix by rows
+!     MAXG   = length of available storage in the IGP array
+!     INCL and JDONE are working arrays of length N.
+!     Output:
+!     NGRP   = number of groups
+!     JGP    = array of length N containing the column indices by
+!              groups
+!     IGP    = pointer array of length NGRP + 1 to the locations
+!              in JGP of the beginning of each group
+!     IER    = error indicator. IER = 0 if no error occurred, or
+!              1 if MAXG was insufficient
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IER, NGRP
+        INTEGER, INTENT (IN) :: MAXG, N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*), JA(*)
+        INTEGER, INTENT (INOUT) :: IGP(*), INCL(*), JDONE(*), JGP(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, K, KMAX, KMIN, NCOL, NG
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGROUP
+! ..
+        IER = 0
+        JDONE(1:N) = 0
+        NCOL = 1
+        DO NG = 1, MAXG
+          IGP(NG) = NCOL
+          INCL(1:N) = 0
+          DO 20 J = 1, N
+!           Reject column J if it is already in a group.
+            IF (JDONE(J)==1) GOTO 20
+            KMIN = IA(J)
+            KMAX = IA(J+1) - 1
+            DO 10 K = KMIN, KMAX
+!           Reject column J if it overlaps any column already
+!           in this group.
+              I = JA(K)
+              IF (INCL(I)==1) GOTO 20
+10          END DO
+!           Accept column J into group NG.
+            JGP(NCOL) = J
+            NCOL = NCOL + 1
+            JDONE(J) = 1
+            DO K = KMIN, KMAX
+              I = JA(K)
+              INCL(I) = 1
+            END DO
+20        END DO
+!         Stop if this group is empty (grouping is complete).
+          IF (NCOL==IGP(NG)) GOTO 30
+        END DO
+!       Error return if not all columns were chosen (MAXG too small).
+        IF (NCOL<=N) GOTO 40
+        NG = MAXG
+30      NGRP = NG - 1
+        RETURN
+40      IER = 1
+        RETURN
+
+      END SUBROUTINE DGROUP
+!_______________________________________________________________________
+
+      SUBROUTINE BGROUP(N,BJA,BINCL,BDONE,ML,MU)
+! ..
+! Construct groupings of the column indices of the Jacobian
+! matrix, used in the numerical evaluation of the Jacobian
+! by finite differences for banded solutions when the nonzero
+! sub and super diagonals are known. BGROUP is similar to
+! DGROUP but it does not require the sparse structure arrays
+! and it uses real rather than integer work arrays.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       BINCL   = real working array of length N
+!       BJA     = real working array of length N
+!       BDONE   = real working array of length N
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!
+!     Output: (PRIVATE information used in DVJAC)
+!
+!       BNGRP   = integer number of groups
+!       BJGP    = integer array of length N containing the
+!                 column indices by groups
+!       BIGP    = integer pointer array of length BNGRP + 1
+!                 to the locations in BJGP of the beginning
+!                 of each group
+!
+!       Note:
+!          On output:
+!             For I = 1, ..., BNGRP:
+!                Start of group I:
+!                  J = BIGP(I)
+!                Number of columns in group I:
+!                  K = BIGP(I+1) - BIGP(I)
+!                Columns in group I:
+!                  BJGP(J-1+L), L=1, ..., K
+!
+!    Note:
+!    The three arrays BJA, BINCL, and BDONE are REAL to avoid the
+!    necessity to allocate three new INTEGER arrays. BGROUP can
+!    be called only at an integration start or restart because
+!    DVODE_F90 work arrays are used for these arrays.
+!
+!    Note:
+!    The PRIVATE banded information SUBDS, NSUBDS, SUPDS, NSUPS,
+!    ML, and MU must be defined before calling BGROUP.
+!       ML        = lower bandwidth
+!       MU        = upper bandwidth
+!       NSUBS     = number of strict sub diagonals
+!       SUBDS(I)  = row in which the Ith sub diagonal
+!                   begins, I=1, ..., NSUBS
+!       NSUPS     = number of strict super diagonals
+!       SUPDS(I)  = column in which the Ith super diagonal
+!                   begins, I=1, ..., NSUPS
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: BINCL(*), BJA(*), BDONE(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IBDONE, IBINCL, IER, J, K, KBEGIN, KFINI, &
+          KI, KJ, MAXG, NCOL, NG
+        KPP_REAL :: FUDGE, ONE_PLUS_FUDGE
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC INT, MAX, MIN, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT BGROUP
+! ..
+!       Storage for the column grouping information.
+        IF (ALLOCATED(BIGP)) THEN
+           DEALLOCATE (BIGP,BJGP,STAT=IER)
+           CALL CHECK_STAT(IER,760)
+        END IF
+        ALLOCATE (BIGP(N+1),BJGP(N),STAT=IER)
+        CALL CHECK_STAT(IER,770)
+
+        FUDGE = 0.4_dp
+        ONE_PLUS_FUDGE = 1.0_dp + FUDGE
+        MAXG = N + 1
+!       BDONE(1:N) = 0 ...
+        BDONE(1:N) = FUDGE
+        NCOL = 1
+        DO NG = 1, MAXG
+           BIGP(NG) = NCOL
+!          BINCL(1:N) = 0 ...
+           BINCL(1:N) = FUDGE
+           DO 30 J = 1, N
+!             Reject column J if it is already in a group.
+!             IF (BDONE(J) == 1) GOTO 30 ...
+              IBDONE = INT(BDONE(J))
+              IF (IBDONE == 1) GOTO 30
+!             Vertical extent of band = KBEGIN to KFINI.
+!             KJ = number of nonzeros in column J.
+!             BJA(K) = K implies nonzero at (k,j).
+              KBEGIN = MAX(J-MU,1)
+              KFINI = MIN(J+ML,N)
+              KJ = 0
+!             BJA(1:N) = 0 ...
+              BJA(1:N) = FUDGE
+!             Locate the row positions of the nonzeros in column J.
+!             Restrict attention to the band:
+              DO 10 K = KBEGIN, KFINI
+                 IF (K < J) THEN
+                    IF (NSUPS > 0) THEN
+                       DO I = NSUPS, 1, -1
+!                         KI = SUPDS(I) + J - 1
+                          KI = J + 1 - SUPDS(I)
+                          IF (K == KI) THEN
+                             KJ = KJ + 1
+!                            BJA(K) = K ...
+                             BJA(K) = REAL(K) + FUDGE
+                          END IF
+                       END DO
+                    END IF
+                 ELSEIF (K == J) THEN
+                    KJ = KJ + 1
+!                   BJA(K) = K ...
+                    BJA(K) = REAL(K) + FUDGE
+                 ELSE
+                    IF (NSUBS > 0) THEN
+                       DO I = NSUBS, 1, -1
+                          KI = SUBDS(I) + J -1
+                          IF (K == KI) THEN
+                             KJ = KJ + 1
+!                            BJA(K) = K ...
+                             BJA(K) = REAL(K) + FUDGE
+                          END IF
+                       END DO
+                    END IF
+              END IF
+ 10           CONTINUE
+!             At this point BJA contains the row numbers for
+!             the nonzeros in column J.
+              DO 20 K = KBEGIN, KFINI
+!                Reject column J if it overlaps any column
+!                already in this group.
+!                I = BJA(K)
+                 I = INT(BJA(K))
+                 IBINCL = INT(BINCL(I))
+!                IF (BINCL(I) == 1 .AND. I == K) GOTO 30
+                 IF (IBINCL == 1 .AND. I == K) GOTO 30
+ 20           END DO
+!             Accept column J into group NG.
+              BJGP(NCOL) = J
+              NCOL = NCOL + 1
+!             BDONE(J) = 1 ...
+              BDONE(J) = ONE_PLUS_FUDGE
+              DO K = 1, N
+!                IF (I == K) BINCL(I) = 1 ...
+                 I = INT(BJA(K))
+                 IF (I == K) BINCL(I) = ONE_PLUS_FUDGE
+              END DO
+ 30        END DO
+!          Done if this group is empty (grouping is complete).
+           IF (NCOL == BIGP(NG)) GOTO 40
+        END DO
+
+!       Should not get here since MAXG = N + 1.
+!       Terminal error if not all columns were chosen
+!       because MAXG too small.
+        IF (NCOL <= N) THEN
+           MSG = 'An impossible error occurred in subroutine BGROUP.'
+           CALL XERRDV(MSG,1600,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+        NG = MAXG
+ 40     BNGRP = NG - 1
+
+!       Trim BIGP to it's actual size if necessary.
+        IF (NG < MAXG) THEN
+!          BJA(1:NG) = BIGP(1:NG) ...
+           DO I = 1, NG
+              BJA(I) = REAL(BIGP(I)) + FUDGE
+           END DO
+           DEALLOCATE (BIGP,STAT=IER)
+           CALL CHECK_STAT(IER,780)
+           ALLOCATE (BIGP(NG),STAT=IER)
+           CALL CHECK_STAT(IER,790)
+!          BIGP(1:NG) = BJA(1:NG) ...
+           DO I = 1, NG
+              BIGP(I) = INT(BJA(I))
+           END DO
+        END IF
+        RETURN
+
+      END SUBROUTINE BGROUP
+!_______________________________________________________________________
+
+      SUBROUTINE BANDED_IAJA(N,ML,MU)
+! ..
+! Build the sparse structure descriptor arrays for a banded
+! matrix if the nonzero diagonals are known.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!
+!     Output: (PRIVATE information used in DVJAC)
+!
+!       IAB     = IA descriptor array
+!       JAB     = JA descriptor array
+!
+!    Note:
+!    The PRIVATE banded information SUBDS, NSUBS, SUPDS, NSUPS,
+!    ML, and MU must be defined before calling BANDED_IAJA.
+!       ML        = lower bandwidth
+!       MU        = upper bandwidth
+!       NSUBS     = number of strict sub diagonals
+!       SUBDS(I)  = row in which the Ith sub diagonal
+!                   begins, I=1, ..., NSUBS
+!       NSUPS     = number of strict super diagonals
+!       SUPDS(I)  = column in which the Ith super diagonal
+!                   begins, I=1, ..., NSUPS
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IER, J, K, KBEGIN, KFINI, KI, KJ, &
+          NP1, NZBB
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC ALLOCATED, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT BANDED_IAJA
+! ..
+!    Check for errors.
+
+     IF (.NOT.BUILD_IAJA) THEN
+        MSG = 'BANDED_IAJA cannot be called with BUILD_IAJA = .FALSE.'
+        CALL XERRDV(MSG,1610,2,0,0,0,0,ZERO,ZERO)
+     END IF
+
+     IF (NSUBS < 0) THEN
+        MSG = 'NSUBS < 0 in BANDED_IAJA.'
+        CALL XERRDV(MSG,1620,2,0,0,0,0,ZERO,ZERO)
+     ELSE
+        IF (NSUBS > 0) THEN
+           IF (NSUBS /= SIZE(SUBDS)) THEN
+              MSG = 'The size of the SUBDS array must'
+              CALL XERRDV(MSG,1630,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'equal NSUBS in BANDED_IAJA.'
+              CALL XERRDV(MSG,1630,2,0,0,0,0,ZERO,ZERO)
+           END IF
+        END IF
+     END IF
+
+     IF (NSUPS < 0) THEN
+        MSG = 'NSUPS < 0 in BANDED_IAJA.'
+        CALL XERRDV(MSG,1640,2,0,0,0,0,ZERO,ZERO)
+     ELSE
+        IF (NSUPS > 0) THEN
+           IF (NSUPS /= SIZE(SUPDS)) THEN
+              MSG = 'The size of the SUPDS array must'
+              CALL XERRDV(MSG,1650,1,0,0,0,0,ZERO,ZERO)
+              MSG = 'equal NSUPS in BANDED_IAJA.'
+              CALL XERRDV(MSG,1650,2,0,0,0,0,ZERO,ZERO)
+           END IF
+        END IF
+     END IF
+
+!    Allocate the necessary storage for the descriptor arrays.
+
+!    Define the total number of elements in all diagonals.
+     NP1 = N + 1
+     NZB = (NSUBS + NSUPS + 1) * NP1 - 1
+     IF (NSUBS /= 0) THEN
+        DO I = 1, NSUBS
+           NZB = NZB - SUBDS(I)
+        END DO
+     END IF
+     IF (NSUPS /= 0) THEN
+        DO I = 1, NSUPS
+           NZB = NZB - SUPDS(I)
+        END DO
+     END IF
+     IF (ALLOCATED(IAB)) THEN
+        DEALLOCATE(IAB,JAB,STAT=IER)
+        CALL CHECK_STAT(IER,800)
+     END IF
+     ALLOCATE(IAB(NP1),JAB(NZB),STAT=IER)
+     CALL CHECK_STAT(IER,810)
+     IAB(1) = 1
+     NZBB = 0
+
+!    For each column in the matrix...
+     DO J = 1, N
+!       Vertical extent of band = KBEGIN to KFINI.
+!       KJ = number of nonzeros in column J.
+        KBEGIN = MAX(J-MU,1)
+        KFINI = MIN(J+ML,N)
+        KJ = 0
+!       Locate the row positions of the nonzeros in column J.
+!       (Restrict attention to the band.)
+        IAB(J+1) = IAB(J)
+!       For each row in the intersection of the band with
+!       this column ...
+        DO K = KBEGIN, KFINI
+!          Does column J intersect a super diagonal at (K,J)?
+           IF (K < J) THEN
+              DO I = NSUPS, 1, -1
+                 KI = J + 1 - SUPDS(I)
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    IAB(J+1) = IAB(J+1) + 1
+                    NZBB = NZBB + 1
+                    JAB(NZBB) = K
+                    GOTO 10
+                 END IF
+              END DO
+           ELSEIF (K == J) THEN
+!             We are on the main diagonal.
+              KJ = KJ + 1
+              IAB(J+1) = IAB(J+1) + 1
+              NZBB = NZBB + 1
+              JAB(NZBB) = K
+              GOTO 10
+           ELSE
+!             Does column J intersect a sub diagonal at (K,J)?
+              DO I = NSUBS, 1, -1
+                 KI = SUBDS(I) + J - 1
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    IAB(J+1) = IAB(J+1) + 1
+                    NZBB = NZBB + 1
+                    JAB(NZBB) = K
+                    GOTO 10
+                 END IF
+              END DO
+           END IF
+10         CONTINUE
+        END DO
+     END DO
+
+     IF (NZBB /= NZB) THEN
+        MSG = 'NZBB (I1) is not equal to NZB (I2)'
+        CALL XERRDV(MSG,1660,1,0,0,0,0,ZERO,ZERO)
+        MSG = 'in BANDED_IAJA.'
+        CALL XERRDV(MSG,1660,2,2,NZBB,NZB,0,ZERO,ZERO)
+     END IF
+     RETURN
+
+   END SUBROUTINE BANDED_IAJA
+!_______________________________________________________________________
+
+      SUBROUTINE BANDED_GET_BJNZ(N,ML,MU,JCOL,JNZ,NZJ)
+! ..
+! Locate the nonzeros in a given column of a sparse banded matrix
+! with known diagonals. This is a version of BANDED_IAJA modified
+! to do only one column.
+! ..
+!     Input:
+!
+!       N       = the order of the matrix (number of odes)
+!       ML      = integer lower bandwidth
+!       MU      = integer upper bandwidth
+!       JCOL    = column number between 1 and N
+!       JZ      = integer array of length N
+!
+!     Output:
+!
+!       JNZ    = integer array of length N. If
+!                 JNZ(K) is not 0, there is a
+!                 nonzero at position (K,JCOL)
+!       NZJ     = number of nozeros in column JCOL
+!
+!    Caution:
+!    No parameter checking is done since this subroutine
+!    will be called many times. Note that a number of
+!    PRIVATE parameters must be set before calling this
+!    subroutine.
+! ..
+        IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, ML, MU, JCOL
+        INTEGER, INTENT (OUT) :: NZJ
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (OUT) :: JNZ(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, K, KBEGIN, KFINI, KI, KJ
+! ..
+! .. Intrinsic Functions ..
+     INTRINSIC MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT BANDED_GET_BJNZ
+! ..
+        JNZ(1:N) = 0
+        J = JCOL
+
+!       Locate the row positions of the nonzeros in column J.
+
+!       Vertical extent of band = KBEGIN to KFINI.
+        KBEGIN = MAX(J-MU,1)
+        KFINI = MIN(J+ML,N)
+!       KJ = number of nonzeros in column J.
+        KJ = 0
+!       For each row in the intersection of the band with
+!       this column ...
+        DO K = KBEGIN, KFINI
+!          Does column J intersect a super diagonal at (K,J)?
+           IF (K < J) THEN
+              DO I = NSUPS, 1, -1
+                 KI = J + 1 - SUPDS(I)
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    JNZ(KJ) = K
+                    GOTO 10
+                 END IF
+              END DO
+           ELSEIF (K == J) THEN
+!             We are on the main diagonal.
+              KJ = KJ + 1
+              JNZ(KJ) = K
+              GOTO 10
+           ELSE
+!             Does column J intersect a sub diagonal at (K,J)?
+              DO I = NSUBS, 1, -1
+                 KI = SUBDS(I) + J - 1
+                 IF (K == KI) THEN
+                    KJ = KJ + 1
+                    JNZ(KJ) = K
+                    GOTO 10
+                 END IF
+              END DO
+           END IF
+10         CONTINUE
+        END DO
+        NZJ = KJ
+     RETURN
+
+   END SUBROUTINE BANDED_GET_BJNZ
+!_______________________________________________________________________
+
+! Beginning of Jacobian related routines that use MA28
+
+      SUBROUTINE DVNLSS28(Y,YH,LDYH,SAVF,EWT,ACOR,IWM,WM,F,JAC, &
+        NFLAG,ATOL,ITOL)
+! ..
+! This is the nonlinear system solver for MA28 based sparse solutions.
+! ..
+! Subroutine DVNLSS28 is a nonlinear system solver, which uses functional
+! iteration or a chord (modified Newton) method. For the chord method
+! direct linear algebraic system solvers are used. Subroutine DVNLSS28
+! then handles the corrector phase of this integration package.
+! Communication with DVNLSS28 is done with the following variables. (For
+! more details, please see the comments in the driver subroutine.)
+! Y          = The dependent variable, a vector of length N, input.
+! YH         = The Nordsieck (Taylor) array, LDYH by LMAX, input
+!              and output. On input, it contains predicted values.
+! LDYH       = A constant >= N, the first dimension of YH, input.
+! SAVF       = A work array of length N.
+! EWT        = An error weight vector of length N, input.
+! ACOR       = A work array of length N, used for the accumulated
+!              corrections to the predicted y vector.
+! WM,IWM     = Real and integer work arrays associated with matrix
+!              operations in chord iteration (MITER /= 0).
+! F          = Dummy name for user supplied routine for f.
+! JAC        = Dummy name for user supplied Jacobian routine.
+! NFLAG      = Input/output flag, with values and meanings as follows:
+!              INPUT
+!                  0 first call for this time step.
+!                 -1 convergence failure in previous call to DVNLSS28.
+!                 -2 error test failure in DVSTEP.
+!              OUTPUT
+!                  0 successful completion of nonlinear solver.
+!                 -1 convergence failure or singular matrix.
+!                 -2 unrecoverable error in matrix preprocessing
+!                    (cannot occur here).
+!                 -3 unrecoverable error in solution (cannot occur
+!                    here).
+! IPUP       = Own variable flag with values and meanings as follows:
+!              0,          do not update the Newton matrix.
+!              MITER \= 0  update Newton matrix, because it is the
+!                          initial step, order was changed, the error
+!                          test failed, or an update is indicated by
+!                          the scalar RC or step counter NST.
+! For more details, see comments in driver subroutine.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: ITOL, LDYH
+        INTEGER, INTENT (INOUT) :: NFLAG
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ACOR(*), EWT(*), SAVF(*), &
+          WM(*), Y(*), YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+        INTEGER IWM(*)
+        LOGICAL DUMMY
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACNRMNEW, CSCALE, DCON, DEL, DELP
+        INTEGER :: I, IERPJ, IERSL, M
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNLSS28
+! ..
+! Get rid of a couple of needless compiler warning messages.
+        DUMMY = .FALSE.
+        IF (DUMMY) THEN
+          WM(1) = ZERO
+          IWM(1) = 0
+        END IF  
+! On the first step, on a change of method order, or after a
+! nonlinear convergence failure with NFLAG = -2, set IPUP = MITER
+! to force a Jacobian update when MITER /= 0.
+        IF (JSTART==0) NSLP = 0
+        IF (NFLAG==0) ICF = 0
+        IF (NFLAG==-2) IPUP = MITER
+        IF ((JSTART==0) .OR. (JSTART==-1)) IPUP = MITER
+!       If this is functional iteration, set CRATE = 1 and drop
+!       to 220.
+        IF (MITER==0) THEN
+          CRATE = ONE
+          GOTO 10
+        END IF
+
+! RC is the ratio of new to old values of the coefficient H/EL(2)=h/l1.
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER
+! to force DVJACS28 to be called, if a Jacobian is involved. In any
+! case, DVJACS28 is called at least every MSBP steps.
+
+        DRC = ABS(RC-ONE)
+        IF (DRC>CCMAX .OR. NST>=NSLP+MSBP) IPUP = MITER
+
+! Up to MAXCOR corrector iterations are taken. A convergence test is
+! made on the r.m.s. norm of each correction, weighted by the error
+! weight vector EWT. The sum of the corrections is accumulated in the
+! vector ACOR(i). The YH array is not altered in the corrector loop.
+
+10      M = 0
+        DELP = ZERO
+! Original:
+!       CALL DCOPY_F90(N,YH(1,1),1,Y,1)
+        CALL DCOPY_F90(N,YH(1:N,1),1,Y(1:N),1)
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(IDX(I)),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(IDX(I)),ZERO)
+          END DO
+        END IF
+        IF (IPUP<=0) GOTO 20
+
+! If indicated, the matrix P = I - h*rl1*J is reevaluated and
+! preprocessed before starting the corrector iteration. IPUP
+! is set to 0 as an indicator that this has been done.
+
+        CALL DVJACS28(Y,YH,LDYH,EWT,ACOR,SAVF,F,JAC,IERPJ,N, &
+          ATOL,ITOL)
+        IPUP = 0
+        RC = ONE
+        DRC = ZERO
+        CRATE = ONE
+        NSLP = NST
+!     If matrix is singular, take error return to force cut in
+!     step size.
+        IF (IERPJ/=0) GOTO 70
+20      ACOR(1:N) = ZERO
+!       This is a looping point for the corrector iteration.
+30      IF (MITER/=0) GOTO 40
+
+! In the case of functional iteration, update Y directly from
+! the result of the last function evaluation.
+
+        SAVF(1:N) = RL1*(H*SAVF(1:N)-YH(1:N,2))
+        Y(1:N) = SAVF(1:N) - ACOR(1:N)
+        DEL = DVNORM(N,Y,EWT)
+        Y(1:N) = YH(1:N,1) + SAVF(1:N)
+        CALL DCOPY_F90(N,SAVF,1,ACOR,1)
+        GOTO 50
+
+! In the case of the chord method, compute the corrector error,
+! and solve the linear system with that as right-hand side and
+! P as coefficient matrix. The correction is scaled by the factor
+! 2/(1+RC) to account for changes in h*rl1 since the last
+! DVJACS28 call.
+
+40      Y(1:N) = (RL1*H)*SAVF(1:N) - (RL1*YH(1:N,2)+ACOR(1:N))
+        CALL DVSOLS28(Y,SAVF,IERSL)
+        NNI = NNI + 1
+        IF (IERSL>0) GOTO 60
+        IF (METH==2 .AND. ABS(RC-ONE)>ZERO) THEN
+          CSCALE = TWO/(ONE+RC)
+          CALL DSCAL_F90(N,CSCALE,Y,1)
+        END IF
+        DEL = DVNORM(N,Y,EWT)
+        CALL DAXPY_F90(N,ONE,Y,1,ACOR,1)
+        Y(1:N) = YH(1:N,1) + ACOR(1:N)
+
+! Test for convergence. If M > 0, an estimate of the convergence
+! rate constant is stored in CRATE, and this is used in the test.
+
+50      IF (M/=0) CRATE = MAX(CRDOWN*CRATE,DEL/DELP)
+        DCON = DEL*MIN(ONE,CRATE)/TQ(4)
+        IF (DCON<=ONE) GOTO 80
+        M = M + 1
+        IF (M==MAXCOR) GOTO 60
+        IF (M>=2 .AND. DEL>RDIV*DELP) GOTO 60
+        DELP = DEL
+        CALL F(N,TN,Y,SAVF)
+        NFE = NFE + 1
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            IF (ABS(YH(IDX(I),1)-LB(I))<=ZERO) SAVF(IDX(I)) = &
+              MAX(SAVF(I),ZERO)
+            IF (ABS(YH(IDX(I),1)-UB(I))<=ZERO) SAVF(IDX(I)) = &
+              MIN(SAVF(I),ZERO)
+          END DO
+        END IF
+        GOTO 30
+
+60      IF (MITER==0 .OR. JCUR==1) GOTO 70
+        ICF = 1
+        IPUP = MITER
+        GOTO 10
+
+70      CONTINUE
+        NFLAG = -1
+        ICF = 2
+        IPUP = MITER
+        RETURN
+
+!       Return for successful step.
+80      NFLAG = 0
+
+!       Enforce bounds.
+        IF (BOUNDS) THEN
+          CHANGED_ACOR = .FALSE.
+          IF (M==0) THEN
+            ACNRM = DEL
+          ELSE
+            ACNRM = DVNORM(N,ACOR,EWT)
+          END IF
+          IF (MITER/=0) THEN
+!           Since Y(:) = YH(:,1) + ACOR(:):
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+              IF (Y(IDX(I))>UB(I)) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+                SAVF(IDX(I)) = ACOR(IDX(I))
+              END IF
+            END DO
+          ELSE
+!           Since Y(:) = YH(:,1) + SAVF(:) and
+!           since CALL DCOPY_F90(N, SAVF, 1, ACOR, 1) ...
+            DO I = 1, NDX
+              IF (Y(IDX(I))<LB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = LB(I) - YH(IDX(I),1)
+              END IF
+              IF (Y(IDX(I))>UB(IDX(I))) THEN
+                CHANGED_ACOR = .TRUE.
+                ACOR(IDX(I)) = UB(I) - YH(IDX(I),1)
+              END IF
+            END DO
+          END IF
+          IF (CHANGED_ACOR) THEN
+            IF (M==0) THEN
+              ACNRMNEW = DEL
+            ELSE
+              ACNRMNEW = DVNORM(N,ACOR,EWT)
+            END IF
+            ACNRM = MAX(ACNRM,ACNRMNEW)
+          ELSE
+          END IF
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+        ELSE
+!         No projections are required.
+          NFLAG = 0
+          JCUR = 0
+          ICF = 0
+          IF (M==0) ACNRM = DEL
+          IF (M>0) ACNRM = DVNORM(N,ACOR,EWT)
+        END IF
+        RETURN
+
+      END SUBROUTINE DVNLSS28
+!_______________________________________________________________________
+
+      SUBROUTINE DVSOLS28(X,TEM,IERSL)
+! ..
+! Manage the solution of the MA28 based sparse linear system arising
+! from a chord iteration.
+! ..
+! This routine solves the sparse linear system arising from a chord
+! iteration. If MITER is 6 or 7, it calls MA28CD to accomplish this.
+! Communication with DVSOLS28 uses the following variables:
+! X = The right-hand side vector on input, and the solution vector
+!     on output, of length N.
+! TEM (=SAVF(*))
+! IERSL = Output flag. IERSL = 0 if no trouble occurred.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERSL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: TEM(*), X(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVSOLS28
+! ..
+        IF (SCALE_MATRIX) THEN
+           DO I = 1, N
+              X(I) = X(I) * RSCALEX(I)
+           END DO
+        END IF
+        IERSL = 0
+        CALL MA28CD(N,PMAT,LICN_ALL,ICN,IKEEP28,X,TEM,1)
+        MA28CD_CALLS = MA28CD_CALLS + 1
+        IF (SCALE_MATRIX) THEN
+           DO I = 1, N
+              X(I) = X(I) * CSCALEX(I)
+           END DO
+        END IF
+        RETURN
+
+      END SUBROUTINE DVSOLS28
+!_______________________________________________________________________
+
+      SUBROUTINE DVJACS28(Y,YH,LDYH,EWT,FTEMP1,SAVF,F,JAC,IERPJ,N, &
+        ATOL,ITOL)
+! ..
+! Compute and process P = I - H*RL1*J, where J is an approximation to
+! the MA28 based sparse Jacobian.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IERPJ
+        INTEGER, INTENT (IN) :: LDYH, N, ITOL
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: EWT(*), FTEMP1(*), SAVF(*), Y(*), YH(LDYH,*)
+        KPP_REAL, INTENT (IN) :: ATOL(*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL F, JAC
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CON, FAC, HRL1, R, R0, SRUR
+        INTEGER :: I, IER, J, JER, JJ, JJ1, JJ2, K, K1, K2, MA28,       &
+          MA28SAVE, MB28SAVE, NG, NZ
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, EXP, MAX, REAL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVJACS28
+! ..
+        IERPJ = 0
+
+!       Structure determination
+
+!       Calculate the sparsity structure if this is the first call to
+!       DVJACS28 with ISTATE = 1 or if it is a continuation call with
+!       ISTATE = 3.
+        IF (ISTATC==1 .OR. ISTATC==3) THEN
+          CALL DVPREPS(N,Y,YH,LDYH,DTEMP,EWT,F,JAC)
+          ISTATC = 0
+        END IF
+        JCUR = 0
+        HRL1 = H*RL1
+        CON = -HRL1
+
+!       If MA28 = 4 the saved copy of the Jacobian will be used
+!       to restore PMAT. If MA28 = 1,2,3 the Jacobian will be
+!       recomputed. If MA28 = 1,2 the JVECT and ICN pointer arrays
+!       will be defined and MA28AD will be called to decompose
+!       PMAT. If MA28 = 3 the JVECT pointer array will be defined
+!       and MA28BD will be called to decompose PMAT using the ICN
+!       pointer array returned in the last call to MA28AD.
+
+        MA28 = 4
+        IF (INEWJ==1 .OR. MB28==0) MA28 = 3
+        IF (NST>=NSLJ+MSBJ) MA28 = 3
+!       IF (ICF==1 .OR. ICF==2) MA28 = 3
+        IF (ICF==1 .AND. DRC<CCMXJ) MA28 = 3
+        IF (ICF==2) MA28 = 3
+        IF (NST>=NSLG+MSBG) MA28 = 2
+        IF (JSTART==0 .OR. JSTART==-1) MA28 = 1
+        JSTART = 1
+10      IF (MA28<=2) NSLG = NST
+        IF (MA28<=3) NSLJ = NST
+
+!       Analytical Sparse Jacobian
+
+!       If MITER = 6, call JAC to evaluate J analytically, multiply
+!       J by CON = -H*EL(1), and add the identity matrix to form P.
+        IF (MITER==6) THEN
+          IF (MA28==4) THEN
+!           Reuse the saved Jacobian.
+            NZ = IAN(N+1) - 1
+            PMAT(1:NZ) = CON*JMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==JVECT(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 90
+          END IF
+          JCUR = 1
+          NJE = NJE + 1
+          IF (MA28==1 .OR. MA28==2) THEN
+            NZ = IAN(N+1) - 1
+            CALL JAC(N,TN,Y,IAN,JAN,NZ,PMAT)
+            NZ = IAN(N+1) - 1
+            IF (NZ>NZ_ALL) THEN
+              MSG = 'DVODE_F90-- NZ > NZ_ALL in DVJACS28.'
+              CALL XERRDV(MSG,1670,2,0,0,0,0,ZERO,ZERO)
+            END IF
+!           Define column pointers for MA28AD.
+            CALL SET_ICN(N,IAN,ICN)
+            CALL CHECK_DIAG(N,IAN,JAN,ICN)
+            PMAT(1:NZ) = CON*PMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==ICN(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 80
+          ELSE
+!           MA28 = 3...
+            NZ = IAN(N+1) - 1
+            CALL JAC(N,TN,Y,IAN,JAN,NZ,PMAT)
+            NZ = IAN(N+1) - 1
+            IF (NZ>NZ_ALL) THEN
+              MSG = 'DVODE_F90-- NZ > NZ_ALL in DVJACS28.'
+              CALL XERRDV(MSG,1680,2,0,0,0,0,ZERO,ZERO)
+            END IF
+!           Define column pointers for MA28AD.
+            CALL SET_ICN(N,IAN,JVECT)
+            CALL CHECK_DIAG(N,IAN,JAN,JVECT)
+            IF (INEWJ/=1) JMAT(1:NZ) = PMAT(1:NZ)
+            PMAT(1:NZ) = CON*PMAT(1:NZ)
+            DO K = 1, NZ
+              IF (JAN(K)==JVECT(K)) PMAT(K) = PMAT(K) + ONE
+            END DO
+            GOTO 90
+          END IF
+        END IF
+
+!       Finite Difference Sparse Jacobian
+
+!       If MITER = 7, evaluate J numerically, multiply J by
+!       CON, and add the identity matrix to form P.
+        IF (MITER==7) THEN
+          IF (MA28==4) THEN
+!           Reuse the saved constant Jacobian.
+            NZ = IAN(N+1) - 1
+            PMAT(1:NZ) = CON*JMAT(1:NZ)
+            DO J = 1, N
+              K1 = IAN(J)
+              K2 = IAN(J+1) - 1
+              DO K = K1, K2
+                I = JAN(K)
+                IF (I==J) PMAT(K) = PMAT(K) + ONE
+              END DO
+            END DO
+            GOTO 90
+          ELSE
+            NZ = IAN(N+1) - 1
+            JCUR = 1
+            IF (.NOT.(J_IS_CONSTANT.AND.J_HAS_BEEN_COMPUTED)) THEN
+               IF (USE_JACSP) THEN
+!                 Approximate the Jacobian using Doug Salane's JACSP.
+!                 The JPNTRDS and INDROWDS pointer arrays were defined
+!                 in DVPREPS (and altered in DSM).
+                  IOPTDS(1) = 2
+                  IOPTDS(2) = 0
+                  IOPTDS(3) = 1
+                  IOPTDS(5) = 0
+!                 INFORDS(4) was initialized in DVPREPS (and altered in
+!                 the first call to JACSP).
+                  LWKDS  = 3 * N
+                  LIWKDS = 50 + N
+                  NRFJACDS = NZ
+                  NCFJACDS = 1
+
+!                 Set flag to indicate how the YSCALE vector will be
+!                 set for JACSP.
+                  LIKE_ORIGINAL_VODE = .FALSE.
+!                 Calculate the YSCALEDS vector for JACSPDV.
+                  IF (LIKE_ORIGINAL_VODE) THEN
+                     FAC = DVNORM(N,SAVF,EWT)
+!                    JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                    R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                     R0 = THOU*ABS(H)*REAL(N)*FAC
+                     IF (ABS(R0)<=ZERO) R0 = ONE
+!                    SRUR = WM1
+                     DO J = 1, N
+!                       JACSPDB multiplies YSCALEDS(*) BY UROUND**0.825:
+!                       R = MAX(ABS(Y(J)),R0/EWT(J))
+                        R = MAX(ABS(Y(J))/U325,(R0/EWT(J))*U125)
+                        YSCALEDS(J) = R
+                     END DO
+                  ELSE
+                     IF (ITOL == 1 .OR. ITOL == 3) THEN
+                        DO J = 1, N
+                           YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(1),UROUND)
+                        END DO
+                     ELSE
+                        DO J = 1, N
+                          YSCALEDS(J) = MAX(ABS(Y(J)),ATOL(J),UROUND)
+                        END DO
+                     END IF
+                  END IF
+
+                  CALL JACSPDB(F,N,TN,Y,SAVF,PMAT(1),NRFJACDS, &
+                    YSCALEDS,FACDS,IOPTDS,WKDS,LWKDS,IWKDS,LIWKDS, &
+                    MAXGRPDS,NGRPDS,JPNTRDS,INDROWDS)
+                  NFE = NFE + IWKDS(7)
+                  NJE = NJE + 1
+
+                  DO NG = 1, MAXGRPDS
+                    JJ1 = IGP(NG)
+                    JJ2 = IGP(NG+1) - 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      K1 = IAN(J)
+                      K2 = IAN(J+1) - 1
+                      DO K = K1, K2
+                        I = JAN(K)
+                        GOTO (17,17,18) MA28
+!                       Define the row pointers for MA28AD.
+17                      JVECT(K) = I
+!                       Define the column pointers for MA28AD.
+                        ICN(K) = J
+                        GOTO 19
+!                       Define the column pointers for MA28AD.
+18                      JVECT(K) = J
+19                      CONTINUE
+                        IF (INEWJ==0) JMAT(K) = PMAT(K)
+                        PMAT(K) = CON*PMAT(K)
+                        IF (I==J) PMAT(K) = PMAT(K) + ONE
+                      END DO
+                    END DO
+                  END DO
+                  NFE = NFE + MAXGRPDS
+               ELSE
+                  FAC = DVNORM(N,SAVF,EWT)
+                  R0 = THOU*ABS(H)*UROUND*REAL(N)*FAC
+                  IF (ABS(R0)<=ZERO) R0 = ONE
+                  SRUR = WM1
+                  DO NG = 1, NGP
+                    JJ1 = IGP(NG)
+                    JJ2 = IGP(NG+1) - 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                      Y(J) = Y(J) + R
+                    END DO
+                    CALL F(N,TN,Y,FTEMP1)
+                    NFE = NFE + 1
+                    DO JJ = JJ1, JJ2
+                      J = JGP(JJ)
+                      Y(J) = YH(J,1)
+                      R = MAX(SRUR*ABS(Y(J)),R0/EWT(J))
+                      FAC = ONE / R
+                      K1 = IAN(J)
+                      K2 = IAN(J+1) - 1
+                      DO K = K1, K2
+                        I = JAN(K)
+                        GOTO (20,20,30) MA28
+!                       Define row pointers for MA28AD.
+20                      JVECT(K) = I
+!                       Define column pointers for MA28AD.
+                        ICN(K) = J
+                        GOTO 40
+!                       Define column pointers for MA28AD.
+30                      JVECT(K) = J
+40                      PMAT(K) = (FTEMP1(I)-SAVF(I)) * FAC
+                        IF (INEWJ==0) JMAT(K) = PMAT(K)
+                        PMAT(K) = CON*PMAT(K)
+                        IF (I==J) PMAT(K) = PMAT(K) + ONE
+                      END DO
+                    END DO
+                  END DO
+                  NFE = NFE + NGP
+                  NJE = NJE + 1
+               END IF
+               IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .TRUE.
+            ELSE
+!              Do not recompute the constant Jacobian.
+!              Reuse the saved Jacobian.
+               NZ = IAN(N+1) - 1
+               PMAT(1:NZ) = CON*JMAT(1:NZ)
+               DO J = 1, N
+                 K1 = IAN(J)
+                 K2 = IAN(J+1) - 1
+                 DO K = K1, K2
+                   I = JAN(K)
+                   IF (I==J) PMAT(K) = PMAT(K) + ONE
+                   GOTO (50,50,60) MA28
+!                  Define row pointers for MA28AD.
+50                 JVECT(K) = I
+!                  Define column pointers for MA28AD.
+                   ICN(K) = J
+                   GOTO 70
+!                  Define column pointers for MA28AD.
+60                 JVECT(K) = J
+70                 CONTINUE
+                 END DO
+               END DO
+            END IF
+            GOTO (80,80,90) MA28
+          END IF
+        END IF
+
+!       MA28AD does an LU factorization based on a pivotal strategy
+!       designed to compromise between maintaining sparsity and
+!       controlling loss of accuracy due to roundoff error. Unless
+!       magnitudes of Jacobian elements change so as to invalidate
+!       choice of pivots, MA28AD need only be called at beginning
+!       of the integration.
+
+80      CONTINUE
+        IF (SCALE_MATRIX) THEN
+!          MA19AD computes scaling factors for the iteration matrix.
+           CALL MC19AD(N,NZ,PMAT,JAN,ICN,RSCALEX,CSCALEX,WSCALEX)
+           MC19AD_CALLS = MC19AD_CALLS + 1
+           DO I =1, N
+              RSCALEX(I) = EXP(RSCALEX(I))
+              CSCALEX(I) = EXP(CSCALEX(I))
+           END DO
+           DO K = 1, NZ
+              I = JAN(K)
+              J = ICN(K)
+              PMAT(K) = PMAT(K) * RSCALEX(I) * CSCALEX(J)
+           END DO
+        END IF
+        OK_TO_CALL_MA28 = .TRUE.
+        CALL MA28AD(N,NZ,PMAT,LICN_ALL,JAN,LIRN_ALL,ICN,U_PIVOT, &
+          IKEEP28,IW28,FTEMP1,IER)
+        OK_TO_CALL_MA28 = .FALSE.
+        MA28AD_CALLS = MA28AD_CALLS + 1
+        MA28SAVE = MA28
+        MB28SAVE = MB28
+        MB28 = 0
+        NLU = NLU + 1
+        MAX_MINIRN = MAX(MAX_MINIRN,MINIRN)
+        MAX_MINICN = MAX(MAX_MINICN,MINICN)
+!       IER = -1: Numerically singular Jacobian
+!       IER = -2: Structurally singular Jacobian
+        IF (IER==-1 .OR. IER==-2) IERPJ = 1
+        IF (IER==-3) THEN
+!         LIRN_ALL is not large enough.
+          IF (LP /= 0) THEN
+             MSG = 'LIRN_ALL (=I1) is not large enough.'
+             CALL XERRDV(MSG,1690,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Allocating more space for another try.'
+             CALL XERRDV(MSG,1690,1,1,LIRN_ALL,0,0,ZERO,ZERO)
+          END IF
+!         Allocate more space for JAN and JVECT and try again.
+          LIRN_ALL = LIRN_ALL + MAX(MAX(1000,ELBOW_ROOM*NZ_SWAG),10*N)
+          LIRN_ALL = MAX(LIRN_ALL,(11*MINIRN)/10)
+          IF (LIRN_ALL>MAX_ARRAY_SIZE) THEN
+            MSG = 'Maximum array size exceeded. Stopping.'
+            CALL XERRDV(MSG,1700,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DEALLOCATE (JAN,STAT=JER)
+          CALL CHECK_STAT(JER,820)
+          ALLOCATE (JAN(LIRN_ALL),STAT=JER)
+          CALL CHECK_STAT(JER,830)
+          IF (MITER==7) THEN
+            JAN(1:NZ) = JVECT(1:NZ)
+          END IF
+          DEALLOCATE (JVECT,STAT=JER)
+          CALL CHECK_STAT(JER,840)
+          ALLOCATE (JVECT(LIRN_ALL),STAT=JER)
+          CALL CHECK_STAT(JER,850)
+          IF (MITER==7) THEN
+            JVECT(1:NZ) = JAN(1:NZ)
+          END IF
+          MA28 = MA28SAVE
+          MB28 = MB28SAVE
+          NLU = NLU - 1
+!         Since PMAT has changed, it must be restored:
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+          GOTO 10
+        END IF
+        IF (IER==-4 .OR. IER==-5 .OR. IER==-6) THEN
+!         LICN_ALL is not large enough.
+          IF (LP /= 0) THEN
+             MSG = 'LICN_ALL (=I1) is not large enough.'
+             CALL XERRDV(MSG,1710,1,0,0,0,0,ZERO,ZERO)
+             MSG = 'Allocating more space for another try.'
+             CALL XERRDV(MSG,1710,1,1,LICN_ALL,0,0,ZERO,ZERO)
+          END IF
+!         Allocate more space for JAN and JVECT and try again.
+          LICN_ALL = LICN_ALL + MAX(MAX(1000,ELBOW_ROOM*NZ_SWAG),10*N)
+          LICN_ALL = MAX(LICN_ALL,(11*MINICN)/10)
+          IF (LICN_ALL>MAX_ARRAY_SIZE) THEN
+            MSG = 'Maximum array size exceeded. Stopping.'
+            CALL XERRDV(MSG,1720,2,0,0,0,0,ZERO,ZERO)
+          END IF
+          DEALLOCATE (PMAT,ICN,STAT=JER)
+          CALL CHECK_STAT(JER,860)
+          ALLOCATE (PMAT(LICN_ALL),ICN(LICN_ALL),STAT=JER)
+          PMAT(1:LICN_ALL) = ZERO
+          CALL CHECK_STAT(JER,870)
+          IF (MITER==7) THEN
+            JAN(1:NZ) = JVECT(1:NZ)
+          END IF
+          MA28 = MA28SAVE
+          MB28 = MB28SAVE
+          NLU = NLU - 1
+          IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+          GOTO 10
+        END IF
+        IF (MITER/=7) RETURN
+        JAN(1:NZ) = JVECT(1:NZ)
+        RETURN
+
+!       MA28BD uses the pivot sequence generated by an earlier call
+!       to MA28AD to factor a new matrix of the same structure.
+
+90      CONTINUE
+
+        IF (SCALE_MATRIX) THEN
+           DO K =1, NZ
+              I = JAN(K)
+              J = JVECT(K)
+              PMAT(K) = PMAT(K) * RSCALEX(I) * CSCALEX(J)
+           END DO
+        END IF
+        CALL MA28BD(N,NZ,PMAT,LICN_ALL,JAN,JVECT,ICN,IKEEP28,IW28, &
+          FTEMP1,IER)
+        MA28BD_CALLS = MA28BD_CALLS + 1
+        MB28 = 1
+        NLU = NLU + 1
+!       IER = -2 : The matrix is numerically singular. The MA28AD
+!                  pivot sequence leads to a zero pivot, that is,
+!                  to one for which the ratio of it to the smallest
+!                  element in the row is less than EPS.
+!       IER = -13: The matrix is structurally singular.
+
+        IF (REDO_PIVOT_SEQUENCE) THEN
+!          Force MA28AD to calculate a new pivot sequence.
+           IF (IER/=-13 .AND. IER/=-2 .AND. IER<=0) RETURN
+           IF (IER==-2) MA28 = 1
+           IF (IER==-13) MA28 = 1
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        ELSE
+           IF (IER==-2) IERPJ = 1
+           IF (IER/=-13 .AND. IER<=0) RETURN
+           IF (IER==-13) MA28 = 1
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        END IF
+        IF (IER>0) MA28 = 2
+        IF (IER==-13 .AND. MITER==7 .AND. MOSS==2) THEN
+!          Recompute the sparsity structure.
+           CALL DVRENEW(N,Y,SAVF,EWT,F)
+           IF (J_IS_CONSTANT) J_HAS_BEEN_COMPUTED = .FALSE.
+        END IF
+        GOTO 10
+
+      END SUBROUTINE DVJACS28
+! End of Jacobian related routines that use MA28
+!_______________________________________________________________________
+
+      SUBROUTINE SET_ICN(N,IA,ICN)
+! ..
+! Define the column locations of nonzero elements for a sparse
+! matrix.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*)
+        INTEGER, INTENT (INOUT) :: ICN(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, KMAX, KMIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT SET_ICN
+! ..
+        KMIN = 1
+        DO J = 1, N
+          KMAX = IA(J+1) - 1
+          ICN(KMIN:KMAX) = J
+          KMIN = KMAX + 1
+        END DO
+
+      END SUBROUTINE SET_ICN
+!_______________________________________________________________________
+
+      SUBROUTINE CHECK_DIAG(N,IA,JA,ICN)
+! ..
+! Check that the diagonal is included in the sparse matrix
+! description arrays.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: IA(*), ICN(*), JA(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, K, KMAX, KMIN
+        CHARACTER (80) :: MSG
+! ..
+! .. FIRST EXECUTABLE STATEMENT CHECK_DIAG
+! ..
+        KMIN = 1
+        DO J = 1, N
+          KMAX = IA(J+1) - 1
+          DO K = KMIN, KMAX
+            IF (JA(K)==ICN(K)) GOTO 10
+          END DO
+          MSG = 'In CHECK_DIAG, the diagonal is not present.'
+          CALL XERRDV(MSG,1730,2,0,0,0,0,ZERO,ZERO)
+10        CONTINUE
+          KMIN = KMAX + 1
+        END DO
+
+      END SUBROUTINE CHECK_DIAG
+!_______________________________________________________________________
+
+      SUBROUTINE DVCHECK(JOB,G,NEQ,Y,YH,NYH,G0,G1,GX,IRT)
+! ..
+! Check for the presence of a root in the vicinity of the current T,
+! in a manner depending on the input flag JOB, and call DVROOTS to
+! locate the root as precisely as possible.
+! ..
+! This subroutine is essentially DRCHEK from LSODAR.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: IRT
+        INTEGER, INTENT (IN) :: JOB, NEQ, NYH
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: G0(*), G1(*), GX(*), Y(*), YH(NYH,*)
+! ..
+! .. Subroutine Arguments ..
+        EXTERNAL G
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: HMING, T1, TEMP1, TEMP2, X
+        INTEGER :: I, IFLAG, JFLAG
+        LOGICAL :: ZROOT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN, SIGN
+! ..
+! In addition to variables described previously, DVCHECK
+! uses the following for communication:
+! JOB    = integer flag indicating type of call:
+!          JOB = 1 means the problem is being initialized, and DVCHECK
+!                  is to look for a root at or very near the initial T.
+!          JOB = 2 means a continuation call to the solver was just
+!                  made, and DVCHECK is to check for a root in the
+!                  relevant part of the step last taken.
+!          JOB = 3 means a successful step was just taken, and DVCHECK
+!                  is to look for a root in the interval of the step.
+! G0     = array of length NG, containing the value of g at T = T0ST.
+!          G0 is input for JOB >= 2, and output in all cases.
+! G1,GX  = arrays of length NG for work space.
+! IRT    = completion flag:
+!          IRT = 0  means no root was found.
+!          IRT = -1 means JOB = 1 and a root was found too near to T.
+!          IRT = 1  means a legitimate root was found (JOB = 2 or 3).
+!                   On return, T0ST is the root location, and Y is the
+!                   corresponding solution vector.
+! T0ST   = value of T at one endpoint of interval of interest. Only
+!          roots beyond T0ST in the direction of integration are sought.
+!          T0ST is input if JOB >= 2, and output in all cases.
+!          T0ST is updated by DVCHECK, whether a root is found or not.
+! TLAST  = last value of T returned by the solver (input only).
+! TOUTC  = copy of TOUT(input only).
+! IRFND  = input flag showing whether the last step taken had a root.
+!          IRFND = 1 if it did, = 0 if not.
+! ITASKC = copy of ITASK (input only).
+! NGC    = copy of NG (input only).
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVCHECK
+! ..
+        IRT = 0
+        JROOT(1:NGC) = 0
+        HMING = (ABS(TN)+ABS(H))*UROUND*HUN
+
+        GOTO (10,30,80) JOB
+
+!       Evaluate g at initial T, and check for zero values.
+10      CONTINUE
+        T0ST = TN
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 20
+!       g has a zero at T. Look at g at T + (small increment).
+!       TEMP1 = SIGN(HMING, H)
+!       T0ST = T0ST + TEMP1
+!       TEMP2 = TEMP1 / H
+        TEMP2 = MAX(HMING/ABS(H),TENTH)
+        TEMP1 = TEMP2*H
+        T0ST = T0ST + TEMP1
+        Y(1:N) = Y(1:N) + TEMP2*YH(1:N,2)
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 20
+!       g has a zero at T and also close to T. Take error return.
+        IRT = -1
+        RETURN
+
+20      CONTINUE
+        RETURN
+
+30      CONTINUE
+        IF (IRFND==0) GOTO 70
+!       If a root was found on the previous step, evaluate G0 = g(T0ST).
+        CALL DVINDY_CORE(T0ST,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO I = 1, NGC
+          IF (ABS(G0(I))<=ZERO) ZROOT = .TRUE.
+        END DO
+        IF (.NOT.ZROOT) GOTO 70
+!       g has a zero at T0ST. Look at g at T + (small increment).
+        TEMP1 = SIGN(HMING,H)
+        T0ST = T0ST + TEMP1
+        IF ((T0ST-TN)*H<ZERO) GOTO 40
+        TEMP2 = TEMP1/H
+        Y(1:N) = Y(1:N) + TEMP2*YH(1:N,2)
+        GOTO 50
+40      CALL DVINDY_CORE(T0ST,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+50      CALL G(NEQ,T0ST,Y,NGC,G0)
+        NGE = NGE + 1
+        ZROOT = .FALSE.
+        DO 60 I = 1, NGC
+          IF (ABS(G0(I))>ZERO) GOTO 60
+          JROOT(I) = 1
+          ZROOT = .TRUE.
+60      END DO
+        IF (.NOT.ZROOT) GOTO 70
+!       g has a zero at T0ST and also close to T0ST. Return root.
+        IRT = 1
+        RETURN
+!       G0 has no zero components. Proceed to check relevant interval.
+70      IF (ABS(TN-TLAST)<=ZERO) GOTO 130
+
+80      CONTINUE
+!       Set T1 to TN or TOUTC, whichever comes first, and get g at T1.
+        IF (ITASKC==2 .OR. ITASKC==3 .OR. ITASKC==5) GOTO 90
+        IF ((TOUTC-TN)*H>=ZERO) GOTO 90
+        T1 = TOUTC
+        IF ((T1-T0ST)*H<=ZERO) GOTO 130
+        CALL DVINDY_CORE(T1,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        GOTO 100
+90      T1 = TN
+        DO I = 1, N
+          Y(I) = YH(I,1)
+        END DO
+100     CALL G(NEQ,T1,Y,NGC,G1)
+        NGE = NGE + 1
+!       Call DVROOTS to search for root in interval from T0ST to T1.
+        JFLAG = 0
+110     CONTINUE
+        CALL DVROOTS(NGC,HMING,JFLAG,T0ST,T1,G0,G1,GX,X)
+        IF (JFLAG>1) GOTO 120
+        CALL DVINDY_CORE(X,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        CALL G(NEQ,X,Y,NGC,GX)
+        NGE = NGE + 1
+        GOTO 110
+120     T0ST = X
+        CALL DCOPY_F90(NGC,GX,1,G0,1)
+        IF (JFLAG==4) GOTO 130
+!       Found a root. Interpolate to X and return.
+        CALL DVINDY_CORE(X,0,YH,NYH,Y,IFLAG)
+        IF (BOUNDS) THEN
+          DO I = 1, NDX
+            Y(IDX(I)) = MAX(Y(IDX(I)),LB(I))
+            Y(IDX(I)) = MIN(Y(IDX(I)),UB(I))
+          END DO
+        END IF
+        IRT = 1
+        RETURN
+130     CONTINUE
+        RETURN
+
+      END SUBROUTINE DVCHECK
+!_______________________________________________________________________
+
+      SUBROUTINE DVROOTS(NG,HMIN,JFLAG,X0,X1,G0,G1,GX,X)
+! ..
+! Perform root finding for DVODE_F90.
+! ..
+! This is essentially subroutine DROOTS from LSODAR.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: HMIN
+        KPP_REAL, INTENT (INOUT) :: X, X0, X1
+        INTEGER, INTENT (INOUT) :: JFLAG
+        INTEGER, INTENT (IN) :: NG
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: G0(NG), G1(NG), GX(NG)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T2, TMAX
+        INTEGER :: I, IMXOLD, NXLAST
+        LOGICAL :: SGNCHG, XROOT, ZROOT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, SIGN
+! ..
+! This subroutine finds the leftmost root of a set of arbitrary
+! functions gi(x) (i = 1,...,NG) in an interval (X0,X1). Only roots
+! of odd multiplicity (i.e. changes of sign of the gi) are found.
+! Here the sign of X1 - X0 is arbitrary, but is constant for a given
+! problem, and 'leftmost' means nearest to X0.The values of the
+! vector-valued function g(x) = (gi, i=1...NG) are communicated
+! through the call sequence of DVROOTS. The method used is the
+! Illinois algorithm.
+
+! Reference:
+! Kathie L. Hiebert and Lawrence F. Shampine, Implicitly Defined
+! Output Points for Solutions of ODEs, Sandia Report SAND/80-0180,
+! February 1980.
+
+! Description of parameters.
+
+! NG     = number of functions gi, or the number of components of
+!          the vector valued function g(x). Input only.
+
+! HMIN   = resolution parameter in X. Input only. When a root is
+!          found, it is located only to within an error of HMIN in X.
+!          Typically, HMIN should be set to something on the order of
+!               100 * UROUND * MAX(ABS(X0),ABS(X1)),
+!          where UROUND is the unit roundoff of the machine.
+
+! JFLAG  = integer flag for input and output communication.
+
+!          On input, set JFLAG = 0 on the first call for the problem,
+!          and leave it unchanged until the problem is completed.
+!          (The problem is completed when JFLAG >= 2 on return.)
+
+!          On output, JFLAG has the following values and meanings:
+!          JFLAG = 1 means DVROOTS needs a value of g(x). Set GX = g(X)
+!                    and call DVROOTS again.
+!          JFLAG = 2 means a root has been found. The root is
+!                    at X, and GX contains g(X). (Actually, X is the
+!                    rightmost approximation to the root on an interval
+!                    (X0,X1) of size HMIN or less.)
+!          JFLAG = 3 means X = X1 is a root, with one or more of the gi
+!                    being zero at X1 and no sign changes in (X0,X1).
+!                    GX contains g(X) on output.
+!          JFLAG = 4 means no roots (of odd multiplicity) were
+!                    found in (X0,X1) (no sign changes).
+
+! X0,X1  = endpoints of the interval where roots are sought.
+!          X1 and X0 are input when JFLAG = 0 (first call), and
+!          must be left unchanged between calls until the problem is
+!          completed. X0 and X1 must be distinct, but X1 - X0 may be
+!          of either sign. However, the notion of 'left' and 'right'
+!          will be used to mean nearer to X0 or X1, respectively.
+!          When JFLAG >= 2 on return, X0 and X1 are output, and
+!          are the endpoints of the relevant interval.
+
+! G0,G1  = arrays of length NG containing the vectors g(X0) and g(X1),
+!          respectively. When JFLAG = 0, G0 and G1 are input and
+!          none of the G0(i) should be zero.
+!          When JFLAG >= 2 on return, G0 and G1 are output.
+
+! GX     = array of length NG containing g(X). GX is input
+!          when JFLAG = 1, and output when JFLAG >= 2.
+
+! X      = independent variable value. Output only.
+!          When JFLAG = 1 on output, X is the point at which g(x)
+!          is to be evaluated and loaded into GX.
+!          When JFLAG = 2 or 3, X is the root.
+!          When JFLAG = 4, X is the right endpoint of the interval, X1.
+
+! JROOT  = integer array of length NG. Output only.
+!          When JFLAG = 2 or 3, JROOT indicates which components
+!          of g(x) have a root at X. JROOT(i) is 1 if the i-th
+!          component has a root, and JROOT(i) = 0 otherwise.
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVROOTS
+! ..
+        IF (JFLAG==1) GOTO 90
+!       JFLAG /= 1. Check for change in sign of g or zero at X1.
+        IMAX = 0
+        TMAX = ZERO
+        ZROOT = .FALSE.
+        DO 20 I = 1, NG
+          IF (ABS(G1(I))>ZERO) GOTO 10
+          ZROOT = .TRUE.
+          GOTO 20
+!         At this point, G0(i) has been checked and cannot be zero.
+10        IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,G1(I)))<=ZERO) GOTO 20
+          T2 = ABS(G1(I)/(G1(I)-G0(I)))
+          IF (T2<=TMAX) GOTO 20
+          TMAX = T2
+          IMAX = I
+20      END DO
+        IF (IMAX>0) GOTO 30
+        SGNCHG = .FALSE.
+        GOTO 40
+30      SGNCHG = .TRUE.
+40      IF (.NOT.SGNCHG) GOTO 200
+!       There is a sign change. Find the first root in the interval.
+        XROOT = .FALSE.
+        NXLAST = 0
+        LAST = 1
+
+!       Repeat until the first root in the interval is found. Loop point.
+50      CONTINUE
+        IF (XROOT) GOTO 170
+        IF (NXLAST==LAST) GOTO 60
+        ALPHA = ONE
+        GOTO 80
+60      IF (LAST==0) GOTO 70
+        ALPHA = HALF*ALPHA
+        GOTO 80
+70      ALPHA = TWO*ALPHA
+80      X2 = X1 - (X1-X0)*G1(IMAX)/(G1(IMAX)-ALPHA*G0(IMAX))
+!       IF ((ABS(X2 - X0) < HMIN) .AND. (ABS(X1 - X0) > TEN * &
+!       HMIN)) X2 = X0 + PT1 * (X1 - X0)
+
+!       If X2 is too close to X0 or X1, adjust it inward,
+!       by a fractional distance that is between 0.1 and 0.5.
+        IF (ABS(X2-X0)<HALF*HMIN) THEN
+          FRACINT = ABS(X1-X0)/HMIN
+          FRACSUB = TENTH
+          IF (FRACINT<=FIVE) FRACSUB = HALF/FRACINT
+          X2 = X0 + FRACSUB*(X1-X0)
+        END IF
+        IF (ABS(X1-X2)<HALF*HMIN) THEN
+          FRACINT = ABS(X1-X0)/HMIN
+          FRACSUB = TENTH
+          IF (FRACINT<=FIVE) FRACSUB = HALF/FRACINT
+          X2 = X1 - FRACSUB*(X1-X0)
+        END IF
+
+        JFLAG = 1
+        X = X2
+!       Return to the calling routine to get a value of GX = g(X).
+        RETURN
+!       Check to see in which interval g changes sign.
+90      IMXOLD = IMAX
+        IMAX = 0
+        TMAX = ZERO
+        ZROOT = .FALSE.
+        DO 110 I = 1, NG
+          IF (ABS(GX(I))>ZERO) GOTO 100
+          ZROOT = .TRUE.
+          GOTO 110
+!         Neither G0(i) nor GX(i) can be zero at this point.
+100       IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,GX(I)))<=ZERO) GOTO 110
+          T2 = ABS(GX(I)/(GX(I)-G0(I)))
+          IF (T2<=TMAX) GOTO 110
+          TMAX = T2
+          IMAX = I
+110     END DO
+        IF (IMAX>0) GOTO 120
+        SGNCHG = .FALSE.
+        IMAX = IMXOLD
+        GOTO 130
+120     SGNCHG = .TRUE.
+130     NXLAST = LAST
+        IF (.NOT.SGNCHG) GOTO 140
+!       Sign change between X0 and X2, so replace X1 with X2.
+        X1 = X2
+        CALL DCOPY_F90(NG,GX,1,G1,1)
+        LAST = 1
+        XROOT = .FALSE.
+        GOTO 160
+140     IF (.NOT.ZROOT) GOTO 150
+!       Zero value at X2 and no sign change in (X0,X2), so X2 is a root.
+        X1 = X2
+        CALL DCOPY_F90(NG,GX,1,G1,1)
+        XROOT = .TRUE.
+        GOTO 160
+!       No sign change between X0 and X2. Replace X0 with X2.
+150     CONTINUE
+        CALL DCOPY_F90(NG,GX,1,G0,1)
+        X0 = X2
+        LAST = 0
+        XROOT = .FALSE.
+160     IF (ABS(X1-X0)<=HMIN) XROOT = .TRUE.
+        GOTO 50
+
+!       Return with X1 as the root. Set JROOT. Set X = X1 and GX = G1.
+170     JFLAG = 2
+        X = X1
+        CALL DCOPY_F90(NG,G1,1,GX,1)
+        DO 190 I = 1, NG
+          JROOT(I) = 0
+          IF (ABS(G1(I))>ZERO) GOTO 180
+          JROOT(I) = 1
+          GOTO 190
+180       IF (ABS(SIGN(ONE,G0(I))-SIGN(ONE,G1(I)))>ZERO) JROOT(I) = 1
+190     END DO
+        RETURN
+
+!       No sign change in the interval. Check for zero at right endpoint.
+200     IF (.NOT.ZROOT) GOTO 210
+
+!       Zero value at X1 and no sign change in (X0,X1). Return JFLAG = 3.
+        X = X1
+        CALL DCOPY_F90(NG,G1,1,GX,1)
+        DO I = 1, NG
+          JROOT(I) = 0
+          IF (ABS(G1(I))<=ZERO) JROOT(I) = 1
+        END DO
+        JFLAG = 3
+        RETURN
+
+!       No sign changes in this interval. Set X = X1, return JFLAG = 4.
+210     CALL DCOPY_F90(NG,G1,1,GX,1)
+        X = X1
+        JFLAG = 4
+        RETURN
+
+      END SUBROUTINE DVROOTS
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDP(Y,IYDIM,NEQN,NQ)
+! ..
+! Retract the Nordsieck array (undo prediction).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IYDIM, NEQN, NQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: Y(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, J1, J2
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDP
+! ..
+        DO J1 = 1, NQ
+          DO J2 = J1, NQ
+            J = (NQ+J1) - J2
+            DO I = 1, NEQN
+! Original:
+!             Y(I,J) = Y(I,J) + Y(I,J+1)
+              Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM) + Y(I+J*IYDIM)
+            END DO
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDP
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDN(Y,IYDIM,NEQN,NQ)
+! ..
+! Apply the Nordsieck array (predict).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IYDIM, NEQN, NQ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: Y(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, J, J1, J2
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDN
+! ..
+        DO J1 = 1, NQ
+          DO J2 = J1, NQ
+            J = (NQ+J1) - J2
+            DO I = 1, NEQN
+! Original:
+!             Y(I,J) = Y(I,J) - Y(I,J+1)
+              Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM) - Y(I+J*IYDIM)
+            END DO
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDN
+!_______________________________________________________________________
+
+      SUBROUTINE DVNRDS(Y,IYDIM,NEQN,L,RH)
+! ..
+! Scale the Nordsieck array.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: RH
+        INTEGER :: IYDIM, L, NEQN
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: Y(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: R1
+        INTEGER :: I, J
+! ..
+! .. FIRST EXECUTABLE STATEMENT DVNRDS
+! ..
+        R1 = ONE
+        DO J = 2, L
+          R1 = R1*RH
+          DO I = 1, NEQN
+! Original:
+!           Y(I,J) = Y(I,J)*R1
+            Y(I+(J-1)*IYDIM) = Y(I+(J-1)*IYDIM)*R1
+          END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DVNRDS
+!_______________________________________________________________________
+
+      SUBROUTINE RELEASE_ARRAYS
+! ..
+! Deallocate any allocated arrays and determine how much storage was
+! used (not called by DVODE_F90).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Local Scalars ..
+        INTEGER :: IER, II, IR
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ALLOCATED, SIZE
+! ..
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!     INTEGER INFO
+!     INTEGER ISIZE
+!     COMMON /MA48SIZE/ ISIZE
+!_______________________________________________________________________
+! ..
+! .. FIRST EXECUTABLE STATEMENT RELEASE_ARRAYS
+! ..
+        IR = 0
+        IF (ALLOCATED(ACOR)) THEN
+          IR = IR + SIZE(ACOR)
+          DEALLOCATE (ACOR,STAT=IER)
+          CALL CHECK_STAT(IER,880)
+        END IF
+        IF (ALLOCATED(CSCALEX)) THEN
+          IR = IR + SIZE(CSCALEX) + SIZE(RSCALEX) + SIZE(WSCALEX)
+          DEALLOCATE (CSCALEX,RSCALEX,WSCALEX,STAT=IER)
+          CALL CHECK_STAT(IER,890)
+        END IF
+        IF (ALLOCATED(DTEMP)) THEN
+          IR = IR + SIZE(DTEMP)
+          DEALLOCATE (DTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,900)
+        END IF
+        IF (ALLOCATED(EWT)) THEN
+          IR = IR + SIZE(EWT)
+          DEALLOCATE (EWT,STAT=IER)
+          CALL CHECK_STAT(IER,910)
+        END IF
+        IF (ALLOCATED(FACDS)) THEN
+          IR = IR + SIZE(FACDS)
+          DEALLOCATE (FACDS,STAT=IER)
+          CALL CHECK_STAT(IER,920)
+        END IF
+        IF (ALLOCATED(FPTEMP)) THEN
+          IR = IR + SIZE(FPTEMP)
+          DEALLOCATE (FPTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,930)
+        END IF
+        IF (ALLOCATED(FTEMP)) THEN
+          IR = IR + SIZE(FTEMP)
+          DEALLOCATE (FTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,940)
+        END IF
+        IF (ALLOCATED(FTEMP1)) THEN
+          IR = IR + SIZE(FTEMP1)
+          DEALLOCATE (FTEMP1,STAT=IER)
+          CALL CHECK_STAT(IER,950)
+        END IF
+        IF (ALLOCATED(G0)) THEN
+          IR = IR + SIZE(G0)
+          DEALLOCATE (G0,STAT=IER)
+          CALL CHECK_STAT(IER,960)
+        END IF
+        IF (ALLOCATED(G1)) THEN
+          IR = IR + SIZE(G1)
+          DEALLOCATE (G1,STAT=IER)
+          CALL CHECK_STAT(IER,970)
+        END IF
+        IF (ALLOCATED(GX)) THEN
+          IR = IR + SIZE(GX)
+          DEALLOCATE (GX,STAT=IER)
+          CALL CHECK_STAT(IER,980)
+        END IF
+        IF (ALLOCATED(JMAT)) THEN
+          IR = IR + SIZE(JMAT)
+          DEALLOCATE (JMAT,STAT=IER)
+          CALL CHECK_STAT(IER,990)
+        END IF
+        IF (ALLOCATED(LB)) THEN
+          IR = IR + SIZE(LB)
+          DEALLOCATE (LB,STAT=IER)
+          CALL CHECK_STAT(IER,1000)
+        END IF
+        IF (ALLOCATED(UB)) THEN
+          IR = IR + SIZE(UB)
+          DEALLOCATE (UB,STAT=IER)
+          CALL CHECK_STAT(IER,1000)
+        END IF
+        IF (ALLOCATED(PMAT)) THEN
+          IR = IR + SIZE(PMAT)
+          DEALLOCATE (PMAT,STAT=IER)
+          CALL CHECK_STAT(IER,1010)
+        END IF
+        IF (ALLOCATED(RWORK)) THEN
+          IR = IR + SIZE(RWORK)
+          DEALLOCATE (RWORK,STAT=IER)
+          CALL CHECK_STAT(IER,1020)
+        END IF
+        IF (ALLOCATED(SAVF)) THEN
+          IR = IR + SIZE(SAVF)
+          DEALLOCATE (SAVF,STAT=IER)
+          CALL CHECK_STAT(IER,1030)
+        END IF
+        IF (ALLOCATED(YMAX)) THEN
+          IR = IR + SIZE(YMAX)
+          DEALLOCATE (YMAX,STAT=IER)
+          CALL CHECK_STAT(IER,1040)
+        END IF
+        IF (ALLOCATED(WM)) THEN
+          IR = IR + SIZE(WM)
+          DEALLOCATE (WM,STAT=IER)
+          CALL CHECK_STAT(IER,1050)
+        END IF
+        IF (ALLOCATED(YHNQP2)) THEN
+          IR = IR + SIZE(YHNQP2)
+          DEALLOCATE (YHNQP2,STAT=IER)
+          CALL CHECK_STAT(IER,1060)
+        END IF
+        IF (ALLOCATED(YHTEMP)) THEN
+          IR = IR + SIZE(YHTEMP)
+          DEALLOCATE (YHTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1070)
+        END IF
+        IF (ALLOCATED(YMAX)) THEN
+          IR = IR + SIZE(YMAX)
+          DEALLOCATE (YMAX,STAT=IER)
+          CALL CHECK_STAT(IER,1080)
+        END IF
+        IF (ALLOCATED(YNNEG)) THEN
+          IR = IR + SIZE(YNNEG)
+          DEALLOCATE (YNNEG,STAT=IER)
+          CALL CHECK_STAT(IER,1090)
+        END IF
+        IF (ALLOCATED(YSCALEDS)) THEN
+          IR = IR + SIZE(YSCALEDS)
+          DEALLOCATE (YSCALEDS,STAT=IER)
+          CALL CHECK_STAT(IER,1100)
+        END IF
+        IF (ALLOCATED(YTEMP)) THEN
+          IR = IR + SIZE(YTEMP)
+          DEALLOCATE (YTEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1110)
+        END IF
+        IF (ALLOCATED(WKDS)) THEN
+          IR = IR + SIZE(WKDS)
+          DEALLOCATE (WKDS,STAT=IER)
+          CALL CHECK_STAT(IER,1120)
+        END IF
+        II = 0
+        IF (ALLOCATED(BIGP)) THEN
+          II = II + SIZE(BIGP)
+          DEALLOCATE (BIGP,STAT=IER)
+          CALL CHECK_STAT(IER,1130)
+        END IF
+        IF (ALLOCATED(BJGP)) THEN
+          II = II + SIZE(BJGP)
+          DEALLOCATE (BJGP,STAT=IER)
+          CALL CHECK_STAT(IER,1140)
+        END IF
+        IF (ALLOCATED(IA)) THEN
+          II = II + SIZE(IA)
+          DEALLOCATE (IA,STAT=IER)
+          CALL CHECK_STAT(IER,1150)
+        END IF
+        IF (ALLOCATED(IAB)) THEN
+          II = II + SIZE(IAB)
+          DEALLOCATE (IAB,STAT=IER)
+          CALL CHECK_STAT(IER,1160)
+        END IF
+        IF (ALLOCATED(IAN)) THEN
+          II = II + SIZE(IAN)
+          DEALLOCATE (IAN,STAT=IER)
+          CALL CHECK_STAT(IER,1170)
+        END IF
+        IF (ALLOCATED(ICN)) THEN
+          II = II + SIZE(ICN)
+          DEALLOCATE (ICN,STAT=IER)
+          CALL CHECK_STAT(IER,1180)
+        END IF
+        IF (ALLOCATED(IDX)) THEN
+          II = II + SIZE(IDX)
+          DEALLOCATE (IDX,STAT=IER)
+          CALL CHECK_STAT(IER,1190)
+        END IF
+        IF (ALLOCATED(IGP)) THEN
+          II = II + SIZE(IGP)
+          DEALLOCATE (IGP,STAT=IER)
+          CALL CHECK_STAT(IER,1200)
+        END IF
+        IF (ALLOCATED(IKEEP28)) THEN
+          II = II + SIZE(IKEEP28,1)*SIZE(IKEEP28,2)
+          DEALLOCATE (IKEEP28,STAT=IER)
+          CALL CHECK_STAT(IER,1210)
+        END IF
+        IF (ALLOCATED(INDCOLDS)) THEN
+          II = II + SIZE(INDCOLDS)
+          DEALLOCATE (INDCOLDS,STAT=IER)
+          CALL CHECK_STAT(IER,1220)
+        END IF
+        IF (ALLOCATED(INDROWDS)) THEN
+
+          II = II + SIZE(INDROWDS)
+          DEALLOCATE (INDROWDS,STAT=IER)
+          CALL CHECK_STAT(IER,1230)
+        END IF
+        IF (ALLOCATED(IOPTDS)) THEN
+          II = II + SIZE(IOPTDS)
+          DEALLOCATE (IOPTDS,STAT=IER)
+          CALL CHECK_STAT(IER,1240)
+        END IF
+        IF (ALLOCATED(IPNTRDS)) THEN
+          II = II + SIZE(IPNTRDS)
+          DEALLOCATE (IPNTRDS,STAT=IER)
+          CALL CHECK_STAT(IER,1250)
+        END IF
+        IF (ALLOCATED(IWADS)) THEN
+          II = II + SIZE(IWADS)
+          DEALLOCATE (IWADS,STAT=IER)
+          CALL CHECK_STAT(IER,1260)
+        END IF
+        IF (ALLOCATED(IWKDS)) THEN
+          II = II + SIZE(IWKDS)
+          DEALLOCATE (IWKDS,STAT=IER)
+          CALL CHECK_STAT(IER,1270)
+        END IF
+        IF (ALLOCATED(IWORK)) THEN
+          II = II + SIZE(IWORK)
+          DEALLOCATE (IWORK,STAT=IER)
+          CALL CHECK_STAT(IER,1280)
+        END IF
+        IF (ALLOCATED(IW28)) THEN
+          II = II + SIZE(IW28,1)*SIZE(IW28,2)
+          DEALLOCATE (IW28,STAT=IER)
+          CALL CHECK_STAT(IER,1290)
+        END IF
+        IF (ALLOCATED(JA)) THEN
+          II = II + SIZE(JA)
+          DEALLOCATE (JA,STAT=IER)
+          CALL CHECK_STAT(IER,1300)
+        END IF
+        IF (ALLOCATED(JAB)) THEN
+          II = II + SIZE(JAB)
+          DEALLOCATE (JAB,STAT=IER)
+          CALL CHECK_STAT(IER,1310)
+        END IF
+        IF (ALLOCATED(JAN)) THEN
+          II = II + SIZE(JAN)
+          DEALLOCATE (JAN,STAT=IER)
+          CALL CHECK_STAT(IER,1320)
+        END IF
+        IF (ALLOCATED(JATEMP)) THEN
+          II = II + SIZE(JATEMP)
+          DEALLOCATE (JATEMP,STAT=IER)
+          CALL CHECK_STAT(IER,1330)
+        END IF
+        IF (ALLOCATED(JGP)) THEN
+          II = II + SIZE(JGP)
+          DEALLOCATE (JGP,STAT=IER)
+          CALL CHECK_STAT(IER,1340)
+        END IF
+        IF (ALLOCATED(JPNTRDS)) THEN
+          II = II + SIZE(JPNTRDS)
+          DEALLOCATE (JPNTRDS,STAT=IER)
+          CALL CHECK_STAT(IER,1350)
+        END IF
+        IF (ALLOCATED(JROOT)) THEN
+          II = II + SIZE(JROOT)
+          DEALLOCATE (JROOT,STAT=IER)
+          CALL CHECK_STAT(IER,1360)
+        END IF
+        IF (ALLOCATED(JVECT)) THEN
+          II = II + SIZE(JVECT)
+          DEALLOCATE (JVECT,STAT=IER)
+          CALL CHECK_STAT(IER,1370)
+        END IF
+        IF (ALLOCATED(NGRPDS)) THEN
+          II = II + SIZE(NGRPDS)
+          DEALLOCATE (NGRPDS,STAT=IER)
+          CALL CHECK_STAT(IER,1380)
+        END IF
+        IF (ALLOCATED(SUBDS)) THEN
+          II = II + SIZE(SUBDS)
+          DEALLOCATE (SUBDS,STAT=IER)
+          CALL CHECK_STAT(IER,1390)
+        END IF
+        IF (ALLOCATED(SUPDS)) THEN
+          II = II + SIZE(SUPDS)
+          DEALLOCATE (SUPDS,STAT=IER)
+          CALL CHECK_STAT(IER,1400)
+        END IF
+!_______________________________________________________________________
+! *****MA48 build change point. Insert these statements.
+!       IF (MA48_WAS_USED) THEN
+!          CALL MA48_FINALIZE(FACTORS,CONTROL,INFO)
+!          IF (INFO /= 0) THEN
+!             MSG = 'The call to MA48_FINALIZE FAILED.'
+!             CALL XERRDV(MSG,1740,1,1,II,0,0,ZERO,ZERO)
+!          END IF
+!          MSG = 'Size of MA48 deallocated arrays (I1) = '
+!          CALL XERRDV(MSG,1750,1,1,ISIZE,0,0,ZERO,ZERO)
+!       END IF
+!_______________________________________________________________________
+
+!       Print the amount of storage used.
+        MSG = 'I1 = Total length of REAL arrays used.'
+        CALL XERRDV(MSG,1760,1,1,IR,0,0,ZERO,ZERO)
+        MSG = 'I1 = Total length of INTEGER arrays used.'
+        CALL XERRDV(MSG,1760,1,1,II,0,0,ZERO,ZERO)
+
+!       In case DVODE_F90 is subsequently called:
+        OPTS_CALLED = .FALSE.
+        RETURN
+
+      END SUBROUTINE RELEASE_ARRAYS
+! End of DVODE_F90 subroutines
+!_______________________________________________________________________
+
+! Beginning of LINPACK and BLAS subroutines
+      SUBROUTINE DGEFA_F90(A,LDA,N,IPVT,INFO)
+! ..
+! Factor a matrix using Gaussian elimination.
+! ..
+!     DGEFA_F90 factors a real(wp) matrix by Gaussian elimination.
+!     DGEFA_F90 is usually called by DGECO, but it can be called
+!     directly with a saving in time if RCOND is not needed.
+!     (Time for DGECO) = (1 + 9/N)*(Time for DGEFA_F90).
+!     On Entry
+!        A       REAL(KIND=WP)(LDA, N)
+!                the matrix to be factored.
+!        LDA     INTEGER
+!                the leading dimension of the array A.
+!        N       INTEGER
+!                the order of the matrix A.
+!     On Return
+!        A       an upper triangular matrix and the multipliers
+!                which were used to obtain it.
+!                The factorization can be written A = L*U where
+!                L is a product of permutation and unit lower
+!                triangular matrices and U is upper triangular.
+!        IPVT    INTEGER(N)
+!                an integer vector of pivot indices.
+!        INFO    INTEGER
+!                = 0  normal value.
+!                = K  if U(K,K) == 0.0. This is not an error
+!                     condition for this subroutine, but it does
+!                     indicate that DGESL_F90 or DGEDI will divide
+!                     by zero if called. Use RCOND in DGECO for a
+!                     reliable indication of singularity.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: INFO
+        INTEGER, INTENT (IN) :: LDA, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: A(LDA,*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: J, K, KP1, L, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGEFA_F90
+! ..
+        INFO = 0
+        NM1 = N - 1
+        IF (NM1<1) GOTO 50
+        DO K = 1, NM1
+          KP1 = K + 1
+
+!         Find L = pivot index.
+
+! Original:
+!         L = IDAMAX_F90(N-K+1,A(K,K),1) + K - 1
+          L = IDAMAX_F90(N-K+1,A(K:N,K),1) + K - 1
+          IPVT(K) = L
+
+!         Zero pivot implies this column already triangularized.
+
+!         IF (A(L, K) == ZERO) GOTO 40
+          IF (ABS(A(L,K))<=ZERO) GOTO 30
+
+!         Interchange if necessary.
+
+          IF (L==K) GOTO 10
+          T = A(L,K)
+          A(L,K) = A(K,K)
+          A(K,K) = T
+10        CONTINUE
+
+!         Compute multipliers.
+
+          T = -ONE/A(K,K)
+! Original:          
+!         CALL DSCAL_F90(N-K,T,A(K+1,K),1)         
+          CALL DSCAL_F90(N-K,T,A(K+1:N,K),1)
+
+!         Row elimination with column indexing.
+
+          DO J = KP1, N
+            T = A(L,J)
+            IF (L==K) GOTO 20
+            A(L,J) = A(K,J)
+            A(K,J) = T
+20          CONTINUE
+! Original:            
+!           CALL DAXPY_F90(N-K,T,A(K+1,K),1,A(K+1,J),1)
+            CALL DAXPY_F90(N-K,T,A(K+1:N,K),1,A(K+1:N,J),1)
+          END DO
+          GOTO 40
+30        CONTINUE
+          INFO = K
+40        CONTINUE
+        END DO
+50      CONTINUE
+        IPVT(N) = N
+!       IF (A(N, N) == ZERO) INFO = N
+        IF (ABS(A(N,N))<=ZERO) INFO = N
+        RETURN
+
+      END SUBROUTINE DGEFA_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGESL_F90(A,LDA,N,IPVT,B,JOB)
+! ..
+! Solve the real system A*X=B or TRANS(A)*X=B using the factors
+! computed by DGECO or DGEFA_F90.
+! ..
+!     DGESL_F90 solves the real(wp) system
+!     A * X = B or TRANS(A) * X = B
+!     using the factors computed by DGECO or DGEFA_F90.
+!     On Entry
+!        A       REAL(KIND=WP)(LDA, N)
+!                the output from DGECO or DGEFA_F90.
+!        LDA     INTEGER
+!                the leading dimension of the array A.
+!        N       INTEGER
+!                the order of the matrix A.
+!        IPVT    INTEGER(N)
+!                the pivot vector from DGECO or DGEFA_F90.
+!        B       REAL(KIND=WP)(N)
+!                the right hand side vector.
+!        JOB     INTEGER
+!                = 0         to solve A*X = B,
+
+!                = nonzero   to solve TRANS(A)*X = B where
+!                            TRANS(A)is the transpose.
+!     On Return
+!        B       the solution vector X.
+!     Error Condition
+!        A division by zero will occur if the input factor contains a
+!        zero on the diagonal. Technically this indicates singularity
+!        but it is often caused by improper arguments or improper
+!        setting of LDA. It will not occur if the subroutines are
+!        called correctly and if DGECO has set RCOND > 0.0 or
+!        DGEFA_F90 has set INFO == 0.
+!     To compute INVERSE(A) * C where C is a matrix
+!     with P columns
+!           CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+!           IF (RCOND is too small) GOTO
+!           DO J = 1, P
+!              CALL DGESL_F90(A,LDA,N,IPVT,C(1,J),0)
+!           END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB, LDA, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: A(LDA,*), B(*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: K, KB, L, NM1
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGESL_F90
+! ..
+        NM1 = N - 1
+        IF (JOB/=0) GOTO 30
+
+!       JOB = 0, solve A*X = B.
+!       First solve L*Y = B.
+
+        IF (NM1<1) GOTO 20
+        DO K = 1, NM1
+          L = IPVT(K)
+          T = B(L)
+          IF (L==K) GOTO 10
+          B(L) = B(K)
+          B(K) = T
+10        CONTINUE
+! Original:
+!         CALL DAXPY_F90(N-K,T,A(K+1,K),1,B(K+1),1)
+          CALL DAXPY_F90(N-K,T,A(K+1:N,K),1,B(K+1:N),1)
+        END DO
+20      CONTINUE
+
+!       Now solve U*X = Y.
+
+        DO KB = 1, N
+          K = N + 1 - KB
+          B(K) = B(K)/A(K,K)
+          T = -B(K)
+! Original:
+!         CALL DAXPY_F90(K-1,T,A(1,K),1,B(1),1)
+          CALL DAXPY_F90(K-1,T,A(1:K-1,K),1,B(1:K-1),1)
+        END DO
+        GOTO 60
+30      CONTINUE
+
+!       JOB /= 0, solve TRANS(A)*X = B.
+!       First solve TRANS(U)*Y = B.
+
+        DO K = 1, N
+          T = DDOT_F90(K-1,A(1,K),1,B(1),1)
+          B(K) = (B(K)-T)/A(K,K)
+        END DO
+
+!       Now solve TRANS(L)*X = Y.
+
+        IF (NM1<1) GOTO 50
+        DO KB = 1, NM1
+          K = N - KB
+          B(K) = B(K) + DDOT_F90(N-K,A(K+1,K),1,B(K+1),1)
+          L = IPVT(K)
+          IF (L==K) GOTO 40
+          T = B(L)
+          B(L) = B(K)
+          B(K) = T
+40        CONTINUE
+        END DO
+50      CONTINUE
+60      CONTINUE
+        RETURN
+
+      END SUBROUTINE DGESL_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGBFA_F90(ABD,LDA,N,ML,MU,IPVT,INFO)
+! ..
+! Factor a banded matrix using Gaussian elimination.
+! ..
+!     DGBFA_F90 factors a real(wp) band matrix by elimination.
+!     DGBFA_F90 is usually called by DGBCO, but it can be called
+!     directly with a saving in time if RCOND is not needed.
+!     On Entry
+!        ABD     REAL(KIND=WP)(LDA, N)
+!                contains the matrix in band storage. The columns
+!                of the matrix are stored in the columns of ABD and
+!                the diagonals of the matrix are stored in rows
+!                ML+1 through 2*ML+MU+1 of ABD.
+!                See the comments below for details.
+!        LDA     INTEGER
+!                the leading dimension of the array ABD.
+!                LDA must be >= 2*ML + MU + 1.
+!        N       INTEGER
+!                the order of the original matrix.
+!        ML      INTEGER
+!                number of diagonals below the main diagonal.
+!                0 <= ML < N.
+!        MU      INTEGER
+!                number of diagonals above the main diagonal.
+!                0 <= MU < N.
+!                More efficient if ML <= MU.
+!     On Return
+!        ABD     an upper triangular matrix in band storage and
+!                the multipliers which were used to obtain it.
+!                The factorization can be written A = L*U where
+!                L is a product of permutation and unit lower
+!                triangular matrices and U is upper triangular.
+!        IPVT    INTEGER(N)
+!                an integer vector of pivot indices.
+!        INFO    INTEGER
+!                = 0  normal value.
+!                = K  if U(K,K) == 0.0. This is not an error
+!                     condition for this subroutine, but it does
+!                     indicate that DGBSL_F90 will divide by zero
+!                     if called. Use RCOND in DGBCO for a reliable
+!                     indication of singularity.
+!     Band Storage
+!           If A is a band matrix, the following program segment
+!           will set up the input.
+!                   ML = (band width below the diagonal)
+!                   MU = (band width above the diagonal)
+!                   M = ML + MU + 1
+!                   DO J = 1, N
+!                      I1 = MAX(1, J-MU)
+!                      I2 = MIN(N, J+ML)
+!                      DO 10 I = I1, I2
+!                         K = I - J + M
+!                         ABD(K,J) = A(I,J)
+!                      END DO
+!                   END DO
+!           This uses rows ML+1 through 2*ML+MU+1 of ABD.
+!           In addition, the first ML rows in ABD are used for
+!           elements generated during the triangularization.
+!           The total number of rows needed in ABD is 2*ML+MU+1.
+!           The ML+MU by ML+MU upper left triangle and the
+!           ML by ML lower right triangle are not referenced.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (INOUT) :: INFO
+        INTEGER, INTENT (IN) :: LDA, ML, MU, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ABD(LDA,*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: I0, J, J0, J1, JU, JZ, K, KP1, L, LM, M, MM, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGBFA_F90
+! ..
+        M = ML + MU + 1
+        INFO = 0
+
+!       Zero initial fill-in columns.
+
+        J0 = MU + 2
+        J1 = MIN(N,M) - 1
+        IF (J1<J0) GOTO 10
+        DO JZ = J0, J1
+          I0 = M + 1 - JZ
+          ABD(I0:ML,JZ) = ZERO
+        END DO
+10      CONTINUE
+        JZ = J1
+        JU = 0
+
+!       Gaussian elimination with partial pivoting.
+
+        NM1 = N - 1
+        IF (NM1<1) GOTO 80
+        DO K = 1, NM1
+          KP1 = K + 1
+
+!         Zero next fill-in column.
+
+          JZ = JZ + 1
+          IF (JZ>N) GOTO 20
+          IF (ML<1) GOTO 20
+          ABD(1:ML,JZ) = ZERO
+20        CONTINUE
+
+!         Find L = pivot index.
+
+          LM = MIN(ML,N-K)
+! Original:
+!         L = IDAMAX_F90(LM+1,ABD(M,K),1) + M - 1
+          L = IDAMAX_F90(LM+1,ABD(M:M+LM,K),1) + M - 1
+
+          IPVT(K) = L + K - M
+
+!         Zero pivot implies this column already triangularized.
+
+!         IF (ABD(L, K) == ZERO) GOTO 100
+          IF (ABS(ABD(L,K))<=ZERO) GOTO 60
+
+!         Interchange if necessary.
+
+          IF (L==M) GOTO 30
+          T = ABD(L,K)
+          ABD(L,K) = ABD(M,K)
+          ABD(M,K) = T
+30        CONTINUE
+
+!         Compute multipliers.
+
+          T = -ONE/ABD(M,K)
+! Original:
+!         CALL DSCAL_F90(LM,T,ABD(M+1,K),1)
+          CALL DSCAL_F90(LM,T,ABD(M+1:M+LM,K),1)
+
+!         Row elimination with column indexing.
+
+          JU = MIN(MAX(JU,MU+IPVT(K)),N)
+          MM = M
+          IF (JU<KP1) GOTO 50
+          DO J = KP1, JU
+            L = L - 1
+            MM = MM - 1
+            T = ABD(L,J)
+            IF (L==MM) GOTO 40
+            ABD(L,J) = ABD(MM,J)
+            ABD(MM,J) = T
+40          CONTINUE
+! Original:
+!           CALL DAXPY_F90(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+            CALL DAXPY_F90(LM,T,ABD(M+1:M+LM,K),1,ABD(MM+1:M+LM,J),1)
+          END DO
+50        CONTINUE
+          GOTO 70
+60        CONTINUE
+          INFO = K
+70        CONTINUE
+        END DO
+80      CONTINUE
+        IPVT(N) = N
+!       IF (ABD(M, N) == ZERO) INFO = N
+        IF (ABS(ABD(M,N))<=ZERO) INFO = N
+        RETURN
+
+      END SUBROUTINE DGBFA_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DGBSL_F90(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+! ..
+! Solve the real band system A*X=B or TRANS(A)*X=B using the factors
+! computed by DGBCO or DGBFA_F90.
+! ..
+!     DGBSL_F90 solves the real(wp) band system
+!     A * X = B or TRANS(A) * X = B
+!     using the factors computed by DGBCO or DGBFA_F90.
+!     On Entry
+!        ABD     REAL(KIND=WP)(LDA, N)
+!                the output from DGBCO or DGBFA_F90.
+!        LDA     INTEGER
+!                the leading dimension of the array ABD.
+!        N       INTEGER
+!                the order of the original matrix.
+!        ML      INTEGER
+!                number of diagonals below the main diagonal.
+!        MU      INTEGER
+!                number of diagonals above the main diagonal.
+!        IPVT    INTEGER(N)
+!                the pivot vector from DGBCO or DGBFA_F90.
+!        B       REAL(KIND=WP)(N)
+!                the right hand side vector.
+!        JOB     INTEGER
+!                = 0         to solve A*X = B,
+!                = nonzero   to solve TRANS(A)*X = B, where
+!                            TRANS(A) is the transpose.
+!     On Return
+!        B       the solution vector X.
+!     Error Condition
+!        A division by zero will occur if the input factor contains a
+!        zero on the diagonal. Technically this indicates singularity
+!        but it is often caused by improper arguments or improper
+!        setting of LDA. It will not occur if the subroutines are
+!        called correctly and if DGBCO has set RCOND > 0.0
+!        or DGBFA_F90 has set INFO == 0 .
+!     To compute INVERSE(A) * C where C is a matrix
+!     with P columns
+!           CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+!           IF (RCOND is too small) GOTO ...
+!           DO J = 1, P
+!              CALL DGBSL_F90(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+!           END DO
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: JOB, LDA, ML, MU, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: ABD(LDA,*), B(*)
+        INTEGER, INTENT (INOUT) :: IPVT(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: T
+        INTEGER :: K, KB, L, LA, LB, LM, M, NM1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGBSL_F90
+! ..
+        M = MU + ML + 1
+        NM1 = N - 1
+        IF (JOB/=0) GOTO 30
+
+!       JOB = 0, solve A*X = B.
+!       First solve L*Y = B.
+
+        IF (ML==0) GOTO 20
+        IF (NM1<1) GOTO 20
+        DO K = 1, NM1
+          LM = MIN(ML,N-K)
+          L = IPVT(K)
+          T = B(L)
+          IF (L==K) GOTO 10
+          B(L) = B(K)
+          B(K) = T
+10        CONTINUE
+! Original:
+!         CALL DAXPY_F90(LM,T,ABD(M+1,K),1,B(K+1),1)
+          CALL DAXPY_F90(LM,T,ABD(M+1:M+LM,K),1,B(K+1:K+LM),1)
+        END DO
+20      CONTINUE
+
+!       Now solve U*X = Y.
+
+        DO KB = 1, N
+          K = N + 1 - KB
+          B(K) = B(K)/ABD(M,K)
+          LM = MIN(K,M) - 1
+          LA = M - LM
+          LB = K - LM
+          T = -B(K)
+! Original:
+!         CALL DAXPY_F90(LM,T,ABD(LA,K),1,B(LB),1)
+          CALL DAXPY_F90(LM,T,ABD(LA:LA+LM-1,K),1,B(LB:LB+LM-1),1)
+        END DO
+        GOTO 60
+30      CONTINUE
+
+!       JOB /= 0, solve TRANS(A)*X = B.
+
+!       First solve TRANS(U)*Y = B.
+
+        DO K = 1, N
+          LM = MIN(K,M) - 1
+          LA = M - LM
+          LB = K - LM
+! Original:
+!         T = DDOT_F90(LM,ABD(LA,K),1,B(LB),1)
+          T = DDOT_F90(LM,ABD(LA:LA+LM-1,K),1,B(LB:LB+LM-1),1)
+          B(K) = (B(K)-T)/ABD(M,K)
+        END DO
+
+!       Now solve TRANS(L)*X = Y.
+
+        IF (ML==0) GOTO 50
+        IF (NM1<1) GOTO 50
+        DO KB = 1, NM1
+          K = N - KB
+          LM = MIN(ML,N-K)
+! Original:
+!         B(K) = B(K) + DDOT_F90(LM,ABD(M+1,K),1,B(K+1),1)
+          B(K) = B(K) + DDOT_F90(LM,ABD(M+1:M+LM,K),1,B(K+1:K+LM),1)
+          L = IPVT(K)
+          IF (L==K) GOTO 40
+          T = B(L)
+          B(L) = B(K)
+          B(K) = T
+40        CONTINUE
+        END DO
+50      CONTINUE
+60      CONTINUE
+        RETURN
+
+      END SUBROUTINE DGBSL_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DAXPY_F90(N,DA,DX,INCX,DY,INCY)
+! ..
+! Compute a constant times a vector plus a vector.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DA   - real(wp) scalar multiplier
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - real(wp) vector with N elements
+!     INCY -  storage spacing between elements of DY
+!     Output:
+!     DY - real(wp) result (unchanged if N <= 0)
+!     Overwrite real(wp) DY with real(wp) DA*DX + DY.
+!     For I = 0 to N-1, replace  DY(LY+I*INCY) with
+!     DA*DX(LX+I*INCX) + DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX,
+!     and LY is defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: DA
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*)
+        KPP_REAL, INTENT (INOUT) :: DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DAXPY_F90
+! ..
+!       IF (N <= 0 .OR. DA == ZERO) RETURN
+        IF (N<=0 .OR. ABS(DA)<=ZERO) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DY(IY) = DY(IY) + DA*DX(IX)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 4.
+
+20      M = MOD(N,4)
+        IF (M==0) GOTO 30
+        DY(1:M) = DY(1:M) + DA*DX(1:M)
+        IF (N<4) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 4
+          DY(I) = DY(I) + DA*DX(I)
+          DY(I+1) = DY(I+1) + DA*DX(I+1)
+          DY(I+2) = DY(I+2) + DA*DX(I+2)
+          DY(I+3) = DY(I+3) + DA*DX(I+3)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DY(I) = DA*DX(I) + DY(I)
+        END DO
+        RETURN
+
+      END SUBROUTINE DAXPY_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DCOPY_F90(N,DX,INCX,DY,INCY)
+! ..
+! Copy a vector to another vector.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - real(wp) vector with N elements
+!     INCY - storage spacing between elements of DY
+!     Output:
+!     DY - copy of vector DX(unchanged if N <= 0)
+!     Copy real(wp) DX to real(wp) DY.
+!     For I = 0 to N-1, copy DX(LX+I*INCX) to DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX,
+!     and LY is defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*)
+        KPP_REAL, INTENT (INOUT) :: DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DCOPY_F90
+! ..
+        IF (N<=0) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DY(IY) = DX(IX)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 7.
+
+20      M = MOD(N,7)
+        IF (M==0) GOTO 30
+        DO I = 1, M
+          DY(I) = DX(I)
+        END DO
+        IF (N<7) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 7
+          DY(I) = DX(I)
+          DY(I+1) = DX(I+1)
+          DY(I+2) = DX(I+2)
+          DY(I+3) = DX(I+3)
+          DY(I+4) = DX(I+4)
+          DY(I+5) = DX(I+5)
+          DY(I+6) = DX(I+6)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DY(I) = DX(I)
+        END DO
+        RETURN
+
+      END SUBROUTINE DCOPY_F90
+!_______________________________________________________________________
+
+      FUNCTION DDOT_F90(N,DX,INCX,DY,INCY)
+! ..
+! Compute the inner product of two vectors.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     DY   - real(wp) vector with N elements
+!     INCY - storage spacing between elements of DY
+!     Output:
+!     DDOT_F90 - real(wp) dot product (zero if N <= 0)
+!     Returns the dot product of real(wp) DX and DY.
+!     DDOT_F90 = sum for I = 0 to N-1 of  DX(LX+I*INCX) * DY(LY+I*INCY),
+!     where LX = 1 if INCX >= 0, else LX = 1+(1-N)*INCX, and LY is
+!     defined in a similar way using INCY.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        KPP_REAL :: DDOT_F90
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, INCY, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*), DY(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, IY, M, MP1, NS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DDOT_F90
+! ..
+        DDOT_F90 = ZERO
+        IF (N<=0) RETURN
+!       IF (INCX==INCY) IF (INCX-1) 10, 20, 40
+        IF (INCX == INCY) THEN
+          IF (INCX < 1) THEN
+             GOTO 10
+          ELSEIF (INCX == 1) THEN
+             GOTO 20
+          ELSE
+             GOTO 40
+          END IF
+        END IF
+
+!       Code for unequal or nonpositive increments.
+
+10      IX = 1
+        IY = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        IF (INCY<0) IY = (-N+1)*INCY + 1
+        DO I = 1, N
+          DDOT_F90 = DDOT_F90 + DX(IX)*DY(IY)
+          IX = IX + INCX
+          IY = IY + INCY
+        END DO
+        RETURN
+
+!       Code for both increments equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 5.
+
+20      M = MOD(N,5)
+        IF (M==0) GOTO 30
+        DO I = 1, M
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I)
+        END DO
+        IF (N<5) RETURN
+30      MP1 = M + 1
+        DO I = MP1, N, 5
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I) + DX(I+1)*DY(I+1) + &
+            DX(I+2)*DY(I+2) + DX(I+3)*DY(I+3) + DX(I+4)*DY(I+4)
+        END DO
+        RETURN
+
+!       Code for equal, positive, non-unit increments.
+
+40      NS = N*INCX
+        DO I = 1, NS, INCX
+          DDOT_F90 = DDOT_F90 + DX(I)*DY(I)
+        END DO
+        RETURN
+
+      END FUNCTION DDOT_F90
+!_______________________________________________________________________
+
+      SUBROUTINE DSCAL_F90(N,DA,DX,INCX)
+! ..
+! Multiply a vector by a constant.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DA   - real(wp) scale factor
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     Output:
+!     DX - real(wp) result (unchanged if N <= 0)
+!     Replace real(wp) DX by real(wp) DA*DX.
+!     For I = 0 to N-1, replace DX(IX+I*INCX) with DA * DX(IX+I*INCX),
+!     where IX = 1 if INCX >= 0, else IX = 1+(1-N)*INCX.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL, INTENT (IN) :: DA
+        INTEGER, INTENT (IN) :: INCX, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (INOUT) :: DX(*)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, IX, M, MP1
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MOD
+! ..
+! .. FIRST EXECUTABLE STATEMENT DSCAL_F90
+! ..
+        IF (N<=0) RETURN
+        IF (INCX==1) GOTO 10
+
+!       Code for increment not equal to 1.
+
+        IX = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        DO I = 1, N
+          DX(IX) = DA*DX(IX)
+          IX = IX + INCX
+        END DO
+        RETURN
+
+!       Code for increment equal to 1.
+
+!       Clean-up loop so remaining vector length is a multiple of 5.
+
+10      M = MOD(N,5)
+        IF (M==0) GOTO 20
+        DX(1:M) = DA*DX(1:M)
+        IF (N<5) RETURN
+20      MP1 = M + 1
+        DO I = MP1, N, 5
+          DX(I) = DA*DX(I)
+          DX(I+1) = DA*DX(I+1)
+          DX(I+2) = DA*DX(I+2)
+          DX(I+3) = DA*DX(I+3)
+          DX(I+4) = DA*DX(I+4)
+        END DO
+        RETURN
+
+      END SUBROUTINE DSCAL_F90
+!_______________________________________________________________________
+
+      FUNCTION IDAMAX_F90(N,DX,INCX)
+! ..
+! Find the smallest index of that component of a vector
+! having the maximum magnitude.
+! ..
+!     Description of Parameters
+!     Input:
+!     N    - number of elements in input vector(s)
+!     DX   - real(wp) vector with N elements
+!     INCX - storage spacing between elements of DX
+!     Output:
+!     IDAMAX_F90 - smallest index (zero if N <= 0)
+!     Find smallest index of maximum magnitude of real(wp) DX.
+!     IDAMAX_F90 = first I, I = 1 to N, to maximize
+!     ABS(DX(IX+(I-1)*INCX)), where IX = 1 if INCX >= 0,
+!     else IX = 1+(1-N)*INCX.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Function Return Value ..
+        INTEGER :: IDAMAX_F90
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: INCX, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL, INTENT (IN) :: DX(*)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: DMAX, XMAG
+        INTEGER :: I, IX
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT IDAMAX_F90
+! ..
+        IDAMAX_F90 = 0
+        IF (N<=0) RETURN
+        IDAMAX_F90 = 1
+        IF (N==1) RETURN
+
+        IF (INCX==1) GOTO 10
+
+!       Code for increments not equal to 1.
+
+        IX = 1
+        IF (INCX<0) IX = (-N+1)*INCX + 1
+        DMAX = ABS(DX(IX))
+        IX = IX + INCX
+        DO I = 2, N
+          XMAG = ABS(DX(IX))
+          IF (XMAG>DMAX) THEN
+            IDAMAX_F90 = I
+            DMAX = XMAG
+          END IF
+          IX = IX + INCX
+        END DO
+        RETURN
+
+!       Code for increments equal to 1.
+
+10      DMAX = ABS(DX(1))
+        DO I = 2, N
+          XMAG = ABS(DX(I))
+          IF (XMAG>DMAX) THEN
+            IDAMAX_F90 = I
+            DMAX = XMAG
+          END IF
+        END DO
+        RETURN
+
+      END FUNCTION IDAMAX_F90
+! End of LINPACK and BLAS subroutines
+!_______________________________________________________________________
+
+! Beginning of MA28 subroutines
+! THIS IS A FORTRAN 90 TRANSLATION OF HSL'S F77 MA28. IT IS INTENDED
+! ONLY FOR USE IN CONJUNCTION WITH THE ODE SOLVER DVODE_F90 AND IS
+! NOT FUNCTIONAL IN A STANDALONE MANNER. PLEASE NOTE THAT MA28 IS NOT
+! PUBLIC DOMAIN SOFTWARE BUT HAS BEEN MADE AVAILABLE TO THE NUMERICAL
+! ANALYSIS COMMUNITY BY HARWELL. FOR OTHER USE PLEASE CONTACT HARWELL
+! AT HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM IF YOU
+! WISH TO SOLVE GENERAL SPARSE LINEAR SYSTEMS. IF YOU FIND A BUG OR
+! ENCOUNTER A PROBLEM WITH THE USE OF MA28 WITH DVODE.F90, PLEASE
+! CONTACT ONE OF THE AUTHORS OF DVODE_F90:
+!           G.D. Byrne (gbyrne@wi.rr.com)
+!           S. Thompson, thompson@radford.edu
+! NUMEROUS CHANGES WERE MADE IN CONNECTION WITH DVODE_F90 USAGE. THESE
+! INCLUDE USING METCALF'S CONVERTER TO TRANSLATE THE ORIGINAL f77 CODE
+! TO F90, MOVING INITIALIZATIONS TO THE DVODE_F90 PRIVATE SECTION,
+! ELIMINATION OF HOLLERITHS IN FORMAT STATEMENTS, ELIMINATION OF
+! BLOCKDATA, CHANGES IN ARITHMETICAL OPERATOR SYNTAX, AND CONVERSION
+! TO UPPER CASE. THIS VERSION OF MA28 IS INTENDED ONLY FOR USE WITH
+! DVODE_F90. PLEASE DO NOT MODIFY IT FOR ANY OTHER PURPOSE. IF YOU
+! HAVE LICENSED ACCESS TO THE HSL LIBRARY, AN ALTERNATE VERSION OF
+! DVODE_F90 BASED ON THE SUCCESSOR TO MA28, MA48, IS AVAILABLE FROM
+! THE AUTHORS. PLEASE NOTE THAT THE ALTERNATE VERSION OF DVODE_F90
+! IS NOT SELF CONTAINED SINCE MA48 IS NOT DISTRIBUTED WITH DVODE_F90.
+!******************************************************************
+!             *****MA28 COPYRIGHT NOTICE*****
+! COPYRIGHT (C) 2001 COUNCIL FOR THE CENTRAL LABORATORY
+!               OF THE RESEARCH COUNCILS
+! ALL RIGHTS RESERVED.
+
+! NONE OF THE COMMENTS IN THIS COPYRIGHT NOTICE BETWEEN THE LINES
+! OF ASTERISKS SHALL BE REMOVED OR ALTERED IN ANY WAY.
+
+! THIS PACKAGE IS INTENDED FOR COMPILATION WITHOUT MODIFICATION,
+! SO MOST OF THE EMBEDDED COMMENTS HAVE BEEN REMOVED.
+
+! ALL USE IS SUBJECT TO LICENCE. IF YOU NEED FURTHER CLARIFICATION,
+! PLEASE SEE HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM
+
+! PLEASE NOTE THAT:
+
+! 1. THE PACKAGES MAY ONLY BE USED FOR THE PURPOSES SPECIFIED IN THE
+!    LICENCE AGREEMENT AND MUST NOT BE COPIED BY THE LICENSEE FOR
+!    USE BY ANY OTHER PERSONS. USE OF THE PACKAGES IN ANY COMMERCIAL
+!    APPLICATION SHALL BE SUBJECT TO PRIOR WRITTEN AGREEMENT BETWEEN
+!    HYPROTECH UK LIMITED AND THE LICENSEE ON SUITABLE TERMS AND
+!    CONDITIONS, WHICH WILL INCLUDE FINANCIAL CONDITIONS.
+! 2. ALL INFORMATION ON THE PACKAGE IS PROVIDED TO THE LICENSEE ON
+!    THE UNDERSTANDING THAT THE DETAILS THEREOF ARE CONFIDENTIAL.
+! 3. ALL PUBLICATIONS ISSUED BY THE LICENSEE THAT INCLUDE RESULTS
+!    OBTAINED WITH THE HELP OF ONE OR MORE OF THE PACKAGES SHALL
+!    ACKNOWLEDGE THE USE OF THE PACKAGES. THE LICENSEE WILL NOTIFY
+!    HSL@HYPROTECH.COM OR HYPROTECH UK LIMITED OF ANY SUCH PUBLICATION.
+! 4. THE PACKAGES MAY BE MODIFIED BY OR ON BEHALF OF THE LICENSEE
+!    FOR SUCH USE IN RESEARCH APPLICATIONS BUT AT NO TIME SHALL SUCH
+!    PACKAGES OR MODIFICATIONS THEREOF BECOME THE PROPERTY OF THE
+!    LICENSEE. THE LICENSEE SHALL MAKE AVAILABLE FREE OF CHARGE TO THE
+!    COPYRIGHT HOLDER FOR ANY PURPOSE ALL INFORMATION RELATING TO
+!    ANY MODIFICATION.
+! 5. NEITHER COUNCIL FOR THE CENTRAL LABORATORY OF THE RESEARCH
+!    COUNCILS NOR HYPROTECH UK LIMITED SHALL BE LIABLE FOR ANY
+!    DIRECT OR CONSEQUENTIAL LOSS OR DAMAGE WHATSOEVER ARISING OUT OF
+!    THE USE OF PACKAGES BY THE LICENSEE.
+!******************************************************************
+
+      SUBROUTINE MA28AD(N,NZ,A,LICN,IRN,LIRN,ICN,U,IKEEP,IW,W,IFLAG)
+! ..
+! This subroutine performs the LU factorization of A.
+! ..
+! The parameters are as follows:
+! N     Order of matrix. Not altered by subroutine.
+! NZ    Number of non-zeros in input matrix. Not altered by subroutine.
+! A     Array of length LICN. Holds non-zeros of matrix
+!       on entry and non-zeros of factors on exit. Reordered by
+!       MA20AD and MC23AD and altered by MA30AD.
+! LICN  Length of arrays A and ICN. Not altered by subroutine.
+! IRN   Array of length LIRN. Holds row indices on input.
+!       Used as workspace by MA30AD to hold column orientation of
+!       matrix.
+! LIRN  Length of array IRN. Not altered by the subroutine.
+! ICN   Array of length LICN. Holds column indices on entry
+!       and column indices of decomposed matrix on exit. Reordered
+!       by MA20AD and MC23AD and altered by MA30AD.
+! U     Variable set by user to control bias towards numeric or
+!       sparsity pivoting. U = 1.0 gives partial pivoting
+!       while U = 0. does not check multipliers at all. Values of U
+!       greater than one are treated as one while negative values
+!       are treated as zero. Not altered by subroutine.
+! IKEEP Array of length 5*N used as workspace by MA28AD.
+!       (See later comments.) It is not required to be set on entry
+!       and, on exit, it contains information about the decomposition.
+!       It should be preserved between this call and subsequent calls
+!       to MA28BD or MA30CD.
+!       IKEEP(I,1),I = 1,N holds the total length of the part of row
+!       I in the diagonal block.
+!       Row IKEEP(I,2),I = 1,N of the input matrix is the Ith row in
+!       pivot order.
+!       Column IKEEP(I,3),I = 1,N of the input matrix is the Ith
+!       Column in pivot order.
+!       IKEEP(I,4),I = 1,N holds the length of the part of row I in
+!       the L part of the LU decomposition.
+!       IKEEP(I,5),I = 1,N holds the length of the part of row I in
+!       the off-diagonal blocks. If there is only one diagonal block,
+!       IKEEP(1,5) will be set to -1.
+! IW    Array of length 8*N. If the option NSRCH <= N is used, then
+!       the length of array IW can be reduced to 7*N.
+! W     Array length N. Used by MC24AD both as workspace and to return
+!       growth estimate in W(1). The use of this array by MA28AD is
+!       thus optional depending on logical variable GROW.
+! IFLAG Variable used as error flag by subroutine. A positive or
+!       zero value on exit indicates success. Possible negative
+!       values are -1 through -14.
+
+! Private Variable Information.
+! LP, MP Default value 6 (line printer). Unit number for error
+!     messages and duplicate element warning, respectively.
+! NLP, MLP INTEGER. Unit number for messages from MA30AD and
+!     MC23AD. Set by MA28AD to the value of LP.
+! LBLOCK Logical variable with default value .TRUE. If .TRUE.,
+!     MC23AD is used to first permute the matrix to block lower
+!     triangular form.
+! GROW Logical variable with default value .TRUE. If .TRUE., then
+!     an estimate of the increase in size of matrix elements during
+!     LU decomposition is given by MC24AD.
+! EPS, RMIN, RESID. Variables not referenced by MA28AD.
+! IRNCP, ICNCP INTEGER. Set to number of compresses on arrays IRN
+!     and ICN/A, respectively.
+! MINIRN, MINICN INTEGER. Minimum length of arrays IRN and ICN/A,
+!     respectively, for success on future runs.
+! IRANK INTEGER. Estimated rank of matrix.
+! MIRNCP, MICNCP, MIRANK, MIRN, MICN INTEGER. Variables used to
+!     communicate between MA30FD and MA28FD values of
+!     abovenamed variables with somewhat similar names.
+! ABORT1, ABORT2 LOGICAL. Variables with default value .TRUE.
+!     If .FALSE., then decomposition will be performed even
+!     if the matrix is structurally or numerically singular,
+!     respectively.
+! ABORTA, ABORTB LOGICAL. Variables used to communicate values
+!     of ABORT1 and ABORT2 to MA30AD.
+! ABORT Logical variable used to communicate value of ABORT1
+!     to MC23AD.
+! ABORT3 Logical variable. Not referenced by MA28AD.
+! IDISP Array of length 2. Used to communicate information
+!     on decomposition between this call to MA28AD and subsequent
+!     calls to MA28BD and MA30CD. On exit, IDISP(1) and
+!     IDISP(2) indicate position in arrays A and ICN of the
+!     first and last elements in the LU decomposition of the
+!     diagonal blocks, respectively.
+! NUMNZ Structural rank of matrix.
+! NUM   Number of diagonal blocks.
+! LARGE Size of largest diagonal block.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: U
+        INTEGER :: IFLAG, LICN, LIRN, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5), IRN(LIRN), IW(N,8)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: UPRIV
+        INTEGER :: I, I1, IEND, II, J, J1, J2, JAY, JJ, KNUM, LENGTH, MOVE, &
+          NEWJ1, NEWPOS
+        CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28AD
+! ..
+!       Check that this call was made from DVODE_F90 and, if not, stop.
+        IF (.NOT.OK_TO_CALL_MA28) THEN
+          MSG = 'This version of MA28 may be used only in conjunction with DVODE_F90.'
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = 'Please refer to the following HSL copyright notice for MA28.'
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '******************************************************************     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '             *****MA28 COPYRIGHT NOTICE*****                           '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' COPYRIGHT (C) 2001 COUNCIL FOR THE CENTRAL LABORATORY                 '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '               OF THE RESEARCH COUNCILS                                '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' ALL RIGHTS RESERVED.                                                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' NONE OF THE COMMENTS IN THIS COPYRIGHT NOTICE BETWEEN THE LINES       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' OF ASTERISKS SHALL BE REMOVED OR ALTERED IN ANY WAY.                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' THIS PACKAGE IS INTENDED FOR COMPILATION WITHOUT MODIFICATION,        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' SO MOST OF THE EMBEDDED COMMENTS HAVE BEEN REMOVED.                   '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' ALL USE IS SUBJECT TO LICENCE. IF YOU NEED FURTHER CLARIFICATION,     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' PLEASE SEE HTTP://WWW.HSL-LIBRARY.COM OR CONTACT HSL@HYPROTECH.COM    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' PLEASE NOTE THAT:                                                     '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 1. THE PACKAGES MAY ONLY BE USED FOR THE PURPOSES SPECIFIED IN THE    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    LICENCE AGREEMENT AND MUST NOT BE COPIED BY THE LICENSEE FOR       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    USE BY ANY OTHER PERSONS. USE OF THE PACKAGES IN ANY COMMERCIAL    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    APPLICATION SHALL BE SUBJECT TO PRIOR WRITTEN AGREEMENT BETWEEN    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    HYPROTECH UK LIMITED AND THE LICENSEE ON SUITABLE TERMS AND        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    CONDITIONS, WHICH WILL INCLUDE FINANCIAL CONDITIONS.               '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 2. ALL INFORMATION ON THE PACKAGE IS PROVIDED TO THE LICENSEE ON      '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    THE UNDERSTANDING THAT THE DETAILS THEREOF ARE CONFIDENTIAL.       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 3. ALL PUBLICATIONS ISSUED BY THE LICENSEE THAT INCLUDE RESULTS       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    OBTAINED WITH THE HELP OF ONE OR MORE OF THE PACKAGES SHALL        '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    ACKNOWLEDGE THE USE OF THE PACKAGES. THE LICENSEE WILL NOTIFY      '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    HSL@HYPROTECH.COM OR HYPROTECH UK LIMITED OF ANY SUCH PUBLICATION. '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 4. THE PACKAGES MAY BE MODIFIED BY OR ON BEHALF OF THE LICENSEE       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    FOR SUCH USE IN RESEARCH APPLICATIONS BUT AT NO TIME SHALL SUCH    '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    PACKAGES OR MODIFICATIONS THEREOF BECOME THE PROPERTY OF THE       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    LICENSEE. THE LICENSEE SHALL MAKE AVAILABLE FREE OF CHARGE TO THE  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    COPYRIGHT HOLDER FOR ANY PURPOSE ALL INFORMATION RELATING TO       '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    ANY MODIFICATION.                                                  '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = ' 5. NEITHER COUNCIL FOR THE CENTRAL LABORATORY OF THE RESEARCH         '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    COUNCILS NOR HYPROTECH UK LIMITED SHALL BE LIABLE FOR ANY          '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    DIRECT OR CONSEQUENTIAL LOSS OR DAMAGE WHATSOEVER ARISING OUT OF   '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '    THE USE OF PACKAGES BY THE LICENSEE.                               '
+          CALL XERRDV(MSG,1770,1,0,0,0,0,ZERO,ZERO)
+          MSG = '******************************************************************     '
+          CALL XERRDV(MSG,1770,2,0,0,0,0,ZERO,ZERO)
+        END IF
+
+!       Some initialization and transfer of information between
+!       common blocks (see earlier comments).
+        IFLAG = 0
+        ABORTA = ABORT1
+        ABORTB = ABORT2
+        ABORT = ABORT1
+        MLP = LP
+        NLP = LP
+        TOL1 = TOL
+        LBIG1 = LBIG
+        NSRCH1 = NSRCH
+!       UPRIV private copy of U is used in case it is outside
+!       range zero to one and is thus altered by MA30AD.
+        UPRIV = U
+!       Simple data check on input variables and array dimensions.
+        IF (N>0) GOTO 10
+        IFLAG = -8
+        IF (LP/=0) WRITE (LP,90000) N
+        GOTO 170
+10      IF (NZ>0) GOTO 20
+        IFLAG = -9
+        IF (LP/=0) WRITE (LP,90001) NZ
+        GOTO 170
+20      IF (LICN>=NZ) GOTO 30
+        IFLAG = -10
+        IF (LP/=0) WRITE (LP,90002) LICN
+        GOTO 170
+30      IF (LIRN>=NZ) GOTO 40
+        IFLAG = -11
+        IF (LP/=0) WRITE (LP,90003) LIRN
+        GOTO 170
+
+!       Data check to see if all indices lie between 1 and N.
+40      DO 50 I = 1, NZ
+          IF (IRN(I)>0 .AND. IRN(I)<=N .AND. ICN(I)>0 .AND. ICN(I)<=N) &
+            GOTO 50
+          IF (IFLAG==0 .AND. LP/=0) WRITE (LP,90004)
+          IFLAG = -12
+          IF (LP/=0) WRITE (LP,90005) I, A(I), IRN(I), ICN(I)
+50      END DO
+        IF (IFLAG<0) GOTO 180
+
+!       Sort matrix into row order.
+        CALL MC20AD(N,NZ,A,ICN,IW(1,1),IRN,0)
+!       Part of IKEEP is used here as a work-array. IKEEP(I,2) is
+!       the last row to have a non-zero in column I. IKEEP(I,3)
+!       is the off-set of column I from the start of the row.
+        IKEEP(1:N,2) = 0
+        IKEEP(1:N,1) = 0
+
+!       Check for duplicate elements summing any such entries
+!       and printing a warning message on unit MP.
+!       MOVE is equal to the number of duplicate elements found.
+        MOVE = 0
+!       The loop also calculates the largest element in the matrix,
+!       THEMAX.
+        THEMAX = ZERO
+!       J1 is position in arrays of first non-zero in row.
+        J1 = IW(1,1)
+        DO 90 I = 1, N
+          IEND = NZ + 1
+          IF (I/=N) IEND = IW(I+1,1)
+          LENGTH = IEND - J1
+          IF (LENGTH==0) GOTO 90
+          J2 = IEND - 1
+          NEWJ1 = J1 - MOVE
+          DO 80 JJ = J1, J2
+            J = ICN(JJ)
+            THEMAX = MAX(THEMAX,ABS(A(JJ)))
+            IF (IKEEP(J,2)==I) GOTO 70
+!           First time column has ocurred in current row.
+            IKEEP(J,2) = I
+            IKEEP(J,3) = JJ - MOVE - NEWJ1
+            IF (MOVE==0) GOTO 80
+!           Shift necessary because of previous duplicate element.
+            NEWPOS = JJ - MOVE
+            A(NEWPOS) = A(JJ)
+            ICN(NEWPOS) = ICN(JJ)
+            GOTO 80
+!           Duplicate element.
+70          MOVE = MOVE + 1
+            LENGTH = LENGTH - 1
+            JAY = IKEEP(J,3) + NEWJ1
+            IF (MP/=0) WRITE (MP,90006) I, J, A(JJ)
+            A(JAY) = A(JAY) + A(JJ)
+            THEMAX = MAX(THEMAX,ABS(A(JAY)))
+80        END DO
+          IKEEP(I,1) = LENGTH
+          J1 = IEND
+90      END DO
+
+!       KNUM is actual number of non-zeros in matrix with any multiple
+!       entries counted only once.
+        KNUM = NZ - MOVE
+        IF (.NOT.LBLOCK) GOTO 100
+
+!       Perform block triangularisation.
+        CALL MC23AD(N,ICN,A,LICN,IKEEP(1,1),IDISP,IKEEP(1,2),IKEEP(1,3), &
+          IKEEP(1,5),IW(1,3),IW)
+        IF (IDISP(1)>0) GOTO 130
+        IFLAG = -7
+        IF (IDISP(1)==-1) IFLAG = -1
+        IF (LP/=0) WRITE (LP,90007)
+        GOTO 170
+
+!       Block triangularization not requested.
+!       Move structure to end of data arrays in preparation for MA30AD.
+!       Also set LENOFF(1) to -1 and set permutation arrays.
+100     DO I = 1, KNUM
+          II = KNUM - I + 1
+          NEWPOS = LICN - I + 1
+          ICN(NEWPOS) = ICN(II)
+          A(NEWPOS) = A(II)
+        END DO
+        IDISP(1) = 1
+        IDISP(2) = LICN - KNUM + 1
+        DO I = 1, N
+          IKEEP(I,2) = I
+          IKEEP(I,3) = I
+        END DO
+        IKEEP(1,5) = -1
+130     IF (LBIG) BIG1 = THEMAX
+        IF (NSRCH<=N) GOTO 140
+
+!       Perform LU decomposition on diagonal blocks.
+        CALL MA30AD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2),       &
+          IKEEP(1,3),IRN,LIRN,IW(1,2),IW(1,3),IW(1,4),IW(1,5),IW(1,6),IW(1,7), &
+          IW(1,8),IW,UPRIV,IFLAG)
+        GOTO 150
+!       This call if used if NSRCH has been set less than or equal to N.
+!       In this case, two integer work arrays of length can be saved.
+140     CALL MA30AD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2),       &
+          IKEEP(1,3),IRN,LIRN,IW(1,2),IW(1,3),IW(1,4),IW(1,5),IW,IW,IW(1,6),IW,&
+          UPRIV,IFLAG)
+
+!       Transfer private variable information.
+!150    MINIRN = MAX(MIRN,NZ)
+!       MINICN = MAX(MICN,NZ)
+150     MINIRN = MAX(MINIRN,NZ)
+        MINICN = MAX(MINICN,NZ)
+!       IRNCP = MIRNCP
+!       ICNCP = MICNCP
+!       IRANK = MIRANK
+!       NDROP = NDROP1
+        IF (LBIG) BIG = BIG1
+        IF (IFLAG>=0) GOTO 160
+        IF (LP/=0) WRITE (LP,90008)
+        GOTO 170
+
+!       Reorder off-diagonal blocks according to pivot permutation.
+160     I1 = IDISP(1) - 1
+        IF (I1/=0) CALL MC22AD(N,ICN,A,I1,IKEEP(1,5),IKEEP(1,2), &
+          IKEEP(1,3),IW,IRN)
+        I1 = IDISP(1)
+        IEND = LICN - I1 + 1
+
+!       Optionally calculate element growth estimate.
+        IF (GROW) CALL MC24AD(N,ICN,A(I1),IEND,IKEEP,IKEEP(1,4),W)
+!       Increment growth estimate by original maximum element.
+        IF (GROW) W(1) = W(1) + THEMAX
+        IF (GROW .AND. N>1) W(2) = THEMAX
+!       Set flag if the only error is due to duplicate elements.
+        IF (IFLAG>=0 .AND. MOVE/=0) IFLAG = -14
+        GOTO 180
+170     IF (LP/=0) WRITE (LP,90009)
+180     RETURN
+90000   FORMAT (' N is out of range = ',I10)
+90001   FORMAT (' NZ is non positive = ',I10)
+90002   FORMAT (' LICN is too small = ',I10)
+90003   FORMAT (' LIRN is too small = ',I10)
+90004   FORMAT (' Error return from MA28AD because indices found out', &
+          ' of range')
+90005   FORMAT (1X,I6,'The element with value ',1P,D22.14, &
+          ' is out of range with indices ',I8,',',I8)
+90006   FORMAT (' Duplicate element in position ',I8,',',I8,' with value ',1P, &
+          D22.14)
+90007   FORMAT (' Error return from MC23AD')
+90008   FORMAT (' Error return from MA30AD')
+90009   FORMAT (' Error return from MA28AD')
+
+      END SUBROUTINE MA28AD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28BD(N,NZ,A,LICN,IVECT,JVECT,ICN,IKEEP,IW,W,IFLAG)
+! ..
+! This subroutine factorizes a matrix of a similar sparsity
+! pattern to that previously factorized by MA28AD.
+! ..
+! The parameters are as follows:
+! N            Order of matrix. Not altered by subroutine.
+! NZ           Number of non-zeros in input matrix. Not
+!              altered by subroutine.
+! A            Array of length LICN. Holds non-zeros of
+!              matrix on entry and non-zeros of factors on exit.
+!              Reordered by MA28DD and altered by MA30BD.
+! LICN         Length of arrays A and ICN. Not altered by
+!              subroutine.
+! IVECT, JVECT Arrays of length NZ. Hold row and column
+!              indices of non-zeros, respectively. Not altered
+!              by subroutine.
+! ICN          Array of length LICN. Same array as output
+!              from MA28AD. Unchanged by MA28BD.
+! IKEEP        Array of length 5*N. Same array as output
+!              from MA28AD. Unchanged by MA28BD.
+! IW           Array length 5*N. Used as workspace by
+!              MA28DD and MA30BD.
+! W            Array of length N. Used as workspace by
+!              MA28DD, MA30BD and (optionally) MC24AD.
+! IFLAG        Integer used as error flag, with positive
+!              or zero value indicating success.
+
+! Private Variable Information.
+! Unless otherwise stated private variables are as in MA28AD.
+! Those variables referenced by MA28BD are mentioned below.
+! LP, MP     Integers used as in MA28AD as unit number for error
+!            and warning messages, respectively.
+! NLP        Integer variable used to give value of LP to MA30ED.
+! EPS        MA30BD will output a positive value
+!            for IFLAG if any modulus of the ratio of pivot element
+!            to the largest element in its row (U part only) is less
+!            than EPS (unless EPS is greater than 1.0 when no action
+!            takes place).
+! RMIN       Variable equal to the value of this minimum ratio in
+!            cases where EPS is less than or equal to 1.0.
+! MEPS,MRMIN Variables used by the subroutine to communicate between
+!            MA28FD and MA30GD.
+! IDISP      Integer array of length 2. The same as that used by
+!            MA28AD. Unchanged by MA28BD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IFLAG, LICN, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5), IVECT(NZ), IW(N,5), JVECT(NZ)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I1, IDUP, IEND
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28BD
+! ..
+!       Check to see if elements were dropped in previous MA28AD call.
+        IF (NDROP==0) GOTO 10
+        IFLAG = -15
+        IF (LP/=0) WRITE (LP,90000) IFLAG, NDROP
+        GOTO 70
+10      IFLAG = 0
+        MEPS = EPS
+        NLP = LP
+!       Simple data check on variables.
+        IF (N>0) GOTO 20
+        IFLAG = -11
+        IF (LP/=0) WRITE (LP,90001) N
+        GOTO 60
+20      IF (NZ>0) GOTO 30
+        IFLAG = -10
+        IF (LP/=0) WRITE (LP,90002) NZ
+        GOTO 60
+30      IF (LICN>=NZ) GOTO 40
+        IFLAG = -9
+        IF (LP/=0) WRITE (LP,90003) LICN
+        GOTO 60
+
+40      CALL MA28DD(N,A,LICN,IVECT,JVECT,NZ,ICN,IKEEP(1,1),IKEEP(1,4), &
+          IKEEP(1,5),IKEEP(1,2),IKEEP(1,3),IW(1,3),IW,W(1),IFLAG)
+!       THEMAX is largest element in matrix.
+        THEMAX = W(1)
+        IF (LBIG) BIG1 = THEMAX
+!       IDUP equals one if there were duplicate elements, zero otherwise.
+        IDUP = 0
+        IF (IFLAG==(N+1)) IDUP = 1
+        IF (IFLAG<0) GOTO 60
+
+!       Perform row Gauss elimination on the structure received from MA28DD.
+        CALL MA30BD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IDISP,IKEEP(1,2), &
+          IKEEP(1,3),W,IW,IFLAG)
+
+!       Transfer private variable information.
+        IF (LBIG) BIG1 = BIG
+!       RMIN = MRMIN
+        IF (IFLAG>=0) GOTO 50
+        IFLAG = -2
+        IF (LP/=0) WRITE (LP,90004)
+        GOTO 60
+
+!       Optionally calculate the growth parameter.
+50      I1 = IDISP(1)
+        IEND = LICN - I1 + 1
+        IF (GROW) CALL MC24AD(N,ICN,A(I1),IEND,IKEEP,IKEEP(1,4),W)
+!       Increment estimate by largest element in input matrix.
+        IF (GROW) W(1) = W(1) + THEMAX
+        IF (GROW .AND. N>1) W(2) = THEMAX
+!       Set flag if the only error is due to duplicate elements.
+        IF (IDUP==1 .AND. IFLAG>=0) IFLAG = -14
+        GOTO 70
+60      IF (LP/=0) WRITE (LP,90005)
+70      RETURN
+90000   FORMAT (' Error return from MA28BD with IFLAG = ',I4/I7, &
+          ' Entries dropped from structure by MA28AD')
+90001   FORMAT (' N is out of range = ',I10)
+90002   FORMAT (' NZ is non positive = ',I10)
+90003   FORMAT (' LICN is too small = ',I10)
+90004   FORMAT (' Error return from MA30BD')
+90005   FORMAT (' + Error return from MA28BD')
+
+      END SUBROUTINE MA28BD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28DD(N,A,LICN,IVECT,JVECT,NZ,ICN,LENR,LENRL,LENOFF, &
+        IP,IQ,IW1,IW,W1,IFLAG)
+! ..
+! This subroutine need never be called by the user directly. It sorts
+! the user's matrix into the structure of the decomposed form and checks
+! for the presence of duplicate entries or non-zeros lying outside the
+! sparsity pattern of the decomposition. It also calculates the largest
+! element in the input matrix.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: W1
+        INTEGER :: IFLAG, LICN, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN)
+        INTEGER :: ICN(LICN), IP(N), IQ(N), IVECT(NZ), IW(N,2), IW1(N,3), &
+          JVECT(NZ), LENOFF(N), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AA
+        INTEGER :: I, IBLOCK, IDISP2, IDUMMY, II, INEW, IOLD, J1, J2, JCOMP, &
+          JDUMMY, JJ, JNEW, JOLD, MIDPT
+        LOGICAL :: BLOCKL
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28DD
+! ..
+        BLOCKL = LENOFF(1) >= 0
+!       IW1(I,3) is set to the block in which row I lies and the
+!       inverse permutations to IP and IQ are set in IW1(:,1) and
+!       IW1(:,2), respectively.
+!       Pointers to beginning of the part of row I in diagonal and
+!       off-diagonal blocks are set in IW(I,2) and IW(I,1),
+!       respectively.
+        IBLOCK = 1
+        IW(1,1) = 1
+        IW(1,2) = IDISP(1)
+        DO 10 I = 1, N
+          IW1(I,3) = IBLOCK
+          IF (IP(I)<0) IBLOCK = IBLOCK + 1
+          II = IABS(IP(I)+0)
+!         II = IABS(IP(I))
+          IW1(II,1) = I
+          JJ = IQ(I)
+          JJ = IABS(JJ)
+          IW1(JJ,2) = I
+          IF (I==1) GOTO 10
+          IF (BLOCKL) IW(I,1) = IW(I-1,1) + LENOFF(I-1)
+          IW(I,2) = IW(I-1,2) + LENR(I-1)
+10      END DO
+!       Place each non-zero in turn into its correct location in
+!       the A/ICN array.
+        IDISP2 = IDISP(2)
+        DO 170 I = 1, NZ
+!         Necessary to avoid reference to unassigned element of ICN.
+          IF (I>IDISP2) GOTO 20
+          IF (ICN(I)<0) GOTO 170
+20        IOLD = IVECT(I)
+          JOLD = JVECT(I)
+          AA = A(I)
+!         This is a dummy loop for following a chain of interchanges.
+!         It will be executed NZ TIMES in total.
+          DO IDUMMY = 1, NZ
+!           Perform some validity checks on IOLD and JOLD.
+            IF (IOLD<=N .AND. IOLD>0 .AND. JOLD<=N .AND. JOLD>0) GOTO 30
+            IF (LP/=0) WRITE (LP,90000) I, A(I), IOLD, JOLD
+            IFLAG = -12
+            GOTO 180
+30          INEW = IW1(IOLD,1)
+            JNEW = IW1(JOLD,2)
+!           Are we in a valid block and is it diagonal or off-diagonal?
+!           IF (IW1(INEW,3)-IW1(JNEW,3)) 40, 60, 50
+!40         IFLAG = -13
+            IF (IW1(INEW,3)-IW1(JNEW,3) == 0) GOTO 60
+            IF (IW1(INEW,3)-IW1(JNEW,3) > 0) GOTO 50
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90001) IOLD, JOLD
+            GOTO 180
+50          J1 = IW(INEW,1)
+            J2 = J1 + LENOFF(INEW) - 1
+            GOTO 110
+!           Element is in diagonal block.
+60          J1 = IW(INEW,2)
+            IF (INEW>JNEW) GOTO 70
+            J2 = J1 + LENR(INEW) - 1
+            J1 = J1 + LENRL(INEW)
+            GOTO 110
+70          J2 = J1 + LENRL(INEW)
+!           Binary search of ordered list. Element in L part of row.
+            DO 100 JDUMMY = 1, N
+              MIDPT = (J1+J2)/2
+              JCOMP = IABS(ICN(MIDPT)+0)
+!             JCOMP = IABS(ICN(MIDPT))
+!             IF (JNEW-JCOMP) 80, 130, 90
+!80           J2 = MIDPT
+              IF (JNEW-JCOMP == 0) GOTO 130
+              IF (JNEW-JCOMP > 0) GOTO 90
+              J2 = MIDPT
+              GOTO 100
+90            J1 = MIDPT
+100         END DO
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90002) IOLD, JOLD
+            GOTO 180
+!           Linear search. Element in L part of row or off-diagonal blocks.
+110         DO MIDPT = J1, J2
+              IF (IABS(ICN(MIDPT)+0)==JNEW) GOTO 130
+!             IF (IABS(ICN(MIDPT))==JNEW) GOTO 130
+            END DO
+            IFLAG = -13
+            IF (LP/=0) WRITE (LP,90002) IOLD, JOLD
+            GOTO 180
+!           Equivalent element of ICN is in position MIDPT.
+130         IF (ICN(MIDPT)<0) GOTO 160
+            IF (MIDPT>NZ .OR. MIDPT<=I) GOTO 150
+            W1 = A(MIDPT)
+            A(MIDPT) = AA
+            AA = W1
+            IOLD = IVECT(MIDPT)
+            JOLD = JVECT(MIDPT)
+            ICN(MIDPT) = -ICN(MIDPT)
+          END DO
+150       A(MIDPT) = AA
+          ICN(MIDPT) = -ICN(MIDPT)
+          GOTO 170
+160       A(MIDPT) = A(MIDPT) + AA
+!        Set flag for duplicate elements.
+          iflag = n + 1
+170     END DO
+!       Reset ICN array and zero elements in LU but not in A.
+!       Also calculate the maximum element of A.
+180     W1 = ZERO
+        DO 200 I = 1, IDISP2
+          IF (ICN(I)<0) GOTO 190
+          A(I) = ZERO
+          GOTO 200
+190       ICN(I) = -ICN(I)
+          W1 = MAX(W1,ABS(A(I)))
+200     END DO
+        RETURN
+90000   FORMAT (' Element ',I6,' with value ',D22.14,' has indices ',I8, &
+          ','/I8,' indices out of range')
+90001   FORMAT (' Non-zero ',I7,',',I6,' in zero off-diagonal',' block')
+90002   FORMAT (' Element ',I6,',',I6,' was not in LU pattern')
+
+      END SUBROUTINE MA28DD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28CD(N,A,LICN,ICN,IKEEP,RHS,W,MTYPE)
+! ..
+! This subroutine uses the factors from MA28AD or MA28BD to solve a
+! system of equations without iterative refinement.
+! ..
+! The parameters are:
+! N     Order of matrix. Not altered by subroutine.
+! A     array of length LICN. the same array as
+!       was used in the most recent call to MA28AD or MA28BD.
+! LICN  Length of arrays A and ICN. Not altered by subroutine.
+! ICN   Array of length LICN. Same array as output from
+!       MA28AD. Unchanged by MA30CD.
+! IKEEP Array of length 5*N. Same array as output from
+!       MA28AD. Unchanged by MA30CD.
+! RHS   Array of length N. On entry, it holds the
+!       right hand side, on exit, the solution vector.
+! W     Array of length N. Used as workspace by MA30CD.
+! MTYPE Integer used to tell MA30CD to solve the direct
+!       equation (MTYPE = 1) or its transpose (MTYPE /= 1).
+
+! Private Variable Information.
+! Unless otherwise stated private variables are as in MA28AD.
+! Those variables referenced by MA30CD are mentioned below.
+! RESID   Variable which returns maximum residual of
+!         equations where pivot was zero.
+! MRESID  Variable used by MA30CD to communicate between
+!         MA28FD and MA30HD.
+! IDISP   Integer array of length 2. The same as that used
+!         by MA28AD. Unchanged by MA28BD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, MTYPE, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), RHS(N), W(N)
+        INTEGER :: ICN(LICN), IKEEP(N,5)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28CD
+! ..
+!       This call performs the solution of the set of equations.
+        CALL MA30CD(N,ICN,A,LICN,IKEEP(1,1),IKEEP(1,4),IKEEP(1,5),IDISP, &
+          IKEEP(1,2),IKEEP(1,3),RHS,W,MTYPE)
+!       Transfer private variable information.
+        RESID = MRESID
+        RETURN
+
+      END SUBROUTINE MA28CD
+!_______________________________________________________________________
+
+      SUBROUTINE MA28ID(N,NZ,AORG,IRNORG,ICNORG,LICN,A,ICN,IKEEP,RHS, &
+        X,R,W,MTYPE,PREC,IFLAG)
+! ..
+! This subroutine uses the factors from an earlier call to MA28AD or
+! MA28BD to solve the system of equations with iterative refinement.
+! ..
+! The parameters are:
+! N      Order of the matrix. Not altered by the subroutine.
+! NZ     Number of entries in the original matrix. Not altered by
+!        the subroutine.
+!        For this entry the original matrix must have been saved in
+!        AORG, IRNORG, ICNORG where entry AORG(K) is in row IRNORG(K)
+!        and column ICNORG(K),K = 1,...,NZ. Information about the
+!        factors of A is communicated to this subroutine via the
+!        parameters LICN, A, ICN and IKEEP where:
+! AORG   Array of length NZ. Not altered by MA28ID.
+! IRNORG Array of length NZ. Not altered by MA28ID.
+! ICNORG Array of length NZ. Not altered by MA28ID.
+! LICN   Length of arrays A and ICN. Not altered by the subroutine.
+! A      Array of length LICN. It must be unchanged since the
+!        last call to MA28AD or MA28BD. Not altered by the
+!        subroutine.
+! ICN, IKEEP are the arrays (of lengths LICN and 5*N, respectively)
+!        of the same names as in the previous all to MA28AD. They
+!        should be unchanged since this earlier call and they are
+!        not altered by MA28ID.
+! The other parameters are as follows:
+! RHS    Array of length N. The user must set RHS(I) to contain
+!        the value of the Ith component of the right hand side.
+!        Not altered by MA28ID.
+! X      Array of length N. If an initial guess of the solution
+!        is given (ISTART equal to 1), then the user must set X(I)
+!        to contain the value of the Ith component of the estimated
+!        solution. On exit, X(I) contains the Ith component of the
+!        solution vector.
+! R      Array of length N. It need not be set on entry. On exit,
+!        R(I) contains the Ith component of an estimate of the error
+!        if MAXIT is greater than 0.
+! W      Array of length N. Used as workspace by MA28ID.
+! MTYPE  Must be set to determine whether MA28ID will solve A*X = RHS
+!        (MTYPE = 1) or AT*X = RHS (MTYPE /= 1). Not altered by MA28ID.
+! PREC   Should be set by the user to the relative accuracy required.
+!        The iterative refinement will terminate if the magnitude of
+!        the largest component of the estimated error relative to the
+!        largest component in the solution is less than PREC.
+!        Not altered by MA28ID.
+! IFLAG  Diagnostic flag which will be set to zero on successful
+!        exit from MA28ID. Otherwise it will have a non-zero value.
+!        The non-zero value IFLAG can have on exit from MA28ID are
+!        -16 indicating that more than MAXIT iteartions are required.
+!        -17 indicating that more convergence was too slow.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: PREC
+        INTEGER :: IFLAG, LICN, MTYPE, N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), AORG(NZ), R(N), RHS(N), W(N), X(N)
+        INTEGER :: ICN(LICN), ICNORG(NZ), IKEEP(N,5), IRNORG(NZ)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: CONVER, D, DD
+        INTEGER :: I, ITERAT, NCOL, NROW
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA28ID
+! ..
+!       Initialization of NOITER, ERRMAX, and IFLAG.
+        NOITER = 0
+        ERRMAX = ZERO
+        IFLAG = 0
+
+!       Jump if a starting vector has been supplied by the user.
+
+        IF (ISTART==1) GOTO 20
+
+!       Make a copy of the right-hand side vector.
+
+        X(1:N) = RHS(1:N)
+
+!       Find the first solution.
+
+        CALL MA28CD(N,A,LICN,ICN,IKEEP,X,W,MTYPE)
+
+!       Stop the computations if MAXIT = 0.
+
+20      IF (MAXIT==0) GOTO 160
+
+!       Calculate the max-norm of the first solution.
+
+        DD = 0.0
+        DO I = 1, N
+          DD = MAX(DD,ABS(X(I)))
+        END DO
+        DXMAX = DD
+
+!       Begin the iterative process.
+
+        DO 120 ITERAT = 1, MAXIT
+          D = DD
+
+!         Calculate the residual vector.
+
+          R(1:N) = RHS(1:N)
+          IF (MTYPE==1) GOTO 60
+          DO I = 1, NZ
+            NROW = IRNORG(I)
+            NCOL = ICNORG(I)
+            R(NCOL) = R(NCOL) - AORG(I)*X(NROW)
+          END DO
+          GOTO 80
+!         MTYPE = 1.
+60        DO I = 1, NZ
+            NROW = IRNORG(I)
+            NCOL = ICNORG(I)
+            R(NROW) = R(NROW) - AORG(I)*X(NCOL)
+          END DO
+80        DRES = 0.0
+
+!         Find the max-norm of the residual vector.
+
+          DO I = 1, N
+            DRES = MAX(DRES,ABS(R(I)))
+          END DO
+
+!         Stop the calculations if the max-norm of
+!         the residual vector is zero.
+
+!         IF (DRES == 0.0) GOTO 150
+          IF (ABS(DRES)<=ZERO) GOTO 150
+
+!         Calculate the correction vector.
+
+          NOITER = NOITER + 1
+          CALL MA28CD(N,A,LICN,ICN,IKEEP,R,W,MTYPE)
+
+!         Find the max-norm of the correction vector.
+
+          DD = 0.0
+          DO I = 1, N
+            DD = MAX(DD,ABS(R(I)))
+          END DO
+
+!         Check the convergence.
+
+          IF (DD>D*CGCE .AND. ITERAT>=2) GOTO 130
+          IF (ABS((DXMAX*TEN+DD)-(DXMAX*TEN))<=ZERO) GOTO 140
+
+!         Attempt to improve the solution.
+
+          DXMAX = 0.0
+          DO I = 1, N
+            X(I) = X(I) + R(I)
+            DXMAX = MAX(DXMAX,ABS(X(I)))
+          END DO
+
+!         Check the stopping criterion.
+ 
+          IF (DD<PREC*DXMAX) GOTO 140
+120     END DO
+!       More than MAXIT iterations required.
+        IFLAG = -16
+        WRITE (LP,90000) IFLAG, MAXIT
+        GOTO 140
+!       Convergence rate unacceptably slow.
+130     IFLAG = -17
+        CONVER = DD/D
+        WRITE (LP,90001) IFLAG, CONVER, CGCE
+
+!       The iterative process is terminated.
+
+140     ERRMAX = DD
+150     CONTINUE
+160     RETURN
+90000   FORMAT (' Error return from MA28ID with IFLAG = ',I3/' More than ', &
+          I5,' iterations required')
+90001   FORMAT (' Error return from MA28I with IFLAG = ', &
+          I3/' Convergence rate of ',1P,E9.2,' too slow'/ &
+          ' Maximum acceptable rate set to ',1P,E9.2)
+
+      END SUBROUTINE MA28ID
+!_______________________________________________________________________
+
+! Private Variable Information.
+! LP, MP are used by the subroutine as the unit numbers for its warning
+!     and diagnostic messages. Default value for both is 6 (for line
+!     printer output). The user can either reset them to a different
+!     stream number or suppress the output by setting them to zero.
+!     While LP directs the output of error diagnostics from the
+!     principal subroutines and internally called subroutines, MP
+!     controls only the output of a message which warns the user that
+!     he has input two or more non-zeros A(I),. .,A(K) with the same
+!     row and column indices. The action taken in this case is to
+!     proceed using a numerical value of A(I)+...+A(K). In the absence
+!     of other errors, IFLAG will equal -14 on exit.
+! LBLOCK Is a logical variable which controls an option of first
+!     preordering the matrix to block lower triangular form (using
+!     Harwell subroutine MC23A). The preordering is performed if LBLOCK
+!     is equal to its default value of .TRUE. If LBLOCK is set to
+!     .FALSE., the option is not invoked and the space allocated to
+!     IKEEP can be reduced to 4*N+1.
+! GROW is a logical variable. If it is left at its default value of
+!     .TRUE., then on return from MA28AD or MA28BD, W(1) will give
+!     an estimate (an upper bound) of the increase in size of elements
+!     encountered during the decomposition. If the matrix is well
+!     scaled, then a high value for W(1), relative to the largest entry
+!     in the input matrix, indicates that the LU decomposition may be
+!     inaccurate and the user should be wary of his results and perhaps
+!     increase U for subsequent runs. We would like to emphasise that
+!     this value only relates to the accuracy of our LU decomposition
+!     and gives no indication as to the singularity of the matrix or the
+!     accuracy of the solution. This upper bound can be a significant
+!     overestimate particularly if the matrix is badly scaled. If an
+!     accurate value for the growth is required, LBIG(Q.V.) should be
+!     set to .TRUE.
+! EPS, RMIN If, on entry to MA28BD, EPS is less than one, then RMIN
+!     will give the smallest ratio of the pivot to the largest element
+!     in the corresponding row of the upper triangular factor thus
+!     monitoring the stability of successive factorizations. If RMIN
+!     becomes very large and W(1) from MA28BD is also very large, it
+!     may be advisable to perform a new decomposition using MA28AD.
+! RESID Variable which on exit from MA30CD gives the value of the
+!     maximum residual over all the equations unsatisfied because
+!     of dependency (zero pivots).
+! IRNCP, ICNCP Variables which monitor the adequacy of "elbow room"
+!     in IRN and A/ICN, respectively. If either is quite large (say
+!     greater than N/10), it will probably pay to increase the size of
+!     the corresponding array for subsequent runs. If either is very low
+!     or zero, then one can perhaps save storage by reducing the size of
+!     the corresponding array.
+! MINIRN, MINICN Integer variables which, in the event of a successful
+!     return (IFLAG >= 0 or IFLAG = -14) give the minimum size of IRN
+!     and A/ICN, respectively which would enable a successful run on
+!     an identical matrix. On an exit with IFLAG equal to -5, MINICN
+!     gives the minimum value of ICN for success on subsequent runs on
+!     an identical matrix. In the event of failure with IFLAG = -6,-4,
+!     -3,-2, OR -1, then MINICN and MINIRN give the minimum value of
+!     LICN and LIRN, respectively which would be required for a
+!     successful decomposition up to the point at which the failure
+!     occurred.
+! IRANK Integer variable which gives an upper bound on the rank of
+!     the matrix.
+! ABORT1 is a logical variable with default value .TRUE. If ABORT1 is
+!     set to .FALSE., then MA28AD will decompose structurally singular
+!     matrices (including rectangular ones).
+! ABORT2 is a logical variable with default value .TRUE. If ABORT2 is
+!     set to .FALSE., then MA28AD will decompose numerically singular
+!     matrices.
+! IDISP is an integer array of length 2. On output from MA28AD, The
+!     indices of the diagonal blocks of the factors lie in positions
+!     IDISP(1) to IDISP(2) of A/ICN. This array must be preserved
+!     between a call to MA28AD and subsequent calls to MA28BD,
+!     MA30CD or MA28ID.
+! TOL If set to a positive value, then any non-zero whose modulus is
+!     less than TOL will be dropped from the factorization. The
+!     factorization will then require less storage but will be
+!     inaccurate. After a run of MA28AD with TOL positive it is not
+!     possible to use MA28BD and the user is recommended to use
+!     MA28ID to obtain the solution. The default value for TOL is 0.0.
+! THEMAX On exit from MA28AD, THEMAX will hold the largest entry of
+!     the original matrix.
+! BIG If LBIG has been set to .TRUE., BIG will hold the largest entry
+!     encountered during the factorization by MA28AD or MA28BD.
+! DXMAX On exit from MA28ID, DXMAX will be set to the largest component
+!     of the solution.
+! ERRMAX If MAXIT is positive, ERRMAX will be set to the largest
+!     component in the estimate of the error.
+! DRES On exit from MA28ID, if MAXIT is positive, DRES will be set to
+!     the largest component of the residual.
+! CGCE Used by MA28ID to check the convergence rate. If the ratio of
+!     successive corrections is not less than CGCE, then we terminate
+!     since the convergence rate is adjudged too slow.
+! NDROP If TOL has been set positive on exit from MA28AD, NDROP will
+!     hold the number of entries dropped from the data structure.
+! MAXIT Maximum number of iterations performed by MA28ID. Default = 16.
+! NOITER Set by MA28ID to the number of iterative refinement iterations
+!     actually used.
+! NSRCH If NSRCH is set to a value less than N, then a different pivot
+!     option will be employed by MA28AD. This may result in different
+!     fill-in and execution time for MA28AD. If NSRCH is less than or
+!     equal to N, the workspace array IW can be reduced in length. The
+!     default value for NSRCH is 32768.
+! ISTART If ISTART is set to a value other than zero, then the user
+!     must supply an estimate of the solution to MA28ID. The default
+!     value for istart is zero.
+! LBIG If LBIG is set to .TRUE., the value of the largest element
+!     encountered in the factorization by MA28AD or MA28BD is returned
+!     in BIG. Setting LBIG to .TRUE. will increase the time for MA28AD
+!     marginally and that for MA28BD by about 20%. The default value
+!     for LBIG is .FALSE.
+!_______________________________________________________________________
+
+      SUBROUTINE MA30AD(NN,ICN,A,LICN,LENR,LENRL,IDISP,IP,IQ,IRN,LIRN, &
+        LENC,IFIRST,LASTR,NEXTR,LASTC,NEXTC,IPTR,IPC,U,IFLAG)
+! ..
+!     If the user requires a more convenient data interface then the
+!     MA28 package should be used. The MA28 subroutines call the MA30
+!     subroutines after checking the user's input data and optionally
+!     using MC23AD to permute the matrix to block triangular form.
+!     This package of subroutines (MA30AD, MA30BD, MA30CD, and MA30DD)
+!     performs operations pertinent to the solution of a general
+!     sparse N by N system of linear equations (i.e., solve
+!     AX = B). Structually singular matrices are permitted including
+!     those with row or columns consisting entirely of zeros (i.e.,
+!     including rectangular matrices). It is assumed that the
+!     non-zeros of the matrix A do not differ widely in size. If
+!     necessary a prior call of the scaling subroutine MA19AD may be
+!     made.
+!     A discussion of the design of these subroutines is given by Duff
+!     and Reid (ACM TRANS MATH SOFTWARE 5 PP 18-35, 1979(CSS 48)) while
+!     fuller details of the implementation are given in duff (HARWELL
+!     REPORT AERE-R 8730, 1977). The additional pivoting option in
+!     ma30ad and the use of drop tolerances (see private variables for
+!     MA30ID) were added to the package after joint work with Reid,
+!     Schaumburg, Wasniewski and Zlatev (Duff, Reid, Schaumburg,
+!     Wasniewski and Zlatev, HARWELL REPORT CSS 135, 1983).
+
+!     MA30AD performs the LU decomposition of the diagonal blocks of
+!     the permutation PAQ of a sparse matrix A, where input permutations
+!     P1 and Q1 are used to define the diagonal blocks. There may be
+!     non-zeros in the off-diagonal blocks but they are unaffected by
+!     MA30AD. P and P1 differ only within blocks as do Q and Q1. The
+!     permutations P1 and Q1 may be found by calling MC23AD or the
+!     matrix may be treated as a single block by using P1 = Q1 = I. The
+!     matrix non-zeros should be held compactly by rows, although it
+!     should be noted that the user can supply the matrix by columns
+!     to get the LU decomposition of A transpose.
+
+!     This description should also be consulted for further information
+!     on most of the parameters of MA30BD and MA30CD.
+!     The parameters are:
+! N   is an integer variable which must be set by the user to the order
+!     of the matrix. It is not altered by MA30AD.
+! ICN is an integer array of length LICN. Positions IDISP(2) to
+!     LICN must be set by the user to contain the column indices of
+!     the non-zeros in the diagonal blocks of P1*A*Q1. Those belonging
+!     to a single row must be contiguous but the ordering of column
+!     indices with each row is unimportant. The non-zeros of row I
+!     precede those of row I+1,I = 1,...,N-1 and no wasted space is
+!     allowed between the rows. On output the column indices of the
+!     LU decomposition of PAQ are held in positions IDISP(1) to
+!     IDISP(2), the rows are in pivotal order, and the column indices
+!     of the L Part of each row are in pivotal order and precede those
+!     of U. Again there is no wasted space either within a row or
+!     between the rows. ICN(1) to ICN(IDISP(1)-1), are neither
+!     required nor altered. If MC23AD has been called, these will hold
+!     information about the off-diagonal blocks.
+! A   Array of length LICN whose entries IDISP(2) to LICN must be set
+!     by the user to the values of the non-zero entries of the matrix
+!     in the order indicated by ICN. On output A will hold the LU
+!     factors of the matrix where again the position in the matrix
+!     is determined by the corresponding values in ICN.
+!     A(1) to A(IDISP(1)-1) are neither required nor altered.
+! LICN is an integer variable which must be set by the user to the
+!     length of arrays ICN and A. It must be big enough for A and ICN
+!     to hold all the non-zeros of L and U and leave some "elbow
+!     room". It is possible to calculate a minimum value for LICN by
+!     a preliminary run of MA30AD. The adequacy of the elbow room
+!     can be judged by the size of the private variable ICNCP.
+!     It is not altered by MA30AD.
+! LENR is an integer array of length N. On input, LENR(I) should
+!     equal the number of non-zeros in row I,I = 1,...,N of the
+!     diagonal blocks of P1*A*Q1. On output, LENR(I) will equal the
+!     total number of non-zeros in row I of L and row I of U.
+! LENRL is an integer array of length N. On output from MA30AD,
+!     LENRL(I) will hold the number of non-zeros in row I of L.
+! IDISP is an integer array of length 2. The user should set IDISP(1)
+!     to be the first available position in A/ICN for the LU
+!     decomposition while IDISP(2) is set to the position in A/ICN of
+!     the first non-zero in the diagonal blocks of P1*A*Q1. On output,
+!     IDISP(1) will be unaltered while IDISP(2) will be set to the
+!     position in A/ICN of the last non-zero of the LU decomposition.
+! IP  is an integer array of length N which holds a permutation of
+!     the integers 1 to N. On input to MA30AD, the absolute value of
+!     IP(I) must be set to the row of A which is row I of P1*A*Q1. A
+!     negative value for IP(I) indicates that row I is at the end of a
+!     diagonal block. On output from MA30AD, IP(I) indicates the row
+!     of A which is the Ith row in PAQ. IP(I) will still be negative
+!     for the last row of each block (except the last).
+! IQ  is an integer array of length N which again holds a
+!     permutation of the integers 1 to N. On input to MA30AD, IQ(J)
+!     must be set to the column of A which is column J of P1*A*Q1. On
+!     output from MA30AD, the absolute value of IQ(J) indicates the
+!     column of A which is the Jth in PAQ. For rows, I say, in which
+!     structural or numerical singularity is detected IQ(I) is
+!     negated.
+! IRN is an integer array of length LIRN used as workspace by
+!     MA30AD.
+! LIRN is an integer variable. It should be greater than the
+!     largest number of non-zeros in a diagonal block of P1*A*Q1 but
+!     need not be as large as LICN. It is the length of array IRN and
+!     should be large enough to hold the active part of any block,
+!     plus some "elbow room", the a posteriori adequacy of which can
+!     be estimated by examining the size of private variable
+!     IRNCP.
+! LENC, FIRST, LASTR, NEXTR, LASTC, NEXTC are all integer arrays of
+!     length N which are used as workspace by MA30AD. If NSRCH is
+!     set to a value less than or equal to N, then arrays LASTC and
+!     NEXTC are not referenced by MA30AD and so can be dummied in
+!     the call to MA30AD.
+! IPTR, IPC are integer arrays of length N which are used as
+!     workspace by MA30AD.
+! U   is a real(kind=wp) variable which should be set by the user
+!     to a value between 0. and 1.0. If less than zero it is reset
+!     to zero and if its value is 1.0 or greater it is reset to
+!     0.9999 (0.999999999 in D version). It determines the balance
+!     between pivoting for sparsity and for stability, values near
+!     zero emphasizing sparsity and values near one emphasizing
+!     stability. We recommend U = 0.1 as a posible first trial value.
+!     The stability can be judged by a later call to MC24AD or by
+!     setting LBIG to .TRUE.
+! IFLAG is an integer variable. It will have a non-negative value
+!     if MA30AD is successful. Negative values indicate error
+!     conditions while positive values indicate that the matrix has
+!     been successfully decomposed but is singular. For each non-zero
+!     value, an appropriate message is output on unit LP. Possible
+!     non-zero values for IFLAG are
+! -1  THe matrix is structurally singular with rank given by IRANK
+!     in private variables for MA30FD.
+! +1  If, however, the user wants the LU decomposition of a
+!     structurally singular matrix and sets the private variable
+!     ABORT1 to .FALSE., then, in the event of singularity and a
+!     successful decomposition, Iflag is returned with the value +1
+!     and no message is output.
+! -2  The matrix is numerically singular (it may also be structurally
+!     singular) with estimated rank given by IRANK in private variables
+!     for MA30FD.
+! +2  THE user can choose to continue the decomposition even when a
+!     zero pivot is encountered by setting private variable
+!     ABORT2 TO .FALSE. If a singularity is encountered, IFLAG will
+!     then return with a value of +2, and no message is output if
+!     the decomposition has been completed successfully.
+! -3  LIRN has not been large enough to continue with the
+!     decomposition. If the stage was zero then private variable
+!     MINIRN gives the length sufficient to start the decomposition on
+!     this block. FOr a successful decomposition on this block the
+!     user should make LIRN slightly (say about N/2) greater than this
+!     value.
+! -4  LICN is not large enough to continue with the decomposition.
+! -5  The decomposition has been completed but some of the LU factors
+!     have been discarded to create enough room in A/ICN to continue
+!     the decomposition. The variable MINICN in private variables for
+!     MA30FD. Then gives the size that LICN should be to enable the
+!     factorization to be successful. If the user sets private
+!     variable ABORT3 to .TRUE., then the subroutine will exit
+!     immediately instead of destroying any factors and continuing.
+! -6  Both LICN and LIRN are too small. Termination has been caused
+!     by lack of space in IRN (see error IFLAG = -3), but already
+!     some of the LU factors in A/ICN have been lost (see error
+!     IFLAG = -5). MINICN gives the minimum amount of space
+!     required in A/ICN for decomposition up to this point.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        KPP_REAL :: U
+        INTEGER :: IFLAG, LICN, LIRN, NN
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN)
+        INTEGER :: ICN(LICN), IDISP(2), IFIRST(NN), IP(NN), IPC(NN), &
+          IPTR(NN), IQ(NN), IRN(LIRN), LASTC(NN), LASTR(NN),         &
+          LENC(NN), LENR(NN), LENRL(NN), NEXTC(NN), NEXTR(NN)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AANEW, AMAX, ANEW, AU, PIVR, PIVRAT, SCALE
+        INTEGER :: COLUPD, DISPC, I, I1, I2, IACTIV, IBEG, IDISPC,   &
+          IDROP, IDUMMY, IEND, IFILL, IFIR, II, III, IJFIR, IJP1,    &
+          IJPOS, ILAST, INDROW, IOP, IPIV, IPOS, IROWS, ISING, ISRCH,&
+          ISTART, ISW, ISW1, ITOP, J, J1, J2, JBEG, JCOST, JCOUNT,   &
+          JDIFF, JDUMMY, JEND, JJ, JMORE, JNEW, JNPOS, JOLD, JPIV,   &
+          JPOS, JROOM, JVAL, JZER, JZERO, K, KCOST, KDROP, L, LC,    &
+          LENPIV, LENPP, LL, LR, MOREI, MSRCH, N, NBLOCK, NC, NNM1,  &
+          NR, NUM, NZ, NZ2, NZCOL, NZMIN, NZPC, NZROW, OLDEND,       &
+          OLDPIV, PIVEND, PIVOT, PIVROW, ROWI
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30AD
+! ..
+        MSRCH = NSRCH
+        NDROP = 0
+        LNPIV(1:10) = 0
+        LPIV(1:10) = 0
+        MAPIV = 0
+        MANPIV = 0
+        IAVPIV = 0
+        IANPIV = 0
+        KOUNTL = 0
+        MINIRN = 0
+        MINICN = IDISP(1) - 1
+        MOREI = 0
+        IRANK = NN
+        IRNCP = 0
+        ICNCP = 0
+        IFLAG = 0
+!       Reset U if necessary.
+        U = MIN(U,UMAX)
+!       IBEG is the position of the next pivot row after elimination
+!       step using it.
+        U = MAX(U,ZERO)
+        IBEG = IDISP(1)
+!       IACTIV is the position of the first entry in the active part
+!       of A/ICN.
+        IACTIV = IDISP(2)
+!       NZROW is current number of non-zeros in active and unprocessed
+!       part of row file ICN.
+        NZROW = LICN - IACTIV + 1
+        MINICN = NZROW + MINICN
+
+!       Count the number of diagonal blocks and set up pointers to the
+!       beginnings of the rows. NUM is the number of diagonal blocks.
+        NUM = 1
+        IPTR(1) = IACTIV
+        IF (NN==1) GOTO 30
+        NNM1 = NN - 1
+        DO I = 1, NNM1
+          IF (IP(I)<0) NUM = NUM + 1
+          IPTR(I+1) = IPTR(I) + LENR(I)
+        END DO
+!       ILAST is the last row in the previous block.
+30      ILAST = 0
+
+! ***********************************************
+! ****    LU decomposition of block NBLOCK   ****
+! ***********************************************
+
+!       Each pass through this loop performs LU decomposition on one
+!       of the diagonal blocks.
+        DO 1070 NBLOCK = 1, NUM
+          ISTART = ILAST + 1
+          DO IROWS = ISTART, NN
+            IF (IP(IROWS)<0) GOTO 50
+          END DO
+          IROWS = NN
+50        ILAST = IROWS
+!         N is the number of rows in the current block.
+!         ISTART is the index of the first row in the current block.
+!         ILAST is the index of the last row in the current block.
+!         IACTIV is the position of the first entry in the block.
+!         ITOP is the position of the last entry in the block.
+          N = ILAST - ISTART + 1
+          IF (N/=1) GOTO 100
+
+!         Code for dealing WITH 1x1 block.
+          LENRL(ILAST) = 0
+          ISING = ISTART
+          IF (LENR(ILAST)/=0) GOTO 60
+!         Block is structurally singular.
+          IRANK = IRANK - 1
+          ISING = -ISING
+          IF (IFLAG/=2 .AND. IFLAG/=-5) IFLAG = 1
+          IF (.NOT.ABORT1) GOTO 90
+          IDISP(2) = IACTIV
+          IFLAG = -1
+          IF (LP/=0) WRITE (LP,90000)
+!         RETURN
+          GOTO 1190
+60        SCALE = ABS(A(IACTIV))
+          IF (ABS(SCALE)<=ZERO) GOTO 70
+          IF (LBIG) BIG = MAX(BIG,SCALE)
+          GOTO 80
+70        ISING = -ISING
+          IRANK = IRANK - 1
+          IPTR(ILAST) = 0
+          IF (IFLAG/=-5) IFLAG = 2
+          IF (.NOT.ABORT2) GOTO 80
+          IDISP(2) = IACTIV
+          IFLAG = -2
+          IF (LP/=0) WRITE (LP,90001)
+          GOTO 1190
+80        A(IBEG) = A(IACTIV)
+          ICN(IBEG) = ICN(IACTIV)
+          IACTIV = IACTIV + 1
+          IPTR(ISTART) = 0
+          IBEG = IBEG + 1
+          NZROW = NZROW - 1
+90        LASTR(ISTART) = ISTART
+          IPC(ISTART) = -ISING
+          GOTO 1070
+
+!         Non-trivial block.
+100       ITOP = LICN
+          IF (ILAST/=NN) ITOP = IPTR(ILAST+1) - 1
+
+!         Set up column oriented storage.
+          LENRL(ISTART:ILAST) = 0
+          LENC(ISTART:ILAST) = 0
+          IF (ITOP-IACTIV<LIRN) GOTO 120
+          MINIRN = ITOP - IACTIV + 1
+          PIVOT = ISTART - 1
+          GOTO 1170
+
+!         Calculate column counts.
+120       DO II = IACTIV, ITOP
+            I = ICN(II)
+            LENC(I) = LENC(I) + 1
+          END DO
+!         Set up column pointers so that IPC(J) points to position
+!         after end of column J in column file.
+          IPC(ILAST) = LIRN + 1
+          J1 = ISTART + 1
+          DO JJ = J1, ILAST
+            J = ILAST - JJ + J1 - 1
+            IPC(J) = IPC(J+1) - LENC(J+1)
+          END DO
+          DO 160 INDROW = ISTART, ILAST
+            J1 = IPTR(INDROW)
+            J2 = J1 + LENR(INDROW) - 1
+            IF (J1>J2) GOTO 160
+            DO JJ = J1, J2
+              J = ICN(JJ)
+              IPOS = IPC(J) - 1
+              IRN(IPOS) = INDROW
+              IPC(J) = IPOS
+            END DO
+160       END DO
+!         DISPC is the lowest indexed active location in the column file.
+          DISPC = IPC(ISTART)
+          NZCOL = LIRN - DISPC + 1
+          MINIRN = MAX(NZCOL,MINIRN)
+          NZMIN = 1
+
+!         Initialize array IFIRST. IFIRST(I) = +/- K indicates that
+!         row/col K has I non-zeros. If IFIRST(I) = 0, there is no
+!         row or column with I non-zeros.
+          IFIRST(1:N) = 0
+
+!         Compute ordering of row and column counts.
+!         First run through columns (from column N to column 1).
+          DO 190 JJ = ISTART, ILAST
+            J = ILAST - JJ + ISTART
+            NZ = LENC(J)
+            IF (NZ/=0) GOTO 180
+            IPC(J) = 0
+            GOTO 190
+180         IF (NSRCH<=NN) GOTO 190
+            ISW = IFIRST(NZ)
+            IFIRST(NZ) = -J
+            LASTC(J) = 0
+            NEXTC(J) = -ISW
+            ISW1 = IABS(ISW)
+            IF (ISW/=0) LASTC(ISW1) = J
+190       END DO
+!        Now run through rows (again from N to 1).
+          DO 220 II = ISTART, ILAST
+               I = ILAST - II + ISTART
+            NZ = LENR(I)
+            IF (NZ/=0) GOTO 200
+            IPTR(I) = 0
+            LASTR(I) = 0
+            GOTO 220
+200         ISW = IFIRST(NZ)
+            IFIRST(NZ) = I
+            IF (ISW>0) GOTO 210
+            NEXTR(I) = 0
+            LASTR(I) = ISW
+            GOTO 220
+210         NEXTR(I) = ISW
+            LASTR(I) = LASTR(ISW)
+            LASTR(ISW) = I
+220       END DO
+
+! **********************************************
+! ****    Start of main elimination loop    ****
+! **********************************************
+          DO 1050 PIVOT = ISTART, ILAST
+
+!           First find the pivot using MARKOWITZ criterion with
+!           stability control.
+!           JCOST is the Markowitz cost of the best pivot so far.
+!           This pivot is in row IPIV and column JPIV.
+            NZ2 = NZMIN
+            JCOST = N*N
+
+!           Examine rows/columns in order of ascending count.
+            DO L = 1, 2
+              PIVRAT = ZERO
+              ISRCH = 1
+              LL = L
+!             A pass with L equal to 2 is only performed in the
+!             case of singularity.
+              DO 340 NZ = NZ2, N
+                IF (JCOST<=(NZ-1)**2) GOTO 430
+                IJFIR = IFIRST(NZ)
+!               IF (IJFIR) 240, 230, 250
+!230            IF (LL==1) NZMIN = NZ + 1
+                IF (IJFIR < 0) GOTO 240
+                IF (IJFIR > 0) GOTO 250
+                IF (LL==1) NZMIN = NZ + 1
+                GOTO 340
+240             LL = 2
+                IJFIR = -IJFIR
+                GOTO 300
+250             LL = 2
+!               Scan rows with NZ non-zeros.
+                DO IDUMMY = 1, N
+                  IF (JCOST<=(NZ-1)**2) GOTO 430
+                  IF (ISRCH>MSRCH) GOTO 430
+                  IF (IJFIR==0) GOTO 290
+!                 Row IJFIR is now examined.
+                  I = IJFIR
+                  IJFIR = NEXTR(I)
+!                 First calculate multiplier threshold level.
+                  AMAX = ZERO
+                  J1 = IPTR(I) + LENRL(I)
+                  J2 = IPTR(I) + LENR(I) - 1
+                  DO JJ = J1, J2
+                    AMAX = MAX(AMAX,ABS(A(JJ)))
+                  END DO
+                  AU = AMAX*U
+                  ISRCH = ISRCH + 1
+!                 Scan row for possible pivots.
+                  DO 270 JJ = J1, J2
+                    IF (ABS(A(JJ))<=AU .AND. L==1) GOTO 270
+                    J = ICN(JJ)
+                    KCOST = (NZ-1)*(LENC(J)-1)
+                    IF (KCOST>JCOST) GOTO 270
+                    PIVR = ZERO
+                    IF (ABS(AMAX)>ZERO) PIVR = ABS(A(JJ))/AMAX
+                    IF (KCOST==JCOST .AND. (PIVR<=PIVRAT .OR. NSRCH>NN+1)) &
+                      GOTO 270
+!                   Best pivot so far is found.
+                    JCOST = KCOST
+                    IJPOS = JJ
+                    IPIV = I
+                    JPIV = J
+                    IF (MSRCH>NN+1 .AND. JCOST<=(NZ-1)**2) GOTO 430
+                    PIVRAT = PIVR
+270               END DO
+                END DO
+
+!               Columns with NZ non-zeros now examined.
+290             IJFIR = IFIRST(NZ)
+                IJFIR = -LASTR(IJFIR)
+300             IF (JCOST<=NZ*(NZ-1)) GOTO 430
+                IF (MSRCH<=NN) GOTO 340
+                DO 330 IDUMMY = 1, N
+                  IF (IJFIR==0) GOTO 340
+                  J = IJFIR
+                  IJFIR = NEXTC(IJFIR)
+                  I1 = IPC(J)
+                  I2 = I1 + NZ - 1
+!                 Scan column J.
+                  DO 320 II = I1, I2
+                    I = IRN(II)
+                    KCOST = (NZ-1)*(LENR(I)-LENRL(I)-1)
+                    IF (KCOST>=JCOST) GOTO 320
+!                   Pivot has best Markowitz count so far. Now
+!                   check its suitability on numeric grounds by
+!                   examining the other non-zeros in its row.
+                    J1 = IPTR(I) + LENRL(I)
+                    J2 = IPTR(I) + LENR(I) - 1
+!                   We need a stability check on singleton columns
+!                   because of possible problems with
+!                   underdetermined systems.
+                    AMAX = ZERO
+                    DO JJ = J1, J2
+                      AMAX = MAX(AMAX,ABS(A(JJ)))
+                      IF (ICN(JJ)==J) JPOS = JJ
+                    END DO
+                    IF (ABS(A(JPOS))<=AMAX*U .AND. L==1) GOTO 320
+                    JCOST = KCOST
+                    IPIV = I
+                    JPIV = J
+                    IJPOS = JPOS
+                    IF (ABS(AMAX)>ZERO) PIVRAT = ABS(A(JPOS))/AMAX
+                    IF (JCOST<=NZ*(NZ-1)) GOTO 430
+320               END DO
+330             END DO
+340           END DO
+!             In the event of singularity, we must make sure all
+!             rows and columns are tested.
+              MSRCH = N
+
+!             Matrix is numerically or structurally singular. Which
+!             it is will be diagnosed later.
+              IRANK = IRANK - 1
+            END DO
+!           Assign rest of rows and columns to ordering array.
+!           Matrix is structurally singular.
+            IF (IFLAG/=2 .AND. IFLAG/=-5) IFLAG = 1
+            IRANK = IRANK - ILAST + PIVOT + 1
+            IF (.NOT.ABORT1) GOTO 360
+            IDISP(2) = IACTIV
+            IFLAG = -1
+            IF (LP/=0) WRITE (LP,90000)
+            GOTO 1190
+360         K = PIVOT - 1
+            DO 400 I = ISTART, ILAST
+              IF (LASTR(I)/=0) GOTO 400
+              K = K + 1
+              LASTR(I) = K
+              IF (LENRL(I)==0) GOTO 390
+              MINICN = MAX(MINICN,NZROW+IBEG-1+MOREI+LENRL(I))
+              IF (IACTIV-IBEG>=LENRL(I)) GOTO 370
+              CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+!             Check now to see if MA30DD has created enough
+!             available space.
+              IF (IACTIV-IBEG>=LENRL(I)) GOTO 370
+!             Create more space by destroying previously created
+!             LU factors.
+              MOREI = MOREI + IBEG - IDISP(1)
+              IBEG = IDISP(1)
+              IF (LP/=0) WRITE (LP,90002)
+              IFLAG = -5
+              IF (ABORT3) GOTO 1160
+370           J1 = IPTR(I)
+              J2 = J1 + LENRL(I) - 1
+              IPTR(I) = 0
+              DO JJ = J1, J2
+                A(IBEG) = A(JJ)
+                ICN(IBEG) = ICN(JJ)
+                ICN(JJ) = 0
+                IBEG = IBEG + 1
+              END DO
+              NZROW = NZROW - LENRL(I)
+390           IF (K==ILAST) GOTO 410
+400         END DO
+410         K = PIVOT - 1
+            DO 420 I = ISTART, ILAST
+              IF (IPC(I)/=0) GOTO 420
+              K = K + 1
+              IPC(I) = K
+              IF (K==ILAST) GOTO 1060
+420         END DO
+
+!           The pivot has now been found in position (IPIV,JPIV)
+!           in location IJPOS in row file.
+!           Update column and row ordering arrays to correspond
+!           with removal of the active part of the matrix.
+430         ISING = PIVOT
+            IF (ABS(A(IJPOS))>ZERO) GOTO 440
+!           Numerical singularity is recorded here.
+            ISING = -ISING
+            IF (IFLAG/=-5) IFLAG = 2
+            IF (.NOT.ABORT2) GOTO 440
+            IDISP(2) = IACTIV
+            IFLAG = -2
+            IF (LP/=0) WRITE (LP,90001)
+            GOTO 1190
+440         OLDPIV = IPTR(IPIV) + LENRL(IPIV)
+            OLDEND = IPTR(IPIV) + LENR(IPIV) - 1
+!           Changes to column ordering.
+            IF (NSRCH<=NN) GOTO 470
+            COLUPD = NN + 1
+            LENPP = OLDEND - OLDPIV + 1
+            IF (LENPP<4) LPIV(1) = LPIV(1) + 1
+            IF (LENPP>=4 .AND. LENPP<=6) LPIV(2) = LPIV(2) + 1
+            IF (LENPP>=7 .AND. LENPP<=10) LPIV(3) = LPIV(3) + 1
+            IF (LENPP>=11 .AND. LENPP<=15) LPIV(4) = LPIV(4) + 1
+            IF (LENPP>=16 .AND. LENPP<=20) LPIV(5) = LPIV(5) + 1
+            IF (LENPP>=21 .AND. LENPP<=30) LPIV(6) = LPIV(6) + 1
+            IF (LENPP>=31 .AND. LENPP<=50) LPIV(7) = LPIV(7) + 1
+            IF (LENPP>=51 .AND. LENPP<=70) LPIV(8) = LPIV(8) + 1
+            IF (LENPP>=71 .AND. LENPP<=100) LPIV(9) = LPIV(9) + 1
+            IF (LENPP>=101) LPIV(10) = LPIV(10) + 1
+            MAPIV = MAX(MAPIV,LENPP)
+            IAVPIV = IAVPIV + LENPP
+            DO 460 JJ = OLDPIV, OLDEND
+              J = ICN(JJ)
+              LC = LASTC(J)
+              NC = NEXTC(J)
+              NEXTC(J) = -COLUPD
+              IF (JJ/=IJPOS) COLUPD = J
+              IF (NC/=0) LASTC(NC) = LC
+              IF (LC==0) GOTO 450
+              NEXTC(LC) = NC
+              GOTO 460
+450           NZ = LENC(J)
+              ISW = IFIRST(NZ)
+              IF (ISW>0) LASTR(ISW) = -NC
+              IF (ISW<0) IFIRST(NZ) = -NC
+460         END DO
+!           Changes to row ordering.
+470         I1 = IPC(JPIV)
+            I2 = I1 + LENC(JPIV) - 1
+            DO 490 II = I1, I2
+              I = IRN(II)
+              LR = LASTR(I)
+              NR = NEXTR(I)
+              IF (NR/=0) LASTR(NR) = LR
+              IF (LR<=0) GOTO 480
+              NEXTR(LR) = NR
+              GOTO 490
+480           NZ = LENR(I) - LENRL(I)
+              IF (NR/=0) IFIRST(NZ) = NR
+              IF (NR==0) IFIRST(NZ) = LR
+490         END DO
+
+!           Move pivot to position LENRL+1 in pivot row and move pivot
+!           row to the beginning of the available storage. The L part
+!           and the pivot in the old copy of the pivot row is nullified
+!           while, in the strictly upper triangular part, the column
+!           indices, J say, are overwritten by the corresponding entry
+!           of IQ (IQ(J)) and IQ(J) is set to the negative of the
+!           displacement of the column index from the pivot entry.
+            IF (OLDPIV==IJPOS) GOTO 500
+            AU = A(OLDPIV)
+            A(OLDPIV) = A(IJPOS)
+            A(IJPOS) = AU
+            ICN(IJPOS) = ICN(OLDPIV)
+            ICN(OLDPIV) = JPIV
+!           Check to see if there is space immediately available in
+!           A/ICN to hold new copy of pivot row.
+500         MINICN = MAX(MINICN,NZROW+IBEG-1+MOREI+LENR(IPIV))
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+            CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+            OLDPIV = IPTR(IPIV) + LENRL(IPIV)
+            OLDEND = IPTR(IPIV) + LENR(IPIV) - 1
+!           Check now to see if MA30DD has created enough
+!           available space.
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+!           Create more space by destroying previously created
+!           LU factors.
+            MOREI = MOREI + IBEG - IDISP(1)
+            IBEG = IDISP(1)
+            IF (LP/=0) WRITE (LP,90002)
+            IFLAG = -5
+            IF (ABORT3) GOTO 1160
+            IF (IACTIV-IBEG>=LENR(IPIV)) GOTO 510
+!           There is still not enough room in A/ICN.
+            IFLAG = -4
+            GOTO 1160
+!           Copy pivot row and set up IQ array.
+510         IJPOS = 0
+            J1 = IPTR(IPIV)
+
+            DO JJ = J1, OLDEND
+              A(IBEG) = A(JJ)
+              ICN(IBEG) = ICN(JJ)
+              IF (IJPOS/=0) GOTO 520
+              IF (ICN(JJ)==JPIV) IJPOS = IBEG
+              ICN(JJ) = 0
+              GOTO 530
+520           K = IBEG - IJPOS
+              J = ICN(JJ)
+              ICN(JJ) = IQ(J)
+              IQ(J) = -K
+530           IBEG = IBEG + 1
+            END DO
+
+            IJP1 = IJPOS + 1
+            PIVEND = IBEG - 1
+            LENPIV = PIVEND - IJPOS
+            NZROW = NZROW - LENRL(IPIV) - 1
+            IPTR(IPIV) = OLDPIV + 1
+            IF (LENPIV==0) IPTR(IPIV) = 0
+
+!           Remove pivot row (including pivot) from column
+!           oriented file.
+            DO JJ = IJPOS, PIVEND
+              J = ICN(JJ)
+              I1 = IPC(J)
+              LENC(J) = LENC(J) - 1
+!             I2 is last position in new column.
+              I2 = IPC(J) + LENC(J) - 1
+              IF (I2<I1) GOTO 560
+              DO 550 II = I1, I2
+                IF (IRN(II)/=IPIV) GOTO 550
+                IRN(II) = IRN(I2+1)
+                GOTO 560
+550           END DO
+560           IRN(I2+1) = 0
+            END DO
+            NZCOL = NZCOL - LENPIV - 1
+
+!           Go down the pivot column and for each row with a
+!           non-zero add the appropriate multiple of the pivot
+!           row to it. We loop on the number of non-zeros in
+!           the pivot column since MA30DD may change its
+!           actual position.
+
+            NZPC = LENC(JPIV)
+            IF (NZPC==0) GOTO 940
+            DO 880 III = 1, NZPC
+              II = IPC(JPIV) + III - 1
+              I = IRN(II)
+!             Search row I For non-zero to be eliminated,
+!             calculate multiplier, and place it in position
+!             LENRL+1 in its row. IDROP is the number of
+!             non-zero entries dropped from row I because
+!             these fall beneath tolerance level.
+              IDROP = 0
+              J1 = IPTR(I) + LENRL(I)
+              IEND = IPTR(I) + LENR(I) - 1
+              DO 580 JJ = J1, IEND
+                IF (ICN(JJ)/=JPIV) GOTO 580
+!               IF pivot is zero, rest of column is and so
+!               multiplier is zero.
+                AU = ZERO
+                IF (ABS(A(IJPOS))>ZERO) AU = -A(JJ)/A(IJPOS)
+                IF (LBIG) BIG = MAX(BIG,ABS(AU))
+                A(JJ) = A(J1)
+                A(J1) = AU
+                ICN(JJ) = ICN(J1)
+                ICN(J1) = JPIV
+                LENRL(I) = LENRL(I) + 1
+                GOTO 590
+580           END DO
+!             JUMP if pivot row is a singleton.
+590           IF (LENPIV==0) GOTO 880
+!             Now perform necessary operations on rest of non-pivot
+!             row I.
+              ROWI = J1 + 1
+              IOP = 0
+!             Jump if all the pivot row causes fill-in.
+              IF (ROWI>IEND) GOTO 670
+!             Perform operations on current non-zeros in row I.
+!             Innermost loop.
+              LENPP = IEND - ROWI + 1
+              IF (LENPP<4) LNPIV(1) = LNPIV(1) + 1
+              IF (LENPP>=4 .AND. LENPP<=6) LNPIV(2) = LNPIV(2) + 1
+              IF (LENPP>=7 .AND. LENPP<=10) LNPIV(3) = LNPIV(3) + 1
+              IF (LENPP>=11 .AND. LENPP<=15) LNPIV(4) = LNPIV(4) + 1
+              IF (LENPP>=16 .AND. LENPP<=20) LNPIV(5) = LNPIV(5) + 1
+              IF (LENPP>=21 .AND. LENPP<=30) LNPIV(6) = LNPIV(6) + 1
+              IF (LENPP>=31 .AND. LENPP<=50) LNPIV(7) = LNPIV(7) + 1
+              IF (LENPP>=51 .AND. LENPP<=70) LNPIV(8) = LNPIV(8) + 1
+              IF (LENPP>=71 .AND. LENPP<=100) LNPIV(9) = LNPIV(9) + 1
+              IF (LENPP>=101) LNPIV(10) = LNPIV(10) + 1
+              MANPIV = MAX(MANPIV,LENPP)
+              IANPIV = IANPIV + LENPP
+              KOUNTL = KOUNTL + 1
+              DO 600 JJ = ROWI, IEND
+                J = ICN(JJ)
+                IF (IQ(J)>0) GOTO 600
+                IOP = IOP + 1
+                PIVROW = IJPOS - IQ(J)
+                A(JJ) = A(JJ) + AU*A(PIVROW)
+                IF (LBIG) BIG = MAX(ABS(A(JJ)),BIG)
+                ICN(PIVROW) = -ICN(PIVROW)
+                IF (ABS(A(JJ))<TOL) IDROP = IDROP + 1
+600           END DO
+
+!             JUMP if no non-zeros in non-pivot row have been removed
+!             because these are beneath the drop-tolerance TOL.
+
+              IF (IDROP==0) GOTO 670
+
+!             Run through non-pivot row compressing row so that only
+!             non-zeros greater than TOL are stored. All non-zeros
+!             less than TOL are also removed from the column structure.
+
+              JNEW = ROWI
+              DO 650 JJ = ROWI, IEND
+                IF (ABS(A(JJ))<TOL) GOTO 610
+                A(JNEW) = A(JJ)
+                ICN(JNEW) = ICN(JJ)
+                JNEW = JNEW + 1
+                GOTO 650
+
+!               Remove non-zero entry from column structure.
+
+610             J = ICN(JJ)
+                I1 = IPC(J)
+                I2 = I1 + LENC(J) - 1
+                DO II = I1, I2
+                  IF (IRN(II)==I) GOTO 630
+                END DO
+630             IRN(II) = IRN(I2)
+                IRN(I2) = 0
+                LENC(J) = LENC(J) - 1
+                IF (NSRCH<=NN) GOTO 650
+!               Remove column from column chain and place in
+!               update chain.
+                IF (NEXTC(J)<0) GOTO 650
+!               JUMP if column already in update chain.
+                LC = LASTC(J)
+                NC = NEXTC(J)
+                NEXTC(J) = -COLUPD
+                COLUPD = J
+                IF (NC/=0) LASTC(NC) = LC
+                IF (LC==0) GOTO 640
+                NEXTC(LC) = NC
+                GOTO 650
+640             NZ = LENC(J) + 1
+                ISW = IFIRST(NZ)
+                IF (ISW>0) LASTR(ISW) = -NC
+                IF (ISW<0) IFIRST(NZ) = -NC
+650           END DO
+              ICN(JNEW:IEND) = 0
+!             The value of IDROP might be different from that
+!             calculated earlier because we may now have dropped
+!             some non-zeros which were not modified by the pivot
+!             row.
+              IDROP = IEND + 1 - JNEW
+              IEND = JNEW - 1
+              LENR(I) = LENR(I) - IDROP
+              NZROW = NZROW - IDROP
+              NZCOL = NZCOL - IDROP
+              NDROP = NDROP + IDROP
+670           IFILL = LENPIV - IOP
+!             Jump is if there is no fill-in.
+              IF (IFILL==0) GOTO 770
+!             Now for the fill-in.
+              MINICN = MAX(MINICN,MOREI+IBEG-1+NZROW+IFILL+LENR(I))
+!             See if there is room for fill-in.
+!             Get maximum space for row I in situ.
+              DO JDIFF = 1, IFILL
+                JNPOS = IEND + JDIFF
+                IF (JNPOS>LICN) GOTO 690
+                IF (ICN(JNPOS)/=0) GOTO 690
+              END DO
+!             There is room for all the fill-in after the end of the
+!             row so it can be left in situ.
+!             Next available space for fill-in.
+              IEND = IEND + 1
+              GOTO 770
+!             JMORE spaces for fill-in are required in front of row.
+690           JMORE = IFILL - JDIFF + 1
+              I1 = IPTR(I)
+!             We now look in front of the row to see if there is space
+!             for the rest of the fill-in.
+              DO JDIFF = 1, JMORE
+                JNPOS = I1 - JDIFF
+                IF (JNPOS<IACTIV) GOTO 710
+                IF (ICN(JNPOS)/=0) GOTO 720
+              END DO
+710           JNPOS = I1 - JMORE
+              GOTO 730
+!             Whole row must be moved to the beginning of available
+!             storage.
+720           JNPOS = IACTIV - LENR(I) - IFILL
+!             Jump if there is space immediately available for the
+!             shifted row.
+730           IF (JNPOS>=IBEG) GOTO 750
+              CALL MA30DD(A,ICN,IPTR(ISTART),N,IACTIV,ITOP,.TRUE.)
+              I1 = IPTR(I)
+              IEND = I1 + LENR(I) - 1
+              JNPOS = IACTIV - LENR(I) - IFILL
+              IF (JNPOS>=IBEG) GOTO 750
+!             No space available so try to create some by throwing
+!             away previous LU decomposition.
+              MOREI = MOREI + IBEG - IDISP(1) - LENPIV - 1
+              IF (LP/=0) WRITE (LP,90002)
+              IFLAG = -5
+              IF (ABORT3) GOTO 1160
+!             Keep record of current pivot row.
+              IBEG = IDISP(1)
+              ICN(IBEG) = JPIV
+              A(IBEG) = A(IJPOS)
+              IJPOS = IBEG
+              DO JJ = IJP1, PIVEND
+                IBEG = IBEG + 1
+                A(IBEG) = A(JJ)
+                ICN(IBEG) = ICN(JJ)
+              END DO
+              IJP1 = IJPOS + 1
+              PIVEND = IBEG
+              IBEG = IBEG + 1
+              IF (JNPOS>=IBEG) GOTO 750
+!             This still does not give enough room.
+              IFLAG = -4
+              GOTO 1160
+750           IACTIV = MIN(IACTIV,JNPOS)
+!             Move non-pivot row I.
+              IPTR(I) = JNPOS
+              DO JJ = I1, IEND
+                A(JNPOS) = A(JJ)
+                ICN(JNPOS) = ICN(JJ)
+                JNPOS = JNPOS + 1
+                ICN(JJ) = 0
+              END DO
+!             First new available space.
+              IEND = JNPOS
+770           NZROW = NZROW + IFILL
+!             Innermost fill-in loop which also resets ICN.
+              IDROP = 0
+              DO 850 JJ = IJP1, PIVEND
+                J = ICN(JJ)
+                IF (J<0) GOTO 840
+                ANEW = AU*A(JJ)
+                AANEW = ABS(ANEW)
+                IF (AANEW>=TOL) GOTO 780
+                IDROP = IDROP + 1
+                NDROP = NDROP + 1
+                NZROW = NZROW - 1
+                MINICN = MINICN - 1
+                IFILL = IFILL - 1
+                GOTO 850
+780             IF (LBIG) BIG = MAX(AANEW,BIG)
+                A(IEND) = ANEW
+                ICN(IEND) = J
+                IEND = IEND + 1
+
+!               Put new entry in column file.
+                MINIRN = MAX(MINIRN,NZCOL+LENC(J)+1)
+                JEND = IPC(J) + LENC(J)
+                JROOM = NZPC - III + 1 + LENC(J)
+                IF (JEND>LIRN) GOTO 790
+                IF (IRN(JEND)==0) GOTO 830
+790             IF (JROOM<DISPC) GOTO 800
+!               Compress column file to obtain space for new
+!               copy of column.
+                CALL MA30DD(A,IRN,IPC(ISTART),N,DISPC,LIRN,.FALSE.)
+                IF (JROOM<DISPC) GOTO 800
+                JROOM = DISPC - 1
+                IF (JROOM>=LENC(J)+1) GOTO 800
+!               Column file is not large enough.
+                GOTO 1170
+!               Copy column to beginning of file.
+800             JBEG = IPC(J)
+                JEND = IPC(J) + LENC(J) - 1
+                JZERO = DISPC - 1
+                DISPC = DISPC - JROOM
+                IDISPC = DISPC
+                DO II = JBEG, JEND
+                  IRN(IDISPC) = IRN(II)
+                  IRN(II) = 0
+                  IDISPC = IDISPC + 1
+                END DO
+                IPC(J) = DISPC
+                JEND = IDISPC
+                IRN(JEND:JZERO) = 0
+830             IRN(JEND) = I
+                NZCOL = NZCOL + 1
+                LENC(J) = LENC(J) + 1
+!               End of adjustment to column file.
+                GOTO 850
+840             ICN(JJ) = -J
+850           END DO
+              IF (IDROP==0) GOTO 870
+              DO KDROP = 1, IDROP
+                ICN(IEND) = 0
+                IEND = IEND + 1
+              END DO
+870           LENR(I) = LENR(I) + IFILL
+!             End of scan of pivot column.
+880         END DO
+
+!           Remove pivot column from column oriented storage
+!           and update row ordering arrays.
+            I1 = IPC(JPIV)
+            I2 = IPC(JPIV) + LENC(JPIV) - 1
+            NZCOL = NZCOL - LENC(JPIV)
+            DO 930 II = I1, I2
+              I = IRN(II)
+              IRN(II) = 0
+              NZ = LENR(I) - LENRL(I)
+              IF (NZ/=0) GOTO 890
+              LASTR(I) = 0
+              GOTO 930
+890           IFIR = IFIRST(NZ)
+              IFIRST(NZ) = I
+!             IF (IFIR) 900, 920, 910
+!900          LASTR(I) = IFIR
+              IF (IFIR == 0) GOTO 920
+              IF (IFIR > 0) GOTO 910
+              LASTR(I) = IFIR
+              NEXTR(I) = 0
+              GOTO 930
+910           LASTR(I) = LASTR(IFIR)
+              NEXTR(I) = IFIR
+              LASTR(IFIR) = I
+              GOTO 930
+920           LASTR(I) = 0
+              NEXTR(I) = 0
+              NZMIN = MIN(NZMIN,NZ)
+930         END DO
+!           Restore IQ and nullify U part of old pivot row.
+!           Record the column permutation in LASTC(JPIV) and
+!           the row permutation in LASTR(IPIV).
+940         IPC(JPIV) = -ISING
+            LASTR(IPIV) = PIVOT
+            IF (LENPIV==0) GOTO 1050
+            NZROW = NZROW - LENPIV
+            JVAL = IJP1
+            JZER = IPTR(IPIV)
+            IPTR(IPIV) = 0
+            DO JCOUNT = 1, LENPIV
+              J = ICN(JVAL)
+              IQ(J) = ICN(JZER)
+              ICN(JZER) = 0
+              JVAL = JVAL + 1
+              JZER = JZER + 1
+            END DO
+!           Adjust column ordering arrays.
+            IF (NSRCH>NN) GOTO 980
+            DO 970 JJ = IJP1, PIVEND
+              J = ICN(JJ)
+              NZ = LENC(J)
+              IF (NZ/=0) GOTO 960
+              IPC(J) = 0
+              GOTO 970
+960           NZMIN = MIN(NZMIN,NZ)
+970         END DO
+            GOTO 1050
+980         JJ = COLUPD
+            DO 1040 JDUMMY = 1, NN
+              J = JJ
+              IF (J==NN+1) GOTO 1050
+              JJ = -NEXTC(J)
+              NZ = LENC(J)
+              IF (NZ/=0) GOTO 990
+              IPC(J) = 0
+              GOTO 1040
+990           IFIR = IFIRST(NZ)
+              LASTC(J) = 0
+!             IF (IFIR) 1000, 1010, 1020
+!1000         IFIRST(NZ) = -J
+              IF (IFIR == 0) GOTO 1010
+              IF (IFIR > 0) GOTO 1020
+              IFIRST(NZ) = -J
+              IFIR = -IFIR
+              LASTC(IFIR) = J
+              NEXTC(J) = IFIR
+              GOTO 1040
+1010          IFIRST(NZ) = -J
+              NEXTC(J) = 0
+              GOTO 1030
+1020          LC = -LASTR(IFIR)
+              LASTR(IFIR) = -J
+              NEXTC(J) = LC
+              IF (LC/=0) LASTC(LC) = J
+1030          NZMIN = MIN(NZMIN,NZ)
+1040        END DO
+1050      END DO
+! ********************************************
+! ****    End of main elimination loop    ****
+! ********************************************
+
+!         Reset IACTIV to point to the beginning of the
+!         next block.
+1060      IF (ILAST/=NN) IACTIV = IPTR(ILAST+1)
+1070    END DO
+
+! ********************************************
+! ****    End of deomposition of block    ****
+! ********************************************
+
+!     Record singularity (if any) in IQ array.
+        IF (IRANK==NN) GOTO 1090
+        DO 1080 I = 1, NN
+          IF (IPC(I)<0) GOTO 1080
+          ISING = IPC(I)
+          IQ(ISING) = -IQ(ISING)
+          IPC(I) = -ISING
+1080    END DO
+
+!       Run through LU decomposition changing column indices
+!       to that of new order and permuting LENR and LENRL
+!       arrays according to pivot permutations.
+1090    ISTART = IDISP(1)
+        IEND = IBEG - 1
+        IF (IEND<ISTART) GOTO 1110
+        DO JJ = ISTART, IEND
+          JOLD = ICN(JJ)
+          ICN(JJ) = -IPC(JOLD)
+        END DO
+1110    DO II = 1, NN
+          I = LASTR(II)
+          NEXTR(I) = LENR(II)
+          IPTR(I) = LENRL(II)
+        END DO
+        LENRL(1:NN) = IPTR(1:NN)
+        LENR(1:NN) = NEXTR(1:NN)
+
+!       Update permutation arrays IP and IQ.
+        DO II = 1, NN
+          I = LASTR(II)
+          J = -IPC(II)
+          NEXTR(I) = IABS(IP(II)+0)
+          IPTR(J) = IABS(IQ(II)+0)
+!         NEXTR(I) = IABS(IP(II))
+!         IPTR(J) = IABS(IQ(II))
+        END DO
+        DO I = 1, NN
+          IF (IP(I)<0) NEXTR(I) = -NEXTR(I)
+          IP(I) = NEXTR(I)
+          IF (IQ(I)<0) IPTR(I) = -IPTR(I)
+          IQ(I) = IPTR(I)
+        END DO
+        IP(NN) = IABS(IP(NN)+0)
+!       IP(NN) = IABS(IP(NN))
+        IDISP(2) = IEND
+        GOTO 1190
+
+!       Error returns
+1160    IDISP(2) = IACTIV
+        IF (LP==0) GOTO 1190
+        WRITE (LP,90003)
+        GOTO 1180
+1170    IF (IFLAG==-5) IFLAG = -6
+        IF (IFLAG/=-6) IFLAG = -3
+        IDISP(2) = IACTIV
+        IF (LP==0) GOTO 1190
+        IF (IFLAG==-3) WRITE (LP,90004)
+        IF (IFLAG==-6) WRITE (LP,90005)
+1180    PIVOT = PIVOT - ISTART + 1
+        WRITE (LP,90006) PIVOT, NBLOCK, ISTART, ILAST
+        IF (PIVOT==0) WRITE (LP,90007) MINIRN
+
+1190    RETURN
+90000   FORMAT (' Error return from MA30AD because matrix is', &
+          ' structurally singular')
+90001   FORMAT (' Error return from MA30AD because matrix is', &
+          ' numerically singular')
+90002   FORMAT (' LU decomposition destroyed to create more space')
+90003   FORMAT (' Error return from MA30AD because LICN is not big enough')
+90004   FORMAT (' Error return from MA30AD because LIRN is not big enough')
+90005   FORMAT (' Error return from MA30AD LIRN and LICN are too small')
+90006   FORMAT (' At stage ',I5,' in block ',I5,' with first row ',I5, &
+          ' and last row ',I5)
+90007   FORMAT (' To continue set LIRN to at least ',I8)
+
+      END SUBROUTINE MA30AD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30DD(A,ICN,IPTR,N,IACTIV,ITOP,REALS)
+! ..
+! This subroutine performs garbage collection operations on the arrays
+! A, ICN, and IRN.
+! ..
+! IACTIV is the first position in arrays A/ICN from which the compress
+! starts. On exit, IACTIV equals the position of the first entry.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IACTIV, ITOP, N
+        LOGICAL :: REALS
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(ITOP)
+        INTEGER :: ICN(ITOP), IPTR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: J, JPOS, K, KL, KN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30DD
+! ..
+        IF (REALS) ICNCP = ICNCP + 1
+        IF (.NOT.REALS) IRNCP = IRNCP + 1
+!       Set the first non-zero entry in each row to the negative of the
+!       row/col number and hold this row/col index in the row/col
+!       pointer. This is so that the beginning of each row/col can
+!       be recognized in the subsequent scan.
+        DO 10 J = 1, N
+          K = IPTR(J)
+          IF (K<IACTIV) GOTO 10
+          IPTR(J) = ICN(K)
+          ICN(K) = -J
+10      END DO
+        KN = ITOP + 1
+        KL = ITOP - IACTIV + 1
+!       Go through arrays in reverse order compressing to the back so
+!       that there are no zeros held in positions IACTIV to ITOP in ICN.
+!       Reset first entry of each row/col and pointer array IPTR.
+        DO 30 K = 1, KL
+          JPOS = ITOP - K + 1
+          IF (ICN(JPOS)==0) GOTO 30
+          KN = KN - 1
+          IF (REALS) A(KN) = A(JPOS)
+          IF (ICN(JPOS)>=0) GOTO 20
+!         First non-zero of row/col has been located.
+          J = -ICN(JPOS)
+          ICN(JPOS) = IPTR(J)
+          IPTR(J) = KN
+20        ICN(KN) = ICN(JPOS)
+30      END DO
+        IACTIV = KN
+        RETURN
+
+      END SUBROUTINE MA30DD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30BD(N,ICN,A,LICN,LENR,LENRL,IDISP,IP,IQ,W,IW,IFLAG)
+! ..
+! MA30BD performs the LU decomposition of the diagonal blocks of
+! a new matrix PAQ of the same sparsity pattern, using information
+! from a previous call to MA30AD. THe entries of the input matrix
+! must already be in their final positions in the LU decomposition
+! structure. This routine executes about five times faster than
+! MA30AD.
+! ..
+! We now describe the argument list for MA30BD. Consult MA30AD for
+!     further information on these parameters.
+! N   is an integer variable set to the order of the matrix.
+! ICN is an integer array of length LICN. It should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30BD.
+! A   is a real(kind=wp) array of length LICN. The user must set
+!     entries IDISP(1) to IDISP(2) to contain the entries in the
+!     diagonal blocks of the matrix PAQ whose column numbers are
+!     held in ICN, using corresponding positions. Note that some
+!     zeros may need to be held explicitly. On output entries
+!     IDISP(1) to IDISP(2) of array A contain the LU decomposition
+!     of the diagonal blocks of PAQ. Entries A(1) to A(IDISP(1)-1)
+!     are neither required nor altered by MA30BD.
+! LICN is an integer variable which must be set by the user to the
+!     length of arrays A and ICN. it is not altered by MA30BD.
+! LENR, LENRL are integer arrays of length N. They should be
+!     unchanged since the last call to MA30AD. They are not
+!     altered by MA30BD.
+! IDISP is an integer array of length 2. It should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30BD.
+! IP, IQ are integer arrays of length N. They should be unchanged
+!     since the last call to MA30AD. They are not altered by
+!     MA30BD.
+! W   is a REAL(KIND=WP) array of length N which is used as
+!     workspace by MA30BD.
+! IW  is an integer array of length N which is used as workspace
+!     by MA30BD.
+! IFLAG is an integer variable. On output from MA30BD, IFLAG has
+!     the value zero if the factorization was successful, has the
+!     value I if pivot I was very small and has the value -I if
+!     an unexpected singularity was detected at stage I of the
+!     decomposition.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: IFLAG, LICN, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), IW(N), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AU, ROWMAX
+        INTEGER :: I, IFIN, ILEND, IPIVJ, ISING, ISTART, J, JAY, JAYJAY, JFIN, &
+          JJ, PIVPOS
+        LOGICAL :: STAB
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30BD
+! ..
+        STAB = EPS <= ONE
+        RMIN = EPS
+        ISING = 0
+        IFLAG = 0
+        W(1:N) = ZERO
+!       Set up pointers to the beginning of the rows.
+        IW(1) = IDISP(1)
+        IF (N==1) GOTO 30
+        DO I = 2, N
+          IW(I) = IW(I-1) + LENR(I-1)
+        END DO
+
+!       Start of main loop.
+!       At step I, row I of A is transformed to row I of LU by
+!       adding appropriate multiples of rows 1 TO I-1 using row
+!       Gauss elimination.
+30      DO 170 I = 1, N
+!         ISTART is beginning of row I of A and row I of L.
+          ISTART = IW(I)
+!         IFIN is end of row I of A and row I of U.
+          IFIN = ISTART + LENR(I) - 1
+!         ILEND is end of row I of L.
+          ILEND = ISTART + LENRL(I) - 1
+          IF (ISTART>ILEND) GOTO 100
+!         Load row I of A into vector W.
+          DO JJ = ISTART, IFIN
+            J = ICN(JJ)
+            W(J) = A(JJ)
+          END DO
+
+!         Add multiples of appropriate rows of I to I-1 to row I.
+          DO 80 JJ = ISTART, ILEND
+            J = ICN(JJ)
+!           IPIVJ is position of pivot in row J.
+            IPIVJ = IW(J) + LENRL(J)
+!           Form multiplier AU.
+            AU = -W(J)/A(IPIVJ)
+            IF (LBIG) BIG = MAX(ABS(AU),BIG)
+            W(J) = AU
+!           AU * ROW J (U part) is added to row I.
+            IPIVJ = IPIVJ + 1
+            JFIN = IW(J) + LENR(J) - 1
+            IF (IPIVJ>JFIN) GOTO 80
+!           Innermost loop.
+            IF (LBIG) GOTO 60
+            DO JAYJAY = IPIVJ, JFIN
+              JAY = ICN(JAYJAY)
+              W(JAY) = W(JAY) + AU*A(JAYJAY)
+            END DO
+            GOTO 80
+60          DO JAYJAY = IPIVJ, JFIN
+              JAY = ICN(JAYJAY)
+              W(JAY) = W(JAY) + AU*A(JAYJAY)
+              BIG = MAX(ABS(W(JAY)),BIG)
+            END DO
+80        END DO
+
+!         Reload W back into A (now LU).
+          DO JJ = ISTART, IFIN
+            J = ICN(JJ)
+            A(JJ) = W(J)
+            W(J) = ZERO
+          END DO
+!         We now perform the stability checks.
+100       PIVPOS = ILEND + 1
+          IF (IQ(I)>0) GOTO 150
+!         Matrix had singularity at this point in MA30AD.
+!         Is it the first such pivot in current block?
+          IF (ISING==0) ISING = I
+!         Does current matrix have a singularity in the same place?
+          IF (PIVPOS>IFIN) GOTO 110
+          IF (ABS(A(PIVPOS))>ZERO) GOTO 180
+!         It does, so set ising if it is not the end of the current
+!         block. Check to see that appropriate part of LU is zero
+!         or null.
+110       IF (ISTART>IFIN) GOTO 130
+          DO 120 JJ = ISTART, IFIN
+            IF (ICN(JJ)<ISING) GOTO 120
+            IF (ABS(A(JJ))>ZERO) GOTO 180
+120       END DO
+130       IF (PIVPOS<=IFIN) A(PIVPOS) = ONE
+          IF (IP(I)>0 .AND. I/=N) GOTO 170
+!         End of current block. Reset zero pivots and ISING.
+          DO 140 J = ISING, I
+            IF ((LENR(J)-LENRL(J))==0) GOTO 140
+            JJ = IW(J) + LENRL(J)
+            A(JJ) = ZERO
+140       END DO
+          ISING = 0
+          GOTO 170
+!         Matrix had non-zero pivot in MA30AD at this stage.
+150       IF (PIVPOS>IFIN) GOTO 180
+          IF (ABS(A(PIVPOS))<=ZERO) GOTO 180
+          IF (.NOT.STAB) GOTO 170
+          ROWMAX = ZERO
+          DO JJ = PIVPOS, IFIN
+            ROWMAX = MAX(ROWMAX,ABS(A(JJ)))
+          END DO
+          IF (ABS(A(PIVPOS))/ROWMAX>=RMIN) GOTO 170
+          IFLAG = I
+          RMIN = ABS(A(PIVPOS))/ROWMAX
+!         End of main loop.
+170     END DO
+
+        GOTO 190
+!       Error return
+180     IF (LP/=0) WRITE (LP,90000) I
+        IFLAG = -I
+
+190     RETURN
+90000   FORMAT (' Error return from MA30BD; Singularity detected in',' row', &
+          I8)
+
+      END SUBROUTINE MA30BD
+!_______________________________________________________________________
+
+      SUBROUTINE MA30CD(N,ICN,A,LICN,LENR,LENRL,LENOFF,IDISP,IP,IQ,X, &
+        W,MTYPE)
+! ..
+! MA30CD uses the factors produced by MA30AD or MA30BD to solve
+! AX = B or A TRANSPOSE X = B when the matrix P1*A*Q1(PAQ) is
+! block lower triangular (including the case of only one diagonal
+! block).
+! ..
+! We now describe the argument list for MA30CD.
+! N   is an integer variable set to the order of the matrix. It is
+!     not altered by the subroutine.
+! ICN is an integer array of length LICN. Entries IDISP(1) to
+!     IDISP(2) should be unchanged since the last call to MA30AD. If
+!     the matrix has more than one diagonal block, then column indices
+!     corresponding to non-zeros in sub-diagonal blocks of PAQ must
+!     appear in positions 1 to IDISP(1)-1. For the same row those
+!     entries must be contiguous, with those in row I preceding those
+!     in row I+1 (I=1,...,N-1) and no wasted space between rows.
+!     Entries may be in any order within each row. It is not altered
+!     by MA30CD.
+! A   is a REAL(KIND=WP) array of length LICN. Entries IDISP(1) to
+!     IDISP(2) should be unchanged since the last call to MA30AD or
+!     MA30BD. If the matrix has more than one diagonal block, then
+!     the values of the non-zeros in sub-diagonal blocks must be in
+!     positions 1 to IDISP(1)-1 in the order given by ICN. It is not
+!     altered by MA30CD.
+! LICN is an integer variable set to the size of arrays ICN and A.
+!     It is not altered by MA30CD.
+! LENR, LENRL are integer arrays of length N which should be
+!     unchanged since the last call to MA30AD. They are not
+!     altered by MA30CD.
+! LENOFF is an integer array of length N. If the matrix PAQ (or
+!     P1*A*Q1) has more than one diagonal block, then LENOFF(I),
+!     I=1,...,N should be set to the number of non-zeros in row I of
+!     the matrix PAQ which are in sub-diagonal blocks. If there is
+!     only one diagonal block then LENOFF(1) may be set TO -1, in
+!     which case the other entries of LENOFF are never accessed.
+!     It is not altered by ma30cd.
+! IDISP is an integer array of length 2 which should be unchanged
+!     since the last call to MA30AD. It is not altered by MA30CD.
+! IP, IQ are integer arrays of length N which should be unchanged
+!     since the last call to MA30AD. They are not altered by
+!     MA30CD.
+! X   is a REAL(KIND=WP) array of length N. It must be set by the
+!     user to the values of the right hand side vector B for the
+!     equations being solved. ON exit from MA30CD it will be equal
+!     to the solution X required.
+! W   is a REAL(KIND=WP) array of length N which is used as
+!     workspace by MA30CD.
+! MTYPE is an integer variable which must be set by the user. If
+!     MTYPE = 1, then the solution to the system AX = B is returned.
+!     Any other value for mtype will return the solution to the
+!     system A TRANSPOSE X = B. It is not altered by MA30CD.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, MTYPE, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N), X(N)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), LENOFF(N), LENR(N), &
+          LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: WI, WII
+        INTEGER :: I, IB, IBACK, IBLEND, IBLOCK, IEND, IFIRST, II, III,   &
+          ILAST, J, J1, J2, J3, JJ, JPIV, JPIVP1, K, LJ1, LJ2, LT, LTEND, &
+          NUMBLK
+        LOGICAL :: NEG, NOBLOC
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, IABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA30CD
+! ..
+!       The final value of RESID is the maximum residual for an
+!       inconsistent set of equations.
+        RESID = ZERO
+!       NOBLOC is .TRUE. if subroutine block has been used
+!       previously and is .FALSE. otherwise. The value .FALSE.
+!       means that LENOFF will not be subsequently accessed.
+        NOBLOC = LENOFF(1) < 0
+        IF (MTYPE/=1) GOTO 140
+
+!       We now solve  A * X = B.
+!       NEG is used to indicate when the last row in a block
+!       has been reached. It is then set to .TRUE. whereafter
+!       back substitution is performed on the block.
+        NEG = .FALSE.
+!       IP(N) is negated so that the last row of the last
+!       block can be recognised. It is reset to its positive
+!       value on exit.
+        IP(N) = -IP(N)
+!       Preorder VECTOR ... W(I) = X(IP(I))
+        DO II = 1, N
+          I = IP(II)
+          I = IABS(I)
+          W(II) = X(I)
+        END DO
+!       LT holds the position of the first non-zero in the current
+!       row of the off-diagonal blocks.
+        LT = 1
+!       IFIRST holds the index of the first row in the current block.
+        IFIRST = 1
+!       IBLOCK holds the position of the first non-zero in the current
+!       row of the LU decomposition of the diagonal blocks.
+        IBLOCK = IDISP(1)
+!       If I is not the last row of a block, then a pass through this
+!       loop adds the inner product of row I of the off-diagonal blocks
+!       and W to W and performs forward elimination using row I of the
+!       LU decomposition. If I is the last row of a block then, after
+!       performing these aforementioned operations, back substitution
+!       is performed using the rows of the block.
+        DO 120 I = 1, N
+          WI = W(I)
+          IF (NOBLOC) GOTO 30
+          IF (LENOFF(I)==0) GOTO 30
+!         Operations using lower triangular blocks.
+!         LTEND is the end of row I in the off-diagonal blocks.
+          LTEND = LT + LENOFF(I) - 1
+          DO JJ = LT, LTEND
+            J = ICN(JJ)
+            WI = WI - A(JJ)*W(J)
+          END DO
+!         LT is set the beginning of the next off-diagonal row.
+          LT = LTEND + 1
+!         Set NEG to .TRUE. if we are on the last row of the block.
+30        IF (IP(I)<0) NEG = .TRUE.
+          IF (LENRL(I)==0) GOTO 50
+!         Forward elimination phase.
+!         IEND is the end of the L part of row I in the LU decomposition.
+          IEND = IBLOCK + LENRL(I) - 1
+          DO JJ = IBLOCK, IEND
+            J = ICN(JJ)
+            WI = WI + A(JJ)*W(J)
+          END DO
+!         IBLOCK is adjusted to point to the start of the next row.
+50        IBLOCK = IBLOCK + LENR(I)
+          W(I) = WI
+          IF (.NOT.NEG) GOTO 120
+!         Back substitution phase.
+!         J1 is position in A/ICN after end of block beginning in
+!         row IFIRST and ending in row I.
+          J1 = IBLOCK
+!         Are there any singularities in this block? If not, continue
+!         with the back substitution.
+          IB = I
+          IF (IQ(I)>0) GOTO 70
+          DO III = IFIRST, I
+            IB = I - III + IFIRST
+            IF (IQ(IB)>0) GOTO 70
+            J1 = J1 - LENR(IB)
+            RESID = MAX(RESID,ABS(W(IB)))
+            W(IB) = ZERO
+          END DO
+!         Entire block is singular.
+          GOTO 110
+!         Each pass through this loop performs the back substitution
+!         operations for a single row, starting at the end of the
+!         block and working through it in reverse order.
+70        DO III = IFIRST, IB
+            II = IB - III + IFIRST
+!           J2 is end of row II.
+            J2 = J1 - 1
+!           J1 is beginning of row II.
+            J1 = J1 - LENR(II)
+!           JPIV is the position of the pivot in row II.
+            JPIV = J1 + LENRL(II)
+            JPIVP1 = JPIV + 1
+!           JUMP if row II of U has no non-zeros.
+            IF (J2<JPIVP1) GOTO 90
+            WII = W(II)
+            DO JJ = JPIVP1, J2
+              J = ICN(JJ)
+              WII = WII - A(JJ)*W(J)
+            END DO
+            W(II) = WII
+90          W(II) = W(II)/A(JPIV)
+          END DO
+110       IFIRST = I + 1
+          NEG = .FALSE.
+120     END DO
+
+!       Reorder solution vector, X(I) = W(IQINVERSE(I)).
+        DO II = 1, N
+          I = IQ(II)
+          I = IABS(I)
+          X(I) = W(II)
+        END DO
+        IP(N) = -IP(N)
+        GOTO 320
+
+!       WE now solve ATRANSPOSE * X = B.
+!       Preorder vector, W(I) = X(IQ(I)).
+140     DO II = 1, N
+          I = IQ(II)
+          I = IABS(I)
+          W(II) = X(I)
+        END DO
+!       LJ1 points to the beginning the current row in the off-diagonal
+!       blocks.
+        LJ1 = IDISP(1)
+!       IBLOCK is initialized to point to the beginning of the block
+!       after the last one.
+        IBLOCK = IDISP(2) + 1
+!       ILAST is the last row in the current block.
+        ILAST = N
+!       IBLEND points to the position after the last non-zero in the
+!       current block.
+        IBLEND = IBLOCK
+!       Each pass through this loop operates with one diagonal block and
+!       the off-diagonal part of the matrix corresponding to the rows
+!       of this block. The blocks are taken in reverse order and the
+!       number of times the loop is entered is MIN(N, NO. BLOCKS+1).
+        DO NUMBLK = 1, N
+          IF (ILAST==0) GOTO 300
+          IBLOCK = IBLOCK - LENR(ILAST)
+!         This loop finds the index of the first row in the current
+!         block. It is FIRST and IBLOCK is set to the position of
+!         the beginning of this first row.
+          DO K = 1, N
+            II = ILAST - K
+            IF (II==0) GOTO 170
+            IF (IP(II)<0) GOTO 170
+            IBLOCK = IBLOCK - LENR(II)
+          END DO
+170       IFIRST = II + 1
+!         J1 points to the position of the beginning of row I (LT part)
+!         or pivot.
+          J1 = IBLOCK
+!         Forward elimination.
+!         Each pass through this loop performs the operations for one row
+!         of the block. If the corresponding entry of W is zero then the
+!         operations can be avoided.
+          DO I = IFIRST, ILAST
+            IF (ABS(W(I))<=ZERO) GOTO 200
+!           JUMP IF ROW I SINGULAR.
+            IF (IQ(I)<0) GOTO 220
+!           J2 first points to the pivot in row I and then is made
+!           to point to the first non-zero in the U TRANSPOSE part
+!           of the row.
+            J2 = J1 + LENRL(I)
+            WI = W(I)/A(J2)
+            IF (LENR(I)-LENRL(I)==1) GOTO 190
+            J2 = J2 + 1
+!           J3 points to the end of row I.
+            J3 = J1 + LENR(I) - 1
+            DO JJ = J2, J3
+              J = ICN(JJ)
+              W(J) = W(J) - A(JJ)*WI
+            END DO
+190         W(I) = WI
+200         J1 = J1 + LENR(I)
+          END DO
+          GOTO 240
+!         Deal with rest of block which is singular.
+220       DO II = I, ILAST
+            RESID = MAX(RESID,ABS(W(II)))
+            W(II) = ZERO
+          END DO
+!         Back substitution.
+!         This loop does the back substitution on the rows of the
+!         block in the reverse order doing it simultaneously on
+!         the L TRANSPOSE part of the diagonal blocks and the
+!         off-diagonal blocks.
+240       J1 = IBLEND
+          DO 280 IBACK = IFIRST, ILAST
+            I = ILAST - IBACK + IFIRST
+!           J1 points to the beginning of row I.
+            J1 = J1 - LENR(I)
+            IF (LENRL(I)==0) GOTO 260
+!           J2 points to the end of the L TRANSPOSE part of row I.
+            J2 = J1 + LENRL(I) - 1
+            DO JJ = J1, J2
+              J = ICN(JJ)
+              W(J) = W(J) + A(JJ)*W(I)
+            END DO
+260         IF (NOBLOC) GOTO 280
+!           Operations using lower triangular blocks.
+            IF (LENOFF(I)==0) GOTO 280
+!           LJ2 points to the end of row I of the off-diagonal blocks.
+            LJ2 = LJ1 - 1
+!           LJ1 points to the beginning of row I of the off-diagonal
+!           blocks.
+            LJ1 = LJ1 - LENOFF(I)
+            DO JJ = LJ1, LJ2
+              J = ICN(JJ)
+              W(J) = W(J) - A(JJ)*W(I)
+            END DO
+280       END DO
+          IBLEND = J1
+          ILAST = IFIRST - 1
+        END DO
+!       Reorder solution vector, X(I) = W(IPINVERSE(I)).
+300     DO II = 1, N
+          I = IP(II)
+          I = IABS(I)
+          X(I) = W(II)
+        END DO
+
+320     RETURN
+
+      END SUBROUTINE MA30CD
+!_______________________________________________________________________
+
+! Private Variable Information.
+! Private variables for MA30ED hold control parameters.
+!     Original : COMMON /MA30ED/ LP,ABORT1,ABORT2,ABORT3
+! The integer LP is the unit number to which the error messages are
+!     sent. LP has a default value of 6. This default value can be
+!     reset by the user, if desired. A value of 0 suppresses all
+!     messages.
+! The logical variables ABORT1, ABORT2, ABORT3 are used to control
+!     the conditions under which the subroutine will terminate.
+! If ABORT1 iS .TRUE. then the subroutine will exit immediately on
+!     detecting structural singularity.
+! If ABORT2 iS .TRUE. then the subroutine will exit immediately on
+!     detecting numerical singularity.
+! If ABORT3 iS .TRUE. then the subroutine will exit immediately when
+!     the available space in A/ICN is filled up by the previously
+!     decomposed, active, and undecomposed parts of the matrix.
+! The default values for ABORT1, ABORT2, ABORT3 are set to .TRUE.,
+!     .TRUE., and .FALSE., respectively.
+
+! The private variables for MA30FD are used to provide the user with
+! information on the decomposition.
+!     Original : COMMON /MA30FD/ IRNCP,ICNCP,IRANK,MINIRN,MINICN
+! IRNCP AND ICNCP are integer variables used to monitor the adequacy
+!     of the allocated space in arrays IRN and A/ICN, respectively,
+!     by taking account of the number of data management compresses
+!     required on these arrays. If IRNCP or ICNCP is fairly large (say
+!     greater than N/10), It may be advantageous to increase the size
+!     of the corresponding array(s). IRNCP and ICNCP are initialized
+!     to zero on entry to MA30AD and are incremented each time the
+!     compressing routine MA30DD is entered.
+! ICNCP is the number of compresses on A/ICN.
+! IRNCP is the number of compresses on IRN.
+! IRANK is an integer variable which gives an estimate (actually an
+!     upper bound) of the rank of the matrix. On an exit with IFLAG
+!     equal to 0, this will be equal to N.
+! MINIRN is an integer variable which, after a successful call to
+!     MA30AD, indicates the minimum length to which IRN can be
+!     reduced while still permitting a successful decomposition
+!     of the same matrix. If, however, the user were to decrease the
+!     length of IRN to that size, the number of compresses (IRNCP)
+!     may be very high and quite costly. If LIRN is not large enough
+!     to begin the decomposition on a diagonal block, MINIRN will be
+!     equal to the value required to continue the decomposition and
+!     IFLAG will be set to -3 or -6. A value of LIRN slightly greater
+!     than this (say about N/2) will usually provide enough space to
+!     complete the decomposition on that block. In the event of any
+!     other failure minirn gives the minimum size of IRN required
+!     for a successful decomposition up to that point.
+! MINICN is an integer variable which after a successful call to
+!     MA30AD, indicates the minimum size of LICN required to enable
+!     a successful decomposition. In the event of failure with
+!     IFLAG = -5, MINICN will, if ABORT3 is left set to .FALSE.,
+!     indicate the minimum length that would be sufficient to
+!     prevent this error in a subsequent run on an identical matrix.
+!     Again the user may prefer to use a value of icn slightly
+!     greater than MINICN for subsequent runs to avoid too many
+!     conpresses (ICNCP). In the event of failure with IFLAG equal
+!     to any negative value except -4, minicn will give the minimum
+!     length to which licn could be reduced to enable a successful
+!     decomposition to the point at which failure occurred. Notice
+!     that, on a successful entry IDISP(2) gives the amount of space
+!     in A/ICN required for the decomposition while MINICN will
+!     usually be slightly greater because of the need for
+!     "elbow room". If the user is very unsure how large to make
+!     LICN, the variable MINICN can be used to provide that
+!     information. A preliminary run should be performed with ABORT3
+!     left set to .FALSE. and LICN about 3/2 times as big as the
+!     number of non-zeros in the original matrix. Unless the initial
+!     problem is very sparse (when the run will be successful) or
+!     fills in extremely badly (giving an error return with
+!     IFLAG = -4), an error return with IFLAG = -5 should result and
+!     MINICN will give the amount of space required for a successful
+!     decomposition.
+
+! The private variables for MA30GD are used by the MA30BD entry only.
+!     Original : COMMON /MA30GD/ EPS,RMIN
+! EPS is a REAL(KIND=WP) variable. It is used to test for small
+!     pivots. Its default value is 1.0D-4 (1.0E-4 in E version).
+!     If the user sets EPS to any value greater than 1.0, then no
+!     check is made on the size of the pivots. Although the absence
+!     of such a check would fail to warn the user of bad instability,
+!     its absence will enable MA30BD to run slightly faster. An a
+!     posteriori check on the stability of the factorization can
+!     be obtained from MC24AD.
+! RMIN is a REAL(KIND=WP) variable which gives the user some
+!     information about the stability of the decomposition. At each
+!     stage of the LU decomposition the magnitude of the pivot APIV
+!     is compared with the largest off-diagonal entry currently in
+!     its row (row of U), ROWMAX say. If the ratio
+!                       MIN(APIV/ROWMAX)
+!     where the minimum is taken over all the rows, is less than EPS
+!     then RMIN is set to this minimum value and IFLAG is returned
+!     with the value +I where I is the row in which this minimum
+!     occurs. If the user sets EPS greater than one, then this test
+!     is not performed. In this case, and when there are no small
+!     pivots rmin will be set equal to EPS.
+
+! The private variables for MA30HD are used by MA30CD only.
+!     Original : COMMON /MA30HD/ RESID
+! RESID is a REAL(KIND=WP) variable. In the case of singular or
+!     rectangular matrices its final value will be equal to the
+!     maximum residual for the unsatisfied equations; otherwise
+!     its value will be set to zero.
+
+!  MA30ID private variables control the use of drop tolerances,
+!     the modified pivot option and the calculation of the largest
+!     entry in the factorization process. These private variables
+!     were added to the MA30 package in February, 1983.
+!     Original : COMMON /MA30ID/ TOL,BIG,NDROP,NSRCH,LBIG
+! TOL is a REAL(KIND=WP) variable. If it is set to a positive
+!     value, then MA30AD will drop from the factors any non-zero
+!     whose modulus is less than TOL. The factorization will then
+!     require less storage but will be inaccurate. After a run of
+!     MA30AD where entries have been dropped, MA30BD should not
+!     be called. The default value for TOL is 0.0.
+! BIG is a REAL(KIND=WP) variable. If LBIG has been set to .TRUE.,
+!     BIG will be set to the largest entry encountered during the
+!     factorization.
+! NDROP is an integer variable. If TOL has been set positive, on
+!     exit from MA30AD, NDROP will hold the number of entries
+!     dropped from the data structure.
+! NSRCH is an integer variable. If NSRCH is set to a value less
+!     than or equal to N, then a different pivot option will be
+!     employed by MA30AD. This may result in different fill-in
+!     and execution time for MA30AD. If NSRCH is less than or
+!     equal to N, the workspace arrays LASTC and NEXTC are not
+!     referenced by MA30AD. The default value for NSRCH is 32768.
+! LBIG is a logical variable. If LBIG is set to .TRUE., the value
+!     of the largest entry encountered in the factorization by
+!     MA30AD is returned in BIG. Setting LBIG to .TRUE. will
+!     marginally increase the factorization time for MA30AD and
+!     will increase that for MA30BD by about 20%. The default
+!     value for LBIG is .FALSE.
+!_______________________________________________________________________
+
+      SUBROUTINE MC13D(N,ICN,LICN,IP,LENR,IOR,IB,NUM,IW)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUM
+! ..
+! .. Array Arguments ..
+        INTEGER :: IB(N), ICN(LICN), IOR(N), IP(N), IW(N,3), LENR(N)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA13D
+! ..
+        CALL MC13E(N,ICN,LICN,IP,LENR,IOR,IB,NUM,IW(1,1),IW(1,2),IW(1,3))
+        RETURN
+
+      END SUBROUTINE MC13D
+!_______________________________________________________________________
+
+      SUBROUTINE MC13E(N,ICN,LICN,IP,LENR,ARP,IB,NUM,LOWL,NUMB,PREV)
+! ..
+! ARP(I) is one less than the number of unsearched edges leaving
+!     node I. At the end of the algorithm it is set to a
+!     permutation which puts the matrix in block lower
+!     triangular form.
+! IB(I) is the position in the ordering of the start of the Ith
+!     block. IB(N+1-I) holds the node number of the Ith node
+!     on the stack.
+! LOWL(I) is the smallest stack position of any node to which a
+!     path from node I has been found. It is set to N+1 when
+!     node I is removed from the stack.
+! NUMB(I) is the position of node I in the stack if it is on
+!     the stack. It is the permuted order of node I for those
+!     nodes whose final position has been found and is otherwise
+!     zero.
+! PREV(I) is the node at the end of the path when node I was
+!     placed on the stack.
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUM
+! ..
+! .. Array Arguments ..
+        INTEGER :: ARP(N), IB(N), ICN(LICN), IP(N), LENR(N), LOWL(N),  &
+          NUMB(N), PREV(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: DUMMY, I, I1, I2, ICNT, II, ISN, IST, IST1, IV, IW, &
+          J, K, LCNT, NNM1, STP
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA13E
+! ..
+!       ICNT is the number of nodes whose positions in final ordering
+!       have been found.
+        ICNT = 0
+!       NUM is the number of blocks that have been found.
+        NUM = 0
+        NNM1 = N + N - 1
+
+!       Initialization of arrays.
+        DO J = 1, N
+          NUMB(J) = 0
+          ARP(J) = LENR(J) - 1
+        END DO
+
+        DO 90 ISN = 1, N
+!         Look for a starting node.
+          IF (NUMB(ISN)/=0) GOTO 90
+          IV = ISN
+!         IST is the number of nodes on the stack. It is the
+!         stack pointer.
+          IST = 1
+!         Put node IV at beginning of stack.
+          LOWL(IV) = 1
+          NUMB(IV) = 1
+          IB(N) = IV
+
+!         The body of this loop puts a new node on the stack
+!         or backtracks.
+          DO 80 DUMMY = 1, NNM1
+            I1 = ARP(IV)
+!           Have all edges leaving node iv been searched?
+            IF (I1<0) GOTO 30
+            I2 = IP(IV) + LENR(IV) - 1
+            I1 = I2 - I1
+
+!           Look at edges leaving node iv until one enters a
+!           new node or all edges are exhausted.
+            DO 20 II = I1, I2
+              IW = ICN(II)
+!             Has node iw been on stack already?
+              IF (NUMB(IW)==0) GOTO 70
+!             Update value of LOWL(IV) if necessary.
+20          LOWL(IV) = MIN(LOWL(IV),LOWL(IW))
+
+!           There are no more edges leaving node IV.
+            ARP(IV) = -1
+!           Is node IV the root of a block.
+30          IF (LOWL(IV)<NUMB(IV)) GOTO 60
+
+!           Order nodes in a block.
+            NUM = NUM + 1
+            IST1 = N + 1 - IST
+            LCNT = ICNT + 1
+!           Peel block off the top of the stack starting at the
+!           top and working down to the root of the block.
+            DO STP = IST1, N
+              IW = IB(STP)
+              LOWL(IW) = N + 1
+              ICNT = ICNT + 1
+              NUMB(IW) = ICNT
+              IF (IW==IV) GOTO 50
+            END DO
+50          IST = N - STP
+            IB(NUM) = LCNT
+!           Are there any nodes left on the stack?
+            IF (IST/=0) GOTO 60
+!           Have all the nodes been ordered?
+            IF (ICNT<N) GOTO 90
+            GOTO 100
+
+!           Backtrack to previous node on path.
+60          IW = IV
+            IV = PREV(IV)
+!           Update value of LOWL(IV) if necessary.
+            LOWL(IV) = MIN(LOWL(IV),LOWL(IW))
+            GOTO 80
+
+!           Put new node on the stack.
+70          ARP(IV) = I2 - II - 1
+            PREV(IW) = IV
+            IV = IW
+            IST = IST + 1
+            LOWL(IV) = IST
+            NUMB(IV) = IST
+            K = N + 1 - IST
+            IB(K) = IV
+80        END DO
+
+90      END DO
+
+!       Put permutation in the required form.
+100     DO I = 1, N
+          II = NUMB(I)
+          ARP(II) = I
+        END DO
+        RETURN
+
+      END SUBROUTINE MC13E
+!_______________________________________________________________________
+
+      SUBROUTINE MC20AD(NC,MAXA,A,INUM,JPTR,JNUM,JDISP)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+! ..
+        INTEGER :: JDISP, MAXA, NC
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(MAXA)
+        INTEGER :: INUM(MAXA), JNUM(MAXA), JPTR(NC)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACE, ACEP
+        INTEGER :: I, ICE, ICEP, J, JA, JB, JCE, JCEP, K, KR, LOC, MYNULL
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA20AD
+! ..
+        MYNULL = -JDISP
+!       CLEAR JPTR
+        JPTR(1:NC) = 0
+!       Count the number of elements in each column.
+        DO K = 1, MAXA
+          J = JNUM(K) + JDISP
+          JPTR(J) = JPTR(J) + 1
+        END DO
+!       SET THE JPTR ARRAY.
+        K = 1
+        DO J = 1, NC
+          KR = K + JPTR(J)
+          JPTR(J) = K
+          K = KR
+        END DO
+
+!       Reorder the elements into column order. The algorithm is an
+!       in-place sort and is of order MAXA.
+        DO 50 I = 1, MAXA
+!         Establish the current entry.
+          JCE = JNUM(I) + JDISP
+          IF (JCE==0) GOTO 50
+          ACE = A(I)
+          ICE = INUM(I)
+!         Clear the location vacated.
+          JNUM(I) = MYNULL
+!         Chain from current entry to store items.
+          DO 40 J = 1, MAXA
+!           Current entry not in correct position. Determine the
+!           correct position to store entry.
+            LOC = JPTR(JCE)
+            JPTR(JCE) = JPTR(JCE) + 1
+!           Save contents of that location.
+            ACEP = A(LOC)
+            ICEP = INUM(LOC)
+            JCEP = JNUM(LOC)
+!           Store current entry.
+            A(LOC) = ACE
+            INUM(LOC) = ICE
+            JNUM(LOC) = MYNULL
+!           Check if next current entry needs to be processed.
+            IF (JCEP==MYNULL) GOTO 50
+!           It does. Copy into current entry.
+            ACE = ACEP
+            ICE = ICEP
+40        JCE = JCEP + JDISP
+
+50      END DO
+
+!       Reset JPTR vector.
+        JA = 1
+        DO J = 1, NC
+          JB = JPTR(J)
+          JPTR(J) = JA
+          JA = JB
+        END DO
+        RETURN
+
+      END SUBROUTINE MC20AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC20BD(NC,MAXA,A,INUM,JPTR)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: MAXA, NC
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(MAXA)
+        INTEGER :: INUM(MAXA), JPTR(NC)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: ACE
+        INTEGER :: ICE, IK, J, JJ, K, KDUMMY, KLO, KMAX, KOR
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC IABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA20BD
+! ..
+        KMAX = MAXA
+        DO JJ = 1, NC
+          J = NC + 1 - JJ
+          KLO = JPTR(J) + 1
+          IF (KLO>KMAX) GOTO 40
+          KOR = KMAX
+          DO KDUMMY = KLO, KMAX
+!           Items KOR,KOR+1,...,KMAX are in order.
+            ACE = A(KOR-1)
+            ICE = INUM(KOR-1)
+            DO K = KOR, KMAX
+              IK = INUM(K)
+              IF (IABS(ICE)<=IABS(IK)) GOTO 20
+              INUM(K-1) = IK
+              A(K-1) = A(K)
+            END DO
+            K = KMAX + 1
+20          INUM(K-1) = ICE
+            A(K-1) = ACE
+            KOR = KOR - 1
+          END DO
+!         Next column.
+40        KMAX = KLO - 2
+        END DO
+        RETURN
+
+      END SUBROUTINE MC20BD
+!_______________________________________________________________________
+
+      SUBROUTINE MC21A(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,IW)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N, NUMNZ
+! ..
+! .. Array Arguments ..
+        INTEGER :: ICN(LICN), IP(N), IPERM(N), IW(N,4), LENR(N)
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA21A
+! ..
+        CALL MC21B(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,IW(1,1),IW(1,2), &
+          IW(1,3),IW(1,4))
+        RETURN
+
+      END SUBROUTINE MC21A
+!_______________________________________________________________________
+
+      SUBROUTINE MC21B(N,ICN,LICN,IP,LENR,IPERM,NUMNZ,PR,ARP,CV,OUT)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+! ..
+        INTEGER :: LICN, N, NUMNZ
+! ..
+! .. Array Arguments ..
+        INTEGER :: ARP(N), CV(N), ICN(LICN), IP(N), IPERM(N), LENR(N), &
+          OUT(N), PR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, II, IN1, IN2, IOUTK, J, J1, JORD, K, KK
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA21B
+! ..
+! PR(I) is the previous row to I in the depth first search.
+!    It is used as a work array in the sorting algorithm.
+!    Elements (IPERM(I),I) I=1,...,N are non-zero at the
+!    end of the algorithm unless N assignments have not
+!    been made, in which case (IPERM(I),I) will be zero
+!    for N-NUMNZ entries.
+! CV(I) is the most recent row extension at which column I
+!    was visited.
+! ARP(I) is one less than the number of non-zeros in row I
+!    which have not been scanned when looking for a cheap
+!    assignment.
+! OUT(I) is one less than the number of non-zeros in row I
+!    which have not been scanned during one pass through
+!    the main loop.
+
+!       Initialization of arrays.
+        DO I = 1, N
+          ARP(I) = LENR(I) - 1
+          CV(I) = 0
+          IPERM(I) = 0
+        END DO
+        NUMNZ = 0
+
+!       Main loop.
+!       Each pass round this loop either results in a new
+!       assignment or gives a row with no assignment.
+        DO 100 JORD = 1, N
+          J = JORD
+          PR(J) = -1
+          DO 70 K = 1, JORD
+!           Look for a cheap assignment.
+            IN1 = ARP(J)
+            IF (IN1<0) GOTO 30
+            IN2 = IP(J) + LENR(J) - 1
+            IN1 = IN2 - IN1
+            DO II = IN1, IN2
+              I = ICN(II)
+              IF (IPERM(I)==0) GOTO 80
+            END DO
+!           No cheap assignment in row.
+            ARP(J) = -1
+!           Begin looking for assignment chain starting with row J.
+30          OUT(J) = LENR(J) - 1
+!           Inner loop. Extends chain by one or backtracks.
+            DO KK = 1, JORD
+              IN1 = OUT(J)
+              IF (IN1<0) GOTO 50
+              IN2 = IP(J) + LENR(J) - 1
+              IN1 = IN2 - IN1
+!             Forward scan.
+              DO 40 II = IN1, IN2
+                I = ICN(II)
+                IF (CV(I)==JORD) GOTO 40
+!               Column I has not yet been accessed during this pass.
+                J1 = J
+                J = IPERM(I)
+                CV(I) = JORD
+                PR(J) = J1
+                OUT(J1) = IN2 - II - 1
+                GOTO 70
+40            END DO
+
+!             Backtracking step.
+50            J = PR(J)
+              IF (J==-1) GOTO 100
+            END DO
+
+70        END DO
+
+!         New assignment is made.
+80        IPERM(I) = J
+          ARP(J) = IN2 - II - 1
+          NUMNZ = NUMNZ + 1
+          DO K = 1, JORD
+            J = PR(J)
+            IF (J==-1) GOTO 100
+            II = IP(J) + LENR(J) - OUT(J) - 2
+            I = ICN(II)
+            IPERM(I) = J
+          END DO
+
+100     END DO
+
+!       If matrix is structurally singular, we now complete the
+!       permutation IPERM.
+        IF (NUMNZ==N) RETURN
+        ARP(1:N) = 0
+        K = 0
+        DO 130 I = 1, N
+          IF (IPERM(I)/=0) GOTO 120
+          K = K + 1
+          OUT(K) = I
+          GOTO 130
+120       J = IPERM(I)
+          ARP(J) = I
+130     END DO
+        K = 0
+        DO 140 I = 1, N
+          IF (ARP(I)/=0) GOTO 140
+          K = K + 1
+          IOUTK = OUT(K)
+          IPERM(IOUTK) = I
+140     END DO
+        RETURN
+
+      END SUBROUTINE MC21B
+!_______________________________________________________________________
+
+      SUBROUTINE MC22AD(N,ICN,A,NZ,LENROW,IP,IQ,IW,IW1)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: N, NZ
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(NZ)
+        INTEGER :: ICN(NZ), IP(N), IQ(N), IW(N,2), IW1(NZ), LENROW(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AVAL
+        INTEGER :: I, ICHAIN, IOLD, IPOS, J, J2, JJ, JNUM, JVAL, LENGTH, &
+          NEWPOS
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC IABS
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA22AD
+! ..
+        IF (NZ<=0) GOTO 90
+        IF (N<=0) GOTO 90
+!       Set start of row I in IW(I,1) and LENROW(I) in IW(I,2)
+        IW(1,1) = 1
+        IW(1,2) = LENROW(1)
+        DO I = 2, N
+          IW(I,1) = IW(I-1,1) + LENROW(I-1)
+          IW(I,2) = LENROW(I)
+        END DO
+!       Permute LENROW according to IP. Set off-sets for new
+!       position of row IOLD in IW(IOLD,1) and put old row
+!       indices in IW1 in positions corresponding to the new
+!       position of this row in A/ICN.
+        JJ = 1
+        DO 30 I = 1, N
+          IOLD = IP(I)
+          IOLD = IABS(IOLD)
+          LENGTH = IW(IOLD,2)
+          LENROW(I) = LENGTH
+          IF (LENGTH==0) GOTO 30
+          IW(IOLD,1) = IW(IOLD,1) - JJ
+          J2 = JJ + LENGTH - 1
+          DO 20 J = JJ, J2
+20        IW1(J) = IOLD
+          JJ = J2 + 1
+30      END DO
+!       Set inverse permutation to IQ in IW(:,2).
+        DO I = 1, N
+          IOLD = IQ(I)
+          IOLD = IABS(IOLD)
+          IW(IOLD,2) = I
+        END DO
+!       Permute A and ICN in place, changing to new column numbers.
+!       Main loop.
+!       Each pass through this loop places a closed chain of
+!       column indices in their new (and final) positions.
+!       This is recorded by setting the iw1 entry to zero so
+!       that any which are subsequently encountered during
+!       this major scan can be bypassed.
+        DO 80 I = 1, NZ
+          IOLD = IW1(I)
+          IF (IOLD==0) GOTO 80
+          IPOS = I
+          JVAL = ICN(I)
+!         If row IOLD is in same positions after permutation,
+!         GOTO 150.
+          IF (IW(IOLD,1)==0) GOTO 70
+          AVAL = A(I)
+!         Chain loop.
+!         Each pass through this loop places one(permuted) column
+!         index in its final position, viz. IPOS.
+          DO ICHAIN = 1, NZ
+!           NEWPOS is the original position in A/ICN of the
+!           element to be placed in position IPOS. It is also
+!           the position of the next element in the chain.
+            NEWPOS = IPOS + IW(IOLD,1)
+!           Is chain complete?
+            IF (NEWPOS==I) GOTO 60
+            A(IPOS) = A(NEWPOS)
+            JNUM = ICN(NEWPOS)
+            ICN(IPOS) = IW(JNUM,2)
+            IPOS = NEWPOS
+            IOLD = IW1(IPOS)
+            IW1(IPOS) = 0
+!           End of chain loop.
+          END DO
+60        A(IPOS) = AVAL
+70        ICN(IPOS) = IW(JVAL,2)
+!         END OF MAIN LOOP
+80      END DO
+90      RETURN
+
+      END SUBROUTINE MC22AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC23AD(N,ICN,A,LICN,LENR,IDISP,IP,IQ,LENOFF,IW,IW1)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN)
+        INTEGER :: ICN(LICN), IDISP(2), IP(N), IQ(N), IW(N,5), IW1(N,2), &
+          LENOFF(N), LENR(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: I, I1, I2, IBEG, IBLOCK, IEND, II, ILEND, INEW, IOLD, &
+          IROWB, IROWE, J, JJ, JNEW, JNPOS, JOLD, K, LENI, NZ
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC MAX, MIN
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA23AD
+! ..
+!     Input ... N,ICN ... A,ICN,LENR ...
+!     Set up pointers IW(:,1) to the beginning of the rows
+!     and set LENOFF equal to LENR.
+        IW1(1,1) = 1
+        LENOFF(1) = LENR(1)
+        IF (N==1) GOTO 20
+        DO I = 2, N
+          LENOFF(I) = LENR(I)
+          IW1(I,1) = IW1(I-1,1) + LENR(I-1)
+        END DO
+!       IDISP(1) points to the first position in A/ICN after
+!       the off-diagonal blocks and untreated rows.
+20      IDISP(1) = IW1(N,1) + LENR(N)
+
+!       Find row permutation ip to make diagonal zero-free.
+        CALL MC21A(N,ICN,LICN,IW1(1,1),LENR,IP,NUMNZ,IW(1,1))
+
+!       Possible error return for structurally singular matrices.
+        IF (NUMNZ/=N .AND. ABORT) GOTO 170
+
+!       IW1(:,2) and LENR are permutations of IW1(:,1) and
+!       LENR/LENOFF suitable for entry to MC13D since matrix
+!       with these row pointer and length arrays has maximum
+!       number of non-zeros on the diagonal.
+        DO II = 1, N
+          I = IP(II)
+          IW1(II,2) = IW1(I,1)
+          LENR(II) = LENOFF(I)
+        END DO
+
+!       Find symmetric permutation IQ to block lower triangular form.
+        CALL MC13D(N,ICN,LICN,IW1(1,2),LENR,IQ,IW(1,4),NUM,IW)
+
+        IF (NUM/=1) GOTO 60
+
+!       Action taken if matrix is irreducible: The
+!       whole matrix is just moved to the end of the storage.
+        DO I = 1, N
+          LENR(I) = LENOFF(I)
+          IP(I) = I
+          IQ(I) = I
+        END DO
+        LENOFF(1) = -1
+!       IDISP(1) is the first position after the last element in
+!       the off-diagonal blocks and untreated rows.
+        NZ = IDISP(1) - 1
+        IDISP(1) = 1
+!       IDISP(2) Is the position in A/ICN of the first element
+!       in the diagonal blocks.
+        IDISP(2) = LICN - NZ + 1
+        LARGE = N
+        IF (NZ==LICN) GOTO 200
+        DO K = 1, NZ
+          J = NZ - K + 1
+          JJ = LICN - K + 1
+          A(JJ) = A(J)
+          ICN(JJ) = ICN(J)
+        END DO
+        GOTO 200
+
+!       Data structure reordered.
+
+!       Form composite row permutation, IP(I) = IP(IQ(I)).
+60      DO II = 1, N
+          I = IQ(II)
+          IW(II,1) = IP(I)
+        END DO
+        DO I = 1, N
+          IP(I) = IW(I,1)
+        END DO
+
+!       Run through blocks in reverse order separating diagonal
+!       blocks which are moved to the end of the storage. Elements
+!       in off-diagonal blocks are left in place unless a compress
+!       is necessary.
+
+!       IBEG indicates the lowest value of J for which ICN(J) has
+!       been set to zero when element in position J was moved to
+!       the diagonal block part of storage.
+        IBEG = LICN + 1
+!       IEND is the position of the first element of those treated
+!       rows which are in diagonal blocks.
+        IEND = LICN + 1
+!       LARGE is the dimension of the largest block encountered
+!       so far.
+        LARGE = 0
+
+!       NUM is the number of diagonal blocks.
+        DO K = 1, NUM
+          IBLOCK = NUM - K + 1
+!         I1 is first row (in permuted form) of block IBLOCK.
+!         I2 is last row (in permuted form) of block IBLOCK.
+          I1 = IW(IBLOCK,4)
+          I2 = N
+          IF (K/=1) I2 = IW(IBLOCK+1,4) - 1
+          LARGE = MAX(LARGE,I2-I1+1)
+!         Go through the rows of block IBLOCK in the reverse order.
+          DO II = I1, I2
+            INEW = I2 - II + I1
+!           We now deal with row inew in permuted form (row IOLD
+!           in original matrix).
+            IOLD = IP(INEW)
+!           If there is space to move up diagonal block portion
+!           of row GOTO 110.
+            IF (IEND-IDISP(1)>=LENOFF(IOLD)) GOTO 110
+
+!           In-line compress.
+!           Moves separated off-diagonal elements and untreated
+!           rows to front of storage.
+            JNPOS = IBEG
+            ILEND = IDISP(1) - 1
+            IF (ILEND<IBEG) GOTO 180
+            DO 90 J = IBEG, ILEND
+              IF (ICN(J)==0) GOTO 90
+              ICN(JNPOS) = ICN(J)
+              A(JNPOS) = A(J)
+              JNPOS = JNPOS + 1
+90          END DO
+            IDISP(1) = JNPOS
+            IF (IEND-JNPOS<LENOFF(IOLD)) GOTO 180
+            IBEG = LICN + 1
+!           Reset pointers to the beginning of the rows.
+            DO 100 I = 2, N
+100         IW1(I,1) = IW1(I-1,1) + LENOFF(I-1)
+
+!           Row IOLD is now split into diagonal and off-diagonal parts.
+110         IROWB = IW1(IOLD,1)
+            LENI = 0
+            IROWE = IROWB + LENOFF(IOLD) - 1
+!           Backward scan of whole of row IOLD (in original matrix).
+            IF (IROWE<IROWB) GOTO 130
+            DO 120 JJ = IROWB, IROWE
+              J = IROWE - JJ + IROWB
+              JOLD = ICN(J)
+!             IW(:,2) holds the inverse permutation to IQ.
+!             It was set to this in MC13D.
+              JNEW = IW(JOLD,2)
+!             IF (JNEW < I1) THEN ...
+!             Element is in off-diagonal block and so is
+!             left in situ.
+              IF (JNEW<I1) GOTO 120
+!             Element is in diagonal block and is moved to
+!             the end of the storage.
+              IEND = IEND - 1
+              A(IEND) = A(J)
+              ICN(IEND) = JNEW
+              IBEG = MIN(IBEG,J)
+              ICN(J) = 0
+              LENI = LENI + 1
+120         END DO
+
+            LENOFF(IOLD) = LENOFF(IOLD) - LENI
+130         LENR(INEW) = LENI
+          END DO
+
+          IP(I2) = -IP(I2)
+        END DO
+!       Resets IP(N) to positive value.
+        IP(N) = -IP(N)
+!       IDISP(2) is position of first element in diagonal blocks.
+        IDISP(2) = IEND
+
+!       This compress is used to move all off-diagonal elements
+!       to the front of the storage.
+        IF (IBEG>LICN) GOTO 200
+        JNPOS = IBEG
+        ILEND = IDISP(1) - 1
+        DO 160 J = IBEG, ILEND
+          IF (ICN(J)==0) GOTO 160
+          ICN(JNPOS) = ICN(J)
+          A(JNPOS) = A(J)
+          JNPOS = JNPOS + 1
+160     END DO
+!       IDISP(1) is first position after last element of
+!       off-diagonal blocks.
+        IDISP(1) = JNPOS
+        GOTO 200
+
+!       Error return
+170     IF (LP/=0) WRITE (LP,90000) NUMNZ
+90000   FORMAT (' Matrix is structurally singular, rank = ',I6)
+        IDISP(1) = -1
+        GOTO 190
+180     IF (LP/=0) WRITE (LP,90001) N
+90001   FORMAT (' LICN is not big enough; increase by ',I6)
+        IDISP(1) = -2
+190     IF (LP/=0) WRITE (LP,90002)
+90002   FORMAT (' + Error return from MC23AD')
+200     RETURN
+
+      END SUBROUTINE MC23AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC24AD(N,ICN,A,LICN,LENR,LENRL,W)
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: LICN, N
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(LICN), W(N)
+        INTEGER :: ICN(LICN), LENR(N), LENRL(N)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: AMAXL, AMAXU, WROWL
+        INTEGER :: I, J, J0, J1, J2, JJ
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, MAX
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA24AD
+! ..
+        AMAXL = ZERO
+        W(1:N) = ZERO
+        J0 = 1
+        DO 60 I = 1, N
+          IF (LENR(I)==0) GOTO 60
+          J2 = J0 + LENR(I) - 1
+          IF (LENRL(I)==0) GOTO 30
+!         Calculation of 1-norm of L.
+          J1 = J0 + LENRL(I) - 1
+          WROWL = ZERO
+          DO 20 JJ = J0, J1
+20        WROWL = WROWL + ABS(A(JJ))
+!         AMAXL is the maximum norm of columns of L so far found.
+          AMAXL = MAX(AMAXL,WROWL)
+          J0 = J1 + 1
+!         Calculation of norms of columns of U(MAX-NORMS).
+30        J0 = J0 + 1
+          IF (J0>J2) GOTO 50
+          DO 40 JJ = J0, J2
+            J = ICN(JJ)
+40        W(J) = MAX(ABS(A(JJ)),W(J))
+50        J0 = J2 + 1
+60      END DO
+!       AMAXU is set to maximum max-norm of columns of U.
+        AMAXU = ZERO
+        DO I = 1, N
+          AMAXU = MAX(AMAXU,W(I))
+        END DO
+!       GROFAC is MAX U max-norm times MAX L 1-norm.
+        W(1) = AMAXL*AMAXU
+        RETURN
+
+      END SUBROUTINE MC24AD
+!_______________________________________________________________________
+
+      SUBROUTINE MC19AD(N,NA,A,IRN,ICN,R,C,W)
+! ..
+!     MC19A was altered to use same precision for R, C,
+!     and W as is used for other variables in program.
+! ..
+!     REAL A(NA),R(N),C(N),W(N,5)
+!     R(I) is used to return log(scaling factor for row I).
+!     C(J) is used to return log(scaling factor for col J).
+!     W(I,1), W(I,2) hold row,col non-zero counts.
+!     W(J,3) holds - COL J LOG during execution.
+!     W(J,4) holds 2-iteration change in W(J,3).
+!     W(I,5) is used to save average element log for row I.
+!     INTEGER*2 IRN(NA), ICN(NA)
+!     IRN(K) gives row number of element in A(K).
+!     ICN(K) gives col number of element in A(K).
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER :: N, NA
+! ..
+! .. Array Arguments ..
+        KPP_REAL :: A(NA), C(N), R(N), W(N,5)
+        INTEGER :: ICN(NA), IRN(NA)
+! ..
+! .. Local Scalars ..
+        KPP_REAL :: E, E1, EM, Q, Q1, QM, S, S1, SM, SMIN, U, V
+        INTEGER :: I, I1, I2, ITER, J, K, MAXIT
+! ..
+! .. Intrinsic Functions ..
+        INTRINSIC ABS, LOG, REAL
+! ..
+! .. Data Statements ..
+!       MAXIT is the maximal permitted number of iterations.
+!       SMIN is used in a convergence test on (residual norm)**2.
+        DATA MAXIT/100/, SMIN/0.1/
+! ..
+! .. FIRST EXECUTABLE STATEMENT MA19AD
+! ..
+!       Check scalar data.
+        IFAIL = 1
+        IF (N<1) GOTO 210
+        IFAIL = 2
+!       IF (N > 32767)GOTO 230
+        IFAIL = 2
+        IFAIL = 0
+
+!       Initialise for accumulation of sums and products.
+        C(1:N) = ZERO
+        R(1:N) = ZERO
+        W(1:N,1:4) = ZERO
+        IF (NA<=0) GOTO 220
+        DO 40 K = 1, NA
+          U = ABS(A(K))
+!         IF (U == ZERO) GOTO 30
+          IF (ABS(U-ZERO)<=ZERO) GOTO 40
+          U = LOG(U)
+          I1 = IRN(K)
+          I2 = ICN(K)
+          IF (I1>=1 .AND. I1<=N .AND. I2>=1 .AND. I2<=N) GOTO 30
+          IF (LP>0) WRITE (LP,90000) K, I1, I2
+90000     FORMAT (' MC19 error. Element ',I5,' is in row ',I5,' and column ', &
+            I5)
+          IFAIL = 3
+          GOTO 40
+!         Count row/col non-zeros and compute rhs vectors.
+30        W(I1,1) = W(I1,1) + 1.
+          W(I2,2) = W(I2,2) + 1.
+          R(I1) = R(I1) + U
+          W(I2,3) = W(I2,3) + U
+40      END DO
+        IF (IFAIL==3) GOTO 210
+
+!       Divide rhs by diagonal matrices.
+        DO I = 1, N
+!        IF (W(I,1) == ZERO) W(I,1) = 1.
+          IF (ABS(W(I,1))<=ZERO) W(I,1) = ONE
+          R(I) = R(I)/W(I,1)
+!         SAVE R(I) FOR USE AT END.
+          W(I,5) = R(I)
+!         IF (W(I,2) == ZERO) W(I,2) = 1.
+          IF (ABS(W(I,2))<=ZERO) W(I,2) = ONE
+          W(I,3) = W(I,3)/W(I,2)
+        END DO
+!       SM = SMIN*FLOAT(NA)
+        SM = SMIN*REAL(NA)
+!       Sweep to compute initial residual vector.
+        DO 60 K = 1, NA
+!         IF (A(K) == ZERO) GOTO 80
+          IF (ABS(A(K))<=ZERO) GOTO 60
+          I = IRN(K)
+          J = ICN(K)
+          R(I) = R(I) - W(J,3)/W(I,1)
+60      END DO
+
+!       Initialise iteration.
+        E = ZERO
+        Q = 1.
+        S = ZERO
+        DO I = 1, N
+          S = S + W(I,1)*R(I)**2
+        END DO
+        IF (S<=SM) GOTO 160
+
+!       Iteration loop.
+        DO ITER = 1, MAXIT
+!         Sweep through matrix to update residual vector.
+          DO 80 K = 1, NA
+!           IF (A(K) == ZERO) GOTO 130
+            IF (ABS(A(K))<=ZERO) GOTO 80
+            I = ICN(K)
+            J = IRN(K)
+            C(I) = C(I) + R(J)
+80        END DO
+          S1 = S
+          S = ZERO
+          DO I = 1, N
+            V = -C(I)/Q
+            C(I) = V/W(I,2)
+            S = S + V*C(I)
+          END DO
+          E1 = E
+          E = Q*S/S1
+          Q = 1. - E
+          IF (S<=SM) E = ZERO
+!         Update residual.
+          DO I = 1, N
+            R(I) = R(I)*E*W(I,1)
+          END DO
+          IF (S<=SM) GOTO 180
+          EM = E*E1
+!         Sweep through matrix to update residual vector.
+          DO 110 K = 1, NA
+!           IF (A(K) == ZERO) GOTO 152
+            IF (ABS(A(K))<=ZERO) GOTO 110
+            I = IRN(K)
+            J = ICN(K)
+            R(I) = R(I) + C(J)
+110       END DO
+          S1 = S
+          S = ZERO
+          DO I = 1, N
+            V = -R(I)/Q
+            R(I) = V/W(I,1)
+            S = S + V*R(I)
+          END DO
+          E1 = E
+          E = Q*S/S1
+          Q1 = Q
+          Q = 1. - E
+!         Special fixup for last iteration.
+          IF (S<=SM) Q = 1.
+!         Update colulm scaling powers.
+          QM = Q*Q1
+          DO I = 1, N
+            W(I,4) = (EM*W(I,4)+C(I))/QM
+            W(I,3) = W(I,3) + W(I,4)
+          END DO
+          IF (S<=SM) GOTO 160
+!         Update residual.
+          DO I = 1, N
+            C(I) = C(I)*E*W(I,2)
+          END DO
+        END DO
+160     DO I = 1, N
+          R(I) = R(I)*W(I,1)
+        END DO
+
+!       Sweep through matrix to prepare to get row scaling powers.
+180     DO 190 K = 1, NA
+!         IF (A(K) == ZERO) GOTO 200
+          IF (ABS(A(K))<=ZERO) GOTO 190
+          I = IRN(K)
+          J = ICN(K)
+          R(I) = R(I) + W(J,3)
+190     END DO
+
+!       Final conversion to output values.
+        DO I = 1, N
+          R(I) = R(I)/W(I,1) - W(I,5)
+          C(I) = -W(I,3)
+        END DO
+        GOTO 220
+210     IF (LP>0) WRITE (LP,90001) IFAIL
+90001   FORMAT (' Error return ',I2,' from MC19')
+220     RETURN
+      END SUBROUTINE MC19AD
+! End of  MA28 subroutines.
+!_______________________________________________________________________
+! Beginning of JACSP routines.
+! Change Record:
+! ST 09-01-05
+!   Convert to F90 using Metcalf converter
+!   Trim trailing blanks using trimem.pl
+!   Convert arithmetic operators to F90
+!   Replace R1MACH by EPSILON
+!   Run through nag tools suite
+! ST 09-17-05
+!   Delete RDUM and IDUM
+!   Change FCN argument list
+! ST 09-18-05
+!   Add subroutine DGROUPDS to define the IGP and JGP arrays for JACSP
+! ST 09-20-05
+!   Modify JACSP to produce JACSPDB for sparse, dense, and
+!   banded Jacobians
+!_______________________________________________________________________
+
+    SUBROUTINE JACSP(FCN,N,T,Y,F,FJAC,NRFJAC,YSCALE,FAC,IOPT,WK, &
+      LWK,IWK,LIWK,MAXGRP,NGRP,JPNTR,INDROW)
+
+! BEGIN PROLOGUE JACSP
+! DATE WRITTEN 850415
+! CATEGORY NO. D4
+! KEYWORDS NUMERICAL DIFFERENCING, SPARSE JACOBIANS
+! AUTHOR SALANE, DOUGLAS E., SANDIA NATIONAL LABORATORIES
+!        NUMERICAL MATHEMATICS DIVISION,1642
+!        ALBUQUERQUE, NM 87185
+
+! SUBROUTINE JACSP USES FINITE DIFFERENCES TO COMPUTE THE JACOBIAN OF
+! A SPARSE SYSTEM OF N EQUATIONS AND N UNKNOWNS. JACSP IS DESIGNED FOR
+! USE IN NUMERICAL METHODS FOR SOLVING NONLINEAR PROBLEMS WHERE THE
+! JACOBIAN IS EVALUATED REPEATEDLY AND OFTEN AT NEIGHBORING ARGUMENTS
+! (E.G., NEWTON'S METHOD OR A BDF METHOD FOR SOVING STIFF ORDINARY
+! DIFFERENTIAL EQUATIONS). JACSP IS INTENDED FOR APPLICATIONS IN WHICH
+! THE REQUIRED JACOBIANS ARE LARGE AND SPARSE.
+
+! TAKING ADVANTAGE OF SPARSITY.
+
+! SUBROUTINE JACSP TAKES ADVANTAGE OF THE SPARSITY OF A MATRIX TO REDUCE
+! THE NUMBER OF FUNCTION EVALUATIONS REQUIRED TO COMPUTE THE JACOBIAN.
+! TO REALIZE THIS ADVANTAGE, THE USER MUST PROVIDE JACSP WITH A COLUMN
+! GROUPING. THIS MEANS THE USER MUST ASSIGN COLUMNS OF THE JACOBIAN TO
+! MUTUALLY EXCLUSIVE GROUPS BASED ON THE SPARSITY OF THE COLUMNS.THE
+! DIFFERENCES REQUIRED TO COMPUTE THE NONZERO ELEMENTS IN ALL COLUMNS IN
+! A GROUP ARE FORMED USING ONLY ONE ADDITIONAL FUNCTION EVALUATION. FOR
+! MORE DETAILS, THE USER IS REFERRED TO THE REPORT BY D.E. SALANE AND
+! L.F. SHAMPINE (REF. 1).
+
+! THE SUBROUTINE DVDSM (REF 2.) IS THE WAY MOST USERS WILL DETERMINE A
+! COLUMN GROUPING FOR JACSP. THE USE OF DSM AND JACSP IS DESCRIBED
+! LATER IN THE PROLOGUE.
+
+! STORAGE.
+
+! JACSP REQUIRES THE USER TO PROVIDE A SPARSE DATA STRUCTURE FOR THE
+! JACOBIAN TO BE COMPUTED. JACSP REQUIRES THE USER TO SPECIFY THE
+! INDICES OF THE NONZERO ELEMENTS IN A COLUMN PACKED SPARSE DATA
+! STRUCTURE (SEE REF.1). THE SUBROUTINE DVDSM( REF 2.) CAN BE USED TO
+! ESTABLISH THE SPARSE DATA STRUCTURE REQUIRED BY JACSP. THE USE OF
+! JACSP AND DSM IS DESCRIBED LATER IN THE PROLOGUE.
+
+! ON OUTPUT, SUBROUTINE JACSP WILL RETURN THE JACOBIAN IN ANY ONE OF
+! THE FOLLOWING THREE FORMATS SPECIFIED BY THE USER.
+
+! (1) FULL STORAGE FORMAT.......THE COMPUTED JACOBIAN IS STORED IN
+!      AN ARRAY WHOSE ROW AND COLUMN DIMENSIONS ARE THE NUMBER OF
+!      EQUATIONS.
+
+! (2) BANDED STORAGE FORMAT.....THE COMPUTED MATRIX IS STORED IN A TWO
+!      DIMENSIONAL ARRAY WHOSE ROW DIMENSION IS
+!      2*(NUMBER OF LOWER DIAGONALS) + (THE NUMBER OF UPPER DIAGONALS)
+!      + 1. THE COLUMN DIMENSION OF THIS ARRAY IS THE NUMBER OF
+!      EQUATIONS. THIS STORAGE FORMAT IS COMPATIBLE WITH THE LINPACK
+!      GENERAL BAND MATRIX EQUATION SOLVER.
+
+! (3) SPARSE STORAGE FORMAT.....THE COMPUTED JACOBIAN IS STORED IN A
+!      ONE DIMENSIONAL ARRAY WHOSE LENGTH IS THE NUMBER OF NONZERO
+!      ELEMENTS IN THE JACOBIAN.
+
+! DESCRIPTION
+
+!  SUBROUTINE PARAMETERS
+
+!  FCN()......A USER-PROVIDED FUNCTION (SEE SUBROUTINE DESCRIPTION).
+!  N..........THE NUMBER OF EQUATIONS.
+!  T..........A SCALAR VARIABLE. T IS PROVIDED SO USERS CAN PASS THE
+!             VALUE OF AN INDEPENDENT VARIALBE TO THE FUNCTION
+!             EVALUATION ROUTINE.
+!  Y(*).......AN ARRAY OF DIMENSION N. THE POINT AT WHICH THE
+!             JACOBIAN IS TO BE EVALUATED.
+!  F(*).......AN ARRAY OF DIMENSION N. THE EQUATIONS EVALUATED AT
+!             THE POINT Y.
+!  FJAC(*,*)..AN ARRAY OF WHOSE DIMENSIONS DEPEND ON THE STORAGE
+!      FORMAT SELECTED BY THE USER. THE ROW AND COLUMN DIMENSIONS ARE
+!      SET BY THE USER. IF THE SPARSE MATRIX FORMAT IS SELECTED, FJAC
+!      SHOULD BE TREATED AS A ONE DIMENSIONAL ARRAY BY THE CALLING
+!      PROGRAM. FOR FURTHER DETAILS, SEE THE DESCRIPTION OF THE
+!      PARAMETER IOPT(1) WHICH CONTROLS THE STORAGE FORMAT.
+
+!      NOTE THAT IF THE BANDED OR FULL OPTION IS USED,THE USER SHOULD
+!      ZERO OUT THOSE POSITIONS OF FJAC THAT WILL NOT BE ACCESSED BY
+!      JACSP. JACSP DOES NOT ZERO OUT THE MATRIX FJAC BEFORE
+!      COMPUTING THE JACOBIAN. POSITIONS OF FJAC THAT ARE NOT ASSIGNED
+!      VALUES BY JACSP WILL BE THE SAME ON EXIT AS ON ENTRY TO JACSP.
+
+!  NRFJAC.....THE NUMBER OF ROWS IN FJAC AND THE LEADING DIMENSION
+!             OF FJAC (SEE IOPT(1)).
+!  NCFJAC.....THE NUMBER OF COLUMNS IN FJAC AND THE COLUMN DIMENSION
+!             OF FJAC (SEE IOPT(1)).
+!  YSCALE(*)..AN ARRAY OF DIMENSION N. YSCALE(I) CONTAINS A
+!     REPRESENTATIVE MAGNITUDE FOR Y(I). YSCALE(I) MUST BE POSITIVE.
+!     YSCALE IS AN OPTIONAL FEATURE OF THE ROUTINE. IF THE USER DOES
+!     NOT WISH TO PROVIDE YSCALE, IT CAN BE TREATED AS A DUMMY SCALAR
+!     VARIABLE (SEE IOPT(3)).
+
+!  FAC(*).....AN ARRAY OF DIMENSION N. FAC CONTAINS A PERCENTAGE FOR
+!     USE IN COMPUTING THE INCREMENT.
+
+!     THE NORMAL WAY TO USE THE CODE IS TO LET JACSP ADJUST FAC VALUES.
+!     IN THIS CASE FAC IS INITIALIZED BY JACSP. ALSO, THE USER MUST
+!     NOT ALTER FAC VALUES BETWEEN CALLS TO JACSP.
+
+!     THE USER MAY PROVIDE FAC VALUES IF DESIRED (SEE IOPT(4) FOR
+!     DETAILS). IF THE USER PROVIDES FAC VALUES, FAC(I) SHOULD BE
+!     SHOULD BE SET TO A VALUE BETWEEN O AND 1. JACSP WILL NOT PERMIT
+!     FAC(I) TO BE SET TO A VALUE THAT RESULTS IN TOO SMALL AN
+!     INCREMENT. JACSP ENSURES THAT
+!                     FACMIN <= FAC(I) <= FACMAX.
+!     FOR FURTHER DETAILS ON FACMIN AND FACMAX SEE
+!     THE REPORT(REF.3).
+
+!  IOPT(*)....AN INTEGER ARRAY OF LENGTH 5 FOR USER SELECTED OPTIONS.
+
+!          IOPT(1) CONTROLS THE STORAGE FORMAT.
+
+!             IOPT(1) = 0 INDICATES FULL STORAGE FORMAT. SET BOTH
+!             NRFJAC = N AMD NCFJAC = N.
+
+!             IOPT(1) = 1 INDICATES BANDED STORAGE FORMAT. SET
+!             NRFJAC = 2 * ML + MU + 1 WHERE
+!             ML = NUMBER OF SUB-DIAGONALS BELOW THE MAIN DIAGONAL AND
+!             MU = NUMBER OF SUPER-DIAGONALS ABOVE THE MAIN DIAGONAL.
+!             SET NCFJAC = N.
+
+!             IOPT(1) = 2 INDICATES SPARSE STORAGE FORMAT. SET
+!             NRFJAC = TO THE NUMBER OF NONZEROS IN THE JACOBIAN AND
+!             SET NCFJAC = 1.
+
+!          IOPT(2) MUST BE SET TO THE BANDWIDTH OF THE MATRIX.
+!          IOPT(2) NEED ONLY BE PROVIDED IF BANDED STORAGE
+!          FORMAT IS REQUESTED(I.E., IOPT(1) = 1).
+
+!          IOPT(3) ALLOWS THE USER TO PROVIDE TYPICAL VALUES
+!          TO BE USED IN COMPUTING INCREMENTS FOR DIFFERENCING.
+
+!             IOPT(3) = 0 INDICATES Y VALUES ARE USED IN COMPUTING
+!             INCREMENTS. IF IOPT(3) = 0, NO STORAGE IS REQUIRED FOR
+!             YSCALE AND IT MAY BE TREATED AS A DUMMY VARIABLE.
+
+!             IOPT(3) = 1 INDICATES THAT YSCALE VALUES ARE TO BE USED.
+!             IF IOPT(3) = 1, THE USER MUST PROVIDE AN ARRAY OF NONZERO
+!             VALUES IN YSCALE.
+
+!          IOPT(4) ALLOWS THE USER TO PROVIDE THE VALUES USED
+!          IN THE FAC ARRAY TO COMPUTE INCREMENTS FOR DIFFERENCING.
+
+!             IF IOPT(4) = 0, EACH COMPONENT OF FAC IS
+!             SET TO THE SQUARE ROOT OF MACHINE UNIT ROUNDOFF ON THE
+!             FIRST CALL TO JACSP. IOPT(4) IS SET TO ONE ON RETURN.
+
+!             IF IOPT(4) = 1, EACH COMPONENT OF FAC MUST BE SET
+!             BY THE CALLING ROUTINE. UNLESS THE USER WISHES TO
+!             INITIALIZE FAC, THE FAC ARRAY SHOULD NOT BE ALTERED
+!             BETWEEN SUBSEQUENT CALLS TO JACSP. ALSO, THE USER
+!             SHOULD NOT CHANGE THE VALUE OF IOPT(4) RETURNED BY
+!             JACSP.
+
+!          IOPT(5) IS NOT USED IN JACSP.
+
+!  WK(*)......A WORK ARRAY OF DIMENSION AT LEAST 3*N
+!  LWK........THE LENGTH OF THE WORK ARRAY. LWK IS AT LEAST 3*N.
+!  IWK(*)...AN INTEGER ARRAY OF LENGTH LIWK = 50 + N WHICH GIVES
+!      DIAGNOSTIC INFORMATION IN POSITIONS 1 THROUGH 50. POSITIONS 51
+!      THROUGH 50 + N ARE USED AS INTEGER WORKSPACE.
+
+!      IWK(1) GIVES THE NUMBER OF TIMES THE INCREMENT FOR DIFFERENCING
+!      (DEL) WAS COMPUTED AND HAD TO BE INCREASED BECAUSE (Y(JCOL)+DEL)
+!      -Y(JCOL)) WAS TOO SMALL RELATIVE TO Y(JCOL) OR YSCALE(JCOL).
+
+!      IWK(2) GIVES THE NUMBER OF COLUMNS IN WHICH THREE ATTEMPTS WERE
+!      MADE TO INCREASE A PERCENTAGE FACTOR FOR DIFFERENCING (I.E., A
+!      COMPONENT IN THE FAC ARRAY) BUT THE COMPUTED DEL REMAINED
+!      UNACCEPTABLY SMALL RELATIVE TO Y(JCOL) OR YSCALE(JCOL). IN SUCH
+!      CASES THE PERCENTAGE FACTOR IS SET TO THE SQUARE ROOT OF THE UNIT
+!      ROUNDOFF OF THE MACHINE. THE FIRST 10 COLUMNS ARE GIVEN IN
+!      IWK(21),...,IWK(30).
+
+!      IWK(3) GIVES THE NUMBER OF COLUMNS IN WHICH THE COMPUTED DEL WAS
+!      ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) OR YSCALE(JCOL) WAS
+!      ZERO. IN SUCH CASES DEL IS SET TO THE SQUARE ROOT OF THE UNIT
+!      ROUNDOFF.
+
+!      IWK(4) GIVES THE NUMBER OF COLUMNS WHICH HAD TO BE RECOMPUTED
+!      BECAUSE THE LARGEST DIFFERENCE FORMED IN THE COLUMN WAS VERY
+!      CLOSE TO ZERO RELATIVE TO SCALE WHERE
+
+!                    SCALE = MAX(F(Y),F(Y+DEL))
+!                                 I     I
+
+!      AND I DENOTES THE ROW INDEX OF THE LARGEST DIFFERENCE IN THE
+!      COLUMN CURRENTLY BEING PROCESSED. IWK(31),...,IWK(40) GIVES THE
+!      FIRST 10 OF THESE COLUMNS.
+
+!      IWK(5) GIVES THE NUMBER OF COLUMNS WHOSE LARGEST DIFFERENCE IS
+!      CLOSE TO ZERO RELATIVE TO SCALE AFTER THE COLUMN HAS BEEN
+!      RECOMPUTED. THE FIRST 10 OF THESE COLUMNS ARE GIVEN IN POSITIONS
+!      IWK(41)...IWK(50).
+!      IWK(6) GIVES THE NUMBER OF TIMES SCALE INFORMATION WAS NOT
+!      AVAILABLE FOR USE IN THE ROUNDOFF AND TRUNCATION ERROR TESTS.
+!      THIS OCCURS WHEN
+!                    MIN(F(Y),F(Y+DEL)) = 0.
+!                          I     I
+!      WHERE I IS THE INDEX OF THE LARGEST DIFFERENCE FOR THE COLUMN
+!      CURRENTLY BEING PROCESSED.
+!      IWK(7) GIVES THE NUMBER OF TIMES THE FUNCTION EVALUATION ROUTINE
+!      WAS CALLED.
+!      IWK(8) GIVES THE NUMBER OF TIMES A COMPONENT OF THE FAC ARRAY WAS
+!      REDUCED BECAUSE CHANGES IN FUNCTION VALUES WERE LARGE AND EXCESS
+!      TRUNCATION ERROR WAS SUSPECTED. IWK(11),...,IWK(20) GIVES THE FIRST
+!      10 OF THESE COLUMNS.
+!      IWK(9) AND IWK(10) ARE NOT USED IN JACSP.
+!  LIWK.....THE LENGTH OF THE ARRAY IWK. LIWK = 50 + N.
+!      THE FOLLOWING PARAMETERS MAY BE PROVIDED BY THE USER OR
+!      INITIALIZED BY THE SUBROUTINE DVDSM (SEE LONG DESCRIPTION
+!      SECTION OF THE PROLOGUE).
+!  PARAMETERS CONTAINING COLUMN GROUPING:
+!  MAXGRP.....THE NUMBER OF DIFFERENT GROUPS TO WHICH THE COLUMNS
+!             HAVE BEEN ASSIGNED.
+!  NGRP(*)....AN ARRAY OF LENGTH N THAT CONTAINS THE COLUMN GROUPING.
+!             NGRP(I) IS THE GROUP TO WHICH THE I-TH COLUMN HAS BEEN
+!             ASSIGNED.
+!             (SEE USE OF DSM AND JACSP FOR DETERMINING MAXGRP AND NGRP)
+!  PARAMETERS CONTAINING THE SPARSE DATA STRUCTURE:
+!  JPNTR(*)...AN ARRAY OF LENGTH N+1 THAT CONTAINS POINTERS TO
+!             THE ROW INDICES IN INDROW (SEE INDROW).
+!  INDROW(*)..AN ARRAY WHOSE LENGTH IS THE NUMBER OF NONZERO ELEMENTS
+!             IN THE JACOBIAN. INDROW CONTAINS THE ROW INDICES
+!             STORED IN COLUMN PACKED FORMAT. IN OTHER WORDS, THE
+!             ROW INDICES OF THE NONZERO ELEMENTS OF A GIVEN
+!             COLUMN OF THE JACOBIAN ARE STORED CONTIGUOUSLY IN
+!             INDROW. JPNTR(JCOL) POINTS TO THE ROW INDEX OF THE FIRST
+!             NONZERO ELEMENT IN THE COLUMN JCOL. JPNTR(JCOL+1) - 1
+!             POINTS TO THE ROW INDEX OF THE LAST NONZERO ELEMENT IN
+!             THE COLUMN JCOL.
+!             (SEE USE OF DSM AND JACSP FOR DETERMINING INDROW AND JPNTR)
+!  REQUIRED SUBROUTINES: SUBROUTINE FCN(N,T,Y,F)
+!     T......AN INDEPENDENT SCALAR VARIABLE WHICH MAY BE USED
+!           IN EVALUATING F(E.G., F(Y(T),T)).
+!     Y(*)...AN ARRAY OF DIMENSION N WHICH CONTAINS THE POINT AT
+!            WHICH THE EQUATIONS ARE TO BE EVALUATED.
+!     F(*)...AN ARRAY OF DIMENSION N WHICH ON RETURN FROM FCN
+!            CONTAINS THE EQUATIONS EVALUATED AT Y.
+
+! LONG DESCRIPTION
+
+! ROUNDOFF AND TRUNCATION ERRORS.
+! SUBROUTINE JACSP TAKES ADVANTAGE OF THE WAY IN WHICH THE JACOBIAN
+! IS EVALUATED TO ADJUST INCREMENTS FOR DIFFERENCING TO CONTROL
+! ROUNDOFF AND TRUNCATION ERRORS. THE ROUTINE SELDOM REQUIRES MORE
+! THAN ONE ADDITIONAL FUNCTION EVALUATION TO COMPUTE A COLUMN OF THE
+! JACOBIAN. ALSO, THE ROUTINE RETURNS A VARIETY OF ERROR DIAGNOSTICS
+! TO WARN USERS WHEN COMPUTED DERIVATIVES MAY NOT BE ACCURATE.
+! WARNING: JACSP CAN NOT GUARANTEE THE ACCURACY OF THE COMPUTED
+! DERIVATIVES. IN ORDER O SAVE ON FUNCTION EVALUATIONS, HEURISTIC
+! TECNIQUES FOR INCREMENT ADJUSTMENT AND SAFEGUARDING INCREMENTS ARE
+! USED. THESE USUALLY WORK WELL.
+
+! WARNING: SOME OF THE DIAGNOSTICS RETURNED CAN ONLY BE INTERPRETED
+! WITH A DETAILED KNOWLEDGE OF THE ROUTINE. NEVERTHELESS, THEY ARE
+! PROVIDED TO GIVE USERS FULL ACCESS TO THE INFORMATION PRODUCED BY
+! THE SUBROUTINE.
+! USE OF DSM AND JACSP.
+! SUBROUTINE DVDSM CAN BE USED TO DETERMINE THE COLUMN GROUPING (MAXGRP
+! AND NGRP(*)) AND THE SPARSE DATA STRUCTURE VARIABLES (JPNTR(*) AND
+! INDROW(*)). THE USER CAN CALL DVDSM ONCE TO INITIALIZE
+! MAXGRP,NGRP,JPNTR AND INDROW. JACSP MAY THEN BE CALLED REPEATEDLY TO
+! EVALUATE THE JACOBIAN. THE FOLLOWING ARE THE IMPORTANT VARIABLES IN
+! THE DSM CALLING SEQUENCE.
+! SUBROUTINE DVDSM(...,INDROW,INDCOL,NGRP,MAXGRP,..,JPNTR,...)
+! ON INPUT, THE USER MUST PROVIDE DSM WITH THE INTEGER ARRAYS INDROW AND
+! INDCOL. THE PAIR
+!                  (INDROW(I),INDCOL(I))
+! PROVIDES THE INDEX OF A NONZERO ELEMENT OF THE JACOBIAN. THE LENGTH OF
+! INDROW AND INDCOL IS THE NUMBER OF NONZERO ELEMENTS IN THE JACOBIAN.
+! NO ORDERING OF THE INDICES FOR NONZERO ELEMENTS IS REQUIRED IN THE
+! ARRAYS INDROW AND INDCOL.
+! ON RETURN FROM DSM, MAXGRP,NGRP,INDROW,JPNTR ARE INITIALIZED
+! FOR INPUT TO JACSP. THE USER MUST NOT CHANGE MAXGRP,NGRP,JPNTR OR
+! INDROW AFTER CALLING DSM.
+! WE REFER THE READER TO THE IN CODE DOCUMENTATION FOR DSM OR THE REPORT
+! BY MORE AND COLEMAN (REF 2.) FOR FURTHER DETAILS.
+! REFERENCES
+!  (1) D.E. SALANE AND L. F. SHAMPINE
+!      "AN ECONOMICAL AND EFFICIENT ROUTINE FOR COMPUTING
+!      SPARSE JACOBIANS", REPORT NO. SAND85-0977, SANDIA NATIONAL
+!      LABORATORIES, ALBUQUERQUE,NM,87185.
+!  (2) T.F. COLEMAN AND J.J. MORE
+!      "SOFTWARE FOR ESTIMATING SPARSE JACOBIAN MATRICES" ACM TOMS,
+!      V10.,N0.3,SEPT. 1984.
+!  (3) D.E. SALANE AND L. F. SHAMPINE
+!      "THREE ADAPTIVE ROUTINES FOR FORMING JACOBIANS NUMERICALLY,"
+!       REPORT NO. SAND86- ****, SANDIA NATIONAL LABORATORIES,
+!       ALBUQUERQUE, NM, 87185.
+!  REQUIRED FORTRAN INTRINSIC FUNCTIONS: MAX,MIN,ABS,SIGN
+!  MACHINE DEPENDENT CONSTANT: U (MACHINE UNIT ROUNDOFF)
+!  JACSP SETS THE REQUIRED MACHINE CONSTANT USING THE F90
+!  INTRINSIC EPSILON.
+!  END PROLOGUE JACSP
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      KPP_REAL :: T
+      INTEGER :: LIWK, LWK, MAXGRP, N, NRFJAC
+! ..
+! .. Array Arguments ..
+      KPP_REAL :: F(N), FAC(N), FJAC(NRFJAC,*), WK(LWK), Y(N), YSCALE(*)
+      INTEGER :: INDROW(*), IOPT(5), IWK(LIWK), JPNTR(*), NGRP(N)
+! ..
+! .. Subroutine Arguments ..
+      EXTERNAL FCN
+! ..
+! .. Local Scalars ..
+      KPP_REAL :: ADIFF, AY, DEL, DELM, DFMJ, DIFF, DMAX, EXPFMN, FACMAX, &
+        FACMIN, FJACL, FMJ, ONE, P125, P25, P75, P875, PERT, RDEL, RMNFDF, &
+        RMXFDF, SDF, SF, SGN, T1, T2, U, U3QRT, U7EGT, UEGT, UMEGT, UQRT, &
+        USQT, ZERO
+      INTEGER :: IDXL, IDXU, IFLAG1, IFLAG2, IRCMP, IRDEL, IROW, IROWB, &
+        IROWMX, ITRY, J, JCOL, KT1, KT2, KT3, KT4, KT5, L, NID1, NID2, NID3, &
+        NID4, NID5, NID6, NIFAC, NT2, NUMGRP
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC ABS, EPSILON, KIND, MAX, MIN, SIGN, SQRT
+      INTRINSIC ABS, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! .. Data Statements ..
+      DATA PERT/2.0E+0_dp/, FACMAX/1.E-1_dp/, EXPFMN/.75E+0_dp/
+      DATA ONE/1.0E0_dp/, ZERO/0.0E0_dp/
+      DATA P125/.125E+0_dp/, P25/.25E+0_dp/, P75/.75E+0_dp/, P875/.875E+0_dp/
+      DATA NIFAC/3/, NID1/10/, NID2/20/, NID3/30/, NID4/40/, NID5/50/
+! ..
+!     COMPUTE ALGORITHM AND MACHINE CONSTANTS.
+! ..
+! ..  FIRST EXECUTABLE STATEMENT JACSP
+! ..
+      U = EPSILON(ONE)
+      USQT = SQRT(U)
+      UEGT = U**P125
+      UMEGT = ONE/UEGT
+      UQRT = U**P25
+      U3QRT = U**P75
+      U7EGT = U**P875
+      FACMIN = U**EXPFMN
+
+      IF (IOPT(4) == 0) THEN
+        IOPT(4) = 1
+        DO 10 J = 1, N
+          FAC(J) = USQT
+10      CONTINUE
+      END IF
+      DO 20 J = 1, 50
+        IWK(J) = 0
+20    CONTINUE
+      KT1 = NID1
+      KT2 = NID2
+      KT3 = NID3
+      KT4 = NID4
+      KT5 = NID5
+      NID6 = LIWK
+      NT2 = 2*N
+      DO NUMGRP = 1, MAXGRP
+!       COMPUTE AND SAVE THE INCREMENTS FOR THE COLUMNS IN GROUP NUMGRP.
+        IRCMP = 0
+        ITRY = 0
+        DO 30 J = NID5 + 1, NID6
+          IWK(J) = 0
+30      CONTINUE
+40      CONTINUE
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            WK(N+JCOL) = Y(JCOL)
+!           COMPUTE DEL. IF DEL IS TOO SMALL INCREASE FAC(JCOL) AND RECOMPUTE
+!           DEL. NIFAC ATTEMPTS ARE MADE TO INCREASE FAC(JCOL) AND FIND AN
+!           APPROPRIATE DEL. IF DEL CANT BE FOUND IN THIS MANNER, DEL IS COMPUTED
+!           WITH FAC(JCOL) SET TO THE SQUARE ROOT OF THE MACHINE PRECISION (USQT).
+!           IF DEL IS ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) IS ZERO OR
+!           YSCALE(JCOL) IS ZERO, DEL IS SET TO USQT.
+            SGN = SIGN(ONE,F(JCOL))
+            IRDEL = 0
+            IF (IOPT(3) == 1) THEN
+              AY = ABS(YSCALE(JCOL))
+            ELSE
+              AY = ABS(Y(JCOL))
+            END IF
+            DELM = U7EGT*AY
+
+            DO 50 J = 1, NIFAC
+              DEL = FAC(JCOL)*AY*SGN
+!             IF (DEL == ZERO) THEN
+              IF (ABS(DEL) <= ZERO) THEN
+
+                DEL = USQT*SGN
+                IF (ITRY == 0) IWK(3) = IWK(3) + 1
+              END IF
+              T1 = Y(JCOL) + DEL
+              DEL = T1 - Y(JCOL)
+              IF (ABS(DEL) < DELM) THEN
+                IF (J >= NIFAC) GOTO 50
+                IF (IRDEL == 0) THEN
+                  IRDEL = 1
+                  IWK(1) = IWK(1) + 1
+                END IF
+                T1 = FAC(JCOL)*UMEGT
+                FAC(JCOL) = MIN(T1,FACMAX)
+              ELSE
+                GOTO 60
+              END IF
+50          END DO
+
+            FAC(JCOL) = USQT
+            DEL = USQT*AY*SGN
+            IWK(2) = IWK(2) + 1
+            IF (KT2 < NID3) THEN
+              KT2 = KT2 + 1
+              IWK(KT2) = JCOL
+            END IF
+
+60          CONTINUE
+            WK(NT2+JCOL) = DEL
+            Y(JCOL) = Y(JCOL) + DEL
+          END IF
+        END DO
+
+        IWK(7) = IWK(7) + 1
+        CALL FCN(N,T,Y,WK)
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) Y(JCOL) = WK(N+JCOL)
+        END DO
+
+!       COMPUTE THE JACOBIAN ENTRIES FOR ALL COLUMNS IN NUMGRP.
+!       STORE ENTRIES ACCORDING TO SELECTED STORAGE FORMAT.
+!       USE LARGEST ELEMENTS IN A COLUMN TO DETERMINE SCALING
+!       INFORMATION FOR ROUNDOFF AND TRUNCATION ERROR TESTS.
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            IDXL = JPNTR(JCOL)
+            IDXU = JPNTR(JCOL+1) - 1
+            DMAX = ZERO
+            RDEL = ONE/WK(NT2+JCOL)
+            IROWMX = 1
+            DO L = IDXL, IDXU
+              IROW = INDROW(L)
+              DIFF = WK(IROW) - F(IROW)
+              ADIFF = ABS(DIFF)
+              IF (ADIFF >= DMAX) THEN
+                IROWMX = IROW
+                DMAX = ADIFF
+                SF = F(IROW)
+                SDF = WK(IROW)
+              END IF
+              FJACL = DIFF*RDEL
+              IF (ITRY == 1) WK(IROW) = FJACL
+
+              IF (IOPT(1) == 0) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROW,JCOL)
+                FJAC(IROW,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 1) THEN
+                IROWB = IROW - JCOL + IOPT(2)
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,JCOL)
+                FJAC(IROWB,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 2) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(L,1)
+                FJAC(L,1) = FJACL
+              END IF
+            END DO
+
+!           IF A COLUMN IS BEING RECOMPUTED (ITRY=1),THIS SECTION OF THE
+!           CODE PERFORMS AN EXTRAPOLATION TEST TO ENABLE THE CODE TO
+!           COMPUTE SMALL DERIVATIVES MORE ACCURATELY. THIS TEST IS ONLY
+!           PERFORMED ON THOSE COLUMNS WHOSE LARGEST DIFFERENCE IS CLOSE
+!           TO ZERO RELATIVE TO SCALE.
+            IF (ITRY == 1) THEN
+              IFLAG1 = 0
+              IFLAG2 = 0
+              DO 100 J = NID5 + 1, NID6
+                IF (IWK(J) == JCOL) IFLAG1 = 1
+100           CONTINUE
+              IF (IFLAG1 == 1) THEN
+                IFLAG1 = 0
+                T1 = WK(IROWMX+N)
+                T2 = WK(IROWMX)*FAC(JCOL)
+                IF (ABS(T2) < ABS(T1)*PERT) IFLAG2 = 1
+              END IF
+
+              IF (IFLAG2 == 1) THEN
+                IFLAG2 = 0
+                T1 = FAC(JCOL)*FAC(JCOL)
+                FAC(JCOL) = MAX(T1,FACMIN)
+                DO L = IDXL, IDXU
+                  IROW = INDROW(L)
+                  FJACL = WK(IROW+N)
+                  IF (IOPT(1) == 0) FJAC(IROW,JCOL) = FJACL
+                  IF (IOPT(1) == 1) THEN
+                    IROWB = IROW - JCOL + IOPT(2)
+                    FJAC(IROWB,JCOL) = FJACL
+                  END IF
+                  IF (IOPT(1) == 2) FJAC(L,1) = FJACL
+                END DO
+              END IF
+            END IF
+
+            FMJ = ABS(SF)
+            DFMJ = ABS(SDF)
+            RMXFDF = MAX(FMJ,DFMJ)
+            RMNFDF = MIN(FMJ,DFMJ)
+
+!           IF SCALE INFORMATION IS NOT AVAILABLE, PERFORM NO ROUNDOFF
+!           OR TRUNCATION ERROR TESTS. IF THE EXTRAPOLATION TEST HAS
+!           CAUSED FAC(JCOL) TO BE RESET TO ITS PREVIOUS VALUE (IAJAC=1)
+!           THEN NO FURTHER ROUNDOFF OR TRUNCATION ERROR TESTS ARE
+!           PERFORMED.
+!           IF (RMNFDF/=ZERO) THEN
+            IF (ABS(RMNFDF) > ZERO) THEN
+!             TEST FOR POSSIBLE ROUNDOFF ERROR (FIRST TEST)
+!             AND ALSO FOR POSSIBLE SERIOUS ROUNDOFF ERROR (SECOND TEST).
+              IF (DMAX <= (U3QRT*RMXFDF)) THEN
+                IF (DMAX <= (U7EGT*RMXFDF)) THEN
+                  IF (ITRY == 0) THEN
+                    T1 = SQRT(FAC(JCOL))
+                    FAC(JCOL) = MIN(T1,FACMAX)
+                    IRCMP = 1
+                    IF (KT5 < NID6) THEN
+                      KT5 = KT5 + 1
+                      IWK(KT5) = JCOL
+                    END IF
+                    IWK(4) = IWK(4) + 1
+                    IF (KT3 < NID4) THEN
+                      KT3 = KT3 + 1
+                      IWK(KT3) = JCOL
+                    END IF
+                  ELSE
+                    IWK(5) = IWK(5) + 1
+                    IF (KT4 < NID5) THEN
+                      KT4 = KT4 + 1
+                      IWK(KT4) = JCOL
+                    END IF
+                  END IF
+                ELSE
+                  T1 = UMEGT*FAC(JCOL)
+                  FAC(JCOL) = MIN(T1,FACMAX)
+                END IF
+              END IF
+!             TEST FOR POSSIBLE TRUNCATION ERROR.
+              IF (DMAX > UQRT*RMXFDF) THEN
+                T1 = FAC(JCOL)*UEGT
+                FAC(JCOL) = MAX(T1,FACMIN)
+                IWK(8) = IWK(8) + 1
+                IF (KT1 < NID2) THEN
+                  KT1 = KT1 + 1
+                  IWK(KT1) = JCOL
+                END IF
+              END IF
+            ELSE
+              IWK(6) = IWK(6) + 1
+            END IF
+          END IF
+        END DO
+
+!       IF SERIOUS ROUNDOFF ERROR IS SUSPECTED, RECOMPUTE ALL
+!       COLUMNS IN GROUP NUMGRP.
+        IF (IRCMP == 1) THEN
+          IRCMP = 0
+          ITRY = 1
+          GOTO 40
+        END IF
+        ITRY = 0
+      END DO
+      RETURN
+
+    END SUBROUTINE JACSP
+!_______________________________________________________________________
+
+    SUBROUTINE DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,IWA)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A,
+!     THIS SUBROUTINE DETERMINES THE DEGREE SEQUENCE FOR
+!     THE INTERSECTION GRAPH OF THE COLUMNS OF A.
+!     IN GRAPH-THEORY TERMINOLOGY, THE INTERSECTION GRAPH OF
+!     THE COLUMNS OF A IS THE LOOPLESS GRAPH G WITH VERTICES
+!     A(J), J = 1,2,...,N WHERE A(J) IS THE J-TH COLUMN OF A
+!     AND WITH EDGE (A(I),A(J)) IF AND ONLY IF COLUMNS I AND J
+!     HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY DEGR AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH
+!         SPECIFIES THE DEGREE SEQUENCE. THE DEGREE OF THE
+!         J-TH COLUMN OF A IS NDEG(J).
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA(N), JPNTR(N+1), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT DEGR
+! ..
+!     INITIALIZATION BLOCK.
+      NDEG(1:N) = 0
+      IWA(1:N) = 0
+
+!     COMPUTE THE DEGREE SEQUENCE BY DETERMINING THE CONTRIBUTIONS
+!     TO THE DEGREES FROM THE CURRENT (JCOL) COLUMN AND FURTHER
+!     COLUMNS WHICH HAVE NOT YET BEEN CONSIDERED.
+      DO JCOL = 2, N
+        IWA(JCOL) = N
+!       DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!       TO NON-ZEROES IN THE MATRIX.
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+!         FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!         WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+          DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+            IC = INDCOL(IP)
+!           ARRAY IWA MARKS COLUMNS WHICH HAVE CONTRIBUTED TO
+!           THE DEGREE COUNT OF COLUMN JCOL. UPDATE THE DEGREE
+!           COUNTS OF THESE COLUMNS AS WELL AS COLUMN JCOL.
+            IF (IWA(IC) < JCOL) THEN
+              IWA(IC) = JCOL
+              NDEG(IC) = NDEG(IC) + 1
+              NDEG(JCOL) = NDEG(JCOL) + 1
+            END IF
+          END DO
+        END DO
+      END DO
+      RETURN
+
+    END SUBROUTINE DEGR
+!_______________________________________________________________________
+
+    SUBROUTINE IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,MAXCLQ, &
+      IWA1,IWA2,IWA3,IWA4)
+
+!     SUBROUTINE IDO
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES AN INCIDENCE-DEGREE ORDERING OF THE
+!     COLUMNS OF A.
+!     THE INCIDENCE-DEGREE ORDERING IS DEFINED FOR THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE (A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     THE INCIDENCE-DEGREE ORDERING IS DETERMINED RECURSIVELY BY
+!     LETTING LIST(K), K = 1,...,N BE A COLUMN WITH MAXIMAL
+!     INCIDENCE TO THE SUBGRAPH SPANNED BY THE ORDERED COLUMNS.
+!     AMONG ALL THE COLUMNS OF MAXIMAL INCIDENCE, IDO CHOOSES A
+!     COLUMN OF MAXIMAL DEGREE.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,
+!                      MAXCLQ,IWA1,IWA2,IWA3,IWA4)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE DEGREE SEQUENCE. THE DEGREE OF THE J-TH COLUMN
+!         OF A IS NDEG(J).
+!       LIST IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE INCIDENCE-DEGREE ORDERING OF THE COLUMNS OF A. THE J-TH
+!         COLUMN IN THIS ORDER IS LIST(J).
+!       MAXCLQ IS AN INTEGER OUTPUT VARIABLE SET TO THE SIZE
+!         OF THE LARGEST CLIQUE FOUND DURING THE ORDERING.
+!       IWA1,IWA2,IWA3, AND IWA4 ARE INTEGER WORK ARRAYS OF LENGTH N.
+!     SUBPROGRAMS CALLED
+!       MINPACK-SUPPLIED ... NUMSRT
+!       INTRINSIC ... MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: M, MAXCLQ, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(M+1), IWA1(0:N-1), IWA2(N), &
+        IWA3(N), IWA4(N), JPNTR(N+1), LIST(N), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP, MAXINC, MAXLST, NCOMP, NUMINC, NUMLST, &
+        NUMORD, NUMWGT
+! ..
+! .. External Subroutines ..
+!     EXTERNAL NUMSRT
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT IDO
+! ..
+!     SORT THE DEGREE SEQUENCE.
+      CALL NUMSRT(N,N-1,NDEG,-1,IWA4,IWA2,IWA3)
+
+!     INITIALIZATION BLOCK.
+
+!     CREATE A DOUBLY-LINKED LIST TO ACCESS THE INCIDENCES OF THE
+!     COLUMNS. THE POINTERS FOR THE LINKED LIST ARE AS FOLLOWS.
+
+!     EACH UNORDERED COLUMN IC IS IN A LIST (THE INCIDENCE LIST)
+!     OF COLUMNS WITH THE SAME INCIDENCE.
+
+!     IWA1(NUMINC) IS THE FIRST COLUMN IN THE NUMINC LIST
+!     UNLESS IWA1(NUMINC) = 0. IN THIS CASE THERE ARE
+!     NO COLUMNS IN THE NUMINC LIST.
+
+!     IWA2(IC) IS THE COLUMN BEFORE IC IN THE INCIDENCE LIST
+!     UNLESS IWA2(IC) = 0. IN THIS CASE IC IS THE FIRST
+!     COLUMN IN THIS INCIDENCE LIST.
+
+!     IWA3(IC) IS THE COLUMN AFTER IC IN THE INCIDENCE LIST
+!     UNLESS IWA3(IC) = 0. IN THIS CASE IC IS THE LAST
+!     COLUMN IN THIS INCIDENCE LIST.
+
+!     IF IC IS AN UN-ORDERED COLUMN, THEN LIST(IC) IS THE
+!     INCIDENCE OF IC TO THE GRAPH INDUCED BY THE ORDERED
+!     COLUMNS. IF JCOL IS AN ORDERED COLUMN, THEN LIST(JCOL)
+!     IS THE INCIDENCE-DEGREE ORDER OF COLUMN JCOL.
+
+      MAXINC = 0
+      DO JP = N, 1, -1
+        IC = IWA4(JP)
+        IWA1(N-JP) = 0
+        IWA2(IC) = 0
+        IWA3(IC) = IWA1(0)
+        IF (IWA1(0) > 0) IWA2(IWA1(0)) = IC
+        IWA1(0) = IC
+        IWA4(JP) = 0
+        LIST(JP) = 0
+      END DO
+
+!     DETERMINE THE MAXIMAL SEARCH LENGTH FOR THE LIST
+!     OF COLUMNS OF MAXIMAL INCIDENCE.
+      MAXLST = 0
+      DO IR = 1, M
+        MAXLST = MAXLST + (IPNTR(IR+1)-IPNTR(IR))**2
+      END DO
+      MAXLST = MAXLST/N
+      MAXCLQ = 0
+      NUMORD = 1
+
+!     BEGINNING OF ITERATION LOOP.
+
+30    CONTINUE
+
+!     UPDATE THE SIZE OF THE LARGEST CLIQUE
+!     FOUND DURING THE ORDERING.
+      IF (MAXINC == 0) NCOMP = 0
+      NCOMP = NCOMP + 1
+      IF (MAXINC+1 == NCOMP) MAXCLQ = MAX(MAXCLQ,NCOMP)
+
+!     CHOOSE A COLUMN JCOL OF MAXIMAL DEGREE AMONG THE
+!     COLUMNS OF MAXIMAL INCIDENCE MAXINC.
+40    CONTINUE
+      JP = IWA1(MAXINC)
+      IF (JP > 0) GOTO 50
+      MAXINC = MAXINC - 1
+      GOTO 40
+50    CONTINUE
+      NUMWGT = -1
+      DO NUMLST = 1, MAXLST
+        IF (NDEG(JP) > NUMWGT) THEN
+          NUMWGT = NDEG(JP)
+          JCOL = JP
+        END IF
+        JP = IWA3(JP)
+        IF (JP <= 0) GOTO 70
+      END DO
+70    CONTINUE
+      LIST(JCOL) = NUMORD
+      NUMORD = NUMORD + 1
+
+!     TERMINATION TEST.
+      IF (NUMORD > N) GOTO 100
+
+!     DELETE COLUMN JCOL FROM THE MAXINC LIST.
+      IF (IWA2(JCOL) == 0) THEN
+        IWA1(MAXINC) = IWA3(JCOL)
+      ELSE
+        IWA3(IWA2(JCOL)) = IWA3(JCOL)
+      END IF
+      IF (IWA3(JCOL) > 0) IWA2(IWA3(JCOL)) = IWA2(JCOL)
+
+!     FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+      IWA4(JCOL) = N
+
+!     DETERMINE ALL POSITIONS(IR,JCOL) WHICH CORRESPOND
+!     TO NON-ZEROES IN THE MATRIX.
+      DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+        IR = INDROW(JP)
+!       FOR EACH ROW IR, DETERMINE ALL POSITIONS(IR,IC)
+!       WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+        DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+          IC = INDCOL(IP)
+!         ARRAY IWA4 MARKS COLUMNS WHICH ARE ADJACENT TO
+!         COLUMN JCOL.
+          IF (IWA4(IC) < NUMORD) THEN
+            IWA4(IC) = NUMORD
+!           UPDATE THE POINTERS TO THE CURRENT INCIDENCE LISTS.
+            NUMINC = LIST(IC)
+            LIST(IC) = LIST(IC) + 1
+            MAXINC = MAX(MAXINC,LIST(IC))
+!           DELETE COLUMN IC FROM THE NUMINC LIST.
+            IF (IWA2(IC) == 0) THEN
+              IWA1(NUMINC) = IWA3(IC)
+            ELSE
+              IWA3(IWA2(IC)) = IWA3(IC)
+            END IF
+            IF (IWA3(IC) > 0) IWA2(IWA3(IC)) = IWA2(IC)
+!           ADD COLUMN IC TO THE NUMINC+1 LIST.
+            IWA2(IC) = 0
+            IWA3(IC) = IWA1(NUMINC+1)
+            IF (IWA1(NUMINC+1) > 0) IWA2(IWA1(NUMINC+1)) = IC
+            IWA1(NUMINC+1) = IC
+          END IF
+        END DO
+      END DO
+!     END OF ITERATION LOOP.
+      GOTO 30
+100   CONTINUE
+!     INVERT THE ARRAY LIST.
+      DO JCOL = 1, N
+        IWA2(LIST(JCOL)) = JCOL
+      END DO
+      LIST(1:N) = IWA2(1:N)
+      RETURN
+
+    END SUBROUTINE IDO
+!_______________________________________________________________________
+
+    SUBROUTINE NUMSRT(N,NMAX,NUM,MODE,INDEX,LAST,NEXT)
+
+!     GIVEN A SEQUENCE OF INTEGERS, THIS SUBROUTINE GROUPS TOGETHER THOSE
+!     INDICES WITH THE SAME SEQUENCE VALUE AND, OPTIONALLY, SORTS THE
+!     SEQUENCE INTO EITHER ASCENDING OR DESCENDING ORDER. THE SEQUENCE
+!     OF INTEGERS IS DEFINED BY THE ARRAY NUM, AND IT IS ASSUMED THAT THE
+!     INTEGERS ARE EACH FROM THE SET 0,1,...,NMAX. ON OUTPUT THE INDICES
+!     K SUCH THAT NUM(K) = L FOR ANY L = 0,1,...,NMAX CAN BE OBTAINED
+!     FROM THE ARRAYS LAST AND NEXT AS FOLLOWS.
+!           K = LAST(L)
+!           WHILE(K /= 0) K = NEXT(K)
+!     OPTIONALLY, THE SUBROUTINE PRODUCES AN ARRAY INDEX SO THAT
+!     THE SEQUENCE NUM(INDEX(I)), I = 1,2,...,N IS SORTED.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE NUMSRT(N,NMAX,NUM,MODE,INDEX,LAST,NEXT)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE.
+!       NMAX IS A POSITIVE INTEGER INPUT VARIABLE.
+!       NUM IS AN INPUT ARRAY OF LENGTH N WHICH CONTAINS THE
+!         SEQUENCE OF INTEGERS TO BE GROUPED AND SORTED. IT
+!         IS ASSUMED THAT THE INTEGERS ARE EACH FROM THE SET
+!         0,1,...,NMAX.
+!       MODE IS AN INTEGER INPUT VARIABLE. THE SEQUENCE NUM IS
+!         SORTED IN ASCENDING ORDER IF MODE IS POSITIVE AND IN
+!         DESCENDING ORDER IF MODE IS NEGATIVE. IF MODE IS 0,
+!         NO SORTING IS DONE.
+!       INDEX IS AN INTEGER OUTPUT ARRAY OF LENGTH N SET SO
+!         THAT THE SEQUENCE
+!               NUM(INDEX(I)), I = 1,2,...,N
+!         IS SORTED ACCORDING TO THE SETTING OF MODE. IF MODE
+!         IS 0, INDEX IS NOT REFERENCED.
+!       LAST IS AN INTEGER OUTPUT ARRAY OF LENGTH NMAX + 1. THE
+!         INDEX OF NUM FOR THE LAST OCCURRENCE OF L IS LAST(L)
+!         FOR ANY L = 0,1,...,NMAX UNLESS LAST(L) = 0. IN
+!         THIS CASE L DOES NOT APPEAR IN NUM.
+!       NEXT IS AN INTEGER OUTPUT ARRAY OF LENGTH N. IF
+!         NUM(K) = L, THEN THE INDEX OF NUM FOR THE PREVIOUS
+!         OCCURRENCE OF L IS NEXT(K) FOR ANY L = 0,1,...,NMAX
+!         UNLESS NEXT(K) = 0. IN THIS CASE THERE IS NO PREVIOUS
+!         OCCURRENCE OF L IN NUM.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+      IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MODE, N, NMAX
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDEX(N), LAST(0:NMAX), NEXT(N), NUM(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, J, JINC, JL, JU, K, L
+! ..
+! ..  FIRST EXECUTABLE STATEMENT NUMSRT
+! ..
+!     DETERMINE THE ARRAYS NEXT AND LAST.
+      LAST(0:NMAX) = 0
+      DO K = 1, N
+        L = NUM(K)
+        NEXT(K) = LAST(L)
+        LAST(L) = K
+      END DO
+      IF (MODE == 0) RETURN
+
+!     STORE THE POINTERS TO THE SORTED ARRAY IN INDEX.
+      I = 1
+      IF (MODE > 0) THEN
+        JL = 0
+        JU = NMAX
+        JINC = 1
+      ELSE
+        JL = NMAX
+        JU = 0
+        JINC = -1
+      END IF
+      DO J = JL, JU, JINC
+        K = LAST(J)
+30      CONTINUE
+        IF (K == 0) GOTO 40
+        INDEX(I) = K
+        I = I + 1
+        K = NEXT(K)
+        GOTO 30
+40      CONTINUE
+      END DO
+      RETURN
+
+    END SUBROUTINE NUMSRT
+!_______________________________________________________________________
+
+    SUBROUTINE SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,LIST,NGRP,MAXGRP,IWA)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES A CONSISTENT PARTITION OF THE
+!     COLUMNS OF A BY A SEQUENTIAL ALGORITHM.
+!     A CONSISTENT PARTITION IS DEFINED IN TERMS OF THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE(A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     A PARTITION OF THE COLUMNS OF A INTO GROUPS IS CONSISTENT
+!     IF THE COLUMNS IN ANY GROUP ARE NOT ADJACENT IN THE GRAPH G.
+!     IN GRAPH-THEORY TERMINOLOGY, A CONSISTENT PARTITION OF THE
+!     COLUMNS OF A CORRESPONDS TO A COLORING OF THE GRAPH G.
+!     THE SUBROUTINE EXAMINES THE COLUMNS IN THE ORDER SPECIFIED
+!     BY THE ARRAY LIST, AND ASSIGNS THE CURRENT COLUMN TO THE
+!     GROUP WITH THE SMALLEST POSSIBLE NUMBER.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SEQ AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!     SUBROUTINE SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,LIST,NGRP,MAXGRP,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       LIST IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE ORDER TO BE USED BY THE SEQUENTIAL ALGORITHM.
+!         THE J-TH COLUMN IN THIS ORDER IS LIST(J).
+!       NGRP IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF A. COLUMN JCOL BELONGS
+!         TO GROUP NGRP(JCOL).
+!       MAXGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES THE
+!         NUMBER OF GROUPS IN THE PARTITION OF THE COLUMNS OF A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MAXGRP, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA(N), JPNTR(N+1), &
+        LIST(N), NGRP(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, J, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SEQ
+! ..
+!     INITIALIZATION BLOCK.
+      MAXGRP = 0
+      NGRP(1:N) = N
+      IWA(1:N) = 0
+
+!     BEGINNING OF ITERATION LOOP.
+
+      DO J = 1, N
+        JCOL = LIST(J)
+!       FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+!       DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!       TO NON-ZEROES IN THE MATRIX.
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+!         FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!         WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+          DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+            IC = INDCOL(IP)
+!           ARRAY IWA MARKS THE GROUP NUMBERS OF THE
+!           COLUMNS WHICH ARE ADJACENT TO COLUMN JCOL.
+            IWA(NGRP(IC)) = J
+          END DO
+        END DO
+!       ASSIGN THE SMALLEST UN-MARKED GROUP NUMBER TO JCOL.
+        DO JP = 1, MAXGRP
+          IF (IWA(JP)/=J) GOTO 50
+        END DO
+        MAXGRP = MAXGRP + 1
+50      CONTINUE
+        NGRP(JCOL) = JP
+      END DO
+
+!     END OF ITERATION LOOP.
+
+      RETURN
+
+    END SUBROUTINE SEQ
+!_______________________________________________________________________
+
+    SUBROUTINE SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+
+!     GIVEN A COLUMN-ORIENTED DEFINITION OF THE SPARSITY PATTERN
+!     OF AN M BY N MATRIX A, THIS SUBROUTINE DETERMINES A
+!     ROW-ORIENTED DEFINITION OF THE SPARSITY PATTERN OF A.
+!     ON INPUT THE COLUMN-ORIENTED DEFINITION IS SPECIFIED BY
+!     THE ARRAYS INDROW AND JPNTR. ON OUTPUT THE ROW-ORIENTED
+!     DEFINITION IS SPECIFIED BY THE ARRAYS INDCOL AND IPNTR.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER OUTPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(1) IS SET TO 1 AND THAT IPNTR(M+1)-1 IS
+!         THEN THE NUMBER OF NON-ZERO ELEMENTS OF THE MATRIX A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH M.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: M, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(M+1), IWA(M), JPNTR(N+1)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IR, JCOL, JP
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SETR
+! ..
+!     STORE IN ARRAY IWA THE COUNTS OF NON-ZEROES IN THE ROWS.
+      IWA(1:M) = 0
+      DO JP = 1, JPNTR(N+1) - 1
+        IWA(INDROW(JP)) = IWA(INDROW(JP)) + 1
+      END DO
+
+!     SET POINTERS TO THE START OF THE ROWS IN INDCOL.
+      IPNTR(1) = 1
+      DO IR = 1, M
+        IPNTR(IR+1) = IPNTR(IR) + IWA(IR)
+        IWA(IR) = IPNTR(IR)
+      END DO
+
+!     FILL INDCOL.
+      DO JCOL = 1, N
+        DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+          IR = INDROW(JP)
+          INDCOL(IWA(IR)) = JCOL
+          IWA(IR) = IWA(IR) + 1
+        END DO
+      END DO
+      RETURN
+
+    END SUBROUTINE SETR
+!_______________________________________________________________________
+
+    SUBROUTINE SLO(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST,MAXCLQ,IWA1,IWA2, &
+        IWA3,IWA4)
+
+!     GIVEN THE SPARSITY PATTERN OF AN M BY N MATRIX A, THIS
+!     SUBROUTINE DETERMINES THE SMALLEST-LAST ORDERING OF THE
+!     COLUMNS OF A.
+!     THE SMALLEST-LAST ORDERING IS DEFINED FOR THE LOOPLESS
+!     GRAPH G WITH VERTICES A(J), J = 1,2,...,N WHERE A(J) IS THE
+!     J-TH COLUMN OF A AND WITH EDGE(A(I),A(J)) IF AND ONLY IF
+!     COLUMNS I AND J HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     THE SMALLEST-LAST ORDERING IS DETERMINED RECURSIVELY BY
+!     LETTING LIST(K), K = N,...,1 BE A COLUMN WITH LEAST DEGREE
+!     IN THE SUBGRAPH SPANNED BY THE UN-ORDERED COLUMNS.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SLO AND IS
+!     THEREFORE NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!     SUBROUTINE SLO(N,INDROW,JPNTR,INDCOL,IPNTR,NDEG,LIST, &
+!                    MAXCLQ,IWA1,IWA2,IWA3,IWA4)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       INDROW IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       JPNTR IS AN INTEGER INPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       INDCOL IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE
+!         COLUMN INDICES FOR THE NON-ZEROES IN THE MATRIX A.
+!       IPNTR IS AN INTEGER INPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       NDEG IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE DEGREE SEQUENCE. THE DEGREE OF THE J-TH COLUMN
+!         OF A IS NDEG(J).
+!       LIST IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE SMALLEST-LAST ORDERING OF THE COLUMNS OF A. THE J-TH
+!         COLUMN IN THIS ORDER IS LIST(J).
+!       MAXCLQ IS AN INTEGER OUTPUT VARIABLE SET TO THE SIZE
+!         OF THE LARGEST CLIQUE FOUND DURING THE ORDERING.
+!       IWA1,IWA2,IWA3, AND IWA4 ARE INTEGER WORK ARRAYS OF LENGTH N.
+!     SUBPROGRAMS CALLED
+!       INTRINSIC ... MIN
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: MAXCLQ, N
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(*), INDROW(*), IPNTR(*), IWA1(0:N-1), IWA2(N), &
+        IWA3(N), IWA4(N), JPNTR(N+1), LIST(N), NDEG(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IC, IP, IR, JCOL, JP, MINDEG, NUMDEG, NUMORD
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MIN
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SLO
+! ..
+!     INITIALIZATION BLOCK.
+      MINDEG = N
+      DO JP = 1, N
+        IWA1(JP-1) = 0
+        IWA4(JP) = N
+        LIST(JP) = NDEG(JP)
+        MINDEG = MIN(MINDEG,NDEG(JP))
+      END DO
+
+!     CREATE A DOUBLY-LINKED LIST TO ACCESS THE DEGREES OF THE
+!     COLUMNS. THE POINTERS FOR THE LINKED LIST ARE AS FOLLOWS.
+
+!     EACH UN-ORDERED COLUMN IC IS IN A LIST (THE DEGREE LIST)
+!     OF COLUMNS WITH THE SAME DEGREE.
+
+!     IWA1(NUMDEG) IS THE FIRST COLUMN IN THE NUMDEG LIST
+!     UNLESS IWA1(NUMDEG) = 0. IN THIS CASE THERE ARE
+!     NO COLUMNS IN THE NUMDEG LIST.
+
+!     IWA2(IC) IS THE COLUMN BEFORE IC IN THE DEGREE LIST
+!     UNLESS IWA2(IC) = 0. IN THIS CASE IC IS THE FIRST
+!     COLUMN IN THIS DEGREE LIST.
+
+!     IWA3(IC) IS THE COLUMN AFTER IC IN THE DEGREE LIST
+!     UNLESS IWA3(IC) = 0. IN THIS CASE IC IS THE LAST
+!     COLUMN IN THIS DEGREE LIST.
+
+!     IF IC IS AN UN-ORDERED COLUMN, THEN LIST(IC) IS THE
+!     DEGREE OF IC IN THE GRAPH INDUCED BY THE UN-ORDERED
+!     COLUMNS. IF JCOL IS AN ORDERED COLUMN, THEN LIST(JCOL)
+!     IS THE SMALLEST-LAST ORDER OF COLUMN JCOL.
+
+      DO JP = 1, N
+        NUMDEG = NDEG(JP)
+        IWA2(JP) = 0
+        IWA3(JP) = IWA1(NUMDEG)
+        IF (IWA1(NUMDEG) > 0) IWA2(IWA1(NUMDEG)) = JP
+        IWA1(NUMDEG) = JP
+      END DO
+      MAXCLQ = 0
+      NUMORD = N
+
+!     BEGINNING OF ITERATION LOOP.
+
+30    CONTINUE
+
+!     MARK THE SIZE OF THE LARGEST CLIQUE
+!     FOUND DURING THE ORDERING.
+      IF (MINDEG+1 == NUMORD .AND. MAXCLQ == 0) MAXCLQ = NUMORD
+
+!     CHOOSE A COLUMN JCOL OF MINIMAL DEGREE MINDEG.
+40    CONTINUE
+      JCOL = IWA1(MINDEG)
+      IF (JCOL > 0) GOTO 50
+      MINDEG = MINDEG + 1
+      GOTO 40
+50    CONTINUE
+      LIST(JCOL) = NUMORD
+      NUMORD = NUMORD - 1
+
+!     TERMINATION TEST.
+      IF (NUMORD == 0) GOTO 80
+
+!     DELETE COLUMN JCOL FROM THE MINDEG LIST.
+      IWA1(MINDEG) = IWA3(JCOL)
+      IF (IWA3(JCOL) > 0) IWA2(IWA3(JCOL)) = 0
+
+!     FIND ALL COLUMNS ADJACENT TO COLUMN JCOL.
+      IWA4(JCOL) = 0
+
+!     DETERMINE ALL POSITIONS (IR,JCOL) WHICH CORRESPOND
+!     TO NON-ZEROES IN THE MATRIX.
+      DO JP = JPNTR(JCOL), JPNTR(JCOL+1) - 1
+        IR = INDROW(JP)
+!       FOR EACH ROW IR, DETERMINE ALL POSITIONS (IR,IC)
+!       WHICH CORRESPOND TO NON-ZEROES IN THE MATRIX.
+        DO IP = IPNTR(IR), IPNTR(IR+1) - 1
+          IC = INDCOL(IP)
+!         ARRAY IWA4 MARKS COLUMNS WHICH ARE ADJACENT TO
+!         COLUMN JCOL.
+
+          IF (IWA4(IC) > NUMORD) THEN
+            IWA4(IC) = NUMORD
+!           UPDATE THE POINTERS TO THE CURRENT DEGREE LISTS.
+            NUMDEG = LIST(IC)
+            LIST(IC) = LIST(IC) - 1
+            MINDEG = MIN(MINDEG,LIST(IC))
+!           DELETE COLUMN IC FROM THE NUMDEG LIST.
+            IF (IWA2(IC) == 0) THEN
+              IWA1(NUMDEG) = IWA3(IC)
+            ELSE
+              IWA3(IWA2(IC)) = IWA3(IC)
+            END IF
+            IF (IWA3(IC) > 0) IWA2(IWA3(IC)) = IWA2(IC)
+!           ADD COLUMN IC TO THE NUMDEG-1 LIST.
+            IWA2(IC) = 0
+            IWA3(IC) = IWA1(NUMDEG-1)
+            IF (IWA1(NUMDEG-1) > 0) IWA2(IWA1(NUMDEG-1)) = IC
+            IWA1(NUMDEG-1) = IC
+          END IF
+        END DO
+      END DO
+!     END OF ITERATION LOOP.
+
+      GOTO 30
+80    CONTINUE
+
+!     INVERT THE ARRAY LIST.
+      DO JCOL = 1, N
+        IWA2(LIST(JCOL)) = JCOL
+      END DO
+      LIST(1:N) = IWA2(1:N)
+      RETURN
+
+    END SUBROUTINE SLO
+!_______________________________________________________________________
+
+    SUBROUTINE SRTDAT(N,NNZ,INDROW,INDCOL,JPNTR,IWA)
+
+!     GIVEN THE NON-ZERO ELEMENTS OF AN M BY N MATRIX A IN ARBITRARY
+!     ORDER AS SPECIFIED BY THEIR ROW AND COLUMN INDICES, THIS SUBROUTINE
+!     PERMUTES THESE ELEMENTS SO THAT THEIR COLUMN INDICES ARE IN
+!     NON-DECREASING ORDER. ON INPUT IT IS ASSUMED THAT THE ELEMENTS ARE
+!     SPECIFIED IN
+!           INDROW(K),INDCOL(K), K = 1,...,NNZ.
+!     ON OUTPUT THE ELEMENTS ARE PERMUTED SO THAT INDCOL IS IN
+!     NON-DECREASING ORDER. IN ADDITION, THE ARRAY JPNTR IS SET SO THAT
+!     THE ROW INDICES FOR COLUMN J ARE
+!           INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!     NOTE THAT THE VALUE OF M IS NOT NEEDED BY SRTDAT AND IS THEREFORE
+!     NOT PRESENT IN THE SUBROUTINE STATEMENT.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE SRTDAT(N,NNZ,INDROW,INDCOL,JPNTR,IWA)
+!     WHERE
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       NNZ IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF NON-ZERO ELEMENTS OF A.
+!       INDROW IS AN INTEGER ARRAY OF LENGTH NNZ. ON INPUT INDROW
+!         MUST CONTAIN THE ROW INDICES OF THE NON-ZERO ELEMENTS OF A.
+!         ON OUTPUT INDROW IS PERMUTED SO THAT THE CORRESPONDING
+!         COLUMN INDICES OF INDCOL ARE IN NON-DECREASING ORDER.
+!       INDCOL IS AN INTEGER ARRAY OF LENGTH NNZ. ON INPUT INDCOL
+!         MUST CONTAIN THE COLUMN INDICES OF THE NON-ZERO ELEMENTS
+!         OF A. ON OUTPUT INDCOL IS PERMUTED SO THAT THESE INDICES
+!         ARE IN NON-DECREASING ORDER.
+!       JPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN THE OUTPUT
+!         INDROW. THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(1) IS SET TO 1 AND THAT JPNTR(N+1)-1
+!         IS THEN NNZ.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH N.
+!     SUBPROGRAMS CALLED - NONE
+!     INTRINSIC - MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: N, NNZ
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(NNZ), INDROW(NNZ), IWA(N), JPNTR(N+1)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, J, K, L
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT SRTDAT
+! ..
+!     STORE IN ARRAY IWA THE COUNTS OF NON-ZEROES IN THE COLUMNS.
+      IWA(1:N) = 0
+      DO K = 1, NNZ
+        IWA(INDCOL(K)) = IWA(INDCOL(K)) + 1
+      END DO
+
+!     SET POINTERS TO THE START OF THE COLUMNS IN INDROW.
+      JPNTR(1) = 1
+      DO J = 1, N
+        JPNTR(J+1) = JPNTR(J) + IWA(J)
+        IWA(J) = JPNTR(J)
+      END DO
+      K = 1
+
+!     BEGIN IN-PLACE SORT.
+40    CONTINUE
+      J = INDCOL(K)
+      IF (K >= JPNTR(J)) THEN
+!        CURRENT ELEMENT IS IN POSITION. NOW EXAMINE THE
+!        NEXT ELEMENT OR THE FIRST UN-SORTED ELEMENT IN
+!        THE J-TH GROUP.
+        K = MAX(K+1,IWA(J))
+      ELSE
+!       CURRENT ELEMENT IS NOT IN POSITION. PLACE ELEMENT
+!       IN POSITION AND MAKE THE DISPLACED ELEMENT THE
+!       CURRENT ELEMENT.
+        L = IWA(J)
+        IWA(J) = IWA(J) + 1
+        I = INDROW(K)
+        INDROW(K) = INDROW(L)
+        INDCOL(K) = INDCOL(L)
+        INDROW(L) = I
+        INDCOL(L) = J
+      END IF
+      IF (K <= NNZ) GOTO 40
+      RETURN
+
+    END SUBROUTINE SRTDAT
+!_______________________________________________________________________
+
+    SUBROUTINE FDJS(M,N,COL,IND,NPNTR,NGRP,NUMGRP,D,FJACD,FJAC)
+
+!     GIVEN A CONSISTENT PARTITION OF THE COLUMNS OF AN M BY N
+!     JACOBIAN MATRIX INTO GROUPS, THIS SUBROUTINE COMPUTES
+!     APPROXIMATIONS TO THOSE COLUMNS IN A GIVEN GROUP. THE
+!     APPROXIMATIONS ARE STORED INTO EITHER A COLUMN-ORIENTED
+!     OR A ROW-ORIENTED PATTERN.
+!     A PARTITION IS CONSISTENT IF THE COLUMNS IN ANY GROUP
+!     DO NOT HAVE A NON-ZERO IN THE SAME ROW POSITION.
+!     APPROXIMATIONS TO THE COLUMNS OF THE JACOBIAN MATRIX IN A
+!     GIVEN GROUP CAN BE OBTAINED BY SPECIFYING A DIFFERENCE
+!     PARAMETER ARRAY D WITH D(JCOL) NON-ZERO IF AND ONLY IF
+!     JCOL IS A COLUMN IN THE GROUP, AND AN APPROXIMATION TO
+!     JAC*D WHERE JAC DENOTES THE JACOBIAN MATRIX OF A MAPPING F.
+!     D CAN BE DEFINED WITH THE FOLLOWING SEGMENT OF CODE.
+!           DO 10 JCOL = 1, N
+!             D(JCOL) = 0.0
+!             IF (NGRP(JCOL) == NUMGRP) D(JCOL) = ETA(JCOL)
+!        10 CONTINUE
+!     IN THE ABOVE CODE NUMGRP IS THE GIVEN GROUP NUMBER,
+!     NGRP(JCOL) IS THE GROUP NUMBER OF COLUMN JCOL, AND
+!     ETA(JCOL) IS THE DIFFERENCE PARAMETER USED TO
+!     APPROXIMATE COLUMN JCOL OF THE JACOBIAN MATRIX.
+!     SUITABLE VALUES FOR THE ARRAY ETA MUST BE PROVIDED.
+!     AS MENTIONED ABOVE, AN APPROXIMATION TO JAC*D MUST
+!     ALSO BE PROVIDED. FOR EXAMPLE, THE APPROXIMATION
+!           F(X+D) - F(X)
+!     CORRESPONDS TO THE FORWARD DIFFERENCE FORMULA AT X.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE FDJS(M,N,COL,IND,NPNTR,NGRP,NUMGRP,D,FJACD,FJAC)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF THE JACOBIAN MATRIX.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF THE JACOBIAN MATRIX.
+!       COL IS A LOGICAL INPUT VARIABLE. IF COL IS SET TRUE, THEN THE
+!         JACOBIAN APPROXIMATIONS ARE STORED INTO A COLUMN-ORIENTED
+!         PATTERN. IF COL IS SET FALSE, THEN THE JACOBIAN
+!         APPROXIMATIONS ARE STORED INTO A ROW-ORIENTED PATTERN.
+!       IND IS AN INTEGER INPUT ARRAY WHICH CONTAINS THE ROW
+!         INDICES FOR THE NON-ZEROES IN THE JACOBIAN MATRIX
+!         IF COL IS TRUE, AND CONTAINS THE COLUMN INDICES FOR
+!         THE NON-ZEROES IN THE JACOBIAN MATRIX IF COL IS FALSE.
+!       NPNTR IS AN INTEGER INPUT ARRAY WHICH SPECIFIES THE
+!         LOCATIONS OF THE ROW INDICES IN IND IF COL IS TRUE, AND
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN IND IF
+!         COL IS FALSE. IF COL IS TRUE, THE INDICES FOR COLUMN J ARE
+!               IND(K), K = NPNTR(J),...,NPNTR(J+1)-1.
+!         IF COL IS FALSE, THE INDICES FOR ROW I ARE
+!               IND(K), K = NPNTR(I),...,NPNTR(I+1)-1.
+!         NOTE THAT NPNTR(N+1)-1 IF COL IS TRUE, OR NPNTR(M+1)-1
+!         IF COL IS FALSE, IS THEN THE NUMBER OF NON-ZERO ELEMENTS
+!         OF THE JACOBIAN MATRIX.
+!       NGRP IS AN INTEGER INPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF THE JACOBIAN MATRIX.
+!         COLUMN JCOL BELONGS TO GROUP NGRP(JCOL).
+!       NUMGRP IS A POSITIVE INTEGER INPUT VARIABLE SET TO A GROUP
+!         NUMBER IN THE PARTITION. THE COLUMNS OF THE JACOBIAN
+!         MATRIX IN THIS GROUP ARE TO BE ESTIMATED ON THIS CALL.
+!       D IS AN INPUT ARRAY OF LENGTH N WHICH CONTAINS THE
+!         DIFFERENCE PARAMETER VECTOR FOR THE ESTIMATE OF
+!         THE JACOBIAN MATRIX COLUMNS IN GROUP NUMGRP.
+!       FJACD IS AN INPUT ARRAY OF LENGTH M WHICH CONTAINS
+!         AN APPROXIMATION TO THE DIFFERENCE VECTOR JAC*D,
+!         WHERE JAC DENOTES THE JACOBIAN MATRIX.
+!       FJAC IS AN OUTPUT ARRAY OF LENGTH NNZ, WHERE NNZ IS THE
+!         NUMBER OF ITS NON-ZERO ELEMENTS. AT EACH CALL OF FDJS,
+!         FJAC IS UPDATED TO INCLUDE THE NON-ZERO ELEMENTS OF THE
+!         JACOBIAN MATRIX FOR THOSE COLUMNS IN GROUP NUMGRP. FJAC
+!         SHOULD NOT BE ALTERED BETWEEN SUCCESSIVE CALLS TO FDJS.
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      INTEGER :: M, N, NUMGRP
+      LOGICAL :: COL
+! ..
+! .. Array Arguments ..
+      KPP_REAL :: D(N), FJAC(*), FJACD(M)
+      INTEGER :: IND(*), NGRP(N), NPNTR(*)
+! ..
+! .. Local Scalars ..
+      INTEGER :: IP, IROW, JCOL, JP
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC KIND
+! ..
+! ..  FIRST EXECUTABLE STATEMENT FDJS
+! ..
+!     COMPUTE ESTIMATES OF JACOBIAN MATRIX COLUMNS IN GROUP
+!     NUMGRP. THE ARRAY FJACD MUST CONTAIN AN APPROXIMATION
+!     TO JAC*D, WHERE JAC DENOTES THE JACOBIAN MATRIX AND D
+!     IS A DIFFERENCE PARAMETER VECTOR WITH D(JCOL) NON-ZERO
+!     IF AND ONLY IF JCOL IS A COLUMN IN GROUP NUMGRP.
+      IF (COL) THEN
+!       COLUMN ORIENTATION.
+        DO JCOL = 1, N
+          IF (NGRP(JCOL) == NUMGRP) THEN
+            DO JP = NPNTR(JCOL), NPNTR(JCOL+1) - 1
+              IROW = IND(JP)
+              FJAC(JP) = FJACD(IROW)/D(JCOL)
+            END DO
+          END IF
+        END DO
+      ELSE
+!       ROW ORIENTATION.
+        DO IROW = 1, M
+          DO IP = NPNTR(IROW), NPNTR(IROW+1) - 1
+            JCOL = IND(IP)
+            IF (NGRP(JCOL) == NUMGRP) THEN
+              FJAC(IP) = FJACD(IROW)/D(JCOL)
+              GOTO 40
+            END IF
+          END DO
+40        CONTINUE
+        END DO
+      END IF
+      RETURN
+
+    END SUBROUTINE FDJS
+!_______________________________________________________________________
+
+    SUBROUTINE DVDSM(M,N,NPAIRS,INDROW,INDCOL,NGRP,MAXGRP,MINGRP,INFO, &
+        IPNTR, JPNTR,IWA,LIWA)
+
+!     THE PURPOSE OF DSM IS TO DETERMINE AN OPTIMAL OR NEAR-
+!     OPTIMAL CONSISTENT PARTITION OF THE COLUMNS OF A SPARSE
+!     M BY N MATRIX A.
+!     THE SPARSITY PATTERN OF THE MATRIX A IS SPECIFIED BY
+!     THE ARRAYS INDROW AND INDCOL. ON INPUT THE INDICES
+!     FOR THE NON-ZERO ELEMENTS OF A ARE
+!           INDROW(K),INDCOL(K), K = 1,2,...,NPAIRS.
+!     THE(INDROW,INDCOL) PAIRS MAY BE SPECIFIED IN ANY ORDER.
+!     DUPLICATE INPUT PAIRS ARE PERMITTED, BUT THE SUBROUTINE
+!     ELIMINATES THEM.
+!     THE SUBROUTINE PARTITIONS THE COLUMNS OF A INTO GROUPS
+!     SUCH THAT COLUMNS IN THE SAME GROUP DO NOT HAVE A
+!     NON-ZERO IN THE SAME ROW POSITION. A PARTITION OF THE
+!     COLUMNS OF A WITH THIS PROPERTY IS CONSISTENT WITH THE
+!     DIRECT DETERMINATION OF A.
+!     THE SUBROUTINE STATEMENT IS
+!       SUBROUTINE DVDSM(M,N,NPAIRS,INDROW,INDCOL,NGRP,MAXGRP,MINGRP,
+!                      INFO,IPNTR,JPNTR,IWA,LIWA)
+!     WHERE
+!       M IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF ROWS OF A.
+!       N IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE NUMBER
+!         OF COLUMNS OF A.
+!       NPAIRS IS A POSITIVE INTEGER INPUT VARIABLE SET TO THE
+!         NUMBER OF (INDROW,INDCOL) PAIRS USED TO DESCRIBE THE
+!         SPARSITY PATTERN OF A.
+!       INDROW IS AN INTEGER ARRAY OF LENGTH NPAIRS. ON INPUT INDROW
+!         MUST CONTAIN THE ROW INDICES OF THE NON-ZERO ELEMENTS OF A.
+!         ON OUTPUT INDROW IS PERMUTED SO THAT THE CORRESPONDING
+!         COLUMN INDICES ARE IN NON-DECREASING ORDER. THE COLUMN
+!         INDICES CAN BE RECOVERED FROM THE ARRAY JPNTR.
+!       INDCOL IS AN INTEGER ARRAY OF LENGTH NPAIRS. ON INPUT INDCOL
+!         MUST CONTAIN THE COLUMN INDICES OF THE NON-ZERO ELEMENTS OF
+!         A. ON OUTPUT INDCOL IS PERMUTED SO THAT THE CORRESPONDING
+!         ROW INDICES ARE IN NON-DECREASING ORDER. THE ROW INDICES
+!         CAN BE RECOVERED FROM THE ARRAY IPNTR.
+!       NGRP IS AN INTEGER OUTPUT ARRAY OF LENGTH N WHICH SPECIFIES
+!         THE PARTITION OF THE COLUMNS OF A. COLUMN JCOL BELONGS
+!         TO GROUP NGRP(JCOL).
+!       MAXGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES THE
+!         NUMBER OF GROUPS IN THE PARTITION OF THE COLUMNS OF A.
+!       MINGRP IS AN INTEGER OUTPUT VARIABLE WHICH SPECIFIES A LOWER
+!         BOUND FOR THE NUMBER OF GROUPS IN ANY CONSISTENT PARTITION
+!         OF THE COLUMNS OF A.
+!       INFO IS AN INTEGER OUTPUT VARIABLE SET AS FOLLOWS. FOR
+!         NORMAL TERMINATION INFO = 1. IF M, N, OR NPAIRS IS NOT
+!         POSITIVE OR LIWA IS LESS THAN MAX(M,6*N), THEN INFO = 0.
+!         IF THE K-TH ELEMENT OF INDROW IS NOT AN INTEGER BETWEEN
+!         1 AND M OR THE K-TH ELEMENT OF INDCOL IS NOT AN INTEGER
+!         BETWEEN 1 AND N, THEN INFO = -K.
+!       IPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH M + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE COLUMN INDICES IN INDCOL.
+!         THE COLUMN INDICES FOR ROW I ARE
+!               INDCOL(K), K = IPNTR(I),...,IPNTR(I+1)-1.
+!         NOTE THAT IPNTR(M+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       JPNTR IS AN INTEGER OUTPUT ARRAY OF LENGTH N + 1 WHICH
+!         SPECIFIES THE LOCATIONS OF THE ROW INDICES IN INDROW.
+!         THE ROW INDICES FOR COLUMN J ARE
+!               INDROW(K), K = JPNTR(J),...,JPNTR(J+1)-1.
+!         NOTE THAT JPNTR(N+1)-1 IS THEN THE NUMBER OF NON-ZERO
+!         ELEMENTS OF THE MATRIX A.
+!       IWA IS AN INTEGER WORK ARRAY OF LENGTH LIWA.
+!       LIWA IS A POSITIVE INTEGER INPUT VARIABLE NOT LESS THAN
+!         MAX(M,6*N).
+!       MINPACK-SUPPLIED ... DEGR,IDO,NUMSRT,SEQ,SETR,SLO,SRTDAT
+!       INTRINSIC - MAX
+!     ARGONNE NATIONAL LABORATORY. MINPACK PROJECT. JULY 1983.
+!     THOMAS F. COLEMAN, BURTON S. GARBOW, JORGE J. MORE'
+
+     IMPLICIT NONE
+
+! .. Scalar Arguments ..
+      INTEGER :: INFO, LIWA, M, MAXGRP, MINGRP, N, NPAIRS
+! ..
+! .. Array Arguments ..
+      INTEGER :: INDCOL(NPAIRS), INDROW(NPAIRS), IPNTR(M+1), IWA(LIWA), &
+        JPNTR(N+1), NGRP(N)
+! ..
+! .. Local Scalars ..
+      INTEGER :: I, IR, J, JP, K, MAXCLQ, NNZ, NUMGRP
+! ..
+! .. External Subroutines ..
+!     EXTERNAL DEGR, IDO, NUMSRT, SEQ, SETR, SLO, SRTDAT
+! ..
+! .. Intrinsic Functions ..
+      INTRINSIC MAX
+! ..
+! ..  FIRST EXECUTABLE STATEMENT DSM
+! ..
+!     CHECK THE INPUT DATA.
+      INFO = 0
+      IF (M<1 .OR. N<1 .OR. NPAIRS<1 .OR. LIWA<MAX(M,6*N)) RETURN
+      DO K = 1, NPAIRS
+        INFO = -K
+        IF (INDROW(K)<1 .OR. INDROW(K)>M .OR. INDCOL(K)<1 .OR. INDCOL(K)>N) &
+          RETURN
+      END DO
+      INFO = 1
+
+!     SORT THE DATA STRUCTURE BY COLUMNS.
+      CALL SRTDAT(N,NPAIRS,INDROW,INDCOL,JPNTR,IWA)
+
+!     COMPRESS THE DATA AND DETERMINE THE NUMBER OF
+!     NON-ZERO ELEMENTS OF A.
+      IWA(1:M) =  0
+      NNZ = 1
+      DO J = 1, N
+        K = NNZ
+        DO JP = JPNTR(J), JPNTR(J+1) - 1
+          IR = INDROW(JP)
+          IF (IWA(IR)/=J) THEN
+            INDROW(NNZ) = IR
+            NNZ = NNZ + 1
+            IWA(IR) = J
+          END IF
+        END DO
+        JPNTR(J) = K
+      END DO
+      JPNTR(N+1) = NNZ
+
+!     EXTEND THE DATA STRUCTURE TO ROWS.
+      CALL SETR(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA)
+
+!     DETERMINE A LOWER BOUND FOR THE NUMBER OF GROUPS.
+      MINGRP = 0
+      DO I = 1, M
+        MINGRP = MAX(MINGRP,IPNTR(I+1)-IPNTR(I))
+      END DO
+
+!     DETERMINE THE DEGREE SEQUENCE FOR THE INTERSECTION
+!     GRAPH OF THE COLUMNS OF A.
+      CALL DEGR(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(N+1))
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE SMALLEST-LAST (SL) ORDERING.
+      CALL SLO(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(4*N+1),MAXCLQ, &
+        IWA(1),IWA(N+1),IWA(2*N+1),IWA(3*N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),NGRP,MAXGRP,IWA(N+1))
+      MINGRP = MAX(MINGRP,MAXCLQ)
+
+!     EXIT IF THE SMALLEST-LAST ORDERING IS OPTIMAL.
+
+      IF (MAXGRP == MINGRP) RETURN
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE INCIDENCE-DEGREE(ID) ORDERING.
+      CALL IDO(M,N,INDROW,JPNTR,INDCOL,IPNTR,IWA(5*N+1),IWA(4*N+1),MAXCLQ, &
+        IWA(1),IWA(N+1),IWA(2*N+1),IWA(3*N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),IWA(1),NUMGRP,IWA(N+1))
+      MINGRP = MAX(MINGRP,MAXCLQ)
+
+!     RETAIN THE BETTER OF THE TWO ORDERINGS SO FAR.
+      IF (NUMGRP < MAXGRP) THEN
+        MAXGRP = NUMGRP
+        NGRP(1:N) = IWA(1:N)
+
+!       EXIT IF THE INCIDENCE-DEGREE ORDERING IS OPTIMAL.
+        IF (MAXGRP == MINGRP) RETURN
+      END IF
+
+!     COLOR THE INTERSECTION GRAPH OF THE COLUMNS OF A
+!     WITH THE LARGEST-FIRST (LF) ORDERING.
+      CALL NUMSRT(N,N-1,IWA(5*N+1),-1,IWA(4*N+1),IWA(2*N+1),IWA(N+1))
+      CALL SEQ(N,INDROW,JPNTR,INDCOL,IPNTR,IWA(4*N+1),IWA(1),NUMGRP,IWA(N+1))
+
+!     RETAIN THE BEST OF THE THREE ORDERINGS AND EXIT.
+      IF (NUMGRP < MAXGRP) THEN
+        MAXGRP = NUMGRP
+        NGRP(1:N) = IWA(1:N)
+      END IF
+      RETURN
+
+    END SUBROUTINE DVDSM
+!_______________________________________________________________________
+
+      SUBROUTINE DGROUPDS(N,MAXGRPDS,NGRPDS,IGP,JGP)
+! ..
+! Construct the column grouping arrays IGP anf JGP needed by DVJACS28
+! from the DSM array NGRPDS.
+! ..
+!     Input:
+!
+!     N        = the order of the matrix
+!     MAXGRPDS = number of groups (from DSM)
+!     NGRPDS   = DSM output array
+!     Output:
+!     JGP      = array of length N containing the column
+!                indices by groups
+!     IGP      = pointer array of length NGRP + 1 to the
+!                locations in JGP of the beginning of
+!                each group
+! ..
+     IMPLICIT NONE
+! ..
+! .. Scalar Arguments ..
+        INTEGER, INTENT (IN) :: N, MAXGRPDS
+! ..
+! .. Array Arguments ..
+        INTEGER, INTENT (IN) :: NGRPDS(MAXGRPDS)
+        INTEGER, INTENT (OUT) :: IGP(MAXGRPDS+1), JGP(N)
+! ..
+! .. Local Scalars ..
+        INTEGER :: IGRP, INDEX, JCOL
+! ..
+! .. FIRST EXECUTABLE STATEMENT DGROUPDS
+! ..
+        IGP(1) = 1
+        INDEX =  0
+        DO IGRP = 1, MAXGRPDS
+           IGP(IGRP+1) = IGP(IGRP)
+           DO JCOL = 1, N
+              IF (NGRPDS(JCOL) == IGRP) THEN
+                 IGP(IGRP+1) = IGP(IGRP+1) + 1
+                 INDEX = INDEX + 1
+                 JGP(INDEX) = JCOL
+              END IF
+           END DO
+        END DO
+        RETURN
+
+      END SUBROUTINE DGROUPDS
+!_______________________________________________________________________
+
+    SUBROUTINE JACSPDB(FCN,N,T,Y,F,FJAC,NRFJAC,YSCALE,FAC,IOPT, &
+      WK,LWK,IWK,LIWK,MAXGRP,NGRP,JPNTR,INDROW)
+
+! This is a modified version of JACSP which does not require the NGRP,
+! JPNTR and INDROW sparse pointer arrays in the event a dense or a
+! banded matrix is being processed.
+
+! Refer to the documentation for JACSP for a description of the
+! parameters. If the banded option is used, IOPT(5) is used to
+! input the lower bandwidth ML in this version.
+
+     IMPLICIT NONE
+
+! .. Parameters ..
+      INTEGER, PARAMETER :: WP = KIND(0.0D0)
+! ..
+! .. Scalar Arguments ..
+      KPP_REAL :: T
+      INTEGER :: LIWK, LWK, MAXGRP, N, NRFJAC
+! ..
+! .. Array Arguments ..
+      KPP_REAL :: F(N), FAC(N), FJAC(NRFJAC,*), WK(LWK), Y(N), YSCALE(*)
+      INTEGER :: INDROW(*), IOPT(5), IWK(LIWK), JPNTR(*), NGRP(N)
+! ..
+! .. Subroutine Arguments ..
+      EXTERNAL FCN
+! ..
+! .. Local Scalars ..
+      KPP_REAL :: ADIFF, AY, DEL, DELM, DFMJ, DIFF, DMAX, EXPFMN, FACMAX, &
+        FACMIN, FJACL, FMJ, ONE, P125, P25, P75, P875, PERT, RDEL, RMNFDF, &
+        RMXFDF, SDF, SF, SGN, T1, T2, U, U3QRT, U7EGT, UEGT, UMEGT, UQRT,  &
+        USQT, ZERO
+      INTEGER :: IDXL, IDXU, IFLAG1, IFLAG2, IRCMP, IRDEL, IROW, IROWB,    &
+        IROWMX, ITRY, J, JCOL, JFIRST, JINC, JLAST, KT1, KT2, KT3, KT4,    &
+        KT5, L, MBAND, ML, MU, NID1, NID2, NID3, NID4, NID5, NID6,         &
+        NIFAC, NT2, NUMGRP
+!       KT5, L, MBAND, MEB1, ML, MU, NID1, NID2, NID3, NID4, NID5, NID6,   &
+      LOGICAL :: DOTHISBLOCK
+      CHARACTER (80) :: MSG
+! ..
+! .. Intrinsic Functions ..
+!     INTRINSIC ABS, EPSILON, KIND, MAX, MIN, SIGN, SQRT
+      INTRINSIC ABS, EPSILON, MAX, MIN, SIGN, SQRT
+! ..
+! .. Data Statements ..
+      DATA PERT/2.0E+0_dp/, FACMAX/1.E-1_dp/, EXPFMN/.75E+0_dp/
+      DATA ONE/1.0E0_dp/, ZERO/0.0E0_dp/
+      DATA P125/.125E+0_dp/, P25/.25E+0_dp/, P75/.75E+0_dp/, P875/.875E+0_dp/
+      DATA NIFAC/3/, NID1/10/, NID2/20/, NID3/30/, NID4/40/, NID5/50/
+! ..
+!     COMPUTE ALGORITHM AND MACHINE CONSTANTS.
+! ..
+! ..  FIRST EXECUTABLE STATEMENT JACSPDB
+! ..
+      IF (IOPT(1) == 0 .AND. MAXGRP /= N) THEN
+         MSG = 'JACSPDB requires that MAXGRP=N for a dense matrix.'
+         CALL XERRDV(MSG,1800,2,0,0,0,0,ZERO,ZERO)
+      END IF
+
+      IF (IOPT(1) == 1) THEN
+         MBAND = IOPT(2)
+         ML = IOPT(5)
+         MU = MBAND - ML - 1
+!        MEB1 = 2*ML + MU
+      END IF
+
+      U = EPSILON(ONE)
+      USQT = SQRT(U)
+      UEGT = U**P125
+      UMEGT = ONE/UEGT
+      UQRT = U**P25
+      U3QRT = U**P75
+      U7EGT = U**P875
+      FACMIN = U**EXPFMN
+
+      IF (IOPT(4) == 0) THEN
+        IOPT(4) = 1
+        DO 10 J = 1, N
+          FAC(J) = USQT
+10      CONTINUE
+      END IF
+      DO 20 J = 1, 50
+        IWK(J) = 0
+20    CONTINUE
+      KT1 = NID1
+      KT2 = NID2
+      KT3 = NID3
+      KT4 = NID4
+      KT5 = NID5
+      NID6 = LIWK
+      NT2 = 2*N
+
+      DO NUMGRP = 1, MAXGRP
+!       COMPUTE AND SAVE THE INCREMENTS FOR THE COLUMNS IN GROUP NUMGRP.
+        IRCMP = 0
+        ITRY = 0
+        DO 30 J = NID5 + 1, NID6
+          IWK(J) = 0
+30      CONTINUE
+40      CONTINUE
+
+!       Note: For banded in DVJAC:
+!       mba = min(mband,n)
+!          Groups: j=1,...,mba
+!             Columns in group j: jj=j,...,n by mband
+!                Rows in column jj: i1=max(jj-mu,1),...,i2=min(jj+ml,n)       
+
+        IF (IOPT(1) == 0 .OR. IOPT(1) == 2) THEN
+          JFIRST = 1
+          JLAST = N
+          JINC = 1
+        ELSE
+          JFIRST = NUMGRP
+          JLAST = N
+          JINC = MBAND
+        END IF
+        DO JCOL = JFIRST, JLAST, JINC
+          DOTHISBLOCK = .FALSE.
+          IF (IOPT(1) == 2) THEN
+            IF (NGRP(JCOL) == NUMGRP) DOTHISBLOCK = .TRUE.
+          ELSE
+            IF (IOPT(1) == 0) THEN
+              IF (JCOL == NUMGRP) DOTHISBLOCK = .TRUE.
+            ELSE
+              IF (IOPT(1) == 1) THEN
+                DOTHISBLOCK = .TRUE.
+              END IF
+            END IF
+          END IF
+
+          IF (DOTHISBLOCK) THEN
+            WK(N+JCOL) = Y(JCOL)
+!           COMPUTE DEL. IF DEL IS TOO SMALL INCREASE FAC(JCOL) AND RECOMPUTE
+!           DEL. NIFAC ATTEMPTS ARE MADE TO INCREASE FAC(JCOL) AND FIND AN
+!           APPROPRIATE DEL. IF DEL CANT BE FOUND IN THIS MANNER, DEL IS COMPUTED
+!           WITH FAC(JCOL) SET TO THE SQUARE ROOT OF THE MACHINE PRECISION (USQT).
+!           IF DEL IS ZERO TO MACHINE PRECISION BECAUSE Y(JCOL) IS ZERO OR
+!           YSCALE(JCOL) IS ZERO, DEL IS SET TO USQT.
+            SGN = SIGN(ONE,F(JCOL))
+            IRDEL = 0
+            IF (IOPT(3) == 1) THEN
+              AY = ABS(YSCALE(JCOL))
+            ELSE
+              AY = ABS(Y(JCOL))
+            END IF
+            DELM = U7EGT*AY
+
+            DO 50 J = 1, NIFAC
+              DEL = FAC(JCOL)*AY*SGN
+              IF (ABS(DEL) <= ZERO) THEN
+                DEL = USQT*SGN
+                IF (ITRY == 0) IWK(3) = IWK(3) + 1
+              END IF
+              T1 = Y(JCOL) + DEL
+              DEL = T1 - Y(JCOL)
+              IF (ABS(DEL) < DELM) THEN
+                IF (J >= NIFAC) GOTO 50
+                IF (IRDEL == 0) THEN
+                  IRDEL = 1
+                  IWK(1) = IWK(1) + 1
+                END IF
+                T1 = FAC(JCOL)*UMEGT
+                FAC(JCOL) = MIN(T1,FACMAX)
+              ELSE
+                GOTO 60
+              END IF
+50          END DO
+
+            FAC(JCOL) = USQT
+            DEL = USQT*AY*SGN
+            IWK(2) = IWK(2) + 1
+            IF (KT2 < NID3) THEN
+              KT2 = KT2 + 1
+              IWK(KT2) = JCOL
+            END IF
+
+60          CONTINUE
+            WK(NT2+JCOL) = DEL
+            Y(JCOL) = Y(JCOL) + DEL
+          END IF
+        END DO
+
+        IWK(7) = IWK(7) + 1
+        CALL FCN(N,T,Y,WK)
+
+        DO JCOL = JFIRST, JLAST, JINC
+          IF (IOPT(1) == 2) THEN
+             IF (NGRP(JCOL) == NUMGRP) Y(JCOL) = WK(N+JCOL)
+          ELSE
+             IF (IOPT(1) == 0) THEN
+                IF (JCOL == NUMGRP) Y(JCOL) = WK(N+JCOL)
+             ELSE
+                IF (IOPT(1) == 1) Y(JCOL) = WK(N+JCOL) 
+             END IF
+          END IF
+        END DO
+
+!       COMPUTE THE JACOBIAN ENTRIES FOR ALL COLUMNS IN NUMGRP.
+!       STORE ENTRIES ACCORDING TO SELECTED STORAGE FORMAT.
+!       USE LARGEST ELEMENTS IN A COLUMN TO DETERMINE SCALING
+!       INFORMATION FOR ROUNDOFF AND TRUNCATION ERROR TESTS.
+
+        DO JCOL = JFIRST, JLAST, JINC
+          DOTHISBLOCK = .FALSE.
+          IF (IOPT(1) == 2) THEN
+             IF (NGRP(JCOL) == NUMGRP) DOTHISBLOCK = .TRUE.
+          ELSE
+             IF (IOPT(1) == 0) THEN
+                IF (JCOL == NUMGRP) DOTHISBLOCK = .TRUE.
+             ELSE
+                IF(IOPT(1) == 1) DOTHISBLOCK = .TRUE. 
+             END IF
+          END IF
+          IF (DOTHISBLOCK) THEN
+            IF (IOPT(1) == 2) THEN
+              IDXL = JPNTR(JCOL)
+              IDXU = JPNTR(JCOL+1) - 1
+            ELSE
+              IF (IOPT(1) == 0) THEN
+                IDXL = 1
+                IDXU = N
+              ELSE
+                IF (IOPT(1) == 1) THEN
+                  IDXL = MAX(JCOL-MU,1)
+                  IDXU = MIN(JCOL+ML,N)
+                END IF
+              END IF
+            END IF
+            DMAX = ZERO
+            RDEL = ONE/WK(NT2+JCOL)
+            IROWMX = 1
+            DO L = IDXL, IDXU
+              IF (IOPT(1) == 2) THEN
+                 IROW = INDROW(L)
+              ELSE
+                 IF (IOPT(1)==0 .OR. IOPT(1)==1) IROW = L
+              END IF
+              DIFF = WK(IROW) - F(IROW)
+              ADIFF = ABS(DIFF)
+              IF (ADIFF >= DMAX) THEN
+                IROWMX = IROW
+                DMAX = ADIFF
+                SF = F(IROW)
+                SDF = WK(IROW)
+              END IF
+              FJACL = DIFF*RDEL
+              IF (ITRY == 1) WK(IROW) = FJACL
+
+              IF (IOPT(1) == 0) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROW,JCOL)
+                FJAC(IROW,JCOL) = FJACL
+              END IF
+              IF (IOPT(1) == 1) THEN
+                IROWB = IROW - JCOL + IOPT(2)
+                IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,JCOL)
+                FJAC(IROWB,JCOL) = FJACL
+!               IROWB = JCOL * MEB1 - ML + L
+!               IF (ITRY == 1) WK(IROW+N) = FJAC(IROWB,1)
+!               FJAC(IROWB,1) = FJACL
+              END IF
+              IF (IOPT(1) == 2) THEN
+                IF (ITRY == 1) WK(IROW+N) = FJAC(L,1)
+                FJAC(L,1) = FJACL
+              END IF
+            END DO
+
+!           IF A COLUMN IS BEING RECOMPUTED (ITRY=1),THIS SECTION OF THE
+!           CODE PERFORMS AN EXTRAPOLATION TEST TO ENABLE THE CODE TO
+!           COMPUTE SMALL DERIVATIVES MORE ACCURATELY. THIS TEST IS ONLY
+!           PERFORMED ON THOSE COLUMNS WHOSE LARGEST DIFFERENCE IS CLOSE
+!           TO ZERO RELATIVE TO SCALE.
+            IF (ITRY == 1) THEN
+              IFLAG1 = 0
+              IFLAG2 = 0
+              DO 100 J = NID5 + 1, NID6
+                IF (IWK(J) == JCOL) IFLAG1 = 1
+100           CONTINUE
+              IF (IFLAG1 == 1) THEN
+                IFLAG1 = 0
+                T1 = WK(IROWMX+N)
+                T2 = WK(IROWMX)*FAC(JCOL)
+                IF (ABS(T2) < ABS(T1)*PERT) IFLAG2 = 1
+              END IF
+
+              IF (IFLAG2 == 1) THEN
+                IFLAG2 = 0
+                T1 = FAC(JCOL)*FAC(JCOL)
+                FAC(JCOL) = MAX(T1,FACMIN)
+                DO L = IDXL, IDXU
+                  IF (IOPT(1) == 2) THEN
+                     IROW = INDROW(L)
+                  ELSE
+                     IF (IOPT(1)==0 .OR. IOPT(1)==1) IROW = L
+                  END IF
+                  FJACL = WK(IROW+N)
+                  IF (IOPT(1) == 0) FJAC(IROW,JCOL) = FJACL
+                  IF (IOPT(1) == 1) THEN
+                    IROWB = IROW - JCOL + IOPT(2)
+                    FJAC(IROWB,JCOL) = FJACL
+!                   IROWB = JCOL * MEB1 - ML + L
+!                   FJAC(IROWB,1) = FJACL
+                  END IF
+                  IF (IOPT(1) == 2) FJAC(L,1) = FJACL
+              END DO
+              END IF
+            END IF
+
+            FMJ = ABS(SF)
+            DFMJ = ABS(SDF)
+            RMXFDF = MAX(FMJ,DFMJ)
+            RMNFDF = MIN(FMJ,DFMJ)
+
+!           IF SCALE INFORMATION IS NOT AVAILABLE, PERFORM NO ROUNDOFF
+!           OR TRUNCATION ERROR TESTS. IF THE EXTRAPOLATION TEST HAS
+!           CAUSED FAC(JCOL) TO BE RESET TO ITS PREVIOUS VALUE (IAJAC=1)
+!           THEN NO FURTHER ROUNDOFF OR TRUNCATION ERROR TESTS ARE
+!           PERFORMED.
+!           IF (RMNFDF/=ZERO) THEN
+            IF (ABS(RMNFDF) > ZERO) THEN
+!             TEST FOR POSSIBLE ROUNDOFF ERROR (FIRST TEST)
+!             AND ALSO FOR POSSIBLE SERIOUS ROUNDOFF ERROR (SECOND TEST).
+              IF (DMAX <= (U3QRT*RMXFDF)) THEN
+                IF (DMAX <= (U7EGT*RMXFDF)) THEN
+                  IF (ITRY == 0) THEN
+                    T1 = SQRT(FAC(JCOL))
+                    FAC(JCOL) = MIN(T1,FACMAX)
+                    IRCMP = 1
+                    IF (KT5 < NID6) THEN
+                      KT5 = KT5 + 1
+                      IWK(KT5) = JCOL
+                    END IF
+                    IWK(4) = IWK(4) + 1
+                    IF (KT3 < NID4) THEN
+                      KT3 = KT3 + 1
+                      IWK(KT3) = JCOL
+                    END IF
+                  ELSE
+                    IWK(5) = IWK(5) + 1
+                    IF (KT4 < NID5) THEN
+                      KT4 = KT4 + 1
+                      IWK(KT4) = JCOL
+                    END IF
+                  END IF
+                ELSE
+                  T1 = UMEGT*FAC(JCOL)
+                  FAC(JCOL) = MIN(T1,FACMAX)
+                END IF
+              END IF
+!             TEST FOR POSSIBLE TRUNCATION ERROR.
+              IF (DMAX > UQRT*RMXFDF) THEN
+                T1 = FAC(JCOL)*UEGT
+                FAC(JCOL) = MAX(T1,FACMIN)
+                IWK(8) = IWK(8) + 1
+                IF (KT1 < NID2) THEN
+                  KT1 = KT1 + 1
+                  IWK(KT1) = JCOL
+                END IF
+              END IF
+            ELSE
+              IWK(6) = IWK(6) + 1
+            END IF
+          END IF
+        END DO
+
+!       IF SERIOUS ROUNDOFF ERROR IS SUSPECTED, RECOMPUTE ALL
+!       COLUMNS IN GROUP NUMGRP.
+        IF (IRCMP == 1) THEN
+          IRCMP = 0
+          ITRY = 1
+          GOTO 40
+        END IF
+        ITRY = 0
+      END DO
+      RETURN
+
+    END SUBROUTINE JACSPDB
+
+! End of JACSP routines.
+!_______________________________________________________________________
+! *****MA48 build change point. Insert the MA48 Jacobian related
+! routines DVNLSS48, DVSOLS48, DVPREPS48, and DVJACS48 here.
+! filename = jacobian_for_ma48.f90. Insert the following line
+! after the first line of this file:
+! USE hsl_ma48_double
+!_______________________________________________________________________
+
+! *****LAPACK build change point. Insert the following line after the
+! first line of this file:
+! USE lapackd_f90_m
+! Include the module lapackd_f90_m.f90 at the beginning of this file
+! or as an external module.
+!_______________________________________________________________________
+
+    END MODULE DVODE
+
+
+    END MODULE KPP_ROOT_Integrator
+!_______________________________________________________________________
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_lsode.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_lsode.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_lsode.def	(revision 3477)
@@ -0,0 +1,7 @@
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+#DOUBLE ON 
+#INTFILE kpp_lsode
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_lsode.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_lsode.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_lsode.f90	(revision 3477)
@@ -0,0 +1,3431 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  LSODE - Stiff method based on backward differentiation formulas (BDF)  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+! A. Sandu - version of July 2005
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME, ATOL, RTOL
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve, &
+               Set2zero, WLAMCH
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  !~~~>  Statistics on the work performed by the LSODE method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4,  &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihexit=2
+  !  SDIRK method coefficients
+  KPP_REAL :: rkAlpha(5,4), rkBeta(5,4), rkD(4,5),  &
+                   rkGamma, rkA(5,5), rkB(5), rkC(5)
+
+  ! mz_rs_20050717: TODO: use strings of IERR_NAMES for error messages
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-8:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -8
+    'Step size too small                               ', & ! -7
+    'No of steps exceeds maximum bound                 ', & ! -6
+    'Improper tolerance values                         ', & ! -5
+    'FacMin/FacMax/FacRej must be positive             ', & ! -4
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3
+    'Improper value for maximal no of Newton iterations', & ! -2
+    'Improper value for maximal no of steps            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+!!$   INTEGER, SAVE :: Ntotal = 0
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   ICNTRL(5) = 2 ! maximal order
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+   CALL KppLsode( TIN,TOUT,VAR,RTOL,ATOL,                &
+                  RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+
+!     INTEGER ITASK, ISTATE, NG, NEQ, IOUT, JROOT, ISTATS, &
+!     IERROR, I
+!     DOUBLE PRECISION ATOL, RTOL, RSTATS, T, TOUT, Y
+!     DIMENSION JROOT(2)
+!     TYPE(VODE_OPTS) :: OPTIONS
+!     IERROR = 0
+!     ITASK = 1
+!     ISTATE = 1
+!     NG = 2
+!     OPTIONS = SET_OPTS(DENSE_J=.TRUE.,RELERR=RTOL, &
+!       ABSERR_VECTOR=ATOL,NEVENTS=NG)
+!       CALL DVODE_F90(FEX,NEQ,Y,TIN,TOUT,ITASK,ISTATE,OPTIONS,G_FCN=GEX)
+!       CALL GET_STATS(RSTATS, ISTATS, NG, JROOT)
+
+
+   STEPMIN = RSTATUS(ihexit) ! Save last step
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(1:20)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(1:20)
+   IF (PRESENT(IERR_U)) THEN
+     IF (IERR==2) THEN ! DLSODE returns "2" after successful completion
+       IERR_U = 1 ! IERR_U will return "1" for successful completion
+     ELSE
+       IERR_U = IERR
+     ENDIF
+   ENDIF
+
+   END SUBROUTINE INTEGRATE
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE KppLsode( TIN,TOUT,Y,RelTol,AbsTol,      &
+               RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum order of the integration formula allowed
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last predicted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      KPP_REAL :: Y(NVAR), AbsTol(NVAR), RelTol(NVAR), TIN, TOUT
+      KPP_REAL :: RCNTRL(20), RSTATUS(20)
+      INTEGER       :: ICNTRL(20), ISTATUS(20)
+      INTEGER, PARAMETER :: LRW = 25 + 9*NVAR+2*NVAR*NVAR, &
+                            LIW = 32 + NVAR
+      KPP_REAL :: RWORK(LRW), RPAR(1)
+      INTEGER :: IWORK(LIW), IPAR(1), ITOL, ITASK,         &
+                 IERR, IOPT, MF
+
+      !~~~> NORMAL COMPUTATION
+      ITASK  = 1
+      IERR   = 1
+      IOPT   = 1     ! 0=no/1=use optional input
+      
+      RWORK(1:30) = 0.0d0
+      IWORK(1:30) = 0
+      
+      IF (ICNTRL(2)==0) THEN
+         ITOL = 4           ! Abs/RelTol are both vectors
+      ELSE              
+         ITOL = 1           ! Abs/RelTol are both scalars
+      END IF   
+      IWORK(6) = ICNTRL(4)  ! max number of internal steps 
+      IWORK(5) = ICNTRL(5)  ! maximal order
+
+      MF = 21  !~~~> stiff case, analytic full Jacobian
+
+      RWORK(5) = RCNTRL(3)  ! Hstart
+      RWORK(6) = RCNTRL(2)  ! Hmax                    
+      RWORK(7) = RCNTRL(1)  ! Hmin                    
+
+      CALL DLSODE ( FUN_CHEM, NVAR, Y, TIN, TOUT, ITOL, RelTol, AbsTol, ITASK,&
+                    IERR, IOPT, RWORK, LRW, IWORK, LIW, JAC_CHEM, MF)
+
+      ISTATUS(1) = IWORK(12) ! Number of function evaluations 
+      ISTATUS(2) = IWORK(13) ! Number of Jacobian evaluations   
+      ISTATUS(3) = IWORK(11) ! Number of steps
+
+      RSTATUS(1) = TOUT      ! mz_rs_20050717
+      RSTATUS(2) = RWORK(11) ! mz_rs_20050717
+
+      END SUBROUTINE KppLsode
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!DECK DLSODE                                                            
+      SUBROUTINE DLSODE (F, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,   &
+                       ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)  
+      EXTERNAL F, JAC 
+      INTEGER NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, LIW, IWORK(LIW), MF 
+      KPP_REAL Y(*), T, TOUT, RelTol(*), AbsTol(*), RWORK(LRW)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!***BEGIN PROLOGUE  DLSODE                                              
+!***PURPOSE  Livermore Solver for Ordinary Differential Equations.      
+!            DLSODE solves the initial-value problem for stiff or       
+!            nonstiff systems of first-order ODE's,                     
+!               dy/dt = f(t,y),   or, in component form,                
+!               dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(N)),  i=1,...,N.
+!***CATEGORY  I1A                                                       
+!***TYPE      KPP_REAL (SLSODE-S, DLSODE-D)                     
+!***KEYWORDS  ORDINARY DIFFERENTIAL EQUATIONS, INITIAL VALUE PROBLEM,   
+!             STIFF, NONSTIFF                                           
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!             Center for Applied Scientific Computing, L-561            
+!             Lawrence Livermore National Laboratory                    
+!             Livermore, CA 94551.                                      
+!***DESCRIPTION                                                         
+!                                                                       
+!     NOTE: The "Usage" and "Arguments" sections treat only a subset of 
+!           available options, in condensed fashion.  The options       
+!           covered and the information supplied will support most      
+!           standard uses of DLSODE.                                    
+!                                                                       
+!           For more sophisticated uses, full details on all options are
+!           given in the concluding section, headed "Long Description." 
+!           A synopsis of the DLSODE Long Description is provided at the
+!           beginning of that section; general topics covered are:      
+!           - Elements of the call sequence; optional input and output  
+!           - Optional supplemental routines in the DLSODE package      
+!           - internal COMMON block                                     
+!                                                                       
+! *Usage:                                                               
+!     Communication between the user and the DLSODE package, for normal 
+!     situations, is summarized here.  This summary describes a subset  
+!     of the available options.  See "Long Description" for complete    
+!     details, including optional communication, nonstandard options,   
+!     and instructions for special situations.                          
+!                                                                       
+!     A sample program is given in the "Examples" section.              
+!                                                                       
+!     Refer to the argument descriptions for the definitions of the     
+!     quantities that appear in the following sample declarations.      
+!                                                                       
+!     For MF = 10,                                                      
+!        PARAMETER  (LRW = 20 + 16*NEQ,           LIW = 20)             
+!     For MF = 21 or 22,                                                
+!        PARAMETER  (LRW = 22 +  9*NEQ + NEQ**2,  LIW = 20 + NEQ)       
+!     For MF = 24 or 25,                                                
+!        PARAMETER  (LRW = 22 + 10*NEQ + (2*ML+MU)*NEQ,                 
+!       *                                         LIW = 20 + NEQ)       
+!                                                                       
+!        EXTERNAL F, JAC                                                
+!        INTEGER  NEQ, ITOL, ITASK, ISTATE, IOPT, LRW, IWORK(LIW),      
+!       *         LIW, MF                                               
+!        KPP_REAL Y(NEQ), T, TOUT, RelTol, AbsTol(ntol), RWORK(LRW) 
+!                                                                       
+!        CALL DLSODE (F, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,      
+!       *            ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)     
+!                                                                       
+! *Arguments:                                                           
+!     F     :EXT    Name of subroutine for right-hand-side vector f.    
+!                   This name must be declared EXTERNAL in calling      
+!                   program.  The form of F must be:                    
+!                                                                       
+!                   SUBROUTINE  F (NEQ, T, Y, YDOT)                     
+!                   INTEGER  NEQ                                        
+!                   KPP_REAL  T, Y(*), YDOT(*)                  
+!                                                                       
+!                   The inputs are NEQ, T, Y.  F is to set              
+!                                                                       
+!                   YDOT(i) = f(i,T,Y(1),Y(2),...,Y(NEQ)),              
+!                                                     i = 1, ..., NEQ . 
+!                                                                       
+!     NEQ   :IN     Number of first-order ODE's.                        
+!                                                                       
+!     Y     :INOUT  Array of values of the y(t) vector, of length NEQ.  
+!                   Input:  For the first call, Y should contain the    
+!                           values of y(t) at t = T. (Y is an input     
+!                           variable only if ISTATE = 1.)               
+!                   Output: On return, Y will contain the values at the 
+!                           new t-value.                                
+!                                                                       
+!     T     :INOUT  Value of the independent variable.  On return it    
+!                   will be the current value of t (normally TOUT).     
+!                                                                       
+!     TOUT  :IN     Next point where output is desired (.NE. T).        
+!                                                                       
+!     ITOL  :IN     1 or 2 according as AbsTol (below) is a scalar or     
+!                   an array.                                           
+!                                                                       
+!     RelTol  :IN     Relative tolerance parameter (scalar).              
+!                                                                       
+!     AbsTol  :IN     Absolute tolerance parameter (scalar or array).     
+!                   If ITOL = 1, AbsTol need not be dimensioned.          
+!                   If ITOL = 2, AbsTol must be dimensioned at least NEQ. 
+!                                                                       
+!                   The estimated local error in Y(i) will be controlled
+!                   so as to be roughly less (in magnitude) than        
+!                                                                       
+!                   EWT(i) = RelTol*ABS(Y(i)) + AbsTol     if ITOL = 1, or  
+!                   EWT(i) = RelTol*ABS(Y(i)) + AbsTol(i)  if ITOL = 2.     
+!                                                                       
+!                   Thus the local error test passes if, in each        
+!                   component, either the absolute error is less than   
+!                   AbsTol (or AbsTol(i)), or the relative error is less    
+!                   than RelTol.                                          
+!                                                                       
+!                   Use RelTol = 0.0 for pure absolute error control, and 
+!                   use AbsTol = 0.0 (or AbsTol(i) = 0.0) for pure relative 
+!                   error control.  Caution:  Actual (global) errors may
+!                   exceed these local tolerances, so choose them       
+!                   conservatively.                                     
+!                                                                       
+!     ITASK :IN     Flag indicating the task DLSODE is to perform.      
+!                   Use ITASK = 1 for normal computation of output      
+!                   values of y at t = TOUT.                            
+!                                                                       
+!     ISTATE:INOUT  Index used for input and output to specify the state
+!                   of the calculation.                                 
+!                   Input:                                              
+!                    1   This is the first call for a problem.          
+!                    2   This is a subsequent call.                     
+!                   Output:                                             
+!                    1   Nothing was done, because TOUT was equal to T. 
+!                    2   DLSODE was successful (otherwise, negative).   
+!                        Note that ISTATE need not be modified after a  
+!                        successful return.                             
+!                   -1   Excess work done on this call (perhaps wrong   
+!                        MF).                                           
+!                   -2   Excess accuracy requested (tolerances too      
+!                        small).                                        
+!                   -3   Illegal input detected (see printed message).  
+!                   -4   Repeated error test failures (check all        
+!                        inputs).                                       
+!                   -5   Repeated convergence failures (perhaps bad     
+!                        Jacobian supplied or wrong choice of MF or     
+!                        tolerances).                                   
+!                   -6   Error weight became zero during problem        
+!                        (solution component i vanished, and AbsTol or    
+!                        AbsTol(i) = 0.).                                 
+!                                                                       
+!     IOPT  :IN     Flag indicating whether optional inputs are used:   
+!                   0   No.                                             
+!                   1   Yes.  (See "Optional inputs" under "Long        
+!                       Description," Part 1.)                          
+!                                                                       
+!     RWORK :WORK   Real work array of length at least:                 
+!                   20 + 16*NEQ                    for MF = 10,         
+!                   22 +  9*NEQ + NEQ**2           for MF = 21 or 22,   
+!                   22 + 10*NEQ + (2*ML + MU)*NEQ  for MF = 24 or 25.   
+!                                                                       
+!     LRW   :IN     Declared length of RWORK (in user's DIMENSION       
+!                   statement).                                         
+!                                                                       
+!     IWORK :WORK   Integer work array of length at least:              
+!                   20        for MF = 10,                              
+!                   20 + NEQ  for MF = 21, 22, 24, or 25.               
+!                                                                       
+!                   If MF = 24 or 25, input in IWORK(1),IWORK(2) the    
+!                   lower and upper Jacobian half-bandwidths ML,MU.     
+!                                                                       
+!                   On return, IWORK contains information that may be   
+!                   of interest to the user:                            
+!                                                                       
+!            Name   Location   Meaning                                  
+!            -----  ---------  -----------------------------------------
+!            NST    IWORK(11)  Number of steps taken for the problem so 
+!                              far.                                     
+!            NFE    IWORK(12)  Number of f evaluations for the problem  
+!                              so far.                                  
+!            NJE    IWORK(13)  Number of Jacobian evaluations (and of   
+!                              matrix LU decompositions) for the problem
+!                              so far.                                  
+!            NQU    IWORK(14)  Method order last used (successfully).   
+!            LENRW  IWORK(17)  Length of RWORK actually required.  This 
+!                              is defined on normal returns and on an   
+!                              illegal input return for insufficient    
+!                              storage.                                 
+!            LENIW  IWORK(18)  Length of IWORK actually required.  This 
+!                              is defined on normal returns and on an   
+!                              illegal input return for insufficient    
+!                              storage.                                 
+!                                                                       
+!     LIW   :IN     Declared length of IWORK (in user's DIMENSION       
+!                   statement).                                         
+!                                                                       
+!     JAC   :EXT    Name of subroutine for Jacobian matrix (MF =        
+!                   21 or 24).  If used, this name must be declared     
+!                   EXTERNAL in calling program.  If not used, pass a   
+!                   dummy name.  The form of JAC must be:               
+!                                                                       
+!                   SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD)      
+!                   INTEGER  NEQ, ML, MU, NROWPD                        
+!                   KPP_REAL  T, Y(*), PD(NROWPD,*)             
+!                                                                       
+!                   See item c, under "Description" below for more      
+!                   information about JAC.                              
+!                                                                       
+!     MF    :IN     Method flag.  Standard values are:                  
+!                   10  Nonstiff (Adams) method, no Jacobian used.      
+!                   21  Stiff (BDF) method, user-supplied full Jacobian.
+!                   22  Stiff method, internally generated full         
+!                       Jacobian.                                       
+!                   24  Stiff method, user-supplied banded Jacobian.    
+!                   25  Stiff method, internally generated banded       
+!                       Jacobian.                                       
+!                                                                       
+! *Description:                                                         
+!     DLSODE solves the initial value problem for stiff or nonstiff     
+!     systems of first-order ODE's,                                     
+!                                                                       
+!        dy/dt = f(t,y) ,                                               
+!                                                                       
+!     or, in component form,                                            
+!                                                                       
+!        dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ))                  
+!                                                  (i = 1, ..., NEQ) .  
+!                                                                       
+!     DLSODE is a package based on the GEAR and GEARB packages, and on  
+!     the October 23, 1978, version of the tentative ODEPACK user       
+!     interface standard, with minor modifications.                     
+!                                                                       
+!     The steps in solving such a problem are as follows.               
+!                                                                       
+!     a. First write a subroutine of the form                           
+!                                                                       
+!           SUBROUTINE  F (NEQ, T, Y, YDOT)                             
+!           INTEGER  NEQ                                                
+!           KPP_REAL  T, Y(*), YDOT(*)                          
+!                                                                       
+!        which supplies the vector function f by loading YDOT(i) with   
+!        f(i).                                                          
+!                                                                       
+!     b. Next determine (or guess) whether or not the problem is stiff. 
+!        Stiffness occurs when the Jacobian matrix df/dy has an         
+!        eigenvalue whose real part is negative and large in magnitude  
+!        compared to the reciprocal of the t span of interest.  If the  
+!        problem is nonstiff, use method flag MF = 10.  If it is stiff, 
+!        there are four standard choices for MF, and DLSODE requires the
+!        Jacobian matrix in some form.  This matrix is regarded either  
+!        as full (MF = 21 or 22), or banded (MF = 24 or 25).  In the    
+!        banded case, DLSODE requires two half-bandwidth parameters ML  
+!        and MU. These are, respectively, the widths of the lower and   
+!        upper parts of the band, excluding the main diagonal.  Thus the
+!        band consists of the locations (i,j) with                      
+!                                                                       
+!           i - ML <= j <= i + MU ,                                     
+!                                                                       
+!        and the full bandwidth is ML + MU + 1 .                        
+!                                                                       
+!     c. If the problem is stiff, you are encouraged to supply the      
+!        Jacobian directly (MF = 21 or 24), but if this is not feasible,
+!        DLSODE will compute it internally by difference quotients (MF =
+!        22 or 25).  If you are supplying the Jacobian, write a         
+!        subroutine of the form                                         
+!                                                                       
+!           SUBROUTINE  JAC (NEQ, T, Y, ML, MU, PD, NROWPD)             
+!           INTEGER  NEQ, ML, MU, NRWOPD                                
+!           KPP_REAL  T, Y(*), PD(NROWPD,*)                     
+!                                                                       
+!        which provides df/dy by loading PD as follows:                 
+!        - For a full Jacobian (MF = 21), load PD(i,j) with df(i)/dy(j),
+!          the partial derivative of f(i) with respect to y(j).  (Ignore
+!          the ML and MU arguments in this case.)                       
+!        - For a banded Jacobian (MF = 24), load PD(i-j+MU+1,j) with    
+!          df(i)/dy(j); i.e., load the diagonal lines of df/dy into the 
+!          rows of PD from the top down.                                
+!        - In either case, only nonzero elements need be loaded.        
+!                                                                       
+!     d. Write a main program that calls subroutine DLSODE once for each
+!        point at which answers are desired.  This should also provide  
+!        for possible use of logical unit 6 for output of error messages
+!        by DLSODE.                                                     
+!                                                                       
+!        Before the first call to DLSODE, set ISTATE = 1, set Y and T to
+!        the initial values, and set TOUT to the first output point.  To
+!        continue the integration after a successful return, simply     
+!        reset TOUT and call DLSODE again.  No other parameters need be 
+!        reset.                                                         
+!                                                                       
+! *Examples:                                                            
+!     The following is a simple example problem, with the coding needed 
+!     for its solution by DLSODE. The problem is from chemical kinetics,
+!     and consists of the following three rate equations:               
+!                                                                       
+!        dy1/dt = -.04*y1 + 1.E4*y2*y3                                  
+!        dy2/dt = .04*y1 - 1.E4*y2*y3 - 3.E7*y2**2                      
+!        dy3/dt = 3.E7*y2**2                                            
+!                                                                       
+!     on the interval from t = 0.0 to t = 4.E10, with initial conditions
+!     y1 = 1.0, y2 = y3 = 0. The problem is stiff.                      
+!                                                                       
+!     The following coding solves this problem with DLSODE, using       
+!     MF = 21 and printing results at t = .4, 4., ..., 4.E10.  It uses  
+!     ITOL = 2 and AbsTol much smaller for y2 than for y1 or y3 because y2
+!     has much smaller values.  At the end of the run, statistical      
+!     quantities of interest are printed.                               
+!                                                                       
+!        EXTERNAL  FEX, JEX                                             
+!        INTEGER  IOPT, IOUT, ISTATE, ITASK, ITOL, IWORK(23), LIW, LRW, 
+!       *         MF, NEQ                                               
+!        KPP_REAL  AbsTol(3), RelTol, RWORK(58), T, TOUT, Y(3)      
+!        NEQ = 3                                                        
+!        Y(1) = 1.D0                                                    
+!        Y(2) = 0.D0                                                    
+!        Y(3) = 0.D0                                                    
+!        T = 0.D0                                                       
+!        TOUT = .4D0                                                    
+!        ITOL = 2                                                       
+!        RelTol = 1.D-4                                                   
+!        AbsTol(1) = 1.D-6                                                
+!        AbsTol(2) = 1.D-10                                               
+!        AbsTol(3) = 1.D-6                                                
+!        ITASK = 1                                                      
+!        ISTATE = 1                                                     
+!        IOPT = 0                                                       
+!        LRW = 58                                                       
+!        LIW = 23                                                       
+!        MF = 21                                                        
+!        DO 40 IOUT = 1,12                                              
+!          CALL DLSODE (FEX, NEQ, Y, T, TOUT, ITOL, RelTol, AbsTol, ITASK,  
+!       *               ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JEX, MF)  
+!          WRITE(6,20)  T, Y(1), Y(2), Y(3)                             
+!    20    FORMAT(' At t =',D12.4,'   y =',3D14.6)                      
+!          IF (ISTATE .LT. 0)  GO TO 80                                 
+!    40    TOUT = TOUT*10.D0                                            
+!        WRITE(6,60)  IWORK(11), IWORK(12), IWORK(13)                   
+!    60  FORMAT(/' No. steps =',i4,',  No. f-s =',i4,',  No. J-s =',i4) 
+!        STOP                                                           
+!    80  WRITE(6,90)  ISTATE                                            
+!    90  FORMAT(///' Error halt.. ISTATE =',I3)                         
+!        STOP                                                           
+!        END                                                            
+!                                                                       
+!        SUBROUTINE  FEX (NEQ, T, Y, YDOT)                              
+!        INTEGER  NEQ                                                   
+!        KPP_REAL  T, Y(3), YDOT(3)                             
+!        YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)                         
+!        YDOT(3) = 3.D7*Y(2)*Y(2)                                       
+!        YDOT(2) = -YDOT(1) - YDOT(3)                                   
+!        RETURN                                                         
+!        END                                                            
+!                                                                       
+!        SUBROUTINE  JEX (NEQ, T, Y, ML, MU, PD, NRPD)                  
+!        INTEGER  NEQ, ML, MU, NRPD                                     
+!        KPP_REAL  T, Y(3), PD(NRPD,3)                          
+!        PD(1,1) = -.04D0                                               
+!        PD(1,2) = 1.D4*Y(3)                                            
+!        PD(1,3) = 1.D4*Y(2)                                            
+!        PD(2,1) = .04D0                                                
+!        PD(2,3) = -PD(1,3)                                             
+!        PD(3,2) = 6.D7*Y(2)                                            
+!        PD(2,2) = -PD(1,2) - PD(3,2)                                   
+!        RETURN                                                         
+!        END                                                            
+!                                                                       
+!     The output from this program (on a Cray-1 in single precision)    
+!     is as follows.                                                    
+!                                                                       
+!     At t =  4.0000e-01   y =  9.851726e-01  3.386406e-05  1.479357e-02
+!     At t =  4.0000e+00   y =  9.055142e-01  2.240418e-05  9.446344e-02
+!     At t =  4.0000e+01   y =  7.158050e-01  9.184616e-06  2.841858e-01
+!     At t =  4.0000e+02   y =  4.504846e-01  3.222434e-06  5.495122e-01
+!     At t =  4.0000e+03   y =  1.831701e-01  8.940379e-07  8.168290e-01
+!     At t =  4.0000e+04   y =  3.897016e-02  1.621193e-07  9.610297e-01
+!     At t =  4.0000e+05   y =  4.935213e-03  1.983756e-08  9.950648e-01
+!     At t =  4.0000e+06   y =  5.159269e-04  2.064759e-09  9.994841e-01
+!     At t =  4.0000e+07   y =  5.306413e-05  2.122677e-10  9.999469e-01
+!     At t =  4.0000e+08   y =  5.494530e-06  2.197825e-11  9.999945e-01
+!     At t =  4.0000e+09   y =  5.129458e-07  2.051784e-12  9.999995e-01
+!     At t =  4.0000e+10   y = -7.170603e-08 -2.868241e-13  1.000000e+00
+!                                                                       
+!     No. steps = 330,  No. f-s = 405,  No. J-s = 69                    
+!                                                                       
+! *Accuracy:                                                            
+!     The accuracy of the solution depends on the choice of tolerances  
+!     RelTol and AbsTol.  Actual (global) errors may exceed these local     
+!     tolerances, so choose them conservatively.                        
+!                                                                       
+! *Cautions:                                                            
+!     The work arrays should not be altered between calls to DLSODE for 
+!     the same problem, except possibly for the conditional and optional
+!     inputs.                                                           
+!                                                                       
+! *Portability:                                                         
+!     Since NEQ is dimensioned inside DLSODE, some compilers may object 
+!     to a call to DLSODE with NEQ a scalar variable.  In this event,   
+!     use DIMENSION NEQ.  Similar remarks apply to RelTol and AbsTol.    
+!                                                                       
+!     Note to Cray users:                                               
+!     For maximum efficiency, use the CFT77 compiler.  Appropriate      
+!     compiler optimization directives have been inserted for CFT77.    
+!                                                                       
+! *Reference:                                                           
+!     Alan C. Hindmarsh, "ODEPACK, A Systematized Collection of ODE     
+!     Solvers," in Scientific Computing, R. S. Stepleman, et al., Eds.  
+!     (North-Holland, Amsterdam, 1983), pp. 55-64.                      
+!                                                                       
+! *Long Description:                                                    
+!     The following complete description of the user interface to       
+!     DLSODE consists of four parts:                                    
+!                                                                       
+!     1.  The call sequence to subroutine DLSODE, which is a driver     
+!         routine for the solver.  This includes descriptions of both   
+!         the call sequence arguments and user-supplied routines.       
+!         Following these descriptions is a description of optional     
+!         inputs available through the call sequence, and then a        
+!         description of optional outputs in the work arrays.           
+!                                                                       
+!     2.  Descriptions of other routines in the DLSODE package that may 
+!         be (optionally) called by the user.  These provide the ability
+!         to alter error message handling, save and restore the internal
+!         COMMON, and obtain specified derivatives of the solution y(t).
+!                                                                       
+!     3.  Descriptions of COMMON block to be declared in overlay or     
+!         similar environments, or to be saved when doing an interrupt  
+!         of the problem and continued solution later.                  
+!                                                                       
+!     4.  Description of two routines in the DLSODE package, either of  
+!         which the user may replace with his own version, if desired.  
+!         These relate to the measurement of errors.                    
+!                                                                       
+!                                                                       
+!                         Part 1.  Call Sequence                        
+!                         ----------------------                        
+!                                                                       
+!     Arguments                                                         
+!     ---------                                                         
+!     The call sequence parameters used for input only are              
+!                                                                       
+!        F, NEQ, TOUT, ITOL, RelTol, AbsTol, ITASK, IOPT, LRW, LIW, JAC, MF,
+!                                                                       
+!     and those used for both input and output are                      
+!                                                                       
+!        Y, T, ISTATE.                                                  
+!                                                                       
+!     The work arrays RWORK and IWORK are also used for conditional and 
+!     optional inputs and optional outputs.  (The term output here      
+!     refers to the return from subroutine DLSODE to the user's calling 
+!     program.)                                                         
+!                                                                       
+!     The legality of input parameters will be thoroughly checked on the
+!     initial call for the problem, but not checked thereafter unless a 
+!     change in input parameters is flagged by ISTATE = 3 on input.     
+!                                                                       
+!     The descriptions of the call arguments are as follows.            
+!                                                                       
+!     F        The name of the user-supplied subroutine defining the ODE
+!              system.  The system must be put in the first-order form  
+!              dy/dt = f(t,y), where f is a vector-valued function of   
+!              the scalar t and the vector y. Subroutine F is to compute
+!              the function f. It is to have the form                   
+!                                                                       
+!                 SUBROUTINE F (NEQ, T, Y, YDOT)                        
+!                 KPP_REAL  T, Y(*), YDOT(*)                    
+!                                                                       
+!              where NEQ, T, and Y are input, and the array YDOT =      
+!              f(T,Y) is output.  Y and YDOT are arrays of length NEQ.  
+!              Subroutine F should not alter Y(1),...,Y(NEQ).  F must be
+!              declared EXTERNAL in the calling program.                
+!                                                                       
+!              Subroutine F may access user-defined quantities in       
+!              NEQ(2),... and/or in Y(NEQ+1),..., if NEQ is an array 
+!              (dimensioned in F) and/or Y has length exceeding NEQ. 
+!              See the descriptions of NEQ and Y below.                 
+!                                                                       
+!              If quantities computed in the F routine are needed       
+!              externally to DLSODE, an extra call to F should be made  
+!              for this purpose, for consistent and accurate results.   
+!              If only the derivative dy/dt is needed, use DINTDY       
+!              instead.                                                 
+!                                                                       
+!     NEQ      The size of the ODE system (number of first-order        
+!              ordinary differential equations).  Used only for input.  
+!              NEQ may be decreased, but not increased, during the      
+!              problem.  If NEQ is decreased (with ISTATE = 3 on input),
+!              the remaining components of Y should be left undisturbed,
+!              if these are to be accessed in F and/or JAC.             
+!                                                                       
+!              Normally, NEQ is a scalar, and it is generally referred  
+!              to as a scalar in this user interface description.       
+!              However, NEQ may be an array, with NEQ set to the     
+!              system size.  (The DLSODE package accesses only NEQ.) 
+!              In either case, this parameter is passed as the NEQ      
+!              argument in all calls to F and JAC.  Hence, if it is an  
+!              array, locations NEQ(2),... may be used to store other   
+!              integer data and pass it to F and/or JAC.  Subroutines   
+!              F and/or JAC must include NEQ in a DIMENSION statement   
+!              in that case.                                            
+!                                                                       
+!     Y        A real array for the vector of dependent variables, of   
+!              length NEQ or more.  Used for both input and output on   
+!              the first call (ISTATE = 1), and only for output on      
+!              other calls.  On the first call, Y must contain the      
+!              vector of initial values.  On output, Y contains the     
+!              computed solution vector, evaluated at T. If desired,    
+!              the Y array may be used for other purposes between       
+!              calls to the solver.                                     
+!                                                                       
+!              This array is passed as the Y argument in all calls to F 
+!              and JAC.  Hence its length may exceed NEQ, and locations 
+!              Y(NEQ+1),... may be used to store other real data and    
+!              pass it to F and/or JAC.  (The DLSODE package accesses   
+!              only Y(1),...,Y(NEQ).)                                   
+!                                                                       
+!     T        The independent variable.  On input, T is used only on   
+!              the first call, as the initial point of the integration. 
+!              On output, after each call, T is the value at which a    
+!              computed solution Y is evaluated (usually the same as    
+!              TOUT).  On an error return, T is the farthest point      
+!              reached.                                                 
+!                                                                       
+!     TOUT     The next value of T at which a computed solution is      
+!              desired.  Used only for input.                           
+!                                                                       
+!              When starting the problem (ISTATE = 1), TOUT may be equal
+!              to T for one call, then should not equal T for the next  
+!              call.  For the initial T, an input value of TOUT .NE. T  
+!              is used in order to determine the direction of the       
+!              integration (i.e., the algebraic sign of the step sizes) 
+!              and the rough scale of the problem.  Integration in      
+!              either direction (forward or backward in T) is permitted.
+!                                                                       
+!              If ITASK = 2 or 5 (one-step modes), TOUT is ignored      
+!              after the first call (i.e., the first call with          
+!              TOUT .NE. T).  Otherwise, TOUT is required on every call.
+!                                                                       
+!              If ITASK = 1, 3, or 4, the values of TOUT need not be    
+!              monotone, but a value of TOUT which backs up is limited  
+!              to the current internal T interval, whose endpoints are  
+!              TCUR - HU and TCUR.  (See "Optional Outputs" below for   
+!              TCUR and HU.)                                            
+!                                                                       
+!                                                                       
+!     ITOL     An indicator for the type of error control.  See         
+!              description below under AbsTol.  Used only for input.      
+!                                                                       
+!     RelTol     A relative error tolerance parameter, either a scalar or 
+!              an array of length NEQ.  See description below under     
+!              AbsTol.  Input only.                                       
+!                                                                       
+!     AbsTol     An absolute error tolerance parameter, either a scalar or
+!              an array of length NEQ.  Input only.                     
+!                                                                       
+!              The input parameters ITOL, RelTol, and AbsTol determine the  
+!              error control performed by the solver.  The solver will  
+!              control the vector e = (e(i)) of estimated local errors  
+!              in Y, according to an inequality of the form             
+!                                                                       
+!                 rms-norm of ( e(i)/EWT(i) ) <= 1,                     
+!                                                                       
+!              where                                                    
+!                                                                       
+!                 EWT(i) = RelTol(i)*ABS(Y(i)) + AbsTol(i),                 
+!                                                                       
+!              and the rms-norm (root-mean-square norm) here is         
+!                                                                       
+!                 rms-norm(v) = SQRT(sum v(i)**2 / NEQ).                
+!                                                                       
+!              Here EWT = (EWT(i)) is a vector of weights which must    
+!              always be positive, and the values of RelTol and AbsTol      
+!              should all be nonnegative.  The following table gives the
+!              types (scalar/array) of RelTol and AbsTol, and the           
+!              corresponding form of EWT(i).                            
+!                                                                       
+!              ITOL    RelTol      AbsTol      EWT(i)                       
+!              ----    ------    ------    -----------------------------
+!              1       scalar    scalar    RelTol*ABS(Y(i)) + AbsTol        
+!              2       scalar    array     RelTol*ABS(Y(i)) + AbsTol(i)     
+!              3       array     scalar    RelTol(i)*ABS(Y(i)) + AbsTol     
+!              4       array     array     RelTol(i)*ABS(Y(i)) + AbsTol(i)  
+!                                                                       
+!              When either of these parameters is a scalar, it need not 
+!              be dimensioned in the user's calling program.            
+!                                                                       
+!              If none of the above choices (with ITOL, RelTol, and AbsTol  
+!              fixed throughout the problem) is suitable, more general  
+!              error controls can be obtained by substituting           
+!              user-supplied routines for the setting of EWT and/or for 
+!              the norm calculation.  See Part 4 below.                 
+!                                                                       
+!              If global errors are to be estimated by making a repeated
+!              run on the same problem with smaller tolerances, then all
+!              components of RelTol and AbsTol (i.e., of EWT) should be     
+!              scaled down uniformly.                                   
+!                                                                       
+!     ITASK    An index specifying the task to be performed.  Input     
+!              only.  ITASK has the following values and meanings:      
+!              1   Normal computation of output values of y(t) at       
+!                  t = TOUT (by overshooting and interpolating).        
+!              2   Take one step only and return.                       
+!              3   Stop at the first internal mesh point at or beyond   
+!                  t = TOUT and return.                                 
+!              4   Normal computation of output values of y(t) at       
+!                  t = TOUT but without overshooting t = TCRIT.  TCRIT  
+!                  must be input as RWORK(1).  TCRIT may be equal to or 
+!                  beyond TOUT, but not behind it in the direction of   
+!                  integration.  This option is useful if the problem   
+!                  has a singularity at or beyond t = TCRIT.            
+!              5   Take one step, without passing TCRIT, and return.    
+!                  TCRIT must be input as RWORK(1).                     
+!                                                                       
+!              Note:  If ITASK = 4 or 5 and the solver reaches TCRIT    
+!              (within roundoff), it will return T = TCRIT (exactly) to 
+!              indicate this (unless ITASK = 4 and TOUT comes before    
+!              TCRIT, in which case answers at T = TOUT are returned    
+!              first).                                                  
+!                                                                       
+!     ISTATE   An index used for input and output to specify the state  
+!              of the calculation.                                      
+!                                                                       
+!              On input, the values of ISTATE are as follows:           
+!              1   This is the first call for the problem               
+!                  (initializations will be done).  See "Note" below.   
+!              2   This is not the first call, and the calculation is to
+!                  continue normally, with no change in any input       
+!                  parameters except possibly TOUT and ITASK.  (If ITOL,
+!                  RelTol, and/or AbsTol are changed between calls with     
+!                  ISTATE = 2, the new values will be used but not      
+!                  tested for legality.)                                
+!              3   This is not the first call, and the calculation is to
+!                  continue normally, but with a change in input        
+!                  parameters other than TOUT and ITASK.  Changes are   
+!                  allowed in NEQ, ITOL, RelTol, AbsTol, IOPT, LRW, LIW, MF,
+!                  ML, MU, and any of the optional inputs except H0.    
+!                  (See IWORK description for ML and MU.)               
+!                                                                       
+!              Note:  A preliminary call with TOUT = T is not counted as
+!              a first call here, as no initialization or checking of   
+!              input is done.  (Such a call is sometimes useful for the 
+!              purpose of outputting the initial conditions.)  Thus the 
+!              first call for which TOUT .NE. T requires ISTATE = 1 on  
+!              input.                                                   
+!                                                                       
+!              On output, ISTATE has the following values and meanings: 
+!               1  Nothing was done, as TOUT was equal to T with        
+!                  ISTATE = 1 on input.                                 
+!               2  The integration was performed successfully.          
+!              -1  An excessive amount of work (more than MXSTEP steps) 
+!                  was done on this call, before completing the         
+!                  requested task, but the integration was otherwise    
+!                  successful as far as T. (MXSTEP is an optional input 
+!                  and is normally 500.)  To continue, the user may     
+!                  simply reset ISTATE to a value >1 and call again (the
+!                  excess work step counter will be reset to 0).  In    
+!                  addition, the user may increase MXSTEP to avoid this 
+!                  error return; see "Optional Inputs" below.           
+!              -2  Too much accuracy was requested for the precision of 
+!                  the machine being used.  This was detected before    
+!                  completing the requested task, but the integration   
+!                  was successful as far as T. To continue, the         
+!                  tolerance parameters must be reset, and ISTATE must  
+!                  be set to 3. The optional output TOLSF may be used   
+!                  for this purpose.  (Note:  If this condition is      
+!                  detected before taking any steps, then an illegal    
+!                  input return (ISTATE = -3) occurs instead.)          
+!              -3  Illegal input was detected, before taking any        
+!                  integration steps.  See written message for details. 
+!                  (Note:  If the solver detects an infinite loop of    
+!                  calls to the solver with illegal input, it will cause
+!                  the run to stop.)                                    
+!              -4  There were repeated error-test failures on one       
+!                  attempted step, before completing the requested task,
+!                  but the integration was successful as far as T.  The 
+!                  problem may have a singularity, or the input may be  
+!                  inappropriate.                                       
+!              -5  There were repeated convergence-test failures on one 
+!                  attempted step, before completing the requested task,
+!                  but the integration was successful as far as T. This 
+!                  may be caused by an inaccurate Jacobian matrix, if   
+!                  one is being used.                                   
+!              -6  EWT(i) became zero for some i during the integration.
+!                  Pure relative error control (AbsTol(i)=0.0) was        
+!                  requested on a variable which has now vanished.  The 
+!                  integration was successful as far as T.              
+!                                                                       
+!              Note:  Since the normal output value of ISTATE is 2, it  
+!              does not need to be reset for normal continuation.  Also,
+!              since a negative input value of ISTATE will be regarded  
+!              as illegal, a negative output value requires the user to 
+!              change it, and possibly other inputs, before calling the 
+!              solver again.                                            
+!                                                                       
+!     IOPT     An integer flag to specify whether any optional inputs   
+!              are being used on this call.  Input only.  The optional  
+!              inputs are listed under a separate heading below.        
+!              0   No optional inputs are being used.  Default values   
+!                  will be used in all cases.                           
+!              1   One or more optional inputs are being used.          
+!                                                                       
+!     RWORK    A real working array (double precision).  The length of  
+!              RWORK must be at least                                   
+!                                                                       
+!                 20 + NYH*(MAXORD + 1) + 3*NEQ + LWM                   
+!                                                                       
+!              where                                                    
+!                 NYH = the initial value of NEQ,                       
+!              MAXORD = 12 (if METH = 1) or 5 (if METH = 2) (unless a   
+!                       smaller value is given as an optional input),   
+!                 LWM = 0           if MITER = 0,                       
+!                 LWM = NEQ**2 + 2  if MITER = 1 or 2,                  
+!                 LWM = NEQ + 2     if MITER = 3, and                   
+!                 LWM = (2*ML + MU + 1)*NEQ + 2                         
+!                                   if MITER = 4 or 5.                  
+!              (See the MF description below for METH and MITER.)       
+!                                                                       
+!              Thus if MAXORD has its default value and NEQ is constant,
+!              this length is:                                          
+!              20 + 16*NEQ                    for MF = 10,              
+!              22 + 16*NEQ + NEQ**2           for MF = 11 or 12,        
+!              22 + 17*NEQ                    for MF = 13,              
+!              22 + 17*NEQ + (2*ML + MU)*NEQ  for MF = 14 or 15,        
+!              20 +  9*NEQ                    for MF = 20,              
+!              22 +  9*NEQ + NEQ**2           for MF = 21 or 22,        
+!              22 + 10*NEQ                    for MF = 23,              
+!              22 + 10*NEQ + (2*ML + MU)*NEQ  for MF = 24 or 25.        
+!                                                                       
+!              The first 20 words of RWORK are reserved for conditional 
+!              and optional inputs and optional outputs.                
+!                                                                       
+!              The following word in RWORK is a conditional input:      
+!              RWORK(1) = TCRIT, the critical value of t which the      
+!                         solver is not to overshoot.  Required if ITASK
+!                         is 4 or 5, and ignored otherwise.  See ITASK. 
+!                                                                       
+!     LRW      The length of the array RWORK, as declared by the user.  
+!              (This will be checked by the solver.)                    
+!                                                                       
+!     IWORK    An integer work array.  Its length must be at least      
+!              20       if MITER = 0 or 3 (MF = 10, 13, 20, 23), or     
+!              20 + NEQ otherwise (MF = 11, 12, 14, 15, 21, 22, 24, 25).
+!              (See the MF description below for MITER.)  The first few 
+!              words of IWORK are used for conditional and optional     
+!              inputs and optional outputs.                             
+!                                                                       
+!              The following two words in IWORK are conditional inputs: 
+!              IWORK(1) = ML   These are the lower and upper half-      
+!              IWORK(2) = MU   bandwidths, respectively, of the banded  
+!                              Jacobian, excluding the main diagonal.   
+!                         The band is defined by the matrix locations   
+!                         (i,j) with i - ML <= j <= i + MU. ML and MU   
+!                         must satisfy 0 <= ML,MU <= NEQ - 1. These are 
+!                         required if MITER is 4 or 5, and ignored      
+!                         otherwise.  ML and MU may in fact be the band 
+!                         parameters for a matrix to which df/dy is only
+!                         approximately equal.                          
+!                                                                       
+!     LIW      The length of the array IWORK, as declared by the user.  
+!              (This will be checked by the solver.)                    
+!                                                                       
+!     Note:  The work arrays must not be altered between calls to DLSODE
+!     for the same problem, except possibly for the conditional and     
+!     optional inputs, and except for the last 3*NEQ words of RWORK.    
+!     The latter space is used for internal scratch space, and so is    
+!     available for use by the user outside DLSODE between calls, if    
+!     desired (but not for use by F or JAC).                            
+!                                                                       
+!     JAC      The name of the user-supplied routine (MITER = 1 or 4) to
+!              compute the Jacobian matrix, df/dy, as a function of the 
+!              scalar t and the vector y.  (See the MF description below
+!              for MITER.)  It is to have the form                      
+!                                                                       
+!                 SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD)        
+!                 KPP_REAL T, Y(*), PD(NROWPD,*)                
+!                                                                       
+!              where NEQ, T, Y, ML, MU, and NROWPD are input and the    
+!              array PD is to be loaded with partial derivatives        
+!              (elements of the Jacobian matrix) on output.  PD must be 
+!              given a first dimension of NROWPD.  T and Y have the same
+!              meaning as in subroutine F.                              
+!                                                                       
+!              In the full matrix case (MITER = 1), ML and MU are       
+!              ignored, and the Jacobian is to be loaded into PD in     
+!              columnwise manner, with df(i)/dy(j) loaded into PD(i,j). 
+!                                                                       
+!              In the band matrix case (MITER = 4), the elements within 
+!              the band are to be loaded into PD in columnwise manner,  
+!              with diagonal lines of df/dy loaded into the rows of PD. 
+!              Thus df(i)/dy(j) is to be loaded into PD(i-j+MU+1,j).  ML
+!              and MU are the half-bandwidth parameters (see IWORK).    
+!              The locations in PD in the two triangular areas which    
+!              correspond to nonexistent matrix elements can be ignored 
+!              or loaded arbitrarily, as they are overwritten by DLSODE.
+!                                                                       
+!              JAC need not provide df/dy exactly. A crude approximation
+!              (possibly with a smaller bandwidth) will do.             
+!                                                                       
+!              In either case, PD is preset to zero by the solver, so   
+!              that only the nonzero elements need be loaded by JAC.    
+!              Each call to JAC is preceded by a call to F with the same
+!              arguments NEQ, T, and Y. Thus to gain some efficiency,   
+!              intermediate quantities shared by both calculations may  
+!              be saved in a user COMMON block by F and not recomputed  
+!              by JAC, if desired.  Also, JAC may alter the Y array, if 
+!              desired.  JAC must be declared EXTERNAL in the calling   
+!              program.                                                 
+!                                                                       
+!              Subroutine JAC may access user-defined quantities in     
+!              NEQ(2),... and/or in Y(NEQ+1),... if NEQ is an array  
+!              (dimensioned in JAC) and/or Y has length exceeding       
+!              NEQ.  See the descriptions of NEQ and Y above.        
+!                                                                       
+!     MF       The method flag.  Used only for input.  The legal values 
+!              of MF are 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24,    
+!              and 25.  MF has decimal digits METH and MITER:           
+!                 MF = 10*METH + MITER .                                
+!                                                                       
+!              METH indicates the basic linear multistep method:        
+!              1   Implicit Adams method.                               
+!              2   Method based on backward differentiation formulas    
+!                  (BDF's).                                             
+!                                                                       
+!              MITER indicates the corrector iteration method:          
+!              0   Functional iteration (no Jacobian matrix is          
+!                  involved).                                           
+!              1   Chord iteration with a user-supplied full (NEQ by    
+!                  NEQ) Jacobian.                                       
+!              2   Chord iteration with an internally generated         
+!                  (difference quotient) full Jacobian (using NEQ       
+!                  extra calls to F per df/dy value).                   
+!              3   Chord iteration with an internally generated         
+!                  diagonal Jacobian approximation (using one extra call
+!                  to F per df/dy evaluation).                          
+!              4   Chord iteration with a user-supplied banded Jacobian.
+!              5   Chord iteration with an internally generated banded  
+!                  Jacobian (using ML + MU + 1 extra calls to F per     
+!                  df/dy evaluation).                                   
+!                                                                       
+!              If MITER = 1 or 4, the user must supply a subroutine JAC 
+!              (the name is arbitrary) as described above under JAC.    
+!              For other values of MITER, a dummy argument can be used. 
+!                                                                       
+!     Optional Inputs                                                   
+!     ---------------                                                   
+!     The following is a list of the optional inputs provided for in the
+!     call sequence.  (See also Part 2.)  For each such input variable, 
+!     this table lists its name as used in this documentation, its      
+!     location in the call sequence, its meaning, and the default value.
+!     The use of any of these inputs requires IOPT = 1, and in that case
+!     all of these inputs are examined.  A value of zero for any of     
+!     these optional inputs will cause the default value to be used.    
+!     Thus to use a subset of the optional inputs, simply preload       
+!     locations 5 to 10 in RWORK and IWORK to 0.0 and 0 respectively,   
+!     and then set those of interest to nonzero values.                 
+!                                                                       
+!     Name    Location   Meaning and default value                      
+!     ------  ---------  -----------------------------------------------
+!     H0      RWORK(5)   Step size to be attempted on the first step.   
+!                        The default value is determined by the solver. 
+!     HMAX    RWORK(6)   Maximum absolute step size allowed.  The       
+!                        default value is infinite.                     
+!     HMIN    RWORK(7)   Minimum absolute step size allowed.  The       
+!                        default value is 0.  (This lower bound is not  
+!                        enforced on the final step before reaching     
+!                        TCRIT when ITASK = 4 or 5.)                    
+!     MAXORD  IWORK(5)   Maximum order to be allowed.  The default value
+!                        is 12 if METH = 1, and 5 if METH = 2. (See the 
+!                        MF description above for METH.)  If MAXORD     
+!                        exceeds the default value, it will be reduced  
+!                        to the default value.  If MAXORD is changed    
+!                        during the problem, it may cause the current   
+!                        order to be reduced.                           
+!     MXSTEP  IWORK(6)   Maximum number of (internally defined) steps   
+!                        allowed during one call to the solver.  The    
+!                        default value is 500.                          
+!     MXHNIL  IWORK(7)   Maximum number of messages printed (per        
+!                        problem) warning that T + H = T on a step      
+!                        (H = step size).  This must be positive to     
+!                        result in a nondefault value.  The default     
+!                        value is 10.                                   
+!                                                                       
+!     Optional Outputs                                                  
+!     ----------------                                                  
+!     As optional additional output from DLSODE, the variables listed   
+!     below are quantities related to the performance of DLSODE which   
+!     are available to the user.  These are communicated by way of the  
+!     work arrays, but also have internal mnemonic names as shown.      
+!     Except where stated otherwise, all of these outputs are defined on
+!     any successful return from DLSODE, and on any return with ISTATE =
+!     -1, -2, -4, -5, or -6.  On an illegal input return (ISTATE = -3), 
+!     they will be unchanged from their existing values (if any), except
+!     possibly for TOLSF, LENRW, and LENIW.  On any error return,       
+!     outputs relevant to the error will be defined, as noted below.    
+!                                                                       
+!     Name   Location   Meaning                                         
+!     -----  ---------  ------------------------------------------------
+!     HU     RWORK(11)  Step size in t last used (successfully).        
+!     HCUR   RWORK(12)  Step size to be attempted on the next step.     
+!     TCUR   RWORK(13)  Current value of the independent variable which 
+!                       the solver has actually reached, i.e., the      
+!                       current internal mesh point in t. On output,    
+!                       TCUR will always be at least as far as the      
+!                       argument T, but may be farther (if interpolation
+!                       was done).                                      
+!     TOLSF  RWORK(14)  Tolerance scale factor, greater than 1.0,       
+!                       computed when a request for too much accuracy   
+!                       was detected (ISTATE = -3 if detected at the    
+!                       start of the problem, ISTATE = -2 otherwise).   
+!                       If ITOL is left unaltered but RelTol and AbsTol are 
+!                       uniformly scaled up by a factor of TOLSF for the
+!                       next call, then the solver is deemed likely to  
+!                       succeed.  (The user may also ignore TOLSF and   
+!                       alter the tolerance parameters in any other way 
+!                       appropriate.)                                   
+!     NST    IWORK(11)  Number of steps taken for the problem so far.   
+!     NFE    IWORK(12)  Number of F evaluations for the problem so far. 
+!     NJE    IWORK(13)  Number of Jacobian evaluations (and of matrix LU
+!                       decompositions) for the problem so far.         
+!     NQU    IWORK(14)  Method order last used (successfully).          
+!     NQCUR  IWORK(15)  Order to be attempted on the next step.         
+!     IMXER  IWORK(16)  Index of the component of largest magnitude in  
+!                       the weighted local error vector ( e(i)/EWT(i) ),
+!                       on an error return with ISTATE = -4 or -5.      
+!     LENRW  IWORK(17)  Length of RWORK actually required.  This is     
+!                       defined on normal returns and on an illegal     
+!                       input return for insufficient storage.          
+!     LENIW  IWORK(18)  Length of IWORK actually required.  This is     
+!                       defined on normal returns and on an illegal     
+!                       input return for insufficient storage.          
+!                                                                       
+!     The following two arrays are segments of the RWORK array which may
+!     also be of interest to the user as optional outputs.  For each    
+!     array, the table below gives its internal name, its base address  
+!     in RWORK, and its description.                                    
+!                                                                       
+!     Name  Base address  Description                                   
+!     ----  ------------  ----------------------------------------------
+!     YH    21            The Nordsieck history array, of size NYH by   
+!                         (NQCUR + 1), where NYH is the initial value of
+!                         NEQ.  For j = 0,1,...,NQCUR, column j + 1 of  
+!                         YH contains HCUR**j/factorial(j) times the jth
+!                         derivative of the interpolating polynomial    
+!                         currently representing the solution, evaluated
+!                         at t = TCUR.                                  
+!     ACOR  LENRW-NEQ+1   Array of size NEQ used for the accumulated    
+!                         corrections on each step, scaled on output to 
+!                         represent the estimated local error in Y on   
+!                         the last step.  This is the vector e in the   
+!                         description of the error control.  It is      
+!                         defined only on successful return from DLSODE.
+!                                                                       
+!                                                                       
+!                    Part 2.  Other Callable Routines                   
+!                    --------------------------------                   
+!                                                                       
+!     The following are optional calls which the user may make to gain  
+!     additional capabilities in conjunction with DLSODE.               
+!                                                                       
+!     Form of call              Function                                
+!     ------------------------  ----------------------------------------
+!     CALL XSETUN(LUN)          Set the logical unit number, LUN, for   
+!                               output of messages from DLSODE, if the  
+!                               default is not desired.  The default    
+!                               value of LUN is 6. This call may be made
+!                               at any time and will take effect        
+!                               immediately.                            
+!     CALL XSETF(MFLAG)         Set a flag to control the printing of   
+!                               messages by DLSODE.  MFLAG = 0 means do 
+!                               not print.  (Danger:  this risks losing 
+!                               valuable information.)  MFLAG = 1 means 
+!                               print (the default).  This call may be  
+!                               made at any time and will take effect   
+!                               immediately.                            
+!     CALL DSRCOM(RSAV,ISAV,JOB)  Saves and restores the contents of the
+!                               internal COMMON blocks used by DLSODE   
+!                               (see Part 3 below).  RSAV must be a     
+!                               real array of length 218 or more, and   
+!                               ISAV must be an integer array of length 
+!                               37 or more.  JOB = 1 means save COMMON  
+!                               into RSAV/ISAV.  JOB = 2 means restore  
+!                               COMMON from same.  DSRCOM is useful if  
+!                               one is interrupting a run and restarting
+!                               later, or alternating between two or    
+!                               more problems solved with DLSODE.       
+!     CALL DINTDY(,,,,,)        Provide derivatives of y, of various    
+!     (see below)               orders, at a specified point t, if      
+!                               desired.  It may be called only after a 
+!                               successful return from DLSODE.  Detailed
+!                               instructions follow.                    
+!                                                                       
+!     Detailed instructions for using DINTDY                            
+!     --------------------------------------                            
+!     The form of the CALL is:                                          
+!                                                                       
+!           CALL DINTDY (T, K, RWORK(21), NYH, DKY, IFLAG)              
+!                                                                       
+!     The input parameters are:                                         
+!                                                                       
+!     T          Value of independent variable where answers are        
+!                desired (normally the same as the T last returned by   
+!                DLSODE).  For valid results, T must lie between        
+!                TCUR - HU and TCUR.  (See "Optional Outputs" above     
+!                for TCUR and HU.)                                      
+!     K          Integer order of the derivative desired.  K must       
+!                satisfy 0 <= K <= NQCUR, where NQCUR is the current    
+!                order (see "Optional Outputs").  The capability        
+!                corresponding to K = 0, i.e., computing y(t), is       
+!                already provided by DLSODE directly.  Since            
+!                NQCUR >= 1, the first derivative dy/dt is always       
+!                available with DINTDY.                                 
+!     RWORK(21)  The base address of the history array YH.              
+!     NYH        Column length of YH, equal to the initial value of NEQ.
+!                                                                       
+!     The output parameters are:                                        
+!                                                                       
+!     DKY        Real array of length NEQ containing the computed value 
+!                of the Kth derivative of y(t).                         
+!     IFLAG      Integer flag, returned as 0 if K and T were legal,     
+!                -1 if K was illegal, and -2 if T was illegal.          
+!                On an error return, a message is also written.         
+!                                                                       
+!                                                                       
+!                          Part 3.  Common Blocks                       
+!                          ----------------------                       
+!                                                                       
+!     If DLSODE is to be used in an overlay situation, the user must    
+!     declare, in the primary overlay, the variables in:                
+!     (1) the call sequence to DLSODE,                                  
+!     (2) the internal COMMON block /DLS001/, of length 255             
+!         (218 double precision words followed by 37 integer words).    
+!                                                                       
+!     If DLSODE is used on a system in which the contents of internal   
+!     COMMON blocks are not preserved between calls, the user should    
+!     declare the above COMMON block in his main program to insure that 
+!     its contents are preserved.                                       
+!                                                                       
+!     If the solution of a given problem by DLSODE is to be interrupted 
+!     and then later continued, as when restarting an interrupted run or
+!     alternating between two or more problems, the user should save,   
+!     following the return from the last DLSODE call prior to the       
+!     interruption, the contents of the call sequence variables and the 
+!     internal COMMON block, and later restore these values before the  
+!     next DLSODE call for that problem.   In addition, if XSETUN and/or
+!     XSETF was called for non-default handling of error messages, then 
+!     these calls must be repeated.  To save and restore the COMMON     
+!     block, use subroutine DSRCOM (see Part 2 above).                  
+!                                                                       
+!                                                                       
+!              Part 4.  Optionally Replaceable Solver Routines          
+!              -----------------------------------------------          
+!                                                                       
+!     Below are descriptions of two routines in the DLSODE package which
+!     relate to the measurement of errors.  Either routine can be       
+!     replaced by a user-supplied version, if desired.  However, since  
+!     such a replacement may have a major impact on performance, it     
+!     should be done only when absolutely necessary, and only with great
+!     caution.  (Note:  The means by which the package version of a     
+!     routine is superseded by the user's version may be system-        
+!     dependent.)                                                       
+!                                                                       
+!     DEWSET                                                            
+!     ------                                                            
+!     The following subroutine is called just before each internal      
+!     integration step, and sets the array of error weights, EWT, as    
+!     described under ITOL/RelTol/AbsTol above:                             
+!                                                                       
+!           SUBROUTINE DEWSET (NEQ, ITOL, RelTol, AbsTol, YCUR, EWT)        
+!                                                                       
+!     where NEQ, ITOL, RelTol, and AbsTol are as in the DLSODE call         
+!     sequence, YCUR contains the current dependent variable vector,    
+!     and EWT is the array of weights set by DEWSET.                    
+!                                                                       
+!     If the user supplies this subroutine, it must return in EWT(i)    
+!     (i = 1,...,NEQ) a positive quantity suitable for comparing errors 
+!     in Y(i) to.  The EWT array returned by DEWSET is passed to the    
+!     DVNORM routine (see below), and also used by DLSODE in the        
+!     computation of the optional output IMXER, the diagonal Jacobian   
+!     approximation, and the increments for difference quotient         
+!     Jacobians.                                                        
+!                                                                       
+!     In the user-supplied version of DEWSET, it may be desirable to use
+!     the current values of derivatives of y. Derivatives up to order NQ
+!     are available from the history array YH, described above under    
+!     optional outputs.  In DEWSET, YH is identical to the YCUR array,  
+!     extended to NQ + 1 columns with a column length of NYH and scale  
+!     factors of H**j/factorial(j).  On the first call for the problem, 
+!     given by NST = 0, NQ is 1 and H is temporarily set to 1.0.        
+!     NYH is the initial value of NEQ.  The quantities NQ, H, and NST   
+!     can be obtained by including in SEWSET the statements:            
+!           KPP_REAL RLS                                        
+!           COMMON /DLS001/ RLS(218),ILS(37)                            
+!           NQ = ILS(33)                                                
+!           NST = ILS(34)                                               
+!           H = RLS(212)                                                
+!     Thus, for example, the current value of dy/dt can be obtained as  
+!     YCUR(NYH+i)/H (i=1,...,NEQ) (and the division by H is unnecessary 
+!     when NST = 0).                                                    
+!                                                                       
+!     DVNORM                                                            
+!     ------                                                            
+!     DVNORM is a real function routine which computes the weighted     
+!     root-mean-square norm of a vector v:                              
+!                                                                       
+!        d = DVNORM (n, v, w)                                           
+!                                                                       
+!     where:                                                            
+!     n = the length of the vector,                                     
+!     v = real array of length n containing the vector,                 
+!     w = real array of length n containing weights,                    
+!     d = SQRT( (1/n) * sum(v(i)*w(i))**2 ).                            
+!                                                                       
+!     DVNORM is called with n = NEQ and with w(i) = 1.0/EWT(i), where   
+!     EWT is as set by subroutine DEWSET.                               
+!                                                                       
+!     If the user supplies this function, it should return a nonnegative
+!     value of DVNORM suitable for use in the error control in DLSODE.  
+!     None of the arguments should be altered by DVNORM.  For example, a
+!     user-supplied DVNORM routine might:                               
+!     - Substitute a max-norm of (v(i)*w(i)) for the rms-norm, or       
+!     - Ignore some components of v in the norm, with the effect of     
+!       suppressing the error control on those components of Y.         
+!  ---------------------------------------------------------------------
+!***ROUTINES CALLED  DEWSET, DINTDY, DUMACH, DSTODE, DVNORM, XERRWD     
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYYYMMDD)                                        
+! 19791129  DATE WRITTEN                                                
+! 19791213  Minor changes to declarations; DELP init. in STODE.         
+! 19800118  Treat NEQ as array; integer declarations added throughout;  
+!           minor changes to prologue.                                  
+! 19800306  Corrected TESCO(1,NQP1) setting in CFODE.                   
+! 19800519  Corrected access of YH on forced order reduction;           
+!           numerous corrections to prologues and other comments.       
+! 19800617  In main driver, added loading of SQRT(UROUND) in RWORK;     
+!           minor corrections to main prologue.                         
+! 19800923  Added zero initialization of HU and NQU.                    
+! 19801218  Revised XERRWD routine; minor corrections to main prologue. 
+! 19810401  Minor changes to comments and an error message.             
+! 19810814  Numerous revisions: replaced EWT by 1/EWT; used flags       
+!           JCUR, ICF, IERPJ, IERSL between STODE and subordinates;     
+!           added tuning parameters CCMAX, MAXCOR, MSBP, MXNCF;         
+!           reorganized returns from STODE; reorganized type decls.;    
+!           fixed message length in XERRWD; changed default LUNIT to 6; 
+!           changed Common lengths; changed comments throughout.        
+! 19870330  Major update by ACH: corrected comments throughout;         
+!           removed TRET from Common; rewrote EWSET with 4 loops;       
+!           fixed t test in INTDY; added Cray directives in STODE;      
+!           in STODE, fixed DELP init. and logic around PJAC call;      
+!           combined routines to save/restore Common;                   
+!           passed LEVEL = 0 in error message calls (except run abort). 
+! 19890426  Modified prologue to SLATEC/LDOC format.  (FNF)             
+! 19890501  Many improvements to prologue.  (FNF)                       
+! 19890503  A few final corrections to prologue.  (FNF)                 
+! 19890504  Minor cosmetic changes.  (FNF)                              
+! 19890510  Corrected description of Y in Arguments section.  (FNF)     
+! 19890517  Minor corrections to prologue.  (FNF)                       
+! 19920514  Updated with prologue edited 891025 by G. Shaw for manual.  
+! 19920515  Converted source lines to upper case.  (FNF)                
+! 19920603  Revised XERRWD calls using mixed upper-lower case.  (ACH)   
+! 19920616  Revised prologue comment regarding CFT.  (ACH)              
+! 19921116  Revised prologue comments regarding Common.  (ACH).         
+! 19930326  Added comment about non-reentrancy.  (FNF)                  
+! 19930723  Changed D1MACH to DUMACH. (FNF)                             
+! 19930801  Removed ILLIN and NTREP from Common (affects driver logic); 
+!           minor changes to prologue and internal comments;            
+!           changed Hollerith strings to quoted strings;                
+!           changed internal comments to mixed case;                    
+!           replaced XERRWD with new version using character type;      
+!           changed dummy dimensions from 1 to *. (ACH)                 
+! 19930809  Changed to generic intrinsic names; changed names of        
+!           subprograms and Common blocks to DLSODE etc. (ACH)          
+! 19930929  Eliminated use of REAL intrinsic; other minor changes. (ACH)
+! 20010412  Removed all 'own' variables from Common block /DLS001/      
+!           (affects declarations in 6 routines). (ACH)                 
+! 20010509  Minor corrections to prologue. (ACH)                        
+! 20031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+! 20031112  Added SAVE statements for data-loaded constants.            
+!                                                                       
+!***END PROLOGUE  DLSODE                                                
+!                                                                       
+!*Internal Notes:                                                       
+!                                                                       
+! Other Routines in the DLSODE Package.                                 
+!                                                                       
+! In addition to Subroutine DLSODE, the DLSODE package includes the     
+! following subroutines and function routines:                          
+!  DINTDY   computes an interpolated value of the y vector at t = TOUT. 
+!  DSTODE   is the core integrator, which does one step of the          
+!           integration and the associated error control.               
+!  DCFODE   sets all method coefficients and test constants.            
+!  DPREPJ   computes and preprocesses the Jacobian matrix J = df/dy     
+!           and the Newton iteration matrix P = I - h*l0*J.             
+!  DSOLSY   manages solution of linear system in chord iteration.       
+!  DEWSET   sets the error weight vector EWT before each step.          
+!  DVNORM   computes the weighted R.M.S. norm of a vector.              
+!  DSRCOM   is a user-callable routine to save and restore              
+!           the contents of the internal Common block.                  
+!  DGEFA and DGESL   are routines from LINPACK for solving full         
+!           systems of linear algebraic equations.                      
+!  DGBFA and DGBSL   are routines from LINPACK for solving banded       
+!           linear systems.                                             
+!  DUMACH   computes the unit roundoff in a machine-independent manner. 
+!  XERRWD, XSETUN, XSETF, IXSAV, IUMACH   handle the printing of all    
+!           error messages and warnings.  XERRWD is machine-dependent.  
+! Note: DVNORM, DUMACH, IXSAV, and IUMACH are function routines.        
+! All the others are subroutines.                                       
+!                                                                       
+!**End                                                                  
+!                                                                       
+!  Declare externals.
+!  Note: they are now internal                                                   
+      !EXTERNAL DPREPJ, DSOLSY 
+      !KPP_REAL DUMACH, DVNORM 
+!                                                                       
+!  Declare all other variables.                                         
+      INTEGER INIT, MXSTEP, MXHNIL, NHNIL, NSLAST, NYH, IOWNS,          &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                      &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,                &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, I1, I2, IFLAG, IMXER, KGO, LF0,                        &
+        LENIW, LENRW, LENWM, ML, MORD(2), MU, MXHNL0, MXSTP0              
+      KPP_REAL ROWNS,                                           &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      KPP_REAL AbsTolI, AYI, BIG, EWTI, H0, HMAX, HMX, RH, RelTolI, &
+        TCRIT, TDIST, TNEXT, TOL, TOLSF, TP, SIZE, SUM, W0             
+
+      LOGICAL IHIT 
+      CHARACTER*80 MSG 
+      SAVE MORD, MXSTP0, MXHNL0 
+!-----------------------------------------------------------------------
+! The following internal Common block contains                          
+! (a) variables which are local to any subroutine but whose values must 
+!     be preserved between calls to the routine ("own" variables), and  
+! (b) variables which are communicated between subroutines.             
+! The block DLS001 is declared in subroutines DLSODE, DINTDY, DSTODE,   
+! DPREPJ, and DSOLSY.                                                   
+! Groups of variables are replaced by dummy arrays in the Common        
+! declarations in routines where those variables are not used.          
+!-----------------------------------------------------------------------
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        INIT, MXSTEP, MXHNIL, NHNIL, NSLAST, NYH, IOWNS(6),            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+!                                                                       
+      DATA  MORD(1),MORD(2)/12,5/, MXSTP0/5000/, MXHNL0/10/ 
+!-----------------------------------------------------------------------
+! Block A.                                                              
+! This code block is executed on every call.                            
+! It tests ISTATE and ITASK for legality and branches appropriately.    
+! If ISTATE .GT. 1 but the flag INIT shows that initialization has      
+! not yet been done, an error return occurs.                            
+! If ISTATE = 1 and TOUT = T, return immediately.                       
+!-----------------------------------------------------------------------
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DLSODE                                  
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601 
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602 
+      IF (ISTATE .EQ. 1) GO TO 10 
+      IF (INIT .EQ. 0) GO TO 603 
+      IF (ISTATE .EQ. 2) GO TO 200 
+      GO TO 20 
+   10 INIT = 0 
+      IF (TOUT .EQ. T) RETURN 
+!-----------------------------------------------------------------------
+! Block B.                                                              
+! The next code block is executed for the initial call (ISTATE = 1),    
+! or for a continuation call with parameter changes (ISTATE = 3).       
+! It contains checking of all inputs and various initializations.       
+!                                                                       
+! First check legality of the non-optional inputs NEQ, ITOL, IOPT,      
+! MF, ML, and MU.                                                       
+!-----------------------------------------------------------------------
+   20 IF (NEQ .LE. 0) GO TO 604 
+      IF (ISTATE .EQ. 1) GO TO 25 
+      IF (NEQ .GT. N) GO TO 605 
+   25 N = NEQ 
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606 
+      IF (IOPT .LT. 0 .OR. IOPT .GT. 1) GO TO 607 
+      METH = MF/10 
+      MITER = MF - 10*METH 
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608 
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608 
+      IF (MITER .LE. 3) GO TO 30 
+      ML = IWORK(1) 
+      MU = IWORK(2) 
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609 
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610 
+   30 CONTINUE 
+! Next process and check the optional inputs. --------------------------
+      IF (IOPT .EQ. 1) GO TO 40 
+      MAXORD = MORD(METH) 
+      MXSTEP = MXSTP0 
+      MXHNIL = MXHNL0 
+      IF (ISTATE .EQ. 1) H0 = 0.0D0 
+      HMXI = 0.0D0 
+      HMIN = 0.0D0 
+      GO TO 60 
+   40 MAXORD = IWORK(5) 
+      IF (MAXORD .LT. 0) GO TO 611 
+      IF (MAXORD .EQ. 0) MAXORD = 100 
+      MAXORD = MIN(MAXORD,MORD(METH)) 
+      MXSTEP = IWORK(6) 
+      IF (MXSTEP .LT. 0) GO TO 612 
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0 
+      MXHNIL = IWORK(7) 
+      IF (MXHNIL .LT. 0) GO TO 613 
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0 
+      IF (ISTATE .NE. 1) GO TO 50 
+      H0 = RWORK(5) 
+      IF ((TOUT - T)*H0 .LT. 0.0D0) GO TO 614 
+   50 HMAX = RWORK(6) 
+      IF (HMAX .LT. 0.0D0) GO TO 615 
+      HMXI = 0.0D0 
+      IF (HMAX .GT. 0.0D0) HMXI = 1.0D0/HMAX 
+      HMIN = RWORK(7) 
+      IF (HMIN .LT. 0.0D0) GO TO 616 
+!-----------------------------------------------------------------------
+! Set work array pointers and check lengths LRW and LIW.                
+! Pointers to segments of RWORK and IWORK are named by prefixing L to   
+! the name of the segment.  E.g., the segment YH starts at RWORK(LYH).  
+! Segments of RWORK (in order) are denoted  YH, WM, EWT, SAVF, ACOR.    
+!-----------------------------------------------------------------------
+   60 LYH = 21 
+      IF (ISTATE .EQ. 1) NYH = N 
+      LWM = LYH + (MAXORD + 1)*NYH 
+      IF (MITER .EQ. 0) LENWM = 0 
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) LENWM = N*N + 2 
+      IF (MITER .EQ. 3) LENWM = N + 2 
+      IF (MITER .GE. 4) LENWM = (2*ML + MU + 1)*N + 2 
+      LEWT = LWM + LENWM 
+      LSAVF = LEWT + N 
+      LACOR = LSAVF + N 
+      LENRW = LACOR + N - 1 
+      IWORK(17) = LENRW 
+      LIWM = 1 
+      LENIW = 20 + N 
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 20 
+      IWORK(18) = LENIW 
+      IF (LENRW .GT. LRW) GO TO 617 
+      IF (LENIW .GT. LIW) GO TO 618 
+! Check RelTol and AbsTol for legality. ------------------------------------
+      RelTolI = RelTol(1) 
+      AbsTolI = AbsTol(1) 
+      DO 70 I = 1,N 
+        IF (ITOL .GE. 3) RelTolI = RelTol(I) 
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I) 
+        IF (RelTolI .LT. 0.0D0) GO TO 619 
+        IF (AbsTolI .LT. 0.0D0) GO TO 620 
+   70   CONTINUE 
+      IF (ISTATE .EQ. 1) GO TO 100 
+! If ISTATE = 3, set flag to signal parameter changes to DSTODE. -------
+      JSTART = -1 
+      IF (NQ .LE. MAXORD) GO TO 90 
+! MAXORD was reduced below NQ.  Copy YH(*,MAXORD+2) into SAVF. ---------
+      DO 80 I = 1,N 
+   80   RWORK(I+LSAVF-1) = RWORK(I+LWM-1) 
+! Reload WM(1) = RWORK(LWM), since LWM may have changed. ---------------
+   90 IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND) 
+      IF (N .EQ. NYH) GO TO 200 
+! NEQ was reduced.  Zero part of YH to avoid undefined references. -----
+      I1 = LYH + L*NYH 
+      I2 = LYH + (MAXORD + 1)*NYH - 1 
+      IF (I1 .GT. I2) GO TO 200 
+      DO 95 I = I1,I2 
+   95   RWORK(I) = 0.0D0 
+      GO TO 200 
+!-----------------------------------------------------------------------
+! Block C.                                                              
+! The next block is for the initial call only (ISTATE = 1).             
+! It contains all remaining initializations, the initial call to F,     
+! and the calculation of the initial step size.                         
+! The error weights in EWT are inverted after being loaded.             
+!-----------------------------------------------------------------------
+  100 UROUND = DUMACH() 
+      TN = T 
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 110 
+      TCRIT = RWORK(1) 
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. 0.0D0) GO TO 625 
+      IF (H0 .NE. 0.0D0 .AND. (T + H0 - TCRIT)*H0 .GT. 0.0D0)           &
+        H0 = TCRIT - T                                                 
+  110 JSTART = 0 
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND) 
+      NHNIL = 0 
+      NST = 0 
+      NJE = 0 
+      NSLAST = 0 
+      HU = 0.0D0 
+      NQU = 0 
+      CCMAX = 0.3D0 
+      MAXCOR = 3 
+      MSBP = 20 
+      MXNCF = 10 
+! Initial call to F.  (LF0 points to YH(*,2).) -------------------------
+      LF0 = LYH + NYH 
+      CALL F (NEQ, T, Y, RWORK(LF0)) 
+      NFE = 1 
+! Load the initial value vector in YH. ---------------------------------
+      DO 115 I = 1,N 
+  115   RWORK(I+LYH-1) = Y(I) 
+! Load and invert the EWT array.  (H is temporarily set to 1.0.) -------
+      NQ = 1 
+      H = 1.0D0 
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT)) 
+      DO 120 I = 1,N 
+        IF (RWORK(I+LEWT-1) .LE. 0.0D0) GO TO 621 
+  120   RWORK(I+LEWT-1) = 1.0D0/RWORK(I+LEWT-1) 
+!-----------------------------------------------------------------------
+! The coding below computes the step size, H0, to be attempted on the   
+! first step, unless the user has supplied a value for this.            
+! First check that TOUT - T differs significantly from zero.            
+! A scalar tolerance quantity TOL is computed, as MAX(RelTol(I))          
+! if this is positive, or MAX(AbsTol(I)/ABS(Y(I))) otherwise, adjusted    
+! so as to be between 100*UROUND and 1.0E-3.                            
+! Then the computed value H0 is given by..                              
+!                                      NEQ                              
+!   H0**2 = TOL / ( w0**-2 + (1/NEQ) * SUM ( f(i)/ywt(i) )**2  )        
+!                                       1                               
+! where   w0     = MAX ( ABS(T), ABS(TOUT) ),                           
+!         f(i)   = i-th component of initial value of f,                
+!         ywt(i) = EWT(i)/TOL  (a weight for y(i)).                     
+! The sign of H0 is inferred from the initial values of TOUT and T.     
+!-----------------------------------------------------------------------
+      IF (H0 .NE. 0.0D0) GO TO 180 
+      TDIST = ABS(TOUT - T) 
+      W0 = MAX(ABS(T),ABS(TOUT)) 
+      IF (TDIST .LT. 2.0D0*UROUND*W0) GO TO 622 
+      TOL = RelTol(1) 
+      IF (ITOL .LE. 2) GO TO 140 
+      DO 130 I = 1,N 
+  130   TOL = MAX(TOL,RelTol(I)) 
+  140 IF (TOL .GT. 0.0D0) GO TO 160 
+      AbsTolI = AbsTol(1) 
+      DO 150 I = 1,N 
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) AbsTolI = AbsTol(I) 
+        AYI = ABS(Y(I)) 
+        IF (AYI .NE. 0.0D0) TOL = MAX(TOL,AbsTolI/AYI) 
+  150   CONTINUE 
+  160 TOL = MAX(TOL,100.0D0*UROUND) 
+      TOL = MIN(TOL,0.001D0) 
+      SUM = DVNORM (N, RWORK(LF0), RWORK(LEWT)) 
+      SUM = 1.0D0/(TOL*W0*W0) + TOL*SUM**2 
+      H0 = 1.0D0/SQRT(SUM) 
+      H0 = MIN(H0,TDIST) 
+      H0 = SIGN(H0,TOUT-T) 
+! Adjust H0 if necessary to meet HMAX bound. ---------------------------
+  180 RH = ABS(H0)*HMXI 
+      IF (RH .GT. 1.0D0) H0 = H0/RH 
+! Load H with H0 and scale YH(*,2) by H0. ------------------------------
+      H = H0 
+      DO 190 I = 1,N 
+  190   RWORK(I+LF0-1) = H0*RWORK(I+LF0-1) 
+      GO TO 270 
+!-----------------------------------------------------------------------
+! Block D.                                                              
+! The next code block is for continuation calls only (ISTATE = 2 or 3)  
+! and is to check stop conditions before taking a step.                 
+!-----------------------------------------------------------------------
+  200 NSLAST = NST 
+      GO TO (210, 250, 220, 230, 240), ITASK 
+  210 IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 250 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      IF (IFLAG .NE. 0) GO TO 627 
+      T = TOUT 
+      GO TO 420 
+  220 TP = TN - HU*(1.0D0 + 100.0D0*UROUND) 
+      IF ((TP - TOUT)*H .GT. 0.0D0) GO TO 623 
+      IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 250 
+      GO TO 400 
+  230 TCRIT = RWORK(1) 
+      IF ((TN - TCRIT)*H .GT. 0.0D0) GO TO 624 
+      IF ((TCRIT - TOUT)*H .LT. 0.0D0) GO TO 625 
+      IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 245 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      IF (IFLAG .NE. 0) GO TO 627 
+      T = TOUT 
+      GO TO 420 
+  240 TCRIT = RWORK(1) 
+      IF ((TN - TCRIT)*H .GT. 0.0D0) GO TO 624 
+  245 HMX = ABS(TN) + ABS(H) 
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX 
+      IF (IHIT) GO TO 400 
+      TNEXT = TN + H*(1.0D0 + 4.0D0*UROUND) 
+      IF ((TNEXT - TCRIT)*H .LE. 0.0D0) GO TO 250 
+      H = (TCRIT - TN)*(1.0D0 - 4.0D0*UROUND) 
+      IF (ISTATE .EQ. 2) JSTART = -2 
+!-----------------------------------------------------------------------
+! Block E.                                                              
+! The next block is normally executed for all calls and contains        
+! the call to the one-step core integrator DSTODE.                      
+!                                                                       
+! This is a looping point for the integration steps.                    
+!                                                                       
+! First check for too many steps being taken, update EWT (if not at     
+! start of problem), check for too much accuracy being requested, and   
+! check for H below the roundoff level in T.                            
+!-----------------------------------------------------------------------
+  250 CONTINUE 
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500 
+      CALL DEWSET (N, ITOL, RelTol, AbsTol, RWORK(LYH), RWORK(LEWT)) 
+      DO 260 I = 1,N 
+        IF (RWORK(I+LEWT-1) .LE. 0.0D0) GO TO 510 
+  260   RWORK(I+LEWT-1) = 1.0D0/RWORK(I+LEWT-1) 
+  270 TOLSF = UROUND*DVNORM (N, RWORK(LYH), RWORK(LEWT)) 
+      IF (TOLSF .LE. 1.0D0) GO TO 280 
+      TOLSF = TOLSF*2.0D0 
+      IF (NST .EQ. 0) GO TO 626 
+      GO TO 520 
+  280 IF ((TN + H) .NE. TN) GO TO 290 
+      NHNIL = NHNIL + 1 
+      IF (NHNIL .GT. MXHNIL) GO TO 290 
+      MSG = 'DLSODE-  Warning..internal T (=R1) and H (=R2) are' 
+      CALL XERRWD (MSG, 50, 101, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG='      such that in the machine, T + H = T on the next step  ' 
+      CALL XERRWD (MSG, 60, 101, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      (H = step size). Solver will continue anyway' 
+      CALL XERRWD (MSG, 50, 101, 0, 0, 0, 0, 2, TN, H) 
+      IF (NHNIL .LT. MXHNIL) GO TO 290 
+      MSG = 'DLSODE-  Above warning has been issued I1 times.  ' 
+      CALL XERRWD (MSG, 50, 102, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      It will not be issued again for this problem' 
+      CALL XERRWD (MSG, 50, 102, 0, 1, MXHNIL, 0, 0, 0.0D0, 0.0D0) 
+  290 CONTINUE 
+!-----------------------------------------------------------------------
+!  CALL DSTODE(NEQ,Y,YH,NYH,YH,EWT,SAVF,ACOR,WM,IWM,F,JAC,DPREPJ,DSOLSY)
+!-----------------------------------------------------------------------
+      CALL DSTODE (NEQ, Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LEWT),   &
+        RWORK(LSAVF), RWORK(LACOR), RWORK(LWM), IWORK(LIWM),           &
+        F, JAC)                                        
+        !F, JAC, DPREPJ, DSOLSY)                                        
+      KGO = 1 - KFLAG 
+      GO TO (300, 530, 540), KGO 
+!-----------------------------------------------------------------------
+! Block F.                                                              
+! The following block handles the case of a successful return from the  
+! core integrator (KFLAG = 0).  Test for stop conditions.               
+!-----------------------------------------------------------------------
+  300 INIT = 1 
+      GO TO (310, 400, 330, 340, 350), ITASK 
+! ITASK = 1.  If TOUT has been reached, interpolate. -------------------
+  310 IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 250 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      T = TOUT 
+      GO TO 420 
+! ITASK = 3.  Jump to exit if TOUT was reached. ------------------------
+  330 IF ((TN - TOUT)*H .GE. 0.0D0) GO TO 400 
+      GO TO 250 
+! ITASK = 4.  See if TOUT or TCRIT was reached.  Adjust H if necessary. 
+  340 IF ((TN - TOUT)*H .LT. 0.0D0) GO TO 345 
+      CALL DINTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG) 
+      T = TOUT 
+      GO TO 420 
+  345 HMX = ABS(TN) + ABS(H) 
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX 
+      IF (IHIT) GO TO 400 
+      TNEXT = TN + H*(1.0D0 + 4.0D0*UROUND) 
+      IF ((TNEXT - TCRIT)*H .LE. 0.0D0) GO TO 250 
+      H = (TCRIT - TN)*(1.0D0 - 4.0D0*UROUND) 
+      JSTART = -2 
+      GO TO 250 
+! ITASK = 5.  See if TCRIT was reached and jump to exit. ---------------
+  350 HMX = ABS(TN) + ABS(H) 
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX 
+!-----------------------------------------------------------------------
+! Block G.                                                              
+! The following block handles all successful returns from DLSODE.       
+! If ITASK .NE. 1, Y is loaded from YH and T is set accordingly.        
+! ISTATE is set to 2, and the optional outputs are loaded into the      
+! work arrays before returning.                                         
+!-----------------------------------------------------------------------
+  400 DO 410 I = 1,N 
+  410   Y(I) = RWORK(I+LYH-1) 
+      T = TN 
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420 
+      IF (IHIT) T = TCRIT 
+  420 ISTATE = 2 
+      RWORK(11) = HU 
+      RWORK(12) = H 
+      RWORK(13) = TN 
+      IWORK(11) = NST 
+      IWORK(12) = NFE 
+      IWORK(13) = NJE 
+      IWORK(14) = NQU 
+      IWORK(15) = NQ 
+      RETURN 
+!-----------------------------------------------------------------------
+! Block H.                                                              
+! The following block handles all unsuccessful returns other than       
+! those for illegal input.  First the error message routine is called.  
+! If there was an error test or convergence test failure, IMXER is set. 
+! Then Y is loaded from YH and T is set to TN.  The optional outputs    
+! are loaded into the work arrays before returning.                     
+!-----------------------------------------------------------------------
+! The maximum number of steps was taken before reaching TOUT. ----------
+  500 MSG = 'DLSODE-  At current T (=R1), MXSTEP (=I1) steps   ' 
+      CALL XERRWD (MSG, 50, 201, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      taken on this call before reaching TOUT     ' 
+      CALL XERRWD (MSG, 50, 201, 0, 1, MXSTEP, 0, 1, TN, 0.0D0) 
+      ISTATE = -1 
+      GO TO 580 
+! EWT(I) .LE. 0.0 for some I (not at start of problem). ----------------
+  510 EWTI = RWORK(LEWT+I-1) 
+      MSG = 'DLSODE-  At T (=R1), EWT(I1) has become R2 .LE. 0.' 
+      CALL XERRWD (MSG, 50, 202, 0, 1, I, 0, 2, TN, EWTI) 
+      ISTATE = -6 
+      GO TO 580 
+! Too much accuracy requested for machine precision. -------------------
+  520 MSG = 'DLSODE-  At T (=R1), too much accuracy requested  ' 
+      CALL XERRWD (MSG, 50, 203, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      for precision of machine..  see TOLSF (=R2) ' 
+      CALL XERRWD (MSG, 50, 203, 0, 0, 0, 0, 2, TN, TOLSF) 
+      RWORK(14) = TOLSF 
+      ISTATE = -2 
+      GO TO 580 
+! KFLAG = -1.  Error test failed repeatedly or with ABS(H) = HMIN. -----
+  530 MSG = 'DLSODE-  At T(=R1) and step size H(=R2), the error' 
+      CALL XERRWD (MSG, 50, 204, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      test failed repeatedly or with ABS(H) = HMIN' 
+      CALL XERRWD (MSG, 50, 204, 0, 0, 0, 0, 2, TN, H) 
+      ISTATE = -4 
+      GO TO 560 
+! KFLAG = -2.  Convergence failed repeatedly or with ABS(H) = HMIN. ----
+  540 MSG = 'DLSODE-  At T (=R1) and step size H (=R2), the    ' 
+      CALL XERRWD (MSG, 50, 205, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      corrector convergence failed repeatedly     ' 
+      CALL XERRWD (MSG, 50, 205, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG = '      or with ABS(H) = HMIN   ' 
+      CALL XERRWD (MSG, 30, 205, 0, 0, 0, 0, 2, TN, H) 
+      ISTATE = -5 
+! Compute IMXER if relevant. -------------------------------------------
+  560 BIG = 0.0D0 
+      IMXER = 1 
+      DO 570 I = 1,N 
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1)) 
+        IF (BIG .GE. SIZE) GO TO 570 
+        BIG = SIZE 
+        IMXER = I 
+  570   CONTINUE 
+      IWORK(16) = IMXER 
+! Set Y vector, T, and optional outputs. -------------------------------
+  580 DO 590 I = 1,N 
+  590   Y(I) = RWORK(I+LYH-1) 
+      T = TN 
+      RWORK(11) = HU 
+      RWORK(12) = H 
+      RWORK(13) = TN 
+      IWORK(11) = NST 
+      IWORK(12) = NFE 
+      IWORK(13) = NJE 
+      IWORK(14) = NQU 
+      IWORK(15) = NQ 
+      RETURN 
+!-----------------------------------------------------------------------
+! Block I.                                                              
+! The following block handles all error returns due to illegal input    
+! (ISTATE = -3), as detected before calling the core integrator.        
+! First the error message routine is called.  If the illegal input      
+! is a negative ISTATE, the run is aborted (apparent infinite loop).    
+!-----------------------------------------------------------------------
+  601 MSG = 'DLSODE-  ISTATE (=I1) illegal ' 
+      CALL XERRWD (MSG, 30, 1, 0, 1, ISTATE, 0, 0, 0.0D0, 0.0D0) 
+      IF (ISTATE .LT. 0) GO TO 800 
+      GO TO 700 
+  602 MSG = 'DLSODE-  ITASK (=I1) illegal  ' 
+      CALL XERRWD (MSG, 30, 2, 0, 1, ITASK, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  603 MSG = 'DLSODE-  ISTATE .GT. 1 but DLSODE not initialized ' 
+      CALL XERRWD (MSG, 50, 3, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  604 MSG = 'DLSODE-  NEQ (=I1) .LT. 1     ' 
+      CALL XERRWD (MSG, 30, 4, 0, 1, NEQ, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  605 MSG = 'DLSODE-  ISTATE = 3 and NEQ increased (I1 to I2)  ' 
+      CALL XERRWD (MSG, 50, 5, 0, 2, N, NEQ, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  606 MSG = 'DLSODE-  ITOL (=I1) illegal   ' 
+      CALL XERRWD (MSG, 30, 6, 0, 1, ITOL, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  607 MSG = 'DLSODE-  IOPT (=I1) illegal   ' 
+      CALL XERRWD (MSG, 30, 7, 0, 1, IOPT, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  608 MSG = 'DLSODE-  MF (=I1) illegal     ' 
+      CALL XERRWD (MSG, 30, 8, 0, 1, MF, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  609 MSG = 'DLSODE-  ML (=I1) illegal.. .LT.0 or .GE.NEQ (=I2)' 
+      CALL XERRWD (MSG, 50, 9, 0, 2, ML, NEQ, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  610 MSG = 'DLSODE-  MU (=I1) illegal.. .LT.0 or .GE.NEQ (=I2)' 
+      CALL XERRWD (MSG, 50, 10, 0, 2, MU, NEQ, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  611 MSG = 'DLSODE-  MAXORD (=I1) .LT. 0  ' 
+      CALL XERRWD (MSG, 30, 11, 0, 1, MAXORD, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  612 MSG = 'DLSODE-  MXSTEP (=I1) .LT. 0  ' 
+      CALL XERRWD (MSG, 30, 12, 0, 1, MXSTEP, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  613 MSG = 'DLSODE-  MXHNIL (=I1) .LT. 0  ' 
+      CALL XERRWD (MSG, 30, 13, 0, 1, MXHNIL, 0, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  614 MSG = 'DLSODE-  TOUT (=R1) behind T (=R2)      ' 
+      CALL XERRWD (MSG, 40, 14, 0, 0, 0, 0, 2, TOUT, T) 
+      MSG = '      Integration direction is given by H0 (=R1)  ' 
+      CALL XERRWD (MSG, 50, 14, 0, 0, 0, 0, 1, H0, 0.0D0) 
+      GO TO 700 
+  615 MSG = 'DLSODE-  HMAX (=R1) .LT. 0.0  ' 
+      CALL XERRWD (MSG, 30, 15, 0, 0, 0, 0, 1, HMAX, 0.0D0) 
+      GO TO 700 
+  616 MSG = 'DLSODE-  HMIN (=R1) .LT. 0.0  ' 
+      CALL XERRWD (MSG, 30, 16, 0, 0, 0, 0, 1, HMIN, 0.0D0) 
+      GO TO 700 
+  617 CONTINUE 
+      MSG='DLSODE-  RWORK length needed, LENRW (=I1), exceeds LRW (=I2)' 
+      CALL XERRWD (MSG, 60, 17, 0, 2, LENRW, LRW, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  618 CONTINUE 
+      MSG='DLSODE-  IWORK length needed, LENIW (=I1), exceeds LIW (=I2)' 
+      CALL XERRWD (MSG, 60, 18, 0, 2, LENIW, LIW, 0, 0.0D0, 0.0D0) 
+      GO TO 700 
+  619 MSG = 'DLSODE-  RelTol(I1) is R1 .LT. 0.0        ' 
+      CALL XERRWD (MSG, 40, 19, 0, 1, I, 0, 1, RelTolI, 0.0D0) 
+      GO TO 700 
+  620 MSG = 'DLSODE-  AbsTol(I1) is R1 .LT. 0.0        ' 
+      CALL XERRWD (MSG, 40, 20, 0, 1, I, 0, 1, AbsTolI, 0.0D0) 
+      GO TO 700 
+  621 EWTI = RWORK(LEWT+I-1) 
+      MSG = 'DLSODE-  EWT(I1) is R1 .LE. 0.0         ' 
+      CALL XERRWD (MSG, 40, 21, 0, 1, I, 0, 1, EWTI, 0.0D0) 
+      GO TO 700 
+  622 CONTINUE 
+      MSG='DLSODE-  TOUT (=R1) too close to T(=R2) to start integration' 
+      CALL XERRWD (MSG, 60, 22, 0, 0, 0, 0, 2, TOUT, T) 
+      GO TO 700 
+  623 CONTINUE 
+      MSG='DLSODE-  ITASK = I1 and TOUT (=R1) behind TCUR - HU (= R2)  ' 
+      CALL XERRWD (MSG, 60, 23, 0, 1, ITASK, 0, 2, TOUT, TP) 
+      GO TO 700 
+  624 CONTINUE 
+      MSG='DLSODE-  ITASK = 4 OR 5 and TCRIT (=R1) behind TCUR (=R2)   ' 
+      CALL XERRWD (MSG, 60, 24, 0, 0, 0, 0, 2, TCRIT, TN) 
+      GO TO 700 
+  625 CONTINUE 
+      MSG='DLSODE-  ITASK = 4 or 5 and TCRIT (=R1) behind TOUT (=R2)   ' 
+      CALL XERRWD (MSG, 60, 25, 0, 0, 0, 0, 2, TCRIT, TOUT) 
+      GO TO 700 
+  626 MSG = 'DLSODE-  At start of problem, too much accuracy   ' 
+      CALL XERRWD (MSG, 50, 26, 0, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      MSG='      requested for precision of machine..  See TOLSF (=R1) ' 
+      CALL XERRWD (MSG, 60, 26, 0, 0, 0, 0, 1, TOLSF, 0.0D0) 
+      RWORK(14) = TOLSF 
+      GO TO 700 
+  627 MSG = 'DLSODE-  Trouble in DINTDY.  ITASK = I1, TOUT = R1' 
+      CALL XERRWD (MSG, 50, 27, 0, 1, ITASK, 0, 1, TOUT, 0.0D0) 
+!                                                                       
+  700 ISTATE = -3 
+      RETURN 
+!                                                                       
+  800 MSG = 'DLSODE-  Run aborted.. apparent infinite loop     ' 
+      CALL XERRWD (MSG, 50, 303, 2, 0, 0, 0, 0, 0.0D0, 0.0D0) 
+      RETURN 
+!----------------------- END OF SUBROUTINE DLSODE ----------------------
+      !END SUBROUTINE DLSODE                                          
+      CONTAINS                                          
+
+
+!DECK DUMACH   
+      KPP_REAL FUNCTION DUMACH () 
+!***BEGIN PROLOGUE  DUMACH                                              
+!***PURPOSE  Compute the unit roundoff of the machine.                  
+!***CATEGORY  R1                                                        
+!***TYPE      KPP_REAL (RUMACH-S, DUMACH-D)                     
+!***KEYWORDS  MACHINE CONSTANTS                                         
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+! *Usage:                                                               
+!        KPP_REAL  A, DUMACH                                    
+!        A = DUMACH()                                                   
+!                                                                       
+! *Function Return Values:                                              
+!     A : the unit roundoff of the machine.                             
+!                                                                       
+! *Description:                                                         
+!     The unit roundoff is defined as the smallest positive machine     
+!     number u such that  1.0 + u .ne. 1.0.  This is computed by DUMACH 
+!     in a machine-independent manner.                                  
+!                                                                       
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  DUMSUM                                             
+!***REVISION HISTORY  (YYYYMMDD)                                        
+!   19930216  DATE WRITTEN                                              
+!   19930818  Added SLATEC-format prologue.  (FNF)                      
+!   20030707  Added DUMSUM to force normal storage of COMP.  (ACH)      
+!***END PROLOGUE  DUMACH                                                
+!                                                                       
+      KPP_REAL U, COMP 
+!***FIRST EXECUTABLE STATEMENT  DUMACH                                  
+      U = 1.0D0 
+   10 U = U*0.5D0 
+      CALL DUMSUM(1.0D0, U, COMP) 
+      IF (COMP .NE. 1.0D0) GO TO 10 
+      DUMACH = U*2.0D0 
+      RETURN 
+!----------------------- End of Function DUMACH ------------------------
+      END FUNCTION DUMACH  
+                                              
+      SUBROUTINE DUMSUM(A,B,C) 
+!     Routine to force normal storing of A + B, for DUMACH.             
+      KPP_REAL A, B, C 
+      C = A + B 
+      RETURN 
+      END SUBROUTINE DUMSUM                                        
+!DECK DCFODE                                                            
+      SUBROUTINE DCFODE (METH, ELCO, TESCO) 
+!***BEGIN PROLOGUE  DCFODE                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Set ODE integrator coefficients.                           
+!***TYPE      KPP_REAL (SCFODE-S, DCFODE-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DCFODE is called by the integrator routine to set coefficients       
+!  needed there.  The coefficients for the current method, as           
+!  given by the value of METH, are set for all orders and saved.        
+!  The maximum order assumed here is 12 if METH = 1 and 5 if METH = 2.  
+!  (A smaller value of the maximum order is also allowed.)              
+!  DCFODE is called once at the beginning of the problem,               
+!  and is not called again unless and until METH is changed.            
+!                                                                       
+!  The ELCO array contains the basic method coefficients.               
+!  The coefficients el(i), 1 .le. i .le. nq+1, for the method of        
+!  order nq are stored in ELCO(i,nq).  They are given by a genetrating  
+!  polynomial, i.e.,                                                    
+!      l(x) = el(1) + el(2)*x + ... + el(nq+1)*x**nq.                   
+!  For the implicit Adams methods, l(x) is given by                     
+!      dl/dx = (x+1)*(x+2)*...*(x+nq-1)/factorial(nq-1),    l(-1) = 0.  
+!  For the BDF methods, l(x) is given by                                
+!      l(x) = (x+1)*(x+2)* ... *(x+nq)/K,                               
+!  where         K = factorial(nq)*(1 + 1/2 + ... + 1/nq).              
+!                                                                       
+!  The TESCO array contains test constants used for the                 
+!  local error test and the selection of step size and/or order.        
+!  At order nq, TESCO(k,nq) is used for the selection of step           
+!  size at order nq - 1 if k = 1, at order nq if k = 2, and at order    
+!  nq + 1 if k = 3.                                                     
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!***END PROLOGUE  DCFODE                                                
+!**End                                                                  
+      INTEGER METH 
+      INTEGER I, IB, NQ, NQM1, NQP1 
+      KPP_REAL ELCO(13,12), TESCO(3,12), PC(12) 
+      KPP_REAL AGAMQ, FNQ, FNQM1, PINT, RAGQ, RQFAC, RQ1FAC, TSIGN, XPIN
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DCFODE                                  
+      GO TO (100, 200), METH 
+!                                                                       
+  100 ELCO(1,1) = 1.0D0 
+      ELCO(2,1) = 1.0D0 
+      TESCO(1,1) = 0.0D0 
+      TESCO(2,1) = 2.0D0 
+      TESCO(1,2) = 1.0D0 
+      TESCO(3,12) = 0.0D0 
+      PC(1) = 1.0D0 
+      RQFAC = 1.0D0 
+      DO 140 NQ = 2,12 
+!-----------------------------------------------------------------------
+! The PC array will contain the coefficients of the polynomial          
+!     p(x) = (x+1)*(x+2)*...*(x+nq-1).                                  
+! Initially, p(x) = 1.                                                  
+!-----------------------------------------------------------------------
+        RQ1FAC = RQFAC 
+        RQFAC = RQFAC/NQ 
+        NQM1 = NQ - 1 
+        FNQM1 = NQM1 
+        NQP1 = NQ + 1 
+! Form coefficients of p(x)*(x+nq-1). ----------------------------------
+        PC(NQ) = 0.0D0 
+        DO 110 IB = 1,NQM1 
+          I = NQP1 - IB 
+  110     PC(I) = PC(I-1) + FNQM1*PC(I) 
+        PC(1) = FNQM1*PC(1) 
+! Compute integral, -1 to 0, of p(x) and x*p(x). -----------------------
+        PINT = PC(1) 
+        XPIN = PC(1)/2.0D0 
+        TSIGN = 1.0D0 
+        DO 120 I = 2,NQ 
+          TSIGN = -TSIGN 
+          PINT = PINT + TSIGN*PC(I)/I 
+  120     XPIN = XPIN + TSIGN*PC(I)/(I+1) 
+! Store coefficients in ELCO and TESCO. --------------------------------
+        ELCO(1,NQ) = PINT*RQ1FAC 
+        ELCO(2,NQ) = 1.0D0 
+        DO 130 I = 2,NQ 
+  130     ELCO(I+1,NQ) = RQ1FAC*PC(I)/I 
+        AGAMQ = RQFAC*XPIN 
+        RAGQ = 1.0D0/AGAMQ 
+        TESCO(2,NQ) = RAGQ 
+        IF (NQ .LT. 12) TESCO(1,NQP1) = RAGQ*RQFAC/NQP1 
+        TESCO(3,NQM1) = RAGQ 
+  140   CONTINUE 
+      RETURN 
+!                                                                       
+  200 PC(1) = 1.0D0 
+      RQ1FAC = 1.0D0 
+      DO 230 NQ = 1,5 
+!-----------------------------------------------------------------------
+! The PC array will contain the coefficients of the polynomial          
+!     p(x) = (x+1)*(x+2)*...*(x+nq).                                    
+! Initially, p(x) = 1.                                                  
+!-----------------------------------------------------------------------
+        FNQ = NQ 
+        NQP1 = NQ + 1 
+! Form coefficients of p(x)*(x+nq). ------------------------------------
+        PC(NQP1) = 0.0D0 
+        DO 210 IB = 1,NQ 
+          I = NQ + 2 - IB 
+  210     PC(I) = PC(I-1) + FNQ*PC(I) 
+        PC(1) = FNQ*PC(1) 
+! Store coefficients in ELCO and TESCO. --------------------------------
+        DO 220 I = 1,NQP1 
+  220     ELCO(I,NQ) = PC(I)/PC(2) 
+        ELCO(2,NQ) = 1.0D0 
+        TESCO(1,NQ) = RQ1FAC 
+        TESCO(2,NQ) = NQP1/ELCO(1,NQ) 
+        TESCO(3,NQ) = (NQ+2)/ELCO(1,NQ) 
+        RQ1FAC = RQ1FAC/FNQ 
+  230   CONTINUE 
+      RETURN 
+!----------------------- END OF SUBROUTINE DCFODE ----------------------
+      END SUBROUTINE DCFODE                                         
+!DECK DINTDY                                                            
+      SUBROUTINE DINTDY (T, K, YH, NYH, DKY, IFLAG) 
+!***BEGIN PROLOGUE  DINTDY                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Interpolate solution derivatives.                          
+!***TYPE      KPP_REAL (SINTDY-S, DINTDY-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DINTDY computes interpolated values of the K-th derivative of the    
+!  dependent variable vector y, and stores it in DKY.  This routine     
+!  is called within the package with K = 0 and T = TOUT, but may        
+!  also be called by the user for any K up to the current order.        
+!  (See detailed instructions in the usage documentation.)              
+!                                                                       
+!  The computed values in DKY are gotten by interpolation using the     
+!  Nordsieck history array YH.  This array corresponds uniquely to a    
+!  vector-valued polynomial of degree NQCUR or less, and DKY is set     
+!  to the K-th derivative of this polynomial at T.                      
+!  The formula for DKY is:                                              
+!               q                                                       
+!   DKY(i)  =  sum  c(j,K) * (T - tn)**(j-K) * h**(-j) * YH(i,j+1)      
+!              j=K                                                      
+!  where  c(j,K) = j*(j-1)*...*(j-K+1), q = NQCUR, tn = TCUR, h = HCUR. 
+!  The quantities  nq = NQCUR, l = nq+1, N = NEQ, tn, and h are         
+!  communicated by COMMON.  The above sum is done in reverse order.     
+!  IFLAG is returned negative if either K or T is out of bounds.        
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  XERRWD                                             
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!   050427  Corrected roundoff decrement in TP. (ACH)                   
+!***END PROLOGUE  DINTDY                                                
+!**End                                                                  
+      INTEGER K, NYH, IFLAG 
+      KPP_REAL T, YH(NYH,*), DKY(*) 
+      INTEGER IOWND, IOWNS,                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      KPP_REAL ROWNS,                                          &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IOWNS(6),                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, IC, J, JB, JB2, JJ, JJ1, JP1 
+      KPP_REAL C, R, S, TP 
+      CHARACTER*80 MSG 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DINTDY                                  
+      IFLAG = 0 
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80 
+      TP = TN - HU -  100.0D0*UROUND*SIGN(ABS(TN) + ABS(HU), HU) 
+      IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90 
+!                                                                       
+      S = (T - TN)/H 
+      IC = 1 
+      IF (K .EQ. 0) GO TO 15 
+      JJ1 = L - K 
+      DO 10 JJ = JJ1,NQ 
+   10   IC = IC*JJ 
+   15 C = IC 
+      DO 20 I = 1,N 
+   20   DKY(I) = C*YH(I,L) 
+      IF (K .EQ. NQ) GO TO 55 
+      JB2 = NQ - K 
+      DO 50 JB = 1,JB2 
+        J = NQ - JB 
+        JP1 = J + 1 
+        IC = 1 
+        IF (K .EQ. 0) GO TO 35 
+        JJ1 = JP1 - K 
+        DO 30 JJ = JJ1,J 
+   30     IC = IC*JJ 
+   35   C = IC 
+        DO 40 I = 1,N 
+   40     DKY(I) = C*YH(I,JP1) + S*DKY(I) 
+   50   CONTINUE 
+      IF (K .EQ. 0) RETURN 
+   55 R = H**(-K) 
+      DO 60 I = 1,N 
+   60   DKY(I) = R*DKY(I) 
+      RETURN 
+!                                                                       
+   80 MSG = 'DINTDY-  K (=I1) illegal      ' 
+      CALL XERRWD (MSG, 30, 51, 0, 1, K, 0, 0, 0.0D0, 0.0D0) 
+      IFLAG = -1 
+      RETURN 
+   90 MSG = 'DINTDY-  T (=R1) illegal      ' 
+      CALL XERRWD (MSG, 30, 52, 0, 0, 0, 0, 1, T, 0.0D0) 
+      MSG='      T not in interval TCUR - HU (= R1) to TCUR (=R2)      ' 
+      CALL XERRWD (MSG, 60, 52, 0, 0, 0, 0, 2, TP, TN) 
+      IFLAG = -2 
+      RETURN 
+!----------------------- END OF SUBROUTINE DINTDY ----------------------
+      END SUBROUTINE DINTDY                                          
+!DECK DPREPJ                                                            
+      SUBROUTINE DPREPJ (NEQ, Y, YH, NYH, EWT, FTEM, SAVF, WM, IWM, F, JAC)                                                        
+!***BEGIN PROLOGUE  DPREPJ                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Compute and process Newton iteration matrix.               
+!***TYPE      KPP_REAL (SPREPJ-S, DPREPJ-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DPREPJ is called by DSTODE to compute and process the matrix         
+!  P = I - h*el(1)*J , where J is an approximation to the Jacobian.     
+!  Here J is computed by the user-supplied routine JAC if               
+!  MITER = 1 or 4, or by finite differencing if MITER = 2, 3, or 5.     
+!  If MITER = 3, a diagonal approximation to J is used.                 
+!  J is stored in WM and replaced by P.  If MITER .ne. 3, P is then     
+!  subjected to LU decomposition in preparation for later solution      
+!  of linear systems with P as coefficient matrix.  This is done        
+!  by DGEFA if MITER = 1 or 2, and by DGBFA if MITER = 4 or 5.          
+!                                                                       
+!  In addition to variables described in DSTODE and DLSODE prologues,   
+!  communication with DPREPJ uses the following:                        
+!  Y     = array containing predicted values on entry.                  
+!  FTEM  = work array of length N (ACOR in DSTODE).                     
+!  SAVF  = array containing f evaluated at predicted y.                 
+!  WM    = real work space for matrices.  On output it contains the     
+!          inverse diagonal matrix if MITER = 3 and the LU decomposition
+!          of P if MITER is 1, 2 , 4, or 5.                             
+!          Storage of matrix elements starts at WM(3).                  
+!          WM also contains the following matrix-related data:          
+!          WM(1) = SQRT(UROUND), used in numerical Jacobian increments. 
+!          WM(2) = H*EL0, saved for later use if MITER = 3.             
+!  IWM   = integer work space containing pivot information, starting at 
+!          IWM(21), if MITER is 1, 2, 4, or 5.  IWM also contains band  
+!          parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.   
+!  EL0   = EL(1) (input).                                               
+!  IERPJ = output error flag,  = 0 if no trouble, .gt. 0 if             
+!          P matrix found to be singular.                               
+!  JCUR  = output flag = 1 to indicate that the Jacobian matrix         
+!          (or approximation) is now current.                           
+!  This routine also uses the COMMON variables EL0, H, TN, UROUND,      
+!  MITER, N, NFE, and NJE.                                              
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  DGBFA, DGEFA, DVNORM                               
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890504  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!***END PROLOGUE  DPREPJ                                                
+!**End                                                                  
+      EXTERNAL F, JAC 
+      INTEGER NEQ, NYH, IWM(*)
+      KPP_REAL Y(*), YH(NYH,*), EWT(*), FTEM(*), SAVF(*), WM(*) 
+      INTEGER IOWND, IOWNS, IER,                                           &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      KPP_REAL ROWNS,                                          &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IOWNS(6),                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, I1, I2, ISING, II, J, J1, JJ, LENP,                     &
+              MBA, MBAND, MEB1, MEBAND, ML, ML3, MU, NP1                     
+      KPP_REAL CON, DI, FAC, HL0, R, R0, SRUR, YI, YJ, YJJ
+      !KPP_REAL  DVNORM                                                         
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DPREPJ                                  
+      NJE = NJE + 1 
+      IERPJ = 0 
+      JCUR = 1 
+      HL0 = H*EL0 
+      CON = -HL0 
+
+#ifdef FULL_ALGEBRA
+      LENP = N*N 
+      DO i = 1,LENP 
+         WM(i+2) = 0.0D0 
+      END DO
+      CALL JAC_CHEM (NEQ, TN, Y, WM(3)) 
+      DO I = 1,LENP 
+        WM(I+2) = WM(I+2)*CON
+      END DO 
+      ! Add identity matrix
+      J = 3 
+      NP1 = N + 1 
+      DO I = 1,N 
+        WM(J) = WM(J) + 1.0D0 
+        J = J + NP1 
+      END DO
+      ! Do LU decomposition on P
+      CALL DGETRF(N,N,WM(3),N,IWM(21),ISING)
+#else
+      CALL JAC_CHEM (NEQ, TN, Y, WM(3)) 
+      DO i = 1,LU_NONZERO 
+         WM(i+2) = WM(i+2)*CON 
+      END DO
+      ! Add identity matrix
+      DO i = 1,N 
+        j = 2+LU_DIAG(i)
+        WM(j) = WM(j) + 1.0D0 
+      END DO 
+      ! Do LU decomposition on P
+      CALL KppDecomp(WM(3),IER)
+#endif      
+      IF (IER .NE. 0) IERPJ = 1 
+      RETURN 
+ !----------------------- END OF SUBROUTINE DPREPJ ----------------------
+      END SUBROUTINE DPREPJ                                          
+!DECK DSOLSY                                                            
+      SUBROUTINE DSOLSY (WM, IWM, X, TEM) 
+!***BEGIN PROLOGUE  DSOLSY                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  ODEPACK linear system solver.                              
+!***TYPE      KPP_REAL (SSOLSY-S, DSOLSY-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This routine manages the solution of the linear system arising from  
+!  a chord iteration.  It is called if MITER .ne. 0.                    
+!  If MITER is 1 or 2, it calls DGESL to accomplish this.               
+!  If MITER = 3 it updates the coefficient h*EL0 in the diagonal        
+!  matrix, and then computes the solution.                              
+!  If MITER is 4 or 5, it calls DGBSL.                                  
+!  Communication with DSOLSY uses the following variables:              
+!  WM    = real work space containing the inverse diagonal matrix if    
+!          MITER = 3 and the LU decomposition of the matrix otherwise.  
+!          Storage of matrix elements starts at WM(3).                  
+!          WM also contains the following matrix-related data:          
+!          WM(1) = SQRT(UROUND) (not used here),                        
+!          WM(2) = HL0, the previous value of h*EL0, used if MITER = 3. 
+!  IWM   = integer work space containing pivot information, starting at 
+!          IWM(21), if MITER is 1, 2, 4, or 5.  IWM also contains band  
+!          parameters ML = IWM(1) and MU = IWM(2) if MITER is 4 or 5.   
+!  X     = the right-hand side vector on input, and the solution vector 
+!          on output, of length N.                                      
+!  TEM   = vector of work space of length N, not used in this version.  
+!  IERSL = output flag (in COMMON).  IERSL = 0 if no trouble occurred.  
+!          IERSL = 1 if a singular matrix arose with MITER = 3.         
+!  This routine also uses the COMMON variables EL0, H, MITER, and N.    
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  DGBSL, DGESL                                       
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!***END PROLOGUE  DSOLSY                                                
+!**End                                                                  
+      INTEGER IWM(*) 
+      KPP_REAL WM(*), X(*), TEM(*) 
+      INTEGER IOWND, IOWNS,                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      KPP_REAL ROWNS,                                          &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      COMMON /DLS001/ ROWNS(209),                                      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IOWNS(6),                                            &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, MEBAND, ML, MU 
+      KPP_REAL DI, HL0, PHL0, R 
+#ifdef FULL_ALGEBRA      
+      INTEGER ISING
+#endif      
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DSOLSY                                  
+      IERSL = 0 
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,WM(3),N,IWM(21),X,N,ISING)
+#else
+      CALL KppSolve(WM(3),X)
+#endif      
+      RETURN 
+!----------------------- END OF SUBROUTINE DSOLSY ----------------------
+      END SUBROUTINE DSOLSY                                          
+!DECK DSRCOM                                                            
+      SUBROUTINE DSRCOM (RSAV, ISAV, JOB) 
+!***BEGIN PROLOGUE  DSRCOM                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Save/restore ODEPACK COMMON blocks.                        
+!***TYPE      KPP_REAL (SSRCOM-S, DSRCOM-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This routine saves or restores (depending on JOB) the contents of    
+!  the COMMON block DLS001, which is used internally                    
+!  by one or more ODEPACK solvers.                                      
+!                                                                       
+!  RSAV = real array of length 218 or more.                             
+!  ISAV = integer array of length 37 or more.                           
+!  JOB  = flag indicating to save or restore the COMMON blocks:         
+!         JOB  = 1 if COMMON is to be saved (written to RSAV/ISAV)      
+!         JOB  = 2 if COMMON is to be restored (read from RSAV/ISAV)    
+!         A call with JOB = 2 presumes a prior call with JOB = 1.       
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   921116  Deleted treatment of block /EH0001/.  (ACH)                 
+!   930801  Reduced Common block length by 2.  (ACH)                    
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced Common block length by 209+12. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!   031112  Added SAVE statement for data-loaded constants.             
+!***END PROLOGUE  DSRCOM                                                
+!**End                                                                  
+      INTEGER ISAV(*), JOB 
+      INTEGER ILS 
+      INTEGER I, LENILS, LENRLS 
+      KPP_REAL RSAV(*),   RLS 
+      SAVE LENRLS, LENILS 
+      COMMON /DLS001/ RLS(218), ILS(37) 
+      DATA LENRLS/218/, LENILS/37/ 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DSRCOM                                  
+      IF (JOB .EQ. 2) GO TO 100 
+!                                                                       
+      DO 10 I = 1,LENRLS 
+   10   RSAV(I) = RLS(I) 
+      DO 20 I = 1,LENILS 
+   20   ISAV(I) = ILS(I) 
+      RETURN 
+!                                                                       
+  100 CONTINUE 
+      DO 110 I = 1,LENRLS 
+  110    RLS(I) = RSAV(I) 
+      DO 120 I = 1,LENILS 
+  120    ILS(I) = ISAV(I) 
+      RETURN 
+!----------------------- END OF SUBROUTINE DSRCOM ----------------------
+      END SUBROUTINE DSRCOM                                          
+!DECK DSTODE                                                            
+      SUBROUTINE DSTODE (NEQ, Y, YH, NYH, YH1, EWT, SAVF, ACOR, &
+                         WM, IWM, F, JAC)                                   
+                        !WM, IWM, F, JAC, PJAC, SLVS)                                   
+!***BEGIN PROLOGUE  DSTODE                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Performs one step of an ODEPACK integration.               
+!***TYPE      KPP_REAL (SSTODE-S, DSTODE-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  DSTODE performs one step of the integration of an initial value      
+!  problem for a system of ordinary differential equations.             
+!  Note:  DSTODE is independent of the value of the iteration method    
+!  indicator MITER, when this is .ne. 0, and hence is independent       
+!  of the type of chord method used, or the Jacobian structure.         
+!  Communication with DSTODE is done with the following variables:      
+!                                                                       
+!  NEQ    = integer array containing problem size in NEQ, and        
+!           passed as the NEQ argument in all calls to F and JAC.       
+!  Y      = an array of length .ge. N used as the Y argument in         
+!           all calls to F and JAC.                                     
+!  YH     = an NYH by LMAX array containing the dependent variables     
+!           and their approximate scaled derivatives, where             
+!           LMAX = MAXORD + 1.  YH(i,j+1) contains the approximate      
+!           j-th derivative of y(i), scaled by h**j/factorial(j)        
+!           (j = 0,1,...,NQ).  on entry for the first step, the first   
+!           two columns of YH must be set from the initial values.      
+!  NYH    = a constant integer .ge. N, the first dimension of YH.       
+!  YH1    = a one-dimensional array occupying the same space as YH.     
+!  EWT    = an array of length N containing multiplicative weights      
+!           for local error measurements.  Local errors in Y(i) are     
+!           compared to 1.0/EWT(i) in various error tests.              
+!  SAVF   = an array of working storage, of length N.                   
+!           Also used for input of YH(*,MAXORD+2) when JSTART = -1      
+!           and MAXORD .lt. the current order NQ.                       
+!  ACOR   = a work array of length N, used for the accumulated          
+!           corrections.  On a successful return, ACOR(i) contains      
+!           the estimated one-step local error in Y(i).                 
+!  WM,IWM = real and integer work arrays associated with matrix         
+!           operations in chord iteration (MITER .ne. 0).               
+!  PJAC   = name of routine to evaluate and preprocess Jacobian matrix  
+!           and P = I - h*el0*JAC, if a chord method is being used.     
+!  SLVS   = name of routine to solve linear system in chord iteration.  
+!  CCMAX  = maximum relative change in h*el0 before PJAC is called.     
+!  H      = the step size to be attempted on the next step.             
+!           H is altered by the error control algorithm during the      
+!           problem.  H can be either positive or negative, but its     
+!           sign must remain constant throughout the problem.           
+!  HMIN   = the minimum absolute value of the step size h to be used.   
+!  HMXI   = inverse of the maximum absolute value of h to be used.      
+!           HMXI = 0.0 is allowed and corresponds to an infinite hmax.  
+!           HMIN and HMXI may be changed at any time, but will not      
+!           take effect until the next change of h is considered.       
+!  TN     = the independent variable. TN is updated on each step taken. 
+!  JSTART = an integer used for input only, with the following          
+!           values and meanings:                                        
+!                0  perform the first step.                             
+!            .gt.0  take a new step continuing from the last.           
+!               -1  take the next step with a new value of H, MAXORD,   
+!                     N, METH, MITER, and/or matrix parameters.         
+!               -2  take the next step with a new value of H,           
+!                     but with other inputs unchanged.                  
+!           On return, JSTART is set to 1 to facilitate continuation.   
+!  KFLAG  = a completion code with the following meanings:              
+!                0  the step was succesful.                             
+!               -1  the requested error could not be achieved.          
+!               -2  corrector convergence could not be achieved.        
+!               -3  fatal error in PJAC or SLVS.                        
+!           A return with KFLAG = -1 or -2 means either                 
+!           abs(H) = HMIN or 10 consecutive failures occurred.          
+!           On a return with KFLAG negative, the values of TN and       
+!           the YH array are as of the beginning of the last            
+!           step, and H is the last step size attempted.                
+!  MAXORD = the maximum order of integration method to be allowed.      
+!  MAXCOR = the maximum number of corrector iterations allowed.         
+!  MSBP   = maximum number of steps between PJAC calls (MITER .gt. 0).  
+!  MXNCF  = maximum number of convergence failures allowed.             
+!  METH/MITER = the method flags.  See description in driver.           
+!  N      = the number of first-order differential equations.           
+!  The values of CCMAX, H, HMIN, HMXI, TN, JSTART, KFLAG, MAXORD,       
+!  MAXCOR, MSBP, MXNCF, METH, MITER, and N are communicated via COMMON. 
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  DCFODE, DVNORM                                     
+!***COMMON BLOCKS    DLS001                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!   010418  Reduced size of Common block /DLS001/. (ACH)                
+!   031105  Restored 'own' variables to Common block /DLS001/, to       
+!           enable interrupt/restart feature. (ACH)                     
+!***END PROLOGUE  DSTODE                                                
+!**End                                                                  
+      EXTERNAL F, JAC !, PJAC, SLVS 
+      INTEGER NEQ, NYH, IWM(*) 
+      KPP_REAL Y(*), YH(NYH,*), YH1(*), EWT(*), SAVF(*),       &
+                       ACOR(*), WM(*) 
+      INTEGER IOWND, IALTH, IPUP, LMAX, MEO, NQNYH, NSLP,              &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+      INTEGER I, I1, IREDO, IRET, J, JB, M, NCF, NEWQ 
+      KPP_REAL CONIT, CRATE, EL, ELCO, HOLD, RMAX, TESCO,      &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND                  
+      KPP_REAL DCON, DDN, DEL, DELP, DSM, DUP, EXDN, EXSM,     &
+              EXUP,R, RH, RHDN, RHSM, RHUP, TOLD
+      !KPP_REAL DVNORM                          
+      COMMON /DLS001/ CONIT, CRATE, EL(13), ELCO(13,12),               &
+        HOLD, RMAX, TESCO(3,12),                                       &
+        CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,                 &
+        IOWND(6), IALTH, IPUP, LMAX, MEO, NQNYH, NSLP,                 &
+        ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L,                     &
+        LYH, LEWT, LACOR, LSAVF, LWM, LIWM, METH, MITER,               &
+        MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU         
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DSTODE                                  
+      KFLAG = 0 
+      TOLD = TN 
+      NCF = 0 
+      IERPJ = 0 
+      IERSL = 0 
+      JCUR = 0 
+      ICF = 0 
+      DELP = 0.0D0 
+      IF (JSTART .GT. 0) GO TO 200 
+      IF (JSTART .EQ. -1) GO TO 100 
+      IF (JSTART .EQ. -2) GO TO 160 
+!-----------------------------------------------------------------------
+! On the first call, the order is set to 1, and other variables are     
+! initialized.  RMAX is the maximum ratio by which H can be increased   
+! in a single step.  It is initially 1.E4 to compensate for the small   
+! initial H, but then is normally equal to 10.  If a failure            
+! occurs (in corrector convergence or error test), RMAX is set to 2     
+! for the next increase.                                                
+!-----------------------------------------------------------------------
+      LMAX = MAXORD + 1 
+      NQ = 1 
+      L = 2 
+      IALTH = 2 
+      RMAX = 10000.0D0 
+      RC = 0.0D0 
+      EL0 = 1.0D0 
+      CRATE = 0.7D0 
+      HOLD = H 
+      MEO = METH 
+      NSLP = 0 
+      IPUP = MITER 
+      IRET = 3 
+      GO TO 140 
+!-----------------------------------------------------------------------
+! The following block handles preliminaries needed when JSTART = -1.    
+! IPUP is set to MITER to force a matrix update.                        
+! If an order increase is about to be considered (IALTH = 1),           
+! IALTH is reset to 2 to postpone consideration one more step.          
+! If the caller has changed METH, DCFODE is called to reset             
+! the coefficients of the method.                                       
+! If the caller has changed MAXORD to a value less than the current     
+! order NQ, NQ is reduced to MAXORD, and a new H chosen accordingly.    
+! If H is to be changed, YH must be rescaled.                           
+! If H or METH is being changed, IALTH is reset to L = NQ + 1           
+! to prevent further changes in H for that many steps.                  
+!-----------------------------------------------------------------------
+  100 IPUP = MITER 
+      LMAX = MAXORD + 1 
+      IF (IALTH .EQ. 1) IALTH = 2 
+      IF (METH .EQ. MEO) GO TO 110 
+      CALL DCFODE (METH, ELCO, TESCO) 
+      MEO = METH 
+      IF (NQ .GT. MAXORD) GO TO 120 
+      IALTH = L 
+      IRET = 1 
+      GO TO 150 
+  110 IF (NQ .LE. MAXORD) GO TO 160 
+  120 NQ = MAXORD 
+      L = LMAX 
+      DO 125 I = 1,L 
+  125   EL(I) = ELCO(I,NQ) 
+      NQNYH = NQ*NYH 
+      RC = RC*EL(1)/EL0 
+      EL0 = EL(1) 
+      CONIT = 0.5D0/(NQ+2) 
+      DDN = DVNORM (N, SAVF, EWT)/TESCO(1,L) 
+      EXDN = 1.0D0/L 
+      RHDN = 1.0D0/(1.3D0*DDN**EXDN + 0.0000013D0) 
+      RH = MIN(RHDN,1.0D0) 
+      IREDO = 3 
+      IF (H .EQ. HOLD) GO TO 170 
+      RH = MIN(RH,ABS(H/HOLD)) 
+      H = HOLD 
+      GO TO 175 
+!-----------------------------------------------------------------------
+! DCFODE is called to get all the integration coefficients for the      
+! current METH.  Then the EL vector and related constants are reset     
+! whenever the order NQ is changed, or at the start of the problem.     
+!-----------------------------------------------------------------------
+  140 CALL DCFODE (METH, ELCO, TESCO) 
+  150 DO 155 I = 1,L 
+  155   EL(I) = ELCO(I,NQ) 
+      NQNYH = NQ*NYH 
+      RC = RC*EL(1)/EL0 
+      EL0 = EL(1) 
+      CONIT = 0.5D0/(NQ+2) 
+      GO TO (160, 170, 200), IRET 
+!-----------------------------------------------------------------------
+! If H is being changed, the H ratio RH is checked against              
+! RMAX, HMIN, and HMXI, and the YH array rescaled.  IALTH is set to     
+! L = NQ + 1 to prevent a change of H for that many steps, unless       
+! forced by a convergence or error test failure.                        
+!-----------------------------------------------------------------------
+  160 IF (H .EQ. HOLD) GO TO 200 
+      RH = H/HOLD 
+      H = HOLD 
+      IREDO = 3 
+      GO TO 175 
+  170 RH = MAX(RH,HMIN/ABS(H)) 
+  175 RH = MIN(RH,RMAX) 
+      RH = RH/MAX(1.0D0,ABS(H)*HMXI*RH) 
+      R = 1.0D0 
+      DO 180 J = 2,L 
+        R = R*RH 
+        DO 180 I = 1,N 
+  180     YH(I,J) = YH(I,J)*R 
+      H = H*RH 
+      RC = RC*RH 
+      IALTH = L 
+      IF (IREDO .EQ. 0) GO TO 690 
+!-----------------------------------------------------------------------
+! This section computes the predicted values by effectively             
+! multiplying the YH array by the Pascal Triangle matrix.               
+! RC is the ratio of new to old values of the coefficient  H*EL(1).     
+! When RC differs from 1 by more than CCMAX, IPUP is set to MITER       
+! to force PJAC to be called, if a Jacobian is involved.                
+! In any case, PJAC is called at least every MSBP steps.                
+!-----------------------------------------------------------------------
+  200 IF (ABS(RC-1.0D0) .GT. CCMAX) IPUP = MITER 
+      IF (NST .GE. NSLP+MSBP) IPUP = MITER 
+      TN = TN + H 
+      I1 = NQNYH + 1 
+      DO 215 JB = 1,NQ 
+        I1 = I1 - NYH 
+!dir$ ivdep                                                             
+        DO 210 I = I1,NQNYH 
+  210     YH1(I) = YH1(I) + YH1(I+NYH) 
+  215   CONTINUE 
+!-----------------------------------------------------------------------
+! Up to MAXCOR corrector iterations are taken.  A convergence test is   
+! made on the R.M.S. norm of each correction, weighted by the error     
+! weight vector EWT.  The sum of the corrections is accumulated in the  
+! vector ACOR(i).  The YH array is not altered in the corrector loop.   
+!-----------------------------------------------------------------------
+  220 M = 0 
+      DO 230 I = 1,N 
+  230   Y(I) = YH(I,1) 
+      CALL F (NEQ, TN, Y, SAVF) 
+      NFE = NFE + 1 
+      IF (IPUP .LE. 0) GO TO 250 
+!-----------------------------------------------------------------------
+! If indicated, the matrix P = I - h*el(1)*J is reevaluated and         
+! preprocessed before starting the corrector iteration.  IPUP is set    
+! to 0 as an indicator that this has been done.                         
+!-----------------------------------------------------------------------
+      !CALL PJAC (NEQ, Y, YH, NYH, EWT, ACOR, SAVF, WM, IWM, F, JAC) 
+      CALL DPREPJ(NEQ, Y, YH, NYH, EWT, ACOR, SAVF, WM, IWM, F, JAC)
+      IPUP = 0 
+      RC = 1.0D0 
+      NSLP = NST 
+      CRATE = 0.7D0 
+      IF (IERPJ .NE. 0) GO TO 430 
+  250 DO 260 I = 1,N 
+  260   ACOR(I) = 0.0D0 
+  270 IF (MITER .NE. 0) GO TO 350 
+!-----------------------------------------------------------------------
+! In the case of functional iteration, update Y directly from           
+! the result of the last function evaluation.                           
+!-----------------------------------------------------------------------
+      DO 290 I = 1,N 
+        SAVF(I) = H*SAVF(I) - YH(I,2) 
+  290   Y(I) = SAVF(I) - ACOR(I) 
+      DEL = DVNORM (N, Y, EWT) 
+      DO 300 I = 1,N 
+        Y(I) = YH(I,1) + EL(1)*SAVF(I) 
+  300   ACOR(I) = SAVF(I) 
+      GO TO 400 
+!-----------------------------------------------------------------------
+! In the case of the chord method, compute the corrector error,         
+! and solve the linear system with that as right-hand side and          
+! P as coefficient matrix.                                              
+!-----------------------------------------------------------------------
+  350 DO 360 I = 1,N 
+  360   Y(I) = H*SAVF(I) - (YH(I,2) + ACOR(I)) 
+      !CALL SLVS (WM, IWM, Y, SAVF) 
+      CALL DSOLSY(WM, IWM, Y, SAVF)
+      IF (IERSL .LT. 0) GO TO 430 
+      IF (IERSL .GT. 0) GO TO 410 
+      DEL = DVNORM (N, Y, EWT) 
+      DO 380 I = 1,N 
+        ACOR(I) = ACOR(I) + Y(I) 
+  380   Y(I) = YH(I,1) + EL(1)*ACOR(I) 
+!-----------------------------------------------------------------------
+! Test for convergence.  If M.gt.0, an estimate of the convergence      
+! rate constant is stored in CRATE, and this is used in the test.       
+!-----------------------------------------------------------------------
+  400 IF (M .NE. 0) CRATE = MAX(0.2D0*CRATE,DEL/DELP) 
+      DCON = DEL*MIN(1.0D0,1.5D0*CRATE)/(TESCO(2,NQ)*CONIT) 
+      IF (DCON .LE. 1.0D0) GO TO 450 
+      M = M + 1 
+      IF (M .EQ. MAXCOR) GO TO 410 
+      IF (M .GE. 2 .AND. DEL .GT. 2.0D0*DELP) GO TO 410 
+      DELP = DEL 
+      CALL F (NEQ, TN, Y, SAVF) 
+      NFE = NFE + 1 
+      GO TO 270 
+!-----------------------------------------------------------------------
+! The corrector iteration failed to converge.                           
+! If MITER .ne. 0 and the Jacobian is out of date, PJAC is called for   
+! the next try.  Otherwise the YH array is retracted to its values      
+! before prediction, and H is reduced, if possible.  If H cannot be     
+! reduced or MXNCF failures have occurred, exit with KFLAG = -2.        
+!-----------------------------------------------------------------------
+  410 IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430 
+      ICF = 1 
+      IPUP = MITER 
+      GO TO 220 
+  430 ICF = 2 
+      NCF = NCF + 1 
+      RMAX = 2.0D0 
+      TN = TOLD 
+      I1 = NQNYH + 1 
+      DO 445 JB = 1,NQ 
+        I1 = I1 - NYH 
+!dir$ ivdep                                                             
+        DO 440 I = I1,NQNYH 
+  440     YH1(I) = YH1(I) - YH1(I+NYH) 
+  445   CONTINUE 
+      IF (IERPJ .LT. 0 .OR. IERSL .LT. 0) GO TO 680 
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 670 
+      IF (NCF .EQ. MXNCF) GO TO 670 
+      RH = 0.25D0 
+      IPUP = MITER 
+      IREDO = 1 
+      GO TO 170 
+!-----------------------------------------------------------------------
+! The corrector has converged.  JCUR is set to 0                        
+! to signal that the Jacobian involved may need updating later.         
+! The local error test is made and control passes to statement 500      
+! if it fails.                                                          
+!-----------------------------------------------------------------------
+  450 JCUR = 0 
+      IF (M .EQ. 0) DSM = DEL/TESCO(2,NQ) 
+      IF (M .GT. 0) DSM = DVNORM (N, ACOR, EWT)/TESCO(2,NQ) 
+      IF (DSM .GT. 1.0D0) GO TO 500 
+!-----------------------------------------------------------------------
+! After a successful step, update the YH array.                         
+! Consider changing H if IALTH = 1.  Otherwise decrease IALTH by 1.     
+! If IALTH is then 1 and NQ .lt. MAXORD, then ACOR is saved for         
+! use in a possible order increase on the next step.                    
+! If a change in H is considered, an increase or decrease in order      
+! by one is considered also.  A change in H is made only if it is by a  
+! factor of at least 1.1.  If not, IALTH is set to 3 to prevent         
+! testing for that many steps.                                          
+!-----------------------------------------------------------------------
+      KFLAG = 0 
+      IREDO = 0 
+      NST = NST + 1 
+      HU = H 
+      NQU = NQ 
+      DO 470 J = 1,L 
+        DO 470 I = 1,N 
+  470     YH(I,J) = YH(I,J) + EL(J)*ACOR(I) 
+      IALTH = IALTH - 1 
+      IF (IALTH .EQ. 0) GO TO 520 
+      IF (IALTH .GT. 1) GO TO 700 
+      IF (L .EQ. LMAX) GO TO 700 
+      DO 490 I = 1,N 
+  490   YH(I,LMAX) = ACOR(I) 
+      GO TO 700 
+!-----------------------------------------------------------------------
+! The error test failed.  KFLAG keeps track of multiple failures.       
+! Restore TN and the YH array to their previous values, and prepare     
+! to try the step again.  Compute the optimum step size for this or     
+! one lower order.  After 2 or more failures, H is forced to decrease   
+! by a factor of 0.2 or less.                                           
+!-----------------------------------------------------------------------
+  500 KFLAG = KFLAG - 1 
+      TN = TOLD 
+      I1 = NQNYH + 1 
+      DO 515 JB = 1,NQ 
+        I1 = I1 - NYH 
+!dir$ ivdep                                                             
+        DO 510 I = I1,NQNYH 
+  510     YH1(I) = YH1(I) - YH1(I+NYH) 
+  515   CONTINUE 
+      RMAX = 2.0D0 
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 660 
+      IF (KFLAG .LE. -3) GO TO 640 
+      IREDO = 2 
+      RHUP = 0.0D0 
+      GO TO 540 
+!-----------------------------------------------------------------------
+! Regardless of the success or failure of the step, factors             
+! RHDN, RHSM, and RHUP are computed, by which H could be multiplied     
+! at order NQ - 1, order NQ, or order NQ + 1, respectively.             
+! In the case of failure, RHUP = 0.0 to avoid an order increase.        
+! The largest of these is determined and the new order chosen           
+! accordingly.  If the order is to be increased, we compute one         
+! additional scaled derivative.                                         
+!-----------------------------------------------------------------------
+  520 RHUP = 0.0D0 
+      IF (L .EQ. LMAX) GO TO 540 
+      DO 530 I = 1,N 
+  530   SAVF(I) = ACOR(I) - YH(I,LMAX) 
+      DUP = DVNORM (N, SAVF, EWT)/TESCO(3,NQ) 
+      EXUP = 1.0D0/(L+1) 
+      RHUP = 1.0D0/(1.4D0*DUP**EXUP + 0.0000014D0) 
+  540 EXSM = 1.0D0/L 
+      RHSM = 1.0D0/(1.2D0*DSM**EXSM + 0.0000012D0) 
+      RHDN = 0.0D0 
+      IF (NQ .EQ. 1) GO TO 560 
+      DDN = DVNORM (N, YH(1,L), EWT)/TESCO(1,NQ) 
+      EXDN = 1.0D0/NQ 
+      RHDN = 1.0D0/(1.3D0*DDN**EXDN + 0.0000013D0) 
+  560 IF (RHSM .GE. RHUP) GO TO 570 
+      IF (RHUP .GT. RHDN) GO TO 590 
+      GO TO 580 
+  570 IF (RHSM .LT. RHDN) GO TO 580 
+      NEWQ = NQ 
+      RH = RHSM 
+      GO TO 620 
+  580 NEWQ = NQ - 1 
+      RH = RHDN 
+      IF (KFLAG .LT. 0 .AND. RH .GT. 1.0D0) RH = 1.0D0 
+      GO TO 620 
+  590 NEWQ = L 
+      RH = RHUP 
+      IF (RH .LT. 1.1D0) GO TO 610 
+      R = EL(L)/L 
+      DO 600 I = 1,N 
+  600   YH(I,NEWQ+1) = ACOR(I)*R 
+      GO TO 630 
+  610 IALTH = 3 
+      GO TO 700 
+  620 IF ((KFLAG .EQ. 0) .AND. (RH .LT. 1.1D0)) GO TO 610 
+      IF (KFLAG .LE. -2) RH = MIN(RH,0.2D0) 
+!-----------------------------------------------------------------------
+! If there is a change of order, reset NQ, l, and the coefficients.     
+! In any case H is reset according to RH and the YH array is rescaled.  
+! Then exit from 690 if the step was OK, or redo the step otherwise.    
+!-----------------------------------------------------------------------
+      IF (NEWQ .EQ. NQ) GO TO 170 
+  630 NQ = NEWQ 
+      L = NQ + 1 
+      IRET = 2 
+      GO TO 150 
+!-----------------------------------------------------------------------
+! Control reaches this section if 3 or more failures have occured.      
+! If 10 failures have occurred, exit with KFLAG = -1.                   
+! It is assumed that the derivatives that have accumulated in the       
+! YH array have errors of the wrong order.  Hence the first             
+! derivative is recomputed, and the order is set to 1.  Then            
+! H is reduced by a factor of 10, and the step is retried,              
+! until it succeeds or H reaches HMIN.                                  
+!-----------------------------------------------------------------------
+  640 IF (KFLAG .EQ. -10) GO TO 660 
+      RH = 0.1D0 
+      RH = MAX(HMIN/ABS(H),RH) 
+      H = H*RH 
+      DO 645 I = 1,N 
+  645   Y(I) = YH(I,1) 
+      CALL F (NEQ, TN, Y, SAVF) 
+      NFE = NFE + 1 
+      DO 650 I = 1,N 
+  650   YH(I,2) = H*SAVF(I) 
+      IPUP = MITER 
+      IALTH = 5 
+      IF (NQ .EQ. 1) GO TO 200 
+      NQ = 1 
+      L = 2 
+      IRET = 3 
+      GO TO 150 
+!-----------------------------------------------------------------------
+! All returns are made through this section.  H is saved in HOLD        
+! to allow the caller to change H on the next step.                     
+!-----------------------------------------------------------------------
+  660 KFLAG = -1 
+      GO TO 720 
+  670 KFLAG = -2 
+      GO TO 720 
+  680 KFLAG = -3 
+      GO TO 720 
+  690 RMAX = 10.0D0 
+  700 R = 1.0D0/TESCO(2,NQU) 
+      DO 710 I = 1,N 
+  710   ACOR(I) = ACOR(I)*R 
+  720 HOLD = H 
+      JSTART = 1 
+      RETURN 
+!----------------------- END OF SUBROUTINE DSTODE ----------------------
+      END SUBROUTINE DSTODE                                          
+!DECK DEWSET                                                            
+      SUBROUTINE DEWSET (N, ITOL, RelTol, AbsTol, YCUR, EWT) 
+!***BEGIN PROLOGUE  DEWSET                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Set error weight vector.                                   
+!***TYPE      KPP_REAL (SEWSET-S, DEWSET-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This subroutine sets the error weight vector EWT according to        
+!      EWT(i) = RelTol(i)*ABS(YCUR(i)) + AbsTol(i),  i = 1,...,N,           
+!  with the subscript on RelTol and/or AbsTol possibly replaced by 1 above, 
+!  depending on the value of ITOL.                                      
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!***END PROLOGUE  DEWSET                                                
+!**End                                                                  
+      INTEGER N, ITOL 
+      INTEGER I 
+      KPP_REAL RelTol(*), AbsTol(*), YCUR(N), EWT(N) 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DEWSET                                  
+      GO TO (10, 20, 30, 40), ITOL 
+   10 CONTINUE 
+      DO 15 I = 1,N 
+   15   EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(1) 
+      RETURN 
+   20 CONTINUE 
+      DO 25 I = 1,N 
+   25   EWT(I) = RelTol(1)*ABS(YCUR(I)) + AbsTol(I) 
+      RETURN 
+   30 CONTINUE 
+      DO 35 I = 1,N 
+   35   EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(1) 
+      RETURN 
+   40 CONTINUE 
+      DO 45 I = 1,N 
+   45   EWT(I) = RelTol(I)*ABS(YCUR(I)) + AbsTol(I) 
+      RETURN 
+!----------------------- END OF SUBROUTINE DEWSET ----------------------
+      END SUBROUTINE DEWSET                                          
+!DECK DVNORM                                                            
+      KPP_REAL FUNCTION DVNORM (N, V, W) 
+!***BEGIN PROLOGUE  DVNORM                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Weighted root-mean-square vector norm.                     
+!***TYPE      KPP_REAL (SVNORM-S, DVNORM-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  This function routine computes the weighted root-mean-square norm    
+!  of the vector of length N contained in the array V, with weights     
+!  contained in the array W of length N:                                
+!    DVNORM = SQRT( (1/N) * SUM( V(i)*W(i) )**2 )                       
+!                                                                       
+!***SEE ALSO  DLSODE                                                    
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   791129  DATE WRITTEN                                                
+!   890501  Modified prologue to SLATEC/LDOC format.  (FNF)             
+!   890503  Minor cosmetic changes.  (FNF)                              
+!   930809  Renamed to allow single/double precision versions. (ACH)    
+!***END PROLOGUE  DVNORM                                                
+!**End                                                                  
+      INTEGER N,   I 
+      KPP_REAL V(N), W(N), SUM 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  DVNORM                                  
+      SUM = 0.0D0 
+      DO 10 I = 1,N 
+   10   SUM = SUM + (V(I)*W(I))**2 
+      DVNORM = SQRT(SUM/N) 
+      RETURN 
+!----------------------- END OF FUNCTION DVNORM ------------------------
+      END FUNCTION DVNORM                                          
+!DECK XERRWD                                                            
+      SUBROUTINE XERRWD (MSG, NMES, NERR, LEVEL, NI, I1, I2, NR, R1, R2) 
+!***BEGIN PROLOGUE  XERRWD                                              
+!***SUBSIDIARY                                                          
+!***PURPOSE  Write error message with values.                           
+!***CATEGORY  R3C                                                       
+!***TYPE      KPP_REAL (XERRWV-S, XERRWD-D)                     
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  Subroutines XERRWD, XSETF, XSETUN, and the function routine IXSAV,   
+!  as given here, constitute a simplified version of the SLATEC error   
+!  handling package.                                                    
+!                                                                       
+!  All arguments are input arguments.                                   
+!                                                                       
+!  MSG    = The message (character array).                              
+!  NMES   = The length of MSG (number of characters).                   
+!  NERR   = The error number (not used).                                
+!  LEVEL  = The error level..                                           
+!           0 or 1 means recoverable (control returns to caller).       
+!           2 means fatal (run is aborted--see note below).             
+!  NI     = Number of integers (0, 1, or 2) to be printed with message. 
+!  I1,I2  = Integers to be printed, depending on NI.                    
+!  NR     = Number of reals (0, 1, or 2) to be printed with message.    
+!  R1,R2  = Reals to be printed, depending on NR.                       
+!                                                                       
+!  Note..  this routine is machine-dependent and specialized for use    
+!  in limited context, in the following ways..                          
+!  1. The argument MSG is assumed to be of type CHARACTER, and          
+!     the message is printed with a format of (1X,A).                   
+!  2. The message is assumed to take only one line.                     
+!     Multi-line messages are generated by repeated calls.              
+!  3. If LEVEL = 2, control passes to the statement   STOP              
+!     to abort the run.  This statement may be machine-dependent.       
+!  4. R1 and R2 are assumed to be in double precision and are printed   
+!     in D21.13 format.                                                 
+!                                                                       
+!***ROUTINES CALLED  IXSAV                                              
+!***REVISION HISTORY  (YYMMDD)                                          
+!   920831  DATE WRITTEN                                                
+!   921118  Replaced MFLGSV/LUNSAV by IXSAV. (ACH)                      
+!   930329  Modified prologue to SLATEC format. (FNF)                   
+!   930407  Changed MSG from CHARACTER*1 array to variable. (FNF)       
+!   930922  Minor cosmetic change. (FNF)                                
+!***END PROLOGUE  XERRWD                                                
+!                                                                       
+!*Internal Notes:                                                       
+!                                                                       
+! For a different default logical unit number, IXSAV (or a subsidiary   
+! routine that it calls) will need to be modified.                      
+! For a different run-abort command, change the statement following     
+! statement 100 at the end.                                             
+!-----------------------------------------------------------------------
+! Subroutines called by XERRWD.. None                                   
+! Function routine called by XERRWD.. IXSAV                             
+!-----------------------------------------------------------------------
+!**End                                                                  
+!                                                                       
+!  Declare arguments.                                                   
+!                                                                       
+      KPP_REAL R1, R2 
+      INTEGER NMES, NERR, LEVEL, NI, I1, I2, NR 
+      CHARACTER*(*) MSG 
+!                                                                       
+!  Declare local variables.                                             
+!                                                                       
+      INTEGER LUNIT, MESFLG !, IXSAV 
+!                                                                       
+!  Get logical unit number and message print flag.                      
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  XERRWD                                  
+      LUNIT = IXSAV (1, 0, .FALSE.) 
+      MESFLG = IXSAV (2, 0, .FALSE.) 
+      IF (MESFLG .EQ. 0) GO TO 100 
+!                                                                       
+!  Write the message.                                                   
+!                                                                       
+      WRITE (LUNIT,10)  MSG 
+   10 FORMAT(1X,A) 
+      IF (NI .EQ. 1) WRITE (LUNIT, 20) I1 
+   20 FORMAT(6X,'In above message,  I1 =',I10) 
+      IF (NI .EQ. 2) WRITE (LUNIT, 30) I1,I2 
+   30 FORMAT(6X,'In above message,  I1 =',I10,3X,'I2 =',I10) 
+      IF (NR .EQ. 1) WRITE (LUNIT, 40) R1 
+   40 FORMAT(6X,'In above message,  R1 =',D21.13) 
+      IF (NR .EQ. 2) WRITE (LUNIT, 50) R1,R2 
+   50 FORMAT(6X,'In above,  R1 =',D21.13,3X,'R2 =',D21.13) 
+!                                                                       
+!  Abort the run if LEVEL = 2.                                          
+!                                                                       
+  100 IF (LEVEL .NE. 2) RETURN 
+      STOP 
+!----------------------- End of Subroutine XERRWD ----------------------
+      END SUBROUTINE XERRWD                                          
+!DECK XSETF                                                             
+      SUBROUTINE XSETF (MFLAG) 
+!***BEGIN PROLOGUE  XSETF                                               
+!***PURPOSE  Reset the error print control flag.                        
+!***CATEGORY  R3A                                                       
+!***TYPE      ALL (XSETF-A)                                             
+!***KEYWORDS  ERROR CONTROL                                             
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!   XSETF sets the error print control flag to MFLAG:                   
+!      MFLAG=1 means print all messages (the default).                  
+!      MFLAG=0 means no printing.                                       
+!                                                                       
+!***SEE ALSO  XERRWD, XERRWV                                            
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  IXSAV                                              
+!***REVISION HISTORY  (YYMMDD)                                          
+!   921118  DATE WRITTEN                                                
+!   930329  Added SLATEC format prologue. (FNF)                         
+!   930407  Corrected SEE ALSO section. (FNF)                           
+!   930922  Made user-callable, and other cosmetic changes. (FNF)       
+!***END PROLOGUE  XSETF                                                 
+!                                                                       
+! Subroutines called by XSETF.. None                                    
+! Function routine called by XSETF.. IXSAV                              
+!-----------------------------------------------------------------------
+!**End                                                                  
+      INTEGER MFLAG, JUNK !, IXSAV 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  XSETF                                   
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) JUNK = IXSAV (2,MFLAG,.TRUE.) 
+      RETURN 
+!----------------------- End of Subroutine XSETF -----------------------
+      END SUBROUTINE XSETF                                          
+!DECK XSETUN                                                            
+      SUBROUTINE XSETUN (LUN) 
+!***BEGIN PROLOGUE  XSETUN                                              
+!***PURPOSE  Reset the logical unit number for error messages.          
+!***CATEGORY  R3B                                                       
+!***TYPE      ALL (XSETUN-A)                                            
+!***KEYWORDS  ERROR CONTROL                                             
+!***DESCRIPTION                                                         
+!                                                                       
+!   XSETUN sets the logical unit number for error messages to LUN.      
+!                                                                       
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***SEE ALSO  XERRWD, XERRWV                                            
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  IXSAV                                              
+!***REVISION HISTORY  (YYMMDD)                                          
+!   921118  DATE WRITTEN                                                
+!   930329  Added SLATEC format prologue. (FNF)                         
+!   930407  Corrected SEE ALSO section. (FNF)                           
+!   930922  Made user-callable, and other cosmetic changes. (FNF)       
+!***END PROLOGUE  XSETUN                                                
+!                                                                       
+! Subroutines called by XSETUN.. None                                   
+! Function routine called by XSETUN.. IXSAV                             
+!-----------------------------------------------------------------------
+!**End                                                                  
+      INTEGER LUN, JUNK !, IXSAV 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  XSETUN                                  
+      IF (LUN .GT. 0) JUNK = IXSAV (1,LUN,.TRUE.) 
+      RETURN 
+!----------------------- End of Subroutine XSETUN ----------------------
+      END SUBROUTINE XSETUN                                          
+!DECK IXSAV                                                             
+      INTEGER FUNCTION IXSAV (IPAR, IVALUE, ISET) 
+!***BEGIN PROLOGUE  IXSAV                                               
+!***SUBSIDIARY                                                          
+!***PURPOSE  Save and recall error message control parameters.          
+!***CATEGORY  R3C                                                       
+!***TYPE      ALL (IXSAV-A)                                             
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+!                                                                       
+!  IXSAV saves and recalls one of two error message parameters:         
+!    LUNIT, the logical unit number to which messages are printed, and  
+!    MESFLG, the message print flag.                                    
+!  This is a modification of the SLATEC library routine J4SAVE.         
+!                                                                       
+!  Saved local variables..                                              
+!   LUNIT  = Logical unit number for messages.  The default is obtained 
+!            by a call to IUMACH (may be machine-dependent).            
+!   MESFLG = Print control flag..                                       
+!            1 means print all messages (the default).                  
+!            0 means no printing.                                       
+!                                                                       
+!  On input..                                                           
+!    IPAR   = Parameter indicator (1 for LUNIT, 2 for MESFLG).          
+!    IVALUE = The value to be set for the parameter, if ISET = .TRUE.   
+!    ISET   = Logical flag to indicate whether to read or write.        
+!             If ISET = .TRUE., the parameter will be given             
+!             the value IVALUE.  If ISET = .FALSE., the parameter       
+!             will be unchanged, and IVALUE is a dummy argument.        
+!                                                                       
+!  On return..                                                          
+!    IXSAV = The (old) value of the parameter.                          
+!                                                                       
+!***SEE ALSO  XERRWD, XERRWV                                            
+!***ROUTINES CALLED  IUMACH                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   921118  DATE WRITTEN                                                
+!   930329  Modified prologue to SLATEC format. (FNF)                   
+!   930915  Added IUMACH call to get default output unit.  (ACH)        
+!   930922  Minor cosmetic changes. (FNF)                               
+!   010425  Type declaration for IUMACH added. (ACH)                    
+!***END PROLOGUE  IXSAV                                                 
+!                                                                       
+! Subroutines called by IXSAV.. None                                    
+! Function routine called by IXSAV.. IUMACH                             
+!-----------------------------------------------------------------------
+!**End                                                                  
+      LOGICAL ISET 
+      INTEGER IPAR, IVALUE 
+!-----------------------------------------------------------------------
+      INTEGER LUNIT, MESFLG!, IUMACH
+!-----------------------------------------------------------------------
+! The following Fortran-77 declaration is to cause the values of the    
+! listed (local) variables to be saved between calls to this routine.   
+!-----------------------------------------------------------------------
+      SAVE LUNIT, MESFLG 
+      DATA LUNIT/-1/, MESFLG/1/ 
+!                                                                       
+!***FIRST EXECUTABLE STATEMENT  IXSAV                                   
+      IF (IPAR .EQ. 1) THEN 
+        IF (LUNIT .EQ. -1) LUNIT = IUMACH() 
+        IXSAV = LUNIT 
+        IF (ISET) LUNIT = IVALUE 
+        ENDIF 
+!                                                                       
+      IF (IPAR .EQ. 2) THEN                                             
+        IXSAV = MESFLG                                                  
+        IF (ISET) MESFLG = IVALUE                                       
+        ENDIF                                                           
+!                                                                       
+      RETURN                                                            
+!----------------------- End of Function IXSAV -------------------------
+      END FUNCTION IXSAV                                         
+!DECK IUMACH                                                            
+      INTEGER FUNCTION IUMACH() 
+!***BEGIN PROLOGUE  IUMACH                                              
+!***PURPOSE  Provide standard output unit number.                       
+!***CATEGORY  R1                                                        
+!***TYPE      INTEGER (IUMACH-I)                                        
+!***KEYWORDS  MACHINE CONSTANTS                                         
+!***AUTHOR  Hindmarsh, Alan C., (LLNL)                                  
+!***DESCRIPTION                                                         
+! *Usage:                                                               
+!        INTEGER  LOUT, IUMACH                                          
+!        LOUT = IUMACH()                                                
+!                                                                       
+! *Function Return Values:                                              
+!     LOUT : the standard logical unit for Fortran output.              
+!                                                                       
+!***REFERENCES  (NONE)                                                  
+!***ROUTINES CALLED  (NONE)                                             
+!***REVISION HISTORY  (YYMMDD)                                          
+!   930915  DATE WRITTEN                                                
+!   930922  Made user-callable, and other cosmetic changes. (FNF)       
+!***END PROLOGUE  IUMACH                                                
+!                                                                       
+!*Internal Notes:                                                       
+!  The built-in value of 6 is standard on a wide range of Fortran       
+!  systems.  This may be machine-dependent.                             
+!**End                                                                  
+!***FIRST EXECUTABLE STATEMENT  IUMACH                                  
+      IUMACH = 6 
+!                                                                       
+      RETURN 
+!----------------------- End of Function IUMACH ------------------------
+      END FUNCTION IUMACH                                         
+
+!---- END OF SUBROUTINE DLSODE AND ITS INTERNAL PROCEDURES
+      END SUBROUTINE DLSODE                                          
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM(N, T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      INTEGER :: N
+      KPP_REAL :: V(NVAR), FCT(NVAR), T
+      
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+
+      CALL Fun(V, FIX, RCONST, FCT)
+      
+      !Nfun=Nfun+1
+
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM (N, T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Global
+      USE KPP_ROOT_JacobianSP
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+      USE KPP_ROOT_Rates
+
+      IMPLICIT NONE
+
+      KPP_REAL :: V(NVAR), T
+      INTEGER :: N
+#ifdef FULL_ALGEBRA    
+      INTEGER :: I, J
+      KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+#else
+      KPP_REAL :: JF(LU_NONZERO)
+#endif   
+  
+!      TOLD = TIME
+!      TIME = T
+!      CALL Update_SUN()
+!      CALL Update_RCONST()
+!      CALL Update_PHOTO()
+!      TIME = TOLD
+    
+#ifdef FULL_ALGEBRA    
+      CALL Jac_SP(V, FIX, RCONST, JV)
+      DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+      END DO
+#else
+      CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+      !Njac=Njac+1
+    
+      END SUBROUTINE JAC_CHEM
+
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_odessa_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_odessa_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_odessa_ddm.def	(revision 3477)
@@ -0,0 +1,42 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+#DOUBLE ON 
+#INTFILE kpp_odessa_ddm
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
+#INLINE C_GLOBAL
+extern int Autonomous;
+extern double STEPSTART;
+#ENDINLINE
+
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+
+
+#INLINE C_INIT
+        STEPMIN=0.0001;
+        STEPMAX=3600.0;
+        Autonomous = 0;
+        STEPSTART=STEPMIN;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_odessa_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_odessa_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_odessa_ddm.f	(revision 3477)
@@ -0,0 +1,4427 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      REAL*8 TIN
+C TOUT - End Time
+      REAL*8 TOUT
+C Concentrations and Sensitivities
+      REAL*8 Y(NVAR,NSENSIT+1), PARAMS(NSENSIT)
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+      INTEGER i
+
+      INTEGER LIW, LRW
+C      PARAMETER (LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+C      PARAMETER (LIW = 21 + NVAR + NSENSIT)
+C      REAL*8 RWORK(LRW)
+C      INTEGER IWORK(LIW)
+C Note: the following dynamic allocation is not standard F77 and may not work on
+C       some systems. Declare LRW, LIW parameters as above with some upper bound used for NSENSIT
+      REAL*8 RWORK(22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR)
+      INTEGER IWORK(21 + NVAR + NSENSIT)
+
+      INTEGER IOPT(3), NEQ(2)
+
+      EXTERNAL FUNC_CHEM,JAC,DFUNC_CHEMDPAR
+
+      MF = 21    ! --- BDF plus user-supplied Jacobian
+
+      LRW = 22 + 8*(NSENSIT+1)*NVAR + NVAR**2 + NVAR
+      LIW = 21 + NVAR + NSENSIT
+
+      NEQ(1) = NVAR ! --- No. of Variables
+      NEQ(2) = NSENSIT ! --- No of parameters
+
+      ITOL=1     ! --- 1=Scalar Tolerances; 4 = VECTOR TOLERANCES
+      ITASK=1    ! --- Normal Output
+      ISTATE=1
+      IOPT(1)=1  ! --- 0= No optional parameters, 1=Optional parameters
+      IOPT(2)=1  ! --- 1=Perform sensitivity analysis; 0 if not
+      IOPT(3)=1  ! --- 1 if DFUNC_CHEMDPAR supplied by the user;
+                 ! --- 0 if finite differences are to be used
+C --- Set optional parameters
+      DO 10 i=1,LRW
+        RWORK(i) = 0.0D0
+ 10   CONTINUE
+      DO 20 i=1,LIW
+        IWORK(i) = 0
+ 20   CONTINUE
+
+      RWORK(5) = STEPMIN   ! 	THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+      RWORK(6) = STEPMAX     ! THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+      RWORK(7) = 0.0D0       ! THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+      IWORK(6) = 5000        !  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+
+      CALL KPP_ODESSA( FUNC_CHEM,DFUNC_CHEMDPAR,NEQ,Y,PARAMS,TIN,TOUT,
+     &              ITOL,RTOL,ATOL,
+     1              ITASK,ISTATE,IOPT,RWORK,LRW,IWORK,LIW,
+     &              JAC,MF)
+
+      IF (ISTATE.LT.0) THEN
+        print *,'KPP_ODESSA: Unsucessfull exit at T=',
+     &          TIN,' (ISTATE=',ISTATE,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+
+
+        SUBROUTINE FUNC_CHEM (N, T, V, PARAMS, FCT)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+
+        DIMENSION V(NVAR), PARAMS(*), FCT(NVAR)
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        CALL Fun(V,  FIX, RCONST, FCT)
+        RETURN
+        END
+
+        SUBROUTINE DFUNC_CHEMDPAR (N, T, V, PARAMS, DFCT, JPAR)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Global.h'
+C --- NCOEFF = number of rate coefficients w.r.t. which we differentiate
+C    (note that in some applications NCOEFF may be different than NSENSIT)
+C    JCOEFF(1:NCOEFF) are the indices of rate coefficients   w.r.t. which we differentiate
+        INTEGER NCOEFF, JCOEFF(NREACT)
+        COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+
+        DIMENSION V(NVAR), PARAMS(*), DFCT(NVAR)
+	INTEGER JPAR, i, JC(1)
+	IF (DDMTYPE .EQ. 0) THEN
+C This setting is required for sensitivities w.r.t. initial conditions
+          DO i=1,NVAR
+	    DFCT(i) = 0.d0
+	  END DO
+	ELSE
+C This setting is required for sensitivities w.r.t. rate coefficients
+C   ... and should be changed by the user for other applications
+          JC(1) = JCOEFF(JPAR)
+	  CALL dFun_dRcoeff(V,  FIX, 1, JC, DFCT )
+	END IF
+        RETURN
+        END
+
+        SUBROUTINE JAC (N, T, V, PARAMS, ML, MU, JS, NROWPD)
+        INCLUDE 'KPP_ROOT_Parameters.h'
+        INCLUDE 'KPP_ROOT_Sparse.h'
+
+        REAL*8 V(NVAR), PARAMS(*), JS(LU_NONZERO)
+	INTEGER ML, MU, NROWPD
+        TOLD = TIME
+        TIME = T
+        CALL Update_SUN()
+        CALL Update_RCONST()
+        TIME = TOLD
+        DO i=1,LU_NONZERO
+            JS(i) = 0.0D0
+        END DO
+        CALL Jac_SP(V,  FIX, RCONST, JS)
+        RETURN
+        END
+
+
+C      ALGORITHM 658, COLLECTED ALGORITHMS FROM ACM.
+C      THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+C      VOL. 14, NO. 1, P.61.
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE..  LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS.  SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY DIFFERENTIA
+C     EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS SENSITIVITY ANALYSIS.
+C     SUBMITTED TO ACM TRANS. MATH. SOFTWARE, (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C PROBLEM STATEMENT..
+C
+C THE ODESSA MODIFICATION OF THE LSODE PACKAGE PROVIDES THE OPTION TO
+C CALCULATE FIRST-ORDER SENSITIVITY COEFFICIENTS FOR A SYSTEM OF STIFF
+C OR NON-STIFF EXPLICIT ORDINARY DIFFERENTIAL EQUATIONS OF THE GENERAL
+C FORM :
+C
+C                  DY/DT = F(Y,T;P)     (1)
+C
+C WHERE Y IS AN N-DIMENSIONAL DEPENDENT VARIABLE VECTOR, T IS THE
+C INDEPENDENT INTEGRATION VARIABLE, AND P IS AN NPAR-DIMENSIONAL
+C CONSTANT VECTOR. THE GOVERNING EQUATIONS FOR THE FIRST-ORDER
+C SENSITIVITY COEFFICIENTS ARE GIVEN BY :
+C
+C                  S'(T) = J(T)*S(T) + DF/DP     (2)
+C
+C WHERE
+C
+C                  S(T)  = DY(T)/DP (= SENSITIVITY FUNCTIONS)
+C                  S'(T) = D(DY(T)/DP)/DT
+C                  J(T)  = DF(Y,T;P)/DY(T) (= JACOBIAN MATRIX)
+C AND              DF/DP = DF(Y,T;P)/DP (= INHOMOGENEITY MATRIX)
+C
+C SOLUTION OF EQUATIONS (1) AND (2) PROCEEDS SIMULTANEOUSLY VIA AN
+C EXTENSION OF THE LSODE PACKAGE AS DESCRIBED IN [1].
+C----------------------------------------------------------------------
+C ACKNOWLEDGEMENT : THE FOLLOWING ODESSA PACKAGE DOCUMENTATION IS A
+C                   MODIFICATION OF THE LSODE DOCUMENTATION WHICH
+C                   ACCOMPANIES THE LSODE PACKAGE CODE.
+C----------------------------------------------------------------------
+C SUMMARY OF USAGE.
+C
+C COMMUNICATION BETWEEN THE USER AND THE ODESSA PACKAGE, FOR NORMAL
+C SITUATIONS, IS SUMMARIZED HERE. THIS SUMMARY DESCRIBES ONLY A SUBSET
+C OF THE FULL SET OF OPTIONS AVAILABLE.  SEE THE FULL DESCRIPTION FOR
+C DETAILS, INCLUDING OPTIONAL COMMUNICATION, NONSTANDARD OPTIONS,
+C AND INSTRUCTIONS FOR SPECIAL SITUATIONS.  SEE ALSO THE EXAMPLE
+C PROBLEM (WITH PROGRAM AND OUTPUT) FOLLOWING THIS SUMMARY.
+C
+C A. FIRST PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE F (N, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(N), YDOT(N), PAR(NPAR)
+C WHICH SUPPLIES THE VECTOR FUNCTION F BY LOADING YDOT(I) WITH F(I).
+C N IS THE NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS IN THE
+C ABOVE MODEL. NPAR IS THE NUMBER OF MODEL PARAMETERS FOR WHICH
+C VECTOR SENSITIVITY FUNCTIONS ARE DESIRED. YOU ARE ALSO ENCOURAGED
+C TO PROVIDE A SUBROUTINE OF THE FORM..
+C              SUBROUTINE DF (N, T, Y, PAR, DFDP, JPAR)
+C              DOUBLE PRECISION T, Y, PAR, DFDP
+C              DIMENSION Y(N), PAR(NPAR), DFDP(N)
+C              GO TO (1,...,NPAR) JPAR
+C         1    DFDP(1) = DF(1)/DP(1)
+C              .
+C              DFDP(I) = DF(I)/DP(1)
+C              .
+C              DFDP(N) = DF(N)/DP(1)
+C              RETURN
+C         2    DFDP(1) = DF(1)/DP(2)
+C              .
+C              DFDP(I) = DF(I)/DP(2)
+C              .
+C              DFDP(N) = DF(N)/DP(2)
+C              RETURN
+C         .    .
+C         .    .
+C              RETURN
+C       NPAR   DFDP(1) = DF(1)/DP(NPAR)
+C              .
+C              DFDP(I) = DF(I)/DP(NPAR)
+C              .
+C              DFDP(N) = DF(N)/DP(NPAR)
+C              RETURN
+C              END
+C ONLY NONZERO ELEMENTS NEED BE LOADED. IF THIS IS NOT FEASIBLE,
+C ODESSA WILL GENERATE THIS MATRIX INTERNALLY BY DIFFERENCE QUOTIENTS.
+C
+C B. NEXT DETERMINE (OR GUESS) WHETHER OR NOT THE PROBLEM IS STIFF.
+C STIFFNESS OCCURS WHEN THE JACOBIAN MATRIX DF/DY HAS AN EIGENVALUE
+C WHOSE REAL PART IS NEGATIVE AND LARGE IN MAGNITUDE, COMPARED TO THE
+C RECIPROCAL OF THE T SPAN OF INTEREST.  IF THE PROBLEM IS NONSTIFF,
+C USE METH = 10.  IF IT IS STIFF, USE METH = 20. THE USER IS REQUIRED
+C TO INPUT THE METHOD FLAG MF = 10*METH + MITER. THERE ARE FOUR
+C STANDARD CHOICES FOR MITER WHEN A SENSITIVITY ANALYSIS IS DESIRED,
+C AND ODESSA REQUIRES THE JACOBIAN MATRIX IN SOME FORM.
+C THIS MATRIX IS REGARDED EITHER AS FULL (MITER = 1 OR 2),
+C OR BANDED (MITER = 4 OR 5). IN THE BANDED CASE, ODESSA REQUIRES TWO
+C HALF-BANDWIDTH PARAMETERS ML AND MU.  THESE ARE, RESPECTIVELY, THE
+C WIDTHS OF THE LOWER AND UPPER PARTS OF THE BAND, EXCLUDING THE MAIN
+C DIAGONAL.  THUS THE BAND CONSISTS OF THE LOCATIONS (I,J) WITH
+C I-ML .LE. J .LE. I+MU, AND THE FULL BANDWIDTH IS ML+MU+1.
+C
+C C. YOU ARE ENCOURAGED TO SUPPLY THE JACOBIAN DIRECTLY (MF = 11, 14,
+C 21, OR 24), BUT IF THIS IS NOT FEASIBLE, ODESSA WILL COMPUTE IT
+C INTERNALLY BY DIFFERENCE QUOTIENTS (MF = 12, 15, 22, OR 25). IF YOU
+C ARE SUPPLYING THE JACOBIAN, PROVIDE A SUBROUTINE OF THE FORM..
+C         SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C         DOUBLE PRECISION T, Y, PAR, PD
+C         DIMENSION Y(N), PD(NROWPD,N), PAR(NPAR)
+C WHICH SUPPLIES DF/DY BY LOADING PD AS FOLLOWS..
+C  FOR A FULL JACOBIAN (MF = 11, OR 21), LOAD PD(I,J) WITH DF(I)/DY(J),
+C  THE PARTIAL DERIVATIVE OF F(I) WITH RESPECT TO Y(J).  (IGNORE THE
+C  ML AND MU ARGUMENTS IN THIS CASE.)
+C  FOR A BANDED JACOBIAN (MF = 14, OR 24), LOAD PD(I-J+MU+1,J) WITH
+C  DF(I)/DY(J), I.E. LOAD THE DIAGONAL LINES OF DF/DY INTO THE ROWS OF
+C  PD FROM THE TOP DOWN.
+C IN EITHER CASE, ONLY NONZERO ELEMENTS NEED BE LOADED.
+C
+C D. WRITE A MAIN PROGRAM WHICH CALLS SUBROUTINE ODESSA ONCE FOR
+C EACH POINT AT WHICH ANSWERS ARE DESIRED.  THIS SHOULD ALSO PROVIDE
+C FOR POSSIBLE USE OF LOGICAL UNIT 6 FOR OUTPUT OF ERROR MESSAGES BY
+C ODESSA.  ON THE FIRST CALL TO ODESSA, SUPPLY ARGUMENTS AS FOLLOWS..
+C F     = NAME OF SUBROUTINE FOR RIGHT-HAND SIDE VECTOR F (MODEL).
+C         THIS NAME MUST BE DECLARED EXTERNAL IN CALLING PROGRAM.
+C DF    = NAME OF SUBROUTINE FOR INHOMOGENEITY MATRIX DF/DP.
+C         IF USED (IDF = 1), THIS NAME MUST BE DECLARED EXTERNAL IN
+C         CALLING PROGRAM. IF NOT USED (IDF = 0), PASS A DUMMY NAME.
+C N     = NUMBER OF FIRST ORDER ODE-S IN MODEL; LOAD INTO NEQ(1).
+C NPAR  = NUMBER OF MODEL PARAMETERS OF INTEREST; LOAD INTO NEQ(2).
+C Y     = AN (N) BY (NPAR+1) REAL ARRAY OF INITIAL VALUES..
+C         Y(I,1) , I = 1,N , CONTAIN THE STATE, OR MODEL, DEPENDENT
+C                            VARIABLES,
+C         Y(I,J) , J = 2,NPAR , CONTAIN THE DEPENDENT SENSITIVITY
+C                               COEFFICIENTS.
+C PAR   = A REAL ARRAY OF LENGTH NPAR CONTAINING MODEL PARAMETERS
+C         OF INTEREST.
+C T     = THE INITIAL VALUE OF THE INDEPENDENT VARIABLE.
+C TOUT  = FIRST POINT WHERE OUTPUT IS DESIRED (.NE. T).
+C ITOL  = 1, 2, 3, OR 4 ACCORDING AS RTOL, ATOL (BELOW) ARE  SCALARS
+C         OR ARRAYS.
+C RTOL  = RELATIVE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C ATOL  = ABSOLUTE TOLERANCE PARAMETER (SCALAR OR (N) BY (NPAR+1)
+C         ARRAY).
+C         THE ESTIMATED LOCAL ERROR IN Y(I,J) WILL BE CONTROLLED SO AS
+C         TO BE ROUGHLY LESS (IN MAGNITUDE) THAN
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL          IF ITOL = 1,
+C          EWT(I,J) = RTOL*ABS(Y(I,J)) + ATOL(I,J)     IF ITOL = 2,
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL      IF ITOL = 3, OR
+C          EWT(I,J) = RTOL(I,J)*ABS(Y(I,J) + ATOL(I,J) IF ITOL = 4.
+C         THUS THE LOCAL ERROR TEST PASSES IF, IN EACH COMPONENT,
+C         EITHER THE ABSOLUTE ERROR IS LESS THAN ATOL (OR ATOL(I,J)),
+C         OR THE RELATIVE ERROR IS LESS THAN RTOL (OR RTOL(I,J)).
+C         USE RTOL = 0.0 FOR PURE ABSOLUTE ERROR CONTROL, AND
+C         USE ATOL = 0.0 FOR PURE RELATIVE ERROR CONTROL.
+C         CAUTION.. ACTUAL (GLOBAL) ERRORS MAY EXCEED THESE LOCAL
+C         TOLERANCES, SO CHOOSE THEM CONSERVATIVELY.
+C ITASK = 1 FOR NORMAL COMPUTATION OF OUTPUT VALUES OF Y AT T = TOUT.
+C ISTATE = INTEGER FLAG (INPUT AND OUTPUT).  SET ISTATE = 1.
+C IOPT  = 0, TO INDICATE NO OPTIONAL INPUTS FOR INTEGRATION;
+C          LOAD INTO IOPT(1).
+C ISOPT = 1, TO INDICATE SENSITIVITY ANALYSIS, = 0, TO INDICATE
+C          NO SENSITIVITY ANALYSIS; LOAD INTO IOPT(2).
+C IDF   = 1, IF SUBROUTINE DF (ABOVE) IS SUPPLIED BY THE USER,
+C          = 0, OTHERWISE; LOAD INTO IOPT(3).
+C RWORK = REAL WORK ARRAY OF LENGTH AT LEAST..
+C           22 + 16*N + N**2           FOR MF = 11 OR 12,
+C           22 + 17*N + (2*ML + MU)*N  FOR MF = 14 OR 15,
+C           22 +  9*N + N**2           FOR MF = 21 OR 22,
+C           22 + 10*N + (2*ML + MU)*N  FOR MF = 24 OR 25,
+C         IF ISOPT = 0, OR..
+C           22 + 15*(NPAR+1)*N + N**2 + N           FOR MF = 11 OR 12,
+C           24 + 15*(NPAR+1)*N + (2*ML+MU+2)*N + N  FOR MF = 14 OR 15,
+C           22 + 8*(NPAR+1)*N + N**2 + N            FOR MF = 21 OR 22,
+C           24 + 8*(NPAR+1)*N + (2*ML+MU+2)*N + N   FOR MF = 24 OR 25,
+C         IF ISOPT = 1.
+C LRW   = DECLARED LENGTH OF RWORK (IN USER-S DIMENSION STATEMENT).
+C IWORK = INTEGER WORK ARRAY OF LENGTH AT LEAST..
+C          20 + N         IF ISOPT = 0,
+C          21 + N + NPAR  IF ISOPT = 1.
+C        IF MITER = 4 OR 5, INPUT IN IWORK(1),IWORK(2) THE LOWER
+C        AND UPPER HALF-BANDWIDTHS ML,MU (EXCLUDING MAIN DIAGONAL).
+C LIW  = DECLARED LENGTH OF IWORK (IN USER-S DIMENSION STATEMENT).
+C JAC  = NAME OF SUBROUTINE FOR JACOBIAN MATRIX.
+C        IF USED, THIS NAME MUST BE DECLARED EXTERNAL IN CALLING
+C        PROGRAM.  IF NOT USED, PASS A DUMMY NAME.
+C MF   = METHOD FLAG.  STANDARD VALUES FOR ISOPT = 0 ARE..
+C         10 FOR NONSTIFF (ADAMS) METHOD, NO JACOBIAN USED.
+C         21 FOR STIFF (BDF) METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         22 FOR STIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         24 FOR STIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         25 FOR STIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C        IF ISOPT = 1, MF = 10 IS ILLEGAL AND CAN BE REPLACED BY..
+C         11 FOR NONSTIFF METHOD, USER-SUPPLIED FULL JACOBIAN.
+C         12 FOR NONSTIFF METHOD, INTERNALLY GENERATED FULL JACOBIAN.
+C         14 FOR NONSTIFF METHOD, USER-SUPPLIED BANDED JACOBIAN.
+C         15 FOR NONSTIFF METHOD, INTERNALLY GENERATED BANDED JACOBIAN.
+C NOTE THAT THE MAIN PROGRAM MUST DECLARE ARRAYS Y, RWORK, IWORK, AND
+C POSSIBLY ATOL AND RTOL, AS WELL AS NEQ, IOPT, AND PAR IF ISOPT = 1.
+C
+C E. THE OUTPUT FROM THE FIRST CALL (OR ANY CALL) IS..
+C     Y = ARRAY OF COMPUTED VALUES OF Y(T) VECTOR.
+C     T = CORRESPONDING VALUE OF INDEPENDENT VARIABLE (NORMALLY TOUT).
+C ISTATE = 2  IF ODESSA WAS SUCCESSFUL, NEGATIVE OTHERWISE.
+C         -1 MEANS EXCESS WORK DONE ON THIS CALL (PERHAPS WRONG MF).
+C         -2 MEANS EXCESS ACCURACY REQUESTED (TOLERANCES TOO SMALL).
+C         -3 MEANS ILLEGAL INPUT DETECTED (SEE PRINTED MESSAGE).
+C         -4 MEANS REPEATED ERROR TEST FAILURES (CHECK ALL INPUTS).
+C         -5 MEANS REPEATED CONVERGENCE FAILURES (PERHAPS BAD JACOBIAN
+C            SUPPLIED OR WRONG CHOICE OF MF OR TOLERANCES).
+C         -6 MEANS ERROR WEIGHT BECAME ZERO DURING PROBLEM. (SOLUTION
+C            COMPONENT I,J VANISHED, AND ATOL OR ATOL(I,J) = 0.0)
+C
+C F. TO CONTINUE THE INTEGRATION AFTER A SUCCESSFUL RETURN, SIMPLY
+C RESET TOUT AND CALL ODESSA AGAIN. NO OTHER PARAMETERS NEED BE RESET.
+C----------------------------------------------------------------------
+C EXAMPLE PROBLEM.
+C
+C THE FOLLOWING IS A SIMPLE EXAMPLE PROBLEM, WITH THE CODING
+C NEEDED FOR ITS SOLUTION BY ODESSA.  THE PROBLEM IS FROM CHEMICAL
+C KINETICS, AND CONSISTS OF THE FOLLOWING THREE RATE EQUATIONS..
+C    DY1/DT = -PAR(1)*Y1 + PAR(2)*Y2*Y3 ; PAR(1) = .04, PAR(2) = 1.E4
+C    DY2/DT = PAR(1)*Y1 - PAR(2)*Y2*Y3 - PAR(3)*Y2**2 ; PAR(3) = 3.E7
+C    DY3/DT = PAR(3)*Y2**2
+C ON THE INTERVAL FROM T = 0.0 TO T = 4.E10, WITH INITIAL CONDITIONS
+C Y1 = 1.0, Y2 = Y3 = 0, AND S(I,J) = 0, I = 1,3, J = 1,3.
+C THE PROBLEM IS STIFF.
+C
+C THE FOLLOWING CODING KppSolveS THIS PROBLEM WITH ODESSA, USING
+C MF = 21 AND PRINTING RESULTS AT T = .4, 4., ..., 4.E10.
+C IT USES ITOL = 4 AND ATOL MUCH SMALLER FOR Y2 THAN Y1 OR Y3,
+C BECAUSE Y2 HAS MUCH SMALLER VALUES. LESS STRINGENT TOLERANCES
+C ARE ASSIGNED FOR THE SENSITIVITIES TO ACHIEVE GREATER EFFICIENCY.
+C AT THE END OF THE RUN, STATISTICAL QUANTITIES OF INTEREST ARE
+C PRINTED (SEE OPTIONAL OUTPUTS IN THE FULL DESCRIPTION BELOW).
+C
+C      DOUBLE PRECISION ATOL, RWORK, RTOL, T, TOUT, Y, PAR
+C      EXTERNAL FEX, JEX, DFEX
+C      DIMENSION Y(3,4), PAR(3), ATOL(3,4), RTOL(3,4), RWORK(130),
+C     1  IWORK(27), NEQ(2), IOPT(3)
+C      N = 3
+C      NPAR = 3
+C      NEQ(1) = N
+C      NEQ(2) = NPAR
+C      NSV = NPAR+1
+C      DO 10 I = 1,N
+C      DO 10 J = 1,NSV
+C 10     Y(I,J) = 0.0D0
+C      Y(1,1) = 1.0D0
+C      PAR(1) = 0.04D0
+C      PAR(2) = 1.0D4
+C      PAR(3) = 3.0D7
+C      T = 0.D0
+C      TOUT = .4D0
+C      ITOL = 4
+C      ATOL(1,1) = 1.D-6
+C      ATOL(2,1) = 1.D-10
+C      ATOL(3,1) = 1.D-6
+C      DO 20 I = 1,N
+C        RTOL(I,1) = 1.D-4
+C        DO 15 J = 2,NSV
+C          RTOL(I,J) = 1.D-3
+C 15       ATOL(I,J) = 1.D2 * ATOL(I,1)
+C 20   CONTINUE
+C      ITASK = 1
+C      ISTATE = 1
+C      IOPT(1) = 0
+C      IOPT(2) = 1
+C      IOPT(3) = 1
+C      LRW = 130
+C      LIW = 27
+C      MF = 21
+C      DO 60 IOUT = 1,12
+C        CALL ODESSA(FEX,DFEX,NEQ,Y,PAR,T,TOUT,ITOL,RTOL,ATOL,
+C     1    ITASK,ISTATE, IOPT,RWORK,LRW,IWORK,LIW,JEX,MF)
+C        WRITE(6,30)T,Y(1,1),Y(2,1),Y(3,1)
+C 30     FORMAT(1X,7H AT T =,E12.4,6H   Y =,3E14.6)
+C        DO 50 J = 2,NSV
+C          JPAR = J-1
+C          WRITE(6,40)JPAR,Y(1,J),Y(2,J),Y(3,J)
+C 40       FORMAT(20X,2HS(,I1,3H) =,3E14.6)
+C 50     CONTINUE
+C        IF (ISTATE .LT. 0) GO TO 80
+C 60     TOUT = TOUT*10.D0
+C      WRITE(6,70)IWORK(11),IWORK(12),IWORK(13),IWORK(19)
+C 70   FORMAT(1X,/,12H NO. STEPS =,I4,11H  NO. F-S =,I4,11H  NO. J-S =,
+C     1  I4,12H  NO. DF-S =,I4)
+C      STOP
+C 80   WRITE(6,90)ISTATE
+C 90   FORMAT(///22H ERROR HALT.. ISTATE =,I3)
+C      STOP
+C      END
+C
+C      SUBROUTINE FEX (NEQ, T, Y, PAR, YDOT)
+C      DOUBLE PRECISION T, Y, YDOT, PAR
+C      DIMENSION Y(3), YDOT(3), PAR(3)
+C      YDOT(1) = -PAR(1)*Y(1) + PAR(2)*Y(2)*Y(3)
+C      YDOT(3) = PAR(3)*Y(2)*Y(2)
+C      YDOT(2) = -YDOT(1) - YDOT(3)
+C      RETURN
+C      END
+C
+C      SUBROUTINE JEX (NEQ, T, Y, PAR, ML, MU, PD, NRPD)
+C      DOUBLE PRECISION PD, T, Y, PAR
+C      DIMENSION Y(3), PD(NRPD,3), PAR(3)
+C      PD(1,1) = -PAR(1)
+C      PD(1,2) = PAR(2)*Y(3)
+C      PD(1,3) = PAR(2)*Y(2)
+C      PD(2,1) = PAR(1)
+C      PD(2,3) = -PD(1,3)
+C      PD(3,2) = 2.D0*PAR(3)*Y(2)
+C      PD(2,2) = -PD(1,2) - PD(3,2)
+C      RETURN
+C      END
+C
+C      SUBROUTINE DFEX (NEQ, T, Y, PAR, DFDP, JPAR)
+C      DOUBLE PRECISION T, Y, PAR, DFDP
+C      DIMENSION Y(3), PAR(3), DFDP(3)
+C      GO TO (1,2,3), JPAR
+C  1   DFDP(1) = -Y(1)
+C      DFDP(2) = Y(1)
+C      RETURN
+C  2   DFDP(1) = Y(2)*Y(3)
+C      DFDP(2) = -Y(2)*Y(3)
+C      RETURN
+C  3   DFDP(2) = -Y(2)*Y(2)
+C      DFDP(3) = Y(2)*Y(2)
+C      RETURN
+C      END
+C
+C  THE OUTPUT OF THIS PROGRAM (ON A DATA GENERAL MV-8000 IN
+C  DOUBLE PRECISION IS AS FOLLOWS:
+C
+C AT T =   .4000E+00   Y =   .985173E+00   .338641E-04   .147930E-01
+C                   S(1) =  -.355914E+00   .390261E-03   .355524E+00
+C                   S(2) =   .955150E-07  -.213065E-09  -.953019E-07
+C                   S(3) =  -.158466E-10  -.529012E-12   .163756E-10
+C AT T =   .4000E+01   Y =   .905516E+00   .224044E-04   .944615E-01
+C                   S(1) =  -.187621E+01   .179197E-03   .187603E+01
+C                   S(2) =   .296093E-05  -.583104E-09  -.296034E-05
+C                   S(3) =  -.493267E-09  -.276246E-12   .493544E-09
+C AT T =   .4000E+02   Y =   .715848E+00   .918628E-05   .284143E+00
+C                   S(1) =  -.424730E+01   .459360E-04   .424726E+01
+C                   S(2) =   .137294E-04  -.235815E-09  -.137291E-04
+C                   S(3) =  -.228818E-08  -.113803E-12   .228829E-08
+C AT T =   .4000E+03   Y =   .450526E+00   .322299E-05   .549471E+00
+C                   S(1) =  -.595837E+01   .354310E-05   .595836E+01
+C                   S(2) =   .227380E-04  -.226041E-10  -.227380E-04
+C                   S(3) =  -.378971E-08  -.499501E-13   .378976E-08
+C AT T =   .4000E+04   Y =   .183185E+00   .894131E-06   .816814E+00
+C                   S(1) =  -.475006E+01  -.599504E-05   .475007E+01
+C                   S(2) =   .188089E-04   .231330E-10  -.188089E-04
+C                   S(3) =  -.313478E-08  -.187575E-13   .313480E-08
+C AT T =   .4000E+05   Y =   .389733E-01   .162133E-06   .961027E+00
+C                   S(1) =  -.157477E+01  -.276199E-05   .157477E+01
+C                   S(2) =   .628668E-05   .110026E-10  -.628670E-05
+C                   S(3) =  -.104776E-08  -.453588E-14   .104776E-08
+C AT T =   .4000E+06   Y =   .493609E-02   .198411E-07   .995064E+00
+C                   S(1) =  -.236244E+00  -.458262E-06   .236244E+00
+C                   S(2) =   .944669E-06   .183193E-11  -.944671E-06
+C                   S(3) =  -.157441E-09  -.635990E-15   .157442E-09
+C AT T =   .4000E+07   Y =   .516087E-03   .206540E-08   .999484E+00
+C                   S(1) =  -.256277E-01  -.509808E-07   .256278E-01
+C                   S(2) =   .102506E-06   .203905E-12  -.102506E-06
+C                   S(3) =  -.170825E-10  -.684002E-16   .170826E-10
+C AT T =   .4000E+08   Y =   .519314E-04   .207736E-09   .999948E+00
+C                   S(1) =  -.259316E-02  -.518029E-08   .259316E-02
+C                   S(2) =   .103726E-07   .207209E-13  -.103726E-07
+C                   S(3) =  -.172845E-11  -.691450E-17   .172845E-11
+C AT T =   .4000E+09   Y =   .544710E-05   .217885E-10   .999995E+00
+C                   S(1) =  -.271637E-03  -.541849E-09   .271638E-03
+C                   S(2) =   .108655E-08   .216739E-14  -.108655E-08
+C                   S(3) =  -.180902E-12  -.723615E-18   .180902E-12
+C AT T =   .4000E+10   Y =   .446748E-06   .178699E-11   .100000E+01
+C                   S(1) =  -.322322E-04  -.842541E-10   .322323E-04
+C                   S(2) =   .128929E-09   .337016E-15  -.128929E-09
+C                   S(3) =  -.209715E-13  -.838859E-19   .209715E-13
+C AT T =   .4000E+11   Y =  -.363960E-07  -.145584E-12   .100000E+01
+C                   S(1) =  -.164109E-06  -.429604E-11   .164113E-06
+C                   S(2) =   .656436E-12   .171842E-16  -.656451E-12
+C                   S(3) =  -.689361E-15  -.275745E-20   .689363E-15
+C
+C NO. STEPS = 340  NO. F-S = 412  NO. J-S = 343  NO. DF-S =1023
+C----------------------------------------------------------------------
+C FULL DESCRIPTION OF USER INTERFACE TO ODESSA.
+C
+C THE USER INTERFACE TO ODESSA CONSISTS OF THE FOLLOWING PARTS.
+C
+C I.  THE CALL SEQUENCE TO SUBROUTINE ODESSA, WHICH IS A DRIVER
+C     ROUTINE FOR THE KppSolveR.  THIS INCLUDES DESCRIPTIONS OF BOTH
+C     THE CALL SEQUENCE ARGUMENTS AND OF USER-SUPPLIED ROUTINES.
+C     FOLLOWING THESE DESCRIPTIONS IS A DESCRIPTION OF
+C     OPTIONAL INPUTS AVAILABLE THROUGH THE CALL SEQUENCE, AND THEN
+C     A DESCRIPTION OF OPTIONAL OUTPUTS (IN THE WORK ARRAYS).
+C
+C II.  DESCRIPTIONS OF OTHER ROUTINES IN THE ODESSA PACKAGE THAT MAY
+C     BE (OPTIONALLY) CALLED BY THE USER.  THESE PROVIDE THE ABILITY
+C     TO ALTER ERROR MESSAGE HANDLING, SAVE AND RESTORE THE INTERNAL
+C     COMMON, AND OBTAIN SPECIFIED DERIVATIVES OF THE SOLUTION Y(T).
+C
+C III. DESCRIPTIONS OF COMMON BLOCKS TO BE DECLARED IN OVERLAY
+C     OR SIMILAR ENVIRONMENTS, OR TO BE SAVED WHEN DOING AN INTERRUPT
+C     OF THE PROBLEM AND CONTINUED SOLUTION LATER.
+C
+C IV.  DESCRIPTION OF TWO SUBROUTINES IN THE ODESSA PACKAGE, EITHER OF
+C     WHICH THE USER MAY REPLACE WITH HIS OWN VERSION, IF DESIRED.
+C     THESE RELATE TO THE MEASUREMENT OF ERRORS.
+C
+C V.   GENERAL REMARKS WHICH HIGHLIGHT DIFFERENCES BETWEEN THE LSODE
+C     PACKAGE AND THE ODESSA PACKAGE.
+C----------------------------------------------------------------------
+C PART I.  CALL SEQUENCE.
+C
+C THE CALL SEQUENCE PARAMETERS USED FOR INPUT ONLY ARE..
+C    F, DF, NEQ, PAR, TOUT, ITOL, RTOL, ATOL, ITASK, IOPT, LRW, LIW,
+C    JAC, MF,
+C AND THOSE USED FOR BOTH INPUT AND OUTPUT ARE
+C    Y, T, ISTATE.
+C THE WORK ARRAYS RWORK AND IWORK ARE ALSO USED FOR CONDITIONAL AND
+C OPTIONAL INPUTS AND OPTIONAL OUTPUTS.  (THE TERM OUTPUT HERE REFERS
+C TO THE RETURN FROM SUBROUTINE ODESSA TO THE USER-S CALLING PROGRAM.)
+C
+C THE LEGALITY OF INPUT PARAMETERS WILL BE THOROUGHLY CHECKED ON THE
+C INITIAL CALL FOR THE PROBLEM, BUT NOT CHECKED THEREAFTER UNLESS A
+C CHANGE IN INPUT PARAMETERS IS FLAGGED BY ISTATE = 3 ON INPUT.
+C
+C THE DESCRIPTIONS OF THE CALL ARGUMENTS ARE AS FOLLOWS.
+C
+C F     = THE NAME OF THE USER-SUPPLIED SUBROUTINE DEFINING THE
+C         ODE MODEL. THIS SYSTEM MUST BE PUT IN THE FIRST-ORDER
+C         FORM DY/DT = F(Y,T;P), WHERE F IS A VECTOR-VALUED FUNCTION
+C         OF THE SCALAR T AND VECTORS Y, AND PAR.  SUBROUTINE F IS TO
+C         COMPUTE THE FUNCTION F.  IT IS TO HAVE THE FORM..
+C              SUBROUTINE F (NEQ, T, Y, PAR, YDOT)
+C              DOUBLE PRECISION T, Y, PAR, YDOT
+C              DIMENSION Y(1), PAR(1), YDOT(1)
+C         WHERE NEQ, T, Y, AND PAR ARE INPUT, AND YDOT = F(Y,T;P)
+C         IS OUTPUT.  Y AND YDOT ARE ARRAYS OF LENGTH N (= NEQ(1)).
+C         (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C         F SHOULD NOT ALTER ARRAY Y, OR PAR(1),...,PAR(NPAR).
+C         F MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C
+C         SUBROUTINE F MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN F) AND PAR HAS LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR BELOW.
+C
+C DF    = THE NAME OF THE USER-SUPPLIED ROUTINE (IDF = 1) TO COMPUTE
+C         THE INHOMOGENEITY MATRIX, DF/DP, AS A FUNCTION OF THE SCALAR
+C         T, AND THE VECTORS Y, AND PAR. IT IS TO HAVE THE FORM
+C                SUBROUTINE DF (NEQ, T, Y, PAR, DFDP, JPAR)
+C                DOUBLE PRECISION T, Y, PAR, DFDP
+C                DIMENSION Y(1), PAR(1), DFDP(1)
+C                GO TO (1,2,...,NPAR) JPAR
+C            1   DFDP(1) = DF(1)/DP(1)
+C                .
+C                DFDP(I) = DF(I)/DP(1)
+C                .
+C                DFDP(N) = DF(N)/DP(1)
+C                RETURN
+C            2   DFDP(1) = DF(1)/DP(2)
+C                .
+C                DFDP(I) = DF(I)/DP(2)
+C                .
+C                DFDP(N) = DF(N)/DP(2)
+C                .
+C                RETURN
+C            .   .
+C            .   .
+C          NPAR  DFDP(1) = DF(1)/DP(NPAR)
+C                .
+C                DFDP(I) = DF(I)/DP(NPAR)
+C                .
+C                DFDP(N) = DF(N)/DP(NPAR)
+C                RETURN
+C                END
+C         WHERE NEQ, T, Y, PAR, AND JPAR ARE INPUT AND THE VECTOR
+C         DFDP(*,JPAR) IS TO BE LOADED WITH THE PARTIAL DERIVATIVES
+C         DF(Y,T;PAR)/DP(JPAR) ON OUTPUT. ONLY NONZERO ELEMENTS NEED
+C         BE LOADED.  T, Y, AND PAR HAVE THE SAME MEANING AS IN
+C         SUBROUTINE F. (IN THE DIMENSION STATEMENT ABOVE, 1 IS A DUMMY
+C         DIMENSION.. IT CAN BE REPLACED BY ANY VALUE).
+C
+C         DFDP(*,JPAR) IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY
+C         THE NONZERO ELEMENTS NEED BE LOADED BY DF. SUBROUTINE DF
+C         MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM IF USED.
+C         IF IDF = 0 (OR ISOPT = 0), A DUMMY ARGUMENT CAN BE USED.
+C
+C         SUBROUTINE DF MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),... IF NEQ IS AN ARRAY
+C         (DIMENSIONED IN DF) AND PAR HAS A LENGTH EXCEEDING NPAR.
+C         SEE THE DESCRIPTIONS OF NEQ AND PAR (BELOW).
+C
+C NEQ   = THE SIZE OF THE ODE SYSTEM (NUMBER OF FIRST ORDER ORDINARY
+C         DIFFERENTIAL EQUATIONS (N) IN THE MODEL).  USED ONLY FOR
+C         INPUT.  NEQ MAY NOT BE CHANGED DURING THE PROBLEM.
+C
+C         FOR ISOPT = 0, NEQ IS NORMALLY A SCALAR.  HOWEVER, NEQ MAY
+C         BE AN ARRAY, WITH NEQ(1) SET TO THE SYSTEM SIZE (N), IN WHICH
+C         CASE THE ODESSA PACKAGE ACCESSES ONLY NEQ(1). HOWEVER,
+C         THIS PARAMETER IS PASSED AS THE NEQ ARGUMENT IN ALL CALLS
+C         TO F, DF, AND JAC.  HENCE, IF IT IS AN ARRAY, LOCATIONS
+C         NEQ(2),... MAY BE USED TO STORE OTHER INTEGER DATA AND PASS
+C         IT TO F, DF, AND/OR JAC.  FOR ISOPT = 1, NPAR MUST BE LOADED
+C         INTO NEQ(2), AND IS NOT ALLOWED TO CHANGE DURING THE PROBLEM.
+C         IN THESE CASES, SUBROUTINES F, DF, AND/OR JAC MUST INCLUDE
+C         NEQ IN A DIMENSION STATEMENT.
+C
+C Y     = A REAL ARRAY FOR THE VECTOR OF DEPENDENT VARIABLES, OF
+C         DIMENSION (N) BY (NPAR+1).  USED FOR BOTH INPUT AND
+C         OUTPUT ON THE FIRST CALL (ISTATE = 1), AND ONLY FOR
+C         OUTPUT ON OTHER CALLS. ON THE FIRST CALL, Y MUST CONTAIN
+C         THE VECTORS OF INITIAL VALUES.  ON OUTPUT, Y CONTAINS THE
+C         COMPUTED SOLUTION VECTORS, EVALUATED AT T.
+C
+C PAR   = A REAL ARRAY FOR THE VECTOR OF CONSTANT MODEL PARAMETERS
+C         OF INTEREST IN THE SENSITIVITY ANALYSIS, OF LENGTH NPAR
+C         OR MORE. PAR IS PASSED AS AN ARGUMENT IN ALL CALLS TO F,
+C         DF, AND JAC. HENCE LOCATIONS PAR(NPAR+1),... MAY BE USED
+C         TO STORE OTHER REAL DATA AND PASS IT TO F, DF, AND/OR JAC.
+C         LOCATIONS PAR(1),...,PAR(NPAR) ARE USED AS INPUT ONLY,
+C         AND MUST NOT BE CHANGED DURING THE PROBLEM.
+C
+C T     = THE INDEPENDENT VARIABLE.  ON INPUT, T IS USED ONLY ON THE
+C         FIRST CALL, AS THE INITIAL POINT OF THE INTEGRATION.
+C         ON OUTPUT, AFTER EACH CALL, T IS THE VALUE AT WHICH A
+C         COMPUTED SOLUTION Y IS EVALUATED (USUALLY THE SAME AS TOUT).
+C         ON AN ERROR RETURN, T IS THE FARTHEST POINT REACHED.
+C
+C TOUT  = THE NEXT VALUE OF T AT WHICH A COMPUTED SOLUTION IS DESIRED.
+C         USED ONLY FOR INPUT.
+C
+C         WHEN STARTING THE PROBLEM (ISTATE = 1), TOUT MAY BE EQUAL
+C         TO T FOR ONE CALL, THEN SHOULD .NE. T FOR THE NEXT CALL.
+C         FOR THE INITIAL T, AN INPUT VALUE OF TOUT .NE. T IS USED
+C         IN ORDER TO DETERMINE THE DIRECTION OF THE INTEGRATION
+C         (I.E. THE ALGEBRAIC SIGN OF THE STEP SIZES) AND THE ROUGH
+C         SCALE OF THE PROBLEM.  INTEGRATION IN EITHER DIRECTION
+C         (FORWARD OR BACKWARD IN T) IS PERMITTED.
+C
+C         IF ITASK = 2 OR 5 (ONE-STEP MODES), TOUT IS IGNORED AFTER
+C         THE FIRST CALL (I.E. THE FIRST CALL WITH TOUT .NE. T).
+C         OTHERWISE, TOUT IS REQUIRED ON EVERY CALL.
+C
+C         IF ITASK = 1, 3, OR 4, THE VALUES OF TOUT NEED NOT BE
+C         MONOTONE, BUT A VALUE OF TOUT WHICH BACKS UP IS LIMITED
+C         TO THE CURRENT INTERNAL T INTERVAL, WHOSE ENDPOINTS ARE
+C         TCUR - HU AND TCUR (SEE OPTIONAL OUTPUTS, BELOW, FOR
+C         TCUR AND HU).
+C
+C ITOL  = AN INDICATOR FOR THE TYPE OF ERROR CONTROL.  SEE
+C         DESCRIPTION BELOW UNDER ATOL.  USED ONLY FOR INPUT.
+C
+C RTOL  = A RELATIVE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  SEE DESCRIPTION BELOW
+C         UNDER ATOL. INPUT ONLY.
+C
+C ATOL  = AN ABSOLUTE ERROR TOLERANCE PARAMETER, EITHER A SCALAR OR
+C         AN ARRAY OF SPACE (N) BY (NPAR+1).  INPUT ONLY.
+C
+C            THE INPUT PARAMETERS ITOL, RTOL, AND ATOL DETERMINE
+C         THE ERROR CONTROL PERFORMED BY THE KppSolveR.  THE KppSolveR WILL
+C         CONTROL THE VECTOR E = (E(I,J)) OF ESTIMATED LOCAL ERRORS
+C         IN Y, ACCORDING TO AN INEQUALITY OF THE FORM
+C                   RMS-NORM OF ( E(I,J)/EWT(I,J) )   .LE.   1,
+C         WHERE     EWT(I,J) = RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J),
+C         AND THE RMS-NORM (ROOT-MEAN-SQUARE NORM) HERE IS
+C         RMS-NORM(V) = SQRT ( (1/N) * SUM (V(I,J)**2) ); I =1,...,N.
+C         HERE EWT = (EWT(I,J)) IS A VECTOR OF WEIGHTS WHICH MUST
+C         ALWAYS BE POSITIVE, AND THE VALUES OF RTOL AND ATOL SHOULD
+C         ALL BE NON-NEGATIVE.  THE FOLLOWING TABLE GIVES THE TYPES
+C         (SCALAR/ARRAY) OF RTOL AND ATOL, AND THE CORRESPONDING FORM
+C         OF EWT(I,J).
+C
+C          ITOL   RTOL      ATOL           EWT(I,J)
+C           1    SCALAR    SCALAR   RTOL*ABS(Y(I,J)) + ATOL
+C           2    SCALAR    ARRAY    RTOL*ABS(Y(I,J)) + ATOL(I,J)
+C           3    ARRAY     SCALAR   RTOL(I,J)*ABS(Y(I,J)) + ATOL
+C           4    ARRAY     ARRAY    RTOL(I,J)*ABS(Y(I,J)) + ATOL(I,J)
+C
+C         WHEN EITHER OF THESE PARAMETERS IS A SCALAR, IT NEED NOT
+C         BE DIMENSIONED IN THE USER-S CALLING PROGRAM.
+C
+C         THE TOTAL NUMBER OF ERROR TEST FAILURES DUE TO THE SENSITIVITY
+C         ANALYSIS, AND WHICH REQUIRE AN INTEGRATION STEP TO BE
+C         REPEATED, ARE ACCUMULATED IN THE LAST NPAR+1 LOCATIONS OF THE
+C         INTEGER WORK ARRAY IWORK (SEE OPTIONAL OUTPUTS BELOW).
+C         THIS INFORMATION MAY BE OF VALUE IN DETERMINING APPROPRIATE
+C         ERROR TOLERANCES TO BE APPLIED TO THE SENSITIVITY FUNCTIONS.
+C
+C         IF NONE OF THE ABOVE CHOICES (WITH ITOL, RTOL, AND ATOL
+C         FIXED THROUGHOUT THE PROBLEM) IS SUITABLE, MORE GENERAL
+C         ERROR CONTROLS CAN BE OBTAINED BY SUBSTITUTING
+C         USER-SUPPLIED ROUTINES FOR THE SETTING OF EWT AND/OR FOR
+C         THE NORM CALCULATION.  SEE PART IV BELOW.
+C
+C         IF GLOBAL ERRORS ARE TO BE ESTIMATED BY MAKING A REPEATED
+C         RUN ON THE SAME PROBLEM WITH SMALLER TOLERANCES, THEN ALL
+C         COMPONENTS OF RTOL AND ATOL (I.E. OF EWT) SHOULD BE SCALED
+C         DOWN UNIFORMLY.
+C
+C ITASK  = AN INDEX SPECIFYING THE TASK TO BE PERFORMED.
+C         INPUT ONLY.  ITASK HAS THE FOLLOWING VALUES AND MEANINGS.
+C         1  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT (BY OVERSHOOTING AND INTERPOLATING).
+C         2  MEANS TAKE ONE STEP ONLY AND RETURN.
+C         3  MEANS STOP AT THE FIRST INTERNAL MESH POINT AT OR
+C            BEYOND T = TOUT AND RETURN.
+C         4  MEANS NORMAL COMPUTATION OF OUTPUT VALUES OF Y(T) AT
+C            T = TOUT BUT WITHOUT OVERSHOOTING T = TCRIT.
+C            TCRIT MUST BE INPUT AS RWORK(1).  TCRIT MAY BE EQUAL TO
+C            OR BEYOND TOUT, BUT NOT BEHIND IT IN THE DIRECTION OF
+C            INTEGRATION.  THIS OPTION IS USEFUL IF THE PROBLEM
+C            HAS A SINGULARITY AT OR BEYOND T = TCRIT.
+C         5  MEANS TAKE ONE STEP, WITHOUT PASSING TCRIT, AND RETURN.
+C            TCRIT MUST BE INPUT AS RWORK(1).
+C
+C         NOTE..  IF ITASK = 4 OR 5 AND THE KppSolveR REACHES TCRIT
+C         (WITHIN ROUNDOFF), IT WILL RETURN T = TCRIT (EXACTLY) TO
+C         INDICATE THIS (UNLESS ITASK = 4 AND TOUT COMES BEFORE TCRIT,
+C         IN WHICH CASE ANSWERS AT T = TOUT ARE RETURNED FIRST).
+C
+C ISTATE = AN INDEX USED FOR INPUT AND OUTPUT TO SPECIFY THE
+C         THE STATE OF THE CALCULATION.
+C
+C         ON INPUT, THE VALUES OF ISTATE ARE AS FOLLOWS.
+C         1  MEANS THIS IS THE FIRST CALL FOR THE PROBLEM
+C            (INITIALIZATIONS WILL BE DONE).  SEE NOTE BELOW.
+C         2  MEANS THIS IS NOT THE FIRST CALL, AND THE CALCULATION
+C            IS TO CONTINUE NORMALLY, WITH NO CHANGE IN ANY INPUT
+C            PARAMETERS EXCEPT POSSIBLY TOUT AND ITASK.
+C            (IF ITOL, RTOL, AND/OR ATOL ARE CHANGED BETWEEN CALLS
+C            WITH ISTATE = 2, THE NEW VALUES WILL BE USED BUT NOT
+C            TESTED FOR LEGALITY.)
+C         3  MEANS THIS IS NOT THE FIRST CALL, AND THE
+C            CALCULATION IS TO CONTINUE NORMALLY, BUT WITH
+C            A CHANGE IN INPUT PARAMETERS OTHER THAN
+C            TOUT AND ITASK.  CHANGES ARE ALLOWED IN
+C            ITOL, RTOL, ATOL, IOPT, LRW, LIW, MF, ML, MU,
+C            AND ANY OF THE OPTIONAL INPUTS EXCEPT H0.
+C            (SEE IWORK DESCRIPTION FOR ML AND MU.)
+C         NOTE..  A PRELIMINARY CALL WITH TOUT = T IS NOT COUNTED
+C         AS A FIRST CALL HERE, AS NO INITIALIZATION OR CHECKING OF
+C         INPUT IS DONE.  (SUCH A CALL IS SOMETIMES USEFUL FOR THE
+C         PURPOSE OF OUTPUTTING THE INITIAL CONDITIONS.)
+C         THUS THE FIRST CALL FOR WHICH TOUT .NE. T REQUIRES
+C         ISTATE = 1 ON INPUT.
+C
+C         ON OUTPUT, ISTATE HAS THE FOLLOWING VALUES AND MEANINGS.
+C          1  MEANS NOTHING WAS DONE, AS TOUT WAS EQUAL TO T WITH
+C             ISTATE = 1 ON INPUT.  (HOWEVER, AN INTERNAL COUNTER WAS
+C             SET TO DETECT AND PREVENT REPEATED CALLS OF THIS TYPE.)
+C          2  MEANS THE INTEGRATION WAS PERFORMED SUCCESSFULLY.
+C         -1  MEANS AN EXCESSIVE AMOUNT OF WORK (MORE THAN MXSTEP
+C             STEPS) WAS DONE ON THIS CALL, BEFORE COMPLETING THE
+C             REQUESTED TASK, BUT THE INTEGRATION WAS OTHERWISE
+C             SUCCESSFUL AS FAR AS T.  (MXSTEP IS AN OPTIONAL INPUT
+C             AND IS NORMALLY 500.)  TO CONTINUE, THE USER MAY
+C             SIMPLY RESET ISTATE TO A VALUE .GT. 1 AND CALL AGAIN
+C             (THE EXCESS WORK STEP COUNTER WILL BE RESET TO 0).
+C             IN ADDITION, THE USER MAY INCREASE MXSTEP TO AVOID
+C             THIS ERROR RETURN (SEE BELOW ON OPTIONAL INPUTS).
+C         -2  MEANS TOO MUCH ACCURACY WAS REQUESTED FOR THE PRECISION
+C             OF THE MACHINE BEING USED.  THIS WAS DETECTED BEFORE
+C             COMPLETING THE REQUESTED TASK, BUT THE INTEGRATION
+C             WAS SUCCESSFUL AS FAR AS T.  TO CONTINUE, THE TOLERANCE
+C             PARAMETERS MUST BE RESET, AND ISTATE MUST BE SET
+C             TO 3.  THE OPTIONAL OUTPUT TOLSF MAY BE USED FOR THIS
+C             PURPOSE.  (NOTE.. IF THIS CONDITION IS DETECTED BEFORE
+C             TAKING ANY STEPS, THEN AN ILLEGAL INPUT RETURN
+C             (ISTATE = -3) OCCURS INSTEAD.)
+C         -3  MEANS ILLEGAL INPUT WAS DETECTED, BEFORE TAKING ANY
+C             INTEGRATION STEPS.  SEE WRITTEN MESSAGE FOR DETAILS.
+C             NOTE..  IF THE KppSolveR DETECTS AN INFINITE LOOP OF CALLS
+C             TO THE KppSolveR WITH ILLEGAL INPUT, IT WILL CAUSE
+C             THE RUN TO STOP.
+C         -4  MEANS THERE WERE REPEATED ERROR TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THE PROBLEM MAY HAVE A SINGULARITY, OR THE INPUT
+C             MAY BE INAPPROPRIATE.
+C         -5  MEANS THERE WERE REPEATED CONVERGENCE TEST FAILURES ON
+C             ONE ATTEMPTED STEP, BEFORE COMPLETING THE REQUESTED
+C             TASK, BUT THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C             THIS MAY BE CAUSED BY AN INACCURATE JACOBIAN MATRIX,
+C             IF ONE IS BEING USED.
+C         -6  MEANS EWT(I,J) BECAME ZERO FOR SOME I,J DURING THE
+C             INTEGRATION.  PURE RELATIVE ERROR CONTROL (ATOL(I,J)=0.0)
+C             WAS REQUESTED ON A VARIABLE WHICH HAS NOW VANISHED.
+C             THE INTEGRATION WAS SUCCESSFUL AS FAR AS T.
+C
+C         NOTE..  SINCE THE NORMAL OUTPUT VALUE OF ISTATE IS 2,
+C         IT DOES NOT NEED TO BE RESET FOR NORMAL CONTINUATION.
+C         ALSO, SINCE A NEGATIVE INPUT VALUE OF ISTATE WILL BE
+C         REGARDED AS ILLEGAL, A NEGATIVE OUTPUT VALUE REQUIRES THE
+C         USER TO CHANGE IT, AND POSSIBLY OTHER INPUTS, BEFORE
+C         CALLING THE KppSolveR AGAIN.
+C
+C IOPT  = AN INTEGER ARRAY FLAG TO SPECIFY WHETHER OR NOT ANY OPTIONAL
+C         INPUTS ARE BEING USED ON THIS CALL.  INPUT ONLY.
+C         THE OPTIONAL INPUTS ARE LISTED SEPARATELY BELOW.
+C         IOPT(1) = 0 MEANS NO OPTIONAL INPUTS FOR THE KppSolveR WILL BE
+C                   USED. DEFAULT VALUES WILL BE USED IN ALL CASES.
+C                 = 1 MEANS ONE OR MORE OPTIONAL INPUTS FOR THE
+C                   KppSolveR ARE BEING USED.
+C                   NOTE : IOPT(1) IS INDEPENDENT OF ISOPT AND IDF.
+C         IOPT(2) = 0 MEANS NO SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                 = 1 MEANS A SENSITIVITY ANALYSIS WILL BE PERFORMED.
+C                   NOTE : IOPT(2) IS RENAMED TO ISOPT IN ODESSA.
+C                 = 0 MEANS DF/DP WILL BE CALCULATED BY FINITE
+C                   DIFFERENCE WITHIN ODESSA.
+C         IOPT(3) = 1 MEANS DF/DP WILL BE CALCULATED BY A USER-SUPPLIED
+C                   ROUTINE.
+C                   NOTE : IOPT(3) IS RENAMED TO IDF IN ODESSA.
+C                          IF IDF = 1, THE USER MUST SUPPLY A
+C                          SUBROUTINE DF (THE NAME IS ARBITRARY) AS
+C                          DESCRIBED BELOW UNDER DF. FOR IDF = 0,
+C                          A DUMMY ARGUMENT CAN BE USED.
+C
+C RWORK  = A REAL WORKING ARRAY (DOUBLE PRECISION).
+C         FOR ISOPT = 0, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 3*NEQ + LWM
+C         FOR ISOPT = 1, THE LENGTH OF RWORK MUST BE AT LEAST..
+C            20 + NYH*(MAXORD + 1) + 2*NYH + LWM + N
+C         WHERE..
+C         NYH    = THE TOTAL NUMBER OF DEPENDENT VARIABLES;
+C                  (= N IF ISOPT = 0, AND N*(NPAR+1) IF ISOPT = 1).
+C         MAXORD = 12 (IF METH = 1) OR 5 (IF METH = 2) (UNLESS A
+C                  SMALLER VALUE IS GIVEN AS AN OPTIONAL INPUT),
+C         LWM    = 0                  IF MITER = 0,
+C         LWM    = N**2 + 2           IF MITER IS 1 OR 2,
+C         LWM    = N + 2              IF MITER = 3, AND
+C         LWM    = (2*ML+MU+1)*N + 2  IF MITER IS 4 OR 5.
+C         (SEE THE MF DESCRIPTION FOR METH AND MITER.)
+C
+C         THE FIRST 20 WORDS OF RWORK ARE RESERVED FOR CONDITIONAL
+C         AND OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING WORD IN RWORK IS A CONDITIONAL INPUT..
+C           RWORK(1) = TCRIT = CRITICAL VALUE OF T WHICH THE KppSolveR
+C                      IS NOT TO OVERSHOOT.  REQUIRED IF ITASK IS
+C                      4 OR 5, AND IGNORED OTHERWISE.  (SEE ITASK.)
+C
+C LRW   = THE LENGTH OF THE ARRAY RWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C IWORK  = AN INTEGER WORK ARRAY. THE LENGTH MUST BE AT LEAST..
+C            20      IF MITER = 0 OR 3 (MF = 10, 13, 20, 23), OR
+C            20 + N  OTHERWISE (MF = 11, 12, 14, 15, 21, 22, 24, 25).
+C          FOR ISOPT = 0, OR..
+C            21 + N + NPAR
+C          FOR ISOPT = 1.
+C         THE FIRST FEW WORDS OF IWORK ARE USED FOR CONDITIONAL AND
+C         OPTIONAL INPUTS AND OPTIONAL OUTPUTS.
+C
+C         THE FOLLOWING 2 WORDS IN IWORK ARE CONDITIONAL INPUTS..
+C           IWORK(1) = ML     THESE ARE THE LOWER AND UPPER
+C           IWORK(2) = MU     HALF-BANDWIDTHS, RESPECTIVELY, OF THE
+C                      BANDED JACOBIAN, EXCLUDING THE MAIN DIAGONAL.
+C                      THE BAND IS DEFINED BY THE MATRIX LOCATIONS
+C                      (I,J) WITH I-ML .LE. J .LE. I+MU.  ML AND MU
+C                      MUST SATISFY  0 .LE.  ML,MU  .LE. NEQ-1.
+C                      THESE ARE REQUIRED IF MITER IS 4 OR 5, AND
+C                      IGNORED OTHERWISE.  ML AND MU MAY IN FACT BE
+C                      THE BAND PARAMETERS FOR A MATRIX TO WHICH
+C                      DF/DY IS ONLY APPROXIMATELY EQUAL.
+*
+C
+C LIW   = THE LENGTH OF THE ARRAY IWORK, AS DECLARED BY THE USER.
+C         (THIS WILL BE CHECKED BY THE KppSolveR.)
+C
+C NOTE..  THE WORK ARRAYS MUST NOT BE ALTERED BETWEEN CALLS TO ODESSA
+C FOR THE SAME PROBLEM, EXCEPT POSSIBLY FOR THE CONDITIONAL AND
+C OPTIONAL INPUTS, AND EXCEPT FOR THE LAST 2*NYH + N WORDS OF RWORK.
+C THE LATTER SPACE IS USED FOR INTERNAL SCRATCH SPACE, AND SO IS
+C AVAILABLE FOR USE BY THE USER OUTSIDE ODESSA BETWEEN CALLS, IF
+C DESIRED (BUT NOT FOR USE BY F, DF, OR JAC).
+C
+C JAC   = THE NAME OF THE USER-SUPPLIED ROUTINE (MITER = 1 OR 4) TO
+C         COMPUTE THE JACOBIAN MATRIX, DF/DY, AS A FUNCTION OF THE
+C         SCALAR T AND THE VECTORS Y, AND PAR.  IT IS TO HAVE THE FORM
+C              SUBROUTINE JAC (NEQ, T, Y, PAR, ML, MU, PD, NROWPD)
+C              DOUBLE PRECISION T, Y, PAR, PD
+C              DIMENSION Y(1), PAR(1), PD(NROWPD,1)
+C         WHERE NEQ, T, Y, PAR, ML, MU, AND NROWPD ARE INPUT AND THE
+C         ARRAY PD IS TO BE LOADED WITH PARTIAL DERIVATIVES (ELEMENTS
+C         OF THE JACOBIAN MATRIX) ON OUTPUT.  PD MUST BE GIVEN A FIRST
+C         DIMENSION OF NROWPD.  T, Y, AND PAR HAVE THE SAME MEANING AS
+C         IN SUBROUTINE F.  (IN THE DIMENSION STATEMENT ABOVE, 1 IS A
+C         DUMMY DIMENSION.. IT CAN BE REPLACED BY ANY VALUE.)
+C              IN THE FULL MATRIX CASE (MITER = 1), ML AND MU ARE
+C         IGNORED, AND THE JACOBIAN IS TO BE LOADED INTO PD IN
+C         COLUMNWISE MANNER, WITH DF(I)/DY(J) LOADED INTO PD(I,J).
+C              IN THE BAND MATRIX CASE (MITER = 4), THE ELEMENTS
+C         WITHIN THE BAND ARE TO BE LOADED INTO PD IN COLUMNWISE
+C         MANNER, WITH DIAGONAL LINES OF DF/DY LOADED INTO THE ROWS
+C         OF PD.  THUS DF(I)/DY(J) IS TO BE LOADED INTO PD(I-J+MU+1,J).
+C         ML AND MU ARE THE HALF-BANDWIDTH PARAMETERS (SEE IWORK).
+C         THE LOCATIONS IN PD IN THE TWO TRIANGULAR AREAS WHICH
+C         CORRESPOND TO NONEXISTENT MATRIX ELEMENTS CAN BE IGNORED
+C         OR LOADED ARBITRARILY, AS THEY ARE OVERWRITTEN BY ODESSA.
+C              PD IS PRESET TO ZERO BY THE KppSolveR, SO THAT ONLY THE
+C         NONZERO ELEMENTS NEED BE LOADED BY JAC. EACH CALL TO JAC IS
+C         PRECEDED BY A CALL TO F WITH THE SAME ARGUMENTS NEQ, T, Y,
+C         AND PAR. THUS TO GAIN SOME EFFICIENCY, INTERMEDIATE
+C         QUANTITIES SHARED BY BOTH CALCULATIONS MAY BE SAVED IN A
+C         USER COMMON BLOCK BY F AND NOT RECOMPUTED BY JAC, IF
+C         DESIRED.  ALSO, JAC MAY ALTER THE Y ARRAY, IF DESIRED.
+C         JAC MUST BE DECLARED EXTERNAL IN THE CALLING PROGRAM.
+C              SUBROUTINE JAC MAY ACCESS USER-DEFINED QUANTITIES IN
+C         NEQ(2),... AND PAR(NPAR+1),.... SEE THE DESCRIPTIONS OF
+C         NEQ (ABOVE) AND PAR (BELOW).
+C
+C MF    = THE METHOD FLAG.  USED ONLY FOR INPUT.  THE LEGAL VALUES OF
+C         MF ARE 10, 11, 12, 13, 14, 15, 20, 21, 22, 23, 24, AND 25.
+C         MF HAS DECIMAL DIGITS METH AND MITER.. MF = 10*METH + MITER.
+C         METH INDICATES THE BASIC LINEAR MULTISTEP METHOD..
+C           METH = 1 MEANS THE IMPLICIT ADAMS METHOD.
+*
+C           METH = 2 MEANS THE METHOD BASED ON BACKWARD
+C                    DIFFERENTIATION FORMULAS (BDF-S).
+C         MITER INDICATES THE CORRECTOR ITERATION METHOD..
+C           MITER = 0 MEANS FUNCTIONAL ITERATION (NO JACOBIAN MATRIX
+C                     IS INVOLVED).
+C           MITER = 1 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     FULL (NEQ BY NEQ) JACOBIAN.
+C           MITER = 2 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED (DIFFERENCE QUOTIENT) FULL JACOBIAN
+C                     (USING NEQ EXTRA CALLS TO F PER DF/DY VALUE).
+C           MITER = 3 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED DIAGONAL JACOBIAN APPROXIMATION.
+C                     (USING 1 EXTRA CALL TO F PER DF/DY EVALUATION).
+C           MITER = 4 MEANS CHORD ITERATION WITH A USER-SUPPLIED
+C                     BANDED JACOBIAN.
+C           MITER = 5 MEANS CHORD ITERATION WITH AN INTERNALLY
+C                     GENERATED BANDED JACOBIAN (USING ML+MU+1 EXTRA
+C                     CALLS TO F PER DF/DY EVALUATION).
+C         IF MITER = 1 OR 4, THE USER MUST SUPPLY A SUBROUTINE JAC
+C         (THE NAME IS ARBITRARY) AS DESCRIBED ABOVE UNDER JAC.
+C         FOR OTHER VALUES OF MITER, A DUMMY ARGUMENT CAN BE USED.
+C
+C         IF A SENSITIVITY ANLYSIS IS DESIRED (ISOPT = 1), MITER = 0
+C         AND 3 ARE DISALLOWED. IN THESE CASES, THE USER IS RECOMMENDED
+C         TO SUPPLY AN ANALYTICAL JACOBIAN (MITER = 1 OR 4) AND AN
+C         ANALYTICAL INHOMOGENEITY MATRIX (IDF = 1).
+C----------------------------------------------------------------------
+C OPTIONAL INPUTS.
+C
+C THE FOLLOWING IS A LIST OF THE OPTIONAL INPUTS PROVIDED FOR IN THE
+C CALL SEQUENCE.  (SEE ALSO PART II.)  FOR EACH SUCH INPUT VARIABLE,
+C THIS TABLE LISTS ITS NAME AS USED IN THIS DOCUMENTATION, ITS
+C LOCATION IN THE CALL SEQUENCE, ITS MEANING, AND THE DEFAULT VALUE.
+C THE USE OF ANY OF THESE INPUTS REQUIRES IOPT(1) = 1, AND IN THAT
+C CASE ALL OF THESE INPUTS ARE EXAMINED.  A VALUE OF ZERO FOR ANY
+C OF THESE OPTIONAL INPUTS WILL CAUSE THE DEFAULT VALUE TO BE USED.
+C THUS TO USE A SUBSET OF THE OPTIONAL INPUTS, SIMPLY PRELOAD
+C LOCATIONS 5 TO 10 IN RWORK AND IWORK TO 0.0 AND 0 RESPECTIVELY, AND
+C THEN SET THOSE OF INTEREST TO NONZERO VALUES.
+C
+C NAME   LOCATION      MEANING AND DEFAULT VALUE
+C
+C H0     RWORK(5)  THE STEP SIZE TO BE ATTEMPTED ON THE FIRST STEP.
+C                  THE DEFAULT VALUE IS DETERMINED BY THE KppSolveR.
+C
+C HMAX   RWORK(6)  THE MAXIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS INFINITE.
+C
+C HMIN   RWORK(7)  THE MINIMUM ABSOLUTE STEP SIZE ALLOWED.
+C                  THE DEFAULT VALUE IS 0.  (THIS LOWER BOUND IS NOT
+C                  ENFORCED ON THE FINAL STEP BEFORE REACHING TCRIT
+C                  WHEN ITASK = 4 OR 5.)
+C
+C MAXORD  IWORK(5)  THE MAXIMUM ORDER TO BE ALLOWED.  THE DEFAULT
+C                  VALUE IS 12 IF METH = 1, AND 5 IF METH = 2.
+C                  IF MAXORD EXCEEDS THE DEFAULT VALUE, IT WILL
+C                  BE REDUCED TO THE DEFAULT VALUE.
+C                  IF MAXORD IS CHANGED DURING THE PROBLEM, IT MAY
+C                  CAUSE THE CURRENT ORDER TO BE REDUCED.
+C
+C MXSTEP  IWORK(6)  MAXIMUM NUMBER OF (INTERNALLY DEFINED) STEPS
+C                  ALLOWED DURING ONE CALL TO THE KppSolveR.
+C                  THE DEFAULT VALUE IS 500.
+C
+C MXHNIL  IWORK(7)  MAXIMUM NUMBER OF MESSAGES PRINTED (PER PROBLEM)
+C                  WARNING THAT T + H = T ON A STEP (H = STEP SIZE).
+C                  THIS MUST BE POSITIVE TO RESULT IN A NON-DEFAULT
+C                  VALUE.  THE DEFAULT VALUE IS 10.
+C----------------------------------------------------------------------
+C OPTIONAL OUTPUTS.
+C
+C AS OPTIONAL ADDITIONAL OUTPUT FROM ODESSA, THE VARIABLES LISTED
+C BELOW ARE QUANTITIES RELATED TO THE PERFORMANCE OF ODESSA
+C WHICH ARE AVAILABLE TO THE USER.  THESE ARE COMMUNICATED BY WAY OF
+C THE WORK ARRAYS, BUT ALSO HAVE INTERNAL MNEMONIC NAMES AS SHOWN.
+C EXCEPT WHERE STATED OTHERWISE, ALL OF THESE OUTPUTS ARE DEFINED
+C ON ANY SUCCESSFUL RETURN FROM ODESSA, AND ON ANY RETURN WITH
+C ISTATE = -1, -2, -4, -5, OR -6.  ON AN ILLEGAL INPUT RETURN
+C (ISTATE = -3), THEY WILL BE UNCHANGED FROM THEIR EXISTING VALUES
+C (IF ANY), EXCEPT POSSIBLY FOR TOLSF, LENRW, AND LENIW.
+C ON ANY ERROR RETURN, OUTPUTS RELEVANT TO THE ERROR WILL BE DEFINED,
+C AS NOTED BELOW.
+C
+C NAME   LOCATION      MEANING
+C
+C HU     RWORK(11) THE STEP SIZE IN T LAST USED (SUCCESSFULLY).
+C
+C HCUR   RWORK(12) THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C TCUR   RWORK(13) THE CURRENT VALUE OF THE INDEPENDENT VARIABLE
+C                  WHICH THE KppSolveR HAS ACTUALLY REACHED, I.E. THE
+C                  CURRENT INTERNAL MESH POINT IN T.  ON OUTPUT, TCUR
+C                  WILL ALWAYS BE AT LEAST AS FAR AS THE ARGUMENT
+C                  T, BUT MAY BE FARTHER (IF INTERPOLATION WAS DONE).
+C
+C TOLSF  RWORK(14) A TOLERANCE SCALE FACTOR, GREATER THAN 1.0,
+C                  COMPUTED WHEN A REQUEST FOR TOO MUCH ACCURACY WAS
+C                  DETECTED (ISTATE = -3 IF DETECTED AT THE START OF
+C                  THE PROBLEM, ISTATE = -2 OTHERWISE).  IF ITOL IS
+C                  LEFT UNALTERED BUT RTOL AND ATOL ARE UNIFORMLY
+C                  SCALED UP BY A FACTOR OF TOLSF FOR THE NEXT CALL,
+C                  THEN THE KppSolveR IS DEEMED LIKELY TO SUCCEED.
+C                  (THE USER MAY ALSO IGNORE TOLSF AND ALTER THE
+C                  TOLERANCE PARAMETERS IN ANY OTHER WAY APPROPRIATE.)
+C
+C NST    IWORK(11) THE NUMBER OF STEPS TAKEN FOR THE PROBLEM SO FAR.
+C
+C NFE    IWORK(12) THE NUMBER OF F EVALUATIONS FOR THE PROBLEM SO FAR.
+C
+C NJE    IWORK(13) THE NUMBER OF JACOBIAN EVALUATIONS (AND OF MATRIX
+C                  LU DECOMPOSITIONS IF ISOPT = 0) FOR THE PROBLEM SO
+C                  FAR. IF ISOPT = 1, THE NUMBER OF LU DECOMPOSITIONS
+C                  IS EQUAL TO NJE - NSPE (SEE BELOW).
+C
+C NQU    IWORK(14) THE METHOD ORDER LAST USED (SUCCESSFULLY).
+C
+C NQCUR  IWORK(15) THE ORDER TO BE ATTEMPTED ON THE NEXT STEP.
+C
+C IMXER  IWORK(16) THE INDEX OF THE COMPONENT OF LARGEST MAGNITUDE IN
+C                  THE WEIGHTED LOCAL ERROR VECTOR (E(I,J)/EWT(I,J)),
+C                  ON AN ERROR RETURN WITH ISTATE = -4 OR -5.
+C
+C LENRW  IWORK(17) THE LENGTH OF RWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C LENIW  IWORK(18) THE LENGTH OF IWORK ACTUALLY REQUIRED.
+C                  THIS IS DEFINED ON NORMAL RETURNS AND ON AN ILLEGAL
+C                  INPUT RETURN FOR INSUFFICIENT STORAGE.
+C
+C NDFE   IWORK(19) THE NUMBER OF DF/DP (VECTOR) EVALUATIONS.
+C
+C NSPE   IWORK(20) THE NUMBER OF CALLS TO SUBROUTINE SPRIME. EACH CALL
+C                  TO SPRIME REQUIRES A JACOBIAN EVALUATION, BUT NOT
+C                  AN LU DECOMPOSITION.
+C
+C THE FOLLOWING ARRAYS ARE SEGMENTS OF THE RWORK AND IWORK ARRAYS
+C WHICH MAY ALSO BE OF INTEREST TO THE USER AS OPTIONAL OUTPUTS.
+C FOR EACH ARRAY, THE TABLE BELOW GIVES ITS INTERNAL NAME, ITS BASE
+C ADDRESS IN RWORK OR IWORK, AND ITS DESCRIPTION.
+C
+C NAME   BASE ADDRESS      DESCRIPTION
+C
+C YH     21 IN RWORK    THE NORDSIECK HISTORY ARRAY, OF SIZE NYH BY
+C                       (NQCUR + 1). FOR J = 0,1,...,NQCUR, COLUMN J+1
+C                       OF YH CONTAINS HCUR**J/FACTORIAL(J) TIMES
+C                       THE J-TH DERIVATIVE OF THE INTERPOLATING
+C                       POLYNOMIAL CURRENTLY REPRESENTING THE SOLUTION,
+C                       EVALUATED AT T = TCUR.
+C
+C ACOR    LENRW-NYH+1   ARRAY OF SIZE NYH USED FOR THE ACCUMULATED
+C         IN RWORK      CORRECTIONS ON EACH STEP, SCALED ON OUTPUT
+C                       TO REPRESENT THE ESTIMATED LOCAL ERROR IN Y
+C                       ON THE LAST STEP.  THIS IS THE VECTOR E IN
+C                       THE DESCRIPTION OF THE ERROR CONTROL.
+C                       IT IS DEFINED ONLY ON A SUCCESSFUL RETURN
+C                       FROM ODESSA.
+C NRS     LENIW-NPAR    ARRAY OF SIZE NPAR+1, USED TO STORE THE
+C         IN IWORK      ACCUMULATED NUMBER OF REPEATED STEPS DUE TO
+C                       THE SENSITIVITY ANALYSIS..
+C                         NRS(1) = TOTAL NUMBER OF REPEATED STEPS,
+C                         NRS(2),... = NUMBER OF REPEATED STEPS DUE TO
+C                                      MODEL PARAMETER 1,...
+C
+C----------------------------------------------------------------------
+C PART II.  OTHER ROUTINES CALLABLE.
+C
+C THE FOLLOWING ARE OPTIONAL CALLS WHICH THE USER MAY MAKE TO
+C GAIN ADDITIONAL CAPABILITIES IN CONJUNCTION WITH ODESSA.
+C (THE ROUTINES XSETUN AND XSETF ARE DESIGNED TO CONFORM TO THE
+C SLATEC ERROR HANDLING PACKAGE.)
+C
+C    FORM OF CALL                  FUNCTION
+C  CALL XSETUN(LUN)          SET THE LOGICAL UNIT NUMBER, LUN, FOR
+C                            OUTPUT OF MESSAGES FROM ODESSA, IF
+C                            THE DEFAULT IS NOT DESIRED.
+C                            THE DEFAULT VALUE OF LUN IS 6.
+C
+C  CALL XSETF(MFLAG)         SET A FLAG TO CONTROL THE PRINTING OF
+C                            MESSAGES BY ODESSA..
+C                            MFLAG = 0 MEANS DO NOT PRINT. (DANGER..
+C                            THIS RISKS LOSING VALUABLE INFORMATION.)
+C                            MFLAG = 1 MEANS PRINT (THE DEFAULT).
+C
+C                            EITHER OF THE ABOVE CALLS MAY BE MADE AT
+C                            ANY TIME AND WILL TAKE EFFECT IMMEDIATELY.
+C
+C  CALL SVCOM (RSAV, ISAV)   STORE IN RSAV AND ISAV THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA (SEE PART III BELOW).
+C                            RSAV MUST BE A REAL ARRAY OF LENGTH 222
+C                            OR MORE, AND ISAV MUST BE AN INTEGER
+C                            ARRAY OF LENGTH 54 OR MORE.
+C
+C  CALL RSCOM (RSAV, ISAV)   RESTORE, FROM RSAV AND ISAV, THE CONTENTS
+C                            OF THE INTERNAL COMMON BLOCKS USED BY
+C                            ODESSA.  PRESUMES A PRIOR CALL TO SVCOM
+C                            WITH THE SAME ARGUMENTS.
+C
+C                            SVCOM AND RSCOM ARE USEFUL IF
+C                            INTERRUPTING A RUN AND RESTARTING
+C                            LATER, OR ALTERNATING BETWEEN TWO OR
+C                            MORE PROBLEMS KppSolveD WITH ODESSA.
+C
+C  CALL INTDY(,,,,,)         PROVIDE DERIVATIVES OF Y, OF VARIOUS
+C       (SEE BELOW)          ORDERS, AT A SPECIFIED POINT T, IF
+C                            DESIRED.  IT MAY BE CALLED ONLY AFTER
+C                            A SUCCESSFUL RETURN FROM ODESSA.
+C
+C THE DETAILED INSTRUCTIONS FOR USING INTDY ARE AS FOLLOWS.
+C THE FORM OF THE CALL IS..
+C
+C  CALL INTDY (T, K, RWORK(21), NYH, DKY, IFLAG)
+C
+C THE INPUT PARAMETERS ARE..
+C
+C T        = VALUE OF INDEPENDENT VARIABLE WHERE ANSWERS ARE DESIRED
+C            (NORMALLY THE SAME AS THE T LAST RETURNED BY ODESSA).
+C            FOR VALID RESULTS, T MUST LIE BETWEEN TCUR - HU AND TCUR.
+C            (SEE OPTIONAL OUTPUTS FOR TCUR AND HU.)
+C K        = INTEGER ORDER OF THE DERIVATIVE DESIRED.  K MUST SATISFY
+C            0 .LE. K .LE. NQCUR, WHERE NQCUR IS THE CURRENT ORDER
+C            (SEE OPTIONAL OUTPUTS).  THE CAPABILITY CORRESPONDING
+C            TO K = 0, I.E. COMPUTING Y(T), IS ALREADY PROVIDED
+C            BY ODESSA DIRECTLY.  SINCE NQCUR .GE. 1, THE FIRST
+C            DERIVATIVE DY/DT IS ALWAYS AVAILABLE WITH INTDY.
+C RWORK(21) = THE BASE ADDRESS OF THE HISTORY ARRAY YH.
+C NYH      = COLUMN LENGTH OF YH, EQUAL TO THE TOTAL NUMBER OF
+C            DEPENDENT VARIABLES. IF ISOPT = 0, NYH = N. IF ISOPT = 1,
+C            NYH = N * (NPAR + 1).
+C
+C THE OUTPUT PARAMETERS ARE..
+C
+C DKY      = A REAL ARRAY OF LENGTH NYH CONTAINING THE COMPUTED VALUE
+C            OF THE K-TH DERIVATIVE OF Y(T).
+C IFLAG    = INTEGER FLAG, RETURNED AS 0 IF K AND T WERE LEGAL,
+C            -1 IF K WAS ILLEGAL, AND -2 IF T WAS ILLEGAL.
+C            ON AN ERROR RETURN, A MESSAGE IS ALSO WRITTEN.
+C----------------------------------------------------------------------
+C PART III.  COMMON BLOCKS.
+C
+C IF ODESSA IS TO BE USED IN AN OVERLAY SITUATION, THE USER
+C MUST DECLARE, IN THE PRIMARY OVERLAY, THE VARIABLES IN..
+C  (1) THE CALL SEQUENCE TO ODESSA,
+C  (2) THE THREE INTERNAL COMMON BLOCKS
+C        /ODE001/  OF LENGTH  258  (219 DOUBLE PRECISION WORDS
+C                        FOLLOWED BY 39 INTEGER WORDS),
+C        /ODE002/  OF LENGTH 14 (3 DOUBLE PRECISION WORDS FOLLOWED
+C                        BY 11 INTEGER WORDS),
+C        /EH0001/  OF LENGTH  2 (INTEGER WORDS).
+C
+C IF ODESSA IS USED ON A SYSTEM IN WHICH THE CONTENTS OF INTERNAL
+C COMMON BLOCKS ARE NOT PRESERVED BETWEEN CALLS, THE USER SHOULD
+C DECLARE THE ABOVE THREE COMMON BLOCKS IN HIS MAIN PROGRAM TO INSURE
+C THAT THEIR CONTENTS ARE PRESERVED.
+C
+C IF THE SOLUTION OF A GIVEN PROBLEM BY ODESSA IS TO BE INTERRUPTED
+C AND THEN LATER CONTINUED, SUCH AS WHEN RESTARTING AN INTERRUPTED RUN
+C OR ALTERNATING BETWEEN TWO OR MORE PROBLEMS, THE USER SHOULD SAVE,
+C FOLLOWING THE RETURN FROM THE LAST ODESSA CALL PRIOR TO THE
+C INTERRUPTION, THE CONTENTS OF THE CALL SEQUENCE VARIABLES AND THE
+C INTERNAL COMMON BLOCKS, AND LATER RESTORE THESE VALUES BEFORE THE
+C NEXT ODESSA CALL FOR THAT PROBLEM.  TO SAVE AND RESTORE THE COMMON
+C BLOCKS, USE SUBROUTINES SVCOM AND RSCOM (SEE PART II ABOVE).
+C
+C----------------------------------------------------------------------
+C PART IV.  OPTIONALLY REPLACEABLE KppSolveR ROUTINES.
+C
+C BELOW ARE DESCRIPTIONS OF TWO ROUTINES IN THE ODESSA PACKAGE WHICH
+C RELATE TO THE MEASUREMENT OF ERRORS.  EITHER ROUTINE CAN BE
+C REPLACED BY A USER-SUPPLIED VERSION, IF DESIRED. HOWEVER, SINCE SUCH
+C A REPLACEMENT MAY HAVE A MAJOR IMPACT ON PERFORMANCE, IT SHOULD BE
+C DONE ONLY WHEN ABSOLUTELY NECESSARY, AND ONLY WITH GREAT CAUTION.
+C (NOTE.. THE MEANS BY WHICH THE PACKAGE VERSION OF A ROUTINE IS
+C SUPERSEDED BY THE USER-S VERSION MAY BE SYSTEM-DEPENDENT.)
+C
+C (A) EWSET.
+C THE FOLLOWING SUBROUTINE IS CALLED JUST BEFORE EACH INTERNAL
+C INTEGRATION STEP, AND SETS THE ARRAY OF ERROR WEIGHTS, EWT, AS
+C DESCRIBED UNDER ITOL/RTOL/ATOL ABOVE..
+C    SUBROUTINE EWSET (NYH, ITOL, RTOL, ATOL, YCUR, EWT)
+C WHERE NEQ, ITOL, RTOL, AND ATOL ARE AS IN THE ODESSA CALL SEQUENCE,
+C YCUR CONTAINS THE CURRENT DEPENDENT VARIABLE VECTOR, AND
+C EWT IS THE ARRAY OF WEIGHTS SET BY EWSET.
+C
+C IF THE USER SUPPLIES THIS SUBROUTINE, IT MUST RETURN IN EWT(I)
+C (I = 1,...,NYH) A POSITIVE QUANTITY SUITABLE FOR COMPARING ERRORS
+C IN Y(I) TO.  THE EWT ARRAY RETURNED BY EWSET IS PASSED TO THE
+C VNORM ROUTINE (SEE BELOW), AND ALSO USED BY ODESSA IN THE COMPUTATION
+C OF THE OPTIONAL OUTPUT IMXER, THE DIAGONAL JACOBIAN APPROXIMATION,
+C AND THE INCREMENTS FOR DIFFERENCE QUOTIENT JACOBIANS.
+C
+C IN THE USER-SUPPLIED VERSION OF EWSET, IT MAY BE DESIRABLE TO USE
+C THE CURRENT VALUES OF DERIVATIVES OF Y.  DERIVATIVES UP TO ORDER NQ
+C ARE AVAILABLE FROM THE HISTORY ARRAY YH, DESCRIBED ABOVE UNDER
+C OPTIONAL OUTPUTS.  IN EWSET, YH IS IDENTICAL TO THE YCUR ARRAY,
+C EXTENDED TO NQ + 1 COLUMNS WITH A COLUMN LENGTH OF NYH AND SCALE
+C FACTORS OF H**J/FACTORIAL(J).  ON THE FIRST CALL FOR THE PROBLEM,
+C GIVEN BY NST = 0, NQ IS 1 AND H IS TEMPORARILY SET TO 1.0.
+C THE QUANTITIES NQ, NYH, H, AND NST CAN BE OBTAINED BY INCLUDING
+C IN EWSET THE STATEMENTS..
+C    DOUBLE PRECISION H, RLS
+C    COMMON /ODE001/ RLS(219),ILS(39)
+C    NQ = ILS(35)
+C    NYH = ILS(14)
+C    NST = ILS(36)
+C    H = RLS(213)
+C THUS, FOR EXAMPLE, THE CURRENT VALUE OF DY/DT CAN BE OBTAINED AS
+C YCUR(NYH+I)/H  (I=1,...,N)  (AND THE DIVISION BY H IS
+C UNNECESSARY WHEN NST = 0).
+C
+C (B) VNORM.
+C THE FOLLOWING IS A REAL FUNCTION ROUTINE WHICH COMPUTES THE WEIGHTED
+C ROOT-MEAN-SQUARE NORM OF A VECTOR V..
+C    D = VNORM (LV, V, W)
+C WHERE..
+C  LV = THE LENGTH OF THE VECTOR,
+C  V = REAL ARRAY OF LENGTH N CONTAINING THE VECTOR,
+C  W = REAL ARRAY OF LENGTH N CONTAINING WEIGHTS,
+C  D = SQRT( (1/N) * SUM(V(I)*W(I))**2 ).
+C VNORM IS CALLED WITH LV = N AND WITH W(I) = 1.0/EWT(I), WHERE
+C EWT IS AS SET BY SUBROUTINE EWSET.
+C
+C IF THE USER SUPPLIES THIS FUNCTION, IT SHOULD RETURN A NON-NEGATIVE
+C VALUE OF VNORM SUITABLE FOR USE IN THE ERROR CONTROL IN ODESSA.
+C NONE OF THE ARGUMENTS SHOULD BE ALTERED BY VNORM.
+C FOR EXAMPLE, A USER-SUPPLIED VNORM ROUTINE MIGHT..
+C  -SUBSTITUTE A MAX-NORM OF (V(I)*W(I)) FOR THE RMS-NORM, OR
+C  -IGNORE SOME COMPONENTS OF V IN THE NORM, WITH THE EFFECT OF
+C   SUPPRESSING THE ERROR CONTROL ON THOSE COMPONENTS OF Y.
+C----------------------------------------------------------------------
+C OTHER ROUTINES IN THE ODESSA PACKAGE.
+C
+C IN ADDITION TO SUBROUTINE ODESSA, THE ODESSA PACKAGE INCLUDES THE
+C FOLLOWING SUBROUTINES AND FUNCTION ROUTINES..
+C  INTDY   COMPUTES AN INTERPOLATED VALUE OF THE Y VECTOR AT T = TOUT.
+C  STODE   IS THE CORE INTEGRATOR, WHICH DOES ONE STEP OF THE
+C          INTEGRATION AND THE ASSOCIATED ERROR CONTROL.
+C  STESA   MANAGES THE SOLUTION OF THE SENSITIVITY FUNCTIONS.
+C  CFODE   SETS ALL METHOD COEFFICIENTS AND TEST CONSTANTS.
+C  PREPJ   COMPUTES AND PREPROCESSES THE JACOBIAN MATRIX J = DF/DY
+C          AND THE NEWTON ITERATION MATRIX P = I - H*L0*J.
+C          IT IS ALSO CALLED BY SPRIME (WITH JOPT = 1) TO JUST
+C          COMPUTE THE JACOBIAN MATRIX.
+C  PREPDF  COMPUTES THE INHOMOGENEITY MATRIX DF/DP.
+C  SPRIME  DEFINES THE SYSTEM OF SENSITIVITY EQUATIONS.
+C  SOLSY   MANAGES SOLUTION OF LINEAR SYSTEM IN CHORD ITERATION.
+C  EWSET   SETS THE ERROR WEIGHT VECTOR EWT BEFORE EACH STEP.
+C  VNORM   COMPUTES THE WEIGHTED R.M.S. NORM OF A VECTOR.
+C  SVCOM AND RSCOM  ARE USER-CALLABLE ROUTINES TO SAVE AND RESTORE,
+C          RESPECTIVELY, THE CONTENTS OF THE INTERNAL COMMON BLOCKS.
+C  DGEFA AND DGESL  ARE ROUTINES FROM LINPACK FOR SOLVING FULL
+C          SYSTEMS OF LINEAR ALGEBRAIC EQUATIONS.
+C  DGBFA AND DGBSL  ARE ROUTINES FROM LINPACK FOR SOLVING BANDED
+C          LINEAR SYSTEMS.
+C  DAXPY, DSCAL, IDAMAX, AND DDOT  ARE BASIC LINEAR ALGEBRA MODULES
+C          (BLAS) USED BY THE ABOVE LINPACK ROUTINES.
+C  D1MACH  COMPUTES THE UNIT ROUNDOFF IN A MACHINE-INDEPENDENT MANNER.
+C  XERR, XSETUN, AND XSETF  HANDLE THE PRINTING OF ALL ERROR
+C          MESSAGES AND WARNINGS.
+C NOTE..  VNORM, IDAMAX, DDOT, AND D1MACH ARE FUNCTION ROUTINES.
+C ALL THE OTHERS ARE SUBROUTINES.
+C
+C THE FORTRAN GENERIC INTRINSIC FUNCTIONS USED BY ODESSA ARE..
+C ABS, MAX, MIN, REAL, MOD, SIGN, SQRT, AND WRITE
+C
+C A BLOCK DATA SUBPROGRAM IS ALSO INCLUDED WITH THE PACKAGE,
+C FOR LOADING SOME OF THE VARIABLES IN INTERNAL COMMON.
+C
+C----------------------------------------------------------------------
+C PART V.  GENERAL REMARKS
+C
+C THIS SECTION HIGHLIGHTS THE BASIC DIFFERENCES BETWEEN THE ORIGINAL
+C LSODE PACKAGE AND THE ODESSA MODIFICATION. THIS IS PROVIDED AS A
+C SERVICE TO EXPERIENCED LSODE USERS TO EXPEDITE FAMILIARIZATION WITH
+C ODESSA.
+C
+C (A). ORIGINAL SUBROUTINES AND FUNCTIONS.
+C
+C      OF THE ORIGINAL 22 SUBROUTINES AND FUNCTIONS USED IN THE LSODE
+C      PACKAGE, ALL ARE USED BY ODESSA, WITH THE FOLLOWING HAVING BEEN
+C      MODIFIED..
+C
+C      LSODE  THE ORIGINAL DRIVER SUBROUTINE FOR THE LSODE PACKAGE IS
+C             EXTENSIVELY MODIFIED AND RENAMED ODESSA, WHICH NOW
+C             CONTAINS A CALL TO SPRIME TO ESTABLISH INITIAL CONDITIONS
+C             FOR THE SENSITIVITY CALCULATIONS.
+C
+C      STODE  THE ONE STEP INTEGRATOR IS SLIGHTLY MODIFIED AND RETAINS
+C             ITS ORIGINAL NAME. IT NOW CONTAINS THE CALL TO STESA,
+C             AND ALSO CALLS SPRIME IF KFLAG .LE. -3.
+C
+C      PREPJ  ALSO NAMED PREPJ IN ODESSA IS SLIGHTLY MODIFIED TO ALLOW
+C             FOR THE CALCULATION OF JACOBIAN WITH NO PREPROCESSING
+C             (JOPT = 1).
+C
+C (B). NEW SUBROUTINES.
+C
+C      IN ADDITION TO THE CHANGES NOTED ABOVE, THREE NEW SUBROUTINES
+C      HAVE BEEN INTRODUCED (SEE STESA, SPRIME, AND PREPDF AS DESCRIBED
+C      IN PART IV. ABOVE).
+C
+C (C). COMMON BLOCKS.
+C
+C      /LS0001/  RETAINS THE SAME LENGTH AND IS RENAMED /ODE001/;
+C                HOWEVER THE REAL ARRAY ROWNS(209) IS SHORTENED TO A
+C                LENGTH OF (173) REAL WORDS, ALLOWING THE REMOVAL OF
+C                TESCO(3,12) WHICH IS NOW PASSED FROM STODE TO STESA.
+C                IN ADDITION, THE INTEGER ARRAY IOWNS(6) IS SHORTENED
+C                TO A LENGTH OF (4) INTEGER WORDS, ALLOWING THE REMOVAL
+C                OF IALTH AND LMAX WHICH ARE NOW PASSED FROM STODE TO
+C                STESA.
+C
+C      /ODE002/  ADDED COMMON BLOCK FOR VARIABLES IMPORTANT TO
+C                SENSITIVITY ANALYSIS (SEE PART III. ABOVE). A BLOCK
+C                DATA PROGRAM IS NOT REQUIRED FOR THIS COMMON BLOCK.
+C
+C      SVCOM,RSCOM  THESE TWO SUBROUTINES ARE MODIFIED TO HANDLE
+C                   COMMON BLOCK /ODE002/ AS WELL.
+C
+C (D). OPTIONAL INPUTS.
+C
+C      THE FULL SET OF OPTIONAL INPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA, WITH THE EXCEPTION THAT THE NUMBER OF ODE'S
+C      IN THE MODEL (NEQ(1)), MAY NOT BE CHANGED DURING THE PROBLEM.
+C      IN ODESSA, NYH NOW REFERS TO THE TOTAL NUMBER OF FIRST-ORDER
+C      ODE'S (MODEL AND SENSITIVITY EQUATIONS) WHICH IS EQUAL TO
+C      NEQ(1) IF ISOPT = 0, OR NEQ(1)*(NEQ(2)+1) IF ISOPT = 1.
+C      NEQ(1), NEQ(2), AND NYH ARE NOT ALLOWED TO CHANGE DURING
+C      THE COURSE OF AN INTEGRATION.
+C
+C (E). OPTIONAL OUTPUTS.
+C
+C      THE FULL SET OF OPTIONAL OUTPUTS AVAILABLE IN LSODE IS ALSO
+C      AVAILABLE IN ODESSA. IN ADDITION, IWORK(19) AND IWORK(20) ARE
+C      LOADED WITH NDFE AND NSPE, RESPECTIVELY, UPON OUTPUT. THE TOTAL
+C      NUMBER OF LU DECOMPOSITIONS OF THE PROCESSED JACOBIAN IS EQUAL
+C      TO NJE - NSPE.
+C-----------------------------------------------------------------------
+      SUBROUTINE KPP_ODESSA (F, DF, NEQ, Y, PAR, T, TOUT,
+     1   ITOL, RTOL, ATOL,
+     1   ITASK, ISTATE, IOPT, RWORK, LRW, IWORK, LIW, JAC, MF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      LOGICAL IHIT
+      EXTERNAL F, DF, JAC, PREPJ, SOLSY, PREPDF
+      DIMENSION NEQ(*), Y(*), PAR(*), RTOL(*), ATOL(*), IOPT(*),
+     1   RWORK(LRW), IWORK(LIW), MORD(2)
+C-----------------------------------------------------------------------
+C THIS IS THE SEPTEMBER 1, 1986 VERSION OF ODESSA..
+C AN ORDINARY DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C SENSITIVITY ANALYSIS.
+C
+C THIS PACKAGE IS A MODIFICATION OF THE AUGUST 13, 1981 VERSION OF
+C LSODE.. LIVERMORE KppSolveR FOR ORDINARY DIFFERENTIAL EQUATIONS.
+C THIS VERSION IS IN DOUBLE PRECISION.
+C
+C ODESSA KppSolveS FOR THE FIRST-ORDER SENSITIVITY COEFFICIENTS..
+C    DY(I)/DP, FOR A SINGLE PARAMETER, OR,
+C    DY(I)/DP(J), FOR MULTIPLE PARAMETERS,
+C ASSOCIATED WITH A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS..
+C    DY(T)/DT = F(Y,T;P).
+C-----------------------------------------------------------------------
+C REFERENCES...
+C
+C  1. JORGE R. LEIS AND MARK A. KRAMER, THE SIMULTANEOUS SOLUTION AND
+C     EXPLICIT SENSITIVITY ANALYSIS OF SYSTEMS DESCRIBED BY ORDINARY
+C     DIFFERENTIAL EQUATIONS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE,
+C     (1985).
+C
+C  2. JORGE R. LEIS AND MARK A. KRAMER, ODESSA - AN ORDINARY
+C     DIFFERENTIAL EQUATION KppSolveR WITH EXPLICIT SIMULTANEOUS
+C     SENSITIVITY ANALYSIS, SUBMITTED TO ACM TRANS. MATH. SOFTWARE.
+C     (1985).
+C
+C  3. ALAN C. HINDMARSH,  LSODE AND LSODI,  TWO NEW INITIAL VALUE
+C     ORDINARY DIFFERENTIAL EQUATION KppSolveRS, ACM-SIGNUM NEWSLETTER,
+C     VOL. 15, NO. 4 (1980), PP. 10-11.
+C-----------------------------------------------------------------------
+C THE FOLLOWING INTERNAL COMMON BLOCKS CONTAIN
+C (A) VARIABLES WHICH ARE LOCAL TO ANY SUBROUTINE BUT WHOSE VALUES MUST
+C    BE PRESERVED BETWEEN CALLS TO THE ROUTINE (OWN VARIABLES), AND
+C (B) VARIABLES WHICH ARE COMMUNICATED BETWEEN SUBROUTINES.
+C THE STRUCTURE OF THE BLOCKS ARE AS FOLLOWS..  ALL REAL VARIABLES ARE
+C LISTED FIRST, FOLLOWED BY ALL INTEGERS.  WITHIN EACH TYPE, THE
+C VARIABLES ARE GROUPED WITH THOSE LOCAL TO SUBROUTINE ODESSA FIRST,
+C THEN THOSE LOCAL TO SUBROUTINE STODE, AND FINALLY THOSE USED
+C FOR COMMUNICATION.  THE BLOCKS ARE DECLARED IN SUBROUTINES ODESSA
+C INTDY, STODE, STESA, PREPJ, PREPDF, AND SOLSY.  GROUPS OF VARIABLES
+C ARE REPLACED BY DUMMY ARRAYS IN THE COMMON DECLARATIONS IN ROUTINES
+C WHERE THOSE VARIABLES ARE NOT USED.
+C-----------------------------------------------------------------------
+      COMMON /ODE001/ TRET, ROWNS(173),
+     1   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     2   ILLIN, INIT, LYH, LEWT, LACOR, LSAVF, LWM, LIWM,
+     3   MXSTEP, MXHNIL, NHNIL, NTREP, NSLAST, NYH, IOWNS(4),
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   NPAR, LDFDP, LNRS,
+     2   ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0,TWO=2.0D0,FOUR=4.0D0)
+      DATA  MORD(1),MORD(2)/12,5/, MXSTP0/500/, MXHNL0/10/
+C-----------------------------------------------------------------------
+C BLOCK A.
+C THIS CODE BLOCK IS EXECUTED ON EVERY CALL.
+C IT TESTS ISTATE AND ITASK FOR LEGALITY AND BRANCHES APPROPIATELY.
+C IF ISTATE .GT. 1 BUT THE FLAG INIT SHOWS THAT INITIALIZATION HAS
+C NOT YET BEEN DONE, AN ERROR RETURN OCCURS.
+C IF ISTATE = 1 AND TOUT = T, JUMP TO BLOCK G AND RETURN IMMEDIATELY.
+C-----------------------------------------------------------------------
+      IF (ISTATE .LT. 1 .OR. ISTATE .GT. 3) GO TO 601
+      IF (ITASK .LT. 1 .OR. ITASK .GT. 5) GO TO 602
+      IF (ISTATE .EQ. 1) GO TO 10
+      IF (INIT .EQ. 0) GO TO 603
+      IF (ISTATE .EQ. 2) GO TO 200
+      GO TO 20
+ 10   INIT = 0
+      IF (TOUT .EQ. T) GO TO 430
+ 20   NTREP = 0
+C-----------------------------------------------------------------------
+C BLOCK B.
+C THE NEXT CODE BLOCK IS EXECUTED FOR THE INITIAL CALL (ISTATE = 1),
+C OR FOR A CONTINUATION CALL WITH PARAMETER CHANGES (ISTATE = 3).
+C IT CONTAINS CHECKING OF ALL INPUTS AND VARIOUS INITIALIZATIONS.
+C
+C FIRST CHECK LEGALITY OF THE NON-OPTIONAL INPUTS NEQ, ITOL, IOPT,
+C MF, ML, AND MU.
+C-----------------------------------------------------------------------
+      IF (NEQ(1) .LE. 0) GO TO 604
+      IF (ISTATE .EQ. 1) GO TO 25
+      IF (NEQ(1) .NE. N) GO TO 605
+ 25   N = NEQ(1)
+      IF (ITOL .LT. 1 .OR. ITOL .GT. 4) GO TO 606
+      DO 26 I = 1,3
+ 26     IF (IOPT(I) .LT. 0 .OR. IOPT(I) .GT. 1) GO TO 607
+      ISOPT = IOPT(2)
+      IDF = IOPT(3)
+      NYH = N
+      NSV = 1
+      METH = MF/10
+      MITER = MF - 10*METH
+      IF (METH .LT. 1 .OR. METH .GT. 2) GO TO 608
+      IF (MITER .LT. 0 .OR. MITER .GT. 5) GO TO 608
+      IF (MITER .LE. 3) GO TO 30
+      ML = IWORK(1)
+      MU = IWORK(2)
+      IF (ML .LT. 0 .OR. ML .GE. N) GO TO 609
+      IF (MU .LT. 0 .OR. MU .GE. N) GO TO 610
+ 30   IF (ISOPT .EQ. 0) GO TO 32
+C CHECK LEGALITY OF THE NON-OPTIONAL INPUTS ISOPT, NPAR.
+C COMPUTE NUMBER OF SOLUTION VECTORS AND TOTAL NUMBER OF EQUATIONS.
+      IF (NEQ(2) .LE. 0) GO TO 628
+      IF (ISTATE .EQ. 1) GO TO 31
+      IF (NEQ(2) .NE. NPAR) GO TO 629
+ 31   NPAR = NEQ(2)
+      NSV = NPAR + 1
+      NYH = NSV * N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) GO TO 630
+C NEXT PROCESS AND CHECK THE OPTIONAL INPUTS. --------------------------
+ 32   IF (IOPT(1) .EQ. 1) GO TO 40
+      MAXORD = MORD(METH)
+      MXSTEP = MXSTP0
+      MXHNIL = MXHNL0
+      IF (ISTATE .EQ. 1) H0 = ZERO
+      HMXI = ZERO
+      HMIN = ZERO
+      GO TO 60
+ 40   MAXORD = IWORK(5)
+      IF (MAXORD .LT. 0) GO TO 611
+      IF (MAXORD .EQ. 0) MAXORD = 100
+      MAXORD = MIN(MAXORD,MORD(METH))
+      MXSTEP = IWORK(6)
+      IF (MXSTEP .LT. 0) GO TO 612
+      IF (MXSTEP .EQ. 0) MXSTEP = MXSTP0
+      MXHNIL = IWORK(7)
+      IF (MXHNIL .LT. 0) GO TO 613
+      IF (MXHNIL .EQ. 0) MXHNIL = MXHNL0
+      IF (ISTATE .NE. 1) GO TO 50
+      H0 = RWORK(5)
+      IF ((TOUT - T)*H0 .LT. ZERO) GO TO 614
+ 50   HMAX = RWORK(6)
+      IF (HMAX .LT. ZERO) GO TO 615
+      HMXI = ZERO
+      IF (HMAX .GT. ZERO) HMXI = ONE/HMAX
+      HMIN = RWORK(7)
+      IF (HMIN .LT. ZERO) GO TO 616
+C-----------------------------------------------------------------------
+C SET WORK ARRAY POINTERS AND CHECK LENGTHS LRW AND LIW.
+C POINTERS TO SEGMENTS OF RWORK AND IWORK ARE NAMED BY PREFIXING L TO
+C THE NAME OF THE SEGMENT.  E.G., THE SEGMENT YH STARTS AT RWORK(LYH).
+C SEGMENTS OF RWORK (IN ORDER) ARE DENOTED  YH, WM, EWT, SAVF, ACOR.
+C WORK SPACE FOR DFDP IS CONTAINED IN ACOR.
+C-----------------------------------------------------------------------
+ 60   LYH = 21
+      LWM = LYH + (MAXORD + 1)*NYH
+      IF (MITER .EQ. 0) LENWM = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 2) LENWM = N*N + 2
+      IF (MITER .EQ. 3) LENWM = N + 2
+      IF (MITER .GE. 4) LENWM = (2*ML + MU + 1)*N + 2
+      LEWT = LWM + LENWM
+      LSAVF = LEWT + NYH
+      LACOR = LSAVF + N
+      LDFDP = LACOR + N
+      LENRW = LACOR + NYH - 1
+      IWORK(17) = LENRW
+      LIWM = 1
+      LENIW = 20 + N
+      IF (MITER .EQ. 0 .OR. MITER .EQ. 3) LENIW = 20
+      LNRS = LENIW + LIWM
+      IF (ISOPT .EQ. 1) LENIW = LNRS + NPAR
+      IWORK(18) = LENIW
+      IF (LENRW .GT. LRW) GO TO 617
+      IF (LENIW .GT. LIW) GO TO 618
+C CHECK RTOL AND ATOL FOR LEGALITY. ------------------------------------
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 70 I = 1,NYH
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        IF (RTOLI .LT. ZERO) GO TO 619
+        IF (ATOLI .LT. ZERO) GO TO 620
+ 70     CONTINUE
+      IF (ISTATE .EQ. 1) GO TO 100
+C IF ISTATE = 3, SET FLAG TO SIGNAL PARAMETER CHANGES TO STODE. --------
+      JSTART = -1
+      IF (NQ .LE. MAXORD) GO TO 90
+C MAXORD WAS REDUCED BELOW NQ.  COPY YH(*,MAXORD+2) INTO SAVF. ---------
+      DO 80 I = 1,N
+ 80     RWORK(I+LSAVF-1) = RWORK(I+LWM-1)
+C RELOAD WM(1) = RWORK(LWM), SINCE LWM MAY HAVE CHANGED. ---------------
+ 90   IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      GO TO 200
+C-----------------------------------------------------------------------
+C BLOCK C.
+C THE NEXT BLOCK IS FOR THE INITIAL CALL ONLY (ISTATE = 1).
+C IT CONTAINS ALL REMAINING INITIALIZATIONS, THE INITIAL CALL TO F,
+C THE INITIAL CALL TO SPRIME IF ISOPT = 1,
+C AND THE CALCULATION OF THE INITIAL STEP SIZE.
+C THE ERROR WEIGHTS IN EWT ARE INVERTED AFTER BEING LOADED.
+C-----------------------------------------------------------------------
+ 100  UROUND = D1MACH(4)
+      TN = T
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 105
+      TCRIT = RWORK(1)
+      IF ((TCRIT - TOUT)*(TOUT - T) .LT. ZERO) GO TO 625
+      IF (H0 .NE. ZERO .AND. (T + H0 - TCRIT)*H0 .GT. ZERO)
+     1   H0 = TCRIT - T
+ 105  JSTART = 0
+      IF (MITER .GT. 0) RWORK(LWM) = SQRT(UROUND)
+      NHNIL = 0
+      NST = 0
+      NJE = 0
+      NSLAST = 0
+      HU = ZERO
+      NQU = 0
+      CCMAX = 0.3D0
+      MAXCOR = 3
+      IF (ISOPT .EQ. 1) MAXCOR = 4
+      MSBP = 20
+      MXNCF = 10
+C INITIAL CALL TO F.  (LF0 POINTS TO YH(1,2) AND LOADS IN VALUES).
+      LF0 = LYH + NYH
+      CALL F (NEQ, T, Y, PAR, RWORK(LF0))
+      NFE = 1
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      NDFE = 0
+      NSPE = 0
+      IF (ISOPT .EQ. 0) GO TO 114
+C INITIALIZE COUNTS FOR REPEATED STEPS DUE TO SENSITIVITY ANALYSIS.
+      DO 110 J = 1,NSV
+ 110    IWORK(J + LNRS - 1) = 0
+C LOAD THE INITIAL VALUE VECTOR IN YH. ---------------------------------
+ 114  DO 115 I = 1,NYH
+ 115    RWORK(I+LYH-1) = Y(I)
+C LOAD AND INVERT THE EWT ARRAY.  (H IS TEMPORARILY SET TO ONE.) -------
+      NQ = 1
+      H = ONE
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 120 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 621
+ 120    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+      IF (ISOPT .EQ. 0) GO TO 125
+C CALL SPRIME TO LOAD FIRST-ORDER SENSITIVITY DERIVATIVES INTO
+C REMAINING YH(*,2) POSITIONS.
+      CALL SPRIME (NEQ, Y, RWORK(LYH), NYH, N, NSV, RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LF0), RWORK(LACOR),
+     2   RWORK(LDFDP), PAR, F, JAC, DF, PREPJ, PREPDF)
+      IF (IERSP .EQ. -1) GO TO 631
+      IF (IERSP .EQ. -2) GO TO 632
+C-----------------------------------------------------------------------
+C THE CODING BELOW COMPUTES THE STEP SIZE, H0, TO BE ATTEMPTED ON THE
+C FIRST STEP, UNLESS THE USER HAS SUPPLIED A VALUE FOR THIS.
+C FIRST CHECK THAT TOUT - T DIFFERS SIGNIFICANTLY FROM ZERO.
+C A SCALAR TOLERANCE QUANTITY TOL IS COMPUTED, AS MAX(RTOL(I))
+C IF THIS IS POSITIVE, OR MAX(ATOL(I)/ABS(Y(I))) OTHERWISE, ADJUSTED
+C SO AS TO BE BETWEEN 100*UROUND AND 1.0E-3. ONLY THE ORIGINAL
+C SOLUTION VECTOR IS CONSIDERED IN THIS CALCULATION (ISOPT = 0 OR 1).
+C THEN THE COMPUTED VALUE H0 IS GIVEN BY..
+C                                     NEQ
+C  H0**2 = TOL / ( W0**-2 + (1/NEQ) * SUM ( F(I)/YWT(I) )**2  )
+C                                      1
+C WHERE  W0     = MAX ( ABS(T), ABS(TOUT) ),
+C        F(I)   = I-TH COMPONENT OF INITIAL VALUE OF F,
+C        YWT(I) = EWT(I)/TOL  (A WEIGHT FOR Y(I)).
+C THE SIGN OF H0 IS INFERRED FROM THE INITIAL VALUES OF TOUT AND T.
+C-----------------------------------------------------------------------
+ 125  IF (H0 .NE. ZERO) GO TO 180
+      TDIST = ABS(TOUT - T)
+      W0 = MAX(ABS(T),ABS(TOUT))
+      IF (TDIST .LT. TWO*UROUND*W0) GO TO 622
+      TOL = RTOL(1)
+      IF (ITOL .LE. 2) GO TO 140
+      DO 130 I = 1,N
+ 130    TOL = MAX(TOL,RTOL(I))
+ 140   IF (TOL .GT. ZERO) GO TO 160
+      ATOLI = ATOL(1)
+      DO 150 I = 1,N
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        AYI = ABS(Y(I))
+        IF (AYI .NE. ZERO) TOL = MAX(TOL,ATOLI/AYI)
+ 150    CONTINUE
+ 160   TOL = MAX(TOL,100.0D0*UROUND)
+      TOL = MIN(TOL,0.001D0)
+      SUM = VNORM (N, RWORK(LF0), RWORK(LEWT))
+      SUM = ONE/(TOL*W0*W0) + TOL*SUM**2
+      H0 = ONE/SQRT(SUM)
+      H0 = MIN(H0,TDIST)
+      H0 = SIGN(H0,TOUT-T)
+C ADJUST H0 IF NECESSARY TO MEET HMAX BOUND. ---------------------------
+ 180   RH = ABS(H0)*HMXI
+      IF (RH .GT. ONE) H0 = H0/RH
+C LOAD H WITH H0 AND SCALE YH(*,2) BY H0. ------------------------------
+      H = H0
+      DO 190 I = 1,NYH
+ 190    RWORK(I+LF0-1) = H0*RWORK(I+LF0-1)
+      GO TO 270
+C-----------------------------------------------------------------------
+C BLOCK D.
+C THE NEXT CODE BLOCK IS FOR CONTINUATION CALLS ONLY (ISTATE = 2 OR 3)
+C AND IS TO CHECK STOP CONDITIONS BEFORE TAKING A STEP.
+C-----------------------------------------------------------------------
+ 200   NSLAST = NST
+      GO TO (210, 250, 220, 230, 240), ITASK
+ 210   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 220   TP = TN - HU*(ONE + 100.0D0*UROUND)
+      IF ((TP - TOUT)*H .GT. ZERO) GO TO 623
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      GO TO 400
+ 230   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+      IF ((TCRIT - TOUT)*H .LT. ZERO) GO TO 625
+      IF ((TN - TOUT)*H .LT. ZERO) GO TO 245
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      IF (IFLAG .NE. 0) GO TO 627
+      T = TOUT
+      GO TO 420
+ 240   TCRIT = RWORK(1)
+      IF ((TN - TCRIT)*H .GT. ZERO) GO TO 624
+ 245   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      IF (ISTATE .EQ. 2) JSTART = -2
+C-----------------------------------------------------------------------
+C BLOCK E.
+C THE NEXT BLOCK IS NORMALLY EXECUTED FOR ALL CALLS AND CONTAINS
+C THE CALL TO THE ONE-STEP CORE INTEGRATOR STODE.
+C
+C THIS IS A LOOPING POINT FOR THE INTEGRATION STEPS.
+C
+C FIRST CHECK FOR TOO MANY STEPS BEING TAKEN, UPDATE EWT (IF NOT AT
+C START OF PROBLEM), CHECK FOR TOO MUCH ACCURACY BEING REQUESTED, AND
+C CHECK FOR H BELOW THE ROUNDOFF LEVEL IN T.
+C TOLSF IS CALCULATED CONSIDERING ALL SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 250   CONTINUE
+      IF ((NST-NSLAST) .GE. MXSTEP) GO TO 500
+      CALL EWSET (NYH, ITOL, RTOL, ATOL, RWORK(LYH), RWORK(LEWT))
+      DO 260 I = 1,NYH
+        IF (RWORK(I+LEWT-1) .LE. ZERO) GO TO 510
+ 260    RWORK(I+LEWT-1) = ONE/RWORK(I+LEWT-1)
+ 270   TOLSF = UROUND*VNORM (NYH, RWORK(LYH), RWORK(LEWT))
+      IF (TOLSF .LE. ONE) GO TO 280
+      TOLSF = TOLSF*2.0D0
+      IF (NST .EQ. 0) GO TO 626
+      GO TO 520
+ 280   IF (ADDX(TN,H) .NE. TN) GO TO 290
+      NHNIL = NHNIL + 1
+      IF (NHNIL .GT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - WARNING..INTERNAL T (=R1) AND H (=R2) ARE',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('SUCH THAT IN THE MACHINE, T + H = T ON THE NEXT STEP',
+     1   101, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('(H = STEP SIZE). KppSolveR WILL CONTINUE ANYWAY',
+     1   101, 1, 0, 0, 0, 2, TN, H)
+      IF (NHNIL .LT. MXHNIL) GO TO 290
+      CALL XERR ('ODESSA - ABOVE WARNING HAS BEEN ISSUED I1 TIMES.',
+     1   102, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('IT WILL NOT BE ISSUED AGAIN FOR THIS PROBLEM',
+     1   102, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+ 290   CONTINUE
+C-----------------------------------------------------------------------
+C     CALL STODE(NEQ,Y,YH,NYH,YH,WM,IWM,EWT,SAVF,ACOR,PAR,NRS,
+C    1   F,JAC,DF,PREPJ,PREPDF,SOLSY)
+C-----------------------------------------------------------------------
+      CALL STODE (NEQ, Y, RWORK(LYH), NYH, RWORK(LYH), RWORK(LWM),
+     1   IWORK(LIWM), RWORK(LEWT), RWORK(LSAVF), RWORK(LACOR),
+     2   PAR, IWORK(LNRS), F, JAC, DF, PREPJ, PREPDF, SOLSY)
+      KGO = 1 - KFLAG
+      GO TO (300, 530, 540, 633), KGO
+C-----------------------------------------------------------------------
+C BLOCK F.
+C THE FOLLOWING BLOCK HANDLES THE CASE OF A SUCCESSFUL RETURN FROM THE
+C CORE INTEGRATOR (KFLAG = 0).  TEST FOR STOP CONDITIONS.
+C-----------------------------------------------------------------------
+ 300   INIT = 1
+      GO TO (310, 400, 330, 340, 350), ITASK
+C ITASK = 1.  IF TOUT HAS BEEN REACHED, INTERPOLATE. -------------------
+ 310   IF ((TN - TOUT)*H .LT. ZERO) GO TO 250
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+C ITASK = 3.  JUMP TO EXIT IF TOUT WAS REACHED. ------------------------
+ 330   IF ((TN - TOUT)*H .GE. ZERO) GO TO 400
+      GO TO 250
+C ITASK = 4.  SEE IF TOUT OR TCRIT WAS REACHED.  ADJUST H IF NECESSARY.
+ 340   IF ((TN - TOUT)*H .LT. ZERO) GO TO 345
+      CALL INTDY (TOUT, 0, RWORK(LYH), NYH, Y, IFLAG)
+      T = TOUT
+      GO TO 420
+ 345   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+      IF (IHIT) GO TO 400
+      TNEXT = TN + H*(ONE + FOUR*UROUND)
+      IF ((TNEXT - TCRIT)*H .LE. ZERO) GO TO 250
+      H = (TCRIT - TN)*(ONE - FOUR*UROUND)
+      JSTART = -2
+      GO TO 250
+C ITASK = 5.  SEE IF TCRIT WAS REACHED AND JUMP TO EXIT. ---------------
+ 350   HMX = ABS(TN) + ABS(H)
+      IHIT = ABS(TN - TCRIT) .LE. 100.0D0*UROUND*HMX
+C-----------------------------------------------------------------------
+C BLOCK G.
+C THE FOLLOWING BLOCK HANDLES ALL SUCCESSFUL RETURNS FROM ODESSA.
+C IF ITASK .NE. 1, Y IS LOADED FROM YH AND T IS SET ACCORDINGLY.
+C ISTATE IS SET TO 2, THE ILLEGAL INPUT COUNTER IS ZEROED, AND THE
+C OPTIONAL OUTPUTS ARE LOADED INTO THE WORK ARRAYS BEFORE RETURNING.
+C IF ISTATE = 1 AND TOUT = T, THERE IS A RETURN WITH NO ACTION TAKEN,
+C EXCEPT THAT IF THIS HAS HAPPENED REPEATEDLY, THE RUN IS TERMINATED.
+C-----------------------------------------------------------------------
+ 400  DO 410 I = 1,NYH
+ 410    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      IF (ITASK .NE. 4 .AND. ITASK .NE. 5) GO TO 420
+      IF (IHIT) T = TCRIT
+ 420   ISTATE = 2
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+ 430   NTREP = NTREP + 1
+      IF (NTREP .LT. 5) RETURN
+      CALL XERR ('ODESSA -- REPEATED CALLS WITH ISTATE = 1 AND
+     1TOUT = T (=R1)', 301, 1, 0, 0, 0, 1, T, ZERO)
+      GO TO 800
+C-----------------------------------------------------------------------
+C BLOCK H.
+C THE FOLLOWING BLOCK HANDLES ALL UNSUCCESSFUL RETURNS OTHER THAN
+C THOSE FOR ILLEGAL INPUT.  FIRST THE ERROR MESSAGE ROUTINE IS CALLED.
+C IF THERE WAS AN ERROR TEST OR CONVERGENCE TEST FAILURE, IMXER IS SET.
+C THEN Y IS LOADED FROM YH, T IS SET TO TN, AND THE ILLEGAL INPUT
+C COUNTER ILLIN IS SET TO 0.  THE OPTIONAL OUTPUTS ARE LOADED INTO
+C THE WORK ARRAYS BEFORE RETURNING.
+C-----------------------------------------------------------------------
+C THE MAXIMUM NUMBER OF STEPS WAS TAKEN BEFORE REACHING TOUT. ----------
+ 500  CALL XERR ('ODESSA - AT CURRENT T (=R1), MXSTEP (=I1) STEPS',
+     1   201, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('TAKEN ON THIS CALL BEFORE REACHING TOUT',
+     1   201, 1, 1, MXSTEP, 0, 1, TN, ZERO)
+      ISTATE = -1
+      GO TO 580
+C EWT(I) .LE. 0.0 FOR SOME I (NOT AT START OF PROBLEM). ----------------
+ 510   EWTI = RWORK(LEWT+I-1)
+      CALL XERR ('ODESSA - AT T (=R1), EWT(I1) HAS BECOME R2 .LE. 0.',
+     1   202, 1, 1, I, 0, 2, TN, EWTI)
+      ISTATE = -6
+      GO TO 580
+C TOO MUCH ACCURACY REQUESTED FOR MACHINE PRECISION. -------------------
+ 520  CALL XERR ('ODESSA - AT T (=R1), TOO MUCH ACCURACY REQUESTED',
+     1  203, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('FOR PRECISION OF MACHINE..  SEE TOLSF (=R2)',
+     1  203, 1, 0, 0, 0, 2, TN, TOLSF)
+      RWORK(14) = TOLSF
+      ISTATE = -2
+      GO TO 580
+C KFLAG = -1.  ERROR TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN. -----
+ 530  CALL XERR ('ODESSA - AT T(=R1) AND STEP SIZE H(=R2), THE ERROR',
+     1  204, 1, 0, 0, 0, 0, ZERO, ZERO)
+      CALL XERR ('TEST FAILED REPEATEDLY OR WITH ABS(H) = HMIN',
+     1  204, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -4
+      GO TO 560
+C KFLAG = -2.  CONVERGENCE FAILED REPEATEDLY OR WITH ABS(H) = HMIN. ----
+ 540  CALL XERR ('ODESSA - AT T (=R1) AND STEP SIZE H (=R2), THE',
+     1  205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('CORRECTOR CONVERGENCE FAILED REPEATEDLY',
+     1   205, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR ('OR WITH ABS(H) = HMIN',
+     1   205, 1, 0, 0, 0, 2, TN, H)
+      ISTATE = -5
+C COMPUTE IMXER IF RELEVANT. -------------------------------------------
+ 560   BIG = ZERO
+      IMXER = 1
+      DO 570 I = 1,NYH
+        SIZE = ABS(RWORK(I+LACOR-1)*RWORK(I+LEWT-1))
+        IF (BIG .GE. SIZE) GO TO 570
+        BIG = SIZE
+        IMXER = I
+ 570    CONTINUE
+      IWORK(16) = IMXER
+C SET Y VECTOR, T, ILLIN, AND OPTIONAL OUTPUTS. ------------------------
+ 580   DO 590 I = 1,NYH
+ 590    Y(I) = RWORK(I+LYH-1)
+      T = TN
+      ILLIN = 0
+      RWORK(11) = HU
+      RWORK(12) = H
+      RWORK(13) = TN
+      IWORK(11) = NST
+      IWORK(12) = NFE
+      IWORK(13) = NJE
+      IWORK(14) = NQU
+      IWORK(15) = NQ
+      IF (ISOPT .EQ. 0) RETURN
+      IWORK(19) = NDFE
+      IWORK(20) = NSPE
+      RETURN
+C-----------------------------------------------------------------------
+C BLOCK I.
+C THE FOLLOWING BLOCK HANDLES ALL ERROR RETURNS DUE TO ILLEGAL INPUT
+C (ISTATE = -3), AS DETECTED BEFORE CALLING THE CORE INTEGRATOR.
+C FIRST THE ERROR MESSAGE ROUTINE IS CALLED.  THEN IF THERE HAVE BEEN
+C 5 CONSECUTIVE SUCH RETURNS JUST BEFORE THIS CALL TO THE KppSolveR,
+C THE RUN IS HALTED.
+C-----------------------------------------------------------------------
+ 601   CALL XERR ('ODESSA - ISTATE (=I1) ILLEGAL',
+     1  1, 1, 1, ISTATE, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 602   CALL XERR ('ODESSA - ITASK (=I1) ILLEGAL',
+     1  2, 1, 1, ITASK, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 603  CALL XERR ('ODESSA - ISTATE .GT. 1 BUT ODESSA NOT INITIALIZED',
+     1  3, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 604   CALL XERR ('ODESSA - NEQ (=I1) .LT. 1',
+     1  4, 1, 1, NEQ(1), 0, 0, ZERO,ZERO)
+      GO TO 700
+ 605  CALL XERR ('ODESSA - ISTATE = 3 AND NEQ CHANGED.  (I1 TO I2)',
+     1  5, 1, 2, N, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 606   CALL XERR ('ODESSA - ITOL (=I1) ILLEGAL',
+     1  6, 1, 1, ITOL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 607   CALL XERR ('ODESSA - IOPT (=I1) ILLEGAL',
+     1   7, 1, 1, IOPT, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 608   CALL XERR('ODESSA - MF (=I1) ILLEGAL',
+     1   8, 1, 1, MF, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 609  CALL XERR('ODESSA - ML (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   9, 1, 2, ML, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 610  CALL XERR('ODESSA - MU (=I1) ILLEGAL.. .LT.0 OR .GE.NEQ (=I2)',
+     1   10, 1, 2, MU, NEQ(1), 0, ZERO,ZERO)
+      GO TO 700
+ 611   CALL XERR('ODESSA - MAXORD (=I1) .LT. 0',
+     1   11, 1, 1, MAXORD, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 612   CALL XERR('ODESSA - MXSTEP (=I1) .LT. 0',
+     1   12, 1, 1, MXSTEP, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 613   CALL XERR('ODESSA - MXHNIL (=I1) .LT. 0',
+     1   13, 1, 1, MXHNIL, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 614   CALL XERR('ODESSA - TOUT (=R1) BEHIND T (=R2)',
+     1   14, 1, 0, 0, 0, 2, TOUT, T)
+      CALL XERR('INTEGRATION DIRECTION IS GIVEN BY H0 (=R1)',
+     1   14, 1, 0, 0, 0, 1, H0, ZERO)
+      GO TO 700
+ 615   CALL XERR('ODESSA - HMAX (=R1) .LT. 0.0',
+     1   15, 1, 0, 0, 0, 1, HMAX, ZERO)
+      GO TO 700
+ 616   CALL XERR('ODESSA - HMIN (=R1) .LT. 0.0',
+     1   16, 1, 0, 0, 0, 1, HMIN, ZERO)
+      GO TO 700
+ 617  CALL XERR('ODESSA - RWORK LENGTH NEEDED, LENRW (=I1), EXCEEDS
+     1 LRW (=I2)', 17, 1, 2, LENRW, LRW, 0, ZERO,ZERO)
+      GO TO 700
+ 618  CALL XERR('ODESSA - IWORK LENGTH NEEDED, LENIW (=I1), EXCEEDS
+     1 LIW (=I2)', 18, 1, 2, LENIW, LIW, 0, ZERO,ZERO)
+      GO TO 700
+ 619   CALL XERR('ODESSA - RTOL(I1) IS R1 .LT. 0.0',
+     1   19, 1, 1, I, 0, 1, RTOLI, ZREO)
+      GO TO 700
+ 620   CALL XERR('ODESSA - ATOL(I1) IS R1 .LT. 0.0',
+     1   20, 1, 1, I, 0, 1, ATOLI, ZERO)
+      GO TO 700
+*
+ 621   EWTI = RWORK(LEWT+I-1)
+      CALL XERR('ODESSA - EWT(I1) IS R1 .LE. 0.0',
+     1   21, 1, 1, I, 0, 1, EWTI, ZERO)
+      GO TO 700
+ 622  CALL XERR('ODESSA - TOUT (=R1) TOO CLOSE TO T(=R2) TO START
+     1 INTEGRATION', 22, 1, 0, 0, 0, 2, TOUT, T)
+      GO TO 700
+ 623  CALL XERR('ODESSA - ITASK = I1 AND TOUT (=R1) BEHIND TCUR - HU
+     1 (= R2)', 23, 1, 1, ITASK, 0, 2, TOUT, TP)
+      GO TO 700
+ 624  CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TCUR
+     1 (=R2)', 24, 1, 0, 0, 0, 2, TCRIT, TN)
+      GO TO 700
+ 625   CALL XERR('ODESSA - ITASK = 4 OR 5 AND TCRIT (=R1) BEHIND TOUT
+     1 (=R2)', 25, 1, 0, 0, 0, 2, TCRIT, TOUT)
+      GO TO 700
+ 626  CALL XERR('ODESSA - AT START OF PROBLEM, TOO MUCH ACCURACY',
+     1   26, 1, 0, 0, 0, 0, ZERO,ZERO)
+      CALL XERR('REQUESTED FOR PRECISION OF MACHINE. SEE TOLSF (=R1)',
+     1   26, 1, 0, 0, 0, 1, TOLSF, ZERO)
+      RWORK(14) = TOLSF
+      GO TO 700
+ 627  CALL XERR('ODESSA - TROUBLE FROM INTDY. ITASK = I1, TOUT = R1',
+     1   27, 1, 1, ITASK, 0, 1, TOUT, ZERO)
+      GO TO 700
+C ERROR STATEMENTS ASSOCIATED WITH SENSITIVITY ANALYSIS.
+ 628  CALL XERR('ODESSA - NPAR (=I1) .LT. 1',
+     1   28, 1, 1, NPAR, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 629  CALL XERR('ODESSA - ISTATE = 3 AND NPAR CHANGED (I1 TO I2)',
+     1   29, 1, 2, NP, NPAR, 0, ZERO,ZERO)
+      GO TO 700
+ 630  CALL XERR('ODESSA - MITER (=I1) ILLEGAL',
+     1   30, 1, 1, MITER, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 631  CALL XERR('ODESSA - TROUBLE IN SPRIME (IERPJ)',
+     1   31, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 632  CALL XERR('ODESSA - TROUBLE IN SPRIME (MITER)',
+     1   32, 1, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 700
+ 633  CALL XERR('ODESSA - FATAL ERROR IN STODE (KFLAG = -3)',
+     1   33, 2, 0, 0, 0, 0, ZERO,ZERO)
+      GO TO 801
+C
+ 700   IF (ILLIN .EQ. 5) GO TO 710
+      ILLIN = ILLIN + 1
+      ISTATE = -3
+      RETURN
+ 710  CALL XERR('ODESSA - REPEATED OCCURRENCES OF ILLEGAL INPUT',
+     1   302, 1, 0, 0, 0, 0, ZERO,ZERO)
+C
+ 800  CALL XERR('ODESSA - RUN ABORTED.. APPARENT INFINITE LOOP',
+     1   303, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+ 801  CALL XERR('ODESSA - RUN ABORTED',
+     1   304, 2, 0, 0, 0, 0, ZERO,ZERO)
+      RETURN
+C-------------------- END OF SUBROUTINE ODESSA -------------------------
+      END
+      DOUBLE PRECISION FUNCTION ADDX(A,B)
+      DOUBLE PRECISION A,B
+C
+C  THIS FUNCTION IS NECESSARY TO FORCE OPTIMIZING COMPILERS TO
+C  EXECUTE AND STORE A SUM, FOR SUCCESSFUL EXECUTION OF THE
+C  TEST A + B = B.
+C
+      ADDX = A + B
+      RETURN
+C-------------------- END OF FUNCTION SUM ------------------------------
+      END
+      SUBROUTINE SPRIME (NEQ, Y, YH, NYH, NROW, NCOL, WM, IWM,
+     1  EWT, SAVF, FTEM, DFDP, PAR, F, JAC, DF, PJAC, PDF)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION NEQ(*), Y(*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1  EWT(*), SAVF(*), FTEM(*), DFDP(NROW,*), PAR(*)
+      EXTERNAL F, JAC, DF, PJAC, PDF
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1  RDUM1(37),EL0, H, RDUM2(6),
+     2  IOWND1(14), IOWNS(4),
+     3  IDUM1(3), IERPJ, IDUM2(6),
+     4  MITER, IDUM3(4), N, IDUM4(5)
+      COMMON /ODE002/ RDUM3(3),
+     1  IOWND2(3), IDUM5, NSV, IDUM6, NSPE, IDUM7, IERSP, JOPT, IDUM8
+C-----------------------------------------------------------------------
+C SPRIME IS CALLED BY ODESSA TO INITIALIZE THE YH ARRAY. IT IS ALSO
+C CALLED BY STODE TO REEVALUATE FIRST ORDER DERIVATIVES WHEN KFLAG
+C .LE. -3. SPRIME COMPUTES THE FIRST DERIVATIVES OF THE SENSITIVITY
+C COEFFICIENTS WITH RESPECT TO THE INDEPENDENT VARIABLE T...
+C
+C        SPRIME = D(DY/DP)/DT = JAC*DY/DP + DF/DP
+C                   WHERE JAC = JACOBIAN MATRIX
+C                       DY/DP = SENSITIVITY MATRIX
+C                       DF/DP = INHOMOGENEITY MATRIX
+C THIS ROUTINE USES THE COMMON VARIABLES EL0, H, IERPJ, MITER, N,
+C NSV, NSPE, IERSP, JOPT
+C-----------------------------------------------------------------------
+C CALL PREPJ WITH JOPT = 1.
+C IF MITER = 2 OR 5, EL0 IS TEMPORARILY SET TO -1.0 AND H IS
+C TEMPORARILY SET TO 1.0D0.
+C-----------------------------------------------------------------------
+      NSPE = NSPE + 1
+      JOPT = 1
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 10
+      HTEMP = H
+      ETEMP = EL0
+      H = ONE
+      EL0 = -ONE
+ 10   CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 300
+      JOPT = 0
+      IF (MITER .EQ. 1 .OR. MITER .EQ. 4) GO TO 20
+      H = HTEMP
+      EL0 = ETEMP
+C-----------------------------------------------------------------------
+C CALL PREPDF AND LOAD DFDP(*,JPAR).
+C-----------------------------------------------------------------------
+ 20   DO 30 J = 2,NSV
+        JPAR = J - 1
+        CALL PDF (NEQ, Y, WM, SAVF, FTEM, DFDP(1,JPAR), PAR,
+     1     F, DF, JPAR)
+ 30   CONTINUE
+C-----------------------------------------------------------------------
+C COMPUTE JAC*DY/DP AND STORE RESULTS IN YH(*,*,2).
+C-----------------------------------------------------------------------
+      GO TO (40,40,310,100,100) MITER
+C THE JACOBIAN IS FULL.------------------------------------------------
+C FOR EACH ROW OF THE JACOBIAN..
+C 40   DO 70 IROW = 1,N
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+C        DO 60 J = 2,NSV
+C          SUM = ZERO
+C TAKE THE VECTOR DOT PRODUCT..
+C          DO 50 I = 1,N
+C            IPD = IROW + N*(I-1) + 2
+C            SUM = SUM + WM(IPD)*YH(I,J,1)
+C 50       CONTINUE
+C          YH(IROW,J,2) = SUM
+C 60     CONTINUE
+C 70   CONTINUE
+  40  CONTINUE
+C FOR EACH COLUMN OF THE SENSITIVITY MATRIX..
+      DO 60 J = 2,NSV
+        CALL Jac_SP_Vec( WM(3), YH(1,J,1), YH(1,J,2) )
+ 60   CONTINUE
+      GO TO 200
+C THE JACOBIAN IS BANDED.-----------------------------------------------
+ 100  ML = IWM(1)
+      MU = IWM(2)
+      ICOUNT = 1
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      NMU = N - MU
+      ML1 = ML + 1
+C FOR EACH ROW OF THE JACOBIAN..
+      DO 160 IROW = 1,N
+        IF (IROW .GT. ML1) GO TO 110
+        IPD = MBAND + IROW + 1
+        IYH = 1
+        LBAND = MU + IROW
+        GO TO 120
+ 110    ICOUNT = ICOUNT + 1
+        IPD = ICOUNT*MEBAND + 2
+        IYH = IYH + 1
+        LBAND = LBAND - 1
+        IF (IROW .LE. NMU) LBAND = MBAND
+C AND EACH COLUMN OF THE SENSITIVITY MATRIX..
+ 120    DO 150 J = 2,NSV
+          SUM = ZERO
+          I1 = IPD
+          I2 = IYH
+C TAKE THE VECTOR DOT PRODUCT.
+          DO 140 I = 1,LBAND
+            SUM = SUM + WM(I1)*YH(I2,J,1)
+            I1 = I1 + MEBAND - 1
+            I2 = I2 + 1
+ 140      CONTINUE
+          YH(IROW,J,2) = SUM
+ 150    CONTINUE
+ 160  CONTINUE
+C-----------------------------------------------------------------------
+C ADD THE INHOMOGENEITY TERM, I.E., ADD DFDP(*,JPAR) TO YH(*,JPAR+1,2).
+C-----------------------------------------------------------------------
+ 200  DO 220 J = 2,NSV
+        JPAR = J - 1
+        DO 210 I = 1,N
+          YH(I,J,2) = YH(I,J,2) + DFDP(I,JPAR)
+ 210    CONTINUE
+ 220  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C ERROR RETURNS.
+C-----------------------------------------------------------------------
+ 300  IERSP = -1
+      RETURN
+ 310  IERSP = -2
+      RETURN
+C------------------------END OF SUBROUTINE SPRIME-----------------------
+      END
+      SUBROUTINE PREPJ (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, FTEM,
+     1   PAR, FUNC_CHEM, JAC, JOPT)
+C      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), FTEM(*), PAR(*)
+      EXTERNAL FUNC_CHEM, JAC
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(4), TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(3), IERPJ, IDUM2, JCUR, IDUM3(4),
+     5   MITER, IDUM4(4), N, IDUM5(2), NFE, NJE, IDUM6
+C-----------------------------------------------------------------------
+C PREPJ IS CALLED BY STODE TO COMPUTE AND PROCESS THE MATRIX
+C P = I - H*EL(1)*J , WHERE J IS AN APPROXIMATION TO THE JACOBIAN.
+C IF ISOPT = 1, PREPJ IS ALSO CALLED BY SPRIME WITH JOPT = 1.
+C HERE J IS COMPUTED BY THE USER-SUPPLIED ROUTINE JAC IF
+C MITER = 1 OR 4, OR BY FINITE DIFFERENCING IF MITER = 2, 3, OR 5.
+C IF MITER = 3, A DIAGONAL APPROXIMATION TO J IS USED.
+C J IS STORED IN WM AND REPLACED BY P.  IF MITER .NE. 3, P IS THEN
+C SUBJECTED TO LU DECOMPOSITION (JOPT = 0) IN PREPARATION FOR LATER
+C SOLUTION OF LINEAR SYSTEMS WITH P AS COEFFICIENT MATRIX. THIS IS
+C DONE BY DGEFA IF MITER = 1 OR 2, AND BY DGBFA IF MITER = 4 OR 5.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH PREPJ USES THE FOLLOWING..
+C Y     = ARRAY CONTAINING PREDICTED VALUES ON ENTRY.
+C FTEM  = WORK ARRAY OF LENGTH N (ACOR IN STODE).
+C SAVF  = ARRAY CONTAINING F EVALUATED AT PREDICTED Y.
+C WM    = REAL WORK SPACE FOR MATRICES.  ON OUTPUT IT CONTAINS THE
+C         INVERSE DIAGONAL MATRIX IF MITER = 3 AND THE LU DECOMPOSITION
+C         OF P IF MITER IS 1, 2 , 4, OR 5.
+C         STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C         WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C         WM(1) = SQRT(UROUND), USED IN NUMERICAL JACOBIAN INCREMENTS.
+C         WM(2) = H*EL0, SAVED FOR LATER USE IF MITER = 3.
+C IWM   = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C         IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C         PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C EL0   = EL(1) (INPUT).
+C IERPJ = OUTPUT ERROR FLAG,  = 0 IF NO TROUBLE, .GT. 0 IF
+C         P MATRIX FOUND TO BE SINGULAR.
+C JCUR  = OUTPUT FLAG = 1 TO INDICATE THAT THE JACOBIAN MATRIX
+C         (OR APPROXIMATION) IS NOW CURRENT.
+C JOPT  = INPUT JACOBIAN OPTION, = 1 IF JAC IS DESIRED ONLY.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, UROUND,
+C IERPJ, JCUR, MITER, N, NFE, AND NJE.
+C-----------------------------------------------------------------------
+      NJE = NJE + 1
+      IERPJ = 0
+      JCUR = 1
+      HL0 = H*EL0
+      GO TO (100, 200, 300, 400, 500), MITER
+C IF MITER = 1, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+C 100   LENP = N*N
+ 100   LENP = LU_NONZERO
+      DO 110 I = 1,LU_NONZERO
+ 110    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, 0, 0, WM(3), N)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 120 I = 1,LU_NONZERO
+ 120    WM(I+2) = WM(I+2)*CON
+      GO TO 240
+C IF MITER = 2, MAKE N CALLS TO F TO APPROXIMATE J. --------------------
+ 200   FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      SRUR = WM(1)
+      J1 = 2
+      DO 230 J = 1,N
+        YJ = Y(J)
+        R = MAX(SRUR*ABS(YJ),R0/EWT(J))
+        Y(J) = Y(J) + R
+        FAC = -HL0/R
+        CALL FUNC_CHEM (NEQ, TN, Y, PAR, FTEM)
+        DO 220 I = 1,N
+ 220      WM(I+J1) = (FTEM(I) - SAVF(I))*FAC
+        Y(J) = YJ
+        J1 = J1 + N
+ 230    CONTINUE
+      NFE = NFE + N
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 240   J = 3
+C      DO 250 I = 1,N
+C        WM(J) = WM(J) + ONE
+C 250    J = J + (N + 1)
+      DO 250 I = 1,NVAR
+ 250       WM(2+LU_DIAG(I)) = WM(2+LU_DIAG(I)) + ONE
+C DO LU DECOMPOSITION ON P. --------------------------------------------
+C      CALL DGEFA (WM(3), N, N, IWM(21), IER)
+      CALL KppDecomp (WM(3), IER)
+      IF (IER .NE. 0) THEN
+           IERPJ = 1
+	   PRINT*,"Singular Matrix"
+	   STOP
+      END IF
+      RETURN
+C IF MITER = 3, CONSTRUCT A DIAGONAL APPROXIMATION TO J AND P. ---------
+ 300   WM(2) = HL0
+      R = EL0*0.1D0
+      DO 310 I = 1,N
+ 310    Y(I) = Y(I) + R*(H*SAVF(I) - YH(I,2))
+      CALL FUNC_CHEM (NEQ, TN, Y, PAR, WM(3))
+      NFE = NFE + 1
+      DO 320 I = 1,N
+        R0 = H*SAVF(I) - YH(I,2)
+        DI = 0.1D0*R0 - H*(WM(I+2) - SAVF(I))
+        WM(I+2) = 1.0D0
+        IF (ABS(R0) .LT. UROUND/EWT(I)) GO TO 320
+        IF (ABS(DI) .EQ. ZERO) GO TO 330
+        WM(I+2) = 0.1D0*R0/DI
+ 320    CONTINUE
+      RETURN
+ 330   IERPJ = 1
+      RETURN
+C IF MITER = 4, CALL JAC AND MULTIPLY BY SCALAR. -----------------------
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      ML3 = ML + 3
+      MBAND = ML + MU + 1
+      MEBAND = MBAND + ML
+      LENP = MEBAND*N
+      DO 410 I = 1,LENP
+ 410    WM(I+2) = ZERO
+      CALL JAC (NEQ, TN, Y, PAR, ML, MU, WM(ML3), MEBAND)
+      IF (JOPT .EQ. 1) RETURN
+      CON = -HL0
+      DO 420 I = 1,LENP
+ 420    WM(I+2) = WM(I+2)*CON
+      GO TO 570
+C IF MITER = 5, MAKE MBAND CALLS TO F TO APPROXIMATE J. ----------------
+ 500   ML = IWM(1)
+      MU = IWM(2)
+      MBAND = ML + MU + 1
+      MBA = MIN(MBAND,N)
+      MEBAND = MBAND + ML
+      MEB1 = MEBAND - 1
+      SRUR = WM(1)
+      FAC = VNORM (N, SAVF, EWT)
+      R0 = 1000.0D0*ABS(H)*UROUND*REAL(N)*FAC
+      IF (R0 .EQ. ZERO) R0 = ONE
+      DO 560 J = 1,MBA
+        DO 530 I = J,N,MBAND
+          YI = Y(I)
+          R = MAX(SRUR*ABS(YI),R0/EWT(I))
+ 530      Y(I) = Y(I) + R
+        CALL FUNC_CHEM (NEQ, TN, Y, PAR, FTEM)
+        DO 550 JJ = J,N,MBAND
+          Y(JJ) = YH(JJ,1)
+          YJJ = Y(JJ)
+          R = MAX(SRUR*ABS(YJJ),R0/EWT(JJ))
+          FAC = -HL0/R
+          I1 = MAX(JJ-MU,1)
+          I2 = MIN(JJ+ML,N)
+          II = JJ*MEB1 - ML + 2
+          DO 540 I = I1,I2
+ 540        WM(II+I) = (FTEM(I) - SAVF(I))*FAC
+ 550      CONTINUE
+ 560    CONTINUE
+      NFE = NFE + MBA
+      IF (JOPT .EQ. 1) RETURN
+C ADD IDENTITY MATRIX. -------------------------------------------------
+ 570   II = MBAND + 2
+      DO 580 I = 1,N
+        WM(II) = WM(II) + ONE
+ 580    II = II + MEBAND
+C DO LU DECOMPOSITION OF P. --------------------------------------------
+      CALL DGBFA (WM(3), MEBAND, N, ML, MU, IWM(21), IER)
+      IF (IER .NE. 0) IERPJ = 1
+      RETURN
+C----------------------- END OF SUBROUTINE PREPJ -----------------------
+      END
+      SUBROUTINE PREPDF (NEQ, Y, SRUR, SAVF, FTEM, DFDP, PAR,
+     1   F, DF, JPAR)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, DF
+      DIMENSION NEQ(*), Y(*), SAVF(*), FTEM(*), DFDP(*), PAR(*)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   RDUM1(43), TN, RDUM2,
+     2   IOWND1(14), IOWNS(4),
+     3   IDUM1(10), MITER, IDUM2(4), N, IDUM3(2), NFE, IDUM4(2)
+      COMMON /ODE002/ RDUM3(3),
+     1   IOWND2(3), IDUM5(2), NDFE, IDUM6, IDF, IDUM7(3)
+C-----------------------------------------------------------------------
+C PREPDF IS CALLED BY SPRIME AND STESA TO COMPUTE THE INHOMOGENEITY
+C VECTORS DF(I)/DP(JPAR). HERE DF/DP IS COMPUTED BY THE USER-SUPPLIED
+C ROUTINE DF IF IDF = 1, OR BY FINITE DIFFERENCING IF IDF = 0.
+C
+C IN ADDITION TO VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION WITH
+C PREPDF USES THE FOLLOWING..
+C Y     = REAL ARRAY OF LENGTH NYH CONTAINING DEPENDENT VARIABLES.
+C         PREPDF USES ONLY THE FIRST N ENTRIES OF Y(*).
+C SRUR  = SQRT(UROUND) (= WM(1)).
+C SAVF  = REAL ARRAY OF LENGTH N CONTAINING DERIVATIVES DY/DT.
+C FTEM  = REAL ARRAY OF LENGTH N USED TO TEMPORARILY STORE DY/DT FOR
+C         NUMERICAL DIFFERENTIATION.
+C DFDP  = REAL ARRAY OF LENGTH N USED TO STORE DF(I)/DP(JPAR), I = 1,N.
+C PAR   = REAL ARRAY OF LENGTH NPAR CONTAINING EQUATION PARAMETERS
+C         OF INTEREST.
+C JPAR  = INPUT PARAMETER, 2 .LE. JPAR .LE. NSV, DESIGNATING THE
+C         APPROPRIATE SOLUTION VECTOR CORRESPONDING TO PAR(JPAR).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES TN, MITER, N, NFE, NDFE,
+C AND IDF.
+C-----------------------------------------------------------------------
+      NDFE = NDFE + 1
+      IDF1 = IDF + 1
+      GO TO (100, 200), IDF1
+C IDF = 0, CALL F TO APPROXIMATE DFDP. ---------------------------------
+ 100  RPAR = PAR(JPAR)
+      R = MAX(SRUR*ABS(RPAR),SRUR)
+      PAR(JPAR) = RPAR + R
+      FAC = 1.0D0/R
+      CALL F (NEQ, TN, Y, PAR, FTEM)
+      DO 110 I = 1,N
+ 110    DFDP(I) = (FTEM(I) - SAVF(I))*FAC
+      PAR(JPAR) = RPAR
+      NFE = NFE + 1
+      RETURN
+C IDF = 1, CALL USER SUPPLIED DF. --------------------------------------
+ 200  DO 210 I = 1,N
+ 210    DFDP(I) = 0.0D0
+      CALL DF (NEQ, TN, Y, PAR, DFDP, JPAR)
+      RETURN
+C -------------------- END OF SUBROUTINE PREPDF ------------------------
+      END
+      SUBROUTINE INTDY (T, K, YH, NYH, DKY, IFLAG)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION YH(NYH,1), DKY(1)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(38),H, RDUM2(2), HU, RDUM3, TN, UROUND,
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(8), L, IDUM2,
+     5   IDUM3(5), N, NQ, IDUM4(4)
+C-----------------------------------------------------------------------
+C INTDY COMPUTES INTERPOLATED VALUES OF THE K-TH DERIVATIVE OF THE
+C DEPENDENT VARIABLE VECTOR Y, AND STORES IT IN DKY.  THIS ROUTINE
+C IS CALLED WITHIN THE PACKAGE WITH K = 0 AND T = TOUT, BUT MAY
+C ALSO BE CALLED BY THE USER FOR ANY K UP TO THE CURRENT ORDER.
+C (SEE DETAILED INSTRUCTIONS IN THE USAGE DOCUMENTATION.)
+C-----------------------------------------------------------------------
+C THE COMPUTED VALUES IN DKY ARE GOTTEN BY INTERPOLATION USING THE
+C NORDSIECK HISTORY ARRAY YH.  THIS ARRAY CORRESPONDS UNIQUELY TO A
+C VECTOR-VALUED POLYNOMIAL OF DEGREE NQCUR OR LESS, AND DKY IS SET
+C TO THE K-TH DERIVATIVE OF THIS POLYNOMIAL AT T.
+C THE FORMULA FOR DKY IS..
+C             Q
+C  DKY(I)  =  SUM  C(J,K) * (T - TN)**(J-K) * H**(-J) * YH(I,J+1)
+C            J=K
+C WHERE  C(J,K) = J*(J-1)*...*(J-K+1), Q = NQCUR, TN = TCUR, H = HCUR.
+C THE QUANTITIES  NQ = NQCUR, L = NQ+1, N = NEQ, TN, AND H ARE
+C COMMUNICATED BY COMMON.  THE ABOVE SUM IS DONE IN REVERSE ORDER.
+C IFLAG IS RETURNED NEGATIVE IF EITHER K OR T IS OUT OF BOUNDS.
+C-----------------------------------------------------------------------
+      IFLAG = 0
+      IF (K .LT. 0 .OR. K .GT. NQ) GO TO 80
+      TP = TN - HU*(1.0D0 + 100.0D0*UROUND)
+      IF ((T-TP)*(T-TN) .GT. 0.0D0) GO TO 90
+C
+      S = (T - TN)/H
+      IC = 1
+      IF (K .EQ. 0) GO TO 15
+      JJ1 = L - K
+      DO 10 JJ = JJ1,NQ
+ 10     IC = IC*JJ
+ 15   C = REAL(IC)
+      DO 20 I = 1,NYH
+ 20     DKY(I) = C*YH(I,L)
+      IF (K .EQ. NQ) GO TO 55
+      JB2 = NQ - K
+      DO 50 JB = 1,JB2
+        J = NQ - JB
+        JP1 = J + 1
+        IC = 1
+        IF (K .EQ. 0) GO TO 35
+        JJ1 = JP1 - K
+        DO 30 JJ = JJ1,J
+ 30       IC = IC*JJ
+ 35     C = REAL(IC)
+        DO 40 I = 1,NYH
+ 40       DKY(I) = C*YH(I,JP1) + S*DKY(I)
+ 50     CONTINUE
+      IF (K .EQ. 0) RETURN
+ 55   R = H**(-K)
+      DO 60 I = 1,NYH
+ 60     DKY(I) = R*DKY(I)
+      RETURN
+C
+ 80   CALL XERR('INTDY--  K (=I1) ILLEGAL',
+     1  51, 1, 1, K, 0, 0, ZERO,ZERO)
+      IFLAG = -1
+      RETURN
+ 90   CALL XERR ('INTDY--  T (=R1) ILLEGAL',
+     1   52, 1, 0, 0, 0, 1, T, ZERO)
+      CALL XERR('T NOT IN INTERVAL TCUR - HU (= R1) TO TCUR (=R2)',
+     1   52, 1, 0, 0, 0, 2, TP, TN)
+      IFLAG = -2
+      RETURN
+C----------------------- END OF SUBROUTINE INTDY -----------------------
+      END
+      SUBROUTINE STESA (NEQ, Y, NROW, NCOL, YH, WM, IWM, EWT, SAVF,
+     1   ACOR, PAR, NRS, F, JAC, DF, PJAC, PDF, KppSolve)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, KppSolve
+      DIMENSION NEQ(*), Y(NROW,*), YH(NROW,NCOL,*), WM(*), IWM(*),
+     1   EWT(NROW,*), SAVF(*), ACOR(NROW,*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     1   TESCO(3,12), RDUM1, EL0, H, RDUM2(4), TN, RDUM3,
+     2   IOWND1(14), IOWNS(4),
+     3   IALTH, LMAX, IDUM1, IERPJ, IERSL, JCUR, IDUM2, KFLAG, L, IDUM3,
+     4   MITER, IDUM4(4), N, NQ, IDUM5, NFE, IDUM6(2)
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), IDUM7, NSV, IDUM8(2), IDF, IDUM9, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STESA IS CALLED BY STODE TO PERFORM AN EXPLICIT CALCULATION FOR THE
+C FIRST-ORDER SENSITIVITY COEFFICIENTS DY(I)/DP(J), I = 1,N; J = 1,NPAR.
+C
+C IN ADDITION TO THE VARIABLES DESCRIBED PREVIOUSLY, COMMUNICATION
+C WITH STESA USES THE FOLLOWING..
+C Y      = AN NROW (=N) BY NCOL (=NSV) REAL ARRAY CONTAINING THE
+C          CORRECTED DEPENDENT VARIABLES ON OUTPUT..
+C                  Y(I,1) , I = 1,N = STATE VARIABLES (INPUT);
+C                  Y(I,J) , I = 1,N , J = 2,NSV ,
+C                           = SENSITIVITY COEFFICIENTS, DY(I)/DP(J).
+C YH     = AN N BY NSV BY LMAX REAL ARRAY CONTAINING THE PREDICTED
+C          DEPENDENT VARIABLES AND THEIR APPROXIMATE SCALED DERIVATIVES.
+C SAVF   = A REAL ARRAY OF LENGTH N USED TO STORE FIRST DERIVATIVES
+C          OF DEPENDENT VARIABLES IF MITER = 2 OR 5.
+C PAR    = A REAL ARRAY OF LENGTH NPAR CONTAINING THE EQUATION
+C          PARAMETERS OF INTEREST.
+C NRS    = AN INTEGER ARRAY OF LENGTH NPAR + 1 CONTAINING THE NUMBER
+C          OF REPEATED STEPS (KFLAGS .LT. 0) DUE TO THE SENSITIVITY
+C          CALCULATIONS..
+C                  NRS(1) = TOTAL NUMBER OF REPEATED STEPS
+C                  NRS(I) , I = 2,NPAR = NUMBER OF REPEATED STEPS DUE
+C                                        TO PARAMETER I.
+C NSV    = NUMBER OF SOLUTION VECTORS = NPAR + 1.
+C KFLAGS = LOCAL ERROR TEST FLAG, = 0 IF TEST PASSES, .LT. 0 IF TEST
+C          FAILS, AND STEP NEEDS TO BE REPEATED. ERROR TEST IS APPLIED
+C          TO EACH SOLUTION VECTOR INDEPENDENTLY.
+C DUPS, DSMS, DDNS = REAL SCALARS USED FOR COMPUTING RHUP, RHSM, RHDN,
+C                    ON RETURN TO STODE (IALTH .EQ. 1).
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, TN, IALTH, LMAX,
+C IERPJ, IERSL, JCUR, KFLAG, L, MITER, N, NQ, NFE, AND JOPT.
+C-----------------------------------------------------------------------
+      DUPS = ZERO
+      DSMS = ZERO
+      DDNS = ZERO
+      HL0 = H*EL0
+      EL0I = ONE/EL0
+      TI2 = ONE/TESCO(2,NQ)
+      TI3 = ONE/TESCO(3,NQ)
+C IF MITER = 2 OR 5 (OR IDF = 0), SUPPLY DERIVATIVES AT CORRECTED
+C Y(*,1) VALUES FOR NUMERICAL DIFFERENTIATION IN PJAC AND/OR PDF.
+      IF (MITER .EQ. 2  .OR.  MITER .EQ. 5  .OR.  IDF .EQ. 0)  GO TO 10
+      GO TO 15
+ 10   CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+C IF JCUR = 0, UPDATE THE JACOBIAN MATRIX.
+C IF MITER = 5, LOAD CORRECTED Y(*,1) VALUES INTO Y(*,2).
+ 15   IF (JCUR .EQ. 1) GO TO 30
+      IF (MITER .NE. 5) GO TO 25
+      DO 20 I = 1,N
+ 20     Y(I,2) = Y(I,1)
+ 25   CALL PJAC (NEQ, Y, Y(1,2), N, WM, IWM, EWT, SAVF, ACOR(1,2),
+     1   PAR, F, JAC, JOPT)
+      IF (IERPJ .NE. 0) RETURN
+C-----------------------------------------------------------------------
+C THIS IS A LOOPING POINT FOR THE SENSITIVITY CALCULATIONS.
+C-----------------------------------------------------------------------
+C FOR EACH PARAMETER PAR(*), A SENSITIVITY SOLUTION VECTOR IS COMPUTED
+C USING THE SAME STEP SIZE (H) AND ORDER (NQ) AS IN STODE.
+C A LOCAL ERROR TEST IS APPLIED INDEPENDENTLY TO EACH SOLUTION VECTOR.
+C-----------------------------------------------------------------------
+ 30   DO 100 J = 2,NSV
+        JPAR = J - 1
+C EVALUATE INHOMOGENEITY TERM, TEMPORARILY LOAD INTO Y(*,JPAR+1). ------
+        CALL PDF(NEQ, Y, WM, SAVF, ACOR(1,J), Y(1,J), PAR,
+     1     F, DF, JPAR)
+C-----------------------------------------------------------------------
+C LOAD RHS OF SENSITIVITY SOLUTION (CORRECTOR) EQUATION..
+C
+C       RHS = DY/DP - EL(1)*H*D(DY/DP)/DT + EL(1)*H*DF/DP
+C
+C-----------------------------------------------------------------------
+        DO 40 I = 1,N
+ 40       Y(I,J) = YH(I,J,1) - EL0*YH(I,J,2) + HL0*Y(I,J)
+C-----------------------------------------------------------------------
+C KppSolve CORRECTOR EQUATION: THE SOLUTIONS ARE LOCATED IN Y(*,JPAR+1).
+C THE EXPLICIT FORMULA IS..
+C
+C       (I - EL(1)*H*JAC) * DY/DP(CORRECTED) = RHS
+C
+C-----------------------------------------------------------------------
+        CALL KppSolve (WM, IWM, Y(1,J), DUM)
+        IF (IERSL .NE. 0) RETURN
+C ESTIMATE LOCAL TRUNCATION ERROR. -------------------------------------
+        DO 50 I = 1,N
+ 50       ACOR(I,J) = (Y(I,J) - YH(I,J,1))*EL0I
+        ERR = VNORM(N, ACOR(1,J), EWT(1,J))*TI2
+        IF (ERR .GT. ONE) GO TO 200
+C-----------------------------------------------------------------------
+C LOCAL ERROR TEST PASSED. SET KFLAGS TO 0 TO INDICATE THIS.
+C IF IALTH = 1, COMPUTE DSMS, DDNS, AND DUPS (IF L .LT. LMAX).
+C-----------------------------------------------------------------------
+        KFLAGS = 0
+        IF (IALTH .GT. 1) GO TO 100
+        IF (L .EQ. LMAX) GO TO 70
+        DO 60 I= 1,N
+ 60       Y(I,J) = ACOR(I,J) - YH(I,J,LMAX)
+        DUPS = MAX(DUPS,VNORM(N,Y(1,J),EWT(1,J))*TI3)
+ 70     DSMS = MAX(DSMS,ERR)
+ 100  CONTINUE
+      RETURN
+C-----------------------------------------------------------------------
+C THIS SECTION IS REACHED IF THE ERROR TOLERANCE FOR SENSITIVITY
+C SOLUTION VECTOR JPAR HAS BEEN VIOLATED. KFLAGS IS MADE NEGATIVE TO
+C INDICATE THIS. IF KFLAGS = -1, SET KFLAG EQUAL TO ZERO SO THAT KFLAG
+C IS SET TO -1 ON RETURN TO STODE BEFORE REPEATING THE STEP.
+C INCREMENT NRS(1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO ALL
+C SENSITIVITY SOLUTION VECTORS) BY ONE.
+C INCREMENT NRS(JPAR+1) (= TOTAL NUMBER OF REPEATED STEPS DUE TO
+C SOLUTION VECTOR JPAR+1) BY ONE.
+C LOAD DSMS FOR RH CALCULATION IN STODE.
+C-----------------------------------------------------------------------
+ 200  KFLAGS = KFLAGS - 1
+      IF (KFLAGS .EQ. -1) KFLAG = 0
+      NRS(1) = NRS(1) + 1
+      NRS(J) = NRS(J) + 1
+      DSMS = ERR
+      RETURN
+C------------------------ END OF SUBROUTINE STESA ----------------------
+      END
+      SUBROUTINE STODE (NEQ, Y, YH, NYH, YH1, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      EXTERNAL F, JAC, DF, PJAC, PDF, SLVS
+      DIMENSION NEQ(*), Y(*), YH(NYH,*), YH1(*), WM(*), IWM(*), EWT(*),
+     1   SAVF(*), ACOR(*), PAR(*), NRS(*)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+      COMMON /ODE001/ ROWND,
+     1   CONIT, CRATE, EL(13), ELCO(13,12), HOLD, RMAX,
+     2   TESCO(3,12), CCMAX, EL0, H, HMIN, HMXI, HU, RC, TN, UROUND,
+     3   IOWND1(14), IPUP, MEO, NQNYH, NSLP,
+     4   IALTH, LMAX, ICF, IERPJ, IERSL, JCUR, JSTART, KFLAG, L, METH,
+     5   MITER, MAXORD, MAXCOR, MSBP, MXNCF, N, NQ, NST, NFE, NJE, NQU
+      COMMON /ODE002/ DUPS, DSMS, DDNS,
+     1   IOWND2(3), ISOPT, NSV, NDFE, NSPE, IDF, IERSP, JOPT, KFLAGS
+C-----------------------------------------------------------------------
+C STODE PERFORMS ONE STEP OF THE INTEGRATION OF AN INITIAL VALUE
+C PROBLEM FOR A SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS.
+C NOTE.. STODE IS INDEPENDENT OF THE VALUE OF THE ITERATION METHOD
+C INDICATOR MITER, WHEN THIS IS .NE. 0, AND HENCE IS INDEPENDENT
+C OF THE TYPE OF CHORD METHOD USED, OR THE JACOBIAN STRUCTURE.
+C FOR ISOPT = 1, STODE CALLS STESA FOR SENSITIVITY CALCULATIONS.
+C VARIABLES USED FOR COMMUNICATION WITH STESA ARE DESCRIBED IN STESA.
+C COMMUNICATION WITH STODE IS DONE WITH THE FOLLOWING VARIABLES..
+C
+C NEQ   = INTEGER ARRAY CONTAINING PROBLEM SIZE IN NEQ(1), AND
+C         NUMBER OF PARAMETERS TO BE CONSIDERED IN THE SENSITIVITY
+C         ANALYSIS NEQ(2) (FOR ISOPT = 1), AND PASSED AS THE
+C         NEQ ARGUMENT IN ALL CALLS TO F,  JAC, AND DF.
+C Y     = AN ARRAY OF LENGTH .GE. N USED AS THE Y ARGUMENT IN
+C         ALL CALLS TO F, JAC, AND DF.
+C YH    = AN NYH BY LMAX ARRAY CONTAINING THE DEPENDENT VARIABLES
+C         AND THEIR APPROXIMATE SCALED DERIVATIVES, WHERE
+C         LMAX = MAXORD + 1.  YH(I,J+1) CONTAINS THE APPROXIMATE
+C         J-TH DERIVATIVE OF Y(I), SCALED BY H**J/FACTORIAL(J)
+C         (J = 0,1,...,NQ).  ON ENTRY FOR THE FIRST STEP, THE FIRST
+C         TWO COLUMNS OF YH MUST BE SET FROM THE INITIAL VALUES.
+C NYH   = A CONSTANT INTEGER .GE. N, THE FIRST DIMENSION OF YH.
+C         THE TOTAL NUMBER OF FIRST-ORDER DIFFERENTIAL EQUATIONS..
+C         NYH = N, ISOPT = 0,
+C         NYH = N * (NPAR + 1), ISOPT = 1
+C YH1   = A ONE-DIMENSIONAL ARRAY OCCUPYING THE SAME SPACE AS YH.
+C EWT   = AN ARRAY OF LENGTH NYH CONTAINING MULTIPLICATIVE WEIGHTS
+C         FOR LOCAL ERROR MEASUREMENTS.  LOCAL ERRORS IN Y(I) ARE
+C         COMPARED TO 1.0/EWT(I) IN VARIOUS ERROR TESTS.
+C SAVF  = AN ARRAY OF WORKING STORAGE, OF LENGTH N.
+C         ALSO USED FOR INPUT OF YH(*,MAXORD+2) WHEN JSTART = -1
+C         AND MAXORD .LT. THE CURRENT ORDER NQ.
+C ACOR  = A WORK ARRAY OF LENGTH NYH, USED FOR THE ACCUMULATED
+C         CORRECTIONS.  ON A SUCCESSFUL RETURN, ACOR(I) CONTAINS
+C         THE ESTIMATED ONE-STEP LOCAL ERROR IN Y(I).
+C WM,IWM = REAL AND INTEGER WORK ARRAYS ASSOCIATED WITH MATRIX
+C         OPERATIONS IN CHORD ITERATION (MITER .NE. 0).
+C PJAC  = NAME OF ROUTINE TO EVALUATE AND PREPROCESS JACOBIAN MATRIX
+C         AND P = I - H*EL0*JAC, IF A CHORD METHOD IS BEING USED.
+C         IF ISOPT = 1, PJAC CAN BE CALLED TO CALCULATE JAC BY
+C         SETTING JOPT = 1.
+C SLVS  = NAME OF ROUTINE TO KppSolve LINEAR SYSTEM IN CHORD ITERATION.
+C CCMAX  = MAXIMUM RELATIVE CHANGE IN H*EL0 BEFORE PJAC IS CALLED.
+C H     = THE STEP SIZE TO BE ATTEMPTED ON THE NEXT STEP.
+C         H IS ALTERED BY THE ERROR CONTROL ALGORITHM DURING THE
+C         PROBLEM.  H CAN BE EITHER POSITIVE OR NEGATIVE, BUT ITS
+C         SIGN MUST REMAIN CONSTANT THROUGHOUT THE PROBLEM.
+C HMIN  = THE MINIMUM ABSOLUTE VALUE OF THE STEP SIZE H TO BE USED.
+C HMXI  = INVERSE OF THE MAXIMUM ABSOLUTE VALUE OF H TO BE USED.
+C         HMXI = 0.0 IS ALLOWED AND CORRESPONDS TO AN INFINITE HMAX.
+C         HMIN AND HMXI MAY BE CHANGED AT ANY TIME, BUT WILL NOT
+C         TAKE EFFECT UNTIL THE NEXT CHANGE OF H IS CONSIDERED.
+C TN    = THE INDEPENDENT VARIABLE. TN IS UPDATED ON EACH STEP TAKEN.
+C JSTART = AN INTEGER USED FOR INPUT ONLY, WITH THE FOLLOWING
+C         VALUES AND MEANINGS..
+C              0  PERFORM THE FIRST STEP.
+C          .GT.0  TAKE A NEW STEP CONTINUING FROM THE LAST.
+C             -1  TAKE THE NEXT STEP WITH A NEW VALUE OF H, MAXORD,
+C                   N, METH, OR MITER.
+C             -2  TAKE THE NEXT STEP WITH A NEW VALUE OF H,
+C                   BUT WITH OTHER INPUTS UNCHANGED.
+C         ON RETURN, JSTART IS SET TO 1 TO FACILITATE CONTINUATION.
+C KFLAG  = A COMPLETION CODE WITH THE FOLLOWING MEANINGS..
+C              0  THE STEP WAS SUCCESFUL.
+C             -1  THE REQUESTED ERROR COULD NOT BE ACHIEVED.
+C             -2  CORRECTOR CONVERGENCE COULD NOT BE ACHIEVED.
+C             -3  FATAL ERROR IN PJAC, OR SLVS, (OR STESA).
+C         A RETURN WITH KFLAG = -1 OR -2 MEANS EITHER
+C         ABS(H) = HMIN OR 10 CONSECUTIVE FAILURES OCCURRED.
+C         ON A RETURN WITH KFLAG NEGATIVE, THE VALUES OF TN AND
+C         THE YH ARRAY ARE AS OF THE BEGINNING OF THE LAST
+C         STEP, AND H IS THE LAST STEP SIZE ATTEMPTED.
+C MAXORD = THE MAXIMUM ORDER OF INTEGRATION METHOD TO BE ALLOWED.
+C MAXCOR = THE MAXIMUM NUMBER OF CORRECTOR ITERATIONS ALLOWED.
+C          (= 3, IF ISOPT = 0)
+C          (= 4, IF ISOPT = 1)
+C MSBP  = MAXIMUM NUMBER OF STEPS BETWEEN PJAC CALLS (MITER .GT. 0).
+C         IF ISOPT = 1, PJAC IS CALLED AT LEAST ONCE EVERY STEP.
+C MXNCF  = MAXIMUM NUMBER OF CONVERGENCE FAILURES ALLOWED.
+C METH/MITER = THE METHOD FLAGS.  SEE DESCRIPTION IN DRIVER.
+C N     = THE NUMBER OF FIRST-ORDER MODEL DIFFERENTIAL EQUATIONS.
+C-----------------------------------------------------------------------
+      KFLAG = 0
+      KFLAGS = 0
+      TOLD = TN
+      NCF = 0
+      IERPJ = 0
+      IERSL = 0
+      JCUR = 0
+      ICF = 0
+      IF (JSTART .GT. 0) GO TO 200
+      IF (JSTART .EQ. -1) GO TO 100
+      IF (JSTART .EQ. -2) GO TO 160
+C-----------------------------------------------------------------------
+C ON THE FIRST CALL, THE ORDER IS SET TO 1, AND OTHER VARIABLES ARE
+C INITIALIZED.  RMAX IS THE MAXIMUM RATIO BY WHICH H CAN BE INCREASED
+C IN A SINGLE STEP.  IT IS INITIALLY 1.E4 TO COMPENSATE FOR THE SMALL
+C INITIAL H, BUT THEN IS NORMALLY EQUAL TO 10.  IF A FAILURE
+C OCCURS (IN CORRECTOR CONVERGENCE OR ERROR TEST), RMAX IS SET AT 2
+C FOR THE NEXT INCREASE.
+C THESE COMPUTATIONS CONSIDER ONLY THE ORIGINAL SOLUTION VECTOR.
+C THE SENSITIVITY SOLUTION VECTORS ARE CONSIDERED IN STESA (ISOPT = 1).
+C-----------------------------------------------------------------------
+      LMAX = MAXORD + 1
+      NQ = 1
+      L = 2
+      IALTH = 2
+      RMAX = 10000.0D0
+      RC = ZERO
+      EL0 = ONE
+      CRATE = 0.7D0
+      DELP = ZERO
+      HOLD = H
+      MEO = METH
+      NSLP = 0
+      IPUP = MITER
+      IRET = 3
+      GO TO 140
+C-----------------------------------------------------------------------
+C THE FOLLOWING BLOCK HANDLES PRELIMINARIES NEEDED WHEN JSTART = -1.
+C IPUP IS SET TO MITER TO FORCE A MATRIX UPDATE.
+C IF AN ORDER INCREASE IS ABOUT TO BE CONSIDERED (IALTH = 1),
+C IALTH IS RESET TO 2 TO POSTPONE CONSIDERATION ONE MORE STEP.
+C IF THE CALLER HAS CHANGED METH, CFODE IS CALLED TO RESET
+C THE COEFFICIENTS OF THE METHOD.
+C IF THE CALLER HAS CHANGED MAXORD TO A VALUE LESS THAN THE CURRENT
+C ORDER NQ, NQ IS REDUCED TO MAXORD, AND A NEW H CHOSEN ACCORDINGLY.
+C IF H IS TO BE CHANGED, YH MUST BE RESCALED.
+C IF H OR METH IS BEING CHANGED, IALTH IS RESET TO L = NQ + 1
+C TO PREVENT FURTHER CHANGES IN H FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 100   IPUP = MITER
+      LMAX = MAXORD + 1
+      IF (IALTH .EQ. 1) IALTH = 2
+      IF (METH .EQ. MEO) GO TO 110
+      CALL CFODE (METH, ELCO, TESCO)
+      MEO = METH
+      IF (NQ .GT. MAXORD) GO TO 120
+      IALTH = L
+      IRET = 1
+      GO TO 150
+ 110   IF (NQ .LE. MAXORD) GO TO 160
+ 120   NQ = MAXORD
+      L = LMAX
+      DO 125 I = 1,L
+ 125    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      DDN = VNORM (N, SAVF, EWT)/TESCO(1,L)
+      EXDN = ONE/REAL(L)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+      RH = MIN(RHDN,ONE)
+      IREDO = 3
+      IF (H .EQ. HOLD) GO TO 170
+      RH = MIN(RH,ABS(H/HOLD))
+      H = HOLD
+      GO TO 175
+C-----------------------------------------------------------------------
+C CFODE IS CALLED TO GET ALL THE INTEGRATION COEFFICIENTS FOR THE
+C CURRENT METH.  THEN THE EL VECTOR AND RELATED CONSTANTS ARE RESET
+C WHENEVER THE ORDER NQ IS CHANGED, OR AT THE START OF THE PROBLEM.
+C-----------------------------------------------------------------------
+ 140   CALL CFODE (METH, ELCO, TESCO)
+ 150   DO 155 I = 1,L
+ 155    EL(I) = ELCO(I,NQ)
+      NQNYH = NQ*NYH
+      RC = RC*EL(1)/EL0
+      EL0 = EL(1)
+      CONIT = 0.5D0/REAL(NQ+2)
+      GO TO (160, 170, 200), IRET
+C-----------------------------------------------------------------------
+C IF H IS BEING CHANGED, THE H RATIO RH IS CHECKED AGAINST
+C RMAX, HMIN, AND HMXI, AND THE YH ARRAY RESCALED.  IALTH IS SET TO
+C L = NQ + 1 TO PREVENT A CHANGE OF H FOR THAT MANY STEPS, UNLESS
+C FORCED BY A CONVERGENCE OR ERROR TEST FAILURE.
+C-----------------------------------------------------------------------
+ 160  IF (H .EQ. HOLD) GO TO 200
+      RH = H/HOLD
+      H = HOLD
+      IREDO = 3
+      GO TO 175
+ 170   RH = MAX(RH,HMIN/ABS(H))
+ 175   RH = MIN(RH,RMAX)
+      RH = RH/MAX(ONE,ABS(H)*HMXI*RH)
+      R = ONE
+      DO 180 J = 2,L
+        R = R*RH
+        DO 180 I = 1,NYH
+ 180      YH(I,J) = YH(I,J)*R
+      H = H*RH
+      RC = RC*RH
+      IALTH = L
+      IF (IREDO .EQ. 0) GO TO 690
+C-----------------------------------------------------------------------
+C THIS SECTION COMPUTES THE PREDICTED VALUES BY EFFECTIVELY
+C MULTIPLYING THE YH ARRAY BY THE PASCAL TRIANGLE MATRIX.
+C RC IS THE RATIO OF NEW TO OLD VALUES OF THE COEFFICIENT  H*EL(1).
+C WHEN RC DIFFERS FROM 1 BY MORE THAN CCMAX, IPUP IS SET TO MITER
+C TO FORCE PJAC TO BE CALLED, IF A JACOBIAN IS INVOLVED.
+C IN ANY CASE, PJAC IS CALLED AT LEAST EVERY MSBP STEPS FOR ISOPT = 0,
+C AND AT LEAST ONCE EVERY STEP FOR ISOPT = 1.
+C-----------------------------------------------------------------------
+ 200  IF (ABS(RC-ONE) .GT. CCMAX) IPUP = MITER
+      IF (NST .GE. NSLP+MSBP) IPUP = MITER
+      TN = TN + H
+      I1 = NQNYH + 1
+      DO 215 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 210 I = I1,NQNYH
+ 210      YH1(I) = YH1(I) + YH1(I+NYH)
+ 215    CONTINUE
+C-----------------------------------------------------------------------
+C UP TO MAXCOR CORRECTOR ITERATIONS ARE TAKEN.  (= 3, FOR ISOPT = 0;
+C = 4, FOR ISOPT = 1).  A CONVERGENCE TEST IS MADE ON THE R.M.S. NORM
+C OF EACH CORRECTION, WEIGHTED BY THE ERROR WEIGHT VECTOR EWT.  THE SUM
+C OF THE CORRECTIONS IS ACCUMULATED IN THE VECTOR ACOR(I), I = 1,N.
+C (ACOR(I), I = N+1,NYH IS LOADED IN SUBROUTINE STESA (ISOPT = 1).)
+C THE YH ARRAY IS NOT ALTERED IN THE CORRECTOR LOOP.
+C-----------------------------------------------------------------------
+ 220  M = 0
+      DO 230 I = 1,N
+ 230    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (IPUP .LE. 0) GO TO 250
+C-----------------------------------------------------------------------
+C IF INDICATED, THE MATRIX P = I - H*EL(1)*J IS REEVALUATED AND
+C PREPROCESSED BEFORE STARTING THE CORRECTOR ITERATION.  IPUP IS SET
+C TO 0 AS AN INDICATOR THAT THIS HAS BEEN DONE.
+C-----------------------------------------------------------------------
+      IPUP = 0
+      RC = ONE
+      NSLP = NST
+      CRATE = 0.7D0
+      CALL PJAC (NEQ, Y, YH, NYH, WM, IWM, EWT, SAVF, ACOR, PAR,
+     1   F, JAC, JOPT)
+      IF (IERPJ .NE. 0) GO TO 430
+ 250   DO 260 I = 1,N
+ 260    ACOR(I) = ZERO
+ 270   IF (MITER .NE. 0) GO TO 350
+C-----------------------------------------------------------------------
+C IN THE CASE OF FUNCTIONAL ITERATION, UPDATE Y DIRECTLY FROM
+C THE RESULT OF THE LAST FUNCTION EVALUATION.
+C (IF ISOPT = 1, FUNCTIONAL ITERATION IS NOT ALLOWED.)
+C-----------------------------------------------------------------------
+      DO 290 I = 1,N
+        SAVF(I) = H*SAVF(I) - YH(I,2)
+ 290    Y(I) = SAVF(I) - ACOR(I)
+      DEL = VNORM (N, Y, EWT)
+      DO 300 I = 1,N
+        Y(I) = YH(I,1) + EL(1)*SAVF(I)
+ 300    ACOR(I) = SAVF(I)
+      GO TO 400
+C-----------------------------------------------------------------------
+C IN THE CASE OF THE CHORD METHOD, COMPUTE THE CORRECTOR ERROR,
+C AND KppSolve THE LINEAR SYSTEM WITH THAT AS RIGHT-HAND SIDE AND
+C P AS COEFFICIENT MATRIX.
+C-----------------------------------------------------------------------
+ 350   DO 360 I = 1,N
+ 360    Y(I) = H*SAVF(I) - (YH(I,2) + ACOR(I))
+      CALL SLVS (WM, IWM, Y, SAVF)
+      IF (IERSL .LT. 0) GO TO 430
+      IF (IERSL .GT. 0) GO TO 410
+      DEL = VNORM (N, Y, EWT)
+      DO 380 I = 1,N
+        ACOR(I) = ACOR(I) + Y(I)
+ 380    Y(I) = YH(I,1) + EL(1)*ACOR(I)
+C-----------------------------------------------------------------------
+C TEST FOR CONVERGENCE.  IF M.GT.0, AN ESTIMATE OF THE CONVERGENCE
+C RATE CONSTANT IS STORED IN CRATE, AND THIS IS USED IN THE TEST.
+C-----------------------------------------------------------------------
+ 400   IF (M .NE. 0) CRATE = MAX(0.2D0*CRATE,DEL/DELP)
+      DCON = DEL*MIN(ONE,1.5D0*CRATE)/(TESCO(2,NQ)*CONIT)
+      IF (DCON .LE. ONE) GO TO 450
+      M = M + 1
+      IF (M .EQ. MAXCOR) GO TO 410
+      IF (M .GE. 2 .AND. DEL .GT. 2.0D0*DELP) GO TO 410
+      DELP = DEL
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      GO TO 270
+C-----------------------------------------------------------------------
+C THE CORRECTOR ITERATION FAILED TO CONVERGE IN MAXCOR TRIES.
+C IF MITER .NE. 0 AND THE JACOBIAN IS OUT OF DATE, PJAC IS CALLED FOR
+C THE NEXT TRY.  OTHERWISE THE YH ARRAY IS RETRACTED TO ITS VALUES
+C BEFORE PREDICTION, AND H IS REDUCED, IF POSSIBLE.  IF H CANNOT BE
+C REDUCED OR MXNCF FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -2.
+C-----------------------------------------------------------------------
+ 410   IF (MITER .EQ. 0 .OR. JCUR .EQ. 1) GO TO 430
+      ICF = 1
+      IPUP = MITER
+      GO TO 220
+ 430   ICF = 2
+      NCF = NCF + 1
+      RMAX = 2.0D0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 445 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 440 I = I1,NQNYH
+ 440      YH1(I) = YH1(I) - YH1(I+NYH)
+ 445    CONTINUE
+      IF (IERPJ .LT. 0 .OR. IERSL .LT. 0) GO TO 680
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 670
+      IF (NCF .EQ. MXNCF) GO TO 670
+      RH = 0.25D0
+      IPUP = MITER
+      IREDO = 1
+      GO TO 170
+C-----------------------------------------------------------------------
+C THE CORRECTOR HAS CONVERGED.
+C THE LOCAL ERROR TEST IS MADE AND CONTROL PASSES TO STATEMENT 500
+C IF IT FAILS. OTHERWISE, STESA IS CALLED (ISOPT = 1) TO PERFORM
+C SENSITIVITY CALCULATIONS AT CURRENT STEP SIZE AND ORDER.
+C-----------------------------------------------------------------------
+ 450   CONTINUE
+      IF (M .EQ. 0) DSM = DEL/TESCO(2,NQ)
+      IF (M .GT. 0) DSM = VNORM (N, ACOR, EWT)/TESCO(2,NQ)
+      IF (DSM .GT. ONE) GO TO 500
+C
+      IF (ISOPT .EQ. 0) GO TO 460
+C-----------------------------------------------------------------------
+C CALL STESA TO PERFORM EXPLICIT SENSITIVITY ANALYSIS.
+C IF THE LOCAL ERROR TEST FAILS (WITHIN STESA) FOR ANY SOLUTION VECTOR,
+C KFLAGS IS SET .LT. 0 AND CONTROL PASSES TO STATEMENT 500 UPON RETURN.
+C IN EITHER CASE, JCUR IS SET TO ZERO TO SIGNAL THAT THE JACOBIAN MAY
+C NEED UPDATING LATER.
+C-----------------------------------------------------------------------
+      CALL STESA (NEQ, Y, N, NSV, YH, WM, IWM, EWT, SAVF, ACOR,
+     1   PAR, NRS, F, JAC, DF, PJAC, PDF, SLVS)
+      IF (IERPJ .NE. 0 .OR. IERSL .NE. 0) GO TO 680
+      IF (KFLAGS .LT. 0) GO TO 500
+C-----------------------------------------------------------------------
+C AFTER A SUCCESSFUL STEP, UPDATE THE YH ARRAY.
+C CONSIDER CHANGING H IF IALTH = 1.  OTHERWISE DECREASE IALTH BY 1.
+C IF IALTH IS THEN 1 AND NQ .LT. MAXORD, THEN ACOR IS SAVED FOR
+C USE IN A POSSIBLE ORDER INCREASE ON THE NEXT STEP.
+C IF A CHANGE IN H IS CONSIDERED, AN INCREASE OR DECREASE IN ORDER
+C BY ONE IS CONSIDERED ALSO.  A CHANGE IN H IS MADE ONLY IF IT IS BY A
+C FACTOR OF AT LEAST 1.1.  IF NOT, IALTH IS SET TO 3 TO PREVENT
+C TESTING FOR THAT MANY STEPS.
+C-----------------------------------------------------------------------
+ 460   JCUR = 0
+      KFLAG = 0
+      IREDO = 0
+      NST = NST + 1
+      HU = H
+      NQU = NQ
+      DO 470 J = 1,L
+        DO 470 I = 1,NYH
+ 470      YH(I,J) = YH(I,J) + EL(J)*ACOR(I)
+      IALTH = IALTH - 1
+      IF (IALTH .EQ. 0) GO TO 520
+      IF (IALTH .GT. 1) GO TO 700
+      IF (L .EQ. LMAX) GO TO 700
+      DO 490 I = 1,NYH
+ 490    YH(I,LMAX) = ACOR(I)
+      GO TO 700
+C-----------------------------------------------------------------------
+C THE ERROR TEST FAILED IN EITHER STODE OR STESA.
+C KFLAG KEEPS TRACK OF MULTIPLE FAILURES.
+C RESTORE TN AND THE YH ARRAY TO THEIR PREVIOUS VALUES, AND PREPARE
+C TO TRY THE STEP AGAIN.  COMPUTE THE OPTIMUM STEP SIZE FOR THIS OR
+C ONE LOWER ORDER.  AFTER 2 OR MORE FAILURES, H IS FORCED TO DECREASE
+C BY A FACTOR OF 0.2 OR LESS.
+C-----------------------------------------------------------------------
+ 500  KFLAG = KFLAG - 1
+      JCUR = 0
+      TN = TOLD
+      I1 = NQNYH + 1
+      DO 515 JB = 1,NQ
+        I1 = I1 - NYH
+        DO 510 I = I1,NQNYH
+ 510      YH1(I) = YH1(I) - YH1(I+NYH)
+ 515    CONTINUE
+      RMAX = 2.0D0
+      IF (ABS(H) .LE. HMIN*1.00001D0) GO TO 660
+      IF (KFLAG .LE. -3) GO TO 640
+      IREDO = 2
+      RHUP = ZERO
+      GO TO 540
+C-----------------------------------------------------------------------
+*
+C REGARDLESS OF THE SUCCESS OR FAILURE OF THE STEP, FACTORS
+C RHDN, RHSM, AND RHUP ARE COMPUTED, BY WHICH H COULD BE MULTIPLIED
+C AT ORDER NQ - 1, ORDER NQ, OR ORDER NQ + 1, RESPECTIVELY.
+C IN THE CASE OF FAILURE, RHUP = 0.0 TO AVOID AN ORDER INCREASE.
+C THE LARGEST OF THESE IS DETERMINED AND THE NEW ORDER CHOSEN
+C ACCORDINGLY.  IF THE ORDER IS TO BE INCREASED, WE COMPUTE ONE
+C ADDITIONAL SCALED DERIVATIVE.
+C FOR ISOPT = 1, DUPS AND DSMS ARE LOADED WITH THE LARGEST RMS-NORMS
+C OBTAINED BY CONSIDERING SEPARATELY THE SENSITIVITY SOLUTION VECTORS.
+C-----------------------------------------------------------------------
+ 520   RHUP = ZERO
+      IF (L .EQ. LMAX) GO TO 540
+      DO 530 I = 1,N
+ 530    SAVF(I) = ACOR(I) - YH(I,LMAX)
+      DUP = VNORM (N, SAVF, EWT)/TESCO(3,NQ)
+      DUP = MAX(DUP,DUPS)
+      EXUP = ONE/REAL(L+1)
+      RHUP = ONE/(1.4D0*DUP**EXUP + 0.0000014D0)
+ 540   EXSM = ONE/REAL(L)
+      DSM = MAX(DSM,DSMS)
+      RHSM = ONE/(1.2D0*DSM**EXSM + 0.0000012D0)
+      RHDN = ZERO
+      IF (NQ .EQ. 1) GO TO 560
+      JPOINT = 1
+      DO 550 J = 1,NSV
+        DDN = VNORM (N, YH(JPOINT,L), EWT(JPOINT))/TESCO(1,NQ)
+        DDNS = MAX(DDNS,DDN)
+        JPOINT = JPOINT + N
+ 550  CONTINUE
+      DDN = DDNS
+      DDNS = ZERO
+      EXDN = ONE/REAL(NQ)
+      RHDN = ONE/(1.3D0*DDN**EXDN + 0.0000013D0)
+ 560   IF (RHSM .GE. RHUP) GO TO 570
+      IF (RHUP .GT. RHDN) GO TO 590
+      GO TO 580
+ 570   IF (RHSM .LT. RHDN) GO TO 580
+      NEWQ = NQ
+      RH = RHSM
+      GO TO 620
+ 580   NEWQ = NQ - 1
+      RH = RHDN
+      IF (KFLAG .LT. 0 .AND. RH .GT. ONE) RH = ONE
+      GO TO 620
+ 590   NEWQ = L
+      RH = RHUP
+      IF (RH .LT. 1.1D0) GO TO 610
+      R = EL(L)/REAL(L)
+      DO 600 I = 1,NYH
+ 600    YH(I,NEWQ+1) = ACOR(I)*R
+      GO TO 630
+ 610   IALTH = 3
+      GO TO 700
+ 620   IF ((KFLAG .EQ. 0) .AND. (RH .LT. 1.1D0)) GO TO 610
+      IF (KFLAG .LE. -2) RH = MIN(RH,0.2D0)
+C-----------------------------------------------------------------------
+C IF THERE IS A CHANGE OF ORDER, RESET NQ, L, AND THE COEFFICIENTS.
+C IN ANY CASE H IS RESET ACCORDING TO RH AND THE YH ARRAY IS RESCALED.
+C THEN EXIT FROM 690 IF THE STEP WAS OK, OR REDO THE STEP OTHERWISE.
+C-----------------------------------------------------------------------
+      IF (NEWQ .EQ. NQ) GO TO 170
+ 630   NQ = NEWQ
+      L = NQ + 1
+      IRET = 2
+      GO TO 150
+C-----------------------------------------------------------------------
+C CONTROL REACHES THIS SECTION IF 3 OR MORE FAILURES HAVE OCCURED.
+C IF 10 FAILURES HAVE OCCURRED, EXIT WITH KFLAG = -1.
+C IT IS ASSUMED THAT THE DERIVATIVES THAT HAVE ACCUMULATED IN THE
+C YH ARRAY HAVE ERRORS OF THE WRONG ORDER.  HENCE THE FIRST
+C DERIVATIVE IS RECOMPUTED, AND THE ORDER IS SET TO 1.  THEN
+C H IS REDUCED BY A FACTOR OF 10, AND THE STEP IS RETRIED,
+C UNTIL IT SUCCEEDS OR H REACHES HMIN.
+C-----------------------------------------------------------------------
+ 640   IF (KFLAG .EQ. -10) GO TO 660
+      RH = 0.1D0
+      RH = MAX(HMIN/ABS(H),RH)
+      H = H*RH
+      DO 645 I = 1,NYH
+ 645    Y(I) = YH(I,1)
+      CALL F (NEQ, TN, Y, PAR, SAVF)
+      NFE = NFE + 1
+      IF (ISOPT .EQ. 0) GO TO 649
+      CALL SPRIME (NEQ, Y, YH, NYH, N, NSV, WM, IWM, EWT, SAVF, ACOR,
+     1   ACOR(N+1), PAR, F, JAC, DF, PJAC, PDF)
+      IF (IERSP .LT. 0) GO TO 680
+      DO 646 I = N+1,NYH
+ 646    YH(I,2) = H*YH(I,2)
+ 649  DO 650 I = 1,N
+ 650    YH(I,2) = H*SAVF(I)
+      IPUP = MITER
+      IALTH = 5
+      IF (NQ .EQ. 1) GO TO 200
+      NQ = 1
+      L = 2
+      IRET = 3
+      GO TO 150
+C-----------------------------------------------------------------------
+C ALL RETURNS ARE MADE THROUGH THIS SECTION.  H IS SAVED IN HOLD
+C TO ALLOW THE CALLER TO CHANGE H ON THE NEXT STEP.
+C-----------------------------------------------------------------------
+ 660   KFLAG = -1
+      GO TO 720
+ 670   KFLAG = -2
+      GO TO 720
+ 680   KFLAG = -3
+      GO TO 720
+ 690   RMAX = 10.0D0
+ 700   R = ONE/TESCO(2,NQU)
+      DO 710 I = 1,NYH
+ 710    ACOR(I) = ACOR(I)*R
+ 720   HOLD = H
+      JSTART = 1
+      RETURN
+C----------------------- END OF SUBROUTINE STODE -----------------------
+      END
+      SUBROUTINE CFODE (METH, ELCO, TESCO)
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION ELCO(13,12), TESCO(3,12)
+C-----------------------------------------------------------------------
+C CFODE IS CALLED BY THE INTEGRATOR ROUTINE TO SET COEFFICIENTS
+C NEEDED THERE.  THE COEFFICIENTS FOR THE CURRENT METHOD, AS
+C GIVEN BY THE VALUE OF METH, ARE SET FOR ALL ORDERS AND SAVED.
+C THE MAXIMUM ORDER ASSUMED HERE IS 12 IF METH = 1 AND 5 IF METH = 2.
+C (A SMALLER VALUE OF THE MAXIMUM ORDER IS ALSO ALLOWED.)
+C CFODE IS CALLED ONCE AT THE BEGINNING OF THE PROBLEM,
+C AND IS NOT CALLED AGAIN UNLESS AND UNTIL METH IS CHANGED.
+C
+C THE ELCO ARRAY CONTAINS THE BASIC METHOD COEFFICIENTS.
+C THE COEFFICIENTS EL(I), 1 .LE. I .LE. NQ+1, FOR THE METHOD OF
+C ORDER NQ ARE STORED IN ELCO(I,NQ).  THEY ARE GIVEN BY A GENETRATING
+C POLYNOMIAL, I.E.,
+C    L(X) = EL(1) + EL(2)*X + ... + EL(NQ+1)*X**NQ.
+C FOR THE IMPLICIT ADAMS METHODS, L(X) IS GIVEN BY
+C    DL/DX = (X+1)*(X+2)*...*(X+NQ-1)/FACTORIAL(NQ-1),    L(-1) = 0.
+C FOR THE BDF METHODS, L(X) IS GIVEN BY
+C    L(X) = (X+1)*(X+2)* ... *(X+NQ)/K,
+C WHERE        K = FACTORIAL(NQ)*(1 + 1/2 + ... + 1/NQ).
+C
+C THE TESCO ARRAY CONTAINS TEST CONSTANTS USED FOR THE
+C LOCAL ERROR TEST AND THE SELECTION OF STEP SIZE AND/OR ORDER.
+C AT ORDER NQ, TESCO(K,NQ) IS USED FOR THE SELECTION OF STEP
+C SIZE AT ORDER NQ - 1 IF K = 1, AT ORDER NQ IF K = 2, AND AT ORDER
+C NQ + 1 IF K = 3.
+C-----------------------------------------------------------------------
+      DIMENSION PC(12)
+      PARAMETER (ONE=1.0D0,ZERO=0.0D0)
+C
+      GO TO (100, 200), METH
+C
+ 100   ELCO(1,1) = ONE
+      ELCO(2,1) = ONE
+      TESCO(1,1) = ZERO
+      TESCO(2,1) = 2.0D0
+      TESCO(1,2) = ONE
+      TESCO(3,12) = ZERO
+      PC(1) = ONE
+      RQFAC = ONE
+      DO 140 NQ = 2,12
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ-1).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        RQ1FAC = RQFAC
+        RQFAC = RQFAC/REAL(NQ)
+        NQM1 = NQ - 1
+        FNQM1 = REAL(NQM1)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ-1). ----------------------------------
+        PC(NQ) = ZERO
+        DO 110 IB = 1,NQM1
+          I = NQP1 - IB
+ 110      PC(I) = PC(I-1) + FNQM1*PC(I)
+        PC(1) = FNQM1*PC(1)
+C COMPUTE INTEGRAL, -1 TO 0, OF P(X) AND X*P(X). -----------------------
+        PINT = PC(1)
+        XPIN = PC(1)/2.0D0
+        TSIGN = ONE
+        DO 120 I = 2,NQ
+          TSIGN = -TSIGN
+          PINT = PINT + TSIGN*PC(I)/REAL(I)
+ 120      XPIN = XPIN + TSIGN*PC(I)/REAL(I+1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        ELCO(1,NQ) = PINT*RQ1FAC
+        ELCO(2,NQ) = ONE
+        DO 130 I = 2,NQ
+ 130      ELCO(I+1,NQ) = RQ1FAC*PC(I)/REAL(I)
+        AGAMQ = RQFAC*XPIN
+        RAGQ = ONE/AGAMQ
+        TESCO(2,NQ) = RAGQ
+        IF (NQ .LT. 12) TESCO(1,NQP1) = RAGQ*RQFAC/REAL(NQP1)
+        TESCO(3,NQM1) = RAGQ
+ 140    CONTINUE
+      RETURN
+C
+ 200   PC(1) = ONE
+      RQ1FAC = ONE
+      DO 230 NQ = 1,5
+C-----------------------------------------------------------------------
+C THE PC ARRAY WILL CONTAIN THE COEFFICIENTS OF THE POLYNOMIAL
+C    P(X) = (X+1)*(X+2)*...*(X+NQ).
+C INITIALLY, P(X) = 1.
+C-----------------------------------------------------------------------
+        FNQ = REAL(NQ)
+        NQP1 = NQ + 1
+C FORM COEFFICIENTS OF P(X)*(X+NQ). ------------------------------------
+        PC(NQP1) = ZERO
+        DO 210 IB = 1,NQ
+          I = NQ + 2 - IB
+ 210      PC(I) = PC(I-1) + FNQ*PC(I)
+        PC(1) = FNQ*PC(1)
+C STORE COEFFICIENTS IN ELCO AND TESCO. --------------------------------
+        DO 220 I = 1,NQP1
+ 220      ELCO(I,NQ) = PC(I)/PC(2)
+        ELCO(2,NQ) = ONE
+        TESCO(1,NQ) = RQ1FAC
+        TESCO(2,NQ) = REAL(NQP1)/ELCO(1,NQ)
+        TESCO(3,NQ) = REAL(NQ+2)/ELCO(1,NQ)
+        RQ1FAC = RQ1FAC/FNQ
+ 230    CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE CFODE -----------------------
+      END
+      SUBROUTINE SOLSY (WM, IWM, X, TEM)
+C      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      DIMENSION WM(*), IWM(*), X(*), TEM(*)
+      PARAMETER (ZERO=0.0D0,ONE=1.0D0)
+      COMMON /ODE001/ ROWND, ROWNS(173),
+     2   RDUM1(37), EL0, H, RDUM2(6),
+     3   IOWND(14), IOWNS(4),
+     4   IDUM1(4), IERSL, IDUM2(5),
+     5   MITER, IDUM3(4), N, IDUM4(5)
+C-----------------------------------------------------------------------
+C THIS ROUTINE MANAGES THE SOLUTION OF THE LINEAR SYSTEM ARISING FROM
+C A CHORD ITERATION.  IT IS CALLED IF MITER .NE. 0.
+C IF MITER IS 1 OR 2, IT CALLS DGESL TO ACCOMPLISH THIS.
+C IF MITER = 3 IT UPDATES THE COEFFICIENT H*EL0 IN THE DIAGONAL
+C MATRIX, AND THEN COMPUTES THE SOLUTION.
+C IF MITER IS 4 OR 5, IT CALLS DGBSL.
+C COMMUNICATION WITH SOLSY USES THE FOLLOWING VARIABLES..
+C WM   = REAL WORK SPACE CONTAINING THE INVERSE DIAGONAL MATRIX IF
+C        MITER = 3 AND THE LU DECOMPOSITION OF THE MATRIX OTHERWISE.
+C        STORAGE OF MATRIX ELEMENTS STARTS AT WM(3).
+C        WM ALSO CONTAINS THE FOLLOWING MATRIX-RELATED DATA..
+C        WM(1) = SQRT(UROUND) (NOT USED HERE),
+C        WM(2) = HL0, THE PREVIOUS VALUE OF H*EL0, USED IF MITER = 3.
+C IWM  = INTEGER WORK SPACE CONTAINING PIVOT INFORMATION, STARTING AT
+C        IWM(21), IF MITER IS 1, 2, 4, OR 5.  IWM ALSO CONTAINS BAND
+C        PARAMETERS ML = IWM(1) AND MU = IWM(2) IF MITER IS 4 OR 5.
+C X    = THE RIGHT-HAND SIDE VECTOR ON INPUT, AND THE SOLUTION VECTOR
+C        ON OUTPUT, OF LENGTH N.
+C TEM  = VECTOR OF WORK SPACE OF LENGTH N, NOT USED IN THIS VERSION.
+C IERSL = OUTPUT FLAG (IN COMMON).  IERSL = 0 IF NO TROUBLE OCCURRED.
+C        IERSL = 1 IF A SINGULAR MATRIX AROSE WITH MITER = 3.
+C THIS ROUTINE ALSO USES THE COMMON VARIABLES EL0, H, MITER, AND N.
+C-----------------------------------------------------------------------
+      IERSL = 0
+      GO TO (100, 100, 300, 400, 400), MITER
+C 100   CALL DGESL (WM(3), N, N, IWM(21), X, 0)
+ 100   CALL KppSolve (WM(3), X)
+      RETURN
+C
+ 300   PHL0 = WM(2)
+      HL0 = H*EL0
+      WM(2) = HL0
+      IF (HL0 .EQ. PHL0) GO TO 330
+      R = HL0/PHL0
+      DO 320 I = 1,N
+        DI = ONE - R*(ONE - ONE/WM(I+2))
+        IF (ABS(DI) .EQ. ZERO) GO TO 390
+ 320    WM(I+2) = ONE/DI
+ 330   DO 340 I = 1,N
+ 340    X(I) = WM(I+2)*X(I)
+      RETURN
+ 390   IERSL = 1
+      RETURN
+C
+ 400   ML = IWM(1)
+      MU = IWM(2)
+      MEBAND = 2*ML + MU + 1
+      CALL DGBSL (WM(3), MEBAND, N, ML, MU, IWM(21), X, 0)
+      RETURN
+C----------------------- END OF SUBROUTINE SOLSY -----------------------
+      END
+      SUBROUTINE EWSET (N, ITOL, RTOL, ATOL, YCUR, EWT)
+C-----------------------------------------------------------------------
+C THIS SUBROUTINE SETS THE ERROR WEIGHT VECTOR EWT ACCORDING TO
+C    EWT(I) = RTOL(I)*ABS(YCUR(I)) + ATOL(I),  I = 1,...,N,
+C WITH THE SUBSCRIPT ON RTOL AND/OR ATOL POSSIBLY REPLACED BY 1 ABOVE,
+C DEPENDING ON THE VALUE OF ITOL.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RTOL(*), ATOL(*), YCUR(N), EWT(N)
+      RTOLI = RTOL(1)
+      ATOLI = ATOL(1)
+      DO 10 I = 1,N
+        IF (ITOL .GE. 3) RTOLI = RTOL(I)
+        IF (ITOL .EQ. 2 .OR. ITOL .EQ. 4) ATOLI = ATOL(I)
+        EWT(I) = RTOLI*ABS(YCUR(I)) + ATOLI
+ 10     CONTINUE
+      RETURN
+C----------------------- END OF SUBROUTINE EWSET -----------------------
+      END
+      DOUBLE PRECISION FUNCTION VNORM (N, V, W)
+C-----------------------------------------------------------------------
+C THIS FUNCTION ROUTINE COMPUTES THE WEIGHTED ROOT-MEAN-SQUARE NORM
+C OF THE VECTOR OF LENGTH N CONTAINED IN THE ARRAY V, WITH WEIGHTS
+C CONTAINED IN THE ARRAY W OF LENGTH N..
+C  VNORM = SQRT( (1/N) * SUM( V(I)*W(I) )**2 )
+C PROTECTION FOR UNDERFLOW/OVERFLOW IS ACCOMPLISHED USING TWO
+C CONSTANTS WHICH ARE HOPEFULLY APPLICABLE FOR ALL MACHINES.
+C THESE ARE:
+C     CUTLO = maximum of SQRT(U/EPS)  over all known machines
+C     CUTHI = minimum of SQRT(Z)      over all known machines
+C WHERE
+C     EPS = smallest number s.t. EPS + 1 .GT. 1
+C     U   = smallest positive number (underflow limit)
+C     Z   = largest number (overflow limit)
+C
+C DETAILS OF THE ALGORITHM AND OF VALUES OF CUTLO AND CUTHI ARE
+C FOUND IN THE BLAS ROUTINE SNRM2 (SEE ALSO ALGORITHM 539, TRANS.
+C MATH. SOFTWARE, VOL. 5 NO. 3, 1979, 308-323.
+C FOR SINGLE PRECISION, THE FOLLOWING VALUES SHOULD BE UNIVERSAL:
+C     DATA CUTLO,CUTHI /4.441E-16,1.304E19/
+C FOR DOUBLE PRECISION, USE
+C     DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+C
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      INTEGER NEXT,I,J,N
+      DIMENSION V(N),W(N)
+      DATA CUTLO,CUTHI /8.232D-11,1.304D19/
+      DATA ZERO,ONE/0.0D0,1.0D0/
+C  BLAS ALGORITHM
+      NEXT = 1
+      SUM = ZERO
+      I = 1
+20    SX = V(I)*W(I)
+      GO TO (30,40,70,80),NEXT
+30    IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 2
+      XMAX = ZERO
+40    IF (SX.EQ.ZERO) GO TO 130
+      IF (ABS(SX).GT.CUTLO) GO TO 110
+      NEXT = 3
+      GO TO 60
+50    I=J
+      NEXT = 4
+      SUM = (SUM/SX)/SX
+60    XMAX = ABS(SX)
+      GO TO 90
+70    IF(ABS(SX).GT.CUTLO) GO TO 100
+80    IF(ABS(SX).LE.XMAX) GO TO 90
+      SUM = ONE + SUM * (XMAX/SX)**2
+      XMAX = ABS(SX)
+      GO TO 130
+90    SUM = SUM + (SX/XMAX)**2
+      GO TO 130
+100   SUM = (SUM*XMAX)*XMAX
+110   HITEST = CUTHI/REAL(N)
+      DO 120 J = I,N
+         SX = V(J)*W(J)
+         IF(ABS(SX).GE.HITEST) GO TO 50
+         SUM = SUM + SX**2
+120   CONTINUE
+      VNORM = SQRT(SUM)
+      GO TO 140
+130   CONTINUE
+      I = I + 1
+      IF (I.LE.N) GO TO 20
+      VNORM = XMAX * SQRT(SUM)
+140   CONTINUE
+      RETURN
+C----------------------- END OF FUNCTION VNORM -------------------------
+      END
+      SUBROUTINE SVCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE STORES IN RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSA
+C PACKAGE.
+C RSAV = REAL ARRAY OF LENGTH 222 OR MORE.
+C ISAV = INTEGER ARRAY OF LENGTH 52 OR MORE.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RSAV(I) = RODE1(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RSAV(J) = RODE2(I)
+      DO 30 I = 1,LIODE1
+ 30     ISAV(I) = IODE1(I)
+      DO 40 I = 1,LIODE2
+        J = LIODE1 + I
+ 40     ISAV(J) = IODE2(I)
+      ISAV(LIODE1+LIODE2+1) = IEH(1)
+      ISAV(LIODE1+LIODE2+2) = IEH(2)
+      RETURN
+C----------------------- END OF SUBROUTINE SVCOM -----------------------
+      END
+      SUBROUTINE RSCOM (RSAV, ISAV)
+C-----------------------------------------------------------------------
+C THIS ROUTINE RESTORES FROM RSAV AND ISAV THE CONTENTS OF COMMON BLOCKS
+C ODE001, ODE002 AND EH0001, WHICH ARE USED INTERNALLY IN THE ODESSSA
+C PACKAGE.  THIS PRESUMES THAT RSAV AND ISAV WERE LOADED BY MEANS
+C OF SUBROUTINE SVCOM OR THE EQUIVALENT.
+C-----------------------------------------------------------------------
+      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+      DIMENSION RSAV(*), ISAV(*)
+      COMMON /ODE001/ RODE1(219), IODE1(39)
+      COMMON /ODE002/ RODE2(3), IODE2(11)
+      COMMON /EH0001/ IEH(2)
+      DATA LRODE1/219/, LIODE1/39/, LRODE2/3/, LIODE2/11/
+C
+      DO 10 I = 1,LRODE1
+ 10     RODE1(I) = RSAV(I)
+      DO 20 I = 1,LRODE2
+        J = LRODE1 + I
+ 20     RODE2(I) = RSAV(J)
+      DO 30 I = 1,LIODE1
+ 30     IODE1(I) = ISAV(I)
+      DO 40 I = 1,LODE2
+        J = LIODE1 + I
+ 40     IODE2(I) = ISAV(J)
+      IEH(1) = ISAV(LIODE1+LIODE2+1)
+      IEH(2) = ISAV(LIODE1+LIODE2+2)
+      RETURN
+C----------------------- END OF SUBROUTINE RSCOM -----------------------
+      END
+      SUBROUTINE DGEFA(A,LDA,N,IPVT,INFO)
+      INTEGER LDA,N,IPVT(*),INFO
+      DOUBLE PRECISION A(LDA,*)
+C
+C    DGEFA FACTORS A DOUBLE PRECISION MATRIX BY GAUSSIAN ELIMINATION.
+C
+C    DGEFA IS USUALLY CALLED BY DGECO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C    (TIME FOR DGECO) = (1 + 9/N)*(TIME FOR DGEFA) .
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE MATRIX TO BE FACTORED.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C    ON RETURN
+C
+C       A       AN UPPER TRIANGULAR MATRIX AND THE MULTIPLIERS
+C               WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGESL OR DGEDI WILL DIVIDE BY ZERO
+C                    IF CALLED.  USE  RCOND  IN DGECO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER IDAMAX,J,K,KP1,L,NM1
+C
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      INFO = 0
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 70
+      DO 60 K = 1, NM1
+         KP1 = K + 1
+C
+C        FIND L = PIVOT INDEX
+C
+         L = IDAMAX(N-K+1,A(K,K),1) + K - 1
+         IPVT(K) = L
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (A(L,K) .EQ. 0.0D0) GO TO 40
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. K) GO TO 10
+               T = A(L,K)
+               A(L,K) = A(K,K)
+               A(K,K) = T
+  10        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T  = -1.0D0/A(K,K)
+            CALL DSCAL(N-K,T,A(K+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            DO 30 J = KP1, N
+               T = A(L,J)
+               IF (L .EQ. K) GO TO 20
+                  A(L,J) = A(K,J)
+                  A(K,J) = T
+  20           CONTINUE
+               CALL DAXPY(N-K,T,A(K+1,K),1,A(K+1,J),1)
+  30        CONTINUE
+         GO TO 50
+  40     CONTINUE
+            INFO = K
+  50     CONTINUE
+  60  CONTINUE
+  70  CONTINUE
+      IPVT(N) = N
+      IF (A(N,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGESL(A,LDA,N,IPVT,B,JOB)
+      INTEGER LDA,N,IPVT(*),JOB
+      DOUBLE PRECISION A(LDA,*),B(*)
+C
+C     DGESL KppSolveS THE DOUBLE PRECISION SYSTEM
+C     A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGECO OR DGEFA.
+C
+C    ON ENTRY
+C
+C       A       DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGECO OR DGEFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  A .
+C
+C       N       INTEGER
+C               THE ORDER OF THE MATRIX  A .
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGECO OR DGEFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B  WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGECO HAS SET RCOND .GT. 0.0
+C       OR DGEFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGECO(A,LDA,N,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGESL(A,LDA,N,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,NM1
+C
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve  L*Y = B
+C
+         IF (NM1 .LT. 1) GO TO 30
+         DO 20 K = 1, NM1
+            L = IPVT(K)
+            T = B(L)
+            IF (L .EQ. K) GO TO 10
+               B(L) = B(K)
+               B(K) = T
+  10        CONTINUE
+            CALL DAXPY(N-K,T,A(K+1,K),1,B(K+1),1)
+  20     CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/A(K,K)
+            T = -B(K)
+            CALL DAXPY(K-1,T,A(1,K),1,B(1),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            T = DDOT(K-1,A(1,K),1,B(1),1)
+            B(K) = (B(K) - T)/A(K,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (NM1 .LT. 1) GO TO 90
+         DO 80 KB = 1, NM1
+            K = N - KB
+            B(K) = B(K) + DDOT(N-K,A(K+1,K),1,B(K+1),1)
+            L = IPVT(K)
+            IF (L .EQ. K) GO TO 70
+               T = B(L)
+               B(L) = B(K)
+               B(K) = T
+  70        CONTINUE
+  80     CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DGBFA(ABD,LDA,N,ML,MU,IPVT,INFO)
+      INTEGER LDA,N,ML,MU,IPVT(*),INFO
+      DOUBLE PRECISION ABD(LDA,*)
+C
+C    DGBFA FACTORS A DOUBLE PRECISION BAND MATRIX BY ELIMINATION.
+C
+C    DGBFA IS USUALLY CALLED BY DGBCO, BUT IT CAN BE CALLED
+C    DIRECTLY WITH A SAVING IN TIME IF  RCOND  IS NOT NEEDED.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               CONTAINS THE MATRIX IN BAND STORAGE.  THE COLUMNS
+C               OF THE MATRIX ARE STORED IN THE COLUMNS OF  ABD  AND
+C               THE DIAGONALS OF THE MATRIX ARE STORED IN ROWS
+C               ML+1 THROUGH 2*ML+MU+1 OF  ABD .
+C               SEE THE COMMENTS BELOW FOR DETAILS.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C               LDA MUST BE .GE. 2*ML + MU + 1 .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C               0 .LE. ML .LT. N .
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C               0 .LE. MU .LT. N .
+C               MORE EFFICIENT IF  ML .LE. MU .
+C    ON RETURN
+C
+C       ABD     AN UPPER TRIANGULAR MATRIX IN BAND STORAGE AND
+C               THE MULTIPLIERS WHICH WERE USED TO OBTAIN IT.
+C               THE FACTORIZATION CAN BE WRITTEN  A = L*U  WHERE
+C               L  IS A PRODUCT OF PERMUTATION AND UNIT LOWER
+C               TRIANGULAR MATRICES AND  U  IS UPPER TRIANGULAR.
+C
+C       IPVT    INTEGER(N)
+C               AN INTEGER VECTOR OF PIVOT INDICES.
+C
+C       INFO    INTEGER
+C               = 0  NORMAL VALUE.
+C               = K  IF  U(K,K) .EQ. 0.0 .  THIS IS NOT AN ERROR
+C                    CONDITION FOR THIS SUBROUTINE, BUT IT DOES
+C                    INDICATE THAT DGBSL WILL DIVIDE BY ZERO IF
+C                    CALLED.  USE  RCOND  IN DGBCO FOR A RELIABLE
+C                    INDICATION OF SINGULARITY.
+C
+C    BAND STORAGE
+C
+C          IF  A  IS A BAND MATRIX, THE FOLLOWING PROGRAM SEGMENT
+C          WILL SET UP THE INPUT.
+C
+C                  ML = (BAND WIDTH BELOW THE DIAGONAL)
+C                  MU = (BAND WIDTH ABOVE THE DIAGONAL)
+C                  M = ML + MU + 1
+C                  DO 20 J = 1, N
+C                     I1 = MAX0(1, J-MU)
+C                     I2 = MIN0(N, J+ML)
+C                     DO 10 I = I1, I2
+C                        K = I - J + M
+C                        ABD(K,J) = A(I,J)
+C               10    CONTINUE
+C               20 CONTINUE
+C
+C          THIS USES ROWS  ML+1  THROUGH  2*ML+MU+1  OF  ABD .
+C          IN ADDITION, THE FIRST  ML  ROWS IN  ABD  ARE USED FOR
+C          ELEMENTS GENERATED DURING THE TRIANGULARIZATION.
+C          THE TOTAL NUMBER OF ROWS NEEDED IN  ABD  IS  2*ML+MU+1 .
+C          THE  ML+MU BY ML+MU  UPPER LEFT TRIANGLE AND THE
+C          ML BY ML  LOWER RIGHT TRIANGLE ARE NOT REFERENCED.
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DSCAL,IDAMAX
+C    FORTRAN MAX0,MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION T
+      INTEGER I,IDAMAX,I0,J,JU,JZ,J0,J1,K,KP1,L,LM,M,MM,NM1
+C
+C
+      M = ML + MU + 1
+      INFO = 0
+C
+C     ZERO INITIAL FILL-IN COLUMNS
+C
+      J0 = MU + 2
+      J1 = MIN0(N,M) - 1
+      IF (J1 .LT. J0) GO TO 30
+      DO 20 JZ = J0, J1
+         I0 = M + 1 - JZ
+         DO 10 I = I0, ML
+            ABD(I,JZ) = 0.0D0
+  10     CONTINUE
+  20  CONTINUE
+  30  CONTINUE
+      JZ = J1
+      JU = 0
+C
+C     GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING
+C
+      NM1 = N - 1
+      IF (NM1 .LT. 1) GO TO 130
+      DO 120 K = 1, NM1
+         KP1 = K + 1
+C
+C        ZERO NEXT FILL-IN COLUMN
+C
+         JZ = JZ + 1
+         IF (JZ .GT. N) GO TO 50
+         IF (ML .LT. 1) GO TO 50
+            DO 40 I = 1, ML
+               ABD(I,JZ) = 0.0D0
+  40        CONTINUE
+  50     CONTINUE
+C
+C        FIND L = PIVOT INDEX
+C
+         LM = MIN0(ML,N-K)
+         L = IDAMAX(LM+1,ABD(M,K),1) + M - 1
+         IPVT(K) = L + K - M
+C
+C        ZERO PIVOT IMPLIES THIS COLUMN ALREADY TRIANGULARIZED
+C
+         IF (ABD(L,K) .EQ. 0.0D0) GO TO 100
+C
+C           INTERCHANGE IF NECESSARY
+C
+            IF (L .EQ. M) GO TO 60
+               T = ABD(L,K)
+               ABD(L,K) = ABD(M,K)
+               ABD(M,K) = T
+  60        CONTINUE
+C
+C           COMPUTE MULTIPLIERS
+C
+            T = -1.0D0/ABD(M,K)
+            CALL DSCAL(LM,T,ABD(M+1,K),1)
+C
+C           ROW ELIMINATION WITH COLUMN INDEXING
+C
+            JU = MIN0(MAX0(JU,MU+IPVT(K)),N)
+            MM = M
+            IF (JU .LT. KP1) GO TO 90
+            DO 80 J = KP1, JU
+               L = L - 1
+               MM = MM - 1
+               T = ABD(L,J)
+               IF (L .EQ. MM) GO TO 70
+                  ABD(L,J) = ABD(MM,J)
+                  ABD(MM,J) = T
+  70           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,ABD(MM+1,J),1)
+  80        CONTINUE
+  90        CONTINUE
+         GO TO 110
+  100    CONTINUE
+            INFO = K
+  110    CONTINUE
+  120  CONTINUE
+  130  CONTINUE
+      IPVT(N) = N
+      IF (ABD(M,N) .EQ. 0.0D0) INFO = N
+      RETURN
+      END
+      SUBROUTINE DGBSL(ABD,LDA,N,ML,MU,IPVT,B,JOB)
+      INTEGER LDA,N,ML,MU,IPVT(*),JOB
+      DOUBLE PRECISION ABD(LDA,*),B(*)
+C
+C    DGBSL KppSolveS THE DOUBLE PRECISION BAND SYSTEM
+C    A * X = B  OR  TRANS(A) * X = B
+C    USING THE FACTORS COMPUTED BY DGBCO OR DGBFA.
+C
+C    ON ENTRY
+C
+C       ABD     DOUBLE PRECISION(LDA, N)
+C               THE OUTPUT FROM DGBCO OR DGBFA.
+C
+C       LDA     INTEGER
+C               THE LEADING DIMENSION OF THE ARRAY  ABD .
+C
+C       N       INTEGER
+C               THE ORDER OF THE ORIGINAL MATRIX.
+C
+C       ML      INTEGER
+C               NUMBER OF DIAGONALS BELOW THE MAIN DIAGONAL.
+C
+C       MU      INTEGER
+C               NUMBER OF DIAGONALS ABOVE THE MAIN DIAGONAL.
+C
+C       IPVT    INTEGER(N)
+C               THE PIVOT VECTOR FROM DGBCO OR DGBFA.
+C
+C       B       DOUBLE PRECISION(N)
+C               THE RIGHT HAND SIDE VECTOR.
+C
+C       JOB     INTEGER
+C               = 0         TO KppSolve  A*X = B ,
+C               = NONZERO   TO KppSolve  TRANS(A)*X = B , WHERE
+C                           TRANS(A)  IS THE TRANSPOSE.
+C
+C    ON RETURN
+C
+C       B       THE SOLUTION VECTOR  X .
+C
+C    ERROR CONDITION
+C
+C       A DIVISION BY ZERO WILL OCCUR IF THE INPUT FACTOR CONTAINS A
+C       ZERO ON THE DIAGONAL.  TECHNICALLY THIS INDICATES SINGULARITY
+C       BUT IT IS OFTEN CAUSED BY IMPROPER ARGUMENTS OR IMPROPER
+C       SETTING OF LDA .  IT WILL NOT OCCUR IF THE SUBROUTINES ARE
+C       CALLED CORRECTLY AND IF DGBCO HAS SET RCOND .GT. 0.0
+C       OR DGBFA HAS SET INFO .EQ. 0 .
+C
+C    TO COMPUTE  INVERSE(A) * C  WHERE  C  IS A MATRIX
+C    WITH  P  COLUMNS
+C          CALL DGBCO(ABD,LDA,N,ML,MU,IPVT,RCOND,Z)
+C          IF (RCOND IS TOO SMALL) GO TO ...
+C          DO 10 J = 1, P
+C             CALL DGBSL(ABD,LDA,N,ML,MU,IPVT,C(1,J),0)
+C       10 CONTINUE
+C
+C    LINPACK. THIS VERSION DATED 08/14/78 .
+C    CLEVE MOLER, UNIVERSITY OF NEW MEXICO, ARGONNE NATIONAL LAB.
+C
+C    SUBROUTINES AND FUNCTIONS
+C
+C    BLAS DAXPY,DDOT
+C    FORTRAN MIN0
+C
+C    INTERNAL VARIABLES
+C
+      DOUBLE PRECISION DDOT,T
+      INTEGER K,KB,L,LA,LB,LM,M,NM1
+C
+      M = MU + ML + 1
+      NM1 = N - 1
+      IF (JOB .NE. 0) GO TO 50
+C
+C        JOB = 0 , KppSolve  A * X = B
+C        FIRST KppSolve L*Y = B
+C
+         IF (ML .EQ. 0) GO TO 30
+         IF (NM1 .LT. 1) GO TO 30
+            DO 20 K = 1, NM1
+               LM = MIN0(ML,N-K)
+               L = IPVT(K)
+               T = B(L)
+               IF (L .EQ. K) GO TO 10
+                  B(L) = B(K)
+                  B(K) = T
+  10           CONTINUE
+               CALL DAXPY(LM,T,ABD(M+1,K),1,B(K+1),1)
+  20        CONTINUE
+  30     CONTINUE
+C
+C        NOW KppSolve  U*X = Y
+C
+         DO 40 KB = 1, N
+            K = N + 1 - KB
+            B(K) = B(K)/ABD(M,K)
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = -B(K)
+            CALL DAXPY(LM,T,ABD(LA,K),1,B(LB),1)
+  40     CONTINUE
+      GO TO 100
+  50  CONTINUE
+C
+C        JOB = NONZERO, KppSolve  TRANS(A) * X = B
+C        FIRST KppSolve  TRANS(U)*Y = B
+C
+         DO 60 K = 1, N
+            LM = MIN0(K,M) - 1
+            LA = M - LM
+            LB = K - LM
+            T = DDOT(LM,ABD(LA,K),1,B(LB),1)
+            B(K) = (B(K) - T)/ABD(M,K)
+  60     CONTINUE
+C
+C        NOW KppSolve TRANS(L)*X = Y
+C
+         IF (ML .EQ. 0) GO TO 90
+         IF (NM1 .LT. 1) GO TO 90
+            DO 80 KB = 1, NM1
+               K = N - KB
+               LM = MIN0(ML,N-K)
+               B(K) = B(K) + DDOT(LM,ABD(M+1,K),1,B(K+1),1)
+               L = IPVT(K)
+               IF (L .EQ. K) GO TO 70
+                  T = B(L)
+                  B(L) = B(K)
+                  B(K) = T
+  70           CONTINUE
+  80        CONTINUE
+  90     CONTINUE
+  100  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY)
+C
+C     CONSTANT TIMES A VECTOR PLUS A VECTOR.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DA
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      IF(N.LE.0)RETURN
+      IF (DA .EQ. 0.0D0) RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DY(IY) = DY(IY) + DA*DX(IX)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,4)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DY(I) = DY(I) + DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 4 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,4
+        DY(I) = DY(I) + DA*DX(I)
+        DY(I + 1) = DY(I + 1) + DA*DX(I + 1)
+        DY(I + 2) = DY(I + 2) + DA*DX(I + 2)
+        DY(I + 3) = DY(I + 3) + DA*DX(I + 3)
+  50  CONTINUE
+      RETURN
+      END
+      SUBROUTINE DSCAL(N,DA,DX,INCX)
+C
+C     SCALES A VECTOR BY A CONSTANT.
+C     USES UNROLLED LOOPS FOR INCREMENT EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DA,DX(*)
+      INTEGER I,INCX,M,MP1,N,NINCX
+C
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+*
+C
+      NINCX = N*INCX
+      DO 10 I = 1,NINCX,INCX
+        DX(I) = DA*DX(I)
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DX(I) = DA*DX(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) RETURN
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DX(I) = DA*DX(I)
+        DX(I + 1) = DA*DX(I + 1)
+        DX(I + 2) = DA*DX(I + 2)
+        DX(I + 3) = DA*DX(I + 3)
+        DX(I + 4) = DA*DX(I + 4)
+  50  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY)
+C
+C     FORMS THE DOT PRODUCT OF TWO VECTORS.
+C     USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DY(*),DTEMP
+      INTEGER I,INCX,INCY,IX,IY,M,MP1,N
+C
+      DDOT = 0.0D0
+      DTEMP = 0.0D0
+      IF(N.LE.0)RETURN
+      IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20
+C
+C        CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS
+C          NOT EQUAL TO 1
+C
+      IX = 1
+      IY = 1
+      IF(INCX.LT.0)IX = (-N+1)*INCX + 1
+      IF(INCY.LT.0)IY = (-N+1)*INCY + 1
+      DO 10 I = 1,N
+        DTEMP = DTEMP + DX(IX)*DY(IY)
+        IX = IX + INCX
+        IY = IY + INCY
+  10  CONTINUE
+      DDOT = DTEMP
+      RETURN
+C
+C        CODE FOR BOTH INCREMENTS EQUAL TO 1
+C
+C
+C        CLEAN-UP LOOP
+C
+  20  M = MOD(N,5)
+      IF( M .EQ. 0 ) GO TO 40
+      DO 30 I = 1,M
+        DTEMP = DTEMP + DX(I)*DY(I)
+  30  CONTINUE
+      IF( N .LT. 5 ) GO TO 60
+  40  MP1 = M + 1
+      DO 50 I = MP1,N,5
+        DTEMP = DTEMP + DX(I)*DY(I) + DX(I + 1)*DY(I + 1) +
+     *   DX(I + 2)*DY(I + 2) + DX(I + 3)*DY(I + 3) + DX(I + 4)*DY(I + 4)
+  50  CONTINUE
+  60  DDOT = DTEMP
+      RETURN
+      END
+      INTEGER FUNCTION IDAMAX(N,DX,INCX)
+C
+C     FINDS THE INDEX OF ELEMENT HAVING MAX. ABSOLUTE VALUE.
+C     JACK DONGARRA, LINPACK, 3/11/78.
+C
+      DOUBLE PRECISION DX(*),DMAX
+      INTEGER I,INCX,IX,N
+C
+      IDAMAX = 0
+      IF( N .LT. 1 ) RETURN
+      IDAMAX = 1
+      IF(N.EQ.1)RETURN
+      IF(INCX.EQ.1)GO TO 20
+C
+C        CODE FOR INCREMENT NOT EQUAL TO 1
+C
+      IX = 1
+      DMAX = DABS(DX(1))
+      IX = IX + INCX
+      DO 10 I = 2,N
+         IF(DABS(DX(IX)).LE.DMAX) GO TO 5
+         IDAMAX = I
+         DMAX = DABS(DX(IX))
+   5     IX = IX + INCX
+  10  CONTINUE
+      RETURN
+C
+C        CODE FOR INCREMENT EQUAL TO 1
+C
+  20  DMAX = DABS(DX(1))
+      DO 30 I = 2,N
+         IF(DABS(DX(I)).LE.DMAX) GO TO 30
+         IDAMAX = I
+         DMAX = DABS(DX(I))
+  30  CONTINUE
+      RETURN
+      END
+      DOUBLE PRECISION FUNCTION D1MACH (IDUM)
+      INTEGER IDUM
+C-----------------------------------------------------------------------
+C THIS ROUTINE COMPUTES THE UNIT ROUNDOFF OF THE MACHINE IN DOUBLE
+C PRECISION.  THIS IS DEFINED AS THE SMALLEST POSITIVE MACHINE NUMBER
+C U SUCH THAT  1.0D0 + U .NE. 1.0D0 (IN DOUBLE PRECISION).
+C-----------------------------------------------------------------------
+      DOUBLE PRECISION U, COMP
+      U = 1.0D0
+ 10   U = U*0.5D0
+      COMP = 1.0D0 + U
+      IF (COMP .NE. 1.0D0) GO TO 10
+      D1MACH = U*2.0D0
+      RETURN
+C----------------------- END OF FUNCTION D1MACH ------------------------
+      END
+      SUBROUTINE XERR (MSG, NERR, IERT, NI, I1, I2, NR, R1, R2)
+      INTEGER NERR, IERT, NI, I1, I2, NR,
+     1   LUN, LUNIT, MESFLG
+      DOUBLE PRECISION R1, R2
+      CHARACTER*(*) MSG
+C-------------------------------------------------------------------
+C
+C ALL ARGUMENTS ARE INPUT ARGUMENTS.
+C
+C MSG   = THE MESSAGE (CHARACTER VARIABLE)
+C NERR  = THE ERROR NUMBER (NOT USED).
+C IERT  = THE ERROR TYPE..
+C         1 MEANS RECOVERABLE (CONTROL RETURNS TO CALLER).
+C         2 MEANS FATAL (RUN IS ABORTED--SEE NOTE BELOW).
+C NI    = NUMBER OF INTEGERS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C I1,I2  = INTEGERS TO BE PRINTED, DEPENDING ON NI.
+C NR    = NUMBER OF REALS (0, 1, OR 2) TO BE PRINTED WITH MESSAGE.
+C R1,R2  = REALS TO BE PRINTED, DEPENDING ON NR.
+C
+C  NOTES:
+C 1. THE DIMENSION OF MSG IS ASSUMED TO BE AT MOST 60.
+C   (MULTI-LINE MESSAGES ARE GENERATED BY REPEATED CALLS.)
+C 2. IF IERT = 2, CONTROL PASSES TO THE STATEMENT  STOP
+C   TO ABORT THE RUN.  THIS STATEMENT MAY BE MACHINE-DEPENDENT.
+C 3. R1 AND R2 ARE ASSUMED TO BE IN DOUBLE PRECISION AND ARE PRINTED
+C   IN D21.13 FORMAT.
+C 4. THE COMMON BLOCK /EH0001/ BELOW IS DATA-LOADED (A MACHINE-
+C   DEPENDENT FEATURE) WITH DEFAULT VALUES.
+C   THIS BLOCK IS NEEDED FOR PROPER RETENTION OF PARAMETERS USED BY
+C   THIS ROUTINE WHICH THE USER CAN RESET BY CALLING XSETF OR XSETUN.
+C   THE VARIABLES IN THIS BLOCK ARE AS FOLLOWS..
+C      MESFLG = PRINT CONTROL FLAG..
+C               1 MEANS PRINT ALL MESSAGES (THE DEFAULT).
+C               0 MEANS NO PRINTING.
+C      LUNIT  = LOGICAL UNIT NUMBER FOR MESSAGES.
+C               THE DEFAULT IS 6 (MACHINE-DEPENDENT).
+C 5. TO CHANGE THE DEFAULT OUTPUT UNIT, CHANGE THE DATA STATEMENT
+C  IN THE BLOCK DATA SUBPROGRAM BELOW.
+C
+C FOR A DIFFERENT RUN-ABORT COMMAND, CHANGE THE STATEMENT FOLLOWING
+C STATEMENT 100 AT THE END.
+C-----------------------------------------------------------------------
+      COMMON /EH0001/ MESFLG, LUNIT
+      IF (MESFLG .EQ. 0) GO TO 100
+C GET LOGICAL UNIT NUMBER. ---------------------------------------------
+      LUN = LUNIT
+C WRITE THE MESSAGE. ---------------------------------------------------
+      WRITE (LUN, 10) MSG
+ 10   FORMAT(1X,A)
+C-----------------------------------------------------------------------
+      IF (NI .EQ. 1) WRITE (LUN, 20) I1
+ 20   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10)
+      IF (NI .EQ. 2) WRITE (LUN, 30) I1,I2
+ 30   FORMAT(6X,'IN ABOVE MESSAGE,  I1 = ',I10,3X,'I2 = ',I10)
+      IF (NR .EQ. 1) WRITE (LUN, 40) R1
+ 40   FORMAT(6X,'IN ABOVE MESSAGE,  R1 = ',D21.13)
+      IF (NR .EQ. 2) WRITE (LUN, 50) R1,R2
+ 50   FORMAT(6X,'IN ABOVE,  R1 = ',D21.13,3X,'R2 = ',D21.13)
+C ABORT THE RUN IF IERT = 2. -------------------------------------------
+ 100   IF (IERT .NE. 2) RETURN
+      STOP
+C----------------------- END OF SUBROUTINE XERR ----------------------
+      END
+      SUBROUTINE XSETF (MFLAG)
+C
+C THIS ROUTINE RESETS THE PRINT CONTROL FLAG MFLAG.
+C
+      INTEGER MFLAG, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (MFLAG .EQ. 0 .OR. MFLAG .EQ. 1) MESFLG = MFLAG
+      RETURN
+C----------------------- END OF SUBROUTINE XSETF -----------------------
+      END
+      SUBROUTINE XSETUN (LUN)
+C
+C THIS ROUTINE RESETS THE LOGICAL UNIT NUMBER FOR MESSAGES.
+C
+      INTEGER LUN, MESFLG, LUNIT
+      COMMON /EH0001/ MESFLG, LUNIT
+C
+      IF (LUN .GT. 0) LUNIT = LUN
+      RETURN
+C----------------------- END OF SUBROUTINE XSETUN ----------------------
+      END
+      BLOCK DATA
+C-----------------------------------------------------------------------
+C THIS DATA SUBPROGRAM LOADS VARIABLES INTO THE INTERNAL COMMON
+C BLOCKS USED BY ODESSA AND ITS VARIANTS.  THE VARIABLES ARE
+C DEFINED AS FOLLOWS..
+C  ILLIN  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ILLEGAL INPUT.  THE RUN IS STOPPED WHEN
+C           ILLIN REACHES 5.
+C  NTREP  = COUNTER FOR THE NUMBER OF CONSECUTIVE TIMES THE PACKAGE
+C           WAS CALLED WITH ISTATE = 1 AND TOUT = T.  THE RUN IS
+C           STOPPED WHEN NTREP REACHES 5.
+C  MESFLG = FLAG TO CONTROL PRINTING OF ERROR MESSAGES.  1 MEANS PRINT,
+C           0 MEANS NO PRINTING.
+C  LUNIT  = DEFAULT VALUE OF LOGICAL UNIT NUMBER FOR PRINTING OF ERROR
+C           MESSAGES.
+C-----------------------------------------------------------------------
+      INTEGER ILLIN, IDUMA, NTREP, IDUMB, IOWNS, ICOMM, MESFLG, LUNIT
+      DOUBLE PRECISION ROWND, ROWNS, RCOMM
+      COMMON /ODE001/ ROWND, ROWNS(173), RCOMM(45),
+     1   ILLIN, IDUMA(10), NTREP, IDUMB(2), IOWNS(4), ICOMM(21)
+      COMMON /EH0001/ MESFLG, LUNIT
+      DATA ILLIN/0/, NTREP/0/
+      DATA MESFLG/1/, LUNIT/6/
+C
+C------------------------ END OF BLOCK DATA ----------------------------
+      END
+C-----------------------------------------------------------------------
+C INSTRUCTIONS FOR INSTALLING THE ODESSA PACKAGE. (see @ below.)
+C
+C ODESSA is an enhanced version of the widely disseminated ODE solver
+C LSODE, and as such retains the same properties regarding portability.
+C The notes below, adapted from the installation instructions for LSODE,
+C are intended to facilitate the installation of the ODESSA package in
+C the user's software library.
+C
+C 1. Both a single and a double precision version of ODESSA are
+C provided in this release.  It is expected that most users will
+C utilize the double precision version, except in the case of
+C extended word-length computers. Most routines used by ODESSA
+C are named the same regardless of whether they are single or
+C double precision.  The exceptions are the LINPAK and BLAS
+C routines that follow the LINPAK/BLAS naming conventions, i.e.
+C D--- for a double precision routine, and S--- for a single
+C precision routine.  Thus, care should be taken if both single
+C and double precision versions are stored in the same library.
+C
+C 2. Several routines in ODESSA have the same names as the LSODE
+C routines from which they were derived, although they contain
+C different code.  These are: INTDY, STODE, PREPJ, SVCOM, and
+C RSCOM.  If ODESSA is added to a subroutine library of which
+C LSODE is already a member, these routine names must be changed
+C in one of the two programs.  Also see the note regarding BLOCK
+C DATA subroutines below.
+C
+C 3.  In many cases, ODESSA uses unaltered LSODE routines and
+C common library routines that may already reside on your system.
+C The installation of ODESSA should be done so that identical routines
+C are shared rather than kept as duplicate copies.
+C a.  Normally, the user calls only subroutine ODESSA, but for optional
+C     capabilities the user may also CALL XSETUN, XSETF, SVCOM, RSCOM,
+C     or INTDY, as described in Part II of the Full Description in the
+C     User Documentation (ODESSA.DOC, see below).  Except for INTDY,
+C     none of these are called from within the package.
+C b.  Two routines, EWSET and VNORM, are optionally replaceable by the
+C     user if the package version is unsuitable.  Hence, the install-
+C     ation of the package should be done so that the user's version
+C     for either routine overrides the package version.
+C c.  The function routine D1MACH is provided to compute the unit
+C     roundoff of the machine and precision in use, in a manner com-
+C     patible with machine parameter routines developed at Bell Lab-
+C     oratories.  If such a routine has already been installed on
+C     your system, the version supplied here may be discarded.
+C d.  Linear algebraic systems are solved with routines from the
+C     LINPACK collection, in conjunction with routines from the Basic
+C     Linear Algebra module collection (BLAS).  In double precision,
+C     the names are DGEFA, DGESL, DGBFA, and DGBSL (from LINPACK), and
+C     DAXPY, DSCAL, IDAMAX, and DDOT (from BLAS). If these routines
+C     have already been installed on your system, copies supplied with
+C     ODESSA may be discarded.  The single precision versions of these
+C     routines are used in the single precision version.
+C
+C 4. There are four integer variables, in the two labeled COMMON
+C blocks /ODE001/ and /EH0001/, which need to be loaded with DATA
+C statements.  They can vary during execution, and are in common to
+C assure their retention between calls.  This is legal in ANSI Fortran
+C only if done in a BLOCK DATA subprogram, and this package has a
+C BLOCK DATA for this purpose.  However, BLOCK DATA subprograms can be
+C difficult to install in libraries, and many compilers allow such DATA
+C statements in subroutines.  If your system allows this, the location
+C of the DATA statements are just after the initial type and common
+C declarations in subroutines ODESSA and XERR.  In ODESSA, ILLIN and
+C NTREP are DATA-loaded as 0.  In XERR, MESFLG is loaded as 1 and
+C LUNIT is loaded as the appropriate default logical unit number.
+C
+C 5. The ODESSA package contains subscript expressions which may not
+C be accepted by some compilers.  Subscripts of the form I + J, I - J,
+C etc., occur in various routines.  If any of these forms are
+C unacceptable to your compiler, an extra line of code setting the
+C subscript to a dummy integer value should be added for each subscipt.
+C
+C 6. User documentation is provided in a two-level structure
+C to accommmodate both the casual and serious user.  The novice or
+C casual user should need to read only the Summary of Usage and the
+C Example Problem located at the beginning of the documentation.  More
+C experienced users, requiring the full set of available options,
+C should read the Full Description which follows the Example Problem.
+C
+C 7. The user documentation may need corrections in the following ways:
+C a.  If subroutine names have been changed to avoid conflicts between
+C     the LSODE and ODESSA packages, the corresponding name changes
+C     should be made in the documentation.
+C b.  In the Summary of Usage, and in the description of XSETUN under
+C     Part II of the Full Description, the default logical unit number
+C     should be corrected if it is not 6.
+C c.  In the Summary of Usage, users should be instructed to execute
+C     CALL XSETF(1) before the first CALL to ODESSA, if this is neces-
+C     sary for proper error message handling.  (see note 2(e) above.)
+C d.  In the description of the subroutines DF and JAC in the Summary
+C     of Usage and in Part I of the Full Description, it is stated
+C     that dummy names may be passed if these two routines are not user
+C     supplied.  Your system may require the user to supply a dummy
+C     subroutine instead.
+C e.  The ODESSA package treats the arguments NEQ, RTOL, and ATOL as
+C     arrays (possibly of length 1), while the usage documentation
+C     states that these arguments may be either arrays or scalars.
+C     If your system does not allow such a mismatch, then the
+C     documentation should be changed to reflect this.
+C 8.  A demonstration program is provided with the package for
+C     verification.
+C
+C
+C     Jorge R. Leis and Mark A. Kramer
+C     Department of Chemical Engineering
+C     Massachusetts Institute of Technology
+C     Cambridge, Massachusetts  02139
+C     U.S.A.
+C
+C     Current address of J.R. Leis (Jan. 1988):
+C
+C     Shell Development Company
+C     Westhollow Research Center
+C     Houston, TX
+C
+C  @ Adapted from 'Instructions for Installing LSODE', written by
+C    Alan C. Hindmarsh, Mathematics & Statistics Division, L-316,
+C    Lawrence Livermore National Laboratory, Livermore, CA. 94550
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_radau5.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_radau5.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_radau5.def	(revision 3477)
@@ -0,0 +1,5 @@
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+#DOUBLE ON 
+#INTFILE kpp_radau5
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_radau5.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_radau5.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_radau5.f90	(revision 3477)
@@ -0,0 +1,1202 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RADAU5 - Runge-Kutta method based on Radau-2A quadrature               !
+!                       (2 stages, order 5)                               !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision, ONLY: dp
+  USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+  USE KPP_ROOT_Jacobian, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  ! Statistics
+  INTEGER :: Nfun, Njac, Nstp, Nacc, Nrej, Ndec, Nsol, Nsng
+  
+  ! Method parameters
+  KPP_REAL :: Transf(3,3), TransfInv(3,3),      &
+                   rkA(3,3), rkB(3), rkC(3), rkE(3), &
+                   rkGamma, rkAlpha, rkBeta
+  
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-11:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -11 
+    'Step size too small: T + 10*H = T or H < Roundoff ', & ! -10 
+    'No of steps exceeds maximum bound                 ', & ! -9  
+    'Tolerances are too small                          ', & ! -8  
+    'Improper values for Qmin, Qmax                    ', & ! -7  
+    'Newton stopping tolerance too small               ', & ! -6  
+    'Improper value for ThetaMin                       ', & ! -5  
+    'Improper values for FacMin/FacMax/FacSafe/FacRej  ', & ! -4  
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3  
+    'Improper value for maximal no of Newton iterations', & ! -2  
+    'Improper value for maximal no of steps            ', & ! -1  
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+    KPP_REAL, SAVE :: H
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20)
+    INTEGER :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    H =0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(:)  = 0
+    ICNTRL(2)  = 0 ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8 ! Max no. of Newton iterations
+    ICNTRL(6)  = 1 ! Starting values for Newton are interpolated (0) or zero (1)
+    ICNTRL(11) = 1 ! Gustaffson (1) or classic(2) controller
+    RCNTRL(1:20) = 0._dp
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) ICNTRL(1:20) = ICNTRL_U(1:20)
+    IF (PRESENT(RCNTRL_U)) RCNTRL(1:20) = RCNTRL_U(1:20)
+   
+
+    CALL RADAU5(  NVAR,TIN,TOUT,VAR,H,                  &
+                  RTOL,ATOL,                            &
+                  RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+!!$    Ntotal = Ntotal + Nstp
+!!$    PRINT*,'NSTEPS=',Nstp,' (',Ntotal,')'
+
+    Nfun = Nfun + ISTATUS(1)
+    Njac = Njac + ISTATUS(2)
+    Nstp = Nstp + ISTATUS(3)
+    Nacc = Nacc + ISTATUS(4)
+    Nrej = Nrej + ISTATUS(5)
+    Ndec = Ndec + ISTATUS(6)
+    Nsol = Nsol + ISTATUS(7)
+    Nsng = Nsng + ISTATUS(8)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) THEN
+      ISTATUS_U(:) = 0
+      ISTATUS_U(1) = Nfun ! function calls
+      ISTATUS_U(2) = Njac ! jacobian calls
+      ISTATUS_U(3) = Nstp ! steps
+      ISTATUS_U(4) = Nacc ! accepted steps
+      ISTATUS_U(5) = Nrej ! rejected steps (except at the beginning)
+      ISTATUS_U(6) = Ndec ! LU decompositions
+      ISTATUS_U(7) = Nsol ! forward/backward substitutions
+    ENDIF
+    IF (PRESENT(RSTATUS_U)) THEN
+      RSTATUS_U(:) = 0.
+      RSTATUS_U(1) = TOUT ! final time
+    ENDIF
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+! mz_rs_20050716: IERR is returned to the user who then decides what to do
+! about it, i.e. either stop the run or ignore it.
+!!$    IF (IERR < 0) THEN
+!!$      PRINT *,'RADAU: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+!!$      STOP
+!!$    ENDIF
+
+  END SUBROUTINE INTEGRATE
+
+   SUBROUTINE RADAU5(N,T,Tend,Y,H,RelTol,AbsTol,    &
+                       RCNTRL,ICNTRL,RSTATUS,ISTATUS,IDID)
+
+!~~~>-----------------------------------------------
+!     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+!     SYSTEM OF FirstStep 0RDER ORDINARY DIFFERENTIAL EQUATIONS
+!                     M*Y'=F(T,Y).
+!     THE SYSTEM CAN BE (LINEARLY) IMPLICIT (MASS-MATRIX M  /=  I)
+!     OR EXPLICIT (M=I).
+!     THE METHOD USED IS AN IMPLICIT RUNGE-KUTTA METHOD (RADAU IIA)
+!     OF ORDER 5 WITH STEP SIZE CONTROL AND CONTINUOUS OUTPUT.
+!     C.F. SECTION IV.8
+!
+!     AUTHORS: E. HAIRER AND G. WANNER
+!              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!              CH-1211 GENEVE 24, SWITZERLAND
+!              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!     THIS CODE IS PART OF THE BOOK:
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!     VERSION OF SEPTEMBER 30, 1995
+!
+!     INPUT PARAMETERS
+!     ----------------
+!     N           DIMENSION OF THE SYSTEM
+!
+!     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+!                 VALUE OF F(T,Y):
+!                 SUBROUTINE FCN(N,T,Y,F)
+!                    KPP_REAL T,Y(N),F(N)
+!                    F(1)=...   ETC.
+!                 RPAR, IPAR (SEE BELOW)
+!
+!     T           INITIAL TIME VALUE
+!
+!     Tend        FINAL T-VALUE (Tend-T MAY BE POSITIVE OR NEGATIVE)
+!
+!     Y(N)        INITIAL VALUES FOR Y
+!
+!     H           INITIALL STEP SIZE GUESS;
+!                 FOR STIFF EQUATIONS WITH INITIALL TRANSIENT,
+!                 H=1.D0/(NORM OF F'), USUALLY 1.D-3 OR 1.D-5, IS GOOD.
+!                 THIS CHOICE IS NOT VERY IMPORTANT, THE STEP SIZE IS
+!                 QUICKLY ADAPTED. (IF H=0.D0, THE CODE PUTS H=1.D-6).
+!
+!     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!          -----  CONTINUOUS OUTPUT: -----
+!                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+!                 FOR THE INTERVAL [Told,T] IS AVAILABLE THROUGH
+!                 THE FUNCTION
+!                        >>>   CONTR5(I,S,CONT,LRC)   <<<
+!                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+!                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+!                 S SHOULD LIE IN THE INTERVAL [Told,T].
+!                 DO NOT CHANGE THE ENTRIES OF CONT(LRC), IF THE
+!                 DENSE OUTPUT FUNCTION IS USED.
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 10000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(8) == 1:  mod. predictive controller (Gustafsson)
+!              ICNTRL(8) == 2:  classical step size control
+!              the default value (for iwork(8)=0) is iwork(8)=1.
+!              the choice iwork(8) == 1 seems to produce safer results;
+!              for simple problems, the choice iwork(8) == 2 produces
+!              often slightly faster runs
+!              ( currently unused )
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> not used
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> not used
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT PARAMETERS
+!    -----------------
+!    T           T-VALUE FOR WHICH THE SOLUTION HAS BEEN COMPUTED
+!                     (AFTER SUCCESSFUL RETURN T=Tend).
+!
+!    Y(N)        NUMERICAL SOLUTION AT T
+!
+!    H           PREDICTED STEP SIZE OF THE LastStep ACCEPTED STEP
+!
+!    IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!                   For multiple restarts, use Hexit as Hstart 
+!                   in the subsequent run
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: Y(N),AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson
+      INTEGER :: IDID, ITOL
+      KPP_REAL :: H,Tend,T
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit
+      KPP_REAL :: Hstart,Hmin,Hmax,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin,TolNewton
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      !~~~> Local variables
+      INTEGER :: i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+ 
+      !~~~> variables from the former COMMON block /CONRA5/
+      ! KPP_REAL :: Tsol, Hsol
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       Nfun=0
+       Njac=0
+       Nstp=0
+       Nacc=0
+       Nrej=0
+       Ndec=0
+       Nsol=0
+       IDID = 0
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> ICNTRL(3) - method selection - not used       
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 10000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RAD_ErrorMsg(-1,T,ZERO,IDID)
+         END IF
+      END IF
+!~~~> NewtonMaxit    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RAD_ErrorMsg(-2,T,ZERO,IDID)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF
+!~~~> Gustafsson: step size controller
+      IF(ICNTRL(11) == 0)THEN
+         Gustafsson=.TRUE.
+      ELSE
+         Gustafsson=.FALSE.
+      END IF
+
+
+!~~~> Roundoff   SMALLEST NUMBER SATISFYING 1.0d0+Roundoff>1.0d0
+      Roundoff=WLAMCH('E');
+
+!~~~> RCNTRL(1) = Hmin - not used
+      Hmin = ZERO
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax=Tend-T
+      ELSE
+         Hmax=MAX(ABS(RCNTRL(7)),ABS(Tend-T))
+      END IF
+!~~~> RCNTRL(3) = Hstart - not used
+      Hstart = ZERO
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 0.001D0) .OR. (FacSafe >= 1.0d0) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RAD_ErrorMsg(-4,T,ZERO,IDID)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RAD_ErrorMsg(-5,T,ZERO,IDID)
+         END IF
+      END IF
+!~~~> TolNewton:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         TolNewton = 3.0d-2
+      ELSE
+         TolNewton = RCNTRL(9)
+         IF (TolNewton <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RAD_ErrorMsg(-6,T,ZERO,IDID)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RAD_ErrorMsg(-7,T,ZERO,IDID)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RAD_ErrorMsg(-8,T,ZERO,IDID)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RAD_ErrorMsg(-8,T,ZERO,IDID)
+          END IF
+          END DO
+      END IF
+
+!~~~> WHEN A FAIL HAS OCCURED, RETURN
+      IF (IDID < 0) RETURN
+
+      
+!~~~>  CALL TO CORE INTEGRATOR ------------
+      CALL RAD_Integrator( N,T,Y,Tend,Hmax,H,RelTol,AbsTol,ITOL,IDID, &
+        Max_no_steps,Roundoff,FacSafe,ThetaMin,TolNewton,Qmin,Qmax,   &
+        NewtonMaxit,StartNewton,Gustafsson,FacMin,FacMax,FacRej )
+        
+      ISTATUS(1)=Nfun
+      ISTATUS(2)=Njac
+      ISTATUS(3)=Nstp
+      ISTATUS(4)=Nacc
+      ISTATUS(5)=Nrej
+      ISTATUS(6)=Ndec
+      ISTATUS(7)=Nsol
+      ISTATUS(8)=Nsng
+
+   ! END SUBROUTINE RADAU5
+   CONTAINS ! INTERNAL PROCEDURES TO RADAU5
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_Integrator( N,T,Y,Tend,Hmax,H,RelTol,AbsTol,ITOL,IDID, &
+        Max_no_steps,Roundoff,FacSafe,ThetaMin,TolNewton,Qmin,Qmax,      &
+        NewtonMaxit,StartNewton,Gustafsson,FacMin,FacMax,FacRej )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     CORE INTEGRATOR FOR RADAU5
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      INTEGER :: N
+      KPP_REAL  Y(NVAR),Z1(NVAR),Z2(NVAR),Z3(NVAR),Y0(NVAR),&
+                     SCAL(NVAR),F1(NVAR),F2(NVAR),F3(NVAR),      &
+                     CONT(N,4),AbsTol(NVAR),RelTol(NVAR)
+
+#ifdef FULL_ALGEBRA
+      KPP_REAL  :: FJAC(NVAR,NVAR), E1(NVAR,NVAR)
+      DOUBLE COMPLEX :: E2(NVAR,NVAR)   
+#else
+      KPP_REAL  :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      DOUBLE COMPLEX :: E2(LU_NONZERO)   
+#endif
+                  
+      !~~~> Local variables
+      KPP_REAL  :: TMP(NVAR), T, Tend, Tdirection, &
+                 H, Hmax, HmaxN, Hacc, Hnew, Hopt, Hold, &
+                 Fac, FacMin, Facmax, FacSafe, FacRej, FacGus, FacConv, &
+                 Theta, ThetaMin, TolNewton, ERR, ERRACC,   &
+                 Qmin, Qmax, DYNO, Roundoff, &
+                 AK, AK1, AK2, AK3, C3Q, &
+                 Qnewton, DYTH, THQ, THQOLD, DYNOLD, &
+                 DENOM, C1Q, C2Q, ALPHA, BETA, GAMMA, CFAC, ACONT3, QT
+      INTEGER :: IP1(NVAR),IP2(NVAR), ITOL, IDID, Max_no_steps, &
+                 NewtonIter, NewtonMaxit, ISING
+      LOGICAL :: REJECT, FirstStep, FreshJac, LastStep, &
+                 Gustafsson, StartNewton, NewtonDone
+      ! KPP_REAL, PARAMETER  :: ONE = 1.0d0, ZERO = 0.0d0
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  INITIALISATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      CALL RAD_Coefficients
+            
+      Tdirection=SIGN(1.D0,Tend-T)
+      HmaxN=MIN(ABS(Hmax),ABS(Tend-T))
+      H=MIN(ABS(Hmin),ABS(Hstart))
+      H=MIN(ABS(H),HmaxN)
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=SIGN(H,Tdirection)
+      Hold=H
+      REJECT=.FALSE.
+      FirstStep=.TRUE.
+      LastStep=.FALSE.
+      FreshJac=.FALSE.; Theta=1.0d0
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= 0.D0) THEN
+         H=Tend-T
+         LastStep=.TRUE.
+      END IF
+      FacConv=1.D0
+      CFAC=FacSafe*(1+2*NewtonMaxit)
+      Nsng=0
+!      Told=T
+      CALL RAD_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+      CALL FUN_CHEM(T,Y,Y0)
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      !~~~> COMPUTE JACOBIAN MATRIX ANALYTICALLY
+      IF ( (.NOT.FreshJac)  .AND. (Theta > ThetaMin) ) THEN
+        CALL JAC_CHEM(T,Y,FJAC)
+        FreshJac=.TRUE.
+      END IF
+      
+      !~~~> Compute the matrices E1 and E2 and their decompositions
+      GAMMA  = rkGamma/H
+      ALPHA = rkAlpha/H
+      BETA  = rkBeta/H
+      CALL RAD_DecompReal(N,FJAC,GAMMA,E1,IP1,ISING)
+      IF (ISING /= 0) THEN
+          Nsng=Nsng+1
+          IF (Nsng >= 5) THEN
+            CALL RAD_ErrorMsg(-12,T,H,IDID); RETURN
+          END IF
+          H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+          CYCLE Tloop
+      END IF   
+      CALL RAD_DecompCmplx(N,FJAC,ALPHA,BETA,E2,IP2,ISING)
+      IF (ISING /= 0) THEN
+          Nsng=Nsng+1
+          IF (Nsng >= 5) THEN
+            CALL RAD_ErrorMsg(-12,T,H,IDID); RETURN
+          END IF
+          H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+          CYCLE Tloop
+      END IF
+
+   30 CONTINUE
+      Nstp=Nstp+1
+      IF (Nstp > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RAD_ErrorMsg(-9,T,H,IDID); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RAD_ErrorMsg(-10,T,H,IDID); RETURN
+      END IF
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  STARTING VALUES FOR NEWTON ITERATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+         CALL Set2zero(N,F1)
+         CALL Set2zero(N,F2)
+         CALL Set2zero(N,F3)
+      ELSE
+         C3Q=H/Hold
+         C1Q=rkC(1)*C3Q
+         C2Q=rkC(2)*C3Q
+         DO i=1,N
+            AK1=CONT(i,2)
+            AK2=CONT(i,3)
+            AK3=CONT(i,4)
+            Z1(i)=C1Q*(AK1+(C1Q-rkC(2)+ONE)*(AK2+(C1Q-rkC(1)+ONE)*AK3))
+            Z2(i)=C2Q*(AK1+(C2Q-rkC(2)+ONE)*(AK2+(C2Q-rkC(1)+ONE)*AK3))
+            Z3(i)=C3Q*(AK1+(C3Q-rkC(2)+ONE)*(AK2+(C3Q-rkC(1)+ONE)*AK3))
+         END DO
+         !  F(1,2,3) = TransfInv x Z(1,2,3)
+         CALL RAD_Transform(N,TransfInv,Z1,Z2,Z3,F1,F2,F3)
+      END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+            FacConv = MAX(FacConv,Roundoff)**0.8D0
+            Theta=ABS(ThetaMin)
+
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit  
+ 
+            !~~~>  The right-hand side
+            DO i=1,N
+               TMP(i)=Y(i)+Z1(i)
+            END DO
+            CALL FUN_CHEM(T+rkC(1)*H,TMP,Z1)
+            DO i=1,N
+               TMP(i)=Y(i)+Z2(i)
+            END DO
+            CALL FUN_CHEM(T+rkC(2)*H,TMP,Z2)
+            DO i=1,N
+               TMP(i)=Y(i)+Z3(i)
+            END DO
+            CALL FUN_CHEM(T+rkC(3)*H,TMP,Z3)
+
+            !~~~> Solve the linear systems
+            !  Z(1,2,3) = TransfInv x Z(1,2,3)
+            CALL RAD_Transform(N,TransfInv,Z1,Z2,Z3,Z1,Z2,Z3)
+            CALL RAD_Solve( N,FJAC,GAMMA,ALPHA,BETA,E1,E2, &
+                        Z1,Z2,Z3,F1,F2,F3,CONT,IP1,IP2,ISING )
+            Nsol=Nsol+1
+            
+            DYNO=0.0d0
+            DO i=1,N
+               DENOM=SCAL(i)
+               DYNO=DYNO+(Z1(i)/DENOM)**2+(Z2(i)/DENOM)**2+(Z3(i)/DENOM)**2
+            END DO
+            DYNO=SQRT(DYNO/(3*N))
+            
+            !~~~> Bad convergence or number of iterations too large
+            IF ( (NewtonIter > 1) .AND. (NewtonIter < NewtonMaxit) ) THEN
+                THQ=DYNO/DYNOLD
+                IF (NewtonIter == 2) THEN
+                   Theta=THQ
+                ELSE
+                   Theta=SQRT(THQ*THQOLD)
+                END IF
+                THQOLD=THQ
+                IF (Theta < 0.99d0) THEN
+                    FacConv=Theta/(1.0d0-Theta)
+                    DYTH=FacConv*DYNO*Theta**(NewtonMaxit-1-NewtonIter)/TolNewton
+                    IF (DYTH >= 1.0d0) THEN
+                         Qnewton=MAX(1.0D-4,MIN(20.0d0,DYTH))
+                         FAC=.8D0*Qnewton**(-1.0d0/(4.0d0+NewtonMaxit-1-NewtonIter))
+                         H=FAC*H
+                         REJECT=.TRUE.
+                         LastStep=.FALSE.
+                         CYCLE Tloop
+                    END IF
+                ELSE ! Non-convergence of Newton
+                   H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+                   CYCLE Tloop
+                END IF
+            END IF
+            DYNOLD=MAX(DYNO,Roundoff) 
+            CALL WAXPY(N,ONE,Z1,1,F1,1) ! F1 <- F1 + Z1
+            CALL WAXPY(N,ONE,Z2,1,F2,1) ! F2 <- F2 + Z2
+            CALL WAXPY(N,ONE,Z3,1,F3,1) ! F3 <- F3 + Z3
+            !  Z(1,2,3) = Transf x F(1,2,3)
+            CALL RAD_Transform(N,Transf,F1,F2,F3,Z1,Z2,Z3)
+            NewtonDone = (FacConv*DYNO <= TolNewton)
+            IF (NewtonDone) EXIT NewtonLoop
+            
+       END DO NewtonLoop
+            
+       IF (.NOT.NewtonDone) THEN
+           CALL RAD_ErrorMsg(-8,T,H,IDID);
+           H=H*0.5D0; REJECT=.TRUE.; LastStep=.FALSE.
+           CYCLE Tloop
+       END IF
+
+            
+!~~~> ERROR ESTIMATION
+      CALL  RAD_ErrorEstimate(N,FJAC,H,Y0,Y,T, &
+               E1,Z1,Z2,Z3,IP1,SCAL,ERR,       &
+               FirstStep,REJECT,GAMMA)
+!~~~> COMPUTATION OF Hnew
+      Fac  = ERR**(-0.25d0)*   &
+             MIN(FacSafe,(NewtonIter+2*NewtonMaxit)/CFAC)
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~> IS THE ERROR SMALL ENOUGH ?
+accept:IF (ERR < ONE) THEN !~~~> STEP IS ACCEPTED
+         FirstStep=.FALSE.
+         Nacc=Nacc+1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            !~~~> Currently not implemented
+            IF (Nacc > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(ERR**2/ERRACC)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew=H*Fac
+            END IF
+            Hacc=H
+            ERRACC=MAX(1.0D-2,ERR)
+         END IF
+         ! Told = T
+         Hold = H
+         T=T+H
+         DO i=1,N
+            Y(i)=Y(i)+Z3(i)
+            CONT(i,2)=(Z2(i)-Z3(i))/(rkC(2)-ONE)
+            AK=(Z1(i)-Z2(i))/(rkC(1)-rkC(2))
+            ACONT3=Z1(i)/rkC(1)
+            ACONT3=(AK-ACONT3)/rkC(2)
+            CONT(i,3)=(AK-CONT(i,2))/(rkC(1)-ONE)
+            CONT(i,4)=CONT(i,3)-ACONT3
+         END DO
+         CALL RAD_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         FreshJac=.FALSE.
+         IF (LastStep) THEN
+            H=Hopt
+            IDID=1
+            RETURN
+         END IF
+         CALL FUN_CHEM(T,Y,Y0)
+         Hnew=Tdirection*MIN(ABS(Hnew),HmaxN)
+         Hopt=Hnew
+         Hopt=MIN(H,Hnew)
+         IF (REJECT) Hnew=Tdirection*MIN(ABS(Hnew),ABS(H))
+         REJECT=.FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >= 0.D0) THEN
+            H=Tend-T
+            LastStep=.TRUE.
+         ELSE
+            QT=Hnew/H
+            IF ( (Theta<=ThetaMin) .AND. (QT>=Qmin) &
+                            .AND. (QT<=Qmax) ) GOTO 30
+            H=Hnew
+         END IF
+         CYCLE Tloop
+      ELSE accept !~~~> STEP IS REJECTED
+         REJECT=.TRUE.
+         LastStep=.FALSE.
+         IF (FirstStep) THEN
+             H=H*FacRej
+         ELSE
+             H=Hnew
+         END IF
+         IF (Nacc >= 1) Nrej=Nrej+1
+         CYCLE Tloop
+      END IF accept
+      
+      
+      END DO Tloop
+      
+
+   END SUBROUTINE RAD_Integrator
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RAD_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RADAU5 due to the following error:'
+   IF ((Code>=-11).AND.(Code<=-1)) THEN
+     PRINT *, IERR_NAMES(Code)
+   ELSE
+     PRINT *, 'Unknown Error code: ', Code
+   ENDIF
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE RAD_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RAD_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)=AbsTol(1)+RelTol(1)*ABS(Y(i))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=AbsTol(i)+RelTol(i)*ABS(Y(i))
+       END DO
+   END IF
+      
+ END SUBROUTINE RAD_ErrorScale
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RAD_Transform(N,Tr,Z1,Z2,Z3,F1,F2,F3)
+!~~~>                 F = Tr x Z
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, i
+      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),F1(N),F2(N),F3(N)
+      KPP_REAL :: x1, x2, x3
+      DO i=1,N
+          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+          F1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+          F2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+          F3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+      END DO
+  END SUBROUTINE RAD_Transform
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RAD_Coefficients
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: s2,s3,s6,x1,x2,x3,x4,y1,y2,y3,y4,y5
+      
+      s2 = SQRT(2.0d0);
+      s3 = SQRT(3.0d0);
+      s6 = SQRT(6.0d0);
+      x1 = 3.d0**(1.d0/3.d0);
+      x2 = 3.d0**(2.d0/3.d0);
+      x3 = 3.d0**(1.d0/6.d0);
+      x4 = 3.d0**(5.d0/6.d0);
+      
+      rkA(1,1) =  11.d0/45.d0-7.d0/360.d0*s6
+      rkA(1,2) =  37.d0/225.d0-169.d0/1800.d0*s6
+      rkA(1,3) =  -2.d0/225.d0+s6/75
+      rkA(2,1) =  37.d0/225.d0+169.d0/1800.d0*s6
+      rkA(2,2) =  11.d0/45.d0+7.d0/360.d0*s6
+      rkA(2,3) =  -2.d0/225.d0-s6/75
+      rkA(3,1) =  4.d0/9.d0-s6/36
+      rkA(3,2) =  4.d0/9.d0+s6/36
+      rkA(3,3) =  1.d0/9.d0
+      
+      rkB(1)   =  4.d0/9.d0-s6/36
+      rkB(2)   =  4.d0/9.d0+s6/36
+      rkB(3)   =  1.d0/9.d0
+      
+      rkC(1)   =  2.d0/5.d0-s6/10
+      rkC(2)   =  2.d0/5.d0+s6/10
+      rkC(3)   =  1.d0
+
+      ! Error estimation
+      rkE(1) = -(13.d0+7.d0*s6)/3.d0
+      rkE(2) =  (-13.d0+7.d0*s6)/3.d0
+      rkE(3) = -1.d0/3.d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:
+      ! TransfInv * inv(rkA) * Transf =
+      !       |  rkGamma      0           0       |
+      !       |      0      rkAlpha   -rkBeta   |
+      !       |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      rkGamma =  3-x1+x2
+      rkAlpha =  x1/2-x2/2+3
+      rkBeta  =  -x4/2-3.d0/2.d0*x3
+
+      y1 = 36.d0/625.d0*s6
+      y2 = 129.d0/2500.d0*x1
+      y3 = 111.d0/2500.d0*x3*s2
+      Transf(1,1) = -31.d0/1250.d0*s6*x1+37.d0/1250.d0*s6*x2-y1 &
+                    +129.d0/1250.d0*x1-33.d0/1250.d0*x2+49.d0/625.d0
+      Transf(1,2) =  -y1-y2-y3 &
+                    +31.d0/2500.d0*x4*s2+33.d0/2500.d0*x2+49.d0/625.d0
+      Transf(1,3) =  3.d0/2500.d0*x3*(-33-43*x2+31*x3*s2+37*s3*s2)
+      Transf(2,1) =  31.d0/1250.d0*s6*x1-37.d0/1250.d0*s6*x2+y1 &
+                    +129.d0/1250.d0*x1-33.d0/1250.d0*x2+49.d0/625.d0
+      Transf(2,2) =  y1-y2+y3&
+                    -31.d0/2500.d0*x4*s2+33.d0/2500.d0*x2+49.d0/625.d0
+      Transf(2,3) =  -3.d0/2500.d0*x3*(33+43*x2+31*x3*s2+37*s3*s2)
+      Transf(3,1) =  1.d0
+      Transf(3,2) =  1.d0
+      Transf(3,3) =  0.d0
+      
+      y1 = 11.d0/36.d0*x3*s2 + 43.d0/108.d0*x4*s2
+      y2 = 11.d0/36.d0*s2*x2 - 43.d0/36.d0*s2*x1
+      y3 = 31.d0/54.d0*x1 + 37.d0/54.d0*x2
+      y4 = 31.d0/54.d0*x4-37.d0/18.d0*x3
+      y5 = -x2/27+5.d0/27.d0*x1
+      TransfInv(1,1) =  y1 + y3
+      TransfInv(1,2) = -y1 + y3
+      TransfInv(1,3) =  y5 + 1.d0/3.d0
+      TransfInv(2,1) = -y1 - y3
+      TransfInv(2,2) =  y1 - y3
+      TransfInv(2,3) = -y5 + 2.d0/3.d0
+      TransfInv(3,1) =  y4 - y2
+      TransfInv(3,2) =  y4 + y2
+      TransfInv(3,3) =  x3/9+5.d0/27.d0*x4
+      
+   END SUBROUTINE RAD_Coefficients
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_DecompReal(N,FJAC,GAMMA,E1,IP1,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N, ISING
+      KPP_REAL :: GAMMA
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: FJAC(NVAR,NVAR),E1(NVAR,NVAR)
+#else      
+      KPP_REAL :: FJAC(LU_NONZERO),E1(LU_NONZERO)
+#endif      
+      INTEGER :: IP1(N), i, j
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+GAMMA
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,NVAR
+         j = LU_DIAG(i); E1(j)=E1(j)+GAMMA
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+   END SUBROUTINE RAD_DecompReal
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_DecompCmplx(N,FJAC,ALPHA,BETA,E2,IP2,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL ::  FJAC(N,N)
+      DOUBLE COMPLEX :: E2(N,N)
+#else      
+      KPP_REAL ::  FJAC(LU_NONZERO)
+      DOUBLE COMPLEX :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL :: ALPHA, BETA
+      INTEGER :: IP2(N), i, j
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), 0.0d0 )
+        END DO
+        E2(j,j) = E2(j,j) + DCMPLX( ALPHA, BETA )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), 0.0d0 )
+      END DO
+      DO i=1,NVAR
+         j = LU_DIAG(i); E2(j)=E2(j)+DCMPLX( ALPHA, BETA )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      Ndec=Ndec+1
+      
+   END SUBROUTINE RAD_DecompCmplx
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_Solve(N,FJAC,GAMMA,ALPHA,BETA,E1,E2,&
+               Z1,Z2,Z3,F1,F2,F3,CONT,IP1,IP2,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N,IP1(NVAR),IP2(NVAR),ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL  :: FJAC(NVAR,NVAR), E1(NVAR,NVAR)
+      DOUBLE COMPLEX :: E2(NVAR,NVAR)
+#else      
+      KPP_REAL  :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      DOUBLE COMPLEX :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL :: Z1(N),Z2(N),Z3(N),   &
+               F1(N),F2(N),F3(N),CONT(N),   &
+               GAMMA,ALPHA,BETA
+      DOUBLE COMPLEX :: BC(N)
+      INTEGER :: i,j
+      KPP_REAL :: S2, S3
+!
+      DO i=1,N
+         S2=-F2(i)
+         S3=-F3(i)
+         Z1(i)=Z1(i)-F1(i)*GAMMA
+         Z2(i)=Z2(i)+S2*ALPHA-S3*BETA
+         Z3(i)=Z3(i)+S3*ALPHA+S2*BETA
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,Z1,N,ISING) 
+#else      
+      CALL KppSolve (E1,Z1)
+#endif      
+      
+      DO j=1,N
+        BC(j) = DCMPLX(Z2(j),Z3(j))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,ISING) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO j=1,N
+        Z2(j) = DBLE( BC(j) )
+        Z3(j) = AIMAG( BC(j) )
+      END DO
+
+   END SUBROUTINE RAD_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RAD_ErrorEstimate(N,FJAC,H,Y0,Y,T,&
+               E1,Z1,Z2,Z3,IP1,SCAL,ERR,        &
+               FirstStep,REJECT,GAMMA)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: FJAC(NVAR,NVAR),  E1(NVAR,NVAR)
+      INTEGER :: ISING
+#else      
+      KPP_REAL :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+#endif      
+      KPP_REAL :: SCAL(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N), &
+               Y0(N),Y(N),TMP(N),T,H,GAMMA
+      INTEGER :: IP1(N), i
+      LOGICAL FirstStep,REJECT
+      KPP_REAL :: HEE1,HEE2,HEE3,ERR
+
+      HEE1 = rkE(1)/H
+      HEE2 = rkE(2)/H
+      HEE3 = rkE(3)/H
+
+      DO  i=1,N
+         F2(i)=HEE1*Z1(i)+HEE2*Z2(i)+HEE3*Z3(i)
+         TMP(i)=F2(i)+Y0(i)
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+#else      
+      CALL KppSolve (E1, TMP)
+#endif      
+
+      ERR=0.D0
+      DO  i=1,N
+         ERR=ERR+(TMP(i)/SCAL(i))**2
+      END DO
+      ERR=MAX(SQRT(ERR/N),1.D-10)
+!
+      IF (ERR < 1.D0) RETURN
+firej:IF (FirstStep.OR.REJECT) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,0) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          ERR=0.D0
+          DO i=1,N
+             ERR=ERR+(TMP(i)/SCAL(i))**2
+          END DO
+          ERR=MAX(SQRT(ERR/N),1.0d-10)
+       END IF firej
+ 
+   END SUBROUTINE RAD_ErrorEstimate
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   KPP_REAL FUNCTION CONTR5(I,N,T,CONT)
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!!     THIS FUNCTION CAN BE USED FOR CONTINUOUS OUTPUT. IT PROVIDES AN
+!!     APPROXIMATION TO THE I-TH COMPONENT OF THE SOLUTION AT T.
+!!     IT GIVES THE VALUE OF THE COLLOCATION POLYNOMIAL, DEFINED FOR
+!!     THE STEP SUCCESSFULLY COMPUTED STEP (BY RADAU5).
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: I, N
+!      KPP_REAL :: T, CONT(N,4)
+!      KPP_REAL :: S 
+!      KPP_REAL, PARAMETER :: ONE = 1.0d0 
+!      S=(T-Tsol)/Hsol
+!      CONTR5=CONT(i,1)+S* &
+!        (CONT(i,2)+(S-rkC(2)+ONE)*(CONT(i,3)+(S-rkC(1)+ONE)*CONT(i,4)))
+!   END FUNCTION CONTR5
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RADAU5 ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, Told
+
+    !Told = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+    Nfun=Nfun+1
+
+  END SUBROUTINE FUN_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T, Told
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+    INTEGER :: i, j 
+#else
+    KPP_REAL :: JF(LU_NONZERO)
+#endif   
+
+    !Told = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+    
+    Njac=Njac+1
+
+  END SUBROUTINE JAC_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_sdirk4
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.f	(revision 3477)
@@ -0,0 +1,705 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      PARAMETER (LWORK=2*NVAR*NVAR+12*NVAR+7,LIWORK=2*NVAR+7)
+      PARAMETER (LRCONT=5*NVAR+2)
+
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      COMMON /CONT/ ICONT(4),RCONT(LRCONT)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      IWORK(3) = 8
+
+      CALL ATMSDIRK(NVAR,FUNC_CHEM,TIN,VAR,TOUT,STEPMIN,
+     &                  RTOL,ATOL,ITOL,
+     &                  JAC_CHEM ,IJAC, FUNC_CHEM ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMSDIRK: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMSDIRK(N,FCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC, MAS ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)
+C ----------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(1),RelTol(1),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL IMPLCT,JBAND,ARRET
+      EXTERNAL FCN,JAC,MAS
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS
+C *** *** *** *** *** *** ***
+       NFCN=0
+       NJAC=0
+       NSTEP=0
+       NACCPT=0
+       NREJCT=0
+       NDEC=0
+       NSOL=0
+       ARRET=.FALSE.
+C -------- SWITCH FOR TRANSFORMATION OF JACOBIAN TO HESS_CHEM FORM ---
+      NHESS1 = 0         ! ADRIAN
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(2).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NIT    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF(IWORK(3).EQ.0)THEN
+         NIT=8
+      ELSE
+         NIT=IWORK(3)
+         IF(NIT.LE.0)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- METH    SWITCH FOR THE COEFFICIENTS OF THE METHOD
+      METH = 2
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.1.D-19.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 20 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      IF(WORK(2).EQ.0.D0)THEN
+         SAFE=0.9D0
+      ELSE
+         SAFE=WORK(2)
+         IF(SAFE.LE..001D0.OR.SAFE.GE.1.D0)THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(2)=',WORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(WORK(3).EQ.0.D0)THEN
+         THET=0.001D0
+      ELSE
+         THET=WORK(3)
+      END IF
+C --- FNEWT   STOPPING CRIERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+      IF(WORK(4).EQ.0.D0)THEN
+         FNEWT=0.03D0
+      ELSE
+         FNEWT=WORK(4)
+      END IF
+C --- QUOT1 AND QUOT2: IF QUOT1 < HNEW/HOLD < QUOT2, STEP SIZE = CONST.
+      IF(WORK(5).EQ.0.D0)THEN
+         QUOT1=1.D0
+      ELSE
+         QUOT1=WORK(5)
+      END IF
+      IF(WORK(6).EQ.0.D0)THEN
+         QUOT2=1.2D0
+      ELSE
+         QUOT2=WORK(6)
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(7).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(7)
+      END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO 15 I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+  15      CONTINUE
+      END IF
+
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- IMPLICIT, BANDED OR NOT ?
+      IMPLCT=IMAS.NE.0
+      ARRET=.FALSE.
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN
+         LDJAC=N
+C -- MATRIX E FOR LINEAR ALGEBRA
+         LDE=N
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 1'
+      ELSE
+          LDMAS=0
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYHAT=8
+      IEZ=IEYHAT+N
+      IEY0=IEZ+N
+      IEZ1=IEY0+N
+      IEZ2=IEZ1+N
+      IEZ3=IEZ2+N
+      IEZ4=IEZ3+N
+      IEZ5=IEZ4+N
+      IESCAL=IEZ5+N
+      IEF1=IESCAL+N
+      IEG1=IEF1+N
+      IEH1=IEG1+N
+      IEJAC=IEH1+N
+      IEMAS=IEJAC+N*LDJAC
+      IEE=IEMAS+N*LDMAS
+
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+N*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=5
+      IEHES=IEIP+N
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEHES+N-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C --------- CONTROL OF LENGTH OF COMMON BLOCK "CONT" -------
+      IF(LRCONT.LT.(5*N+2))THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR RCONT, MIN. LRCONT=',5*N+2
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,JBAND,LDJAC,LDE,LDMAS2,
+     &   WORK(IEYHAT),WORK(IEZ),WORK(IEY0),WORK(IEZ1),WORK(IEZ2),
+     &   WORK(IEZ3),WORK(IEZ4),WORK(IEZ5),WORK(IESCAL),WORK(IEF1),
+     &   WORK(IEG1),WORK(IEH1),WORK(IEJAC),WORK(IEE),
+     &   WORK(IEMAS),IWORK(IEIP),IWORK(IEHES))
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,BANDED,LDJAC,LE,LDMAS,
+     &   YHAT,Z,Y0,Z1,Z2,Z3,Z4,Z5,SCAL,F1,G1,H1,FJAC,E,FMAS,IP,IPHES)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR SDIRK4
+C     PARAMETERS SAME AS IN SDIRK4 WITH WORKSPACE ADDED
+C ----------------------------------------------------------
+C         DECLARATIONS
+C ----------------------------------------------------------
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      KPP_REAL Y(N),YHAT(N),Z(N),Y0(N),Z1(N),Z2(N),Z3(N),Z4(N),Z5(N)
+      KPP_REAL SCAL(N),F1(N),G1(N),H1(N)
+      KPP_REAL FJAC(LU_NONZERO),E(LU_NONZERO),FMAS(LDMAS,N)
+      KPP_REAL AbsTol(1),RelTol(1)
+      INTEGER IP(N),IPHES(N)
+      LOGICAL REJECT,FIRST,IMPLCT,BANDED,CALJAC,NEWTRE
+      COMMON /CONT/NN,NN2,NN3,NN4,XOLD,HSOL,CONT(5*NVAR)
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      EXTERNAL MAS, FCN, JAC
+
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+
+C --------- DUPLIFY N FOR COMMON BLOCK CONT -----
+      NN=N
+      NN2=2*N
+      NN3=3*N
+      NN4=4*N
+
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF(IMPLCT) CALL MAS(N,FMAS,LDMAS)
+
+C ---------- CONSTANTS ---------
+      MBDIAG=MUMAS+1
+      IF (METH.EQ.2) THEN
+C ---------- METHOD WITH GAMMA = 4/15 ---------------
+          GAMMA=4.0D0/15.0D0
+          C2=23.0D0/30.0D0
+          C3=17.0D0/30.0D0
+          C4=2881.0D0/28965.0D0+GAMMA
+          ALPH21=15.0D0/8.0D0
+          ALPH31=1577061.0D0/922880.0D0
+          ALPH32=-23427.0D0/115360.0D0
+          ALPH41=647163682356923881.0D0/2414496535205978880.0D0
+          ALPH42=-593512117011179.0D0/3245291041943520.0D0
+          ALPH43=559907973726451.0D0/1886325418129671.0D0
+          ALPH51=724545451.0D0/796538880.0D0
+          ALPH52=-830832077.0D0/267298560.0D0
+          ALPH53=30957577.0D0/2509272.0D0
+          ALPH54=-69863904375173.0D0/6212571137048.0D0
+          E1=7752107607.0D0/11393456128.0D0
+          E2=-17881415427.0D0/11470078208.0D0
+          E3=2433277665.0D0/179459416.0D0
+          E4=-96203066666797.0D0/6212571137048.0D0
+          D11= 24.74416644927758D0
+          D12= -4.325375951824688D0
+          D13= 41.39683763286316D0
+          D14= -61.04144619901784D0
+          D15= -3.391332232917013D0
+          D21= -51.98245719616925D0
+          D22= 10.52501981094525D0
+          D23= -154.2067922191855D0
+          D24= 214.3082125319825D0
+          D25= 14.71166018088679D0
+          D31= 33.14347947522142D0
+          D32= -19.72986789558523D0
+          D33= 230.4878502285804D0
+          D34= -287.6629744338197D0
+          D35= -18.99932366302254D0
+          D41= -5.905188728329743D0
+          D42= 13.53022403646467D0
+          D43= -117.6778956422581D0
+          D44= 134.3962081008550D0
+          D45= 8.678995715052762D0
+         ETA1=23.D0/8.D0
+         ANU1= 0.9838473040915402D0
+         ANU2= 0.3969226768377252D0
+         AMU1= 0.6563374010466914D0
+         AMU3= 0.3372498196189311D0
+      ELSE
+         PRINT *, 'WRONG  CHOICE OF <METH>'
+      END IF
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAX1=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAX1)
+      H=SIGN(H,POSNEG)
+      HOLD=H
+      CFAC=SAFE*(1+2*NIT)
+      NEWTRE=.FALSE.
+      REJECT=.FALSE.
+      FIRST=.TRUE.
+      FACCO1=1.D0
+      FACCO2=1.D0
+      FACCO3=1.D0
+      FACCO4=1.D0
+      FACCO5=1.D0
+      NSING=0
+      XOLD=X
+      IF (ITOL.EQ.0) THEN
+          DO 8 I=1,N
+   8      SCAL(I)=1.D0 / ( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+      ELSE
+          DO 9 I=1,N
+   9      SCAL(I)=1.D0 / ( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+      END IF
+
+C --- BASIC INTEGRATION STEP
+  10  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      CALL JAC(N,X,Y,FJAC)
+      CALJAC=.TRUE.
+  20  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+C *** *** *** *** *** *** ***
+      FAC1=1.D0/(H*GAMMA)
+      IF (IMPLCT) THEN
+         print *, 'IMPLCT 4'
+      ELSE  ! EXPLICIT SYSTEM
+C --- THE MATRIX E (MAS=IDENTITY, JACOBIAN A FULL MATRIX)
+c         DO 526 J=1,N
+c           DO 525 I=1,N
+c 525         E(I,J)=-FJAC(I,J)
+c 526       E(J,J)=E(J,J)+FAC1
+c         CALL DEC(N,LE,E,IP,IER)
+          DO K=1,LU_NONZERO
+             E(K) = -FJAC(K)
+          END DO
+          DO I=1,N
+             IDG = LU_DIAG(I)
+             E(IDG) = E(IDG) + FAC1
+          END DO
+          CALL KppDecomp ( E, IER)
+
+         IF (IER.NE.0) GOTO 79
+      END IF
+      NDEC=NDEC+1
+  30  CONTINUE
+
+      IF (NSTEP.GT.NMAX.OR.X+.1D0*H.EQ.X.OR.ABS(H).LE.UROUND) GOTO 79
+      XPH=X+H
+C --- LOOP FOR THE 5 STAGES
+      FACCO1=DMAX1(FACCO1,UROUND)**0.8D0
+      FACCO2=DMAX1(FACCO2,UROUND)**0.8D0
+      FACCO3=DMAX1(FACCO3,UROUND)**0.8D0
+      FACCO4=DMAX1(FACCO4,UROUND)**0.8D0
+      FACCO5=DMAX1(FACCO5,UROUND)**0.8D0
+
+C *** *** *** *** *** *** ***
+C  STARTING VALUES FOR NEWTON ITERATION
+C *** *** *** *** *** *** ***
+      DO 59 ISTAGE=1,5
+      IF (ISTAGE.EQ.1) THEN
+          XCH=X+GAMMA*H
+          IF (FIRST.OR.NEWTRE) THEN
+              DO 132 I=1,N
+ 132          Z(I)=0.D0
+          ELSE
+              S=1.D0+GAMMA*H/HOLD
+              DO 232 I=1,N
+c  232          Z(I) = 0.D0
+ 232          Z(I)=S*(CONT(I+NN)+S*(CONT(I+NN2)+S*(CONT(I+NN3)
+     &             +S*CONT(I+NN4))))-YHAT(I)
+
+          END IF
+          DO 31 I=1,N
+  31      G1(I)=0.D0
+          FACCON=FACCO1
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          XCH=X+C2*H
+          DO 131 I=1,N
+          Z1I=Z1(I)
+          Z(I)=ETA1*Z1I
+ 131      G1(I)=ALPH21*Z1I
+          FACCON=FACCO2
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          XCH=X+C3*H
+          DO 231 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z(I)=ANU1*Z1I+ANU2*Z2I
+ 231      G1(I)=ALPH31*Z1I+ALPH32*Z2I
+          FACCON=FACCO3
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          XCH=X+C4*H
+          DO 331 I=1,N
+          Z1I=Z1(I)
+          Z3I=Z3(I)
+          Z(I)=AMU1*Z1I+AMU3*Z3I
+ 331      G1(I)=ALPH41*Z1I+ALPH42*Z2(I)+ALPH43*Z3I
+          FACCON=FACCO4
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          XCH=XPH
+          DO 431 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z(I)=E1*Z1I+E2*Z2I+E3*Z3I+E4*Z4I
+          YHAT(I)=Z(I)
+ 431      G1(I)=ALPH51*Z1I+ALPH52*Z2I+ALPH53*Z3I+ALPH54*Z4I
+          FACCON=FACCO5
+      END IF
+
+
+
+C *** *** *** *** *** *** *** *** *** *** ***
+C  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+C *** *** *** *** *** *** *** *** *** *** ***
+            NEWT=0
+            THETA=ABS(THET)
+            IF (REJECT) THETA=2*ABS(THET)
+  40        CONTINUE
+            IF (NEWT.GE.NIT) THEN
+                H=H/2.D0
+                REJECT=.TRUE.
+                NEWTRE=.TRUE.
+                IF (CALJAC) GOTO 20
+                GOTO 10
+            END IF
+
+C ---     COMPUTE THE RIGHT-HAND SIDE
+            DO 41 I=1,N
+            H1(I)=G1(I)-Z(I)
+  41        CONT(I)=Y(I)+Z(I)
+            CALL FCN(N,XCH,CONT,F1)
+            NFCN=NFCN+1
+
+C ---     KppSolve THE LINEAR SYSTEMS
+            IF (IMPLCT) THEN
+                print *, 'IMPLCT 2'
+            ELSE
+                DO 345 I=1,N
+ 345            F1(I)=H1(I)*FAC1+F1(I)
+C                CALL SOL(N,LE,E,F1,IP)
+                CALL KppSolve(E, F1)
+            END IF
+            NEWT=NEWT+1
+            DYNO=0.D0
+C --- NORM 2 ---
+            DO 57 I=1,N
+  57        DYNO=DYNO+(F1(I)*SCAL(I))**2
+            DYNO=DSQRT(DYNO/N)
+C --- NORM INF ---
+C            DO 57 I=1,N
+C  57        DYNO=DMAX1( DYNO, DABS(F1(I)*SCAL(I)) )
+
+
+C ---     BAD CONVERGENCE OR NUMBER OF ITERATIONS TO LARGE
+            IF (NEWT.GE.2.AND.NEWT.LT.NIT) THEN
+                THETA=DYNO/DYNOLD
+                IF (THETA.LT.0.99D0) THEN
+                    FACCON=THETA/(1.0D0-THETA)
+                    DYTH=FACCON*DYNO*THETA**(NIT-1-NEWT)
+                    QNEWT=DMAX1(1.0D-4,DMIN1(16.0D0,DYTH/FNEWT))
+                    IF (QNEWT.GE.1.0D0) THEN
+                         H=.8D0*H*QNEWT**(-1.0D0/(NIT-NEWT))
+                         REJECT=.TRUE.
+                         NEWTRE=.TRUE.
+                         IF (CALJAC) GOTO 20
+                         GOTO 10
+                    END IF
+                ELSE
+                    NEWTRE=.TRUE.
+                    GOTO 78
+                END IF
+            END IF
+            DYNOLD=DYNO
+            DO 58 I=1,N
+  58        Z(I)=Z(I)+F1(I)
+            NSOL=NSOL+1
+            IF (FACCON*DYNO.GT.FNEWT) GOTO 40
+
+C --- END OF SIMPILFIED NEWTON
+      IF (ISTAGE.EQ.1) THEN
+          DO I=1,N
+            Z1(I) = Z(I)
+          END DO
+          FACCO1=FACCON
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          DO I=1,N
+            Z2(I) = Z(I)
+          END DO
+          FACCO2=FACCON
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          DO I=1,N
+            Z3(I) = Z(I)
+          END DO
+          FACCO3=FACCON
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          DO I=1,N
+            Z4(I) = Z(I)
+          END DO
+          FACCO4=FACCON
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          DO I=1,N
+            Z5(I) = Z(I)
+          END DO
+          FACCO5=FACCON
+      END IF
+  59  CONTINUE
+
+
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 3'
+      ELSE
+          DO 461 I=1,N
+ 461      CONT(I)=FAC1*(Z5(I)-YHAT(I))
+      END IF
+
+      CALL KppSolve(E, CONT)
+
+      ERR=0.D0
+C ---- NORM 2 ---
+      DO 64 I=1,N
+  64  ERR=ERR+(CONT(I)*SCAL(I))**2
+      ERR=DMAX1(DSQRT(ERR/N),1.D-10)
+
+C ---- NORM INF ---
+C      DO 64 I=1,N
+c  64  ERR=DMAX1( ERR, DABS( CONT(I)*SCAL(I) ) )
+
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .25<=HNEW/H<=10.
+      FAC=DMIN1(SAFE,CFAC/(NEWT+2*NIT))
+      QUOT=DMAX1(.25D0,DMIN1(10.D0,(ERR)**.25D0/FAC))
+      HNEW= H/QUOT
+
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LT.1.D0) THEN
+C --- STEP IS ACCEPTED
+         FIRST=.FALSE.
+         NACCPT=NACCPT+1
+         HOLD=H
+         XOLD=X
+C --- COEFFICIENTS FOR CONTINUOUS SOLUTION
+         DO 74 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z5I=Z5(I)
+         CONT(I)=Y(I)
+         Y(I)=Y(I)+Z5I
+         CONT(I+NN) =D11*Z1I+D12*Z2I+D13*Z3I+D14*Z4I+D15*Z5I
+         CONT(I+NN2)=D21*Z1I+D22*Z2I+D23*Z3I+D24*Z4I+D25*Z5I
+         CONT(I+NN3)=D31*Z1I+D32*Z2I+D33*Z3I+D34*Z4I+D35*Z5I
+         CONT(I+NN4)=D41*Z1I+D42*Z2I+D43*Z3I+D44*Z4I+D45*Z5I
+         YHAT(I)=Z5I
+         IF (ITOL.EQ.0) THEN
+           SCAL(I)=1.D0/( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+         ELSE
+           SCAL(I)=1.D0/( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+         END IF
+  74     CONTINUE
+         X=XPH
+         CALJAC=.FALSE.
+         IF ((X-XEND)*POSNEG+UROUND.GT.0.D0) THEN
+            H=HOPT
+            IDID=1
+            RETURN
+         END IF
+         IF (IJAC.EQ.0) CALL FCN(N,X,Y,Y0)
+         NFCN=NFCN+1
+         HNEW=POSNEG*DMIN1(DABS(HNEW),HMAX1)
+         HOPT=HNEW
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H))
+         REJECT=.FALSE.
+         NEWTRE=.FALSE.
+         IF ((X+HNEW/QUOT1-XEND)*POSNEG.GT.0.D0) THEN
+            H=XEND-X
+         ELSE
+            QT=HNEW/H
+            IF (THETA.LE.THET.AND.QT.GE.QUOT1.AND.QT.LE.QUOT2) GOTO 30
+            H = HNEW
+         END IF
+         IF (THETA.LE.THET) GOTO 20
+         GOTO 10
+
+      ELSE
+C --- STEP IS REJECTED
+         REJECT=.TRUE.
+         IF (FIRST) THEN
+             H=H/10.D0
+         ELSE
+             H=HNEW
+         END IF
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         IF (CALJAC) GOTO 20
+         GOTO 10
+      END IF
+
+C --- UNEXPECTED STEP-REJECTION
+  78  CONTINUE
+      IF (IER.NE.0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, IER=',IER,' X=',X,' H=',H
+          NSING=NSING+1
+          IF (NSING.GE.6) GOTO 79
+      END IF
+      H=H*0.5D0
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 20
+      GOTO 10
+
+C --- FAIL EXIT
+  79  WRITE (6,979) X,H,IER
+ 979  FORMAT(' EXIT OF SDIRK4 AT X=',D14.7,'   H=',D14.7,'   IER=',I4)
+      IDID=-1
+      RETURN
+      END
+C
+
+
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_sdirk4.f90	(revision 3477)
@@ -0,0 +1,972 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SDIRK - Singly-Diagonally-Implicit Runge-Kutta method                  !
+!                       (L-stable, 5 stages, order 4)                     !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+! A. Sandu - version of July 10, 2005
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve, &
+               Set2zero, WLAMCH, WAXPY, WCOPY
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+  !~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4,  &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihexit=2
+  !  SDIRK method coefficients
+  KPP_REAL :: rkAlpha(5,4), rkBeta(5,4), rkD(4,5),  &
+                   rkGamma, rkA(5,5), rkB(5), rkC(5)
+                   
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-8:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -8
+    'Step size too small: T + 10*H = T or H < Roundoff ', & ! -7
+    'No of steps exceeds maximum bound                 ', & ! -6
+    'Improper tolerance values                         ', & ! -5
+    'FacMin/FacMax/FacRej must be positive             ', & ! -4
+    'Hmin/Hmax/Hstart must be positive                 ', & ! -3
+    'Improper value for maximal no of Newton iterations', & ! -2
+    'Improper value for maximal no of steps            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+   !INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER  :: ICNTRL(20), ISTATUS(20), IERR
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+   CALL SDIRK( NVAR,TIN,TOUT,VAR,RTOL,ATOL,          &
+               RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+
+! mz_rs_20050716: IERR and ISTATUS(istp) are returned to the user who then
+! decides what to do about it, i.e. either stop the run or ignore it.
+!!$   IF (IERR < 0) THEN
+!!$        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (IERR=',IERR,')'
+!!$   ENDIF
+!!$   Ntotal = Ntotal + Nstp
+!!$   PRINT*,'NSTEPS=',Nstp, '(',Ntotal,')'
+
+    STEPMIN = RSTATUS(ihexit) ! Save last step
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) THEN
+     RSTATUS_U(:) = RSTATUS(:)
+     RSTATUS_U(1) = TOUT ! final time
+   END IF  
+   IF (PRESENT(IERR_U))    IERR_U       = IERR
+
+   END SUBROUTINE INTEGRATE
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK(N, Tinitial, Tfinal, Y, RelTol, AbsTol,     &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, IDID)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    For details on SDIRK methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    IDID            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last predicted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal,    &
+                    RelTol(NVAR), AbsTol(NVAR), RCNTRL(20)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      INTEGER, INTENT(OUT)         :: IDID
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+! Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax, &
+                       Texit, Hexit
+      INTEGER :: ITOL, NewtonMaxit, Max_no_steps, i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0
+
+!~~~>  Initialize statistics
+   Nfun = ISTATUS(ifun)
+   Njac = ISTATUS(ijac)
+   Nstp = ISTATUS(istp)
+   Nacc = ISTATUS(iacc)
+   Nrej = ISTATUS(irej)
+   Ndec = ISTATUS(idec)
+   Nsol = ISTATUS(isol)
+   Nsng = ISTATUS(isng)
+!   Nfun=0; Njac=0; Nstp=0; Nacc=0
+!   Nrej=0; Ndec=0; Nsol=0; Nsng=0
+       
+   IDID = 0
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      ITOL = 1
+   ELSE
+      ITOL = 0
+   END IF
+
+!~~~>   The maximum number of time steps admitted
+   IF (ICNTRL(3) == 0) THEN
+      Max_no_steps = 100000
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(3)
+   ELSE
+      PRINT * ,'User-selected ICNTRL(3)=',ICNTRL(3)
+      CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,IDID)
+   END IF
+
+
+!~~~> The maximum number of Newton iterations admitted
+   IF(ICNTRL(4) == 0)THEN
+      NewtonMaxit=8
+   ELSE
+      NewtonMaxit=ICNTRL(4)
+      IF(NewtonMaxit <= 0)THEN
+          PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+          CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,IDID)
+      END IF
+   END IF
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN
+      Hmin = RCNTRL(1)
+   ELSE
+      PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+      CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,IDID)
+   END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tfinal-Tinitial)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+      CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,IDID)
+   END IF
+   
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,Roundoff)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,IDID)
+   END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2_dp
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 10.0_dp
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1_dp
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9_dp
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,IDID)
+   END IF
+
+!~~~> DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> STOPPING CRITERION FOR NEWTON'S METHOD
+      IF(RCNTRL(9) == 0.0d0)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol =RCNTRL(9)
+      END IF
+
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == 0.D0)THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == 0.D0)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= 0.D0.OR.RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,IDID)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,IDID)
+            END IF
+         END DO
+      END IF
+    
+    IF (IDID < 0) RETURN
+
+
+!~~~> CALL TO CORE INTEGRATOR 
+    CALL SDIRK_Integrator( N,Tinitial,Tfinal,Y,Hmin,Hmax,Hstart, &
+          RelTol,AbsTol,ITOL, Max_no_steps, NewtonMaxit,         &
+          Roundoff, FacMin, FacMax, FacRej, FacSafe, ThetaMin,   &
+          NewtonTol, Qmin, Qmax, Hexit, Texit, IDID )
+
+!~~~>  Collect run statistics
+   ISTATUS(ifun) = Nfun
+   ISTATUS(ijac) = Njac
+   ISTATUS(istp) = Nstp
+   ISTATUS(iacc) = Nacc
+   ISTATUS(irej) = Nrej
+   ISTATUS(idec) = Ndec
+   ISTATUS(isol) = Nsol
+   ISTATUS(isng) = Nsng
+!~~~> Last T and H
+   RSTATUS(:)      = 0.0_dp
+   RSTATUS(itexit) = Texit
+   RSTATUS(ihexit) = Hexit
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  PROCEDURES INTERNAL TO SDIRK
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_Integrator( N,Tinitial,Tfinal,Y,Hmin,Hmax,Hstart, &
+                RelTol,AbsTol,ITOL, Max_no_steps, NewtonMaxit,        &
+                Roundoff, FacMin, FacMax, FacRej, FacSafe, ThetaMin,  &
+                NewtonTol, Qmin, Qmax, Hexit, Texit, IDID )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     CORE INTEGRATOR FOR SDIRK4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER :: N
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal, Hmin, Hmax, Hstart, &
+                        RelTol(NVAR), AbsTol(NVAR), Roundoff,            &
+                        FacMin, FacMax, FacRej, FacSafe, ThetaMin,       &
+                        NewtonTol, Qmin, Qmax
+      KPP_REAL, INTENT(OUT) :: Hexit, Texit
+      INTEGER, INTENT(IN)  :: ITOL, Max_no_steps, NewtonMaxit
+      INTEGER, INTENT(OUT) :: IDID
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,5), FV(NVAR,5), CONT(NVAR,4),      &
+                       NewtonFactor(5), SCAL(NVAR), RHS(NVAR),   &
+                       G(NVAR), Yhat(NVAR), TMP(NVAR),           &
+                       T, H, Hold, Theta, Hratio, Hmax1, W,      &
+                       HGammaInv, DYTH, QNEWT, ERR, Fac, Hnew,   &
+                       Tdirection, NewtonErr, NewtonErrOld
+      INTEGER :: i, j, ISING, istage, NewtonIter, IP(NVAR)
+      LOGICAL :: Reject, FIRST, NewtonReject, FreshJac, SkipJacUpdate, SkipLU
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL FJAC(NVAR,NVAR),  E(NVAR,NVAR)
+#else      
+      KPP_REAL FJAC(LU_NONZERO), E(LU_NONZERO)
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  INITIALISATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      CALL SDIRK_Coefficients
+      T = Tinitial
+      Tdirection = SIGN(1.D0,Tfinal-Tinitial)
+      Hmax1=MIN(ABS(Hmax),ABS(Tfinal-Tinitial))
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax1)
+      H=SIGN(H,Tdirection)
+      Hold=H
+      NewtonReject=.FALSE.
+      SkipLU =.FALSE.
+      FreshJac = .FALSE.
+      SkipJacUpdate = .FALSE.
+      Reject=.FALSE.
+      FIRST=.TRUE.
+      NewtonFactor(1:5)=ONE
+
+      CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( SkipLU ) THEN ! This time around skip the Jac update and LU
+         SkipLU = .FALSE.; FreshJac = .FALSE.; SkipJacUpdate = .FALSE.
+      ELSE
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   FreshJac, SkipJacUpdate, E, IP, Reject, ISING )
+         IF (ISING /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,IDID); RETURN
+         END IF
+      END IF      
+
+      IF (Nstp>Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,IDID); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,IDID); RETURN
+      END IF   
+
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>    NEWTON ITERATION
+stages:DO istage=1,5
+
+      NewtonFactor(istage) = MAX(NewtonFactor(istage),Roundoff)**0.8d0
+
+!~~~>  STARTING VALUES FOR NEWTON ITERATION
+      CALL Set2zero(N,G)
+      CALL Set2zero(N,Z(1,istage))
+      IF (istage==1) THEN
+          IF (FIRST.OR.NewtonReject) THEN
+              CALL Set2zero(N,Z(1,istage))
+          ELSE
+              W=ONE+rkGamma*H/Hold
+              DO i=1,N
+                Z(i,istage)=W*(CONT(i,1)+W*(CONT(i,2)+W*(CONT(i,3)+W*CONT(i,4))))-Yhat(i)
+              END DO     
+          END IF
+      ELSE
+          DO j = 1, istage-1
+            ! Gj(:) = sum_j Beta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+            CALL WAXPY(N,rkBeta(istage,j),Z(1,j),1,G,1)
+            ! CALL WAXPY(N,H*rkA(istage,j),FV(1,j),1,G,1)
+            ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+            CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+          END DO
+          IF (istage==5) CALL WCOPY(N,Z(1,istage),1,Yhat,1)  ! Yhat(:) <- Z5(:)
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            NewtonIter=0
+            Theta=ABS(ThetaMin)
+            IF (Reject) Theta=2*ABS(ThetaMin)
+            NewtonErr = 1.0e+6 ! To force-enter Newton loop
+            
+  Newton:   DO WHILE (NewtonFactor(istage)*NewtonErr > NewtonTol)
+            
+            IF (NewtonIter >= NewtonMaxit) THEN
+                H=H*0.5d0
+                Reject=.TRUE.
+                NewtonReject=.TRUE.
+                CYCLE Tloop
+            END IF
+            NewtonIter=NewtonIter+1
+
+!~~~>     COMPUTE THE RIGHT-HAND SIDE
+            TMP(1:N) = Y(1:N) + Z(1:N,istage)
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,RHS)
+            TMP(1:N) = G(1:N) - Z(1:N,istage)
+            CALL WAXPY(N,HGammaInv,TMP,1,RHS,1) ! RHS(:) <- RHS(:) + HGammaInv*(G(:)-Z(:))
+
+!~~~>     SOLVE THE LINEAR SYSTEMS
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+            CALL KppSolve(E, RHS)
+#endif
+            Nsol=Nsol+1
+            
+!~~~>     CHECK CONVERGENCE OR IF NUMBER OF ITERATIONS TOO LARGE
+            CALL SDIRK_ErrorNorm(N, RHS, SCAL, NewtonErr)
+            IF ( (NewtonIter >= 2) .AND. (NewtonIter < NewtonMaxit) ) THEN
+                Theta = NewtonErr/NewtonErrOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonFactor(istage)=Theta/(ONE-Theta)
+                    DYTH = NewtonFactor(istage)*NewtonErr* &
+                           Theta**(NewtonMaxit-1-NewtonIter)
+                    QNEWT = MAX(1.0d-4,MIN(16.0d0,DYTH/NewtonTol))
+                    IF (QNEWT >= ONE) THEN
+                         H=.8D0*H*QNEWT**(-ONE/(NewtonMaxit-NewtonIter))
+                         Reject=.TRUE.
+                         NewtonReject=.TRUE.
+                         CYCLE Tloop ! go back to the beginning of DO step
+                    END IF
+                ELSE
+                    NewtonReject=.TRUE.
+                    H=H*0.5d0
+                    Reject=.TRUE.
+                    CYCLE Tloop ! go back to the beginning of DO step
+                END IF
+            END IF
+            NewtonErrOld = NewtonErr
+            CALL WAXPY(N,ONE,RHS,1,Z(1,istage),1) ! Z(:) <-- Z(:)+RHS(:)
+            
+            END DO Newton
+
+!~~> END OF SIMPLIFIED NEWTON ITERATION
+            ! Save function values
+            TMP(1:N) = Y(1:N) + Z(1:N,istage)
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,FV(1,istage))
+
+   END DO stages
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  ERROR ESTIMATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Nstp=Nstp+1
+      TMP(1:N)=HGammaInv*(Z(1:N,5)-Yhat(1:N))
+
+#ifdef FULL_ALGEBRA  
+      CALL DGETRS( 'N', N, 1, E, N, IP, TMP, N, ISING )
+#else
+      CALL KppSolve(E, TMP)
+#endif
+
+      CALL SDIRK_ErrorNorm(N, TMP, SCAL, ERR)
+
+!~~~> COMPUTATION OF Hnew: WE REQUIRE FacMin <= Hnew/H <= FacMax
+      !Safe = FacSafe*DBLE(1+2*NewtonMaxit)/DBLE(NewtonIter+2*NewtonMaxit)
+      Fac  = MAX(FacMin,MIN(FacMax,(ERR)**(-0.25d0)*FacSafe))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  ACCEPT/Reject STEP
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:  IF ( ERR < ONE ) THEN !~~~> STEP IS ACCEPTED
+
+         FIRST=.FALSE.
+         Nacc=Nacc+1
+         Hold=H
+
+!~~~> COEFFICIENTS FOR CONTINUOUS SOLUTION
+         CALL WAXPY(N,ONE,Z(1,5),1,Y,1) ! Y(:) <-- Y(:)+Z5(:)
+         CALL WCOPY(N,Z(1,5),1,Yhat,1)  ! Yhat <-- Z5
+
+         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+           CALL Set2zero(N,CONT(1,i))
+           DO j = 1,5
+             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+           END DO
+         END DO
+         
+         CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+         T=T+H
+         FreshJac=.FALSE.
+
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax1)
+         Hexit = Hnew
+         IF (Reject) Hnew=Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         NewtonReject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > 0.D0) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much, keep it as is;
+            !    do not update Jacobian and reuse LU
+            IF ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) ) THEN
+               SkipJacUpdate = .TRUE. 
+               SkipLU        = .TRUE. 
+            ELSE   
+               H = Hnew
+            END IF   
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+         IF (Theta <= ThetaMin) SkipJacUpdate = .TRUE. 
+
+      ELSE accept !~~~> STEP IS REJECTED
+
+         Reject=.TRUE.
+         IF (FIRST) THEN
+             H=H*FacRej
+         ELSE
+             H=Hnew
+         END IF
+         IF (Nacc >= 1) Nrej=Nrej+1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Texit = T
+      IDID  = 1
+  
+      END SUBROUTINE SDIRK_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,NVAR
+          SCAL(i) = 1.0d0 / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,NVAR
+          SCAL(i) = 1.0d0 / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, ERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), ERR      
+      ERR=0.0d0
+      DO i=1,N
+           ERR = ERR+(Y(i)*SCAL(i))**2
+      END DO
+      ERR = MAX( SQRT(ERR/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SDIRK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+   IF ((Code>=-8).AND.(Code<=-1)) THEN
+     PRINT *, IERR_NAMES(Code)
+   ELSE
+     PRINT *, 'Unknown Error code: ', Code
+   ENDIF
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   FreshJac, SkipJacUpdate, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)  :: FreshJac, SkipJacUpdate
+      INTEGER, INTENT(OUT)    :: ISING, IP(NVAR)
+      LOGICAL, INTENT(INOUT)  :: Reject
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                 :: i, j, ConsecutiveSng
+      KPP_REAL, PARAMETER     :: ONE = 1.0d0
+
+ 20   CONTINUE
+
+!~~~>  COMPUTE THE JACOBIAN
+      IF (SkipJacUpdate) THEN
+          SkipJacUpdate = .FALSE.
+      ELSE IF ( .NOT.FreshJac  ) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          FreshJac = .TRUE.
+      END IF  
+
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j)=-FJAC(i,j)
+         END DO
+         E(j,j)=E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      Ndec=Ndec+1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          Nsng = Nsng+1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H=H*0.5d0
+          Reject=.TRUE.
+          !~~~> Update Jacobian if not fresh
+          IF ( .NOT.FreshJac ) GOTO 20
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Coefficients
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+          rkGamma=4.0d0/15.0d0
+          
+          rkA(1,1)= 4.d0/15.d0
+          rkA(2,1)= 1.d0/2.d0
+          rkA(2,2)= 4.d0/15.d0
+          rkA(3,1)= 51069.d0/144200.d0
+          rkA(3,2)=-7809.d0/144200.d0
+          rkA(3,3)= 4.d0/15.d0 
+          rkA(4,1)= 12047244770625658.d0/141474406359725325.d0
+          rkA(4,2)=-3057890203562191.d0/47158135453241775.d0
+          rkA(4,3)= 2239631894905804.d0/28294881271945065.d0
+          rkA(4,4)= 4.d0/15.d0
+          rkA(5,1)= 181513.d0/86430.d0
+          rkA(5,2)=-89074.d0/116015.d0
+          rkA(5,3)= 83636.d0/34851.d0
+          rkA(5,4)=-69863904375173.d0/23297141763930.d0
+          rkA(5,5)= 4.d0/15.d0
+     
+          rkB(1)= 181513.d0/86430.d0
+          rkB(2)=-89074.d0/116015.d0
+          rkB(3)= 83636.d0/34851.d0
+          rkB(4)=-69863904375173.d0/23297141763930.d0
+          rkB(5)= 4/15.d0
+     
+          rkC(1)=4.d0/15.d0
+          rkC(2)=23.d0/30.d0
+          rkC(3)=17.d0/30.d0
+          rkC(4)=707.d0/1931.d0
+          rkC(5)=1.d0
+          
+          rkBeta(2,1)=15.0d0/8.0d0
+          rkBeta(3,1)=1577061.0d0/922880.0d0
+          rkBeta(3,2)=-23427.0d0/115360.0d0
+          rkBeta(4,1)=647163682356923881.0d0/2414496535205978880.0d0
+          rkBeta(4,2)=-593512117011179.0d0/3245291041943520.0d0
+          rkBeta(4,3)=559907973726451.0d0/1886325418129671.0d0
+          rkBeta(5,1)=724545451.0d0/796538880.0d0
+          rkBeta(5,2)=-830832077.0d0/267298560.0d0
+          rkBeta(5,3)=30957577.0d0/2509272.0d0
+          rkBeta(5,4)=-69863904375173.0d0/6212571137048.0d0
+          
+          rkAlpha(2,1)= 23.d0/8.d0
+          rkAlpha(3,1)= 0.9838473040915402d0
+          rkAlpha(3,2)= 0.3969226768377252d0
+          rkAlpha(4,1)= 0.6563374010466914d0
+          rkAlpha(4,2)= 0.0d0
+          rkAlpha(4,3)= 0.3372498196189311d0
+          rkAlpha(5,1)=7752107607.0d0/11393456128.0d0
+          rkAlpha(5,2)=-17881415427.0d0/11470078208.0d0
+          rkAlpha(5,3)=2433277665.0d0/179459416.0d0
+          rkAlpha(5,4)=-96203066666797.0d0/6212571137048.0d0
+          
+          rkD(1,1)= 24.74416644927758d0
+          rkD(1,2)= -4.325375951824688d0
+          rkD(1,3)= 41.39683763286316d0
+          rkD(1,4)= -61.04144619901784d0
+          rkD(1,5)= -3.391332232917013d0
+          rkD(2,1)= -51.98245719616925d0
+          rkD(2,2)= 10.52501981094525d0
+          rkD(2,3)= -154.2067922191855d0
+          rkD(2,4)= 214.3082125319825d0
+          rkD(2,5)= 14.71166018088679d0
+          rkD(3,1)= 33.14347947522142d0
+          rkD(3,2)= -19.72986789558523d0
+          rkD(3,3)= 230.4878502285804d0
+          rkD(3,4)= -287.6629744338197d0
+          rkD(3,5)= -18.99932366302254d0
+          rkD(4,1)= -5.905188728329743d0
+          rkD(4,2)= 13.53022403646467d0
+          rkD(4,3)= -117.6778956422581d0
+          rkD(4,4)= 134.3962081008550d0
+          rkD(4,5)= 8.678995715052762d0
+          
+      END SUBROUTINE SDIRK_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRK ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y,  FIX, RCONST, P )
+      
+      TIME = Told
+      Nfun=Nfun+1
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+  
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO j=1,NVAR
+          JV(i,j) = 0.0D0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+      Njac = Njac+1
+
+      END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_seulex
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.f	(revision 3477)
@@ -0,0 +1,1174 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      PARAMETER (KM=12,KM2=2+KM*(KM+3)/2,NRDENS=NVAR)
+      PARAMETER (LWORK=2*NVAR*NVAR+(KM+8)*NVAR+4*KM+20+KM2*NRDENS)
+      PARAMETER (LIWORK=2*NVAR+KM+20+NRDENS)
+
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      IDFX=0     ! --- INTERNAL TIME DERIVATIVE
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      CALL ATMSEULEX(NVAR,FUNC_CHEM,Autonomous,TIN,VAR,TOUT,
+     &                  STEPMIN,RTOL,ATOL,ITOL,
+     &                  JAC_CHEM,IJAC,MLJAC,MUJAC,
+     &                  FUNC_CHEM,IMAS,MLJAC,MUJAC,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMSEULEX: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMSEULEX(N,FCN,IFCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,
+     &                  MAS,IMAS,MLMAS,MUMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(X,Y).
+C     THIS IS AN EXTRAPOLATION-ALGORITHM, BASED ON THE
+C     LINEARLY IMPLICIT EULER METHOD (WITH STEP SIZE CONTROL
+C     AND ORDER SELECTION).
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND
+C              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+C              INCLUSION OF DENSE OUTPUT BY E. HAIRER AND A. OSTERMANN
+C
+C     THIS CODE IS PART OF THE BOOK:
+C         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+C         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+C         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+C         SPRINGER-VERLAG (1991)
+C
+C     VERSION OF SEPTEMBER 30, 1995
+C
+C     INPUT PARAMETERS
+C     ----------------
+C     N           DIMENSION OF THE SYSTEM
+C
+C     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+C                 VALUE OF F(X,Y):
+C                    SUBROUTINE FCN(N,X,Y,F)
+C                    KPP_REAL X,Y(N),F(N)
+C                    F(1)=...   ETC.
+C                 RPAR, IPAR (SEE BELOW)
+C
+C     IFCN        GIVES INFORMATION ON FCN:
+C                    IFCN=0: F(X,Y) INDEPENDENT OF X (AUTONOMOUS)
+C                    IFCN=1: F(X,Y) MAY DEPEND ON X (NON-AUTONOMOUS)
+C
+C     X           INITIAL X-VALUE
+C
+C     Y(N)        INITIAL VALUES FOR Y
+C
+C     XEND        FINAL X-VALUE (XEND-X MAY BE POSITIVE OR NEGATIVE)
+C
+C     H           INITIAL STEP SIZE GUESS;
+C                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT,
+C                 H=1.D0/(NORM OF F'), USUALLY 1.D-2 OR 1.D-3, IS GOOD.
+C                 THIS CHOICE IS NOT VERY IMPORTANT, THE CODE QUICKLY
+C                 ADAPTS ITS STEP SIZE (IF H=0.D0, THE CODE PUTS H=1.D-6).
+C
+C     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+C                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+C
+C     ITOL        SWITCH FOR RelTol AND AbsTol:
+C                   ITOL=0: BOTH RelTol AND AbsTol ARE SCALARS.
+C                     THE CODE KEEPS, ROUGHLY, THE LOCAL ERROR OF
+C                     Y(I) BELOW RelTol*ABS(Y(I))+AbsTol
+C                   ITOL=1: BOTH RelTol AND AbsTol ARE VECTORS.
+C                     THE CODE KEEPS THE LOCAL ERROR OF Y(I) BELOW
+C                     RelTol(I)*ABS(Y(I))+AbsTol(I).
+C
+C     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO Y
+C                 (THIS ROUTINE IS ONLY CALLED IF IJAC=1; SUPPLY
+C                 A DUMMY SUBROUTINE IN THE CASE IJAC=0).
+C                 FOR IJAC=1, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE JAC(N,X,Y,DFY,LDFY)
+C                    KPP_REAL X,Y(N),DFY(LDFY,N)
+C                    DFY(1,1)= ...
+C                 LDFY, THE COLOMN-LENGTH OF THE ARRAY, IS
+C                 FURNISHED BY THE CALLING PROGRAM.
+C                 IF (MLJAC.EQ.N) THE JACOBIAN IS SUPPOSED TO
+C                    BE FULL AND THE PARTIAL DERIVATIVES ARE
+C                    STORED IN DFY AS
+C                       DFY(I,J) = PARTIAL F(I) / PARTIAL Y(J)
+C                 ELSE, THE JACOBIAN IS TAKEN AS BANDED AND
+C                    THE PARTIAL DERIVATIVES ARE STORED
+C                    DIAGONAL-WISE AS
+C                       DFY(I-J+MUJAC+1,J) = PARTIAL F(I) / PARTIAL Y(J).
+C
+C     IJAC        SWITCH FOR THE COMPUTATION OF THE JACOBIAN:
+C                    IJAC=0: JACOBIAN IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "JAC" IS NEVER CALLED.
+C                    IJAC=1: JACOBIAN IS SUPPLIED BY SUBROUTINE JAC.
+C
+C     MLJAC       SWITCH FOR THE BANDED STRUCTURE OF THE JACOBIAN:
+C                    MLJAC=N: JACOBIAN IS A FULL MATRIX. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLJAC<N: MLJAC IS THE LOWER BANDWITH OF JACOBIAN
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C
+C     MUJAC       UPPER BANDWITH OF JACOBIAN  MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLJAC=N.
+C
+C     ----   MAS,IMAS,MLMAS, AND MUMAS HAVE ANALOG MEANINGS      -----
+C     ----   FOR THE "MASS MATRIX" (THE MATRIX "M" OF SECTION IV.8): -
+C
+C     MAS         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE MASS-
+C                 MATRIX M.
+C                 IF IMAS=0, THIS MATRIX IS ASSUMED TO BE THE IDENTITY
+C                 MATRIX AND NEEDS NOT TO BE DEFINED;
+C                 SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C                 IF IMAS=1, THE SUBROUTINE MAS IS OF THE FORM
+C                    SUBROUTINE MAS(N,AM,LMAS)
+C                    KPP_REAL AM(LMAS,N)
+C                    AM(1,1)= ....
+C                    IF (MLMAS.EQ.N) THE MASS-MATRIX IS STORED
+C                    AS FULL MATRIX LIKE
+C                         AM(I,J) = M(I,J)
+C                    ELSE, THE MATRIX IS TAKEN AS BANDED AND STORED
+C                    DIAGONAL-WISE AS
+C                         AM(I-J+MUMAS+1,J) = M(I,J).
+C
+C     IMAS       GIVES INFORMATION ON THE MASS-MATRIX:
+C                    IMAS=0: M IS SUPPOSED TO BE THE IDENTITY
+C                       MATRIX, MAS IS NEVER CALLED.
+C                    IMAS=1: MASS-MATRIX  IS SUPPLIED.
+C
+C     MLMAS       SWITCH FOR THE BANDED STRUCTURE OF THE MASS-MATRIX:
+C                    MLMAS=N: THE FULL MATRIX CASE. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLMAS<N: MLMAS IS THE LOWER BANDWITH OF THE
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C                 MLMAS IS SUPPOSED TO BE .LE. MLJAC.
+C
+C     MUMAS       UPPER BANDWITH OF MASS-MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLMAS=N.
+C                 MUMAS IS SUPPOSED TO BE .LE. MUJAC.
+C
+C     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+C                 NUMERICAL SOLUTION DURING INTEGRATION.
+C                 IF IOUT>=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+C                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0.
+C                 IT MUST HAVE THE FORM
+C                    SUBROUTINE SOLOUT (NR,XOLD,X,Y,RC,LRC,IC,LIC,N,
+C                                       RPAR,IPAR,IRTRN)
+C                    KPP_REAL X,Y(N),RC(LRC),IC(LIC)
+C                    ....
+C                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+C                    GRID-POINT "X" (THEREBY THE INITIAL VALUE IS
+C                    THE FIRST GRID-POINT).
+C                 "XOLD" IS THE PRECEEDING GRID-POINT.
+C                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+C                    IS SET <0, SEULEX RETURNS TO THE CALLING PROGRAM.
+C                 DO NOT CHANGE THE ENTRIES OF RC(LRC),IC(LIC)!
+C
+C          -----  CONTINUOUS OUTPUT (IF IOUT=2): -----
+C                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+C                 FOR THE INTERVAL [XOLD,X] IS AVAILABLE THROUGH
+C                 THE KPP_REAL FUNCTION
+C                        >>>   CONTEX(I,S,RC,LRC,IC,LIC)   <<<
+C                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+C                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+C                 S SHOULD LIE IN THE INTERVAL [XOLD,X].
+C
+C     IOUT        GIVES INFORMATION ON THE SUBROUTINE SOLOUT:
+C                    IOUT=0: SUBROUTINE IS NEVER CALLED
+C                    IOUT=1: SUBROUTINE IS USED FOR OUTPUT
+C                    IOUT=2: DENSE OUTPUT IS PERFORMED IN SOLOUT
+C
+C     WORK        ARRAY OF WORKING SPACE OF LENGTH "LWORK".
+C                 SERVES AS WORKING SPACE FOR ALL VECTORS AND MATRICES.
+C                 "LWORK" MUST BE AT LEAST
+C                        N*(LJAC+LMAS+LE1+KM+8)+4*KM+20+KM2*NRDENS
+C                 WHERE
+C                    KM2=2+KM*(KM+3)/2  AND  NRDENS=IWORK(6) (SEE BELOW)
+C                 AND
+C                    LJAC=N              IF MLJAC=N (FULL JACOBIAN)
+C                    LJAC=MLJAC+MUJAC+1  IF MLJAC<N (BANDED JAC.)
+C                 AND
+C                    LMAS=0              IF IMAS=0
+C                    LMAS=N              IF IMAS=1 AND MLMAS=N (FULL)
+C                    LMAS=MLMAS+MUMAS+1  IF MLMAS<N (BANDED MASS-M.)
+C                 AND
+C                    LE1=N               IF MLJAC=N (FULL JACOBIAN)
+C                    LE1=2*MLJAC+MUJAC+1 IF MLJAC<N (BANDED JAC.).
+C                 AND
+C                    KM=12               IF IWORK(3)=0
+C                    KM=IWORK(3)         IF IWORK(3).GT.0
+C
+C                 IN THE USUAL CASE WHERE THE JACOBIAN IS FULL AND THE
+C                 MASS-MATRIX IS THE INDENTITY (IMAS=0), THE MINIMUM
+C                 STORAGE REQUIREMENT IS
+C                         LWORK = 2*N*N+(KM+8)*N+4*KM+13+KM2*NRDENS.
+C                 IF IWORK(9)=M1>0 THEN "LWORK" MUST BE AT LEAST
+C                    N*(LJAC+KM+8)+(N-M1)*(LMAS+LE1)+4*KM+20+KM2*NRDENS
+C                 WHERE IN THE DEFINITIONS OF LJAC, LMAS AND LE1 THE
+C                 NUMBER N CAN BE REPLACED BY N-M1.
+C
+C     LWORK       DECLARED LENGTH OF ARRAY "WORK".
+C
+C     IWORK       INTEGER WORKING SPACE OF LENGTH "LIWORK".
+C                 "LIWORK" MUST BE AT LEAST  2*N+KM+20+NRDENS.
+C
+C     LIWORK      DECLARED LENGTH OF ARRAY "IWORK".
+C
+C     RPAR, IPAR  REAL AND INTEGER PARAMETERS (OR PARAMETER ARRAYS) WHICH
+C                 CAN BE USED FOR COMMUNICATION BETWEEN YOUR CALLING
+C                 PROGRAM AND THE FCN, JAC, MAS, SOLOUT SUBROUTINES.
+C
+C ----------------------------------------------------------------------
+C
+C     SOPHISTICATED SETTING OF PARAMETERS
+C     -----------------------------------
+C              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT WORK
+C              WELL. THEY MAY BE DEFINED BY SETTING WORK(1),..,WORK(13)
+C              AS WELL AS IWORK(1),..,IWORK(4) DIFFERENT FROM ZERO.
+C              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+C
+C    IWORK(1)  IF IWORK(1).NE.0, THE CODE TRANSFORMS THE JACOBIAN
+C              MATRIX TO HESSENBERG FORM. THIS IS PARTICULARLY
+C              ADVANTAGEOUS FOR LARGE SYSTEMS WITH FULL JACOBIAN.
+C              IT DOES NOT WORK FOR BANDED JACOBIAN (MLJAC<N)
+C              AND NOT FOR IMPLICIT SYSTEMS (IMAS=1).
+C
+C    IWORK(2)  THIS IS THE MAXIMAL NUMBER OF ALLOWED STEPS.
+C              THE DEFAULT VALUE (FOR IWORK(2)=0) IS 100000.
+C
+C    IWORK(3)  THE MAXIMUM NUMBER OF COLUMNS IN THE EXTRAPOLATION
+C              TABLE. THE DEFAULT VALUE (FOR IWORK(3)=0) IS 12.
+C              IF IWORK(3).NE.0 THEN IWORK(3) SHOULD BE .GE.3.
+C
+C    IWORK(4)  SWITCH FOR THE STEP SIZE SEQUENCE
+C              IF IWORK(4).EQ.1 THEN 1,2,3,4,6,8,12,16,24,32,48,...
+C              IF IWORK(4).EQ.2 THEN 2,3,4,6,8,12,16,24,32,48,64,...
+C              IF IWORK(4).EQ.3 THEN 1,2,3,4,5,6,7,8,9,10,...
+C              IF IWORK(4).EQ.4 THEN 2,3,4,5,6,7,8,9,10,11,...
+C              THE DEFAULT VALUE (FOR IWORK(4)=0) IS IWORK(4)=2.
+C
+C    IWORK(5)  PARAMETER "LAMBDA" OF DENSE OUTPUT; POSSIBLE VALUES
+C              ARE 0 AND 1; DEFAULT IWORK(5)=0.
+C
+C    IWORK(6)  = NRDENS = NUMBER OF COMPONENTS, FOR WHICH DENSE OUTPUT
+C              IS REQUIRED
+C
+C    IWORK(21),...,IWORK(NRDENS+20) INDICATE THE COMPONENTS, FOR WHICH
+C              DENSE OUTPUT IS REQUIRED
+C
+C       IF THE DIFFERENTIAL SYSTEM HAS THE SPECIAL STRUCTURE THAT
+C            Y(I)' = Y(I+M2)   FOR  I=1,...,M1,
+C       WITH M1 A MULTIPLE OF M2, A SUBSTANTIAL GAIN IN COMPUTERTIME
+C       CAN BE ACHIEVED BY SETTING THE FOLLOWING TWO PARAMETERS. E.G.,
+C       FOR SECOND ORDER SYSTEMS P'=V, V'=G(P,V), WHERE P AND V ARE
+C       VECTORS OF DIMENSION N/2, ONE HAS TO PUT M1=M2=N/2.
+C       FOR M1>0 SOME OF THE INPUT PARAMETERS HAVE DIFFERENT MEANINGS:
+C       - JAC: ONLY THE ELEMENTS OF THE NON-TRIVIAL PART OF THE
+C              JACOBIAN HAVE TO BE STORED
+C              IF (MLJAC.EQ.N-M1) THE JACOBIAN IS SUPPOSED TO BE FULL
+C                 DFY(I,J) = PARTIAL F(I+M1) / PARTIAL Y(J)
+C                FOR I=1,N-M1 AND J=1,N.
+C              ELSE, THE JACOBIAN IS BANDED ( M1 = M2 * MM )
+C                 DFY(I-J+MUJAC+1,J+K*M2) = PARTIAL F(I+M1) / PARTIAL Y(J+K*M2)
+C                FOR I=1,MLJAC+MUJAC+1 AND J=1,M2 AND K=0,MM.
+C       - MLJAC: MLJAC=N-M1: IF THE NON-TRIVIAL PART OF THE JACOBIAN IS FULL
+C                0<=MLJAC<N-M1: IF THE (MM+1) SUBMATRICES (FOR K=0,MM)
+C                     PARTIAL F(I+M1) / PARTIAL Y(J+K*M2),  I,J=1,M2
+C                    ARE BANDED, MLJAC IS THE MAXIMAL LOWER BANDWIDTH
+C                    OF THESE MM+1 SUBMATRICES
+C       - MUJAC: MAXIMAL UPPER BANDWIDTH OF THESE MM+1 SUBMATRICES
+C                NEED NOT BE DEFINED IF MLJAC=N-M1
+C       - MAS: IF IMAS=0 THIS MATRIX IS ASSUMED TO BE THE IDENTITY AND
+C              NEED NOT BE DEFINED. SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C              IT IS ASSUMED THAT ONLY THE ELEMENTS OF RIGHT LOWER BLOCK OF
+C              DIMENSION N-M1 DIFFER FROM THAT OF THE IDENTITY MATRIX.
+C              IF (MLMAS.EQ.N-M1) THIS SUBMATRIX IS SUPPOSED TO BE FULL
+C                 AM(I,J) = M(I+M1,J+M1)     FOR I=1,N-M1 AND J=1,N-M1.
+C              ELSE, THE MASS MATRIX IS BANDED
+C                 AM(I-J+MUMAS+1,J) = M(I+M1,J+M1)
+C       - MLMAS: MLMAS=N-M1: IF THE NON-TRIVIAL PART OF M IS FULL
+C                0<=MLMAS<N-M1: LOWER BANDWIDTH OF THE MASS MATRIX
+C       - MUMAS: UPPER BANDWIDTH OF THE MASS MATRIX
+C                NEED NOT BE DEFINED IF MLMAS=N-M1
+C
+C    IWORK(9)  THE VALUE OF M1.  DEFAULT M1=0.
+C
+C    IWORK(10) THE VALUE OF M2.  DEFAULT M2=M1.
+C
+C    WORK(1)   UROUND, THE ROUNDING UNIT, DEFAULT 1.D-16.
+C
+C    WORK(2)   MAXIMAL STEP SIZE, DEFAULT XEND-X.
+C
+C    WORK(3)   DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+C              INCREASE WORK(3), TO 0.01 SAY, WHEN JACOBIAN EVALUATIONS
+C              ARE COSTLY. FOR SMALL SYSTEMS WORK(3) SHOULD BE SMALLER.
+C              DEFAULT MIN(1.0D-4,RelTol(1))
+C
+C    WORK(4), WORK(5)   PARAMETERS FOR STEP SIZE SELECTION
+C              THE NEW STEP SIZE FOR THE J-TH DIAGONAL ENTRY IS
+C              CHOSEN SUBJECT TO THE RESTRICTION
+C                 FACMIN/WORK(5) <= HNEW(J)/HOLD <= 1/FACMIN
+C              WHERE FACMIN=WORK(4)**(1/(J-1))
+C              DEFAULT VALUES: WORK(4)=0.1D0, WORK(5)=4.D0
+C
+C    WORK(6), WORK(7)   PARAMETERS FOR THE ORDER SELECTION
+C              ORDER IS DECREASED IF    W(K-1) <= W(K)*WORK(6)
+C              ORDER IS INCREASED IF    W(K) <= W(K-1)*WORK(7)
+C              DEFAULT VALUES: WORK(6)=0.7D0, WORK(7)=0.9D0
+C
+C    WORK(8), WORK(9)   SAFETY FACTORS FOR STEP CONTROL ALGORITHM
+C             HNEW=H*WORK(9)*(WORK(8)*TOL/ERR)**(1/(J-1))
+C              DEFAULT VALUES: WORK(8)=0.8D0, WORK(9)=0.93D0
+C
+C    WORK(10), WORK(11), WORK(12), WORK(13)   ESTIMATED WORKS FOR
+C             A CALL TO  FCN, JAC, DEC, SOL, RESPECTIVELY.
+C             DEFAULT VALUES ARE: WORK(10)=1.D0, WORK(11)=5.D0,
+C             WORK(12)=1.D0, WORK(13)=1.D0.
+C
+C-----------------------------------------------------------------------
+C
+C     OUTPUT PARAMETERS
+C     -----------------
+C     X           X-VALUE WHERE THE SOLUTION IS COMPUTED
+C                 (AFTER SUCCESSFUL RETURN X=XEND)
+C
+C     Y(N)        SOLUTION AT X
+C
+C     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+C
+C     IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+C                   IDID=1  COMPUTATION SUCCESSFUL,
+C                   IDID=-1 COMPUTATION UNSUCCESSFUL.
+C
+C   IWORK(14)  NFCN    NUMBER OF FUNCTION EVALUATIONS (THOSE FOR NUMERICAL
+C                      EVALUATION OF THE JACOBIAN ARE NOT COUNTED)
+C   IWORK(15)  NJAC    NUMBER OF JACOBIAN EVALUATIONS (EITHER ANALYTICALLY
+C                      OR NUMERICALLY)
+C   IWORK(16)  NSTEP   NUMBER OF COMPUTED STEPS
+C   IWORK(17)  NACCPT  NUMBER OF ACCEPTED STEPS
+C   IWORK(18)  NREJCT  NUMBER OF REJECTED STEPS (AFTER AT LEAST ONE STEP
+C                      HAS BEEN ACCEPTED)
+C   IWORK(19)  NDEC    NUMBER OF LU-DECOMPOSITIONS (N-DIMENSIONAL MATRIX)
+C   IWORK(20)  NSOL    NUMBER OF FORWARD-BACKWARD SUBSTITUTIONS
+C-----------------------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(*),RelTol(*),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL AUTNMS,IMPLCT,ARRET,JBAND
+      EXTERNAL FCN,JAC,MAS
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS
+C *** *** *** *** *** *** ***
+      IOUT = 0
+      NFCN=0
+      NJAC=0
+      NSTEP=0
+      NACCPT=0
+      NREJCT=0
+      NDEC=0
+      NSOL=0
+      ARRET=.FALSE.
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(2).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- KM     MAXIMUM NUMBER OF COLUMNS IN THE EXTRAPOLATION
+      IF(IWORK(3).EQ.0)THEN
+         KM=12
+      ELSE
+         KM=IWORK(3)
+         IF(KM.LE.2)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NSEQU     CHOICE OF STEP SIZE SEQUENCE
+      NSEQU=IWORK(4)
+      IF(IWORK(4).EQ.0) NSEQU=2
+      IF(NSEQU.LE.0.OR.NSEQU.GE.5)THEN
+         WRITE(6,*)' CURIOUS INPUT IWORK(4)=',IWORK(4)
+         ARRET=.TRUE.
+      END IF
+C -------- LAMBDA   PARAMETER FOR DENSE OUTPUT
+      LAMBDA=IWORK(5)
+      IF(LAMBDA.LT.0.OR.LAMBDA.GE.2)THEN
+         WRITE(6,*)' CURIOUS INPUT IWORK(5)=',IWORK(5)
+         ARRET=.TRUE.
+      END IF
+C -------- NRDENS   NUMBER OF DENSE OUTPUT COMPONENTS
+      NRDENS=IWORK(6)
+      IF(NRDENS.LT.0.OR.NRDENS.GT.N)THEN
+         WRITE(6,*)' CURIOUS INPUT IWORK(6)=',IWORK(6)
+         ARRET=.TRUE.
+      END IF
+C -------- PARAMETER FOR SECOND ORDER EQUATIONS
+      M1=IWORK(9)
+      M2=IWORK(10)
+      NM1=N-M1
+      IF (M1.EQ.0) M2=N
+      IF (M2.EQ.0) M2=M1
+      IF (M1.LT.0.OR.M2.LT.0.OR.M1+M2.GT.N) THEN
+       WRITE(6,*)' CURIOUS INPUT FOR IWORK(9,10)=',M1,M2
+       ARRET=.TRUE.
+      END IF
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.0.D0.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)'  UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(2).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(2)
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(WORK(3).EQ.0.D0)THEN
+         THET=MIN(1.0D-4,RelTol(1))
+      ELSE
+         THET=WORK(3)
+      END IF
+C -------  FAC1,FAC2     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(4).EQ.0.D0)THEN
+         FAC1=0.1D0
+      ELSE
+         FAC1=WORK(4)
+      END IF
+      IF(WORK(5).EQ.0.D0)THEN
+         FAC2=4.0D0
+      ELSE
+         FAC2=WORK(5)
+      END IF
+C -------  FAC3, FAC4   PARAMETERS FOR THE ORDER SELECTION
+      IF(WORK(6).EQ.0.D0)THEN
+         FAC3=0.7D0
+      ELSE
+         FAC3=WORK(6)
+      END IF
+      IF(WORK(7).EQ.0.D0)THEN
+         FAC4=0.9D0
+      ELSE
+         FAC4=WORK(7)
+      END IF
+C ------- SAFE1, SAFE2 SAFETY FACTORS FOR STEP SIZE PREDICTION
+      IF(WORK(8).EQ.0.D0)THEN
+         SAFE1=0.6D0
+      ELSE
+         SAFE1=WORK(8)
+      END IF
+      IF(WORK(9).EQ.0.D0)THEN
+         SAFE2=0.93D0
+      ELSE
+         SAFE2=WORK(9)
+      END IF
+C ------- WKFCN,WKJAC,WKDEC,WKSOL  ESTIMATED WORK FOR  FCN,JAC,DEC,SOL
+      IF(WORK(10).EQ.0.D0)THEN
+         WKFCN=1.D0
+      ELSE
+         WKFCN=WORK(10)
+      END IF
+      IF(WORK(11).EQ.0.D0)THEN
+         WKJAC=5.D0
+      ELSE
+         WKJAC=WORK(11)
+      END IF
+      IF(WORK(12).EQ.0.D0)THEN
+         WKDEC=1.D0
+      ELSE
+         WKDEC=WORK(12)
+      END IF
+      IF(WORK(13).EQ.0.D0)THEN
+         WKSOL=1.D0
+      ELSE
+         WKSOL=WORK(13)
+      END IF
+      WKROW=WKFCN+WKSOL
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+        DO I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+        END DO
+      END IF
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- AUTONOMOUS, IMPLICIT, BANDED OR NOT ?
+      AUTNMS=IFCN.EQ.0
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.LT.NM1
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN AND MATRIX E
+      IF(JBAND)THEN
+         LDJAC=MLJAC+MUJAC+1
+         LDE=MLJAC+LDJAC
+      ELSE
+         MLJAC=NM1
+         MUJAC=NM1
+         LDJAC=NM1
+         LDE=NM1
+      END IF
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          IF (MLMAS.NE.NM1) THEN
+              LDMAS=MLMAS+MUMAS+1
+              IF (JBAND) THEN
+                 IJOB=4
+              ELSE
+                 IJOB=3
+              END IF
+          ELSE
+              LDMAS=NM1
+              IJOB=5
+          END IF
+C ------ BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF "JAC"
+          IF (MLMAS.GT.MLJAC.OR.MUMAS.GT.MUJAC) THEN
+              WRITE (6,*) 'BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF
+     & "JAC"'
+            ARRET=.TRUE.
+          END IF
+      ELSE
+          LDMAS=0
+          IF (JBAND) THEN
+             IJOB=2
+          ELSE
+             IJOB=1
+             IF (N.GT.2.AND.IWORK(1).NE.0) IJOB=7
+          END IF
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------ HESSENBERG OPTION ONLY FOR EXPLICIT EQU. WITH FULL JACOBIAN
+      IF ((IMPLCT.OR.JBAND).AND.IJOB.EQ.7) THEN
+         WRITE(6,*)' HESSENBERG OPTION ONLY FOR EXPLICIT EQUATIONS WITH
+     &FULL JACOBIAN'
+         ARRET=.TRUE.
+      END IF
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      KM2=(KM*(KM+1))/2
+      IEYH=21
+      IEDY=IEYH+N
+      IEFX=IEDY+N
+      IEYHH=IEFX+N
+      IEDYH=IEYHH+N
+      IEDEL=IEDYH+N
+      IEWH =IEDEL+N
+      IESCAL=IEWH+N
+      IEHH =IESCAL+N
+      IEW  =IEHH+KM
+      IEA  =IEW+KM
+      IEJAC =IEA+KM
+      IEE  =IEJAC+N*LDJAC
+      IEMAS=IEE+NM1*LDE
+      IET=IEMAS+NM1*LDMAS
+      IFAC=IET+N*KM
+      IEDE=IFAC+KM
+      IFSAFE=IEDE+(KM+2)*NRDENS
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IFSAFE+KM2*NRDENS-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IECO=21
+      IEIP=21+NRDENS
+      IENJ=IEIP+N
+      IEIPH=IENJ+KM
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IECO+KM-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+      NRD=MAX(1,NRDENS)
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL SEUCOR(N,FCN,X,Y,XEND,HMAX,H,KM,RelTol,AbsTol,ITOL,JAC,IJAC,
+     &   MLJAC,MUJAC,MLMAS,MUMAS,IOUT,IDID,IJOB,M1,M2,NM1,
+     &   NMAX,UROUND,NSEQU,AUTNMS,IMPLCT,JBAND,LDJAC,LDE,LDMAS2,
+     &   WORK(IEYH),WORK(IEDY),WORK(IEFX),WORK(IEYHH),WORK(IEDYH),
+     &   WORK(IEDEL),WORK(IEWH),WORK(IESCAL),WORK(IEHH),
+     &   WORK(IEW),WORK(IEA),WORK(IEJAC),WORK(IEE),WORK(IEMAS),
+     &   WORK(IET),IWORK(IEIP),IWORK(IENJ),IWORK(IEIPH),FAC1,FAC2,FAC3,
+     &   FAC4,THET,SAFE1,SAFE2,WKJAC,WKDEC,WKROW,KM2,NRD,WORK(IFAC),
+     &   WORK(IFSAFE),LAMBDA,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL,
+     &   WORK(IEDE),IWORK(IECO))
+      IWORK(14)=NFCN
+      IWORK(15)=NJAC
+      IWORK(16)=NSTEP
+      IWORK(17)=NACCPT
+      IWORK(18)=NREJCT
+      IWORK(19)=NDEC
+      IWORK(20)=NSOL
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE SEUCOR(N,FCN,X,Y,XEND,HMAX,H,KM,RelTol,AbsTol,ITOL,
+     &  JAC,IJAC,MLJAC,MUJAC,MLB,MUB,IOUT,IDID,IJOB,M1,M2,
+     &  NM1,NMAX,UROUND,NSEQU,AUTNMS,IMPLCT,BANDED,LFJAC,LE,
+     &  LDMAS,YH,DY,FX,YHH,DYH,DEL,WH,SCAL,HH,W,A,FJAC,E,FMAS,T,IP,
+     &  NJ,IPHES,FAC1,FAC2,FAC3,FAC4,THET,SAFE1,SAFE2,WKJAC,WKDEC,WKROW,
+     &  KM2,NRD,FACUL,FSAFE,LAMBDA,NFCN,NJAC,NSTEP,NACCPT,NREJCT,
+     &  NDEC,NSOL,DENS,ICOMP)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR SEULEX
+C     PARAMETERS SAME AS IN SEULEX WITH WORKSPACE ADDED
+C ----------------------------------------------------------
+C         DECLARATIONS
+C ----------------------------------------------------------
+       IMPLICIT KPP_REAL (A-H,O-Z)
+       INCLUDE 'KPP_ROOT_Parameters.h'
+       INCLUDE 'KPP_ROOT_Sparse.h'
+       INTEGER KM, KM2, K, KC, KRIGHT, KLR, KK, KRN, KOPT
+       DIMENSION Y(N),YH(N),DY(N),FX(N),YHH(N),DYH(N),DEL(N)
+       DIMENSION WH(N),SCAL(N),HH(KM),W(KM),A(KM),FJAC(LU_NONZERO)
+       DIMENSION FMAS(LDMAS,NM1),T(KM,N),IP(NM1),NJ(KM)
+       DIMENSION RelTol(*),AbsTol(*)
+       DIMENSION IPHES(N),FSAFE(KM2,NRD),FACUL(KM),E(LE,NM1)
+       DIMENSION DENS((KM+2)*NRD),ICOMP(NRD)
+       LOGICAL REJECT,LAST,ATOV,CALJAC,CALHES,AUTNMS,IMPLCT,BANDED
+       EXTERNAL FCN, JAC
+       COMMON /COSEU/XOLDD,HHH,NNRD,KRIGHT
+       COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C --- COMPUTE COEFFICIENTS FOR DENSE OUTPUT
+       IF (IOUT.EQ.2) THEN
+          NNRD=NRD
+C --- COMPUTE THE FACTORIALS --------
+          FACUL(1)=1.D0
+          DO I=1,KM-1
+             FACUL(I+1)=I*FACUL(I)
+          END DO
+       END IF
+
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+       LRDE=(KM+2)*NRD
+       MLE=MLJAC
+       MUE=MUJAC
+       MBJAC=MLJAC+MUJAC+1
+       MBB=MLB+MUB+1
+       MDIAG=MLE+MUE+1
+       MDIFF=MLE+MUE-MUB
+       MBDIAG=MUB+1
+       IF (M1.GT.0) IJOB=IJOB+10
+C --- DEFINE THE STEP SIZE SEQUENCE
+       IF (NSEQU.EQ.1) THEN
+           NJ(1)=1
+           NJ(2)=2
+           NJ(3)=3
+           DO I=4,KM
+              NJ(I)=2*NJ(I-2)
+           END DO
+       END IF
+       IF (NSEQU.EQ.2) THEN
+           NJ(1)=2
+           NJ(2)=3
+           DO I=3,KM
+              NJ(I)=2*NJ(I-2)
+           END DO
+       END IF
+       DO I=1,KM
+          IF (NSEQU.EQ.3) NJ(I)=I
+          IF (NSEQU.EQ.4) NJ(I)=I+1
+       END DO
+       A(1)=WKJAC+NJ(1)*WKROW+WKDEC
+       DO I=2,KM
+          A(I)=A(I-1)+(NJ(I)-1)*WKROW+WKDEC
+       END DO
+       K=MAX0(3,MIN0(KM-2,INT(-DLOG10(RelTol(1)+AbsTol(1))*.6D0+1.5D0)))
+       HMAXN=MIN(ABS(HMAX),ABS(XEND-X))
+       IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+       H=MIN(ABS(H),HMAXN)
+       THETA=2*ABS(THET)
+       ERR=0.D0
+       W(1)=1.D30
+       DO I=1,N
+          IF (ITOL.EQ.0) THEN
+            SCAL(I)=AbsTol(1)+RelTol(1)*DABS(Y(I))
+          ELSE
+            SCAL(I)=AbsTol(I)+RelTol(I)*DABS(Y(I))
+          END IF
+       END DO
+       CALJAC=.FALSE.
+       REJECT=.FALSE.
+       LAST=.FALSE.
+  10   CONTINUE
+       IF (REJECT) THETA=2*ABS(THET)
+       ATOV=.FALSE.
+C *** *** *** *** *** *** ***
+C --- IS XEND REACHED IN THE NEXT STEP?
+C *** *** *** *** *** *** ***
+       H1=XEND-X
+       IF (H1.LE.UROUND) GO TO 110
+       HOPT=H
+       H=MIN(H,H1,HMAXN)
+       IF (H.GE.H1-UROUND) LAST=.TRUE.
+       IF (AUTNMS) THEN
+          CALL FCN(N,X,Y,DY)
+          NFCN=NFCN+1
+       END IF
+       IF (THETA.GT.THET.AND..NOT.CALJAC) THEN
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+          NJAC=NJAC+1
+C --- COMPUTE JACOBIAN MATRIX ANALYTICALLY
+          CALL JAC(N,X,Y,FJAC)
+          CALJAC=.TRUE.
+          CALHES=.FALSE.
+       END IF
+C *** *** *** *** *** *** ***
+C --- THE FIRST AND LAST STEP
+C *** *** *** *** *** *** ***
+      IF (NSTEP.EQ.0.OR.LAST) THEN
+        IPT=0
+        NSTEP=NSTEP+1
+        DO J=1,K
+         KC=J
+         CALL SEUL(J,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &             HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,FAC,
+     &             FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,MLB,
+     &             MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &             ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+         IF (ATOV) GOTO 10
+         IF (J.GT.1.AND.ERR.LE.1.D0) GO TO 60
+        END DO
+        GO TO 55
+      END IF
+C --- BASIC INTEGRATION STEP
+  30  CONTINUE
+      IPT=0
+      NSTEP=NSTEP+1
+      IF (NSTEP.GE.NMAX) GO TO 120
+      KC=K-1
+      DO J=1,KC
+       CALL SEUL(J,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &           HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,
+     &           FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &           MLB,MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &           ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+       IF (ATOV) GOTO 10
+      END DO
+C *** *** *** *** *** *** ***
+C --- CONVERGENCE MONITOR
+C *** *** *** *** *** *** ***
+      IF (K.EQ.2.OR.REJECT) GO TO 50
+      IF (ERR.LE.1.D0) GO TO 60
+      IF (ERR.GT.DBLE(NJ(K+1)*NJ(K))*4.D0) GO TO 100
+  50  CALL SEUL(K,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &           HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,
+     &           FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &           MLB,MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &           ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+      IF (ATOV) GOTO 10
+      KC=K
+      IF (ERR.LE.1.D0) GO TO 60
+C --- HOPE FOR CONVERGENCE IN LINE K+1
+  55  IF (ERR.GT.DBLE(NJ(K+1))*2.D0) GO TO 100
+      KC=K+1
+      CALL SEUL(KC,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,H,KM,
+     &           HMAXN,T,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,SAFE1,
+     &           FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &           MLB,MUB,ERROLD,IPHES,ICOMP,AUTNMS,IMPLCT,BANDED,REJECT,
+     &           ATOV,FSAFE,KM2,NRD,IOUT,IPT,M1,M2,NM1,IJOB,CALHES)
+      IF (ATOV) GOTO 10
+CAdi      IF (ERR.GT.1.D0) GO TO 100
+      IF ((ERR.GT.1.D0).and.(H.gt.STEPMIN)) GO TO 100 ! Adi
+C *** *** *** *** *** *** ***
+C --- STEP IS ACCEPTED
+C *** *** *** *** *** *** ***
+  60  XOLD=X
+      X=X+H
+      IF (IOUT.EQ.2) THEN
+         KRIGHT=KC
+         DO I=1,NRD
+            DENS(I)=Y(ICOMP(I))
+         END DO
+      END IF
+      DO I=1,N
+         T1I=T(1,I)
+         IF (ITOL.EQ.0) THEN
+            SCAL(I)=AbsTol(1)+RelTol(1)*DABS(T1I)
+         ELSE
+            SCAL(I)=AbsTol(I)+RelTol(I)*DABS(T1I)
+         END IF
+         Y(I)=T1I
+      END DO
+      NACCPT=NACCPT+1
+      CALJAC=.FALSE.
+      IF (IOUT.EQ.2) THEN
+         XOLDD=XOLD
+         HHH=H
+         DO I=1,NRD
+            DENS(NRD+I)=Y(ICOMP(I))
+         END DO
+         DO KLR=1,KRIGHT-1
+C --- COMPUTE DIFFERENCES
+            IF (KLR.GE.2) THEN
+               DO KK=KLR,KC
+                  LBEG=((KK+1)*KK)/2
+                  LEND=LBEG-KK+2
+                  DO L=LBEG,LEND,-1
+                     DO I=1,NRD
+                        FSAFE(L,I)=FSAFE(L,I)-FSAFE(L-1,I)
+                     END DO
+                  END DO
+               END DO
+             END IF
+C --- COMPUTE DERIVATIVES AT RIGHT END ----
+             DO KK=KLR+LAMBDA,KC
+                FACNJ=NJ(KK)
+                FACNJ=FACNJ**KLR/FACUL(KLR+1)
+                IPT=((KK+1)*KK)/2
+                DO  I=1,NRD
+                   KRN=(KK-LAMBDA+1)*NRD
+                   DENS(KRN+I)=FSAFE(IPT,I)*FACNJ
+                END DO
+             END DO
+             DO J=KLR+LAMBDA+1,KC
+               DBLENJ=NJ(J)
+               DO L=J,KLR+LAMBDA+1,-1
+                 FACTOR=DBLENJ/NJ(L-1)-1.D0
+                 DO I=1,NRD
+                   KRN=(L-LAMBDA+1)*NRD+I
+                   DENS(KRN-NRD)=DENS(KRN)
+     &                          +(DENS(KRN)-DENS(KRN-NRD))/FACTOR
+                 END DO
+               END DO
+             END DO
+         END DO
+C ---  COMPUTE THE COEFFICIENTS OF THE INTERPOLATION POLYNOMIAL
+         DO IN=1,NRD
+            DO J=1,KRIGHT
+               II=NRD*J+IN
+               DENS(II)=DENS(II)-DENS(II-NRD)
+            END DO
+         END DO
+      END IF
+C --- COMPUTE OPTIMAL ORDER
+      IF (KC.EQ.2) THEN
+         KOPT=3
+         IF (REJECT) KOPT=2
+         GO TO 80
+      END IF
+      IF (KC.LE.K) THEN
+         KOPT=KC
+         IF (W(KC-1).LT.W(KC)*FAC3) KOPT=KC-1
+         IF (W(KC).LT.W(KC-1)*FAC4) KOPT=MIN0(KC+1,KM-1)
+      ELSE
+         KOPT=KC-1
+         IF (KC.GT.3.AND.W(KC-2).LT.W(KC-1)*FAC3) KOPT=KC-2
+         IF (W(KC).LT.W(KOPT)*FAC4) KOPT=MIN0(KC,KM-1)
+      END IF
+C --- AFTER A REJECTED STEP
+  80  IF (REJECT) THEN
+         K=MIN0(KOPT,KC)
+         H=DMIN1(H,HH(K))
+         REJECT=.FALSE.
+         GO TO 10
+      END IF
+C --- COMPUTE STEP SIZE FOR NEXT STEP
+      IF (KOPT.LE.KC) THEN
+         H=HH(KOPT)
+      ELSE
+         IF (KC.LT.K.AND.W(KC).LT.W(KC-1)*FAC4) THEN
+            H=HH(KC)*A(KOPT+1)/A(KC)
+         ELSE
+            H=HH(KC)*A(KOPT)/A(KC)
+         END IF
+      END IF
+      K=KOPT
+      H = DMAX1(H, STEPMIN)  ! Adi
+      GO TO 10
+C *** *** *** *** *** *** ***
+C --- STEP IS REJECTED
+C *** *** *** *** *** *** ***
+ 100  K=MIN0(K,KC)
+      IF (K.GT.2.AND.W(K-1).LT.W(K)*FAC3) K=K-1
+      NREJCT=NREJCT+1
+      H=HH(K)
+      LAST=.FALSE.
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 30
+      GO TO 10
+C --- SOLUTION EXIT
+ 110  CONTINUE
+      H=HOPT
+      IDID=1
+      RETURN
+C --- FAIL EXIT
+ 120  WRITE (6,979) X,H
+ 979  FORMAT(' EXIT OF SEULEX AT X=',D14.7,'   H=',D14.7)
+      IDID=-1
+      RETURN
+      END
+C
+C
+C *** *** *** *** *** *** ***
+C     S U B R O U T I N E    S E U L
+C *** *** *** *** *** *** ***
+C
+      SUBROUTINE SEUL(JJ,N,FCN,X,Y,DY,FX,FJAC,LFJAC,FMAS,LDMAS,E,LE,IP,
+     &          H,KM,HMAXN,T,SCAL,NJ,HH,W,A,YH,DYH,DEL,WH,ERR,SAFE1,
+     &          FAC,FAC1,FAC2,SAFE2,THETA,MLJAC,MUJAC,NFCN,NDEC,NSOL,
+     &          MLB,MUB,ERROLD,IPHES,ICOMP,
+     &          AUTNMS,IMPLCT,BANDED,REJECT,ATOV,FSAFE,KM2,NRD,IOUT,
+     &          IPT,M1,M2,NM1,IJOB,CALHES)
+C --- THIS SUBROUTINE COMPUTES THE J-TH LINE OF THE
+C --- EXTRAPOLATION TABLE AND PROVIDES AN ESTIMATE
+C --- OF THE OPTIMAL STEP SIZE
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      INTEGER KM, KM2
+      DIMENSION Y(N),YH(N),DY(N),FX(N),DYH(N),DEL(N)
+      DIMENSION WH(N),SCAL(N),HH(KM),W(KM),A(KM)
+      DIMENSION FJAC(LU_NONZERO),E(LU_NONZERO)
+      DIMENSION FMAS(LDMAS,N),T(KM,N),IP(N),NJ(KM),IPHES(N)
+      DIMENSION FSAFE(KM2,NRD),ICOMP(NRD)
+      LOGICAL ATOV,REJECT,AUTNMS,IMPLCT,BANDED,CALHES
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      EXTERNAL FCN
+C *** *** *** *** *** *** ***
+C  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+C *** *** *** *** *** *** ***
+      HJ=H/NJ(JJ)
+      HJI=1.D0/HJ
+      DO  I=1,LU_NONZERO
+         E(I)=-FJAC(I)
+      END DO
+      DO J=1,N
+         E(LU_DIAG(J))=E(LU_DIAG(J))+HJI
+      END DO
+      CALL KppDecomp (E,IER)
+      IF (IER.NE.0) GOTO 79
+      NDEC=NDEC+1
+C *** *** *** *** *** *** ***
+C --- STARTING PROCEDURE
+C *** *** *** *** *** *** ***
+       IF (.NOT.AUTNMS) THEN
+          CALL FCN(N,X+HJ,Y,DY)
+          NFCN=NFCN+1
+       END IF
+       DO I=1,N
+          YH(I)=Y(I)
+          DEL(I)=DY(I)
+       END DO
+       CALL KppSolve (E,DEL)
+       NSOL=NSOL+1
+       M=NJ(JJ)
+       IF (IOUT.EQ.2.AND.M.EQ.JJ) THEN
+          IPT=IPT+1
+          DO I=1,NRD
+             FSAFE(IPT,I)=DEL(ICOMP(I))
+          END DO
+       END IF
+C *** *** *** *** *** *** ***
+C --- SEMI-IMPLICIT EULER METHOD
+C *** *** *** *** *** *** ***
+       IF (M.GT.1) THEN
+          DO MM=1,M-1
+             DO I=1,N
+                YH(I)=YH(I)+DEL(I)
+             END DO
+             IF (AUTNMS) THEN
+                CALL FCN(N,X+HJ*MM,YH,DYH)
+             ELSE
+                CALL FCN(N,X+HJ*(MM+1),YH,DYH)
+             END IF
+             NFCN=NFCN+1
+             IF (MM.EQ.1.AND.JJ.LE.2) THEN
+C --- STABILITY CHECK
+                DEL1=0.D0
+                DO I=1,N
+                   DEL1=DEL1+(DEL(I)/SCAL(I))**2
+                END DO
+                DEL1=DSQRT(DEL1)
+                IF (IMPLCT) THEN
+                   DO I=1,NM1
+                      WH(I)=DEL(I+M1)
+                   END DO
+                   IF (MLB.EQ.NM1) THEN
+                      DO I=1,NM1
+                         SUM=0.D0
+                         DO J=1,NM1
+                            SUM=SUM+FMAS(I,J)*WH(J)
+                         END DO
+                         DEL(I+M1)=SUM
+                      END DO
+                   ELSE
+                      DO I=1,NM1
+                         SUM=0.D0
+                         DO J=MAX(1,I-MLB),MIN(NM1,I+MUB)
+                            SUM=SUM+FMAS(I-J+MBDIAG,J)*WH(J)
+                         END DO
+                         DEL(I+M1)=SUM
+                      END DO
+                   END IF
+                END IF
+                IF (.NOT.AUTNMS) THEN
+                   CALL FCN(N,X+HJ,YH,WH)
+                   NFCN=NFCN+1
+                   DO I=1,N
+                      DEL(I)=WH(I)-DEL(I)*HJI
+                   END DO
+                ELSE
+                   DO I=1,N
+                      DEL(I)=DYH(I)-DEL(I)*HJI
+                   END DO
+                END IF
+                CALL KppSolve (E,DEL)
+                NSOL=NSOL+1
+                DEL2=0.D0
+                DO I=1,N
+                   DEL2=DEL2+(DEL(I)/SCAL(I))**2
+                END DO
+                DEL2=DSQRT(DEL2)
+                THETA=DEL2/MAX(1.D0,DEL1)
+                IF (THETA.GT.1.D0) GOTO 79
+             END IF
+             CALL KppSolve (E,DYH)
+             NSOL=NSOL+1
+             DO I=1,N
+                DEL(I)=DYH(I)
+             END DO
+             IF (IOUT.EQ.2.AND.MM.GE.M-JJ) THEN
+                IPT=IPT+1
+                DO I=1,NRD
+                   FSAFE(IPT,I)=DEL(ICOMP(I))
+                END DO
+             END IF
+          END DO
+       END IF
+       DO I=1,N
+          T(JJ,I)=YH(I)+DEL(I)
+       END DO
+C *** *** *** *** *** *** ***
+C --- POLYNOMIAL EXTRAPOLATION
+C *** *** *** *** *** *** ***
+       IF (JJ.EQ.1) RETURN
+       DO L=JJ,2,-1
+          FAC=(DBLE(NJ(JJ))/DBLE(NJ(L-1)))-1.D0
+          DO I=1,N
+             T(L-1,I)=T(L,I)+(T(L,I)-T(L-1,I))/FAC
+          END DO
+       END DO
+       ERR=0.D0
+       DO I=1,N
+          ERR=ERR+MIN(ABS((T(1,I)-T(2,I)))/SCAL(I),1.D15)**2
+       END DO
+       IF (ERR.GE.1.D30) GOTO 79
+       ERR=DSQRT(ERR/DBLE(N))
+       IF (JJ.GT.2.AND.ERR.GE.ERROLD) GOTO 79
+       ERROLD=DMAX1(4*ERR,1.D0)
+C --- COMPUTE OPTIMAL STEP SIZES
+       EXPO=1.D0/JJ
+       FACMIN=FAC1**EXPO
+       FAC=DMIN1(FAC2/FACMIN,DMAX1(FACMIN,(ERR/SAFE1)**EXPO/SAFE2))
+       FAC=1.D0/FAC
+       HH(JJ)=DMIN1(H*FAC,HMAXN)
+       W(JJ)=A(JJ)/HH(JJ)
+       RETURN
+  79   ATOV=.TRUE.
+       H=H*0.5D0
+       REJECT=.TRUE.
+       RETURN
+       END
+
+
+
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/kpp_seulex.f90	(revision 3477)
@@ -0,0 +1,1163 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SEULEX - Stiff extrapolation method based on linearly implicit Euler   !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision, ONLY: dp
+  USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+  USE KPP_ROOT_Jacobian, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+  ! variables from the former COMMON block /CONRA5/ are now here:
+  INTEGER :: NN, NN2, NN3, NN4
+  KPP_REAL :: TSOL, HSOL
+  
+  ! Statistics
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  
+  ! Method parameters
+  
+  ! mz_rs_20050717: TODO: use strings of IERR_NAMES for error messages
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(-4:1) :: IERR_NAMES = (/ &
+    'Matrix is repeatedly singular                     ', & ! -4
+    'Step size too small                               ', & ! -3
+    'More than Max_no_steps steps are needed           ', & ! -2
+    'Insufficient storage for work or iwork            ', & ! -1
+    '                                                  ', & !  0 (not used)
+    'Success                                           ' /) !  1
+
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters, ONLY: nvar
+    USE KPP_ROOT_Global,     ONLY: atol,rtol,var
+
+    IMPLICIT NONE
+
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: Ncolumns, Ncolumns2, NRDENS
+    PARAMETER (Ncolumns=12,Ncolumns2=2+Ncolumns*(Ncolumns+3)/2,NRDENS=NVAR)
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20)
+    INTEGER ::       ICNTRL(20), ISTATUS(20)
+    INTEGER :: IERR
+    INTEGER, SAVE :: Ntotal = 0
+    KPP_REAL, SAVE :: H
+
+    H = 0.0_dp
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20)  = 0._dp
+    ICNTRL(10)=0    !~~~> OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+
+    ! if optional parameters are given, and if they are >0, 
+    ! they overwrite the default settings
+    IF (PRESENT(ICNTRL_U)) ICNTRL(:) = ICNTRL_U(:)
+    IF (PRESENT(RCNTRL_U)) RCNTRL(:) = RCNTRL_U(:)
+    !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-----
+    
+
+    CALL ATMSEULEX(NVAR,TIN,TOUT,VAR,H,RTOL,ATOL,      &
+                    RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+    Ntotal = Ntotal + Nstp
+!!$    PRINT*,'NSTEPS=',Nstp,' (',Ntotal,')  T=',TIN
+
+
+    Nfun = Nfun + ISTATUS(1)
+    Njac = Njac + ISTATUS(2)
+    Nstp = Nstp + ISTATUS(3)
+    Nacc = Nacc + ISTATUS(4)
+    Nrej = Nrej + ISTATUS(5)
+    Ndec = Ndec + ISTATUS(6)
+    Nsol = Nsol + ISTATUS(7)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) THEN
+      ISTATUS_U(:) = 0
+      ISTATUS_U(1) = Nfun ! function calls
+      ISTATUS_U(2) = Njac ! jacobian calls
+      ISTATUS_U(3) = Nstp ! steps
+      ISTATUS_U(4) = Nacc ! accepted steps
+      ISTATUS_U(5) = Nrej ! rejected steps (except at the beginning)
+      ISTATUS_U(6) = Ndec ! LU decompositions
+      ISTATUS_U(7) = Nsol ! forward/backward substitutions
+    ENDIF
+    IF (PRESENT(RSTATUS_U)) THEN
+      RSTATUS_U(:) = 0.
+      RSTATUS_U(1) = TOUT ! final time
+    ENDIF
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+! mz_rs_20050716: IERR is returned to the user who then decides what to do
+! about it, i.e. either stop the run or ignore it.
+!!$    IF (IERR < 0) THEN
+!!$      PRINT *,'SEULEX: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+!!$      STOP
+!!$    ENDIF
+
+  END SUBROUTINE INTEGRATE
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ATMSEULEX( N,Tinitial,Tfinal,Y,H,RelTol,AbsTol,     &
+                        RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+!     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(T,Y).
+!     THIS IS AN EXTRAPOLATION-ALGORITHM, BASED ON THE
+!     LINEARLY IMPLICIT EULER METHOD (WITH STEP SIZE CONTROL
+!     AND ORDER SELECTION).
+!
+!     AUTHORS: E. HAIRER AND G. WANNER
+!              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!              CH-1211 GENEVE 24, SWITZERLAND
+!              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!              INCLUSION OF DENSE OUTPUT BY E. HAIRER AND A. OSTERMANN
+!
+!     THIS CODE IS PART OF THE BOOK:
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!     VERSION OF SEPTEMBER 30, 1995
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!     INPUT PARAMETERS
+!     ----------------
+!     N           DIMENSION OF THE SYSTEM
+!
+!     T           INITIAL T-VALUE
+!
+!     Y(N)        INITIAL VALUES FOR Y
+!
+!     Tend        FINAL T-VALUE (Tend-T MAY BE POSITIVE OR NEGATIVE)
+!
+!     H           INITIAL STEP SIZE GUESS;
+!                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT,
+!                 H=1.D0/(NORM OF F'), USUALLY 1.D-2 OR 1.D-3, IS GOOD.
+!                 THIS CHOICE IS NOT VERY IMPORTANT, THE CODE QUICKLY
+!                 ADAPTS ITS STEP SIZE (IF H=0.D0, THE CODE PUTS H=1.D-6
+!
+!     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+!                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+!
+!     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+!                 THE PARTIAL DERIVATIVES OF F(T,Y) WITH RESPECT TO Y
+!
+!     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+!                 NUMERICAL SOLUTION DURING INTEGRATION.
+!                 IF IOUT>=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+!                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0.
+!                 IT MUST HAVE THE FORM
+!                    SUBROUTINE SOLOUT (NR,TOLD,T,Y,RC,LRC,IC,LIC,N,
+!                                       RPAR,IPAR,IRTRN)
+!                    KPP_REAL T,Y(N),RC(LRC),IC(LIC)
+!                    ....
+!                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+!                    GRID-POINT "T" (THEREBY THE INITIAL VALUE IS
+!                    THE FIRST GRID-POINT).
+!                 "TOLD" IS THE PRECEEDING GRID-POINT.
+!                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+!                    IS SET <0, SEULEX RETURNS TO THE CALLING PROGRAM.
+!                 DO NOT CHANGE THE ENTRIES OF RC(LRC),IC(LIC)!
+!
+!          -----  CONTINUOUS OUTPUT (IF IOUT=2): -----
+!                 DURING CALLS TO "SOLOUT", A CONTINUOUS SOLUTION
+!                 FOR THE INTERVAL [TOLD,T] IS AVAILABLE THROUGH
+!                 THE KPP_REAL FUNCTION
+!                        >>>   CONTEX(I,S,RC,LRC,IC,LIC)   <<<
+!                 WHICH PROVIDES AN APPROXIMATION TO THE I-TH
+!                 COMPONENT OF THE SOLUTION AT THE POINT S. THE VALUE
+!                 S SHOULD LIE IN THE INTERVAL [TOLD,T].
+!
+!     IOUT        GIVES INFORMATION ON THE SUBROUTINE SOLOUT:
+!                    IOUT=0: SUBROUTINE IS NEVER CALLED
+!                    IOUT=1: SUBROUTINE IS USED FOR OUTPUT
+!                    IOUT=2: DENSE OUTPUT IS PERFORMED IN SOLOUT
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!     SOPHISTICATED SETTING OF PARAMETERS
+!     -----------------------------------
+!              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT CNTRL
+!              WELL. THEY MAY BE DEFINED BY SETTING CNTRL(1),..,CNTRL(13)
+!              AS WELL AS ICNTRL(1),..,ICNTRL(4) DIFFERENT FROM ZERO.
+!              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+!
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = 1: F = F(y)   Independent of T (autonomous)
+!              = 0: F = F(t,y) Depends on T (non-autonomous)
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> not used
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(11)  THE MAXIMUM NUMBER OF COLUMNS IN THE EXTRAPOLATION
+!              TABLE. THE DEFAULT VALUE (FOR ICNTRL(3)=0) IS 12.
+!              IF ICNTRL(3).NE.0 THEN ICNTRL(3) SHOULD BE  >= 3.
+!
+!    ICNTRL(12)  SWITCH FOR THE STEP SIZE SEQUENCE
+!              IF ICNTRL(4) == 1 THEN 1,2,3,4,6,8,12,16,24,32,48,...
+!              IF ICNTRL(4) == 2 THEN 2,3,4,6,8,12,16,24,32,48,64,...
+!              IF ICNTRL(4) == 3 THEN 1,2,3,4,5,6,7,8,9,10,...
+!              IF ICNTRL(4) == 4 THEN 2,3,4,5,6,7,8,9,10,11,...
+!              THE DEFAULT VALUE (FOR ICNTRL(4)=0) IS ICNTRL(4)=2.
+!
+!    ICNTRL(13)  PARAMETER "LAMBDA" OF DENSE OUTPUT; POSSIBLE VALUES
+!              ARE 0 AND 1; DEFAULT ICNTRL(5)=0.
+!
+!    ICNTRL(14)  = NRDENS = NUMBER OF COMPONENTS, FOR WHICH DENSE OUTPUT
+!              IS REQUIRED
+!
+!    ICNTRL(21),...,ICNTRL(NRDENS+20) INDICATE THE COMPONENTS, FOR WHICH
+!              DENSE OUTPUT IS REQUIRED
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001). Increase cntrl(3), to 0.01 say, when 
+!                   Jacobian evaluations are costly. for small systems it 
+!                   should be smaller.
+!    RCNTRL(9)  -> not used
+!    RCNTRL(10,11) -> FAC1,FAC2 (parameters for step size selection)
+!    RCNTRL(12,13) -> FAC3,FAC4 (parameters for order selection)
+!    RCNTRL(14,15) -> FacSafe1, FacSafe2
+!                     Safety factors for step size prediction
+!                     HNEW=H*FacSafe2*(FacSafe1*TOL/ERR)**(1/(J-1))
+!    RCNTRL(16:19) -> WorkFcn, WorkJac, WorkDec, WorkSol 
+!                     estimated computational work
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!     OUTPUT PARAMETERS
+!     -----------------
+!     T           T-VALUE WHERE THE SOLUTION IS COMPUTED
+!                 (AFTER SUCCESSFUL RETURN T=Tend)
+!
+!     Y(N)        SOLUTION AT T
+!
+!     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!          DECLARATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, IERR, ITOL, Max_no_steps, Ncolumns, Nsequence, Lambda, &
+                 NRDENS, i, Ncolumns2, NRD, IOUT
+      KPP_REAL :: Y(NVAR),AbsTol(*),RelTol(*)
+      KPP_REAL :: Tinitial, Tfinal, Roundoff, Hmin, Hmax,         &
+                 FacMin, FacMax, FAC1, FAC2, FAC3, FAC4, FacSafe1,     &
+                 FacSafe2, H, Hstart,WorkFcn,WorkJac, WorkDec, WorkSol,&
+                 WorkRow, FacRej, FacSafe, ThetaMin, T
+      LOGICAL :: AUTNMS
+      KPP_REAL :: RCNTRL(20), RSTATUS(20)
+      INTEGER ::       ICNTRL(20), ISTATUS(20)
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Nfun=0
+   Njac=0
+   Nstp=0
+   Nacc=0
+   Nrej=0
+   Ndec=0
+   Nsol=0
+       
+   IERR = 0
+
+   IF (ICNTRL(1) == 0) THEN
+      AUTNMS = .FALSE. 
+   ELSE
+      AUTNMS = .TRUE.
+   END IF
+
+!~~~>  For Scalar tolerances (ICNTRL(1)/=0) the code uses AbsTol(1) and RelTol(1)
+!~~~>  For Vector tolerances (ICNTRL(1)==0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      ITOL = 1
+   ELSE
+      ITOL = 0
+   END IF
+
+!~~~> Max_no_steps: the maximum number of time steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = 100000
+   ELSEIF (ICNTRL(4) > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE
+      PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+      CALL SEULEX_ErrorMsg(-1,Tinitial,ZERO,IERR);
+   END IF
+
+!~~~> IOUT = use (or not) the output routine
+   IOUT = ICNTRL(10)
+   IF ( IOUT<0 .OR. IOUT>2 ) THEN
+       PRINT * ,'User-selected ICNTRL(10)=',ICNTRL(10)
+       IOUT = 0
+   END IF
+   
+!~~~> Ncolumns:  maximum number of columns in the extrapolation
+   IF (ICNTRL(11)==0) THEN
+       Ncolumns=12
+   ELSEIF (ICNTRL(11) > 2) THEN
+       Ncolumns=ICNTRL(11)
+   ELSE   
+       PRINT * ,'User-selected ICNTRL(11)=',ICNTRL(11)
+       CALL SEULEX_ErrorMsg(-2,Tinitial,ZERO,IERR);
+   END IF
+
+!~~~> Nsequence: choice of step size sequence
+   IF (ICNTRL(12)==0) THEN
+      Nsequence = 2
+   ELSEIF ( (ICNTRL(12)>0).AND.(ICNTRL(12)<5) ) THEN
+      Nsequence = ICNTRL(4)
+   ELSE
+      PRINT * ,'User-selected ICNTRL(12)=',ICNTRL(12)
+      CALL SEULEX_ErrorMsg(-3,Tinitial,ZERO,IERR)
+   END IF
+
+!~~~> LAMBDA: parameter for dense output
+   LAMBDA = ICNTRL(13)
+   IF ( LAMBDA < 0 .OR. LAMBDA >= 2 ) THEN
+       PRINT * ,'User-selected ICNTRL(13)=',ICNTRL(13)
+       CALL SEULEX_ErrorMsg(-4,Tinitial,ZERO,IERR)
+   END IF
+      
+!~~~>- NRDENS:  number of dense output components
+   NRDENS=ICNTRL(14)
+   IF ( (NRDENS < 0) .OR. (NRDENS > N)  ) THEN
+       PRINT * ,'User-selected ICNTRL(14)=',ICNTRL(14)
+       CALL SEULEX_ErrorMsg(-5,Tinitial,ZERO,IERR)
+   END IF
+
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN
+      Hmin = RCNTRL(1)
+   ELSE
+      PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+      CALL SEULEX_ErrorMsg(-7,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tfinal-Tinitial)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+      CALL SEULEX_ErrorMsg(-7,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,Roundoff)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+   ELSE
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL SEULEX_ErrorMsg(-7,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2_dp
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 10.0_dp
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1_dp
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9_dp
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL SEULEX_ErrorMsg(-8,Tinitial,ZERO,IERR)
+      RETURN
+   END IF
+
+!~~~> ThetaMin: DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+!              INCREASE WORK(3), TO 0.01 SAY, WHEN JACOBIAN EVALUATIONS
+!              ARE COSTLY. FOR SMALL SYSTEMS WORK(3) SHOULD BE SMALLER.
+   IF(RCNTRL(8) == 0.D0)THEN
+       ThetaMin = 1.0d-3
+   ELSE
+       ThetaMin = RCNTRL(8)
+   END IF
+
+!~~~>  FAC1,FAC2:     PARAMETERS FOR STEP SIZE SELECTION
+!              THE NEW STEP SIZE FOR THE J-TH DIAGONAL ENTRY IS
+!              CHOSEN SUBJECT TO THE RESTRICTION
+!                 FACMIN/WORK(5) <= HNEW(J)/HOLD <= 1/FACMIN
+!              WHERE FACMIN=WORK(4)**(1/(J-1))
+      IF(RCNTRL(10) == 0.D0)THEN
+         FAC1=0.1D0
+      ELSE
+         FAC1=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == 0.D0)THEN
+         FAC2=4.0D0
+      ELSE
+         FAC2=RCNTRL(11)
+      END IF
+!~~~>  FAC3, FAC4:   PARAMETERS FOR THE ORDER SELECTION
+!              ORDER IS DECREASED IF    W(K-1) <= W(K)*WORK(6)
+!              ORDER IS INCREASED IF    W(K) <= W(K-1)*WORK(7)
+      IF(RCNTRL(12) == 0.D0)THEN
+         FAC3=0.7D0
+      ELSE
+         FAC3=RCNTRL(12)
+      END IF
+      IF(RCNTRL(13) == 0.D0)THEN
+         FAC4=0.9D0
+      ELSE
+         FAC4=RCNTRL(13)
+      END IF
+!~~~>- FacSafe1, FacSafe2: safety factors for step size prediction
+!             HNEW=H*WORK(9)*(WORK(8)*TOL/ERR)**(1/(J-1))
+      IF(RCNTRL(14) == 0.D0)THEN
+         FacSafe1=0.6D0
+      ELSE
+         FacSafe1=RCNTRL(14)
+      END IF
+      IF(RCNTRL(15) == 0.D0)THEN
+         FacSafe2=0.93D0
+      ELSE
+         FacSafe2=RCNTRL(15)
+      END IF
+      
+!~~~> WorkFcn: estimated computational work for a calls to FCN
+      IF(RCNTRL(16) == 0.D0)THEN
+         WorkFcn=1.D0
+      ELSE
+         WorkFcn=RCNTRL(16)
+      END IF
+!~~~> WorkJac: estimated computational work for calls to JAC
+      IF(RCNTRL(17) == 0.D0)THEN
+         WorkJac=5.D0
+      ELSE
+         WorkJac=RCNTRL(17)
+      END IF
+!~~~> WorkDec: estimated computational work for calls to DEC
+      IF(RCNTRL(18) == 0.D0)THEN
+         WorkDec=1.D0
+      ELSE
+         WorkDec=RCNTRL(18)
+      END IF
+!~~~> WorkSol: estimated computational work for calls to SOL
+      IF(RCNTRL(19) == 0.D0)THEN
+         WorkSol=1.D0
+      ELSE
+         WorkSol=RCNTRL(19)
+      END IF
+      WorkRow=WorkFcn+WorkSol
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= 0.D0.OR.RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SEULEX_ErrorMsg(-9,Tinitial,ZERO,IERR)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SEULEX_ErrorMsg(-9,Tinitial,ZERO,IERR)
+            END IF
+         END DO
+      END IF
+    
+    IF (IERR < 0) RETURN
+       
+!~~~>---- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      Ncolumns2=(Ncolumns*(Ncolumns+1))/2
+      NRD=MAX(1,NRDENS)
+
+      T = Tinitial
+!~~~> CALL TO CORE INTEGRATOR 
+      CALL SEULEX_Integrator(N,T,Tfinal,Y,Hmax,H,Ncolumns,RelTol,AbsTol,ITOL,  &
+                IOUT,IERR,Max_no_steps,Roundoff,Nsequence,AUTNMS,  &
+                FAC1,FAC2,FAC3,FAC4,ThetaMin,FacSafe1,FacSafe2,WorkJac,  &
+                WorkDec,WorkRow,Ncolumns2,NRD,LAMBDA,Nstp)
+        
+      ISTATUS(1)=Nfun
+      ISTATUS(2)=Njac
+      ISTATUS(3)=Nstp
+      ISTATUS(4)=Nacc
+      ISTATUS(5)=Nrej
+      ISTATUS(6)=Ndec
+      ISTATUS(7)=Nsol
+
+      END SUBROUTINE ATMSEULEX
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SEULEX_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from SEULEX due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximum no of columns in extrapolation'
+    CASE (-3)
+      PRINT * , '--> Improper value for step size sequence'
+    CASE (-4)
+      PRINT * , '--> Improper value for Lambda (must be 0/1)'
+    CASE (-5)
+      PRINT * , '--> Improper number of dense output components'
+    CASE (-6)
+      PRINT * , '--> Improper parameters for second order equations'
+    CASE (-7)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-8)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-9)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-10)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-11)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-12)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SEULEX_ErrorMsg
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SEULEX_Integrator(N,T,Tend,Y,Hmax,H,Ncolumns,RelTol,AbsTol,ITOL,&
+       IOUT,IERR,Max_no_steps,Roundoff,Nsequence,AUTNMS,             &
+       FAC1,FAC2,FAC3,FAC4,ThetaMin,FacSafe1,FacSafe2,WorkJac,       &
+       WorkDec,WorkRow,Ncolumns2,NRD,LAMBDA,Nstp)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     CORE INTEGRATOR FOR SEULEX
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!         DECLARATIONS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       USE KPP_ROOT_Parameters
+       USE KPP_ROOT_Jacobian
+       IMPLICIT KPP_REAL (A-H,O-Z)
+       IMPLICIT INTEGER (I-N)
+
+       INTEGER ::  N, Ncolumns, Ncolumns2, K, KC, KRIGHT, KLR, KK, KRN,&
+       KOPT, NRD
+       KPP_REAL ::  Y(NVAR),DY(NVAR),FX(NVAR),YHH(NVAR)
+       KPP_REAL ::  DYH(NVAR), DEL(NVAR), WH(NVAR)
+       KPP_REAL ::  SCAL(NVAR), HH(Ncolumns), W(Ncolumns), A(Ncolumns)
+#ifdef FULL_ALGEBRA    
+       KPP_REAL :: FJAC(NVAR,NVAR)
+#else       
+       KPP_REAL :: FJAC(LU_NONZERO)
+#endif       
+       KPP_REAL Table(Ncolumns,N)
+       INTEGER IP(N),NJ(Ncolumns),IPHES(N),ICOMP(NRD)
+       KPP_REAL RelTol(*),AbsTol(*)
+       KPP_REAL FSAFE(Ncolumns2,NRD),FACUL(Ncolumns),E(N,N),DENS((Ncolumns+2)*NRD)
+       LOGICAL REJECT,LAST,ATOV,CALJAC,CALHES,AUTNMS
+
+       KPP_REAL TOLDD,HHH,NNRD
+       COMMON /COSEU/TOLDD,HHH,NNRD,KRIGHT
+
+!~~~> COMPUTE COEFFICIENTS FOR DENSE OUTPUT
+       IF (IOUT == 2) THEN
+          NNRD=NRD
+!~~~> COMPUTE THE FACTORIALS --------
+          FACUL(1)=1.D0
+          DO i=1,Ncolumns-1
+             FACUL(i+1)=i*FACUL(i)
+          END DO
+       END IF
+
+!~~~> DEFINE THE STEP SIZE SEQUENCE
+       IF (Nsequence == 1) THEN
+           NJ(1)=1
+           NJ(2)=2
+           NJ(3)=3
+           DO I=4,Ncolumns
+              NJ(i)=2*NJ(I-2)
+           END DO
+       END IF
+       IF (Nsequence == 2) THEN
+           NJ(1)=2
+           NJ(2)=3
+           DO I=3,Ncolumns
+              NJ(i)=2*NJ(I-2)
+           END DO
+       END IF
+       DO i=1,Ncolumns
+          IF (Nsequence == 3) NJ(i)=I
+          IF (Nsequence == 4) NJ(i)=I+1
+       END DO
+       A(1)=WorkJac+NJ(1)*WorkRow+WorkDec
+       DO I=2,Ncolumns
+          A(i)=A(i-1)+(NJ(i)-1)*WorkRow+WorkDec
+       END DO
+       K=MAX0(3,MIN0(Ncolumns-2,INT(-DLOG10(RelTol(1)+AbsTol(1))*.6D0+1.5D0)))
+       
+       ! T = Tinitial
+       HmaxN = MIN(ABS(Hmax),ABS(Tend-T))
+       IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+       H=MIN(ABS(H),HmaxN)
+       Theta=2*ABS(ThetaMin)
+       ERR=0.D0
+       W(1)=1.D30
+       DO i=1,N
+          IF (ITOL == 0) THEN
+            SCAL(i)=AbsTol(1)+RelTol(1)*DABS(Y(i))
+          ELSE
+            SCAL(i)=AbsTol(i)+RelTol(i)*DABS(Y(i))
+          END IF
+       END DO
+       CALJAC=.FALSE.
+       REJECT=.FALSE.
+       LAST=.FALSE.
+   10  CONTINUE
+       IF (REJECT) Theta=2*ABS(ThetaMin)
+       ATOV=.FALSE.
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> IS Tend REACHED IN THE NEXT STEP?
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       H1=Tend-T
+       IF (H1 <= Roundoff) GO TO 110
+       HOPT=H
+       H=MIN(H,H1,HmaxN)
+       IF (H >= H1-Roundoff) LAST=.TRUE.
+       IF (AUTNMS) THEN
+          CALL FUN_CHEM(T,Y,DY)
+       END IF
+       IF (Theta > ThetaMin.AND..NOT.CALJAC) THEN
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  COMPUTATION OF THE JACOBIAN
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+          CALL JAC_CHEM(T,Y,FJAC)
+          CALJAC=.TRUE.
+          CALHES=.FALSE.
+       END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> THE FIRST AND LAST STEP
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (Nstp == 0.OR.LAST) THEN
+        IPT=0
+        Nstp=Nstp+1
+        DO J=1,K
+         KC=J
+         CALL SEUL(J,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns, &
+                  HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,FAC, &
+                  FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol, &
+                  ERROLD,IPHES,ICOMP,AUTNMS,REJECT, &
+                  ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+         IF (ATOV) GOTO 10
+         IF (J > 1 .AND. ERR <= 1.d0) GOTO 60
+        END DO
+        GO TO 55
+      END IF
+!~~~> BASIC INTEGRATION STEP
+   30 CONTINUE
+      IPT=0
+      Nstp=Nstp+1
+      IF (Nstp >= Max_no_steps) GOTO 120
+      KC=K-1
+      DO J=1,KC
+       CALL SEUL(J,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns,&
+                HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,&
+                FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+                ERROLD,IPHES,ICOMP,AUTNMS,REJECT,&
+                ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+       IF (ATOV) GOTO 10
+      END DO
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> CONVERGENCE MONITOR
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (K == 2.OR.REJECT) GO TO 50
+      IF (ERR <= 1.D0) GO TO 60
+      IF (ERR > DBLE(NJ(K+1)*NJ(K))*4.D0) GO TO 100
+   50 CALL SEUL(K,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns,&
+                HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,&
+                FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+                ERROLD,IPHES,ICOMP,AUTNMS,REJECT,&
+                ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+      IF (ATOV) GOTO 10
+      KC=K
+      IF (ERR <= 1.D0) GO TO 60
+!~~~> HOPE FOR CONVERGENCE IN LINE K+1
+   55 IF (ERR > DBLE(NJ(K+1))*2.D0) GO TO 100
+      KC=K+1
+      CALL SEUL(KC,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,H,Ncolumns,&
+                HmaxN,Table,SCAL,NJ,HH,W,A,YHH,DYH,DEL,WH,ERR,FacSafe1,&
+                FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+                ERROLD,IPHES,ICOMP,AUTNMS,REJECT,&
+                ATOV,FSAFE,Ncolumns2,NRD,IOUT,IPT,CALHES)
+      IF (ATOV) GOTO 10
+      IF (ERR > 1.D0) GO TO 100
+      !Adi IF ((ERR > 1.D0).and.(H.gt.Hmin)) GO TO 100
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> STEP IS ACCEPTED
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   60 TOLD=T
+      T=T+H
+      IF (IOUT == 2) THEN
+         KRIGHT=KC
+         DO i=1,NRD
+            DENS(i)=Y(ICOMP(i))
+         END DO
+      END IF
+      DO i=1,N
+         T1I=Table(1,I)
+         IF (ITOL == 0) THEN
+            SCAL(i)=AbsTol(1)+RelTol(1)*DABS(T1I)
+         ELSE
+            SCAL(i)=AbsTol(i)+RelTol(i)*DABS(T1I)
+         END IF
+         Y(i)=T1I
+      END DO
+      Nacc=Nacc+1
+      CALJAC=.FALSE.
+      IF (IOUT == 2) THEN
+         TOLDD=TOLD
+         HHH=H
+         DO i=1,NRD
+            DENS(NRD+I)=Y(ICOMP(i))
+         END DO
+         DO KLR=1,KRIGHT-1
+!~~~> COMPUTE DIFFERENCES
+            IF (KLR >= 2) THEN
+               DO KK=KLR,KC
+                  LBEG=((KK+1)*KK)/2
+                  LEND=LBEG-KK+2
+                  DO L=LBEG,LEND,-1
+                     DO i=1,NRD
+                        FSAFE(L,I)=FSAFE(L,I)-FSAFE(L-1,I)
+                     END DO
+                  END DO
+               END DO
+             END IF
+!~~~> COMPUTE DERIVATIVES AT RIGHT END ----
+             DO KK=KLR+LAMBDA,KC
+                FACNJ=NJ(KK)
+                FACNJ=FACNJ**KLR/FACUL(KLR+1)
+                IPT=((KK+1)*KK)/2
+                DO  I=1,NRD
+                   KRN=(KK-LAMBDA+1)*NRD
+                   DENS(KRN+I)=FSAFE(IPT,I)*FACNJ
+                END DO
+             END DO
+             DO J=KLR+LAMBDA+1,KC
+               DBLENJ=NJ(J)
+               DO L=J,KLR+LAMBDA+1,-1
+                 FACTOR=DBLENJ/NJ(L-1)-1.D0
+                 DO i=1,NRD
+                   KRN=(L-LAMBDA+1)*NRD+I
+                   DENS(KRN-NRD)=DENS(KRN)+(DENS(KRN)-DENS(KRN-NRD))/FACTOR
+                 END DO
+               END DO
+             END DO
+         END DO
+!~~~>  COMPUTE THE COEFFICIENTS OF THE INTERPOLATION POLYNOMIAL
+         DO IN=1,NRD
+            DO J=1,KRIGHT
+               II=NRD*J+IN
+               DENS(II)=DENS(II)-DENS(II-NRD)
+            END DO
+         END DO
+      END IF
+!~~~> COMPUTE OPTIMAL ORDER
+      IF (KC == 2) THEN
+         KOPT=3
+         IF (REJECT) KOPT=2
+         GO TO 80
+      END IF
+      IF (KC <= K) THEN
+         KOPT=KC
+         IF (W(KC-1) < W(KC)*FAC3) KOPT=KC-1
+         IF (W(KC) < W(KC-1)*FAC4) KOPT=MIN0(KC+1,Ncolumns-1)
+      ELSE
+         KOPT=KC-1
+         IF (KC > 3.AND.W(KC-2) < W(KC-1)*FAC3) KOPT=KC-2
+         IF (W(KC) < W(KOPT)*FAC4) KOPT=MIN0(KC,Ncolumns-1)
+      END IF
+!~~~> AFTER A REJECTED STEP
+   80 IF (REJECT) THEN
+         K=MIN0(KOPT,KC)
+         H=MIN(H,HH(K))
+         REJECT=.FALSE.
+         GO TO 10
+      END IF
+!~~~> COMPUTE STEP SIZE FOR NEXT STEP
+      IF (KOPT <= KC) THEN
+         H=HH(KOPT)
+      ELSE
+         IF (KC < K.AND.W(KC) < W(KC-1)*FAC4) THEN
+            H=HH(KC)*A(KOPT+1)/A(KC)
+         ELSE
+            H=HH(KC)*A(KOPT)/A(KC)
+         END IF
+      END IF
+      K=KOPT
+      !Adi H = MAX(H, Hmin)
+      GO TO 10
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> STEP IS REJECTED
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  100 K=MIN0(K,KC)
+      IF (K > 2.AND.W(K-1) < W(K)*FAC3) K=K-1
+      Nrej=Nrej+1
+      H=HH(K)
+      LAST=.FALSE.
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 30
+      GO TO 10
+!~~~> SOLUTION EXIT
+  110 CONTINUE
+      H=HOPT
+      IERR=1
+      RETURN
+!~~~> FAIL EXIT
+  120 WRITE (6,979) T,H
+  979 FORMAT(' EXIT OF SEULEX AT T=',D14.7,'   H=',D14.7)
+      IERR=-1
+      RETURN
+                                                      
+                             
+      END SUBROUTINE SEULEX_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SEUL(JJ,N,T,Y,DY,FX,FJAC,LFJAC,E,LE,IP,&
+               H,Ncolumns,HmaxN,Table,SCAL,NJ,HH,W,A,YH,DYH,DEL,WH,ERR,FacSafe1, &
+               FAC,FAC1,FAC2,FacSafe2,Theta,Nfun,Ndec,Nsol,&
+               ERROLD,IPHES,ICOMP,                             &
+               AUTNMS,REJECT,ATOV,FSAFE,Ncolumns2,NRD,IOUT,    &
+               IPT,CALHES)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> THIS SUBROUTINE COMPUTES THE J-TH LINE OF THE
+!~~~> EXTRAPOLATION TABLE AND PROVIDES AN ESTIMATE
+!~~~> OF THE OPTIMAL STEP SIZE
+      USE KPP_ROOT_Parameters
+      USE KPP_ROOT_Jacobian
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      IMPLICIT INTEGER (I-N)
+      INTEGER :: Ncolumns, Ncolumns2, N, NRD
+      KPP_REAL :: Y(NVAR),YH(NVAR),DY(NVAR),FX(NVAR),DYH(NVAR)
+      KPP_REAL :: DEL(NVAR),WH(NVAR),SCAL(NVAR),HH(Ncolumns),W(Ncolumns),A(Ncolumns)
+#ifdef FULL_ALGEBRA    
+      KPP_REAL :: FJAC(NVAR,NVAR), E(NVAR,NVAR)
+#else
+      KPP_REAL :: FJAC(LU_NONZERO), E(LU_NONZERO)
+#endif      
+      KPP_REAL :: Table(Ncolumns,NVAR)
+      KPP_REAL :: FSAFE(Ncolumns2,NRD)
+      INTEGER :: IP(N),NJ(Ncolumns),IPHES(N),ICOMP(NRD)
+      LOGICAL ATOV,REJECT,AUTNMS,CALHES
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      HJ=H/NJ(JJ)
+      HJI=1.D0/HJ
+#ifdef FULL_ALGEBRA    
+      DO j=1,N
+        DO  i=1,N
+           E(i,j)=-FJAC(i,j)
+        END DO
+        E(j,j)=E(j,j)+HJI
+      END DO
+      CALL DGETRF(N,N,E,N,IP,ISING)
+#else
+      DO  i=1,LU_NONZERO
+         E(i)=-FJAC(i)
+      END DO
+      DO j=1,N
+         E(LU_DIAG(j))=E(LU_DIAG(j))+HJI
+      END DO
+      CALL KppDecomp (E,ISING)
+#endif      
+      Ndec=Ndec+1
+      IF (ISING.NE.0) GOTO 79
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> STARTING PROCEDURE
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (.NOT.AUTNMS) THEN
+          CALL FUN_CHEM(T+HJ,Y,DY)
+       END IF
+       DO i=1,N
+          YH(i)=Y(i)
+          DEL(i)=DY(i)
+       END DO
+#ifdef FULL_ALGEBRA      
+       CALL DGETRS ('N',N,1,E,N,IP,DEL,N,ISING)
+#else
+       CALL KppSolve (E,DEL)
+#endif       
+       Nsol=Nsol+1
+       M=NJ(JJ)
+       IF (IOUT == 2.AND.M == JJ) THEN
+          IPT=IPT+1
+          DO i=1,NRD
+             FSAFE(IPT,I)=DEL(ICOMP(i))
+          END DO
+       END IF
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SEMI-IMPLICIT EULER METHOD
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (M > 1) THEN
+          DO MM=1,M-1
+             DO i=1,N
+                YH(i)=YH(i)+DEL(i)
+             END DO
+             IF (AUTNMS) THEN
+                CALL FUN_CHEM(T+HJ*MM,YH,DYH)
+             ELSE
+                CALL FUN_CHEM(T+HJ*(MM+1),YH,DYH)
+             END IF
+             
+             IF (MM == 1.AND.JJ <= 2) THEN
+!~~~> STABILITY CHECK
+                DEL1=0.D0
+                DO i=1,N
+                   DEL1=DEL1+(DEL(i)/SCAL(i))**2
+                END DO
+                DEL1=SQRT(DEL1)
+                IF (.NOT.AUTNMS) THEN
+                   CALL FUN_CHEM(T+HJ,YH,WH)
+                   
+                   DO i=1,N
+                      DEL(i)=WH(i)-DEL(i)*HJI
+                   END DO
+                ELSE
+                   DO i=1,N
+                      DEL(i)=DYH(i)-DEL(i)*HJI
+                   END DO
+                END IF
+#ifdef FULL_ALGEBRA      
+                CALL DGETRS ('N',N,1,E,N,IP,DEL,N,ISING)
+#else
+                CALL KppSolve (E,DEL)
+#endif
+                Nsol=Nsol+1
+                DEL2=0.D0
+                DO i=1,N
+                   DEL2=DEL2+(DEL(i)/SCAL(i))**2
+                END DO
+                DEL2=SQRT(DEL2)
+                Theta=DEL2/MAX(1.D0,DEL1)
+                IF (Theta > 1.D0) GOTO 79
+             END IF
+#ifdef FULL_ALGEBRA      
+             CALL DGETRS ('N',N,1,E,N,IP,DYH,N,ISING)
+#else
+             CALL KppSolve (E,DYH)
+#endif             
+             Nsol=Nsol+1
+             DO i=1,N
+                DEL(i)=DYH(i)
+             END DO
+             IF (IOUT == 2.AND.MM >= M-JJ) THEN
+                IPT=IPT+1
+                DO i=1,NRD
+                   FSAFE(IPT,i)=DEL(ICOMP(i))
+                END DO
+             END IF
+          END DO
+       END IF
+       DO i=1,N
+          Table(JJ,I)=YH(i)+DEL(i)
+       END DO
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> POLYNOMIAL EXTRAPOLATION
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (JJ == 1) RETURN
+       DO L=JJ,2,-1
+          FAC=(DBLE(NJ(JJ))/DBLE(NJ(L-1)))-1.D0
+          DO i=1,N
+             Table(L-1,I)=Table(L,I)+(Table(L,I)-Table(L-1,I))/FAC
+          END DO
+       END DO
+       ERR=0.D0
+       DO i=1,N
+          ERR=ERR+MIN(ABS((Table(1,I)-Table(2,I)))/SCAL(i),1.D15)**2
+       END DO
+       IF (ERR >= 1.D30) GOTO 79
+       ERR=SQRT(ERR/DBLE(N))
+       IF (JJ > 2.AND.ERR >= ERROLD) GOTO 79
+       ERROLD=MAX(4*ERR,1.D0)
+!~~~> COMPUTE OPTIMAL STEP SIZES
+       EXPO=1.D0/JJ
+       FACMIN=FAC1**EXPO
+       FAC=MIN(FAC2/FACMIN,MAX(FACMIN,(ERR/FacSafe1)**EXPO/FacSafe2))
+       FAC=1.D0/FAC
+       HH(JJ)=MIN(H*FAC,HmaxN)
+       W(JJ)=A(JJ)/HH(JJ)
+       RETURN
+   79  ATOV=.TRUE.
+       H=H*0.5D0
+       REJECT=.TRUE.
+       RETURN
+      END SUBROUTINE SEUL
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM( T, V, FCT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, TOLD
+
+    !TOLD = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = TOLD
+    CALL Fun(V, FIX, RCONST, FCT)
+    Nfun=Nfun+1
+
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM ( T, V, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T, TOLD
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), Jcb(NVAR,NVAR)
+    INTEGER :: i,j
+#else
+    KPP_REAL :: Jcb(LU_NONZERO)
+#endif   
+
+    !TOLD = TIME
+    !TIME = T
+    !CALL Update_SUN()
+    !CALL Update_RCONST()
+    !CALL Update_PHOTO()
+    !TIME = TOLD
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         Jcb(i,j) = 0.0D0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       Jcb(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, Jcb) 
+#endif   
+    Njac=Njac+1
+    
+  END SUBROUTINE JAC_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.c	(revision 3477)
@@ -0,0 +1,90 @@
+void INTEGRATE( double DT )
+{
+KPP_REAL P_VAR[NVAR], D_VAR[NVAR], V1[NVAR], V2[NVAR];
+int IsReject;
+KPP_REAL T, Tnext, STEP, STEPold, Told, SUP;
+KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp;
+int i;
+
+  T = TIME;
+  Tnext = TIME + DT;
+  STEP = STEPMIN;
+  Told = T;
+  SUP  = 1e-14;
+  IsReject = 0;
+  ERR = .5;
+  
+/* -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP --- */
+
+  while ( T < Tnext ) {
+   
+    T = Told + STEP;
+    if ( T > Tnext ) {
+      STEP = Tnext - Told;
+      T = Tnext;
+    }
+
+    FSPLIT_VAR ( VAR,  P_VAR, D_VAR );
+
+    for( i = 0; i < NVAR; i++ ) {
+      if ( fabs(D_VAR[i]) > SUP ) {
+        ratio = P_VAR[i] / D_VAR[i];
+        tmp = (KPP_REAL)exp( (double)(-D_VAR[i] * STEP * 0.5) );
+        V1[i] = tmp * tmp * (VAR[i] - ratio) + ratio;
+        V2[i] = tmp * (VAR[i] - ratio) + ratio;
+      } else {
+        tmp = D_VAR[i] * STEP * 0.5;
+        V1[i] = VAR[i] + P_VAR[i] * STEP * ( 1 - tmp *
+               ( 1 - 2.0 / 3.0 * tmp ) );
+        V2[i] = VAR[i] + P_VAR[i] * 0.5 * STEP * ( 1 - 0.5 * tmp *
+               ( 1 - 1.0 / 3.0 * tmp ) );
+      }
+    }
+
+    FSPLIT_VAR( V2,  P_VAR, D_VAR );
+
+    for( i = 0; i < NVAR; i++ ) {
+      if ( fabs(D_VAR[i]) > SUP ) {
+        ratio = P_VAR[i] / D_VAR[i];
+        tmp = (KPP_REAL)exp( (double)(-D_VAR[i] * STEP * 0.5) );
+        V2[i] = tmp * (V2[i] - ratio) + ratio;
+      } else {
+        tmp = D_VAR[i] * STEP * 0.5;
+        V2[i] = V2[i] + P_VAR[i] * 0.5 * STEP * ( 1 - 0.5 * tmp *
+               ( 1 - 1.0 / 3.0 * tmp ) );
+      }
+    }
+/* ==== Extrapolation and error estimation ======== */
+
+    ERRold=ERR;
+    ERR=0.;
+    for( i = 0; i < NVAR; i++ ) {
+      V1[i] = 2.*V2[i] - V1[i];
+      tmp = (V2[i] - V1[i]) / (ATOL[i] + RTOL[i]*V2[i]); 
+      ERR = ERR + tmp*tmp;
+    }
+    ERR = sqrt(ERR/NVAR);
+    STEPold = STEP;
+
+/* ===== choosing the stepsize ==================== */
+
+    factor = 0.9 / pow(ERR,0.35) * pow(ERRold,0.2);
+    facmax = IsReject ? 1.0 : 5.0;
+
+    factor = max( 0.2, min(factor,facmax) );
+    STEP = min( STEPMAX, max(STEPMIN,factor*STEP) );
+
+/*================================================= */
+
+    if ( (ERR > 1) && (STEPold > STEPMIN) ) {
+      T = Told;
+      IsReject = 1;
+    } else {
+      IsReject = 0;
+      Told = T;
+      for( i = 0; i < NVAR; i++ ) 
+        VAR[i] = max( V1[i], 0.0 );
+      TIME = Tnext;
+    }
+  }
+}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE exqssa
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/exqssa.f	(revision 3477)
@@ -0,0 +1,136 @@
+C -- EXTRAPOLATED QSSA WITH STEADY STATE APPROXIMATION --
+C    For extrapolated plain QSSA (to remove the steady state assumption)
+C    modify slow -> 0, fast -> 1e20
+C
+
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR), V1(NVAR), V2(NVAR)
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, STEPold, Told, SUP
+      KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp
+      INTEGER i
+      KPP_REAL slow, fast
+
+      T = TIN
+      Tnext = TOUT
+      STEP = DMAX1(STEPMIN,1.d-10)
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+      ERR = 1.d0
+      ERRold = 1.d0
+      slow = 0.01
+      fast = 10.  
+
+ 10    continue  
+       Tplus = T + STEP
+       if ( Tplus .gt. Tnext ) then
+          STEP = Tnext - T
+          Tplus = Tnext
+       end if
+
+
+        TITI = TIME
+        TIME = T
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V1(i) = VAR(i) + XXX
+             V2(i) = VAR(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V1(i) = P_VAR(i)/D_VAR(i)
+             V2(i) = V1(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V1(i) = tmp * tmp * (VAR(i) - ratio) + ratio
+              V2(i) = tmp * (VAR(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V1(i) = VAR(i) + P_VAR(i) * STEP * ( 1 - tmp *
+     *             ( 1 - 2.0 / 3.0 * tmp ) )
+              V2(i) = VAR(i) + P_VAR(i) * 0.5 * STEP*( 1-0.5*tmp*
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+              end if
+          END IF
+        end do
+
+        TITI = TIME
+        TIME = T + 0.5*STEP
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( V2,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V2(i) = V2(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V2(i) = P_VAR(i)/D_VAR(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V2(i) = tmp * (V2(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V2(i) = V2(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+            end if
+          END IF
+        end do
+
+C ===== Extrapolation and error estimation ========
+
+        ERRold=ERR
+        ERR=0.0D0
+          do i=1,NVAR
+             ERR = ERR + ((V2(i)-V1(i))/(ATOL(i) + RTOL(i)*V2(i)))**2
+          end do       
+        ERR = DSQRT( ERR/NVAR )
+        STEPold=STEP
+
+C ===== choosing the stepsize =====================
+
+        factor = 0.9*ERR**(-0.35)*ERRold**0.2
+        if (IsReject) then
+            facmax=1.
+        else
+            facmax=8.
+        end if 
+        factor = DMAX1( 1.25D-1, DMIN1(factor,facmax) )
+        STEP = DMIN1( STEPMAX, DMAX1(STEPMIN,factor*STEP) )    
+
+C===================================================
+
+        if ( (ERR.gt.1).and.(STEPold.gt.STEPMIN) ) then
+          IsReject = .true.
+        else
+          IsReject = .false.
+          do 140 i=1,NVAR
+             VAR(i)  = DMAX1(2*V2(i)-V1(i), 0.d0)
+ 140      continue 
+          T = Tplus     
+        end if
+      if ( T .lt. Tnext ) go to 10
+
+      TIME = Tnext
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_rodas.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_rodas.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_rodas.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_rodas
+
+#INLINE F_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_rodas.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_rodas.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_rodas.f	(revision 3477)
@@ -0,0 +1,647 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+         
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+      
+      PARAMETER (LWORK=2*NVAR*NVAR+14*NVAR+20,LIWORK=NVAR+20)
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+
+      ITOL=1     ! --- VECTOR TOLERANCES 
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      IDFX=0     ! --- INTERNAL TIME DERIVATIVE
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+
+      IWORK(3) = 1
+
+      CALL ATMRODAS(NVAR,FUNC_CHEM,Autonomous,TIN,VAR,TOUT,
+     &                  STEPMIN,RTOL,ATOL,ITOL,
+     &                  JAC_CHEM,IJAC,MLJAC,MUJAC,FUNC_CHEM,IDFX,
+     &                  FUNC_CHEM,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMRODAS: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMRODAS(N,FCN,IFCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,DFX,IDFX,
+     &                  MAS ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(X,Y).
+C     THIS IS AN EMBEDDED ROSENBROCK METHOD OF ORDER (3)4  
+C     (WITH STEP SIZE CONTROL).
+C     C.F. SECTIONS IV.7  AND VI.3
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND 
+C              E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+C --------------------------------------------------------- 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(*),RelTol(*),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL AUTNMS,IMPLCT,JBAND,ARRET,PRED
+      EXTERNAL FCN,JAC,DFX,MAS
+      COMMON /STATISTICS/ NFCN,NACCPT,NREJCT,NSTEP,NJAC,NDEC,NSOL
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS 
+C *** *** *** *** *** *** ***
+      ARRET=.FALSE.
+      METH = 1
+      NMAX=100000
+C -------- PRED   STEP SIZE CONTROL
+      IF(IWORK(3).LE.1)THEN
+         PRED=.TRUE.
+      ELSE
+         PRED=.FALSE.
+      END IF
+      UROUND=1.D-16
+      NM1 = N
+      M1  = N
+      M2  = N
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(2).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(2)
+      END IF
+C -------  FAC1,FAC2     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(3).EQ.0.D0)THEN
+         FAC1=5.D0
+      ELSE
+         FAC1=1.D0/WORK(3)
+      END IF
+      IF(WORK(4).EQ.0.D0)THEN
+         FAC2=1.D0/6.0D0
+      ELSE
+         FAC2=1.D0/WORK(4)
+      END IF
+      IF (FAC1.LT.1.0D0.OR.FAC2.GT.1.0D0) THEN
+            WRITE(6,*)' CURIOUS INPUT WORK(3,4)=',WORK(3),WORK(4)
+            ARRET=.TRUE.
+         END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      SAFE=0.9D0
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO I=1,N
+             IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+                WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+                ARRET=.TRUE.
+             END IF
+          END DO
+      END IF
+      
+      IF (ARRET) STOP
+      NM1 = N
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- AUTONOMOUS, IMPLICIT, BANDED OR NOT ?
+      AUTNMS=IFCN.EQ.0
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.LT.NM1
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN AND MATRIX E
+         MLJAC=NM1
+         MUJAC=NM1
+         LDJAC=NM1
+         LDE=NM1
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+         print *, 'Implicit 1'
+      ELSE
+         LDMAS=0
+         IJOB=1
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYNEW=21
+      IEDY1=IEYNEW+N
+      IEDY=IEDY1+N
+      IEAK1=IEDY+N
+      IEAK2=IEAK1+N
+      IEAK3=IEAK2+N
+      IEAK4=IEAK3+N
+      IEAK5=IEAK4+N
+      IEAK6=IEAK5+N
+      IEFX =IEAK6+N
+      IECON=IEFX+N
+      IEJAC=IECON+4*N
+      IEMAS=IEJAC+N*LDJAC
+      IEE  =IEMAS+NM1*LDMAS
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+NM1*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=21
+      ISTORE=IEIP+NM1-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL ROSCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,JAC,IJAC,
+     &   MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,IOUT,IDID,NMAX,
+     &   UROUND,METH,IJOB,FAC1,FAC2,SAFE,AUTNMS,IMPLCT,JBAND,PRED,LDJAC,
+     &   LDE,LDMAS2,WORK(IEYNEW),WORK(IEDY1),WORK(IEDY),WORK(IEAK1),
+     &   WORK(IEAK2),WORK(IEAK3),WORK(IEAK4),WORK(IEAK5),WORK(IEAK6),
+     &   WORK(IEFX),WORK(IEJAC),WORK(IEE),WORK(IEMAS),IWORK(IEIP),
+     &   WORK(IECON),
+     &   M1,M2,NM1,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL)
+      IWORK(14)=NFCN
+      IWORK(15)=NJAC
+      IWORK(16)=NSTEP
+      IWORK(17)=NACCPT
+      IWORK(18)=NREJCT
+      IWORK(19)=NDEC
+      IWORK(20)=NSOL
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE ROSCOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,
+     &  ITOL,JAC,IJAC,
+     &  MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,IOUT,IDID,NMAX,
+     &  UROUND,METH,IJOB,FAC1,FAC2,SAFE,AUTNMS,IMPLCT,BANDED,
+     &  PRED,LDJAC,
+     &  LDE,LDMAS,YNEW,DY1,DY,AK1,AK2,AK3,AK4,AK5,AK6,
+     &  FX,FJAC,E,FMAS,IP,CONT,
+     &  M1,M2,NM1,NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR RODAS
+C     PARAMETERS SAME AS IN RODAS WITH WORKSPACE ADDED 
+C ---------------------------------------------------------- 
+C         DECLARATIONS 
+C ---------------------------------------------------------- 
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      DIMENSION Y(N),YNEW(N),DY1(N),DY(N),AK1(N),
+     *  AK2(N),AK3(N),AK4(N),AK5(N),AK6(N),FX(N),
+     *  FJAC(LU_NONZERO),E(LDE,NM1),FMAS(LDMAS,NM1),
+     *  AbsTol(*),RelTol(*)
+      DIMENSION CONT(4*N)
+      INTEGER IP(NM1)
+      LOGICAL REJECT,AUTNMS,IMPLCT,BANDED
+      LOGICAL ONE,LAST,PRED,SINGULAR
+      EXTERNAL FCN, MAS, JAC, DFX
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+      COMMON /CONROS/XOLD,HOUT,NN
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** *** 
+      NN=N 
+      NN2=2*N
+      NN3=3*N
+      LRC=4*N
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF (IMPLCT) CALL MAS (NM1,FMAS,LDMAS)
+C ------ SET THE PARAMETERS OF THE METHOD -----
+      CALL ROCOE(METH,A21,A31,A32,A41,A42,A43,A51,A52,A53,A54,
+     &    C21,C31,C32,C41,C42,C43,C51,C52,C53,C54,C61,
+     &    C62,C63,C64,C65,GAMMA,C2,C3,C4,D1,D2,D3,D4,
+     &    D21,D22,D23,D24,D25,D31,D32,D33,D34,D35)
+C --- INITIAL PREPARATIONS
+      IF (M1.GT.0) IJOB=IJOB+10
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAXN=DMIN1(DABS(HMAX),DABS(XEND-X))
+      IF (DABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=DMIN1(DABS(H),HMAXN) 
+      H=SIGN(H,POSNEG) 
+      HACC = H
+      ERRACC = 1.0d0
+      REJECT=.FALSE.
+      LAST=.FALSE.
+      NSING=0
+      IRTRN=1
+      IF (AUTNMS) THEN
+         HD1=0.0D0
+         HD2=0.0D0
+         HD3=0.0D0
+         HD4=0.0D0
+      END IF
+C -------- PREPARE BAND-WIDTHS --------
+      MBDIAG=MUMAS+1
+
+C --- BASIC INTEGRATION STEP 
+      LAST = .FALSE.
+      DO WHILE (.NOT.LAST) 
+      IF (.NOT. REJECT) THEN
+      IF (NSTEP.GT.NMAX) CALL FAIL_EXIT(3,X,IDID,H,NMAX) 
+      IF ( 0.1D0*DABS(H) .LE. DABS(X)*UROUND )
+     *       CALL FAIL_EXIT(2,X,IDID,H,NMAX)
+      HOPT=H
+      IF ((X+H*1.0001D0-XEND)*POSNEG.GE.0.D0) THEN
+         H=XEND-X
+         LAST=.TRUE.
+      END IF
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      CALL FCN(N,X,Y,DY1)
+      CALL JAC(N,X,Y,FJAC,LDJAC)
+      NFCN=NFCN+1
+      NJAC=NJAC+1
+
+      IF (.NOT.AUTNMS) THEN
+C --- COMPUTE NUMERICALLY THE DERIVATIVE WITH RESPECT TO X
+            DELT=DSQRT(UROUND*DMAX1(1.D-5,DABS(X)))
+            XDELT=X+DELT
+            CALL FCN(N,XDELT,Y,AK1)
+            DO J=1,N
+               FX(J)=(AK1(J)-DY1(J))/DELT
+            END DO
+      END IF
+      END IF
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE STAGES
+C *** *** *** *** *** *** ***
+      SINGULAR = .TRUE.
+      DO WHILE (SINGULAR)
+        FAC=1.D0/(H*GAMMA)
+        CALL DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC,E,LDE,IP,IER,IJOB,IMPLCT,IP)
+        SINGULAR = IER.NE.0
+        IF (SINGULAR) THEN
+          NSING=NSING+1
+          IF (NSING.GE.5) CALL FAIL_EXIT(1,X,IDID,H,NMAX)
+          H=H*0.5D0
+          REJECT=.TRUE.
+          LAST=.FALSE.
+          ONE = .FALSE.
+        END IF 
+      END DO
+
+      NDEC=NDEC+1
+C --- PREPARE FOR THE COMPUTATION OF THE 6 STAGES
+      HC21=C21/H
+      HC31=C31/H
+      HC32=C32/H
+      HC41=C41/H
+      HC42=C42/H
+      HC43=C43/H
+      HC51=C51/H
+      HC52=C52/H
+      HC53=C53/H
+      HC54=C54/H
+      HC61=C61/H
+      HC62=C62/H
+      HC63=C63/H
+      HC64=C64/H
+      HC65=C65/H
+      IF (.NOT.AUTNMS) THEN
+         HD1=H*D1
+         HD2=H*D2
+         HD3=H*D3
+         HD4=H*D4
+      END IF
+C --- THE STAGES
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY1,AK1,FX,YNEW,HD1,IJOB,.FALSE.)
+      DO  I=1,N
+         YNEW(I)=Y(I)+A21*AK1(I)
+      END DO
+      CALL FCN(N,X+C2*H,YNEW,DY)
+      DO I=1,N
+         YNEW(I)=HC21*AK1(I)
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK2,FX,YNEW,HD2,IJOB,.TRUE.)
+      DO I=1,N
+         YNEW(I)=Y(I)+A31*AK1(I)+A32*AK2(I) 
+      END DO
+      CALL FCN(N,X+C3*H,YNEW,DY)
+      DO I=1,N
+         YNEW(I)=HC31*AK1(I)+HC32*AK2(I)
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK3,FX,YNEW,HD3,IJOB,.TRUE.)
+      DO I=1,N
+         YNEW(I)=Y(I)+A41*AK1(I)+A42*AK2(I)+A43*AK3(I)
+      END DO
+      CALL FCN(N,X+C4*H,YNEW,DY)
+      DO I=1,N
+         YNEW(I)=HC41*AK1(I)+HC42*AK2(I)+HC43*AK3(I) 
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK4,FX,YNEW,HD4,IJOB,.TRUE.)
+      DO I=1,N
+         YNEW(I)=Y(I)+A51*AK1(I)+A52*AK2(I)+A53*AK3(I)+A54*AK4(I)
+      END DO
+      CALL FCN(N,X+H,YNEW,DY)
+      DO I=1,N
+         AK6(I)=HC52*AK2(I)+HC54*AK4(I)+HC51*AK1(I)+HC53*AK3(I) 
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK5,FX,AK6,0.D0,IJOB,.TRUE.)
+C ------------ EMBEDDED SOLUTION ---------------
+      DO I=1,N
+         YNEW(I)=YNEW(I)+AK5(I)  
+      END DO
+      CALL FCN(N,X+H,YNEW,DY)
+      DO I=1,N
+         AK5(I)=HC61*AK1(I)+HC62*AK2(I)+HC65*AK5(I)
+     &              +HC64*AK4(I)+HC63*AK3(I) 
+      END DO
+      CALL SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &    M1,M2,NM1,FAC,E,LDE,IP,DY,AK6,FX,AK5,0.D0,IJOB,.TRUE.)
+C ------------ NEW SOLUTION ---------------
+      DO  I=1,N
+         YNEW(I)=YNEW(I)+AK6(I)  
+      END DO
+      NSOL=NSOL+6
+      NFCN=NFCN+5 
+
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION  
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+C ------------ COMPUTE ERROR ESTIMATION ----------------
+      ERR=0.0D0
+      DO I=1,N
+         IF (ITOL.EQ.0) THEN
+            SK=AbsTol(1)+RelTol(1)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+         ELSE
+            SK=AbsTol(I)+RelTol(I)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+         END IF
+         ERR=ERR+(AK6(I)/SK)**2
+c2           ERR = DMAX1(ERR, AK6(I)/SK)
+      END DO
+      ERR=DSQRT(ERR/N)
+      
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .2<=HNEW/H<=6.
+      FAC=DMAX1(FAC2,DMIN1(FAC1,(ERR)**0.25D0/SAFE))
+      HNEW=DMAX1(H/FAC, STEPMIN)  
+
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+
+      IF ( (ERR.LE.1.D0).or.(H.LE.STEPMIN) ) THEN
+C --- STEP IS ACCEPTED  
+         NACCPT=NACCPT+1
+         IF (PRED) THEN
+C       --- PREDICTIVE CONTROLLER OF GUSTAFSSON
+            IF (NACCPT.GT.1) THEN
+               FACGUS=(HACC/H)*(ERR**2/ERRACC)**0.25D0/SAFE
+               FACGUS=DMAX1(FAC2,DMIN1(FAC1,FACGUS))
+               FAC=DMAX1(FAC,FACGUS)
+               HNEW=DMAX1(H/FAC, STEPMIN)
+            END IF
+            HACC=H
+            ERRACC=DMAX1(1.0D-2,ERR)
+         END IF
+         DO I=1,N 
+            Y(I)=YNEW(I)
+         END DO
+         XOLD=X 
+         X=X+H
+         IF (DABS(HNEW).GT.HMAXN) HNEW=POSNEG*HMAXN
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H)) 
+         REJECT=.FALSE.
+         H=HNEW
+      ELSE
+C --- STEP IS REJECTED  
+         REJECT=.TRUE.
+         LAST=.FALSE.
+         H=HNEW
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+      END IF
+      END DO
+      RETURN
+      END 
+C
+      SUBROUTINE FAIL_EXIT(NERR,X,IDID,H,NMAX)
+      INTEGER NERR, NMAX
+      KPP_REAL X, H
+      GO TO (1,2,3,4) NERR
+ 1    CONTINUE
+      WRITE(6,979)X   
+      WRITE(6,*) ' MATRIX IS REPEATEDLY SINGULAR, IER=',IER
+      IDID=-4
+      STOP
+ 2    CONTINUE
+      WRITE(6,979)X   
+      WRITE(6,*) ' STEP SIZE TOO SMALL, H=',H
+      IDID=-3
+      STOP
+ 3    CONTINUE
+      WRITE(6,979)X   
+      WRITE(6,*) ' MORE THAN NMAX =',NMAX,'STEPS ARE NEEDED' 
+      IDID=-2
+      STOP
+C --- EXIT CAUSED BY solout
+ 4    CONTINUE
+      WRITE(6,979)X
+ 979  FORMAT(' EXIT OF RODAS AT X=',E18.4) 
+      IDID=2
+      RETURN
+      END
+      
+      SUBROUTINE ROCOE(METH,A21,A31,A32,A41,A42,A43,A51,A52,A53,A54,
+     &  C21,C31,C32,C41,C42,C43,C51,C52,C53,C54,C61,
+     &  C62,C63,C64,C65,GAMMA,C2,C3,C4,D1,D2,D3,D4,
+     &  D21,D22,D23,D24,D25,D31,D32,D33,D34,D35)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+
+      if (METH.ne.1) print *, 'WRONG CHOICE OF METHOD'
+        C2=0.386D0
+        C3=0.21D0 
+        C4=0.63D0
+        BET2P=0.0317D0
+        BET3P=0.0635D0
+        BET4P=0.3438D0 
+       D1= 0.2500000000000000D+00
+       D2=-0.1043000000000000D+00
+       D3= 0.1035000000000000D+00
+       D4=-0.3620000000000023D-01
+       A21= 0.1544000000000000D+01
+       A31= 0.9466785280815826D+00
+       A32= 0.2557011698983284D+00
+       A41= 0.3314825187068521D+01
+       A42= 0.2896124015972201D+01
+       A43= 0.9986419139977817D+00
+       A51= 0.1221224509226641D+01
+       A52= 0.6019134481288629D+01
+       A53= 0.1253708332932087D+02
+       A54=-0.6878860361058950D+00
+       C21=-0.5668800000000000D+01
+       C31=-0.2430093356833875D+01
+       C32=-0.2063599157091915D+00
+       C41=-0.1073529058151375D+00
+       C42=-0.9594562251023355D+01
+       C43=-0.2047028614809616D+02
+       C51= 0.7496443313967647D+01
+       C52=-0.1024680431464352D+02
+       C53=-0.3399990352819905D+02
+       C54= 0.1170890893206160D+02
+       C61= 0.8083246795921522D+01
+       C62=-0.7981132988064893D+01
+       C63=-0.3152159432874371D+02
+       C64= 0.1631930543123136D+02
+       C65=-0.6058818238834054D+01
+       GAMMA= 0.2500000000000000D+00  
+
+       D21= 0.1012623508344586D+02
+       D22=-0.7487995877610167D+01
+       D23=-0.3480091861555747D+02
+       D24=-0.7992771707568823D+01
+       D25= 0.1025137723295662D+01
+       D31=-0.6762803392801253D+00
+       D32= 0.6087714651680015D+01
+       D33= 0.1643084320892478D+02
+       D34= 0.2476722511418386D+02
+       D35=-0.6594389125716872D+01
+      RETURN
+      END
+C
+
+C ******************************************
+C     VERSION OF SEPTEMBER 18, 1995      
+C ******************************************
+C
+      SUBROUTINE DECOMR(N,FJAC,LDJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &            M1,M2,NM1,FAC1,E1,LDE1,IP1,IER,IJOB,CALHES,IPHES)
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      DIMENSION FJAC(LU_NONZERO),FMAS(LDMAS,NM1),E1(LU_NONZERO),
+     &          IP1(NM1),IPHES(N)
+      LOGICAL CALHES
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+
+
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      DO J=1,LU_NONZERO
+         E1(J) = -FJAC(J)
+      END DO
+      DO J=1,N
+         E1(LU_DIAG(J)) = E1(LU_DIAG(J)) + FAC1
+      END DO
+      CALL KppDecomp (E1,IER)
+      RETURN
+      END
+C
+C     END OF SUBROUTINE DECOMR
+C
+C ***********************************************************
+C
+C
+C
+C
+      SUBROUTINE SLVROD(N,FJAC,LDJAC,MLJAC,MUJAC,FMAS,LDMAS,MLMAS,MUMAS,
+     &          M1,M2,NM1,FAC1,E,LDE,IP,DY,AK,FX,YNEW,HD,IJOB,STAGE1)
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      DIMENSION FJAC(LU_NONZERO),FMAS(LDMAS,NM1),E(LU_NONZERO),
+     &          IP(NM1),DY(N),AK(N),FX(N),YNEW(N)
+      LOGICAL STAGE1
+      COMMON/LINAL/MLE,MUE,MBJAC,MBB,MDIAG,MDIFF,MBDIAG
+C
+      IF (HD.EQ.0.D0) THEN
+         DO  I=1,N
+           AK(I)=DY(I)
+         END DO
+      ELSE
+         DO I=1,N
+            AK(I)=DY(I)+HD*FX(I)
+         END DO
+      END IF
+
+C ---  B=IDENTITY, JACOBIAN A FULL MATRIX
+      IF (STAGE1) THEN
+         DO I=1,N
+            AK(I)=AK(I)+YNEW(I)
+         END DO
+      END IF
+      CALL KppSolve (E,AK)
+      RETURN
+      END
+C
+C     END OF SUBROUTINE SLVROD
+C
+C
+C ***********************************************************
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_ros4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_ros4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_ros4.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE kpp_ros4
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_ros4.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_ros4.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/kpp_ros4.f	(revision 3477)
@@ -0,0 +1,1052 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      PARAMETER (LWORK=2*NVAR*NVAR+14*NVAR+20,LIWORK=NVAR+20)
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)
+      EXTERNAL FUNC_CHEM,JAC_CHEM,SOLOUT
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      MLJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      MUJAC=NVAR ! --- JACOBIAN IS A FULL MATRIX
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+      IOUT=0     ! --- OUTPUT ROUTINE IS NOT USED DURING INTEGRATION
+      IDFX=0     ! --- INTERNAL TIME DERIVATIVE
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+      IWORK(2) = 6
+
+      CALL KPP_ROS4(NVAR,FUNC_CHEM,Autonomous,TIN,VAR,TOUT,
+     &                  STEPMIN,RTOL,ATOL,ITOL,
+     &                  JAC_CHEM,IJAC,MLJAC,MUJAC,FUNC_CHEM,IDFX,
+     &                  FUNC_CHEM,IMAS,MLJAC,MUJAC,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+
+      IF (IDID.LT.0) THEN
+        print *,'KPP_ROS4: Unsucessful step at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE KPP_ROS4(N,FCN,IFCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC,MLJAC,MUJAC,DFX,IDFX,
+     &                  MAS ,IMAS,MLMAS,MUMAS,
+     &                  SOLOUT,IOUT,
+     &                  WORK,LWORK,IWORK,LIWORK,IDID)
+C ----------------------------------------------------------
+C     NUMERICAL SOLUTION OF A STIFF (OR DIFFERENTIAL ALGEBRAIC)
+C     SYSTEM OF FIRST 0RDER ORDINARY DIFFERENTIAL EQUATIONS  MY'=F(X,Y).
+C     THIS IS AN EMBEDDED ROSENBROCK METHOD OF ORDER (3)4  
+C     (WITH STEP SIZE CONTROL).
+C     C.F. SECTION IV.7
+C
+C     AUTHORS: E. HAIRER AND G. WANNER
+C              UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+C              CH-1211 GENEVE 24, SWITZERLAND 
+C              E-MAIL:  HAIRER@CGEUGE51.BITNET,  WANNER@CGEUGE51.BITNET
+C     
+C     THIS CODE IS PART OF THE BOOK:
+C         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+C         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+C         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+C         SPRINGER-VERLAG (1990)               
+C      
+C     VERSION OF NOVEMBER 17, 1992
+C
+C     INPUT PARAMETERS  
+C     ----------------  
+C     N           DIMENSION OF THE SYSTEM 
+C
+C     FCN         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE
+C                 VALUE OF F(X,Y):
+C                    SUBROUTINE FCN(N,X,Y,F)
+C                    KPP_REAL X,Y(N),F(N)
+C                    F(1)=...   ETC.
+C
+C     IFCN        GIVES INFORMATION ON FCN:
+C                    IFCN=0: F(X,Y) INDEPENDENT OF X (AUTONOMOUS)
+C                    IFCN=1: F(X,Y) MAY DEPEND ON X (NON-AUTONOMOUS)
+C
+C     X           INITIAL X-VALUE
+C
+C     Y(N)        INITIAL VALUES FOR Y
+C
+C     XEND        FINAL X-VALUE (XEND-X MAY BE POSITIVE OR NEGATIVE)
+C
+C     H           INITIAL STEP SIZE GUESS;
+C                 FOR STIFF EQUATIONS WITH INITIAL TRANSIENT, 
+C                 H=1.D0/(NORM OF F'), USUALLY 1.D-2 OR 1.D-3, IS GOOD.
+C                 THIS CHOICE IS NOT VERY IMPORTANT, THE CODE QUICKLY
+C                 ADAPTS ITS STEP SIZE. STUDY THE CHOSEN VALUES FOR A FEW
+C                 STEPS IN SUBROUTINE "SOLOUT", WHEN YOU ARE NOT SURE.
+C                 (IF H=0.D0, THE CODE PUTS H=1.D-6).
+C
+C     RelTol,AbsTol   RELATIVE AND ABSOLUTE ERROR TOLERANCES. THEY
+C                 CAN BE BOTH SCALARS OR ELSE BOTH VECTORS OF LENGTH N.
+C
+C     ITOL        SWITCH FOR RelTol AND AbsTol:
+C                   ITOL=0: BOTH RelTol AND AbsTol ARE SCALARS.
+C                     THE CODE KEEPS, ROUGHLY, THE LOCAL ERROR OF
+C                     Y(I) BELOW RelTol*ABS(Y(I))+AbsTol
+C                   ITOL=1: BOTH RelTol AND AbsTol ARE VECTORS.
+C                     THE CODE KEEPS THE LOCAL ERROR OF Y(I) BELOW
+C                     RelTol(I)*ABS(Y(I))+AbsTol(I).
+C
+C     JAC         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO Y
+C                 (THIS ROUTINE IS ONLY CALLED IF IJAC=1; SUPPLY
+C                 A DUMMY SUBROUTINE IN THE CASE IJAC=0).
+C                 FOR IJAC=1, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE JAC(N,X,Y,DFY,LDFY)
+C                    KPP_REAL X,Y(N),DFY(LDFY,N)
+C                    DFY(1,1)= ...
+C                 LDFY, THE COLOMN-LENGTH OF THE ARRAY, IS
+C                 FURNISHED BY THE CALLING PROGRAM.
+C                 IF (MLJAC.EQ.N) THE JACOBIAN IS SUPPOSED TO
+C                    BE FULL AND THE PARTIAL DERIVATIVES ARE
+C                    STORED IN DFY AS
+C                       DFY(I,J) = PARTIAL F(I) / PARTIAL Y(J)
+C                 ELSE, THE JACOBIAN IS TAKEN AS BANDED AND
+C                    THE PARTIAL DERIVATIVES ARE STORED
+C                    DIAGONAL-WISE AS
+C                       DFY(I-J+MUJAC+1,J) = PARTIAL F(I) / PARTIAL Y(J).
+C
+C     IJAC        SWITCH FOR THE COMPUTATION OF THE JACOBIAN:
+C                    IJAC=0: JACOBIAN IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "JAC" IS NEVER CALLED.
+C                    IJAC=1: JACOBIAN IS SUPPLIED BY SUBROUTINE JAC.
+C
+C     MLJAC       SWITCH FOR THE BANDED STRUCTURE OF THE JACOBIAN:
+C                    MLJAC=N: JACOBIAN IS A FULL MATRIX. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLJAC<N: MLJAC IS THE LOWER BANDWITH OF JACOBIAN 
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C
+C     MUJAC       UPPER BANDWITH OF JACOBIAN  MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLJAC=N.
+C
+C     DFX         NAME (EXTERNAL) OF THE SUBROUTINE WHICH COMPUTES
+C                 THE PARTIAL DERIVATIVES OF F(X,Y) WITH RESPECT TO X
+C                 (THIS ROUTINE IS ONLY CALLED IF IDFX=1 AND IFCN=1;
+C                 SUPPLY A DUMMY SUBROUTINE IN THE CASE IDFX=0 OR IFCN=0).
+C                 OTHERWISE, THIS SUBROUTINE MUST HAVE THE FORM
+C                    SUBROUTINE DFX(N,X,Y,FX)
+C                    KPP_REAL X,Y(N),FX(N)
+C                    FX(1)= ...
+C                
+C     IDFX        SWITCH FOR THE COMPUTATION OF THE DF/DX:
+C                    IDFX=0: DF/DX IS COMPUTED INTERNALLY BY FINITE
+C                       DIFFERENCES, SUBROUTINE "DFX" IS NEVER CALLED.
+C                    IDFX=1: DF/DX IS SUPPLIED BY SUBROUTINE DFX.
+C
+C     ----   MAS,IMAS,MLMAS, AND MUMAS HAVE ANALOG MEANINGS      -----
+C     ----   FOR THE "MASS MATRIX" (THE MATRIX "M" OF SECTION IV.8): -
+C
+C     MAS         NAME (EXTERNAL) OF SUBROUTINE COMPUTING THE MASS-
+C                 MATRIX M.
+C                 IF IMAS=0, THIS MATRIX IS ASSUMED TO BE THE IDENTITY
+C                 MATRIX AND NEEDS NOT TO BE DEFINED;
+C                 SUPPLY A DUMMY SUBROUTINE IN THIS CASE.
+C                 IF IMAS=1, THE SUBROUTINE MAS IS OF THE FORM
+C                    SUBROUTINE MAS(N,AM,LMAS)
+C                    KPP_REAL AM(LMAS,N)
+C                    AM(1,1)= ....
+C                    IF (MLMAS.EQ.N) THE MASS-MATRIX IS STORED
+C                    AS FULL MATRIX LIKE
+C                         AM(I,J) = M(I,J)
+C                    ELSE, THE MATRIX IS TAKEN AS BANDED AND STORED
+C                    DIAGONAL-WISE AS
+C                         AM(I-J+MUMAS+1,J) = M(I,J).
+C
+C     IMAS       GIVES INFORMATION ON THE MASS-MATRIX:
+C                    IMAS=0: M IS SUPPOSED TO BE THE IDENTITY
+C                       MATRIX, MAS IS NEVER CALLED.
+C                    IMAS=1: MASS-MATRIX  IS SUPPLIED.
+C
+C     MLMAS       SWITCH FOR THE BANDED STRUCTURE OF THE MASS-MATRIX:
+C                    MLMAS=N: THE FULL MATRIX CASE. THE LINEAR
+C                       ALGEBRA IS DONE BY FULL-MATRIX GAUSS-ELIMINATION.
+C                    0<=MLMAS<N: MLMAS IS THE LOWER BANDWITH OF THE
+C                       MATRIX (>= NUMBER OF NON-ZERO DIAGONALS BELOW
+C                       THE MAIN DIAGONAL).
+C                 MLMAS IS SUPPOSED TO BE .LE. MLJAC.
+C
+C     MUMAS       UPPER BANDWITH OF MASS-MATRIX (>= NUMBER OF NON-
+C                 ZERO DIAGONALS ABOVE THE MAIN DIAGONAL).
+C                 NEED NOT BE DEFINED IF MLMAS=N.
+C                 MUMAS IS SUPPOSED TO BE .LE. MUJAC.
+C
+C     SOLOUT      NAME (EXTERNAL) OF SUBROUTINE PROVIDING THE
+C                 NUMERICAL SOLUTION DURING INTEGRATION. 
+C                 IF IOUT=1, IT IS CALLED AFTER EVERY SUCCESSFUL STEP.
+C                 SUPPLY A DUMMY SUBROUTINE IF IOUT=0. 
+C                 IT MUST HAVE THE FORM
+C                    SUBROUTINE SOLOUT (NR,XOLD,X,Y,N,IRTRN)
+C                    KPP_REAL X,Y(N)
+C                    ....  
+C                 SOLOUT FURNISHES THE SOLUTION "Y" AT THE NR-TH
+C                    GRID-POINT "X" (THEREBY THE INITIAL VALUE IS
+C                    THE FIRST GRID-POINT).
+C                 "IRTRN" SERVES TO INTERRUPT THE INTEGRATION. IF IRTRN
+C                    IS SET <0, ROS4 RETURNS TO THE CALLING PROGRAM.
+C           
+C     IOUT        GIVES INFORMATION ON THE SUBROUTINE SOLOUT:
+C                    IOUT=0: SUBROUTINE IS NEVER CALLED
+C                    IOUT=1: SUBROUTINE IS USED FOR OUTPUT
+C
+C     WORK        ARRAY OF WORKING SPACE OF LENGTH "LWORK".
+C                 SERVES AS WORKING SPACE FOR ALL VECTORS AND MATRICES.
+C                 "LWORK" MUST BE AT LEAST
+C                             N*(LJAC+LMAS+LE1+8)+5
+C                 WHERE
+C                    LJAC=N              IF MLJAC=N (FULL JACOBIAN)
+C                    LJAC=MLJAC+MUJAC+1  IF MLJAC<N (BANDED JAC.)
+C                 AND                  
+C                    LMAS=0              IF IMAS=0
+C                    LMAS=N              IF IMAS=1 AND MLMAS=N (FULL)
+C                    LMAS=MLMAS+MUMAS+1  IF MLMAS<N (BANDED MASS-M.)
+C                 AND
+C                    LE1=N               IF MLJAC=N (FULL JACOBIAN)
+C                    LE1=2*MLJAC+MUJAC+1 IF MLJAC<N (BANDED JAC.). 
+c
+C                 IN THE USUAL CASE WHERE THE JACOBIAN IS FULL AND THE
+C                 MASS-MATRIX IS THE INDENTITY (IMAS=0), THE MINIMUM
+C                 STORAGE REQUIREMENT IS 
+C                             LWORK = 2*N*N+8*N+5.
+C
+C     LWORK       DECLARED LENGHT OF ARRAY "WORK".
+C
+C     IWORK       INTEGER WORKING SPACE OF LENGTH "LIWORK".
+C                 "LIWORK" MUST BE AT LEAST N+2.
+C
+C     LIWORK      DECLARED LENGHT OF ARRAY "IWORK".
+C
+C ----------------------------------------------------------------------
+C 
+C     SOPHISTICATED SETTING OF PARAMETERS
+C     -----------------------------------
+C              SEVERAL PARAMETERS OF THE CODE ARE TUNED TO MAKE IT WORK 
+C              WELL. THEY MAY BE DEFINED BY SETTING WORK(1),..,WORK(5)
+C              AS WELL AS IWORK(1),IWORK(2) DIFFERENT FROM ZERO.
+C              FOR ZERO INPUT, THE CODE CHOOSES DEFAULT VALUES:
+C
+C    IWORK(1)  THIS IS THE MAXIMAL NUMBER OF ALLOWED STEPS.
+C              THE DEFAULT VALUE (FOR IWORK(1)=0) IS 100000.
+C
+C    IWORK(2)  SWITCH FOR THE CHOICE OF THE COEFFICIENTS
+C              IF IWORK(2).EQ.1  METHOD OF SHAMPINE
+C              IF IWORK(2).EQ.2  METHOD GRK4T OF KAPS-RENTROP
+C              IF IWORK(2).EQ.3  METHOD GRK4A OF KAPS-RENTROP
+C              IF IWORK(2).EQ.4  METHOD OF VAN VELDHUIZEN (GAMMA=1/2)
+C              IF IWORK(2).EQ.5  METHOD OF VAN VELDHUIZEN ("D-STABLE")
+C              IF IWORK(2).EQ.6  AN L-STABLE METHOD
+C              THE DEFAULT VALUE (FOR IWORK(2)=0) IS IWORK(2)=2.
+C
+C    WORK(1)   UROUND, THE ROUNDING UNIT, DEFAULT 1.D-16.
+C
+C    WORK(2)   MAXIMAL STEP SIZE, DEFAULT XEND-X.
+C
+C    WORK(3), WORK(4)   PARAMETERS FOR STEP SIZE SELECTION
+C              THE NEW STEP SIZE IS CHOSEN SUBJECT TO THE RESTRICTION
+C                 WORK(3) <= HNEW/HOLD <= WORK(4)
+C              DEFAULT VALUES: WORK(3)=0.2D0, WORK(4)=6.D0
+C
+C    WORK(5)   AVOID THE HUMP: AFTER TWO CONSECUTIVE STEP REJECTIONS
+C              THE STEP SIZE IS MULTIPLIED BY WORK(5)
+C              DEFAULT VALUES: WORK(5)=0.1D0
+C
+C-----------------------------------------------------------------------
+C
+C     OUTPUT PARAMETERS 
+C     ----------------- 
+C     X           X-VALUE WHERE THE SOLUTION IS COMPUTED
+C                 (AFTER SUCCESSFUL RETURN X=XEND)
+C
+C     Y(N)        SOLUTION AT X
+C  
+C     H           PREDICTED STEP SIZE OF THE LAST ACCEPTED STEP
+C
+C     IDID        REPORTS ON SUCCESSFULNESS UPON RETURN:
+C                   IDID=1  COMPUTATION SUCCESSFUL,
+C                   IDID=-1 COMPUTATION UNSUCCESSFUL.
+C
+C --------------------------------------------------------- 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS 
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(1),RelTol(1),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL AUTNMS,IMPLCT,JBAND,ARRET
+      EXTERNAL FCN,JAC,DFX,MAS,SOLOUT
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+C -----------------------------------------------------
+C --- COMMON STAT CAN BE USED FOR STATISTICS
+C ---    NFCN      NUMBER OF FUNC_CHEMCTION EVALUATIONS (THOSE FOR NUMERICAL
+C                  EVALUATION OF THE JACOBIAN ARE NOT COUNTED)  
+C ---    NJAC      NUMBER OF JACOBIAN EVALUATIONS (EITHER ANALYTICALLY
+C                  OR NUMERICALLY)
+C ---    NSTEP     NUMBER OF COMPUTED STEPS
+C ---    NACCPT    NUMBER OF ACCEPTED STEPS
+C ---    NREJCT    NUMBER OF REJECTED STEPS (AFTER AT LEAST ONE STEP
+C                  HAS BEEN ACCEPTED)
+C ---    NDEC      NUMBER OF LU-DECOMPOSITIONS (N-DIMENSIONAL MATRIX)
+C ---    NSOL      NUMBER OF FORWARD-BACKWARD SUBSTITUTIONS
+C -----------------------------------------------------
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS 
+C *** *** *** *** *** *** ***
+      NFCN=0
+      NJAC=0
+      NSTEP=0
+      NACCPT=0
+      NREJCT=0
+      NDEC=0
+      NSOL=0
+      ARRET=.FALSE.
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(1).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(1)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(1)=',IWORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- METH   COEFFICIENTS OF THE METHOD
+      IF(IWORK(2).EQ.0)THEN
+         METH=2
+      ELSE
+         METH=IWORK(2)
+         IF(METH.LE.0.OR.METH.GE.7)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0  
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.1.D-14.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 16 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(2).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(2)
+      END IF
+C -------  FAC1,FAC2     PARAMETERS FOR STEP SIZE SELECTION
+      IF(WORK(3).EQ.0.D0)THEN
+         FAC1=5.D0
+      ELSE
+         FAC1=1.D0/WORK(3)
+      END IF
+      IF(WORK(4).EQ.0.D0)THEN
+         FAC2=1.D0/6.0D0
+      ELSE
+         FAC2=1.D0/WORK(4)
+      END IF
+C -------  FACREJ    FOR THE HUMP
+      IF(WORK(5).EQ.0.D0)THEN
+         FACREJ=0.1D0
+      ELSE
+         FACREJ=WORK(5)
+      END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO 15 I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+  15      CONTINUE
+      END IF
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- AUTONOMOUS, IMPLICIT, BANDED OR NOT ?
+      AUTNMS=IFCN.EQ.0
+      IMPLCT=IMAS.NE.0
+      JBAND=MLJAC.NE.N
+      ARRET=.FALSE.
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN 
+      IF(JBAND)THEN
+         LDJAC=MLJAC+MUJAC+1
+      ELSE
+         LDJAC=N
+      END IF
+C -- MATRIX E FOR LINEAR ALGEBRA
+      IF(JBAND)THEN
+         LDE=2*MLJAC+MUJAC+1
+      ELSE
+         LDE=N
+      END IF
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          IF (MLMAS.NE.N) THEN
+              LDMAS=MLMAS+MUMAS+1
+          ELSE
+              LDMAS=N
+          END IF
+C ------ BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF "JAC"
+          IF (MLMAS.GT.MLJAC.OR.MUMAS.GT.MUJAC) THEN
+              WRITE (6,*) 'BANDWITH OF "MAS" NOT LARGER THAN BANDWITH OF
+     & "JAC"'
+            ARRET=.TRUE.
+          END IF
+      ELSE
+          LDMAS=0
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYNEW=6
+      IEDY1=IEYNEW+N
+      IEDY=IEDY1+N
+      IEAK1=IEDY+N
+      IEAK2=IEAK1+N
+      IEAK3=IEAK2+N
+      IEAK4=IEAK3+N
+      IEFX =IEAK4+N
+      IEJAC=IEFX +N
+      IEMAS=IEJAC+N*LDJAC
+      IEE  =IEMAS+N*LDMAS
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+N*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=3
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEIP+N-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL RO4COR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,JAC,IJAC,
+     &   MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &   NMAX,UROUND,METH,FAC1,FAC2,FACREJ,AUTNMS,IMPLCT,JBAND,
+     &   LDJAC,LDE,LDMAS2,WORK(IEYNEW),WORK(IEDY1),WORK(IEDY),
+     &   WORK(IEAK1),WORK(IEAK2),WORK(IEAK3),WORK(IEAK4),
+     &   WORK(IEFX),WORK(IEJAC),WORK(IEE),WORK(IEMAS),IWORK(IEIP))
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE RO4COR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,JAC,
+     &  IJAC,MLJAC,MUJAC,DFX,IDFX,MAS,MLMAS,MUMAS,SOLOUT,IOUT,IDID,
+     &  NMAX,UROUND,METH,FAC1,FAC2,FACREJ,AUTNMS,IMPLCT,BANDED,
+     &  LFJAC,LE,LDMAS,YNEW,DY1,DY,AK1,AK2,AK3,AK4,FX,FJAC,E,FMAS,IP)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR ROS4
+C     PARAMETERS SAME AS IN ROS4 WITH WORKSPACE ADDED 
+C ---------------------------------------------------------- 
+C         DECLARATIONS 
+C ---------------------------------------------------------- 
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+      KPP_REAL Y(N),YNEW(N),DY1(N),DY(N),AK1(N),
+     *  AK2(N),AK3(N),AK4(N),FX(N),
+     *  FJAC(LU_NONZERO),E(LU_NONZERO),
+     *  FMAS(LDMAS,N),AbsTol(1),RelTol(1)
+      INTEGER IP(N)
+      LOGICAL REJECT,RJECT2,AUTNMS,IMPLCT,BANDED
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      EXTERNAL FCN,JAC,MAS,SOLOUT,DFX
+
+
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF (IMPLCT) CALL MAS(N,FMAS,LDMAS)
+C ---- PREPARE BANDWIDTHS -----
+      IF (BANDED) THEN
+          MLE=MLJAC
+          MUE=MUJAC
+          MBJAC=MLJAC+MUJAC+1
+          MBB=MLMAS+MUMAS+1
+          MDIAG=MLE+MUE+1
+          MBDIAG=MUMAS+1
+          MDIFF=MLE+MUE-MUMAS
+      END IF
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+      IF (METH.EQ.1) CALL SHAMP (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.2) CALL GRK4T (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.3) CALL GRK4A (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.4) CALL VELDS (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.5) CALL VELDD (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IF (METH.EQ.6) CALL LSTAB (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- INITIAL PREPARATIONS
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAXN=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAXN) 
+      H=SIGN(H,POSNEG) 
+      REJECT=.FALSE.
+      NSING=0
+      IRTRN=1 
+      XXOLD=X
+      IF (IRTRN.LT.0) GOTO 79
+C --- BASIC INTEGRATION STEP  
+   1  IF (NSTEP.GT.NMAX.OR.X+.1D0*H.EQ.X.OR.ABS(H).LE.UROUND) GOTO 79
+      IF ((X-XEND)*POSNEG+UROUND.GT.0.D0) THEN
+          H=HOPT
+          IDID=1
+          RETURN
+      END IF
+      HOPT=H
+      IF ((X+H-XEND)*POSNEG.GT.0.D0) H=XEND-X
+      CALL FCN(N,X,Y,DY1)
+      NFCN=NFCN+1
+
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      CALL JAC(N,X,Y,FJAC)
+
+      IF (.NOT.AUTNMS) THEN
+          IF (IDFX.EQ.0) THEN
+C --- COMPUTE NUMERICALLY THE DERIVATIVE WITH RESPECT TO X
+              DELT=DSQRT(UROUND*MAX(1.D-5,ABS(X)))
+              XDELT=X+DELT
+              CALL FCN(N,XDELT,Y,AK1)
+              DO 19 J=1,N
+  19          FX(J)=(AK1(J)-DY1(J))/DELT
+          ELSE
+C --- COMPUTE ANALYTICALLY THE DERIVATIVE WITH RESPECT TO X
+              CALL DFX(N,X,Y,FX)
+          END IF
+      END IF
+   2  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE STAGES
+C *** *** *** *** *** *** ***
+      NDEC=NDEC+1
+      HC21=C21/H
+      HC31=C31/H
+      HC32=C32/H
+      HC41=C41/H
+      HC42=C42/H
+      HC43=C43/H
+      FAC=1.D0/(H*GAMMA)
+C --- THE MATRIX E (B=IDENTITY, JACOBIAN A FULL MATRIX)
+              DO 800 I=1,LU_NONZERO
+  800         E(I)=-FJAC(I)
+              DO 801 J=1,N
+  801         E(LU_DIAG(J))=E(LU_DIAG(J))+FAC
+              CALL KppDecomp (E,IER)
+              IF (IER.NE.0) GOTO 80
+              IF (AUTNMS) THEN
+C --- THIS PART COMPUTES THE STAGES IN THE CASE WHERE
+C ---   1) THE DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+C ---   2) THE JACOBIAN OF THE PROBLEM IS A FULL MATRIX
+C ---   3) THE DIFFERENTIAL EQUATION IS AUTONOMOUS
+                  DO 803 I=1,N
+  803             AK1(I)=DY1(I)
+                  CALL KppSolve(E,AK1)
+                  DO 810 I=1,N
+  810             YNEW(I)=Y(I)+A21*AK1(I) 
+                  CALL FCN(N,X,YNEW,DY)
+                  DO 811 I=1,N
+  811             AK2(I)=DY(I)+HC21*AK1(I)
+                  CALL KppSolve(E,AK2)
+                  DO 820 I=1,N
+  820             YNEW(I)=Y(I)+A31*AK1(I)+A32*AK2(I)  
+                  CALL FCN(N,X,YNEW,DY)
+                  DO 821 I=1,N
+  821             AK3(I)=DY(I)+HC31*AK1(I)+HC32*AK2(I)
+                  CALL KppSolve(E,AK3)
+                  DO 831 I=1,N
+  831             AK4(I)=DY(I)+HC41*AK1(I)+HC42*AK2(I)+HC43*AK3(I) 
+                  CALL KppSolve(E,AK4)
+              ELSE
+C --- THIS PART COMPUTES THE STAGES IN THE CASE WHERE
+C ---   1) THE DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+C ---   2) THE JACOBIAN OF THE PROBLEM IS A FULL MATRIX
+C ---   3) THE DIFFERENTIAL EQUATION IS NON-AUTONOMOUS
+                  HD1=H*D1
+                  HD2=H*D2
+                  HD3=H*D3
+                  HD4=H*D4
+                  DO 903 I=1,N
+  903             AK1(I)=DY1(I)+HD1*FX(I)
+                  CALL KppSolve(E,AK1)
+                  DO 910 I=1,N
+  910             YNEW(I)=Y(I)+A21*AK1(I) 
+                  CALL FCN(N,X+C2*H,YNEW,DY)
+                  DO 911 I=1,N
+  911             AK2(I)=DY(I)+HD2*FX(I)+HC21*AK1(I)
+                  CALL KppSolve(E,AK2)
+                  DO 920 I=1,N
+  920             YNEW(I)=Y(I)+A31*AK1(I)+A32*AK2(I)  
+                  CALL FCN(N,X+C3*H,YNEW,DY)
+                  DO 921 I=1,N
+  921             AK3(I)=DY(I)+HD3*FX(I)+HC31*AK1(I)+HC32*AK2(I)
+                  CALL KppSolve(E,AK3)
+                  DO 931 I=1,N
+  931             AK4(I)=DY(I)+HD4*FX(I)+HC41*AK1(I)+HC42*AK2(I)
+     &                  +HC43*AK3(I) 
+                  CALL KppSolve(E,AK4)
+              END IF
+      NSOL=NSOL+4
+      NFCN=NFCN+2
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION  
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+C ------------ NEW SOLUTION ---------------
+      DO 240 I=1,N
+  240 YNEW(I)=Y(I)+B1*AK1(I)+B2*AK2(I)+B3*AK3(I)+B4*AK4(I)  
+C ------------ COMPUTE ERROR ESTIMATION ----------------
+      ERR=0.D0
+      DO 300 I=1,N
+      S=E1*AK1(I)+E2*AK2(I)+E3*AK3(I)+E4*AK4(I) 
+      IF (ITOL.EQ.0) THEN
+         SK=AbsTol(1)+RelTol(1)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+      ELSE
+         SK=AbsTol(I)+RelTol(I)*DMAX1(DABS(Y(I)),DABS(YNEW(I)))
+      END IF
+  300 ERR=ERR+(S/SK)**2
+      ERR=DSQRT(ERR/N)
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .2<=HNEW/H<=6.
+      FAC=DMAX1(FAC2,DMIN1(FAC1,(ERR)**.25D0/.9D0))
+      HNEW=H/FAC  
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LE.1.D0) THEN
+C --- STEP IS ACCEPTED  
+         NACCPT=NACCPT+1
+         DO 44 I=1,N 
+  44     Y(I)=YNEW(I) 
+         XXOLD=X 
+         X=X+H
+         IF (IRTRN.LT.0) GOTO 79
+         IF (DABS(HNEW).GT.HMAXN) HNEW=POSNEG*HMAXN
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H)) 
+         REJECT=.FALSE.
+         RJECT2=.FALSE.
+         H=HNEW
+         GOTO 1
+      ELSE
+C --- STEP IS REJECTED  
+         IF (RJECT2) HNEW=H*FACREJ
+         IF (REJECT) RJECT2=.TRUE.
+         REJECT=.TRUE.
+         H=HNEW
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         GOTO 2
+      END IF
+C --- EXIT
+  80  WRITE (6,*) ' MATRIX E IS SINGULAR, INFO = ',INFO
+      NSING=NSING+1
+      IF (NSING.GE.5) GOTO 79
+      H=H*0.5D0
+      GOTO 2
+  79  WRITE(6,979)X,H
+ 979  FORMAT(' EXIT OF ROS4 AT X=',D16.7,'   H=',D16.7)
+      IDID=-1
+      RETURN
+      END
+C
+      SUBROUTINE SHAMP (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+         A21=2.D0
+         A31=48.D0/25.D0
+         A32=6.D0/25.D0
+         C21=-8.D0
+         C31=372.D0/25.D0
+         C32=12.D0/5.D0
+         C41=-112.D0/125.D0
+         C42=-54.D0/125.D0
+         C43=-2.D0/5.D0
+         B1=19.D0/9.D0
+         B2=1.D0/2.D0
+         B3=25.D0/108.D0
+         B4=125.D0/108.D0
+         E1=17.D0/54.D0
+         E2=7.D0/36.D0
+         E3=0.D0
+         E4=125.D0/108.D0
+         GAMMA=.5D0
+         C2= 0.1000000000000000D+01
+         C3= 0.6000000000000000D+00
+         D1= 0.5000000000000000D+00
+         D2=-0.1500000000000000D+01
+         D3= 0.2420000000000000D+01
+         D4= 0.1160000000000000D+00
+      RETURN
+      END
+C
+      SUBROUTINE GRK4A (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.1108860759493671D+01
+       A31= 0.2377085261983360D+01
+       A32= 0.1850114988899692D+00
+       C21=-0.4920188402397641D+01
+       C31= 0.1055588686048583D+01
+       C32= 0.3351817267668938D+01
+       C41= 0.3846869007049313D+01
+       C42= 0.3427109241268180D+01
+       C43=-0.2162408848753263D+01
+       B1= 0.1845683240405840D+01
+       B2= 0.1369796894360503D+00
+       B3= 0.7129097783291559D+00
+       B4= 0.6329113924050632D+00
+       E1= 0.4831870177201765D-01
+       E2=-0.6471108651049505D+00
+       E3= 0.2186876660500240D+00
+       E4=-0.6329113924050632D+00
+       GAMMA= 0.3950000000000000D+00
+       C2= 0.4380000000000000D+00
+       C3= 0.8700000000000000D+00
+       D1= 0.3950000000000000D+00
+       D2=-0.3726723954840920D+00
+       D3= 0.6629196544571492D-01
+       D4= 0.4340946962568634D+00
+      RETURN
+      END
+C
+      SUBROUTINE GRK4T (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.4524708207373116D+01
+       A32= 0.4163528788597648D+01
+       C21=-0.5071675338776316D+01
+       C31= 0.6020152728650786D+01
+       C32= 0.1597506846727117D+00
+       C41=-0.1856343618686113D+01
+       C42=-0.8505380858179826D+01
+       C43=-0.2084075136023187D+01
+       B1= 0.3957503746640777D+01
+       B2= 0.4624892388363313D+01
+       B3= 0.6174772638750108D+00
+       B4= 0.1282612945269037D+01
+       E1= 0.2302155402932996D+01
+       E2= 0.3073634485392623D+01
+       E3=-0.8732808018045032D+00
+       E4=-0.1282612945269037D+01
+       GAMMA= 0.2310000000000000D+00
+       C2= 0.4620000000000000D+00
+       C3= 0.8802083333333334D+00
+       D1= 0.2310000000000000D+00
+       D2=-0.3962966775244303D-01
+       D3= 0.5507789395789127D+00
+       D4=-0.5535098457052764D-01
+      RETURN
+      END
+C
+      SUBROUTINE VELDS (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- METHOD GIVEN BY VAN VELDHUIZEN
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.1750000000000000D+01
+       A32= 0.2500000000000000D+00
+       C21=-0.8000000000000000D+01
+       C31=-0.8000000000000000D+01
+       C32=-0.1000000000000000D+01
+       C41= 0.5000000000000000D+00
+       C42=-0.5000000000000000D+00
+       C43= 0.2000000000000000D+01
+       B1= 0.1333333333333333D+01
+       B2= 0.6666666666666667D+00
+       B3=-0.1333333333333333D+01
+       B4= 0.1333333333333333D+01
+       E1=-0.3333333333333333D+00
+       E2=-0.3333333333333333D+00
+       E3=-0.0000000000000000D+00
+       E4=-0.1333333333333333D+01
+       GAMMA= 0.5000000000000000D+00
+       C2= 0.1000000000000000D+01
+       C3= 0.5000000000000000D+00
+       D1= 0.5000000000000000D+00
+       D2=-0.1500000000000000D+01
+       D3=-0.7500000000000000D+00
+       D4= 0.2500000000000000D+00
+      RETURN
+      END
+C
+      SUBROUTINE VELDD (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- METHOD GIVEN BY VAN VELDHUIZEN
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.4812234362695436D+01
+       A32= 0.4578146956747842D+01
+       C21=-0.5333333333333331D+01
+       C31= 0.6100529678848254D+01
+       C32= 0.1804736797378427D+01
+       C41=-0.2540515456634749D+01
+       C42=-0.9443746328915205D+01
+       C43=-0.1988471753215993D+01
+       B1= 0.4289339254654537D+01
+       B2= 0.5036098482851414D+01
+       B3= 0.6085736420673917D+00
+       B4= 0.1355958941201148D+01
+       E1= 0.2175672787531755D+01
+       E2= 0.2950911222575741D+01
+       E3=-0.7859744544887430D+00
+       E4=-0.1355958941201148D+01
+       GAMMA= 0.2257081148225682D+00
+       C2= 0.4514162296451364D+00
+       C3= 0.8755928946018455D+00
+       D1= 0.2257081148225682D+00
+       D2=-0.4599403502680582D-01
+       D3= 0.5177590504944076D+00
+       D4=-0.3805623938054428D-01
+      RETURN
+      END 
+C
+      SUBROUTINE LSTAB (A21,A31,A32,C21,C31,C32,C41,C42,C43,
+     &          B1,B2,B3,B4,E1,E2,E3,E4,GAMMA,C2,C3,D1,D2,D3,D4)
+C --- AN L-STABLE METHOD
+      IMPLICIT KPP_REAL (A-H,O-Z)
+       A21= 0.2000000000000000D+01
+       A31= 0.1867943637803922D+01
+       A32= 0.2344449711399156D+00
+       C21=-0.7137615036412310D+01
+       C31= 0.2580708087951457D+01
+       C32= 0.6515950076447975D+00
+       C41=-0.2137148994382534D+01
+       C42=-0.3214669691237626D+00
+       C43=-0.6949742501781779D+00
+C  B_i = M_i
+       B1= 0.2255570073418735D+01
+       B2= 0.2870493262186792D+00
+       B3= 0.4353179431840180D+00
+       B4= 0.1093502252409163D+01
+C E_i = error estimator       
+       E1=-0.2815431932141155D+00
+       E2=-0.7276199124938920D-01
+       E3=-0.1082196201495311D+00
+       E4=-0.1093502252409163D+01
+C gamma = gamma
+       GAMMA= 0.5728200000000000D+00
+C  C_i = alpha_i
+       C2= 0.1145640000000000D+01
+       C3= 0.6552168638155900D+00
+C D_i = gamma_i       
+       D1= 0.5728200000000000D+00
+       D2=-0.1769193891319233D+01
+       D3= 0.7592633437920482D+00
+       D4=-0.1049021087100450D+00
+      RETURN
+      END 
+
+        SUBROUTINE SOLOUT (NR,XOLD,X,Y,N,IRTRN)
+C --- PRINTS SOLUTION
+        IMPLICIT KPP_REAL (A-H,O-Z)
+        DIMENSION Y(N)
+        COMMON /INTERN/XOUT
+        IF (NR.EQ.1) THEN
+           WRITE (6,99) X,Y(1),Y(2),NR-1
+           XOUT=0.1D0
+        ELSE
+           IF (X.GE.XOUT) THEN
+              WRITE (6,99) X,Y(1),Y(2),NR-1
+              XOUT=DMAX1(XOUT+0.1D0,X)
+           END IF
+        END IF
+ 99     FORMAT(1X,'X =',F5.2,'    Y =',2E18.10,'    NSTEP =',I4)
+        RETURN
+        END
+
+      SUBROUTINE DEC (N, NDIM, A, IP, IER)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,IER,NM1,K,KP1,M,I,J
+      KPP_REAL A,T
+      DIMENSION A(NDIM,N), IP(N)
+C-----------------------------------------------------------------------
+C  MATRIX TRIANGULARIZATION BY GAUSSIAN ELIMINATION.
+C  INPUT..
+C     N = ORDER OF MATRIX.
+C     NDIM = DECLARED DIMENSION OF ARRAY  A .
+C     A = MATRIX TO BE TRIANGULARIZED.
+C  OUTPUT..
+C     A(I,J), I.LE.J = UPPER TRIANGULAR FACTOR, U .
+C     A(I,J), I.GT.J = MULTIPLIERS = LOWER TRIANGULAR FACTOR, I - L.
+C     IP(K), K.LT.N = INDEX OF K-TH PIVOT ROW.
+C     IP(N) = (-1)**(NUMBER OF INTERCHANGES) OR O .
+C     IER = 0 IF MATRIX A IS NONSINGULAR, OR K IF FOUND TO BE
+C           SINGULAR AT STAGE K.
+C  USE  SOL  TO OBTAIN SOLUTION OF LINEAR SYSTEM.
+C  DETERM(A) = IP(N)*A(1,1)*A(2,2)*...*A(N,N).
+C  IF IP(N)=O, A IS SINGULAR, SOL WILL DIVIDE BY ZERO.
+C
+C  REFERENCE..
+C     C. B. MOLER, ALGORITHM 423, LINEAR EQUATION KppSolveR,
+C     C.A.C.M. 15 (1972), P. 274.
+C-----------------------------------------------------------------------
+      IER = 0
+      IP(N) = 1
+      IF (N .EQ. 1) GO TO 70
+      NM1 = N - 1
+      DO 60 K = 1,NM1
+        KP1 = K + 1
+        M = K
+        DO 10 I = KP1,N
+          IF (DABS(A(I,K)) .GT. DABS(A(M,K))) M = I  
+ 10     CONTINUE
+        IP(K) = M
+        T = A(M,K)
+        IF (M .EQ. K) GO TO 20
+        IP(N) = -IP(N)
+        A(M,K) = A(K,K)
+        A(K,K) = T
+ 20     CONTINUE
+        IF (T .EQ. 0.D0) GO TO 80
+        T = 1.D0/T
+        DO 30 I = KP1,N
+ 30       A(I,K) = -A(I,K)*T
+        DO 50 J = KP1,N
+          T = A(M,J)
+          A(M,J) = A(K,J)
+          A(K,J) = T
+          IF (T .EQ. 0.D0) GO TO 45
+          DO 40 I = KP1,N
+ 40         A(I,J) = A(I,J) + A(I,K)*T
+ 45       CONTINUE
+ 50       CONTINUE
+ 60     CONTINUE
+ 70   K = N
+      IF (A(N,N) .EQ. 0.D0) GO TO 80
+      RETURN
+ 80   IER = K
+      IP(N) = 0
+      RETURN
+C----------------------- END OF SUBROUTINE DEC -------------------------
+      END
+C
+C
+      SUBROUTINE SOL (N, NDIM, A, B, IP)
+C VERSION REAL KPP_REAL
+      INTEGER N,NDIM,IP,NM1,K,KP1,M,I,KB,KM1
+      KPP_REAL A,B,T
+      DIMENSION A(NDIM,N), B(N), IP(N)
+C-----------------------------------------------------------------------
+C  SOLUTION OF LINEAR SYSTEM, A*X = B .
+C  INPUT..
+C    N = ORDER OF MATRIX.
+C    NDIM = DECLARED DIMENSION OF ARRAY  A .
+C    A = TRIANGULARIZED MATRIX OBTAINED FROM DEC.
+C    B = RIGHT HAND SIDE VECTOR.
+C    IP = PIVOT VECTOR OBTAINED FROM DEC.
+C  DO NOT USE IF DEC HAS SET IER .NE. 0.
+C  OUTPUT..
+C    B = SOLUTION VECTOR, X .
+C-----------------------------------------------------------------------
+      IF (N .EQ. 1) GO TO 50
+      NM1 = N - 1
+      DO 20 K = 1,NM1
+        KP1 = K + 1
+        M = IP(K)
+        T = B(M)
+        B(M) = B(K)
+        B(K) = T
+        DO 10 I = KP1,N
+ 10       B(I) = B(I) + A(I,K)*T
+ 20     CONTINUE
+      DO 40 KB = 1,NM1
+        KM1 = N - KB
+        K = KM1 + 1
+        B(K) = B(K)/A(K,K)
+        T = -B(K)
+        DO 30 I = 1,KM1
+ 30       B(I) = B(I) + A(I,K)*T
+ 40     CONTINUE
+ 50   B(1) = B(1)/A(1,1)
+      RETURN
+C----------------------- END OF SUBROUTINE SOL -------------------------
+      END
+
+
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE qssa
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa.f	(revision 3477)
@@ -0,0 +1,136 @@
+C -- QSSA WITH STEADY STATE APPROXIMATION --
+C    For plain QSSA (to remove the steady state assumption)
+C    modify slow -> 0, fast -> 1e20
+C
+
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR), V1(NVAR), V2(NVAR)
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, STEPold, Told, SUP
+      KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp
+      INTEGER i 
+      KPP_REAL slow, fast
+
+      T = TIN
+      Tnext = TOUT
+      STEP = DMAX1(STEPMIN,1.d-10)
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+      ERR = 1.d0
+      ERRold = 1.d0
+      slow = 0.01
+      fast = 10.  
+
+ 10    continue  
+       Tplus = T + STEP
+       if ( Tplus .gt. Tnext ) then
+          STEP = Tnext - T
+          Tplus = Tnext
+       end if
+
+
+        TITI = TIME
+        TIME = T
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V1(i) = VAR(i) + XXX
+             V2(i) = VAR(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V1(i) = P_VAR(i)/D_VAR(i)
+             V2(i) = V1(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V1(i) = tmp * tmp * (VAR(i) - ratio) + ratio
+              V2(i) = tmp * (VAR(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V1(i) = VAR(i) + P_VAR(i) * STEP * ( 1 - tmp *
+     *             ( 1 - 2.0 / 3.0 * tmp ) )
+              V2(i) = VAR(i) + P_VAR(i) * 0.5 * STEP*( 1-0.5*tmp*
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+              end if
+          END IF
+        end do
+
+        TITI = TIME
+        TIME = T + 0.5*STEP
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( V2,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*STEP .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(i) - D_VAR(i)*VAR(i))
+             V2(i) = V2(i) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*STEP .GT. fast) THEN  ! FAST SPECIES
+             V2(i) = P_VAR(i)/D_VAR(i)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V2(i) = tmp * (V2(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V2(i) = V2(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+            end if
+          END IF
+        end do
+
+C ===== Extrapolation and error estimation ========
+
+        ERRold=ERR
+        ERR=0.0D0
+          do i=1,NVAR
+             ERR = ERR + ((V2(i)-V1(i))/(ATOL(i) + RTOL(i)*V2(i)))**2
+          end do       
+        ERR = DSQRT( ERR/NVAR )
+        STEPold=STEP
+
+C ===== choosing the stepsize =====================
+
+        factor = 0.9*ERR**(-0.35)*ERRold**0.2
+        if (IsReject) then
+            facmax=1.
+        else
+            facmax=8.
+        end if 
+        factor = DMAX1( 1.25D-1, DMIN1(factor,facmax) )
+        STEP = DMIN1( STEPMAX, DMAX1(STEPMIN,factor*STEP) )    
+
+C===================================================
+
+        if ( (ERR.gt.1).and.(STEPold.gt.STEPMIN) ) then
+          IsReject = .true.
+        else
+          IsReject = .false.
+          do 140 i=1,NVAR
+             VAR(i)  = DMAX1(V2(i), 0.d0)
+ 140      continue 
+          T = Tplus     
+        end if
+      if ( T .lt. Tnext ) go to 10
+
+      TIME = Tnext
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa1.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa1.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssa1.f	(revision 3477)
@@ -0,0 +1,136 @@
+C -- QSSA WITH STEADY STATE APPROXIMATION --
+C    For plain QSSA (to remove the steady state assumption)
+C    modify slow -> 0, fast -> 1e20
+C
+
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR), V1(NVAR), V2(NVAR)
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, STEPold, Told, SUP
+      KPP_REAL ERR, ERRold, ratio, factor, facmax, tmp
+      INTEGER I
+      KPP_REAL slow, fast
+
+      T = TIN
+      Tnext = TOUT
+      STEP = DMAX1(STEPMIN,1.d-10)
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+      ERR = 1.d0
+      ERRold = 1.d0
+      slow = 0.01
+      fast = 10.  
+
+ 10    continue  
+       Tplus = T + STEP
+       if ( Tplus .gt. Tnext ) then
+          STEP = Tnext - T
+          Tplus = Tnext
+       end if
+
+
+        TITI = TIME
+        TIME = T
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*step .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(I) - D_VAR(I)*VAR(I))
+             V1(I) = VAR(I) + XXX
+             V2(I) = VAR(I) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*step .GT. fast) THEN  ! FAST SPECIES
+             V1(I) = P_VAR(I)/D_VAR(I)
+             V2(I) = V1(I)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V1(i) = tmp * tmp * (VAR(i) - ratio) + ratio
+              V2(i) = tmp * (VAR(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V1(i) = VAR(i) + P_VAR(i) * STEP * ( 1 - tmp *
+     *             ( 1 - 2.0 / 3.0 * tmp ) )
+              V2(i) = VAR(i) + P_VAR(i) * 0.5 * STEP*( 1-0.5*tmp*
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+              end if
+          END IF
+        end do
+
+        TITI = TIME
+        TIME = T + 0.5*STEP
+        CALL Update_SUN() 
+        CALL Update_RCONST()
+        TIME = TITI
+        CALL FSPLIT_VAR ( V2,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          IF ( D_VAR(i)*step .lt. slow) THEN       ! SLOW SPECIES
+             XXX = STEP * (P_VAR(I) - D_VAR(I)*VAR(I))
+             V2(I) = V2(I) + 0.5*XXX
+          ELSE IF ( D_VAR(i)*step .GT. fast) THEN  ! FAST SPECIES
+             V2(I) = P_VAR(I)/D_VAR(I)
+          ELSE                                    ! MEDIUM LIVED
+            if ( abs(D_VAR(i)).gt.SUP ) then
+              ratio = P_VAR(i)/D_VAR(i)
+              tmp = exp(-D_VAR(i)*STEP*0.5)
+              V2(i) = tmp * (V2(i) - ratio) + ratio
+            else
+              tmp = D_VAR(i) * STEP * 0.5
+              V2(i) = V2(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+            end if
+          END IF
+        end do
+
+C ===== Extrapolation and error estimation ========
+
+        ERRold=ERR
+        ERR=0.0D0
+          do i=1,NVAR
+             ERR = ERR + ((V2(i)-V1(i))/(ATOL(i) + RTOL(i)*V2(i)))**2
+          end do       
+        ERR = DSQRT( ERR/NVAR )
+        STEPold=STEP
+
+C ===== choosing the stepsize =====================
+
+        factor = 0.9*ERR**(-0.35)*ERRold**0.2
+        if (IsReject) then
+            facmax=1.
+        else
+            facmax=8.
+        end if 
+        factor = DMAX1( 1.25D-1, DMIN1(factor,facmax) )
+        STEP = DMIN1( STEPMAX, DMAX1(STEPMIN,factor*STEP) )    
+
+C===================================================
+
+        if ( (ERR.gt.1).and.(STEPold.gt.STEPMIN) ) then
+          IsReject = .true.
+        else
+          IsReject = .false.
+          do 140 i=1,NVAR
+             VAR(i)  = DMAX1(V2(i), 0.d0)
+ 140      continue 
+          T = Tplus     
+        end if
+      if ( T .lt. Tnext ) go to 10
+
+      TIME = Tnext
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssafix.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssafix.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssafix.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE qssafix
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssafix.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssafix.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/qssafix.f	(revision 3477)
@@ -0,0 +1,56 @@
+C --- Plain QSSA with fixed step size
+C
+      SUBROUTINE INTEGRATE( TIN, TOUT  ) 
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+C Local variables
+      KPP_REAL P_VAR(NVAR), D_VAR(NVAR)                    
+      LOGICAL IsReject
+      KPP_REAL T, Tnext, STEP, Told, SUP
+      KPP_REAL ratio, tmp
+      INTEGER i
+
+      T = TIN
+      Tnext = TOUT
+      STEP = 0.1
+      Told = T
+      SUP  = 1e-14
+      IsReject = .false.
+
+C -- BELOW THIS LIMIT USE TAYLOR INSTEAD OF EXP ---
+
+      do while ( T.lt.Tnext )   
+   
+        if ( T.gt.Tnext ) then
+          STEP = Tnext - Told
+          T = Tnext
+        end if
+
+        CALL FSPLIT_VAR ( VAR,  P_VAR, D_VAR )
+
+        do i=1,NVAR
+          if ( abs(D_VAR(i)).gt.SUP ) then
+            ratio = P_VAR(i)/D_VAR(i)
+            tmp = exp(-D_VAR(i)*STEP)
+            VAR(i) = tmp * (VAR(i) - ratio) + ratio
+          else
+            tmp = D_VAR(i) * STEP
+            VAR(i) = VAR(i) + P_VAR(i) * 0.5 * STEP * ( 1 - 0.5 * tmp *
+     *             ( 1 - 1.0 / 3.0 * tmp ) )
+          end if
+        end do
+
+        T = T + STEP
+        TIME = T
+
+      end do
+
+      RETURN 
+      END        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.c	(revision 3477)
@@ -0,0 +1,313 @@
+
+	#define MAX(a,b) ((a) >= (b) ) ?(a):(b)
+	#define MIN(b,c) ((b) <  (c) ) ?(b):(c)	
+	#define abs(x)   ((x) >=  0  ) ?(x):(-x) 
+	#define dabs(y)  (double)abs(y) 
+	#define DSQRT(d) (double)pow(d,0.5)
+
+	void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	
+
+void FUNC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL P[NVAR])
+	{
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_PHOTO();
+         Fun( Y, FIX, RCONST, P );
+         TIME = Told;
+        } /* function fun ends here */
+
+void JAC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL J[LU_NONZERO])
+	{
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_PHOTO();
+         Jac_SP( Y, FIX, RCONST, J );
+         TIME = Told;
+        } /* function jac_sp ends here */
+
+
+     INTEGRATE( KPP_REAL TIN, KPP_REAL TOUT )
+      {
+	/*  TIN - Start Time       */   
+	/*  TOUT - End Time          */
+
+        int INFO[5];
+		
+	forfun = &FUNC_CHEM;
+	forjac = &JAC_CHEM;	
+        INFO[0] = Autonomous;
+
+ RODAS3( NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,VAR,ATOL,RTOL,INFO
+ ,forfun ,forjac );
+	
+}
+    
+
+
+int RODAS3(int N,KPP_REAL T, KPP_REAL Tnext,KPP_REAL Hmin,KPP_REAL Hmax,
+   KPP_REAL Hstart,KPP_REAL y[NVAR],KPP_REAL AbsTol[NVAR],KPP_REAL RelTol[NVAR],
+   int INFO[5],void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []),
+   void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) )
+   {
+/*
+       Stiffly accurate Rosenbrock 3(2), with 
+     stiffly accurate embedded formula for error control.  
+
+     All the arguments aggree with the KPP syntax.
+
+  INPUT ARGUMENTS:
+    y = Vector of (NVAR) concentrations, contains the
+         initial values on input
+     [T, Tnext] = the integration interval
+     Hmin, Hmax = lower and upper bounds for the selected step-size.
+          Note that for Step = Hmin the current computed
+          solution is unconditionally accepted by the error
+          control mechanism.
+     AbsTol, RelTol = (NVAR) dimensional vectors of 
+          componentwise absolute and relative tolerances.
+     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+          See the header below.
+     JAC_CHEM = name of routine that computes the Jacobian, in
+          sparse format. KPP syntax. See the header below.
+     Info(1) = 1  for  autonomous   system
+             = 0  for nonautonomous system 
+
+  OUTPUT ARGUMENTS:
+     y = the values of concentrations at Tend.
+     T = equals Tend on output.
+     Info(2) = # of FUNC_CHEM calls.
+     Info(3) = # of JAC_CHEM calls.
+     Info(4) = # of accepted steps.
+     Info(5) = # of rejected steps.
+    
+     Adrian Sandu, March 1996
+     The Center for Global and Regional Environmental Research
+*/
+      KPP_REAL   K1[NVAR], K2[NVAR], K3[NVAR], K4[NVAR];
+      KPP_REAL   F1[NVAR], JAC[LU_NONZERO];
+      KPP_REAL   ghinv,uround,c43,x1,x2,ytol;
+      KPP_REAL   ynew[NVAR];
+      KPP_REAL   H, Hold, Tplus,tau,tau1,tau2,tau3;
+      KPP_REAL   ERR, factor, facmax;
+      int n,nfcn,njac,Naccept,Nreject,i,j,ier;
+      char IsReject,Autonomous;	
+	
+
+
+/*      Initialization of counters, etc.	*/
+      Autonomous = (INFO[0] == 1);         
+      uround = (double)1e-15;               
+      c43 = (double)(-8.e0/3.e0);
+      H = MAX( (double)1e-8, Hstart );
+      Hmin = MAX(Hmin,uround*(Tnext-T));
+      Hmax = MIN(Hmax,Tnext-T);
+      Tplus = T;
+      IsReject = 0;
+      Naccept  = 0;
+      Nreject  = 0;
+      nfcn     = 0;
+      njac     = 0;
+
+
+/*  === Starting the time loop ===      */
+
+while(T<Tnext)
+{
+ ten :
+       Tplus = T + H;
+
+       if ( Tplus > Tnext )
+	{
+          H = Tnext - T;
+          Tplus = Tnext;
+        }
+
+       (*forjac)(NVAR, T, y,JAC );               
+
+       njac = njac+1;
+       ghinv = (double)-2.0e0/H;
+	for(j=0;j<NVAR;j++)
+	    JAC[LU_DIAG[j]] = JAC[LU_DIAG[j]] + ghinv;  
+	
+
+ ier = KppDecomp (JAC);
+
+ if ( ier != 0)
+ {
+  if( H > Hmin ) 
+  {
+   H = (double)5.0e-1*H; 
+   goto ten;	   
+  }
+  else
+   printf("IER <> 0 , H = %d", H);
+ }/* main ier if ends*/	
+		
+
+	(*forfun)(NVAR , T, y, F1 ) ;              
+
+
+/*  ====== NONAUTONOMOUS CASE ===============         */
+
+        if( Autonomous == 0)
+	{
+         tau = DSQRT( uround*MAX( (double)1.0e-5, dabs(T) ) );    
+  	 (*forfun)(NVAR , T+tau , y ,K2 ); 
+         nfcn=nfcn+1;
+	 for(j=0;j<NVAR;j++)
+	     K3[j] = ( K2[j]-F1[j] )/tau;          	  
+
+  
+/*  ----- STAGE 1 (NONAUTONOMOUS) -----	*/	
+         x1 = (double)0.5*H;
+
+	 for(j=0;j<NVAR;j++)
+	     K1[j] =  F1[j] + x1*K3[j]; 
+	 
+         KppSolve (JAC, K1);
+
+/*  ----- STAGE 2 (NONAUTONOMOUS) -----	*/
+
+	 x1 = (double)4.e0/H;
+
+	 x2 = (double)1.5e0*H;
+
+	 for(j=0;j<NVAR;j++)
+	     K2[j] = F1[j] - x1*K1[j] + x2*K3[j];     
+
+	 KppSolve (JAC, K2);
+	}/* if nonautonomous case ends here */
+
+
+/*  ====== AUTONOMOUS CASE ===============	*/
+       else
+       {
+/*  ----- STAGE 1 (AUTONOMOUS) ----- 		*/
+	 for(j=0;j<NVAR;j++)
+	     K1[j] =  F1[j];  
+	 
+         KppSolve (JAC, K1);
+      
+/*  ----- STAGE 2 (AUTONOMOUS) -----	*/
+
+	x1 = (double)4.e0/H;
+
+	for(j=0;j<NVAR;j++)
+	    K2[j] = F1[j] - x1*K1[j];  	 
+	
+	KppSolve(JAC,K2);
+	
+       }   /* else autonomous case ends here */
+
+       
+/*  ----- STAGE 3 -----	*/
+
+        for(j=0;j<NVAR;j++)
+            ynew[j] = y[j] - 2.0e0*K1[j];    
+       
+
+        (*forfun)(NVAR , T+H , ynew ,F1 ); 
+	 
+        nfcn=nfcn+1;       
+     
+        for(j=0;j<NVAR;j++)
+            K3[j] = F1[j] + ( -K1[j] + K2[j] )/H;	
+      	
+        KppSolve (JAC, K3);
+         
+
+
+/*  ----- STAGE 4 -----	*/
+
+	for(j=0;j<NVAR;j++)
+	    ynew[j] = y[j] - 2.0e0*K1[j] - K3[j];    
+	
+	(*forfun)(NVAR, T+H , ynew, F1 );	
+	 
+	nfcn=nfcn+1;
+	for(j=0;j<NVAR;j++)
+	    K4[j] = F1[j] + ( -K1[j] + K2[j] - c43*K3[j]  )/H;  
+	  
+	KppSolve (JAC, K4);
+
+
+/*  ---- The Solution ---	*/
+	for(j=0;j<NVAR;j++)
+	    ynew[j] = y[j] - (double)2.0e0*K1[j] - K3[j] - K4[j];  
+	
+
+
+/*  ====== Error estimation ========	*/
+
+	ERR=(double)0.e0; 
+
+	for(i=0;i<NVAR;i++)
+	{
+	 ytol = AbsTol[i] + RelTol[i]*dabs(ynew[i]);
+	 ERR = (double)(ERR + pow( K4[i]/ytol,2 ));     
+	}
+
+        ERR = MAX( uround, DSQRT( ERR/NVAR ) );
+	    
+/*  ======= Choose the stepsize ===============================	*/
+
+        factor = (double)0.9/pow(ERR,1.e0/3.e0);   
+
+	if(IsReject == 1)
+	   facmax = (double)1.0;
+	else
+	   facmax = (double)10.0;
+	
+        factor =(double) MAX( 1.0e-1, MIN(factor,facmax) );    
+
+        Hold = H;
+        H = (double)MIN( Hmax, MAX(Hmin,factor*H) );                 
+
+
+/*  ======= Rejected/Accepted Step ============================	*/
+
+	if( (ERR>1) && (Hold>Hmin) )
+	{
+	 IsReject = 1;
+	 Nreject = Nreject + 1;
+	}		
+	else
+	{
+	 IsReject = 0;
+	
+ 	 for(i=0;i<NVAR;i++)
+	 {
+	  y[i] = ynew[i];
+	 }
+	 T = Tplus;
+	 Naccept = Naccept+1;    
+	} /* 	  else should end here */
+
+
+/*  ======= End of the time loop ===============================	*/
+
+
+  }/*      while loop (T < Tnext) ends here    */
+
+    
+      
+/*  ======= Output Information =================================	*/
+
+      INFO[1] = nfcn;
+      INFO[2] = njac;
+      INFO[3] = Naccept;
+      INFO[4] = Nreject;                   
+  	
+      return 0; 	
+      
+ 
+} /* function rodas ends here */
+  
+
+ 
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.def	(revision 3477)
@@ -0,0 +1,55 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rodas3
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+extern int Autonomous;
+extern double STEPSTART;
+#ENDINLINE
+
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+
+
+#INLINE C_INIT_INT
+        STEPMIN=0.0001;
+        STEPMAX=3600.0;
+        Autonomous = 0;
+        STEPSTART=STEPMIN;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3.f	(revision 3477)
@@ -0,0 +1,271 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time          
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+        CALL RODAS3(NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,
+     +                   VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+
+
+
+      SUBROUTINE RODAS3(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+
+C     Stiffly accurate Rosenbrock 3(2), with 
+C     stiffly accurate embedded formula for error control.  
+C
+C     All the arguments aggree with the KPP syntax.
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of 
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system 
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals Tend on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C    
+C     Adrian Sandu, March 1996
+C     The Center for Global and Regional Environmental Research
+
+      KPP_REAL   K1(NVAR), K2(NVAR), K3(NVAR), K4(NVAR)
+      KPP_REAL   F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL   Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL   y(NVAR), ynew(NVAR)
+      KPP_REAL   AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL   T, Tnext, H, Hold, Tplus
+      KPP_REAL   ERR, factor, facmax
+      KPP_REAL   c43, tau, x1, x2, ytol, elo
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      c43 = - 8.d0/3.d0 
+      H = DMAX1(1.d-8, Hstart)
+      Hmin = DMAX1(Hmin,uround*(Tnext-T))
+      Hmax = DMIN1(Hmax,Tnext-T)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+
+
+C === Starting the time loop ===      
+ 10    continue  
+       Tplus = T + H
+       if ( Tplus .gt. Tnext ) then
+          H = Tnext - T
+          Tplus = Tnext
+       end if
+
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+       gHinv = -2.0d0/H
+       do 20 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + gHinv
+ 20    continue
+       CALL KppDecomp (JAC, ier)
+
+       if (ier.ne.0) then
+         if ( H.gt.Hmin) then
+            H = 5.0d-1*H
+            go to 10
+         else
+            print *,'IER <> 0, H=',H
+            stop
+         end if      
+       end if  
+       
+       CALL FUNC_CHEM(NVAR, T, y, F1)
+
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = DSQRT( uround*DMAX1( 1.0d-5, DABS(T) ) )
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         do 30 j = 1,NVAR
+           K3(j) = ( K2(j)-F1(j) )/tau
+ 30      continue
+ 
+C ----- STAGE 1 (NONAUTONOMOUS) -----
+         x1 = 0.5*H
+         do 40 j = 1,NVAR
+           K1(j) =  F1(j) + x1*K3(j) 
+ 40      continue
+         CALL KppSolve (JAC, K1)
+
+C ----- STAGE 2 (NONAUTONOMOUS) -----
+         x1 = 4.d0/H
+         x2 = 1.5d0*H
+         do 50 j = 1,NVAR
+           K2(j) = F1(j) - x1*K1(j) + x2*K3(j)
+ 50      continue
+         CALL KppSolve (JAC, K2)
+
+C ====== AUTONOMOUS CASE ===============
+       ELSE
+C ----- STAGE 1 (AUTONOMOUS) -----
+         do 60 j = 1,NVAR
+           K1(j) =  F1(j) 
+ 60      continue
+         CALL KppSolve (JAC, K1)
+      
+C ----- STAGE 2 (AUTONOMOUS) -----
+         x1 = 4.d0/H
+         do 70 j = 1,NVAR
+           K2(j) = F1(j) - x1*K1(j) 
+ 70      continue
+         CALL KppSolve (JAC, K2)
+       END IF
+       
+C ----- STAGE 3 -----
+       do 80 j = 1,NVAR
+         ynew(j) = y(j) - 2.0d0*K1(j) 
+ 80    continue
+       CALL FUNC_CHEM(NVAR, T+H, ynew, F1)
+       nfcn=nfcn+1
+       do 90 j = 1,NVAR
+         K3(j) = F1(j) + ( -K1(j) + K2(j) )/H
+ 90    continue
+       CALL KppSolve (JAC, K3)
+
+C ----- STAGE 4 -----
+       do 100 j = 1,NVAR
+         ynew(j) = y(j) - 2.0d0*K1(j) - K3(j)
+ 100   continue
+       CALL FUNC_CHEM(NVAR, T+H, ynew, F1)
+       nfcn=nfcn+1
+       do 110 j = 1,NVAR
+         K4(j) = F1(j) + ( -K1(j) + K2(j) - C43*K3(j)  )/H
+ 110   continue
+       CALL KppSolve (JAC, K4)
+
+C ---- The Solution ---
+
+       do 120 j = 1,NVAR
+         ynew(j) = y(j) - 2.0d0*K1(j) - K3(j) - K4(j) 
+ 120   continue
+
+
+C ====== Error estimation ========
+
+        ERR=0.d0
+        do 130 i=1,NVAR
+           ytol = AbsTol(i) + RelTol(i)*DABS(ynew(i))
+           ERR = ERR + ( K4(i)/ytol )**2
+ 130    continue      
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+
+C ======= Choose the stepsize ===============================
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             y(i)  = ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+
+
+C ======= End of the time loop ===============================
+      if ( T .lt. Tnext ) go to 10
+ 
+     
+      
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+      
+      RETURN 
+      END        
+
+  
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y, FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3_ddm.def	(revision 3477)
@@ -0,0 +1,52 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rodas3_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/rodas3_ddm.f	(revision 3477)
@@ -0,0 +1,592 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL RODAS3_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE RODAS3_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+     
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C       Stiffly accurate Rosenbrock 3(2), with 
+C       stiffly accurate embedded formula for error control.  
+C
+C Direct decoupled computation of sensitivities.
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations and sensitivities at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C 
+C    Adrian Sandu, December 2001
+C 
+
+      INTEGER      NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR*(NSENSIT+1))
+      KPP_REAL K4(NVAR*(NSENSIT+1))
+      KPP_REAL Fv(NVAR), Hv(NVAR)
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL DFDP(NVAR*NSENSIT), DFDPDT(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, Hnew, elo
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL w, e, beta1, beta2, beta3, beta4
+      KPP_REAL tau, x1, x2, ytol, dround
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL    FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+C   The method coefficients
+      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+      PARAMETER ( gamma  =  0.5D+00 )
+      PARAMETER ( gamma2 =  1.5D+00 ) 
+      PARAMETER ( gamma3 =  0.0D+00 ) 
+      PARAMETER ( gamma4 =  0.0D+00 ) 
+      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+      PARAMETER (  a21 = 0.0D+00  )   
+      PARAMETER (  a31 = 2.0D+00  )   
+      PARAMETER (  a32 = 0.0D+00  )   
+      PARAMETER (  a41 = 2.0D+00  )   
+      PARAMETER (  a42 = 0.0D+00  )   
+      PARAMETER (  a43 = 1.0D+00  )   
+      DOUBLE PRECISION alpha2, alpha3, alpha4
+      PARAMETER (  alpha2  = 0.0D0  )   
+      PARAMETER (  alpha3  = 1.0D0  )   
+      PARAMETER (  alpha4  = 1.0D0  )   
+      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+      PARAMETER (  c21  =  4.0D0  ) 
+      PARAMETER (  c31  =  1.0D0  ) 
+      PARAMETER (  c32  = -1.0D0  ) 
+      PARAMETER (  c41  =  1.0D0  ) 
+      PARAMETER (  c42  = -1.0D0  ) 
+      PARAMETER (  c43  = -2.666666666666667D0 ) 
+      DOUBLE PRECISION b1, b2, b3, b4
+      PARAMETER (  b1 = 2.0D+00  ) 
+      PARAMETER (  b2 = 0.0D0  ) 
+      PARAMETER (  b3 = 1.0D0  ) 
+      PARAMETER (  b4 = 1.0D0  )  
+      DOUBLE PRECISION d1, d2, d3, d4
+      PARAMETER (  d1 = 0.0D0  ) 
+      PARAMETER (  d2 = 0.0D0  ) 
+      PARAMETER (  d3 = 0.0D0  ) 
+      PARAMETER (  d4 = 1.0D0  )  
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function, Jacobian, and Hessian Values
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+ 
+C              The time derivatives for non-Autonomous case                                                                                                                            
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d0, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-Fv(j) )/tau
+ 20      CONTINUE
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 35 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 35      CONTINUE
+       END IF
+ 
+ 11    CONTINUE  ! From here we restart after a rejected step
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       Njac = Njac+1
+       ghinv = 1.0d0/(gamma*H)
+       DO 40 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j)
+ 40    CONTINUE
+       DO 50 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + ghinv
+ 50    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+C 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'ROS4: Singular factorization at T=',T,'; H=',H
+            STOP
+         END IF
+       END IF
+                                                                                                                            
+C ------------ STAGE 1-------------------------
+       DO 60 j = 1,NVAR
+         K1(j) =  Fv(j)
+ 60    CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta1 = H*gamma
+	  DO 70 j=1,NVAR
+	    K1(j) = K1(j) + beta1*DFDT(j)	    
+ 70	  CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 100 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K1(1), Hv )
+	  DO 80 j=1,NVAR
+	    K1(i*NVAR+j) = K1(i*NVAR+j) + Hv(j)
+ 80	  CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	    DO 90 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + beta1*DFDT(i*NVAR+j)
+ 90         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 95 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 95        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 100   CONTINUE
+ 
+C ----------- STAGE 2 -------------------------
+C Note: uses the same function values as Stage 1
+C       DO 110 j = 1,NVAR*(NSENSIT+1)
+C         ynew(j) = y(j) + a21*K1(j)
+C 110   CONTINUE
+C       CALL FUNC_CHEM(NVAR, T+alpha2*H, ynew, Fv)
+C       IF (DDMTYPE .EQ. 1) THEN
+C         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha2*H, ynew, DFDP)
+C       END IF	 
+C       nfcn=nfcn+1
+       beta1 = c21/H
+       DO 120 j = 1,NVAR
+         K2(j) = Fv(j) + beta1*K1(j)
+ 120   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta2 = H*gamma2
+	 DO 130 j=1,NVAR
+	    K2(j) = K2(j) + beta2*DFDT(j)	    
+ 130     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha2*H, ynew, JAC)
+       njac=njac+1
+       DO 160 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K2(1), Hv )
+          DO 140 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                          + Hv(j)
+ 140      CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	     DO 150 j=1,NVAR
+	        K2(i*NVAR+j) = K2(i*NVAR+j) + beta2*DFDT(i*NVAR+j)
+ 150         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 155 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 155        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 160   CONTINUE
+ 
+ 
+C ------------ STAGE 3 -------------------------
+       DO 170 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a31*K1(j) + a32*K2(j)
+ 170   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha3*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha3*H, ynew, DFDP)
+       END IF	    
+       nfcn=nfcn+1
+       beta1 = c31/H
+       beta2 = c32/H
+       DO 180 j = 1,NVAR
+         K3(j) = Fv(j) + beta1*K1(j) + beta2*K2(j)
+ 180   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta3 = H*gamma3
+	 DO 190 j=1,NVAR
+	    K3(j) = K3(j) + beta3*DFDT(j)	    
+ 190     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K3)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K3(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha3*H, ynew, JAC)
+       njac=njac+1
+       DO 220 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K3(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K3(1), Hv )
+          DO 200 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + Hv(j)
+ 200      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 210 j=1,NVAR
+	        K3(i*NVAR+j) = K3(i*NVAR+j) + beta3*DFDT(i*NVAR+j)
+ 210         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 215 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 215        CONTINUE	  
+	  END IF	 
+C               --- End of derivative w.r.t. parameters
+          CALL KppSolve (AJAC, K3(i*NVAR+1))
+ 220   CONTINUE
+ 
+C ------------ STAGE 4 -------------------------
+       DO 225 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a41*K1(j) + a42*K2(j) + a43*K3(j)
+ 225   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha4*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha4*H, ynew, DFDP)
+       END IF	    
+       nfcn=nfcn+1
+       beta1 = c41/H
+       beta2 = c42/H
+       beta3 = c43/H
+       DO 230 j = 1,NVAR
+         K4(j) = Fv(j) + beta1*K1(j) + beta2*K2(j) + beta3*K3(j)
+ 230   CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta4 = H*gamma4
+	  DO 240 j=1,NVAR
+	    K4(j) = K4(j) + beta4*DFDT(j)
+ 240      CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K4)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K4(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       njac=njac+1
+       DO 270 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K4(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K4(1), Hv )
+          DO 250 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + beta3*K3(i*NVAR+j)
+     &                       + Hv(j)
+ 250      CONTINUE
+          IF (.NOT. Autonomous) THEN
+	     DO 260 j=1,NVAR
+	        K4(i*NVAR+j) = K4(i*NVAR+j) + beta4*DFDT(i*NVAR+j)
+ 260         CONTINUE
+          END IF
+C --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 265 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 265        CONTINUE	  
+	  END IF	 
+          CALL KppSolve (AJAC, K4(i*NVAR+1))
+ 270   CONTINUE
+
+
+C ---- The Solution ---
+       DO 280 j = 1,NVAR*(NSENSIT+1)
+C         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) + b4*K4(j)
+         ynew(j) = y(j) + 2*K1(j) + K3(j) + K4(j)
+ 280   CONTINUE
+ 
+ 
+C ====== Error estimation -- can be extended to control sensitivities too ========
+ 
+        ERR = 0.d0
+        DO 290 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(ynew(i)),DABS(y(i)))
+C	   e = d1*K1(i) + d2*K2(i) + d3*K3(i) + d4*K4(i)
+	   e = K4(i)
+           ERR = ERR + ( e/w )**2
+ 290    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 300 i=1,NVAR*(NSENSIT+1)
+             y(i)  = ynew(i)
+ 300      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y,  FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros1
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 30.0;
+        STEPMAX = 30.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1.f	(revision 3477)
@@ -0,0 +1,166 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS1(NVAR,TIN,TOUT,STEPMIN,VAR,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS1(N,T,Tnext,Hstart,
+     +                   y,Info,FUNC_CHEM,JAC_CHEM)
+     
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Linearly Implicit Euler
+C  A method of theoretical interest but of no practical value
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C     Hstart = The last accepted stepsize
+C 
+C    Adrian Sandu, December 2001
+C 
+      KPP_REAL Fv(NVAR)
+      KPP_REAL JAC(LU_NONZERO)
+      KPP_REAL H, Hstart
+      KPP_REAL y(NVAR)
+      KPP_REAL T, Tnext, Tplus
+      KPP_REAL elo,ghinv,uround
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL    FUNC_CHEM, JAC_CHEM                                                                                                
+
+
+      H     = Hstart
+      Tplus = T
+      Nfcn  = 0
+      Njac  = 0
+  
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function and Jacobian values                                                                                                                            
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       Nfcn = Nfcn+1
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       DO 40 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) - 1.0d0/H
+ 40    CONTINUE
+       CALL KppDecomp (JAC, ier)
+C 
+       IF (ier.ne.0) THEN
+          PRINT *,'ROS1: Singular factorization at T=',T,'; H=',H
+          STOP
+       END IF
+ 
+C ------------ STAGE 1-------------------------
+       CALL KppSolve (JAC, Fv)
+ 
+C ---- The Solution ---
+       DO 160 j = 1,NVAR
+         y(j) = y(j) - Fv(j) 
+ 160   CONTINUE
+       T = T + H
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Njac
+      Info(5) = 0
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1_ddm.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros1_ddm
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=30.0
+        STEPMAX=30.0
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 30.0;
+        STEPMAX = 30.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros1_ddm.f	(revision 3477)
@@ -0,0 +1,300 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+      INTEGER   NSENSIT
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C TOUT - End Time
+      KPP_REAL Y( NVAR*(NSENSIT+1) )
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM,  HESS_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS1_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,Y,
+     +                   Info,FUNC_CHEM,JAC_CHEM,HESS_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS1_DDM(N,NSENSIT,T,Tnext,Hstart,
+     +                   y,Info,FUNC_CHEM,JAC_CHEM,HESS_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+C
+C  Linearly Implicit Euler with direct-decoupled calculation of sensitivities
+C  A method of theoretical interest but of no practical value
+C
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C     Hstart = The last accepted stepsize
+C 
+C    Adrian Sandu, December 2001
+C 
+      INTEGER   NSENSIT
+      KPP_REAL Fv(NVAR*(NSENSIT+1)), Hv(NVAR)
+      KPP_REAL DFDP(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL H, Hstart
+      KPP_REAL y(NVAR*(NSENSIT+1))
+      KPP_REAL T, Tnext, Tplus
+      KPP_REAL elo,ghinv,uround
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+
+      H     = Hstart
+      Tplus = T
+      Nfcn  = 0
+      Njac  = 0
+  
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function and Jacobian values                                                                                                                            
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       Nfcn = Nfcn+1
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF  
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       DO 40 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j)
+ 40    CONTINUE
+       DO 50 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + 1.0d0/H
+ 50    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+C 
+       IF (ier.ne.0) THEN
+          PRINT *,'ROS1: Singular factorization at T=',T,'; H=',H
+          STOP
+       END IF
+ 
+C ------------ STAGE 1-------------------------
+       CALL KppSolve (AJAC, Fv)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, Fv(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 100 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC, y(i*NVAR+1), Fv(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), Fv(1), Hv )
+          IF (DDMTYPE .EQ. 0) THEN
+	    DO 80 j=1,NVAR
+	      Fv(i*NVAR+j) = Fv(i*NVAR+j) + Hv(j)
+ 80	    CONTINUE	    
+          ELSE
+	    DO 90 j=1,NVAR
+	      Fv(i*NVAR+j) = Fv(i*NVAR+j) + Hv(j) 
+     &      	      + DFDP(i*NVAR+j)+ DJDP((i-1)*NVAR+j)
+ 90	    CONTINUE	    
+          END IF  
+          CALL KppSolve (AJAC, Fv(i*NVAR+1))
+ 100   CONTINUE
+ 
+C ---- The Solution ---
+       DO 160 j = 1,NVAR*(NSENSIT+1)
+         y(j) = y(j) + Fv(j) 
+ 160   CONTINUE
+       T = T + H
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) THEN
+          GO TO 10
+      END IF	  
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y, FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.c	(revision 3477)
@@ -0,0 +1,311 @@
+
+	#define MAX(a,b) ((a) >= (b)) ?(a):(b)
+	#define MIN(b,c) ((b) <  (c)) ?(b):(c)	
+	#define abs(x)   ((x) >=  0 ) ?(x):(-x) 
+	#define dabs(y)  (double)abs(y) 
+	#define DSQRT(d) (double)pow(d,0.5)
+	#define signum(x)((x) >=  0 ) ?(1):(-1)
+
+
+
+	void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+
+
+
+ 
+void FUNC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL P[NVAR])
+	{
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_RCONST();
+         Fun( Y, FIX, RCONST, P );
+         TIME = Told;
+        }
+ 
+void JAC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL J[LU_NONZERO])
+        {
+         KPP_REAL Told;
+         Told = TIME;
+         TIME = T;
+         Update_SUN();
+         Update_RCONST();
+         Jac_SP( Y, FIX, RCONST, J );
+         TIME = Told;
+        }  
+                                                                                                                         
+
+
+
+
+       INTEGRATE(KPP_REAL TIN,KPP_REAL TOUT )
+	{
+ 
+	 /*  TIN - Start Time   */
+	 /*  TOUT - End Time     */
+
+
+         int INFO[5];
+	 forfun = &FUNC_CHEM;
+	 forjac = &JAC_CHEM;	
+         INFO[0] = Autonomous;
+	 ROS2(NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,VAR,ATOL
+	 ,RTOL,INFO,forfun,forjac);
+ 
+	}
+ 
+ 
+int ROS2(int N,KPP_REAL T, KPP_REAL Tnext,KPP_REAL Hmin,KPP_REAL Hmax,
+   KPP_REAL Hstart,KPP_REAL y[NVAR],KPP_REAL AbsTol[NVAR],KPP_REAL RelTol[NVAR],
+   int INFO[5],void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []),
+   void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) )
+   {
+     
+                                                                                
+/*
+     All the arguments aggree with the KPP syntax.
+
+  INPUT ARGUMENTS:
+     y = Vector of (NVAR) concentrations, contains the
+         initial values on input
+     [T, Tnext] = the integration interval
+     Hmin, Hmax = lower and upper bounds for the selected step-size.
+          Note that for Step = Hmin the current computed
+          solution is unconditionally accepted by the error
+          control mechanism.
+     AbsTol, RelTol = (NVAR) dimensional vectors of
+          componentwise absolute and relative tolerances.
+     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+          See the header below.
+     JAC_CHEM = name of routine that computes the Jacobian, in
+          sparse format. KPP syntax. See the header below.
+     Info(1) = 1  for  autonomous   system
+             = 0  for nonautonomous system
+
+  OUTPUT ARGUMENTS:
+     y = the values of concentrations at Tend.
+     T = equals Tend on output.
+     Info(2) = # of FUNC_CHEM calls.
+     Info(3) = # of JAC_CHEM calls.
+     Info(4) = # of accepted steps.
+     Info(5) = # of rejected steps.
+*/
+ 
+      KPP_REAL K1[NVAR], K2[NVAR], K3[NVAR], K4[NVAR];
+      KPP_REAL F1[NVAR], JAC[LU_NONZERO];
+      KPP_REAL ghinv , uround , dround , c43 , tau;
+      KPP_REAL ynew[NVAR];
+      KPP_REAL H, Hold, Tplus;
+      KPP_REAL ERR, factor, facmax;
+      int n,nfcn,njac,Naccept,Nreject,i,j,ier;
+      char IsReject,Autonomous;
+                                                                            
+      KPP_REAL gamma, m1, m2, alpha, beta, delta, theta, g[NVAR], x[NVAR];
+ 
+/*     Initialization of counters, etc.       */
+      Autonomous = (INFO[0] == 1);         
+      uround = (double)(1e-15);               
+
+      dround = DSQRT(uround);
+      c43 = (double)(- 8.e0/3.e0);
+      H = MAX( (double)1.e-8, Hmin );
+      Tplus = T;
+      IsReject = 0;
+      Naccept  = 0;
+      Nreject  = 0;
+      nfcn     = 0;
+      njac     = 0;
+      gamma = (double)(1.e0 + 1.e0/DSQRT(2.e0));
+ 
+/* === Starting the time loop ===     */
+ while(T < Tnext)
+ {
+ ten :     
+     Tplus = T + H;
+
+     if ( Tplus > Tnext )
+      {
+        H = Tnext - T;
+        Tplus = Tnext;
+      }
+
+     (*forjac)(NVAR, T, y,JAC );               
+
+     njac = njac+1;
+     ghinv = (double)(-1.0e0/(gamma*H));
+     
+     
+     
+     for(j=0;j<NVAR;j++)
+        JAC[LU_DIAG[j]] = JAC[LU_DIAG[j]] + ghinv;
+      
+
+
+     ier = KppDecomp (JAC);
+
+     if ( ier != 0)
+     {
+      if( H > Hmin ) 
+      {
+       H = (double)(5.0e-1*H); 
+       goto ten;	   
+      }
+     else
+       printf("IER <> 0 , H = %d", H);
+       
+     }/* main ier if ends*/	
+		
+
+     (*forfun)(NVAR , T, y, F1 ) ;              
+
+
+
+                                                                                                                            
+
+ 
+/* ====== NONAUTONOMOUS CASE ===============   */
+       if(Autonomous == 0) 
+       {
+         tau =( dround*MAX ((double)1.0e-6, dabs(T)) *signum(T) );
+         (*forfun)(NVAR, T+tau, y, K2);
+         nfcn=nfcn+1;
+	 
+         for(j = 0;j<NVAR;j++)
+	     K3[j] = ( K2[j]-F1[j] )/tau;
+	  
+ 
+/* ----- STAGE 1 (NON-AUTONOMOUS) -----   */
+
+         delta = (double)(gamma*H);
+	 
+         for(j = 0;j<NVAR;j++)
+	     K1[j] =  F1[j] + delta*K3[j];
+	 
+         KppSolve (JAC, K1);
+ 
+
+/* ----- STAGE 2  (NON-AUTONOMOUS) -----   */
+         alpha = (double)(- 1.e0/gamma);
+         for(j = 0;j<NVAR;j++)
+             ynew[j] = y[j] + alpha*K1[j];
+	 
+ 
+         (*forfun)(NVAR, T+H, ynew, F1);
+         nfcn=nfcn+1;
+         beta = (double)(2.e0/(gamma*H));
+         delta = (double)(-gamma*H);
+         for(j = 0;j<NVAR;j++)
+             K2[j] = F1[j] + beta*K1[j] + delta*K3[j];
+	 
+         KppSolve (JAC, K2);
+    
+       }/* if for non - autonomous case ends here  */	
+ 
+/* ====== AUTONOMOUS CASE ===============    */
+       else
+       {
+ 
+/* ----- STAGE 1 (AUTONOMOUS) -----   */
+         for(j = 0;j<NVAR;j++)
+	     K1[j] =  F1[j];
+         
+         KppSolve (JAC, K1);
+ 
+/* ----- STAGE 2  (AUTONOMOUS) -----  */
+         alpha = (double)(- 1.e0/gamma);
+       
+         for(j = 0;j<NVAR;j++)
+             ynew[j] = y[j] + alpha*K1[j];
+       
+         (*forfun)(NVAR, T+H, ynew, F1);
+
+         nfcn=nfcn+1;
+         beta = (double)(2.e0/(gamma*H));
+         for(j = 0;j < NVAR;j++)
+             K2[j] = F1[j] + beta*K1[j];
+       
+         KppSolve (JAC, K2);
+       
+       }/* else autonomous case ends here */
+       
+ 
+                                                                                                            
+/* ---- The Solution ---  */
+       m1 = (double)(-3.e0/(2.e0*gamma));
+       m2 = (double)(-1.e0/(2.e0*gamma));
+       for(j = 0;j<NVAR;j++)
+          ynew[j] = y[j] + m1*K1[j] + m2*K2[j];
+       
+ 
+ 
+/* ====== Error estimation ========    */
+ 
+        ERR=(double)0.e0;
+        theta = (double)(1.e0/(2.e0*gamma));
+	
+        for(i=0;i<NVAR;i++)
+	{
+           g[i] = AbsTol[i] + RelTol[i]*dabs(ynew[i]);
+           ERR = (double)( ERR + pow( ( theta*(K1[i]+K2[i])/g[i] ) , 2.0 ) );
+        }
+         ERR = MAX( uround, DSQRT( ERR/NVAR ) );
+ 
+/* ======= Choose the stepsize ==================  */
+ 
+ 
+        factor = (double)(0.9/pow( ERR,(1.e0/2.e0) ));
+        if (IsReject == 1) 
+	    facmax=(double)1.0;
+        
+	else
+            facmax=(double)10.0;
+        
+	
+        factor =(double) MAX( 1.0e-1, MIN(factor,facmax) );
+        Hold = H;
+        H = (double)MIN( Hmax, MAX(Hmin,factor*H) );
+                                                                                                
+/* ======= Rejected/Accepted Step ==================  */
+ 
+ 
+	if( (ERR>1) && (Hold>Hmin) )
+	{
+	 IsReject = 1;
+	 Nreject = Nreject + 1;
+	}		
+	else
+	{
+	 IsReject = 0;
+ 	 for(i=0;i<NVAR;i++)
+	 {
+	  y[i] = ynew[i];
+	 }
+	T = Tplus;
+	Naccept = Naccept+1;    
+ 
+ 	}/*  else ends here */
+
+ 
+ 
+ 
+ 
+/* ======= End of the time loop =================    */
+  
+ }    /*      while loop (T < Tnext) ends here    */ 
+ 
+ 
+/* ======= Output Information ================      */
+      INFO[1] = nfcn;
+      INFO[2] = njac;
+      INFO[3] = Naccept;
+      INFO[4] = Nreject;
+
+      return 0;	
+	
+  } /* function ros2 ends here   */
+ 
+ 
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros2
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.f	(revision 3477)
@@ -0,0 +1,314 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - END Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+      
+C--------------------------------
+      INTEGER N_stepss, N_accepteds, N_rejecteds, N_jacs, ITOL, IERR
+      SAVE N_stepss, N_accepteds, N_rejecteds, N_jacs
+C--------------------------------
+
+      INFO(1) = 1 ! Autonomous
+      INFO(2) = 0
+ 
+      CALL ROS2(NVAR,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+C--------------------------------
+      N_stepss=N_stepss+Info(4)+Info(5)
+      N_accepteds=N_accepteds+Info(4)
+      N_rejecteds=N_rejecteds+Info(5)
+      N_jacs=N_jacs+Info(3)
+      PRINT*,'Step=',N_stepss,' Acc=',N_accepteds,' Rej=',N_rejecteds,
+     &          ' Jac=',N_jacs
+C--------------------------------
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS2(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   Y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+
+C  INPUT ARGUMENTS:
+C     Y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system
+C     Info(2) = 1  for third order embedded formula
+C             = 0  for first order embedded formula 
+C
+C   Note: Stage 3 used to build strongly A-stable order 3 formula for error control
+C            Embed3 = (Info(2).EQ.1)
+C         IF Embed3 = .true. THEN the third order embedded formula is used
+C                     .false. THEN a first order embedded  formula is used
+C
+C
+C  OUTPUT ARGUMENTS:
+C     Y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+ 
+      KPP_REAL  K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL  F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL  DFDT(NVAR)
+      KPP_REAL  Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL  Y(NVAR), Ynew(NVAR)
+      KPP_REAL  AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL  T, Tnext, H, Hold, Tplus
+      KPP_REAL  ERR, factor, facmax
+      KPP_REAL  tau, beta, elo, dround, a21, c21, c31, c32
+      KPP_REAL  gamma3, d1, d2, d3, gam
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous, Embed3
+      EXTERNAL    FUNC_CHEM, JAC_CHEM                                                                                                
+
+      KPP_REAL  gamma, m1, m2, alpha, beta1, beta2, delta, w, e
+ 
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround  = 1.d-15
+      dround  = dsqrt(uround)
+      H = DMAX1(1.d-8, Hmin)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      
+C     Method Parameters      
+      gamma = 1.d0 + 1.d0/sqrt(2.d0)
+      a21   = - 1.d0/gamma
+      m1 = -3.d0/(2.d0*gamma)
+      m2 = -1.d0/(2.d0*gamma)
+      c21 = -2.d0/gamma
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2)
+     &         /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2)
+     &          /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/
+     &          (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gamma)/gamma**2/
+     &          (-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+ 
+C === Start the time loop ===
+       DO WHILE (T .LT. Tnext)
+
+10     CONTINUE
+
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+       CALL JAC_CHEM( T, Y, JAC )
+ 
+       Njac = Njac+1
+       ghinv = -1.0d0/(gamma*H)
+       DO 20 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+ 20    CONTINUE
+       CALL KppDecomp (JAC, ier)
+ 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'IER <> 0, H=',H
+            STOP
+         END IF
+       END IF
+ 
+       CALL FUNC_CHEM( T, Y, F1 )
+ 
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.NOT. Autonomous) THEN
+         tau = DSIGN(DROUND*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM( T+tau, Y, K2)
+         nfcn=nfcn+1
+         DO 30 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 30      CONTINUE
+       END IF ! .NOT.Autonomous
+ 
+C ----- STAGE 1 -----
+       delta = gamma*H
+       DO 40 j = 1,NVAR
+          K1(j) =  F1(j) 
+ 40    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 45 j = 1,NVAR
+           K1(j) = K1(j) + delta*DFDT(j)
+ 45      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K1)
+ 
+C ----- STAGE 2  -----
+       DO 50 j = 1,NVAR
+         Ynew(j) = Y(j) + a21*K1(j)
+ 50    CONTINUE
+       CALL FUNC_CHEM( T+H, Ynew, F1)
+       nfcn=nfcn+1
+       beta = -c21/H
+       DO 55 j = 1,NVAR
+         K2(j) = F1(j) + beta*K1(j) 
+ 55    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         delta = -gamma*H
+         DO 56 j = 1,NVAR
+           K2(j) = K2(j) + delta*DFDT(j)
+ 56      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K2)
+ 
+C ----- STAGE 3  -----
+       IF (Embed3) THEN
+       beta1 = -c31/H
+       beta2 = -c32/H
+       delta = gamma3*H
+       DO 57 j = 1,NVAR
+         K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j) 
+ 57    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 58 j = 1,NVAR
+           K3(j) = K3(j) + delta*DFDT(j)
+ 58      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K3)
+       END IF ! Embed3
+ 
+
+C ---- The Solution ---
+       DO 120 j = 1,NVAR
+         Ynew(j) = Y(j) + m1*K1(j) + m2*K2(j)
+ 120   CONTINUE
+ 
+ 
+C ====== Error estimation ========
+ 
+        ERR=0.d0
+        DO 130 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(Y(i)),DABS(Ynew(i)))
+	   IF ( Embed3 ) THEN
+	     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+	   ELSE
+             e = 1.d0/(2.d0*gamma)*(K1(i)+K2(i))
+	   END IF  ! Embed3 
+           ERR = ERR + ( e/w )**2
+ 130    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+ 
+        IF ( Embed3 ) THEN
+            elo = 3.0D0 ! estimator local order
+	ELSE
+	    elo = 2.0D0
+	END IF    
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             Y(i)  = Ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize IF previous step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= END of the time loop ===============================
+      END DO
+  
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM( T, Y, P )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL  T, Told
+      KPP_REAL  Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM( T, Y, J )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL  Told, T
+      KPP_REAL  Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2.f90	(revision 3477)
@@ -0,0 +1,294 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      USE KPP_ROOT_global
+
+! TIN - Start Time
+      KPP_REAL TIN
+! TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      call ROS2(NVAR,TIN,TOUT,STEPMIN,STEPMAX,   &
+            STEPMIN,VAR,ATOL,RTOL, &
+            Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      END SUBROUTINE INTEGRATE
+  
+
+ 
+ 
+      SUBROUTINE ROS2(N,T,Tnext,Hmin,Hmax,Hstart,  &
+            y,AbsTol,RelTol,      &
+            Info,FUNC_CHEM,JAC_CHEM)
+      
+      USE KPP_ROOT_params
+      USE KPP_ROOT_Jacobian_sparsity                                 
+      IMPLICIT NONE
+
+!  INPUT ARGUMENTS:
+!     y = Vector of (NVAR) concentrations, contains the
+!     initial values on input
+!     [T, Tnext] = the integration interval
+!     Hmin, Hmax = lower and upper bounds for the selected step-size.
+!      Note that for Step = Hmin the current computed
+!      solution is unconditionally accepted by the error
+!      control mechanism.
+!     AbsTol, RelTol = (NVAR) dimensional vectors of
+!      componentwise absolute and relative tolerances.
+!     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+!      See the header below.
+!     JAC_CHEM = name of routine that computes the Jacobian, in
+!      sparse format. KPP syntax. See the header below.
+!     Info(1) = 1  for  autonomous   system
+!         = 0  for nonautonomous system
+!     Info(2) = 1  for third order embedded formula
+!         = 0  for first order embedded formula 
+!
+!   Note: Stage 3 used to build strongly A-stable order 3 formula for error control
+!        Embed3 = (Info(2).EQ.1)
+!     if Embed3 = .true. then the third order embedded formula is used
+!         .false. then a first order embedded  formula is used
+!
+!
+!  OUTPUT ARGUMENTS:
+!     y = the values of concentrations at Tend.
+!     T = equals Tend on output.
+!     Info(2) = # of FUNC_CHEM calls.
+!     Info(3) = # of JAC_CHEM calls.
+!     Info(4) = # of accepted steps.
+!     Info(5) = # of rejected steps.
+ 
+      KPP_REAL K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL DFDT(NVAR)
+      KPP_REAL Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL y(NVAR), ynew(NVAR)
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, H, Hold, Tplus
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL tau, beta, elo, dround, a21, c31, c32
+      KPP_REAL gamma3, d1, d2, d3, gam
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous, Embed3
+      EXTERNAL    FUNC_CHEM, JAC_CHEM                                 
+
+      KPP_REAL gamma, m1, m2, alpha, beta1, beta2, delta, w, e
+ 
+!     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround  = 1.d-15
+      dround  = dsqrt(uround)
+      H = DMAX1(1.d-8, Hmin)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      
+!     Method Parameters      
+      gamma = 1.d0 + 1.d0/sqrt(2.d0)
+      a21   = - 1.d0/gamma
+      m1 = -3.d0/(2.d0*gamma)
+      m2 = -1.d0/(2.d0*gamma)
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2) &
+      /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2) &
+       /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/      &
+       (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gamma)/gamma**2/(-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+ 
+! === Starting the time loop ===
+ 10    CONTINUE
+      Tplus = T + H
+      if ( Tplus .gt. Tnext ) then
+         H = Tnext - T
+         Tplus = Tnext
+      end if
+ 
+      call JAC_CHEM(NVAR, T, y, JAC)
+ 
+      Njac = Njac+1
+      ghinv = -1.0d0/(gamma*H)
+      DO j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+      END DO
+      CALL KppDecomp (JAC, ier)
+ 
+      if (ier.ne.0) then
+        if ( H.gt.Hmin) then
+          H = 5.0d-1*H
+          go to 10
+        else
+          print *,'IER <> 0, H=',H
+          stop
+        end if
+      end if
+ 
+      call FUNC_CHEM(NVAR, T, y, F1)
+ 
+! ====== NONAUTONOMOUS CASE ===============
+   IF (.not. Autonomous) THEN
+     tau = dsign(dround*dmax1( 1.0d-6, dabs(T) ), T)
+     call FUNC_CHEM(NVAR, T+tau, y, K2)
+     nfcn=nfcn+1
+     DO j = 1,NVAR
+       DFDT(j) = ( K2(j)-F1(j) )/tau
+     END DO
+   END IF ! .NOT.Autonomous
+ 
+! ----- STAGE 1 -----
+   DO j = 1,NVAR
+      K1(j) =  F1(j) 
+   END DO
+   IF (.NOT.Autonomous) THEN
+     delta = gamma*H
+     DO j = 1,NVAR
+       K1(j) = K1(j) + delta*DFDT(j)
+     END DO      
+   END IF ! .NOT.Autonomous
+   call KppSolve (JAC, K1)
+ 
+! ----- STAGE 2  -----
+   DO j = 1,NVAR
+     ynew(j) = y(j) + a21*K1(j)
+   END DO
+   call FUNC_CHEM(NVAR, T+H, ynew, F1)
+   nfcn=nfcn+1
+   beta = 2.d0/(gamma*H)
+   DO j = 1,NVAR
+     K2(j) = F1(j) + beta*K1(j) 
+   END DO
+   IF (.NOT. Autonomous) THEN
+     delta = -gamma*H
+     DO j = 1,NVAR
+       K2(j) = K2(j) + delta*DFDT(j)
+     END DO   
+   END IF ! .NOT.Autonomous
+   call KppSolve (JAC, K2)
+ 
+! ----- STAGE 3  -----
+   IF (Embed3) THEN
+   beta1 = -c31/H
+   beta2 = -c32/H
+   delta = gamma3*H
+   DO j = 1,NVAR
+     K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j) 
+   END DO
+   IF (.NOT.Autonomous) THEN
+     DO j = 1,NVAR
+       K3(j) = K3(j) + delta*DFDT(j)
+     END DO   
+   END IF ! .NOT.Autonomous
+   CALL KppSolve (JAC, K3)
+    END IF ! Embed3
+ 
+
+
+! ---- The Solution ---
+   DO j = 1,NVAR
+     ynew(j) = y(j) + m1*K1(j) + m2*K2(j)
+   END DO
+ 
+ 
+! ====== Error estimation ========
+ 
+    ERR=0.d0
+    DO i=1,NVAR
+       w = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(ynew(i)))
+    IF ( Embed3 ) THEN
+     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+    ELSE
+         e = 1.d0/(2.d0*gamma)*(K1(i)+K2(i))
+    END IF  ! Embed3 
+       ERR = ERR + ( e/w )**2
+    END DO
+    ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+! ======= Choose the stepsize ===============================
+ 
+    IF ( Embed3 ) THEN
+        elo = 3.0D0 ! estimator local order
+    ELSE
+        elo = 2.0D0
+    END IF    
+    factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+    Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+! ======= Rejected/Accepted Step ============================
+ 
+    IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+      IsReject = .true.
+      H = DMIN1(H/10,Hnew)
+      Nreject  = Nreject+1
+    ELSE
+      DO i=1,NVAR
+         y(i)  = ynew(i)
+      END DO
+      T = Tplus
+      IF (.NOT. IsReject) THEN
+          H = Hnew   ! Do not increase stepsize if previous step was rejected
+      END IF    
+      IsReject = .false.
+      Naccept = Naccept+1
+    END IF
+
+ 
+! ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+! ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+ 
+      END SUBROUTINE Ros2
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)      
+      USE KPP_ROOT_global
+      INTEGER N 
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y, FIX, RCONST, P )
+      TIME = Told
+      END SUBROUTINE FUNC_CHEM
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)     
+      USE KPP_ROOT_global
+      INTEGER N 
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, J )
+      TIME = Told
+      END SUBROUTINE JAC_CHEM                                           
+  
+
+
+
+
+                                                        
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_cts_adj.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_cts_adj.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_cts_adj.f	(revision 3477)
@@ -0,0 +1,312 @@
+      SUBROUTINE ros2_cts_adj(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,Lambda,Fix,Rconst,AbsTol,RelTol,
+     +                   Info)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUN = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_SP = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system
+C     Info(2) = 1  for third order embedded formula
+C             = 0  for first order embedded formula 
+C
+C   Note: Stage 3 used to build strongly A-stable order 3 formula for error control
+C            Embed3 = (Info(2).EQ.1)
+C         IF Embed3 = .true. THEN the third order embedded formula is used
+C                     .false. THEN a first order embedded  formula is used
+C
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUN CALLs.
+C     Info(3) = # of JAC_SP CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+
+      INTEGER max_no_steps
+      PARAMETER (max_no_steps = 200)      
+      KPP_REAL  Trajectory(NVAR,max_no_steps)
+      KPP_REAL  StepSize(max_no_steps)
+ 
+      KPP_REAL  K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL  F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL  DFDT(NVAR)(NRAD)
+      KPP_REAL  Fix(NFIX), Rconst(NREACT)
+      KPP_REAL  Hmin,Hmax,Hstart,ghinv,uround      
+      KPP_REAL  y(NVAR), Ynew(NVAR)
+      KPP_REAL  AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL  T, Tnext, H, Hold, Tplus
+      KPP_REAL  ERR, factor, facmax
+      KPP_REAL  Lambda(NVAR), K11(NVAR), JAC1(LU_NONZERO)
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous, Embed3
+      EXTERNAL    FUN, JAC_SP                                                                                                
+
+      KPP_REAL gamma, m1, m2, alpha, beta1, beta2, delta, w, e
+      KPP_REAL ginv
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround  = 1.d-15
+      dround  = dsqrt(uround)
+      H = DMAX1(Hstart,DMAX1(1.d-8, Hmin))
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      
+C     Method Parameters      
+      gamma = 1.d0 + 1.d0/sqrt(2.d0)
+      a21   = - 1.d0/gamma
+      m1 = -3.d0/(2.d0*gamma)
+      m2 = -1.d0/(2.d0*gamma)
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2)
+     &         /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2)
+     &          /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/
+     &          (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gam)/gamma**2/
+     &          (-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+
+      Trajectory(1:NVAR,1) = Ynew(1)
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+       CALL Jac_SP( Y, Fix, Rconst, JAC )
+ 
+       Njac = Njac+1
+       ghinv = -1.0d0/(gamma*H)
+       DO 20 j=1,NVAR
+         JAC(LU_DIAG_V(j)) = JAC(LU_DIAG_V(j)) + ghinv
+ 20    CONTINUE
+       CALL KppDecomp (NVAR, JAC, ier)
+ 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         else
+            PRINT *,'IER <> 0, H=',H
+            STOP
+         END IF
+       END IF
+ 
+       CALL Fun( Y, Fix, Rconst, F1 )
+ 
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = dsign(dround*dmax1( 1.0d-6, dabs(T) ), T)
+         CALL Fun( Y, Fix, Rconst, K2 )
+         nfcn=nfcn+1
+         DO 30 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 30      CONTINUE
+       END IF ! .NOT.Autonomous
+ 
+C ----- STAGE 1 -----
+       DO 40 j = 1,NVAR
+          K1(j) =  F1(j) 
+ 40    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         delta = gamma*H
+         DO 45 j = 1,NVAR
+           K1(j) = K1(j) + delta*DFDT(j)
+ 45      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K1)
+ 
+C ----- STAGE 2  -----
+       DO 50 j = 1,NVAR
+         Ynew(j) = y(j) + a21*K1(j)
+ 50    CONTINUE
+       CALL Fun( Ynew, Fix, Rconst, F1 )
+       nfcn=nfcn+1
+       beta = 2.d0/(gamma*H)
+       delta = -gamma*H
+       DO 55 j = 1,NVAR
+         K2(j) = F1(j) + beta*K1(j) 
+ 55    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 56 j = 1,NVAR
+           K2(j) = K2(j) + delta*DFDT(j)
+ 56      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K2)
+ 
+C ----- STAGE 3  -----
+       IF (Embed3) THEN
+       beta1 = -c31/H
+       beta2 = -c32/H
+       delta = gamma3*H
+       DO 57 j = 1,NVAR
+         K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j) 
+ 57    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         DO 58 j = 1,NVAR
+           K3(j) = K3(j) + delta*DFDT(j)
+ 58      CONTINUE       
+       END IF ! .NOT.Autonomous
+       CALL KppSolve (JAC, K3)
+       END IF ! Embed3
+
+
+C ---- The Solution ---
+       DO 120 j = 1,NVAR
+         Ynew(j) = y(j) + m1*K1(j) + m2*K2(j)
+ 120   CONTINUE
+ 
+ 
+C ====== Error estimation ========
+ 
+        ERR=0.d0
+        DO 130 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(Ynew(i)))
+	   IF ( Embed3 ) THEN
+	     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+	   ELSE
+             e = 1.d0/(2.d0*gamma)*(K1(i)+K2(i))
+	   END IF  ! Embed3 
+           ERR = ERR + ( e/w )**2
+ 130    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+	
+C ======= Choose the stepsize ===============================
+ 
+        IF ( Embed3 ) THEN
+            elo = 3.0D0 ! estimator local order
+	ELSE
+	    elo = 2.0D0
+	END IF    
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+        Hold = H
+         
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             y(i)  = Ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize IF previous step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+	  IF (Naccept+1>max_no_steps) THEN
+	    PRINT*,'Error in Adjoint Ros2: more steps than allowed'
+	    STOP
+	  END IF  
+	  Trajectory(1:NVAR,Naccept+1) = Ynew(1:NVAR)
+	  StepSize(Naccept) = Hold
+!	  CALL TRAJISTORE(y,hold)    
+        END IF        
+C ======= END of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject      
+
+      ginv = 1.d0/gamma
+C -- The backwards loop for the CONTINUOUS ADJOINT    
+      DO istep = Naccept,1,-1
+        
+	h = StepSize(istep)
+	y(1:NVAR) = Trajectory(1:NVAR,istep+1)
+	gHinv = -ginv/H  
+
+	CALL Jac_SP(Y, Fix, Rconst, JAC)
+        JAC1(1:LU_NONZERO)=JAC(1:LU_NONZERO)
+        DO j=1,NVAR
+          JAC(lu_diag_v(j)) = JAC(lu_diag_v(j)) + gHinv
+        END DO
+        CALL KppDecomp (NVAR,JAC,ier) 
+ccc equivalent to function evaluation in forward integration  
+ccc is J^T*Lambda in backward integration    
+        CALL JacTR_SP_Vec ( JAC1, Lambda, F1)      
+      
+C ----- STAGE 1 (AUTONOMOUS) -----
+        K11(1:NVAR) =  F1(1:NVAR) 
+        CALL KppSolveTR (JAC,K11,K1) 
+C ----- STAGE 2 (AUTONOMOUS) -----       
+	y(1:NVAR) = Trajectory(1:NVAR,istep)
+        CALL Jac_SP(Y, Fix, Rconst, JAC1)
+        Ynew(1:NVAR) = Lambda(1:NVAR) - ginv*K1(1:NVAR)
+        CALL JacTR_SP_Vec ( JAC1, Ynew, F1) 
+        beta = -2.d0*ghinv
+        K11(1:NVAR) = F1(1:NVAR) + beta*K1(1:NVAR)
+        CALL KppSolveTR (JAC,K11,K2)
+c ---- The solution
+        Lambda(1:NVAR) = Lambda(1:NVAR)+m1*K1(1:NVAR)+m2*K2(1:NVAR)                
+
+      END DO ! istep
+     
+     
+      RETURN
+      END
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_ddm.def	(revision 3477)
@@ -0,0 +1,50 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros2_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros2_ddm.f	(revision 3477)
@@ -0,0 +1,480 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+      INTEGER NSENSIT
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS2_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS2_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Ros2 with direct-decoupled calculation of sensitivities 
+C
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C
+C  Adrian Sandu, December 2001
+
+ 
+      INTEGER NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR)
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DFDP(NVAR*NSENSIT+1), DFDPDT(NVAR*NSENSIT+1)
+      KPP_REAL DJDP(NVAR*NSENSIT+1)
+      KPP_REAL F1(NVAR), F2(NVAR)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, H, Hold, Tplus, e
+      KPP_REAL ERR, factor, facmax, dround, elo, tau, gam
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous,Embed3
+      EXTERNAL   FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+      LOGICAL    negative
+      KPP_REAL gamma, m1, m2, alpha, beta, delta, theta, w
+      KPP_REAL gamma3, d1, d2, d3, beta1, beta2
+      KPP_REAL c31, c32, c34
+ 
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      Embed3  = Info(2) .EQ. 1
+      uround = 1.d-15
+      dround = 1.0d-7 ! DSQRT(uround)
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+      gamma = 1.d0 + 1.d0/DSQRT(2.0d0)
+      c31 = -1.0D0/gamma**2*(1.0D0-7.0D0*gamma+9.0D0*gamma**2)
+     &         /(-1.0D0+2.0D0*gamma)
+      c32 = -1.0D0/gamma**2*(1.0D0-6.0D0*gamma+6.0D0*gamma**2)
+     &          /(-1.0D0+2.0D0*gamma)/2
+      gamma3 = 0.5D0 - 2*gamma
+      d1 = ((-9.0D0*gamma+8.0D0*gamma**2+2.0D0)/gamma**2/
+     &          (-1.0D0+2*gamma))/6.0D0
+      d2 = ((-1.0D0+3.0D0*gamma)/gamma**2/
+     &          (-1.0D0+2.0D0*gamma))/6.0D0
+      d3 = -1.0D0/(3.0D0*gamma)
+       m1 = -3.d0/(2.d0*gamma)
+       m2 = -1.d0/(2.d0*gamma)
+      
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function, Jacobian, and Hessian Values
+       CALL FUNC_CHEM(NVAR, T, y, F1)
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+                                                                                                                            
+C              Estimate the time derivatives in non-autonomous case 
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d0, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         njac=njac+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 20      CONTINUE
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 40 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 40      CONTINUE
+        END IF ! .not. Autonomous
+ 
+       Njac = Njac+1
+       ghinv = - 1.0d0/(gamma*H)
+       DO 50 j=1,LU_NONZERO
+         AJAC(j) = JAC(j) 
+ 50    CONTINUE
+       DO 60 j=1,NVAR
+         AJAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+ 60    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+ 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            go to 10
+         ELSE
+            print *,'IER <> 0, H=',H
+            stop
+         END IF
+       END IF
+ 
+                                                                                                                            
+
+
+C ----- STAGE 1 -----
+         delta = gamma*H
+         DO 70 j = 1,NVAR
+           K1(j) =  F1(j) 
+ 70      CONTINUE
+         IF (.NOT. Autonomous) THEN	 
+           DO 80 j = 1,NVAR
+             K1(j) =  K1(j) + delta*DFDT(j)
+ 80        CONTINUE
+	 END IF
+         CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+	 DO 120 i=1,NSENSIT
+	    CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	    CALL Hess_Vec ( HESS, K1(1), y(i*NVAR+1), F2 )
+	    DO 90 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + gHinv*F2(j)
+ 90	    CONTINUE	    
+           IF (.NOT. Autonomous) THEN	 
+             DO 100 j = 1,NVAR
+               K1(i*NVAR+j) =  K1(i*NVAR+j) + delta*DFDT(i*NVAR+j)
+ 100          CONTINUE
+	   END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 110 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 110        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+            CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 120	 CONTINUE
+ 
+C ----- STAGE 2   -----
+       alpha = - 1.d0/gamma
+       DO 130 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + alpha*K1(j)
+ 130    CONTINUE
+       CALL FUNC_CHEM(NVAR, T+H, ynew, F1)
+       IF (DDMTYPE.EQ.1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+H, ynew, DFDP)
+       END IF
+       nfcn=nfcn+1
+       beta1 = 2.d0/(gamma*H)
+       delta = -gamma*H
+       DO 140 j = 1,NVAR
+         K2(j) = F1(j) + beta1*K1(j) 
+ 140   CONTINUE
+       IF (.NOT. Autonomous) THEN	 
+          DO 150 j = 1,NVAR
+               K2(j) =  K2(j) + delta*DFDT(j)
+ 150      CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+ 
+       CALL JAC_CHEM(NVAR, T+H, Ynew, JAC)
+       njac=njac+1
+       DO 190 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),F1)
+	  CALL Hess_Vec ( HESS, K2(1), y(i*NVAR+1), F2 )
+          DO 160 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + gHinv*F2(j)
+ 160      CONTINUE	 
+          IF (.NOT. Autonomous) THEN	 
+             DO 170 j = 1,NVAR
+               K2(i*NVAR+j) =  K2(i*NVAR+j) + delta*DFDT(i*NVAR+j)
+ 170         CONTINUE
+	  END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 180 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j)  + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 180        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 190    CONTINUE
+ 
+C ----- STAGE 3  for error control only -----
+       IF (Embed3) THEN
+       beta1 = -c31/H
+       beta2 = -c32/H
+       delta = gamma3*H
+       DO 195 j = 1,NVAR
+         K3(j) = F1(j) + beta1*K1(j) + beta2*K2(j)
+ 195   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         DO 196 j = 1,NVAR
+           K3(j) = K3(j) + delta*DFDT(j)
+ 196     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K3)
+       END IF
+
+C ---- The Solution ---
+       DO 200 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + m1*K1(j) + m2*K2(j)
+ 200   CONTINUE
+ 
+ 
+C ====== Error estimation for concentrations only; this can be easily adapted to
+C                                             estimate the sensitivity error too ========
+ 
+        ERR=0.d0
+        DO 210 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(ynew(i)))
+	   IF (Embed3) THEN
+	     e = d1*K1(i) + d2*K2(i) + d3*K3(i)
+	   ELSE
+             e = (1.d0/(2.d0*gamma))*(K1(i)+K2(i))
+	   END IF   
+           ERR = ERR + ( e/w )**2
+ 210    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+        
+	IF (Embed3) THEN
+           elo    = 3.0D0 ! estimator local order
+	ELSE
+	   elo    = 2.0D0
+	END IF   
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 300 i=1,NVAR*(NSENSIT+1)
+             y(i)  = ynew(i)
+ 300      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previous step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+ 
+      RETURN
+      END
+ 
+ 
+  
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y, FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.c	(revision 3477)
@@ -0,0 +1,344 @@
+
+	#define MAX(a,b) ((a) >= (b)) ?(a):(b)
+	#define MIN(b,c) ((b) <  (c)) ?(b):(c)	
+	#define abs(x)   ((x) >=  0 ) ?(x):(-x) 
+	#define dabs(y)  (double)abs(y) 
+	#define DSQRT(d) (double)pow(d,0.5)
+	#define signum(x)((x) >=  0 ) ?(1):(-1)
+
+	void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+	void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []);
+
+
+
+    void FUNC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL P[NVAR])
+       {
+	KPP_REAL Told;
+        Told = TIME;
+        TIME = T;
+        Update_SUN();
+        Update_PHOTO();
+        Fun( Y, FIX, RCONST, P );
+        TIME = Told;
+       }/*  function fun ends here  */
+        
+
+    void JAC_CHEM(int N,KPP_REAL T,KPP_REAL Y[NVAR],KPP_REAL J[LU_NONZERO])
+       { 
+        KPP_REAL Told;
+        Told = TIME;
+        TIME = T;
+        Update_SUN();
+        Update_PHOTO();
+        Jac_SP( Y, FIX, RCONST, J );
+        TIME = Told;
+       }  
+        
+
+      INTEGRATE( KPP_REAL TIN, KPP_REAL TOUT )
+       {
+	
+        /*    TIN - Start Time		*/
+        /*    TOUT - End Time		*/
+   
+	int INFO[5];
+	forfun = &FUNC_CHEM;
+	forjac = &JAC_CHEM;	
+        INFO[0] = Autonomous;
+	ROS3(NVAR,TIN,TOUT,STEPMIN,STEPMAX,STEPMIN,VAR,ATOL,RTOL,INFO
+        ,forfun,forjac);
+       }	/* function integrate ends here  */
+     
+
+      
+int ROS3(int N,KPP_REAL T,KPP_REAL Tnext,KPP_REAL Hmin,KPP_REAL Hmax,
+KPP_REAL Hstart,KPP_REAL y[NVAR],KPP_REAL AbsTol[NVAR],KPP_REAL RelTol[NVAR],
+int INFO[5],void (*forfun)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) ,
+void (*forjac)(int,KPP_REAL,KPP_REAL [],KPP_REAL []) )
+  {
+    
+/*  
+
+       L-stable Rosenbrock 3(2), with 
+     strongly A-stable embedded formula for error control.  
+
+     All the arguments aggree with the KPP syntax.
+
+  INPUT ARGUMENTS:
+     y = Vector of (NVAR) concentrations, contains the
+         initial values on input
+     [T, Tnext] = the integration interval
+     Hmin, Hmax = lower and upper bounds for the selected step-size.
+          Note that for Step = Hmin the current computed
+          solution is unconditionally accepted by the error
+          control mechanism.
+     AbsTol, RelTol = (NVAR) dimensional vectors of 
+          componentwise absolute and relative tolerances.
+     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+          See the header below.
+     JAC_CHEM = name of routine that computes the Jacobian, in
+          sparse format. KPP syntax. See the header below.
+     Info(1) = 1  for  autonomous   system
+             = 0  for nonautonomous system 
+
+  OUTPUT ARGUMENTS:
+     y = the values of concentrations at Tend.
+     T = equals Tend on output.
+     Info(2) = # of FUNC_CHEM calls.
+     Info(3) = # of JAC_CHEM calls.
+     Info(4) = # of accepted steps.
+     Info(5) = # of rejected steps.
+    
+     Adrian Sandu, April 1996
+     The Center for Global and Regional Environmental Research
+*/
+
+      KPP_REAL K1[NVAR], K2[NVAR], K3[NVAR];
+      KPP_REAL F1[NVAR], JAC[LU_NONZERO];
+      KPP_REAL ghinv,uround,dround,c43,x1,x2,x3,ytol;
+      KPP_REAL gam,c21,c31,c32,b1,b2,b3,d1,d2,d3,a21,a31,a32,alpha2,alpha3,
+      		   g1,g2,g3;	 	
+      KPP_REAL ynew[NVAR];
+      KPP_REAL H, Hold, Tplus,tau;
+      KPP_REAL ERR, factor, facmax;
+      int n,nfcn,njac,Naccept,Nreject,i,j,ier;
+      char IsReject,Autonomous;
+
+
+/*     Initialization of counters, etc.		*/
+      Autonomous = (INFO[0] == 1);         
+      uround = (double)1.e-15;
+      dround = DSQRT(uround);
+      H = MAX( (double)1.e-8, Hstart);
+      Tplus = T;
+      IsReject = 0;
+      Naccept  = 0;
+      Nreject  = 0;
+      nfcn     = 0;
+      njac     = 0;
+      gam  =   (double)  (.43586652150845899941601945119356e+00);
+      c21  =   (double) -(.10156171083877702091975600115545e+01);
+      c31  =   (double)  (.40759956452537699824805835358067e+01);
+      c32  =   (double)  (.92076794298330791242156818474003e+01);
+       b1  =   (double)  (.10000000000000000000000000000000e+01);
+       b2  =   (double)  (.61697947043828245592553615689730e+01);
+       b3  =   (double) -(.42772256543218573326238373806514e+00);
+       d1  =   (double)  (.50000000000000000000000000000000e+00);
+       d2  =   (double) -(.29079558716805469821718236208017e+01);
+       d3  =   (double)  (.22354069897811569627360909276199e+00);
+       a21 =   (double) 1.e0;
+       a31 =   (double) 1.e0;
+       a32 =   (double) 0.e0;
+       alpha2 = gam;
+       alpha3 = gam;
+       g1  =   (double)  (.43586652150845899941601945119356e+00);
+       g2  =   (double)  (.24291996454816804366592249683314e+00);
+       g3  =   (double)  (.21851380027664058511513169485832e+01);
+
+
+/* === Starting the time loop ===      */
+
+while( T < Tnext )
+ {
+  ten :  
+       Tplus = T + H;
+       
+       if ( Tplus > Tnext ) 
+       {
+          H = Tnext - T;
+          Tplus = Tnext;
+       }
+
+       (*forjac)(NVAR, T, y, JAC);
+       
+       njac = njac+1;
+       ghinv = (double)-1.0e0/(gam*H);
+
+       for(j=0;j<LU_NONZERO;j++)
+           JAC[j] = -JAC[j];
+       
+     
+
+       for(j=0;j<NVAR;j++)
+           JAC[LU_DIAG[j]] = JAC[LU_DIAG[j]] - ghinv;
+	 	
+	
+	
+       ier = KppDecomp (JAC);
+ 
+       if ( ier != 0)
+       {
+        if( H > Hmin ) 
+  	{
+   	 H = (double)5.0e-1*H; 
+   	 goto ten;	   
+  	}
+  	else
+  	 {
+	  printf("IER <> 0 , H = %d", H);
+	 }  
+       }/* main ier if ends*/	
+		
+
+       (*forfun)(NVAR, T, y, F1);
+       
+
+/* ====== NONAUTONOMOUS CASE =============== */
+       if( Autonomous == 0 ) 
+       {
+         tau =(double) (dround*MAX( (double)1.0e-6, dabs(T) ) * signum(T) );
+
+         (*forfun)(NVAR, T+tau, y, K2);
+	 
+         nfcn=nfcn+1;
+         
+	 for(j=0;j<NVAR;j++)
+	     K3[j] = ( K2[j]-F1[j] )/tau;
+	   
+ 
+
+/* ----- STAGE 1 (NONAUTONOMOUS) ----- */
+         x1 = (double)g1*H;
+	 
+         for(j=0;j<NVAR;j++)
+	     K1[j] =  F1[j] + x1*K3[j];
+	    
+         KppSolve (JAC, K1);
+      
+/* ----- STAGE 2 (NONAUTONOMOUS) -----    */
+        for(j = 0;j<NVAR;j++)
+            ynew[j] = y[j] + K1[j]; 
+        
+       (*forfun)(NVAR, T+gam*H, ynew, F1);
+       nfcn=nfcn+1;
+       x1 = (double)(c21/H);
+       x2 = (double)(g2*H);
+       for(j = 0;j<NVAR;j++)
+           K2[j] = F1[j] + x1*K1[j] + x2*K3[j];
+	
+       KppSolve (JAC, K2);
+       
+/* ----- STAGE 3  (NONAUTONOMOUS) -----        */
+       x1 = (double)(c31/H);
+       x2 = (double)(c32/H);
+       x3 = (double)(g3*H);
+       for(j=0;j<NVAR;j++)
+           K3[j] = F1[j] + x1*K1[j] + x2*K2[j] + x3*K3[j];
+       
+       KppSolve (JAC, K3);
+      }/* "if" nonautonomous case ends here */	
+
+
+
+/* ====== AUTONOMOUS CASE ===============  */
+
+       else
+       {
+       
+/* ----- STAGE 1 (AUTONOMOUS) -----   */
+
+         for(j = 0;j < NVAR;j++)
+	     K1[j] =  F1[j]; 
+	  
+	 KppSolve (JAC, K1);
+  
+      
+/* ----- STAGE 2 (AUTONOMOUS) ----- */
+       for(j = 0;j < NVAR;j++)
+           ynew[j] = y[j] + K1[j];
+	
+	
+       (*forfun)(NVAR, T + gam*H, ynew, F1);
+       nfcn=nfcn+1;
+         x1 = (double)c21/H;
+         for(j = 0;j < NVAR;j++)
+	     K2[j] = F1[j] + x1*K1[j]; 
+         
+         KppSolve (JAC, K2);
+       
+/* ----- STAGE 3  (AUTONOMOUS) -----   */
+
+       x1 = (double)(c31/H);
+       x2 = (double)(c32/H);
+       for(j = 0;j < NVAR;j++)
+           K3[j] = F1[j] + x1*K1[j] + x2*K2[j];
+       
+       KppSolve (JAC, K3);
+
+       }/*  Autonomousous case ends here  */
+       
+       
+    /*   ---- The Solution ---      */
+
+        for(j = 0;j < NVAR;j++)
+	    ynew[j] = y[j] + b1*K1[j] + b2*K2[j] + b3*K3[j]; 
+        
+
+
+/* ====== Error estimation ========   */
+
+        ERR=(double)0.e0;
+        for(i=0;i<NVAR;i++)
+	{
+           ytol = AbsTol[i] + RelTol[i]*dabs(ynew[i]);
+           ERR = (double)(ERR+ pow( (double) ( (d1*K1[i]+d2*K2[i]+d3*K3[i])/ytol ) , 2 ));
+        }      
+        ERR = (double)MAX( uround, DSQRT( ERR/NVAR ) );
+
+/*
+this is the library i am linkin it to 
+[sdmehra@herbert small_strato]$ ldd small_strato
+        libm.so.6 => /lib/libm.so.6 (0x40015000)
+        libc.so.6 => /lib/libc.so.6 (0x40032000)
+       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)                                                             
+*/
+
+/* ======= Choose the stepsize ===============================   */
+
+        factor = 0.9/pow( ERR , (1.e0/3.e0) );
+        if(IsReject == 1)
+           facmax = (double)1.0;
+	    
+        else
+           facmax = (double)10.0;
+	 
+	    
+        factor = (double)MAX( 1.0e-1, MIN(factor,facmax) );
+        Hold = H;
+        H = (double)MIN( Hmax, MAX(Hmin,factor*H) );
+	    
+
+/* ======= Rejected/Accepted Step ============================   */
+
+        if ( (ERR > 1) && (Hold > Hmin) ) 
+	{
+          IsReject = 1;
+          Nreject  = Nreject+1;
+        }
+	else
+        {
+	  IsReject = 0;
+         
+	 for(i = 0;i < NVAR;i++)
+	     y[i]  = ynew[i];
+         	     
+          T = Tplus;     
+          Naccept = Naccept+1;
+
+	}/*   else should end here */
+        
+
+/* ======= End of the time loop ===============================  */
+  
+   } /*      while loop (T < Tnext) ends here    */
+     
+      
+/* ======= Output Information =================================   */
+      INFO[1] = nfcn;
+      INFO[2] = njac;
+      INFO[3] = Naccept;
+      INFO[4] = Nreject;
+      
+    } /* function rodas ends here   */     
+
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.def	(revision 3477)
@@ -0,0 +1,46 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros3
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER Autonomous
+      DOUBLE PRECISION STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+  int Autonomous;
+  double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=1e-4;
+  STEPMAX=3600.;
+  Autonomous = 0;
+  STEPSTART=STEPMIN;
+#ENDINLINE
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3.f	(revision 3477)
@@ -0,0 +1,304 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+
+        CALL ROS3(NVAR,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+
+      
+      SUBROUTINE ROS3(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+
+C       L-stable Rosenbrock 3(2), with 
+C     strongly A-stable embedded formula for error control.  
+C
+C     All the arguments aggree with the KPP syntax.
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of 
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  autonomous   system
+C             = 0  for nonautonomous system 
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals Tend on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C    
+C     Adrian Sandu, April 1996
+C     The Center for Global and Regional Environmental Research
+
+      KPP_REAL K1(NVAR), K2(NVAR), K3(NVAR)
+      KPP_REAL F1(NVAR), JAC(LU_NONZERO)
+      KPP_REAL Hmin,Hmax,Hnew,Hstart,ghinv,uround
+      KPP_REAL y(NVAR), ynew(NVAR)
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, elo
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL gam, c21, c31, c32, b1, b2, b3
+      KPP_REAL d1, d2, d3, a21, a31, a32
+      KPP_REAL alpha2, alpha3, g1, g2, g3
+      KPP_REAL tau, x1, x2, x3, dround, ytol
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+      
+      gam=   .43586652150845899941601945119356d+00
+      c21=  -.10156171083877702091975600115545d+01
+      c31=   .40759956452537699824805835358067d+01
+      c32=   .92076794298330791242156818474003d+01
+       b1=   .10000000000000000000000000000000d+01
+       b2=   .61697947043828245592553615689730d+01
+       b3=  -.42772256543218573326238373806514d+00
+       d1=   .50000000000000000000000000000000d+00
+       d2=  -.29079558716805469821718236208017d+01
+       d3=   .22354069897811569627360909276199d+00
+       a21 = 1.d0
+       a31 = 1.d0
+       a32 = 0.d0
+       alpha2 = gam
+       alpha3 = gam
+       g1=   .43586652150845899941601945119356d+00
+       g2=   .24291996454816804366592249683314d+00
+       g3=   .21851380027664058511513169485832d+01
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+
+C === Starting the time loop ===      
+ 10    continue  
+ 
+       Tplus = T + H
+       if ( Tplus .gt. Tnext ) then
+          H = Tnext - T
+          Tplus = Tnext
+       end if
+
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac+1
+       gHinv = -1.0d0/(gam*H)
+       do 15 j=1,LU_NONZERO
+         JAC(j) = -JAC(j) 
+ 15    continue
+       do 20 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) - gHinv
+ 20    continue
+       CALL KppDecomp (JAC, ier)
+
+       if (ier.ne.0) then
+         if ( H.gt.Hmin) then
+            H = 5.0d-1*H
+            go to 10
+         else
+            print *,'IER <> 0, H=',H
+            stop
+         end if      
+       end if  
+       
+       CALL FUNC_CHEM(NVAR, T, y, F1)
+
+C ====== NONAUTONOMOUS CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         do 30 j = 1,NVAR
+           K3(j) = ( K2(j)-F1(j) )/tau
+ 30      continue
+ 
+C ----- STAGE 1 (NONAUTONOMOUS) -----
+         x1 = g1*H
+         do 35 j = 1,NVAR
+           K1(j) =  F1(j) + x1*K3(j)
+ 35      continue
+         CALL KppSolve (JAC, K1)
+      
+C ----- STAGE 2 (NONAUTONOMOUS) -----
+       do 40 j = 1,NVAR
+         ynew(j) = y(j) + K1(j) 
+ 40    continue
+       CALL FUNC_CHEM(NVAR, T+gam*H, ynew, F1)
+       nfcn=nfcn+1
+       x1 = c21/H
+       x2 = g2*H
+       do 45 j = 1,NVAR
+         K2(j) = F1(j) + x1*K1(j) + x2*K3(j)
+ 45    continue
+       CALL KppSolve (JAC, K2)
+       
+C ----- STAGE 3  (NONAUTONOMOUS) -----
+       x1 = c31/H
+       x2 = c32/H
+       x3 = g3*H
+       do 50 j = 1,NVAR
+         K3(j) = F1(j) + x1*K1(j) + x2*K2(j) + x3*K3(j)
+ 50    continue
+       CALL KppSolve (JAC, K3)
+
+
+C ====== AUTONOMOUS CASE ===============
+       ELSE
+
+C ----- STAGE 1 (AUTONOMOUS) -----
+         do 60 j = 1,NVAR
+           K1(j) =  F1(j) 
+ 60      continue
+         CALL KppSolve (JAC, K1)
+      
+C ----- STAGE 2 (AUTONOMOUS) -----
+       do 65 j = 1,NVAR
+         ynew(j) = y(j) + K1(j) 
+ 65    continue
+       CALL FUNC_CHEM(NVAR, T + gam*H, ynew, F1)
+       nfcn=nfcn+1
+         x1 = c21/H
+         do 70 j = 1,NVAR
+           K2(j) = F1(j) + x1*K1(j) 
+ 70      continue
+         CALL KppSolve (JAC, K2)
+       
+C ----- STAGE 3  (AUTONOMOUS) -----
+       x1 = c31/H
+       x2 = c32/H
+       do 90 j = 1,NVAR
+         K3(j) = F1(j) + x1*K1(j) + x2*K2(j)
+ 90    continue
+       CALL KppSolve (JAC, K3)
+
+       END  IF ! Autonomousous
+
+C ---- The Solution ---
+
+       do 120 j = 1,NVAR
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) 
+ 120   continue
+
+
+C ====== Error estimation ========
+
+        ERR=0.d0
+        do 130 i=1,NVAR
+           ytol = AbsTol(i) + RelTol(i)*DMAX1(DABS(y(i)),DABS(ynew(i)))
+           ERR=ERR+((d1*K1(i)+d2*K2(i)+d3*K3(i))/ytol)**2
+ 130    continue      
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 140 i=1,NVAR
+             y(i)  = ynew(i)
+ 140      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+
+
+C ======= End of the time loop ===============================
+      if ( T .lt. Tnext ) go to 10
+     
+      
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+      
+      RETURN 
+      END        
+
+  
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+  
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3_ddm.def	(revision 3477)
@@ -0,0 +1,51 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros3_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros3_ddm.f	(revision 3477)
@@ -0,0 +1,503 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL   FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+
+        CALL ROS3_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+
+      
+      SUBROUTINE ROS3_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INCLUDE 'KPP_ROOT_sparse.h'
+
+C       L-stable Rosenbrock 3(2), with 
+C     strongly A-stable embedded formula for error control.  
+C
+C Direct decoupled computation of sensitivities.
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C     All the arguments aggree with the KPP syntax.
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of 
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system 
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at TEND.
+C     T = equals TEND on output.
+C     Info(2) = # of FUNC_CHEM calls.
+C     Info(3) = # of JAC_CHEM calls.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C    
+C     Adrian Sandu, April 1996
+C     The Center for Global and Regional Environmental Research
+      INTEGER     NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR*(NSENSIT+1))
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DFDP(NVAR*NSENSIT), DFDPDT(NVAR*NSENSIT)
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL Fv(NVAR), Hv(NVAR)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, Hnew, elo
+      KPP_REAL ERR, factor, facmax
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject,Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM, HESS_CHEM
+      
+      KPP_REAL gamma, c21, c31,c32,b1,b2,b3,d1,d2,d3,a21,a31,a32
+      KPP_REAL alpha2, alpha3, g1, g2, g3, x1, x2, x3, ytol
+      KPP_REAL dround, tau
+      
+      gamma= .43586652150845899941601945119356d+00
+      c21=  -.10156171083877702091975600115545d+01
+      c31=   .40759956452537699824805835358067d+01
+      c32=   .92076794298330791242156818474003d+01
+       b1=   .10000000000000000000000000000000d+01
+       b2=   .61697947043828245592553615689730d+01
+       b3=  -.42772256543218573326238373806514d+00
+       d1=   .50000000000000000000000000000000d+00
+       d2=  -.29079558716805469821718236208017d+01
+       d3=   .22354069897811569627360909276199d+00
+       a21 = 1.d0
+       a31 = 1.d0
+       a32 = 0.d0
+       alpha2 = gamma
+       g1=   .43586652150845899941601945119356d+00
+       g2=   .24291996454816804366592249683314d+00
+       g3=   .21851380027664058511513169485832d+01
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+
+
+C === Starting the time loop ===      
+ 10    CONTINUE  
+
+C ====== Initial Function, Jacobian, and Hessian values ===============
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       Nfcn = Nfcn + 1
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       Njac = Njac + 1
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+       
+C ====== Time derivatives for NONAutonomousous CASE ===============
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-Fv(j) )/tau
+ 20      CONTINUE
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 40 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 40      CONTINUE
+       END IF
+ 
+       
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) then
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+
+       gHinv = 1.0d0/(gamma*H)
+       DO 50 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j) 
+ 50    CONTINUE
+       DO 60 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + gHinv
+ 60    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+
+       IF (ier.NE.0) THEN
+         IF ( H.GT.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'IER <> 0, H=',H
+            STOP
+         END IF      
+       END IF  
+       
+       Autonomous = .true.
+       
+C ------------------------------- STAGE 1 --------------------------------------
+       DO 70 j = 1,NVAR
+           K1(j) =  Fv(j) 
+ 70    CONTINUE
+       IF (.NOT.Autonomous) THEN
+         x1 = gamma*H
+         DO 80 j = 1,NVAR
+            K1(j) = K1(j) + x1*DFDT(j)
+ 80     CONTINUE       
+       END IF 
+       CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 110 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K1(1), Hv )
+	  DO 90 j=1,NVAR
+	    K1(i*NVAR+j) = K1(i*NVAR+j) + Hv(j)
+ 90	  CONTINUE	    
+          IF (.NOT. Autonomous) THEN
+	    DO 100 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + x1*DFDT(i*NVAR+j)
+ 100        CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 44 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 44        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 110   CONTINUE
+      
+C ------------------------------- STAGE 2 --------------------------------------
+       DO 120 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a21*K1(j) 
+ 120   CONTINUE
+       CALL FUNC_CHEM(NVAR, T + alpha2*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha3*H, ynew, DFDP)
+       END IF	  
+       nfcn=nfcn+1
+       x1 = c21/H
+       DO 130 j = 1,NVAR
+           K2(j) = Fv(j) + x1*K1(j) 
+ 130   CONTINUE
+       IF (.NOT.Autonomous) THEN
+         x2 = g2*H
+         DO 140 j = 1,NVAR
+            K2(j) = K2(j) + x2*DFDT(j)
+ 140     CONTINUE       
+       END IF 
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+             
+       CALL JAC_CHEM(NVAR, T+alpha2*H, ynew, JAC)
+       njac=njac+1
+       DO 170 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K2(1), Hv )
+          DO 150 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + x1*K1(i*NVAR+j) 
+     &                          + Hv(j)
+ 150      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 160 j=1,NVAR
+	        K2(i*NVAR+j) = K2(i*NVAR+j) + x2*DFDT(i*NVAR+j)
+ 160         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 165 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 165        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 170   CONTINUE
+ 
+C ------------------------------- STAGE 3  --------------------------------------
+       x1 = c31/H
+       x2 = c32/H
+       DO 180 j = 1,NVAR
+         K3(j) = Fv(j) + x1*K1(j) + x2*K2(j)
+ 180   CONTINUE
+       IF (.NOT.Autonomous) THEN
+         x3 = g3*H
+         DO 190 j = 1,NVAR
+            K3(j) = K3(j) + x3*DFDT(j)
+ 190     CONTINUE       
+       END IF 
+       CALL KppSolve (AJAC, K3)
+C               --- If  derivative w.r.t. parameters
+	 IF (DDMTYPE .EQ. 1) THEN
+	    CALL DJACDPAR(NVAR, NSENSIT, T, y, K3(1), DJDP)
+	 END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       DO 220 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K3(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K3(1), Hv )
+          DO 200 j = 1,NVAR
+	     K3(i*NVAR+j) = K3(i*NVAR+j) +x1*K1(i*NVAR+j) 
+     &                       + x2*K2(i*NVAR+j) + Hv(j)
+ 200      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 210 j=1,NVAR
+	        K3(i*NVAR+j) = K3(i*NVAR+j) + x3*DFDT(i*NVAR+j)
+ 210         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+             DO 215 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 215        CONTINUE	  
+	  END IF	 
+C               --- End of derivative w.r.t. parameters
+          CALL KppSolve (AJAC, K3(i*NVAR+1))
+ 220   CONTINUE
+
+C ------------------------------ The Solution ---
+
+       DO 230 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) 
+ 230   CONTINUE
+
+
+C ====== Error estimation ========
+
+        ERR=0.d0
+        DO 240 i=1,NVAR
+           ytol = AbsTol(i) + RelTol(i)*DABS(ynew(i))
+           ERR=ERR+((d1*K1(i)+d2*K2(i)+d3*K3(i))/ytol)**2
+ 240    CONTINUE      
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 3.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1 
+	  GO TO 10
+        ELSE
+          DO 250 j=1,NVAR*(NSENSIT+1)
+             y(j)  = ynew(j)
+ 250      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize IF previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+
+
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+     
+      
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+      
+      RETURN 
+      END        
+
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y,  FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4.def	(revision 3477)
@@ -0,0 +1,63 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros4
+
+#INLINE F_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.e-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER :: Autonomous
+      DOUBLE PRECISION :: STEPSTART
+#ENDINLINE
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+int Autonomous;
+double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
+
+#INLINE MATLAB_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4.f	(revision 3477)
@@ -0,0 +1,334 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS4(NVAR,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,VAR,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS4(N,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Four Stages, Fourth Order L-stable Rosenbrock Method, 
+C     with embedded L-stable, third order method for error control
+C     Simplified version of E. Hairer's atmros4; the coefficients are slightly
+C     different
+C
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of (NVAR) concentrations, contains the
+C         initial values on input
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C     Hstart = The last accepted stepsize
+C 
+C    Adrian Sandu, December 2001
+C 
+      KPP_REAL K1(NVAR), K2(NVAR), K3(NVAR), K4(NVAR)
+      KPP_REAL F1(NVAR)
+      KPP_REAL DFDT(NVAR)
+      KPP_REAL JAC(LU_NONZERO)
+      KPP_REAL Hmin,Hmax,Hstart
+      KPP_REAL y(NVAR), ynew(NVAR)
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, H, Hnew, Tplus
+      KPP_REAL elo,ghinv,uround
+      KPP_REAL ERR, factor, facmax
+      KPP_REAL w, e, dround, tau
+      KPP_REAL hgam1, hgam2, hgam3, hgam4
+      KPP_REAL hc21, hc31, hc32, hc41, hc42, hc43
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL   FUNC_CHEM, JAC_CHEM                                                                                                
+
+
+C   The method coefficients
+      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+      PARAMETER ( gamma  =  0.5728200000000000D+00 )
+      PARAMETER ( gamma2 = -0.1769193891319233D+01 ) 
+      PARAMETER ( gamma3 =  0.7592633437920482D+00 ) 
+      PARAMETER ( gamma4 = -0.1049021087100450D+00 ) 
+      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+      PARAMETER (  a21 = 0.2000000000000000D+01  )   
+      PARAMETER (  a31 = 0.1867943637803922D+01  )   
+      PARAMETER (  a32 = 0.2344449711399156D+00  )   
+      DOUBLE PRECISION alpha2, alpha3
+      PARAMETER (  alpha2  = 0.1145640000000000D+01  )   
+      PARAMETER (  alpha3  = 0.6552168638155900D+00  )   
+      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+      PARAMETER (  c21  = -0.7137615036412310D+01  ) 
+      PARAMETER (  c31  =  0.2580708087951457D+01  ) 
+      PARAMETER (  c32  =  0.6515950076447975D+00  ) 
+      PARAMETER (  c41  = -0.2137148994382534D+01  ) 
+      PARAMETER (  c42  = -0.3214669691237626D+00  ) 
+      PARAMETER (  c43  = -0.6949742501781779D+00  ) 
+      DOUBLE PRECISION b1, b2, b3, b4
+      PARAMETER (  b1 = 0.2255570073418735D+01  ) 
+      PARAMETER (  b2 = 0.2870493262186792D+00  ) 
+      PARAMETER (  b3 = 0.4353179431840180D+00  ) 
+      PARAMETER (  b4 = 0.1093502252409163D+01 )  
+      DOUBLE PRECISION d1, d2, d3, d4
+      PARAMETER (  d1 = -0.2815431932141155D+00  ) 
+      PARAMETER (  d2 = -0.7276199124938920D-01  ) 
+      PARAMETER (  d3 = -0.1082196201495311D+00  ) 
+      PARAMETER (  d4 = -0.1093502252409163D+01  )  
+ 
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+  
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function and Jacobian values                                                                                                                            
+       CALL FUNC_CHEM( T, y, F1 )
+       CALL JAC_CHEM( T, y, JAC )
+ 
+C              The time derivative for non-Autonomous case                                                                                                                            
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d-6, DABS(T) ), T)
+         CALL FUNC_CHEM( T+tau, y, K2 )
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-F1(j) )/tau
+ 20      CONTINUE
+       END IF
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       Njac = Njac+1
+       ghinv = 1.0d0/(gamma*H)
+       DO 30 j=1,LU_NONZERO
+         JAC(j) = -JAC(j)
+ 30    CONTINUE
+       DO 40 j=1,NVAR
+         JAC(LU_DIAG(j)) = JAC(LU_DIAG(j)) + ghinv
+ 40    CONTINUE
+       CALL KppDecomp (JAC, ier)
+C 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'ROS4: Singular factorization at T=',T,'; H=',H
+            STOP
+         END IF
+       END IF
+                                                                                                                            
+ 
+C ------------ STAGE 1-------------------------
+       DO 50 j = 1,NVAR
+         K1(j) =  F1(j)
+ 50    CONTINUE
+       IF (.NOT. Autonomous) THEN
+          hgam1 = H*gamma
+	  DO 60 j=1,NVAR
+	    K1(j) = K1(j) + hgam1*DFDT(j)	    
+ 60	  CONTINUE
+       END IF
+       CALL KppSolve (JAC, K1)
+ 
+C ----------- STAGE 2 -------------------------
+       DO 70 j = 1,NVAR
+         ynew(j) = y(j) + a21*K1(j)
+ 70    CONTINUE
+       CALL FUNC_CHEM( T+alpha2*H, ynew, F1)
+       nfcn=nfcn+1
+       hc21 = c21/H
+       DO 80 j = 1,NVAR
+         K2(j) = F1(j) + hc21*K1(j)
+ 80    CONTINUE
+       IF (.NOT. Autonomous) THEN
+         hgam2 = H*gamma2
+	 DO 90 j=1,NVAR
+	    K2(j) = K2(j) + hgam2*DFDT(j)	    
+ 90	 CONTINUE
+       END IF
+       CALL KppSolve (JAC, K2)
+ 
+ 
+C ------------ STAGE 3 -------------------------
+       DO 100 j = 1,NVAR
+         ynew(j) = y(j) + a31*K1(j) + a32*K2(j)
+ 100   CONTINUE
+       CALL FUNC_CHEM( T+alpha3*H, ynew, F1)
+       nfcn=nfcn+1
+       hc31 = c31/H
+       hc32 = c32/H
+       DO 110 j = 1,NVAR
+         K3(j) = F1(j) + hc31*K1(j) + hc32*K2(j)
+ 110   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         hgam3 = H*gamma3
+	 DO 120 j=1,NVAR
+	    K3(j) = K3(j) + hgam3*DFDT(j)	    
+ 120     CONTINUE
+       END IF
+       CALL KppSolve (JAC, K3)
+ 
+C ------------ STAGE 4 -------------------------
+C              Note: uses the same function value as stage 3
+       hc41 = c41/H
+       hc42 = c42/H
+       hc43 = c43/H
+       DO 140 j = 1,NVAR
+         K4(j) = F1(j) + hc41*K1(j) + hc42*K2(j) + hc43*K3(j)
+ 140   CONTINUE
+       IF (.NOT. Autonomous) THEN
+          hgam4 = H*gamma4
+	  DO 150 j=1,NVAR
+	    K4(j) = K4(j) + hgam4*DFDT(j)
+ 150      CONTINUE
+       END IF
+       CALL KppSolve (JAC, K4)
+ 
+
+
+C ---- The Solution ---
+       DO 160 j = 1,NVAR
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) + b4*K4(j)
+ 160   CONTINUE
+ 
+ 
+C ====== Error estimation ========
+ 
+        ERR=0.d0
+        DO 170 j = 1,NVAR
+           w = AbsTol(j) + RelTol(j)*DMAX1(DABS(y(j)),DABS(ynew(j)))
+	   e = d1*K1(j) + d2*K2(j) + d3*K3(j) + d4*K4(j)
+           ERR = ERR + ( e/w )**2
+ 170    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+     
+        elo    = 4.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 180 i=1,NVAR
+             y(i)  = ynew(i)
+ 180      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+      SUBROUTINE FUNC_CHEM( T, Y, P )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM( T, Y, J )
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4_ddm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4_ddm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4_ddm.def	(revision 3477)
@@ -0,0 +1,58 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE ros4_ddm
+#HESSIAN ON 
+
+#INLINE F77_DECL_INT
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+#INLINE F90_DECL_INT
+      INTEGER Autonomous
+      DOUBLE PRECISION STEPSTART
+#ENDINLINE
+
+#INLINE F90_INIT_INT
+        STEPMIN=1.0E-4
+        STEPMAX=3600.
+        Autonomous = 0
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+#INLINE C_DECL_INT
+    extern int Autonomous;
+    extern double STEPSTART;
+#ENDINLINE
+ 
+#INLINE C_DATA_INT
+    int Autonomous;
+    double STEPSTART;
+#ENDINLINE
+
+#INLINE C_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
+
+#INLINE MATLAB_INIT_INT
+        STEPMIN = 0.0001;
+        STEPMAX = 3600.0;
+        Autonomous = 0;
+        STEPSTART = STEPMIN;
+#ENDINLINE                                                                     
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4_ddm.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4_ddm.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/ros4_ddm.f	(revision 3477)
@@ -0,0 +1,615 @@
+      SUBROUTINE INTEGRATE( NSENSIT, Y, TIN, TOUT )
+ 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+C Y - Concentrations and Sensitivities
+      KPP_REAL Y(NVAR*(NSENSIT+1))
+C ---  Note: Y contains: (1:NVAR) concentrations, followed by
+C ---                   (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C ---                   etc.,  followed by          
+C ---                   (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+
+      INTEGER    INFO(5)
+
+      EXTERNAL FUNC_CHEM, JAC_CHEM
+
+      INFO(1) = Autonomous
+ 
+      CALL ROS4_DDM(NVAR,NSENSIT,TIN,TOUT,STEPMIN,STEPMAX,
+     +                   STEPMIN,Y,ATOL,RTOL,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+ 
+
+      RETURN
+      END
+  
+
+ 
+ 
+      SUBROUTINE ROS4_DDM(N,NSENSIT,T,Tnext,Hmin,Hmax,Hstart,
+     +                   y,AbsTol,RelTol,
+     +                   Info,FUNC_CHEM,JAC_CHEM)
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'                                                                                                  
+      INCLUDE 'KPP_ROOT_sparse.h'                                                                                                  
+C
+C  Four Stages, Fourth Order L-stable Rosenbrock Method, 
+C     with embedded L-stable, third order method for error control
+C     Simplified version of E. Hairer's atmros4; the coefficients are slightly different
+C
+C Direct decoupled computation of sensitivities.
+C The global variable DDMTYPE distinguishes between:
+C      DDMTYPE = 0 : sensitivities w.r.t. initial values
+C      DDMTYPE = 1 : sensitivities w.r.t. parameters
+C
+C  INPUT ARGUMENTS:
+C     y = Vector of:   (1:NVAR) concentrations, followed by
+C                      (1:NVAR) sensitivities w.r.t. first parameter, followed by
+C                       etc.,  followed by          
+C                      (1:NVAR) sensitivities w.r.t. NSENSIT's parameter
+C         (y contains initial values at input, final values at output)
+C     [T, Tnext] = the integration interval
+C     Hmin, Hmax = lower and upper bounds for the selected step-size.
+C          Note that for Step = Hmin the current computed
+C          solution is unconditionally accepted by the error
+C          control mechanism.
+C     AbsTol, RelTol = (NVAR) dimensional vectors of
+C          componentwise absolute and relative tolerances.
+C     FUNC_CHEM = name of routine of derivatives. KPP syntax.
+C          See the header below.
+C     JAC_CHEM = name of routine that computes the Jacobian, in
+C          sparse format. KPP syntax. See the header below.
+C     Info(1) = 1  for  Autonomous   system
+C             = 0  for nonAutonomous system
+C
+C  OUTPUT ARGUMENTS:
+C     y = the values of concentrations and sensitivities at Tend.
+C     T = equals TENDon output.
+C     Info(2) = # of FUNC_CHEM CALLs.
+C     Info(3) = # of JAC_CHEM CALLs.
+C     Info(4) = # of accepted steps.
+C     Info(5) = # of rejected steps.
+C 
+C    Adrian Sandu, December 2001
+C 
+
+
+      INTEGER NSENSIT
+      KPP_REAL y(NVAR*(NSENSIT+1)), ynew(NVAR*(NSENSIT+1))
+      KPP_REAL K1(NVAR*(NSENSIT+1))
+      KPP_REAL K2(NVAR*(NSENSIT+1))
+      KPP_REAL K3(NVAR*(NSENSIT+1))
+      KPP_REAL K4(NVAR*(NSENSIT+1))
+      KPP_REAL Fv(NVAR), Hv(NVAR)
+      KPP_REAL DFDT(NVAR*(NSENSIT+1))
+      KPP_REAL DFDP(NVAR*NSENSIT), DFDPDT(NVAR*NSENSIT)
+      KPP_REAL DJDP(NVAR*NSENSIT)
+      KPP_REAL JAC(LU_NONZERO), AJAC(LU_NONZERO)
+      KPP_REAL DJDT(LU_NONZERO)
+      KPP_REAL HESS(NHESS)
+      KPP_REAL Hmin,Hmax,Hstart,ghinv,uround
+      KPP_REAL AbsTol(NVAR), RelTol(NVAR)
+      KPP_REAL T, Tnext, Tplus, H, Hnew, elo
+      KPP_REAL ERR, factor, facmax, dround, tau
+      KPP_REAL w, e, beta1, beta2, beta3, beta4
+      
+      INTEGER    n,nfcn,njac,Naccept,Nreject,i,j,ier
+      INTEGER    Info(5)
+      LOGICAL    IsReject, Autonomous
+      EXTERNAL    FUNC_CHEM, JAC_CHEM, HESS_CHEM                                                                                                
+
+
+C   The method coefficients
+C      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+C      PARAMETER ( gamma = 0.57281606D0  )
+C      PARAMETER ( gamma2 = -1.769177067112013949170520D0  ) 
+C      PARAMETER ( gamma3 =  0.759293964293209853670967D0  ) 
+C      PARAMETER ( gamma4 = -0.104894621490955803206743D0  ) 
+C      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+C      PARAMETER (  a21 = 2.00000000000000000000000D0  )   
+C      PARAMETER (  a31 = 1.86794814949823713234476D0  )   
+C      PARAMETER (  a32 = 0.23444556851723885002322D0  )   
+C      DOUBLE PRECISION alpha2, alpha3, alpha4 
+C      PARAMETER (  alpha2  = 1.145632120D0  )   
+C      PARAMETER (  alpha3  = 0.655214975973133829477748D0  )   
+C      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+C      PARAMETER (  c21  = -7.137649943349979830369260D0  ) 
+C      PARAMETER (  c31  =  2.580923666509657714488050D0  ) 
+C      PARAMETER (  c32  =  0.651629887302032023387417D0  ) 
+C      PARAMETER (  c41  = -2.137115266506619116806370D0  ) 
+C      PARAMETER (  c42  = -0.321469531339951070769241D0  ) 
+C      PARAMETER (  c43  = -0.694966049282445225157329D0  ) 
+C      DOUBLE PRECISION m1, m2, m3, m4, mhat1, mhat2, mhat3, mhat4
+C      PARAMETER (  m1 = 2.255566228604565243728840D0  ) 
+C      PARAMETER (  m2 = 0.287055063194157607662630D0  ) 
+C      PARAMETER (  m3 = 0.435311963379983213402707D0  ) 
+C      PARAMETER (  m4 = 1.093507656403247803214820D0  )  
+C      PARAMETER (  mhat1 = 2.068399160527583734258670D0  ) 
+C      PARAMETER (  mhat2 = 0.238681352067532797956493D0  ) 
+C      PARAMETER (  mhat3 = 0.363373345435391708261747D0  ) 
+C      PARAMETER (  mhat4 = 0.366557127936155144309163D0  ) 
+C      DOUBLE PRECISION e1, e2, e3, e4
+c      PARAMETER (  e1 = 1.8716706807698191283861888D-01  ) 
+c      PARAMETER (  e2 = 4.8373711126624835410225955D-02  ) 
+c      PARAMETER (  e3 = 7.1938617944591554120847832D-02  ) 
+c      PARAMETER (  e4 = 7.2695052846709262706070831D-01 )  
+C      PARAMETER (  e1 = -0.2815431932141155D+00  ) 
+C      PARAMETER (  e2 = -0.7276199124938920D-01  ) 
+C      PARAMETER (  e3 = -0.1082196201495311D+00  ) 
+C      PARAMETER (  e4 = -0.1093502252409163D+01  )  
+C   The method coefficients
+      DOUBLE PRECISION gamma, gamma2, gamma3, gamma4
+      PARAMETER ( gamma  =  0.5728200000000000D+00 )
+      PARAMETER ( gamma2 = -0.1769193891319233D+01 ) 
+      PARAMETER ( gamma3 =  0.7592633437920482D+00 ) 
+      PARAMETER ( gamma4 = -0.1049021087100450D+00 ) 
+      DOUBLE PRECISION a21, a31, a32, a41, a42, a43
+      PARAMETER (  a21 = 0.2000000000000000D+01  )   
+      PARAMETER (  a31 = 0.1867943637803922D+01  )   
+      PARAMETER (  a32 = 0.2344449711399156D+00  )   
+      DOUBLE PRECISION alpha2, alpha3
+      PARAMETER (  alpha2  = 0.1145640000000000D+01  )   
+      PARAMETER (  alpha3  = 0.6552168638155900D+00  )   
+      DOUBLE PRECISION c21, c31, c32, c41, c42, c43
+      PARAMETER (  c21  = -0.7137615036412310D+01  ) 
+      PARAMETER (  c31  =  0.2580708087951457D+01  ) 
+      PARAMETER (  c32  =  0.6515950076447975D+00  ) 
+      PARAMETER (  c41  = -0.2137148994382534D+01  ) 
+      PARAMETER (  c42  = -0.3214669691237626D+00  ) 
+      PARAMETER (  c43  = -0.6949742501781779D+00  ) 
+      DOUBLE PRECISION b1, b2, b3, b4
+      PARAMETER (  b1 = 0.2255570073418735D+01  ) 
+      PARAMETER (  b2 = 0.2870493262186792D+00  ) 
+      PARAMETER (  b3 = 0.4353179431840180D+00  ) 
+      PARAMETER (  b4 = 0.1093502252409163D+01 )  
+      DOUBLE PRECISION d1, d2, d3, d4
+      PARAMETER (  d1 = -0.2815431932141155D+00  ) 
+      PARAMETER (  d2 = -0.7276199124938920D-01  ) 
+      PARAMETER (  d3 = -0.1082196201495311D+00  ) 
+      PARAMETER (  d4 = -0.1093502252409163D+01  )  
+
+
+c     Initialization of counters, etc.
+      Autonomous = Info(1) .EQ. 1
+      uround = 1.d-15
+      dround = DSQRT(uround)
+      IF (Hmax.le.0.D0) THEN
+          Hmax = DABS(Tnext-T)
+      END IF	  
+      H = DMAX1(1.d-8, Hstart)
+      Tplus = T
+      IsReject = .false.
+      Naccept  = 0
+      Nreject  = 0
+      Nfcn     = 0
+      Njac     = 0
+ 
+C === Starting the time loop ===
+ 10    CONTINUE
+  
+       Tplus = T + H
+       IF ( Tplus .gt. Tnext ) THEN
+          H = Tnext - T
+          Tplus = Tnext
+       END IF
+ 
+C              Initial Function, Jacobian, and Hessian Values
+       CALL FUNC_CHEM(NVAR, T, y, Fv)
+       CALL JAC_CHEM(NVAR, T, y, JAC)
+       CALL HESS_CHEM( NVAR, T, y, HESS )
+       IF (DDMTYPE .EQ. 1) THEN
+          CALL DFUNDPAR(NVAR, NSENSIT, T, y, DFDP)
+       END IF	  
+ 
+C              The time derivatives for non-Autonomous case                                                                                                                            
+       IF (.not. Autonomous) THEN
+         tau = DSIGN(dround*DMAX1( 1.0d0, DABS(T) ), T)
+         CALL FUNC_CHEM(NVAR, T+tau, y, K2)
+         CALL JAC_CHEM(NVAR, T+tau, y, AJAC)
+         nfcn=nfcn+1
+         DO 20 j = 1,NVAR
+           DFDT(j) = ( K2(j)-Fv(j) )/tau
+ 20      CONTINUE
+         DO 30 j = 1,LU_NONZERO
+           DJDT(j) = ( AJAC(j)-JAC(j) )/tau
+ 30      CONTINUE
+         DO 35 i=1,NSENSIT
+	    CALL Jac_SP_Vec (DJDT,y(i*NVAR+1),DFDT(i*NVAR+1))
+ 35      CONTINUE
+       END IF
+ 
+ 11    CONTINUE  ! From here we restart after a rejected step
+ 
+C              Form the Prediction matrix and compute its LU factorization                                                                                                                           
+       Njac = Njac+1
+       ghinv = 1.0d0/(gamma*H)
+       DO 40 j=1,LU_NONZERO
+         AJAC(j) = -JAC(j)
+ 40    CONTINUE
+       DO 50 j=1,NVAR
+         AJAC(LU_DIAG(j)) = AJAC(LU_DIAG(j)) + ghinv
+ 50    CONTINUE
+       CALL KppDecomp (AJAC, ier)
+C 
+       IF (ier.ne.0) THEN
+         IF ( H.gt.Hmin) THEN
+            H = 5.0d-1*H
+            GO TO 10
+         ELSE
+            PRINT *,'ROS4: Singular factorization at T=',T,'; H=',H
+            STOP
+         END IF
+       END IF
+                                                                                                                            
+C ------------ STAGE 1-------------------------
+       DO 60 j = 1,NVAR
+         K1(j) =  Fv(j)
+ 60    CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta1 = H*gamma
+	  DO 70 j=1,NVAR
+	    K1(j) = K1(j) + beta1*DFDT(j)	    
+ 70	  CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K1)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K1(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+
+       DO 100 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,y(i*NVAR+1),K1(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K1(1), Hv )
+	  DO 80 j=1,NVAR
+	    K1(i*NVAR+j) = K1(i*NVAR+j) + Hv(j)
+ 80	  CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	    DO 90 j=1,NVAR
+	      K1(i*NVAR+j) = K1(i*NVAR+j) + beta1*DFDT(i*NVAR+j)
+ 90         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 95 j = 1,NVAR
+	       K1(i*NVAR+j) = K1(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 95        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K1(i*NVAR+1))
+ 100   CONTINUE
+ 
+C ----------- STAGE 2 -------------------------
+       DO 110 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a21*K1(j)
+ 110   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha2*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha2*H, ynew, DFDP)
+       END IF	 
+       nfcn=nfcn+1
+       beta1 = c21/H
+       DO 120 j = 1,NVAR
+         K2(j) = Fv(j) + beta1*K1(j)
+ 120   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta2 = H*gamma2
+	 DO 130 j=1,NVAR
+	    K2(j) = K2(j) + beta2*DFDT(j)	    
+ 130     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K2)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K2(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha2*H, ynew, JAC)
+       njac=njac+1
+       DO 160 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K2(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K2(1), Hv )
+          DO 140 j = 1,NVAR
+	     K2(i*NVAR+j) = K2(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                          + Hv(j)
+ 140      CONTINUE	
+          IF (.NOT. Autonomous) THEN
+	     DO 150 j=1,NVAR
+	        K2(i*NVAR+j) = K2(i*NVAR+j) + beta2*DFDT(i*NVAR+j)
+ 150         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 155 j = 1,NVAR
+	       K2(i*NVAR+j) = K2(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 155        CONTINUE	  
+	  END IF
+C               --- End of derivative w.r.t. parameters	  	 
+          CALL KppSolve (AJAC, K2(i*NVAR+1))
+ 160   CONTINUE
+ 
+ 
+C ------------ STAGE 3 -------------------------
+       DO 170 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + a31*K1(j) + a32*K2(j)
+ 170   CONTINUE
+       CALL FUNC_CHEM(NVAR, T+alpha3*H, ynew, Fv)
+       IF (DDMTYPE .EQ. 1) THEN
+         CALL DFUNDPAR(NVAR, NSENSIT, T+alpha3*H, ynew, DFDP)
+       END IF	    
+       nfcn=nfcn+1
+       beta1 = c31/H
+       beta2 = c32/H
+       DO 180 j = 1,NVAR
+         K3(j) = Fv(j) + beta1*K1(j) + beta2*K2(j)
+ 180   CONTINUE
+       IF (.NOT. Autonomous) THEN
+         beta3 = H*gamma3
+	 DO 190 j=1,NVAR
+	    K3(j) = K3(j) + beta3*DFDT(j)	    
+ 190     CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K3)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K3(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       CALL JAC_CHEM(NVAR, T+alpha3*H, ynew, JAC)
+       njac=njac+1
+       DO 220 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K3(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K3(1), Hv )
+          DO 200 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + Hv(j)
+ 200      CONTINUE	 
+          IF (.NOT. Autonomous) THEN
+	     DO 210 j=1,NVAR
+	        K3(i*NVAR+j) = K3(i*NVAR+j) + beta3*DFDT(i*NVAR+j)
+ 210         CONTINUE
+          END IF
+C               --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 215 j = 1,NVAR
+	       K3(i*NVAR+j) = K3(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 215        CONTINUE	  
+	  END IF	 
+C               --- End of derivative w.r.t. parameters
+          CALL KppSolve (AJAC, K3(i*NVAR+1))
+ 220   CONTINUE
+ 
+C ------------ STAGE 4 -------------------------
+C              Note: uses the same function values as stage 3
+       beta1 = c41/H
+       beta2 = c42/H
+       beta3 = c43/H
+       DO 230 j = 1,NVAR
+         K4(j) = Fv(j) + beta1*K1(j) + beta2*K2(j) + beta3*K3(j)
+ 230   CONTINUE
+       IF (.NOT. Autonomous) THEN
+          beta4 = H*gamma4
+	  DO 240 j=1,NVAR
+	    K4(j) = K4(j) + beta4*DFDT(j)
+ 240      CONTINUE
+       END IF
+       CALL KppSolve (AJAC, K4)
+C               --- If  derivative w.r.t. parameters
+       IF (DDMTYPE .EQ. 1) THEN
+	  CALL DJACDPAR(NVAR, NSENSIT, T, y, K4(1), DJDP)
+       END IF
+C               --- End of derivative w.r.t. parameters	  	 
+       
+       njac=njac+1
+       DO 270 i=1,NSENSIT
+	  CALL Jac_SP_Vec (JAC,ynew(i*NVAR+1),K4(i*NVAR+1))
+	  CALL Hess_Vec ( HESS, y(i*NVAR+1), K4(1), Hv )
+          DO 250 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + beta1*K1(i*NVAR+j) 
+     &                       + beta2*K2(i*NVAR+j) + beta3*K3(i*NVAR+j)
+     &                       + Hv(j)
+ 250      CONTINUE
+          IF (.NOT. Autonomous) THEN
+	     DO 260 j=1,NVAR
+	        K4(i*NVAR+j) = K4(i*NVAR+j) + beta4*DFDT(i*NVAR+j)
+ 260         CONTINUE
+          END IF
+C --- If  derivative w.r.t. parameters
+	  IF (DDMTYPE .EQ. 1) THEN
+            DO 265 j = 1,NVAR
+	       K4(i*NVAR+j) = K4(i*NVAR+j) + DFDP((i-1)*NVAR+j) 
+     &                           + DJDP((i-1)*NVAR+j)
+ 265        CONTINUE	  
+	  END IF	 
+          CALL KppSolve (AJAC, K4(i*NVAR+1))
+ 270   CONTINUE
+
+
+C ---- The Solution ---
+       DO 280 j = 1,NVAR*(NSENSIT+1)
+         ynew(j) = y(j) + b1*K1(j) + b2*K2(j) + b3*K3(j) + b4*K4(j)
+ 280   CONTINUE
+ 
+ 
+C ====== Error estimation -- can be extended to control sensitivities too ========
+ 
+        ERR = 0.d0
+        DO 290 i=1,NVAR
+           w = AbsTol(i) + RelTol(i)*DMAX1(DABS(ynew(i)),DABS(y(i)))
+	   e = d1*K1(i) + d2*K2(i) + d3*K3(i) + d4*K4(i)
+           ERR = ERR + ( e/w )**2
+ 290    CONTINUE
+        ERR = DMAX1( uround, DSQRT( ERR/NVAR ) )
+ 
+C ======= Choose the stepsize ===============================
+ 
+        elo    = 4.0D0 ! estimator local order
+        factor = DMAX1(2.0D-1,DMIN1(6.0D0,ERR**(1.0D0/elo)/.9D0))
+        Hnew   = DMIN1(Hmax,DMAX1(Hmin, H/factor))
+ 
+C ======= Rejected/Accepted Step ============================
+ 
+        IF ( (ERR.gt.1).and.(H.gt.Hmin) ) THEN
+          IsReject = .true.
+	  H = DMIN1(H/10,Hnew)
+          Nreject  = Nreject+1
+        ELSE
+          DO 300 i=1,NVAR*(NSENSIT+1)
+             y(i)  = ynew(i)
+ 300      CONTINUE
+          T = Tplus
+	  IF (.NOT.IsReject) THEN
+	      H = Hnew   ! Do not increase stepsize if previos step was rejected
+	  END IF    
+          IsReject = .false.
+          Naccept = Naccept+1
+        END IF
+ 
+C ======= End of the time loop ===============================
+      IF ( T .lt. Tnext ) GO TO 10
+ 
+ 
+ 
+C ======= Output Information =================================
+      Info(2) = Nfcn
+      Info(3) = Njac
+      Info(4) = Naccept
+      Info(5) = Nreject
+      Hstart  = H
+ 
+      RETURN
+      END
+ 
+ 
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE DFUNDPAR(N, NSENSIT, T, Y, P)
+C ---  Computes the partial derivatives of FUNC_CHEM w.r.t. parameters 
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dFun_dRcoeff( Y,  FIX, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+ 
+      SUBROUTINE DJACDPAR(N, NSENSIT, T, Y, U, P)
+C ---  Computes the partial derivatives of JAC w.r.t. parameters times user vector U
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+C ---  NCOEFF, JCOEFF useful for derivatives w.r.t. rate coefficients    
+      INTEGER N
+      INTEGER NCOEFF, JCOEFF(NREACT)
+      COMMON /DDMRCOEFF/ NCOEFF, JCOEFF
+      
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), U(NVAR)
+      KPP_REAL   P(NVAR*NSENSIT)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+C
+      IF (DDMTYPE .EQ. 0) THEN
+C ---  Note: the values below are for sensitivities w.r.t. initial values;
+C ---       they may have to be changed for other applications
+        DO j=1,NSENSIT
+          DO i=1,NVAR
+	    P(i+NVAR*(j-1)) = 0.0D0
+	  END DO
+        END DO
+      ELSE	
+C ---  Example: the call below is for sensitivities w.r.t. rate coefficients;
+C ---       JCOEFF(1:NSENSIT) are the indices of the NSENSIT rate coefficients
+C ---       w.r.t. which one differentiates
+        CALL dJac_dRcoeff( Y,  FIX, U, NCOEFF, JCOEFF, P )
+      END IF
+      TIME = Told
+      RETURN
+      END
+ 
+ 
+      SUBROUTINE HESS_CHEM(N, T, Y, HESS)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), HESS(NHESS)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Hessian( Y,  FIX, RCONST, HESS )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
+
+
+
+
+                                                                                                                            
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/twostepj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/twostepj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/twostepj.def	(revision 3477)
@@ -0,0 +1,16 @@
+ 
+#FUNCTION SPLIT
+#JACOBIAN OFF
+#SPARSEDATA OFF
+#DOUBLE ON
+#INTFILE twostepj
+
+#INLINE F_INIT_INT
+        STEPMIN=0.0001
+        STEPMAX=60.
+#ENDINLINE
+
+#INLINE C_INIT_INT
+  STEPMIN=0.0001;
+  STEPMAX=60.;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/twostepj.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/twostepj.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/oldies/twostepj.f	(revision 3477)
@@ -0,0 +1,244 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      EXTERNAL ITER
+      KPP_REAL T
+      KPP_REAL V(NVAR), VOLD(NVAR), VNEW(NVAR)
+      KPP_REAL startdt, hmin, hmax, h 
+
+      INTEGER    INFO(5)
+
+      INFO(1) = Autonomous
+      h = hmin
+      
+c Number of Jacobi-Seidel iterations      
+      numit = 3   
+
+      
+      DO i=1,NVAR
+        RTOL(i) = 1.e-2
+      ENDDO	
+
+      CALL twostepj(NVAR,TIN,TOUT,h,hmin,hmax,
+     +                   VOLD,VAR,VNEW, 
+     +                   ATOL,RTOL,numit,
+     +                   nfcn,naccpt,nrejec,nstart,startdt,ITER)
+
+
+      RETURN
+      END
+      
+      
+
+      SUBROUTINE ITER(n,T,y,yp,yl)
+      INCLUDE 'KPP_ROOT_params.h'
+      INCLUDE 'KPP_ROOT_global.h'
+      REAL*8 T, y(NVAR), yp(NVAR), yl(NVAR)
+      TOLD = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL FunSPLIT_VAR(y,Rad,yp,yl)
+      TIME = TOLD
+      RETURN
+      END
+     
+
+      subroutine twostepj(n,t,te,dt,dtmin,dtmax,
+     +                   yold,y,ynew,
+     +                   atol,rtol,numit,
+     +                   nfcn,naccpt,nrejec,nstart,startdt,ITER)
+      implicit real*8 (a-h,o-z)
+      external ITER
+      integer	 n,numit,nfcn,naccpt,nrejec,nstart,i,j
+      real*8	 t,te,dt,dtmin,dtmax,startdt,ytol,
+     +           ratio,dtold,a1,a2,c,cp1,dtg,errlte,dy
+      real*8       yold(n),y(n),ynew(n),yp(n),yl(n),
+     +           work(n),sum(n),atol(n),rtol(n)
+      logical 	 accept,failer,restart
+
+c
+c     Initialization of counters, etc.
+
+      naccpt=0
+      nrejec=0
+      nfcn=0
+      nstart=0
+      failer=.false.
+      restart=.false.
+      accept=.true.
+
+c     Initial stepsize computation. 
+    
+   10 if (dtmin.eq.dtmax) then
+       nstart=1
+       dt=min(dtmin,(te-t)/2)
+       goto 28
+      endif
+      CALL ITER(n,t,y,yp,yl)
+      nfcn=nfcn+1
+      dt=te-t
+      do 20 i=1,n
+       ytol=atol(i)+rtol(i)*abs(y(i))
+       dy=yp(i)-y(i)*yl(i)
+       if (dy.ne.0.0) dt=min(dt,ytol/abs(dy))
+   20 continue
+   25 nstart=nstart+1
+      if (restart) dt=dt/10.0
+      restart=.true.
+      dt=max(dtmin,min(dt,dtmax))
+      CALL FIT(t,te,dt)
+      dt=min(dt,(te-t)/2)
+      startdt=dt
+
+c     The starting step is carried out, using the implicit Euler method.
+
+   28 do 30 i=1,n
+       ynew(i)=y(i)
+       yold(i)=y(i)
+       sum(i)=y(i)
+   30 continue
+      do 40 i=1,numit
+       CALL ITER(n,t+dt,ynew,yp,yl)
+       do i2i=1,n
+         ynew(i2i) = (sum(i2i) + dt*yp(i2i))/(1.+dt*yl(i2i))
+       end do
+       nfcn=nfcn+1
+   40 continue
+      naccpt=naccpt+1
+      t=t+dt
+      do 50 j=1,n
+       y(j)=ynew(j)
+   50 continue
+
+c     Subsequent steps are carried out with the two-step BDF method.
+
+      dtold=dt
+      ratio=1.0
+   60 continue
+      c=1.0/ratio
+      cp1=c+1.0
+      a1=((c+1.0)**2)/(c*c+2.0*c)
+      a2=-1.0/(c*c+2.0*c)
+      dtg=dt*(1.0+c)/(2.0+c)
+      do 70 j=1,n
+       sum(j)=a1*y(j)+a2*yold(j)
+       ynew(j)=max(0.0,y(j)+ratio*(y(j)-yold(j)))
+   70 continue
+      do 80 i=1,numit
+       CALL ITER(n,t+dt,ynew,yp,yl)
+       do i2i=1,n
+        ynew(i2i) = (sum(i2i) + dtg*yp(i2i))/(1.+dtg*yl(i2i))
+       end do
+       nfcn=nfcn+1
+   80 continue
+
+c     If stepsizes should remain equal, stepsize control is omitted.
+
+      if (dtmin.eq.dtmax) then
+       t=t+dtold
+       naccpt=naccpt+1
+       do 85 j=1,n
+        yold(j)=y(j)
+        y(j)=ynew(j)
+   85  continue
+       if (dt.ne.dtold) then
+	t=t-dtold+dt
+	goto 120
+       endif
+       dt=min(dtold,te-t)
+       ratio=dt/dtold
+       if (t.ge.te) goto 120
+       goto 60
+      endif
+
+c     Otherwise stepsize control is carried out.
+
+      errlte=0.0
+      do 90 i=1,n
+       ytol=atol(i)+rtol(i)*abs(y(i))
+       errlte=max(errlte,abs(c*ynew(i)-cp1*y(i)+yold(i))/ytol)
+   90 continue
+      errlte=2.0*errlte/(c+c*c)
+      CALL NEWDT(t,te,dt,dtold,ratio,errlte,accept,
+     +           dtmin,dtmax)
+
+c     Here the step has been accepted. 
+
+      if (accept) then
+ 201   format(2(E24.16,1X))
+       failer=.false.
+       restart=.false.
+       t=t+dtold
+       naccpt=naccpt+1
+       do 100 j=1,n
+	yold(j)=y(j)
+	y(j)=ynew(j)
+  100  continue
+       if (t.ge.te) goto 120
+       goto 60
+      endif
+
+c     A restart check is carried out.
+      
+      if (failer) then
+       nrejec=nrejec+1
+       failer=.false.
+       naccpt=naccpt-1
+       t=t-dtold
+       do 110 j=1,n
+        y(j)=yold(j)
+  110  continue
+       goto 25
+      endif
+
+c     Here the step has been rejected.
+
+      nrejec=nrejec+1
+      failer=.true.
+      goto 60
+      
+c     End of TWOSTEP.
+  120 end
+c=====================================================================
+
+      subroutine NEWDT(t,te,dt,dtold,ratio,errlte,
+     +                 accept,dtmin,dtmax)
+      real*8    t,te,dt,dtold,ratio,errlte,ts,dtmin,dtmax
+      logical accept
+      if (errlte.gt.1.0.and.dt.gt.dtmin) then
+       accept=.false.
+       ts=t
+      else
+       accept=.true.
+       dtold=dt
+       ts=t+dtold
+      endif
+      dt=max(0.5,min(2.0,0.8/sqrt(errlte)))*dt
+      dt=max(dtmin,min(dt,dtmax))
+      CALL FIT(ts,te,dt)
+      ratio=dt/dtold
+      end
+
+      subroutine FIT(t,te,dt)
+      real*8 	t,te,dt,rns
+      integer 	ns
+      rns=(te-t)/dt
+      if (rns.gt.10.0) goto 10
+      ns=int(rns)+1
+      dt=(te-t)/ns
+      dt=(dt+t)-t
+   10 return
+      end
+
+
+
+C End of MAIN function                                             
+C **************************************************************** 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/readme
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/readme	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/readme	(revision 3477)
@@ -0,0 +1,21 @@
+The integrator naming conventions:
+
+*.def = definition file
+*.f   = Fortran 77 source code
+*.f90 = Fortran 90 source code
+*.c   = C source code
+
+atm_* = off-the-shelf integrators, adapted to work with KPP
+        use the native full linear algebra
+	useful for providing reference solutions
+	
+kpp_* = off-the-shelf integrators, using the KPP sparse linear algebra	
+        very efficient, useful for production runs
+	
+plain names = original integrators
+        either use the KPP sparse linear algebra, or provide
+	explicit solutions	
+	
+*_ddm = direct decoupled method
+        integrate for both the concentrations and their sensitivities
+	implements the forward and the tangent linear models together	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.c	(revision 3477)
@@ -0,0 +1,1216 @@
+
+ #define MAX(a,b) ( ((a) >= (b)) ?(a):(b)  )
+ #define MIN(b,c) ( ((b) <  (c)) ?(b):(c)  )	
+ #define ABS(x)   ( ((x) >=  0 ) ?(x):(-x) ) 
+ #define SQRT(d)  ( pow((d),0.5)  )
+ #define SIGN(x)  ( ((x) >=  0 ) ?[0]:(-1) )
+
+/*~~> Numerical constants */
+ #define  ZERO     (KPP_REAL)0.0
+ #define  ONE      (KPP_REAL)1.0
+ #define  HALF     (KPP_REAL)0.5
+ #define  DeltaMin (KPP_REAL)1.0e-6    
+   
+/*~~~> Collect statistics: global variables */   
+ int Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng;
+
+
+/*~~~> Function headers */   
+ void FunTemplate(KPP_REAL, KPP_REAL [], KPP_REAL []); 
+ void JacTemplate(KPP_REAL, KPP_REAL [], KPP_REAL []) ;
+ int Rosenbrock(KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend,
+     KPP_REAL AbsTol[], KPP_REAL RelTol[],
+     void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []),
+     KPP_REAL RPAR[], int IPAR[]);
+ int RosenbrockIntegrator(
+     KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend ,     
+     KPP_REAL  AbsTol[], KPP_REAL  RelTol[],
+     void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []),
+     int ros_S,
+     KPP_REAL ros_M[], KPP_REAL ros_E[], 
+     KPP_REAL ros_A[], KPP_REAL ros_C[],
+     KPP_REAL ros_Alpha[],KPP_REAL  ros_Gamma[],
+     KPP_REAL ros_ELO, char ros_NewF[],
+     char Autonomous, char VectorTol, int Max_no_steps,  
+     KPP_REAL Roundoff, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart,
+     KPP_REAL FacMin, KPP_REAL FacMax, KPP_REAL FacRej, KPP_REAL FacSafe, 
+     KPP_REAL *Texit, KPP_REAL *Hexit ); 
+ char ros_PrepareMatrix (
+     KPP_REAL* H, 
+     int Direction,  KPP_REAL gam, KPP_REAL Jac0[], 
+     KPP_REAL Ghimj[], int Pivot[] );
+ KPP_REAL ros_ErrorNorm ( 
+     KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[], 
+     KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+     char VectorTol );
+ int  ros_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H);
+ void ros_FunTimeDerivative ( 
+     KPP_REAL T, KPP_REAL Roundoff, 
+     KPP_REAL Y[], KPP_REAL Fcn0[], 
+     void ode_Fun(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     KPP_REAL dFdT[] );
+ void Fun( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+ void Jac_SP( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+ void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] );
+ void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] );
+ void DecompTemplate( KPP_REAL A[], int Pivot[], int* ising );
+ void SolveTemplate( KPP_REAL A[], int Pivot[], KPP_REAL b[] );
+ void WCOPY(int N, KPP_REAL X[], int incX, KPP_REAL Y[], int incY);
+ void WAXPY(int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], int incY );
+ void WSCAL(int N, KPP_REAL Alpha, KPP_REAL X[], int incX);
+ KPP_REAL WLAMCH( char C );
+ void Ros2 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Ros3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Ros4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Rodas3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ void Rodas4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name );
+ int  KppDecomp( KPP_REAL A[] );
+ void KppSolve ( KPP_REAL A[], KPP_REAL b[] );
+ void Update_SUN();
+ void Update_RCONST();
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void INTEGRATE( KPP_REAL TIN, KPP_REAL TOUT )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   static KPP_REAL  RPAR[20];
+   static int  i, IERR, IPAR[20];
+   static int Ns=0, Na=0, Nr=0, Ng=0;
+
+   for ( i = 0; i < 20; i++ ) {
+     IPAR[i] = 0;
+     RPAR[i] = ZERO;
+   } /* for */
+   
+   
+   IPAR[0] = 0;    /* non-autonomous */
+   IPAR[1] = 1;    /* vector tolerances */
+   RPAR[2] = STEPMIN; /* starting step */
+   IPAR[3] = 5;    /* choice of the method */
+
+   IERR = Rosenbrock(VAR, TIN, TOUT,
+           ATOL, RTOL,
+           &FunTemplate, &JacTemplate,
+           RPAR, IPAR);
+
+	     
+   Ns=Ns+IPAR[12];
+   Na=Na+IPAR[13];
+   Nr=Nr+IPAR[14];
+   Ng=Ng+IPAR[17];
+   printf("\n Step=%d  Acc=%d  Rej=%d  Singular=%d\n",
+         Ns,Na,Nr,Ng);
+
+
+   if (IERR < 0)
+     printf("\n Rosenbrock: Unsucessful step at T=%g: IERR=%d\n",
+         TIN,IERR);
+   
+   TIN = RPAR[10];      /* Exit time */
+   STEPMIN = RPAR[11];  /* Last step */
+   
+} /* INTEGRATE */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int Rosenbrock(KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend,
+        KPP_REAL AbsTol[], KPP_REAL RelTol[],
+        void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+	void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []),
+        KPP_REAL RPAR[], int IPAR[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+
+     G = 1/(H*gamma[0]) - ode_Jac(t0,Y0)
+     T_i = t0 + Alpha(i)*H
+     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+     G * K_i = ode_Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+         gamma(i)*dF/dT(t0, Y0)
+     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+
+    For details on Rosenbrock methods and their implementation consult:
+      E. Hairer and G. Wanner
+      "Solving ODEs II. Stiff and differential-algebraic problems".
+      Springer series in computational mathematics, Springer-Verlag, 1996.  
+    The codes contained in the book inspired this implementation.       
+
+    (C)  Adrian Sandu, August 2004
+    Virginia Polytechnic Institute and State University    
+    Contact: sandu@cs.vt.edu
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+  *~~~>   INPUT ARGUMENTS: 
+    
+-     Y(NVAR)    = vector of initial conditions (at T=Tstart)
+-    [Tstart,Tend]  = time range of integration
+     (if Tstart>Tend the integration is performed backwards in time)  
+-    RelTol, AbsTol = user precribed accuracy
+-    void ode_Fun( T, Y, Ydot ) = ODE function, 
+                       returns Ydot = Y' = F(T,Y) 
+-    void ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+                       returns Jcb = dF/dY 
+-    IPAR(1:10)    = int inputs parameters
+-    RPAR(1:10)    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>     OUTPUT ARGUMENTS:  
+     
+-    Y(NVAR)    -> vector of final states (at T->Tend)
+-    IPAR(11:20)   -> int output parameters
+-    RPAR(11:20)   -> real output parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>    RETURN VALUE (int):  
+
+-    IERR       -> job status upon return
+       - succes (positive value) or failure (negative value) -
+           =  1 : Success
+           = -1 : Improper value for maximal no of steps
+           = -2 : Selected Rosenbrock method not implemented
+           = -3 : Hmin/Hmax/Hstart must be positive
+           = -4 : FacMin/FacMax/FacRej must be positive
+           = -5 : Improper tolerance values
+           = -6 : No of steps exceeds maximum bound
+           = -7 : Step size too small
+           = -8 : Matrix is repeatedly singular
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+  *~~~>     INPUT PARAMETERS:
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    IPAR[0]   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+        = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+    IPAR[1]   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+        = 1:  AbsTol, RelTol are scalars
+    IPAR[2]  -> maximum number of integration steps
+        For IPAR[2]=0) the default value of 100000 is used
+
+    IPAR[3]  -> selection of a particular Rosenbrock method
+        = 0 :  default method is Rodas3
+        = 1 :  method is  Ros2
+        = 2 :  method is  Ros3 
+        = 3 :  method is  Ros4 
+        = 4 :  method is  Rodas3
+        = 5:   method is  Rodas4
+
+    RPAR[0]  -> Hmin, lower bound for the integration step size
+          It is strongly recommended to keep Hmin = ZERO 
+    RPAR[1]  -> Hmax, upper bound for the integration step size
+    RPAR[2]  -> Hstart, starting value for the integration step size
+          
+    RPAR[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+    RPAR[4]  -> FacMin,upper bound on step increase factor (default=6)
+    RPAR[5]  -> FacRej, step decrease factor after multiple rejections
+            (default=0.1)
+    RPAR[6]  -> FacSafe, by which the new step is slightly smaller 
+         than the predicted value  (default=0.9)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 
+  *~~~>     OUTPUT PARAMETERS:
+
+    Note: each call to Rosenbrock adds the corrent no. of fcn calls
+      to previous value of IPAR[10], and similar for the other params.
+      Set IPAR(11:20) = 0 before call to avoid this accumulation.
+
+    IPAR[10] = No. of function calls
+    IPAR[11] = No. of jacobian calls
+    IPAR[12] = No. of steps
+    IPAR[13] = No. of accepted steps
+    IPAR[14] = No. of rejected steps (except at the beginning)
+    IPAR[15] = No. of LU decompositions
+    IPAR[16] = No. of forward/backward substitutions
+    IPAR[17] = No. of singular matrix decompositions
+
+    RPAR[10]  -> Texit, the time corresponding to the 
+            computed Y upon return
+    RPAR[11]  -> Hexit, last accepted step before exit
+    For multiple restarts, use Hexit as Hstart in the following run 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{   
+
+  /*~~~>  The method parameters    */   
+   #define Smax 6
+   int  Method, ros_S;
+   KPP_REAL ros_M[Smax], ros_E[Smax];
+   KPP_REAL ros_A[Smax*(Smax-1)/2], ros_C[Smax*(Smax-1)/2];
+   KPP_REAL ros_Alpha[Smax], ros_Gamma[Smax], ros_ELO;
+   char ros_NewF[Smax], ros_Name[12];
+  /*~~~>  Local variables    */  
+   int Max_no_steps, IERR, i, UplimTol;
+   char Autonomous, VectorTol;
+   KPP_REAL Roundoff,FacMin,FacMax,FacRej,FacSafe;
+   KPP_REAL Hmin, Hmax, Hstart, Hexit, Texit;
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  /*~~~>  Initialize statistics */
+   Nfun = IPAR[10];
+   Njac = IPAR[11];
+   Nstp = IPAR[12];
+   Nacc = IPAR[13];
+   Nrej = IPAR[14];
+   Ndec = IPAR[15];
+   Nsol = IPAR[16];
+   Nsng = IPAR[17];
+   
+  /*~~~>  Autonomous or time dependent ODE. Default is time dependent. */
+   Autonomous = !(IPAR[0] == 0);
+
+  /*~~~>  For Scalar tolerances (IPAR[1] != 0)  the code uses AbsTol[0] and RelTol[0]
+!   For Vector tolerances (IPAR[1] == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR) */
+   if (IPAR[1] == 0) {
+      VectorTol = 1; UplimTol  = KPP_NVAR;
+   } else { 
+      VectorTol = 0; UplimTol  = 1;
+   } /* end if */
+   
+  /*~~~>   The maximum number of steps admitted */
+   if (IPAR[2] == 0)  
+      Max_no_steps = 100000;
+   else                
+      Max_no_steps=IPAR[2];
+   if (Max_no_steps < 0) { 
+      printf("\n User-selected max no. of steps: IPAR[2]=%d\n",IPAR[2]);
+      return ros_ErrorMsg(-1,Tstart,ZERO);
+   } /* end if */
+
+  /*~~~>  The particular Rosenbrock method chosen */
+   if (IPAR[3] == 0)  
+       Method = 3;
+   else                
+       Method = IPAR[3];
+   if ( (IPAR[3] < 1) || (IPAR[3] > 5) ){  
+      printf("\n User-selected Rosenbrock method: IPAR[3]=%d\n",IPAR[3]);
+      return ros_ErrorMsg(-2,Tstart,ZERO);
+   } /* end if */
+   
+  /*~~~>  Unit Roundoff (1+Roundoff>1)   */
+   Roundoff = WLAMCH('E');
+
+  /*~~~>  Lower bound on the step size: (positive value) */
+   Hmin = RPAR[0];
+   if (RPAR[0] < ZERO) {	 
+      printf("\n User-selected Hmin: RPAR[0]=%e\n", RPAR[0]);
+      return ros_ErrorMsg(-3,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Upper bound on the step size: (positive value) */
+   if (RPAR[1] == ZERO)  
+      Hmax = ABS(Tend-Tstart);
+   else   
+      Hmax = MIN(ABS(RPAR[1]),ABS(Tend-Tstart));
+   if (RPAR[1] < ZERO) {	 
+      printf("\n User-selected Hmax: RPAR[1]=%e\n", RPAR[1]);
+      return ros_ErrorMsg(-3,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Starting step size: (positive value) */
+   if (RPAR[2] == ZERO) 
+      Hstart = MAX(Hmin,DeltaMin);
+   else
+      Hstart = MIN(ABS(RPAR[2]),ABS(Tend-Tstart));
+   if (RPAR[2] < ZERO) {	 
+      printf("\n User-selected Hstart: RPAR[2]=%e\n", RPAR[2]);
+      return ros_ErrorMsg(-3,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax  */
+   if (RPAR[3] == ZERO)
+      FacMin = (KPP_REAL)0.2;
+   else
+      FacMin = RPAR[3];
+   if (RPAR[3] < ZERO) {	 
+      printf("\n User-selected FacMin: RPAR[3]=%e\n", RPAR[3]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+   if (RPAR[4] == ZERO) 
+      FacMax = (KPP_REAL)6.0;
+   else
+      FacMax = RPAR[4];
+   if (RPAR[4] < ZERO) {	 
+      printf("\n User-selected FacMax: RPAR[4]=%e\n", RPAR[4]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+  /*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+   if (RPAR[5] == ZERO) 
+      FacRej = (KPP_REAL)0.1;
+   else
+      FacRej = RPAR[5];
+   if (RPAR[5] < ZERO) {	 
+      printf("\n User-selected FacRej: RPAR[5]=%e\n", RPAR[5]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+  /*~~~>   FacSafe: Safety Factor in the computation of new step size */
+   if (RPAR[6] == ZERO) 
+      FacSafe = (KPP_REAL)0.9;
+   else
+      FacSafe = RPAR[6];
+   if (RPAR[6] < ZERO) {	 
+      printf("\n User-selected FacSafe: RPAR[6]=%e\n", RPAR[6]);
+      return ros_ErrorMsg(-4,Tstart,ZERO);
+   } /* end if */
+  /*~~~>  Check if tolerances are reasonable */
+    for (i = 0; i < UplimTol; i++) {
+      if ( (AbsTol[i] <= ZERO)  ||  (RelTol[i] <= 10.0*Roundoff)
+          ||  (RelTol[i] >= ONE) ) {
+        printf("\n  AbsTol[%d] = %e\n",i,AbsTol[i]);
+        printf("\n  RelTol[%d] = %e\n",i,RelTol[i]);
+        return ros_ErrorMsg(-5,Tstart,ZERO);
+      } /* end if */
+    } /* for */
+     
+ 
+  /*~~~>   Initialize the particular Rosenbrock method */
+   switch (Method) {
+     case 1:
+       Ros2(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 2:
+       Ros3(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 3:
+       Ros4(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 4:
+       Rodas3(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     case 5:
+       Rodas4(&ros_S, ros_A, ros_C, ros_M, ros_E, 
+         ros_Alpha, ros_Gamma, ros_NewF, &ros_ELO, ros_Name);
+       break;	 
+     default:
+       printf("\n Unknown Rosenbrock method: IPAR[3]= %d", Method);
+       return ros_ErrorMsg(-2,Tstart,ZERO); 
+   } /* end switch */
+
+  /*~~~>  Rosenbrock method   */
+   IERR = RosenbrockIntegrator( Y,Tstart,Tend,
+        AbsTol, RelTol,
+        ode_Fun,ode_Jac ,
+      /*  Rosenbrock method coefficients  */     
+        ros_S, ros_M, ros_E, ros_A, ros_C, 
+        ros_Alpha, ros_Gamma, ros_ELO, ros_NewF,
+      /*  Integration parameters */ 
+        Autonomous, VectorTol, Max_no_steps,
+        Roundoff, Hmin, Hmax, Hstart,
+        FacMin, FacMax, FacRej, FacSafe, 
+      /* Output parameters */ 
+	&Texit, &Hexit );
+
+
+  /*~~~>  Collect run statistics */
+   IPAR[10] = Nfun;
+   IPAR[11] = Njac;
+   IPAR[12] = Nstp;
+   IPAR[13] = Nacc;
+   IPAR[14] = Nrej;
+   IPAR[15] = Ndec;
+   IPAR[16] = Nsol;
+   IPAR[17] = Nsng;
+  /*~~~> Last T and H */
+   RPAR[10] = Texit;
+   RPAR[11] = Hexit;    
+   
+   return IERR;
+   
+} /* Rosenbrock */
+
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int RosenbrockIntegrator(
+  /*~~~> Input: the initial condition at Tstart; Output: the solution at T */  
+     KPP_REAL Y[],
+  /*~~~> Input: integration interval */   
+     KPP_REAL Tstart, KPP_REAL Tend ,     
+  /*~~~> Input: tolerances  */        
+     KPP_REAL  AbsTol[], KPP_REAL  RelTol[],
+  /*~~~> Input: ode function and its Jacobian */      
+     void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+     void (*ode_Jac)(KPP_REAL, KPP_REAL [], KPP_REAL []) ,
+  /*~~~> Input: The Rosenbrock method parameters */   
+     int ros_S,
+     KPP_REAL ros_M[], KPP_REAL ros_E[], 
+     KPP_REAL ros_A[], KPP_REAL ros_C[],
+     KPP_REAL ros_Alpha[],KPP_REAL  ros_Gamma[],
+     KPP_REAL ros_ELO, char ros_NewF[],
+  /*~~~> Input: integration parameters  */     
+     char Autonomous, char VectorTol,
+     int Max_no_steps,  
+     KPP_REAL Roundoff, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart,
+     KPP_REAL FacMin, KPP_REAL FacMax, KPP_REAL FacRej, KPP_REAL FacSafe, 
+  /*~~~> Output: time at which the solution is returned (T=Tend  if success)   
+             and last accepted step  */     
+     KPP_REAL *Texit, KPP_REAL *Hexit ) 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Template for the implementation of a generic Rosenbrock method 
+      defined by ros_S (no of stages) and coefficients ros_{A,C,M,E,Alpha,Gamma}
+      
+      returned value: IERR, indicator of success (if positive) 
+                                      or failure (if negative)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{   
+   KPP_REAL Ynew[KPP_NVAR], Fcn0[KPP_NVAR], Fcn[KPP_NVAR],
+      dFdT[KPP_NVAR],
+      Jac0[KPP_LU_NONZERO], Ghimj[KPP_LU_NONZERO];
+   KPP_REAL K[KPP_NVAR*ros_S];   
+   KPP_REAL H, T, Hnew, HC, HG, Fac, Tau; 
+   KPP_REAL Err, Yerr[KPP_NVAR];
+   int Pivot[KPP_NVAR], Direction, ioffset, j, istage;
+   char RejectLastH, RejectMoreH;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  /*~~~>  INITIAL PREPARATIONS  */
+   T = Tstart;
+   *Hexit = 0.0;
+   H = MIN(Hstart,Hmax); 
+   if (ABS(H) <= 10.0*Roundoff) 
+        H = DeltaMin;
+   
+   if (Tend  >=  Tstart) {
+     Direction = +1;
+   } else {
+     Direction = -1;
+   } /* end if */		
+
+   RejectLastH=0; RejectMoreH=0;
+   
+  /*~~~> Time loop begins below  */ 
+
+   while ( ( (Direction > 0) && ((T-Tend)+Roundoff <= ZERO) )
+       || ( (Direction < 0) && ((Tend-T)+Roundoff <= ZERO) ) ) { 
+      
+   if ( Nstp > Max_no_steps )  {                /* Too many steps */
+        *Texit = T;
+	return ros_ErrorMsg(-6,T,H);
+   }	
+   if ( ((T+0.1*H) == T) || (H <= Roundoff) ) { /* Step size too small */
+        *Texit = T;
+	return ros_ErrorMsg(-7,T,H);
+   }   
+   
+  /*~~~>  Limit H if necessary to avoid going beyond Tend   */  
+   *Hexit = H;
+   H = MIN(H,ABS(Tend-T));
+
+  /*~~~>   Compute the function at current time  */
+   (*ode_Fun)(T,Y,Fcn0);
+
+  /*~~~>  Compute the function derivative with respect to T  */
+   if (!Autonomous) 
+      ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, ode_Fun, dFdT );
+  
+  /*~~~>   Compute the Jacobian at current time  */
+   (*ode_Jac)(T,Y,Jac0);
+ 
+  /*~~~>  Repeat step calculation until current step accepted  */
+   while (1) { /* WHILE STEP NOT ACCEPTED */
+
+   
+   if( ros_PrepareMatrix( &H, Direction, ros_Gamma[0],
+          Jac0, Ghimj, Pivot) ) { /* More than 5 consecutive failed decompositions */
+       *Texit = T;
+       return ros_ErrorMsg(-8,T,H);
+   }
+
+  /*~~~>   Compute the stages  */
+   for (istage = 1; istage <= ros_S; istage++) {
+      
+      /* Current istage offset. Current istage vector is K[ioffset:ioffset+KPP_NVAR-1] */
+      ioffset = KPP_NVAR*(istage-1);
+	 
+      /* For the 1st istage the function has been computed previously */
+      if ( istage == 1 )
+	   WCOPY(KPP_NVAR,Fcn0,1,Fcn,1);
+      else { /* istage>1 and a new function evaluation is needed at current istage */
+	if ( ros_NewF[istage-1] ) {
+	   WCOPY(KPP_NVAR,Y,1,Ynew,1);
+	   for (j = 1; j <= istage-1; j++)
+	     WAXPY(KPP_NVAR,ros_A[(istage-1)*(istage-2)/2+j-1],
+                   &K[KPP_NVAR*(j-1)],1,Ynew,1); 
+	   Tau = T + ros_Alpha[istage-1]*Direction*H;
+           (*ode_Fun)(Tau,Ynew,Fcn);
+	} /*end if ros_NewF(istage)*/
+      } /* end if istage */
+	 
+      WCOPY(KPP_NVAR,Fcn,1,&K[ioffset],1);
+      for (j = 1; j <= istage-1; j++) {
+	 HC = ros_C[(istage-1)*(istage-2)/2+j-1]/(Direction*H);
+	 WAXPY(KPP_NVAR,HC,&K[KPP_NVAR*(j-1)],1,&K[ioffset],1);
+      } /* for j */
+	 
+      if ((!Autonomous) && (ros_Gamma[istage-1])) { 
+        HG = Direction*H*ros_Gamma[istage-1];
+	WAXPY(KPP_NVAR,HG,dFdT,1,&K[ioffset],1);
+      } /* end if !Autonomous */
+      
+      SolveTemplate(Ghimj, Pivot, &K[ioffset]);
+	 
+   } /* for istage */	    
+	    
+
+  /*~~~>  Compute the new solution   */
+   WCOPY(KPP_NVAR,Y,1,Ynew,1);
+   for (j=1; j<=ros_S; j++)
+       WAXPY(KPP_NVAR,ros_M[j-1],&K[KPP_NVAR*(j-1)],1,Ynew,1);
+
+  /*~~~>  Compute the error estimation   */
+   WSCAL(KPP_NVAR,ZERO,Yerr,1);
+   for (j=1; j<=ros_S; j++)    
+       WAXPY(KPP_NVAR,ros_E[j-1],&K[KPP_NVAR*(j-1)],1,Yerr,1);
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol );
+
+  /*~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax  */
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/pow(Err,ONE/ros_ELO)));
+   Hnew = H*Fac;  
+
+  /*~~~>  Check the error magnitude and adjust step size  */
+   Nstp++;
+   if ( (Err <= ONE) || (H <= Hmin) ) {    /*~~~> Accept step  */
+      Nacc++;
+      WCOPY(KPP_NVAR,Ynew,1,Y,1);
+      T += Direction*H;
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax));
+      /* No step size increase after a rejected step  */
+      if (RejectLastH) 
+         Hnew = MIN(Hnew,H); 
+      RejectLastH = 0; RejectMoreH = 0;
+      H = Hnew;
+	 break; /* EXIT THE LOOP: WHILE STEP NOT ACCEPTED */
+   } else {             /*~~~> Reject step  */
+      if (Nacc >= 1) 
+         Nrej++;    
+      if (RejectMoreH) 
+         Hnew=H*FacRej;   
+      RejectMoreH = RejectLastH; RejectLastH = 1;
+      H = Hnew;
+   } /* end if Err <= 1 */
+
+   } /* while LOOP: WHILE STEP NOT ACCEPTED */
+
+   } /* while: time loop */   
+   
+  /*~~~> The integration was successful */
+   *Texit = T;
+   return 1;    
+
+}  /* RosenbrockIntegrator */
+ 
+
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL ros_ErrorNorm ( 
+  /*~~~> Input arguments */  
+     KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[], 
+     KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+     char VectorTol )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        Computes and returns the "scaled norm" of the error vector Yerr
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   	 
+  /*~~~> Local variables */     
+   KPP_REAL Err, Scale, Ymax;   
+   int i;
+   
+   Err = ZERO;
+   for (i=0; i<KPP_NVAR; i++) {
+	Ymax = MAX(ABS(Y[i]),ABS(Ynew[i]));
+     if (VectorTol) {
+       Scale = AbsTol[i]+RelTol[i]*Ymax;
+     } else {
+       Scale = AbsTol[0]+RelTol[0]*Ymax;
+     } /* end if */
+     Err = Err+(Yerr[i]*Yerr[i])/(Scale*Scale);
+   } /* for i */
+   Err  = SQRT(Err/(KPP_REAL)KPP_NVAR);
+
+   return Err;
+   
+} /* ros_ErrorNorm */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FunTimeDerivative ( 
+    /*~~~> Input arguments: */ 
+        KPP_REAL T, KPP_REAL Roundoff, 
+        KPP_REAL Y[], KPP_REAL Fcn0[], 
+	void (*ode_Fun)(KPP_REAL, KPP_REAL [], KPP_REAL []), 
+    /*~~~> Output arguments: */ 
+        KPP_REAL dFdT[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    The time partial derivative of the function by finite differences
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+  /*~~~> Local variables */     
+   KPP_REAL Delta;    
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T));
+   (*ode_Fun)(T+Delta,Y,dFdT);
+   WAXPY(KPP_NVAR,(-ONE),Fcn0,1,dFdT,1);
+   WSCAL(KPP_NVAR,(ONE/Delta),dFdT,1);
+
+}  /*  ros_FunTimeDerivative */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+char ros_PrepareMatrix (
+       /* Inout argument: (step size is decreased when LU fails) */  
+           KPP_REAL* H, 
+       /* Input arguments: */    
+           int Direction,  KPP_REAL gam, KPP_REAL Jac0[], 
+       /* Output arguments: */	  
+           KPP_REAL Ghimj[], int Pivot[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Prepares the LHS matrix for stage calculations
+  1.  Construct Ghimj = 1/(H*ham) - Jac0
+      "(Gamma H) Inverse Minus Jacobian"
+  2.  Repeat LU decomposition of Ghimj until successful.
+       -half the step size if LU decomposition fails and retry
+       -exit after 5 consecutive fails
+
+  Return value:       Singular (true=1=failed_LU or false=0=successful_LU)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+  /*~~~> Local variables */     
+   int i, ising, Nconsecutive;
+   KPP_REAL ghinv;
+   
+   Nconsecutive = 0;
+   
+   while (1) {  /* while Singular */
+   
+  /*~~~>    Construct Ghimj = 1/(H*ham) - Jac0 */
+     WCOPY(KPP_LU_NONZERO,Jac0,1,Ghimj,1);
+     WSCAL(KPP_LU_NONZERO,(-ONE),Ghimj,1);
+     ghinv = ONE/(Direction*(*H)*gam);
+     for (i=0; i<KPP_NVAR; i++) {
+       Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+ghinv;
+     } /* for i */
+  /*~~~>    Compute LU decomposition  */
+     DecompTemplate( Ghimj, Pivot, &ising );
+     if (ising == 0) {
+  /*~~~>    if successful done  */
+        return 0;  /* Singular = false */
+     } else { /* ising .ne. 0 */
+  /*~~~>    if unsuccessful half the step size; if 5 consecutive fails return */
+        Nsng++; Nconsecutive++;
+        printf("\nWarning: LU Decomposition returned ising = %d\n",ising);
+        if (Nconsecutive <= 5) { /* Less than 5 consecutive failed LUs */
+          *H = (*H)*HALF;
+        } else {                  /* More than 5 consecutive failed LUs */
+          return 1; /* Singular = true */
+        } /* end if  Nconsecutive */
+     } /* end if ising */
+	 
+   } /* while Singular */
+
+}  /*  ros_PrepareMatrix */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+int ros_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                  Handles all error messages and returns IERR = error Code
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); 
+   printf("\nForced exit from Rosenbrock due to the following error:\n"); 
+     
+   switch (Code) {
+   case -1:   
+      printf("--> Improper value for maximal no of steps"); break;
+   case -2:   
+      printf("--> Selected Rosenbrock method not implemented"); break;
+   case -3:   
+      printf("--> Hmin/Hmax/Hstart must be positive"); break;
+   case -4:   
+      printf("--> FacMin/FacMax/FacRej must be positive"); break;
+   case -5:
+      printf("--> Improper tolerance values"); break;
+   case -6:
+      printf("--> No of steps exceeds maximum bound"); break;
+   case -7:
+      printf("--> Step size too small (T + H/10 = T) or H < Roundoff"); break;
+   case -8:   
+      printf("--> Matrix is repeatedly singular"); break;
+   default:
+      printf("Unknown Error code: %d ",Code); 
+   } /* end switch */
+   
+   printf("\n   Time = %15.7e,  H = %15.7e",T,H);
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); 
+     
+   return Code;  
+     
+}  /* ros_ErrorMsg  */
+      
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Ros2 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+           KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	   KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	   char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+             AN L-STABLE METHOD, 2 stages, order 2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   double g = (KPP_REAL)1.70710678118655; /* 1.0 + 1.0/SQRT(2.0) */
+   
+  /*~~~> Name of the method */
+    strcpy(ros_Name, "ROS-2");  
+        
+  /*~~~> Number of stages */
+    *ros_S = 2;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+        A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]   */
+    ros_A[0] = 1.0/g;
+    
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+    ros_C[0] = (-2.0)/g;
+    
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+    ros_NewF[0] = 1;
+    ros_NewF[1] = 1;
+    
+  /*~~~> M_i = Coefficients for new step solution */
+    ros_M[0]= (3.0)/(2.0*g);
+    ros_M[1]= (1.0)/(2.0*g);
+    
+  /*~~~> E_i = Coefficients for error estimator */    
+    ros_E[0] = 1.0/(2.0*g);
+    ros_E[1] = 1.0/(2.0*g);
+    
+  /*~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one */
+    *ros_ELO = (KPP_REAL)2.0;   
+     
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+    ros_Alpha[0] = (KPP_REAL)0.0;
+    ros_Alpha[1] = (KPP_REAL)1.0; 
+    
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+    ros_Gamma[0] =  g;
+    ros_Gamma[1] = -g;
+    
+}  /*  Ros2 */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Ros3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+           KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	   KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	   char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+       AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{ 
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "ROS-3");   
+
+  /*~~~> Number of stages */
+   *ros_S = 3;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+        A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]   */
+   ros_A[0]= (KPP_REAL)1.0;
+   ros_A[1]= (KPP_REAL)1.0;
+   ros_A[2]= (KPP_REAL)0.0;
+
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+   ros_C[0] = (KPP_REAL)(-1.0156171083877702091975600115545);
+   ros_C[1] = (KPP_REAL)4.0759956452537699824805835358067;
+   ros_C[2] = (KPP_REAL)9.2076794298330791242156818474003;
+   
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+   ros_NewF[0] = 1;
+   ros_NewF[1] = 1;
+   ros_NewF[2] = 0;
+   
+  /*~~~> M_i = Coefficients for new step solution */
+   ros_M[0] = (KPP_REAL)1.0;
+   ros_M[1] = (KPP_REAL)6.1697947043828245592553615689730;
+   ros_M[2] = (KPP_REAL)(-0.4277225654321857332623837380651);
+   
+  /*~~~> E_i = Coefficients for error estimator */    
+   ros_E[0] = (KPP_REAL)0.5;
+   ros_E[1] = (KPP_REAL)(-2.9079558716805469821718236208017);
+   ros_E[2] = (KPP_REAL)0.2235406989781156962736090927619;
+   
+  /*~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+   *ros_ELO = (KPP_REAL)3.0;    
+   
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+   ros_Alpha[0]= (KPP_REAL)0.0;
+   ros_Alpha[1]= (KPP_REAL)0.43586652150845899941601945119356;
+   ros_Alpha[2]= (KPP_REAL)0.43586652150845899941601945119356;
+   
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+   ros_Gamma[0]= (KPP_REAL)0.43586652150845899941601945119356;
+   ros_Gamma[1]= (KPP_REAL)0.24291996454816804366592249683314;
+   ros_Gamma[2]= (KPP_REAL)2.1851380027664058511513169485832;
+
+}  /*  Ros3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Ros4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+           KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	   KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	   char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1990)         
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "ROS-4");  
+       
+  /*~~~> Number of stages */
+   *ros_S = 4;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+       A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]  */
+   ros_A[0] = (KPP_REAL)0.2000000000000000e+01;
+   ros_A[1] = (KPP_REAL)0.1867943637803922e+01;
+   ros_A[2] = (KPP_REAL)0.2344449711399156;
+   ros_A[3] = ros_A[1];
+   ros_A[4] = ros_A[2];
+   ros_A[5] = (KPP_REAL)0.0;
+
+  /*~~~>     C(i,j) = (KPP_REAL)ros_C( (i-1)*(i-2)/2 + j )  */
+   ros_C[0] = (KPP_REAL)(-0.7137615036412310e+01);
+   ros_C[1] = (KPP_REAL)( 0.2580708087951457e+01);
+   ros_C[2] = (KPP_REAL)( 0.6515950076447975);
+   ros_C[3] = (KPP_REAL)(-0.2137148994382534e+01);
+   ros_C[4] = (KPP_REAL)(-0.3214669691237626);
+   ros_C[5] = (KPP_REAL)(-0.6949742501781779);
+   
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+   ros_NewF[0]  = 1;
+   ros_NewF[1]  = 1;
+   ros_NewF[2]  = 1;
+   ros_NewF[3]  = 0;
+   
+  /*~~~> M_i = Coefficients for new step solution */
+   ros_M[0] = (KPP_REAL)0.2255570073418735e+01;
+   ros_M[1] = (KPP_REAL)0.2870493262186792;
+   ros_M[2] = (KPP_REAL)0.4353179431840180;
+   ros_M[3] = (KPP_REAL)0.1093502252409163e+01;
+   
+  /*~~~> E_i  = Coefficients for error estimator */   
+   ros_E[0] = (KPP_REAL)(-0.2815431932141155);
+   ros_E[1] = (KPP_REAL)(-0.7276199124938920e-01);
+   ros_E[2] = (KPP_REAL)(-0.1082196201495311);
+   ros_E[3] = (KPP_REAL)(-0.1093502252409163e+01);
+   
+  /*~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+   *ros_ELO  = (KPP_REAL)4.0;    
+   
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+   ros_Alpha[0] = (KPP_REAL)0.0;
+   ros_Alpha[1] = (KPP_REAL)0.1145640000000000e+01;
+   ros_Alpha[2] = (KPP_REAL)0.6552168638155900;
+   ros_Alpha[3] = (KPP_REAL)ros_Alpha[2];
+   
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+   ros_Gamma[0] = (KPP_REAL)( 0.5728200000000000);
+   ros_Gamma[1] = (KPP_REAL)(-0.1769193891319233e+01);
+   ros_Gamma[2] = (KPP_REAL)( 0.7592633437920482);
+   ros_Gamma[3] = (KPP_REAL)(-0.1049021087100450);
+
+}  /*  Ros4 */
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Rodas3 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "RODAS-3");  
+   
+  /*~~~> Number of stages */
+   *ros_S = 4;
+   
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:
+        A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]  */   
+   ros_A[0] = (KPP_REAL)0.0;
+   ros_A[1] = (KPP_REAL)2.0;
+   ros_A[2] = (KPP_REAL)0.0;
+   ros_A[3] = (KPP_REAL)2.0;
+   ros_A[4] = (KPP_REAL)0.0;
+   ros_A[5] = (KPP_REAL)1.0;
+
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+   ros_C[0] = (KPP_REAL)4.0;
+   ros_C[1] = (KPP_REAL)1.0;
+   ros_C[2] = (KPP_REAL)(-1.0);
+   ros_C[3] = (KPP_REAL)1.0;
+   ros_C[4] = (KPP_REAL)(-1.0); 
+   ros_C[5] = (KPP_REAL)(-2.66666666666667); /* -8/3 */ 
+         
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+   ros_NewF[0]  = 1;
+   ros_NewF[1]  = 0;
+   ros_NewF[2]  = 1;
+   ros_NewF[3]  = 1;
+   
+  /*~~~> M_i = Coefficients for new step solution */
+   ros_M[0] = (KPP_REAL)2.0;
+   ros_M[1] = (KPP_REAL)0.0;
+   ros_M[2] = (KPP_REAL)1.0;
+   ros_M[3] = (KPP_REAL)1.0;
+   
+  /*~~~> E_i  = Coefficients for error estimator */   
+   ros_E[0] = (KPP_REAL)0.0;
+   ros_E[1] = (KPP_REAL)0.0;
+   ros_E[2] = (KPP_REAL)0.0;
+   ros_E[3] = (KPP_REAL)1.0;
+   
+  /*~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+   *ros_ELO  = (KPP_REAL)3.0;
+      
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+   ros_Alpha[0] = (KPP_REAL)0.0;
+   ros_Alpha[1] = (KPP_REAL)0.0;
+   ros_Alpha[2] = (KPP_REAL)1.0;
+   ros_Alpha[3] = (KPP_REAL)1.0;
+   
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+   ros_Gamma[0] = (KPP_REAL)0.5;
+   ros_Gamma[1] = (KPP_REAL)1.5;
+   ros_Gamma[2] = (KPP_REAL)0.0;
+   ros_Gamma[3] = (KPP_REAL)0.0;
+ 
+}  /*  Rodas3 */
+    
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void Rodas4 ( int *ros_S, KPP_REAL ros_A[], KPP_REAL ros_C[], 
+             KPP_REAL ros_M[], KPP_REAL ros_E[], 
+	     KPP_REAL ros_Alpha[], KPP_REAL ros_Gamma[], 
+	     char ros_NewF[], KPP_REAL *ros_ELO, char* ros_Name )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1996)         
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+  /*~~~> Name of the method */
+   strcpy(ros_Name, "RODAS-4");  
+   
+  /*~~~> Number of stages */
+    *ros_S = 6;
+
+  /*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+    ros_Alpha[0] = (KPP_REAL)0.000;
+    ros_Alpha[1] = (KPP_REAL)0.386;
+    ros_Alpha[2] = (KPP_REAL)0.210; 
+    ros_Alpha[3] = (KPP_REAL)0.630;
+    ros_Alpha[4] = (KPP_REAL)1.000;
+    ros_Alpha[5] = (KPP_REAL)1.000;
+	
+  /*~~~> Gamma_i = \sum_j  gamma_{i,j}  */     
+    ros_Gamma[0] = (KPP_REAL)0.2500000000000000;
+    ros_Gamma[1] = (KPP_REAL)(-0.1043000000000000);
+    ros_Gamma[2] = (KPP_REAL)0.1035000000000000;
+    ros_Gamma[3] = (KPP_REAL)(-0.3620000000000023e-01);
+    ros_Gamma[4] = (KPP_REAL)0.0;
+    ros_Gamma[5] = (KPP_REAL)0.0;
+
+  /*~~~> The coefficient matrices A and C are strictly lower triangular.
+    The lower triangular (subdiagonal) elements are stored in row-wise order:
+    A(2,1) = ros_A[0], A(3,1)=ros_A[1], A(3,2)=ros_A[2], etc.
+    The general mapping formula is:  A_{i,j} = ros_A[ (i-1)*(i-2)/2 + j -1 ]  */
+    ros_A[0]  = (KPP_REAL)0.1544000000000000e+01;
+    ros_A[1]  = (KPP_REAL)0.9466785280815826;
+    ros_A[2]  = (KPP_REAL)0.2557011698983284;
+    ros_A[3]  = (KPP_REAL)0.3314825187068521e+01;
+    ros_A[4]  = (KPP_REAL)0.2896124015972201e+01;
+    ros_A[5]  = (KPP_REAL)0.9986419139977817;
+    ros_A[6]  = (KPP_REAL)0.1221224509226641e+01;
+    ros_A[7]  = (KPP_REAL)0.6019134481288629e+01;
+    ros_A[8]  = (KPP_REAL)0.1253708332932087e+02;
+    ros_A[9]  = (KPP_REAL)(-0.6878860361058950);
+    ros_A[10] =  ros_A[6];
+    ros_A[11] =  ros_A[7];
+    ros_A[12] =  ros_A[8];
+    ros_A[13] =  ros_A[9];
+    ros_A[14] =  (KPP_REAL)1.0;
+
+  /*~~~>     C_{i,j} = ros_C[ (i-1)*(i-2)/2 + j -1]  */
+    ros_C[0]  = (KPP_REAL)(-0.5668800000000000e+01);
+    ros_C[1]  = (KPP_REAL)(-0.2430093356833875e+01);
+    ros_C[2]  = (KPP_REAL)(-0.2063599157091915);
+    ros_C[3]  = (KPP_REAL)(-0.1073529058151375);
+    ros_C[4]  = (KPP_REAL)(-0.9594562251023355e+01);
+    ros_C[5]  = (KPP_REAL)(-0.2047028614809616e+02);
+    ros_C[6]  = (KPP_REAL)( 0.7496443313967647e+01);
+    ros_C[7]  = (KPP_REAL)(-0.1024680431464352e+02);
+    ros_C[8]  = (KPP_REAL)(-0.3399990352819905e+02);
+    ros_C[9]  = (KPP_REAL)( 0.1170890893206160e+02);
+    ros_C[10] = (KPP_REAL)( 0.8083246795921522e+01);
+    ros_C[11] = (KPP_REAL)(-0.7981132988064893e+01);
+    ros_C[12] = (KPP_REAL)(-0.3152159432874371e+02);
+    ros_C[13] = (KPP_REAL)( 0.1631930543123136e+02);
+    ros_C[14] = (KPP_REAL)(-0.6058818238834054e+01);
+
+  /*~~~> M_i  = Coefficients for new step solution */
+    ros_M[0] = ros_A[6];
+    ros_M[1] = ros_A[7];
+    ros_M[2] = ros_A[8];
+    ros_M[3] = ros_A[9];
+    ros_M[4] = (KPP_REAL)1.0;
+    ros_M[5] = (KPP_REAL)1.0;
+
+  /*~~~> E_i  = Coefficients for error estimator */   
+    ros_E[0] = (KPP_REAL)0.0;
+    ros_E[1] = (KPP_REAL)0.0;
+    ros_E[2] = (KPP_REAL)0.0;
+    ros_E[3] = (KPP_REAL)0.0;
+    ros_E[4] = (KPP_REAL)0.0;
+    ros_E[5] = (KPP_REAL)1.0;
+
+  /*~~~> does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+    or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE) */
+    ros_NewF[0] = 1;
+    ros_NewF[1] = 1;
+    ros_NewF[2] = 1;
+    ros_NewF[3] = 1;
+    ros_NewF[4] = 1;
+    ros_NewF[5] = 1;
+     
+  /*~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1 */
+    *ros_ELO = (KPP_REAL)4.0;
+     
+}  /*  Rodas4 */
+
+   
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void DecompTemplate( KPP_REAL A[], int Pivot[], int* ising )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+        Template for the LU decomposition   
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   *ising = KppDecomp ( A );
+  /*~~~> Note: for a full matrix use Lapack:
+      DGETRF( KPP_NVAR, KPP_NVAR, A, KPP_NVAR, Pivot, ising ) */
+    
+   Ndec++;
+
+}  /*  DecompTemplate */
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+ void SolveTemplate( KPP_REAL A[], int Pivot[], KPP_REAL b[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+     Template for the forward/backward substitution (using pre-computed LU decomposition)   
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{   
+   KppSolve( A, b );
+  /*~~~> Note: for a full matrix use Lapack:
+      NRHS = 1
+      DGETRS( 'N', KPP_NVAR , NRHS, A, KPP_NVAR, Pivot, b, KPP_NVAR, INFO ) */
+     
+   Nsol++;
+
+}  /*  SolveTemplate */
+
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+    Template for the ODE function call.
+    Updates the rate coefficients (and possibly the fixed species) at each call    
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+   KPP_REAL Told;     
+
+   Told = TIME;
+   TIME = T;
+   Update_SUN();
+   Update_RCONST();
+   Fun( Y, FIX, RCONST, Ydot );
+   TIME = Told;
+     
+   Nfun++;
+   
+}  /*  FunTemplate */
+
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Jcb[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+    Template for the ODE Jacobian call.
+    Updates the rate coefficients (and possibly the fixed species) at each call    
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/   
+{
+  /*~~~> Local variables */
+   KPP_REAL Told;     
+
+   Told = TIME;
+   TIME = T ; 
+   Update_SUN();
+   Update_RCONST();
+   Jac_SP( Y, FIX, RCONST, Jcb );
+   TIME = Told;
+     
+   Njac++;
+
+} /* JacTemplate   */                                    
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.f	(revision 3477)
@@ -0,0 +1,1286 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER Nstp, Nacc, Nrej, Nsng, IERR
+      SAVE Nstp, Nacc, Nrej, Nsng
+
+! TIN - Start Time
+      KPP_REAL TIN
+! TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i
+
+      KPP_REAL  RPAR(20)
+      INTEGER  IPAR(20)
+      EXTERNAL  FunTemplate, JacTemplate
+
+
+      DO i=1,20
+        IPAR(i) = 0
+        RPAR(i) = 0.0d0
+      ENDDO
+      
+      
+      IPAR(1) = 0       ! non-autonomous
+      IPAR(2) = 1       ! vector tolerances
+      RPAR(3) = STEPMIN ! starting step
+      IPAR(4) = 5       ! choice of the method
+
+      CALL Rosenbrock(VAR,TIN,TOUT,
+     &            ATOL,RTOL,
+     &            FunTemplate,JacTemplate,
+     &            RPAR,IPAR,IERR)
+
+	        
+      Nstp = Nstp + IPAR(13)
+      Nacc = Nacc + IPAR(14)
+      Nrej = Nrej + IPAR(15)
+      Nsng = Nsng + IPAR(18)
+      PRINT*,'Step=',Nstp,' Acc=',Nacc,' Rej=',Nrej,
+     &      ' Singular=',Nsng
+
+
+      IF (IERR.LT.0) THEN
+        print *,'Rosenbrock: Unsucessful step at T=',
+     &          TIN,' (IERR=',IERR,')'
+      ENDIF
+      
+      TIN = RPAR(11) ! Exit time
+      STEPMIN = RPAR(12)
+      
+      RETURN
+      END
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Rosenbrock(Y,Tstart,Tend,
+     &            AbsTol,RelTol,
+     &            ode_Fun,ode_Jac ,
+     &            RPAR,IPAR,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - ode_Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = ode_Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!                  gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!         E. Hairer and G. Wanner
+!         "Solving ODEs II. Stiff and differential-algebraic problems".
+!         Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.             
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!       
+!~~~>      INPUT ARGUMENTS: 
+!       
+!-     Y(NVAR)       = vector of initial conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!        (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol = user precribed accuracy
+!-    SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function, 
+!                                         returns Ydot = Y' = F(T,Y) 
+!-    SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                                         returns Jcb = dF/dY 
+!-    IPAR(1:10)    = integer inputs parameters
+!-    RPAR(1:10)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!        
+!-    Y(NVAR)       -> vector of final states (at T->Tend)
+!-    IPAR(11:20)   -> integer output parameters
+!-    RPAR(11:20)   -> real output parameters
+!-    IERR          -> job status upon return
+!          - succes (positive value) or failure (negative value) -
+!                    =  1 : Success
+!                    = -1 : Improper value for maximal no of steps
+!                    = -2 : Selected Rosenbrock method not implemented
+!                    = -3 : Hmin/Hmax/Hstart must be positive
+!                    = -4 : FacMin/FacMax/FacRej must be positive
+!                    = -5 : Improper tolerance values
+!                    = -6 : No of steps exceeds maximum bound
+!                    = -7 : Step size too small
+!                    = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!    IPAR(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!    IPAR(2)   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!    IPAR(3)  -> maximum number of integration steps
+!              For IPAR(3)=0) the default value of 100000 is used
+!
+!    IPAR(4)  -> selection of a particular Rosenbrock method
+!              = 0 :  default method is Rodas3
+!              = 1 :  method is  Ros2
+!              = 2 :  method is  Ros3 
+!              = 3 :  method is  Ros4 
+!              = 4 :  method is  Rodas3
+!              = 5:   method is  Rodas4
+!
+!    RPAR(1)  -> Hmin, lower bound for the integration step size
+!                It is strongly recommended to keep Hmin = ZERO 
+!    RPAR(2)  -> Hmax, upper bound for the integration step size
+!    RPAR(3)  -> Hstart, starting value for the integration step size
+!                
+!    RPAR(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RPAR(5)  -> FacMin,upper bound on step increase factor (default=6)
+!    RPAR(6)  -> FacRej, step decrease factor after multiple rejections
+!                        (default=0.1)
+!    RPAR(7)  -> FacSafe, by which the new step is slightly smaller 
+!                  than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the corrent no. of fcn calls
+!         to previous value of IPAR(11), and similar for the other params.
+!         Set IPAR(11:20) = 0 before call to avoid this accumulation.
+!
+!    IPAR(11) = No. of function calls
+!    IPAR(12) = No. of jacobian calls
+!    IPAR(13) = No. of steps
+!    IPAR(14) = No. of accepted steps
+!    IPAR(15) = No. of rejected steps (except at the beginning)
+!    IPAR(16) = No. of LU decompositions
+!    IPAR(17) = No. of forward/backward substitutions
+!    IPAR(18) = No. of singular matrix decompositions
+!
+!    RPAR(11)  -> Texit, the time corresponding to the 
+!                        computed Y upon return
+!    RPAR(12)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      
+      KPP_REAL Tstart,Tend
+      KPP_REAL Y(KPP_NVAR),AbsTol(KPP_NVAR),RelTol(KPP_NVAR)
+      INTEGER IPAR(20)
+      KPP_REAL RPAR(20)
+      INTEGER IERR
+!~~~>  The method parameters      
+      INTEGER Smax
+      PARAMETER (Smax = 6)
+      INTEGER  Method, ros_S
+      KPP_REAL ros_M(Smax), ros_E(Smax)
+      KPP_REAL ros_A(Smax*(Smax-1)/2), ros_C(Smax*(Smax-1)/2)
+      KPP_REAL ros_Alpha(Smax), ros_Gamma(Smax), ros_ELO
+      LOGICAL  ros_NewF(Smax)
+      CHARACTER*12 ros_Name
+!~~~>  Local variables     
+      KPP_REAL Roundoff,FacMin,FacMax,FacRej,FacSafe
+      KPP_REAL Hmin, Hmax, Hstart, Hexit
+      KPP_REAL Texit
+      INTEGER i, UplimTol, Max_no_steps
+      LOGICAL Autonomous, VectorTol
+!~~~>   Statistics on the work performed
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+!~~~>   Parameters
+      KPP_REAL ZERO, ONE, DeltaMin 
+      PARAMETER (ZERO = 0.0d0)
+      PARAMETER (ONE  = 1.0d0)
+      PARAMETER (DeltaMin = 1.0d-5)
+!~~~>   Functions
+      EXTERNAL ode_Fun, ode_Jac
+      KPP_REAL WLAMCH, ros_ErrorNorm
+      EXTERNAL WLAMCH, ros_ErrorNorm
+
+!~~~>  Initialize statistics
+      Nfun = IPAR(11)
+      Njac = IPAR(12)
+      Nstp = IPAR(13)
+      Nacc = IPAR(14)
+      Nrej = IPAR(15)
+      Ndec = IPAR(16)
+      Nsol = IPAR(17)
+      Nsng = IPAR(18)
+      
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+      Autonomous = .NOT.(IPAR(1).EQ.0)
+
+!~~~>  For Scalar tolerances (IPAR(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!      For Vector tolerances (IPAR(2).EQ.0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (IPAR(2).EQ.0) THEN
+         VectorTol = .TRUE.
+	 UplimTol  = KPP_NVAR
+      ELSE 
+         VectorTol = .FALSE.
+	 UplimTol  = 1
+      END IF
+      
+!~~~>   The maximum number of steps admitted
+      IF (IPAR(3).EQ.0) THEN
+         Max_no_steps = 100000
+      ELSEIF (Max_no_steps.GT.0) THEN
+         Max_no_steps=IPAR(3)
+      ELSE 
+         WRITE(6,*)'User-selected max no. of steps: IPAR(3)=',IPAR(3)
+         CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+
+!~~~>  The particular Rosenbrock method chosen
+      IF (IPAR(4).EQ.0) THEN
+         Method = 3
+      ELSEIF ( (IPAR(4).GE.1).AND.(IPAR(4).LE.5) ) THEN
+         Method = IPAR(4)
+      ELSE  
+         WRITE (6,*) 'User-selected Rosenbrock method: IPAR(4)=', Method
+         CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+      
+!~~~>  Unit roundoff (1+Roundoff>1)  
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RPAR(1).EQ.ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RPAR(1).GT.ZERO) THEN 
+         Hmin = RPAR(1)
+      ELSE	 
+         WRITE (6,*) 'User-selected Hmin: RPAR(1)=', RPAR(1)
+         CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RPAR(2).EQ.ZERO) THEN
+         Hmax = ABS(Tend-Tstart)
+      ELSEIF (RPAR(2).GT.ZERO) THEN
+         Hmax = MIN(ABS(RPAR(2)),ABS(Tend-Tstart))
+      ELSE	 
+         WRITE (6,*) 'User-selected Hmax: RPAR(2)=', RPAR(2)
+         CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Starting step size: (positive value)
+      IF (RPAR(3).EQ.ZERO) THEN
+         Hstart = MAX(Hmin,DeltaMin)
+      ELSEIF (RPAR(3).GT.ZERO) THEN
+         Hstart = MIN(ABS(RPAR(3)),ABS(Tend-Tstart))
+      ELSE	 
+         WRITE (6,*) 'User-selected Hstart: RPAR(3)=', RPAR(3)
+         CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax 
+      IF (RPAR(4).EQ.ZERO) THEN
+         FacMin = 0.2d0
+      ELSEIF (RPAR(4).GT.ZERO) THEN
+         FacMin = RPAR(4)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacMin: RPAR(4)=', RPAR(4)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+      IF (RPAR(5).EQ.ZERO) THEN
+         FacMax = 6.0d0
+      ELSEIF (RPAR(5).GT.ZERO) THEN
+         FacMax = RPAR(5)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacMax: RPAR(5)=', RPAR(5)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RPAR(6).EQ.ZERO) THEN
+         FacRej = 0.1d0
+      ELSEIF (RPAR(6).GT.ZERO) THEN
+         FacRej = RPAR(6)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacRej: RPAR(6)=', RPAR(6)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RPAR(7).EQ.ZERO) THEN
+         FacSafe = 0.9d0
+      ELSEIF (RPAR(7).GT.ZERO) THEN
+         FacSafe = RPAR(7)
+      ELSE	 
+         WRITE (6,*) 'User-selected FacSafe: RPAR(7)=', RPAR(7)
+         CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+	 RETURN         
+      END IF
+!~~~>  Check if tolerances are reasonable
+       DO i=1,UplimTol
+         IF ( (AbsTol(i).LE.ZERO) .OR. (RelTol(i).LE.10.d0*Roundoff)
+     &          .OR. (RelTol(i).GE.1.0d0) ) THEN
+            WRITE (6,*) ' AbsTol(',i,') = ',AbsTol(i)
+            WRITE (6,*) ' RelTol(',i,') = ',RelTol(i)
+            CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+	    RETURN
+         END IF
+       END DO
+     
+ 
+!~~~>   Initialize the particular Rosenbrock method
+
+      IF (Method .EQ. 1) THEN
+         CALL Ros2(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 2) THEN
+         CALL Ros3(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 3) THEN
+         CALL Ros4(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 4) THEN
+         CALL Rodas3(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSEIF (Method .EQ. 5) THEN
+         CALL Rodas4(ros_S, ros_A, ros_C, ros_M, ros_E, 
+     &             ros_Alpha, ros_Gamma, ros_NewF, ros_ELO, ros_Name)
+      ELSE
+         WRITE (6,*) 'Unknown Rosenbrock method: IPAR(4)=', Method
+         CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR) 
+	 RETURN        
+      END IF
+
+!~~~>  CALL Rosenbrock method   
+      CALL RosenbrockIntegrator(Y,Tstart,Tend,Texit,
+     &      AbsTol,RelTol,
+     &      ode_Fun,ode_Jac ,
+!  Rosenbrock method coefficients     
+     &      ros_S, ros_M, ros_E, ros_A, ros_C, 
+     &      ros_Alpha, ros_Gamma, ros_ELO, ros_NewF,
+!  Integration parameters
+     &      Autonomous, VectorTol, Max_no_steps,
+     &      Roundoff, Hmin, Hmax, Hstart, Hexit,
+     &      FacMin, FacMax, FacRej, FacSafe,  
+!  Error indicator
+     &      IERR)
+
+
+!~~~>  Collect run statistics
+      IPAR(11) = Nfun
+      IPAR(12) = Njac
+      IPAR(13) = Nstp
+      IPAR(14) = Nacc
+      IPAR(15) = Nrej
+      IPAR(16) = Ndec
+      IPAR(17) = Nsol
+      IPAR(18) = Nsng
+!~~~> Last T and H
+      RPAR(11) = Texit
+      RPAR(12) = Hexit       
+      
+      RETURN
+      END  !  SUBROUTINE Rosenbrock
+
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE RosenbrockIntegrator(Y,Tstart,Tend,T,
+     &      AbsTol,RelTol,
+     &      ode_Fun,ode_Jac ,
+!~~~> Rosenbrock method coefficients     
+     &      ros_S, ros_M, ros_E, ros_A, ros_C, 
+     &      ros_Alpha, ros_Gamma, ros_ELO, ros_NewF,
+!~~~> Integration parameters
+     &      Autonomous, VectorTol, Max_no_steps,
+     &      Roundoff, Hmin, Hmax, Hstart, Hexit,
+     &      FacMin, FacMax, FacRej, FacSafe,  
+!~~~> Error indicator
+     &      IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method 
+!            defined by ros_S (no of stages)  
+!            and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      
+!~~~> Input: the initial condition at Tstart; Output: the solution at T      
+      KPP_REAL Y(KPP_NVAR)
+!~~~> Input: integration interval   
+      KPP_REAL Tstart,Tend         
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+      KPP_REAL T         
+!~~~> Input: tolerances            
+      KPP_REAL  AbsTol(KPP_NVAR), RelTol(KPP_NVAR)
+!~~~> Input: ode function and its Jacobian            
+      EXTERNAL ode_Fun, ode_Jac
+!~~~> Input: The Rosenbrock method parameters      
+      INTEGER  ros_S
+      KPP_REAL ros_M(ros_S), ros_E(ros_S) 
+      KPP_REAL ros_A(ros_S*(ros_S-1)/2), ros_C(ros_S*(ros_S-1)/2)
+      KPP_REAL ros_Alpha(ros_S), ros_Gamma(ros_S), ros_ELO
+      LOGICAL ros_NewF(ros_S)
+!~~~> Input: integration parameters      
+      LOGICAL Autonomous, VectorTol
+      KPP_REAL Hstart, Hmin, Hmax
+      INTEGER Max_no_steps
+      KPP_REAL Roundoff, FacMin, FacMax, FacRej, FacSafe 
+!~~~> Output: last accepted step      
+      KPP_REAL Hexit 
+!~~~> Output: Error indicator
+      INTEGER IERR
+! ~~~~ Local variables           
+      KPP_REAL Ynew(KPP_NVAR), Fcn0(KPP_NVAR), Fcn(KPP_NVAR),
+     &       K(KPP_NVAR*ros_S), dFdT(KPP_NVAR),
+     &       Jac0(KPP_LU_NONZERO), Ghimj(KPP_LU_NONZERO)
+      KPP_REAL H, Hnew, HC, HG, Fac, Tau 
+      KPP_REAL Err, Yerr(KPP_NVAR)
+      INTEGER Pivot(KPP_NVAR), Direction, ioffset, j, istage
+      LOGICAL RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+      KPP_REAL ZERO, ONE, DeltaMin 
+      PARAMETER (ZERO = 0.0d0)
+      PARAMETER (ONE  = 1.0d0)
+      PARAMETER (DeltaMin = 1.0d-5)
+!~~~>  Locally called functions
+      KPP_REAL WLAMCH, ros_ErrorNorm
+      EXTERNAL WLAMCH, ros_ErrorNorm
+!~~~>  Statistics on the work performed
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      
+!~~~>  INITIAL PREPARATIONS
+      T = Tstart
+      Hexit = 0.0d0
+      H = MIN(Hstart,Hmax) 
+      IF (ABS(H).LE.10.d0*Roundoff) THEN
+           H = DeltaMin
+      END IF	   
+      
+      IF (Tend .GE. Tstart) THEN
+        Direction = +1
+      ELSE
+        Direction = -1
+      END IF		
+
+      RejectLastH=.FALSE.
+      RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+      DO WHILE ( (Direction.GT.0).AND.((T-Tend)+Roundoff.LE.ZERO)
+     &     .OR. (Direction.LT.0).AND.((Tend-T)+Roundoff.LE.ZERO) ) 
+         
+      IF ( Nstp.GT.Max_no_steps ) THEN  ! Too many steps
+	CALL ros_ErrorMsg(-6,T,H,IERR)
+	RETURN
+      END IF
+      IF ( ((T+0.1d0*H).EQ.T).OR.(H.LE.Roundoff) ) THEN  ! Step size too small
+	CALL ros_ErrorMsg(-7,T,H,IERR)
+	RETURN
+      END IF
+      
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+      Hexit = H
+      H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+      CALL ode_Fun(T,Y,Fcn0)
+
+!~~~>  Compute the function derivative with respect to T
+      IF (.NOT.Autonomous) THEN
+         CALL ros_FunTimeDerivative ( T, Roundoff, Y, 
+     &                       Fcn0, ode_Fun, dFdT )
+      END IF
+  
+!~~~>   Compute the Jacobian at current time
+      CALL ode_Jac(T,Y,Jac0)
+ 
+!~~~>  Repeat step calculation until current step accepted
+      DO WHILE (.TRUE.) ! WHILE STEP NOT ACCEPTED
+
+      
+      CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1),
+     &              Jac0,Ghimj,Pivot,Singular)
+      IF (Singular) THEN ! More than 5 consecutive failed decompositions
+	 CALL ros_ErrorMsg(-8,T,H,IERR)
+	 RETURN
+      END IF
+
+!~~~>   Compute the stages
+      DO istage = 1, ros_S
+         
+	 ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+KPP_NVAR)
+	 ioffset = KPP_NVAR*(istage-1)
+	 
+	 ! For the 1st istage the function has been computed previously
+	 IF ( istage.EQ.1 ) THEN
+	   CALL WCOPY(KPP_NVAR,Fcn0,1,Fcn,1)
+	 ! istage>1 and a new function evaluation is needed at the current istage
+	 ELSEIF ( ros_NewF(istage) ) THEN
+	   CALL WCOPY(KPP_NVAR,Y,1,Ynew,1)
+	   DO j = 1, istage-1
+	     CALL WAXPY(KPP_NVAR,ros_A((istage-1)*(istage-2)/2+j),
+     &                   K(KPP_NVAR*(j-1)+1),1,Ynew,1) 
+	   END DO
+	   Tau = T + ros_Alpha(istage)*Direction*H
+           CALL ode_Fun(Tau,Ynew,Fcn)
+	 END IF ! if istage.EQ.1 elseif ros_NewF(istage)
+	 CALL WCOPY(KPP_NVAR,Fcn,1,K(ioffset+1),1)
+	 DO j = 1, istage-1
+	   HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+	   CALL WAXPY(KPP_NVAR,HC,K(KPP_NVAR*(j-1)+1),1,K(ioffset+1),1)
+	 END DO
+         IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+           HG = Direction*H*ros_Gamma(istage)
+	   CALL WAXPY(KPP_NVAR,HG,dFdT,1,K(ioffset+1),1)
+         END IF
+         CALL SolveTemplate(Ghimj, Pivot, K(ioffset+1))
+	 
+      END DO  ! istage	    
+	    
+
+!~~~>  Compute the new solution 
+      CALL WCOPY(KPP_NVAR,Y,1,Ynew,1)
+      DO j=1,ros_S
+	 CALL WAXPY(KPP_NVAR,ros_M(j),K(KPP_NVAR*(j-1)+1),1,Ynew,1)
+      END DO
+
+!~~~>  Compute the error estimation 
+      CALL WSCAL(KPP_NVAR,ZERO,Yerr,1)
+      DO j=1,ros_S        
+	CALL WAXPY(KPP_NVAR,ros_E(j),K(KPP_NVAR*(j-1)+1),1,Yerr,1)
+      END DO 
+      Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+      Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+      Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+      Nstp = Nstp+1
+      IF ( (Err.LE.ONE).OR.(H.LE.Hmin) ) THEN  !~~~> Accept step
+         Nacc = Nacc+1
+	 CALL WCOPY(KPP_NVAR,Ynew,1,Y,1)
+         T = T + Direction*H
+	 Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+         IF (RejectLastH) THEN  ! No step size increase after a rejected step
+	    Hnew = MIN(Hnew,H) 
+	 END IF   
+         RejectLastH = .FALSE.  
+         RejectMoreH = .FALSE.
+         H = Hnew
+	 GOTO 101  ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+      ELSE                 !~~~> Reject step
+         IF (RejectMoreH) THEN
+	    Hnew=H*FacRej
+	 END IF   
+         RejectMoreH = RejectLastH
+         RejectLastH = .TRUE.
+         H = Hnew
+         IF (Nacc.GE.1) THEN
+	    Nrej = Nrej+1
+	 END IF    
+      END IF ! Err <= 1
+
+      END DO ! LOOP: WHILE STEP NOT ACCEPTED
+
+101   CONTINUE
+
+      END DO ! Time loop    
+      
+!~~~> Succesful exit
+      IERR = 1  !~~~> The integration was successful
+
+      RETURN
+      END  !  SUBROUTINE RosenbrockIntegrator
+ 
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, 
+     &                      AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+
+! Input arguments   
+      KPP_REAL Y(KPP_NVAR), Ynew(KPP_NVAR), Yerr(KPP_NVAR)
+      KPP_REAL AbsTol(KPP_NVAR), RelTol(KPP_NVAR)   
+      LOGICAL  VectorTol
+! Local variables     
+      KPP_REAL Err, Scale, Ymax, ZERO    
+      INTEGER i
+      PARAMETER (ZERO = 0.0d0)
+      
+      Err = ZERO
+      DO i=1,KPP_NVAR
+	Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+        IF (VectorTol) THEN
+          Scale = AbsTol(i)+RelTol(i)*Ymax
+        ELSE
+          Scale = AbsTol(1)+RelTol(1)*Ymax
+        END IF
+        Err = Err+(Yerr(i)/Scale)**2
+      END DO
+      Err  = SQRT(Err/KPP_NVAR)
+
+      ros_ErrorNorm = Err
+      
+      RETURN
+      END ! FUNCTION ros_ErrorNorm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, 
+     &                       Fcn0, ode_Fun, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+
+!~~~> Input arguments   
+      KPP_REAL T, Roundoff, Y(KPP_NVAR), Fcn0(KPP_NVAR) 
+      EXTERNAL ode_Fun  
+!~~~> Output arguments      
+      KPP_REAL dFdT(KPP_NVAR)   
+!~~~> Global variables     
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng     
+!~~~> Local variables     
+      KPP_REAL Delta, DeltaMin, ONE     
+      PARAMETER ( DeltaMin = 1.0d-6 )   
+      PARAMETER ( ONE = 1.0d0 )
+      
+      Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+      CALL ode_Fun(T+Delta,Y,dFdT)
+      CALL WAXPY(KPP_NVAR,(-ONE),Fcn0,1,dFdT,1)
+      CALL WSCAL(KPP_NVAR,(ONE/Delta),dFdT,1)
+
+      RETURN
+      END ! SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, 
+     &                    Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!         "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!          -half the step size if LU decomposition fails and retry
+!          -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+      IMPLICIT NONE	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      
+!~~~> Input arguments      
+      KPP_REAL gam, Jac0(KPP_LU_NONZERO)
+      INTEGER  Direction
+!~~~> Output arguments      
+      KPP_REAL Ghimj(KPP_LU_NONZERO)
+      LOGICAL  Singular
+      INTEGER  Pivot(KPP_NVAR)
+!~~~> Inout arguments      
+      KPP_REAL H      ! step size is decreased when LU fails
+!~~~> Global variables     
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng     
+!~~~> Local variables     
+      INTEGER  i, ising, Nconsecutive
+      KPP_REAL  ghinv, ONE, HALF
+      PARAMETER ( ONE  = 1.0d0 )
+      PARAMETER ( HALF = 0.5d0 )
+      
+      Nconsecutive = 0
+      Singular = .TRUE.
+      
+      DO WHILE (Singular)
+      
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+        CALL WCOPY(KPP_LU_NONZERO,Jac0,1,Ghimj,1)
+        CALL WSCAL(KPP_LU_NONZERO,(-ONE),Ghimj,1)
+        ghinv = ONE/(Direction*H*gam)
+        DO i=1,KPP_NVAR
+          Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+        END DO
+!~~~>    Compute LU decomposition 
+        CALL DecompTemplate( Ghimj, Pivot, ising )
+        IF (ising .EQ. 0) THEN
+!~~~>    If successful done 
+	  Singular = .FALSE. 
+	ELSE ! ising .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+          Nsng = Nsng+1
+          Nconsecutive = Nconsecutive+1
+	  Singular = .TRUE. 
+	  PRINT*,'Warning: LU Decomposition returned ising = ',ising
+          IF (Nconsecutive.LE.5) THEN ! Less than 5 consecutive failed decompositions
+            H = H*HALF
+	  ELSE  ! More than 5 consecutive failed decompositions
+ 	    RETURN
+          END IF  ! Nconsecutive
+        END IF	! ising 
+	 
+      END DO ! WHILE Singular
+
+      RETURN
+      END ! SUBROUTINE ros_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+      KPP_REAL T, H
+      INTEGER IERR, Code
+      
+      IERR = Code
+      WRITE(6,*) 
+     &   'Forced exit from Rosenbrock due to the following error:' 
+     
+      IF    (Code .EQ. -1) THEN   
+         WRITE(6,*) '--> Improper value for maximal no of steps'
+      ELSEIF (Code .EQ. -2) THEN   
+         WRITE(6,*) '--> Selected Rosenbrock method not implemented'
+      ELSEIF (Code .EQ. -3) THEN   
+         WRITE(6,*) '--> Hmin/Hmax/Hstart must be positive'
+      ELSEIF (Code .EQ. -4) THEN   
+         WRITE(6,*) '--> FacMin/FacMax/FacRej must be positive'
+      ELSEIF (Code .EQ. -5) THEN
+         WRITE(6,*) '--> Improper tolerance values'
+      ELSEIF (Code .EQ. -6) THEN
+         WRITE(6,*) '--> No of steps exceeds maximum bound'
+      ELSEIF (Code .EQ. -7) THEN
+         WRITE(6,*) '--> Step size too small: T + 10*H = T',
+     &                ' or H < Roundoff'
+      ELSEIF (Code .EQ. -8) THEN   
+         WRITE(6,*) '--> Matrix is repeatedly singular'
+      ELSE
+         WRITE(6,102) 'Unknown Error code: ',Code
+      END IF
+      
+  102 FORMAT('       ',A,I4)    
+      WRITE(6,103) T, H
+      
+  103 FORMAT('        T=',E15.7,' and H=',E15.7)    
+     
+      RETURN
+      END
+      
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Ros2 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &                ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=2)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      DOUBLE PRECISION g
+      
+       g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+      
+!~~~> Name of the method
+       ros_Name = 'ROS-2'      
+!~~~> Number of stages
+       ros_S = 2
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+      
+       ros_A(1) = (1.d0)/g
+       ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+       ros_NewF(1) = .TRUE.
+       ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+       ros_M(1)= (3.d0)/(2.d0*g)
+       ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator       
+       ros_E(1) = 1.d0/(2.d0*g)
+       ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus one
+       ros_ELO = 2.0d0       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+       ros_Alpha(1) = 0.0d0
+       ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+       ros_Gamma(1) = g
+       ros_Gamma(2) =-g
+      
+      RETURN
+      END ! SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Ros3 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &               ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=3)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      
+!~~~> Name of the method
+      ros_Name = 'ROS-3'      
+!~~~> Number of stages
+      ros_S = 3
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+      ros_A(1)= 1.d0
+      ros_A(2)= 1.d0
+      ros_A(3)= 0.d0
+
+      ros_C(1) = -0.10156171083877702091975600115545d+01
+      ros_C(2) =  0.40759956452537699824805835358067d+01
+      ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+      ros_NewF(1) = .TRUE.
+      ros_NewF(2) = .TRUE.
+      ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+      ros_M(1) =  0.1d+01
+      ros_M(2) =  0.61697947043828245592553615689730d+01
+      ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator       
+      ros_E(1) =  0.5d+00
+      ros_E(2) = -0.29079558716805469821718236208017d+01
+      ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+      ros_ELO = 3.0d0       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+      ros_Alpha(1)= 0.0d+00
+      ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+      ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+      ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+      ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+      ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+      RETURN
+      END ! SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+      SUBROUTINE Ros4 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &               ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!         SPRINGER-VERLAG (1990)               
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=4)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      
+!~~~> Name of the method
+      ros_Name = 'ROS-4'      
+!~~~> Number of stages
+      ros_S = 4
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+      ros_A(1) = 0.2000000000000000d+01
+      ros_A(2) = 0.1867943637803922d+01
+      ros_A(3) = 0.2344449711399156d+00
+      ros_A(4) = ros_A(2)
+      ros_A(5) = ros_A(3)
+      ros_A(6) = 0.0D0
+
+      ros_C(1) =-0.7137615036412310d+01
+      ros_C(2) = 0.2580708087951457d+01
+      ros_C(3) = 0.6515950076447975d+00
+      ros_C(4) =-0.2137148994382534d+01
+      ros_C(5) =-0.3214669691237626d+00
+      ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+      ros_NewF(1)  = .TRUE.
+      ros_NewF(2)  = .TRUE.
+      ros_NewF(3)  = .TRUE.
+      ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+      ros_M(1) = 0.2255570073418735d+01
+      ros_M(2) = 0.2870493262186792d+00
+      ros_M(3) = 0.4353179431840180d+00
+      ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator       
+      ros_E(1) =-0.2815431932141155d+00
+      ros_E(2) =-0.7276199124938920d-01
+      ros_E(3) =-0.1082196201495311d+00
+      ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+      ros_ELO  = 4.0d0       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+      ros_Alpha(1) = 0.D0
+      ros_Alpha(2) = 0.1145640000000000d+01
+      ros_Alpha(3) = 0.6552168638155900d+00
+      ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+      ros_Gamma(1) = 0.5728200000000000d+00
+      ros_Gamma(2) =-0.1769193891319233d+01
+      ros_Gamma(3) = 0.7592633437920482d+00
+      ros_Gamma(4) =-0.1049021087100450d+00
+      RETURN
+      END ! SUBROUTINE Ros4
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Rodas3 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &                ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=4)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+      
+!~~~> Name of the method
+      ros_Name = 'RODAS-3'      
+!~~~> Number of stages
+      ros_S = 4
+      
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!             A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!             C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+      ros_A(1) = 0.0d+00
+      ros_A(2) = 2.0d+00
+      ros_A(3) = 0.0d+00
+      ros_A(4) = 2.0d+00
+      ros_A(5) = 0.0d+00
+      ros_A(6) = 1.0d+00
+
+      ros_C(1) = 4.0d+00
+      ros_C(2) = 1.0d+00
+      ros_C(3) =-1.0d+00
+      ros_C(4) = 1.0d+00
+      ros_C(5) =-1.0d+00 
+      ros_C(6) =-(8.0d+00/3.0d+00) 
+               
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+      ros_NewF(1)  = .TRUE.
+      ros_NewF(2)  = .FALSE.
+      ros_NewF(3)  = .TRUE.
+      ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+      ros_M(1) = 2.0d+00
+      ros_M(2) = 0.0d+00
+      ros_M(3) = 1.0d+00
+      ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator       
+      ros_E(1) = 0.0d+00
+      ros_E(2) = 0.0d+00
+      ros_E(3) = 0.0d+00
+      ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+      ros_ELO  = 3.0d+00       
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+      ros_Alpha(1) = 0.0d+00
+      ros_Alpha(2) = 0.0d+00
+      ros_Alpha(3) = 1.0d+00
+      ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+      ros_Gamma(1) = 0.5d+00
+      ros_Gamma(2) = 1.5d+00
+      ros_Gamma(3) = 0.0d+00
+      ros_Gamma(4) = 0.0d+00
+      RETURN
+      END ! SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE Rodas4 (ros_S,ros_A,ros_C,ros_M,ros_E,ros_Alpha,
+     &                 ros_Gamma,ros_NewF,ros_ELO,ros_Name)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!         E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!         EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!         SPRINGER-VERLAG (1996)               
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+      IMPLICIT NONE
+      INTEGER S
+      PARAMETER (S=6)
+      INTEGER  ros_S
+      KPP_REAL ros_M(S), ros_E(S), ros_A(S*(S-1)/2), ros_C(S*(S-1)/2)
+      KPP_REAL ros_Alpha(S), ros_Gamma(S), ros_ELO
+      LOGICAL  ros_NewF(S)
+      CHARACTER*12 ros_Name
+
+!~~~> Name of the method
+       ros_Name = 'RODAS-4'      
+!~~~> Number of stages
+       ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+       ros_Alpha(1) = 0.000d0
+       ros_Alpha(2) = 0.386d0
+       ros_Alpha(3) = 0.210d0 
+       ros_Alpha(4) = 0.630d0
+       ros_Alpha(5) = 1.000d0
+       ros_Alpha(6) = 1.000d0
+	
+!~~~> Gamma_i = \sum_j  gamma_{i,j}       
+       ros_Gamma(1) = 0.2500000000000000d+00
+       ros_Gamma(2) =-0.1043000000000000d+00
+       ros_Gamma(3) = 0.1035000000000000d+00
+       ros_Gamma(4) =-0.3620000000000023d-01
+       ros_Gamma(5) = 0.0d0
+       ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )       
+!                                    C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+       ros_A(1) = 0.1544000000000000d+01
+       ros_A(2) = 0.9466785280815826d+00
+       ros_A(3) = 0.2557011698983284d+00
+       ros_A(4) = 0.3314825187068521d+01
+       ros_A(5) = 0.2896124015972201d+01
+       ros_A(6) = 0.9986419139977817d+00
+       ros_A(7) = 0.1221224509226641d+01
+       ros_A(8) = 0.6019134481288629d+01
+       ros_A(9) = 0.1253708332932087d+02
+       ros_A(10) =-0.6878860361058950d+00
+       ros_A(11) = ros_A(7)
+       ros_A(12) = ros_A(8)
+       ros_A(13) = ros_A(9)
+       ros_A(14) = ros_A(10)
+       ros_A(15) = 1.0d+00
+
+       ros_C(1) =-0.5668800000000000d+01
+       ros_C(2) =-0.2430093356833875d+01
+       ros_C(3) =-0.2063599157091915d+00
+       ros_C(4) =-0.1073529058151375d+00
+       ros_C(5) =-0.9594562251023355d+01
+       ros_C(6) =-0.2047028614809616d+02
+       ros_C(7) = 0.7496443313967647d+01
+       ros_C(8) =-0.1024680431464352d+02
+       ros_C(9) =-0.3399990352819905d+02
+       ros_C(10) = 0.1170890893206160d+02
+       ros_C(11) = 0.8083246795921522d+01
+       ros_C(12) =-0.7981132988064893d+01
+       ros_C(13) =-0.3152159432874371d+02
+       ros_C(14) = 0.1631930543123136d+02
+       ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+       ros_M(1) = ros_A(7)
+       ros_M(2) = ros_A(8)
+       ros_M(3) = ros_A(9)
+       ros_M(4) = ros_A(10)
+       ros_M(5) = 1.0d+00
+       ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator       
+       ros_E(1) = 0.0d+00
+       ros_E(2) = 0.0d+00
+       ros_E(3) = 0.0d+00
+       ros_E(4) = 0.0d+00
+       ros_E(5) = 0.0d+00
+       ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+       ros_NewF(1) = .TRUE.
+       ros_NewF(2) = .TRUE.
+       ros_NewF(3) = .TRUE.
+       ros_NewF(4) = .TRUE.
+       ros_NewF(5) = .TRUE.
+       ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!       main and the embedded scheme orders plus 1
+       ros_ELO = 4.0d0
+     
+      RETURN
+      END ! SUBROUTINE Rodas4
+
+      
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE DecompTemplate( A, Pivot, ising )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the LU decomposition   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Inout variables     
+      KPP_REAL A(KPP_LU_NONZERO)
+!~~~> Output variables     
+      INTEGER Pivot(KPP_NVAR), ising
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+      
+      CALL KppDecomp ( A, ising )
+!~~~> Note: for a full matrix use Lapack:
+!        CALL  DGETRF( KPP_NVAR, KPP_NVAR, A, KPP_NVAR, Pivot, ising ) 
+    
+      Ndec = Ndec + 1
+
+      END ! SUBROUTINE DecompTemplate
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE SolveTemplate( A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Input variables     
+      KPP_REAL A(KPP_LU_NONZERO)
+      INTEGER Pivot(KPP_NVAR)
+!~~~> InOut variables     
+      KPP_REAL b(KPP_NVAR)
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+      
+      CALL KppSolve( A, b )
+!~~~> Note: for a full matrix use Lapack:
+!        NRHS = 1
+!        CALL  DGETRS( 'N', KPP_NVAR , NRHS, A, KPP_NVAR, Pivot, b, KPP_NVAR, INFO )
+     
+      Nsol = Nsol+1
+
+      END ! SUBROUTINE SolveTemplate
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Input variables     
+      KPP_REAL T, Y(KPP_NVAR)
+!~~~> Output variables     
+      KPP_REAL Ydot(KPP_NVAR)
+!~~~> Local variables
+      KPP_REAL Told     
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y, FIX, RCONST, Ydot )
+      TIME = Told
+     
+      Nfun = Nfun+1
+      
+      RETURN
+      END ! SUBROUTINE FunTemplate
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+!~~~> Input variables     
+      KPP_REAL T, Y(KPP_NVAR)
+!~~~> Output variables     
+      KPP_REAL Jcb(KPP_LU_NONZERO)
+!~~~> Local variables
+      KPP_REAL Told     
+!~~~> Collect statistics      
+      INTEGER Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+      COMMON /Statistics/ Nfun,Njac,Nstp,Nacc,Nrej,
+     &       Ndec,Nsol,Nsng
+
+      Told = TIME
+      TIME = T   
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y, FIX, RCONST, Jcb )
+      TIME = Told
+     
+      Njac = Njac+1
+
+      RETURN
+      END !  SUBROUTINE JacTemplate                                                                          
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.f90	(revision 3477)
@@ -0,0 +1,1328 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Rosenbrock - Implementation of several Rosenbrock methods:             !
+!               * Ros2                                                    !
+!               * Ros3                                                    !
+!               * Ros4                                                    !
+!               * Rodas3                                                  !
+!               * Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !                               !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NFIX, NSPEC, LU_NONZERO
+  USE KPP_ROOT_Global
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the Rosenbrock method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+                        Nrej=5, Ndec=6, Nsol=7, Nsng=8, &
+                        Ntexit=1, Nhexit=2, Nhnew = 3
+
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+
+   INTEGER, SAVE :: Ntotal = 0
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+   ICNTRL(1) = 0	! 0 - non-autonomous, 1 - autonomous
+   ICNTRL(2) = 0	! 0 - vector tolerances, 1 - scalars
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+
+   CALL Rosenbrock(NVAR,VAR,TIN,TOUT,   &
+         ATOL,RTOL,                &
+         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+
+   !~~~> Debug option: show no of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+   STEPMIN = RSTATUS(Nhexit)
+   ! if optional parameters are given for output they 
+   ! are updated with the return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(IERR_U))    IERR_U       = IERR
+
+END SUBROUTINE INTEGRATE
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE Rosenbrock(N,Y,Tstart,Tend, &
+           AbsTol,RelTol,              &
+           RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    The codes contained in the book inspired this implementation.
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(N)    = vector of initial conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE  Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE  Jac( T, Y, Jcb ) = Jacobian of the ODE function,
+!                       returns Jcb = dFun/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(N)    -> vector of final states (at T->Tend)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    IERR            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1) = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :    Rodas3 (default)
+!        = 1 :    Ros2
+!        = 2 :    Ros3
+!        = 3 :    Ros4
+!        = 4 :    Rodas3
+!        = 5 :    Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0) the default value of 100000 is used
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                          (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!         than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IDID        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  USE KPP_ROOT_Parameters
+  USE KPP_ROOT_LinearAlgebra
+  IMPLICIT NONE
+
+!~~~>  Arguments
+   INTEGER,       INTENT(IN)    :: N
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+   KPP_REAL, INTENT(IN)    :: Tstart,Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(N),RelTol(N)
+   INTEGER,       INTENT(IN)    :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER,       INTENT(INOUT) :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)   :: IERR
+!~~~>  Parameters of the Rosenbrock method, up to 6 stages
+   INTEGER ::  ros_S, rosMethod
+   INTEGER, PARAMETER :: RS2=1, RS3=2, RS4=3, RD3=4, RD4=5, RG3=6
+   KPP_REAL :: ros_A(15), ros_C(15), ros_M(6), ros_E(6), &
+                    ros_Alpha(6), ros_Gamma(6), ros_ELO
+   LOGICAL :: ros_NewF(6)
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Local variables
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart
+   KPP_REAL :: Texit
+   INTEGER       :: i, UplimTol, Max_no_steps
+   LOGICAL       :: Autonomous, VectorTol
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0_dp, ONE  = 1.0_dp
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0E-5_dp
+
+!~~~>  Initialize statistics
+   ISTATUS(1:8) = 0
+   RSTATUS(1:3) = ZERO
+
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+      UplimTol  = N
+   ELSE
+      VectorTol = .FALSE.
+      UplimTol  = 1
+   END IF
+
+!~~~>   Initialize the particular Rosenbrock method selected
+   SELECT CASE (ICNTRL(3))
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (0,4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE (6)
+       CALL Rang3
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=',ICNTRL(3) 
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+       RETURN
+   END SELECT
+
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = 200000
+   ELSEIF (ICNTRL(4) > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE
+      PRINT * ,'User-selected max no. of steps: ICNTRL(4)=',ICNTRL(4)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN
+      Hmin = RCNTRL(1)
+   ELSE
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2_dp
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0_dp
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1_dp
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9_dp
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.0_dp*Roundoff) &
+         .OR. (RelTol(i) >= 1.0_dp) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+
+
+!~~~>  CALL Rosenbrock method
+   CALL ros_Integrator(Y, Tstart, Tend, Texit,   &
+        AbsTol, RelTol,                          &
+!  Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart,            &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!  Error indicator
+        IERR)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS !  SUBROUTINES internal to Rosenbrock
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from Rosenbrock due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected Rosenbrock method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_Integrator (Y, Tstart, Tend, T,  &
+        AbsTol, RelTol,                          &
+!~~~> Integration parameters
+        Autonomous, VectorTol, Max_no_steps,     &
+        Roundoff, Hmin, Hmax, Hstart,            &
+        FacMin, FacMax, FacRej, FacSafe,         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method
+!      defined by ros_S (no of stages)
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+
+!~~~> Input: the initial condition at Tstart; Output: the solution at T
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+!~~~> Input: integration interval
+   KPP_REAL, INTENT(IN) :: Tstart,Tend
+!~~~> Output: time at which the solution is returned (T=Tend if success)
+   KPP_REAL, INTENT(OUT) ::  T
+!~~~> Input: tolerances
+   KPP_REAL, INTENT(IN) ::  AbsTol(N), RelTol(N)
+!~~~> Input: integration parameters
+   LOGICAL, INTENT(IN) :: Autonomous, VectorTol
+   KPP_REAL, INTENT(IN) :: Hstart, Hmin, Hmax
+   INTEGER, INTENT(IN) :: Max_no_steps
+   KPP_REAL, INTENT(IN) :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables
+   KPP_REAL :: Ynew(N), Fcn0(N), Fcn(N)
+   KPP_REAL :: K(N*ros_S), dFdT(N)
+#ifdef FULL_ALGEBRA    
+   KPP_REAL :: Jac0(N,N), Ghimj(N,N)
+#else
+   KPP_REAL :: Jac0(LU_NONZERO), Ghimj(LU_NONZERO)
+#endif
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau
+   KPP_REAL :: Err, Yerr(N)
+   INTEGER :: Pivot(N), Direction, ioffset, j, istage
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0_dp, ONE  = 1.0_dp
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0E-5_dp
+!~~~>  Locally called functions
+!    KPP_REAL WLAMCH
+!    EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = ZERO
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.0_dp*Roundoff) H = DeltaMin
+
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+
+!~~~> Time loop begins below
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) )
+
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1_dp*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+
+!~~~>  Limit H if necessary to avoid going beyond Tend
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL FunTemplate(T,Y,Fcn0)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+   END IF
+
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T,Y,Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO
+
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1), &
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+N)
+       ioffset = N*(istage-1)
+
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         !slim: CALL WCOPY(N,Fcn0,1,Fcn,1)
+	 Fcn(1:N) = Fcn0(1:N)
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         !slim: CALL WCOPY(N,Y,1,Ynew,1)
+	 Ynew(1:N) = Y(1:N)
+         DO j = 1, istage-1
+           CALL WAXPY(N,ros_A((istage-1)*(istage-2)/2+j), &
+            K(N*(j-1)+1),1,Ynew,1)
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL FunTemplate(Tau,Ynew,Fcn)
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+       !slim: CALL WCOPY(N,Fcn,1,K(ioffset+1),1)
+       K(ioffset+1:ioffset+N) = Fcn(1:N)
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(N,HC,K(N*(j-1)+1),1,K(ioffset+1),1)
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(N,HG,dFdT,1,K(ioffset+1),1)
+       END IF
+       CALL ros_Solve(Ghimj, Pivot, K(ioffset+1))
+
+   END DO Stage
+
+
+!~~~>  Compute the new solution
+   !slim: CALL WCOPY(N,Y,1,Ynew,1)
+   Ynew(1:N) = Y(1:N)
+   DO j=1,ros_S
+         CALL WAXPY(N,ros_M(j),K(N*(j-1)+1),1,Ynew,1)
+   END DO
+
+!~~~>  Compute the error estimation
+   !slim: CALL WSCAL(N,ZERO,Yerr,1)
+   Yerr(1:N) = ZERO
+   DO j=1,ros_S
+        CALL WAXPY(N,ros_E(j),K(N*(j-1)+1),1,Yerr,1)
+   END DO
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac
+
+!~~~>  Check the error magnitude and adjust step size
+   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      !slim: CALL WCOPY(N,Ynew,1,Y,1)
+      Y(1:N) = Ynew(1:N)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H)
+      END IF
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.
+      RejectMoreH = .FALSE.
+      H = Hnew
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1)  ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+   END IF ! Err <= 1
+
+   END DO UntilAccepted
+
+   END DO TimeLoop
+
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, &
+                               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+
+! Input arguments
+   KPP_REAL, INTENT(IN) :: Y(N), Ynew(N), &
+          Yerr(N), AbsTol(N), RelTol(N)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables
+   KPP_REAL :: Err, Scale, Ymax
+   INTEGER  :: i
+   KPP_REAL, PARAMETER :: ZERO = 0.0_dp
+
+   Err = ZERO
+   DO i=1,N
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/N)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+
+  END FUNCTION ros_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+
+!~~~> Input arguments
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(N), Fcn0(N)
+!~~~> Output arguments
+   KPP_REAL, INTENT(OUT) :: dFdT(N)
+!~~~> Local variables
+   KPP_REAL :: Delta
+   KPP_REAL, PARAMETER :: ONE = 1.0_dp, DeltaMin = 1.0E-6_dp
+
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL FunTemplate(T+Delta,Y,dFdT)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+   CALL WAXPY(N,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(N,(ONE/Delta),dFdT,1)
+
+  END SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE
+
+!~~~> Input arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) ::  Jac0(N,N)
+#else
+   KPP_REAL, INTENT(IN) ::  Jac0(LU_NONZERO)
+#endif   
+   KPP_REAL, INTENT(IN) ::  gam
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(OUT) :: Ghimj(N,N)
+#else
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+#endif   
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(N)
+!~~~> Inout arguments
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables
+   INTEGER  :: i, ISING, Nconsecutive
+   KPP_REAL :: ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0_dp, HALF = 0.5_dp
+
+   Nconsecutive = 0
+   Singular = .TRUE.
+
+   DO WHILE (Singular)
+
+!~~~>    Construct Ghimj = 1/(H*gam) - Jac0
+#ifdef FULL_ALGEBRA    
+     !slim: CALL WCOPY(N*N,Jac0,1,Ghimj,1)
+     !slim: CALL WSCAL(N*N,(-ONE),Ghimj,1)
+     Ghimj = -Jac0
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,N
+       Ghimj(i,i) = Ghimj(i,i)+ghinv
+     END DO
+#else
+     !slim: CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     !slim: CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     Ghimj(1:LU_NONZERO) = -Jac0(1:LU_NONZERO)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,N
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+#endif   
+!~~~>    Compute LU decomposition
+     CALL ros_Decomp( Ghimj, Pivot, ISING )
+     IF (ISING == 0) THEN
+!~~~>    If successful done
+        Singular = .FALSE.
+     ELSE ! ISING .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        ISTATUS(Nsng) = ISTATUS(Nsng) + 1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE.
+        PRINT*,'Warning: LU Decomposition returned ISING = ',ISING
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decompositions
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ISING
+
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Decomp( A, Pivot, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the LU decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Inout variables
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(INOUT) :: A(N,N)
+#else   
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+#endif
+!~~~> Output variables
+   INTEGER, INTENT(OUT) :: Pivot(N), ISING
+
+#ifdef FULL_ALGEBRA    
+   CALL  DGETRF( N, N, A, N, Pivot, ISING )
+#else   
+   CALL KppDecomp ( A, ISING )
+   Pivot(1) = 1
+#endif
+   ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+  END SUBROUTINE ros_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Solve( A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Input variables
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) :: A(N,N)
+   INTEGER :: ISING
+#else   
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+#endif
+   INTEGER, INTENT(IN) :: Pivot(N)
+!~~~> InOut variables
+   KPP_REAL, INTENT(INOUT) :: b(N)
+
+#ifdef FULL_ALGEBRA    
+   CALL  DGETRS( 'N', N , 1, A, N, Pivot, b, N, ISING )
+   IF ( Info < 0 ) THEN
+      PRINT*,"Error in DGETRS. ISING=",ISING
+   END IF  
+#else   
+   CALL KppSolve( A, b )
+#endif
+
+   ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+  END SUBROUTINE ros_Solve
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   DOUBLE PRECISION g
+
+    g = 1.0_dp + 1.0_dp/SQRT(2.0_dp)
+    rosMethod = RS2
+!~~~> Name of the method
+    ros_Name = 'ROS-2'
+!~~~> Number of stages
+    ros_S = 2
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+    ros_A(1) = (1.0_dp)/g
+    ros_C(1) = (-2.0_dp)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.0_dp)/(2.0_dp*g)
+    ros_M(2)= (1.0_dp)/(2.0_dp*g)
+! E_i = Coefficients for error estimator
+    ros_E(1) = 1.0_dp/(2.0_dp*g)
+    ros_E(2) = 1.0_dp/(2.0_dp*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0_dp
+    ros_Alpha(2) = 1.0_dp
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   rosMethod = RS3
+!~~~> Name of the method
+   ros_Name = 'ROS-3'
+!~~~> Number of stages
+   ros_S = 3
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+   ros_A(1)= 1.0_dp
+   ros_A(2)= 1.0_dp
+   ros_A(3)= 0.0_dp
+
+   ros_C(1) = -0.10156171083877702091975600115545E+01_dp
+   ros_C(2) =  0.40759956452537699824805835358067E+01_dp
+   ros_C(3) =  0.92076794298330791242156818474003E+01_dp
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1E+01_dp
+   ros_M(2) =  0.61697947043828245592553615689730E+01_dp
+   ros_M(3) = -0.42772256543218573326238373806514_dp
+! E_i = Coefficients for error estimator
+   ros_E(1) =  0.5_dp
+   ros_E(2) = -0.29079558716805469821718236208017E+01_dp
+   ros_E(3) =  0.22354069897811569627360909276199_dp
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0_dp
+   ros_Alpha(2)= 0.43586652150845899941601945119356_dp
+   ros_Alpha(3)= 0.43586652150845899941601945119356_dp
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+   ros_Gamma(1)= 0.43586652150845899941601945119356_dp
+   ros_Gamma(2)= 0.24291996454816804366592249683314_dp
+   ros_Gamma(3)= 0.21851380027664058511513169485832E+01_dp
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+   rosMethod = RS4
+!~~~> Name of the method
+   ros_Name = 'ROS-4'
+!~~~> Number of stages
+   ros_S = 4
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+   ros_A(1) = 0.2000000000000000E+01_dp
+   ros_A(2) = 0.1867943637803922E+01_dp
+   ros_A(3) = 0.2344449711399156_dp
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0_dp
+
+   ros_C(1) =-0.7137615036412310E+01_dp
+   ros_C(2) = 0.2580708087951457E+01_dp
+   ros_C(3) = 0.6515950076447975_dp
+   ros_C(4) =-0.2137148994382534E+01_dp
+   ros_C(5) =-0.3214669691237626_dp
+   ros_C(6) =-0.6949742501781779_dp
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735E+01_dp
+   ros_M(2) = 0.2870493262186792_dp
+   ros_M(3) = 0.4353179431840180_dp
+   ros_M(4) = 0.1093502252409163E+01_dp
+!~~~> E_i  = Coefficients for error estimator
+   ros_E(1) =-0.2815431932141155_dp
+   ros_E(2) =-0.7276199124938920E-01_dp
+   ros_E(3) =-0.1082196201495311_dp
+   ros_E(4) =-0.1093502252409163E+01_dp
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0_dp
+   ros_Alpha(2) = 0.1145640000000000E+01_dp
+   ros_Alpha(3) = 0.6552168638155900_dp
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+   ros_Gamma(1) = 0.5728200000000000_dp
+   ros_Gamma(2) =-0.1769193891319233E+01_dp
+   ros_Gamma(3) = 0.7592633437920482_dp
+   ros_Gamma(4) =-0.1049021087100450_dp
+
+  END SUBROUTINE Ros4
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+   rosMethod = RD3
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'
+!~~~> Number of stages
+   ros_S = 4
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+   ros_A(1) = 0.0_dp
+   ros_A(2) = 2.0_dp
+   ros_A(3) = 0.0_dp
+   ros_A(4) = 2.0_dp
+   ros_A(5) = 0.0_dp
+   ros_A(6) = 1.0_dp
+
+   ros_C(1) = 4.0_dp
+   ros_C(2) = 1.0_dp
+   ros_C(3) =-1.0_dp
+   ros_C(4) = 1.0_dp
+   ros_C(5) =-1.0_dp
+   ros_C(6) =-(8.0_dp/3.0_dp)
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0_dp
+   ros_M(2) = 0.0_dp
+   ros_M(3) = 1.0_dp
+   ros_M(4) = 1.0_dp
+!~~~> E_i  = Coefficients for error estimator
+   ros_E(1) = 0.0_dp
+   ros_E(2) = 0.0_dp
+   ros_E(3) = 0.0_dp
+   ros_E(4) = 1.0_dp
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0_dp
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0_dp
+   ros_Alpha(2) = 0.0_dp
+   ros_Alpha(3) = 1.0_dp
+   ros_Alpha(4) = 1.0_dp
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+   ros_Gamma(1) = 0.5_dp
+   ros_Gamma(2) = 1.5_dp
+   ros_Gamma(3) = 0.0_dp
+   ros_Gamma(4) = 0.0_dp
+
+  END SUBROUTINE Rodas3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+    rosMethod = RD4
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'
+!~~~> Number of stages
+    ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000_dp
+    ros_Alpha(2) = 0.386_dp
+    ros_Alpha(3) = 0.210_dp
+    ros_Alpha(4) = 0.630_dp
+    ros_Alpha(5) = 1.000_dp
+    ros_Alpha(6) = 1.000_dp
+
+!~~~> Gamma_i = \sum_j  gamma_{i,j}
+    ros_Gamma(1) = 0.2500000000000000_dp
+    ros_Gamma(2) =-0.1043000000000000_dp
+    ros_Gamma(3) = 0.1035000000000000_dp
+    ros_Gamma(4) =-0.3620000000000023E-01_dp
+    ros_Gamma(5) = 0.0_dp
+    ros_Gamma(6) = 0.0_dp
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+    ros_A(1) = 0.1544000000000000E+01_dp
+    ros_A(2) = 0.9466785280815826_dp
+    ros_A(3) = 0.2557011698983284_dp
+    ros_A(4) = 0.3314825187068521E+01_dp
+    ros_A(5) = 0.2896124015972201E+01_dp
+    ros_A(6) = 0.9986419139977817_dp
+    ros_A(7) = 0.1221224509226641E+01_dp
+    ros_A(8) = 0.6019134481288629E+01_dp
+    ros_A(9) = 0.1253708332932087E+02_dp
+    ros_A(10) =-0.6878860361058950_dp
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0_dp
+
+    ros_C(1) =-0.5668800000000000E+01_dp
+    ros_C(2) =-0.2430093356833875E+01_dp
+    ros_C(3) =-0.2063599157091915_dp
+    ros_C(4) =-0.1073529058151375_dp
+    ros_C(5) =-0.9594562251023355E+01_dp
+    ros_C(6) =-0.2047028614809616E+02_dp
+    ros_C(7) = 0.7496443313967647E+01_dp
+    ros_C(8) =-0.1024680431464352E+02_dp
+    ros_C(9) =-0.3399990352819905E+02_dp
+    ros_C(10) = 0.1170890893206160E+02_dp
+    ros_C(11) = 0.8083246795921522E+01_dp
+    ros_C(12) =-0.7981132988064893E+01_dp
+    ros_C(13) =-0.3152159432874371E+02_dp
+    ros_C(14) = 0.1631930543123136E+02_dp
+    ros_C(15) =-0.6058818238834054E+01_dp
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0_dp
+    ros_M(6) = 1.0_dp
+
+!~~~> E_i  = Coefficients for error estimator
+    ros_E(1) = 0.0_dp
+    ros_E(2) = 0.0_dp
+    ros_E(3) = 0.0_dp
+    ros_E(4) = 0.0_dp
+    ros_E(5) = 0.0_dp
+    ros_E(6) = 1.0_dp
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0_dp
+
+  END SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Rang3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! STIFFLY-STABLE W METHOD OF ORDER 3, WITH 4 STAGES
+!
+! J. RANG and L. ANGERMANN
+! NEW ROSENBROCK W-METHODS OF ORDER 3
+! FOR PARTIAL DIFFERENTIAL ALGEBRAIC
+!        EQUATIONS OF INDEX 1                                             
+! BIT Numerical Mathematics (2005) 45: 761-787
+!  DOI: 10.1007/s10543-005-0035-y
+! Table 4.1-4.2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+
+    rosMethod = RG3
+!~~~> Name of the method
+    ros_Name = 'RANG-3'
+!~~~> Number of stages
+    ros_S = 4
+
+    ros_A(1) = 5.09052051067020d+00;
+    ros_A(2) = 5.09052051067020d+00;
+    ros_A(3) = 0.0d0;
+    ros_A(4) = 4.97628111010787d+00;
+    ros_A(5) = 2.77268164715849d-02;
+    ros_A(6) = 2.29428036027904d-01;
+
+    ros_C(1) = -1.16790812312283d+01;
+    ros_C(2) = -1.64057326467367d+01;
+    ros_C(3) = -2.77268164715850d-01;
+    ros_C(4) = -8.38103960500476d+00;
+    ros_C(5) = -8.48328409199343d-01;
+    ros_C(6) =  2.87009860433106d-01;
+
+    ros_M(1) =  5.22582761233094d+00;
+    ros_M(2) = -5.56971148154165d-01;
+    ros_M(3) =  3.57979469353645d-01;
+    ros_M(4) =  1.72337398521064d+00;
+
+    ros_E(1) = -5.16845212784040d+00;
+    ros_E(2) = -1.26351942603842d+00;
+    ros_E(3) = -1.11022302462516d-16;
+    ros_E(4) =  2.22044604925031d-16;
+
+    ros_Alpha(1) = 0.0d00;
+    ros_Alpha(2) = 2.21878746765329d+00;
+    ros_Alpha(3) = 2.21878746765329d+00;
+    ros_Alpha(4) = 1.55392337535788d+00;
+
+    ros_Gamma(1) =  4.35866521508459d-01;
+    ros_Gamma(2) = -1.78292094614483d+00;
+    ros_Gamma(3) = -2.46541900496934d+00;
+    ros_Gamma(4) = -8.05529997906370d-01;
+
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 3.0_dp
+
+  END SUBROUTINE Rang3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   End of the set of internal Rosenbrock subroutines
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+END SUBROUTINE Rosenbrock
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+ USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+ USE KPP_ROOT_Function, ONLY: Fun
+ USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+!~~~> Input variables
+   KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables
+   KPP_REAL :: Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL :: Told
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+
+END SUBROUTINE FunTemplate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+ USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+ USE KPP_ROOT_Jacobian, ONLY: Jac_SP, LU_IROW, LU_ICOL
+ USE KPP_ROOT_LinearAlgebra
+ USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST
+!~~~> Input variables
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), Jcb(NVAR,NVAR)
+#else
+    KPP_REAL :: Jcb(LU_NONZERO)
+#endif   
+!~~~> Local variables
+    KPP_REAL :: Told
+#ifdef FULL_ALGEBRA    
+    INTEGER :: i, j
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(Y, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         Jcb(i,j) = 0.0_dp
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       Jcb(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+#endif   
+    TIME = Told
+
+END SUBROUTINE JacTemplate
+
+END MODULE KPP_ROOT_Integrator
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.m
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.m	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock.m	(revision 3477)
@@ -0,0 +1,986 @@
+function [T, Y, RCNTRL, ICNTRL, RSTAT, ISTAT] = ...
+    Rosenbrock(Function, Tspan, Y0, Options, RCNTRL, ICNTRL)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Rosenbrock - Implementation of several Rosenbrock methods:
+%               * Ros2                                                
+%               * Ros3                                                
+%               * Ros4                                                
+%               * Rodas3                                              
+%               * Rodas4                                              
+%                                                                     
+%    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+%                                                                     
+%     G = 1/(H*gamma(1)) - Jac(t0,Y0)                                 
+%     T_i = t0 + Alpha(i)*H                                           
+%     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+%     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+%         gamma(i)*dF/dT(t0, Y0)
+%     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j
+%
+%    For details on Rosenbrock methods and their implementation consult:
+%      E. Hairer and G. Wanner
+%      "Solving ODEs II. Stiff and differential-algebraic problems".
+%      Springer series in computational mathematics, Springer-Verlag, 1996.
+%    The codes contained in the book inspired this implementation.
+%
+%    MATLAB implementation (C) John C. Linford (jlinford@vt.edu).      
+%    Virginia Polytechnic Institute and State University             
+%    November, 2009    
+%
+%    Based on the Fortran90 implementation (C) Adrian Sandu, August 2004
+%    and revised by Philipp Miehe and Adrian Sandu, May 2006.
+%    Virginia Polytechnic Institute and State University
+%    Contact: sandu@cs.vt.edu
+%
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Input Arguments :
+%  The first four arguments are similar to the input arguments of 
+%  MATLAB's ODE solvers
+%      Function  - A function handle for the ODE function
+%      Tspan     - The time space to integrate
+%      Y0        - Initial value
+%      Options   - ODE solver options created by odeset():           
+%                  AbsTol, InitialStep, Jacobian, MaxStep, and RelTol
+%                  are considered.  Other options are ignored.       
+%                  'Jacobian' must be set.                           
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Output Arguments:
+%  The first two arguments are similar to the output arguments of
+%  MATLAB's ODE solvers
+%      T         - A vector of final integration times.
+%      Y         - A matrix of function values.  Y(T(i),:) is the value of
+%                  the function at the ith output time.
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%      RSTAT     - real output parameters (explained below)
+%      ISTAT     - integer output parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RCNTRL and ICNTRL on input and output:
+%
+%    Note: For input parameters equal to zero the default values of the
+%       corresponding variables are used.
+%
+%    ICNTRL(1) = 1: F = F(y)   Independent of T (AUTONOMOUS)
+%              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+%
+%    ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+%              = 1: AbsTol, RelTol are scalars
+%
+%    ICNTRL(3)  -> selection of a particular Rosenbrock method
+%        = 0 :    Rodas3 (default)
+%        = 1 :    Ros2
+%        = 2 :    Ros3
+%        = 3 :    Ros4
+%        = 4 :    Rodas3
+%        = 5 :    Rodas4
+%
+%    ICNTRL(4)  -> maximum number of integration steps
+%        For ICNTRL(4)=0) the default value of 100000 is used
+%
+%    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+%          It is strongly recommended to keep Hmin = ZERO
+%    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+%    RCNTRL(3)  -> Hstart, starting value for the integration step size
+%
+%    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+%    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+%    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+%                          (default=0.1)
+%    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+%         than the predicted value  (default=0.9)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RSTAT and ISTAT on output:
+%
+%    ISTAT(1)  -> No. of function calls
+%    ISTAT(2)  -> No. of jacobian calls
+%    ISTAT(3)  -> No. of steps
+%    ISTAT(4)  -> No. of accepted steps
+%    ISTAT(5)  -> No. of rejected steps (except at very beginning)
+%    ISTAT(6)  -> No. of LU decompositions
+%    ISTAT(7)  -> No. of forward/backward substitutions
+%    ISTAT(8)  -> No. of singular matrix decompositions
+%
+%    RSTAT(1)  -> Texit, the time corresponding to the
+%                     computed Y upon return
+%    RSTAT(2)  -> Hexit, last accepted step before exit
+%    RSTAT(3)  -> Hnew, last predicted step (not yet taken)
+%                   For multiple restarts, use Hnew as Hstart
+%                     in the subsequent run
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%~~~>  Statistics on the work performed by the Rosenbrock method
+global Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew
+global ISTATUS RSTATUS
+
+% Parse ODE options
+AbsTol = odeget(Options, 'AbsTol');
+if isempty(AbsTol)
+    AbsTol = 1.0e-3;
+end
+Hstart = odeget(Options, 'InitialStep');
+if isempty(Hstart)
+    Hstart = 0;
+end
+Jacobian = odeget(Options, 'Jacobian');
+if isempty(Jacobian)
+    error('A Jacobian function is required.');
+end
+Hmax = odeget(Options, 'MaxStep');
+if isempty(Hmax)
+    Hmax = 0;
+end
+RelTol = odeget(Options, 'RelTol');
+if isempty(RelTol)
+    RelTol = 1.0e-4;
+end
+
+% Initialize statistics
+Nfun=1; Njac=2; Nstp=3; Nacc=4; Nrej=5; Ndec=6; Nsol=7; Nsng=8;
+Ntexit=1; Nhexit=2; Nhnew=3;
+RSTATUS = zeros(20,1);
+ISTATUS = zeros(20,1);
+
+% Get problem size
+steps = length(Tspan);
+N = length(Y0);
+
+% Initialize tolerances
+ATOL = ones(N,1)*AbsTol;
+RTOL = ones(N,1)*RelTol;
+
+% Initialize step
+RCNTRL(2) = max(0, Hmax);
+RCNTRL(3) = max(0, Hstart);
+
+% Integrate
+Y = zeros(steps,N);
+T = zeros(steps,1);
+Y(1,:) = Y0;
+T(1) = Tspan(1);
+for i=2:steps
+    [T(i), Y(i,:), IERR] = ...
+        RosenbrockIntegrator(N, Y(i-1,:), T(i-1), Tspan(i), ...
+            Function, Jacobian, ATOL, RTOL, RCNTRL, ICNTRL);
+
+    if IERR < 0
+        error(['Rosenbrock exited with IERR=',num2str(IERR)]);
+    end
+
+end
+
+ISTAT = ISTATUS;
+RSTAT = RSTATUS;
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ T, Y, IERR ] = RosenbrockIntegrator(N, Y, Tstart, Tend, ...
+    OdeFunction, OdeJacobian, AbsTol, RelTol, RCNTRL, ICNTRL)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% Advances the ODE system defined by OdeFunction, OdeJacobian and Y
+% from time=Tstart to time=Tend
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%~~~>  Statistics on the work performed by the Rosenbrock method
+global Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew Ntotal
+global ISTATUS RSTATUS
+
+%~~~>   Parameters
+global ZERO ONE DeltaMin
+ZERO = 0.0; ONE = 1.0; DeltaMin = 1.0E-5;
+
+%~~~>  Initialize statistics
+ISTATUS(1:8) = 0;
+RSTATUS(1:3) = ZERO;
+
+%~~~>  Autonomous or time dependent ODE. Default is time dependent.
+Autonomous = ~(ICNTRL(1) == 0);
+
+%~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+%   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+if ICNTRL(2) == 0
+    VectorTol = true;
+    UplimTol  = N;
+else
+    VectorTol = false;
+    UplimTol  = 1;
+end
+
+%~~~>   Initialize the particular Rosenbrock method selected
+switch (ICNTRL(3))
+    case (1)
+        ros_Param = Ros2;
+    case (2)
+        ros_Param = Ros3;
+    case (3)
+        ros_Param = Ros4;
+    case {0,4}
+        ros_Param = Rodas3;
+    case (5)
+        ros_Param = Rodas4;
+    otherwise
+        disp(['Unknown Rosenbrock method: ICNTRL(3)=',num2str(ICNTRL(3))]);
+        IERR = ros_ErrorMsg(-2,Tstart,ZERO);
+        return
+end
+ros_S     = ros_Param{1};
+rosMethod = ros_Param{2};
+ros_A     = ros_Param{3};
+ros_C     = ros_Param{4};
+ros_M     = ros_Param{5};
+ros_E     = ros_Param{6};
+ros_Alpha = ros_Param{7};
+ros_Gamma = ros_Param{8};
+ros_ELO   = ros_Param{9};
+ros_NewF  = ros_Param{10};
+ros_Name  = ros_Param{11};
+
+%~~~>   The maximum number of steps admitted
+if ICNTRL(4) == 0
+    Max_no_steps = 200000;
+elseif ICNTRL(4) > 0
+    Max_no_steps=ICNTRL(4);
+else
+    disp(['User-selected max no. of steps: ICNTRL(4)=',num2str(ICNTRL(4))]);
+    IERR = ros_ErrorMsg(-1,Tstart,ZERO);
+    return
+end
+
+%~~~>  Unit roundoff (1+Roundoff>1)
+Roundoff = eps;
+
+%~~~>  Lower bound on the step size: (positive value)
+if RCNTRL(1) == ZERO
+    Hmin = ZERO;
+elseif RCNTRL(1) > ZERO
+    Hmin = RCNTRL(1);
+else
+    disp(['User-selected Hmin: RCNTRL(1)=', num2str(RCNTRL(1))]);
+    IERR = ros_ErrorMsg(-3,Tstart,ZERO);
+    return
+end
+
+%~~~>  Upper bound on the step size: (positive value)
+if RCNTRL(2) == ZERO
+    Hmax = abs(Tend-Tstart);
+elseif RCNTRL(2) > ZERO
+    Hmax = min(abs(RCNTRL(2)),abs(Tend-Tstart));
+else
+    disp(['User-selected Hmax: RCNTRL(2)=', num2str(RCNTRL(2))]);
+    IERR = ros_ErrorMsg(-3,Tstart,ZERO);
+    return
+end
+
+%~~~>  Starting step size: (positive value)
+if RCNTRL(3) == ZERO
+    Hstart = max(Hmin,DeltaMin);
+elseif RCNTRL(3) > ZERO
+    Hstart = min(abs(RCNTRL(3)),abs(Tend-Tstart));
+else
+    disp(['User-selected Hstart: RCNTRL(3)=', num2str(RCNTRL(3))]);
+    IERR = ros_ErrorMsg(-3,Tstart,ZERO);
+    return
+end
+
+%~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax
+if RCNTRL(4) == ZERO
+    FacMin = 0.2;
+elseif RCNTRL(4) > ZERO
+    FacMin = RCNTRL(4);
+else
+    disp(['User-selected FacMin: RCNTRL(4)=', num2str(RCNTRL(4))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+if RCNTRL(5) == ZERO
+    FacMax = 6.0;
+elseif RCNTRL(5) > ZERO
+    FacMax = RCNTRL(5);
+else
+    disp(['User-selected FacMax: RCNTRL(5)=', num2str(RCNTRL(5))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+
+%~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+if RCNTRL(6) == ZERO
+    FacRej = 0.1;
+elseif RCNTRL(6) > ZERO
+    FacRej = RCNTRL(6);
+else
+    disp(['User-selected FacRej: RCNTRL(6)=', num2str(RCNTRL(6))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+
+%~~~>   FacSafe: Safety Factor in the computation of new step size
+if RCNTRL(7) == ZERO
+    FacSafe = 0.9;
+elseif RCNTRL(7) > ZERO
+    FacSafe = RCNTRL(7);
+else
+    disp(['User-selected FacSafe: RCNTRL(7)=', num2str(RCNTRL(7))]);
+    IERR = ros_ErrorMsg(-4,Tstart,ZERO);
+    return
+end
+
+%~~~>  Check if tolerances are reasonable
+for i=1:UplimTol
+    if  (AbsTol(i) <= ZERO) || (RelTol(i) <= 10.0*Roundoff) || (RelTol(i) >= 1.0)
+        disp([' AbsTol(',i,') = ',num2str(AbsTol(i))]);
+        disp([' RelTol(',i,') = ',num2str(RelTol(i))]);
+        IERR = ros_ErrorMsg(-5,Tstart,ZERO);
+        return
+    end
+end
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%   Template for the implementation of a generic Rosenbrock method
+%      defined by ros_S (no of stages)
+%      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+% ~~~~ Local variables
+Ynew  = zeros(N,1);
+Fcn0  = zeros(N,1);
+Fcn   = zeros(N,1);
+K     = zeros(N,ros_S);
+dFdT  = zeros(N,1);
+Jac0  = sparse(N,N);
+Ghimj = sparse(N,N);
+Yerr  = zeros(N,1);
+Pivot = zeros(N,1);
+
+%~~~>  Initial preparations
+T = Tstart;
+RSTATUS(Nhexit) = ZERO;
+H = min(max(abs(Hmin), abs(Hstart)), abs(Hmax));
+if abs(H) <= 10.0*Roundoff
+    H = DeltaMin;
+end
+
+if Tend >= Tstart
+    Direction = +1;
+else
+    Direction = -1;
+end
+H = Direction*H;
+
+RejectLastH = false;
+RejectMoreH = false;
+
+%~~~> Time loop begins below
+
+while ( (Direction > 0) && ((T-Tend)+Roundoff <= ZERO) || ...
+        (Direction < 0) && ((Tend-T)+Roundoff <= ZERO) )
+
+    if ISTATUS(Nstp) > Max_no_steps   % Too many steps
+        IERR = ros_ErrorMsg(-6,T,H);
+        return
+    end
+    if ((T+0.1*H) == T) || (H <= Roundoff)   % Step size too small
+        IERR = ros_ErrorMsg(-7,T,H);
+        return
+    end
+
+    %~~~>  Limit H if necessary to avoid going beyond Tend
+    H = min(H, abs(Tend-T));
+
+    %~~~>   Compute the function at current time
+    Fcn0 = OdeFunction(T, Y);
+    ISTATUS(Nfun) = ISTATUS(Nfun) + 1;
+
+    %~~~>  Compute the function derivative with respect to T
+    if ~Autonomous
+        dFdT = ros_FunTimeDerivative (T, OdeFunction, Roundoff, Y, Fcn0);
+    end
+
+    %~~~>   Compute the Jacobian at current time
+    Jac0 = OdeJacobian(T,Y);
+    ISTATUS(Njac) = ISTATUS(Njac) + 1;
+
+    %~~~>  Repeat step calculation until current step accepted
+    while(true)
+
+        [H, Ghimj, Pivot, Singular] = ...
+            ros_PrepareMatrix(N, H, Direction, ros_Gamma(1), Jac0);
+
+        % Not calculating LU decomposition in ros_PrepareMatrix anymore 
+        % so don't need to check if the matrix is singular
+        %
+        %if Singular % More than 5 consecutive failed decompositions
+        %    IERR = ros_ErrorMsg(-8,T,H);
+        %    return
+        %end
+
+        % For the 1st istage the function has been computed previously
+        Fcn = Fcn0;
+        K(:,1) = Fcn;
+        if (~Autonomous) && (ros_Gamma(1) ~= ZERO)
+            HG = Direction*H*ros_Gamma(1);
+            K(:,1) = K(:,1) + HG * dFdT;
+        end
+        K(:,1) = ros_Solve(Ghimj, Pivot, K(:,1));
+        
+        %~~~>   Compute the remaining stages
+        for istage=2:ros_S
+
+            % istage>1 and a new function evaluation is needed
+            if ros_NewF(istage)
+                Ynew = Y;
+                for j=1:istage-1
+                    Ynew = Ynew + ros_A((istage-1)*(istage-2)/2+j)*K(:,j)';
+                end
+                Tau = T + ros_Alpha(istage)*Direction*H;
+                Fcn = OdeFunction(Tau,Ynew);
+                ISTATUS(Nfun) = ISTATUS(Nfun) + 1;
+            end
+
+            K(:,istage) = Fcn;
+            for j=1:istage-1
+                HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H);
+                K(:,istage) = K(:,istage) + HC * K(:,j);
+            end
+            if (~Autonomous) && (ros_Gamma(istage) ~= ZERO)
+                HG = Direction*H*ros_Gamma(istage);
+                K(:,istage) = K(:,istage) + HG * dFdT;
+            end
+
+            % Linear system is solved here with MATLAB '\' operator
+            % instead of LU decomposition.
+            K(:,istage) = ros_Solve(Ghimj, Pivot, K(:,istage));
+
+        end
+
+        %~~~>  Compute the new solution
+        Ynew = Y;
+        for j=1:ros_S
+            Ynew = Ynew + ros_M(j) * K(:,j)';
+        end
+
+        %~~~>  Compute the error estimation
+        Yerr = zeros(N,1);
+        for j=1:ros_S
+            Yerr = Yerr + ros_E(j) * K(:,j);
+        end
+        Err = ros_ErrorNorm(N, Y, Ynew, Yerr, AbsTol, RelTol, VectorTol);
+
+        %~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+        Fac  = min(FacMax, max(FacMin, FacSafe/(Err^(ONE/ros_ELO))));
+        Hnew = H*Fac;
+
+        %~~~>  Check the error magnitude and adjust step size
+        ISTATUS(Nstp) = ISTATUS(Nstp) + 1;
+        if  (Err <= ONE) || (H <= Hmin)   %~~~> Accept step
+            ISTATUS(Nacc) = ISTATUS(Nacc) + 1;
+            Y = Ynew;
+            T = T + Direction*H;
+            Hnew = max(Hmin, min(Hnew, Hmax));
+            if RejectLastH  % No step size increase after a rejected step
+                Hnew = min(Hnew, H);
+            end
+            RSTATUS(Nhexit) = H;
+            RSTATUS(Nhnew)  = Hnew;
+            RSTATUS(Ntexit) = T;
+            RejectLastH = false;
+            RejectMoreH = false;
+            H = Hnew;
+            break % EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+        else           %~~~> Reject step
+            if RejectMoreH
+                Hnew = H*FacRej;
+            end
+            RejectMoreH = RejectLastH;
+            RejectLastH = true;
+            H = Hnew;
+            if ISTATUS(Nacc) >= 1
+                ISTATUS(Nrej) = ISTATUS(Nrej) + 1;
+            end
+        end % Err <= 1
+
+    end % UntilAccepted
+
+end % TimeLoop
+
+%~~~> Succesful exit
+IERR = 1;  %~~~> The integration was successful
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ ErrNorm ] = ros_ErrorNorm(N, Y, Ynew, Yerr, AbsTol, RelTol, VectorTol)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%~~~> Computes the "scaled norm" of the error vector Yerr
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Err = 0;
+for i=1:N
+    Ymax = max(abs(Y(i)), abs(Ynew(i)));
+    if VectorTol
+        Scale = AbsTol(i) + RelTol(i)*Ymax;
+    else
+        Scale = AbsTol(1) + RelTol(1)*Ymax;
+    end
+    Err = Err + (Yerr(i)/Scale)^2;
+end
+Err = sqrt(Err/N);
+ErrNorm = max(Err,1.0e-10);
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ dFdT ] = ros_FunTimeDerivative (T, OdeFunction, Roundoff, Y, Fcn0)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%~~~> The time partial derivative of the function by finite differences
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%~~~>  Statistics on the work performed by the Rosenbrock method
+global Nfun ISTATUS
+
+%~~~>   Parameters
+global ZERO ONE DeltaMin
+
+Delta = sqrt(Roundoff) * max(DeltaMin, abs(T));
+dFdT = OdeFunction(T+Delta,Y);
+ISTATUS(Nfun) = ISTATUS(Nfun) + 1;
+dFdT = (dFdT - Fcn0) / Delta;
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [H, Ghimj, Pivot, Singular] = ...
+    ros_PrepareMatrix(N, H, Direction, gam, Jac0)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Prepares the LHS matrix for stage calculations
+%  1.  Construct Ghimj = 1/(H*ham) - Jac0
+%      "(Gamma H) Inverse Minus Jacobian"
+%  2.  LU decomposition not performed here because
+%      MATLAB solves the linear system with '\'.
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Ghimj = -Jac0;
+ghinv = 1.0/(Direction*H*gam);
+for i=1:N
+    Ghimj(i,i) = Ghimj(i,i)+ghinv;
+end
+
+Pivot(1) = 1;
+Singular = false;
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ IERR ] = ros_ErrorMsg(Code, T, H)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%    Handles all error messages
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+IERR = Code;
+
+disp('Forced exit from Rosenbrock due to the following error:');
+
+switch (Code)
+    case (-1)
+        disp('--> Improper value for maximal no of steps');
+    case (-2)
+        disp('--> Selected Rosenbrock method not implemented');
+    case (-3)
+        disp('--> Hmin/Hmax/Hstart must be positive');
+    case (-4)
+        disp('--> FacMin/FacMax/FacRej must be positive');
+    case (-5)
+        disp('--> Improper tolerance values');
+    case (-6)
+        disp('--> No of steps exceeds maximum bound');
+    case (-7)
+        disp('--> Step size too small: T + 10*H = T or H < Roundoff');
+    case (-8)
+        disp('--> Matrix is repeatedly singular');
+    otherwise
+        disp(['Unknown Error code: ', num2str(Code)]);
+end
+
+disp(['T=',num2str(T),' and H=',num2str(H)]);
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [X] = ros_Solve(JVS, Pivot, X)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Template for the forward/backward substitution 
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+global Nsol ISTATUS
+
+X = JVS\X;
+Pivot(1) = 1;
+ISTATUS(Nsol) = ISTATUS(Nsol) + 1;
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Ros2()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% --- AN L-STABLE METHOD, 2 stages, order 2
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+g = 1.0 + 1.0/sqrt(2.0);
+rosMethod = 1;
+%~~~> Name of the method
+ros_Name = 'ROS-2';
+%~~~> Number of stages
+ros_S = 2;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = (1.0)/g;
+ros_C(1) = (-2.0)/g;
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1) = true;
+ros_NewF(2) = true;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1)= (3.0)/(2.0*g);
+ros_M(2)= (1.0)/(2.0*g);
+% E_i = Coefficients for error estimator
+ros_E(1) = 1.0/(2.0*g);
+ros_E(2) = 1.0/(2.0*g);
+%~~~> ros_ELO = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus one
+ros_ELO = 2.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.0;
+ros_Alpha(2) = 1.0;
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = g;
+ros_Gamma(2) =-g;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Ros3()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 2;
+%~~~> Name of the method
+ros_Name = 'ROS-3';
+%~~~> Number of stages
+ros_S = 3;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1)= 1.0;
+ros_A(2)= 1.0;
+ros_A(3)= 0.0;
+
+ros_C(1) = -0.10156171083877702091975600115545E+01;
+ros_C(2) =  0.40759956452537699824805835358067E+01;
+ros_C(3) =  0.92076794298330791242156818474003E+01;
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1) = true;
+ros_NewF(2) = true;
+ros_NewF(3) = false;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) =  0.1E+01;
+ros_M(2) =  0.61697947043828245592553615689730E+01;
+ros_M(3) = -0.42772256543218573326238373806514;
+% E_i = Coefficients for error estimator
+ros_E(1) =  0.5;
+ros_E(2) = -0.29079558716805469821718236208017E+01;
+ros_E(3) =  0.22354069897811569627360909276199;
+%~~~> ros_ELO = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus 1
+ros_ELO = 3.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1)= 0.0;
+ros_Alpha(2)= 0.43586652150845899941601945119356;
+ros_Alpha(3)= 0.43586652150845899941601945119356;
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1)= 0.43586652150845899941601945119356;
+ros_Gamma(2)= 0.24291996454816804366592249683314;
+ros_Gamma(3)= 0.21851380027664058511513169485832E+01;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Ros4()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+%     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+%
+%      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+%      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+%      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+%      SPRINGER-VERLAG (1990)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 3;
+%~~~> Name of the method
+ros_Name = 'ROS-4';
+%~~~> Number of stages
+ros_S = 4;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = 0.2000000000000000E+01;
+ros_A(2) = 0.1867943637803922E+01;
+ros_A(3) = 0.2344449711399156;
+ros_A(4) = ros_A(2);
+ros_A(5) = ros_A(3);
+ros_A(6) = 0.0;
+
+ros_C(1) =-0.7137615036412310E+01;
+ros_C(2) = 0.2580708087951457E+01;
+ros_C(3) = 0.6515950076447975;
+ros_C(4) =-0.2137148994382534E+01;
+ros_C(5) =-0.3214669691237626;
+ros_C(6) =-0.6949742501781779;
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1)  = true;
+ros_NewF(2)  = true;
+ros_NewF(3)  = true;
+ros_NewF(4)  = false;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) = 0.2255570073418735E+01;
+ros_M(2) = 0.2870493262186792;
+ros_M(3) = 0.4353179431840180;
+ros_M(4) = 0.1093502252409163E+01;
+%~~~> E_i  = Coefficients for error estimator
+ros_E(1) =-0.2815431932141155;
+ros_E(2) =-0.7276199124938920E-01;
+ros_E(3) =-0.1082196201495311;
+ros_E(4) =-0.1093502252409163E+01;
+%~~~> ros_ELO  = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus 1
+ros_ELO  = 4.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.0;
+ros_Alpha(2) = 0.1145640000000000E+01;
+ros_Alpha(3) = 0.6552168638155900;
+ros_Alpha(4) = ros_Alpha(3);
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = 0.5728200000000000;
+ros_Gamma(2) =-0.1769193891319233E+01;
+ros_Gamma(3) = 0.7592633437920482;
+ros_Gamma(4) =-0.1049021087100450;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Rodas3()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 4;
+%~~~> Name of the method
+ros_Name = 'RODAS-3';
+%~~~> Number of stages
+ros_S = 4;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:
+%       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = 0.0;
+ros_A(2) = 2.0;
+ros_A(3) = 0.0;
+ros_A(4) = 2.0;
+ros_A(5) = 0.0;
+ros_A(6) = 1.0;
+
+ros_C(1) = 4.0;
+ros_C(2) = 1.0;
+ros_C(3) =-1.0;
+ros_C(4) = 1.0;
+ros_C(5) =-1.0;
+ros_C(6) =-(8.0/3.0);
+
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1)  = true;
+ros_NewF(2)  = false;
+ros_NewF(3)  = true;
+ros_NewF(4)  = true;
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) = 2.0;
+ros_M(2) = 0.0;
+ros_M(3) = 1.0;
+ros_M(4) = 1.0;
+%~~~> E_i  = Coefficients for error estimator
+ros_E(1) = 0.0;
+ros_E(2) = 0.0;
+ros_E(3) = 0.0;
+ros_E(4) = 1.0;
+%~~~> ros_ELO  = estimator of local order - the minimum between the
+%    main and the embedded scheme orders plus 1
+ros_ELO  = 3.0;
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.0;
+ros_Alpha(2) = 0.0;
+ros_Alpha(3) = 1.0;
+ros_Alpha(4) = 1.0;
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = 0.5;
+ros_Gamma(2) = 1.5;
+ros_Gamma(3) = 0.0;
+ros_Gamma(4) = 0.0;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+function [ params ] = Rodas4()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+%
+%      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+%      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+%      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+%      SPRINGER-VERLAG (1996)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+rosMethod = 5;
+%~~~> Name of the method
+ros_Name = 'RODAS-4';
+%~~~> Number of stages
+ros_S = 6;
+
+%~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+ros_Alpha(1) = 0.000;
+ros_Alpha(2) = 0.386;
+ros_Alpha(3) = 0.210;
+ros_Alpha(4) = 0.630;
+ros_Alpha(5) = 1.000;
+ros_Alpha(6) = 1.000;
+
+%~~~> Gamma_i = \sum_j  gamma_{i,j}
+ros_Gamma(1) = 0.2500000000000000;
+ros_Gamma(2) =-0.1043000000000000;
+ros_Gamma(3) = 0.1035000000000000;
+ros_Gamma(4) =-0.3620000000000023E-01;
+ros_Gamma(5) = 0.0;
+ros_Gamma(6) = 0.0;
+
+%~~~> The coefficient matrices A and C are strictly lower triangular.
+%   The lower triangular (subdiagonal) elements are stored in row-wise order:
+%   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+%   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )
+%                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )
+
+ros_A(1) = 0.1544000000000000E+01;
+ros_A(2) = 0.9466785280815826;
+ros_A(3) = 0.2557011698983284;
+ros_A(4) = 0.3314825187068521E+01;
+ros_A(5) = 0.2896124015972201E+01;
+ros_A(6) = 0.9986419139977817;
+ros_A(7) = 0.1221224509226641E+01;
+ros_A(8) = 0.6019134481288629E+01;
+ros_A(9) = 0.1253708332932087E+02;
+ros_A(10) =-0.6878860361058950;
+ros_A(11) = ros_A(7);
+ros_A(12) = ros_A(8);
+ros_A(13) = ros_A(9);
+ros_A(14) = ros_A(10);
+ros_A(15) = 1.0;
+
+ros_C(1) =-0.5668800000000000E+01;
+ros_C(2) =-0.2430093356833875E+01;
+ros_C(3) =-0.2063599157091915;
+ros_C(4) =-0.1073529058151375;
+ros_C(5) =-0.9594562251023355E+01;
+ros_C(6) =-0.2047028614809616E+02;
+ros_C(7) = 0.7496443313967647E+01;
+ros_C(8) =-0.1024680431464352E+02;
+ros_C(9) =-0.3399990352819905E+02;
+ros_C(10) = 0.1170890893206160E+02;
+ros_C(11) = 0.8083246795921522E+01;
+ros_C(12) =-0.7981132988064893E+01;
+ros_C(13) =-0.3152159432874371E+02;
+ros_C(14) = 0.1631930543123136E+02;
+ros_C(15) =-0.6058818238834054E+01;
+
+%~~~> M_i = Coefficients for new step solution
+ros_M(1) = ros_A(7);
+ros_M(2) = ros_A(8);
+ros_M(3) = ros_A(9);
+ros_M(4) = ros_A(10);
+ros_M(5) = 1.0;
+ros_M(6) = 1.0;
+
+%~~~> E_i  = Coefficients for error estimator
+ros_E(1) = 0.0;
+ros_E(2) = 0.0;
+ros_E(3) = 0.0;
+ros_E(4) = 0.0;
+ros_E(5) = 0.0;
+ros_E(6) = 1.0;
+
+%~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+%   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+ros_NewF(1) = true;
+ros_NewF(2) = true;
+ros_NewF(3) = true;
+ros_NewF(4) = true;
+ros_NewF(5) = true;
+ros_NewF(6) = true;
+
+%~~~> ros_ELO  = estimator of local order - the minimum between the
+%        main and the embedded scheme orders plus 1
+ros_ELO = 4.0;
+
+params = { ros_S, rosMethod, ros_A, ros_C, ros_M, ros_E, ...
+    ros_Alpha, ros_Gamma, ros_ELO, ros_NewF, ros_Name };
+
+return
+
+% End of INTEGRATE function
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.c	(revision 3477)
@@ -0,0 +1,2470 @@
+#define MAX(a,b) ( ((a) >= (b)) ? (a):(b)  )
+#define MIN(b,c) ( ((b) < (c))  ? (b):(c)  )
+#define ABS(x)	 ( ((x) >= 0 )  ? (x):(-x) )
+#define SQRT(d)  ( pow((d),0.5) )
+
+/* Numerical Constants */
+#define ZERO	    (KPP_REAL)0.0
+#define ONE	    (KPP_REAL)1.0
+#define HALF        (KPP_REAL)0.5
+#define DeltaMin    (KPP_REAL)1.0e-5
+enum boolean { FALSE=0, TRUE=1 };
+
+/*  Statistics on the work performed by the Rosenbrock method */
+enum statistics { Nfun=1, Njac=2, Nstp=3, Nacc=4, Nrej=5, Ndec=6, Nsol=7, 
+		  Nsng=8, Ntexit=1, Nhexit=2, Nhnew=3 };
+
+/*~~~>  Parameters of the Rosenbrock method, up to 6 stages */
+int ros_S, rosMethod;
+enum ros_Params { RS2=1, RS3=2, RS4=3, RD3=4, RD4=5 };
+KPP_REAL ros_A[15], ros_C[15], ros_M[6], ros_E[6], ros_Alpha[6], ros_Gamma[6], 
+       ros_ELO;
+int ros_NewF[6]; /* Holds Boolean values */
+char ros_Name[12]; /* Length 12 */
+
+/*~~~>  Types of Adjoints Implemented */
+enum adjoint { Adj_none=1, Adj_discrete=2, Adj_continuous=3, 
+	       Adj_simple_continuous=4 };
+
+/*~~~>  Checkpoints in memory */
+int bufsize = 200000;
+int stack_ptr; /* last written entry */
+KPP_REAL *chk_H, *chk_T;
+KPP_REAL **chk_Y, **chk_K, **chk_J; /* 2D arrays */
+KPP_REAL **chk_dY, **chk_d2Y; /* 2D arrays */
+
+/* Function Headers */
+void INTEGRATE_ADJ(int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		   KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		   KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		   KPP_REAL RCNTRL_U[], int ISTATUS_U[], KPP_REAL RSTATUS_U[]);
+int RosenbrockADJ( KPP_REAL Y[], int NADJ, KPP_REAL Lambda[][NVAR],
+		   KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL AbsTol[], 
+		   KPP_REAL RelTol[], KPP_REAL AbsTol_adj[][NVAR], 
+		   KPP_REAL RelTol_adj[][NVAR], KPP_REAL RCNTRL[], 
+		   int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[] );
+void ros_AllocateDBuffers( int S, int SaveLU );
+void ros_FreeDBuffers( int SaveLU );
+void ros_AllocateCBuffers();
+void ros_FreeCBuffers();
+void ros_DPush( int S, KPP_REAL T, KPP_REAL H, KPP_REAL Ystage[], 
+		KPP_REAL K[], KPP_REAL E[], int P[], int SaveLU );
+void ros_DPop( int S, KPP_REAL* T, KPP_REAL* H, KPP_REAL* Ystage, 
+	       KPP_REAL* K, KPP_REAL* E, int* P, int SaveLU );
+void ros_CPush( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+		KPP_REAL d2Y[] );
+void ros_CPop( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+	       KPP_REAL d2Y[] );
+int ros_ErrorMsg( int Code, KPP_REAL T, KPP_REAL H);
+int ros_FwdInt (KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL T, 
+		KPP_REAL AbsTol[], KPP_REAL RelTol[], int AdjointType, 
+		KPP_REAL Hmin, KPP_REAL Hstart, KPP_REAL Hmax, 
+		KPP_REAL Roundoff, int ISTATUS[], int Max_no_steps, 
+		KPP_REAL RSTATUS[], int Autonomous, int VectorTol, 
+		KPP_REAL FacMax, KPP_REAL FacMin, KPP_REAL FacSafe, 
+		KPP_REAL FacRej, int SaveLU);
+int ros_DadjInt ( int NADJ, KPP_REAL Lambda[][NVAR], KPP_REAL Tstart, 
+		  KPP_REAL Tend, KPP_REAL T, int SaveLU, int ISTATUS[], 
+		  KPP_REAL Roundoff, int Autonomous);
+int ros_CadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart, KPP_REAL Tend,
+		  KPP_REAL T, KPP_REAL AbsTol_adj[][NVAR], 
+		  KPP_REAL RelTol_adj[][NVAR], KPP_REAL RSTATUS[], 
+		  KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, int Max_no_steps, int Autonomous, 
+		  int VectorTol, KPP_REAL FacMax, KPP_REAL FacMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacRej, int ISTATUS[] );
+int ros_SimpleCadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart, 
+			KPP_REAL Tend, KPP_REAL T, int ISTATUS[], 
+			int Autonomous,	KPP_REAL Roundoff );
+KPP_REAL ros_ErrorNorm ( KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[], 
+		       KPP_REAL AbsTol[], KPP_REAL RelTol[], int VectorTol );
+void ros_FunTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[], 
+			     KPP_REAL Fcn0[], KPP_REAL dFdT[], int ISTATUS[] );
+void ros_JacTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[], 
+			     KPP_REAL Jac0[], KPP_REAL dJdT[], int ISTATUS[] );
+int ros_PrepareMatrix ( KPP_REAL H, int Direction, KPP_REAL gam, 
+			 KPP_REAL Jac0[], KPP_REAL Ghimj[], int Pivot[], 
+			 int ISTATUS[] );
+void ros_Decomp( KPP_REAL A[], int Pivot[], int* ising, int ISTATUS[] );
+void ros_Solve( char How, KPP_REAL A[], int Pivot[], KPP_REAL b[], 
+		int ISTATUS[] );
+void ros_cadj_Y( KPP_REAL T, KPP_REAL Y[] );
+void ros_Hermite3( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[], 
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Y[] );
+void ros_Hermite5( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[], 
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Ha[], 
+		   KPP_REAL Hb[], KPP_REAL Y[] );
+void Ros2();
+void Ros3();
+void Ros4();
+void Rodas3();
+void Rodas4();
+void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Jcb[] );
+void HessTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Hes[] );
+void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Fun [] ); 
+void WSCAL( int N, KPP_REAL Alpha, KPP_REAL X[], int incX );
+void WAXPY( int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], 
+	    int incY );
+void WCOPY( int N, KPP_REAL X[], int incX, KPP_REAL Y[], int incY );
+KPP_REAL WLAMCH( char C );
+void Update_SUN();
+void Update_RCONST();
+void Fun( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+void Jac_SP( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+void Jac_SP_Vec( KPP_REAL Jac[], KPP_REAL Fcn[], KPP_REAL K[] );
+void JacTR_SP_Vec( KPP_REAL Jac[], KPP_REAL Fcn[], KPP_REAL K[] );
+void HessTR_Vec(KPP_REAL Hess[], KPP_REAL U1[], KPP_REAL U2[], KPP_REAL HTU[]);
+void KppSolve( KPP_REAL A[], KPP_REAL b[] );
+int KppDecomp( KPP_REAL A[] );
+void KppSolveTR( KPP_REAL JVS[], KPP_REAL X[], KPP_REAL XX[] );
+void Hessian( KPP_REAL V[], KPP_REAL F[], KPP_REAL RCT[], KPP_REAL Hess[] );
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*  Local Variables */
+  KPP_REAL RCNTRL[20], RSTATUS[20];
+  int ICNTRL[20], ISTATUS[20], IERR, i;
+
+  for( i = 0; i < 20; i++ ) {
+    ICNTRL[i]  = 0;
+    RCNTRL[i]  = ZERO;
+    ISTATUS[i] = 0;
+    RSTATUS[i] = ZERO;
+  }
+
+/*~~~> fine-tune the integrator:
+  ICNTRL(1) = 0       ! 0 = non-autonomous, 1 = autonomous
+  ICNTRL(2) = 1       ! 0 = scalar, 1 = vector tolerances
+  RCNTRL(3) = STEPMIN ! starting step
+  ICNTRL(3) = 5       ! choice of the method for forward integration
+  ICNTRL(6) = 1       ! choice of the method for continuous adjoint
+  ICNTRL(7) = 2       ! 1=none, 2=discrete, 3=full continuous, 
+                        4=simplified continuous adjoint
+  ICNTRL(8) = 1       ! Save fwd LU factorization: 0=*don't* save, 1=save */
+
+/* if optional parameters are given, and if they are >=0, then they overwrite 
+   default settings */
+//  if(ICNTRL_U != NULL) {
+//    for(i=0; i<20; i++)
+//	if(ICNTRL_U[i] > 0)
+//	  ICNTRL[i] = ICNTRL_U[i];
+//    } /* end for */
+//  } /* end if */
+
+//  if(RCNTRL_U != NULL) {
+//    for(i=0; i<20; i++)
+//	if(RCNTRL_U[i] > 0)
+//	  RCNTRL[i] = RCNTRL_U[i];
+//    } /* end for */
+//  } /* end if */
+
+  IERR = RosenbrockADJ( Y, NADJ, Lambda, TIN, TOUT, ATOL, RTOL, ATOL_adj, 
+			RTOL_adj, RCNTRL, ICNTRL, RSTATUS, ISTATUS );
+
+  if (IERR < 0)
+    printf( "RosenbrockADJ: Unsucessful step at T=%f (IERR=%d)", TIN, IERR );
+
+  STEPMIN = RSTATUS[Nhexit];
+
+/* if optional parameters are given for output 
+         copy to them to return information */
+//  if(ISTATUS_U != NULL)
+//    for(i=0; i<20; i++)
+//	ISTATUS_U[i] = ISTATUS[i];
+//  }
+
+//  if(RSTATUS_U != NULL)
+//    for(i=0; i<20; i++)
+//	RSTATUS_U[i] = RSTATUS[i];
+//  }
+
+} /* End of INTEGRATE_ADJ */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int RosenbrockADJ( KPP_REAL Y[], int NADJ, KPP_REAL Lambda[][NVAR],
+		   KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL AbsTol[], 
+		   KPP_REAL RelTol[], KPP_REAL AbsTol_adj[][NVAR],
+		   KPP_REAL RelTol_adj[][NVAR], KPP_REAL RCNTRL[],
+		   int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    ADJ = Adjoint of the Tangent Linear Model of a Rosenbrock Method
+
+    Solves the system y'=F(t,y) using a RosenbrockADJ method defined by:
+
+     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+     T_i = t0 + Alpha(i)*H
+     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+         gamma(i)*dF/dT(t0, Y0)
+     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+
+    For details on RosenbrockADJ methods and their implementation consult:
+      E. Hairer and G. Wanner
+      "Solving ODEs II. Stiff and differential-algebraic problems".
+      Springer series in computational mathematics, Springer-Verlag, 1996.  
+    The codes contained in the book inspired this implementation.
+
+    (C)  Adrian Sandu, August 2004
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    Revised by Philipp Miehe and Adrian Sandu, May 2006
+    Translation F90 to C by Paul Eller, April 2007
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>   INPUT ARGUMENTS:
+
+-     Y[NVAR]    = vector of initial conditions (at T=Tstart)
+      NADJ       -> dimension of linearized system,
+                   i.e. the number of sensitivity coefficients
+-     Lambda[NVAR][NADJ] -> vector of initial sensitivity conditions 
+                            (at T=Tstart)
+-    [Tstart,Tend]  = time range of integration
+     (if Tstart>Tend the integration is performed backwards in time)
+-    RelTol, AbsTol = user precribed accuracy
+- void Fun( T, Y, Ydot ) = ODE function,
+                       returns Ydot = Y' = F(T,Y)
+- void Jac( T, Y, Jcb ) = Jacobian of the ODE function,
+                       returns Jcb = dF/dY
+-    ICNTRL[0:9]    = integer inputs parameters
+-    RCNTRL[0:9]    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT ARGUMENTS:
+
+-    Y[NVAR]    -> vector of final states (at T->Tend)
+-    Lambda[NVAR][NADJ] -> vector of final sensitivities (at T=Tend)
+-    ICNTRL[9:18]   -> integer output parameters
+-    RCNTRL[9:18]   -> real output parameters
+-    IERR       -> job status upon return
+       - succes (positive value) or failure (negative value) -
+           =  1 : Success
+           = -1 : Improper value for maximal no of steps
+           = -2 : Selected RosenbrockADJ method not implemented
+           = -3 : Hmin/Hmax/Hstart must be positive
+           = -4 : FacMin/FacMax/FacRej must be positive
+           = -5 : Improper tolerance values
+           = -6 : No of steps exceeds maximum bound
+           = -7 : Step size too small
+           = -8 : Matrix is repeatedly singular
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     INPUT PARAMETERS:
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    ICNTRL[0]   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+
+    ICNTRL[1]   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+              = 1:  AbsTol, RelTol are scalars
+
+    ICNTRL[2]  -> selection of a particular Rosenbrock method
+        = 0 :  default method is Rodas3
+        = 1 :  method is  Ros2
+        = 2 :  method is  Ros3 
+        = 3 :  method is  Ros4 
+        = 4 :  method is  Rodas3
+        = 5:   method is  Rodas4
+
+    ICNTRL[3]  -> maximum number of integration steps
+        For ICNTRL[4]=0) the default value of BUFSIZE is used
+
+    ICNTRL[5]  -> selection of a particular Rosenbrock method for the
+                continuous adjoint integration - for cts adjoint it
+                can be different than the forward method ICNTRL(3)
+         Note 1: to avoid interpolation errors (which can be huge!) 
+                   it is recommended to use only ICNTRL[6] = 2 or 4
+         Note 2: the performance of the full continuous adjoint
+                   strongly depends on the forward solution accuracy Abs/RelTol
+
+    ICNTRL[6] -> Type of adjoint algorithm
+         = 0 : default is discrete adjoint ( of method ICNTRL[3] )
+         = 1 : no adjoint
+         = 2 : discrete adjoint ( of method ICNTRL[3] )
+         = 3 : fully adaptive continuous adjoint ( with method ICNTRL[6] )
+         = 4 : simplified continuous adjoint ( with method ICNTRL[6] )
+
+    ICNTRL[7]  -> checkpointing the LU factorization at each step:
+        ICNTRL[7]=0 : do *not* save LU factorization (the default)
+        ICNTRL[7]=1 : save LU factorization
+        Note: if ICNTRL[7]=1 the LU factorization is *not* saved
+
+~~~>  Real input parameters:
+
+    RCNTRL[0]  -> Hmin, lower bound for the integration step size
+          It is strongly recommended to keep Hmin = ZERO
+
+    RCNTRL[1]  -> Hmax, upper bound for the integration step size
+
+    RCNTRL[2]  -> Hstart, starting value for the integration step size
+
+    RCNTRL[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+
+    RCNTRL[4]  -> FacMax, upper bound on step increase factor (default=6)
+
+    RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+            (default=0.1)
+
+    RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+         than the predicted value  (default=0.9)
+
+    RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+                  than ThetaMin the Jacobian is not recomputed;
+                  (default=0.001)
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT PARAMETERS:
+
+    Note: each call to RosenbrockADJ adds the corrent no. of fcn calls
+      to previous value of ISTATUS(1), and similar for the other params.
+      Set ISTATUS[0:9] = 0 before call to avoid this accumulation.
+
+    ISTATUS[0] = No. of function calls
+    ISTATUS[1] = No. of jacobian calls
+    ISTATUS[2] = No. of steps
+    ISTATUS[3] = No. of accepted steps
+    ISTATUS[4] = No. of rejected steps (except at the beginning)
+    ISTATUS[5] = No. of LU decompositions
+    ISTATUS[6] = No. of forward/backward substitutions
+    ISTATUS[7] = No. of singular matrix decompositions
+
+    RSTATUS[0]  -> Texit, the time corresponding to the 
+                   computed Y upon return
+    RSTATUS[1]  -> Hexit, last accepted step before exit
+    For multiple restarts, use Hexit as Hstart in the following run
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  Local variables */
+  KPP_REAL Roundoff, FacMin, FacMax, FacRej, FacSafe;
+  KPP_REAL Hmin, Hmax, Hstart;
+  KPP_REAL Texit=0.0;
+  int i, UplimTol, Max_no_steps=0, IERR;
+  int AdjointType=0, CadjMethod=0;
+  int Autonomous, VectorTol, SaveLU; /* Holds boolean values */
+
+  stack_ptr = -1;
+
+/*~~~>  Initialize statistics */
+  for(i=0; i<20; i++) {
+    ISTATUS[i] = 0;
+    RSTATUS[i] = ZERO;
+  }
+
+/*~~~>  Autonomous or time dependent ODE. Default is time dependent. */
+  Autonomous = !(ICNTRL[0] == 0);
+
+/*~~~> For Scalar tolerances(ICNTRL[1] != 0) the code uses AbsTol[0] and 
+         RelTol[0]
+   For Vector tolerances(ICNTRL[1] == 0) the code uses AbsTol[1:NVAR] and 
+     RelTol[1:NVAR] */
+
+  if (ICNTRL[1] == 0) {
+    VectorTol = TRUE;
+    UplimTol  = NVAR;
+  }
+  else { 
+    VectorTol = FALSE;
+    UplimTol  = 1;
+  }
+
+/*~~~>   Initialize the particular Rosenbrock method selected */
+  switch( ICNTRL[2] ) {
+    case 0:
+    case 4:
+      Rodas3();
+      break;
+    case 1:
+      Ros2();
+      break;
+    case 2:
+      Ros3();
+      break;
+    case 3:
+      Ros4();
+      break;
+    case 5:
+      Rodas4();
+      break;
+    default:
+      printf( "Unknown Rosenbrock method: ICNTRL[2]=%d", ICNTRL[2] );
+      return ros_ErrorMsg(-2, Tstart, ZERO);
+  } /* End switch */
+
+/*~~~>   The maximum number of steps admitted */
+  if (ICNTRL[3] == 0)
+    Max_no_steps = bufsize - 1;
+  else if (Max_no_steps > 0)
+    Max_no_steps = ICNTRL[3];
+  else {
+    printf("User-selected max no. of steps: ICNTRL[3]=%d",ICNTRL[3] );
+    return ros_ErrorMsg(-1,Tstart,ZERO);
+  }
+
+/*~~~>The particular Rosenbrock method chosen for integrating the cts adjoint*/
+  if (ICNTRL[5] == 0)
+    CadjMethod = 4;
+  else if ( (ICNTRL[5] >= 1) && (ICNTRL[5] <= 5) )
+    CadjMethod = ICNTRL[5];
+  else {
+    printf( "Unknown CADJ Rosenbrock method: ICNTRL[5]=%d", CadjMethod );
+    return ros_ErrorMsg(-2,Tstart,ZERO);
+  }
+
+/*~~~>  Discrete or continuous adjoint formulation */
+  if ( ICNTRL[6] == 0 )
+    AdjointType = Adj_discrete;
+  else if ( (ICNTRL[6] >= 1) && (ICNTRL[6] <= 4) )
+    AdjointType = ICNTRL[6];
+  else {
+    printf( "User-selected adjoint type: ICNTRL[6]=%d", AdjointType );
+    return ros_ErrorMsg(-9,Tstart,ZERO);
+  }
+
+/*~~~> Save or not the forward LU factorization */
+  SaveLU = (ICNTRL[7] != 0);
+
+/*~~~>  Unit roundoff (1+Roundoff>1)  */
+  Roundoff = WLAMCH('E');
+
+/*~~~>  Lower bound on the step size: (positive value) */
+  if (RCNTRL[0] == ZERO)
+    Hmin = ZERO;
+  else if (RCNTRL[0] > ZERO)
+    Hmin = RCNTRL[0];
+  else {
+    printf( "User-selected Hmin: RCNTRL[0]=%f", RCNTRL[0] );
+    return ros_ErrorMsg(-3,Tstart,ZERO);
+  }
+
+/*~~~>  Upper bound on the step size: (positive value) */
+  if (RCNTRL[1] == ZERO)
+    Hmax = ABS(Tend-Tstart);
+  else if (RCNTRL[1] > ZERO)
+    Hmax = MIN(ABS(RCNTRL[1]),ABS(Tend-Tstart));
+  else {
+    printf( "User-selected Hmax: RCNTRL[1]=%f", RCNTRL[1] );
+    return ros_ErrorMsg(-3,Tstart,ZERO);
+  }
+
+/*~~~>  Starting step size: (positive value) */
+  if (RCNTRL[2] == ZERO) {
+    Hstart = MAX(Hmin,DeltaMin);
+  }
+  else if (RCNTRL[2] > ZERO)
+    Hstart = MIN(ABS(RCNTRL[2]),ABS(Tend-Tstart));
+  else {
+    printf( "User-selected Hstart: RCNTRL[2]=%f", RCNTRL[2] );
+    return ros_ErrorMsg(-3,Tstart,ZERO);
+  }
+
+/*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax */
+  if (RCNTRL[3] == ZERO)
+    FacMin = (KPP_REAL)0.2;
+  else if (RCNTRL[3] > ZERO)
+    FacMin = RCNTRL[3];
+  else {
+    printf( "User-selected FacMin: RCNTRL[3]=%f", RCNTRL[3] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+  if (RCNTRL[4] == ZERO)
+    FacMax = (KPP_REAL)6.0;
+  else if (RCNTRL[4] > ZERO)
+    FacMax = RCNTRL[4];
+  else {
+    printf( "User-selected FacMax: RCNTRL[4]=%f", RCNTRL[4] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+
+/*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+  if (RCNTRL[5] == ZERO)
+    FacRej = (KPP_REAL)0.1;
+  else if (RCNTRL[5] > ZERO)
+    FacRej = RCNTRL[5];
+  else {
+    printf( "User-selected FacRej: RCNTRL[5]=%f", RCNTRL[5] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+
+/*~~~>   FacSafe: Safety Factor in the computation of new step size */
+  if (RCNTRL[6] == ZERO)
+    FacSafe = (KPP_REAL)0.9;
+  else if (RCNTRL[6] > ZERO)
+    FacSafe = RCNTRL[6];
+  else {
+    printf( "User-selected FacSafe: RCNTRL[6]=%f", RCNTRL[6] );
+    return ros_ErrorMsg(-4,Tstart,ZERO);
+  }
+
+/*~~~>  Check if tolerances are reasonable */
+  for(i=0; i < UplimTol; i++) {
+    if ( (AbsTol[i] <= ZERO) || (RelTol[i] <= (KPP_REAL)10.0*Roundoff)
+	 || (RelTol[i] >= (KPP_REAL)1.0) ) {
+      printf( " AbsTol[%d] = %f", i, AbsTol[i] );
+      printf( " RelTol[%d] = %f", i, RelTol[i] );
+      return ros_ErrorMsg(-5,Tstart,ZERO);
+    }
+  }
+
+/*~~~>  Allocate checkpoint space or open checkpoint files */
+  if (AdjointType == Adj_discrete) {
+    ros_AllocateDBuffers( ros_S, SaveLU );
+  }
+  else if ( (AdjointType == Adj_continuous) || 
+	    (AdjointType == Adj_simple_continuous) ) {
+    ros_AllocateCBuffers();
+  }
+
+/*~~~>  CALL Forward Rosenbrock method */
+  IERR = ros_FwdInt(Y, Tstart, Tend, Texit, AbsTol, RelTol, AdjointType, Hmin,
+		    Hstart, Hmax, Roundoff, ISTATUS, Max_no_steps, 
+		    RSTATUS, Autonomous, VectorTol, FacMax, FacMin,
+		    FacSafe, FacRej, SaveLU);
+
+  printf( "\n\nFORWARD STATISTICS\n" );
+  printf( "Step=%d Acc=%d Rej=%d Singular=%d\n\n", Nstp, Nacc, Nrej, Nsng );
+
+/*~~~>  If Forward integration failed return */
+  if (IERR<0)
+    return IERR;
+
+/*~~~>   Initialize the particular Rosenbrock method for continuous adjoint */
+  if ( (AdjointType == Adj_continuous) || 
+       (AdjointType == Adj_simple_continuous) ) {
+    switch (CadjMethod) {
+      case 1:
+	Ros2();
+	break;
+      case 2:
+	Ros3();
+	break;
+      case 3:
+	Ros4();
+	break;
+      case 4:
+	Rodas3();
+	break;
+      case 5:
+	Rodas4();
+	break;
+      default:
+	printf( "Unknown Rosenbrock method: ICNTRL[2]=%d", ICNTRL[2] );
+	return ros_ErrorMsg(-2,Tstart,ZERO);
+    }
+  } /* End switch */
+
+  switch( AdjointType ) {
+    case Adj_discrete:
+      IERR = ros_DadjInt (NADJ, Lambda, Tstart, Tend, Texit, SaveLU, ISTATUS, 
+			  Roundoff, Autonomous );
+      break;
+    case Adj_continuous:
+      IERR = ros_CadjInt (NADJ, Lambda, Tend, Tstart, Texit, AbsTol_adj, 
+			  RelTol_adj, RSTATUS, Hmin, Hmax, Hstart, Roundoff,
+			  Max_no_steps, Autonomous, VectorTol, FacMax, FacMin,
+			  FacSafe, FacRej, ISTATUS);
+      break;
+    case Adj_simple_continuous:
+      IERR = ros_SimpleCadjInt (NADJ, Lambda, Tstart, Tend, Texit, ISTATUS, 
+				Autonomous, Roundoff);
+  } /* End switch for AdjointType */
+
+  printf( "ADJOINT STATISTICS\n" );
+  printf( "Step=%d Acc=%d Rej=%d Singular=%d\n",Nstp,Nacc,Nrej,Nsng );
+
+/*~~~>  Free checkpoint space or close checkpoint files */
+  if (AdjointType == Adj_discrete)
+    ros_FreeDBuffers( SaveLU );
+  else if ( (AdjointType == Adj_continuous) || 
+	    (AdjointType == Adj_simple_continuous) )
+    ros_FreeCBuffers();
+
+  return IERR;
+}
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_AllocateDBuffers( int S, int SaveLU ) {
+/*~~~>  Allocate buffer space for discrete adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    
+  int i;
+    
+  chk_H = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_H == NULL) {
+    printf("Failed allocation of buffer H");
+    exit(0);
+  }
+    
+  chk_T = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_T == NULL) {
+    printf("Failed allocation of buffer T");
+    exit(0);
+  }
+  
+  chk_Y = (KPP_REAL**) malloc(bufsize * sizeof(KPP_REAL*));
+  if (chk_Y == NULL) {
+    printf("Failed allocation of buffer Y");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_Y[i] = (KPP_REAL*) malloc(NVAR * S * sizeof(KPP_REAL));
+    if (chk_Y[i] == NULL) {
+      printf("Failed allocation of buffer Y");
+      exit(0);
+    }
+  }
+    
+  chk_K = (KPP_REAL**) malloc(bufsize * sizeof(KPP_REAL*));
+  if (chk_K == NULL) {
+    printf("Failed allocation of buffer K");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_K[i] = (KPP_REAL*) malloc(NVAR * S * sizeof(KPP_REAL));
+    if (chk_K == NULL) {
+      printf("Failed allocation of buffer K");
+      exit(0);
+    }
+  }
+  
+  if (SaveLU) {
+    chk_J = (KPP_REAL**) malloc(bufsize * sizeof(KPP_REAL*));
+    if (chk_J == NULL) {
+      printf( "Failed allocation of buffer J");
+      exit(0);
+    }
+#ifdef FULL_ALGEBRA
+    for(i=0; i<bufsize; i++) {
+      chk_J[i] = (KPP_REAL*) malloc(NVAR * NVAR * sizeof(KPP_REAL));
+      if (chk_J == NULL) {
+	printf( "Failed allocation of buffer J");
+	exit(0);
+      }
+    }
+#else
+    for(i=0; i<bufsize; i++) {
+      chk_J[i] = (KPP_REAL*) malloc(LU_NONZERO * sizeof(KPP_REAL));
+      if (chk_J == NULL) {
+	printf( "Failed allocation of buffer J");
+	exit(0);
+      }
+    }
+#endif
+  } 
+
+} /* End of ros_AllocateDBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FreeDBuffers( int SaveLU ) {
+/*~~~>  Deallocate buffer space for discrete adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+
+  free(chk_H);
+  free(chk_T);
+
+  for(i=0; i<bufsize; i++) {
+    free(chk_Y[i]);
+    free(chk_K[i]);
+  }
+  free(chk_Y);
+  free(chk_K);
+
+  if (SaveLU) {
+    for(i=0; i<bufsize; i++)
+      free(chk_J[i]);
+    free(chk_J);
+  }
+
+} /* End of ros_FreeDBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_AllocateCBuffers() {
+/*~~~>  Allocate buffer space for continuous adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+
+  chk_H = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_H == NULL) {
+    printf( "Failed allocation of buffer H");
+    exit(0);
+  }
+
+  chk_T = (KPP_REAL*) malloc(bufsize * sizeof(KPP_REAL));
+  if (chk_T == NULL) {
+    printf( "Failed allocation of buffer T");
+    exit(0);
+  }
+
+  chk_Y = (KPP_REAL**) malloc(sizeof(KPP_REAL*) * bufsize);
+  if (chk_Y == NULL) {
+    printf( "Failed allocation of buffer Y");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_Y[i] = (KPP_REAL*) malloc( sizeof(KPP_REAL)* NVAR );
+    if (chk_Y == NULL) {
+      printf( "Failed allocation of buffer Y");
+      exit(0);
+    }
+  }
+
+  chk_dY = (KPP_REAL**) malloc(sizeof(KPP_REAL*) * bufsize);
+  if (chk_dY == NULL) {
+    printf( "Failed allocation of buffer dY");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_dY[i] = (KPP_REAL*) malloc( sizeof(KPP_REAL) * NVAR);
+    if (chk_dY == NULL) {
+      printf( "Failed allocation of buffer dY");
+      exit(0);
+    }
+  }
+
+  chk_d2Y = (KPP_REAL**) malloc(sizeof(KPP_REAL*) * bufsize);
+  if (chk_d2Y == NULL) {
+    printf( "Failed allocation of buffer d2Y");
+    exit(0);
+  }
+  for(i=0; i<bufsize; i++) {
+    chk_d2Y[i] = (KPP_REAL*) malloc( sizeof(KPP_REAL) * NVAR);
+    if (chk_d2Y == NULL) {
+      printf( "Failed allocation of buffer d2Y");
+      exit(0);
+    }
+  }
+} /* End of ros_AllocateCBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FreeCBuffers() {
+/*~~~>  Dallocate buffer space for continuous adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  
+  int i;
+
+  free(chk_H);
+  free(chk_T);
+
+  for(i=0; i<bufsize; i++) {
+    free(chk_Y[i]);
+    free(chk_dY[i]);
+    free(chk_d2Y[i]);
+  }
+
+  free(chk_Y);
+  free(chk_dY);
+  free(chk_d2Y);
+
+} /* End of ros_FreeCBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_DPush( int S, KPP_REAL T, KPP_REAL H, KPP_REAL Ystage[], 
+		KPP_REAL K[], KPP_REAL E[], int P[], int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Saves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+
+  stack_ptr = stack_ptr + 1;
+  if ( stack_ptr >= bufsize ) {
+    printf( "Push failed: buffer overflow" );
+    exit(0);
+  }
+
+  chk_H[ stack_ptr ] = H;
+  chk_T[ stack_ptr ] = T;
+  for(i=0; i<NVAR*S; i++) {
+    chk_Y[stack_ptr][i] = Ystage[i];
+    chk_K[stack_ptr][i] = K[i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    int j;
+    for(j=0; j<NVAR; j++) {
+      for(i=0; i<NVAR; i++)
+	chk_J[stack_ptr][i][j] = E[i][j];
+      chk_P[stack_ptr][j] = P[j];
+    }
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      chk_J[stack_ptr][i] = E[i];
+#endif
+  }
+
+} /* End of ros_DPush */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_DPop( int S, KPP_REAL* T, KPP_REAL* H, KPP_REAL* Ystage,
+	       KPP_REAL* K, KPP_REAL* E, int* P, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Retrieves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    
+  int i;
+  
+  if ( stack_ptr < 0 ) {
+    printf( "Pop failed: empty buffer" );
+    exit(0);
+  }
+
+  *H = chk_H[ stack_ptr ];
+  *T = chk_T[ stack_ptr ];
+
+  for(i=0; i<NVAR*S; i++) {
+    Ystage[i] = chk_Y[stack_ptr][i];
+    K[i]      = chk_K[stack_ptr][i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    int j;
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	E[(j*NVAR)+i] = chk_J[stack_ptr][j][i];
+      P[i] = chk_P[stack_ptr][i];
+    }
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      E[i] = chk_J[stack_ptr][i];
+#endif
+  }
+
+  stack_ptr--;
+
+} /* End of ros_DPop */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_CPush( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+		KPP_REAL d2Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Saves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  int i;
+  
+  stack_ptr++;
+  if ( stack_ptr > bufsize ) {
+    printf( "Push failed: buffer overflow" );
+    exit(0);
+  }
+  chk_H[ stack_ptr ] = H;
+  chk_T[ stack_ptr ] = T;
+
+  for(i = 0; i< NVAR; i++ ) {
+    chk_Y[stack_ptr][i] = Y[i];
+    chk_dY[stack_ptr][i] = dY[i];
+    chk_d2Y[stack_ptr][i] = d2Y[i];
+  }
+} /* End of ros_CPush */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_CPop( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL dY[], 
+	       KPP_REAL d2Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Retrieves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  int i;
+
+  if ( stack_ptr <= 0 ) {
+    printf( "Pop failed: empty buffer" );
+    exit(0);
+  }
+  H = chk_H[ stack_ptr ];
+  T = chk_T[ stack_ptr ];
+
+  for(i=0; i<NVAR; i++) {
+    Y[i] = chk_Y[stack_ptr][i];
+    dY[i] = chk_dY[stack_ptr][i];
+    d2Y[i] = chk_d2Y[stack_ptr][i];
+  }
+  stack_ptr--;
+} /* End of ros_CPop */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_ErrorMsg( int Code, KPP_REAL T, KPP_REAL H) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Handles all error messages
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int IERR = Code;
+  printf( "Forced exit from RosenbrockADJ due to the following error:");
+  
+  switch (Code) {
+    case -1:
+      printf( "--> Improper value for maximal no of steps" );
+      break;
+    case -2:
+      printf( "--> Selected RosenbrockADJ method not implemented" );
+      break;
+    case -3:
+      printf( "--> Hmin/Hmax/Hstart must be positive" );
+      break;
+    case -4:
+      printf( "--> FacMin/FacMax/FacRej must be positive" );
+      break;
+    case -5:
+      printf( "--> Improper tolerance values" );
+      break;
+    case -6:
+      printf( "--> No of steps exceeds maximum buffer bound" );
+      break;
+    case -7:
+      printf( "--> Step size too small: T + 10*H = T or H < Roundoff" );
+      break;
+    case -8:
+      printf( "--> Matrix is repeatedly singular" );
+      break;
+    case -9:
+      printf( "--> Improper type of adjoint selected" );
+      break;
+    default:
+      printf( "Unknown Error code: %d", Code );
+  } /* End of switch */
+
+  return IERR;
+} /* End of ros_ErrorMsg */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_FwdInt ( KPP_REAL Y[], KPP_REAL Tstart, KPP_REAL Tend, KPP_REAL T, 
+		 KPP_REAL AbsTol[], KPP_REAL RelTol[], int AdjointType, 
+		 KPP_REAL Hmin, KPP_REAL Hstart, KPP_REAL Hmax, 
+		 KPP_REAL Roundoff, int ISTATUS[], int Max_no_steps, 
+		 KPP_REAL RSTATUS[], int Autonomous, int VectorTol, 
+		 KPP_REAL FacMax, KPP_REAL FacMin, KPP_REAL FacSafe, 
+		 KPP_REAL FacRej, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockADJ method
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+~~~> Y - Input: the initial condition at Tstart; Output: the solution at T
+~~~> Tstart, Tend - Input: integration interval
+~~~> T - Output: time at which the solution is returned (T=Tend if success)
+~~~> AbsTol, RelTol - Input: tolerances
+~~~> IERR - Output: Error indicator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/* ~~~~ Local variables */
+  KPP_REAL Ynew[NVAR], Fcn0[NVAR], Fcn[NVAR];
+  KPP_REAL K[NVAR*ros_S], dFdT[NVAR];
+  KPP_REAL *Ystage = NULL; /* Array pointer */
+#ifdef FULL_ALGEBRA
+  KPP_REAL Jac0[NVAR][NVAR],  Ghimj[NVAR][NVAR];
+#else
+  KPP_REAL Jac0[LU_NONZERO], Ghimj[LU_NONZERO];
+#endif
+  KPP_REAL H, Hnew, HC, HG, Fac, Tau;
+  KPP_REAL Err, Yerr[NVAR];
+  int Pivot[NVAR], Direction, ioffset, i, j=0, istage;
+  int RejectLastH, RejectMoreH, Singular; /* Boolean Values */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  Allocate stage vector buffer if needed */
+  if (AdjointType == Adj_discrete) {
+    Ystage = (KPP_REAL*) malloc(NVAR*ros_S*sizeof(KPP_REAL));
+    /* Uninitialized Ystage may lead to NaN on some compilers */
+    if (Ystage == NULL) {
+      printf( "Allocation of Ystage failed" );
+      exit(0);
+    }
+  }
+
+/*~~~>  Initial preparations */
+  T = Tstart;
+  RSTATUS[Nhexit] = ZERO;
+  H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) );
+  if (ABS(H) <= ((KPP_REAL)10.0)*Roundoff)
+    H = DeltaMin;
+
+  if (Tend >= Tstart)
+    Direction = 1;
+  else
+    Direction = -1;
+
+  H = Direction*H;
+  
+  RejectLastH = FALSE;
+  RejectMoreH = FALSE;
+
+/*~~~> Time loop begins below */
+  while ( ((Direction > 0) && ((T-Tend)+Roundoff <= ZERO)) || 
+	  ((Direction < 0) && ((Tend-T)+Roundoff <= ZERO)) ) { /* TimeLoop */
+
+    if ( ISTATUS[Nstp] > Max_no_steps )  /* Too many steps */
+      return ros_ErrorMsg(-6,T,H);
+
+    if ( ((T+((KPP_REAL)0.1)*H) == T) || (H <= Roundoff) ) /* Step size 
+							    too small */
+      return ros_ErrorMsg(-7,T,H);
+
+/*~~~>  Limit H if necessary to avoid going beyond Tend */
+    RSTATUS[Nhexit] = H;
+    H = MIN(H,ABS(Tend-T));
+
+/*~~~>   Compute the function at current time */
+    FunTemplate(T,Y,Fcn0);
+    ISTATUS[Nfun] = ISTATUS[Nfun] + 1;
+
+/*~~~>  Compute the function derivative with respect to T */
+    if (!Autonomous)
+      ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT, ISTATUS );
+
+/*~~~>   Compute the Jacobian at current time */
+    JacTemplate(T,Y,Jac0);
+    ISTATUS[Njac] = ISTATUS[Njac] + 1;
+
+/*~~~>  Repeat step calculation until current step accepted */
+    do {  /* UntilAccepted */
+
+      Singular = ros_PrepareMatrix ( H,Direction,ros_Gamma[0],Jac0,Ghimj,Pivot,
+				     ISTATUS );
+
+      if (Singular) /* More than 5 consecutive failed decompositions */
+	return ros_ErrorMsg(-8,T,H);
+
+/*~~~>   Compute the stages */
+      for( istage = 0; istage < ros_S; istage++ ) { /* Stage */
+
+	/* Current istage offset. Current istage vector is 
+	   K(ioffset+1:ioffset+NVAR) */
+	ioffset = NVAR*istage;
+
+	/*For the 1st istage the function has been computed previously*/
+	if ( istage == 0 ) {
+	  WCOPY(NVAR,Fcn0,1,Fcn,1);
+	  if (AdjointType == Adj_discrete) { /* Save stage solution */
+	    for(i=0; i<NVAR; i++)
+	      Ystage[i] = Y[i];
+	    WCOPY(NVAR,Y,1,Ynew,1);
+	  }
+	}
+	/* istage>0 and a new function evaluation is needed at the 
+	   current istage */
+	else if ( ros_NewF[istage] ) {
+	  WCOPY(NVAR,Y,1,Ynew,1);
+	  for ( j = 0; j < istage; j++ ) {
+	    WAXPY( NVAR,ros_A[(istage)*(istage-1)/2+j], 
+		   &K[NVAR*j],1,Ynew,1 );
+	  }
+	  Tau = T + ros_Alpha[istage]*Direction*H;
+	  FunTemplate(Tau,Ynew,Fcn);
+	  ISTATUS[Nfun] = ISTATUS[Nfun] + 1;
+	} /* if istage == 1 elseif ros_NewF[istage] */
+
+	/* Save stage solution every time even if ynew is not updated */
+	if ( ( istage > 0 ) && (AdjointType == Adj_discrete) ) {
+	  for(i=0; i<NVAR; i++)
+	    Ystage[ioffset+i] = Ynew[i];
+	}
+	WCOPY(NVAR,Fcn,1,&K[ioffset],1);
+	for( j = 0; j < istage; j++ ) {
+	  HC = ros_C[(istage)*(istage-1)/2+j]/(Direction*H);
+	  WAXPY(NVAR,HC,&K[NVAR*j],1,&K[ioffset],1);
+	}
+	if (( !Autonomous) && (ros_Gamma[istage] != ZERO)) {
+	  HG = Direction*H*ros_Gamma[istage];
+	  WAXPY(NVAR,HG,dFdT,1,&K[ioffset],1);
+	}
+	ros_Solve('N', Ghimj, Pivot, &K[ioffset], ISTATUS);
+      } /* End of Stage loop */
+
+/*~~~>  Compute the new solution */
+      WCOPY(NVAR,Y,1,Ynew,1);
+      for( j=0; j<ros_S; j++ )
+	WAXPY(NVAR,ros_M[j],&K[NVAR*j],1,Ynew,1);
+
+/*~~~>  Compute the error estimation */ 
+      WSCAL(NVAR,ZERO,Yerr,1);
+      for( j=0; j<ros_S; j++ )
+	WAXPY(NVAR,ros_E[j],&K[NVAR*j],1,Yerr,1);
+      Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol );
+
+/*~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax */
+      Fac  = MIN(FacMax,MAX(FacMin,FacSafe/pow(Err,(ONE/ros_ELO))));
+      Hnew = H*Fac;
+
+/*~~~>  Check the error magnitude and adjust step size */
+      ISTATUS[Nstp] = ISTATUS[Nstp] + 1;
+      if ( (Err <= ONE) || (H <= Hmin) ) {  /*~~~> Accept step */
+	ISTATUS[Nacc]++;
+	if (AdjointType == Adj_discrete) { /* Save current state */
+	  ros_DPush( ros_S, T, H, Ystage, K, Ghimj, Pivot, SaveLU );
+	}
+	else if ( (AdjointType == Adj_continuous) || 
+		  (AdjointType == Adj_simple_continuous) ) {
+#ifdef FULL_ALGEBRA
+	  K = MATMUL(Jac0,Fcn0);
+#else
+	  Jac_SP_Vec( Jac0, Fcn0, &K[0] );
+#endif
+	  if ( !Autonomous)
+	    WAXPY(NVAR,ONE,dFdT,1,&K[0],1);
+	  ros_CPush( T, H, Y, Fcn0, &K[0] );
+	}
+	WCOPY(NVAR,Ynew,1,Y,1);
+	T = T + Direction*H;
+	Hnew = MAX(Hmin,MIN(Hnew,Hmax));
+	if (RejectLastH) { /* No step size increase after a 
+			     rejected step */
+	  Hnew = MIN(Hnew,H);
+	}
+	RSTATUS[Nhexit] = H;
+	RSTATUS[Nhnew]  = Hnew;
+	RSTATUS[Ntexit] = T;
+	RejectLastH = FALSE;
+	RejectMoreH = FALSE;
+	H = Hnew;
+	break; /* UntilAccepted - EXIT THE LOOP: WHILE STEP NOT ACCEPTED */
+      }
+
+      else { /*~~~> Reject step */
+	if (RejectMoreH)
+	  Hnew = H*FacRej;
+        RejectMoreH = RejectLastH;
+        RejectLastH = TRUE;
+        H = Hnew;
+        if (ISTATUS[Nacc] >= 1)
+	  ISTATUS[Nrej]++;
+      } /* End if else - Err <= 1 */
+    
+    } while(1); /* End of UntilAccepted do loop */
+  } /* End of TimeLoop */
+   
+/*~~~> Save last state: only needed for continuous adjoint */
+  if ( (AdjointType == Adj_continuous) || 
+       (AdjointType == Adj_simple_continuous) ) {
+    FunTemplate(T,Y,Fcn0);
+    ISTATUS[Nfun]++;
+    JacTemplate(T,Y,Jac0);
+    ISTATUS[Njac]++;
+#ifdef FULL_ALGEBRA
+    K = MATMUL(Jac0,Fcn0);
+#else
+    Jac_SP_Vec( Jac0, Fcn0, &K[0] );
+#endif
+    if (!Autonomous) {
+      ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT, ISTATUS );
+      WAXPY(NVAR,ONE,dFdT,1,&K[0],1);
+    }
+    ros_CPush( T, H, Y, Fcn0, &K[0] );
+/*~~~> Deallocate stage buffer: only needed for discrete adjoint */
+  }
+  else if (AdjointType == Adj_discrete) {
+    free(Ystage);
+  }
+
+/*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+} /* End of ros_FwdInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_DadjInt ( int NADJ, KPP_REAL Lambda[][NVAR], KPP_REAL Tstart, 
+		  KPP_REAL Tend, KPP_REAL T, int SaveLU, int ISTATUS[], 
+		  KPP_REAL Roundoff, int Autonomous) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockSOA method
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~> NADJ - Input: the initial condition at Tstart; Output: the solution at T
+!~~~> Lambda[NADJ][NVAR] -  First order adjoint
+!~~~> Tstart, Tend - Input: integration interval
+!~~~> T - Output: time at which the solution is returned (T=Tend if success)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~ Local variables */
+  KPP_REAL Ystage[NVAR*ros_S], K[NVAR*ros_S];
+  KPP_REAL U[NADJ][NVAR*ros_S], V[NADJ][NVAR*ros_S];
+#ifdef FULL_ALGEBRA
+  KPP_REAL Jac[NVAR][NVAR], dJdT[NVAR][NVAR], Ghimj[NVAR][NVAR];
+#else
+  KPP_REAL Jac[LU_NONZERO], dJdT[LU_NONZERO], Ghimj[LU_NONZERO];
+#endif
+  KPP_REAL Hes0[NHESS];
+  KPP_REAL Tmp[NVAR], Tmp2[NVAR];
+  KPP_REAL H=0.0, HC, HA, Tau;
+  int Pivot[NVAR], Direction;
+  int i, j, m, istage, istart, jstart;
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  if (Tend  >=  Tstart)
+    Direction = 1;
+  else
+    Direction = -1;
+  
+  /*~~~> Time loop begins below */
+  while ( stack_ptr > 0 ) { /* TimeLoop */
+
+    /*~~~>  Recover checkpoints for stage values and vectors */
+    ros_DPop( ros_S, &T, &H, &Ystage[0], &K[0], &Ghimj[0], &Pivot[0], SaveLU );
+
+    /*~~~>    Compute LU decomposition */
+    if (!SaveLU) {
+      JacTemplate(T,&Ystage[0],Ghimj);
+      ISTATUS[Njac] = ISTATUS[Njac] + 1;
+      Tau = ONE/(Direction*H*ros_Gamma[0]);
+#ifdef FULL_ALGEBRA
+      for(j=0; j<NVAR; j++) {
+	for(i=0; i<NVAR; i++)
+	  Ghimj[i][j] = -Ghimj[i][j];
+      }
+      for(i=0; i<NVAR; i++)
+	Ghimj[i][i] = Ghimj[i][i]+Tau;
+#else
+      WSCAL(LU_NONZERO,(-ONE),Ghimj,1);
+      for (i=0; i<NVAR; i++)
+	Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+Tau;
+#endif
+      ros_Decomp(Ghimj, Pivot, &j, ISTATUS);
+    }
+
+/*~~~>   Compute Hessian at the beginning of the interval */
+    HessTemplate(T,&Ystage[0],Hes0);
+
+/*~~~>   Compute the stages */
+    for (istage = ros_S - 1; istage >= 0; istage--) { /* Stage loop */
+
+      /*~~~> Current istage first entry */
+      istart = NVAR*istage;
+	 
+      /*~~~> Compute U */
+      for (m = 0; m<NADJ; m++) {
+	WCOPY(NVAR,&Lambda[m][0],1,&U[m][istart],1);
+	WSCAL(NVAR,ros_M[istage],&U[m][istart],1);
+      } /* m=0:NADJ-1 */
+      for (j = istage+1; j < ros_S; j++) {
+	jstart = NVAR*j;
+	HA = ros_A[j*(j-1)/2+istage];
+	HC = ros_C[j*(j-1)/2+istage]/(Direction*H);
+	for ( m = 0; m < NADJ; m++ ) {
+	  WAXPY(NVAR,HA,&V[m][jstart],1,&U[m][istart],1);
+	  WAXPY(NVAR,HC,&U[m][jstart],1,&U[m][istart],1);
+	} /* m=0:NADJ-1 */
+      }
+      for ( m = 0; m < NADJ; m++ )
+	ros_Solve('T', Ghimj, Pivot, &U[m][istart], ISTATUS); /* m=1:NADJ-1 */
+
+      /*~~~> Compute V */
+      Tau = T + ros_Alpha[istage]*Direction*H;
+      JacTemplate(Tau,&Ystage[istart],Jac);
+      ISTATUS[Njac]++;
+      for ( m = 0; m < NADJ; m++ ) {
+#ifdef FULL_ALGEBRA
+	for (i=istart; i < istart+NVAR-1; i++ )
+	  V[[m][i] = MATMUL(TRANSPOSE(Jac),U[m][i]];
+#else
+	JacTR_SP_Vec(Jac,&U[m][istart],&V[m][istart]); 
+#endif
+      } /* m=0:NADJ-1 */
+    } /*End of Stage loop */
+
+    if (!Autonomous)
+/*~~~>  Compute the Jacobian derivative with respect to T.
+        Last "Jac" computed for stage 1 */
+      ros_JacTimeDerivative ( T, Roundoff, &Ystage[0], Jac, dJdT, ISTATUS );
+
+/*~~~>  Compute the new solution */
+    /*~~~>  Compute Lambda */ 
+    for( istage = 0; istage < ros_S; istage++ ) {
+      istart = NVAR*istage;
+      for (m = 0; m < NADJ; m++) {
+	/* Add V_i */
+	WAXPY(NVAR,ONE,&V[m][istart],1,&Lambda[m][0],1);
+	/* Add (H0xK_i)^T * U_i */
+	HessTR_Vec ( Hes0, &U[m][istart], &K[istart], Tmp );
+	WAXPY(NVAR,ONE,Tmp,1,&Lambda[m][0],1);
+      } /* m=0:NADJ-1 */
+    }
+
+    /* Add H * dJac_dT_0^T * \sum(gamma_i U_i) */
+    /* Tmp holds sum gamma_i U_i */
+    if (!Autonomous) {
+      for( m = 0; m < NADJ; m++ ) {
+	for(i=0; i<NVAR; i++)
+	  Tmp[i] = ZERO;
+	for( istage = 0; istage < ros_S; istage++ ) {
+	  istart = NVAR*istage;
+	  WAXPY(NVAR,ros_Gamma[istage],&U[m][istart],1,Tmp,1);
+	}
+#ifdef FULL_ALGEBRA
+	Tmp2 = MATMUL(TRANSPOSE(dJdT),Tmp);
+#else
+	JacTR_SP_Vec(dJdT,Tmp,Tmp2);
+#endif
+	WAXPY(NVAR,H,Tmp2,1,&Lambda[m][0],1);
+      } /* m=0:NADJ-1 */
+    } /* .NOT.Autonomous */
+  } /* End of TimeLoop */
+
+  /*~~~> Save last state */
+  /*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+} /* End of ros_DadjInt */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_CadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart, KPP_REAL Tend,
+		  KPP_REAL T, KPP_REAL AbsTol_adj[][NVAR], 
+		  KPP_REAL RelTol_adj[][NVAR], KPP_REAL RSTATUS[], 
+		  KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, int Max_no_steps, int Autonomous, 
+		  int VectorTol, KPP_REAL FacMax, KPP_REAL FacMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacRej, int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockADJ method
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+~~~> NADJ, Y[NADJ][NVAR] - Input: the initial condition at Tstart;
+                           Output: the solution at T
+~~~> Tstart, Tend - Input: integration interval 
+~~~> AbsTol_adj[NADJ][NVAR], RelTol_adj[NADJ][NVAR] - Input: adjoint tolerances
+~~~> T - Output: time at which the solution is returned (T=Tend if success)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~ Local variables */
+  KPP_REAL Y0[NVAR];
+  KPP_REAL Ynew[NADJ][NVAR], Fcn0[NADJ][NVAR], Fcn[NADJ][NVAR];
+  KPP_REAL K[NADJ][NVAR*ros_S], dFdT[NADJ][NVAR];
+#ifdef FULL_ALGEBRA
+  KPP_REAL Jac0[NVAR][NVAR], Ghimj[NVAR][NVAR], Jac[NVAR][NVAR], 
+         dJdT[NVAR][NVAR];
+#else
+  KPP_REAL Jac0[LU_NONZERO], Ghimj[LU_NONZERO], Jac[LU_NONZERO], 
+         dJdT[LU_NONZERO];
+#endif
+  KPP_REAL H, Hnew, HC, HG, Fac, Tau; 
+  KPP_REAL Err, Yerr[NADJ][NVAR];
+  int Pivot[NVAR], Direction, ioffset, j, istage, iadj;
+  int RejectLastH, RejectMoreH, Singular; /* Boolean values */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  Initial preparations */
+  T = Tstart;
+  RSTATUS[Nhexit] = (KPP_REAL)0.0;
+  H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) );
+  if (ABS(H) <= ((KPP_REAL)10.0)*Roundoff) 
+    H = DeltaMin;
+  
+  if (Tend  >=  Tstart)
+    Direction = 1;
+  else
+    Direction = -1;
+  
+  H = Direction*H;
+  RejectLastH = FALSE;
+  RejectMoreH = FALSE;
+
+/*~~~> Time loop begins below */
+  while ( ((Direction > 0) && ((T-Tend)+Roundoff <= ZERO))
+	  || ((Direction < 0) && ((Tend-T)+Roundoff <= ZERO)) ) { /*TimeLoop*/
+
+    if ( ISTATUS[Nstp] > Max_no_steps )  /* Too many steps */
+      return ros_ErrorMsg(-6,T,H);
+
+    /* Step size too small */
+    if ( ((T+((KPP_REAL)0.1)*H) == T) || (H <= Roundoff) )
+      return ros_ErrorMsg(-7,T,H);
+
+/*~~~>  Limit H if necessary to avoid going beyond Tend */
+    RSTATUS[Nhexit] = H;
+    H = MIN(H,ABS(Tend-T));
+
+/*~~~>   Interpolate forward solution */
+    ros_cadj_Y( T, Y0 );
+/*~~~>   Compute the Jacobian at current time */
+    JacTemplate(T, Y0, Jac0);
+    ISTATUS[Njac]++;
+
+/*~~~>  Compute the function derivative with respect to T */
+    if (!Autonomous) {
+      ros_JacTimeDerivative ( T, Roundoff, Y0, Jac0, dJdT, ISTATUS );
+      for (iadj = 0; iadj < NADJ; iadj++) {
+#ifdef FULL_ALGEBRA
+	for (i=0; i<NVAR; i++)
+	  dFdT[iadj][i] = MATMUL(TRANSPOSE(dJdT),Y[iadj][i]);
+#else
+	JacTR_SP_Vec(dJdT,&Y[iadj][0],&dFdT[iadj][0]);
+#endif
+	WSCAL(NVAR,(-ONE),&dFdT[iadj][0],1);
+      } /* End for loop */
+    } /* End if */
+
+/*~~~>  Ydot = -J^T*Y */
+#ifdef FULL_ALGEBRA
+    int i;
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	Jac0[i][j] = -Jac0[i][j];
+    }
+#else
+    WSCAL(LU_NONZERO,(-ONE),Jac0,1);
+#endif
+
+    for ( iadj = 0; iadj < NADJ; iadj++ ) {
+#ifdef FULL_ALGEBRA
+      int i;
+      for(i=0; i<NVAR; i++)
+	Fcn0[iadj][i] = MATMUL(TRANSPOSE(Jac0),Y[iadj][i]);
+#else
+      JacTR_SP_Vec(Jac0,&Y[iadj][0],&Fcn0[iadj][0]);
+#endif
+    }
+
+/*~~~>  Repeat step calculation until current step accepted */
+    do { /* UntilAccepted */
+
+      Singular = ros_PrepareMatrix(H,Direction,ros_Gamma[0], Jac0,Ghimj,Pivot,
+				   ISTATUS);
+      if (Singular) /* More than 5 consecutive failed decompositions */
+	return ros_ErrorMsg(-8,T,H);
+
+/*~~~>   Compute the stages */
+      for ( istage = 0; istage < ros_S; istage++ ) { /* Stage loop */
+
+	/* Current istage offset. Current istage vector 
+	   is K[ioffset+1:ioffset+NVAR] */
+	ioffset = NVAR*(istage-1);
+
+	/* For the 1st istage the function has been computed previously */
+	if ( istage == 0 ) {
+	  for ( iadj = 0; iadj < NADJ; iadj++ )
+	    WCOPY(NVAR,&Fcn0[iadj][0],1,&Fcn[iadj][0],1);
+
+	  /* istage>0 and a new function evaluation is needed at 
+	     the current istage */
+	}
+	else if ( ros_NewF[istage] ) {
+	  WCOPY(NVAR*NADJ,&Y[0][0],1,&Ynew[0][0],1);
+	  for (j = 0; j < istage-1; j++) {
+	    for ( iadj = 0; iadj < NADJ; iadj++ )
+	      WAXPY( NVAR,ros_A[(istage-1)*(istage-2)/2+j],
+		     &K[iadj][NVAR*(j-1)+1],1,&Ynew[iadj][0],1);
+	  } /* End for loop */
+	  Tau = T + ros_Alpha[istage]*Direction*H;
+	  ros_cadj_Y( Tau, Y0 );
+	  JacTemplate(Tau, Y0, Jac);
+	  ISTATUS[Njac]++;
+
+#ifdef FULL_ALGEBRA
+	  for(i=0; i<NVAR; i++) {
+	    for(j=0; j<NVAR; j++)
+	      Jac[i][j] = -Jac[i][j];
+	  }
+#else
+	  WSCAL(LU_NONZERO,(-ONE),Jac,1);
+#endif
+
+	  for ( iadj = 0; iadj < NADJ; iadj++ ) {
+#ifdef FULL_ALGEBRA
+	    for(i=0; i<NVAR; i++)
+	      Fcn[iadj][i] = MATMUL(TRANSPOSE(Jac),Ynew[iadj][i]);
+#else
+	    JacTR_SP_Vec(Jac,&Ynew[iadj][0],&Fcn[iadj][0]);
+#endif
+	  } /* End for loop */
+	} /*  if istage == 1 elseif ros_NewF(istage) */
+
+	for ( iadj = 0; iadj < NADJ; iadj++ )
+	  WCOPY(NVAR,&Fcn[iadj][0],1,&K[iadj][ioffset+1],1);
+	for ( j = 0; j < istage-1; j++ ) {
+	  HC = ros_C[(istage-1)*(istage-2)/2+j]/(Direction*H);
+	  for ( iadj = 0; iadj < NADJ; iadj++ )
+	    WAXPY(NVAR,HC,&K[iadj][NVAR*(j-1)+1],1,&K[iadj][ioffset+1],1);
+	} /* End for loop */
+	if ((!Autonomous) && (ros_Gamma[istage] != ZERO)) {
+	  HG = Direction*H*ros_Gamma[istage];
+	  for ( iadj = 0; iadj < NADJ; iadj++ )
+	    WAXPY(NVAR,HG,&dFdT[iadj][0],1,&K[iadj][ioffset+1],1);
+	} /* End if */
+	for ( iadj = 0; iadj < NADJ; iadj++ )
+	  ros_Solve('T', Ghimj, Pivot, &K[iadj][ioffset+1], ISTATUS);
+
+      } /* End of Stage loop */
+
+/*~~~>  Compute the new solution */
+      for ( iadj = 0; iadj < NADJ; iadj++ ) {
+	WCOPY(NVAR,&Y[iadj][0],1,&Ynew[iadj][0],1);
+	for ( j=0; j<ros_S; j++ )
+	  WAXPY(NVAR,ros_M[j],&K[iadj][NVAR*(j-1)+1],1,&Ynew[iadj][0],1);
+      } /* End for loop */
+
+/*~~~>  Compute the error estimation */
+      WSCAL(NVAR*NADJ,ZERO,&Yerr[0][0],1);
+      for ( j=0; j<ros_S; j++ ) {
+	for ( iadj = 0; iadj < NADJ; iadj++ )
+	  WAXPY(NVAR,ros_E[j],&K[iadj][NVAR*(j-1)+1],1,&Yerr[iadj][0],1);
+      } /* End for loop */
+
+/*~~~> Max error among all adjoint components */
+      iadj = 1;
+      Err = ros_ErrorNorm ( &Y[iadj][0], &Ynew[iadj][0], &Yerr[iadj][0],
+			    &AbsTol_adj[iadj][0], &RelTol_adj[iadj][0], 
+			    VectorTol );
+
+/*~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax */
+      Fac  = MIN(FacMax,MAX(FacMin,FacSafe/pow(Err,(ONE/ros_ELO))));
+      Hnew = H*Fac;
+
+/*~~~>  Check the error magnitude and adjust step size */
+      /* ISTATUS[Nstp] = ISTATUS[Nstp] + 1 */
+      if ( (Err <= ONE) || (H <= Hmin) ) {  /*~~~> Accept step */
+	ISTATUS[Nacc] = ISTATUS[Nacc] + 1;
+	WCOPY(NVAR*NADJ,&Ynew[0][0],1,&Y[0][0],1);
+	T = T + Direction*H;
+	Hnew = MAX(Hmin,MIN(Hnew,Hmax));
+	if (RejectLastH) /* No step size increase after a rejected step */
+	  Hnew = MIN(Hnew,H);
+	RSTATUS[Nhexit] = H;
+	RSTATUS[Nhnew] = Hnew;
+	RSTATUS[Ntexit] = T;
+	RejectLastH = FALSE;
+	RejectMoreH = FALSE;
+	H = Hnew;
+	break; /* UntilAccepted - EXIT THE LOOP: WHILE STEP NOT ACCEPTED */
+      }
+      else {         /*~~~> Reject step */
+	if (RejectMoreH)
+	  Hnew = H*FacRej;
+	RejectMoreH = RejectLastH;
+	RejectLastH = TRUE;
+	H = Hnew;
+	if (ISTATUS[Nacc] >= 1)
+	  ISTATUS[Nrej]++;
+      } /* Err <= 1 */
+      
+    } while(1); /* End of UntilAccepted do loop */
+
+  } /* End of TimeLoop */
+
+  /*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+} /* End of ros_CadjInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_SimpleCadjInt ( int NADJ, KPP_REAL Y[][NVAR], KPP_REAL Tstart,
+			 KPP_REAL Tend, KPP_REAL T, int ISTATUS[], 
+			int Autonomous, KPP_REAL Roundoff ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   Template for the implementation of a generic RosenbrockADJ method 
+      defined by ros_S (no of stages)
+      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+~~~> NADJ, Y[NADJ][NVAR] - Input: the initial condition at Tstart; 
+                           Output: the solution at T
+~~~> Tstart, Tend - Input: integration interval 
+~~~> T - Output: time at which the solution is returned (T=Tend if success) 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~ Local variables */
+   KPP_REAL Y0[NVAR];
+   KPP_REAL Ynew[NADJ][NVAR], Fcn0[NADJ][NVAR], Fcn[NADJ][NVAR];
+   KPP_REAL K[NADJ][NVAR*ros_S], dFdT[NADJ][NVAR];
+#ifdef FULL_ALGEBRA
+   KPP_REAL Jac0[NVAR][NVAR], Ghimj[NVAR][NVAR], Jac[NVAR][NVAR], 
+          dJdT[NVAR][NVAR];
+#else
+   KPP_REAL Jac0[LU_NONZERO], Ghimj[LU_NONZERO], Jac[LU_NONZERO], 
+          dJdT[LU_NONZERO];
+#endif
+   KPP_REAL H, HC, HG, Tau; 
+   KPP_REAL ghinv;
+   int Pivot[NVAR], Direction, ioffset, i, j, istage, iadj;
+   int istack;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~>  INITIAL PREPARATIONS */
+  if (Tend  >=  Tstart)
+    Direction = -1;
+  else
+    Direction = 1;
+ 
+/*~~~> Time loop begins below */
+  for( istack = stack_ptr; istack >= 1; istack-- ) { /* TimeLoop */
+    T = chk_T[istack];
+    H = chk_H[istack-1];
+    for(i=0; i<NVAR; i++)
+      Y0[i] = chk_Y[istack][i];
+
+/*~~~>   Compute the Jacobian at current time */
+    JacTemplate(T, Y0, Jac0);
+    ISTATUS[Njac] = ISTATUS[Njac] + 1;
+
+/*~~~>  Compute the function derivative with respect to T */
+    if (!Autonomous) {
+      ros_JacTimeDerivative ( T, Roundoff, Y0, Jac0, dJdT, ISTATUS );
+      for ( iadj = 0; iadj < NADJ; iadj++ ) {
+#ifdef FULL_ALGEBRA
+	for( i=0; i<NVAR; i++)
+	  dFdT[iadj][i] = MATMUL(TRANSPOSE(dJdT),Y[iadj][i]);
+#else
+	JacTR_SP_Vec(dJdT,&Y[iadj][0],&dFdT[iadj][0]);
+#endif
+	WSCAL(NVAR,(-ONE),&dFdT[iadj][0],1);
+      }
+    }
+
+/*~~~>  Ydot = -J^T*Y */
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	Jac0[i][j] = -Jac0[i][j];
+    }
+#else
+    WSCAL(LU_NONZERO,(-ONE),Jac0,1);
+#endif
+    
+    for(iadj=0; iadj<NADJ; iadj++) {
+#ifdef FULL_ALGEBRA
+      for(i=0; i<NVAR; i++)
+	Fcn0[iadj][i] = MATMUL(TRANSPOSE(Jac0),Y[iadj][i]);
+#else
+      JacTR_SP_Vec(Jac0,&Y[iadj][0],&Fcn0[iadj][0]);
+#endif
+    }
+    
+/*~~~>    Construct Ghimj = 1/(H*ham) - Jac0 */
+    ghinv = ONE/(Direction*H*ros_Gamma[0]);
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	Ghimj[i][j] = -Jac0[i][j];
+    }
+    for(i=0; i<NVAR; i++)
+      Ghimj[i][i] = Ghimj[i][i]+ghinv;
+#else
+    WCOPY(LU_NONZERO,Jac0,1,Ghimj,1);
+    WSCAL(LU_NONZERO,(-ONE),Ghimj,1);
+    for(i=0; i<NVAR; i++)
+      Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+ghinv;
+#endif
+
+/*~~~>    Compute LU decomposition */
+    ros_Decomp( Ghimj, Pivot, &j, ISTATUS );
+    if (j != 0) {
+      ros_ErrorMsg(-8,T,H);
+      printf( "The matrix is singular !");
+      exit(0);
+    }
+
+/*~~~>   Compute the stages */
+    for(istage=0; istage<ros_S; istage++) { /* Stage */
+      /* Current istage offset. Current istage vector 
+	 is K(ioffset+1:ioffset+NVAR) */
+      ioffset = NVAR*istage;
+
+      /* For the 1st istage the function has been computed previously */
+      if ( istage == 0 ) {
+	for(iadj=0; iadj<NADJ; iadj++)
+	  WCOPY(NVAR,&Fcn0[iadj][0],1,&Fcn[iadj][0],1);
+      }
+      /* istage>=1 and a new function evaluation is needed 
+	 at the current istage */
+      else if ( ros_NewF[istage] ) {
+	WCOPY(NVAR*NADJ,&Y[0][0],1,&Ynew[0][0],1);
+	for(j=0; j<istage; j++) {
+	  for(iadj=0; iadj<NADJ; iadj++)
+	    WAXPY(NVAR,ros_A[istage*(istage-1)/2+j], &K[iadj][NVAR*j],1,
+		  &Ynew[iadj][0],1);
+	}
+	
+	Tau = T + ros_Alpha[istage]*Direction*H;
+	for(i=0; i<NVAR; i++)
+	  ros_Hermite3( chk_T[istack-1], chk_T[istack], Tau,
+			&chk_Y[istack-1][i], &chk_Y[istack][i],
+			&chk_dY[istack-1][i], &chk_dY[istack][i], Y0 );
+	JacTemplate(Tau, Y0, Jac);
+	ISTATUS[Njac]++;
+
+#ifdef FULL_ALGEBRA
+	for(i=0; i<NVAR; i++) {
+	  for(j=0; j<NVAR; j++)
+	    Jac[i][j] = -Jac[i][j];
+	}
+#else
+	WSCAL(LU_NONZERO,(-ONE),Jac,1);
+#endif
+
+	for(iadj=0; iadj<NADJ; iadj++) {
+#ifdef FULL_ALGEBRA
+	  for(i=0; i<NVAR; i++)
+	    Fcn[iadj][i] = MATMUL(TRANSPOSE(Jac),Ynew[iadj][i]);
+#else
+	  JacTR_SP_Vec(Jac,&Ynew[iadj][0],&Fcn[iadj][0]);
+#endif
+	}
+      } /* if istage == 1 elseif ros_NewF(istage) */
+
+      for(iadj=0; iadj<NADJ; iadj++)
+	WCOPY(NVAR,&Fcn[iadj][0],1,&K[iadj][ioffset],1);
+      for(j=0; j<istage-1; j++) {
+	HC = ros_C[istage*(istage-1)/2+j]/(Direction*H);
+	for(iadj=0; iadj<NADJ; iadj++)
+	  WAXPY(NVAR,HC,&K[iadj][NVAR*j],1,&K[iadj][ioffset],1);
+      }
+      if((!Autonomous) && (ros_Gamma[istage] != ZERO)) {
+	HG = Direction*H*ros_Gamma[istage];
+	for(iadj=0; iadj<NADJ; iadj++)
+	  WAXPY(NVAR,HG,&dFdT[iadj][0],1,&K[iadj][ioffset],1);
+      }
+      for(iadj=0; iadj<NADJ; iadj++)
+	ros_Solve('T', Ghimj, Pivot, &K[iadj][ioffset], ISTATUS);
+    } /* End of Stage loop */
+    
+/*~~~>  Compute the new solution */
+    for(iadj=0; iadj<NADJ; iadj++) {
+      for(j=0; j<ros_S; j++)
+	WAXPY(NVAR,ros_M[j],&K[iadj][NVAR*j],1,&Y[iadj][0],1);
+    }
+  } /* End of TimeLoop */
+
+/*~~~> Succesful exit */
+  return 1;  /*~~~> The integration was successful */
+
+} /* End of ros_SimpleCadjInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL ros_ErrorNorm ( KPP_REAL Y[], KPP_REAL Ynew[], KPP_REAL Yerr[],
+		       KPP_REAL AbsTol[], KPP_REAL RelTol[], int VectorTol ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Computes the "scaled norm" of the error vector Yerr
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/* Local variables */
+  KPP_REAL Err, Scale, Ymax;
+  int i;
+
+  Err = ZERO;
+  for(i=0; i<NVAR; i++) {
+    Ymax = MAX(ABS(Y[i]),ABS(Ynew[i]));
+    if (VectorTol)
+      Scale = AbsTol[i]+RelTol[i]*Ymax;
+    else
+      Scale = AbsTol[0]+RelTol[0]*Ymax;
+
+    Err = Err+pow((Yerr[i]/Scale),2);
+  }
+  Err  = SQRT(Err/NVAR);
+
+  return MAX(Err,(KPP_REAL)1.0e-10);
+} /* End of ros_ErrorNorm */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_FunTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[],
+			     KPP_REAL Fcn0[], KPP_REAL dFdT[], int ISTATUS[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> The time partial derivative of the function by finite differences
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Delta;
+  
+  Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T));
+  FunTemplate(T+Delta,Y,dFdT);
+  ISTATUS[Nfun]++;
+  WAXPY(NVAR,(-ONE),Fcn0,1,dFdT,1);
+  WSCAL(NVAR,(ONE/Delta),dFdT,1);
+
+} /* End of ros_FunTimeDerivative */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_JacTimeDerivative ( KPP_REAL T, KPP_REAL Roundoff, KPP_REAL Y[],
+			     KPP_REAL Jac0[], KPP_REAL dJdT[], int ISTATUS[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> The time partial derivative of the Jacobian by finite differences
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Delta;
+
+  Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T));
+  JacTemplate(T+Delta,Y,dJdT);
+  ISTATUS[Njac]++;
+#ifdef FULL_ALGEBRA
+  WAXPY(NVAR*NVAR,(-ONE),Jac0,1,dJdT,1);
+  WSCAL(NVAR*NVAR,(ONE/Delta),dJdT,1);
+#else
+  WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1);
+  WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1);
+#endif
+} /* End of ros_JacTimeDerivative */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int ros_PrepareMatrix ( KPP_REAL H, int Direction, KPP_REAL gam,
+			KPP_REAL Jac0[], KPP_REAL Ghimj[], int Pivot[], 
+			int ISTATUS[] ) {
+/* --- --- --- --- --- --- --- --- --- --- --- --- ---
+  Prepares the LHS matrix for stage calculations
+  1.  Construct Ghimj = 1/(H*gam) - Jac0
+      "(Gamma H) Inverse Minus Jacobian"
+  2.  Repeat LU decomposition of Ghimj until successful.
+       -half the step size if LU decomposition fails and retry
+       -exit after 5 consecutive fails
+ --- --- --- --- --- --- --- --- --- --- --- --- --- */
+
+/*~~~> Local variables */
+  int i, ising, Nconsecutive;
+  int Singular; /* Boolean value */
+  KPP_REAL ghinv;
+
+  Nconsecutive = 0;
+  Singular = TRUE;
+
+  while (Singular) {
+
+/*~~~>    Construct Ghimj = 1/(H*gam) - Jac0 */
+#ifdef FULL_ALGEBRA
+    WCOPY(NVAR*NVAR,Jac0,1,Ghimj,1);
+    WSCAL(NVAR*NVAR,(-ONE),Ghimj,1);
+    ghinv = ONE/(Direction*H*gam);
+    for(i=0; i<NVAR; i++)
+      Ghimj[i][i] = Ghimj[i][i]+ghinv;
+#else
+    WCOPY(LU_NONZERO,Jac0,1,Ghimj,1);
+    WSCAL(LU_NONZERO,(-ONE),Ghimj,1);
+    ghinv = ONE/(Direction*H*gam);
+    for(i=0; i<NVAR; i++)
+      Ghimj[LU_DIAG[i]] = Ghimj[LU_DIAG[i]]+ghinv;
+#endif
+
+/*~~~>    Compute LU decomposition */
+    ros_Decomp( Ghimj, Pivot, &ising, ISTATUS );
+    if (ising == 0)
+/*~~~>    If successful done */
+      Singular = FALSE;
+    
+    else { /* ising != 0 */
+/*~~~>    If unsuccessful half the step size; 
+          if 5 consecutive fails then return */
+      ISTATUS[Nsng]++;
+      Nconsecutive++;
+      Singular = TRUE;
+      printf( "Warning: LU Decomposition returned ising = %d", ising );
+      if (Nconsecutive <= 5) /*Less than 5 consecutive failed decompositions*/
+	H = H*HALF;
+      else  /* More than 5 consecutive failed decompositions */
+	return Singular;
+
+    }  /* End of ising */
+  }  /* while Singular */
+
+  return Singular;
+} /* End of ros_PrepareMatrix */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Decomp( KPP_REAL A[], int Pivot[], int* ising, int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the LU decomposition
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+#ifdef FULL_ALGEBRA
+  DGETRF( NVAR, NVAR, A, NVAR, Pivot, ising );
+#else
+  *ising = KppDecomp ( A );
+  Pivot[0] = 1;
+#endif
+  ISTATUS[Ndec]++;
+
+} /* End of ros_Decomp */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Solve( char How, KPP_REAL A[], int Pivot[], KPP_REAL b[], 
+		int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the forward/backward substitution 
+  (using pre-computed LU decomposition)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  switch (How) {
+    case 'N':
+#ifdef FULL_ALGEBRA    
+      DGETRS( 'N', NVAR , 1, A, NVAR, Pivot, b, NVAR, 0 );
+#else
+      KppSolve( A, b );
+#endif
+      break;
+    case 'T':
+#ifdef FULL_ALGEBRA
+      DGETRS( 'T', NVAR , 1, A, NVAR, Pivot, b, NVAR, 0 );
+#else
+      KppSolveTR( A, b, b );
+#endif
+      break;
+    default:
+      printf( "Error: unknown argument in ros_Solve: How=%d", How );
+      exit(0);
+  }
+  ISTATUS[Nsol]++;
+
+} /* End of ros_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_cadj_Y( KPP_REAL T, KPP_REAL Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Finds the solution Y at T by interpolating the stored forward trajectory
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  int i,j;
+
+  if( (T < chk_T[0]) || (T> chk_T[stack_ptr]) ) {
+    printf( "Cannot locate solution at T = %f", T );
+    printf( "Stored trajectory is between Tstart = %f", chk_T[0] );
+    printf( "    and Tend = %f", chk_T[stack_ptr] );
+    exit(0);
+  }
+  for(i=0; i<stack_ptr-1; i++) {
+    if( (T >= chk_T[i]) &&(T <= chk_T[i+1]) )
+      exit(0);
+  }
+
+  for(j=0; j<NVAR; j++ )
+    ros_Hermite3( chk_T[i], chk_T[i+1], T, &chk_Y[i][j], &chk_Y[i+1][j],
+		  &chk_dY[i][j],  &chk_dY[i+1][j], Y );
+
+} /* End of ros_cadj_Y */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Hermite3( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[],
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Y[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for Hermite interpolation of order 5 on the interval [a,b]
+   P = c(1) + c(2)*(x-a) + ... + c(4)*(x-a)^3
+   P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Tau, amb[3], C[4][NVAR];
+  int i, j;
+
+  amb[0] = ((KPP_REAL)1.0)/(a-b);
+  for(i=1; i<3; i++)
+    amb[i] = amb[i-1]*amb[0];
+
+/* c(1) = ya; */
+  WCOPY(NVAR,Ya,1,&C[0][0],1);
+/* c(2) = ja; */
+  WCOPY(NVAR,Ja,1,&C[1][0],1);
+/* c(3) = 2/(a-b)*ja + 1/(a-b)*jb - 3/(a - b)^2*ya + 3/(a - b)^2*yb; */
+  WCOPY(NVAR,Ya,1,&C[2][0],1);
+  WSCAL(NVAR,-3.0*amb[1],&C[2][0],1);
+  WAXPY(NVAR,3.0*amb[1],Yb,1,&C[2][0],1);
+  WAXPY(NVAR,2.0*amb[0],Ja,1,&C[2][0],1);
+  WAXPY(NVAR,amb[0],Jb,1,&C[2][0],1);
+/* c(4) =  1/(a-b)^2*ja + 1/(a-b)^2*jb - 2/(a-b)^3*ya + 2/(a-b)^3*yb */
+  WCOPY(NVAR,Ya,1,&C[3][0],1);
+  WSCAL(NVAR,-2.0*amb[2],&C[3][0],1);
+  WAXPY(NVAR,2.0*amb[2],Yb,1,&C[3][0],1);
+  WAXPY(NVAR,amb[1],Ja,1,&C[3][0],1);
+  WAXPY(NVAR,amb[1],Jb,1,&C[3][0],1);
+   
+  Tau = T - a;
+  WCOPY(NVAR,&C[3][0],1,Y,1);
+  WSCAL(NVAR,pow(Tau,3),Y,1);
+  for(j=2; j>=0; j--)
+    WAXPY(NVAR,pow(Tau,(j-1)),&C[j][0],1,Y,1);
+
+} /* End of ros_Hermite3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void ros_Hermite5( KPP_REAL a, KPP_REAL b, KPP_REAL T, KPP_REAL Ya[], 
+		   KPP_REAL Yb[], KPP_REAL Ja[], KPP_REAL Jb[], KPP_REAL Ha[], 
+		   KPP_REAL Hb[], KPP_REAL Y[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for Hermite interpolation of order 5 on the interval [a,b]
+ P = c(1) + c(2)*(x-a) + ... + c(6)*(x-a)^5
+ P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb], P"[a,b] = [Ha,Hb]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Tau, amb[5], C[6][NVAR];
+  int i, j;
+
+  amb[0] = ((KPP_REAL)1.0)/(a-b);
+  for(i=1; i<5; i++)
+    amb[i] = amb[i-1]*amb[0];
+
+/* c(1) = ya; */
+  WCOPY(NVAR,Ya,1,&C[0][0],1);
+/* c(2) = ja; */
+  WCOPY(NVAR,Ja,1,&C[1][0],1);
+/* c(3) = ha/2; */
+  WCOPY(NVAR,Ha,1,&C[2][0],1);
+  WSCAL(NVAR,HALF,&C[2][0],1);
+
+/* c(4) = 10*amb(3)*ya - 10*amb(3)*yb - 6*amb(2)*ja - 4*amb(2)*jb  
+          + 1.5*amb(1)*ha - 0.5*amb(1)*hb ; */
+  WCOPY(NVAR,Ya,1,&C[3][0],1);
+  WSCAL(NVAR,10.0*amb[2],&C[3][0],1);
+  WAXPY(NVAR,-10.0*amb[2],Yb,1,&C[3][0],1);
+  WAXPY(NVAR,-6.0*amb[1],Ja,1,&C[3][0],1);
+  WAXPY(NVAR,-4.0*amb[1],Jb,1,&C[3][0],1);
+  WAXPY(NVAR, 1.5*amb[0],Ha,1,&C[3][0],1);
+  WAXPY(NVAR,-0.5*amb[0],Hb,1,&C[3][0],1);
+
+/* c(5) =   15*amb(4)*ya - 15*amb(4)*yb - 8.*amb(3)*ja - 7*amb(3)*jb 
+            + 1.5*amb(2)*ha - 1*amb(2)*hb ; */
+  WCOPY(NVAR,Ya,1,&C[4][0],1);
+  WSCAL(NVAR, 15.0*amb[3],&C[4][0],1);
+  WAXPY(NVAR,-15.0*amb[3],Yb,1,&C[4][0],1);
+  WAXPY(NVAR,-8.0*amb[2],Ja,1,&C[4][0],1);
+  WAXPY(NVAR,-7.0*amb[2],Jb,1,&C[4][0],1);
+  WAXPY(NVAR,1.5*amb[1],Ha,1,&C[4][0],1);
+  WAXPY(NVAR,-amb[1],Hb,1,&C[4][0],1);
+
+/* c(6) =   6*amb(5)*ya - 6*amb(5)*yb - 3.*amb(4)*ja - 3.*amb(4)*jb 
+            + 0.5*amb(3)*ha -0.5*amb(3)*hb ; */
+  WCOPY(NVAR,Ya,1,&C[5][0],1);
+  WSCAL(NVAR, 6.0*amb[4],&C[5][0],1);
+  WAXPY(NVAR,-6.0*amb[4],Yb,1,&C[5][0],1);
+  WAXPY(NVAR,-3.0*amb[3],Ja,1,&C[5][0],1);
+  WAXPY(NVAR,-3.0*amb[3],Jb,1,&C[5][0],1);
+  WAXPY(NVAR, 0.5*amb[2],Ha,1,&C[5][0],1);
+  WAXPY(NVAR,-0.5*amb[2],Hb,1,&C[5][0],1);
+
+  Tau = T - a;
+  WCOPY(NVAR,&C[5][0],1,Y,1);
+  for(j=4; j>=0; j--) {
+    WSCAL(NVAR,Tau,Y,1);
+    WAXPY(NVAR,ONE,&C[j][0],1,Y,1);
+  }
+
+} /* End of ros_Hermite5 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Ros2() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ --- AN L-STABLE METHOD, 2 stages, order 2
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL g;
+
+  g = (KPP_REAL)1.0 + ((KPP_REAL)1.0)/SQRT((KPP_REAL)2.0);
+
+  rosMethod = RS2;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "ROS-2");
+/*~~~> Number of stages */
+  ros_S = 2;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+  The lower triangular (subdiagonal) elements are stored in row-wise order:
+  A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+  The general mapping formula is:
+      A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+      C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = ((KPP_REAL)1.0)/g;
+  ros_C[0] = ((KPP_REAL)-2.0)/g;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0]= ((KPP_REAL)3.0)/((KPP_REAL)2.0*g);
+  ros_M[1]= ((KPP_REAL)1.0)/((KPP_REAL)2.0*g);
+
+/* E_i = Coefficients for error estimator */
+  ros_E[0] = ((KPP_REAL)1.0)/((KPP_REAL)2.0*g);
+  ros_E[1] = ((KPP_REAL)1.0)/((KPP_REAL)2.0*g);
+
+/*~~~> ros_ELO = estimator of local order - the minimum between the
+       main and the embedded scheme orders plus one */
+  ros_ELO = (KPP_REAL)2.0;
+
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.0;
+  ros_Alpha[1] = (KPP_REAL)1.0;
+
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0] = g;
+  ros_Gamma[1] =-g;
+
+} /* End of Ros2 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Ros3() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RS3;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "ROS-3");
+/*~~~> Number of stages */
+  ros_S = 3;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:
+       A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+       C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0]= (KPP_REAL)1.0;
+  ros_A[1]= (KPP_REAL)1.0;
+  ros_A[2]= (KPP_REAL)0.0;
+  ros_C[0] = (KPP_REAL)-0.10156171083877702091975600115545e01;
+  ros_C[1] = (KPP_REAL) 0.40759956452537699824805835358067e01;
+  ros_C[2] = (KPP_REAL) 0.92076794298330791242156818474003e01;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+  ros_NewF[2] = FALSE;
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = (KPP_REAL) 0.1e01;
+  ros_M[1] = (KPP_REAL) 0.61697947043828245592553615689730e01;
+  ros_M[2] = (KPP_REAL)-0.42772256543218573326238373806514;
+/* E_i = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL) 0.5;
+  ros_E[1] = (KPP_REAL)-0.29079558716805469821718236208017e01;
+  ros_E[2] = (KPP_REAL) 0.22354069897811569627360909276199;
+
+/*~~~> ros_ELO = estimator of local order - the minimum between the
+       main and the embedded scheme orders plus 1 */
+  ros_ELO = (KPP_REAL)3.0;
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0]= (KPP_REAL)0.0;
+  ros_Alpha[1]= (KPP_REAL)0.43586652150845899941601945119356;
+  ros_Alpha[2]= (KPP_REAL)0.43586652150845899941601945119356;
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0]= (KPP_REAL)0.43586652150845899941601945119356;
+  ros_Gamma[1]= (KPP_REAL)0.24291996454816804366592249683314;
+  ros_Gamma[2]= (KPP_REAL)0.21851380027664058511513169485832e01;
+
+} /* End of Ros3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Ros4() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1990)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RS4;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "ROS-4");
+/*~~~> Number of stages */
+  ros_S = 4;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:
+       A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+       C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = (KPP_REAL)0.2000000000000000e01;
+  ros_A[1] = (KPP_REAL)0.1867943637803922e01;
+  ros_A[2] = (KPP_REAL)0.2344449711399156;
+  ros_A[3] = ros_A[1];
+  ros_A[4] = ros_A[2];
+  ros_A[5] = (KPP_REAL)0.0;
+
+  ros_C[0] = (KPP_REAL)-0.7137615036412310e01;
+  ros_C[1] = (KPP_REAL) 0.2580708087951457e01;
+  ros_C[2] = (KPP_REAL) 0.6515950076447975;
+  ros_C[3] = (KPP_REAL)-0.2137148994382534e01;
+  ros_C[4] = (KPP_REAL)-0.3214669691237626;
+  ros_C[5] = (KPP_REAL)-0.6949742501781779;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+  ros_NewF[2] = TRUE;
+  ros_NewF[3] = FALSE;
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = (KPP_REAL)0.2255570073418735e01;
+  ros_M[1] = (KPP_REAL)0.2870493262186792;
+  ros_M[2] = (KPP_REAL)0.4353179431840180;
+  ros_M[3] = (KPP_REAL)0.1093502252409163e01;
+/*~~~> E_i  = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL)-0.2815431932141155;
+  ros_E[1] = (KPP_REAL)-0.7276199124938920e-01;
+  ros_E[2] = (KPP_REAL)-0.1082196201495311;
+  ros_E[3] = (KPP_REAL)-0.1093502252409163e01;
+
+/*~~~> ros_ELO  = estimator of local order - the minimum between the
+       main and the embedded scheme orders plus 1 */
+  ros_ELO = (KPP_REAL)4.0;
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.0;
+  ros_Alpha[1] = (KPP_REAL)0.1145640000000000e01;
+  ros_Alpha[2] = (KPP_REAL)0.6552168638155900;
+  ros_Alpha[3] = ros_Alpha[2];
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */ 
+  ros_Gamma[0] = (KPP_REAL) 0.5728200000000000;
+  ros_Gamma[1] = (KPP_REAL)-0.1769193891319233e01;
+  ros_Gamma[2] = (KPP_REAL) 0.7592633437920482;
+  ros_Gamma[3] = (KPP_REAL)-0.1049021087100450;
+
+} /* End of Ros4 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Rodas3() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RD3;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "RODAS-3");
+/*~~~> Number of stages */
+  ros_S = 4;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:
+       A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+       C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = (KPP_REAL)0.0;
+  ros_A[1] = (KPP_REAL)2.0;
+  ros_A[2] = (KPP_REAL)0.0;
+  ros_A[3] = (KPP_REAL)2.0;
+  ros_A[4] = (KPP_REAL)0.0;
+  ros_A[5] = (KPP_REAL)1.0;
+
+  ros_C[0] = (KPP_REAL) 4.0;
+  ros_C[1] = (KPP_REAL) 1.0;
+  ros_C[2] = (KPP_REAL)-1.0;
+  ros_C[3] = (KPP_REAL) 1.0;
+  ros_C[4] = (KPP_REAL)-1.0;
+  ros_C[5] = -(((KPP_REAL)8.0)/((KPP_REAL)3.0));
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = FALSE;
+  ros_NewF[2] = TRUE;
+  ros_NewF[3] = TRUE;
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = (KPP_REAL)2.0;
+  ros_M[1] = (KPP_REAL)0.0;
+  ros_M[2] = (KPP_REAL)1.0;
+  ros_M[3] = (KPP_REAL)1.0;
+/*~~~> E_i  = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL)0.0;
+  ros_E[1] = (KPP_REAL)0.0;
+  ros_E[2] = (KPP_REAL)0.0;
+  ros_E[3] = (KPP_REAL)1.0;
+
+/*~~~> ros_ELO  = estimator of local order - the minimum between the
+    main and the embedded scheme orders plus 1 */
+  ros_ELO  = (KPP_REAL)3.0;
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.0;
+  ros_Alpha[1] = (KPP_REAL)0.0;
+  ros_Alpha[2] = (KPP_REAL)1.0;
+  ros_Alpha[3] = (KPP_REAL)1.0;
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0] = (KPP_REAL)0.5;
+  ros_Gamma[1] = (KPP_REAL)1.5;
+  ros_Gamma[2] = (KPP_REAL)0.0;
+  ros_Gamma[3] = (KPP_REAL)0.0;
+
+} /* End of Rodas3 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Rodas4() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+
+      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+      SPRINGER-VERLAG (1996)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  rosMethod = RD4;
+/*~~~> Name of the method */
+  strcpy(ros_Name, "RODAS-4");
+/*~~~> Number of stages */
+  ros_S = 6;
+
+/*~~~> Y_stage_i ~ Y( T + H*Alpha_i ) */
+  ros_Alpha[0] = (KPP_REAL)0.000;
+  ros_Alpha[1] = (KPP_REAL)0.386;
+  ros_Alpha[2] = (KPP_REAL)0.210;
+  ros_Alpha[3] = (KPP_REAL)0.630;
+  ros_Alpha[4] = (KPP_REAL)1.000;
+  ros_Alpha[5] = (KPP_REAL)1.000;
+
+/*~~~> Gamma_i = \sum_j  gamma_{i,j} */
+  ros_Gamma[0] = (KPP_REAL) 0.2500000000000000;
+  ros_Gamma[1] = (KPP_REAL)-0.1043000000000000;
+  ros_Gamma[2] = (KPP_REAL) 0.1035000000000000;
+  ros_Gamma[3] = (KPP_REAL)-0.3620000000000023e-01;
+  ros_Gamma[4] = (KPP_REAL) 0.0;
+  ros_Gamma[5] = (KPP_REAL) 0.0;
+
+/*~~~> The coefficient matrices A and C are strictly lower triangular.
+   The lower triangular (subdiagonal) elements are stored in row-wise order:
+   A[0][1] = ros_A[0], A[0][2]=ros_A[1], A[1][2]=ros_A[2], etc.
+   The general mapping formula is:  A[i][j] = ros_A[ (i-1)*(i-2)/2 + j ]
+                  C[i][j] = ros_C[ (i-1)*(i-2)/2 + j ] */
+
+  ros_A[0] = (KPP_REAL) 0.1544000000000000e01;
+  ros_A[1] = (KPP_REAL) 0.9466785280815826;
+  ros_A[2] = (KPP_REAL) 0.2557011698983284;
+  ros_A[3] = (KPP_REAL) 0.3314825187068521e01;
+  ros_A[4] = (KPP_REAL) 0.2896124015972201e01;
+  ros_A[5] = (KPP_REAL) 0.9986419139977817;
+  ros_A[6] = (KPP_REAL) 0.1221224509226641e01;
+  ros_A[7] = (KPP_REAL) 0.6019134481288629e01;
+  ros_A[8] = (KPP_REAL) 0.1253708332932087e02;
+  ros_A[9] = (KPP_REAL)-0.6878860361058950;
+  ros_A[10] = ros_A[6];
+  ros_A[11] = ros_A[7];
+  ros_A[12] = ros_A[8];
+  ros_A[13] = ros_A[9];
+  ros_A[14] = (KPP_REAL)1.0;
+  
+  ros_C[0]  = (KPP_REAL)-0.5668800000000000e01;
+  ros_C[1]  = (KPP_REAL)-0.2430093356833875e01;
+  ros_C[2]  = (KPP_REAL)-0.2063599157091915;
+  ros_C[3]  = (KPP_REAL)-0.1073529058151375;
+  ros_C[4]  = (KPP_REAL)-0.9594562251023355e01;
+  ros_C[5]  = (KPP_REAL)-0.2047028614809616e02;
+  ros_C[6]  = (KPP_REAL) 0.7496443313967647e01;
+  ros_C[7]  = (KPP_REAL)-0.1024680431464352e02;
+  ros_C[8]  = (KPP_REAL)-0.3399990352819905e02;
+  ros_C[9]  = (KPP_REAL) 0.1170890893206160e02;
+  ros_C[10] = (KPP_REAL) 0.8083246795921522e01;
+  ros_C[11] = (KPP_REAL)-0.7981132988064893e01;
+  ros_C[12] = (KPP_REAL)-0.3152159432874371e02;
+  ros_C[13] = (KPP_REAL) 0.1631930543123136e02;
+  ros_C[14] = (KPP_REAL)-0.6058818238834054e01;
+
+/*~~~> M_i = Coefficients for new step solution */
+  ros_M[0] = ros_A[6];
+  ros_M[1] = ros_A[7];
+  ros_M[2] = ros_A[8];
+  ros_M[3] = ros_A[9];
+  ros_M[4] = (KPP_REAL)1.0;
+  ros_M[5] = (KPP_REAL)1.0;
+
+/*~~~> E_i  = Coefficients for error estimator */
+  ros_E[0] = (KPP_REAL)0.0;
+  ros_E[1] = (KPP_REAL)0.0;
+  ros_E[2] = (KPP_REAL)0.0;
+  ros_E[3] = (KPP_REAL)0.0;
+  ros_E[4] = (KPP_REAL)0.0;
+  ros_E[5] = (KPP_REAL)1.0;
+
+/*~~~> Does the stage i require a new function evaluation (ros_NewF[i]=TRUE)
+       or does it re-use the function evaluation from stage i-1 
+       (ros_NewF[i]=FALSE) */
+  ros_NewF[0] = TRUE;
+  ros_NewF[1] = TRUE;
+  ros_NewF[2] = TRUE;
+  ros_NewF[3] = TRUE;
+  ros_NewF[4] = TRUE;
+  ros_NewF[5] = TRUE;
+
+/*~~~> ros_ELO  = estimator of local order - the minimum between the
+        main and the embedded scheme orders plus 1 */
+  ros_ELO = (KPP_REAL)4.0;
+
+} /* End of Rodas4 */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FunTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Ydot[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the ODE function call.
+  Updates the rate coefficients (and possibly the fixed species) at each call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Told;
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+  Fun( Y, FIX, RCONST, Ydot );
+  TIME = Told;
+
+} /* End of FunTemplate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JacTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Jcb[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the ODE Jacobian call.
+  Updates the rate coefficients (and possibly the fixed species) at each call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Told;
+#ifdef FULL_ALGEBRA
+  KPP_REAL JV[LU_NONZERO];
+  int i, j;
+#endif
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+#ifdef FULL_ALGEBRA
+  Jac_SP(Y, FIX, RCONST, JV);
+  for(j=0; j<NVAR; j++) {
+    for(i=0; i<NVAR; i++)
+      Jcb[i][j] = (KPP_REAL)0.0;
+  }
+  for(i=0; i<LU_NONZERO; i++)
+    Jcb[LU_ICOL[i]][LU_IROW[i]] = JV[i];
+#else
+  Jac_SP( Y, FIX, RCONST, Jcb );
+#endif
+  TIME = Told;
+} /* End of JacTemplate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void HessTemplate( KPP_REAL T, KPP_REAL Y[], KPP_REAL Hes[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  Template for the ODE Hessian call.
+  Updates the rate coefficients (and possibly the fixed species) at each call
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables */
+  KPP_REAL Told;
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+  Hessian( Y, FIX, RCONST, Hes );
+  TIME = Told;
+
+} /* End of HessTemplate */
+
+/* End of INTEGRATE function                                                 */
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock_adj
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_adj.f90	(revision 3477)
@@ -0,0 +1,2570 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Discrete adjoints of Rosenbrock,                                       !
+!           for several Rosenbrock methods:                               !
+!               * Ros2                                                    !
+!               * Ros3                                                    !
+!               * Ros4                                                    !
+!               * Rodas3                                                  !
+!               * Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  ! 
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+   USE KPP_ROOT_Precision
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   USE KPP_ROOT_LinearAlgebra
+   USE KPP_ROOT_Rates
+   USE KPP_ROOT_Function
+   USE KPP_ROOT_Jacobian
+   USE KPP_ROOT_Hessian
+   USE KPP_ROOT_Util
+   
+   IMPLICIT NONE
+   PUBLIC
+   SAVE
+  
+!~~~>  Statistics on the work performed by the Rosenbrock method
+   INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+                         Nrej=5, Ndec=6, Nsol=7, Nsng=8, &
+                         Ntexit=1, Nhexit=2, Nhnew = 3
+
+
+CONTAINS ! Routines in the module KPP_ROOT_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_ADJ( NADJ, Y, Lambda, TIN, TOUT, &
+           ATOL_adj, RTOL_adj,                        &
+           ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE        
+    
+!~~~> Y - Concentrations
+   KPP_REAL  :: Y(NVAR)
+!~~~> NADJ - No. of cost functionals for which adjoints
+!                are evaluated simultaneously
+!            If single cost functional is considered (like in
+!                most applications) simply set NADJ = 1      
+   INTEGER NADJ
+!~~~> Lambda - Sensitivities w.r.t. concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+   KPP_REAL  :: Lambda(NVAR,NADJ)
+   KPP_REAL, INTENT(IN)  :: TIN  ! TIN  - Start Time
+   KPP_REAL, INTENT(IN)  :: TOUT ! TOUT - End Time
+!~~~> Tolerances for adjoint calculations
+!     (used only for full continuous adjoint)   
+   KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+!~~~> Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+
+   KPP_REAL :: RCNTRL(20), RSTATUS(20)
+   INTEGER       :: ICNTRL(20), ISTATUS(20), IERR
+
+   INTEGER, SAVE :: Ntotal
+
+
+   ICNTRL(1:20)  = 0
+   RCNTRL(1:20)  = 0.0_dp
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = 0.0_dp
+   
+   
+!~~~> fine-tune the integrator:
+!   ICNTRL(1) = 0       ! 0 = non-autonomous, 1 = autonomous
+!   ICNTRL(2) = 1       ! 0 = scalar, 1 = vector tolerances
+!   RCNTRL(3) = STEPMIN ! starting step
+!   ICNTRL(3) = 5       ! choice of the method for forward integration
+!   ICNTRL(6) = 1       ! choice of the method for continuous adjoint
+!   ICNTRL(7) = 2       ! 1=none, 2=discrete, 3=full continuous, 4=simplified continuous adjoint
+!   ICNTRL(8) = 1       ! Save fwd LU factorization: 0 = *don't* save, 1 = save
+
+
+   ! if optional parameters are given, and if they are >=0, then they overwrite default settings
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) >= 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) >= 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+
+   
+   CALL RosenbrockADJ(Y, NADJ, Lambda,                 &
+         TIN, TOUT,                                    &
+         ATOL, RTOL, ATOL_adj, RTOL_adj,               &
+         RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR)
+
+
+!~~~> Debug option: show number of steps
+!    Ntotal = Ntotal + ISTATUS(Nstp)
+!    WRITE(6,777) ISTATUS(Nstp),Ntotal,VAR(ind_O3),VAR(ind_NO2)
+!777 FORMAT('NSTEPS=',I6,' (',I6,')  O3=',E24.14,'  NO2=',E24.14)    
+
+   IF (IERR < 0) THEN
+     print *,'RosenbrockADJ: Unsucessful step at T=',  &
+         TIN,' (IERR=',IERR,')'
+   END IF
+
+   STEPMIN = RSTATUS(Nhexit)
+   ! if optional parameters are given for output 
+   !         copy to them to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+
+END SUBROUTINE INTEGRATE_ADJ
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE RosenbrockADJ( Y, NADJ, Lambda,             &
+           Tstart, Tend,                               &
+           AbsTol, RelTol, AbsTol_adj, RelTol_adj,     &
+           RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   
+!    ADJ = Adjoint of the Tangent Linear Model of a Rosenbrock Method
+!
+!    Solves the system y'=F(t,y) using a RosenbrockADJ method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on RosenbrockADJ methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.       
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                   
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    
+!~~~>   INPUT ARGUMENTS: 
+!    
+!-     Y(NVAR)    = vector of initial conditions (at T=Tstart)
+!      NADJ       -> dimension of linearized system, 
+!                   i.e. the number of sensitivity coefficients
+!-     Lambda(NVAR,NADJ) -> vector of initial sensitivity conditions (at T=Tstart)
+!-    [Tstart,Tend]  = time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE Fun( T, Y, Ydot ) = ODE function, 
+!                       returns Ydot = Y' = F(T,Y) 
+!- SUBROUTINE Jac( T, Y, Jcb ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY 
+!-    ICNTRL(1:10)    = integer inputs parameters
+!-    RCNTRL(1:10)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!     
+!-    Y(NVAR)    -> vector of final states (at T->Tend)
+!-    Lambda(NVAR,NADJ) -> vector of final sensitivities (at T=Tend)
+!-    ICNTRL(11:20)   -> integer output parameters
+!-    RCNTRL(11:20)   -> real output parameters
+!-    IERR       -> job status upon return
+!       - succes (positive value) or failure (negative value) -
+!           =  1 : Success
+!           = -1 : Improper value for maximal no of steps
+!           = -2 : Selected RosenbrockADJ method not implemented
+!           = -3 : Hmin/Hmax/Hstart must be positive
+!           = -4 : FacMin/FacMax/FacRej must be positive
+!           = -5 : Improper tolerance values
+!           = -6 : No of steps exceeds maximum bound
+!           = -7 : Step size too small
+!           = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2)   = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :  default method is Rodas3
+!        = 1 :  method is  Ros2
+!        = 2 :  method is  Ros3 
+!        = 3 :  method is  Ros4 
+!        = 4 :  method is  Rodas3
+!        = 5:   method is  Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0) the default value of BUFSIZE is used
+!
+!    ICNTRL(6)  -> selection of a particular Rosenbrock method for the
+!                continuous adjoint integration - for cts adjoint it
+!                can be different than the forward method ICNTRL(3)
+!         Note 1: to avoid interpolation errors (which can be huge!) 
+!                   it is recommended to use only ICNTRL(7) = 2 or 4
+!         Note 2: the performance of the full continuous adjoint
+!                   strongly depends on the forward solution accuracy Abs/RelTol
+!
+!    ICNTRL(7) -> Type of adjoint algorithm
+!         = 0 : default is discrete adjoint ( of method ICNTRL(3) )
+!         = 1 : no adjoint       
+!         = 2 : discrete adjoint ( of method ICNTRL(3) )
+!         = 3 : fully adaptive continuous adjoint ( with method ICNTRL(6) )
+!         = 4 : simplified continuous adjoint ( with method ICNTRL(6) )
+!
+!    ICNTRL(8)  -> checkpointing the LU factorization at each step:
+!        ICNTRL(8)=0 : do *not* save LU factorization (the default)
+!        ICNTRL(8)=1 : save LU factorization
+!        Note: if ICNTRL(7)=1 the LU factorization is *not* saved
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO 
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!          
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!            (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller 
+!         than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to RosenbrockADJ adds the corrent no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the 
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~>  Arguments   
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+   INTEGER, INTENT(IN)          :: NADJ
+   KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+   KPP_REAL, INTENT(IN)    :: Tstart,Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(NVAR),RelTol(NVAR)
+   KPP_REAL, INTENT(IN)    :: AbsTol_adj(NVAR,NADJ), RelTol_adj(NVAR,NADJ)
+   INTEGER, INTENT(IN)          :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER, INTENT(INOUT)       :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)         :: IERR
+!~~~>  Parameters of the Rosenbrock method, up to 6 stages
+   INTEGER ::  ros_S, rosMethod
+   INTEGER, PARAMETER :: RS2=1, RS3=2, RS4=3, RD3=4, RD4=5
+   KPP_REAL :: ros_A(15), ros_C(15), ros_M(6), ros_E(6), &
+                    ros_Alpha(6), ros_Gamma(6), ros_ELO
+   LOGICAL :: ros_NewF(6)
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Types of Adjoints Implemented
+   INTEGER, PARAMETER :: Adj_none = 1, Adj_discrete = 2,      &
+                   Adj_continuous = 3, Adj_simple_continuous = 4
+!~~~>  Checkpoints in memory
+   INTEGER, PARAMETER :: bufsize = 200000
+   INTEGER :: stack_ptr = 0 ! last written entry
+   KPP_REAL, DIMENSION(:),   POINTER :: chk_H, chk_T
+   KPP_REAL, DIMENSION(:,:), POINTER :: chk_Y, chk_K, chk_J
+   KPP_REAL, DIMENSION(:,:), POINTER :: chk_dY, chk_d2Y
+!~~~>  Local variables     
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart
+   KPP_REAL :: Texit
+   INTEGER :: i, UplimTol, Max_no_steps
+   INTEGER :: AdjointType, CadjMethod 
+   LOGICAL :: Autonomous, VectorTol, SaveLU
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+
+!~~~>  Initialize statistics
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = ZERO
+   
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+      UplimTol  = NVAR
+   ELSE 
+      VectorTol = .FALSE.
+      UplimTol  = 1
+   END IF
+
+!~~~>   Initialize the particular Rosenbrock method selected
+   SELECT CASE (ICNTRL(3))
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (0,4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=',ICNTRL(3) 
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+       RETURN
+   END SELECT
+   
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = bufsize - 1
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE 
+      PRINT * ,'User-selected max no. of steps: ICNTRL(4)=',ICNTRL(4)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+
+!~~~>  The particular Rosenbrock method chosen for integrating the cts adjoint
+   IF (ICNTRL(6) == 0) THEN
+      CadjMethod = 4
+   ELSEIF ( (ICNTRL(6) >= 1).AND.(ICNTRL(6) <= 5) ) THEN
+      CadjMethod = ICNTRL(6)
+   ELSE  
+      PRINT * , 'Unknown CADJ Rosenbrock method: ICNTRL(6)=', CadjMethod
+      CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+ 
+!~~~>  Discrete or continuous adjoint formulation
+   IF ( ICNTRL(7) == 0 ) THEN
+       AdjointType = Adj_discrete
+   ELSEIF ( (ICNTRL(7) >= 1).AND.(ICNTRL(7) <= 4) ) THEN
+       AdjointType = ICNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected adjoint type: ICNTRL(7)=', AdjointType
+      CALL ros_ErrorMsg(-9,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) 
+
+ 
+!~~~>  Unit roundoff (1+Roundoff>1)  
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN 
+      Hmin = RCNTRL(1)
+   ELSE  
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hold < FacMax 
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2d0
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE  
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0d0
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE  
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1d0
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE  
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9d0
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.d0*Roundoff) &
+         .OR. (RelTol(i) >= 1.0d0) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+     
+ 
+!~~~>  Allocate checkpoint space or open checkpoint files
+   IF (AdjointType == Adj_discrete) THEN
+       CALL ros_AllocateDBuffers( ros_S )
+   ELSEIF ( (AdjointType == Adj_continuous).OR.  &
+           (AdjointType == Adj_simple_continuous) ) THEN
+       CALL ros_AllocateCBuffers
+   END IF
+   
+!~~~>  CALL Forward Rosenbrock method   
+   CALL ros_FwdInt(Y,Tstart,Tend,Texit,          & 
+        AbsTol, RelTol,                          & 
+!  Error indicator
+        IERR)
+
+   PRINT*,'FORWARD STATISTICS'
+   PRINT*,'Step=',Nstp,' Acc=',Nacc,   &
+        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  If Forward integration failed return   
+   IF (IERR<0) RETURN
+
+!~~~>   Initialize the particular Rosenbrock method for continuous adjoint
+   IF ( (AdjointType == Adj_continuous).OR. &
+           (AdjointType == Adj_simple_continuous) ) THEN
+   SELECT CASE (CadjMethod)
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=', ICNTRL(3)
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR) 
+       RETURN     
+   END SELECT
+   END IF
+
+   SELECT CASE (AdjointType)   
+   CASE (Adj_discrete)   
+     CALL ros_DadjInt (                          &
+        NADJ, Lambda,                            &
+        Tstart, Tend, Texit,                     &
+        IERR )
+   CASE (Adj_continuous) 
+     CALL ros_CadjInt (                          &
+        NADJ, Lambda,                            &
+        Tend, Tstart, Texit,                     &
+        AbsTol_adj, RelTol_adj,                  &
+        IERR )
+   CASE (Adj_simple_continuous)
+     CALL ros_SimpleCadjInt (                    &
+        NADJ, Lambda,                            &
+        Tstart, Tend, Texit,                     &
+        IERR )
+   END SELECT ! AdjointType
+
+   PRINT*,'ADJOINT STATISTICS'
+   PRINT*,'Step=',Nstp,' Acc=',Nacc,             &
+        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  Free checkpoint space or close checkpoint files
+   IF (AdjointType == Adj_discrete) THEN
+      CALL ros_FreeDBuffers
+   ELSEIF ( (AdjointType == Adj_continuous) .OR. &
+           (AdjointType == Adj_simple_continuous) ) THEN
+      CALL ros_FreeCBuffers
+   END IF
+   
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS !  Procedures internal to RosenbrockADJ
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_AllocateDBuffers( S )
+!~~~>  Allocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i, S
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_K(NVAR*S,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer K'; STOP
+   END IF  
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+     ALLOCATE( chk_J(NVAR*NVAR,bufsize), STAT=i )
+#else
+     ALLOCATE( chk_J(LU_NONZERO,bufsize), STAT=i )
+#endif
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer J'; STOP
+     END IF   
+   END IF   
+
+ END SUBROUTINE ros_AllocateDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FreeDBuffers
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_K, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer K'; STOP
+   END IF   
+   IF (SaveLU) THEN 
+     DEALLOCATE( chk_J, STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed deallocation of buffer J'; STOP
+     END IF   
+   END IF   
+ 
+ END SUBROUTINE ros_FreeDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_AllocateCBuffers
+!~~~>  Allocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_dY(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer dY'; STOP
+   END IF   
+   ALLOCATE( chk_d2Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE ros_AllocateCBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FreeCBuffers
+!~~~>  Dallocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_dY, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer dY'; STOP
+   END IF   
+   DEALLOCATE( chk_d2Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE ros_FreeCBuffers
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_DPush( S, T, H, Ystage, K, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: S ! no of stages
+   KPP_REAL :: T, H, Ystage(NVAR*S), K(NVAR*S)
+   INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+   KPP_REAL :: E(NVAR,NVAR)
+#else       
+   KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   !CALL WCOPY(NVAR*S,Ystage,1,chk_Y(1,stack_ptr),1)
+   !CALL WCOPY(NVAR*S,K,1,chk_K(1,stack_ptr),1)
+   chk_Y(1:NVAR*S,stack_ptr) = Ystage(1:NVAR*S)
+   chk_K(1:NVAR*S,stack_ptr) = K(1:NVAR*S)
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+       chk_J(1:NVAR,1:NVAR,stack_ptr) = E(1:NVAR,1:NVAR)
+       chk_P(1:NVAR,stack_ptr)        = P(1:NVAR)
+#else       
+       chk_J(1:LU_NONZERO,stack_ptr)  = E(1:LU_NONZERO)
+#endif
+    END IF
+  
+  END SUBROUTINE ros_DPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_DPop( S, T, H, Ystage, K, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   INTEGER :: S ! no of stages
+   KPP_REAL :: T, H, Ystage(NVAR*S), K(NVAR*S)
+   INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+   KPP_REAL :: E(NVAR,NVAR)
+#else       
+   KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   !CALL WCOPY(NVAR*S,chk_Y(1,stack_ptr),1,Ystage,1)
+   !CALL WCOPY(NVAR*S,chk_K(1,stack_ptr),1,K,1)
+   Ystage(1:NVAR*S) = chk_Y(1:NVAR*S,stack_ptr)
+   K(1:NVAR*S)      = chk_K(1:NVAR*S,stack_ptr)
+   !CALL WCOPY(LU_NONZERO,chk_J(1,stack_ptr),1,Jcb,1)
+   IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+       E(1:NVAR,1:NVAR) = chk_J(1:NVAR,1:NVAR,stack_ptr)
+       P(1:NVAR)        = chk_P(1:NVAR,stack_ptr)
+#else       
+       E(1:LU_NONZERO)  = chk_J(1:LU_NONZERO,stack_ptr)
+#endif
+    END IF
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE ros_DPop
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_CPush( T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   !CALL WCOPY(NVAR,Y,1,chk_Y(1,stack_ptr),1)
+   !CALL WCOPY(NVAR,dY,1,chk_dY(1,stack_ptr),1)
+   !CALL WCOPY(NVAR,d2Y,1,chk_d2Y(1,stack_ptr),1)
+   chk_Y(1:NVAR,stack_ptr)   = Y(1:NVAR)
+   chk_dY(1:NVAR,stack_ptr)  = dY(1:NVAR)
+   chk_d2Y(1:NVAR,stack_ptr) = d2Y(1:NVAR)
+  END SUBROUTINE ros_CPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_CPop( T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   !CALL WCOPY(NVAR,chk_Y(1,stack_ptr),1,Y,1)
+   !CALL WCOPY(NVAR,chk_dY(1,stack_ptr),1,dY,1)
+   !CALL WCOPY(NVAR,chk_d2Y(1,stack_ptr),1,d2Y,1)
+   Y(1:NVAR)   = chk_Y(1:NVAR,stack_ptr)
+   dY(1:NVAR)  = chk_dY(1:NVAR,stack_ptr)
+   d2Y(1:NVAR) = chk_d2Y(1:NVAR,stack_ptr)
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE ros_CPop
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RosenbrockADJ due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected RosenbrockADJ method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum buffer bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-9)    
+      PRINT * , '--> Improper type of adjoint selected'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+   
+     
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_FwdInt (Y,                       &
+        Tstart, Tend, T,                         &
+        AbsTol, RelTol,                          &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockADJ method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Input: tolerances      
+   KPP_REAL, INTENT(IN) ::  AbsTol(NVAR), RelTol(NVAR)
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ynew(NVAR), Fcn0(NVAR), Fcn(NVAR) 
+   KPP_REAL :: K(NVAR*ros_S), dFdT(NVAR)
+   KPP_REAL, DIMENSION(:), POINTER :: Ystage
+#ifdef FULL_ALGEBRA    
+   KPP_REAL :: Jac0(NVAR,NVAR),  Ghimj(NVAR,NVAR)
+#else
+   KPP_REAL :: Jac0(LU_NONZERO), Ghimj(LU_NONZERO)
+#endif
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Yerr(NVAR)
+   INTEGER :: Pivot(NVAR), Direction, ioffset, i, j, istage
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Allocate stage vector buffer if needed
+   IF (AdjointType == Adj_discrete) THEN
+        ALLOCATE(Ystage(NVAR*ros_S), STAT=i)
+        ! Uninitialized Ystage may lead to NaN on some compilers
+        Ystage = 0.0d0
+        IF (i/=0) THEN
+          PRINT*,'Allocation of Ystage failed'
+          STOP
+        END IF
+   END IF   
+   
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = ZERO
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.0_dp*Roundoff) H = DeltaMin
+
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   RSTATUS(Nhexit) = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL FunTemplate(T,Y,Fcn0)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1 
+
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+   END IF
+  
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T,Y,Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+ 
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1), &
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+NVAR)
+       ioffset = NVAR*(istage-1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         CALL WCOPY(NVAR,Fcn0,1,Fcn,1)
+         IF (AdjointType == Adj_discrete) THEN ! Save stage solution
+            ! CALL WCOPY(NVAR,Y,1,Ystage(1),1)
+            Ystage(1:NVAR) = Y(1:NVAR)
+            CALL WCOPY(NVAR,Y,1,Ynew,1)
+         END IF   
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR,Y,1,Ynew,1)
+         DO j = 1, istage-1
+           CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+            K(NVAR*(j-1)+1),1,Ynew,1) 
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL FunTemplate(Tau,Ynew,Fcn)
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+      ! save stage solution every time even if ynew is not updated
+       IF ( ( istage > 1 ).AND.(AdjointType == Adj_discrete) ) THEN
+         ! CALL WCOPY(NVAR,Ynew,1,Ystage(ioffset+1),1)
+         Ystage(ioffset+1:ioffset+NVAR) = Ynew(1:NVAR)
+       END IF   
+       CALL WCOPY(NVAR,Fcn,1,K(ioffset+1),1)
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1),1,K(ioffset+1),1)
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(NVAR,HG,dFdT,1,K(ioffset+1),1)
+       END IF
+       CALL ros_Solve('N', Ghimj, Pivot, K(ioffset+1))
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   CALL WCOPY(NVAR,Y,1,Ynew,1)
+   DO j=1,ros_S
+         CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1),1,Ynew,1)
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL WSCAL(NVAR,ZERO,Yerr,1)
+   DO j=1,ros_S     
+        CALL WAXPY(NVAR,ros_E(j),K(NVAR*(j-1)+1),1,Yerr,1)
+   END DO 
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      IF (AdjointType == Adj_discrete) THEN ! Save current state
+          CALL ros_DPush( ros_S, T, H, Ystage, K, Ghimj, Pivot )
+      ELSEIF ( (AdjointType == Adj_continuous) .OR. &
+           (AdjointType == Adj_simple_continuous) ) THEN
+#ifdef FULL_ALGEBRA
+          K = MATMUL(Jac0,Fcn0)
+#else           
+          CALL Jac_SP_Vec( Jac0, Fcn0, K(1) )
+#endif          
+          IF (.NOT. Autonomous) THEN
+             CALL WAXPY(NVAR,ONE,dFdT,1,K(1),1)
+          END IF   
+          CALL ros_CPush( T, H, Y, Fcn0, K(1) )
+      END IF      
+      CALL WCOPY(NVAR,Ynew,1,Y,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew      
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1) THEN
+         ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+   
+!~~~> Save last state: only needed for continuous adjoint
+   IF ( (AdjointType == Adj_continuous) .OR. &
+       (AdjointType == Adj_simple_continuous) ) THEN
+       CALL FunTemplate(T,Y,Fcn0)
+       ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       CALL JacTemplate(T,Y,Jac0)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA
+       K = MATMUL(Jac0,Fcn0)
+#else
+       CALL Jac_SP_Vec( Jac0, Fcn0, K(1) )
+#endif       
+       IF (.NOT. Autonomous) THEN
+           CALL ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+           CALL WAXPY(NVAR,ONE,dFdT,1,K(1),1)
+       END IF   
+       CALL ros_CPush( T, H, Y, Fcn0, K(1) )
+!~~~> Deallocate stage buffer: only needed for discrete adjoint
+   ELSEIF (AdjointType == Adj_discrete) THEN 
+        DEALLOCATE(Ystage, STAT=i)
+        IF (i/=0) THEN
+          PRINT*,'Deallocation of Ystage failed'
+          STOP
+        END IF
+   END IF   
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_FwdInt
+   
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_DadjInt (                        &
+        NADJ, Lambda,                            &
+        Tstart, Tend, T,                         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockSOA method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+   KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+!!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ystage(NVAR*ros_S), K(NVAR*ros_S)
+   KPP_REAL :: U(NVAR*ros_S,NADJ), V(NVAR*ros_S,NADJ)
+#ifdef FULL_ALGEBRA
+   KPP_REAL, DIMENSION(NVAR,NVAR)  :: Jac, dJdT, Ghimj
+#else
+   KPP_REAL, DIMENSION(LU_NONZERO) :: Jac, dJdT, Ghimj
+#endif
+   KPP_REAL :: Hes0(NHESS)
+   KPP_REAL :: Tmp(NVAR), Tmp2(NVAR)
+   KPP_REAL :: H, HC, HA, Tau 
+   INTEGER :: Pivot(NVAR), Direction
+   INTEGER :: i, j, m, istage, istart, jstart
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+
+!~~~> Time loop begins below 
+TimeLoop: DO WHILE ( stack_ptr > 0 )
+        
+   !~~~>  Recover checkpoints for stage values and vectors
+   CALL ros_DPop( ros_S, T, H, Ystage, K, Ghimj, Pivot )
+
+!   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+
+!~~~>    Compute LU decomposition 
+   IF (.NOT.SaveLU) THEN
+     CALL JacTemplate(T,Ystage(1),Ghimj)
+     ISTATUS(Njac) = ISTATUS(Njac) + 1
+     Tau = ONE/(Direction*H*ros_Gamma(1))
+#ifdef FULL_ALGEBRA
+     Ghimj(1:NVAR,1:NVAR) = -Ghimj(1:NVAR,1:NVAR)
+     DO i=1,NVAR
+       Ghimj(i,i) = Ghimj(i,i)+Tau
+     END DO
+#else
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+Tau
+     END DO
+#endif
+     CALL ros_Decomp( Ghimj, Pivot, j )
+   END IF
+            
+!~~~>   Compute Hessian at the beginning of the interval
+   CALL HessTemplate(T,Ystage(1),Hes0)
+   
+!~~~>   Compute the stages
+Stage: DO istage = ros_S, 1, -1
+      
+      !~~~> Current istage first entry 
+       istart = NVAR*(istage-1) + 1
+      
+      !~~~> Compute U
+       DO m = 1,NADJ
+         CALL WCOPY(NVAR,Lambda(1,m),1,U(istart,m),1)
+         CALL WSCAL(NVAR,ros_M(istage),U(istart,m),1)
+       END DO ! m=1:NADJ
+       DO j = istage+1, ros_S
+         jstart = NVAR*(j-1) + 1
+         HA = ros_A((j-1)*(j-2)/2+istage)
+         HC = ros_C((j-1)*(j-2)/2+istage)/(Direction*H)
+         DO m = 1,NADJ
+           CALL WAXPY(NVAR,HA,V(jstart,m),1,U(istart,m),1) 
+           CALL WAXPY(NVAR,HC,U(jstart,m),1,U(istart,m),1) 
+         END DO ! m=1:NADJ
+       END DO
+       DO m = 1,NADJ
+         CALL ros_Solve('T', Ghimj, Pivot, U(istart,m))
+       END DO ! m=1:NADJ
+      !~~~> Compute V 
+       Tau = T + ros_Alpha(istage)*Direction*H
+       CALL JacTemplate(Tau,Ystage(istart),Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+       DO m = 1,NADJ
+#ifdef FULL_ALGEBRA
+         V(istart:istart+NVAR-1,m) = MATMUL(TRANSPOSE(Jac),U(istart:istart+NVAR-1,m))
+#else
+         CALL JacTR_SP_Vec(Jac,U(istart,m),V(istart,m)) 
+#endif         
+       END DO ! m=1:NADJ
+             
+   END DO Stage     
+
+   IF (.NOT.Autonomous) THEN
+!~~~>  Compute the Jacobian derivative with respect to T. 
+!      Last "Jac" computed for stage 1
+      CALL ros_JacTimeDerivative ( T, Roundoff, Ystage(1), Jac, dJdT )
+   END IF
+
+!~~~>  Compute the new solution 
+   
+      !~~~>  Compute Lambda 
+      DO istage=1,ros_S
+         istart = NVAR*(istage-1) + 1
+         DO m = 1,NADJ
+           ! Add V_i
+           CALL WAXPY(NVAR,ONE,V(istart,m),1,Lambda(1,m),1)
+           ! Add (H0xK_i)^T * U_i
+           CALL HessTR_Vec ( Hes0, U(istart,m), K(istart), Tmp )
+           CALL WAXPY(NVAR,ONE,Tmp,1,Lambda(1,m),1)
+         END DO ! m=1:NADJ
+      END DO
+     ! Add H * dJac_dT_0^T * \sum(gamma_i U_i)
+     ! Tmp holds sum gamma_i U_i
+      IF (.NOT.Autonomous) THEN
+         DO m = 1,NADJ
+           Tmp(1:NVAR) = ZERO
+           DO istage = 1, ros_S
+             istart = NVAR*(istage-1) + 1
+             CALL WAXPY(NVAR,ros_Gamma(istage),U(istart,m),1,Tmp,1)
+           END DO  
+#ifdef FULL_ALGEBRA
+           Tmp2 = MATMUL(TRANSPOSE(dJdT),Tmp)
+#else
+           CALL JacTR_SP_Vec(dJdT,Tmp,Tmp2) 
+#endif           
+           CALL WAXPY(NVAR,H,Tmp2,1,Lambda(1,m),1)
+         END DO ! m=1:NADJ
+      END IF ! .NOT.Autonomous
+ 
+
+   END DO TimeLoop 
+   
+!~~~> Save last state
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE ros_DadjInt
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   
+   
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_CadjInt (                        &
+        NADJ, Y,                                 &
+        Tstart, Tend, T,                         &
+        AbsTol_adj, RelTol_adj,                  &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockADJ method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN) :: NADJ
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR,NADJ)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Input: adjoint tolerances   
+   KPP_REAL, INTENT(IN) :: AbsTol_adj(NVAR,NADJ), RelTol_adj(NVAR,NADJ)
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Y0(NVAR)
+   KPP_REAL :: Ynew(NVAR,NADJ), Fcn0(NVAR,NADJ), Fcn(NVAR,NADJ) 
+   KPP_REAL :: K(NVAR*ros_S,NADJ), dFdT(NVAR,NADJ)
+#ifdef FULL_ALGEBRA
+   KPP_REAL, DIMENSION(NVAR,NVAR)  :: Jac0, Ghimj, Jac, dJdT
+#else
+   KPP_REAL, DIMENSION(LU_NONZERO) :: Jac0, Ghimj, Jac, dJdT
+#endif   
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Yerr(NVAR,NADJ)
+   INTEGER :: Pivot(NVAR), Direction, ioffset, j, istage, iadj
+   LOGICAL :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = 0.0_dp
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.0_dp*Roundoff) H = DeltaMin
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   RSTATUS(Nhexit) = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Interpolate forward solution
+   CALL ros_cadj_Y( T, Y0 )     
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T, Y0, Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+   
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y0, &
+                Jac0, dJdT )
+      DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+        dFdT(1:NVAR,iadj) = MATMUL(TRANSPOSE(dJdT),Y(1:NVAR,iadj))
+#else
+        CALL JacTR_SP_Vec(dJdT,Y(1,iadj),dFdT(1,iadj))
+#endif
+        CALL WSCAL(NVAR,(-ONE),dFdT(1,iadj),1)
+      END DO
+   END IF
+
+!~~~>  Ydot = -J^T*Y
+#ifdef FULL_ALGEBRA
+   Jac0(1:NVAR,1:NVAR) = -Jac0(1:NVAR,1:NVAR)
+#else
+   CALL WSCAL(LU_NONZERO,(-ONE),Jac0,1)
+#endif
+   DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+     Fcn0(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac0),Y(1:NVAR,iadj))
+#else
+     CALL JacTR_SP_Vec(Jac0,Y(1,iadj),Fcn0(1,iadj))
+#endif
+   END DO
+    
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1), &
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+NVAR)
+       ioffset = NVAR*(istage-1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         DO iadj = 1, NADJ
+           CALL WCOPY(NVAR,Fcn0(1,iadj),1,Fcn(1,iadj),1)
+         END DO
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR*NADJ,Y,1,Ynew,1)
+         DO j = 1, istage-1
+           DO iadj = 1, NADJ
+             CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+                K(NVAR*(j-1)+1,iadj),1,Ynew(1,iadj),1) 
+           END DO       
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         ! CALL FunTemplate(Tau,Ynew,Fcn)
+         ! ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+         CALL ros_cadj_Y( Tau, Y0 )     
+         CALL JacTemplate(Tau, Y0, Jac)
+         ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA
+         Jac(1:NVAR,1:NVAR) = -Jac(1:NVAR,1:NVAR)
+#else
+         CALL WSCAL(LU_NONZERO,(-ONE),Jac,1)
+#endif
+         DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+             Fcn(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac),Ynew(1:NVAR,iadj))
+#else
+             CALL JacTR_SP_Vec(Jac,Ynew(1,iadj),Fcn(1,iadj))
+#endif
+             !CALL WSCAL(NVAR,(-ONE),Fcn(1,iadj),1)
+         END DO
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+
+       DO iadj = 1, NADJ
+          CALL WCOPY(NVAR,Fcn(1,iadj),1,K(ioffset+1,iadj),1)
+       END DO
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1,iadj),1, &
+                  K(ioffset+1,iadj),1)
+         END DO
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HG,dFdT(1,iadj),1,K(ioffset+1,iadj),1)
+         END DO
+       END IF
+       DO iadj = 1, NADJ
+         CALL ros_Solve('T', Ghimj, Pivot, K(ioffset+1,iadj))
+       END DO
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   DO iadj = 1, NADJ
+      CALL WCOPY(NVAR,Y(1,iadj),1,Ynew(1,iadj),1)
+      DO j=1,ros_S
+         CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1,iadj),1,Ynew(1,iadj),1)
+      END DO
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL WSCAL(NVAR*NADJ,ZERO,Yerr,1)
+   DO j=1,ros_S     
+       DO iadj = 1, NADJ
+        CALL WAXPY(NVAR,ros_E(j),K(NVAR*(j-1)+1,iadj),1,Yerr(1,iadj),1)
+       END DO
+   END DO
+!~~~> Max error among all adjoint components    
+   iadj = 1
+   Err = ros_ErrorNorm ( Y(1,iadj), Ynew(1,iadj), Yerr(1,iadj), &
+              AbsTol_adj(1,iadj), RelTol_adj(1,iadj), VectorTol )
+
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+!   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      CALL WCOPY(NVAR*NADJ,Ynew,1,Y,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew      
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1) THEN
+         ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+      
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_CadjInt
+  
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_SimpleCadjInt (                  &
+        NADJ, Y,                                 &
+        Tstart, Tend, T,                         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic RosenbrockADJ method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   INTEGER, INTENT(IN) :: NADJ
+   KPP_REAL, INTENT(INOUT) :: Y(NVAR,NADJ)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Y0(NVAR)
+   KPP_REAL :: Ynew(NVAR,NADJ), Fcn0(NVAR,NADJ), Fcn(NVAR,NADJ) 
+   KPP_REAL :: K(NVAR*ros_S,NADJ), dFdT(NVAR,NADJ)
+#ifdef FULL_ALGEBRA
+   KPP_REAL,DIMENSION(NVAR,NVAR)  :: Jac0, Ghimj, Jac, dJdT
+#else   
+   KPP_REAL,DIMENSION(LU_NONZERO) :: Jac0, Ghimj, Jac, dJdT
+#endif   
+   KPP_REAL :: H, HC, HG, Tau 
+   KPP_REAL :: ghinv
+   INTEGER :: Pivot(NVAR), Direction, ioffset, i, j, istage, iadj
+   INTEGER :: istack
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0 
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>  Locally called functions
+!    KPP_REAL WLAMCH
+!    EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  INITIAL PREPARATIONS
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = -1
+   ELSE
+     Direction = +1
+   END IF               
+   
+!~~~> Time loop begins below 
+TimeLoop: DO istack = stack_ptr,2,-1
+        
+   T = chk_T(istack)
+   H = chk_H(istack-1)
+   !CALL WCOPY(NVAR,chk_Y(1,istack),1,Y0,1)
+   Y0(1:NVAR) = chk_Y(1:NVAR,istack)
+   
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T, Y0, Jac0)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+   
+!~~~>  Compute the function derivative with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y0, &
+                Jac0, dJdT )
+      DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+        dFdT(1:NVAR,iadj) = MATMUL(TRANSPOSE(dJdT),Y(1:NVAR,iadj))
+#else
+        CALL JacTR_SP_Vec(dJdT,Y(1,iadj),dFdT(1,iadj))
+#endif
+        CALL WSCAL(NVAR,(-ONE),dFdT(1,iadj),1)
+      END DO
+   END IF
+
+!~~~>  Ydot = -J^T*Y
+#ifdef FULL_ALGEBRA
+   Jac0(1:NVAR,1:NVAR) = -Jac0(1:NVAR,1:NVAR)
+#else
+   CALL WSCAL(LU_NONZERO,(-ONE),Jac0,1)
+#endif
+   DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+     Fcn0(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac0),Y(1:NVAR,iadj))
+#else
+     CALL JacTR_SP_Vec(Jac0,Y(1,iadj),Fcn0(1,iadj))
+#endif
+   END DO
+   
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+     ghinv = ONE/(Direction*H*ros_Gamma(1))
+#ifdef FULL_ALGEBRA
+     Ghimj(1:NVAR,1:NVAR) = -Jac0(1:NVAR,1:NVAR)
+     DO i=1,NVAR
+       Ghimj(i,i) = Ghimj(i,i)+ghinv
+     END DO
+#else
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+#endif
+!~~~>    Compute LU decomposition 
+     CALL ros_Decomp( Ghimj, Pivot, j )
+     IF (j /= 0) THEN
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       PRINT*,' The matrix is singular !'
+       STOP
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+NVAR)
+       ioffset = NVAR*(istage-1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         DO iadj = 1, NADJ
+           CALL WCOPY(NVAR,Fcn0(1,iadj),1,Fcn(1,iadj),1)
+         END DO
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         CALL WCOPY(NVAR*NADJ,Y,1,Ynew,1)
+         DO j = 1, istage-1
+           DO iadj = 1, NADJ
+             CALL WAXPY(NVAR,ros_A((istage-1)*(istage-2)/2+j), &
+                K(NVAR*(j-1)+1,iadj),1,Ynew(1,iadj),1) 
+           END DO       
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL ros_Hermite3( chk_T(istack-1), chk_T(istack), Tau, &
+             chk_Y(1:NVAR,istack-1), chk_Y(1:NVAR,istack),       &
+             chk_dY(1:NVAR,istack-1), chk_dY(1:NVAR,istack), Y0 )
+         CALL JacTemplate(Tau, Y0, Jac)
+         ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA
+         Jac(1:NVAR,1:NVAR) = -Jac(1:NVAR,1:NVAR)
+#else
+         CALL WSCAL(LU_NONZERO,(-ONE),Jac,1)
+#endif
+         DO iadj = 1, NADJ
+#ifdef FULL_ALGEBRA
+             Fcn(1:NVAR,iadj) = MATMUL(TRANSPOSE(Jac),Ynew(1:NVAR,iadj))
+#else
+             CALL JacTR_SP_Vec(Jac,Ynew(1,iadj),Fcn(1,iadj))
+#endif
+         END DO
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+
+       DO iadj = 1, NADJ
+          CALL WCOPY(NVAR,Fcn(1,iadj),1,K(ioffset+1,iadj),1)
+       END DO
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HC,K(NVAR*(j-1)+1,iadj),1, &
+                  K(ioffset+1,iadj),1)
+         END DO
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         DO iadj = 1, NADJ
+           CALL WAXPY(NVAR,HG,dFdT(1,iadj),1,K(ioffset+1,iadj),1)
+         END DO
+       END IF
+       DO iadj = 1, NADJ
+         CALL ros_Solve('T', Ghimj, Pivot, K(ioffset+1,iadj))
+       END DO
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   DO iadj = 1, NADJ
+      DO j=1,ros_S
+         CALL WAXPY(NVAR,ros_M(j),K(NVAR*(j-1)+1,iadj),1,Y(1,iadj),1)
+      END DO
+   END DO
+
+   END DO TimeLoop 
+      
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_SimpleCadjInt
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, & 
+               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y(NVAR), Ynew(NVAR), &
+          Yerr(NVAR), AbsTol(NVAR), RelTol(NVAR)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: Err, Scale, Ymax   
+   INTEGER  :: i
+   
+   Err = ZERO
+   DO i=1,NVAR
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/NVAR)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+   
+  END FUNCTION ros_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR), Fcn0(NVAR) 
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dFdT(NVAR)   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL FunTemplate(T+Delta,Y,dFdT)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+   CALL WAXPY(NVAR,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(NVAR,(ONE/Delta),dFdT,1)
+
+  END SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_JacTimeDerivative ( T, Roundoff, Y, &
+                Jac0, dJdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the Jacobian by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(NVAR)
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN)  :: Jac0(NVAR,NVAR) 
+   KPP_REAL, INTENT(OUT) :: dJdT(NVAR,NVAR)   
+#else
+   KPP_REAL, INTENT(IN)  :: Jac0(LU_NONZERO) 
+   KPP_REAL, INTENT(OUT) :: dJdT(LU_NONZERO)   
+#endif   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL JacTemplate(T+Delta,Y,dJdT)
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+#ifdef FULL_ALGEBRA    
+   CALL WAXPY(NVAR*NVAR,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(NVAR*NVAR,(ONE/Delta),dJdT,1)
+#else
+   CALL WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1)
+#endif   
+
+  END SUBROUTINE ros_JacTimeDerivative
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*gam) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE
+
+!~~~> Input arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) ::  Jac0(NVAR,NVAR)
+#else
+   KPP_REAL, INTENT(IN) ::  Jac0(LU_NONZERO)
+#endif   
+   KPP_REAL, INTENT(IN) ::  gam
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(OUT) :: Ghimj(NVAR,NVAR)
+#else
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+#endif   
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(NVAR)
+!~~~> Inout arguments
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables
+   INTEGER  :: i, ISING, Nconsecutive
+   KPP_REAL :: ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0_dp, HALF = 0.5_dp
+
+   Nconsecutive = 0
+   Singular = .TRUE.
+
+   DO WHILE (Singular)
+
+!~~~>    Construct Ghimj = 1/(H*gam) - Jac0
+#ifdef FULL_ALGEBRA    
+     CALL WCOPY(NVAR*NVAR,Jac0,1,Ghimj,1)
+     CALL WSCAL(NVAR*NVAR,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,NVAR
+       Ghimj(i,i) = Ghimj(i,i)+ghinv
+     END DO
+#else
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,NVAR
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+#endif   
+!~~~>    Compute LU decomposition
+     CALL ros_Decomp( Ghimj, Pivot, ISING )
+     IF (ISING == 0) THEN
+!~~~>    If successful done
+        Singular = .FALSE.
+     ELSE ! ISING .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        ISTATUS(Nsng) = ISTATUS(Nsng) + 1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE.
+        PRINT*,'Warning: LU Decomposition returned ISING = ',ISING
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decompositions
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ISING
+
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Decomp( A, Pivot, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the LU decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Inout variables
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(INOUT) :: A(NVAR,NVAR)
+#else   
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+#endif
+!~~~> Output variables
+   INTEGER, INTENT(OUT) :: Pivot(NVAR), ISING
+
+#ifdef FULL_ALGEBRA    
+   CALL  DGETRF( NVAR, NVAR, A, NVAR, Pivot, ISING )
+#else   
+   CALL KppDecomp ( A, ISING )
+   Pivot(1) = 1
+#endif
+   ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+  END SUBROUTINE ros_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_Solve( How, A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+!~~~> Input variables
+   CHARACTER, INTENT(IN) :: How
+#ifdef FULL_ALGEBRA    
+   KPP_REAL, INTENT(IN) :: A(NVAR,NVAR)
+   INTEGER :: ISING
+#else   
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+#endif
+   INTEGER, INTENT(IN) :: Pivot(NVAR)
+!~~~> InOut variables
+   KPP_REAL, INTENT(INOUT) :: b(NVAR)
+
+   SELECT CASE (How)
+   CASE ('N')
+#ifdef FULL_ALGEBRA    
+     CALL DGETRS( 'N', NVAR , 1, A, NVAR, Pivot, b, NVAR, ISING )
+#else   
+     CALL KppSolve( A, b )
+#endif
+   CASE ('T')
+#ifdef FULL_ALGEBRA    
+     CALL DGETRS( 'T', NVAR , 1, A, NVAR, Pivot, b, NVAR, ISING )
+#else   
+     CALL KppSolveTR( A, b, b )
+#endif
+   CASE DEFAULT
+     PRINT*,'Error: unknown argument in ros_Solve: How=',How
+     STOP
+   END SELECT
+   ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+  END SUBROUTINE ros_Solve
+
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_cadj_Y( T, Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Finds the solution Y at T by interpolating the stored forward trajectory
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+   KPP_REAL, INTENT(IN) :: T
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Y(NVAR)
+!~~~> Local variables     
+   INTEGER     :: i
+   KPP_REAL, PARAMETER  :: ONE = 1.0d0
+
+!   chk_H, chk_T, chk_Y, chk_dY, chk_d2Y
+
+   IF( (T < chk_T(1)).OR.(T> chk_T(stack_ptr)) ) THEN
+      PRINT*,'Cannot locate solution at T = ',T
+      PRINT*,'Stored trajectory is between Tstart = ',chk_T(1)
+      PRINT*,'    and Tend = ',chk_T(stack_ptr)
+      STOP
+   END IF
+   DO i = 1, stack_ptr-1
+     IF( (T>= chk_T(i)).AND.(T<= chk_T(i+1)) ) EXIT
+   END DO 
+
+
+!   IF (.FALSE.) THEN
+!
+!   CALL ros_Hermite5( chk_T(i), chk_T(i+1), T, &
+!                chk_Y(1,i),   chk_Y(1,i+1),     &
+!                chk_dY(1,i),  chk_dY(1,i+1),    &
+!                chk_d2Y(1,i), chk_d2Y(1,i+1), Y )
+!   
+!   ELSE
+                
+   CALL ros_Hermite3( chk_T(i), chk_T(i+1), T, &
+                chk_Y(1:NVAR,i),   chk_Y(1:NVAR,i+1),     &
+                chk_dY(1:NVAR,i),  chk_dY(1:NVAR,i+1),    &
+                Y )
+                        
+!   
+!   END IF       
+
+  END SUBROUTINE ros_cadj_Y
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Hermite3( a, b, T, Ya, Yb, Ja, Jb, Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for Hermite interpolation of order 5 on the interval [a,b]
+! P = c(1) + c(2)*(x-a) + ... + c(4)*(x-a)^3
+! P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb]
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+   KPP_REAL, INTENT(IN) :: a, b, T, Ya(NVAR), Yb(NVAR)
+   KPP_REAL, INTENT(IN) :: Ja(NVAR), Jb(NVAR)
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Y(NVAR)
+!~~~> Local variables     
+   KPP_REAL :: Tau, amb(3), C(NVAR,4)
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0
+   INTEGER :: i, j
+   
+   amb(1) = 1.0d0/(a-b)
+   DO i=2,3
+     amb(i) = amb(i-1)*amb(1)
+   END DO
+   
+   
+! c(1) = ya;
+   CALL WCOPY(NVAR,Ya,1,C(1,1),1)
+! c(2) = ja;
+   CALL WCOPY(NVAR,Ja,1,C(1,2),1)
+! c(3) = 2/(a-b)*ja + 1/(a-b)*jb - 3/(a - b)^2*ya + 3/(a - b)^2*yb  ;
+   CALL WCOPY(NVAR,Ya,1,C(1,3),1)
+   CALL WSCAL(NVAR,-3.0*amb(2),C(1,3),1)
+   CALL WAXPY(NVAR,3.0*amb(2),Yb,1,C(1,3),1)
+   CALL WAXPY(NVAR,2.0*amb(1),Ja,1,C(1,3),1)
+   CALL WAXPY(NVAR,amb(1),Jb,1,C(1,3),1)
+! c(4) =  1/(a-b)^2*ja + 1/(a-b)^2*jb - 2/(a-b)^3*ya + 2/(a-b)^3*yb ;
+   CALL WCOPY(NVAR,Ya,1,C(1,4),1)
+   CALL WSCAL(NVAR,-2.0*amb(3),C(1,4),1)
+   CALL WAXPY(NVAR,2.0*amb(3),Yb,1,C(1,4),1)
+   CALL WAXPY(NVAR,amb(2),Ja,1,C(1,4),1)
+   CALL WAXPY(NVAR,amb(2),Jb,1,C(1,4),1)
+   
+   Tau = T - a
+   CALL WCOPY(NVAR,C(1,4),1,Y,1)
+   CALL WSCAL(NVAR,Tau**3,Y,1)
+   DO j = 3,1,-1
+     CALL WAXPY(NVAR,TAU**(j-1),C(1,j),1,Y,1)
+   END DO       
+
+  END SUBROUTINE ros_Hermite3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Hermite5( a, b, T, Ya, Yb, Ja, Jb, Ha, Hb, Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for Hermite interpolation of order 5 on the interval [a,b]
+! P = c(1) + c(2)*(x-a) + ... + c(6)*(x-a)^5
+! P[a,b] = [Ya,Yb], P'[a,b] = [Ja,Jb], P"[a,b] = [Ha,Hb]
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+   KPP_REAL, INTENT(IN) :: a, b, T, Ya(NVAR), Yb(NVAR)
+   KPP_REAL, INTENT(IN) :: Ja(NVAR), Jb(NVAR), Ha(NVAR), Hb(NVAR)
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Y(NVAR)
+!~~~> Local variables     
+   KPP_REAL :: Tau, amb(5), C(NVAR,6)
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, HALF = 0.5d0
+   INTEGER :: i, j
+   
+   amb(1) = 1.0d0/(a-b)
+   DO i=2,5
+     amb(i) = amb(i-1)*amb(1)
+   END DO
+     
+! c(1) = ya;
+   CALL WCOPY(NVAR,Ya,1,C(1,1),1)
+! c(2) = ja;
+   CALL WCOPY(NVAR,Ja,1,C(1,2),1)
+! c(3) = ha/2;
+   CALL WCOPY(NVAR,Ha,1,C(1,3),1)
+   CALL WSCAL(NVAR,HALF,C(1,3),1)
+   
+! c(4) = 10*amb(3)*ya - 10*amb(3)*yb - 6*amb(2)*ja - 4*amb(2)*jb  + 1.5*amb(1)*ha - 0.5*amb(1)*hb ;
+   CALL WCOPY(NVAR,Ya,1,C(1,4),1)
+   CALL WSCAL(NVAR,10.0*amb(3),C(1,4),1)
+   CALL WAXPY(NVAR,-10.0*amb(3),Yb,1,C(1,4),1)
+   CALL WAXPY(NVAR,-6.0*amb(2),Ja,1,C(1,4),1)
+   CALL WAXPY(NVAR,-4.0*amb(2),Jb,1,C(1,4),1)
+   CALL WAXPY(NVAR, 1.5*amb(1),Ha,1,C(1,4),1)
+   CALL WAXPY(NVAR,-0.5*amb(1),Hb,1,C(1,4),1)
+
+! c(5) =   15*amb(4)*ya - 15*amb(4)*yb - 8.*amb(3)*ja - 7*amb(3)*jb + 1.5*amb(2)*ha - 1*amb(2)*hb ;
+   CALL WCOPY(NVAR,Ya,1,C(1,5),1)
+   CALL WSCAL(NVAR, 15.0*amb(4),C(1,5),1)
+   CALL WAXPY(NVAR,-15.0*amb(4),Yb,1,C(1,5),1)
+   CALL WAXPY(NVAR,-8.0*amb(3),Ja,1,C(1,5),1)
+   CALL WAXPY(NVAR,-7.0*amb(3),Jb,1,C(1,5),1)
+   CALL WAXPY(NVAR,1.5*amb(2),Ha,1,C(1,5),1)
+   CALL WAXPY(NVAR,-amb(2),Hb,1,C(1,5),1)
+   
+! c(6) =   6*amb(5)*ya - 6*amb(5)*yb - 3.*amb(4)*ja - 3.*amb(4)*jb + 0.5*amb(3)*ha -0.5*amb(3)*hb ;
+   CALL WCOPY(NVAR,Ya,1,C(1,6),1)
+   CALL WSCAL(NVAR, 6.0*amb(5),C(1,6),1)
+   CALL WAXPY(NVAR,-6.0*amb(5),Yb,1,C(1,6),1)
+   CALL WAXPY(NVAR,-3.0*amb(4),Ja,1,C(1,6),1)
+   CALL WAXPY(NVAR,-3.0*amb(4),Jb,1,C(1,6),1)
+   CALL WAXPY(NVAR, 0.5*amb(3),Ha,1,C(1,6),1)
+   CALL WAXPY(NVAR,-0.5*amb(3),Hb,1,C(1,6),1)
+   
+   Tau = T - a
+   CALL WCOPY(NVAR,C(1,6),1,Y,1)
+   DO j = 5,1,-1
+     CALL WSCAL(NVAR,Tau,Y,1)
+     CALL WAXPY(NVAR,ONE,C(1,j),1,Y,1)
+   END DO       
+
+  END SUBROUTINE ros_Hermite5
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+    IMPLICIT NONE
+    DOUBLE PRECISION g
+   
+    g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+   
+    rosMethod = RS2
+!~~~> Name of the method
+    ros_Name = 'ROS-2'   
+!~~~> Number of stages
+    ros_S = 2
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+   
+    ros_A(1) = (1.d0)/g
+    ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.d0)/(2.d0*g)
+    ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator    
+    ros_E(1) = 1.d0/(2.d0*g)
+    ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0d0
+    ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+   
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   IMPLICIT NONE
+    
+    rosMethod = RS3
+!~~~> Name of the method
+   ros_Name = 'ROS-3'   
+!~~~> Number of stages
+   ros_S = 3
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1)= 1.d0
+   ros_A(2)= 1.d0
+   ros_A(3)= 0.d0
+
+   ros_C(1) = -0.10156171083877702091975600115545d+01
+   ros_C(2) =  0.40759956452537699824805835358067d+01
+   ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1d+01
+   ros_M(2) =  0.61697947043828245592553615689730d+01
+   ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator    
+   ros_E(1) =  0.5d+00
+   ros_E(2) = -0.29079558716805469821718236208017d+01
+   ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0d+00
+   ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+   ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+   ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+   ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RS4
+!~~~> Name of the method
+   ros_Name = 'ROS-4'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1) = 0.2000000000000000d+01
+   ros_A(2) = 0.1867943637803922d+01
+   ros_A(3) = 0.2344449711399156d+00
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0D0
+
+   ros_C(1) =-0.7137615036412310d+01
+   ros_C(2) = 0.2580708087951457d+01
+   ros_C(3) = 0.6515950076447975d+00
+   ros_C(4) =-0.2137148994382534d+01
+   ros_C(5) =-0.3214669691237626d+00
+   ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735d+01
+   ros_M(2) = 0.2870493262186792d+00
+   ros_M(3) = 0.4353179431840180d+00
+   ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) =-0.2815431932141155d+00
+   ros_E(2) =-0.7276199124938920d-01
+   ros_E(3) =-0.1082196201495311d+00
+   ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.D0
+   ros_Alpha(2) = 0.1145640000000000d+01
+   ros_Alpha(3) = 0.6552168638155900d+00
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5728200000000000d+00
+   ros_Gamma(2) =-0.1769193891319233d+01
+   ros_Gamma(3) = 0.7592633437920482d+00
+   ros_Gamma(4) =-0.1049021087100450d+00
+
+  END SUBROUTINE Ros4
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RD3
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+   ros_A(1) = 0.0d+00
+   ros_A(2) = 2.0d+00
+   ros_A(3) = 0.0d+00
+   ros_A(4) = 2.0d+00
+   ros_A(5) = 0.0d+00
+   ros_A(6) = 1.0d+00
+
+   ros_C(1) = 4.0d+00
+   ros_C(2) = 1.0d+00
+   ros_C(3) =-1.0d+00
+   ros_C(4) = 1.0d+00
+   ros_C(5) =-1.0d+00 
+   ros_C(6) =-(8.0d+00/3.0d+00) 
+         
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0d+00
+   ros_M(2) = 0.0d+00
+   ros_M(3) = 1.0d+00
+   ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) = 0.0d+00
+   ros_E(2) = 0.0d+00
+   ros_E(3) = 0.0d+00
+   ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0d+00    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0d+00
+   ros_Alpha(2) = 0.0d+00
+   ros_Alpha(3) = 1.0d+00
+   ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5d+00
+   ros_Gamma(2) = 1.5d+00
+   ros_Gamma(3) = 0.0d+00
+   ros_Gamma(4) = 0.0d+00
+
+  END SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+
+    rosMethod = RD4
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'   
+!~~~> Number of stages
+    ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000d0
+    ros_Alpha(2) = 0.386d0
+    ros_Alpha(3) = 0.210d0 
+    ros_Alpha(4) = 0.630d0
+    ros_Alpha(5) = 1.000d0
+    ros_Alpha(6) = 1.000d0
+        
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = 0.2500000000000000d+00
+    ros_Gamma(2) =-0.1043000000000000d+00
+    ros_Gamma(3) = 0.1035000000000000d+00
+    ros_Gamma(4) =-0.3620000000000023d-01
+    ros_Gamma(5) = 0.0d0
+    ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+    ros_A(1) = 0.1544000000000000d+01
+    ros_A(2) = 0.9466785280815826d+00
+    ros_A(3) = 0.2557011698983284d+00
+    ros_A(4) = 0.3314825187068521d+01
+    ros_A(5) = 0.2896124015972201d+01
+    ros_A(6) = 0.9986419139977817d+00
+    ros_A(7) = 0.1221224509226641d+01
+    ros_A(8) = 0.6019134481288629d+01
+    ros_A(9) = 0.1253708332932087d+02
+    ros_A(10) =-0.6878860361058950d+00
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0d+00
+
+    ros_C(1) =-0.5668800000000000d+01
+    ros_C(2) =-0.2430093356833875d+01
+    ros_C(3) =-0.2063599157091915d+00
+    ros_C(4) =-0.1073529058151375d+00
+    ros_C(5) =-0.9594562251023355d+01
+    ros_C(6) =-0.2047028614809616d+02
+    ros_C(7) = 0.7496443313967647d+01
+    ros_C(8) =-0.1024680431464352d+02
+    ros_C(9) =-0.3399990352819905d+02
+    ros_C(10) = 0.1170890893206160d+02
+    ros_C(11) = 0.8083246795921522d+01
+    ros_C(12) =-0.7981132988064893d+01
+    ros_C(13) =-0.3152159432874371d+02
+    ros_C(14) = 0.1631930543123136d+02
+    ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0d+00
+    ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator    
+    ros_E(1) = 0.0d+00
+    ros_E(2) = 0.0d+00
+    ros_E(3) = 0.0d+00
+    ros_E(4) = 0.0d+00
+    ros_E(5) = 0.0d+00
+    ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0d0
+     
+  END SUBROUTINE Rodas4
+
+
+END SUBROUTINE RosenbrockADJ ! and its internal procedures
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ 
+!~~~> Input variables     
+   KPP_REAL, INTENT(IN)  :: T, Y(NVAR)
+!~~~> Output variables     
+   KPP_REAL, INTENT(OUT) :: Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL :: Told     
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+   
+END SUBROUTINE FunTemplate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~> Input variables
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), Jcb(NVAR,NVAR)
+#else
+    KPP_REAL :: Jcb(LU_NONZERO)
+#endif   
+!~~~> Local variables
+    KPP_REAL :: Told
+#ifdef FULL_ALGEBRA    
+    INTEGER :: i, j
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(Y, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         Jcb(i,j) = 0.0_dp
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       Jcb(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+#endif   
+    TIME = Told
+
+END SUBROUTINE JacTemplate
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE HessTemplate( T, Y, Hes )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!  Template for the ODE Hessian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+!~~~> Input variables     
+    KPP_REAL, INTENT(IN)  :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL, INTENT(OUT) :: Hes(NHESS)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Hessian( Y, FIX, RCONST, Hes )
+    TIME = Told
+
+END SUBROUTINE HessTemplate                                      
+
+END MODULE KPP_ROOT_Integrator
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_tlm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_tlm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_tlm.def	(revision 3477)
@@ -0,0 +1,23 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE rosenbrock_tlm
+
+#INLINE F77_GLOBAL
+      INTEGER Autonomous
+      COMMON /INTGDATA/ Autonomous
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        Autonomous = 1 
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/rosenbrock_tlm.f90	(revision 3477)
@@ -0,0 +1,1363 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Rosenbrock_TLM - Implementation of the Tangent Linear Model            !
+!               for several Rosenbrock methods:                           !
+!               * Ros2                                                    !
+!               * Ros3                                                    !
+!               * Ros4                                                    !
+!               * Rodas3                                                  !
+!               * Rodas4                                                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2004                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+   USE KPP_ROOT_Precision
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   USE KPP_ROOT_LinearAlgebra
+   USE KPP_ROOT_Rates
+   USE KPP_ROOT_Function
+   USE KPP_ROOT_Jacobian
+   USE KPP_ROOT_Hessian
+   USE KPP_ROOT_Util
+
+   IMPLICIT NONE
+   PUBLIC
+   SAVE
+
+!~~~>  Statistics on the work performed by the Rosenbrock method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+                        Nrej=5, Ndec=6, Nsol=7, Nsng=8, &
+                        Nhes=9, Ntexit=1, Nhexit=2, Nhnew = 3
+
+
+CONTAINS ! Functions in the module KPP_ROOT_Integrator
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_TLM( NTLM, Y, Y_tlm, TIN, TOUT, ATOL_tlm, RTOL_tlm,&
+       ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE        
+    
+!~~~> Y - Concentrations
+   KPP_REAL :: Y(NVAR)
+!~~~> NTLM - No. of sensitivity coefficients
+   INTEGER NTLM
+!~~~> Y_tlm - Sensitivities of concentrations
+!     Note: Y_tlm (1:NVAR,j) contains sensitivities of
+!               Y(1:NVAR) w.r.t. the j-th parameter, j=1...NTLM
+   KPP_REAL :: Y_tlm(NVAR,NTLM)
+   KPP_REAL, INTENT(IN)         :: TIN  ! TIN  - Start Time
+   KPP_REAL, INTENT(IN)         :: TOUT ! TOUT - End Time
+!~~~> Optional input parameters and statistics
+   INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RTOL_tlm(NVAR,NTLM),ATOL_tlm(NVAR,NTLM)
+
+   INTEGER, SAVE :: IERR
+   KPP_REAL ::  RCNTRL(20), RSTATUS(20)
+   INTEGER ::   ICNTRL(20), ISTATUS(20)
+   INTEGER, SAVE :: Ntotal = 0
+
+   ICNTRL(1:20)  = 0
+   RCNTRL(1:20)  = 0.0_dp
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = 0.0_dp
+   
+   ICNTRL(1) = 0       ! non-autonomous
+   ICNTRL(2) = 1       ! vector tolerances
+   ICNTRL(3) = 5       ! choice of the method
+   ICNTRL(12) = 1      ! 0 - fwd trunc error only, 1 - tlm trunc error
+   RCNTRL(3) = STEPMIN ! starting step
+
+   ! if optional parameters are given, and if they are >=0, then they overwrite default settings
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) >= 0) ICNTRL(:) = ICNTRL_U(:)
+   ENDIF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) >= 0) RCNTRL(:) = RCNTRL_U(:)
+   ENDIF
+
+   CALL RosenbrockTLM(NVAR, VAR, NTLM, Y_tlm,      &
+         TIN,TOUT,ATOL,RTOL,ATOL_tlm,RTOL_tlm,     &
+         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+
+!~~~> Debug option: show number of steps
+!   Ntotal = Ntotal + ISTATUS(Nstp)
+!   PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+    
+   IF (IERR < 0) THEN
+     print *,'Rosenbrock: Unsucessful step at T=', &
+         TIN,' (IERR=',IERR,')'
+   END IF
+   
+   STEPMIN = RSTATUS(Nhexit)
+   ! if optional parameters are given for output they return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+
+END SUBROUTINE INTEGRATE_TLM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE RosenbrockTLM(N,Y,NTLM,Y_tlm,                      &
+           Tstart,Tend,AbsTol,RelTol,AbsTol_tlm,RelTol_tlm,   &
+           RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   
+!    TLM = Tangent Linear Model of a Rosenbrock Method
+!
+!    Solves the system y'=F(t,y) using a Rosenbrock method defined by:
+!
+!     G = 1/(H*gamma(1)) - Jac(t0,Y0)
+!     T_i = t0 + Alpha(i)*H
+!     Y_i = Y0 + \sum_{j=1}^{i-1} A(i,j)*K_j
+!     G * K_i = Fun( T_i, Y_i ) + \sum_{j=1}^S C(i,j)/H * K_j +
+!         gamma(i)*dF/dT(t0, Y0)
+!     Y1 = Y0 + \sum_{j=1}^S M(j)*K_j 
+!
+!    For details on Rosenbrock methods and their implementation consult:
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.  
+!    The codes contained in the book inspired this implementation.       
+!
+!    (C)  Adrian Sandu, August 2004
+!    Virginia Polytechnic Institute and State University    
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    
+!~~~>   INPUT ARGUMENTS: 
+!    
+!-     Y(N)    -> vector of initial conditions (at T=Tstart)
+!      NTLM       -> dimension of linearized system, 
+!                   i.e. the number of sensitivity coefficients
+!-     Y_tlm(N*NTLM) -> vector of initial sensitivity conditions (at T=Tstart)
+!-    [Tstart,Tend]    -> time range of integration
+!     (if Tstart>Tend the integration is performed backwards in time)  
+!-    RelTol, AbsTol -> user precribed accuracy
+!- SUBROUTINE Fun( T, Y, Ydot ) -> ODE function, 
+!                       returns Ydot = Y' = F(T,Y) 
+!- SUBROUTINE Jac( T, Y, Jcb ) -> Jacobian of the ODE function,
+!                       returns Jcb = dF/dY 
+!-    ICNTRL(1:20)    -> integer inputs parameters
+!-    RCNTRL(1:20)    -> real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:  
+!     
+!-    Y(N)         -> vector of final states (at T->Tend)
+!-    Y_tlm(N*NTLM)-> vector of final sensitivities (at T=Tend)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(:20)    -> real output parameters
+!-    IERR            -> job status upon return
+!       - succes (positive value) or failure (negative value) -
+!           =  1 : Success
+!           = -1 : Improper value for maximal no of steps
+!           = -2 : Selected Rosenbrock method not implemented
+!           = -3 : Hmin/Hmax/Hstart must be positive
+!           = -4 : FacMin/FacMax/FacRej must be positive
+!           = -5 : Improper tolerance values
+!           = -6 : No of steps exceeds maximum bound
+!           = -7 : Step size too small
+!           = -8 : Matrix is repeatedly singular
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    ICNTRL(1)   = 1: F = F(y)   Independent of T (AUTONOMOUS)
+!              = 0: F = F(t,y) Depends on T (NON-AUTONOMOUS)
+!
+!    ICNTRL(2)   = 0: AbsTol, RelTol are N-dimensional vectors
+!              = 1:  AbsTol, RelTol are scalars
+!
+!    ICNTRL(3)  -> selection of a particular Rosenbrock method
+!        = 0 :  default method is Rodas3
+!        = 1 :  method is  Ros2
+!        = 2 :  method is  Ros3 
+!        = 3 :  method is  Ros4 
+!        = 4 :  method is  Rodas3
+!        = 5 :  method is  Rodas4
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0) the default value of 100000 is used
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!          It is strongly recommended to keep Hmin = ZERO 
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!          
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMin,upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                       (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller 
+!         than the predicted value  (default=0.9)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+! 
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the corrent no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of Jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!    ISTATUS(9) = No. of Hessian calls
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the 
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    For multiple restarts, use Hexit as Hstart in the following run 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~>  Arguments   
+   INTEGER,       INTENT(IN)    :: N, NTLM
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+   KPP_REAL, INTENT(INOUT) :: Y_tlm(N,NTLM)
+   KPP_REAL, INTENT(IN)    :: Tstart, Tend
+   KPP_REAL, INTENT(IN)    :: AbsTol(N),RelTol(N)
+   KPP_REAL, INTENT(IN)    :: AbsTol_tlm(N,NTLM),RelTol_tlm(N,NTLM)
+   INTEGER,       INTENT(IN)    :: ICNTRL(20)
+   KPP_REAL, INTENT(IN)    :: RCNTRL(20)
+   INTEGER,       INTENT(INOUT) :: ISTATUS(20)
+   KPP_REAL, INTENT(INOUT) :: RSTATUS(20)
+   INTEGER, INTENT(OUT)   :: IERR
+!~~~>  Parameters of the Rosenbrock method, up to 6 stages
+   INTEGER ::  ros_S, rosMethod
+   INTEGER, PARAMETER :: RS2=1, RS3=2, RS4=3, RD3=4, RD4=5
+   KPP_REAL :: ros_A(15), ros_C(15), ros_M(6), ros_E(6), &
+                    ros_Alpha(6), ros_Gamma(6), ros_ELO
+   LOGICAL :: ros_NewF(6)
+   CHARACTER(LEN=12) :: ros_Name
+!~~~>  Local variables     
+   KPP_REAL :: Roundoff, FacMin, FacMax, FacRej, FacSafe
+   KPP_REAL :: Hmin, Hmax, Hstart, Hexit
+   KPP_REAL :: Texit
+   INTEGER :: i, UplimTol, Max_no_steps 
+   LOGICAL :: Autonomous, VectorTol, TLMtruncErr
+!~~~>   Parameters
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE  = 1.0d0
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+
+!~~~> Initialize the statistics
+   IERR          = 0
+   ISTATUS(1:20) = 0
+   RSTATUS(1:20) = ZERO
+   
+!~~~>  Autonomous or time dependent ODE. Default is time dependent.
+   Autonomous = .NOT.(ICNTRL(1) == 0)
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:N) and RelTol(1:N)
+   IF (ICNTRL(2) == 0) THEN
+      VectorTol = .TRUE.
+      UplimTol  = N
+   ELSE 
+      VectorTol = .FALSE.
+      UplimTol  = 1
+   END IF
+
+!~~~>   Initialize the particular Rosenbrock method selected
+   SELECT CASE (ICNTRL(3))
+     CASE (1)
+       CALL Ros2
+     CASE (2)
+       CALL Ros3
+     CASE (3)
+       CALL Ros4
+     CASE (0,4)
+       CALL Rodas3
+     CASE (5)
+       CALL Rodas4
+     CASE DEFAULT
+       PRINT * , 'Unknown Rosenbrock method: ICNTRL(3)=',ICNTRL(3) 
+       CALL ros_ErrorMsg(-2,Tstart,ZERO,IERR)
+       RETURN
+   END SELECT
+   
+!~~~>   The maximum number of steps admitted
+   IF (ICNTRL(4) == 0) THEN
+      Max_no_steps = 200000
+   ELSEIF (Max_no_steps > 0) THEN
+      Max_no_steps=ICNTRL(4)
+   ELSE 
+      PRINT * ,'User-selected max no. of steps: ICNTRL(4)=',ICNTRL(4)
+      CALL ros_ErrorMsg(-1,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+   
+!~~~>  Unit roundoff (1+Roundoff>1)  
+   Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+   IF (RCNTRL(1) == ZERO) THEN
+      Hmin = ZERO
+   ELSEIF (RCNTRL(1) > ZERO) THEN 
+      Hmin = RCNTRL(1)
+   ELSE  
+      PRINT * , 'User-selected Hmin: RCNTRL(1)=', RCNTRL(1)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Upper bound on the step size: (positive value)
+   IF (RCNTRL(2) == ZERO) THEN
+      Hmax = ABS(Tend-Tstart)
+   ELSEIF (RCNTRL(2) > ZERO) THEN
+      Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hmax: RCNTRL(2)=', RCNTRL(2)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Starting step size: (positive value)
+   IF (RCNTRL(3) == ZERO) THEN
+      Hstart = MAX(Hmin,DeltaMin)
+   ELSEIF (RCNTRL(3) > ZERO) THEN
+      Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+   ELSE  
+      PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+      CALL ros_ErrorMsg(-3,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax 
+   IF (RCNTRL(4) == ZERO) THEN
+      FacMin = 0.2d0
+   ELSEIF (RCNTRL(4) > ZERO) THEN
+      FacMin = RCNTRL(4)
+   ELSE  
+      PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+   IF (RCNTRL(5) == ZERO) THEN
+      FacMax = 6.0d0
+   ELSEIF (RCNTRL(5) > ZERO) THEN
+      FacMax = RCNTRL(5)
+   ELSE  
+      PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+   IF (RCNTRL(6) == ZERO) THEN
+      FacRej = 0.1d0
+   ELSEIF (RCNTRL(6) > ZERO) THEN
+      FacRej = RCNTRL(6)
+   ELSE  
+      PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+   IF (RCNTRL(7) == ZERO) THEN
+      FacSafe = 0.9d0
+   ELSEIF (RCNTRL(7) > ZERO) THEN
+      FacSafe = RCNTRL(7)
+   ELSE  
+      PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+      CALL ros_ErrorMsg(-4,Tstart,ZERO,IERR)
+      RETURN      
+   END IF
+!~~~>  Check if tolerances are reasonable
+    DO i=1,UplimTol
+      IF ( (AbsTol(i) <= ZERO) .OR. (RelTol(i) <= 10.d0*Roundoff) &
+         .OR. (RelTol(i) >= 1.0d0) ) THEN
+        PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+        PRINT * , ' RelTol(',i,') = ',RelTol(i)
+        CALL ros_ErrorMsg(-5,Tstart,ZERO,IERR)
+        RETURN
+      END IF
+    END DO
+     
+
+!~~~>  CALL Rosenbrock method   
+   CALL ros_TLM_Int(Y, NTLM, Y_tlm,              &
+        Tstart, Tend, Texit,                     & 
+!  Error indicator
+        IERR)
+
+
+CONTAINS ! Procedures internal to RosenbrockTLM
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+ SUBROUTINE ros_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+   
+   IERR = Code
+   PRINT * , &
+     'Forced exit from Rosenbrock due to the following error:' 
+     
+   SELECT CASE (Code)
+    CASE (-1)    
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)    
+      PRINT * , '--> Selected Rosenbrock method not implemented'
+    CASE (-3)    
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)    
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5) 
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6) 
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7) 
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)    
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+   
+   PRINT *, "T=", T, "and H=", H
+     
+ END SUBROUTINE ros_ErrorMsg
+   
+     
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE ros_TLM_Int (Y, NTLM, Y_tlm,         &
+        Tstart, Tend, T,                         &
+!~~~> Error indicator
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!   Template for the implementation of a generic Rosenbrock method 
+!      defined by ros_S (no of stages)  
+!      and its coefficients ros_{A,C,M,E,Alpha,Gamma}
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  IMPLICIT NONE
+   
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+   KPP_REAL, INTENT(INOUT) :: Y(N)
+!~~~> Input: Number of sensitivity coefficients
+   INTEGER, INTENT(IN) :: NTLM 
+!~~~> Input: the initial sensitivites at Tstart; Output: the sensitivities at T   
+   KPP_REAL, INTENT(INOUT) :: Y_tlm(N,NTLM)
+!~~~> Input: integration interval   
+   KPP_REAL, INTENT(IN) :: Tstart,Tend      
+!~~~> Output: time at which the solution is returned (T=Tend if success)   
+   KPP_REAL, INTENT(OUT) ::  T      
+!~~~> Output: Error indicator
+   INTEGER, INTENT(OUT) :: IERR
+! ~~~~ Local variables        
+   KPP_REAL :: Ynew(N), Fcn0(N), Fcn(N) 
+   KPP_REAL :: K(N*ros_S)
+   KPP_REAL :: Ynew_tlm(N,NTLM), Fcn0_tlm(N,NTLM), Fcn_tlm(N,NTLM) 
+   KPP_REAL :: K_tlm(N*ros_S,NTLM)
+   KPP_REAL :: Hes0(NHESS), Tmp(N)
+   KPP_REAL :: dFdT(N), dJdT(LU_NONZERO)
+   KPP_REAL :: Jac0(LU_NONZERO), Jac(LU_NONZERO), Ghimj(LU_NONZERO)
+   KPP_REAL :: H, Hnew, HC, HG, Fac, Tau 
+   KPP_REAL :: Err, Err0, Err1, Yerr(N), Yerr_tlm(N,NTLM)
+   INTEGER  :: Pivot(N), Direction, ioffset, j, istage, itlm
+   LOGICAL  :: RejectLastH, RejectMoreH, Singular
+!~~~>  Local parameters
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+!~~~>  Locally called functions
+!   KPP_REAL WLAMCH
+!   EXTERNAL WLAMCH
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   
+!~~~>  Initial preparations
+   T = Tstart
+   RSTATUS(Nhexit) = ZERO
+   H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , ABS(Hmax) )
+   IF (ABS(H) <= 10.D0*Roundoff) H = DeltaMin
+   
+   IF (Tend  >=  Tstart) THEN
+     Direction = +1
+   ELSE
+     Direction = -1
+   END IF               
+   H = Direction*H
+
+   RejectLastH=.FALSE.
+   RejectMoreH=.FALSE.
+   
+!~~~> Time loop begins below 
+
+TimeLoop: DO WHILE ( (Direction > 0).AND.((T-Tend)+Roundoff <= ZERO) &
+       .OR. (Direction < 0).AND.((Tend-T)+Roundoff <= ZERO) ) 
+      
+   IF ( ISTATUS(Nstp) > Max_no_steps ) THEN  ! Too many steps
+      CALL ros_ErrorMsg(-6,T,H,IERR)
+      RETURN
+   END IF
+   IF ( ((T+0.1d0*H) == T).OR.(H <= Roundoff) ) THEN  ! Step size too small
+      CALL ros_ErrorMsg(-7,T,H,IERR)
+      RETURN
+   END IF
+   
+!~~~>  Limit H if necessary to avoid going beyond Tend   
+   Hexit = H
+   H = MIN(H,ABS(Tend-T))
+
+!~~~>   Compute the function at current time
+   CALL FunTemplate(T,Y,Fcn0)
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+
+!~~~>   Compute the Jacobian at current time
+   CALL JacTemplate(T,Y,Jac0)    
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+  
+!~~~>   Compute the Hessian at current time
+   CALL HessTemplate(T,Y,Hes0)
+   ISTATUS(Nhes) = ISTATUS(Nhes) + 1
+   
+!~~~>   Compute the TLM function at current time
+   DO itlm = 1, NTLM
+      CALL Jac_SP_Vec ( Jac0, Y_tlm(1,itlm), Fcn0_tlm(1,itlm) )
+   END DO  
+   
+!~~~>  Compute the function and Jacobian derivatives with respect to T
+   IF (.NOT.Autonomous) THEN
+      CALL ros_FunTimeDerivative ( T, Roundoff, Y, Fcn0, dFdT )
+      CALL ros_JacTimeDerivative ( T, Roundoff, Y, Jac0, dJdT )
+   END IF
+ 
+!~~~>  Repeat step calculation until current step accepted
+UntilAccepted: DO  
+   
+   CALL ros_PrepareMatrix(H,Direction,ros_Gamma(1),&
+          Jac0,Ghimj,Pivot,Singular)
+   IF (Singular) THEN ! More than 5 consecutive failed decompositions
+       CALL ros_ErrorMsg(-8,T,H,IERR)
+       RETURN
+   END IF
+
+!~~~>   Compute the stages
+Stage: DO istage = 1, ros_S
+      
+      ! Current istage offset. Current istage vector is K(ioffset+1:ioffset+N)
+       ioffset = N*(istage-1)
+
+      ! Initialize stage solution
+       CALL WCOPY(N,Y,1,Ynew,1)
+       CALL WCOPY(N*NTLM,Y_tlm,1,Ynew_tlm,1)
+      
+      ! For the 1st istage the function has been computed previously
+       IF ( istage == 1 ) THEN
+         CALL WCOPY(N,Fcn0,1,Fcn,1)
+         CALL WCOPY(N*NTLM,Fcn0_tlm,1,Fcn_tlm,1)
+      ! istage>1 and a new function evaluation is needed at the current istage
+       ELSEIF ( ros_NewF(istage) ) THEN
+         DO j = 1, istage-1
+           CALL WAXPY(N,ros_A((istage-1)*(istage-2)/2+j),    &
+                     K(N*(j-1)+1),1,Ynew,1) 
+           DO itlm=1,NTLM                    
+              CALL WAXPY(N,ros_A((istage-1)*(istage-2)/2+j), &
+                     K_tlm(N*(j-1)+1,itlm),1,Ynew_tlm(1,itlm),1) 
+           END DO                    
+         END DO
+         Tau = T + ros_Alpha(istage)*Direction*H
+         CALL FunTemplate(Tau,Ynew,Fcn)   
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+         CALL JacTemplate(Tau,Ynew,Jac)    
+         ISTATUS(Njac) = ISTATUS(Njac) + 1
+         DO itlm=1,NTLM 
+           CALL Jac_SP_Vec ( Jac, Ynew_tlm(1,itlm), Fcn_tlm(1,itlm) )
+         END DO              
+       END IF ! if istage == 1 elseif ros_NewF(istage)
+       CALL WCOPY(N,Fcn,1,K(ioffset+1),1)
+       DO itlm=1,NTLM   
+          CALL WCOPY(N,Fcn_tlm(1,itlm),1,K_tlm(ioffset+1,itlm),1)
+       END DO                
+       DO j = 1, istage-1
+         HC = ros_C((istage-1)*(istage-2)/2+j)/(Direction*H)
+         CALL WAXPY(N,HC,K(N*(j-1)+1),1,K(ioffset+1),1)
+         DO itlm=1,NTLM 
+           CALL WAXPY(N,HC,K_tlm(N*(j-1)+1,itlm),1,K_tlm(ioffset+1,itlm),1)
+         END DO              
+       END DO
+       IF ((.NOT. Autonomous).AND.(ros_Gamma(istage).NE.ZERO)) THEN
+         HG = Direction*H*ros_Gamma(istage)
+         CALL WAXPY(N,HG,dFdT,1,K(ioffset+1),1)
+         DO itlm=1,NTLM 
+           CALL Jac_SP_Vec ( dJdT, Ynew_tlm(1,itlm), Tmp )
+           CALL WAXPY(N,HG,Tmp,1,K_tlm(ioffset+1,itlm),1)
+         END DO              
+       END IF
+       CALL ros_Solve(Ghimj, Pivot, K(ioffset+1))
+       DO itlm=1,NTLM   
+         CALL Hess_Vec ( Hes0, K(ioffset+1), Y_tlm(1,itlm), Tmp )
+         CALL WAXPY(N,ONE,Tmp,1,K_tlm(ioffset+1,itlm),1)
+         CALL ros_Solve(Ghimj, Pivot, K_tlm(ioffset+1,itlm))
+       END DO                
+      
+   END DO Stage     
+            
+
+!~~~>  Compute the new solution 
+   CALL WCOPY(N,Y,1,Ynew,1)
+   DO j=1,ros_S
+      CALL WAXPY(N,ros_M(j),K(N*(j-1)+1),1,Ynew,1)
+   END DO
+   DO itlm=1,NTLM       
+     CALL WCOPY(N,Y_tlm(1,itlm),1,Ynew_tlm(1,itlm),1)
+     DO j=1,ros_S
+       CALL WAXPY(N,ros_M(j),K_tlm(N*(j-1)+1,itlm),1,Ynew_tlm(1,itlm),1)
+     END DO
+   END DO
+
+!~~~>  Compute the error estimation 
+   CALL Set2zero(N,Yerr)
+   DO j=1,ros_S     
+        CALL WAXPY(N,ros_E(j),K(N*(j-1)+1),1,Yerr,1)
+   END DO 
+   Err = ros_ErrorNorm ( Y, Ynew, Yerr, AbsTol, RelTol, VectorTol )
+   IF (TLMtruncErr) THEN
+     Err1 = 0.0d0
+     CALL Set2zero(N*NTLM,Yerr_tlm)
+     DO itlm=1,NTLM
+       DO j=1,ros_S  
+         CALL WAXPY(N,ros_E(j),K_tlm(N*(j-1)+1,itlm),1,Yerr_tlm(1,itlm),1)
+       END DO 
+     END DO
+     Err = ros_ErrorNorm_tlm(Y_tlm,Ynew_tlm,Yerr_tlm,AbsTol_tlm,RelTol_tlm,Err,VectorTol)
+   END IF
+  
+!~~~> New step size is bounded by FacMin <= Hnew/H <= FacMax
+   Fac  = MIN(FacMax,MAX(FacMin,FacSafe/Err**(ONE/ros_ELO)))
+   Hnew = H*Fac  
+
+!~~~>  Check the error magnitude and adjust step size
+   ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+   IF ( (Err <= ONE).OR.(H <= Hmin) ) THEN  !~~~> Accept step
+      ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+      CALL WCOPY(N,Ynew,1,Y,1)
+      CALL WCOPY(N*NTLM,Ynew_tlm,1,Y_tlm,1)
+      T = T + Direction*H
+      Hnew = MAX(Hmin,MIN(Hnew,Hmax))
+      IF (RejectLastH) THEN  ! No step size increase after a rejected step
+         Hnew = MIN(Hnew,H) 
+      END IF   
+      RSTATUS(Nhexit) = H
+      RSTATUS(Nhnew)  = Hnew
+      RSTATUS(Ntexit) = T
+      RejectLastH = .FALSE.  
+      RejectMoreH = .FALSE.
+      H = Hnew
+      EXIT UntilAccepted ! EXIT THE LOOP: WHILE STEP NOT ACCEPTED
+   ELSE           !~~~> Reject step
+      IF (RejectMoreH) THEN
+         Hnew = H*FacRej
+      END IF   
+      RejectMoreH = RejectLastH
+      RejectLastH = .TRUE.
+      H = Hnew
+      IF (ISTATUS(Nacc) >= 1) THEN
+         ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF    
+   END IF ! Err <= 1
+
+   END DO UntilAccepted 
+
+   END DO TimeLoop 
+   
+!~~~> Succesful exit
+   IERR = 1  !~~~> The integration was successful
+
+  END SUBROUTINE ros_TLM_Int
+   
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm ( Y, Ynew, Yerr, & 
+               AbsTol, RelTol, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y(N), Ynew(N),    &
+          Yerr(N), AbsTol(N), RelTol(N)
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: Err, Scale, Ymax   
+   INTEGER  :: i
+   KPP_REAL, PARAMETER :: ZERO = 0.0d0
+   
+   Err = ZERO
+   DO i=1,N
+     Ymax = MAX(ABS(Y(i)),ABS(Ynew(i)))
+     IF (VectorTol) THEN
+       Scale = AbsTol(i)+RelTol(i)*Ymax
+     ELSE
+       Scale = AbsTol(1)+RelTol(1)*Ymax
+     END IF
+     Err = Err+(Yerr(i)/Scale)**2
+   END DO
+   Err  = SQRT(Err/N)
+
+   ros_ErrorNorm = MAX(Err,1.0d-10)
+   
+  END FUNCTION ros_ErrorNorm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  KPP_REAL FUNCTION ros_ErrorNorm_tlm ( Y_tlm, Ynew_tlm, Yerr_tlm, & 
+               AbsTol_tlm, RelTol_tlm, Fwd_Err, VectorTol )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Computes the "scaled norm" of the error vector Yerr_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+! Input arguments   
+   KPP_REAL, INTENT(IN) :: Y_tlm(N,NTLM), Ynew_tlm(N,NTLM),    &
+          Yerr_tlm(N,NTLM), AbsTol_tlm(N,NTLM), RelTol_tlm(N,NTLM), Fwd_Err
+   LOGICAL, INTENT(IN) ::  VectorTol
+! Local variables     
+   KPP_REAL :: TMP, Err
+   INTEGER  :: itlm
+   
+   Err = FWD_Err
+   DO itlm = 1,NTLM
+     TMP = ros_ErrorNorm(Y_tlm(1,itlm), Ynew_tlm(1,itlm),Yerr_tlm(1,itlm), &
+     		AbsTol_tlm(1,itlm), RelTol_tlm(1,itlm), VectorTol)
+     Err = MAX(Err, TMP)
+   END DO
+
+   ros_ErrorNorm_tlm = MAX(Err,1.0d-10)
+   
+  END FUNCTION ros_ErrorNorm_tlm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_FunTimeDerivative ( T, Roundoff, Y, &
+                Fcn0, dFdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the function by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(N), Fcn0(N) 
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dFdT(N)   
+!~~~> Local variables     
+   KPP_REAL :: Delta  
+   KPP_REAL, PARAMETER :: DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL FunTemplate(T+Delta,Y,dFdT)   
+   ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+   CALL WAXPY(N,(-ONE),Fcn0,1,dFdT,1)
+   CALL WSCAL(N,(ONE/Delta),dFdT,1)
+
+  END SUBROUTINE ros_FunTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE ros_JacTimeDerivative ( T, Roundoff, Y, &
+                Jac0, dJdT )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> The time partial derivative of the Jacobian by finite differences
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE         
+
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) :: T, Roundoff, Y(N), Jac0(LU_NONZERO) 
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: dJdT(LU_NONZERO)   
+!~~~> Local variables     
+   KPP_REAL Delta  
+   KPP_REAL, PARAMETER :: ONE = 1.0d0, DeltaMin = 1.0d-6
+   
+   Delta = SQRT(Roundoff)*MAX(DeltaMin,ABS(T))
+   CALL JacTemplate(T+Delta,Y,dJdT)    
+   ISTATUS(Njac) = ISTATUS(Njac) + 1
+   CALL WAXPY(LU_NONZERO,(-ONE),Jac0,1,dJdT,1)
+   CALL WSCAL(LU_NONZERO,(ONE/Delta),dJdT,1)
+
+  END SUBROUTINE ros_JacTimeDerivative
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_PrepareMatrix ( H, Direction, gam, &
+             Jac0, Ghimj, Pivot, Singular )
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+!  Prepares the LHS matrix for stage calculations
+!  1.  Construct Ghimj = 1/(H*ham) - Jac0
+!      "(Gamma H) Inverse Minus Jacobian"
+!  2.  Repeat LU decomposition of Ghimj until successful.
+!       -half the step size if LU decomposition fails and retry
+!       -exit after 5 consecutive fails
+! --- --- --- --- --- --- --- --- --- --- --- --- ---
+   IMPLICIT NONE         
+   
+!~~~> Input arguments   
+   KPP_REAL, INTENT(IN) ::  gam, Jac0(LU_NONZERO)
+   INTEGER, INTENT(IN) ::  Direction
+!~~~> Output arguments   
+   KPP_REAL, INTENT(OUT) :: Ghimj(LU_NONZERO)
+   LOGICAL, INTENT(OUT) ::  Singular
+   INTEGER, INTENT(OUT) ::  Pivot(N)
+!~~~> Inout arguments   
+   KPP_REAL, INTENT(INOUT) :: H   ! step size is decreased when LU fails
+!~~~> Local variables     
+   INTEGER  :: i, ISING, Nconsecutive
+   KPP_REAL ::  ghinv
+   KPP_REAL, PARAMETER :: ONE  = 1.0d0, HALF = 0.5d0
+   
+   Nconsecutive = 0
+   Singular = .TRUE.
+   
+   DO WHILE (Singular)
+   
+!~~~>    Construct Ghimj = 1/(H*ham) - Jac0
+     CALL WCOPY(LU_NONZERO,Jac0,1,Ghimj,1)
+     CALL WSCAL(LU_NONZERO,(-ONE),Ghimj,1)
+     ghinv = ONE/(Direction*H*gam)
+     DO i=1,N
+       Ghimj(LU_DIAG(i)) = Ghimj(LU_DIAG(i))+ghinv
+     END DO
+!~~~>    Compute LU decomposition 
+     CALL ros_Decomp( Ghimj, Pivot, ISING )
+     IF (ISING == 0) THEN
+!~~~>    If successful done 
+        Singular = .FALSE. 
+     ELSE ! ISING .ne. 0
+!~~~>    If unsuccessful half the step size; if 5 consecutive fails then return
+        ISTATUS(Nsng) = ISTATUS(Nsng) + 1
+        Nconsecutive = Nconsecutive+1
+        Singular = .TRUE. 
+        PRINT*,'Warning: LU Decomposition returned ISING = ',ISING
+        IF (Nconsecutive <= 5) THEN ! Less than 5 consecutive failed decompositions
+           H = H*HALF
+        ELSE  ! More than 5 consecutive failed decompositions
+           RETURN
+        END IF  ! Nconsecutive
+      END IF    ! ISING 
+         
+   END DO ! WHILE Singular
+
+  END SUBROUTINE ros_PrepareMatrix
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Decomp( A, Pivot, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the LU decomposition   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Inout variables     
+   KPP_REAL, INTENT(INOUT) :: A(LU_NONZERO)
+!~~~> Output variables     
+   INTEGER, INTENT(OUT) :: Pivot(N), ISING
+   
+   CALL KppDecomp ( A, ISING )
+!~~~> Note: for a full matrix use Lapack:
+!     CALL  DGETRF( N, N, A, N, Pivot, ISING ) 
+   Pivot(1) = 1
+    
+   ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+  END SUBROUTINE ros_Decomp
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE ros_Solve( A, Pivot, b )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the forward/backward substitution (using pre-computed LU decomposition)   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+   IMPLICIT NONE
+!~~~> Input variables 
+#ifdef FULL_ALGEBRA
+   KPP_REAL, INTENT(IN) :: A(N,N)
+   INTEGER :: ISING
+#else    
+   KPP_REAL, INTENT(IN) :: A(LU_NONZERO)
+#endif   
+   INTEGER, INTENT(IN) :: Pivot(N)
+!~~~> InOut variables     
+   KPP_REAL, INTENT(INOUT) :: b(N)
+   
+#ifdef FULL_ALGEBRA
+   CALL  DGETRS( 'N', N , 1, A, N, Pivot, b, N, ISING )
+#else    
+   CALL KppSolve( A, b )
+#endif   
+     
+   ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+  END SUBROUTINE ros_Solve
+
+ 
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros2 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 2 stages, order 2
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   DOUBLE PRECISION g
+   
+    g = 1.0d0 + 1.0d0/SQRT(2.0d0)
+   
+    rosMethod = RS2
+!~~~> Name of the method
+    ros_Name = 'ROS-2'   
+!~~~> Number of stages
+    ros_S = 2
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+   
+    ros_A(1) = (1.d0)/g
+    ros_C(1) = (-2.d0)/g
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1)= (3.d0)/(2.d0*g)
+    ros_M(2)= (1.d0)/(2.d0*g)
+! E_i = Coefficients for error estimator    
+    ros_E(1) = 1.d0/(2.d0*g)
+    ros_E(2) = 1.d0/(2.d0*g)
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus one
+    ros_ELO = 2.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.0d0
+    ros_Alpha(2) = 1.0d0 
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = g
+    ros_Gamma(2) =-g
+   
+ END SUBROUTINE Ros2
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- AN L-STABLE METHOD, 3 stages, order 3, 2 function evaluations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+   IMPLICIT NONE
+   
+    rosMethod = RS3
+!~~~> Name of the method
+   ros_Name = 'ROS-3'   
+!~~~> Number of stages
+   ros_S = 3
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1)= 1.d0
+   ros_A(2)= 1.d0
+   ros_A(3)= 0.d0
+
+   ros_C(1) = -0.10156171083877702091975600115545d+01
+   ros_C(2) =  0.40759956452537699824805835358067d+01
+   ros_C(3) =  0.92076794298330791242156818474003d+01
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1) = .TRUE.
+   ros_NewF(2) = .TRUE.
+   ros_NewF(3) = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) =  0.1d+01
+   ros_M(2) =  0.61697947043828245592553615689730d+01
+   ros_M(3) = -0.42772256543218573326238373806514d+00
+! E_i = Coefficients for error estimator    
+   ros_E(1) =  0.5d+00
+   ros_E(2) = -0.29079558716805469821718236208017d+01
+   ros_E(3) =  0.22354069897811569627360909276199d+00
+!~~~> ros_ELO = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO = 3.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1)= 0.0d+00
+   ros_Alpha(2)= 0.43586652150845899941601945119356d+00
+   ros_Alpha(3)= 0.43586652150845899941601945119356d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1)= 0.43586652150845899941601945119356d+00
+   ros_Gamma(2)= 0.24291996454816804366592249683314d+00
+   ros_Gamma(3)= 0.21851380027664058511513169485832d+01
+
+  END SUBROUTINE Ros3
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Ros4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     L-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 4 STAGES
+!     L-STABLE EMBEDDED ROSENBROCK METHOD OF ORDER 3 
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1990)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RS4
+!~~~> Name of the method
+   ros_Name = 'ROS-4'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+   ros_A(1) = 0.2000000000000000d+01
+   ros_A(2) = 0.1867943637803922d+01
+   ros_A(3) = 0.2344449711399156d+00
+   ros_A(4) = ros_A(2)
+   ros_A(5) = ros_A(3)
+   ros_A(6) = 0.0D0
+
+   ros_C(1) =-0.7137615036412310d+01
+   ros_C(2) = 0.2580708087951457d+01
+   ros_C(3) = 0.6515950076447975d+00
+   ros_C(4) =-0.2137148994382534d+01
+   ros_C(5) =-0.3214669691237626d+00
+   ros_C(6) =-0.6949742501781779d+00
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .TRUE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .FALSE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 0.2255570073418735d+01
+   ros_M(2) = 0.2870493262186792d+00
+   ros_M(3) = 0.4353179431840180d+00
+   ros_M(4) = 0.1093502252409163d+01
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) =-0.2815431932141155d+00
+   ros_E(2) =-0.7276199124938920d-01
+   ros_E(3) =-0.1082196201495311d+00
+   ros_E(4) =-0.1093502252409163d+01
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 4.0d0    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.D0
+   ros_Alpha(2) = 0.1145640000000000d+01
+   ros_Alpha(3) = 0.6552168638155900d+00
+   ros_Alpha(4) = ros_Alpha(3)
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5728200000000000d+00
+   ros_Gamma(2) =-0.1769193891319233d+01
+   ros_Gamma(3) = 0.7592633437920482d+00
+   ros_Gamma(4) =-0.1049021087100450d+00
+
+  END SUBROUTINE Ros4
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+! --- A STIFFLY-STABLE METHOD, 4 stages, order 3
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+   
+    rosMethod = RD3
+!~~~> Name of the method
+   ros_Name = 'RODAS-3'   
+!~~~> Number of stages
+   ros_S = 4
+   
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:
+!       A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!       C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+ 
+   ros_A(1) = 0.0d+00
+   ros_A(2) = 2.0d+00
+   ros_A(3) = 0.0d+00
+   ros_A(4) = 2.0d+00
+   ros_A(5) = 0.0d+00
+   ros_A(6) = 1.0d+00
+
+   ros_C(1) = 4.0d+00
+   ros_C(2) = 1.0d+00
+   ros_C(3) =-1.0d+00
+   ros_C(4) = 1.0d+00
+   ros_C(5) =-1.0d+00 
+   ros_C(6) =-(8.0d+00/3.0d+00) 
+         
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+   ros_NewF(1)  = .TRUE.
+   ros_NewF(2)  = .FALSE.
+   ros_NewF(3)  = .TRUE.
+   ros_NewF(4)  = .TRUE.
+!~~~> M_i = Coefficients for new step solution
+   ros_M(1) = 2.0d+00
+   ros_M(2) = 0.0d+00
+   ros_M(3) = 1.0d+00
+   ros_M(4) = 1.0d+00
+!~~~> E_i  = Coefficients for error estimator    
+   ros_E(1) = 0.0d+00
+   ros_E(2) = 0.0d+00
+   ros_E(3) = 0.0d+00
+   ros_E(4) = 1.0d+00
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!    main and the embedded scheme orders plus 1
+   ros_ELO  = 3.0d+00    
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+   ros_Alpha(1) = 0.0d+00
+   ros_Alpha(2) = 0.0d+00
+   ros_Alpha(3) = 1.0d+00
+   ros_Alpha(4) = 1.0d+00
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+   ros_Gamma(1) = 0.5d+00
+   ros_Gamma(2) = 1.5d+00
+   ros_Gamma(3) = 0.0d+00
+   ros_Gamma(4) = 0.0d+00
+
+  END SUBROUTINE Rodas3
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  SUBROUTINE Rodas4
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!     STIFFLY-STABLE ROSENBROCK METHOD OF ORDER 4, WITH 6 STAGES
+!
+!      E. HAIRER AND G. WANNER, SOLVING ORDINARY DIFFERENTIAL
+!      EQUATIONS II. STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS.
+!      SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS,
+!      SPRINGER-VERLAG (1996)         
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+
+    rosMethod = RD4
+!~~~> Name of the method
+    ros_Name = 'RODAS-4'   
+!~~~> Number of stages
+    ros_S = 6
+
+!~~~> Y_stage_i ~ Y( T + H*Alpha_i )
+    ros_Alpha(1) = 0.000d0
+    ros_Alpha(2) = 0.386d0
+    ros_Alpha(3) = 0.210d0 
+    ros_Alpha(4) = 0.630d0
+    ros_Alpha(5) = 1.000d0
+    ros_Alpha(6) = 1.000d0
+        
+!~~~> Gamma_i = \sum_j  gamma_{i,j}    
+    ros_Gamma(1) = 0.2500000000000000d+00
+    ros_Gamma(2) =-0.1043000000000000d+00
+    ros_Gamma(3) = 0.1035000000000000d+00
+    ros_Gamma(4) =-0.3620000000000023d-01
+    ros_Gamma(5) = 0.0d0
+    ros_Gamma(6) = 0.0d0
+
+!~~~> The coefficient matrices A and C are strictly lower triangular.
+!   The lower triangular (subdiagonal) elements are stored in row-wise order:
+!   A(2,1) = ros_A(1), A(3,1)=ros_A(2), A(3,2)=ros_A(3), etc.
+!   The general mapping formula is:  A(i,j) = ros_A( (i-1)*(i-2)/2 + j )    
+!                  C(i,j) = ros_C( (i-1)*(i-2)/2 + j )  
+     
+    ros_A(1) = 0.1544000000000000d+01
+    ros_A(2) = 0.9466785280815826d+00
+    ros_A(3) = 0.2557011698983284d+00
+    ros_A(4) = 0.3314825187068521d+01
+    ros_A(5) = 0.2896124015972201d+01
+    ros_A(6) = 0.9986419139977817d+00
+    ros_A(7) = 0.1221224509226641d+01
+    ros_A(8) = 0.6019134481288629d+01
+    ros_A(9) = 0.1253708332932087d+02
+    ros_A(10) =-0.6878860361058950d+00
+    ros_A(11) = ros_A(7)
+    ros_A(12) = ros_A(8)
+    ros_A(13) = ros_A(9)
+    ros_A(14) = ros_A(10)
+    ros_A(15) = 1.0d+00
+
+    ros_C(1) =-0.5668800000000000d+01
+    ros_C(2) =-0.2430093356833875d+01
+    ros_C(3) =-0.2063599157091915d+00
+    ros_C(4) =-0.1073529058151375d+00
+    ros_C(5) =-0.9594562251023355d+01
+    ros_C(6) =-0.2047028614809616d+02
+    ros_C(7) = 0.7496443313967647d+01
+    ros_C(8) =-0.1024680431464352d+02
+    ros_C(9) =-0.3399990352819905d+02
+    ros_C(10) = 0.1170890893206160d+02
+    ros_C(11) = 0.8083246795921522d+01
+    ros_C(12) =-0.7981132988064893d+01
+    ros_C(13) =-0.3152159432874371d+02
+    ros_C(14) = 0.1631930543123136d+02
+    ros_C(15) =-0.6058818238834054d+01
+
+!~~~> M_i = Coefficients for new step solution
+    ros_M(1) = ros_A(7)
+    ros_M(2) = ros_A(8)
+    ros_M(3) = ros_A(9)
+    ros_M(4) = ros_A(10)
+    ros_M(5) = 1.0d+00
+    ros_M(6) = 1.0d+00
+
+!~~~> E_i  = Coefficients for error estimator    
+    ros_E(1) = 0.0d+00
+    ros_E(2) = 0.0d+00
+    ros_E(3) = 0.0d+00
+    ros_E(4) = 0.0d+00
+    ros_E(5) = 0.0d+00
+    ros_E(6) = 1.0d+00
+
+!~~~> Does the stage i require a new function evaluation (ros_NewF(i)=TRUE)
+!   or does it re-use the function evaluation from stage i-1 (ros_NewF(i)=FALSE)
+    ros_NewF(1) = .TRUE.
+    ros_NewF(2) = .TRUE.
+    ros_NewF(3) = .TRUE.
+    ros_NewF(4) = .TRUE.
+    ros_NewF(5) = .TRUE.
+    ros_NewF(6) = .TRUE.
+     
+!~~~> ros_ELO  = estimator of local order - the minimum between the
+!        main and the embedded scheme orders plus 1
+    ros_ELO = 4.0d0
+     
+  END SUBROUTINE Rodas4
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+END SUBROUTINE RosenbrockTLM
+!  and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE FunTemplate( T, Y, Ydot )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
+!  Template for the ODE function call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+
+   IMPLICIT NONE
+!~~~> Input variables     
+   KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables     
+   KPP_REAL :: Ydot(NVAR)
+!~~~> Local variables
+   KPP_REAL :: Told     
+
+   Told = TIME
+   TIME = T
+   CALL Update_SUN()
+   CALL Update_RCONST()
+   CALL Fun( Y, FIX, RCONST, Ydot )
+   TIME = Told
+        
+END SUBROUTINE FunTemplate
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE JacTemplate( T, Y, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!  Template for the ODE Jacobian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+    IMPLICIT NONE
+   
+!~~~> Input variables     
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL :: Jcb(LU_NONZERO)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Jac_SP( Y, FIX, RCONST, Jcb )
+    TIME = Told
+     
+END SUBROUTINE JacTemplate                                      
+
+
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+SUBROUTINE HessTemplate( T, Y, Hes )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+!  Template for the ODE Hessian call.
+!  Updates the rate coefficients (and possibly the fixed species) at each call    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
+    IMPLICIT NONE
+    
+!~~~> Input variables     
+    KPP_REAL :: T, Y(NVAR)
+!~~~> Output variables     
+    KPP_REAL :: Hes(NHESS)
+!~~~> Local variables
+    KPP_REAL :: Told     
+
+    Told = TIME
+    TIME = T   
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Hessian( Y, FIX, RCONST, Hes )
+    TIME = Told
+
+END SUBROUTINE HessTemplate                                      
+
+END MODULE KPP_ROOT_Integrator
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.c	(revision 3477)
@@ -0,0 +1,2087 @@
+ #define MAX(a,b) ( ((a) >= (b)) ?(a):(b)  )
+ #define MIN(b,c) ( ((b) <  (c)) ?(b):(c)  )
+ #define ABS(x)   ( ((x) >=  0 ) ?(x):(-x) )
+ #define SQRT(d)  ( pow((d),0.5)  )
+ /* SIGN transfer function */
+ #define SIGN(x,y) (((y) >=  0 ) ?(ABS(x)):(-ABS(x)) ) 
+
+/*~~> Numerical constants */
+ #define  ZERO     (KPP_REAL)0.0
+ #define  ONE      (KPP_REAL)1.0
+
+/*~~~> Statistics on the work performed by the Runge-Kutta method */
+ #define Nfun	0
+ #define Njac	1
+ #define Nstp	2
+ #define Nacc	3
+ #define Nrej	4
+ #define Ndec	5
+ #define Nsol	6
+ #define Nsng	7
+ #define Ntexit	0
+ #define Nhacc	1
+ #define Nhnew	2
+
+/*~~~> Runge-Kutta method parameters */
+ #define RKmax 3
+
+ #define R2A 1
+ #define R1A 2
+ #define L3C 3
+ #define GAU 4
+ #define L3A 5
+
+ int rkMethod,
+     SdirkError;
+ KPP_REAL rkT[RKmax][RKmax],
+	rkTinv[RKmax][RKmax],
+       	rkTinvAinv[RKmax][RKmax],
+   	rkAinvT[RKmax][RKmax],
+   	rkA[RKmax+1][RKmax+1],
+   	rkB[RKmax+1],
+      	rkC[RKmax+1],
+       	rkD[RKmax+1],
+       	rkE[RKmax+1],
+   	rkBgam[RKmax+2],
+       	rkBhat[RKmax+2],
+       	rkTheta[RKmax+1],
+       	rkF[RKmax+2],
+   	rkGamma,
+   	rkAlpha,
+   	rkBeta,
+	rkELO;
+/*~~~> Function headers */
+// void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//		int ISTATUS_U[], KPP_REAL RSTATUS_U[], int IERR_U); 
+ void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT); 
+ void RungeKutta(int N, KPP_REAL T, KPP_REAL Tend, KPP_REAL Y[],
+     	       KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[],
+	       int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[], int* IERR);
+ void RK_Integrator(int N, KPP_REAL*  T, KPP_REAL  Tend, KPP_REAL Y[],
+     		   KPP_REAL AbsTol[], KPP_REAL RelTol[], int ITOL,
+     		   int ISTATUS[], KPP_REAL RSTATUS[], KPP_REAL Hmin,
+		   KPP_REAL Hmax, KPP_REAL Hstart, KPP_REAL Roundoff,
+		   int Max_no_steps, int NewtonMaxit, int StartNewton,
+		   int Gustafsson, KPP_REAL ThetaMin, KPP_REAL NewtonTol,
+		   KPP_REAL FacSafe, KPP_REAL FacMax, KPP_REAL FacMin,
+     		   KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int* IERR);
+ void RK_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H, int* IERR);
+ void RK_ErrorScale(int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+		KPP_REAL Y[], KPP_REAL SCAL[]);
+ /*void RK_Transform(int N, KPP_REAL Tr[][RKmax], KPP_REAL Z1[], KPP_REAL Z2[],
+                KPP_REAL Z3[], KPP_REAL W1[], KPP_REAL W2[], KPP_REAL W3[]);*/
+ void RK_Interpolate(char action[], int N, KPP_REAL H, KPP_REAL Hold,
+	 KPP_REAL Z1[], KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL CONT[][RKmax]);
+ void RK_PrepareRHS(int N, KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL FO[],
+        KPP_REAL Z1[], KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL R1[], KPP_REAL R2[],
+        KPP_REAL R3[]);
+ void RK_Decomp(int N, KPP_REAL H, KPP_REAL FJAC[], KPP_REAL E1[],
+                int IP1[], KPP_REAL E2R[], KPP_REAL E2I[], 
+		int IP2[], int* ISING, int ISTATUS[]);
+ void RK_Solve(int N, KPP_REAL H, KPP_REAL E1[], int IP1[], KPP_REAL E2R[],
+	KPP_REAL E2I[], int IP2[], KPP_REAL R1[], KPP_REAL R2[], KPP_REAL R3[],
+	int ISTATUS[]);
+ void RK_ErrorEstimate(int N, KPP_REAL H, KPP_REAL T, KPP_REAL Y[],
+        KPP_REAL FO[], KPP_REAL E1[], int IP1[], KPP_REAL Z1[],
+        KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL SCAL[], KPP_REAL* Err,
+        int FirstStep, int Reject, int ISTATUS[]);
+ void Radau2A_Coefficients();
+ void Lobatto3C_Coefficients ();
+ void Gauss_Coefficients();
+ void Radau1A_Coefficients();
+ void Lobatto3A_Coefficients();
+ void FUN_CHEM(KPP_REAL T, KPP_REAL V[], KPP_REAL FCT[]);
+ void JAC_CHEM(KPP_REAL T, KPP_REAL V[], KPP_REAL JF[]);
+ KPP_REAL RK_ErrorNorm(int N, KPP_REAL SCAL[], KPP_REAL DY[]);
+ void Fun(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+ void Jac_SP(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+ void WCOPY(int N, KPP_REAL X[], int incX, KPP_REAL Y[], int incY);
+ void WADD(int N, KPP_REAL Y[], KPP_REAL Z[], KPP_REAL TMP[]);
+ void WAXPY(int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], int incY );
+ KPP_REAL WLAMCH( char C );
+ void KppSolveCmplxR(KPP_REAL JVSR[], KPP_REAL JVSI[], KPP_REAL XR[], KPP_REAL XI[]);
+ int KppDecompCmplxR(KPP_REAL *JVSR, KPP_REAL *JVSI);
+ void Set2Zero(int N, KPP_REAL A[]);
+ int KppDecomp( KPP_REAL A[] );
+ void KppSolve ( KPP_REAL A[], KPP_REAL b[] );
+ void Update_SUN();
+ void Update_RCONST();
+ void Update_PHOTO();
+ 
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+//void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//	       int ISTATUS_U[], KPP_REAL RSTATUS_U[], int IERR_U )
+void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/* RungeKutta - Fully Implicit 3-stage Runge-Kutta methods based on:
+          * Radau-2A   quadrature (order 5)                        
+          * Radau-1A   quadrature (order 5)                              
+          * Lobatto-3C quadrature (order 4)                              
+          * Gauss      quadrature (order 6)                              
+  By default the code employs the KPP sparse linear algebra routines     
+  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        
+                                                                         
+    (C)  Adrian Sandu, August 2005                                       
+    Virginia Polytechnic Institute and State University                  
+    Contact: sandu@cs.vt.edu                                             
+    Revised by Philipp Miehe and Adrian Sandu, May 2006  
+    F90 to C translation by Tinting Jiang and Don Jacob, July 2006                
+    This implementation is part of KPP - the Kinetic PreProcessor        
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   int IERR;
+   KPP_REAL RCNTRL[20],
+  	  RSTATUS[20],
+	  T1,
+	  T2;
+   int ICNTRL[20],
+       ISTATUS[20];
+   static int Ntotal = 0; /* for printing the number of steps */
+   
+   int i;
+   for ( i = 0; i < 20; i++ ) {
+     RCNTRL[i] = ZERO;
+     ICNTRL[i] = 0;
+   } /* for */
+
+   /*~~~> fine-tune the integrator: */
+   ICNTRL[1]  = 0;    /* 0=vector tolerances, 1=scalar tolerances */
+   ICNTRL[4]  = 8;    /* Max no. of Newton iterations */
+   ICNTRL[5]  = 0;    /* Starting values for Newton are interpolated(0) or zero(1) */
+   ICNTRL[9]  = 1;    /* 0 - classic or 1 - SDIRK error estimation */
+   ICNTRL[10] = 0;    /* Gustaffson(0) or classic(1) controller */ 
+   
+//   /*~~~> if optional parameters are given, and if they are >0,
+//          then use them to overwrite default settings */	
+//   if (ICNTRL_U != NULL) {
+//	for ( i = 0; i < 20; i++) {
+//	   if (ICNTRL_U[i] > 0) {
+//		  ICNTRL[i] = ICNTRL_U[i];
+//	   } /* end if */
+//	} /* end for */
+//   } /* end if */
+//   if (RCNTRL_U != NULL) {
+//	for (i = 0; i < 20; i++) {
+//   	   if (RCNTRL_U[i] > 0) {
+//		RCNTRL[i] = RCNTRL_U[i];
+//	   } /* end if */
+//	} /* end for */
+//   } /* end if */
+
+   T1 = TIN;
+   /*printf("T1=%f\n", T1);*/
+   T2 = TOUT;
+   /*printf("T2=%f\n", T2);*/
+   RungeKutta(NVAR, T1, T2, VAR, RTOL, ATOL, RCNTRL,ICNTRL,RSTATUS,ISTATUS, &IERR);
+   
+   Ntotal += ISTATUS[Nstp];
+   printf("NSTEPS=%d (%d)  O3=%E ", ISTATUS[Nstp], Ntotal, VAR[ind_O3]);
+
+//   /* if optional parameters are given for output
+//    * use them to store information in them */
+//   if (ISTATUS_U != NULL) {
+//	for (i = 0; i < 20; i++) {
+//	   ISTATUS_U[i] = ISTATUS[i];
+//	} /* end for */
+//    } /* end if */
+//   if (RSTATUS_U != NULL) {
+//	for (i = 0; i < 20; i++) {
+//	   RSTATUS_U[i] = RSTATUS[i];
+//	} /* end for */
+//   } /* end if */
+//   /*if (IERR_U != NULL) */
+//	IERR_U = IERR;
+
+   if (IERR < 0) {
+	printf("Runge-Kutta: Unsuccessful exit at T=%f(IERR=%d)", TIN, IERR);
+   } /* end if */
+   
+} /* end INTEGRATE */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+void RungeKutta(int N, KPP_REAL T, KPP_REAL Tend, KPP_REAL Y[],
+     	       KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[],
+	       int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[], int* IERR)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    This implementation is based on the book and the code Radau5:
+
+     	E. HAIRER AND G. WANNER
+     	"SOLVING ORDINARY DIFFERENTIAL EQUATIONS II.
+       	     STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+     	SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+        SPRINGER-VERLAG (1991)
+
+	UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+	CH-1211 GENEVE 24, SWITZERLAND
+    	E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+   
+    Methods:
+	 * Radau-2A	quadrature (order 5)
+      	 * Radau-1A	quadrature (order 5)
+      	 * Lobatto-3C	quadrature (order 4)
+    	 * Gauss	quadrature (order 6)
+
+    (C)  Adrian Sandu, August 2005
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>   INPUT ARGUMENTS:
+	  ----------------
+    Note: For input parameters equal to zero the default values of the
+	  corresponding variables are used.
+
+     N		Dimension of the system
+     T		Initial time value
+
+     Tend	Final T value (Tend-T may be positive or negative)
+
+     Y(N)	Initial values for Y
+
+     RelTol, AbsTol   Relative and absolute error tolerances.
+           for ICNTRL[1] = 0: AbsTol, RelTol are N-dimensional vectors
+                         = 1: AbsTol, RelTol are scalars
+  *~~~>   Integer input parameters:
+
+     ICNTRL[0] = not used
+     
+     ICNTRL[1] = 0: AbsTol, RelTol are NVAR-dimensional vectors
+               = 1: AbsTol, RelTol are scalars
+
+     ICNTRL[2] = RK method selection
+	     = 1: Radau-2A	(the default)
+	     = 2: Radau-1A
+	     = 3: Lobatto-3C
+	     = 4: Gauss
+	     = 5: Lobatto-3A (not yet implemented)
+
+     ICNTRL[3] -> maximum number of integration steps
+	For ICNTRL[3] = 0 the default value of 10000 is used
+
+     ICNTRL[4] -> maximum number of Newton iterations
+	For ICNTRL[4] = 0 the default value of 8 is used
+
+     ICNTRL[5] -> starting values of Newton iterations:
+	ICNTRL[5] = 0: starting values are obtained from
+		     the extrapolated collocation solution
+		     (the default)
+   	ICNTRL[5] = 1: starting values are zero
+
+     ICNTRL[9] -> switch for error estimation strategy
+	ICNTRL[9] = 0: one additional stage at c = 0,
+		     see Hairer (default)
+	ICNTRL[9] = 1: two additional stages at c = 0,
+		     and SDIRK at c = 1, stiffly accurate
+
+     ICNTRL[10] -> switch for step size strategy
+	ICNTRL[10] = 0: mod. predictive controller (Gustafsson, default)
+	ICNTRL[10] = 1: classical step size control
+ 	the choice 1 seems to produce safer results;
+	for simple problems, the choice 2 produces
+	often slightly faster runs
+
+  *~~~>   Real input parameters:
+     RCNTRL[0]  -> Hmin, lower bound for the integration step size
+		(highly recommended to keep Hmin = ZERO, the default)
+
+     RCNTRL[1]  -> Hmax, upper bound for the integration step size
+
+     RCNTRL[2]  -> Hstart, the starting step size
+
+     RCNTRL[3]  -> FacMin, lower bound on step decrease factor 
+		(default=0.2)
+
+     RCNTRL[4]  -> FacMax, upper bound on step increase factor
+		(default=6)
+
+     RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+		(default=0.1)
+
+     RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+		than the predicted value (default=0.9)
+
+     RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+		than ThetaMin the Jacobian is not recomputed;
+		(default=0.001)
+
+     RCNTRL[8]  -> NewtonTol, stopping criterion for Newton's method
+		(default=0.03)
+
+     RCNTRL[9]  -> Qmin
+
+     RCNTRL[10] -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+		 step size is kept constant and the LU factorization
+		 reused (default Qmin=1, Qmax=1.2)	
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>     OUTPUT ARGUMENTS:
+            -----------------
+     T	      -> T value for which the solution has been computed
+		 (after successful return T=Tend).
+
+     Y(N)  -> Numerical solution at T
+
+  Note: each call to RungeKutta adds the current no. of fcn calls
+	to previous value of ISTATUS[0], and similar to other params.
+	Set ISTATUS[1:9] = 0 before call to avoid this accumulation.
+
+     ISTATUS[0] -> No. of function calls
+     ISTATUS[1] -> No. of Jacobian calls
+     ISTATUS[2] -> No. of steps
+     ISTATUS[3] -> No. of accepted steps
+     ISTATUS[4] -> No. of rejected steps (except at very beginning)
+     ISTATUS[5] -> No. of LU decompositions
+     ISTATUS[6] -> No. of forward/backward substitutions
+     ISTATUS[7] -> No. of singular matrix decompositions
+
+     RSTATUS[0] -> Texit, the time corresponding to the 
+		 computed Y upon return
+     RSTATUS[1] -> Hexit, last accepted step before exit
+     RSTATUS[2] -> Hnew, last predicted step (not yet taken)
+		 For multiple restarts, use Hnew as Hstart
+  		 in the subsequent run
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+  *~~~>    RETURN VALUE (int):
+
+     IERR     -> Reports on successfulness upon return:
+	= 1 for success
+	< 0 for error (value equals error code)
+	= -1  : Improper value for maximal no of steps
+	= -2  : Improper value for maximal no of Newton iterations
+	= -3  : Hmin/Hmax/Hstart must be positive
+    	= -4  : Improper values for FacMin/FacMax/FacSafe/FacRej
+    	= -5  : Improper value for ThetaMin
+    	= -6  : Newton stopping tolerance too small
+    	= -7  : Improper values for Qmin, Qmax
+    	= -8  : Tolerances are too small
+    	= -9  : No of steps exceeds maximum bound
+    	= -10 : Step size too small
+	= -11 : Matrix is repeatedly singular
+   	= -12 : Non-convergence of Newton iterations
+    	= -13 : Requested RK method not implemented
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+  /*~~~>  Control arguments */
+  /*printf("Starting RungeKutta\n");*/
+   int Max_no_steps;
+   KPP_REAL Hmin,
+  	  Hmax,
+	  Hstart,
+	  Qmin,
+	  Qmax,
+   	  Roundoff,
+	  ThetaMin,
+	  NewtonTol,
+   	  FacSafe,
+          FacMin,
+	  FacMax,
+	  FacRej;
+  /*~~~> Local variables */
+   int NewtonMaxit,
+       ITOL,
+       i,
+       StartNewton,
+       Gustafsson; 
+
+   *IERR = 0;
+   for (i = 0; i < 20; i++) {
+	ISTATUS[i] = 0;
+	RSTATUS[i] = ZERO;
+   } /* end for */
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  /*~~~> ICNTRL[0] - autonomous system - not used */
+  /*~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol */
+   if (ICNTRL[1] == 0) {
+	/*printf("Entering if ICNTRL[1] == 0\n");*/
+	ITOL = 1;
+   }
+   else {
+	ITOL = 0;
+   } /*end if */
+  /*~~~> Error control selection */
+   if (ICNTRL[9] == 0) {
+	SdirkError = 0;
+   }
+   else {
+	/*printf("Entering if ICNTRL[9] == 1\n");*/    
+	SdirkError = 1;
+   } /* end if */
+  /*~~~> Method Selection */
+  /*printf("Starting case ICNTRL[2]\n");*/
+   switch (ICNTRL[2]) {
+	case 0:
+	case 1:	Radau2A_Coefficients(); /*printf("case 0 or 1\n");*/
+		break;
+	case 2: Lobatto3C_Coefficients(); printf("case 2\n");
+		break;
+	case 3: Gauss_Coefficients(); printf("case 3\n");
+		break;
+	case 4: Radau1A_Coefficients(); printf("case 4\n");
+		break;
+	case 5: Lobatto3A_Coefficients(); printf("case 5\n");
+		break;
+	default:
+		printf("\n ICNTRL[2]=%d\n", ICNTRL[2]);
+		RK_ErrorMsg(-13, T, ZERO, IERR);
+   } /* end switch */
+ 
+ /*~~~> Max_no_steps: the maximal number of time steps */
+   if (ICNTRL[3] == 0) {
+	Max_no_steps = 200000;
+	/*printf("Max_no_steps = %d\n", Max_no_steps);*/
+   }
+   else {
+	Max_no_steps = ICNTRL[3];
+	if (Max_no_steps <= 0)
+	{
+		printf("\n ICNTRL[3]=%d\n", ICNTRL[3]);
+		RK_ErrorMsg(-1, T, ZERO, IERR);
+	} /* end if */
+   } /* end if */
+
+ /*~~~> NewtonMaxit: maximal number of Newton iterations */
+   if (ICNTRL[4] == 0)
+	NewtonMaxit = 8;
+   else 
+   {
+	NewtonMaxit = ICNTRL[4];
+	if (NewtonMaxit <= 0) {
+		printf("\n ICNTRL[4]=%d\n", ICNTRL[4]);
+		RK_ErrorMsg(-2, T, ZERO, IERR);
+	}
+	/*printf("NewtonMaxit = %d\n", NewtonMaxit);*/
+   } /* end if */
+
+ /*~~~> StartNewton: Use extrapolation for starting values of Newton iterations */
+   if (ICNTRL[5] == 0) {
+	StartNewton = 1;
+	/*printf("StartNewton = %d\n", StartNewton);*/
+   }
+   else {
+	StartNewton = 0;
+   } /* end if */
+
+ /*~~~> Gustafsson: step size controller */
+   if (ICNTRL[10] == 0) {
+	Gustafsson = 1;
+	/*printf("Gustafsson = %d\n", Gustafsson);*/
+   }
+   else {
+	Gustafsson = 0;
+   } /* end if */
+  
+ /*~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0 */
+   Roundoff = WLAMCH('E');
+   /*printf("Roundoff=%f\n", Roundoff);*/
+ /*~~~> Hmin = minimal step size */
+   if (RCNTRL[0] == ZERO) {
+	/*printf("Entering if RCNTRL[0]=%f == ZERO\n", RCNTRL[0]);*/   
+	Hmin = ZERO;
+   }
+   else {
+	Hmin = MIN(ABS(RCNTRL[0]), ABS(Tend-T));
+   } /* end if */
+ /*~~~> Hmax = maximal step size */
+   if (RCNTRL[1] == ZERO) {
+	/*printf("Entering if RCNTRL[1]=%f == ZERO\n", RCNTRL[1]);*/   
+      	Hmax = ABS(Tend-T);
+   }
+   else {
+      	Hmax = MIN(ABS(RCNTRL[1]),ABS(Tend-T));
+   } /* end if */
+ /*~~~> Hstart = starting step size */
+   if (RCNTRL[2] == ZERO) {
+	/*printf("Entering if RCNTRL[2]=%f == ZERO\n", RCNTRL[2]);*/   
+    	Hstart = ZERO;
+   }
+   else {
+	Hstart = MIN(ABS(RCNTRL[2]),ABS(Tend-T));
+   } /* end if */
+ /*~~~> FacMin: lower bound on step decrease factor */
+   if (RCNTRL[3] == ZERO) {
+	/*printf("Entering if RCNTRL[3]=%f == ZERO\n", RCNTRL[3]);*/   
+	FacMin = (KPP_REAL)0.2;
+   }
+   else {
+   	FacMin = RCNTRL[3];
+   } /* end if */
+ /*~~~> FacMax: upper bound on step increase factor */
+   if (RCNTRL[4] == ZERO) {
+	/*printf("Entering if RCNTRL[4]=%f == ZERO\n", RCNTRL[4]);*/   
+    	FacMax = (KPP_REAL)8.0;
+   }
+   else {
+    	FacMax = RCNTRL[4];
+   } /* end if */
+ /*~~~> FacRej: step decrease factor after 2 consecutive rejections */
+   if (RCNTRL[5] == ZERO) {
+	/*printf("Entering if RCNTRL[5]=%f == ZERO\n", RCNTRL[5]);*/
+	FacRej = (KPP_REAL)0.1;
+   }
+   else {
+     	FacRej = RCNTRL[5];
+   } /* end if */
+ /*~~~> FacSafe: by which the new step is slightly smaller
+		 than the predicted value */
+   if (RCNTRL[6] == ZERO) {
+	/*printf("Entering if RCNTRL[6]=%f == ZERO\n", RCNTRL[6]);*/   
+    	FacSafe = (KPP_REAL)0.9;
+   }
+   else {
+ 	FacSafe = RCNTRL[6];
+   } /* end if */
+   if ((FacMax < ONE) || (FacMin > ONE) || (FacSafe <= 1.0e-03) || (FacSafe >= ONE)) {
+	printf("\n RCNTRL[3]=%f, RCNTRL[4]=%f, RCNTRL[5]=%f, RCNTRL[6]=%f\n",
+		RCNTRL[3], RCNTRL[4], RCNTRL[5], RCNTRL[6]);
+	RK_ErrorMsg(-4, T, ZERO, IERR);
+   } /* end if */
+
+ /*~~~> ThetaMin: decides whether the Jacobian should be recomputed */
+   if (RCNTRL[7] == ZERO)
+  	ThetaMin = (KPP_REAL)1.0e-03;
+   else {
+	ThetaMin = RCNTRL[7];
+	if (ThetaMin <= (KPP_REAL)0.0 || ThetaMin >= (KPP_REAL)1.0) {
+		printf("\n RCNTRL[7]=%f\n", RCNTRL[7]);
+		RK_ErrorMsg(-5, T, ZERO, IERR);
+	}
+   } /* end if */
+ /*~~~> NewtonTol: stopping criterion for Newton's method */
+   if (RCNTRL[8] == ZERO)
+	NewtonTol = (KPP_REAL)3.0e-02;
+   else {
+	NewtonTol = RCNTRL[8];
+  	if (NewtonTol <= Roundoff) {
+		printf("\n RCNTRL[8]=%f\n", RCNTRL[8]);
+		RK_ErrorMsg(-6, T, ZERO, IERR);
+	}
+   } /* end if */
+ /*~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const. */
+   if (RCNTRL[9] == ZERO) {
+	Qmin = ONE;
+   }
+   else {
+	Qmin = RCNTRL[9];
+   } /* end if */
+   if (RCNTRL[10] == ZERO) {
+	Qmax = (KPP_REAL)1.2;
+   }
+   else {
+	Qmax = RCNTRL[10];
+   } /* end if */
+   if (Qmin > ONE || Qmax < ONE) {
+	printf("\n RCNTRL[9]=%f\n", Qmin);
+	printf("\n RCNTRL[10]=%f\n", Qmax);
+	RK_ErrorMsg(-7, T, ZERO, IERR);
+   } /* end if */
+ /*~~~> Check if tolerances are reasonable */
+   if (ITOL == 0) {
+	if ( AbsTol[0] <= ZERO || RelTol[0] <= ( ((KPP_REAL)10.0)*Roundoff) ) {
+	   printf("\n AbsTol=%f\n", AbsTol[0]);
+	   printf("\n RelTol=%f\n", RelTol[0]);
+	   RK_ErrorMsg(-8, T, ZERO, IERR);
+	}
+   }
+   else {
+	for (i = 0; i < N; i++) {
+	   if ( (AbsTol[i] <= ZERO) || (RelTol[i] <= ((KPP_REAL)10.0)*Roundoff) ) {
+                printf("\n AbsTol[%d] = %f\n", i, AbsTol[i]);
+		printf("\n AbsTol[%d] = %f\n", i, RelTol[i]);
+		RK_ErrorMsg(-8, T, ZERO, IERR);
+	   } /* end if */
+	} /* end for */
+   } /* end if */
+
+ /*~~~> Parameters are wrong */
+   if (*IERR < 0)
+	return;
+
+ /*~~~> Call the core method */	
+   RK_Integrator(N, &T, Tend, Y, AbsTol, RelTol, ITOL, ISTATUS, RSTATUS,
+		   Hmin, Hmax, Hstart, Roundoff, Max_no_steps, NewtonMaxit,
+		   StartNewton, Gustafsson, ThetaMin, NewtonTol,
+		   FacSafe, FacMax, FacMin, FacRej, Qmin, Qmax, IERR);
+  /*printf("*IERR = %d\n", *IERR);*/
+  /*printf("Ending RungeKutta\n");*/
+} /* RungeKutta */
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_Integrator( int N, 
+	/*~~~> Input: integration interval */        
+     	KPP_REAL*  T, KPP_REAL  Tend, KPP_REAL Y[],
+     	KPP_REAL AbsTol[], KPP_REAL RelTol[], int ITOL,
+  /*~~~> Input: the initial condition at T; output: the solution at Tend */     
+     	int ISTATUS[], KPP_REAL RSTATUS[], KPP_REAL Hmin, KPP_REAL Hmax, 
+	KPP_REAL Hstart, KPP_REAL Roundoff, int Max_no_steps, int NewtonMaxit,
+       	int StartNewton, int Gustafsson, KPP_REAL ThetaMin,
+       	KPP_REAL NewtonTol, KPP_REAL FacSafe, KPP_REAL FacMax, KPP_REAL FacMin,
+     	KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int* IERR)
+{  
+   /*printf("Starting RK_Integrator\n");*/
+   KPP_REAL FJAC[LU_NONZERO],
+  	  E1[LU_NONZERO],
+	  E2R[LU_NONZERO],
+	  E2I[LU_NONZERO];
+   KPP_REAL Z1[NVAR],
+  	  Z2[NVAR],
+	  Z3[NVAR],
+	  Z4[NVAR],
+	  SCAL[NVAR],
+	  DZ1[NVAR],
+	  DZ2[NVAR],
+	  DZ3[NVAR],
+	  DZ4[NVAR],
+	  G[NVAR],
+	  TMP[NVAR],
+	  FO[NVAR];   
+   KPP_REAL CONT[NVAR][RKmax],
+  	  Tdirection,
+	  H,
+	  Hacc,
+	  Hnew,
+	  Hold,
+	  Fac,
+	  FacGus, 
+   	  Theta,
+	  Err,
+	  ErrOld,
+	  NewtonRate,
+	  NewtonIncrement,
+	  Hratio,
+	  Qnewton, 
+	  NewtonPredictedErr,
+	  NewtonIncrementOld,
+	  ThetaSD;
+   int IP1[NVAR],
+       IP2[NVAR],
+       NewtonIter,
+       Nconsecutive,
+       i;
+   int ISING;
+   int Reject,
+       FirstStep,
+       SkipJac,
+       NewtonDone,
+       SkipLU;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  /*~~~>  INITIAL setting */
+   /*printf("ONE=%f Tend-*T=%f\n", ONE, Tend-*T);*/
+   Tdirection = SIGN(ONE, Tend-*T);
+   /*printf("Tdirection=%f\n", Tdirection);*/
+   /*printf("Hmin=%g Hstart=%g \n", Hmin, Hstart);*/
+   /*printf("ABS(Hmin)=%g ABS(Hstart)=%g \n", ABS(Hmin), ABS(Hstart));*/
+   H = MIN( MAX(ABS(Hmin), ABS(Hstart)), Hmax ); 
+   if (ABS(H) <= ((KPP_REAL)10.0*Roundoff)) {
+	/*printf("Entering if ABS(H)=%g <= 10.0*Roundoff=%g\n", ABS(H),(KPP_REAL)10.0*Roundoff);*/
+        H = (KPP_REAL)(1.0e-06);
+   } /* end if */
+   H = SIGN(H, Tdirection);
+   Hold = H;
+   /*printf("Hold=%f\n", Hold);*/ 
+   Reject = 0;
+   FirstStep = 1;
+   SkipJac = 0;
+   SkipLU = 0;
+   if ((*T+H*((KPP_REAL)1.0001)-Tend)*Tdirection >= ZERO) {   
+	H = Tend - *T;
+   } /* end if */
+   Nconsecutive = 0;
+   RK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+   /*for(i=0; i<NVAR; i++) {
+        printf("AbsTol=%g RelTol=%g Y=%g SCAL=%g \n", AbsTol[i], RelTol[i], Y[i], SCAL[i] );
+   }*/
+   
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  /*~~~> Time loop begins */ 
+  /* while Tloop */
+Tloop:   while ( (Tend-*T)*Tdirection - Roundoff > ZERO ) {
+      /*printf("Starting Tloop: (Tend-*T)*Tdirection - Roundoff=%g > ZERO\n", (Tend-*T)*Tdirection-Roundoff);*/
+      /*if ( Reject == 0 ) { */
+	FUN_CHEM(*T,Y,FO);
+	ISTATUS[Nfun]++;
+      /* } * end if */ 
+      if ( SkipLU == 0 ) { /* This time around skip the Jac update and LU */
+	/*~~~> Compute the Jacobian matrix */
+	/*printf("Entering if SkipLU == 0\n");*/
+	if ( SkipJac == 0 ) {
+	   /*printf("Entering if SkipJac == 0\n");*/
+	   JAC_CHEM(*T,Y,FJAC);
+	   ISTATUS[Njac]++;
+	} /* end if */
+	/*~~~> Compute the matrices E1 and E2 and their decompositions */
+	RK_Decomp(N,H,FJAC,E1,IP1,E2R,E2I,IP2,&ISING,ISTATUS);
+	/*printf("ISING=%d\n", ISING);*/
+	if ( ISING != 0 ) {
+	   /*printf("Entering if ISING != 0\n");*/
+	   ISTATUS[Nsng]++;
+	   Nconsecutive++;
+	   if (Nconsecutive >= 5) {
+		RK_ErrorMsg(-12,*T,H,IERR);
+	   }
+	   H = H * ((KPP_REAL)0.5);
+	   Reject = 1;
+	   SkipJac = 1;
+	   SkipLU = 0;
+	   goto Tloop;
+	}
+	else {
+	   /*printf("Entering if ISING == 0\n");*/
+	   Nconsecutive = 0;
+	} /* end if */
+      } /* end if !SkipLU */
+
+      /*printf("NSTEPS=%d\n", ISTATUS[Nstp]);*/
+      ISTATUS[Nstp]++;
+      /*printf("NSTEPS=%d\n", ISTATUS[Nstp]);*/
+      if (ISTATUS[Nstp] > Max_no_steps) {
+	printf("\n Max number of time steps is = %d", Max_no_steps);
+	RK_ErrorMsg(-9,*T,H,IERR);
+      } /* end if */
+      if (((KPP_REAL)0.1)*ABS(H) <= ABS(*T)*Roundoff)
+	RK_ErrorMsg(-10,*T,H,IERR);
+ 
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~>  Loop for the simplified Newton iterations */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+      /*~~~> Starting values for Newton iteration */  
+      if ( (FirstStep == 1) || (StartNewton == 0) ) {
+	/*printf("Entering if FirstStep or Not StartNewton\n");*/
+	Set2Zero(N,Z1);
+	Set2Zero(N,Z2);
+	Set2Zero(N,Z3);
+      }
+      else
+      {
+    	/* Evaluate quadratic polynomial */
+   	RK_Interpolate("eval",N,H,Hold,Z1,Z2,Z3,CONT);
+      } /* end if */
+
+      /*~~~> Initializations for Newton iteration */
+      NewtonDone = 0;
+      Fac = (KPP_REAL)0.5; /* Step reduction if too many iterations */
+  
+      /* for NewtonLoop */
+      for (NewtonIter = 1; NewtonIter <= NewtonMaxit; NewtonIter++)
+      {
+	/*printf("Starting NewtonIter loop: NewtonIter=%d\n", NewtonIter);*/
+   	/* Prepare the right-hand side */
+      	RK_PrepareRHS(N,*T,H,Y,FO,Z1,Z2,Z3,DZ1,DZ2,DZ3);
+
+	/* Solve the linear systems */
+  	RK_Solve(N,H,E1,IP1,E2R,E2I,IP2,DZ1,DZ2,DZ3,ISTATUS);
+
+	NewtonIncrement = 
+		SQRT((RK_ErrorNorm(N,SCAL,DZ1) * RK_ErrorNorm(N,SCAL,DZ1)
+		    + RK_ErrorNorm(N,SCAL,DZ2) * RK_ErrorNorm(N,SCAL,DZ2) 
+		    + RK_ErrorNorm(N,SCAL,DZ3) * RK_ErrorNorm(N,SCAL,DZ3))
+	            / (KPP_REAL)3.0 );
+	/*printf( "NewtonIncrement=%g \n", NewtonIncrement );*/
+	if (NewtonIter == 1) {
+	   /*printf("Entering NewtonIter=%d == 1\n", NewtonIter);*/
+	   Theta = ABS(ThetaMin);
+	   NewtonRate = (KPP_REAL)2.0;
+	}
+	else {
+	   /*printf("Entering else from NewtonIter=%d == 1\n", NewtonIter);*/
+	   Theta = NewtonIncrement / NewtonIncrementOld;
+	   /*printf("Theta=%f\n", Theta);*/
+	   if (Theta < (KPP_REAL)0.99) {
+		/*printf( "Entering if Theta=%g < 0.99\n", Theta );*/
+		NewtonRate = Theta / (ONE-Theta);
+	   }
+	   else { /* Non-convergence of Newton: Theta too large */
+       	      break; /* EXIT NewtonLoop */
+	   } /* end if */
+	   if (NewtonIter < NewtonMaxit) {
+	      /*printf("Entering if NewtonIter=%d < NewtonMaxit=%d\n", NewtonIter, NewtonMaxit);*/
+	      /* Predict error at the end of Newton process */
+ 	      NewtonPredictedErr = NewtonIncrement
+                             *pow(Theta,(NewtonMaxit-NewtonIter))/(ONE-Theta);
+	      /*printf("NewtonRate=%g NewtonPredictedErr=%g \n", NewtonRate, NewtonPredictedErr);*/
+	      if (NewtonPredictedErr >= NewtonTol) {
+		/*printf( "Entering if NewtonPredictedErr=%g >= NewtonTol%g \n", NewtonPredictedErr, NewtonTol );*/
+	      	/* Non-convergence of Newton: predicted error too large */
+	        Qnewton = MIN((KPP_REAL)10.0, NewtonPredictedErr/NewtonTol);
+	        Fac = (KPP_REAL)0.8*pow(Qnewton,(-ONE/(1+NewtonMaxit-NewtonIter)));
+	        break; /* EXIT NewtonLoop */
+	      } /* end if */
+	   } /* end if */
+   	} /* end if */
+	    
+   	NewtonIncrementOld = MAX(NewtonIncrement, Roundoff);
+	/*printf("NewtonIncrementOld=%f\n", NewtonIncrementOld);*/
+  	/*~~~> Update solution */
+   	WAXPY(N,-ONE,DZ1,1,Z1,1);	/* Z1 <- Z1 - DZ1 */
+   	WAXPY(N,-ONE,DZ2,1,Z2,1);	/* Z2 <- Z2 - DZ2 */
+   	WAXPY(N,-ONE,DZ3,1,Z3,1);	/* Z3 <- Z3 - DZ3 */
+        /*for(i=0; i<N; i++) 
+	   printf("DZ1[%d]=%g Z1[%d]=%g\n", i, DZ1[i], i, Z1[i]);*/
+  	/*~~~> Check error in Newton iterations */
+	/*printf( "NewtonRate=%g NewtonIncrement=%g NewtonTol=%g \n", NewtonRate, NewtonIncrement, NewtonTol );*/
+	NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol);
+	/*printf( "NewtonDone=%d \n", NewtonDone );*/
+   	if (NewtonDone == 1)
+	   break; /* Exit NewtonLoop */
+   	if (NewtonIter == NewtonMaxit)
+   	{
+	   printf("\n Slow or no convergence in Newton Iteration:");
+	   printf(" Max no. of Newton iterations reached");
+   	} /* end if */
+      }/* end for NewtonLoop */
+
+      if ( NewtonDone == 0)
+      {
+	/*printf( "Entering if NewtonDone == 0\n" );*/
+	/*RK_ErrorMsg(-12,*T,H,IERR); */
+	H = Fac*H;
+	Reject  = 1;
+	SkipJac = 1;
+	SkipLU  = 0;
+	goto Tloop;
+      } /* end if */
+
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~> SDIRK Stage */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      if (SdirkError == 1)
+      {
+	/*printf("Entering if SdirkError=%d==1\n", SdirkError);*/
+      	/*~~~> Starting values for Newton iterations */
+   	for (i = 0; i < N; i++)
+	{
+	   Z4[i] = Z3[i];
+ 	}
+      	/*~~~> Prepare the loop-independent part of the right-hand side */
+      	/* G = H*rkBgam(0)*FO + rkTheta(1)*Z1 
+		+ rkTheta(2)*Z2 + rkTheta(3)*Z3; */
+      	Set2Zero(N,G);
+      	if (rkMethod != L3A)
+	   WAXPY(N,rkBgam[0]*H, FO,1,G,1);
+      	WAXPY(N,rkTheta[0],Z1,1,G,1);  
+      	WAXPY(N,rkTheta[1],Z2,1,G,1);  
+      	WAXPY(N,rkTheta[2],Z3,1,G,1);  
+
+      	/*~~~> Initializations for Newton iteration */
+      	NewtonDone = 0;
+      	Fac = (KPP_REAL)0.5; /* Step reduction factor if too many iterations */
+
+      	/* for SDNewtonLoop */
+      	for (NewtonIter = 1; NewtonIter <= NewtonMaxit; NewtonIter++)
+      	{
+	   /*printf("Starting NewtonIter loop: NewtonIter=%d\n", NewtonIter);*/
+	   /*~~~> Prepare the loop-dependent part of right-hand side */
+	   WADD(N,Y,Z4,TMP);	/* TMP <- Y + Z4 */
+	   FUN_CHEM(*T+H,TMP,DZ4);	/* DZ4 <- Fun(Y+Z4) */
+	   ISTATUS[Nfun]++;
+	   /* DZ4[1,N] = (D[1, N]-Z4[1,N])*(rkGamma/H) + DZ4[1,N]; */
+	   WAXPY(N,-ONE*rkGamma/H,Z4,1,DZ4,1);
+	   WAXPY(N,rkGamma/H,G,1,DZ4,1);
+
+	   /*~~~> Solve the linear system */
+	   KppSolve(E1, DZ4);
+	   /*~~~> Note: for a full matrix use Lapack:
+		DGETRS('N', 5, 1, E1, N, IP1, DZ4, 5, ISING) */
+
+	   /*~~~> Check convergence of Newton iterations */
+	   NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4);
+	   /*printf( "NewtonIncrement=%g \n", NewtonIncrement );*/
+	   if (NewtonIter == 1) {
+	      /*printf("Entering NewtonIter=%d == 1\n", NewtonIter);*/
+	      ThetaSD = ABS(ThetaMin);
+              NewtonRate = (KPP_REAL)2.0;
+	   }
+	   else {
+	      /*printf("Entering else from NewtonIter=%d == 1\n", NewtonIter);*/
+	      ThetaSD = NewtonIncrement / NewtonIncrementOld;
+	      if (ThetaSD < (KPP_REAL)0.99) {
+		/*printf( "Entering if Theta=%g < 0.99\n", Theta );*/
+		NewtonRate = ThetaSD / (ONE-ThetaSD);
+		/* Predict error at the end of Newton process */
+		NewtonPredictedErr = NewtonIncrement
+			*pow(ThetaSD,(NewtonMaxit-NewtonIter))/(ONE-ThetaSD);
+	        /*printf("NewtonRate=%g NewtonPredictedErr=%g \n", NewtonRate, NewtonPredictedErr);*/
+		if (NewtonPredictedErr >= NewtonTol) {
+		   /*printf( "Entering if NewtonPredictedErr=%g >= NewtonTol%g \n", NewtonPredictedErr, NewtonTol );*/
+		   /* Non-convergence of Newton: predicted error too large */
+		   /* printf("\n Error too large", NewtonPredictedErr); */
+		   Qnewton = MIN((KPP_REAL)10.0,NewtonPredictedErr/NewtonTol);
+		   Fac = (KPP_REAL)0.8*pow(Qnewton,(-ONE/(1+NewtonMaxit-NewtonIter)));
+		   break; /* EXIT SDNewtonLoop */
+		} /* end if */
+	      }
+	      /* Non-convergence of Newton: Theta too large */
+	      else {
+		/* prinf("\n Theta too large", ThetaSD); */
+		break; /* EXIT SDNewtonLoop */
+	      } /* end if */
+	   } /* end if */
+     	   NewtonIncrementOld = NewtonIncrement;
+	   /*printf("NewtonIncrementOld=%f\n", NewtonIncrementOld);*/
+	   /* Update solution: Z4 <-- Z4 + DZ4; */
+	   WAXPY(N,ONE,DZ4,1,Z4,1);
+
+	   /* Check error in Newton iterations */
+	   NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol);
+	   /*printf( "NewtonDone=%d \n", NewtonDone );*/
+	   if (NewtonDone == 1)
+		break;	/* EXIT SDNewtonLoop */
+      	} /* end for SDNewtonLoop */
+      
+      	if ( NewtonDone == 0 ) {
+	   /*printf( "Entering if NewtonDone == 0\n" );*/
+	   H       = Fac*H;
+	   Reject  = 1;
+	   SkipJac = 1;
+	   SkipLU  = 0;
+	   goto Tloop;
+      	} /* end if */
+      } /* end if */
+      /*~~~> End of implified SDIRK Newton iterations */
+
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~> Error estimation */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      if (SdirkError == 1) {
+      	Set2Zero(N, DZ4);
+      	if (rkMethod == L3A) {
+	   for (i = 0; i < N; i++)
+		DZ4[i] = H*rkF[0]*FO[i];
+	   if (rkF[0] != ZERO)
+		WAXPY(N, rkF[0], Z1, 1, DZ4, 1);
+	   if (rkF[1] != ZERO)
+		WAXPY(N, rkF[1], Z2, 1, DZ4, 1);
+	   if (rkF[2] != ZERO)
+		WAXPY(N, rkF[2], Z3, 1, DZ4, 1);
+	   for (i = 0; i < N; i++)
+		 TMP[i] = Y[i] + Z4[i];
+	   FUN_CHEM(*T+H, TMP, DZ1);
+	   WAXPY(N, H*rkBgam[4], DZ1, 1, DZ4, 1);
+      	}
+      	else {
+	   /* DZ4(1,N) = rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4; */
+	   if (rkD[0] != ZERO)
+		WAXPY(N, rkD[0], Z1, 1, DZ4, 1);
+	   if (rkD[1] != ZERO)
+		WAXPY(N, rkD[1], Z2, 1, DZ4, 1);
+	   if (rkD[2] != ZERO)
+		WAXPY(N, rkD[2], Z3, 1, DZ4, 1);
+	   WAXPY(N, -ONE, Z4, 1, DZ4, 1);
+      	} /* end if */
+      	Err = RK_ErrorNorm(N,SCAL,DZ4);
+      }
+      else
+      {
+      	RK_ErrorEstimate(N,H,*T,Y,FO,E1,IP1,Z1,Z2,Z3,SCAL,&Err,
+			FirstStep,Reject,ISTATUS);
+      } /* end if */
+
+      /*~~~> Computation of new step size Hnew */
+      Fac = pow(Err, (-ONE/rkELO))
+	    *MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit));
+      Fac = MIN(FacMax,MAX(FacMin,Fac));
+      Hnew = Fac*H;
+
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+ /*~~~> Accept/reject step */
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      // accept:
+      if (Err < ONE) { /*~~~> STEP IS ACCEPTED */
+      	FirstStep = 0;
+      	ISTATUS[Nacc]++;
+      	if (Gustafsson == 1) {
+	   /*~~~> Predictive controller of Gustafsson */
+	   if (ISTATUS[Nacc] > 1) {
+	      FacGus = FacSafe*(H/Hacc)*pow(Err*Err/ErrOld,(KPP_REAL)(-0.25));
+	      FacGus = MIN(FacMax,MAX(FacMin,FacGus));
+	      Fac = MIN(Fac,FacGus);	
+	      Hnew = Fac*H;
+	   } /* end if */
+	   Hacc = H;
+	   ErrOld = MAX((KPP_REAL)1.0e-02,Err);
+      	} /* end if */
+        Hold = H;
+      	*T = *T + H;
+      	/* Update solution: Y <- Y + sum(d_i Z-i) */
+      	if (rkD[0] != ZERO)
+	   WAXPY(N, rkD[0], Z1, 1, Y, 1);
+      	if (rkD[1] != ZERO)
+	   WAXPY(N, rkD[1], Z2, 1, Y, 1);
+      	if (rkD[2] != ZERO)
+	   WAXPY(N, rkD[2], Z3, 1, Y, 1);
+      	/* Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3 */
+      	if (StartNewton == 1)
+	   RK_Interpolate("make",N,H,Hold,Z1,Z2,Z3,CONT);
+      	RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL);
+	RSTATUS[Ntexit] = *T;
+	RSTATUS[Nhnew] = Hnew;
+	RSTATUS[Nhacc] = H;
+      	Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin), Hmax );
+      	if (Reject == 1)
+	   Hnew = Tdirection*MIN(ABS(Hnew),ABS(H));
+      	Reject = 0;
+      	if ((*T+Hnew/Qmin-Tend)*Tdirection >= ZERO)
+	   H = Tend - *T;
+      	else {
+	   Hratio = Hnew/H;
+	   /* Reuse the LU decomposition */
+	   SkipLU = (Theta <= ThetaMin) && (Hratio >= Qmin) && (Hratio <= Qmax);
+	   if ( SkipLU == 0)
+	   	H = Hnew;
+        } /* end if */
+        /* If convergence is fast enough, do not update Jacobian */
+      	/* SkipJac = (Theta <= ThetaMin); */
+      	SkipJac = 0;
+      }
+
+      /*~~~> Step is rejected */
+      else {
+      	if ((FirstStep == 1)  || (Reject == 1))
+	   H = FacRej*H;
+        else
+	   H = Hnew;
+        Reject  = 1;
+        SkipJac = 1; /* Skip if rejected - Jac is independent of H */
+        SkipLU  = 0;
+      	if (ISTATUS[Nacc] >= 1)
+	   ISTATUS[Nrej]++;
+      } /* end if accept */
+   } /* while: time Tloop */
+ 
+   /*~~~> Successful exit */
+   *IERR = 1;
+
+} /* RK_Integrator */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	Handles all error messages and returns IERR = error Code
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_ErrorMsg(int Code, KPP_REAL T, KPP_REAL H, int* IERR)
+{
+   Code = *IERR;
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
+   printf("\nForced exit from RungeKutta due to the following error:\n");
+
+   switch (Code) {
+   case -1:
+      printf("--> Improper value for maximal no of steps");
+      break;
+   case -2:
+      printf("--> Improper value for maximal no of Newton iterations");
+      break;
+   case -3:
+      printf("--> Hmin/Hmax/Hstart must be positive");
+      break;
+   case -4:
+      printf("--> Improper values for FacMin/FacMax/FacSafe/FacRej");
+      break;
+   case -5:
+      printf("--> Improper value for ThetaMin");
+      break;
+   case -6:
+      printf("--> Newton stopping tolerance too small");
+      break;
+   case -7:
+      printf("--> Improper values for Qmin, Qmax");
+      break;
+   case -8:
+      printf("--> Tolerances are too small");
+      break;
+   case -9:
+      printf("--> No of steps exceeds maximum bound");
+      break;
+   case -10:
+      printf("--> Step size too small: (T + 10*H = T) or H < Roundoff");
+      break;
+   case -11:
+      printf("--> Matrix is repeatedly singular");
+      break;
+   case -12:
+      printf("--> Non-convergence of Newton iterations");
+      break;
+   case -13:
+      printf("--> Requested RK method not implemented");
+      break;
+   default:
+      printf("Unknown Error code: %d \n", Code);
+   } /* end switch */ 
+
+   printf("\n     T=%e,  H =%e", T, H);
+   printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
+
+} /* RK_ErrorMsg */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*	Handles all error messages and returns SCAL */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_ErrorScale(int N, 
+   /*~~~> Input arguments: */
+	int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[], KPP_REAL Y[],
+   /*~~~> Output arguments: */
+	KPP_REAL SCAL[])
+{
+   /*printf("Starting RK_ErrorScale\n");*/
+   int i;
+   if (ITOL == 0) {
+	for (i = 0; i < N; i++) {
+	   SCAL[i] = ONE/(AbsTol[0]+RelTol[0]*ABS(Y[i]));
+	} /* end for loop*/
+   }
+   else {
+	for (i = 0; i< N; i++) {
+	   SCAL[i] = ONE/(AbsTol[i]+RelTol[i]*ABS(Y[i]));
+	} /* end for loop */
+   } /* end if */
+   /*printf("Ending RK_ErrorScale\n");*/
+} /* RK_ErrorScale */  
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+void RK_Transform(int N, KPP_REAL Tr[][3], KPP_REAL Z1[], KPP_REAL Z2[],
+		KPP_REAL Z3[], KPP_REAL W1[], KPP_REAL W2[], KPP_REAL W3[])
+-->	W <-- Tr x Z 
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+{
+   int i;
+   KPP_REAL x1,x2,x3;
+   for (i = 0; i < N; i++)
+   {
+	x1 = Z1[i];
+	x2 = Z2[i]; 
+	x3 = Z3[i]; 
+	W1[i] = Tr[0][0]*x1 + Tr[0][1]*x2 + Tr[0][2]*x3;
+	W2[i] = Tr[1][0]*x1 + Tr[1][1]*x2 + Tr[1][2]*x3;
+	W1[i] = Tr[2][0]*x1 + Tr[2][1]*x2 + Tr[2][2]*x3;
+   }  end for loop
+}  end RK_Transform */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*--> Constructs or evaluates a quadratic polynomial that
+      interpolates the Z solution at current step and
+      provides starting values for the next step
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_Interpolate(char action[], int N, KPP_REAL H, KPP_REAL Hold, KPP_REAL Z1[],
+	KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL CONT[][RKmax])
+{
+   int i;
+   KPP_REAL r,x1,x2,x3,den;
+ 
+   /* Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3 */
+   if (action == "make") {
+	den = (rkC[2]-rkC[1])*(rkC[1]-rkC[0])*(rkC[0]-rkC[2]);
+	for (i = 0; i < N; i++)
+	{
+	   CONT[i][0] = (-rkC[2]*rkC[2]*rkC[1]*Z1[i]
+			+Z3[i]*rkC[1]*rkC[0]*rkC[0]
+	   		+rkC[1]*rkC[1]*rkC[2]*Z1[i]
+	   		-rkC[1]*rkC[1]*rkC[0]*Z3[i]
+	   		+rkC[2]*rkC[2]*rkC[0]*Z2[i]
+	   		-Z2[i]*rkC[2]*rkC[0]*rkC[0])/den-Z3[i];
+	   CONT[i][1] = -( rkC[0]*rkC[0]*(Z3[i]-Z2[i])
+	   		+ rkC[1]*rkC[1]*(Z1[i]-Z3[i])
+	   		+ rkC[2]*rkC[2]*(Z2[i]-Z1[i]) )/den;
+	   CONT[i][2] = ( rkC[0]*(Z3[i]-Z2[i])
+	   		+ rkC[1]*(Z1[i]-Z3[i])
+	   		+ rkC[2]*(Z2[i]-Z1[i]) )/den;
+	} /* end for loop */
+   }
+   /* Evaluate quadratic polynomial */
+   else if (action == "eval") {
+   	r  = H / Hold;
+	x1 = ONE + rkC[0]*r;
+	x2 = ONE + rkC[1]*r;
+	x3 = ONE + rkC[2]*r;
+	for (i = 0; i < N; i++)
+	{
+	   Z1[i] = CONT[i][0]+x1*(CONT[i][1]+x1*CONT[i][2]);	
+	   Z2[i] = CONT[i][0]+x2*(CONT[i][1]+x2*CONT[i][2]);	
+	   Z3[i] = CONT[i][0]+x3*(CONT[i][1]+x3*CONT[i][2]);
+	} /* end for loop */
+   } /* end if */
+} /* RK_Interpolate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~> Prepare the right-hand side for Newton iterations
+       R = Z - hA x F
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_PrepareRHS(int N, KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL FO[],
+	KPP_REAL Z1[], KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL R1[], KPP_REAL R2[],
+	KPP_REAL R3[])
+{
+   KPP_REAL TMP[N], F[N];
+   WCOPY(N,Z1,1,R1,1); /* R1 <- Z1 */	
+   WCOPY(N,Z2,1,R2,1); /* R2 <- Z2 */	
+   WCOPY(N,Z3,1,R3,1); /* R3 <- Z3 */	
+ 
+   if (rkMethod == L3A)
+   {
+	WAXPY(N,-H*rkA[0][0],FO,1,R1,1); /* R1 <- R1 - h*A_10*FO */
+	WAXPY(N,-H*rkA[1][0],FO,1,R2,1); /* R2 <- R2 - h*A_20*FO */
+	WAXPY(N,-H*rkA[2][0],FO,1,R3,1); /* R3 <- R3 - h*A_30*FO */
+   } /* end if */
+
+   WADD(N,Y,Z1,TMP);			/* TMP <- Y + Z1 */
+   FUN_CHEM(T+rkC[0]*H,TMP,F);		/* F1 <- Fun(Y+Z1) */
+   WAXPY(N,-H*rkA[0][0],F,1,R1,1); 	/* R1 <- R1 - h*A_11*F1 */
+   WAXPY(N,-H*rkA[1][0],F,1,R2,1); 	/* R2 <- R2 - h*A_21*F1 */
+   WAXPY(N,-H*rkA[2][0],F,1,R3,1); 	/* R3 <- R3 - h*A_31*F1 */
+
+   WADD(N,Y,Z2,TMP);			/* TMP <- Y + Z2 */
+   FUN_CHEM(T+rkC[1]*H,TMP,F);		/* F2 <- Fun(Y+Z2) */
+   WAXPY(N,-H*rkA[0][1],F,1,R1,1); 	/* R1 <- R1 - h*A_12*F2 */
+   WAXPY(N,-H*rkA[1][1],F,1,R2,1); 	/* R2 <- R2 - h*A_22*F2 */
+   WAXPY(N,-H*rkA[2][1],F,1,R3,1); 	/* R3 <- R3 - h*A_32*F2 */
+
+   WADD(N,Y,Z3,TMP);			/* TMP <- Y + Z3 */
+   FUN_CHEM(T+rkC[2]*H,TMP,F);		/* F3 <- Fun(Y+Z3) */
+   WAXPY(N,-H*rkA[0][2],F,1,R1,1); 	/* R1 <- R1 - h*A_13*F3 */
+   WAXPY(N,-H*rkA[1][2],F,1,R2,1); 	/* R2 <- R2 - h*A_23*F3 */
+   WAXPY(N,-H*rkA[2][2],F,1,R3,1); 	/* R3 <- R3 - h*A_33*F3 */
+} /* RK_PrepareRHS */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~> Compute the matrices E1 and E2 and their decompositions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_Decomp(int N, KPP_REAL H, KPP_REAL FJAC[], KPP_REAL E1[],
+	int IP1[], KPP_REAL E2R[], KPP_REAL E2I[], int IP2[], 
+	int* ISING, int ISTATUS[]) 
+{
+   /*printf("Starting RK_Decomp\n");*/
+   KPP_REAL Alpha, Beta, Gamma;
+   int i,j;
+
+   Gamma = rkGamma / H;
+   Alpha = rkAlpha / H;
+   Beta  = rkBeta / H;
+
+   for (i = 0; i < LU_NONZERO; i++) {
+	E1[i] = -FJAC[i];
+   }
+   for (i = 0; i < NVAR; i++) {
+	j = LU_DIAG[i];
+	E1[j] = E1[j] + Gamma;
+   }
+   *ISING = KppDecomp(E1);
+   /*~~~> Note: for a full matrix use Lapack:
+   for (j = 0; j < N; j++) {
+	for (i = 0; i < N; i++)
+	{  
+	   E1[i,j] = -FJAC[i][j];
+	}
+	E1[i][j] = E1[i][j]+Gamma;
+   }
+   DGETRF(N, N, E1, N, IP1, ISING); */
+
+   if (*ISING != 0) {
+	/*printf("Matrix is singular, ISING=%d\n", *ISING);*/
+	ISTATUS[Ndec]++;
+	return;
+   }
+
+   for (i = 0; i < LU_NONZERO; i++) {
+	E2R[i] = (KPP_REAL)(-FJAC[i]);
+	E2I[i] = ZERO;
+   }
+   for (i = 0; i < NVAR; i++) {
+	j = LU_DIAG[i];
+	E2R[j] = E2R[j] + Alpha;
+	E2I[j] = E2I[j] + Beta;
+   }
+   *ISING = KppDecompCmplxR(E2R, E2I);
+   /*printf("Matrix is singular, ISING=%d\n", *ISING);*/
+   /*~~~> Note: for a full matrix use Lapack:
+   for (j = 0; j < N; j++) {
+      	for (i = 0; i < N; i++) {
+	   E2[i,j] = DCMPLX( -FJAC[i,j], ZERO );
+	}
+	E2[j,j] = E2[j,j] + CMPLX( Alpha, Beta );
+   }
+   ZGETRF(N,N,E2,N,IP2,ISING); */
+   ISTATUS[Ndec]++;
+} /*RK_Decomp */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 
+void RK_Solve(int N, KPP_REAL H, KPP_REAL E1[], int IP1[], KPP_REAL E2R[],
+	KPP_REAL E2I[], int IP2[],KPP_REAL R1[], KPP_REAL R2[], KPP_REAL R3[],
+	int ISTATUS[])
+{
+   KPP_REAL x1, x2, x3;
+   KPP_REAL BCR[N], BCI[N];
+   int i;
+
+   /* Z <- h^{-1) T^{-1) A^{-1) x Z */
+   for (i = 0; i < N; i++)
+   {
+	x1 = R1[i]/H;
+	x2 = R2[i]/H;
+	x3 = R3[i]/H;
+        R1[i] = rkTinvAinv[0][0]*x1 + rkTinvAinv[0][1]*x2 + rkTinvAinv[0][2]*x3;
+	R2[i] = rkTinvAinv[1][0]*x1 + rkTinvAinv[1][1]*x2 + rkTinvAinv[1][2]*x3;
+	R3[i] = rkTinvAinv[2][0]*x1 + rkTinvAinv[2][1]*x2 + rkTinvAinv[2][2]*x3;
+   } 
+   KppSolve(E1,R1);
+   /*~~~> Note: for a full matrix use Lapack:
+   DGETRS('N',5,1,E1,N,IP1,R1,5,0); */
+   for(i = 0; i < N; i++)
+   {
+        BCR[i] = (KPP_REAL)(R2[i]);
+        BCI[i] = (KPP_REAL)(R3[i]);
+   }
+   KppSolveCmplxR(E2R,E2I,BCR,BCI);
+   /*~~~> Note: for a full matrix use Lapack:
+   ZGETRS ('N',N,1,E2,N,IP2,BC,N,0); */
+   for (i = 0; i < N; i++)
+   {
+	R2[i] = (KPP_REAL)( BCR[i] );
+        R3[i] = (KPP_REAL)( BCI[i] );
+   }
+
+   /* Z <- T x Z */
+   for (i = 0; i < N; i++)
+   {
+	x1 = R1[i];
+	x2 = R2[i];
+	x3 = R3[i];
+        R1[i] = rkT[0][0]*x1 + rkT[0][1]*x2 + rkT[0][2]*x3;
+	R2[i] = rkT[1][0]*x1 + rkT[1][1]*x2 + rkT[1][2]*x3;
+	R3[i] = rkT[2][0]*x1 + rkT[2][1]*x2 + rkT[2][2]*x3;
+   } 
+   ISTATUS[Nsol]++;
+} /* RK_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void RK_ErrorEstimate(int N, KPP_REAL H, KPP_REAL T, KPP_REAL Y[], 
+	KPP_REAL FO[], KPP_REAL E1[], int IP1[], KPP_REAL Z1[], 
+	KPP_REAL Z2[], KPP_REAL Z3[], KPP_REAL SCAL[], KPP_REAL* Err,
+	int FirstStep, int Reject, int ISTATUS[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   KPP_REAL F1[N],F2[N],TMP[N];
+   KPP_REAL HrkE1,HrkE2,HrkE3;
+   int i;
+
+   HrkE1  = rkE[0]/H;
+   HrkE2  = rkE[1]/H;
+   HrkE3  = rkE[2]/H;
+
+   for (i = 0; i < N; i++)
+   {
+	F2[i]  = HrkE1*Z1[i]+HrkE2*Z2[i]+HrkE3*Z3[i];
+	TMP[i] = rkE[0]*FO[i] + F2[i];
+   }
+   
+   KppSolve(E1, TMP);
+   if ((rkMethod == R1A) || (rkMethod == GAU) || (rkMethod == L3A))
+	KppSolve(E1,TMP);
+   if (rkMethod == GAU)
+	KppSolve(E1,TMP);
+   /*~~~> Note: for a full matrix use Lapack:
+	DGETRS ('N',N,1,E1,N,IP1,TMP,N,0);
+      	if ((rkMethod == R1A) || (rkMethod == GAU) || (rkMethod == L3A))
+	   DGETRS('N',N,1,E1,N,IP1,TMP,N,0);
+   	if (rkMethod == GAU)
+	   DGETRS('N',N,1,E1,N,IP1,TMP,N,0); */
+
+   *Err = RK_ErrorNorm(N,SCAL,TMP);
+
+   if (*Err < ONE)
+	return;
+   /* firej */
+   if ((FirstStep == 1) || (Reject == 1)) {
+	for (i = 0; i < N; i++) {
+	   TMP[i] = Y[i] + TMP[i];
+        } /* end for */
+        FUN_CHEM(T,TMP,F1);
+        ISTATUS[Nfun]++;
+	for (i = 0; i < N; i++) {
+	   TMP[i] = F1[i] + F2[i];
+	} /* end for */
+
+        KppSolve(E1, TMP);
+	/*~~~> Note: for a full matrix use Lapack:
+	   DGETRS ('N',N,1,E1,N,IP1,TMP,N,0); */
+        *Err = RK_ErrorNorm(N,SCAL,TMP);
+   } /* end if firej */
+} /* RK_ErrorEstimate */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   KPP_REAL RK_ErrorNorm(int N, KPP_REAL SCAL[], KPP_REAL DY[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+   int i;
+   KPP_REAL RK_ErrorNorm = ZERO;
+   for (i = 0; i < N; i++) {
+	RK_ErrorNorm = RK_ErrorNorm + (DY[i]*SCAL[i]) * (DY[i]*SCAL[i]);
+   }    
+   RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), (KPP_REAL)1.0e-10 );
+   return RK_ErrorNorm;
+} /* RK_ErrorNorm */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Radau-2A method
+	(given to ~30 accurate digits)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Radau2A_Coefficients()
+{
+   /*printf("Starting Radau2A\n");*/
+   /* The coefficients of the Radau2A method */
+   KPP_REAL b0;
+   /* b0 = (KPP_REAL)1.0; */
+   if (SdirkError == 1) {
+   	b0 = (KPP_REAL)(0.2e-01);
+	/*printf("b0 = %f\n", b0);*/
+   }
+   else {
+	b0 = (KPP_REAL)(0.5e-01);
+	/*printf("b0 = %f\n", b0);*/
+   } /*end if */
+   /* The coefficients of the Radau2A method */
+   rkMethod = R2A;
+
+   rkA[0][0] = (KPP_REAL)(1.968154772236604258683861429918299e-01);
+   rkA[0][1] = (KPP_REAL)(-6.55354258501983881085227825696087e-02);
+   rkA[0][2] = (KPP_REAL)(2.377097434822015242040823210718965e-02);
+   rkA[1][0] = (KPP_REAL)(3.944243147390872769974116714584975e-01);
+   rkA[1][1] = (KPP_REAL)(2.920734116652284630205027458970589e-01);
+   rkA[1][2] = (KPP_REAL)(-4.154875212599793019818600988496743e-02);
+   rkA[2][0] = (KPP_REAL)(3.764030627004672750500754423692808e-01);
+   rkA[2][1] = (KPP_REAL)(5.124858261884216138388134465196080e-01);
+   rkA[2][2] = (KPP_REAL)(1.111111111111111111111111111111111e-01);
+
+   rkB[0] = (KPP_REAL)(3.764030627004672750500754423692808e-01);
+   rkB[1] = (KPP_REAL)(5.124858261884216138388134465196080e-01);
+   rkB[2] = (KPP_REAL)(1111111111111111111111111111111111e-01);
+
+   rkC[0] = (KPP_REAL)(1.550510257216821901802715925294109e-01);
+   rkC[1] = (KPP_REAL)(6.449489742783178098197284074705891e-01);
+   rkC[2] = ONE;
+
+   /* New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD[0] = ZERO;
+   rkD[1] = ZERO;
+   rkD[2] = ONE;
+   
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE[0] = ONE*b0;
+   rkE[1] = (KPP_REAL)(-10.04880939982741556246032950764708)*b0;
+   rkE[2] = (KPP_REAL)1.382142733160748895793662840980412*b0;
+   rkE[3] = (KPP_REAL)(-.3333333333333333333333333333333333)*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = b0;
+   rkBgam[1] = (KPP_REAL).3764030627004672750500754423692807
+		-(KPP_REAL)1.558078204724922382431975370686279*b0;
+   rkBgam[2] = (KPP_REAL).8914115380582557157653087040196118*b0
+		+(KPP_REAL).5124858261884216138388134465196077;
+   rkBgam[3] = (KPP_REAL)(-.1637777184845662566367174924883037)
+		-(KPP_REAL).3333333333333333333333333333333333*b0;
+   rkBgam[4] = (KPP_REAL).2748888295956773677478286035994148;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)(-1.520677486405081647234271944611547)
+		-(KPP_REAL)10.04880939982741556246032950764708*b0;
+   rkTheta[1] = (KPP_REAL)2.070455145596436382729929151810376
+		+(KPP_REAL)1.382142733160748895793662840980413*b0;
+   rkTheta[2] = (KPP_REAL)(-.3333333333333333333333333333333333)*b0
+		-(KPP_REAL).3744441479783868387391430179970741;
+
+   /* Local order of error estimator */
+   if ( b0 == ZERO)
+   	rkELO  = (KPP_REAL)6.0;
+   else
+        rkELO  = (KPP_REAL)4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    ~~~> Diagonalize the RK matrix:
+    	 rkTinv * inv(rkA) * rkT =
+    	           |  rkGamma      0           0     |
+      	           |      0      rkAlpha   -rkBeta   |
+      	           |      0      rkBeta     rkAlpha  |
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAlpha = (KPP_REAL)2.681082873627752133895790743211112;
+   rkBeta  = (KPP_REAL)3.050430199247410569426377624787569;
+
+   rkT[0][0] = (KPP_REAL)(9.443876248897524148749007950641664e-02);
+   rkT[0][1] = (KPP_REAL)(-1.412552950209542084279903838077973e-01);
+   rkT[0][2] = (KPP_REAL)(-3.00291941051474244918611170890539e-02);
+   rkT[1][0] = (KPP_REAL)(2.502131229653333113765090675125018e-01);
+   rkT[1][1] = (KPP_REAL)(2.041293522937999319959908102983381e-01);
+   rkT[1][2] = (KPP_REAL)(3.829421127572619377954382335998733e-01);
+   rkT[2][0] =  ONE;
+   rkT[2][1] =  ONE;
+   rkT[2][2] =  ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)4.178718591551904727346462658512057;
+   rkTinv[0][1] = (KPP_REAL)(3.27682820761062387082533272429617e-01);
+   rkTinv[0][2] = (KPP_REAL)(5.233764454994495480399309159089876e-01);
+   rkTinv[1][0] = (KPP_REAL)(-4.178718591551904727346462658512057);
+   rkTinv[1][1] = (KPP_REAL)(-3.27682820761062387082533272429617e-01);
+   rkTinv[1][2] = (KPP_REAL)(4.766235545005504519600690840910124e-01);
+   rkTinv[2][0] = (KPP_REAL)(-5.02872634945786875951247343139544e-01);
+   rkTinv[2][1] = (KPP_REAL)2.571926949855605429186785353601676;
+   rkTinv[2][2] = (KPP_REAL)(-5.960392048282249249688219110993024e-01);
+
+   rkTinvAinv[0][0] = (KPP_REAL)(1.520148562492775501049204957366528e+01);
+   rkTinvAinv[0][1] = (KPP_REAL)1.192055789400527921212348994770778;
+   rkTinvAinv[0][2] = (KPP_REAL)1.903956760517560343018332287285119;
+   rkTinvAinv[1][0] = (KPP_REAL)(-9.669512977505946748632625374449567);
+   rkTinvAinv[1][1] = (KPP_REAL)(-8.724028436822336183071773193986487);
+   rkTinvAinv[1][2] = (KPP_REAL)3.096043239482439656981667712714881;
+   rkTinvAinv[2][0] = (KPP_REAL)(-1.409513259499574544876303981551774e+01);
+   rkTinvAinv[2][1] = (KPP_REAL)5.895975725255405108079130152868952;
+   rkTinvAinv[2][2] = (KPP_REAL)(-1.441236197545344702389881889085515e-01);
+
+   rkAinvT[0][0] = (KPP_REAL).3435525649691961614912493915818282;
+   rkAinvT[0][1] = (KPP_REAL)(-.4703191128473198422370558694426832);
+   rkAinvT[0][2] = (KPP_REAL).3503786597113668965366406634269080;
+   rkAinvT[1][0] = (KPP_REAL).9102338692094599309122768354288852;
+   rkAinvT[1][1] = (KPP_REAL)1.715425895757991796035292755937326;
+   rkAinvT[1][2] = (KPP_REAL).4040171993145015239277111187301784;
+   rkAinvT[2][0] = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAinvT[2][1] = (KPP_REAL)2.681082873627752133895790743211112;
+   rkAinvT[2][2] = (KPP_REAL)(-3.050430199247410569426377624787569);
+   /*printf("Ending Radau2A");*/
+} /* Radau2A_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Lobatto-3C method
+	(given to ~30 accurate digits)
+	The parameter b0 can be chosen to tune the error estimator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Lobatto3C_Coefficients ()
+{
+   KPP_REAL b0;	
+   rkMethod = L3C;
+   /* b0 = 1.0d0 */
+   if (SdirkError == 1)
+	b0 = (KPP_REAL)0.2;
+   else
+	b0 = (KPP_REAL)0.5;
+    
+   /* The coefficients of the Lobatto3C method */
+   rkA[0][0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[0][1] = (KPP_REAL)(-.3333333333333333333333333333333333);
+   rkA[0][2] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[1][0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[1][1] = (KPP_REAL).4166666666666666666666666666666667;
+   rkA[1][2] = (KPP_REAL)(-.8333333333333333333333333333333333e-01);
+   rkA[2][0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkA[2][1] = (KPP_REAL).6666666666666666666666666666666667;
+   rkA[2][2] = (KPP_REAL).1666666666666666666666666666666667;
+
+   rkB[0] = (KPP_REAL).1666666666666666666666666666666667;
+   rkB[1] = (KPP_REAL).6666666666666666666666666666666667;
+   rkB[2] = (KPP_REAL).1666666666666666666666666666666667;
+
+   rkC[0] = ZERO;
+   rkC[1] = (KPP_REAL)0.5;
+   rkC[2] = ONE;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = b0;
+   rkBhat[1] = (KPP_REAL).16666666666666666666666666666666667-b0;
+   rkBhat[2] = (KPP_REAL).66666666666666666666666666666666667;
+   rkBhat[3] = (KPP_REAL).16666666666666666666666666666666667;
+
+   /* New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j */
+   rkD[0] = ZERO;
+   rkD[1] = ZERO;
+   rkD[2] = ONE;
+
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE[0] = (KPP_REAL).3808338772072650364017425226487022*b0;
+   rkE[1] = (KPP_REAL)(-1.142501631621795109205227567946107)*b0;
+   rkE[2] = (KPP_REAL)(-1.523335508829060145606970090594809)*b0;
+   rkE[3] = (KPP_REAL).3808338772072650364017425226487022*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = b0;
+   rkBgam[1] = (KPP_REAL).1666666666666666666666666666666667-1.0*b0;
+   rkBgam[2] = (KPP_REAL).6666666666666666666666666666666667;
+   rkBgam[3] = (KPP_REAL)(-.2141672105405983697350758559820354);
+   rkBgam[4] = (KPP_REAL).3808338772072650364017425226487021;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = -3.0*b0-(KPP_REAL).3808338772072650364017425226487021;
+   rkTheta[1] = -4.0*b0+(KPP_REAL)1.523335508829060145606970090594808;
+   rkTheta[2] = (KPP_REAL)(-.142501631621795109205227567946106)+b0;
+
+   /* Local order of error estimator */
+   if (b0 == ZERO)
+	rkELO  = 5.0;
+   else
+	rkELO  = 4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)2.625816818958466716011888933765284;
+   rkAlpha = (KPP_REAL)1.687091590520766641994055533117359;
+   rkBeta  = (KPP_REAL)2.508731754924880510838743672432351;
+
+   rkT[0][1] = ONE;
+   rkT[0][1] = ONE;
+   rkT[0][2] = ZERO;
+   rkT[1][0] = (KPP_REAL).4554100411010284672111720348287483;
+   rkT[1][1] = (KPP_REAL)(-.6027050205505142336055860174143743);
+   rkT[1][2] = (KPP_REAL)(-.4309321229203225731070721341350346);
+   rkT[2][0] = (KPP_REAL)2.195823345445647152832799205549709;
+   rkT[2][1] = (KPP_REAL)(-1.097911672722823576416399602774855);
+   rkT[2][2] = (KPP_REAL).7850032632435902184104551358922130;
+
+   rkTinv[0][0] = (KPP_REAL).4205559181381766909344950150991349;
+   rkTinv[0][1] = (KPP_REAL).3488903392193734304046467270632057;
+   rkTinv[0][2] = (KPP_REAL).1915253879645878102698098373933487;
+   rkTinv[1][0] = (KPP_REAL).5794440818618233090655049849008650;
+   rkTinv[1][1] = (KPP_REAL)(-.3488903392193734304046467270632057);
+   rkTinv[1][2] = (KPP_REAL)(-.1915253879645878102698098373933487);
+   rkTinv[2][0] = (KPP_REAL)(-.3659705575742745254721332009249516);
+   rkTinv[2][1] = (KPP_REAL)(-1.463882230297098101888532803699806);
+   rkTinv[2][2] = (KPP_REAL).4702733607340189781407813565524989;
+
+   rkTinvAinv[0][0] = (KPP_REAL)1.104302803159744452668648155627548;
+   rkTinvAinv[0][1] = (KPP_REAL).916122120694355522658740710823143;
+   rkTinvAinv[0][2] = (KPP_REAL).5029105849749601702795812241441172;
+   rkTinvAinv[1][0] = (KPP_REAL)1.895697196840255547331351844372453;
+   rkTinvAinv[1][1] = (KPP_REAL)3.083877879305644477341259289176857;
+   rkTinvAinv[1][2] = (KPP_REAL)(-1.502910584974960170279581224144117);
+   rkTinvAinv[2][0] = (KPP_REAL).8362439183082935036129145574774502;
+   rkTinvAinv[2][1] = (KPP_REAL)(-3.344975673233174014451658229909802);
+   rkTinvAinv[2][2] = (KPP_REAL).312908409479233358005944466882642;
+
+   rkAinvT[0][0] = (KPP_REAL)2.625816818958466716011888933765282;
+   rkAinvT[0][1] = (KPP_REAL)1.687091590520766641994055533117358;
+   rkAinvT[0][2] = (KPP_REAL)(-2.508731754924880510838743672432351);
+   rkAinvT[1][0] = (KPP_REAL)1.195823345445647152832799205549710;
+   rkAinvT[1][1] = (KPP_REAL)(-2.097911672722823576416399602774855);
+   rkAinvT[1][2] = (KPP_REAL).7850032632435902184104551358922130;
+   rkAinvT[2][0] = (KPP_REAL)5.765829871932827589653709477334136;
+   rkAinvT[2][1] = (KPP_REAL).1170850640335862051731452613329320;
+   rkAinvT[2][2] = (KPP_REAL)4.078738281412060947659653944216779;
+} /* Lobatto3C_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Gauss method
+	(given to ~30 accurate digits)
+	The parameter b3 can be chosen by the user
+	to tune the error estimator
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Gauss_Coefficients()
+{
+   rkMethod = GAU;
+   
+   /* The coefficients of the Gauss method */
+   KPP_REAL b0;
+   /*b0 = (KPP_REAL)4.0; */
+   b0 = (KPP_REAL)0.1;
+
+   /* The coefficients of the Gauss method */
+   rkA[0][0] = (KPP_REAL).1388888888888888888888888888888889;
+   rkA[0][1] = (KPP_REAL)(-.359766675249389034563954710966045e-01);
+   rkA[0][2] = (KPP_REAL)(.97894440153083260495800422294756e-02);
+   rkA[1][0] = (KPP_REAL).3002631949808645924380249472131556;
+   rkA[1][1] = (KPP_REAL).2222222222222222222222222222222222;
+   rkA[1][2] = (KPP_REAL)(-.224854172030868146602471694353778e-01);
+   rkA[2][0] = (KPP_REAL).2679883337624694517281977355483022;
+   rkA[2][1] = (KPP_REAL).4804211119693833479008399155410489;
+   rkA[2][2] = (KPP_REAL).1388888888888888888888888888888889;
+
+   rkB[0] = (KPP_REAL).2777777777777777777777777777777778;
+   rkB[1] = (KPP_REAL).4444444444444444444444444444444444;
+   rkB[2] = (KPP_REAL).2777777777777777777777777777777778;
+
+   rkC[0] = (KPP_REAL).1127016653792583114820734600217600;
+   rkC[1] = (KPP_REAL).5000000000000000000000000000000000;
+   rkC[2] = (KPP_REAL).8872983346207416885179265399782400;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = b0;
+   rkBhat[1] = (KPP_REAL)(-1.4788305577012361475298775666303999)*b0
+   		 +(KPP_REAL).27777777777777777777777777777777778;
+   rkBhat[2] = (KPP_REAL).44444444444444444444444444444444444
+    	         +(KPP_REAL).66666666666666666666666666666666667*b0;
+   rkBhat[3] = (KPP_REAL)(-.18783610896543051913678910003626672)*b0
+  	         +(KPP_REAL).27777777777777777777777777777777778;
+
+   /* New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j */
+   rkD[0] = (KPP_REAL)(.1666666666666666666666666666666667e+01);
+   rkD[1] = (KPP_REAL)(-.1333333333333333333333333333333333e+01);
+   rkD[2] = (KPP_REAL)(.1666666666666666666666666666666667e+01);
+
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE[0] = (KPP_REAL).2153144231161121782447335303806954*b0;
+   rkE[1] = (KPP_REAL)(-2.825278112319014084275808340593191)*b0;
+   rkE[2] = (KPP_REAL).2870858974881495709929780405075939*b0;
+   rkE[3] = (KPP_REAL)(-.4558086256248162565397206448274867e-01)*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = ZERO;
+   rkBgam[1] = (KPP_REAL).2373339543355109188382583162660537;
+   rkBgam[2] = (KPP_REAL).5879873931885192299409334646982414;
+   rkBgam[3] = (KPP_REAL)(-.4063577064014232702392531134499046e-01);
+   rkBgam[4] = (KPP_REAL).2153144231161121782447335303806955;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)(-2.594040933093095272574031876464493);
+   rkTheta[1] = (KPP_REAL)1.824611539036311947589425112250199;
+   rkTheta[2] = (KPP_REAL).1856563166634371860478043996459493;
+
+   /* ELO = local order of classical error estimator */
+   rkELO = (KPP_REAL)4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)4.644370709252171185822941421408064;
+   rkAlpha = (KPP_REAL)3.677814645373914407088529289295970;
+   rkBeta  = (KPP_REAL)3.508761919567443321903661209182446;
+
+   rkT[0][0] = (KPP_REAL)(.7215185205520017032081769924397664e-01);
+   rkT[0][1] = (KPP_REAL)(-.8224123057363067064866206597516454e-01);
+   rkT[0][2] = (KPP_REAL)(-.6012073861930850173085948921439054e-01);
+   rkT[1][0] = (KPP_REAL).1188325787412778070708888193730294;
+   rkT[1][1] = (KPP_REAL)(.5306509074206139504614411373957448e-01);
+   rkT[1][2] = (KPP_REAL).3162050511322915732224862926182701;
+   rkT[2][0] = ONE;
+   rkT[2][1] = ONE;
+   rkT[2][2] = ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)5.991698084937800775649580743981285;
+   rkTinv[0][1] = (KPP_REAL)1.139214295155735444567002236934009;
+   rkTinv[0][2] = (KPP_REAL).4323121137838583855696375901180497;
+   rkTinv[1][0] = (KPP_REAL)(-5.991698084937800775649580743981285);
+   rkTinv[1][1] = (KPP_REAL)(-1.139214295155735444567002236934009);
+   rkTinv[1][2] = (KPP_REAL).5676878862161416144303624098819503;
+   rkTinv[2][0] = (KPP_REAL)(-1.246213273586231410815571640493082);
+   rkTinv[2][1] = (KPP_REAL)2.925559646192313662599230367054972;
+   rkTinv[2][2] = (KPP_REAL)(-.2577352012734324923468722836888244);
+
+   rkTinvAinv[0][0] = (KPP_REAL)27.82766708436744962047620566703329;
+   rkTinvAinv[0][1] = (KPP_REAL)5.290933503982655311815946575100597;
+   rkTinvAinv[0][2] = (KPP_REAL)2.007817718512643701322151051660114;
+   rkTinvAinv[1][0] = (KPP_REAL)(-17.66368928942422710690385180065675);
+   rkTinvAinv[1][1] = (KPP_REAL)(-14.45491129892587782538830044147713);
+   rkTinvAinv[1][2] = (KPP_REAL)2.992182281487356298677848948339886;
+   rkTinvAinv[2][0] = (KPP_REAL)(-25.60678350282974256072419392007303);
+   rkTinvAinv[2][1] = (KPP_REAL)6.762434375611708328910623303779923;
+   rkTinvAinv[2][2] = (KPP_REAL)1.043979339483109825041215970036771;
+
+   rkAinvT[0][0] = (KPP_REAL).3350999483034677402618981153470483;
+   rkAinvT[0][1] = (KPP_REAL)(-.5134173605009692329246186488441294);
+   rkAinvT[0][2] = (KPP_REAL)(.6745196507033116204327635673208923e-01);
+   rkAinvT[1][0] = (KPP_REAL).5519025480108928886873752035738885;
+   rkAinvT[1][1] = (KPP_REAL)1.304651810077110066076640761092008;
+   rkAinvT[1][2] = (KPP_REAL).9767507983414134987545585703726984;
+   rkAinvT[2][0] = (KPP_REAL)4.644370709252171185822941421408064;
+   rkAinvT[2][1] = (KPP_REAL)3.677814645373914407088529289295970;
+   rkAinvT[2][2] = (KPP_REAL)(-3.508761919567443321903661209182446);
+} /* Gauss_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 3-stage Gauss method
+	(given to ~30 accurate digits)
+	The parameter b3 can be chosen by the user
+	to tune the error estimator
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Radau1A_Coefficients()
+{
+   /* The coefficients of the Radau1A method */
+   KPP_REAL b0;
+   /*b0 = (KPP_REAL)0.3; */
+   b0 = (KPP_REAL)0.1;
+
+   /* The coefficients of the Radau1A method */
+   rkMethod = R1A;
+
+   rkA[0][0] = (KPP_REAL) .1111111111111111111111111111111111;
+   rkA[0][1] = (KPP_REAL)(-.1916383190435098943442935597058829);
+   rkA[0][2] = (KPP_REAL)(.8052720793239878323318244859477174e-01);
+   rkA[1][0] = (KPP_REAL).1111111111111111111111111111111111;
+   rkA[1][1] = (KPP_REAL).2920734116652284630205027458970589;
+   rkA[1][2] = (KPP_REAL)(-.481334970546573839513422644787591e-01);
+   rkA[2][0] = (KPP_REAL).1111111111111111111111111111111111;
+   rkA[2][1] = (KPP_REAL).5370223859435462728402311533676479;
+   rkA[2][2] = (KPP_REAL).1968154772236604258683861429918299;
+
+   rkB[0] = (KPP_REAL).1111111111111111111111111111111111;
+   rkB[1] = (KPP_REAL).5124858261884216138388134465196080;
+   rkB[2] = (KPP_REAL).3764030627004672750500754423692808;
+
+   rkC[0] = ZERO;
+   rkC[1] = (KPP_REAL).3550510257216821901802715925294109;
+   rkC[2] = (KPP_REAL).8449489742783178098197284074705891;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = b0;
+   rkBhat[1] = (KPP_REAL).11111111111111111111111111111111111-b0;
+   rkBhat[2] = (KPP_REAL).51248582618842161383881344651960810;
+   rkBhat[3] = (KPP_REAL).37640306270046727505007544236928079;
+
+   /* New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD[0] = (KPP_REAL).3333333333333333333333333333333333;
+   rkD[1] = (KPP_REAL)(-.8914115380582557157653087040196127);
+   rkD[2] = (KPP_REAL)(1.558078204724922382431975370686279);
+
+   /* Classical error estimator: */
+   /* H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j */
+   rkE[0] = (KPP_REAL).2748888295956773677478286035994148*b0;
+   rkE[1] = (KPP_REAL)(-1.374444147978386838739143017997074)*b0;
+   rkE[2] = (KPP_REAL)(-1.335337922441686804550326197041126)*b0;
+   rkE[3] = (KPP_REAL).235782604058977333559011782643466*b0;
+
+   /* Sdirk error estimator */
+   rkBgam[0] = ZERO;
+   rkBgam[1] = (KPP_REAL)(.1948150124588532186183490991130616e-01);
+   rkBgam[2] = (KPP_REAL).7575249005733381398986810981093584;
+   rkBgam[3] = (KPP_REAL)(-.518952314149008295083446116200793e-01);
+   rkBgam[4] = (KPP_REAL).2748888295956773677478286035994148;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)(-1.224370034375505083904362087063351);
+   rkTheta[1] = (KPP_REAL).9340045331532641409047527962010133;
+   rkTheta[2] = (KPP_REAL).4656990124352088397561234800640929;
+
+   /* ELO = local order of classical error estimator */
+   rkELO = (KPP_REAL)4.0;
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAlpha = (KPP_REAL)2.681082873627752133895790743211112;
+   rkBeta  = (KPP_REAL)3.050430199247410569426377624787569;
+
+   rkT[0][0] = (KPP_REAL).424293819848497965354371036408369;
+   rkT[0][1] = (KPP_REAL)(-.3235571519651980681202894497035503);
+   rkT[0][2] = (KPP_REAL)(-.522137786846287839586599927945048);
+   rkT[1][0] = (KPP_REAL)(.57594609499806128896291585429339e-01);
+   rkT[1][1] = (KPP_REAL)(.3148663231849760131614374283783e-02);
+   rkT[1][2] = (KPP_REAL).452429247674359778577728510381731;
+   rkT[2][0] = ONE;
+   rkT[2][1] = ONE;
+   rkT[2][2] = ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)1.233523612685027760114769983066164;
+   rkTinv[0][1] = (KPP_REAL)1.423580134265707095505388133369554;
+   rkTinv[0][2] = (KPP_REAL).3946330125758354736049045150429624;
+   rkTinv[1][0] = (KPP_REAL)(-1.233523612685027760114769983066164);
+   rkTinv[1][1] = (KPP_REAL)(-1.423580134265707095505388133369554);
+   rkTinv[1][2] = (KPP_REAL).6053669874241645263950954849570376;
+   rkTinv[2][0] = (KPP_REAL)(-.1484438963257383124456490049673414);
+   rkTinv[2][1] = (KPP_REAL)2.038974794939896109682070471785315;
+   rkTinv[2][2] = (KPP_REAL)(-.544501292892686735299355831692542e-01);
+
+   rkTinvAinv[0][0] = (KPP_REAL)4.487354449794728738538663081025420;
+   rkTinvAinv[0][1] = (KPP_REAL)5.178748573958397475446442544234494;
+   rkTinvAinv[0][2] = (KPP_REAL)1.435609490412123627047824222335563;
+   rkTinvAinv[1][0] = (KPP_REAL)(-2.854361287939276673073807031221493);
+   rkTinvAinv[1][1] = (KPP_REAL)(-1.003648660720543859000994063139137e+01);
+   rkTinvAinv[1][2] = (KPP_REAL)1.789135380979465422050817815017383;
+   rkTinvAinv[2][0] = (KPP_REAL)(-4.160768067752685525282947313530352);
+   rkTinvAinv[2][1] = (KPP_REAL)1.124128569859216916690209918405860;
+   rkTinvAinv[2][2] = (KPP_REAL)1.700644430961823796581896350418417;
+
+   rkAinvT[0][0] = (KPP_REAL)1.543510591072668287198054583233180;
+   rkAinvT[0][1] = (KPP_REAL)(-2.460228411937788329157493833295004);
+   rkAinvT[0][2] = (KPP_REAL)(-.412906170450356277003910443520499);
+   rkAinvT[1][0] = (KPP_REAL).209519643211838264029272585946993;
+   rkAinvT[1][1] = (KPP_REAL)1.388545667194387164417459732995766;
+   rkAinvT[1][2] = (KPP_REAL)1.20339553005832004974976023130002;
+   rkAinvT[2][0] = (KPP_REAL)3.637834252744495732208418513577775;
+   rkAinvT[2][1] = (KPP_REAL)2.681082873627752133895790743211112;
+   rkAinvT[2][2] = (KPP_REAL)(-3.050430199247410569426377624787569);
+} /* Radau1A_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	The coefficients of the 4-stage Lobatto-3A method
+	(given to ~30 accurate digits)
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Lobatto3A_Coefficients()
+{
+   /* The coefficients of the Lobatto-3A method */
+   rkMethod = L3A;
+
+   rkA[0][0] = ZERO;
+   rkA[0][1] = ZERO;
+   rkA[0][2] = ZERO;
+   rkA[0][3] = ZERO;
+   rkA[1][0] = (KPP_REAL).11030056647916491413674311390609397;
+   rkA[1][1] = (KPP_REAL).1896994335208350858632568860939060;
+   rkA[1][2] = (KPP_REAL)(-.339073642291438837776604807792215e-01);
+   rkA[1][3] = (KPP_REAL)(.1030056647916491413674311390609397e-01);
+   rkA[2][0] = (KPP_REAL)(.73032766854168419196590219427239365e-01);
+   rkA[2][1] = (KPP_REAL).4505740308958105504443271474458881;
+   rkA[2][2] = (KPP_REAL).2269672331458315808034097805727606;
+   rkA[2][3] = (KPP_REAL)(-.2696723314583158080340978057276063e-01);
+   rkA[3][0] = (KPP_REAL)(.83333333333333333333333333333333333e-01);
+   rkA[3][1] = (KPP_REAL).4166666666666666666666666666666667;
+   rkA[3][2] = (KPP_REAL).4166666666666666666666666666666667;
+   rkA[3][3] = (KPP_REAL)(.8333333333333333333333333333333333e-01);
+
+   rkB[0] = (KPP_REAL)(.83333333333333333333333333333333333e-01);
+   rkB[1] = (KPP_REAL).4166666666666666666666666666666667;
+   rkB[2] = (KPP_REAL).4166666666666666666666666666666667;
+   rkB[3] = (KPP_REAL)(.8333333333333333333333333333333333e-01);
+
+   rkC[0] = ZERO;
+   rkC[1] = (KPP_REAL).2763932022500210303590826331268724;
+   rkC[2] = (KPP_REAL).7236067977499789696409173668731276;
+   rkC[3] = ONE;
+
+   /* New solution: H*Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD[0] = ZERO;
+   rkD[1] = ZERO;
+   rkD[2] = ZERO;
+   rkD[3] = ONE;
+
+   /* Classical error estimator, embedded solution: */
+   rkBhat[0] = (KPP_REAL)(.90909090909090909090909090909090909e-01);
+   rkBhat[1] = (KPP_REAL).39972675774621371442114262372173276;
+   rkBhat[2] = (KPP_REAL).43360657558711961891219070961160058;
+   rkBhat[3] = (KPP_REAL)(.15151515151515151515151515151515152e-01);
+
+   /* Classical error estimator: */
+   /* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+
+   rkE[0] = (KPP_REAL)(.1957403846510110711315759367097231e-01);
+   rkE[1] = (KPP_REAL)(-.1986820345632580910316020806676438);
+   rkE[2] = (KPP_REAL).1660586371214229125096727578826900;
+   rkE[3] = (KPP_REAL)(-.9787019232550553556578796835486154e-01);
+
+   /* Sdirk error estimator: */
+   rkF[0] = ZERO;
+   rkF[1] = (KPP_REAL)(-.66535815876916686607437314126436349);
+   rkF[2] = (KPP_REAL)1.7419302743497277572980407931678409;
+   rkF[3] = (KPP_REAL)(-1.2918865386966730694684011822841728);
+
+   /* ELO = local order of classical error estimator */
+   rkELO = (KPP_REAL)4.0;
+
+   /* Sdirk error estimator: */
+   rkBgam[0] = (KPP_REAL)(.2950472755430528877214995073815946e-01);
+   rkBgam[1] = (KPP_REAL).5370310883226113978352873633882769;
+   rkBgam[2] = (KPP_REAL).2963022450107219354980459699450564;
+   rkBgam[3] = (KPP_REAL)(-.7815248400375080035021681445218837e-01);
+   rkBgam[4] = (KPP_REAL).2153144231161121782447335303806956;
+
+   /* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta[0] = (KPP_REAL)0.0;
+   rkTheta[1] = (KPP_REAL)(-.6653581587691668660743731412643631);
+   rkTheta[2] = (KPP_REAL)1.741930274349727757298040793167842;
+   rkTheta[3] = (KPP_REAL)(-.291886538696673069468401182284174);
+
+
+   /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   ~~~> Diagonalize the RK matrix:
+    rkTinv * inv(rkA) * rkT =
+              |  rkGamma      0           0     |
+              |      0      rkAlpha   -rkBeta   |
+              |      0      rkBeta     rkAlpha  |
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = (KPP_REAL)4.644370709252171185822941421408063;
+   rkAlpha = (KPP_REAL)3.677814645373914407088529289295968;
+   rkBeta  = (KPP_REAL)3.508761919567443321903661209182446;
+
+   rkT[0][0] = (KPP_REAL)(.5303036326129938105898786144870856e-01);
+   rkT[0][1] = (KPP_REAL)(-.7776129960563076320631956091016914e-01);
+   rkT[0][2] = (KPP_REAL)(.6043307469475508514468017399717112e-02);
+   rkT[1][0] = (KPP_REAL).2637242522173698467283726114649606;
+   rkT[1][1] = (KPP_REAL).2193839918662961493126393244533346;
+   rkT[1][2] = (KPP_REAL).3198765142300936188514264752235344;
+   rkT[2][0] = ONE;
+   rkT[2][1] = ZERO;
+   rkT[2][2] = ZERO;
+
+   rkTinv[0][0] = (KPP_REAL)7.695032983257654470769069079238553;
+   rkTinv[0][1] = (KPP_REAL)(-.1453793830957233720334601186354032);
+   rkTinv[0][2] = (KPP_REAL).6302696746849084900422461036874826;
+   rkTinv[1][0] = (KPP_REAL)(-7.695032983257654470769069079238553);
+   rkTinv[1][1] = (KPP_REAL).1453793830957233720334601186354032;
+   rkTinv[1][2] = (KPP_REAL).3697303253150915099577538963125174;
+   rkTinv[2][0] = (KPP_REAL)(-1.066660885401270392058552736086173);
+   rkTinv[2][1] = (KPP_REAL)3.146358406832537460764521760668932;
+   rkTinv[2][2] = (KPP_REAL)(-.7732056038202974770406168510664738);
+
+   rkTinvAinv[0][0] = (KPP_REAL)35.73858579417120341641749040405149;
+   rkTinvAinv[0][1] = (KPP_REAL)(-.675195748578927863668368190236025);
+   rkTinvAinv[0][2] = (KPP_REAL)2.927206016036483646751158874041632;
+   rkTinvAinv[1][0] = (KPP_REAL)(-24.55824590667225493437162206039511);
+   rkTinvAinv[1][1] = (KPP_REAL)(-10.50514413892002061837750015342036);
+   rkTinvAinv[1][2] = (KPP_REAL)4.072793983963516353248841125958369;
+   rkTinvAinv[2][0] = (KPP_REAL)(-30.92301972744621647251975054630589);
+   rkTinvAinv[2][1] = (KPP_REAL)12.08182467154052413351908559269928;
+   rkTinvAinv[2][2] = (KPP_REAL)(-1.546411207640594954081233702132946);
+
+   rkAinvT[0][0] = (KPP_REAL).2462926658317812882584158369803835;
+   rkAinvT[0][1] = (KPP_REAL)(-.2647871194157644619747121197289574);
+   rkAinvT[0][2] = (KPP_REAL).2950720515900466654896406799284586;
+   rkAinvT[1][0] = (KPP_REAL)1.224833192317784474576995878738004;
+   rkAinvT[1][1] = (KPP_REAL)1.929224190340981580557006261869763;
+   rkAinvT[1][2] = (KPP_REAL).4066803323234419988910915619080306;
+   rkAinvT[2][0] = (KPP_REAL)4.644370709252171185822941421408064;
+   rkAinvT[2][1] = (KPP_REAL)3.677814645373914407088529289295968;
+   rkAinvT[2][2] = (KPP_REAL)(-3.508761919567443321903661209182446);
+} /* Lobatto3A_Coefficients */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	END SUBROUTINE RungeKutta ! and all its internal procedures
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FUN_CHEM(KPP_REAL T, KPP_REAL V[], KPP_REAL FCT[])
+{
+   KPP_REAL Told;
+
+   Told = TIME;
+   TIME = T;
+   Update_SUN();
+   Update_RCONST();
+   Update_PHOTO();
+   TIME = Told;
+
+   Fun(V, FIX, RCONST, FCT);
+
+} /* FUN_CHEM */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JAC_CHEM (KPP_REAL T, KPP_REAL V[], KPP_REAL JF[])
+{
+   KPP_REAL Told;
+
+   Told = TIME;
+   TIME = T;
+   Update_SUN();
+   Update_RCONST();
+   Update_PHOTO();
+   TIME = Told;
+   Jac_SP(V, FIX, RCONST, JF);
+} /* JAC_CHEM */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.def	(revision 3477)
@@ -0,0 +1,8 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE runge_kutta
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.f90	(revision 3477)
@@ -0,0 +1,1891 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RungeKutta - Fully Implicit 3-stage Runge-Kutta methods based on:      !
+!          * Radau-2A   quadrature (order 5)                              !
+!          * Radau-1A   quadrature (order 5)                              !
+!          * Lobatto-3C quadrature (order 4)                              !
+!          * Gauss      quadrature (order 6)                              !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2005                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Jacobian,   ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+!~~~>  Statistics on the work performed by the Runge-Kutta method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+    Nrej=5, Ndec=6, Nsol=7, Nsng=8, Ntexit=1, Nhacc=2, Nhnew=3
+  
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    RCNTRL(1:20) = 0.0_dp
+    ICNTRL(1:20) = 0
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are interpolated (0) or zero (1)
+    ICNTRL(10) = 1   ! 0 - classic or 1 - SDIRK error estimation
+    ICNTRL(11) = 0   ! Gustaffson (0) or classic(1) controller
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+    
+    T1 = TIN; T2 = TOUT
+    CALL RungeKutta(  NVAR, T1, T2, VAR, RTOL, ATOL, &
+                      RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+    Ntotal = Ntotal + ISTATUS(Nstp)
+    PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'Runge-Kutta: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RungeKutta( N,T,Tend,Y,RelTol,AbsTol,    &
+                         RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!  This implementation is based on the book and the code Radau5:
+!
+!         E. HAIRER AND G. WANNER
+!         "SOLVING ORDINARY DIFFERENTIAL EQUATIONS II. 
+!              STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!         UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!         CH-1211 GENEVE 24, SWITZERLAND
+!         E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!   Methods:
+!          * Radau-2A   quadrature (order 5)                              
+!          * Radau-1A   quadrature (order 5)                              
+!          * Lobatto-3C quadrature (order 4)                              
+!          * Gauss      quadrature (order 6)                              
+!                                                                         
+!   (C)  Adrian Sandu, August 2005                                       
+!   Virginia Polytechnic Institute and State University                  
+!   Contact: sandu@cs.vt.edu                                             
+!   Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!   This implementation is part of KPP - the Kinetic PreProcessor        
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!       ----------------
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!     N           Dimension of the system
+!     T           Initial time value
+!
+!     Tend        Final T value (Tend-T may be positive or negative)
+!
+!     Y(N)        Initial values for Y
+!
+!     RelTol,AbsTol   Relative and absolute error tolerances. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = RK method selection       
+!              = 1:  Radau-2A    (the default)
+!              = 2:  Lobatto-3C
+!              = 3:  Gauss
+!              = 4:  Radau-1A
+!	       = 5:  Lobatto-3A (not yet implemented)
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 10000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(10) -> switch for error estimation strategy
+!		ICNTRL(10) = 0: one additional stage at c=0, 
+!				see Hairer (default)
+!		ICNTRL(10) = 1: two additional stages at c=0 
+!				and SDIRK at c=1, stiffly accurate
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(11)=0:  mod. predictive controller (Gustafsson, default)
+!              ICNTRL(11)=1:  classical step size control
+!              the choice 1 seems to produce safer results;
+!              for simple problems, the choice 2 produces
+!              often slightly faster runs
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  (highly recommended to keep Hmin = ZERO, the default)
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, the starting step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IERR        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of Jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: Y(N),AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson, SdirkError
+      INTEGER :: IERR, ITOL
+      KPP_REAL :: T,Tend
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit, rkMethod
+      KPP_REAL :: Hmin,Hmax,Hstart,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin, NewtonTol
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      ! Runge-Kutta method parameters
+      INTEGER, PARAMETER :: R2A=1, R1A=2, L3C=3, GAU=4, L3A=5
+      KPP_REAL :: rkT(3,3), rkTinv(3,3), rkTinvAinv(3,3), rkAinvT(3,3), &
+                       rkA(0:3,0:3), rkB(0:3),  rkC(0:3), rkD(0:3), rkE(0:3), &
+		       rkBgam(0:4), rkBhat(0:4), rkTheta(0:3), rkF(0:4),      &
+                       rkGamma,  rkAlpha, rkBeta, rkELO
+       !~~~> Local variables
+      INTEGER :: i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IERR = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> Error control selection  
+      IF (ICNTRL(10) == 0) THEN 
+         SdirkError = .FALSE.
+      ELSE
+         SdirkError = .TRUE.
+      END IF      
+!~~~> Method selection  
+      SELECT CASE (ICNTRL(3))     
+      CASE (0,1)
+         CALL Radau2A_Coefficients
+      CASE (2)
+         CALL Lobatto3C_Coefficients
+      CASE (3)
+         CALL Gauss_Coefficients
+      CASE (4)
+         CALL Radau1A_Coefficients
+      CASE (5)
+         CALL Lobatto3A_Coefficients
+      CASE DEFAULT
+         WRITE(6,*) 'ICNTRL(3)=',ICNTRL(3)
+         CALL RK_ErrorMsg(-13,T,ZERO,IERR)
+      END SELECT
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RK_ErrorMsg(-1,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonMaxit    maximal number of Newton iterations
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RK_ErrorMsg(-2,T,ZERO,IERR)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~> Gustafsson: step size controller
+      IF(ICNTRL(11) == 0)THEN
+         Gustafsson = .TRUE.
+      ELSE
+         Gustafsson = .FALSE.
+      END IF
+
+!~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0
+      Roundoff=WLAMCH('E');
+
+!~~~> Hmin = minimal step size
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSE
+         Hmin = MIN(ABS(RCNTRL(1)),ABS(Tend-T))
+      END IF
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tend-T)
+      ELSE
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-T))
+      END IF
+!~~~> Hstart = starting step size
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = ZERO
+      ELSE
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-T))
+      END IF
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 1.0d-3) .OR. (FacSafe >= ONE) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RK_ErrorMsg(-4,T,ZERO,IERR)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RK_ErrorMsg(-5,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonTol:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+         IF (NewtonTol <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RK_ErrorMsg(-6,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RK_ErrorMsg(-7,T,ZERO,IERR)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+          END DO
+      END IF
+
+!~~~> Parameters are wrong
+      IF (IERR < 0) RETURN
+
+!~~~> Call the core method
+      CALL RK_Integrator( N,T,Tend,Y,IERR )
+
+   CONTAINS ! Internal procedures to RungeKutta
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Integrator( N,T,Tend,Y,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+      INTEGER,  INTENT(IN)         :: N
+      KPP_REAL, INTENT(IN)    :: Tend
+      KPP_REAL, INTENT(INOUT) :: T, Y(NVAR)
+      INTEGER,  INTENT(OUT)        :: IERR
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL    :: FJAC(NVAR,NVAR), E1(NVAR,NVAR)
+      COMPLEX(kind=dp) :: E2(NVAR,NVAR)   
+#else
+      KPP_REAL    :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif                
+      KPP_REAL, DIMENSION(NVAR) :: Z1,Z2,Z3,Z4,SCAL,DZ1,DZ2,DZ3,DZ4, &
+      				G,TMP,F0
+      KPP_REAL  :: CONT(NVAR,3), Tdirection,  H, Hacc, Hnew, Hold, Fac, &
+                 FacGus, Theta, Err, ErrOld, NewtonRate, NewtonIncrement,    &
+                 Hratio, Qnewton, NewtonPredictedErr,NewtonIncrementOld, ThetaSD
+      INTEGER :: IP1(NVAR),IP2(NVAR),NewtonIter, ISING, Nconsecutive
+      LOGICAL :: Reject, FirstStep, SkipJac, NewtonDone, SkipLU
+      
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Tdirection = SIGN(ONE,Tend-T)
+      H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , Hmax )
+      IF (ABS(H) <= 10.d0*Roundoff) H = 1.0d-6
+      H = SIGN(H,Tdirection)
+      Hold      = H
+      Reject    = .FALSE.
+      FirstStep = .TRUE.
+      SkipJac   = .FALSE.
+      SkipLU    = .FALSE.
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= ZERO) THEN
+         H = Tend-T
+      END IF
+      Nconsecutive = 0
+      CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      !IF ( .NOT.Reject ) THEN      
+         CALL FUN_CHEM(T,Y,F0)
+         ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+      !END IF   
+
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+        !~~~> Compute the Jacobian matrix
+        IF ( .NOT.SkipJac ) THEN
+          CALL JAC_CHEM(T,Y,FJAC)
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+        END IF
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+        IF (ISING /= 0) THEN
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; Nconsecutive = Nconsecutive + 1
+          IF (Nconsecutive >= 5) THEN
+            CALL RK_ErrorMsg(-12,T,H,IERR); RETURN
+          END IF
+          H=H*0.5d0; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+          CYCLE Tloop
+        ELSE
+          Nconsecutive = 0    
+        END IF   
+      END IF ! SkipLU
+   
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RK_ErrorMsg(-9,T,H,IERR); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RK_ErrorMsg(-10,T,H,IERR); RETURN
+      END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+      !~~~>  Starting values for Newton iteration
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+      ELSE
+         ! Evaluate quadratic polynomial
+         CALL RK_Interpolate('eval',N,H,Hold,Z1,Z2,Z3,CONT)
+      END IF
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      Fac = 0.5d0 ! Step reduction if too many iterations
+      
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS(N,T,H,Y,F0,Z1,Z2,Z3,DZ1,DZ2,DZ3)
+            
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+            
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ2)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ3)**2 )/3.0d0 )
+            
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+                IF ( NewtonIter < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                    EXIT NewtonLoop
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1,1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2,1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3,1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT NewtonLoop
+   	    IF (NewtonIter == NewtonMaxit) THEN
+		PRINT*, 'Slow or no convergence in Newton Iteration: Max no. of', &
+		 	'Newton iterations reached'
+	    END IF
+            
+      END DO NewtonLoop
+            
+      IF (.NOT.NewtonDone) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+           CYCLE Tloop
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SDIRK Stage
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+
+!~~~>  Starting values for Newton iterations
+       Z4(1:N) = Z3(1:N)
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+!       G = H*rkBgam(0)*F0 + rkTheta(1)*Z1 + rkTheta(2)*Z2 + rkTheta(3)*Z3
+       CALL Set2Zero(N, G)
+       IF (rkMethod/=L3A) CALL WAXPY(N,rkBgam(0)*H, F0,1,G,1) 
+       CALL WAXPY(N,rkTheta(1),Z1,1,G,1)
+       CALL WAXPY(N,rkTheta(2),Z2,1,G,1)
+       CALL WAXPY(N,rkTheta(3),Z3,1,G,1)
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+SDNewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+	    CALL WADD(N,Y,Z4,TMP)         ! TMP <- Y + Z4
+	    CALL FUN_CHEM(T+H,TMP,DZ4) 	  ! DZ4 <- Fun(Y+Z4)         
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ4(1:N) = (G(1:N)-Z4(1:N))*(rkGamma/H) + DZ4(1:N)
+	    CALL WAXPY (N, -ONE*rkGamma/H, Z4, 1, DZ4, 1)
+            CALL WAXPY (N, rkGamma/H, G,1, DZ4,1)
+
+!~~~>   Solve the linear system
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E1, N, IP1, DZ4, N, ISING )
+#else
+            CALL KppSolve(E1, DZ4)
+#endif
+            
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4)
+            IF ( NewtonIter == 1 ) THEN
+                ThetaSD      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaSD = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaSD < 0.99d0) THEN
+                    NewtonRate = ThetaSD/(ONE-ThetaSD)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaSD**(NewtonMaxit-NewtonIter)/(ONE-ThetaSD)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      !PRINT*,'Error too large: ', NewtonPredictedErr
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT SDNewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    !PRINT*,'Theta too large: ',ThetaSD
+                    EXIT SDNewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z4 <-- Z4 + DZ4
+            CALL WAXPY(N,ONE,DZ4,1,Z4,1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT SDNewtonLoop
+            
+            END DO SDNewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+                CYCLE Tloop
+            END IF
+      END IF
+!~~~>  End of implified SDIRK Newton iterations
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+	 CALL Set2Zero(N, DZ4)
+         IF (rkMethod==L3A) THEN
+           DZ4(1:N) = H*rkF(0)*F0(1:N)
+	   IF (rkF(1) /= ZERO)  CALL WAXPY(N, rkF(1), Z1, 1, DZ4, 1)
+	   IF (rkF(2) /= ZERO)  CALL WAXPY(N, rkF(2), Z2, 1, DZ4, 1)
+	   IF (rkF(3) /= ZERO)  CALL WAXPY(N, rkF(3), Z3, 1, DZ4, 1)
+           TMP = Y + Z4
+           CALL FUN_CHEM(T+H,TMP,DZ1)
+ 	   CALL WAXPY(N, H*rkBgam(4), DZ1, 1, DZ4, 1)
+         ELSE
+!         DZ4(1:N) =  rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4    
+  	   IF (rkD(1) /= ZERO)  CALL WAXPY(N, rkD(1), Z1, 1, DZ4, 1)
+	   IF (rkD(2) /= ZERO)  CALL WAXPY(N, rkD(2), Z2, 1, DZ4, 1)
+	   IF (rkD(3) /= ZERO)  CALL WAXPY(N, rkD(3), Z3, 1, DZ4, 1)
+	   CALL WAXPY(N, -ONE, Z4, 1, DZ4, 1)
+         END IF
+         Err = RK_ErrorNorm(N,SCAL,DZ4)    
+      ELSE
+         CALL  RK_ErrorEstimate(N,H,T,Y,F0, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,FirstStep,Reject)
+      END IF
+
+!~~~> Computation of new step size Hnew
+      Fac  = Err**(-ONE/rkELO)*   &
+             MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit))
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Accept/reject step 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:IF (Err < ONE) THEN !~~~> STEP IS ACCEPTED
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            IF (ISTATUS(Nacc) > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(Err**2/ErrOld)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew = Fac*H
+            END IF
+            Hacc=H
+            ErrOld=MAX(1.0d-2,Err)
+         END IF
+         Hold = H
+         T = T+H 
+         ! Update solution: Y <- Y + sum(d_i Z_i)
+         IF (rkD(1) /= ZERO)  CALL WAXPY(N,rkD(1),Z1,1,Y,1)
+         IF (rkD(2) /= ZERO)  CALL WAXPY(N,rkD(2),Z2,1,Y,1)
+         IF (rkD(3) /= ZERO)  CALL WAXPY(N,rkD(3),Z3,1,Y,1)
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         IF (StartNewton) CALL RK_Interpolate('make',N,H,Hold,Z1,Z2,Z3,CONT)
+         CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhnew)  = Hnew
+         RSTATUS(Nhacc)  = H
+         Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin) , Hmax )
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >=  ZERO) THEN
+            H = Tend-T
+         ELSE
+            Hratio=Hnew/H
+            ! Reuse the LU decomposition
+            SkipLU = (Theta<=ThetaMin) .AND. (Hratio>=Qmin) .AND. (Hratio<=Qmax)
+            IF (.NOT.SkipLU) H=Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac  = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject   = .TRUE.
+         SkipJac  = .TRUE.	! Skip if rejected - Jac is independent of H
+         SkipLU   = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+      END IF accept
+      
+    END DO Tloop
+    
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RungeKutta due to the following error:'
+
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> Improper values for FacMin/FacMax/FacSafe/FacRej'
+    CASE (-5)
+      PRINT * , '--> Improper value for ThetaMin'
+    CASE (-6)
+      PRINT * , '--> Newton stopping tolerance too small'
+    CASE (-7)
+      PRINT * , '--> Improper values for Qmin, Qmax'
+    CASE (-8)
+      PRINT * , '--> Tolerances are too small'
+    CASE (-9)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-10)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-11)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-12)
+      PRINT * , '--> Non-convergence of Newton iterations'
+    CASE (-13)
+      PRINT * , '--> Requested RK method not implemented'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   WRITE(6,FMT="(5X,'T=',E12.5,'  H=',E12.5)") T, H 
+
+ END SUBROUTINE RK_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)= ONE/(AbsTol(1)+RelTol(1)*ABS(Y(i)))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=ONE/(AbsTol(i)+RelTol(i)*ABS(Y(i)))
+       END DO
+   END IF
+      
+ END SUBROUTINE RK_ErrorScale
+
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  SUBROUTINE RK_Transform(N,Tr,Z1,Z2,Z3,W1,W2,W3)
+!!~~~>                 W <-- Tr x Z
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: N, i
+!      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),W1(N),W2(N),W3(N)
+!      KPP_REAL :: x1, x2, x3
+!      DO i=1,N
+!          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+!          W1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+!          W2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+!          W3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+!      END DO
+!  END SUBROUTINE RK_Transform
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RK_Interpolate(action,N,H,Hold,Z1,Z2,Z3,CONT)
+!~~~>   Constructs or evaluates a quadratic polynomial
+!         that interpolates the Z solution at current step
+!         and provides starting values for the next step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      INTEGER :: N, i
+      KPP_REAL :: H,Hold,Z1(N),Z2(N),Z3(N),CONT(N,3)
+      KPP_REAL :: r, x1, x2, x3, den
+      CHARACTER(LEN=4) :: action
+       
+      SELECT CASE (action) 
+      CASE ('make')
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         den = (rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3))
+         DO i=1,N
+             CONT(i,1)=(-rkC(3)**2*rkC(2)*Z1(i)+Z3(i)*rkC(2)*rkC(1)**2 &
+                        +rkC(2)**2*rkC(3)*Z1(i)-rkC(2)**2*rkC(1)*Z3(i) &
+                        +rkC(3)**2*rkC(1)*Z2(i)-Z2(i)*rkC(3)*rkC(1)**2)&
+                        /den-Z3(i)
+             CONT(i,2)= -( rkC(1)**2*(Z3(i)-Z2(i)) + rkC(2)**2*(Z1(i)  &
+                          -Z3(i)) +rkC(3)**2*(Z2(i)-Z1(i)) )/den
+             CONT(i,3)= ( rkC(1)*(Z3(i)-Z2(i)) + rkC(2)*(Z1(i)-Z3(i))  &
+                           +rkC(3)*(Z2(i)-Z1(i)) )/den
+         END DO
+      CASE ('eval')
+          ! Evaluate quadratic polynomial
+          r = H/Hold
+         x1 = ONE + rkC(1)*r
+         x2 = ONE + rkC(2)*r
+         x3 = ONE + rkC(3)*r
+         DO i=1,N
+            Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3))
+            Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3))
+            Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3))
+         END DO
+       END SELECT   
+  END SUBROUTINE RK_Interpolate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS(N,T,H,Y,F0,Z1,Z2,Z3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z - hA x F
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: T, H
+      KPP_REAL, DIMENSION(N) :: Y,Z1,Z2,Z3,F0,F,R1,R2,R3,TMP
+
+      CALL WCOPY(N,Z1,1,R1,1) ! R1 <- Z1
+      CALL WCOPY(N,Z2,1,R2,1) ! R2 <- Z2
+      CALL WCOPY(N,Z3,1,R3,1) ! R3 <- Z3
+
+      IF (rkMethod==L3A) THEN
+         CALL WAXPY(N,-H*rkA(1,0),F0,1,R1,1) ! R1 <- R1 - h*A_10*F0
+         CALL WAXPY(N,-H*rkA(2,0),F0,1,R2,1) ! R2 <- R2 - h*A_20*F0
+         CALL WAXPY(N,-H*rkA(3,0),F0,1,R3,1) ! R3 <- R3 - h*A_30*F0
+      END IF
+
+      CALL WADD(N,Y,Z1,TMP)              ! TMP <- Y + Z1
+      CALL FUN_CHEM(T+rkC(1)*H,TMP,F)    ! F1 <- Fun(Y+Z1)         
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y,Z2,TMP)              ! TMP <- Y + Z2
+      CALL FUN_CHEM(T+rkC(2)*H,TMP,F)    ! F2 <- Fun(Y+Z2)        
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y,Z3,TMP)              ! TMP <- Y + Z3
+      CALL FUN_CHEM(T+rkC(3)*H,TMP,F)    ! F3 <- Fun(Y+Z3)     
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+   !~~~> Compute the matrices E1 and E2 and their decompositions
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N, ISING
+      KPP_REAL    :: H, Alpha, Beta, Gamma
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: FJAC(NVAR,NVAR),E1(NVAR,NVAR)
+      COMPLEX(kind=dp) :: E2(N,N)
+#else      
+      KPP_REAL    :: FJAC(LU_NONZERO),E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      INTEGER :: IP1(N), IP2(N), i, j
+      
+      Gamma = rkGamma/H
+      Alpha = rkAlpha/H
+      Beta  = rkBeta /H
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+Gamma
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,NVAR
+         j=LU_DIAG(i); E1(j)=E1(j)+Gamma
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+      IF (ISING /= 0) THEN
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         RETURN
+      END IF
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), ZERO )
+        END DO
+        E2(j,j) = E2(j,j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), ZERO )
+      END DO
+      DO i=1,NVAR
+         j=LU_DIAG(i); E2(j)=E2(j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+      
+   END SUBROUTINE RK_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Solve(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N,IP1(NVAR),IP2(NVAR),ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: E1(NVAR,NVAR)
+      COMPLEX(kind=dp) :: E2(NVAR,NVAR)
+      INTEGER :: ISING
+#else      
+      KPP_REAL    :: E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL    :: R1(N),R2(N),R3(N)
+      KPP_REAL    :: H, x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! Z <- h^{-1) T^{-1) A^{-1) x Z
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3
+          R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3
+          R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,R1,N,ISING) 
+#else      
+      CALL KppSolve (E1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,ISING) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = AIMAG( BC(i) )
+      END DO
+
+      ! Z <- T x Z
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3
+          R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3
+          R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3
+      END DO
+
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+   END SUBROUTINE RK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate(N,H,T,Y,F0,   &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: E1(NVAR,NVAR)
+      INTEGER  :: ISING
+#else      
+      KPP_REAL :: E1(LU_NONZERO)
+#endif      
+      KPP_REAL :: SCAL(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N), &
+                        F0(N),Y(N),TMP(N),T,H
+      INTEGER :: IP1(N), i
+      LOGICAL FirstStep,Reject
+      KPP_REAL :: HrkE1,HrkE2,HrkE3,Err
+
+      HrkE1  = rkE(1)/H
+      HrkE2  = rkE(2)/H
+      HrkE3  = rkE(3)/H
+
+      DO  i=1,N
+         F2(i)  = HrkE1*Z1(i)+HrkE2*Z2(i)+HrkE3*Z3(i)
+         TMP(i) = rkE(0)*F0(i) + F2(i)
+      END DO
+
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) THEN
+           CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING)
+      END IF 	   
+      IF (rkMethod==GAU) THEN
+           CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING)
+      END IF 	   
+#else      
+      CALL KppSolve (E1, TMP)
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) THEN
+            CALL KppSolve (E1,TMP)
+      END IF 	   
+      IF (rkMethod==GAU) THEN
+            CALL KppSolve (E1,TMP)
+      END IF 	   
+#endif      
+
+      Err = RK_ErrorNorm(N,SCAL,TMP)
+!
+      IF (Err < ONE) RETURN
+firej:IF (FirstStep.OR.Reject) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)    
+          ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          Err = RK_ErrorNorm(N,SCAL,TMP)
+       END IF firej
+ 
+   END SUBROUTINE RK_ErrorEstimate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL FUNCTION RK_ErrorNorm(N,SCAL,DY)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: SCAL(N),DY(N)
+      INTEGER :: i
+
+      RK_ErrorNorm = ZERO
+        DO i=1,N
+          RK_ErrorNorm = RK_ErrorNorm + (DY(i)*SCAL(i))**2
+        END DO
+      RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), 1.0d-10 )
+ 
+   END FUNCTION RK_ErrorNorm
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau2A_Coefficients
+!    The coefficients of the 3-stage Radau-2A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+! The coefficients of the Radau2A method
+      KPP_REAL :: b0
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d-1
+      ELSE
+        b0 = 0.5d-1
+      END IF
+
+! The coefficients of the Radau2A method
+      rkMethod = R2A
+
+      rkA(1,1) =  1.968154772236604258683861429918299d-1
+      rkA(1,2) = -6.55354258501983881085227825696087d-2
+      rkA(1,3) =  2.377097434822015242040823210718965d-2
+      rkA(2,1) =  3.944243147390872769974116714584975d-1
+      rkA(2,2) =  2.920734116652284630205027458970589d-1
+      rkA(2,3) = -4.154875212599793019818600988496743d-2
+      rkA(3,1) =  3.764030627004672750500754423692808d-1
+      rkA(3,2) =  5.124858261884216138388134465196080d-1
+      rkA(3,3) =  1.111111111111111111111111111111111d-1
+
+      rkB(1) = 3.764030627004672750500754423692808d-1
+      rkB(2) = 5.124858261884216138388134465196080d-1
+      rkB(3) = 1.111111111111111111111111111111111d-1
+
+      rkC(1) = 1.550510257216821901802715925294109d-1
+      rkC(2) = 6.449489742783178098197284074705891d-1
+      rkC(3) = 1.0d0
+      
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = 1.0d0*b0
+      rkE(1) = -10.04880939982741556246032950764708d0*b0
+      rkE(2) = 1.382142733160748895793662840980412d0*b0
+      rkE(3) = -.3333333333333333333333333333333333d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .3764030627004672750500754423692807d0-1.558078204724922382431975370686279d0*b0
+      rkBgam(2) = .8914115380582557157653087040196118d0*b0+.5124858261884216138388134465196077d0
+      rkBgam(3) = -.1637777184845662566367174924883037d0-.3333333333333333333333333333333333d0*b0
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.520677486405081647234271944611547d0-10.04880939982741556246032950764708d0*b0
+      rkTheta(2) = 2.070455145596436382729929151810376d0+1.382142733160748895793662840980413d0*b0
+      rkTheta(3) = -.3333333333333333333333333333333333d0*b0-.3744441479783868387391430179970741d0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 6.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  9.443876248897524148749007950641664d-2
+      rkT(1,2) = -1.412552950209542084279903838077973d-1
+      rkT(1,3) = -3.00291941051474244918611170890539d-2
+      rkT(2,1) =  2.502131229653333113765090675125018d-1
+      rkT(2,2) =  2.041293522937999319959908102983381d-1
+      rkT(2,3) =  3.829421127572619377954382335998733d-1
+      rkT(3,1) =  1.0d0
+      rkT(3,2) =  1.0d0
+      rkT(3,3) =  0.0d0
+
+      rkTinv(1,1) =  4.178718591551904727346462658512057d0
+      rkTinv(1,2) =  3.27682820761062387082533272429617d-1
+      rkTinv(1,3) =  5.233764454994495480399309159089876d-1
+      rkTinv(2,1) = -4.178718591551904727346462658512057d0
+      rkTinv(2,2) = -3.27682820761062387082533272429617d-1
+      rkTinv(2,3) =  4.766235545005504519600690840910124d-1
+      rkTinv(3,1) = -5.02872634945786875951247343139544d-1
+      rkTinv(3,2) =  2.571926949855605429186785353601676d0
+      rkTinv(3,3) = -5.960392048282249249688219110993024d-1
+
+      rkTinvAinv(1,1) =  1.520148562492775501049204957366528d+1
+      rkTinvAinv(1,2) =  1.192055789400527921212348994770778d0
+      rkTinvAinv(1,3) =  1.903956760517560343018332287285119d0
+      rkTinvAinv(2,1) = -9.669512977505946748632625374449567d0
+      rkTinvAinv(2,2) = -8.724028436822336183071773193986487d0
+      rkTinvAinv(2,3) =  3.096043239482439656981667712714881d0
+      rkTinvAinv(3,1) = -1.409513259499574544876303981551774d+1
+      rkTinvAinv(3,2) =  5.895975725255405108079130152868952d0
+      rkTinvAinv(3,3) = -1.441236197545344702389881889085515d-1
+
+      rkAinvT(1,1) = .3435525649691961614912493915818282d0
+      rkAinvT(1,2) = -.4703191128473198422370558694426832d0
+      rkAinvT(1,3) = .3503786597113668965366406634269080d0
+      rkAinvT(2,1) = .9102338692094599309122768354288852d0
+      rkAinvT(2,2) = 1.715425895757991796035292755937326d0
+      rkAinvT(2,3) = .4040171993145015239277111187301784d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau2A_Coefficients
+
+    
+
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3C_Coefficients
+!    The coefficients of the 3-stage Lobatto-3C method
+!    (given to ~30 accurate digits)
+!    The parameter b0 can be chosen to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+
+      rkMethod = L3C
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d0
+      ELSE
+        b0 = 0.5d0
+      END IF
+! The coefficients of the Lobatto3C method
+
+      rkA(1,1) =  .1666666666666666666666666666666667d0
+      rkA(1,2) = -.3333333333333333333333333333333333d0
+      rkA(1,3) =  .1666666666666666666666666666666667d0
+      rkA(2,1) =  .1666666666666666666666666666666667d0
+      rkA(2,2) =  .4166666666666666666666666666666667d0
+      rkA(2,3) = -.8333333333333333333333333333333333d-1
+      rkA(3,1) =  .1666666666666666666666666666666667d0
+      rkA(3,2) =  .6666666666666666666666666666666667d0
+      rkA(3,3) =  .1666666666666666666666666666666667d0
+
+      rkB(1) = .1666666666666666666666666666666667d0
+      rkB(2) = .6666666666666666666666666666666667d0
+      rkB(3) = .1666666666666666666666666666666667d0
+
+      rkC(1) = 0.0d0
+      rkC(2) = 0.5d0
+      rkC(3) = 1.0d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .16666666666666666666666666666666667d0-b0
+      rkBhat(2) = .66666666666666666666666666666666667d0
+      rkBhat(3) = .16666666666666666666666666666666667d0
+      
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) =   .3808338772072650364017425226487022*b0
+      rkE(1) = -1.142501631621795109205227567946107*b0
+      rkE(2) = -1.523335508829060145606970090594809*b0
+      rkE(3) =   .3808338772072650364017425226487022*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .1666666666666666666666666666666667d0-1.d0*b0
+      rkBgam(2) = .6666666666666666666666666666666667d0
+      rkBgam(3) = -.2141672105405983697350758559820354d0
+      rkBgam(4) = .3808338772072650364017425226487021d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -3.d0*b0-.3808338772072650364017425226487021d0
+      rkTheta(2) = -4.d0*b0+1.523335508829060145606970090594808d0
+      rkTheta(3) = -.142501631621795109205227567946106d0+b0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 5.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 2.625816818958466716011888933765284d0
+      rkAlpha = 1.687091590520766641994055533117359d0
+      rkBeta  = 2.508731754924880510838743672432351d0
+
+      rkT(1,1) = 1.d0
+      rkT(1,2) = 1.d0
+      rkT(1,3) = 0.d0
+      rkT(2,1) = .4554100411010284672111720348287483d0
+      rkT(2,2) = -.6027050205505142336055860174143743d0
+      rkT(2,3) = -.4309321229203225731070721341350346d0
+      rkT(3,1) = 2.195823345445647152832799205549709d0
+      rkT(3,2) = -1.097911672722823576416399602774855d0
+      rkT(3,3) = .7850032632435902184104551358922130d0
+
+      rkTinv(1,1) = .4205559181381766909344950150991349d0
+      rkTinv(1,2) = .3488903392193734304046467270632057d0
+      rkTinv(1,3) = .1915253879645878102698098373933487d0
+      rkTinv(2,1) = .5794440818618233090655049849008650d0
+      rkTinv(2,2) = -.3488903392193734304046467270632057d0
+      rkTinv(2,3) = -.1915253879645878102698098373933487d0
+      rkTinv(3,1) = -.3659705575742745254721332009249516d0
+      rkTinv(3,2) = -1.463882230297098101888532803699806d0
+      rkTinv(3,3) = .4702733607340189781407813565524989d0
+
+      rkTinvAinv(1,1) = 1.104302803159744452668648155627548d0
+      rkTinvAinv(1,2) = .916122120694355522658740710823143d0
+      rkTinvAinv(1,3) = .5029105849749601702795812241441172d0
+      rkTinvAinv(2,1) = 1.895697196840255547331351844372453d0
+      rkTinvAinv(2,2) = 3.083877879305644477341259289176857d0
+      rkTinvAinv(2,3) = -1.502910584974960170279581224144117d0
+      rkTinvAinv(3,1) = .8362439183082935036129145574774502d0
+      rkTinvAinv(3,2) = -3.344975673233174014451658229909802d0
+      rkTinvAinv(3,3) = .312908409479233358005944466882642d0
+
+      rkAinvT(1,1) = 2.625816818958466716011888933765282d0
+      rkAinvT(1,2) = 1.687091590520766641994055533117358d0
+      rkAinvT(1,3) = -2.508731754924880510838743672432351d0
+      rkAinvT(2,1) = 1.195823345445647152832799205549710d0
+      rkAinvT(2,2) = -2.097911672722823576416399602774855d0
+      rkAinvT(2,3) = .7850032632435902184104551358922130d0
+      rkAinvT(3,1) = 5.765829871932827589653709477334136d0
+      rkAinvT(3,2) = .1170850640335862051731452613329320d0
+      rkAinvT(3,3) = 4.078738281412060947659653944216779d0
+
+  END SUBROUTINE Lobatto3C_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gauss_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+! The coefficients of the Gauss method
+
+
+      rkMethod = GAU
+      
+!      b0 = 4.0d0
+      b0 = 0.1d0
+      
+! The coefficients of the Gauss method
+
+      rkA(1,1) =  .1388888888888888888888888888888889d0
+      rkA(1,2) = -.359766675249389034563954710966045d-1
+      rkA(1,3) =  .97894440153083260495800422294756d-2
+      rkA(2,1) =  .3002631949808645924380249472131556d0
+      rkA(2,2) =  .2222222222222222222222222222222222d0
+      rkA(2,3) = -.224854172030868146602471694353778d-1
+      rkA(3,1) =  .2679883337624694517281977355483022d0
+      rkA(3,2) =  .4804211119693833479008399155410489d0
+      rkA(3,3) =  .1388888888888888888888888888888889d0
+
+      rkB(1) = .2777777777777777777777777777777778d0
+      rkB(2) = .4444444444444444444444444444444444d0
+      rkB(3) = .2777777777777777777777777777777778d0
+
+      rkC(1) = .1127016653792583114820734600217600d0
+      rkC(2) = .5000000000000000000000000000000000d0
+      rkC(3) = .8872983346207416885179265399782400d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) =-1.4788305577012361475298775666303999d0*b0 &
+                  +.27777777777777777777777777777777778d0
+      rkBhat(2) =  .44444444444444444444444444444444444d0 &
+                  +.66666666666666666666666666666666667d0*b0
+      rkBhat(3) = -.18783610896543051913678910003626672d0*b0 &
+                  +.27777777777777777777777777777777778d0
+
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = .1666666666666666666666666666666667d1
+      rkD(2) = -.1333333333333333333333333333333333d1
+      rkD(3) = .1666666666666666666666666666666667d1
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = .2153144231161121782447335303806954d0*b0
+      rkE(1) = -2.825278112319014084275808340593191d0*b0
+      rkE(2) = .2870858974881495709929780405075939d0*b0
+      rkE(3) = -.4558086256248162565397206448274867d-1*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.d0
+      rkBgam(1) = .2373339543355109188382583162660537d0
+      rkBgam(2) = .5879873931885192299409334646982414d0
+      rkBgam(3) = -.4063577064014232702392531134499046d-1
+      rkBgam(4) = .2153144231161121782447335303806955d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -2.594040933093095272574031876464493d0
+      rkTheta(2) = 1.824611539036311947589425112250199d0
+      rkTheta(3) = .1856563166634371860478043996459493d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408064d0
+      rkAlpha = 3.677814645373914407088529289295970d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) =  .7215185205520017032081769924397664d-1
+      rkT(1,2) = -.8224123057363067064866206597516454d-1
+      rkT(1,3) = -.6012073861930850173085948921439054d-1
+      rkT(2,1) =  .1188325787412778070708888193730294d0
+      rkT(2,2) =  .5306509074206139504614411373957448d-1
+      rkT(2,3) =  .3162050511322915732224862926182701d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) =  5.991698084937800775649580743981285d0
+      rkTinv(1,2) =  1.139214295155735444567002236934009d0
+      rkTinv(1,3) =   .4323121137838583855696375901180497d0
+      rkTinv(2,1) = -5.991698084937800775649580743981285d0
+      rkTinv(2,2) = -1.139214295155735444567002236934009d0
+      rkTinv(2,3) =   .5676878862161416144303624098819503d0
+      rkTinv(3,1) = -1.246213273586231410815571640493082d0
+      rkTinv(3,2) =  2.925559646192313662599230367054972d0
+      rkTinv(3,3) =  -.2577352012734324923468722836888244d0
+
+      rkTinvAinv(1,1) =  27.82766708436744962047620566703329d0
+      rkTinvAinv(1,2) =   5.290933503982655311815946575100597d0
+      rkTinvAinv(1,3) =   2.007817718512643701322151051660114d0
+      rkTinvAinv(2,1) = -17.66368928942422710690385180065675d0
+      rkTinvAinv(2,2) = -14.45491129892587782538830044147713d0
+      rkTinvAinv(2,3) =   2.992182281487356298677848948339886d0
+      rkTinvAinv(3,1) = -25.60678350282974256072419392007303d0
+      rkTinvAinv(3,2) =   6.762434375611708328910623303779923d0
+      rkTinvAinv(3,3) =   1.043979339483109825041215970036771d0
+      
+      rkAinvT(1,1) = .3350999483034677402618981153470483d0
+      rkAinvT(1,2) = -.5134173605009692329246186488441294d0
+      rkAinvT(1,3) = .6745196507033116204327635673208923d-1
+      rkAinvT(2,1) = .5519025480108928886873752035738885d0
+      rkAinvT(2,2) = 1.304651810077110066076640761092008d0
+      rkAinvT(2,3) = .9767507983414134987545585703726984d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295970d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+      
+  END SUBROUTINE Gauss_Coefficients
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau1A_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+!      KPP_REAL :: b0 = 0.3d0
+      KPP_REAL :: b0 = 0.1d0
+
+! The coefficients of the Radau1A method
+
+      rkMethod = R1A
+
+      rkA(1,1) =  .1111111111111111111111111111111111d0
+      rkA(1,2) = -.1916383190435098943442935597058829d0
+      rkA(1,3) =  .8052720793239878323318244859477174d-1
+      rkA(2,1) =  .1111111111111111111111111111111111d0
+      rkA(2,2) =  .2920734116652284630205027458970589d0
+      rkA(2,3) = -.481334970546573839513422644787591d-1
+      rkA(3,1) =  .1111111111111111111111111111111111d0
+      rkA(3,2) =  .5370223859435462728402311533676479d0
+      rkA(3,3) =  .1968154772236604258683861429918299d0
+
+      rkB(1) = .1111111111111111111111111111111111d0
+      rkB(2) = .5124858261884216138388134465196080d0
+      rkB(3) = .3764030627004672750500754423692808d0
+
+      rkC(1) = 0.d0
+      rkC(2) = .3550510257216821901802715925294109d0
+      rkC(3) = .8449489742783178098197284074705891d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .11111111111111111111111111111111111d0-b0
+      rkBhat(2) = .51248582618842161383881344651960810d0
+      rkBhat(3) = .37640306270046727505007544236928079d0
+
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = .3333333333333333333333333333333333d0
+      rkD(2) = -.8914115380582557157653087040196127d0
+      rkD(3) = .1558078204724922382431975370686279d1
+
+      ! Classical error estimator: 
+      ! H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j
+      rkE(0) =   .2748888295956773677478286035994148d0*b0
+      rkE(1) = -1.374444147978386838739143017997074d0*b0
+      rkE(2) = -1.335337922441686804550326197041126d0*b0
+      rkE(3) =   .235782604058977333559011782643466d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.0d0
+      rkBgam(1) = .1948150124588532186183490991130616d-1
+      rkBgam(2) = .7575249005733381398986810981093584d0
+      rkBgam(3) = -.518952314149008295083446116200793d-1
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.224370034375505083904362087063351d0
+      rkTheta(2) = .9340045331532641409047527962010133d0
+      rkTheta(3) = .4656990124352088397561234800640929d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  .424293819848497965354371036408369d0
+      rkT(1,2) = -.3235571519651980681202894497035503d0
+      rkT(1,3) = -.522137786846287839586599927945048d0
+      rkT(2,1) =  .57594609499806128896291585429339d-1
+      rkT(2,2) =  .3148663231849760131614374283783d-2
+      rkT(2,3) =  .452429247674359778577728510381731d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 1.233523612685027760114769983066164d0
+      rkTinv(1,2) = 1.423580134265707095505388133369554d0
+      rkTinv(1,3) = .3946330125758354736049045150429624d0
+      rkTinv(2,1) = -1.233523612685027760114769983066164d0
+      rkTinv(2,2) = -1.423580134265707095505388133369554d0
+      rkTinv(2,3) = .6053669874241645263950954849570376d0
+      rkTinv(3,1) = -.1484438963257383124456490049673414d0
+      rkTinv(3,2) = 2.038974794939896109682070471785315d0
+      rkTinv(3,3) = -.544501292892686735299355831692542d-1
+
+      rkTinvAinv(1,1) =  4.487354449794728738538663081025420d0
+      rkTinvAinv(1,2) =  5.178748573958397475446442544234494d0
+      rkTinvAinv(1,3) =  1.435609490412123627047824222335563d0
+      rkTinvAinv(2,1) = -2.854361287939276673073807031221493d0
+      rkTinvAinv(2,2) = -1.003648660720543859000994063139137d+1
+      rkTinvAinv(2,3) =  1.789135380979465422050817815017383d0
+      rkTinvAinv(3,1) = -4.160768067752685525282947313530352d0
+      rkTinvAinv(3,2) =  1.124128569859216916690209918405860d0
+      rkTinvAinv(3,3) =  1.700644430961823796581896350418417d0
+
+      rkAinvT(1,1) = 1.543510591072668287198054583233180d0
+      rkAinvT(1,2) = -2.460228411937788329157493833295004d0
+      rkAinvT(1,3) = -.412906170450356277003910443520499d0
+      rkAinvT(2,1) = .209519643211838264029272585946993d0
+      rkAinvT(2,2) = 1.388545667194387164417459732995766d0
+      rkAinvT(2,3) = 1.20339553005832004974976023130002d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau1A_Coefficients
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3A_Coefficients
+!    The coefficients of the 4-stage Lobatto-3A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+
+! The coefficients of the Lobatto-3A method
+
+      rkMethod = L3A
+
+      rkA(0,0) = 0.0d0
+      rkA(0,1) = 0.0d0
+      rkA(0,2) = 0.0d0
+      rkA(0,3) = 0.0d0
+      rkA(1,0) = .11030056647916491413674311390609397d0
+      rkA(1,1) = .1896994335208350858632568860939060d0
+      rkA(1,2) = -.339073642291438837776604807792215d-1
+      rkA(1,3) = .1030056647916491413674311390609397d-1
+      rkA(2,0) = .73032766854168419196590219427239365d-1
+      rkA(2,1) = .4505740308958105504443271474458881d0
+      rkA(2,2) = .2269672331458315808034097805727606d0
+      rkA(2,3) = -.2696723314583158080340978057276063d-1
+      rkA(3,0) = .83333333333333333333333333333333333d-1
+      rkA(3,1) = .4166666666666666666666666666666667d0
+      rkA(3,2) = .4166666666666666666666666666666667d0
+      rkA(3,3) = .8333333333333333333333333333333333d-1
+      
+      rkB(0) = .83333333333333333333333333333333333d-1
+      rkB(1) = .4166666666666666666666666666666667d0
+      rkB(2) = .4166666666666666666666666666666667d0
+      rkB(3) = .8333333333333333333333333333333333d-1
+
+      rkC(0) = 0.0d0
+      rkC(1) = .2763932022500210303590826331268724d0
+      rkC(2) = .7236067977499789696409173668731276d0
+      rkC(3) = 1.0d0
+
+      ! New solution: H*Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(0) = 0.0d0
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+      
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = .90909090909090909090909090909090909d-1
+      rkBhat(1) = .39972675774621371442114262372173276d0
+      rkBhat(2) = .43360657558711961891219070961160058d0
+      rkBhat(3) = .15151515151515151515151515151515152d-1
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+
+      rkE(0) =  .1957403846510110711315759367097231d-1
+      rkE(1) = -.1986820345632580910316020806676438d0
+      rkE(2) =  .1660586371214229125096727578826900d0
+      rkE(3) = -.9787019232550553556578796835486154d-1
+
+      ! Sdirk error estimator: 
+      rkF(0) =  0.0d0
+      rkF(1) = -.66535815876916686607437314126436349d0
+      rkF(2) =  1.7419302743497277572980407931678409d0
+      rkF(3) = -1.2918865386966730694684011822841728d0
+       
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+      
+      ! Sdirk error estimator: 
+      rkBgam(0) =  .2950472755430528877214995073815946d-1
+      rkBgam(1) =  .5370310883226113978352873633882769d0
+      rkBgam(2) =  .2963022450107219354980459699450564d0
+      rkBgam(3) = -.7815248400375080035021681445218837d-1
+      rkBgam(4) =  .2153144231161121782447335303806956d0
+      
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(0) = 0.0d0
+      rkTheta(1) = -.6653581587691668660743731412643631d0
+      rkTheta(2) = 1.741930274349727757298040793167842d0
+      rkTheta(3) = -.291886538696673069468401182284174d0
+
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408063d0
+      rkAlpha = 3.677814645373914407088529289295968d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) = .5303036326129938105898786144870856d-1
+      rkT(1,2) = -.7776129960563076320631956091016914d-1
+      rkT(1,3) = .6043307469475508514468017399717112d-2
+      rkT(2,1) = .2637242522173698467283726114649606d0
+      rkT(2,2) = .2193839918662961493126393244533346d0
+      rkT(2,3) = .3198765142300936188514264752235344d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 7.695032983257654470769069079238553d0
+      rkTinv(1,2) = -.1453793830957233720334601186354032d0
+      rkTinv(1,3) = .6302696746849084900422461036874826d0
+      rkTinv(2,1) = -7.695032983257654470769069079238553d0
+      rkTinv(2,2) = .1453793830957233720334601186354032d0
+      rkTinv(2,3) = .3697303253150915099577538963125174d0
+      rkTinv(3,1) = -1.066660885401270392058552736086173d0
+      rkTinv(3,2) = 3.146358406832537460764521760668932d0
+      rkTinv(3,3) = -.7732056038202974770406168510664738d0
+
+      rkTinvAinv(1,1) = 35.73858579417120341641749040405149d0
+      rkTinvAinv(1,2) = -.675195748578927863668368190236025d0
+      rkTinvAinv(1,3) = 2.927206016036483646751158874041632d0
+      rkTinvAinv(2,1) = -24.55824590667225493437162206039511d0
+      rkTinvAinv(2,2) = -10.50514413892002061837750015342036
+      rkTinvAinv(2,3) = 4.072793983963516353248841125958369d0
+      rkTinvAinv(3,1) = -30.92301972744621647251975054630589d0
+      rkTinvAinv(3,2) = 12.08182467154052413351908559269928d0
+      rkTinvAinv(3,3) = -1.546411207640594954081233702132946d0
+
+      rkAinvT(1,1) = .2462926658317812882584158369803835d0
+      rkAinvT(1,2) = -.2647871194157644619747121197289574d0
+      rkAinvT(1,3) = .2950720515900466654896406799284586d0
+      rkAinvT(2,1) = 1.224833192317784474576995878738004d0
+      rkAinvT(2,2) = 1.929224190340981580557006261869763d0
+      rkAinvT(2,3) = .4066803323234419988910915619080306d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295968d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+
+  END SUBROUTINE Lobatto3A_Coefficients
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RungeKutta ! and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T , Told
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+    INTEGER :: i, j 
+#else
+    KPP_REAL :: JF(LU_NONZERO)
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+
+  END SUBROUTINE JAC_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.m
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.m	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta.m	(revision 3477)
@@ -0,0 +1,1519 @@
+function [T, Y, RCNTRL, ICNTRL, RSTAT, ISTAT] = ...
+    RK_Int(Function, Tspan, Y0, Options, RCNTRL, ICNTRL)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Implementation of Fully Implicit RK methods with the
+%  Coefficients:
+%               * Radau2A                                               
+%               * Lobatto3C                                             
+%               * Radau1A                                                
+%               * Gauss                                             
+%               * Lobatto3A                                              
+%                                                                     
+%    Solves the system y'=F(t,y) using a Fully Implicit RK method.
+%
+%    For details on Fully Implicit RK methods and their implementation consult:
+%      E. Hairer and G. Wanner
+%      "Solving ODEs II. Stiff and differential-algebraic problems".
+%      Springer series in computational mathematics, Springer-Verlag, 1996.
+%    The codes contained in the book inspired this implementation.
+%
+%    MATLAB implementation (C) Vishwas Rao (visrao@vt.edu).      
+%    Virginia Polytechnic Institute and State University             
+%    March, 2011    
+%
+%    Based on the Fortran90 implementation (C) Adrian Sandu, August 2004
+%    and revised by Philipp Miehe and Adrian Sandu, May 2006.
+%    Virginia Polytechnic Institute and State University
+%    Contact: sandu@cs.vt.edu
+%
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Input Arguments :
+%  The first four arguments are similar to the input arguments of 
+%  MATLAB's ODE solvers
+%      Function  - A function handle for the ODE function
+%      Tspan     - The time space to integrate
+%      Y0        - Initial value
+%      Options   - ODE solver options created by odeset():           
+%                  AbsTol, InitialStep, Jacobian, MaxStep, and RelTol
+%                  are considered.  Other options are ignored.       
+%                  'Jacobian' must be set.                           
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Output Arguments:
+%  The first two arguments are similar to the output arguments of
+%  MATLAB's ODE solvers
+%      T         - A vector of final integration times.
+%      Y         - A matrix of function values.  Y(T(i),:) is the value of
+%                  the function at the ith output time.
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%      RSTAT     - real output parameters (explained below)
+%      ISTAT     - integer output parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RCNTRL and ICNTRL on input and output:
+%
+%    Note: For input parameters equal to zero the default values of the
+%       corresponding variables are used.
+%
+%    
+%    ICNTRL(1) = 0: AbsTol, RelTol are N-dimensional vectors
+%              = 1: AbsTol, RelTol are scalars
+%
+%    ICNTRL(2)  -> selection of coefficients
+%        = 0 :    Radau2A
+%        = 1 :    Radau2A
+%        = 2 :    Lobatto3C
+%        = 3 :    Gauss
+%        = 4 :    Radau1A
+%        = 5 :    Lobatto3A
+%       
+%       
+%
+%    ICNTRL(4)  -> maximum number of integration steps
+%        For ICNTRL(4)=0) the default value of 100000 is used
+%
+%    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+%          It is strongly recommended to keep Hmin = ZERO
+%    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+%    RCNTRL(3)  -> Hstart, starting value for the integration step size
+%
+%    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+%    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+%    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+%                          (default=0.1)
+%    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+%         than the predicted value  (default=0.9)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RSTAT and ISTAT on output:
+%
+%    ISTAT(1)  -> No. of function calls
+%    ISTAT(2)  -> No. of jacobian calls
+%    ISTAT(3)  -> No. of steps
+%    ISTAT(4)  -> No. of accepted steps
+%    ISTAT(5)  -> No. of rejected steps (except at very beginning)
+%    ISTAT(6)  -> No. of LU decompositions
+%    ISTAT(7)  -> No. of forward/backward substitutions
+%    ISTAT(8)  -> No. of singular matrix decompositions
+%
+%    RSTAT(1)  -> Texit, the time corresponding to the
+%                     computed Y upon return
+%    RSTAT(2)  -> Hexit, last accepted step before exit
+%    RSTAT(3)  -> Hnew, last predicted step (not yet taken)
+%                   For multiple restarts, use Hnew as Hstart
+%                     in the subsequent run
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+global Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew
+% Parse ODE options
+AbsTol = odeget(Options, 'AbsTol');
+if isempty(AbsTol)
+    AbsTol = 1.0e-3;
+end
+Hstart = odeget(Options, 'InitialStep');
+if isempty(Hstart)
+    Hstart = 0;
+end
+Jacobian = odeget(Options, 'Jacobian');
+if isempty(Jacobian)
+    error('A Jacobian function is required.');
+end
+Hmax = odeget(Options, 'MaxStep');
+if isempty(Hmax)
+    Hmax = 0;
+end
+RelTol = odeget(Options, 'RelTol');
+if isempty(RelTol)
+    RelTol = 1.0e-4;
+end
+% Initialize statistics
+Nfun=1; Njac=2; Nstp=3; Nacc=4; Nrej=5; Ndec=6; Nsol=7; Nsng=8;
+Ntexit=1; Nhexit=2; Nhnew=3;
+RSTATUS = zeros(20,1);
+ISTATUS = zeros(20,1);
+
+% Get problem size
+steps = length(Tspan);
+N = max(size(Y0));
+
+% Initialize tolerances
+ATOL = ones(N,1)*AbsTol;
+RTOL = ones(N,1)*RelTol;
+
+% Initialize step
+RCNTRL(2) = max(0, Hmax);
+RCNTRL(3) = max(0, Hstart);
+
+% Integrate
+Y = zeros(N,steps);
+T = zeros(steps,1);
+Y(:,1) = Y0;
+T(1) = Tspan(1);
+t=cputime;
+for i=2:steps
+    [T(i), Y(:,i), IERR,ISTATUS,RSTATUS] = ...
+        RK_Integrate(N, Y(:,i-1), T(i-1), Tspan(i), ...
+            Function, Jacobian, ATOL, RTOL, RCNTRL, ICNTRL,ISTATUS,RSTATUS);
+
+    if IERR < 0
+        error(['IRK exited with IERR=',num2str(IERR)]);
+    end
+
+end
+cputime-t
+RSTAT=RSTATUS;
+ISTAT=ISTATUS;
+%~~~>  Statistics on the work performed by the RK method
+function [T,Y,Ierr,ISTATUS,RSTATUS] = RK_Integrate(N,Y0,TIN, TOUT,OdeFunction1,...
+    OdeJacobian1,ATOL,RTOL,RCNTRL,ICNTRL,ISTATUS,RSTATUS)
+global ZERO ONE Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhacc Nhnew
+global R2A R1A L3C GAU L3A RKmax
+ZERO =0;ONE=1;Nfun=1;Njac=2;Nstp=3;Nacc=4;Nrej=5;Ndec=6;Nsol=7;Nsng=8;
+Ntexit=1;Nhacc=2;Nhnew=3;RKmax=3;R2A=1;R1A=2;L3C=3;GAU=4;L3A=5;
+Ierr =0;
+RSTATUS = zeros(20,1);
+ISTATUS = zeros(20,1);
+T1 = TIN;
+T2 = TOUT;
+Y(:,1)=Y0;
+[T,Y,Ierr,RSTATUS,ISTATUS] = RungeKutta(N, T1,T2,Y0,RTOL,ATOL,RCNTRL,ICNTRL,RSTATUS,ISTATUS,Ierr,OdeFunction1,OdeJacobian1);
+
+
+
+
+
+if(Ierr < 0)
+    disp('Runge-kutta Unsuccessful exit at T=',num2str(TIN));
+end
+return
+
+function [T,Y,Ierr,RSTATUS,ISTATUS]=RungeKutta(N,T1,T2,Y,RelTol,AbsTol,RCNTRL,...
+    ICNTRL,ISTATUS,RSTATUS,Ierr,OdeFunction1,OdeJacobian1)
+global ZERO  Roundoff SdirkError
+T=T1;
+
+if (ICNTRL(1)==0)
+	    ITOL=1;
+else
+	    ITOL=0;
+end
+
+if(ICNTRL(9)==0)
+    SdirkError = 0;
+else
+    SdirkError = 1;
+end
+
+switch(ICNTRL(2))
+	case{0,1}
+		Radau2A_Coefficients();
+	case(2)
+		Lobatto3C_Coefficients(); 
+	case(3)
+		Gauss_Coefficients();
+	case(4)
+		Radau1A_Coefficients();
+	case(5)
+		Lobatto3A_Coefficients();
+	otherwise
+		disp(['ICNTRL(2)=',num2str(ICNTRL(2))]);
+		RK_ErrorMsg(-13,Tin,0,IERR);
+		return;
+end
+
+if (ICNTRL(3)==0)
+		Max_no_steps=200000;
+else 
+		Max_no_steps=ICNTRL(3);
+        if(Max_no_steps<0)
+            disp(['User-selected max no. of steps is -ve and is ',num2str(ICNTRL(3))]);
+        end
+end
+
+if (ICNTRL(4)==0)
+	NewtonMaxit=8;
+else
+	NewtonMaxit=ICNTRL(4);
+	if NewtonMaxit<=0
+		disp(['User-selected max no. of newton iterations is -ve and is ',num2str(ICNTRL(5))]);
+		RK_ErrorMsg(-2, T, ZERO, IERR);
+	end
+end
+
+if (ICNTRL(5)==0)
+    StartNewton=1;
+else
+    StartNewton =0;
+end
+
+if(ICNTRL(10)==0)
+    Gustafsson = 1;
+else
+    Gustafsson = 0;
+end
+Roundoff = eps;
+if(RCNTRL(1)==ZERO)
+    Hmin = ZERO;
+else
+    Hmin = min(abs(RCNTRL(1)),abs(T2 -T1));
+end
+if(RCNTRL(2)==ZERO)
+    Hmax=abs(T2-T1);
+else
+	Hmax= min(abs(RCNTRL(2)),abs(T2-T1));
+end
+if RCNTRL(3)==0
+	Hstart=0;
+else
+	Hstart = min(abs(RCNTRL(3)),abs(T2-T1));
+end
+
+%FacMin-- Lower bound on step decrease factor
+if (RCNTRL(4) == 0)
+	FacMin = 0.2;
+else 
+   	FacMin = RCNTRL(4);
+end
+%FacMax--Upper bound on step increase factor
+if RCNTRL(5)==0
+	FacMax=8.0;
+else
+	FacMax=RCNTRL(5);
+end
+%FacRej--step decrease factor after 2 consecutive rejections
+if RCNTRL(6)==0
+	FacRej=0.1;
+else
+	FacRej=RCNTRL(6);
+end
+
+%Facsafe:by which the new step is slightly smaller than the 
+	%predicted value
+if RCNTRL(7)==0
+	FacSafe=0.9;
+else
+	FacSafe=RCNTRL(7);
+end
+
+if ( (FacMax < 1) ||( FacMin > 1) || (FacSafe <= 1.0e-03) || (FacSafe >= 1) )
+	disp(['\n RCNTRL(5)=',num2str(RCNTRL(4)) ' RCNTRL[5]=',num2str(RCNTRL(5)) ' RCNTRL[6]=', num2str(RCNTRL(6)) ' RCNTRL[7]=',num2str(RCNTRL(7))]);
+	RK_ErrorMsg(-4, T, ZERO, Ierr);
+end
+
+%ThetaMin: Decides whether the jacobian should be recomputed
+if RCNTRL(8)==0
+	ThetaMin=1.0e-03;
+else
+	ThetaMin=RCNTRL(8);
+end
+if (ThetaMin <= 0.0 || ThetaMin >= 1.0)
+	disp(['RCNTRL[8]=', num2str(RCNTRL(8))]);
+	RK_ErrorMsg(-5, Tin, ZERO, Ierr);
+end
+
+if RCNTRL(9)==0
+	NewtonTol = 3.0e-02;
+else 
+	NewtonTol = RCNTRL(9);
+	if NewtonTol<=Roundoff
+		disp(['RCNTRL(9)=',num2str(RCNTRL(9))]);
+		RK_ErrorMsg(-6, Tin, ZERO,Ierr);
+	end
+end
+
+%Qmin and Qmax: If Qmin < Hnew/Hold < Qmax then step size is constant
+if RCNTRL(10)==0
+	Qmin=1;
+else
+	Qmin = RCNTRL(10);
+end
+if RCNTRL(11)==0
+	Qmax=1.2;
+else
+	Qmax=RCNTRL(11);
+end
+if (Qmin > 1 || Qmax <1)
+	disp(['Qmin=', num2str(RCNTRL(10)) ' Qmax=',num2str(RCNTRl(11))]);
+	RK_ErrorMsg(-7, T, ZERO, Ierr);
+end
+
+%check if tolerances are reasonable
+if ITOL==0
+	if AbsTol(1)<=0 ||  RelTol(1) <= 10.0*Roundoff
+		disp(['AbsTol=', num2str(AbsTol(1)) ' RelTol=',num2str(RelTol(1))]);
+		RK_ErrorMsg(-8, T, ZERO, Ierr);
+	end
+else
+	for i=1:N 
+        if (( AbsTol(i) <= 0) || (RelTol(i) <= 10.0*Roundoff) ) 
+            disp(['AbsTol(',num2str(i) ')= ',num2str(AbsTol(i))]);
+			disp(['RelTol(',num2str(i) ')=  ',RelTol(i)]);
+			RK_ErrorMsg(-8, T, ZERO, Ierr);
+        end
+	end 
+end
+
+if(Ierr < 0)
+    return;
+end
+%Call the core Integrator
+[T,Y,Ierr,ISTATUS,RSTATUS] = RK_Integrator(N,T1,T2,Y,Hstart,Hmin,...
+                            Hmax,Roundoff,AbsTol,RelTol,...
+                            ITOL,Max_no_steps,StartNewton,NewtonTol,ThetaMin,...
+                            FacSafe,FacMin,FacMax,FacRej,Qmin,Qmax,NewtonMaxit,ISTATUS,RSTATUS,Gustafsson,Ierr,OdeFunction1,OdeJacobian1);
+return;
+
+
+
+function [T,Y,Ierr,ISTATUS,RSTATUS] = RK_Integrator(N,T1,T2,Y,Hstart,Hmin,Hmax,...
+                                      Roundoff,AbsTol,RelTol,ITOL,Max_no_steps,...
+                                      StartNewton,NewtonTol,ThetaMin,FacSafe,FacMin,...
+                                      FacMax,FacRej,Qmin,Qmax,NewtonMaxit,ISTATUS,...
+                                      RSTATUS,Gustafsson,Ierr,OdeFunction1,OdeJacobian1)
+global SdirkError ZERO Nfun Njac Nsng  Nstp ONE rkMethod L3A rkBgam
+global rkTheta rkGamma rkD rkELO Nacc Ntexit Nhacc Nhnew Hacc
+T = T1;
+CONT=zeros(N,3);
+Tdirection = sign(T2-T);
+H = min (max(abs(Hmin),abs(Hstart)),Hmax);
+if(abs(H)<=10*Roundoff)
+    H=1.0e-6;
+end
+H =sign(Tdirection)*abs(H);
+Hold = H;
+Reject = 0;
+FirstStep = 1;
+SkipJac = 0;
+SkipLU = 0;
+if((T+H*1.0001-T2)*Tdirection>=ZERO)
+    H = T2 -T;
+end
+Nconsecutive = 0;
+SCAL = RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y);
+while((T2-T)*Tdirection-Roundoff>ZERO)
+    F0 = OdeFunction1(T,Y);
+    ISTATUS(Nfun)=ISTATUS(Nfun)+1;
+    if(SkipLU == 0)
+        if(SkipJac==0)
+            FJAC = OdeJacobian1(T,Y);
+            ISTATUS(Njac)=ISTATUS(Njac)+1;
+        end
+        [E1L,E1U,E2L,E2U,ISING,ISTATUS]=RK_Decomp(N,H,FJAC,ISTATUS);
+        if(ISING ~= 0)
+            ISTATUS(Nsng)=ISTATUS(Nsng)+1;
+            Nconsecutive=Nconsecutive+1;
+            if(Nconsecutive>=5)
+                RK_ErrorMsg(-12,T,H,Ierr);
+            end
+            H=H*0.5;
+            Reject = 1;
+            SkipJac = 1;
+            SkipLU = 0;
+            continue;
+        else
+            Nconsecutive = 0;
+        end
+    end
+    ISTATUS(Nstp)=ISTATUS(Nstp)+1;
+    if (ISTATUS(Nstp)>Max_no_steps)
+		disp(['Max number of time steps is =', num2str(Max_no_steps)]);
+		RK_ErrorMsg(-9,T,H,IERR);
+    end
+    if (0.1*abs(H)<=abs(T)*Roundoff)
+		RK_ErrorMsg(-10,T,H,Ierr);
+    end
+    %Loop for simplified newton iterations
+
+	%Starting values for newton iterations
+    if((FirstStep==1)||(StartNewton==0))
+			Z1=zeros(N,1);
+			Z2=zeros(N,1);
+			Z3=zeros(N,1);
+	else
+		evaluate=2;
+		[CONT, Z1, Z2, Z3]=RK_Interpolate(evaluate, N, H, Hold,Z1,Z2,Z3,CONT);
+    end
+    
+    %/*~~~> Initializations for Newton iteration */
+    
+    NewtonDone = 0;
+    Fac = 0.5;
+    for NewtonIter=1:NewtonMaxit
+        %Preparing RHS
+        [R1,R2,R3]=RK_PrepareRHS(N,T,H,Y,F0,Z1,Z2,Z3,OdeFunction1);
+        %Solve the linear systems
+        [R1,R2,R3,ISTATUS] = RK_Solve(N,H,E1L,E1U,E2L,E2U,R1,R2,R3,ISTATUS);
+        %Find NewtonIncrement
+        NewtonIncrement=sqrt((RK_ErrorNorm(N,SCAL,R1)*RK_ErrorNorm(N,SCAL,R1)...
+									+RK_ErrorNorm(N,SCAL,R2)*RK_ErrorNorm(N,SCAL,R2)...
+									+RK_ErrorNorm(N,SCAL,R3)*RK_ErrorNorm(N,SCAL,R3))...
+							/3.0);
+        if(NewtonIter == 1)
+            Theta = abs(ThetaMin);
+            NewtonRate = 2.0;
+        else
+            Theta = NewtonIncrement/NewtonIncrementOld;
+            if(Theta < 0.99)
+                NewtonRate = Theta/(ONE-Theta);
+            else
+                break
+            end
+            if(NewtonIter<NewtonMaxit)
+                NewtonPredictedErr = NewtonIncrement*Theta^(NewtonMaxit-NewtonIter)/(ONE - Theta);
+                if(NewtonPredictedErr>=NewtonTol)
+                    Qnewton = min(10.0,NewtonPredictedErr/NewtonTol);
+                    Fac = 0.8*Qnewton^(-ONE/(1+NewtonMaxit-NewtonIter));
+                    break
+                end
+            end
+        end
+        NewtonIncrementOld=max(NewtonIncrement,Roundoff);
+        Z1=Z1-R1; 
+        Z2=Z2-R2;
+        Z3=Z3-R3;
+        NewtonDone = (NewtonRate*NewtonIncrement<=NewtonTol);
+        if(NewtonDone==1)
+            break;
+        end
+        if(NewtonIter==NewtonMaxit)
+            disp('Slow or no convergence in newton iterations');
+			disp('Max no of newton iterations reached');
+        end
+    end
+    if(NewtonDone == 0)
+        H=Fac*H;
+        Reject=1;
+        SkipJac=1;
+		SkipLU=0;
+        continue;
+    end
+    %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    %/*~~~> SDIRK Stage */
+    %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    if(SdirkError==1)
+        Z4=Z3;
+        G=zeros(N,1);
+        if(rkMethod ~= L3A)
+            G=G+rkBgam(1)*H*F0;
+        end
+        G=G+Z1*rkTheta(1);
+        G=G+Z2*rkTheta(2);
+        G=G+Z3*rkTheta(3);
+        NewtonDone = 0;
+        Fac = 0.5;
+        for NewtonIter=1:NewtonMaxit
+            TMP=Y+Z4;
+            R4=OdeFunction1(T+H,TMP);
+            ISTATUS(Nfun)=ISTATUS(Nfun)+1;
+            R4=R4-(rkGamma/H)*Z4;
+            R4=R4+(rkGamma/H)*G;
+            [R4,ISTATUS] = RK_KppSolve(E1L,E1U,R4,ISTATUS);
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,R4);
+            if(NewtonIter==1)
+                ThetaSD=abs(ThetaMin);
+                NewtonRate = 2.0;
+            else
+                ThetaSD = NewtonIncrement/NewtonIncrementOld;
+                if(ThetaSD<0.99)
+                    NewtonRate = ThetaSD/(ONE - ThetaSD);
+                    NewtonPredictedErr=NewtonIncrement*ThetaSD^((NewtonMaxit-NewtonIter)/(1-ThetaSD));
+                    if(NewtonPredictedErr>=NewtonTol)
+						Qnewton=min(10.0,NewtonPredictedErr/NewtonTol);
+						Fac=0.8*Qnewton^(-1/(1+NewtonMaxit-NewtonIter));
+						break;
+                    end
+                else
+                    break;
+                end
+            end
+            NewtonIncrementOld = NewtonIncrement;
+            Z4 = Z4+R4;
+            %Check error in NewtonIterations
+            NewtonDone=(NewtonRate*NewtonIncrement<=NewtonTol);
+            if(NewtonDone==1)
+                break;
+            end
+        end
+        if(NewtonDone == 0)
+            H=Fac*H;
+            Reject =1;
+            SkipJac=1;
+            SkipLU = 0;
+            continue;
+        end
+    end
+    %/*~~~> End of Simplified SDIRK Newton iterations */
+
+    %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    %/*~~~> Error estimation */
+    %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    if(SdirkError==1)
+        R4=zeros(N,1);
+        if(rkMethod==L3A)
+            R4=H*rkF(1)*F0;
+            if(rkF(2)~=ZERO)
+                R4=R4+Z1*rkF(1);
+            end
+            
+            if(rkF(3)~=ZERO)
+                R4=R4+Z2*rkF(2);
+            end
+            
+            if(rkF(4)~=ZERO)
+                R4=R4+Z3*rkF(3);
+            end
+            
+            TMP = Y+Z4;
+            R1 = OdeFunction1(T+H,TMP);
+            R4=R4+H*rkBgam(5)*R1;
+        else
+            if(rkD(1)~=0)
+                R4=R4+rkD(1)*Z1;
+            end
+            if(rkD(2)~=ZERO)
+                R4=R4+rkD(2)*Z2;
+            end
+            if(rkD(3)~=ZERO)
+                R4=R4+rkD(3)*Z3;
+            end
+            R4=R4-Z4;
+        end
+		Err=RK_ErrorNorm(N,SCAL,R4);
+    else
+        [Err,ISTATUS]=RK_ErrorEstimate(N,H,T,Y,F0,E1L,E1U,Z1,Z2,Z3,SCAL,...
+							FirstStep,Reject,ISTATUS);
+    end
+    Fac=Err^(-1/rkELO)*min(FacSafe,(1+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit));
+	Fac=min(FacMax,max(FacMin,Fac));
+	Hnew=Fac*H;
+    %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    %/*~~~> Accept/reject step */
+    %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+    
+    %Accept
+    if(Err < ONE)
+        FirstStep =0;
+        ISTATUS(Nacc)=ISTATUS(Nacc)+1;
+        if(Gustafsson==ONE)
+            if(ISTATUS(Nacc)>1)
+                FacGus=FacSafe*(H/Hacc)*(Err*Err/ErrOld)^(-0.25);
+				FacGus=min(FacMax,max(FacMin,FacGus));
+				Fac=min(Fac,FacGus);
+				Hnew=Fac*H;
+            end
+            Hacc=H;
+			ErrOld=max(1.0e-02,Err);
+        end
+        Hold=H;
+		T=T+H;
+		if(rkD(1)~=0)
+			Y=Y+Z1*rkD(1);
+		end
+		if(rkD(2)~=0)
+			Y=Y+Z2*rkD(2);
+		end;
+		if(rkD(3)~=0)
+			Y=Y+Z3*rkD(3);
+		end;
+        %Construct the solution quadratic interpolant Q(c_i)=Z_i,i=1:3
+		if(StartNewton==1)
+			evaluate=1;
+			[CONT, Z1, Z2, Z3]=RK_Interpolate(evaluate, N, H, Hold,Z1,Z2,Z3,CONT);
+		end
+		SCAL=RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y);
+		RSTATUS(Ntexit)=T;
+		RSTATUS(Nhnew)=Hnew;
+		RSTATUS(Nhacc)=H;
+		Hnew=Tdirection*min(max(abs(Hnew),Hmin),Hmax);
+        if(Reject==1)
+			Hnew=Tdirection*min(abs(Hnew),abs(H));
+        end;
+		Reject=0;
+        if((T + Hnew/Qmin - T2)*Tdirection>=0)
+			H=T2-T;
+		else
+			Hratio=Hnew/H;
+			SkipLU=((Theta<=ThetaMin) && (Hratio>=Qmin) && (Hratio<=Qmax));
+			if(SkipLU==0)
+				H=Hnew;
+			end;
+            
+        end;
+         SkipJac=0;
+		
+        else
+			if((FirstStep==1) || (Reject==1))
+				H=FacRej*H;
+			else
+				H=Hnew;
+			end;
+			Reject=1;
+			SkipJac=1;
+			SkipLU=0;
+			if(ISTATUS(Nacc)>=1)
+				ISTATUS(Nrej)=ISTATUS(Nrej)+1;
+			end;
+		end;
+	end;
+	Ierr=1;
+
+return;
+
+function [Err,ISTATUS]=RK_ErrorEstimate(N,H,T,Y,F0,E1L,E1U,Z1,Z2,Z3,SCAL,...
+							FirstStep,Reject,ISTATUS)
+global rkE rkMethod R1A GAU L3A
+HrkE1=rkE(2)/H;
+HrkE2=rkE(3)/H;
+HrkE3=rkE(4)/H;
+F2=HrkE1*Z1+HrkE2*Z2+HrkE3*Z3;
+TMP = rkE(1)*F0+F2;
+[TMP,ISTATUS]=RK_KppSolve(E1L,E1U,TMP,ISTATUS);
+if((rkMethod == R1A) || (rkMethod == GAU) || (rkMethod == L3A))
+	[TMP,ISTATUS]=RK_KppSolve(E1L,E1U,TMP,ISTATUS);
+end
+
+if (rkMethod == GAU)
+	[TMP,ISTATUS]=RK_KppSolve(E1L,E1U,TMP,ISTATUS);
+end
+Err=RK_ErrorNorm(N,SCAL,TMP);
+if(Err < 1)
+    return;
+end
+if((FirstStep==1 )||(Reject==1))
+    TMP=TMP+Y;
+    F1=OdeFunction1(T,TMP);
+    ISTATUS(Nfun)=ISTATUS(Nfun)+1;
+    TMP=F1+F2;
+    [TMP,ISTATUS]=RK_KppSolve(E1L,E1U,TMP,ISTATUS);
+    Err=RK_ErrorNorm(N,SCAL,TMP);
+end
+return
+
+function RK_ErrorMsg(Code, T, H, IERR)
+	
+	Code=IERR;
+	disp('Forced to exit from RungeKutta due to the following error:');
+	switch(Code)
+		case(-1)
+			disp('--> Improper value for maximal no of steps');
+		case (-2)
+      		disp('--> Improper value for maximal no of Newton iterations');
+   		case (-3)
+      		disp('--> Hmin/Hmax/Hstart must be positive');
+   		case (-4)
+      		disp('--> Improper values for FacMin/FacMax/FacSafe/FacRej');
+   		case (-5)
+      		disp('--> Improper value for ThetaMin');
+   		case (-6)
+      		disp('--> Newton stopping tolerance too small');
+   		case (-7)
+      		disp('--> Improper values for Qmin, Qmax');
+   		case (-8)
+      		disp('--> Tolerances are too small');
+   		case (-9)
+      		disp('--> No of steps exceeds maximum bound');
+   		case (-10)
+      		disp('--> Step size too small: (T + 10*H = T) or H < Roundoff');
+   		case (-11)
+      		disp('--> Matrix is repeatedly singular');
+   		case (-12)
+      		disp('--> Non-convergence of Newton iterations');
+   		case (-13)
+      		disp('--> Requested RK method not implemented');
+   		otherwise
+      		disp(['Unknown Error code:', num2str(Code)]);
+	end;
+
+   	disp(['T=',num2str(T) 'H=',num2str(H)]);
+return;
+
+function SCAL=RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y)
+	if(ITOL==0)
+        SCAL=1./(AbsTol(1)+RelTol(1)*abs(Y));
+    else
+        SCAL=1./(AbsTol+RelTol.*abs(Y));
+	end;
+return;
+
+function ErrorNorm = RK_ErrorNorm(N,SCAL,DY)
+
+    temp=DY.*DY.*SCAL.*SCAL;
+    ErrorNorm = sum(temp);
+ErrorNorm=max(sqrt(ErrorNorm/N),1.0e-10);
+
+function [CONT, Z1, Z2, Z3]=RK_Interpolate(action, N, H, Hold,Z1,Z2,Z3,CONT)
+	global rkC
+    
+
+	if(action==1) %Make
+		den=(rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3));
+		for i=1:N
+			CONT(i,1)=(-rkC(3)*rkC(3)*rkC(2)*Z1(i)...
+					  +Z3(i)*rkC(2)*rkC(1)*rkC(1)...
+	   				  +rkC(2)*rkC(2)*rkC(3)*Z1(i)...
+	   				  -rkC(2)*rkC(2)*rkC(1)*Z3(i)...
+	   				  +rkC(3)*rkC(3)*rkC(1)*Z2(i)...
+	   		          -Z2(i)*rkC(3)*rkC(1)*rkC(1))/den-Z3(i);
+			CONT(i,2) = -( rkC(1)*rkC(1)*(Z3(i)-Z2(i))...
+	   		+ rkC(2)*rkC(2)*(Z1(i)-Z3(i))...
+	   		+ rkC(3)*rkC(3)*(Z2(i)-Z1(i)) )/den;
+
+			CONT(i,3) = ( rkC(1)*(Z3(i)-Z2(i))...
+	   		+ rkC(2)*(Z1(i)-Z3(i))...
+	   		+ rkC(3)*(Z2(i)-Z1(i)) )/den;
+		end;
+    end
+    
+    if (action==2) %Eval
+		r=H/Hold;
+		x1=1+rkC(1)*r;
+		x2 = 1 + rkC(2)*r;
+		x3 = 1 + rkC(3)*r;
+		for i=1:N
+		
+			Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3));	
+			Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3));	
+			Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3));
+		end;
+    end;
+return;
+
+
+
+function [R1,R2,R3]=RK_PrepareRHS(N,T,H,Y,FO,Z1,Z2,Z3,OdeFunction1)
+	global rkMethod 
+	global rkA rkC 
+    global L3A
+	R1=Z1;
+	R2=Z2;
+	R3=Z3;
+	if(rkMethod==L3A)
+		R1=R1-H*rkA(1,1)*FO;
+		R2=R2-H*rkA(2,1)*FO;
+		R3=R3-H*rkA(3,1)*FO;
+	end
+	TMP=Y+Z1;
+	F=OdeFunction1(T+rkC(1)*H,TMP);	
+	R1=R1-H*rkA(1,1)*F;
+	R2=R2-H*rkA(2,1)*F;
+	R3=R3-H*rkA(3,1)*F;
+
+	TMP=Y+Z2;
+	F=OdeFunction1(T+rkC(2)*H,TMP);
+	R1=R1-H*rkA(1,2)*F;
+	R2=R2-H*rkA(2,2)*F;
+	R3=R3-H*rkA(3,2)*F;
+
+	TMP=Y+Z3;
+	F=OdeFunction1(T+rkC(3)*H,TMP);
+	R1=R1-H*rkA(1,3)*F;
+	R2=R2-H*rkA(2,3)*F;
+	R3=R3-H*rkA(3,3)*F;
+return;
+
+function [E1L,E1U,E2L,E2U,ISING,ISTATUS]=RK_Decomp(N, H, FJAC,ISTATUS)
+	global Ndec 
+	global rkGamma rkAlpha rkBeta 
+    ISING =0;
+	Gamma = rkGamma / H;
+   	Alpha = rkAlpha / H;
+   	Beta  = rkBeta / H;
+	E1=Gamma*eye(N);
+    E1=E1-FJAC;
+
+
+	
+	[E1L,E1U]=lu(E1);
+    ISTATUS(Ndec)=ISTATUS(Ndec)+1;
+	if(det(E1L)==0 || det(E1U)==0)
+		ISING=1;
+	end;
+    
+	if(ISING ~= 0)
+		
+		return;
+	end;
+    E2R=complex(Alpha,Beta)*eye(N)-FJAC;
+	
+	[E2L,E2U]=lu(E2R);
+    ISTATUS(Ndec)=ISTATUS(Ndec)+1;
+	if(abs(det(E2L))==0 || abs(det(E2U))==0)
+		ISING=1;
+	end;
+	if(ISING ~= 0)
+		return;
+	end;
+    
+return
+
+function [R1,R2,R3,ISTATUS]=RK_Solve(N,H,E1L,E1U,E2L,E2U,R1,R2,R3,ISTATUS)
+	global Nsol  
+	global rkT rkTinvAinv 
+	for i=1:N
+		x1=R1(i)/H;
+		x2=R2(i)/H;
+		x3=R3(i)/H;
+		R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3;
+		R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3;
+		R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3;
+	end;
+	tmp = E1L\R1;
+	R1 =  E1U\tmp;
+	BCR=R2;
+	BCI=R3;
+	a1=complex(BCR,BCI);
+	tmp = E2L\a1;
+	BC = E2U\tmp;
+	R2=real(BC);
+	R3=imag(BC);
+	for i=1:N
+		x1 = R1(i);
+		x2 = R2(i);
+		x3 = R3(i);
+        R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3;
+		R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3;
+		R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3;
+	end
+	ISTATUS(Nsol)=ISTATUS(Nsol)+1;
+return
+
+function [R4,ISTATUS]=RK_KppSolve(E1L,E1U,R4,ISTATUS)
+global Nsol
+temp = E1L\R4;
+R4=E1U\temp;
+ISTATUS(Nsol)=ISTATUS(Nsol)+1;
+return
+
+
+
+
+function Radau2A_Coefficients ()
+
+	global rkMethod SdirkError
+	global rkT rkTinv rkTinvAinv rkAinvT rkA rkB rkC rkD rkE
+	global rkBgam  rkTheta  rkGamma rkAlpha rkBeta rkELO
+	global R2A 
+
+	
+	if(SdirkError==1)
+		b0=0.2e-01;
+	else
+		b0=0.5e-01;
+	end;
+	rkMethod=R2A;
+   	rkA(1,1) = 1.968154772236604258683861429918299e-01;
+	rkA(1,2) = -6.55354258501983881085227825696087e-02;
+	rkA(1,3) = 2.377097434822015242040823210718965e-02;
+	rkA(2,1) = 3.944243147390872769974116714584975e-01;
+	rkA(2,2) = 2.920734116652284630205027458970589e-01;
+	rkA(2,3) = -4.154875212599793019818600988496743e-02;
+	rkA(3,1) = 3.764030627004672750500754423692808e-01;
+	rkA(3,2) = 5.124858261884216138388134465196080e-01;
+	rkA(3,3) = 1.111111111111111111111111111111111e-01;
+
+	rkB(1) = 3.764030627004672750500754423692808e-01;
+	rkB(2) = 5.124858261884216138388134465196080e-01;
+	rkB(3) = 1.111111111111111111111111111111111e-01;
+
+	rkC(1) = 1.550510257216821901802715925294109e-01;
+	rkC(2) = 6.449489742783178098197284074705891e-01;
+	rkC(3) = 1;
+
+	% New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j 
+	rkD(1) =0;
+	rkD(2) =0;
+	rkD(3) =1;
+
+	% Classical error estimator: */
+	% H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+	rkE(1) = 1*b0;
+	rkE(2) = -10.04880939982741556246032950764708*b0;
+	rkE(3) = 1.382142733160748895793662840980412*b0;
+	rkE(4) = -.3333333333333333333333333333333333*b0;
+
+    %	/* Sdirk error estimator */
+	rkBgam(1) = b0;
+	rkBgam(2) = .3764030627004672750500754423692807...
+			-1.558078204724922382431975370686279*b0;
+	rkBgam(3) = 0.8914115380582557157653087040196118*b0...
+			+0.5124858261884216138388134465196077;
+	rkBgam(4) = (-0.1637777184845662566367174924883037)...
+			-0.3333333333333333333333333333333333*b0;
+	rkBgam(5) = 0.2748888295956773677478286035994148;
+
+	% H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+	rkTheta(1) = (-1.520677486405081647234271944611547)...
+			-10.04880939982741556246032950764708*b0;
+	rkTheta(2) = (2.070455145596436382729929151810376)...
+			+1.382142733160748895793662840980413*b0;
+	rkTheta(3) = -0.3333333333333333333333333333333333*b0...
+			-.3744441479783868387391430179970741;
+
+	%/* Local order of error estimator */
+	if ( b0 == 0)
+		rkELO  = 6.0;
+	else
+		rkELO  = 4.0;
+	end;
+
+	%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	 % ~~~> Diagonalize the RK matrix:
+	  %rkTinv * inv(rkA) * rkT =
+	  %|  rkGamma      0           0     |
+	  %|      0      rkAlpha   -rkBeta   |
+	  %|      0      rkBeta     rkAlpha  |
+	  %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+	rkGamma = 3.637834252744495732208418513577775;
+	rkAlpha = 2.681082873627752133895790743211112;
+	rkBeta  = 3.050430199247410569426377624787569;
+
+	rkT(1,1) = 9.443876248897524148749007950641664e-02;
+	rkT(1,2) = -1.412552950209542084279903838077973e-01;
+	rkT(1,3) = -3.00291941051474244918611170890539e-02;
+	rkT(2,1) = 2.502131229653333113765090675125018e-01;
+	rkT(2,2) = 2.041293522937999319959908102983381e-01;
+	rkT(2,3) = 3.829421127572619377954382335998733e-01;
+	rkT(3,1) =  1;
+	rkT(3,2) =  1;
+	rkT(3,3) =  0;
+
+	rkTinv(1,1) = 4.178718591551904727346462658512057;
+	rkTinv(1,2) = 3.27682820761062387082533272429617e-01;
+	rkTinv(1,3) = 5.233764454994495480399309159089876e-01;
+	rkTinv(2,1) = -4.178718591551904727346462658512057;
+	rkTinv(2,2) = -3.27682820761062387082533272429617e-01;
+	rkTinv(2,3) = 4.766235545005504519600690840910124e-01;
+	rkTinv(3,1) = -5.02872634945786875951247343139544e-01;
+	rkTinv(3,2) = 2.571926949855605429186785353601676;
+	rkTinv(3,3) = -5.960392048282249249688219110993024e-01;
+
+	rkTinvAinv(1,1) = 1.520148562492775501049204957366528e+01;
+	rkTinvAinv(1,2) = 1.192055789400527921212348994770778;
+	rkTinvAinv(1,3) = 1.903956760517560343018332287285119;
+	rkTinvAinv(2,1) = -9.669512977505946748632625374449567;
+	rkTinvAinv(2,2) = -8.724028436822336183071773193986487;
+	rkTinvAinv(2,3) = 3.096043239482439656981667712714881;
+	rkTinvAinv(3,1) = -1.409513259499574544876303981551774e+01;
+	rkTinvAinv(3,2) = 5.895975725255405108079130152868952;
+	rkTinvAinv(3,3) = -1.441236197545344702389881889085515e-01;
+
+	rkAinvT(1,1) = .3435525649691961614912493915818282;
+	rkAinvT(1,2) = -.4703191128473198422370558694426832;
+	rkAinvT(1,3) = .3503786597113668965366406634269080;
+	rkAinvT(2,1) = .9102338692094599309122768354288852;
+	rkAinvT(2,2) = 1.715425895757991796035292755937326;
+	rkAinvT(2,3) = .4040171993145015239277111187301784;
+	rkAinvT(3,1) = 3.637834252744495732208418513577775;
+	rkAinvT(3,2) = 2.681082873627752133895790743211112;
+	rkAinvT(3,3) = -3.050430199247410569426377624787569;
+return;
+
+function Lobatto3C_Coefficients()
+	
+	global rkMethod SdirkError
+	global rkT rkTinv rkTinvAinv rkAinvT rkA rkB rkC rkD rkE
+	global rkBgam rkBhat rkTheta rkGamma rkAlpha rkBeta rkELO
+	global L3C 
+
+	
+
+	rkMethod=L3C;
+	if(SdirkError==1)
+		b0=0.2;
+	else
+		b0=0.5;
+	end;
+	rkA(1,1) = .1666666666666666666666666666666667;
+	rkA(1,2) = -.3333333333333333333333333333333333;
+	rkA(1,3) = .1666666666666666666666666666666667;
+	rkA(2,1) = .1666666666666666666666666666666667;
+	rkA(2,2) = .4166666666666666666666666666666667;
+	rkA(2,3) = -.8333333333333333333333333333333333e-01;
+	rkA(3,1) = .1666666666666666666666666666666667;
+	rkA(3,2) = .6666666666666666666666666666666667;
+	rkA(3,3) = .1666666666666666666666666666666667;
+
+	rkB(1) = .1666666666666666666666666666666667;
+	rkB(2) = .6666666666666666666666666666666667;
+	rkB(3) = .1666666666666666666666666666666667;
+
+	rkC(1) = 0;
+	rkC(2) = 0.5;
+	rkC(3) = 1;
+
+	%/* Classical error estimator, embedded solution: */
+	rkBhat(1) = b0;
+	rkBhat(2) = .16666666666666666666666666666666667-b0;
+	rkBhat(3) = .66666666666666666666666666666666667;
+	rkBhat(4) = .16666666666666666666666666666666667;
+
+%	/* New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j */
+	rkD(1) = 0;
+	rkD(2) = 0;
+	rkD(3) = 1;
+
+%	/* Classical error estimator: */
+%	/* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+	rkE(1) = .3808338772072650364017425226487022*b0;
+	rkE(2) = (-1.142501631621795109205227567946107)*b0;
+	rkE(3) = (-1.523335508829060145606970090594809)*b0;
+	rkE(4) = .3808338772072650364017425226487022*b0;
+
+%	/* Sdirk error estimator */
+	rkBgam(1) = b0;
+	rkBgam(2) = .1666666666666666666666666666666667-1.0*b0;
+	rkBgam(3) = .6666666666666666666666666666666667;
+	rkBgam(4) = (-.2141672105405983697350758559820354);
+	rkBgam(5) = .3808338772072650364017425226487021;
+
+%	/* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+	rkTheta(1) = -3.0*b0-.3808338772072650364017425226487021;
+	rkTheta(2) = -4.0*b0+1.523335508829060145606970090594808;
+	rkTheta(3) = (-.142501631621795109205227567946106)+b0;
+
+%	/* Local order of error estimator */
+	if (b0 == 0)
+			rkELO  = 5.0;
+	else
+			rkELO  = 4.0;
+
+	%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	%  ~~~> Diagonalize the RK matrix:
+	%  rkTinv * inv(rkA) * rkT =
+	%  |  rkGamma      0           0     |
+	%  |      0      rkAlpha   -rkBeta   |
+	%  |      0      rkBeta     rkAlpha  |
+	%  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+	rkGamma = 2.625816818958466716011888933765284;
+	rkAlpha = 1.687091590520766641994055533117359;
+	rkBeta  = 2.508731754924880510838743672432351;
+
+	rkT(1,2) = 1;
+	rkT(1,2) = 1;
+	rkT(1,3) = 0;
+	rkT(2,1) = .4554100411010284672111720348287483;
+	rkT(2,2) = -.6027050205505142336055860174143743;
+	rkT(2,3) = -.4309321229203225731070721341350346;
+	rkT(3,1) = 2.195823345445647152832799205549709;
+	rkT(3,2) = -1.097911672722823576416399602774855;
+	rkT(3,3) = .7850032632435902184104551358922130;
+
+	rkTinv(1,1) = .4205559181381766909344950150991349;
+	rkTinv(1,2) = .3488903392193734304046467270632057;
+	rkTinv(1,3) = .1915253879645878102698098373933487;
+	rkTinv(2,1) = .5794440818618233090655049849008650;
+	rkTinv(2,2) = -.3488903392193734304046467270632057;
+	rkTinv(2,3) = -.1915253879645878102698098373933487;
+	rkTinv(3,1) = -.3659705575742745254721332009249516;
+	rkTinv(3,2) = -1.463882230297098101888532803699806;
+	rkTinv(3,3) = .4702733607340189781407813565524989;
+
+	rkTinvAinv(1,1) = 1.104302803159744452668648155627548;
+	rkTinvAinv(1,2) = .916122120694355522658740710823143;
+	rkTinvAinv(1,3) = .5029105849749601702795812241441172;
+	rkTinvAinv(2,1) = 1.895697196840255547331351844372453;
+	rkTinvAinv(2,2) = 3.083877879305644477341259289176857;
+	rkTinvAinv(2,3) = -1.502910584974960170279581224144117;
+	rkTinvAinv(3,1) = .8362439183082935036129145574774502;
+	rkTinvAinv(3,2) = -3.344975673233174014451658229909802;
+	rkTinvAinv(3,3) = .312908409479233358005944466882642;
+
+	rkAinvT(1,1) = 2.625816818958466716011888933765282;
+	rkAinvT(1,2) = 1.687091590520766641994055533117358;
+	rkAinvT(1,3) = -2.508731754924880510838743672432351;
+	rkAinvT(2,1) = 1.195823345445647152832799205549710;
+	rkAinvT(2,2) = -2.097911672722823576416399602774855;
+	rkAinvT(2,3) = .7850032632435902184104551358922130;
+	rkAinvT(3,1) = 5.765829871932827589653709477334136;
+	rkAinvT(3,2) = .1170850640335862051731452613329320;
+	rkAinvT(3,3) = 4.078738281412060947659653944216779;
+end;
+return;
+
+	% /* Lobatto3C_Coefficients */
+function Gauss_Coefficients()
+	
+	global rkMethod 
+	global rkT rkTinv rkTinvAinv rkAinvT rkA rkB rkC rkD rkE
+	global rkBgam rkBhat rkTheta rkGamma rkAlpha rkBeta rkELO
+	global GAU 
+
+
+   rkMethod = GAU;
+   
+   b0 = 0.1;
+
+   %/* The coefficients of the Gauss method */
+   rkA(1,1) = .1388888888888888888888888888888889;
+   rkA(1,2) = -.359766675249389034563954710966045e-01;
+   rkA(1,3) = .97894440153083260495800422294756e-02;
+   rkA(2,1) = .3002631949808645924380249472131556;
+   rkA(2,2) = .2222222222222222222222222222222222;
+   rkA(2,3) = -.224854172030868146602471694353778e-01;
+   rkA(3,1) = .2679883337624694517281977355483022;
+   rkA(3,2) = .4804211119693833479008399155410489;
+   rkA(3,3) = .1388888888888888888888888888888889;
+
+   rkB(1) = .2777777777777777777777777777777778;
+   rkB(2) = .4444444444444444444444444444444444;
+   rkB(3) = .2777777777777777777777777777777778;
+
+   rkC(1) = .1127016653792583114820734600217600;
+   rkC(2) = .5000000000000000000000000000000000;
+   rkC(3) = .8872983346207416885179265399782400;
+
+%   /* Classical error estimator, embedded solution: */
+   rkBhat(1) = b0;
+   rkBhat(2) = -1.4788305577012361475298775666303999*b0...
+   		 +.27777777777777777777777777777777778;
+   rkBhat(3) = .44444444444444444444444444444444444...
+    	         +.66666666666666666666666666666666667*b0;
+   rkBhat(4) = -.18783610896543051913678910003626672*b0...
+  	         +.27777777777777777777777777777777778;
+
+ %  /* New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j */
+   rkD(1) = (.1666666666666666666666666666666667e+01);
+   rkD(2) = (-.1333333333333333333333333333333333e+01);
+   rkD(3) = (.1666666666666666666666666666666667e+01);
+
+   %/* Classical error estimator: */
+   %/* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+   rkE(1) = .2153144231161121782447335303806954*b0;
+   rkE(2) = (-2.825278112319014084275808340593191)*b0;
+   rkE(3) = .2870858974881495709929780405075939*b0;
+   rkE(4) = (-.4558086256248162565397206448274867e-01)*b0;
+
+   %/* Sdirk error estimator */
+   rkBgam(1) = 0;
+   rkBgam(2) = .2373339543355109188382583162660537;
+   rkBgam(3) = .5879873931885192299409334646982414;
+   rkBgam(4) = -.4063577064014232702392531134499046e-01;
+   rkBgam(5) = .2153144231161121782447335303806955;
+
+   %/* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta(1) = (-2.594040933093095272574031876464493);
+   rkTheta(2) = 1.824611539036311947589425112250199;
+   rkTheta(3) = .1856563166634371860478043996459493;
+
+   %/* ELO = local order of classical error estimator */
+   rkELO = 4.0;
+
+   %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   %~~~> Diagonalize the RK matrix:
+   % rkTinv * inv(rkA) * rkT =
+   %           |  rkGamma      0           0     |
+   %           |      0      rkAlpha   -rkBeta   |
+   %           |      0      rkBeta     rkAlpha  |
+   %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = 4.644370709252171185822941421408064;
+   rkAlpha = 3.677814645373914407088529289295970;
+   rkBeta  = 3.508761919567443321903661209182446;
+
+   rkT(1,1) = .7215185205520017032081769924397664e-01;
+   rkT(1,2) = -.8224123057363067064866206597516454e-01;
+   rkT(1,3) = -.6012073861930850173085948921439054e-01;
+   rkT(2,1) = .1188325787412778070708888193730294;
+   rkT(2,2) = .5306509074206139504614411373957448e-01;
+   rkT(2,3) = .3162050511322915732224862926182701;
+   rkT(3,1) = 1;
+   rkT(3,2) = 1;
+   rkT(3,3) = 0;
+
+   rkTinv(1,1) = 5.991698084937800775649580743981285;
+   rkTinv(1,2) = 1.139214295155735444567002236934009;
+   rkTinv(1,3) = .4323121137838583855696375901180497;
+   rkTinv(2,1) = -5.991698084937800775649580743981285;
+   rkTinv(2,2) = -1.139214295155735444567002236934009;
+   rkTinv(2,3) = .5676878862161416144303624098819503;
+   rkTinv(3,1) = -1.246213273586231410815571640493082;
+   rkTinv(3,2) = 2.925559646192313662599230367054972;
+   rkTinv(3,3) = -.2577352012734324923468722836888244;
+
+   rkTinvAinv(1,1) = 27.82766708436744962047620566703329;
+   rkTinvAinv(1,2) = 5.290933503982655311815946575100597;
+   rkTinvAinv(1,3) = 2.007817718512643701322151051660114;
+   rkTinvAinv(2,1) = (-17.66368928942422710690385180065675);
+   rkTinvAinv(2,2) = (-14.45491129892587782538830044147713);
+   rkTinvAinv(2,3) = 2.992182281487356298677848948339886;
+   rkTinvAinv(3,1) = (-25.60678350282974256072419392007303);
+   rkTinvAinv(3,2) = 6.762434375611708328910623303779923;
+   rkTinvAinv(3,3) = 1.043979339483109825041215970036771;
+
+   rkAinvT(1,1) = .3350999483034677402618981153470483;
+   rkAinvT(1,2) = -.5134173605009692329246186488441294;
+   rkAinvT(1,3) = .6745196507033116204327635673208923e-01;
+   rkAinvT(2,1) = .5519025480108928886873752035738885;
+   rkAinvT(2,2) = 1.304651810077110066076640761092008;
+   rkAinvT(2,3) = .9767507983414134987545585703726984;
+   rkAinvT(3,1) = 4.644370709252171185822941421408064;
+   rkAinvT(3,2) = 3.677814645373914407088529289295970;
+   rkAinvT(3,3) = -3.508761919567443321903661209182446;
+return;
+ %/* Gauss_Coefficients */
+
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%	The coefficients of the 3-stage Gauss method
+%	(given to ~30 accurate digits)
+%	The parameter b3 can be chosen by the user
+%	to tune the error estimator
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+function Radau1A_Coefficients()
+	global rkMethod 
+	global rkT rkTinv rkTinvAinv rkAinvT rkA rkB rkC rkD rkE
+	global rkBgam rkBhat rkTheta rkGamma rkAlpha rkBeta rkELO
+	global  R1A 
+
+	global ZERO 
+
+
+%   /* The coefficients of the Radau1A method */
+   b0 = 0.1;
+   rkMethod = R1A;
+   rkA(1,1) =  .1111111111111111111111111111111111;
+   rkA(1,2) = (-.1916383190435098943442935597058829);
+   rkA(1,3) = (.8052720793239878323318244859477174e-01);
+   rkA(2,1) = .1111111111111111111111111111111111;
+   rkA(2,2) = .2920734116652284630205027458970589;
+   rkA(2,3) = (-.481334970546573839513422644787591e-01);
+   rkA(3,1) = .1111111111111111111111111111111111;
+   rkA(3,2) = .5370223859435462728402311533676479;
+   rkA(3,3) = .1968154772236604258683861429918299;
+
+   rkB(1) = .1111111111111111111111111111111111;
+   rkB(2) = .5124858261884216138388134465196080;
+   rkB(3) = .3764030627004672750500754423692808;
+
+   rkC(1) = 0;
+   rkC(2) = .3550510257216821901802715925294109;
+   rkC(3) = .8449489742783178098197284074705891;
+
+  % /* Classical error estimator, embedded solution: */
+   rkBhat(1) = b0;
+   rkBhat(2) = .11111111111111111111111111111111111-b0;
+   rkBhat(3) = .51248582618842161383881344651960810;
+   rkBhat(4) = .37640306270046727505007544236928079;
+
+   %/* New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD(1) = .3333333333333333333333333333333333;
+   rkD(2) = -.8914115380582557157653087040196127;
+   rkD(3) = 1.558078204724922382431975370686279;
+
+   %/* Classical error estimator: */
+   %/* H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j */
+   rkE(1) = .2748888295956773677478286035994148*b0;
+   rkE(2) = -1.374444147978386838739143017997074*b0;
+   rkE(3) = -1.335337922441686804550326197041126*b0;
+   rkE(4) = .235782604058977333559011782643466*b0;
+
+   %/* Sdirk error estimator */
+   rkBgam(1) = ZERO;
+   rkBgam(2) = (.1948150124588532186183490991130616e-01);
+   rkBgam(3) = .7575249005733381398986810981093584;
+   rkBgam(4) = (-.518952314149008295083446116200793e-01);
+   rkBgam(5) = .2748888295956773677478286035994148;
+
+   %/* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta(1) = (-1.224370034375505083904362087063351);
+   rkTheta(2) = .9340045331532641409047527962010133;
+   rkTheta(3) = .4656990124352088397561234800640929;
+
+   %/* ELO = local order of classical error estimator */
+   rkELO = 4.0;
+
+   %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   %~~~> Diagonalize the RK matrix:
+   % rkTinv * inv(rkA) * rkT =
+   %           |  rkGamma      0           0     |
+   %           |      0      rkAlpha   -rkBeta   |
+   %           |      0      rkBeta     rkAlpha  |
+   %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = 3.637834252744495732208418513577775;
+   rkAlpha = 2.681082873627752133895790743211112;
+   rkBeta  = 3.050430199247410569426377624787569;
+
+   rkT(1,1) = .424293819848497965354371036408369;
+   rkT(1,2) = -.3235571519651980681202894497035503;
+   rkT(1,3) = -.522137786846287839586599927945048;
+   rkT(2,1) = .57594609499806128896291585429339e-01;
+   rkT(2,2) = .3148663231849760131614374283783e-02;
+   rkT(2,3) = .452429247674359778577728510381731;
+   rkT(3,1) = 1;
+   rkT(3,2) = 1;
+   rkT(3,3) = 0;
+
+   rkTinv(1,1) = 1.233523612685027760114769983066164;
+   rkTinv(1,2) = 1.423580134265707095505388133369554;
+   rkTinv(1,3) = .3946330125758354736049045150429624;
+   rkTinv(2,1) = -1.233523612685027760114769983066164;
+   rkTinv(2,2) = -1.423580134265707095505388133369554;
+   rkTinv(2,3) = .6053669874241645263950954849570376;
+   rkTinv(3,1) = -.1484438963257383124456490049673414;
+   rkTinv(3,2) = 2.038974794939896109682070471785315;
+   rkTinv(3,3) = -.544501292892686735299355831692542e-01;
+
+   rkTinvAinv(1,1) = 4.487354449794728738538663081025420;
+   rkTinvAinv(1,2) = 5.178748573958397475446442544234494;
+   rkTinvAinv(1,3) = 1.435609490412123627047824222335563;
+   rkTinvAinv(2,1) = -2.854361287939276673073807031221493;
+   rkTinvAinv(2,2) = -1.003648660720543859000994063139137e+01;
+   rkTinvAinv(2,3) = 1.789135380979465422050817815017383;
+   rkTinvAinv(3,1) = -4.160768067752685525282947313530352;
+   rkTinvAinv(3,2) = 1.124128569859216916690209918405860;
+   rkTinvAinv(3,3) = 1.700644430961823796581896350418417;
+
+   rkAinvT(1,1) = 1.543510591072668287198054583233180;
+   rkAinvT(1,2) = -2.460228411937788329157493833295004;
+   rkAinvT(1,3) = -.412906170450356277003910443520499;
+   rkAinvT(2,1) = .209519643211838264029272585946993;
+   rkAinvT(2,2) = 1.388545667194387164417459732995766;
+   rkAinvT(2,3) = 1.20339553005832004974976023130002;
+   rkAinvT(3,1) = 3.637834252744495732208418513577775;
+   rkAinvT(3,2) = 2.681082873627752133895790743211112;
+   rkAinvT(3,3) = -3.050430199247410569426377624787569;
+return;
+% /* Radau1A_Coefficients */
+
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%	The coefficients of the 4-stage Lobatto-3A method
+%	(given to ~30 accurate digits)
+%  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+function Lobatto3A_Coefficients()
+	
+	global rkMethod 
+	global rkT rkTinv rkTinvAinv rkAinvT rkA rkB rkC rkD rkE
+	global rkBgam rkBhat rkTheta rkF rkGamma rkAlpha rkBeta rkELO
+	global L3A
+
+
+   %/* The coefficients of the Lobatto-3A method */
+   rkMethod = L3A;
+
+   rkA(1,1) = 0;
+   rkA(1,2) = 0;
+   rkA(1,3) = 0;
+   rkA(1,4) = 0;
+   rkA(2,1) = .11030056647916491413674311390609397;
+   rkA(2,2) = .1896994335208350858632568860939060;
+   rkA(2,3) = -.339073642291438837776604807792215e-01;
+   rkA(2,4) = .1030056647916491413674311390609397e-01;
+   rkA(3,1) = .73032766854168419196590219427239365e-01;
+   rkA(3,2) = .4505740308958105504443271474458881;
+   rkA(3,3) = .2269672331458315808034097805727606;
+   rkA(3,4) = -.2696723314583158080340978057276063e-01;
+   rkA(4,1) = .83333333333333333333333333333333333e-01;
+   rkA(4,2) = .4166666666666666666666666666666667;
+   rkA(4,3) = .4166666666666666666666666666666667;
+   rkA(4,4) = .8333333333333333333333333333333333e-01;
+
+   rkB(1) = .83333333333333333333333333333333333e-01;
+   rkB(2) = .4166666666666666666666666666666667;
+   rkB(3) = .4166666666666666666666666666666667;
+   rkB(4) = .8333333333333333333333333333333333e-01;
+
+   rkC(1) = 0;
+   rkC(2) = .2763932022500210303590826331268724;
+   rkC(3) = .7236067977499789696409173668731276;
+   rkC(4) = 1;
+
+   %/* New solution: H*Sum B_j*f(Z_j) = Sum D_j*Z_j */
+   rkD(1) = 0;
+   rkD(2) = 0;
+   rkD(3) = 0;
+   rkD(4) = 1;
+
+   %/* Classical error estimator, embedded solution: */
+   rkBhat(1) = .90909090909090909090909090909090909e-01;
+   rkBhat(2) = .39972675774621371442114262372173276;
+   rkBhat(3) = .43360657558711961891219070961160058;
+   rkBhat(4) = .15151515151515151515151515151515152e-01;
+
+   %/* Classical error estimator: */
+   %/* H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j */
+
+   rkE(1) = .1957403846510110711315759367097231e-01;
+   rkE(2) = -.1986820345632580910316020806676438;
+   rkE(3) = .1660586371214229125096727578826900;
+   rkE(4) = -.9787019232550553556578796835486154e-01;
+
+   %/* Sdirk error estimator: */
+   rkF(1) = 0;
+   rkF(2) = -.66535815876916686607437314126436349;
+   rkF(3) = 1.7419302743497277572980407931678409;
+   rkF(4) = -1.2918865386966730694684011822841728;
+
+   %/* ELO = local order of classical error estimator */
+   rkELO = 4.0;
+
+   %/* Sdirk error estimator: */
+   rkBgam(1) = .2950472755430528877214995073815946e-01;
+   rkBgam(2) = .5370310883226113978352873633882769;
+   rkBgam(3) = .2963022450107219354980459699450564;
+   rkBgam(4) = -.7815248400375080035021681445218837e-01;
+   rkBgam(5) = .2153144231161121782447335303806956;
+
+   %/* H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j */
+   rkTheta(1) = 0.0;
+   rkTheta(2) = -.6653581587691668660743731412643631;
+   rkTheta(3) = 1.741930274349727757298040793167842;
+   rkTheta(4) = -.291886538696673069468401182284174;
+
+
+   %/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   %~~~> Diagonalize the RK matrix:
+   % rkTinv * inv(rkA) * rkT =
+   %          |  rkGamma      0           0     |
+   %           |      0      rkAlpha   -rkBeta   |
+   %           |      0      rkBeta     rkAlpha  |
+   %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+   rkGamma = 4.644370709252171185822941421408063;
+   rkAlpha = 3.677814645373914407088529289295968;
+   rkBeta  = 3.508761919567443321903661209182446;
+
+   rkT(1,1) = .5303036326129938105898786144870856e-01;
+   rkT(1,2) = -.7776129960563076320631956091016914e-01;
+   rkT(1,3) = .6043307469475508514468017399717112e-02;
+   rkT(2,1) = .2637242522173698467283726114649606;
+   rkT(2,2) = .2193839918662961493126393244533346;
+   rkT(2,3) = .3198765142300936188514264752235344;
+   rkT(3,1) = 1;
+   rkT(3,2) = 0;
+   rkT(3,3) = 0;
+
+   rkTinv(1,1) = 7.695032983257654470769069079238553;
+   rkTinv(1,2) = -.1453793830957233720334601186354032;
+   rkTinv(1,3) = .6302696746849084900422461036874826;
+   rkTinv(2,1) = -7.695032983257654470769069079238553;
+   rkTinv(2,2) = .1453793830957233720334601186354032;
+   rkTinv(2,3) = .3697303253150915099577538963125174;
+   rkTinv(3,1) = -1.066660885401270392058552736086173;
+   rkTinv(3,2) = 3.146358406832537460764521760668932;
+   rkTinv(3,3) = -.7732056038202974770406168510664738;
+
+   rkTinvAinv(1,1) = 35.73858579417120341641749040405149;
+   rkTinvAinv(1,2) = -.675195748578927863668368190236025;
+   rkTinvAinv(1,3) = 2.927206016036483646751158874041632;
+   rkTinvAinv(2,1) = -24.55824590667225493437162206039511;
+   rkTinvAinv(2,2) = -10.50514413892002061837750015342036;
+   rkTinvAinv(2,3) = 4.072793983963516353248841125958369;
+   rkTinvAinv(3,1) = -30.92301972744621647251975054630589;
+   rkTinvAinv(3,2) = 12.08182467154052413351908559269928;
+   rkTinvAinv(3,3) = -1.546411207640594954081233702132946;
+
+   rkAinvT(1,1) = .2462926658317812882584158369803835;
+   rkAinvT(1,2) = -.2647871194157644619747121197289574;
+   rkAinvT(1,3) = .2950720515900466654896406799284586;
+   rkAinvT(2,1) = 1.224833192317784474576995878738004;
+   rkAinvT(2,2) = 1.929224190340981580557006261869763;
+   rkAinvT(2,3) = .4066803323234419988910915619080306;
+   rkAinvT(3,1) = 4.644370709252171185822941421408064;
+   rkAinvT(3,2) = 3.677814645373914407088529289295968;
+   rkAinvT(3,3) = -3.508761919567443321903661209182446;
+return;
+		%/* Lobatto3A_Coefficients */
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_adj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_adj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_adj.def	(revision 3477)
@@ -0,0 +1,8 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE runge_kutta_adj
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_adj.f90	(revision 3477)
@@ -0,0 +1,2696 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RungeKuttaADJ - Adjoint Model of Fully Implicit 3-stage Runge-Kutta:   !
+!          * Radau-2A   quadrature (order 5)                              !
+!          * Radau-1A   quadrature (order 5)                              !
+!          * Lobatto-3C quadrature (order 4)                              !
+!          * Gauss      quadrature (order 6)                              !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2005                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Jacobian
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+!~~~>  Statistics on the work performed by the Runge-Kutta method
+  INTEGER :: Nfun,Njac,Nstp,Nacc,Nrej,Ndec,Nsol,Nsng
+  INTEGER, PARAMETER :: ifun=1, ijac=2, istp=3, iacc=4, &
+    irej=5, idec=6, isol=7, isng=8, itexit=1, ihacc=2, ihnew=3
+  
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE_ADJ(NADJ, Y, Lambda, TIN, TOUT,  &
+             ATOL_adj, RTOL_adj,                        &
+             ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL
+
+    IMPLICIT NONE
+
+!~~~> Y - Concentrations
+   KPP_REAL  :: Y(NVAR)
+!~~~> NADJ - No. of cost functionals for which adjoints
+!                are evaluated simultaneously
+!            If single cost functional is considered (like in
+!                most applications) simply set NADJ = 1      
+   INTEGER NADJ
+!~~~> Lambda - Sensitivities of concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+    KPP_REAL :: Lambda(NVAR,NADJ)
+!~~~> Tolerances for adjoint calculations
+!     (used for full continuous adjoint, and for controlling
+!     the convergence of iterations for solving the discrete adjoint)   
+    KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER       :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are: 0=interpolated, 1=zero
+    ICNTRL(7)  = 2   ! Adj. system solved by: 1=iteration, 2=direct, 3=adaptive
+    ICNTRL(8)  = 0   ! Adj. LU decomp: 0=compute, 1=save from fwd
+    ICNTRL(9)  = 2   ! Adjoint: 1=none, 2=discrete, 3=full continuous, 4=simplified continuous
+    ICNTRL(10) = 0   ! Error estimator: 0=classic, 1=SDIRK
+    ICNTRL(11) = 1   ! Step controller: 1=Gustaffson, 2=classic
+
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+    
+    T1 = TIN; T2 = TOUT
+    CALL RungeKuttaADJ(NVAR, Y, NADJ, Lambda, T1, T2,   &
+                       RTOL, ATOL, ATOL_adj, RTOL_adj,  &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR  )
+
+    Ntotal = Ntotal + ISTATUS(istp)
+!    PRINT*,'NSTEPS=',ISTATUS(istp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'Runge-Kutta-ADJ: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE_ADJ
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RungeKuttaADJ( N, Y, NADJ, Lambda,Tstart,Tend,      &
+                         RelTol, AbsTol, RelTol_adj, AbsTol_adj, &
+                         RCNTRL, ICNTRL, RSTATUS, ISTATUS, IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!  This implementation is based on the book and the code Radau5:
+!
+!         E. HAIRER AND G. WANNER
+!         "SOLVING ORDINARY DIFFERENTIAL EQUATIONS II. 
+!              STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!         UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!         CH-1211 GENEVE 24, SWITZERLAND
+!         E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!   Methods:
+!          * Radau-2A   quadrature (order 5)                              
+!          * Radau-1A   quadrature (order 5)                              
+!          * Lobatto-3C quadrature (order 4)                              
+!          * Gauss      quadrature (order 6)                              
+!                                                                         
+!   (C)  Adrian Sandu, August 2005                                       
+!   Virginia Polytechnic Institute and State University                  
+!   Contact: sandu@cs.vt.edu                                             
+!   Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!   This implementation is part of KPP - the Kinetic PreProcessor        
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!       ----------------
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!     N           Dimension of the system
+!     T           Initial time value
+!
+!     Tend        Final T value (Tend-T may be positive or negative)
+!
+!     Y(N)        Initial values for Y
+!
+!     RelTol,AbsTol   Relative and absolute error tolerances. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = RK method selection       
+!              = 1:  Radau-2A    (the default)
+!              = 2:  Lobatto-3C
+!              = 3:  Gauss
+!              = 4:  Radau-1A
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 10000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve the linear ADJ equations:
+!        ICNTRL(7)=0,1 : modified Newton re-using LU (the default)
+!                        with a fixed number of iterations
+!        ICNTRL(7)=2 :   direct solution (additional one LU factorization
+!                        of 3Nx3N matrix per step); good for debugging
+!        ICNTRL(7)=3 :   adaptive solution (if Newton does not converge
+!                        switch to direct)
+!
+!    ICNTRL(8)  -> checkpointing the LU factorization at each step:
+!        ICNTRL(8)=0 : do *not* save LU factorization (the default)
+!        ICNTRL(8)=1 : save LU factorization
+!        Note: if ICNTRL(7)=1 the LU factorization is *not* saved
+!
+!    ICNTRL(9) -> Type of adjoint algorithm
+!         = 0 : default is discrete adjoint ( of method ICNTRL(3) )
+!         = 1 : no adjoint       
+!         = 2 : discrete adjoint ( of method ICNTRL(3) )
+!         = 3 : fully adaptive continuous adjoint ( with method ICNTRL(6) )
+!         = 4 : simplified continuous adjoint ( with method ICNTRL(6) )
+!
+!    ICNTRL(10) -> switch for error estimation strategy
+!		ICNTRL(10) = 0: one additional stage at c=0, 
+!				see Hairer (default)
+!		ICNTRL(10) = 1: two additional stages at c=0 
+!				and SDIRK at c=1, stiffly accurate
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(11)=1:  mod. predictive controller (Gustafsson, default)
+!              ICNTRL(11)=2:  classical step size control
+!              the choice 1 seems to produce safer results;
+!              for simple problems, the choice 2 produces
+!              often slightly faster runs
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  (highly recommended to keep Hmin = ZERO, the default)
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, the starting step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IERR        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of Jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      INTEGER, INTENT(IN)     :: NADJ
+      KPP_REAL, INTENT(INOUT) :: Lambda(N,NADJ)
+      KPP_REAL, INTENT(IN) :: AbsTol_adj(N,NADJ), RelTol_adj(N,NADJ)
+      KPP_REAL :: Y(N),AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson, SdirkError, SaveLU
+      INTEGER :: IERR, ITOL
+      KPP_REAL, INTENT(IN):: Tstart,Tend
+      KPP_REAL :: Texit
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit, AdjointType, rkMethod
+      KPP_REAL :: Hmin,Hmax,Hstart,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin, NewtonTol
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      ! Runge-Kutta method parameters
+      INTEGER, PARAMETER :: R2A=1, R1A=2, L3C=3, GAU=4, L3A=5
+      KPP_REAL :: rkT(3,3), rkTinv(3,3), rkTinvAinv(3,3), rkAinvT(3,3), &
+                       rkA(3,3), rkB(3),  rkC(3), rkD(0:3), rkE(0:3), 	   &
+		       rkBgam(0:4), rkBhat(0:4), rkTheta(0:3),             &
+                       rkGamma,  rkAlpha, rkBeta, rkELO
+      ! ADJ method parameters
+      INTEGER, PARAMETER :: KPP_ROOT_none = 1, KPP_ROOT_discrete = 2,     	   &
+                            KPP_ROOT_continuous = 3, KPP_ROOT_simple_continuous = 4
+      INTEGER :: AdjointSolve                      
+      INTEGER, PARAMETER :: Solve_direct = 1, Solve_fixed = 2,     	   &
+                            Solve_adaptive = 3
+      INTEGER, PARAMETER :: bufsize = 10000
+      INTEGER :: stack_ptr = 0 ! last written entry
+      KPP_REAL, DIMENSION(:), POINTER :: chk_H, chk_T
+      KPP_REAL, DIMENSION(:,:), POINTER :: chk_Y, chk_Z, chk_E1
+      INTEGER, DIMENSION(:), POINTER :: chk_NiT
+      COMPLEX(kind=dp), DIMENSION(:,:), POINTER :: chk_E2
+      KPP_REAL, DIMENSION(:,:), POINTER :: chk_dY, chk_d2Y
+      !~~~> Local variables
+      INTEGER :: i 
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IERR = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> Error control selection  
+      IF (ICNTRL(10) == 0) THEN 
+         SdirkError = .FALSE.
+      ELSE
+         SdirkError = .TRUE.
+      END IF      
+!~~~> Method selection  
+      SELECT CASE (ICNTRL(3))     
+      CASE (0,1)
+         CALL Radau2A_Coefficients
+      CASE (2)
+         CALL Lobatto3C_Coefficients
+      CASE (3)
+         CALL Gauss_Coefficients
+      CASE (4)
+         CALL Radau1A_Coefficients
+      CASE DEFAULT
+         WRITE(6,*) 'ICNTRL(3)=',ICNTRL(3)
+         CALL RK_ErrorMsg(-13,Tstart,ZERO,IERR)
+      END SELECT
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RK_ErrorMsg(-1,Tstart,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonMaxit    maximal number of Newton iterations
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RK_ErrorMsg(-2,Tstart,ZERO,IERR)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~>  How to solve the linear adjoint system
+      SELECT CASE (ICNTRL(7))     
+      CASE (0,1)
+         AdjointSolve = Solve_fixed
+      CASE (2)
+         AdjointSolve = Solve_direct
+      CASE (3)
+         AdjointSolve = Solve_adaptive
+      CASE DEFAULT  
+         PRINT * , 'User-selected adjoint solution: ICNTRL(7)=', ICNTRL(7)
+         PRINT * , 'Implemented: =(0,1) (fixed), =2 (direct), =3 (adaptive)'
+         CALL rk_ErrorMsg(-9,Tstart,ZERO,IERR)
+         RETURN      
+      END SELECT
+!~~~>  Discrete or continuous adjoint formulation
+      SELECT CASE (ICNTRL(9))     
+      CASE (0,2)
+         AdjointType = KPP_ROOT_discrete
+      CASE (1)
+         AdjointType = KPP_ROOT_none
+      CASE DEFAULT  
+         PRINT * , 'User-selected adjoint type: ICNTRL(9)=', ICNTRL(9)
+         PRINT * , 'Implemented: =(0,2) (discrete adj) and =1 (no adj)'
+         CALL rk_ErrorMsg(-9,Tstart,ZERO,IERR)
+         RETURN      
+      END SELECT
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) 
+      IF (AdjointSolve == Solve_direct) SaveLU = .FALSE.
+!~~~> Gustafsson: step size controller
+      IF (ICNTRL(11) == 0) THEN
+         Gustafsson = .TRUE.
+      ELSE
+         Gustafsson = .FALSE.
+      END IF
+
+!~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0
+      Roundoff = WLAMCH('E');
+
+!~~~> Hmin = minimal step size
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSE
+         Hmin = MIN(ABS(RCNTRL(1)),ABS(Tend-Tstart))
+      END IF
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tend-Tstart)
+      ELSE
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-Tstart))
+      END IF
+!~~~> Hstart = starting step size
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = ZERO
+      ELSE
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-Tstart))
+      END IF
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 1.0d-3) .OR. (FacSafe >= ONE) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RK_ErrorMsg(-4,Tstart,ZERO,IERR)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RK_ErrorMsg(-5,Tstart,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonTol:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+         IF (NewtonTol <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RK_ErrorMsg(-6,Tstart,ZERO,IERR)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RK_ErrorMsg(-7,Tstart,ZERO,IERR)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RK_ErrorMsg(-8,Tstart,ZERO,IERR)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RK_ErrorMsg(-8,Tstart,ZERO,IERR)
+          END IF
+          END DO
+      END IF
+
+!~~~> Parameters are wrong
+      IF (IERR < 0) RETURN
+
+!~~~>  Allocate checkpoint space or open checkpoint files
+   IF (AdjointType == KPP_ROOT_discrete) THEN
+       CALL rk_AllocateDBuffers()
+   ELSEIF ( (AdjointType == KPP_ROOT_continuous).OR. &
+           (AdjointType == KPP_ROOT_simple_continuous) ) THEN
+       CALL rk_AllocateCBuffers
+   END IF
+
+!~~~> Call the core method
+      CALL RK_FwdIntegrator( N,Tstart,Tend,Y,AdjointType,IERR )
+!   PRINT*,'FORWARD STATISTICS'
+!   PRINT*,'Step=',Istatus(istp),' Acc=',Istatus(iacc),   &
+!        ' Rej=',Istatus(irej), ' Singular=',Istatus(isng)
+   Nstp = 0
+   Nacc = 0
+   Nrej = 0
+   Nsng = 0
+
+!~~~>  If Forward integration failed return   
+   IF (IERR<0) RETURN
+
+   SELECT CASE (AdjointType)   
+   CASE (KPP_ROOT_discrete)   
+     CALL rk_DadjInt (                          &
+        NADJ, Lambda,                           &
+        Tstart, Tend, Texit,                    &
+        IERR )
+   CASE (KPP_ROOT_continuous) 
+     CALL rk_CadjInt (                          &
+        NADJ, Lambda,                           &
+        Tend, Tstart, Texit,                    &
+        IERR )
+   CASE (KPP_ROOT_simple_continuous)
+     CALL rk_SimpleCadjInt (                    &
+        NADJ, Lambda,                           &
+        Tstart, Tend, Texit,                    &
+        IERR )
+   END SELECT ! AdjointType
+!   PRINT*,'ADJOINT STATISTICS'
+!   PRINT*,'Step=',Nstp,' Acc=',Nacc,             &
+!        ' Rej=',Nrej, ' Singular=',Nsng
+
+!~~~>  Free checkpoint space or close checkpoint files
+   IF (AdjointType == KPP_ROOT_discrete) THEN
+      CALL rk_FreeDBuffers
+   ELSEIF ( (AdjointType == KPP_ROOT_continuous) .OR. &
+           (AdjointType == KPP_ROOT_simple_continuous) ) THEN
+      CALL rk_FreeCBuffers
+   END IF
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CONTAINS ! Internal procedures to RungeKuttaADJ
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_AllocateDBuffers()
+!~~~>  Allocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_Z(NVAR*3,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Z'; STOP
+   END IF   
+   ALLOCATE( chk_NiT(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer NiT'; STOP
+   END IF   
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA      
+     ALLOCATE( chk_E1(NVAR*NVAR,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E1'; STOP
+     END IF   
+     ALLOCATE( chk_E2(NVAR*NVAR,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E2'; STOP
+     END IF   
+#else      
+     ALLOCATE( chk_E1(LU_NONZERO,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E1'; STOP
+     END IF   
+     ALLOCATE( chk_E2(LU_NONZERO,bufsize), STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E2'; STOP
+     END IF   
+#endif
+   END IF   
+   
+ 
+ END SUBROUTINE rk_AllocateDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_FreeDBuffers()
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_Z, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Z'; STOP
+   END IF   
+   DEALLOCATE( chk_NiT, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer NiT'; STOP
+   END IF   
+   IF (SaveLU) THEN 
+     DEALLOCATE( chk_E1, STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E1'; STOP
+     END IF   
+     DEALLOCATE( chk_E2, STAT=i )
+     IF (i/=0) THEN
+        PRINT*,'Failed allocation of buffer E2'; STOP
+     END IF   
+   END IF   
+
+ END SUBROUTINE rk_FreeDBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_AllocateCBuffers()
+!~~~>  Allocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   
+   ALLOCATE( chk_H(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer H'; STOP
+   END IF   
+   ALLOCATE( chk_T(bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer T'; STOP
+   END IF   
+   ALLOCATE( chk_Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer Y'; STOP
+   END IF   
+   ALLOCATE( chk_dY(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer dY'; STOP
+   END IF   
+   ALLOCATE( chk_d2Y(NVAR,bufsize), STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed allocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE rk_AllocateCBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_FreeCBuffers()
+!~~~>  Dallocate buffer space for continuous adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   INTEGER :: i
+   print*,'cbuffers deallocate???'
+   DEALLOCATE( chk_H, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer H'; STOP
+   END IF   
+   DEALLOCATE( chk_T, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer T'; STOP
+   END IF   
+   DEALLOCATE( chk_Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer Y'; STOP
+   END IF   
+   DEALLOCATE( chk_dY, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer dY'; STOP
+   END IF   
+   DEALLOCATE( chk_d2Y, STAT=i )
+   IF (i/=0) THEN
+      PRINT*,'Failed deallocation of buffer d2Y'; STOP
+   END IF   
+ 
+ END SUBROUTINE rk_FreeCBuffers
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_DPush( T, H, Y, Zstage, NewIt, E1, E2 )!, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL :: T, H, Y(NVAR), Zstage(NVAR*3)
+   INTEGER :: NewIt
+#ifdef FULL_ALGEBRA      
+   KPP_REAL :: E1(NVAR,NVAR)
+   COMPLEX(kind=dp) :: E2(NVAR,NVAR)
+   INTEGER :: i, j   
+#else      
+   KPP_REAL :: E1(LU_NONZERO)
+   COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif      
+
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   ! CALL WCOPY(NVAR,Y,1,chk_Y(1,stack_ptr),1)
+   ! CALL WCOPY(NVAR*3,Zstage,1,chk_Z(1,stack_ptr),1)
+   chk_Y(1:N,stack_ptr) = Y(1:N)
+   chk_Z(1:3*N,stack_ptr) = Zstage(1:3*N)
+   chk_NiT( stack_ptr ) = NewIt
+   IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA      
+     ! CALL WCOPY(NVAR*NVAR, E1,1,chk_E1(1,stack_ptr),1)
+     ! CALL WCOPYCmplx(NVAR*NVAR, E2,1,chk_E2(1,stack_ptr),1)
+     DO j=1,NVAR
+       DO i=1,NVAR
+         chk_E1(NVAR*(j-1)+i,stack_ptr) = E1(i,j)
+         chk_E2(NVAR*(j-1)+i,stack_ptr) = E2(i,j)
+       END DO
+     END DO
+#else      
+     ! CALL WCOPY(LU_NONZERO, E1,1,chk_E1(1,stack_ptr),1)
+     ! CALL WCOPYCmplx(LU_NONZERO, E2,1,chk_E2(1,stack_ptr),1)
+     chk_E1(1:LU_NONZERO,stack_ptr) = E1(1:LU_NONZERO)
+     chk_E2(1:LU_NONZERO,stack_ptr) = E2(1:LU_NONZERO)
+#endif      
+   END IF  
+   !CALL WCOPY(LU_NONZERO,Jcb,1,chk_J(1,stack_ptr),1)
+  
+  END SUBROUTINE rk_DPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_DPop( T, H, Y, Zstage, NewIt, E1, E2 ) !, Jcb )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), Zstage(NVAR*3) ! , Jcb(LU_NONZERO)
+   INTEGER :: NewIt
+#ifdef FULL_ALGEBRA      
+   KPP_REAL :: E1(NVAR,NVAR)
+   COMPLEX(kind=dp) :: E2(NVAR,NVAR)   
+   INTEGER :: i, j   
+#else      
+   KPP_REAL :: E1(LU_NONZERO)
+   COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif      
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   ! CALL WCOPY(NVAR,chk_Y(1,stack_ptr),1,Y,1)
+   Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+   ! CALL WCOPY(NVAR*3,chk_Z(1,stack_ptr),1,Zstage,1)
+   Zstage(1:3*NVAR) = chk_Z(1:3*NVAR,stack_ptr)
+   NewIt = chk_NiT( stack_ptr )
+   IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA      
+     ! CALL WCOPY(NVAR*NVAR,chk_E1(1,stack_ptr),1, E1,1)
+     ! CALL WCOPYCmplx(NVAR*NVAR,chk_E2(1,stack_ptr),1, E2,1)
+     DO j=1,NVAR
+       DO i=1,NVAR
+         E1(i,j) = chk_E1(NVAR*(j-1)+i,stack_ptr)
+         E2(i,j) = chk_E2(NVAR*(j-1)+i,stack_ptr)
+       END DO
+     END DO
+#else      
+     ! CALL WCOPY(LU_NONZERO,chk_E1(1,stack_ptr),1, E1,1)
+     ! CALL WCOPYCmplx(LU_NONZERO,chk_E2(1,stack_ptr),1, E2,1)
+     E1(1:LU_NONZERO) = chk_E1(1:LU_NONZERO,stack_ptr)
+     E2(1:LU_NONZERO) = chk_E2(1:LU_NONZERO,stack_ptr)
+#endif      
+   END IF  
+   !CALL WCOPY(LU_NONZERO,chk_J(1,stack_ptr),1,Jcb,1)
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE rk_DPop
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_CPush(T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   stack_ptr = stack_ptr + 1
+   IF ( stack_ptr > bufsize ) THEN
+     PRINT*,'Push failed: buffer overflow'
+     STOP
+   END IF  
+   chk_H( stack_ptr ) = H
+   chk_T( stack_ptr ) = T
+   ! CALL WCOPY(NVAR,Y,1,chk_Y(1,stack_ptr),1)
+   ! CALL WCOPY(NVAR,dY,1,chk_dY(1,stack_ptr),1)
+   ! CALL WCOPY(NVAR,d2Y,1,chk_d2Y(1,stack_ptr),1)
+   chk_Y(1:NVAR,stack_ptr)  =  Y(1:NVAR)
+   chk_dY(1:NVAR,stack_ptr) = dY(1:NVAR)
+   chk_d2Y(1:NVAR,stack_ptr)= d2Y(1:NVAR)
+  
+  END SUBROUTINE rk_CPush
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE rk_CPop( T, H, Y, dY, d2Y )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL :: T, H, Y(NVAR), dY(NVAR), d2Y(NVAR)
+   
+   IF ( stack_ptr <= 0 ) THEN
+     PRINT*,'Pop failed: empty buffer'
+     STOP
+   END IF  
+   H = chk_H( stack_ptr )
+   T = chk_T( stack_ptr )
+   ! CALL WCOPY(NVAR,chk_Y(1,stack_ptr),1,Y,1)
+   ! CALL WCOPY(NVAR,chk_dY(1,stack_ptr),1,dY,1)
+   ! CALL WCOPY(NVAR,chk_d2Y(1,stack_ptr),1,d2Y,1)
+     Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+    dY(1:NVAR) = chk_dY(1:NVAR,stack_ptr)
+   d2Y(1:NVAR) = chk_d2Y(1:NVAR,stack_ptr)
+
+   stack_ptr = stack_ptr - 1
+  
+  END SUBROUTINE rk_CPop
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_FwdIntegrator( N,Tstart,Tend,Y,AdjointType,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+      INTEGER,  INTENT(IN)         :: N
+      KPP_REAL, INTENT(IN)    :: Tend, Tstart
+      KPP_REAL, INTENT(INOUT) :: Y(N)
+      INTEGER,  INTENT(OUT)        :: IERR
+      INTEGER,  INTENT(IN)         :: AdjointType
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL    :: FJAC(N,N), E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)   
+#else
+      KPP_REAL    :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)   
+#endif                
+      KPP_REAL, DIMENSION(N) :: Z1,Z2,Z3,Z4,SCAL,DZ1,DZ2,DZ3,DZ4,G,TMP,FCN0
+      KPP_REAL  :: CONT(N,3), Tdirection,  H, T, Hacc, Hnew, Hold, Fac,  &
+                 FacGus, Theta, Err, ErrOld, NewtonRate, NewtonIncrement,  &
+                 Hratio, Qnewton, NewtonPredictedErr,NewtonIncrementOld, ThetaSD
+      INTEGER :: IP1(N),IP2(N),NewtonIter, ISING, Nconsecutive, NewIt
+      LOGICAL :: Reject, FirstStep, SkipJac, NewtonDone, SkipLU
+      
+      KPP_REAL, DIMENSION(:), POINTER :: Zstage
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (AdjointType == KPP_ROOT_discrete) THEN ! Save stage solution
+        ALLOCATE(Zstage(N*3), STAT=i)
+        IF (i/=0) THEN
+          PRINT*,'Allocation of Zstage failed'
+          STOP
+        END IF
+      END IF   
+      T=Tstart
+
+      Tdirection = SIGN(ONE,Tend-Tstart)
+      H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , Hmax )
+      IF (ABS(H) <= 10.d0*Roundoff) H = 1.0d-6
+      H = SIGN(H,Tdirection)
+      Hold      = H
+      Reject    = .FALSE.
+      FirstStep = .TRUE.
+      SkipJac   = .FALSE.
+      SkipLU    = .FALSE.
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= ZERO) THEN
+         H = Tend-T
+      END IF
+      Nconsecutive = 0
+      CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+        !~~~> Compute the Jacobian matrix
+        IF ( .NOT.SkipJac ) THEN
+          CALL JAC_CHEM(T,Y,FJAC)
+          ISTATUS(ijac) = ISTATUS(ijac) + 1
+        END IF
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+        IF (ISING /= 0) THEN
+          ISTATUS(isng) = ISTATUS(isng) + 1; Nconsecutive = Nconsecutive + 1
+          IF (Nconsecutive >= 5) THEN
+            CALL RK_ErrorMsg(-12,T,H,IERR); RETURN
+          END IF
+          H=H*0.5d0; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+          CYCLE Tloop
+        ELSE
+          Nconsecutive = 0    
+        END IF   
+      END IF ! SkipLU
+   
+      ISTATUS(istp) = ISTATUS(istp) + 1
+      IF (ISTATUS(istp) > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RK_ErrorMsg(-9,T,H,IERR); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RK_ErrorMsg(-10,T,H,IERR); RETURN
+      END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+      !~~~>  Starting values for Newton iteration
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+      ELSE
+         ! Evaluate quadratic polynomial
+         CALL RK_Interpolate('eval',N,H,Hold,Z1,Z2,Z3,CONT)
+      END IF
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      Fac = 0.5d0 ! Step reduction if too many iterations
+      
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit  
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,DZ1,DZ2,DZ3)
+            
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+
+
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ2)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ3)**2 )/3.0d0 )
+            
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+                IF ( NewtonIter < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                    EXIT NewtonLoop
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1,1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2,1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3,1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+	      NewIt = NewtonIter
+	      EXIT NewtonLoop
+	    END IF  
+   	    IF (NewtonIter == NewtonMaxit) THEN
+		PRINT*, 'Slow or no convergence in Newton Iteration: Max no. of', &
+		 	'Newton iterations reached'
+	    END IF
+
+      END DO NewtonLoop
+
+            
+      IF (.NOT.NewtonDone) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+	   ISTATUS(irej) = ISTATUS(irej) + 1
+           CYCLE Tloop
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SDIRK Stage
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+
+!~~~>  Starting values for Newton iterations
+       Z4(1:N) = Z3(1:N)
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL FUN_CHEM(T,Y,DZ4)
+       ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       
+!       G = H*rkBgam(0)*DZ4 + rkTheta(1)*Z1 + rkTheta(2)*Z2 + rkTheta(3)*Z3
+       CALL Set2Zero(N, G)
+       CALL WAXPY(N,rkBgam(0)*H, DZ4,1,G,1) 
+       CALL WAXPY(N,rkTheta(1),Z1,1,G,1)
+       CALL WAXPY(N,rkTheta(2),Z2,1,G,1)
+       CALL WAXPY(N,rkTheta(3),Z3,1,G,1)
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+SDNewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+	    CALL WADD(N,Y,Z4,TMP)         ! TMP <- Y + Z4
+	    CALL FUN_CHEM(T+H,TMP,DZ4) 	  ! DZ4 <- Fun(Y+Z4)         
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ4(1:N) = (G(1:N)-Z4(1:N))*(rkGamma/H) + DZ4(1:N)
+	    CALL WAXPY (N, -ONE*rkGamma/H, Z4, 1, DZ4, 1)
+            CALL WAXPY (N, rkGamma/H, G,1, DZ4,1)
+
+!~~~>   Solve the linear system
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E1, N, IP1, DZ4, N, ISING )
+#else
+            CALL KppSolve(E1, DZ4)
+#endif
+            
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4)
+            IF ( NewtonIter == 1 ) THEN
+                ThetaSD      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaSD = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaSD < 0.99d0) THEN
+                    NewtonRate = ThetaSD/(ONE-ThetaSD)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaSD**(NewtonMaxit-NewtonIter)/(ONE-ThetaSD)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      !print*,'Error too large: ', NewtonPredictedErr
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT SDNewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: ThetaSD too large
+                    !print*,'Theta too large: ',ThetaSD
+                    EXIT SDNewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z4 <-- Z4 + DZ4
+            CALL WAXPY(N,ONE,DZ4,1,Z4,1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT SDNewtonLoop
+            
+            END DO SDNewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+                CYCLE Tloop
+            END IF
+      END IF
+!~~~>  End of implified SDIRK Newton iterations
+
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+!         DZ4(1:N) =  rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4    
+	 CALL Set2Zero(N, DZ4)
+	 IF (rkD(1) /= ZERO) CALL WAXPY(N, rkD(1), Z1, 1, DZ4, 1)
+	 IF (rkD(2) /= ZERO) CALL WAXPY(N, rkD(2), Z2, 1, DZ4, 1)
+	 IF (rkD(3) /= ZERO) CALL WAXPY(N, rkD(3), Z3, 1, DZ4, 1)
+	 CALL WAXPY(N, -ONE, Z4, 1, DZ4, 1)
+         Err = RK_ErrorNorm(N,SCAL,DZ4)    
+      ELSE
+         CALL  RK_ErrorEstimate(N,H,Y,T, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,FirstStep,Reject)
+      END IF
+!~~~> Computation of new step size Hnew
+      Fac  = Err**(-ONE/rkELO)*          &
+             MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit))
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Accept/reject step 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:IF (Err < ONE) THEN !~~~> STEP IS ACCEPTED
+         IF (AdjointType == KPP_ROOT_discrete) THEN ! Save stage solution
+            ! CALL WCOPY(N,Z1,1,Zstage(1),1)
+            ! CALL WCOPY(N,Z2,1,Zstage(N+1),1)
+            ! CALL WCOPY(N,Z3,1,Zstage(2*N+1),1)
+            Zstage(1:N)       = Z1(1:N) 
+            Zstage(N+1:2*N)   = Z2(1:N)
+            Zstage(2*N+1:3*N) = Z3(1:N)
+	    ! Push old Y - Y at the beginning of the stage
+            CALL rk_DPush(T, H, Y, Zstage, NewIt, E1, E2)
+         END IF
+
+         FirstStep=.FALSE.
+         ISTATUS(iacc) = ISTATUS(iacc) + 1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            IF (ISTATUS(iacc) > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(Err**2/ErrOld)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew = Fac*H
+            END IF
+            Hacc=H
+            ErrOld=MAX(1.0d-2,Err)
+         END IF
+         Hold = H
+         T = T+H 
+         ! Update solution: Y <- Y + sum (d_i Z_i)
+         IF (rkD(1) /= ZERO) CALL WAXPY(N,rkD(1),Z1,1,Y,1)
+         IF (rkD(2) /= ZERO) CALL WAXPY(N,rkD(2),Z2,1,Y,1)
+         IF (rkD(3) /= ZERO) CALL WAXPY(N,rkD(3),Z3,1,Y,1)
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         IF (StartNewton) CALL RK_Interpolate('make',N,H,Hold,Z1,Z2,Z3,CONT)
+         CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         RSTATUS(itexit) = T
+         RSTATUS(ihnew)  = Hnew
+         RSTATUS(ihacc)  = H
+         Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin) , Hmax )
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >=  ZERO) THEN
+            H = Tend-T
+         ELSE
+            Hratio=Hnew/H
+            ! Reuse the LU decomposition
+            SkipLU = (Theta<=ThetaMin) .AND. (Hratio>=Qmin) .AND. (Hratio<=Qmax)
+	    SkipLU = .false.
+            IF (.NOT.SkipLU) H=Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+         ! SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject   = .TRUE.
+         SkipJac  = .TRUE.
+         SkipLU   = .FALSE. 
+         IF (ISTATUS(iacc) >= 1) ISTATUS(irej) = ISTATUS(irej) + 1
+      END IF accept
+      
+    END DO Tloop
+
+!~~~> Save last state: only needed for continuous adjoint
+   IF ( (AdjointType == KPP_ROOT_continuous) .OR. &
+       (AdjointType == KPP_ROOT_simple_continuous) ) THEN
+       CALL Fun_Chem(T,Y,Fcn0)
+       CALL rk_CPush( T, H, Y, Fcn0, DZ3)
+!~~~> Deallocate stage buffer: only needed for discrete adjoint
+   ELSEIF (AdjointType == KPP_ROOT_discrete) THEN 
+        DEALLOCATE(Zstage, STAT=i)
+        IF (i/=0) THEN
+          PRINT*,'Deallocation of Zstage failed'
+          STOP
+        END IF
+   END IF   
+   
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_FwdIntegrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_DadjInt( NADJ,Lambda,Tstart,Tend,T,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+      INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+      KPP_REAL, INTENT(INOUT) :: Lambda(N,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tstart, Tend
+      KPP_REAL, INTENT(INOUT) :: T
+      INTEGER,  INTENT(OUT)   :: IERR
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL    :: Jac0(N,N), Jac1(N,N),Jac2(N,N),Jac3(N,N), E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)   
+      KPP_REAL    :: Jbig(3*N,3*N), X(3*N)
+      INTEGER     :: IPbig(3*N), ISING
+#else
+      KPP_REAL, DIMENSION(LU_NONZERO) :: Jac0, Jac1, Jac2, Jac3, E1
+      COMPLEX(kind=dp), DIMENSION(LU_NONZERO) :: E2   
+      ! Next two lines for sparse big algebra:
+      ! KPP_REAL :: Jbig(3,3,LU_NONZERO), X(3,N)
+      ! INTEGER :: IPbig(3,N)
+      KPP_REAL :: Jbig(3*N,3*N), X(3*N)
+      INTEGER  :: IPbig(3*N)
+#endif                
+      KPP_REAL, DIMENSION(N,NADJ) :: U1,U2,U3
+      KPP_REAL, DIMENSION(N) :: SCAL,DU1,DU2,DU3
+      KPP_REAL :: Y(N), Zstage(3*N)
+      KPP_REAL  :: H, NewtonRate, NewtonIncrement, NewtonIncrementOld
+      INTEGER :: IP1(N),IP2(N),NewtonIter, ISING, iadj, NewIt
+      LOGICAL :: Reject, NewtonDone, NewtonConverge
+      KPP_REAL :: T1, Theta
+      KPP_REAL, DIMENSION(N) :: TMP, G1, G2, G3
+      INTEGER :: i, j
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      T1 = Tend      
+!      Tdirection = SIGN(ONE,Tend-Tstart)
+      NewtonConverge = .TRUE.
+      Reject = .FALSE.
+      
+!~~~> Time loop begins below 
+TimeLoop:DO WHILE ( stack_ptr > 0 )
+
+   IF (.not.Reject) THEN
+   
+     !~~~>  Recover checkpoints for stage values and vectors
+     CALL rk_DPop(T, H, Y, Zstage, NewIt, E1, E2)
+
+     !~~~>  Compute LU decomposition 
+     IF (.NOT.SaveLU) THEN
+        !~~~> Compute the Jacobian matrix
+        CALL JAC_CHEM(T,Y,Jac0)
+        ISTATUS(ijac) = ISTATUS(ijac) + 1
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,Jac0,E1,IP1,E2,IP2,ISING)
+     END IF
+   
+     !~~~>   Jacobian values at stage vectors
+     CALL WADD(N,Y,Zstage(1),TMP)       ! TMP  <- Y + Z1
+     CALL JAC_CHEM(T+rkC(1)*H,TMP,Jac1) ! Jac1 <- Jac(Y+Z1)  
+     CALL WADD(N,Y,Zstage(1+N),TMP)     ! TMP  <- Y + Z2
+     CALL JAC_CHEM(T+rkC(2)*H,TMP,Jac2) ! Jac2 <- Jac(Y+Z2)  
+     CALL WADD(N,Y,Zstage(1+2*N),TMP)   ! TMP  <- Y + Z3
+     CALL JAC_CHEM(T+rkC(3)*H,TMP,Jac3) ! Jac3 <- Jac(Y+Z3)
+      
+   END IF ! .not.Reject
+
+111 CONTINUE
+
+   IF ( (AdjointSolve == Solve_adaptive .and. .not.NewtonConverge) &
+         .or. (AdjointSolve == Solve_direct) ) THEN
+#ifdef FULL_ALGEBRA  
+       DO j=1,N
+         DO i=1,N
+          Jbig(i,j)         = -H*rkA(1,1)*Jac1(i,j)
+          Jbig(N+i,j)       = -H*rkA(2,1)*Jac1(i,j)
+          Jbig(2*N+i,j)     = -H*rkA(3,1)*Jac1(i,j)
+          Jbig(i,N+j)       = -H*rkA(1,2)*Jac2(i,j)
+          Jbig(N+i,N+j)     = -H*rkA(2,2)*Jac2(i,j)
+          Jbig(2*N+i,N+j)   = -H*rkA(3,2)*Jac2(i,j)
+          Jbig(i,2*N+j)     = -H*rkA(1,3)*Jac3(i,j)
+          Jbig(N+i,2*N+j)   = -H*rkA(2,3)*Jac3(i,j)
+          Jbig(2*N+i,2*N+j) = -H*rkA(3,3)*Jac3(i,j)
+         END DO  
+       END DO
+       DO i=1,3*N
+	  Jbig(i,i) = Jbig(i,i) + ONE
+       END DO
+       CALL DGETRF(3*N,3*N,Jbig,3*N,IPbig,ISING) 
+       ! CALL WGEFA(3*N,Jbig,IPbig,ISING) 
+       IF (ISING /= 0) THEN
+         PRINT*,'Big guy is singular'; STOP
+       END IF 
+#else    
+!  Commented lines for sparse big algebra:    
+!      !~~~>  Construct the big Jacobian
+!      DO j=1,LU_NONZERO
+!        DO i=1,3
+!          Jbig(i,1,j) = -H*rkA(i,1)*Jac1(j)
+!          Jbig(i,2,j) = -H*rkA(i,2)*Jac2(j)
+!          Jbig(i,3,j) = -H*rkA(i,3)*Jac3(j)
+!        END DO
+!      END DO
+!      DO j=1,NVAR
+!        DO i=1,3
+!          Jbig(i,i,LU_DIAG(j)) = ONE + Jbig(i,i,LU_DIAG(j))
+!        END DO
+!      END DO
+!      !~~~>  Solve the big system
+!      CALL KppDecompBig( Jbig, IPbig, ISING )
+!  Use full big algebra:    
+      Jbig(1:3*N,1:3*N) = 0.0d0
+      DO i=1,LU_NONZERO
+	  Jbig(LU_irow(i),LU_icol(i))         = -H*rkA(1,1)*Jac1(i)
+	  Jbig(LU_irow(i),N+LU_icol(i))       = -H*rkA(1,2)*Jac2(i)
+	  Jbig(LU_irow(i),2*N+LU_icol(i))     = -H*rkA(1,3)*Jac3(i)
+	  Jbig(N+LU_irow(i),LU_icol(i))       = -H*rkA(2,1)*Jac1(i)
+	  Jbig(N+LU_irow(i),N+LU_icol(i))     = -H*rkA(2,2)*Jac2(i)
+	  Jbig(N+LU_irow(i),2*N+LU_icol(i))   = -H*rkA(2,3)*Jac3(i)
+	  Jbig(2*N+LU_irow(i),LU_icol(i))     = -H*rkA(3,1)*Jac1(i)
+	  Jbig(2*N+LU_irow(i),N+LU_icol(i))   = -H*rkA(3,2)*Jac2(i)
+	  Jbig(2*N+LU_irow(i),2*N+LU_icol(i)) = -H*rkA(3,3)*Jac3(i)
+      END DO
+      DO i=1, 3*N
+	 Jbig(i,i) = ONE + Jbig(i,i)
+      END DO
+      ! CALL DGETRF(3*N,3*N,Jbig,3*N,IPbig,ISING) 
+      CALL WGEFA(3*N,Jbig,IPbig,ISING) 
+      IF (ISING /= 0) THEN
+         PRINT*,'Big guy is singular'; STOP
+      END IF
+#endif        
+    END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Adj:DO iadj = 1, NADJ      
+      !~~~>  Starting values for Newton iteration
+      ! CALL WCOPY(N,Lambda(1,iadj),1,U1(1,iadj),1)
+      ! CALL WCOPY(N,Lambda(1,iadj),1,U2(1,iadj),1)
+      ! CALL WCOPY(N,Lambda(1,iadj),1,U3(1,iadj),1)
+      CALL Set2Zero(N,U1(1,iadj))
+      CALL Set2Zero(N,U2(1,iadj))
+      CALL Set2Zero(N,U3(1,iadj))
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      !~~~>    Right Hand Side - part G for all Newton iterations
+      CALL RK_PrepareRHS_G(N,H,Jac1,Jac2,Jac3,Lambda(1,iadj), 	      &
+      			G1, G2, G3)
+			
+      IF ( (AdjointSolve == Solve_adaptive .and. NewtonConverge)      &
+            .or. (AdjointSolve == Solve_fixed) ) THEN
+
+NewtonLoopAdj:DO  NewtonIter = 1, NewtonMaxit  
+
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS_Adj(N,H,Jac1,Jac2,Jac3,Lambda(1,iadj), &
+	    		U1(1,iadj),U2(1,iadj),U3(1,iadj),	      &
+			G1, G2, G3, DU1,DU2,DU3)
+
+            !~~~> Solve the linear systems
+            CALL RK_SolveTR( N,H,E1,IP1,E2,IP2,DU1,DU2,DU3,ISING )
+
+!~~~> The following code performs an adaptive number of Newton
+!     iterations for solving adjoint system
+            IF (AdjointSolve == Solve_adaptive) THEN
+
+            CALL RK_ErrorScale(N,ITOL,                      &
+                 AbsTol_adj(1:N,iadj),RelTol_adj(1:N,iadj), &
+                 Lambda(1:N,iadj),SCAL)
+
+	    ! SCAL(1:N) = 1.0d0
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DU1)**2 +   &
+                                RK_ErrorNorm(N,SCAL,DU2)**2 +         &
+                                RK_ErrorNorm(N,SCAL,DU3)**2 )/3.0d0 )
+            
+	
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+		    Reject = .TRUE.
+		    NewtonDone = .FALSE.
+                    EXIT NewtonLoopAdj
+                END IF
+
+            END IF
+	  
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+
+            END IF ! (AdjointSolve == Solve_adaptive)
+            
+            ! Update solution
+            CALL WAXPY(N,-ONE,DU1,1,U1(1,iadj),1) ! U1 <- U1 - DU1
+            CALL WAXPY(N,-ONE,DU2,1,U2(1,iadj),1) ! U2 <- U2 - DU2
+            CALL WAXPY(N,-ONE,DU3,1,U3(1,iadj),1) ! U3 <- U3 - DU3
+
+            IF (AdjointSolve == Solve_adaptive) THEN
+            ! When performing an adaptive number of iterations
+            !       check the error in Newton iterations
+               NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+               IF ((NewtonDone).and.(NewtonIter>NewIt+1)) EXIT NewtonLoopAdj
+            ELSE IF (AdjointSolve == Solve_fixed) THEN
+               IF (NewtonIter>MAX(NewIt+1,6)) EXIT NewtonLoopAdj
+            END IF   
+            
+      END DO NewtonLoopAdj
+      
+      IF ((AdjointSolve==Solve_adaptive).AND.(.NOT.NewtonDone)) THEN
+         ! print*,'Newton iterations do not converge, switching to full system.'
+	 NewtonConverge = .FALSE.
+	 Reject = .TRUE.
+	 GOTO 111
+      END IF
+      
+      ! Update adjoint solution: Y_adj <- Y_adj + sum (U_i)
+      CALL WAXPY(N,ONE,U1(1,iadj),1,Lambda(1,iadj),1)
+      CALL WAXPY(N,ONE,U2(1,iadj),1,Lambda(1,iadj),1)
+      CALL WAXPY(N,ONE,U3(1,iadj),1,Lambda(1,iadj),1)
+
+      ELSE ! NewtonConverge = .false.
+
+#ifdef FULL_ALGEBRA  
+	X(1:N)       = -G1(1:N)
+	X(N+1:2*N)   = -G2(1:N)
+	X(2*N+1:3*N) = -G3(1:N)
+	CALL DGETRS('T',3*N,1,Jbig,3*N,IPbig,X,3*N,ISING) 
+        ! CALL WGESL('T',3*N,Jbig,IPbig,X)
+	Lambda(1:N,iadj) = Lambda(1:N,iadj)+X(1:N)+X(N+1:2*N)+X(2*N+1:3*N)
+#else        
+!   Commented lines for sparse big algebra:
+!	X(1,1:N) = -G1(1:N)
+!	X(2,1:N) = -G2(1:N)
+!	X(3,1:N) = -G3(1:N)
+!	CALL KppSolveBigTR( Jbig, IPbig, X )                
+!	Lambda(1:N,iadj) = Lambda(1:N,iadj)+X(1,1:N)+X(2,1:N)+X(3,1:N)
+!   Use fill big algebra:
+	X(1:N)       = -G1(1:N)
+	X(N+1:2*N)   = -G2(1:N)
+	X(2*N+1:3*N) = -G3(1:N)
+	! CALL DGETRS('T',3*N,1,Jbig,3*N,IPbig,X,3*N,ISING) 
+        CALL WGESL('T',3*N,Jbig,IPbig,X)
+	Lambda(1:N,iadj) = Lambda(1:N,iadj)+X(1:N)+X(N+1:2*N)+X(2*N+1:3*N)
+#endif        
+        IF ((AdjointSolve==Solve_adaptive).AND.(iadj>=NADJ)) THEN
+	  NewtonConverge = .TRUE.
+	  Reject = .FALSE.
+        END IF
+     
+     END IF ! NewtonConverge
+ 
+   END DO Adj
+   
+   T1 = T1-H
+      
+   END DO TimeLoop
+   
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_DadjInt
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_CadjInt (                        &
+        NADJ, Y,                                &
+        Tstart, Tend, T, IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+!~~~> Arguments
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+      INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+      KPP_REAL, INTENT(INOUT) :: Y(N,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tstart, Tend
+      KPP_REAL, INTENT(INOUT) :: T
+      INTEGER,  INTENT(OUT)        :: IERR
+
+  END SUBROUTINE rk_CadjInt
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE rk_SimpleCadjInt (                  &
+        NADJ, Y,                                &
+        Tstart, Tend, T,                        &
+        IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+!~~~> Arguments
+!~~~> Input: the initial condition at Tstart; Output: the solution at T   
+      INTEGER, INTENT(IN)     :: NADJ
+!~~~> First order adjoint   
+      KPP_REAL, INTENT(INOUT) :: Y(N,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tstart, Tend
+      KPP_REAL, INTENT(INOUT) :: T
+      INTEGER,  INTENT(OUT)        :: IERR
+
+  END SUBROUTINE rk_SimpleCadjInt
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RungeKutta due to the following error:'
+
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> Improper values for FacMin/FacMax/FacSafe/FacRej'
+    CASE (-5)
+      PRINT * , '--> Improper value for ThetaMin'
+    CASE (-6)
+      PRINT * , '--> Newton stopping tolerance too small'
+    CASE (-7)
+      PRINT * , '--> Improper values for Qmin, Qmax'
+    CASE (-8)
+      PRINT * , '--> Tolerances are too small'
+    CASE (-9)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-10)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-11)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-12)
+      PRINT * , '--> Non-convergence of Newton iterations'
+    CASE (-13)
+      PRINT * , '--> Requested RK method not implemented'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   WRITE(6,FMT="(5X,'T=',E12.5,'  H=',E12.5)") T, H 
+
+ END SUBROUTINE RK_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)= ONE/(AbsTol(1)+RelTol(1)*ABS(Y(i)))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=ONE/(AbsTol(i)+RelTol(i)*ABS(Y(i)))
+       END DO
+   END IF
+      
+ END SUBROUTINE RK_ErrorScale
+
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  SUBROUTINE RK_Transform(N,Tr,Z1,Z2,Z3,W1,W2,W3)
+!!~~~>                 W <-- Tr x Z
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: N, i
+!      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),W1(N),W2(N),W3(N)
+!      KPP_REAL :: x1, x2, x3
+!      DO i=1,N
+!          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+!          W1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+!          W2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+!          W3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+!      END DO
+!  END SUBROUTINE RK_Transform
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RK_Interpolate(action,N,H,Hold,Z1,Z2,Z3,CONT)
+!~~~>   Constructs or evaluates a quadratic polynomial
+!         that interpolates the Z solution at current step
+!         and provides starting values for the next step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      INTEGER :: N, i
+      KPP_REAL :: H,Hold,Z1(N),Z2(N),Z3(N),CONT(N,3)
+      KPP_REAL :: r, x1, x2, x3, den
+      CHARACTER(LEN=4) :: action
+       
+      SELECT CASE (action) 
+      CASE ('make')
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         den = (rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3))
+         DO i=1,N
+             CONT(i,1)=(-rkC(3)**2*rkC(2)*Z1(i)+Z3(i)*rkC(2)*rkC(1)**2 &
+                        +rkC(2)**2*rkC(3)*Z1(i)-rkC(2)**2*rkC(1)*Z3(i) &
+                        +rkC(3)**2*rkC(1)*Z2(i)-Z2(i)*rkC(3)*rkC(1)**2)&
+                        /den-Z3(i)
+             CONT(i,2)= -( rkC(1)**2*(Z3(i)-Z2(i)) + rkC(2)**2*(Z1(i)  &
+                          -Z3(i)) +rkC(3)**2*(Z2(i)-Z1(i)) )/den
+             CONT(i,3)= ( rkC(1)*(Z3(i)-Z2(i)) + rkC(2)*(Z1(i)-Z3(i))  &
+                           +rkC(3)*(Z2(i)-Z1(i)) )/den
+         END DO
+      CASE ('eval')
+          ! Evaluate quadratic polynomial
+          r = H/Hold
+         x1 = ONE + rkC(1)*r
+         x2 = ONE + rkC(2)*r
+         x3 = ONE + rkC(3)*r
+         DO i=1,N
+            Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3))
+            Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3))
+            Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3))
+         END DO
+       END SELECT   
+  END SUBROUTINE RK_Interpolate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z - hA x F
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: T,H
+      KPP_REAL, DIMENSION(N) :: Y,Z1,Z2,Z3,F,R1,R2,R3,TMP
+
+      CALL WCOPY(N,Z1,1,R1,1) ! R1 <- Z1
+      CALL WCOPY(N,Z2,1,R2,1) ! R2 <- Z2
+      CALL WCOPY(N,Z3,1,R3,1) ! R3 <- Z3
+
+      CALL WADD(N,Y,Z1,TMP)              ! TMP <- Y + Z1
+      CALL FUN_CHEM(T+rkC(1)*H,TMP,F)    ! F1 <- Fun(Y+Z1)         
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y,Z2,TMP)              ! TMP <- Y + Z2
+      CALL FUN_CHEM(T+rkC(2)*H,TMP,F)    ! F2 <- Fun(Y+Z2)        
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y,Z3,TMP)              ! TMP <- Y + Z3
+      CALL FUN_CHEM(T+rkC(3)*H,TMP,F)    ! F3 <- Fun(Y+Z3)     
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_Adj(N,H,Jac1,Jac2,Jac3,Lambda, &
+                      U1,U2,U3,G1,G2,G3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z_adj - hA x Jac*Z_adj - h J^t b lambda
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, DIMENSION(N), INTENT(IN) :: U1,U2,U3,Lambda,G1,G2,G3
+      KPP_REAL, DIMENSION(N), INTENT(OUT) :: R1,R2,R3
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(N,N), INTENT(IN) :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO),INTENT(IN) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) ::  F,TMP
+
+
+      CALL WCOPY(N,G1,1,R1,1) ! R1 <- G1
+      CALL WCOPY(N,G2,1,R2,1) ! R2 <- G2
+      CALL WCOPY(N,G3,1,R3,1) ! R3 <- G3
+
+      CALL SET2ZERO(N,F)
+      CALL WAXPY(N,-H*rkA(1,1),U1,1,F,1) ! F1 <- -h*A_11*U1
+      CALL WAXPY(N,-H*rkA(2,1),U2,1,F,1) ! F1 <- F1 - h*A_21*U2
+      CALL WAXPY(N,-H*rkA(3,1),U3,1,F,1) ! F1 <- F1 - h*A_31*U3
+#ifdef FULL_ALGEBRA  
+      TMP = MATMUL(TRANSPOSE(Jac1),F)    
+#else      
+      CALL JacTR_SP_Vec ( Jac1, F, TMP )   ! R1 <- -Jac(Y+Z1)^t*h*sum(A_j1*U_j)  
+#endif      
+      CALL WAXPY(N,ONE,U1,1,TMP,1) ! R1 <- U1 -Jac(Y+Z1)^t*h*sum(A_j1*U_j)
+      CALL WAXPY(N,ONE,TMP,1,R1,1) ! R1 <- U1 -Jac(Y+Z1)^t*h*sum(A_j1*U_j)
+
+      CALL SET2ZERO(N,F)
+      CALL WAXPY(N,-H*rkA(1,2),U1,1,F,1) ! F2 <- -h*A_11*U1
+      CALL WAXPY(N,-H*rkA(2,2),U2,1,F,1) ! F2 <- F2 - h*A_21*U2
+      CALL WAXPY(N,-H*rkA(3,2),U3,1,F,1) ! F2 <- F2 - h*A_31*U3
+#ifdef FULL_ALGEBRA  
+      TMP = MATMUL(TRANSPOSE(Jac2),F)    
+#else      
+      CALL JacTR_SP_Vec ( Jac2, F, TMP )   ! R2 <- -Jac(Y+Z2)^t*h*sum(A_j2*U_j)  
+#endif      
+      CALL WAXPY(N,ONE,U2,1,TMP,1) ! R2 <- U2 -Jac(Y+Z2)^t*h*sum(A_j2*U_j)
+      CALL WAXPY(N,ONE,TMP,1,R2,1) ! R2 <- U2 -Jac(Y+Z2)^t*h*sum(A_j2*U_j)
+
+      CALL SET2ZERO(N,F)
+      CALL WAXPY(N,-H*rkA(1,3),U1,1,F,1) ! F3 <- -h*A_11*U1
+      CALL WAXPY(N,-H*rkA(2,3),U2,1,F,1) ! F3 <- F3 - h*A_21*U2
+      CALL WAXPY(N,-H*rkA(3,3),U3,1,F,1) ! F3 <- F3 - h*A_31*U3
+#ifdef FULL_ALGEBRA  
+      TMP = MATMUL(TRANSPOSE(Jac3),F)    
+#else      
+      CALL JacTR_SP_Vec ( Jac3, F, TMP )   ! R3 <- -Jac(Y+Z3)^t*h*sum(A_j3*U_j)  
+#endif      
+      CALL WAXPY(N,ONE,U3,1,TMP,1) ! R3 <- U3 -Jac(Y+Z3)^t*h*sum(A_j3*U_j)
+      CALL WAXPY(N,ONE,TMP,1,R3,1) ! R3 <- U3 -Jac(Y+Z3)^t*h*sum(A_j3*U_j)
+
+
+  END SUBROUTINE RK_PrepareRHS_Adj
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_G(N,H,Jac1,Jac2,Jac3,Lambda, &
+                      G1,G2,G3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z_adj - hA x Jac*Z_adj - h J^t b lambda
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, DIMENSION(N), INTENT(IN) :: Lambda
+      KPP_REAL, DIMENSION(N), INTENT(OUT) :: G1,G2,G3
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(N,N), INTENT(IN) :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO),INTENT(IN) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) ::  F  
+
+      CALL SET2ZERO(N,G1)
+      CALL SET2ZERO(N,G2)
+      CALL SET2ZERO(N,G3)
+#ifdef FULL_ALGEBRA  
+      F = MATMUL(TRANSPOSE(Jac1),Lambda)    
+#else      
+      CALL JacTR_SP_Vec ( Jac1, Lambda, F )   ! F1 <- Jac(Y+Z1)^t*Lambda  
+#endif      
+      CALL WAXPY(N,-H*rkB(1),F,1,G1,1) ! R1 <- R1 - h*B_1*F1
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(TRANSPOSE(Jac2),Lambda)    
+#else      
+      CALL JacTR_SP_Vec ( Jac2, Lambda, F )   ! F2 <- Jac(Y+Z2)^t*Lambda  
+#endif      
+      CALL WAXPY(N,-H*rkB(2),F,1,G2,1) ! R2 <- R2 - h*B_2*F2
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(TRANSPOSE(Jac3),Lambda)    
+#else      
+      CALL JacTR_SP_Vec ( Jac3, Lambda, F )   ! F3 <- Jac(Y+Z3)^t*Lambda  
+#endif      
+      CALL WAXPY(N,-H*rkB(3),F,1,G3,1) ! R3 <- R3 - h*B_3*F3
+
+            
+  END SUBROUTINE RK_PrepareRHS_G
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+   !~~~> Compute the matrices E1 and E2 and their decompositions
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N, ISING
+      KPP_REAL    :: H, Alpha, Beta, Gamma
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: FJAC(N,N),E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)
+#else      
+      KPP_REAL    :: FJAC(LU_NONZERO),E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      INTEGER :: IP1(N), IP2(N), i, j
+      
+      Gamma = rkGamma/H
+      Alpha = rkAlpha/H
+      Beta  = rkBeta /H
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+Gamma
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,N
+         j=LU_DIAG(i); E1(j)=E1(j)+Gamma
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+      IF (ISING /= 0) THEN
+         ISTATUS(idec) = ISTATUS(idec) + 1
+         RETURN
+      END IF
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), ZERO )
+        END DO
+        E2(j,j) = E2(j,j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), ZERO )
+      END DO
+      DO i=1,N
+         j = LU_DIAG(i); E2(j)=E2(j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      ISTATUS(idec) = ISTATUS(idec) + 1
+      
+   END SUBROUTINE RK_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Solve(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N,IP1(N),IP2(N),ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL    :: E1(N,N)
+      COMPLEX(kind=dp) :: E2(N,N)
+#else      
+      KPP_REAL    :: E1(LU_NONZERO)
+      COMPLEX(kind=dp) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL    :: R1(N),R2(N),R3(N)
+      KPP_REAL    :: H, x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! Z <- h^{-1) T^{-1) A^{-1) x Z
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3
+          R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3
+          R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,R1,N,ISING) 
+#else      
+      CALL KppSolve (E1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,ISING) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = AIMAG( BC(i) )
+      END DO
+
+      ! Z <- T x Z
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3
+          R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3
+          R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3
+      END DO
+
+      ISTATUS(isol) = ISTATUS(isol) + 1
+
+   END SUBROUTINE RK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_SolveTR(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)  :: N,IP1(N),IP2(N)
+      INTEGER, INTENT(OUT) :: ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL,    INTENT(IN) :: E1(N,N)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(N,N)
+#else      
+      KPP_REAL,    INTENT(IN) :: E1(LU_NONZERO)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(INOUT) :: R1(N),R2(N),R3(N)
+      KPP_REAL    :: H, x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! RHS <- h^{-1) (A^{-1) T^{-1))^t x RHS
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkAinvT(1,1)*x1 + rkAinvT(2,1)*x2 + rkAinvT(3,1)*x3
+          R2(i) = rkAinvT(1,2)*x1 + rkAinvT(2,2)*x2 + rkAinvT(3,2)*x3
+          R3(i) = rkAinvT(1,3)*x1 + rkAinvT(2,3)*x2 + rkAinvT(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('T',N,1,E1,N,IP1,R1,N,ISING) 
+#else      
+      CALL KppSolveTR (E1,R1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),-R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('T',N,1,E2,N,IP2,BC,N,ISING) 
+#else      
+      CALL KppSolveTRCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = -AIMAG( BC(i) )
+      END DO
+
+      ! X <- (T^{-1})^t x X
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkTinv(1,1)*x1 + rkTinv(2,1)*x2 + rkTinv(3,1)*x3
+          R2(i) = rkTinv(1,2)*x1 + rkTinv(2,2)*x2 + rkTinv(3,2)*x3
+          R3(i) = rkTinv(1,3)*x1 + rkTinv(2,3)*x2 + rkTinv(3,3)*x3
+      END DO
+
+      ISTATUS(isol) = ISTATUS(isol) + 1
+
+   END SUBROUTINE RK_SolveTR
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate(N,H,Y,T,   &
+              E1,IP1,Z1,Z2,Z3,SCAL,Err,   &
+              FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+#ifdef FULL_ALGEBRA      
+      KPP_REAL :: E1(N,N)
+      INTEGER  :: ISING
+#else       
+      KPP_REAL :: E1(LU_NONZERO)
+#endif      
+      KPP_REAL :: SCAL(N),Z1(N),Z2(N),Z3(N),F1(N),F2(N), &
+                        F0(N),Y(N),TMP(N),T,H
+      INTEGER :: IP1(N), i
+      LOGICAL FirstStep,Reject
+      KPP_REAL :: HEE1,HEE2,HEE3,Err
+
+      HEE1  = rkE(1)/H
+      HEE2  = rkE(2)/H
+      HEE3  = rkE(3)/H
+
+      CALL FUN_CHEM(T,Y,F0)
+      ISTATUS(ifun) = ISTATUS(ifun) + 1
+
+      DO  i=1,N
+         F2(i)  = HEE1*Z1(i)+HEE2*Z2(i)+HEE3*Z3(i)
+         TMP(i) = rkE(0)*F0(i) + F2(i)
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) THEN
+          CALL DGETRS('N',N,1,E1,N,IP1,TMP,N,ISING)
+      END IF	  
+      IF (rkMethod==GAU) THEN
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING)
+      END IF	  
+#else      
+      CALL KppSolve (E1, TMP)
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) THEN
+          CALL KppSolve (E1,TMP)
+      END IF	  
+      IF (rkMethod==GAU) THEN
+          CALL KppSolve (E1,TMP)
+      END IF	  
+#endif      
+
+      Err = RK_ErrorNorm(N,SCAL,TMP)
+!
+      IF (Err < ONE) RETURN
+firej:IF (FirstStep.OR.Reject) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)    
+          ISTATUS(ifun) = ISTATUS(ifun) + 1
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          Err = RK_ErrorNorm(N,SCAL,TMP)
+       END IF firej
+ 
+   END SUBROUTINE RK_ErrorEstimate
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL FUNCTION RK_ErrorNorm(N,SCAL,DY)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER :: N
+      KPP_REAL :: SCAL(N),DY(N)
+      INTEGER :: i
+
+      RK_ErrorNorm = ZERO
+      DO i=1,N
+          RK_ErrorNorm = RK_ErrorNorm + (DY(i)*SCAL(i))**2
+      END DO
+      RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), 1.0d-10 )
+ 
+   END FUNCTION RK_ErrorNorm
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau2A_Coefficients
+!    The coefficients of the 3-stage Radau-2A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+! The coefficients of the Radau2A method
+      KPP_REAL :: b0
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d-1
+      ELSE
+        b0 = 0.5d-1
+      END IF
+
+! The coefficients of the Radau2A method
+      rkMethod = R2A
+
+      rkA(1,1) =  1.968154772236604258683861429918299d-1
+      rkA(1,2) = -6.55354258501983881085227825696087d-2
+      rkA(1,3) =  2.377097434822015242040823210718965d-2
+      rkA(2,1) =  3.944243147390872769974116714584975d-1
+      rkA(2,2) =  2.920734116652284630205027458970589d-1
+      rkA(2,3) = -4.154875212599793019818600988496743d-2
+      rkA(3,1) =  3.764030627004672750500754423692808d-1
+      rkA(3,2) =  5.124858261884216138388134465196080d-1
+      rkA(3,3) =  1.111111111111111111111111111111111d-1
+
+      rkB(1) = 3.764030627004672750500754423692808d-1
+      rkB(2) = 5.124858261884216138388134465196080d-1
+      rkB(3) = 1.111111111111111111111111111111111d-1
+
+      rkC(1) = 1.550510257216821901802715925294109d-1
+      rkC(2) = 6.449489742783178098197284074705891d-1
+      rkC(3) = 1.0d0
+      
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = 1.0d0*b0
+      rkE(1) = -10.04880939982741556246032950764708d0*b0
+      rkE(2) = 1.382142733160748895793662840980412d0*b0
+      rkE(3) = -.3333333333333333333333333333333333d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .3764030627004672750500754423692807d0-1.558078204724922382431975370686279d0*b0
+      rkBgam(2) = .8914115380582557157653087040196118d0*b0+.5124858261884216138388134465196077d0
+      rkBgam(3) = -.1637777184845662566367174924883037d0-.3333333333333333333333333333333333d0*b0
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.520677486405081647234271944611547d0-10.04880939982741556246032950764708d0*b0
+      rkTheta(2) = 2.070455145596436382729929151810376d0+1.382142733160748895793662840980413d0*b0
+      rkTheta(3) = -.3333333333333333333333333333333333d0*b0-.3744441479783868387391430179970741d0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 6.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  9.443876248897524148749007950641664d-2
+      rkT(1,2) = -1.412552950209542084279903838077973d-1
+      rkT(1,3) = -3.00291941051474244918611170890539d-2
+      rkT(2,1) =  2.502131229653333113765090675125018d-1
+      rkT(2,2) =  2.041293522937999319959908102983381d-1
+      rkT(2,3) =  3.829421127572619377954382335998733d-1
+      rkT(3,1) =  1.0d0
+      rkT(3,2) =  1.0d0
+      rkT(3,3) =  0.0d0
+
+      rkTinv(1,1) =  4.178718591551904727346462658512057d0
+      rkTinv(1,2) =  3.27682820761062387082533272429617d-1
+      rkTinv(1,3) =  5.233764454994495480399309159089876d-1
+      rkTinv(2,1) = -4.178718591551904727346462658512057d0
+      rkTinv(2,2) = -3.27682820761062387082533272429617d-1
+      rkTinv(2,3) =  4.766235545005504519600690840910124d-1
+      rkTinv(3,1) = -5.02872634945786875951247343139544d-1
+      rkTinv(3,2) =  2.571926949855605429186785353601676d0
+      rkTinv(3,3) = -5.960392048282249249688219110993024d-1
+
+      rkTinvAinv(1,1) =  1.520148562492775501049204957366528d+1
+      rkTinvAinv(1,2) =  1.192055789400527921212348994770778d0
+      rkTinvAinv(1,3) =  1.903956760517560343018332287285119d0
+      rkTinvAinv(2,1) = -9.669512977505946748632625374449567d0
+      rkTinvAinv(2,2) = -8.724028436822336183071773193986487d0
+      rkTinvAinv(2,3) =  3.096043239482439656981667712714881d0
+      rkTinvAinv(3,1) = -1.409513259499574544876303981551774d+1
+      rkTinvAinv(3,2) =  5.895975725255405108079130152868952d0
+      rkTinvAinv(3,3) = -1.441236197545344702389881889085515d-1
+
+      rkAinvT(1,1) = .3435525649691961614912493915818282d0
+      rkAinvT(1,2) = -.4703191128473198422370558694426832d0
+      rkAinvT(1,3) = .3503786597113668965366406634269080d0
+      rkAinvT(2,1) = .9102338692094599309122768354288852d0
+      rkAinvT(2,2) = 1.715425895757991796035292755937326d0
+      rkAinvT(2,3) = .4040171993145015239277111187301784d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau2A_Coefficients
+
+    
+
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3C_Coefficients
+!    The coefficients of the 3-stage Lobatto-3C method
+!    (given to ~30 accurate digits)
+!    The parameter b0 can be chosen to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+
+      rkMethod = L3C
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d0
+      ELSE
+        b0 = 0.5d0
+      END IF
+! The coefficients of the Lobatto3C method
+
+      rkA(1,1) =  .1666666666666666666666666666666667d0
+      rkA(1,2) = -.3333333333333333333333333333333333d0
+      rkA(1,3) =  .1666666666666666666666666666666667d0
+      rkA(2,1) =  .1666666666666666666666666666666667d0
+      rkA(2,2) =  .4166666666666666666666666666666667d0
+      rkA(2,3) = -.8333333333333333333333333333333333d-1
+      rkA(3,1) =  .1666666666666666666666666666666667d0
+      rkA(3,2) =  .6666666666666666666666666666666667d0
+      rkA(3,3) =  .1666666666666666666666666666666667d0
+
+      rkB(1) = .1666666666666666666666666666666667d0
+      rkB(2) = .6666666666666666666666666666666667d0
+      rkB(3) = .1666666666666666666666666666666667d0
+
+      rkC(1) = 0.0d0
+      rkC(2) = 0.5d0
+      rkC(3) = 1.0d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .16666666666666666666666666666666667d0-b0
+      rkBhat(2) = .66666666666666666666666666666666667d0
+      rkBhat(3) = .16666666666666666666666666666666667d0
+      
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) =   .3808338772072650364017425226487022*b0
+      rkE(1) = -1.142501631621795109205227567946107*b0
+      rkE(2) = -1.523335508829060145606970090594809*b0
+      rkE(3) =   .3808338772072650364017425226487022*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .1666666666666666666666666666666667d0-1.d0*b0
+      rkBgam(2) = .6666666666666666666666666666666667d0
+      rkBgam(3) = -.2141672105405983697350758559820354d0
+      rkBgam(4) = .3808338772072650364017425226487021d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -3.d0*b0-.3808338772072650364017425226487021d0
+      rkTheta(2) = -4.d0*b0+1.523335508829060145606970090594808d0
+      rkTheta(3) = -.142501631621795109205227567946106d0+b0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 5.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 2.625816818958466716011888933765284d0
+      rkAlpha = 1.687091590520766641994055533117359d0
+      rkBeta  = 2.508731754924880510838743672432351d0
+
+      rkT(1,1) = 1.d0
+      rkT(1,2) = 1.d0
+      rkT(1,3) = 0.d0
+      rkT(2,1) = .4554100411010284672111720348287483d0
+      rkT(2,2) = -.6027050205505142336055860174143743d0
+      rkT(2,3) = -.4309321229203225731070721341350346d0
+      rkT(3,1) = 2.195823345445647152832799205549709d0
+      rkT(3,2) = -1.097911672722823576416399602774855d0
+      rkT(3,3) = .7850032632435902184104551358922130d0
+
+      rkTinv(1,1) = .4205559181381766909344950150991349d0
+      rkTinv(1,2) = .3488903392193734304046467270632057d0
+      rkTinv(1,3) = .1915253879645878102698098373933487d0
+      rkTinv(2,1) = .5794440818618233090655049849008650d0
+      rkTinv(2,2) = -.3488903392193734304046467270632057d0
+      rkTinv(2,3) = -.1915253879645878102698098373933487d0
+      rkTinv(3,1) = -.3659705575742745254721332009249516d0
+      rkTinv(3,2) = -1.463882230297098101888532803699806d0
+      rkTinv(3,3) = .4702733607340189781407813565524989d0
+
+      rkTinvAinv(1,1) = 1.104302803159744452668648155627548d0
+      rkTinvAinv(1,2) = .916122120694355522658740710823143d0
+      rkTinvAinv(1,3) = .5029105849749601702795812241441172d0
+      rkTinvAinv(2,1) = 1.895697196840255547331351844372453d0
+      rkTinvAinv(2,2) = 3.083877879305644477341259289176857d0
+      rkTinvAinv(2,3) = -1.502910584974960170279581224144117d0
+      rkTinvAinv(3,1) = .8362439183082935036129145574774502d0
+      rkTinvAinv(3,2) = -3.344975673233174014451658229909802d0
+      rkTinvAinv(3,3) = .312908409479233358005944466882642d0
+
+      rkAinvT(1,1) = 2.625816818958466716011888933765282d0
+      rkAinvT(1,2) = 1.687091590520766641994055533117358d0
+      rkAinvT(1,3) = -2.508731754924880510838743672432351d0
+      rkAinvT(2,1) = 1.195823345445647152832799205549710d0
+      rkAinvT(2,2) = -2.097911672722823576416399602774855d0
+      rkAinvT(2,3) = .7850032632435902184104551358922130d0
+      rkAinvT(3,1) = 5.765829871932827589653709477334136d0
+      rkAinvT(3,2) = .1170850640335862051731452613329320d0
+      rkAinvT(3,3) = 4.078738281412060947659653944216779d0
+
+  END SUBROUTINE Lobatto3C_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gauss_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+! The coefficients of the Gauss method
+
+
+      rkMethod = GAU
+      
+!      b0 = 4.0d0
+      b0 = 0.1d0
+      
+! The coefficients of the Gauss method
+
+      rkA(1,1) =  .1388888888888888888888888888888889d0
+      rkA(1,2) = -.359766675249389034563954710966045d-1
+      rkA(1,3) =  .97894440153083260495800422294756d-2
+      rkA(2,1) =  .3002631949808645924380249472131556d0
+      rkA(2,2) =  .2222222222222222222222222222222222d0
+      rkA(2,3) = -.224854172030868146602471694353778d-1
+      rkA(3,1) =  .2679883337624694517281977355483022d0
+      rkA(3,2) =  .4804211119693833479008399155410489d0
+      rkA(3,3) =  .1388888888888888888888888888888889d0
+
+      rkB(1) = .2777777777777777777777777777777778d0
+      rkB(2) = .4444444444444444444444444444444444d0
+      rkB(3) = .2777777777777777777777777777777778d0
+
+      rkC(1) = .1127016653792583114820734600217600d0
+      rkC(2) = .5000000000000000000000000000000000d0
+      rkC(3) = .8872983346207416885179265399782400d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) =-1.4788305577012361475298775666303999d0*b0 &
+                  +.27777777777777777777777777777777778d0
+      rkBhat(2) =  .44444444444444444444444444444444444d0 &
+                  +.66666666666666666666666666666666667d0*b0
+      rkBhat(3) = -.18783610896543051913678910003626672d0*b0 &
+                  +.27777777777777777777777777777777778d0
+
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = .1666666666666666666666666666666667d1
+      rkD(2) = -.1333333333333333333333333333333333d1
+      rkD(3) = .1666666666666666666666666666666667d1
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = .2153144231161121782447335303806954d0*b0
+      rkE(1) = -2.825278112319014084275808340593191d0*b0
+      rkE(2) = .2870858974881495709929780405075939d0*b0
+      rkE(3) = -.4558086256248162565397206448274867d-1*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.d0
+      rkBgam(1) = .2373339543355109188382583162660537d0
+      rkBgam(2) = .5879873931885192299409334646982414d0
+      rkBgam(3) = -.4063577064014232702392531134499046d-1
+      rkBgam(4) = .2153144231161121782447335303806955d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -2.594040933093095272574031876464493d0
+      rkTheta(2) = 1.824611539036311947589425112250199d0
+      rkTheta(3) = .1856563166634371860478043996459493d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408064d0
+      rkAlpha = 3.677814645373914407088529289295970d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) =  .7215185205520017032081769924397664d-1
+      rkT(1,2) = -.8224123057363067064866206597516454d-1
+      rkT(1,3) = -.6012073861930850173085948921439054d-1
+      rkT(2,1) =  .1188325787412778070708888193730294d0
+      rkT(2,2) =  .5306509074206139504614411373957448d-1
+      rkT(2,3) =  .3162050511322915732224862926182701d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) =  5.991698084937800775649580743981285d0
+      rkTinv(1,2) =  1.139214295155735444567002236934009d0
+      rkTinv(1,3) =   .4323121137838583855696375901180497d0
+      rkTinv(2,1) = -5.991698084937800775649580743981285d0
+      rkTinv(2,2) = -1.139214295155735444567002236934009d0
+      rkTinv(2,3) =   .5676878862161416144303624098819503d0
+      rkTinv(3,1) = -1.246213273586231410815571640493082d0
+      rkTinv(3,2) =  2.925559646192313662599230367054972d0
+      rkTinv(3,3) =  -.2577352012734324923468722836888244d0
+
+      rkTinvAinv(1,1) =  27.82766708436744962047620566703329d0
+      rkTinvAinv(1,2) =   5.290933503982655311815946575100597d0
+      rkTinvAinv(1,3) =   2.007817718512643701322151051660114d0
+      rkTinvAinv(2,1) = -17.66368928942422710690385180065675d0
+      rkTinvAinv(2,2) = -14.45491129892587782538830044147713d0
+      rkTinvAinv(2,3) =   2.992182281487356298677848948339886d0
+      rkTinvAinv(3,1) = -25.60678350282974256072419392007303d0
+      rkTinvAinv(3,2) =   6.762434375611708328910623303779923d0
+      rkTinvAinv(3,3) =   1.043979339483109825041215970036771d0
+      
+      rkAinvT(1,1) = .3350999483034677402618981153470483d0
+      rkAinvT(1,2) = -.5134173605009692329246186488441294d0
+      rkAinvT(1,3) = .6745196507033116204327635673208923d-1
+      rkAinvT(2,1) = .5519025480108928886873752035738885d0
+      rkAinvT(2,2) = 1.304651810077110066076640761092008d0
+      rkAinvT(2,3) = .9767507983414134987545585703726984d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295970d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+      
+  END SUBROUTINE Gauss_Coefficients
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau1A_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+!      KPP_REAL :: b0 = 0.3d0
+      KPP_REAL :: b0 = 0.1d0
+
+! The coefficients of the Radau1A method
+
+      rkMethod = R1A
+
+      rkA(1,1) =  .1111111111111111111111111111111111d0
+      rkA(1,2) = -.1916383190435098943442935597058829d0
+      rkA(1,3) =  .8052720793239878323318244859477174d-1
+      rkA(2,1) =  .1111111111111111111111111111111111d0
+      rkA(2,2) =  .2920734116652284630205027458970589d0
+      rkA(2,3) = -.481334970546573839513422644787591d-1
+      rkA(3,1) =  .1111111111111111111111111111111111d0
+      rkA(3,2) =  .5370223859435462728402311533676479d0
+      rkA(3,3) =  .1968154772236604258683861429918299d0
+
+      rkB(1) = .1111111111111111111111111111111111d0
+      rkB(2) = .5124858261884216138388134465196080d0
+      rkB(3) = .3764030627004672750500754423692808d0
+
+      rkC(1) = 0.d0
+      rkC(2) = .3550510257216821901802715925294109d0
+      rkC(3) = .8449489742783178098197284074705891d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .11111111111111111111111111111111111d0-b0
+      rkBhat(2) = .51248582618842161383881344651960810d0
+      rkBhat(3) = .37640306270046727505007544236928079d0
+
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = .3333333333333333333333333333333333d0
+      rkD(2) = -.8914115380582557157653087040196127d0
+      rkD(3) = .1558078204724922382431975370686279d1
+
+      ! Classical error estimator: 
+      ! H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j
+      rkE(0) =   .2748888295956773677478286035994148d0*b0
+      rkE(1) = -1.374444147978386838739143017997074d0*b0
+      rkE(2) = -1.335337922441686804550326197041126d0*b0
+      rkE(3) =   .235782604058977333559011782643466d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.0d0
+      rkBgam(1) = .1948150124588532186183490991130616d-1
+      rkBgam(2) = .7575249005733381398986810981093584d0
+      rkBgam(3) = -.518952314149008295083446116200793d-1
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.224370034375505083904362087063351d0
+      rkTheta(2) = .9340045331532641409047527962010133d0
+      rkTheta(3) = .4656990124352088397561234800640929d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  .424293819848497965354371036408369d0
+      rkT(1,2) = -.3235571519651980681202894497035503d0
+      rkT(1,3) = -.522137786846287839586599927945048d0
+      rkT(2,1) =  .57594609499806128896291585429339d-1
+      rkT(2,2) =  .3148663231849760131614374283783d-2
+      rkT(2,3) =  .452429247674359778577728510381731d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 1.233523612685027760114769983066164d0
+      rkTinv(1,2) = 1.423580134265707095505388133369554d0
+      rkTinv(1,3) = .3946330125758354736049045150429624d0
+      rkTinv(2,1) = -1.233523612685027760114769983066164d0
+      rkTinv(2,2) = -1.423580134265707095505388133369554d0
+      rkTinv(2,3) = .6053669874241645263950954849570376d0
+      rkTinv(3,1) = -.1484438963257383124456490049673414d0
+      rkTinv(3,2) = 2.038974794939896109682070471785315d0
+      rkTinv(3,3) = -.544501292892686735299355831692542d-1
+
+      rkTinvAinv(1,1) =  4.487354449794728738538663081025420d0
+      rkTinvAinv(1,2) =  5.178748573958397475446442544234494d0
+      rkTinvAinv(1,3) =  1.435609490412123627047824222335563d0
+      rkTinvAinv(2,1) = -2.854361287939276673073807031221493d0
+      rkTinvAinv(2,2) = -1.003648660720543859000994063139137d+1
+      rkTinvAinv(2,3) =  1.789135380979465422050817815017383d0
+      rkTinvAinv(3,1) = -4.160768067752685525282947313530352d0
+      rkTinvAinv(3,2) =  1.124128569859216916690209918405860d0
+      rkTinvAinv(3,3) =  1.700644430961823796581896350418417d0
+
+      rkAinvT(1,1) = 1.543510591072668287198054583233180d0
+      rkAinvT(1,2) = -2.460228411937788329157493833295004d0
+      rkAinvT(1,3) = -.412906170450356277003910443520499d0
+      rkAinvT(2,1) = .209519643211838264029272585946993d0
+      rkAinvT(2,2) = 1.388545667194387164417459732995766d0
+      rkAinvT(2,3) = 1.20339553005832004974976023130002d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau1A_Coefficients
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RungeKuttaADJ ! and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), FCT(NVAR)
+    KPP_REAL :: T, Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL :: V(NVAR), T , Told
+#ifdef FULL_ALGEBRA    
+    KPP_REAL :: JV(LU_NONZERO), JF(NVAR,NVAR)
+    INTEGER       :: i, j 
+#else
+    KPP_REAL :: JF(LU_NONZERO)
+#endif   
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+
+  END SUBROUTINE JAC_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_tlm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_tlm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_tlm.def	(revision 3477)
@@ -0,0 +1,8 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE runge_kutta_tlm
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/runge_kutta_tlm.f90	(revision 3477)
@@ -0,0 +1,2229 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  RungeKuttaTLM - Tangent Linear Model of Fully Implicit 3-stage RK:     !
+!          * Radau-2A   quadrature (order 5)                              !
+!          * Radau-1A   quadrature (order 5)                              !
+!          * Lobatto-3C quadrature (order 4)                              !
+!          * Gauss      quadrature (order 6)                              !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, August 2005                                       !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Jacobian
+  USE KPP_ROOT_LinearAlgebra
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+!~~~>  Statistics on the work performed by the Runge-Kutta method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4, &
+    Nrej=5, Ndec=6, Nsol=7, Nsng=8, Ntexit=1, Nhacc=2, Nhnew=3
+
+CONTAINS
+
+  ! **************************************************************************
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_TLM( NTLM, Y, Y_tlm, TIN, TOUT, ATOL_tlm, RTOL_tlm, &
+       ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+!~~~> Y - Concentrations
+    KPP_REAL :: Y(NVAR)
+!~~~> NTLM - No. of sensitivity coefficients
+    INTEGER NTLM
+!~~~> Y_tlm - Sensitivities of concentrations
+!     Note: Y_tlm (1:NVAR,j) contains sensitivities of
+!               Y(1:NVAR) w.r.t. the j-th parameter, j=1...NTLM
+    KPP_REAL :: Y_tlm(NVAR,NTLM)
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RTOL_tlm(NVAR,NTLM),ATOL_tlm(NVAR,NTLM)
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! Tolerances: 0=vector, 1=scalar
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are: 0=interpolated, 1=zero
+    ICNTRL(7)  = 1   ! TLM solution: 0=iterations, 1=direct
+    ICNTRL(9)  = 0   ! TLM Newton iteration error: 0=fwd Newton, 1=TLM Newton error est
+    ICNTRL(10) = 1   ! FWD error estimation: 0=classic, 1=SDIRK
+    ICNTRL(11) = 1   ! Step size ontroller: 1=Gustaffson, 2=classic
+    ICNTRL(12) = 0   ! Trunc. error estimate: 0=fwd only, 1=fwd and TLM
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+    T1 = TIN; T2 = TOUT
+    CALL RungeKuttaTLM(  NVAR, NTLM, Y, Y_tlm, T1, T2, RTOL, ATOL, &
+                           RTOL_tlm, ATOL_tlm,                     &
+			   RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+    Ntotal = Ntotal + ISTATUS(Nstp)
+    PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'Runge-Kutta-TLM: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE_TLM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RungeKuttaTLM(  N, NTLM, Y, Y_tlm, T, Tend,RelTol,AbsTol,    &
+                             RelTol_tlm,AbsTol_tlm,RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!  This implementation is based on the book and the code Radau5:
+!
+!         E. HAIRER AND G. WANNER
+!         "SOLVING ORDINARY DIFFERENTIAL EQUATIONS II. 
+!              STIFF AND DIFFERENTIAL-ALGEBRAIC PROBLEMS."
+!         SPRINGER SERIES IN COMPUTATIONAL MATHEMATICS 14,
+!         SPRINGER-VERLAG (1991)
+!
+!         UNIVERSITE DE GENEVE, DEPT. DE MATHEMATIQUES
+!         CH-1211 GENEVE 24, SWITZERLAND
+!         E-MAIL:  HAIRER@DIVSUN.UNIGE.CH,  WANNER@DIVSUN.UNIGE.CH
+!
+!   Methods:
+!          * Radau-2A   quadrature (order 5)                              
+!          * Radau-1A   quadrature (order 5)                              
+!          * Lobatto-3C quadrature (order 4)                              
+!          * Gauss      quadrature (order 6)                              
+!                                                                         
+!   (C)  Adrian Sandu, August 2005                                       
+!   Virginia Polytechnic Institute and State University                  
+!   Contact: sandu@cs.vt.edu                                             
+!   Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!   This implementation is part of KPP - the Kinetic PreProcessor        
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!       ----------------
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!
+!     N           Dimension of the system
+!     T           Initial time value
+!
+!     Tend        Final T value (Tend-T may be positive or negative)
+!
+!     Y(N)        Initial values for Y
+!
+!     RelTol,AbsTol   Relative and absolute error tolerances. 
+!          for ICNTRL(2) = 0: AbsTol, RelTol are N-dimensional vectors
+!                        = 1: AbsTol, RelTol are scalars
+!
+!~~~>  Integer input parameters:
+!  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = RK method selection       
+!              = 1:  Radau-2A    (the default)
+!              = 2:  Lobatto-3C
+!              = 3:  Gauss
+!	       = 4:  Radau-1A
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are obtained from 
+!                      the extrapolated collocation solution
+!                      (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve TLM equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one *big* LU factorization)
+!
+!    ICNTRL(9) -> switch for TLM Newton iteration error estimation strategy
+!		ICNTRL(9) = 0: base number of iterations as forward solution
+!		ICNTRL(9) = 1: use RTOL_tlm and ATOL_tlm to calculate
+!				error estimation for TLM at Newton stages
+!
+!    ICNTRL(10) -> switch for error estimation strategy
+!		ICNTRL(10) = 0: one additional stage: at c=0, 
+!				see Hairer (default)
+!		ICNTRL(10) = 1: two additional stages: one at c=0 
+!				and one SDIRK at c=1, stiffly accurate
+!
+!    ICNTRL(11) -> switch for step size strategy
+!              ICNTRL(11)=1:  mod. predictive controller (Gustafsson, default)
+!              ICNTRL(11)=2:  classical step size control
+!              the choice 1 seems to produce safer results;
+!              for simple problems, the choice 2 produces
+!              often slightly faster runs
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!
+!~~~>  Real input parameters:
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  (highly recommended to keep Hmin = ZERO, the default)
+!
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!
+!    RCNTRL(3)  -> Hstart, the starting step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!
+!    RCNTRL(10) -> Qmin
+!
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!
+!    OUTPUT ARGUMENTS:
+!    -----------------
+!
+!    T           -> T value for which the solution has been computed
+!                     (after successful return T=Tend).
+!
+!    Y(N)        -> Numerical solution at T
+!
+!    IERR        -> Reports on successfulness upon return:
+!                    = 1 for success
+!                    < 0 for error (value equals error code)
+!
+!    ISTATUS(1)  -> No. of function calls
+!    ISTATUS(2)  -> No. of jacobian calls
+!    ISTATUS(3)  -> No. of steps
+!    ISTATUS(4)  -> No. of accepted steps
+!    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+!    ISTATUS(6)  -> No. of LU decompositions
+!    ISTATUS(7)  -> No. of forward/backward substitutions
+!    ISTATUS(8)  -> No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                     computed Y upon return
+!    RSTATUS(2)  -> Hexit, last accepted step before exit
+!    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+!                   For multiple restarts, use Hnew as Hstart 
+!                     in the subsequent run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+      
+      INTEGER       :: N, NTLM
+      KPP_REAL :: Y(N),Y_tlm(N,NTLM)
+      KPP_REAL :: AbsTol(N),RelTol(N),RCNTRL(20),RSTATUS(20)
+      KPP_REAL :: AbsTol_tlm(N,NTLM),RelTol_tlm(N,NTLM)
+      INTEGER :: ICNTRL(20), ISTATUS(20)
+      LOGICAL :: StartNewton, Gustafsson, SdirkError, TLMNewtonEst, &
+                       TLMtruncErr, TLMDirect
+      INTEGER :: IERR, ITOL
+      KPP_REAL :: T,Tend
+
+      !~~~> Control arguments
+      INTEGER :: Max_no_steps, NewtonMaxit, rkMethod
+      KPP_REAL :: Hmin,Hmax,Hstart,Qmin,Qmax
+      KPP_REAL :: Roundoff, ThetaMin, NewtonTol
+      KPP_REAL :: FacSafe,FacMin,FacMax,FacRej
+      ! Runge-Kutta method parameters
+      INTEGER, PARAMETER :: R2A=1, R1A=2, L3C=3, GAU=4, L3A=5
+      KPP_REAL :: rkT(3,3), rkTinv(3,3), rkTinvAinv(3,3), rkAinvT(3,3), &
+                       rkA(3,3), rkB(3),  rkC(3), rkD(0:3), rkE(0:3), 	&
+	   	       rkBgam(0:4), rkBhat(0:4), rkTheta(0:3),          &
+                       rkGamma,  rkAlpha, rkBeta, rkELO
+      !~~~> Local variables
+      INTEGER :: i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!        SETTING THE PARAMETERS
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IERR = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+       
+!~~~> ICNTRL(1) - autonomous system - not used       
+!~~~> ITOL: 1 for vector and 0 for scalar AbsTol/RelTol
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+!~~~> Error control selection  
+      IF (ICNTRL(10) == 0) THEN 
+         SdirkError = .FALSE.
+      ELSE
+         SdirkError = .TRUE.
+      END IF      
+!~~~> Method selection  
+      SELECT CASE (ICNTRL(3))     
+      CASE (0,1)
+         CALL Radau2A_Coefficients
+      CASE (2)
+         CALL Lobatto3C_Coefficients
+      CASE (3)
+         CALL Gauss_Coefficients
+      CASE (4)
+         CALL Radau1A_Coefficients
+      CASE DEFAULT
+         WRITE(6,*) 'ICNTRL(3)=',ICNTRL(3)
+         CALL RK_ErrorMsg(-13,T,ZERO,IERR)
+      END SELECT
+!~~~> Max_no_steps: the maximal number of time steps
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSE
+         Max_no_steps=ICNTRL(4)
+         IF (Max_no_steps <= 0) THEN
+            WRITE(6,*) 'ICNTRL(4)=',ICNTRL(4)
+            CALL RK_ErrorMsg(-1,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonMaxit    maximal number of Newton iterations
+      IF (ICNTRL(5) == 0) THEN
+         NewtonMaxit = 8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF (NewtonMaxit <= 0) THEN
+            WRITE(6,*) 'ICNTRL(5)=',ICNTRL(5)
+            CALL RK_ErrorMsg(-2,T,ZERO,IERR)
+          END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~> Solve TLM equations directly or by Newton iterations 
+      IF (ICNTRL(7) == 0) THEN
+         TLMDirect = .FALSE.
+      ELSE
+         TLMDirect = .TRUE.
+      END IF      
+!~~~> Newton iteration error control selection  
+      IF (ICNTRL(9) == 0) THEN 
+         TLMNewtonEst = .FALSE.
+      ELSE
+         TLMNewtonEst = .TRUE.
+      END IF      
+!~~~> Gustafsson: step size controller
+      IF(ICNTRL(11) == 0)THEN
+         Gustafsson = .TRUE.
+      ELSE
+         Gustafsson = .FALSE.
+      END IF
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+
+!~~~> Roundoff: smallest number s.t. 1.0 + Roundoff > 1.0
+      Roundoff=WLAMCH('E');
+
+!~~~> Hmin = minimal step size
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSE
+         Hmin = MIN(ABS(RCNTRL(1)),ABS(Tend-T))
+      END IF
+!~~~> Hmax = maximal step size
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tend-T)
+      ELSE
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tend-T))
+      END IF
+!~~~> Hstart = starting step size
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = ZERO
+      ELSE
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tend-T))
+      END IF
+!~~~> FacMin: lower bound on step decrease factor
+      IF(RCNTRL(4) == ZERO)THEN
+         FacMin = 0.2d0
+      ELSE
+         FacMin = RCNTRL(4)
+      END IF
+!~~~> FacMax: upper bound on step increase factor
+      IF(RCNTRL(5) == ZERO)THEN
+         FacMax = 8.D0
+      ELSE
+         FacMax = RCNTRL(5)
+      END IF
+!~~~> FacRej: step decrease factor after 2 consecutive rejections
+      IF(RCNTRL(6) == ZERO)THEN
+         FacRej = 0.1d0
+      ELSE
+         FacRej = RCNTRL(6)
+      END IF
+!~~~> FacSafe:  by which the new step is slightly smaller
+!               than the predicted value
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe=0.9d0
+      ELSE
+         FacSafe=RCNTRL(7)
+      END IF
+      IF ( (FacMax < ONE) .OR. (FacMin > ONE) .OR. &
+           (FacSafe <= 1.0d-3) .OR. (FacSafe >= ONE) ) THEN
+            WRITE(6,*)'RCNTRL(4:7)=',RCNTRL(4:7)
+            CALL RK_ErrorMsg(-4,T,ZERO,IERR)
+      END IF
+
+!~~~> ThetaMin:  decides whether the Jacobian should be recomputed
+      IF (RCNTRL(8) == ZERO) THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin=RCNTRL(8)
+         IF (ThetaMin <= 0.0d0 .OR. ThetaMin >= 1.0d0) THEN
+            WRITE(6,*) 'RCNTRL(8)=', RCNTRL(8)
+            CALL RK_ErrorMsg(-5,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> NewtonTol:  stopping crierion for Newton's method
+      IF (RCNTRL(9) == ZERO) THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+         IF (NewtonTol <= Roundoff) THEN
+            WRITE(6,*) 'RCNTRL(9)=',RCNTRL(9)
+            CALL RK_ErrorMsg(-6,T,ZERO,IERR)
+         END IF
+      END IF
+!~~~> Qmin AND Qmax: IF Qmin < Hnew/Hold < Qmax then step size = const.
+      IF (RCNTRL(10) == ZERO) THEN
+         Qmin=1.D0
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF (RCNTRL(11) == ZERO) THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+      IF (Qmin > ONE .OR. Qmax < ONE) THEN
+         WRITE(6,*) 'RCNTRL(10:11)=',Qmin,Qmax
+         CALL RK_ErrorMsg(-7,T,ZERO,IERR)
+      END IF
+!~~~> Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+          IF (AbsTol(1) <= ZERO.OR.RelTol(1) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol=',AbsTol,RelTol 
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+      ELSE
+          DO i=1,N
+          IF (AbsTol(i) <= ZERO.OR.RelTol(i) <= 10.d0*Roundoff) THEN
+              WRITE (6,*) 'AbsTol/RelTol(',i,')=',AbsTol(i),RelTol(i)
+              CALL RK_ErrorMsg(-8,T,ZERO,IERR)
+          END IF
+          END DO
+      END IF
+
+!~~~> Parameters are wrong
+      IF (IERR < 0) RETURN
+
+!~~~> Call the core method
+      CALL RK_IntegratorTLM( N,NTLM,T,Tend,Y,Y_tlm,IERR )
+
+   CONTAINS ! Internal procedures to RungeKutta
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_IntegratorTLM( N,NTLM,T,Tend,Y,Y_tlm,IERR )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      IMPLICIT NONE
+!~~~> Arguments
+      INTEGER,  INTENT(IN)         :: N, NTLM
+      KPP_REAL, INTENT(IN)    :: Tend
+      KPP_REAL, INTENT(INOUT) :: T, Y(N), Y_tlm(NVAR,NTLM)
+      INTEGER,  INTENT(OUT)        :: IERR
+
+!~~~> Local variables
+#ifdef FULL_ALGEBRA
+      KPP_REAL, DIMENSION(NVAR,NVAR)    ::   &
+                             FJAC, E1, Jac1, Jac2, Jac3
+      COMPLEX(kind=dp), DIMENSION(NVAR,NVAR) :: E2   
+      KPP_REAL, DIMENSION(3*NVAR,3*NVAR)  :: Jbig, Ebig
+      KPP_REAL, DIMENSION(3*NVAR)         :: Zbig
+      INTEGER,       DIMENSION(3*NVAR)         :: IPbig
+#else
+      KPP_REAL, DIMENSION(LU_NONZERO)   ::   &
+                             FJAC, E1, Jac1, Jac2, Jac3
+      COMPLEX(kind=dp), DIMENSION(LU_NONZERO)  :: E2 
+!  Next 3 commented lines for sparse big linear algebra:
+!      KPP_REAL, DIMENSION(3,3,LU_NONZERO) :: Jbig
+!      KPP_REAL, DIMENSION(3,NVAR)         :: Zbig
+!      INTEGER, DIMENSION(3,NVAR)               :: IPbig
+      KPP_REAL, DIMENSION(3*NVAR,3*NVAR)  :: Jbig, Ebig
+      KPP_REAL, DIMENSION(3*NVAR)         :: Zbig
+      INTEGER,       DIMENSION(3*NVAR)         :: IPbig
+#endif                
+      KPP_REAL, DIMENSION(NVAR) :: Z1,Z2,Z3,Z4,SCAL,DZ1,DZ2,DZ3,DZ4, &
+                 G,TMP,SCAL_tlm
+      KPP_REAL, DIMENSION(NVAR,NTLM) :: Z1_tlm,Z2_tlm,Z3_tlm
+      KPP_REAL  :: CONT(NVAR,3), Tdirection,  H, Hacc, Hnew, Hold, Fac, &
+                 FacGus, Theta, Err, ErrOld, NewtonRate, NewtonIncrement,    &
+                 Hratio, Qnewton, NewtonPredictedErr,NewtonIncrementOld,    &
+		 ThetaTLM, ThetaSD
+      INTEGER :: i,j,IP1(NVAR),IP2(NVAR),NewtonIter, ISING, Nconsecutive, itlm
+      INTEGER :: saveNiter, NewtonIterTLM, info
+      LOGICAL :: Reject, FirstStep, SkipJac, NewtonDone, SkipLU
+      
+            
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initial setting
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      Tdirection = SIGN(ONE,Tend-T)
+      H = MIN( MAX(ABS(Hmin),ABS(Hstart)) , Hmax )
+      IF (ABS(H) <= 10.d0*Roundoff) H = 1.0d-6
+      H = SIGN(H,Tdirection)
+      Hold      = H
+      Reject    = .FALSE.
+      FirstStep = .TRUE.
+      SkipJac   = .FALSE.
+      SkipLU    = .FALSE.
+      IF ((T+H*1.0001D0-Tend)*Tdirection >= ZERO) THEN
+         H = Tend-T
+      END IF
+      Nconsecutive = 0
+      CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tend-T)*Tdirection - Roundoff > ZERO )
+
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+        !~~~> Compute the Jacobian matrix
+        IF ( .NOT.SkipJac ) THEN
+          CALL JAC_CHEM(T,Y,FJAC)
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+        END IF
+        !~~~> Compute the matrices E1 and E2 and their decompositions
+        CALL RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+        IF (ISING /= 0) THEN
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; Nconsecutive = Nconsecutive + 1
+          IF (Nconsecutive >= 5) THEN
+            CALL RK_ErrorMsg(-12,T,H,IERR); RETURN
+          END IF
+          H=H*0.5d0; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+          CYCLE Tloop
+        ELSE
+          Nconsecutive = 0    
+        END IF   
+      END IF ! SkipLU
+   
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+        PRINT*,'Max number of time steps is ',Max_no_steps
+        CALL RK_ErrorMsg(-9,T,H,IERR); RETURN
+      END IF
+      IF (0.1D0*ABS(H) <= ABS(T)*Roundoff)  THEN
+        CALL RK_ErrorMsg(-10,T,H,IERR); RETURN
+      END IF
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for the simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            
+      !~~~>  Starting values for Newton iteration
+      IF ( FirstStep .OR. (.NOT.StartNewton) ) THEN
+         CALL Set2zero(N,Z1)
+         CALL Set2zero(N,Z2)
+         CALL Set2zero(N,Z3)
+      ELSE
+         ! Evaluate quadratic polynomial
+         CALL RK_Interpolate('eval',N,H,Hold,Z1,Z2,Z3,CONT)
+      END IF
+      
+      !~~~>  Initializations for Newton iteration
+      NewtonDone = .FALSE.
+      Fac = 0.5d0 ! Step reduction if too many iterations
+      
+NewtonLoop:DO  NewtonIter = 1, NewtonMaxit  
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,DZ1,DZ2,DZ3)
+            
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+            
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL,DZ2)**2 +       &
+                                RK_ErrorNorm(N,SCAL,DZ3)**2 )/3.0d0 )
+            
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+                IF ( NewtonIter < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                    EXIT NewtonLoop
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1,1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2,1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3,1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+	      ! Tune error in TLM variables by defining the minimal number of Newton iterations.
+	      saveNiter = NewtonIter+1
+	      EXIT NewtonLoop
+	    END IF
+   	    IF (NewtonIter == NewtonMaxit) THEN
+		PRINT*, 'Slow or no convergence in Newton Iteration: Max no. of', &
+		 	'Newton iterations reached'
+	    END IF
+            
+      END DO NewtonLoop
+            
+      IF (.NOT.NewtonDone) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+           CYCLE Tloop
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> SDIRK Stage
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       IF (SdirkError) THEN
+
+!~~~>  Starting values for Newton iterations
+       Z4(1:N) = Z3(1:N)
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL FUN_CHEM(T,Y,DZ4)
+       ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+       
+!       G = H*rkBgam(0)*DZ4 + rkTheta(1)*Z1 + rkTheta(2)*Z2 + rkTheta(3)*Z3
+       CALL Set2Zero(N, G)
+       CALL WAXPY(N,rkBgam(0)*H, DZ4,1,G,1) 
+       CALL WAXPY(N,rkTheta(1),Z1,1,G,1)
+       CALL WAXPY(N,rkTheta(2),Z2,1,G,1)
+       CALL WAXPY(N,rkTheta(3),Z3,1,G,1)
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+SDNewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+	    CALL WADD(N,Y,Z4,TMP)         ! TMP <- Y + Z4
+	    CALL FUN_CHEM(T+H,TMP,DZ4) 	  ! DZ4 <- Fun(Y+Z4)         
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ4(1:N) = (G(1:N)-Z4(1:N))*(rkGamma/H) + DZ4(1:N)
+	    CALL WAXPY (N, -ONE*rkGamma/H, Z4, 1, DZ4, 1)
+            CALL WAXPY (N, rkGamma/H, G,1, DZ4,1)
+
+!~~~>   Solve the linear system
+#ifdef FULL_ALGEBRA  
+            CALL DGETRS( 'N', N, 1, E1, N, IP1, DZ4, N, ISING )
+#else
+            CALL KppSolve(E1, DZ4)
+#endif
+            
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = RK_ErrorNorm(N,SCAL,DZ4)
+            IF ( NewtonIter == 1 ) THEN
+                ThetaSD      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaSD = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaSD < 0.99d0) THEN
+                    NewtonRate = ThetaSD/(ONE-ThetaSD)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaSD**(NewtonMaxit-NewtonIter)/(ONE-ThetaSD)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT SDNewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    print*,'Theta too large: ',ThetaSD
+                    EXIT SDNewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z4 <-- Z4 + DZ4
+            CALL WAXPY(N,ONE,DZ4,1,Z4,1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT SDNewtonLoop
+            
+            END DO SDNewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+                CYCLE Tloop
+            END IF
+
+!~~~>  End of implified SDIRK Newton iterations
+      END IF
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation, forward solution
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (SdirkError) THEN
+!         DZ4(1:N) =  rkD(1)*Z1 + rkD(2)*Z2 + rkD(3)*Z3 - Z4    
+	 CALL Set2Zero(N, DZ4)
+	 IF (rkD(1) /= ZERO) CALL WAXPY(N, rkD(1), Z1, 1, DZ4, 1)
+	 IF (rkD(2) /= ZERO) CALL WAXPY(N, rkD(2), Z2, 1, DZ4, 1)
+	 IF (rkD(3) /= ZERO) CALL WAXPY(N, rkD(3), Z3, 1, DZ4, 1)
+	 CALL WAXPY(N, -ONE, Z4, 1, DZ4, 1)
+         Err = RK_ErrorNorm(N,SCAL,DZ4)    
+      ELSE
+        CALL  RK_ErrorEstimate(N,H,Y,T, &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,FirstStep,Reject)
+      END IF
+     
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> If error small enough, compute TLM solution
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (Err < ONE) THEN
+
+      !~~~>  Jacobian values
+      CALL WADD(N,Y,Z1,TMP)              ! TMP  <- Y + Z1
+      CALL JAC_CHEM(T+rkC(1)*H,TMP,Jac1) ! Jac1 <- Jac(Y+Z1)  
+      CALL WADD(N,Y,Z2,TMP)              ! TMP  <- Y + Z2
+      CALL JAC_CHEM(T+rkC(2)*H,TMP,Jac2) ! Jac2 <- Jac(Y+Z2)  
+      CALL WADD(N,Y,Z3,TMP)              ! TMP  <- Y + Z3
+      CALL JAC_CHEM(T+rkC(3)*H,TMP,Jac3) ! Jac3 <- Jac(Y+Z3)  
+       
+TLMDIR: IF (TLMDirect) THEN 
+       
+#ifdef FULL_ALGEBRA
+      !~~~>  Construct the full Jacobian
+      DO j=1,N
+        DO i=1,N
+          Jbig(i,j)         = -H*rkA(1,1)*Jac1(i,j)
+          Jbig(N+i,j)       = -H*rkA(2,1)*Jac1(i,j)
+          Jbig(2*N+i,j)     = -H*rkA(3,1)*Jac1(i,j)
+          Jbig(i,N+j)       = -H*rkA(1,2)*Jac2(i,j)
+          Jbig(N+i,N+j)     = -H*rkA(2,2)*Jac2(i,j)
+          Jbig(2*N+i,N+j)   = -H*rkA(3,2)*Jac2(i,j)
+          Jbig(i,2*N+j)     = -H*rkA(1,3)*Jac3(i,j)
+          Jbig(N+i,2*N+j)   = -H*rkA(2,3)*Jac3(i,j)
+          Jbig(2*N+i,2*N+j) = -H*rkA(3,3)*Jac3(i,j)
+        END DO  
+      END DO
+      Ebig = -Jbig
+      DO i=1,3*NVAR
+          Jbig(i,i) = ONE + Jbig(i,i)
+      END DO
+      !~~~>  Solve the big system
+      ! CALL DGETRF(3*NVAR,3*NVAR,Jbig,3*NVAR,IPbig,j) 
+      CALL WGEFA(3*N,Jbig,IPbig,info) 
+      IF (info /= 0) THEN
+        PRINT*,'Big big guy is singular'; STOP
+      END IF  
+      DO itlm = 1, NTLM      
+        DO j=1,NVAR
+            Zbig(j)        = Y_tlm(j,itlm)
+            Zbig(NVAR+j)   = Y_tlm(j,itlm)
+            Zbig(2*NVAR+j) = Y_tlm(j,itlm)
+        END DO
+        Zbig = MATMUL(Ebig,Zbig)
+        !CALL DGETRS ('N',3*NVAR,1,Jbig,3*NVAR,IPbig,Zbig,3*NVAR,ISING) 
+        CALL WGESL('N',3*N,Jbig,IPbig,Zbig)
+        DO j=1,NVAR
+            Z1_tlm(j,itlm) = Zbig(j)
+            Z2_tlm(j,itlm) = Zbig(NVAR+j)
+            Z3_tlm(j,itlm) = Zbig(2*NVAR+j)
+        END DO
+      END DO  
+#else       
+!  Commented code for sparse big linear algebra:
+!      !~~~>  Construct the big Jacobian
+!      DO j=1,LU_NONZERO
+!        DO i=1,3
+!          Jbig(i,1,j) = -H*rkA(i,1)*Jac1(j)
+!          Jbig(i,2,j) = -H*rkA(i,2)*Jac2(j)
+!          Jbig(i,3,j) = -H*rkA(i,3)*Jac3(j)
+!        END DO
+!      END DO
+!      DO j=1,NVAR
+!        DO i=1,3
+!          Jbig(i,i,LU_DIAG(j)) = ONE + Jbig(i,i,LU_DIAG(j))
+!        END DO
+!      END DO
+!      !~~~>  Solve the big system
+!      CALL KppDecompBig( Jbig, IPbig, j )
+!   Use full big linear algebra:
+      Jbig(1:3*N,1:3*N) = 0.0d0
+      DO i=1,LU_NONZERO
+	  Jbig(LU_irow(i),LU_icol(i))         = -H*rkA(1,1)*Jac1(i)
+	  Jbig(LU_irow(i),N+LU_icol(i))       = -H*rkA(1,2)*Jac2(i)
+	  Jbig(LU_irow(i),2*N+LU_icol(i))     = -H*rkA(1,3)*Jac3(i)
+	  Jbig(N+LU_irow(i),LU_icol(i))       = -H*rkA(2,1)*Jac1(i)
+	  Jbig(N+LU_irow(i),N+LU_icol(i))     = -H*rkA(2,2)*Jac2(i)
+	  Jbig(N+LU_irow(i),2*N+LU_icol(i))   = -H*rkA(2,3)*Jac3(i)
+	  Jbig(2*N+LU_irow(i),LU_icol(i))     = -H*rkA(3,1)*Jac1(i)
+	  Jbig(2*N+LU_irow(i),N+LU_icol(i))   = -H*rkA(3,2)*Jac2(i)
+	  Jbig(2*N+LU_irow(i),2*N+LU_icol(i)) = -H*rkA(3,3)*Jac3(i)
+      END DO
+      Ebig = -Jbig
+      DO i=1, 3*N
+	 Jbig(i,i) = ONE + Jbig(i,i)
+      END DO
+      ! CALL DGETRF(3*N,3*N,Jbig,3*N,IPbig,info) 
+      CALL WGEFA(3*N,Jbig,IPbig,info) 
+      IF (info /= 0) THEN
+        PRINT*,'Big guy is singular'; STOP
+      END IF  
+
+      DO itlm = 1, NTLM      
+!  Commented code for sparse big linear algebra:
+!       ! Compute RHS
+!        CALL RK_PrepareRHS_TLMdirect(N,H,Jac1,Jac2,Jac3,Y_tlm(1,itlm),Zbig)
+!       ! Solve the system
+!        CALL KppSolveBig( Jbig, IPbig, Zbig )
+!        DO j=1,NVAR
+!            Z1_tlm(j,itlm) = Zbig(1,j)
+!            Z2_tlm(j,itlm) = Zbig(2,j)
+!            Z3_tlm(j,itlm) = Zbig(3,j)
+!        END DO
+        ! Compute RHS
+        CALL RK_PrepareRHS_TLMdirect(N,H,Jac1,Jac2,Jac3,Y_tlm(1,itlm),Zbig)
+        ! Solve the system
+	! CALL DGETRS('N',3*N,1,Jbig,3*N,IPbig,Zbig,3*N,ISING) 
+        CALL WGESL('N',3*N,Jbig,IPbig,Zbig)
+        Z1_tlm(1:NVAR,itlm) = Zbig(1:NVAR)
+        Z2_tlm(1:NVAR,itlm) = Zbig(NVAR+1:2*NVAR)
+        Z3_tlm(1:NVAR,itlm) = Zbig(2*NVAR+1:3*NVAR)
+      END DO  
+#endif
+
+    ELSE TLMDIR
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Loop for Newton iterations, TLM variables
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+         
+Tlm:DO itlm = 1, NTLM      
+            
+      !~~~>  Starting values for Newton iteration
+      CALL Set2zero(N,Z1_tlm(1,itlm))
+      CALL Set2zero(N,Z2_tlm(1,itlm))
+      CALL Set2zero(N,Z3_tlm(1,itlm))
+      
+      !~~~>  Initializations for Newton iteration
+      IF (TLMNewtonEst) THEN
+         NewtonDone = .FALSE.
+         Fac = 0.5d0 ! Step reduction if too many iterations
+
+         CALL RK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+              Y_tlm(1,itlm),SCAL_tlm)
+      END IF
+      
+NewtonLoopTLM:DO  NewtonIterTLM = 1, NewtonMaxit  
+ 
+            !~~~> Prepare the right-hand side
+            CALL RK_PrepareRHS_TLM(N,H,Jac1,Jac2,Jac3,Y_tlm(1,itlm), &
+                      Z1_tlm(1,itlm),Z2_tlm(1,itlm),Z3_tlm(1,itlm),  &
+                      DZ1,DZ2,DZ3) 
+                                 
+            !~~~> Solve the linear systems
+            CALL RK_Solve( N,H,E1,IP1,E2,IP2,DZ1,DZ2,DZ3,ISING )
+            
+	    IF (TLMNewtonEst) THEN
+!~~~>   Check convergence of Newton iterations
+            NewtonIncrement = SQRT( ( RK_ErrorNorm(N,SCAL_tlm,DZ1)**2 + &
+                                RK_ErrorNorm(N,SCAL_tlm,DZ2)**2 +       &
+                                RK_ErrorNorm(N,SCAL_tlm,DZ3)**2 )/3.0d0 )
+            IF ( NewtonIterTLM == 1 ) THEN
+                ThetaTLM      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaTLM = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaTLM < 0.99d0) THEN
+                    NewtonRate = ThetaTLM/(ONE-ThetaTLM)
+                ELSE ! Non-convergence of Newton: ThetaTLM too large
+                    EXIT NewtonLoopTLM
+                END IF
+                IF ( NewtonIterTLM < NewtonMaxit ) THEN 
+                  ! Predict error at the end of Newton process 
+                  NewtonPredictedErr = NewtonIncrement &
+                               *ThetaTLM**(NewtonMaxit-NewtonIterTLM)/(ONE-ThetaTLM)
+                  IF (NewtonPredictedErr >= NewtonTol) THEN
+                    ! Non-convergence of Newton: predicted error too large
+                    Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                    Fac=0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIterTLM))
+                    EXIT NewtonLoopTLM
+                  END IF
+                END IF
+            END IF
+
+            NewtonIncrementOld = MAX(NewtonIncrement,Roundoff) 
+	    END IF !(TLMNewtonEst)
+            ! Update solution
+            CALL WAXPY(N,-ONE,DZ1,1,Z1_tlm(1,itlm),1) ! Z1 <- Z1 - DZ1
+            CALL WAXPY(N,-ONE,DZ2,1,Z2_tlm(1,itlm),1) ! Z2 <- Z2 - DZ2
+            CALL WAXPY(N,-ONE,DZ3,1,Z3_tlm(1,itlm),1) ! Z3 <- Z3 - DZ3
+            
+            ! Check error in Newton iterations
+            IF (TLMNewtonEst) THEN
+  	       NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+	       IF (NewtonDone) EXIT NewtonLoopTLM
+	    ELSE
+  	       ! Minimum number of iterations same as FWD iterations
+               IF (NewtonIterTLM>=saveNiter) EXIT NewtonLoopTLM
+	    END IF
+            
+      END DO NewtonLoopTLM
+            
+      IF ((TLMNewtonEst) .AND. (.NOT.NewtonDone)) THEN
+           !CALL RK_ErrorMsg(-12,T,H,IERR);
+           H = Fac*H; Reject=.TRUE.; SkipJac = .TRUE.;  SkipLU = .FALSE.
+           CYCLE Tloop
+      END IF
+              
+  END DO Tlm    
+
+  END IF TLMDIR
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Error estimation, TLM solution
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IF (TLMtruncErr) THEN
+        CALL RK_ErrorEstimate_tlm(N,NTLM,T,H,FJAC,Y, Y_tlm, &
+               E1,IP1,Z1_tlm,Z2_tlm,Z3_tlm,Err,FirstStep,Reject)
+      END IF
+
+  END IF ! (Err<ONE)
+            
+
+!~~~> Computation of new step size Hnew
+      Fac  = Err**(-ONE/rkELO)*   &
+             MIN(FacSafe,(ONE+2*NewtonMaxit)/(NewtonIter+2*NewtonMaxit))
+      Fac  = MIN(FacMax,MAX(FacMin,Fac))
+      Hnew = Fac*H
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Accept/reject step 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept:IF (Err < ONE) THEN !~~~> STEP IS ACCEPTED
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+         IF (Gustafsson) THEN
+            !~~~> Predictive controller of Gustafsson
+            IF (ISTATUS(Nacc) > 1) THEN
+               FacGus=FacSafe*(H/Hacc)*(Err**2/ErrOld)**(-0.25d0)
+               FacGus=MIN(FacMax,MAX(FacMin,FacGus))
+               Fac=MIN(Fac,FacGus)
+               Hnew = Fac*H
+            END IF
+            Hacc=H
+            ErrOld=MAX(1.0d-2,Err)
+         END IF
+         Hold = H
+         T = T+H 
+         ! Update solution: Y <- Y + sum(d_i Z_i)
+         IF (rkD(1)/=ZERO) CALL WAXPY(N,rkD(1),Z1,1,Y,1)
+         IF (rkD(2)/=ZERO) CALL WAXPY(N,rkD(2),Z2,1,Y,1)
+         IF (rkD(3)/=ZERO) CALL WAXPY(N,rkD(3),Z3,1,Y,1)
+         ! Update TLM solution: Y <- Y + sum(d_i*Z_i_tlm)
+         DO itlm = 1,NTLM
+            IF (rkD(1)/=ZERO) CALL WAXPY(N,rkD(1),Z1_tlm(1,itlm),1,Y_tlm(1,itlm),1)
+            IF (rkD(2)/=ZERO) CALL WAXPY(N,rkD(2),Z2_tlm(1,itlm),1,Y_tlm(1,itlm),1)
+            IF (rkD(3)/=ZERO) CALL WAXPY(N,rkD(3),Z3_tlm(1,itlm),1,Y_tlm(1,itlm),1)
+         END DO   
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         IF (StartNewton) CALL RK_Interpolate('make',N,H,Hold,Z1,Z2,Z3,CONT)
+         CALL RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhnew)  = Hnew
+         RSTATUS(Nhacc)  = H
+         Hnew = Tdirection*MIN( MAX(ABS(Hnew),Hmin) , Hmax )
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tend)*Tdirection >=  ZERO) THEN
+            H = Tend-T
+         ELSE
+            Hratio=Hnew/H
+            ! Reuse the LU decomposition
+            SkipLU = (Theta<=ThetaMin) .AND. (Hratio>=Qmin) .AND. (Hratio<=Qmax)
+            ! For TLM: do not skip LU (decrease TLM error)
+  	    SkipLU = .FALSE.
+            IF (.NOT.SkipLU) H=Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac  = .FALSE.	! For TLM: do not skip jac
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject   = .TRUE.
+         SkipJac  = .TRUE.
+         SkipLU   = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+
+      END IF accept
+      
+    END DO Tloop
+    
+    ! Successful exit
+    IERR = 1  
+
+ END SUBROUTINE RK_IntegratorTLM
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorMsg(Code,T,H,IERR)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   IMPLICIT NONE
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: IERR
+
+   IERR = Code
+   PRINT * , &
+     'Forced exit from RungeKutta due to the following error:'
+
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> Improper values for FacMin/FacMax/FacSafe/FacRej'
+    CASE (-5)
+      PRINT * , '--> Improper value for ThetaMin'
+    CASE (-6)
+      PRINT * , '--> Newton stopping tolerance too small'
+    CASE (-7)
+      PRINT * , '--> Improper values for Qmin, Qmax'
+    CASE (-8)
+      PRINT * , '--> Tolerances are too small'
+    CASE (-9)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-10)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-11)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE (-12)
+      PRINT * , '--> Non-convergence of Newton iterations'
+    CASE (-13)
+      PRINT * , '--> Requested RK method not implemented'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   WRITE(6,FMT="(5X,'T=',E12.5,'  H=',E12.5)") T, H 
+
+ END SUBROUTINE RK_ErrorMsg
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE RK_ErrorScale(N,ITOL,AbsTol,RelTol,Y,SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   IMPLICIT NONE
+   INTEGER, INTENT(IN)  :: N, ITOL
+   KPP_REAL, INTENT(IN) :: AbsTol(*), RelTol(*), Y(N)
+   KPP_REAL, INTENT(OUT) :: SCAL(N)
+   INTEGER :: i
+   
+   IF (ITOL==0) THEN
+       DO i=1,N
+          SCAL(i)= ONE/(AbsTol(1)+RelTol(1)*ABS(Y(i)))
+       END DO
+   ELSE
+       DO i=1,N
+          SCAL(i)=ONE/(AbsTol(i)+RelTol(i)*ABS(Y(i)))
+       END DO
+   END IF
+      
+ END SUBROUTINE RK_ErrorScale
+
+
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!  SUBROUTINE RK_Transform(N,Tr,Z1,Z2,Z3,W1,W2,W3)
+!!~~~>                 W <-- Tr x Z
+!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      IMPLICIT NONE
+!      INTEGER :: N, i
+!      KPP_REAL :: Tr(3,3),Z1(N),Z2(N),Z3(N),W1(N),W2(N),W3(N)
+!      KPP_REAL :: x1, x2, x3
+!      DO i=1,N
+!          x1 = Z1(i); x2 = Z2(i); x3 = Z3(i)
+!          W1(i) = Tr(1,1)*x1 + Tr(1,2)*x2 + Tr(1,3)*x3
+!          W2(i) = Tr(2,1)*x1 + Tr(2,2)*x2 + Tr(2,3)*x3
+!          W3(i) = Tr(3,1)*x1 + Tr(3,2)*x2 + Tr(3,3)*x3
+!      END DO
+!  END SUBROUTINE RK_Transform
+ 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE RK_Interpolate(action,N,H,Hold,Z1,Z2,Z3,CONT)
+!~~~>   Constructs or evaluates a quadratic polynomial
+!         that interpolates the Z solution at current step
+!         and provides starting values for the next step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H,Hold
+      KPP_REAL, INTENT(INOUT) :: Z1(N),Z2(N),Z3(N),CONT(N,3)
+      CHARACTER(LEN=4), INTENT(IN) :: action
+      KPP_REAL :: r, x1, x2, x3, den
+      INTEGER :: i
+       
+      SELECT CASE (action) 
+      CASE ('make')
+         ! Construct the solution quadratic interpolant Q(c_i) = Z_i, i=1:3
+         den = (rkC(3)-rkC(2))*(rkC(2)-rkC(1))*(rkC(1)-rkC(3))
+         DO i=1,N
+             CONT(i,1)=(-rkC(3)**2*rkC(2)*Z1(i)+Z3(i)*rkC(2)*rkC(1)**2 &
+                        +rkC(2)**2*rkC(3)*Z1(i)-rkC(2)**2*rkC(1)*Z3(i) &
+                        +rkC(3)**2*rkC(1)*Z2(i)-Z2(i)*rkC(3)*rkC(1)**2)&
+                        /den-Z3(i)
+             CONT(i,2)= -( rkC(1)**2*(Z3(i)-Z2(i)) + rkC(2)**2*(Z1(i)  &
+                          -Z3(i)) +rkC(3)**2*(Z2(i)-Z1(i)) )/den
+             CONT(i,3)= ( rkC(1)*(Z3(i)-Z2(i)) + rkC(2)*(Z1(i)-Z3(i))  &
+                           +rkC(3)*(Z2(i)-Z1(i)) )/den
+         END DO
+      CASE ('eval')
+          ! Evaluate quadratic polynomial
+          r = H/Hold
+         x1 = ONE + rkC(1)*r
+         x2 = ONE + rkC(2)*r
+         x3 = ONE + rkC(3)*r
+         DO i=1,N
+            Z1(i) = CONT(i,1)+x1*(CONT(i,2)+x1*CONT(i,3))
+            Z2(i) = CONT(i,1)+x2*(CONT(i,2)+x2*CONT(i,3))
+            Z3(i) = CONT(i,1)+x3*(CONT(i,2)+x3*CONT(i,3))
+         END DO
+       END SELECT   
+  END SUBROUTINE RK_Interpolate
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS(N,T,H,Y,Z1,Z2,Z3,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z - hA x F
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: T, H
+      KPP_REAL, INTENT(IN), DIMENSION(N) :: Y,Z1,Z2,Z3
+      KPP_REAL, INTENT(INOUT), DIMENSION(N) :: R1,R2,R3
+      KPP_REAL, DIMENSION(N) :: F, TMP
+      
+      CALL WCOPY(N,Z1,1,R1,1) ! R1 <- Z1
+      CALL WCOPY(N,Z2,1,R2,1) ! R2 <- Z2
+      CALL WCOPY(N,Z3,1,R3,1) ! R3 <- Z3
+
+      CALL WADD(N,Y,Z1,TMP)              ! TMP <- Y + Z1
+      CALL FUN_CHEM(T+rkC(1)*H,TMP,F)    ! F1 <- Fun(Y+Z1)         
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y,Z2,TMP)              ! TMP <- Y + Z2
+      CALL FUN_CHEM(T+rkC(2)*H,TMP,F)    ! F2 <- Fun(Y+Z2)        
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y,Z3,TMP)              ! TMP <- Y + Z3
+      CALL FUN_CHEM(T+rkC(3)*H,TMP,F)    ! F3 <- Fun(Y+Z3)     
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_TLM(N,H,Jac1,Jac2,Jac3,Y_tlm, &
+                      Z1_tlm,Z2_tlm,Z3_tlm,R1,R2,R3)
+!~~~> Prepare the right-hand side for Newton iterations
+!     R = Z_tlm - hA x Jac*Z_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, INTENT(IN), DIMENSION(N) :: Y_tlm,Z1_tlm,Z2_tlm,Z3_tlm
+      KPP_REAL, INTENT(INOUT), DIMENSION(N) :: R1,R2,R3
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN), DIMENSION(NVAR,NVAR)  :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, INTENT(IN), DIMENSION(LU_NONZERO) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) :: F, TMP
+
+      CALL WCOPY(N,Z1_tlm,1,R1,1) ! R1 <- Z1_tlm
+      CALL WCOPY(N,Z2_tlm,1,R2,1) ! R2 <- Z2_tlm
+      CALL WCOPY(N,Z3_tlm,1,R3,1) ! R3 <- Z3_tlm
+
+      CALL WADD(N,Y_tlm,Z1_tlm,TMP)      ! TMP <- Y + Z1
+#ifdef FULL_ALGEBRA  
+      F = MATMUL(Jac1,TMP)    
+#else      
+      CALL Jac_SP_Vec ( Jac1, TMP, F )   ! F1 <- Jac(Y+Z1)*(Y_tlm+Z1_tlm)  
+#endif      
+      CALL WAXPY(N,-H*rkA(1,1),F,1,R1,1) ! R1 <- R1 - h*A_11*F1
+      CALL WAXPY(N,-H*rkA(2,1),F,1,R2,1) ! R2 <- R2 - h*A_21*F1
+      CALL WAXPY(N,-H*rkA(3,1),F,1,R3,1) ! R3 <- R3 - h*A_31*F1
+
+      CALL WADD(N,Y_tlm,Z2_tlm,TMP)      ! TMP <- Y + Z2
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac2,TMP)    
+#else      
+      CALL Jac_SP_Vec ( Jac2, TMP, F )   ! F2 <- Jac(Y+Z2)*(Y_tlm+Z2_tlm)  
+#endif      
+      CALL WAXPY(N,-H*rkA(1,2),F,1,R1,1) ! R1 <- R1 - h*A_12*F2
+      CALL WAXPY(N,-H*rkA(2,2),F,1,R2,1) ! R2 <- R2 - h*A_22*F2
+      CALL WAXPY(N,-H*rkA(3,2),F,1,R3,1) ! R3 <- R3 - h*A_32*F2
+
+      CALL WADD(N,Y_tlm,Z3_tlm,TMP)      ! TMP <- Y + Z3
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac3,TMP)    
+#else      
+      CALL Jac_SP_Vec ( Jac3, TMP, F )   ! F3 <- Jac(Y+Z3)*(Y_tlm+Z3_tlm)  
+#endif      
+      CALL WAXPY(N,-H*rkA(1,3),F,1,R1,1) ! R1 <- R1 - h*A_13*F3
+      CALL WAXPY(N,-H*rkA(2,3),F,1,R2,1) ! R2 <- R2 - h*A_23*F3
+      CALL WAXPY(N,-H*rkA(3,3),F,1,R3,1) ! R3 <- R3 - h*A_33*F3
+            
+  END SUBROUTINE RK_PrepareRHS_TLM
+  
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_PrepareRHS_TLMdirect(N,H,Jac1,Jac2,Jac3,Y_tlm,Zbig)
+!~~~> Prepare the right-hand side for direct solution
+!     Z =  hA x Jac*Y_tlm
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, INTENT(IN), DIMENSION(N) :: Y_tlm
+! Commented code for sparse big linear algebra:  
+!      KPP_REAL, INTENT(OUT), DIMENSION(3,N) :: Zbig
+      KPP_REAL, INTENT(OUT), DIMENSION(3*N) :: Zbig
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN), DIMENSION(NVAR,NVAR)  :: Jac1, Jac2, Jac3
+#else      
+      KPP_REAL, INTENT(IN), DIMENSION(LU_NONZERO) :: Jac1, Jac2, Jac3
+#endif
+      KPP_REAL, DIMENSION(N) :: F, TMP
+
+#ifdef FULL_ALGEBRA  
+      F = MATMUL(Jac1,Y_tlm)    
+#else      
+      CALL Jac_SP_Vec ( Jac1, Y_tlm, F )   ! F1 <- Jac(Y+Z1)*(Y_tlm)  
+#endif      
+! Commented code for sparse big linear algebra:  
+!      Zbig(1,1:N) = H*rkA(1,1)*F(1:N)
+!      Zbig(2,1:N) = H*rkA(2,1)*F(1:N)
+!      Zbig(3,1:N) = H*rkA(3,1)*F(1:N)
+      Zbig(1:N)       = H*rkA(1,1)*F(1:N)
+      Zbig(N+1:2*N)   = H*rkA(2,1)*F(1:N)
+      Zbig(2*N+1:3*N) = H*rkA(3,1)*F(1:N)
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac2,Y_tlm)    
+#else      
+      CALL Jac_SP_Vec ( Jac2, Y_tlm, F )   ! F2 <- Jac(Y+Z2)*(Y_tlm)  
+#endif    
+! Commented code for sparse big linear algebra:  
+!      Zbig(1,1:N) = Zbig(1,1:N) + H*rkA(1,2)*F(1:N)
+!      Zbig(2,1:N) = Zbig(2,1:N) + H*rkA(2,2)*F(1:N)
+!      Zbig(3,1:N) = Zbig(3,1:N) + H*rkA(3,2)*F(1:N)
+      Zbig(1:N)       = Zbig(1:N)       + H*rkA(1,2)*F(1:N)
+      Zbig(N+1:2*N)   = Zbig(N+1:2*N)   + H*rkA(2,2)*F(1:N)
+      Zbig(2*N+1:3*N) = Zbig(2*N+1:3*N) + H*rkA(3,2)*F(1:N)
+
+#ifdef FULL_ALGEBRA      
+      F = MATMUL(Jac3,Y_tlm)    
+#else      
+      CALL Jac_SP_Vec ( Jac3, Y_tlm, F )   ! F3 <- Jac(Y+Z3)*(Y_tlm)  
+#endif      
+! Commented code for sparse big linear algebra:  
+!      Zbig(1,1:N) = Zbig(1,1:N) + H*rkA(1,3)*F(1:N)
+!      Zbig(2,1:N) = Zbig(2,1:N) + H*rkA(2,3)*F(1:N)
+!      Zbig(3,1:N) = Zbig(3,1:N) + H*rkA(3,3)*F(1:N)
+      Zbig(1:N)       = Zbig(1:N)       + H*rkA(1,3)*F(1:N)
+      Zbig(N+1:2*N)   = Zbig(N+1:2*N)   + H*rkA(2,3)*F(1:N)
+      Zbig(2*N+1:3*N) = Zbig(2*N+1:3*N) + H*rkA(3,3)*F(1:N)
+            
+  END SUBROUTINE RK_PrepareRHS_TLMdirect
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Decomp(N,H,FJAC,E1,IP1,E2,IP2,ISING)
+   !~~~> Compute the matrices E1 and E2 and their decompositions
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT) ::E1(NVAR,NVAR)
+      COMPLEX(kind=dp), INTENT(OUT) :: E2(N,N)
+#else      
+      KPP_REAL, INTENT(IN) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT) :: E1(LU_NONZERO)
+      COMPLEX(kind=dp),INTENT(OUT) :: E2(LU_NONZERO)
+#endif      
+      INTEGER, INTENT(OUT) :: IP1(N), IP2(N), ISING
+
+      INTEGER :: i, j
+      KPP_REAL    :: Alpha, Beta, Gamma
+      
+      Gamma = rkGamma/H
+      Alpha = rkAlpha/H
+      Beta  = rkBeta /H
+
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+         DO  i=1,N
+            E1(i,j)=-FJAC(i,j)
+         END DO
+         E1(j,j)=E1(j,j)+Gamma
+      END DO
+      CALL DGETRF(N,N,E1,N,IP1,ISING) 
+#else      
+      DO i=1,LU_NONZERO
+         E1(i)=-FJAC(i)
+      END DO
+      DO i=1,NVAR
+         j=LU_DIAG(i); E1(j)=E1(j)+Gamma
+      END DO
+      CALL KppDecomp(E1,ISING)
+#endif      
+      
+      IF (ISING /= 0) THEN
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         RETURN
+      END IF
+     
+#ifdef FULL_ALGEBRA      
+      DO j=1,N
+        DO i=1,N
+          E2(i,j) = DCMPLX( -FJAC(i,j), ZERO )
+        END DO
+        E2(j,j) = E2(j,j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL ZGETRF(N,N,E2,N,IP2,ISING)     
+#else  
+      DO i=1,LU_NONZERO
+         E2(i) = DCMPLX( -FJAC(i), ZERO )
+      END DO
+      DO i=1,NVAR
+         j = LU_DIAG(i); E2(j)=E2(j) + CMPLX( Alpha, Beta )
+      END DO
+      CALL KppDecompCmplx(E2,ISING)    
+#endif      
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+      
+   END SUBROUTINE RK_Decomp
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_Solve(N,H,E1,IP1,E2,IP2,R1,R2,R3,ISING)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: N,IP1(NVAR),IP2(NVAR)
+      INTEGER, INTENT(OUT) :: ISING
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: E1(NVAR,NVAR)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(NVAR,NVAR)
+#else      
+      KPP_REAL, INTENT(IN) :: E1(LU_NONZERO)
+      COMPLEX(kind=dp), INTENT(IN) :: E2(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(IN) :: H
+      KPP_REAL, INTENT(INOUT) :: R1(N),R2(N),R3(N)
+
+      KPP_REAL    :: x1, x2, x3
+      COMPLEX(kind=dp) :: BC(N)
+      INTEGER :: i
+!      
+     ! Z <- h^{-1) T^{-1) A^{-1) x Z
+      DO i=1,N
+          x1 = R1(i)/H; x2 = R2(i)/H; x3 = R3(i)/H
+          R1(i) = rkTinvAinv(1,1)*x1 + rkTinvAinv(1,2)*x2 + rkTinvAinv(1,3)*x3
+          R2(i) = rkTinvAinv(2,1)*x1 + rkTinvAinv(2,2)*x2 + rkTinvAinv(2,3)*x3
+          R3(i) = rkTinvAinv(3,1)*x1 + rkTinvAinv(3,2)*x2 + rkTinvAinv(3,3)*x3
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,R1,N,ISING) 
+#else      
+      CALL KppSolve (E1,R1)
+#endif      
+!      
+      DO i=1,N
+        BC(i) = DCMPLX(R2(i),R3(i))
+      END DO
+#ifdef FULL_ALGEBRA      
+      CALL ZGETRS ('N',N,1,E2,N,IP2,BC,N,ISING) 
+#else      
+      CALL KppSolveCmplx (E2,BC)
+#endif      
+      DO i=1,N
+        R2(i) = DBLE( BC(i) )
+        R3(i) = AIMAG( BC(i) )
+      END DO
+
+      ! Z <- T x Z
+      DO i=1,N
+          x1 = R1(i); x2 = R2(i); x3 = R3(i)
+          R1(i) = rkT(1,1)*x1 + rkT(1,2)*x2 + rkT(1,3)*x3
+          R2(i) = rkT(2,1)*x1 + rkT(2,2)*x2 + rkT(2,3)*x3
+          R3(i) = rkT(3,1)*x1 + rkT(3,2)*x2 + rkT(3,3)*x3
+      END DO
+
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+
+   END SUBROUTINE RK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate(N,H,Y,T,      &
+               E1,IP1,Z1,Z2,Z3,SCAL,Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N, IP1(N)
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: E1(NVAR,NVAR)
+      INTEGER :: ISING
+#else      
+      KPP_REAL, INTENT(IN) :: E1(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(IN) :: T,H,SCAL(N),Z1(N),Z2(N),Z3(N),Y(N)
+      LOGICAL,INTENT(IN) :: FirstStep,Reject
+      KPP_REAL, INTENT(INOUT) :: Err
+
+      KPP_REAL :: F1(N),F2(N),F0(N),TMP(N)
+      INTEGER :: i
+      KPP_REAL :: HEE1,HEE2,HEE3
+
+      HEE1  = rkE(1)/H
+      HEE2  = rkE(2)/H
+      HEE3  = rkE(3)/H
+
+      CALL FUN_CHEM(T,Y,F0)
+      ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+
+      DO  i=1,N
+         F2(i)  = HEE1*Z1(i)+HEE2*Z2(i)+HEE3*Z3(i)
+         TMP(i) = rkE(0)*F0(i) + F2(i)
+      END DO
+
+#ifdef FULL_ALGEBRA      
+      CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) THEN
+            CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING)
+      END IF	    
+      IF (rkMethod==GAU) THEN  
+            CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING)
+      ENDIF	    
+#else      
+      CALL KppSolve (E1, TMP)
+      IF ((rkMethod==R1A).OR.(rkMethod==GAU).OR.(rkMethod==L3A)) THEN
+            CALL KppSolve (E1,TMP)
+      END IF	    
+      IF (rkMethod==GAU) THEN
+            CALL KppSolve (E1,TMP)
+      END IF	    
+#endif      
+
+      Err = RK_ErrorNorm(N,SCAL,TMP)
+!
+      IF (Err < ONE) RETURN
+firej:IF (FirstStep.OR.Reject) THEN
+          DO i=1,N
+             TMP(i)=Y(i)+TMP(i)
+          END DO
+          CALL FUN_CHEM(T,TMP,F1)    
+          ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+          DO i=1,N
+             TMP(i)=F1(i)+F2(i)
+          END DO
+
+#ifdef FULL_ALGEBRA      
+          CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+#else      
+          CALL KppSolve (E1, TMP)
+#endif      
+          Err = RK_ErrorNorm(N,SCAL,TMP)
+       END IF firej
+ 
+   END SUBROUTINE RK_ErrorEstimate
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE RK_ErrorEstimate_tlm(N,NTLM,T,H,FJAC,Y,Y_tlm, &
+               E1,IP1,Z1_tlm,Z2_tlm,Z3_tlm,FWD_Err,     &
+               FirstStep,Reject)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N,NTLM,IP1(N)
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, INTENT(IN) :: FJAC(N,N),  E1(N,N)
+      KPP_REAL :: J0(N,N)
+      INTEGER  :: ISING
+#else      
+      KPP_REAL, INTENT(IN) :: FJAC(LU_NONZERO), E1(LU_NONZERO)
+      KPP_REAL :: J0(LU_NONZERO)
+#endif      
+      KPP_REAL, INTENT(IN) :: T,H, Z1_tlm(N,NTLM),Z2_tlm(N,NTLM),Z3_tlm(N,NTLM), &
+      				Y_tlm(N,NTLM), Y(N)
+      LOGICAL, INTENT(IN) :: FirstStep, Reject
+      KPP_REAL, INTENT(INOUT) :: FWD_Err
+
+      INTEGER :: itlm
+      KPP_REAL :: HEE1,HEE2,HEE3, SCAL_tlm(N), Err, TMP(N), TMP2(N), JY_tlm(N)
+	
+	HEE1  = rkE(1)/H
+	HEE2  = rkE(2)/H
+	HEE3  = rkE(3)/H
+	
+      DO itlm=1,NTLM
+        CALL RK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+              Y_tlm(1,itlm),SCAL_tlm)
+
+ 	CALL JAC_CHEM(T,Y,J0)
+	ISTATUS(Njac) = ISTATUS(Njac) + 1
+	CALL JAC_SP_Vec(J0,Y_tlm(1,itlm),JY_tlm)
+
+	DO  i=1,N
+          TMP2(i)  = HEE1*Z1_tlm(i,itlm)+HEE2*Z2_tlm(i,itlm)+HEE3*Z3_tlm(i,itlm)
+          TMP(i) = rkE(0)*JY_tlm(i) + TMP2(i)
+	END DO
+
+#ifdef FULL_ALGEBRA      
+	CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING) 
+!	IF ((ICNTRL(3)==3).OR.(ICNTRL(3)==4)) 
+!               CALL DGETRS('N',N,1,E1,N,IP1,TMP,N,ISING)
+!	IF (ICNTRL(3)==3) CALL DGETRS ('N',N,1,E1,N,IP1,TMP,N,ISING)
+#else      
+	CALL KppSolve (E1, TMP)
+!	IF ((ICNTRL(3)==3).OR.(ICNTRL(3)==4)) THEN
+!          CALL KppSolve (E1,TMP)
+!	END IF  
+!	IF (ICNTRL(3)==3) THEN
+!          CALL KppSolve (E1,TMP)
+!	END IF  
+#endif      
+
+        Err = RK_ErrorNorm(N,SCAL_tlm,TMP)
+!
+	FWD_Err = MAX(FWD_Err, Err)
+      END DO
+      
+   END SUBROUTINE RK_ErrorEstimate_tlm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL FUNCTION RK_ErrorNorm(N,SCAL,DY)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(IN) :: SCAL(N),DY(N)
+      INTEGER :: i
+
+      RK_ErrorNorm = ZERO
+      DO i=1,N
+          RK_ErrorNorm = RK_ErrorNorm + (DY(i)*SCAL(i))**2
+      END DO
+      RK_ErrorNorm = MAX( SQRT(RK_ErrorNorm/N), 1.0d-10 )
+ 
+   END FUNCTION RK_ErrorNorm
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau2A_Coefficients
+!    The coefficients of the 3-stage Radau-2A method
+!    (given to ~30 accurate digits)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+! The coefficients of the Radau2A method
+      KPP_REAL :: b0
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d-1
+      ELSE
+        b0 = 0.5d-1
+      END IF
+
+! The coefficients of the Radau2A method
+      rkMethod = R2A
+
+      rkA(1,1) =  1.968154772236604258683861429918299d-1
+      rkA(1,2) = -6.55354258501983881085227825696087d-2
+      rkA(1,3) =  2.377097434822015242040823210718965d-2
+      rkA(2,1) =  3.944243147390872769974116714584975d-1
+      rkA(2,2) =  2.920734116652284630205027458970589d-1
+      rkA(2,3) = -4.154875212599793019818600988496743d-2
+      rkA(3,1) =  3.764030627004672750500754423692808d-1
+      rkA(3,2) =  5.124858261884216138388134465196080d-1
+      rkA(3,3) =  1.111111111111111111111111111111111d-1
+
+      rkB(1) = 3.764030627004672750500754423692808d-1
+      rkB(2) = 5.124858261884216138388134465196080d-1
+      rkB(3) = 1.111111111111111111111111111111111d-1
+
+      rkC(1) = 1.550510257216821901802715925294109d-1
+      rkC(2) = 6.449489742783178098197284074705891d-1
+      rkC(3) = 1.0d0
+      
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      ! H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = 1.0d0*b0
+      rkE(1) = -10.04880939982741556246032950764708d0*b0
+      rkE(2) = 1.382142733160748895793662840980412d0*b0
+      rkE(3) = -.3333333333333333333333333333333333d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .3764030627004672750500754423692807d0-1.558078204724922382431975370686279d0*b0
+      rkBgam(2) = .8914115380582557157653087040196118d0*b0+.5124858261884216138388134465196077d0
+      rkBgam(3) = -.1637777184845662566367174924883037d0-.3333333333333333333333333333333333d0*b0
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.520677486405081647234271944611547d0-10.04880939982741556246032950764708d0*b0
+      rkTheta(2) = 2.070455145596436382729929151810376d0+1.382142733160748895793662840980413d0*b0
+      rkTheta(3) = -.3333333333333333333333333333333333d0*b0-.3744441479783868387391430179970741d0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 6.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  9.443876248897524148749007950641664d-2
+      rkT(1,2) = -1.412552950209542084279903838077973d-1
+      rkT(1,3) = -3.00291941051474244918611170890539d-2
+      rkT(2,1) =  2.502131229653333113765090675125018d-1
+      rkT(2,2) =  2.041293522937999319959908102983381d-1
+      rkT(2,3) =  3.829421127572619377954382335998733d-1
+      rkT(3,1) =  1.0d0
+      rkT(3,2) =  1.0d0
+      rkT(3,3) =  0.0d0
+
+      rkTinv(1,1) =  4.178718591551904727346462658512057d0
+      rkTinv(1,2) =  3.27682820761062387082533272429617d-1
+      rkTinv(1,3) =  5.233764454994495480399309159089876d-1
+      rkTinv(2,1) = -4.178718591551904727346462658512057d0
+      rkTinv(2,2) = -3.27682820761062387082533272429617d-1
+      rkTinv(2,3) =  4.766235545005504519600690840910124d-1
+      rkTinv(3,1) = -5.02872634945786875951247343139544d-1
+      rkTinv(3,2) =  2.571926949855605429186785353601676d0
+      rkTinv(3,3) = -5.960392048282249249688219110993024d-1
+
+      rkTinvAinv(1,1) =  1.520148562492775501049204957366528d+1
+      rkTinvAinv(1,2) =  1.192055789400527921212348994770778d0
+      rkTinvAinv(1,3) =  1.903956760517560343018332287285119d0
+      rkTinvAinv(2,1) = -9.669512977505946748632625374449567d0
+      rkTinvAinv(2,2) = -8.724028436822336183071773193986487d0
+      rkTinvAinv(2,3) =  3.096043239482439656981667712714881d0
+      rkTinvAinv(3,1) = -1.409513259499574544876303981551774d+1
+      rkTinvAinv(3,2) =  5.895975725255405108079130152868952d0
+      rkTinvAinv(3,3) = -1.441236197545344702389881889085515d-1
+
+      rkAinvT(1,1) = .3435525649691961614912493915818282d0
+      rkAinvT(1,2) = -.4703191128473198422370558694426832d0
+      rkAinvT(1,3) = .3503786597113668965366406634269080d0
+      rkAinvT(2,1) = .9102338692094599309122768354288852d0
+      rkAinvT(2,2) = 1.715425895757991796035292755937326d0
+      rkAinvT(2,3) = .4040171993145015239277111187301784d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau2A_Coefficients
+
+    
+
+    
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Lobatto3C_Coefficients
+!    The coefficients of the 3-stage Lobatto-3C method
+!    (given to ~30 accurate digits)
+!    The parameter b0 can be chosen to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+
+      rkMethod = L3C
+
+!      b0 = 1.0d0
+      IF (SdirkError) THEN
+        b0 = 0.2d0
+      ELSE
+        b0 = 0.5d0
+      END IF
+! The coefficients of the Lobatto3C method
+
+      rkA(1,1) =  .1666666666666666666666666666666667d0
+      rkA(1,2) = -.3333333333333333333333333333333333d0
+      rkA(1,3) =  .1666666666666666666666666666666667d0
+      rkA(2,1) =  .1666666666666666666666666666666667d0
+      rkA(2,2) =  .4166666666666666666666666666666667d0
+      rkA(2,3) = -.8333333333333333333333333333333333d-1
+      rkA(3,1) =  .1666666666666666666666666666666667d0
+      rkA(3,2) =  .6666666666666666666666666666666667d0
+      rkA(3,3) =  .1666666666666666666666666666666667d0
+
+      rkB(1) = .1666666666666666666666666666666667d0
+      rkB(2) = .6666666666666666666666666666666667d0
+      rkB(3) = .1666666666666666666666666666666667d0
+
+      rkC(1) = 0.0d0
+      rkC(2) = 0.5d0
+      rkC(3) = 1.0d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .16666666666666666666666666666666667d0-b0
+      rkBhat(2) = .66666666666666666666666666666666667d0
+      rkBhat(3) = .16666666666666666666666666666666667d0
+      
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = 0.0d0
+      rkD(2) = 0.0d0
+      rkD(3) = 1.0d0
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) =   .3808338772072650364017425226487022*b0
+      rkE(1) = -1.142501631621795109205227567946107*b0
+      rkE(2) = -1.523335508829060145606970090594809*b0
+      rkE(3) =   .3808338772072650364017425226487022*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = b0
+      rkBgam(1) = .1666666666666666666666666666666667d0-1.d0*b0
+      rkBgam(2) = .6666666666666666666666666666666667d0
+      rkBgam(3) = -.2141672105405983697350758559820354d0
+      rkBgam(4) = .3808338772072650364017425226487021d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -3.d0*b0-.3808338772072650364017425226487021d0
+      rkTheta(2) = -4.d0*b0+1.523335508829060145606970090594808d0
+      rkTheta(3) = -.142501631621795109205227567946106d0+b0
+
+      ! Local order of error estimator 
+      IF (b0==0.0d0) THEN
+        rkELO  = 5.0d0
+      ELSE	
+        rkELO  = 4.0d0
+      END IF	
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 2.625816818958466716011888933765284d0
+      rkAlpha = 1.687091590520766641994055533117359d0
+      rkBeta  = 2.508731754924880510838743672432351d0
+
+      rkT(1,1) = 1.d0
+      rkT(1,2) = 1.d0
+      rkT(1,3) = 0.d0
+      rkT(2,1) = .4554100411010284672111720348287483d0
+      rkT(2,2) = -.6027050205505142336055860174143743d0
+      rkT(2,3) = -.4309321229203225731070721341350346d0
+      rkT(3,1) = 2.195823345445647152832799205549709d0
+      rkT(3,2) = -1.097911672722823576416399602774855d0
+      rkT(3,3) = .7850032632435902184104551358922130d0
+
+      rkTinv(1,1) = .4205559181381766909344950150991349d0
+      rkTinv(1,2) = .3488903392193734304046467270632057d0
+      rkTinv(1,3) = .1915253879645878102698098373933487d0
+      rkTinv(2,1) = .5794440818618233090655049849008650d0
+      rkTinv(2,2) = -.3488903392193734304046467270632057d0
+      rkTinv(2,3) = -.1915253879645878102698098373933487d0
+      rkTinv(3,1) = -.3659705575742745254721332009249516d0
+      rkTinv(3,2) = -1.463882230297098101888532803699806d0
+      rkTinv(3,3) = .4702733607340189781407813565524989d0
+
+      rkTinvAinv(1,1) = 1.104302803159744452668648155627548d0
+      rkTinvAinv(1,2) = .916122120694355522658740710823143d0
+      rkTinvAinv(1,3) = .5029105849749601702795812241441172d0
+      rkTinvAinv(2,1) = 1.895697196840255547331351844372453d0
+      rkTinvAinv(2,2) = 3.083877879305644477341259289176857d0
+      rkTinvAinv(2,3) = -1.502910584974960170279581224144117d0
+      rkTinvAinv(3,1) = .8362439183082935036129145574774502d0
+      rkTinvAinv(3,2) = -3.344975673233174014451658229909802d0
+      rkTinvAinv(3,3) = .312908409479233358005944466882642d0
+
+      rkAinvT(1,1) = 2.625816818958466716011888933765282d0
+      rkAinvT(1,2) = 1.687091590520766641994055533117358d0
+      rkAinvT(1,3) = -2.508731754924880510838743672432351d0
+      rkAinvT(2,1) = 1.195823345445647152832799205549710d0
+      rkAinvT(2,2) = -2.097911672722823576416399602774855d0
+      rkAinvT(2,3) = .7850032632435902184104551358922130d0
+      rkAinvT(3,1) = 5.765829871932827589653709477334136d0
+      rkAinvT(3,2) = .1170850640335862051731452613329320d0
+      rkAinvT(3,3) = 4.078738281412060947659653944216779d0
+
+  END SUBROUTINE Lobatto3C_Coefficients
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Gauss_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+      KPP_REAL :: b0
+! The coefficients of the Gauss method
+
+
+      rkMethod = GAU
+      
+!      b0 = 4.0d0
+      b0 = 0.1d0
+      
+! The coefficients of the Gauss method
+
+      rkA(1,1) =  .1388888888888888888888888888888889d0
+      rkA(1,2) = -.359766675249389034563954710966045d-1
+      rkA(1,3) =  .97894440153083260495800422294756d-2
+      rkA(2,1) =  .3002631949808645924380249472131556d0
+      rkA(2,2) =  .2222222222222222222222222222222222d0
+      rkA(2,3) = -.224854172030868146602471694353778d-1
+      rkA(3,1) =  .2679883337624694517281977355483022d0
+      rkA(3,2) =  .4804211119693833479008399155410489d0
+      rkA(3,3) =  .1388888888888888888888888888888889d0
+
+      rkB(1) = .2777777777777777777777777777777778d0
+      rkB(2) = .4444444444444444444444444444444444d0
+      rkB(3) = .2777777777777777777777777777777778d0
+
+      rkC(1) = .1127016653792583114820734600217600d0
+      rkC(2) = .5000000000000000000000000000000000d0
+      rkC(3) = .8872983346207416885179265399782400d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) =-1.4788305577012361475298775666303999d0*b0 &
+                  +.27777777777777777777777777777777778d0
+      rkBhat(2) =  .44444444444444444444444444444444444d0 &
+                  +.66666666666666666666666666666666667d0*b0
+      rkBhat(3) = -.18783610896543051913678910003626672d0*b0 &
+                  +.27777777777777777777777777777777778d0
+
+      ! New solution: h Sum_j b_j f(Z_j) = sum d_j Z_j
+      rkD(1) = .1666666666666666666666666666666667d1
+      rkD(2) = -.1333333333333333333333333333333333d1
+      rkD(3) = .1666666666666666666666666666666667d1
+
+      ! Classical error estimator: 
+      !   H* Sum (B_j-Bhat_j)*f(Z_j) = H*E(0)*f(0) + Sum E_j*Z_j
+      rkE(0) = .2153144231161121782447335303806954d0*b0
+      rkE(1) = -2.825278112319014084275808340593191d0*b0
+      rkE(2) = .2870858974881495709929780405075939d0*b0
+      rkE(3) = -.4558086256248162565397206448274867d-1*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.d0
+      rkBgam(1) = .2373339543355109188382583162660537d0
+      rkBgam(2) = .5879873931885192299409334646982414d0
+      rkBgam(3) = -.4063577064014232702392531134499046d-1
+      rkBgam(4) = .2153144231161121782447335303806955d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -2.594040933093095272574031876464493d0
+      rkTheta(2) = 1.824611539036311947589425112250199d0
+      rkTheta(3) = .1856563166634371860478043996459493d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 4.644370709252171185822941421408064d0
+      rkAlpha = 3.677814645373914407088529289295970d0
+      rkBeta  = 3.508761919567443321903661209182446d0
+
+      rkT(1,1) =  .7215185205520017032081769924397664d-1
+      rkT(1,2) = -.8224123057363067064866206597516454d-1
+      rkT(1,3) = -.6012073861930850173085948921439054d-1
+      rkT(2,1) =  .1188325787412778070708888193730294d0
+      rkT(2,2) =  .5306509074206139504614411373957448d-1
+      rkT(2,3) =  .3162050511322915732224862926182701d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) =  5.991698084937800775649580743981285d0
+      rkTinv(1,2) =  1.139214295155735444567002236934009d0
+      rkTinv(1,3) =   .4323121137838583855696375901180497d0
+      rkTinv(2,1) = -5.991698084937800775649580743981285d0
+      rkTinv(2,2) = -1.139214295155735444567002236934009d0
+      rkTinv(2,3) =   .5676878862161416144303624098819503d0
+      rkTinv(3,1) = -1.246213273586231410815571640493082d0
+      rkTinv(3,2) =  2.925559646192313662599230367054972d0
+      rkTinv(3,3) =  -.2577352012734324923468722836888244d0
+
+      rkTinvAinv(1,1) =  27.82766708436744962047620566703329d0
+      rkTinvAinv(1,2) =   5.290933503982655311815946575100597d0
+      rkTinvAinv(1,3) =   2.007817718512643701322151051660114d0
+      rkTinvAinv(2,1) = -17.66368928942422710690385180065675d0
+      rkTinvAinv(2,2) = -14.45491129892587782538830044147713d0
+      rkTinvAinv(2,3) =   2.992182281487356298677848948339886d0
+      rkTinvAinv(3,1) = -25.60678350282974256072419392007303d0
+      rkTinvAinv(3,2) =   6.762434375611708328910623303779923d0
+      rkTinvAinv(3,3) =   1.043979339483109825041215970036771d0
+      
+      rkAinvT(1,1) = .3350999483034677402618981153470483d0
+      rkAinvT(1,2) = -.5134173605009692329246186488441294d0
+      rkAinvT(1,3) = .6745196507033116204327635673208923d-1
+      rkAinvT(2,1) = .5519025480108928886873752035738885d0
+      rkAinvT(2,2) = 1.304651810077110066076640761092008d0
+      rkAinvT(2,3) = .9767507983414134987545585703726984d0
+      rkAinvT(3,1) = 4.644370709252171185822941421408064d0
+      rkAinvT(3,2) = 3.677814645373914407088529289295970d0
+      rkAinvT(3,3) = -3.508761919567443321903661209182446d0
+      
+  END SUBROUTINE Gauss_Coefficients
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE Radau1A_Coefficients
+!    The coefficients of the 3-stage Gauss method
+!    (given to ~30 accurate digits)
+!    The parameter b3 can be chosen by the user
+!    to tune the error estimator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     
+      IMPLICIT NONE
+!      KPP_REAL :: b0 = 0.3d0
+      KPP_REAL :: b0 = 0.1d0
+
+! The coefficients of the Radau1A method
+
+      rkMethod = R1A
+
+      rkA(1,1) =  .1111111111111111111111111111111111d0
+      rkA(1,2) = -.1916383190435098943442935597058829d0
+      rkA(1,3) =  .8052720793239878323318244859477174d-1
+      rkA(2,1) =  .1111111111111111111111111111111111d0
+      rkA(2,2) =  .2920734116652284630205027458970589d0
+      rkA(2,3) = -.481334970546573839513422644787591d-1
+      rkA(3,1) =  .1111111111111111111111111111111111d0
+      rkA(3,2) =  .5370223859435462728402311533676479d0
+      rkA(3,3) =  .1968154772236604258683861429918299d0
+
+      rkB(1) = .1111111111111111111111111111111111d0
+      rkB(2) = .5124858261884216138388134465196080d0
+      rkB(3) = .3764030627004672750500754423692808d0
+
+      rkC(1) = 0.d0
+      rkC(2) = .3550510257216821901802715925294109d0
+      rkC(3) = .8449489742783178098197284074705891d0
+
+      ! Classical error estimator, embedded solution: 
+      rkBhat(0) = b0
+      rkBhat(1) = .11111111111111111111111111111111111d0-b0
+      rkBhat(2) = .51248582618842161383881344651960810d0
+      rkBhat(3) = .37640306270046727505007544236928079d0
+
+      ! New solution: H* Sum B_j*f(Z_j) = Sum D_j*Z_j
+      rkD(1) = .3333333333333333333333333333333333d0
+      rkD(2) = -.8914115380582557157653087040196127d0
+      rkD(3) = .1558078204724922382431975370686279d1
+
+      ! Classical error estimator: 
+      ! H* Sum (b_j-bhat_j) f(Z_j) = H*E(0)*F(0) + Sum E_j Z_j
+      rkE(0) =   .2748888295956773677478286035994148d0*b0
+      rkE(1) = -1.374444147978386838739143017997074d0*b0
+      rkE(2) = -1.335337922441686804550326197041126d0*b0
+      rkE(3) =   .235782604058977333559011782643466d0*b0
+
+      ! Sdirk error estimator
+      rkBgam(0) = 0.0d0
+      rkBgam(1) = .1948150124588532186183490991130616d-1
+      rkBgam(2) = .7575249005733381398986810981093584d0
+      rkBgam(3) = -.518952314149008295083446116200793d-1
+      rkBgam(4) = .2748888295956773677478286035994148d0
+
+      ! H* Sum Bgam_j*f(Z_j) = H*Bgam(0)*f(0) + Sum Theta_j*Z_j
+      rkTheta(1) = -1.224370034375505083904362087063351d0
+      rkTheta(2) = .9340045331532641409047527962010133d0
+      rkTheta(3) = .4656990124352088397561234800640929d0
+
+      ! ELO = local order of classical error estimator 
+      rkELO = 4.0d0
+
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      !~~~> Diagonalize the RK matrix:               
+      ! rkTinv * inv(rkA) * rkT =          
+      !           |  rkGamma      0           0     |
+      !           |      0      rkAlpha   -rkBeta   |
+      !           |      0      rkBeta     rkAlpha  |
+      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      rkGamma = 3.637834252744495732208418513577775d0
+      rkAlpha = 2.681082873627752133895790743211112d0
+      rkBeta  = 3.050430199247410569426377624787569d0
+
+      rkT(1,1) =  .424293819848497965354371036408369d0
+      rkT(1,2) = -.3235571519651980681202894497035503d0
+      rkT(1,3) = -.522137786846287839586599927945048d0
+      rkT(2,1) =  .57594609499806128896291585429339d-1
+      rkT(2,2) =  .3148663231849760131614374283783d-2
+      rkT(2,3) =  .452429247674359778577728510381731d0
+      rkT(3,1) = 1.d0
+      rkT(3,2) = 1.d0
+      rkT(3,3) = 0.d0
+
+      rkTinv(1,1) = 1.233523612685027760114769983066164d0
+      rkTinv(1,2) = 1.423580134265707095505388133369554d0
+      rkTinv(1,3) = .3946330125758354736049045150429624d0
+      rkTinv(2,1) = -1.233523612685027760114769983066164d0
+      rkTinv(2,2) = -1.423580134265707095505388133369554d0
+      rkTinv(2,3) = .6053669874241645263950954849570376d0
+      rkTinv(3,1) = -.1484438963257383124456490049673414d0
+      rkTinv(3,2) = 2.038974794939896109682070471785315d0
+      rkTinv(3,3) = -.544501292892686735299355831692542d-1
+
+      rkTinvAinv(1,1) =  4.487354449794728738538663081025420d0
+      rkTinvAinv(1,2) =  5.178748573958397475446442544234494d0
+      rkTinvAinv(1,3) =  1.435609490412123627047824222335563d0
+      rkTinvAinv(2,1) = -2.854361287939276673073807031221493d0
+      rkTinvAinv(2,2) = -1.003648660720543859000994063139137d+1
+      rkTinvAinv(2,3) =  1.789135380979465422050817815017383d0
+      rkTinvAinv(3,1) = -4.160768067752685525282947313530352d0
+      rkTinvAinv(3,2) =  1.124128569859216916690209918405860d0
+      rkTinvAinv(3,3) =  1.700644430961823796581896350418417d0
+
+      rkAinvT(1,1) = 1.543510591072668287198054583233180d0
+      rkAinvT(1,2) = -2.460228411937788329157493833295004d0
+      rkAinvT(1,3) = -.412906170450356277003910443520499d0
+      rkAinvT(2,1) = .209519643211838264029272585946993d0
+      rkAinvT(2,2) = 1.388545667194387164417459732995766d0
+      rkAinvT(2,3) = 1.20339553005832004974976023130002d0
+      rkAinvT(3,1) = 3.637834252744495732208418513577775d0
+      rkAinvT(3,2) = 2.681082873627752133895790743211112d0
+      rkAinvT(3,3) = -3.050430199247410569426377624787569d0
+
+  END SUBROUTINE Radau1A_Coefficients
+
+  
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  END SUBROUTINE RungeKuttaTLM ! and all its internal procedures
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE FUN_CHEM(T, V, FCT)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_Function, ONLY: Fun
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: V(NVAR), T
+    KPP_REAL, INTENT(INOUT) :: FCT(NVAR)
+    KPP_REAL :: Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+    CALL Fun(V, FIX, RCONST, FCT)
+    
+  END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  SUBROUTINE JAC_CHEM (T, V, JF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters
+    USE KPP_ROOT_Global
+    USE KPP_ROOT_JacobianSP
+    USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+    USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: V(NVAR), T 
+#ifdef FULL_ALGEBRA    
+    KPP_REAL, INTENT(INOUT) :: JF(NVAR,NVAR)
+    KPP_REAL :: JV(LU_NONZERO)
+    INTEGER       :: i, j 
+#else
+    KPP_REAL, INTENT(INOUT) :: JF(LU_NONZERO)
+#endif   
+
+    KPP_REAL :: Told
+
+    Told = TIME
+    TIME = T
+    CALL Update_SUN()
+    CALL Update_RCONST()
+    CALL Update_PHOTO()
+    TIME = Told
+    
+#ifdef FULL_ALGEBRA    
+    CALL Jac_SP(V, FIX, RCONST, JV)
+    DO j=1,NVAR
+      DO i=1,NVAR
+         JF(i,j) = 0.0d0
+      END DO
+    END DO
+    DO i=1,LU_NONZERO
+       JF(LU_IROW(i),LU_ICOL(i)) = JV(i)
+    END DO
+#else
+    CALL Jac_SP(V, FIX, RCONST, JF) 
+#endif   
+
+  END SUBROUTINE JAC_CHEM
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+END MODULE KPP_ROOT_Integrator
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.c	(revision 3477)
@@ -0,0 +1,1361 @@
+#define MAX(a,b) ( ((a) >= (b)) ?(a):(b)  )
+#define MIN(b,c) ( ((b) <  (c)) ?(b):(c)  )
+#define ABS(x)   ( ((x) >=  0 ) ?(x):(-x) )
+#define SQRT(d)  ( pow((d),0.5)  )
+#define SIGN(x,y)( ( (x*y) >= 0 ) ?(x):(-x) )/* Sign transfer function */
+#define MOD(A,B) (int)((A)%(B))
+
+/* ~~~> Numerical constants    */
+#define  ZERO     (KPP_REAL)0.0
+#define  ONE      (KPP_REAL)1.0
+
+/* ~~~>  Statistics on the work performed by the SDIRK method */
+#define  Nfun 1
+#define  Njac 2
+#define  Nstp 3
+#define  Nacc 4
+#define  Nrej 5
+#define  Ndec 6
+#define  Nsol 7
+#define  Nsng 8
+#define  Ntexit 1
+#define  Nhexit 2
+#define  Nhnew 3
+
+/*~~~>  SDIRK method coefficients, up to 5 stages    */
+#define Smax 5
+
+int S2A=1,
+	S2B=2,
+	S3A=3, 
+	S4A=4, 
+	S4B=5;
+
+int sdMethod, 
+	rkS;
+
+KPP_REAL rkGamma, 
+	rkA[Smax][Smax], 
+	rkB[Smax], 
+	rkELO, 
+	rkBhat[Smax],
+	rkC[Smax], 
+	rkD[Smax], 
+	rkE[Smax], 
+	rkTheta[Smax][Smax], 
+	rkAlpha[Smax][Smax];
+
+/*~~~> Function headers     */
+//void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//	int ISTATUS_U[], KPP_REAL RSTATUS_U[], int Ierr);
+void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT);
+int SDIRK(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+	KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[], int ICNTRL[], 
+	KPP_REAL RSTATUS[], int ISTATUS[]);
+int SDIRK_Integrator(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+	int Ierr, KPP_REAL Hstart, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Roundoff, 
+	KPP_REAL AbsTol[], KPP_REAL RelTol[], int ISTATUS[], KPP_REAL RSTATUS[],
+	int ITOL, int Max_no_steps, int StartNewton, KPP_REAL NewtonTol, 
+	KPP_REAL ThetaMin, KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax,
+	KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int NewtonMaxit);
+void SDIRK_ErrorScale(int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+	KPP_REAL Y[], KPP_REAL SCAL[]);
+KPP_REAL SDIRK_ErrorNorm(int N, KPP_REAL Y[], KPP_REAL SCAL[]);
+int SDIRK_ErrorMsg(int code, KPP_REAL T, KPP_REAL H, int Ierr);
+void SDIRK_PrepareMatrix(KPP_REAL H, KPP_REAL T, KPP_REAL Y[], KPP_REAL FJAC[], 
+	int SkipJac, int SkipLU, KPP_REAL E[], int IP[], int Reject, 
+	int ISING, int ISTATUS[]);
+void SDIRK_Solve(KPP_REAL H, int N, KPP_REAL E[], int IP[], int ISING, 
+	KPP_REAL RHS[], int ISTATUS[]);
+void Sdirk4a(void);
+void Sdirk4b(void);
+void Sdirk2a(void);
+void Sdirk2b(void);
+void Sdirk3a(void);
+void FUN_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL P[]);
+void JAC_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[]);
+void Fun(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+void Jac_SP(KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[]);
+void WAXPY(int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], int incY);
+void WSCAL(int N, KPP_REAL Alpha, KPP_REAL X[], int incX);
+KPP_REAL WLAMCH(char C);
+void WADD(int N, KPP_REAL Y[], KPP_REAL Z[], KPP_REAL TMP[]);
+void Set2Zero(int N, KPP_REAL Y[]);
+void KppSolve(KPP_REAL A[], KPP_REAL b[]);
+int KppDecomp(KPP_REAL A[]);
+void Update_SUN();
+void Update_RCONST();
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+//void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT, int ICNTRL_U[], KPP_REAL RCNTRL_U[],
+//		int ISTATUS_U[], KPP_REAL RSTATUS_U[], int Ierr_U)
+void INTEGRATE(KPP_REAL TIN, KPP_REAL TOUT)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+/* int Ntotal = 0; *//* Used for debug option below to print the number of steps */
+KPP_REAL RCNTRL[20], 
+	RSTATUS[20], 
+	T1, 
+	T2;
+	
+int ICNTRL[20], 
+	ISTATUS[20], 
+	Ierr;
+
+Ierr = 0;
+
+int i;
+for(i=0; i<20; i++) {
+	ICNTRL[i] = 0;
+	RCNTRL[i] = (KPP_REAL)0.0;
+	ISTATUS[i] = 0;
+	RSTATUS[i] = (KPP_REAL)0.0;
+} /* end for */
+
+/*~> fine-tune the integrator: */
+ICNTRL[1] = 0; /* 0 - vector tolerances, 1 - scalar tolerances */
+ICNTRL[5] = 0; /* starting values of N. iter.: interpolated 0), zero (1) */
+
+///* If optional parameters are given, and if they are >0, 
+//	then they overwrite default settings. */
+//if(ICNTRL_U != NULL) { /* Check to see if ICNTRL_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		if(ICNTRL_U[i] > 0) {
+//			ICNTRL[i] = ICNTRL_U[i];
+//		} /* end if */
+//	} /* end for */
+//} /* end if */
+//
+//if(RCNTRL_U != NULL) { /* Check to see if RCNTRL_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		if(RCNTRL_U[i] > 0) {
+//			RCNTRL[i] = RCNTRL_U[i];
+//		} /* end if */
+//	} /* end for */
+//} /* end if */
+
+
+T1 = TIN;
+T2 = TOUT;
+Ierr = SDIRK( NVAR, T1, T2, VAR, RTOL, ATOL, RCNTRL, ICNTRL, RSTATUS,
+	ISTATUS);
+
+
+/*~~~> Debug option: print number of steps
+   Ntotal += ISTATUS[Nstp]; */
+
+if(Ierr < 0) {
+	printf("SDIRK: Unsuccessful exit at T=%f(Ierr=%d)", TIN, Ierr);
+}
+
+///*if optional parameters are given for output they to return information */
+//if(ISTATUS_U != NULL) { /* Check to see if ISTATUS_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		ISTATUS_U[i] = ISTATUS[i];
+//	} /* end for */
+//} /* end if */
+//
+//if(RSTATUS_U != NULL) { /* Check to see if RSTATUS_U is not NULL */
+//	for(i=0; i<20; i++) {
+//		RSTATUS_U[i] = RSTATUS[i];
+//	} /* end for */
+//} /* end if */
+//
+//Ierr_U = Ierr;
+
+}
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[],
+	KPP_REAL RelTol[], KPP_REAL AbsTol[], KPP_REAL RCNTRL[],
+	int ICNTRL[], KPP_REAL RSTATUS[], int ISTATUS[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+    Runge-Kutta (SDIRK) method.
+
+    This implementation is based on the book and the code Sdirk4:
+
+    E. Hairer and G. Wanner
+    "Solving ODEs II. Stiff and differential-algebraic problems".
+    Springer series in computational mathematics, Springer-Verlag, 1996.
+    This code is based on the SDIRK4 routine in the above book.
+
+    Methods:
+        * Sdirk 2a, 2b: L-stable, 2 stages, order 2
+        * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant
+        * Sdirk 4a, 4b: L-stable, 5 stages, order 4
+
+    (C)  Adrian Sandu, July 2005
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    Revised by Philipp Miehe and Adrian Sandu, May 2006
+    Translation F90 to C by Paul Eller and Nicholas Hobbs, July 2006
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>  INPUT ARGUMENTS:
+
+   -     Y[NVAR]    = vector of initial conditions (at T=Tinitial)
+   -    [Tinitial,Tfinal]  = time range of integration
+        (if Tinitial>Tfinal the integration is performed backwards in time)
+   -    RelTol, AbsTol = user precribed accuracy
+   - SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+        returns Ydot = Y' = F(T,Y)
+   - SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+        returns Jcb = dF/dY
+   -    ICNTRL[1:20]    = integer inputs parameters
+   -    RCNTRL[1:20]    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>  OUTPUT ARGUMENTS:
+
+   -    Y[NVAR]         -> vector of final states (at T->Tfinal)
+   -    ISTATUS[1:20]   -> integer output parameters
+   -    RSTATUS[1:20]   -> real output parameters
+   -    Ierr            -> job status upon return
+                           success (positive value) or
+                           failure (negative value)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  INPUT PARAMETERS:
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+~~~>
+    ICNTRL[0] = not used
+    ICNTRL[1] = 0: AbsTol, RelTol are NVAR-dimensional vectors
+                                           = 1: AbsTol, RelTol are scalars
+    ICNTRL[2] = Method
+    ICNTRL[3]  -> maximum number of integration steps
+            For ICNTRL[3]=0 the default value of 100000 is used
+    ICNTRL[4]  -> maximum number of Newton iterations
+        For ICNTRL(4)=0 the default value of 8 is used
+    ICNTRL[5]  -> starting values of Newton iterations:
+    ICNTRL[5]=0 : starting values are interpolated (the default)
+    ICNTRL[5]=1 : starting values are zero
+
+~~~>  Real parameters
+
+    RCNTRL[0]  -> Hmin, lower bound for the integration step size
+                  It is strongly recommended to keep Hmin = ZERO
+    RCNTRL[1]  -> Hmax, upper bound for the integration step size
+    RCNTRL[2]  -> Hstart, starting value for the integration step size
+    RCNTRL[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+    RCNTRL[4]  -> FacMax, upper bound on step increase factor (default=6)
+    RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+                  (default=0.1)
+    RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+                  than the predicted value  (default=0.9)
+    RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+                  than ThetaMin the Jacobian is not recomputed;
+                  (default=0.001)
+    RCNTRL[8]  -> NewtonTol, stopping criterion for Newton's method
+                  (default=0.03)
+    RCNTRL[9]  -> Qmin
+    RCNTRL[10] -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+                  step size is kept constant and the LU factorization
+                  reused (default Qmin=1, Qmax=1.2)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  OUTPUT PARAMETERS:
+   Note: each call to Rosenbrock adds the current no. of fcn calls
+   to previous value of ISTATUS(1), and similar for the other params.
+   Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+  ISTATUS[0] = No. of function calls
+  ISTATUS[1] = No. of jacobian calls
+  ISTATUS[2] = No. of steps
+  ISTATUS[3] = No. of accepted steps
+  ISTATUS[4] = No. of rejected steps (except at the beginning)
+  ISTATUS[5] = No. of LU decompositions
+  ISTATUS[6] = No. of forward/backward substitutions
+  ISTATUS[7] = No. of singular matrix decompositions
+  RSTATUS[0]  -> Texit, the time corresponding to the computed Y upon return
+  RSTATUS[1]  -> Hexit,last accepted step before return
+  RSTATUS[2]  -> Hnew, last predicted step before return
+  For multiple restarts, use Hnew as Hstart in the following run
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{ 
+
+int Max_no_steps=0;
+
+/*~~~> Local variables      */
+int StartNewton;
+
+KPP_REAL  Hmin=0,
+	Hmax=0,
+	Hstart=0,
+	Roundoff,
+	FacMin=0,
+	FacMax=0,
+	FacSafe=0,
+	FacRej=0,
+	ThetaMin,
+	NewtonTol,
+	Qmin,
+	Qmax;
+
+int ITOL,
+	NewtonMaxit,
+	i,
+	Ierr = 0;
+
+/*~~~>  For Scalar tolerances (ICNTRL[1] !=0 )  the code uses AbsTol[1] and RelTol[1)
+    For Vector tolerances (ICNTRL[1] == 0) the code uses AbsTol[1:NVAR] and RelTol[1:NVAR] */
+if (ICNTRL[1]==0){
+	ITOL = 1;
+}
+else {
+	ITOL = 0;
+}  /* end if */
+
+/*~~~> ICNTRL[3] - method selection   */
+
+switch (ICNTRL[2]) {
+
+case 0: Sdirk2a();
+	break;
+
+case 1: Sdirk2a();
+	break;
+
+case 2: Sdirk2b();
+	break;
+
+case 3: Sdirk3a();
+	break;
+
+case 4: Sdirk4a();
+	break;
+
+case 5: Sdirk4b();
+	break;
+
+default: Sdirk2a();
+
+} /* end switch */
+
+/*~~~>   The maximum number of time steps admitted   */
+if (ICNTRL[3] == 0) {
+	Max_no_steps = 200000;
+}
+else if (ICNTRL[3] > 0) {
+	Max_no_steps = ICNTRL[3];
+}
+else {
+	printf("User-selected ICNTRL(4)=%d", ICNTRL[3]);
+	SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr);
+} /*end if */
+
+/*~~~>The maximum number of Newton iterations admitted */
+if(ICNTRL[4]==0) {
+	NewtonMaxit = 8;
+}
+else {
+	NewtonMaxit=ICNTRL[4];
+	if(NewtonMaxit <=0) {
+		printf("User-selected ICNTRL(5)=%d", ICNTRL[4] );
+		SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr);
+	}
+}
+
+/*~~~> StartNewton: Extrapolate for starting values of Newton iterations */
+if (ICNTRL[5] == 0) {
+	StartNewton = 1;
+}
+else {
+	StartNewton = 0;
+} /* end if */
+
+/*~~~>  Unit roundoff (1+Roundoff>1) */
+Roundoff = WLAMCH('E');
+
+/*~~~>  Lower bound on the step size: (positive value) */
+if (RCNTRL[0] == ZERO) {
+	Hmin = ZERO;
+}
+else if (RCNTRL[0] > ZERO) {
+	Hmin = RCNTRL[0];
+}
+else {
+	printf("User-selected RCNTRL[0]=%f", RCNTRL[0]);
+	SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>  Upper bound on the step size: (positive value) */
+if (RCNTRL[1] == ZERO) {
+	Hmax = ABS(Tfinal-Tinitial);
+}
+else if (RCNTRL[1] > ZERO) {
+	Hmax = MIN( ABS(RCNTRL[1]), ABS(Tfinal-Tinitial) );
+}
+else {
+	printf("User-selected RCNTRL[1]=%f", RCNTRL[1]);
+	SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>  Starting step size: (positive value) */
+if (RCNTRL[2] == ZERO) {
+	Hstart = MAX( Hmin, Roundoff);
+}
+else if (RCNTRL[2] > ZERO) {
+	Hstart = MIN( ABS(RCNTRL[2]), ABS(Tfinal-Tinitial) );
+}
+else {
+	printf("User-selected Hstart: RCNTRL[2]=%f", RCNTRL[2]);
+	SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax */
+if (RCNTRL[3] == ZERO) {
+	FacMin = (KPP_REAL)0.2;
+}
+else if (RCNTRL[3] > ZERO) {
+	FacMin = RCNTRL[3];
+}
+else {
+	printf("User-selected FacMin: RCNTRL[3]=%f", RCNTRL[3]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /* end if */
+
+if (RCNTRL[4] == ZERO) {
+	FacMax = (KPP_REAL)10.0;
+}
+else if (RCNTRL[4] > ZERO) {
+	FacMax = RCNTRL[4];
+}
+else {
+	printf("User-selected FacMax: RCNTRL[4]=%f", RCNTRL[4]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+if (RCNTRL[5] == ZERO) {
+	FacRej = (KPP_REAL)0.1;
+}
+else if (RCNTRL[5] > ZERO) {
+	FacRej = RCNTRL[5];
+}
+else {
+	printf("User-selected FacRej: RCNTRL[5]=%f", RCNTRL[5]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /*end if */
+
+/* ~~~>   FacSafe: Safety Factor in the computation of new step size  */
+if (RCNTRL[6] == ZERO) {
+	FacSafe = (KPP_REAL)0.9;
+}
+else if (RCNTRL[6] > ZERO) {
+	FacSafe = RCNTRL[6];
+}
+else {
+	printf("User-selected FacSafe: RCNTRL[6]=%f", RCNTRL[6]);
+	SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr);
+} /* end if */
+
+/*~~~> ThetaMin: decides whether the Jacobian should be recomputed */
+if (RCNTRL[7] == ZERO) {
+	ThetaMin = (KPP_REAL)1.0e-03;
+}
+else {
+	ThetaMin = RCNTRL[7];
+} /* end if */
+
+/*~~~> Stopping criterion for Newton's method */
+if (RCNTRL[8] == ZERO) {
+	NewtonTol = (KPP_REAL)3.0e-02;
+}
+else {
+	NewtonTol = RCNTRL[8];
+} /* end if */
+
+/* ~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST. */
+if (RCNTRL[9] == ZERO) {
+	Qmin = ONE;
+}
+else {
+	Qmin = RCNTRL[9];
+} /* end if */
+
+if (RCNTRL[10] == ZERO) {
+	Qmax = (KPP_REAL)1.2;
+}
+else {
+	Qmax = RCNTRL [10];
+} /* end if */
+
+/* ~~~>  Check if tolerances are reasonable */
+if (ITOL == 0) {
+	if ((AbsTol[0]<=ZERO || RelTol[0])<=(((KPP_REAL)10.0)*Roundoff)) {
+		SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr);
+	} /* end internal if */
+}
+else {
+	for (i = 0; i < N; i++) {
+		if((AbsTol[i]<=ZERO)||(RelTol[i]<=((KPP_REAL)10.0)*Roundoff)){
+			SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr);
+		} /* end internal if */
+	} /* end for */
+} /* end if */
+
+if (Ierr < 0) {
+	return Ierr;
+} /*end if */
+
+Ierr = SDIRK_Integrator(N, Tinitial, Tfinal, Y, Ierr, Hstart, Hmin, Hmax,
+	Roundoff, AbsTol, RelTol, ISTATUS, RSTATUS, ITOL, Max_no_steps,
+	StartNewton, NewtonTol, ThetaMin, FacSafe, FacMin, FacMax, FacRej,
+	Qmin, Qmax, NewtonMaxit);
+
+return Ierr;
+
+}  /* end of main SDIRK function */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_Integrator(int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+	int Ierr, KPP_REAL Hstart, KPP_REAL Hmin, KPP_REAL Hmax, KPP_REAL Roundoff,
+	KPP_REAL AbsTol[], KPP_REAL RelTol[], int ISTATUS[], KPP_REAL RSTATUS[],
+	int ITOL, int Max_no_steps, int StartNewton, KPP_REAL NewtonTol,
+	KPP_REAL ThetaMin, KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax,
+	KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int NewtonMaxit)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+/*~~~> Local variables:    */
+KPP_REAL Z[Smax][NVAR],
+	G[NVAR],
+	TMP[NVAR],
+	NewtonRate,
+	SCAL[NVAR],
+	RHS[NVAR],
+	T,
+	H,
+	Theta=0,
+	Hratio,
+	NewtonPredictedErr,
+	Qnewton,
+	Err=0,
+	Fac,
+	Hnew,
+	Tdirection,
+	NewtonIncrement=0,
+	NewtonIncrementOld=0;
+
+int IER=0,
+	istage,
+	NewtonIter,
+	IP[NVAR],
+	Reject,
+	FirstStep,
+	SkipJac,
+	SkipLU,
+	NewtonDone,
+	CycleTloop,
+	i,
+	j;
+
+#ifdef FULL_ALGEBRA
+	KPP_REAL FJAC[NVAR][NVAR];
+	KPP_REAL E[NVAR][NVAR];
+#else
+	KPP_REAL FJAC[LU_NONZERO];
+	KPP_REAL E[LU_NONZERO];
+#endif
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~~>   Initializations              */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+T = Tinitial;
+Tdirection = SIGN(ONE, Tfinal-Tinitial);
+H = MAX(ABS(Hmin), ABS(Hstart));
+
+if(ABS(H) <= ((KPP_REAL)10.0 * Roundoff)) {
+	H = (KPP_REAL)(1.0e-06);
+} /* end if */
+
+H = MIN(ABS(H), Hmax);
+H = SIGN(H, Tdirection);
+SkipLU = 0;
+SkipJac = 0;
+Reject = 0;
+FirstStep = 1;
+CycleTloop = 0;
+
+SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Time loop begins                */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+while((Tfinal-T)*Tdirection - Roundoff > ZERO) {  /* Tloop */
+
+/*~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition */
+	if(SkipLU == 0) { /* This time around skip the Jac update and LU */
+		SDIRK_PrepareMatrix(H, T, Y, FJAC, SkipJac, SkipLU, E, IP, 
+			Reject, IER, ISTATUS);
+		if(IER != 0) {
+			SDIRK_ErrorMsg(-8, T, H, Ierr);
+		return Ierr;
+		} /* end if */
+	} /* end if */
+
+	if(ISTATUS[Nstp] > Max_no_steps) {
+		SDIRK_ErrorMsg(-6, T, H, Ierr);
+		return Ierr;
+	} /* end if */
+
+	if((T + ((KPP_REAL)0.1) * H == T) || (ABS(H) <= Roundoff)) {
+		SDIRK_ErrorMsg(-7, T, H, Ierr);
+		return Ierr;
+	} /* end if */
+
+/*stages*/ for(istage=0; istage < rkS; istage++) {
+		/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+		/*~~~>  Simplified Newton iterations          */
+		/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+		/*~~~>  Starting values for Newton iterations */
+		Set2Zero(N, &Z[istage][0]);
+
+	/*~~~>   Prepare the loop-independent part of the right-hand side */
+		Set2Zero(N, G);
+			if(istage > 0) {
+				for(j=0; j < istage; j++) {
+         				 WAXPY(N, rkTheta[j][istage], 
+						&Z[j][0], 1, G, 1);
+					if(StartNewton == 1) {
+						WAXPY(N, rkAlpha[j][istage],
+							&Z[j][0], 1, 
+							&Z[istage][0], 1);
+					} /* end if */
+				} /* end for */
+			} /* end if */
+
+	/*~~~>  Initializations for Newton iteration */
+		NewtonDone = 0; /* false */
+		Fac = (KPP_REAL)0.5; /* Step reduction factor */
+
+/*NewtonLoop*/	for(NewtonIter=0; NewtonIter<NewtonMaxit; NewtonIter++ ) {
+
+        /*~~~>  Prepare the loop-dependent part of the right-hand side */
+			WADD(N, Y, &Z[istage][0], TMP);
+			FUN_CHEM(T+rkC[istage]*H, TMP, RHS);
+			ISTATUS[Nfun]++;
+			WSCAL(N, H*rkGamma, RHS, 1);
+			WAXPY(N, -ONE, &Z[istage][0], 1, RHS, 1);
+			WAXPY(N, ONE, G, 1, RHS, 1 );
+
+	        /*~~~>   Solve the linear system  */
+			SDIRK_Solve(H, N, E, IP, IER, RHS, ISTATUS);
+
+		/*~~~>   Check convergence of Newton iterations */
+			NewtonIncrement = SDIRK_ErrorNorm(N, RHS, SCAL);
+
+			if(NewtonIter == 0) {
+				Theta = ABS(ThetaMin);
+				NewtonRate = (KPP_REAL)2.0;
+			}
+			else {
+				Theta = NewtonIncrement/NewtonIncrementOld;
+
+				if(Theta < (KPP_REAL)0.99) {
+					NewtonRate = Theta/(ONE-Theta);
+			/* Predict error at the end of Newton process */
+					NewtonPredictedErr = 	
+						(NewtonIncrement*pow(Theta,
+						(NewtonMaxit - (NewtonIter +
+						1)) / (ONE - Theta)));
+					if(NewtonPredictedErr >= NewtonTol) {
+		              /* Non-convergence of Newton: 
+				predicted error too large*/
+						Qnewton = MIN((KPP_REAL)10.0,
+							NewtonPredictedErr/
+							NewtonTol);
+						Fac = (KPP_REAL)0.8 * pow
+							(Qnewton, (-ONE / (1
+							+ NewtonMaxit -
+							NewtonIter + 1)));
+						break;
+					} /* end internal if */
+				}
+				else  /* Non-convergence of Newton: 
+					Theta too large */ {
+					break;
+				} /* end internal if else */
+			} /* end if else */
+
+			NewtonIncrementOld = NewtonIncrement;
+
+		/* Update solution: Z(:) <-- Z(:)+RHS(:) */
+			WAXPY(N, ONE, RHS, 1, &Z[istage][0], 1);
+
+		/* Check error in Newton iterations */
+			NewtonDone=(NewtonRate*NewtonIncrement<=NewtonTol);
+
+		        if(NewtonDone == 1) {
+				break;
+			}
+		} /* end NewtonLoop for */
+
+		if(NewtonDone == 0) {
+		/* CALL RK_ErrorMsg(-12,T,H,Ierr); */
+			H = Fac*H;
+			Reject = 1; /* true */
+			SkipJac = 1;/* true */
+			SkipLU = 0;/* false */
+			CycleTloop = 1; /* cycle Tloop */
+		} /* end if */
+
+		if(CycleTloop == 1) {
+			CycleTloop=0;
+			break;
+		}
+	} /* end stages for */
+
+	if(CycleTloop==0) {
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Error estimation      */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+	ISTATUS[Nstp]++;
+	Set2Zero(N, TMP);
+
+	for(i=0; i<rkS; i++) {
+		if(rkE[i] != ZERO) {
+			WAXPY(N, rkE[i], &Z[i][0], 1, TMP, 1);
+		} /* end if */
+	} /* end for */
+
+	SDIRK_Solve(H, N, E, IP, IER, TMP, ISTATUS);
+	Err = SDIRK_ErrorNorm(N, TMP, SCAL);
+
+/*~~~~> Computation of new step size Hnew */
+	Fac = FacSafe * pow((Err), (-ONE/rkELO));
+	Fac = MAX(FacMin, MIN(FacMax, Fac));
+	Hnew = H*Fac;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Accept/Reject step    */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+	if(Err < ONE) { /*~~~> Step is accepted */
+		FirstStep = 0; /* false */
+		ISTATUS[Nacc]++;
+
+	/*~~~> Update time and solution */
+		T = T + H;
+
+        /* Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:) */
+		for(i=0; i<rkS; i++) {
+			if(rkD[i] != ZERO) {
+				WAXPY(N, rkD[i], &Z[i][0], 1, Y, 1);
+			} /* end if */
+		} /* end for */
+
+	/*~~~> Update scaling coefficients */
+		SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+	/*~~~> Next time step */
+		Hnew = Tdirection*MIN(ABS(Hnew), Hmax);
+
+	/* Last T and H */
+		RSTATUS[Ntexit] = T;
+		RSTATUS[Nhexit] = H;
+		RSTATUS[Nhnew] = Hnew;
+
+	/* No step increase after a rejection */
+		if(Reject==1) {
+			Hnew = Tdirection*MIN(ABS(Hnew), ABS(H));
+		} /* end if */
+
+		Reject = 0; /* false */
+
+		if((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) {
+			H = Tfinal-T;
+		}
+		else {
+			Hratio = Hnew/H;
+		/* If step not changed too much keep Jacobian and reuse LU */
+			SkipLU = ((Theta <= ThetaMin) && (Hratio >= Qmin) && 
+				(Hratio <= Qmax));
+
+			if(SkipLU==0) {
+				H = Hnew;
+			} /* end internal if */
+		} /* end if else */
+
+		SkipJac = (Theta <= ThetaMin);
+		SkipJac = 0; /* false */
+		}
+		else { /*~~~> Step is rejected */
+			if((FirstStep==1) || (Reject==1)) {
+				H = FacRej * H;
+			}
+			else {
+				H = Hnew;
+			} /* end internal if */
+
+			Reject = 1;
+			SkipJac = 1;
+			SkipLU = 0;
+
+			if(ISTATUS[Nacc] >=1) {
+				ISTATUS[Nrej]++;
+			} /* end if */
+		} /* end if else */
+	} /* end CycleTloop if */
+} /* end Tloop */
+
+/* Successful return */
+Ierr = 1;
+return Ierr;
+
+} /* end SDIRK_Integrator */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_ErrorScale(int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+			KPP_REAL Y[],KPP_REAL SCAL[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+int i;
+if (ITOL == 0){
+	for (i = 0; i < NVAR; i++){
+		SCAL[i] = ONE / (AbsTol[0]+RelTol[0]*ABS(Y[i]) );
+	} /* end for */
+}
+else {
+	for (i = 0; i < NVAR; i++){
+		SCAL[i] = ONE / (AbsTol[i]+RelTol[i]*ABS(Y[i]) );
+	} /*  end for  */
+} /*  end if  */
+
+} /*  end SDIRK_ErrorScale  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL SDIRK_ErrorNorm(int N, KPP_REAL Y[], KPP_REAL SCAL[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+int i;
+KPP_REAL Err = ZERO;
+
+for (i = 0; i < N; i++) {
+	Err = Err + pow( (Y[i]*SCAL[i]), 2);
+} /* end for */
+
+Err = MAX( SQRT(Err/(KPP_REAL)N), (KPP_REAL)1.0e-10);
+
+return Err;
+
+} /*  end SDIRK_ErrorNorm  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_ErrorMsg(int code, KPP_REAL T, KPP_REAL H, int Ierr)
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *    Handles all error messages
+ *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+{
+
+Ierr = code;
+
+printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
+printf("\nForced exit from Sdirk due to the following error:\n");
+
+switch (code) {
+
+case -1:
+	printf("--> Improper value for maximal no of steps");
+	break;
+case -2:
+	printf("--> Selected Rosenbrock method not implemented");
+	break;
+case -3:
+	printf("--> Hmin/Hmax/Hstart must be positive");
+	break;
+case -4:
+	printf("--> FacMin/FacMax/FacRej must be positive");
+	break;
+case -5:
+	printf("--> Improper tolerance values");
+	break;
+case -6:
+	printf("--> No of steps exceeds maximum bound");
+	break;
+case -7:
+	printf("--> Step size too small (T + H/10 = T) or H < Roundoff");
+	break;
+case -8:
+	printf("--> Matrix is repeatedly singular");
+	break;
+default: /* causing an error */
+	printf("Unknown Error code: %d", code);
+
+} /*  end switch   */
+
+printf("\n   Time = %f and H = %f", T, H );
+printf("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
+
+return code;
+
+} /*  end SDIRK_ErrorMsg   */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_PrepareMatrix(KPP_REAL H, KPP_REAL T, KPP_REAL Y[], KPP_REAL FJAC[],
+			int SkipJac, int SkipLU, KPP_REAL E[], int IP[], 
+			int Reject, int ISING, int ISTATUS[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+ *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL HGammaInv;
+int i, j;
+int ConsecutiveSng = 0;
+ISING = 1;
+
+
+while( ISING != 0) {
+	HGammaInv = ONE/(H*rkGamma);
+
+/*~~~>  Compute the Jacobian */
+	if(SkipJac==0) {
+		JAC_CHEM(T,Y,FJAC);
+		ISTATUS[Njac]++;
+	} /* end if */
+
+	#ifdef FULL_ALGEBRA
+		for(j=0; j<NVAR; j++) {
+			for(i=0; i<NVAR; i++) {
+				E[j][i] = -FJAC[j][i];
+			} /* end for */
+
+			E[j][j] = E[j][j] + HGammaInv;
+		} /* end for */
+
+		DGETRF(NVAR, NVAR, E, NVAR, IP, ISING);
+	#else
+		for(i=0; i<LU_NONZERO; i++) {
+			E[i] = -FJAC[i];
+		} /* end for */
+
+		for(i=0; i<NVAR; i++) {
+			j = LU_DIAG[i];
+			E[j]=E[j] + HGammaInv;
+		} /* end for */
+
+		ISING = KppDecomp(E);
+		IP[0] = 1;
+	#endif
+
+	ISTATUS[Ndec]++;
+
+	if(ISING != 0) {
+		ISTATUS[Nsng]++;
+		ConsecutiveSng++;
+
+		if(ConsecutiveSng >= 6) {
+			return; /* Failure */
+		} /* end internal if */
+
+		H = (KPP_REAL)(0.5) * H;
+		SkipJac = 1; /* true */
+		SkipLU = 0; /* false */
+		Reject = 1; /* true */
+	} /* end if */
+} /* end while */
+
+} /* end SDIRK_PrepareMatrix */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Solve( KPP_REAL H, int N, KPP_REAL E[], int IP[], int ISING, 
+		KPP_REAL RHS[], int ISTATUS[] )
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *  Solves the system (H*Gamma-Jac)*x = RHS
+ *      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+ *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL HGammaInv = ONE/(H * rkGamma);
+
+WSCAL(N, HGammaInv, RHS, 1);
+
+#ifdef FULL_ALGEBRA
+	DGETRS('N', N, 1, E, N, IP, RHS, N, ISING);
+#else
+	KppSolve(E, RHS);
+#endif
+	ISTATUS[Nsol]++;
+
+} /* end SDIRK_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S4A;
+
+/* Number of stages */
+rkS = 5;
+
+/* Method Coefficients */
+rkGamma = (KPP_REAL)0.2666666666666666666666666666666667;
+
+rkA[0][0] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][1] = (KPP_REAL)0.5000000000000000000000000000000000;
+rkA[1][1] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][2] = (KPP_REAL)0.3541539528432732316227461858529820;
+rkA[1][2] = (KPP_REAL)(-0.5415395284327323162274618585298197e-01);
+rkA[2][2] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][3] = (KPP_REAL)0.8515494131138652076337791881433756e-01;
+rkA[1][3] = (KPP_REAL)(-0.6484332287891555171683963466229754e-01);
+rkA[2][3] = (KPP_REAL)0.7915325296404206392428857585141242e-01;
+rkA[3][3] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkA[0][4] = (KPP_REAL)2.100115700566932777970612055999074;
+rkA[1][4] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+rkA[2][4] = (KPP_REAL)2.399816361080026398094746205273880;
+rkA[3][4] = (KPP_REAL)(-2.998818699869028161397714709433394);
+rkA[4][4] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkB[0] = (KPP_REAL)2.100115700566932777970612055999074;
+rkB[1] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+rkB[2] = (KPP_REAL)2.399816361080026398094746205273880;
+rkB[3] = (KPP_REAL)(-2.998818699869028161397714709433394);
+rkB[4] = (KPP_REAL)0.2666666666666666666666666666666667;
+
+rkBhat[0] = (KPP_REAL)2.885264204387193942183851612883390;
+rkBhat[1] = (KPP_REAL)(-0.1458793482962771337341223443218041);
+rkBhat[2] = (KPP_REAL)2.390008682465139866479830743628554;
+rkBhat[3] = (KPP_REAL)(-4.129393538556056674929560012190140);
+rkBhat[4] = ZERO;
+
+rkC[0] = (KPP_REAL)0.2666666666666666666666666666666667;
+rkC[1] = (KPP_REAL)0.7666666666666666666666666666666667;
+rkC[2] = (KPP_REAL)0.5666666666666666666666666666666667;
+rkC[3] = (KPP_REAL)0.3661315380631796996374935266701191;
+rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+rkD[0] = ZERO;
+rkD[1] = ZERO;
+rkD[2] = ZERO;
+rkD[3] = ZERO;
+rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+rkE[0] = (KPP_REAL)(-0.6804000050475287124787034884002302);
+rkE[1] = (KPP_REAL)(1.558961944525217193393931795738823);
+rkE[2] = (KPP_REAL)(-13.55893003128907927748632408763868);
+rkE[3] = (KPP_REAL)(15.48522576958521253098585004571302);
+rkE[4] = ONE;
+
+/* Local order of Err estimate */
+rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+rkTheta[0][1] = (KPP_REAL)1.875000000000000000000000000000000;
+rkTheta[0][2] = (KPP_REAL)1.708847304091539528432732316227462;
+rkTheta[1][2] = (KPP_REAL)(-0.2030773231622746185852981969486824);
+rkTheta[0][3] = (KPP_REAL)0.2680325578937783958847157206823118;
+rkTheta[1][3] = (KPP_REAL)(-0.1828840955527181631794050728644549);
+rkTheta[2][3] = (KPP_REAL)0.2968246986151577397160821594427966;
+rkTheta[0][4] = (KPP_REAL)0.9096171815241460655379433581446771;
+rkTheta[1][4] = (KPP_REAL)(-3.108254967778352416114774430509465);
+rkTheta[2][4] = (KPP_REAL)12.33727431701306195581826123274001;
+rkTheta[3][4] = (KPP_REAL)(-11.24557012450885560524143016037523);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+rkAlpha[0][1] = (KPP_REAL)2.875000000000000000000000000000000;
+rkAlpha[0][2] = (KPP_REAL)0.8500000000000000000000000000000000;
+rkAlpha[1][2] = (KPP_REAL)0.4434782608695652173913043478260870;
+rkAlpha[0][3] = (KPP_REAL)0.7352046091658870564637910527807370;
+rkAlpha[1][3] = (KPP_REAL)(-0.9525565003057343527941920657462074e-01);
+rkAlpha[2][3] = (KPP_REAL)0.4290111305453813852259481840631738;
+rkAlpha[0][4] = (KPP_REAL)(-16.10898993405067684831655675112808);
+rkAlpha[1][4] = (KPP_REAL)6.559571569643355712998131800797873;
+rkAlpha[2][4] = (KPP_REAL)(-15.90772144271326504260996815012482);
+rkAlpha[3][4] = (KPP_REAL)25.34908987169226073668861694892683;
+
+rkELO = (KPP_REAL)4.0;
+
+} /* end Sdirk4a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4b()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S4B;
+
+/* Number of stages */
+rkS = 5;
+
+/* Method coefficients */
+rkGamma = (KPP_REAL)0.25;
+
+rkA[0][0] = (KPP_REAL)0.25;
+rkA[0][1] = (KPP_REAL)0.5;
+rkA[1][1] = (KPP_REAL)0.25;
+rkA[0][2] = (KPP_REAL)0.34;
+rkA[1][2] = (KPP_REAL)(-0.40e-01);
+rkA[2][2] = (KPP_REAL)0.25;
+rkA[0][3] = (KPP_REAL)0.2727941176470588235294117647058824;
+rkA[1][3] = (KPP_REAL)(-0.5036764705882352941176470588235294e-01);
+rkA[2][3] = (KPP_REAL)0.2757352941176470588235294117647059e-01;
+rkA[3][3] = (KPP_REAL)0.25;
+rkA[0][4] = (KPP_REAL)1.041666666666666666666666666666667;
+rkA[1][4] = (KPP_REAL)(-1.020833333333333333333333333333333);
+rkA[2][4] = (KPP_REAL)7.812500000000000000000000000000000;
+rkA[3][4] = (KPP_REAL)(-7.083333333333333333333333333333333);
+rkA[4][4] = (KPP_REAL)0.25;
+
+rkB[0] = (KPP_REAL)1.041666666666666666666666666666667;
+rkB[1] = (KPP_REAL)(-1.020833333333333333333333333333333);
+rkB[2] = (KPP_REAL)7.812500000000000000000000000000000;
+rkB[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+rkB[4] = (KPP_REAL)0.250000000000000000000000000000000;
+
+rkBhat[0] = (KPP_REAL)1.069791666666666666666666666666667;
+rkBhat[1] = (KPP_REAL)(-0.894270833333333333333333333333333);
+rkBhat[2] = (KPP_REAL)7.695312500000000000000000000000000;
+rkBhat[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+rkBhat[4] = (KPP_REAL)0.212500000000000000000000000000000;
+
+rkC[0] = (KPP_REAL)0.25;
+rkC[1] = (KPP_REAL)0.75;
+rkC[2] = (KPP_REAL)0.55;
+rkC[3] = (KPP_REAL)0.5;
+rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+rkD[0] = ZERO;
+rkD[1] = ZERO;
+rkD[2] = ZERO;
+rkD[3] = ZERO;
+rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+rkE[0] = (KPP_REAL)0.5750;
+rkE[1] = (KPP_REAL)0.2125;
+rkE[2] = (KPP_REAL)(-4.6875);
+rkE[3] = (KPP_REAL)4.2500;
+rkE[4] = (KPP_REAL)0.1500;
+
+/* Local order of Err estimate */
+rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+rkTheta[0][1] = (KPP_REAL)2.0;
+rkTheta[0][2] = (KPP_REAL)1.680000000000000000000000000000000;
+rkTheta[1][2] = (KPP_REAL)(-0.1600000000000000000000000000000000);
+rkTheta[0][3] = (KPP_REAL)1.308823529411764705882352941176471;
+rkTheta[1][3] = (KPP_REAL)(-0.1838235294117647058823529411764706);
+rkTheta[2][3] = (KPP_REAL)0.1102941176470588235294117647058824;
+rkTheta[0][4] = (KPP_REAL)(-3.083333333333333333333333333333333);
+rkTheta[1][4] = (KPP_REAL)(-4.291666666666666666666666666666667);
+rkTheta[2][4] = (KPP_REAL)34.37500000000000000000000000000000;
+rkTheta[3][4] = (KPP_REAL)(-28.3333333333333333333333333333);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+rkAlpha[0][1] = (KPP_REAL)3.0;
+rkAlpha[0][2] = (KPP_REAL)0.8800000000000000000000000000000000;
+rkAlpha[1][2] = (KPP_REAL)0.4400000000000000000000000000000000;
+rkAlpha[0][3] = (KPP_REAL)0.1666666666666666666666666666666667;
+rkAlpha[1][3] = (KPP_REAL)(-0.8333333333333333333333333333333333e-01);
+rkAlpha[2][3] = (KPP_REAL)0.9469696969696969696969696969696970;
+rkAlpha[0][4] = (KPP_REAL)(-6.0);
+rkAlpha[1][4] = (KPP_REAL)9.0;
+rkAlpha[2][4] = (KPP_REAL)(-56.81818181818181818181818181818182);
+rkAlpha[3][4] = (KPP_REAL)54.0;
+
+} /* end Sdirk4b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S2A;
+
+/* ~~~> Number of stages    */
+rkS = 2;
+
+/* ~~~> Method coefficients    */
+rkGamma = (KPP_REAL)0.2928932188134524755991556378951510;
+rkA[0][0] = (KPP_REAL)0.2928932188134524755991556378951510;
+rkA[0][1] = (KPP_REAL)0.7071067811865475244008443621048490;
+rkA[1][1] = (KPP_REAL)0.2928932188134524755991556378951510;
+rkB[0] = (KPP_REAL)0.7071067811865475244008443621048490;
+rkB[1] = (KPP_REAL)0.2928932188134524755991556378951510;
+rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+rkC[0] = (KPP_REAL)0.292893218813452475599155637895151;
+rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD[0] = ZERO;
+rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE[0] = (KPP_REAL)0.4714045207910316829338962414032326;
+rkE[1] = (KPP_REAL)(-0.1380711874576983496005629080698993);
+
+/* ~~~> Local order of Err estimate    */
+rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta[0][1] = (KPP_REAL)2.414213562373095048801688724209698;
+
+/* ~~~> Starting value for Newton iterations */
+rkAlpha[0][1] = (KPP_REAL)3.414213562373095048801688724209698;
+
+} /* end Sdirk2a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2b()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S2B;
+
+/* ~~~> Number of stages    */
+rkS      = 2;
+
+/* ~~~> Method coefficients    */
+rkGamma = (KPP_REAL)1.707106781186547524400844362104849;
+rkA[0][0] = (KPP_REAL)1.707106781186547524400844362104849;
+rkA[0][1] = (KPP_REAL)(-0.707106781186547524400844362104849);
+rkA[1][1] = (KPP_REAL)1.707106781186547524400844362104849;
+rkB[0] = (KPP_REAL)(-0.707106781186547524400844362104849);
+rkB[1] = (KPP_REAL)1.707106781186547524400844362104849;
+rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+rkC[0] = (KPP_REAL)1.707106781186547524400844362104849;
+rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD[0] = ZERO;
+rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE[0] = (KPP_REAL)(-0.4714045207910316829338962414032326);
+rkE[1] = (KPP_REAL)0.8047378541243650162672295747365659;
+
+/* ~~~> Local order of Err estimate    */
+rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta[0][1] = (KPP_REAL)(-0.414213562373095048801688724209698);
+
+/* ~~~> Starting value for Newton iterations */
+rkAlpha[0][1] = (KPP_REAL)0.5857864376269049511983112757903019;
+
+} /* end Sdirk2b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk3a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+sdMethod = S3A;
+
+/* ~~~> Number of stages    */
+rkS = 3;
+
+/* ~~~> Method coefficients    */
+rkGamma = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[0][0] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[0][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[1][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[0][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkA[1][2] = (KPP_REAL)0.5773502691896257645091487805019573;
+rkA[2][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkB[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkB[1] = (KPP_REAL)0.5773502691896257645091487805019573;
+rkB[2] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkBhat[0]= (KPP_REAL)0.2113248654051871177454256097490213;
+rkBhat[1]= (KPP_REAL)0.6477918909913548037576239837516312;
+rkBhat[2]= (KPP_REAL)0.1408832436034580784969504064993475;
+rkC[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+rkC[1] = (KPP_REAL)0.4226497308103742354908512194980427;
+rkC[2] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD[0] = ZERO;
+rkD[1] = ZERO;
+rkD[2] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE[0] = (KPP_REAL)0.9106836025229590978424821138352906;
+rkE[1] = (KPP_REAL)(-1.244016935856292431175815447168624);
+rkE[2] = (KPP_REAL)0.3333333333333333333333333333333333;
+
+/* ~~~> Local order of Err estimate    */
+rkELO    = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta[0][1] =  ONE;
+rkTheta[0][2] = (KPP_REAL)(-1.732050807568877293527446341505872);
+rkTheta[1][2] = (KPP_REAL)2.732050807568877293527446341505872;
+
+/* ~~~> Starting value for Newton iterations */
+rkAlpha[0][1] = (KPP_REAL)2.0;
+rkAlpha[0][2] = (KPP_REAL)(-12.92820323027550917410978536602349);
+rkAlpha[1][2] = (KPP_REAL)8.83012701892219323381861585376468;
+
+} /* end Sdirk3a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FUN_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL P[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL Told;
+
+Told = TIME;
+TIME = T;
+Update_SUN();
+Update_RCONST();
+Fun( Y, FIX, RCONST, P );
+TIME = Told;
+
+
+}  /*  end FUN_CHEM  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JAC_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+KPP_REAL Told;
+
+#ifdef FULL_ALGEBRA
+	KPP_REAL JS[LU_NONZERO];
+	int i,j;
+#endif
+
+Told = TIME;
+TIME = T;
+Update_SUN();
+Update_RCONST();
+
+#ifdef FULL_ALGEBRA
+	Jac_SP( Y, FIX, RCONST, JS);
+
+	for(j=0; j<NVAR; j++) {
+		for(i=0; i<NVAR; i++) {
+			JV[j][i] = (KPP_REAL)0.0;
+		} /* end for */
+	} /* end for */
+
+	for(i=0; i<LU_NONZERO; i++) {
+		JV[LU_ICOL[i]][LU_IROW[i]] = JS[i];
+	} /* end for */
+#else
+	Jac_SP(Y, FIX, RCONST, JV);
+#endif
+
+TIME = Told;
+
+} /* end JAC_CHEM  */
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.f
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.f	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.f	(revision 3477)
@@ -0,0 +1,705 @@
+      SUBROUTINE INTEGRATE( TIN, TOUT )
+
+      IMPLICIT KPP_REAL (A-H,O-Z)	 
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+
+C TIN - Start Time
+      KPP_REAL TIN
+C TOUT - End Time
+      KPP_REAL TOUT
+      INTEGER i 
+
+      PARAMETER (LWORK=2*NVAR*NVAR+12*NVAR+7,LIWORK=2*NVAR+7)
+      PARAMETER (LRCONT=5*NVAR+2)
+
+      KPP_REAL WORK(LWORK)
+      INTEGER IWORK(LIWORK)   
+      COMMON /CONT/ ICONT(4),RCONT(LRCONT)
+      EXTERNAL FUNC_CHEM,JAC_CHEM
+
+      ITOL=1     ! --- VECTOR TOLERANCES
+      IJAC=1     ! --- COMPUTE THE JACOBIAN ANALYTICALLY
+      IMAS=0     ! --- DIFFERENTIAL EQUATION IS IN EXPLICIT FORM
+
+      DO i=1,20
+        IWORK(i) = 0
+        WORK(i) = 0.D0
+      ENDDO
+      
+      IWORK(3) = 8
+
+      CALL ATMSDIRK(NVAR,FUNC_CHEM,TIN,VAR,TOUT,STEPMIN,     
+     &                  RTOL,ATOL,ITOL,     
+     &                  JAC_CHEM ,IJAC, FUNC_CHEM ,IMAS,                   
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)        
+
+      IF (IDID.LT.0) THEN
+        print *,'ATMSDIRK: Unsucessfull exit at T=',
+     &          TIN,' (IDID=',IDID,')'
+      ENDIF
+
+      RETURN
+      END
+
+
+      SUBROUTINE ATMSDIRK(N,FCN,X,Y,XEND,H,
+     &                  RelTol,AbsTol,ITOL,
+     &                  JAC ,IJAC, MAS ,IMAS,
+     &                  WORK,LWORK,IWORK,LIWORK,LRCONT,IDID)
+C ----------------------------------------------------------
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C          DECLARATIONS 
+C *** *** *** *** *** *** *** *** *** *** *** *** *** 
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      DIMENSION Y(N),AbsTol(1),RelTol(1),WORK(LWORK),IWORK(LIWORK)
+      LOGICAL IMPLCT,JBAND,ARRET
+      EXTERNAL FCN,JAC,MAS
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+
+C *** *** *** *** *** *** ***
+C        SETTING THE PARAMETERS 
+C *** *** *** *** *** *** ***
+       NFCN=0
+       NJAC=0
+       NSTEP=0
+       NACCPT=0
+       NREJCT=0
+       NDEC=0
+       NSOL=0
+       ARRET=.FALSE.
+C -------- SWITCH FOR TRANSFORMATION OF JACOBIAN TO HESS_CHEM FORM ---
+      NHESS1 = 0         ! ADRIAN
+C -------- NMAX , THE MAXIMAL NUMBER OF STEPS -----
+      IF(IWORK(2).EQ.0)THEN
+         NMAX=100000
+      ELSE
+         NMAX=IWORK(2)
+         IF(NMAX.LE.0)THEN
+            WRITE(6,*)' WRONG INPUT IWORK(2)=',IWORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- NIT    MAXIMAL NUMBER OF NEWTON ITERATIONS
+      IF(IWORK(3).EQ.0)THEN
+         NIT=8
+      ELSE
+         NIT=IWORK(3)
+         IF(NIT.LE.0)THEN
+            WRITE(6,*)' CURIOUS INPUT IWORK(3)=',IWORK(3)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C -------- METH    SWITCH FOR THE COEFFICIENTS OF THE METHOD 
+      METH = 2
+C -------- UROUND   SMALLEST NUMBER SATISFYING 1.D0+UROUND>1.D0  
+      IF(WORK(1).EQ.0.D0)THEN
+         UROUND=1.D-16
+      ELSE
+         UROUND=WORK(1)
+         IF(UROUND.LE.1.D-19.OR.UROUND.GE.1.D0)THEN
+            WRITE(6,*)' COEFFICIENTS HAVE 20 DIGITS, UROUND=',WORK(1)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C --------- SAFE     SAFETY FACTOR IN STEP SIZE PREDICTION
+      IF(WORK(2).EQ.0.D0)THEN
+         SAFE=0.9D0
+      ELSE
+         SAFE=WORK(2)
+         IF(SAFE.LE..001D0.OR.SAFE.GE.1.D0)THEN
+            WRITE(6,*)' CURIOUS INPUT FOR WORK(2)=',WORK(2)
+            ARRET=.TRUE.
+         END IF
+      END IF
+C ------ THET     DECIDES WHETHER THE JACOBIAN SHOULD BE RECOMPUTED;
+      IF(WORK(3).EQ.0.D0)THEN
+         THET=0.001D0
+      ELSE
+         THET=WORK(3)
+      END IF
+C --- FNEWT   STOPPING CRIERION FOR NEWTON'S METHOD, USUALLY CHOSEN <1.
+      IF(WORK(4).EQ.0.D0)THEN
+         FNEWT=0.03D0
+      ELSE
+         FNEWT=WORK(4)
+      END IF
+C --- QUOT1 AND QUOT2: IF QUOT1 < HNEW/HOLD < QUOT2, STEP SIZE = CONST.
+      IF(WORK(5).EQ.0.D0)THEN
+         QUOT1=1.D0
+      ELSE
+         QUOT1=WORK(5)
+      END IF
+      IF(WORK(6).EQ.0.D0)THEN
+         QUOT2=1.2D0
+      ELSE
+         QUOT2=WORK(6)
+      END IF
+C -------- MAXIMAL STEP SIZE
+      IF(WORK(7).EQ.0.D0)THEN
+         HMAX=XEND-X
+      ELSE
+         HMAX=WORK(7)
+      END IF
+C --------- CHECK IF TOLERANCES ARE O.K.
+      IF (ITOL.EQ.0) THEN
+          IF (AbsTol(1).LE.0.D0.OR.RelTol(1).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+      ELSE
+          DO 15 I=1,N
+          IF (AbsTol(I).LE.0.D0.OR.RelTol(I).LE.10.D0*UROUND) THEN
+              WRITE (6,*) ' TOLERANCES(',I,') ARE TOO SMALL'
+              ARRET=.TRUE.
+          END IF
+  15      CONTINUE
+      END IF
+
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C         COMPUTATION OF ARRAY ENTRIES
+C *** *** *** *** *** *** *** *** *** *** *** *** ***
+C ---- IMPLICIT, BANDED OR NOT ?
+      IMPLCT=IMAS.NE.0
+      ARRET=.FALSE.
+C -------- COMPUTATION OF THE ROW-DIMENSIONS OF THE 2-ARRAYS ---
+C -- JACOBIAN 
+         LDJAC=N
+C -- MATRIX E FOR LINEAR ALGEBRA
+         LDE=N
+C -- MASS MATRIX
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 1'
+      ELSE
+          LDMAS=0
+      END IF
+      LDMAS2=MAX(1,LDMAS)
+
+C ------- PREPARE THE ENTRY-POINTS FOR THE ARRAYS IN WORK -----
+      IEYHAT=8
+      IEZ=IEYHAT+N
+      IEY0=IEZ+N
+      IEZ1=IEY0+N
+      IEZ2=IEZ1+N
+      IEZ3=IEZ2+N
+      IEZ4=IEZ3+N
+      IEZ5=IEZ4+N
+      IESCAL=IEZ5+N
+      IEF1=IESCAL+N
+      IEG1=IEF1+N
+      IEH1=IEG1+N
+      IEJAC=IEH1+N
+      IEMAS=IEJAC+N*LDJAC
+      IEE=IEMAS+N*LDMAS
+
+C ------ TOTAL STORAGE REQUIREMENT -----------
+      ISTORE=IEE+N*LDE-1
+      IF(ISTORE.GT.LWORK)THEN
+         WRITE(6,*)' INSUFFICIENT STORAGE FOR WORK, MIN. LWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C ------- ENTRY POINTS FOR INTEGER WORKSPACE -----
+      IEIP=5
+      IEHES=IEIP+N
+C --------- TOTAL REQUIREMENT ---------------
+      ISTORE=IEHES+N-1
+      IF(ISTORE.GT.LIWORK)THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR IWORK, MIN. LIWORK=',ISTORE
+         ARRET=.TRUE.
+      END IF
+C --------- CONTROL OF LENGTH OF COMMON BLOCK "CONT" -------
+      IF(LRCONT.LT.(5*N+2))THEN
+         WRITE(6,*)' INSUFF. STORAGE FOR RCONT, MIN. LRCONT=',5*N+2
+         ARRET=.TRUE.
+      END IF
+C ------ WHEN A FAIL HAS OCCURED, WE RETURN WITH IDID=-1
+      IF (ARRET) THEN
+         IDID=-1
+         RETURN
+      END IF
+C -------- CALL TO CORE INTEGRATOR ------------
+      CALL SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,JBAND,LDJAC,LDE,LDMAS2,
+     &   WORK(IEYHAT),WORK(IEZ),WORK(IEY0),WORK(IEZ1),WORK(IEZ2),
+     &   WORK(IEZ3),WORK(IEZ4),WORK(IEZ5),WORK(IESCAL),WORK(IEF1),
+     &   WORK(IEG1),WORK(IEH1),WORK(IEJAC),WORK(IEE),
+     &   WORK(IEMAS),IWORK(IEIP),IWORK(IEHES))
+C ----------- RETURN -----------
+      RETURN
+      END
+C
+C
+C
+C  ----- ... AND HERE IS THE CORE INTEGRATOR  ----------
+C
+      SUBROUTINE SDICOR(N,FCN,X,Y,XEND,HMAX,H,RelTol,AbsTol,ITOL,
+     &   JAC,IJAC,MLJAC,MUJAC,MAS,MLMAS,MUMAS,IOUT,IDID,
+     &   NMAX,UROUND,SAFE,THET,FNEWT,QUOT1,QUOT2,NIT,METH,NHESS1,
+     &   IMPLCT,BANDED,LDJAC,LE,LDMAS,
+     &   YHAT,Z,Y0,Z1,Z2,Z3,Z4,Z5,SCAL,F1,G1,H1,FJAC,E,FMAS,IP,IPHES)
+C ----------------------------------------------------------
+C     CORE INTEGRATOR FOR SDIRK4
+C     PARAMETERS SAME AS IN SDIRK4 WITH WORKSPACE ADDED 
+C ---------------------------------------------------------- 
+C         DECLARATIONS 
+C ---------------------------------------------------------- 
+      IMPLICIT KPP_REAL (A-H,O-Z)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Sparse.h'
+      KPP_REAL Y(N),YHAT(N),Z(N),Y0(N),Z1(N),Z2(N),Z3(N),Z4(N),Z5(N)
+      KPP_REAL SCAL(N),F1(N),G1(N),H1(N)
+      KPP_REAL FJAC(LU_NONZERO),E(LU_NONZERO),FMAS(LDMAS,N)
+      KPP_REAL AbsTol(1),RelTol(1)
+      INTEGER IP(N),IPHES(N)
+      LOGICAL REJECT,FIRST,IMPLCT,BANDED,CALJAC,NEWTRE
+      COMMON /CONT/NN,NN2,NN3,NN4,XOLD,HSOL,CONT(5*NVAR)
+      COMMON/STAT/NFCN,NJAC,NSTEP,NACCPT,NREJCT,NDEC,NSOL
+      EXTERNAL MAS, FCN, JAC
+
+C *** *** *** *** *** *** ***
+C  INITIALISATIONS
+C *** *** *** *** *** *** ***
+
+C --------- DUPLIFY N FOR COMMON BLOCK CONT -----
+      NN=N
+      NN2=2*N
+      NN3=3*N
+      NN4=4*N
+
+C ------- COMPUTE MASS MATRIX FOR IMPLICIT CASE ----------
+      IF(IMPLCT) CALL MAS(N,FMAS,LDMAS)
+
+C ---------- CONSTANTS ---------
+      MBDIAG=MUMAS+1
+      IF (METH.EQ.2) THEN
+C ---------- METHOD WITH GAMMA = 4/15 ---------------
+          GAMMA=4.0D0/15.0D0
+          C2=23.0D0/30.0D0
+          C3=17.0D0/30.0D0
+          C4=2881.0D0/28965.0D0+GAMMA
+          ALPH21=15.0D0/8.0D0
+          ALPH31=1577061.0D0/922880.0D0
+          ALPH32=-23427.0D0/115360.0D0
+          ALPH41=647163682356923881.0D0/2414496535205978880.0D0
+          ALPH42=-593512117011179.0D0/3245291041943520.0D0
+          ALPH43=559907973726451.0D0/1886325418129671.0D0
+          ALPH51=724545451.0D0/796538880.0D0
+          ALPH52=-830832077.0D0/267298560.0D0
+          ALPH53=30957577.0D0/2509272.0D0
+          ALPH54=-69863904375173.0D0/6212571137048.0D0
+          E1=7752107607.0D0/11393456128.0D0
+          E2=-17881415427.0D0/11470078208.0D0
+          E3=2433277665.0D0/179459416.0D0
+          E4=-96203066666797.0D0/6212571137048.0D0
+          D11= 24.74416644927758D0
+          D12= -4.325375951824688D0
+          D13= 41.39683763286316D0
+          D14= -61.04144619901784D0
+          D15= -3.391332232917013D0
+          D21= -51.98245719616925D0
+          D22= 10.52501981094525D0
+          D23= -154.2067922191855D0
+          D24= 214.3082125319825D0
+          D25= 14.71166018088679D0
+          D31= 33.14347947522142D0
+          D32= -19.72986789558523D0
+          D33= 230.4878502285804D0
+          D34= -287.6629744338197D0
+          D35= -18.99932366302254D0
+          D41= -5.905188728329743D0
+          D42= 13.53022403646467D0
+          D43= -117.6778956422581D0
+          D44= 134.3962081008550D0
+          D45= 8.678995715052762D0
+         ETA1=23.D0/8.D0
+         ANU1= 0.9838473040915402D0
+         ANU2= 0.3969226768377252D0
+         AMU1= 0.6563374010466914D0
+         AMU3= 0.3372498196189311D0
+      ELSE
+         PRINT *, 'WRONG  CHOICE OF <METH>'
+      END IF
+      POSNEG=SIGN(1.D0,XEND-X)
+      HMAX1=MIN(ABS(HMAX),ABS(XEND-X))
+      IF (ABS(H).LE.10.D0*UROUND) H=1.0D-6
+      H=MIN(ABS(H),HMAX1) 
+      H=SIGN(H,POSNEG) 
+      HOLD=H
+      CFAC=SAFE*(1+2*NIT)
+      NEWTRE=.FALSE.
+      REJECT=.FALSE.
+      FIRST=.TRUE.
+      FACCO1=1.D0
+      FACCO2=1.D0
+      FACCO3=1.D0
+      FACCO4=1.D0
+      FACCO5=1.D0
+      NSING=0
+      XOLD=X
+      IF (ITOL.EQ.0) THEN
+          DO 8 I=1,N
+   8      SCAL(I)=1.D0 / ( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+      ELSE
+          DO 9 I=1,N
+   9      SCAL(I)=1.D0 / ( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+      END IF
+
+C --- BASIC INTEGRATION STEP  
+  10  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTATION OF THE JACOBIAN
+C *** *** *** *** *** *** ***
+      NJAC=NJAC+1
+      CALL JAC(N,X,Y,FJAC)
+      CALJAC=.TRUE.
+  20  CONTINUE
+
+C *** *** *** *** *** *** ***
+C  COMPUTE THE MATRIX E AND ITS DECOMPOSITION
+C *** *** *** *** *** *** ***
+      FAC1=1.D0/(H*GAMMA)
+      IF (IMPLCT) THEN
+         print *, 'IMPLCT 4'
+      ELSE  ! EXPLICIT SYSTEM
+C --- THE MATRIX E (MAS=IDENTITY, JACOBIAN A FULL MATRIX)
+c         DO 526 J=1,N
+c           DO 525 I=1,N
+c 525         E(I,J)=-FJAC(I,J)
+c 526       E(J,J)=E(J,J)+FAC1
+c         CALL DEC(N,LE,E,IP,IER)
+          DO K=1,LU_NONZERO
+             E(K) = -FJAC(K)
+          END DO
+          DO I=1,N
+             IDG = LU_DIAG(I)
+             E(IDG) = E(IDG) + FAC1
+          END DO
+          CALL KppDecomp ( E, IER)
+          
+         IF (IER.NE.0) GOTO 79 
+      END IF
+      NDEC=NDEC+1
+  30  CONTINUE
+
+      IF (NSTEP.GT.NMAX.OR.X+.1D0*H.EQ.X.OR.ABS(H).LE.UROUND) GOTO 79
+      XPH=X+H
+C --- LOOP FOR THE 5 STAGES
+      FACCO1=DMAX1(FACCO1,UROUND)**0.8D0
+      FACCO2=DMAX1(FACCO2,UROUND)**0.8D0
+      FACCO3=DMAX1(FACCO3,UROUND)**0.8D0
+      FACCO4=DMAX1(FACCO4,UROUND)**0.8D0
+      FACCO5=DMAX1(FACCO5,UROUND)**0.8D0
+
+C *** *** *** *** *** *** ***
+C  STARTING VALUES FOR NEWTON ITERATION
+C *** *** *** *** *** *** ***
+      DO 59 ISTAGE=1,5
+      IF (ISTAGE.EQ.1) THEN
+          XCH=X+GAMMA*H
+          IF (FIRST.OR.NEWTRE) THEN
+              DO 132 I=1,N
+ 132          Z(I)=0.D0
+          ELSE
+              S=1.D0+GAMMA*H/HOLD
+              DO 232 I=1,N
+c  232          Z(I) = 0.D0
+ 232          Z(I)=S*(CONT(I+NN)+S*(CONT(I+NN2)+S*(CONT(I+NN3)
+     &             +S*CONT(I+NN4))))-YHAT(I)
+
+          END IF
+          DO 31 I=1,N
+  31      G1(I)=0.D0 
+          FACCON=FACCO1
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          XCH=X+C2*H
+          DO 131 I=1,N
+          Z1I=Z1(I)
+          Z(I)=ETA1*Z1I
+ 131      G1(I)=ALPH21*Z1I
+          FACCON=FACCO2
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          XCH=X+C3*H
+          DO 231 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z(I)=ANU1*Z1I+ANU2*Z2I
+ 231      G1(I)=ALPH31*Z1I+ALPH32*Z2I
+          FACCON=FACCO3
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          XCH=X+C4*H
+          DO 331 I=1,N
+          Z1I=Z1(I)
+          Z3I=Z3(I)
+          Z(I)=AMU1*Z1I+AMU3*Z3I
+ 331      G1(I)=ALPH41*Z1I+ALPH42*Z2(I)+ALPH43*Z3I
+          FACCON=FACCO4
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          XCH=XPH
+          DO 431 I=1,N
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z(I)=E1*Z1I+E2*Z2I+E3*Z3I+E4*Z4I
+          YHAT(I)=Z(I)
+ 431      G1(I)=ALPH51*Z1I+ALPH52*Z2I+ALPH53*Z3I+ALPH54*Z4I
+          FACCON=FACCO5
+      END IF
+
+
+
+C *** *** *** *** *** *** *** *** *** *** ***
+C  LOOP FOR THE SIMPLIFIED NEWTON ITERATION
+C *** *** *** *** *** *** *** *** *** *** ***
+            NEWT=0
+            THETA=ABS(THET)
+            IF (REJECT) THETA=2*ABS(THET)
+  40        CONTINUE
+            IF (NEWT.GE.NIT) THEN
+                H=H/2.D0
+                REJECT=.TRUE.
+                NEWTRE=.TRUE.
+                IF (CALJAC) GOTO 20
+                GOTO 10
+            END IF
+
+C ---     COMPUTE THE RIGHT-HAND SIDE
+            DO 41 I=1,N
+            H1(I)=G1(I)-Z(I)
+  41        CONT(I)=Y(I)+Z(I)
+            CALL FCN(N,XCH,CONT,F1)
+            NFCN=NFCN+1
+
+C ---     KppSolve THE LINEAR SYSTEMS
+            IF (IMPLCT) THEN
+                print *, 'IMPLCT 2'
+            ELSE
+                DO 345 I=1,N
+ 345            F1(I)=H1(I)*FAC1+F1(I)
+C                CALL SOL(N,LE,E,F1,IP)
+                CALL KppSolve(E, F1)
+            END IF
+            NEWT=NEWT+1
+            DYNO=0.D0
+C --- NORM 2 ---
+            DO 57 I=1,N
+  57        DYNO=DYNO+(F1(I)*SCAL(I))**2
+            DYNO=DSQRT(DYNO/N)
+C --- NORM INF ---
+C            DO 57 I=1,N
+C  57        DYNO=DMAX1( DYNO, DABS(F1(I)*SCAL(I)) )
+
+
+C ---     BAD CONVERGENCE OR NUMBER OF ITERATIONS TO LARGE
+            IF (NEWT.GE.2.AND.NEWT.LT.NIT) THEN
+                THETA=DYNO/DYNOLD
+                IF (THETA.LT.0.99D0) THEN
+                    FACCON=THETA/(1.0D0-THETA)
+                    DYTH=FACCON*DYNO*THETA**(NIT-1-NEWT)
+                    QNEWT=DMAX1(1.0D-4,DMIN1(16.0D0,DYTH/FNEWT))
+                    IF (QNEWT.GE.1.0D0) THEN
+                         H=.8D0*H*QNEWT**(-1.0D0/(NIT-NEWT))
+                         REJECT=.TRUE.
+                         NEWTRE=.TRUE.
+                         IF (CALJAC) GOTO 20
+                         GOTO 10
+                    END IF
+                ELSE
+                    NEWTRE=.TRUE.
+                    GOTO 78
+                END IF
+            END IF
+            DYNOLD=DYNO
+            DO 58 I=1,N
+  58        Z(I)=Z(I)+F1(I)
+            NSOL=NSOL+1
+            IF (FACCON*DYNO.GT.FNEWT) GOTO 40
+
+C --- END OF SIMPILFIED NEWTON
+      IF (ISTAGE.EQ.1) THEN
+          DO I=1,N
+            Z1(I) = Z(I)
+          END DO  
+          FACCO1=FACCON
+      END IF
+      IF (ISTAGE.EQ.2) THEN
+          DO I=1,N
+            Z2(I) = Z(I)
+          END DO  
+          FACCO2=FACCON
+      END IF
+      IF (ISTAGE.EQ.3) THEN
+          DO I=1,N
+            Z3(I) = Z(I)
+          END DO  
+          FACCO3=FACCON
+      END IF
+      IF (ISTAGE.EQ.4) THEN
+          DO I=1,N
+            Z4(I) = Z(I)
+          END DO  
+          FACCO4=FACCON
+      END IF
+      IF (ISTAGE.EQ.5) THEN
+          DO I=1,N
+            Z5(I) = Z(I)
+          END DO  
+          FACCO5=FACCON
+      END IF
+  59  CONTINUE
+
+
+C *** *** *** *** *** *** ***
+C  ERROR ESTIMATION  
+C *** *** *** *** *** *** ***
+      NSTEP=NSTEP+1
+      IF (IMPLCT) THEN
+          print *,'IMPLCT 3'
+      ELSE
+          DO 461 I=1,N 
+ 461      CONT(I)=FAC1*(Z5(I)-YHAT(I))
+      END IF
+
+      CALL KppSolve(E, CONT)
+
+      ERR=0.D0
+C ---- NORM 2 ---
+      DO 64 I=1,N
+  64  ERR=ERR+(CONT(I)*SCAL(I))**2
+      ERR=DMAX1(DSQRT(ERR/N),1.D-10)
+
+C ---- NORM INF ---
+C      DO 64 I=1,N
+c  64  ERR=DMAX1( ERR, DABS( CONT(I)*SCAL(I) ) )
+
+C --- COMPUTATION OF HNEW
+C --- WE REQUIRE .25<=HNEW/H<=10.
+      FAC=DMIN1(SAFE,CFAC/(NEWT+2*NIT))
+      QUOT=DMAX1(.25D0,DMIN1(10.D0,(ERR)**.25D0/FAC))
+      HNEW= H/QUOT
+
+C *** *** *** *** *** *** ***
+C  IS THE ERROR SMALL ENOUGH ?
+C *** *** *** *** *** *** ***
+      IF (ERR.LT.1.D0) THEN
+C --- STEP IS ACCEPTED  
+         FIRST=.FALSE.
+         NACCPT=NACCPT+1
+         HOLD=H
+         XOLD=X
+C --- COEFFICIENTS FOR CONTINUOUS SOLUTION
+         DO 74 I=1,N 
+          Z1I=Z1(I)
+          Z2I=Z2(I)
+          Z3I=Z3(I)
+          Z4I=Z4(I)
+          Z5I=Z5(I)
+         CONT(I)=Y(I)
+         Y(I)=Y(I)+Z5I  
+         CONT(I+NN) =D11*Z1I+D12*Z2I+D13*Z3I+D14*Z4I+D15*Z5I
+         CONT(I+NN2)=D21*Z1I+D22*Z2I+D23*Z3I+D24*Z4I+D25*Z5I
+         CONT(I+NN3)=D31*Z1I+D32*Z2I+D33*Z3I+D34*Z4I+D35*Z5I
+         CONT(I+NN4)=D41*Z1I+D42*Z2I+D43*Z3I+D44*Z4I+D45*Z5I
+         YHAT(I)=Z5I
+         IF (ITOL.EQ.0) THEN
+           SCAL(I)=1.D0/( AbsTol(1)+RelTol(1)*DABS(Y(I)) )
+         ELSE
+           SCAL(I)=1.D0/( AbsTol(I)+RelTol(I)*DABS(Y(I)) )
+         END IF
+  74     CONTINUE
+         X=XPH 
+         CALJAC=.FALSE.
+         IF ((X-XEND)*POSNEG+UROUND.GT.0.D0) THEN
+            H=HOPT
+            IDID=1
+            RETURN
+         END IF
+         IF (IJAC.EQ.0) CALL FCN(N,X,Y,Y0)
+         NFCN=NFCN+1
+         HNEW=POSNEG*DMIN1(DABS(HNEW),HMAX1)
+         HOPT=HNEW
+         IF (REJECT) HNEW=POSNEG*DMIN1(DABS(HNEW),DABS(H)) 
+         REJECT=.FALSE.
+         NEWTRE=.FALSE.
+         IF ((X+HNEW/QUOT1-XEND)*POSNEG.GT.0.D0) THEN
+            H=XEND-X
+         ELSE
+            QT=HNEW/H
+            IF (THETA.LE.THET.AND.QT.GE.QUOT1.AND.QT.LE.QUOT2) GOTO 30
+            H = HNEW 
+         END IF
+         IF (THETA.LE.THET) GOTO 20
+         GOTO 10
+
+      ELSE
+C --- STEP IS REJECTED  
+         REJECT=.TRUE.
+         IF (FIRST) THEN
+             H=H/10.D0
+         ELSE
+             H=HNEW
+         END IF
+         IF (NACCPT.GE.1) NREJCT=NREJCT+1
+         IF (CALJAC) GOTO 20
+         GOTO 10
+      END IF
+
+C --- UNEXPECTED STEP-REJECTION
+  78  CONTINUE
+      IF (IER.NE.0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, IER=',IER,' X=',X,' H=',H
+          NSING=NSING+1
+          IF (NSING.GE.6) GOTO 79
+      END IF
+      H=H*0.5D0
+      REJECT=.TRUE.
+      IF (CALJAC) GOTO 20
+      GOTO 10
+
+C --- FAIL EXIT
+  79  WRITE (6,979) X,H,IER
+ 979  FORMAT(' EXIT OF SDIRK4 AT X=',D14.7,'   H=',D14.7,'   IER=',I4)
+      IDID=-1
+      RETURN
+      END
+C
+
+ 
+      SUBROUTINE FUNC_CHEM(N, T, Y, P)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   T, Told
+      KPP_REAL   Y(NVAR), P(NVAR)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Fun( Y,  FIX, RCONST, P )
+      TIME = Told
+      RETURN
+      END
+
+ 
+      SUBROUTINE JAC_CHEM(N, T, Y, J)
+      INCLUDE 'KPP_ROOT_Parameters.h'
+      INCLUDE 'KPP_ROOT_Global.h'
+      INTEGER N
+      KPP_REAL   Told, T
+      KPP_REAL   Y(NVAR), J(LU_NONZERO)
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      CALL Jac_SP( Y,  FIX, RCONST, J )
+      TIME = Told
+      RETURN
+      END                                                                                                                 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.f90	(revision 3477)
@@ -0,0 +1,1258 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SDIRK - Singly-Diagonally-Implicit Runge-Kutta methods                 !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2005                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp,    &
+               KppSolve, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+SUBROUTINE INTEGRATE( TIN, TOUT, &
+  ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, Ierr_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: Ierr_U
+
+   INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+   INTEGER       :: ICNTRL(20), ISTATUS(20), Ierr
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   !~~~> fine-tune the integrator:
+   ICNTRL(2) = 0	! 0 - vector tolerances, 1 - scalar tolerances
+   ICNTRL(6) = 0	! starting values of Newton iterations: interpolated (0), zero (1)
+  ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+   
+   
+   T1 = TIN; T2 = TOUT
+   CALL SDIRK( NVAR,T1,T2,VAR,RTOL,ATOL,          &
+               RCNTRL,ICNTRL,RSTATUS,ISTATUS,Ierr )
+
+   !~~~> Debug option: print number of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! PRINT*,'NSTEPS=',ISTATUS(Nstp), '(',Ntotal,')','   O3=',VAR(ind_O3), &
+   !       '  NO2=',VAR(ind_NO2)
+
+   IF (Ierr < 0) THEN
+        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (Ierr=',Ierr,')'
+   ENDIF
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(Ierr_U))    Ierr_U       = Ierr
+
+   END SUBROUTINE INTEGRATE
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK(N, Tinitial, Tfinal, Y, RelTol, AbsTol,     &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                 
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(NVAR), AbsTol(NVAR), RCNTRL(20)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+! Local variables      
+      LOGICAL :: StartNewton
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+       
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+      Ierr = 0
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps=ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+
+!~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+    IF (Ierr < 0) RETURN
+
+    CALL SDIRK_Integrator( N,Tinitial,Tfinal,Y,Ierr )
+
+
+   !END SUBROUTINE SDIRK
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  PROCEDURES INTERNAL TO SDIRK
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_Integrator( N,Tinitial,Tfinal,Y,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,Smax), G(NVAR), TMP(NVAR),        &   
+                       NewtonRate, SCAL(NVAR), RHS(NVAR),       &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew,Tdirection,      &
+                       NewtonIncrement, NewtonIncrementOld
+      INTEGER :: j, IER, istage, NewtonIter, IP(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL FJAC(NVAR,NVAR),  E(NVAR,NVAR)
+#else      
+      KPP_REAL FJAC(LU_NONZERO), E(LU_NONZERO)
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU =.FALSE.
+      SkipJac = .FALSE.
+      Reject=.FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj)
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+	       IF (StartNewton) THEN
+                  CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+	       END IF
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,RHS)	! RHS <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            RHS(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*RHS(1:N)
+	    CALL WSCAL(N, H*rkGamma, RHS, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, RHS, 1)
+            CALL WAXPY (N, ONE, G,1, RHS,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( H, N, E, IP, IER, RHS )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, RHS, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+RHS(:)
+            CALL WAXPY(N,ONE,RHS,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT NewtonLoop
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of implified Newton iterations
+
+ 
+   END DO stages
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,TMP)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,TMP,1)
+      END DO  
+
+      CALL SDIRK_Solve( H, N, E, IP, IER, TMP )
+      CALL SDIRK_ErrorNorm(N, TMP, SCAL, Err)
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+	 
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject  = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_Integrator
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, N, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .TRUE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = RHS
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+#ifdef FULL_ALGEBRA  
+      CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+      CALL KppSolve(E, RHS)
+#endif
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRK ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+      IMPLICIT NONE
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+      
+      TIME = Told
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+      USE KPP_ROOT_Jacobian
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+      IMPLICIT NONE
+  
+      KPP_REAL ::  T, Told
+      KPP_REAL ::  Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO i=1,NVAR
+          JV(i,j) = 0.0D0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+
+      END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.m
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.m	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk.m	(revision 3477)
@@ -0,0 +1,1006 @@
+function [T,Y,RCNTRL,ICNTRL,RSTATUS,ISTATUS]=...
+    SdirkInt(Function,Tspan,Y0,Options,RCNTRL,ICNTRL)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  SDIRK - Implementation of several SDIRK methods:
+%               * SDIRK4a                                                
+%               * SDIRK4b                                                
+%               * SDIRK3a                                                
+%               * SDIRK2b                                              
+%               * SDIRK2a
+%                                                                     
+%    Solves the system y'=F(t,y) using a SDIRK Method 
+%                                                                     
+%
+%    For details on SDIRK methods and their implementation consult:
+%      E. Hairer and G. Wanner
+%      "Solving ODEs II. Stiff and differential-algebraic problems".
+%      Springer series in computational mathematics, Springer-Verlag, 1996.
+%    The codes contained in the book inspired this implementation.
+%
+%    MATLAB implementation (C) Vishwas Rao (visrao@vt.edu).      
+%    Virginia Polytechnic Institute and State University             
+%    March, 2011    
+%
+%    Based on the Fortran90 implementation (C) Adrian Sandu, August 2004
+%    and revised by Philipp Miehe and Adrian Sandu, May 2006.
+%    Virginia Polytechnic Institute and State University
+%    Contact: sandu@cs.vt.edu
+%
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Input Arguments :
+%  The first four arguments are similar to the input arguments of 
+%  MATLAB's ODE solvers
+%      Function  - A function handle for the ODE function
+%      Tspan     - The time space to integrate
+%      Y0        - Initial value
+%      Options   - ODE solver options created by odeset():           
+%                  AbsTol, InitialStep, Jacobian, MaxStep, and RelTol
+%                  are considered.  Other options are ignored.       
+%                  'Jacobian' must be set.                           
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%  Output Arguments:
+%  The first two arguments are similar to the output arguments of
+%  MATLAB's ODE solvers
+%      T         - A vector of final integration times.
+%      Y         - A matrix of function values.  Y(T(i),:) is the value of
+%                  the function at the ith output time.
+%      RCNTRL    - real value input parameters (explained below)
+%      ICNTRL    - integer input parameters (explained below)
+%      RSTATUS     - real output parameters (explained below)
+%      ISTATUS     - integer output parameters (explained below)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RCNTRL and ICNTRL on input and output:
+%
+%    Note: For input parameters equal to zero the default values of the
+%       corresponding variables are used.
+%
+%    
+%
+%    ICNTRL(1) = 0: AbsTol, RelTol are N-dimensional vectors
+%              = 1: AbsTol, RelTol are scalars
+%
+%    ICNTRL(2)  -> selection of a particular SDIRK method
+%        = 0 :    Sdirk2a(Default)
+%        = 1 :    Sdirk2a
+%        = 2 :    Sdirk2b
+%        = 3 :    Sdirk3a
+%        = 4 :    Sdirk4a
+%        = 5 :    Sdirk4b
+%        
+%        
+%
+%    ICNTRL(3)  -> maximum number of integration steps
+%        For ICNTRL(3)=0) the default value of 100000 is used
+%
+%    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+%          It is strongly recommended to keep Hmin = ZERO
+%    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+%    RCNTRL(3)  -> Hstart, starting value for the integration step size
+%
+%    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+%    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+%    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+%                          (default=0.1)
+%    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+%         than the predicted value  (default=0.9)
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+%    RSTAT and ISTAT on output:
+%
+%    ISTATUS(1)  -> No. of function calls
+%    ISTATUS(2)  -> No. of jacobian calls
+%    ISTATUS(3)  -> No. of steps
+%    ISTATUS(4)  -> No. of accepted steps
+%    ISTATUS(5)  -> No. of rejected steps (except at very beginning)
+%    ISTATUS(6)  -> No. of LU decompositions
+%    ISTATUS(7)  -> No. of forward/backward substitutions
+%    ISTATUS(8)  -> No. of singular matrix decompositions
+%
+%    RSTATUS(1)  -> Texit, the time corresponding to the
+%                     computed Y upon return
+%    RSTATUS(2)  -> Hexit, last accepted step before exit
+%    RSTATUS(3)  -> Hnew, last predicted step (not yet taken)
+%                   For multiple restarts, use Hnew as Hstart
+%                     in the subsequent run
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+global Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew
+% Parse ODE options
+AbsTol = odeget(Options, 'AbsTol');
+if isempty(AbsTol)
+    AbsTol = 1.0e-3;
+end
+Hstart = odeget(Options, 'InitialStep');
+if isempty(Hstart)
+    Hstart = 0;
+end
+Jacobian = odeget(Options, 'Jacobian');
+if isempty(Jacobian)
+    error('A Jacobian function is required.');
+end
+Hmax = odeget(Options, 'MaxStep');
+if isempty(Hmax)
+    Hmax = 0;
+end
+RelTol = odeget(Options, 'RelTol');
+if isempty(RelTol)
+    RelTol = 1.0e-4;
+end
+% Initialize statistics
+Nfun=1; Njac=2; Nstp=3; Nacc=4; Nrej=5; Ndec=6; Nsol=7; Nsng=8;
+Ntexit=1; Nhexit=2; Nhnew=3;
+RSTATUS = zeros(20,1);
+ISTATUS = zeros(20,1);
+
+% Get problem size
+steps = length(Tspan);
+N = max(size(Y0));
+
+% Initialize tolerances
+ATOL = ones(N,1)*AbsTol;
+RTOL = ones(N,1)*RelTol;
+
+% Initialize step
+RCNTRL(2) = max(0, Hmax);
+RCNTRL(3) = max(0, Hstart);
+
+% Integrate
+Y = zeros(N,steps);
+T = zeros(steps,1);
+Y(:,1) = Y0;
+T(1) = Tspan(1);
+t=cputime;
+for i=2:steps
+    [T(i), Y(:,i), IERR,ISTATUS,RSTATUS] = ...
+        Sdirk_Integrate(N, Y(:,i-1), T(i-1), Tspan(i), ...
+            Function, Jacobian, ATOL, RTOL, RCNTRL, ICNTRL,ISTATUS,RSTATUS);
+
+    if IERR < 0
+        error(['SDIRK exited with IERR=',num2str(IERR)]);
+    end
+
+end
+cputime-t
+
+
+
+function [T,Y,Ierr,ISTATUS,RSTATUS] = Sdirk_Integrate(N,Y0,TIN, TOUT,OdeFunction1,...
+    OdeJacobian1,ATOL,RTOL,RCNTRL,ICNTRL,ISTATUS,RSTATUS)
+global ZERO ONE Nfun Njac Nstp Nacc Nrej Ndec Nsol Nsng Ntexit Nhexit Nhnew
+global Smax S2A S2B S3A S4A S4B 
+global rkTheta rkAlpha
+ZERO = 0; ONE=1.0; Nfun = 1; Njac = 2; Nstp = 3; Nacc = 4; Nrej = 5;Ndec=6;
+Nsol = 7; Nsng = 8; Ntexit = 1; Nhexit = 2; Nhnew = 3; Smax = 5; S2A = 1;
+S2B = 2; S3A = 3; S4A = 4; S4B = 5;
+rkTheta = zeros(Smax);
+rkAlpha = zeros(Smax);
+
+%Local Variables
+ISTATUS = zeros(20,1);
+RSTATUS = zeros(20,1);
+
+% Fine-Tune the integrator
+T1 = TIN;
+T2 = TOUT;
+RTOL=ones(size(Y0));
+RTOL=1e-3*RTOL;
+ATOL=RTOL;
+
+    [T,Y,Ierr,RSTATUS,ISTATUS] = SDIRK(N, T1,T2,Y0,RTOL,ATOL,RCNTRL,ICNTRL,RSTATUS,ISTATUS,OdeFunction1,OdeJacobian1);
+
+if Ierr < 0
+    disp(['SDIRK:Unsuccessful exit at ',num2str(TIN), ' ',num2str(Ierr)]);
+end
+return;
+
+
+
+
+function [T, Y, Ierr,RSTATUS,ISTATUS] = SDIRK(N,T1,T2,Y,AbsTol,RelTol,...
+                        RCNTRL,ICNTRL,RSTATUS,ISTATUS,OdeFunction1,OdeJacobian1)
+
+global ZERO ONE 
+
+
+Max_no_steps = 0;Hmin = 0;Hmax = 0; Hstart = 0; Roundoff = eps; FacMin = 0;
+FacMax = 0; FacSafe = 0; FacRej = 0; 
+if(ICNTRL(1)==0)
+    ITOL = 1;
+else
+    ITOL = 0;
+end
+Ierr = 0;
+%~~~> Method Selection
+switch (ICNTRL(2))
+    
+    case (0)
+        Sdirk2a();
+    case (1)
+        Sdirk2a();
+    case (2)
+        Sdirk2b();
+    case(3)
+        Sdirk3a();
+    case(4)
+        Sdirk4a();
+    case(5)
+        Sdirk4b();
+    otherwise
+        Sdirk2a();
+end
+
+if (ICNTRL(3)==ZERO)
+    Max_no_steps = 200000;
+end
+if(ICNTRL(3) > ZERO)
+        Max_no_steps = ICNTRL(3);
+end
+
+if(ICNTRL(3) < ZERO)
+    disp(['User-Selected ICNTRL(3)=',num2str(ICNTRL(3))]);
+    SDIRK_ErrorMsg(-1,T1,ZERO,Ierr);
+end;
+%~~>StartNewton Extrapolate for starting values of Newton iterations
+if(ICNTRL(5)==ZERO)
+    StartNewton = 1;
+else
+    StartNewton = 0;
+end;
+
+if(ICNTRL(4)>=ZERO)
+    if(ICNTRL(4)==ZERO)
+        NewtonMaxit = 8;
+    else
+        NewtonMaxit = ICNTRL(4);
+    end
+else
+    disp(['User-Selected NewtonMaxit ICNTRL(4)=',num2str(ICNTRL(4))]);
+    SDIRK_ErrorMsg(-2,T1,ZERO,Ierr);
+end;
+
+%~~> Lower bound on the step size (Positive value)
+
+if(RCNTRL(1)==ZERO)
+    Hmin = ZERO;
+end
+if (RCNTRL(1)>ZERO)
+        Hmin = RCNTRL(1);
+end    
+if(RCNTRL(1)<ZERO)
+    disp(['User-Selected Hmin, RCNTRL(1)=',num2str(RCNTRL(1))]);
+    SDIRK_ErrorMsg(-3,T1,ZERO,Ierr);
+end;
+% Upper bound on the step size : (Positive value)
+
+if(RCNTRL(2)==ZERO)
+    Hmax = abs(T2-T1);
+end
+if(RCNTRL(2)>ZERO)
+    Hmax = min(abs(T2-T1),RCNTRL(2));
+end;
+if(RCNTRL(2)<ZERO)
+    disp(['User-Selected Hmax, RCNTRL(2)=',num2str(RCNTRL(2))]);
+    SDIRK_ErrorMsg(-3,T1,ZERO,Ierr);
+end;
+%~~> Starting step size
+
+if(RCNTRL(3)>=ZERO)
+    if(RCNTRL(3)==ZERO)
+        Hstart = max(Hmin,Roundoff);
+    else
+        Hstart = min(abs(RCNTRL(3)),abs(T2-T1));
+    end
+else
+    disp(['User-Selected Hstart, RCNTRL(3)=',num2str(RCNTRL(3))]);
+    SDIRK_ErrorMsg(-3,T1,ZERO,Ierr);
+end;
+%~~> Stepsize can be changed such that FacMin < Hnew/Hexit < FacMax
+if(RCNTRL(4) >= ZERO)
+    if(RCNTRL(4) == ZERO)
+        FacMin = 0.2;
+    else
+        FacMin = RCNTRL(4);
+    end
+else
+    disp(['User-Selected FacMin, RCNTRL(4)=',num2str(RCNTRL(4))]);
+    SDIRK_ErrorMsg(-4,T1,ZERO,Ierr);
+end
+
+
+if (RCNTRL(5)>=ZERO)
+    if(RCNTRL(5)==ZERO)
+        FacMax = 10.0;
+    else
+        FacMax = RCNTRL(5);
+    end
+else
+    disp(['User-Selected FacMax, RCNTRL(5)=',num2str(RCNTRL(5))]);
+    SDIRK_ErrorMsg(-4,T1,ZERO,Ierr);
+end
+
+%~~> FacRej Factor to decrease step after 2 successive rejections
+
+if(RCNTRL(6)>=ZERO)
+    if(RCNTRL(6) == ZERO)
+        FacRej = 0.1;
+    else
+        FacRej = RCNTRL(6);
+    end
+else
+    disp(['User-Selected FacRej, RCNTRL(6)=',num2str(RCNTRL(6))]);
+    SDIRK_ErrorMsg(-4,T1,ZERO,Ierr);
+end;
+
+%~~> FacSafe Safety Factor in the computation of new step size
+
+if(RCNTRL(7)>=ZERO)
+    if(RCNTRL(7)==ZERO)
+        FacSafe = 0.9;
+    else
+        FacSafe = RCNTRL(7);
+    end
+else
+    disp(['User-Selected FacSafe, RCNTRL(7)=',num2str(RCNTRL(7))]);
+    SDIRK_ErrorMsg(-4,T1,ZERO,Ierr);
+end
+
+%~~> ThetaMin decides whether the Jacobian should be recomputed
+
+if(RCNTRL(8) == ZERO)
+    ThetaMin = 1.0E-3;
+else
+    ThetaMin = RCNTRL(8);
+end;
+
+%~~> Stopping Criteria for Newtons method
+
+if(RCNTRL(9) == ZERO)
+    NewtonTol = 3.0e-4;
+else
+    NewtonTol = RCNTRL(9);
+end;
+
+%~~> Qmin, Qmax : IF Qmin <Hnew/Hold<Qmax STEP SIZE = constant
+
+if(RCNTRL(10) == ZERO)
+    Qmin = ONE;
+else
+    Qmin = RCNTRL(10);
+end
+
+if(RCNTRL(11) == ZERO)
+    Qmax = 1.2;
+else
+    Qmax = RCNTRL(11);
+end
+
+%~~> Check if tolerances are reasonable
+if(ITOL == ZERO)
+    if((AbsTol(1)<=ZERO) || RelTol(1) <=10*Roundoff)
+        SDIRK_ErrorMsg(-5,T1,ZERO,Ierr);
+    end;
+else
+    for i=1:N
+        if((AbsTol(i)<=ZERO)||RelTol(i)<=10*Roundoff)
+            SDIRK_ErrorMsg(-5,T1,ZERO,Ierr);
+        end
+    end
+end
+if(Ierr < 0)
+    return;
+end
+
+
+
+[T,Y,Ierr,ISTATUS,RSTATUS] = SDIRK_Inetgrator(N,T1,T2,Y,Hstart,Hmin,...
+                            Hmax,Roundoff,AbsTol,RelTol,...
+                            ITOL,Max_no_steps,StartNewton,NewtonTol,ThetaMin,...
+                            FacSafe,FacMin,FacMax,FacRej,Qmin,Qmax,NewtonMaxit,ISTATUS,RSTATUS,Ierr,OdeFunction1,OdeJacobian1);
+ 
+
+
+return;
+
+function[T,Y,Ierr,ISTATUS,RSTATUS] = SDIRK_Inetgrator(N,T1,T2,Y,Hstart,Hmin,...
+                            Hmax,Roundoff,AbsTol,RelTol,...
+                            ITOL,Max_no_steps,StartNewton,NewtonTol,ThetaMin,...
+                            FacSafe,FacMin,FacMax,FacRej,Qmin,Qmax,NewtonMaxit,ISTATUS,RSTATUS,Ierr,OdeFunction1,OdeJacobian1)
+global ZERO ONE Nfun Nstp Nacc Nrej Ntexit Nhexit Nhnew
+global rkS rkGamma rkELO
+global rkC rkD rkE rkTheta rkAlpha
+T =T1;
+Tdirection = sign(T2-T1);
+H = max(abs(Hmin),abs(Hstart));
+if(H<=10.0*Roundoff)
+    H = 1.0e-6;
+end;
+H = min(H,Hmax);
+H=sign(Tdirection)*H;
+SkipLU = 0;
+SkipJac = 0;
+Reject = 0;
+FirstStep = 1;
+CycleTloop = 0;
+SCAL = SDIRK_ErrorScale(N,ITOL,AbsTol,RelTol,Y);
+FJAC = zeros(N);
+while((T2-T)*Tdirection - Roundoff > ZERO)
+    if(SkipLU == 0)
+        [E1L,E1U,ISTATUS,ISING]=PrepareMatrix(N,H,T,Y,FJAC,SkipJac, SkipLU,Reject,ISTATUS,OdeJacobian1);
+        if(ISING ~= 0)
+            SDIRK_ErrorMsg(-8,T,H,Ierr);
+            return;
+        end;
+    end;
+    if(ISTATUS(Nstp)>Max_no_steps)
+        SDIRK_ErrorMsg(-6, T, H, Ierr);
+        return;
+    end;
+    
+    if(T+0.1*H==T || abs(H)<=Roundoff)
+        SDIRK_ErrorMsg(-7,T,H,Ierr);
+        return;
+    end
+    %~~> Simplified Newton Iterations
+    Z=zeros(rkS,N);
+    for istage=1:rkS
+        G=zeros(N,1);
+        if(istage>1)
+            aa=rkTheta(1:istage,istage);
+            G=Z(1:istage,:)'*aa;
+            if(StartNewton==1)
+                for j=1:istage
+                    Z(istage,:)=Z(istage,:)+rkAlpha(j,istage)*Z(j,:);
+                end
+                
+            end
+                
+		end
+		NewtonDone = 0;
+		Fac = 0.5;
+		for	NewtonIter=0:NewtonMaxit-1
+			TMP=Z(istage,:)'+Y;
+			RHS=OdeFunction1(T+rkC(istage)*H,TMP);
+			ISTATUS(Nfun)=ISTATUS(Nfun)+1;
+			RHS=H*rkGamma*RHS;
+			RHS=RHS-Z(istage,:)';
+            RHS=RHS+G;
+			[RHS,ISTATUS]=SDIRK_Solve(H,N,E1L,E1U,RHS,ISTATUS);
+			NewtonIncrement = SDIRK_ErrorNorm(N,RHS,SCAL);
+			if(NewtonIter==0)
+				Theta = abs(ThetaMin);
+				NewtonRate = 2.0;
+			else
+				Theta = NewtonIncrement/NewtonIncrementOld;
+				if (Theta < 0.99)
+					NewtonRate = Theta/(1-Theta);
+					NewtonPredictedErr = NewtonIncrement*Theta^((NewtonMaxit - (NewtonIter+1))/(ONE-Theta));
+					if(NewtonPredictedErr>=NewtonTol)
+						Qnewton = min(10,NewtonPredictedErr/NewtonTol);
+						Fac = 0.8*Qnewton ^(-ONE/(NewtonMaxit-NewtonIter));
+						break;
+					end
+				else
+					break;
+				end
+			end;
+			NewtonIncrementOld = NewtonIncrement;
+			Z(istage,:)=Z(istage,:)+RHS';
+			NewtonDone=(NewtonRate*NewtonIncrement<=NewtonTol);
+			if(NewtonDone == 1)
+				break;
+			end;
+		end;
+
+		if(NewtonDone == 0)
+			H=Fac*H;
+			Reject =1;
+			SkipJac = 1;
+			SkipLU = 0;
+			CycleTloop = 1;
+		end;
+		if(CycleTloop == 1)
+			CycleTloop = 0;
+			break;
+		end
+	end;
+	if(CycleTloop==0)
+	%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+	%~~~~ Error Estimation ~~~~~~~~~~~~~~%
+	%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+	ISTATUS(Nstp) = ISTATUS(Nstp)+1;
+	TMP = zeros(N,1);
+    rr=rkE(1:rkS);
+    TMP = (rr*Z)';
+	
+	[TMP,ISTATUS]=	SDIRK_Solve(H,N,E1L,E1U,TMP,ISTATUS);
+	Err = SDIRK_ErrorNorm (N,TMP,SCAL);
+	%/*~~~~> Computation of new step size Hnew */
+
+	Fac = FacSafe *Err^(-ONE/rkELO);
+	Fac = max (FacMin, min(FacMax,Fac));
+    Hnew = H*Fac;
+	%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+	%/*~~~>  Accept/Reject step    */
+	%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+	if(Err < ONE)
+		FirstStep = 0;
+		ISTATUS(Nacc)=ISTATUS(Nacc)+1;
+		T=T+H;
+        Y=Y+(rkD(1:rkS)*Z)';
+		SCAL = SDIRK_ErrorScale(N,ITOL,AbsTol,RelTol,Y);
+		Hnew = Tdirection*min(abs(Hnew),Hmax);
+		RSTATUS(Ntexit)=T;
+		RSTATUS(Nhexit)=H;
+		RSTATUS(Nhnew)=Hnew;
+		if(Reject == 1)
+			Hnew = Tdirection*min(abs(Hnew),abs(H));
+		end;
+		Reject = 0;
+		if((T+Hnew/Qmin - T2)*Tdirection > ZERO)
+			H=T2-T;
+		else
+			Hratio = Hnew/H;
+			SkipLU = ((Theta<=ThetaMin) && (Hratio >=Qmin) && (Hratio<=Qmax));
+			if(SkipLU==0)
+				H=Hnew;
+			end
+		end
+		SkipJac = (Theta<=ThetaMin);
+		SkipJac = 0;
+	else
+		if(FirstStep==1 || Reject==1)
+			H=FacRej*H;
+		else
+			H=Hnew;
+		end;
+		Reject=1;
+		SkipJac =1;
+		SkipLU=0;
+		if(ISTATUS(Nacc)>=1)
+			ISTATUS(Nrej)=ISTATUS(Nrej)+1;
+		end
+	end
+	end
+end
+
+Ierr =1;
+return;
+
+
+
+
+function [SCAL] = SDIRK_ErrorScale(N,ITOL,AbsTol,RelTol,Y)
+ZERO =0;
+if(ITOL==ZERO)
+    temp = RelTol(1)*Y;
+    temp =(AbsTol(1)+abs(temp));
+    SCAL=1./temp;
+else
+    SCAL=1./(AbsTol+RelTol.*abs(Y));
+end
+return;
+
+
+function [Err] = SDIRK_ErrorNorm(N,Y,SCAL)
+ZERO=0;
+temp=Y.*Y.*SCAL.*SCAL;
+Err=sum(temp);
+Err = max(sqrt(Err/N),1e-10);
+return
+
+
+function SDIRK_ErrorMsg(code,T,H,Ierr)
+Ierr = code;
+
+disp('\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
+disp('\nForced exit from Sdirk due to the following error:\n');
+
+switch (code) 
+
+case -1
+	disp('--> Improper value for maximal no of steps');
+	
+case -2
+	disp('--> Selected SDIRK method not implemented');
+	
+case -3
+	printf('--> Hmin/Hmax/Hstart must be positive');
+	
+case -4
+	printf('--> FacMin/FacMax/FacRej must be positive');
+	
+case -5
+	printf('-> Improper tolerance values');
+case -6
+	disp('--> No of steps exceeds maximum bound');
+case -7
+	disp('--> Step size too small (T + H/10 = T) or H < Roundoff');
+case -8
+	printf('--> Matrix is repeatedly singular');
+
+end;
+return
+
+
+function [E1L,E1U,ISTATUS,ISING]=PrepareMatrix(N,H,T,Y,FJAC,SkipJac, SkipLU,Reject,ISTATUS,OdeJacobian1)
+global ZERO Njac  Ndec  Nsng 
+global rkGamma 
+
+
+ConsecutiveSng = 0;
+ISING =1;
+while (ISING ~= ZERO)
+    HGammaInv = 1/(H*rkGamma);
+    if(SkipJac == 0)
+        FJAC = OdeJacobian1(T,Y);
+        ISTATUS(Njac)=ISTATUS(Njac)+1;
+    end;
+    E=eye(N);
+    E=HGammaInv*E-FJAC;
+    
+    [E1L,E1U] = lu(E);
+    if(min(rank(E1L),rank(E1U))<N)
+        ISING = 1;
+    else
+        ISING = 0;
+    end;
+    ISTATUS(Ndec) =ISTATUS(Ndec)+1;
+    if(ISING ~= 0 )
+        ISTATUS(Nsng)=ISTATUS(Nsng)+1;
+        ConsecutiveSng=ConsecutiveSng+1;
+        
+        if(ConsecutiveSng >= 6)
+            return;
+        end
+        H = 0.5*H;
+        SkipJac =1;
+        SkipLU = 0;
+        Reject =1 ;
+    end;
+end
+return;
+
+
+function [RHS,ISTATUS] = SDIRK_Solve(H,N,E1L,E1U,RHS,ISTATUS)
+global  Nsol 
+global  rkGamma 
+
+HGammaInv = 1/(H*rkGamma);
+RHS = HGammaInv*RHS;
+size(RHS);
+size(E1L);
+size(E1U);
+temp = E1L\RHS;
+RHS = E1U\temp;
+ISTATUS(Nsol)=ISTATUS(Nsol)+1;
+return
+
+function Sdirk4a()
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
+global ZERO ONE 
+global  S4A  sdMethod rkS rkGamma rkA rkB rkELO rkBhat
+global rkC rkD rkE rkTheta rkAlpha
+sdMethod = S4A;
+
+%/* Number of stages */
+rkS = 5;
+
+%/* Method Coefficients */
+rkGamma = 0.2666666666666666666666666666666667;
+
+rkA(1,1) = 0.2666666666666666666666666666666667;
+rkA(1,2) = 0.5000000000000000000000000000000000;
+rkA(2,2) = 0.2666666666666666666666666666666667;
+rkA(1,3) = 0.3541539528432732316227461858529820;
+rkA(2,3) = -0.5415395284327323162274618585298197e-01;
+rkA(3,3) = 0.2666666666666666666666666666666667;
+rkA(1,4) = 0.8515494131138652076337791881433756e-01;
+rkA(2,4) = -0.6484332287891555171683963466229754e-01;
+rkA(3,4) = 0.7915325296404206392428857585141242e-01;
+rkA(4,4) = 0.2666666666666666666666666666666667;
+rkA(1,5) = 2.100115700566932777970612055999074;
+rkA(2,5) = -0.7677800284445976813343102185062276;
+rkA(3,5) = 2.399816361080026398094746205273880;
+rkA(4,5) = -2.998818699869028161397714709433394;
+rkA(5,5) = 0.2666666666666666666666666666666667;
+rkB(1) = 2.100115700566932777970612055999074;
+rkB(2) = -0.7677800284445976813343102185062276;
+rkB(3) = 2.399816361080026398094746205273880;
+rkB(4) = -2.998818699869028161397714709433394;
+rkB(5) = 0.2666666666666666666666666666666667;
+
+rkBhat(1) = 2.885264204387193942183851612883390;
+rkBhat(2) = -0.1458793482962771337341223443218041;
+rkBhat(3) = 2.390008682465139866479830743628554;
+rkBhat(4) = -4.129393538556056674929560012190140;
+rkBhat(5) = ZERO;
+
+rkC(1) = 0.2666666666666666666666666666666667;
+rkC(2) = 0.7666666666666666666666666666666667;
+rkC(3) = 0.5666666666666666666666666666666667;
+rkC(4) = 0.3661315380631796996374935266701191;
+rkC(5) = ONE;
+
+%/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+rkD(1) = ZERO;
+rkD(2) = ZERO;
+rkD(3) = ZERO;
+rkD(4) = ZERO;
+rkD(5) = ONE;
+
+%/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+rkE(1) = -0.6804000050475287124787034884002302;
+rkE(2) = 1.558961944525217193393931795738823;
+rkE(3) = -13.55893003128907927748632408763868;
+rkE(4) = 15.48522576958521253098585004571302;
+rkE(5) = ONE;
+
+%/* Local order of Err estimate */
+rkELO = 4;
+
+%/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+rkTheta(1,2) = 1.875000000000000000000000000000000;
+rkTheta(1,3) = 1.708847304091539528432732316227462;
+rkTheta(2,3) = -0.2030773231622746185852981969486824;
+rkTheta(1,4) = 0.2680325578937783958847157206823118;
+rkTheta(2,4) = -0.1828840955527181631794050728644549;
+rkTheta(3,4) = 0.2968246986151577397160821594427966;
+rkTheta(1,5) = 0.9096171815241460655379433581446771;
+rkTheta(2,5) = -3.108254967778352416114774430509465;
+rkTheta(3,5) = 12.33727431701306195581826123274001;
+rkTheta(4,5) = -11.24557012450885560524143016037523;
+
+%/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+rkAlpha(1,2) = 2.875000000000000000000000000000000;
+rkAlpha(1,3) = 0.8500000000000000000000000000000000;
+rkAlpha(2,3) = 0.4434782608695652173913043478260870;
+rkAlpha(1,4) = 0.7352046091658870564637910527807370;
+rkAlpha(2,4) = -0.9525565003057343527941920657462074e-01;
+rkAlpha(3,4) = 0.4290111305453813852259481840631738;
+rkAlpha(1,5) = -16.10898993405067684831655675112808;
+rkAlpha(2,5) = 6.559571569643355712998131800797873;
+rkAlpha(3,5) = -15.90772144271326504260996815012482;
+rkAlpha(4,5) = 25.34908987169226073668861694892683;
+
+rkELO = 4.0;
+
+% /* end Sdirk4a */
+
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+function Sdirk4b()
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+global ZERO ONE 
+global  S4B sdMethod rkS rkGamma rkA rkB rkELO rkBhat
+global rkC rkD rkE rkTheta rkAlpha
+
+sdMethod = S4B;
+
+%/* Number of stages */
+rkS = 5;
+
+%/* Method coefficients */
+rkGamma = 0.25;
+
+rkA(1,1) = 0.25;
+rkA(1,2) = 0.5;
+rkA(2,2) = 0.25;
+rkA(1,3) = 0.34;
+rkA(2,3) = -0.40e-01;
+rkA(3,3) = 0.25;
+rkA(1,4) = 0.2727941176470588235294117647058824;
+rkA(2,4) = -0.5036764705882352941176470588235294e-01;
+rkA(3,4) = 0.2757352941176470588235294117647059e-01;
+rkA(4,4) = 0.25;
+rkA(1,5) = 1.041666666666666666666666666666667;
+rkA(2,5) = -1.020833333333333333333333333333333;
+rkA(3,5) = 7.812500000000000000000000000000000;
+rkA(4,5) = -7.083333333333333333333333333333333;
+rkA(5,5) = 0.25;
+
+rkB(1) = 1.041666666666666666666666666666667;
+rkB(2) = -1.020833333333333333333333333333333;
+rkB(3) = 7.812500000000000000000000000000000;
+rkB(4) = -7.083333333333333333333333333333333;
+rkB(5) = 0.250000000000000000000000000000000;
+
+rkBhat(1) = 1.069791666666666666666666666666667;
+rkBhat(2) = -0.894270833333333333333333333333333;
+rkBhat(3) = 7.695312500000000000000000000000000;
+rkBhat(4) = -7.083333333333333333333333333333333;
+rkBhat(5) = 0.212500000000000000000000000000000;
+
+rkC(1) = 0.25;
+rkC(2) = 0.75;
+rkC(3) = 0.55;
+rkC(4) = 0.5;
+rkC(5) = ONE;
+
+%/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+rkD(1) = ZERO;
+rkD(2) = ZERO;
+rkD(3) = ZERO;
+rkD(4) = ZERO;
+rkD(5) = ONE;
+
+%/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+rkE(1) = 0.5750;
+rkE(2) = 0.2125;
+rkE(3) = -4.6875;
+rkE(4) = 4.2500;
+rkE(5) = 0.1500;
+
+%/* Local order of Err estimate */
+rkELO = 4;
+
+%/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+rkTheta(1,2) = 2.0;
+rkTheta(1,3) = 1.680000000000000000000000000000000;
+rkTheta(2,3) = -0.1600000000000000000000000000000000;
+rkTheta(1,4) = 1.308823529411764705882352941176471;
+rkTheta(2,4) = -0.1838235294117647058823529411764706;
+rkTheta(3,4) = 0.1102941176470588235294117647058824;
+rkTheta(1,5) = -3.083333333333333333333333333333333;
+rkTheta(2,5) = -4.291666666666666666666666666666667;
+rkTheta(3,5) = 34.37500000000000000000000000000000;
+rkTheta(4,5) = -28.3333333333333333333333333333;
+
+%/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+rkAlpha(1,2) = 3.0;
+rkAlpha(1,3) = 0.8800000000000000000000000000000000;
+rkAlpha(2,3) = 0.4400000000000000000000000000000000;
+rkAlpha(1,4) = 0.1666666666666666666666666666666667;
+rkAlpha(2,4) = -0.8333333333333333333333333333333333e-01;
+rkAlpha(3,4) = 0.9469696969696969696969696969696970;
+rkAlpha(1,5) = -6.0;
+rkAlpha(2,5) = 9.0;
+rkAlpha(3,5) = -56.81818181818181818181818181818182;
+rkAlpha(4,5) = 54.0;
+
+ %/* end Sdirk4b */
+
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+function Sdirk2a()
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+global ZERO ONE 
+global  S2A  sdMethod rkS rkGamma rkA rkB rkELO rkBhat
+global rkC rkD rkE rkTheta rkAlpha
+
+sdMethod = S2A;
+
+%/* ~~~> Number of stages    */
+rkS = 2;
+
+%/* ~~~> Method coefficients    */
+rkGamma = 0.2928932188134524755991556378951510;
+rkA(1,1) = 0.2928932188134524755991556378951510;
+rkA(1,2) = 0.7071067811865475244008443621048490;
+rkA(2,2) = 0.2928932188134524755991556378951510;
+rkB(1) = 0.7071067811865475244008443621048490;
+rkB(2) = 0.2928932188134524755991556378951510;
+rkBhat(1) = 0.6666666666666666666666666666666667;
+rkBhat(2) = 0.3333333333333333333333333333333333;
+rkC(1) = 0.292893218813452475599155637895151;
+rkC(2) = ONE;
+
+%/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD(1) = ZERO;
+rkD(2) = ONE;
+
+%/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE(1) = 0.4714045207910316829338962414032326;
+rkE(2) = -0.1380711874576983496005629080698993;
+
+%/* ~~~> Local order of Err estimate    */
+rkELO = 2;
+
+%/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta(1,2) = 2.414213562373095048801688724209698;
+
+%/* ~~~> Starting value for Newton iterations */
+rkAlpha(1,2) = 3.414213562373095048801688724209698;
+
+% /* end Sdirk2a */
+
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+function Sdirk2b()
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+global ZERO ONE 
+global  S2B  sdMethod rkS rkGamma rkA rkB rkELO rkBhat
+global rkC rkD rkE rkTheta rkAlpha
+
+sdMethod = S2B;
+
+%/* ~~~> Number of stages    */
+rkS      = 2;
+
+%/* ~~~> Method coefficients    */
+rkGamma = 1.707106781186547524400844362104849;
+rkA(1,1) = 1.707106781186547524400844362104849;
+rkA(1,2) = -0.707106781186547524400844362104849;
+rkA(2,2) = 1.707106781186547524400844362104849;
+rkB(1) = -0.707106781186547524400844362104849;
+rkB(2) = 1.707106781186547524400844362104849;
+rkBhat(1) = 0.6666666666666666666666666666666667;
+rkBhat(2) = 0.3333333333333333333333333333333333;
+rkC(1) = 1.707106781186547524400844362104849;
+rkC(2) = ONE;
+
+%/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD(1) = ZERO;
+rkD(2) = ONE;
+
+%/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE(1) = -0.4714045207910316829338962414032326;
+rkE(2) = 0.8047378541243650162672295747365659;
+
+%/* ~~~> Local order of Err estimate    */
+rkELO = 2;
+
+%/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta(1,2) = -0.414213562373095048801688724209698;
+
+%/* ~~~> Starting value for Newton iterations */
+rkAlpha(1,2) = 0.5857864376269049511983112757903019;
+
+% /* end Sdirk2b */
+
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+function Sdirk3a()
+%/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+global ZERO ONE 
+global  S3A  sdMethod rkS rkGamma rkA rkB rkELO rkBhat
+global rkC rkD rkE rkTheta rkAlpha
+
+sdMethod = S3A;
+
+%/* ~~~> Number of stages    */
+rkS = 3;
+
+%/* ~~~> Method coefficients    */
+rkGamma = 0.2113248654051871177454256097490213;
+rkA(1,1) = 0.2113248654051871177454256097490213;
+rkA(1,2) = 0.2113248654051871177454256097490213;
+rkA(2,2) = 0.2113248654051871177454256097490213;
+rkA(1,3) = 0.2113248654051871177454256097490213;
+rkA(2,3) = 0.5773502691896257645091487805019573;
+rkA(3,3) = 0.2113248654051871177454256097490213;
+rkB(1) = 0.2113248654051871177454256097490213;
+rkB(2) = 0.5773502691896257645091487805019573;
+rkB(3) = 0.2113248654051871177454256097490213;
+rkBhat(1)= 0.2113248654051871177454256097490213;
+rkBhat(2)= 0.6477918909913548037576239837516312;
+rkBhat(3)= 0.1408832436034580784969504064993475;
+rkC(1) = 0.2113248654051871177454256097490213;
+rkC(2) = 0.4226497308103742354908512194980427;
+rkC(3) = ONE;
+
+%/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}    */
+rkD(1) = ZERO;
+rkD(2) = ZERO;
+rkD(3) = ONE;
+
+%/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}    */
+rkE(1) = 0.9106836025229590978424821138352906;
+rkE(2) = -1.244016935856292431175815447168624;
+rkE(3) = 0.3333333333333333333333333333333333;
+
+%/* ~~~> Local order of Err estimate    */
+rkELO    = 2;
+
+%/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}    */
+rkTheta(1,2) =  ONE;
+rkTheta(1,3) = -1.732050807568877293527446341505872;
+rkTheta(2,3) = 2.732050807568877293527446341505872;
+
+%/* ~~~> Starting value for Newton iterations */
+rkAlpha(1,2) = 2.0;
+rkAlpha(1,3) = -12.92820323027550917410978536602349;
+rkAlpha(2,3) = 8.83012701892219323381861585376468;
+
+% /* end Sdirk3a */    
+
+
+      
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.c
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.c	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.c	(revision 3477)
@@ -0,0 +1,1705 @@
+
+#define MAX(a,b) ( ((a) >= (b)) ? (a):(b)  )
+#define MIN(b,c) ( ((b) < (c))  ? (b):(c)  )
+#define ABS(x)	 ( ((x) >= 0 )  ? (x):(-x) )
+#define SIGN(x,y)( ( (x*y) >= 0 ) ?(x):(-x) )
+#define SQRT(d)  ( pow((d),0.5)  )
+
+/* Numerical Constants */
+#define ZERO	    (KPP_REAL)0.0
+#define ONE	    (KPP_REAL)1.0
+#define HALF        (KPP_REAL)0.5
+#define DeltaMin    (KPP_REAL)1.0e-5
+enum boolean { FALSE=0, TRUE=1 };
+  
+/*~~~>  Statistics on the work performed by the SDIRK method */
+enum statistics { Nfun=1, Njac=2, Nstp=3, Nacc=4, Nrej=5, Ndec=6, Nsol=7, 
+		  Nsng=8, Ntexit=1, Nhexit=2, Nhnew=3 };
+
+/*~~~>  SDIRK method coefficients, up to 5 stages */
+int Smax = 5;
+enum ros_Params { S2A=1, S2B=2, S3A=3, S4A=4, S4B=5 };
+KPP_REAL rkGamma, rkA[5][5], rkB[5], rkC[5], rkD[5], rkE[5], 
+  rkBhat[5], rkELO, rkAlpha[5][5], rkTheta[5][5];
+int sdMethod, rkS; /* The number of stages */
+
+/*~~~>  Checkpoints in memory buffers */
+int stack_ptr = -1; /* last written entry in checkpoint */
+KPP_REAL *chk_H, *chk_T;
+KPP_REAL **chk_Y;
+KPP_REAL ***chk_Z;
+int **chk_P;
+#ifdef FULL_ALGEBRA
+  KPP_REAL ***chk_J;
+#else
+  KPP_REAL **chk_J;
+#endif
+
+/* Function Headers */
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] );
+int SDIRKADJ( int N, int NADJ, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[],
+	      KPP_REAL Lambda[][NVAR], KPP_REAL RelTol[], KPP_REAL AbsTol[], 
+	      KPP_REAL RelTol_adj[][NVAR], KPP_REAL AbsTol_adj[][NVAR], 
+	      KPP_REAL RCNTRL[], int ICNTRL[], KPP_REAL RSTATUS[], 
+	      int ISTATUS[]);
+int SDIRK_FwdInt( int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+		  KPP_REAL Hmax, KPP_REAL Hmin, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+		  int ISTATUS[], KPP_REAL RSTATUS[], int Max_no_steps, 
+		  int NewtonMaxit, KPP_REAL NewtonTol, KPP_REAL ThetaMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax, 
+		  KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int ITOL, 
+		  int SaveLU );
+int SDIRK_DadjInt( int N, int NADJ, KPP_REAL Lambda[][NVAR], int SaveLU, 
+		   int ISTATUS[], int ITOL, KPP_REAL AbsTol_adj[][NVAR], 
+		   KPP_REAL RelTol_adj[][NVAR], int NewtonMaxit,
+		   KPP_REAL ThetaMin, KPP_REAL NewtonTol, int DirectADJ );
+void SDIRK_AllocBuffers( int Max_no_steps, int rkS, int SaveLU );
+void SDIRK_FreeBuffers( int Max_no_steps, int SaveLU );
+void SDIRK_Push( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL Z[][NVAR], 
+		 KPP_REAL E[], int P[], int Max_no_steps, int SaveLU );
+void SDIRK_Pop( KPP_REAL* T, KPP_REAL* H, KPP_REAL* Y, KPP_REAL* Z, 
+		KPP_REAL* E, int* P, int SaveLU );
+void SDIRK_ErrorScale( int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+		       KPP_REAL Y[],KPP_REAL SCAL[]);
+KPP_REAL SDIRK_ErrorNorm( int N, KPP_REAL Y[], KPP_REAL SCAL[] );
+int SDIRK_ErrorMsg( int code, KPP_REAL T, KPP_REAL H );
+void SDIRK_PrepareMatrix( KPP_REAL H, KPP_REAL T, KPP_REAL Y[], KPP_REAL FJAC[],
+			  int SkipJac, int SkipLU, KPP_REAL E[], int IP[], 
+			  int Reject, int ISING, int ISTATUS[] );
+void SDIRK_Solve ( char Transp, KPP_REAL H, int N, KPP_REAL E[], 
+		   int IP[], int ISING, KPP_REAL RHS[], int ISTATUS[] );
+void Sdirk4a();
+void Sdirk4b();
+void Sdirk2a();
+void Sdirk2b();
+void Sdirk3a();
+void FUN_CHEM( KPP_REAL T, KPP_REAL Y[], KPP_REAL P[] );
+void JAC_CHEM( KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[] );
+KPP_REAL WLAMCH( char C );
+void Set2Zero( int N, KPP_REAL Y[] );
+void WAXPY( int N, KPP_REAL Alpha, KPP_REAL X[], int incX, KPP_REAL Y[], 
+	    int incY );
+void WADD( int N, KPP_REAL Y[], KPP_REAL Z[], KPP_REAL TMP[] );
+void WSCAL( int N, KPP_REAL Alpha, KPP_REAL X[], int incX );
+void JacTR_SP_Vec( KPP_REAL Jac[], KPP_REAL Fcn[], KPP_REAL K[] );
+void KppSolve( KPP_REAL A[], KPP_REAL b[] );
+void KppSolveTR( KPP_REAL JVS[], KPP_REAL X[], KPP_REAL XX[] );
+int KppDecomp( KPP_REAL A[] );
+void Update_SUN();
+void Update_RCONST();
+void Fun( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+void Jac_SP( KPP_REAL Y[], KPP_REAL FIX[], KPP_REAL RCONST[], KPP_REAL Ydot[] );
+void Set2Zero( int N, KPP_REAL Y[] );
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void INTEGRATE_ADJ( int NADJ, KPP_REAL Y[], KPP_REAL Lambda[][NVAR], 
+		    KPP_REAL TIN, KPP_REAL TOUT, KPP_REAL ATOL_adj[][NVAR], 
+		    KPP_REAL RTOL_adj[][NVAR], int ICNTRL_U[], 
+		    KPP_REAL RCNTRL_U[], int ISTATUS_U[], 
+		    KPP_REAL RSTATUS_U[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  //int Ntotal = 0;
+  KPP_REAL RCNTRL[20], RSTATUS[20], T1, T2;
+  int ICNTRL[20], ISTATUS[20], Ierr, i;
+
+  for(i=0; i<20; i++) {
+    ICNTRL[i] = 0;
+    RCNTRL[i] = (KPP_REAL)0.0;
+    ISTATUS[i] = 0;
+    RSTATUS[i] = (KPP_REAL)0.0;
+  }
+
+  /*~~~> fine-tune the integrator: */
+  ICNTRL[4] = 8;    /* Max no. of Newton iterations */
+  ICNTRL[6] = 1;   /* Adjoint solution by: 0=Newton, 1=direct */
+  ICNTRL[7] = 1;    /* Save fwd LU factorization: 0 = do *not* save, 1 = save */
+
+  /* If optional parameters are given, and if they are >0, 
+     then they overwrite default settings. */ 
+  //if(ICNTRL_U != NULL) { /* Check to see if ICNTRL_U is not NULL */
+  //  for(i=0; i<20; i++) {
+  //	if(ICNTRL_U[i] > 0)
+  //	  ICNTRL[i] = ICNTRL_U[i];
+  //  }
+  //}
+  //
+  //if(RCNTRL_U != NULL) { /* Check to see if RCNTRL_U is not NULL */
+  //  for(i=0; i<20; i++) {
+  //	if(RCNTRL_U[i] > 0)
+  //	  RCNTRL[i] = RCNTRL_U[i];
+  //  }
+  //}
+  
+  T1 = TIN; 
+  T2 = TOUT;
+  Ierr = SDIRKADJ( NVAR, NADJ, T1, T2, Y, Lambda, RTOL, ATOL, ATOL_adj, 
+		   RTOL_adj, RCNTRL, ICNTRL, RSTATUS, ISTATUS );
+
+  /*~~~> Debug option: number of steps */
+  // Ntotal = Ntotal + ISTATUS(Nstp)
+  // printf( "NSTEP=%d Ntotal=%d O3=%e NO2=%e\n", ISTATUS(Nstp), Ntotal, 
+  //          VAR(ind_O3), VAR(ind_NO2) );    
+
+  if (Ierr < 0)
+    printf("SDIRK: Unsuccessful exit at T=%f (Ierr=%d)\n", TIN, Ierr );
+   
+  /* if optional parameters are given for output they to return information */
+  //if(ISTATUS_U != NULL) { /* Check to see if ISTATUS_U is not NULL */
+  //	for(i=0; i<20; i++)
+  //	  ISTATUS_U[i] = ISTATUS[i];
+  //} 
+  //
+  //if(RSTATUS_U != NULL) { /* Check to see if RSTATUS_U is not NULL */
+  //	for(i=0; i<20; i++)
+  //	  RSTATUS_U[i] = RSTATUS[i];
+  //}
+  //
+  //Ierr_U = Ierr;
+  
+} /* END of SUBROUTINE INTEGRATE_ADJ */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRKADJ( int N, int NADJ, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[],
+	      KPP_REAL Lambda[][NVAR], KPP_REAL RelTol[], KPP_REAL AbsTol[], 
+	      KPP_REAL RelTol_adj[][NVAR], KPP_REAL AbsTol_adj[][NVAR], 
+	      KPP_REAL RCNTRL[], int ICNTRL[], KPP_REAL RSTATUS[], 
+	      int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+    Runge-Kutta (SDIRK) method.
+
+    This implementation is based on the book and the code Sdirk4:
+
+      E. Hairer and G. Wanner
+      "Solving ODEs II. Stiff and differential-algebraic problems".
+      Springer series in computational mathematics, Springer-Verlag, 1996.
+    This code is based on the SDIRK4 routine in the above book.
+
+    Methods:
+            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+
+    (C)  Adrian Sandu, July 2005
+    Virginia Polytechnic Institute and State University
+    Contact: sandu@cs.vt.edu
+    Revised by Philipp Miehe and Adrian Sandu, May 2006     
+    Translation F90 to C by Paul Eller, May 2007
+    This implementation is part of KPP - the Kinetic PreProcessor
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>   INPUT ARGUMENTS:
+
+-     Y[NVAR]    = vector of initial conditions (at T=Tinitial)
+-    [Tinitial,Tfinal]  = time range of integration
+     (if Tinitial>Tfinal the integration is performed backwards in time)
+-    RelTol, AbsTol = user precribed accuracy
+- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+                       returns Ydot = Y' = F(T,Y)
+- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+                       returns Jcb = dF/dY
+-    ICNTRL[1:20]    = integer inputs parameters
+-    RCNTRL[1:20]    = real inputs parameters
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT ARGUMENTS:
+
+-    Y[NVAR]         -> vector of final states (at T->Tfinal)
+-    ISTATUS[0:19]   -> integer output parameters
+-    RSTATUS[0:19]   -> real output parameters
+-    Ierr            -> job status upon return
+                        success (positive value) or
+                        failure (negative value)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     INPUT PARAMETERS:
+
+    Note: For input parameters equal to zero the default values of the
+       corresponding variables are used.
+
+    Note: For input parameters equal to zero the default values of the
+          corresponding variables are used.
+~~~>  
+    ICNTRL[0] = not used
+
+    ICNTRL[1] = 0: AbsTol, RelTol are NVAR-dimensional vectors
+              = 1: AbsTol, RelTol are scalars
+
+    ICNTRL[2] = Method
+
+    ICNTRL[3]  -> maximum number of integration steps
+        For ICNTRL[3]=0 the default value of 1500 is used
+        Note: use a conservative estimate, since the checkpoint
+              buffers are allocated to hold Max_no_steps
+
+    ICNTRL[4]  -> maximum number of Newton iterations
+        For ICNTRL[4]=0 the default value of 8 is used
+
+    ICNTRL[5]  -> starting values of Newton iterations:
+        ICNTRL[5]=0 : starting values are interpolated (the default)
+        ICNTRL[5]=1 : starting values are zero
+
+    ICNTRL[6]  -> method to solve ADJ equations:
+        ICNTRL[6]=0 : modified Newton re-using LU (the default)
+        ICNTRL[6]=1 : direct solution(additional one LU factorization per stage)
+
+    ICNTRL[7]  -> checkpointing the LU factorization at each step:
+        ICNTRL[7]=0 : do *not* save LU factorization (the default)
+        ICNTRL[7]=1 : save LU factorization
+        Note: if ICNTRL[6]=1 the LU factorization is *not* saved
+
+~~~>  Real parameters
+
+    RCNTRL[0]  -> Hmin, lower bound for the integration step size
+                  It is strongly recommended to keep Hmin = ZERO
+    RCNTRL[1]  -> Hmax, upper bound for the integration step size
+    RCNTRL[2]  -> Hstart, starting value for the integration step size
+
+    RCNTRL[3]  -> FacMin, lower bound on step decrease factor (default=0.2)
+    RCNTRL[4]  -> FacMax, upper bound on step increase factor (default=6)
+    RCNTRL[5]  -> FacRej, step decrease factor after multiple rejections
+                 (default=0.1)
+    RCNTRL[6]  -> FacSafe, by which the new step is slightly smaller
+                  than the predicted value  (default=0.9)
+    RCNTRL[7]  -> ThetaMin. If Newton convergence rate smaller
+                  than ThetaMin the Jacobian is not recomputed;
+                  (default=0.001)
+    RCNTRL[8]  -> NewtonTol, stopping criterion for Newton's method
+                  (default=0.03)
+    RCNTRL[9] -> Qmin
+    RCNTRL[10] -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+                  step size is kept constant and the LU factorization
+                  reused (default Qmin=1, Qmax=1.2)
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+~~~>     OUTPUT PARAMETERS:
+
+    Note: each call to Rosenbrock adds the current no. of fcn calls
+      to previous value of ISTATUS[0], and similar for the other params.
+      Set ISTATUS[1:10] = 0 before call to avoid this accumulation.
+
+    ISTATUS[0] = No. of function calls
+    ISTATUS[1] = No. of jacobian calls
+    ISTATUS[2] = No. of steps
+    ISTATUS[3] = No. of accepted steps
+    ISTATUS[4] = No. of rejected steps (except at the beginning)
+    ISTATUS[5] = No. of LU decompositions
+    ISTATUS[6] = No. of forward/backward substitutions
+    ISTATUS[7] = No. of singular matrix decompositions
+
+    RSTATUS[0]  -> Texit, the time corresponding to the
+                   computed Y upon return
+    RSTATUS[1]  -> Hexit,last accepted step before return
+    RSTATUS[2]  -> Hnew, last predicted step before return
+        For multiple restarts, use Hnew as Hstart in the following run
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/* Local variables */     
+  KPP_REAL Hmin=0.0, Hmax=0.0, Hstart=0.0, Roundoff, FacMin=0.0, FacMax=0.0, 
+    FacSafe=0.0, FacRej=0.0, ThetaMin, NewtonTol,Qmin, Qmax;
+  int SaveLU, DirectADJ; /* Boolean variables */                 
+  int ITOL, NewtonMaxit, Max_no_steps=0, i, Ierr=0;
+
+  stack_ptr = -1;
+
+/*~~~>  Initialize statistics */
+  for(i=0; i<20; i++) {
+    ISTATUS[i] = 0;
+    RSTATUS[i] = ZERO;
+  }
+
+/*~~~>  For Scalar tolerances (ICNTRL[1] != 0)  the code uses AbsTol[0] 
+            and RelTol[0]
+	For Vector tolerances (ICNTRL[1] == 0) the code uses AbsTol[0:NVAR-1] 
+            and RelTol[0:NVAR-1]*/
+  if (ICNTRL[1]==0)
+    ITOL = 1;
+  else
+    ITOL = 0;
+
+/*~~~> ICNTRL(3) - method selection */
+  switch (ICNTRL[2]) {
+    case 0:
+    case 1:
+      Sdirk2a();
+      break;
+    case 2:
+      Sdirk2b();
+      break;
+    case 3:
+      Sdirk3a();
+      break;
+    case 4:
+      Sdirk4a();
+      break;
+    case 5:
+      Sdirk4b();
+      break;
+    default:
+      Sdirk2a();
+  }
+      
+/*~~~>   The maximum number of time steps admitted */
+  if (ICNTRL[3] == 0)
+    Max_no_steps = 200000;
+  else if (ICNTRL[3] > 0)
+    Max_no_steps = ICNTRL[3];
+  else {
+    printf("User-selected ICNTRL(4)=%d", ICNTRL[3]);
+    Ierr = SDIRK_ErrorMsg(-1,Tinitial,ZERO);
+  }
+
+/*~~~>The maximum number of Newton iterations admitted */
+  if(ICNTRL[4]==0)
+    NewtonMaxit = 8;
+  else {
+    NewtonMaxit=ICNTRL[4];
+    if(NewtonMaxit <=0) {
+      printf("User-selected ICNTRL(5)=%d", ICNTRL[4] );
+      Ierr = SDIRK_ErrorMsg(-2,Tinitial,ZERO);
+    }
+  }
+
+/*~~~> Solve ADJ equations directly or by Newton iterations */
+  DirectADJ = (ICNTRL[6] == 1);
+ 
+/*~~~> Save or not the forward LU factorization */
+  SaveLU = ((ICNTRL[7] != 0) && (DirectADJ == 0));
+
+/*~~~>  Unit roundoff (1+Roundoff>1) */
+  Roundoff = WLAMCH('E');
+
+/*~~~>  Lower bound on the step size: (positive value) */
+  if (RCNTRL[0] == ZERO)
+    Hmin = ZERO;
+  else if (RCNTRL[0] > ZERO)
+    Hmin = RCNTRL[0];
+  else {
+    printf("User-selected RCNTRL[0]=%f", RCNTRL[0]);
+    Ierr = SDIRK_ErrorMsg(-3,Tinitial,ZERO);
+  }
+   
+/*~~~>  Upper bound on the step size: (positive value) */
+  if (RCNTRL[1] == ZERO)
+    Hmax = ABS(Tfinal-Tinitial);
+  else if (RCNTRL[1] > ZERO)
+    Hmax = MIN( ABS(RCNTRL[1]), ABS(Tfinal-Tinitial) );
+  else {
+    printf("User-selected RCNTRL[1]=%f", RCNTRL[1]);
+    Ierr = SDIRK_ErrorMsg(-3,Tinitial,ZERO);
+  }
+
+/*~~~>  Starting step size: (positive value) */
+  if (RCNTRL[2] == ZERO)
+    Hstart = MAX( Hmin, Roundoff);
+  else if (RCNTRL[2] > ZERO)
+    Hstart = MIN( ABS(RCNTRL[2]), ABS(Tfinal-Tinitial) );
+  else {
+    printf("User-selected Hstart: RCNTRL[2]=%f", RCNTRL[2]);
+    Ierr = SDIRK_ErrorMsg(-3,Tinitial,ZERO);
+  }
+
+/*~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax */
+  if (RCNTRL[3] == ZERO)
+    FacMin = (KPP_REAL)0.2;
+  else if (RCNTRL[3] > ZERO)
+    FacMin = RCNTRL[3];
+  else {
+    printf("User-selected FacMin: RCNTRL[3]=%f", RCNTRL[3]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+   
+  if (RCNTRL[4] == ZERO)
+    FacMax = (KPP_REAL)10.0;
+  else if (RCNTRL[4] > ZERO)
+    FacMax = RCNTRL[4];
+  else {
+    printf("User-selected FacMax: RCNTRL[4]=%f", RCNTRL[4]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+
+/*~~~>   FacRej: Factor to decrease step after 2 succesive rejections */
+  if (RCNTRL[5] == ZERO)
+    FacRej = (KPP_REAL)0.1;
+  else if (RCNTRL[5] > ZERO)
+    FacRej = RCNTRL[5];
+  else {
+    printf("User-selected FacRej: RCNTRL[5]=%f", RCNTRL[5]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+
+/* ~~~>   FacSafe: Safety Factor in the computation of new step size  */
+  if (RCNTRL[6] == ZERO)
+    FacSafe = (KPP_REAL)0.9;
+  else if (RCNTRL[6] > ZERO)
+    FacSafe = RCNTRL[6];
+  else {
+    printf("User-selected FacSafe: RCNTRL[6]=%f", RCNTRL[6]);
+    Ierr = SDIRK_ErrorMsg(-4,Tinitial,ZERO);
+  }
+
+/*~~~> ThetaMin: decides whether the Jacobian should be recomputed */
+  if (RCNTRL[7] == ZERO)
+    ThetaMin = (KPP_REAL)1.0e-03;
+  else
+    ThetaMin = RCNTRL[7];
+
+/*~~~> Stopping criterion for Newton's method */
+  if (RCNTRL[8] == ZERO)
+    NewtonTol = (KPP_REAL)3.0e-02;
+  else
+    NewtonTol = RCNTRL[8];
+
+/* ~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST. */
+  if (RCNTRL[9] == ZERO)
+    Qmin = ONE;
+  else
+    Qmin = RCNTRL[9];
+
+  if (RCNTRL[10] == ZERO)
+    Qmax = (KPP_REAL)1.2;
+  else
+    Qmax = RCNTRL [10];
+
+/* ~~~>  Check if tolerances are reasonable */
+  if (ITOL == 0) {
+    if ((AbsTol[0]<=ZERO || RelTol[0])<=(((KPP_REAL)10.0)*Roundoff))
+      Ierr = SDIRK_ErrorMsg(-5,Tinitial,ZERO);
+  }
+  else {
+    for (i = 0; i < N; i++) {
+      if ((AbsTol[i]<=ZERO)||(RelTol[i]<=((KPP_REAL)10.0)*Roundoff))
+	Ierr = SDIRK_ErrorMsg(-5,Tinitial,ZERO);
+    }
+  }
+
+  if (Ierr < 0)
+    return Ierr;
+    
+/*~~~>  Allocate memory buffers */
+  SDIRK_AllocBuffers(Max_no_steps, rkS, SaveLU);
+
+/*~~~>  Call forward integration */
+  Ierr = SDIRK_FwdInt( N, Tinitial, Tfinal, Y, Hmax, Hmin, Hstart, Roundoff, 
+		       AbsTol, RelTol, ISTATUS, RSTATUS, Max_no_steps, 
+		       NewtonMaxit, NewtonTol, ThetaMin, FacSafe, FacMin, 
+		       FacMax, FacRej, Qmin, Qmax, ITOL, SaveLU );
+
+/*~~~>  Call adjoint integration */  
+  Ierr = SDIRK_DadjInt( N, NADJ, Lambda, SaveLU, ISTATUS, ITOL, AbsTol_adj, 
+			RelTol_adj, NewtonMaxit, ThetaMin, NewtonTol, 
+			DirectADJ );
+
+/*~~~>  Free memory buffers */ 
+  SDIRK_FreeBuffers(Max_no_steps, SaveLU);
+
+  return Ierr;
+
+} /* End of main SDIRK_ADJ */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_FwdInt( int N, KPP_REAL Tinitial, KPP_REAL Tfinal, KPP_REAL Y[], 
+		  KPP_REAL Hmax, KPP_REAL Hmin, KPP_REAL Hstart, 
+		  KPP_REAL Roundoff, KPP_REAL AbsTol[], KPP_REAL RelTol[], 
+		  int ISTATUS[], KPP_REAL RSTATUS[], int Max_no_steps, 
+		  int NewtonMaxit, KPP_REAL NewtonTol, KPP_REAL ThetaMin, 
+		  KPP_REAL FacSafe, KPP_REAL FacMin, KPP_REAL FacMax, 
+		  KPP_REAL FacRej, KPP_REAL Qmin, KPP_REAL Qmax, int ITOL, 
+		  int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      
+/*~~~> Local variables: */   
+  KPP_REAL Z[Smax][NVAR], G[NVAR], TMP[NVAR], NewtonRate, SCAL[NVAR], RHS[NVAR],
+    T, H, Theta=0.0, Hratio, NewtonPredictedErr, Qnewton, Err, Fac, Hnew, 
+    Tdirection, NewtonIncrement, NewtonIncrementOld=0.0;
+  int i, j, IER=0, istage, NewtonIter, IP[NVAR];
+
+  /*Boolean Variables*/
+  int Reject, FirstStep, SkipJac, SkipLU, NewtonDone, CycleTloop;
+      
+#ifdef FULL_ALGEBRA      
+  KPP_REAL FJAC[NVAR][NVAR], E[NVAR][NVAR];
+#else      
+  KPP_REAL FJAC[LU_NONZERO], E[LU_NONZERO];
+#endif
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~~>   Initializations              */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  T = Tinitial;
+  Tdirection = SIGN(ONE, Tfinal-Tinitial);
+  H = MAX(ABS(Hmin), ABS(Hstart));
+  if (ABS(H) <= ((KPP_REAL)10.0 * Roundoff))
+    H = (KPP_REAL)(1.0e-06);
+  H = MIN(ABS(H), Hmax);
+  H = SIGN(H, Tdirection);
+  SkipLU = 0;
+  SkipJac = 0;
+  Reject = 0;
+  FirstStep = 1;
+  CycleTloop = 0;
+
+  SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Time loop begins                */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  while((Tfinal-T)*Tdirection - Roundoff > ZERO) {  /* Tloop */
+
+  /*~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition */
+    if (SkipLU == 0) { /* This time around skip the Jac update and LU */
+      SDIRK_PrepareMatrix( H, T, Y, FJAC, SkipJac, SkipLU, E, IP, 
+	                   Reject, IER, ISTATUS);
+      if (IER != 0)
+	return SDIRK_ErrorMsg(-8, T, H);
+    }
+
+    if (ISTATUS[Nstp] > Max_no_steps)
+      return SDIRK_ErrorMsg(-6, T, H);
+
+    if ((T + ((KPP_REAL)0.1) * H == T) || (ABS(H) <= Roundoff)) {
+      return SDIRK_ErrorMsg(-7, T, H);
+    }
+
+    for (istage=0; istage < rkS; istage++) {  /*stages*/
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Simplified Newton iterations          */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+    /*~~~>  Starting values for Newton iterations */
+      Set2Zero(N, &Z[istage][0]);
+
+    /*~~~>   Prepare the loop-independent part of the right-hand side */
+      Set2Zero(N, G);
+      if (istage > 0) {
+	for (j=0; j < istage; j++) {
+	/* Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:)) */
+          WAXPY(N, rkTheta[j][istage], &Z[j][0], 1, G, 1);
+	/* Zi(:) = sum_j Alpha(i,j)*Zj(:) */
+	  WAXPY(N, rkAlpha[j][istage],&Z[j][0], 1, &Z[istage][0], 1);
+	}
+      }
+
+    /*~~~>  Initializations for Newton iteration */
+      NewtonDone = 0; /* false */
+      Fac = (KPP_REAL)0.5; /* Step reduction factor */
+
+      for (NewtonIter=0; NewtonIter<NewtonMaxit; NewtonIter++ ) { /*NewtonLoop*/
+      /*~~~>  Prepare the loop-dependent part of the right-hand side */
+	WADD(N, Y, &Z[istage][0], TMP); /* TMP <- Y + Zi */
+        FUN_CHEM(T+rkC[istage]*H, TMP, RHS); /* RHS <- Run(Y+Zi) */
+	ISTATUS[Nfun]++;
+      /* RHS[0:N-1] = G[0:N-1] - Z[istage][0:N-1] + (H*rkGamma)*RHS[1:N] */
+	WSCAL(N, H*rkGamma, RHS, 1);
+	WAXPY(N, -ONE, &Z[istage][0], 1, RHS, 1);
+	WAXPY(N, ONE, G, 1, RHS, 1 );
+
+      /*~~~>   Solve the linear system  */
+	SDIRK_Solve('N', H, N, E, IP, IER, RHS, ISTATUS);
+            
+      /*~~~>   Check convergence of Newton iterations */
+	NewtonIncrement = SDIRK_ErrorNorm(N, RHS, SCAL);
+	if (NewtonIter == 0) {
+	  Theta = ABS(ThetaMin);
+	  NewtonRate = (KPP_REAL)2.0;
+       	}
+	else {
+	  Theta = NewtonIncrement/NewtonIncrementOld;
+   	  if (Theta < (KPP_REAL)0.99) {
+	    NewtonRate = Theta/(ONE-Theta);
+	  /* Predict error at the end of Newton process */
+	    NewtonPredictedErr = (NewtonIncrement*pow(Theta,
+				 (NewtonMaxit - (NewtonIter+1))/(ONE - Theta)));
+	    if(NewtonPredictedErr >= NewtonTol) {
+	    /* Non-convergence of Newton: predicted error too large*/
+	      Qnewton = MIN((KPP_REAL)10.0, NewtonPredictedErr/NewtonTol);
+	      Fac = (KPP_REAL)0.8 * pow(Qnewton, (-ONE / (1 + NewtonMaxit - 
+							  NewtonIter + 1)));
+	      break;
+	    }
+	  }
+	  else  /* Non-convergence of Newton: Theta too large */ {
+	    break;
+	  }
+	}
+
+	NewtonIncrementOld = NewtonIncrement;
+
+      /* Update solution: Z(:) <-- Z(:)+RHS(:) */
+	WAXPY(N, ONE, RHS, 1, &Z[istage][0], 1);
+
+      /* Check error in Newton iterations */
+	NewtonDone=(NewtonRate*NewtonIncrement<=NewtonTol);
+	if (NewtonDone == 1)
+	  break;
+      } /* end NewtonLoop for */
+                      
+      if(NewtonDone == 0) {
+	H = Fac*H;
+	Reject = 1;
+	SkipJac = 1;
+	SkipLU = 0;
+        CycleTloop = 1;
+      } /* end if */
+
+      if (CycleTloop == 1) {
+	CycleTloop=0;
+	break;
+      }
+    /* End of implified Newton iterations */
+    } /* end stages for */
+
+    if (CycleTloop==0) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Error estimation      */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      ISTATUS[Nstp]++;
+      Set2Zero(N, TMP);
+
+      for (i=0; i<rkS; i++) {
+        if (rkE[i] != ZERO)
+	  WAXPY(N, rkE[i], &Z[i][0], 1, TMP, 1);
+      }
+
+      SDIRK_Solve('N', H, N, E, IP, IER, TMP, ISTATUS);
+      Err = SDIRK_ErrorNorm(N, TMP, SCAL);
+
+    /*~~~~> Computation of new step size Hnew */
+      Fac = FacSafe * pow((Err), (-ONE/rkELO));
+      Fac = MAX(FacMin, MIN(FacMax, Fac));
+      Hnew = H*Fac;
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+/*~~~>  Accept/Reject step    */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+      if (Err < ONE) { /*~~~> Step is accepted */
+        FirstStep = 0; /* false */
+        ISTATUS[Nacc]++;
+
+      /* Checkpoint solution */
+        SDIRK_Push( T, H, Y, Z, E, IP, Max_no_steps, SaveLU );
+
+      /*~~~> Update time and solution */
+        T = T + H;
+      /* Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:) */
+        for(i=0; i<rkS; i++) {
+	  if(rkD[i] != ZERO)
+	    WAXPY(N, rkD[i], &Z[i][0], 1, Y, 1);
+        }
+
+      /*~~~> Update scaling coefficients */
+        SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL);
+
+      /*~~~> Next time step */
+        Hnew = Tdirection*MIN(ABS(Hnew), Hmax);
+
+      /* Last T and H */
+        RSTATUS[Ntexit] = T;
+        RSTATUS[Nhexit] = H;
+        RSTATUS[Nhnew] = Hnew;
+
+      /* No step increase after a rejection */
+        if (Reject==1)
+	  Hnew = Tdirection*MIN(ABS(Hnew), ABS(H));
+        Reject = 0; /* false */
+        if ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO)
+	  H = Tfinal-T;
+        else {
+	  Hratio = Hnew/H;
+        /* If step not changed too much keep Jacobian and reuse LU */
+          SkipLU = ((Theta <= ThetaMin) && (Hratio >= Qmin) 
+		    && (Hratio <= Qmax));
+	  if (SkipLU==0)
+	    H = Hnew;
+        }
+
+        /* If convergence is fast enough, do not update Jacobian */
+        /* SkipJac = (Theta <= ThetaMin); */
+        SkipJac = 0;
+      }
+      else { /*~~~> Step is rejected */
+        if ((FirstStep==1) || (Reject==1))
+	  H = FacRej * H;
+        else  
+          H = Hnew;
+
+        Reject = 1;
+        SkipJac = 1;
+        SkipLU = 0;
+        if (ISTATUS[Nacc] >=1)
+	  ISTATUS[Nrej]++;
+
+      }
+    } /* end CycleTloop if */
+  } /* end Tloop */
+
+  /* Successful return */
+  return 1;
+
+} /* end SDIRK_FwdInt */
+         
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_DadjInt( int N, int NADJ, KPP_REAL Lambda[][NVAR], int SaveLU, 
+		   int ISTATUS[], int ITOL, KPP_REAL AbsTol_adj[][NVAR], 
+		   KPP_REAL RelTol_adj[][NVAR], int NewtonMaxit, 
+		   KPP_REAL ThetaMin, KPP_REAL NewtonTol, int DirectADJ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+/*~~~> Local variables: */
+  KPP_REAL Y[NVAR];
+  KPP_REAL Z[Smax][NVAR], U[Smax][NADJ][NVAR], TMP[NVAR], G[NVAR], NewtonRate, 
+    SCAL[NVAR], DU[NVAR], T, H, Theta, NewtonPredictedErr, NewtonIncrement, 
+    NewtonIncrementOld=0.0;
+  int i, j, IER=0, istage, iadj, NewtonIter, IP[NVAR], IP_adj[NVAR];
+  int Reject=0, SkipJac, SkipLU, NewtonDone; /* Boolean */
+      
+#ifdef FULL_ALGEBRA      
+  KPP_REAL E[NVAR][NVAR], Jac[NVAR][NVAR], E_adj[NVAR][NVAR];
+#else      
+  KPP_REAL E[LU_NONZERO], Jac[LU_NONZERO], E_adj[LU_NONZERO];
+#endif      
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  Time loop begins
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  while ( stack_ptr > -1 ) { /* Tloop */
+        
+  /*~~~>  Recover checkpoints for stage values and vectors */
+    SDIRK_Pop( &T, &H, &Y[0], &Z[0][0], &E[0], &IP[0], SaveLU );
+
+  /*~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition */
+    if (!SaveLU) {
+      SkipJac = FALSE; 
+      SkipLU = FALSE;
+      SDIRK_PrepareMatrix ( H, T, Y, Jac, SkipJac, SkipLU, E, IP, Reject, IER, 
+			    ISTATUS );
+      if (IER != 0)
+	return SDIRK_ErrorMsg(-8,T,H); 
+    }  
+
+    for( istage = rkS-1; istage >=0; istage--) { /* Stages Loop */
+    /*~~~>  Jacobian of the current stage solution */
+      for(i=0; i<N; i++)
+	TMP[i] = Y[i] + Z[istage][i];
+      JAC_CHEM(T+rkC[istage]*H,TMP,Jac);
+      ISTATUS[Njac]++;
+       
+      if (DirectADJ) {
+#ifdef FULL_ALGEBRA
+	for(i=0; i<N; i++) {
+	  for(j=0; j<N; j++)
+	    E_adj[i][j] = -Jac[i][j];
+	}
+	for(i=0; i<N; i++)
+	  E_adj[i][i] = E_adj[i][i] + ONE/(H*rkGamma);
+
+	DGETRF( N, N, E_adj, N, IP_adj, IER );
+#else
+	for(i=0; i<LU_NONZERO; i++)
+	  E_adj[i] = -Jac[i];
+	for(i=0; i<NVAR; i++) {
+	  j = LU_DIAG[i];
+	  E_adj[j] = E_adj[j] + ONE/(H*rkGamma);
+	}
+        IER = KppDecomp (E_adj);
+#endif
+	ISTATUS[Ndec]++;
+        if (IER != 0) {
+	  printf("At stage %d the matrix used in adjoint computation is " 
+		 "singular\n", istage);
+          return SDIRK_ErrorMsg(-8,T,H);
+	}
+      }
+
+      for(iadj=0; iadj<NADJ; iadj++) { /* adj loop */
+       
+      /*~~~> Update scaling coefficients */
+	for(i=0; i<NVAR; i++)
+	  SDIRK_ErrorScale(N, ITOL, &AbsTol_adj[iadj][i], &RelTol_adj[iadj][i], 
+			   &Lambda[iadj][i], SCAL);
+      
+      /*~~~>   Prepare the loop-independent part of the right-hand side
+	       G(:) = H*Jac^T*( B(i)*Lambda + sum_j A(j,i)*Uj(:) ) */
+	for(i=0; i<N; i++)
+	  G[i] = rkB[istage]*Lambda[iadj][i];
+	if (istage+1 < rkS) {
+	  for (j=istage+1; j<rkS; j++)
+	    WAXPY(N,rkA[istage][j],&U[j][iadj][0],1,G,1);
+	}
+#ifdef FULL_ALGEBRA  
+	TMP = MATMUL(TRANSPOSE(Jac),G); /* DZ <- Jac(Y+Z)*Y_tlm */
+#else      
+	JacTR_SP_Vec ( Jac, G, TMP );    
+#endif     
+	for(i=0; i<N; i++)
+	  G[i] = H*TMP[i];
+	
+	if (DirectADJ) {
+	  SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G, ISTATUS );
+	  for(i=0; i<N; i++)
+	    U[istage][iadj][i] = G[i];
+	} else {
+	  /*~~~>  Initializations for Newton iteration */
+	  Set2Zero(N,&U[istage][iadj][0]);
+	  NewtonDone = FALSE;
+            
+	  /* Newton Loop */
+	  for( NewtonIter=0; NewtonIter<NewtonMaxit; NewtonIter++) {
+
+	  /*~~~>   Prepare the loop-dependent part of the right-hand side */
+#ifdef FULL_ALGEBRA  
+	    for(i=0; i<N; i++)
+	      TMP = MATMUL(TRANSPOSE(Jac),U[istage][iadj][i]);    
+#else      
+	    for(i=0; i<N; i++)
+	      JacTR_SP_Vec ( Jac, &U[istage][iadj][i], TMP );    
+#endif      
+	    for(i=0; i<N; i++)
+	      DU[i] = U[istage][iadj][i] - (H*rkGamma)*TMP[i] - G[i];
+
+	  /*~~~>   Solve the linear system */
+            SDIRK_Solve ( 'T', H, N, E, IP, IER, DU, ISTATUS );
+            
+	  /*~~~>   Check convergence of Newton iterations */
+            NewtonIncrement = SDIRK_ErrorNorm(N, DU, SCAL);
+            if ( NewtonIter == 0 ) {
+	      Theta = ABS(ThetaMin);
+	      NewtonRate = (KPP_REAL)2.0;
+	    }
+            else {
+	      Theta = NewtonIncrement/NewtonIncrementOld;
+	      if (Theta < (KPP_REAL)0.99) {
+		NewtonRate = Theta/(ONE-Theta);
+	      /* Predict error at the end of Newton process */ 
+		NewtonPredictedErr = NewtonIncrement*
+		  pow(Theta,(NewtonMaxit-NewtonIter)) / (ONE-Theta);
+	      /* Non-convergence of Newton: predicted error too large */
+                if (NewtonPredictedErr >= NewtonTol)
+		  break; /* Exit NewtonLoop */
+	      } else { /* Non-convergence of Newton: Theta too large */
+		break;
+	      }
+            }
+            NewtonIncrementOld = NewtonIncrement;
+	  /* Update solution */
+	    for(i=0; i<N; i++)
+	      U[istage][iadj][i] -= DU[i];
+            
+          /* Check error in Newton iterations */
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol);
+          /* AbsTol is often inappropriate for adjoints -
+              we do at least 4 Newton iterations to ensure convergence
+              of all adjoint components */
+            if ((NewtonIter>=4) && NewtonDone)
+	      break; /* Exit Newton Loop */ 
+	  }
+            
+	/*~~~> If Newton iterations fail employ the direct solution */
+	  if (!NewtonDone) {
+	    printf("Problems with Newton Adjoint!!!\n");
+#ifdef FULL_ALGEBRA
+	    for(i=0; i<N; i++)
+	      E_adj[i][j] = -Jac[i][j];
+	    for(j=0; j<N; j++)
+	      E_adj[j][j] += ONE/(H*rkGamma);
+	    DGETRF( N, N, E_adj, N, IP_adj, IER );
+#else
+	    for(i=0; i<LU_NONZERO; i++)
+	      E_adj[i] = -Jac[i];
+	    for(i=0; i<NVAR; i++) {
+	      j = LU_DIAG[i];
+	      E_adj[j] += ONE/(H*rkGamma);
+	    }
+	    IER = KppDecomp ( E_adj);
+#endif
+	    ISTATUS[Ndec]++;
+	    if (IER != 0) {
+	      printf("At stage %d the matrix used in adjoint computation is "
+		     "singular", istage);
+	      return SDIRK_ErrorMsg(-8,T,H);
+	    }
+	    SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, IER, G, ISTATUS );
+	    for(i=0; i<N; i++)
+	      U[istage][iadj][i] = G[i];  
+	  }
+
+	/*~~~>  End of implified Newton iterations */
+	} /* End of DirADJ */
+
+      } /* End of adj */
+ 
+    } /* End of stages */
+
+    /*~~~> Update adjoint solution
+           Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:) */
+    for (istage=0; istage<rkS; istage++) {
+      for (iadj=0; iadj<NADJ; iadj++) {
+	for(i=0; i<N; i++)
+	  Lambda[iadj][i] += U[istage][iadj][i];
+      }
+    }
+  } /* End of Tloop */
+
+  /* Successful return */
+  return 1;
+  
+} /* End of SDIRK_DadjInt */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_AllocBuffers(int Max_no_steps, int rkS, int SaveLU) {
+/*~~~>  Allocate buffer space for checkpointing
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  int i,j;
+
+  chk_H = (KPP_REAL*) malloc(Max_no_steps * sizeof(KPP_REAL));
+  if (chk_H == NULL) {
+    printf("Failed allocation of buffer H\n");
+    exit(0);
+  }
+
+  chk_T = (KPP_REAL*) malloc(Max_no_steps * sizeof(KPP_REAL));
+  if (chk_T == NULL) {
+    printf("Failed allocation of buffer T\n");
+    exit(0);
+  }
+
+  chk_Y = (KPP_REAL**) malloc(Max_no_steps * sizeof(KPP_REAL*));
+  if (chk_Y == NULL) {
+    printf("Failed allocation of buffer Y\n");
+    exit(0);
+  }
+  for(i=0; i<Max_no_steps; i++) {
+    chk_Y[i] = (KPP_REAL*) malloc(NVAR * sizeof(KPP_REAL));
+    if (chk_Y[i] == NULL) {
+      printf("Failed allocation of buffer Y\n");
+      exit(0);
+    }
+  }
+   
+  chk_Z = (KPP_REAL***) malloc(Max_no_steps * sizeof(KPP_REAL**));
+  if (chk_Z == NULL) {
+    printf("Failed allocation of buffer Z\n");
+    exit(0);
+  }
+  for(i=0; i<Max_no_steps; i++) {
+    chk_Z[i] = (KPP_REAL**) malloc(rkS * sizeof(KPP_REAL*));
+    if (chk_Z[i] == NULL) {
+      printf("Failed allocation of buffer Z\n");
+      exit(0);
+    }
+    for(j=0; j<rkS; j++) {
+      chk_Z[i][j] = (KPP_REAL*) malloc(NVAR * sizeof(KPP_REAL));
+      if (chk_Z[i][j] == NULL) {
+	printf("Failed allocation of buffer Z\n");
+	exit(0);
+      }
+    }
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    chk_J = (KPP_REAL***) malloc(Max_no_steps * sizeof(KPP_REAL**));
+    if (chk_J == NULL) {
+      printf("Failed allocation of buffer J\n");
+      exit(0);
+    }
+    for(i=0; i<Max_no_steps; i++) {
+      chk_J[i] = (KPP_REAL**) malloc(NVAR * sizeof(KPP_REAL*));
+      if (chk_J[i] == NULL) {
+	printf("Failed allocation of buffer J\n");
+	exit(0);
+      }
+      for(j=0; j<NVAR; j++) {
+	chk_J[i][j] = (KPP_REAL*) malloc(NVAR * sizeof(KPP_REAL));
+	if (chk_J[i][j] == NULL) {
+	  printf("Failed allocation of buffer J\n");
+	  exit(0);
+	}
+      }
+    }
+#else
+    chk_J = (KPP_REAL**) malloc(Max_no_steps * sizeof(KPP_REAL*));
+    if (chk_J == NULL) {
+      printf("Failed allocation of buffer J\n");
+      exit(0);
+    }
+    for(i=0; i<Max_no_steps; i++) {
+      chk_J[i] = (KPP_REAL*) malloc(LU_NONZERO * sizeof(KPP_REAL));
+      if (chk_J[i] == NULL) {
+	printf("Failed allocation of buffer J\n");
+	exit(0);
+      }
+    }
+#endif
+ 
+    chk_P = (int**) malloc(Max_no_steps * sizeof(int*));
+    if (chk_P == NULL) {
+      printf("Failed allocation of buffer P\n");
+      exit(0);
+    }
+    for(i=0; i<Max_no_steps; i++) {
+      chk_P[i] = (int*) malloc(NVAR * sizeof(int));
+      if (chk_P[i] == NULL) {
+	printf("Failed allocation of buffer P\n");
+	exit(0);
+      }
+    }
+  }
+} /* End of SDIRK_AllocBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_FreeBuffers(int Max_no_steps, int SaveLU) {
+/*~~~>  Deallocate buffer space for discrete adjoint
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  int i,j;
+
+  free(chk_H);
+  free(chk_T);
+
+  for(i=0; i<Max_no_steps; i++)
+    free(chk_Y[i]);
+  free(chk_Y);
+
+  for(i=0; i<Max_no_steps; i++) {
+    for(j=0; j<rkS; j++) {
+      free(chk_Z[i][j]);
+    }
+    free(chk_Z[i]);
+  }
+  free(chk_Z);
+
+  if(SaveLU) {
+#ifdef FULL_ALGEBRA
+    for(i=0; i<Max_no_steps; i++) {
+      for(j=0; j<rkS; j++) {
+	free(chk_J[i][j]);
+      }
+      free(chk_J[i]);
+    }
+    free(chk_Z);
+#else
+    for(i=0; i<Max_no_steps; i++)
+      free(chk_J[i]);
+    free(chk_J);
+#endif
+
+    for(i=0; i<Max_no_steps; i++)
+      free(chk_P[i]);
+    free(chk_P);
+  }
+} /* End of SDIRK_FreeBuffers */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Push( KPP_REAL T, KPP_REAL H, KPP_REAL Y[], KPP_REAL Z[][NVAR], 
+		 KPP_REAL E[], int P[], int Max_no_steps, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Saves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+  
+  int i,j;
+
+  stack_ptr++;
+  if( stack_ptr > Max_no_steps ) {
+    printf( "Push failed: buffer overflow");
+    exit(0);
+  }
+
+  chk_H[ stack_ptr ] = H;
+  chk_T[ stack_ptr ] = T;
+  for(i=0; i<NVAR; i++) {
+    chk_Y[stack_ptr][i] = Y[i];
+    for(j=0; j<rkS; j++)
+      chk_Z[stack_ptr][j][i] = Z[j][i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	chk_J[stack_ptr][i][j] = E[i][j];
+      chk_P[stack_ptr][i] = P[i];
+    }
+#else   
+    for(i=0; i<LU_NONZERO; i++)
+      chk_J[stack_ptr][i] = E[i];
+#endif
+  }
+  
+} /* End of SDIRK_Push */
+  
+   
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Pop( KPP_REAL* T, KPP_REAL* H, KPP_REAL* Y, KPP_REAL* Z, KPP_REAL* E,
+		int* P, int SaveLU ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~> Retrieves the next trajectory snapshot for discrete adjoints
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+   
+  int i,j;
+
+  if ( stack_ptr < 0 ) {
+    printf( "Pop failed: empty buffer\n" );
+    exit(0);
+  }
+
+  *H = chk_H[ stack_ptr ];
+  *T = chk_T[ stack_ptr ];
+  for(i=0; i<NVAR; i++) {
+    Y[i] = chk_Y[stack_ptr][i];
+    for(j=0; j<rkS; j++)
+      Z[(j * NVAR) + i] = chk_Z[stack_ptr][j][i];
+  }
+
+  if (SaveLU) {
+#ifdef FULL_ALGEBRA
+    for(i=0; i<NVAR; i++) {
+      for(j=0; j<NVAR; j++)
+	E[(j*NVAR)+i] = chk_J[stack_ptr][j][i];
+      P[i] = chk_P[stack_ptr][i];
+    }
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      E[i] = chk_J[stack_ptr][i];
+#endif
+  }
+
+  stack_ptr--;
+  
+} /* End of SDIRK_Pop */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_ErrorScale( int N, int ITOL, KPP_REAL AbsTol[], KPP_REAL RelTol[],
+		       KPP_REAL Y[], KPP_REAL SCAL[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+  if (ITOL == 0){
+    for (i = 0; i < NVAR; i++)
+      SCAL[i] = ONE / (AbsTol[0]+RelTol[0]*ABS(Y[i]) );
+  }
+  else {
+    for (i = 0; i < NVAR; i++)
+      SCAL[i] = ONE / (AbsTol[i]+RelTol[i]*ABS(Y[i]) );
+  }
+
+} /*  End of SDIRK_ErrorScale */
+      
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+KPP_REAL SDIRK_ErrorNorm( int N, KPP_REAL Y[], KPP_REAL SCAL[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  int i;
+  KPP_REAL Err = ZERO;
+
+  for (i = 0; i < N; i++)
+    Err = Err + pow( (Y[i]*SCAL[i]), 2);
+  Err = MAX( SQRT(Err/(KPP_REAL)N), (KPP_REAL)1.0e-10);
+
+  return Err;
+
+} /*  End of SDIRK_ErrorNorm  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+int SDIRK_ErrorMsg(int code, KPP_REAL T, KPP_REAL H) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Handles all error messages
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+  printf("\nForced exit from Sdirk due to the following error:\n");
+
+  switch (code) {
+    case -1:
+      printf("--> Improper value for maximal no of steps\n");
+      break;
+    case -2:
+      printf("--> Selected Rosenbrock method not implemented\n");
+      break;
+    case -3:
+      printf("--> Hmin/Hmax/Hstart must be positive\n");
+      break;
+    case -4:
+      printf("--> FacMin/FacMax/FacRej must be positive\n");
+      break;
+    case -5:
+      printf("--> Improper tolerance values\n");
+      break;
+    case -6:
+      printf("--> No of steps exceeds maximum bound\n");
+      break;
+    case -7:
+      printf("--> Step size too small T + 10*H = T or H < Roundoff\n");
+      break;
+    case -8:
+      printf("--> Matrix is repeatedly singular\n");
+      break;
+    default: /* causing an error */
+      printf("Unknown Error code: %d\n", code);
+  }
+
+  printf("\nTime = %f and H = %f\n", T, H );
+  return code;
+
+} /*  end SDIRK_ErrorMsg   */
+      
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_PrepareMatrix ( KPP_REAL H, KPP_REAL T, KPP_REAL Y[], 
+			   KPP_REAL FJAC[], int SkipJac, int SkipLU, 
+			   KPP_REAL E[], int IP[], int Reject, int ISING, 
+			   int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL HGammaInv;
+  int i, j, ConsecutiveSng = 0;
+
+  ISING = 1;
+
+  while (ISING != 0) {
+    HGammaInv = ONE/(H*rkGamma);
+
+  /*~~~>  Compute the Jacobian */
+    if (SkipJac==0) {
+      JAC_CHEM(T,Y,FJAC);
+      ISTATUS[Njac]++;
+    }
+
+#ifdef FULL_ALGEBRA
+    for(j=0; j<NVAR; j++) {
+      for(i=0; i<NVAR; i++)
+	E[j][i] = -FJAC[j][i];
+      E[j][j] = E[j][j] + HGammaInv;
+    }
+    DGETRF(NVAR, NVAR, E, NVAR, IP, ISING);
+#else
+    for(i=0; i<LU_NONZERO; i++)
+      E[i] = -FJAC[i];
+    for(i=0; i<NVAR; i++) {
+      j = LU_DIAG[i];
+      E[j]=E[j] + HGammaInv;
+    }
+
+    ISING = KppDecomp(E);
+    IP[0] = 1;
+#endif
+      
+    ISTATUS[Ndec]++;
+
+    if (ISING != 0) {
+      printf("MATRIX IS SINGULAR, ISING=%d T=%e H=%e\n", ISING, T, H);
+      ISTATUS[Nsng]++;
+      ConsecutiveSng++;
+      if (ConsecutiveSng >= 6) 
+	return; /* Failure */
+      H = (KPP_REAL)(0.5)*H;
+      SkipJac = 0; /* False */
+      SkipLU  = 0; /* False */
+      Reject  = 1; /* True */
+    }
+  }
+} /* End of SDIRK_PrepareMatrix */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void SDIRK_Solve ( char Transp, KPP_REAL H, int N, KPP_REAL E[], int IP[], 
+		   int ISING, KPP_REAL RHS[], int ISTATUS[] ) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~>  Solves the system (H*Gamma-Jac)*x = R
+      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL HGammaInv;
+      
+  HGammaInv = ONE/(H*rkGamma);
+  WSCAL(N,HGammaInv,RHS,1);
+  switch (Transp) {
+    case 'N':
+#ifdef FULL_ALGEBRA  
+      DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING );
+#else
+      KppSolve(E, RHS);
+#endif
+      break;
+    case 'T':
+#ifdef FULL_ALGEBRA  
+      DGETRS( 'T', N, 1, E, N, IP, RHS, N, ISING );
+#else
+      KppSolveTR(E, RHS, RHS);
+#endif
+      break;
+    default:
+      printf("Error in SDIRK_Solve. Unknown Transp argument: %c\n", Transp);
+      exit(0);
+  }
+  ISTATUS[Nsol]++;
+} /* End of SDIRK_Solve */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4a()
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+  sdMethod = S4A;
+
+/* Number of stages */
+  rkS = 5;
+
+/* Method Coefficients */
+  rkGamma = (KPP_REAL)0.2666666666666666666666666666666667;
+
+  rkA[0][0] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][1] = (KPP_REAL)0.5000000000000000000000000000000000;
+  rkA[1][1] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][2] = (KPP_REAL)0.3541539528432732316227461858529820;
+  rkA[1][2] = (KPP_REAL)(-0.5415395284327323162274618585298197e-01);
+  rkA[2][2] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][3] = (KPP_REAL)0.8515494131138652076337791881433756e-01;
+  rkA[1][3] = (KPP_REAL)(-0.6484332287891555171683963466229754e-01);
+  rkA[2][3] = (KPP_REAL)0.7915325296404206392428857585141242e-01;
+  rkA[3][3] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkA[0][4] = (KPP_REAL)2.100115700566932777970612055999074;
+  rkA[1][4] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+  rkA[2][4] = (KPP_REAL)2.399816361080026398094746205273880;
+  rkA[3][4] = (KPP_REAL)(-2.998818699869028161397714709433394);
+  rkA[4][4] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkB[0] = (KPP_REAL)2.100115700566932777970612055999074;
+  rkB[1] = (KPP_REAL)(-0.7677800284445976813343102185062276);
+  rkB[2] = (KPP_REAL)2.399816361080026398094746205273880;
+  rkB[3] = (KPP_REAL)(-2.998818699869028161397714709433394);
+  rkB[4] = (KPP_REAL)0.2666666666666666666666666666666667;
+
+  rkBhat[0] = (KPP_REAL)2.885264204387193942183851612883390;
+  rkBhat[1] = (KPP_REAL)(-0.1458793482962771337341223443218041);
+  rkBhat[2] = (KPP_REAL)2.390008682465139866479830743628554;
+  rkBhat[3] = (KPP_REAL)(-4.129393538556056674929560012190140);
+  rkBhat[4] = ZERO;
+
+  rkC[0] = (KPP_REAL)0.2666666666666666666666666666666667;
+  rkC[1] = (KPP_REAL)0.7666666666666666666666666666666667;
+  rkC[2] = (KPP_REAL)0.5666666666666666666666666666666667;
+  rkC[3] = (KPP_REAL)0.3661315380631796996374935266701191;
+  rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ZERO;
+  rkD[2] = ZERO;
+  rkD[3] = ZERO;
+  rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)(-0.6804000050475287124787034884002302);
+  rkE[1] = (KPP_REAL)(1.558961944525217193393931795738823);
+  rkE[2] = (KPP_REAL)(-13.55893003128907927748632408763868);
+  rkE[3] = (KPP_REAL)(15.48522576958521253098585004571302);
+  rkE[4] = ONE;
+
+/* Local order of Err estimate */
+  rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)1.875000000000000000000000000000000;
+  rkTheta[0][2] = (KPP_REAL)1.708847304091539528432732316227462;
+  rkTheta[1][2] = (KPP_REAL)(-0.2030773231622746185852981969486824);
+  rkTheta[0][3] = (KPP_REAL)0.2680325578937783958847157206823118;
+  rkTheta[1][3] = (KPP_REAL)(-0.1828840955527181631794050728644549);
+  rkTheta[2][3] = (KPP_REAL)0.2968246986151577397160821594427966;
+  rkTheta[0][4] = (KPP_REAL)0.9096171815241460655379433581446771;
+  rkTheta[1][4] = (KPP_REAL)(-3.108254967778352416114774430509465);
+  rkTheta[2][4] = (KPP_REAL)12.33727431701306195581826123274001;
+  rkTheta[3][4] = (KPP_REAL)(-11.24557012450885560524143016037523);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+  rkAlpha[0][1] = (KPP_REAL)2.875000000000000000000000000000000;
+  rkAlpha[0][2] = (KPP_REAL)0.8500000000000000000000000000000000;
+  rkAlpha[1][2] = (KPP_REAL)0.4434782608695652173913043478260870;
+  rkAlpha[0][3] = (KPP_REAL)0.7352046091658870564637910527807370;
+  rkAlpha[1][3] = (KPP_REAL)(-0.9525565003057343527941920657462074e-01);
+  rkAlpha[2][3] = (KPP_REAL)0.4290111305453813852259481840631738;
+  rkAlpha[0][4] = (KPP_REAL)(-16.10898993405067684831655675112808);
+  rkAlpha[1][4] = (KPP_REAL)6.559571569643355712998131800797873;
+  rkAlpha[2][4] = (KPP_REAL)(-15.90772144271326504260996815012482);
+  rkAlpha[3][4] = (KPP_REAL)25.34908987169226073668861694892683;
+
+  rkELO = (KPP_REAL)4.0;
+
+} /* end Sdirk4a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk4b() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S4B;
+
+/* Number of stages */
+  rkS = 5;
+
+/* Method coefficients */
+  rkGamma = (KPP_REAL)0.25;
+
+  rkA[0][0] = (KPP_REAL)0.25;
+  rkA[0][1] = (KPP_REAL)0.5;
+  rkA[1][1] = (KPP_REAL)0.25;
+  rkA[0][2] = (KPP_REAL)0.34;
+  rkA[1][2] = (KPP_REAL)(-0.40e-01);
+  rkA[2][2] = (KPP_REAL)0.25;
+  rkA[0][3] = (KPP_REAL)0.2727941176470588235294117647058824;
+  rkA[1][3] = (KPP_REAL)(-0.5036764705882352941176470588235294e-01);
+  rkA[2][3] = (KPP_REAL)0.2757352941176470588235294117647059e-01;
+  rkA[3][3] = (KPP_REAL)0.25;
+  rkA[0][4] = (KPP_REAL)1.041666666666666666666666666666667;
+  rkA[1][4] = (KPP_REAL)(-1.020833333333333333333333333333333);
+  rkA[2][4] = (KPP_REAL)7.812500000000000000000000000000000;
+  rkA[3][4] = (KPP_REAL)(-7.083333333333333333333333333333333);
+  rkA[4][4] = (KPP_REAL)0.25;
+
+  rkB[0] = (KPP_REAL)1.041666666666666666666666666666667;
+  rkB[1] = (KPP_REAL)(-1.020833333333333333333333333333333);
+  rkB[2] = (KPP_REAL)7.812500000000000000000000000000000;
+  rkB[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+  rkB[4] = (KPP_REAL)0.250000000000000000000000000000000;
+
+  rkBhat[0] = (KPP_REAL)1.069791666666666666666666666666667;
+  rkBhat[1] = (KPP_REAL)(-0.894270833333333333333333333333333);
+  rkBhat[2] = (KPP_REAL)7.695312500000000000000000000000000;
+  rkBhat[3] = (KPP_REAL)(-7.083333333333333333333333333333333);
+  rkBhat[4] = (KPP_REAL)0.212500000000000000000000000000000;
+
+  rkC[0] = (KPP_REAL)0.25;
+  rkC[1] = (KPP_REAL)0.75;
+  rkC[2] = (KPP_REAL)0.55;
+  rkC[3] = (KPP_REAL)0.5;
+  rkC[4] = ONE;
+
+/* Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ZERO;
+  rkD[2] = ZERO;
+  rkD[3] = ZERO;
+  rkD[4] = ONE;
+
+/* Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)0.5750;
+  rkE[1] = (KPP_REAL)0.2125;
+  rkE[2] = (KPP_REAL)(-4.6875);
+  rkE[3] = (KPP_REAL)4.2500;
+  rkE[4] = (KPP_REAL)0.1500;
+
+/* Local order of Err estimate */
+  rkELO = 4;
+
+/* h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)2.0;
+  rkTheta[0][2] = (KPP_REAL)1.680000000000000000000000000000000;
+  rkTheta[1][2] = (KPP_REAL)(-0.1600000000000000000000000000000000);
+  rkTheta[0][3] = (KPP_REAL)1.308823529411764705882352941176471;
+  rkTheta[1][3] = (KPP_REAL)(-0.1838235294117647058823529411764706);
+  rkTheta[2][3] = (KPP_REAL)0.1102941176470588235294117647058824;
+  rkTheta[0][4] = (KPP_REAL)(-3.083333333333333333333333333333333);
+  rkTheta[1][4] = (KPP_REAL)(-4.291666666666666666666666666666667);
+  rkTheta[2][4] = (KPP_REAL)34.37500000000000000000000000000000;
+  rkTheta[3][4] = (KPP_REAL)(-28.3333333333333333333333333333);
+
+/* Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j} */
+  rkAlpha[0][1] = (KPP_REAL)3.0;
+  rkAlpha[0][2] = (KPP_REAL)0.8800000000000000000000000000000000;
+  rkAlpha[1][2] = (KPP_REAL)0.4400000000000000000000000000000000;
+  rkAlpha[0][3] = (KPP_REAL)0.1666666666666666666666666666666667;
+  rkAlpha[1][3] = (KPP_REAL)(-0.8333333333333333333333333333333333e-01);
+  rkAlpha[2][3] = (KPP_REAL)0.9469696969696969696969696969696970;
+  rkAlpha[0][4] = (KPP_REAL)(-6.0);
+  rkAlpha[1][4] = (KPP_REAL)9.0;
+  rkAlpha[2][4] = (KPP_REAL)(-56.81818181818181818181818181818182);
+  rkAlpha[3][4] = (KPP_REAL)54.0;
+
+} /* end Sdirk4b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2a() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S2A;
+
+/* ~~~> Number of stages */
+  rkS = 2;
+
+/* ~~~> Method coefficients */
+  rkGamma = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkA[0][0] = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkA[0][1] = (KPP_REAL)0.7071067811865475244008443621048490;
+  rkA[1][1] = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkB[0] = (KPP_REAL)0.7071067811865475244008443621048490;
+  rkB[1] = (KPP_REAL)0.2928932188134524755991556378951510;
+  rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+  rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+  rkC[0] = (KPP_REAL)0.292893218813452475599155637895151;
+  rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)0.4714045207910316829338962414032326;
+  rkE[1] = (KPP_REAL)(-0.1380711874576983496005629080698993);
+
+/* ~~~> Local order of Err estimate */
+  rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)2.414213562373095048801688724209698;
+
+/* ~~~> Starting value for Newton iterations */
+  rkAlpha[0][1] = (KPP_REAL)3.414213562373095048801688724209698;
+
+} /* end Sdirk2a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk2b() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S2B;
+
+/* ~~~> Number of stages */
+  rkS = 2;
+
+/* ~~~> Method coefficients */
+  rkGamma = (KPP_REAL)1.707106781186547524400844362104849;
+  rkA[0][0] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkA[0][1] = (KPP_REAL)(-0.707106781186547524400844362104849);
+  rkA[1][1] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkB[0] = (KPP_REAL)(-0.707106781186547524400844362104849);
+  rkB[1] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkBhat[0] = (KPP_REAL)0.6666666666666666666666666666666667;
+  rkBhat[1] = (KPP_REAL)0.3333333333333333333333333333333333;
+  rkC[0] = (KPP_REAL)1.707106781186547524400844362104849;
+  rkC[1] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)(-0.4714045207910316829338962414032326);
+  rkE[1] = (KPP_REAL)0.8047378541243650162672295747365659;
+
+/* ~~~> Local order of Err estimate */
+  rkELO = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] = (KPP_REAL)(-0.414213562373095048801688724209698);
+
+/* ~~~> Starting value for Newton iterations */
+  rkAlpha[0][1] = (KPP_REAL)0.5857864376269049511983112757903019;
+
+} /* end Sdirk2b */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void Sdirk3a() {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  sdMethod = S3A;
+
+/* ~~~> Number of stages */
+  rkS = 3;
+
+/* ~~~> Method coefficients */
+  rkGamma = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[0][0] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[0][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[1][1] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[0][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkA[1][2] = (KPP_REAL)0.5773502691896257645091487805019573;
+  rkA[2][2] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkB[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkB[1] = (KPP_REAL)0.5773502691896257645091487805019573;
+  rkB[2] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkBhat[0]= (KPP_REAL)0.2113248654051871177454256097490213;
+  rkBhat[1]= (KPP_REAL)0.6477918909913548037576239837516312;
+  rkBhat[2]= (KPP_REAL)0.1408832436034580784969504064993475;
+  rkC[0] = (KPP_REAL)0.2113248654051871177454256097490213;
+  rkC[1] = (KPP_REAL)0.4226497308103742354908512194980427;
+  rkC[2] = ONE;
+
+/* ~~~> Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i} */
+  rkD[0] = ZERO;
+  rkD[1] = ZERO;
+  rkD[2] = ONE;
+
+/* ~~~> Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i} */
+  rkE[0] = (KPP_REAL)0.9106836025229590978424821138352906;
+  rkE[1] = (KPP_REAL)(-1.244016935856292431175815447168624);
+  rkE[2] = (KPP_REAL)0.3333333333333333333333333333333333;
+
+/* ~~~> Local order of Err estimate    */
+  rkELO    = 2;
+
+/* ~~~> h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j} */
+  rkTheta[0][1] =  ONE;
+  rkTheta[0][2] = (KPP_REAL)(-1.732050807568877293527446341505872);
+  rkTheta[1][2] = (KPP_REAL)2.732050807568877293527446341505872;
+
+/* ~~~> Starting value for Newton iterations */
+  rkAlpha[0][1] = (KPP_REAL)2.0;
+  rkAlpha[0][2] = (KPP_REAL)(-12.92820323027550917410978536602349);
+  rkAlpha[1][2] = (KPP_REAL)8.83012701892219323381861585376468;
+
+} /* end Sdirk3a */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void FUN_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL P[])
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+{
+
+  KPP_REAL Told;
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+  Fun( Y, FIX, RCONST, P );
+  TIME = Told;
+
+}  /*  end FUN_CHEM  */
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+void JAC_CHEM(KPP_REAL T, KPP_REAL Y[], KPP_REAL JV[]) {
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
+  KPP_REAL Told;
+
+#ifdef FULL_ALGEBRA
+  KPP_REAL JS[LU_NONZERO];
+  int i,j;
+#endif
+
+  Told = TIME;
+  TIME = T;
+  Update_SUN();
+  Update_RCONST();
+
+#ifdef FULL_ALGEBRA
+  Jac_SP( Y, FIX, RCONST, JS);
+
+  for(j=0; j<NVAR; j++) {
+    for(i=0; i<NVAR; i++)
+      JV[j][i] = (KPP_REAL)0.0;
+  } /* end for */
+
+  for(i=0; i<LU_NONZERO; i++)
+    JV[LU_ICOL[i]][LU_IROW[i]] = JS[i];
+#else
+  Jac_SP(Y, FIX, RCONST, JV);
+#endif
+
+  TIME = Told;
+
+} /* end JAC_CHEM  */
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk_adj
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_adj.f90	(revision 3477)
@@ -0,0 +1,1669 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  Adjoint of SDIRK - Singly-Diagonally-Implicit Runge-Kutta method       !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2005                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_Jacobian, ONLY: Jac_SP_Vec, JacTR_SP_Vec
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp, KppSolve,    &
+               KppSolveTR, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+SUBROUTINE INTEGRATE_ADJ( NADJ, Y, Lambda, TIN, TOUT, &
+           ATOL_adj, RTOL_adj,                        &
+           ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, Ierr_U )
+
+   USE KPP_ROOT_Parameters
+   USE KPP_ROOT_Global
+   IMPLICIT NONE
+
+!~~~> Y - Concentrations
+   KPP_REAL :: Y(NVAR)
+!~~~> NADJ - No. of cost functionals for which adjoints
+!                are evaluated simultaneously
+!            If single cost functional is considered (like in
+!                most applications) simply set NADJ = 1      
+   INTEGER :: NADJ
+!~~~> Lambda - Sensitivities w.r.t. concentrations
+!     Note: Lambda (1:NVAR,j) contains sensitivities of
+!           the j-th cost functional w.r.t. Y(1:NVAR), j=1...NADJ
+   KPP_REAL  :: Lambda(NVAR,NADJ)
+!~~~> Tolerances for adjoint calculations
+!     (used for full continuous adjoint, and for controlling
+!      iterations when used to solve the discrete adjoint)   
+   KPP_REAL, INTENT(IN)  :: ATOL_adj(NVAR,NADJ), RTOL_adj(NVAR,NADJ)
+   KPP_REAL, INTENT(IN) :: TIN  ! Start Time
+   KPP_REAL, INTENT(IN) :: TOUT ! End Time
+   ! Optional input parameters and statistics
+   INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+   KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+   KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+   INTEGER,       INTENT(OUT), OPTIONAL :: Ierr_U
+
+   INTEGER, SAVE :: Ntotal = 0
+   KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+   INTEGER       :: ICNTRL(20), ISTATUS(20), Ierr
+
+   ICNTRL(:)  = 0
+   RCNTRL(:)  = 0.0_dp
+   ISTATUS(:) = 0
+   RSTATUS(:) = 0.0_dp
+
+   !~~~> fine-tune the integrator:
+   ICNTRL(5) = 8    ! Max no. of Newton iterations
+   ICNTRL(7) = 1    ! Adjoint solution by: 0=Newton, 1=direct
+   ICNTRL(8) = 1    ! Save fwd LU factorization: 0 = do *not* save, 1 = save
+
+   ! If optional parameters are given, and if they are >0, 
+   ! then they overwrite default settings. 
+   IF (PRESENT(ICNTRL_U)) THEN
+     WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+   END IF
+   IF (PRESENT(RCNTRL_U)) THEN
+     WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+   END IF
+   
+   
+   T1 = TIN; T2 = TOUT
+   CALL SDIRKADJ( NVAR, NADJ, T1, T2, Y, Lambda,            &
+                  RTOL, ATOL, ATOL_adj, RTOL_adj,           &
+                  RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr )
+
+   !~~~> Debug option: number of steps
+   ! Ntotal = Ntotal + ISTATUS(Nstp)
+   ! WRITE(6,777) ISTATUS(Nstp),Ntotal,VAR(ind_O3),VAR(ind_NO2)
+   ! 777 FORMAT('NSTEPS=',I5,' (',I5,')  O3=',E24.14,'  NO2=',E24.14)    
+
+   IF (Ierr < 0) THEN
+        PRINT *,'SDIRK: Unsuccessful exit at T=',TIN,' (Ierr=',Ierr,')'
+   ENDIF
+   
+   ! if optional parameters are given for output they to return information
+   IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+   IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+   IF (PRESENT(Ierr_U))    Ierr_U       = Ierr
+
+   END SUBROUTINE INTEGRATE_ADJ
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRKADJ(N, NADJ, Tinitial, Tfinal, Y, Lambda,   &
+                       RelTol, AbsTol, RelTol_adj, AbsTol_adj, &
+                       RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 1500 is used
+!        Note: use a conservative estimate, since the checkpoint
+!              buffers are allocated to hold Max_no_steps
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve ADJ equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one LU factorization per stage)
+!
+!    ICNTRL(8)  -> checkpointing the LU factorization at each step:
+!        ICNTRL(8)=0 : do *not* save LU factorization (the default)
+!        ICNTRL(8)=1 : save LU factorization
+!        Note: if ICNTRL(7)=1 the LU factorization is *not* saved
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, NADJ, ICNTRL(20)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR), Lambda(NVAR,NADJ)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(NVAR), AbsTol(NVAR), RCNTRL(20), &
+                    RelTol_adj(NVAR,NADJ), AbsTol_adj(NVAR,NADJ)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+
+!~~~>  Checkpoints in memory buffers
+      INTEGER :: stack_ptr = 0 ! last written entry in checkpoint
+      KPP_REAL, DIMENSION(:),     POINTER :: chk_H, chk_T
+      KPP_REAL, DIMENSION(:,:),   POINTER :: chk_Y
+      KPP_REAL, DIMENSION(:,:,:), POINTER :: chk_Z
+      INTEGER,       DIMENSION(:,:),   POINTER :: chk_P
+#ifdef FULL_ALGEBRA
+      KPP_REAL, DIMENSION(:,:,:), POINTER :: chk_J
+#else
+      KPP_REAL, DIMENSION(:,:),   POINTER :: chk_J
+#endif
+! Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      LOGICAL       :: SaveLU, DirectADJ                 
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+      KPP_REAL, PARAMETER :: DeltaMin = 1.0d-5
+
+       
+!~~~>  Initialize statistics
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+      Ierr          = 0
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps = ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+ 
+!~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+
+!~~~> Solve ADJ equations directly or by Newton iterations 
+      DirectADJ = (ICNTRL(7) == 1)
+ 
+!~~~> Save or not the forward LU factorization
+      SaveLU = (ICNTRL(8) /= 0) .AND. (.NOT.DirectADJ)
+
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+    IF (Ierr < 0) RETURN
+    
+!~~~>  Allocate memory buffers    
+    CALL SDIRK_AllocBuffers
+
+!~~~>  Call forward integration    
+    CALL SDIRK_FwdInt( N, Tinitial, Tfinal, Y, Ierr )
+
+!~~~>  Call adjoint integration    
+    CALL SDIRK_DadjInt( N, NADJ, Lambda, Ierr )
+
+!~~~>  Free memory buffers    
+    CALL SDIRK_FreeBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  Procedures internal to SDIRKADJ
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_FwdInt( N,Tinitial,Tfinal,Y,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER :: N
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,Smax), G(NVAR), TMP(NVAR),        &   
+                       NewtonRate, SCAL(NVAR), RHS(NVAR),       &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew,Tdirection,      &
+                       NewtonIncrement, NewtonIncrementOld
+      INTEGER :: j, ISING, istage, NewtonIter, IP(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR) :: FJAC, E
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO):: FJAC, E
+#endif      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU =.FALSE.
+      SkipJac = .FALSE.
+      Reject=.FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+         IF (ISING /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+               CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,RHS)	! RHS <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            RHS(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*RHS(1:N)
+	    CALL WSCAL(N, H*rkGamma, RHS, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, RHS, 1)
+            CALL WAXPY (N, ONE, G,1, RHS,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( 'N', H, N, E, IP, ISING, RHS )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, RHS, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+RHS(:)
+            CALL WAXPY(N,ONE,RHS,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) EXIT NewtonLoop
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of implified Newton iterations
+
+ 
+   END DO stages
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,TMP)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,TMP,1)
+      END DO  
+
+      CALL SDIRK_Solve( 'N', H, N, E, IP, ISING, TMP )
+      CALL SDIRK_ErrorNorm(N, TMP, SCAL, Err)
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Checkpoint solution
+         CALL SDIRK_Push( T, H, Y, Z, E, IP )
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject  = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_FwdInt
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_DadjInt( N, NADJ, Lambda, Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N, NADJ
+      KPP_REAL, INTENT(INOUT) :: Lambda(NVAR,NADJ)
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Y(NVAR)
+      KPP_REAL :: Z(NVAR,Smax), U(NVAR,NADJ,Smax),   &
+                       TMP(NVAR), G(NVAR),                &   
+                       NewtonRate, SCAL(NVAR), DU(NVAR),  &
+                       T, H, Theta, NewtonPredictedErr,   &
+                       NewtonIncrement, NewtonIncrementOld
+      INTEGER :: j, ISING, istage, iadj, NewtonIter, &
+                 IP(NVAR), IP_adj(NVAR)
+      LOGICAL :: Reject, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR) :: E, Jac, E_adj
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO):: E, Jac, E_adj
+#endif      
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( stack_ptr > 0 )
+        
+   !~~~>  Recover checkpoints for stage values and vectors
+      CALL SDIRK_Pop( T, H, Y, Z, E, IP )
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF (.NOT.SaveLU) THEN
+          SkipJac = .FALSE.; SkipLU = .FALSE.
+          CALL SDIRK_PrepareMatrix ( H, T, Y, Jac, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+         IF (ISING /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+stages:DO istage = rkS, 1, -1
+
+!~~~>  Jacobian of the current stage solution
+       TMP(1:N) = Y(1:N) + Z(1:N,istage)
+       CALL JAC_CHEM(T+rkC(istage)*H,TMP,Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+       
+       IF (DirectADJ) THEN 
+#ifdef FULL_ALGEBRA
+         E_adj(1:N,1:N) = -Jac(1:N,1:N)
+         DO j=1,N
+            E_adj(j,j) = E_adj(j,j) + ONE/(H*rkGamma)
+         END DO
+         CALL DGETRF( N, N, E_adj, N, IP_adj, ISING )
+#else
+         E_adj(1:LU_NONZERO) = -Jac(1:LU_NONZERO)
+         DO i = 1,NVAR
+            j = LU_DIAG(i); E_adj(j) = E_adj(j) + ONE/(H*rkGamma)
+         END DO
+         CALL KppDecomp ( E_adj, ISING)
+#endif
+         ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+         IF (ISING /= 0)  THEN
+             PRINT*,'At stage ',istage,' the matrix used in adjoint', &
+                      ' computation is singular'
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+       END IF
+
+adj:   DO iadj = 1, NADJ
+       
+!~~~> Update scaling coefficients
+       CALL SDIRK_ErrorScale(ITOL, AbsTol_adj(1:NVAR,iadj), &
+             RelTol_adj(1:NVAR,iadj), Lambda(1:NVAR,iadj), SCAL)
+      
+!~~~>   Prepare the loop-independent part of the right-hand side
+!       G(:) = H*Jac^T*( B(i)*Lambda + sum_j A(j,i)*Uj(:) )
+       G(1:N) = rkB(istage)*Lambda(1:N,iadj)
+       IF (istage < rkS) THEN
+           DO j = istage+1, rkS
+               CALL WAXPY(N,rkA(j,istage),U(1,iadj,j),1,G,1)
+           END DO
+       END IF
+#ifdef FULL_ALGEBRA  
+       TMP = MATMUL(TRANSPOSE(Jac),G)    ! DZ <- Jac(Y+Z)*Y_tlm
+#else      
+       CALL JacTR_SP_Vec ( Jac, G, TMP )    
+#endif      
+       G(1:N) = H*TMP(1:N)
+
+DirADJ:IF (DirectADJ) THEN 
+
+            CALL SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, ISING, G )
+            U(1:N,iadj,istage) = G(1:N)
+      
+       ELSE DirADJ
+
+            !~~~>  Initializations for Newton iteration
+            CALL Set2zero(N,U(1,iadj,istage))
+            NewtonDone = .FALSE.
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+#ifdef FULL_ALGEBRA  
+            TMP = MATMUL(TRANSPOSE(Jac),U(1:N,iadj,istage))    
+#else      
+            CALL JacTR_SP_Vec ( Jac, U(1:N,iadj,istage), TMP )    
+#endif      
+            DU(1:N) = U(1:N,iadj,istage) - (H*rkGamma)*TMP(1:N) - G(1:N)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( 'T', H, N, E, IP, ISING, DU )
+            
+!~~~>   Check convergence of Newton iterations
+            
+            CALL SDIRK_ErrorNorm(N, DU, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                     ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                     ! Non-convergence of Newton: predicted error too large
+                    IF (NewtonPredictedErr >= NewtonTol) EXIT NewtonLoop
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution
+            U(1:N,iadj,istage) = U(1:N,iadj,istage) - DU(1:N)
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            ! AbsTol is often inappropriate for adjoints -
+            !    we do at least 4 Newton iterations to ensure convergence
+            !    of all adjoint components
+            IF ((NewtonIter>=4) .AND. NewtonDone) EXIT NewtonLoop
+            
+            END DO NewtonLoop
+            
+            !~~~> If Newton iterations fail employ the direct solution
+            IF (.NOT.NewtonDone) THEN                 
+               PRINT*,'Problems with Newton Adjoint!!!'
+#ifdef FULL_ALGEBRA
+               E_adj(1:N,1:N) = -Jac(1:N,1:N)
+               DO j=1,N
+                  E_adj(j,j) = E_adj(j,j) + ONE/(H*rkGamma)
+               END DO
+               CALL DGETRF( N, N, E_adj, N, IP_adj, ISING )
+#else
+               E_adj(1:LU_NONZERO) = -Jac(1:LU_NONZERO)
+               DO i = 1,NVAR
+                  j = LU_DIAG(i); E_adj(j) = E_adj(j) + ONE/(H*rkGamma)
+               END DO
+               CALL KppDecomp ( E_adj, ISING)
+#endif
+               ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+               IF (ISING /= 0)  THEN
+                   PRINT*,'At stage ',istage,' the matrix used in adjoint', &
+                            ' computation is singular'
+                   CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+               END IF
+                  CALL SDIRK_Solve ( 'T', H, N, E_adj, IP_adj, ISING, G )
+                  U(1:N,iadj,istage) = G(1:N)
+                 
+            END IF
+
+!~~~>  End of simplified Newton iterations
+      
+       END IF DirADJ
+
+   END DO adj
+ 
+   END DO stages
+
+!~~~> Update adjoint solution
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO istage = 1,rkS 
+             DO iadj = 1,NADJ
+                 Lambda(1:N,iadj) = Lambda(1:N,iadj) + U(1:N,iadj,istage)
+                 !CALL WAXPY(N,ONE,U(1:N,iadj,istage),1,Lambda(1,iadj),1)
+             END DO  
+         END DO  
+
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_DadjInt
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_AllocBuffers
+!~~~>  Allocate buffer space for checkpointing
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       INTEGER :: i
+   
+       ALLOCATE( chk_H(Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer H'; STOP
+       END IF   
+       ALLOCATE( chk_T(Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer T'; STOP
+       END IF   
+       ALLOCATE( chk_Y(NVAR,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer Y'; STOP
+       END IF   
+       ALLOCATE( chk_Z(NVAR,rkS,Max_no_steps), STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed allocation of buffer K'; STOP
+       END IF   
+       IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+          ALLOCATE( chk_J(NVAR,NVAR,Max_no_steps),  STAT=i )
+#else
+          ALLOCATE( chk_J(LU_NONZERO,Max_no_steps), STAT=i )
+#endif
+          IF (i/=0) THEN
+             PRINT*,'Failed allocation of buffer J'; STOP
+          END IF   
+          ALLOCATE( chk_P(NVAR,Max_no_steps), STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed allocation of buffer P'; STOP
+          END IF   
+       END IF   
+ 
+     END SUBROUTINE SDIRK_AllocBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     SUBROUTINE SDIRK_FreeBuffers
+!~~~>  Dallocate buffer space for discrete adjoint
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+       INTEGER :: i
+   
+       DEALLOCATE( chk_H, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer H'; STOP
+       END IF   
+       DEALLOCATE( chk_T, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer T'; STOP
+       END IF   
+       DEALLOCATE( chk_Y, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer Y'; STOP
+       END IF   
+       DEALLOCATE( chk_Z, STAT=i )
+       IF (i/=0) THEN
+          PRINT*,'Failed deallocation of buffer K'; STOP
+       END IF   
+       IF (SaveLU) THEN
+          DEALLOCATE( chk_J, STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed deallocation of buffer J'; STOP
+          END IF   
+          DEALLOCATE( chk_P, STAT=i )
+          IF (i/=0) THEN
+             PRINT*,'Failed deallocation of buffer P'; STOP
+          END IF   
+       END IF   
+ 
+     END SUBROUTINE SDIRK_FreeBuffers
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     SUBROUTINE SDIRK_Push( T, H, Y, Z, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Saves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       KPP_REAL :: T, H, Y(NVAR), Z(NVAR,Smax) 
+       INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+       KPP_REAL :: E(NVAR,NVAR)
+#else       
+       KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+       stack_ptr = stack_ptr + 1
+       IF ( stack_ptr > Max_no_steps ) THEN
+         PRINT*,'Push failed: buffer overflow'
+         STOP
+       END IF  
+       chk_H( stack_ptr ) = H
+       chk_T( stack_ptr ) = T
+       chk_Y(1:NVAR,stack_ptr) = Y(1:NVAR)
+       chk_Z(1:NVAR,1:rkS,stack_ptr) = Z(1:NVAR,1:rkS)
+       IF (SaveLU) THEN 
+#ifdef FULL_ALGEBRA
+          chk_J(1:NVAR,1:NVAR,stack_ptr) = E(1:NVAR,1:NVAR)
+          chk_P(1:NVAR,stack_ptr)        = P(1:NVAR)
+#else       
+          chk_J(1:LU_NONZERO,stack_ptr)  = E(1:LU_NONZERO)
+#endif
+       END IF
+  
+      END SUBROUTINE SDIRK_Push
+  
+   
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Pop( T, H, Y, Z, E, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~> Retrieves the next trajectory snapshot for discrete adjoints
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+       KPP_REAL :: T, H, Y(NVAR), Z(NVAR,Smax)
+       INTEGER       :: P(NVAR)
+#ifdef FULL_ALGEBRA
+       KPP_REAL :: E(NVAR,NVAR)
+#else       
+       KPP_REAL :: E(LU_NONZERO)
+#endif
+   
+       IF ( stack_ptr <= 0 ) THEN
+         PRINT*,'Pop failed: empty buffer'
+         STOP
+       END IF  
+       H = chk_H( stack_ptr )
+       T = chk_T( stack_ptr )
+       Y(1:NVAR) = chk_Y(1:NVAR,stack_ptr)
+       Z(1:NVAR,1:rkS) = chk_Z(1:NVAR,1:rkS,stack_ptr)
+       IF (SaveLU) THEN
+#ifdef FULL_ALGEBRA
+          E(1:NVAR,1:NVAR) = chk_J(1:NVAR,1:NVAR,stack_ptr)
+          P(1:NVAR)        = chk_P(1:NVAR,stack_ptr)
+#else       
+          E(1:LU_NONZERO)  = chk_J(1:LU_NONZERO,stack_ptr)
+#endif
+       END IF
+
+       stack_ptr = stack_ptr - 1
+  
+      END SUBROUTINE SDIRK_Pop
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: i, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,NVAR
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound', max_no_steps
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = 1/(H*GAMMA)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .FALSE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( Transp, H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = R
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      CHARACTER, INTENT(IN)     :: Transp
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+      SELECT CASE (TRANSP)
+      CASE ('N')
+#ifdef FULL_ALGEBRA  
+         CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+         CALL KppSolve(E, RHS)
+#endif
+      CASE ('T')
+#ifdef FULL_ALGEBRA  
+         CALL DGETRS( 'T', N, 1, E, N, IP, RHS, N, ISING )
+#else
+         CALL KppSolveTR(E, RHS, RHS)
+#endif
+      CASE DEFAULT
+         PRINT*,'Error in SDIRK_Solve. Unknown Transp argument:',Transp
+         STOP
+      END SELECT
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SDIRKADJ ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+      
+      TIME = Told
+      
+      END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP,LU_IROW,LU_ICOL
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+  
+      KPP_REAL ::  T, Told
+      KPP_REAL ::  Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO j=1,NVAR
+          JV(i,j) = 0.0d0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+
+      END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_tlm.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_tlm.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_tlm.def	(revision 3477)
@@ -0,0 +1,20 @@
+ 
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW
+
+#DOUBLE ON 
+#INTFILE sdirk_tlm
+
+#INLINE F77_GLOBAL
+      REAL*8 STEPSTART
+      COMMON /GDATA/ STEPSTART
+#ENDINLINE
+
+#INLINE F77_INIT
+        STEPMIN=0.0001
+        STEPMAX=3600.
+        STEPSTART=STEPMIN
+#ENDINLINE
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_tlm.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_tlm.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/sdirk_tlm.f90	(revision 3477)
@@ -0,0 +1,1461 @@
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+!  SDIRK-TLM - Tangent Linear Model of Singly-Diagonally-Implicit RK      !
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  !
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adj-invariant   !
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  !
+!  By default the code employs the KPP sparse linear algebra routines     !
+!  Compile with -DFULL_ALGEBRA to use full linear algebra (LAPACK)        !
+!                                                                         !
+!    (C)  Adrian Sandu, July 2005                                         !
+!    Virginia Polytechnic Institute and State University                  !
+!    Contact: sandu@cs.vt.edu                                             !
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  !
+!    This implementation is part of KPP - the Kinetic PreProcessor        !
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision
+  USE KPP_ROOT_Global, ONLY: FIX, RCONST, TIME
+  USE KPP_ROOT_Parameters, ONLY: NVAR, NSPEC, NFIX, LU_NONZERO
+  USE KPP_ROOT_JacobianSP, ONLY: LU_DIAG
+  USE KPP_ROOT_Jacobian, ONLY:   Jac_SP_Vec
+  USE KPP_ROOT_LinearAlgebra, ONLY: KppDecomp,    &
+               KppSolve, Set2zero, WLAMCH, WCOPY, WAXPY, WSCAL, WADD
+  
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+  
+!~~~>  Statistics on the work performed by the SDIRK method
+  INTEGER, PARAMETER :: Nfun=1, Njac=2, Nstp=3, Nacc=4,  &
+           Nrej=5, Ndec=6, Nsol=7, Nsng=8,               &
+           Ntexit=1, Nhexit=2, Nhnew=3
+                 
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE INTEGRATE_TLM( NTLM, Y, Y_tlm, TIN, TOUT, ATOL_tlm,RTOL_tlm, &
+       ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    USE KPP_ROOT_Parameters, ONLY: NVAR,ind_O3
+    USE KPP_ROOT_Global,     ONLY: ATOL,RTOL,VAR
+
+    IMPLICIT NONE
+
+!~~~> Y - Concentrations
+    KPP_REAL :: Y(NVAR)
+!~~~> NTLM - No. of sensitivity coefficients
+    INTEGER NTLM
+!~~~> Y_tlm - Sensitivities of concentrations
+!     Note: Y_tlm (1:NVAR,j) contains sensitivities of
+!               Y(1:NVAR) w.r.t. the j-th parameter, j=1...NTLM
+    KPP_REAL :: Y_tlm(NVAR,NTLM)
+    KPP_REAL :: TIN  ! TIN - Start Time
+    KPP_REAL :: TOUT ! TOUT - End Time
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RTOL_tlm(NVAR,NTLM),ATOL_tlm(NVAR,NTLM)
+    INTEGER,       INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,       INTENT(OUT), OPTIONAL :: IERR_U
+
+    INTEGER :: IERR
+
+    KPP_REAL :: RCNTRL(20), RSTATUS(20), T1, T2
+    INTEGER       :: ICNTRL(20), ISTATUS(20)
+    INTEGER, SAVE :: Ntotal = 0
+
+    ICNTRL(1:20) = 0
+    RCNTRL(1:20) = 0.0_dp
+
+    !~~~> fine-tune the integrator:
+    ICNTRL(2)  = 0   ! 0=vector tolerances, 1=scalar tolerances
+    ICNTRL(5)  = 8   ! Max no. of Newton iterations
+    ICNTRL(6)  = 0   ! Starting values for Newton are interpolated (0) or zero (1)
+    ICNTRL(7)  = 0   ! How to solve TLM: 0=modified Newton, 1=direct
+    ICNTRL(9)  = 0   ! TLM Newton Iterations influence
+    ICNTRL(12) = 0   ! TLM Truncation Error influence
+
+    !~~~> if optional parameters are given, and if they are >0,
+    !     then use them to overwrite default settings
+    IF (PRESENT(ICNTRL_U)) THEN
+      WHERE(ICNTRL_U(:) > 0) ICNTRL(:) = ICNTRL_U(:)
+    END IF
+    IF (PRESENT(RCNTRL_U)) THEN
+      WHERE(RCNTRL_U(:) > 0) RCNTRL(:) = RCNTRL_U(:)
+    END IF
+
+
+    T1 = TIN; T2 = TOUT
+    CALL SdirkTLM(  NVAR, NTLM, T1, T2, Y, Y_tlm, RTOL, ATOL, &
+                    RTOL_tlm, ATOL_tlm, RCNTRL,ICNTRL,RSTATUS,ISTATUS,IERR  )
+
+    !~~~> Debug option: print number of steps
+    ! Ntotal = Ntotal + ISTATUS(Nstp)
+    ! PRINT*,'NSTEPS=',ISTATUS(Nstp),' (',Ntotal,')','  O3=', VAR(ind_O3)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = ISTATUS(:)
+    IF (PRESENT(RSTATUS_U)) RSTATUS_U(:) = RSTATUS(:)
+    IF (PRESENT(IERR_U)) IERR_U = IERR
+
+    IF (IERR < 0) THEN
+      PRINT *,'SDIRK-TLM: Unsuccessful exit at T=', TIN,' (IERR=',IERR,')'
+    ENDIF
+
+  END SUBROUTINE INTEGRATE_TLM
+
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SdirkTLM(N, NTLM, Tinitial, Tfinal, Y, Y_tlm, RelTol, AbsTol, &
+                          RelTol_tlm, AbsTol_tlm, &
+			  RCNTRL, ICNTRL, RSTATUS, ISTATUS, Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!    Solves the system y'=F(t,y) using a Singly-Diagonally-Implicit
+!    Runge-Kutta (SDIRK) method.
+!
+!    This implementation is based on the book and the code Sdirk4:
+!
+!      E. Hairer and G. Wanner
+!      "Solving ODEs II. Stiff and differential-algebraic problems".
+!      Springer series in computational mathematics, Springer-Verlag, 1996.
+!    This code is based on the SDIRK4 routine in the above book.
+!
+!    Methods:
+!            * Sdirk 2a, 2b: L-stable, 2 stages, order 2                  
+!            * Sdirk 3a:     L-stable, 3 stages, order 2, adjoint-invariant   
+!            * Sdirk 4a, 4b: L-stable, 5 stages, order 4                  
+!
+!    (C)  Adrian Sandu, July 2005
+!    Virginia Polytechnic Institute and State University
+!    Contact: sandu@cs.vt.edu
+!    Revised by Philipp Miehe and Adrian Sandu, May 2006                  
+!    This implementation is part of KPP - the Kinetic PreProcessor
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>   INPUT ARGUMENTS:
+!
+!-     Y(NVAR)    = vector of initial conditions (at T=Tinitial)
+!-    [Tinitial,Tfinal]  = time range of integration
+!     (if Tinitial>Tfinal the integration is performed backwards in time)
+!-    RelTol, AbsTol = user precribed accuracy
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = ODE function,
+!                       returns Ydot = Y' = F(T,Y)
+!- SUBROUTINE ode_Fun( T, Y, Ydot ) = Jacobian of the ODE function,
+!                       returns Jcb = dF/dY
+!-    ICNTRL(1:20)    = integer inputs parameters
+!-    RCNTRL(1:20)    = real inputs parameters
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT ARGUMENTS:
+!
+!-    Y(NVAR)         -> vector of final states (at T->Tfinal)
+!-    ISTATUS(1:20)   -> integer output parameters
+!-    RSTATUS(1:20)   -> real output parameters
+!-    Ierr            -> job status upon return
+!                        success (positive value) or
+!                        failure (negative value)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     INPUT PARAMETERS:
+!
+!    Note: For input parameters equal to zero the default values of the
+!       corresponding variables are used.
+!
+!    Note: For input parameters equal to zero the default values of the
+!          corresponding variables are used.
+!~~~>  
+!    ICNTRL(1) = not used
+!
+!    ICNTRL(2) = 0: AbsTol, RelTol are NVAR-dimensional vectors
+!              = 1: AbsTol, RelTol are scalars
+!
+!    ICNTRL(3) = Method
+!
+!    ICNTRL(4)  -> maximum number of integration steps
+!        For ICNTRL(4)=0 the default value of 100000 is used
+!
+!    ICNTRL(5)  -> maximum number of Newton iterations
+!        For ICNTRL(5)=0 the default value of 8 is used
+!
+!    ICNTRL(6)  -> starting values of Newton iterations:
+!        ICNTRL(6)=0 : starting values are interpolated (the default)
+!        ICNTRL(6)=1 : starting values are zero
+!
+!    ICNTRL(7)  -> method to solve TLM equations:
+!        ICNTRL(7)=0 : modified Newton re-using LU (the default)
+!        ICNTRL(7)=1 : direct solution (additional one LU factorization per stage)
+!
+!    ICNTRL(9) -> switch for TLM Newton iteration error estimation strategy
+!		ICNTRL(9) = 0: base number of iterations as forward solution
+!		ICNTRL(9) = 1: use RTOL_tlm and ATOL_tlm to calculate
+!				error estimation for TLM at Newton stages
+!
+!    ICNTRL(12) -> switch for TLM truncation error control
+!		ICNTRL(12) = 0: TLM error is not used
+!		ICNTRL(12) = 1: TLM error is computed and used
+!
+!
+!~~~>  Real parameters
+!
+!    RCNTRL(1)  -> Hmin, lower bound for the integration step size
+!                  It is strongly recommended to keep Hmin = ZERO
+!    RCNTRL(2)  -> Hmax, upper bound for the integration step size
+!    RCNTRL(3)  -> Hstart, starting value for the integration step size
+!
+!    RCNTRL(4)  -> FacMin, lower bound on step decrease factor (default=0.2)
+!    RCNTRL(5)  -> FacMax, upper bound on step increase factor (default=6)
+!    RCNTRL(6)  -> FacRej, step decrease factor after multiple rejections
+!                 (default=0.1)
+!    RCNTRL(7)  -> FacSafe, by which the new step is slightly smaller
+!                  than the predicted value  (default=0.9)
+!    RCNTRL(8)  -> ThetaMin. If Newton convergence rate smaller
+!                  than ThetaMin the Jacobian is not recomputed;
+!                  (default=0.001)
+!    RCNTRL(9)  -> NewtonTol, stopping criterion for Newton's method
+!                  (default=0.03)
+!    RCNTRL(10) -> Qmin
+!    RCNTRL(11) -> Qmax. If Qmin < Hnew/Hold < Qmax, then the
+!                  step size is kept constant and the LU factorization
+!                  reused (default Qmin=1, Qmax=1.2)
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!~~~>     OUTPUT PARAMETERS:
+!
+!    Note: each call to Rosenbrock adds the current no. of fcn calls
+!      to previous value of ISTATUS(1), and similar for the other params.
+!      Set ISTATUS(1:10) = 0 before call to avoid this accumulation.
+!
+!    ISTATUS(1) = No. of function calls
+!    ISTATUS(2) = No. of jacobian calls
+!    ISTATUS(3) = No. of steps
+!    ISTATUS(4) = No. of accepted steps
+!    ISTATUS(5) = No. of rejected steps (except at the beginning)
+!    ISTATUS(6) = No. of LU decompositions
+!    ISTATUS(7) = No. of forward/backward substitutions
+!    ISTATUS(8) = No. of singular matrix decompositions
+!
+!    RSTATUS(1)  -> Texit, the time corresponding to the
+!                   computed Y upon return
+!    RSTATUS(2)  -> Hexit,last accepted step before return
+!    RSTATUS(3)  -> Hnew, last predicted step before return
+!        For multiple restarts, use Hnew as Hstart in the following run
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+
+! Arguments      
+      INTEGER, INTENT(IN)          :: N, NTLM, ICNTRL(20)
+      KPP_REAL, INTENT(IN)    :: Tinitial, Tfinal, &
+                    RelTol(N), AbsTol(N), RCNTRL(20), &
+		    RelTol_tlm(N,NTLM), AbsTol_tlm(N,NTLM)
+      KPP_REAL, INTENT(INOUT) :: Y(NVAR), Y_tlm(N,NTLM)
+      INTEGER, INTENT(OUT)         :: Ierr
+      INTEGER, INTENT(INOUT)       :: ISTATUS(20) 
+      KPP_REAL, INTENT(OUT)   :: RSTATUS(20)
+       
+!~~~>  SDIRK method coefficients, up to 5 stages
+      INTEGER, PARAMETER :: Smax = 5
+      INTEGER, PARAMETER :: S2A=1, S2B=2, S3A=3, S4A=4, S4B=5
+      KPP_REAL :: rkGamma, rkA(Smax,Smax), rkB(Smax), rkC(Smax), &
+                       rkD(Smax),  rkE(Smax), rkBhat(Smax), rkELO,    &
+                       rkAlpha(Smax,Smax), rkTheta(Smax,Smax)
+      INTEGER :: sdMethod, rkS ! The number of stages
+
+! Local variables      
+      KPP_REAL :: Hmin, Hmax, Hstart, Roundoff,    &
+                       FacMin, Facmax, FacSafe, FacRej, &
+                       ThetaMin, NewtonTol, Qmin, Qmax
+      INTEGER       :: ITOL, NewtonMaxit, Max_no_steps, i
+      LOGICAL       :: StartNewton, DirectTLM, TLMNewtonEst, TLMtruncErr
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+       
+      Ierr = 0
+      ISTATUS(1:20) = 0
+      RSTATUS(1:20) = ZERO
+
+!~~~>  For Scalar tolerances (ICNTRL(2).NE.0)  the code uses AbsTol(1) and RelTol(1)
+!   For Vector tolerances (ICNTRL(2) == 0) the code uses AbsTol(1:NVAR) and RelTol(1:NVAR)
+      IF (ICNTRL(2) == 0) THEN
+         ITOL = 1
+      ELSE
+         ITOL = 0
+      END IF
+
+!~~~> ICNTRL(3) - method selection       
+      SELECT CASE (ICNTRL(3))
+      CASE (0,1)
+         CALL Sdirk2a
+      CASE (2)
+         CALL Sdirk2b
+      CASE (3)
+         CALL Sdirk3a
+      CASE (4)
+         CALL Sdirk4a
+      CASE (5)
+         CALL Sdirk4b
+      CASE DEFAULT
+         CALL Sdirk2a
+      END SELECT
+      
+!~~~>   The maximum number of time steps admitted
+      IF (ICNTRL(4) == 0) THEN
+         Max_no_steps = 200000
+      ELSEIF (ICNTRL(4) > 0) THEN
+         Max_no_steps=ICNTRL(4)
+      ELSE
+         PRINT * ,'User-selected ICNTRL(4)=',ICNTRL(4)
+         CALL SDIRK_ErrorMsg(-1,Tinitial,ZERO,Ierr)
+   END IF
+   !~~~> The maximum number of Newton iterations admitted
+      IF(ICNTRL(5) == 0)THEN
+         NewtonMaxit=8
+      ELSE
+         NewtonMaxit=ICNTRL(5)
+         IF(NewtonMaxit <= 0)THEN
+             PRINT * ,'User-selected ICNTRL(5)=',ICNTRL(5)
+             CALL SDIRK_ErrorMsg(-2,Tinitial,ZERO,Ierr)
+         END IF
+      END IF
+!~~~> StartNewton:  Use extrapolation for starting values of Newton iterations
+      IF (ICNTRL(6) == 0) THEN
+         StartNewton = .TRUE.
+      ELSE
+         StartNewton = .FALSE.
+      END IF      
+!~~~> Solve TLM equations directly or by Newton iterations 
+      DirectTLM = (ICNTRL(7) == 1)
+!~~~> Newton iteration error control selection  
+      IF (ICNTRL(9) == 0) THEN 
+         TLMNewtonEst = .FALSE.
+      ELSE
+         TLMNewtonEst = .TRUE.
+      END IF      
+!~~~> TLM truncation error control selection  
+      IF (ICNTRL(12) == 0) THEN 
+         TLMtruncErr = .FALSE.
+      ELSE
+         TLMtruncErr = .TRUE.
+      END IF      
+           
+!~~~>  Unit roundoff (1+Roundoff>1)
+      Roundoff = WLAMCH('E')
+
+!~~~>  Lower bound on the step size: (positive value)
+      IF (RCNTRL(1) == ZERO) THEN
+         Hmin = ZERO
+      ELSEIF (RCNTRL(1) > ZERO) THEN
+         Hmin = RCNTRL(1)
+      ELSE
+         PRINT * , 'User-selected RCNTRL(1)=', RCNTRL(1)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Upper bound on the step size: (positive value)
+      IF (RCNTRL(2) == ZERO) THEN
+         Hmax = ABS(Tfinal-Tinitial)
+      ELSEIF (RCNTRL(2) > ZERO) THEN
+         Hmax = MIN(ABS(RCNTRL(2)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected RCNTRL(2)=', RCNTRL(2)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Starting step size: (positive value)
+      IF (RCNTRL(3) == ZERO) THEN
+         Hstart = MAX(Hmin,Roundoff)
+      ELSEIF (RCNTRL(3) > ZERO) THEN
+         Hstart = MIN(ABS(RCNTRL(3)),ABS(Tfinal-Tinitial))
+      ELSE
+         PRINT * , 'User-selected Hstart: RCNTRL(3)=', RCNTRL(3)
+         CALL SDIRK_ErrorMsg(-3,Tinitial,ZERO,Ierr)
+      END IF
+   
+!~~~>  Step size can be changed s.t.  FacMin < Hnew/Hexit < FacMax
+      IF (RCNTRL(4) == ZERO) THEN
+         FacMin = 0.2_dp
+      ELSEIF (RCNTRL(4) > ZERO) THEN
+         FacMin = RCNTRL(4)
+      ELSE
+         PRINT * , 'User-selected FacMin: RCNTRL(4)=', RCNTRL(4)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+      IF (RCNTRL(5) == ZERO) THEN
+         FacMax = 10.0_dp
+      ELSEIF (RCNTRL(5) > ZERO) THEN
+         FacMax = RCNTRL(5)
+      ELSE
+         PRINT * , 'User-selected FacMax: RCNTRL(5)=', RCNTRL(5)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacRej: Factor to decrease step after 2 succesive rejections
+      IF (RCNTRL(6) == ZERO) THEN
+         FacRej = 0.1_dp
+      ELSEIF (RCNTRL(6) > ZERO) THEN
+         FacRej = RCNTRL(6)
+      ELSE
+         PRINT * , 'User-selected FacRej: RCNTRL(6)=', RCNTRL(6)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+!~~~>   FacSafe: Safety Factor in the computation of new step size
+      IF (RCNTRL(7) == ZERO) THEN
+         FacSafe = 0.9_dp
+      ELSEIF (RCNTRL(7) > ZERO) THEN
+         FacSafe = RCNTRL(7)
+      ELSE
+         PRINT * , 'User-selected FacSafe: RCNTRL(7)=', RCNTRL(7)
+         CALL SDIRK_ErrorMsg(-4,Tinitial,ZERO,Ierr)
+      END IF
+
+!~~~> ThetaMin: decides whether the Jacobian should be recomputed
+      IF(RCNTRL(8) == 0.D0)THEN
+         ThetaMin = 1.0d-3
+      ELSE
+         ThetaMin = RCNTRL(8)
+      END IF
+
+!~~~> Stopping criterion for Newton's method
+      IF(RCNTRL(9) == ZERO)THEN
+         NewtonTol = 3.0d-2
+      ELSE
+         NewtonTol = RCNTRL(9)
+      END IF
+
+!~~~> Qmin, Qmax: IF Qmin < Hnew/Hold < Qmax, STEP SIZE = CONST.
+      IF(RCNTRL(10) == ZERO)THEN
+         Qmin=ONE
+      ELSE
+         Qmin=RCNTRL(10)
+      END IF
+      IF(RCNTRL(11) == ZERO)THEN
+         Qmax=1.2D0
+      ELSE
+         Qmax=RCNTRL(11)
+      END IF
+
+!~~~>  Check if tolerances are reasonable
+      IF (ITOL == 0) THEN
+         IF (AbsTol(1) <= ZERO .OR. RelTol(1) <= 10.D0*Roundoff) THEN
+            PRINT * , ' Scalar AbsTol = ',AbsTol(1)
+            PRINT * , ' Scalar RelTol = ',RelTol(1)
+            CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+         END IF
+      ELSE
+         DO i=1,N
+            IF (AbsTol(i) <= 0.D0.OR.RelTol(i) <= 10.D0*Roundoff) THEN
+              PRINT * , ' AbsTol(',i,') = ',AbsTol(i)
+              PRINT * , ' RelTol(',i,') = ',RelTol(i)
+              CALL SDIRK_ErrorMsg(-5,Tinitial,ZERO,Ierr)
+            END IF
+         END DO
+      END IF
+    
+    IF (Ierr < 0) RETURN
+
+    CALL SDIRK_IntegratorTLM( N,NTLM,Tinitial,Tfinal,Y,Y_tlm,Ierr )
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   CONTAINS  !  PROCEDURES INTERNAL TO SDIRK
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE SDIRK_IntegratorTLM( N,NTLM,Tinitial,Tfinal,Y,Y_tlm,Ierr )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters
+      IMPLICIT NONE
+
+!~~~> Arguments:      
+      INTEGER, INTENT(IN) :: N, NTLM
+      KPP_REAL, INTENT(INOUT) :: Y(N), Y_tlm(N,NTLM)
+      KPP_REAL, INTENT(IN) :: Tinitial, Tfinal
+      INTEGER, INTENT(OUT) :: Ierr
+      
+!~~~> Local variables:      
+      KPP_REAL :: Z(NVAR,rkS), G(NVAR), TMP(NVAR),         &   
+                       NewtonRate, SCAL(NVAR), DZ(NVAR),        &
+                       T, H, Theta, Hratio, NewtonPredictedErr, &
+                       Qnewton, Err, Fac, Hnew, Tdirection,     &
+                       NewtonIncrement, NewtonIncrementOld, &
+		       SCAL_tlm(NVAR), Yerr(N), Yerr_tlm(N,NTLM), ThetaTLM
+      KPP_REAL :: Z_tlm(NVAR,rkS,NTLM)
+      INTEGER :: itlm, j, IER, istage, NewtonIter, saveNiter, NewtonIterTLM
+      INTEGER :: IP(NVAR), IP_tlm(NVAR)
+      LOGICAL :: Reject, FirstStep, SkipJac, SkipLU, NewtonDone
+      
+#ifdef FULL_ALGEBRA      
+      KPP_REAL, DIMENSION(NVAR,NVAR)  :: FJAC, E, Jac, E_tlm
+#else      
+      KPP_REAL, DIMENSION(LU_NONZERO) :: FJAC, E, Jac, E_tlm
+#endif      
+      KPP_REAL, PARAMETER :: ZERO = 0.0d0, ONE = 1.0d0
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Initializations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      T = Tinitial
+      Tdirection = SIGN(ONE,Tfinal-Tinitial)
+      H = MAX(ABS(Hmin),ABS(Hstart))
+      IF (ABS(H) <= 10.D0*Roundoff) H=1.0D-6
+      H=MIN(ABS(H),Hmax)
+      H=SIGN(H,Tdirection)
+      SkipLU  = .FALSE.
+      SkipJac = .FALSE.
+      Reject =  .FALSE.
+      FirstStep=.TRUE.
+
+      CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Time loop begins
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Tloop: DO WHILE ( (Tfinal-T)*Tdirection - Roundoff > ZERO )
+
+
+!~~~>  Compute E = 1/(h*gamma)-Jac and its LU decomposition
+      IF ( .NOT.SkipLU ) THEN ! This time around skip the Jac update and LU
+         CALL SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, IER )
+         IF (IER /= 0) THEN
+             CALL SDIRK_ErrorMsg(-8,T,H,Ierr); RETURN
+         END IF
+      END IF      
+
+      IF (ISTATUS(Nstp) > Max_no_steps) THEN
+             CALL SDIRK_ErrorMsg(-6,T,H,Ierr); RETURN
+      END IF   
+      IF ( (T+0.1d0*H == T) .OR. (ABS(H) <= Roundoff) ) THEN
+             CALL SDIRK_ErrorMsg(-7,T,H,Ierr); RETURN
+      END IF   
+
+stages:DO istage = 1, rkS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Simplified Newton iterations
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z(1,istage))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+       CALL Set2zero(N,G)
+       IF (istage > 1) THEN
+           DO j = 1, istage-1
+               ! Gj(:) = sum_j Theta(i,j)*Zj(:) = H * sum_j A(i,j)*Fun(Zj(:))
+               CALL WAXPY(N,rkTheta(istage,j),Z(1,j),1,G,1)
+               ! Zi(:) = sum_j Alpha(i,j)*Zj(:)
+	       IF (StartNewton) THEN
+                 CALL WAXPY(N,rkAlpha(istage,j),Z(1,j),1,Z(1,istage),1)
+	       END IF
+           END DO
+       END IF
+
+       !~~~>  Initializations for Newton iteration
+       NewtonDone = .FALSE.
+       Fac = 0.5d0 ! Step reduction factor if too many iterations
+            
+NewtonLoop:DO NewtonIter = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+ 	    CALL WADD(N,Y,Z(1,istage),TMP)         	! TMP <- Y + Zi
+            CALL FUN_CHEM(T+rkC(istage)*H,TMP,DZ)	! DZ <- Fun(Y+Zi)
+            ISTATUS(Nfun) = ISTATUS(Nfun) + 1
+!            DZ(1:N) = G(1:N) - Z(1:N,istage) + (H*rkGamma)*DZ(1:N)
+	    CALL WSCAL(N, H*rkGamma, DZ, 1)
+	    CALL WAXPY (N, -ONE, Z(1,istage), 1, DZ, 1)
+            CALL WAXPY (N, ONE, G,1, DZ,1)
+
+!~~~>   Solve the linear system
+            CALL SDIRK_Solve ( H, N, E, IP, IER, DZ )
+            
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, DZ, SCAL, NewtonIncrement)
+            IF ( NewtonIter == 1 ) THEN
+                Theta      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                Theta = NewtonIncrement/NewtonIncrementOld
+                IF (Theta < 0.99d0) THEN
+                    NewtonRate = Theta/(ONE-Theta)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *Theta**(NewtonMaxit-NewtonIter)/(ONE-Theta)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIter))
+                      EXIT NewtonLoop
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoop
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+            ! Update solution: Z(:) <-- Z(:)+DZ(:)
+            CALL WAXPY(N,ONE,DZ,1,Z(1,istage),1) 
+            
+            ! Check error in Newton iterations
+            NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+            IF (NewtonDone) THEN
+    	       ! Tune error in TLM variables by defining the minimal number of Newton iterations.
+	       saveNiter = NewtonIter+1
+	       EXIT NewtonLoop
+	    END IF
+            
+            END DO NewtonLoop
+            
+            IF (.NOT.NewtonDone) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+!~~~>  End of simplified Newton iterations for forward variables
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solve for TLM variables
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+!~~~>  Direct solution for TLM variables
+DirTLM:IF (DirectTLM) THEN 
+
+         TMP(1:N) = Y(1:N) + Z(1:N,istage)
+         SkipJac = .FALSE.
+         CALL SDIRK_PrepareMatrix ( H, T+rkC(istage)*H, TMP, Jac, &
+                   SkipJac, SkipLU, E_tlm, IP_tlm, Reject, IER )
+         IF (IER /= 0) CYCLE TLoop
+
+TlmL:    DO itlm = 1, NTLM
+            G(1:N) = Y_tlm(1:N,itlm)
+            IF (istage > 1) THEN
+              ! Gj(:) = sum_j Theta(i,j)*Zj_tlm(:) 
+              !       = H * sum_j A(i,j)*Jac(Zj(:))*(Yj_tlm+Zj_tlm)
+              DO j = 1, istage-1
+                  CALL WAXPY(N,rkTheta(istage,j),Z_tlm(1,j,itlm),1,G,1)
+              END DO
+            END IF
+            CALL SDIRK_Solve ( H, N, E_tlm, IP_tlm, IER, G )
+            Z_tlm(1:N,istage,itlm) = G(1:N) - Y_tlm(1:N,itlm)
+         END DO TlmL
+
+       ELSE DirTLM
+
+!~~~>  Jacobian of the current stage solution
+       TMP(1:N) = Y(1:N) + Z(1:N,istage)
+       CALL JAC_CHEM(T+rkC(istage)*H,TMP,Jac)
+       ISTATUS(Njac) = ISTATUS(Njac) + 1
+
+!~~~>  Simplified Newton iterations for TLM variables
+TlmLoop:DO itlm = 1,NTLM
+       NewtonRate = MAX(NewtonRate,Roundoff)**0.8d0
+
+!~~~>  Starting values for Newton iterations
+       CALL Set2zero(N,Z_tlm(1,istage,itlm))
+       
+!~~~>   Prepare the loop-independent part of the right-hand side
+#ifdef FULL_ALGEBRA  
+       DZ = MATMUL(Jac,Y_tlm(1,itlm))    ! DZ <- Jac(Y+Z)*Y_tlm
+#else      
+       CALL Jac_SP_Vec ( Jac, Y_tlm(1,itlm), DZ )    
+#endif      
+       G(1:N) = (H*rkGamma)*DZ(1:N)
+       IF (istage > 1) THEN
+           ! Gj(:) = sum_j Theta(i,j)*Zj_tlm(:) 
+           !       = H * sum_j A(i,j)*Jac(Zj(:))*(Yj_tlm+Zj_tlm)
+           DO j = 1, istage-1
+               CALL WAXPY(N,rkTheta(istage,j),Z_tlm(1,j,itlm),1,G,1)
+           END DO
+       END IF
+       
+       
+       !~~~>  Initializations for Newton iteration
+       IF (TLMNewtonEst) THEN
+          NewtonDone = .FALSE.
+          Fac = 0.5d0 ! Step reduction factor if too many iterations
+
+          CALL SDIRK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+               Y_tlm(1,itlm),SCAL_tlm)
+       END IF
+            
+NewtonLoopTLM:DO NewtonIterTLM = 1, NewtonMaxit
+
+!~~~>   Prepare the loop-dependent part of the right-hand side
+#ifdef FULL_ALGEBRA  
+            DZ = MATMUL(Jac,Z_tlm(1,istage,itlm))    ! DZ <- Jac(Y+Z)*Z_tlm
+#else      
+            CALL Jac_SP_Vec ( Jac, Z_tlm(1,istage,itlm), DZ )    
+#endif      
+            DZ(1:N) = (H*rkGamma)*DZ(1:N)+G(1:N)-Z_tlm(1:N,istage,itlm)
+
+            CALL SDIRK_Solve ( H, N, E, IP, IER, DZ )
+            
+	    IF (TLMNewtonEst) THEN
+!~~~>   Check convergence of Newton iterations
+            CALL SDIRK_ErrorNorm(N, DZ, SCAL_tlm, NewtonIncrement)
+            IF ( NewtonIterTLM <= 1 ) THEN
+                ThetaTLM      = ABS(ThetaMin)
+                NewtonRate = 2.0d0 
+            ELSE
+                ThetaTLM = NewtonIncrement/NewtonIncrementOld
+                IF (ThetaTLM < 0.99d0) THEN
+                    NewtonRate = ThetaTLM/(ONE-ThetaTLM)
+                    ! Predict error at the end of Newton process 
+                    NewtonPredictedErr = NewtonIncrement &
+                               *ThetaTLM**(NewtonMaxit-NewtonIterTLM)/(ONE-ThetaTLM)
+                    IF (NewtonPredictedErr >= NewtonTol) THEN
+                      ! Non-convergence of Newton: predicted error too large
+                      Qnewton = MIN(10.0d0,NewtonPredictedErr/NewtonTol)
+                      Fac = 0.8d0*Qnewton**(-ONE/(1+NewtonMaxit-NewtonIterTLM))
+                      EXIT NewtonLoopTLM
+                    END IF
+                ELSE ! Non-convergence of Newton: Theta too large
+                    EXIT NewtonLoopTLM
+                END IF
+            END IF
+            NewtonIncrementOld = NewtonIncrement
+	    END IF !(TLMNewtonEst)
+	    
+            ! Update solution: Z_tlm(:) <-- Z_tlm(:)+DZ(:)
+            CALL WAXPY(N,ONE,DZ,1,Z_tlm(1,istage,itlm),1) 
+            
+            ! Check error in Newton iterations
+            IF (TLMNewtonEst) THEN
+               NewtonDone = (NewtonRate*NewtonIncrement <= NewtonTol)
+               IF (NewtonDone) EXIT NewtonLoopTLM
+	    ELSE
+  	       ! Minimum number of iterations same as FWD iterations
+               IF (NewtonIterTLM>=saveNiter) EXIT NewtonLoopTLM
+	    END IF
+            
+            END DO NewtonLoopTLM
+            
+            IF ((TLMNewtonEst) .AND. (.NOT.NewtonDone)) THEN
+                 !CALL RK_ErrorMsg(-12,T,H,Ierr);
+                 H = Fac*H; Reject=.TRUE.
+                 SkipJac = .TRUE.; SkipLU = .FALSE.
+                 CYCLE Tloop
+            END IF
+
+      END DO TlmLoop
+!~~~> End of simplified Newton iterations for TLM
+
+    END IF DirTLM
+
+   END DO stages
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Error estimation 
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ISTATUS(Nstp) = ISTATUS(Nstp) + 1
+      CALL Set2zero(N,Yerr)
+      DO i = 1,rkS
+         IF (rkE(i)/=ZERO) CALL WAXPY(N,rkE(i),Z(1,i),1,Yerr,1)
+      END DO  
+
+      CALL SDIRK_Solve ( H, N, E, IP, IER, Yerr )
+      CALL SDIRK_ErrorNorm(N, Yerr, SCAL, Err)
+
+      IF (TLMtruncErr) THEN
+        CALL Set2zero(NVAR*NTLM,Yerr_tlm)
+        DO itlm=1,NTLM
+          DO j=1,rkS  
+            IF (rkE(j) /= ZERO) CALL WAXPY(N,rkE(j),Z_tlm(1,j,itlm),1,Yerr_tlm(1,itlm),1)
+          END DO 
+	  CALL SDIRK_Solve (H, N, E, IP, IER, Yerr_tlm(1,itlm))
+        END DO
+        CALL SDIRK_ErrorNorm_tlm(N,NTLM, Yerr_tlm, Err)
+      END IF
+
+!~~~> Computation of new step size Hnew
+      Fac  = FacSafe*(Err)**(-ONE/rkELO)
+      Fac  = MAX(FacMin,MIN(FacMax,Fac))
+      Hnew = H*Fac
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Accept/Reject step
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+accept: IF ( Err < ONE ) THEN !~~~> Step is accepted
+
+         FirstStep=.FALSE.
+         ISTATUS(Nacc) = ISTATUS(Nacc) + 1
+
+!~~~> Update time and solution
+         T  =  T + H
+         ! Y(:) <-- Y(:) + Sum_j rkD(j)*Z_j(:)
+         DO i = 1,rkS 
+            IF (rkD(i)/=ZERO) THEN
+                 CALL WAXPY(N,rkD(i),Z(1,i),1,Y,1)
+                 DO itlm = 1, NTLM
+                   CALL WAXPY(N,rkD(i),Z_tlm(1,i,itlm),1,Y_tlm(1,itlm),1)
+                 END DO  
+            END IF     
+         END DO  
+       
+!~~~> Update scaling coefficients
+         CALL SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+
+!~~~> Next time step
+         Hnew = Tdirection*MIN(ABS(Hnew),Hmax)
+         ! Last T and H
+         RSTATUS(Ntexit) = T
+         RSTATUS(Nhexit) = H
+         RSTATUS(Nhnew)  = Hnew
+         ! No step increase after a rejection
+         IF (Reject) Hnew = Tdirection*MIN(ABS(Hnew),ABS(H))
+         Reject = .FALSE.
+         IF ((T+Hnew/Qmin-Tfinal)*Tdirection > ZERO) THEN
+            H = Tfinal-T
+         ELSE
+            Hratio=Hnew/H
+            ! If step not changed too much keep Jacobian and reuse LU
+            SkipLU = ( (Theta <= ThetaMin) .AND. (Hratio >= Qmin) &
+                                     .AND. (Hratio <= Qmax) )
+            ! For TLM: do not skip LU (decrease TLM error)
+   	    SkipLU = .FALSE.
+            IF (.NOT.SkipLU) H = Hnew
+         END IF
+         ! If convergence is fast enough, do not update Jacobian
+!         SkipJac = (Theta <= ThetaMin)
+         SkipJac = .FALSE.
+
+      ELSE accept !~~~> Step is rejected
+
+         IF (FirstStep .OR. Reject) THEN
+             H = FacRej*H
+         ELSE
+             H = Hnew
+         END IF
+         Reject = .TRUE.
+         SkipJac = .TRUE.
+         SkipLU  = .FALSE. 
+         IF (ISTATUS(Nacc) >= 1) ISTATUS(Nrej) = ISTATUS(Nrej) + 1
+         
+      END IF accept
+      
+      END DO Tloop
+
+      ! Successful return
+      Ierr  = 1
+  
+      END SUBROUTINE SDIRK_IntegratorTLM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorScale(N, ITOL, AbsTol, RelTol, Y, SCAL)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER :: N, i, ITOL
+      KPP_REAL :: AbsTol(NVAR), RelTol(NVAR), &
+                       Y(NVAR), SCAL(NVAR)
+      IF (ITOL == 0) THEN
+        DO i=1,N
+          SCAL(i) = ONE / ( AbsTol(1)+RelTol(1)*ABS(Y(i)) )
+        END DO
+      ELSE
+        DO i=1,N
+          SCAL(i) = ONE / ( AbsTol(i)+RelTol(i)*ABS(Y(i)) )
+        END DO
+      END IF
+      END SUBROUTINE SDIRK_ErrorScale
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm(N, Y, SCAL, Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: i, N
+      KPP_REAL :: Y(N), SCAL(N), Err      
+      Err = ZERO
+      DO i=1,N
+           Err = Err+(Y(i)*SCAL(i))**2
+      END DO
+      Err = MAX( SQRT(Err/DBLE(N)), 1.0d-10 )
+!
+      END SUBROUTINE SDIRK_ErrorNorm
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_ErrorNorm_tlm(N,NTLM, Y_tlm, FWD_Err)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!      
+      INTEGER :: itlm, NTLM, N
+      KPP_REAL :: Y_tlm(N,NTLM), SCAL_tlm(N), FWD_Err, Err  
+      
+      DO itlm=1,NTLM
+        CALL SDIRK_ErrorScale(N,ITOL,AbsTol_tlm(1,itlm),RelTol_tlm(1,itlm), &
+               Y_tlm(1,itlm),SCAL_tlm)
+	CALL SDIRK_ErrorNorm(N, Y_tlm(1,itlm), SCAL_tlm, Err)
+	FWD_Err = MAX(FWD_Err, Err)
+      END DO
+!
+      END SUBROUTINE SDIRK_ErrorNorm_tlm
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ SUBROUTINE SDIRK_ErrorMsg(Code,T,H,Ierr)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!    Handles all error messages
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   KPP_REAL, INTENT(IN) :: T, H
+   INTEGER, INTENT(IN)  :: Code
+   INTEGER, INTENT(OUT) :: Ierr
+
+   Ierr = Code
+   PRINT * , &
+     'Forced exit from SDIRK due to the following error:'
+
+   SELECT CASE (Code)
+    CASE (-1)
+      PRINT * , '--> Improper value for maximal no of steps'
+    CASE (-2)
+      PRINT * , '--> Improper value for maximal no of Newton iterations'
+    CASE (-3)
+      PRINT * , '--> Hmin/Hmax/Hstart must be positive'
+    CASE (-4)
+      PRINT * , '--> FacMin/FacMax/FacRej must be positive'
+    CASE (-5)
+      PRINT * , '--> Improper tolerance values'
+    CASE (-6)
+      PRINT * , '--> No of steps exceeds maximum bound'
+    CASE (-7)
+      PRINT * , '--> Step size too small: T + 10*H = T', &
+            ' or H < Roundoff'
+    CASE (-8)
+      PRINT * , '--> Matrix is repeatedly singular'
+    CASE DEFAULT
+      PRINT *, 'Unknown Error code: ', Code
+   END SELECT
+
+   PRINT *, "T=", T, "and H=", H
+
+ END SUBROUTINE SDIRK_ErrorMsg
+      
+      
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_PrepareMatrix ( H, T, Y, FJAC, &
+                   SkipJac, SkipLU, E, IP, Reject, ISING )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Compute the matrix E = I - 1/(H*Gamma)*Jac, and its decomposition
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     
+      IMPLICIT NONE
+      
+      KPP_REAL, INTENT(INOUT) :: H
+      KPP_REAL, INTENT(IN)    :: T, Y(NVAR)
+      LOGICAL, INTENT(INOUT)       :: SkipJac,SkipLU,Reject
+      INTEGER, INTENT(OUT)         :: ISING, IP(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(INOUT) :: FJAC(NVAR,NVAR)
+      KPP_REAL, INTENT(OUT)   :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(INOUT) :: FJAC(LU_NONZERO)
+      KPP_REAL, INTENT(OUT)   :: E(LU_NONZERO)
+#endif
+      KPP_REAL                :: HGammaInv
+      INTEGER                      :: i, j, ConsecutiveSng
+
+      ConsecutiveSng = 0
+      ISING = 1
+      
+Hloop: DO WHILE (ISING /= 0)
+      
+      HGammaInv = ONE/(H*rkGamma)
+
+!~~~>  Compute the Jacobian
+!      IF (SkipJac) THEN
+!          SkipJac = .FALSE.
+!      ELSE
+      IF (.NOT. SkipJac) THEN
+          CALL JAC_CHEM( T, Y, FJAC )
+          ISTATUS(Njac) = ISTATUS(Njac) + 1
+      END IF  
+      
+#ifdef FULL_ALGEBRA
+      DO j=1,NVAR
+         DO i=1,NVAR
+            E(i,j) = -FJAC(i,j)
+         END DO
+         E(j,j) = E(j,j)+HGammaInv
+      END DO
+      CALL DGETRF( NVAR, NVAR, E, NVAR, IP, ISING )
+#else
+      DO i = 1,LU_NONZERO
+            E(i) = -FJAC(i)
+      END DO
+      DO i = 1,NVAR
+          j = LU_DIAG(i); E(j) = E(j) + HGammaInv
+      END DO
+      CALL KppDecomp ( E, ISING)
+      IP(1) = 1
+#endif
+      ISTATUS(Ndec) = ISTATUS(Ndec) + 1
+
+      IF (ISING /= 0) THEN
+          WRITE (6,*) ' MATRIX IS SINGULAR, ISING=',ISING,' T=',T,' H=',H
+          ISTATUS(Nsng) = ISTATUS(Nsng) + 1; ConsecutiveSng = ConsecutiveSng + 1
+          IF (ConsecutiveSng >= 6) RETURN ! Failure
+          H = 0.5d0*H
+          SkipJac = .TRUE.
+          SkipLU  = .FALSE.
+          Reject  = .TRUE.
+      END IF
+      
+      END DO Hloop
+
+      END SUBROUTINE SDIRK_PrepareMatrix
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE SDIRK_Solve ( H, N, E, IP, ISING, RHS )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!~~~>  Solves the system (H*Gamma-Jac)*x = R
+!      using the LU decomposition of E = I - 1/(H*Gamma)*Jac
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      IMPLICIT NONE
+      INTEGER, INTENT(IN)       :: N, IP(N), ISING
+      KPP_REAL, INTENT(IN) :: H
+#ifdef FULL_ALGEBRA
+      KPP_REAL, INTENT(IN) :: E(NVAR,NVAR)
+#else
+      KPP_REAL, INTENT(IN) :: E(LU_NONZERO)
+#endif
+      KPP_REAL, INTENT(INOUT) :: RHS(N)
+      KPP_REAL                :: HGammaInv
+      
+      HGammaInv = ONE/(H*rkGamma)
+      CALL WSCAL(N,HGammaInv,RHS,1)
+#ifdef FULL_ALGEBRA  
+      CALL DGETRS( 'N', N, 1, E, N, IP, RHS, N, ISING )
+#else
+      CALL KppSolve(E, RHS)
+#endif
+      ISTATUS(Nsol) = ISTATUS(Nsol) + 1
+ 
+      END SUBROUTINE SDIRK_Solve
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4A
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .2666666666666666666666666666666667d0
+
+      rkA(1,1) = .2666666666666666666666666666666667d0
+      rkA(2,1) = .5000000000000000000000000000000000d0
+      rkA(2,2) = .2666666666666666666666666666666667d0
+      rkA(3,1) = .3541539528432732316227461858529820d0
+      rkA(3,2) = -.5415395284327323162274618585298197d-1
+      rkA(3,3) = .2666666666666666666666666666666667d0
+      rkA(4,1) = .8515494131138652076337791881433756d-1
+      rkA(4,2) = -.6484332287891555171683963466229754d-1
+      rkA(4,3) = .7915325296404206392428857585141242d-1
+      rkA(4,4) = .2666666666666666666666666666666667d0
+      rkA(5,1) = 2.100115700566932777970612055999074d0
+      rkA(5,2) = -.7677800284445976813343102185062276d0
+      rkA(5,3) = 2.399816361080026398094746205273880d0
+      rkA(5,4) = -2.998818699869028161397714709433394d0
+      rkA(5,5) = .2666666666666666666666666666666667d0
+
+      rkB(1)   = 2.100115700566932777970612055999074d0
+      rkB(2)   = -.7677800284445976813343102185062276d0
+      rkB(3)   = 2.399816361080026398094746205273880d0
+      rkB(4)   = -2.998818699869028161397714709433394d0
+      rkB(5)   = .2666666666666666666666666666666667d0
+
+      rkBhat(1)= 2.885264204387193942183851612883390d0
+      rkBhat(2)= -.1458793482962771337341223443218041d0
+      rkBhat(3)= 2.390008682465139866479830743628554d0
+      rkBhat(4)= -4.129393538556056674929560012190140d0
+      rkBhat(5)= 0.d0
+
+      rkC(1)   = .2666666666666666666666666666666667d0
+      rkC(2)   = .7666666666666666666666666666666667d0
+      rkC(3)   = .5666666666666666666666666666666667d0
+      rkC(4)   = .3661315380631796996374935266701191d0
+      rkC(5)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 0.d0
+      rkD(4)   = 0.d0
+      rkD(5)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.6804000050475287124787034884002302d0
+      rkE(2)   = 1.558961944525217193393931795738823d0
+      rkE(3)   = -13.55893003128907927748632408763868d0
+      rkE(4)   = 15.48522576958521253098585004571302d0
+      rkE(5)   = 1.d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 1.875000000000000000000000000000000d0
+      rkTheta(3,1) = 1.708847304091539528432732316227462d0
+      rkTheta(3,2) = -.2030773231622746185852981969486824d0
+      rkTheta(4,1) = .2680325578937783958847157206823118d0
+      rkTheta(4,2) = -.1828840955527181631794050728644549d0
+      rkTheta(4,3) = .2968246986151577397160821594427966d0
+      rkTheta(5,1) = .9096171815241460655379433581446771d0
+      rkTheta(5,2) = -3.108254967778352416114774430509465d0
+      rkTheta(5,3) = 12.33727431701306195581826123274001d0
+      rkTheta(5,4) = -11.24557012450885560524143016037523d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 2.875000000000000000000000000000000d0
+      rkAlpha(3,1) = .8500000000000000000000000000000000d0
+      rkAlpha(3,2) = .4434782608695652173913043478260870d0
+      rkAlpha(4,1) = .7352046091658870564637910527807370d0
+      rkAlpha(4,2) = -.9525565003057343527941920657462074d-1
+      rkAlpha(4,3) = .4290111305453813852259481840631738d0
+      rkAlpha(5,1) = -16.10898993405067684831655675112808d0
+      rkAlpha(5,2) = 6.559571569643355712998131800797873d0
+      rkAlpha(5,3) = -15.90772144271326504260996815012482d0
+      rkAlpha(5,4) = 25.34908987169226073668861694892683d0
+               
+!~~~> Coefficients for continuous solution
+!          rkD(1,1)= 24.74416644927758d0
+!          rkD(1,2)= -4.325375951824688d0
+!          rkD(1,3)= 41.39683763286316d0
+!          rkD(1,4)= -61.04144619901784d0
+!          rkD(1,5)= -3.391332232917013d0
+!          rkD(2,1)= -51.98245719616925d0
+!          rkD(2,2)= 10.52501981094525d0
+!          rkD(2,3)= -154.2067922191855d0
+!          rkD(2,4)= 214.3082125319825d0
+!          rkD(2,5)= 14.71166018088679d0
+!          rkD(3,1)= 33.14347947522142d0
+!          rkD(3,2)= -19.72986789558523d0
+!          rkD(3,3)= 230.4878502285804d0
+!          rkD(3,4)= -287.6629744338197d0
+!          rkD(3,5)= -18.99932366302254d0
+!          rkD(4,1)= -5.905188728329743d0
+!          rkD(4,2)= 13.53022403646467d0
+!          rkD(4,3)= -117.6778956422581d0
+!          rkD(4,4)= 134.3962081008550d0
+!          rkD(4,5)= 8.678995715052762d0
+!
+!         DO i=1,4  ! CONTi <-- Sum_j rkD(i,j)*Zj
+!           CALL Set2zero(N,CONT(1,i))
+!           DO j = 1,rkS
+!             CALL WAXPY(N,rkD(i,j),Z(1,j),1,CONT(1,i),1)
+!           END DO
+!         END DO
+          
+          rkELO = 4.0d0
+          
+      END SUBROUTINE Sdirk4a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk4b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S4B
+! Number of stages
+      rkS = 5
+
+! Method coefficients
+      rkGamma = .25d0
+
+      rkA(1,1) = 0.25d0
+      rkA(2,1) = 0.5d00
+      rkA(2,2) = 0.25d0
+      rkA(3,1) = 0.34d0
+      rkA(3,2) =-0.40d-1
+      rkA(3,3) = 0.25d0
+      rkA(4,1) = 0.2727941176470588235294117647058824d0
+      rkA(4,2) =-0.5036764705882352941176470588235294d-1
+      rkA(4,3) = 0.2757352941176470588235294117647059d-1
+      rkA(4,4) = 0.25d0
+      rkA(5,1) = 1.041666666666666666666666666666667d0
+      rkA(5,2) =-1.020833333333333333333333333333333d0
+      rkA(5,3) = 7.812500000000000000000000000000000d0
+      rkA(5,4) =-7.083333333333333333333333333333333d0
+      rkA(5,5) = 0.25d0
+
+      rkB(1)   =  1.041666666666666666666666666666667d0
+      rkB(2)   = -1.020833333333333333333333333333333d0
+      rkB(3)   =  7.812500000000000000000000000000000d0
+      rkB(4)   = -7.083333333333333333333333333333333d0
+      rkB(5)   =  0.250000000000000000000000000000000d0
+
+      rkBhat(1)=  1.069791666666666666666666666666667d0
+      rkBhat(2)= -0.894270833333333333333333333333333d0
+      rkBhat(3)=  7.695312500000000000000000000000000d0
+      rkBhat(4)= -7.083333333333333333333333333333333d0
+      rkBhat(5)=  0.212500000000000000000000000000000d0
+
+      rkC(1)   = 0.25d0
+      rkC(2)   = 0.75d0
+      rkC(3)   = 0.55d0
+      rkC(4)   = 0.50d0
+      rkC(5)   = 1.00d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 0.0d0
+      rkD(3)   = 0.0d0
+      rkD(4)   = 0.0d0
+      rkD(5)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.5750d0
+      rkE(2)   =  0.2125d0
+      rkE(3)   = -4.6875d0
+      rkE(4)   =  4.2500d0
+      rkE(5)   =  0.1500d0
+
+! Local order of Err estimate
+      rkElo    = 4
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.d0
+      rkTheta(3,1) = 1.680000000000000000000000000000000d0
+      rkTheta(3,2) = -.1600000000000000000000000000000000d0
+      rkTheta(4,1) = 1.308823529411764705882352941176471d0
+      rkTheta(4,2) = -.1838235294117647058823529411764706d0
+      rkTheta(4,3) = 0.1102941176470588235294117647058824d0
+      rkTheta(5,1) = -3.083333333333333333333333333333333d0
+      rkTheta(5,2) = -4.291666666666666666666666666666667d0
+      rkTheta(5,3) =  34.37500000000000000000000000000000d0
+      rkTheta(5,4) = -28.33333333333333333333333333333333d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.
+      rkAlpha(3,1) = .8800000000000000000000000000000000d0
+      rkAlpha(3,2) = .4400000000000000000000000000000000d0
+      rkAlpha(4,1) = .1666666666666666666666666666666667d0
+      rkAlpha(4,2) = -.8333333333333333333333333333333333d-1
+      rkAlpha(4,3) = .9469696969696969696969696969696970d0
+      rkAlpha(5,1) = -6.d0
+      rkAlpha(5,2) = 9.d0
+      rkAlpha(5,3) = -56.81818181818181818181818181818182d0
+      rkAlpha(5,4) = 54.d0
+      
+      END SUBROUTINE Sdirk4b
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2A
+! Number of stages
+      rkS = 2
+
+! Method coefficients
+      rkGamma = .2928932188134524755991556378951510d0
+
+      rkA(1,1) = .2928932188134524755991556378951510d0
+      rkA(2,1) = .7071067811865475244008443621048490d0
+      rkA(2,2) = .2928932188134524755991556378951510d0
+
+      rkB(1)   = .7071067811865475244008443621048490d0
+      rkB(2)   = .2928932188134524755991556378951510d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 0.292893218813452475599155637895151d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.4714045207910316829338962414032326d0
+      rkE(2)   = -0.1380711874576983496005629080698993d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = 2.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = 3.414213562373095048801688724209698d0
+          
+      END SUBROUTINE Sdirk2a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk2b
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S2B
+! Number of stages
+      rkS      = 2
+
+! Method coefficients
+      rkGamma  = 1.707106781186547524400844362104849d0
+
+      rkA(1,1) = 1.707106781186547524400844362104849d0
+      rkA(2,1) = -.707106781186547524400844362104849d0
+      rkA(2,2) = 1.707106781186547524400844362104849d0
+
+      rkB(1)   = -.707106781186547524400844362104849d0
+      rkB(2)   = 1.707106781186547524400844362104849d0
+
+      rkBhat(1)= .6666666666666666666666666666666667d0
+      rkBhat(2)= .3333333333333333333333333333333333d0
+
+      rkC(1)   = 1.707106781186547524400844362104849d0
+      rkC(2)   = 1.0d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.0d0
+      rkD(2)   = 1.0d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   = -.4714045207910316829338962414032326d0
+      rkE(2)   =  .8047378541243650162672295747365659d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) = -.414213562373095048801688724209698d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) = .5857864376269049511983112757903019d0
+      
+      END SUBROUTINE Sdirk2b
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      SUBROUTINE Sdirk3a
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      sdMethod = S3A
+! Number of stages
+      rkS = 3
+
+! Method coefficients
+      rkGamma = .2113248654051871177454256097490213d0
+
+      rkA(1,1) = .2113248654051871177454256097490213d0
+      rkA(2,1) = .2113248654051871177454256097490213d0
+      rkA(2,2) = .2113248654051871177454256097490213d0
+      rkA(3,1) = .2113248654051871177454256097490213d0
+      rkA(3,2) = .5773502691896257645091487805019573d0
+      rkA(3,3) = .2113248654051871177454256097490213d0
+
+      rkB(1)   = .2113248654051871177454256097490213d0
+      rkB(2)   = .5773502691896257645091487805019573d0
+      rkB(3)   = .2113248654051871177454256097490213d0
+
+      rkBhat(1)= .2113248654051871177454256097490213d0
+      rkBhat(2)= .6477918909913548037576239837516312d0
+      rkBhat(3)= .1408832436034580784969504064993475d0
+
+      rkC(1)   = .2113248654051871177454256097490213d0
+      rkC(2)   = .4226497308103742354908512194980427d0
+      rkC(3)   = 1.d0
+
+! Ynew = Yold + h*Sum_i {rkB_i*k_i} = Yold + Sum_i {rkD_i*Z_i}
+      rkD(1)   = 0.d0
+      rkD(2)   = 0.d0
+      rkD(3)   = 1.d0
+
+! Err = h * Sum_i {(rkB_i-rkBhat_i)*k_i} = Sum_i {rkE_i*Z_i}
+      rkE(1)   =  0.9106836025229590978424821138352906d0
+      rkE(2)   = -1.244016935856292431175815447168624d0
+      rkE(3)   =  0.3333333333333333333333333333333333d0
+
+! Local order of Err estimate
+      rkElo    = 2
+
+! h*Sum_j {rkA_ij*k_j} = Sum_j {rkTheta_ij*Z_j}
+      rkTheta(2,1) =  1.0d0
+      rkTheta(3,1) = -1.732050807568877293527446341505872d0
+      rkTheta(3,2) =  2.732050807568877293527446341505872d0
+
+! Starting value for Newton iterations: Z_i^0 = Sum_j {rkAlpha_ij*Z_j}
+      rkAlpha(2,1) =   2.0d0
+      rkAlpha(3,1) = -12.92820323027550917410978536602349d0
+      rkAlpha(3,2) =   8.83012701892219323381861585376468d0
+
+      END SUBROUTINE Sdirk3a
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   END SUBROUTINE SdirkTLM ! AND ALL ITS INTERNAL PROCEDURES
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   SUBROUTINE FUN_CHEM( T, Y, P )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Function, ONLY: Fun
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR), P(NVAR)
+      
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+      
+      CALL Fun( Y, FIX, RCONST, P )
+      
+      TIME = Told
+      
+    END SUBROUTINE FUN_CHEM
+
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    SUBROUTINE JAC_CHEM( T, Y, JV )
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+      USE KPP_ROOT_Parameters, ONLY: NVAR, LU_NONZERO
+      USE KPP_ROOT_Global, ONLY: TIME, FIX, RCONST
+      USE KPP_ROOT_Jacobian, ONLY: Jac_SP,LU_IROW,LU_ICOL
+      USE KPP_ROOT_Rates, ONLY: Update_SUN, Update_RCONST, Update_PHOTO
+  
+      KPP_REAL :: T, Told
+      KPP_REAL :: Y(NVAR)
+#ifdef FULL_ALGEBRA
+      KPP_REAL :: JS(LU_NONZERO), JV(NVAR,NVAR)
+      INTEGER :: i, j
+#else
+      KPP_REAL :: JV(LU_NONZERO)
+#endif
+ 
+      Told = TIME
+      TIME = T
+      CALL Update_SUN()
+      CALL Update_RCONST()
+
+#ifdef FULL_ALGEBRA
+      CALL Jac_SP(Y, FIX, RCONST, JS)
+      DO j=1,NVAR
+         DO i=1,NVAR
+           JV(i,j) = 0.0D0
+         END DO
+      END DO
+      DO i=1,LU_NONZERO
+         JV(LU_IROW(i),LU_ICOL(i)) = JS(i)
+      END DO
+#else
+      CALL Jac_SP(Y, FIX, RCONST, JV)
+#endif
+      TIME = Told
+
+    END SUBROUTINE JAC_CHEM
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/tau_leap.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/tau_leap.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/tau_leap.def	(revision 3477)
@@ -0,0 +1,10 @@
+ 
+#FUNCTION   aggregate
+#JACOBIAN   SPARSE_LU_ROW
+#DOUBLE     on 
+#STOCHASTIC on 
+#INTFILE    tau_leap
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/tau_leap.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/tau_leap.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/tau_leap.f90	(revision 3477)
@@ -0,0 +1,1688 @@
+MODULE KPP_ROOT_Random
+! A module for random number generation from the following distributions:
+!
+!     Distribution                    Function/subroutine name
+!
+!     Normal (Gaussian)               random_normal
+!     Gamma                           random_gamma
+!     Chi-squared                     random_chisq
+!     Exponential                     random_exponential
+!     Weibull                         random_Weibull
+!     Beta                            random_beta
+!     t                               random_t
+!     Multivariate normal             random_mvnorm
+!     Generalized inverse Gaussian    random_inv_gauss
+!     Poisson                         random_Poisson
+!     Binomial                        random_binomial1   *
+!                                     random_binomial2   *
+!     Negative binomial               random_neg_binomial
+!     von Mises                       random_von_Mises
+!     Cauchy                          random_Cauchy
+!
+!  Generate a random ordering of the integers 1 .. N
+!                                     random_order
+!     Initialize (seed) the uniform random number generator for ANY compiler
+!                                     seed_random_number
+
+!     Lognormal - see note below.
+
+!  ** Two functions are provided for the binomial distribution.
+!  If the parameter values remain constant, it is recommended that the
+!  first function is used (random_binomial1).   If one or both of the
+!  parameters change, use the second function (random_binomial2).
+
+! The compilers own random number generator, SUBROUTINE RANDOM_NUMBER(r),
+! is used to provide a source of uniformly distributed random numbers.
+
+! N.B. At this stage, only one random number is generated at each call to
+!      one of the functions above.
+
+! The module uses the following functions which are included here:
+! bin_prob to calculate a single binomial probability
+! lngamma  to calculate the logarithm to base e of the gamma function
+
+! Some of the code is adapted from Dagpunar's book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+!
+! In most of Dagpunar's routines, there is a test to see whether the value
+! of one or two floating-point parameters has changed since the last call.
+! These tests have been replaced by using a logical variable FIRST.
+! This should be set to .TRUE. on the first call using new values of the
+! parameters, and .FALSE. if the parameter values are the same as for the
+! previous call.
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! Lognormal distribution
+! If X has a lognormal distribution, then log(X) is normally distributed.
+! Here the logarithm is the natural logarithm, that is to base e, sometimes
+! denoted as ln.  To generate random variates from this distribution, generate
+! a random deviate from the normal distribution with mean and variance equal
+! to the mean and variance of the logarithms of X, then take its exponential.
+
+! Relationship between the mean & variance of log(X) and the mean & variance
+! of X, when X has a lognormal distribution.
+! Let m = mean of log(X), and s^2 = variance of log(X)
+! Then
+! mean of X     = exp(m + 0.5s^2)
+! variance of X = (mean(X))^2.[exp(s^2) - 1]
+
+! In the reverse direction (rarely used)
+! variance of log(X) = log[1 + var(X)/(mean(X))^2]
+! mean of log(X)     = log(mean(X) - 0.5var(log(X))
+
+! N.B. The above formulae relate to population parameters; they will only be
+!      approximate if applied to sample values.
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+! Version 1.13, 2 October 2000
+! Changes from version 1.01
+! 1. The random_order, random_Poisson & random_binomial routines have been
+!    replaced with more efficient routines.
+! 2. A routine, seed_random_number, has been added to seed the uniform random
+!    number generator.   This requires input of the required number of seeds
+!    for the particular compiler from a specified I/O unit such as a keyboard.
+! 3. Made compatible with Lahey's ELF90.
+! 4. Marsaglia & Tsang algorithm used for random_gamma when shape parameter > 1.
+! 5. INTENT for array f corrected in random_mvnorm.
+
+!     Author: Alan Miller
+!             CSIRO Division of Mathematical & Information Sciences
+!             Private Bag 10, Clayton South MDC
+!             Clayton 3169, Victoria, Australia
+!     Phone: (+61) 3 9545-8016      Fax: (+61) 3 9545-8080
+!     e-mail: amiller @ bigpond.net.au
+
+IMPLICIT NONE
+REAL, PRIVATE      :: zero = 0.0, half = 0.5, one = 1.0, two = 2.0,   &
+                      vsmall = TINY(1.0), vlarge = HUGE(1.0)
+PRIVATE            :: integral
+INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(12, 60)
+
+
+CONTAINS
+
+
+FUNCTION random_normal() RESULT(fn_val)
+
+! Adapted from the following Fortran 77 code
+!      ALGORITHM 712, COLLECTED ALGORITHMS FROM ACM.
+!      THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE,
+!      VOL. 18, NO. 4, DECEMBER, 1992, PP. 434-435.
+
+!  The function random_normal() returns a normally distributed pseudo-random
+!  number with zero mean and unit variance.
+
+!  The algorithm uses the ratio of uniforms method of A.J. Kinderman
+!  and J.F. Monahan augmented with quadratic bounding curves.
+
+REAL :: fn_val
+
+!     Local variables
+REAL     :: s = 0.449871, t = -0.386595, a = 0.19600, b = 0.25472,           &
+            r1 = 0.27597, r2 = 0.27846, u, v, x, y, q
+
+!     Generate P = (u,v) uniform in rectangle enclosing acceptance region
+
+DO
+  CALL RANDOM_NUMBER(u)
+  CALL RANDOM_NUMBER(v)
+  v = 1.7156 * (v - half)
+
+!     Evaluate the quadratic form
+  x = u - s
+  y = ABS(v) - t
+  q = x**2 + y*(a*y - b*x)
+
+!     Accept P if inside inner ellipse
+  IF (q < r1) EXIT
+!     Reject P if outside outer ellipse
+  IF (q > r2) CYCLE
+!     Reject P if outside acceptance region
+  IF (v**2 < -4.0*LOG(u)*u**2) EXIT
+END DO
+
+!     Return ratio of P's coordinates as the normal deviate
+fn_val = v/u
+RETURN
+
+END FUNCTION random_normal
+
+
+
+FUNCTION random_gamma(s, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+!     FUNCTION GENERATES A RANDOM GAMMA VARIATE.
+!     CALLS EITHER random_gamma1 (S > 1.0)
+!     OR random_exponential (S = 1.0)
+!     OR random_gamma2 (S < 1.0).
+
+!     S = SHAPE PARAMETER OF DISTRIBUTION (0 < REAL).
+
+REAL, INTENT(IN)    :: s
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+IF (s <= zero) THEN
+  WRITE(*, *) 'SHAPE PARAMETER VALUE MUST BE POSITIVE'
+  STOP
+END IF
+
+IF (s > one) THEN
+  fn_val = random_gamma1(s, first)
+ELSE IF (s < one) THEN
+  fn_val = random_gamma2(s, first)
+ELSE
+  fn_val = random_exponential()
+END IF
+
+RETURN
+END FUNCTION random_gamma
+
+
+
+FUNCTION random_gamma1(s, first) RESULT(fn_val)
+
+! Uses the algorithm in
+! Marsaglia, G. and Tsang, W.W. (2000) `A simple method for generating
+! gamma variables', Trans. om Math. Software (TOMS), vol.26(3), pp.363-372.
+
+! Generates a random gamma deviate for shape parameter s >= 1.
+
+REAL, INTENT(IN)    :: s
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+! Local variables
+REAL, SAVE  :: c, d
+REAL        :: u, v, x
+
+IF (first) THEN
+  d = s - one/3.
+  c = one/SQRT(9.0*d)
+END IF
+
+! Start of main loop
+DO
+
+! Generate v = (1+cx)^3 where x is random normal; repeat if v <= 0.
+
+  DO
+    x = random_normal()
+    v = (one + c*x)**3
+    IF (v > zero) EXIT
+  END DO
+
+! Generate uniform variable U
+
+  CALL RANDOM_NUMBER(u)
+  IF (u < one - 0.0331*x**4) THEN
+    fn_val = d*v
+    EXIT
+  ELSE IF (LOG(u) < half*x**2 + d*(one - v + LOG(v))) THEN
+    fn_val = d*v
+    EXIT
+  END IF
+END DO
+
+RETURN
+END FUNCTION random_gamma1
+
+
+
+FUNCTION random_gamma2(s, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,INFINITY) FROM
+! A GAMMA DISTRIBUTION WITH DENSITY PROPORTIONAL TO
+! GAMMA2**(S-1) * EXP(-GAMMA2),
+! USING A SWITCHING METHOD.
+
+!    S = SHAPE PARAMETER OF DISTRIBUTION
+!          (REAL < 1.0)
+
+REAL, INTENT(IN)    :: s
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+!     Local variables
+REAL       :: r, x, w
+REAL, SAVE :: a, p, c, uf, vr, d
+
+IF (s <= zero .OR. s >= one) THEN
+  WRITE(*, *) 'SHAPE PARAMETER VALUE OUTSIDE PERMITTED RANGE'
+  STOP
+END IF
+
+IF (first) THEN                        ! Initialization, if necessary
+  a = one - s
+  p = a/(a + s*EXP(-a))
+  IF (s < vsmall) THEN
+    WRITE(*, *) 'SHAPE PARAMETER VALUE TOO SMALL'
+    STOP
+  END IF
+  c = one/s
+  uf = p*(vsmall/a)**s
+  vr = one - vsmall
+  d = a*LOG(a)
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r)
+  IF (r >= vr) THEN
+    CYCLE
+  ELSE IF (r > p) THEN
+    x = a - LOG((one - r)/(one - p))
+    w = a*LOG(x)-d
+  ELSE IF (r > uf) THEN
+    x = a*(r/p)**c
+    w = x
+  ELSE
+    fn_val = zero
+    RETURN
+  END IF
+
+  CALL RANDOM_NUMBER(r)
+  IF (one-r <= w .AND. r > zero) THEN
+    IF (r*(w + one) >= one) CYCLE
+    IF (-LOG(r) <= w) CYCLE
+  END IF
+  EXIT
+END DO
+
+fn_val = x
+RETURN
+
+END FUNCTION random_gamma2
+
+
+
+FUNCTION random_chisq(ndf, first) RESULT(fn_val)
+
+!     Generates a random variate from the chi-squared distribution with
+!     ndf degrees of freedom
+
+INTEGER, INTENT(IN) :: ndf
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+fn_val = two * random_gamma(half*ndf, first)
+RETURN
+
+END FUNCTION random_chisq
+
+
+
+FUNCTION random_exponential() RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,INFINITY) FROM
+! A NEGATIVE EXPONENTIAL DlSTRIBUTION WlTH DENSITY PROPORTIONAL
+! TO EXP(-random_exponential), USING INVERSION.
+
+REAL  :: fn_val
+
+!     Local variable
+REAL  :: r
+
+DO
+  CALL RANDOM_NUMBER(r)
+  IF (r > zero) EXIT
+END DO
+
+fn_val = -LOG(r)
+RETURN
+
+END FUNCTION random_exponential
+
+
+
+FUNCTION random_Weibull(a) RESULT(fn_val)
+
+!     Generates a random variate from the Weibull distribution with
+!     probability density:
+!                      a
+!               a-1  -x
+!     f(x) = a.x    e
+
+REAL, INTENT(IN) :: a
+REAL             :: fn_val
+
+!     For speed, there is no checking that a is not zero or very small.
+
+fn_val = random_exponential() ** (one/a)
+RETURN
+
+END FUNCTION random_Weibull
+
+
+
+FUNCTION random_beta(aa, bb, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,1]
+! FROM A BETA DISTRIBUTION WITH DENSITY
+! PROPORTIONAL TO BETA**(AA-1) * (1-BETA)**(BB-1).
+! USING CHENG'S LOG LOGISTIC METHOD.
+
+!     AA = SHAPE PARAMETER FROM DISTRIBUTION (0 < REAL)
+!     BB = SHAPE PARAMETER FROM DISTRIBUTION (0 < REAL)
+
+REAL, INTENT(IN)    :: aa, bb
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+!     Local variables
+REAL, PARAMETER  :: aln4 = 1.3862944
+REAL             :: a, b, g, r, s, x, y, z
+REAL, SAVE       :: d, f, h, t, c
+LOGICAL, SAVE    :: swap
+
+IF (aa <= zero .OR. bb <= zero) THEN
+  WRITE(*, *) 'IMPERMISSIBLE SHAPE PARAMETER VALUE(S)'
+  STOP
+END IF
+
+IF (first) THEN                        ! Initialization, if necessary
+  a = aa
+  b = bb
+  swap = b > a
+  IF (swap) THEN
+    g = b
+    b = a
+    a = g
+  END IF
+  d = a/b
+  f = a+b
+  IF (b > one) THEN
+    h = SQRT((two*a*b - f)/(f - two))
+    t = one
+  ELSE
+    h = b
+    t = one/(one + (a/(vlarge*b))**b)
+  END IF
+  c = a+h
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r)
+  CALL RANDOM_NUMBER(x)
+  s = r*r*x
+  IF (r < vsmall .OR. s <= zero) CYCLE
+  IF (r < t) THEN
+    x = LOG(r/(one - r))/h
+    y = d*EXP(x)
+    z = c*x + f*LOG((one + d)/(one + y)) - aln4
+    IF (s - one > z) THEN
+      IF (s - s*z > one) CYCLE
+      IF (LOG(s) > z) CYCLE
+    END IF
+    fn_val = y/(one + y)
+  ELSE
+    IF (4.0*s > (one + one/d)**f) CYCLE
+    fn_val = one
+  END IF
+  EXIT
+END DO
+
+IF (swap) fn_val = one - fn_val
+RETURN
+END FUNCTION random_beta
+
+
+
+FUNCTION random_t(m) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE FROM A
+! T DISTRIBUTION USING KINDERMAN AND MONAHAN'S RATIO METHOD.
+
+!     M = DEGREES OF FREEDOM OF DISTRIBUTION
+!           (1 <= 1NTEGER)
+
+INTEGER, INTENT(IN) :: m
+REAL                :: fn_val
+
+!     Local variables
+REAL, SAVE      :: s, c, a, f, g
+REAL            :: r, x, v
+
+REAL, PARAMETER :: three = 3.0, four = 4.0, quart = 0.25,   &
+                   five = 5.0, sixteen = 16.0
+INTEGER         :: mm = 0
+
+IF (m < 1) THEN
+  WRITE(*, *) 'IMPERMISSIBLE DEGREES OF FREEDOM'
+  STOP
+END IF
+
+IF (m /= mm) THEN                    ! Initialization, if necessary
+  s = m
+  c = -quart*(s + one)
+  a = four/(one + one/s)**c
+  f = sixteen/a
+  IF (m > 1) THEN
+    g = s - one
+    g = ((s + one)/g)**c*SQRT((s+s)/g)
+  ELSE
+    g = one
+  END IF
+  mm = m
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r)
+  IF (r <= zero) CYCLE
+  CALL RANDOM_NUMBER(v)
+  x = (two*v - one)*g/r
+  v = x*x
+  IF (v > five - a*r) THEN
+    IF (m >= 1 .AND. r*(v + three) > f) CYCLE
+    IF (r > (one + v/s)**c) CYCLE
+  END IF
+  EXIT
+END DO
+
+fn_val = x
+RETURN
+END FUNCTION random_t
+
+
+
+SUBROUTINE random_mvnorm(n, h, d, f, first, x, ier)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! N.B. An extra argument, ier, has been added to Dagpunar's routine
+
+!     SUBROUTINE GENERATES AN N VARIATE RANDOM NORMAL
+!     VECTOR USING A CHOLESKY DECOMPOSITION.
+
+! ARGUMENTS:
+!        N = NUMBER OF VARIATES IN VECTOR
+!           (INPUT,INTEGER >= 1)
+!     H(J) = J'TH ELEMENT OF VECTOR OF MEANS
+!           (INPUT,REAL)
+!     X(J) = J'TH ELEMENT OF DELIVERED VECTOR
+!           (OUTPUT,REAL)
+!
+!    D(J*(J-1)/2+I) = (I,J)'TH ELEMENT OF VARIANCE MATRIX (J> = I)
+!            (INPUT,REAL)
+!    F((J-1)*(2*N-J)/2+I) = (I,J)'TH ELEMENT OF LOWER TRIANGULAR
+!           DECOMPOSITION OF VARIANCE MATRIX (J <= I)
+!            (OUTPUT,REAL)
+
+!    FIRST = .TRUE. IF THIS IS THE FIRST CALL OF THE ROUTINE
+!    OR IF THE DISTRIBUTION HAS CHANGED SINCE THE LAST CALL OF THE ROUTINE.
+!    OTHERWISE SET TO .FALSE.
+!            (INPUT,LOGICAL)
+
+!    ier = 1 if the input covariance matrix is not +ve definite
+!        = 0 otherwise
+
+INTEGER, INTENT(IN)   :: n
+REAL, INTENT(IN)      :: h(:), d(:)   ! d(n*(n+1)/2)
+REAL, INTENT(IN OUT)  :: f(:)         ! f(n*(n+1)/2)
+REAL, INTENT(OUT)     :: x(:)
+LOGICAL, INTENT(IN)   :: first
+INTEGER, INTENT(OUT)  :: ier
+
+!     Local variables
+INTEGER       :: j, i, m
+REAL          :: y, v
+INTEGER, SAVE :: n2
+
+IF (n < 1) THEN
+  WRITE(*, *) 'SIZE OF VECTOR IS NON POSITIVE'
+  STOP
+END IF
+
+ier = 0
+IF (first) THEN                        ! Initialization, if necessary
+  n2 = 2*n
+  IF (d(1) < zero) THEN
+    ier = 1
+    RETURN
+  END IF
+
+  f(1) = SQRT(d(1))
+  y = one/f(1)
+  DO j = 2,n
+    f(j) = d(1+j*(j-1)/2) * y
+  END DO
+
+  DO i = 2,n
+    v = d(i*(i-1)/2+i)
+    DO m = 1,i-1
+      v = v - f((m-1)*(n2-m)/2+i)**2
+    END DO
+
+    IF (v < zero) THEN
+      ier = 1
+      RETURN
+    END IF
+
+    v = SQRT(v)
+    y = one/v
+    f((i-1)*(n2-i)/2+i) = v
+    DO j = i+1,n
+      v = d(j*(j-1)/2+i)
+      DO m = 1,i-1
+        v = v - f((m-1)*(n2-m)/2+i)*f((m-1)*(n2-m)/2 + j)
+      END DO ! m = 1,i-1
+      f((i-1)*(n2-i)/2 + j) = v*y
+    END DO ! j = i+1,n
+  END DO ! i = 2,n
+END IF
+
+x(1:n) = h(1:n)
+DO j = 1,n
+  y = random_normal()
+  DO i = j,n
+    x(i) = x(i) + f((j-1)*(n2-j)/2 + i) * y
+  END DO ! i = j,n
+END DO ! j = 1,n
+
+RETURN
+END SUBROUTINE random_mvnorm
+
+
+
+FUNCTION random_inv_gauss(h, b, first) RESULT(fn_val)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM VARIATE IN [0,INFINITY] FROM
+! A REPARAMETERISED GENERALISED INVERSE GAUSSIAN (GIG) DISTRIBUTION
+! WITH DENSITY PROPORTIONAL TO  GIG**(H-1) * EXP(-0.5*B*(GIG+1/GIG))
+! USING A RATIO METHOD.
+
+!     H = PARAMETER OF DISTRIBUTION (0 <= REAL)
+!     B = PARAMETER OF DISTRIBUTION (0 < REAL)
+
+REAL, INTENT(IN)    :: h, b
+LOGICAL, INTENT(IN) :: first
+REAL                :: fn_val
+
+!     Local variables
+REAL            :: ym, xm, r, w, r1, r2, x
+REAL, SAVE      :: a, c, d, e
+REAL, PARAMETER :: quart = 0.25
+
+IF (h < zero .OR. b <= zero) THEN
+  WRITE(*, *) 'IMPERMISSIBLE DISTRIBUTION PARAMETER VALUES'
+  STOP
+END IF
+
+IF (first) THEN                        ! Initialization, if necessary
+  IF (h > quart*b*SQRT(vlarge)) THEN
+    WRITE(*, *) 'THE RATIO H:B IS TOO SMALL'
+    STOP
+  END IF
+  e = b*b
+  d = h + one
+  ym = (-d + SQRT(d*d + e))/b
+  IF (ym < vsmall) THEN
+    WRITE(*, *) 'THE VALUE OF B IS TOO SMALL'
+    STOP
+  END IF
+
+  d = h - one
+  xm = (d + SQRT(d*d + e))/b
+  d = half*d
+  e = -quart*b
+  r = xm + one/xm
+  w = xm*ym
+  a = w**(-half*h) * SQRT(xm/ym) * EXP(-e*(r - ym - one/ym))
+  IF (a < vsmall) THEN
+    WRITE(*, *) 'THE VALUE OF H IS TOO LARGE'
+    STOP
+  END IF
+  c = -d*LOG(xm) - e*r
+END IF
+
+DO
+  CALL RANDOM_NUMBER(r1)
+  IF (r1 <= zero) CYCLE
+  CALL RANDOM_NUMBER(r2)
+  x = a*r2/r1
+  IF (x <= zero) CYCLE
+  IF (LOG(r1) < d*LOG(x) + e*(x + one/x) + c) EXIT
+END DO
+
+fn_val = x
+
+RETURN
+END FUNCTION random_inv_gauss
+
+
+
+FUNCTION random_Poisson(mu, first) RESULT(ival)
+!**********************************************************************
+!     Translated to Fortran 90 by Alan Miller from:
+!                           RANLIB
+!
+!     Library of Fortran Routines for Random Number Generation
+!
+!                    Compiled and Written by:
+!
+!                         Barry W. Brown
+!                          James Lovato
+!
+!             Department of Biomathematics, Box 237
+!             The University of Texas, M.D. Anderson Cancer Center
+!             1515 Holcombe Boulevard
+!             Houston, TX      77030
+!
+! This work was supported by grant CA-16672 from the National Cancer Institute.
+
+!                    GENerate POIsson random deviate
+
+!                            Function
+
+! Generates a single random deviate from a Poisson distribution with mean mu.
+
+!                            Arguments
+
+!     mu --> The mean of the Poisson distribution from which
+!            a random deviate is to be generated.
+!                              REAL mu
+
+!                              Method
+
+!     For details see:
+
+!               Ahrens, J.H. and Dieter, U.
+!               Computer Generation of Poisson Deviates
+!               From Modified Normal Distributions.
+!               ACM Trans. Math. Software, 8, 2
+!               (June 1982),163-179
+
+!     TABLES: COEFFICIENTS A0-A7 FOR STEP F. FACTORIALS FACT
+!     COEFFICIENTS A(K) - FOR PX = FK*V*V*SUM(A(K)*V**K)-DEL
+
+!     SEPARATION OF CASES A AND B
+
+!     .. Scalar Arguments ..
+REAL, INTENT(IN)    :: mu
+LOGICAL, INTENT(IN) :: first
+INTEGER             :: ival
+!     ..
+!     .. Local Scalars ..
+REAL          :: b1, b2, c, c0, c1, c2, c3, del, difmuk, e, fk, fx, fy, g,  &
+                 omega, px, py, t, u, v, x, xx
+REAL, SAVE    :: s, d, p, q, p0
+INTEGER       :: j, k, kflag
+LOGICAL, SAVE :: full_init
+INTEGER, SAVE :: l, m
+!     ..
+!     .. Local Arrays ..
+REAL, SAVE    :: pp(35)
+!     ..
+!     .. Data statements ..
+REAL, PARAMETER :: a0 = -.5, a1 = .3333333, a2 = -.2500068, a3 = .2000118,  &
+                   a4 = -.1661269, a5 = .1421878, a6 = -.1384794,   &
+                   a7 = .1250060
+
+REAL, PARAMETER :: fact(10) = (/ 1., 1., 2., 6., 24., 120., 720., 5040.,  &
+                                 40320., 362880. /)
+
+!     ..
+!     .. Executable Statements ..
+IF (mu > 10.0) THEN
+!     C A S E  A. (RECALCULATION OF S, D, L IF MU HAS CHANGED)
+
+  IF (first) THEN
+    s = SQRT(mu)
+    d = 6.0*mu*mu
+
+!             THE POISSON PROBABILITIES PK EXCEED THE DISCRETE NORMAL
+!             PROBABILITIES FK WHENEVER K >= M(MU). L=IFIX(MU-1.1484)
+!             IS AN UPPER BOUND TO M(MU) FOR ALL MU >= 10 .
+
+    l = mu - 1.1484
+    full_init = .false.
+  END IF
+
+
+!     STEP N. NORMAL SAMPLE - random_normal() FOR STANDARD NORMAL DEVIATE
+
+  g = mu + s*random_normal()
+  IF (g > 0.0) THEN
+    ival = g
+
+!     STEP I. IMMEDIATE ACCEPTANCE IF ival IS LARGE ENOUGH
+
+    IF (ival>=l) RETURN
+
+!     STEP S. SQUEEZE ACCEPTANCE - SAMPLE U
+
+    fk = ival
+    difmuk = mu - fk
+    CALL RANDOM_NUMBER(u)
+    IF (d*u >= difmuk*difmuk*difmuk) RETURN
+  END IF
+
+!     STEP P. PREPARATIONS FOR STEPS Q AND H.
+!             (RECALCULATIONS OF PARAMETERS IF NECESSARY)
+!             .3989423=(2*PI)**(-.5)  .416667E-1=1./24.  .1428571=1./7.
+!             THE QUANTITIES B1, B2, C3, C2, C1, C0 ARE FOR THE HERMITE
+!             APPROXIMATIONS TO THE DISCRETE NORMAL PROBABILITIES FK.
+!             C=.1069/MU GUARANTEES MAJORIZATION BY THE 'HAT'-FUNCTION.
+
+  IF (.NOT. full_init) THEN
+    omega = .3989423/s
+    b1 = .4166667E-1/mu
+    b2 = .3*b1*b1
+    c3 = .1428571*b1*b2
+    c2 = b2 - 15.*c3
+    c1 = b1 - 6.*b2 + 45.*c3
+    c0 = 1. - b1 + 3.*b2 - 15.*c3
+    c = .1069/mu
+    full_init = .true.
+  END IF
+
+  IF (g < 0.0) GO TO 50
+
+!             'SUBROUTINE' F IS CALLED (KFLAG=0 FOR CORRECT RETURN)
+
+  kflag = 0
+  GO TO 70
+
+!     STEP Q. QUOTIENT ACCEPTANCE (RARE CASE)
+
+  40 IF (fy-u*fy <= py*EXP(px-fx)) RETURN
+
+!     STEP E. EXPONENTIAL SAMPLE - random_exponential() FOR STANDARD EXPONENTIAL
+!             DEVIATE E AND SAMPLE T FROM THE LAPLACE 'HAT'
+!             (IF T <= -.6744 THEN PK < FK FOR ALL MU >= 10.)
+
+  50 e = random_exponential()
+  CALL RANDOM_NUMBER(u)
+  u = u + u - one
+  t = 1.8 + SIGN(e, u)
+  IF (t <= (-.6744)) GO TO 50
+  ival = mu + s*t
+  fk = ival
+  difmuk = mu - fk
+
+!             'SUBROUTINE' F IS CALLED (KFLAG=1 FOR CORRECT RETURN)
+
+  kflag = 1
+  GO TO 70
+
+!     STEP H. HAT ACCEPTANCE (E IS REPEATED ON REJECTION)
+
+  60 IF (c*ABS(u) > py*EXP(px+e) - fy*EXP(fx+e)) GO TO 50
+  RETURN
+
+!     STEP F. 'SUBROUTINE' F. CALCULATION OF PX, PY, FX, FY.
+!             CASE ival < 10 USES FACTORIALS FROM TABLE FACT
+
+  70 IF (ival>=10) GO TO 80
+  px = -mu
+  py = mu**ival/fact(ival+1)
+  GO TO 110
+
+!             CASE ival >= 10 USES POLYNOMIAL APPROXIMATION
+!             A0-A7 FOR ACCURACY WHEN ADVISABLE
+!             .8333333E-1=1./12.  .3989423=(2*PI)**(-.5)
+
+  80 del = .8333333E-1/fk
+  del = del - 4.8*del*del*del
+  v = difmuk/fk
+  IF (ABS(v)>0.25) THEN
+    px = fk*LOG(one + v) - difmuk - del
+  ELSE
+    px = fk*v*v* (((((((a7*v+a6)*v+a5)*v+a4)*v+a3)*v+a2)*v+a1)*v+a0) - del
+  END IF
+  py = .3989423/SQRT(fk)
+  110 x = (half - difmuk)/s
+  xx = x*x
+  fx = -half*xx
+  fy = omega* (((c3*xx + c2)*xx + c1)*xx + c0)
+  IF (kflag <= 0) GO TO 40
+  GO TO 60
+
+!---------------------------------------------------------------------------
+!     C A S E  B.    mu < 10
+!     START NEW TABLE AND CALCULATE P0 IF NECESSARY
+
+ELSE
+  IF (first) THEN
+    m = MAX(1, INT(mu))
+    l = 0
+    p = EXP(-mu)
+    q = p
+    p0 = p
+  END IF
+
+!     STEP U. UNIFORM SAMPLE FOR INVERSION METHOD
+
+  DO
+    CALL RANDOM_NUMBER(u)
+    ival = 0
+    IF (u <= p0) RETURN
+
+!     STEP T. TABLE COMPARISON UNTIL THE END PP(L) OF THE
+!             PP-TABLE OF CUMULATIVE POISSON PROBABILITIES
+!             (0.458=PP(9) FOR MU=10)
+
+    IF (l == 0) GO TO 150
+    j = 1
+    IF (u > 0.458) j = MIN(l, m)
+    DO k = j, l
+      IF (u <= pp(k)) GO TO 180
+    END DO
+    IF (l == 35) CYCLE
+
+!     STEP C. CREATION OF NEW POISSON PROBABILITIES P
+!             AND THEIR CUMULATIVES Q=PP(K)
+
+    150 l = l + 1
+    DO k = l, 35
+      p = p*mu / k
+      q = q + p
+      pp(k) = q
+      IF (u <= q) GO TO 170
+    END DO
+    l = 35
+  END DO
+
+  170 l = k
+  180 ival = k
+  RETURN
+END IF
+
+RETURN
+END FUNCTION random_Poisson
+
+
+
+FUNCTION random_binomial1(n, p, first) RESULT(ival)
+
+! FUNCTION GENERATES A RANDOM BINOMIAL VARIATE USING C.D.Kemp's method.
+! This algorithm is suitable when many random variates are required
+! with the SAME parameter values for n & p.
+
+!    P = BERNOULLI SUCCESS PROBABILITY
+!           (0 <= REAL <= 1)
+!    N = NUMBER OF BERNOULLI TRIALS
+!           (1 <= INTEGER)
+!    FIRST = .TRUE. for the first call using the current parameter values
+!          = .FALSE. if the values of (n,p) are unchanged from last call
+
+! Reference: Kemp, C.D. (1986). `A modal method for generating binomial
+!            variables', Commun. Statist. - Theor. Meth. 15(3), 805-813.
+
+INTEGER, INTENT(IN) :: n
+REAL, INTENT(IN)    :: p
+LOGICAL, INTENT(IN) :: first
+INTEGER             :: ival
+
+!     Local variables
+
+INTEGER         :: ru, rd
+INTEGER, SAVE   :: r0
+REAL            :: u, pd, pu
+REAL, SAVE      :: odds_ratio, p_r
+REAL, PARAMETER :: zero = 0.0, one = 1.0
+
+IF (first) THEN
+  r0 = (n+1)*p
+  p_r = bin_prob(n, p, r0)
+  odds_ratio = p / (one - p)
+END IF
+
+CALL RANDOM_NUMBER(u)
+u = u - p_r
+IF (u < zero) THEN
+  ival = r0
+  RETURN
+END IF
+
+pu = p_r
+ru = r0
+pd = p_r
+rd = r0
+DO
+  rd = rd - 1
+  IF (rd >= 0) THEN
+    pd = pd * (rd+1) / (odds_ratio * (n-rd))
+    u = u - pd
+    IF (u < zero) THEN
+      ival = rd
+      RETURN
+    END IF
+  END IF
+
+  ru = ru + 1
+  IF (ru <= n) THEN
+    pu = pu * (n-ru+1) * odds_ratio / ru
+    u = u - pu
+    IF (u < zero) THEN
+      ival = ru
+      RETURN
+    END IF
+  END IF
+END DO
+
+!     This point should not be reached, but just in case:
+
+ival = r0
+RETURN
+
+END FUNCTION random_binomial1
+
+
+
+FUNCTION bin_prob(n, p, r) RESULT(fn_val)
+!     Calculate a binomial probability
+
+INTEGER, INTENT(IN) :: n, r
+REAL, INTENT(IN)    :: p
+REAL                :: fn_val
+
+!     Local variable
+REAL                :: one = 1.0
+
+fn_val = EXP( lngamma(DBLE(n+1)) - lngamma(DBLE(r+1)) - lngamma(DBLE(n-r+1)) &
+              + r*LOG(p) + (n-r)*LOG(one - p) )
+RETURN
+
+END FUNCTION bin_prob
+
+
+
+FUNCTION lngamma(x) RESULT(fn_val)
+
+! Logarithm to base e of the gamma function.
+!
+! Accurate to about 1.e-14.
+! Programmer: Alan Miller
+
+! Latest revision of Fortran 77 version - 28 February 1988
+
+REAL (dp), INTENT(IN) :: x
+REAL (dp)             :: fn_val
+
+!       Local variables
+
+REAL (dp) :: a1 = -4.166666666554424D-02, a2 = 2.430554511376954D-03,  &
+             a3 = -7.685928044064347D-04, a4 = 5.660478426014386D-04,  &
+             temp, arg, product, lnrt2pi = 9.189385332046727D-1,       &
+             pi = 3.141592653589793D0
+LOGICAL   :: reflect
+
+!       lngamma is not defined if x = 0 or a negative integer.
+
+IF (x > 0.d0) GO TO 10
+IF (x /= INT(x)) GO TO 10
+fn_val = 0.d0
+RETURN
+
+!       If x < 0, use the reflection formula:
+!               gamma(x) * gamma(1-x) = pi * cosec(pi.x)
+
+10 reflect = (x < 0.d0)
+IF (reflect) THEN
+  arg = 1.d0 - x
+ELSE
+  arg = x
+END IF
+
+!       Increase the argument, if necessary, to make it > 10.
+
+product = 1.d0
+20 IF (arg <= 10.d0) THEN
+  product = product * arg
+  arg = arg + 1.d0
+  GO TO 20
+END IF
+
+!  Use a polynomial approximation to Stirling's formula.
+!  N.B. The real Stirling's formula is used here, not the simpler, but less
+!       accurate formula given by De Moivre in a letter to Stirling, which
+!       is the one usually quoted.
+
+arg = arg - 0.5D0
+temp = 1.d0/arg**2
+fn_val = lnrt2pi + arg * (LOG(arg) - 1.d0 + &
+                  (((a4*temp + a3)*temp + a2)*temp + a1)*temp) - LOG(product)
+IF (reflect) THEN
+  temp = SIN(pi * x)
+  fn_val = LOG(pi/temp) - fn_val
+END IF
+RETURN
+END FUNCTION lngamma
+
+
+
+FUNCTION random_binomial2(n, pp, first) RESULT(ival)
+!**********************************************************************
+!     Translated to Fortran 90 by Alan Miller from:
+!                              RANLIB
+!
+!     Library of Fortran Routines for Random Number Generation
+!
+!                      Compiled and Written by:
+!
+!                           Barry W. Brown
+!                            James Lovato
+!
+!               Department of Biomathematics, Box 237
+!               The University of Texas, M.D. Anderson Cancer Center
+!               1515 Holcombe Boulevard
+!               Houston, TX      77030
+!
+! This work was supported by grant CA-16672 from the National Cancer Institute.
+
+!                    GENerate BINomial random deviate
+
+!                              Function
+
+!     Generates a single random deviate from a binomial
+!     distribution whose number of trials is N and whose
+!     probability of an event in each trial is P.
+
+!                              Arguments
+
+!     N  --> The number of trials in the binomial distribution
+!            from which a random deviate is to be generated.
+!                              INTEGER N
+
+!     P  --> The probability of an event in each trial of the
+!            binomial distribution from which a random deviate
+!            is to be generated.
+!                              REAL P
+
+!     FIRST --> Set FIRST = .TRUE. for the first call to perform initialization
+!               the set FIRST = .FALSE. for further calls using the same pair
+!               of parameter values (N, P).
+!                              LOGICAL FIRST
+
+!     random_binomial2 <-- A random deviate yielding the number of events
+!                from N independent trials, each of which has
+!                a probability of event P.
+!                              INTEGER random_binomial
+
+!                              Method
+
+!     This is algorithm BTPE from:
+
+!         Kachitvichyanukul, V. and Schmeiser, B. W.
+!         Binomial Random Variate Generation.
+!         Communications of the ACM, 31, 2 (February, 1988) 216.
+
+!**********************************************************************
+
+!*****DETERMINE APPROPRIATE ALGORITHM AND WHETHER SETUP IS NECESSARY
+
+!     ..
+!     .. Scalar Arguments ..
+REAL, INTENT(IN)    :: pp
+INTEGER, INTENT(IN) :: n
+LOGICAL, INTENT(IN) :: first
+INTEGER             :: ival
+!     ..
+!     .. Local Scalars ..
+REAL            :: alv, amaxp, f, f1, f2, u, v, w, w2, x, x1, x2, ynorm, z, z2
+REAL, PARAMETER :: zero = 0.0, half = 0.5, one = 1.0
+INTEGER         :: i, ix, ix1, k, mp
+INTEGER, SAVE   :: m
+REAL, SAVE      :: p, q, xnp, ffm, fm, xnpq, p1, xm, xl, xr, c, al, xll,  &
+                   xlr, p2, p3, p4, qn, r, g
+
+!     ..
+!     .. Executable Statements ..
+
+!*****SETUP, PERFORM ONLY WHEN PARAMETERS CHANGE
+
+IF (first) THEN
+  p = MIN(pp, one-pp)
+  q = one - p
+  xnp = n * p
+END IF
+
+IF (xnp > 30.) THEN
+  IF (first) THEN
+    ffm = xnp + p
+    m = ffm
+    fm = m
+    xnpq = xnp * q
+    p1 = INT(2.195*SQRT(xnpq) - 4.6*q) + half
+    xm = fm + half
+    xl = xm - p1
+    xr = xm + p1
+    c = 0.134 + 20.5 / (15.3 + fm)
+    al = (ffm-xl) / (ffm - xl*p)
+    xll = al * (one + half*al)
+    al = (xr - ffm) / (xr*q)
+    xlr = al * (one + half*al)
+    p2 = p1 * (one + c + c)
+    p3 = p2 + c / xll
+    p4 = p3 + c / xlr
+  END IF
+
+!*****GENERATE VARIATE, Binomial mean at least 30.
+
+  20 CALL RANDOM_NUMBER(u)
+  u = u * p4
+  CALL RANDOM_NUMBER(v)
+
+!     TRIANGULAR REGION
+
+  IF (u <= p1) THEN
+    ix = xm - p1 * v + u
+    GO TO 110
+  END IF
+
+!     PARALLELOGRAM REGION
+
+  IF (u <= p2) THEN
+    x = xl + (u-p1) / c
+    v = v * c + one - ABS(xm-x) / p1
+    IF (v > one .OR. v <= zero) GO TO 20
+    ix = x
+  ELSE
+
+!     LEFT TAIL
+
+    IF (u <= p3) THEN
+      ix = xl + LOG(v) / xll
+      IF (ix < 0) GO TO 20
+      v = v * (u-p2) * xll
+    ELSE
+
+!     RIGHT TAIL
+
+      ix = xr - LOG(v) / xlr
+      IF (ix > n) GO TO 20
+      v = v * (u-p3) * xlr
+    END IF
+  END IF
+
+!*****DETERMINE APPROPRIATE WAY TO PERFORM ACCEPT/REJECT TEST
+
+  k = ABS(ix-m)
+  IF (k <= 20 .OR. k >= xnpq/2-1) THEN
+
+!     EXPLICIT EVALUATION
+
+    f = one
+    r = p / q
+    g = (n+1) * r
+    IF (m < ix) THEN
+      mp = m + 1
+      DO i = mp, ix
+        f = f * (g/i-r)
+      END DO
+
+    ELSE IF (m > ix) THEN
+      ix1 = ix + 1
+      DO i = ix1, m
+        f = f / (g/i-r)
+      END DO
+    END IF
+
+    IF (v > f) THEN
+      GO TO 20
+    ELSE
+      GO TO 110
+    END IF
+  END IF
+
+!     SQUEEZING USING UPPER AND LOWER BOUNDS ON LOG(F(X))
+
+  amaxp = (k/xnpq) * ((k*(k/3. + .625) + .1666666666666)/xnpq + half)
+  ynorm = -k * k / (2.*xnpq)
+  alv = LOG(v)
+  IF (alv<ynorm - amaxp) GO TO 110
+  IF (alv>ynorm + amaxp) GO TO 20
+
+!     STIRLING'S (actually de Moivre's) FORMULA TO MACHINE ACCURACY FOR
+!     THE FINAL ACCEPTANCE/REJECTION TEST
+
+  x1 = ix + 1
+  f1 = fm + one
+  z = n + 1 - fm
+  w = n - ix + one
+  z2 = z * z
+  x2 = x1 * x1
+  f2 = f1 * f1
+  w2 = w * w
+  IF (alv - (xm*LOG(f1/x1) + (n-m+half)*LOG(z/w) + (ix-m)*LOG(w*p/(x1*q)) +    &
+      (13860.-(462.-(132.-(99.-140./f2)/f2)/f2)/f2)/f1/166320. +               &
+      (13860.-(462.-(132.-(99.-140./z2)/z2)/z2)/z2)/z/166320. +                &
+      (13860.-(462.-(132.-(99.-140./x2)/x2)/x2)/x2)/x1/166320. +               &
+      (13860.-(462.-(132.-(99.-140./w2)/w2)/w2)/w2)/w/166320.) > zero) THEN
+    GO TO 20
+  ELSE
+    GO TO 110
+  END IF
+
+ELSE
+!     INVERSE CDF LOGIC FOR MEAN LESS THAN 30
+  IF (first) THEN
+    qn = q ** n
+    r = p / q
+    g = r * (n+1)
+  END IF
+
+  90 ix = 0
+  f = qn
+  CALL RANDOM_NUMBER(u)
+  100 IF (u >= f) THEN
+    IF (ix > 110) GO TO 90
+    u = u - f
+    ix = ix + 1
+    f = f * (g/ix - r)
+    GO TO 100
+  END IF
+END IF
+
+110 IF (pp > half) ix = n - ix
+ival = ix
+RETURN
+
+END FUNCTION random_binomial2
+
+
+
+
+FUNCTION random_neg_binomial(sk, p) RESULT(ival)
+
+! Adapted from Fortran 77 code from the book:
+!     Dagpunar, J. 'Principles of random variate generation'
+!     Clarendon Press, Oxford, 1988.   ISBN 0-19-852202-9
+
+! FUNCTION GENERATES A RANDOM NEGATIVE BINOMIAL VARIATE USING UNSTORED
+! INVERSION AND/OR THE REPRODUCTIVE PROPERTY.
+
+!    SK = NUMBER OF FAILURES REQUIRED (Dagpunar's words!)
+!       = the `power' parameter of the negative binomial
+!           (0 < REAL)
+!    P = BERNOULLI SUCCESS PROBABILITY
+!           (0 < REAL < 1)
+
+! THE PARAMETER H IS SET SO THAT UNSTORED INVERSION ONLY IS USED WHEN P <= H,
+! OTHERWISE A COMBINATION OF UNSTORED INVERSION AND
+! THE REPRODUCTIVE PROPERTY IS USED.
+
+REAL, INTENT(IN)   :: sk, p
+INTEGER            :: ival
+
+!     Local variables
+! THE PARAMETER ULN = -LOG(MACHINE'S SMALLEST REAL NUMBER).
+
+REAL, PARAMETER    :: h = 0.7
+REAL               :: q, x, st, uln, v, r, s, y, g
+INTEGER            :: k, i, n
+
+IF (sk <= zero .OR. p <= zero .OR. p >= one) THEN
+  WRITE(*, *) 'IMPERMISSIBLE DISTRIBUTION PARAMETER VALUES'
+  STOP
+END IF
+
+q = one - p
+x = zero
+st = sk
+IF (p > h) THEN
+  v = one/LOG(p)
+  k = st
+  DO i = 1,k
+    DO
+      CALL RANDOM_NUMBER(r)
+      IF (r > zero) EXIT
+    END DO
+    n = v*LOG(r)
+    x = x + n
+  END DO
+  st = st - k
+END IF
+
+s = zero
+uln = -LOG(vsmall)
+IF (st > -uln/LOG(q)) THEN
+  WRITE(*, *) ' P IS TOO LARGE FOR THIS VALUE OF SK'
+  STOP
+END IF
+
+y = q**st
+g = st
+CALL RANDOM_NUMBER(r)
+DO
+  IF (y > r) EXIT
+  r = r - y
+  s = s + one
+  y = y*p*g/s
+  g = g + one
+END DO
+
+ival = x + s + half
+RETURN
+END FUNCTION random_neg_binomial
+
+
+
+FUNCTION random_von_Mises(k, first) RESULT(fn_val)
+
+!     Algorithm VMD from:
+!     Dagpunar, J.S. (1990) `Sampling from the von Mises distribution via a
+!     comparison of random numbers', J. of Appl. Statist., 17, 165-168.
+
+!     Fortran 90 code by Alan Miller
+!     CSIRO Division of Mathematical & Information Sciences
+
+!     Arguments:
+!     k (real)        parameter of the von Mises distribution.
+!     first (logical) set to .TRUE. the first time that the function
+!                     is called, or the first time with a new value
+!                     for k.   When first = .TRUE., the function sets
+!                     up starting values and may be very much slower.
+
+REAL, INTENT(IN)     :: k
+LOGICAL, INTENT(IN)  :: first
+REAL                 :: fn_val
+
+!     Local variables
+
+INTEGER          :: j, n
+INTEGER, SAVE    :: nk
+REAL, PARAMETER  :: pi = 3.14159265
+REAL, SAVE       :: p(20), theta(0:20)
+REAL             :: sump, r, th, lambda, rlast
+REAL (dp)        :: dk
+
+IF (first) THEN                        ! Initialization, if necessary
+  IF (k < zero) THEN
+    WRITE(*, *) '** Error: argument k for random_von_Mises = ', k
+    RETURN
+  END IF
+
+  nk = k + k + one
+  IF (nk > 20) THEN
+    WRITE(*, *) '** Error: argument k for random_von_Mises = ', k
+    RETURN
+  END IF
+
+  dk = k
+  theta(0) = zero
+  IF (k > half) THEN
+
+!     Set up array p of probabilities.
+
+    sump = zero
+    DO j = 1, nk
+      IF (j < nk) THEN
+        theta(j) = ACOS(one - j/k)
+      ELSE
+        theta(nk) = pi
+      END IF
+
+!     Numerical integration of e^[k.cos(x)] from theta(j-1) to theta(j)
+
+      CALL integral(theta(j-1), theta(j), p(j), dk)
+      sump = sump + p(j)
+    END DO
+    p(1:nk) = p(1:nk) / sump
+  ELSE
+    p(1) = one
+    theta(1) = pi
+  END IF                         ! if k > 0.5
+END IF                           ! if first
+
+CALL RANDOM_NUMBER(r)
+DO j = 1, nk
+  r = r - p(j)
+  IF (r < zero) EXIT
+END DO
+r = -r/p(j)
+
+DO
+  th = theta(j-1) + r*(theta(j) - theta(j-1))
+  lambda = k - j + one - k*COS(th)
+  n = 1
+  rlast = lambda
+
+  DO
+    CALL RANDOM_NUMBER(r)
+    IF (r > rlast) EXIT
+    n = n + 1
+    rlast = r
+  END DO
+
+  IF (n .NE. 2*(n/2)) EXIT         ! is n even?
+  CALL RANDOM_NUMBER(r)
+END DO
+
+fn_val = SIGN(th, (r - rlast)/(one - rlast) - half)
+RETURN
+END FUNCTION random_von_Mises
+
+
+
+SUBROUTINE integral(a, b, result, dk)
+
+!     Gaussian integration of exp(k.cosx) from a to b.
+
+REAL (dp), INTENT(IN) :: dk
+REAL, INTENT(IN)      :: a, b
+REAL, INTENT(OUT)     :: result
+
+!     Local variables
+
+REAL (dp)  :: xmid, range, x1, x2,                                    &
+  x(3) = (/0.238619186083197_dp, 0.661209386466265_dp, 0.932469514203152_dp/), &
+  w(3) = (/0.467913934572691_dp, 0.360761573048139_dp, 0.171324492379170_dp/)
+INTEGER    :: i
+
+xmid = (a + b)/2._dp
+range = (b - a)/2._dp
+
+result = 0._dp
+DO i = 1, 3
+  x1 = xmid + x(i)*range
+  x2 = xmid - x(i)*range
+  result = result + w(i)*(EXP(dk*COS(x1)) + EXP(dk*COS(x2)))
+END DO
+
+result = result * range
+RETURN
+END SUBROUTINE integral
+
+
+
+FUNCTION random_Cauchy() RESULT(fn_val)
+
+!     Generate a random deviate from the standard Cauchy distribution
+
+REAL     :: fn_val
+
+!     Local variables
+REAL     :: v(2)
+
+DO
+  CALL RANDOM_NUMBER(v)
+  v = two*(v - half)
+  IF (ABS(v(2)) < vsmall) CYCLE               ! Test for zero
+  IF (v(1)**2 + v(2)**2 < one) EXIT
+END DO
+fn_val = v(1) / v(2)
+
+RETURN
+END FUNCTION random_Cauchy
+
+
+
+SUBROUTINE random_order(order, n)
+
+!     Generate a random ordering of the integers 1 ... n.
+
+INTEGER, INTENT(IN)  :: n
+INTEGER, INTENT(OUT) :: order(n)
+
+!     Local variables
+
+INTEGER :: i, j, k
+REAL    :: wk
+
+DO i = 1, n
+  order(i) = i
+END DO
+
+!     Starting at the end, swap the current last indicator with one
+!     randomly chosen from those preceeding it.
+
+DO i = n, 2, -1
+  CALL RANDOM_NUMBER(wk)
+  j = 1 + i * wk
+  IF (j < i) THEN
+    k = order(i)
+    order(i) = order(j)
+    order(j) = k
+  END IF
+END DO
+
+RETURN
+END SUBROUTINE random_order
+
+
+
+SUBROUTINE seed_random_number(iounit)
+
+INTEGER, INTENT(IN)  :: iounit
+
+! Local variables
+
+INTEGER              :: k
+INTEGER, ALLOCATABLE :: seed(:)
+
+CALL RANDOM_SEED(SIZE=k)
+ALLOCATE( seed(k) )
+
+WRITE(*, '(a, i2, a)')' Enter ', k, ' integers for random no. seeds: '
+READ(*, *) seed
+WRITE(iounit, '(a, (7i10))') ' Random no. seeds: ', seed
+CALL RANDOM_SEED(PUT=seed)
+
+DEALLOCATE( seed )
+
+RETURN
+END SUBROUTINE seed_random_number
+
+
+END MODULE KPP_ROOT_Random
+
+MODULE KPP_ROOT_Integrator
+  USE KPP_ROOT_Random
+  USE KPP_ROOT_Parameters, ONLY : NVAR, NFIX, NREACT 
+  USE KPP_ROOT_Global, ONLY : TIME, RCONST, Volume 
+  USE KPP_ROOT_Stoichiom  
+  USE KPP_ROOT_Stochastic
+  USE KPP_ROOT_Rates
+  USE KPP_ROOT_Random, ddp => dp
+  IMPLICIT NONE
+
+CONTAINS
+
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+SUBROUTINE TauLeap(Nsteps, Tau, T, SCT, NmlcV, NmlcF)
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+!
+!   Tau-leap stochastic integration
+!   INPUT:
+!       Nsteps  = no. of tau-leap steps to be simulated
+!       Tau     = time step length
+!       T       = time
+!       SCT     = stochastic rate constants
+!       NmlcV, NmlcF = no. of molecules for variable and fixed species
+!   OUTPUT:
+!       T       = updated time (after Nsteps)
+!       NmlcV   = updated no. of molecules for variable species
+!      
+!
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  IMPLICIT NONE
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+      KPP_REAL:: T, Tau
+      INTEGER :: Nsteps     
+      INTEGER :: NmlcV(NVAR), NmlcF(NFIX)
+      INTEGER :: i, j, irct, id, istep, Nfirings(NREACT)
+      REAL   :: mu
+      KPP_REAL :: A(NREACT), SCT(NREACT), x
+      LOGICAL, SAVE :: First = .TRUE.
+   
+      DO istep = 1, Nsteps
+
+          ! Propensity vector
+          CALL  Propensity ( NmlcV, NmlcF, SCT, A )
+          
+          ! Index of next reaction
+          DO irct = 1, NREACT
+            mu = A(irct)*Tau
+            Nfirings(irct) = random_Poisson(mu, First)
+            First = .TRUE.
+          END DO
+          
+          ! Update time with the leap interval
+          T = T + Tau;
+
+          ! Directly update state vector
+          DO irct = 1, NREACT
+             DO i = CCOL_STOICM(irct), CCOL_STOICM(irct+1)-1
+                id = IROW_STOICM(i)
+                NmlcV(id) = MAX(0, NmlcV(id) + Nfirings(irct)*INT(STOICM(i)))
+             END DO
+          END DO
+          
+          ! Update state vector
+          ! DO irct = 1, NREACT
+          !   DO j = 1, Nfirings(irct)
+          !    CALL MoleculeChange( irct, NmlcV )
+          !   END DO 
+          ! END DO
+        
+     END DO
+     
+CONTAINS
+
+     SUBROUTINE PropensityTemplate( T, NmlcV, NmlcF, Prop )
+      KPP_REAL, INTENT(IN)  :: T
+      INTEGER, INTENT(IN)   :: NmlcV(NVAR), NmlcF(NFIX)
+      KPP_REAL, INTENT(OUT) :: Prop(NREACT)
+      KPP_REAL :: Tsave
+! Update the stochastic reaction rates, which may be time dependent 
+      Tsave = TIME
+      TIME = T
+      CALL Update_RCONST()
+      CALL StochasticRates( RCONST, Volume, SCT )   
+      CALL Propensity ( NmlcV, NmlcF, SCT, Prop )
+      TIME = Tsave
+     END SUBROUTINE PropensityTemplate    
+    
+END SUBROUTINE TauLeap
+!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/readme
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/readme	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/readme	(revision 3477)
@@ -0,0 +1,3 @@
+Integrators in this directory have been contributed by KPP users. By
+default, KPP will not search for integrators in this directory. To
+activate them, move them into the int/ directory.
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/ros2_manual.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/ros2_manual.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/ros2_manual.def	(revision 3477)
@@ -0,0 +1,5 @@
+#FUNCTION AGGREGATE
+#JACOBIAN SPARSE_LU_ROW 
+
+#DOUBLE ON
+#INTFILE ros2_manual
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/ros2_manual.f90
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/ros2_manual.f90	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/int/user_contributed/ros2_manual.f90	(revision 3477)
@@ -0,0 +1,119 @@
+! Rosenbrock integrator with manual time step control
+! Solve: d/dt c = f(t,c)
+
+! written by Edwin Spee, CWI, Amsterdam. Last update: July 28, 1997
+! email: Edwin.Spee@cwi.nl (http://edwin-spee.mypage.org/)
+! adapted to KPP-2.1 by Rolf Sander, Max-Planck Institute, Mainz, Germany, 2005
+!
+! Integration method for Ros2:
+! C_{n+1} = C_n + 3/2 dt k_1 + 1/2 dt k_2
+! k_1 = S f(t_n, C_n)
+! k_2 = S [f(t_{n+1},C_n + dt k_1) - 2 k_1]
+!
+! where g = 1.0 + sqrt(0.5_dp),
+! S = (I - g dt J ) ^ {-1}
+! with J the Jacobian
+
+MODULE KPP_ROOT_Integrator
+
+  USE KPP_ROOT_Precision, ONLY: dp
+
+  IMPLICIT NONE
+  PUBLIC
+  SAVE
+
+  ! description of the error numbers IERR
+  CHARACTER(LEN=50), PARAMETER, DIMENSION(1) :: IERR_NAMES = (/ &
+    'dummy value                                       ' /)
+
+CONTAINS
+
+  ! **************************************************************************
+
+  SUBROUTINE INTEGRATE( TIN, TOUT, &
+    ICNTRL_U, RCNTRL_U, ISTATUS_U, RSTATUS_U, IERR_U )
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: TIN  ! TIN - Start Time
+    KPP_REAL, INTENT(IN) :: TOUT ! TOUT - End Time
+    ! Optional input parameters and statistics
+    INTEGER,  INTENT(IN),  OPTIONAL :: ICNTRL_U(20)
+    KPP_REAL, INTENT(IN),  OPTIONAL :: RCNTRL_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: ISTATUS_U(20)
+    KPP_REAL, INTENT(OUT), OPTIONAL :: RSTATUS_U(20)
+    INTEGER,  INTENT(OUT), OPTIONAL :: IERR_U
+
+    CALL ROS2(TIN, TOUT)
+
+    ! if optional parameters are given for output
+    ! use them to store information in them
+    IF (PRESENT(ISTATUS_U)) ISTATUS_U(:) = 0
+    IF (PRESENT(RSTATUS_U)) THEN
+      RSTATUS_U(:) = 0._dp
+      RSTATUS_U(1)=TOUT ! put final time into RSTATUS_U
+    ENDIF
+    IF (PRESENT(IERR_U)) IERR_U = 1 ! dummy value
+
+  END SUBROUTINE INTEGRATE
+
+  ! **************************************************************************
+
+  SUBROUTINE ROS2(Tstart,Tend)
+
+    USE KPP_ROOT_Jacobian,         ONLY: Jac_SP
+    USE KPP_ROOT_Global,           ONLY: VAR,   & ! VARiable species
+                                         FIX,   & ! FIXed species
+                                         RCONST   ! rate coefficients
+    USE KPP_ROOT_JacobianSP,       ONLY: LU_DIAG
+    USE KPP_ROOT_Function,         ONLY: Fun
+    USE KPP_ROOT_LinearAlgebra,    ONLY: KppDecomp, KppSolve
+    USE KPP_ROOT_Parameters,       ONLY: NVAR, LU_NONZERO
+
+    IMPLICIT NONE
+
+    KPP_REAL, INTENT(IN) :: Tstart, Tend
+
+    KPP_REAL :: dt ! time step                                          
+    KPP_REAL :: k1(NVAR), k2(NVAR), w1(NVAR), g, jvs(LU_NONZERO)
+    INTEGER ising, i
+
+    dt = Tend - Tstart
+    g = 1.0 + SQRT(0.5_dp)
+    CALL JAC_sp(VAR, FIX, RCONST, jvs)
+    jvs(1:LU_NONZERO) = -g*dt*jvs(1:LU_NONZERO)
+
+    ! Rolf von Kuhlmann:
+    ! optionally cut this out and replace it by directly addressed statements
+    DO i=1,NVAR
+      jvs(LU_DIAG(i)) = jvs(LU_DIAG(i)) + 1.0_dp
+    END DO
+
+    CALL KppDecomp (jvs, ising)
+
+    IF (ising /= 0) THEN
+      PRINT *,'ising <> 0, dt=',dt
+      STOP
+    END IF
+
+    CALL Fun(VAR, FIX, RCONST, k1 )
+
+    CALL KppSolve (jvs,k1)
+
+    DO i = 1,NVAR
+      w1(i) = MAX(0.0_dp, VAR(i) + dt * k1(i) )
+    END DO
+
+    CALL Fun(w1, FIX, RCONST, k2 )
+
+    k2(1:NVAR) = k2(1:NVAR) - 2.0_dp*k1(1:NVAR)
+    CALL KppSolve (jvs,k2)
+    DO i = 1,NVAR
+      VAR(i) = MAX( 0.0_dp, VAR(i)+1.5_dp*dt*k1(i)+0.5_dp*dt*k2(i) )
+    END DO
+
+  END SUBROUTINE ROS2
+
+  ! **************************************************************************
+
+END MODULE KPP_ROOT_Integrator
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/atoms
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/atoms	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/atoms	(revision 3477)
@@ -0,0 +1,107 @@
+#ATOMS
+        H	{  1 	Hydrogen	}; 
+	He	{  2	Helium  	};
+	Li	{  3    Litium		};
+	Be	{  4   		};
+	B	{  5   		};
+	C	{  6   		};
+	N	{  7   		};
+	O	{  8   		};
+	F	{  9   		};
+	Ne	{ 10   		};
+	Na	{ 11   		};
+	Mg	{ 12   		};
+	Al	{ 13   		};
+	Si	{ 14   		};
+	P	{ 15   		};
+	S	{ 16   		};
+	Cl	{ 17   		};
+	Ar	{ 18   		};
+	K	{ 19   		};
+	Ca	{ 20   		};
+	Sc	{ 21   		};
+	Ti	{ 22   		};
+	V	{ 23   		};
+	Cr	{ 24   		};
+	Mn	{ 25   		};
+	Fe	{ 26   		};
+	Co	{ 27   		};
+	Ni	{ 28   		};
+	Cu	{ 29   		};
+	Zn	{ 30   		};
+	Ga	{ 31   		};
+	Ge	{ 32   		};
+	As	{ 33   		};
+	Se	{ 34   		};
+	Br	{ 35   		};
+	Kr	{ 36   		};
+	Rb	{ 37   		};
+	Sr	{ 38   		};
+	Y	{ 39   		};
+	Zr	{ 40   		};
+	Nb	{ 41   		};
+	Mu	{ 42   		};
+	Tc	{ 43   		};
+	Ru	{ 44   		};
+	Rh	{ 45   		};
+	Pd	{ 46   		};
+	Ag	{ 47   		};
+	Cd	{ 48   		};
+	In	{ 49   		};
+	Sn	{ 50   		};
+	Sb	{ 51   		};
+	Te	{ 52   		};
+	I	{ 53   		};
+	Xe	{ 54   		};
+	Cs	{ 55   		};
+	Ba	{ 56   		};
+	La	{ 57   		};
+	Ce	{ 58   		};
+	Pr	{ 59   		};
+	Nd	{ 60   		};
+	Pm	{ 61   		};
+	Sm	{ 62   		};
+	Eu	{ 63   		};
+	Gd	{ 64   		};
+	Tb	{ 65   		};
+	Dy	{ 66   		};
+	Ho	{ 67   		};
+	Er	{ 68   		};
+	Tm	{ 69   		};
+	Yb	{ 70   		};
+	Lu	{ 71   		};
+	Hf	{ 72   		};
+	Ta	{ 73   		};
+	W	{ 74   		};
+	Re	{ 75   		};
+	Os	{ 76   		};
+	Ir	{ 77   		};
+	Pt	{ 78   		};
+	Au	{ 79   		};
+	Hg	{ 80   		};
+	Tl	{ 81   		};
+	Pb	{ 82   		};
+	Bi	{ 83   		};
+	Po	{ 84   		};
+	At	{ 85   		};
+	Rn	{ 86   		};
+	Fr	{ 87   		};
+	Ra	{ 88   		};
+	Ac	{ 89   		};
+	Th	{ 90   		};
+	Pa	{ 91   		};
+	U	{ 92   		};
+	Np	{ 93   		};
+	Pu	{ 94   		};
+	Am	{ 95   		};
+	Cm	{ 96   		};
+	Bk	{ 97   		};
+	Cf	{ 98   		};
+	Es	{ 99   		};
+	Fm	{100   		};
+	Md	{101   		};
+	No	{102   		};
+	Lr	{103   		};
+	Unq	{104   		};
+	Unp	{105   		};
+	Unh	{106   		};
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.def	(revision 3477)
@@ -0,0 +1,63 @@
+#include atoms
+#include ./cbm4.spc
+#include ./cbm4.eqn
+
+{#LANGUAGE Fortran77
+#INTEGRATOR rodas3
+#DRIVER general}
+
+#LOOKATALL
+
+#MONITOR O3;
+
+#INITVALUES
+  CFACTOR = 2.55E+10; {ppb-to-mcm}
+  ALL_SPEC = 1.0E-8;
+{Variable species}
+  NO   = 50.0;
+  NO2  = 20.0;
+  HONO = 1.0;
+  O3   = 100.0;
+  HCHO = 10.0;
+  ALD2 = 10;
+  PAN  = 1.0;
+  PAR  = 50.0;
+  OLE  = 10.0;
+  ETH  = 10.0;
+  TOL  = 10.0;
+  XYL  = 10.0;
+  ISOP = 10.0;
+  CO   = 300.0;
+{Fixed species}
+  H2O  = 1.25E+8; {30 %}
+
+
+#INLINE F77_INIT
+        TSTART = 12.D0*3600.D0
+        TEND = TSTART + 24.D0*3600.D0 * 5
+        DT = 3600.D0
+        TEMP = 288.15
+#ENDINLINE
+
+#INLINE F90_INIT
+        TSTART = 12.D0*3600.D0
+        TEND = TSTART + 24.D0*3600.D0 * 5
+        DT = 3600.D0
+        TEMP = 288.15
+#ENDINLINE
+
+#INLINE MATLAB_INIT
+   TSTART = 12.0*3600.0;
+   TEND = TSTART + 24.0*3600.0*5;
+   DT = 3600.0;
+   TEMP = 288.15;
+#ENDINLINE
+
+#INLINE C_INIT
+   TSTART = 12.0*3600.0;
+   TEND = TSTART + 24.0*3600.0*5;
+   DT = 3600.0;
+   TEMP = 288.15;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.eqn	(revision 3477)
@@ -0,0 +1,119 @@
+#EQUATIONS {of the CBM-IV mechanism}
+
+{ 1.} NO2 + hv =  NO + O              :  8.89E-3*SUN ;
+{ 2.} O {+ O2 + M} = O3               :  ARR2(1.4E+3, 1175.0) ;
+{ 3.} O3 + NO = NO2                   :  ARR2(1.8E-12, -1370.0) ;
+{ 4.} O + NO2 = NO                    :  9.3E-12 ;
+{ 5.} O + NO2   = NO3                 :  ARR2(1.6E-13, 687.0) ;
+{ 6.} O + NO   =  NO2                 :  ARR2(2.2E-13, 602.0) ;
+{ 7.} O3 + NO2 =  NO3                 :  ARR2(1.2E-13, -2450.0) ;
+{ 8.} O3 + hv = O                     :  3.556E-04*SUN ; {4.0E-2*RCONST(1) ;}
+{ 9.} O3 + hv = O1D                   :  2.489E-05*SUN ; {2.8E-3*RCONST(1) ;}
+{10.} O1D   = O                       :  ARR2(1.9E+8, 390.0)  ;
+
+{11.} O1D + H2O = 2OH                 :  2.2E-10 ;
+{12.} O3 + OH = HO2                   :  ARR2(1.6E-12, -940.0) ;
+{13.} O3 + HO2 = OH                   :  ARR2(1.4E-14, -580.0) ;
+{14.} NO3 + hv = 0.89 NO2 + 0.89 O 
+                 + 0.11 NO            :  1.378E-01*SUN ; {15.5*RCONST(1);}
+{15.} NO3 + NO = 2 NO2                :  ARR2(1.3E-11, 250.0) ;
+{16.} NO3 + NO2 = NO + NO2            :  ARR2(2.5E-14, -1230.0) ;
+{17.} NO3 + NO2   =  N2O5             :  ARR2(5.3E-13, 256.0) ;
+{18.} N2O5 + H2O = 2 HNO3             :  1.3E-21 ;
+{19.} N2O5   =  NO3 + NO2             :  ARR2(3.5E+14, -10897.0) ;
+{20.} 2 NO  =  2 NO2                  :  ARR2(1.8E-20, 530.0) ;
+
+
+{21.} NO + NO2 + H2O = 2 HONO         :  4.4E-40 ;
+{22.} OH + NO   =  HONO               :  ARR2(4.5E-13, 806.0) ;
+{23.} HONO + hv =  OH + NO            :  1.511e-03*SUN ; {0.17*RCONST(1);}
+{24.} OH + HONO =  NO2                :  6.6E-12 ;
+{25.} 2 HONO = NO + NO2               :  1.0E-20 ;
+{26.} OH + NO2   =  HNO3              :  ARR2(1.0E-12, 713.0) ;
+{27.} OH + HNO3   =  NO3              :  ARR2(5.1E-15, 1000.0) ;
+{28.} HO2 + NO = OH + NO2             :  ARR2(3.7E-12, 240.0) ;
+{29.} HO2 + NO2   =  PNA              :  ARR2(1.2E-13, 749.0) ;
+{30.} PNA   = HO2 + NO2               :  ARR2(4.8E+13, -10121.0) ;
+
+{31.} OH + PNA = NO2                  :  ARR2(1.3E-12, 380.0) ;
+{32.} 2 HO2 = H2O2                    :  ARR2(5.9E-14, 1150.0)  ;
+{33.} 2 HO2 + H2O = H2O2              :  ARR2(2.2E-38, 5800.0) ;
+{34.} H2O2 + hv = 2 OH                :  6.312E-06*SUN ; {7.1E-4*RCONST(1);}
+{35.} OH + H2O2 = HO2                 :  ARR2(3.1E-12, -187.0) ;
+{36.} OH + CO  = HO2                  :  2.2E-13 ;
+{37.} HCHO + OH  =  HO2 + CO          :  1.0E-11 ;
+{38.} HCHO + hv {+ 2 O2} = 2 HO2 + CO :  2.845E-05*SUN ; {3.2E-3*RCONST(1);}
+{39.} HCHO +  hv = CO                 :  3.734E-05*SUN ; {4.2E-3*RCONST(1);}
+{40.} HCHO + O = OH + HO2 + CO        :  ARR2(3.0E-11, -1550.0) ;
+
+{41.} HCHO + NO3  = HNO3 
+                        + HO2 + CO    :  6.3E-16 ;
+{42.} ALD2 + O  =  C2O3 + OH          :  ARR2(1.2E-11, -986.0) ;
+{43.} ALD2 + OH = C2O3                :  ARR2(7.0E-12, 250.0) ;
+{44.} ALD2 + NO3  = C2O3 + HNO3       :  2.5E-15  ;
+{45.} ALD2 + hv {+ 2 O2} = HCHO + XO2 
+                         + CO + 2 HO2 :  4.00E-06*SUN ; {4.5E-4*RCONST(1);}
+{46.} C2O3 + NO  = HCHO + XO2 
+                       + HO2 + NO2    :  ARR2(5.4E-12, 250.0) ;
+{47.} C2O3 + NO2 = PAN                :  ARR2(8.0E-20, 5500.0) ;
+{48.} PAN = C2O3 + NO2                :  ARR2(9.4E+16, -14000.0) ;
+{49.} 2 C2O3 = 2 HCHO + 2 XO2 + 2 HO2 :  2.0E-12  ;
+{50.} C2O3 + HO2 = 0.79 HCHO 
+   + 0.79 XO2 + 0.79 HO2 + 0.79 OH    :  6.5E-12 ;
+
+{51.} OH = HCHO + XO2 + HO2           :  ARR2(1.1E+2, -1710.0) ;
+{52.} PAR + OH = 0.87 XO2 + 0.13 XO2N 
+               + 0.11 HO2 + 0.11 ALD2
+               + 0.76 ROR - 0.11 PAR  :  8.1E-13 ;
+{53.} ROR = 1.1 ALD2 + 0.96 XO2 
+               + 0.94 HO2 + 0.04 XO2N
+               + 0.02 ROR - 2.10 PAR  :  ARR2(1.0E+15, -8000.0) ;
+{54.} ROR = HO2                       :  1.6E+03 ;
+{55.} ROR + NO2 =  PROD               :  1.5E-11  ;
+{56.} O + OLE = 0.63 ALD2 + 0.38 HO2 
+                + 0.28 XO2 + 0.3 CO
+                + 0.2 HCHO + 0.02 XO2N 
+                + 0.22 PAR + 0.2 OH   :  ARR2(1.2E-11, -324.0) ;
+{57.} OH + OLE = HCHO + ALD2 + XO2 
+                 + HO2 - PAR          :  ARR2(5.2E-12, 504.0) ;
+{58.} O3 + OLE = 0.5 ALD2 + 0.74 HCHO 
+                 + 0.33 CO + 0.44 HO2 
+                 + 0.22 XO2
+                 + 0.1 OH - PAR       :  ARR2(1.4E-14, -2105.0)  ;
+{59.} NO3 + OLE = 0.91 XO2 + HCHO 
+                  + ALD2 + 0.09 XO2N                          
+                  + NO2 - PAR         :  7.7E-15 ;
+{60.} O + ETH = HCHO + 0.7 XO2 + CO
+                + 1.7 HO2 + 0.3 OH    :  ARR2(1.0E-11, -792.0) ;
+
+{61.} OH + ETH = XO2 + 1.56 HCHO + HO2 + 0.22 ALD2        :  ARR2(2.0E-12, 411.0)  ;
+{62.} O3 + ETH = HCHO + 0.42 CO + 0.12 HO2                :  ARR2(1.3E-14, -2633.0) ;
+{63.} OH + TOL = 0.08 XO2 + 0.36 CRES 
+                 + 0.44 HO2 + 0.56 TO2                    :  ARR2(2.1E-12, 322.0) ;
+{64.} TO2 + NO =  0.9 NO2 + 0.9 OPEN + 0.9 HO2            :  8.1E-12 ;
+{65.} TO2 = HO2 + CRES                                    :  4.20 ;
+{66.} OH + CRES = 0.4 CRO + 0.6 XO2 + 0.6 HO2 + 0.3 OPEN  :  4.1E-11  ;
+{67.} NO3 + CRES = CRO + HNO3                             :  2.2E-11 ;
+{68.} CRO + NO2 = PROD                                    :  1.4E-11 ;
+{69.} OH + XYL = 0.7 HO2 + 0.5 XO2 + 0.2 CRES + 0.8 MGLY
+                 + 1.10 PAR + 0.3 TO2                     :  ARR2(1.7E-11, 116.0) ;
+{70.} OH + OPEN = XO2 + C2O3 + 2 HO2 + 2 CO + HCHO        :  3.0E-11 ;
+
+{71.} OPEN + hv = C2O3 + CO + HO2                         :  5.334E-05*SUN ; {6.0E-3*RCONST(1);}
+{72.} O3 + OPEN = 0.03 ALD2 + 0.62 C2O3 
+                  + 0.7 HCHO + 0.03 XO2 + 0.69 CO 
+                  + 0.08 OH + 0.76 HO2 + 0.2 MGLY         :  ARR2(5.4E-17, -500.0)  ;
+{73.} OH + MGLY =  XO2 + C2O3                             :  1.70E-11 ;
+{74.} MGLY + hv = C2O3 + CO + HO2                         :  1.654E-04*SUN ; {1.86E-2*RCONST(1);}
+{75.} O + ISOP =  0.6 HO2 + 0.8 ALD2 + 0.55 OLE + 0.5 XO2
+                  + 0.5 CO + 0.45 ETH + 0.9 PAR           :  1.80E-11  ;
+{76.} OH + ISOP = HCHO + XO2 + 0.67 HO2 
+                  + 0.4 MGLY + 0.2 C2O3
+                  + ETH + 0.2 ALD2 + 0.13 XO2N            :  9.6E-11  ;
+{77.} O3 + ISOP = HCHO + 0.4 ALD2 + 0.55 ETH + 0.2 MGLY 
+                  + 0.06 CO + 0.1 PAR + 0.44 HO2 + 0.1 OH :  1.2E-17 ;
+{78.} NO3 + ISOP =  XO2N                                  :  3.2E-13 ;
+{79.} XO2 + NO = NO2                                      :  8.1E-12 ;
+{80.} 2 XO2 =  PROD                                       :  ARR2(1.7E-14, 1300.0) ;
+{81.} XO2N + NO =  PROD                                   :  6.8E-13 ;
+ 
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cbm4.spc	(revision 3477)
@@ -0,0 +1,41 @@
+#DEFVAR
+    NO          = N + O ;       {nitric oxide}
+    NO2         = N + 2O ;      {nitrogen dioxide}
+    NO3         = N + 3O ;      {nitrogen trioxide}
+    N2O5        = 2N + 5O ;     {dinitrogen pentoxide}
+    HONO        = H + 2O + N ;  {nitrous acid}
+    HNO3        = H + N + 3O ;  { nitric acid }
+    PNA         = H + 4 O + N ; {HO2NO2 peroxynitric acid}
+    O1D         = O ;           {oxygen atomic first singlet state}
+    O           = O ;           {oxygen atomic ground state (3P)}
+    OH          = O + H ;       {hydroxyl radical}
+    O3          = 3O ;          {ozone}
+    HO2         = H + 2O ;      {perhydroxyl radical}
+    H2O2        = 2H + 2O ;     {hydrogen peroxide}
+    HCHO        = C + 2H + O ;  {formalydehyde}
+    ALD2        = IGNORE ;      {high molecular weight aldehides}
+    C2O3        = 2C + 3H + 3O ; {CH3CO(O)OO peroxyacyl radical}
+    PAN         = 2C + 3H + 5O + N ; {CH3C(O)OONO2, peroxyacyl nitrate}
+    PAR         = IGNORE ;      {parafin carbon bond}
+    ROR         = IGNORE ;      {secondary organic oxy radical}
+    OLE         = IGNORE ;      {olefinic carbon bond}
+    ETH         = 2C + 4H ;     {CH2=CH2 ethene}
+    TOL         = 7C + 8H ;     {C6H5-CH3 toluene}
+    CRES        = IGNORE ;      {cresol and h.m.w. phenols}
+    TO2         = IGNORE ;      {toluene-hydroxyl radical adduct}
+    CRO         = IGNORE ;      {methylphenoxy radical}
+    OPEN        = IGNORE ;      {h.m.w. aromatic oxidation ring fragment}
+    XYL         = 8C + 10H ;    {C6H4-(CH3)2 xylene}
+    MGLY        = 3C + 4H + 2O ; {CH3C(O)C(O)H methylglyoxal}
+    ISOP        = IGNORE ;      {isoprene}
+    XO2         = IGNORE ;      {NO-to-NO2 operation}
+    XO2N        = IGNORE ;      {NO-to-nitrate operation}          
+    CO          = C + O ;       {carbon monoxide}
+
+#DEFFIX
+    H2O         = H + 2O ;      {water}
+    H2          = 2H ;          {molecular hydrogen}
+    O2          = 2O ;          {molecular oxygen}
+    N2          = 2N ;          {molecular nitrogen}
+    CH4         = C + 4H ;      {methane}
+    M           = IGNORE ;      {third body}
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cell_cycle.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cell_cycle.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cell_cycle.def	(revision 3477)
@@ -0,0 +1,139 @@
+{Model of hysteresis and irreversible transition in eukaryotic cell}
+
+#DEFVAR
+A  = ignore; {protein that activates Cdh1 at finish}
+AYp= ignore; {complex}
+Yp = ignore; {inactive (phosphorylated) Cdh1-P/APC}
+XY = ignore; {complex}
+Y  = ignore; {active Cdh1/APC complex}
+X  = ignore; {cyclin/Cdk dimer}
+YX = ignore; {complex}
+XYX= ignore; {complex}
+G  = ignore; {complex}
+TF = ignore; {complex}
+TFp= ignore; {complex}
+C1 = ignore; {complex}
+C2 = ignore; {complex}
+mas= ignore; {mass of the cell} 
+
+
+#EQUATIONS
+mas    = 2mas    : (0.01);
+2mas    = mas    : (0.001);
+PROD    = X      : (0.02);   {k1}
+X      =  PROD   : (0.05);   {k2 prime}
+Y + X  =  YX     : (1000);   {k2f double prime}
+YX     =  Y + X  : (3);      {k2r double prime}
+YX     =  Y      : (1);      {k2  double prime}
+X + Y  =  XY     : (1200);   {k4f}
+XY     =  X + Y  : (35);     {k4r}
+XY     =  X + Yp : (80);     {k4}
+A + Yp =  AYp    : (4000);   {k3f}
+AYp    =  A + Yp : (75);     {k3r}
+AYp    =  A + Y  : (60);     {k3}
+X + YX =  XYX    : (360);    {k5f}
+XYX    =  X + YX : (18);     {k5r}
+XYX    =  2X + Yp: (16);     {k6}
+A      = PROD    : (0.4);    {k6 prime}
+AYp      = Yp    : (0.4);    {k6 prime}
+G       = G + A  : (0.00075);{k5 prime}
+TF + X  = X + TFp: (2.6);    {k7f}
+TFp     = TF     : (4.0);    {k7r}
+TFp + G = C1     : (1.2);    {k8f}
+C1      = TFp + G   : (320); {k8r}
+C1      =  C1 + A   : (0.15);{k9}
+TFp + C1= C2        : (65);  {k10f}
+C2      =  C1 + TFp : (0.2); {k10r}
+C2      = C2 + A    : (3);   {k11}
+
+#LOOKAT X;
+#MONITOR X;
+
+#INITVALUES
+CFACTOR = 1;
+mas=0.1046E+01; 
+TF=0.8979E+01; 
+XY=0.5458E-02; 
+XYX=0.8918E-02; 
+YX=0.2989E-02; 
+X=0.1275E+00; 
+Y=0.1714E-02; 
+Yp=0.9605E+00; 
+AYp=0.2046E-01; 
+A=0.8577E-03; 
+C2=0.1692E-02; 
+C1=0.1769E-04; 
+TFp=0.1731E-01; 
+G=0.9983E+00;
+
+#INLINE F77_INIT
+      TSTART = 0.d0
+      TEND   = 1000.d0
+      DT     = 5.d0
+      Volume = 1000.d0
+#ENDINLINE
+
+#INLINE F77_UTIL
+      DOUBLE PRECISION FUNCTION CellMass(t)
+       ! Cell mass evolution in time
+       DOUBLE PRECISION t
+       DOUBLE PRECISION m0, mstar, mu, one
+       PARAMETER (m0    = 1.0d0)
+       PARAMETER (mstar = 10.0d0)
+       PARAMETER (mu    = 0.01d0)
+       PARAMETER (one   = 1.0d0)
+       CellMass = mstar/(one-(one-mstar/m0)*EXP(-mu*t))
+      END
+#ENDINLINE
+
+#INLINE F90_INIT
+   TSTART = 0.d0
+   TEND   = 1000.d0
+   DT     = 5.d0
+   !Volume = 1000.d0
+#ENDINLINE
+
+#INLINE F90_UTIL
+   DOUBLE PRECISION FUNCTION CellMass(t)
+     ! Cell mass evolution in time
+     DOUBLE PRECISION, INTENT(IN) :: t
+     DOUBLE PRECISION, PARAMETER:: m0    = 1.0d0
+     DOUBLE PRECISION, PARAMETER:: mstar = 10.0d0
+     DOUBLE PRECISION, PARAMETER:: mu    = 0.01d0
+     DOUBLE PRECISION, PARAMETER:: one   = 1.0d0
+     CellMass = mstar/(one-(one-mstar/m0)*EXP(-mu*t))
+   END FUNCTION CellMass
+#ENDINLINE
+
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 0;
+   TEND   = 1000;
+   DT     = 5.0;
+   Volume = 1000.0;
+#ENDINLINE
+
+#INLINE MATLAB_UTIL
+   function m = CellMass(t)
+     % Cell mass evolution in time
+     m = 10/(1+9*exp(-0.01*t));
+   return
+#ENDINLINE
+
+#INLINE C_INIT
+   TSTART = 0.0;
+   TEND   = 1000.0;
+   DT     = 5.0;
+   Volume = 1000.0;
+#ENDINLINE
+
+#INLINE C_UTIL
+   double CellMass(double t)
+   {/* Cell mass evolution in time */
+     const double m0    = 1.0;
+     const double mstar = 10.0;
+     const double mu    = 0.01;
+     const double one   = 1.0;
+     return mstar/(one-(one-mstar/m0)*exp(-mu*t));
+   }
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cell_cycle_mRNA.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cell_cycle_mRNA.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cell_cycle_mRNA.def	(revision 3477)
@@ -0,0 +1,144 @@
+{Model of hysteresis and irreversible transition in eukaryotic cell
+   WITH mRNA! }
+
+#DEFVAR
+A  = ignore; {protein that activates Cdh1 at finish}
+AYp= ignore; {complex}
+Yp = ignore; {inactive (phosphorylated) Cdh1-P/APC}
+XY = ignore; {complex}
+Y  = ignore; {active Cdh1/APC complex}
+X  = ignore; {cyclin/Cdk dimer}
+YX = ignore; {complex}
+XYX= ignore; {complex}
+G  = ignore; {complex}
+TF = ignore; {complex}
+TFp= ignore; {complex}
+C1 = ignore; {complex}
+C2 = ignore; {complex}
+R  = ignore; {mRNA}
+mas= ignore; {mass of the cell} 
+
+
+#EQUATIONS
+mas     =  2mas     : (0.01);
+2mas    =  mas      : (0.001);
+PROD    =  X        : (0.02);   {k1}
+X       =  PROD     : (0.05);   {k2 prime}
+Y + X   =  YX       : (1000);   {k2f double prime}
+YX      =  Y + X    : (3);      {k2r double prime}
+YX      =  Y        : (1);      {k2  double prime}
+X + Y   =  XY       : (1200);   {k4f}
+XY      =  X + Y    : (35);     {k4r}
+XY      =  X + Yp   : (80);     {k4}
+A + Yp  =  AYp      : (4000);   {k3f}
+AYp     =  A + Yp   : (75);     {k3r}
+AYp     =  A + Y    : (60);     {k3}
+X + YX  =  XYX      : (360);    {k5f}
+XYX     =  X + YX   : (18);     {k5r}
+G       =  G + R    : (0.00075);{k5 prime}
+XYX     =  2X + Yp  : (16);     {k6}
+A       =  PROD     : (0.4);    {k6 prime}
+AYp     =  Yp       : (0.4);    {k6 prime}
+TF + X  =  X + TFp  : (2.5);    {k7f}
+TFp     =  TF       : (4.0);    {k7r}
+TFp + G =  C1       : (1.2);    {k8f}
+C1      =  TFp + G  : (320);    {k8r}
+C1      =  C1 + R   : (0.15);   {k9}
+TFp + C1=  C2       : (65);     {k10f}
+C2      =  C1 + TFp : (0.2);    {k10r}
+C2      =  C2 + R   : (3);      {k11}
+R       =  PROD     : (1);      {krd}
+R       =  R + A    : (1);      {krs}
+
+#LOOKAT X;
+#MONITOR X;
+
+#INITVALUES
+CFACTOR = 1;
+mas = 0.1046E+01; 
+TF  = 0.8979E+01; 
+XY  = 0.5458E-02; 
+XYX = 0.8918E-02; 
+YX  = 0.2989E-02; 
+X   = 0.1275E+00; 
+Y   = 0.1714E-02; 
+Yp  = 0.9605E+00; 
+AYp = 0.2046E-01; 
+A   = 0.8577E-03; 
+C2  = 0.1692E-02; 
+C1  = 0.1769E-04; 
+TFp = 0.1731E-01; 
+G   = 0.9983E+00;
+R   = 0;
+
+#INLINE F77_INIT
+      TSTART = 0.d0
+      TEND   = 1000.d0
+      DT     = 5.d0
+      Volume = 1000.d0
+#ENDINLINE
+
+#INLINE F77_UTIL
+      DOUBLE PRECISION FUNCTION CellMass(t)
+       ! Cell mass evolution in time
+       DOUBLE PRECISION t
+       DOUBLE PRECISION m0, mstar, mu, one
+       PARAMETER (m0    = 1.0d0)
+       PARAMETER (mstar = 10.0d0)
+       PARAMETER (mu    = 0.01d0)
+       PARAMETER (one   = 1.0d0)
+       CellMass = mstar/(one-(one-mstar/m0)*EXP(-mu*t))
+      END
+#ENDINLINE
+
+#INLINE F90_INIT
+   TSTART = 0.d0
+   TEND   = 1000.d0
+   DT     = 5.d0
+   !Volume = 1000.d0
+#ENDINLINE
+
+#INLINE F90_UTIL
+   DOUBLE PRECISION FUNCTION CellMass(t)
+     ! Cell mass evolution in time
+     DOUBLE PRECISION, INTENT(IN) :: t
+     DOUBLE PRECISION, PARAMETER:: m0    = 1.0d0
+     DOUBLE PRECISION, PARAMETER:: mstar = 10.0d0
+     DOUBLE PRECISION, PARAMETER:: mu    = 0.01d0
+     DOUBLE PRECISION, PARAMETER:: one   = 1.0d0
+     CellMass = mstar/(one-(one-mstar/m0)*EXP(-mu*t))
+   END FUNCTION CellMass
+#ENDINLINE
+
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 0;
+   TEND   = 1000;
+   DT     = 5.0;
+   Volume = 1000.0;
+#ENDINLINE
+
+#INLINE MATLAB_UTIL
+   function m = CellMass(t)
+     % Cell mass evolution in time
+     m = 10/(1+9*exp(-0.01*t));
+   return
+#ENDINLINE
+
+#INLINE C_INIT
+   TSTART = 0.0;
+   TEND   = 1000.0;
+   DT     = 5.0;
+   Volume = 1000.0;
+#ENDINLINE
+
+#INLINE C_UTIL
+   double CellMass(double t)
+   {/* Cell mass evolution in time */
+     const double m0    = 1.0;
+     const double mstar = 10.0;
+     const double mu    = 0.01;
+     const double one   = 1.0;
+     return mstar/(one-(one-mstar/m0)*exp(-mu*t));
+   }
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.def	(revision 3477)
@@ -0,0 +1,59 @@
+#include small_strato.spc
+#include small_strato.eqn
+ 
+
+//#LANGUAGE Fortran77          {Output Language}
+//#DOUBLE ON                   {Double Precision}
+//#JACOBIAN SPARSE_LU_ROW      {Use Sparse DATA STRUCTURES}
+ 
+//#INTEGRATOR rodas3
+//#DRIVER general
+
+
+#LOOKATALL                     {File Output}
+#MONITOR O3;N;O2;O;NO;O1D;NO2; {Screen Output}
+
+#CHECK O; N;                   {Check Mass Balance}
+ 
+#INITVALUES                    {Initial Values}
+ 
+CFACTOR = 1.    ;              {Conversion Factor} 
+O1D = 9.906E+01 ; 
+O   = 6.624E+08 ; 
+O3  = 5.326E+11 ; 
+O2  = 1.697E+16 ;
+NO  = 8.725E+08 ; 
+NO2 = 2.240E+08 ; 
+M   = 8.120E+16 ;
+ 
+#INLINE F77_INIT
+       	TSTART = (12*3600)
+        TEND = TSTART + (3*24*3600)
+        DT = 0.25*3600  
+        TEMP = 270
+#ENDINLINE         
+ 
+#INLINE F90_INIT
+        TSTART = (12*3600)
+        TEND = TSTART + (3*24*3600)
+        DT = 0.25*3600  
+        TEMP = 270
+#ENDINLINE         
+ 
+#INLINE MATLAB_INIT
+  global TSTART TEND DT TEMP
+  TSTART = (12*3600);
+  TEND = TSTART + (3*24*3600);
+  DT = 0.25*3600;  
+  TEMP = 270;
+#ENDINLINE         
+
+
+#INLINE C_INIT
+        TSTART = (12*3600);
+        TEND = TSTART + (3*24*3600);
+        DT = 0.25*3600;
+        TEMP = 270;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.eqn	(revision 3477)
@@ -0,0 +1,13 @@
+#EQUATIONS { Chapman with catalytical loss }
+
+// Classical Chapman
+<R1>  O2   + hv = 2O		: (2.643E-10) * SUN*SUN*SUN;
+<R2>  O2   + O  = O3		: (8.018E-17);
+<R3>  O3   + hv = O   + O2 	: (6.120E-04) * SUN;
+<R4>  O3   + O  = 2O2		: (1.576E-15);
+// Catalytical loss reaction
+<R5>  NO   + O3 = NO2 + O2 	: (6.062E-15);
+<R6>  NO2  + O  = NO  + O2	: (1.069E-11);
+//<R7>  NO2  + hv = NO  + O       : (1.289E-02) * SUN;
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/chapman.spc	(revision 3477)
@@ -0,0 +1,15 @@
+#include atoms
+
+#DEFVAR
+O   = O;    	    { Atomic oxygen }	
+O3  = O + O + O;    { Ozone }
+NO  = N + O;	    { Nitric oxide }	     
+NO2 = N + O + O;    { Nitrogen dioxide }
+
+#DEFFIX
+M   = O + O + N + N;{ Atmospheric generic molecule }
+O2  = O + O;        { Molecular oxygen }
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.def	(revision 3477)
@@ -0,0 +1,111 @@
+#include cmaq_s99.spc
+#include cmaq_s99.eqn
+
+#LOOKATALL
+
+#MONITOR O3; NO; NO2; ETHENE;
+
+#INITVALUES
+
+	CFACTOR = 1.    ;              {Conversion Factor}
+        NO2             = 46.0;       
+        NO              = 30.0;       
+        O3P             = 16.0;       
+        O3              = 48.0;       
+        NO3             = 62.0;       
+        N2O5            = 108.0;       
+        HNO3            = 63.0;       
+        O1D2            = 16.0;       
+        HO              = 17.0;       
+        HONO            = 47.0;       
+        HO2             = 33.0;       
+        CO              = 28.0;       
+        HNO4            = 79.0;       
+        HO2H            = 34.0;       
+        SO2             = 64.0;       
+        SULF            = 98.0;       
+        C_O2            = 47.0;       
+        HCHO            = 30.0;       
+        COOH            = 48.0;       
+        MEOH            = 32.0;       
+        RO2_R           = 1.0;       
+        ROOH            = 62.0;       
+        R2O2            = 1.0;       
+        RO2_N           = 1.0;       
+        RNO3            = 133.0;       
+        MEK             = 72.0;       
+        PROD2           = 100.0;       
+        CCO_O2          = 75.0;       
+        PAN             = 121.0;       
+        CCO_OOH         = 76.0;       
+        CCO_OH          = 60.0;       
+        RCO_O2          = 89.0;       
+        PAN2            = 135.0;       
+        CCHO            = 44.0;       
+        RCO_OOH         = 90.0;       
+        RCO_OH          = 74.0;       
+        BZCO_O2         = 137.0;       
+        PBZN            = 183.0;       
+        BZ_O            = 93.0;       
+        MA_RCO3         = 101.0;       
+        MA_PAN          = 147.0;       
+        TBU_O           = 73.0;       
+        ACET            = 58.0;       
+        NPHE            = 139.0;       
+        PHEN            = 94.0;       
+        BZNO2_O         = 139.0;       
+        HOCOO           = 63.0;       
+        HCOOH           = 46.0;       
+        RCHO            = 58.0;       
+        GLY             = 58.0;       
+        MGLY            = 72.0;       
+        BACL            = 86.0;       
+        CRES            = 108.0;       
+        BALD            = 106.0;       
+        METHACRO        = 70.0;       
+        MVK             = 70.0;       
+        ISOPROD         = 70.0;       
+        DCB1            = 58.0;       
+        DCB2            = 72.0;       
+        DCB3            = 72.0;       
+        ETHENE          = 28.0;       
+        ISOPRENE        = 68.0;       
+        TRP1            = 136.0;       
+        ALK1            = 30.1;       
+        ALK2            = 36.7;       
+        ALK3            = 58.6;       
+        ALK4            = 77.6;       
+        ALK5            = 118.9;       
+        ARO1            = 98.6;       
+        ARO2            = 118.7;       
+        OLE1            = 72.3;       
+        OLE2            = 75.8;       
+
+#INLINE F77_INIT
+        TSTART = 12.0D0*3600.0D0
+        TEND   = TSTART + 120.0D0*3600.0D0
+        DT     = 3600.D0
+        TEMP   = 300.0D0
+#ENDINLINE   
+   
+#INLINE F90_INIT
+        TSTART = 12.0d0*3600.0d0
+        TEND   = TSTART + 120.0d0*3600.0d0
+        DT     = 3600.d0
+        TEMP   = 300.0d0
+#ENDINLINE   
+     
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 12*3600;
+   TEND   = TSTART + 120*3600;
+   DT     = 3600;
+   TEMP   = 300;
+#ENDINLINE   
+     
+#INLINE C_INIT
+   TSTART = 12.0*3600.0;
+   TEND   = TSTART + 120.0*3600.0;
+   DT     = 3600.0;
+   TEMP   = 300.0;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.eqn	(revision 3477)
@@ -0,0 +1,285 @@
+{ SAPRC-99 Fixed Parameter Mechanism }
+{ Created from BASEMECH.XLS 21-Jul-2004 10:31 }
+{  Base mechanism only.  Reactions of TERP, ALKn, AROn, OLEn removed. }
+{ SAPRC99 }
+
+#EQUATIONS
+{1} NO2 = NO + O3P : ((1.0));
+{2} O3P + O2 + M = O3 : (5.68e-34);
+{3} O3P + O3 = PROD : (8.00e-12);
+{4} O3P + NO + M = NO2 : (1.00e-31);
+{5} O3P + NO2 = NO : (6.50e-12);
+{6} O3P + NO2 = NO3 : (9.00e-32);
+{8} O3 + NO = NO2 : (1.80e-12);
+{9} O3 + NO2 = NO3 : (1.40e-13);
+{10} NO + NO3 = 2NO2 : (1.80e-11);
+{11} NO + NO + O2 = 2NO2 : (3.30e-39);
+{12} NO2 + NO3 = N2O5 : (2.80e-30);
+{13} N2O5 = NO2 + NO3 : (1.00e-03);
+{14} N2O5 + H2O = 2HNO3 : (2.60e-22);
+{17} NO2 + NO3 = NO + NO2 : (4.50e-14);
+{18} NO3 = NO : (1.0);
+{19} NO3 = NO2 + O3P : (1.0);
+{20} O3 = O3P : (1.0);
+{21} O3 = O1D2 : (1.0);
+{22} O1D2 + H2O = 2HO : (2.20e-10);
+{23} O1D2 + M = O3P : (2.09e-11);
+{24} HO + NO = HONO : (7.00e-31);
+{25} HONO = HO + NO : (1.0);
+{26} HONO = HO2 + NO2 : (1.0);
+{27} HO + HONO = NO2 : (2.70e-12);
+{28} HO + NO2 = HNO3 : (2.43e-30);
+{29} HO + NO3 = HO2 + NO2 : (2.00e-11);
+{30} HO + HNO3 = NO3 : (7.20e-15);
+{31} HNO3 = HO + NO2 : (1.0);
+{32} HO + CO = HO2 : (1.30e-13);
+{33} HO + O3 = HO2 : (1.90e-12);
+{34} HO2 + NO = HO + NO2 : (3.40e-12);
+{35} HO2 + NO2 = HNO4 : (1.80e-31);
+{36} HNO4 = HO2 + NO2 : (4.10e-05);
+{37} HNO4 = 0.61HO2 + 0.61NO2 + 0.39HO + 0.39NO3 : (1.0);
+{38} HNO4 + HO = NO2 : (1.50e-12);
+{39} HO2 + O3 = HO : (1.40e-14);
+{40A} HO2 + HO2 = HO2H : (2.20e-13);
+{40B} HO2 + HO2 + H2O = HO2H : (3.08e-34);
+{41} NO3 + HO2 = 0.8HO + 0.8NO2 + 0.2HNO3 : (4.00e-12);
+{42} NO3 + NO3 = 2NO2 : (8.50e-13);
+{43} HO2H = 2HO : (1.0);
+{44} HO2H + HO = HO2 : (2.90e-12);
+{45} HO + HO2 =  PROD: (4.80e-11);
+{S2OH} HO + SO2 = HO2 + SULF : (4.00e-31);
+{H2OH} HO + H2 = HO2 : (7.70e-12);
+{MER1} C_O2 + NO = NO2 + HCHO + HO2 : (2.80e-12);
+{MER4} C_O2 + HO2 = COOH : (3.80e-13);
+{MEN3} C_O2 + NO3 = HCHO + HO2 + NO2 : (1.30e-12);
+{MER5} C_O2 + C_O2 = MEOH + HCHO : (2.45e-14);
+{MER6} C_O2 + C_O2 = 2HCHO + 2HO2 : (5.90e-13);
+{RRNO} RO2_R + NO = NO2 + HO2 : (2.70e-12);
+{RRH2} RO2_R + HO2 = ROOH : (1.90e-13);
+{RRN3} RO2_R + NO3 = NO2 + HO2 : (2.30e-12);
+{RRME} RO2_R + C_O2 = HO2 + 0.75HCHO + 0.25MEOH : (2.00e-13);
+{RRR2} RO2_R + RO2_R = HO2 : (3.50e-14);
+{R2NO} R2O2 + NO = NO2 : (1.0);
+{R2H2} R2O2 + HO2 = HO2 : (1.0);
+{R2N3} R2O2 + NO3 = NO2 : (1.0);
+{R2ME} R2O2 + C_O2 = C_O2 : (1.0);
+{R2RR} R2O2 + RO2_R = RO2_R : (1.0);
+{R2R3} R2O2 + R2O2 = PROD : (1.0);
+{RNNO} RO2_N + NO = RNO3 : (1.0);
+{RNH2} RO2_N + HO2 = ROOH : (1.0);
+{RNME} RO2_N + C_O2 = HO2 + 0.25MEOH + 0.5MEK + 0.5PROD2 + 0.75HCHO
+        : (1.0);
+{RNN3} RO2_N + NO3 = NO2 + HO2 + MEK : (1.0);
+{RNRR} RO2_N + RO2_R = HO2 + 0.5MEK + 0.5PROD2 : (1.0);
+{RNR2} RO2_N + R2O2 = RO2_N : (1.0);
+{RNRN} RO2_N + RO2_N = MEK + HO2 + PROD2 : (1.0);
+{APN2} CCO_O2 + NO2 = PAN : (2.70e-28);
+{DPAN} PAN = CCO_O2 + NO2 : (4.90e-03);
+{APNO} CCO_O2 + NO = C_O2 + NO2 : (7.80e-12);
+{APH2} CCO_O2 + HO2 = 0.75CCO_OOH + 0.25CCO_OH + 0.25O3 : (4.30e-13);
+{APN3} CCO_O2 + NO3 = C_O2 + NO2 : (4.00e-12);
+{APME} CCO_O2 + C_O2 = CCO_OH + HCHO : (1.80e-12);
+{APRR} CCO_O2 + RO2_R = CCO_OH : (7.50e-12);
+{APR2} CCO_O2 + R2O2 = CCO_O2 : (1.0);
+{APRN} CCO_O2 + RO2_N = CCO_OH + PROD2 : (1.0);
+{APAP} CCO_O2 + CCO_O2 = 2C_O2 : (2.90e-12);
+{PPN2} RCO_O2 + NO2 = PAN2 : (1.20e-11);
+{PAN2} PAN2 = RCO_O2 + NO2 : (2.00e+15);
+{PPNO} RCO_O2 + NO = NO2 + CCHO + RO2_R : (1.25e-11);
+{PPH2} RCO_O2 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : (1.0);
+{PPN3} RCO_O2 + NO3 = NO2 + CCHO + RO2_R : (1.0);
+{PPME} RCO_O2 + C_O2 = RCO_OH + HCHO : (1.0);
+{PPRR} RCO_O2 + RO2_R = RCO_OH : (1.0);
+{PPR2} RCO_O2 + R2O2 = RCO_O2 : (1.0);
+{PPRN} RCO_O2 + RO2_N = RCO_OH + PROD2 : (1.0);
+{PPAP} RCO_O2 + CCO_O2 = C_O2 + CCHO + RO2_R : (1.0);
+{PPPP} RCO_O2 + RCO_O2 = 2CCHO + 2RO2_R : (1.0);
+{BPN2} BZCO_O2 + NO2 = PBZN : (1.37e-11);
+{BPAN} PBZN = BZCO_O2 + NO2 : (7.90e+16);
+{BPNO} BZCO_O2 + NO = NO2 + BZ_O + R2O2 : (1.0);
+{BPH2} BZCO_O2 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : (1.0);
+{BPN3} BZCO_O2 + NO3 = NO2 + BZ_O + R2O2 : (1.0);
+{BPME} BZCO_O2 + C_O2 = RCO_OH + HCHO : (1.0);
+{BPRR} BZCO_O2 + RO2_R = RCO_OH : (1.0);
+{BPR2} BZCO_O2 + R2O2 = BZCO_O2 : (1.0);
+{BPRN} BZCO_O2 + RO2_N = RCO_OH + PROD2 : (1.0);
+{BPAP} BZCO_O2 + CCO_O2 = C_O2 + BZ_O + R2O2 : (1.0);
+{BPPP} BZCO_O2 + RCO_O2 = CCHO + RO2_R + BZ_O + R2O2 : (1.0);
+{BPBP} BZCO_O2 + BZCO_O2 = 2BZ_O + 2R2O2 : (1.0);
+{MPN2} MA_RCO3 + NO2 = MA_PAN : (1.0);
+{MPPN} MA_PAN = MA_RCO3 + NO2 : (1.60e+16);
+{MPNO} MA_RCO3 + NO = NO2 + HCHO + CCO_O2 : (1.0);
+{MPH2} MA_RCO3 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : (1.0);
+{MPN3} MA_RCO3 + NO3 = NO2 + HCHO + CCO_O2 : (1.0);
+{MPME} MA_RCO3 + C_O2 = RCO_OH + HCHO : (1.0);
+{MPRR} MA_RCO3 + RO2_R = RCO_OH : (1.0);
+{MPR2} MA_RCO3 + R2O2 = MA_RCO3 : (1.0);
+{MPRN} MA_RCO3 + RO2_N = 2RCO_OH : (1.0);
+{MPAP} MA_RCO3 + CCO_O2 = C_O2 + HCHO + CCO_O2 : (1.0);
+{MPPP} MA_RCO3 + RCO_O2 = HCHO + CCO_O2 + CCHO + RO2_R : (1.0);
+{MPBP} MA_RCO3 + BZCO_O2 = HCHO + CCO_O2 + BZ_O + R2O2 : (1.0);
+{MPMP} MA_RCO3 + MA_RCO3 = 2HCHO + 2CCO_O2 : (1.0);
+{TBON} TBU_O + NO2 = RNO3 : (2.40e-11);
+{TBOD} TBU_O = ACET + C_O2 : (7.50e+14);
+{BRN2} BZ_O + NO2 = NPHE : (2.30e-11);
+{BRH2} BZ_O + HO2 = PHEN : (1.0);
+{BRXX} BZ_O = PHEN : (1.00e-03);
+{BNN2} BZNO2_O + NO2 = PROD : (1.0);
+{BNH2} BZNO2_O + HO2 = NPHE : (1.0);
+{BNXX} BZNO2_O = NPHE : (1.0);
+{FAHV} HCHO = 2HO2 + CO : (1.0);
+{FAVS} HCHO = CO : (1.0);
+{FAOH} HCHO + HO = HO2 + CO : (8.60e-12);
+{FAH2} HCHO + HO2 = HOCOO : (9.70e-15);
+{FAHR} HOCOO = HO2 + HCHO : (2.40e+12);
+{FAHN} HOCOO + NO = HCOOH + NO2 + HO2 : (1.0);
+{FAN3} HCHO + NO3 = HNO3 + HO2 + CO : (2.00e-12);
+{AAOH} CCHO + HO = CCO_O2 : (5.60e-12);
+{AAHV} CCHO = CO + HO2 + C_O2 : (1.0);
+{AAN3} CCHO + NO3 = HNO3 + CCO_O2 : (1.40e-12);
+{PAOH} RCHO + HO = 0.034RO2_R + 0.001RO2_N + 0.965RCO_O2 + 0.034CO +
+         0.034CCHO : (2.00e-11);
+{PAHV} RCHO = CCHO + RO2_R + CO + HO2 : (1.0);
+{PAN3} RCHO + NO3 = HNO3 + RCO_O2 : (1.40e-12);
+{K3OH} ACET + HO = HCHO + CCO_O2 + R2O2 : (1.10e-12);
+{K3HV} ACET = CCO_O2 + C_O2 : (1.0);
+{K4OH} MEK + HO = 0.37RO2_R + 0.042RO2_N + 0.616R2O2 + 0.492CCO_O2 +
+         0.096RCO_O2 + 0.115HCHO + 0.482CCHO + 0.37RCHO : (1.30e-12);
+{K4HV} MEK = CCO_O2 + CCHO + RO2_R : (1.50e-1);
+{MeOH} MEOH + HO = HCHO + HO2 : (3.10e-12);
+{MER9} COOH + HO = 0.35HCHO + 0.35HO + 0.65C_O2 : (2.90e-12);
+{MERA} COOH = HCHO + HO2 + HO : (1.0);
+{LPR9} ROOH + HO = RCHO + 0.34RO2_R + 0.66HO : (1.10e-11);
+{LPRA} ROOH = RCHO + HO2 + HO : (1.0);
+{GLHV} GLY = 2CO + 2HO2 : (1.0);
+{GLVM} GLY = HCHO + CO : (6.00e-3);
+{GLOH} GLY + HO = 0.63HO2 + 1.26CO + 0.37RCO_O2 : (1.10e-11);
+{GLN3} GLY + NO3 = HNO3 + 0.63HO2 + 1.26CO + 0.37RCO_O2 : (2.80e-12);
+{MGHV} MGLY = HO2 + CO + CCO_O2 : (1.0);
+{MGOH} MGLY + HO = CO + CCO_O2 : (1.50e-11);
+{MGN3} MGLY + NO3 = HNO3 + CO + CCO_O2 : (1.40e-12);
+{BAHV} BACL = 2CCO_O2 : (1.0);
+{PHOH} PHEN + HO = 0.24BZ_O + 0.76RO2_R + 0.23GLY : (2.63e-11);
+{PHN3} PHEN + NO3 = HNO3 + BZ_O : (3.78e-12);
+{CROH} CRES + HO = 0.24BZ_O + 0.76RO2_R + 0.23MGLY : (4.20e-11);
+{CRN3} CRES + NO3 = HNO3 + BZ_O : (1.37e-11);
+{NPN3} NPHE + NO3 = HNO3 + BZNO2_O : (1.0);
+{BZOH} BALD + HO = BZCO_O2 : (1.29e-11);
+{BZHV} BALD = PROD : (5.00e-2);
+{BZNT} BALD + NO3 = HNO3 + BZCO_O2 : (1.40e-12);
+{MAOH} METHACRO + HO = 0.5RO2_R + 0.416CO + 0.084HCHO + 0.416MEK +
+         0.084MGLY + 0.5MA_RCO3 : (1.86e-11);
+{MAO3} METHACRO + O3 = 0.008HO2 + 0.1RO2_R + 0.208HO + 0.1RCO_O2 + 0.45CO +
+         0.2HCHO + 0.9MGLY + 0.333HCOOH : (1.36e-15);
+{MAN3} METHACRO + NO3 = 0.5HNO3 + 0.5RO2_R + 0.5CO + 0.5MA_RCO3
+        : (1.50e-12);
+{MAOP} METHACRO + O3P = RCHO : (6.34e-12);
+{MAHV} METHACRO = 0.34HO2 + 0.33RO2_R + 0.33HO + 0.67CCO_O2 + 0.67CO +
+         0.67HCHO + 0.33MA_RCO3 : (4.10e-3);
+{MVOH} MVK + HO = 0.3RO2_R + 0.025RO2_N + 0.675R2O2 + 0.675CCO_O2 +
+         0.3HCHO + 0.675RCHO + 0.3MGLY : (4.14e-12);
+{MVO3} MVK + O3 = 0.064HO2 + 0.05RO2_R + 0.164HO + 0.05RCO_O2 + 0.475CO +
+         0.1HCHO + 0.95MGLY + 0.351HCOOH : (7.51e-16);
+{MVOP} MVK + O3P = 0.45RCHO + 0.55MEK : (4.32e-12);
+{MVHV} MVK = 0.3C_O2 + 0.7CO + 0.7PROD2 + 0.3MA_RCO3
+             : (2.10e-3);
+{IPOH} ISOPROD + HO = 0.67RO2_R + 0.041RO2_N + 0.289MA_RCO3 + 0.336CO +
+         0.055HCHO + 0.129CCHO + 0.013RCHO + 0.15MEK + 0.332PROD2 +
+         0.15GLY + 0.174MGLY : (6.19e-11);
+{IPO3} ISOPROD + O3 = 0.4HO2 + 0.048RO2_R + 0.048RCO_O2 + 0.285HO +
+         0.498CO + 0.125HCHO + 0.047CCHO + 0.21MEK + 0.023GLY +
+         0.742MGLY + 0.1HCOOH + 0.372RCO_OH : (4.18e-18);
+{IPN3} ISOPROD + NO3 = 0.799RO2_R + 0.051RO2_N + 0.15MA_RCO3 + 0.572CO +
+         0.15HNO3 + 0.227HCHO + 0.218RCHO + 0.008MGLY + 0.572RNO3
+        : (1.00e-13);
+{IPHV} ISOPROD = 1.233HO2 + 0.467CCO_O2 + 0.3RCO_O2 + 1.233CO + 0.3HCHO +
+         0.467CCHO + 0.233MEK : (4.10e-3);
+{K6OH} PROD2 + HO = 0.379HO2 + 0.473RO2_R + 0.07RO2_N + 0.029CCO_O2 +
+         0.049RCO_O2 + 0.213HCHO + 0.084CCHO + 0.558RCHO + 0.115MEK +
+         0.329PROD2 : (1.50e-11);
+{K6HV} PROD2 = 0.96RO2_R + 0.04RO2_N + 0.515R2O2 + 0.667CCO_O2 +
+         0.333RCO_O2 + 0.506HCHO + 0.246CCHO + 0.71RCHO 
+         : (2.00e-2);
+{RNOH} RNO3 + HO = 0.338NO2 + 0.113HO2 + 0.376RO2_R + 0.173RO2_N +
+         0.596R2O2 + 0.01HCHO + 0.439CCHO + 0.213RCHO + 0.006ACET +
+         0.177MEK + 0.048PROD2 + 0.31RNO3 : (7.80e-12);
+{RNHV} RNO3 = NO2 + 0.341HO2 + 0.564RO2_R + 0.095RO2_N + 0.152R2O2 +
+         0.134HCHO + 0.431CCHO + 0.147RCHO + 0.02ACET + 0.243MEK +
+         0.435PROD2 : (1.0);
+{D1OH} DCB1 + HO = RCHO + RO2_R + CO : (5.00e-11);
+{D1O3} DCB1 + O3 = 1.5HO2 + 0.5HO + 1.5CO + GLY : (2.00e-18);
+{D2OH} DCB2 + HO = R2O2 + RCHO + CCO_O2 : (5.00e-11);
+{D2HV} DCB2 = RO2_R + 0.5CCO_O2 + 0.5HO2 + CO + R2O2 + 0.5GLY + 0.5MGLY
+        : (3.65e-1);
+{D3OH} DCB3 + HO = R2O2 + RCHO + CCO_O2 : (5.00e-11);
+{D3HV} DCB3 = RO2_R + 0.5CCO_O2 + 0.5HO2 + CO + R2O2 + 0.5GLY + 0.5MGLY
+        : (7.28e+0);
+{c1OH} CH4 + HO = C_O2 : (2.15e-12);
+{etOH} ETHENE + HO = RO2_R + 1.61HCHO + 0.195CCHO : (1.96e-12);
+{etO3} ETHENE + O3 = 0.12HO + 0.12HO2 + 0.5CO + HCHO + 0.37HCOOH
+        : (9.14e-15);
+{etN3} ETHENE + NO3 = RO2_R + RCHO : (4.39e-13);
+{etOA} ETHENE + O3P = 0.5HO2 + 0.2RO2_R + 0.3C_O2 + 0.491CO + 0.191HCHO +
+         0.25CCHO + 0.009GLY : (1.04e-11);
+{isOH} ISOPRENE + HO = 0.907RO2_R + 0.093RO2_N + 0.079R2O2 + 0.624HCHO +
+         0.23METHACRO + 0.32MVK + 0.357ISOPROD : (2.50e-11);
+{isO3} ISOPRENE + O3 = 0.266HO + 0.066RO2_R + 0.008RO2_N + 0.126R2O2 +
+         0.192MA_RCO3 + 0.275CO + 0.592HCHO + 0.1PROD2 + 0.39METHACRO +
+         0.16MVK + 0.204HCOOH + 0.15RCO_OH : (7.86e-15);
+{isN3} ISOPRENE + NO3 = 0.187NO2 + 0.749RO2_R + 0.064RO2_N + 0.187R2O2 +
+         0.936ISOPROD : (3.03e-12);
+{isOP} ISOPRENE + O3P = 0.01RO2_N + 0.24R2O2 + 0.25C_O2 + 0.24MA_RCO3 +
+         0.24HCHO + 0.75PROD2 : (3.60e-11);
+{t1OH} TRP1 + HO = 0.75RO2_R + 0.25RO2_N + 0.5R2O2 + 0.276HCHO +
+         0.474RCHO + 0.276PROD2 : (1.83e-11);
+{t1O3} TRP1 + O3 = 0.567HO + 0.033HO2 + 0.031RO2_R + 0.18RO2_N +
+         0.729R2O2 + 0.123CCO_O2 + 0.201RCO_O2 + 0.157CO + 0.235HCHO +
+         0.205RCHO + 0.13ACET + 0.276PROD2 + 0.001GLY + 0.031BACL +
+         0.103HCOOH + 0.189RCO_OH : (1.08e-15);
+{t1N3} TRP1 + NO3 = 0.474NO2 + 0.276RO2_R + 0.25RO2_N + 0.75R2O2 +
+         0.474RCHO + 0.276RNO3 : (3.66e-12);
+{t1OP} TRP1 + O3P = 0.147RCHO + 0.853PROD2 : (3.27e-11);
+{a1OH} ALK1 + HO = RO2_R + CCHO : (1.37e-12);
+{a2OH} ALK2 + HO = 0.246HO + 0.121HO2 + 0.612RO2_R + 0.021RO2_N + 0.16CO +
+         0.039HCHO + 0.155RCHO + 0.417ACET + 0.248GLY + 0.121HCOOH
+        : (9.87e-12);
+{a3OH} ALK3 + HO = 0.695RO2_R + 0.07RO2_N + 0.559R2O2 + 0.236TBU_O +
+         0.026HCHO + 0.445CCHO + 0.122RCHO + 0.024ACET + 0.332MEK
+        : (1.02e-11);
+{a4OH} ALK4 + HO = 0.835RO2_R + 0.143RO2_N + 0.936R2O2 + 0.011C_O2 +
+         0.011CCO_O2 + 0.002CO + 0.024HCHO + 0.455CCHO + 0.244RCHO +
+         0.452ACET + 0.11MEK + 0.125PROD2 : (5.95e-12);
+{a5OH} ALK5 + HO = 0.653RO2_R + 0.347RO2_N + 0.948R2O2 + 0.026HCHO +
+         0.099CCHO + 0.204RCHO + 0.072ACET + 0.089MEK + 0.417PROD2
+        : (1.11e-11);
+{b1OH} ARO1 + HO = 0.224HO2 + 0.765RO2_R + 0.011RO2_N + 0.055PROD2 +
+         0.118GLY + 0.119MGLY + 0.017PHEN + 0.207CRES + 0.059BALD +
+         0.491DCB1 + 0.108DCB2 + 0.051DCB3 : (1.81e-12);
+{b2OH} ARO2 + HO = 0.187HO2 + 0.804RO2_R + 0.009RO2_N + 0.097GLY +
+         0.287MGLY + 0.087BACL + 0.187CRES + 0.05BALD + 0.561DCB1 +
+         0.099DCB2 + 0.093DCB3 : (2.64e-11);
+{o1OH} OLE1 + HO = 0.91RO2_R + 0.09RO2_N + 0.205R2O2 + 0.732HCHO +
+         0.294CCHO + 0.497RCHO + 0.005ACET + 0.119PROD2 : (7.10e-12);
+{o1O3} OLE1 + O3 = 0.155HO + 0.056HO2 + 0.022RO2_R + 0.001RO2_N +
+         0.076C_O2 + 0.345CO + 0.5HCHO + 0.154CCHO + 0.363RCHO +
+         0.001ACET + 0.215PROD2 + 0.185HCOOH + 0.05CCO_OH + 0.119RCO_OH
+        : (2.62e-15);
+{o1N3} OLE1 + NO3 = 0.824RO2_R + 0.176RO2_N + 0.488R2O2 + 0.009CCHO +
+         0.037RCHO + 0.024ACET + 0.511RNO3 : (4.45e-14);
+{o1OP} OLE1 + O3P = 0.45RCHO + 0.437MEK + 0.113PROD2 : (1.07e-11);
+{o2OH} OLE2 + HO = 0.918RO2_R + 0.082RO2_N + 0.001R2O2 + 0.244HCHO +
+         0.732CCHO + 0.511RCHO + 0.127ACET + 0.072MEK + 0.061BALD +
+         0.025METHACRO + 0.025ISOPROD : (1.74e-11);
+{o2O3} OLE2 + O3 = 0.378HO + 0.003HO2 + 0.033RO2_R + 0.002RO2_N +
+         0.137R2O2 + 0.197C_O2 + 0.137CCO_O2 + 0.006RCO_O2 + 0.265CO +
+         0.269HCHO + 0.456CCHO + 0.305RCHO + 0.045ACET + 0.026MEK +
+         0.006PROD2 + 0.042BALD + 0.026METHACRO + 0.073HCOOH +
+         0.129CCO_OH + 0.303RCO_OH : (5.02e-16);
+{o2N3} OLE2 + NO3 = 0.391NO2 + 0.442RO2_R + 0.136RO2_N + 0.711R2O2 +
+         0.03C_O2 + 0.079HCHO + 0.507CCHO + 0.151RCHO + 0.102ACET +
+         0.001MEK + 0.015BALD + 0.048MVK + 0.321RNO3 : (7.26e-13);
+{o2OP} OLE2 + O3P = 0.013HO2 + 0.012RO2_R + 0.001RO2_N + 0.012CO +
+         0.069RCHO + 0.659MEK + 0.259PROD2 + 0.012METHACRO : (2.09e-11);
+{c1OH} HCOOH + HO = HO2 : (4.5E-13);
+{c2OH} CCO_OH + HO = 0.13RO2_R + 0.87C_O2 + 0.13MGLY : (8.00E-13);
+{c3OH} RCO_OH + HO = RO2_R + 0.605CCHO + 0.21RCHO + 0.185BACL : (1.16E-12);
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/cmaq_s99.spc	(revision 3477)
@@ -0,0 +1,82 @@
+#include atoms
+
+#DEFVAR   
+	NO2             = N + 2O;
+	NO              = N + O;
+	O3P             = O;
+	O3              = 3O;
+	NO3             = N + 3O;
+	N2O5            = 2N + 5O;
+	HNO3            = H + N + 3O;
+	O1D2            = O;
+	HO              = H + O;
+	HONO            = H + 2O + N;
+	HO2             = H + 2O;
+	CO              = C + O;
+	HNO4            = H + 4O + N;
+	HO2H            = 2H + 2O;
+	SO2             = S + 2O;
+	SULF            = IGNORE;
+	C_O2            = IGNORE;
+	HCHO            = 2H + C + O;
+	COOH            = H + 2O + C;
+	MEOH            = IGNORE;
+	RO2_R           = IGNORE;
+	ROOH            = IGNORE;
+	R2O2            = IGNORE;
+	RO2_N           = IGNORE;
+	RNO3            = IGNORE;
+	MEK             = IGNORE;
+	PROD2           = IGNORE;
+	CCO_O2          = IGNORE;
+	PAN             = IGNORE;
+	CCO_OOH         = 2C + 3O + H;
+	CCO_OH          = 2O + 2C + H;
+	RCO_O2          = IGNORE;
+	PAN2            = IGNORE;
+	CCHO            = 2C + H + O;
+	RCO_OOH         = IGNORE;
+	RCO_OH          = IGNORE;
+	BZCO_O2         = IGNORE;
+	PBZN            = IGNORE;
+	BZ_O            = IGNORE;
+	MA_RCO3         = IGNORE;
+	MA_PAN          = IGNORE;
+	TBU_O           = IGNORE;
+	ACET            = IGNORE;
+	NPHE            = IGNORE;
+	PHEN            = IGNORE;
+	BZNO2_O         = IGNORE;
+	HOCOO           = IGNORE;
+	HCOOH           = IGNORE;
+	RCHO            = IGNORE;
+	GLY             = IGNORE;
+	MGLY            = IGNORE;
+	BACL            = IGNORE;
+	CRES            = IGNORE;
+	BALD            = IGNORE;
+	METHACRO        = IGNORE;
+	MVK             = IGNORE;
+	ISOPROD         = IGNORE;
+	DCB1            = IGNORE;
+	DCB2            = IGNORE;
+	DCB3            = IGNORE;
+	ETHENE          = 2C + 4H;
+	ISOPRENE        = IGNORE;
+	TRP1            = IGNORE;
+	ALK1            = IGNORE;
+	ALK2            = IGNORE;
+	ALK3            = IGNORE;
+	ALK4            = IGNORE;
+	ALK5            = IGNORE;
+	ARO1            = IGNORE;
+	ARO2            = IGNORE;
+	OLE1            = IGNORE;
+	OLE2            = IGNORE;
+
+#DEFFIX	
+	M		= IGNORE;
+	O2		= 2O;
+	H2O		= 2H + O;
+	H2		= 2H;	
+	CH4		= C + 4H;	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/gc_spc.ext
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/gc_spc.ext	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/gc_spc.ext	(revision 3477)
@@ -0,0 +1,91 @@
+
+C RCS file, release, date & time of last delta, author, state, [and locker]
+C $Header: /project/air5/sjr/CMAS4.5/rel/models/include/ICL/src/mech/saprc99/GC_SPC.EXT,v 1.1.1.1 2005/09/09 19:03:12 sjr Exp $ 
+
+C what(1) key, module and SID; SCCS file; date and time of last delta:
+C %W% %P% %G% %U%
+
+C------------------------------------------------------ 
+C  This file is generated by gen_includes. 
+C------------------------------------------------------ 
+C Mechanism Name: SAPRC99
+
+        INTEGER        N_GC_SPC
+        PARAMETER     (N_GC_SPC = 72)
+        INTEGER        N_GC_SPCD
+        PARAMETER     (N_GC_SPCD = N_GC_SPC + 1 )
+        CHARACTER*16   GC_SPC(N_GC_SPCD)
+        REAL           GC_MOLWT(N_GC_SPCD)
+
+        DATA          GC_SPC(  1), GC_MOLWT(  1) / 'NO2             ', 46.0 /
+        DATA          GC_SPC(  2), GC_MOLWT(  2) / 'NO              ', 30.0 /
+        DATA          GC_SPC(  3), GC_MOLWT(  3) / 'O3P             ', 16.0 /
+        DATA          GC_SPC(  4), GC_MOLWT(  4) / 'O3              ', 48.0 /
+        DATA          GC_SPC(  5), GC_MOLWT(  5) / 'NO3             ', 62.0 /
+        DATA          GC_SPC(  6), GC_MOLWT(  6) / 'N2O5            ', 108.0 /
+        DATA          GC_SPC(  7), GC_MOLWT(  7) / 'HNO3            ', 63.0 /
+        DATA          GC_SPC(  8), GC_MOLWT(  8) / 'O1D2            ', 16.0 /
+        DATA          GC_SPC(  9), GC_MOLWT(  9) / 'HO              ', 17.0 /
+        DATA          GC_SPC( 10), GC_MOLWT( 10) / 'HONO            ', 47.0 /
+        DATA          GC_SPC( 11), GC_MOLWT( 11) / 'HO2             ', 33.0 /
+        DATA          GC_SPC( 12), GC_MOLWT( 12) / 'CO              ', 28.0 /
+        DATA          GC_SPC( 13), GC_MOLWT( 13) / 'HNO4            ', 79.0 /
+        DATA          GC_SPC( 14), GC_MOLWT( 14) / 'HO2H            ', 34.0 /
+        DATA          GC_SPC( 15), GC_MOLWT( 15) / 'SO2             ', 64.0 /
+        DATA          GC_SPC( 16), GC_MOLWT( 16) / 'SULF            ', 98.0 /
+        DATA          GC_SPC( 17), GC_MOLWT( 17) / 'C_O2            ', 47.0 /
+        DATA          GC_SPC( 18), GC_MOLWT( 18) / 'HCHO            ', 30.0 /
+        DATA          GC_SPC( 19), GC_MOLWT( 19) / 'COOH            ', 48.0 /
+        DATA          GC_SPC( 20), GC_MOLWT( 20) / 'MEOH            ', 32.0 /
+        DATA          GC_SPC( 21), GC_MOLWT( 21) / 'RO2_R           ', 1.0 /
+        DATA          GC_SPC( 22), GC_MOLWT( 22) / 'ROOH            ', 62.0 /
+        DATA          GC_SPC( 23), GC_MOLWT( 23) / 'R2O2            ', 1.0 /
+        DATA          GC_SPC( 24), GC_MOLWT( 24) / 'RO2_N           ', 1.0 /
+        DATA          GC_SPC( 25), GC_MOLWT( 25) / 'RNO3            ', 133.0 /
+        DATA          GC_SPC( 26), GC_MOLWT( 26) / 'MEK             ', 72.0 /
+        DATA          GC_SPC( 27), GC_MOLWT( 27) / 'PROD2           ', 100.0 /
+        DATA          GC_SPC( 28), GC_MOLWT( 28) / 'CCO_O2          ', 75.0 /
+        DATA          GC_SPC( 29), GC_MOLWT( 29) / 'PAN             ', 121.0 /
+        DATA          GC_SPC( 30), GC_MOLWT( 30) / 'CCO_OOH         ', 76.0 /
+        DATA          GC_SPC( 31), GC_MOLWT( 31) / 'CCO_OH          ', 60.0 /
+        DATA          GC_SPC( 32), GC_MOLWT( 32) / 'RCO_O2          ', 89.0 /
+        DATA          GC_SPC( 33), GC_MOLWT( 33) / 'PAN2            ', 135.0 /
+        DATA          GC_SPC( 34), GC_MOLWT( 34) / 'CCHO            ', 44.0 /
+        DATA          GC_SPC( 35), GC_MOLWT( 35) / 'RCO_OOH         ', 90.0 /
+        DATA          GC_SPC( 36), GC_MOLWT( 36) / 'RCO_OH          ', 74.0 /
+        DATA          GC_SPC( 37), GC_MOLWT( 37) / 'BZCO_O2         ', 137.0 /
+        DATA          GC_SPC( 38), GC_MOLWT( 38) / 'PBZN            ', 183.0 /
+        DATA          GC_SPC( 39), GC_MOLWT( 39) / 'BZ_O            ', 93.0 /
+        DATA          GC_SPC( 40), GC_MOLWT( 40) / 'MA_RCO3         ', 101.0 /
+        DATA          GC_SPC( 41), GC_MOLWT( 41) / 'MA_PAN          ', 147.0 /
+        DATA          GC_SPC( 42), GC_MOLWT( 42) / 'TBU_O           ', 73.0 /
+        DATA          GC_SPC( 43), GC_MOLWT( 43) / 'ACET            ', 58.0 /
+        DATA          GC_SPC( 44), GC_MOLWT( 44) / 'NPHE            ', 139.0 /
+        DATA          GC_SPC( 45), GC_MOLWT( 45) / 'PHEN            ', 94.0 /
+        DATA          GC_SPC( 46), GC_MOLWT( 46) / 'BZNO2_O         ', 139.0 /
+        DATA          GC_SPC( 47), GC_MOLWT( 47) / 'HOCOO           ', 63.0 /
+        DATA          GC_SPC( 48), GC_MOLWT( 48) / 'HCOOH           ', 46.0 /
+        DATA          GC_SPC( 49), GC_MOLWT( 49) / 'RCHO            ', 58.0 /
+        DATA          GC_SPC( 50), GC_MOLWT( 50) / 'GLY             ', 58.0 /
+        DATA          GC_SPC( 51), GC_MOLWT( 51) / 'MGLY            ', 72.0 /
+        DATA          GC_SPC( 52), GC_MOLWT( 52) / 'BACL            ', 86.0 /
+        DATA          GC_SPC( 53), GC_MOLWT( 53) / 'CRES            ', 108.0 /
+        DATA          GC_SPC( 54), GC_MOLWT( 54) / 'BALD            ', 106.0 /
+        DATA          GC_SPC( 55), GC_MOLWT( 55) / 'METHACRO        ', 70.0 /
+        DATA          GC_SPC( 56), GC_MOLWT( 56) / 'MVK             ', 70.0 /
+        DATA          GC_SPC( 57), GC_MOLWT( 57) / 'ISOPROD         ', 70.0 /
+        DATA          GC_SPC( 58), GC_MOLWT( 58) / 'DCB1            ', 58.0 /
+        DATA          GC_SPC( 59), GC_MOLWT( 59) / 'DCB2            ', 72.0 /
+        DATA          GC_SPC( 60), GC_MOLWT( 60) / 'DCB3            ', 72.0 /
+        DATA          GC_SPC( 61), GC_MOLWT( 61) / 'ETHENE          ', 28.0 /
+        DATA          GC_SPC( 62), GC_MOLWT( 62) / 'ISOPRENE        ', 68.0 /
+        DATA          GC_SPC( 63), GC_MOLWT( 63) / 'TRP1            ', 136.0 /
+        DATA          GC_SPC( 64), GC_MOLWT( 64) / 'ALK1            ', 30.1 /
+        DATA          GC_SPC( 65), GC_MOLWT( 65) / 'ALK2            ', 36.7 /
+        DATA          GC_SPC( 66), GC_MOLWT( 66) / 'ALK3            ', 58.6 /
+        DATA          GC_SPC( 67), GC_MOLWT( 67) / 'ALK4            ', 77.6 /
+        DATA          GC_SPC( 68), GC_MOLWT( 68) / 'ALK5            ', 118.9 /
+        DATA          GC_SPC( 69), GC_MOLWT( 69) / 'ARO1            ', 98.6 /
+        DATA          GC_SPC( 70), GC_MOLWT( 70) / 'ARO2            ', 118.7 /
+        DATA          GC_SPC( 71), GC_MOLWT( 71) / 'OLE1            ', 72.3 /
+        DATA          GC_SPC( 72), GC_MOLWT( 72) / 'OLE2            ', 75.8 /
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/mech.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/mech.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/mech.def	(revision 3477)
@@ -0,0 +1,301 @@
+
+C RCS file, release, date & time of last delta, author, state, [and locker]
+C $Header: /project/air5/sjr/CMAS4.5/rel/models/include/ICL/src/mech/saprc99/mech.def,v 1.1.1.1 2005/09/09 19:03:12 sjr Exp $ 
+
+C what(1) key, module and SID; SCCS file; date and time of last delta:
+C %W% %P% %G% %U%
+
+! SAPRC-99 Fixed Parameter Mechanism 
+! Created from BASEMECH.XLS 21-Jan-2000 18:19
+! Modified by Jerry Gipson 02/08/01 for Models3 implementation:
+!   1)  Added Mechanism name
+!   2)  Changed REACTIONS(CM)  to REACTIONS[CM]
+!   3)  Changed species BZ(NO2)_O to BZNO2_O
+!   4)  Added zero activation energies for <32> (special type %3)
+!   5)  Added recations for formic, acetic, and higher organic acids
+!   6)  Modified labels of photolysis reactions 
+
+
+SAPRC99
+
+REACTIONS[CM] =
+<1> NO2 = NO + O3P # 1.0/<NO2_SAPRC99>;
+<2> O3P + O2 + M = O3 # 5.68e-34^-2.80;
+<3> O3P + O3 =  # 8.00e-12@2060;
+<4> O3P + NO + M = NO2 # 1.00e-31^-1.60;
+<5> O3P + NO2 = NO # 6.50e-12@-120;
+<6> O3P + NO2 = NO3 # 9.00e-32^-2.00&2.20e-11&0.80&1.0;
+<8> O3 + NO = NO2 # 1.80e-12@1370;
+<9> O3 + NO2 = NO3 # 1.40e-13@2470;
+<10> NO + NO3 = 2*NO2 # 1.80e-11@-110;
+<11> NO + NO + O2 = 2*NO2 # 3.30e-39@-530;
+<12> NO2 + NO3 = N2O5 # 2.80e-30^-3.50&2.00e-12^0.20&0.45&1.0;
+<13> N2O5 = NO2 + NO3 # 1.00e-03^-3.50@11000&9.70e+14^0.10@11080&0.45&1.0;
+<14> N2O5 + H2O = 2*HNO3 # 2.60e-22;
+<17> NO2 + NO3 = NO + NO2 # 4.50e-14@1260;
+<18> NO3 = NO # 1.0/<NO3NO_SAPRC99>;
+<19> NO3 = NO2 + O3P # 1.0/<NO3NO2_SAPRC99>;
+<20> O3 = O3P # 1.0/<O3O3P_SAPRC99>;
+<21> O3 = O1D2 # 1.0/<O3O1D_SAPRC99>;
+<22> O1D2 + H2O = 2*HO # 2.20e-10;
+<23> O1D2 + M = O3P # 2.09e-11@-95;
+<24> HO + NO = HONO # 7.00e-31^-2.60&3.60e-11^-0.10&0.60&1.0;
+<25> HONO = HO + NO # 1.0/<HONO_NO_SAPRC99>;
+<26> HONO = HO2 + NO2 # 1.0/<HONO_NO2_SAPRC99>;
+<27> HO + HONO = NO2 # 2.70e-12@-260;
+<28> HO + NO2 = HNO3 # 2.43e-30^-3.10&1.67e-11^-2.10&0.60&1.0;
+<29> HO + NO3 = HO2 + NO2 # 2.00e-11;
+<30> HO + HNO3 = NO3 %2 # 7.20e-15@-785&4.10e-16@-1440&1.90e-33@-725;
+<31> HNO3 = HO + NO2 # 1.0/<HNO3_SAPRC99>;
+<32> HO + CO = HO2 %3 # 1.30e-13@0.0&3.19e-33@0.0;
+<33> HO + O3 = HO2 # 1.90e-12@1000;
+<34> HO2 + NO = HO + NO2 # 3.40e-12@-270;
+<35> HO2 + NO2 = HNO4 # 1.80e-31^-3.20&4.70e-12&0.60&1.0;
+<36> HNO4 = HO2 + NO2 # 4.10e-05@10650&5.70e+15@11170&0.50&1.0;
+<37> HNO4 = 0.61*HO2 + 0.61*NO2 + 0.39*HO + 0.39*NO3 # 1.0/<HO2NO2_SAPRC99>;
+<38> HNO4 + HO = NO2 # 1.50e-12@-360;
+<39> HO2 + O3 = HO # 1.40e-14@600;
+<40A> HO2 + HO2 = HO2H %3 # 2.20e-13@-600&1.85e-33@-980;
+<40B> HO2 + HO2 + H2O = HO2H %3 # 3.08e-34@-2800&2.59e-54@-3180;
+<41> NO3 + HO2 = 0.8*HO + 0.8*NO2 + 0.2*HNO3 # 4.00e-12;
+<42> NO3 + NO3 = 2*NO2 # 8.50e-13@2450;
+<43> HO2H = 2*HO # 1.0/<H2O2_SAPRC99>;
+<44> HO2H + HO = HO2 # 2.90e-12@160;
+<45> HO + HO2 =  # 4.80e-11@-250;
+<S2OH> HO + SO2 = HO2 + SULF # 4.00e-31^-3.30&2.00e-12&0.45&1.0;
+<H2OH> HO + H2 = HO2 # 7.70e-12@2100;
+<MER1> C_O2 + NO = NO2 + HCHO + HO2 # 2.80e-12@-285;
+<MER4> C_O2 + HO2 = COOH # 3.80e-13@-780;
+<MEN3> C_O2 + NO3 = HCHO + HO2 + NO2 # 1.30e-12;
+<MER5> C_O2 + C_O2 = MEOH + HCHO # 2.45e-14@-710;
+<MER6> C_O2 + C_O2 = 2*HCHO + 2*HO2 # 5.90e-13@509;
+<RRNO> RO2_R + NO = NO2 + HO2 # 2.70e-12@-360;
+<RRH2> RO2_R + HO2 = ROOH # 1.90e-13@-1300;
+<RRN3> RO2_R + NO3 = NO2 + HO2 # 2.30e-12;
+<RRME> RO2_R + C_O2 = HO2 + 0.75*HCHO + 0.25*MEOH # 2.00e-13;
+<RRR2> RO2_R + RO2_R = HO2 # 3.50e-14;
+<R2NO> R2O2 + NO = NO2 # 1.0*K<RRNO>;
+<R2H2> R2O2 + HO2 = HO2 # 1.0*K<RRH2>;
+<R2N3> R2O2 + NO3 = NO2 # 1.0*K<RRN3>;
+<R2ME> R2O2 + C_O2 = C_O2 # 1.0*K<RRME>;
+<R2RR> R2O2 + RO2_R = RO2_R # 1.0*K<RRR2>;
+<R2R3> R2O2 + R2O2 =  # 1.0*K<RRR2>;
+<RNNO> RO2_N + NO = RNO3 # 1.0*K<RRNO>;
+<RNH2> RO2_N + HO2 = ROOH # 1.0*K<RRH2>;
+<RNME> RO2_N + C_O2 = HO2 + 0.25*MEOH + 0.5*MEK + 0.5*PROD2 + 0.75*HCHO
+        # 1.0*K<RRME>;
+<RNN3> RO2_N + NO3 = NO2 + HO2 + MEK # 1.0*K<RRN3>;
+<RNRR> RO2_N + RO2_R = HO2 + 0.5*MEK + 0.5*PROD2 # 1.0*K<RRR2>;
+<RNR2> RO2_N + R2O2 = RO2_N # 1.0*K<RRR2>;
+<RNRN> RO2_N + RO2_N = MEK + HO2 + PROD2 # 1.0*K<RRR2>;
+<APN2> CCO_O2 + NO2 = PAN # 2.70e-28^-7.10&1.20e-11^-0.90&0.30&1.0;
+<DPAN> PAN = CCO_O2 + NO2 # 4.90e-03@12100&4.00e+16@13600&0.30&1.0;
+<APNO> CCO_O2 + NO = C_O2 + NO2 # 7.80e-12@-300;
+<APH2> CCO_O2 + HO2 = 0.75*CCO_OOH + 0.25*CCO_OH + 0.25*O3 # 4.30e-13@-1040;
+<APN3> CCO_O2 + NO3 = C_O2 + NO2 # 4.00e-12;
+<APME> CCO_O2 + C_O2 = CCO_OH + HCHO # 1.80e-12@-500;
+<APRR> CCO_O2 + RO2_R = CCO_OH # 7.50e-12;
+<APR2> CCO_O2 + R2O2 = CCO_O2 # 1.0*K<APRR>;
+<APRN> CCO_O2 + RO2_N = CCO_OH + PROD2 # 1.0*K<APRR>;
+<APAP> CCO_O2 + CCO_O2 = 2*C_O2 # 2.90e-12@-500;
+<PPN2> RCO_O2 + NO2 = PAN2 # 1.20e-11^-0.90;
+<PAN2> PAN2 = RCO_O2 + NO2 # 2.00e+15@12800;
+<PPNO> RCO_O2 + NO = NO2 + CCHO + RO2_R # 1.25e-11@-240;
+<PPH2> RCO_O2 + HO2 = 0.75*RCO_OOH + 0.25*RCO_OH + 0.25*O3 # 1.0*K<APH2>;
+<PPN3> RCO_O2 + NO3 = NO2 + CCHO + RO2_R # 1.0*K<APN3>;
+<PPME> RCO_O2 + C_O2 = RCO_OH + HCHO # 1.0*K<APME>;
+<PPRR> RCO_O2 + RO2_R = RCO_OH # 1.0*K<APRR>;
+<PPR2> RCO_O2 + R2O2 = RCO_O2 # 1.0*K<APRR>;
+<PPRN> RCO_O2 + RO2_N = RCO_OH + PROD2 # 1.0*K<APRR>;
+<PPAP> RCO_O2 + CCO_O2 = C_O2 + CCHO + RO2_R # 1.0*K<APAP>;
+<PPPP> RCO_O2 + RCO_O2 = 2*CCHO + 2*RO2_R # 1.0*K<APAP>;
+<BPN2> BZCO_O2 + NO2 = PBZN # 1.37e-11;
+<BPAN> PBZN = BZCO_O2 + NO2 # 7.90e+16@14000;
+<BPNO> BZCO_O2 + NO = NO2 + BZ_O + R2O2 # 1.0*K<PPNO>;
+<BPH2> BZCO_O2 + HO2 = 0.75*RCO_OOH + 0.25*RCO_OH + 0.25*O3 # 1.0*K<APH2>;
+<BPN3> BZCO_O2 + NO3 = NO2 + BZ_O + R2O2 # 1.0*K<APN3>;
+<BPME> BZCO_O2 + C_O2 = RCO_OH + HCHO # 1.0*K<APME>;
+<BPRR> BZCO_O2 + RO2_R = RCO_OH # 1.0*K<APRR>;
+<BPR2> BZCO_O2 + R2O2 = BZCO_O2 # 1.0*K<APRR>;
+<BPRN> BZCO_O2 + RO2_N = RCO_OH + PROD2 # 1.0*K<APRR>;
+<BPAP> BZCO_O2 + CCO_O2 = C_O2 + BZ_O + R2O2 # 1.0*K<APAP>;
+<BPPP> BZCO_O2 + RCO_O2 = CCHO + RO2_R + BZ_O + R2O2 # 1.0*K<APAP>;
+<BPBP> BZCO_O2 + BZCO_O2 = 2*BZ_O + 2*R2O2 # 1.0*K<APAP>;
+<MPN2> MA_RCO3 + NO2 = MA_PAN # 1.0*K<PPN2>;
+<MPPN> MA_PAN = MA_RCO3 + NO2 # 1.60e+16@13486;
+<MPNO> MA_RCO3 + NO = NO2 + HCHO + CCO_O2 # 1.0*K<PPNO>;
+<MPH2> MA_RCO3 + HO2 = 0.75*RCO_OOH + 0.25*RCO_OH + 0.25*O3 # 1.0*K<APH2>;
+<MPN3> MA_RCO3 + NO3 = NO2 + HCHO + CCO_O2 # 1.0*K<APN3>;
+<MPME> MA_RCO3 + C_O2 = RCO_OH + HCHO # 1.0*K<APME>;
+<MPRR> MA_RCO3 + RO2_R = RCO_OH # 1.0*K<APRR>;
+<MPR2> MA_RCO3 + R2O2 = MA_RCO3 # 1.0*K<APRR>;
+<MPRN> MA_RCO3 + RO2_N = 2*RCO_OH # 1.0*K<APRR>;
+<MPAP> MA_RCO3 + CCO_O2 = C_O2 + HCHO + CCO_O2 # 1.0*K<APAP>;
+<MPPP> MA_RCO3 + RCO_O2 = HCHO + CCO_O2 + CCHO + RO2_R # 1.0*K<APAP>;
+<MPBP> MA_RCO3 + BZCO_O2 = HCHO + CCO_O2 + BZ_O + R2O2 # 1.0*K<APAP>;
+<MPMP> MA_RCO3 + MA_RCO3 = 2*HCHO + 2*CCO_O2 # 1.0*K<APAP>;
+<TBON> TBU_O + NO2 = RNO3 # 2.40e-11;
+<TBOD> TBU_O = ACET + C_O2 # 7.50e+14@8152;
+<BRN2> BZ_O + NO2 = NPHE # 2.30e-11@-150;
+<BRH2> BZ_O + HO2 = PHEN # 1.0*K<RRH2>;
+<BRXX> BZ_O = PHEN # 1.00e-03;
+<BNN2> BZNO2_O + NO2 =  # 1.0*K<BRN2>;
+<BNH2> BZNO2_O + HO2 = NPHE # 1.0*K<RRH2>;
+<BNXX> BZNO2_O = NPHE # 1.0*K<BRXX>;
+<FAHV> HCHO = 2*HO2 + CO # 1.0/<HCHO_R_SAPRC99>;
+<FAVS> HCHO = CO # 1.0/<HCHO_M_SAPRC99>;
+<FAOH> HCHO + HO = HO2 + CO # 8.60e-12@-20;
+<FAH2> HCHO + HO2 = HOCOO # 9.70e-15@-625;
+<FAHR> HOCOO = HO2 + HCHO # 2.40e+12@7000;
+<FAHN> HOCOO + NO = HCOOH + NO2 + HO2 # 1.0*K<MER1>;
+<FAN3> HCHO + NO3 = HNO3 + HO2 + CO # 2.00e-12@2431;
+<AAOH> CCHO + HO = CCO_O2 # 5.60e-12@-310;
+<AAHV> CCHO = CO + HO2 + C_O2 # 1.0/<CCHO_R_SAPRC99>;
+<AAN3> CCHO + NO3 = HNO3 + CCO_O2 # 1.40e-12@1860;
+<PAOH> RCHO + HO = 0.034*RO2_R + 0.001*RO2_N + 0.965*RCO_O2 + 0.034*CO +
+         0.034*CCHO # 2.00e-11;
+<PAHV> RCHO = CCHO + RO2_R + CO + HO2 # 1.0/<C2CHO_SAPRC99>;
+<PAN3> RCHO + NO3 = HNO3 + RCO_O2 # 1.40e-12@1771;
+<K3OH> ACET + HO = HCHO + CCO_O2 + R2O2 # 1.10e-12@520;
+<K3HV> ACET = CCO_O2 + C_O2 # 1.0/<ACETONE_SAPRC99>;
+<K4OH> MEK + HO = 0.37*RO2_R + 0.042*RO2_N + 0.616*R2O2 + 0.492*CCO_O2 +
+         0.096*RCO_O2 + 0.115*HCHO + 0.482*CCHO + 0.37*RCHO # 1.30e-12^2.00@25;
+<K4HV> MEK = CCO_O2 + CCHO + RO2_R # 1.50e-1/<KETONE_SAPRC99>;
+<MeOH> MEOH + HO = HCHO + HO2 # 3.10e-12^2.00@360;
+<MER9> COOH + HO = 0.35*HCHO + 0.35*HO + 0.65*C_O2 # 2.90e-12@-190;
+<MERA> COOH = HCHO + HO2 + HO # 1.0/<COOH_SAPRC99>;
+<LPR9> ROOH + HO = RCHO + 0.34*RO2_R + 0.66*HO # 1.10e-11;
+<LPRA> ROOH = RCHO + HO2 + HO # 1.0/<COOH_SAPRC99>;
+<GLHV> GLY = 2*CO + 2*HO2 # 1.0/<GLY_R_SAPRC99>;
+<GLVM> GLY = HCHO + CO # 6.00e-3/<GLY_ABS_SAPRC99>;
+<GLOH> GLY + HO = 0.63*HO2 + 1.26*CO + 0.37*RCO_O2 # 1.10e-11;
+<GLN3> GLY + NO3 = HNO3 + 0.63*HO2 + 1.26*CO + 0.37*RCO_O2 # 2.80e-12@2376;
+<MGHV> MGLY = HO2 + CO + CCO_O2 # 1.0/<MGLY_ADJ_SAPRC99>;
+<MGOH> MGLY + HO = CO + CCO_O2 # 1.50e-11;
+<MGN3> MGLY + NO3 = HNO3 + CO + CCO_O2 # 1.40e-12@1895;
+<BAHV> BACL = 2*CCO_O2 # 1.0/<BACL_ADJ_SAPRC99>;
+<PHOH> PHEN + HO = 0.24*BZ_O + 0.76*RO2_R + 0.23*GLY # 2.63e-11;
+<PHN3> PHEN + NO3 = HNO3 + BZ_O # 3.78e-12;
+<CROH> CRES + HO = 0.24*BZ_O + 0.76*RO2_R + 0.23*MGLY # 4.20e-11;
+<CRN3> CRES + NO3 = HNO3 + BZ_O # 1.37e-11;
+<NPN3> NPHE + NO3 = HNO3 + BZNO2_O # 1.0*K<PHN3>;
+<BZOH> BALD + HO = BZCO_O2 # 1.29e-11;
+<BZHV> BALD =  # 5.00e-2/<BZCHO_SAPRC99>;
+<BZNT> BALD + NO3 = HNO3 + BZCO_O2 # 1.40e-12@1872;
+<MAOH> METHACRO + HO = 0.5*RO2_R + 0.416*CO + 0.084*HCHO + 0.416*MEK +
+         0.084*MGLY + 0.5*MA_RCO3 # 1.86e-11@-176;
+<MAO3> METHACRO + O3 = 0.008*HO2 + 0.1*RO2_R + 0.208*HO + 0.1*RCO_O2 + 0.45*CO +
+         0.2*HCHO + 0.9*MGLY + 0.333*HCOOH # 1.36e-15@2114;
+<MAN3> METHACRO + NO3 = 0.5*HNO3 + 0.5*RO2_R + 0.5*CO + 0.5*MA_RCO3
+        # 1.50e-12@1726;
+<MAOP> METHACRO + O3P = RCHO # 6.34e-12;
+<MAHV> METHACRO = 0.34*HO2 + 0.33*RO2_R + 0.33*HO + 0.67*CCO_O2 + 0.67*CO +
+         0.67*HCHO + 0.33*MA_RCO3 # 4.10e-3/<ACROLEIN_SAPRC99>;
+<MVOH> MVK + HO = 0.3*RO2_R + 0.025*RO2_N + 0.675*R2O2 + 0.675*CCO_O2 +
+         0.3*HCHO + 0.675*RCHO + 0.3*MGLY # 4.14e-12@-453;
+<MVO3> MVK + O3 = 0.064*HO2 + 0.05*RO2_R + 0.164*HO + 0.05*RCO_O2 + 0.475*CO +
+         0.1*HCHO + 0.95*MGLY + 0.351*HCOOH # 7.51e-16@1520;
+<MVOP> MVK + O3P = 0.45*RCHO + 0.55*MEK # 4.32e-12;
+<MVHV> MVK = 0.3*C_O2 + 0.7*CO + 0.7*PROD2 + 0.3*MA_RCO3
+             # 2.10e-3/<ACROLEIN_SAPRC99>;
+<IPOH> ISOPROD + HO = 0.67*RO2_R + 0.041*RO2_N + 0.289*MA_RCO3 + 0.336*CO +
+         0.055*HCHO + 0.129*CCHO + 0.013*RCHO + 0.15*MEK + 0.332*PROD2 +
+         0.15*GLY + 0.174*MGLY # 6.19e-11;
+<IPO3> ISOPROD + O3 = 0.4*HO2 + 0.048*RO2_R + 0.048*RCO_O2 + 0.285*HO +
+         0.498*CO + 0.125*HCHO + 0.047*CCHO + 0.21*MEK + 0.023*GLY +
+         0.742*MGLY + 0.1*HCOOH + 0.372*RCO_OH # 4.18e-18;
+<IPN3> ISOPROD + NO3 = 0.799*RO2_R + 0.051*RO2_N + 0.15*MA_RCO3 + 0.572*CO +
+         0.15*HNO3 + 0.227*HCHO + 0.218*RCHO + 0.008*MGLY + 0.572*RNO3
+        # 1.00e-13;
+<IPHV> ISOPROD = 1.233*HO2 + 0.467*CCO_O2 + 0.3*RCO_O2 + 1.233*CO + 0.3*HCHO +
+         0.467*CCHO + 0.233*MEK # 4.10e-3/<ACROLEIN_SAPRC99>;
+<K6OH> PROD2 + HO = 0.379*HO2 + 0.473*RO2_R + 0.07*RO2_N + 0.029*CCO_O2 +
+         0.049*RCO_O2 + 0.213*HCHO + 0.084*CCHO + 0.558*RCHO + 0.115*MEK +
+         0.329*PROD2 # 1.50e-11;
+<K6HV> PROD2 = 0.96*RO2_R + 0.04*RO2_N + 0.515*R2O2 + 0.667*CCO_O2 +
+         0.333*RCO_O2 + 0.506*HCHO + 0.246*CCHO + 0.71*RCHO 
+         # 2.00e-2/<KETONE_SAPRC99>;
+<RNOH> RNO3 + HO = 0.338*NO2 + 0.113*HO2 + 0.376*RO2_R + 0.173*RO2_N +
+         0.596*R2O2 + 0.01*HCHO + 0.439*CCHO + 0.213*RCHO + 0.006*ACET +
+         0.177*MEK + 0.048*PROD2 + 0.31*RNO3 # 7.80e-12;
+<RNHV> RNO3 = NO2 + 0.341*HO2 + 0.564*RO2_R + 0.095*RO2_N + 0.152*R2O2 +
+         0.134*HCHO + 0.431*CCHO + 0.147*RCHO + 0.02*ACET + 0.243*MEK +
+         0.435*PROD2 # 1.0/<IC3ONO2_SAPRC99>;
+<D1OH> DCB1 + HO = RCHO + RO2_R + CO # 5.00e-11;
+<D1O3> DCB1 + O3 = 1.5*HO2 + 0.5*HO + 1.5*CO + GLY # 2.00e-18;
+<D2OH> DCB2 + HO = R2O2 + RCHO + CCO_O2 # 5.00e-11;
+<D2HV> DCB2 = RO2_R + 0.5*CCO_O2 + 0.5*HO2 + CO + R2O2 + 0.5*GLY + 0.5*MGLY
+        # 3.65e-1/<MGLY_ABS_SAPRC99>;
+<D3OH> DCB3 + HO = R2O2 + RCHO + CCO_O2 # 5.00e-11;
+<D3HV> DCB3 = RO2_R + 0.5*CCO_O2 + 0.5*HO2 + CO + R2O2 + 0.5*GLY + 0.5*MGLY
+        # 7.28e+0/<ACROLEIN_SAPRC99>;
+<c1OH> CH4 + HO = C_O2 # 2.15e-12@1735;
+<etOH> ETHENE + HO = RO2_R + 1.61*HCHO + 0.195*CCHO # 1.96e-12@-438;
+<etO3> ETHENE + O3 = 0.12*HO + 0.12*HO2 + 0.5*CO + HCHO + 0.37*HCOOH
+        # 9.14e-15@2580;
+<etN3> ETHENE + NO3 = RO2_R + RCHO # 4.39e-13^2.00@2282;
+<etOA> ETHENE + O3P = 0.5*HO2 + 0.2*RO2_R + 0.3*C_O2 + 0.491*CO + 0.191*HCHO +
+         0.25*CCHO + 0.009*GLY # 1.04e-11@792;
+<isOH> ISOPRENE + HO = 0.907*RO2_R + 0.093*RO2_N + 0.079*R2O2 + 0.624*HCHO +
+         0.23*METHACRO + 0.32*MVK + 0.357*ISOPROD # 2.50e-11@-408;
+<isO3> ISOPRENE + O3 = 0.266*HO + 0.066*RO2_R + 0.008*RO2_N + 0.126*R2O2 +
+         0.192*MA_RCO3 + 0.275*CO + 0.592*HCHO + 0.1*PROD2 + 0.39*METHACRO +
+         0.16*MVK + 0.204*HCOOH + 0.15*RCO_OH # 7.86e-15@1912;
+<isN3> ISOPRENE + NO3 = 0.187*NO2 + 0.749*RO2_R + 0.064*RO2_N + 0.187*R2O2 +
+         0.936*ISOPROD # 3.03e-12@448;
+<isOP> ISOPRENE + O3P = 0.01*RO2_N + 0.24*R2O2 + 0.25*C_O2 + 0.24*MA_RCO3 +
+         0.24*HCHO + 0.75*PROD2 # 3.60e-11;
+<t1OH> TRP1 + HO = 0.75*RO2_R + 0.25*RO2_N + 0.5*R2O2 + 0.276*HCHO +
+         0.474*RCHO + 0.276*PROD2 # 1.83e-11@-449;
+<t1O3> TRP1 + O3 = 0.567*HO + 0.033*HO2 + 0.031*RO2_R + 0.18*RO2_N +
+         0.729*R2O2 + 0.123*CCO_O2 + 0.201*RCO_O2 + 0.157*CO + 0.235*HCHO +
+         0.205*RCHO + 0.13*ACET + 0.276*PROD2 + 0.001*GLY + 0.031*BACL +
+         0.103*HCOOH + 0.189*RCO_OH # 1.08e-15@821;
+<t1N3> TRP1 + NO3 = 0.474*NO2 + 0.276*RO2_R + 0.25*RO2_N + 0.75*R2O2 +
+         0.474*RCHO + 0.276*RNO3 # 3.66e-12@-175;
+<t1OP> TRP1 + O3P = 0.147*RCHO + 0.853*PROD2 # 3.27e-11;
+<a1OH> ALK1 + HO = RO2_R + CCHO # 1.37e-12^2.00@498;
+<a2OH> ALK2 + HO = 0.246*HO + 0.121*HO2 + 0.612*RO2_R + 0.021*RO2_N + 0.16*CO +
+         0.039*HCHO + 0.155*RCHO + 0.417*ACET + 0.248*GLY + 0.121*HCOOH
+        # 9.87e-12@671;
+<a3OH> ALK3 + HO = 0.695*RO2_R + 0.07*RO2_N + 0.559*R2O2 + 0.236*TBU_O +
+         0.026*HCHO + 0.445*CCHO + 0.122*RCHO + 0.024*ACET + 0.332*MEK
+        # 1.02e-11@434;
+<a4OH> ALK4 + HO = 0.835*RO2_R + 0.143*RO2_N + 0.936*R2O2 + 0.011*C_O2 +
+         0.011*CCO_O2 + 0.002*CO + 0.024*HCHO + 0.455*CCHO + 0.244*RCHO +
+         0.452*ACET + 0.11*MEK + 0.125*PROD2 # 5.95e-12@91;
+<a5OH> ALK5 + HO = 0.653*RO2_R + 0.347*RO2_N + 0.948*R2O2 + 0.026*HCHO +
+         0.099*CCHO + 0.204*RCHO + 0.072*ACET + 0.089*MEK + 0.417*PROD2
+        # 1.11e-11@52;
+<b1OH> ARO1 + HO = 0.224*HO2 + 0.765*RO2_R + 0.011*RO2_N + 0.055*PROD2 +
+         0.118*GLY + 0.119*MGLY + 0.017*PHEN + 0.207*CRES + 0.059*BALD +
+         0.491*DCB1 + 0.108*DCB2 + 0.051*DCB3 # 1.81e-12@-355;
+<b2OH> ARO2 + HO = 0.187*HO2 + 0.804*RO2_R + 0.009*RO2_N + 0.097*GLY +
+         0.287*MGLY + 0.087*BACL + 0.187*CRES + 0.05*BALD + 0.561*DCB1 +
+         0.099*DCB2 + 0.093*DCB3 # 2.64e-11;
+<o1OH> OLE1 + HO = 0.91*RO2_R + 0.09*RO2_N + 0.205*R2O2 + 0.732*HCHO +
+         0.294*CCHO + 0.497*RCHO + 0.005*ACET + 0.119*PROD2 # 7.10e-12@-451;
+<o1O3> OLE1 + O3 = 0.155*HO + 0.056*HO2 + 0.022*RO2_R + 0.001*RO2_N +
+         0.076*C_O2 + 0.345*CO + 0.5*HCHO + 0.154*CCHO + 0.363*RCHO +
+         0.001*ACET + 0.215*PROD2 + 0.185*HCOOH + 0.05*CCO_OH + 0.119*RCO_OH
+        # 2.62e-15@1640;
+<o1N3> OLE1 + NO3 = 0.824*RO2_R + 0.176*RO2_N + 0.488*R2O2 + 0.009*CCHO +
+         0.037*RCHO + 0.024*ACET + 0.511*RNO3 # 4.45e-14@376;
+<o1OP> OLE1 + O3P = 0.45*RCHO + 0.437*MEK + 0.113*PROD2 # 1.07e-11@234;
+<o2OH> OLE2 + HO = 0.918*RO2_R + 0.082*RO2_N + 0.001*R2O2 + 0.244*HCHO +
+         0.732*CCHO + 0.511*RCHO + 0.127*ACET + 0.072*MEK + 0.061*BALD +
+         0.025*METHACRO + 0.025*ISOPROD # 1.74e-11@-384;
+<o2O3> OLE2 + O3 = 0.378*HO + 0.003*HO2 + 0.033*RO2_R + 0.002*RO2_N +
+         0.137*R2O2 + 0.197*C_O2 + 0.137*CCO_O2 + 0.006*RCO_O2 + 0.265*CO +
+         0.269*HCHO + 0.456*CCHO + 0.305*RCHO + 0.045*ACET + 0.026*MEK +
+         0.006*PROD2 + 0.042*BALD + 0.026*METHACRO + 0.073*HCOOH +
+         0.129*CCO_OH + 0.303*RCO_OH # 5.02e-16@461;
+<o2N3> OLE2 + NO3 = 0.391*NO2 + 0.442*RO2_R + 0.136*RO2_N + 0.711*R2O2 +
+         0.03*C_O2 + 0.079*HCHO + 0.507*CCHO + 0.151*RCHO + 0.102*ACET +
+         0.001*MEK + 0.015*BALD + 0.048*MVK + 0.321*RNO3 # 7.26e-13;
+<o2OP> OLE2 + O3P = 0.013*HO2 + 0.012*RO2_R + 0.001*RO2_N + 0.012*CO +
+         0.069*RCHO + 0.659*MEK + 0.259*PROD2 + 0.012*METHACRO # 2.09e-11;
+<c1OH> HCOOH + HO = HO2 # 4.5E-13;
+<c2OH> CCO_OH + HO = 0.13*RO2_R + 0.87*C_O2 + 0.13*MGLY # 8.00E-13;
+<c3OH> RCO_OH + HO = RO2_R + 0.605*CCHO + 0.21*RCHO + 0.185*BACL # 1.16E-12;
+endmech
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.def	(revision 3477)
@@ -0,0 +1,116 @@
+#include texas.spc
+#include texas.eqn
+
+{#LANGUAGE Fortran77
+#INTEGRATOR rodas3
+#DRIVER matlab
+#HESSIAN ON}
+
+#LOOKATALL
+
+#MONITOR O3; NO; NO2; ETHENE;
+
+#INITVALUES
+
+	CFACTOR = 1.    ;              {Conversion Factor}
+        NO2             = 46.0;       
+        NO              = 30.0;       
+        O3P             = 16.0;       
+        O3              = 48.0;       
+        NO3             = 62.0;       
+        N2O5            = 108.0;       
+        HNO3            = 63.0;       
+        O1D2            = 16.0;       
+        HO              = 17.0;       
+        HONO            = 47.0;       
+        HO2             = 33.0;       
+        CO              = 28.0;       
+        HNO4            = 79.0;       
+        HO2H            = 34.0;       
+        SO2             = 64.0;       
+        SULF            = 98.0;       
+        C_O2            = 47.0;       
+        HCHO            = 30.0;       
+        COOH            = 48.0;       
+        MEOH            = 32.0;       
+        RO2_R           = 1.0;       
+        ROOH            = 62.0;       
+        R2O2            = 1.0;       
+        RO2_N           = 1.0;       
+        RNO3            = 133.0;       
+        MEK             = 72.0;       
+        PROD2           = 100.0;       
+        CCO_O2          = 75.0;       
+        PAN             = 121.0;       
+        CCO_OOH         = 76.0;       
+        CCO_OH          = 60.0;       
+        RCO_O2          = 89.0;       
+        PAN2            = 135.0;       
+        CCHO            = 44.0;       
+        RCO_OOH         = 90.0;       
+        RCO_OH          = 74.0;       
+        BZCO_O2         = 137.0;       
+        PBZN            = 183.0;       
+        BZ_O            = 93.0;       
+        MA_RCO3         = 101.0;       
+        MA_PAN          = 147.0;       
+        TBU_O           = 73.0;       
+        ACET            = 58.0;       
+        NPHE            = 139.0;       
+        PHEN            = 94.0;       
+        BZNO2_O         = 139.0;       
+        HOCOO           = 63.0;       
+        HCOOH           = 46.0;       
+        RCHO            = 58.0;       
+        GLY             = 58.0;       
+        MGLY            = 72.0;       
+        BACL            = 86.0;       
+        CRES            = 108.0;       
+        BALD            = 106.0;       
+        METHACRO        = 70.0;       
+        MVK             = 70.0;       
+        ISOPROD         = 70.0;       
+        DCB1            = 58.0;       
+        DCB2            = 72.0;       
+        DCB3            = 72.0;       
+        ETHENE          = 28.0;       
+        ISOPRENE        = 68.0;       
+        TRP1            = 136.0;       
+        ALK1            = 30.1;       
+        ALK2            = 36.7;       
+        ALK3            = 58.6;       
+        ALK4            = 77.6;       
+        ALK5            = 118.9;       
+        ARO1            = 98.6;       
+        ARO2            = 118.7;       
+        OLE1            = 72.3;       
+        OLE2            = 75.8;       
+
+#INLINE F77_INIT
+        TSTART = 12.0D0*3600.0D0
+        TEND   = TSTART + 120.0D0*3600.0D0
+        DT     = 3600.D0
+        TEMP   = 300.0D0
+#ENDINLINE   
+   
+#INLINE F90_INIT
+        TSTART = 12.0d0*3600.0d0
+        TEND   = TSTART + 120.0d0*3600.0d0
+        DT     = 3600.d0
+        TEMP   = 300.0d0
+#ENDINLINE   
+     
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 12*3600;
+   TEND   = TSTART + 120*3600;
+   DT     = 3600;
+   TEMP   = 300;
+#ENDINLINE   
+     
+#INLINE C_INIT
+   TSTART = 12.0*3600.0;
+   TEND   = TSTART + 120.0*3600.0;
+   DT     = 3600.0;
+   TEMP   = 300.0;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.eqn	(revision 3477)
@@ -0,0 +1,285 @@
+{ SAPRC-99 Fixed Parameter Mechanism }
+{ Created from BASEMECH.XLS 21-Jul-2004 10:31 }
+{  Base mechanism only.  Reactions of TERP, ALKn, AROn, OLEn removed. }
+{ SAPRC99 }
+
+#EQUATIONS
+{1} NO2 = NO + O3P : 1.0;
+{2} O3P + O2 + M = O3 : 5.68e-34;
+{3} O3P + O3 = PROD : 8.00e-12;
+{4} O3P + NO + M = NO2 : 1.00e-31;
+{5} O3P + NO2 = NO : 6.50e-12;
+{6} O3P + NO2 = NO3 : 9.00e-32;
+{8} O3 + NO = NO2 : 1.80e-12;
+{9} O3 + NO2 = NO3 : 1.40e-13;
+{10} NO + NO3 = 2NO2 : 1.80e-11;
+{11} NO + NO + O2 = 2NO2 : 3.30e-39;
+{12} NO2 + NO3 = N2O5 : 2.80e-30;
+{13} N2O5 = NO2 + NO3 : 1.00e-03;
+{14} N2O5 + H2O = 2HNO3 : 2.60e-22;
+{17} NO2 + NO3 = NO + NO2 : 4.50e-14;
+{18} NO3 = NO : 1.0;
+{19} NO3 = NO2 + O3P : 1.0;
+{20} O3 = O3P : 1.0;
+{21} O3 = O1D2 : 1.0;
+{22} O1D2 + H2O = 2HO : 2.20e-10;
+{23} O1D2 + M = O3P : 2.09e-11;
+{24} HO + NO = HONO : 7.00e-31;
+{25} HONO = HO + NO : 1.0;
+{26} HONO = HO2 + NO2 : 1.0;
+{27} HO + HONO = NO2 : 2.70e-12;
+{28} HO + NO2 = HNO3 : 2.43e-30;
+{29} HO + NO3 = HO2 + NO2 : 2.00e-11;
+{30} HO + HNO3 = NO3 : 7.20e-15;
+{31} HNO3 = HO + NO2 : 1.0;
+{32} HO + CO = HO2 : 1.30e-13;
+{33} HO + O3 = HO2 : 1.90e-12;
+{34} HO2 + NO = HO + NO2 : 3.40e-12;
+{35} HO2 + NO2 = HNO4 : 1.80e-31;
+{36} HNO4 = HO2 + NO2 : 4.10e-05;
+{37} HNO4 = 0.61HO2 + 0.61NO2 + 0.39HO + 0.39NO3 : 1.0;
+{38} HNO4 + HO = NO2 : 1.50e-12;
+{39} HO2 + O3 = HO : 1.40e-14;
+{40A} HO2 + HO2 = HO2H : 2.20e-13;
+{40B} HO2 + HO2 + H2O = HO2H : 3.08e-34;
+{41} NO3 + HO2 = 0.8HO + 0.8NO2 + 0.2HNO3 : 4.00e-12;
+{42} NO3 + NO3 = 2NO2 : 8.50e-13;
+{43} HO2H = 2HO : 1.0;
+{44} HO2H + HO = HO2 : 2.90e-12;
+{45} HO + HO2 =  PROD: 4.80e-11;
+{S2OH} HO + SO2 = HO2 + SULF : 4.00e-31;
+{H2OH} HO + H2 = HO2 : 7.70e-12;
+{MER1} C_O2 + NO = NO2 + HCHO + HO2 : 2.80e-12;
+{MER4} C_O2 + HO2 = COOH : 3.80e-13;
+{MEN3} C_O2 + NO3 = HCHO + HO2 + NO2 : 1.30e-12;
+{MER5} C_O2 + C_O2 = MEOH + HCHO : 2.45e-14;
+{MER6} C_O2 + C_O2 = 2HCHO + 2HO2 : 5.90e-13;
+{RRNO} RO2_R + NO = NO2 + HO2 : 2.70e-12;
+{RRH2} RO2_R + HO2 = ROOH : 1.90e-13;
+{RRN3} RO2_R + NO3 = NO2 + HO2 : 2.30e-12;
+{RRME} RO2_R + C_O2 = HO2 + 0.75HCHO + 0.25MEOH : 2.00e-13;
+{RRR2} RO2_R + RO2_R = HO2 : 3.50e-14;
+{R2NO} R2O2 + NO = NO2 : 1.0;
+{R2H2} R2O2 + HO2 = HO2 : 1.0;
+{R2N3} R2O2 + NO3 = NO2 : 1.0;
+{R2ME} R2O2 + C_O2 = C_O2 : 1.0;
+{R2RR} R2O2 + RO2_R = RO2_R : 1.0;
+{R2R3} R2O2 + R2O2 = PROD : 1.0;
+{RNNO} RO2_N + NO = RNO3 : 1.0;
+{RNH2} RO2_N + HO2 = ROOH : 1.0;
+{RNME} RO2_N + C_O2 = HO2 + 0.25MEOH + 0.5MEK + 0.5PROD2 + 0.75HCHO
+        : 1.0;
+{RNN3} RO2_N + NO3 = NO2 + HO2 + MEK : 1.0;
+{RNRR} RO2_N + RO2_R = HO2 + 0.5MEK + 0.5PROD2 : 1.0;
+{RNR2} RO2_N + R2O2 = RO2_N : 1.0;
+{RNRN} RO2_N + RO2_N = MEK + HO2 + PROD2 : 1.0;
+{APN2} CCO_O2 + NO2 = PAN : 2.70e-28;
+{DPAN} PAN = CCO_O2 + NO2 : 4.90e-03;
+{APNO} CCO_O2 + NO = C_O2 + NO2 : 7.80e-12;
+{APH2} CCO_O2 + HO2 = 0.75CCO_OOH + 0.25CCO_OH + 0.25O3 : 4.30e-13;
+{APN3} CCO_O2 + NO3 = C_O2 + NO2 : 4.00e-12;
+{APME} CCO_O2 + C_O2 = CCO_OH + HCHO : 1.80e-12;
+{APRR} CCO_O2 + RO2_R = CCO_OH : 7.50e-12;
+{APR2} CCO_O2 + R2O2 = CCO_O2 : 1.0;
+{APRN} CCO_O2 + RO2_N = CCO_OH + PROD2 : 1.0;
+{APAP} CCO_O2 + CCO_O2 = 2C_O2 : 2.90e-12;
+{PPN2} RCO_O2 + NO2 = PAN2 : 1.20e-11;
+{PAN2} PAN2 = RCO_O2 + NO2 : 2.00e+15;
+{PPNO} RCO_O2 + NO = NO2 + CCHO + RO2_R : 1.25e-11;
+{PPH2} RCO_O2 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : 1.0;
+{PPN3} RCO_O2 + NO3 = NO2 + CCHO + RO2_R : 1.0;
+{PPME} RCO_O2 + C_O2 = RCO_OH + HCHO : 1.0;
+{PPRR} RCO_O2 + RO2_R = RCO_OH : 1.0;
+{PPR2} RCO_O2 + R2O2 = RCO_O2 : 1.0;
+{PPRN} RCO_O2 + RO2_N = RCO_OH + PROD2 : 1.0;
+{PPAP} RCO_O2 + CCO_O2 = C_O2 + CCHO + RO2_R : 1.0;
+{PPPP} RCO_O2 + RCO_O2 = 2CCHO + 2RO2_R : 1.0;
+{BPN2} BZCO_O2 + NO2 = PBZN : 1.37e-11;
+{BPAN} PBZN = BZCO_O2 + NO2 : 7.90e+16;
+{BPNO} BZCO_O2 + NO = NO2 + BZ_O + R2O2 : 1.0;
+{BPH2} BZCO_O2 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : 1.0;
+{BPN3} BZCO_O2 + NO3 = NO2 + BZ_O + R2O2 : 1.0;
+{BPME} BZCO_O2 + C_O2 = RCO_OH + HCHO : 1.0;
+{BPRR} BZCO_O2 + RO2_R = RCO_OH : 1.0;
+{BPR2} BZCO_O2 + R2O2 = BZCO_O2 : 1.0;
+{BPRN} BZCO_O2 + RO2_N = RCO_OH + PROD2 : 1.0;
+{BPAP} BZCO_O2 + CCO_O2 = C_O2 + BZ_O + R2O2 : 1.0;
+{BPPP} BZCO_O2 + RCO_O2 = CCHO + RO2_R + BZ_O + R2O2 : 1.0;
+{BPBP} BZCO_O2 + BZCO_O2 = 2BZ_O + 2R2O2 : 1.0;
+{MPN2} MA_RCO3 + NO2 = MA_PAN : 1.0;
+{MPPN} MA_PAN = MA_RCO3 + NO2 : 1.60e+16;
+{MPNO} MA_RCO3 + NO = NO2 + HCHO + CCO_O2 : 1.0;
+{MPH2} MA_RCO3 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : 1.0;
+{MPN3} MA_RCO3 + NO3 = NO2 + HCHO + CCO_O2 : 1.0;
+{MPME} MA_RCO3 + C_O2 = RCO_OH + HCHO : 1.0;
+{MPRR} MA_RCO3 + RO2_R = RCO_OH : 1.0;
+{MPR2} MA_RCO3 + R2O2 = MA_RCO3 : 1.0;
+{MPRN} MA_RCO3 + RO2_N = 2RCO_OH : 1.0;
+{MPAP} MA_RCO3 + CCO_O2 = C_O2 + HCHO + CCO_O2 : 1.0;
+{MPPP} MA_RCO3 + RCO_O2 = HCHO + CCO_O2 + CCHO + RO2_R : 1.0;
+{MPBP} MA_RCO3 + BZCO_O2 = HCHO + CCO_O2 + BZ_O + R2O2 : 1.0;
+{MPMP} MA_RCO3 + MA_RCO3 = 2HCHO + 2CCO_O2 : 1.0;
+{TBON} TBU_O + NO2 = RNO3 : 2.40e-11;
+{TBOD} TBU_O = ACET + C_O2 : 7.50e+14;
+{BRN2} BZ_O + NO2 = NPHE : 2.30e-11;
+{BRH2} BZ_O + HO2 = PHEN : 1.0;
+{BRXX} BZ_O = PHEN : 1.00e-03;
+{BNN2} BZNO2_O + NO2 = PROD : 1.0;
+{BNH2} BZNO2_O + HO2 = NPHE : 1.0;
+{BNXX} BZNO2_O = NPHE : 1.0;
+{FAHV} HCHO = 2HO2 + CO : 1.0;
+{FAVS} HCHO = CO : 1.0;
+{FAOH} HCHO + HO = HO2 + CO : 8.60e-12;
+{FAH2} HCHO + HO2 = HOCOO : 9.70e-15;
+{FAHR} HOCOO = HO2 + HCHO : 2.40e+12;
+{FAHN} HOCOO + NO = HCOOH + NO2 + HO2 : 1.0;
+{FAN3} HCHO + NO3 = HNO3 + HO2 + CO : 2.00e-12;
+{AAOH} CCHO + HO = CCO_O2 : 5.60e-12;
+{AAHV} CCHO = CO + HO2 + C_O2 : 1.0;
+{AAN3} CCHO + NO3 = HNO3 + CCO_O2 : 1.40e-12;
+{PAOH} RCHO + HO = 0.034RO2_R + 0.001RO2_N + 0.965RCO_O2 + 0.034CO +
+         0.034CCHO : 2.00e-11;
+{PAHV} RCHO = CCHO + RO2_R + CO + HO2 : 1.0;
+{PAN3} RCHO + NO3 = HNO3 + RCO_O2 : 1.40e-12;
+{K3OH} ACET + HO = HCHO + CCO_O2 + R2O2 : 1.10e-12;
+{K3HV} ACET = CCO_O2 + C_O2 : 1.0;
+{K4OH} MEK + HO = 0.37RO2_R + 0.042RO2_N + 0.616R2O2 + 0.492CCO_O2 +
+         0.096RCO_O2 + 0.115HCHO + 0.482CCHO + 0.37RCHO : 1.30e-12;
+{K4HV} MEK = CCO_O2 + CCHO + RO2_R : 1.50e-1;
+{MeOH} MEOH + HO = HCHO + HO2 : 3.10e-12;
+{MER9} COOH + HO = 0.35HCHO + 0.35HO + 0.65C_O2 : 2.90e-12;
+{MERA} COOH = HCHO + HO2 + HO : 1.0;
+{LPR9} ROOH + HO = RCHO + 0.34RO2_R + 0.66HO : 1.10e-11;
+{LPRA} ROOH = RCHO + HO2 + HO : 1.0;
+{GLHV} GLY = 2CO + 2HO2 : 1.0;
+{GLVM} GLY = HCHO + CO : 6.00e-3;
+{GLOH} GLY + HO = 0.63HO2 + 1.26CO + 0.37RCO_O2 : 1.10e-11;
+{GLN3} GLY + NO3 = HNO3 + 0.63HO2 + 1.26CO + 0.37RCO_O2 : 2.80e-12;
+{MGHV} MGLY = HO2 + CO + CCO_O2 : 1.0;
+{MGOH} MGLY + HO = CO + CCO_O2 : 1.50e-11;
+{MGN3} MGLY + NO3 = HNO3 + CO + CCO_O2 : 1.40e-12;
+{BAHV} BACL = 2CCO_O2 : 1.0;
+{PHOH} PHEN + HO = 0.24BZ_O + 0.76RO2_R + 0.23GLY : 2.63e-11;
+{PHN3} PHEN + NO3 = HNO3 + BZ_O : 3.78e-12;
+{CROH} CRES + HO = 0.24BZ_O + 0.76RO2_R + 0.23MGLY : 4.20e-11;
+{CRN3} CRES + NO3 = HNO3 + BZ_O : 1.37e-11;
+{NPN3} NPHE + NO3 = HNO3 + BZNO2_O : 1.0;
+{BZOH} BALD + HO = BZCO_O2 : 1.29e-11;
+{BZHV} BALD = PROD : 5.00e-2;
+{BZNT} BALD + NO3 = HNO3 + BZCO_O2 : 1.40e-12;
+{MAOH} METHACRO + HO = 0.5RO2_R + 0.416CO + 0.084HCHO + 0.416MEK +
+         0.084MGLY + 0.5MA_RCO3 : 1.86e-11;
+{MAO3} METHACRO + O3 = 0.008HO2 + 0.1RO2_R + 0.208HO + 0.1RCO_O2 + 0.45CO +
+         0.2HCHO + 0.9MGLY + 0.333HCOOH : 1.36e-15;
+{MAN3} METHACRO + NO3 = 0.5HNO3 + 0.5RO2_R + 0.5CO + 0.5MA_RCO3
+        : 1.50e-12;
+{MAOP} METHACRO + O3P = RCHO : 6.34e-12;
+{MAHV} METHACRO = 0.34HO2 + 0.33RO2_R + 0.33HO + 0.67CCO_O2 + 0.67CO +
+         0.67HCHO + 0.33MA_RCO3 : 4.10e-3;
+{MVOH} MVK + HO = 0.3RO2_R + 0.025RO2_N + 0.675R2O2 + 0.675CCO_O2 +
+         0.3HCHO + 0.675RCHO + 0.3MGLY : 4.14e-12;
+{MVO3} MVK + O3 = 0.064HO2 + 0.05RO2_R + 0.164HO + 0.05RCO_O2 + 0.475CO +
+         0.1HCHO + 0.95MGLY + 0.351HCOOH : 7.51e-16;
+{MVOP} MVK + O3P = 0.45RCHO + 0.55MEK : 4.32e-12;
+{MVHV} MVK = 0.3C_O2 + 0.7CO + 0.7PROD2 + 0.3MA_RCO3
+             : 2.10e-3;
+{IPOH} ISOPROD + HO = 0.67RO2_R + 0.041RO2_N + 0.289MA_RCO3 + 0.336CO +
+         0.055HCHO + 0.129CCHO + 0.013RCHO + 0.15MEK + 0.332PROD2 +
+         0.15GLY + 0.174MGLY : 6.19e-11;
+{IPO3} ISOPROD + O3 = 0.4HO2 + 0.048RO2_R + 0.048RCO_O2 + 0.285HO +
+         0.498CO + 0.125HCHO + 0.047CCHO + 0.21MEK + 0.023GLY +
+         0.742MGLY + 0.1HCOOH + 0.372RCO_OH : 4.18e-18;
+{IPN3} ISOPROD + NO3 = 0.799RO2_R + 0.051RO2_N + 0.15MA_RCO3 + 0.572CO +
+         0.15HNO3 + 0.227HCHO + 0.218RCHO + 0.008MGLY + 0.572RNO3
+        : 1.00e-13;
+{IPHV} ISOPROD = 1.233HO2 + 0.467CCO_O2 + 0.3RCO_O2 + 1.233CO + 0.3HCHO +
+         0.467CCHO + 0.233MEK : 4.10e-3;
+{K6OH} PROD2 + HO = 0.379HO2 + 0.473RO2_R + 0.07RO2_N + 0.029CCO_O2 +
+         0.049RCO_O2 + 0.213HCHO + 0.084CCHO + 0.558RCHO + 0.115MEK +
+         0.329PROD2 : 1.50e-11;
+{K6HV} PROD2 = 0.96RO2_R + 0.04RO2_N + 0.515R2O2 + 0.667CCO_O2 +
+         0.333RCO_O2 + 0.506HCHO + 0.246CCHO + 0.71RCHO 
+         : 2.00e-2;
+{RNOH} RNO3 + HO = 0.338NO2 + 0.113HO2 + 0.376RO2_R + 0.173RO2_N +
+         0.596R2O2 + 0.01HCHO + 0.439CCHO + 0.213RCHO + 0.006ACET +
+         0.177MEK + 0.048PROD2 + 0.31RNO3 : 7.80e-12;
+{RNHV} RNO3 = NO2 + 0.341HO2 + 0.564RO2_R + 0.095RO2_N + 0.152R2O2 +
+         0.134HCHO + 0.431CCHO + 0.147RCHO + 0.02ACET + 0.243MEK +
+         0.435PROD2 : 1.0;
+{D1OH} DCB1 + HO = RCHO + RO2_R + CO : 5.00e-11;
+{D1O3} DCB1 + O3 = 1.5HO2 + 0.5HO + 1.5CO + GLY : 2.00e-18;
+{D2OH} DCB2 + HO = R2O2 + RCHO + CCO_O2 : 5.00e-11;
+{D2HV} DCB2 = RO2_R + 0.5CCO_O2 + 0.5HO2 + CO + R2O2 + 0.5GLY + 0.5MGLY
+        : 3.65e-1;
+{D3OH} DCB3 + HO = R2O2 + RCHO + CCO_O2 : 5.00e-11;
+{D3HV} DCB3 = RO2_R + 0.5CCO_O2 + 0.5HO2 + CO + R2O2 + 0.5GLY + 0.5MGLY
+        : 7.28e+0;
+{c1OH} CH4 + HO = C_O2 : 2.15e-12;
+{etOH} ETHENE + HO = RO2_R + 1.61HCHO + 0.195CCHO : 1.96e-12;
+{etO3} ETHENE + O3 = 0.12HO + 0.12HO2 + 0.5CO + HCHO + 0.37HCOOH
+        : 9.14e-15;
+{etN3} ETHENE + NO3 = RO2_R + RCHO : 4.39e-13;
+{etOA} ETHENE + O3P = 0.5HO2 + 0.2RO2_R + 0.3C_O2 + 0.491CO + 0.191HCHO +
+         0.25CCHO + 0.009GLY : 1.04e-11;
+{isOH} ISOPRENE + HO = 0.907RO2_R + 0.093RO2_N + 0.079R2O2 + 0.624HCHO +
+         0.23METHACRO + 0.32MVK + 0.357ISOPROD : 2.50e-11;
+{isO3} ISOPRENE + O3 = 0.266HO + 0.066RO2_R + 0.008RO2_N + 0.126R2O2 +
+         0.192MA_RCO3 + 0.275CO + 0.592HCHO + 0.1PROD2 + 0.39METHACRO +
+         0.16MVK + 0.204HCOOH + 0.15RCO_OH : 7.86e-15;
+{isN3} ISOPRENE + NO3 = 0.187NO2 + 0.749RO2_R + 0.064RO2_N + 0.187R2O2 +
+         0.936ISOPROD : 3.03e-12;
+{isOP} ISOPRENE + O3P = 0.01RO2_N + 0.24R2O2 + 0.25C_O2 + 0.24MA_RCO3 +
+         0.24HCHO + 0.75PROD2 : 3.60e-11;
+{t1OH} TRP1 + HO = 0.75RO2_R + 0.25RO2_N + 0.5R2O2 + 0.276HCHO +
+         0.474RCHO + 0.276PROD2 : 1.83e-11;
+{t1O3} TRP1 + O3 = 0.567HO + 0.033HO2 + 0.031RO2_R + 0.18RO2_N +
+         0.729R2O2 + 0.123CCO_O2 + 0.201RCO_O2 + 0.157CO + 0.235HCHO +
+         0.205RCHO + 0.13ACET + 0.276PROD2 + 0.001GLY + 0.031BACL +
+         0.103HCOOH + 0.189RCO_OH : 1.08e-15;
+{t1N3} TRP1 + NO3 = 0.474NO2 + 0.276RO2_R + 0.25RO2_N + 0.75R2O2 +
+         0.474RCHO + 0.276RNO3 : 3.66e-12;
+{t1OP} TRP1 + O3P = 0.147RCHO + 0.853PROD2 : 3.27e-11;
+{a1OH} ALK1 + HO = RO2_R + CCHO : 1.37e-12;
+{a2OH} ALK2 + HO = 0.246HO + 0.121HO2 + 0.612RO2_R + 0.021RO2_N + 0.16CO +
+         0.039HCHO + 0.155RCHO + 0.417ACET + 0.248GLY + 0.121HCOOH
+        : 9.87e-12;
+{a3OH} ALK3 + HO = 0.695RO2_R + 0.07RO2_N + 0.559R2O2 + 0.236TBU_O +
+         0.026HCHO + 0.445CCHO + 0.122RCHO + 0.024ACET + 0.332MEK
+        : 1.02e-11;
+{a4OH} ALK4 + HO = 0.835RO2_R + 0.143RO2_N + 0.936R2O2 + 0.011C_O2 +
+         0.011CCO_O2 + 0.002CO + 0.024HCHO + 0.455CCHO + 0.244RCHO +
+         0.452ACET + 0.11MEK + 0.125PROD2 : 5.95e-12;
+{a5OH} ALK5 + HO = 0.653RO2_R + 0.347RO2_N + 0.948R2O2 + 0.026HCHO +
+         0.099CCHO + 0.204RCHO + 0.072ACET + 0.089MEK + 0.417PROD2
+        : 1.11e-11;
+{b1OH} ARO1 + HO = 0.224HO2 + 0.765RO2_R + 0.011RO2_N + 0.055PROD2 +
+         0.118GLY + 0.119MGLY + 0.017PHEN + 0.207CRES + 0.059BALD +
+         0.491DCB1 + 0.108DCB2 + 0.051DCB3 : 1.81e-12;
+{b2OH} ARO2 + HO = 0.187HO2 + 0.804RO2_R + 0.009RO2_N + 0.097GLY +
+         0.287MGLY + 0.087BACL + 0.187CRES + 0.05BALD + 0.561DCB1 +
+         0.099DCB2 + 0.093DCB3 : 2.64e-11;
+{o1OH} OLE1 + HO = 0.91RO2_R + 0.09RO2_N + 0.205R2O2 + 0.732HCHO +
+         0.294CCHO + 0.497RCHO + 0.005ACET + 0.119PROD2 : 7.10e-12;
+{o1O3} OLE1 + O3 = 0.155HO + 0.056HO2 + 0.022RO2_R + 0.001RO2_N +
+         0.076C_O2 + 0.345CO + 0.5HCHO + 0.154CCHO + 0.363RCHO +
+         0.001ACET + 0.215PROD2 + 0.185HCOOH + 0.05CCO_OH + 0.119RCO_OH
+        : 2.62e-15;
+{o1N3} OLE1 + NO3 = 0.824RO2_R + 0.176RO2_N + 0.488R2O2 + 0.009CCHO +
+         0.037RCHO + 0.024ACET + 0.511RNO3 : 4.45e-14;
+{o1OP} OLE1 + O3P = 0.45RCHO + 0.437MEK + 0.113PROD2 : 1.07e-11;
+{o2OH} OLE2 + HO = 0.918RO2_R + 0.082RO2_N + 0.001R2O2 + 0.244HCHO +
+         0.732CCHO + 0.511RCHO + 0.127ACET + 0.072MEK + 0.061BALD +
+         0.025METHACRO + 0.025ISOPROD : 1.74e-11;
+{o2O3} OLE2 + O3 = 0.378HO + 0.003HO2 + 0.033RO2_R + 0.002RO2_N +
+         0.137R2O2 + 0.197C_O2 + 0.137CCO_O2 + 0.006RCO_O2 + 0.265CO +
+         0.269HCHO + 0.456CCHO + 0.305RCHO + 0.045ACET + 0.026MEK +
+         0.006PROD2 + 0.042BALD + 0.026METHACRO + 0.073HCOOH +
+         0.129CCO_OH + 0.303RCO_OH : 5.02e-16;
+{o2N3} OLE2 + NO3 = 0.391NO2 + 0.442RO2_R + 0.136RO2_N + 0.711R2O2 +
+         0.03C_O2 + 0.079HCHO + 0.507CCHO + 0.151RCHO + 0.102ACET +
+         0.001MEK + 0.015BALD + 0.048MVK + 0.321RNO3 : 7.26e-13;
+{o2OP} OLE2 + O3P = 0.013HO2 + 0.012RO2_R + 0.001RO2_N + 0.012CO +
+         0.069RCHO + 0.659MEK + 0.259PROD2 + 0.012METHACRO : 2.09e-11;
+{c1OH} HCOOH + HO = HO2 : 4.5E-13;
+{c2OH} CCO_OH + HO = 0.13RO2_R + 0.87C_O2 + 0.13MGLY : 8.00E-13;
+{c3OH} RCO_OH + HO = RO2_R + 0.605CCHO + 0.21RCHO + 0.185BACL : 1.16E-12;
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq/texas.spc	(revision 3477)
@@ -0,0 +1,82 @@
+#include atoms
+
+#DEFVAR   
+	NO2             = N + 2O;
+	NO              = N + O;
+	O3P             = O;
+	O3              = 3O;
+	NO3             = N + 3O;
+	N2O5            = 2N + 5O;
+	HNO3            = H + N + 3O;
+	O1D2            = O;
+	HO              = H + O;
+	HONO            = H + 2O + N;
+	HO2             = H + 2O;
+	CO              = C + O;
+	HNO4            = H + 4O + N;
+	HO2H            = 2H + 2O;
+	SO2             = S + 2O;
+	SULF            = IGNORE;
+	C_O2            = IGNORE;
+	HCHO            = 2H + C + O;
+	COOH            = H + 2O + C;
+	MEOH            = IGNORE;
+	RO2_R           = IGNORE;
+	ROOH            = IGNORE;
+	R2O2            = IGNORE;
+	RO2_N           = IGNORE;
+	RNO3            = IGNORE;
+	MEK             = IGNORE;
+	PROD2           = IGNORE;
+	CCO_O2          = IGNORE;
+	PAN             = IGNORE;
+	CCO_OOH         = 2C + 3O + H;
+	CCO_OH          = 2O + 2C + H;
+	RCO_O2          = IGNORE;
+	PAN2            = IGNORE;
+	CCHO            = 2C + H + O;
+	RCO_OOH         = IGNORE;
+	RCO_OH          = IGNORE;
+	BZCO_O2         = IGNORE;
+	PBZN            = IGNORE;
+	BZ_O            = IGNORE;
+	MA_RCO3         = IGNORE;
+	MA_PAN          = IGNORE;
+	TBU_O           = IGNORE;
+	ACET            = IGNORE;
+	NPHE            = IGNORE;
+	PHEN            = IGNORE;
+	BZNO2_O         = IGNORE;
+	HOCOO           = IGNORE;
+	HCOOH           = IGNORE;
+	RCHO            = IGNORE;
+	GLY             = IGNORE;
+	MGLY            = IGNORE;
+	BACL            = IGNORE;
+	CRES            = IGNORE;
+	BALD            = IGNORE;
+	METHACRO        = IGNORE;
+	MVK             = IGNORE;
+	ISOPROD         = IGNORE;
+	DCB1            = IGNORE;
+	DCB2            = IGNORE;
+	DCB3            = IGNORE;
+	ETHENE          = 2C + 4H;
+	ISOPRENE        = IGNORE;
+	TRP1            = IGNORE;
+	ALK1            = IGNORE;
+	ALK2            = IGNORE;
+	ALK3            = IGNORE;
+	ALK4            = IGNORE;
+	ALK5            = IGNORE;
+	ARO1            = IGNORE;
+	ARO2            = IGNORE;
+	OLE1            = IGNORE;
+	OLE2            = IGNORE;
+
+#DEFFIX	
+	M		= IGNORE;
+	O2		= 2O;
+	H2O		= 2H + O;
+	H2		= 2H;	
+	CH4		= C + 4H;	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.def	(revision 3477)
@@ -0,0 +1,111 @@
+#include cmaq_s99.spc
+#include cmaq_s99.eqn
+
+#LOOKATALL
+
+#MONITOR O3; NO; NO2; ETHENE;
+
+#INITVALUES
+
+	CFACTOR = 1.    ;              {Conversion Factor}
+        NO2             = 46.0;       
+        NO              = 30.0;       
+        O3P             = 16.0;       
+        O3              = 48.0;       
+        NO3             = 62.0;       
+        N2O5            = 108.0;       
+        HNO3            = 63.0;       
+        O1D2            = 16.0;       
+        HO              = 17.0;       
+        HONO            = 47.0;       
+        HO2             = 33.0;       
+        CO              = 28.0;       
+        HNO4            = 79.0;       
+        HO2H            = 34.0;       
+        SO2             = 64.0;       
+        SULF            = 98.0;       
+        C_O2            = 47.0;       
+        HCHO            = 30.0;       
+        COOH            = 48.0;       
+        MEOH            = 32.0;       
+        RO2_R           = 1.0;       
+        ROOH            = 62.0;       
+        R2O2            = 1.0;       
+        RO2_N           = 1.0;       
+        RNO3            = 133.0;       
+        MEK             = 72.0;       
+        PROD2           = 100.0;       
+        CCO_O2          = 75.0;       
+        PAN             = 121.0;       
+        CCO_OOH         = 76.0;       
+        CCO_OH          = 60.0;       
+        RCO_O2          = 89.0;       
+        PAN2            = 135.0;       
+        CCHO            = 44.0;       
+        RCO_OOH         = 90.0;       
+        RCO_OH          = 74.0;       
+        BZCO_O2         = 137.0;       
+        PBZN            = 183.0;       
+        BZ_O            = 93.0;       
+        MA_RCO3         = 101.0;       
+        MA_PAN          = 147.0;       
+        TBU_O           = 73.0;       
+        ACET            = 58.0;       
+        NPHE            = 139.0;       
+        PHEN            = 94.0;       
+        BZNO2_O         = 139.0;       
+        HOCOO           = 63.0;       
+        HCOOH           = 46.0;       
+        RCHO            = 58.0;       
+        GLY             = 58.0;       
+        MGLY            = 72.0;       
+        BACL            = 86.0;       
+        CRES            = 108.0;       
+        BALD            = 106.0;       
+        METHACRO        = 70.0;       
+        MVK             = 70.0;       
+        ISOPROD         = 70.0;       
+        DCB1            = 58.0;       
+        DCB2            = 72.0;       
+        DCB3            = 72.0;       
+        ETHENE          = 28.0;       
+        ISOPRENE        = 68.0;       
+        TRP1            = 136.0;       
+        ALK1            = 30.1;       
+        ALK2            = 36.7;       
+        ALK3            = 58.6;       
+        ALK4            = 77.6;       
+        ALK5            = 118.9;       
+        ARO1            = 98.6;       
+        ARO2            = 118.7;       
+        OLE1            = 72.3;       
+        OLE2            = 75.8;       
+
+#INLINE F77_INIT
+        TSTART = 12.0D0*3600.0D0
+        TEND   = TSTART + 120.0D0*3600.0D0
+        DT     = 3600.D0
+        TEMP   = 300.0D0
+#ENDINLINE   
+   
+#INLINE F90_INIT
+        TSTART = 12.0d0*3600.0d0
+        TEND   = TSTART + 120.0d0*3600.0d0
+        DT     = 3600.d0
+        TEMP   = 300.0d0
+#ENDINLINE   
+     
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 12*3600;
+   TEND   = TSTART + 120*3600;
+   DT     = 3600;
+   TEMP   = 300;
+#ENDINLINE   
+     
+#INLINE C_INIT
+   TSTART = 12.0*3600.0;
+   TEND   = TSTART + 120.0*3600.0;
+   DT     = 3600.0;
+   TEMP   = 300.0;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.eqn	(revision 3477)
@@ -0,0 +1,285 @@
+{ SAPRC-99 Fixed Parameter Mechanism }
+{ Created from BASEMECH.XLS 21-Jul-2004 10:31 }
+{  Base mechanism only.  Reactions of TERP, ALKn, AROn, OLEn removed. }
+{ SAPRC99 }
+
+#EQUATIONS
+{1} NO2 = NO + O3P : ((1.0));
+{2} O3P + O2 + M = O3 : (5.68e-34);
+{3} O3P + O3 = PROD : (8.00e-12);
+{4} O3P + NO + M = NO2 : (1.00e-31);
+{5} O3P + NO2 = NO : (6.50e-12);
+{6} O3P + NO2 = NO3 : (9.00e-32);
+{8} O3 + NO = NO2 : (1.80e-12);
+{9} O3 + NO2 = NO3 : (1.40e-13);
+{10} NO + NO3 = 2NO2 : (1.80e-11);
+{11} NO + NO + O2 = 2NO2 : (3.30e-39);
+{12} NO2 + NO3 = N2O5 : (2.80e-30);
+{13} N2O5 = NO2 + NO3 : (1.00e-03);
+{14} N2O5 + H2O = 2HNO3 : (2.60e-22);
+{17} NO2 + NO3 = NO + NO2 : (4.50e-14);
+{18} NO3 = NO : (1.0);
+{19} NO3 = NO2 + O3P : (1.0);
+{20} O3 = O3P : (1.0);
+{21} O3 = O1D2 : (1.0);
+{22} O1D2 + H2O = 2HO : (2.20e-10);
+{23} O1D2 + M = O3P : (2.09e-11);
+{24} HO + NO = HONO : (7.00e-31);
+{25} HONO = HO + NO : (1.0);
+{26} HONO = HO2 + NO2 : (1.0);
+{27} HO + HONO = NO2 : (2.70e-12);
+{28} HO + NO2 = HNO3 : (2.43e-30);
+{29} HO + NO3 = HO2 + NO2 : (2.00e-11);
+{30} HO + HNO3 = NO3 : (7.20e-15);
+{31} HNO3 = HO + NO2 : (1.0);
+{32} HO + CO = HO2 : (1.30e-13);
+{33} HO + O3 = HO2 : (1.90e-12);
+{34} HO2 + NO = HO + NO2 : (3.40e-12);
+{35} HO2 + NO2 = HNO4 : (1.80e-31);
+{36} HNO4 = HO2 + NO2 : (4.10e-05);
+{37} HNO4 = 0.61HO2 + 0.61NO2 + 0.39HO + 0.39NO3 : (1.0);
+{38} HNO4 + HO = NO2 : (1.50e-12);
+{39} HO2 + O3 = HO : (1.40e-14);
+{40A} HO2 + HO2 = HO2H : (2.20e-13);
+{40B} HO2 + HO2 + H2O = HO2H : (3.08e-34);
+{41} NO3 + HO2 = 0.8HO + 0.8NO2 + 0.2HNO3 : (4.00e-12);
+{42} NO3 + NO3 = 2NO2 : (8.50e-13);
+{43} HO2H = 2HO : (1.0);
+{44} HO2H + HO = HO2 : (2.90e-12);
+{45} HO + HO2 =  PROD: (4.80e-11);
+{S2OH} HO + SO2 = HO2 + SULF : (4.00e-31);
+{H2OH} HO + H2 = HO2 : (7.70e-12);
+{MER1} C_O2 + NO = NO2 + HCHO + HO2 : (2.80e-12);
+{MER4} C_O2 + HO2 = COOH : (3.80e-13);
+{MEN3} C_O2 + NO3 = HCHO + HO2 + NO2 : (1.30e-12);
+{MER5} C_O2 + C_O2 = MEOH + HCHO : (2.45e-14);
+{MER6} C_O2 + C_O2 = 2HCHO + 2HO2 : (5.90e-13);
+{RRNO} RO2_R + NO = NO2 + HO2 : (2.70e-12);
+{RRH2} RO2_R + HO2 = ROOH : (1.90e-13);
+{RRN3} RO2_R + NO3 = NO2 + HO2 : (2.30e-12);
+{RRME} RO2_R + C_O2 = HO2 + 0.75HCHO + 0.25MEOH : (2.00e-13);
+{RRR2} RO2_R + RO2_R = HO2 : (3.50e-14);
+{R2NO} R2O2 + NO = NO2 : (1.0);
+{R2H2} R2O2 + HO2 = HO2 : (1.0);
+{R2N3} R2O2 + NO3 = NO2 : (1.0);
+{R2ME} R2O2 + C_O2 = C_O2 : (1.0);
+{R2RR} R2O2 + RO2_R = RO2_R : (1.0);
+{R2R3} R2O2 + R2O2 = PROD : (1.0);
+{RNNO} RO2_N + NO = RNO3 : (1.0);
+{RNH2} RO2_N + HO2 = ROOH : (1.0);
+{RNME} RO2_N + C_O2 = HO2 + 0.25MEOH + 0.5MEK + 0.5PROD2 + 0.75HCHO
+        : (1.0);
+{RNN3} RO2_N + NO3 = NO2 + HO2 + MEK : (1.0);
+{RNRR} RO2_N + RO2_R = HO2 + 0.5MEK + 0.5PROD2 : (1.0);
+{RNR2} RO2_N + R2O2 = RO2_N : (1.0);
+{RNRN} RO2_N + RO2_N = MEK + HO2 + PROD2 : (1.0);
+{APN2} CCO_O2 + NO2 = PAN : (2.70e-28);
+{DPAN} PAN = CCO_O2 + NO2 : (4.90e-03);
+{APNO} CCO_O2 + NO = C_O2 + NO2 : (7.80e-12);
+{APH2} CCO_O2 + HO2 = 0.75CCO_OOH + 0.25CCO_OH + 0.25O3 : (4.30e-13);
+{APN3} CCO_O2 + NO3 = C_O2 + NO2 : (4.00e-12);
+{APME} CCO_O2 + C_O2 = CCO_OH + HCHO : (1.80e-12);
+{APRR} CCO_O2 + RO2_R = CCO_OH : (7.50e-12);
+{APR2} CCO_O2 + R2O2 = CCO_O2 : (1.0);
+{APRN} CCO_O2 + RO2_N = CCO_OH + PROD2 : (1.0);
+{APAP} CCO_O2 + CCO_O2 = 2C_O2 : (2.90e-12);
+{PPN2} RCO_O2 + NO2 = PAN2 : (1.20e-11);
+{PAN2} PAN2 = RCO_O2 + NO2 : (2.00e+15);
+{PPNO} RCO_O2 + NO = NO2 + CCHO + RO2_R : (1.25e-11);
+{PPH2} RCO_O2 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : (1.0);
+{PPN3} RCO_O2 + NO3 = NO2 + CCHO + RO2_R : (1.0);
+{PPME} RCO_O2 + C_O2 = RCO_OH + HCHO : (1.0);
+{PPRR} RCO_O2 + RO2_R = RCO_OH : (1.0);
+{PPR2} RCO_O2 + R2O2 = RCO_O2 : (1.0);
+{PPRN} RCO_O2 + RO2_N = RCO_OH + PROD2 : (1.0);
+{PPAP} RCO_O2 + CCO_O2 = C_O2 + CCHO + RO2_R : (1.0);
+{PPPP} RCO_O2 + RCO_O2 = 2CCHO + 2RO2_R : (1.0);
+{BPN2} BZCO_O2 + NO2 = PBZN : (1.37e-11);
+{BPAN} PBZN = BZCO_O2 + NO2 : (7.90e+16);
+{BPNO} BZCO_O2 + NO = NO2 + BZ_O + R2O2 : (1.0);
+{BPH2} BZCO_O2 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : (1.0);
+{BPN3} BZCO_O2 + NO3 = NO2 + BZ_O + R2O2 : (1.0);
+{BPME} BZCO_O2 + C_O2 = RCO_OH + HCHO : (1.0);
+{BPRR} BZCO_O2 + RO2_R = RCO_OH : (1.0);
+{BPR2} BZCO_O2 + R2O2 = BZCO_O2 : (1.0);
+{BPRN} BZCO_O2 + RO2_N = RCO_OH + PROD2 : (1.0);
+{BPAP} BZCO_O2 + CCO_O2 = C_O2 + BZ_O + R2O2 : (1.0);
+{BPPP} BZCO_O2 + RCO_O2 = CCHO + RO2_R + BZ_O + R2O2 : (1.0);
+{BPBP} BZCO_O2 + BZCO_O2 = 2BZ_O + 2R2O2 : (1.0);
+{MPN2} MA_RCO3 + NO2 = MA_PAN : (1.0);
+{MPPN} MA_PAN = MA_RCO3 + NO2 : (1.60e+16);
+{MPNO} MA_RCO3 + NO = NO2 + HCHO + CCO_O2 : (1.0);
+{MPH2} MA_RCO3 + HO2 = 0.75RCO_OOH + 0.25RCO_OH + 0.25O3 : (1.0);
+{MPN3} MA_RCO3 + NO3 = NO2 + HCHO + CCO_O2 : (1.0);
+{MPME} MA_RCO3 + C_O2 = RCO_OH + HCHO : (1.0);
+{MPRR} MA_RCO3 + RO2_R = RCO_OH : (1.0);
+{MPR2} MA_RCO3 + R2O2 = MA_RCO3 : (1.0);
+{MPRN} MA_RCO3 + RO2_N = 2RCO_OH : (1.0);
+{MPAP} MA_RCO3 + CCO_O2 = C_O2 + HCHO + CCO_O2 : (1.0);
+{MPPP} MA_RCO3 + RCO_O2 = HCHO + CCO_O2 + CCHO + RO2_R : (1.0);
+{MPBP} MA_RCO3 + BZCO_O2 = HCHO + CCO_O2 + BZ_O + R2O2 : (1.0);
+{MPMP} MA_RCO3 + MA_RCO3 = 2HCHO + 2CCO_O2 : (1.0);
+{TBON} TBU_O + NO2 = RNO3 : (2.40e-11);
+{TBOD} TBU_O = ACET + C_O2 : (7.50e+14);
+{BRN2} BZ_O + NO2 = NPHE : (2.30e-11);
+{BRH2} BZ_O + HO2 = PHEN : (1.0);
+{BRXX} BZ_O = PHEN : (1.00e-03);
+{BNN2} BZNO2_O + NO2 = PROD : (1.0);
+{BNH2} BZNO2_O + HO2 = NPHE : (1.0);
+{BNXX} BZNO2_O = NPHE : (1.0);
+{FAHV} HCHO = 2HO2 + CO : (1.0);
+{FAVS} HCHO = CO : (1.0);
+{FAOH} HCHO + HO = HO2 + CO : (8.60e-12);
+{FAH2} HCHO + HO2 = HOCOO : (9.70e-15);
+{FAHR} HOCOO = HO2 + HCHO : (2.40e+12);
+{FAHN} HOCOO + NO = HCOOH + NO2 + HO2 : (1.0);
+{FAN3} HCHO + NO3 = HNO3 + HO2 + CO : (2.00e-12);
+{AAOH} CCHO + HO = CCO_O2 : (5.60e-12);
+{AAHV} CCHO = CO + HO2 + C_O2 : (1.0);
+{AAN3} CCHO + NO3 = HNO3 + CCO_O2 : (1.40e-12);
+{PAOH} RCHO + HO = 0.034RO2_R + 0.001RO2_N + 0.965RCO_O2 + 0.034CO +
+         0.034CCHO : (2.00e-11);
+{PAHV} RCHO = CCHO + RO2_R + CO + HO2 : (1.0);
+{PAN3} RCHO + NO3 = HNO3 + RCO_O2 : (1.40e-12);
+{K3OH} ACET + HO = HCHO + CCO_O2 + R2O2 : (1.10e-12);
+{K3HV} ACET = CCO_O2 + C_O2 : (1.0);
+{K4OH} MEK + HO = 0.37RO2_R + 0.042RO2_N + 0.616R2O2 + 0.492CCO_O2 +
+         0.096RCO_O2 + 0.115HCHO + 0.482CCHO + 0.37RCHO : (1.30e-12);
+{K4HV} MEK = CCO_O2 + CCHO + RO2_R : (1.50e-1);
+{MeOH} MEOH + HO = HCHO + HO2 : (3.10e-12);
+{MER9} COOH + HO = 0.35HCHO + 0.35HO + 0.65C_O2 : (2.90e-12);
+{MERA} COOH = HCHO + HO2 + HO : (1.0);
+{LPR9} ROOH + HO = RCHO + 0.34RO2_R + 0.66HO : (1.10e-11);
+{LPRA} ROOH = RCHO + HO2 + HO : (1.0);
+{GLHV} GLY = 2CO + 2HO2 : (1.0);
+{GLVM} GLY = HCHO + CO : (6.00e-3);
+{GLOH} GLY + HO = 0.63HO2 + 1.26CO + 0.37RCO_O2 : (1.10e-11);
+{GLN3} GLY + NO3 = HNO3 + 0.63HO2 + 1.26CO + 0.37RCO_O2 : (2.80e-12);
+{MGHV} MGLY = HO2 + CO + CCO_O2 : (1.0);
+{MGOH} MGLY + HO = CO + CCO_O2 : (1.50e-11);
+{MGN3} MGLY + NO3 = HNO3 + CO + CCO_O2 : (1.40e-12);
+{BAHV} BACL = 2CCO_O2 : (1.0);
+{PHOH} PHEN + HO = 0.24BZ_O + 0.76RO2_R + 0.23GLY : (2.63e-11);
+{PHN3} PHEN + NO3 = HNO3 + BZ_O : (3.78e-12);
+{CROH} CRES + HO = 0.24BZ_O + 0.76RO2_R + 0.23MGLY : (4.20e-11);
+{CRN3} CRES + NO3 = HNO3 + BZ_O : (1.37e-11);
+{NPN3} NPHE + NO3 = HNO3 + BZNO2_O : (1.0);
+{BZOH} BALD + HO = BZCO_O2 : (1.29e-11);
+{BZHV} BALD = PROD : (5.00e-2);
+{BZNT} BALD + NO3 = HNO3 + BZCO_O2 : (1.40e-12);
+{MAOH} METHACRO + HO = 0.5RO2_R + 0.416CO + 0.084HCHO + 0.416MEK +
+         0.084MGLY + 0.5MA_RCO3 : (1.86e-11);
+{MAO3} METHACRO + O3 = 0.008HO2 + 0.1RO2_R + 0.208HO + 0.1RCO_O2 + 0.45CO +
+         0.2HCHO + 0.9MGLY + 0.333HCOOH : (1.36e-15);
+{MAN3} METHACRO + NO3 = 0.5HNO3 + 0.5RO2_R + 0.5CO + 0.5MA_RCO3
+        : (1.50e-12);
+{MAOP} METHACRO + O3P = RCHO : (6.34e-12);
+{MAHV} METHACRO = 0.34HO2 + 0.33RO2_R + 0.33HO + 0.67CCO_O2 + 0.67CO +
+         0.67HCHO + 0.33MA_RCO3 : (4.10e-3);
+{MVOH} MVK + HO = 0.3RO2_R + 0.025RO2_N + 0.675R2O2 + 0.675CCO_O2 +
+         0.3HCHO + 0.675RCHO + 0.3MGLY : (4.14e-12);
+{MVO3} MVK + O3 = 0.064HO2 + 0.05RO2_R + 0.164HO + 0.05RCO_O2 + 0.475CO +
+         0.1HCHO + 0.95MGLY + 0.351HCOOH : (7.51e-16);
+{MVOP} MVK + O3P = 0.45RCHO + 0.55MEK : (4.32e-12);
+{MVHV} MVK = 0.3C_O2 + 0.7CO + 0.7PROD2 + 0.3MA_RCO3
+             : (2.10e-3);
+{IPOH} ISOPROD + HO = 0.67RO2_R + 0.041RO2_N + 0.289MA_RCO3 + 0.336CO +
+         0.055HCHO + 0.129CCHO + 0.013RCHO + 0.15MEK + 0.332PROD2 +
+         0.15GLY + 0.174MGLY : (6.19e-11);
+{IPO3} ISOPROD + O3 = 0.4HO2 + 0.048RO2_R + 0.048RCO_O2 + 0.285HO +
+         0.498CO + 0.125HCHO + 0.047CCHO + 0.21MEK + 0.023GLY +
+         0.742MGLY + 0.1HCOOH + 0.372RCO_OH : (4.18e-18);
+{IPN3} ISOPROD + NO3 = 0.799RO2_R + 0.051RO2_N + 0.15MA_RCO3 + 0.572CO +
+         0.15HNO3 + 0.227HCHO + 0.218RCHO + 0.008MGLY + 0.572RNO3
+        : (1.00e-13);
+{IPHV} ISOPROD = 1.233HO2 + 0.467CCO_O2 + 0.3RCO_O2 + 1.233CO + 0.3HCHO +
+         0.467CCHO + 0.233MEK : (4.10e-3);
+{K6OH} PROD2 + HO = 0.379HO2 + 0.473RO2_R + 0.07RO2_N + 0.029CCO_O2 +
+         0.049RCO_O2 + 0.213HCHO + 0.084CCHO + 0.558RCHO + 0.115MEK +
+         0.329PROD2 : (1.50e-11);
+{K6HV} PROD2 = 0.96RO2_R + 0.04RO2_N + 0.515R2O2 + 0.667CCO_O2 +
+         0.333RCO_O2 + 0.506HCHO + 0.246CCHO + 0.71RCHO 
+         : (2.00e-2);
+{RNOH} RNO3 + HO = 0.338NO2 + 0.113HO2 + 0.376RO2_R + 0.173RO2_N +
+         0.596R2O2 + 0.01HCHO + 0.439CCHO + 0.213RCHO + 0.006ACET +
+         0.177MEK + 0.048PROD2 + 0.31RNO3 : (7.80e-12);
+{RNHV} RNO3 = NO2 + 0.341HO2 + 0.564RO2_R + 0.095RO2_N + 0.152R2O2 +
+         0.134HCHO + 0.431CCHO + 0.147RCHO + 0.02ACET + 0.243MEK +
+         0.435PROD2 : (1.0);
+{D1OH} DCB1 + HO = RCHO + RO2_R + CO : (5.00e-11);
+{D1O3} DCB1 + O3 = 1.5HO2 + 0.5HO + 1.5CO + GLY : (2.00e-18);
+{D2OH} DCB2 + HO = R2O2 + RCHO + CCO_O2 : (5.00e-11);
+{D2HV} DCB2 = RO2_R + 0.5CCO_O2 + 0.5HO2 + CO + R2O2 + 0.5GLY + 0.5MGLY
+        : (3.65e-1);
+{D3OH} DCB3 + HO = R2O2 + RCHO + CCO_O2 : (5.00e-11);
+{D3HV} DCB3 = RO2_R + 0.5CCO_O2 + 0.5HO2 + CO + R2O2 + 0.5GLY + 0.5MGLY
+        : (7.28e+0);
+{c1OH} CH4 + HO = C_O2 : (2.15e-12);
+{etOH} ETHENE + HO = RO2_R + 1.61HCHO + 0.195CCHO : (1.96e-12);
+{etO3} ETHENE + O3 = 0.12HO + 0.12HO2 + 0.5CO + HCHO + 0.37HCOOH
+        : (9.14e-15);
+{etN3} ETHENE + NO3 = RO2_R + RCHO : (4.39e-13);
+{etOA} ETHENE + O3P = 0.5HO2 + 0.2RO2_R + 0.3C_O2 + 0.491CO + 0.191HCHO +
+         0.25CCHO + 0.009GLY : (1.04e-11);
+{isOH} ISOPRENE + HO = 0.907RO2_R + 0.093RO2_N + 0.079R2O2 + 0.624HCHO +
+         0.23METHACRO + 0.32MVK + 0.357ISOPROD : (2.50e-11);
+{isO3} ISOPRENE + O3 = 0.266HO + 0.066RO2_R + 0.008RO2_N + 0.126R2O2 +
+         0.192MA_RCO3 + 0.275CO + 0.592HCHO + 0.1PROD2 + 0.39METHACRO +
+         0.16MVK + 0.204HCOOH + 0.15RCO_OH : (7.86e-15);
+{isN3} ISOPRENE + NO3 = 0.187NO2 + 0.749RO2_R + 0.064RO2_N + 0.187R2O2 +
+         0.936ISOPROD : (3.03e-12);
+{isOP} ISOPRENE + O3P = 0.01RO2_N + 0.24R2O2 + 0.25C_O2 + 0.24MA_RCO3 +
+         0.24HCHO + 0.75PROD2 : (3.60e-11);
+{t1OH} TRP1 + HO = 0.75RO2_R + 0.25RO2_N + 0.5R2O2 + 0.276HCHO +
+         0.474RCHO + 0.276PROD2 : (1.83e-11);
+{t1O3} TRP1 + O3 = 0.567HO + 0.033HO2 + 0.031RO2_R + 0.18RO2_N +
+         0.729R2O2 + 0.123CCO_O2 + 0.201RCO_O2 + 0.157CO + 0.235HCHO +
+         0.205RCHO + 0.13ACET + 0.276PROD2 + 0.001GLY + 0.031BACL +
+         0.103HCOOH + 0.189RCO_OH : (1.08e-15);
+{t1N3} TRP1 + NO3 = 0.474NO2 + 0.276RO2_R + 0.25RO2_N + 0.75R2O2 +
+         0.474RCHO + 0.276RNO3 : (3.66e-12);
+{t1OP} TRP1 + O3P = 0.147RCHO + 0.853PROD2 : (3.27e-11);
+{a1OH} ALK1 + HO = RO2_R + CCHO : (1.37e-12);
+{a2OH} ALK2 + HO = 0.246HO + 0.121HO2 + 0.612RO2_R + 0.021RO2_N + 0.16CO +
+         0.039HCHO + 0.155RCHO + 0.417ACET + 0.248GLY + 0.121HCOOH
+        : (9.87e-12);
+{a3OH} ALK3 + HO = 0.695RO2_R + 0.07RO2_N + 0.559R2O2 + 0.236TBU_O +
+         0.026HCHO + 0.445CCHO + 0.122RCHO + 0.024ACET + 0.332MEK
+        : (1.02e-11);
+{a4OH} ALK4 + HO = 0.835RO2_R + 0.143RO2_N + 0.936R2O2 + 0.011C_O2 +
+         0.011CCO_O2 + 0.002CO + 0.024HCHO + 0.455CCHO + 0.244RCHO +
+         0.452ACET + 0.11MEK + 0.125PROD2 : (5.95e-12);
+{a5OH} ALK5 + HO = 0.653RO2_R + 0.347RO2_N + 0.948R2O2 + 0.026HCHO +
+         0.099CCHO + 0.204RCHO + 0.072ACET + 0.089MEK + 0.417PROD2
+        : (1.11e-11);
+{b1OH} ARO1 + HO = 0.224HO2 + 0.765RO2_R + 0.011RO2_N + 0.055PROD2 +
+         0.118GLY + 0.119MGLY + 0.017PHEN + 0.207CRES + 0.059BALD +
+         0.491DCB1 + 0.108DCB2 + 0.051DCB3 : (1.81e-12);
+{b2OH} ARO2 + HO = 0.187HO2 + 0.804RO2_R + 0.009RO2_N + 0.097GLY +
+         0.287MGLY + 0.087BACL + 0.187CRES + 0.05BALD + 0.561DCB1 +
+         0.099DCB2 + 0.093DCB3 : (2.64e-11);
+{o1OH} OLE1 + HO = 0.91RO2_R + 0.09RO2_N + 0.205R2O2 + 0.732HCHO +
+         0.294CCHO + 0.497RCHO + 0.005ACET + 0.119PROD2 : (7.10e-12);
+{o1O3} OLE1 + O3 = 0.155HO + 0.056HO2 + 0.022RO2_R + 0.001RO2_N +
+         0.076C_O2 + 0.345CO + 0.5HCHO + 0.154CCHO + 0.363RCHO +
+         0.001ACET + 0.215PROD2 + 0.185HCOOH + 0.05CCO_OH + 0.119RCO_OH
+        : (2.62e-15);
+{o1N3} OLE1 + NO3 = 0.824RO2_R + 0.176RO2_N + 0.488R2O2 + 0.009CCHO +
+         0.037RCHO + 0.024ACET + 0.511RNO3 : (4.45e-14);
+{o1OP} OLE1 + O3P = 0.45RCHO + 0.437MEK + 0.113PROD2 : (1.07e-11);
+{o2OH} OLE2 + HO = 0.918RO2_R + 0.082RO2_N + 0.001R2O2 + 0.244HCHO +
+         0.732CCHO + 0.511RCHO + 0.127ACET + 0.072MEK + 0.061BALD +
+         0.025METHACRO + 0.025ISOPROD : (1.74e-11);
+{o2O3} OLE2 + O3 = 0.378HO + 0.003HO2 + 0.033RO2_R + 0.002RO2_N +
+         0.137R2O2 + 0.197C_O2 + 0.137CCO_O2 + 0.006RCO_O2 + 0.265CO +
+         0.269HCHO + 0.456CCHO + 0.305RCHO + 0.045ACET + 0.026MEK +
+         0.006PROD2 + 0.042BALD + 0.026METHACRO + 0.073HCOOH +
+         0.129CCO_OH + 0.303RCO_OH : (5.02e-16);
+{o2N3} OLE2 + NO3 = 0.391NO2 + 0.442RO2_R + 0.136RO2_N + 0.711R2O2 +
+         0.03C_O2 + 0.079HCHO + 0.507CCHO + 0.151RCHO + 0.102ACET +
+         0.001MEK + 0.015BALD + 0.048MVK + 0.321RNO3 : (7.26e-13);
+{o2OP} OLE2 + O3P = 0.013HO2 + 0.012RO2_R + 0.001RO2_N + 0.012CO +
+         0.069RCHO + 0.659MEK + 0.259PROD2 + 0.012METHACRO : (2.09e-11);
+{c1OH} HCOOH + HO = HO2 : (4.5E-13);
+{c2OH} CCO_OH + HO = 0.13RO2_R + 0.87C_O2 + 0.13MGLY : (8.00E-13);
+{c3OH} RCO_OH + HO = RO2_R + 0.605CCHO + 0.21RCHO + 0.185BACL : (1.16E-12);
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/cmaq_s99.spc	(revision 3477)
@@ -0,0 +1,82 @@
+#include atoms
+
+#DEFVAR   
+	NO2             = N + 2O;
+	NO              = N + O;
+	O3P             = O;
+	O3              = 3O;
+	NO3             = N + 3O;
+	N2O5            = 2N + 5O;
+	HNO3            = H + N + 3O;
+	O1D2            = O;
+	HO              = H + O;
+	HONO            = H + 2O + N;
+	HO2             = H + 2O;
+	CO              = C + O;
+	HNO4            = H + 4O + N;
+	HO2H            = 2H + 2O;
+	SO2             = S + 2O;
+	SULF            = IGNORE;
+	C_O2            = IGNORE;
+	HCHO            = 2H + C + O;
+	COOH            = H + 2O + C;
+	MEOH            = IGNORE;
+	RO2_R           = IGNORE;
+	ROOH            = IGNORE;
+	R2O2            = IGNORE;
+	RO2_N           = IGNORE;
+	RNO3            = IGNORE;
+	MEK             = IGNORE;
+	PROD2           = IGNORE;
+	CCO_O2          = IGNORE;
+	PAN             = IGNORE;
+	CCO_OOH         = 2C + 3O + H;
+	CCO_OH          = 2O + 2C + H;
+	RCO_O2          = IGNORE;
+	PAN2            = IGNORE;
+	CCHO            = 2C + H + O;
+	RCO_OOH         = IGNORE;
+	RCO_OH          = IGNORE;
+	BZCO_O2         = IGNORE;
+	PBZN            = IGNORE;
+	BZ_O            = IGNORE;
+	MA_RCO3         = IGNORE;
+	MA_PAN          = IGNORE;
+	TBU_O           = IGNORE;
+	ACET            = IGNORE;
+	NPHE            = IGNORE;
+	PHEN            = IGNORE;
+	BZNO2_O         = IGNORE;
+	HOCOO           = IGNORE;
+	HCOOH           = IGNORE;
+	RCHO            = IGNORE;
+	GLY             = IGNORE;
+	MGLY            = IGNORE;
+	BACL            = IGNORE;
+	CRES            = IGNORE;
+	BALD            = IGNORE;
+	METHACRO        = IGNORE;
+	MVK             = IGNORE;
+	ISOPROD         = IGNORE;
+	DCB1            = IGNORE;
+	DCB2            = IGNORE;
+	DCB3            = IGNORE;
+	ETHENE          = 2C + 4H;
+	ISOPRENE        = IGNORE;
+	TRP1            = IGNORE;
+	ALK1            = IGNORE;
+	ALK2            = IGNORE;
+	ALK3            = IGNORE;
+	ALK4            = IGNORE;
+	ALK5            = IGNORE;
+	ARO1            = IGNORE;
+	ARO2            = IGNORE;
+	OLE1            = IGNORE;
+	OLE2            = IGNORE;
+
+#DEFFIX	
+	M		= IGNORE;
+	O2		= 2O;
+	H2O		= 2H + O;
+	H2		= 2H;	
+	CH4		= C + 4H;	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.def	(revision 3477)
@@ -0,0 +1,87 @@
+#include saprc99.spc
+#include saprc99.eqn
+
+{#LANGUAGE Fortran77
+#INTEGRATOR rodas3
+#DRIVER matlab
+#HESSIAN ON}
+
+#LOOKATALL
+
+#MONITOR O3; NO; NO2; ETHENE;
+
+#INITVALUES
+
+   CFACTOR = 2.4476e+13;
+
+   ALL_SPEC = 0.0e0;
+   NO = 1.0e-1;
+   NO2 = 5.0e-2;
+   HONO = 1.e-3;
+   SO2 = 5.e-2;
+   HCHO = 1.121e-2;
+   CCHO = 2.316e-3;
+   RCHO = 1.72e-3;
+   ACET = 5.07e-3;
+   MEK = 3.26e-3;
+   MEOH = 5.89e-3;
+   GLY = 1.21e-4;
+   MGLY = 8.37e-5;
+   PHEN = 6.06e-4;
+   CRES = 5.60e-4;
+   BALD = 7.51e-5; 
+   METHACRO = 1.30e-3; 
+   ISOPROD = 8.93e-5; 
+   PROD2 = 1.93e-3; 
+   ETHENE = 1.89e-2;                 
+   ISOPRENE = 4.33e-4;
+   ALK1 = 1.167e-2;
+   ALK2 = 1.88e-2;
+   ALK3 = 4.69e-2;
+   ALK4 = 4.17e-2;
+   ALK5 = 3.06e-2;   
+   ARO1 = 1.18e-2;
+   ARO2 = 8.74e-3;
+   OLE1 = 1.04e-2;
+   OLE2 = 7.97e-3;   
+   TERP = 8.20e-4;
+   XC   = 0.2E0;
+   CCO_OH = 1.16e-3; 
+   RCO_OH = 3.92e-4;     
+   HCOOH  = 6.77e-4;
+   O3P    = 7.843e-9;
+   H2O = 2.0e+04; 
+   O2  = 2.09e+5;
+   AIR = 1.0e+6;
+   CH4 = 1.0e0;
+     
+#INLINE F77_INIT
+        TSTART = 12.0D0*3600.0D0
+        TEND   = TSTART + 120.0D0*3600.0D0
+        DT     = 3600.D0
+        TEMP   = 300.0D0
+#ENDINLINE   
+   
+#INLINE F90_INIT
+        TSTART = 12.0d0*3600.0d0
+        TEND   = TSTART + 120.0d0*3600.0d0
+        DT     = 3600.d0
+        TEMP   = 300.0d0
+#ENDINLINE   
+     
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 12*3600;
+   TEND   = TSTART + 120*3600;
+   DT     = 3600;
+   TEMP   = 300;
+#ENDINLINE   
+     
+#INLINE C_INIT
+   TSTART = 12.0*3600.0;
+   TEND   = TSTART + 120.0*3600.0;
+   DT     = 3600.0;
+   TEMP   = 300.0;
+#ENDINLINE   
+   
+   
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.eqn	(revision 3477)
@@ -0,0 +1,354 @@
+#Equations
+
+{1} NO2 + hv = NO + O3P : 				6.69e-1*(SUN/60.0e0);
+{2} O3P + O2 + AIR = O3 : 				ARR(5.68e-34,0.0e0,-2.80e0);
+{3} O3P + O3 = 2O2 : 					ARR(8.00e-12,2060.0e0,0.0e0);
+{4} O3P + NO + AIR = NO2 : 				ARR(1.00e-31,0.0e0,-1.60e0);
+{5} O3P + NO2 = NO : 					ARR(6.50e-12,-120.0e0,0.0e0);
+{6} O3P + NO2   = NO3 : 				FALL(9.00e-32,0.0e0,-2.00e0,2.20e-11,0.0e0,0.0e0,0.80e0);
+{7} O3 + NO = NO2 : 					ARR(1.80e-12,1370.0e0,0.0e0);
+{8} O3 + NO2 = NO3 : 					ARR(1.40e-13,2470.0e0,0.0e0);
+{9} NO + NO3 = 2NO2 : 					ARR(1.80e-11,-110.0e0,0.0e0);
+{10} NO + NO + O2 = 2NO2 : 				ARR(3.30e-39,-530.0e0,0.0e0);
+{11} NO2 + NO3   = N2O5 : 				FALL(2.80e-30,0.0e0,-3.50e0,2.00e-12,0.0e0,0.20e0,0.45e0);
+{12} N2O5   = NO2 + NO3 : 			        FALL(1.e-3,11000.0e0,-3.5e0,9.7e+14,11080.0e0,0.1e0,0.45e0);
+{13} N2O5 + H2O = 2HNO3 : 				(2.60e-22);
+{14} NO2 + NO3 = NO + NO2 : 				ARR(4.50e-14,1260.0e0,0.0e0);
+{15} NO3 + hv = NO : 					1.59e0*(SUN/60.0e0);
+{16} NO3 + hv = NO2 + O3P : 				1.50e+1*(SUN/60.0e0);
+{17} O3 + hv = O3P : 					3.76e-2*(SUN/60.0e0);
+{18} O3 + hv = O1D : 					4.19e-3*(SUN/60.0e0);
+{19} O1D + H2O = 2OH : 				        (2.20e-10);
+{20} O1D + AIR = O3P : 					ARR(2.09e-11,-95.0e0,0.0e0);
+{21} OH + NO   = HONO : 				FALL(7.00e-31,0.0e0,-2.60e0,3.60e-11,0.0e0,-0.10e0,0.60e0);
+{22} HONO + hv = OH + NO : 				1.27e-1*(SUN/60.0e0);
+{23} HONO + hv = HO2 + NO2 : 				1.60e-2*(SUN/60.0e0);
+{24} OH + HONO = NO2 : 					ARR(2.70e-12,-260.0e0,0.0e0);
+{25} OH + NO2 = HNO3 : 					FALL(2.43e-30, 0.0e0,-3.10e0,1.67e-11,0.0e0,-2.10e0,0.60e0);
+{26} OH + NO3 = HO2 + NO2 : 				(2.00e-11);
+{27} OH + HNO3 = NO3 : 					EP2(7.20e-15,-785.0e0,4.10e-16,-1440.0e0,1.90e-33,-725.0e0);
+{28} HNO3 + hv = OH + NO2 : 				5.40e-5*(SUN/60.0e0);
+{29} OH + CO = HO2 : 					EP3(1.30e-13,0.0e0,3.19e-33,0.0e0);
+{30} OH + O3 = HO2 : 					ARR(1.90e-12,1000.0e0,0.0e0);
+{31} HO2 + NO = OH + NO2 : 				ARR(3.40e-12,-270.0e0,0.0e0);
+{32} HO2 + NO2  = HNO4 : 				FALL(1.80e-31,0.0,-3.20,4.70e-12,0.0e0,0.0,0.6);
+{33} HNO4  = HO2 + NO2 : 			FALL(4.10e-05,10650.0,0.0,5.7e+15,11170.0,0.0,0.5);
+{34} HNO4 + hv = 0.61HO2 + 0.61NO2 + 0.39OH + 
+            0.39NO3 : 					4.69e-4*(SUN/60.0e0);
+{35} HNO4 + OH = NO2 : 					ARR(1.50e-12,-360.0e0,0.0e0);
+{36} HO2 + O3 = OH : 					ARR(1.40e-14,600.0e0,0.0e0);
+{37} HO2 + HO2 = H2O2 : 				EP3(2.20e-13,-600.0e0,1.85e-33,-980.0e0);
+{38} HO2 + HO2 + H2O = H2O2 : 				EP3(3.08e-34,-2800.0e0,2.59e-54,-3180.0e0);
+{39} NO3 + HO2 = 0.8OH + 0.8NO2 + 0.2HNO3 : 		(4.00e-12);
+{40} NO3 + NO3 = 2NO2 : 				ARR(8.50e-13,2450.0e0,0.0e0);
+{41} H2O2 + hv = 2OH : 					5.64e-4*(SUN/60.0e0);
+{42} H2O2 + OH = HO2 : 					ARR(2.90e-12,160.0e0,0.0e0);
+{43} OH + HO2 = H2O + O2 : 				ARR(4.80e-11,-250.0e0,0.0e0);
+{44} OH + SO2   = HO2 + H2SO4 :  		    	FALL(4.00e-31,0.0e0,-3.30e0,2.00e-12,0.0e0,0.0e0,0.45e0);
+{45} OH + H2 = HO2 :				    	ARR(7.70e-12,2100.0e0,0.0e0);
+{46} C_O2 + NO = NO2 + HCHO + HO2 : 	    		ARR(2.80e-12,-285.0e0,0.0e0);
+{47} C_O2 + HO2 = COOH :			    	ARR(3.80e-13,-780.0e0,0.0e0);
+{48} C_O2 + NO3 = HCHO + HO2 + NO2 :	    		(1.30e-12);
+{49} C_O2 + C_O2 = MEOH + HCHO :		    	ARR(2.45e-14,-710.0e0,0.0e0);
+{50} C_O2 + C_O2 = 2HCHO + 2HO2 : 	    		ARR(5.90e-13,509.0e0,0.0e0);
+{51} RO2_R + NO = NO2 + HO2 : 		    		ARR(2.70e-12,-360.0e0,0.0e0);
+{52} RO2_R + HO2 = ROOH :			    	ARR(1.90e-13,-1300.0e0,0.0e0);
+{53} RO2_R + NO3 = NO2 + HO2 :		    		(2.30e-12);
+{54} RO2_R + C_O2 = HO2 + 0.75HCHO +
+                      0.25MEOH : 			(2.00e-13);
+{55} RO2_R + RO2_R = HO2 :			    	(3.50e-14);
+{56} R2O2 + NO = NO2 :  			    	ARR(2.70e-12,-360.0e0,0.0e0);
+{57} R2O2 + HO2 = HO2 : 			    	ARR(1.90e-13,-1300.0e0,0.0e0);
+{58} R2O2 + NO3 = NO2 : 			    	(2.30e-12);
+{59} R2O2 + C_O2 = C_O2 :			    	(2.00e-13);
+{60} R2O2 + RO2_R = RO2_R :			    	(3.50e-14);
+{61} R2O2 + R2O2 = 2R2O2 :				(0.0e0);
+{62} RO2_N + NO = RNO3 :			    	ARR(2.70e-12,-360.0e0,0.0e0);
+{63} RO2_N + HO2 = ROOH :			    	ARR(1.90e-13,-1300.0e0,0.0e0);
+{64} RO2_N + C_O2 = HO2 + 0.25MEOH +
+       0.5MEK + 0.5PROD2 + 0.75HCHO : 			(2.00e-13);
+{65} RO2_N + NO3 = NO2 + HO2 + MEK : 			(2.30e-12);
+{66} RO2_N + RO2_R = HO2 + 0.5MEK + 
+       0.5PROD2 : 					(3.50e-14);
+{67} RO2_N + R2O2 = RO2_N : 				(3.50e-14);
+{68} RO2_N + RO2_N = MEK + HO2 + PROD2 : 		(3.50e-14);
+{69} CCO_O2 + NO2  = PAN : 				FALL(2.70e-28,0.0e0,-7.10e0,1.20e-11,0.0e0,-0.90e0,0.30e0);
+{70} PAN  = CCO_O2 + NO2 : 				FALL(4.90e-3,12100.0e0,0.0e0,4.0e+16,13600.0e0,0.e0,0.3e0);
+{71} CCO_O2 + NO = C_O2 + NO2 : 			ARR(7.80e-12,-300.0e0,0.0e0);
+{72} CCO_O2 + HO2 = 0.75CCO_OOH + 
+       0.25CCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0e0,0.0e0);
+{73} CCO_O2 + NO3 = C_O2 + NO2 : 			(4.00e-12);
+{74} CCO_O2 + C_O2 = CCO_OH + HCHO : 			ARR(1.80e-12,-500.0e0,0.0e0);
+{75} CCO_O2 + RO2_R = CCO_OH : 				(7.50e-12);
+{76} CCO_O2 + R2O2 = CCO_O2 : 				(7.50e-12);
+{77} CCO_O2 + RO2_N = CCO_OH + PROD2 : 			(7.50e-12);
+{78} CCO_O2 + CCO_O2 = 2C_O2 : 				ARR(2.90e-12,-500.0e0,0.0e0);
+{79} RCO_O2 + NO2 = PAN2 : 				ARR(1.20e-11,0.0e0,-0.90e0);
+{80} PAN2 = RCO_O2 + NO2 : 				ARR(2.00e+15,12800.0e0,0.0e0);
+{81} RCO_O2 + NO = NO2 + CCHO + RO2_R : 		ARR(1.25e-11,-240.0e0,0.0e0);
+{82} RCO_O2 + HO2 = 0.75RCO_OOH + 
+       0.25RCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0e0,0.0e0);
+{83} RCO_O2 + NO3 = NO2 + CCHO + RO2_R : 		(4.00e-12);
+{84} RCO_O2 + C_O2 = RCO_OH + HCHO : 			ARR(1.80e-12,-500.0e0,0.0e0);
+{85} RCO_O2 + RO2_R = RCO_OH : 				(7.50e-12);
+{86} RCO_O2 + R2O2 = RCO_O2 : 				(7.50e-12);
+{87} RCO_O2 + RO2_N = RCO_OH + PROD2 : 			(7.50e-12);
+{88} RCO_O2 + CCO_O2 = C_O2 + CCHO + RO2_R : 		ARR(2.90e-12,-500.0e0,0.0e0);
+{89} RCO_O2 + RCO_O2 = 2CCHO + 2RO2_R : 		ARR(2.90e-12,-500.0e0,0.0e0);
+{90} BZCO_O2 + NO2 = PBZN : 				(1.37e-11);
+{91} PBZN = BZCO_O2 + NO2 : 				ARR(7.90e+16,14000.0e0,0.0e0);
+{92} BZCO_O2 + NO = NO2 + BZ_O + R2O2 : 		ARR(1.25e-11,-240.0e0,0.0e0);
+{93} BZCO_O2 + HO2 = 0.75RCO_OOH + 
+       0.25RCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0e0,0.0e0);
+{94} BZCO_O2 + NO3 = NO2 + BZ_O + R2O2 : 		(4.00e-12);
+{95} BZCO_O2 + C_O2 = RCO_OH + HCHO : 			ARR(1.80e-12,-500.0e0,0.0e0);
+{96} BZCO_O2 + RO2_R = RCO_OH : 			(7.50e-12);
+{97} BZCO_O2 + R2O2 = BZCO_O2 : 			(7.50e-12);
+{98} BZCO_O2 + RO2_N = RCO_OH + PROD2 : 		(7.50e-12);
+{99} BZCO_O2 + CCO_O2 = C_O2 + BZ_O + R2O2 : 		ARR(2.90e-12,-500.0e0,0.0e0);
+{100} BZCO_O2 + RCO_O2 = CCHO + RO2_R + 
+       BZ_O + R2O2 : 					ARR(2.90e-12,-500.0e0,0.0e0);
+{101} BZCO_O2 + BZCO_O2 = 2BZ_O + 2R2O2: 		ARR(2.90e-12,-500.0e0,0.0e0);
+{102} MA_RCO3 + NO2 = MA_PAN : 				ARR(1.20e-11,0.0e0,-0.90e0);
+{103} MA_PAN = MA_RCO3 + NO2 : 				ARR(1.60e+16,13486.0e0,0.0e0);
+{104} MA_RCO3 + NO = NO2 + HCHO + CCO_O2 : 		ARR(1.25e-11,-240.0e0,0.0e0);
+{105} MA_RCO3 + HO2 = 0.75RCO_OOH + 
+       0.25RCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0e0,0.0e0);
+{106} MA_RCO3 + NO3 = NO2 + HCHO + CCO_O2 : 		(4.00e-12);
+{107} MA_RCO3 + C_O2 = RCO_OH + HCHO : 			ARR(1.80e-12,-500.0e0,0.0e0);
+{108} MA_RCO3 + RO2_R = RCO_OH : 			(7.50e-12);
+{109} MA_RCO3 + R2O2 = MA_RCO3 : 			(7.50e-12);
+{110} MA_RCO3 + RO2_N = 2RCO_OH : 			(7.50e-12);
+{111} MA_RCO3 + CCO_O2 = C_O2 + HCHO + 
+       CCO_O2 : 					ARR(2.90e-12,-500.0e0,0.0e0);
+{112} MA_RCO3 + RCO_O2 = HCHO + CCO_O2 + 
+       CCHO + RO2_R : 					ARR(2.90e-12,-500.0e0,0.0e0);
+{113} MA_RCO3 + BZCO_O2 = HCHO + CCO_O2 + 
+       BZ_O + R2O2 : 					ARR(2.90e-12,-500.0e0,0.0e0);
+{114} MA_RCO3 + MA_RCO3 = 2HCHO + 2CCO_O2 : 		ARR(2.90e-12,-500.0e0,0.0e0);
+{115} TBU_O + NO2 = RNO3 : 				(2.40e-11);
+{116} TBU_O = ACET + C_O2 : 				ARR(7.50e+14,8152.0e0,0.0e0);
+{117} BZ_O + NO2 = NPHE : 				ARR(2.30e-11,-150.0e0,0.0e0);
+{118} BZ_O + HO2 = PHEN : 				ARR(1.90e-13,-1300.0e0,0.0e0);
+{119} BZ_O = PHEN : 					(1.00e-03);
+{120} BZNO2_O + NO2 =  2XN + 6XC: 			ARR(7.50e+14,8152.0e0,0.0e0);
+{121} BZNO2_O + HO2 = NPHE : 				ARR(2.30e-11,-150.0e0,0.0e0);
+{122} BZNO2_O  = NPHE :					ARR(1.90e-13,-1300.0e0,0.0e0);
+{123} HCHO + hv = 2HO2 + CO :				2.32e-3*(SUN/60.0e0);
+{124} HCHO + hv = CO : 					3.15e-3*(SUN/60.0e0);
+{125} HCHO + OH = HO2 + CO :  				ARR(8.60e-12,-20.0e0,0.0e0);
+{126} HCHO + HO2 = HOCOO :				ARR(9.70e-15,-625.0e0,0.0e0);
+{127} HOCOO = HO2 + HCHO :				ARR(2.40e+12,7000.0e0,0.0e0);
+{128} HOCOO + NO = HCOOH + NO2 + HO2 :			ARR(2.80e-12,-285.0e0,0.0e0);
+{129} HCHO + NO3 = HNO3 + HO2 + CO :			ARR(2.00e-12,2431.0e0,0.0e0);
+{130} CCHO + OH = CCO_O2 :				ARR(5.60e-12,-310.0e0,0.0e0);
+{131} CCHO +hv = CO + HO2 + C_O2 : 			4.16e-4*(SUN/60.0e0);
+{132} CCHO + NO3 = HNO3 + CCO_O2 : 			ARR(1.40e-12,1860.0e0,0.0e0);
+{133} RCHO + OH = 0.034RO2_R + 0.001RO2_N  + 
+       0.965RCO_O2 + 0.034CO+ 0.034CCHO : 		(2.00e-11);
+{134} RCHO + hv = CCHO + RO2_R + CO + HO2 : 		1.40e-3*(SUN/60.0e0);
+{135} RCHO + NO3 = HNO3 + RCO_O2 : 			ARR(1.40e-12,1771.0e0,0.0e0);
+{136} ACET + OH = HCHO + CCO_O2 + R2O2 : 		ARR(1.10e-12,520.0e0,0.0e0);
+{137} ACET + hv  = CCO_O2 + C_O2 : 			4.16e-5*(SUN/60.0e0);
+{138} MEK + OH = 0.37RO2_R + 0.042RO2_N  + 
+       0.616R2O2+ 0.492CCO_O2 + 
+	 0.096RCO_O2 + 0.115HCHO + 
+	 0.482CCHO + 0.37RCHO : 			ARR(1.30e-12,25.0e0,2.0e0);
+{139} MEK + hv = CCO_O2 + CCHO + RO2_R : 		9.49e-4*(1.50e-1*SUN/60.0e0);
+{140} MEOH + OH = HCHO + HO2 : 				ARR(3.10e-12,360.0e0,2.0e0);
+{141} COOH + OH = 0.35HCHO + 0.35OH + 
+       0.65C_O2 : 					ARR(2.90e-12,-190.0e0,0.0e0);
+{142} COOH + hv = HCHO + HO2 + OH :		      	3.94e-4*(SUN/60.0e0);
+{143} ROOH + OH = RCHO + 0.34RO2_R + 
+       0.66OH : 					(1.10e-11);
+{144} ROOH + hv = RCHO + HO2 + OH : 		        3.94e-4*(SUN/60.0e0);
+{145} GLY + hv = 2CO+ 2HO2 : 				8.93e-3*(SUN/60.0e0);
+{146} GLY + hv = HCHO + CO : 				1.81e-1*(6.00e-3*SUN/60.0e0);
+{147} GLY + OH = 0.63HO2 + 1.26CO+ 
+       0.37RCO_O2 : 					(1.10e-11);
+{148} GLY + NO3 = HNO3 + 0.63HO2 + 
+       1.26CO+ 0.37RCO_O2 : 				ARR(2.80e-12,2376.0e0,0.0e0);
+{149} MGLY + hv = HO2 + CO + CCO_O2 : 			1.10e-2*(SUN/60.0e0);
+{150} MGLY + OH = CO + CCO_O2 :				1.50e-11;
+{151} MGLY + NO3 = HNO3 + CO + CCO_O2 : 		ARR(1.40e-12,1895.0e0,0.0e0);
+{152} BACL + hv = 2CCO_O2 : 				1.90e-2*(SUN/60.0e0);
+{153} PHEN + OH = 0.24BZ_O + 0.76RO2_R + 
+       0.23GLY : 					(2.63e-11);
+{154} PHEN + NO3 = HNO3 + BZ_O : 			(3.78e-12);
+{155} CRES + OH = 0.24BZ_O + 0.76RO2_R + 
+       0.23MGLY : 					(4.20e-11);
+{156} CRES + NO3 = HNO3 + BZ_O : 			(1.37e-11);
+{157} NPHE + NO3 = HNO3 + BZNO2_O : 			(3.78e-12);
+{158} BALD + OH = BZCO_O2 : 				(1.29e-11);
+{159} BALD + hv =  7XC: 				6.22e-2*(5.00e-2*SUN/60.0e0);
+{160} BALD + NO3 = HNO3 + BZCO_O2 : 			ARR(1.40e-12,1872.0e0,0.0e0);
+{161} METHACRO + OH = 0.5RO2_R + 0.416CO+ 
+       0.084HCHO + 0.416MEK +
+       0.084MGLY + 0.5MA_RCO3 : 			ARR(1.86e-11,-176.0e0,0.0e0);
+{162} METHACRO + O3 = 0.008HO2 + 0.1RO2_R + 
+       0.208OH + 0.1RCO_O2 + 0.45CO+
+       0.2HCHO + 0.9MGLY + 0.333HCOOH : 		ARR(1.36e-15,2114.0e0,0.0e0);
+{163} METHACRO + NO3 = 0.5HNO3 + 0.5RO2_R + 
+      0.5CO+ 0.5MA_RCO3 : 				ARR(1.50e-12,1726.0e0,0.0e0);
+{164} METHACRO + O3P = RCHO : 				(6.34e-12);
+{165} METHACRO + hv = 0.34HO2 + 0.33RO2_R + 
+       0.33OH + 0.67CCO_O2 + 0.67CO+
+       0.67HCHO + 0.33MA_RCO3 : 			3.32e-2*(4.10e-3*SUN/60.0e0);
+{166} MVK + OH = 0.3RO2_R + 0.025RO2_N  + 
+       0.675R2O2+ 0.675CCO_O2 +
+       0.3HCHO + 0.675RCHO + 0.3MGLY : 			ARR(4.14e-12,-453.0e0,0.0e0);
+{167} MVK + O3 = 0.064HO2 + 0.05RO2_R + 
+       0.164OH + 0.05RCO_O2 + 0.475CO+
+       0.1HCHO + 0.95MGLY + 0.351HCOOH : 		ARR(7.51e-16,1520.0e0,0.0e0);
+{168} MVK + O3P = 0.45RCHO + 0.55MEK : 			(4.32e-12);
+{169} MVK + hv = 0.3C_O2 + 0.7CO+ 0.7PROD2 + 
+       0.3MA_RCO3 : 					3.32e-2*(2.10e-3*SUN/60.0e0);
+{170} ISOPROD + OH = 0.67RO2_R + 
+       0.041RO2_N  + 0.289MA_RCO3 + 
+	 0.336CO+ 0.055HCHO + 0.129CCHO + 
+	 0.013RCHO + 0.15MEK + 0.332PROD2 +
+       0.15GLY + 0.174MGLY : 				(6.19e-11);
+{171} ISOPROD + O3 = 0.4HO2 + 0.048RO2_R + 
+       0.048RCO_O2 + 0.285OH +
+       0.498CO+ 0.125HCHO + 0.047CCHO + 
+	 0.21MEK + 0.023GLY + 0.742MGLY + 
+	 0.1HCOOH + 0.372RCO_OH : 			(4.18e-18);
+{172} ISOPROD + NO3 = 0.799RO2_R + 
+       0.051RO2_N  + 0.15MA_RCO3 + 0.572CO+
+       0.15HNO3 + 0.227HCHO + 0.218RCHO + 
+	 0.008MGLY + 0.572RNO3 : 			(1.00e-13);
+{173} ISOPROD + hv = 1.233HO2 + 0.467CCO_O2 + 
+       0.3RCO_O2 + 1.233CO+ 0.3HCHO +
+       0.467CCHO + 0.233MEK : 				3.32e-2*(4.10e-3*SUN/60.0e0);
+{174} PROD2 + OH = 0.379HO2 + 0.473RO2_R + 
+       0.07RO2_N  + 0.029CCO_O2 +
+       0.049RCO_O2 + 0.213HCHO + 
+	 0.084CCHO + 0.558RCHO + 
+	 0.115MEK + 0.329PROD2 : 			(1.50e-11);
+{175} PROD2 + hv = 0.96RO2_R + 0.04RO2_N  + 
+       0.515R2O2+ 0.667CCO_O2 + 
+	 0.333RCO_O2 + 0.506HCHO + 
+	 0.246CCHO + 0.71RCHO : 			9.49e-4*(2.00e-2*SUN/60.0e0);
+{176} RNO3 + OH = 0.338NO2 + 0.113HO2 + 
+       0.376RO2_R + 0.173RO2_N  + 
+	 0.596R2O2+ 0.01HCHO + 
+	 0.439CCHO + 0.213RCHO + 
+	 0.006ACET + 0.177MEK + 
+	 0.048PROD2 + 0.31RNO3 : 			(7.80e-12);
+{177} RNO3 + hv = NO2 + 0.341HO2 + 0.564RO2_R + 
+       0.095RO2_N  + 0.152R2O2+ 0.134HCHO + 
+	 0.431CCHO + 0.147RCHO + 0.02ACET + 
+	 0.243MEK + 0.435PROD2 : 			2.35e-4*(SUN/60.0e0);
+{178} DCB1 + OH = RCHO + RO2_R + CO : 			(5.00e-11);
+{179} DCB1 + O3 = 1.5HO2 + 0.5OH + 
+       1.5CO + GLY : 					(2.00e-18);
+{180} DCB2 + OH = R2O2 + RCHO + CCO_O2 : 		(5.00e-11);
+{181} DCB2 + hv = RO2_R + 0.5CCO_O2 + 0.5HO2 + 
+       CO + R2O2 + 0.5GLY + 0.5MGLY : 			2.06e-1*(3.65e-1*SUN/60.0e0);
+{182} DCB3 + OH = R2O2 + RCHO + CCO_O2 : 		(5.00e-11);
+{183} DCB3 + hv = RO2_R + 0.5CCO_O2 + 0.5HO2 + 
+       CO + R2O2 + 0.5GLY + 0.5MGLY : 			3.32e-2*(7.28e0*SUN/60.0e0);
+{184} CH4 + OH = C_O2 : 				ARR(2.15e-12,1735.0e0,0.0e0);
+{185} ETHENE + OH = RO2_R + 1.61HCHO + 
+       0.195CCHO : 					ARR(1.96e-12,-438.0e0,0.0e0);
+{186} ETHENE + O3 = 0.12OH + 0.12HO2 + 
+       0.5CO+ HCHO + 0.37HCOOH : 			ARR(9.14e-15,2580.0e0,0.0e0);
+{187} ETHENE + NO3 = RO2_R + RCHO : 			ARR(4.39e-13,2282.0e0,2.0e0);
+{188} ETHENE + O3P = 0.5HO2 + 0.2RO2_R + 
+       0.3C_O2 + 0.491CO+ 0.191HCHO +
+	 0.25CCHO + 0.009GLY : 				ARR(1.04e-11,792.0e0,0.0e0);
+{189} ISOPRENE + OH = 0.907RO2_R + 
+       0.093RO2_N  + 0.079R2O2+ 
+	 0.624HCHO + 0.23METHACRO + 
+	 0.32MVK + 0.357ISOPROD : 			ARR(2.50e-11,-408.0e0,0.0e0);
+{190} ISOPRENE + O3 = 0.266OH + 
+       0.066RO2_R + 0.008RO2_N  + 
+	 0.126R2O2+ 0.192MA_RCO3 + 
+	 0.275CO+ 0.592HCHO + 0.1PROD2 + 
+	 0.39METHACRO + 0.16MVK + 
+	 0.204HCOOH + 0.15RCO_OH : 			ARR(7.86e-15,1912.0e0,0.0e0);
+{191} ISOPRENE + NO3 = 0.187NO2 + 
+       0.749RO2_R + 0.064RO2_N  + 
+	 0.187R2O2+ 0.936ISOPROD : 			ARR(3.03e-12,448.0e0,0.0e0);
+{192} ISOPRENE + O3P = 0.01RO2_N  + 
+       0.24R2O2+ 0.25C_O2 + 0.24MA_RCO3 +
+       0.24HCHO + 0.75PROD2 : 				(3.60e-11);
+{193} TERP + OH = 0.75RO2_R + 0.25RO2_N  + 
+       0.5R2O2+ 0.276HCHO +
+       0.474RCHO + 0.276PROD2 : 			ARR(1.83e-11,-449.0e0,0.0e0);
+{194} TERP + O3 = 0.567OH + 0.033HO2 + 
+       0.031RO2_R + 0.18RO2_N  +
+       0.729R2O2+ 0.123CCO_O2 + 
+	 0.201RCO_O2 + 0.157CO+ 
+	 0.235HCHO + 0.205RCHO + 0.13ACET + 
+	 0.276PROD2 + 0.001GLY + 0.031BACL +
+       0.103HCOOH + 0.189RCO_OH : 			ARR(1.08e-15,821.0e0,0.0e0);
+{195} TERP + NO3 = 0.474NO2 + 
+       0.276RO2_R + 0.25RO2_N  + 
+	 0.75R2O2+ 0.474RCHO + 0.276RNO3 : 		ARR(3.66e-12,-175.e00,0.0e0);
+{196} TERP + O3P = 0.147RCHO + 0.853PROD2 : 		(3.27e-11);
+{197} ALK1 + OH = RO2_R + CCHO :			ARR(1.37e-12,498.0e0,2.0e0); 
+{198} ALK2 + OH = 0.246OH + 0.121HO2 + 
+      0.612RO2_R + 0.021RO2_N + 
+      0.16CO + 0.039HCHO + 0.155RCHO +
+      0.417ACET +
+      0.248GLY + 0.121HCOOH : 				ARR(9.87e-12,671.0e0,0.0e0);
+{199} ALK3 + OH = 0.695RO2_R + 0.07RO2_N  + 
+      0.559R2O2+ 0.236TBU_O + 0.026HCHO + 
+	0.445CCHO + 0.122RCHO + 0.024ACET + 
+	0.332MEK : 					ARR(1.019e-11,434.0e0,0.0e0);
+{200} ALK4 + OH = 0.835RO2_R + 0.143RO2_N  + 
+      0.936R2O2+ 0.011C_O2 + 0.011CCO_O2 + 
+	0.002CO+ 0.024HCHO + 0.455CCHO + 
+	0.244RCHO + 0.452ACET + 0.11MEK + 
+	0.125PROD2 : 					ARR(5.946e-12,91.0e0,0.0e0);
+{201} ALK5 + OH = 0.653RO2_R + 0.347RO2_N  + 
+      0.948R2O2+ 0.026HCHO + 0.099CCHO + 
+	0.204RCHO + 0.072ACET + 0.089MEK + 
+	0.417PROD2 : 					ARR(1.112e-11,52.0e0,0.0e0);
+{202} ARO1 + OH = 0.224HO2 + 0.765RO2_R + 
+      0.011RO2_N  + 0.055PROD2 + 0.118GLY + 
+	0.119MGLY + 0.017PHEN + 0.207CRES + 
+	0.059BALD + 0.491DCB1 + 0.108DCB2 + 
+	0.051DCB3 : 					ARR(1.81e-12,-355.0e0,0.0e0);
+{203} ARO2 + OH = 0.187HO2 + 0.804RO2_R + 
+      0.009RO2_N  + 0.097GLY + 0.287MGLY + 
+	0.087BACL + 0.187CRES + 0.05BALD + 
+	0.561DCB1 + 0.099DCB2 + 0.093DCB3 : 		(2.640e-11);
+{204} OLE1 + OH = 0.91RO2_R + 0.09RO2_N  + 
+      0.205R2O2+ 0.732HCHO + 0.294CCHO + 
+	0.497RCHO + 0.005ACET + 0.119PROD2 : 		ARR(7.095e-12,-451.0e0,0.0e0);
+{205} OLE1 + O3 = 0.155OH + 0.056HO2 + 
+      0.022RO2_R + 0.001RO2_N  + 
+	0.076C_O2 + 0.345CO+ 0.5HCHO + 
+	0.154CCHO + 0.363RCHO + 0.001ACET + 
+	0.215PROD2 + 0.185HCOOH + 
+	0.05CCO_OH + 0.119RCO_OH : 			ARR(2.617e-15,1640.0e0,0.0e0);
+{206} OLE1 + NO3 = 0.824RO2_R + 0.176RO2_N  + 
+      0.488R2O2+ 0.009CCHO + 0.037RCHO + 
+	0.024ACET + 0.511RNO3 : 			ARR(4.453e-14,376.0e0,0.0e0);
+{207} OLE1 + O3P = 0.45RCHO + 0.437MEK + 
+      0.113PROD2 : 					ARR(1.074e-11,234.0e0,0.0e0);
+{208} OLE2 + OH = 0.918RO2_R + 0.082RO2_N  + 
+      0.001R2O2+ 0.244HCHO + 0.732CCHO + 
+	0.511RCHO + 0.127ACET + 0.072MEK + 
+	0.061BALD + 0.025METHACRO + 
+	0.025ISOPROD : 					ARR(1.743e-11,-384.0e0,0.0e0);
+{209} OLE2 + O3 = 0.378OH + 0.003HO2 + 
+      0.033RO2_R + 0.002RO2_N  + 0.137R2O2+ 
+	0.197C_O2 + 0.137CCO_O2 + 
+	0.006RCO_O2 + 0.265CO+ 0.269HCHO + 
+	0.456CCHO + 0.305RCHO + 0.045ACET + 
+	0.026MEK + 0.043PROD2 + 0.042BALD + 
+	0.026METHACRO + 0.019MVK + 
+	0.073HCOOH + 0.129CCO_OH + 
+	0.247RCO_OH : 					ARR(5.022e-16,461.0e0,0.0e0);
+{210} OLE2 + NO3 = 0.391NO2 + 0.442RO2_R + 
+      0.136RO2_N  + 0.711R2O2+ 0.03C_O2 + 
+	0.079HCHO + 0.507CCHO + 0.151RCHO + 
+	0.102ACET + 0.001MEK + 0.015BALD + 
+	0.048MVK + 0.321RNO3 : 				(7.265e-13);
+{211} OLE2 + O3P = 0.013HO2 + 0.012RO2_R + 
+      0.001RO2_N  + 0.012CO+ 0.069RCHO + 
+	0.659MEK + 0.259PROD2 + 
+	0.012METHACRO : 				(2.085e-11);
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprc99.spc	(revision 3477)
@@ -0,0 +1,87 @@
+#include atoms
+
+#DEFVAR   
+
+        O3        	= 3O;
+	H2O2		= 2H + 2O;        
+	NO		= N + O;
+	NO2		= N + 2O;
+	NO3		= N + 3O;
+	N2O5		= 2N + 5O;
+	HONO		= H + 2O + N;
+	HNO3		= H + N + 3O;
+	HNO4		= H + N + 4O;
+	SO2		= S + 2O;	
+	H2SO4		= 2H + S + 4O;		
+	CO 		= C + O;
+	HCHO		= 2H + C + O;	
+	CCHO		= 2C + H + O;	
+	RCHO		= 3C + IGNORE;
+	ACET		= 			IGNORE;	
+	MEK		= 			IGNORE;
+	HCOOH		= 2H + C + 2O;	
+	MEOH		= 			IGNORE;
+	CCO_OH		= 			IGNORE;
+	RCO_OH		= 			IGNORE;	
+	GLY		= 			IGNORE;
+	MGLY		= 3C + 4H + 2O;	
+	BACL		=			IGNORE;		
+	CRES		= 			IGNORE;
+	BALD		= 			IGNORE;	
+	ISOPROD		=			IGNORE;	
+	METHACRO	= 			IGNORE;
+	MVK		=  			IGNORE;
+	PROD2		= 			IGNORE;	
+	DCB1		= 			IGNORE;
+	DCB2		= 			IGNORE;
+	DCB3 		= 			IGNORE;
+	ETHENE		= 2C + 4H;
+	ISOPRENE	= 			IGNORE;
+        ALK1		=			IGNORE;	
+	ALK2		= 			IGNORE;
+	ALK3		= 			IGNORE;
+	ALK4		= 			IGNORE;
+	ALK5		= 			IGNORE;		
+	ARO1		= 			IGNORE;
+	ARO2		= 			IGNORE;
+	OLE1		= 			IGNORE;
+	OLE2		= 			IGNORE;	
+	TERP		= 			IGNORE;
+	RNO3		= 			IGNORE;	
+	NPHE		= 			IGNORE;	
+	PHEN		= 			IGNORE;	
+	PAN		= 2C + 3H + 5O + N;	
+	PAN2		= N + IGNORE;	
+	PBZN		= N + IGNORE;
+	MA_PAN		= N + IGNORE;
+	CCO_OOH		= 2C + 3O + H;
+	RCO_O2		= 			IGNORE;	
+	RCO_OOH		= 			IGNORE;				
+	XN		= 			IGNORE;	
+	XC		= 			IGNORE;
+	O3P		= O;
+	O1D		= O;
+	OH		= H + O;
+	HO2		= H+ 2O;	
+	C_O2		= 			IGNORE;
+	COOH		= C + 2O + H;
+	ROOH		= 			IGNORE;	
+	RO2_R		= 			IGNORE;	
+	R2O2		= 			IGNORE;
+	RO2_N		= 			IGNORE;	
+	HOCOO		= H + 3O + C;
+	CCO_O2		= 			IGNORE;	
+	BZCO_O2		= 			IGNORE;
+	BZNO2_O		= 			IGNORE;	
+	BZ_O		= 			IGNORE;
+	MA_RCO3		= 			IGNORE;									
+	TBU_O		= 			IGNORE;
+	
+
+
+#DEFFIX	
+	AIR		= IGNORE;
+	O2		= 2O;
+	H2O		= 2H + O;
+	H2		= 2H;	
+	CH4		= C + 4H;	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.def	(revision 3477)
@@ -0,0 +1,79 @@
+#include saprcnov.spc
+#include saprcnov.eqn
+
+{#LANGUAGE Fortran77
+#INTEGRATOR rodas3
+#DRIVER general}
+
+#LOOKATALL
+#MONITOR O3; NO; NO2; SO2;
+
+#INITVALUES
+
+   CFACTOR = 2.4476E+13;
+
+   ALl_SPEC = 0.0E0;
+   NO = 1.0E-1;
+   NO2 = 5.0E-2;
+   HONO = 1.E-3;
+   SO2 = 5.E-2;
+   ISOPRENE = 4.33E-4;
+   TERP = 8.20E-4;
+   ETHENE = 1.89E-2;
+   MEOH = 5.89E-3;
+   HCOOH = 6.77E-4;
+   CCO_OH = 1.16E-3;
+   RCO_OH = 3.92E-4;
+   HCHO = 1.12E-2;
+   CCHO = 2.32E-3;
+   RCHO = 1.72E-3;
+   GLY = 1.21E-4;
+   MGLY = 8.37E-5;
+   METHACRO = 1.30E-3;
+   ISOPROD = 8.93E-5;
+   BALD = 7.51E-5;
+   ACET = 5.07E-3;
+   MEK = 3.26E-3;
+   PROD2 = 1.93E-3;
+   PHEN = 6.06E-4;
+   CRES = 5.60E-4;
+   ALK3 = 4.69E-2;
+   ALK4 = 4.17E-2;
+   ALK5 = 3.06E-2;
+   ARO1 = 1.18E-2;
+   ARO2 = 8.74E-3;
+   OLE1 = 1.04E-2;
+   OLE2 = 7.97E-3;
+   CH4 = 0.07E0;
+   H2O = 2.0E+04; 
+   O2  = 2.09E+5;
+   AIR = 1.0E6;  
+   
+#INLINE F77_INIT
+	TSTART = 0.0D0
+	TEND = TSTART + 2*24*3600.0D0 ! 2160.0D0*60.0D0
+	DT = 3600.D0
+        TEMP = 300.0D0
+#ENDINLINE   
+
+#INLINE F90_INIT
+	TSTART = 0.0D0
+	TEND = TSTART + 2*24*3600.0D0 ! 2160.0D0*60.0D0
+	DT = 3600.D0
+        TEMP = 300.0D0
+#ENDINLINE   
+ 
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 0.0;
+   TEND = TSTART  + 2*24*3600.0D0; 
+   DT = 3600.0;
+   TEMP = 300.00;
+#ENDINLINE   
+ 
+#INLINE C_INIT
+   TSTART = 0.0;
+   TEND = TSTART  + 2*24*3600.0D0; /*+ 2160.0*60.0;*/
+   DT = 3600.0;
+   TEMP = 300.00;
+#ENDINLINE   
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.eqn	(revision 3477)
@@ -0,0 +1,386 @@
+#Equations
+
+{1} NO2 + hv = NO + O3P : 				1.0*SUN;
+{2} O3P + O2 + AIR = O3 : 				ARR(5.68e-34,0.0,-2.80);
+{3} O3P + O3 = 2O2 : 					ARR(8.00e-12,2060.0,0.0);
+{4} O3P + NO + AIR = NO2 : 				ARR(1.00e-31,0.0,-1.60);
+{5} O3P + NO2 = NO : 					ARR(6.50e-12,-120.0,0.0);
+{6} O3P + NO2   = NO3 : 				FALL(9.00e-32,0.0,-2.00,2.20e-11,0.0,0.0,0.80);
+{7} O3 + NO = NO2 : 					ARR(1.80e-12,1370.0,0.0);
+{8} O3 + NO2 = NO3 : 					ARR(1.40e-13,2470.0,0.0);
+{9} NO + NO3 = 2NO2 : 					ARR(1.80e-11,-110.0,0.0);
+{10} NO + NO + O2 = 2NO2 : 				ARR(3.30e-39,-530.0,0.0);
+{11} NO2 + NO3   = N2O5 : 				FALL(2.80e-30,0.0,-3.50,2.00e-12,0.0,0.20,0.45);
+{12} N2O5   = NO2 + NO3 : 			        FALL(1.e-3,11000.0,-3.5,9.7e14,11080.0,0.1,0.45);
+{13} N2O5 + H2O = 2HNO3 : 				(2.60e-22);
+{14} NO2 + NO3 = NO + NO2 : 				ARR(4.50e-14,1260.0,0.0);
+{15} NO3 + hv = NO : 					1.0*SUN;
+{16} NO3 + hv = NO2 + O3P : 				1.0*SUN;
+{17} O3 + hv = O3P : 					1.0*SUN;
+{18} O3 + hv = O1D : 					1.0*SUN;
+{19} O1D + H2O = 2OH : 					(2.20e-10);
+{20} O1D + AIR = O3P : 					ARR(2.09e-11,-95.0,0.0);
+{21} OH + NO   = HONO : 				FALL(7.00e-31,0.0,-2.60,3.60e-11,0.0,-0.10,0.60);
+{22} HONO + hv = OH + NO : 				1.0*SUN;
+{23} HONO + hv = HO2 + NO2 : 				1.0*SUN;
+{24} OH + HONO = NO2 : 					ARR(2.70e-12,-260.0,0.0);
+{25} OH + NO2 = HNO3 : 					FALL(2.43e-30, 0.0,-3.10,1.67e-11,0.0,-2.10,0.60);
+{26} OH + NO3 = HO2 + NO2 : 				(2.00e-11);
+{27} OH + HNO3 = NO3 : 					EP2(7.20e-15,-785.0,4.10e-16,-1440.0,1.90e-33,-725.0);
+{28} HNO3 + hv = OH + NO2 : 				1.0*SUN;
+{29} OH + CO = HO2 : 					EP3(1.30e-13,0.0,3.19e-33,0.0);
+{30} OH + O3 = HO2 : 					ARR(1.90e-12,1000.0,0.0);
+{31} HO2 + NO = OH + NO2 : 				ARR(3.40e-12,-270.0,0.0);
+{32} HO2 + NO2  = HNO4 : 				FALL(1.80e-31,0.0,-3.20,4.70e-12,0.0,0.0,0.60);
+{33} HNO4  = HO2 + NO2 : 			        FALL(4.10e-05,10650.0,0.0,5.7e+15,11170.0,0.0,0.5);
+{34} HNO4 + hv = 0.61HO2 + 0.61NO2 + 0.39OH + 
+            0.39NO3 : 					1.0*SUN;
+{35} HNO4 + OH = NO2 : 					ARR(1.50e-12,-360.0,0.0);
+{36} HO2 + O3 = OH : 					ARR(1.40e-14,600.0,0.0);
+{37} HO2 + HO2 = H2O2 : 				EP3(2.20e-13,-600.0,1.85e-33,-980.0);
+//{38} HO2 + HO2 + H2O = H2O2 : 				EP3(3.08e-34,-2800.0,2.59e-54,-3180.0);
+{38} HO2 + HO2 + H2O = H2O2 : 				EP3(3.08e-34,-2800.0,2.59e-38,-3180.0);
+{39} NO3 + HO2 = 0.8OH + 0.8NO2 + 0.2HNO3 : 		(4.00e-12);
+{40} NO3 + NO3 = 2NO2 : 				ARR(8.50e-13,2450.0,0.0);
+{41} H2O2 + hv = 2OH : 					1.0*SUN;
+{42} H2O2 + OH = HO2 : 					ARR(2.90e-12,160.0,0.0);
+{43} OH + HO2 = H2O + O2 : 				ARR(4.80e-11,-250.0,0.0);
+{44} OH + SO2   = HO2 + H2SO4 :  		    	FALL(4.00e-31,0.0,-3.30,2.00e-12,0.0,0.0,0.45);
+{45} OH + H2 = HO2 :				    	ARR(7.70e-12,2100.0,0.0);
+{46} C_O2 + NO = NO2 + HCHO + HO2 : 	    		ARR(2.80e-12,-285.0,0.0);
+{47} C_O2 + HO2 = COOH :			    	ARR(3.80e-13,-780.0,0.0);
+{48} C_O2 + NO3 = HCHO + HO2 + NO2 :	    		(1.30e-12);
+{49} C_O2 + C_O2 = MEOH + HCHO :		    	ARR(2.45e-14,-710.0,0.0);
+{50} C_O2 + C_O2 = 2HCHO + 2HO2 : 	    		ARR(5.90e-13,509.0,0.0);
+{51} RO2_R + NO = NO2 + HO2 : 		    		ARR(2.70e-12,-360.0,0.0);
+{52} RO2_R + HO2 = ROOH :			    	ARR(1.90e-13,-1300.0,0.0);
+{53} RO2_R + NO3 = NO2 + HO2 :		    		(2.30e-12);
+{54} RO2_R + C_O2 = HO2 + 0.75HCHO +
+                      0.25MEOH : 			(2.00e-13);
+{55} RO2_R + RO2_R = HO2 :			    	(3.50e-14);
+{56} R2O2 + NO = NO2 :  			    	ARR(2.70e-12,-360.0,0.0); {1.0*RCONST(51);}
+{57} R2O2 + HO2 = HO2 : 			    	ARR(1.90e-13,-1300.0,0.0); {1.0*RCONST(52);}
+{58} R2O2 + NO3 = NO2 : 			    	(2.30e-12); {1.0*RCONST(53);}
+{59} R2O2 + C_O2 = C_O2 :			    	(2.00e-13); {1.0*RCONST(54);}
+{60} R2O2 + RO2_R = RO2_R :			    	(3.50e-14); {1.0*RCONST(55);}
+{61} R2O2 + R2O2 = 2R2O2 :				(0.0);
+{62} RO2_N + NO = RNO3 :			    	ARR(2.70e-12,-360.0,0.0); {1.0*RCONST(51);}
+{63} RO2_N + HO2 = ROOH :			    	ARR(1.90e-13,-1300.0,0.0); {1.0*RCONST(52);}
+{64} RO2_N + C_O2 = HO2 + 0.25MEOH +
+       0.5MEK + 0.5PROD2 + 0.75HCHO : 			(2.00e-13); {1.0*RCONST(54);}
+{65} RO2_N + NO3 = NO2 + HO2 + MEK : 			(2.30e-12); {1.0*RCONST(53);}
+{66} RO2_N + RO2_R = HO2 + 0.5MEK + 
+       0.5PROD2 : 					(3.50e-14); {1.0*RCONST(55);}
+{67} RO2_N + R2O2 = RO2_N : 				(3.50e-14); {1.0*RCONST(55);}
+{68} RO2_N + RO2_N = MEK + HO2 + PROD2 : 		(3.50e-14); {1.0*RCONST(55);}
+{69} CCO_O2 + NO2  = PAN : 				FALL(2.70e-28,0.0,-7.10,1.20e-11,0.0,-0.90,0.30);
+{70} PAN  = CCO_O2 + NO2 : 				FALL(4.90e-3,12100.0,0.0,4.0e+16,13600.0,0.,0.3);
+{71} CCO_O2 + NO = C_O2 + NO2 : 			ARR(7.80e-12,-300.0,0.0);
+{72} CCO_O2 + HO2 = 0.75CCO_OOH + 
+       0.25CCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0,0.0);
+{73} CCO_O2 + NO3 = C_O2 + NO2 : 			(4.00e-12);
+{74} CCO_O2 + C_O2 = CCO_OH + HCHO : 			ARR(1.80e-12,-500.0,0.0);
+{75} CCO_O2 + RO2_R = CCO_OH : 				(7.50e-12);
+{76} CCO_O2 + R2O2 = CCO_O2 : 				(7.50e-12);
+{77} CCO_O2 + RO2_N = CCO_OH + PROD2 : 			(7.50e-12);
+{78} CCO_O2 + CCO_O2 = 2C_O2 : 				ARR(2.90e-12,-500.0,0.0);
+{79} RCO_O2 + NO2 = PAN2 : 				ARR(1.20e-11,0.0,-0.90);
+{80} PAN2 = RCO_O2 + NO2 : 				ARR(2.00e+15,12800.0,0.0);
+{81} RCO_O2 + NO = NO2 + CCHO + RO2_R : 		ARR(1.25e-11,-240.0,0.0);
+{82} RCO_O2 + HO2 = 0.75RCO_OOH + 
+       0.25RCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0,0.0); {1.0*RCONST(72);}
+{83} RCO_O2 + NO3 = NO2 + CCHO + RO2_R : 		(4.00e-12); {1.0*RCONST(73);}
+{84} RCO_O2 + C_O2 = RCO_OH + HCHO : 			ARR(1.80e-12,-500.0,0.0); {1.0*RCONST(74);}
+{85} RCO_O2 + RO2_R = RCO_OH : 				(7.50e-12); {1.0*RCONST(75);}
+{86} RCO_O2 + R2O2 = RCO_O2 : 				(7.50e-12); {1.0*RCONST(75);}
+{87} RCO_O2 + RO2_N = RCO_OH + PROD2 : 			(7.50e-12); {1.0*RCONST(75);}
+{88} RCO_O2 + CCO_O2 = C_O2 + CCHO + RO2_R : 		ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{89} RCO_O2 + RCO_O2 = 2CCHO + 2RO2_R : 		ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{90} BZCO_O2 + NO2 = PBZN : 				(1.37e-11);
+{91} PBZN = BZCO_O2 + NO2 : 				ARR(7.90e+16,14000.0,0.0);
+{92} BZCO_O2 + NO = NO2 + BZ_O + R2O2 : 		ARR(1.25e-11,-240.0,0.0); {1.0*RCONST(81);}
+{93} BZCO_O2 + HO2 = 0.75RCO_OOH + 
+       0.25RCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0,0.0); {1.0*RCONST(72);}
+{94} BZCO_O2 + NO3 = NO2 + BZ_O + R2O2 : 		(4.00e-12); {1.0*RCONST(73);}
+{95} BZCO_O2 + C_O2 = RCO_OH + HCHO : 			ARR(1.80e-12,-500.0,0.0); {1.0*RCONST(74);}
+{96} BZCO_O2 + RO2_R = RCO_OH : 			(7.50e-12); {1.0*RCONST(75);}
+{97} BZCO_O2 + R2O2 = BZCO_O2 : 			(7.50e-12); {1.0*RCONST(75);}
+{98} BZCO_O2 + RO2_N = RCO_OH + PROD2 : 		(7.50e-12); {1.0*RCONST(75);}
+{99} BZCO_O2 + CCO_O2 = C_O2 + BZ_O + R2O2 : 		ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{100} BZCO_O2 + RCO_O2 = CCHO + RO2_R + 
+       BZ_O + R2O2 : 					ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{101} BZCO_O2 + BZCO_O2 = 2BZ_O + 2R2O2: 		ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{102} MA_RCO3 + NO2 = MA_PAN : 				ARR(1.20e-11,0.0,-0.90); {1.0*RCONST(79);}
+{103} MA_PAN = MA_RCO3 + NO2 : 				ARR(1.60e+16,13486.0,0.0);
+{104} MA_RCO3 + NO = NO2 + HCHO + CCO_O2 : 		ARR(1.25e-11,-240.0,0.0); {1.0*RCONST(81);}
+{105} MA_RCO3 + HO2 = 0.75RCO_OOH + 
+       0.25RCO_OH + 0.25O3 : 				ARR(4.30e-13,-1040.0,0.0); {1.0*RCONST(72);}
+{106} MA_RCO3 + NO3 = NO2 + HCHO + CCO_O2 : 		(4.00e-12); {1.0*RCONST(73);}
+{107} MA_RCO3 + C_O2 = RCO_OH + HCHO : 			ARR(1.80e-12,-500.0,0.0); {1.0*RCONST(74);}
+{108} MA_RCO3 + RO2_R = RCO_OH : 			(7.50e-12); {1.0*RCONST(75);}
+{109} MA_RCO3 + R2O2 = MA_RCO3 : 			(7.50e-12); {1.0*RCONST(75);}
+{110} MA_RCO3 + RO2_N = 2RCO_OH : 			(7.50e-12); {1.0*RCONST(75);}
+{111} MA_RCO3 + CCO_O2 = C_O2 + HCHO + 
+       CCO_O2 : 					ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{112} MA_RCO3 + RCO_O2 = HCHO + CCO_O2 + 
+       CCHO + RO2_R : 					ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{113} MA_RCO3 + BZCO_O2 = HCHO + CCO_O2 + 
+       BZ_O + R2O2 : 					ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{114} MA_RCO3 + MA_RCO3 = 2HCHO + 2CCO_O2 : 		ARR(2.90e-12,-500.0,0.0); {1.0*RCONST(78);}
+{115} TBU_O + NO2 = RNO3 : 				(2.40e-11);
+{116} TBU_O = ACET + C_O2 : 				ARR(7.50e+14,8152.0,0.0);
+{117} BZ_O + NO2 = NPHE : 				ARR(2.30e-11,-150.0,0.0);
+{118} BZ_O + HO2 = PHEN : 				ARR(1.90e-13,-1300.0,0.0); {1.0*RCONST(52);}
+{119} BZ_O = PHEN : 					(1.00e-03);
+{120} BZNO2_O + NO2 =  2XN + 6XC: 			ARR(7.50e+14,8152.0,0.0);  {1.0*RCONST(116);}
+{121} BZNO2_O + HO2 = NPHE : 				ARR(2.30e-11,-150.0,0.0);  {1.0*RCONST(117);}
+{122} BZNO2_O  = NPHE :					ARR(1.90e-13,-1300.0,0.0); {1.0*RCONST(118);}
+{123} HCHO + hv = 2HO2 + CO :				1.0*SUN;
+{124} HCHO + hv = CO : 					1.0*SUN;
+{125} HCHO + OH = HO2 + CO :  				ARR(8.60e-12,-20.0,0.0);
+{126} HCHO + HO2 = HOCOO :				ARR(9.70e-15,-625.0,0.0);
+{127} HOCOO = HO2 + HCHO :				ARR(2.40e+12,7000.0,0.0);
+{128} HOCOO + NO = HCOOH + NO2 + HO2 :			ARR(2.80e-12,-285.0,0.0); {1.0*RCONST(46);}
+{129} HCHO + NO3 = HNO3 + HO2 + CO :			ARR(2.00e-12,2431.0,0.0);
+{130} CCHO + OH = CCO_O2 :				ARR(5.60e-12,-310.0,0.0);
+{131} CCHO +hv = CO + HO2 + C_O2 : 				1.0*SUN;
+{132} CCHO + NO3 = HNO3 + CCO_O2 : 			ARR(1.40e-12,1860.0,0.0);
+{133} RCHO + OH = 0.034RO2_R + 0.001RO2_N  + 
+       0.965RCO_O2 + 0.034CO+ 0.034CCHO : 		(2.00e-11);
+{134} RCHO + hv = CCHO + RO2_R + CO + HO2 : 		1.0*SUN;
+{135} RCHO + NO3 = HNO3 + RCO_O2 : 			ARR(1.40e-12,1771.0,0.0);
+{136} ACET + OH = HCHO + CCO_O2 + R2O2 : 		ARR(1.10e-12,520.0,0.0);
+{137} ACET + hv  = CCO_O2 + C_O2 : 			1.0*SUN;
+{138} MEK + OH = 0.37RO2_R + 0.042RO2_N  + 
+       0.616R2O2+ 0.492CCO_O2 + 
+	 0.096RCO_O2 + 0.115HCHO + 
+	 0.482CCHO + 0.37RCHO : 			ARR(1.30e-12,25.0,2.0);
+{139} MEK + hv = CCO_O2 + CCHO + RO2_R : 		1.50e-1*SUN;
+{140} MEOH + OH = HCHO + HO2 : 				ARR(3.10e-12,360.0,2.0);
+{141} ETOH + OH = 0.95HO2 + 0.05RO2_R +
+      0.081HCHO + 0.96CCHO :				ARR(0.0,0.0,1.0);
+{142} COOH + OH = 0.35HCHO + 0.35OH + 
+       0.65C_O2 : 					ARR(2.90e-12,-190.0,0.0);
+{143} COOH + hv = HCHO + HO2 + OH :		      	1.0*SUN;
+{144} ROOH + OH = RCHO + 0.34RO2_R + 
+       0.66OH : 					(1.10e-11);
+{145} ROOH + hv = RCHO + HO2 + OH : 		        1.0*SUN;
+{146} GLY + hv = 2CO+ 2HO2 : 				1.0*SUN;
+{147} GLY + hv = HCHO + CO : 				6.00e-3*SUN;
+{148} GLY + OH = 0.63HO2 + 1.26CO+ 
+       0.37RCO_O2 : 					(1.10e-11);
+{149} GLY + NO3 = HNO3 + 0.63HO2 + 
+       1.26CO+ 0.37RCO_O2 : 				ARR(2.80e-12,2376.0,0.0);
+{150} MGLY + hv = HO2 + CO + CCO_O2 : 			1.0*SUN;
+{151} MGLY + OH = CO + CCO_O2 :				(1.50e-11);
+{152} MGLY + NO3 = HNO3 + CO + CCO_O2 : 		ARR(1.40e-12,1895.0,0.0);
+{153} BACL + hv = 2CCO_O2 : 				1.0*SUN;
+{154} PHEN + OH = 0.24BZ_O + 0.76RO2_R + 
+       0.23GLY : 					(2.63e-11);
+{155} PHEN + NO3 = HNO3 + BZ_O : 			(3.78e-12);
+{156} CRES + OH = 0.24BZ_O + 0.76RO2_R + 
+       0.23MGLY : 					(4.20e-11);
+{157} CRES + NO3 = HNO3 + BZ_O : 			(1.37e-11);
+{158} NPHE + NO3 = HNO3 + BZNO2_O : 			(2.63e-11); {1.0*RCONST(154);}
+{159} BALD + OH = BZCO_O2 : 				(1.29e-11);
+{160} BALD + hv =  7XC: 				5.00e-2*SUN;
+{161} BALD + NO3 = HNO3 + BZCO_O2 : 			ARR(1.40e-12,1872.0,0.0);
+{162} METHACRO + OH = 0.5RO2_R + 0.416CO+ 
+       0.084HCHO + 0.416MEK +
+       0.084MGLY + 0.5MA_RCO3 : 			ARR(1.86e-11,-176.0,0.0);
+{163} METHACRO + O3 = 0.008HO2 + 0.1RO2_R + 
+       0.208OH + 0.1RCO_O2 + 0.45CO+
+       0.2HCHO + 0.9MGLY + 0.333HCOOH : 		ARR(1.36e-15,2114.0,0.0);
+{164} METHACRO + NO3 = 0.5HNO3 + 0.5RO2_R + 
+      0.5CO+ 0.5MA_RCO3 : 				ARR(1.50e-12,1726.0,0.0);
+{165} METHACRO + O3P = RCHO : 				(6.34e-12);
+{166} METHACRO + hv = 0.34HO2 + 0.33RO2_R + 
+       0.33OH + 0.67CCO_O2 + 0.67CO+
+       0.67HCHO + 0.33MA_RCO3 : 			4.10e-3*SUN;
+{167} MVK + OH = 0.3RO2_R + 0.025RO2_N  + 
+       0.675R2O2+ 0.675CCO_O2 +
+       0.3HCHO + 0.675RCHO + 0.3MGLY : 			ARR(4.14e-12,-453.0,0.0);
+{168} MVK + O3 = 0.064HO2 + 0.05RO2_R + 
+       0.164OH + 0.05RCO_O2 + 0.475CO+
+       0.1HCHO + 0.95MGLY + 0.351HCOOH : 		ARR(7.51e-16,1520.0,0.0);
+{169} MVK + O3P = 0.45RCHO + 0.55MEK : 			(4.32e-12);
+{170} MVK + hv = 0.3C_O2 + 0.7CO+ 0.7PROD2 + 
+       0.3MA_RCO3 : 					2.10e-3*SUN;
+{171} ISOPROD + OH = 0.67RO2_R + 
+       0.041RO2_N  + 0.289MA_RCO3 + 
+	 0.336CO+ 0.055HCHO + 0.129CCHO + 
+	 0.013RCHO + 0.15MEK + 0.332PROD2 +
+       0.15GLY + 0.174MGLY : 				(6.19e-11);
+{172} ISOPROD + O3 = 0.4HO2 + 0.048RO2_R + 
+       0.048RCO_O2 + 0.285OH +
+       0.498CO+ 0.125HCHO + 0.047CCHO + 
+	 0.21MEK + 0.023GLY + 0.742MGLY + 
+	 0.1HCOOH + 0.372RCO_OH : 			(4.18e-18);
+{173} ISOPROD + NO3 = 0.799RO2_R + 
+       0.051RO2_N  + 0.15MA_RCO3 + 0.572CO+
+       0.15HNO3 + 0.227HCHO + 0.218RCHO + 
+	 0.008MGLY + 0.572RNO3 : 			(1.00e-13);
+{174} ISOPROD + hv = 1.233HO2 + 0.467CCO_O2 + 
+       0.3RCO_O2 + 1.233CO+ 0.3HCHO +
+       0.467CCHO + 0.233MEK : 				4.10e-3*SUN;
+{175} PROD2 + OH = 0.379HO2 + 0.473RO2_R + 
+       0.07RO2_N  + 0.029CCO_O2 +
+       0.049RCO_O2 + 0.213HCHO + 
+	 0.084CCHO + 0.558RCHO + 
+	 0.115MEK + 0.329PROD2 : 			(1.50e-11);
+{176} PROD2 + hv = 0.96RO2_R + 0.04RO2_N  + 
+       0.515R2O2+ 0.667CCO_O2 + 
+	 0.333RCO_O2 + 0.506HCHO + 
+	 0.246CCHO + 0.71RCHO : 			2.00e-2*SUN;
+{177} RNO3 + OH = 0.338NO2 + 0.113HO2 + 
+       0.376RO2_R + 0.173RO2_N  + 
+	 0.596R2O2+ 0.01HCHO + 
+	 0.439CCHO + 0.213RCHO + 
+	 0.006ACET + 0.177MEK + 
+	 0.048PROD2 + 0.31RNO3 : 			(7.80e-12);
+{178} RNO3 + hv = NO2 + 0.341HO2 + 0.564RO2_R + 
+       0.095RO2_N  + 0.152R2O2+ 0.134HCHO + 
+	 0.431CCHO + 0.147RCHO + 0.02ACET + 
+	 0.243MEK + 0.435PROD2 : 			1.0*SUN;
+{179} DCB1 + OH = RCHO + RO2_R + CO : 			(5.00e-11);
+{180} DCB1 + O3 = 1.5HO2 + 0.5OH + 
+       1.5CO + GLY : 					(2.00e-18);
+{181} DCB2 + OH = R2O2 + RCHO + CCO_O2 : 		(5.00e-11);
+{182} DCB2 + hv = RO2_R + 0.5CCO_O2 + 0.5HO2 + 
+       CO + R2O2 + 0.5GLY + 0.5MGLY : 			3.65e-1*SUN;
+{183} DCB3 + OH = R2O2 + RCHO + CCO_O2 : 		(5.00e-11);
+{184} DCB3 + hv = RO2_R + 0.5CCO_O2 + 0.5HO2 + 
+       CO + R2O2 + 0.5GLY + 0.5MGLY : 			7.28*SUN;
+{185} CH4 + OH = C_O2 : 				ARR(2.15e-12,1735.0,0.0);
+{186} ETHENE + OH = RO2_R + 1.61HCHO + 
+       0.195CCHO : 					ARR(1.96e-12,-438.0,0.0);
+{187} ETHENE + O3 = 0.12OH + 0.12HO2 + 
+       0.5CO+ HCHO + 0.37HCOOH : 			ARR(9.14e-15,2580.0,0.0);
+{188} ETHENE + NO3 = RO2_R + RCHO : 			ARR(4.39e-13,2282.0,2.0);
+{189} ETHENE + O3P = 0.5HO2 + 0.2RO2_R + 
+       0.3C_O2 + 0.491CO+ 0.191HCHO +
+	 0.25CCHO + 0.009GLY : 				ARR(1.04e-11,792.0,0.0);
+{190} ISOPRENE + OH = 0.907RO2_R + 
+       0.093RO2_N  + 0.079R2O2+ 
+	 0.624HCHO + 0.23METHACRO + 
+	 0.32MVK + 0.357ISOPROD : 			ARR(2.50e-11,-408.0,0.0);
+{191} ISOPRENE + O3 = 0.266OH + 
+       0.066RO2_R + 0.008RO2_N  + 
+	 0.126R2O2+ 0.192MA_RCO3 + 
+	 0.275CO+ 0.592HCHO + 0.1PROD2 + 
+	 0.39METHACRO + 0.16MVK + 
+	 0.204HCOOH + 0.15RCO_OH : 			ARR(7.86e-15,1912.0,0.0);
+{192} ISOPRENE + NO3 = 0.187NO2 + 
+       0.749RO2_R + 0.064RO2_N  + 
+	 0.187R2O2+ 0.936ISOPROD : 			ARR(3.03e-12,448.0,0.0);
+{193} ISOPRENE + O3P = 0.01RO2_N  + 
+       0.24R2O2+ 0.25C_O2 + 0.24MA_RCO3 +
+       0.24HCHO + 0.75PROD2 : 				(3.60e-11);
+{194} TERP + OH = 0.75RO2_R + 0.25RO2_N  + 
+       0.5R2O2+ 0.276HCHO +
+       0.474RCHO + 0.276PROD2 : 			ARR(1.83e-11,-449.0,0.0);
+{195} TERP + O3 = 0.567OH + 0.033HO2 + 
+       0.031RO2_R + 0.18RO2_N  +
+       0.729R2O2+ 0.123CCO_O2 + 
+	 0.201RCO_O2 + 0.157CO+ 
+	 0.235HCHO + 0.205RCHO + 0.13ACET + 
+	 0.276PROD2 + 0.001GLY + 0.031BACL +
+       0.103HCOOH + 0.189RCO_OH : 			ARR(1.08e-15,821.0,0.0);
+{196} TERP + NO3 = 0.474NO2 + 
+       0.276RO2_R + 0.25RO2_N  + 
+	 0.75R2O2+ 0.474RCHO + 0.276RNO3 : 		ARR(3.66e-12,-175.0,0.0);
+{197} TERP + O3P = 0.147RCHO + 0.853PROD2 : 		(3.27e-11);
+{198} C2H6 + OH = RO2_R + CCHO :			ARR(1.37e-12,498.0,2.0); 
+{199} C3H8 + OH = 0.965RO2_R + 0.035RO2_N +
+      0.261RCHO + 0.704ACET :				ARR(0.0,0.0,1.0);
+{200} C2H2 + OH = 0.603OH + 0.297HO2 + 
+      0.1RO2_R + 0.393CO + 0.096HCHO + 
+      0.607GLY + 0.297HCOOH : 				ARR(9.87e-12,671.0,0.0);
+{201} ALK3 + OH = 0.695RO2_R + 0.07RO2_N  + 
+      0.559R2O2+ 0.236TBU_O + 0.026HCHO + 
+	0.445CCHO + 0.122RCHO + 0.024ACET + 
+	0.332MEK : 					ARR(1.019e-11,434.0,0.0);
+{202} ALK4 + OH = 0.835RO2_R + 0.143RO2_N  + 
+      0.936R2O2+ 0.011C_O2 + 0.011CCO_O2 + 
+	0.002CO+ 0.024HCHO + 0.455CCHO + 
+	0.244RCHO + 0.452ACET + 0.11MEK + 
+	0.125PROD2 : 					ARR(5.946e-12,91.0,0.0);
+{203} ALK5 + OH = 0.653RO2_R + 0.347RO2_N  + 
+      0.948R2O2+ 0.026HCHO + 0.099CCHO + 
+	0.204RCHO + 0.072ACET + 0.089MEK + 
+	0.417PROD2 : 					ARR(1.112e-11,52.0,0.0);
+{204} ARO1 + OH = 0.224HO2 + 0.765RO2_R + 
+      0.011RO2_N  + 0.055PROD2 + 0.118GLY + 
+	0.119MGLY + 0.017PHEN + 0.207CRES + 
+	0.059BALD + 0.491DCB1 + 0.108DCB2 + 
+	0.051DCB3 : 					ARR(1.81e-12,-355.0,0.0);
+{205} ARO2 + OH = 0.187HO2 + 0.804RO2_R + 
+      0.009RO2_N  + 0.097GLY + 0.287MGLY + 
+	0.087BACL + 0.187CRES + 0.05BALD + 
+	0.561DCB1 + 0.099DCB2 + 0.093DCB3 : 		(2.640e-11);
+{206} OLE1 + OH = 0.91RO2_R + 0.09RO2_N  + 
+      0.205R2O2+ 0.732HCHO + 0.294CCHO + 
+	0.497RCHO + 0.005ACET + 0.119PROD2 : 		ARR(7.095e-12,-451.0,0.0);
+{207} OLE1 + O3 = 0.155OH + 0.056HO2 + 
+      0.022RO2_R + 0.001RO2_N  + 
+	0.076C_O2 + 0.345CO+ 0.5HCHO + 
+	0.154CCHO + 0.363RCHO + 0.001ACET + 
+	0.215PROD2 + 0.185HCOOH + 
+	0.05CCO_OH + 0.119RCO_OH : 			ARR(2.617e-15,1640.0,0.0);
+{208} OLE1 + NO3 = 0.824RO2_R + 0.176RO2_N  + 
+      0.488R2O2+ 0.009CCHO + 0.037RCHO + 
+	0.024ACET + 0.511RNO3 : 			ARR(4.453e-14,376.0,0.0);
+{209} OLE1 + O3P = 0.45RCHO + 0.437MEK + 
+      0.113PROD2 : 					ARR(1.074e-11,234.0,0.0);
+{210} OLE2 + OH = 0.918RO2_R + 0.082RO2_N  + 
+      0.001R2O2+ 0.244HCHO + 0.732CCHO + 
+	0.511RCHO + 0.127ACET + 0.072MEK + 
+	0.061BALD + 0.025METHACRO + 
+	0.025ISOPROD : 					ARR(1.743e-11,-384.0,0.0);
+{211} OLE2 + O3 = 0.378OH + 0.003HO2 + 
+      0.033RO2_R + 0.002RO2_N  + 0.137R2O2+ 
+	0.197C_O2 + 0.137CCO_O2 + 
+	0.006RCO_O2 + 0.265CO+ 0.269HCHO + 
+	0.456CCHO + 0.305RCHO + 0.045ACET + 
+	0.026MEK + 0.043PROD2 + 0.042BALD + 
+	0.026METHACRO + 0.019MVK + 
+	0.073HCOOH + 0.129CCO_OH + 
+	0.247RCO_OH : 					ARR(5.022e-16,461.0,0.0);
+{212} OLE2 + NO3 = 0.391NO2 + 0.442RO2_R + 
+      0.136RO2_N  + 0.711R2O2+ 0.03C_O2 + 
+	0.079HCHO + 0.507CCHO + 0.151RCHO + 
+	0.102ACET + 0.001MEK + 0.015BALD + 
+	0.048MVK + 0.321RNO3 : 				(7.265e-13);
+{213} OLE2 + O3P = 0.013HO2 + 0.012RO2_R + 
+      0.001RO2_N  + 0.012CO+ 0.069RCHO + 
+	0.659MEK + 0.259PROD2 + 
+	0.012METHACRO : 				(2.085e-11);
+{214} C2H2 + O3 = 0.5OH + 1.5HO2 + 
+      1.5CO + 0.5CO2 : 				       	(2.20e-10);
+{215} C3H6 + OH = 0.984RO2_R + 0.016RO2_N +
+      0.984HCHO + 0.984CCHO + 0.048XC : 		(2.20e-10);
+{216} C3H6 + O3 = 0.32OH + 0.06HO2 + 
+      0.26C_O2 + 0.51CO + 0.135CO2 + 0.5HCHO +
+      0.5CCHO + 0.185HCOOH + 0.17CCO_OH + 0.07XC:       (2.20e-10);
+{217} C3H6 + NO3 = 0.949RO2_R + 0.051RO2_N + 
+      2.693XC + 1.0XN : 				(2.20e-10);
+{218} C3H6 + O3P = 0.45RCHO + 0.55MEK + 
+      0.55XC: 				       		(2.20e-10);
+{219} SO2 = H2SO4 : 					(2.20e-10); 
+{220} HO2 = AIR : 					(7.00e-7);
+{221} SO2 = AIR : 					(2.20e-10);   
+{222} H2SO4 = AIR : 					(2.20e-10);
+{223} HNO3 = AIR : 					(2.20e-10);
+{224} H2O2 = AIR : 					(2.20e-10);
+{225} BC = AIR : 					(7.00e-7);
+{226} OC = AIR : 					(7.00e-7);
+{227} SSF = AIR : 					(7.00e-7);
+{228} SSC = AIR : 					(7.00e-7);
+{229} PM10 = AIR : 					(7.00e-7);
+{230} PM25 = AIR : 					(7.00e-7);
+{231} DST1 = AIR : 					(7.00e-7);
+{232} DST2 = AIR : 					(7.00e-7);
+{233} DST3 = AIR : 					(7.00e-7);
+{234} DMS = AIR : 					(7.00e-7);
+{235} CO2 = AIR : 					(7.00e-7);
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/saprcnov.spc	(revision 3477)
@@ -0,0 +1,101 @@
+#include atoms
+
+  #DEFVAR   
+     O3        	= 3O ;
+     H2O2		= 2H + 2O ;        
+     NO		= N + O ;
+     NO2		= N + 2O ;
+     NO3		= N + 3O ;
+     N2O5		= 2N + 5O ;
+     HONO		= H + 2O + N ;
+     HNO3		= H + N + 3O ;
+     HNO4		= H + N + 4O ;
+     SO2		= S + 2O ;	
+     H2SO4		= 2H + S + 4O ;		
+     CO 		= C + O ;
+     HCHO		= 2H + C + O ;	
+     CCHO		= 2C + H + O ;	
+     RCHO		= 3C + ignore ;
+     ACET		= 			ignore ;	
+     MEK		= 			ignore ;
+     HCOOH		= 2H + C + 2O ;	
+     MEOH		= 			ignore ;
+     ETOH		= 			ignore ;	
+     CCO_OH		= 			ignore ;
+     RCO_OH		= 			ignore ;	
+     GLY		= 			ignore ;
+     MGLY		= 3C + 4H + 2O ;	
+     BACL		=			ignore ;		
+     CRES		= 			ignore ;
+     BALD		= 			ignore ;	
+     ISOPROD		=			ignore ;	
+     METHACRO	= 			ignore ;
+     MVK		=  			ignore ;
+     PROD2		= 			ignore ;	
+     DCB1		= 			ignore ;
+     DCB2		= 			ignore ;
+     DCB3 		= 			ignore ;
+     ETHENE		= 2C + 4H ;
+     ISOPRENE	= 			ignore ;
+     C2H6		= 2C + 6H ;   
+     C3H8		= 3C + 8H ;		
+     C2H2		= 2C + 2H ;   
+     C3H6		= 3C + 6H ;	
+     ALK3		= 			ignore ;
+     ALK4		= 			ignore ;
+     ALK5		= 			ignore ;		
+     ARO1		= 			ignore ;
+     ARO2		= 			ignore ;
+     OLE1		= 			ignore ;
+     OLE2		= 			ignore ;	
+     TERP		= 			ignore ;
+     RNO3		= 			ignore ;	
+     NPHE		= 			ignore ;	
+     PHEN		= 			ignore ;	
+     PAN		= 2C + 3H + 5O + N ;	
+     PAN2		= N + ignore ;	
+     PBZN		= N + ignore ;
+     MA_PAN		= N + ignore ;
+     BC 		= C ;
+     OC 		= C ;
+     SSF		= 			ignore ;
+     SSC		= 			ignore ;
+     PM10		= 			ignore ;
+     PM25		= 			ignore ;
+     DMS		= 			ignore ;
+     DST1		= 			ignore ;
+     DST2		= 			ignore ;
+     DST3		= 			ignore ;
+     CO2		= C + 2O ;
+     CCO_OOH		= 2C + 3O + H ;
+     RCO_O2		= 			ignore ;	
+     RCO_OOH		= 			ignore ;				
+     XN		= 			ignore ;	
+     XC		= 			ignore ;
+     O3P		= O ;
+     O1D		= O ;
+     OH		= H + O ;
+     HO2		= H+ 2O ;	
+     C_O2		= 			ignore ;
+     COOH		= C + 2O + H ;
+     ROOH		= 			ignore ;	
+     RO2_R		= 			ignore ;	
+     R2O2		= 			ignore ;
+     RO2_N		= 			ignore ;	
+     HOCOO		= H + 3O + C ;
+     CCO_O2		= 			ignore ;	
+     BZCO_O2		= 			ignore ;
+     BZNO2_O		= 			ignore ;	
+     BZ_O		= 			ignore ;
+     MA_RCO3		= 			ignore ;									
+     TBU_O		= 			ignore ;
+    
+     
+#DEFFIX	
+     AIR		= ignore ;
+     N2		= 2N ;
+     O2		= 2O ;
+     H2O		= 2H + O ;
+     H2		= 2H ;	
+     CH4		= C + 4H ;	
+	
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.def	(revision 3477)
@@ -0,0 +1,59 @@
+#include small_strato.spc
+#include small_strato.eqn
+ 
+
+//#LANGUAGE Fortran77          {Output Language}
+//#DOUBLE ON                   {Double Precision}
+//#JACOBIAN SPARSE_LU_ROW      {Use Sparse DATA STRUCTURES}
+ 
+//#INTEGRATOR rodas3
+//#DRIVER general
+
+
+#LOOKATALL                     {File Output}
+#MONITOR O3;N;O2;O;NO;O1D;NO2; {Screen Output}
+
+#CHECK O; N;                   {Check Mass Balance}
+ 
+#INITVALUES                    {Initial Values}
+ 
+CFACTOR = 1.    ;              {Conversion Factor} 
+O1D = 9.906E+01 ; 
+O   = 6.624E+08 ; 
+O3  = 5.326E+11 ; 
+O2  = 1.697E+16 ;
+NO  = 8.725E+08 ; 
+NO2 = 2.240E+08 ; 
+M   = 8.120E+16 ;
+ 
+#INLINE F77_INIT
+       	TSTART = (12*3600)
+        TEND = TSTART + (3*24*3600)
+        DT = 0.25*3600  
+        TEMP = 270
+#ENDINLINE         
+ 
+#INLINE F90_INIT
+        TSTART = (12*3600)
+        TEND = TSTART + (3*24*3600)
+        DT = 0.25*3600  
+        TEMP = 270
+#ENDINLINE         
+ 
+#INLINE MATLAB_INIT
+  global TSTART TEND DT TEMP
+  TSTART = (12*3600);
+  TEND = TSTART + (3*24*3600);
+  DT = 0.25*3600;  
+  TEMP = 270;
+#ENDINLINE         
+
+
+#INLINE C_INIT
+        TSTART = (12*3600);
+        TEND = TSTART + (3*24*3600);
+        DT = 0.25*3600;
+        TEMP = 270;
+#ENDINLINE
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.eqn	(revision 3477)
@@ -0,0 +1,15 @@
+#EQUATIONS { Small Stratospheric Mechanism }
+
+
+<R1>  O2   + hv = 2O		: (2.643E-10) * SUN*SUN*SUN;
+<R2>  O    + O2 = O3		: (8.018E-17);
+<R3>  O3   + hv = O   + O2 	: (6.120E-04) * SUN;
+<R4>  O    + O3 = 2O2		: (1.576E-15);
+<R5>  O3   + hv = O1D + O2	: (1.070E-03) * SUN*SUN;
+<R6>  O1D  + M  = O   + M	: (7.110E-11);
+<R7>  O1D  + O3 = 2O2 		: (1.200E-10);
+<R8>  NO   + O3 = NO2 + O2 	: (6.062E-15);
+<R9>  NO2  + O  = NO  + O2	: (1.069E-11);
+<R10> NO2  + hv = NO  + O	: (1.289E-02) * SUN;
+ 
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/small_strato.spc	(revision 3477)
@@ -0,0 +1,17 @@
+#include atoms
+
+#DEFVAR
+O   = O;    	    { Oxygen atomic ground state }	
+O1D = O;	    { Oxygen atomic excited state }
+O3  = O + O + O;    { Ozone }
+NO  = N + O;	    { Nitric oxide }	     
+NO2 = N + O + O;    { Nitrogen dioxide }
+
+
+#DEFFIX
+M   = O + O + N + N;{ Atmospheric generic molecule }
+O2  = O + O;        { Molecular oxygen }
+
+
+
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.def	(revision 3477)
@@ -0,0 +1,49 @@
+#include smog.spc
+#include smog.eqn
+
+{#LANGUAGE Fortran77
+#INTEGRATOR rodas3
+#DRIVER general}
+
+#LOOKATALL
+#MONITOR O3;
+
+#INITVALUES
+
+CFACTOR = 1.;
+ALL_SPEC = 1.0E-8;
+RH   = 2.0 ;
+RCHO = 2.0 ;
+NO   = 0.5 ;
+NO2  = 0.1 ;
+H2O  = 1.3E+4 ;
+O2   = 2.0E+5 ;
+
+#INLINE F77_INIT
+	TSTART = 0
+	TEND = TSTART + 600
+	DT = 60.0
+        TEMP = 298
+#ENDINLINE
+
+#INLINE F90_INIT
+	TSTART = 0
+	TEND = TSTART + 600
+	DT = 60.0
+        TEMP = 298
+#ENDINLINE
+
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 0;
+   TEND = TSTART + 600;
+   DT = 60.0;
+   TEMP = 298;
+#ENDINLINE
+
+#INLINE C_INIT
+   TSTART = 0;
+   TEND = TSTART + 600;
+   DT = 60.0;
+   TEMP = 298;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.eqn	(revision 3477)
@@ -0,0 +1,17 @@
+#EQUATIONS
+
+{ A Generalized Reaction Mechanism for Photochemical Smog }
+
+{ 1.}  NO2 + hv = NO + O :                    0.533 ;
+{ 2.}  O + O2 = O3       :                 2.183E-5 ;
+{ 3.}  NO + O3 = NO2 + O2 :                   26.59 ;
+{ 4.}  RH + OH = RO2 + H2O :               3.775E+3 ;
+{ 5.}  RCHO + OH = RCOO2 + H2O :           2.341E+4 ;
+{ 6.}  RCHO + hv = RO2 + HO2 + CO :         1.91E-4 ;
+{ 7.}  HO2 + NO = NO2 + OH :               1.214E+4 ;
+{ 8.}  RO2 + NO = NO2 + RCHO + HO2 :       1.127E+4 ;
+{ 9.}  RCOO2 + NO = NO2 + RO2 + CO2 :      1.127E+4 ;
+{10.}  OH + NO2 = HNO3 :                   1.613E+4 ;
+{11.}  RCOO2 + NO2 = RCOO2NO2 :            6.893E+3 ;  
+{12.}  RCOO2NO2 = RCOO2 + NO2 :            2.143E-2 ;
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/smog.spc	(revision 3477)
@@ -0,0 +1,37 @@
+#include atoms
+
+ #DEFVAR  
+    O           = O ;           {oxygen atomic ground state (3P)}
+    O3		= 3O ;          {ozone}  
+    NO		= N + O ;       {nitric oxide}  
+    NO2		= N + 2O ;      {nitrogen dioxide} 
+    NO3		= N + 3O ;      {nitrogen trioxide} 
+    N2O5	= 2N + 5O ;     {dinitrogen pentoxide}           
+    HNO3	= H + N + 3O ;  { nitric acid }
+    HNO4	= H + N + 4O ;  {HO2NO2 pernitric acid}
+    H           = H ;           {hydrogen atomic ground state (2S)}
+    OH		= O + H ;       {hydroxyl radical}  
+    HO2		= H + 2O ;      {perhydroxyl radical}                     
+    H2O2	= 2H + 2O ;     {hydrogen peroxide} 
+    CH3         = C + 3H ;      {methyl radical}
+    CH3O        = C + 3H + O ;  {methoxy radical}
+    CH3O2       = C + 3H + 2O ; {methylperoxy radical}
+    CH3OOH      = C + 4H + 2O ; {CH4O2      methylperoxy alcohol}
+    HCO         = H + C + O ;   {CHO  formyl radical}
+    CH2O        = C + 2H + O ;  {formalydehyde}
+    
+    RH          = ignore ;
+    RO2         = ignore ;
+    RCHO        = ignore ;
+    RCOO2       = ignore ;
+    RCOO2NO2    = ignore ;
+
+#DEFFIX
+    H2O		= H + 2O ;      {water}
+    H2		= 2H ;          {molecular hydrogen}
+    O2          = 2O ;          {molecular oxygen}              
+    N2          = 2N ;          {molecular nitrogen}              
+    CH4		= C + 4H ;      {methane} 
+    CO		= C + O ;       {carbon monoxide}   
+    CO2         = C + 2O ;      {carbon dioxide}
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/stochastic_dimer.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/stochastic_dimer.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/stochastic_dimer.def	(revision 3477)
@@ -0,0 +1,62 @@
+{Decaying-dimerizing reaction set
+ (Gillespie, J. Chem. Phys. 115(4), p. 1716, 2001)}
+
+#DEFVAR
+S1  = ignore; {}
+S2  = ignore; {}
+S3  = ignore; {}
+
+#EQUATIONS
+S1 	  = PROD	: (1);    {c1}
+S1 + S1   = S2		: (0.004);{2*c2}
+S2 	  = S1 + S1	: (0.5);  {c3}
+S2 	  = S3	 	: (0.04); {c4}
+
+#LOOKATALL
+
+#INITVALUES
+  CFACTOR = 1.0;
+  S1   = 1.0e+5;
+  S2   = 0.0;
+  S3   = 0.0;
+
+#INLINE F77_INIT
+      TSTART = 0.d0
+      TEND   = 30.0d0
+      DT     = 0.5d0;
+      DO i=1,NVAR
+        RTOL(i) = 1.0e-4
+        ATOL(i) = 1.0e-8
+      END DO 
+      Volume = 1.0d0
+#ENDINLINE
+
+#INLINE F90_INIT
+  TSTART = 0.d0
+  TEND   = 30.0d0
+  DT     = 0.5d0
+  RTOL(1:NVAR) = 1.0e-4
+  ATOL(1:NVAR) = 1.0e-8
+  Volume = 1.0d0
+#ENDINLINE
+
+#INLINE MATLAB_INIT
+  global TSTART TEND DT TEMP
+  TSTART = 0;
+  TEND   = 30;
+  DT     = 0.5;
+  RTOL(1:NVAR) = 1.0e-4;
+  ATOL(1:NVAR) = 1.0e-8;
+  Volume = 1;
+#ENDINLINE
+
+#INLINE C_INIT
+  TSTART = 0.0;
+  TEND   = 30.0;
+  DT     = 0.5;
+  for(i=0; i<NVAR; i++) {
+      RTOL[i] = 1.0e-4;
+      ATOL[i] = 1.0e-8;
+  } 
+  Volume = 1.0;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.def	(revision 3477)
@@ -0,0 +1,84 @@
+#include strato.spc
+#include strato.eqn
+
+{#LANGUAGE Fortran77
+#INTEGRATOR rodas3
+#DRIVER general}
+
+#LOOKATALL
+
+#MONITOR O;
+
+#INITVALUES
+
+CFACTOR =   8.12E+16 ;
+
+O       =    8.158574E-09 ;  
+O1D     =    2.773328E-15 ;  
+O3      =    6.560000E-06 ;  
+NO      =    1.074516E-08 ;  
+NO2     =    2.758840E-09 ;
+NO3     =    5.667175E-14 ;  
+N2O5    =    6.905712E-12 ;  
+HNO3    =    3.486344E-10 ;  
+HNO4    =    3.827485E-12 ;  
+H2O     =    6.100000E-06 ;
+H       =    4.190815E-14 ;  
+OH      =    2.041165E-10 ;  
+HO2     =    1.439703E-10 ;  
+H2O2    =    7.227409E-11 ;  
+H2      =    3.700000E-07 ;
+CH4     =    4.900000E-07 ;  
+CH3     =    3.984427E-17 ;  
+CH3O    =    2.496504E-15 ;  
+CH3O2   =    5.130799E-12 ;  
+CH3OOH  =    4.587317E-12 ;
+HCO     =    3.010774E-19 ;  
+CH2O    =    9.913988E-11 ;  
+CO      =    2.000000E-08 ;  
+Cl      =    8.756027E-12 ;  
+Cl2     =    8.665679E-14 ;
+ClO     =    1.011874E-09 ;  
+ClOO    =    2.659306E-15 ;  
+OClO    =    7.193558E-14 ;  
+Cl2O2   =    7.103997E-14 ;  
+HCl     =    2.157657E-09 ;
+HOCl    =    2.196369E-10 ;  
+ClONO2  =    2.166934E-11 ;  
+Br      =    4.025093E-12 ;  
+BrCl    =    5.843046E-14 ;  
+BrO     =    1.132088E-11 ;
+HBr     =    4.349534E-13 ; 
+HOBr    =    5.066596E-12 ;  
+BrONO2  =    9.405408E-14 ;
+O2      =    0.209;
+N2      =    0.781;
+
+#INLINE F77_INIT
+        TSTART = 12.D0*3600.D0
+        TEND = TSTART + 24.D0*3600.D0 * 3
+        DT = 3600.D0
+        TEMP = 241.42
+#ENDINLINE
+
+#INLINE F90_INIT
+        TSTART = 12.D0*3600.D0
+        TEND = TSTART + 24.D0*3600.D0 * 3
+        DT = 3600.D0
+        TEMP = 241.42
+#ENDINLINE
+
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 12.0*3600.0;
+   TEND = TSTART + 24.0*3600.0 * 3;
+   DT = 3600.0;
+   TEMP = 241.42;
+#ENDINLINE
+
+#INLINE C_INIT
+   TSTART = 12.0*3600.0;
+   TEND = TSTART + 24.0*3600.0 * 3;
+   DT = 3600.0;
+   TEMP = 241.42;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.eqn	(revision 3477)
@@ -0,0 +1,115 @@
+#EQUATIONS
+
+{ REGION A. STRATOSPHERIC REACTION LIST}
+
+{ 1.} O + O2 = O3 :                       8.018216E-17 ;
+{ 2.} O + O3 = 2O2 :                      1.575705E-15 ;
+{ 3.} O1D + N2 = O + N2 :                 2.838868E-11 ;
+{ 4.} O1D + O2 = O + O2 :                 4.276308E-11 ;
+{ 5.} O1D + O3 = 2O2 :                    1.200000E-10 ;
+{ 6.} H2O + O1D = 2OH :                   2.200000E-10 ; 
+{ 7.} H2 + O1D = OH + H :                 1.000000E-10 ;
+{ 8.} CH4 + O1D = CH2O + H2 :             7.500000E-12 ;  
+{ 9.} CH4 + O1D = CH3 + OH :              1.425000E-10 ; 
+{10.} H + O2 = HO2 :                      6.353884E-15 ;
+{11.} H + O3 = OH + O2 :                  1.998353E-11 ;
+{12.} H2 + OH = H2O + H :                 1.388923E-15 ;
+{13.} OH + O3 = HO2 + O2 :                3.259930E-14 ;
+{14.} OH + O = O2 + H :                   3.616461E-11 ;
+{15.} OH + OH = H2O + O :                 1.554272E-12 ;
+{16.} HO2 + O = OH + O2 :                 6.868940E-11 ;
+{17.} HO2 + O3 = OH + 2O2 :               1.386665E-15 ;
+{18.} H + HO2 = 2OH :                     7.000000E-11 ;
+{19.} HO2 + OH = H2O + O2 :               1.351923E-10 ;
+{20.} HO2 + HO2 = H2O2 + O2 :             2.769464E-12 ;
+{21.} HO2 + HO2 + H2O = H2O2 + O2 + H2O : 3.515415E-29 ;
+{22.} H2O2 + OH = H2O + HO2 :             1.494801E-12 ;
+{23.} NO + O3 = NO2 + O2 :                6.062488E-15 ;
+{24.} NO + HO2 = NO2 + OH :               1.042107E-11 ;
+{25.} NO2 + O = NO + O2 :                 1.068500E-11 ;
+{26.} NO2 + O3 = NO3 + O2 :               4.699133E-18 ;
+{27.} NO2 + OH = HNO3 :                   3.724129E-13 ;
+{28.} NO2 + HO2 = HNO4 :                  2.690292E-14 ;
+{29.} NO3 + O = O2 + NO2 :                1.000000E-11 ;
+{30.} NO3 + NO = 2NO2 :                   3.033154E-11 ;
+{31.} NO3 + NO2 = N2O5 :                  2.325973E-13 ;
+{32.} N2O5 = NO2 + NO3 :                  1.405991E-06 ;
+{33.} HNO3 + OH = H2O + NO3 :             1.890063E-13 ;
+{34.} HNO4 + OH = H2O + NO2 + O2 :        6.273406E-12 ;
+{35.} HNO4 = HO2 + NO2 :                  3.163299E-07 ;
+{36.} N2O5 = 2HNO3 :                      0.000000E+00 ;
+{37.} Cl + O2 = ClOO :                    3.032678E-16 ;
+{38.} Cl + O3 = ClO + O2 :                9.878682E-12 ;
+{39.} Cl + H2 = HCl + H :                 2.696898E-15 ;
+{40.} Cl + HO2 = HCl + O2 :               3.639785E-11 ;
+{41.} Cl + HO2 = OH + ClO :               6.357771E-12 ;
+{42.} Cl + H2O2 = HCl + HO2 :             1.899010E-13 ;
+{43.} ClO + O = Cl + O2 :                 4.009038E-11 ;
+{44.} ClO + OH = HO2 + Cl :               1.808230E-11 ;
+{45.} ClO + OH = HCl + O2 :               0.000000E+00 ;        
+{46.} ClO + HO2 = O2 + HOCl :             8.718280E-12 ;
+{47.} ClO + NO = NO2 + Cl :               2.127376E-11 ;
+{48.} ClO + NO2 = ClONO2 :                2.886454E-14 ;
+{49.} ClO + ClO = Cl + OClO :             1.201307E-15 ;
+{50.} ClO + ClO = Cl + ClOO :             1.174783E-15 ;
+{51.} ClO + ClO = Cl2 + O2 :              1.379878E-15 ;
+{52.} ClO + ClO = Cl2O2 :                 3.330338E-15 ;
+{53.} ClOO = Cl + O2 :                    1.694865E+04 ;
+{54.} Cl2O2 = 2ClO :                      4.773959E-04 ;
+{55.} HCl + OH = H2O + Cl :               6.100684E-13 ;
+{56.} HOCl + OH = H2O + ClO :             3.781814E-13 ;
+{57.} ClONO2 + O = ClO + NO3 :	          1.055174E-13 ;
+{58.} ClONO2 + OH = HOCl + NO3 :          3.021112E-13 ;
+{59.} ClONO2 + Cl = Cl2 + NO3 :           1.319240E-11 ;
+{60.} ClONO2 = HOCl + HNO3 :              0.000000E+00 ;
+{61.} Br + O3 = BrO + O2 :                6.185505E-13 ;
+{62.} Br + HO2 = HBr + O2 :               1.249643E-12 ;
+{63.} Br + CH2O = HBr + HCO :             6.185505E-13 ;
+{64.} BrO + O = Br + O2  :                4.990544E-11 ;
+{65.} BrO + HO2 = HOBr + O2 :             4.918275E-11 ;
+{66.} BrO + NO = Br + NO2 :               2.583341E-11 ;
+{67.} BrO + NO2 = BrONO2 :                7.684217E-14 ;
+{68.} BrO + ClO = Br + OClO :             9.497781E-12 ;
+{69.} BrO + ClO = Br + ClOO :             7.213454E-12 ;
+{70.} BrO + ClO = BrCl + O2 :             1.172819E-12 ;
+{71.} BrO + BrO = 2Br + O2 :              2.467250E-12 ;
+{72.} HBr + OH = Br + H2O :               1.100000E-11 ;
+{73.} CO + OH = H :                       1.502401E-13 ;
+{74.} CH4 + OH = CH3 + H2O :              1.532251E-15 ;
+{75.} CH2O + OH = HCO + H2O :             1.000000E-11 ;
+{76.} CH2O + O = HCO + OH  :              4.501231E-14 ;
+{77.} Cl + CH4 = CH3 + HCl :              3.334368E-14 ;
+{78.} Cl + CH2O = HCl + HCO :             7.153519E-11 ;
+{79.} HCO + O2 = CO + HO2 :               6.250373E-12 ;
+{80.} CH3 + O2 = CH3O2 :                  5.883651E-14 ;
+{81.} CH3O + O2 = CH2O + HO2 :            9.377921E-16 ;
+{82.} CH3O2 + NO = CH3O + NO2 :           8.851990E-12 ;
+{83.} CH3O2 + HO2 = CH3OOH + O2 :         1.044377E-11 ;
+{84.} CH3OOH + OH = CH3O2 + H2O :         6.182046E-12 ;
+
+{ 1.} O2 + hv = 2O :                      2.643E-10 * SUN*SUN*SUN ;           
+{ 2.} O3 + hv = O + O2 :                  6.120E-04 * SUN ;           
+{ 3.} O3 + hv = O1D + O2 :                1.070E-03 * SUN*SUN ;         
+{ 4.} HO2 + hv = OH + O :                 1.817E-04 * SUN*SUN ;         
+{ 5.} H2O2 + hv = 2OH :                   3.537E-05 * SUN ;       
+{ 6.} NO2 + hv = NO + O :                 1.289E-02 * SUN ;       
+{ 7.} NO3 + hv = NO2 + O :                2.359E-01 * SUN ;        
+{ 8.} NO3 + hv = NO + O2 :                2.883E-02 * SUN ;        
+{ 9.} N2O5 + hv = NO2 + NO3 :             2.594E-04 * SUN*SUN ;	  
+{10.} HNO3 + hv = OH + NO2 :              5.269E-05 * SUN*SUN ;          
+{11.} HNO4 + hv = OH + NO3 :              4.557E-05 * SUN*SUN ;	        
+{12.} HNO4 + hv = HO2 + NO2 :             9.113E-05 * SUN*SUN ;        
+{13.} Cl2 + hv = 2Cl :                    3.692E-03 * SUN ;               
+{14.} OClO + hv = O + ClO :               1.243E-01 * SUN ;             
+{15.} Cl2O2 + hv = Cl + ClOO :            3.421E-03 * SUN ;          
+{16.} HOCl + hv = OH + Cl :               4.606E-04 * SUN ;             
+{17.} ClONO2 + hv = Cl + NO3 :            2.254E-04 * SUN*SUN ;	         
+{18.} ClONO2 + hv = Cl + NO2 + O :        2.505E-05 * SUN*SUN ;    
+{19.} BrCl + hv = Br + Cl :               1.867E-02 * SUN ;             
+{20.} BrO + hv = Br + O :                 5.950E-02 * SUN ;              
+{21.} HOBr + hv = Br + OH :               1.284E-03 * SUN ;             
+{22.} BrONO2 + hv = Br + NO3 :            2.074E-03 * SUN ;	         
+{23.} CH2O + hv = HCO + H :               7.553E-05 * SUN ;            
+{24.} CH2O + hv = CO + H2 :               8.303E-05 * SUN ;            
+{25.} CH3OOH + hv = CH3O + OH :           2.285E-05 * SUN ;        
+
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.spc
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.spc	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/strato.spc	(revision 3477)
@@ -0,0 +1,46 @@
+#include atoms
+
+#DEFVAR  
+    O           = O ;           {oxygen atomic ground state (3P)}
+    O1D         = O ;           {oxygen atomic first singlet state}
+    O3		= 3O ;          {ozone}  
+    NO		= N + O ;       {nitric oxide}  
+    NO2		= N + 2O ;      {nitrogen dioxide} 
+    NO3		= N + 3O ;      {nitrogen trioxide} 
+    N2O5	= 2N + 5O ;     {dinitrogen pentoxide}           
+    HNO3	= H + N + 3O ;  { nitric acid }
+    HNO4	= H + N + 4O ;  {HO2NO2 pernitric acid}
+    H           = H ;           {hydrogen atomic ground state (2S)}
+    OH		= O + H ;       {hydroxyl radical}  
+    HO2		= H + 2O ;      {perhydroxyl radical}                     
+    H2O2	= 2H + 2O ;     {hydrogen peroxide} 
+    CH3         = C + 3H ;      {methyl radical}
+    CH3O        = C + 3H + O ;  {methoxy radical}
+    CH3O2       = C + 3H + 2O ; {methylperoxy radical}
+    CH3OOH      = C + 4H + 2O ; {CH4O2      methylperoxy alcohol}
+    HCO         = H + C + O ;   {CHO  formyl radical}
+    CH2O        = C + 2H + O ;  {formalydehyde}
+    Cl          = Cl ;          {chlorine atomic ground state (2P3/2)}
+    Cl2         = 2Cl ;         {molecular chlorine}
+    ClO         = Cl + O ;      {chlorine monoxide radical}
+    ClOO        = Cl + 2O ;     {asymmetrical chlorine dioxide radical}
+    OClO        = Cl + 2O ;     {symmetrical chlorine dioxide}
+    Cl2O2       = 2Cl + 2O ;    {chlorine monoxide dimer}
+    HCl         = H + Cl ;      {hydrogen chloride}
+    HOCl        = H + O + Cl ;  {hydrochlorous acid}
+    ClONO2      = Cl + 3O + N ; {ClNO3, chlorine nitrate}
+    Br          = Br ;          {bromine atomic ground state (2P3/2)}
+    BrCl        = Br + Cl ;     {bromine chloride}
+    BrO         = Br + O ;      {bromine monoxide radical}
+    HBr         = H + Br ;      {hydrogen bromide}
+    HOBr        = H + O + Br ;  {hydrobromous acid}
+    BrONO2      = Br + N + 3O ; {BrNO3, bromine nitrate}
+
+
+#DEFFIX
+    H2O		= H + 2O ;      {water}
+    H2		= 2H ;          {molecular hydrogen}
+    O2          = 2O ;          {molecular oxygen}              
+    N2          = 2N ;          {molecular nitrogen}              
+    CH4		= C + 4H ;      {methane} 
+    CO		= C + O ;       {carbon monoxide}   
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/test_pentane.def
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/test_pentane.def	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/test_pentane.def	(revision 3477)
@@ -0,0 +1,62 @@
+#INCLUDE test_pentane.spc
+#INCLUDE test_pentane.eqn
+
+{#LANGUAGE Fortran90
+#INTEGRATOR ros3
+#DRIVER general}
+
+#LOOKATALL
+
+#MONITOR GO3; GC05000; GD02000; GD03000
+
+#INITVALUES
+  ALL_SPEC = 0.0;
+  GO3   = 100.0;
+  GNO   = 0.05;
+  GNO2  = 0.05;
+  GH2O  = 500.0;
+  GCO   = 100.0;
+  GNO3  = 0.1;
+  GSO2  = 5.0;
+  GCH4  = 1700;
+  GH2O2 = 2.0;
+  GHNO4 = 1E-8;
+  GO2   = 2.E+8;
+  GCO2  = 5.E+7;
+  GH2   = 500;  
+  GC05000 = 35;  
+
+#INLINE F77_INIT
+	TSTART = 12.*3600.
+	TEND = TSTART + 24.*3600. * 5
+	DT = 3600.
+        TEMP = 288.15
+#ENDINLINE
+
+#INLINE F90_INIT
+        TSTART = 0.0D0
+        TEND = TSTART + 2*24*3600.0D0 ! 2160.0D0*60.0D0
+        DT = 3600.D0
+        TEMP = 300.0D0
+#ENDINLINE
+{	TSTART = 12.*3600.
+	TEND = TSTART + 24.*3600. * 1
+	DT = 3600.
+        TEMP = 288.15}
+{        SUNRISE = 5.0
+        SUNSET  = 7.0}
+
+#INLINE MATLAB_INIT
+   global TSTART TEND DT TEMP
+   TSTART = 12.*3600.0;
+   TEND = TSTART + 24.0*3600.0 * 5;
+   DT = 3600.0;
+   TEMP = 288.15;
+#ENDINLINE
+
+#INLINE C_INIT
+   TSTART = 12.*3600.0;
+   TEND = TSTART + 24.0*3600.0 * 5;
+   DT = 3600.0;
+   TEMP = 288.15;
+#ENDINLINE
Index: /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/test_pentane.eqn
===================================================================
--- /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/test_pentane.eqn	(revision 3477)
+++ /palm/tags/release-6.0/UTIL/chemistry/gasphase_preproc/kpp/models/test_pentane.eqn	(revision 3477)
@@ -0,0 +1,78059 @@
+#EQUATIONS
+{ 1} GO3P + GO3 =  NOTHING                                                 : ARR( 0.800E-11,  2060., 0.0);
+{ 2} GO3P + GNO2 =  GNO                                                    : ARR( 0.560E-11,  -180., 0.0);
+{ 3} GO1D + M =  GO3P + M                                                  : ARR( 0.209E-10,   -96., 0.0);
+{ 4} GO3 + GNO =  GNO2                                                     : ARR( 0.300E-11,  1500., 0.0);
+{ 5} GO3 + GNO2 =  GNO3                                                    : ARR( 0.120E-12,  2450., 0.0);
+{ 6} GNO + GNO3 =  2. GNO2                                                 : ARR( 0.150E-10,  -170., 0.0);
+{ 7} GNO + GNO + M =  2. GNO2                                              : ARR( 0.330E-38,  -530., 0.0);
+{ 8} GNO2 + GNO3 =  GNO + GNO2                                             : ARR( 0.450E-13,  1260., 0.0);
+{ 9} GHO + GHNO2 =  GNO2                                                   : ARR( 0.180E-10,   390., 0.0);
+{10} GHO + GNO3 =  GHO2 + GNO2                                             : ARR( 0.200E-10,     0., 0.0);
+{11} GHO + GCO =  GHO2 + GCO2                                              : ARR( 0.150E-12,     0., 0.0);
+{12} GHO + GCO + M =  GHO2 + GCO2                                          : ARR( 0.366E-32,     0., 0.0);
+{13} GHO + GO3 =  GHO2                                                     : ARR( 0.150E-11,   880., 0.0);
+{14} GHO2 + GNO =  GHO + GNO2                                              : ARR( 0.370E-11,  -240., 0.0);
+{15} GHNO4 + GHO =  GNO2                                                   : ARR( 0.130E-11,  -380., 0.0);
+{16} GHO2 + GO3 =  GHO                                                     : ARR( 0.200E-13,   680., 0.0);
+{17} GHO2 + GHO2 =  GH2O2                                                  : ARR( 0.230E-12,  -600., 0.0);
+{18} GHO2 + GHO2 + M =  GH2O2 + M                                          : ARR( 0.170E-32, -1000., 0.0);
+{19} GNO3 + GHO2 =  0.8 GHO + 0.8 GNO2 + 0.2 GHNO3                         : ARR( 0.350E-11,     0., 0.0);
+{20} GNO3 + GNO3 =  2. GNO2                                                : ARR( 0.850E-12,  2450., 0.0);
+{21} GH2O2 + GHO =  GHO2                                                   : ARR( 0.290E-11,   160., 0.0);
+{22} GHO + GHO2 =  NOTHING                                                 : ARR( 0.480E-10,  -250., 0.0);
+{23} GHO + GH2 =  GHO2                                                     : ARR( 0.550E-11,  2000., 0.0);
+{24} GO3P + GNO + M  =  GNO2 + M                                           : FALL( 0.900E-31,     0.,-1.5, 0.300E-10,     0., 0.0,0.60);
+{25} GO3P + GNO2 + M  =  GNO3 + M                                          : FALL( 0.900E-31,     0.,-2.0, 0.220E-10,     0., 0.0,0.60);
+{26} GNO2 + GNO3 + M =  GN2O5 + M                                          : FALL( 0.200E-29,     0.,-4.4, 0.140E-11,     0.,-0.7,0.60);
+{27} GN2O5 + M  =  GNO2 + GNO3 + M                                         : FALL( 0.667E-03, 10991.,-4.4, 0.467E+15, 10991.,-0.7,0.60);
+{28} GHO + GNO + M  =  GHNO2 + M                                           : FALL( 0.700E-30,     0.,-2.6, 0.360E-10,     0.,-0.1,0.60);
+{29} GHO + GNO2 + M  =  GHNO3 + M                                          : FALL( 0.300E-29,     0.,-3.0, 0.360E-10,     0., 0.0,0.40);
+{30} GHO2 + GNO2 + M  =  GHNO4 + M                                         : FALL( 0.180E-30,     0.,-3.2, 0.470E-11,     0., 0.0,0.60);
+{31} GHNO4 + M  =  GHO2 + GNO2 + M                                         : FALL( 0.500E-05, 10000., 0.0, 0.261E+16, 10900., 0.0,0.60);
+{32} GHO + GSO2 + M  =  GHO2 + GSULF + M                                   : FALL( 0.300E-30,     0.,-3.3, 0.150E-11,     0., 0.0,0.60);
+{33} GO3P + EXTRA =  GO3                                                   : ARR( 0.528E-27,     0., 2.4);
+{34} GO1D + EXTRA =  2. GHO                                                : ARR( 0.220E-09,     0., 0.0);
+{35} GHO + GHNO3 + EXTRA =  GNO3                                           : ARR( 0.240E-13,  -460., 0.0);
+{36} GHO2 + GHO2 + EXTRA =  GH2O2                                          : ARR( 0.320E-33, -2800., 0.0);
+{37} GO3 + HV =  GO1D                                                      :  0.100E+01*SUN;
+{38} GO3 + HV =  GO3P                                                      :  0.100E+01*SUN;
+{39} GNO2 + HV =  GNO + GO3P                                               :  0.100E+01*SUN;
+{40} GNO3 + HV =  GNO                                                      :  0.100E+01*SUN;
+{41} GNO3 + HV =  GNO2 + GO3                                               :  0.100E+01*SUN;
+{42} GH2O2 + HV =  2. GHO                                                  :  0.100E+01*SUN;
+{43} GHNO2 + HV =  GHO + GNO                                               :  0.100E+01*SUN;
+{44} GHNO3 + HV =  GHO + GNO2                                              :  0.100E+01*SUN;
+{45} GHNO4 + HV =  0.61 GHO2 + 0.61 GNO2 + 0.39 GHO + 0.39 GHNO3           :  0.100E+01*SUN;
+{46} GCH4 + GHO =  GCH3O2                                                  : ARR( 0.215E-11,  1735., 0.0);
+{47} GCH3O2 + GCH3O2 =  GCH3OH + GCH2O                                     : ARR( 0.600E-13,  -390., 0.0);
+{48} GCH3O2 + GCH3O2 =  2 GCH3O                                            : ARR( 0.350E-13,  -390., 0.0);
+{49} GCH3O2 + GNO =  GCH3O + GNO2                                          : ARR( 0.280E-11,  -300., 0.0);
+{50} GCH3O2 + GNO3 =  GCH3O + GNO2                                         : ARR( 0.130E-11,     0., 0.0);
+{51} GCH3O2 + GHO2 =  GCH3OOH                                              : ARR( 0.410E-12,  -750., 0.0);
+{52} GCH3O + OXYGEN =  GCH2O + GHO2                                        : ARR( 0.720E-13,  1080., 0.0);
+{53} GCH3OH + GHO =  0.85 GCH2O + 0.85 GHO2 + 0.15 GCH3O                   : ARR( 0.310E-11,   360., 0.0);
+{54} GCH3OH + GNO3 =  GCH2O + GHO2 + GHNO3                                 : ARR( 0.940E-12,  2650., 0.0);
+{55} GCH3OOH + HV =  GCH3O + GHO                                           :  0.100E+01*SUN;
+{56} GCH3OOH + GHO =  GHO + GCH2O                                          : ARR( 0.100E-11,  -190., 0.0);
+{57} GCH3OOH + GHO =  GCH3O2                                               : ARR( 0.190E-11,  -190., 0.0);
+{58} GCH3O + GNO2 + M  =  GN01001 + M                                      : FALL( 0.900E-28,     0.,-4.5, 0.190E-10,     0., 0.0,0.44);
+{59} GN01001 + HV =  GCH3O + GNO2                                          :  0.100E+01*SUN;
+{60} GN01001 + GHO =  GCH2O + GNO2                                         : ARR( 0.400E-12,   845., 0.0);
+{61} GCH2O + HV =  GCO + 2 GHO2                                            :  0.100E+01*SUN;
+{62} GCH2O + HV =  GH2 + GCO                                               :  0.100E+01*SUN;
+{63} GCH2O + GHO =  GCO + GHO2                                             : ARR( 0.860E-11,   -20., 0.0);
+{64} GCH2O + GNO3 =  GHNO3 + GCO + GHO2                                    : ARR( 0.580E-15,     0., 0.0);
+{65} GHCOOH + GHO =  GHO2 + GCO2                                           : ARR( 0.450E-12,     0., 0.0);
+{66} GHCOO2H + GHO =  GHCOO2                                               : ARR( 0.190E-11,  -190., 0.0);
+{67} GHCOO2H + HV =  GHO2 + GHO + GCO2                                     :  0.100E+01*SUN;
+{68} GHCOO2 + GHO2 =  0.7 GHCOO2H + 0.3 GHCOOH + 0.3 GO3                   : ARR( 0.430E-12, -1040., 0.0);
+{69} GHCOO2 + GNO =  GHO2 + GNO2 + GCO2                                    : ARR( 0.810E-11,  -270., 0.0);
+{70} GHCOO2 + GNO3 =  GCH3O2 + GNO2                                        : ARR( 0.500E-11,     0., 0.0);
+{71} GHCOO2 + GCH3O2 =  1.37 GHO2 + 1.37 GCO2 + 1.37 GCH3O                 : ARR( 0.500E-11,     0., 0.0);
+{72} GHCOO2 + GCH3O2 =  0.63 GHCOOH + 0.63 GCH2O                           : ARR( 0.500E-11,     0., 0.0);
+{73} GHCOO2 + GNO2 + M  =  GP01001  + M                                    : FALL( 0.850E-28,     0.,-6.5, 0.110E-10,     0.,-1.0,0.60);
+{74} GP01001 + M  =  GHCOO2 + GNO2 + M                                     : FALL( 0.490E-02, 12100., 0.0, 0.540E+17, 13830., 0.0,0.30);
+{75} GP01001 + HV =  GHCOO2 + GNO2                                         :  0.100E+01*SUN;
+{76} GN01002 =  GCO2 + GHO2 + GNO2                                         : ARR( 0.100E+02,     0., 0.0);
+{    77} GCH3O2  +PERO1              =  0.480GCH3O   + 0.260GCH2O   + 0.260GCH3OH                  : ARR( 0.146E-12,  -445., 0.0);
+{    78} GCH3O2  +PERO2              =  0.440GCH3O   + 0.280GCH2O   + 0.280GCH3OH                  : ARR( 0.544E-13,  -945., 0.0);
+{    79} GCH3O2  +PERO3              =  0.480GCH3O   + 0.260GCH2O   + 0.260GCH3OH                  : ARR( 0.164E-12,  -795., 0.0);
+{    80} GCH3O2  +PERO5              =  0.480GCH3O   + 0.260GCH2O   + 0.260GCH3OH                  : ARR( 0.616E-11,   905., 0.0);
+{    81} GCH3O2  +PERO6              =  0.340GCH3O   + 0.330GCH2O   + 0.330GCH3OH                  : ARR( 0.565E-13,  -845., 0.0);
+{    82} GCH3O2  +PERO9              =  0.690GCH3O   + 0.310GCH2O                                  : ARR( 0.100E-10,     0., 0.0);
+{    83} GC05000 +GHO                =       G205000                                               : ARR( 0.202E-17,  -183., 2.0);
+{    84} GC05000 +GHO                =       G205001                                               : ARR( 0.139E-16,  -183., 2.0);
+{    85} GC05000 +GHO                =       G205002                                               : ARR( 0.852E-17,  -183., 2.0);
+{    86} G205000 +GNO                =       G105000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{    87} G205000 +GNO                =       GN05000                                               : ARR( 0.182E-12,  -360., 0.0);
+{    88} G205000 +GHO2               =       GH05000                                               : ARR( 0.242E-12, -1250., 0.0);
+{    89} G205000 +GNO3               =       G105000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{    90} G205000 +MEPERO             =  0.480G105000 + 0.260GO05000 + 0.260GD05000                 : ARR( 0.146E-12,  -445., 0.0);
+{    91} G205000 +PERO1              =  0.600G105000 + 0.200GO05000 + 0.200GD05000                 : ARR( 0.112E-12,  -500., 0.0);
+{    92} G205000 +PERO2              =  0.560G105000 + 0.220GO05000 + 0.220GD05000                 : ARR( 0.418E-13, -1000., 0.0);
+{    93} G205000 +PERO3              =  0.600G105000 + 0.200GO05000 + 0.200GD05000                 : ARR( 0.126E-12,  -850., 0.0);
+{    94} G205000 +PERO5              =  0.600G105000 + 0.200GO05000 + 0.200GD05000                 : ARR( 0.473E-11,   850., 0.0);
+{    95} G205000 +PERO6              =  0.460G105000 + 0.270GO05000 + 0.270GD05000                 : ARR( 0.434E-13,  -900., 0.0);
+{    96} G205000 +PERO9              =  0.800G105000 + 0.200GD05000                                : ARR( 0.100E-10,     0., 0.0);
+{    97} G205001 +GNO                =       G105001 +      GNO2                                   : ARR( 0.238E-11,  -360., 0.0);
+{    98} G205001 +GNO                =       GN05001                                               : ARR( 0.324E-12,  -360., 0.0);
+{    99} G205001 +GHO2               =       GH05001                                               : ARR( 0.242E-12, -1250., 0.0);
+{   100} G205001 +GNO3               =       G105001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   101} G205001 +MEPERO             =  0.480G105001 + 0.260GO05001 + 0.260GK05000                 : ARR( 0.616E-11,   905., 0.0);
+{   102} G205001 +PERO1              =  0.600G105001 + 0.200GO05001 + 0.200GK05000                 : ARR( 0.473E-11,   850., 0.0);
+{   103} G205001 +PERO2              =  0.560G105001 + 0.220GO05001 + 0.220GK05000                 : ARR( 0.177E-11,   350., 0.0);
+{   104} G205001 +PERO3              =  0.600G105001 + 0.200GO05001 + 0.200GK05000                 : ARR( 0.533E-11,   500., 0.0);
+{   105} G205001 +PERO5              =  0.600G105001 + 0.200GO05001 + 0.200GK05000                 : ARR( 0.200E-09,  2200., 0.0);
+{   106} G205001 +PERO6              =  0.460G105001 + 0.270GO05001 + 0.270GK05000                 : ARR( 0.183E-11,   450., 0.0);
+{   107} G205001 +PERO9              =  0.800G105001 + 0.200GK05000                                : ARR( 0.100E-10,     0., 0.0);
+{   108} G205002 +GNO                =       G105002 +      GNO2                                   : ARR( 0.238E-11,  -360., 0.0);
+{   109} G205002 +GNO                =       GN05002                                               : ARR( 0.324E-12,  -360., 0.0);
+{   110} G205002 +GHO2               =       GH05002                                               : ARR( 0.242E-12, -1250., 0.0);
+{   111} G205002 +GNO3               =       G105002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   112} G205002 +MEPERO             =  0.480G105002 + 0.260GO05002 + 0.260GK05001                 : ARR( 0.616E-11,   905., 0.0);
+{   113} G205002 +PERO1              =  0.600G105002 + 0.200GO05002 + 0.200GK05001                 : ARR( 0.473E-11,   850., 0.0);
+{   114} G205002 +PERO2              =  0.560G105002 + 0.220GO05002 + 0.220GK05001                 : ARR( 0.177E-11,   350., 0.0);
+{   115} G205002 +PERO3              =  0.600G105002 + 0.200GO05002 + 0.200GK05001                 : ARR( 0.533E-11,   500., 0.0);
+{   116} G205002 +PERO5              =  0.600G105002 + 0.200GO05002 + 0.200GK05001                 : ARR( 0.200E-09,  2200., 0.0);
+{   117} G205002 +PERO6              =  0.460G105002 + 0.270GO05002 + 0.270GK05001                 : ARR( 0.183E-11,   450., 0.0);
+{   118} G205002 +PERO9              =  0.800G105002 + 0.200GK05001                                : ARR( 0.100E-10,     0., 0.0);
+{   119} G105000                     =       G2O5000                                               : ARR( 0.160E+12,  3092., 0.0);
+{   120} G105001                     =       G2O5001                                               : ARR( 0.240E+12,  4177., 0.0);
+{   121} G105001                     =       G203000 +      GD02000                                : ARR( 0.200E+15,  7236., 0.0);
+{   122} G105002                     =       G202000 +      GD03000                                : ARR( 0.400E+15,  7207., 0.0);
+{   123} G2O5000 +GNO                =       G1O5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   124} G2O5000 +GNO                =       GNO5000                                               : ARR( 0.182E-12,  -360., 0.0);
+{   125} G2O5000 +GHO2               =       GHO5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{   126} G2O5000 +GNO3               =       G1O5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   127} G2O5000 +MEPERO             =  0.480G1O5000 + 0.260GOO5000 + 0.260GKO5000                 : ARR( 0.616E-11,   905., 0.0);
+{   128} G2O5000 +PERO1              =  0.600G1O5000 + 0.200GOO5000 + 0.200GKO5000                 : ARR( 0.473E-11,   850., 0.0);
+{   129} G2O5000 +PERO2              =  0.560G1O5000 + 0.220GOO5000 + 0.220GKO5000                 : ARR( 0.177E-11,   350., 0.0);
+{   130} G2O5000 +PERO3              =  0.600G1O5000 + 0.200GOO5000 + 0.200GKO5000                 : ARR( 0.533E-11,   500., 0.0);
+{   131} G2O5000 +PERO5              =  0.600G1O5000 + 0.200GOO5000 + 0.200GKO5000                 : ARR( 0.200E-09,  2200., 0.0);
+{   132} G2O5000 +PERO6              =  0.460G1O5000 + 0.270GOO5000 + 0.270GKO5000                 : ARR( 0.183E-11,   450., 0.0);
+{   133} G2O5000 +PERO9              =  0.800G1O5000 + 0.200GKO5000                                : ARR( 0.100E-10,     0., 0.0);
+{   134} G2O5001 +GNO                =       G1O5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   135} G2O5001 +GNO                =       GNO5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{   136} G2O5001 +GHO2               =       GHO5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{   137} G2O5001 +GNO3               =       G1O5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   138} G2O5001 +MEPERO             =  0.480G1O5001 + 0.260GOO5000 + 0.260GDO5000                 : ARR( 0.146E-12,  -445., 0.0);
+{   139} G2O5001 +PERO1              =  0.600G1O5001 + 0.200GOO5000 + 0.200GDO5000                 : ARR( 0.112E-12,  -500., 0.0);
+{   140} G2O5001 +PERO2              =  0.560G1O5001 + 0.220GOO5000 + 0.220GDO5000                 : ARR( 0.418E-13, -1000., 0.0);
+{   141} G2O5001 +PERO3              =  0.600G1O5001 + 0.200GOO5000 + 0.200GDO5000                 : ARR( 0.126E-12,  -850., 0.0);
+{   142} G2O5001 +PERO5              =  0.600G1O5001 + 0.200GOO5000 + 0.200GDO5000                 : ARR( 0.473E-11,   850., 0.0);
+{   143} G2O5001 +PERO6              =  0.460G1O5001 + 0.270GOO5000 + 0.270GDO5000                 : ARR( 0.434E-13,  -900., 0.0);
+{   144} G2O5001 +PERO9              =  0.800G1O5001 + 0.200GDO5000                                : ARR( 0.100E-10,     0., 0.0);
+{   145} G203000 +GNO                =       G103000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   146} G203000 +GNO                =       GN03000                                               : ARR( 0.622E-13,  -360., 0.0);
+{   147} G203000 +GHO2               =       GH03000                                               : ARR( 0.179E-12, -1250., 0.0);
+{   148} G203000 +GNO3               =       G103000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   149} G203000 +MEPERO             =  0.480G103000 + 0.260GO03000 + 0.260GD03000                 : ARR( 0.146E-12,  -445., 0.0);
+{   150} G203000 +PERO1              =  0.600G103000 + 0.200GO03000 + 0.200GD03000                 : ARR( 0.112E-12,  -500., 0.0);
+{   151} G203000 +PERO2              =  0.560G103000 + 0.220GO03000 + 0.220GD03000                 : ARR( 0.418E-13, -1000., 0.0);
+{   152} G203000 +PERO3              =  0.600G103000 + 0.200GO03000 + 0.200GD03000                 : ARR( 0.126E-12,  -850., 0.0);
+{   153} G203000 +PERO5              =  0.600G103000 + 0.200GO03000 + 0.200GD03000                 : ARR( 0.473E-11,   850., 0.0);
+{   154} G203000 +PERO6              =  0.460G103000 + 0.270GO03000 + 0.270GD03000                 : ARR( 0.434E-13,  -900., 0.0);
+{   155} G203000 +PERO9              =  0.800G103000 + 0.200GD03000                                : ARR( 0.100E-10,     0., 0.0);
+{   156} G202000 +GNO                =       G102000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{   157} G202000 +GHO2               =       GH02000                                               : ARR( 0.133E-12, -1250., 0.0);
+{   158} G202000 +GNO3               =       G102000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   159} G202000 +MEPERO             =  0.480G102000 + 0.260GO02000 + 0.260GD02000                 : ARR( 0.146E-12,  -445., 0.0);
+{   160} G202000 +PERO1              =  0.600G102000 + 0.200GO02000 + 0.200GD02000                 : ARR( 0.112E-12,  -500., 0.0);
+{   161} G202000 +PERO2              =  0.560G102000 + 0.220GO02000 + 0.220GD02000                 : ARR( 0.418E-13, -1000., 0.0);
+{   162} G202000 +PERO3              =  0.600G102000 + 0.200GO02000 + 0.200GD02000                 : ARR( 0.126E-12,  -850., 0.0);
+{   163} G202000 +PERO5              =  0.600G102000 + 0.200GO02000 + 0.200GD02000                 : ARR( 0.473E-11,   850., 0.0);
+{   164} G202000 +PERO6              =  0.460G102000 + 0.270GO02000 + 0.270GD02000                 : ARR( 0.434E-13,  -900., 0.0);
+{   165} G202000 +PERO9              =  0.800G102000 + 0.200GD02000                                : ARR( 0.100E-10,     0., 0.0);
+{   166} G1O5000                     =       GDO5000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{   167} G1O5001                     =       GKO5000 +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{   168} G103000 +OXYGEN             =       GD03000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   169} G102000 +OXYGEN             =       GD02000 +      GHO2                                   : ARR( 0.600E-13,   582., 0.0);
+{   170} GN05000 +GHO                =       G2N5000                                               : ARR( 0.170E-12,     0., 0.0);
+{   171} GN05000 +GHO                =       G2N5001                                               : ARR( 0.117E-11,     0., 0.0);
+{   172} GN05000 +GHO                =       G2N5002                                               : ARR( 0.143E-11,     0., 0.0);
+{   173} GN05000 +GHO                =       G2N5003                                               : ARR( 0.287E-12,     0., 0.0);
+{   174} GN05000+HV               =       G105000 +      GNO2                                   :  0.100E+01*SUN;
+{   175} G2N5000 +GNO                =       G1N5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   176} G2N5000 +GNO                =       GNN5000                                               : ARR( 0.182E-12,  -360., 0.0);
+{   177} G2N5000 +GHO2               =       GHN5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{   178} G2N5000 +GNO3               =       G1N5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   179} G2N5000 +MEPERO             =  0.480G1N5000 + 0.260GNO5002 + 0.260GND5000                 : ARR( 0.146E-12,  -445., 0.0);
+{   180} G2N5000 +PERO1              =  0.600G1N5000 + 0.200GNO5002 + 0.200GND5000                 : ARR( 0.112E-12,  -500., 0.0);
+{   181} G2N5000 +PERO2              =  0.560G1N5000 + 0.220GNO5002 + 0.220GND5000                 : ARR( 0.418E-13, -1000., 0.0);
+{   182} G2N5000 +PERO3              =  0.600G1N5000 + 0.200GNO5002 + 0.200GND5000                 : ARR( 0.126E-12,  -850., 0.0);
+{   183} G2N5000 +PERO5              =  0.600G1N5000 + 0.200GNO5002 + 0.200GND5000                 : ARR( 0.473E-11,   850., 0.0);
+{   184} G2N5000 +PERO6              =  0.460G1N5000 + 0.270GNO5002 + 0.270GND5000                 : ARR( 0.434E-13,  -900., 0.0);
+{   185} G2N5000 +PERO9              =  0.800G1N5000 + 0.200GND5000                                : ARR( 0.100E-10,     0., 0.0);
+{   186} G2N5001 +GNO                =       G1N5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   187} G2N5001 +GNO                =       GNN5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{   188} G2N5001 +GHO2               =       GHN5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{   189} G2N5001 +GNO3               =       G1N5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   190} G2N5001 +MEPERO             =  0.480G1N5001 + 0.260GNO5001 + 0.260GNK5000                 : ARR( 0.616E-11,   905., 0.0);
+{   191} G2N5001 +PERO1              =  0.600G1N5001 + 0.200GNO5001 + 0.200GNK5000                 : ARR( 0.473E-11,   850., 0.0);
+{   192} G2N5001 +PERO2              =  0.560G1N5001 + 0.220GNO5001 + 0.220GNK5000                 : ARR( 0.177E-11,   350., 0.0);
+{   193} G2N5001 +PERO3              =  0.600G1N5001 + 0.200GNO5001 + 0.200GNK5000                 : ARR( 0.533E-11,   500., 0.0);
+{   194} G2N5001 +PERO5              =  0.600G1N5001 + 0.200GNO5001 + 0.200GNK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{   195} G2N5001 +PERO6              =  0.460G1N5001 + 0.270GNO5001 + 0.270GNK5000                 : ARR( 0.183E-11,   450., 0.0);
+{   196} G2N5001 +PERO9              =  0.800G1N5001 + 0.200GNK5000                                : ARR( 0.100E-10,     0., 0.0);
+{   197} G2N5002 +GNO                =       G1N5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   198} G2N5002 +GNO                =       GNN5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{   199} G2N5002 +GHO2               =       GHN5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{   200} G2N5002 +GNO3               =       G1N5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   201} G2N5002 +MEPERO             =  0.480G1N5002 + 0.260GNO5003 + 0.260GNK5001                 : ARR( 0.616E-11,   905., 0.0);
+{   202} G2N5002 +PERO1              =  0.600G1N5002 + 0.200GNO5003 + 0.200GNK5001                 : ARR( 0.473E-11,   850., 0.0);
+{   203} G2N5002 +PERO2              =  0.560G1N5002 + 0.220GNO5003 + 0.220GNK5001                 : ARR( 0.177E-11,   350., 0.0);
+{   204} G2N5002 +PERO3              =  0.600G1N5002 + 0.200GNO5003 + 0.200GNK5001                 : ARR( 0.533E-11,   500., 0.0);
+{   205} G2N5002 +PERO5              =  0.600G1N5002 + 0.200GNO5003 + 0.200GNK5001                 : ARR( 0.200E-09,  2200., 0.0);
+{   206} G2N5002 +PERO6              =  0.460G1N5002 + 0.270GNO5003 + 0.270GNK5001                 : ARR( 0.183E-11,   450., 0.0);
+{   207} G2N5002 +PERO9              =  0.800G1N5002 + 0.200GNK5001                                : ARR( 0.100E-10,     0., 0.0);
+{   208} G2N5003 +GNO                =       G1N5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   209} G2N5003 +GNO                =       GNN5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{   210} G2N5003 +GHO2               =       GHN5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{   211} G2N5003 +GNO3               =       G1N5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   212} G2N5003 +MEPERO             =  0.340G1N5003 + 0.330GNO5004 + 0.330GNK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{   213} G2N5003 +PERO1              =  0.460G1N5003 + 0.270GNO5004 + 0.270GNK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{   214} G2N5003 +PERO2              =  0.400G1N5003 + 0.300GNO5004 + 0.300GNK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{   215} G2N5003 +PERO3              =  0.460G1N5003 + 0.270GNO5004 + 0.270GNK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{   216} G2N5003 +PERO5              =  0.460G1N5003 + 0.270GNO5004 + 0.270GNK5002                 : ARR( 0.183E-11,   450., 0.0);
+{   217} G2N5003 +PERO6              =  0.300G1N5003 + 0.350GNO5004 + 0.350GNK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{   218} G2N5003 +PERO9              =  0.650G1N5003 + 0.350GNK5002                                : ARR( 0.100E-10,     0., 0.0);
+{   219} G1N5000 +OXYGEN             =       GND5000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   220} G1N5000                     =       G2N5004                                               : ARR( 0.160E+12,  3719., 0.0);
+{   221} G1N5001                     =       GDO5000 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{   222} G1N5001                     =       GD02000 +      G2N3000                                : ARR( 0.200E+15,  7236., 0.0);
+{   223} G1N5002                     =       G202000 +      GND3000                                : ARR( 0.200E+15,  7207., 0.0);
+{   224} G1N5002                     =       GD03000 +      G2N2000                                : ARR( 0.200E+15,  6819., 0.0);
+{   225} G1N5003                     =       G2N5005                                               : ARR( 0.240E+12,  4177., 0.0);
+{   226} G2N5004 +GNO                =       G1N5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   227} G2N5004 +GNO                =       GNN5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{   228} G2N5004 +GHO2               =       GHN5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{   229} G2N5004 +GNO3               =       G1N5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   230} G2N5004 +MEPERO             =  0.340G1N5004 + 0.330GNO5005 + 0.330GNK5003                 : ARR( 0.565E-13,  -845., 0.0);
+{   231} G2N5004 +PERO1              =  0.460G1N5004 + 0.270GNO5005 + 0.270GNK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{   232} G2N5004 +PERO2              =  0.400G1N5004 + 0.300GNO5005 + 0.300GNK5003                 : ARR( 0.162E-13, -1400., 0.0);
+{   233} G2N5004 +PERO3              =  0.460G1N5004 + 0.270GNO5005 + 0.270GNK5003                 : ARR( 0.488E-13, -1250., 0.0);
+{   234} G2N5004 +PERO5              =  0.460G1N5004 + 0.270GNO5005 + 0.270GNK5003                 : ARR( 0.183E-11,   450., 0.0);
+{   235} G2N5004 +PERO6              =  0.300G1N5004 + 0.350GNO5005 + 0.350GNK5003                 : ARR( 0.168E-13, -1300., 0.0);
+{   236} G2N5004 +PERO9              =  0.650G1N5004 + 0.350GNK5003                                : ARR( 0.100E-10,     0., 0.0);
+{   237} G2N3000 +GNO                =       G1N3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   238} G2N3000 +GNO                =       GNN3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{   239} G2N3000 +GHO2               =       GHN3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{   240} G2N3000 +GNO3               =       G1N3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   241} G2N3000 +MEPERO             =  0.480G1N3000 + 0.260GNO3000 + 0.260GND3000                 : ARR( 0.146E-12,  -445., 0.0);
+{   242} G2N3000 +PERO1              =  0.600G1N3000 + 0.200GNO3000 + 0.200GND3000                 : ARR( 0.112E-12,  -500., 0.0);
+{   243} G2N3000 +PERO2              =  0.560G1N3000 + 0.220GNO3000 + 0.220GND3000                 : ARR( 0.418E-13, -1000., 0.0);
+{   244} G2N3000 +PERO3              =  0.600G1N3000 + 0.200GNO3000 + 0.200GND3000                 : ARR( 0.126E-12,  -850., 0.0);
+{   245} G2N3000 +PERO5              =  0.600G1N3000 + 0.200GNO3000 + 0.200GND3000                 : ARR( 0.473E-11,   850., 0.0);
+{   246} G2N3000 +PERO6              =  0.460G1N3000 + 0.270GNO3000 + 0.270GND3000                 : ARR( 0.434E-13,  -900., 0.0);
+{   247} G2N3000 +PERO9              =  0.800G1N3000 + 0.200GND3000                                : ARR( 0.100E-10,     0., 0.0);
+{   248} G2N2000 +GNO                =       G1N2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{   249} G2N2000 +GHO2               =       GHN2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{   250} G2N2000 +GNO3               =       G1N2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   251} G2N2000 +MEPERO             =  0.480G1N2000 + 0.260GNO2000 + 0.260GND2000                 : ARR( 0.164E-12,  -795., 0.0);
+{   252} G2N2000 +PERO1              =  0.600G1N2000 + 0.200GNO2000 + 0.200GND2000                 : ARR( 0.126E-12,  -850., 0.0);
+{   253} G2N2000 +PERO2              =  0.560G1N2000 + 0.220GNO2000 + 0.220GND2000                 : ARR( 0.471E-13, -1350., 0.0);
+{   254} G2N2000 +PERO3              =  0.600G1N2000 + 0.200GNO2000 + 0.200GND2000                 : ARR( 0.142E-12, -1200., 0.0);
+{   255} G2N2000 +PERO5              =  0.600G1N2000 + 0.200GNO2000 + 0.200GND2000                 : ARR( 0.533E-11,   500., 0.0);
+{   256} G2N2000 +PERO6              =  0.460G1N2000 + 0.270GNO2000 + 0.270GND2000                 : ARR( 0.488E-13, -1250., 0.0);
+{   257} G2N2000 +PERO9              =  0.800G1N2000 + 0.200GND2000                                : ARR( 0.100E-10,     0., 0.0);
+{   258} G2N5005 +GNO                =       G1N5005 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   259} G2N5005 +GNO                =       GNN5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{   260} G2N5005 +GHO2               =       GHN5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{   261} G2N5005 +GNO3               =       G1N5005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   262} G2N5005 +MEPERO             =  0.480G1N5005 + 0.260GNO5005 + 0.260GND5001                 : ARR( 0.146E-12,  -445., 0.0);
+{   263} G2N5005 +PERO1              =  0.600G1N5005 + 0.200GNO5005 + 0.200GND5001                 : ARR( 0.112E-12,  -500., 0.0);
+{   264} G2N5005 +PERO2              =  0.560G1N5005 + 0.220GNO5005 + 0.220GND5001                 : ARR( 0.418E-13, -1000., 0.0);
+{   265} G2N5005 +PERO3              =  0.600G1N5005 + 0.200GNO5005 + 0.200GND5001                 : ARR( 0.126E-12,  -850., 0.0);
+{   266} G2N5005 +PERO5              =  0.600G1N5005 + 0.200GNO5005 + 0.200GND5001                 : ARR( 0.473E-11,   850., 0.0);
+{   267} G2N5005 +PERO6              =  0.460G1N5005 + 0.270GNO5005 + 0.270GND5001                 : ARR( 0.434E-13,  -900., 0.0);
+{   268} G2N5005 +PERO9              =  0.800G1N5005 + 0.200GND5001                                : ARR( 0.100E-10,     0., 0.0);
+{   269} G1N5004                     =       GND5001 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{   270} G1N3000 +OXYGEN             =       GND3000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   271} G1N2000 +OXYGEN             =       GND2000 +      GHO2                                   : ARR( 0.600E-13,   687., 0.0);
+{   272} G1N5005                     =       GNK5003 +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{   273} GH05000 +GHO                =       G2H5000                                               : ARR( 0.150E-11,     0., 0.0);
+{   274} GH05000 +GHO                =       G2H5001                                               : ARR( 0.150E-11,     0., 0.0);
+{   275} GH05000 +GHO                =       GD05000 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{   276} GH05000 +GHO                =       G205000                                               : ARR( 0.201E-11,  -190., 0.0);
+{   277} GH05000+HV               =       G105000 +      GHO                                    :  0.100E+01*SUN;
+{   278} G2H5000 +GNO                =       G1H5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   279} G2H5000 +GNO                =       GHN5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{   280} G2H5000 +GHO2               =       GHH5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{   281} G2H5000 +GNO3               =       G1H5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   282} G2H5000 +MEPERO             =  0.480G1H5000 + 0.260GHO5002 + 0.260GHK5000                 : ARR( 0.616E-11,   905., 0.0);
+{   283} G2H5000 +PERO1              =  0.600G1H5000 + 0.200GHO5002 + 0.200GHK5000                 : ARR( 0.473E-11,   850., 0.0);
+{   284} G2H5000 +PERO2              =  0.560G1H5000 + 0.220GHO5002 + 0.220GHK5000                 : ARR( 0.177E-11,   350., 0.0);
+{   285} G2H5000 +PERO3              =  0.600G1H5000 + 0.200GHO5002 + 0.200GHK5000                 : ARR( 0.533E-11,   500., 0.0);
+{   286} G2H5000 +PERO5              =  0.600G1H5000 + 0.200GHO5002 + 0.200GHK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{   287} G2H5000 +PERO6              =  0.460G1H5000 + 0.270GHO5002 + 0.270GHK5000                 : ARR( 0.183E-11,   450., 0.0);
+{   288} G2H5000 +PERO9              =  0.800G1H5000 + 0.200GHK5000                                : ARR( 0.100E-10,     0., 0.0);
+{   289} G2H5001 +GNO                =       G1H5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   290} G2H5001 +GNO                =       GHN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{   291} G2H5001 +GHO2               =       GHH5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{   292} G2H5001 +GNO3               =       G1H5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   293} G2H5001 +MEPERO             =  0.340G1H5001 + 0.330GHO5003 + 0.330GHK5001                 : ARR( 0.565E-13,  -845., 0.0);
+{   294} G2H5001 +PERO1              =  0.460G1H5001 + 0.270GHO5003 + 0.270GHK5001                 : ARR( 0.434E-13,  -900., 0.0);
+{   295} G2H5001 +PERO2              =  0.400G1H5001 + 0.300GHO5003 + 0.300GHK5001                 : ARR( 0.162E-13, -1400., 0.0);
+{   296} G2H5001 +PERO3              =  0.460G1H5001 + 0.270GHO5003 + 0.270GHK5001                 : ARR( 0.488E-13, -1250., 0.0);
+{   297} G2H5001 +PERO5              =  0.460G1H5001 + 0.270GHO5003 + 0.270GHK5001                 : ARR( 0.183E-11,   450., 0.0);
+{   298} G2H5001 +PERO6              =  0.300G1H5001 + 0.350GHO5003 + 0.350GHK5001                 : ARR( 0.168E-13, -1300., 0.0);
+{   299} G2H5001 +PERO9              =  0.650G1H5001 + 0.350GHK5001                                : ARR( 0.100E-10,     0., 0.0);
+{   300} G1H5000                     =       G202000 +      GHD3000                                : ARR( 0.200E+15,  7207., 0.0);
+{   301} G1H5000                     =       GD03000 +      G2H2000                                : ARR( 0.200E+15,  6819., 0.0);
+{   302} G1H5001                     =       G2H5002                                               : ARR( 0.240E+12,  4177., 0.0);
+{   303} G1H5001                     =       GD04000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{   304} G2H2000 +GNO                =       G1H2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{   305} G2H2000 +GHO2               =       GHH2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{   306} G2H2000 +GNO3               =       G1H2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   307} G2H2000 +MEPERO             =  0.480G1H2000 + 0.260GHO2000 + 0.260GHD2000                 : ARR( 0.164E-12,  -795., 0.0);
+{   308} G2H2000 +PERO1              =  0.600G1H2000 + 0.200GHO2000 + 0.200GHD2000                 : ARR( 0.126E-12,  -850., 0.0);
+{   309} G2H2000 +PERO2              =  0.560G1H2000 + 0.220GHO2000 + 0.220GHD2000                 : ARR( 0.471E-13, -1350., 0.0);
+{   310} G2H2000 +PERO3              =  0.600G1H2000 + 0.200GHO2000 + 0.200GHD2000                 : ARR( 0.142E-12, -1200., 0.0);
+{   311} G2H2000 +PERO5              =  0.600G1H2000 + 0.200GHO2000 + 0.200GHD2000                 : ARR( 0.533E-11,   500., 0.0);
+{   312} G2H2000 +PERO6              =  0.460G1H2000 + 0.270GHO2000 + 0.270GHD2000                 : ARR( 0.488E-13, -1250., 0.0);
+{   313} G2H2000 +PERO9              =  0.800G1H2000 + 0.200GHD2000                                : ARR( 0.100E-10,     0., 0.0);
+{   314} G2H5002 +GNO                =       G1H5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   315} G2H5002 +GNO                =       GHN5008                                               : ARR( 0.182E-12,  -360., 0.0);
+{   316} G2H5002 +GHO2               =       GHH5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{   317} G2H5002 +GNO3               =       G1H5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   318} G2H5002 +MEPERO             =  0.480G1H5002 + 0.260GHO5004 + 0.260GHD5000                 : ARR( 0.146E-12,  -445., 0.0);
+{   319} G2H5002 +PERO1              =  0.600G1H5002 + 0.200GHO5004 + 0.200GHD5000                 : ARR( 0.112E-12,  -500., 0.0);
+{   320} G2H5002 +PERO2              =  0.560G1H5002 + 0.220GHO5004 + 0.220GHD5000                 : ARR( 0.418E-13, -1000., 0.0);
+{   321} G2H5002 +PERO3              =  0.600G1H5002 + 0.200GHO5004 + 0.200GHD5000                 : ARR( 0.126E-12,  -850., 0.0);
+{   322} G2H5002 +PERO5              =  0.600G1H5002 + 0.200GHO5004 + 0.200GHD5000                 : ARR( 0.473E-11,   850., 0.0);
+{   323} G2H5002 +PERO6              =  0.460G1H5002 + 0.270GHO5004 + 0.270GHD5000                 : ARR( 0.434E-13,  -900., 0.0);
+{   324} G2H5002 +PERO9              =  0.800G1H5002 + 0.200GHD5000                                : ARR( 0.100E-10,     0., 0.0);
+{   325} G1H2000 +OXYGEN             =       GHD2000 +      GHO2                                   : ARR( 0.600E-13,   688., 0.0);
+{   326} G1H5002                     =       GHK5002 +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{   327} GO05000 +GHO                =       G2O5000                                               : ARR( 0.159E-11,     0., 0.0);
+{   328} GO05000 +GHO                =       G2O5002                                               : ARR( 0.196E-11,     0., 0.0);
+{   329} GO05000 +GHO                =       G2O5003                                               : ARR( 0.196E-11,     0., 0.0);
+{   330} GO05000 +GHO                =       GD05000 +      GHO2                                   : ARR( 0.558E-11,     0., 0.0);
+{   331} G2O5002 +GNO                =       G1O5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   332} G2O5002 +GNO                =       GNO5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{   333} G2O5002 +GHO2               =       GHO5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{   334} G2O5002 +GNO3               =       G1O5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   335} G2O5002 +MEPERO             =  0.480G1O5002 + 0.260GOO5001 + 0.260GKO5001                 : ARR( 0.616E-11,   905., 0.0);
+{   336} G2O5002 +PERO1              =  0.600G1O5002 + 0.200GOO5001 + 0.200GKO5001                 : ARR( 0.473E-11,   850., 0.0);
+{   337} G2O5002 +PERO2              =  0.560G1O5002 + 0.220GOO5001 + 0.220GKO5001                 : ARR( 0.177E-11,   350., 0.0);
+{   338} G2O5002 +PERO3              =  0.600G1O5002 + 0.200GOO5001 + 0.200GKO5001                 : ARR( 0.533E-11,   500., 0.0);
+{   339} G2O5002 +PERO5              =  0.600G1O5002 + 0.200GOO5001 + 0.200GKO5001                 : ARR( 0.200E-09,  2200., 0.0);
+{   340} G2O5002 +PERO6              =  0.460G1O5002 + 0.270GOO5001 + 0.270GKO5001                 : ARR( 0.183E-11,   450., 0.0);
+{   341} G2O5002 +PERO9              =  0.800G1O5002 + 0.200GKO5001                                : ARR( 0.100E-10,     0., 0.0);
+{   342} G2O5003 +GNO                =       G1O5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   343} G2O5003 +GNO                =       GNO5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{   344} G2O5003 +GHO2               =       GHO5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{   345} G2O5003 +GNO3               =       G1O5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   346} G2O5003 +MEPERO             =  0.340G1O5003 + 0.330GOO5002 + 0.330GKO5002                 : ARR( 0.565E-13,  -845., 0.0);
+{   347} G2O5003 +PERO1              =  0.460G1O5003 + 0.270GOO5002 + 0.270GKO5002                 : ARR( 0.434E-13,  -900., 0.0);
+{   348} G2O5003 +PERO2              =  0.400G1O5003 + 0.300GOO5002 + 0.300GKO5002                 : ARR( 0.162E-13, -1400., 0.0);
+{   349} G2O5003 +PERO3              =  0.460G1O5003 + 0.270GOO5002 + 0.270GKO5002                 : ARR( 0.488E-13, -1250., 0.0);
+{   350} G2O5003 +PERO5              =  0.460G1O5003 + 0.270GOO5002 + 0.270GKO5002                 : ARR( 0.183E-11,   450., 0.0);
+{   351} G2O5003 +PERO6              =  0.300G1O5003 + 0.350GOO5002 + 0.350GKO5002                 : ARR( 0.168E-13, -1300., 0.0);
+{   352} G2O5003 +PERO9              =  0.650G1O5003 + 0.350GKO5002                                : ARR( 0.100E-10,     0., 0.0);
+{   353} G1O5002                     =       G202000 +      GDO3000                                : ARR( 0.200E+15,  7207., 0.0);
+{   354} G1O5002                     =       GD03000 +      G2O2000                                : ARR( 0.200E+15,  6819., 0.0);
+{   355} G1O5003                     =       G2O5004                                               : ARR( 0.240E+12,  4177., 0.0);
+{   356} G1O5003                     =       GD04000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{   357} G2O2000 +GNO                =       G1O2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{   358} G2O2000 +GHO2               =       GHO2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{   359} G2O2000 +GNO3               =       G1O2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   360} G2O2000 +MEPERO             =  0.480G1O2000 + 0.260GOO2000 + 0.260GDO2000                 : ARR( 0.164E-12,  -795., 0.0);
+{   361} G2O2000 +PERO1              =  0.600G1O2000 + 0.200GOO2000 + 0.200GDO2000                 : ARR( 0.126E-12,  -850., 0.0);
+{   362} G2O2000 +PERO2              =  0.560G1O2000 + 0.220GOO2000 + 0.220GDO2000                 : ARR( 0.471E-13, -1350., 0.0);
+{   363} G2O2000 +PERO3              =  0.600G1O2000 + 0.200GOO2000 + 0.200GDO2000                 : ARR( 0.142E-12, -1200., 0.0);
+{   364} G2O2000 +PERO5              =  0.600G1O2000 + 0.200GOO2000 + 0.200GDO2000                 : ARR( 0.533E-11,   500., 0.0);
+{   365} G2O2000 +PERO6              =  0.460G1O2000 + 0.270GOO2000 + 0.270GDO2000                 : ARR( 0.488E-13, -1250., 0.0);
+{   366} G2O2000 +PERO9              =  0.800G1O2000 + 0.200GDO2000                                : ARR( 0.100E-10,     0., 0.0);
+{   367} G2O5004 +GNO                =       G1O5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   368} G2O5004 +GNO                =       GNO5008                                               : ARR( 0.182E-12,  -360., 0.0);
+{   369} G2O5004 +GHO2               =       GHO5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{   370} G2O5004 +GNO3               =       G1O5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   371} G2O5004 +MEPERO             =  0.480G1O5004 + 0.260GOO5003 + 0.260GDO5001                 : ARR( 0.146E-12,  -445., 0.0);
+{   372} G2O5004 +PERO1              =  0.600G1O5004 + 0.200GOO5003 + 0.200GDO5001                 : ARR( 0.112E-12,  -500., 0.0);
+{   373} G2O5004 +PERO2              =  0.560G1O5004 + 0.220GOO5003 + 0.220GDO5001                 : ARR( 0.418E-13, -1000., 0.0);
+{   374} G2O5004 +PERO3              =  0.600G1O5004 + 0.200GOO5003 + 0.200GDO5001                 : ARR( 0.126E-12,  -850., 0.0);
+{   375} G2O5004 +PERO5              =  0.600G1O5004 + 0.200GOO5003 + 0.200GDO5001                 : ARR( 0.473E-11,   850., 0.0);
+{   376} G2O5004 +PERO6              =  0.460G1O5004 + 0.270GOO5003 + 0.270GDO5001                 : ARR( 0.434E-13,  -900., 0.0);
+{   377} G2O5004 +PERO9              =  0.800G1O5004 + 0.200GDO5001                                : ARR( 0.100E-10,     0., 0.0);
+{   378} G1O2000 +OXYGEN             =       GDO2000 +      GHO2                                   : ARR( 0.600E-13,   688., 0.0);
+{   379} G1O2000                     =  2.000GCH2O   +      GHO2                                   : ARR( 0.200E+15,  6163., 0.0);
+{   380} G1O5004                     =       GKO5003 +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{   381} GD05000 +GHO                =       G2D5000                                               : ARR( 0.112E-11,  -448., 0.0);
+{   382} GD05000 +GHO                =       G3K5000                                               : ARR( 0.522E-11,  -448., 0.0);
+{   383} GD05000 +GNO3               =       G3K5000 +      GHNO3                                  : ARR( 0.164E-13,     0., 0.0);
+{   384} GD05000+HV               =       G204000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{   385} GD05000+HV               =       GD02000 +      GU03000                                :  0.100E+01*SUN;
+{   386} G2D5000 +GNO                =       G1D5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   387} G2D5000 +GNO                =       GND5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{   388} G2D5000 +GHO2               =       GHD5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{   389} G2D5000 +GNO3               =       G1D5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   390} G2D5000 +MEPERO             =  0.480G1D5000 + 0.260GDO5002 + 0.260GDK5000                 : ARR( 0.616E-11,   905., 0.0);
+{   391} G2D5000 +PERO1              =  0.600G1D5000 + 0.200GDO5002 + 0.200GDK5000                 : ARR( 0.473E-11,   850., 0.0);
+{   392} G2D5000 +PERO2              =  0.560G1D5000 + 0.220GDO5002 + 0.220GDK5000                 : ARR( 0.177E-11,   350., 0.0);
+{   393} G2D5000 +PERO3              =  0.600G1D5000 + 0.200GDO5002 + 0.200GDK5000                 : ARR( 0.533E-11,   500., 0.0);
+{   394} G2D5000 +PERO5              =  0.600G1D5000 + 0.200GDO5002 + 0.200GDK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{   395} G2D5000 +PERO6              =  0.460G1D5000 + 0.270GDO5002 + 0.270GDK5000                 : ARR( 0.183E-11,   450., 0.0);
+{   396} G2D5000 +PERO9              =  0.800G1D5000 + 0.200GDK5000                                : ARR( 0.100E-10,     0., 0.0);
+{   397} G3K5000 +GHO2               =  0.800GG05000 + 0.200GA05000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{   398} G3K5000 +GNO                =       G204000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{   399} G3K5000 +GNO2               =       GP05000                                               : ARR( 0.330E-08,     0.,-1.0);
+{   400} G3K5000 +GNO3               =       G204000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{   401} G3K5000 +MEPERO             =  0.685G204000 + 0.315GA05000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   402} G3K5000 +PERO1              =  0.800G204000 + 0.200GA05000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   403} G3K5000 +PERO2              =  0.750G204000 + 0.250GA05000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   404} G3K5000 +PERO3              =  0.800G204000 + 0.200GA05000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   405} G3K5000 +PERO5              =  0.650G204000 + 0.350GA05000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   406} G3K5000 +PERO6              =  0.650G204000 + 0.350GA05000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   407} G3K5000 +PERO9              =       G204000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{   408} G204000 +GNO                =       G104000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{   409} G204000 +GNO                =       GN04000                                               : ARR( 0.111E-12,  -360., 0.0);
+{   410} G204000 +GHO2               =       GH04000                                               : ARR( 0.214E-12, -1250., 0.0);
+{   411} G204000 +GNO3               =       G104000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   412} G204000 +MEPERO             =  0.480G104000 + 0.260GO04000 + 0.260GD04000                 : ARR( 0.146E-12,  -445., 0.0);
+{   413} G204000 +PERO1              =  0.600G104000 + 0.200GO04000 + 0.200GD04000                 : ARR( 0.112E-12,  -500., 0.0);
+{   414} G204000 +PERO2              =  0.560G104000 + 0.220GO04000 + 0.220GD04000                 : ARR( 0.418E-13, -1000., 0.0);
+{   415} G204000 +PERO3              =  0.600G104000 + 0.200GO04000 + 0.200GD04000                 : ARR( 0.126E-12,  -850., 0.0);
+{   416} G204000 +PERO5              =  0.600G104000 + 0.200GO04000 + 0.200GD04000                 : ARR( 0.473E-11,   850., 0.0);
+{   417} G204000 +PERO6              =  0.460G104000 + 0.270GO04000 + 0.270GD04000                 : ARR( 0.434E-13,  -900., 0.0);
+{   418} G204000 +PERO9              =  0.800G104000 + 0.200GD04000                                : ARR( 0.100E-10,     0., 0.0);
+{   419} G1D5000                     =       G202000 +      GDD3000                                : ARR( 0.200E+15,  6824., 0.0);
+{   420} G1D5000                     =       GD03000 +      G2D2000                                : ARR( 0.200E+15,  6974., 0.0);
+{   421} G104000 +OXYGEN             =       GD04000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   422} G104000                     =       G2O4000                                               : ARR( 0.240E+12,  4177., 0.0);
+{   423} G2D2000 +GNO                =       G1D2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{   424} G2D2000 +GHO2               =       GHD2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{   425} G2D2000 +GNO3               =       G1D2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   426} G2D2000 +MEPERO             =  0.480G1D2000 + 0.260GDO2000 + 0.260GDD2000                 : ARR( 0.164E-12,  -795., 0.0);
+{   427} G2D2000 +PERO1              =  0.600G1D2000 + 0.200GDO2000 + 0.200GDD2000                 : ARR( 0.126E-12,  -850., 0.0);
+{   428} G2D2000 +PERO2              =  0.560G1D2000 + 0.220GDO2000 + 0.220GDD2000                 : ARR( 0.471E-13, -1350., 0.0);
+{   429} G2D2000 +PERO3              =  0.600G1D2000 + 0.200GDO2000 + 0.200GDD2000                 : ARR( 0.142E-12, -1200., 0.0);
+{   430} G2D2000 +PERO5              =  0.600G1D2000 + 0.200GDO2000 + 0.200GDD2000                 : ARR( 0.533E-11,   500., 0.0);
+{   431} G2D2000 +PERO6              =  0.460G1D2000 + 0.270GDO2000 + 0.270GDD2000                 : ARR( 0.488E-13, -1250., 0.0);
+{   432} G2D2000 +PERO9              =  0.800G1D2000 + 0.200GDD2000                                : ARR( 0.100E-10,     0., 0.0);
+{   433} G2O4000 +GNO                =       G1O4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{   434} G2O4000 +GNO                =       GNO4000                                               : ARR( 0.111E-12,  -360., 0.0);
+{   435} G2O4000 +GHO2               =       GHO4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{   436} G2O4000 +GNO3               =       G1O4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   437} G2O4000 +MEPERO             =  0.480G1O4000 + 0.260GOO4000 + 0.260GDO4000                 : ARR( 0.146E-12,  -445., 0.0);
+{   438} G2O4000 +PERO1              =  0.600G1O4000 + 0.200GOO4000 + 0.200GDO4000                 : ARR( 0.112E-12,  -500., 0.0);
+{   439} G2O4000 +PERO2              =  0.560G1O4000 + 0.220GOO4000 + 0.220GDO4000                 : ARR( 0.418E-13, -1000., 0.0);
+{   440} G2O4000 +PERO3              =  0.600G1O4000 + 0.200GOO4000 + 0.200GDO4000                 : ARR( 0.126E-12,  -850., 0.0);
+{   441} G2O4000 +PERO5              =  0.600G1O4000 + 0.200GOO4000 + 0.200GDO4000                 : ARR( 0.473E-11,   850., 0.0);
+{   442} G2O4000 +PERO6              =  0.460G1O4000 + 0.270GOO4000 + 0.270GDO4000                 : ARR( 0.434E-13,  -900., 0.0);
+{   443} G2O4000 +PERO9              =  0.800G1O4000 + 0.200GDO4000                                : ARR( 0.100E-10,     0., 0.0);
+{   444} G1D2000 +OXYGEN             =       GDD2000 +      GHO2                                   : ARR( 0.600E-13,  1177., 0.0);
+{   445} G1D2000                     =       GCO     +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  6323., 0.0);
+{   446} G1O4000                     =       GDO4000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{   447} GN05001 +GHO                =       G2N5006                                               : ARR( 0.183E-12,     0., 0.0);
+{   448} GN05001 +GHO                =       G2N5007                                               : ARR( 0.125E-11,     0., 0.0);
+{   449} GN05001 +GHO                =       G2N5008                                               : ARR( 0.309E-12,     0., 0.0);
+{   450} GN05001 +GHO                =       GK05000 +      GNO2                                   : ARR( 0.105E-12,     0., 0.0);
+{   451} GN05001+HV               =       G105001 +      GNO2                                   :  0.100E+01*SUN;
+{   452} G2N5006 +GNO                =       G1N5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   453} G2N5006 +GNO                =       GNN5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{   454} G2N5006 +GHO2               =       GHN5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{   455} G2N5006 +GNO3               =       G1N5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   456} G2N5006 +MEPERO             =  0.480G1N5006 + 0.260GNO5000 + 0.260GND5003                 : ARR( 0.146E-12,  -445., 0.0);
+{   457} G2N5006 +PERO1              =  0.600G1N5006 + 0.200GNO5000 + 0.200GND5003                 : ARR( 0.112E-12,  -500., 0.0);
+{   458} G2N5006 +PERO2              =  0.560G1N5006 + 0.220GNO5000 + 0.220GND5003                 : ARR( 0.418E-13, -1000., 0.0);
+{   459} G2N5006 +PERO3              =  0.600G1N5006 + 0.200GNO5000 + 0.200GND5003                 : ARR( 0.126E-12,  -850., 0.0);
+{   460} G2N5006 +PERO5              =  0.600G1N5006 + 0.200GNO5000 + 0.200GND5003                 : ARR( 0.473E-11,   850., 0.0);
+{   461} G2N5006 +PERO6              =  0.460G1N5006 + 0.270GNO5000 + 0.270GND5003                 : ARR( 0.434E-13,  -900., 0.0);
+{   462} G2N5006 +PERO9              =  0.800G1N5006 + 0.200GND5003                                : ARR( 0.100E-10,     0., 0.0);
+{   463} G2N5007 +GNO                =       G1N5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   464} G2N5007 +GNO                =       GNN5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{   465} G2N5007 +GHO2               =       GHN500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{   466} G2N5007 +GNO3               =       G1N5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   467} G2N5007 +MEPERO             =  0.480G1N5007 + 0.260GNO5009 + 0.260GNK5004                 : ARR( 0.616E-11,   905., 0.0);
+{   468} G2N5007 +PERO1              =  0.600G1N5007 + 0.200GNO5009 + 0.200GNK5004                 : ARR( 0.473E-11,   850., 0.0);
+{   469} G2N5007 +PERO2              =  0.560G1N5007 + 0.220GNO5009 + 0.220GNK5004                 : ARR( 0.177E-11,   350., 0.0);
+{   470} G2N5007 +PERO3              =  0.600G1N5007 + 0.200GNO5009 + 0.200GNK5004                 : ARR( 0.533E-11,   500., 0.0);
+{   471} G2N5007 +PERO5              =  0.600G1N5007 + 0.200GNO5009 + 0.200GNK5004                 : ARR( 0.200E-09,  2200., 0.0);
+{   472} G2N5007 +PERO6              =  0.460G1N5007 + 0.270GNO5009 + 0.270GNK5004                 : ARR( 0.183E-11,   450., 0.0);
+{   473} G2N5007 +PERO9              =  0.800G1N5007 + 0.200GNK5004                                : ARR( 0.100E-10,     0., 0.0);
+{   474} G2N5008 +GNO                =       G1N5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   475} G2N5008 +GNO                =       GNN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{   476} G2N5008 +GHO2               =       GHN500B                                               : ARR( 0.242E-12, -1250., 0.0);
+{   477} G2N5008 +GNO3               =       G1N5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   478} G2N5008 +MEPERO             =  0.340G1N5008 + 0.330GNO500A + 0.330GNK5005                 : ARR( 0.565E-13,  -845., 0.0);
+{   479} G2N5008 +PERO1              =  0.460G1N5008 + 0.270GNO500A + 0.270GNK5005                 : ARR( 0.434E-13,  -900., 0.0);
+{   480} G2N5008 +PERO2              =  0.400G1N5008 + 0.300GNO500A + 0.300GNK5005                 : ARR( 0.162E-13, -1400., 0.0);
+{   481} G2N5008 +PERO3              =  0.460G1N5008 + 0.270GNO500A + 0.270GNK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{   482} G2N5008 +PERO5              =  0.460G1N5008 + 0.270GNO500A + 0.270GNK5005                 : ARR( 0.183E-11,   450., 0.0);
+{   483} G2N5008 +PERO6              =  0.300G1N5008 + 0.350GNO500A + 0.350GNK5005                 : ARR( 0.168E-13, -1300., 0.0);
+{   484} G2N5008 +PERO9              =  0.650G1N5008 + 0.350GNK5005                                : ARR( 0.100E-10,     0., 0.0);
+{   485} G1N5006 +OXYGEN             =       GND5003 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   486} G1N5006                     =       GKO5000 +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{   487} G1N5007                     =       G2N5009                                               : ARR( 0.240E+12,  4897., 0.0);
+{   488} G1N5007                     =       G2N3001 +      GD02000                                : ARR( 0.200E+15,  6731., 0.0);
+{   489} G1N5008                     =       GD02000 +      GD03000 +      GNO2                    : ARR( 0.200E+15,  6455., 0.0);
+{   490} G1N5008                     =       GND3001 +      G202000                                : ARR( 0.200E+15,  7461., 0.0);
+{   491} G2N5009 +GNO                =       G1N5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   492} G2N5009 +GNO                =       GNN5008                                               : ARR( 0.182E-12,  -360., 0.0);
+{   493} G2N5009 +GHO2               =       GHN500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{   494} G2N5009 +GNO3               =       G1N5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   495} G2N5009 +MEPERO             =  0.480G1N5009 + 0.260GNO500B + 0.260GND5004                 : ARR( 0.164E-12,  -795., 0.0);
+{   496} G2N5009 +PERO1              =  0.600G1N5009 + 0.200GNO500B + 0.200GND5004                 : ARR( 0.126E-12,  -850., 0.0);
+{   497} G2N5009 +PERO2              =  0.560G1N5009 + 0.220GNO500B + 0.220GND5004                 : ARR( 0.471E-13, -1350., 0.0);
+{   498} G2N5009 +PERO3              =  0.600G1N5009 + 0.200GNO500B + 0.200GND5004                 : ARR( 0.142E-12, -1200., 0.0);
+{   499} G2N5009 +PERO5              =  0.600G1N5009 + 0.200GNO500B + 0.200GND5004                 : ARR( 0.533E-11,   500., 0.0);
+{   500} G2N5009 +PERO6              =  0.460G1N5009 + 0.270GNO500B + 0.270GND5004                 : ARR( 0.488E-13, -1250., 0.0);
+{   501} G2N5009 +PERO9              =  0.800G1N5009 + 0.200GND5004                                : ARR( 0.100E-10,     0., 0.0);
+{   502} G2N3001 +GNO                =       G1N3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   503} G2N3001 +GNO                =       GNN3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{   504} G2N3001 +GHO2               =       GHN3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{   505} G2N3001 +GNO3               =       G1N3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   506} G2N3001 +MEPERO             =  0.480G1N3001 + 0.260GNO3001 + 0.260GND3001                 : ARR( 0.164E-12,  -795., 0.0);
+{   507} G2N3001 +PERO1              =  0.600G1N3001 + 0.200GNO3001 + 0.200GND3001                 : ARR( 0.126E-12,  -850., 0.0);
+{   508} G2N3001 +PERO2              =  0.560G1N3001 + 0.220GNO3001 + 0.220GND3001                 : ARR( 0.471E-13, -1350., 0.0);
+{   509} G2N3001 +PERO3              =  0.600G1N3001 + 0.200GNO3001 + 0.200GND3001                 : ARR( 0.142E-12, -1200., 0.0);
+{   510} G2N3001 +PERO5              =  0.600G1N3001 + 0.200GNO3001 + 0.200GND3001                 : ARR( 0.533E-11,   500., 0.0);
+{   511} G2N3001 +PERO6              =  0.460G1N3001 + 0.270GNO3001 + 0.270GND3001                 : ARR( 0.488E-13, -1250., 0.0);
+{   512} G2N3001 +PERO9              =  0.800G1N3001 + 0.200GND3001                                : ARR( 0.100E-10,     0., 0.0);
+{   513} G1N5009                     =       GNK5006 +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{   514} G1N3001 +OXYGEN             =       GND3001 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{   515} G1N3001                     =       GD02000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7578., 0.0);
+{   516} GH05001 +GHO                =       GK05000 +      GHO                                    : ARR( 0.361E-10,     0., 0.0);
+{   517} GH05001 +GHO                =       G205001                                               : ARR( 0.205E-11,  -190., 0.0);
+{   518} GH05001+HV               =       G105001 +      GHO                                    :  0.100E+01*SUN;
+{   519} GO05001 +GHO                =       G2O5005                                               : ARR( 0.124E-11,     0., 0.0);
+{   520} GO05001 +GHO                =       G2O5006                                               : ARR( 0.152E-11,     0., 0.0);
+{   521} GO05001 +GHO                =       GK05000 +      GHO2                                   : ARR( 0.904E-11,     0., 0.0);
+{   522} G2O5005 +GNO                =       G1O5005 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   523} G2O5005 +GNO                =       GNO5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{   524} G2O5005 +GHO2               =       GHO5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{   525} G2O5005 +GNO3               =       G1O5005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   526} G2O5005 +MEPERO             =  0.480G1O5005 + 0.260GOO5004 + 0.260GKO5004                 : ARR( 0.616E-11,   905., 0.0);
+{   527} G2O5005 +PERO1              =  0.600G1O5005 + 0.200GOO5004 + 0.200GKO5004                 : ARR( 0.473E-11,   850., 0.0);
+{   528} G2O5005 +PERO2              =  0.560G1O5005 + 0.220GOO5004 + 0.220GKO5004                 : ARR( 0.177E-11,   350., 0.0);
+{   529} G2O5005 +PERO3              =  0.600G1O5005 + 0.200GOO5004 + 0.200GKO5004                 : ARR( 0.533E-11,   500., 0.0);
+{   530} G2O5005 +PERO5              =  0.600G1O5005 + 0.200GOO5004 + 0.200GKO5004                 : ARR( 0.200E-09,  2200., 0.0);
+{   531} G2O5005 +PERO6              =  0.460G1O5005 + 0.270GOO5004 + 0.270GKO5004                 : ARR( 0.183E-11,   450., 0.0);
+{   532} G2O5005 +PERO9              =  0.800G1O5005 + 0.200GKO5004                                : ARR( 0.100E-10,     0., 0.0);
+{   533} G2O5006 +GNO                =       G1O5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   534} G2O5006 +GNO                =       GNO500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{   535} G2O5006 +GHO2               =       GHO5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{   536} G2O5006 +GNO3               =       G1O5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   537} G2O5006 +MEPERO             =  0.340G1O5006 + 0.330GOO5005 + 0.330GKO5005                 : ARR( 0.565E-13,  -845., 0.0);
+{   538} G2O5006 +PERO1              =  0.460G1O5006 + 0.270GOO5005 + 0.270GKO5005                 : ARR( 0.434E-13,  -900., 0.0);
+{   539} G2O5006 +PERO2              =  0.400G1O5006 + 0.300GOO5005 + 0.300GKO5005                 : ARR( 0.162E-13, -1400., 0.0);
+{   540} G2O5006 +PERO3              =  0.460G1O5006 + 0.270GOO5005 + 0.270GKO5005                 : ARR( 0.488E-13, -1250., 0.0);
+{   541} G2O5006 +PERO5              =  0.460G1O5006 + 0.270GOO5005 + 0.270GKO5005                 : ARR( 0.183E-11,   450., 0.0);
+{   542} G2O5006 +PERO6              =  0.300G1O5006 + 0.350GOO5005 + 0.350GKO5005                 : ARR( 0.168E-13, -1300., 0.0);
+{   543} G2O5006 +PERO9              =  0.650G1O5006 + 0.350GKO5005                                : ARR( 0.100E-10,     0., 0.0);
+{   544} G1O5005                     =       G2O5007                                               : ARR( 0.240E+12,  4177., 0.0);
+{   545} G1O5005                     =       G2O3000 +      GD02000                                : ARR( 0.200E+15,  6731., 0.0);
+{   546} G1O5006                     =       GD02000 +      GD03000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{   547} G2O5007 +GNO                =       G1O5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   548} G2O5007 +GNO                =       GNO500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{   549} G2O5007 +GHO2               =       GHO500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{   550} G2O5007 +GNO3               =       G1O5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   551} G2O5007 +MEPERO             =  0.480G1O5007 + 0.260GOO5006 + 0.260GDO5003                 : ARR( 0.164E-12,  -795., 0.0);
+{   552} G2O5007 +PERO1              =  0.600G1O5007 + 0.200GOO5006 + 0.200GDO5003                 : ARR( 0.126E-12,  -850., 0.0);
+{   553} G2O5007 +PERO2              =  0.560G1O5007 + 0.220GOO5006 + 0.220GDO5003                 : ARR( 0.471E-13, -1350., 0.0);
+{   554} G2O5007 +PERO3              =  0.600G1O5007 + 0.200GOO5006 + 0.200GDO5003                 : ARR( 0.142E-12, -1200., 0.0);
+{   555} G2O5007 +PERO5              =  0.600G1O5007 + 0.200GOO5006 + 0.200GDO5003                 : ARR( 0.533E-11,   500., 0.0);
+{   556} G2O5007 +PERO6              =  0.460G1O5007 + 0.270GOO5006 + 0.270GDO5003                 : ARR( 0.488E-13, -1250., 0.0);
+{   557} G2O5007 +PERO9              =  0.800G1O5007 + 0.200GDO5003                                : ARR( 0.100E-10,     0., 0.0);
+{   558} G2O3000 +GNO                =       G1O3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   559} G2O3000 +GNO                =       GNO3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{   560} G2O3000 +GHO2               =       GHO3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{   561} G2O3000 +GNO3               =       G1O3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   562} G2O3000 +MEPERO             =  0.480G1O3000 + 0.260GOO3000 + 0.260GDO3001                 : ARR( 0.164E-12,  -795., 0.0);
+{   563} G2O3000 +PERO1              =  0.600G1O3000 + 0.200GOO3000 + 0.200GDO3001                 : ARR( 0.126E-12,  -850., 0.0);
+{   564} G2O3000 +PERO2              =  0.560G1O3000 + 0.220GOO3000 + 0.220GDO3001                 : ARR( 0.471E-13, -1350., 0.0);
+{   565} G2O3000 +PERO3              =  0.600G1O3000 + 0.200GOO3000 + 0.200GDO3001                 : ARR( 0.142E-12, -1200., 0.0);
+{   566} G2O3000 +PERO5              =  0.600G1O3000 + 0.200GOO3000 + 0.200GDO3001                 : ARR( 0.533E-11,   500., 0.0);
+{   567} G2O3000 +PERO6              =  0.460G1O3000 + 0.270GOO3000 + 0.270GDO3001                 : ARR( 0.488E-13, -1250., 0.0);
+{   568} G2O3000 +PERO9              =  0.800G1O3000 + 0.200GDO3001                                : ARR( 0.100E-10,     0., 0.0);
+{   569} G1O5007                     =       GKO5006 +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{   570} G1O5007                     =       GDO4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{   571} G1O3000                     =       GD02000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4830., 0.0);
+{   572} GK05000 +GHO                =       G2K5000                                               : ARR( 0.377E-11,     0., 0.0);
+{   573} GK05000 +GHO                =       G2K5001                                               : ARR( 0.891E-12,     0., 0.0);
+{   574} GK05000+HV               =       G203000 +      G3K2000                                :  0.100E+01*SUN;
+{   575} G2K5000 +GNO                =       G1K5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   576} G2K5000 +GNO                =       GNK5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{   577} G2K5000 +GHO2               =       GHK5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{   578} G2K5000 +GNO3               =       G1K5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   579} G2K5000 +MEPERO             =  0.480G1K5000 + 0.260GKO5004 + 0.260GKK5000                 : ARR( 0.616E-11,   905., 0.0);
+{   580} G2K5000 +PERO1              =  0.600G1K5000 + 0.200GKO5004 + 0.200GKK5000                 : ARR( 0.473E-11,   850., 0.0);
+{   581} G2K5000 +PERO2              =  0.560G1K5000 + 0.220GKO5004 + 0.220GKK5000                 : ARR( 0.177E-11,   350., 0.0);
+{   582} G2K5000 +PERO3              =  0.600G1K5000 + 0.200GKO5004 + 0.200GKK5000                 : ARR( 0.533E-11,   500., 0.0);
+{   583} G2K5000 +PERO5              =  0.600G1K5000 + 0.200GKO5004 + 0.200GKK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{   584} G2K5000 +PERO6              =  0.460G1K5000 + 0.270GKO5004 + 0.270GKK5000                 : ARR( 0.183E-11,   450., 0.0);
+{   585} G2K5000 +PERO9              =  0.800G1K5000 + 0.200GKK5000                                : ARR( 0.100E-10,     0., 0.0);
+{   586} G2K5001 +GNO                =       G1K5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   587} G2K5001 +GNO                =       GNK5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{   588} G2K5001 +GHO2               =       GHK5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{   589} G2K5001 +GNO3               =       G1K5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   590} G2K5001 +MEPERO             =  0.340G1K5001 + 0.330GKO5007 + 0.330GKK5001                 : ARR( 0.565E-13,  -845., 0.0);
+{   591} G2K5001 +PERO1              =  0.460G1K5001 + 0.270GKO5007 + 0.270GKK5001                 : ARR( 0.434E-13,  -900., 0.0);
+{   592} G2K5001 +PERO2              =  0.400G1K5001 + 0.300GKO5007 + 0.300GKK5001                 : ARR( 0.162E-13, -1400., 0.0);
+{   593} G2K5001 +PERO3              =  0.460G1K5001 + 0.270GKO5007 + 0.270GKK5001                 : ARR( 0.488E-13, -1250., 0.0);
+{   594} G2K5001 +PERO5              =  0.460G1K5001 + 0.270GKO5007 + 0.270GKK5001                 : ARR( 0.183E-11,   450., 0.0);
+{   595} G2K5001 +PERO6              =  0.300G1K5001 + 0.350GKO5007 + 0.350GKK5001                 : ARR( 0.168E-13, -1300., 0.0);
+{   596} G2K5001 +PERO9              =  0.650G1K5001 + 0.350GKK5001                                : ARR( 0.100E-10,     0., 0.0);
+{   597} G3K2000 +GHO2               =  0.800GG02000 + 0.200GA02000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{   598} G3K2000 +GNO                =       GCH3O2  +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{   599}  G3K2000 + GNO2       +M       =       GP02000         +M                                    : FALL( 0.110E-10,     0.,-1.0, 0.850E-28,     0.,-6.5,0.60);
+{   600} G3K2000 +GNO3               =       GCH3O2  +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{   601} G3K2000 +MEPERO             =  0.685GCH3O2  + 0.315GA02000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   602} G3K2000 +PERO1              =  0.800GCH3O2  + 0.200GA02000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   603} G3K2000 +PERO2              =  0.750GCH3O2  + 0.250GA02000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   604} G3K2000 +PERO3              =  0.800GCH3O2  + 0.200GA02000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   605} G3K2000 +PERO5              =  0.650GCH3O2  + 0.350GA02000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   606} G3K2000 +PERO6              =  0.650GCH3O2  + 0.350GA02000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   607} G3K2000 +PERO9              =       GCH3O2  +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{   608} G1K5000                     =       G2K5002                                               : ARR( 0.240E+12,  6160., 0.0);
+{   609} G1K5000                     =       G2K3000 +      GD02000                                : ARR( 0.200E+15,  7034., 0.0);
+{   610} G1K5001                     =       GD03000 +      G3K2000                                : ARR( 0.200E+15,  2668., 0.0);
+{   611} G2K5002 +GNO                =       G1K5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   612} G2K5002 +GNO                =       GNK5008                                               : ARR( 0.182E-12,  -360., 0.0);
+{   613} G2K5002 +GHO2               =       GHK5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{   614} G2K5002 +GNO3               =       G1K5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   615} G2K5002 +MEPERO             =  0.480G1K5002 + 0.260GKO5008 + 0.260GDK5001                 : ARR( 0.164E-12,  -795., 0.0);
+{   616} G2K5002 +PERO1              =  0.600G1K5002 + 0.200GKO5008 + 0.200GDK5001                 : ARR( 0.126E-12,  -850., 0.0);
+{   617} G2K5002 +PERO2              =  0.560G1K5002 + 0.220GKO5008 + 0.220GDK5001                 : ARR( 0.471E-13, -1350., 0.0);
+{   618} G2K5002 +PERO3              =  0.600G1K5002 + 0.200GKO5008 + 0.200GDK5001                 : ARR( 0.142E-12, -1200., 0.0);
+{   619} G2K5002 +PERO5              =  0.600G1K5002 + 0.200GKO5008 + 0.200GDK5001                 : ARR( 0.533E-11,   500., 0.0);
+{   620} G2K5002 +PERO6              =  0.460G1K5002 + 0.270GKO5008 + 0.270GDK5001                 : ARR( 0.488E-13, -1250., 0.0);
+{   621} G2K5002 +PERO9              =  0.800G1K5002 + 0.200GDK5001                                : ARR( 0.100E-10,     0., 0.0);
+{   622} G2K3000 +GNO                =       G1K3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   623} G2K3000 +GNO                =       GNK3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{   624} G2K3000 +GHO2               =       GHK3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{   625} G2K3000 +GNO3               =       G1K3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   626} G2K3000 +MEPERO             =  0.480G1K3000 + 0.260GKO3000 + 0.260GDK3000                 : ARR( 0.164E-12,  -795., 0.0);
+{   627} G2K3000 +PERO1              =  0.600G1K3000 + 0.200GKO3000 + 0.200GDK3000                 : ARR( 0.126E-12,  -850., 0.0);
+{   628} G2K3000 +PERO2              =  0.560G1K3000 + 0.220GKO3000 + 0.220GDK3000                 : ARR( 0.471E-13, -1350., 0.0);
+{   629} G2K3000 +PERO3              =  0.600G1K3000 + 0.200GKO3000 + 0.200GDK3000                 : ARR( 0.142E-12, -1200., 0.0);
+{   630} G2K3000 +PERO5              =  0.600G1K3000 + 0.200GKO3000 + 0.200GDK3000                 : ARR( 0.533E-11,   500., 0.0);
+{   631} G2K3000 +PERO6              =  0.460G1K3000 + 0.270GKO3000 + 0.270GDK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{   632} G2K3000 +PERO9              =  0.800G1K3000 + 0.200GDK3000                                : ARR( 0.100E-10,     0., 0.0);
+{   633} G1K5002                     =       G3K4000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{   634} G1K3000                     =       G3K2000 +      GCH2O                                  : ARR( 0.200E+15,  3554., 0.0);
+{   635} G3K4000 +GHO2               =  0.800GGO4000 + 0.200GAO4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{   636} G3K4000 +GNO                =       G2O3000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{   637} G3K4000 +GNO2               =       GPO4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{   638} G3K4000 +GNO3               =       G2O3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{   639} G3K4000 +MEPERO             =  0.685G2O3000 + 0.315GAO4000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   640} G3K4000 +PERO1              =  0.800G2O3000 + 0.200GAO4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   641} G3K4000 +PERO2              =  0.750G2O3000 + 0.250GAO4000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   642} G3K4000 +PERO3              =  0.800G2O3000 + 0.200GAO4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   643} G3K4000 +PERO5              =  0.650G2O3000 + 0.350GAO4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   644} G3K4000 +PERO6              =  0.650G2O3000 + 0.350GAO4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   645} G3K4000 +PERO9              =       G2O3000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{   646} GN05002 +GHO                =       G2N500A                                               : ARR( 0.411E-12,     0., 0.0);
+{   647} GN05002 +GHO                =       G2N500B                                               : ARR( 0.564E-12,     0., 0.0);
+{   648} GN05002 +GHO                =       GK05001 +      GNO2                                   : ARR( 0.145E-12,     0., 0.0);
+{   649} GN05002+HV               =       G105002 +      GNO2                                   :  0.100E+01*SUN;
+{   650} G2N500A +GNO                =       G1N500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   651} G2N500A +GNO                =       GNN5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{   652} G2N500A +GHO2               =       GHN5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{   653} G2N500A +GNO3               =       G1N500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   654} G2N500A +MEPERO             =  0.480G1N500A + 0.260GNO5006 + 0.260GND5002                 : ARR( 0.146E-12,  -445., 0.0);
+{   655} G2N500A +PERO1              =  0.600G1N500A + 0.200GNO5006 + 0.200GND5002                 : ARR( 0.112E-12,  -500., 0.0);
+{   656} G2N500A +PERO2              =  0.560G1N500A + 0.220GNO5006 + 0.220GND5002                 : ARR( 0.418E-13, -1000., 0.0);
+{   657} G2N500A +PERO3              =  0.600G1N500A + 0.200GNO5006 + 0.200GND5002                 : ARR( 0.126E-12,  -850., 0.0);
+{   658} G2N500A +PERO5              =  0.600G1N500A + 0.200GNO5006 + 0.200GND5002                 : ARR( 0.473E-11,   850., 0.0);
+{   659} G2N500A +PERO6              =  0.460G1N500A + 0.270GNO5006 + 0.270GND5002                 : ARR( 0.434E-13,  -900., 0.0);
+{   660} G2N500A +PERO9              =  0.800G1N500A + 0.200GND5002                                : ARR( 0.100E-10,     0., 0.0);
+{   661} G2N500B +GNO                =       G1N500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   662} G2N500B +GNO                =       GNN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{   663} G2N500B +GHO2               =       GHN500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{   664} G2N500B +GNO3               =       G1N500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   665} G2N500B +MEPERO             =  0.340G1N500B + 0.330GNO500C + 0.330GNK5007                 : ARR( 0.565E-13,  -845., 0.0);
+{   666} G2N500B +PERO1              =  0.460G1N500B + 0.270GNO500C + 0.270GNK5007                 : ARR( 0.434E-13,  -900., 0.0);
+{   667} G2N500B +PERO2              =  0.400G1N500B + 0.300GNO500C + 0.300GNK5007                 : ARR( 0.162E-13, -1400., 0.0);
+{   668} G2N500B +PERO3              =  0.460G1N500B + 0.270GNO500C + 0.270GNK5007                 : ARR( 0.488E-13, -1250., 0.0);
+{   669} G2N500B +PERO5              =  0.460G1N500B + 0.270GNO500C + 0.270GNK5007                 : ARR( 0.183E-11,   450., 0.0);
+{   670} G2N500B +PERO6              =  0.300G1N500B + 0.350GNO500C + 0.350GNK5007                 : ARR( 0.168E-13, -1300., 0.0);
+{   671} G2N500B +PERO9              =  0.650G1N500B + 0.350GNK5007                                : ARR( 0.100E-10,     0., 0.0);
+{   672} G1N500A +OXYGEN             =       GND5002 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   673} G1N500A                     =       G2N500C                                               : ARR( 0.160E+12,  3812., 0.0);
+{   674} G1N500B                     =       G2N500D                                               : ARR( 0.240E+12,  4177., 0.0);
+{   675} G1N500B                     =       GD03000 +      GD02000 +      GNO2                    : ARR( 0.200E+15,  6484., 0.0);
+{   676} G2N500C +GNO                =       G1N500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   677} G2N500C +GNO                =       GNN5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{   678} G2N500C +GHO2               =       GHN500E                                               : ARR( 0.242E-12, -1250., 0.0);
+{   679} G2N500C +GNO3               =       G1N500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   680} G2N500C +MEPERO             =  0.340G1N500C + 0.330GNO500E + 0.330GNK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{   681} G2N500C +PERO1              =  0.460G1N500C + 0.270GNO500E + 0.270GNK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{   682} G2N500C +PERO2              =  0.400G1N500C + 0.300GNO500E + 0.300GNK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{   683} G2N500C +PERO3              =  0.460G1N500C + 0.270GNO500E + 0.270GNK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{   684} G2N500C +PERO5              =  0.460G1N500C + 0.270GNO500E + 0.270GNK5009                 : ARR( 0.183E-11,   450., 0.0);
+{   685} G2N500C +PERO6              =  0.300G1N500C + 0.350GNO500E + 0.350GNK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{   686} G2N500C +PERO9              =  0.650G1N500C + 0.350GNK5009                                : ARR( 0.100E-10,     0., 0.0);
+{   687} G2N500D +GNO                =       G1N500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   688} G2N500D +GNO                =       GNN500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{   689} G2N500D +GHO2               =       GHN500F                                               : ARR( 0.242E-12, -1250., 0.0);
+{   690} G2N500D +GNO3               =       G1N500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   691} G2N500D +MEPERO             =  0.480G1N500D + 0.260GNO500E + 0.260GND5005                 : ARR( 0.146E-12,  -445., 0.0);
+{   692} G2N500D +PERO1              =  0.600G1N500D + 0.200GNO500E + 0.200GND5005                 : ARR( 0.112E-12,  -500., 0.0);
+{   693} G2N500D +PERO2              =  0.560G1N500D + 0.220GNO500E + 0.220GND5005                 : ARR( 0.418E-13, -1000., 0.0);
+{   694} G2N500D +PERO3              =  0.600G1N500D + 0.200GNO500E + 0.200GND5005                 : ARR( 0.126E-12,  -850., 0.0);
+{   695} G2N500D +PERO5              =  0.600G1N500D + 0.200GNO500E + 0.200GND5005                 : ARR( 0.473E-11,   850., 0.0);
+{   696} G2N500D +PERO6              =  0.460G1N500D + 0.270GNO500E + 0.270GND5005                 : ARR( 0.434E-13,  -900., 0.0);
+{   697} G2N500D +PERO9              =  0.800G1N500D + 0.200GND5005                                : ARR( 0.100E-10,     0., 0.0);
+{   698} G1N500C                     =       GND5005 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{   699} G1N500D                     =       GNK5009 +      GHO2                                   : ARR( 0.800E+11,  2837., 0.0);
+{   700} GH05002 +GHO                =       GK05001 +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{   701} GH05002 +GHO                =       G205002                                               : ARR( 0.201E-11,  -190., 0.0);
+{   702} GH05002+HV               =       G105002 +      GHO                                    :  0.100E+01*SUN;
+{   703} GO05002 +GHO                =       G2O5008                                               : ARR( 0.222E-11,     0., 0.0);
+{   704} GO05002 +GHO                =       GK05001 +      GHO2                                   : ARR( 0.998E-11,     0., 0.0);
+{   705} G2O5008 +GNO                =       G1O5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   706} G2O5008 +GNO                =       GNO500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{   707} G2O5008 +GHO2               =       GHO500B                                               : ARR( 0.242E-12, -1250., 0.0);
+{   708} G2O5008 +GNO3               =       G1O5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   709} G2O5008 +MEPERO             =  0.340G1O5008 + 0.330GOO5005 + 0.330GKO5007                 : ARR( 0.565E-13,  -845., 0.0);
+{   710} G2O5008 +PERO1              =  0.460G1O5008 + 0.270GOO5005 + 0.270GKO5007                 : ARR( 0.434E-13,  -900., 0.0);
+{   711} G2O5008 +PERO2              =  0.400G1O5008 + 0.300GOO5005 + 0.300GKO5007                 : ARR( 0.162E-13, -1400., 0.0);
+{   712} G2O5008 +PERO3              =  0.460G1O5008 + 0.270GOO5005 + 0.270GKO5007                 : ARR( 0.488E-13, -1250., 0.0);
+{   713} G2O5008 +PERO5              =  0.460G1O5008 + 0.270GOO5005 + 0.270GKO5007                 : ARR( 0.183E-11,   450., 0.0);
+{   714} G2O5008 +PERO6              =  0.300G1O5008 + 0.350GOO5005 + 0.350GKO5007                 : ARR( 0.168E-13, -1300., 0.0);
+{   715} G2O5008 +PERO9              =  0.650G1O5008 + 0.350GKO5007                                : ARR( 0.100E-10,     0., 0.0);
+{   716} G1O5008                     =       GD03000 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3737., 0.0);
+{   717} GK05001 +GHO                =       G2K5003                                               : ARR( 0.863E-12,     0., 0.0);
+{   718} GK05001 +GHO                =       G2K5004                                               : ARR( 0.114E-11,     0., 0.0);
+{   719} GK05001+HV               =       G3K3000 +      G202000                                :  0.100E+01*SUN;
+{   720} G2K5003 +GNO                =       G1K5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   721} G2K5003 +GNO                =       GNK5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{   722} G2K5003 +GHO2               =       GHK5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{   723} G2K5003 +GNO3               =       G1K5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   724} G2K5003 +MEPERO             =  0.480G1K5003 + 0.260GKO5001 + 0.260GDK5000                 : ARR( 0.146E-12,  -445., 0.0);
+{   725} G2K5003 +PERO1              =  0.600G1K5003 + 0.200GKO5001 + 0.200GDK5000                 : ARR( 0.112E-12,  -500., 0.0);
+{   726} G2K5003 +PERO2              =  0.560G1K5003 + 0.220GKO5001 + 0.220GDK5000                 : ARR( 0.418E-13, -1000., 0.0);
+{   727} G2K5003 +PERO3              =  0.600G1K5003 + 0.200GKO5001 + 0.200GDK5000                 : ARR( 0.126E-12,  -850., 0.0);
+{   728} G2K5003 +PERO5              =  0.600G1K5003 + 0.200GKO5001 + 0.200GDK5000                 : ARR( 0.473E-11,   850., 0.0);
+{   729} G2K5003 +PERO6              =  0.460G1K5003 + 0.270GKO5001 + 0.270GDK5000                 : ARR( 0.434E-13,  -900., 0.0);
+{   730} G2K5003 +PERO9              =  0.800G1K5003 + 0.200GDK5000                                : ARR( 0.100E-10,     0., 0.0);
+{   731} G2K5004 +GNO                =       G1K5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   732} G2K5004 +GNO                =       GNK5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{   733} G2K5004 +GHO2               =       GHK5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{   734} G2K5004 +GNO3               =       G1K5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   735} G2K5004 +MEPERO             =  0.340G1K5004 + 0.330GKO5005 + 0.330GKK5001                 : ARR( 0.565E-13,  -845., 0.0);
+{   736} G2K5004 +PERO1              =  0.460G1K5004 + 0.270GKO5005 + 0.270GKK5001                 : ARR( 0.434E-13,  -900., 0.0);
+{   737} G2K5004 +PERO2              =  0.400G1K5004 + 0.300GKO5005 + 0.300GKK5001                 : ARR( 0.162E-13, -1400., 0.0);
+{   738} G2K5004 +PERO3              =  0.460G1K5004 + 0.270GKO5005 + 0.270GKK5001                 : ARR( 0.488E-13, -1250., 0.0);
+{   739} G2K5004 +PERO5              =  0.460G1K5004 + 0.270GKO5005 + 0.270GKK5001                 : ARR( 0.183E-11,   450., 0.0);
+{   740} G2K5004 +PERO6              =  0.300G1K5004 + 0.350GKO5005 + 0.350GKK5001                 : ARR( 0.168E-13, -1300., 0.0);
+{   741} G2K5004 +PERO9              =  0.650G1K5004 + 0.350GKK5001                                : ARR( 0.100E-10,     0., 0.0);
+{   742} G3K3000 +GHO2               =  0.800GG03000 + 0.200GA03000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{   743} G3K3000 +GNO                =       G202000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{   744} G3K3000 +GNO2               =       GP03000                                               : ARR( 0.330E-08,     0.,-1.0);
+{   745} G3K3000 +GNO3               =       G202000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{   746} G3K3000 +MEPERO             =  0.685G202000 + 0.315GA03000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   747} G3K3000 +PERO1              =  0.800G202000 + 0.200GA03000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   748} G3K3000 +PERO2              =  0.750G202000 + 0.250GA03000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   749} G3K3000 +PERO3              =  0.800G202000 + 0.200GA03000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   750} G3K3000 +PERO5              =  0.650G202000 + 0.350GA03000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   751} G3K3000 +PERO6              =  0.650G202000 + 0.350GA03000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   752} G3K3000 +PERO9              =       G202000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{   753} G1K5003 +OXYGEN             =       GDK5000 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{   754} G1K5003                     =       G2K5005                                               : ARR( 0.160E+12,  5075., 0.0);
+{   755} G1K5004                     =       G3K3000 +      GD02000                                : ARR( 0.200E+15,  2750., 0.0);
+{   756} G2K5005 +GNO                =       G1K5005 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   757} G2K5005 +GNO                =       GNK500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{   758} G2K5005 +GHO2               =       GHK5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{   759} G2K5005 +GNO3               =       G1K5005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   760} G2K5005 +MEPERO             =  0.340G1K5005 + 0.330GKO5009 + 0.330GKK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{   761} G2K5005 +PERO1              =  0.460G1K5005 + 0.270GKO5009 + 0.270GKK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{   762} G2K5005 +PERO2              =  0.400G1K5005 + 0.300GKO5009 + 0.300GKK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{   763} G2K5005 +PERO3              =  0.460G1K5005 + 0.270GKO5009 + 0.270GKK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{   764} G2K5005 +PERO5              =  0.460G1K5005 + 0.270GKO5009 + 0.270GKK5002                 : ARR( 0.183E-11,   450., 0.0);
+{   765} G2K5005 +PERO6              =  0.300G1K5005 + 0.350GKO5009 + 0.350GKK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{   766} G2K5005 +PERO9              =  0.650G1K5005 + 0.350GKK5002                                : ARR( 0.100E-10,     0., 0.0);
+{   767} G1K5005                     =       GD02000 +      G3K3001                                : ARR( 0.200E+15,  2750., 0.0);
+{   768} G3K3001 +GHO2               =  0.800GGO3000 + 0.200GAO3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{   769} G3K3001 +GNO                =       G2O2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{   770} G3K3001 +GNO2               =       GPO3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{   771} G3K3001 +GNO3               =       G2O2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{   772} G3K3001 +MEPERO             =  0.685G2O2000 + 0.315GAO3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   773} G3K3001 +PERO1              =  0.800G2O2000 + 0.200GAO3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   774} G3K3001 +PERO2              =  0.750G2O2000 + 0.250GAO3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   775} G3K3001 +PERO3              =  0.800G2O2000 + 0.200GAO3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   776} G3K3001 +PERO5              =  0.650G2O2000 + 0.350GAO3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   777} G3K3001 +PERO6              =  0.650G2O2000 + 0.350GAO3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   778} G3K3001 +PERO9              =       G2O2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{   779} GD02000 +GHO                =       G3K2000                                               : ARR( 0.560E-11,  -310., 0.0);
+{   780} GD02000 +GNO3               =       G3K2000 +      GHNO3                                  : ARR( 0.140E-11,  1860., 0.0);
+{   781} GD02000+HV               =       GCH3O2  +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{   782} GD03000 +GHO                =       G3K3000                                               : ARR( 0.200E-10,     0., 0.0);
+{   783} GD03000 +GNO3               =       G3K3000 +      GHNO3                                  : ARR( 0.600E-14,     0., 0.0);
+{   784} GD03000+HV               =       G202000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{   785} GNO5000 +GHO                =       G2N500E                                               : ARR( 0.156E-11,     0., 0.0);
+{   786} GNO5000 +GHO                =       GND5003 +      GHO2                                   : ARR( 0.443E-11,     0., 0.0);
+{   787} GNO5000+HV               =       G1O5000 +      GNO2                                   :  0.100E+01*SUN;
+{   788} G2N500E +GNO                =       G1N500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   789} G2N500E +GNO                =       GNN500B                                               : ARR( 0.182E-12,  -360., 0.0);
+{   790} G2N500E +GHO2               =       GHN500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{   791} G2N500E +GNO3               =       G1N500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   792} G2N500E +MEPERO             =  0.340G1N500E + 0.330GNO500F + 0.330GNK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{   793} G2N500E +PERO1              =  0.460G1N500E + 0.270GNO500F + 0.270GNK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{   794} G2N500E +PERO2              =  0.400G1N500E + 0.300GNO500F + 0.300GNK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{   795} G2N500E +PERO3              =  0.460G1N500E + 0.270GNO500F + 0.270GNK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{   796} G2N500E +PERO5              =  0.460G1N500E + 0.270GNO500F + 0.270GNK500B                 : ARR( 0.183E-11,   450., 0.0);
+{   797} G2N500E +PERO6              =  0.300G1N500E + 0.350GNO500F + 0.350GNK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{   798} G2N500E +PERO9              =  0.650G1N500E + 0.350GNK500B                                : ARR( 0.100E-10,     0., 0.0);
+{   799} G1N500E                     =       GND4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{   800} GHO5000 +GHO                =       GKO5000 +      GHO                                    : ARR( 0.361E-10,     0., 0.0);
+{   801} GHO5000 +GHO                =       GHD5002 +      GHO2                                   : ARR( 0.433E-11,     0., 0.0);
+{   802} GHO5000 +GHO                =       G2O5000                                               : ARR( 0.204E-11,  -190., 0.0);
+{   803} GHO5000+HV               =       G1O5000 +      GHO                                    :  0.100E+01*SUN;
+{   804} GOO5000 +GHO                =       GKO5000 +      GHO2                                   : ARR( 0.862E-11,     0., 0.0);
+{   805} GOO5000 +GHO                =       G2O5009                                               : ARR( 0.145E-11,     0., 0.0);
+{   806} GOO5000 +GHO                =       G2O500A                                               : ARR( 0.145E-11,     0., 0.0);
+{   807} GOO5000 +GHO                =       GDO5000 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{   808} G2O5009 +GNO                =       G1O5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   809} G2O5009 +GNO                =       GNO500E                                               : ARR( 0.182E-12,  -360., 0.0);
+{   810} G2O5009 +GHO2               =       GHO500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{   811} G2O5009 +GNO3               =       G1O5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   812} G2O5009 +MEPERO             =  0.340G1O5009 + 0.330GOO5007 + 0.330GKO5009                 : ARR( 0.565E-13,  -845., 0.0);
+{   813} G2O5009 +PERO1              =  0.460G1O5009 + 0.270GOO5007 + 0.270GKO5009                 : ARR( 0.434E-13,  -900., 0.0);
+{   814} G2O5009 +PERO2              =  0.400G1O5009 + 0.300GOO5007 + 0.300GKO5009                 : ARR( 0.162E-13, -1400., 0.0);
+{   815} G2O5009 +PERO3              =  0.460G1O5009 + 0.270GOO5007 + 0.270GKO5009                 : ARR( 0.488E-13, -1250., 0.0);
+{   816} G2O5009 +PERO5              =  0.460G1O5009 + 0.270GOO5007 + 0.270GKO5009                 : ARR( 0.183E-11,   450., 0.0);
+{   817} G2O5009 +PERO6              =  0.300G1O5009 + 0.350GOO5007 + 0.350GKO5009                 : ARR( 0.168E-13, -1300., 0.0);
+{   818} G2O5009 +PERO9              =  0.650G1O5009 + 0.350GKO5009                                : ARR( 0.100E-10,     0., 0.0);
+{   819} G2O500A +GNO                =       G1O500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   820} G2O500A +GNO                =       GNO500B                                               : ARR( 0.182E-12,  -360., 0.0);
+{   821} G2O500A +GHO2               =       GHO500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{   822} G2O500A +GNO3               =       G1O500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   823} G2O500A +MEPERO             =  0.340G1O500A + 0.330GOO5006 + 0.330GKO5008                 : ARR( 0.565E-13,  -845., 0.0);
+{   824} G2O500A +PERO1              =  0.460G1O500A + 0.270GOO5006 + 0.270GKO5008                 : ARR( 0.434E-13,  -900., 0.0);
+{   825} G2O500A +PERO2              =  0.400G1O500A + 0.300GOO5006 + 0.300GKO5008                 : ARR( 0.162E-13, -1400., 0.0);
+{   826} G2O500A +PERO3              =  0.460G1O500A + 0.270GOO5006 + 0.270GKO5008                 : ARR( 0.488E-13, -1250., 0.0);
+{   827} G2O500A +PERO5              =  0.460G1O500A + 0.270GOO5006 + 0.270GKO5008                 : ARR( 0.183E-11,   450., 0.0);
+{   828} G2O500A +PERO6              =  0.300G1O500A + 0.350GOO5006 + 0.350GKO5008                 : ARR( 0.168E-13, -1300., 0.0);
+{   829} G2O500A +PERO9              =  0.650G1O500A + 0.350GKO5008                                : ARR( 0.100E-10,     0., 0.0);
+{   830} G1O5009                     =       GD02000 +      GDO3000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{   831} G1O500A                     =       G2O500B                                               : ARR( 0.240E+12,  4177., 0.0);
+{   832} G1O500A                     =       GDO4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{   833} G2O500B +GNO                =       G1O500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   834} G2O500B +GNO                =       GNO500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{   835} G2O500B +GHO2               =       GHO500E                                               : ARR( 0.242E-12, -1250., 0.0);
+{   836} G2O500B +GNO3               =       G1O500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   837} G2O500B +MEPERO             =  0.480G1O500B + 0.260GOO5008 + 0.260GDO5004                 : ARR( 0.164E-12,  -795., 0.0);
+{   838} G2O500B +PERO1              =  0.600G1O500B + 0.200GOO5008 + 0.200GDO5004                 : ARR( 0.126E-12,  -850., 0.0);
+{   839} G2O500B +PERO2              =  0.560G1O500B + 0.220GOO5008 + 0.220GDO5004                 : ARR( 0.471E-13, -1350., 0.0);
+{   840} G2O500B +PERO3              =  0.600G1O500B + 0.200GOO5008 + 0.200GDO5004                 : ARR( 0.142E-12, -1200., 0.0);
+{   841} G2O500B +PERO5              =  0.600G1O500B + 0.200GOO5008 + 0.200GDO5004                 : ARR( 0.533E-11,   500., 0.0);
+{   842} G2O500B +PERO6              =  0.460G1O500B + 0.270GOO5008 + 0.270GDO5004                 : ARR( 0.488E-13, -1250., 0.0);
+{   843} G2O500B +PERO9              =  0.800G1O500B + 0.200GDO5004                                : ARR( 0.100E-10,     0., 0.0);
+{   844} G1O500B                     =       GKO500A +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{   845} G1O500B                     =       GDO4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{   846} GKO5000 +GHO                =       G2K5006                                               : ARR( 0.884E-12,     0., 0.0);
+{   847} GKO5000 +GHO                =       G2K5007                                               : ARR( 0.460E-11,     0., 0.0);
+{   848} GKO5000 +GHO                =       GDK5002 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{   849} GKO5000+HV               =       G3K2000 +      G2O3001                                :  0.100E+01*SUN;
+{   850} GKO5000+HV               =       GK03000 +      GD02000                                :  0.100E+01*SUN;
+{   851} G2K5006 +GNO                =       G1K5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   852} G2K5006 +GNO                =       GNK5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{   853} G2K5006 +GHO2               =       GHK5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{   854} G2K5006 +GNO3               =       G1K5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   855} G2K5006 +MEPERO             =  0.340G1K5006 + 0.330GKO500B + 0.330GKK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{   856} G2K5006 +PERO1              =  0.460G1K5006 + 0.270GKO500B + 0.270GKK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{   857} G2K5006 +PERO2              =  0.400G1K5006 + 0.300GKO500B + 0.300GKK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{   858} G2K5006 +PERO3              =  0.460G1K5006 + 0.270GKO500B + 0.270GKK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{   859} G2K5006 +PERO5              =  0.460G1K5006 + 0.270GKO500B + 0.270GKK5002                 : ARR( 0.183E-11,   450., 0.0);
+{   860} G2K5006 +PERO6              =  0.300G1K5006 + 0.350GKO500B + 0.350GKK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{   861} G2K5006 +PERO9              =  0.650G1K5006 + 0.350GKK5002                                : ARR( 0.100E-10,     0., 0.0);
+{   862} G2K5007 +GNO                =       G1K5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   863} G2K5007 +GNO                =       GNK5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{   864} G2K5007 +GHO2               =       GHK5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{   865} G2K5007 +GNO3               =       G1K5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   866} G2K5007 +MEPERO             =  0.340G1K5007 + 0.330GKO5006 + 0.330GKK5003                 : ARR( 0.565E-13,  -845., 0.0);
+{   867} G2K5007 +PERO1              =  0.460G1K5007 + 0.270GKO5006 + 0.270GKK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{   868} G2K5007 +PERO2              =  0.400G1K5007 + 0.300GKO5006 + 0.300GKK5003                 : ARR( 0.162E-13, -1400., 0.0);
+{   869} G2K5007 +PERO3              =  0.460G1K5007 + 0.270GKO5006 + 0.270GKK5003                 : ARR( 0.488E-13, -1250., 0.0);
+{   870} G2K5007 +PERO5              =  0.460G1K5007 + 0.270GKO5006 + 0.270GKK5003                 : ARR( 0.183E-11,   450., 0.0);
+{   871} G2K5007 +PERO6              =  0.300G1K5007 + 0.350GKO5006 + 0.350GKK5003                 : ARR( 0.168E-13, -1300., 0.0);
+{   872} G2K5007 +PERO9              =  0.650G1K5007 + 0.350GKK5003                                : ARR( 0.100E-10,     0., 0.0);
+{   873} G2O3001 +GNO                =       G1O3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   874} G2O3001 +GNO                =       GNO3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{   875} G2O3001 +GHO2               =       GHO3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{   876} G2O3001 +GNO3               =       G1O3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   877} G2O3001 +MEPERO             =  0.480G1O3001 + 0.260GOO3001 + 0.260GDO3000                 : ARR( 0.146E-12,  -445., 0.0);
+{   878} G2O3001 +PERO1              =  0.600G1O3001 + 0.200GOO3001 + 0.200GDO3000                 : ARR( 0.112E-12,  -500., 0.0);
+{   879} G2O3001 +PERO2              =  0.560G1O3001 + 0.220GOO3001 + 0.220GDO3000                 : ARR( 0.418E-13, -1000., 0.0);
+{   880} G2O3001 +PERO3              =  0.600G1O3001 + 0.200GOO3001 + 0.200GDO3000                 : ARR( 0.126E-12,  -850., 0.0);
+{   881} G2O3001 +PERO5              =  0.600G1O3001 + 0.200GOO3001 + 0.200GDO3000                 : ARR( 0.473E-11,   850., 0.0);
+{   882} G2O3001 +PERO6              =  0.460G1O3001 + 0.270GOO3001 + 0.270GDO3000                 : ARR( 0.434E-13,  -900., 0.0);
+{   883} G2O3001 +PERO9              =  0.800G1O3001 + 0.200GDO3000                                : ARR( 0.100E-10,     0., 0.0);
+{   884} G1K5006                     =       G3K2000 +      GDO3000                                : ARR( 0.200E+15,  2668., 0.0);
+{   885} G1K5007                     =       GDK4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{   886} G1O3001 +OXYGEN             =       GDO3000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   887} GNO5001 +GHO                =       GNK5000 +      GHO2                                   : ARR( 0.892E-11,     0., 0.0);
+{   888} GNO5001 +GHO                =       G2N500F                                               : ARR( 0.150E-11,     0., 0.0);
+{   889} GNO5001+HV               =       G1O5001 +      GNO2                                   :  0.100E+01*SUN;
+{   890} G2N500F +GNO                =       G1N500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   891} G2N500F +GNO                =       GNN500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{   892} G2N500F +GHO2               =       GHN500H                                               : ARR( 0.242E-12, -1250., 0.0);
+{   893} G2N500F +GNO3               =       G1N500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   894} G2N500F +MEPERO             =  0.340G1N500F + 0.330GNO500H + 0.330GNK500C                 : ARR( 0.565E-13,  -845., 0.0);
+{   895} G2N500F +PERO1              =  0.460G1N500F + 0.270GNO500H + 0.270GNK500C                 : ARR( 0.434E-13,  -900., 0.0);
+{   896} G2N500F +PERO2              =  0.400G1N500F + 0.300GNO500H + 0.300GNK500C                 : ARR( 0.162E-13, -1400., 0.0);
+{   897} G2N500F +PERO3              =  0.460G1N500F + 0.270GNO500H + 0.270GNK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{   898} G2N500F +PERO5              =  0.460G1N500F + 0.270GNO500H + 0.270GNK500C                 : ARR( 0.183E-11,   450., 0.0);
+{   899} G2N500F +PERO6              =  0.300G1N500F + 0.350GNO500H + 0.350GNK500C                 : ARR( 0.168E-13, -1300., 0.0);
+{   900} G2N500F +PERO9              =  0.650G1N500F + 0.350GNK500C                                : ARR( 0.100E-10,     0., 0.0);
+{   901} G1N500F                     =       GD02000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{   902} GHO5001 +GHO                =       GHK500A +      GHO2                                   : ARR( 0.931E-11,     0., 0.0);
+{   903} GHO5001 +GHO                =       GDO5000 +      GHO                                    : ARR( 0.179E-10,     0., 0.0);
+{   904} GHO5001 +GHO                =       G2O5001                                               : ARR( 0.211E-11,  -190., 0.0);
+{   905} GHO5001+HV               =       G1O5001 +      GHO                                    :  0.100E+01*SUN;
+{   906} GDO5000 +GHO                =       GDK5002 +      GHO2                                   : ARR( 0.867E-11,     0., 0.0);
+{   907} GDO5000 +GHO                =       G2D5001                                               : ARR( 0.464E-11,     0., 0.0);
+{   908} GDO5000 +GHO                =       G3K5001                                               : ARR( 0.215E-10,     0., 0.0);
+{   909} GDO5000 +GNO3               =       G3K5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{   910} GDO5000+HV               =       G2O4001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{   911} GDO5000+HV               =       GK03000 +      GD02000                                :  0.100E+01*SUN;
+{   912} G2D5001 +GNO                =       G1D5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{   913} G2D5001 +GNO                =       GND5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{   914} G2D5001 +GHO2               =       GHD5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{   915} G2D5001 +GNO3               =       G1D5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   916} G2D5001 +MEPERO             =  0.340G1D5001 + 0.330GDO5005 + 0.330GDK5003                 : ARR( 0.565E-13,  -845., 0.0);
+{   917} G2D5001 +PERO1              =  0.460G1D5001 + 0.270GDO5005 + 0.270GDK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{   918} G2D5001 +PERO2              =  0.400G1D5001 + 0.300GDO5005 + 0.300GDK5003                 : ARR( 0.162E-13, -1400., 0.0);
+{   919} G2D5001 +PERO3              =  0.460G1D5001 + 0.270GDO5005 + 0.270GDK5003                 : ARR( 0.488E-13, -1250., 0.0);
+{   920} G2D5001 +PERO5              =  0.460G1D5001 + 0.270GDO5005 + 0.270GDK5003                 : ARR( 0.183E-11,   450., 0.0);
+{   921} G2D5001 +PERO6              =  0.300G1D5001 + 0.350GDO5005 + 0.350GDK5003                 : ARR( 0.168E-13, -1300., 0.0);
+{   922} G2D5001 +PERO9              =  0.650G1D5001 + 0.350GDK5003                                : ARR( 0.100E-10,     0., 0.0);
+{   923} G3K5001 +GHO2               =  0.800GGO5000 + 0.200GAO5000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{   924} G3K5001 +GNO                =       G2O4001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{   925} G3K5001 +GNO2               =       GPO5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{   926} G3K5001 +GNO3               =       G2O4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{   927} G3K5001 +MEPERO             =  0.685G2O4001 + 0.315GAO5000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   928} G3K5001 +PERO1              =  0.800G2O4001 + 0.200GAO5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   929} G3K5001 +PERO2              =  0.750G2O4001 + 0.250GAO5000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   930} G3K5001 +PERO3              =  0.800G2O4001 + 0.200GAO5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   931} G3K5001 +PERO5              =  0.650G2O4001 + 0.350GAO5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   932} G3K5001 +PERO6              =  0.650G2O4001 + 0.350GAO5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{   933} G3K5001 +PERO9              =       G2O4001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{   934} G2O4001 +GNO                =       G1O4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{   935} G2O4001 +GNO                =       GNO4001                                               : ARR( 0.111E-12,  -360., 0.0);
+{   936} G2O4001 +GHO2               =       GHO4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{   937} G2O4001 +GNO3               =       G1O4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   938} G2O4001 +MEPERO             =  0.480G1O4001 + 0.260GOO4001 + 0.260GDO4001                 : ARR( 0.146E-12,  -445., 0.0);
+{   939} G2O4001 +PERO1              =  0.600G1O4001 + 0.200GOO4001 + 0.200GDO4001                 : ARR( 0.112E-12,  -500., 0.0);
+{   940} G2O4001 +PERO2              =  0.560G1O4001 + 0.220GOO4001 + 0.220GDO4001                 : ARR( 0.418E-13, -1000., 0.0);
+{   941} G2O4001 +PERO3              =  0.600G1O4001 + 0.200GOO4001 + 0.200GDO4001                 : ARR( 0.126E-12,  -850., 0.0);
+{   942} G2O4001 +PERO5              =  0.600G1O4001 + 0.200GOO4001 + 0.200GDO4001                 : ARR( 0.473E-11,   850., 0.0);
+{   943} G2O4001 +PERO6              =  0.460G1O4001 + 0.270GOO4001 + 0.270GDO4001                 : ARR( 0.434E-13,  -900., 0.0);
+{   944} G2O4001 +PERO9              =  0.800G1O4001 + 0.200GDO4001                                : ARR( 0.100E-10,     0., 0.0);
+{   945} G1D5001                     =       GD02000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  3325., 0.0);
+{   946} G1O4001 +OXYGEN             =       GDO4001 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{   947} G1O4001                     =       G2O4002                                               : ARR( 0.240E+12,  4177., 0.0);
+{   948} G2O4002 +GNO                =       G1O4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{   949} G2O4002 +GNO                =       GNO4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{   950} G2O4002 +GHO2               =       GHO4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{   951} G2O4002 +GNO3               =       G1O4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   952} G2O4002 +MEPERO             =  0.480G1O4002 + 0.260GOO4002 + 0.260GDO4003                 : ARR( 0.164E-12,  -795., 0.0);
+{   953} G2O4002 +PERO1              =  0.600G1O4002 + 0.200GOO4002 + 0.200GDO4003                 : ARR( 0.126E-12,  -850., 0.0);
+{   954} G2O4002 +PERO2              =  0.560G1O4002 + 0.220GOO4002 + 0.220GDO4003                 : ARR( 0.471E-13, -1350., 0.0);
+{   955} G2O4002 +PERO3              =  0.600G1O4002 + 0.200GOO4002 + 0.200GDO4003                 : ARR( 0.142E-12, -1200., 0.0);
+{   956} G2O4002 +PERO5              =  0.600G1O4002 + 0.200GOO4002 + 0.200GDO4003                 : ARR( 0.533E-11,   500., 0.0);
+{   957} G2O4002 +PERO6              =  0.460G1O4002 + 0.270GOO4002 + 0.270GDO4003                 : ARR( 0.488E-13, -1250., 0.0);
+{   958} G2O4002 +PERO9              =  0.800G1O4002 + 0.200GDO4003                                : ARR( 0.100E-10,     0., 0.0);
+{   959} G1O4002                     =       GDO4002 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{   960} G1O4002                     =       GDO3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{   961} GN03000 +GHO                =       G2N3000                                               : ARR( 0.227E-12,     0., 0.0);
+{   962} GN03000 +GHO                =       G2N3002                                               : ARR( 0.311E-12,     0., 0.0);
+{   963} GN03000 +GHO                =       GD03000 +      GNO2                                   : ARR( 0.622E-13,     0., 0.0);
+{   964} GN03000+HV               =       G103000 +      GNO2                                   :  0.100E+01*SUN;
+{   965} G2N3002 +GNO                =       G1N3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   966} G2N3002 +GNO                =       GNN3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{   967} G2N3002 +GHO2               =       GHN3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{   968} G2N3002 +GNO3               =       G1N3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   969} G2N3002 +MEPERO             =  0.340G1N3002 + 0.330GNO3002 + 0.330GNK3000                 : ARR( 0.565E-13,  -845., 0.0);
+{   970} G2N3002 +PERO1              =  0.460G1N3002 + 0.270GNO3002 + 0.270GNK3000                 : ARR( 0.434E-13,  -900., 0.0);
+{   971} G2N3002 +PERO2              =  0.400G1N3002 + 0.300GNO3002 + 0.300GNK3000                 : ARR( 0.162E-13, -1400., 0.0);
+{   972} G2N3002 +PERO3              =  0.460G1N3002 + 0.270GNO3002 + 0.270GNK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{   973} G2N3002 +PERO5              =  0.460G1N3002 + 0.270GNO3002 + 0.270GNK3000                 : ARR( 0.183E-11,   450., 0.0);
+{   974} G2N3002 +PERO6              =  0.300G1N3002 + 0.350GNO3002 + 0.350GNK3000                 : ARR( 0.168E-13, -1300., 0.0);
+{   975} G2N3002 +PERO9              =  0.650G1N3002 + 0.350GNK3000                                : ARR( 0.100E-10,     0., 0.0);
+{   976} G1N3002                     =       GCH3O2  +      GND2000                                : ARR( 0.200E+15,  9138., 0.0);
+{   977} G1N3002                     =       GD02000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  8739., 0.0);
+{   978} GH03000 +GHO                =       G2H3000                                               : ARR( 0.116E-11,     0., 0.0);
+{   979} GH03000 +GHO                =       GD03000 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{   980} GH03000 +GHO                =       G203000                                               : ARR( 0.192E-11,  -190., 0.0);
+{   981} GH03000+HV               =       G103000 +      GHO                                    :  0.100E+01*SUN;
+{   982} G2H3000 +GNO                =       G1H3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   983} G2H3000 +GNO                =       GHN3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{   984} G2H3000 +GHO2               =       GHH3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{   985} G2H3000 +GNO3               =       G1H3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{   986} G2H3000 +MEPERO             =  0.340G1H3000 + 0.330GHO3000 + 0.330GHK3000                 : ARR( 0.565E-13,  -845., 0.0);
+{   987} G2H3000 +PERO1              =  0.460G1H3000 + 0.270GHO3000 + 0.270GHK3000                 : ARR( 0.434E-13,  -900., 0.0);
+{   988} G2H3000 +PERO2              =  0.400G1H3000 + 0.300GHO3000 + 0.300GHK3000                 : ARR( 0.162E-13, -1400., 0.0);
+{   989} G2H3000 +PERO3              =  0.460G1H3000 + 0.270GHO3000 + 0.270GHK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{   990} G2H3000 +PERO5              =  0.460G1H3000 + 0.270GHO3000 + 0.270GHK3000                 : ARR( 0.183E-11,   450., 0.0);
+{   991} G2H3000 +PERO6              =  0.300G1H3000 + 0.350GHO3000 + 0.350GHK3000                 : ARR( 0.168E-13, -1300., 0.0);
+{   992} G2H3000 +PERO9              =  0.650G1H3000 + 0.350GHK3000                                : ARR( 0.100E-10,     0., 0.0);
+{   993} G1H3000                     =       GD02000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7200., 0.0);
+{   994} GO03000 +GHO                =       G2O3002                                               : ARR( 0.122E-11,     0., 0.0);
+{   995} GO03000 +GHO                =       GD03000 +      GHO2                                   : ARR( 0.428E-11,     0., 0.0);
+{   996} G2O3002 +GNO                =       G1O3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{   997} G2O3002 +GNO                =       GNO3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{   998} G2O3002 +GHO2               =       GHO3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{   999} G2O3002 +GNO3               =       G1O3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1000} G2O3002 +MEPERO             =  0.340G1O3002 + 0.330GOO3000 + 0.330GKO3000                 : ARR( 0.565E-13,  -845., 0.0);
+{  1001} G2O3002 +PERO1              =  0.460G1O3002 + 0.270GOO3000 + 0.270GKO3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  1002} G2O3002 +PERO2              =  0.400G1O3002 + 0.300GOO3000 + 0.300GKO3000                 : ARR( 0.162E-13, -1400., 0.0);
+{  1003} G2O3002 +PERO3              =  0.460G1O3002 + 0.270GOO3000 + 0.270GKO3000                 : ARR( 0.488E-13, -1250., 0.0);
+{  1004} G2O3002 +PERO5              =  0.460G1O3002 + 0.270GOO3000 + 0.270GKO3000                 : ARR( 0.183E-11,   450., 0.0);
+{  1005} G2O3002 +PERO6              =  0.300G1O3002 + 0.350GOO3000 + 0.350GKO3000                 : ARR( 0.168E-13, -1300., 0.0);
+{  1006} G2O3002 +PERO9              =  0.650G1O3002 + 0.350GKO3000                                : ARR( 0.100E-10,     0., 0.0);
+{  1007} G1O3002                     =       GD02000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5101., 0.0);
+{  1008} GH02000 +GHO                =       GD02000 +      GHO                                    : ARR( 0.132E-10,     0., 0.0);
+{  1009} GH02000 +GHO                =       G202000                                               : ARR( 0.192E-11,  -190., 0.0);
+{  1010} GH02000+HV               =       G102000 +      GHO                                    :  0.100E+01*SUN;
+{  1011} GO02000 +GHO                =       GD02000 +      GHO2                                   : ARR( 0.410E-11,    70., 0.0);
+{  1012} GNN5000 +GHO                =       G2N500G                                               : ARR( 0.591E-12,     0., 0.0);
+{  1013} GNN5000 +GHO                =       G2N500H                                               : ARR( 0.148E-11,     0., 0.0);
+{  1014} GNN5000+HV               =       G1N5000 +      GNO2                                   :  0.200E+01*SUN;
+{  1015} G2N500G +GNO                =       G1N500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1016} G2N500G +GNO                =       GNN500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1017} G2N500G +GHO2               =       GHN500I                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1018} G2N500G +GNO3               =       G1N500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1019} G2N500G +MEPERO             =  0.340G1N500G + 0.330GNN5005 + 0.330GNN500D                 : ARR( 0.565E-13,  -845., 0.0);
+{  1020} G2N500G +PERO1              =  0.460G1N500G + 0.270GNN5005 + 0.270GNN500D                 : ARR( 0.434E-13,  -900., 0.0);
+{  1021} G2N500G +PERO2              =  0.400G1N500G + 0.300GNN5005 + 0.300GNN500D                 : ARR( 0.162E-13, -1400., 0.0);
+{  1022} G2N500G +PERO3              =  0.460G1N500G + 0.270GNN5005 + 0.270GNN500D                 : ARR( 0.488E-13, -1250., 0.0);
+{  1023} G2N500G +PERO5              =  0.460G1N500G + 0.270GNN5005 + 0.270GNN500D                 : ARR( 0.183E-11,   450., 0.0);
+{  1024} G2N500G +PERO6              =  0.300G1N500G + 0.350GNN5005 + 0.350GNN500D                 : ARR( 0.168E-13, -1300., 0.0);
+{  1025} G2N500G +PERO9              =  0.650G1N500G + 0.350GNN500D                                : ARR( 0.100E-10,     0., 0.0);
+{  1026} G2N500H +GNO                =       G1N500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1027} G2N500H +GNO                =       GNN500E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1028} G2N500H +GHO2               =       GHN500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1029} G2N500H +GNO3               =       G1N500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1030} G2N500H +MEPERO             =  0.480G1N500H + 0.260GNN500F + 0.260GNN500G                 : ARR( 0.616E-11,   905., 0.0);
+{  1031} G2N500H +PERO1              =  0.600G1N500H + 0.200GNN500F + 0.200GNN500G                 : ARR( 0.473E-11,   850., 0.0);
+{  1032} G2N500H +PERO2              =  0.560G1N500H + 0.220GNN500F + 0.220GNN500G                 : ARR( 0.177E-11,   350., 0.0);
+{  1033} G2N500H +PERO3              =  0.600G1N500H + 0.200GNN500F + 0.200GNN500G                 : ARR( 0.533E-11,   500., 0.0);
+{  1034} G2N500H +PERO5              =  0.600G1N500H + 0.200GNN500F + 0.200GNN500G                 : ARR( 0.200E-09,  2200., 0.0);
+{  1035} G2N500H +PERO6              =  0.460G1N500H + 0.270GNN500F + 0.270GNN500G                 : ARR( 0.183E-11,   450., 0.0);
+{  1036} G2N500H +PERO9              =  0.800G1N500H + 0.200GNN500G                                : ARR( 0.100E-10,     0., 0.0);
+{  1037} G1N500G                     =       GND5001 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1038} G1N500G                     =       G2N3000 +      GND2000                                : ARR( 0.200E+15,  7488., 0.0);
+{  1039} G1N500H                     =       G2N2000 +      GND3000                                : ARR( 0.400E+15,  6819., 0.0);
+{  1040} GHN5000 +GHO                =       G2H5003                                               : ARR( 0.143E-11,     0., 0.0);
+{  1041} GHN5000 +GHO                =       G2H5004                                               : ARR( 0.143E-11,     0., 0.0);
+{  1042} GHN5000 +GHO                =       GND5000 +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{  1043} GHN5000 +GHO                =       G2N5000                                               : ARR( 0.193E-11,  -190., 0.0);
+{  1044} GHN5000+HV               =       G1H5003 +      GNO2                                   :  0.100E+01*SUN;
+{  1045} GHN5000+HV               =       G1N5000 +      GHO                                    :  0.100E+01*SUN;
+{  1046} G2H5003 +GNO                =       G1H5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1047} G2H5003 +GNO                =       GHN500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1048} G2H5003 +GHO2               =       GHH5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1049} G2H5003 +GNO3               =       G1H5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1050} G2H5003 +MEPERO             =  0.480G1H5004 + 0.260GHN500L + 0.260GHN500M                 : ARR( 0.616E-11,   905., 0.0);
+{  1051} G2H5003 +PERO1              =  0.600G1H5004 + 0.200GHN500L + 0.200GHN500M                 : ARR( 0.473E-11,   850., 0.0);
+{  1052} G2H5003 +PERO2              =  0.560G1H5004 + 0.220GHN500L + 0.220GHN500M                 : ARR( 0.177E-11,   350., 0.0);
+{  1053} G2H5003 +PERO3              =  0.600G1H5004 + 0.200GHN500L + 0.200GHN500M                 : ARR( 0.533E-11,   500., 0.0);
+{  1054} G2H5003 +PERO5              =  0.600G1H5004 + 0.200GHN500L + 0.200GHN500M                 : ARR( 0.200E-09,  2200., 0.0);
+{  1055} G2H5003 +PERO6              =  0.460G1H5004 + 0.270GHN500L + 0.270GHN500M                 : ARR( 0.183E-11,   450., 0.0);
+{  1056} G2H5003 +PERO9              =  0.800G1H5004 + 0.200GHN500M                                : ARR( 0.100E-10,     0., 0.0);
+{  1057} G2H5004 +GNO                =       G1H5005 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1058} G2H5004 +GNO                =       GHN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1059} G2H5004 +GHO2               =       GHH5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1060} G2H5004 +GNO3               =       G1H5005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1061} G2H5004 +MEPERO             =  0.340G1H5005 + 0.330GHN5008 + 0.330GHN500O                 : ARR( 0.565E-13,  -845., 0.0);
+{  1062} G2H5004 +PERO1              =  0.460G1H5005 + 0.270GHN5008 + 0.270GHN500O                 : ARR( 0.434E-13,  -900., 0.0);
+{  1063} G2H5004 +PERO2              =  0.400G1H5005 + 0.300GHN5008 + 0.300GHN500O                 : ARR( 0.162E-13, -1400., 0.0);
+{  1064} G2H5004 +PERO3              =  0.460G1H5005 + 0.270GHN5008 + 0.270GHN500O                 : ARR( 0.488E-13, -1250., 0.0);
+{  1065} G2H5004 +PERO5              =  0.460G1H5005 + 0.270GHN5008 + 0.270GHN500O                 : ARR( 0.183E-11,   450., 0.0);
+{  1066} G2H5004 +PERO6              =  0.300G1H5005 + 0.350GHN5008 + 0.350GHN500O                 : ARR( 0.168E-13, -1300., 0.0);
+{  1067} G2H5004 +PERO9              =  0.650G1H5005 + 0.350GHN500O                                : ARR( 0.100E-10,     0., 0.0);
+{  1068} G1H5003                     =       G2H5005                                               : ARR( 0.160E+12,  3000., 0.0);
+{  1069} G1H5004                     =       G2N2000 +      GHD3000                                : ARR( 0.200E+15,  6819., 0.0);
+{  1070} G1H5004                     =       GND3000 +      G2H2000                                : ARR( 0.200E+15,  6819., 0.0);
+{  1071} G1H5005                     =       GHD5000 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1072} G1H5005                     =       G2N3000 +      GHD2000                                : ARR( 0.200E+15,  7490., 0.0);
+{  1073} G1H5005                     =       GND4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  1074} G2H5005 +GNO                =       G1H5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1075} G2H5005 +GNO                =       GHN500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1076} G2H5005 +GHO2               =       GHH5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1077} G2H5005 +GNO3               =       G1H5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1078} G2H5005 +MEPERO             =  0.340G1H5006 + 0.330GHO5004 + 0.330GHK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{  1079} G2H5005 +PERO1              =  0.460G1H5006 + 0.270GHO5004 + 0.270GHK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{  1080} G2H5005 +PERO2              =  0.400G1H5006 + 0.300GHO5004 + 0.300GHK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{  1081} G2H5005 +PERO3              =  0.460G1H5006 + 0.270GHO5004 + 0.270GHK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{  1082} G2H5005 +PERO5              =  0.460G1H5006 + 0.270GHO5004 + 0.270GHK5002                 : ARR( 0.183E-11,   450., 0.0);
+{  1083} G2H5005 +PERO6              =  0.300G1H5006 + 0.350GHO5004 + 0.350GHK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{  1084} G2H5005 +PERO9              =  0.650G1H5006 + 0.350GHK5002                                : ARR( 0.100E-10,     0., 0.0);
+{  1085} G1H5006                     =       GHD5000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1086} GNO5002 +GHO                =       GND5000 +      GHO2                                   : ARR( 0.430E-11,     0., 0.0);
+{  1087} GNO5002 +GHO                =       G2N500I                                               : ARR( 0.151E-11,     0., 0.0);
+{  1088} GNO5002 +GHO                =       G2N500J                                               : ARR( 0.151E-11,     0., 0.0);
+{  1089} GNO5002+HV               =       G1O500C +      GNO2                                   :  0.100E+01*SUN;
+{  1090} G2N500I +GNO                =       G1N500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1091} G2N500I +GNO                =       GNN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1092} G2N500I +GHO2               =       GHN500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1093} G2N500I +GNO3               =       G1N500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1094} G2N500I +MEPERO             =  0.340G1N500I + 0.330GNO5008 + 0.330GNK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{  1095} G2N500I +PERO1              =  0.460G1N500I + 0.270GNO5008 + 0.270GNK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{  1096} G2N500I +PERO2              =  0.400G1N500I + 0.300GNO5008 + 0.300GNK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{  1097} G2N500I +PERO3              =  0.460G1N500I + 0.270GNO5008 + 0.270GNK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{  1098} G2N500I +PERO5              =  0.460G1N500I + 0.270GNO5008 + 0.270GNK500D                 : ARR( 0.183E-11,   450., 0.0);
+{  1099} G2N500I +PERO6              =  0.300G1N500I + 0.350GNO5008 + 0.350GNK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{  1100} G2N500I +PERO9              =  0.650G1N500I + 0.350GNK500D                                : ARR( 0.100E-10,     0., 0.0);
+{  1101} G2N500J +GNO                =       G1N500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1102} G2N500J +GNO                =       GNN500I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1103} G2N500J +GHO2               =       GHN500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1104} G2N500J +GNO3               =       G1N500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1105} G2N500J +MEPERO             =  0.480G1N500J + 0.260GNO500I + 0.260GNK500E                 : ARR( 0.616E-11,   905., 0.0);
+{  1106} G2N500J +PERO1              =  0.600G1N500J + 0.200GNO500I + 0.200GNK500E                 : ARR( 0.473E-11,   850., 0.0);
+{  1107} G2N500J +PERO2              =  0.560G1N500J + 0.220GNO500I + 0.220GNK500E                 : ARR( 0.177E-11,   350., 0.0);
+{  1108} G2N500J +PERO3              =  0.600G1N500J + 0.200GNO500I + 0.200GNK500E                 : ARR( 0.533E-11,   500., 0.0);
+{  1109} G2N500J +PERO5              =  0.600G1N500J + 0.200GNO500I + 0.200GNK500E                 : ARR( 0.200E-09,  2200., 0.0);
+{  1110} G2N500J +PERO6              =  0.460G1N500J + 0.270GNO500I + 0.270GNK500E                 : ARR( 0.183E-11,   450., 0.0);
+{  1111} G2N500J +PERO9              =  0.800G1N500J + 0.200GNK500E                                : ARR( 0.100E-10,     0., 0.0);
+{  1112} G1O500C                     =       G2O500C                                               : ARR( 0.160E+12,  3000., 0.0);
+{  1113} G1N500I                     =       GCH2O   +      GND4001 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1114} G1N500J                     =       G2O2000 +      GND3000                                : ARR( 0.200E+15,  6819., 0.0);
+{  1115} G1N500J                     =       GDO3000 +      G2N2000                                : ARR( 0.200E+15,  6819., 0.0);
+{  1116} G2O500C +GNO                =       G1O500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1117} G2O500C +GNO                =       GNO500J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1118} G2O500C +GHO2               =       GHO500F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1119} G2O500C +GNO3               =       G1O500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1120} G2O500C +MEPERO             =  0.340G1O500D + 0.330GOO5003 + 0.330GKO5003                 : ARR( 0.565E-13,  -845., 0.0);
+{  1121} G2O500C +PERO1              =  0.460G1O500D + 0.270GOO5003 + 0.270GKO5003                 : ARR( 0.434E-13,  -900., 0.0);
+{  1122} G2O500C +PERO2              =  0.400G1O500D + 0.300GOO5003 + 0.300GKO5003                 : ARR( 0.162E-13, -1400., 0.0);
+{  1123} G2O500C +PERO3              =  0.460G1O500D + 0.270GOO5003 + 0.270GKO5003                 : ARR( 0.488E-13, -1250., 0.0);
+{  1124} G2O500C +PERO5              =  0.460G1O500D + 0.270GOO5003 + 0.270GKO5003                 : ARR( 0.183E-11,   450., 0.0);
+{  1125} G2O500C +PERO6              =  0.300G1O500D + 0.350GOO5003 + 0.350GKO5003                 : ARR( 0.168E-13, -1300., 0.0);
+{  1126} G2O500C +PERO9              =  0.650G1O500D + 0.350GKO5003                                : ARR( 0.100E-10,     0., 0.0);
+{  1127} G1O500D                     =       GDO5001 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1128} G1O500D                     =       GDO4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1129} GND5000 +GHO                =       G2N500K                                               : ARR( 0.469E-11,     0., 0.0);
+{  1130} GND5000 +GHO                =       G3N5000                                               : ARR( 0.218E-10,     0., 0.0);
+{  1131} GND5000 +GNO3               =       G3N5000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  1132} GND5000+HV               =       G1D5002 +      GNO2                                   :  0.100E+01*SUN;
+{  1133} GND5000+HV               =       G2N4000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  1134} GND5000+HV               =       GNU3000 +      GD02000                                :  0.100E+01*SUN;
+{  1135} G2N500K +GNO                =       G1N500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1136} G2N500K +GNO                =       GNN500J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1137} G2N500K +GHO2               =       GHN500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1138} G2N500K +GNO3               =       G1N500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1139} G2N500K +MEPERO             =  0.480G1N500K + 0.260GND5006 + 0.260GND5007                 : ARR( 0.616E-11,   905., 0.0);
+{  1140} G2N500K +PERO1              =  0.600G1N500K + 0.200GND5006 + 0.200GND5007                 : ARR( 0.473E-11,   850., 0.0);
+{  1141} G2N500K +PERO2              =  0.560G1N500K + 0.220GND5006 + 0.220GND5007                 : ARR( 0.177E-11,   350., 0.0);
+{  1142} G2N500K +PERO3              =  0.600G1N500K + 0.200GND5006 + 0.200GND5007                 : ARR( 0.533E-11,   500., 0.0);
+{  1143} G2N500K +PERO5              =  0.600G1N500K + 0.200GND5006 + 0.200GND5007                 : ARR( 0.200E-09,  2200., 0.0);
+{  1144} G2N500K +PERO6              =  0.460G1N500K + 0.270GND5006 + 0.270GND5007                 : ARR( 0.183E-11,   450., 0.0);
+{  1145} G2N500K +PERO9              =  0.800G1N500K + 0.200GND5007                                : ARR( 0.100E-10,     0., 0.0);
+{  1146} G3N5000 +GHO2               =  0.800GGN5000 + 0.200GAN5000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1147} G3N5000 +GNO                =       G2N4000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1148} G3N5000 +GNO2               =       GPN5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  1149} G3N5000 +GNO3               =       G2N4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1150} G3N5000 +MEPERO             =  0.685G2N4000 + 0.315GAN5000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1151} G3N5000 +PERO1              =  0.800G2N4000 + 0.200GAN5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1152} G3N5000 +PERO2              =  0.750G2N4000 + 0.250GAN5000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1153} G3N5000 +PERO3              =  0.800G2N4000 + 0.200GAN5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1154} G3N5000 +PERO5              =  0.650G2N4000 + 0.350GAN5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1155} G3N5000 +PERO6              =  0.650G2N4000 + 0.350GAN5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1156} G3N5000 +PERO9              =       G2N4000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  1157} G1D5002                     =       G2D5002                                               : ARR( 0.160E+12,  3221., 0.0);
+{  1158} G2N4000 +GNO                =       G1N4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  1159} G2N4000 +GNO                =       GNN4000                                               : ARR( 0.111E-12,  -360., 0.0);
+{  1160} G2N4000 +GHO2               =       GHN4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  1161} G2N4000 +GNO3               =       G1N4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1162} G2N4000 +MEPERO             =  0.480G1N4000 + 0.260GNO4000 + 0.260GND4001                 : ARR( 0.146E-12,  -445., 0.0);
+{  1163} G2N4000 +PERO1              =  0.600G1N4000 + 0.200GNO4000 + 0.200GND4001                 : ARR( 0.112E-12,  -500., 0.0);
+{  1164} G2N4000 +PERO2              =  0.560G1N4000 + 0.220GNO4000 + 0.220GND4001                 : ARR( 0.418E-13, -1000., 0.0);
+{  1165} G2N4000 +PERO3              =  0.600G1N4000 + 0.200GNO4000 + 0.200GND4001                 : ARR( 0.126E-12,  -850., 0.0);
+{  1166} G2N4000 +PERO5              =  0.600G1N4000 + 0.200GNO4000 + 0.200GND4001                 : ARR( 0.473E-11,   850., 0.0);
+{  1167} G2N4000 +PERO6              =  0.460G1N4000 + 0.270GNO4000 + 0.270GND4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  1168} G2N4000 +PERO9              =  0.800G1N4000 + 0.200GND4001                                : ARR( 0.100E-10,     0., 0.0);
+{  1169} G1N500K                     =       G2N2000 +      GDD3000                                : ARR( 0.200E+15,  6436., 0.0);
+{  1170} G1N500K                     =       GND3000 +      G2D2000                                : ARR( 0.200E+15,  6974., 0.0);
+{  1171} G2D5002 +GNO                =       G1D5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1172} G2D5002 +GNO                =       GND5008                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1173} G2D5002 +GHO2               =       GHD5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1174} G2D5002 +GNO3               =       G1D5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1175} G2D5002 +MEPERO             =  0.340G1D5003 + 0.330GDO5006 + 0.330GDK5004                 : ARR( 0.565E-13,  -845., 0.0);
+{  1176} G2D5002 +PERO1              =  0.460G1D5003 + 0.270GDO5006 + 0.270GDK5004                 : ARR( 0.434E-13,  -900., 0.0);
+{  1177} G2D5002 +PERO2              =  0.400G1D5003 + 0.300GDO5006 + 0.300GDK5004                 : ARR( 0.162E-13, -1400., 0.0);
+{  1178} G2D5002 +PERO3              =  0.460G1D5003 + 0.270GDO5006 + 0.270GDK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  1179} G2D5002 +PERO5              =  0.460G1D5003 + 0.270GDO5006 + 0.270GDK5004                 : ARR( 0.183E-11,   450., 0.0);
+{  1180} G2D5002 +PERO6              =  0.300G1D5003 + 0.350GDO5006 + 0.350GDK5004                 : ARR( 0.168E-13, -1300., 0.0);
+{  1181} G2D5002 +PERO9              =  0.650G1D5003 + 0.350GDK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  1182} G1N4000 +OXYGEN             =       GND4001 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  1183} G1N4000                     =       GDO4000 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1184} G1D5003                     =       GDD5000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1185} G1D5003                     =       GDO4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  1186} GNN5001 +GHO                =       GNK5000 +      GNO2                                   : ARR( 0.100E-12,     0., 0.0);
+{  1187} GNN5001 +GHO                =       G2N500L                                               : ARR( 0.296E-12,     0., 0.0);
+{  1188} GNN5001 +GHO                =       G2N500M                                               : ARR( 0.296E-12,     0., 0.0);
+{  1189} GNN5001 +GHO                =       GND5003 +      GNO2                                   : ARR( 0.481E-13,     0., 0.0);
+{  1190} GNN5001+HV               =       G1N5001 +      GNO2                                   :  0.100E+01*SUN;
+{  1191} GNN5001+HV               =       G1N5006 +      GNO2                                   :  0.100E+01*SUN;
+{  1192} G2N500L +GNO                =       G1N500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1193} G2N500L +GNO                =       GNN500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1194} G2N500L +GHO2               =       GHN500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1195} G2N500L +GNO3               =       G1N500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1196} G2N500L +MEPERO             =  0.340G1N500L + 0.330GNN500L + 0.330GNN500M                 : ARR( 0.565E-13,  -845., 0.0);
+{  1197} G2N500L +PERO1              =  0.460G1N500L + 0.270GNN500L + 0.270GNN500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  1198} G2N500L +PERO2              =  0.400G1N500L + 0.300GNN500L + 0.300GNN500M                 : ARR( 0.162E-13, -1400., 0.0);
+{  1199} G2N500L +PERO3              =  0.460G1N500L + 0.270GNN500L + 0.270GNN500M                 : ARR( 0.488E-13, -1250., 0.0);
+{  1200} G2N500L +PERO5              =  0.460G1N500L + 0.270GNN500L + 0.270GNN500M                 : ARR( 0.183E-11,   450., 0.0);
+{  1201} G2N500L +PERO6              =  0.300G1N500L + 0.350GNN500L + 0.350GNN500M                 : ARR( 0.168E-13, -1300., 0.0);
+{  1202} G2N500L +PERO9              =  0.650G1N500L + 0.350GNN500M                                : ARR( 0.100E-10,     0., 0.0);
+{  1203} G2N500M +GNO                =       G1N500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1204} G2N500M +GNO                =       GNN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1205} G2N500M +GHO2               =       GHN500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1206} G2N500M +GNO3               =       G1N500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1207} G2N500M +MEPERO             =  0.340G1N500M + 0.330GNN500O + 0.330GNN500P                 : ARR( 0.565E-13,  -845., 0.0);
+{  1208} G2N500M +PERO1              =  0.460G1N500M + 0.270GNN500O + 0.270GNN500P                 : ARR( 0.434E-13,  -900., 0.0);
+{  1209} G2N500M +PERO2              =  0.400G1N500M + 0.300GNN500O + 0.300GNN500P                 : ARR( 0.162E-13, -1400., 0.0);
+{  1210} G2N500M +PERO3              =  0.460G1N500M + 0.270GNN500O + 0.270GNN500P                 : ARR( 0.488E-13, -1250., 0.0);
+{  1211} G2N500M +PERO5              =  0.460G1N500M + 0.270GNN500O + 0.270GNN500P                 : ARR( 0.183E-11,   450., 0.0);
+{  1212} G2N500M +PERO6              =  0.300G1N500M + 0.350GNN500O + 0.350GNN500P                 : ARR( 0.168E-13, -1300., 0.0);
+{  1213} G2N500M +PERO9              =  0.650G1N500M + 0.350GNN500P                                : ARR( 0.100E-10,     0., 0.0);
+{  1214} G1N500L                     =       GD02000 +      GND3000 +      GNO2                    : ARR( 0.200E+15,  6455., 0.0);
+{  1215} G1N500L                     =       GND3001 +      G2N2000                                : ARR( 0.200E+15,  7074., 0.0);
+{  1216} G1N500M                     =       G2N500N                                               : ARR( 0.240E+12,  4897., 0.0);
+{  1217} G1N500M                     =       G2N3001 +      GND2000                                : ARR( 0.200E+15,  6983., 0.0);
+{  1218} G2N500N +GNO                =       G1N500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1219} G2N500N +GNO                =       GNN500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1220} G2N500N +GHO2               =       GHN500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1221} G2N500N +GNO3               =       G1N500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1222} G2N500N +MEPERO             =  0.480G1N500N + 0.260GNN500R + 0.260GNN500S                 : ARR( 0.164E-12,  -795., 0.0);
+{  1223} G2N500N +PERO1              =  0.600G1N500N + 0.200GNN500R + 0.200GNN500S                 : ARR( 0.126E-12,  -850., 0.0);
+{  1224} G2N500N +PERO2              =  0.560G1N500N + 0.220GNN500R + 0.220GNN500S                 : ARR( 0.471E-13, -1350., 0.0);
+{  1225} G2N500N +PERO3              =  0.600G1N500N + 0.200GNN500R + 0.200GNN500S                 : ARR( 0.142E-12, -1200., 0.0);
+{  1226} G2N500N +PERO5              =  0.600G1N500N + 0.200GNN500R + 0.200GNN500S                 : ARR( 0.533E-11,   500., 0.0);
+{  1227} G2N500N +PERO6              =  0.460G1N500N + 0.270GNN500R + 0.270GNN500S                 : ARR( 0.488E-13, -1250., 0.0);
+{  1228} G2N500N +PERO9              =  0.800G1N500N + 0.200GNN500S                                : ARR( 0.100E-10,     0., 0.0);
+{  1229} G1N500N                     =       GNN500T +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{  1230} GHN5001 +GHO                =       GNK5000 +      GHO                                    : ARR( 0.352E-10,     0., 0.0);
+{  1231} GHN5001 +GHO                =       G2N5001                                               : ARR( 0.200E-11,  -190., 0.0);
+{  1232} GHN5001+HV               =       G1N5001 +      GHO                                    :  0.100E+01*SUN;
+{  1233} GHN5001+HV               =       G1H5007 +      GNO2                                   :  0.100E+01*SUN;
+{  1234} G1H5007                     =       GKO5000 +      GHO                                    : ARR( 0.800E+11,  1771., 0.0);
+{  1235} GNK5000 +GHO                =       G2N500O                                               : ARR( 0.105E-12,     0., 0.0);
+{  1236} GNK5000 +GHO                =       G2N500P                                               : ARR( 0.883E-12,     0., 0.0);
+{  1237} GNK5000 +GHO                =       G2N500Q                                               : ARR( 0.918E-12,     0., 0.0);
+{  1238} GNK5000+HV               =       G3K2000 +      G2N3000                                :  0.100E+01*SUN;
+{  1239} GNK5000+HV               =       GK03000 +      G2D2000 +      GNO2                    :  0.100E+01*SUN;
+{  1240} GNK5000+HV               =       G1K5008 +      GNO2                                   :  0.100E+01*SUN;
+{  1241} G2N500O +GNO                =       G1N500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1242} G2N500O +GNO                =       GNN500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1243} G2N500O +GHO2               =       GHN500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1244} G2N500O +GNO3               =       G1N500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1245} G2N500O +MEPERO             =  0.480G1N500O + 0.260GNK500D + 0.260GND5009                 : ARR( 0.164E-12,  -795., 0.0);
+{  1246} G2N500O +PERO1              =  0.600G1N500O + 0.200GNK500D + 0.200GND5009                 : ARR( 0.126E-12,  -850., 0.0);
+{  1247} G2N500O +PERO2              =  0.560G1N500O + 0.220GNK500D + 0.220GND5009                 : ARR( 0.471E-13, -1350., 0.0);
+{  1248} G2N500O +PERO3              =  0.600G1N500O + 0.200GNK500D + 0.200GND5009                 : ARR( 0.142E-12, -1200., 0.0);
+{  1249} G2N500O +PERO5              =  0.600G1N500O + 0.200GNK500D + 0.200GND5009                 : ARR( 0.533E-11,   500., 0.0);
+{  1250} G2N500O +PERO6              =  0.460G1N500O + 0.270GNK500D + 0.270GND5009                 : ARR( 0.488E-13, -1250., 0.0);
+{  1251} G2N500O +PERO9              =  0.800G1N500O + 0.200GND5009                                : ARR( 0.100E-10,     0., 0.0);
+{  1252} G2N500P +GNO                =       G1N500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1253} G2N500P +GNO                =       GNN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1254} G2N500P +GHO2               =       GHN500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1255} G2N500P +GNO3               =       G1N500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1256} G2N500P +MEPERO             =  0.340G1N500P + 0.330GNK500F + 0.330GNK500G                 : ARR( 0.565E-13,  -845., 0.0);
+{  1257} G2N500P +PERO1              =  0.460G1N500P + 0.270GNK500F + 0.270GNK500G                 : ARR( 0.434E-13,  -900., 0.0);
+{  1258} G2N500P +PERO2              =  0.400G1N500P + 0.300GNK500F + 0.300GNK500G                 : ARR( 0.162E-13, -1400., 0.0);
+{  1259} G2N500P +PERO3              =  0.460G1N500P + 0.270GNK500F + 0.270GNK500G                 : ARR( 0.488E-13, -1250., 0.0);
+{  1260} G2N500P +PERO5              =  0.460G1N500P + 0.270GNK500F + 0.270GNK500G                 : ARR( 0.183E-11,   450., 0.0);
+{  1261} G2N500P +PERO6              =  0.300G1N500P + 0.350GNK500F + 0.350GNK500G                 : ARR( 0.168E-13, -1300., 0.0);
+{  1262} G2N500P +PERO9              =  0.650G1N500P + 0.350GNK500G                                : ARR( 0.100E-10,     0., 0.0);
+{  1263} G2N500Q +GNO                =       G1N500Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1264} G2N500Q +GNO                =       GNN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1265} G2N500Q +GHO2               =       GHN500Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1266} G2N500Q +GNO3               =       G1N500Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1267} G2N500Q +MEPERO             =  0.340G1N500Q + 0.330GNK500H + 0.330GNK500I                 : ARR( 0.565E-13,  -845., 0.0);
+{  1268} G2N500Q +PERO1              =  0.460G1N500Q + 0.270GNK500H + 0.270GNK500I                 : ARR( 0.434E-13,  -900., 0.0);
+{  1269} G2N500Q +PERO2              =  0.400G1N500Q + 0.300GNK500H + 0.300GNK500I                 : ARR( 0.162E-13, -1400., 0.0);
+{  1270} G2N500Q +PERO3              =  0.460G1N500Q + 0.270GNK500H + 0.270GNK500I                 : ARR( 0.488E-13, -1250., 0.0);
+{  1271} G2N500Q +PERO5              =  0.460G1N500Q + 0.270GNK500H + 0.270GNK500I                 : ARR( 0.183E-11,   450., 0.0);
+{  1272} G2N500Q +PERO6              =  0.300G1N500Q + 0.350GNK500H + 0.350GNK500I                 : ARR( 0.168E-13, -1300., 0.0);
+{  1273} G2N500Q +PERO9              =  0.650G1N500Q + 0.350GNK500I                                : ARR( 0.100E-10,     0., 0.0);
+{  1274} G1K5008 +OXYGEN             =       GDK5002 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  1275} G1N500O                     =       G3N4000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  1276} G1N500P                     =       G3K2000 +      GND3000                                : ARR( 0.200E+15,  2668., 0.0);
+{  1277} G1N500Q                     =       G2N500R                                               : ARR( 0.240E+12,  6160., 0.0);
+{  1278} G1N500Q                     =       G2K3000 +      GND2000                                : ARR( 0.200E+15,  7286., 0.0);
+{  1279} G1N500Q                     =       GDK4000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  8296., 0.0);
+{  1280} G3N4000 +GHO2               =  0.800GGN4000 + 0.200GAN4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1281} G3N4000 +GNO                =       G2N3000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1282} G3N4000 +GNO2               =       GPN4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  1283} G3N4000 +GNO3               =       G2N3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1284} G3N4000 +MEPERO             =  0.685G2N3000 + 0.315GAN4000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1285} G3N4000 +PERO1              =  0.800G2N3000 + 0.200GAN4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1286} G3N4000 +PERO2              =  0.750G2N3000 + 0.250GAN4000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1287} G3N4000 +PERO3              =  0.800G2N3000 + 0.200GAN4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1288} G3N4000 +PERO5              =  0.650G2N3000 + 0.350GAN4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1289} G3N4000 +PERO6              =  0.650G2N3000 + 0.350GAN4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1290} G3N4000 +PERO9              =       G2N3000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  1291} G2N500R +GNO                =       G1N500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1292} G2N500R +GNO                =       GNN500X                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1293} G2N500R +GHO2               =       GHN500Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1294} G2N500R +GNO3               =       G1N500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1295} G2N500R +MEPERO             =  0.480G1N500R + 0.260GNK500J + 0.260GND500A                 : ARR( 0.164E-12,  -795., 0.0);
+{  1296} G2N500R +PERO1              =  0.600G1N500R + 0.200GNK500J + 0.200GND500A                 : ARR( 0.126E-12,  -850., 0.0);
+{  1297} G2N500R +PERO2              =  0.560G1N500R + 0.220GNK500J + 0.220GND500A                 : ARR( 0.471E-13, -1350., 0.0);
+{  1298} G2N500R +PERO3              =  0.600G1N500R + 0.200GNK500J + 0.200GND500A                 : ARR( 0.142E-12, -1200., 0.0);
+{  1299} G2N500R +PERO5              =  0.600G1N500R + 0.200GNK500J + 0.200GND500A                 : ARR( 0.533E-11,   500., 0.0);
+{  1300} G2N500R +PERO6              =  0.460G1N500R + 0.270GNK500J + 0.270GND500A                 : ARR( 0.488E-13, -1250., 0.0);
+{  1301} G2N500R +PERO9              =  0.800G1N500R + 0.200GND500A                                : ARR( 0.100E-10,     0., 0.0);
+{  1302} G1N500R                     =       G3N4001 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  1303} G3N4001 +GHO2               =  0.800GGN4001 + 0.200GAN4001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1304} G3N4001 +GNO                =       G2N3003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1305} G3N4001 +GNO2               =       GPN4001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  1306} G3N4001 +GNO3               =       G2N3003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1307} G3N4001 +MEPERO             =  0.685G2N3003 + 0.315GAN4001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1308} G3N4001 +PERO1              =  0.800G2N3003 + 0.200GAN4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1309} G3N4001 +PERO2              =  0.750G2N3003 + 0.250GAN4001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1310} G3N4001 +PERO3              =  0.800G2N3003 + 0.200GAN4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1311} G3N4001 +PERO5              =  0.650G2N3003 + 0.350GAN4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1312} G3N4001 +PERO6              =  0.650G2N3003 + 0.350GAN4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1313} G3N4001 +PERO9              =       G2N3003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  1314} G2N3003 +GNO                =       G1N3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  1315} G2N3003 +GNO                =       GNN3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{  1316} G2N3003 +GHO2               =       GHN3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{  1317} G2N3003 +GNO3               =       G1N3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1318} G2N3003 +MEPERO             =  0.480G1N3003 + 0.260GNO3003 + 0.260GND3002                 : ARR( 0.164E-12,  -795., 0.0);
+{  1319} G2N3003 +PERO1              =  0.600G1N3003 + 0.200GNO3003 + 0.200GND3002                 : ARR( 0.126E-12,  -850., 0.0);
+{  1320} G2N3003 +PERO2              =  0.560G1N3003 + 0.220GNO3003 + 0.220GND3002                 : ARR( 0.471E-13, -1350., 0.0);
+{  1321} G2N3003 +PERO3              =  0.600G1N3003 + 0.200GNO3003 + 0.200GND3002                 : ARR( 0.142E-12, -1200., 0.0);
+{  1322} G2N3003 +PERO5              =  0.600G1N3003 + 0.200GNO3003 + 0.200GND3002                 : ARR( 0.533E-11,   500., 0.0);
+{  1323} G2N3003 +PERO6              =  0.460G1N3003 + 0.270GNO3003 + 0.270GND3002                 : ARR( 0.488E-13, -1250., 0.0);
+{  1324} G2N3003 +PERO9              =  0.800G1N3003 + 0.200GND3002                                : ARR( 0.100E-10,     0., 0.0);
+{  1325} G1N3003                     =       GND2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4443., 0.0);
+{  1326} GNN5002 +GHO                =       G2N500S                                               : ARR( 0.168E-12,     0., 0.0);
+{  1327} GNN5002 +GHO                =       G2N500T                                               : ARR( 0.230E-12,     0., 0.0);
+{  1328} GNN5002 +GHO                =       GNK5001 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{  1329} GNN5002 +GHO                =       G2N500U                                               : ARR( 0.565E-13,     0., 0.0);
+{  1330} GNN5002 +GHO                =       GND5002 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  1331} GNN5002+HV               =       G1N5002 +      GNO2                                   :  0.100E+01*SUN;
+{  1332} GNN5002+HV               =       G1N500A +      GNO2                                   :  0.100E+01*SUN;
+{  1333} G2N500S +GNO                =       G1N500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1334} G2N500S +GNO                =       GNN500E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1335} G2N500S +GHO2               =       GHN500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1336} G2N500S +GNO3               =       G1N500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1337} G2N500S +MEPERO             =  0.480G1N500S + 0.260GNN500I + 0.260GNN500J                 : ARR( 0.146E-12,  -445., 0.0);
+{  1338} G2N500S +PERO1              =  0.600G1N500S + 0.200GNN500I + 0.200GNN500J                 : ARR( 0.112E-12,  -500., 0.0);
+{  1339} G2N500S +PERO2              =  0.560G1N500S + 0.220GNN500I + 0.220GNN500J                 : ARR( 0.418E-13, -1000., 0.0);
+{  1340} G2N500S +PERO3              =  0.600G1N500S + 0.200GNN500I + 0.200GNN500J                 : ARR( 0.126E-12,  -850., 0.0);
+{  1341} G2N500S +PERO5              =  0.600G1N500S + 0.200GNN500I + 0.200GNN500J                 : ARR( 0.473E-11,   850., 0.0);
+{  1342} G2N500S +PERO6              =  0.460G1N500S + 0.270GNN500I + 0.270GNN500J                 : ARR( 0.434E-13,  -900., 0.0);
+{  1343} G2N500S +PERO9              =  0.800G1N500S + 0.200GNN500J                                : ARR( 0.100E-10,     0., 0.0);
+{  1344} G2N500T +GNO                =       G1N500T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1345} G2N500T +GNO                =       GNN500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1346} G2N500T +GHO2               =       GHN500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1347} G2N500T +GNO3               =       G1N500T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1348} G2N500T +MEPERO             =  0.340G1N500T + 0.330GNN500A + 0.330GNN500U                 : ARR( 0.565E-13,  -845., 0.0);
+{  1349} G2N500T +PERO1              =  0.460G1N500T + 0.270GNN500A + 0.270GNN500U                 : ARR( 0.434E-13,  -900., 0.0);
+{  1350} G2N500T +PERO2              =  0.400G1N500T + 0.300GNN500A + 0.300GNN500U                 : ARR( 0.162E-13, -1400., 0.0);
+{  1351} G2N500T +PERO3              =  0.460G1N500T + 0.270GNN500A + 0.270GNN500U                 : ARR( 0.488E-13, -1250., 0.0);
+{  1352} G2N500T +PERO5              =  0.460G1N500T + 0.270GNN500A + 0.270GNN500U                 : ARR( 0.183E-11,   450., 0.0);
+{  1353} G2N500T +PERO6              =  0.300G1N500T + 0.350GNN500A + 0.350GNN500U                 : ARR( 0.168E-13, -1300., 0.0);
+{  1354} G2N500T +PERO9              =  0.650G1N500T + 0.350GNN500U                                : ARR( 0.100E-10,     0., 0.0);
+{  1355} G2N500U +GNO                =       G1N500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1356} G2N500U +GNO                =       GNN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1357} G2N500U +GHO2               =       GHN500b                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1358} G2N500U +GNO3               =       G1N500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1359} G2N500U +MEPERO             =  0.340G1N500U + 0.330GNN500Z + 0.330GNN500a                 : ARR( 0.565E-13,  -845., 0.0);
+{  1360} G2N500U +PERO1              =  0.460G1N500U + 0.270GNN500Z + 0.270GNN500a                 : ARR( 0.434E-13,  -900., 0.0);
+{  1361} G2N500U +PERO2              =  0.400G1N500U + 0.300GNN500Z + 0.300GNN500a                 : ARR( 0.162E-13, -1400., 0.0);
+{  1362} G2N500U +PERO3              =  0.460G1N500U + 0.270GNN500Z + 0.270GNN500a                 : ARR( 0.488E-13, -1250., 0.0);
+{  1363} G2N500U +PERO5              =  0.460G1N500U + 0.270GNN500Z + 0.270GNN500a                 : ARR( 0.183E-11,   450., 0.0);
+{  1364} G2N500U +PERO6              =  0.300G1N500U + 0.350GNN500Z + 0.350GNN500a                 : ARR( 0.168E-13, -1300., 0.0);
+{  1365} G2N500U +PERO9              =  0.650G1N500U + 0.350GNN500a                                : ARR( 0.100E-10,     0., 0.0);
+{  1366} G1N500S +OXYGEN             =       GNN500J +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  1367} G1N500S                     =       G2N500W                                               : ARR( 0.160E+12,  4439., 0.0);
+{  1368} G1N500T                     =       GND5005 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1369} G1N500T                     =       GD02000 +      GND3000 +      GNO2                    : ARR( 0.200E+15,  6484., 0.0);
+{  1370} G1N500U                     =       G2N500X                                               : ARR( 0.240E+12,  4177., 0.0);
+{  1371} G1N500U                     =       GD03000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6737., 0.0);
+{  1372} G2N500W +GNO                =       G1N500W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1373} G2N500W +GNO                =       GNN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1374} G2N500W +GHO2               =       GHN500c                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1375} G2N500W +GNO3               =       G1N500W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1376} G2N500W +MEPERO             =  0.340G1N500W + 0.330GNN500c + 0.330GNN500d                 : ARR( 0.565E-13,  -845., 0.0);
+{  1377} G2N500W +PERO1              =  0.460G1N500W + 0.270GNN500c + 0.270GNN500d                 : ARR( 0.434E-13,  -900., 0.0);
+{  1378} G2N500W +PERO2              =  0.400G1N500W + 0.300GNN500c + 0.300GNN500d                 : ARR( 0.162E-13, -1400., 0.0);
+{  1379} G2N500W +PERO3              =  0.460G1N500W + 0.270GNN500c + 0.270GNN500d                 : ARR( 0.488E-13, -1250., 0.0);
+{  1380} G2N500W +PERO5              =  0.460G1N500W + 0.270GNN500c + 0.270GNN500d                 : ARR( 0.183E-11,   450., 0.0);
+{  1381} G2N500W +PERO6              =  0.300G1N500W + 0.350GNN500c + 0.350GNN500d                 : ARR( 0.168E-13, -1300., 0.0);
+{  1382} G2N500W +PERO9              =  0.650G1N500W + 0.350GNN500d                                : ARR( 0.100E-10,     0., 0.0);
+{  1383} G2N500X +GNO                =       G1N500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1384} G2N500X +GNO                =       GNN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1385} G2N500X +GHO2               =       GHN500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1386} G2N500X +GNO3               =       G1N500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1387} G2N500X +MEPERO             =  0.480G1N500X + 0.260GNN500c + 0.260GNN500f                 : ARR( 0.146E-12,  -445., 0.0);
+{  1388} G2N500X +PERO1              =  0.600G1N500X + 0.200GNN500c + 0.200GNN500f                 : ARR( 0.112E-12,  -500., 0.0);
+{  1389} G2N500X +PERO2              =  0.560G1N500X + 0.220GNN500c + 0.220GNN500f                 : ARR( 0.418E-13, -1000., 0.0);
+{  1390} G2N500X +PERO3              =  0.600G1N500X + 0.200GNN500c + 0.200GNN500f                 : ARR( 0.126E-12,  -850., 0.0);
+{  1391} G2N500X +PERO5              =  0.600G1N500X + 0.200GNN500c + 0.200GNN500f                 : ARR( 0.473E-11,   850., 0.0);
+{  1392} G2N500X +PERO6              =  0.460G1N500X + 0.270GNN500c + 0.270GNN500f                 : ARR( 0.434E-13,  -900., 0.0);
+{  1393} G2N500X +PERO9              =  0.800G1N500X + 0.200GNN500f                                : ARR( 0.100E-10,     0., 0.0);
+{  1394} G1N500W                     =       GNN500f +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1395} G1N500X +OXYGEN             =       GNN500f +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  1396} G1N500X                     =       GNN500d +      GHO2                                   : ARR( 0.800E+11,  3464., 0.0);
+{  1397} GHN5002 +GHO                =       GNK5001 +      GHO                                    : ARR( 0.427E-10,     0., 0.0);
+{  1398} GHN5002 +GHO                =       G2N5002                                               : ARR( 0.197E-11,  -190., 0.0);
+{  1399} GHN5002+HV               =       G1N5002 +      GHO                                    :  0.100E+01*SUN;
+{  1400} GHN5002+HV               =       G1H5008 +      GNO2                                   :  0.100E+01*SUN;
+{  1401} G1H5008                     =       G2H5006                                               : ARR( 0.160E+12,  3092., 0.0);
+{  1402} G2H5006 +GNO                =       G1H5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1403} G2H5006 +GNO                =       GHN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1404} G2H5006 +GHO2               =       GHH5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1405} G2H5006 +GNO3               =       G1H5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1406} G2H5006 +MEPERO             =  0.340G1H5009 + 0.330GHO500C + 0.330GHK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{  1407} G2H5006 +PERO1              =  0.460G1H5009 + 0.270GHO500C + 0.270GHK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{  1408} G2H5006 +PERO2              =  0.400G1H5009 + 0.300GHO500C + 0.300GHK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{  1409} G2H5006 +PERO3              =  0.460G1H5009 + 0.270GHO500C + 0.270GHK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  1410} G2H5006 +PERO5              =  0.460G1H5009 + 0.270GHO500C + 0.270GHK5008                 : ARR( 0.183E-11,   450., 0.0);
+{  1411} G2H5006 +PERO6              =  0.300G1H5009 + 0.350GHO500C + 0.350GHK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{  1412} G2H5006 +PERO9              =  0.650G1H5009 + 0.350GHK5008                                : ARR( 0.100E-10,     0., 0.0);
+{  1413} G1H5009                     =       GHD5003 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1414} G1H5009                     =       GD02000 +      GDO3000 +      GHO                     : ARR( 0.200E+15,  4945., 0.0);
+{  1415} GNO5003 +GHO                =       G2N500Y                                               : ARR( 0.121E-11,     0., 0.0);
+{  1416} GNO5003 +GHO                =       GNK5001 +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  1417} GNO5003+HV               =       G1O500E +      GNO2                                   :  0.100E+01*SUN;
+{  1418} G2N500Y +GNO                =       G1N500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1419} G2N500Y +GNO                =       GNN500L                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1420} G2N500Y +GHO2               =       GHN500f                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1421} G2N500Y +GNO3               =       G1N500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1422} G2N500Y +MEPERO             =  0.340G1N500Y + 0.330GNO500H + 0.330GNK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{  1423} G2N500Y +PERO1              =  0.460G1N500Y + 0.270GNO500H + 0.270GNK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{  1424} G2N500Y +PERO2              =  0.400G1N500Y + 0.300GNO500H + 0.300GNK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{  1425} G2N500Y +PERO3              =  0.460G1N500Y + 0.270GNO500H + 0.270GNK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{  1426} G2N500Y +PERO5              =  0.460G1N500Y + 0.270GNO500H + 0.270GNK500F                 : ARR( 0.183E-11,   450., 0.0);
+{  1427} G2N500Y +PERO6              =  0.300G1N500Y + 0.350GNO500H + 0.350GNK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{  1428} G2N500Y +PERO9              =  0.650G1N500Y + 0.350GNK500F                                : ARR( 0.100E-10,     0., 0.0);
+{  1429} G1O500E                     =       G2O500D                                               : ARR( 0.160E+12,  3092., 0.0);
+{  1430} G1N500Y                     =       GD02000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  3737., 0.0);
+{  1431} G2O500D +GNO                =       G1O500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1432} G2O500D +GNO                =       GNO500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1433} G2O500D +GHO2               =       GHO500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1434} G2O500D +GNO3               =       G1O500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1435} G2O500D +MEPERO             =  0.340G1O500F + 0.330GOO5007 + 0.330GKO500B                 : ARR( 0.565E-13,  -845., 0.0);
+{  1436} G2O500D +PERO1              =  0.460G1O500F + 0.270GOO5007 + 0.270GKO500B                 : ARR( 0.434E-13,  -900., 0.0);
+{  1437} G2O500D +PERO2              =  0.400G1O500F + 0.300GOO5007 + 0.300GKO500B                 : ARR( 0.162E-13, -1400., 0.0);
+{  1438} G2O500D +PERO3              =  0.460G1O500F + 0.270GOO5007 + 0.270GKO500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  1439} G2O500D +PERO5              =  0.460G1O500F + 0.270GOO5007 + 0.270GKO500B                 : ARR( 0.183E-11,   450., 0.0);
+{  1440} G2O500D +PERO6              =  0.300G1O500F + 0.350GOO5007 + 0.350GKO500B                 : ARR( 0.168E-13, -1300., 0.0);
+{  1441} G2O500D +PERO9              =  0.650G1O500F + 0.350GKO500B                                : ARR( 0.100E-10,     0., 0.0);
+{  1442} G1O500F                     =       GDO5005 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1443} G1O500F                     =       GD02000 +      GDO3000 +      GHO2                    : ARR( 0.200E+15,  3737., 0.0);
+{  1444} GNK5001 +GHO                =       G2N500Z                                               : ARR( 0.531E-12,     0., 0.0);
+{  1445} GNK5001 +GHO                =       G2N500a                                               : ARR( 0.701E-12,     0., 0.0);
+{  1446} GNK5001 +GHO                =       G2N500b                                               : ARR( 0.172E-12,     0., 0.0);
+{  1447} GNK5001 +GHO                =       GDK5000 +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{  1448} GNK5001+HV               =       G3K3000 +      G2N2000                                :  0.100E+01*SUN;
+{  1449} GNK5001+HV               =       G1K5003 +      GNO2                                   :  0.100E+01*SUN;
+{  1450} G2N500Z +GNO                =       G1N500Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1451} G2N500Z +GNO                =       GNN500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1452} G2N500Z +GHO2               =       GHN500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1453} G2N500Z +GNO3               =       G1N500Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1454} G2N500Z +MEPERO             =  0.480G1N500Z + 0.260GNK500E + 0.260GND5007                 : ARR( 0.146E-12,  -445., 0.0);
+{  1455} G2N500Z +PERO1              =  0.600G1N500Z + 0.200GNK500E + 0.200GND5007                 : ARR( 0.112E-12,  -500., 0.0);
+{  1456} G2N500Z +PERO2              =  0.560G1N500Z + 0.220GNK500E + 0.220GND5007                 : ARR( 0.418E-13, -1000., 0.0);
+{  1457} G2N500Z +PERO3              =  0.600G1N500Z + 0.200GNK500E + 0.200GND5007                 : ARR( 0.126E-12,  -850., 0.0);
+{  1458} G2N500Z +PERO5              =  0.600G1N500Z + 0.200GNK500E + 0.200GND5007                 : ARR( 0.473E-11,   850., 0.0);
+{  1459} G2N500Z +PERO6              =  0.460G1N500Z + 0.270GNK500E + 0.270GND5007                 : ARR( 0.434E-13,  -900., 0.0);
+{  1460} G2N500Z +PERO9              =  0.800G1N500Z + 0.200GND5007                                : ARR( 0.100E-10,     0., 0.0);
+{  1461} G2N500a +GNO                =       G1N500a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1462} G2N500a +GNO                =       GNN500M                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1463} G2N500a +GHO2               =       GHN500g                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1464} G2N500a +GNO3               =       G1N500a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1465} G2N500a +MEPERO             =  0.340G1N500a + 0.330GNK500C + 0.330GNK500G                 : ARR( 0.565E-13,  -845., 0.0);
+{  1466} G2N500a +PERO1              =  0.460G1N500a + 0.270GNK500C + 0.270GNK500G                 : ARR( 0.434E-13,  -900., 0.0);
+{  1467} G2N500a +PERO2              =  0.400G1N500a + 0.300GNK500C + 0.300GNK500G                 : ARR( 0.162E-13, -1400., 0.0);
+{  1468} G2N500a +PERO3              =  0.460G1N500a + 0.270GNK500C + 0.270GNK500G                 : ARR( 0.488E-13, -1250., 0.0);
+{  1469} G2N500a +PERO5              =  0.460G1N500a + 0.270GNK500C + 0.270GNK500G                 : ARR( 0.183E-11,   450., 0.0);
+{  1470} G2N500a +PERO6              =  0.300G1N500a + 0.350GNK500C + 0.350GNK500G                 : ARR( 0.168E-13, -1300., 0.0);
+{  1471} G2N500a +PERO9              =  0.650G1N500a + 0.350GNK500G                                : ARR( 0.100E-10,     0., 0.0);
+{  1472} G2N500b +GNO                =       G1N500b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1473} G2N500b +GNO                =       GNN500g                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1474} G2N500b +GHO2               =       GHN500h                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1475} G2N500b +GNO3               =       G1N500b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1476} G2N500b +MEPERO             =  0.340G1N500b + 0.330GNK500K + 0.330GNK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  1477} G2N500b +PERO1              =  0.460G1N500b + 0.270GNK500K + 0.270GNK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  1478} G2N500b +PERO2              =  0.400G1N500b + 0.300GNK500K + 0.300GNK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  1479} G2N500b +PERO3              =  0.460G1N500b + 0.270GNK500K + 0.270GNK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  1480} G2N500b +PERO5              =  0.460G1N500b + 0.270GNK500K + 0.270GNK500L                 : ARR( 0.183E-11,   450., 0.0);
+{  1481} G2N500b +PERO6              =  0.300G1N500b + 0.350GNK500K + 0.350GNK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  1482} G2N500b +PERO9              =  0.650G1N500b + 0.350GNK500L                                : ARR( 0.100E-10,     0., 0.0);
+{  1483} G1N500Z +OXYGEN             =       GND5007 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  1484} G1N500a                     =       GD02000 +      G3N3000                                : ARR( 0.200E+15,  2750., 0.0);
+{  1485} G1N500b                     =       G3K3000 +      GND2000                                : ARR( 0.200E+15,  3003., 0.0);
+{  1486} G3N3000 +GHO2               =  0.800GGN3000 + 0.200GAN3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1487} G3N3000 +GNO                =       G2N2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1488} G3N3000 +GNO2               =       GPN3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  1489} G3N3000 +GNO3               =       G2N2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1490} G3N3000 +MEPERO             =  0.685G2N2000 + 0.315GAN3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1491} G3N3000 +PERO1              =  0.800G2N2000 + 0.200GAN3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1492} G3N3000 +PERO2              =  0.750G2N2000 + 0.250GAN3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1493} G3N3000 +PERO3              =  0.800G2N2000 + 0.200GAN3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1494} G3N3000 +PERO5              =  0.650G2N2000 + 0.350GAN3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1495} G3N3000 +PERO6              =  0.650G2N2000 + 0.350GAN3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1496} G3N3000 +PERO9              =       G2N2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  1497} GNN5003 +GHO                =       G2N500c                                               : ARR( 0.171E-12,     0., 0.0);
+{  1498} GNN5003 +GHO                =       G2N500d                                               : ARR( 0.117E-11,     0., 0.0);
+{  1499} GNN5003 +GHO                =       G2N500e                                               : ARR( 0.288E-12,     0., 0.0);
+{  1500} GNN5003+HV               =       G1N5003 +      GNO2                                   :  0.100E+01*SUN;
+{  1501} GNN5003+HV               =       G1N500c +      GNO2                                   :  0.100E+01*SUN;
+{  1502} G2N500c +GNO                =       G1N500d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1503} G2N500c +GNO                =       GNN500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1504} G2N500c +GHO2               =       GHN500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1505} G2N500c +GNO3               =       G1N500d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1506} G2N500c +MEPERO             =  0.480G1N500d + 0.260GNN5004 + 0.260GNN500h                 : ARR( 0.146E-12,  -445., 0.0);
+{  1507} G2N500c +PERO1              =  0.600G1N500d + 0.200GNN5004 + 0.200GNN500h                 : ARR( 0.112E-12,  -500., 0.0);
+{  1508} G2N500c +PERO2              =  0.560G1N500d + 0.220GNN5004 + 0.220GNN500h                 : ARR( 0.418E-13, -1000., 0.0);
+{  1509} G2N500c +PERO3              =  0.600G1N500d + 0.200GNN5004 + 0.200GNN500h                 : ARR( 0.126E-12,  -850., 0.0);
+{  1510} G2N500c +PERO5              =  0.600G1N500d + 0.200GNN5004 + 0.200GNN500h                 : ARR( 0.473E-11,   850., 0.0);
+{  1511} G2N500c +PERO6              =  0.460G1N500d + 0.270GNN5004 + 0.270GNN500h                 : ARR( 0.434E-13,  -900., 0.0);
+{  1512} G2N500c +PERO9              =  0.800G1N500d + 0.200GNN500h                                : ARR( 0.100E-10,     0., 0.0);
+{  1513} G2N500d +GNO                =       G1N500e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1514} G2N500d +GNO                =       GNN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1515} G2N500d +GHO2               =       GHN500j                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1516} G2N500d +GNO3               =       G1N500e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1517} G2N500d +MEPERO             =  0.480G1N500e + 0.260GNN5008 + 0.260GNN500W                 : ARR( 0.616E-11,   905., 0.0);
+{  1518} G2N500d +PERO1              =  0.600G1N500e + 0.200GNN5008 + 0.200GNN500W                 : ARR( 0.473E-11,   850., 0.0);
+{  1519} G2N500d +PERO2              =  0.560G1N500e + 0.220GNN5008 + 0.220GNN500W                 : ARR( 0.177E-11,   350., 0.0);
+{  1520} G2N500d +PERO3              =  0.600G1N500e + 0.200GNN5008 + 0.200GNN500W                 : ARR( 0.533E-11,   500., 0.0);
+{  1521} G2N500d +PERO5              =  0.600G1N500e + 0.200GNN5008 + 0.200GNN500W                 : ARR( 0.200E-09,  2200., 0.0);
+{  1522} G2N500d +PERO6              =  0.460G1N500e + 0.270GNN5008 + 0.270GNN500W                 : ARR( 0.183E-11,   450., 0.0);
+{  1523} G2N500d +PERO9              =  0.800G1N500e + 0.200GNN500W                                : ARR( 0.100E-10,     0., 0.0);
+{  1524} G2N500e +GNO                =       G1N500f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1525} G2N500e +GNO                =       GNN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1526} G2N500e +GHO2               =       GHN500k                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1527} G2N500e +GNO3               =       G1N500f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1528} G2N500e +MEPERO             =  0.340G1N500f + 0.330GNN500i + 0.330GNN500g                 : ARR( 0.565E-13,  -845., 0.0);
+{  1529} G2N500e +PERO1              =  0.460G1N500f + 0.270GNN500i + 0.270GNN500g                 : ARR( 0.434E-13,  -900., 0.0);
+{  1530} G2N500e +PERO2              =  0.400G1N500f + 0.300GNN500i + 0.300GNN500g                 : ARR( 0.162E-13, -1400., 0.0);
+{  1531} G2N500e +PERO3              =  0.460G1N500f + 0.270GNN500i + 0.270GNN500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  1532} G2N500e +PERO5              =  0.460G1N500f + 0.270GNN500i + 0.270GNN500g                 : ARR( 0.183E-11,   450., 0.0);
+{  1533} G2N500e +PERO6              =  0.300G1N500f + 0.350GNN500i + 0.350GNN500g                 : ARR( 0.168E-13, -1300., 0.0);
+{  1534} G2N500e +PERO9              =  0.650G1N500f + 0.350GNN500g                                : ARR( 0.100E-10,     0., 0.0);
+{  1535} G1N500c                     =       G2N500f                                               : ARR( 0.160E+12,  3092., 0.0);
+{  1536} G1N500d +OXYGEN             =       GNN500h +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  1537} G1N500d                     =       GNK5003 +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{  1538} G1N500e                     =       GND5004 +      GNO2                                   : ARR( 0.160E+12,  5251., 0.0);
+{  1539} G1N500e                     =       GD02000 +      G2N3004                                : ARR( 0.200E+15,  6731., 0.0);
+{  1540} G1N500f                     =       GD03000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{  1541} G2N500f +GNO                =       G1N500g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1542} G2N500f +GNO                =       GNN500B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1543} G2N500f +GHO2               =       GHN500l                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1544} G2N500f +GNO3               =       G1N500g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1545} G2N500f +MEPERO             =  0.480G1N500g + 0.260GNO500B + 0.260GNK5006                 : ARR( 0.616E-11,   905., 0.0);
+{  1546} G2N500f +PERO1              =  0.600G1N500g + 0.200GNO500B + 0.200GNK5006                 : ARR( 0.473E-11,   850., 0.0);
+{  1547} G2N500f +PERO2              =  0.560G1N500g + 0.220GNO500B + 0.220GNK5006                 : ARR( 0.177E-11,   350., 0.0);
+{  1548} G2N500f +PERO3              =  0.600G1N500g + 0.200GNO500B + 0.200GNK5006                 : ARR( 0.533E-11,   500., 0.0);
+{  1549} G2N500f +PERO5              =  0.600G1N500g + 0.200GNO500B + 0.200GNK5006                 : ARR( 0.200E-09,  2200., 0.0);
+{  1550} G2N500f +PERO6              =  0.460G1N500g + 0.270GNO500B + 0.270GNK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  1551} G2N500f +PERO9              =  0.800G1N500g + 0.200GNK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  1552} G2N3004 +GNO                =       G1N3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  1553} G2N3004 +GNO                =       GNN3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{  1554} G2N3004 +GHO2               =       GHN3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{  1555} G2N3004 +GNO3               =       G1N3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1556} G2N3004 +MEPERO             =  0.480G1N3004 + 0.260GNN3004 + 0.260GNN3005                 : ARR( 0.164E-12,  -795., 0.0);
+{  1557} G2N3004 +PERO1              =  0.600G1N3004 + 0.200GNN3004 + 0.200GNN3005                 : ARR( 0.126E-12,  -850., 0.0);
+{  1558} G2N3004 +PERO2              =  0.560G1N3004 + 0.220GNN3004 + 0.220GNN3005                 : ARR( 0.471E-13, -1350., 0.0);
+{  1559} G2N3004 +PERO3              =  0.600G1N3004 + 0.200GNN3004 + 0.200GNN3005                 : ARR( 0.142E-12, -1200., 0.0);
+{  1560} G2N3004 +PERO5              =  0.600G1N3004 + 0.200GNN3004 + 0.200GNN3005                 : ARR( 0.533E-11,   500., 0.0);
+{  1561} G2N3004 +PERO6              =  0.460G1N3004 + 0.270GNN3004 + 0.270GNN3005                 : ARR( 0.488E-13, -1250., 0.0);
+{  1562} G2N3004 +PERO9              =  0.800G1N3004 + 0.200GNN3005                                : ARR( 0.100E-10,     0., 0.0);
+{  1563} G1N500g                     =       GND5004 +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  1564} G1N3004 +OXYGEN             =       GNN3005 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  1565} G1N3004                     =       GND2000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7190., 0.0);
+{  1566} GHN5003 +GHO                =       G2H5007                                               : ARR( 0.117E-11,     0., 0.0);
+{  1567} GHN5003 +GHO                =       G2H5008                                               : ARR( 0.143E-11,     0., 0.0);
+{  1568} GHN5003 +GHO                =       GNK5002 +      GHO                                    : ARR( 0.836E-11,     0., 0.0);
+{  1569} GHN5003 +GHO                =       G2N5003                                               : ARR( 0.193E-11,  -190., 0.0);
+{  1570} GHN5003+HV               =       G1N5003 +      GHO                                    :  0.100E+01*SUN;
+{  1571} GHN5003+HV               =       G1H500A +      GNO2                                   :  0.100E+01*SUN;
+{  1572} G2H5007 +GNO                =       G1H500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1573} G2H5007 +GNO                =       GHN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1574} G2H5007 +GHO2               =       GHH5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1575} G2H5007 +GNO3               =       G1H500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1576} G2H5007 +MEPERO             =  0.480G1H500B + 0.260GHN500m + 0.260GHN500Y                 : ARR( 0.616E-11,   905., 0.0);
+{  1577} G2H5007 +PERO1              =  0.600G1H500B + 0.200GHN500m + 0.200GHN500Y                 : ARR( 0.473E-11,   850., 0.0);
+{  1578} G2H5007 +PERO2              =  0.560G1H500B + 0.220GHN500m + 0.220GHN500Y                 : ARR( 0.177E-11,   350., 0.0);
+{  1579} G2H5007 +PERO3              =  0.600G1H500B + 0.200GHN500m + 0.200GHN500Y                 : ARR( 0.533E-11,   500., 0.0);
+{  1580} G2H5007 +PERO5              =  0.600G1H500B + 0.200GHN500m + 0.200GHN500Y                 : ARR( 0.200E-09,  2200., 0.0);
+{  1581} G2H5007 +PERO6              =  0.460G1H500B + 0.270GHN500m + 0.270GHN500Y                 : ARR( 0.183E-11,   450., 0.0);
+{  1582} G2H5007 +PERO9              =  0.800G1H500B + 0.200GHN500Y                                : ARR( 0.100E-10,     0., 0.0);
+{  1583} G2H5008 +GNO                =       G1H500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1584} G2H5008 +GNO                =       GHN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1585} G2H5008 +GHO2               =       GHH5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1586} G2H5008 +GNO3               =       G1H500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1587} G2H5008 +MEPERO             =  0.340G1H500C + 0.330GHN500n + 0.330GHN500h                 : ARR( 0.565E-13,  -845., 0.0);
+{  1588} G2H5008 +PERO1              =  0.460G1H500C + 0.270GHN500n + 0.270GHN500h                 : ARR( 0.434E-13,  -900., 0.0);
+{  1589} G2H5008 +PERO2              =  0.400G1H500C + 0.300GHN500n + 0.300GHN500h                 : ARR( 0.162E-13, -1400., 0.0);
+{  1590} G2H5008 +PERO3              =  0.460G1H500C + 0.270GHN500n + 0.270GHN500h                 : ARR( 0.488E-13, -1250., 0.0);
+{  1591} G2H5008 +PERO5              =  0.460G1H500C + 0.270GHN500n + 0.270GHN500h                 : ARR( 0.183E-11,   450., 0.0);
+{  1592} G2H5008 +PERO6              =  0.300G1H500C + 0.350GHN500n + 0.350GHN500h                 : ARR( 0.168E-13, -1300., 0.0);
+{  1593} G2H5008 +PERO9              =  0.650G1H500C + 0.350GHN500h                                : ARR( 0.100E-10,     0., 0.0);
+{  1594} G1H500A                     =       G2H5009                                               : ARR( 0.160E+12,  3092., 0.0);
+{  1595} G1H500A                     =       GD04000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  1596} G1H500B                     =       GHD5005 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1597} G1H500B                     =       GD02000 +      G2H3001                                : ARR( 0.200E+15,  6731., 0.0);
+{  1598} G1H500C                     =       GD03000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{  1599} G2H5009 +GNO                =       G1H500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1600} G2H5009 +GNO                =       GHN500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1601} G2H5009 +GHO2               =       GHH5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1602} G2H5009 +GNO3               =       G1H500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1603} G2H5009 +MEPERO             =  0.480G1H500D + 0.260GHO500D + 0.260GHK5009                 : ARR( 0.616E-11,   905., 0.0);
+{  1604} G2H5009 +PERO1              =  0.600G1H500D + 0.200GHO500D + 0.200GHK5009                 : ARR( 0.473E-11,   850., 0.0);
+{  1605} G2H5009 +PERO2              =  0.560G1H500D + 0.220GHO500D + 0.220GHK5009                 : ARR( 0.177E-11,   350., 0.0);
+{  1606} G2H5009 +PERO3              =  0.600G1H500D + 0.200GHO500D + 0.200GHK5009                 : ARR( 0.533E-11,   500., 0.0);
+{  1607} G2H5009 +PERO5              =  0.600G1H500D + 0.200GHO500D + 0.200GHK5009                 : ARR( 0.200E-09,  2200., 0.0);
+{  1608} G2H5009 +PERO6              =  0.460G1H500D + 0.270GHO500D + 0.270GHK5009                 : ARR( 0.183E-11,   450., 0.0);
+{  1609} G2H5009 +PERO9              =  0.800G1H500D + 0.200GHK5009                                : ARR( 0.100E-10,     0., 0.0);
+{  1610} G2H3001 +GNO                =       G1H3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  1611} G2H3001 +GNO                =       GHN3005                                               : ARR( 0.622E-13,  -360., 0.0);
+{  1612} G2H3001 +GHO2               =       GHH3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  1613} G2H3001 +GNO3               =       G1H3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1614} G2H3001 +MEPERO             =  0.480G1H3001 + 0.260GHN3006 + 0.260GHN3007                 : ARR( 0.164E-12,  -795., 0.0);
+{  1615} G2H3001 +PERO1              =  0.600G1H3001 + 0.200GHN3006 + 0.200GHN3007                 : ARR( 0.126E-12,  -850., 0.0);
+{  1616} G2H3001 +PERO2              =  0.560G1H3001 + 0.220GHN3006 + 0.220GHN3007                 : ARR( 0.471E-13, -1350., 0.0);
+{  1617} G2H3001 +PERO3              =  0.600G1H3001 + 0.200GHN3006 + 0.200GHN3007                 : ARR( 0.142E-12, -1200., 0.0);
+{  1618} G2H3001 +PERO5              =  0.600G1H3001 + 0.200GHN3006 + 0.200GHN3007                 : ARR( 0.533E-11,   500., 0.0);
+{  1619} G2H3001 +PERO6              =  0.460G1H3001 + 0.270GHN3006 + 0.270GHN3007                 : ARR( 0.488E-13, -1250., 0.0);
+{  1620} G2H3001 +PERO9              =  0.800G1H3001 + 0.200GHN3007                                : ARR( 0.100E-10,     0., 0.0);
+{  1621} G1H500D                     =       GHD5005 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1622} G1H3001 +OXYGEN             =       GHN3007 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  1623} G1H3001                     =       GND2000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5652., 0.0);
+{  1624} GNO5004 +GHO                =       G2N500g                                               : ARR( 0.124E-11,     0., 0.0);
+{  1625} GNO5004 +GHO                =       G2N500h                                               : ARR( 0.152E-11,     0., 0.0);
+{  1626} GNO5004 +GHO                =       GNK5002 +      GHO2                                   : ARR( 0.222E-11,     0., 0.0);
+{  1627} GNO5004+HV               =       G1O500G +      GNO2                                   :  0.100E+01*SUN;
+{  1628} G2N500g +GNO                =       G1N500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1629} G2N500g +GNO                =       GNN500O                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1630} G2N500g +GHO2               =       GHN500o                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1631} G2N500g +GNO3               =       G1N500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1632} G2N500g +MEPERO             =  0.480G1N500h + 0.260GNO500D + 0.260GNK500H                 : ARR( 0.616E-11,   905., 0.0);
+{  1633} G2N500g +PERO1              =  0.600G1N500h + 0.200GNO500D + 0.200GNK500H                 : ARR( 0.473E-11,   850., 0.0);
+{  1634} G2N500g +PERO2              =  0.560G1N500h + 0.220GNO500D + 0.220GNK500H                 : ARR( 0.177E-11,   350., 0.0);
+{  1635} G2N500g +PERO3              =  0.600G1N500h + 0.200GNO500D + 0.200GNK500H                 : ARR( 0.533E-11,   500., 0.0);
+{  1636} G2N500g +PERO5              =  0.600G1N500h + 0.200GNO500D + 0.200GNK500H                 : ARR( 0.200E-09,  2200., 0.0);
+{  1637} G2N500g +PERO6              =  0.460G1N500h + 0.270GNO500D + 0.270GNK500H                 : ARR( 0.183E-11,   450., 0.0);
+{  1638} G2N500g +PERO9              =  0.800G1N500h + 0.200GNK500H                                : ARR( 0.100E-10,     0., 0.0);
+{  1639} G2N500h +GNO                =       G1N500i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1640} G2N500h +GNO                =       GNN500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1641} G2N500h +GHO2               =       GHN500p                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1642} G2N500h +GNO3               =       G1N500i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1643} G2N500h +MEPERO             =  0.340G1N500i + 0.330GNO500L + 0.330GNK500K                 : ARR( 0.565E-13,  -845., 0.0);
+{  1644} G2N500h +PERO1              =  0.460G1N500i + 0.270GNO500L + 0.270GNK500K                 : ARR( 0.434E-13,  -900., 0.0);
+{  1645} G2N500h +PERO2              =  0.400G1N500i + 0.300GNO500L + 0.300GNK500K                 : ARR( 0.162E-13, -1400., 0.0);
+{  1646} G2N500h +PERO3              =  0.460G1N500i + 0.270GNO500L + 0.270GNK500K                 : ARR( 0.488E-13, -1250., 0.0);
+{  1647} G2N500h +PERO5              =  0.460G1N500i + 0.270GNO500L + 0.270GNK500K                 : ARR( 0.183E-11,   450., 0.0);
+{  1648} G2N500h +PERO6              =  0.300G1N500i + 0.350GNO500L + 0.350GNK500K                 : ARR( 0.168E-13, -1300., 0.0);
+{  1649} G2N500h +PERO9              =  0.650G1N500i + 0.350GNK500K                                : ARR( 0.100E-10,     0., 0.0);
+{  1650} G1O500G                     =       G2O500E                                               : ARR( 0.160E+12,  3092., 0.0);
+{  1651} G1O500G                     =       GD04000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  1652} G1N500h                     =       GDO5003 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1653} G1N500h                     =       GD02000 +      G2N3003                                : ARR( 0.200E+15,  6731., 0.0);
+{  1654} G1N500i                     =       GD03000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  1655} G2O500E +GNO                =       G1O500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1656} G2O500E +GNO                =       GNO500F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1657} G2O500E +GHO2               =       GHO500H                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1658} G2O500E +GNO3               =       G1O500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1659} G2O500E +MEPERO             =  0.480G1O500H + 0.260GOO5006 + 0.260GKO5006                 : ARR( 0.616E-11,   905., 0.0);
+{  1660} G2O500E +PERO1              =  0.600G1O500H + 0.200GOO5006 + 0.200GKO5006                 : ARR( 0.473E-11,   850., 0.0);
+{  1661} G2O500E +PERO2              =  0.560G1O500H + 0.220GOO5006 + 0.220GKO5006                 : ARR( 0.177E-11,   350., 0.0);
+{  1662} G2O500E +PERO3              =  0.600G1O500H + 0.200GOO5006 + 0.200GKO5006                 : ARR( 0.533E-11,   500., 0.0);
+{  1663} G2O500E +PERO5              =  0.600G1O500H + 0.200GOO5006 + 0.200GKO5006                 : ARR( 0.200E-09,  2200., 0.0);
+{  1664} G2O500E +PERO6              =  0.460G1O500H + 0.270GOO5006 + 0.270GKO5006                 : ARR( 0.183E-11,   450., 0.0);
+{  1665} G2O500E +PERO9              =  0.800G1O500H + 0.200GKO5006                                : ARR( 0.100E-10,     0., 0.0);
+{  1666} G1O500H                     =       GDO5003 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1667} GNK5002 +GHO                =       G2N500i                                               : ARR( 0.380E-11,     0., 0.0);
+{  1668} GNK5002 +GHO                =       G2N500j                                               : ARR( 0.899E-12,     0., 0.0);
+{  1669} GNK5002+HV               =       G3K4001 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  1670} GNK5002+HV               =       GU02000 +      GNK3000                                :  0.100E+01*SUN;
+{  1671} GNK5002+HV               =       G1K5009 +      GNO2                                   :  0.100E+01*SUN;
+{  1672} G2N500i +GNO                =       G1N500j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1673} G2N500i +GNO                =       GNN500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1674} G2N500i +GHO2               =       GHN500q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1675} G2N500i +GNO3               =       G1N500j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1676} G2N500i +MEPERO             =  0.480G1N500j + 0.260GNK5008 + 0.260GNK500I                 : ARR( 0.616E-11,   905., 0.0);
+{  1677} G2N500i +PERO1              =  0.600G1N500j + 0.200GNK5008 + 0.200GNK500I                 : ARR( 0.473E-11,   850., 0.0);
+{  1678} G2N500i +PERO2              =  0.560G1N500j + 0.220GNK5008 + 0.220GNK500I                 : ARR( 0.177E-11,   350., 0.0);
+{  1679} G2N500i +PERO3              =  0.600G1N500j + 0.200GNK5008 + 0.200GNK500I                 : ARR( 0.533E-11,   500., 0.0);
+{  1680} G2N500i +PERO5              =  0.600G1N500j + 0.200GNK5008 + 0.200GNK500I                 : ARR( 0.200E-09,  2200., 0.0);
+{  1681} G2N500i +PERO6              =  0.460G1N500j + 0.270GNK5008 + 0.270GNK500I                 : ARR( 0.183E-11,   450., 0.0);
+{  1682} G2N500i +PERO9              =  0.800G1N500j + 0.200GNK500I                                : ARR( 0.100E-10,     0., 0.0);
+{  1683} G2N500j +GNO                =       G1N500k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1684} G2N500j +GNO                =       GNN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1685} G2N500j +GHO2               =       GHN500r                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1686} G2N500j +GNO3               =       G1N500k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1687} G2N500j +MEPERO             =  0.340G1N500k + 0.330GNK500M + 0.330GNK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  1688} G2N500j +PERO1              =  0.460G1N500k + 0.270GNK500M + 0.270GNK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  1689} G2N500j +PERO2              =  0.400G1N500k + 0.300GNK500M + 0.300GNK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  1690} G2N500j +PERO3              =  0.460G1N500k + 0.270GNK500M + 0.270GNK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  1691} G2N500j +PERO5              =  0.460G1N500k + 0.270GNK500M + 0.270GNK500L                 : ARR( 0.183E-11,   450., 0.0);
+{  1692} G2N500j +PERO6              =  0.300G1N500k + 0.350GNK500M + 0.350GNK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  1693} G2N500j +PERO9              =  0.650G1N500k + 0.350GNK500L                                : ARR( 0.100E-10,     0., 0.0);
+{  1694} G3K4001 +GHO2               =  0.800GG04000 + 0.200GA04000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1695} G3K4001 +GNO                =       G203000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1696} G3K4001 +GNO2               =       GP04000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  1697} G3K4001 +GNO3               =       G203000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1698} G3K4001 +MEPERO             =  0.685G203000 + 0.315GA04000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1699} G3K4001 +PERO1              =  0.800G203000 + 0.200GA04000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1700} G3K4001 +PERO2              =  0.750G203000 + 0.250GA04000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1701} G3K4001 +PERO3              =  0.800G203000 + 0.200GA04000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1702} G3K4001 +PERO5              =  0.650G203000 + 0.350GA04000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1703} G3K4001 +PERO6              =  0.650G203000 + 0.350GA04000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1704} G3K4001 +PERO9              =       G203000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  1705} G1K5009                     =       G3K4001 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  1706} G1N500j                     =       GD02000 +      G2N3005                                : ARR( 0.200E+15,  7034., 0.0);
+{  1707} G1N500k                     =       GD03000 +      G3N2000                                : ARR( 0.200E+15,  2635., 0.0);
+{  1708} G2N3005 +GNO                =       G1N3005 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  1709} G2N3005 +GNO                =       GNN3006                                               : ARR( 0.622E-13,  -360., 0.0);
+{  1710} G2N3005 +GHO2               =       GHN3008                                               : ARR( 0.179E-12, -1250., 0.0);
+{  1711} G2N3005 +GNO3               =       G1N3005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1712} G2N3005 +MEPERO             =  0.480G1N3005 + 0.260GNK3001 + 0.260GND3003                 : ARR( 0.164E-12,  -795., 0.0);
+{  1713} G2N3005 +PERO1              =  0.600G1N3005 + 0.200GNK3001 + 0.200GND3003                 : ARR( 0.126E-12,  -850., 0.0);
+{  1714} G2N3005 +PERO2              =  0.560G1N3005 + 0.220GNK3001 + 0.220GND3003                 : ARR( 0.471E-13, -1350., 0.0);
+{  1715} G2N3005 +PERO3              =  0.600G1N3005 + 0.200GNK3001 + 0.200GND3003                 : ARR( 0.142E-12, -1200., 0.0);
+{  1716} G2N3005 +PERO5              =  0.600G1N3005 + 0.200GNK3001 + 0.200GND3003                 : ARR( 0.533E-11,   500., 0.0);
+{  1717} G2N3005 +PERO6              =  0.460G1N3005 + 0.270GNK3001 + 0.270GND3003                 : ARR( 0.488E-13, -1250., 0.0);
+{  1718} G2N3005 +PERO9              =  0.800G1N3005 + 0.200GND3003                                : ARR( 0.100E-10,     0., 0.0);
+{  1719} G3N2000 +GHO2               =  0.800GGN2000 + 0.200GAN2000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1720} G3N2000 +GNO                =       GCH2O   + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1721}  G3N2000 + GNO2       +M       =       GPN2000         +M                                    : FALL( 0.110E-10,     0.,-1.0, 0.850E-28,     0.,-6.5,0.60);
+{  1722} G3N2000 +GNO3               =       GCH2O   + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1723} G3N2000 +MEPERO             =  0.685GCH2O   + 0.315GAN2000 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  1724} G3N2000 +PERO1              =  0.800GCH2O   + 0.200GAN2000 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  1725} G3N2000 +PERO2              =  0.750GCH2O   + 0.250GAN2000 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  1726} G3N2000 +PERO3              =  0.800GCH2O   + 0.200GAN2000 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  1727} G3N2000 +PERO5              =  0.650GCH2O   + 0.350GAN2000 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  1728} G3N2000 +PERO6              =  0.650GCH2O   + 0.350GAN2000 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  1729} G3N2000 +PERO9              =       GCH2O   +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  1730} G1N3005                     =       G3N2000 +      GCH2O                                  : ARR( 0.200E+15,  3521., 0.0);
+{  1731} GND3000 +GHO                =       G3N3000                                               : ARR( 0.211E-10,     0., 0.0);
+{  1732} GND3000 +GNO3               =       G3N3000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  1733} GND3000+HV               =       G1D3000 +      GNO2                                   :  0.100E+01*SUN;
+{  1734} GND3000+HV               =       G2N2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  1735} G1D3000 +OXYGEN             =       GDD3000 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  1736} GNN5004 +GHO                =       GNN500h +      GHO2                                   : ARR( 0.436E-11,     0., 0.0);
+{  1737} GNN5004 +GHO                =       G2N500k                                               : ARR( 0.153E-11,     0., 0.0);
+{  1738} GNN5004+HV               =       G1N5004 +      GNO2                                   :  0.100E+01*SUN;
+{  1739} GNN5004+HV               =       G1N500l +      GNO2                                   :  0.100E+01*SUN;
+{  1740} G2N500k +GNO                =       G1N500m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1741} G2N500k +GNO                =       GNN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1742} G2N500k +GHO2               =       GHN500s                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1743} G2N500k +GNO3               =       G1N500m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1744} G2N500k +MEPERO             =  0.340G1N500m + 0.330GNN500k + 0.330GNN500l                 : ARR( 0.565E-13,  -845., 0.0);
+{  1745} G2N500k +PERO1              =  0.460G1N500m + 0.270GNN500k + 0.270GNN500l                 : ARR( 0.434E-13,  -900., 0.0);
+{  1746} G2N500k +PERO2              =  0.400G1N500m + 0.300GNN500k + 0.300GNN500l                 : ARR( 0.162E-13, -1400., 0.0);
+{  1747} G2N500k +PERO3              =  0.460G1N500m + 0.270GNN500k + 0.270GNN500l                 : ARR( 0.488E-13, -1250., 0.0);
+{  1748} G2N500k +PERO5              =  0.460G1N500m + 0.270GNN500k + 0.270GNN500l                 : ARR( 0.183E-11,   450., 0.0);
+{  1749} G2N500k +PERO6              =  0.300G1N500m + 0.350GNN500k + 0.350GNN500l                 : ARR( 0.168E-13, -1300., 0.0);
+{  1750} G2N500k +PERO9              =  0.650G1N500m + 0.350GNN500l                                : ARR( 0.100E-10,     0., 0.0);
+{  1751} G1N500l                     =       G2N500l                                               : ARR( 0.160E+12,  3000., 0.0);
+{  1752} G1N500m                     =       GCH2O   +      GNN4001 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1753} G2N500l +GNO                =       G1N500n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1754} G2N500l +GNO                =       GNN500m                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1755} G2N500l +GHO2               =       GHN500t                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1756} G2N500l +GNO3               =       G1N500n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1757} G2N500l +MEPERO             =  0.340G1N500n + 0.330GNO500M + 0.330GNK500N                 : ARR( 0.565E-13,  -845., 0.0);
+{  1758} G2N500l +PERO1              =  0.460G1N500n + 0.270GNO500M + 0.270GNK500N                 : ARR( 0.434E-13,  -900., 0.0);
+{  1759} G2N500l +PERO2              =  0.400G1N500n + 0.300GNO500M + 0.300GNK500N                 : ARR( 0.162E-13, -1400., 0.0);
+{  1760} G2N500l +PERO3              =  0.460G1N500n + 0.270GNO500M + 0.270GNK500N                 : ARR( 0.488E-13, -1250., 0.0);
+{  1761} G2N500l +PERO5              =  0.460G1N500n + 0.270GNO500M + 0.270GNK500N                 : ARR( 0.183E-11,   450., 0.0);
+{  1762} G2N500l +PERO6              =  0.300G1N500n + 0.350GNO500M + 0.350GNK500N                 : ARR( 0.168E-13, -1300., 0.0);
+{  1763} G2N500l +PERO9              =  0.650G1N500n + 0.350GNK500N                                : ARR( 0.100E-10,     0., 0.0);
+{  1764} G1N500n                     =       GND500B +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  1765} G1N500n                     =       GND4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1766} GHN5004 +GHO                =       GHN500u +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{  1767} GHN5004 +GHO                =       G2H500A                                               : ARR( 0.143E-11,     0., 0.0);
+{  1768} GHN5004 +GHO                =       G2H500B                                               : ARR( 0.143E-11,     0., 0.0);
+{  1769} GHN5004 +GHO                =       GNK5003 +      GHO                                    : ARR( 0.832E-11,     0., 0.0);
+{  1770} GHN5004 +GHO                =       G2N5004                                               : ARR( 0.192E-11,  -190., 0.0);
+{  1771} GHN5004+HV               =       G1N5004 +      GHO                                    :  0.100E+01*SUN;
+{  1772} GHN5004+HV               =       G1H500E +      GNO2                                   :  0.100E+01*SUN;
+{  1773} G2H500A +GNO                =       G1H500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1774} G2H500A +GNO                =       GHN500v                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1775} G2H500A +GHO2               =       GHH500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1776} G2H500A +GNO3               =       G1H500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1777} G2H500A +MEPERO             =  0.340G1H500F + 0.330GHN500w + 0.330GHN500x                 : ARR( 0.565E-13,  -845., 0.0);
+{  1778} G2H500A +PERO1              =  0.460G1H500F + 0.270GHN500w + 0.270GHN500x                 : ARR( 0.434E-13,  -900., 0.0);
+{  1779} G2H500A +PERO2              =  0.400G1H500F + 0.300GHN500w + 0.300GHN500x                 : ARR( 0.162E-13, -1400., 0.0);
+{  1780} G2H500A +PERO3              =  0.460G1H500F + 0.270GHN500w + 0.270GHN500x                 : ARR( 0.488E-13, -1250., 0.0);
+{  1781} G2H500A +PERO5              =  0.460G1H500F + 0.270GHN500w + 0.270GHN500x                 : ARR( 0.183E-11,   450., 0.0);
+{  1782} G2H500A +PERO6              =  0.300G1H500F + 0.350GHN500w + 0.350GHN500x                 : ARR( 0.168E-13, -1300., 0.0);
+{  1783} G2H500A +PERO9              =  0.650G1H500F + 0.350GHN500x                                : ARR( 0.100E-10,     0., 0.0);
+{  1784} G2H500B +GNO                =       G1H500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1785} G2H500B +GNO                =       GHN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1786} G2H500B +GHO2               =       GHH500B                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1787} G2H500B +GNO3               =       G1H500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1788} G2H500B +MEPERO             =  0.340G1H500G + 0.330GHN500y + 0.330GHN500z                 : ARR( 0.565E-13,  -845., 0.0);
+{  1789} G2H500B +PERO1              =  0.460G1H500G + 0.270GHN500y + 0.270GHN500z                 : ARR( 0.434E-13,  -900., 0.0);
+{  1790} G2H500B +PERO2              =  0.400G1H500G + 0.300GHN500y + 0.300GHN500z                 : ARR( 0.162E-13, -1400., 0.0);
+{  1791} G2H500B +PERO3              =  0.460G1H500G + 0.270GHN500y + 0.270GHN500z                 : ARR( 0.488E-13, -1250., 0.0);
+{  1792} G2H500B +PERO5              =  0.460G1H500G + 0.270GHN500y + 0.270GHN500z                 : ARR( 0.183E-11,   450., 0.0);
+{  1793} G2H500B +PERO6              =  0.300G1H500G + 0.350GHN500y + 0.350GHN500z                 : ARR( 0.168E-13, -1300., 0.0);
+{  1794} G2H500B +PERO9              =  0.650G1H500G + 0.350GHN500z                                : ARR( 0.100E-10,     0., 0.0);
+{  1795} G1H500E                     =       G2H500C                                               : ARR( 0.160E+12,  3000., 0.0);
+{  1796} G1H500E                     =       GDO4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  1797} G1H500F                     =       GCH2O   +      GHN4001 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1798} G1H500G                     =       GDO3000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{  1799} G2H500C +GNO                =       G1H500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1800} G2H500C +GNO                =       GHN500t                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1801} G2H500C +GHO2               =       GHH500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1802} G2H500C +GNO3               =       G1H500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1803} G2H500C +MEPERO             =  0.340G1H500H + 0.330GHO500I + 0.330GHK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{  1804} G2H500C +PERO1              =  0.460G1H500H + 0.270GHO500I + 0.270GHK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{  1805} G2H500C +PERO2              =  0.400G1H500H + 0.300GHO500I + 0.300GHK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{  1806} G2H500C +PERO3              =  0.460G1H500H + 0.270GHO500I + 0.270GHK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  1807} G2H500C +PERO5              =  0.460G1H500H + 0.270GHO500I + 0.270GHK500B                 : ARR( 0.183E-11,   450., 0.0);
+{  1808} G2H500C +PERO6              =  0.300G1H500H + 0.350GHO500I + 0.350GHK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{  1809} G2H500C +PERO9              =  0.650G1H500H + 0.350GHK500B                                : ARR( 0.100E-10,     0., 0.0);
+{  1810} G1H500H                     =       GHD5006 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1811} G1H500H                     =       GHD4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1812} GNO5005 +GHO                =       GND5001 +      GHO2                                   : ARR( 0.417E-11,     0., 0.0);
+{  1813} GNO5005 +GHO                =       G2N500m                                               : ARR( 0.146E-11,     0., 0.0);
+{  1814} GNO5005 +GHO                =       G2N500n                                               : ARR( 0.146E-11,     0., 0.0);
+{  1815} GNO5005 +GHO                =       GNK5003 +      GHO2                                   : ARR( 0.214E-11,     0., 0.0);
+{  1816} GNO5005+HV               =       G1O500I +      GNO2                                   :  0.100E+01*SUN;
+{  1817} G2N500m +GNO                =       G1N500o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1818} G2N500m +GNO                =       GNN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1819} G2N500m +GHO2               =       GHN5011                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1820} G2N500m +GNO3               =       G1N500o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1821} G2N500m +MEPERO             =  0.340G1N500o + 0.330GNO500G + 0.330GNK500J                 : ARR( 0.565E-13,  -845., 0.0);
+{  1822} G2N500m +PERO1              =  0.460G1N500o + 0.270GNO500G + 0.270GNK500J                 : ARR( 0.434E-13,  -900., 0.0);
+{  1823} G2N500m +PERO2              =  0.400G1N500o + 0.300GNO500G + 0.300GNK500J                 : ARR( 0.162E-13, -1400., 0.0);
+{  1824} G2N500m +PERO3              =  0.460G1N500o + 0.270GNO500G + 0.270GNK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{  1825} G2N500m +PERO5              =  0.460G1N500o + 0.270GNO500G + 0.270GNK500J                 : ARR( 0.183E-11,   450., 0.0);
+{  1826} G2N500m +PERO6              =  0.300G1N500o + 0.350GNO500G + 0.350GNK500J                 : ARR( 0.168E-13, -1300., 0.0);
+{  1827} G2N500m +PERO9              =  0.650G1N500o + 0.350GNK500J                                : ARR( 0.100E-10,     0., 0.0);
+{  1828} G2N500n +GNO                =       G1N500p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1829} G2N500n +GNO                =       GNN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1830} G2N500n +GHO2               =       GHN5012                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1831} G2N500n +GNO3               =       G1N500p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1832} G2N500n +MEPERO             =  0.340G1N500p + 0.330GNO500N + 0.330GNK500O                 : ARR( 0.565E-13,  -845., 0.0);
+{  1833} G2N500n +PERO1              =  0.460G1N500p + 0.270GNO500N + 0.270GNK500O                 : ARR( 0.434E-13,  -900., 0.0);
+{  1834} G2N500n +PERO2              =  0.400G1N500p + 0.300GNO500N + 0.300GNK500O                 : ARR( 0.162E-13, -1400., 0.0);
+{  1835} G2N500n +PERO3              =  0.460G1N500p + 0.270GNO500N + 0.270GNK500O                 : ARR( 0.488E-13, -1250., 0.0);
+{  1836} G2N500n +PERO5              =  0.460G1N500p + 0.270GNO500N + 0.270GNK500O                 : ARR( 0.183E-11,   450., 0.0);
+{  1837} G2N500n +PERO6              =  0.300G1N500p + 0.350GNO500N + 0.350GNK500O                 : ARR( 0.168E-13, -1300., 0.0);
+{  1838} G2N500n +PERO9              =  0.650G1N500p + 0.350GNK500O                                : ARR( 0.100E-10,     0., 0.0);
+{  1839} G1O500I                     =       G2O500F                                               : ARR( 0.160E+12,  3000., 0.0);
+{  1840} G1O500I                     =       GDO4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  1841} G1N500o                     =       GCH2O   +      GND4003 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1842} G1N500p                     =       GDO3000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  1843} G2O500F +GNO                =       G1O500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1844} G2O500F +GNO                =       GNO500M                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1845} G2O500F +GHO2               =       GHO500I                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1846} G2O500F +GNO3               =       G1O500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1847} G2O500F +MEPERO             =  0.340G1O500J + 0.330GOO5008 + 0.330GKO500A                 : ARR( 0.565E-13,  -845., 0.0);
+{  1848} G2O500F +PERO1              =  0.460G1O500J + 0.270GOO5008 + 0.270GKO500A                 : ARR( 0.434E-13,  -900., 0.0);
+{  1849} G2O500F +PERO2              =  0.400G1O500J + 0.300GOO5008 + 0.300GKO500A                 : ARR( 0.162E-13, -1400., 0.0);
+{  1850} G2O500F +PERO3              =  0.460G1O500J + 0.270GOO5008 + 0.270GKO500A                 : ARR( 0.488E-13, -1250., 0.0);
+{  1851} G2O500F +PERO5              =  0.460G1O500J + 0.270GOO5008 + 0.270GKO500A                 : ARR( 0.183E-11,   450., 0.0);
+{  1852} G2O500F +PERO6              =  0.300G1O500J + 0.350GOO5008 + 0.350GKO500A                 : ARR( 0.168E-13, -1300., 0.0);
+{  1853} G2O500F +PERO9              =  0.650G1O500J + 0.350GKO500A                                : ARR( 0.100E-10,     0., 0.0);
+{  1854} G1O500J                     =       GDO5004 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1855} G1O500J                     =       GDO4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  1856} GNK5003 +GHO                =       GND500C +      GHO2                                   : ARR( 0.409E-11,     0., 0.0);
+{  1857} GNK5003 +GHO                =       G2N500o                                               : ARR( 0.456E-11,     0., 0.0);
+{  1858} GNK5003 +GHO                =       G2N500p                                               : ARR( 0.877E-12,     0., 0.0);
+{  1859} GNK5003+HV               =       G3K4002 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  1860} GNK5003+HV               =       GD02000 +      GNK3000                                :  0.100E+01*SUN;
+{  1861} GNK5003+HV               =       G1K500A +      GNO2                                   :  0.100E+01*SUN;
+{  1862} G2N500o +GNO                =       G1N500q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1863} G2N500o +GNO                =       GNN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1864} G2N500o +GHO2               =       GHN5013                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1865} G2N500o +GNO3               =       G1N500q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1866} G2N500o +MEPERO             =  0.340G1N500q + 0.330GNK500P + 0.330GNK500Q                 : ARR( 0.565E-13,  -845., 0.0);
+{  1867} G2N500o +PERO1              =  0.460G1N500q + 0.270GNK500P + 0.270GNK500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{  1868} G2N500o +PERO2              =  0.400G1N500q + 0.300GNK500P + 0.300GNK500Q                 : ARR( 0.162E-13, -1400., 0.0);
+{  1869} G2N500o +PERO3              =  0.460G1N500q + 0.270GNK500P + 0.270GNK500Q                 : ARR( 0.488E-13, -1250., 0.0);
+{  1870} G2N500o +PERO5              =  0.460G1N500q + 0.270GNK500P + 0.270GNK500Q                 : ARR( 0.183E-11,   450., 0.0);
+{  1871} G2N500o +PERO6              =  0.300G1N500q + 0.350GNK500P + 0.350GNK500Q                 : ARR( 0.168E-13, -1300., 0.0);
+{  1872} G2N500o +PERO9              =  0.650G1N500q + 0.350GNK500Q                                : ARR( 0.100E-10,     0., 0.0);
+{  1873} G2N500p +GNO                =       G1N500r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1874} G2N500p +GNO                =       GNN500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1875} G2N500p +GHO2               =       GHN5014                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1876} G2N500p +GNO3               =       G1N500r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1877} G2N500p +MEPERO             =  0.340G1N500r + 0.330GNK500R + 0.330GNK500S                 : ARR( 0.565E-13,  -845., 0.0);
+{  1878} G2N500p +PERO1              =  0.460G1N500r + 0.270GNK500R + 0.270GNK500S                 : ARR( 0.434E-13,  -900., 0.0);
+{  1879} G2N500p +PERO2              =  0.400G1N500r + 0.300GNK500R + 0.300GNK500S                 : ARR( 0.162E-13, -1400., 0.0);
+{  1880} G2N500p +PERO3              =  0.460G1N500r + 0.270GNK500R + 0.270GNK500S                 : ARR( 0.488E-13, -1250., 0.0);
+{  1881} G2N500p +PERO5              =  0.460G1N500r + 0.270GNK500R + 0.270GNK500S                 : ARR( 0.183E-11,   450., 0.0);
+{  1882} G2N500p +PERO6              =  0.300G1N500r + 0.350GNK500R + 0.350GNK500S                 : ARR( 0.168E-13, -1300., 0.0);
+{  1883} G2N500p +PERO9              =  0.650G1N500r + 0.350GNK500S                                : ARR( 0.100E-10,     0., 0.0);
+{  1884} G3K4002 +GHO2               =  0.800GGO4001 + 0.200GAO4001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  1885} G3K4002 +GNO                =       G2O3001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  1886} G3K4002 +GNO2               =       GPO4001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  1887} G3K4002 +GNO3               =       G2O3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  1888} G3K4002 +MEPERO             =  0.685G2O3001 + 0.315GAO4001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1889} G3K4002 +PERO1              =  0.800G2O3001 + 0.200GAO4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1890} G3K4002 +PERO2              =  0.750G2O3001 + 0.250GAO4001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1891} G3K4002 +PERO3              =  0.800G2O3001 + 0.200GAO4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1892} G3K4002 +PERO5              =  0.650G2O3001 + 0.350GAO4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1893} G3K4002 +PERO6              =  0.650G2O3001 + 0.350GAO4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  1894} G3K4002 +PERO9              =       G2O3001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  1895} G1K500A                     =       G3K4002 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  1896} G1N500q                     =       GCH2O   +      GND4004 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  1897} G1N500r                     =       GDO3000 +      G3N2000                                : ARR( 0.200E+15,  2635., 0.0);
+{  1898} GNN3000 +GHO                =       GND3000 +      GNO2                                   : ARR( 0.919E-13,     0., 0.0);
+{  1899} GNN3000 +GHO                =       G2N3006                                               : ARR( 0.565E-13,     0., 0.0);
+{  1900} GNN3000+HV               =       G1N3000 +      GNO2                                   :  0.200E+01*SUN;
+{  1901} G2N3006 +GNO                =       G1N3006 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  1902} G2N3006 +GNO                =       GNN3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{  1903} G2N3006 +GHO2               =       GHN3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{  1904} G2N3006 +GNO3               =       G1N3006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1905} G2N3006 +MEPERO             =  0.340G1N3006 + 0.330GNN3002 + 0.330GNN3006                 : ARR( 0.565E-13,  -845., 0.0);
+{  1906} G2N3006 +PERO1              =  0.460G1N3006 + 0.270GNN3002 + 0.270GNN3006                 : ARR( 0.434E-13,  -900., 0.0);
+{  1907} G2N3006 +PERO2              =  0.400G1N3006 + 0.300GNN3002 + 0.300GNN3006                 : ARR( 0.162E-13, -1400., 0.0);
+{  1908} G2N3006 +PERO3              =  0.460G1N3006 + 0.270GNN3002 + 0.270GNN3006                 : ARR( 0.488E-13, -1250., 0.0);
+{  1909} G2N3006 +PERO5              =  0.460G1N3006 + 0.270GNN3002 + 0.270GNN3006                 : ARR( 0.183E-11,   450., 0.0);
+{  1910} G2N3006 +PERO6              =  0.300G1N3006 + 0.350GNN3002 + 0.350GNN3006                 : ARR( 0.168E-13, -1300., 0.0);
+{  1911} G2N3006 +PERO9              =  0.650G1N3006 + 0.350GNN3006                                : ARR( 0.100E-10,     0., 0.0);
+{  1912} G1N3006                     =       GCH2O   +      GND2000 +      GNO2                    : ARR( 0.400E+15,  8991., 0.0);
+{  1913} GHN3000 +GHO                =       GND3000 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{  1914} GHN3000 +GHO                =       G2N3000                                               : ARR( 0.193E-11,  -190., 0.0);
+{  1915} GHN3000+HV               =       G1H3002 +      GNO2                                   :  0.100E+01*SUN;
+{  1916} GHN3000+HV               =       G1N3000 +      GHO                                    :  0.100E+01*SUN;
+{  1917} G1H3002 +OXYGEN             =       GHD3000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  1918} GNO3000 +GHO                =       GND3000 +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{  1919} GNO3000 +GHO                =       G2N3007                                               : ARR( 0.295E-12,     0., 0.0);
+{  1920} GNO3000+HV               =       G1O3001 +      GNO2                                   :  0.100E+01*SUN;
+{  1921} G2N3007 +GNO                =       G1N3007 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  1922} G2N3007 +GNO                =       GNN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  1923} G2N3007 +GHO2               =       GHN3006                                               : ARR( 0.179E-12, -1250., 0.0);
+{  1924} G2N3007 +GNO3               =       G1N3007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1925} G2N3007 +MEPERO             =  0.340G1N3007 + 0.330GNO3003 + 0.330GNK3001                 : ARR( 0.565E-13,  -845., 0.0);
+{  1926} G2N3007 +PERO1              =  0.460G1N3007 + 0.270GNO3003 + 0.270GNK3001                 : ARR( 0.434E-13,  -900., 0.0);
+{  1927} G2N3007 +PERO2              =  0.400G1N3007 + 0.300GNO3003 + 0.300GNK3001                 : ARR( 0.162E-13, -1400., 0.0);
+{  1928} G2N3007 +PERO3              =  0.460G1N3007 + 0.270GNO3003 + 0.270GNK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  1929} G2N3007 +PERO5              =  0.460G1N3007 + 0.270GNO3003 + 0.270GNK3001                 : ARR( 0.183E-11,   450., 0.0);
+{  1930} G2N3007 +PERO6              =  0.300G1N3007 + 0.350GNO3003 + 0.350GNK3001                 : ARR( 0.168E-13, -1300., 0.0);
+{  1931} G2N3007 +PERO9              =  0.650G1N3007 + 0.350GNK3001                                : ARR( 0.100E-10,     0., 0.0);
+{  1932} G1N3007                     =       GCH2O   +      GND2000 +      GHO2                    : ARR( 0.200E+15,  5353., 0.0);
+{  1933} GHN2000 +GHO                =       GND2000 +      GHO                                    : ARR( 0.324E-11,     0., 0.0);
+{  1934} GHN2000 +GHO                =       G2N2000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  1935} GHN2000+HV               =       G1H2000 +      GNO2                                   :  0.100E+01*SUN;
+{  1936} GHN2000+HV               =       G1N2000 +      GHO                                    :  0.100E+01*SUN;
+{  1937} GNO2000 +GHO                =       GND2000 +      GHO2                                   : ARR( 0.843E-12,     0., 0.0);
+{  1938} GNO2000 +GHO                =       G1N2000                                               : ARR( 0.220E-17,    85., 2.0);
+{  1939} GNO2000+HV               =       G1O2000 +      GNO2                                   :  0.100E+01*SUN;
+{  1940} GND2000 +GHO                =       G3N2000                                               : ARR( 0.418E-11,     0., 0.0);
+{  1941} GND2000 +GNO3               =       G3N2000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  1942} GND2000+HV               =       G1D2000 +      GNO2                                   :  0.100E+01*SUN;
+{  1943} GND2000+HV               =       GCH2O   +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  1944} GNN5005 +GHO                =       G2N500q                                               : ARR( 0.300E-12,     0., 0.0);
+{  1945} GNN5005 +GHO                =       G2N500r                                               : ARR( 0.150E-11,     0., 0.0);
+{  1946} GNN5005 +GHO                =       GNN500D +      GHO2                                   : ARR( 0.219E-11,     0., 0.0);
+{  1947} GNN5005+HV               =       G1N5005 +      GNO2                                   :  0.100E+01*SUN;
+{  1948} GNN5005+HV               =       G1N500s +      GNO2                                   :  0.100E+01*SUN;
+{  1949} G2N500q +GNO                =       G1N500t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1950} G2N500q +GNO                =       GNN500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1951} G2N500q +GHO2               =       GHN5015                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1952} G2N500q +GNO3               =       G1N500t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1953} G2N500q +MEPERO             =  0.340G1N500t + 0.330GNN500n + 0.330GNN500X                 : ARR( 0.565E-13,  -845., 0.0);
+{  1954} G2N500q +PERO1              =  0.460G1N500t + 0.270GNN500n + 0.270GNN500X                 : ARR( 0.434E-13,  -900., 0.0);
+{  1955} G2N500q +PERO2              =  0.400G1N500t + 0.300GNN500n + 0.300GNN500X                 : ARR( 0.162E-13, -1400., 0.0);
+{  1956} G2N500q +PERO3              =  0.460G1N500t + 0.270GNN500n + 0.270GNN500X                 : ARR( 0.488E-13, -1250., 0.0);
+{  1957} G2N500q +PERO5              =  0.460G1N500t + 0.270GNN500n + 0.270GNN500X                 : ARR( 0.183E-11,   450., 0.0);
+{  1958} G2N500q +PERO6              =  0.300G1N500t + 0.350GNN500n + 0.350GNN500X                 : ARR( 0.168E-13, -1300., 0.0);
+{  1959} G2N500q +PERO9              =  0.650G1N500t + 0.350GNN500X                                : ARR( 0.100E-10,     0., 0.0);
+{  1960} G2N500r +GNO                =       G1N500u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1961} G2N500r +GNO                =       GNN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1962} G2N500r +GHO2               =       GHN5016                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1963} G2N500r +GNO3               =       G1N500u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1964} G2N500r +MEPERO             =  0.340G1N500u + 0.330GNN500o + 0.330GNN500p                 : ARR( 0.565E-13,  -845., 0.0);
+{  1965} G2N500r +PERO1              =  0.460G1N500u + 0.270GNN500o + 0.270GNN500p                 : ARR( 0.434E-13,  -900., 0.0);
+{  1966} G2N500r +PERO2              =  0.400G1N500u + 0.300GNN500o + 0.300GNN500p                 : ARR( 0.162E-13, -1400., 0.0);
+{  1967} G2N500r +PERO3              =  0.460G1N500u + 0.270GNN500o + 0.270GNN500p                 : ARR( 0.488E-13, -1250., 0.0);
+{  1968} G2N500r +PERO5              =  0.460G1N500u + 0.270GNN500o + 0.270GNN500p                 : ARR( 0.183E-11,   450., 0.0);
+{  1969} G2N500r +PERO6              =  0.300G1N500u + 0.350GNN500o + 0.350GNN500p                 : ARR( 0.168E-13, -1300., 0.0);
+{  1970} G2N500r +PERO9              =  0.650G1N500u + 0.350GNN500p                                : ARR( 0.100E-10,     0., 0.0);
+{  1971} G1N500s                     =       G2N500s                                               : ARR( 0.160E+12,  3719., 0.0);
+{  1972} G1N500s                     =       GND4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  1973} G1N500t                     =       GND500D +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  1974} G1N500t                     =       G2N3003 +      GND2000                                : ARR( 0.200E+15,  6983., 0.0);
+{  1975} G1N500u                     =       GND2000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  1976} G2N500s +GNO                =       G1N500v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1977} G2N500s +GNO                =       GNN500k                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1978} G2N500s +GHO2               =       GHN500w                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1979} G2N500s +GNO3               =       G1N500v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1980} G2N500s +MEPERO             =  0.340G1N500v + 0.330GNO500G + 0.330GNK500P                 : ARR( 0.565E-13,  -845., 0.0);
+{  1981} G2N500s +PERO1              =  0.460G1N500v + 0.270GNO500G + 0.270GNK500P                 : ARR( 0.434E-13,  -900., 0.0);
+{  1982} G2N500s +PERO2              =  0.400G1N500v + 0.300GNO500G + 0.300GNK500P                 : ARR( 0.162E-13, -1400., 0.0);
+{  1983} G2N500s +PERO3              =  0.460G1N500v + 0.270GNO500G + 0.270GNK500P                 : ARR( 0.488E-13, -1250., 0.0);
+{  1984} G2N500s +PERO5              =  0.460G1N500v + 0.270GNO500G + 0.270GNK500P                 : ARR( 0.183E-11,   450., 0.0);
+{  1985} G2N500s +PERO6              =  0.300G1N500v + 0.350GNO500G + 0.350GNK500P                 : ARR( 0.168E-13, -1300., 0.0);
+{  1986} G2N500s +PERO9              =  0.650G1N500v + 0.350GNK500P                                : ARR( 0.100E-10,     0., 0.0);
+{  1987} G1N500v                     =       GND500D +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  1988} GHN5005 +GHO                =       GHN5017 +      GHO2                                   : ARR( 0.208E-11,     0., 0.0);
+{  1989} GHN5005 +GHO                =       G2H500D                                               : ARR( 0.142E-11,     0., 0.0);
+{  1990} GHN5005 +GHO                =       G2H500E                                               : ARR( 0.142E-11,     0., 0.0);
+{  1991} GHN5005 +GHO                =       GND5001 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  1992} GHN5005 +GHO                =       G2N5005                                               : ARR( 0.191E-11,  -190., 0.0);
+{  1993} GHN5005+HV               =       G1H500I +      GNO2                                   :  0.100E+01*SUN;
+{  1994} GHN5005+HV               =       G1N5005 +      GHO                                    :  0.100E+01*SUN;
+{  1995} G2H500D +GNO                =       G1H500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  1996} G2H500D +GNO                =       GHN500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{  1997} G2H500D +GHO2               =       GHH500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  1998} G2H500D +GNO3               =       G1H500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  1999} G2H500D +MEPERO             =  0.340G1H500J + 0.330GHN5018 + 0.330GHN5019                 : ARR( 0.565E-13,  -845., 0.0);
+{  2000} G2H500D +PERO1              =  0.460G1H500J + 0.270GHN5018 + 0.270GHN5019                 : ARR( 0.434E-13,  -900., 0.0);
+{  2001} G2H500D +PERO2              =  0.400G1H500J + 0.300GHN5018 + 0.300GHN5019                 : ARR( 0.162E-13, -1400., 0.0);
+{  2002} G2H500D +PERO3              =  0.460G1H500J + 0.270GHN5018 + 0.270GHN5019                 : ARR( 0.488E-13, -1250., 0.0);
+{  2003} G2H500D +PERO5              =  0.460G1H500J + 0.270GHN5018 + 0.270GHN5019                 : ARR( 0.183E-11,   450., 0.0);
+{  2004} G2H500D +PERO6              =  0.300G1H500J + 0.350GHN5018 + 0.350GHN5019                 : ARR( 0.168E-13, -1300., 0.0);
+{  2005} G2H500D +PERO9              =  0.650G1H500J + 0.350GHN5019                                : ARR( 0.100E-10,     0., 0.0);
+{  2006} G2H500E +GNO                =       G1H500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2007} G2H500E +GNO                =       GHN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2008} G2H500E +GHO2               =       GHH500E                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2009} G2H500E +GNO3               =       G1H500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2010} G2H500E +MEPERO             =  0.340G1H500K + 0.330GHN501A + 0.330GHN500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{  2011} G2H500E +PERO1              =  0.460G1H500K + 0.270GHN501A + 0.270GHN500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{  2012} G2H500E +PERO2              =  0.400G1H500K + 0.300GHN501A + 0.300GHN500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{  2013} G2H500E +PERO3              =  0.460G1H500K + 0.270GHN501A + 0.270GHN500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{  2014} G2H500E +PERO5              =  0.460G1H500K + 0.270GHN501A + 0.270GHN500Z                 : ARR( 0.183E-11,   450., 0.0);
+{  2015} G2H500E +PERO6              =  0.300G1H500K + 0.350GHN501A + 0.350GHN500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{  2016} G2H500E +PERO9              =  0.650G1H500K + 0.350GHN500Z                                : ARR( 0.100E-10,     0., 0.0);
+{  2017} G1H500I                     =       G2H500F                                               : ARR( 0.160E+12,  3000., 0.0);
+{  2018} G1H500I                     =       GHD4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  2019} G1H500J                     =       GND2000 +      GHD3000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  2020} G1H500K                     =       GHD5007 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  2021} G1H500K                     =       G2N3003 +      GHD2000                                : ARR( 0.200E+15,  6985., 0.0);
+{  2022} G1H500K                     =       GND4003 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  2023} G2H500F +GNO                =       G1H500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2024} G2H500F +GNO                =       GHN501B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2025} G2H500F +GHO2               =       GHH500F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2026} G2H500F +GNO3               =       G1H500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2027} G2H500F +MEPERO             =  0.340G1H500L + 0.330GHO500E + 0.330GHK500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  2028} G2H500F +PERO1              =  0.460G1H500L + 0.270GHO500E + 0.270GHK500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  2029} G2H500F +PERO2              =  0.400G1H500L + 0.300GHO500E + 0.300GHK500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  2030} G2H500F +PERO3              =  0.460G1H500L + 0.270GHO500E + 0.270GHK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  2031} G2H500F +PERO5              =  0.460G1H500L + 0.270GHO500E + 0.270GHK500C                 : ARR( 0.183E-11,   450., 0.0);
+{  2032} G2H500F +PERO6              =  0.300G1H500L + 0.350GHO500E + 0.350GHK500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  2033} G2H500F +PERO9              =  0.650G1H500L + 0.350GHK500C                                : ARR( 0.100E-10,     0., 0.0);
+{  2034} G1H500L                     =       GHD5007 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  2035} GND5001 +GHO                =       GND500C +      GHO2                                   : ARR( 0.214E-11,     0., 0.0);
+{  2036} GND5001 +GHO                =       G2N500t                                               : ARR( 0.465E-11,     0., 0.0);
+{  2037} GND5001 +GHO                =       G3N5001                                               : ARR( 0.216E-10,     0., 0.0);
+{  2038} GND5001 +GNO3               =       G3N5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2039} GND5001+HV               =       G1D5004 +      GNO2                                   :  0.100E+01*SUN;
+{  2040} GND5001+HV               =       G2N4001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2041} GND5001+HV               =       GNK3000 +      GD02000                                :  0.100E+01*SUN;
+{  2042} G2N500t +GNO                =       G1N500w +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2043} G2N500t +GNO                =       GNN500f                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2044} G2N500t +GHO2               =       GHN501C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2045} G2N500t +GNO3               =       G1N500w +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2046} G2N500t +MEPERO             =  0.340G1N500w + 0.330GND500E + 0.330GND500F                 : ARR( 0.565E-13,  -845., 0.0);
+{  2047} G2N500t +PERO1              =  0.460G1N500w + 0.270GND500E + 0.270GND500F                 : ARR( 0.434E-13,  -900., 0.0);
+{  2048} G2N500t +PERO2              =  0.400G1N500w + 0.300GND500E + 0.300GND500F                 : ARR( 0.162E-13, -1400., 0.0);
+{  2049} G2N500t +PERO3              =  0.460G1N500w + 0.270GND500E + 0.270GND500F                 : ARR( 0.488E-13, -1250., 0.0);
+{  2050} G2N500t +PERO5              =  0.460G1N500w + 0.270GND500E + 0.270GND500F                 : ARR( 0.183E-11,   450., 0.0);
+{  2051} G2N500t +PERO6              =  0.300G1N500w + 0.350GND500E + 0.350GND500F                 : ARR( 0.168E-13, -1300., 0.0);
+{  2052} G2N500t +PERO9              =  0.650G1N500w + 0.350GND500F                                : ARR( 0.100E-10,     0., 0.0);
+{  2053} G3N5001 +GHO2               =  0.800GGN5001 + 0.200GAN5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2054} G3N5001 +GNO                =       G2N4001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2055} G3N5001 +GNO2               =       GPN5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2056} G3N5001 +GNO3               =       G2N4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2057} G3N5001 +MEPERO             =  0.685G2N4001 + 0.315GAN5001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2058} G3N5001 +PERO1              =  0.800G2N4001 + 0.200GAN5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2059} G3N5001 +PERO2              =  0.750G2N4001 + 0.250GAN5001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2060} G3N5001 +PERO3              =  0.800G2N4001 + 0.200GAN5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2061} G3N5001 +PERO5              =  0.650G2N4001 + 0.350GAN5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2062} G3N5001 +PERO6              =  0.650G2N4001 + 0.350GAN5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2063} G3N5001 +PERO9              =       G2N4001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2064} G1D5004                     =       G2D5003                                               : ARR( 0.160E+12,  3221., 0.0);
+{  2065} G1D5004                     =       GDD4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  2066} G2N4001 +GNO                =       G1N4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2067} G2N4001 +GNO                =       GNN4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2068} G2N4001 +GHO2               =       GHN4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2069} G2N4001 +GNO3               =       G1N4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2070} G2N4001 +MEPERO             =  0.480G1N4001 + 0.260GNO4002 + 0.260GND4003                 : ARR( 0.146E-12,  -445., 0.0);
+{  2071} G2N4001 +PERO1              =  0.600G1N4001 + 0.200GNO4002 + 0.200GND4003                 : ARR( 0.112E-12,  -500., 0.0);
+{  2072} G2N4001 +PERO2              =  0.560G1N4001 + 0.220GNO4002 + 0.220GND4003                 : ARR( 0.418E-13, -1000., 0.0);
+{  2073} G2N4001 +PERO3              =  0.600G1N4001 + 0.200GNO4002 + 0.200GND4003                 : ARR( 0.126E-12,  -850., 0.0);
+{  2074} G2N4001 +PERO5              =  0.600G1N4001 + 0.200GNO4002 + 0.200GND4003                 : ARR( 0.473E-11,   850., 0.0);
+{  2075} G2N4001 +PERO6              =  0.460G1N4001 + 0.270GNO4002 + 0.270GND4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  2076} G2N4001 +PERO9              =  0.800G1N4001 + 0.200GND4003                                : ARR( 0.100E-10,     0., 0.0);
+{  2077} G1N500w                     =       GND2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{  2078} G2D5003 +GNO                =       G1D5005 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2079} G2D5003 +GNO                =       GND500B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2080} G2D5003 +GHO2               =       GHD5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2081} G2D5003 +GNO3               =       G1D5005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2082} G2D5003 +MEPERO             =  0.340G1D5005 + 0.330GDO5004 + 0.330GDK5005                 : ARR( 0.565E-13,  -845., 0.0);
+{  2083} G2D5003 +PERO1              =  0.460G1D5005 + 0.270GDO5004 + 0.270GDK5005                 : ARR( 0.434E-13,  -900., 0.0);
+{  2084} G2D5003 +PERO2              =  0.400G1D5005 + 0.300GDO5004 + 0.300GDK5005                 : ARR( 0.162E-13, -1400., 0.0);
+{  2085} G2D5003 +PERO3              =  0.460G1D5005 + 0.270GDO5004 + 0.270GDK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  2086} G2D5003 +PERO5              =  0.460G1D5005 + 0.270GDO5004 + 0.270GDK5005                 : ARR( 0.183E-11,   450., 0.0);
+{  2087} G2D5003 +PERO6              =  0.300G1D5005 + 0.350GDO5004 + 0.350GDK5005                 : ARR( 0.168E-13, -1300., 0.0);
+{  2088} G2D5003 +PERO9              =  0.650G1D5005 + 0.350GDK5005                                : ARR( 0.100E-10,     0., 0.0);
+{  2089} G1N4001 +OXYGEN             =       GND4003 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  2090} G1N4001                     =       GDO4003 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  2091} G1D5005                     =       GDD5001 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  2092} G1D5005                     =       GDO4002 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  2093} GHN5006 +GHO                =       GND5002 +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{  2094} GHN5006 +GHO                =       G2N500A                                               : ARR( 0.198E-11,  -190., 0.0);
+{  2095} GHN5006+HV               =       G1H5000 +      GNO2                                   :  0.100E+01*SUN;
+{  2096} GHN5006+HV               =       G1N500A +      GHO                                    :  0.100E+01*SUN;
+{  2097} GHH5000 +GHO                =       GHK5000 +      GHO                                    : ARR( 0.430E-10,     0., 0.0);
+{  2098} GHH5000 +GHO                =       GHD5001 +      GHO                                    : ARR( 0.168E-10,     0., 0.0);
+{  2099} GHH5000 +GHO                =       G2H5000                                               : ARR( 0.198E-11,  -190., 0.0);
+{  2100} GHH5000 +GHO                =       G2H500G                                               : ARR( 0.198E-11,  -190., 0.0);
+{  2101} GHH5000+HV               =       G1H5000 +      GHO                                    :  0.100E+01*SUN;
+{  2102} GHH5000+HV               =       G1H5008 +      GHO                                    :  0.100E+01*SUN;
+{  2103} G2H500G +GNO                =       G1H5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2104} G2H500G +GNO                =       GHN5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2105} G2H500G +GHO2               =       GHH5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2106} G2H500G +GNO3               =       G1H5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2107} G2H500G +MEPERO             =  0.480G1H5008 + 0.260GHO5005 + 0.260GHD5001                 : ARR( 0.146E-12,  -445., 0.0);
+{  2108} G2H500G +PERO1              =  0.600G1H5008 + 0.200GHO5005 + 0.200GHD5001                 : ARR( 0.112E-12,  -500., 0.0);
+{  2109} G2H500G +PERO2              =  0.560G1H5008 + 0.220GHO5005 + 0.220GHD5001                 : ARR( 0.418E-13, -1000., 0.0);
+{  2110} G2H500G +PERO3              =  0.600G1H5008 + 0.200GHO5005 + 0.200GHD5001                 : ARR( 0.126E-12,  -850., 0.0);
+{  2111} G2H500G +PERO5              =  0.600G1H5008 + 0.200GHO5005 + 0.200GHD5001                 : ARR( 0.473E-11,   850., 0.0);
+{  2112} G2H500G +PERO6              =  0.460G1H5008 + 0.270GHO5005 + 0.270GHD5001                 : ARR( 0.434E-13,  -900., 0.0);
+{  2113} G2H500G +PERO9              =  0.800G1H5008 + 0.200GHD5001                                : ARR( 0.100E-10,     0., 0.0);
+{  2114} GHO5002 +GHO                =       GHK5000 +      GHO2                                   : ARR( 0.113E-10,     0., 0.0);
+{  2115} GHO5002 +GHO                =       GDO5002 +      GHO                                    : ARR( 0.176E-10,     0., 0.0);
+{  2116} GHO5002 +GHO                =       G2O500G                                               : ARR( 0.208E-11,  -190., 0.0);
+{  2117} GHO5002+HV               =       G1O500E +      GHO                                    :  0.100E+01*SUN;
+{  2118} G2O500G +GNO                =       G1O500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2119} G2O500G +GNO                =       GNO5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2120} G2O500G +GHO2               =       GHO5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2121} G2O500G +GNO3               =       G1O500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2122} G2O500G +MEPERO             =  0.480G1O500E + 0.260GOO5001 + 0.260GDO5002                 : ARR( 0.146E-12,  -445., 0.0);
+{  2123} G2O500G +PERO1              =  0.600G1O500E + 0.200GOO5001 + 0.200GDO5002                 : ARR( 0.112E-12,  -500., 0.0);
+{  2124} G2O500G +PERO2              =  0.560G1O500E + 0.220GOO5001 + 0.220GDO5002                 : ARR( 0.418E-13, -1000., 0.0);
+{  2125} G2O500G +PERO3              =  0.600G1O500E + 0.200GOO5001 + 0.200GDO5002                 : ARR( 0.126E-12,  -850., 0.0);
+{  2126} G2O500G +PERO5              =  0.600G1O500E + 0.200GOO5001 + 0.200GDO5002                 : ARR( 0.473E-11,   850., 0.0);
+{  2127} G2O500G +PERO6              =  0.460G1O500E + 0.270GOO5001 + 0.270GDO5002                 : ARR( 0.434E-13,  -900., 0.0);
+{  2128} G2O500G +PERO9              =  0.800G1O500E + 0.200GDO5002                                : ARR( 0.100E-10,     0., 0.0);
+{  2129} GHK5000 +GHO                =       GDK5000 +      GHO                                    : ARR( 0.530E-10,     0., 0.0);
+{  2130} GHK5000 +GHO                =       G2K5003                                               : ARR( 0.197E-11,  -190., 0.0);
+{  2131} GHK5000+HV               =       G3K3000 +      G2H2000                                :  0.100E+01*SUN;
+{  2132} GHK5000+HV               =       G1K5003 +      GHO                                    :  0.100E+01*SUN;
+{  2133} GHN5007 +GHO                =       G2H500H                                               : ARR( 0.123E-11,     0., 0.0);
+{  2134} GHN5007 +GHO                =       GND500G +      GHO                                    : ARR( 0.345E-11,     0., 0.0);
+{  2135} GHN5007 +GHO                =       G2N500u                                               : ARR( 0.204E-11,  -190., 0.0);
+{  2136} GHN5007+HV               =       G1H5001 +      GNO2                                   :  0.100E+01*SUN;
+{  2137} GHN5007+HV               =       G1N500c +      GHO                                    :  0.100E+01*SUN;
+{  2138} G2H500H +GNO                =       G1H500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2139} G2H500H +GNO                =       GHN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2140} G2H500H +GHO2               =       GHH500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2141} G2H500H +GNO3               =       G1H500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2142} G2H500H +MEPERO             =  0.480G1H500M + 0.260GHN500C + 0.260GHN501E                 : ARR( 0.616E-11,   905., 0.0);
+{  2143} G2H500H +PERO1              =  0.600G1H500M + 0.200GHN500C + 0.200GHN501E                 : ARR( 0.473E-11,   850., 0.0);
+{  2144} G2H500H +PERO2              =  0.560G1H500M + 0.220GHN500C + 0.220GHN501E                 : ARR( 0.177E-11,   350., 0.0);
+{  2145} G2H500H +PERO3              =  0.600G1H500M + 0.200GHN500C + 0.200GHN501E                 : ARR( 0.533E-11,   500., 0.0);
+{  2146} G2H500H +PERO5              =  0.600G1H500M + 0.200GHN500C + 0.200GHN501E                 : ARR( 0.200E-09,  2200., 0.0);
+{  2147} G2H500H +PERO6              =  0.460G1H500M + 0.270GHN500C + 0.270GHN501E                 : ARR( 0.183E-11,   450., 0.0);
+{  2148} G2H500H +PERO9              =  0.800G1H500M + 0.200GHN501E                                : ARR( 0.100E-10,     0., 0.0);
+{  2149} G2N500u +GNO                =       G1N500c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2150} G2N500u +GNO                =       GNN5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2151} G2N500u +GHO2               =       GHN5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2152} G2N500u +GNO3               =       G1N500c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2153} G2N500u +MEPERO             =  0.480G1N500c + 0.260GNO5007 + 0.260GND500G                 : ARR( 0.164E-12,  -795., 0.0);
+{  2154} G2N500u +PERO1              =  0.600G1N500c + 0.200GNO5007 + 0.200GND500G                 : ARR( 0.126E-12,  -850., 0.0);
+{  2155} G2N500u +PERO2              =  0.560G1N500c + 0.220GNO5007 + 0.220GND500G                 : ARR( 0.471E-13, -1350., 0.0);
+{  2156} G2N500u +PERO3              =  0.600G1N500c + 0.200GNO5007 + 0.200GND500G                 : ARR( 0.142E-12, -1200., 0.0);
+{  2157} G2N500u +PERO5              =  0.600G1N500c + 0.200GNO5007 + 0.200GND500G                 : ARR( 0.533E-11,   500., 0.0);
+{  2158} G2N500u +PERO6              =  0.460G1N500c + 0.270GNO5007 + 0.270GND500G                 : ARR( 0.488E-13, -1250., 0.0);
+{  2159} G2N500u +PERO9              =  0.800G1N500c + 0.200GND500G                                : ARR( 0.100E-10,     0., 0.0);
+{  2160} G1H500M                     =       GND5004 +      GHO                                    : ARR( 0.160E+12,  2905., 0.0);
+{  2161} GHH5001 +GHO                =       GHK5001 +      GHO                                    : ARR( 0.430E-10,     0., 0.0);
+{  2162} GHH5001 +GHO                =       GHD5008 +      GHO                                    : ARR( 0.168E-10,     0., 0.0);
+{  2163} GHH5001 +GHO                =       G2H5001                                               : ARR( 0.198E-11,  -190., 0.0);
+{  2164} GHH5001 +GHO                =       G2H500I                                               : ARR( 0.198E-11,  -190., 0.0);
+{  2165} GHH5001+HV               =       G1H5001 +      GHO                                    :  0.100E+01*SUN;
+{  2166} GHH5001+HV               =       G1H500A +      GHO                                    :  0.100E+01*SUN;
+{  2167} G2H500I +GNO                =       G1H500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2168} G2H500I +GNO                =       GHN5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2169} G2H500I +GHO2               =       GHH5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2170} G2H500I +GNO3               =       G1H500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2171} G2H500I +MEPERO             =  0.480G1H500A + 0.260GHO5006 + 0.260GHD5008                 : ARR( 0.164E-12,  -795., 0.0);
+{  2172} G2H500I +PERO1              =  0.600G1H500A + 0.200GHO5006 + 0.200GHD5008                 : ARR( 0.126E-12,  -850., 0.0);
+{  2173} G2H500I +PERO2              =  0.560G1H500A + 0.220GHO5006 + 0.220GHD5008                 : ARR( 0.471E-13, -1350., 0.0);
+{  2174} G2H500I +PERO3              =  0.600G1H500A + 0.200GHO5006 + 0.200GHD5008                 : ARR( 0.142E-12, -1200., 0.0);
+{  2175} G2H500I +PERO5              =  0.600G1H500A + 0.200GHO5006 + 0.200GHD5008                 : ARR( 0.533E-11,   500., 0.0);
+{  2176} G2H500I +PERO6              =  0.460G1H500A + 0.270GHO5006 + 0.270GHD5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  2177} G2H500I +PERO9              =  0.800G1H500A + 0.200GHD5008                                : ARR( 0.100E-10,     0., 0.0);
+{  2178} GHO5003 +GHO                =       GHK5001 +      GHO2                                   : ARR( 0.113E-10,     0., 0.0);
+{  2179} GHO5003 +GHO                =       GDO5007 +      GHO                                    : ARR( 0.176E-10,     0., 0.0);
+{  2180} GHO5003 +GHO                =       G2O500H                                               : ARR( 0.208E-11,  -190., 0.0);
+{  2181} GHO5003+HV               =       G1O500G +      GHO                                    :  0.100E+01*SUN;
+{  2182} G2O500H +GNO                =       G1O500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2183} G2O500H +GNO                =       GNO5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2184} G2O500H +GHO2               =       GHO5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2185} G2O500H +GNO3               =       G1O500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2186} G2O500H +MEPERO             =  0.480G1O500G + 0.260GOO5002 + 0.260GDO5007                 : ARR( 0.164E-12,  -795., 0.0);
+{  2187} G2O500H +PERO1              =  0.600G1O500G + 0.200GOO5002 + 0.200GDO5007                 : ARR( 0.126E-12,  -850., 0.0);
+{  2188} G2O500H +PERO2              =  0.560G1O500G + 0.220GOO5002 + 0.220GDO5007                 : ARR( 0.471E-13, -1350., 0.0);
+{  2189} G2O500H +PERO3              =  0.600G1O500G + 0.200GOO5002 + 0.200GDO5007                 : ARR( 0.142E-12, -1200., 0.0);
+{  2190} G2O500H +PERO5              =  0.600G1O500G + 0.200GOO5002 + 0.200GDO5007                 : ARR( 0.533E-11,   500., 0.0);
+{  2191} G2O500H +PERO6              =  0.460G1O500G + 0.270GOO5002 + 0.270GDO5007                 : ARR( 0.488E-13, -1250., 0.0);
+{  2192} G2O500H +PERO9              =  0.800G1O500G + 0.200GDO5007                                : ARR( 0.100E-10,     0., 0.0);
+{  2193} GHK5001 +GHO                =       G2H500J                                               : ARR( 0.386E-11,     0., 0.0);
+{  2194} GHK5001 +GHO                =       GDK5006 +      GHO                                    : ARR( 0.104E-10,     0., 0.0);
+{  2195} GHK5001 +GHO                =       G2K5008                                               : ARR( 0.201E-11,  -190., 0.0);
+{  2196} GHK5001+HV               =       G3K4001 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  2197} GHK5001+HV               =       GU02000 +      GHK3000                                :  0.100E+01*SUN;
+{  2198} GHK5001+HV               =       G1K5009 +      GHO                                    :  0.100E+01*SUN;
+{  2199} G2H500J +GNO                =       G1H500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2200} G2H500J +GNO                =       GHN501F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2201} G2H500J +GHO2               =       GHH500H                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2202} G2H500J +GNO3               =       G1H500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2203} G2H500J +MEPERO             =  0.480G1H500N + 0.260GHK5005 + 0.260GHK500D                 : ARR( 0.616E-11,   905., 0.0);
+{  2204} G2H500J +PERO1              =  0.600G1H500N + 0.200GHK5005 + 0.200GHK500D                 : ARR( 0.473E-11,   850., 0.0);
+{  2205} G2H500J +PERO2              =  0.560G1H500N + 0.220GHK5005 + 0.220GHK500D                 : ARR( 0.177E-11,   350., 0.0);
+{  2206} G2H500J +PERO3              =  0.600G1H500N + 0.200GHK5005 + 0.200GHK500D                 : ARR( 0.533E-11,   500., 0.0);
+{  2207} G2H500J +PERO5              =  0.600G1H500N + 0.200GHK5005 + 0.200GHK500D                 : ARR( 0.200E-09,  2200., 0.0);
+{  2208} G2H500J +PERO6              =  0.460G1H500N + 0.270GHK5005 + 0.270GHK500D                 : ARR( 0.183E-11,   450., 0.0);
+{  2209} G2H500J +PERO9              =  0.800G1H500N + 0.200GHK500D                                : ARR( 0.100E-10,     0., 0.0);
+{  2210} G2K5008 +GNO                =       G1K5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2211} G2K5008 +GNO                =       GNK5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2212} G2K5008 +GHO2               =       GHK5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2213} G2K5008 +GNO3               =       G1K5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2214} G2K5008 +MEPERO             =  0.480G1K5009 + 0.260GKO5002 + 0.260GDK5006                 : ARR( 0.164E-12,  -795., 0.0);
+{  2215} G2K5008 +PERO1              =  0.600G1K5009 + 0.200GKO5002 + 0.200GDK5006                 : ARR( 0.126E-12,  -850., 0.0);
+{  2216} G2K5008 +PERO2              =  0.560G1K5009 + 0.220GKO5002 + 0.220GDK5006                 : ARR( 0.471E-13, -1350., 0.0);
+{  2217} G2K5008 +PERO3              =  0.600G1K5009 + 0.200GKO5002 + 0.200GDK5006                 : ARR( 0.142E-12, -1200., 0.0);
+{  2218} G2K5008 +PERO5              =  0.600G1K5009 + 0.200GKO5002 + 0.200GDK5006                 : ARR( 0.533E-11,   500., 0.0);
+{  2219} G2K5008 +PERO6              =  0.460G1K5009 + 0.270GKO5002 + 0.270GDK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  2220} G2K5008 +PERO9              =  0.800G1K5009 + 0.200GDK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  2221} G1H500N                     =       GDK5001 +      GHO                                    : ARR( 0.160E+12,  4168., 0.0);
+{  2222} G1H500N                     =       GD02000 +      G2H3002                                : ARR( 0.200E+15,  7034., 0.0);
+{  2223} G2H3002 +GNO                =       G1H3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  2224} G2H3002 +GNO                =       GHN3008                                               : ARR( 0.622E-13,  -360., 0.0);
+{  2225} G2H3002 +GHO2               =       GHH3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{  2226} G2H3002 +GNO3               =       G1H3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2227} G2H3002 +MEPERO             =  0.480G1H3003 + 0.260GHK3001 + 0.260GHD3001                 : ARR( 0.164E-12,  -795., 0.0);
+{  2228} G2H3002 +PERO1              =  0.600G1H3003 + 0.200GHK3001 + 0.200GHD3001                 : ARR( 0.126E-12,  -850., 0.0);
+{  2229} G2H3002 +PERO2              =  0.560G1H3003 + 0.220GHK3001 + 0.220GHD3001                 : ARR( 0.471E-13, -1350., 0.0);
+{  2230} G2H3002 +PERO3              =  0.600G1H3003 + 0.200GHK3001 + 0.200GHD3001                 : ARR( 0.142E-12, -1200., 0.0);
+{  2231} G2H3002 +PERO5              =  0.600G1H3003 + 0.200GHK3001 + 0.200GHD3001                 : ARR( 0.533E-11,   500., 0.0);
+{  2232} G2H3002 +PERO6              =  0.460G1H3003 + 0.270GHK3001 + 0.270GHD3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  2233} G2H3002 +PERO9              =  0.800G1H3003 + 0.200GHD3001                                : ARR( 0.100E-10,     0., 0.0);
+{  2234} G1H3003                     =       G3H2000 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{  2235} G3H2000 +GHO2               =  0.800GGH2000 + 0.200GAH2000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2236} G3H2000 +GNO                =       GCH2O   +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  2237}  G3H2000 + GNO2       +M       =       GPH2000         +M                                    : FALL( 0.110E-10,     0.,-1.0, 0.850E-28,     0.,-6.5,0.60);
+{  2238} G3H2000 +GNO3               =       GCH2O   +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  2239} G3H2000 +MEPERO             =  0.685GCH2O   + 0.315GAH2000 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2240} G3H2000 +PERO1              =  0.800GCH2O   + 0.200GAH2000 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2241} G3H2000 +PERO2              =  0.750GCH2O   + 0.250GAH2000 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2242} G3H2000 +PERO3              =  0.800GCH2O   + 0.200GAH2000 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2243} G3H2000 +PERO5              =  0.650GCH2O   + 0.350GAH2000 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2244} G3H2000 +PERO6              =  0.650GCH2O   + 0.350GAH2000 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2245} G3H2000 +PERO9              =       GCH2O   +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  2246} GHD3000 +GHO                =       GDD3000 +      GHO                                    : ARR( 0.542E-10,     0., 0.0);
+{  2247} GHD3000 +GHO                =       G3H3000                                               : ARR( 0.221E-10,     0., 0.0);
+{  2248} GHD3000 +GNO3               =       G3H3000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2249} GHD3000+HV               =       G1D3000 +      GHO                                    :  0.100E+01*SUN;
+{  2250} GHD3000+HV               =       G2H2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2251} G3H3000 +GHO2               =  0.800GGH3000 + 0.200GAH3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2252} G3H3000 +GNO                =       G2H2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2253} G3H3000 +GNO2               =       GPH3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2254} G3H3000 +GNO3               =       G2H2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2255} G3H3000 +MEPERO             =  0.685G2H2000 + 0.315GAH3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2256} G3H3000 +PERO1              =  0.800G2H2000 + 0.200GAH3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2257} G3H3000 +PERO2              =  0.750G2H2000 + 0.250GAH3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2258} G3H3000 +PERO3              =  0.800G2H2000 + 0.200GAH3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2259} G3H3000 +PERO5              =  0.650G2H2000 + 0.350GAH3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2260} G3H3000 +PERO6              =  0.650G2H2000 + 0.350GAH3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2261} G3H3000 +PERO9              =       G2H2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2262} GD04000 +GHO                =       G2D4000                                               : ARR( 0.785E-12,  -446., 0.0);
+{  2263} GD04000 +GHO                =       G3K4001                                               : ARR( 0.448E-11,  -446., 0.0);
+{  2264} GD04000 +GNO3               =       G3K4001 +      GHNO3                                  : ARR( 0.117E-13,     0., 0.0);
+{  2265} GD04000+HV               =       G203000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2266} GD04000+HV               =       GU02000 +      GD02000                                :  0.100E+01*SUN;
+{  2267} G2D4000 +GNO                =       G1D4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2268} G2D4000 +GNO                =       GND4000                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2269} G2D4000 +GHO2               =       GHD4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2270} G2D4000 +GNO3               =       G1D4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2271} G2D4000 +MEPERO             =  0.480G1D4000 + 0.260GDO4001 + 0.260GDK4000                 : ARR( 0.616E-11,   905., 0.0);
+{  2272} G2D4000 +PERO1              =  0.600G1D4000 + 0.200GDO4001 + 0.200GDK4000                 : ARR( 0.473E-11,   850., 0.0);
+{  2273} G2D4000 +PERO2              =  0.560G1D4000 + 0.220GDO4001 + 0.220GDK4000                 : ARR( 0.177E-11,   350., 0.0);
+{  2274} G2D4000 +PERO3              =  0.600G1D4000 + 0.200GDO4001 + 0.200GDK4000                 : ARR( 0.533E-11,   500., 0.0);
+{  2275} G2D4000 +PERO5              =  0.600G1D4000 + 0.200GDO4001 + 0.200GDK4000                 : ARR( 0.200E-09,  2200., 0.0);
+{  2276} G2D4000 +PERO6              =  0.460G1D4000 + 0.270GDO4001 + 0.270GDK4000                 : ARR( 0.183E-11,   450., 0.0);
+{  2277} G2D4000 +PERO9              =  0.800G1D4000 + 0.200GDK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  2278} G1D4000                     =       GD02000 +      G2D2000                                : ARR( 0.200E+15,  7034., 0.0);
+{  2279} GHH2000 +GHO                =       GHD2000 +      GHO                                    : ARR( 0.322E-10,     0., 0.0);
+{  2280} GHH2000 +GHO                =       G2H2000                                               : ARR( 0.380E-11,  -190., 0.0);
+{  2281} GHH2000+HV               =       G1H2000 +      GHO                                    :  0.200E+01*SUN;
+{  2282} GHO2000 +GHO                =       GHD2000 +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{  2283} GHO2000 +GHO                =       GDO2000 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  2284} GHO2000 +GHO                =       G2O2000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  2285} GHO2000+HV               =       G1O2000 +      GHO                                    :  0.100E+01*SUN;
+{  2286} GHD2000 +GHO                =       GDD2000 +      GHO                                    : ARR( 0.981E-11,     0., 0.0);
+{  2287} GHD2000 +GHO                =       G3H2000                                               : ARR( 0.208E-10,     0., 0.0);
+{  2288} GHD2000 +GHO                =       G2D2000                                               : ARR( 0.190E-11,  -190., 0.0);
+{  2289} GHD2000 +GNO3               =       G3H2000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2290} GHD2000+HV               =       G1D2000 +      GHO                                    :  0.100E+01*SUN;
+{  2291} GHD2000+HV               =       GCH2O   +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{  2292} GHN5008 +GHO                =       GHN500O +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  2293} GHN5008 +GHO                =       GND500H +      GHO                                    : ARR( 0.171E-10,     0., 0.0);
+{  2294} GHN5008 +GHO                =       G2N500v                                               : ARR( 0.202E-11,  -190., 0.0);
+{  2295} GHN5008+HV               =       G1H5002 +      GNO2                                   :  0.100E+01*SUN;
+{  2296} GHN5008+HV               =       G1N500s +      GHO                                    :  0.100E+01*SUN;
+{  2297} G2N500v +GNO                =       G1N500s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2298} G2N500v +GNO                =       GNN5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2299} G2N500v +GHO2               =       GHN5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2300} G2N500v +GNO3               =       G1N500s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2301} G2N500v +MEPERO             =  0.480G1N500s + 0.260GNO5008 + 0.260GND500H                 : ARR( 0.164E-12,  -795., 0.0);
+{  2302} G2N500v +PERO1              =  0.600G1N500s + 0.200GNO5008 + 0.200GND500H                 : ARR( 0.126E-12,  -850., 0.0);
+{  2303} G2N500v +PERO2              =  0.560G1N500s + 0.220GNO5008 + 0.220GND500H                 : ARR( 0.471E-13, -1350., 0.0);
+{  2304} G2N500v +PERO3              =  0.600G1N500s + 0.200GNO5008 + 0.200GND500H                 : ARR( 0.142E-12, -1200., 0.0);
+{  2305} G2N500v +PERO5              =  0.600G1N500s + 0.200GNO5008 + 0.200GND500H                 : ARR( 0.533E-11,   500., 0.0);
+{  2306} G2N500v +PERO6              =  0.460G1N500s + 0.270GNO5008 + 0.270GND500H                 : ARR( 0.488E-13, -1250., 0.0);
+{  2307} G2N500v +PERO9              =  0.800G1N500s + 0.200GND500H                                : ARR( 0.100E-10,     0., 0.0);
+{  2308} GHH5002 +GHO                =       GHD5000 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{  2309} GHH5002 +GHO                =       GHH500I +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  2310} GHH5002 +GHO                =       GHD5009 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{  2311} GHH5002 +GHO                =       G2H5002                                               : ARR( 0.201E-11,  -190., 0.0);
+{  2312} GHH5002 +GHO                =       G2H500K                                               : ARR( 0.201E-11,  -190., 0.0);
+{  2313} GHH5002+HV               =       G1H5002 +      GHO                                    :  0.100E+01*SUN;
+{  2314} GHH5002+HV               =       G1H500I +      GHO                                    :  0.100E+01*SUN;
+{  2315} G2H500K +GNO                =       G1H500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2316} G2H500K +GNO                =       GHN5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2317} G2H500K +GHO2               =       GHH5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2318} G2H500K +GNO3               =       G1H500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2319} G2H500K +MEPERO             =  0.480G1H500I + 0.260GHO5007 + 0.260GHD5009                 : ARR( 0.164E-12,  -795., 0.0);
+{  2320} G2H500K +PERO1              =  0.600G1H500I + 0.200GHO5007 + 0.200GHD5009                 : ARR( 0.126E-12,  -850., 0.0);
+{  2321} G2H500K +PERO2              =  0.560G1H500I + 0.220GHO5007 + 0.220GHD5009                 : ARR( 0.471E-13, -1350., 0.0);
+{  2322} G2H500K +PERO3              =  0.600G1H500I + 0.200GHO5007 + 0.200GHD5009                 : ARR( 0.142E-12, -1200., 0.0);
+{  2323} G2H500K +PERO5              =  0.600G1H500I + 0.200GHO5007 + 0.200GHD5009                 : ARR( 0.533E-11,   500., 0.0);
+{  2324} G2H500K +PERO6              =  0.460G1H500I + 0.270GHO5007 + 0.270GHD5009                 : ARR( 0.488E-13, -1250., 0.0);
+{  2325} G2H500K +PERO9              =  0.800G1H500I + 0.200GHD5009                                : ARR( 0.100E-10,     0., 0.0);
+{  2326} GHO5004 +GHO                =       GHD5000 +      GHO2                                   : ARR( 0.439E-11,     0., 0.0);
+{  2327} GHO5004 +GHO                =       GHK5002 +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{  2328} GHO5004 +GHO                =       GDO5006 +      GHO                                    : ARR( 0.176E-10,     0., 0.0);
+{  2329} GHO5004 +GHO                =       G2O500I                                               : ARR( 0.207E-11,  -190., 0.0);
+{  2330} GHO5004+HV               =       G1O500I +      GHO                                    :  0.100E+01*SUN;
+{  2331} G2O500I +GNO                =       G1O500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2332} G2O500I +GNO                =       GNO5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2333} G2O500I +GHO2               =       GHO5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2334} G2O500I +GNO3               =       G1O500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2335} G2O500I +MEPERO             =  0.480G1O500I + 0.260GOO5003 + 0.260GDO5006                 : ARR( 0.164E-12,  -795., 0.0);
+{  2336} G2O500I +PERO1              =  0.600G1O500I + 0.200GOO5003 + 0.200GDO5006                 : ARR( 0.126E-12,  -850., 0.0);
+{  2337} G2O500I +PERO2              =  0.560G1O500I + 0.220GOO5003 + 0.220GDO5006                 : ARR( 0.471E-13, -1350., 0.0);
+{  2338} G2O500I +PERO3              =  0.600G1O500I + 0.200GOO5003 + 0.200GDO5006                 : ARR( 0.142E-12, -1200., 0.0);
+{  2339} G2O500I +PERO5              =  0.600G1O500I + 0.200GOO5003 + 0.200GDO5006                 : ARR( 0.533E-11,   500., 0.0);
+{  2340} G2O500I +PERO6              =  0.460G1O500I + 0.270GOO5003 + 0.270GDO5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  2341} G2O500I +PERO9              =  0.800G1O500I + 0.200GDO5006                                : ARR( 0.100E-10,     0., 0.0);
+{  2342} GHD5000 +GHO                =       GDD5000 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{  2343} GHD5000 +GHO                =       GHD500A +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{  2344} GHD5000 +GHO                =       G2H500L                                               : ARR( 0.456E-11,     0., 0.0);
+{  2345} GHD5000 +GHO                =       G3H5000                                               : ARR( 0.212E-10,     0., 0.0);
+{  2346} GHD5000 +GHO                =       G2D5004                                               : ARR( 0.193E-11,  -190., 0.0);
+{  2347} GHD5000 +GNO3               =       G3H5000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2348} GHD5000+HV               =       G1D5004 +      GHO                                    :  0.100E+01*SUN;
+{  2349} GHD5000+HV               =       G2H4000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2350} GHD5000+HV               =       GHK3000 +      GD02000                                :  0.100E+01*SUN;
+{  2351} G2H500L +GNO                =       G1H500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2352} G2H500L +GNO                =       GHN501G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2353} G2H500L +GHO2               =       GHH500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2354} G2H500L +GNO3               =       G1H500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2355} G2H500L +MEPERO             =  0.340G1H500O + 0.330GHD500B + 0.330GHD500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  2356} G2H500L +PERO1              =  0.460G1H500O + 0.270GHD500B + 0.270GHD500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  2357} G2H500L +PERO2              =  0.400G1H500O + 0.300GHD500B + 0.300GHD500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  2358} G2H500L +PERO3              =  0.460G1H500O + 0.270GHD500B + 0.270GHD500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  2359} G2H500L +PERO5              =  0.460G1H500O + 0.270GHD500B + 0.270GHD500C                 : ARR( 0.183E-11,   450., 0.0);
+{  2360} G2H500L +PERO6              =  0.300G1H500O + 0.350GHD500B + 0.350GHD500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  2361} G2H500L +PERO9              =  0.650G1H500O + 0.350GHD500C                                : ARR( 0.100E-10,     0., 0.0);
+{  2362} G3H5000 +GHO2               =  0.800GGH5000 + 0.200GAH5000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2363} G3H5000 +GNO                =       G2H4000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2364} G3H5000 +GNO2               =       GPH5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2365} G3H5000 +GNO3               =       G2H4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2366} G3H5000 +MEPERO             =  0.685G2H4000 + 0.315GAH5000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2367} G3H5000 +PERO1              =  0.800G2H4000 + 0.200GAH5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2368} G3H5000 +PERO2              =  0.750G2H4000 + 0.250GAH5000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2369} G3H5000 +PERO3              =  0.800G2H4000 + 0.200GAH5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2370} G3H5000 +PERO5              =  0.650G2H4000 + 0.350GAH5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2371} G3H5000 +PERO6              =  0.650G2H4000 + 0.350GAH5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2372} G3H5000 +PERO9              =       G2H4000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2373} G2D5004 +GNO                =       G1D5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2374} G2D5004 +GNO                =       GND5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2375} G2D5004 +GHO2               =       GHD5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2376} G2D5004 +GNO3               =       G1D5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2377} G2D5004 +MEPERO             =  0.480G1D5004 + 0.260GDO5001 + 0.260GDD5000                 : ARR( 0.164E-12,  -795., 0.0);
+{  2378} G2D5004 +PERO1              =  0.600G1D5004 + 0.200GDO5001 + 0.200GDD5000                 : ARR( 0.126E-12,  -850., 0.0);
+{  2379} G2D5004 +PERO2              =  0.560G1D5004 + 0.220GDO5001 + 0.220GDD5000                 : ARR( 0.471E-13, -1350., 0.0);
+{  2380} G2D5004 +PERO3              =  0.600G1D5004 + 0.200GDO5001 + 0.200GDD5000                 : ARR( 0.142E-12, -1200., 0.0);
+{  2381} G2D5004 +PERO5              =  0.600G1D5004 + 0.200GDO5001 + 0.200GDD5000                 : ARR( 0.533E-11,   500., 0.0);
+{  2382} G2D5004 +PERO6              =  0.460G1D5004 + 0.270GDO5001 + 0.270GDD5000                 : ARR( 0.488E-13, -1250., 0.0);
+{  2383} G2D5004 +PERO9              =  0.800G1D5004 + 0.200GDD5000                                : ARR( 0.100E-10,     0., 0.0);
+{  2384} G2H4000 +GNO                =       G1H4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2385} G2H4000 +GNO                =       GHN4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2386} G2H4000 +GHO2               =       GHH4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2387} G2H4000 +GNO3               =       G1H4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2388} G2H4000 +MEPERO             =  0.480G1H4000 + 0.260GHO4002 + 0.260GHD4003                 : ARR( 0.146E-12,  -445., 0.0);
+{  2389} G2H4000 +PERO1              =  0.600G1H4000 + 0.200GHO4002 + 0.200GHD4003                 : ARR( 0.112E-12,  -500., 0.0);
+{  2390} G2H4000 +PERO2              =  0.560G1H4000 + 0.220GHO4002 + 0.220GHD4003                 : ARR( 0.418E-13, -1000., 0.0);
+{  2391} G2H4000 +PERO3              =  0.600G1H4000 + 0.200GHO4002 + 0.200GHD4003                 : ARR( 0.126E-12,  -850., 0.0);
+{  2392} G2H4000 +PERO5              =  0.600G1H4000 + 0.200GHO4002 + 0.200GHD4003                 : ARR( 0.473E-11,   850., 0.0);
+{  2393} G2H4000 +PERO6              =  0.460G1H4000 + 0.270GHO4002 + 0.270GHD4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  2394} G2H4000 +PERO9              =  0.800G1H4000 + 0.200GHD4003                                : ARR( 0.100E-10,     0., 0.0);
+{  2395} G1H500O                     =       GHD2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{  2396} G1H4000                     =       GDO4003 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{  2397} GHK5002 +GHO                =       GHD500A +      GHO2                                   : ARR( 0.420E-11,     0., 0.0);
+{  2398} GHK5002 +GHO                =       G2H500M                                               : ARR( 0.469E-11,     0., 0.0);
+{  2399} GHK5002 +GHO                =       GDK5004 +      GHO                                    : ARR( 0.103E-10,     0., 0.0);
+{  2400} GHK5002 +GHO                =       G2K5009                                               : ARR( 0.199E-11,  -190., 0.0);
+{  2401} GHK5002+HV               =       G3K4002 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  2402} GHK5002+HV               =       GD02000 +      GHK3000                                :  0.100E+01*SUN;
+{  2403} GHK5002+HV               =       G1K500A +      GHO                                    :  0.100E+01*SUN;
+{  2404} G2H500M +GNO                =       G1H500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2405} G2H500M +GNO                =       GHN501H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2406} G2H500M +GHO2               =       GHH500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2407} G2H500M +GNO3               =       G1H500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2408} G2H500M +MEPERO             =  0.340G1H500P + 0.330GHK500C + 0.330GHK500E                 : ARR( 0.565E-13,  -845., 0.0);
+{  2409} G2H500M +PERO1              =  0.460G1H500P + 0.270GHK500C + 0.270GHK500E                 : ARR( 0.434E-13,  -900., 0.0);
+{  2410} G2H500M +PERO2              =  0.400G1H500P + 0.300GHK500C + 0.300GHK500E                 : ARR( 0.162E-13, -1400., 0.0);
+{  2411} G2H500M +PERO3              =  0.460G1H500P + 0.270GHK500C + 0.270GHK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{  2412} G2H500M +PERO5              =  0.460G1H500P + 0.270GHK500C + 0.270GHK500E                 : ARR( 0.183E-11,   450., 0.0);
+{  2413} G2H500M +PERO6              =  0.300G1H500P + 0.350GHK500C + 0.350GHK500E                 : ARR( 0.168E-13, -1300., 0.0);
+{  2414} G2H500M +PERO9              =  0.650G1H500P + 0.350GHK500E                                : ARR( 0.100E-10,     0., 0.0);
+{  2415} G2K5009 +GNO                =       G1K500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2416} G2K5009 +GNO                =       GNK5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2417} G2K5009 +GHO2               =       GHK5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2418} G2K5009 +GNO3               =       G1K500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2419} G2K5009 +MEPERO             =  0.480G1K500A + 0.260GKO5003 + 0.260GDK5004                 : ARR( 0.164E-12,  -795., 0.0);
+{  2420} G2K5009 +PERO1              =  0.600G1K500A + 0.200GKO5003 + 0.200GDK5004                 : ARR( 0.126E-12,  -850., 0.0);
+{  2421} G2K5009 +PERO2              =  0.560G1K500A + 0.220GKO5003 + 0.220GDK5004                 : ARR( 0.471E-13, -1350., 0.0);
+{  2422} G2K5009 +PERO3              =  0.600G1K500A + 0.200GKO5003 + 0.200GDK5004                 : ARR( 0.142E-12, -1200., 0.0);
+{  2423} G2K5009 +PERO5              =  0.600G1K500A + 0.200GKO5003 + 0.200GDK5004                 : ARR( 0.533E-11,   500., 0.0);
+{  2424} G2K5009 +PERO6              =  0.460G1K500A + 0.270GKO5003 + 0.270GDK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  2425} G2K5009 +PERO9              =  0.800G1K500A + 0.200GDK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  2426} G1H500P                     =       GCH2O   +      GHD4004 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  2427} GNO5006 +GHO                =       G2N500w                                               : ARR( 0.326E-12,     0., 0.0);
+{  2428} GNO5006 +GHO                =       GND5002 +      GHO2                                   : ARR( 0.463E-11,     0., 0.0);
+{  2429} GNO5006+HV               =       G1O5002 +      GNO2                                   :  0.100E+01*SUN;
+{  2430} G2N500w +GNO                =       G1N500x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2431} G2N500w +GNO                =       GNN500q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2432} G2N500w +GHO2               =       GHN501I                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2433} G2N500w +GNO3               =       G1N500x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2434} G2N500w +MEPERO             =  0.340G1N500x + 0.330GNO500O + 0.330GNK500T                 : ARR( 0.565E-13,  -845., 0.0);
+{  2435} G2N500w +PERO1              =  0.460G1N500x + 0.270GNO500O + 0.270GNK500T                 : ARR( 0.434E-13,  -900., 0.0);
+{  2436} G2N500w +PERO2              =  0.400G1N500x + 0.300GNO500O + 0.300GNK500T                 : ARR( 0.162E-13, -1400., 0.0);
+{  2437} G2N500w +PERO3              =  0.460G1N500x + 0.270GNO500O + 0.270GNK500T                 : ARR( 0.488E-13, -1250., 0.0);
+{  2438} G2N500w +PERO5              =  0.460G1N500x + 0.270GNO500O + 0.270GNK500T                 : ARR( 0.183E-11,   450., 0.0);
+{  2439} G2N500w +PERO6              =  0.300G1N500x + 0.350GNO500O + 0.350GNK500T                 : ARR( 0.168E-13, -1300., 0.0);
+{  2440} G2N500w +PERO9              =  0.650G1N500x + 0.350GNK500T                                : ARR( 0.100E-10,     0., 0.0);
+{  2441} G1N500x                     =       G2N500x                                               : ARR( 0.240E+12,  4177., 0.0);
+{  2442} G1N500x                     =       GND4005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  2443} G2N500x +GNO                =       G1N500y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2444} G2N500x +GNO                =       GNN500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2445} G2N500x +GHO2               =       GHN501J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2446} G2N500x +GNO3               =       G1N500y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2447} G2N500x +MEPERO             =  0.480G1N500y + 0.260GNO500P + 0.260GND500I                 : ARR( 0.146E-12,  -445., 0.0);
+{  2448} G2N500x +PERO1              =  0.600G1N500y + 0.200GNO500P + 0.200GND500I                 : ARR( 0.112E-12,  -500., 0.0);
+{  2449} G2N500x +PERO2              =  0.560G1N500y + 0.220GNO500P + 0.220GND500I                 : ARR( 0.418E-13, -1000., 0.0);
+{  2450} G2N500x +PERO3              =  0.600G1N500y + 0.200GNO500P + 0.200GND500I                 : ARR( 0.126E-12,  -850., 0.0);
+{  2451} G2N500x +PERO5              =  0.600G1N500y + 0.200GNO500P + 0.200GND500I                 : ARR( 0.473E-11,   850., 0.0);
+{  2452} G2N500x +PERO6              =  0.460G1N500y + 0.270GNO500P + 0.270GND500I                 : ARR( 0.434E-13,  -900., 0.0);
+{  2453} G2N500x +PERO9              =  0.800G1N500y + 0.200GND500I                                : ARR( 0.100E-10,     0., 0.0);
+{  2454} G1N500y                     =       GNK500U +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{  2455} GHO5005 +GHO                =       GKO5001 +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{  2456} GHO5005 +GHO                =       GHD5001 +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{  2457} GHO5005 +GHO                =       G2O5002                                               : ARR( 0.201E-11,  -190., 0.0);
+{  2458} GHO5005+HV               =       G1O5002 +      GHO                                    :  0.100E+01*SUN;
+{  2459} GOO5001 +GHO                =       G2O500D                                               : ARR( 0.118E-11,     0., 0.0);
+{  2460} GOO5001 +GHO                =       GKO5001 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  2461} GOO5001 +GHO                =       G2O500J                                               : ARR( 0.145E-11,     0., 0.0);
+{  2462} GOO5001 +GHO                =       GDO5002 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  2463} G2O500J +GNO                =       G1O500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2464} G2O500J +GNO                =       GNO500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2465} G2O500J +GHO2               =       GHO500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2466} G2O500J +GNO3               =       G1O500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2467} G2O500J +MEPERO             =  0.340G1O500K + 0.330GOO5009 + 0.330GKO500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  2468} G2O500J +PERO1              =  0.460G1O500K + 0.270GOO5009 + 0.270GKO500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  2469} G2O500J +PERO2              =  0.400G1O500K + 0.300GOO5009 + 0.300GKO500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  2470} G2O500J +PERO3              =  0.460G1O500K + 0.270GOO5009 + 0.270GKO500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  2471} G2O500J +PERO5              =  0.460G1O500K + 0.270GOO5009 + 0.270GKO500C                 : ARR( 0.183E-11,   450., 0.0);
+{  2472} G2O500J +PERO6              =  0.300G1O500K + 0.350GOO5009 + 0.350GKO500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  2473} G2O500J +PERO9              =  0.650G1O500K + 0.350GKO500C                                : ARR( 0.100E-10,     0., 0.0);
+{  2474} G1O500K                     =       GD03000 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3991., 0.0);
+{  2475} GKO5001 +GHO                =       G2K500A                                               : ARR( 0.949E-12,     0., 0.0);
+{  2476} GKO5001 +GHO                =       GDK5000 +      GHO2                                   : ARR( 0.140E-10,     0., 0.0);
+{  2477} GKO5001+HV               =       G3K3000 +      G2O2000                                :  0.100E+01*SUN;
+{  2478} G2K500A +GNO                =       G1K500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2479} G2K500A +GNO                =       GNK500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2480} G2K500A +GHO2               =       GHK500F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2481} G2K500A +GNO3               =       G1K500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2482} G2K500A +MEPERO             =  0.340G1K500B + 0.330GKO500D + 0.330GKK5004                 : ARR( 0.565E-13,  -845., 0.0);
+{  2483} G2K500A +PERO1              =  0.460G1K500B + 0.270GKO500D + 0.270GKK5004                 : ARR( 0.434E-13,  -900., 0.0);
+{  2484} G2K500A +PERO2              =  0.400G1K500B + 0.300GKO500D + 0.300GKK5004                 : ARR( 0.162E-13, -1400., 0.0);
+{  2485} G2K500A +PERO3              =  0.460G1K500B + 0.270GKO500D + 0.270GKK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  2486} G2K500A +PERO5              =  0.460G1K500B + 0.270GKO500D + 0.270GKK5004                 : ARR( 0.183E-11,   450., 0.0);
+{  2487} G2K500A +PERO6              =  0.300G1K500B + 0.350GKO500D + 0.350GKK5004                 : ARR( 0.168E-13, -1300., 0.0);
+{  2488} G2K500A +PERO9              =  0.650G1K500B + 0.350GKK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  2489} G1K500B                     =       G3K3000 +      GDO2000                                : ARR( 0.200E+15,  3005., 0.0);
+{  2490} GNO5007 +GHO                =       G2N500y                                               : ARR( 0.175E-12,     0., 0.0);
+{  2491} GNO5007 +GHO                =       G2N500f                                               : ARR( 0.120E-11,     0., 0.0);
+{  2492} GNO5007 +GHO                =       G2N500z                                               : ARR( 0.296E-12,     0., 0.0);
+{  2493} GNO5007 +GHO                =       GND500G +      GHO2                                   : ARR( 0.841E-12,     0., 0.0);
+{  2494} GNO5007 +GHO                =       G1N500c                                               : ARR( 0.220E-17,    85., 2.0);
+{  2495} GNO5007+HV               =       G1O5003 +      GNO2                                   :  0.100E+01*SUN;
+{  2496} G2N500y +GNO                =       G1N500z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2497} G2N500y +GNO                =       GNN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2498} G2N500y +GHO2               =       GHN501K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2499} G2N500y +GNO3               =       G1N500z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2500} G2N500y +MEPERO             =  0.480G1N500z + 0.260GNO500J + 0.260GND500J                 : ARR( 0.146E-12,  -445., 0.0);
+{  2501} G2N500y +PERO1              =  0.600G1N500z + 0.200GNO500J + 0.200GND500J                 : ARR( 0.112E-12,  -500., 0.0);
+{  2502} G2N500y +PERO2              =  0.560G1N500z + 0.220GNO500J + 0.220GND500J                 : ARR( 0.418E-13, -1000., 0.0);
+{  2503} G2N500y +PERO3              =  0.600G1N500z + 0.200GNO500J + 0.200GND500J                 : ARR( 0.126E-12,  -850., 0.0);
+{  2504} G2N500y +PERO5              =  0.600G1N500z + 0.200GNO500J + 0.200GND500J                 : ARR( 0.473E-11,   850., 0.0);
+{  2505} G2N500y +PERO6              =  0.460G1N500z + 0.270GNO500J + 0.270GND500J                 : ARR( 0.434E-13,  -900., 0.0);
+{  2506} G2N500y +PERO9              =  0.800G1N500z + 0.200GND500J                                : ARR( 0.100E-10,     0., 0.0);
+{  2507} G2N500z +GNO                =       G1N5011 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2508} G2N500z +GNO                =       GNN500q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2509} G2N500z +GHO2               =       GHN501L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2510} G2N500z +GNO3               =       G1N5011 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2511} G2N500z +MEPERO             =  0.340G1N5011 + 0.330GNO500Q + 0.330GNK500W                 : ARR( 0.565E-13,  -845., 0.0);
+{  2512} G2N500z +PERO1              =  0.460G1N5011 + 0.270GNO500Q + 0.270GNK500W                 : ARR( 0.434E-13,  -900., 0.0);
+{  2513} G2N500z +PERO2              =  0.400G1N5011 + 0.300GNO500Q + 0.300GNK500W                 : ARR( 0.162E-13, -1400., 0.0);
+{  2514} G2N500z +PERO3              =  0.460G1N5011 + 0.270GNO500Q + 0.270GNK500W                 : ARR( 0.488E-13, -1250., 0.0);
+{  2515} G2N500z +PERO5              =  0.460G1N5011 + 0.270GNO500Q + 0.270GNK500W                 : ARR( 0.183E-11,   450., 0.0);
+{  2516} G2N500z +PERO6              =  0.300G1N5011 + 0.350GNO500Q + 0.350GNK500W                 : ARR( 0.168E-13, -1300., 0.0);
+{  2517} G2N500z +PERO9              =  0.650G1N5011 + 0.350GNK500W                                : ARR( 0.100E-10,     0., 0.0);
+{  2518} G1N500z +OXYGEN             =       GND500J +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  2519} G1N500z                     =       GKO5003 +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{  2520} G1N5011                     =       GD03000 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{  2521} GHO5006 +GHO                =       GKO5002 +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{  2522} GHO5006 +GHO                =       GHD5008 +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{  2523} GHO5006 +GHO                =       G2O5003                                               : ARR( 0.201E-11,  -190., 0.0);
+{  2524} GHO5006+HV               =       G1O5003 +      GHO                                    :  0.100E+01*SUN;
+{  2525} GOO5002 +GHO                =       G2O500E                                               : ARR( 0.118E-11,     0., 0.0);
+{  2526} GOO5002 +GHO                =       G2O500K                                               : ARR( 0.145E-11,     0., 0.0);
+{  2527} GOO5002 +GHO                =       GKO5002 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  2528} GOO5002 +GHO                =       GDO5007 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  2529} G2O500K +GNO                =       G1O500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2530} G2O500K +GNO                =       GNO500O                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2531} G2O500K +GHO2               =       GHO500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2532} G2O500K +GNO3               =       G1O500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2533} G2O500K +MEPERO             =  0.340G1O500L + 0.330GOO5009 + 0.330GKO500D                 : ARR( 0.565E-13,  -845., 0.0);
+{  2534} G2O500K +PERO1              =  0.460G1O500L + 0.270GOO5009 + 0.270GKO500D                 : ARR( 0.434E-13,  -900., 0.0);
+{  2535} G2O500K +PERO2              =  0.400G1O500L + 0.300GOO5009 + 0.300GKO500D                 : ARR( 0.162E-13, -1400., 0.0);
+{  2536} G2O500K +PERO3              =  0.460G1O500L + 0.270GOO5009 + 0.270GKO500D                 : ARR( 0.488E-13, -1250., 0.0);
+{  2537} G2O500K +PERO5              =  0.460G1O500L + 0.270GOO5009 + 0.270GKO500D                 : ARR( 0.183E-11,   450., 0.0);
+{  2538} G2O500K +PERO6              =  0.300G1O500L + 0.350GOO5009 + 0.350GKO500D                 : ARR( 0.168E-13, -1300., 0.0);
+{  2539} G2O500K +PERO9              =  0.650G1O500L + 0.350GKO500D                                : ARR( 0.100E-10,     0., 0.0);
+{  2540} G1O500L                     =       GD03000 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  2541} GKO5002 +GHO                =       G2K500B                                               : ARR( 0.380E-11,     0., 0.0);
+{  2542} GKO5002 +GHO                =       G2K500C                                               : ARR( 0.900E-12,     0., 0.0);
+{  2543} GKO5002 +GHO                =       GDK5006 +      GHO2                                   : ARR( 0.256E-11,     0., 0.0);
+{  2544} GKO5002+HV               =       G3K4001 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{  2545} GKO5002+HV               =       GU02000 +      GKO3000                                :  0.100E+01*SUN;
+{  2546} G2K500B +GNO                =       G1K500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2547} G2K500B +GNO                =       GNK500B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2548} G2K500B +GHO2               =       GHK500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2549} G2K500B +GNO3               =       G1K500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2550} G2K500B +MEPERO             =  0.480G1K500C + 0.260GKO5008 + 0.260GKK5003                 : ARR( 0.616E-11,   905., 0.0);
+{  2551} G2K500B +PERO1              =  0.600G1K500C + 0.200GKO5008 + 0.200GKK5003                 : ARR( 0.473E-11,   850., 0.0);
+{  2552} G2K500B +PERO2              =  0.560G1K500C + 0.220GKO5008 + 0.220GKK5003                 : ARR( 0.177E-11,   350., 0.0);
+{  2553} G2K500B +PERO3              =  0.600G1K500C + 0.200GKO5008 + 0.200GKK5003                 : ARR( 0.533E-11,   500., 0.0);
+{  2554} G2K500B +PERO5              =  0.600G1K500C + 0.200GKO5008 + 0.200GKK5003                 : ARR( 0.200E-09,  2200., 0.0);
+{  2555} G2K500B +PERO6              =  0.460G1K500C + 0.270GKO5008 + 0.270GKK5003                 : ARR( 0.183E-11,   450., 0.0);
+{  2556} G2K500B +PERO9              =  0.800G1K500C + 0.200GKK5003                                : ARR( 0.100E-10,     0., 0.0);
+{  2557} G2K500C +GNO                =       G1K500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2558} G2K500C +GNO                =       GNK500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2559} G2K500C +GHO2               =       GHK500H                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2560} G2K500C +GNO3               =       G1K500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2561} G2K500C +MEPERO             =  0.340G1K500D + 0.330GKO500C + 0.330GKK5004                 : ARR( 0.565E-13,  -845., 0.0);
+{  2562} G2K500C +PERO1              =  0.460G1K500D + 0.270GKO500C + 0.270GKK5004                 : ARR( 0.434E-13,  -900., 0.0);
+{  2563} G2K500C +PERO2              =  0.400G1K500D + 0.300GKO500C + 0.300GKK5004                 : ARR( 0.162E-13, -1400., 0.0);
+{  2564} G2K500C +PERO3              =  0.460G1K500D + 0.270GKO500C + 0.270GKK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  2565} G2K500C +PERO5              =  0.460G1K500D + 0.270GKO500C + 0.270GKK5004                 : ARR( 0.183E-11,   450., 0.0);
+{  2566} G2K500C +PERO6              =  0.300G1K500D + 0.350GKO500C + 0.350GKK5004                 : ARR( 0.168E-13, -1300., 0.0);
+{  2567} G2K500C +PERO9              =  0.650G1K500D + 0.350GKK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  2568} G1K500C                     =       GDK5001 +      GHO2                                   : ARR( 0.160E+12,  4515., 0.0);
+{  2569} G1K500C                     =       GD02000 +      G2K3001                                : ARR( 0.200E+15,  7034., 0.0);
+{  2570} G1K500D                     =       GD03000 +      G3K2001                                : ARR( 0.200E+15,  2755., 0.0);
+{  2571} G2K3001 +GNO                =       G1K3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  2572} G2K3001 +GNO                =       GNK3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{  2573} G2K3001 +GHO2               =       GHK3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  2574} G2K3001 +GNO3               =       G1K3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2575} G2K3001 +MEPERO             =  0.480G1K3001 + 0.260GKO3001 + 0.260GDK3001                 : ARR( 0.164E-12,  -795., 0.0);
+{  2576} G2K3001 +PERO1              =  0.600G1K3001 + 0.200GKO3001 + 0.200GDK3001                 : ARR( 0.126E-12,  -850., 0.0);
+{  2577} G2K3001 +PERO2              =  0.560G1K3001 + 0.220GKO3001 + 0.220GDK3001                 : ARR( 0.471E-13, -1350., 0.0);
+{  2578} G2K3001 +PERO3              =  0.600G1K3001 + 0.200GKO3001 + 0.200GDK3001                 : ARR( 0.142E-12, -1200., 0.0);
+{  2579} G2K3001 +PERO5              =  0.600G1K3001 + 0.200GKO3001 + 0.200GDK3001                 : ARR( 0.533E-11,   500., 0.0);
+{  2580} G2K3001 +PERO6              =  0.460G1K3001 + 0.270GKO3001 + 0.270GDK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  2581} G2K3001 +PERO9              =  0.800G1K3001 + 0.200GDK3001                                : ARR( 0.100E-10,     0., 0.0);
+{  2582} G3K2001 +GHO2               =  0.800GGO2000 + 0.200GAO2000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2583} G3K2001 +GNO                =       GCH2O   +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  2584}  G3K2001 + GNO2       +M       =       GPO2000         +M                                    : FALL( 0.110E-10,     0.,-1.0, 0.850E-28,     0.,-6.5,0.60);
+{  2585} G3K2001 +GNO3               =       GCH2O   +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  2586} G3K2001 +MEPERO             =  0.685GCH2O   + 0.315GAO2000 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2587} G3K2001 +PERO1              =  0.800GCH2O   + 0.200GAO2000 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2588} G3K2001 +PERO2              =  0.750GCH2O   + 0.250GAO2000 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2589} G3K2001 +PERO3              =  0.800GCH2O   + 0.200GAO2000 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2590} G3K2001 +PERO5              =  0.650GCH2O   + 0.350GAO2000 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2591} G3K2001 +PERO6              =  0.650GCH2O   + 0.350GAO2000 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  2592} G3K2001 +PERO9              =       GCH2O   +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  2593} G1K3001                     =       G3K2001 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{  2594} GDO3000 +GHO                =       GDD3000 +      GHO2                                   : ARR( 0.131E-10,     0., 0.0);
+{  2595} GDO3000 +GHO                =       G3K3001                                               : ARR( 0.214E-10,     0., 0.0);
+{  2596} GDO3000 +GNO3               =       G3K3001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2597} GDO3000+HV               =       G2O2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2598} GOO2000 +GHO                =       GDO2000 +      GHO2                                   : ARR( 0.770E-11,     0., 0.0);
+{  2599} GDO2000 +GHO                =       GDD2000 +      GHO2                                   : ARR( 0.106E-11,     0., 0.0);
+{  2600} GDO2000 +GHO                =       G3K2001                                               : ARR( 0.894E-11,     0., 0.0);
+{  2601} GDO2000 +GNO3               =       G3K2001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2602} GDO2000+HV               =       GCH2O   +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  2603} GNO5008 +GHO                =       GND500H +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{  2604} GNO5008 +GHO                =       GNK500D +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  2605} GNO5008 +GHO                =       G2N5011                                               : ARR( 0.147E-11,     0., 0.0);
+{  2606} GNO5008+HV               =       G1O5004 +      GNO2                                   :  0.100E+01*SUN;
+{  2607} G2N5011 +GNO                =       G1N5012 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2608} G2N5011 +GNO                =       GNN500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2609} G2N5011 +GHO2               =       GHN501M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2610} G2N5011 +GNO3               =       G1N5012 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2611} G2N5011 +MEPERO             =  0.340G1N5012 + 0.330GNO500R + 0.330GNK500X                 : ARR( 0.565E-13,  -845., 0.0);
+{  2612} G2N5011 +PERO1              =  0.460G1N5012 + 0.270GNO500R + 0.270GNK500X                 : ARR( 0.434E-13,  -900., 0.0);
+{  2613} G2N5011 +PERO2              =  0.400G1N5012 + 0.300GNO500R + 0.300GNK500X                 : ARR( 0.162E-13, -1400., 0.0);
+{  2614} G2N5011 +PERO3              =  0.460G1N5012 + 0.270GNO500R + 0.270GNK500X                 : ARR( 0.488E-13, -1250., 0.0);
+{  2615} G2N5011 +PERO5              =  0.460G1N5012 + 0.270GNO500R + 0.270GNK500X                 : ARR( 0.183E-11,   450., 0.0);
+{  2616} G2N5011 +PERO6              =  0.300G1N5012 + 0.350GNO500R + 0.350GNK500X                 : ARR( 0.168E-13, -1300., 0.0);
+{  2617} G2N5011 +PERO9              =  0.650G1N5012 + 0.350GNK500X                                : ARR( 0.100E-10,     0., 0.0);
+{  2618} G1N5012                     =       GDO2000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  2619} GHO5007 +GHO                =       GHD5009 +      GHO2                                   : ARR( 0.439E-11,     0., 0.0);
+{  2620} GHO5007 +GHO                =       GHK500I +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{  2621} GHO5007 +GHO                =       GDO5001 +      GHO                                    : ARR( 0.176E-10,     0., 0.0);
+{  2622} GHO5007 +GHO                =       G2O5004                                               : ARR( 0.207E-11,  -190., 0.0);
+{  2623} GHO5007+HV               =       G1O5004 +      GHO                                    :  0.100E+01*SUN;
+{  2624} GOO5003 +GHO                =       GDO5001 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{  2625} GOO5003 +GHO                =       G2O500F                                               : ARR( 0.144E-11,     0., 0.0);
+{  2626} GOO5003 +GHO                =       G2O500L                                               : ARR( 0.144E-11,     0., 0.0);
+{  2627} GOO5003 +GHO                =       GKO5003 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{  2628} GOO5003 +GHO                =       GDO5006 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{  2629} G2O500L +GNO                =       G1O500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2630} G2O500L +GNO                =       GNO500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2631} G2O500L +GHO2               =       GHO500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2632} G2O500L +GNO3               =       G1O500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2633} G2O500L +MEPERO             =  0.340G1O500M + 0.330GOO500A + 0.330GKO500E                 : ARR( 0.565E-13,  -845., 0.0);
+{  2634} G2O500L +PERO1              =  0.460G1O500M + 0.270GOO500A + 0.270GKO500E                 : ARR( 0.434E-13,  -900., 0.0);
+{  2635} G2O500L +PERO2              =  0.400G1O500M + 0.300GOO500A + 0.300GKO500E                 : ARR( 0.162E-13, -1400., 0.0);
+{  2636} G2O500L +PERO3              =  0.460G1O500M + 0.270GOO500A + 0.270GKO500E                 : ARR( 0.488E-13, -1250., 0.0);
+{  2637} G2O500L +PERO5              =  0.460G1O500M + 0.270GOO500A + 0.270GKO500E                 : ARR( 0.183E-11,   450., 0.0);
+{  2638} G2O500L +PERO6              =  0.300G1O500M + 0.350GOO500A + 0.350GKO500E                 : ARR( 0.168E-13, -1300., 0.0);
+{  2639} G2O500L +PERO9              =  0.650G1O500M + 0.350GKO500E                                : ARR( 0.100E-10,     0., 0.0);
+{  2640} G1O500M                     =       GDO2000 +      GDO3000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{  2641} GDO5001 +GHO                =       GDD5000 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{  2642} GDO5001 +GHO                =       GDK5007 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  2643} GDO5001 +GHO                =       G2D5005                                               : ARR( 0.461E-11,     0., 0.0);
+{  2644} GDO5001 +GHO                =       G3K5002                                               : ARR( 0.214E-10,     0., 0.0);
+{  2645} GDO5001 +GNO3               =       G3K5002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2646} GDO5001+HV               =       G2O4003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2647} GDO5001+HV               =       GKO3000 +      GD02000                                :  0.100E+01*SUN;
+{  2648} G2D5005 +GNO                =       G1D5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2649} G2D5005 +GNO                =       GND500I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2650} G2D5005 +GHO2               =       GHD500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2651} G2D5005 +GNO3               =       G1D5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2652} G2D5005 +MEPERO             =  0.340G1D5006 + 0.330GDO5008 + 0.330GDK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{  2653} G2D5005 +PERO1              =  0.460G1D5006 + 0.270GDO5008 + 0.270GDK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{  2654} G2D5005 +PERO2              =  0.400G1D5006 + 0.300GDO5008 + 0.300GDK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{  2655} G2D5005 +PERO3              =  0.460G1D5006 + 0.270GDO5008 + 0.270GDK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  2656} G2D5005 +PERO5              =  0.460G1D5006 + 0.270GDO5008 + 0.270GDK5008                 : ARR( 0.183E-11,   450., 0.0);
+{  2657} G2D5005 +PERO6              =  0.300G1D5006 + 0.350GDO5008 + 0.350GDK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{  2658} G2D5005 +PERO9              =  0.650G1D5006 + 0.350GDK5008                                : ARR( 0.100E-10,     0., 0.0);
+{  2659} G3K5002 +GHO2               =  0.800GGO5001 + 0.200GAO5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2660} G3K5002 +GNO                =       G2O4003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2661} G3K5002 +GNO2               =       GPO5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2662} G3K5002 +GNO3               =       G2O4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2663} G3K5002 +MEPERO             =  0.685G2O4003 + 0.315GAO5001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2664} G3K5002 +PERO1              =  0.800G2O4003 + 0.200GAO5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2665} G3K5002 +PERO2              =  0.750G2O4003 + 0.250GAO5001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2666} G3K5002 +PERO3              =  0.800G2O4003 + 0.200GAO5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2667} G3K5002 +PERO5              =  0.650G2O4003 + 0.350GAO5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2668} G3K5002 +PERO6              =  0.650G2O4003 + 0.350GAO5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2669} G3K5002 +PERO9              =       G2O4003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2670} G2O4003 +GNO                =       G1O4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2671} G2O4003 +GNO                =       GNO4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2672} G2O4003 +GHO2               =       GHO4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2673} G2O4003 +GNO3               =       G1O4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2674} G2O4003 +MEPERO             =  0.480G1O4003 + 0.260GOO4002 + 0.260GDO4002                 : ARR( 0.146E-12,  -445., 0.0);
+{  2675} G2O4003 +PERO1              =  0.600G1O4003 + 0.200GOO4002 + 0.200GDO4002                 : ARR( 0.112E-12,  -500., 0.0);
+{  2676} G2O4003 +PERO2              =  0.560G1O4003 + 0.220GOO4002 + 0.220GDO4002                 : ARR( 0.418E-13, -1000., 0.0);
+{  2677} G2O4003 +PERO3              =  0.600G1O4003 + 0.200GOO4002 + 0.200GDO4002                 : ARR( 0.126E-12,  -850., 0.0);
+{  2678} G2O4003 +PERO5              =  0.600G1O4003 + 0.200GOO4002 + 0.200GDO4002                 : ARR( 0.473E-11,   850., 0.0);
+{  2679} G2O4003 +PERO6              =  0.460G1O4003 + 0.270GOO4002 + 0.270GDO4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  2680} G2O4003 +PERO9              =  0.800G1O4003 + 0.200GDO4002                                : ARR( 0.100E-10,     0., 0.0);
+{  2681} G1D5006                     =       GDO2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{  2682} G1O4003                     =       GDO4003 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  2683} GKO5003 +GHO                =       GDK5007 +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{  2684} GKO5003 +GHO                =       G2K500D                                               : ARR( 0.459E-11,     0., 0.0);
+{  2685} GKO5003 +GHO                =       G2K500E                                               : ARR( 0.882E-12,     0., 0.0);
+{  2686} GKO5003 +GHO                =       GDK5004 +      GHO2                                   : ARR( 0.251E-11,     0., 0.0);
+{  2687} GKO5003+HV               =       G3K4002 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{  2688} GKO5003+HV               =       GD02000 +      GKO3000                                :  0.100E+01*SUN;
+{  2689} G2K500D +GNO                =       G1K500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2690} G2K500D +GNO                =       GNK500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2691} G2K500D +GHO2               =       GHK500B                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2692} G2K500D +GNO3               =       G1K500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2693} G2K500D +MEPERO             =  0.340G1K500E + 0.330GKO500A + 0.330GKK5005                 : ARR( 0.565E-13,  -845., 0.0);
+{  2694} G2K500D +PERO1              =  0.460G1K500E + 0.270GKO500A + 0.270GKK5005                 : ARR( 0.434E-13,  -900., 0.0);
+{  2695} G2K500D +PERO2              =  0.400G1K500E + 0.300GKO500A + 0.300GKK5005                 : ARR( 0.162E-13, -1400., 0.0);
+{  2696} G2K500D +PERO3              =  0.460G1K500E + 0.270GKO500A + 0.270GKK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  2697} G2K500D +PERO5              =  0.460G1K500E + 0.270GKO500A + 0.270GKK5005                 : ARR( 0.183E-11,   450., 0.0);
+{  2698} G2K500D +PERO6              =  0.300G1K500E + 0.350GKO500A + 0.350GKK5005                 : ARR( 0.168E-13, -1300., 0.0);
+{  2699} G2K500D +PERO9              =  0.650G1K500E + 0.350GKK5005                                : ARR( 0.100E-10,     0., 0.0);
+{  2700} G2K500E +GNO                =       G1K500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2701} G2K500E +GNO                =       GNK500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2702} G2K500E +GHO2               =       GHK500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2703} G2K500E +GNO3               =       G1K500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2704} G2K500E +MEPERO             =  0.340G1K500F + 0.330GKO500F + 0.330GKK5006                 : ARR( 0.565E-13,  -845., 0.0);
+{  2705} G2K500E +PERO1              =  0.460G1K500F + 0.270GKO500F + 0.270GKK5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  2706} G2K500E +PERO2              =  0.400G1K500F + 0.300GKO500F + 0.300GKK5006                 : ARR( 0.162E-13, -1400., 0.0);
+{  2707} G2K500E +PERO3              =  0.460G1K500F + 0.270GKO500F + 0.270GKK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  2708} G2K500E +PERO5              =  0.460G1K500F + 0.270GKO500F + 0.270GKK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  2709} G2K500E +PERO6              =  0.300G1K500F + 0.350GKO500F + 0.350GKK5006                 : ARR( 0.168E-13, -1300., 0.0);
+{  2710} G2K500E +PERO9              =  0.650G1K500F + 0.350GKK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  2711} G1K500E                     =       GDK4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  2712} G1K500F                     =       GDO3000 +      G3K2001                                : ARR( 0.200E+15,  2755., 0.0);
+{  2713} GU03000 +GHO                =       G2O3000                                               : ARR( 0.633E-12,  -504., 0.0);
+{  2714} GU03000 +GHO                =       G2O3002                                               : ARR( 0.422E-11,  -504., 0.0);
+{  2715} GU03000 +GO3                =  2.000GD02000 + 0.740GHCOOH  + 0.260GCO2    + 0.260GH2      : ARR( 0.138E-14,  1878., 0.0);
+{  2716} GU03000 +GO3                =       GCO     + 0.760GH2O    + 0.240GHO2    + 0.240GHO      : ARR( 0.138E-14,  1878., 0.0);
+{  2717} GU03000 +GO3                =  2.000GCH2O   + 0.680GA02000 + 0.280GCO2    + 0.280GCH4     : ARR( 0.138E-14,  1878., 0.0);
+{  2718} GU03000 +GO3                =  1.040GCO     + 1.040GHO     + 1.040GCH3O2                  : ARR( 0.138E-14,  1878., 0.0);
+{  2719} GU03000 +GNO3               =       G2N3002                                               : ARR( 0.459E-12,  1156., 0.0);
+{  2720} GND5002 +GHO                =       G3N5002                                               : ARR( 0.217E-10,     0., 0.0);
+{  2721} GND5002 +GNO3               =       G3N5002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2722} GND5002+HV               =       G1D5000 +      GNO2                                   :  0.100E+01*SUN;
+{  2723} GND5002+HV               =       G2N4002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2724} GND5002+HV               =       G2D3000 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  2725} G3N5002 +GHO2               =  0.800GGN5002 + 0.200GAN5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2726} G3N5002 +GNO                =       G2N4002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2727} G3N5002 +GNO2               =       GPN5002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2728} G3N5002 +GNO3               =       G2N4002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2729} G3N5002 +MEPERO             =  0.685G2N4002 + 0.315GAN5002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2730} G3N5002 +PERO1              =  0.800G2N4002 + 0.200GAN5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2731} G3N5002 +PERO2              =  0.750G2N4002 + 0.250GAN5002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2732} G3N5002 +PERO3              =  0.800G2N4002 + 0.200GAN5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2733} G3N5002 +PERO5              =  0.650G2N4002 + 0.350GAN5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2734} G3N5002 +PERO6              =  0.650G2N4002 + 0.350GAN5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2735} G3N5002 +PERO9              =       G2N4002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2736} G2N4002 +GNO                =       G1N4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2737} G2N4002 +GNO                =       GNN4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2738} G2N4002 +GHO2               =       GHN4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2739} G2N4002 +GNO3               =       G1N4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2740} G2N4002 +MEPERO             =  0.480G1N4002 + 0.260GNO4004 + 0.260GND4005                 : ARR( 0.164E-12,  -795., 0.0);
+{  2741} G2N4002 +PERO1              =  0.600G1N4002 + 0.200GNO4004 + 0.200GND4005                 : ARR( 0.126E-12,  -850., 0.0);
+{  2742} G2N4002 +PERO2              =  0.560G1N4002 + 0.220GNO4004 + 0.220GND4005                 : ARR( 0.471E-13, -1350., 0.0);
+{  2743} G2N4002 +PERO3              =  0.600G1N4002 + 0.200GNO4004 + 0.200GND4005                 : ARR( 0.142E-12, -1200., 0.0);
+{  2744} G2N4002 +PERO5              =  0.600G1N4002 + 0.200GNO4004 + 0.200GND4005                 : ARR( 0.533E-11,   500., 0.0);
+{  2745} G2N4002 +PERO6              =  0.460G1N4002 + 0.270GNO4004 + 0.270GND4005                 : ARR( 0.488E-13, -1250., 0.0);
+{  2746} G2N4002 +PERO9              =  0.800G1N4002 + 0.200GND4005                                : ARR( 0.100E-10,     0., 0.0);
+{  2747} G2D3000 +GNO                =       G1D3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  2748} G2D3000 +GNO                =       GND3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{  2749} G2D3000 +GHO2               =       GHD3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{  2750} G2D3000 +GNO3               =       G1D3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2751} G2D3000 +MEPERO             =  0.340G1D3001 + 0.330GDO3001 + 0.330GDK3000                 : ARR( 0.565E-13,  -845., 0.0);
+{  2752} G2D3000 +PERO1              =  0.460G1D3001 + 0.270GDO3001 + 0.270GDK3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  2753} G2D3000 +PERO2              =  0.400G1D3001 + 0.300GDO3001 + 0.300GDK3000                 : ARR( 0.162E-13, -1400., 0.0);
+{  2754} G2D3000 +PERO3              =  0.460G1D3001 + 0.270GDO3001 + 0.270GDK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{  2755} G2D3000 +PERO5              =  0.460G1D3001 + 0.270GDO3001 + 0.270GDK3000                 : ARR( 0.183E-11,   450., 0.0);
+{  2756} G2D3000 +PERO6              =  0.300G1D3001 + 0.350GDO3001 + 0.350GDK3000                 : ARR( 0.168E-13, -1300., 0.0);
+{  2757} G2D3000 +PERO9              =  0.650G1D3001 + 0.350GDK3000                                : ARR( 0.100E-10,     0., 0.0);
+{  2758} G1N4002 +OXYGEN             =       GND4005 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  2759} G1N4002                     =       G2N4003                                               : ARR( 0.240E+12,  4177., 0.0);
+{  2760} G1D3001                     =       GD02000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5497., 0.0);
+{  2761} G2N4003 +GNO                =       G1N4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2762} G2N4003 +GNO                =       GNN4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2763} G2N4003 +GHO2               =       GHN4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2764} G2N4003 +GNO3               =       G1N4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2765} G2N4003 +MEPERO             =  0.480G1N4003 + 0.260GNO4005 + 0.260GND4002                 : ARR( 0.146E-12,  -445., 0.0);
+{  2766} G2N4003 +PERO1              =  0.600G1N4003 + 0.200GNO4005 + 0.200GND4002                 : ARR( 0.112E-12,  -500., 0.0);
+{  2767} G2N4003 +PERO2              =  0.560G1N4003 + 0.220GNO4005 + 0.220GND4002                 : ARR( 0.418E-13, -1000., 0.0);
+{  2768} G2N4003 +PERO3              =  0.600G1N4003 + 0.200GNO4005 + 0.200GND4002                 : ARR( 0.126E-12,  -850., 0.0);
+{  2769} G2N4003 +PERO5              =  0.600G1N4003 + 0.200GNO4005 + 0.200GND4002                 : ARR( 0.473E-11,   850., 0.0);
+{  2770} G2N4003 +PERO6              =  0.460G1N4003 + 0.270GNO4005 + 0.270GND4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  2771} G2N4003 +PERO9              =  0.800G1N4003 + 0.200GND4002                                : ARR( 0.100E-10,     0., 0.0);
+{  2772} G1N4003                     =       GND4006 +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  2773} GHD5001 +GHO                =       GDK5000 +      GHO                                    : ARR( 0.136E-09,     0., 0.0);
+{  2774} GHD5001 +GHO                =       G3H5001                                               : ARR( 0.216E-10,     0., 0.0);
+{  2775} GHD5001 +GNO3               =       G3H5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2776} GHD5001+HV               =       G1D5000 +      GHO                                    :  0.100E+01*SUN;
+{  2777} GHD5001+HV               =       G2H4001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2778} GHD5001+HV               =       G2D3000 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{  2779} G3H5001 +GHO2               =  0.800GGH5001 + 0.200GAH5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2780} G3H5001 +GNO                =       G2H4001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2781} G3H5001 +GNO2               =       GPH5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2782} G3H5001 +GNO3               =       G2H4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2783} G3H5001 +MEPERO             =  0.685G2H4001 + 0.315GAH5001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2784} G3H5001 +PERO1              =  0.800G2H4001 + 0.200GAH5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2785} G3H5001 +PERO2              =  0.750G2H4001 + 0.250GAH5001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2786} G3H5001 +PERO3              =  0.800G2H4001 + 0.200GAH5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2787} G3H5001 +PERO5              =  0.650G2H4001 + 0.350GAH5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2788} G3H5001 +PERO6              =  0.650G2H4001 + 0.350GAH5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2789} G3H5001 +PERO9              =       G2H4001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2790} G2H4001 +GNO                =       G1H4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2791} G2H4001 +GNO                =       GHN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2792} G2H4001 +GHO2               =       GHH4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2793} G2H4001 +GNO3               =       G1H4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2794} G2H4001 +MEPERO             =  0.480G1H4001 + 0.260GHO4004 + 0.260GHD4005                 : ARR( 0.164E-12,  -795., 0.0);
+{  2795} G2H4001 +PERO1              =  0.600G1H4001 + 0.200GHO4004 + 0.200GHD4005                 : ARR( 0.126E-12,  -850., 0.0);
+{  2796} G2H4001 +PERO2              =  0.560G1H4001 + 0.220GHO4004 + 0.220GHD4005                 : ARR( 0.471E-13, -1350., 0.0);
+{  2797} G2H4001 +PERO3              =  0.600G1H4001 + 0.200GHO4004 + 0.200GHD4005                 : ARR( 0.142E-12, -1200., 0.0);
+{  2798} G2H4001 +PERO5              =  0.600G1H4001 + 0.200GHO4004 + 0.200GHD4005                 : ARR( 0.533E-11,   500., 0.0);
+{  2799} G2H4001 +PERO6              =  0.460G1H4001 + 0.270GHO4004 + 0.270GHD4005                 : ARR( 0.488E-13, -1250., 0.0);
+{  2800} G2H4001 +PERO9              =  0.800G1H4001 + 0.200GHD4005                                : ARR( 0.100E-10,     0., 0.0);
+{  2801} G1H4001 +OXYGEN             =       GHD4005 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  2802} G1H4001                     =       G2H4002                                               : ARR( 0.240E+12,  4177., 0.0);
+{  2803} G1H4001                     =       GD03000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  2804} G2H4002 +GNO                =       G1H4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2805} G2H4002 +GNO                =       GHN4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2806} G2H4002 +GHO2               =       GHH4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2807} G2H4002 +GNO3               =       G1H4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2808} G2H4002 +MEPERO             =  0.480G1H4002 + 0.260GHO4005 + 0.260GHD4000                 : ARR( 0.146E-12,  -445., 0.0);
+{  2809} G2H4002 +PERO1              =  0.600G1H4002 + 0.200GHO4005 + 0.200GHD4000                 : ARR( 0.112E-12,  -500., 0.0);
+{  2810} G2H4002 +PERO2              =  0.560G1H4002 + 0.220GHO4005 + 0.220GHD4000                 : ARR( 0.418E-13, -1000., 0.0);
+{  2811} G2H4002 +PERO3              =  0.600G1H4002 + 0.200GHO4005 + 0.200GHD4000                 : ARR( 0.126E-12,  -850., 0.0);
+{  2812} G2H4002 +PERO5              =  0.600G1H4002 + 0.200GHO4005 + 0.200GHD4000                 : ARR( 0.473E-11,   850., 0.0);
+{  2813} G2H4002 +PERO6              =  0.460G1H4002 + 0.270GHO4005 + 0.270GHD4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  2814} G2H4002 +PERO9              =  0.800G1H4002 + 0.200GHD4000                                : ARR( 0.100E-10,     0., 0.0);
+{  2815} G1H4002                     =       GHD4006 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  2816} GDO5002 +GHO                =       GDK5000 +      GHO2                                   : ARR( 0.341E-10,     0., 0.0);
+{  2817} GDO5002 +GHO                =       G3K5003                                               : ARR( 0.217E-10,     0., 0.0);
+{  2818} GDO5002 +GNO3               =       G3K5003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2819} GDO5002+HV               =       G2O4004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2820} GDO5002+HV               =       GD03000 +      GD02000                                :  0.100E+01*SUN;
+{  2821} G3K5003 +GHO2               =  0.800GGO5002 + 0.200GAO5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2822} G3K5003 +GNO                =       G2O4004 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2823} G3K5003 +GNO2               =       GPO5002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2824} G3K5003 +GNO3               =       G2O4004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2825} G3K5003 +MEPERO             =  0.685G2O4004 + 0.315GAO5002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2826} G3K5003 +PERO1              =  0.800G2O4004 + 0.200GAO5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2827} G3K5003 +PERO2              =  0.750G2O4004 + 0.250GAO5002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2828} G3K5003 +PERO3              =  0.800G2O4004 + 0.200GAO5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2829} G3K5003 +PERO5              =  0.650G2O4004 + 0.350GAO5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2830} G3K5003 +PERO6              =  0.650G2O4004 + 0.350GAO5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2831} G3K5003 +PERO9              =       G2O4004 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2832} G2O4004 +GNO                =       G1O4004 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2833} G2O4004 +GNO                =       GNO4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2834} G2O4004 +GHO2               =       GHO4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2835} G2O4004 +GNO3               =       G1O4004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2836} G2O4004 +MEPERO             =  0.480G1O4004 + 0.260GOO4003 + 0.260GDO4004                 : ARR( 0.164E-12,  -795., 0.0);
+{  2837} G2O4004 +PERO1              =  0.600G1O4004 + 0.200GOO4003 + 0.200GDO4004                 : ARR( 0.126E-12,  -850., 0.0);
+{  2838} G2O4004 +PERO2              =  0.560G1O4004 + 0.220GOO4003 + 0.220GDO4004                 : ARR( 0.471E-13, -1350., 0.0);
+{  2839} G2O4004 +PERO3              =  0.600G1O4004 + 0.200GOO4003 + 0.200GDO4004                 : ARR( 0.142E-12, -1200., 0.0);
+{  2840} G2O4004 +PERO5              =  0.600G1O4004 + 0.200GOO4003 + 0.200GDO4004                 : ARR( 0.533E-11,   500., 0.0);
+{  2841} G2O4004 +PERO6              =  0.460G1O4004 + 0.270GOO4003 + 0.270GDO4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  2842} G2O4004 +PERO9              =  0.800G1O4004 + 0.200GDO4004                                : ARR( 0.100E-10,     0., 0.0);
+{  2843} G1O4004                     =       GD03000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  2844} GDK5000 +GHO                =       G3K5004                                               : ARR( 0.676E-10,     0., 0.0);
+{  2845} GDK5000 +GNO3               =       G3K5004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  2846} GDK5000+HV               =       G3K3000 +      G2D2000                                :  0.100E+01*SUN;
+{  2847} GDK5000+HV               =       G2K4000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  2848} G3K5004 +GHO2               =  0.800GGK5000 + 0.200GAK5000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  2849} G3K5004 +GNO                =       G2K4000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  2850} G3K5004 +GNO2               =       GPK5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  2851} G3K5004 +GNO3               =       G2K4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  2852} G3K5004 +MEPERO             =  0.685G2K4000 + 0.315GAK5000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2853} G3K5004 +PERO1              =  0.800G2K4000 + 0.200GAK5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2854} G3K5004 +PERO2              =  0.750G2K4000 + 0.250GAK5000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2855} G3K5004 +PERO3              =  0.800G2K4000 + 0.200GAK5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2856} G3K5004 +PERO5              =  0.650G2K4000 + 0.350GAK5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2857} G3K5004 +PERO6              =  0.650G2K4000 + 0.350GAK5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  2858} G3K5004 +PERO9              =       G2K4000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  2859} G2K4000 +GNO                =       G1K4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  2860} G2K4000 +GNO                =       GNK4000                                               : ARR( 0.111E-12,  -360., 0.0);
+{  2861} G2K4000 +GHO2               =       GHK4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  2862} G2K4000 +GNO3               =       G1K4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2863} G2K4000 +MEPERO             =  0.480G1K4000 + 0.260GKO4000 + 0.260GDK4002                 : ARR( 0.164E-12,  -795., 0.0);
+{  2864} G2K4000 +PERO1              =  0.600G1K4000 + 0.200GKO4000 + 0.200GDK4002                 : ARR( 0.126E-12,  -850., 0.0);
+{  2865} G2K4000 +PERO2              =  0.560G1K4000 + 0.220GKO4000 + 0.220GDK4002                 : ARR( 0.471E-13, -1350., 0.0);
+{  2866} G2K4000 +PERO3              =  0.600G1K4000 + 0.200GKO4000 + 0.200GDK4002                 : ARR( 0.142E-12, -1200., 0.0);
+{  2867} G2K4000 +PERO5              =  0.600G1K4000 + 0.200GKO4000 + 0.200GDK4002                 : ARR( 0.533E-11,   500., 0.0);
+{  2868} G2K4000 +PERO6              =  0.460G1K4000 + 0.270GKO4000 + 0.270GDK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  2869} G2K4000 +PERO9              =  0.800G1K4000 + 0.200GDK4002                                : ARR( 0.100E-10,     0., 0.0);
+{  2870} G1K4000                     =       G3K3000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  2871} GG05000 +GHO                =       G2G5000                                               : ARR( 0.118E-11,     0., 0.0);
+{  2872} GG05000 +GHO                =       G2G5001                                               : ARR( 0.145E-11,     0., 0.0);
+{  2873} GG05000 +GHO                =       G2G5002                                               : ARR( 0.882E-12,     0., 0.0);
+{  2874} GG05000 +GHO                =       G3K5000                                               : ARR( 0.195E-11,  -190., 0.0);
+{  2875} GG05000+HV               =       G204000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  2876} G2G5000 +GNO                =       G1G5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2877} G2G5000 +GNO                =       GGN5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2878} G2G5000 +GHO2               =       GGH5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2879} G2G5000 +GNO3               =       G1G5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2880} G2G5000 +MEPERO             =  0.480G1G5000 + 0.260GGO5000 + 0.260GGK5001                 : ARR( 0.616E-11,   905., 0.0);
+{  2881} G2G5000 +PERO1              =  0.600G1G5000 + 0.200GGO5000 + 0.200GGK5001                 : ARR( 0.473E-11,   850., 0.0);
+{  2882} G2G5000 +PERO2              =  0.560G1G5000 + 0.220GGO5000 + 0.220GGK5001                 : ARR( 0.177E-11,   350., 0.0);
+{  2883} G2G5000 +PERO3              =  0.600G1G5000 + 0.200GGO5000 + 0.200GGK5001                 : ARR( 0.533E-11,   500., 0.0);
+{  2884} G2G5000 +PERO5              =  0.600G1G5000 + 0.200GGO5000 + 0.200GGK5001                 : ARR( 0.200E-09,  2200., 0.0);
+{  2885} G2G5000 +PERO6              =  0.460G1G5000 + 0.270GGO5000 + 0.270GGK5001                 : ARR( 0.183E-11,   450., 0.0);
+{  2886} G2G5000 +PERO9              =  0.800G1G5000 + 0.200GGK5001                                : ARR( 0.100E-10,     0., 0.0);
+{  2887} G2G5001 +GNO                =       G1G5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2888} G2G5001 +GNO                =       GGN5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2889} G2G5001 +GHO2               =       GGH5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2890} G2G5001 +GNO3               =       G1G5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2891} G2G5001 +MEPERO             =  0.480G1G5001 + 0.260GGO5002 + 0.260GGK5000                 : ARR( 0.616E-11,   905., 0.0);
+{  2892} G2G5001 +PERO1              =  0.600G1G5001 + 0.200GGO5002 + 0.200GGK5000                 : ARR( 0.473E-11,   850., 0.0);
+{  2893} G2G5001 +PERO2              =  0.560G1G5001 + 0.220GGO5002 + 0.220GGK5000                 : ARR( 0.177E-11,   350., 0.0);
+{  2894} G2G5001 +PERO3              =  0.600G1G5001 + 0.200GGO5002 + 0.200GGK5000                 : ARR( 0.533E-11,   500., 0.0);
+{  2895} G2G5001 +PERO5              =  0.600G1G5001 + 0.200GGO5002 + 0.200GGK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{  2896} G2G5001 +PERO6              =  0.460G1G5001 + 0.270GGO5002 + 0.270GGK5000                 : ARR( 0.183E-11,   450., 0.0);
+{  2897} G2G5001 +PERO9              =  0.800G1G5001 + 0.200GGK5000                                : ARR( 0.100E-10,     0., 0.0);
+{  2898} G2G5002 +GNO                =       G1G5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2899} G2G5002 +GNO                =       GGN5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2900} G2G5002 +GHO2               =       GGH5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2901} G2G5002 +GNO3               =       G1G5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2902} G2G5002 +MEPERO             =  0.340G1G5002 + 0.330GGO5003 + 0.330GGK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{  2903} G2G5002 +PERO1              =  0.460G1G5002 + 0.270GGO5003 + 0.270GGK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{  2904} G2G5002 +PERO2              =  0.400G1G5002 + 0.300GGO5003 + 0.300GGK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{  2905} G2G5002 +PERO3              =  0.460G1G5002 + 0.270GGO5003 + 0.270GGK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{  2906} G2G5002 +PERO5              =  0.460G1G5002 + 0.270GGO5003 + 0.270GGK5002                 : ARR( 0.183E-11,   450., 0.0);
+{  2907} G2G5002 +PERO6              =  0.300G1G5002 + 0.350GGO5003 + 0.350GGK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{  2908} G2G5002 +PERO9              =  0.650G1G5002 + 0.350GGK5002                                : ARR( 0.100E-10,     0., 0.0);
+{  2909} G1G5000                     =       GD02000 +      G2G3000                                : ARR( 0.200E+15,  6864., 0.0);
+{  2910} G1G5001                     =       G202000 +      GGD3000                                : ARR( 0.200E+15,  6824., 0.0);
+{  2911} G1G5001                     =       GD03000 +      G2G2000                                : ARR( 0.200E+15,  7196., 0.0);
+{  2912} G1G5002                     =       GD04000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  2913} G2G3000 +GNO                =       G1G3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  2914} G2G3000 +GNO                =       GGN3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{  2915} G2G3000 +GHO2               =       GGH3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{  2916} G2G3000 +GNO3               =       G1G3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2917} G2G3000 +MEPERO             =  0.480G1G3000 + 0.260GGO3000 + 0.260GGD3000                 : ARR( 0.146E-12,  -445., 0.0);
+{  2918} G2G3000 +PERO1              =  0.600G1G3000 + 0.200GGO3000 + 0.200GGD3000                 : ARR( 0.112E-12,  -500., 0.0);
+{  2919} G2G3000 +PERO2              =  0.560G1G3000 + 0.220GGO3000 + 0.220GGD3000                 : ARR( 0.418E-13, -1000., 0.0);
+{  2920} G2G3000 +PERO3              =  0.600G1G3000 + 0.200GGO3000 + 0.200GGD3000                 : ARR( 0.126E-12,  -850., 0.0);
+{  2921} G2G3000 +PERO5              =  0.600G1G3000 + 0.200GGO3000 + 0.200GGD3000                 : ARR( 0.473E-11,   850., 0.0);
+{  2922} G2G3000 +PERO6              =  0.460G1G3000 + 0.270GGO3000 + 0.270GGD3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  2923} G2G3000 +PERO9              =  0.800G1G3000 + 0.200GGD3000                                : ARR( 0.100E-10,     0., 0.0);
+{  2924} G2G2000 +GNO                =       G1G2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{  2925} G2G2000 +GHO2               =       GGH2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{  2926} G2G2000 +GNO3               =       G1G2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2927} G2G2000 +MEPERO             =  0.480G1G2000 + 0.260GGO2000 + 0.260GGD2000                 : ARR( 0.164E-12,  -795., 0.0);
+{  2928} G2G2000 +PERO1              =  0.600G1G2000 + 0.200GGO2000 + 0.200GGD2000                 : ARR( 0.126E-12,  -850., 0.0);
+{  2929} G2G2000 +PERO2              =  0.560G1G2000 + 0.220GGO2000 + 0.220GGD2000                 : ARR( 0.471E-13, -1350., 0.0);
+{  2930} G2G2000 +PERO3              =  0.600G1G2000 + 0.200GGO2000 + 0.200GGD2000                 : ARR( 0.142E-12, -1200., 0.0);
+{  2931} G2G2000 +PERO5              =  0.600G1G2000 + 0.200GGO2000 + 0.200GGD2000                 : ARR( 0.533E-11,   500., 0.0);
+{  2932} G2G2000 +PERO6              =  0.460G1G2000 + 0.270GGO2000 + 0.270GGD2000                 : ARR( 0.488E-13, -1250., 0.0);
+{  2933} G2G2000 +PERO9              =  0.800G1G2000 + 0.200GGD2000                                : ARR( 0.100E-10,     0., 0.0);
+{  2934} G1G3000 +OXYGEN             =       GGD3000 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  2935} G1G2000                     =       GCO     +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5835., 0.0);
+{  2936} GA05000 +GHO                =       G2A5000                                               : ARR( 0.120E-11,     0., 0.0);
+{  2937} GA05000 +GHO                =       G2A5001                                               : ARR( 0.148E-11,     0., 0.0);
+{  2938} GA05000 +GHO                =       G2A5002                                               : ARR( 0.666E-12,     0., 0.0);
+{  2939} GA05000 +GHO                =       G204000 +      GCO2                                   : ARR( 0.543E-12,     0., 0.0);
+{  2940} G2A5000 +GNO                =       G1A5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2941} G2A5000 +GNO                =       GAN5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2942} G2A5000 +GHO2               =       GAH5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2943} G2A5000 +GNO3               =       G1A5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2944} G2A5000 +MEPERO             =  0.480G1A5000 + 0.260GAO5000 + 0.260GAK5001                 : ARR( 0.616E-11,   905., 0.0);
+{  2945} G2A5000 +PERO1              =  0.600G1A5000 + 0.200GAO5000 + 0.200GAK5001                 : ARR( 0.473E-11,   850., 0.0);
+{  2946} G2A5000 +PERO2              =  0.560G1A5000 + 0.220GAO5000 + 0.220GAK5001                 : ARR( 0.177E-11,   350., 0.0);
+{  2947} G2A5000 +PERO3              =  0.600G1A5000 + 0.200GAO5000 + 0.200GAK5001                 : ARR( 0.533E-11,   500., 0.0);
+{  2948} G2A5000 +PERO5              =  0.600G1A5000 + 0.200GAO5000 + 0.200GAK5001                 : ARR( 0.200E-09,  2200., 0.0);
+{  2949} G2A5000 +PERO6              =  0.460G1A5000 + 0.270GAO5000 + 0.270GAK5001                 : ARR( 0.183E-11,   450., 0.0);
+{  2950} G2A5000 +PERO9              =  0.800G1A5000 + 0.200GAK5001                                : ARR( 0.100E-10,     0., 0.0);
+{  2951} G2A5001 +GNO                =       G1A5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2952} G2A5001 +GNO                =       GAN5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2953} G2A5001 +GHO2               =       GAH5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2954} G2A5001 +GNO3               =       G1A5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2955} G2A5001 +MEPERO             =  0.480G1A5001 + 0.260GAO5002 + 0.260GAK5000                 : ARR( 0.616E-11,   905., 0.0);
+{  2956} G2A5001 +PERO1              =  0.600G1A5001 + 0.200GAO5002 + 0.200GAK5000                 : ARR( 0.473E-11,   850., 0.0);
+{  2957} G2A5001 +PERO2              =  0.560G1A5001 + 0.220GAO5002 + 0.220GAK5000                 : ARR( 0.177E-11,   350., 0.0);
+{  2958} G2A5001 +PERO3              =  0.600G1A5001 + 0.200GAO5002 + 0.200GAK5000                 : ARR( 0.533E-11,   500., 0.0);
+{  2959} G2A5001 +PERO5              =  0.600G1A5001 + 0.200GAO5002 + 0.200GAK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{  2960} G2A5001 +PERO6              =  0.460G1A5001 + 0.270GAO5002 + 0.270GAK5000                 : ARR( 0.183E-11,   450., 0.0);
+{  2961} G2A5001 +PERO9              =  0.800G1A5001 + 0.200GAK5000                                : ARR( 0.100E-10,     0., 0.0);
+{  2962} G2A5002 +GNO                =       G1A5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  2963} G2A5002 +GNO                =       GAN5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  2964} G2A5002 +GHO2               =       GAH5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{  2965} G2A5002 +GNO3               =       G1A5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2966} G2A5002 +MEPERO             =  0.340G1A5002 + 0.330GAO5003 + 0.330GAK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{  2967} G2A5002 +PERO1              =  0.460G1A5002 + 0.270GAO5003 + 0.270GAK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{  2968} G2A5002 +PERO2              =  0.400G1A5002 + 0.300GAO5003 + 0.300GAK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{  2969} G2A5002 +PERO3              =  0.460G1A5002 + 0.270GAO5003 + 0.270GAK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{  2970} G2A5002 +PERO5              =  0.460G1A5002 + 0.270GAO5003 + 0.270GAK5002                 : ARR( 0.183E-11,   450., 0.0);
+{  2971} G2A5002 +PERO6              =  0.300G1A5002 + 0.350GAO5003 + 0.350GAK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{  2972} G2A5002 +PERO9              =  0.650G1A5002 + 0.350GAK5002                                : ARR( 0.100E-10,     0., 0.0);
+{  2973} G1A5000                     =       GD02000 +      G2A3000                                : ARR( 0.200E+15,  6864., 0.0);
+{  2974} G1A5001                     =       G202000 +      GAD3000                                : ARR( 0.200E+15,  6824., 0.0);
+{  2975} G1A5001                     =       GD03000 +      G2A2000                                : ARR( 0.200E+15,  7196., 0.0);
+{  2976} G1A5002                     =       GD04000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  2977} G2A3000 +GNO                =       G1A3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  2978} G2A3000 +GNO                =       GAN3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{  2979} G2A3000 +GHO2               =       GAH3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{  2980} G2A3000 +GNO3               =       G1A3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2981} G2A3000 +MEPERO             =  0.480G1A3000 + 0.260GAO3000 + 0.260GAD3000                 : ARR( 0.146E-12,  -445., 0.0);
+{  2982} G2A3000 +PERO1              =  0.600G1A3000 + 0.200GAO3000 + 0.200GAD3000                 : ARR( 0.112E-12,  -500., 0.0);
+{  2983} G2A3000 +PERO2              =  0.560G1A3000 + 0.220GAO3000 + 0.220GAD3000                 : ARR( 0.418E-13, -1000., 0.0);
+{  2984} G2A3000 +PERO3              =  0.600G1A3000 + 0.200GAO3000 + 0.200GAD3000                 : ARR( 0.126E-12,  -850., 0.0);
+{  2985} G2A3000 +PERO5              =  0.600G1A3000 + 0.200GAO3000 + 0.200GAD3000                 : ARR( 0.473E-11,   850., 0.0);
+{  2986} G2A3000 +PERO6              =  0.460G1A3000 + 0.270GAO3000 + 0.270GAD3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  2987} G2A3000 +PERO9              =  0.800G1A3000 + 0.200GAD3000                                : ARR( 0.100E-10,     0., 0.0);
+{  2988} G2A2000 +GNO                =       G1A2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{  2989} G2A2000 +GHO2               =       GAH2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{  2990} G2A2000 +GNO3               =       G1A2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  2991} G2A2000 +MEPERO             =  0.480G1A2000 + 0.260GAO2000 + 0.260GAD2000                 : ARR( 0.164E-12,  -795., 0.0);
+{  2992} G2A2000 +PERO1              =  0.600G1A2000 + 0.200GAO2000 + 0.200GAD2000                 : ARR( 0.126E-12,  -850., 0.0);
+{  2993} G2A2000 +PERO2              =  0.560G1A2000 + 0.220GAO2000 + 0.220GAD2000                 : ARR( 0.471E-13, -1350., 0.0);
+{  2994} G2A2000 +PERO3              =  0.600G1A2000 + 0.200GAO2000 + 0.200GAD2000                 : ARR( 0.142E-12, -1200., 0.0);
+{  2995} G2A2000 +PERO5              =  0.600G1A2000 + 0.200GAO2000 + 0.200GAD2000                 : ARR( 0.533E-11,   500., 0.0);
+{  2996} G2A2000 +PERO6              =  0.460G1A2000 + 0.270GAO2000 + 0.270GAD2000                 : ARR( 0.488E-13, -1250., 0.0);
+{  2997} G2A2000 +PERO9              =  0.800G1A2000 + 0.200GAD2000                                : ARR( 0.100E-10,     0., 0.0);
+{  2998} G1A3000 +OXYGEN             =       GAD3000 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  2999} G1A2000                     =       GCO     +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5804., 0.0);
+{  3000} GP05000                     =       G3K5000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  3001} GP05000 +GHO                =       G2P5000                                               : ARR( 0.121E-11,     0., 0.0);
+{  3002} GP05000 +GHO                =       G2P5001                                               : ARR( 0.148E-11,     0., 0.0);
+{  3003} GP05000 +GHO                =       G2P5002                                               : ARR( 0.904E-12,     0., 0.0);
+{  3004} GP05000+HV               =       G3K5000 +      GNO2                                   :  0.100E+01*SUN;
+{  3005} G2P5000 +GNO                =       G1P5000 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3006} G2P5000 +GNO                =       GPN5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3007} G2P5000 +GHO2               =       GPH5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3008} G2P5000 +GNO3               =       G1P5000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3009} G2P5000 +MEPERO             =  0.480G1P5000 + 0.260GPO5000 + 0.260GPK5001                 : ARR( 0.616E-11,   905., 0.0);
+{  3010} G2P5000 +PERO1              =  0.600G1P5000 + 0.200GPO5000 + 0.200GPK5001                 : ARR( 0.473E-11,   850., 0.0);
+{  3011} G2P5000 +PERO2              =  0.560G1P5000 + 0.220GPO5000 + 0.220GPK5001                 : ARR( 0.177E-11,   350., 0.0);
+{  3012} G2P5000 +PERO3              =  0.600G1P5000 + 0.200GPO5000 + 0.200GPK5001                 : ARR( 0.533E-11,   500., 0.0);
+{  3013} G2P5000 +PERO5              =  0.600G1P5000 + 0.200GPO5000 + 0.200GPK5001                 : ARR( 0.200E-09,  2200., 0.0);
+{  3014} G2P5000 +PERO6              =  0.460G1P5000 + 0.270GPO5000 + 0.270GPK5001                 : ARR( 0.183E-11,   450., 0.0);
+{  3015} G2P5000 +PERO9              =  0.800G1P5000 + 0.200GPK5001                                : ARR( 0.100E-10,     0., 0.0);
+{  3016} G2P5001 +GNO                =       G1P5001 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3017} G2P5001 +GNO                =       GPN5002                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3018} G2P5001 +GHO2               =       GPH5001                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3019} G2P5001 +GNO3               =       G1P5001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3020} G2P5001 +MEPERO             =  0.480G1P5001 + 0.260GPO5002 + 0.260GPK5000                 : ARR( 0.616E-11,   905., 0.0);
+{  3021} G2P5001 +PERO1              =  0.600G1P5001 + 0.200GPO5002 + 0.200GPK5000                 : ARR( 0.473E-11,   850., 0.0);
+{  3022} G2P5001 +PERO2              =  0.560G1P5001 + 0.220GPO5002 + 0.220GPK5000                 : ARR( 0.177E-11,   350., 0.0);
+{  3023} G2P5001 +PERO3              =  0.600G1P5001 + 0.200GPO5002 + 0.200GPK5000                 : ARR( 0.533E-11,   500., 0.0);
+{  3024} G2P5001 +PERO5              =  0.600G1P5001 + 0.200GPO5002 + 0.200GPK5000                 : ARR( 0.200E-09,  2200., 0.0);
+{  3025} G2P5001 +PERO6              =  0.460G1P5001 + 0.270GPO5002 + 0.270GPK5000                 : ARR( 0.183E-11,   450., 0.0);
+{  3026} G2P5001 +PERO9              =  0.800G1P5001 + 0.200GPK5000                                : ARR( 0.100E-10,     0., 0.0);
+{  3027} G2P5002 +GNO                =       G1P5002 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3028} G2P5002 +GNO                =       GPN5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3029} G2P5002 +GHO2               =       GPH5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3030} G2P5002 +GNO3               =       G1P5002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3031} G2P5002 +MEPERO             =  0.340G1P5002 + 0.330GPO5003 + 0.330GPK5002                 : ARR( 0.565E-13,  -845., 0.0);
+{  3032} G2P5002 +PERO1              =  0.460G1P5002 + 0.270GPO5003 + 0.270GPK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{  3033} G2P5002 +PERO2              =  0.400G1P5002 + 0.300GPO5003 + 0.300GPK5002                 : ARR( 0.162E-13, -1400., 0.0);
+{  3034} G2P5002 +PERO3              =  0.460G1P5002 + 0.270GPO5003 + 0.270GPK5002                 : ARR( 0.488E-13, -1250., 0.0);
+{  3035} G2P5002 +PERO5              =  0.460G1P5002 + 0.270GPO5003 + 0.270GPK5002                 : ARR( 0.183E-11,   450., 0.0);
+{  3036} G2P5002 +PERO6              =  0.300G1P5002 + 0.350GPO5003 + 0.350GPK5002                 : ARR( 0.168E-13, -1300., 0.0);
+{  3037} G2P5002 +PERO9              =  0.650G1P5002 + 0.350GPK5002                                : ARR( 0.100E-10,     0., 0.0);
+{  3038} G1P5000                     =       GD02000 +      G2P3000                                : ARR( 0.200E+15,  6864., 0.0);
+{  3039} G1P5001                     =       G202000 +      GPD3000                                : ARR( 0.200E+15,  6824., 0.0);
+{  3040} G1P5001                     =       GD03000 +      G2P2000                                : ARR( 0.200E+15,  7196., 0.0);
+{  3041} G1P5002                     =       GD04000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  3042} G2P3000 +GNO                =       G1P3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  3043} G2P3000 +GNO                =       GPN3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{  3044} G2P3000 +GHO2               =       GPH3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{  3045} G2P3000 +GNO3               =       G1P3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3046} G2P3000 +MEPERO             =  0.480G1P3000 + 0.260GPO3000 + 0.260GPD3000                 : ARR( 0.146E-12,  -445., 0.0);
+{  3047} G2P3000 +PERO1              =  0.600G1P3000 + 0.200GPO3000 + 0.200GPD3000                 : ARR( 0.112E-12,  -500., 0.0);
+{  3048} G2P3000 +PERO2              =  0.560G1P3000 + 0.220GPO3000 + 0.220GPD3000                 : ARR( 0.418E-13, -1000., 0.0);
+{  3049} G2P3000 +PERO3              =  0.600G1P3000 + 0.200GPO3000 + 0.200GPD3000                 : ARR( 0.126E-12,  -850., 0.0);
+{  3050} G2P3000 +PERO5              =  0.600G1P3000 + 0.200GPO3000 + 0.200GPD3000                 : ARR( 0.473E-11,   850., 0.0);
+{  3051} G2P3000 +PERO6              =  0.460G1P3000 + 0.270GPO3000 + 0.270GPD3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  3052} G2P3000 +PERO9              =  0.800G1P3000 + 0.200GPD3000                                : ARR( 0.100E-10,     0., 0.0);
+{  3053} G2P2000 +GNO                =       G1P2000 +      GNO2                                   : ARR( 0.270E-11,  -360., 0.0);
+{  3054} G2P2000 +GHO2               =       GPH2000                                               : ARR( 0.133E-12, -1250., 0.0);
+{  3055} G2P2000 +GNO3               =       G1P2000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3056} G2P2000 +MEPERO             =  0.480G1P2000 + 0.260GPO2000 + 0.260GPD2000                 : ARR( 0.164E-12,  -795., 0.0);
+{  3057} G2P2000 +PERO1              =  0.600G1P2000 + 0.200GPO2000 + 0.200GPD2000                 : ARR( 0.126E-12,  -850., 0.0);
+{  3058} G2P2000 +PERO2              =  0.560G1P2000 + 0.220GPO2000 + 0.220GPD2000                 : ARR( 0.471E-13, -1350., 0.0);
+{  3059} G2P2000 +PERO3              =  0.600G1P2000 + 0.200GPO2000 + 0.200GPD2000                 : ARR( 0.142E-12, -1200., 0.0);
+{  3060} G2P2000 +PERO5              =  0.600G1P2000 + 0.200GPO2000 + 0.200GPD2000                 : ARR( 0.533E-11,   500., 0.0);
+{  3061} G2P2000 +PERO6              =  0.460G1P2000 + 0.270GPO2000 + 0.270GPD2000                 : ARR( 0.488E-13, -1250., 0.0);
+{  3062} G2P2000 +PERO9              =  0.800G1P2000 + 0.200GPD2000                                : ARR( 0.100E-10,     0., 0.0);
+{  3063} G1P3000 +OXYGEN             =       GPD3000 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  3064} G1P2000                     =       GCO     +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  5835., 0.0);
+{  3065} GN04000 +GHO                =       G2N4000                                               : ARR( 0.178E-12,     0., 0.0);
+{  3066} GN04000 +GHO                =       G2N4004                                               : ARR( 0.122E-11,     0., 0.0);
+{  3067} GN04000 +GHO                =       G2N4005                                               : ARR( 0.300E-12,     0., 0.0);
+{  3068} GN04000+HV               =       G104000 +      GNO2                                   :  0.100E+01*SUN;
+{  3069} G2N4004 +GNO                =       G1N4004 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3070} G2N4004 +GNO                =       GNN4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3071} G2N4004 +GHO2               =       GHN4008                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3072} G2N4004 +GNO3               =       G1N4004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3073} G2N4004 +MEPERO             =  0.480G1N4004 + 0.260GNO4001 + 0.260GNK4001                 : ARR( 0.616E-11,   905., 0.0);
+{  3074} G2N4004 +PERO1              =  0.600G1N4004 + 0.200GNO4001 + 0.200GNK4001                 : ARR( 0.473E-11,   850., 0.0);
+{  3075} G2N4004 +PERO2              =  0.560G1N4004 + 0.220GNO4001 + 0.220GNK4001                 : ARR( 0.177E-11,   350., 0.0);
+{  3076} G2N4004 +PERO3              =  0.600G1N4004 + 0.200GNO4001 + 0.200GNK4001                 : ARR( 0.533E-11,   500., 0.0);
+{  3077} G2N4004 +PERO5              =  0.600G1N4004 + 0.200GNO4001 + 0.200GNK4001                 : ARR( 0.200E-09,  2200., 0.0);
+{  3078} G2N4004 +PERO6              =  0.460G1N4004 + 0.270GNO4001 + 0.270GNK4001                 : ARR( 0.183E-11,   450., 0.0);
+{  3079} G2N4004 +PERO9              =  0.800G1N4004 + 0.200GNK4001                                : ARR( 0.100E-10,     0., 0.0);
+{  3080} G2N4005 +GNO                =       G1N4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3081} G2N4005 +GNO                =       GNN4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3082} G2N4005 +GHO2               =       GHN4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3083} G2N4005 +GNO3               =       G1N4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3084} G2N4005 +MEPERO             =  0.340G1N4005 + 0.330GNO4006 + 0.330GNK4000                 : ARR( 0.565E-13,  -845., 0.0);
+{  3085} G2N4005 +PERO1              =  0.460G1N4005 + 0.270GNO4006 + 0.270GNK4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  3086} G2N4005 +PERO2              =  0.400G1N4005 + 0.300GNO4006 + 0.300GNK4000                 : ARR( 0.162E-13, -1400., 0.0);
+{  3087} G2N4005 +PERO3              =  0.460G1N4005 + 0.270GNO4006 + 0.270GNK4000                 : ARR( 0.488E-13, -1250., 0.0);
+{  3088} G2N4005 +PERO5              =  0.460G1N4005 + 0.270GNO4006 + 0.270GNK4000                 : ARR( 0.183E-11,   450., 0.0);
+{  3089} G2N4005 +PERO6              =  0.300G1N4005 + 0.350GNO4006 + 0.350GNK4000                 : ARR( 0.168E-13, -1300., 0.0);
+{  3090} G2N4005 +PERO9              =  0.650G1N4005 + 0.350GNK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  3091} G1N4004                     =       GD02000 +      G2N2000                                : ARR( 0.200E+15,  6879., 0.0);
+{  3092} G1N4005                     =       G202000 +      GND2000                                : ARR( 0.200E+15,  7519., 0.0);
+{  3093} GH04000 +GHO                =       G2H4003                                               : ARR( 0.116E-11,     0., 0.0);
+{  3094} GH04000 +GHO                =       G2H4004                                               : ARR( 0.142E-11,     0., 0.0);
+{  3095} GH04000 +GHO                =       GD04000 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  3096} GH04000 +GHO                =       G204000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  3097} GH04000+HV               =       G104000 +      GHO                                    :  0.100E+01*SUN;
+{  3098} G2H4003 +GNO                =       G1H4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3099} G2H4003 +GNO                =       GHN4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3100} G2H4003 +GHO2               =       GHH4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3101} G2H4003 +GNO3               =       G1H4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3102} G2H4003 +MEPERO             =  0.480G1H4003 + 0.260GHO4001 + 0.260GHK4001                 : ARR( 0.616E-11,   905., 0.0);
+{  3103} G2H4003 +PERO1              =  0.600G1H4003 + 0.200GHO4001 + 0.200GHK4001                 : ARR( 0.473E-11,   850., 0.0);
+{  3104} G2H4003 +PERO2              =  0.560G1H4003 + 0.220GHO4001 + 0.220GHK4001                 : ARR( 0.177E-11,   350., 0.0);
+{  3105} G2H4003 +PERO3              =  0.600G1H4003 + 0.200GHO4001 + 0.200GHK4001                 : ARR( 0.533E-11,   500., 0.0);
+{  3106} G2H4003 +PERO5              =  0.600G1H4003 + 0.200GHO4001 + 0.200GHK4001                 : ARR( 0.200E-09,  2200., 0.0);
+{  3107} G2H4003 +PERO6              =  0.460G1H4003 + 0.270GHO4001 + 0.270GHK4001                 : ARR( 0.183E-11,   450., 0.0);
+{  3108} G2H4003 +PERO9              =  0.800G1H4003 + 0.200GHK4001                                : ARR( 0.100E-10,     0., 0.0);
+{  3109} G2H4004 +GNO                =       G1H4004 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3110} G2H4004 +GNO                =       GHN4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3111} G2H4004 +GHO2               =       GHH4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3112} G2H4004 +GNO3               =       G1H4004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3113} G2H4004 +MEPERO             =  0.340G1H4004 + 0.330GHO4006 + 0.330GHK4000                 : ARR( 0.565E-13,  -845., 0.0);
+{  3114} G2H4004 +PERO1              =  0.460G1H4004 + 0.270GHO4006 + 0.270GHK4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  3115} G2H4004 +PERO2              =  0.400G1H4004 + 0.300GHO4006 + 0.300GHK4000                 : ARR( 0.162E-13, -1400., 0.0);
+{  3116} G2H4004 +PERO3              =  0.460G1H4004 + 0.270GHO4006 + 0.270GHK4000                 : ARR( 0.488E-13, -1250., 0.0);
+{  3117} G2H4004 +PERO5              =  0.460G1H4004 + 0.270GHO4006 + 0.270GHK4000                 : ARR( 0.183E-11,   450., 0.0);
+{  3118} G2H4004 +PERO6              =  0.300G1H4004 + 0.350GHO4006 + 0.350GHK4000                 : ARR( 0.168E-13, -1300., 0.0);
+{  3119} G2H4004 +PERO9              =  0.650G1H4004 + 0.350GHK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  3120} G1H4003                     =       GD02000 +      G2H2000                                : ARR( 0.200E+15,  6879., 0.0);
+{  3121} G1H4004                     =       G202000 +      GHD2000                                : ARR( 0.200E+15,  7521., 0.0);
+{  3122} G1H4004                     =       GD03000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  3123} GO04000 +GHO                =       G2O4005                                               : ARR( 0.141E-11,     0., 0.0);
+{  3124} GO04000 +GHO                =       G2O4006                                               : ARR( 0.174E-11,     0., 0.0);
+{  3125} GO04000 +GHO                =       GD04000 +      GHO2                                   : ARR( 0.495E-11,     0., 0.0);
+{  3126} G2O4005 +GNO                =       G1O4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3127} G2O4005 +GNO                =       GNO4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3128} G2O4005 +GHO2               =       GHO4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3129} G2O4005 +GNO3               =       G1O4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3130} G2O4005 +MEPERO             =  0.480G1O4005 + 0.260GOO4001 + 0.260GKO4001                 : ARR( 0.616E-11,   905., 0.0);
+{  3131} G2O4005 +PERO1              =  0.600G1O4005 + 0.200GOO4001 + 0.200GKO4001                 : ARR( 0.473E-11,   850., 0.0);
+{  3132} G2O4005 +PERO2              =  0.560G1O4005 + 0.220GOO4001 + 0.220GKO4001                 : ARR( 0.177E-11,   350., 0.0);
+{  3133} G2O4005 +PERO3              =  0.600G1O4005 + 0.200GOO4001 + 0.200GKO4001                 : ARR( 0.533E-11,   500., 0.0);
+{  3134} G2O4005 +PERO5              =  0.600G1O4005 + 0.200GOO4001 + 0.200GKO4001                 : ARR( 0.200E-09,  2200., 0.0);
+{  3135} G2O4005 +PERO6              =  0.460G1O4005 + 0.270GOO4001 + 0.270GKO4001                 : ARR( 0.183E-11,   450., 0.0);
+{  3136} G2O4005 +PERO9              =  0.800G1O4005 + 0.200GKO4001                                : ARR( 0.100E-10,     0., 0.0);
+{  3137} G2O4006 +GNO                =       G1O4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3138} G2O4006 +GNO                =       GNO4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3139} G2O4006 +GHO2               =       GHO4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3140} G2O4006 +GNO3               =       G1O4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3141} G2O4006 +MEPERO             =  0.340G1O4006 + 0.330GOO4003 + 0.330GKO4000                 : ARR( 0.565E-13,  -845., 0.0);
+{  3142} G2O4006 +PERO1              =  0.460G1O4006 + 0.270GOO4003 + 0.270GKO4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  3143} G2O4006 +PERO2              =  0.400G1O4006 + 0.300GOO4003 + 0.300GKO4000                 : ARR( 0.162E-13, -1400., 0.0);
+{  3144} G2O4006 +PERO3              =  0.460G1O4006 + 0.270GOO4003 + 0.270GKO4000                 : ARR( 0.488E-13, -1250., 0.0);
+{  3145} G2O4006 +PERO5              =  0.460G1O4006 + 0.270GOO4003 + 0.270GKO4000                 : ARR( 0.183E-11,   450., 0.0);
+{  3146} G2O4006 +PERO6              =  0.300G1O4006 + 0.350GOO4003 + 0.350GKO4000                 : ARR( 0.168E-13, -1300., 0.0);
+{  3147} G2O4006 +PERO9              =  0.650G1O4006 + 0.350GKO4000                                : ARR( 0.100E-10,     0., 0.0);
+{  3148} G1O4005                     =       GD02000 +      G2O2000                                : ARR( 0.200E+15,  6879., 0.0);
+{  3149} G1O4006                     =       GD03000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  3150} GDD3000 +GHO                =       G3D3000                                               : ARR( 0.132E-09,     0., 0.0);
+{  3151} GDD3000 +GNO3               =       G3D3000 +      GHNO3                                  : ARR( 0.240E-13,     0., 0.0);
+{  3152} GDD3000+HV               =       GCO     +      G2D2000 +      GHO2                    :  0.200E+01*SUN;
+{  3153} G3D3000 +GHO2               =  0.800GGD3000 + 0.200GAD3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3154} G3D3000 +GNO                =       G2D2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  3155} G3D3000 +GNO2               =       GPD3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3156} G3D3000 +GNO3               =       G2D2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  3157} G3D3000 +MEPERO             =  0.685G2D2000 + 0.315GAD3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3158} G3D3000 +PERO1              =  0.800G2D2000 + 0.200GAD3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3159} G3D3000 +PERO2              =  0.750G2D2000 + 0.250GAD3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3160} G3D3000 +PERO3              =  0.800G2D2000 + 0.200GAD3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3161} G3D3000 +PERO5              =  0.650G2D2000 + 0.350GAD3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3162} G3D3000 +PERO6              =  0.650G2D2000 + 0.350GAD3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3163} G3D3000 +PERO9              =       G2D2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  3164} GDD2000 +GHO                =       G3D2000                                               : ARR( 0.110E-10,     0., 0.0);
+{  3165} GDD2000 +GNO3               =       G3D2000 +      GHNO3                                  : ARR( 0.280E-11,  2375., 0.0);
+{  3166} GDD2000+HV               =       GH2     +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  3167} GDD2000+HV               =  2.000GCO     + 2.000GHO2                                   :  0.100E+01*SUN;
+{  3168} GDD2000+HV               =       GCH2O   +      GCO                                    :  0.100E+01*SUN;
+{  3169} G3D2000 +GHO2               =  0.800GGD2000 + 0.200GAD2000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3170} G3D2000 +GNO                =       GCO     +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  3171}  G3D2000 + GNO2       +M       =       GPD2000         +M                                    : FALL( 0.110E-10,     0.,-1.0, 0.850E-28,     0.,-6.5,0.60);
+{  3172} G3D2000 +GNO3               =       GCO     +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  3173} G3D2000 +MEPERO             =  0.685GCO     + 0.315GAD2000 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3174} G3D2000 +PERO1              =  0.800GCO     + 0.200GAD2000 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3175} G3D2000 +PERO2              =  0.750GCO     + 0.250GAD2000 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3176} G3D2000 +PERO3              =  0.800GCO     + 0.200GAD2000 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3177} G3D2000 +PERO5              =  0.650GCO     + 0.350GAD2000 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3178} G3D2000 +PERO6              =  0.650GCO     + 0.350GAD2000 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3179} G3D2000 +PERO9              =       GCO     +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  3180} GNO4000 +GHO                =       GND4001 +      GHO2                                   : ARR( 0.437E-11,     0., 0.0);
+{  3181} GNO4000 +GHO                =       G2N4006                                               : ARR( 0.153E-11,     0., 0.0);
+{  3182} GNO4000+HV               =       G1O4000 +      GNO2                                   :  0.100E+01*SUN;
+{  3183} G2N4006 +GNO                =       G1N4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3184} G2N4006 +GNO                =       GNN4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3185} G2N4006 +GHO2               =       GHN4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3186} G2N4006 +GNO3               =       G1N4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3187} G2N4006 +MEPERO             =  0.340G1N4006 + 0.330GNO4003 + 0.330GNK4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  3188} G2N4006 +PERO1              =  0.460G1N4006 + 0.270GNO4003 + 0.270GNK4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  3189} G2N4006 +PERO2              =  0.400G1N4006 + 0.300GNO4003 + 0.300GNK4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  3190} G2N4006 +PERO3              =  0.460G1N4006 + 0.270GNO4003 + 0.270GNK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  3191} G2N4006 +PERO5              =  0.460G1N4006 + 0.270GNO4003 + 0.270GNK4002                 : ARR( 0.183E-11,   450., 0.0);
+{  3192} G2N4006 +PERO6              =  0.300G1N4006 + 0.350GNO4003 + 0.350GNK4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  3193} G2N4006 +PERO9              =  0.650G1N4006 + 0.350GNK4002                                : ARR( 0.100E-10,     0., 0.0);
+{  3194} G1N4006                     =       GCH2O   +      GND3000 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  3195} GHO4000 +GHO                =       GHD4001 +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{  3196} GHO4000 +GHO                =       G2H4005                                               : ARR( 0.142E-11,     0., 0.0);
+{  3197} GHO4000 +GHO                =       G2H4006                                               : ARR( 0.142E-11,     0., 0.0);
+{  3198} GHO4000 +GHO                =       GDO4000 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  3199} GHO4000 +GHO                =       G2O4000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  3200} GHO4000+HV               =       G1O4000 +      GHO                                    :  0.100E+01*SUN;
+{  3201} G2H4005 +GNO                =       G1H4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3202} G2H4005 +GNO                =       GHN4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3203} G2H4005 +GHO2               =       GHH4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3204} G2H4005 +GNO3               =       G1H4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3205} G2H4005 +MEPERO             =  0.340G1H4005 + 0.330GHO4003 + 0.330GHK4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  3206} G2H4005 +PERO1              =  0.460G1H4005 + 0.270GHO4003 + 0.270GHK4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  3207} G2H4005 +PERO2              =  0.400G1H4005 + 0.300GHO4003 + 0.300GHK4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  3208} G2H4005 +PERO3              =  0.460G1H4005 + 0.270GHO4003 + 0.270GHK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  3209} G2H4005 +PERO5              =  0.460G1H4005 + 0.270GHO4003 + 0.270GHK4002                 : ARR( 0.183E-11,   450., 0.0);
+{  3210} G2H4005 +PERO6              =  0.300G1H4005 + 0.350GHO4003 + 0.350GHK4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  3211} G2H4005 +PERO9              =  0.650G1H4005 + 0.350GHK4002                                : ARR( 0.100E-10,     0., 0.0);
+{  3212} G2H4006 +GNO                =       G1H4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3213} G2H4006 +GNO                =       GHN400A                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3214} G2H4006 +GHO2               =       GHH4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3215} G2H4006 +GNO3               =       G1H4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3216} G2H4006 +MEPERO             =  0.340G1H4006 + 0.330GHO4002 + 0.330GHK4003                 : ARR( 0.565E-13,  -845., 0.0);
+{  3217} G2H4006 +PERO1              =  0.460G1H4006 + 0.270GHO4002 + 0.270GHK4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  3218} G2H4006 +PERO2              =  0.400G1H4006 + 0.300GHO4002 + 0.300GHK4003                 : ARR( 0.162E-13, -1400., 0.0);
+{  3219} G2H4006 +PERO3              =  0.460G1H4006 + 0.270GHO4002 + 0.270GHK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{  3220} G2H4006 +PERO5              =  0.460G1H4006 + 0.270GHO4002 + 0.270GHK4003                 : ARR( 0.183E-11,   450., 0.0);
+{  3221} G2H4006 +PERO6              =  0.300G1H4006 + 0.350GHO4002 + 0.350GHK4003                 : ARR( 0.168E-13, -1300., 0.0);
+{  3222} G2H4006 +PERO9              =  0.650G1H4006 + 0.350GHK4003                                : ARR( 0.100E-10,     0., 0.0);
+{  3223} G1H4005                     =       GCH2O   +      GHD3000 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  3224} G1H4006                     =       G2O2000 +      GHD2000                                : ARR( 0.200E+15,  7134., 0.0);
+{  3225} G1H4006                     =       GDO3000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  3226} GOO4000 +GHO                =       GDO4000 +      GHO2                                   : ARR( 0.825E-11,     0., 0.0);
+{  3227} GOO4000 +GHO                =       G2O4007                                               : ARR( 0.290E-11,     0., 0.0);
+{  3228} G2O4007 +GNO                =       G1O4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3229} G2O4007 +GNO                =       GNO4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3230} G2O4007 +GHO2               =       GHO4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3231} G2O4007 +GNO3               =       G1O4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3232} G2O4007 +MEPERO             =  0.340G1O4007 + 0.330GOO4002 + 0.330GKO4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  3233} G2O4007 +PERO1              =  0.460G1O4007 + 0.270GOO4002 + 0.270GKO4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  3234} G2O4007 +PERO2              =  0.400G1O4007 + 0.300GOO4002 + 0.300GKO4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  3235} G2O4007 +PERO3              =  0.460G1O4007 + 0.270GOO4002 + 0.270GKO4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  3236} G2O4007 +PERO5              =  0.460G1O4007 + 0.270GOO4002 + 0.270GKO4002                 : ARR( 0.183E-11,   450., 0.0);
+{  3237} G2O4007 +PERO6              =  0.300G1O4007 + 0.350GOO4002 + 0.350GKO4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  3238} G2O4007 +PERO9              =  0.650G1O4007 + 0.350GKO4002                                : ARR( 0.100E-10,     0., 0.0);
+{  3239} G1O4007                     =       GDO3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  3240} GDO4000 +GHO                =       GDD4000 +      GHO2                                   : ARR( 0.416E-11,     0., 0.0);
+{  3241} GDO4000 +GHO                =       G2D4001                                               : ARR( 0.463E-11,     0., 0.0);
+{  3242} GDO4000 +GHO                =       G3K4002                                               : ARR( 0.215E-10,     0., 0.0);
+{  3243} GDO4000 +GNO3               =       G3K4002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3244} GDO4000+HV               =       G2O3001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  3245} GDO4000+HV               =  2.000GD02000                                               :  0.100E+01*SUN;
+{  3246} G2D4001 +GNO                =       G1D4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3247} G2D4001 +GNO                =       GND4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3248} G2D4001 +GHO2               =       GHD4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3249} G2D4001 +GNO3               =       G1D4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3250} G2D4001 +MEPERO             =  0.340G1D4001 + 0.330GDO4002 + 0.330GDK4001                 : ARR( 0.565E-13,  -845., 0.0);
+{  3251} G2D4001 +PERO1              =  0.460G1D4001 + 0.270GDO4002 + 0.270GDK4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  3252} G2D4001 +PERO2              =  0.400G1D4001 + 0.300GDO4002 + 0.300GDK4001                 : ARR( 0.162E-13, -1400., 0.0);
+{  3253} G2D4001 +PERO3              =  0.460G1D4001 + 0.270GDO4002 + 0.270GDK4001                 : ARR( 0.488E-13, -1250., 0.0);
+{  3254} G2D4001 +PERO5              =  0.460G1D4001 + 0.270GDO4002 + 0.270GDK4001                 : ARR( 0.183E-11,   450., 0.0);
+{  3255} G2D4001 +PERO6              =  0.300G1D4001 + 0.350GDO4002 + 0.350GDK4001                 : ARR( 0.168E-13, -1300., 0.0);
+{  3256} G2D4001 +PERO9              =  0.650G1D4001 + 0.350GDK4001                                : ARR( 0.100E-10,     0., 0.0);
+{  3257} G1D4001                     =       GCH2O   +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  3258} GHN5009 +GHO                =       G2H500N                                               : ARR( 0.144E-11,     0., 0.0);
+{  3259} GHN5009 +GHO                =       GND5003 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{  3260} GHN5009 +GHO                =       G2N5006                                               : ARR( 0.194E-11,  -190., 0.0);
+{  3261} GHN5009+HV               =       G1H500Q +      GNO2                                   :  0.100E+01*SUN;
+{  3262} GHN5009+HV               =       G1N5006 +      GHO                                    :  0.100E+01*SUN;
+{  3263} G2H500N +GNO                =       G1H500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3264} G2H500N +GNO                =       GHN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3265} G2H500N +GHO2               =       GHH500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3266} G2H500N +GNO3               =       G1H500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3267} G2H500N +MEPERO             =  0.340G1H500R + 0.330GHN501N + 0.330GHN501F                 : ARR( 0.565E-13,  -845., 0.0);
+{  3268} G2H500N +PERO1              =  0.460G1H500R + 0.270GHN501N + 0.270GHN501F                 : ARR( 0.434E-13,  -900., 0.0);
+{  3269} G2H500N +PERO2              =  0.400G1H500R + 0.300GHN501N + 0.300GHN501F                 : ARR( 0.162E-13, -1400., 0.0);
+{  3270} G2H500N +PERO3              =  0.460G1H500R + 0.270GHN501N + 0.270GHN501F                 : ARR( 0.488E-13, -1250., 0.0);
+{  3271} G2H500N +PERO5              =  0.460G1H500R + 0.270GHN501N + 0.270GHN501F                 : ARR( 0.183E-11,   450., 0.0);
+{  3272} G2H500N +PERO6              =  0.300G1H500R + 0.350GHN501N + 0.350GHN501F                 : ARR( 0.168E-13, -1300., 0.0);
+{  3273} G2H500N +PERO9              =  0.650G1H500R + 0.350GHN501F                                : ARR( 0.100E-10,     0., 0.0);
+{  3274} G1H500Q                     =       GDO5000 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{  3275} G1H500R                     =       G2H500O                                               : ARR( 0.240E+12,  4897., 0.0);
+{  3276} G1H500R                     =       G2N3001 +      GHD2000                                : ARR( 0.200E+15,  6985., 0.0);
+{  3277} G1H500R                     =       GND4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  3278} G2H500O +GNO                =       G1H500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3279} G2H500O +GNO                =       GHN501O                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3280} G2H500O +GHO2               =       GHH500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3281} G2H500O +GNO3               =       G1H500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3282} G2H500O +MEPERO             =  0.480G1H500S + 0.260GHN501P + 0.260GHN501Q                 : ARR( 0.164E-12,  -795., 0.0);
+{  3283} G2H500O +PERO1              =  0.600G1H500S + 0.200GHN501P + 0.200GHN501Q                 : ARR( 0.126E-12,  -850., 0.0);
+{  3284} G2H500O +PERO2              =  0.560G1H500S + 0.220GHN501P + 0.220GHN501Q                 : ARR( 0.471E-13, -1350., 0.0);
+{  3285} G2H500O +PERO3              =  0.600G1H500S + 0.200GHN501P + 0.200GHN501Q                 : ARR( 0.142E-12, -1200., 0.0);
+{  3286} G2H500O +PERO5              =  0.600G1H500S + 0.200GHN501P + 0.200GHN501Q                 : ARR( 0.533E-11,   500., 0.0);
+{  3287} G2H500O +PERO6              =  0.460G1H500S + 0.270GHN501P + 0.270GHN501Q                 : ARR( 0.488E-13, -1250., 0.0);
+{  3288} G2H500O +PERO9              =  0.800G1H500S + 0.200GHN501Q                                : ARR( 0.100E-10,     0., 0.0);
+{  3289} G1H500S                     =       GHN501H +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{  3290} GND5003 +GHO                =       G3N5003                                               : ARR( 0.227E-10,     0., 0.0);
+{  3291} GND5003 +GNO3               =       G3N5003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3292} GND5003+HV               =       G1D5007 +      GNO2                                   :  0.100E+01*SUN;
+{  3293} GND5003+HV               =       G2N4007 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  3294} GND5003+HV               =       G2K3000 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  3295} G3N5003 +GHO2               =  0.800GGN5003 + 0.200GAN5003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3296} G3N5003 +GNO                =       G2N4007 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  3297} G3N5003 +GNO2               =       GPN5003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3298} G3N5003 +GNO3               =       G2N4007 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  3299} G3N5003 +MEPERO             =  0.685G2N4007 + 0.315GAN5003 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3300} G3N5003 +PERO1              =  0.800G2N4007 + 0.200GAN5003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3301} G3N5003 +PERO2              =  0.750G2N4007 + 0.250GAN5003 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3302} G3N5003 +PERO3              =  0.800G2N4007 + 0.200GAN5003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3303} G3N5003 +PERO5              =  0.650G2N4007 + 0.350GAN5003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3304} G3N5003 +PERO6              =  0.650G2N4007 + 0.350GAN5003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3305} G3N5003 +PERO9              =       G2N4007 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  3306} G1D5007                     =       G3K5001                                               : ARR( 0.800E+11,  4559., 0.0);
+{  3307} G1D5007                     =       GD02000 +      G2D3001                                : ARR( 0.200E+15,  6864., 0.0);
+{  3308} G2N4007 +GNO                =       G1N4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3309} G2N4007 +GNO                =       GNN4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3310} G2N4007 +GHO2               =       GHN4009                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3311} G2N4007 +GNO3               =       G1N4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3312} G2N4007 +MEPERO             =  0.480G1N4007 + 0.260GNO4007 + 0.260GND4000                 : ARR( 0.146E-12,  -445., 0.0);
+{  3313} G2N4007 +PERO1              =  0.600G1N4007 + 0.200GNO4007 + 0.200GND4000                 : ARR( 0.112E-12,  -500., 0.0);
+{  3314} G2N4007 +PERO2              =  0.560G1N4007 + 0.220GNO4007 + 0.220GND4000                 : ARR( 0.418E-13, -1000., 0.0);
+{  3315} G2N4007 +PERO3              =  0.600G1N4007 + 0.200GNO4007 + 0.200GND4000                 : ARR( 0.126E-12,  -850., 0.0);
+{  3316} G2N4007 +PERO5              =  0.600G1N4007 + 0.200GNO4007 + 0.200GND4000                 : ARR( 0.473E-11,   850., 0.0);
+{  3317} G2N4007 +PERO6              =  0.460G1N4007 + 0.270GNO4007 + 0.270GND4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  3318} G2N4007 +PERO9              =  0.800G1N4007 + 0.200GND4000                                : ARR( 0.100E-10,     0., 0.0);
+{  3319} G2D3001 +GNO                =       G1D3000 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  3320} G2D3001 +GNO                =       GND3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{  3321} G2D3001 +GHO2               =       GHD3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{  3322} G2D3001 +GNO3               =       G1D3000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3323} G2D3001 +MEPERO             =  0.480G1D3000 + 0.260GDO3000 + 0.260GDD3000                 : ARR( 0.146E-12,  -445., 0.0);
+{  3324} G2D3001 +PERO1              =  0.600G1D3000 + 0.200GDO3000 + 0.200GDD3000                 : ARR( 0.112E-12,  -500., 0.0);
+{  3325} G2D3001 +PERO2              =  0.560G1D3000 + 0.220GDO3000 + 0.220GDD3000                 : ARR( 0.418E-13, -1000., 0.0);
+{  3326} G2D3001 +PERO3              =  0.600G1D3000 + 0.200GDO3000 + 0.200GDD3000                 : ARR( 0.126E-12,  -850., 0.0);
+{  3327} G2D3001 +PERO5              =  0.600G1D3000 + 0.200GDO3000 + 0.200GDD3000                 : ARR( 0.473E-11,   850., 0.0);
+{  3328} G2D3001 +PERO6              =  0.460G1D3000 + 0.270GDO3000 + 0.270GDD3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  3329} G2D3001 +PERO9              =  0.800G1D3000 + 0.200GDD3000                                : ARR( 0.100E-10,     0., 0.0);
+{  3330} G1N4007 +OXYGEN             =       GND4000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  3331} G1N4007                     =       G2N4008                                               : ARR( 0.240E+12,  4897., 0.0);
+{  3332} G2N4008 +GNO                =       G1N4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  3333} G2N4008 +GNO                =       GNN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{  3334} G2N4008 +GHO2               =       GHN400A                                               : ARR( 0.214E-12, -1250., 0.0);
+{  3335} G2N4008 +GNO3               =       G1N4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3336} G2N4008 +MEPERO             =  0.480G1N4008 + 0.260GNO4005 + 0.260GND4006                 : ARR( 0.164E-12,  -795., 0.0);
+{  3337} G2N4008 +PERO1              =  0.600G1N4008 + 0.200GNO4005 + 0.200GND4006                 : ARR( 0.126E-12,  -850., 0.0);
+{  3338} G2N4008 +PERO2              =  0.560G1N4008 + 0.220GNO4005 + 0.220GND4006                 : ARR( 0.471E-13, -1350., 0.0);
+{  3339} G2N4008 +PERO3              =  0.600G1N4008 + 0.200GNO4005 + 0.200GND4006                 : ARR( 0.142E-12, -1200., 0.0);
+{  3340} G2N4008 +PERO5              =  0.600G1N4008 + 0.200GNO4005 + 0.200GND4006                 : ARR( 0.533E-11,   500., 0.0);
+{  3341} G2N4008 +PERO6              =  0.460G1N4008 + 0.270GNO4005 + 0.270GND4006                 : ARR( 0.488E-13, -1250., 0.0);
+{  3342} G2N4008 +PERO9              =  0.800G1N4008 + 0.200GND4006                                : ARR( 0.100E-10,     0., 0.0);
+{  3343} G1N4008                     =       GND4002 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  3344} GNN5006 +GHO                =       G2N5012                                               : ARR( 0.670E-13,     0., 0.0);
+{  3345} GNN5006 +GHO                =       GNK5004 +      GNO2                                   : ARR( 0.191E-12,     0., 0.0);
+{  3346} GNN5006 +GHO                =       G2N5013                                               : ARR( 0.565E-13,     0., 0.0);
+{  3347} GNN5006+HV               =       G1N5007 +      GNO2                                   :  0.200E+01*SUN;
+{  3348} G2N5012 +GNO                =       G1N5013 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3349} G2N5012 +GNO                =       GNN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3350} G2N5012 +GHO2               =       GHN501D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3351} G2N5012 +GNO3               =       G1N5013 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3352} G2N5012 +MEPERO             =  0.480G1N5013 + 0.260GNN500B + 0.260GNN500s                 : ARR( 0.164E-12,  -795., 0.0);
+{  3353} G2N5012 +PERO1              =  0.600G1N5013 + 0.200GNN500B + 0.200GNN500s                 : ARR( 0.126E-12,  -850., 0.0);
+{  3354} G2N5012 +PERO2              =  0.560G1N5013 + 0.220GNN500B + 0.220GNN500s                 : ARR( 0.471E-13, -1350., 0.0);
+{  3355} G2N5012 +PERO3              =  0.600G1N5013 + 0.200GNN500B + 0.200GNN500s                 : ARR( 0.142E-12, -1200., 0.0);
+{  3356} G2N5012 +PERO5              =  0.600G1N5013 + 0.200GNN500B + 0.200GNN500s                 : ARR( 0.533E-11,   500., 0.0);
+{  3357} G2N5012 +PERO6              =  0.460G1N5013 + 0.270GNN500B + 0.270GNN500s                 : ARR( 0.488E-13, -1250., 0.0);
+{  3358} G2N5012 +PERO9              =  0.800G1N5013 + 0.200GNN500s                                : ARR( 0.100E-10,     0., 0.0);
+{  3359} G2N5013 +GNO                =       G1N5014 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3360} G2N5013 +GNO                =       GNN500t                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3361} G2N5013 +GHO2               =       GHN501R                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3362} G2N5013 +GNO3               =       G1N5014 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3363} G2N5013 +MEPERO             =  0.340G1N5014 + 0.330GNN500u + 0.330GNN500v                 : ARR( 0.565E-13,  -845., 0.0);
+{  3364} G2N5013 +PERO1              =  0.460G1N5014 + 0.270GNN500u + 0.270GNN500v                 : ARR( 0.434E-13,  -900., 0.0);
+{  3365} G2N5013 +PERO2              =  0.400G1N5014 + 0.300GNN500u + 0.300GNN500v                 : ARR( 0.162E-13, -1400., 0.0);
+{  3366} G2N5013 +PERO3              =  0.460G1N5014 + 0.270GNN500u + 0.270GNN500v                 : ARR( 0.488E-13, -1250., 0.0);
+{  3367} G2N5013 +PERO5              =  0.460G1N5014 + 0.270GNN500u + 0.270GNN500v                 : ARR( 0.183E-11,   450., 0.0);
+{  3368} G2N5013 +PERO6              =  0.300G1N5014 + 0.350GNN500u + 0.350GNN500v                 : ARR( 0.168E-13, -1300., 0.0);
+{  3369} G2N5013 +PERO9              =  0.650G1N5014 + 0.350GNN500v                                : ARR( 0.100E-10,     0., 0.0);
+{  3370} G1N5013 +OXYGEN             =       GNN500s +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  3371} G1N5013                     =       GNK5006 +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{  3372} G1N5014                     =       GD02000 +      GND3001 +      GNO2                    : ARR( 0.400E+15,  6710., 0.0);
+{  3373} GHN500A +GHO                =       GNK5004 +      GHO                                    : ARR( 0.340E-10,     0., 0.0);
+{  3374} GHN500A +GHO                =       G2N5007                                               : ARR( 0.193E-11,  -190., 0.0);
+{  3375} GHN500A+HV               =       G1H500T +      GNO2                                   :  0.100E+01*SUN;
+{  3376} GHN500A+HV               =       G1N5007 +      GHO                                    :  0.100E+01*SUN;
+{  3377} G1H500T                     =       G2H500P                                               : ARR( 0.240E+12,  4177., 0.0);
+{  3378} G1H500T                     =       G2H3003 +      GD02000                                : ARR( 0.200E+15,  6731., 0.0);
+{  3379} G2H500P +GNO                =       G1H500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3380} G2H500P +GNO                =       GHN500m                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3381} G2H500P +GHO2               =       GHH500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3382} G2H500P +GNO3               =       G1H500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3383} G2H500P +MEPERO             =  0.480G1H500U + 0.260GHO500D + 0.260GHD5005                 : ARR( 0.164E-12,  -795., 0.0);
+{  3384} G2H500P +PERO1              =  0.600G1H500U + 0.200GHO500D + 0.200GHD5005                 : ARR( 0.126E-12,  -850., 0.0);
+{  3385} G2H500P +PERO2              =  0.560G1H500U + 0.220GHO500D + 0.220GHD5005                 : ARR( 0.471E-13, -1350., 0.0);
+{  3386} G2H500P +PERO3              =  0.600G1H500U + 0.200GHO500D + 0.200GHD5005                 : ARR( 0.142E-12, -1200., 0.0);
+{  3387} G2H500P +PERO5              =  0.600G1H500U + 0.200GHO500D + 0.200GHD5005                 : ARR( 0.533E-11,   500., 0.0);
+{  3388} G2H500P +PERO6              =  0.460G1H500U + 0.270GHO500D + 0.270GHD5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  3389} G2H500P +PERO9              =  0.800G1H500U + 0.200GHD5005                                : ARR( 0.100E-10,     0., 0.0);
+{  3390} G2H3003 +GNO                =       G1H3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  3391} G2H3003 +GNO                =       GHN3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{  3392} G2H3003 +GHO2               =       GHH3000                                               : ARR( 0.179E-12, -1250., 0.0);
+{  3393} G2H3003 +GNO3               =       G1H3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3394} G2H3003 +MEPERO             =  0.480G1H3004 + 0.260GHO3002 + 0.260GHD3002                 : ARR( 0.164E-12,  -795., 0.0);
+{  3395} G2H3003 +PERO1              =  0.600G1H3004 + 0.200GHO3002 + 0.200GHD3002                 : ARR( 0.126E-12,  -850., 0.0);
+{  3396} G2H3003 +PERO2              =  0.560G1H3004 + 0.220GHO3002 + 0.220GHD3002                 : ARR( 0.471E-13, -1350., 0.0);
+{  3397} G2H3003 +PERO3              =  0.600G1H3004 + 0.200GHO3002 + 0.200GHD3002                 : ARR( 0.142E-12, -1200., 0.0);
+{  3398} G2H3003 +PERO5              =  0.600G1H3004 + 0.200GHO3002 + 0.200GHD3002                 : ARR( 0.533E-11,   500., 0.0);
+{  3399} G2H3003 +PERO6              =  0.460G1H3004 + 0.270GHO3002 + 0.270GHD3002                 : ARR( 0.488E-13, -1250., 0.0);
+{  3400} G2H3003 +PERO9              =  0.800G1H3004 + 0.200GHD3002                                : ARR( 0.100E-10,     0., 0.0);
+{  3401} G1H500U                     =       GHK5009 +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{  3402} G1H3004 +OXYGEN             =       GHD3002 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  3403} G1H3004                     =       GD02000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6039., 0.0);
+{  3404} GNO5009 +GHO                =       GNK5004 +      GHO2                                   : ARR( 0.910E-11,     0., 0.0);
+{  3405} GNO5009+HV               =       G1O5005 +      GNO2                                   :  0.100E+01*SUN;
+{  3406} GNK5004 +GHO                =       G2N5014                                               : ARR( 0.102E-12,     0., 0.0);
+{  3407} GNK5004 +GHO                =       G2N5015                                               : ARR( 0.172E-12,     0., 0.0);
+{  3408} GNK5004 +GHO                =       GKK5000 +      GNO2                                   : ARR( 0.304E-12,     0., 0.0);
+{  3409} GNK5004 +GHO                =       G2N5016                                               : ARR( 0.335E-13,     0., 0.0);
+{  3410} GNK5004+HV               =       G3K2000 +      G2N3001                                :  0.100E+01*SUN;
+{  3411} GNK5004+HV               =       GK03000 +      G2D2000 +      GNO2                    :  0.100E+01*SUN;
+{  3412} GNK5004+HV               =       G1K5000 +      GNO2                                   :  0.100E+01*SUN;
+{  3413} G2N5014 +GNO                =       G1N5015 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3414} G2N5014 +GNO                =       GNN500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3415} G2N5014 +GHO2               =       GHN501F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3416} G2N5014 +GNO3               =       G1N5015 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3417} G2N5014 +MEPERO             =  0.480G1N5015 + 0.260GNK500B + 0.260GND500K                 : ARR( 0.164E-12,  -795., 0.0);
+{  3418} G2N5014 +PERO1              =  0.600G1N5015 + 0.200GNK500B + 0.200GND500K                 : ARR( 0.126E-12,  -850., 0.0);
+{  3419} G2N5014 +PERO2              =  0.560G1N5015 + 0.220GNK500B + 0.220GND500K                 : ARR( 0.471E-13, -1350., 0.0);
+{  3420} G2N5014 +PERO3              =  0.600G1N5015 + 0.200GNK500B + 0.200GND500K                 : ARR( 0.142E-12, -1200., 0.0);
+{  3421} G2N5014 +PERO5              =  0.600G1N5015 + 0.200GNK500B + 0.200GND500K                 : ARR( 0.533E-11,   500., 0.0);
+{  3422} G2N5014 +PERO6              =  0.460G1N5015 + 0.270GNK500B + 0.270GND500K                 : ARR( 0.488E-13, -1250., 0.0);
+{  3423} G2N5014 +PERO9              =  0.800G1N5015 + 0.200GND500K                                : ARR( 0.100E-10,     0., 0.0);
+{  3424} G2N5015 +GNO                =       G1N5016 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3425} G2N5015 +GNO                =       GNN500w                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3426} G2N5015 +GHO2               =       GHN501S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3427} G2N5015 +GNO3               =       G1N5016 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3428} G2N5015 +MEPERO             =  0.340G1N5016 + 0.330GNK500Y + 0.330GNK500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{  3429} G2N5015 +PERO1              =  0.460G1N5016 + 0.270GNK500Y + 0.270GNK500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{  3430} G2N5015 +PERO2              =  0.400G1N5016 + 0.300GNK500Y + 0.300GNK500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{  3431} G2N5015 +PERO3              =  0.460G1N5016 + 0.270GNK500Y + 0.270GNK500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{  3432} G2N5015 +PERO5              =  0.460G1N5016 + 0.270GNK500Y + 0.270GNK500Z                 : ARR( 0.183E-11,   450., 0.0);
+{  3433} G2N5015 +PERO6              =  0.300G1N5016 + 0.350GNK500Y + 0.350GNK500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{  3434} G2N5015 +PERO9              =  0.650G1N5016 + 0.350GNK500Z                                : ARR( 0.100E-10,     0., 0.0);
+{  3435} G2N5016 +GNO                =       G1N5017 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3436} G2N5016 +GNO                =       GNN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3437} G2N5016 +GHO2               =       GHN501E                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3438} G2N5016 +GNO3               =       G1N5017 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3439} G2N5016 +MEPERO             =  0.480G1N5017 + 0.260GNK5006 + 0.260GND500L                 : ARR( 0.164E-12,  -795., 0.0);
+{  3440} G2N5016 +PERO1              =  0.600G1N5017 + 0.200GNK5006 + 0.200GND500L                 : ARR( 0.126E-12,  -850., 0.0);
+{  3441} G2N5016 +PERO2              =  0.560G1N5017 + 0.220GNK5006 + 0.220GND500L                 : ARR( 0.471E-13, -1350., 0.0);
+{  3442} G2N5016 +PERO3              =  0.600G1N5017 + 0.200GNK5006 + 0.200GND500L                 : ARR( 0.142E-12, -1200., 0.0);
+{  3443} G2N5016 +PERO5              =  0.600G1N5017 + 0.200GNK5006 + 0.200GND500L                 : ARR( 0.533E-11,   500., 0.0);
+{  3444} G2N5016 +PERO6              =  0.460G1N5017 + 0.270GNK5006 + 0.270GND500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  3445} G2N5016 +PERO9              =  0.800G1N5017 + 0.200GND500L                                : ARR( 0.100E-10,     0., 0.0);
+{  3446} G1N5015                     =       G3N4002 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  3447} G1N5016                     =       GND3001 +      G3K2000                                : ARR( 0.200E+15,  2923., 0.0);
+{  3448} G1N5017 +OXYGEN             =       GND500L +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  3449} G1N5017                     =       GDK4000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{  3450} G3N4002 +GHO2               =  0.800GGN4002 + 0.200GAN4002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3451} G3N4002 +GNO                =       G2N3001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  3452} G3N4002 +GNO2               =       GPN4002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3453} G3N4002 +GNO3               =       G2N3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  3454} G3N4002 +MEPERO             =  0.685G2N3001 + 0.315GAN4002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3455} G3N4002 +PERO1              =  0.800G2N3001 + 0.200GAN4002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3456} G3N4002 +PERO2              =  0.750G2N3001 + 0.250GAN4002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3457} G3N4002 +PERO3              =  0.800G2N3001 + 0.200GAN4002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3458} G3N4002 +PERO5              =  0.650G2N3001 + 0.350GAN4002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3459} G3N4002 +PERO6              =  0.650G2N3001 + 0.350GAN4002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3460} G3N4002 +PERO9              =       G2N3001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  3461} GNN5007 +GHO                =       G2N5017                                               : ARR( 0.184E-12,     0., 0.0);
+{  3462} GNN5007 +GHO                =       G2N5018                                               : ARR( 0.253E-12,     0., 0.0);
+{  3463} GNN5007 +GHO                =       G2N5019                                               : ARR( 0.368E-13,     0., 0.0);
+{  3464} GNN5007+HV               =       G1N5008 +      GNO2                                   :  0.100E+01*SUN;
+{  3465} GNN5007+HV               =       G1N500B +      GNO2                                   :  0.100E+01*SUN;
+{  3466} G2N5017 +GNO                =       G1N5018 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3467} G2N5017 +GNO                =       GNN500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3468} G2N5017 +GHO2               =       GHN501T                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3469} G2N5017 +GNO3               =       G1N5018 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3470} G2N5017 +MEPERO             =  0.480G1N5018 + 0.260GNN5009 + 0.260GNN500x                 : ARR( 0.146E-12,  -445., 0.0);
+{  3471} G2N5017 +PERO1              =  0.600G1N5018 + 0.200GNN5009 + 0.200GNN500x                 : ARR( 0.112E-12,  -500., 0.0);
+{  3472} G2N5017 +PERO2              =  0.560G1N5018 + 0.220GNN5009 + 0.220GNN500x                 : ARR( 0.418E-13, -1000., 0.0);
+{  3473} G2N5017 +PERO3              =  0.600G1N5018 + 0.200GNN5009 + 0.200GNN500x                 : ARR( 0.126E-12,  -850., 0.0);
+{  3474} G2N5017 +PERO5              =  0.600G1N5018 + 0.200GNN5009 + 0.200GNN500x                 : ARR( 0.473E-11,   850., 0.0);
+{  3475} G2N5017 +PERO6              =  0.460G1N5018 + 0.270GNN5009 + 0.270GNN500x                 : ARR( 0.434E-13,  -900., 0.0);
+{  3476} G2N5017 +PERO9              =  0.800G1N5018 + 0.200GNN500x                                : ARR( 0.100E-10,     0., 0.0);
+{  3477} G2N5018 +GNO                =       G1N5019 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3478} G2N5018 +GNO                =       GNN500t                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3479} G2N5018 +GHO2               =       GHN501U                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3480} G2N5018 +GNO3               =       G1N5019 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3481} G2N5018 +MEPERO             =  0.340G1N5019 + 0.330GNN500y + 0.330GNN500w                 : ARR( 0.565E-13,  -845., 0.0);
+{  3482} G2N5018 +PERO1              =  0.460G1N5019 + 0.270GNN500y + 0.270GNN500w                 : ARR( 0.434E-13,  -900., 0.0);
+{  3483} G2N5018 +PERO2              =  0.400G1N5019 + 0.300GNN500y + 0.300GNN500w                 : ARR( 0.162E-13, -1400., 0.0);
+{  3484} G2N5018 +PERO3              =  0.460G1N5019 + 0.270GNN500y + 0.270GNN500w                 : ARR( 0.488E-13, -1250., 0.0);
+{  3485} G2N5018 +PERO5              =  0.460G1N5019 + 0.270GNN500y + 0.270GNN500w                 : ARR( 0.183E-11,   450., 0.0);
+{  3486} G2N5018 +PERO6              =  0.300G1N5019 + 0.350GNN500y + 0.350GNN500w                 : ARR( 0.168E-13, -1300., 0.0);
+{  3487} G2N5018 +PERO9              =  0.650G1N5019 + 0.350GNN500w                                : ARR( 0.100E-10,     0., 0.0);
+{  3488} G2N5019 +GNO                =       G1N501A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3489} G2N5019 +GNO                =       GNN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3490} G2N5019 +GHO2               =       GHN501W                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3491} G2N5019 +GNO3               =       G1N501A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3492} G2N5019 +MEPERO             =  0.480G1N501A + 0.260GNN500q + 0.260GNN500z                 : ARR( 0.164E-12,  -795., 0.0);
+{  3493} G2N5019 +PERO1              =  0.600G1N501A + 0.200GNN500q + 0.200GNN500z                 : ARR( 0.126E-12,  -850., 0.0);
+{  3494} G2N5019 +PERO2              =  0.560G1N501A + 0.220GNN500q + 0.220GNN500z                 : ARR( 0.471E-13, -1350., 0.0);
+{  3495} G2N5019 +PERO3              =  0.600G1N501A + 0.200GNN500q + 0.200GNN500z                 : ARR( 0.142E-12, -1200., 0.0);
+{  3496} G2N5019 +PERO5              =  0.600G1N501A + 0.200GNN500q + 0.200GNN500z                 : ARR( 0.533E-11,   500., 0.0);
+{  3497} G2N5019 +PERO6              =  0.460G1N501A + 0.270GNN500q + 0.270GNN500z                 : ARR( 0.488E-13, -1250., 0.0);
+{  3498} G2N5019 +PERO9              =  0.800G1N501A + 0.200GNN500z                                : ARR( 0.100E-10,     0., 0.0);
+{  3499} G1N5018 +OXYGEN             =       GNN500x +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  3500} G1N5018                     =       GNK5009 +      GNO2                                   : ARR( 0.800E+11,  4836., 0.0);
+{  3501} G1N5019                     =       G2N501A                                               : ARR( 0.240E+12,  4897., 0.0);
+{  3502} G1N5019                     =       GND3001 +      GD02000 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{  3503} G1N501A +OXYGEN             =       GNN500z +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  3504} G1N501A                     =       G2N501B                                               : ARR( 0.160E+12,  3812., 0.0);
+{  3505} G1N501A                     =       GND4005 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{  3506} G2N501A +GNO                =       G1N501B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3507} G2N501A +GNO                =       GNN5011                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3508} G2N501A +GHO2               =       GHN501X                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3509} G2N501A +GNO3               =       G1N501B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3510} G2N501A +MEPERO             =  0.480G1N501B + 0.260GNN5012 + 0.260GNN5013                 : ARR( 0.164E-12,  -795., 0.0);
+{  3511} G2N501A +PERO1              =  0.600G1N501B + 0.200GNN5012 + 0.200GNN5013                 : ARR( 0.126E-12,  -850., 0.0);
+{  3512} G2N501A +PERO2              =  0.560G1N501B + 0.220GNN5012 + 0.220GNN5013                 : ARR( 0.471E-13, -1350., 0.0);
+{  3513} G2N501A +PERO3              =  0.600G1N501B + 0.200GNN5012 + 0.200GNN5013                 : ARR( 0.142E-12, -1200., 0.0);
+{  3514} G2N501A +PERO5              =  0.600G1N501B + 0.200GNN5012 + 0.200GNN5013                 : ARR( 0.533E-11,   500., 0.0);
+{  3515} G2N501A +PERO6              =  0.460G1N501B + 0.270GNN5012 + 0.270GNN5013                 : ARR( 0.488E-13, -1250., 0.0);
+{  3516} G2N501A +PERO9              =  0.800G1N501B + 0.200GNN5013                                : ARR( 0.100E-10,     0., 0.0);
+{  3517} G2N501B +GNO                =       G1N501C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3518} G2N501B +GNO                =       GNN5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3519} G2N501B +GHO2               =       GHN501Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3520} G2N501B +GNO3               =       G1N501C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3521} G2N501B +MEPERO             =  0.340G1N501C + 0.330GNN5012 + 0.330GNN5015                 : ARR( 0.565E-13,  -845., 0.0);
+{  3522} G2N501B +PERO1              =  0.460G1N501C + 0.270GNN5012 + 0.270GNN5015                 : ARR( 0.434E-13,  -900., 0.0);
+{  3523} G2N501B +PERO2              =  0.400G1N501C + 0.300GNN5012 + 0.300GNN5015                 : ARR( 0.162E-13, -1400., 0.0);
+{  3524} G2N501B +PERO3              =  0.460G1N501C + 0.270GNN5012 + 0.270GNN5015                 : ARR( 0.488E-13, -1250., 0.0);
+{  3525} G2N501B +PERO5              =  0.460G1N501C + 0.270GNN5012 + 0.270GNN5015                 : ARR( 0.183E-11,   450., 0.0);
+{  3526} G2N501B +PERO6              =  0.300G1N501C + 0.350GNN5012 + 0.350GNN5015                 : ARR( 0.168E-13, -1300., 0.0);
+{  3527} G2N501B +PERO9              =  0.650G1N501C + 0.350GNN5015                                : ARR( 0.100E-10,     0., 0.0);
+{  3528} G1N501B                     =       GNN5015 +      GHO2                                   : ARR( 0.800E+11,  2837., 0.0);
+{  3529} G1N501C                     =       GNN5013 +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  3530} G1N501C                     =       GD02000 +      GND3004 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{  3531} GHN500B +GHO                =       GNK5005 +      GHO                                    : ARR( 0.843E-11,     0., 0.0);
+{  3532} GHN500B +GHO                =       G2H500Q                                               : ARR( 0.118E-11,     0., 0.0);
+{  3533} GHN500B +GHO                =       G2N5008                                               : ARR( 0.194E-11,  -190., 0.0);
+{  3534} GHN500B+HV               =       G1H500W +      GNO2                                   :  0.100E+01*SUN;
+{  3535} GHN500B+HV               =       G1N5008 +      GHO                                    :  0.100E+01*SUN;
+{  3536} G2H500Q +GNO                =       G1H500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3537} G2H500Q +GNO                =       GHN501R                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3538} G2H500Q +GHO2               =       GHH500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3539} G2H500Q +GNO3               =       G1H500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3540} G2H500Q +MEPERO             =  0.340G1H500X + 0.330GHN501Z + 0.330GHN501S                 : ARR( 0.565E-13,  -845., 0.0);
+{  3541} G2H500Q +PERO1              =  0.460G1H500X + 0.270GHN501Z + 0.270GHN501S                 : ARR( 0.434E-13,  -900., 0.0);
+{  3542} G2H500Q +PERO2              =  0.400G1H500X + 0.300GHN501Z + 0.300GHN501S                 : ARR( 0.162E-13, -1400., 0.0);
+{  3543} G2H500Q +PERO3              =  0.460G1H500X + 0.270GHN501Z + 0.270GHN501S                 : ARR( 0.488E-13, -1250., 0.0);
+{  3544} G2H500Q +PERO5              =  0.460G1H500X + 0.270GHN501Z + 0.270GHN501S                 : ARR( 0.183E-11,   450., 0.0);
+{  3545} G2H500Q +PERO6              =  0.300G1H500X + 0.350GHN501Z + 0.350GHN501S                 : ARR( 0.168E-13, -1300., 0.0);
+{  3546} G2H500Q +PERO9              =  0.650G1H500X + 0.350GHN501S                                : ARR( 0.100E-10,     0., 0.0);
+{  3547} G1H500W                     =       GD03000 +      GD02000 +      GHO                     : ARR( 0.200E+15,  4945., 0.0);
+{  3548} G1H500X                     =       GND3001 +      GD02000 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{  3549} GNO500A +GHO                =       G2N501C                                               : ARR( 0.131E-11,     0., 0.0);
+{  3550} GNO500A +GHO                =       GNK5005 +      GHO2                                   : ARR( 0.234E-11,     0., 0.0);
+{  3551} GNO500A+HV               =       G1O5008 +      GNO2                                   :  0.100E+01*SUN;
+{  3552} G2N501C +GNO                =       G1N501D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3553} G2N501C +GNO                =       GNN500u                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3554} G2N501C +GHO2               =       GHN501a                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3555} G2N501C +GNO3               =       G1N501D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3556} G2N501C +MEPERO             =  0.340G1N501D + 0.330GNO500S + 0.330GNK500Y                 : ARR( 0.565E-13,  -845., 0.0);
+{  3557} G2N501C +PERO1              =  0.460G1N501D + 0.270GNO500S + 0.270GNK500Y                 : ARR( 0.434E-13,  -900., 0.0);
+{  3558} G2N501C +PERO2              =  0.400G1N501D + 0.300GNO500S + 0.300GNK500Y                 : ARR( 0.162E-13, -1400., 0.0);
+{  3559} G2N501C +PERO3              =  0.460G1N501D + 0.270GNO500S + 0.270GNK500Y                 : ARR( 0.488E-13, -1250., 0.0);
+{  3560} G2N501C +PERO5              =  0.460G1N501D + 0.270GNO500S + 0.270GNK500Y                 : ARR( 0.183E-11,   450., 0.0);
+{  3561} G2N501C +PERO6              =  0.300G1N501D + 0.350GNO500S + 0.350GNK500Y                 : ARR( 0.168E-13, -1300., 0.0);
+{  3562} G2N501C +PERO9              =  0.650G1N501D + 0.350GNK500Y                                : ARR( 0.100E-10,     0., 0.0);
+{  3563} G1N501D                     =       GND3001 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  3564} GNK5005 +GHO                =       G2N501D                                               : ARR( 0.571E-12,     0., 0.0);
+{  3565} GNK5005 +GHO                =       G2N501E                                               : ARR( 0.753E-12,     0., 0.0);
+{  3566} GNK5005+HV               =       G3K3000 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  3567} GNK5005+HV               =       G1K5004 +      GNO2                                   :  0.100E+01*SUN;
+{  3568} G2N501D +GNO                =       G1N501E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3569} G2N501D +GNO                =       GNN500M                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3570} G2N501D +GHO2               =       GHN501b                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3571} G2N501D +GNO3               =       G1N501E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3572} G2N501D +MEPERO             =  0.480G1N501E + 0.260GNK500A + 0.260GND500M                 : ARR( 0.146E-12,  -445., 0.0);
+{  3573} G2N501D +PERO1              =  0.600G1N501E + 0.200GNK500A + 0.200GND500M                 : ARR( 0.112E-12,  -500., 0.0);
+{  3574} G2N501D +PERO2              =  0.560G1N501E + 0.220GNK500A + 0.220GND500M                 : ARR( 0.418E-13, -1000., 0.0);
+{  3575} G2N501D +PERO3              =  0.600G1N501E + 0.200GNK500A + 0.200GND500M                 : ARR( 0.126E-12,  -850., 0.0);
+{  3576} G2N501D +PERO5              =  0.600G1N501E + 0.200GNK500A + 0.200GND500M                 : ARR( 0.473E-11,   850., 0.0);
+{  3577} G2N501D +PERO6              =  0.460G1N501E + 0.270GNK500A + 0.270GND500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  3578} G2N501D +PERO9              =  0.800G1N501E + 0.200GND500M                                : ARR( 0.100E-10,     0., 0.0);
+{  3579} G2N501E +GNO                =       G1N501F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3580} G2N501E +GNO                =       GNN500v                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3581} G2N501E +GHO2               =       GHN501c                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3582} G2N501E +GNO3               =       G1N501F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3583} G2N501E +MEPERO             =  0.340G1N501F + 0.330GNK500a + 0.330GNK500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{  3584} G2N501E +PERO1              =  0.460G1N501F + 0.270GNK500a + 0.270GNK500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{  3585} G2N501E +PERO2              =  0.400G1N501F + 0.300GNK500a + 0.300GNK500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{  3586} G2N501E +PERO3              =  0.460G1N501F + 0.270GNK500a + 0.270GNK500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{  3587} G2N501E +PERO5              =  0.460G1N501F + 0.270GNK500a + 0.270GNK500Z                 : ARR( 0.183E-11,   450., 0.0);
+{  3588} G2N501E +PERO6              =  0.300G1N501F + 0.350GNK500a + 0.350GNK500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{  3589} G2N501E +PERO9              =  0.650G1N501F + 0.350GNK500Z                                : ARR( 0.100E-10,     0., 0.0);
+{  3590} G1N501E +OXYGEN             =       GND500M +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  3591} G1N501F                     =       G3N3001 +      GD02000                                : ARR( 0.200E+15,  2814., 0.0);
+{  3592} G3N3001 +GHO2               =  0.800GGN3001 + 0.200GAN3001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3593} G3N3001 +GNO                =       GD02000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  3594} G3N3001 +GNO2               =       GPN3001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3595} G3N3001 +GNO3               =       GD02000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  3596} G3N3001 +MEPERO             =  0.685GD02000 + 0.315GAN3001 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3597} G3N3001 +PERO1              =  0.800GD02000 + 0.200GAN3001 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3598} G3N3001 +PERO2              =  0.750GD02000 + 0.250GAN3001 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3599} G3N3001 +PERO3              =  0.800GD02000 + 0.200GAN3001 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3600} G3N3001 +PERO5              =  0.650GD02000 + 0.350GAN3001 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3601} G3N3001 +PERO6              =  0.650GD02000 + 0.350GAN3001 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3602} G3N3001 +PERO9              =       GD02000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  3603} GND3001 +GHO                =       G3N3001                                               : ARR( 0.425E-11,     0., 0.0);
+{  3604} GND3001 +GNO3               =       G3N3001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3605} GND3001+HV               =       G1D3001 +      GNO2                                   :  0.100E+01*SUN;
+{  3606} GND3001+HV               =       GD02000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  3607} GNN5008 +GHO                =       GNN500W +      GHO2                                   : ARR( 0.900E-11,     0., 0.0);
+{  3608} GNN5008+HV               =       G1N501G +      GNO2                                   :  0.100E+01*SUN;
+{  3609} GNN5008+HV               =       G1N5009 +      GNO2                                   :  0.100E+01*SUN;
+{  3610} G1N501G                     =       G2N501F                                               : ARR( 0.240E+12,  4177., 0.0);
+{  3611} G1N501G                     =       G2O3000 +      GND2000                                : ARR( 0.200E+15,  6983., 0.0);
+{  3612} G2N501F +GNO                =       G1N501H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3613} G2N501F +GNO                =       GNN500n                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3614} G2N501F +GHO2               =       GHN501A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3615} G2N501F +GNO3               =       G1N501H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3616} G2N501F +MEPERO             =  0.480G1N501H + 0.260GNO500G + 0.260GND500D                 : ARR( 0.164E-12,  -795., 0.0);
+{  3617} G2N501F +PERO1              =  0.600G1N501H + 0.200GNO500G + 0.200GND500D                 : ARR( 0.126E-12,  -850., 0.0);
+{  3618} G2N501F +PERO2              =  0.560G1N501H + 0.220GNO500G + 0.220GND500D                 : ARR( 0.471E-13, -1350., 0.0);
+{  3619} G2N501F +PERO3              =  0.600G1N501H + 0.200GNO500G + 0.200GND500D                 : ARR( 0.142E-12, -1200., 0.0);
+{  3620} G2N501F +PERO5              =  0.600G1N501H + 0.200GNO500G + 0.200GND500D                 : ARR( 0.533E-11,   500., 0.0);
+{  3621} G2N501F +PERO6              =  0.460G1N501H + 0.270GNO500G + 0.270GND500D                 : ARR( 0.488E-13, -1250., 0.0);
+{  3622} G2N501F +PERO9              =  0.800G1N501H + 0.200GND500D                                : ARR( 0.100E-10,     0., 0.0);
+{  3623} G1N501H                     =       GNK500P +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{  3624} G1N501H                     =       GND4003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  3625} GHN500C +GHO                =       GHN501E +      GHO2                                   : ARR( 0.877E-11,     0., 0.0);
+{  3626} GHN500C +GHO                =       GND5004 +      GHO                                    : ARR( 0.337E-11,     0., 0.0);
+{  3627} GHN500C +GHO                =       G2N5009                                               : ARR( 0.199E-11,  -190., 0.0);
+{  3628} GHN500C+HV               =       G1H500Y +      GNO2                                   :  0.100E+01*SUN;
+{  3629} GHN500C+HV               =       G1N5009 +      GHO                                    :  0.100E+01*SUN;
+{  3630} G1H500Y                     =       G2H500R                                               : ARR( 0.240E+12,  4177., 0.0);
+{  3631} G1H500Y                     =       G2O3000 +      GHD2000                                : ARR( 0.200E+15,  6985., 0.0);
+{  3632} G1H500Y                     =       GDO4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  3633} G2H500R +GNO                =       G1H500Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3634} G2H500R +GNO                =       GHN501A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3635} G2H500R +GHO2               =       GHH500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3636} G2H500R +GNO3               =       G1H500Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3637} G2H500R +MEPERO             =  0.480G1H500Z + 0.260GHO500E + 0.260GHD5007                 : ARR( 0.164E-12,  -795., 0.0);
+{  3638} G2H500R +PERO1              =  0.600G1H500Z + 0.200GHO500E + 0.200GHD5007                 : ARR( 0.126E-12,  -850., 0.0);
+{  3639} G2H500R +PERO2              =  0.560G1H500Z + 0.220GHO500E + 0.220GHD5007                 : ARR( 0.471E-13, -1350., 0.0);
+{  3640} G2H500R +PERO3              =  0.600G1H500Z + 0.200GHO500E + 0.200GHD5007                 : ARR( 0.142E-12, -1200., 0.0);
+{  3641} G2H500R +PERO5              =  0.600G1H500Z + 0.200GHO500E + 0.200GHD5007                 : ARR( 0.533E-11,   500., 0.0);
+{  3642} G2H500R +PERO6              =  0.460G1H500Z + 0.270GHO500E + 0.270GHD5007                 : ARR( 0.488E-13, -1250., 0.0);
+{  3643} G2H500R +PERO9              =  0.800G1H500Z + 0.200GHD5007                                : ARR( 0.100E-10,     0., 0.0);
+{  3644} G1H500Z                     =       GHK500C +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{  3645} G1H500Z                     =       GHD4003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  3646} GNO500B +GHO                =       GNK5006 +      GHO2                                   : ARR( 0.915E-11,     0., 0.0);
+{  3647} GNO500B +GHO                =       GND5004 +      GHO2                                   : ARR( 0.879E-12,     0., 0.0);
+{  3648} GNO500B+HV               =       G1O500A +      GNO2                                   :  0.100E+01*SUN;
+{  3649} GND5004 +GHO                =       GND500L +      GHO2                                   : ARR( 0.882E-11,     0., 0.0);
+{  3650} GND5004 +GHO                =       G3N5004                                               : ARR( 0.437E-11,     0., 0.0);
+{  3651} GND5004 +GNO3               =       G3N5004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3652} GND5004+HV               =       G1D5008 +      GNO2                                   :  0.100E+01*SUN;
+{  3653} GND5004+HV               =       GDO4001 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  3654} GND5004+HV               =       GK03000 +      GND2000                                :  0.100E+01*SUN;
+{  3655} G3N5004 +GHO2               =  0.800GGN5005 + 0.200GAN5005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3656} G3N5004 +GNO                =       GDO4001 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  3657} G3N5004 +GNO2               =       GPN5005                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3658} G3N5004 +GNO3               =       GDO4001 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  3659} G3N5004 +MEPERO             =  0.685GDO4001 + 0.315GAN5005 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3660} G3N5004 +PERO1              =  0.800GDO4001 + 0.200GAN5005 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3661} G3N5004 +PERO2              =  0.750GDO4001 + 0.250GAN5005 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3662} G3N5004 +PERO3              =  0.800GDO4001 + 0.200GAN5005 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3663} G3N5004 +PERO5              =  0.650GDO4001 + 0.350GAN5005 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3664} G3N5004 +PERO6              =  0.650GDO4001 + 0.350GAN5005 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3665} G3N5004 +PERO9              =       GDO4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  3666} G1D5008                     =       G2D5006                                               : ARR( 0.240E+12,  4177., 0.0);
+{  3667} G1D5008                     =       GDO4001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  3668} G2D5006 +GNO                =       G1D5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3669} G2D5006 +GNO                =       GND500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3670} G2D5006 +GHO2               =       GHD5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3671} G2D5006 +GNO3               =       G1D5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3672} G2D5006 +MEPERO             =  0.480G1D5009 + 0.260GDO5004 + 0.260GDD5001                 : ARR( 0.164E-12,  -795., 0.0);
+{  3673} G2D5006 +PERO1              =  0.600G1D5009 + 0.200GDO5004 + 0.200GDD5001                 : ARR( 0.126E-12,  -850., 0.0);
+{  3674} G2D5006 +PERO2              =  0.560G1D5009 + 0.220GDO5004 + 0.220GDD5001                 : ARR( 0.471E-13, -1350., 0.0);
+{  3675} G2D5006 +PERO3              =  0.600G1D5009 + 0.200GDO5004 + 0.200GDD5001                 : ARR( 0.142E-12, -1200., 0.0);
+{  3676} G2D5006 +PERO5              =  0.600G1D5009 + 0.200GDO5004 + 0.200GDD5001                 : ARR( 0.533E-11,   500., 0.0);
+{  3677} G2D5006 +PERO6              =  0.460G1D5009 + 0.270GDO5004 + 0.270GDD5001                 : ARR( 0.488E-13, -1250., 0.0);
+{  3678} G2D5006 +PERO9              =  0.800G1D5009 + 0.200GDD5001                                : ARR( 0.100E-10,     0., 0.0);
+{  3679} G1D5009                     =       GDK5005 +      GHO2                                   : ARR( 0.800E+11,  2246., 0.0);
+{  3680} G1D5009                     =       GDD4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  3681} GNN3001 +GHO                =       G2N3004                                               : ARR( 0.173E-12,     0., 0.0);
+{  3682} GNN3001 +GHO                =       GNK3000 +      GNO2                                   : ARR( 0.991E-13,     0., 0.0);
+{  3683} GNN3001 +GHO                =       GND3001 +      GNO2                                   : ARR( 0.475E-13,     0., 0.0);
+{  3684} GNN3001+HV               =       G1N3002 +      GNO2                                   :  0.100E+01*SUN;
+{  3685} GNN3001+HV               =       G1N3001 +      GNO2                                   :  0.100E+01*SUN;
+{  3686} GHN3001 +GHO                =       GND3001 +      GHO                                    : ARR( 0.328E-11,     0., 0.0);
+{  3687} GHN3001 +GHO                =       G2N3001                                               : ARR( 0.194E-11,  -190., 0.0);
+{  3688} GHN3001+HV               =       G1H3000 +      GNO2                                   :  0.100E+01*SUN;
+{  3689} GHN3001+HV               =       G1N3001 +      GHO                                    :  0.100E+01*SUN;
+{  3690} GNO3001 +GHO                =       GKO3000 +      GNO2                                   : ARR( 0.988E-13,     0., 0.0);
+{  3691} GNO3001 +GHO                =       GND3001 +      GHO2                                   : ARR( 0.830E-12,     0., 0.0);
+{  3692} GNO3001 +GHO                =       G1N3001                                               : ARR( 0.217E-17,    85., 2.0);
+{  3693} GNO3001+HV               =       G1O3002 +      GNO2                                   :  0.100E+01*SUN;
+{  3694} GNK5006 +GHO                =       G2N501G                                               : ARR( 0.102E-12,     0., 0.0);
+{  3695} GNK5006 +GHO                =       G2N501H                                               : ARR( 0.172E-12,     0., 0.0);
+{  3696} GNK5006 +GHO                =       GKK5003 +      GNO2                                   : ARR( 0.373E-12,     0., 0.0);
+{  3697} GNK5006 +GHO                =       GND500L +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{  3698} GNK5006 +GHO                =       G1N5017                                               : ARR( 0.210E-17,    85., 2.0);
+{  3699} GNK5006+HV               =       G3K2000 +      G2N3008                                :  0.100E+01*SUN;
+{  3700} GNK5006+HV               =       GK03000 +      GND2000                                :  0.100E+01*SUN;
+{  3701} GNK5006+HV               =       G1K5007 +      GNO2                                   :  0.100E+01*SUN;
+{  3702} G2N501G +GNO                =       G1N501I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3703} G2N501G +GNO                =       GNN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3704} G2N501G +GHO2               =       GHN501H                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3705} G2N501G +GNO3               =       G1N501I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3706} G2N501G +MEPERO             =  0.480G1N501I + 0.260GNK500N + 0.260GND500N                 : ARR( 0.164E-12,  -795., 0.0);
+{  3707} G2N501G +PERO1              =  0.600G1N501I + 0.200GNK500N + 0.200GND500N                 : ARR( 0.126E-12,  -850., 0.0);
+{  3708} G2N501G +PERO2              =  0.560G1N501I + 0.220GNK500N + 0.220GND500N                 : ARR( 0.471E-13, -1350., 0.0);
+{  3709} G2N501G +PERO3              =  0.600G1N501I + 0.200GNK500N + 0.200GND500N                 : ARR( 0.142E-12, -1200., 0.0);
+{  3710} G2N501G +PERO5              =  0.600G1N501I + 0.200GNK500N + 0.200GND500N                 : ARR( 0.533E-11,   500., 0.0);
+{  3711} G2N501G +PERO6              =  0.460G1N501I + 0.270GNK500N + 0.270GND500N                 : ARR( 0.488E-13, -1250., 0.0);
+{  3712} G2N501G +PERO9              =  0.800G1N501I + 0.200GND500N                                : ARR( 0.100E-10,     0., 0.0);
+{  3713} G2N501H +GNO                =       G1N501J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3714} G2N501H +GNO                =       GNN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3715} G2N501H +GHO2               =       GHN501d                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3716} G2N501H +GNO3               =       G1N501J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3717} G2N501H +MEPERO             =  0.340G1N501J + 0.330GNK500b + 0.330GNK500c                 : ARR( 0.565E-13,  -845., 0.0);
+{  3718} G2N501H +PERO1              =  0.460G1N501J + 0.270GNK500b + 0.270GNK500c                 : ARR( 0.434E-13,  -900., 0.0);
+{  3719} G2N501H +PERO2              =  0.400G1N501J + 0.300GNK500b + 0.300GNK500c                 : ARR( 0.162E-13, -1400., 0.0);
+{  3720} G2N501H +PERO3              =  0.460G1N501J + 0.270GNK500b + 0.270GNK500c                 : ARR( 0.488E-13, -1250., 0.0);
+{  3721} G2N501H +PERO5              =  0.460G1N501J + 0.270GNK500b + 0.270GNK500c                 : ARR( 0.183E-11,   450., 0.0);
+{  3722} G2N501H +PERO6              =  0.300G1N501J + 0.350GNK500b + 0.350GNK500c                 : ARR( 0.168E-13, -1300., 0.0);
+{  3723} G2N501H +PERO9              =  0.650G1N501J + 0.350GNK500c                                : ARR( 0.100E-10,     0., 0.0);
+{  3724} G2N3008 +GNO                =       G1N3008 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  3725} G2N3008 +GNO                =       GNN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  3726} G2N3008 +GHO2               =       GHN3009                                               : ARR( 0.179E-12, -1250., 0.0);
+{  3727} G2N3008 +GNO3               =       G1N3008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3728} G2N3008 +MEPERO             =  0.480G1N3008 + 0.260GNO3004 + 0.260GND3004                 : ARR( 0.164E-12,  -795., 0.0);
+{  3729} G2N3008 +PERO1              =  0.600G1N3008 + 0.200GNO3004 + 0.200GND3004                 : ARR( 0.126E-12,  -850., 0.0);
+{  3730} G2N3008 +PERO2              =  0.560G1N3008 + 0.220GNO3004 + 0.220GND3004                 : ARR( 0.471E-13, -1350., 0.0);
+{  3731} G2N3008 +PERO3              =  0.600G1N3008 + 0.200GNO3004 + 0.200GND3004                 : ARR( 0.142E-12, -1200., 0.0);
+{  3732} G2N3008 +PERO5              =  0.600G1N3008 + 0.200GNO3004 + 0.200GND3004                 : ARR( 0.533E-11,   500., 0.0);
+{  3733} G2N3008 +PERO6              =  0.460G1N3008 + 0.270GNO3004 + 0.270GND3004                 : ARR( 0.488E-13, -1250., 0.0);
+{  3734} G2N3008 +PERO9              =  0.800G1N3008 + 0.200GND3004                                : ARR( 0.100E-10,     0., 0.0);
+{  3735} G1N501I                     =       G3N4003 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  3736} G1N501J                     =       G3K2000 +      GND3004                                : ARR( 0.200E+15,  2923., 0.0);
+{  3737} G1N3008 +OXYGEN             =       GND3004 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  3738} G1N3008                     =       GDO2000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7190., 0.0);
+{  3739} G3N4003 +GHO2               =  0.800GGN4003 + 0.200GAN4003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3740} G3N4003 +GNO                =       G2N3008 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  3741} G3N4003 +GNO2               =       GPN4003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3742} G3N4003 +GNO3               =       G2N3008 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  3743} G3N4003 +MEPERO             =  0.685G2N3008 + 0.315GAN4003 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3744} G3N4003 +PERO1              =  0.800G2N3008 + 0.200GAN4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3745} G3N4003 +PERO2              =  0.750G2N3008 + 0.250GAN4003 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3746} G3N4003 +PERO3              =  0.800G2N3008 + 0.200GAN4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3747} G3N4003 +PERO5              =  0.650G2N3008 + 0.350GAN4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3748} G3N4003 +PERO6              =  0.650G2N3008 + 0.350GAN4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  3749} G3N4003 +PERO9              =       G2N3008 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  3750} GHO5008 +GHO                =       GHK5003 +      GHO2                                   : ARR( 0.872E-11,     0., 0.0);
+{  3751} GHO5008 +GHO                =       GKO5004 +      GHO                                    : ARR( 0.349E-10,     0., 0.0);
+{  3752} GHO5008 +GHO                =       G2O5005                                               : ARR( 0.198E-11,  -190., 0.0);
+{  3753} GHO5008+HV               =       G1O5005 +      GHO                                    :  0.100E+01*SUN;
+{  3754} GOO5004 +GHO                =       GKO5004 +      GHO2                                   : ARR( 0.173E-10,     0., 0.0);
+{  3755} GOO5004 +GHO                =       G2O500M                                               : ARR( 0.146E-11,     0., 0.0);
+{  3756} G2O500M +GNO                =       G1O500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3757} G2O500M +GNO                =       GNO500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3758} G2O500M +GHO2               =       GHO500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3759} G2O500M +GNO3               =       G1O500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3760} G2O500M +MEPERO             =  0.340G1O500N + 0.330GOO500B + 0.330GKO500G                 : ARR( 0.565E-13,  -845., 0.0);
+{  3761} G2O500M +PERO1              =  0.460G1O500N + 0.270GOO500B + 0.270GKO500G                 : ARR( 0.434E-13,  -900., 0.0);
+{  3762} G2O500M +PERO2              =  0.400G1O500N + 0.300GOO500B + 0.300GKO500G                 : ARR( 0.162E-13, -1400., 0.0);
+{  3763} G2O500M +PERO3              =  0.460G1O500N + 0.270GOO500B + 0.270GKO500G                 : ARR( 0.488E-13, -1250., 0.0);
+{  3764} G2O500M +PERO5              =  0.460G1O500N + 0.270GOO500B + 0.270GKO500G                 : ARR( 0.183E-11,   450., 0.0);
+{  3765} G2O500M +PERO6              =  0.300G1O500N + 0.350GOO500B + 0.350GKO500G                 : ARR( 0.168E-13, -1300., 0.0);
+{  3766} G2O500M +PERO9              =  0.650G1O500N + 0.350GKO500G                                : ARR( 0.100E-10,     0., 0.0);
+{  3767} G1O500N                     =       GD02000 +      GDO3001 +      GHO2                    : ARR( 0.400E+15,  3962., 0.0);
+{  3768} GKO5004 +GHO                =       GKK5000 +      GHO2                                   : ARR( 0.278E-10,     0., 0.0);
+{  3769} GKO5004+HV               =       G3K4000 +      GCH3O2                                 :  0.100E+01*SUN;
+{  3770} GKO5004+HV               =       GD02000 +      GK03000                                :  0.100E+01*SUN;
+{  3771} GNO500C +GHO                =       G2N501I                                               : ARR( 0.176E-12,     0., 0.0);
+{  3772} GNO500C +GHO                =       GNK5007 +      GHO2                                   : ARR( 0.176E-11,     0., 0.0);
+{  3773} GNO500C +GHO                =       G2N501J                                               : ARR( 0.241E-12,     0., 0.0);
+{  3774} GNO500C +GHO                =       G2N500D                                               : ARR( 0.176E-12,     0., 0.0);
+{  3775} GNO500C +GHO                =       G1N500B                                               : ARR( 0.220E-17,    85., 2.0);
+{  3776} GNO500C+HV               =       G1O5006 +      GNO2                                   :  0.100E+01*SUN;
+{  3777} G2N501I +GNO                =       G1N501K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3778} G2N501I +GNO                =       GNN500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3779} G2N501I +GHO2               =       GHN501e                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3780} G2N501I +GNO3               =       G1N501K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3781} G2N501I +MEPERO             =  0.480G1N501K + 0.260GNO500O + 0.260GND500O                 : ARR( 0.164E-12,  -795., 0.0);
+{  3782} G2N501I +PERO1              =  0.600G1N501K + 0.200GNO500O + 0.200GND500O                 : ARR( 0.126E-12,  -850., 0.0);
+{  3783} G2N501I +PERO2              =  0.560G1N501K + 0.220GNO500O + 0.220GND500O                 : ARR( 0.471E-13, -1350., 0.0);
+{  3784} G2N501I +PERO3              =  0.600G1N501K + 0.200GNO500O + 0.200GND500O                 : ARR( 0.142E-12, -1200., 0.0);
+{  3785} G2N501I +PERO5              =  0.600G1N501K + 0.200GNO500O + 0.200GND500O                 : ARR( 0.533E-11,   500., 0.0);
+{  3786} G2N501I +PERO6              =  0.460G1N501K + 0.270GNO500O + 0.270GND500O                 : ARR( 0.488E-13, -1250., 0.0);
+{  3787} G2N501I +PERO9              =  0.800G1N501K + 0.200GND500O                                : ARR( 0.100E-10,     0., 0.0);
+{  3788} G2N501J +GNO                =       G1N501L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3789} G2N501J +GNO                =       GNN500y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3790} G2N501J +GHO2               =       GHN501f                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3791} G2N501J +GNO3               =       G1N501L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3792} G2N501J +MEPERO             =  0.340G1N501L + 0.330GNO500T + 0.330GNK500d                 : ARR( 0.565E-13,  -845., 0.0);
+{  3793} G2N501J +PERO1              =  0.460G1N501L + 0.270GNO500T + 0.270GNK500d                 : ARR( 0.434E-13,  -900., 0.0);
+{  3794} G2N501J +PERO2              =  0.400G1N501L + 0.300GNO500T + 0.300GNK500d                 : ARR( 0.162E-13, -1400., 0.0);
+{  3795} G2N501J +PERO3              =  0.460G1N501L + 0.270GNO500T + 0.270GNK500d                 : ARR( 0.488E-13, -1250., 0.0);
+{  3796} G2N501J +PERO5              =  0.460G1N501L + 0.270GNO500T + 0.270GNK500d                 : ARR( 0.183E-11,   450., 0.0);
+{  3797} G2N501J +PERO6              =  0.300G1N501L + 0.350GNO500T + 0.350GNK500d                 : ARR( 0.168E-13, -1300., 0.0);
+{  3798} G2N501J +PERO9              =  0.650G1N501L + 0.350GNK500d                                : ARR( 0.100E-10,     0., 0.0);
+{  3799} G1N501K                     =       GND4005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  3800} G1N501L                     =       G2N501K                                               : ARR( 0.240E+12,  4177., 0.0);
+{  3801} G1N501L                     =       GDO3001 +      GD02000 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{  3802} G2N501K +GNO                =       G1N501M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3803} G2N501K +GNO                =       GNN5016                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3804} G2N501K +GHO2               =       GHN501g                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3805} G2N501K +GNO3               =       G1N501M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3806} G2N501K +MEPERO             =  0.480G1N501M + 0.260GNO500U + 0.260GND500P                 : ARR( 0.164E-12,  -795., 0.0);
+{  3807} G2N501K +PERO1              =  0.600G1N501M + 0.200GNO500U + 0.200GND500P                 : ARR( 0.126E-12,  -850., 0.0);
+{  3808} G2N501K +PERO2              =  0.560G1N501M + 0.220GNO500U + 0.220GND500P                 : ARR( 0.471E-13, -1350., 0.0);
+{  3809} G2N501K +PERO3              =  0.600G1N501M + 0.200GNO500U + 0.200GND500P                 : ARR( 0.142E-12, -1200., 0.0);
+{  3810} G2N501K +PERO5              =  0.600G1N501M + 0.200GNO500U + 0.200GND500P                 : ARR( 0.533E-11,   500., 0.0);
+{  3811} G2N501K +PERO6              =  0.460G1N501M + 0.270GNO500U + 0.270GND500P                 : ARR( 0.488E-13, -1250., 0.0);
+{  3812} G2N501K +PERO9              =  0.800G1N501M + 0.200GND500P                                : ARR( 0.100E-10,     0., 0.0);
+{  3813} G1N501M                     =       GNK500e +      GHO2                                   : ARR( 0.800E+11,  2837., 0.0);
+{  3814} G1N501M                     =       GND4007 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  3815} GHO5009 +GHO                =       GHK5004 +      GHO2                                   : ARR( 0.863E-11,     0., 0.0);
+{  3816} GHO5009 +GHO                =       GKO5005 +      GHO                                    : ARR( 0.425E-10,     0., 0.0);
+{  3817} GHO5009 +GHO                =       G2O5006                                               : ARR( 0.196E-11,  -190., 0.0);
+{  3818} GHO5009+HV               =       G1O5006 +      GHO                                    :  0.100E+01*SUN;
+{  3819} GOO5005 +GHO                =       G2O500N                                               : ARR( 0.118E-11,     0., 0.0);
+{  3820} GOO5005 +GHO                =       GKO5005 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  3821} GOO5005 +GHO                =       GKO5007 +      GHO2                                   : ARR( 0.864E-11,     0., 0.0);
+{  3822} G2O500N +GNO                =       G1O500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3823} G2O500N +GNO                =       GNO500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3824} G2O500N +GHO2               =       GHO500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3825} G2O500N +GNO3               =       G1O500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3826} G2O500N +MEPERO             =  0.340G1O500O + 0.330GOO500B + 0.330GKO500H                 : ARR( 0.565E-13,  -845., 0.0);
+{  3827} G2O500N +PERO1              =  0.460G1O500O + 0.270GOO500B + 0.270GKO500H                 : ARR( 0.434E-13,  -900., 0.0);
+{  3828} G2O500N +PERO2              =  0.400G1O500O + 0.300GOO500B + 0.300GKO500H                 : ARR( 0.162E-13, -1400., 0.0);
+{  3829} G2O500N +PERO3              =  0.460G1O500O + 0.270GOO500B + 0.270GKO500H                 : ARR( 0.488E-13, -1250., 0.0);
+{  3830} G2O500N +PERO5              =  0.460G1O500O + 0.270GOO500B + 0.270GKO500H                 : ARR( 0.183E-11,   450., 0.0);
+{  3831} G2O500N +PERO6              =  0.300G1O500O + 0.350GOO500B + 0.350GKO500H                 : ARR( 0.168E-13, -1300., 0.0);
+{  3832} G2O500N +PERO9              =  0.650G1O500O + 0.350GKO500H                                : ARR( 0.100E-10,     0., 0.0);
+{  3833} G1O500O                     =       GDO3001 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  3834} GKO5005 +GHO                =       G2K500F                                               : ARR( 0.542E-12,     0., 0.0);
+{  3835} GKO5005 +GHO                =       GKK5001 +      GHO2                                   : ARR( 0.521E-11,     0., 0.0);
+{  3836} GKO5005 +GHO                =       G2K500G                                               : ARR( 0.715E-12,     0., 0.0);
+{  3837} GKO5005 +GHO                =       G2K500H                                               : ARR( 0.542E-12,     0., 0.0);
+{  3838} GKO5005+HV               =       G3K3002 +      G202000                                :  0.100E+01*SUN;
+{  3839} G2K500F +GNO                =       G1K500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3840} G2K500F +GNO                =       GNK500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3841} G2K500F +GHO2               =       GHK500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3842} G2K500F +GNO3               =       G1K500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3843} G2K500F +MEPERO             =  0.480G1K500G + 0.260GKO500D + 0.260GDK5009                 : ARR( 0.164E-12,  -795., 0.0);
+{  3844} G2K500F +PERO1              =  0.600G1K500G + 0.200GKO500D + 0.200GDK5009                 : ARR( 0.126E-12,  -850., 0.0);
+{  3845} G2K500F +PERO2              =  0.560G1K500G + 0.220GKO500D + 0.220GDK5009                 : ARR( 0.471E-13, -1350., 0.0);
+{  3846} G2K500F +PERO3              =  0.600G1K500G + 0.200GKO500D + 0.200GDK5009                 : ARR( 0.142E-12, -1200., 0.0);
+{  3847} G2K500F +PERO5              =  0.600G1K500G + 0.200GKO500D + 0.200GDK5009                 : ARR( 0.533E-11,   500., 0.0);
+{  3848} G2K500F +PERO6              =  0.460G1K500G + 0.270GKO500D + 0.270GDK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{  3849} G2K500F +PERO9              =  0.800G1K500G + 0.200GDK5009                                : ARR( 0.100E-10,     0., 0.0);
+{  3850} G2K500G +GNO                =       G1K500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3851} G2K500G +GNO                =       GNK500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3852} G2K500G +GHO2               =       GHK500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3853} G2K500G +GNO3               =       G1K500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3854} G2K500G +MEPERO             =  0.340G1K500H + 0.330GKO500G + 0.330GKK5007                 : ARR( 0.565E-13,  -845., 0.0);
+{  3855} G2K500G +PERO1              =  0.460G1K500H + 0.270GKO500G + 0.270GKK5007                 : ARR( 0.434E-13,  -900., 0.0);
+{  3856} G2K500G +PERO2              =  0.400G1K500H + 0.300GKO500G + 0.300GKK5007                 : ARR( 0.162E-13, -1400., 0.0);
+{  3857} G2K500G +PERO3              =  0.460G1K500H + 0.270GKO500G + 0.270GKK5007                 : ARR( 0.488E-13, -1250., 0.0);
+{  3858} G2K500G +PERO5              =  0.460G1K500H + 0.270GKO500G + 0.270GKK5007                 : ARR( 0.183E-11,   450., 0.0);
+{  3859} G2K500G +PERO6              =  0.300G1K500H + 0.350GKO500G + 0.350GKK5007                 : ARR( 0.168E-13, -1300., 0.0);
+{  3860} G2K500G +PERO9              =  0.650G1K500H + 0.350GKK5007                                : ARR( 0.100E-10,     0., 0.0);
+{  3861} G2K500H +GNO                =       G1K500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3862} G2K500H +GNO                =       GNK500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3863} G2K500H +GHO2               =       GHK500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3864} G2K500H +GNO3               =       G1K500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3865} G2K500H +MEPERO             =  0.480G1K500I + 0.260GKO5009 + 0.260GDK5003                 : ARR( 0.146E-12,  -445., 0.0);
+{  3866} G2K500H +PERO1              =  0.600G1K500I + 0.200GKO5009 + 0.200GDK5003                 : ARR( 0.112E-12,  -500., 0.0);
+{  3867} G2K500H +PERO2              =  0.560G1K500I + 0.220GKO5009 + 0.220GDK5003                 : ARR( 0.418E-13, -1000., 0.0);
+{  3868} G2K500H +PERO3              =  0.600G1K500I + 0.200GKO5009 + 0.200GDK5003                 : ARR( 0.126E-12,  -850., 0.0);
+{  3869} G2K500H +PERO5              =  0.600G1K500I + 0.200GKO5009 + 0.200GDK5003                 : ARR( 0.473E-11,   850., 0.0);
+{  3870} G2K500H +PERO6              =  0.460G1K500I + 0.270GKO5009 + 0.270GDK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{  3871} G2K500H +PERO9              =  0.800G1K500I + 0.200GDK5003                                : ARR( 0.100E-10,     0., 0.0);
+{  3872} G3K3002 +GHO2               =  0.800GGO3001 + 0.200GAO3001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3873} G3K3002 +GNO                =       GD02000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  3874} G3K3002 +GNO2               =       GPO3001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3875} G3K3002 +GNO3               =       GD02000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  3876} G3K3002 +MEPERO             =  0.685GD02000 + 0.315GAO3001 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3877} G3K3002 +PERO1              =  0.800GD02000 + 0.200GAO3001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3878} G3K3002 +PERO2              =  0.750GD02000 + 0.250GAO3001 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3879} G3K3002 +PERO3              =  0.800GD02000 + 0.200GAO3001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3880} G3K3002 +PERO5              =  0.650GD02000 + 0.350GAO3001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3881} G3K3002 +PERO6              =  0.650GD02000 + 0.350GAO3001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3882} G3K3002 +PERO9              =       GD02000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  3883} G1K500G                     =       GDK4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{  3884} G1K500H                     =       G3K3002 +      GD02000                                : ARR( 0.200E+15,  2777., 0.0);
+{  3885} G1K500I +OXYGEN             =       GDK5003 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  3886} G1K500I                     =       GKK5002 +      GHO2                                   : ARR( 0.800E+11,  4100., 0.0);
+{  3887} GNO500D +GHO                =       GNK500H +      GHO2                                   : ARR( 0.873E-11,     0., 0.0);
+{  3888} GNO500D +GHO                =       G2N501L                                               : ARR( 0.147E-11,     0., 0.0);
+{  3889} GNO500D +GHO                =       GNK5008 +      GHO2                                   : ARR( 0.215E-11,     0., 0.0);
+{  3890} GNO500D+HV               =       G1O5007 +      GNO2                                   :  0.100E+01*SUN;
+{  3891} G2N501L +GNO                =       G1N501N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3892} G2N501L +GNO                =       GNN5016                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3893} G2N501L +GHO2               =       GHN501h                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3894} G2N501L +GNO3               =       G1N501N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3895} G2N501L +MEPERO             =  0.340G1N501N + 0.330GNO500W + 0.330GNK500f                 : ARR( 0.565E-13,  -845., 0.0);
+{  3896} G2N501L +PERO1              =  0.460G1N501N + 0.270GNO500W + 0.270GNK500f                 : ARR( 0.434E-13,  -900., 0.0);
+{  3897} G2N501L +PERO2              =  0.400G1N501N + 0.300GNO500W + 0.300GNK500f                 : ARR( 0.162E-13, -1400., 0.0);
+{  3898} G2N501L +PERO3              =  0.460G1N501N + 0.270GNO500W + 0.270GNK500f                 : ARR( 0.488E-13, -1250., 0.0);
+{  3899} G2N501L +PERO5              =  0.460G1N501N + 0.270GNO500W + 0.270GNK500f                 : ARR( 0.183E-11,   450., 0.0);
+{  3900} G2N501L +PERO6              =  0.300G1N501N + 0.350GNO500W + 0.350GNK500f                 : ARR( 0.168E-13, -1300., 0.0);
+{  3901} G2N501L +PERO9              =  0.650G1N501N + 0.350GNK500f                                : ARR( 0.100E-10,     0., 0.0);
+{  3902} G1N501N                     =       GD02000 +      GND3002 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{  3903} G1N501N                     =       GDO3001 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  3904} GHO500A +GHO                =       GHK500N +      GHO2                                   : ARR( 0.878E-11,     0., 0.0);
+{  3905} GHO500A +GHO                =       GHK5005 +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{  3906} GHO500A +GHO                =       GDO5003 +      GHO                                    : ARR( 0.169E-10,     0., 0.0);
+{  3907} GHO500A +GHO                =       G2O5007                                               : ARR( 0.199E-11,  -190., 0.0);
+{  3908} GHO500A+HV               =       G1O5007 +      GHO                                    :  0.100E+01*SUN;
+{  3909} GOO5006 +GHO                =       GKO5006 +      GHO2                                   : ARR( 0.858E-11,     0., 0.0);
+{  3910} GOO5006 +GHO                =       G2O500O                                               : ARR( 0.145E-11,     0., 0.0);
+{  3911} GOO5006 +GHO                =       GKO5008 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  3912} GOO5006 +GHO                =       GDO5003 +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{  3913} G2O500O +GNO                =       G1O500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3914} G2O500O +GNO                =       GNO500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3915} G2O500O +GHO2               =       GHO500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3916} G2O500O +GNO3               =       G1O500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3917} G2O500O +MEPERO             =  0.340G1O500P + 0.330GOO500C + 0.330GKO500I                 : ARR( 0.565E-13,  -845., 0.0);
+{  3918} G2O500O +PERO1              =  0.460G1O500P + 0.270GOO500C + 0.270GKO500I                 : ARR( 0.434E-13,  -900., 0.0);
+{  3919} G2O500O +PERO2              =  0.400G1O500P + 0.300GOO500C + 0.300GKO500I                 : ARR( 0.162E-13, -1400., 0.0);
+{  3920} G2O500O +PERO3              =  0.460G1O500P + 0.270GOO500C + 0.270GKO500I                 : ARR( 0.488E-13, -1250., 0.0);
+{  3921} G2O500O +PERO5              =  0.460G1O500P + 0.270GOO500C + 0.270GKO500I                 : ARR( 0.183E-11,   450., 0.0);
+{  3922} G2O500O +PERO6              =  0.300G1O500P + 0.350GOO500C + 0.350GKO500I                 : ARR( 0.168E-13, -1300., 0.0);
+{  3923} G2O500O +PERO9              =  0.650G1O500P + 0.350GKO500I                                : ARR( 0.100E-10,     0., 0.0);
+{  3924} G1O500P                     =       GD02000 +      GDO3002 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{  3925} G1O500P                     =       GDO3001 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  3926} GDO5003 +GHO                =       GDK500A +      GHO2                                   : ARR( 0.847E-11,     0., 0.0);
+{  3927} GDO5003 +GHO                =       G2D5007                                               : ARR( 0.453E-11,     0., 0.0);
+{  3928} GDO5003 +GHO                =       GDK5001 +      GHO2                                   : ARR( 0.635E-11,     0., 0.0);
+{  3929} GDO5003 +GHO                =       G3K5005                                               : ARR( 0.210E-10,     0., 0.0);
+{  3930} GDO5003 +GNO3               =       G3K5005 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3931} GDO5003+HV               =       GDO4001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  3932} G2D5007 +GNO                =       G1D500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  3933} G2D5007 +GNO                =       GND500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  3934} G2D5007 +GHO2               =       GHD500E                                               : ARR( 0.242E-12, -1250., 0.0);
+{  3935} G2D5007 +GNO3               =       G1D500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3936} G2D5007 +MEPERO             =  0.340G1D500A + 0.330GDO5009 + 0.330GDK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{  3937} G2D5007 +PERO1              =  0.460G1D500A + 0.270GDO5009 + 0.270GDK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{  3938} G2D5007 +PERO2              =  0.400G1D500A + 0.300GDO5009 + 0.300GDK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{  3939} G2D5007 +PERO3              =  0.460G1D500A + 0.270GDO5009 + 0.270GDK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  3940} G2D5007 +PERO5              =  0.460G1D500A + 0.270GDO5009 + 0.270GDK500B                 : ARR( 0.183E-11,   450., 0.0);
+{  3941} G2D5007 +PERO6              =  0.300G1D500A + 0.350GDO5009 + 0.350GDK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{  3942} G2D5007 +PERO9              =  0.650G1D500A + 0.350GDK500B                                : ARR( 0.100E-10,     0., 0.0);
+{  3943} G3K5005 +GHO2               =  0.800GGO5004 + 0.200GAO5004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  3944} G3K5005 +GNO                =       GDO4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  3945} G3K5005 +GNO2               =       GPO5004                                               : ARR( 0.330E-08,     0.,-1.0);
+{  3946} G3K5005 +GNO3               =       GDO4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  3947} G3K5005 +MEPERO             =  0.685GDO4001 + 0.315GAO5004 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3948} G3K5005 +PERO1              =  0.800GDO4001 + 0.200GAO5004 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3949} G3K5005 +PERO2              =  0.750GDO4001 + 0.250GAO5004 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3950} G3K5005 +PERO3              =  0.800GDO4001 + 0.200GAO5004 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3951} G3K5005 +PERO5              =  0.650GDO4001 + 0.350GAO5004 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3952} G3K5005 +PERO6              =  0.650GDO4001 + 0.350GAO5004 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  3953} G3K5005 +PERO9              =       GDO4001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  3954} G1D500A                     =       GD02000 +      GDD3001 +      GHO2                    : ARR( 0.200E+15,  3132., 0.0);
+{  3955} G1D500A                     =       GDO3001 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{  3956} GNO3002 +GHO                =       G2N3003                                               : ARR( 0.171E-12,     0., 0.0);
+{  3957} GNO3002 +GHO                =       GNK3000 +      GHO2                                   : ARR( 0.171E-11,     0., 0.0);
+{  3958} GNO3002 +GHO                =       G1N3002                                               : ARR( 0.215E-17,    85., 2.0);
+{  3959} GNO3002+HV               =       G1O3000 +      GNO2                                   :  0.100E+01*SUN;
+{  3960} GHO3000 +GHO                =       GHK3000 +      GHO2                                   : ARR( 0.847E-11,     0., 0.0);
+{  3961} GHO3000 +GHO                =       GDO3001 +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{  3962} GHO3000 +GHO                =       G2O3000                                               : ARR( 0.192E-11,  -190., 0.0);
+{  3963} GHO3000+HV               =       G1O3000 +      GHO                                    :  0.100E+01*SUN;
+{  3964} GOO3000 +GHO                =       GKO3000 +      GHO2                                   : ARR( 0.811E-11,     0., 0.0);
+{  3965} GOO3000 +GHO                =       GDO3001 +      GHO2                                   : ARR( 0.389E-11,     0., 0.0);
+{  3966} GDO3001 +GHO                =       GDK3000 +      GHO2                                   : ARR( 0.524E-11,     0., 0.0);
+{  3967} GDO3001 +GHO                =       G3K3002                                               : ARR( 0.213E-10,     0., 0.0);
+{  3968} GDO3001 +GNO3               =       G3K3002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3969} GDO3001+HV               =       GD02000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  3970} GKO5006 +GHO                =       GKK5003 +      GHO2                                   : ARR( 0.338E-10,     0., 0.0);
+{  3971} GKO5006 +GHO                =       GDK500A +      GHO2                                   : ARR( 0.416E-11,     0., 0.0);
+{  3972} GKO5006+HV               =       G3K2000 +      G2O3003                                :  0.100E+01*SUN;
+{  3973} GKO5006+HV               =       GK03000 +      GDO2000                                :  0.100E+01*SUN;
+{  3974} G2O3003 +GNO                =       G1O3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  3975} G2O3003 +GNO                =       GNO3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{  3976} G2O3003 +GHO2               =       GHO3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{  3977} G2O3003 +GNO3               =       G1O3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  3978} G2O3003 +MEPERO             =  0.480G1O3003 + 0.260GOO3002 + 0.260GDO3002                 : ARR( 0.164E-12,  -795., 0.0);
+{  3979} G2O3003 +PERO1              =  0.600G1O3003 + 0.200GOO3002 + 0.200GDO3002                 : ARR( 0.126E-12,  -850., 0.0);
+{  3980} G2O3003 +PERO2              =  0.560G1O3003 + 0.220GOO3002 + 0.220GDO3002                 : ARR( 0.471E-13, -1350., 0.0);
+{  3981} G2O3003 +PERO3              =  0.600G1O3003 + 0.200GOO3002 + 0.200GDO3002                 : ARR( 0.142E-12, -1200., 0.0);
+{  3982} G2O3003 +PERO5              =  0.600G1O3003 + 0.200GOO3002 + 0.200GDO3002                 : ARR( 0.533E-11,   500., 0.0);
+{  3983} G2O3003 +PERO6              =  0.460G1O3003 + 0.270GOO3002 + 0.270GDO3002                 : ARR( 0.488E-13, -1250., 0.0);
+{  3984} G2O3003 +PERO9              =  0.800G1O3003 + 0.200GDO3002                                : ARR( 0.100E-10,     0., 0.0);
+{  3985} G1O3003                     =       GDO2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4443., 0.0);
+{  3986} GDO4001 +GHO                =       GDK4000 +      GHO2                                   : ARR( 0.272E-10,     0., 0.0);
+{  3987} GDO4001 +GHO                =       G3K4000                                               : ARR( 0.213E-10,     0., 0.0);
+{  3988} GDO4001 +GNO3               =       G3K4000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  3989} GDO4001+HV               =       G2O3000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  3990} GDO4001+HV               =  2.000GD02000                                               :  0.100E+01*SUN;
+{  3991} GHK5003 +GHO                =       GKK5000 +      GHO                                    : ARR( 0.111E-09,     0., 0.0);
+{  3992} GHK5003+HV               =       G3K2000 +      G2H3003                                :  0.100E+01*SUN;
+{  3993} GHK5003+HV               =       GK03000 +      G2D2000 +      GHO                     :  0.100E+01*SUN;
+{  3994} GHK5003+HV               =       G1K5000 +      GHO                                    :  0.100E+01*SUN;
+{  3995} GKK5000 +GHO                =       G2K500I                                               : ARR( 0.322E-12,     0., 0.0);
+{  3996} GKK5000 +GHO                =       G2K500J                                               : ARR( 0.828E-12,     0., 0.0);
+{  3997} GKK5000+HV               =       G3K2000 +      G2K3000                                :  0.100E+01*SUN;
+{  3998} GKK5000+HV               =       G3K4003 +      GCH3O2                                 :  0.100E+01*SUN;
+{  3999} G2K500I +GNO                =       G1K500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4000} G2K500I +GNO                =       GNK500I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4001} G2K500I +GHO2               =       GHK500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4002} G2K500I +GNO3               =       G1K500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4003} G2K500I +MEPERO             =  0.480G1K500J + 0.260GKK5003 + 0.260GDK500C                 : ARR( 0.164E-12,  -795., 0.0);
+{  4004} G2K500I +PERO1              =  0.600G1K500J + 0.200GKK5003 + 0.200GDK500C                 : ARR( 0.126E-12,  -850., 0.0);
+{  4005} G2K500I +PERO2              =  0.560G1K500J + 0.220GKK5003 + 0.220GDK500C                 : ARR( 0.471E-13, -1350., 0.0);
+{  4006} G2K500I +PERO3              =  0.600G1K500J + 0.200GKK5003 + 0.200GDK500C                 : ARR( 0.142E-12, -1200., 0.0);
+{  4007} G2K500I +PERO5              =  0.600G1K500J + 0.200GKK5003 + 0.200GDK500C                 : ARR( 0.533E-11,   500., 0.0);
+{  4008} G2K500I +PERO6              =  0.460G1K500J + 0.270GKK5003 + 0.270GDK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  4009} G2K500I +PERO9              =  0.800G1K500J + 0.200GDK500C                                : ARR( 0.100E-10,     0., 0.0);
+{  4010} G2K500J +GNO                =       G1K500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4011} G2K500J +GNO                =       GNK500g                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4012} G2K500J +GHO2               =       GHK500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4013} G2K500J +GNO3               =       G1K500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4014} G2K500J +MEPERO             =  0.340G1K500K + 0.330GKK5008 + 0.330GKK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{  4015} G2K500J +PERO1              =  0.460G1K500K + 0.270GKK5008 + 0.270GKK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{  4016} G2K500J +PERO2              =  0.400G1K500K + 0.300GKK5008 + 0.300GKK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{  4017} G2K500J +PERO3              =  0.460G1K500K + 0.270GKK5008 + 0.270GKK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{  4018} G2K500J +PERO5              =  0.460G1K500K + 0.270GKK5008 + 0.270GKK5009                 : ARR( 0.183E-11,   450., 0.0);
+{  4019} G2K500J +PERO6              =  0.300G1K500K + 0.350GKK5008 + 0.350GKK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{  4020} G2K500J +PERO9              =  0.650G1K500K + 0.350GKK5009                                : ARR( 0.100E-10,     0., 0.0);
+{  4021} G3K4003 +GHO2               =  0.800GGK4000 + 0.200GAK4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4022} G3K4003 +GNO                =       G2K3000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4023} G3K4003 +GNO2               =       GPK4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4024} G3K4003 +GNO3               =       G2K3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4025} G3K4003 +MEPERO             =  0.685G2K3000 + 0.315GAK4000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4026} G3K4003 +PERO1              =  0.800G2K3000 + 0.200GAK4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4027} G3K4003 +PERO2              =  0.750G2K3000 + 0.250GAK4000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4028} G3K4003 +PERO3              =  0.800G2K3000 + 0.200GAK4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4029} G3K4003 +PERO5              =  0.650G2K3000 + 0.350GAK4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4030} G3K4003 +PERO6              =  0.650G2K3000 + 0.350GAK4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4031} G3K4003 +PERO9              =       G2K3000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  4032} G1K500J                     =       G3K4003 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{  4033} G1K500K                     =       G3K2000 +      GDK3000                                : ARR( 0.400E+15,  4513., 0.0);
+{  4034} GNK5007 +GHO                =       G2N501M                                               : ARR( 0.168E-12,     0., 0.0);
+{  4035} GNK5007 +GHO                =       G2N501N                                               : ARR( 0.230E-12,     0., 0.0);
+{  4036} GNK5007 +GHO                =       GKK5001 +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{  4037} GNK5007 +GHO                =       G2N501O                                               : ARR( 0.102E-12,     0., 0.0);
+{  4038} GNK5007+HV               =       G1K5001 +      GNO2                                   :  0.100E+01*SUN;
+{  4039} GNK5007+HV               =       G3N4004 +      GCH3O2                                 :  0.100E+01*SUN;
+{  4040} GNK5007+HV               =       GU02000 +      GNK3000                                :  0.100E+01*SUN;
+{  4041} G2N501M +GNO                =       G1N501O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4042} G2N501M +GNO                =       GNN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4043} G2N501M +GHO2               =       GHN501i                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4044} G2N501M +GNO3               =       G1N501O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4045} G2N501M +MEPERO             =  0.480G1N501O + 0.260GNK5009 + 0.260GND500Q                 : ARR( 0.146E-12,  -445., 0.0);
+{  4046} G2N501M +PERO1              =  0.600G1N501O + 0.200GNK5009 + 0.200GND500Q                 : ARR( 0.112E-12,  -500., 0.0);
+{  4047} G2N501M +PERO2              =  0.560G1N501O + 0.220GNK5009 + 0.220GND500Q                 : ARR( 0.418E-13, -1000., 0.0);
+{  4048} G2N501M +PERO3              =  0.600G1N501O + 0.200GNK5009 + 0.200GND500Q                 : ARR( 0.126E-12,  -850., 0.0);
+{  4049} G2N501M +PERO5              =  0.600G1N501O + 0.200GNK5009 + 0.200GND500Q                 : ARR( 0.473E-11,   850., 0.0);
+{  4050} G2N501M +PERO6              =  0.460G1N501O + 0.270GNK5009 + 0.270GND500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{  4051} G2N501M +PERO9              =  0.800G1N501O + 0.200GND500Q                                : ARR( 0.100E-10,     0., 0.0);
+{  4052} G2N501N +GNO                =       G1N501P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4053} G2N501N +GNO                =       GNN500w                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4054} G2N501N +GHO2               =       GHN501j                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4055} G2N501N +GNO3               =       G1N501P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4056} G2N501N +MEPERO             =  0.340G1N501P + 0.330GNK500d + 0.330GNK500g                 : ARR( 0.565E-13,  -845., 0.0);
+{  4057} G2N501N +PERO1              =  0.460G1N501P + 0.270GNK500d + 0.270GNK500g                 : ARR( 0.434E-13,  -900., 0.0);
+{  4058} G2N501N +PERO2              =  0.400G1N501P + 0.300GNK500d + 0.300GNK500g                 : ARR( 0.162E-13, -1400., 0.0);
+{  4059} G2N501N +PERO3              =  0.460G1N501P + 0.270GNK500d + 0.270GNK500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  4060} G2N501N +PERO5              =  0.460G1N501P + 0.270GNK500d + 0.270GNK500g                 : ARR( 0.183E-11,   450., 0.0);
+{  4061} G2N501N +PERO6              =  0.300G1N501P + 0.350GNK500d + 0.350GNK500g                 : ARR( 0.168E-13, -1300., 0.0);
+{  4062} G2N501N +PERO9              =  0.650G1N501P + 0.350GNK500g                                : ARR( 0.100E-10,     0., 0.0);
+{  4063} G2N501O +GNO                =       G1N501Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4064} G2N501O +GNO                =       GNN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4065} G2N501O +GHO2               =       GHN501k                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4066} G2N501O +GNO3               =       G1N501Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4067} G2N501O +MEPERO             =  0.480G1N501Q + 0.260GNK500T + 0.260GND500R                 : ARR( 0.164E-12,  -795., 0.0);
+{  4068} G2N501O +PERO1              =  0.600G1N501Q + 0.200GNK500T + 0.200GND500R                 : ARR( 0.126E-12,  -850., 0.0);
+{  4069} G2N501O +PERO2              =  0.560G1N501Q + 0.220GNK500T + 0.220GND500R                 : ARR( 0.471E-13, -1350., 0.0);
+{  4070} G2N501O +PERO3              =  0.600G1N501Q + 0.200GNK500T + 0.200GND500R                 : ARR( 0.142E-12, -1200., 0.0);
+{  4071} G2N501O +PERO5              =  0.600G1N501Q + 0.200GNK500T + 0.200GND500R                 : ARR( 0.533E-11,   500., 0.0);
+{  4072} G2N501O +PERO6              =  0.460G1N501Q + 0.270GNK500T + 0.270GND500R                 : ARR( 0.488E-13, -1250., 0.0);
+{  4073} G2N501O +PERO9              =  0.800G1N501Q + 0.200GND500R                                : ARR( 0.100E-10,     0., 0.0);
+{  4074} G3N4004 +GHO2               =  0.800GGN4004 + 0.200GAN4004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4075} G3N4004 +GNO                =       GD03000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4076} G3N4004 +GNO2               =       GPN4004                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4077} G3N4004 +GNO3               =       GD03000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4078} G3N4004 +MEPERO             =  0.685GD03000 + 0.315GAN4004 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4079} G3N4004 +PERO1              =  0.800GD03000 + 0.200GAN4004 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4080} G3N4004 +PERO2              =  0.750GD03000 + 0.250GAN4004 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4081} G3N4004 +PERO3              =  0.800GD03000 + 0.200GAN4004 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4082} G3N4004 +PERO5              =  0.650GD03000 + 0.350GAN4004 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4083} G3N4004 +PERO6              =  0.650GD03000 + 0.350GAN4004 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4084} G3N4004 +PERO9              =       GD03000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  4085} G1N501O +OXYGEN             =       GND500Q +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  4086} G1N501P                     =       GDK3000 +      GD02000 +      GNO2                    : ARR( 0.200E+15,  6261., 0.0);
+{  4087} G1N501Q                     =       G3N4004 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{  4088} GHK5004 +GHO                =       G2H500S                                               : ARR( 0.367E-11,     0., 0.0);
+{  4089} GHK5004 +GHO                =       GKK5001 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{  4090} GHK5004 +GHO                =       G2K5001                                               : ARR( 0.192E-11,  -190., 0.0);
+{  4091} GHK5004+HV               =       G1K5001 +      GHO                                    :  0.100E+01*SUN;
+{  4092} GHK5004+HV               =       G3H4000 +      GCH3O2                                 :  0.100E+01*SUN;
+{  4093} G2H500S +GNO                =       G1H500a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4094} G2H500S +GNO                =       GHN501S                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4095} G2H500S +GHO2               =       GHH500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4096} G2H500S +GNO3               =       G1H500a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4097} G2H500S +MEPERO             =  0.340G1H500a + 0.330GHK500P + 0.330GHK500O                 : ARR( 0.565E-13,  -845., 0.0);
+{  4098} G2H500S +PERO1              =  0.460G1H500a + 0.270GHK500P + 0.270GHK500O                 : ARR( 0.434E-13,  -900., 0.0);
+{  4099} G2H500S +PERO2              =  0.400G1H500a + 0.300GHK500P + 0.300GHK500O                 : ARR( 0.162E-13, -1400., 0.0);
+{  4100} G2H500S +PERO3              =  0.460G1H500a + 0.270GHK500P + 0.270GHK500O                 : ARR( 0.488E-13, -1250., 0.0);
+{  4101} G2H500S +PERO5              =  0.460G1H500a + 0.270GHK500P + 0.270GHK500O                 : ARR( 0.183E-11,   450., 0.0);
+{  4102} G2H500S +PERO6              =  0.300G1H500a + 0.350GHK500P + 0.350GHK500O                 : ARR( 0.168E-13, -1300., 0.0);
+{  4103} G2H500S +PERO9              =  0.650G1H500a + 0.350GHK500O                                : ARR( 0.100E-10,     0., 0.0);
+{  4104} G3H4000 +GHO2               =  0.800GGH4000 + 0.200GAH4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4105} G3H4000 +GNO                =       GD03000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  4106} G3H4000 +GNO2               =       GPH4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4107} G3H4000 +GNO3               =       GD03000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  4108} G3H4000 +MEPERO             =  0.685GD03000 + 0.315GAH4000 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4109} G3H4000 +PERO1              =  0.800GD03000 + 0.200GAH4000 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4110} G3H4000 +PERO2              =  0.750GD03000 + 0.250GAH4000 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4111} G3H4000 +PERO3              =  0.800GD03000 + 0.200GAH4000 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4112} G3H4000 +PERO5              =  0.650GD03000 + 0.350GAH4000 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4113} G3H4000 +PERO6              =  0.650GD03000 + 0.350GAH4000 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4114} G3H4000 +PERO9              =       GD03000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  4115} G1H500a                     =       GDK3000 +      GD02000 +      GHO                     : ARR( 0.200E+15,  4722., 0.0);
+{  4116} GKO5007 +GHO                =       G2K500K                                               : ARR( 0.379E-11,     0., 0.0);
+{  4117} GKO5007 +GHO                =       GKK5001 +      GHO2                                   : ARR( 0.654E-11,     0., 0.0);
+{  4118} GKO5007+HV               =       G3K4004 +      GCH3O2                                 :  0.100E+01*SUN;
+{  4119} G2K500K +GNO                =       G1K500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4120} G2K500K +GNO                =       GNK500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4121} G2K500K +GHO2               =       GHK500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4122} G2K500K +GNO3               =       G1K500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4123} G2K500K +MEPERO             =  0.340G1K500L + 0.330GKO500H + 0.330GKK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{  4124} G2K500K +PERO1              =  0.460G1K500L + 0.270GKO500H + 0.270GKK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{  4125} G2K500K +PERO2              =  0.400G1K500L + 0.300GKO500H + 0.300GKK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{  4126} G2K500K +PERO3              =  0.460G1K500L + 0.270GKO500H + 0.270GKK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  4127} G2K500K +PERO5              =  0.460G1K500L + 0.270GKO500H + 0.270GKK5008                 : ARR( 0.183E-11,   450., 0.0);
+{  4128} G2K500K +PERO6              =  0.300G1K500L + 0.350GKO500H + 0.350GKK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{  4129} G2K500K +PERO9              =  0.650G1K500L + 0.350GKK5008                                : ARR( 0.100E-10,     0., 0.0);
+{  4130} G3K4004 +GHO2               =  0.800GGO4002 + 0.200GAO4002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4131} G3K4004 +GNO                =       GD03000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  4132} G3K4004 +GNO2               =       GPO4002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4133} G3K4004 +GNO3               =       GD03000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  4134} G3K4004 +MEPERO             =  0.685GD03000 + 0.315GAO4002 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4135} G3K4004 +PERO1              =  0.800GD03000 + 0.200GAO4002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4136} G3K4004 +PERO2              =  0.750GD03000 + 0.250GAO4002 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4137} G3K4004 +PERO3              =  0.800GD03000 + 0.200GAO4002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4138} G3K4004 +PERO5              =  0.650GD03000 + 0.350GAO4002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4139} G3K4004 +PERO6              =  0.650GD03000 + 0.350GAO4002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4140} G3K4004 +PERO9              =       GD03000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  4141} G1K500L                     =       GDK3000 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3513., 0.0);
+{  4142} GKK5001 +GHO                =       G2K500L                                               : ARR( 0.531E-12,     0., 0.0);
+{  4143} GKK5001 +GHO                =       G2K500M                                               : ARR( 0.701E-12,     0., 0.0);
+{  4144} GKK5001 +GHO                =       G2K500N                                               : ARR( 0.102E-12,     0., 0.0);
+{  4145} GKK5001+HV               =       G3K3000 +      G3K2000                                :  0.100E+01*SUN;
+{  4146} G2K500L +GNO                =       G1K500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4147} G2K500L +GNO                =       GNK500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4148} G2K500L +GHO2               =       GHK500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4149} G2K500L +GNO3               =       G1K500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4150} G2K500L +MEPERO             =  0.480G1K500M + 0.260GKK5002 + 0.260GDK500D                 : ARR( 0.146E-12,  -445., 0.0);
+{  4151} G2K500L +PERO1              =  0.600G1K500M + 0.200GKK5002 + 0.200GDK500D                 : ARR( 0.112E-12,  -500., 0.0);
+{  4152} G2K500L +PERO2              =  0.560G1K500M + 0.220GKK5002 + 0.220GDK500D                 : ARR( 0.418E-13, -1000., 0.0);
+{  4153} G2K500L +PERO3              =  0.600G1K500M + 0.200GKK5002 + 0.200GDK500D                 : ARR( 0.126E-12,  -850., 0.0);
+{  4154} G2K500L +PERO5              =  0.600G1K500M + 0.200GKK5002 + 0.200GDK500D                 : ARR( 0.473E-11,   850., 0.0);
+{  4155} G2K500L +PERO6              =  0.460G1K500M + 0.270GKK5002 + 0.270GDK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{  4156} G2K500L +PERO9              =  0.800G1K500M + 0.200GDK500D                                : ARR( 0.100E-10,     0., 0.0);
+{  4157} G2K500M +GNO                =       G1K500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4158} G2K500M +GNO                =       GNK500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4159} G2K500M +GHO2               =       GHK500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4160} G2K500M +GNO3               =       G1K500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4161} G2K500M +MEPERO             =  0.340G1K500N + 0.330GKK5007 + 0.330GKK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{  4162} G2K500M +PERO1              =  0.460G1K500N + 0.270GKK5007 + 0.270GKK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{  4163} G2K500M +PERO2              =  0.400G1K500N + 0.300GKK5007 + 0.300GKK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{  4164} G2K500M +PERO3              =  0.460G1K500N + 0.270GKK5007 + 0.270GKK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{  4165} G2K500M +PERO5              =  0.460G1K500N + 0.270GKK5007 + 0.270GKK5009                 : ARR( 0.183E-11,   450., 0.0);
+{  4166} G2K500M +PERO6              =  0.300G1K500N + 0.350GKK5007 + 0.350GKK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{  4167} G2K500M +PERO9              =  0.650G1K500N + 0.350GKK5009                                : ARR( 0.100E-10,     0., 0.0);
+{  4168} G2K500N +GNO                =       G1K500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4169} G2K500N +GNO                =       GNK500L                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4170} G2K500N +GHO2               =       GHK500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4171} G2K500N +GNO3               =       G1K500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4172} G2K500N +MEPERO             =  0.480G1K500O + 0.260GKK5004 + 0.260GDK500E                 : ARR( 0.164E-12,  -795., 0.0);
+{  4173} G2K500N +PERO1              =  0.600G1K500O + 0.200GKK5004 + 0.200GDK500E                 : ARR( 0.126E-12,  -850., 0.0);
+{  4174} G2K500N +PERO2              =  0.560G1K500O + 0.220GKK5004 + 0.220GDK500E                 : ARR( 0.471E-13, -1350., 0.0);
+{  4175} G2K500N +PERO3              =  0.600G1K500O + 0.200GKK5004 + 0.200GDK500E                 : ARR( 0.142E-12, -1200., 0.0);
+{  4176} G2K500N +PERO5              =  0.600G1K500O + 0.200GKK5004 + 0.200GDK500E                 : ARR( 0.533E-11,   500., 0.0);
+{  4177} G2K500N +PERO6              =  0.460G1K500O + 0.270GKK5004 + 0.270GDK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{  4178} G2K500N +PERO9              =  0.800G1K500O + 0.200GDK500E                                : ARR( 0.100E-10,     0., 0.0);
+{  4179} G1K500M +OXYGEN             =       GDK500D +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  4180} G1K500N                     =       G3K2000 +      GD02000 +      GCO                     : ARR( 0.200E+15,  3071., 0.0);
+{  4181} G1K500O                     =       G3K3000 +      GCH2O   +      GCO                     : ARR( 0.200E+15,  3897., 0.0);
+{  4182} GG02000 +GHO                =       G3K2000                                               : ARR( 0.195E-11,  -190., 0.0);
+{  4183} GG02000+HV               =       GCH3O2  +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  4184} GA02000 +GHO                =       G2A2000                                               : ARR( 0.102E-12,     0., 0.0);
+{  4185} GA02000 +GHO                =       GCH3O2  +      GCO2                                   : ARR( 0.698E-12,     0., 0.0);
+{  4186}  GP02000    +M                 =       G3K2000 +      GNO2            +M                     : FALL( 0.280E+17, 13580., 0.0, 0.190E-02, 12175., 0.0,0.60);
+{  4187} GP02000 +GHO                =       G2P2000                                               : ARR( 0.102E-12,     0., 0.0);
+{  4188} GP02000+HV               =       G3K2000 +      GNO2                                   :  0.100E+01*SUN;
+{  4189} GNK5008 +GHO                =       GNK500I +      GHO2                                   : ARR( 0.278E-10,     0., 0.0);
+{  4190} GNK5008+HV               =       G3K4000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  4191} GNK5008+HV               =       GD02000 +      GNK3000                                :  0.100E+01*SUN;
+{  4192} GNK5008+HV               =       G1K5002 +      GNO2                                   :  0.100E+01*SUN;
+{  4193} GHK5005 +GHO                =       GHK500D +      GHO2                                   : ARR( 0.273E-10,     0., 0.0);
+{  4194} GHK5005 +GHO                =       GDK5001 +      GHO                                    : ARR( 0.101E-10,     0., 0.0);
+{  4195} GHK5005 +GHO                =       G2K5002                                               : ARR( 0.196E-11,  -190., 0.0);
+{  4196} GHK5005+HV               =       G3K4000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  4197} GHK5005+HV               =       GD02000 +      GHK3000                                :  0.100E+01*SUN;
+{  4198} GHK5005+HV               =       G1K5002 +      GHO                                    :  0.100E+01*SUN;
+{  4199} GKO5008 +GHO                =       GKK5003 +      GHO2                                   : ARR( 0.278E-10,     0., 0.0);
+{  4200} GKO5008 +GHO                =       GDK5001 +      GHO2                                   : ARR( 0.256E-11,     0., 0.0);
+{  4201} GKO5008+HV               =       G3K4000 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{  4202} GKO5008+HV               =       GD02000 +      GKO3000                                :  0.100E+01*SUN;
+{  4203} GDK5001 +GHO                =       GDK500C +      GHO2                                   : ARR( 0.274E-10,     0., 0.0);
+{  4204} GDK5001 +GHO                =       G3K4000 +      GCO                                    : ARR( 0.130E-10,     0., 0.0);
+{  4205} GDK5001 +GNO3               =       G3K4000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  4206} GDK5001+HV               =       G3K4000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4207} GDK5001+HV               =       GDO4001 +      GCO                                    :  0.100E+01*SUN;
+{  4208} GDK5001+HV               =       GO03001 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  4209} GNK3000 +GHO                =       G2N3005                                               : ARR( 0.102E-12,     0., 0.0);
+{  4210} GNK3000 +GHO                =       GDK3000 +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{  4211} GNK3000+HV               =       G3K2000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  4212} GNK3000+HV               =       G1K3000 +      GNO2                                   :  0.100E+01*SUN;
+{  4213} GHK3000 +GHO                =       GDK3000 +      GHO                                    : ARR( 0.988E-11,     0., 0.0);
+{  4214} GHK3000 +GHO                =       G2K3000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  4215} GHK3000+HV               =       G3K2000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  4216} GHK3000+HV               =       G1K3000 +      GHO                                    :  0.100E+01*SUN;
+{  4217} GKO3000 +GHO                =       GDK3000 +      GHO2                                   : ARR( 0.284E-11,     0., 0.0);
+{  4218} GKO3000 +GHO                =       G1K3000                                               : ARR( 0.162E-12,     0., 0.0);
+{  4219} GKO3000+HV               =       GCH2O   +      G3K2000 +      GHO2                    :  0.100E+01*SUN;
+{  4220} GDK3000 +GHO                =       G3K2000 +      GCO                                    : ARR( 0.840E-12,  -830., 0.0);
+{  4221} GDK3000 +GNO3               =       G3K2000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  4222} GDK3000+HV               =       GCO     +      G3K2000 +      GHO2                    :  0.100E+01*SUN;
+{  4223} GDK3000+HV               =       GCO     +      GD02000                                :  0.200E+01*SUN;
+{  4224} GDK3000+HV               =  2.000GCO     +      GCH4                                   :  0.100E+01*SUN;
+{  4225} GGO4000 +GHO                =       GGK4000 +      GHO2                                   : ARR( 0.858E-11,     0., 0.0);
+{  4226} GGO4000 +GHO                =       G2G4000                                               : ARR( 0.882E-12,     0., 0.0);
+{  4227} GGO4000 +GHO                =       G3K4000                                               : ARR( 0.195E-11,  -190., 0.0);
+{  4228} GGO4000+HV               =       G2O3000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  4229} G2G4000 +GNO                =       G1G4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4230} G2G4000 +GNO                =       GGN4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4231} G2G4000 +GHO2               =       GGH4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4232} G2G4000 +GNO3               =       G1G4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4233} G2G4000 +MEPERO             =  0.340G1G4000 + 0.330GGO4003 + 0.330GGK4001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4234} G2G4000 +PERO1              =  0.460G1G4000 + 0.270GGO4003 + 0.270GGK4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4235} G2G4000 +PERO2              =  0.400G1G4000 + 0.300GGO4003 + 0.300GGK4001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4236} G2G4000 +PERO3              =  0.460G1G4000 + 0.270GGO4003 + 0.270GGK4001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4237} G2G4000 +PERO5              =  0.460G1G4000 + 0.270GGO4003 + 0.270GGK4001                 : ARR( 0.183E-11,   450., 0.0);
+{  4238} G2G4000 +PERO6              =  0.300G1G4000 + 0.350GGO4003 + 0.350GGK4001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4239} G2G4000 +PERO9              =  0.650G1G4000 + 0.350GGK4001                                : ARR( 0.100E-10,     0., 0.0);
+{  4240} G1G4000                     =       GD02000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  5878., 0.0);
+{  4241} G1G4000                     =       GDO3001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{  4242} GAO4000 +GHO                =       GAK4000 +      GHO2                                   : ARR( 0.865E-11,     0., 0.0);
+{  4243} GAO4000 +GHO                =       G2A4000                                               : ARR( 0.658E-12,     0., 0.0);
+{  4244} GAO4000 +GHO                =       G2O3000 +      GCO2                                   : ARR( 0.537E-12,     0., 0.0);
+{  4245} G2A4000 +GNO                =       G1A4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4246} G2A4000 +GNO                =       GAN4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4247} G2A4000 +GHO2               =       GAH4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4248} G2A4000 +GNO3               =       G1A4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4249} G2A4000 +MEPERO             =  0.340G1A4000 + 0.330GAO4003 + 0.330GAK4001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4250} G2A4000 +PERO1              =  0.460G1A4000 + 0.270GAO4003 + 0.270GAK4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4251} G2A4000 +PERO2              =  0.400G1A4000 + 0.300GAO4003 + 0.300GAK4001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4252} G2A4000 +PERO3              =  0.460G1A4000 + 0.270GAO4003 + 0.270GAK4001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4253} G2A4000 +PERO5              =  0.460G1A4000 + 0.270GAO4003 + 0.270GAK4001                 : ARR( 0.183E-11,   450., 0.0);
+{  4254} G2A4000 +PERO6              =  0.300G1A4000 + 0.350GAO4003 + 0.350GAK4001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4255} G2A4000 +PERO9              =  0.650G1A4000 + 0.350GAK4001                                : ARR( 0.100E-10,     0., 0.0);
+{  4256} G1A4000                     =       GD02000 +      GAD2000 +      GHO2                    : ARR( 0.200E+15,  5878., 0.0);
+{  4257} G1A4000                     =       GDO3001 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{  4258} GPO4000                     =       G3K4000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  4259} GPO4000 +GHO                =       GPK4000 +      GHO2                                   : ARR( 0.866E-11,     0., 0.0);
+{  4260} GPO4000 +GHO                =       G2P4000                                               : ARR( 0.890E-12,     0., 0.0);
+{  4261} GPO4000+HV               =       G3K4000 +      GNO2                                   :  0.100E+01*SUN;
+{  4262} G2P4000 +GNO                =       G1P4000 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4263} G2P4000 +GNO                =       GPN4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4264} G2P4000 +GHO2               =       GPH4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4265} G2P4000 +GNO3               =       G1P4000 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4266} G2P4000 +MEPERO             =  0.340G1P4000 + 0.330GPO4003 + 0.330GPK4001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4267} G2P4000 +PERO1              =  0.460G1P4000 + 0.270GPO4003 + 0.270GPK4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4268} G2P4000 +PERO2              =  0.400G1P4000 + 0.300GPO4003 + 0.300GPK4001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4269} G2P4000 +PERO3              =  0.460G1P4000 + 0.270GPO4003 + 0.270GPK4001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4270} G2P4000 +PERO5              =  0.460G1P4000 + 0.270GPO4003 + 0.270GPK4001                 : ARR( 0.183E-11,   450., 0.0);
+{  4271} G2P4000 +PERO6              =  0.300G1P4000 + 0.350GPO4003 + 0.350GPK4001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4272} G2P4000 +PERO9              =  0.650G1P4000 + 0.350GPK4001                                : ARR( 0.100E-10,     0., 0.0);
+{  4273} G1P4000                     =       GD02000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  5878., 0.0);
+{  4274} G1P4000                     =       GDO3001 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{  4275} GHN500D +GHO                =       GNK5007 +      GHO                                    : ARR( 0.715E-11,     0., 0.0);
+{  4276} GHN500D +GHO                =       G2N500B                                               : ARR( 0.203E-11,  -190., 0.0);
+{  4277} GHN500D+HV               =       G1H500b +      GNO2                                   :  0.100E+01*SUN;
+{  4278} GHN500D+HV               =       G1N500B +      GHO                                    :  0.100E+01*SUN;
+{  4279} G1H500b                     =       GD02000 +      GD03000 +      GHO                     : ARR( 0.200E+15,  4917., 0.0);
+{  4280} GNN5009 +GHO                =       G2N501P                                               : ARR( 0.297E-12,     0., 0.0);
+{  4281} GNN5009 +GHO                =       GNN500x +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{  4282} GNN5009+HV               =       G1N500C +      GNO2                                   :  0.100E+01*SUN;
+{  4283} GNN5009+HV               =       G1N501R +      GNO2                                   :  0.100E+01*SUN;
+{  4284} G2N501P +GNO                =       G1N501S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4285} G2N501P +GNO                =       GNN5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4286} G2N501P +GHO2               =       GHN501l                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4287} G2N501P +GNO3               =       G1N501S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4288} G2N501P +MEPERO             =  0.340G1N501S + 0.330GNN5017 + 0.330GNN5018                 : ARR( 0.565E-13,  -845., 0.0);
+{  4289} G2N501P +PERO1              =  0.460G1N501S + 0.270GNN5017 + 0.270GNN5018                 : ARR( 0.434E-13,  -900., 0.0);
+{  4290} G2N501P +PERO2              =  0.400G1N501S + 0.300GNN5017 + 0.300GNN5018                 : ARR( 0.162E-13, -1400., 0.0);
+{  4291} G2N501P +PERO3              =  0.460G1N501S + 0.270GNN5017 + 0.270GNN5018                 : ARR( 0.488E-13, -1250., 0.0);
+{  4292} G2N501P +PERO5              =  0.460G1N501S + 0.270GNN5017 + 0.270GNN5018                 : ARR( 0.183E-11,   450., 0.0);
+{  4293} G2N501P +PERO6              =  0.300G1N501S + 0.350GNN5017 + 0.350GNN5018                 : ARR( 0.168E-13, -1300., 0.0);
+{  4294} G2N501P +PERO9              =  0.650G1N501S + 0.350GNN5018                                : ARR( 0.100E-10,     0., 0.0);
+{  4295} G1N501R                     =       GD02000 +      GDO3000 +      GNO2                    : ARR( 0.200E+15,  6455., 0.0);
+{  4296} G1N501R                     =       GND3001 +      G2O2000                                : ARR( 0.200E+15,  7074., 0.0);
+{  4297} G1N501S                     =       GND3001 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{  4298} G1N501S                     =       GNN4007 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  4299} GHN500E +GHO                =       GNK5009 +      GHO                                    : ARR( 0.703E-11,     0., 0.0);
+{  4300} GHN500E +GHO                =       GHN501m +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{  4301} GHN500E +GHO                =       G2N500C                                               : ARR( 0.199E-11,  -190., 0.0);
+{  4302} GHN500E+HV               =       G1N500C +      GHO                                    :  0.100E+01*SUN;
+{  4303} GHN500E+HV               =       G1H500c +      GNO2                                   :  0.100E+01*SUN;
+{  4304} G1H500c                     =       GD02000 +      GDO3000 +      GHO                     : ARR( 0.200E+15,  4917., 0.0);
+{  4305} GNO500E +GHO                =       GNK5009 +      GHO2                                   : ARR( 0.192E-11,     0., 0.0);
+{  4306} GNO500E +GHO                =       GND5005 +      GHO2                                   : ARR( 0.462E-11,     0., 0.0);
+{  4307} GNO500E+HV               =       G1O5009 +      GNO2                                   :  0.100E+01*SUN;
+{  4308} GNK5009 +GHO                =       G2N501Q                                               : ARR( 0.303E-12,     0., 0.0);
+{  4309} GNK5009 +GHO                =       GND500Q +      GHO2                                   : ARR( 0.431E-11,     0., 0.0);
+{  4310} GNK5009+HV               =       G3K2000 +      GDO3000 +      GNO2                    :  0.100E+01*SUN;
+{  4311} GNK5009+HV               =       GNK3000 +      GD02000                                :  0.100E+01*SUN;
+{  4312} GNK5009+HV               =       G1K5006 +      GNO2                                   :  0.100E+01*SUN;
+{  4313} G2N501Q +GNO                =       G1N501T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4314} G2N501Q +GNO                =       GNN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4315} G2N501Q +GHO2               =       GHN501n                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4316} G2N501Q +GNO3               =       G1N501T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4317} G2N501Q +MEPERO             =  0.340G1N501T + 0.330GNK500e + 0.330GNK500h                 : ARR( 0.565E-13,  -845., 0.0);
+{  4318} G2N501Q +PERO1              =  0.460G1N501T + 0.270GNK500e + 0.270GNK500h                 : ARR( 0.434E-13,  -900., 0.0);
+{  4319} G2N501Q +PERO2              =  0.400G1N501T + 0.300GNK500e + 0.300GNK500h                 : ARR( 0.162E-13, -1400., 0.0);
+{  4320} G2N501Q +PERO3              =  0.460G1N501T + 0.270GNK500e + 0.270GNK500h                 : ARR( 0.488E-13, -1250., 0.0);
+{  4321} G2N501Q +PERO5              =  0.460G1N501T + 0.270GNK500e + 0.270GNK500h                 : ARR( 0.183E-11,   450., 0.0);
+{  4322} G2N501Q +PERO6              =  0.300G1N501T + 0.350GNK500e + 0.350GNK500h                 : ARR( 0.168E-13, -1300., 0.0);
+{  4323} G2N501Q +PERO9              =  0.650G1N501T + 0.350GNK500h                                : ARR( 0.100E-10,     0., 0.0);
+{  4324} G1N501T                     =       GND4008 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  4325} GNN500A +GHO                =       G2N501R                                               : ARR( 0.176E-12,     0., 0.0);
+{  4326} GNN500A +GHO                =       GNN500U +      GHO2                                   : ARR( 0.176E-11,     0., 0.0);
+{  4327} GNN500A +GHO                =       GNK500C +      GNO2                                   : ARR( 0.123E-12,     0., 0.0);
+{  4328} GNN500A +GHO                =       G1N500T                                               : ARR( 0.220E-17,    85., 2.0);
+{  4329} GNN500A+HV               =       G1N500F +      GNO2                                   :  0.100E+01*SUN;
+{  4330} GNN500A+HV               =       G1N500D +      GNO2                                   :  0.100E+01*SUN;
+{  4331} G2N501R +GNO                =       G1N501U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4332} G2N501R +GNO                =       GNN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4333} G2N501R +GHO2               =       GHN501o                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4334} G2N501R +GNO3               =       G1N501U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4335} G2N501R +MEPERO             =  0.480G1N501U + 0.260GNN500r + 0.260GNN5019                 : ARR( 0.164E-12,  -795., 0.0);
+{  4336} G2N501R +PERO1              =  0.600G1N501U + 0.200GNN500r + 0.200GNN5019                 : ARR( 0.126E-12,  -850., 0.0);
+{  4337} G2N501R +PERO2              =  0.560G1N501U + 0.220GNN500r + 0.220GNN5019                 : ARR( 0.471E-13, -1350., 0.0);
+{  4338} G2N501R +PERO3              =  0.600G1N501U + 0.200GNN500r + 0.200GNN5019                 : ARR( 0.142E-12, -1200., 0.0);
+{  4339} G2N501R +PERO5              =  0.600G1N501U + 0.200GNN500r + 0.200GNN5019                 : ARR( 0.533E-11,   500., 0.0);
+{  4340} G2N501R +PERO6              =  0.460G1N501U + 0.270GNN500r + 0.270GNN5019                 : ARR( 0.488E-13, -1250., 0.0);
+{  4341} G2N501R +PERO9              =  0.800G1N501U + 0.200GNN5019                                : ARR( 0.100E-10,     0., 0.0);
+{  4342} G1N501U                     =       GNN4008 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  4343} GHN500F +GHO                =       GHN501i +      GHO2                                   : ARR( 0.173E-11,     0., 0.0);
+{  4344} GHN500F +GHO                =       GND5005 +      GHO                                    : ARR( 0.166E-10,     0., 0.0);
+{  4345} GHN500F +GHO                =       G2N500D                                               : ARR( 0.196E-11,  -190., 0.0);
+{  4346} GHN500F+HV               =       G1H500d +      GNO2                                   :  0.100E+01*SUN;
+{  4347} GHN500F+HV               =       G1N500D +      GHO                                    :  0.100E+01*SUN;
+{  4348} G1H500d                     =       GD02000 +      GHD3000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{  4349} GND5005 +GHO                =       GND500Q +      GHO2                                   : ARR( 0.174E-11,     0., 0.0);
+{  4350} GND5005 +GHO                =       G3N5005                                               : ARR( 0.216E-10,     0., 0.0);
+{  4351} GND5005 +GNO3               =       G3N5005 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4352} GND5005+HV               =       G1D5001 +      GNO2                                   :  0.100E+01*SUN;
+{  4353} GND5005+HV               =       G2N4009 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4354} GND5005+HV               =       GNK3000 +      GD02000                                :  0.100E+01*SUN;
+{  4355} G3N5005 +GHO2               =  0.800GGN5006 + 0.200GAN5006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4356} G3N5005 +GNO                =       G2N4009 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4357} G3N5005 +GNO2               =       GPN5006                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4358} G3N5005 +GNO3               =       G2N4009 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4359} G3N5005 +MEPERO             =  0.685G2N4009 + 0.315GAN5006 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4360} G3N5005 +PERO1              =  0.800G2N4009 + 0.200GAN5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4361} G3N5005 +PERO2              =  0.750G2N4009 + 0.250GAN5006 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4362} G3N5005 +PERO3              =  0.800G2N4009 + 0.200GAN5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4363} G3N5005 +PERO5              =  0.650G2N4009 + 0.350GAN5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4364} G3N5005 +PERO6              =  0.650G2N4009 + 0.350GAN5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4365} G3N5005 +PERO9              =       G2N4009 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  4366} G2N4009 +GNO                =       G1N4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4367} G2N4009 +GNO                =       GNN4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4368} G2N4009 +GHO2               =       GHN400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4369} G2N4009 +GNO3               =       G1N4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4370} G2N4009 +MEPERO             =  0.480G1N4009 + 0.260GNO4008 + 0.260GND4007                 : ARR( 0.164E-12,  -795., 0.0);
+{  4371} G2N4009 +PERO1              =  0.600G1N4009 + 0.200GNO4008 + 0.200GND4007                 : ARR( 0.126E-12,  -850., 0.0);
+{  4372} G2N4009 +PERO2              =  0.560G1N4009 + 0.220GNO4008 + 0.220GND4007                 : ARR( 0.471E-13, -1350., 0.0);
+{  4373} G2N4009 +PERO3              =  0.600G1N4009 + 0.200GNO4008 + 0.200GND4007                 : ARR( 0.142E-12, -1200., 0.0);
+{  4374} G2N4009 +PERO5              =  0.600G1N4009 + 0.200GNO4008 + 0.200GND4007                 : ARR( 0.533E-11,   500., 0.0);
+{  4375} G2N4009 +PERO6              =  0.460G1N4009 + 0.270GNO4008 + 0.270GND4007                 : ARR( 0.488E-13, -1250., 0.0);
+{  4376} G2N4009 +PERO9              =  0.800G1N4009 + 0.200GND4007                                : ARR( 0.100E-10,     0., 0.0);
+{  4377} G1N4009 +OXYGEN             =       GND4007 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  4378} G1N4009                     =       G2N400A                                               : ARR( 0.240E+12,  4177., 0.0);
+{  4379} G1N4009                     =       GDO3001 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{  4380} G2N400A +GNO                =       G1N400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4381} G2N400A +GNO                =       GNN400A                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4382} G2N400A +GHO2               =       GHN400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4383} G2N400A +GNO3               =       G1N400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4384} G2N400A +MEPERO             =  0.480G1N400A + 0.260GNO4009 + 0.260GND4009                 : ARR( 0.164E-12,  -795., 0.0);
+{  4385} G2N400A +PERO1              =  0.600G1N400A + 0.200GNO4009 + 0.200GND4009                 : ARR( 0.126E-12,  -850., 0.0);
+{  4386} G2N400A +PERO2              =  0.560G1N400A + 0.220GNO4009 + 0.220GND4009                 : ARR( 0.471E-13, -1350., 0.0);
+{  4387} G2N400A +PERO3              =  0.600G1N400A + 0.200GNO4009 + 0.200GND4009                 : ARR( 0.142E-12, -1200., 0.0);
+{  4388} G2N400A +PERO5              =  0.600G1N400A + 0.200GNO4009 + 0.200GND4009                 : ARR( 0.533E-11,   500., 0.0);
+{  4389} G2N400A +PERO6              =  0.460G1N400A + 0.270GNO4009 + 0.270GND4009                 : ARR( 0.488E-13, -1250., 0.0);
+{  4390} G2N400A +PERO9              =  0.800G1N400A + 0.200GND4009                                : ARR( 0.100E-10,     0., 0.0);
+{  4391} G1N400A                     =       GND400A +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  4392} G1N400A                     =       GND3004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  4393} GHO500B +GHO                =       GHK5006 +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  4394} GHO500B +GHO                =       GKO5007 +      GHO                                    : ARR( 0.347E-10,     0., 0.0);
+{  4395} GHO500B +GHO                =       G2O5008                                               : ARR( 0.197E-11,  -190., 0.0);
+{  4396} GHO500B+HV               =       G1O5008 +      GHO                                    :  0.100E+01*SUN;
+{  4397} GHK5006 +GHO                =       GKK5001 +      GHO                                    : ARR( 0.219E-10,     0., 0.0);
+{  4398} GHK5006 +GHO                =       G2K5004                                               : ARR( 0.204E-11,  -190., 0.0);
+{  4399} GHK5006+HV               =       G3K3000 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{  4400} GHK5006+HV               =       G1K5004 +      GHO                                    :  0.100E+01*SUN;
+{  4401} GG03000 +GHO                =       G2G3001                                               : ARR( 0.728E-12,     0., 0.0);
+{  4402} GG03000 +GHO                =       G3K3000                                               : ARR( 0.197E-11,  -190., 0.0);
+{  4403} GG03000+HV               =       G202000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  4404} G2G3001 +GNO                =       G1G3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4405} G2G3001 +GNO                =       GGN3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4406} G2G3001 +GHO2               =       GGH3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4407} G2G3001 +GNO3               =       G1G3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4408} G2G3001 +MEPERO             =  0.340G1G3001 + 0.330GGO3001 + 0.330GGK3000                 : ARR( 0.565E-13,  -845., 0.0);
+{  4409} G2G3001 +PERO1              =  0.460G1G3001 + 0.270GGO3001 + 0.270GGK3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  4410} G2G3001 +PERO2              =  0.400G1G3001 + 0.300GGO3001 + 0.300GGK3000                 : ARR( 0.162E-13, -1400., 0.0);
+{  4411} G2G3001 +PERO3              =  0.460G1G3001 + 0.270GGO3001 + 0.270GGK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{  4412} G2G3001 +PERO5              =  0.460G1G3001 + 0.270GGO3001 + 0.270GGK3000                 : ARR( 0.183E-11,   450., 0.0);
+{  4413} G2G3001 +PERO6              =  0.300G1G3001 + 0.350GGO3001 + 0.350GGK3000                 : ARR( 0.168E-13, -1300., 0.0);
+{  4414} G2G3001 +PERO9              =  0.650G1G3001 + 0.350GGK3000                                : ARR( 0.100E-10,     0., 0.0);
+{  4415} G1G3001                     =       GD02000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5009., 0.0);
+{  4416} GA03000 +GHO                =       G2A3000                                               : ARR( 0.167E-12,     0., 0.0);
+{  4417} GA03000 +GHO                =       G2A3001                                               : ARR( 0.516E-12,     0., 0.0);
+{  4418} GA03000 +GHO                =       G202000 +      GCO2                                   : ARR( 0.517E-12,     0., 0.0);
+{  4419} G2A3001 +GNO                =       G1A3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4420} G2A3001 +GNO                =       GAN3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4421} G2A3001 +GHO2               =       GAH3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4422} G2A3001 +GNO3               =       G1A3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4423} G2A3001 +MEPERO             =  0.340G1A3001 + 0.330GAO3001 + 0.330GAK3000                 : ARR( 0.565E-13,  -845., 0.0);
+{  4424} G2A3001 +PERO1              =  0.460G1A3001 + 0.270GAO3001 + 0.270GAK3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  4425} G2A3001 +PERO2              =  0.400G1A3001 + 0.300GAO3001 + 0.300GAK3000                 : ARR( 0.162E-13, -1400., 0.0);
+{  4426} G2A3001 +PERO3              =  0.460G1A3001 + 0.270GAO3001 + 0.270GAK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{  4427} G2A3001 +PERO5              =  0.460G1A3001 + 0.270GAO3001 + 0.270GAK3000                 : ARR( 0.183E-11,   450., 0.0);
+{  4428} G2A3001 +PERO6              =  0.300G1A3001 + 0.350GAO3001 + 0.350GAK3000                 : ARR( 0.168E-13, -1300., 0.0);
+{  4429} G2A3001 +PERO9              =  0.650G1A3001 + 0.350GAK3000                                : ARR( 0.100E-10,     0., 0.0);
+{  4430} G1A3001                     =       GD02000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4978., 0.0);
+{  4431} GP03000                     =       G3K3000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  4432} GP03000 +GHO                =       G2P3000                                               : ARR( 0.168E-12,     0., 0.0);
+{  4433} GP03000 +GHO                =       G2P3001                                               : ARR( 0.701E-12,     0., 0.0);
+{  4434} GP03000+HV               =       G3K3000 +      GNO2                                   :  0.100E+01*SUN;
+{  4435} G2P3001 +GNO                =       G1P3001 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4436} G2P3001 +GNO                =       GPN3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4437} G2P3001 +GHO2               =       GPH3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4438} G2P3001 +GNO3               =       G1P3001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4439} G2P3001 +MEPERO             =  0.340G1P3001 + 0.330GPO3001 + 0.330GPK3000                 : ARR( 0.565E-13,  -845., 0.0);
+{  4440} G2P3001 +PERO1              =  0.460G1P3001 + 0.270GPO3001 + 0.270GPK3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  4441} G2P3001 +PERO2              =  0.400G1P3001 + 0.300GPO3001 + 0.300GPK3000                 : ARR( 0.162E-13, -1400., 0.0);
+{  4442} G2P3001 +PERO3              =  0.460G1P3001 + 0.270GPO3001 + 0.270GPK3000                 : ARR( 0.488E-13, -1250., 0.0);
+{  4443} G2P3001 +PERO5              =  0.460G1P3001 + 0.270GPO3001 + 0.270GPK3000                 : ARR( 0.183E-11,   450., 0.0);
+{  4444} G2P3001 +PERO6              =  0.300G1P3001 + 0.350GPO3001 + 0.350GPK3000                 : ARR( 0.168E-13, -1300., 0.0);
+{  4445} G2P3001 +PERO9              =  0.650G1P3001 + 0.350GPK3000                                : ARR( 0.100E-10,     0., 0.0);
+{  4446} G1P3001                     =       GD02000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5009., 0.0);
+{  4447} GNK500A +GHO                =       G2N501S                                               : ARR( 0.876E-12,     0., 0.0);
+{  4448} GNK500A +GHO                =       GND500M +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{  4449} GNK500A+HV               =       G1K5005 +      GNO2                                   :  0.100E+01*SUN;
+{  4450} GNK500A+HV               =       G3N3001 +      G2O2000                                :  0.100E+01*SUN;
+{  4451} G2N501S +GNO                =       G1N501W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4452} G2N501S +GNO                =       GNN501A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4453} G2N501S +GHO2               =       GHN501p                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4454} G2N501S +GNO3               =       G1N501W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4455} G2N501S +MEPERO             =  0.340G1N501W + 0.330GNK500i + 0.330GNK500j                 : ARR( 0.565E-13,  -845., 0.0);
+{  4456} G2N501S +PERO1              =  0.460G1N501W + 0.270GNK500i + 0.270GNK500j                 : ARR( 0.434E-13,  -900., 0.0);
+{  4457} G2N501S +PERO2              =  0.400G1N501W + 0.300GNK500i + 0.300GNK500j                 : ARR( 0.162E-13, -1400., 0.0);
+{  4458} G2N501S +PERO3              =  0.460G1N501W + 0.270GNK500i + 0.270GNK500j                 : ARR( 0.488E-13, -1250., 0.0);
+{  4459} G2N501S +PERO5              =  0.460G1N501W + 0.270GNK500i + 0.270GNK500j                 : ARR( 0.183E-11,   450., 0.0);
+{  4460} G2N501S +PERO6              =  0.300G1N501W + 0.350GNK500i + 0.350GNK500j                 : ARR( 0.168E-13, -1300., 0.0);
+{  4461} G2N501S +PERO9              =  0.650G1N501W + 0.350GNK500j                                : ARR( 0.100E-10,     0., 0.0);
+{  4462} G1N501W                     =       G3N3001 +      GDO2000                                : ARR( 0.200E+15,  3069., 0.0);
+{  4463} GHK5007 +GHO                =       GKK5002 +      GHO                                    : ARR( 0.213E-10,     0., 0.0);
+{  4464} GHK5007 +GHO                =       GHD500F +      GHO2                                   : ARR( 0.133E-10,     0., 0.0);
+{  4465} GHK5007 +GHO                =       G2K5005                                               : ARR( 0.198E-11,  -190., 0.0);
+{  4466} GHK5007+HV               =       G1K5005 +      GHO                                    :  0.100E+01*SUN;
+{  4467} GHK5007+HV               =       G3H3001 +      G2O2000                                :  0.100E+01*SUN;
+{  4468} G3H3001 +GHO2               =  0.800GGH3001 + 0.200GAH3001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4469} G3H3001 +GNO                =       GD02000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  4470} G3H3001 +GNO2               =       GPH3001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4471} G3H3001 +GNO3               =       GD02000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  4472} G3H3001 +MEPERO             =  0.685GD02000 + 0.315GAH3001 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4473} G3H3001 +PERO1              =  0.800GD02000 + 0.200GAH3001 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4474} G3H3001 +PERO2              =  0.750GD02000 + 0.250GAH3001 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4475} G3H3001 +PERO3              =  0.800GD02000 + 0.200GAH3001 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4476} G3H3001 +PERO5              =  0.650GD02000 + 0.350GAH3001 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4477} G3H3001 +PERO6              =  0.650GD02000 + 0.350GAH3001 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4478} G3H3001 +PERO9              =       GD02000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  4479} GKO5009 +GHO                =       GKK5002 +      GHO2                                   : ARR( 0.559E-11,     0., 0.0);
+{  4480} GKO5009 +GHO                =       GDK5003 +      GHO2                                   : ARR( 0.139E-10,     0., 0.0);
+{  4481} GKO5009+HV               =       G3K3002 +      G2O2000                                :  0.100E+01*SUN;
+{  4482} GKK5002 +GHO                =       G2K500O                                               : ARR( 0.877E-12,     0., 0.0);
+{  4483} GKK5002 +GHO                =       GDK500D +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{  4484} GKK5002+HV               =       G3K2000 +      G3K3001                                :  0.100E+01*SUN;
+{  4485} G2K500O +GNO                =       G1K500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4486} G2K500O +GNO                =       GNK500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4487} G2K500O +GHO2               =       GHK500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4488} G2K500O +GNO3               =       G1K500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4489} G2K500O +MEPERO             =  0.340G1K500P + 0.330GKK500A + 0.330GKK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{  4490} G2K500O +PERO1              =  0.460G1K500P + 0.270GKK500A + 0.270GKK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{  4491} G2K500O +PERO2              =  0.400G1K500P + 0.300GKK500A + 0.300GKK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{  4492} G2K500O +PERO3              =  0.460G1K500P + 0.270GKK500A + 0.270GKK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  4493} G2K500O +PERO5              =  0.460G1K500P + 0.270GKK500A + 0.270GKK500B                 : ARR( 0.183E-11,   450., 0.0);
+{  4494} G2K500O +PERO6              =  0.300G1K500P + 0.350GKK500A + 0.350GKK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{  4495} G2K500O +PERO9              =  0.650G1K500P + 0.350GKK500B                                : ARR( 0.100E-10,     0., 0.0);
+{  4496} G1K500P                     =       G3K2000 +      GDO2000 +      GCO                     : ARR( 0.200E+15,  3326., 0.0);
+{  4497} GGO3000 +GHO                =       GGD3000 +      GHO2                                   : ARR( 0.409E-11,     0., 0.0);
+{  4498} GGO3000 +GHO                =       G2G3002                                               : ARR( 0.876E-12,     0., 0.0);
+{  4499} GGO3000 +GHO                =       G3K3001                                               : ARR( 0.193E-11,  -190., 0.0);
+{  4500} GGO3000+HV               =       G2O2000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  4501} G2G3002 +GNO                =       G1G3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4502} G2G3002 +GNO                =       GGN3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4503} G2G3002 +GHO2               =       GGH3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4504} G2G3002 +GNO3               =       G1G3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4505} G2G3002 +MEPERO             =  0.340G1G3002 + 0.330GGO3002 + 0.330GGK3001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4506} G2G3002 +PERO1              =  0.460G1G3002 + 0.270GGO3002 + 0.270GGK3001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4507} G2G3002 +PERO2              =  0.400G1G3002 + 0.300GGO3002 + 0.300GGK3001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4508} G2G3002 +PERO3              =  0.460G1G3002 + 0.270GGO3002 + 0.270GGK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4509} G2G3002 +PERO5              =  0.460G1G3002 + 0.270GGO3002 + 0.270GGK3001                 : ARR( 0.183E-11,   450., 0.0);
+{  4510} G2G3002 +PERO6              =  0.300G1G3002 + 0.350GGO3002 + 0.350GGK3001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4511} G2G3002 +PERO9              =  0.650G1G3002 + 0.350GGK3001                                : ARR( 0.100E-10,     0., 0.0);
+{  4512} G1G3002                     =       GDO2000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5263., 0.0);
+{  4513} GAO3000 +GHO                =       GAD3000 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  4514} GAO3000 +GHO                =       G2A3002                                               : ARR( 0.655E-12,     0., 0.0);
+{  4515} GAO3000 +GHO                =       G2O2000 +      GCO2                                   : ARR( 0.534E-12,     0., 0.0);
+{  4516} G2A3002 +GNO                =       G1A3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4517} G2A3002 +GNO                =       GAN3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4518} G2A3002 +GHO2               =       GAH3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4519} G2A3002 +GNO3               =       G1A3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4520} G2A3002 +MEPERO             =  0.340G1A3002 + 0.330GAO3002 + 0.330GAK3001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4521} G2A3002 +PERO1              =  0.460G1A3002 + 0.270GAO3002 + 0.270GAK3001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4522} G2A3002 +PERO2              =  0.400G1A3002 + 0.300GAO3002 + 0.300GAK3001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4523} G2A3002 +PERO3              =  0.460G1A3002 + 0.270GAO3002 + 0.270GAK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4524} G2A3002 +PERO5              =  0.460G1A3002 + 0.270GAO3002 + 0.270GAK3001                 : ARR( 0.183E-11,   450., 0.0);
+{  4525} G2A3002 +PERO6              =  0.300G1A3002 + 0.350GAO3002 + 0.350GAK3001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4526} G2A3002 +PERO9              =  0.650G1A3002 + 0.350GAK3001                                : ARR( 0.100E-10,     0., 0.0);
+{  4527} G1A3002                     =       GDO2000 +      GCO     +      GHO                     : ARR( 0.200E+15,  5232., 0.0);
+{  4528} GPO3000                     =       G3K3001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  4529} GPO3000 +GHO                =       GPD3000 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{  4530} GPO3000 +GHO                =       G2P3002                                               : ARR( 0.886E-12,     0., 0.0);
+{  4531} GPO3000+HV               =       G3K3001 +      GNO2                                   :  0.100E+01*SUN;
+{  4532} G2P3002 +GNO                =       G1P3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4533} G2P3002 +GNO                =       GPN3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4534} G2P3002 +GHO2               =       GPH3002                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4535} G2P3002 +GNO3               =       G1P3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4536} G2P3002 +MEPERO             =  0.340G1P3002 + 0.330GPO3002 + 0.330GPK3001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4537} G2P3002 +PERO1              =  0.460G1P3002 + 0.270GPO3002 + 0.270GPK3001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4538} G2P3002 +PERO2              =  0.400G1P3002 + 0.300GPO3002 + 0.300GPK3001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4539} G2P3002 +PERO3              =  0.460G1P3002 + 0.270GPO3002 + 0.270GPK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4540} G2P3002 +PERO5              =  0.460G1P3002 + 0.270GPO3002 + 0.270GPK3001                 : ARR( 0.183E-11,   450., 0.0);
+{  4541} G2P3002 +PERO6              =  0.300G1P3002 + 0.350GPO3002 + 0.350GPK3001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4542} G2P3002 +PERO9              =  0.650G1P3002 + 0.350GPK3001                                : ARR( 0.100E-10,     0., 0.0);
+{  4543} G1P3002                     =       GDO2000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5263., 0.0);
+{  4544} GNN500B +GHO                =       GNK5006 +      GNO2                                   : ARR( 0.103E-12,     0., 0.0);
+{  4545} GNN500B +GHO                =       GNK500B +      GNO2                                   : ARR( 0.127E-12,     0., 0.0);
+{  4546} GNN500B +GHO                =       GNN500s +      GHO2                                   : ARR( 0.867E-12,     0., 0.0);
+{  4547} GNN500B +GHO                =       G1N5013                                               : ARR( 0.226E-17,    85., 2.0);
+{  4548} GNN500B+HV               =       G1N500g +      GNO2                                   :  0.100E+01*SUN;
+{  4549} GNN500B+HV               =       G1N500E +      GNO2                                   :  0.100E+01*SUN;
+{  4550} GHN500G +GHO                =       GNK500B +      GHO                                    : ARR( 0.417E-10,     0., 0.0);
+{  4551} GHN500G +GHO                =       GHN501q +      GHO2                                   : ARR( 0.407E-11,     0., 0.0);
+{  4552} GHN500G +GHO                =       G2N500E                                               : ARR( 0.192E-11,  -190., 0.0);
+{  4553} GHN500G+HV               =       G1H500D +      GNO2                                   :  0.100E+01*SUN;
+{  4554} GHN500G+HV               =       G1N500E +      GHO                                    :  0.100E+01*SUN;
+{  4555} GNO500F +GHO                =       GNK500B +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{  4556} GNO500F +GHO                =       GND500S +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{  4557} GNO500F+HV               =       G1O500H +      GNO2                                   :  0.100E+01*SUN;
+{  4558} GNK500B +GHO                =       GKK5003 +      GNO2                                   : ARR( 0.322E-12,     0., 0.0);
+{  4559} GNK500B +GHO                =       G2N501T                                               : ARR( 0.183E-12,     0., 0.0);
+{  4560} GNK500B +GHO                =       GND500K +      GHO2                                   : ARR( 0.260E-11,     0., 0.0);
+{  4561} GNK500B+HV               =       G1K500C +      GNO2                                   :  0.100E+01*SUN;
+{  4562} GNK500B+HV               =       G3N4002 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{  4563} GNK500B+HV               =       G2D2000 +      GKO3000 +      GNO2                    :  0.100E+01*SUN;
+{  4564} G2N501T +GNO                =       G1N501X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4565} G2N501T +GNO                =       GNN5018                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4566} G2N501T +GHO2               =       GHN501r                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4567} G2N501T +GNO3               =       G1N501X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4568} G2N501T +MEPERO             =  0.340G1N501X + 0.330GNK500k + 0.330GNK500j                 : ARR( 0.565E-13,  -845., 0.0);
+{  4569} G2N501T +PERO1              =  0.460G1N501X + 0.270GNK500k + 0.270GNK500j                 : ARR( 0.434E-13,  -900., 0.0);
+{  4570} G2N501T +PERO2              =  0.400G1N501X + 0.300GNK500k + 0.300GNK500j                 : ARR( 0.162E-13, -1400., 0.0);
+{  4571} G2N501T +PERO3              =  0.460G1N501X + 0.270GNK500k + 0.270GNK500j                 : ARR( 0.488E-13, -1250., 0.0);
+{  4572} G2N501T +PERO5              =  0.460G1N501X + 0.270GNK500k + 0.270GNK500j                 : ARR( 0.183E-11,   450., 0.0);
+{  4573} G2N501T +PERO6              =  0.300G1N501X + 0.350GNK500k + 0.350GNK500j                 : ARR( 0.168E-13, -1300., 0.0);
+{  4574} G2N501T +PERO9              =  0.650G1N501X + 0.350GNK500j                                : ARR( 0.100E-10,     0., 0.0);
+{  4575} G1N501X                     =       GND3001 +      G3K2001                                : ARR( 0.200E+15,  3009., 0.0);
+{  4576} GND4000 +GHO                =       G3N4002                                               : ARR( 0.213E-10,     0., 0.0);
+{  4577} GND4000 +GNO3               =       G3N4002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4578} GND4000+HV               =       G1D4000 +      GNO2                                   :  0.100E+01*SUN;
+{  4579} GND4000+HV               =       G2N3001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4580} GND4000+HV               =       G2D2000 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  4581} GHD5002 +GHO                =       GDK5002 +      GHO                                    : ARR( 0.341E-10,     0., 0.0);
+{  4582} GHD5002 +GHO                =       G2H500T                                               : ARR( 0.455E-11,     0., 0.0);
+{  4583} GHD5002 +GHO                =       G3H5002                                               : ARR( 0.211E-10,     0., 0.0);
+{  4584} GHD5002 +GHO                =       G2D5008                                               : ARR( 0.193E-11,  -190., 0.0);
+{  4585} GHD5002 +GNO3               =       G3H5002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4586} GHD5002+HV               =       G1D5007 +      GHO                                    :  0.100E+01*SUN;
+{  4587} GHD5002+HV               =       G2H4007 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4588} GHD5002+HV               =       G2K3000 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{  4589} G2H500T +GNO                =       G1H500e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4590} G2H500T +GNO                =       GHN501m                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4591} G2H500T +GHO2               =       GHH500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4592} G2H500T +GNO3               =       G1H500e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4593} G2H500T +MEPERO             =  0.340G1H500e + 0.330GHD500G + 0.330GHD500F                 : ARR( 0.565E-13,  -845., 0.0);
+{  4594} G2H500T +PERO1              =  0.460G1H500e + 0.270GHD500G + 0.270GHD500F                 : ARR( 0.434E-13,  -900., 0.0);
+{  4595} G2H500T +PERO2              =  0.400G1H500e + 0.300GHD500G + 0.300GHD500F                 : ARR( 0.162E-13, -1400., 0.0);
+{  4596} G2H500T +PERO3              =  0.460G1H500e + 0.270GHD500G + 0.270GHD500F                 : ARR( 0.488E-13, -1250., 0.0);
+{  4597} G2H500T +PERO5              =  0.460G1H500e + 0.270GHD500G + 0.270GHD500F                 : ARR( 0.183E-11,   450., 0.0);
+{  4598} G2H500T +PERO6              =  0.300G1H500e + 0.350GHD500G + 0.350GHD500F                 : ARR( 0.168E-13, -1300., 0.0);
+{  4599} G2H500T +PERO9              =  0.650G1H500e + 0.350GHD500F                                : ARR( 0.100E-10,     0., 0.0);
+{  4600} G3H5002 +GHO2               =  0.800GGH5002 + 0.200GAH5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4601} G3H5002 +GNO                =       G2H4007 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4602} G3H5002 +GNO2               =       GPH5002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4603} G3H5002 +GNO3               =       G2H4007 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4604} G3H5002 +MEPERO             =  0.685G2H4007 + 0.315GAH5002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4605} G3H5002 +PERO1              =  0.800G2H4007 + 0.200GAH5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4606} G3H5002 +PERO2              =  0.750G2H4007 + 0.250GAH5002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4607} G3H5002 +PERO3              =  0.800G2H4007 + 0.200GAH5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4608} G3H5002 +PERO5              =  0.650G2H4007 + 0.350GAH5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4609} G3H5002 +PERO6              =  0.650G2H4007 + 0.350GAH5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4610} G3H5002 +PERO9              =       G2H4007 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  4611} G2D5008 +GNO                =       G1D5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4612} G2D5008 +GNO                =       GND5003                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4613} G2D5008 +GHO2               =       GHD5002                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4614} G2D5008 +GNO3               =       G1D5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4615} G2D5008 +MEPERO             =  0.480G1D5007 + 0.260GDO5000 + 0.260GDK5002                 : ARR( 0.616E-11,   905., 0.0);
+{  4616} G2D5008 +PERO1              =  0.600G1D5007 + 0.200GDO5000 + 0.200GDK5002                 : ARR( 0.473E-11,   850., 0.0);
+{  4617} G2D5008 +PERO2              =  0.560G1D5007 + 0.220GDO5000 + 0.220GDK5002                 : ARR( 0.177E-11,   350., 0.0);
+{  4618} G2D5008 +PERO3              =  0.600G1D5007 + 0.200GDO5000 + 0.200GDK5002                 : ARR( 0.533E-11,   500., 0.0);
+{  4619} G2D5008 +PERO5              =  0.600G1D5007 + 0.200GDO5000 + 0.200GDK5002                 : ARR( 0.200E-09,  2200., 0.0);
+{  4620} G2D5008 +PERO6              =  0.460G1D5007 + 0.270GDO5000 + 0.270GDK5002                 : ARR( 0.183E-11,   450., 0.0);
+{  4621} G2D5008 +PERO9              =  0.800G1D5007 + 0.200GDK5002                                : ARR( 0.100E-10,     0., 0.0);
+{  4622} G2H4007 +GNO                =       G1H4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4623} G2H4007 +GNO                =       GHN4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4624} G2H4007 +GHO2               =       GHH4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4625} G2H4007 +GNO3               =       G1H4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4626} G2H4007 +MEPERO             =  0.480G1H4007 + 0.260GHO4007 + 0.260GHD4002                 : ARR( 0.146E-12,  -445., 0.0);
+{  4627} G2H4007 +PERO1              =  0.600G1H4007 + 0.200GHO4007 + 0.200GHD4002                 : ARR( 0.112E-12,  -500., 0.0);
+{  4628} G2H4007 +PERO2              =  0.560G1H4007 + 0.220GHO4007 + 0.220GHD4002                 : ARR( 0.418E-13, -1000., 0.0);
+{  4629} G2H4007 +PERO3              =  0.600G1H4007 + 0.200GHO4007 + 0.200GHD4002                 : ARR( 0.126E-12,  -850., 0.0);
+{  4630} G2H4007 +PERO5              =  0.600G1H4007 + 0.200GHO4007 + 0.200GHD4002                 : ARR( 0.473E-11,   850., 0.0);
+{  4631} G2H4007 +PERO6              =  0.460G1H4007 + 0.270GHO4007 + 0.270GHD4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  4632} G2H4007 +PERO9              =  0.800G1H4007 + 0.200GHD4002                                : ARR( 0.100E-10,     0., 0.0);
+{  4633} G1H500e                     =       GD02000 +      GDD3000 +      GHO                     : ARR( 0.200E+15,  4533., 0.0);
+{  4634} G1H4007 +OXYGEN             =       GHD4002 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  4635} G1H4007                     =       G2H4008                                               : ARR( 0.240E+12,  4177., 0.0);
+{  4636} G2H4008 +GNO                =       G1H4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4637} G2H4008 +GNO                =       GHN400D                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4638} G2H4008 +GHO2               =       GHH4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4639} G2H4008 +GNO3               =       G1H4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4640} G2H4008 +MEPERO             =  0.480G1H4008 + 0.260GHO4005 + 0.260GHD4006                 : ARR( 0.164E-12,  -795., 0.0);
+{  4641} G2H4008 +PERO1              =  0.600G1H4008 + 0.200GHO4005 + 0.200GHD4006                 : ARR( 0.126E-12,  -850., 0.0);
+{  4642} G2H4008 +PERO2              =  0.560G1H4008 + 0.220GHO4005 + 0.220GHD4006                 : ARR( 0.471E-13, -1350., 0.0);
+{  4643} G2H4008 +PERO3              =  0.600G1H4008 + 0.200GHO4005 + 0.200GHD4006                 : ARR( 0.142E-12, -1200., 0.0);
+{  4644} G2H4008 +PERO5              =  0.600G1H4008 + 0.200GHO4005 + 0.200GHD4006                 : ARR( 0.533E-11,   500., 0.0);
+{  4645} G2H4008 +PERO6              =  0.460G1H4008 + 0.270GHO4005 + 0.270GHD4006                 : ARR( 0.488E-13, -1250., 0.0);
+{  4646} G2H4008 +PERO9              =  0.800G1H4008 + 0.200GHD4006                                : ARR( 0.100E-10,     0., 0.0);
+{  4647} G1H4008                     =       GHD4000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  4648} GHO500C +GHO                =       GHK5008 +      GHO2                                   : ARR( 0.865E-11,     0., 0.0);
+{  4649} GHO500C +GHO                =       GKO5009 +      GHO                                    : ARR( 0.426E-10,     0., 0.0);
+{  4650} GHO500C +GHO                =       GHD5003 +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{  4651} GHO500C +GHO                =       G2O5009                                               : ARR( 0.196E-11,  -190., 0.0);
+{  4652} GHO500C+HV               =       G1O5009 +      GHO                                    :  0.100E+01*SUN;
+{  4653} GOO5007 +GHO                =       GKO500B +      GHO2                                   : ARR( 0.858E-11,     0., 0.0);
+{  4654} GOO5007 +GHO                =       GKO5009 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  4655} GOO5007 +GHO                =       G2O500P                                               : ARR( 0.145E-11,     0., 0.0);
+{  4656} GOO5007 +GHO                =       GDO5005 +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{  4657} G2O500P +GNO                =       G1O500Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4658} G2O500P +GNO                =       GNO500X                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4659} G2O500P +GHO2               =       GHO500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4660} G2O500P +GNO3               =       G1O500Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4661} G2O500P +MEPERO             =  0.340G1O500Q + 0.330GOO500C + 0.330GKO500J                 : ARR( 0.565E-13,  -845., 0.0);
+{  4662} G2O500P +PERO1              =  0.460G1O500Q + 0.270GOO500C + 0.270GKO500J                 : ARR( 0.434E-13,  -900., 0.0);
+{  4663} G2O500P +PERO2              =  0.400G1O500Q + 0.300GOO500C + 0.300GKO500J                 : ARR( 0.162E-13, -1400., 0.0);
+{  4664} G2O500P +PERO3              =  0.460G1O500Q + 0.270GOO500C + 0.270GKO500J                 : ARR( 0.488E-13, -1250., 0.0);
+{  4665} G2O500P +PERO5              =  0.460G1O500Q + 0.270GOO500C + 0.270GKO500J                 : ARR( 0.183E-11,   450., 0.0);
+{  4666} G2O500P +PERO6              =  0.300G1O500Q + 0.350GOO500C + 0.350GKO500J                 : ARR( 0.168E-13, -1300., 0.0);
+{  4667} G2O500P +PERO9              =  0.650G1O500Q + 0.350GKO500J                                : ARR( 0.100E-10,     0., 0.0);
+{  4668} G1O500Q                     =       GDO3001 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  4669} GHO500D +GHO                =       GHK5009 +      GHO2                                   : ARR( 0.865E-11,     0., 0.0);
+{  4670} GHO500D +GHO                =       GKO5008 +      GHO                                    : ARR( 0.426E-10,     0., 0.0);
+{  4671} GHO500D +GHO                =       GHD5005 +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{  4672} GHO500D +GHO                =       G2O500A                                               : ARR( 0.196E-11,  -190., 0.0);
+{  4673} GHO500D+HV               =       G1O500A +      GHO                                    :  0.100E+01*SUN;
+{  4674} GNO500G +GHO                =       GND500D +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  4675} GNO500G +GHO                =       GNK500J +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  4676} GNO500G +GHO                =       G2N501U                                               : ARR( 0.145E-11,     0., 0.0);
+{  4677} GNO500G +GHO                =       GNK500P +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{  4678} GNO500G+HV               =       G1O500B +      GNO2                                   :  0.100E+01*SUN;
+{  4679} G2N501U +GNO                =       G1N501Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4680} G2N501U +GNO                =       GNN501B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4681} G2N501U +GHO2               =       GHN501s                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4682} G2N501U +GNO3               =       G1N501Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4683} G2N501U +MEPERO             =  0.340G1N501Y + 0.330GNO500Y + 0.330GNK500l                 : ARR( 0.565E-13,  -845., 0.0);
+{  4684} G2N501U +PERO1              =  0.460G1N501Y + 0.270GNO500Y + 0.270GNK500l                 : ARR( 0.434E-13,  -900., 0.0);
+{  4685} G2N501U +PERO2              =  0.400G1N501Y + 0.300GNO500Y + 0.300GNK500l                 : ARR( 0.162E-13, -1400., 0.0);
+{  4686} G2N501U +PERO3              =  0.460G1N501Y + 0.270GNO500Y + 0.270GNK500l                 : ARR( 0.488E-13, -1250., 0.0);
+{  4687} G2N501U +PERO5              =  0.460G1N501Y + 0.270GNO500Y + 0.270GNK500l                 : ARR( 0.183E-11,   450., 0.0);
+{  4688} G2N501U +PERO6              =  0.300G1N501Y + 0.350GNO500Y + 0.350GNK500l                 : ARR( 0.168E-13, -1300., 0.0);
+{  4689} G2N501U +PERO9              =  0.650G1N501Y + 0.350GNK500l                                : ARR( 0.100E-10,     0., 0.0);
+{  4690} G1N501Y                     =       GDO2000 +      GND3002 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  4691} G1N501Y                     =       GDO3002 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  4692} GHO500E +GHO                =       GHD5007 +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{  4693} GHO500E +GHO                =       GHK500W +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  4694} GHO500E +GHO                =       GHK500C +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  4695} GHO500E +GHO                =       GDO5004 +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{  4696} GHO500E +GHO                =       G2O500B                                               : ARR( 0.198E-11,  -190., 0.0);
+{  4697} GHO500E+HV               =       G1O500B +      GHO                                    :  0.100E+01*SUN;
+{  4698} GOO5008 +GHO                =       GDO5004 +      GHO2                                   : ARR( 0.860E-11,     0., 0.0);
+{  4699} GOO5008 +GHO                =       GKO500A +      GHO2                                   : ARR( 0.220E-10,     0., 0.0);
+{  4700} GDO5004 +GHO                =       GDD5001 +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{  4701} GDO5004 +GHO                =       GDK500F +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{  4702} GDO5004 +GHO                =       G2D5009                                               : ARR( 0.452E-11,     0., 0.0);
+{  4703} GDO5004 +GHO                =       GDK5005 +      GHO2                                   : ARR( 0.634E-11,     0., 0.0);
+{  4704} GDO5004 +GHO                =       G3K5006                                               : ARR( 0.210E-10,     0., 0.0);
+{  4705} GDO5004 +GNO3               =       G3K5006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4706} GDO5004+HV               =       GDO4002 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  4707} G2D5009 +GNO                =       G1D500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4708} G2D5009 +GNO                =       GND500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4709} G2D5009 +GHO2               =       GHD500H                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4710} G2D5009 +GNO3               =       G1D500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4711} G2D5009 +MEPERO             =  0.340G1D500B + 0.330GDO500A + 0.330GDK500G                 : ARR( 0.565E-13,  -845., 0.0);
+{  4712} G2D5009 +PERO1              =  0.460G1D500B + 0.270GDO500A + 0.270GDK500G                 : ARR( 0.434E-13,  -900., 0.0);
+{  4713} G2D5009 +PERO2              =  0.400G1D500B + 0.300GDO500A + 0.300GDK500G                 : ARR( 0.162E-13, -1400., 0.0);
+{  4714} G2D5009 +PERO3              =  0.460G1D500B + 0.270GDO500A + 0.270GDK500G                 : ARR( 0.488E-13, -1250., 0.0);
+{  4715} G2D5009 +PERO5              =  0.460G1D500B + 0.270GDO500A + 0.270GDK500G                 : ARR( 0.183E-11,   450., 0.0);
+{  4716} G2D5009 +PERO6              =  0.300G1D500B + 0.350GDO500A + 0.350GDK500G                 : ARR( 0.168E-13, -1300., 0.0);
+{  4717} G2D5009 +PERO9              =  0.650G1D500B + 0.350GDK500G                                : ARR( 0.100E-10,     0., 0.0);
+{  4718} G3K5006 +GHO2               =  0.800GGO5005 + 0.200GAO5005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4719} G3K5006 +GNO                =       GDO4002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  4720} G3K5006 +GNO2               =       GPO5005                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4721} G3K5006 +GNO3               =       GDO4002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  4722} G3K5006 +MEPERO             =  0.685GDO4002 + 0.315GAO5005 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4723} G3K5006 +PERO1              =  0.800GDO4002 + 0.200GAO5005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4724} G3K5006 +PERO2              =  0.750GDO4002 + 0.250GAO5005 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4725} G3K5006 +PERO3              =  0.800GDO4002 + 0.200GAO5005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4726} G3K5006 +PERO5              =  0.650GDO4002 + 0.350GAO5005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4727} G3K5006 +PERO6              =  0.650GDO4002 + 0.350GAO5005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  4728} G3K5006 +PERO9              =       GDO4002 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  4729} G1D500B                     =       GDO2000 +      GDD3001 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{  4730} G1D500B                     =       GDO3002 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{  4731} GKO500A +GHO                =       GDK500F +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{  4732} GKO500A +GHO                =       GKK5005 +      GHO2                                   : ARR( 0.337E-10,     0., 0.0);
+{  4733} GKO500A +GHO                =       GDK5005 +      GHO2                                   : ARR( 0.253E-11,     0., 0.0);
+{  4734} GKO500A+HV               =       G3K4005 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{  4735} GKO500A+HV               =       GDO2000 +      GKO3000                                :  0.100E+01*SUN;
+{  4736} G3K4005 +GHO2               =  0.800GGO4004 + 0.200GAO4004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4737} G3K4005 +GNO                =       G2O3003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4738} G3K4005 +GNO2               =       GPO4004                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4739} G3K4005 +GNO3               =       G2O3003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4740} G3K4005 +MEPERO             =  0.685G2O3003 + 0.315GAO4004 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4741} G3K4005 +PERO1              =  0.800G2O3003 + 0.200GAO4004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4742} G3K4005 +PERO2              =  0.750G2O3003 + 0.250GAO4004 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4743} G3K4005 +PERO3              =  0.800G2O3003 + 0.200GAO4004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4744} G3K4005 +PERO5              =  0.650G2O3003 + 0.350GAO4004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4745} G3K4005 +PERO6              =  0.650G2O3003 + 0.350GAO4004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4746} G3K4005 +PERO9              =       G2O3003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  4747} GDO4002 +GHO                =       GDD4001 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{  4748} GDO4002 +GHO                =       GDK4001 +      GHO2                                   : ARR( 0.333E-10,     0., 0.0);
+{  4749} GDO4002 +GHO                =       G3K4005                                               : ARR( 0.212E-10,     0., 0.0);
+{  4750} GDO4002 +GNO3               =       G3K4005 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4751} GDO4002+HV               =       G2O3003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4752} GDO4002+HV               =       GDO2000 +      GD02000                                :  0.100E+01*SUN;
+{  4753} GDK5002 +GHO                =       G2D500A                                               : ARR( 0.274E-11,     0., 0.0);
+{  4754} GDK5002 +GHO                =       G2D500B                                               : ARR( 0.274E-11,     0., 0.0);
+{  4755} GDK5002 +GHO                =       G3K5007                                               : ARR( 0.209E-10,     0., 0.0);
+{  4756} GDK5002 +GNO3               =       G3K5007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4757} GDK5002+HV               =       G3K2000 +      G2D3001                                :  0.100E+01*SUN;
+{  4758} GDK5002+HV               =       G2K4001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4759} G2D500A +GNO                =       G1D500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4760} G2D500A +GNO                =       GND500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4761} G2D500A +GHO2               =       GHD500I                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4762} G2D500A +GNO3               =       G1D500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4763} G2D500A +MEPERO             =  0.340G1D500C + 0.330GDK500H + 0.330GDK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{  4764} G2D500A +PERO1              =  0.460G1D500C + 0.270GDK500H + 0.270GDK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{  4765} G2D500A +PERO2              =  0.400G1D500C + 0.300GDK500H + 0.300GDK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{  4766} G2D500A +PERO3              =  0.460G1D500C + 0.270GDK500H + 0.270GDK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{  4767} G2D500A +PERO5              =  0.460G1D500C + 0.270GDK500H + 0.270GDK500D                 : ARR( 0.183E-11,   450., 0.0);
+{  4768} G2D500A +PERO6              =  0.300G1D500C + 0.350GDK500H + 0.350GDK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{  4769} G2D500A +PERO9              =  0.650G1D500C + 0.350GDK500D                                : ARR( 0.100E-10,     0., 0.0);
+{  4770} G2D500B +GNO                =       G1D500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4771} G2D500B +GNO                =       GND500L                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4772} G2D500B +GHO2               =       GHD500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4773} G2D500B +GNO3               =       G1D500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4774} G2D500B +MEPERO             =  0.340G1D500D + 0.330GDK500A + 0.330GDK500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  4775} G2D500B +PERO1              =  0.460G1D500D + 0.270GDK500A + 0.270GDK500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  4776} G2D500B +PERO2              =  0.400G1D500D + 0.300GDK500A + 0.300GDK500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  4777} G2D500B +PERO3              =  0.460G1D500D + 0.270GDK500A + 0.270GDK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  4778} G2D500B +PERO5              =  0.460G1D500D + 0.270GDK500A + 0.270GDK500C                 : ARR( 0.183E-11,   450., 0.0);
+{  4779} G2D500B +PERO6              =  0.300G1D500D + 0.350GDK500A + 0.350GDK500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  4780} G2D500B +PERO9              =  0.650G1D500D + 0.350GDK500C                                : ARR( 0.100E-10,     0., 0.0);
+{  4781} G3K5007 +GHO2               =  0.800GGK5001 + 0.200GAK5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4782} G3K5007 +GNO                =       G2K4001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4783} G3K5007 +GNO2               =       GPK5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4784} G3K5007 +GNO3               =       G2K4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4785} G3K5007 +MEPERO             =  0.685G2K4001 + 0.315GAK5001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4786} G3K5007 +PERO1              =  0.800G2K4001 + 0.200GAK5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4787} G3K5007 +PERO2              =  0.750G2K4001 + 0.250GAK5001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4788} G3K5007 +PERO3              =  0.800G2K4001 + 0.200GAK5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4789} G3K5007 +PERO5              =  0.650G2K4001 + 0.350GAK5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4790} G3K5007 +PERO6              =  0.650G2K4001 + 0.350GAK5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4791} G3K5007 +PERO9              =       G2K4001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  4792} G2K4001 +GNO                =       G1K4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4793} G2K4001 +GNO                =       GNK4001                                               : ARR( 0.111E-12,  -360., 0.0);
+{  4794} G2K4001 +GHO2               =       GHK4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  4795} G2K4001 +GNO3               =       G1K4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4796} G2K4001 +MEPERO             =  0.480G1K4001 + 0.260GKO4001 + 0.260GDK4000                 : ARR( 0.146E-12,  -445., 0.0);
+{  4797} G2K4001 +PERO1              =  0.600G1K4001 + 0.200GKO4001 + 0.200GDK4000                 : ARR( 0.112E-12,  -500., 0.0);
+{  4798} G2K4001 +PERO2              =  0.560G1K4001 + 0.220GKO4001 + 0.220GDK4000                 : ARR( 0.418E-13, -1000., 0.0);
+{  4799} G2K4001 +PERO3              =  0.600G1K4001 + 0.200GKO4001 + 0.200GDK4000                 : ARR( 0.126E-12,  -850., 0.0);
+{  4800} G2K4001 +PERO5              =  0.600G1K4001 + 0.200GKO4001 + 0.200GDK4000                 : ARR( 0.473E-11,   850., 0.0);
+{  4801} G2K4001 +PERO6              =  0.460G1K4001 + 0.270GKO4001 + 0.270GDK4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  4802} G2K4001 +PERO9              =  0.800G1K4001 + 0.200GDK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  4803} G1D500C                     =       G3K2000 +      GDD3000                                : ARR( 0.200E+15,  2285., 0.0);
+{  4804} G1D500D                     =       GDK4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5054., 0.0);
+{  4805} G1K4001 +OXYGEN             =       GDK4000 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  4806} GK03000 +GHO                =       G2K3000                                               : ARR( 0.211E-17,   -10., 2.0);
+{  4807} GK03000+HV               =       G3K2000 +      GCH3O2                                 :  0.100E+01*SUN;
+{  4808} GHK5008 +GHO                =       GKK5002 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{  4809} GHK5008 +GHO                =       G2H500U                                               : ARR( 0.451E-11,     0., 0.0);
+{  4810} GHK5008 +GHO                =       GHD500I +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{  4811} GHK5008 +GHO                =       G2K5006                                               : ARR( 0.191E-11,  -190., 0.0);
+{  4812} GHK5008+HV               =       G3K2000 +      GDO3000 +      GHO                     :  0.100E+01*SUN;
+{  4813} GHK5008+HV               =       G1K5006 +      GHO                                    :  0.100E+01*SUN;
+{  4814} G2H500U +GNO                =       G1H500f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4815} G2H500U +GNO                =       GHN501d                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4816} G2H500U +GHO2               =       GHH500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4817} G2H500U +GNO3               =       G1H500f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4818} G2H500U +MEPERO             =  0.340G1H500f + 0.330GHK500X + 0.330GHK500Y                 : ARR( 0.565E-13,  -845., 0.0);
+{  4819} G2H500U +PERO1              =  0.460G1H500f + 0.270GHK500X + 0.270GHK500Y                 : ARR( 0.434E-13,  -900., 0.0);
+{  4820} G2H500U +PERO2              =  0.400G1H500f + 0.300GHK500X + 0.300GHK500Y                 : ARR( 0.162E-13, -1400., 0.0);
+{  4821} G2H500U +PERO3              =  0.460G1H500f + 0.270GHK500X + 0.270GHK500Y                 : ARR( 0.488E-13, -1250., 0.0);
+{  4822} G2H500U +PERO5              =  0.460G1H500f + 0.270GHK500X + 0.270GHK500Y                 : ARR( 0.183E-11,   450., 0.0);
+{  4823} G2H500U +PERO6              =  0.300G1H500f + 0.350GHK500X + 0.350GHK500Y                 : ARR( 0.168E-13, -1300., 0.0);
+{  4824} G2H500U +PERO9              =  0.650G1H500f + 0.350GHK500Y                                : ARR( 0.100E-10,     0., 0.0);
+{  4825} G1H500f                     =       GDK3000 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4976., 0.0);
+{  4826} G1H500f                     =       GHD4007 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  4827} GKO500B +GHO                =       GKK5002 +      GHO2                                   : ARR( 0.645E-11,     0., 0.0);
+{  4828} GKO500B +GHO                =       G2K500P                                               : ARR( 0.460E-11,     0., 0.0);
+{  4829} GKO500B +GHO                =       GDK500H +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  4830} GKO500B+HV               =       G3K2000 +      GDO3000 +      GHO2                    :  0.100E+01*SUN;
+{  4831} G2K500P +GNO                =       G1K500Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4832} G2K500P +GNO                =       GNK500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4833} G2K500P +GHO2               =       GHK500Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4834} G2K500P +GNO3               =       G1K500Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4835} G2K500P +MEPERO             =  0.340G1K500Q + 0.330GKO500K + 0.330GKK500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  4836} G2K500P +PERO1              =  0.460G1K500Q + 0.270GKO500K + 0.270GKK500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  4837} G2K500P +PERO2              =  0.400G1K500Q + 0.300GKO500K + 0.300GKK500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  4838} G2K500P +PERO3              =  0.460G1K500Q + 0.270GKO500K + 0.270GKK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  4839} G2K500P +PERO5              =  0.460G1K500Q + 0.270GKO500K + 0.270GKK500C                 : ARR( 0.183E-11,   450., 0.0);
+{  4840} G2K500P +PERO6              =  0.300G1K500Q + 0.350GKO500K + 0.350GKK500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  4841} G2K500P +PERO9              =  0.650G1K500Q + 0.350GKK500C                                : ARR( 0.100E-10,     0., 0.0);
+{  4842} G1K500Q                     =       GDK3000 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3768., 0.0);
+{  4843} G1K500Q                     =       GDK4003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  4844} GHK5009 +GHO                =       GKK5003 +      GHO                                    : ARR( 0.139E-09,     0., 0.0);
+{  4845} GHK5009+HV               =       G3K2000 +      G2H3004                                :  0.100E+01*SUN;
+{  4846} GHK5009+HV               =       GK03000 +      GHD2000                                :  0.100E+01*SUN;
+{  4847} GHK5009+HV               =       G1K5007 +      GHO                                    :  0.100E+01*SUN;
+{  4848} G2H3004 +GNO                =       G1H3005 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4849} G2H3004 +GNO                =       GHN3006                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4850} G2H3004 +GHO2               =       GHH3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4851} G2H3004 +GNO3               =       G1H3005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4852} G2H3004 +MEPERO             =  0.480G1H3005 + 0.260GHO3004 + 0.260GHD3003                 : ARR( 0.164E-12,  -795., 0.0);
+{  4853} G2H3004 +PERO1              =  0.600G1H3005 + 0.200GHO3004 + 0.200GHD3003                 : ARR( 0.126E-12,  -850., 0.0);
+{  4854} G2H3004 +PERO2              =  0.560G1H3005 + 0.220GHO3004 + 0.220GHD3003                 : ARR( 0.471E-13, -1350., 0.0);
+{  4855} G2H3004 +PERO3              =  0.600G1H3005 + 0.200GHO3004 + 0.200GHD3003                 : ARR( 0.142E-12, -1200., 0.0);
+{  4856} G2H3004 +PERO5              =  0.600G1H3005 + 0.200GHO3004 + 0.200GHD3003                 : ARR( 0.533E-11,   500., 0.0);
+{  4857} G2H3004 +PERO6              =  0.460G1H3005 + 0.270GHO3004 + 0.270GHD3003                 : ARR( 0.488E-13, -1250., 0.0);
+{  4858} G2H3004 +PERO9              =  0.800G1H3005 + 0.200GHD3003                                : ARR( 0.100E-10,     0., 0.0);
+{  4859} G1H3005 +OXYGEN             =       GHD3003 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  4860} G1H3005                     =       GDO2000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5652., 0.0);
+{  4861} GKK5003 +GHO                =       G2K500Q                                               : ARR( 0.568E-12,     0., 0.0);
+{  4862} GKK5003 +GHO                =       GDK500C +      GHO2                                   : ARR( 0.265E-11,     0., 0.0);
+{  4863} GKK5003+HV               =       G3K2000 +      G2K3001                                :  0.100E+01*SUN;
+{  4864} GKK5003+HV               =       G3K4003 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{  4865} G2K500Q +GNO                =       G1K500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4866} G2K500Q +GNO                =       GNK500h                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4867} G2K500Q +GHO2               =       GHK500Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4868} G2K500Q +GNO3               =       G1K500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4869} G2K500Q +MEPERO             =  0.340G1K500R + 0.330GKK500C + 0.330GKK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{  4870} G2K500Q +PERO1              =  0.460G1K500R + 0.270GKK500C + 0.270GKK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{  4871} G2K500Q +PERO2              =  0.400G1K500R + 0.300GKK500C + 0.300GKK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{  4872} G2K500Q +PERO3              =  0.460G1K500R + 0.270GKK500C + 0.270GKK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  4873} G2K500Q +PERO5              =  0.460G1K500R + 0.270GKK500C + 0.270GKK500B                 : ARR( 0.183E-11,   450., 0.0);
+{  4874} G2K500Q +PERO6              =  0.300G1K500R + 0.350GKK500C + 0.350GKK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{  4875} G2K500Q +PERO9              =  0.650G1K500R + 0.350GKK500B                                : ARR( 0.100E-10,     0., 0.0);
+{  4876} G1K500R                     =       G3K2000 +      GDK3001                                : ARR( 0.200E+15,  4513., 0.0);
+{  4877} G1K500R                     =       GDK3000 +      G3K2001                                : ARR( 0.200E+15,  4599., 0.0);
+{  4878} GHO3001 +GHO                =       GHD3000 +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{  4879} GHO3001 +GHO                =       G2H3005                                               : ARR( 0.142E-11,     0., 0.0);
+{  4880} GHO3001 +GHO                =       GDO3000 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  4881} GHO3001 +GHO                =       G2O3001                                               : ARR( 0.191E-11,  -190., 0.0);
+{  4882} GHO3001+HV               =       G1O3001 +      GHO                                    :  0.100E+01*SUN;
+{  4883} G2H3005 +GNO                =       G1H3006 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4884} G2H3005 +GNO                =       GHN3009                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4885} G2H3005 +GHO2               =       GHH3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4886} G2H3005 +GNO3               =       G1H3006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4887} G2H3005 +MEPERO             =  0.340G1H3006 + 0.330GHO3003 + 0.330GHK3001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4888} G2H3005 +PERO1              =  0.460G1H3006 + 0.270GHO3003 + 0.270GHK3001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4889} G2H3005 +PERO2              =  0.400G1H3006 + 0.300GHO3003 + 0.300GHK3001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4890} G2H3005 +PERO3              =  0.460G1H3006 + 0.270GHO3003 + 0.270GHK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4891} G2H3005 +PERO5              =  0.460G1H3006 + 0.270GHO3003 + 0.270GHK3001                 : ARR( 0.183E-11,   450., 0.0);
+{  4892} G2H3005 +PERO6              =  0.300G1H3006 + 0.350GHO3003 + 0.350GHK3001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4893} G2H3005 +PERO9              =  0.650G1H3006 + 0.350GHK3001                                : ARR( 0.100E-10,     0., 0.0);
+{  4894} G1H3006                     =       GCH2O   +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  5355., 0.0);
+{  4895} GOO3001 +GHO                =       GDO3000 +      GHO2                                   : ARR( 0.828E-11,     0., 0.0);
+{  4896} GOO3001 +GHO                =       G2O3004                                               : ARR( 0.145E-11,     0., 0.0);
+{  4897} G2O3004 +GNO                =       G1O3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4898} G2O3004 +GNO                =       GNO3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4899} G2O3004 +GHO2               =       GHO3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4900} G2O3004 +GNO3               =       G1O3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4901} G2O3004 +MEPERO             =  0.340G1O3004 + 0.330GOO3002 + 0.330GKO3001                 : ARR( 0.565E-13,  -845., 0.0);
+{  4902} G2O3004 +PERO1              =  0.460G1O3004 + 0.270GOO3002 + 0.270GKO3001                 : ARR( 0.434E-13,  -900., 0.0);
+{  4903} G2O3004 +PERO2              =  0.400G1O3004 + 0.300GOO3002 + 0.300GKO3001                 : ARR( 0.162E-13, -1400., 0.0);
+{  4904} G2O3004 +PERO3              =  0.460G1O3004 + 0.270GOO3002 + 0.270GKO3001                 : ARR( 0.488E-13, -1250., 0.0);
+{  4905} G2O3004 +PERO5              =  0.460G1O3004 + 0.270GOO3002 + 0.270GKO3001                 : ARR( 0.183E-11,   450., 0.0);
+{  4906} G2O3004 +PERO6              =  0.300G1O3004 + 0.350GOO3002 + 0.350GKO3001                 : ARR( 0.168E-13, -1300., 0.0);
+{  4907} G2O3004 +PERO9              =  0.650G1O3004 + 0.350GKO3001                                : ARR( 0.100E-10,     0., 0.0);
+{  4908} G1O3004                     =       GCH2O   +      GDO2000 +      GHO2                    : ARR( 0.400E+15,  5355., 0.0);
+{  4909} GDK4000 +GHO                =       G3K4003                                               : ARR( 0.665E-10,     0., 0.0);
+{  4910} GDK4000 +GNO3               =       G3K4003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4911} GDK4000+HV               =       G3K2000 +      G2D2000                                :  0.100E+01*SUN;
+{  4912} GDK4000+HV               =       G2K3000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4913} GHN500H +GHO                =       GHN500X +      GHO2                                   : ARR( 0.848E-11,     0., 0.0);
+{  4914} GHN500H +GHO                =       GNK500C +      GHO                                    : ARR( 0.417E-10,     0., 0.0);
+{  4915} GHN500H +GHO                =       G2N500F                                               : ARR( 0.192E-11,  -190., 0.0);
+{  4916} GHN500H+HV               =       G1N500F +      GHO                                    :  0.100E+01*SUN;
+{  4917} GHN500H+HV               =       G1H500g +      GNO2                                   :  0.100E+01*SUN;
+{  4918} G1H500g                     =       GHK5008 +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{  4919} GNO500H +GHO                =       GNK500F +      GHO2                                   : ARR( 0.872E-11,     0., 0.0);
+{  4920} GNO500H +GHO                =       GNK500C +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  4921} GNO500H+HV               =       G1O500R +      GNO2                                   :  0.100E+01*SUN;
+{  4922} G1O500R                     =       GKO500B +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{  4923} GNK500C +GHO                =       G2N501W                                               : ARR( 0.575E-12,     0., 0.0);
+{  4924} GNK500C +GHO                =       GNK500G +      GHO2                                   : ARR( 0.552E-11,     0., 0.0);
+{  4925} GNK500C+HV               =       G3K3002 +      G2N2000                                :  0.100E+01*SUN;
+{  4926} GNK500C+HV               =       G1K500I +      GNO2                                   :  0.100E+01*SUN;
+{  4927} G2N501W +GNO                =       G1N501Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4928} G2N501W +GNO                =       GNN500p                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4929} G2N501W +GHO2               =       GHN501t                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4930} G2N501W +GNO3               =       G1N501Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4931} G2N501W +MEPERO             =  0.480G1N501Z + 0.260GNK500X + 0.260GND500U                 : ARR( 0.164E-12,  -795., 0.0);
+{  4932} G2N501W +PERO1              =  0.600G1N501Z + 0.200GNK500X + 0.200GND500U                 : ARR( 0.126E-12,  -850., 0.0);
+{  4933} G2N501W +PERO2              =  0.560G1N501Z + 0.220GNK500X + 0.220GND500U                 : ARR( 0.471E-13, -1350., 0.0);
+{  4934} G2N501W +PERO3              =  0.600G1N501Z + 0.200GNK500X + 0.200GND500U                 : ARR( 0.142E-12, -1200., 0.0);
+{  4935} G2N501W +PERO5              =  0.600G1N501Z + 0.200GNK500X + 0.200GND500U                 : ARR( 0.533E-11,   500., 0.0);
+{  4936} G2N501W +PERO6              =  0.460G1N501Z + 0.270GNK500X + 0.270GND500U                 : ARR( 0.488E-13, -1250., 0.0);
+{  4937} G2N501W +PERO9              =  0.800G1N501Z + 0.200GND500U                                : ARR( 0.100E-10,     0., 0.0);
+{  4938} G1N501Z                     =       GND400B +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{  4939} GHK500A +GHO                =       G2H500W                                               : ARR( 0.466E-11,     0., 0.0);
+{  4940} GHK500A +GHO                =       GDK5002 +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{  4941} GHK500A +GHO                =       G2K500R                                               : ARR( 0.198E-11,  -190., 0.0);
+{  4942} GHK500A+HV               =       G3K2000 +      G2H3006                                :  0.100E+01*SUN;
+{  4943} GHK500A+HV               =       GK03000 +      G2D2000 +      GHO                     :  0.100E+01*SUN;
+{  4944} GHK500A+HV               =       G1K5008 +      GHO                                    :  0.100E+01*SUN;
+{  4945} G2H500W +GNO                =       G1H500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4946} G2H500W +GNO                =       GHN501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4947} G2H500W +GHO2               =       GHH500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4948} G2H500W +GNO3               =       G1H500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4949} G2H500W +MEPERO             =  0.340G1H500h + 0.330GHK500N + 0.330GHK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{  4950} G2H500W +PERO1              =  0.460G1H500h + 0.270GHK500N + 0.270GHK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{  4951} G2H500W +PERO2              =  0.400G1H500h + 0.300GHK500N + 0.300GHK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{  4952} G2H500W +PERO3              =  0.460G1H500h + 0.270GHK500N + 0.270GHK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{  4953} G2H500W +PERO5              =  0.460G1H500h + 0.270GHK500N + 0.270GHK500D                 : ARR( 0.183E-11,   450., 0.0);
+{  4954} G2H500W +PERO6              =  0.300G1H500h + 0.350GHK500N + 0.350GHK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{  4955} G2H500W +PERO9              =  0.650G1H500h + 0.350GHK500D                                : ARR( 0.100E-10,     0., 0.0);
+{  4956} G2K500R +GNO                =       G1K5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  4957} G2K500R +GNO                =       GNK5000                                               : ARR( 0.182E-12,  -360., 0.0);
+{  4958} G2K500R +GHO2               =       GHK500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  4959} G2K500R +GNO3               =       G1K5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4960} G2K500R +MEPERO             =  0.480G1K5008 + 0.260GKO5000 + 0.260GDK5002                 : ARR( 0.146E-12,  -445., 0.0);
+{  4961} G2K500R +PERO1              =  0.600G1K5008 + 0.200GKO5000 + 0.200GDK5002                 : ARR( 0.112E-12,  -500., 0.0);
+{  4962} G2K500R +PERO2              =  0.560G1K5008 + 0.220GKO5000 + 0.220GDK5002                 : ARR( 0.418E-13, -1000., 0.0);
+{  4963} G2K500R +PERO3              =  0.600G1K5008 + 0.200GKO5000 + 0.200GDK5002                 : ARR( 0.126E-12,  -850., 0.0);
+{  4964} G2K500R +PERO5              =  0.600G1K5008 + 0.200GKO5000 + 0.200GDK5002                 : ARR( 0.473E-11,   850., 0.0);
+{  4965} G2K500R +PERO6              =  0.460G1K5008 + 0.270GKO5000 + 0.270GDK5002                 : ARR( 0.434E-13,  -900., 0.0);
+{  4966} G2K500R +PERO9              =  0.800G1K5008 + 0.200GDK5002                                : ARR( 0.100E-10,     0., 0.0);
+{  4967} G2H3006 +GNO                =       G1H3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  4968} G2H3006 +GNO                =       GHN3000                                               : ARR( 0.622E-13,  -360., 0.0);
+{  4969} G2H3006 +GHO2               =       GHH3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{  4970} G2H3006 +GNO3               =       G1H3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  4971} G2H3006 +MEPERO             =  0.480G1H3002 + 0.260GHO3001 + 0.260GHD3000                 : ARR( 0.146E-12,  -445., 0.0);
+{  4972} G2H3006 +PERO1              =  0.600G1H3002 + 0.200GHO3001 + 0.200GHD3000                 : ARR( 0.112E-12,  -500., 0.0);
+{  4973} G2H3006 +PERO2              =  0.560G1H3002 + 0.220GHO3001 + 0.220GHD3000                 : ARR( 0.418E-13, -1000., 0.0);
+{  4974} G2H3006 +PERO3              =  0.600G1H3002 + 0.200GHO3001 + 0.200GHD3000                 : ARR( 0.126E-12,  -850., 0.0);
+{  4975} G2H3006 +PERO5              =  0.600G1H3002 + 0.200GHO3001 + 0.200GHD3000                 : ARR( 0.473E-11,   850., 0.0);
+{  4976} G2H3006 +PERO6              =  0.460G1H3002 + 0.270GHO3001 + 0.270GHD3000                 : ARR( 0.434E-13,  -900., 0.0);
+{  4977} G2H3006 +PERO9              =  0.800G1H3002 + 0.200GHD3000                                : ARR( 0.100E-10,     0., 0.0);
+{  4978} G1H500h                     =       G2K3000 +      GHD2000                                : ARR( 0.200E+15,  7289., 0.0);
+{  4979} G1H500h                     =       GDK4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6757., 0.0);
+{  4980} GHD5003 +GHO                =       GHD500I +      GHO2                                   : ARR( 0.863E-11,     0., 0.0);
+{  4981} GHD5003 +GHO                =       GDK5003 +      GHO                                    : ARR( 0.135E-09,     0., 0.0);
+{  4982} GHD5003 +GHO                =       G3H5003                                               : ARR( 0.214E-10,     0., 0.0);
+{  4983} GHD5003 +GNO3               =       G3H5003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  4984} GHD5003+HV               =       G1D5001 +      GHO                                    :  0.100E+01*SUN;
+{  4985} GHD5003+HV               =       G2H4009 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  4986} GHD5003+HV               =       GHK3000 +      GD02000                                :  0.100E+01*SUN;
+{  4987} G3H5003 +GHO2               =  0.800GGH5004 + 0.200GAH5004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  4988} G3H5003 +GNO                =       G2H4009 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  4989} G3H5003 +GNO2               =       GPH5004                                               : ARR( 0.330E-08,     0.,-1.0);
+{  4990} G3H5003 +GNO3               =       G2H4009 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  4991} G3H5003 +MEPERO             =  0.685G2H4009 + 0.315GAH5004 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4992} G3H5003 +PERO1              =  0.800G2H4009 + 0.200GAH5004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4993} G3H5003 +PERO2              =  0.750G2H4009 + 0.250GAH5004 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4994} G3H5003 +PERO3              =  0.800G2H4009 + 0.200GAH5004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4995} G3H5003 +PERO5              =  0.650G2H4009 + 0.350GAH5004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4996} G3H5003 +PERO6              =  0.650G2H4009 + 0.350GAH5004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  4997} G3H5003 +PERO9              =       G2H4009 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  4998} G2H4009 +GNO                =       G1H4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  4999} G2H4009 +GNO                =       GHN400E                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5000} G2H4009 +GHO2               =       GHH4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5001} G2H4009 +GNO3               =       G1H4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5002} G2H4009 +MEPERO             =  0.480G1H4009 + 0.260GHO4008 + 0.260GHD4008                 : ARR( 0.164E-12,  -795., 0.0);
+{  5003} G2H4009 +PERO1              =  0.600G1H4009 + 0.200GHO4008 + 0.200GHD4008                 : ARR( 0.126E-12,  -850., 0.0);
+{  5004} G2H4009 +PERO2              =  0.560G1H4009 + 0.220GHO4008 + 0.220GHD4008                 : ARR( 0.471E-13, -1350., 0.0);
+{  5005} G2H4009 +PERO3              =  0.600G1H4009 + 0.200GHO4008 + 0.200GHD4008                 : ARR( 0.142E-12, -1200., 0.0);
+{  5006} G2H4009 +PERO5              =  0.600G1H4009 + 0.200GHO4008 + 0.200GHD4008                 : ARR( 0.533E-11,   500., 0.0);
+{  5007} G2H4009 +PERO6              =  0.460G1H4009 + 0.270GHO4008 + 0.270GHD4008                 : ARR( 0.488E-13, -1250., 0.0);
+{  5008} G2H4009 +PERO9              =  0.800G1H4009 + 0.200GHD4008                                : ARR( 0.100E-10,     0., 0.0);
+{  5009} G1H4009                     =       G2H400A                                               : ARR( 0.240E+12,  4177., 0.0);
+{  5010} G1H4009                     =       GDO3001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  5011} G2H400A +GNO                =       G1H400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5012} G2H400A +GNO                =       GHN400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5013} G2H400A +GHO2               =       GHH4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5014} G2H400A +GNO3               =       G1H400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5015} G2H400A +MEPERO             =  0.480G1H400A + 0.260GHO4009 + 0.260GHD4009                 : ARR( 0.164E-12,  -795., 0.0);
+{  5016} G2H400A +PERO1              =  0.600G1H400A + 0.200GHO4009 + 0.200GHD4009                 : ARR( 0.126E-12,  -850., 0.0);
+{  5017} G2H400A +PERO2              =  0.560G1H400A + 0.220GHO4009 + 0.220GHD4009                 : ARR( 0.471E-13, -1350., 0.0);
+{  5018} G2H400A +PERO3              =  0.600G1H400A + 0.200GHO4009 + 0.200GHD4009                 : ARR( 0.142E-12, -1200., 0.0);
+{  5019} G2H400A +PERO5              =  0.600G1H400A + 0.200GHO4009 + 0.200GHD4009                 : ARR( 0.533E-11,   500., 0.0);
+{  5020} G2H400A +PERO6              =  0.460G1H400A + 0.270GHO4009 + 0.270GHD4009                 : ARR( 0.488E-13, -1250., 0.0);
+{  5021} G2H400A +PERO9              =  0.800G1H400A + 0.200GHD4009                                : ARR( 0.100E-10,     0., 0.0);
+{  5022} G1H400A                     =       GHD400A +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5023} G1H400A                     =       GHD3003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  5024} GDO5005 +GHO                =       GDK500H +      GHO2                                   : ARR( 0.855E-11,     0., 0.0);
+{  5025} GDO5005 +GHO                =       GDK5003 +      GHO2                                   : ARR( 0.334E-10,     0., 0.0);
+{  5026} GDO5005 +GHO                =       G3K5008                                               : ARR( 0.212E-10,     0., 0.0);
+{  5027} GDO5005 +GNO3               =       G3K5008 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5028} GDO5005+HV               =       G2O4008 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  5029} GDO5005+HV               =       GKO3000 +      GD02000                                :  0.100E+01*SUN;
+{  5030} G3K5008 +GHO2               =  0.800GGO5006 + 0.200GAO5006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  5031} G3K5008 +GNO                =       G2O4008 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  5032} G3K5008 +GNO2               =       GPO5006                                               : ARR( 0.330E-08,     0.,-1.0);
+{  5033} G3K5008 +GNO3               =       G2O4008 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  5034} G3K5008 +MEPERO             =  0.685G2O4008 + 0.315GAO5006 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5035} G3K5008 +PERO1              =  0.800G2O4008 + 0.200GAO5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5036} G3K5008 +PERO2              =  0.750G2O4008 + 0.250GAO5006 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5037} G3K5008 +PERO3              =  0.800G2O4008 + 0.200GAO5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5038} G3K5008 +PERO5              =  0.650G2O4008 + 0.350GAO5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5039} G3K5008 +PERO6              =  0.650G2O4008 + 0.350GAO5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5040} G3K5008 +PERO9              =       G2O4008 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  5041} G2O4008 +GNO                =       G1O4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5042} G2O4008 +GNO                =       GNO400A                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5043} G2O4008 +GHO2               =       GHO400A                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5044} G2O4008 +GNO3               =       G1O4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5045} G2O4008 +MEPERO             =  0.480G1O4008 + 0.260GOO4004 + 0.260GDO4005                 : ARR( 0.164E-12,  -795., 0.0);
+{  5046} G2O4008 +PERO1              =  0.600G1O4008 + 0.200GOO4004 + 0.200GDO4005                 : ARR( 0.126E-12,  -850., 0.0);
+{  5047} G2O4008 +PERO2              =  0.560G1O4008 + 0.220GOO4004 + 0.220GDO4005                 : ARR( 0.471E-13, -1350., 0.0);
+{  5048} G2O4008 +PERO3              =  0.600G1O4008 + 0.200GOO4004 + 0.200GDO4005                 : ARR( 0.142E-12, -1200., 0.0);
+{  5049} G2O4008 +PERO5              =  0.600G1O4008 + 0.200GOO4004 + 0.200GDO4005                 : ARR( 0.533E-11,   500., 0.0);
+{  5050} G2O4008 +PERO6              =  0.460G1O4008 + 0.270GOO4004 + 0.270GDO4005                 : ARR( 0.488E-13, -1250., 0.0);
+{  5051} G2O4008 +PERO9              =  0.800G1O4008 + 0.200GDO4005                                : ARR( 0.100E-10,     0., 0.0);
+{  5052} G1O4008                     =       GDO3001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  5053} GDK5003 +GHO                =       GDK500D +      GHO2                                   : ARR( 0.519E-11,     0., 0.0);
+{  5054} GDK5003 +GHO                =       G3K5009                                               : ARR( 0.670E-10,     0., 0.0);
+{  5055} GDK5003 +GNO3               =       G3K5009 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5056} GDK5003+HV               =       G3K3002 +      G2D2000                                :  0.100E+01*SUN;
+{  5057} GDK5003+HV               =       G2K4002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  5058} G3K5009 +GHO2               =  0.800GGK5003 + 0.200GAK5003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  5059} G3K5009 +GNO                =       G2K4002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  5060} G3K5009 +GNO2               =       GPK5003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  5061} G3K5009 +GNO3               =       G2K4002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  5062} G3K5009 +MEPERO             =  0.685G2K4002 + 0.315GAK5003 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5063} G3K5009 +PERO1              =  0.800G2K4002 + 0.200GAK5003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5064} G3K5009 +PERO2              =  0.750G2K4002 + 0.250GAK5003 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5065} G3K5009 +PERO3              =  0.800G2K4002 + 0.200GAK5003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5066} G3K5009 +PERO5              =  0.650G2K4002 + 0.350GAK5003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5067} G3K5009 +PERO6              =  0.650G2K4002 + 0.350GAK5003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5068} G3K5009 +PERO9              =       G2K4002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  5069} G2K4002 +GNO                =       G1K4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5070} G2K4002 +GNO                =       GNK4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5071} G2K4002 +GHO2               =       GHK4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5072} G2K4002 +GNO3               =       G1K4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5073} G2K4002 +MEPERO             =  0.480G1K4002 + 0.260GKO4003 + 0.260GDK4004                 : ARR( 0.164E-12,  -795., 0.0);
+{  5074} G2K4002 +PERO1              =  0.600G1K4002 + 0.200GKO4003 + 0.200GDK4004                 : ARR( 0.126E-12,  -850., 0.0);
+{  5075} G2K4002 +PERO2              =  0.560G1K4002 + 0.220GKO4003 + 0.220GDK4004                 : ARR( 0.471E-13, -1350., 0.0);
+{  5076} G2K4002 +PERO3              =  0.600G1K4002 + 0.200GKO4003 + 0.200GDK4004                 : ARR( 0.142E-12, -1200., 0.0);
+{  5077} G2K4002 +PERO5              =  0.600G1K4002 + 0.200GKO4003 + 0.200GDK4004                 : ARR( 0.533E-11,   500., 0.0);
+{  5078} G2K4002 +PERO6              =  0.460G1K4002 + 0.270GKO4003 + 0.270GDK4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  5079} G2K4002 +PERO9              =  0.800G1K4002 + 0.200GDK4004                                : ARR( 0.100E-10,     0., 0.0);
+{  5080} G1K4002                     =       G3K3002 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{  5081} GGO5000 +GHO                =       GGK5001 +      GHO2                                   : ARR( 0.856E-11,     0., 0.0);
+{  5082} GGO5000 +GHO                =       G2G5003                                               : ARR( 0.144E-11,     0., 0.0);
+{  5083} GGO5000 +GHO                =       G2G5004                                               : ARR( 0.880E-12,     0., 0.0);
+{  5084} GGO5000 +GHO                =       G3K5001                                               : ARR( 0.194E-11,  -190., 0.0);
+{  5085} GGO5000+HV               =       G2O4001 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  5086} G2G5003 +GNO                =       G1G5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5087} G2G5003 +GNO                =       GGN5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5088} G2G5003 +GHO2               =       GGH5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5089} G2G5003 +GNO3               =       G1G5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5090} G2G5003 +MEPERO             =  0.340G1G5003 + 0.330GGO5006 + 0.330GGK5003                 : ARR( 0.565E-13,  -845., 0.0);
+{  5091} G2G5003 +PERO1              =  0.460G1G5003 + 0.270GGO5006 + 0.270GGK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{  5092} G2G5003 +PERO2              =  0.400G1G5003 + 0.300GGO5006 + 0.300GGK5003                 : ARR( 0.162E-13, -1400., 0.0);
+{  5093} G2G5003 +PERO3              =  0.460G1G5003 + 0.270GGO5006 + 0.270GGK5003                 : ARR( 0.488E-13, -1250., 0.0);
+{  5094} G2G5003 +PERO5              =  0.460G1G5003 + 0.270GGO5006 + 0.270GGK5003                 : ARR( 0.183E-11,   450., 0.0);
+{  5095} G2G5003 +PERO6              =  0.300G1G5003 + 0.350GGO5006 + 0.350GGK5003                 : ARR( 0.168E-13, -1300., 0.0);
+{  5096} G2G5003 +PERO9              =  0.650G1G5003 + 0.350GGK5003                                : ARR( 0.100E-10,     0., 0.0);
+{  5097} G2G5004 +GNO                =       G1G5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5098} G2G5004 +GNO                =       GGN5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5099} G2G5004 +GHO2               =       GGH5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5100} G2G5004 +GNO3               =       G1G5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5101} G2G5004 +MEPERO             =  0.340G1G5004 + 0.330GGO5004 + 0.330GGK5004                 : ARR( 0.565E-13,  -845., 0.0);
+{  5102} G2G5004 +PERO1              =  0.460G1G5004 + 0.270GGO5004 + 0.270GGK5004                 : ARR( 0.434E-13,  -900., 0.0);
+{  5103} G2G5004 +PERO2              =  0.400G1G5004 + 0.300GGO5004 + 0.300GGK5004                 : ARR( 0.162E-13, -1400., 0.0);
+{  5104} G2G5004 +PERO3              =  0.460G1G5004 + 0.270GGO5004 + 0.270GGK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  5105} G2G5004 +PERO5              =  0.460G1G5004 + 0.270GGO5004 + 0.270GGK5004                 : ARR( 0.183E-11,   450., 0.0);
+{  5106} G2G5004 +PERO6              =  0.300G1G5004 + 0.350GGO5004 + 0.350GGK5004                 : ARR( 0.168E-13, -1300., 0.0);
+{  5107} G2G5004 +PERO9              =  0.650G1G5004 + 0.350GGK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  5108} G1G5003                     =       GD02000 +      GGD3000 +      GHO2                    : ARR( 0.200E+15,  3325., 0.0);
+{  5109} G1G5004                     =       GDO4001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  5110} GAO5000 +GHO                =       GAK5001 +      GHO2                                   : ARR( 0.904E-11,     0., 0.0);
+{  5111} GAO5000 +GHO                =       G2A5003                                               : ARR( 0.153E-11,     0., 0.0);
+{  5112} GAO5000 +GHO                =       G2A5004                                               : ARR( 0.688E-12,     0., 0.0);
+{  5113} G2A5003 +GNO                =       G1A5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5114} G2A5003 +GNO                =       GAN5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5115} G2A5003 +GHO2               =       GAH5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5116} G2A5003 +GNO3               =       G1A5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5117} G2A5003 +MEPERO             =  0.340G1A5003 + 0.330GAO5006 + 0.330GAK5003                 : ARR( 0.565E-13,  -845., 0.0);
+{  5118} G2A5003 +PERO1              =  0.460G1A5003 + 0.270GAO5006 + 0.270GAK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{  5119} G2A5003 +PERO2              =  0.400G1A5003 + 0.300GAO5006 + 0.300GAK5003                 : ARR( 0.162E-13, -1400., 0.0);
+{  5120} G2A5003 +PERO3              =  0.460G1A5003 + 0.270GAO5006 + 0.270GAK5003                 : ARR( 0.488E-13, -1250., 0.0);
+{  5121} G2A5003 +PERO5              =  0.460G1A5003 + 0.270GAO5006 + 0.270GAK5003                 : ARR( 0.183E-11,   450., 0.0);
+{  5122} G2A5003 +PERO6              =  0.300G1A5003 + 0.350GAO5006 + 0.350GAK5003                 : ARR( 0.168E-13, -1300., 0.0);
+{  5123} G2A5003 +PERO9              =  0.650G1A5003 + 0.350GAK5003                                : ARR( 0.100E-10,     0., 0.0);
+{  5124} G2A5004 +GNO                =       G1A5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5125} G2A5004 +GNO                =       GAN5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5126} G2A5004 +GHO2               =       GAH5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5127} G2A5004 +GNO3               =       G1A5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5128} G2A5004 +MEPERO             =  0.340G1A5004 + 0.330GAO5004 + 0.330GAK5004                 : ARR( 0.565E-13,  -845., 0.0);
+{  5129} G2A5004 +PERO1              =  0.460G1A5004 + 0.270GAO5004 + 0.270GAK5004                 : ARR( 0.434E-13,  -900., 0.0);
+{  5130} G2A5004 +PERO2              =  0.400G1A5004 + 0.300GAO5004 + 0.300GAK5004                 : ARR( 0.162E-13, -1400., 0.0);
+{  5131} G2A5004 +PERO3              =  0.460G1A5004 + 0.270GAO5004 + 0.270GAK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  5132} G2A5004 +PERO5              =  0.460G1A5004 + 0.270GAO5004 + 0.270GAK5004                 : ARR( 0.183E-11,   450., 0.0);
+{  5133} G2A5004 +PERO6              =  0.300G1A5004 + 0.350GAO5004 + 0.350GAK5004                 : ARR( 0.168E-13, -1300., 0.0);
+{  5134} G2A5004 +PERO9              =  0.650G1A5004 + 0.350GAK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  5135} G1A5003                     =       GD02000 +      GAD3000 +      GHO2                    : ARR( 0.200E+15,  3325., 0.0);
+{  5136} G1A5004                     =       GDO4001 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  5137} GPO5000                     =       G3K5001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  5138} GPO5000 +GHO                =       GPK5001 +      GHO2                                   : ARR( 0.862E-11,     0., 0.0);
+{  5139} GPO5000 +GHO                =       G2P5003                                               : ARR( 0.145E-11,     0., 0.0);
+{  5140} GPO5000 +GHO                =       G2P5004                                               : ARR( 0.887E-12,     0., 0.0);
+{  5141} GPO5000+HV               =       G3K5001 +      GNO2                                   :  0.100E+01*SUN;
+{  5142} G2P5003 +GNO                =       G1P5003 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5143} G2P5003 +GNO                =       GPN5006                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5144} G2P5003 +GHO2               =       GPH5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5145} G2P5003 +GNO3               =       G1P5003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5146} G2P5003 +MEPERO             =  0.340G1P5003 + 0.330GPO5006 + 0.330GPK5003                 : ARR( 0.565E-13,  -845., 0.0);
+{  5147} G2P5003 +PERO1              =  0.460G1P5003 + 0.270GPO5006 + 0.270GPK5003                 : ARR( 0.434E-13,  -900., 0.0);
+{  5148} G2P5003 +PERO2              =  0.400G1P5003 + 0.300GPO5006 + 0.300GPK5003                 : ARR( 0.162E-13, -1400., 0.0);
+{  5149} G2P5003 +PERO3              =  0.460G1P5003 + 0.270GPO5006 + 0.270GPK5003                 : ARR( 0.488E-13, -1250., 0.0);
+{  5150} G2P5003 +PERO5              =  0.460G1P5003 + 0.270GPO5006 + 0.270GPK5003                 : ARR( 0.183E-11,   450., 0.0);
+{  5151} G2P5003 +PERO6              =  0.300G1P5003 + 0.350GPO5006 + 0.350GPK5003                 : ARR( 0.168E-13, -1300., 0.0);
+{  5152} G2P5003 +PERO9              =  0.650G1P5003 + 0.350GPK5003                                : ARR( 0.100E-10,     0., 0.0);
+{  5153} G2P5004 +GNO                =       G1P5004 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5154} G2P5004 +GNO                =       GPN5005                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5155} G2P5004 +GHO2               =       GPH5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5156} G2P5004 +GNO3               =       G1P5004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5157} G2P5004 +MEPERO             =  0.340G1P5004 + 0.330GPO5004 + 0.330GPK5004                 : ARR( 0.565E-13,  -845., 0.0);
+{  5158} G2P5004 +PERO1              =  0.460G1P5004 + 0.270GPO5004 + 0.270GPK5004                 : ARR( 0.434E-13,  -900., 0.0);
+{  5159} G2P5004 +PERO2              =  0.400G1P5004 + 0.300GPO5004 + 0.300GPK5004                 : ARR( 0.162E-13, -1400., 0.0);
+{  5160} G2P5004 +PERO3              =  0.460G1P5004 + 0.270GPO5004 + 0.270GPK5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  5161} G2P5004 +PERO5              =  0.460G1P5004 + 0.270GPO5004 + 0.270GPK5004                 : ARR( 0.183E-11,   450., 0.0);
+{  5162} G2P5004 +PERO6              =  0.300G1P5004 + 0.350GPO5004 + 0.350GPK5004                 : ARR( 0.168E-13, -1300., 0.0);
+{  5163} G2P5004 +PERO9              =  0.650G1P5004 + 0.350GPK5004                                : ARR( 0.100E-10,     0., 0.0);
+{  5164} G1P5003                     =       GD02000 +      GPD3000 +      GHO2                    : ARR( 0.200E+15,  3325., 0.0);
+{  5165} G1P5004                     =       GDO4001 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  5166} GNO4001 +GHO                =       GNK4001 +      GHO2                                   : ARR( 0.901E-11,     0., 0.0);
+{  5167} GNO4001+HV               =       G1O4001 +      GNO2                                   :  0.100E+01*SUN;
+{  5168} GHO4001 +GHO                =       GHK4001 +      GHO2                                   : ARR( 0.889E-11,     0., 0.0);
+{  5169} GHO4001 +GHO                =       GDO4001 +      GHO                                    : ARR( 0.171E-10,     0., 0.0);
+{  5170} GHO4001 +GHO                =       G2O4001                                               : ARR( 0.202E-11,  -190., 0.0);
+{  5171} GHO4001+HV               =       G1O4001 +      GHO                                    :  0.100E+01*SUN;
+{  5172} GOO4001 +GHO                =       GKO4001 +      GHO2                                   : ARR( 0.865E-11,     0., 0.0);
+{  5173} GOO4001 +GHO                =       G2O4009                                               : ARR( 0.146E-11,     0., 0.0);
+{  5174} GOO4001 +GHO                =       GDO4001 +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{  5175} G2O4009 +GNO                =       G1O4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5176} G2O4009 +GNO                =       GNO4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5177} G2O4009 +GHO2               =       GHO4008                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5178} G2O4009 +GNO3               =       G1O4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5179} G2O4009 +MEPERO             =  0.340G1O4009 + 0.330GOO4004 + 0.330GKO4003                 : ARR( 0.565E-13,  -845., 0.0);
+{  5180} G2O4009 +PERO1              =  0.460G1O4009 + 0.270GOO4004 + 0.270GKO4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  5181} G2O4009 +PERO2              =  0.400G1O4009 + 0.300GOO4004 + 0.300GKO4003                 : ARR( 0.162E-13, -1400., 0.0);
+{  5182} G2O4009 +PERO3              =  0.460G1O4009 + 0.270GOO4004 + 0.270GKO4003                 : ARR( 0.488E-13, -1250., 0.0);
+{  5183} G2O4009 +PERO5              =  0.460G1O4009 + 0.270GOO4004 + 0.270GKO4003                 : ARR( 0.183E-11,   450., 0.0);
+{  5184} G2O4009 +PERO6              =  0.300G1O4009 + 0.350GOO4004 + 0.350GKO4003                 : ARR( 0.168E-13, -1300., 0.0);
+{  5185} G2O4009 +PERO9              =  0.650G1O4009 + 0.350GKO4003                                : ARR( 0.100E-10,     0., 0.0);
+{  5186} G1O4009                     =       GD02000 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  4022., 0.0);
+{  5187} GNO4002 +GHO                =       GND4003 +      GHO2                                   : ARR( 0.420E-11,     0., 0.0);
+{  5188} GNO4002 +GHO                =       G2N400B                                               : ARR( 0.147E-11,     0., 0.0);
+{  5189} GNO4002 +GHO                =       GNK4004 +      GHO2                                   : ARR( 0.215E-11,     0., 0.0);
+{  5190} GNO4002+HV               =       G1O4002 +      GNO2                                   :  0.100E+01*SUN;
+{  5191} G2N400B +GNO                =       G1N400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5192} G2N400B +GNO                =       GNN400A                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5193} G2N400B +GHO2               =       GHN400F                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5194} G2N400B +GNO3               =       G1N400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5195} G2N400B +MEPERO             =  0.340G1N400B + 0.330GNO400B + 0.330GNK4005                 : ARR( 0.565E-13,  -845., 0.0);
+{  5196} G2N400B +PERO1              =  0.460G1N400B + 0.270GNO400B + 0.270GNK4005                 : ARR( 0.434E-13,  -900., 0.0);
+{  5197} G2N400B +PERO2              =  0.400G1N400B + 0.300GNO400B + 0.300GNK4005                 : ARR( 0.162E-13, -1400., 0.0);
+{  5198} G2N400B +PERO3              =  0.460G1N400B + 0.270GNO400B + 0.270GNK4005                 : ARR( 0.488E-13, -1250., 0.0);
+{  5199} G2N400B +PERO5              =  0.460G1N400B + 0.270GNO400B + 0.270GNK4005                 : ARR( 0.183E-11,   450., 0.0);
+{  5200} G2N400B +PERO6              =  0.300G1N400B + 0.350GNO400B + 0.350GNK4005                 : ARR( 0.168E-13, -1300., 0.0);
+{  5201} G2N400B +PERO9              =  0.650G1N400B + 0.350GNK4005                                : ARR( 0.100E-10,     0., 0.0);
+{  5202} G1N400B                     =       GDO2000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3635., 0.0);
+{  5203} GHO4002 +GHO                =       GHD4003 +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{  5204} GHO4002 +GHO                =       GHK4003 +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{  5205} GHO4002 +GHO                =       GDO4003 +      GHO                                    : ARR( 0.169E-10,     0., 0.0);
+{  5206} GHO4002 +GHO                =       G2O4002                                               : ARR( 0.199E-11,  -190., 0.0);
+{  5207} GHO4002+HV               =       G1O4002 +      GHO                                    :  0.100E+01*SUN;
+{  5208} GOO4002 +GHO                =       GDO4002 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{  5209} GOO4002 +GHO                =       G2O400A                                               : ARR( 0.144E-11,     0., 0.0);
+{  5210} GOO4002 +GHO                =       GKO4002 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{  5211} GOO4002 +GHO                =       GDO4003 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{  5212} G2O400A +GNO                =       G1O400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5213} G2O400A +GNO                =       GNO4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5214} G2O400A +GHO2               =       GHO4009                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5215} G2O400A +GNO3               =       G1O400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5216} G2O400A +MEPERO             =  0.340G1O400A + 0.330GOO4005 + 0.330GKO4004                 : ARR( 0.565E-13,  -845., 0.0);
+{  5217} G2O400A +PERO1              =  0.460G1O400A + 0.270GOO4005 + 0.270GKO4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  5218} G2O400A +PERO2              =  0.400G1O400A + 0.300GOO4005 + 0.300GKO4004                 : ARR( 0.162E-13, -1400., 0.0);
+{  5219} G2O400A +PERO3              =  0.460G1O400A + 0.270GOO4005 + 0.270GKO4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  5220} G2O400A +PERO5              =  0.460G1O400A + 0.270GOO4005 + 0.270GKO4004                 : ARR( 0.183E-11,   450., 0.0);
+{  5221} G2O400A +PERO6              =  0.300G1O400A + 0.350GOO4005 + 0.350GKO4004                 : ARR( 0.168E-13, -1300., 0.0);
+{  5222} G2O400A +PERO9              =  0.650G1O400A + 0.350GKO4004                                : ARR( 0.100E-10,     0., 0.0);
+{  5223} G1O400A                     =  2.000GDO2000 +      GHO2                                   : ARR( 0.200E+15,  3635., 0.0);
+{  5224} GDO4003 +GHO                =       GDD4001 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{  5225} GDO4003 +GHO                =       G2D4002                                               : ARR( 0.452E-11,     0., 0.0);
+{  5226} GDO4003 +GHO                =       GDK4005 +      GHO2                                   : ARR( 0.633E-11,     0., 0.0);
+{  5227} GDO4003 +GHO                =       G3K4006                                               : ARR( 0.209E-10,     0., 0.0);
+{  5228} GDO4003 +GNO3               =       G3K4006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5229} GDO4003+HV               =       GDO3000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  5230} G2D4002 +GNO                =       G1D4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5231} G2D4002 +GNO                =       GND4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5232} G2D4002 +GHO2               =       GHD4009                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5233} G2D4002 +GNO3               =       G1D4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5234} G2D4002 +MEPERO             =  0.340G1D4002 + 0.330GDO4006 + 0.330GDK4006                 : ARR( 0.565E-13,  -845., 0.0);
+{  5235} G2D4002 +PERO1              =  0.460G1D4002 + 0.270GDO4006 + 0.270GDK4006                 : ARR( 0.434E-13,  -900., 0.0);
+{  5236} G2D4002 +PERO2              =  0.400G1D4002 + 0.300GDO4006 + 0.300GDK4006                 : ARR( 0.162E-13, -1400., 0.0);
+{  5237} G2D4002 +PERO3              =  0.460G1D4002 + 0.270GDO4006 + 0.270GDK4006                 : ARR( 0.488E-13, -1250., 0.0);
+{  5238} G2D4002 +PERO5              =  0.460G1D4002 + 0.270GDO4006 + 0.270GDK4006                 : ARR( 0.183E-11,   450., 0.0);
+{  5239} G2D4002 +PERO6              =  0.300G1D4002 + 0.350GDO4006 + 0.350GDK4006                 : ARR( 0.168E-13, -1300., 0.0);
+{  5240} G2D4002 +PERO9              =  0.650G1D4002 + 0.350GDK4006                                : ARR( 0.100E-10,     0., 0.0);
+{  5241} G3K4006 +GHO2               =  0.800GGO4005 + 0.200GAO4005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  5242} G3K4006 +GNO                =       GDO3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  5243} G3K4006 +GNO2               =       GPO4005                                               : ARR( 0.330E-08,     0.,-1.0);
+{  5244} G3K4006 +GNO3               =       GDO3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  5245} G3K4006 +MEPERO             =  0.685GDO3000 + 0.315GAO4005 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  5246} G3K4006 +PERO1              =  0.800GDO3000 + 0.200GAO4005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  5247} G3K4006 +PERO2              =  0.750GDO3000 + 0.250GAO4005 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  5248} G3K4006 +PERO3              =  0.800GDO3000 + 0.200GAO4005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  5249} G3K4006 +PERO5              =  0.650GDO3000 + 0.350GAO4005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  5250} G3K4006 +PERO6              =  0.650GDO3000 + 0.350GAO4005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  5251} G3K4006 +PERO9              =       GDO3000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  5252} G1D4002                     =       GCH2O   +      GDD3001 +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  5253} G1D4002                     =       GDO2000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3768., 0.0);
+{  5254} GHN3002 +GHO                =       GNK3000 +      GHO                                    : ARR( 0.684E-11,     0., 0.0);
+{  5255} GHN3002 +GHO                =       G2N3002                                               : ARR( 0.194E-11,  -190., 0.0);
+{  5256} GHN3002+HV               =       G1N3002 +      GHO                                    :  0.100E+01*SUN;
+{  5257} GHN3002+HV               =       G1H3004 +      GNO2                                   :  0.100E+01*SUN;
+{  5258} GHH3000 +GHO                =       GHK3000 +      GHO                                    : ARR( 0.336E-10,     0., 0.0);
+{  5259} GHH3000 +GHO                =       GHD3002 +      GHO                                    : ARR( 0.161E-10,     0., 0.0);
+{  5260} GHH3000 +GHO                =       G2H3000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  5261} GHH3000 +GHO                =       G2H3003                                               : ARR( 0.191E-11,  -190., 0.0);
+{  5262} GHH3000+HV               =       G1H3000 +      GHO                                    :  0.100E+01*SUN;
+{  5263} GHH3000+HV               =       G1H3004 +      GHO                                    :  0.100E+01*SUN;
+{  5264} GHO3002 +GHO                =       GKO3000 +      GHO                                    : ARR( 0.338E-10,     0., 0.0);
+{  5265} GHO3002 +GHO                =       GHD3002 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{  5266} GHO3002 +GHO                =       G2O3002                                               : ARR( 0.191E-11,  -190., 0.0);
+{  5267} GHO3002+HV               =       G1O3002 +      GHO                                    :  0.100E+01*SUN;
+{  5268} GNN500C +GHO                =       GNN500h +      GNO2                                   : ARR( 0.484E-13,     0., 0.0);
+{  5269} GNN500C +GHO                =       G2N501X                                               : ARR( 0.298E-12,     0., 0.0);
+{  5270} GNN500C +GHO                =       G2N501Y                                               : ARR( 0.298E-12,     0., 0.0);
+{  5271} GNN500C+HV               =       G1N500d +      GNO2                                   :  0.100E+01*SUN;
+{  5272} GNN500C+HV               =       G1N500G +      GNO2                                   :  0.100E+01*SUN;
+{  5273} GNN500C+HV               =       G1N501a +      GNO2                                   :  0.100E+01*SUN;
+{  5274} G2N501X +GNO                =       G1N501b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5275} G2N501X +GNO                =       GNN501C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5276} G2N501X +GHO2               =       GHN501u                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5277} G2N501X +GNO3               =       G1N501b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5278} G2N501X +MEPERO             =  0.340G1N501b + 0.330GNN500Q + 0.330GNN501D                 : ARR( 0.565E-13,  -845., 0.0);
+{  5279} G2N501X +PERO1              =  0.460G1N501b + 0.270GNN500Q + 0.270GNN501D                 : ARR( 0.434E-13,  -900., 0.0);
+{  5280} G2N501X +PERO2              =  0.400G1N501b + 0.300GNN500Q + 0.300GNN501D                 : ARR( 0.162E-13, -1400., 0.0);
+{  5281} G2N501X +PERO3              =  0.460G1N501b + 0.270GNN500Q + 0.270GNN501D                 : ARR( 0.488E-13, -1250., 0.0);
+{  5282} G2N501X +PERO5              =  0.460G1N501b + 0.270GNN500Q + 0.270GNN501D                 : ARR( 0.183E-11,   450., 0.0);
+{  5283} G2N501X +PERO6              =  0.300G1N501b + 0.350GNN500Q + 0.350GNN501D                 : ARR( 0.168E-13, -1300., 0.0);
+{  5284} G2N501X +PERO9              =  0.650G1N501b + 0.350GNN501D                                : ARR( 0.100E-10,     0., 0.0);
+{  5285} G2N501Y +GNO                =       G1N501c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5286} G2N501Y +GNO                =       GNN501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5287} G2N501Y +GHO2               =       GHN501v                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5288} G2N501Y +GNO3               =       G1N501c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5289} G2N501Y +MEPERO             =  0.340G1N501c + 0.330GNN501F + 0.330GNN501G                 : ARR( 0.565E-13,  -845., 0.0);
+{  5290} G2N501Y +PERO1              =  0.460G1N501c + 0.270GNN501F + 0.270GNN501G                 : ARR( 0.434E-13,  -900., 0.0);
+{  5291} G2N501Y +PERO2              =  0.400G1N501c + 0.300GNN501F + 0.300GNN501G                 : ARR( 0.162E-13, -1400., 0.0);
+{  5292} G2N501Y +PERO3              =  0.460G1N501c + 0.270GNN501F + 0.270GNN501G                 : ARR( 0.488E-13, -1250., 0.0);
+{  5293} G2N501Y +PERO5              =  0.460G1N501c + 0.270GNN501F + 0.270GNN501G                 : ARR( 0.183E-11,   450., 0.0);
+{  5294} G2N501Y +PERO6              =  0.300G1N501c + 0.350GNN501F + 0.350GNN501G                 : ARR( 0.168E-13, -1300., 0.0);
+{  5295} G2N501Y +PERO9              =  0.650G1N501c + 0.350GNN501G                                : ARR( 0.100E-10,     0., 0.0);
+{  5296} G1N501a +OXYGEN             =       GNN501H +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  5297} G1N501a                     =       G2N501Z                                               : ARR( 0.160E+12,  3719., 0.0);
+{  5298} G1N501b                     =       GNN500S +      GNO2                                   : ARR( 0.160E+12,  5251., 0.0);
+{  5299} G1N501b                     =       G2N3004 +      GND2000                                : ARR( 0.200E+15,  6983., 0.0);
+{  5300} G1N501c                     =       GND2000 +      GND3000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{  5301} G1N501c                     =       GNN3005 +      G2N2000                                : ARR( 0.200E+15,  7074., 0.0);
+{  5302} G2N501Z +GNO                =       G1N501d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5303} G2N501Z +GNO                =       GNN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5304} G2N501Z +GHO2               =       GHN500v                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5305} G2N501Z +GNO3               =       G1N501d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5306} G2N501Z +MEPERO             =  0.340G1N501d + 0.330GNN500R + 0.330GNN500T                 : ARR( 0.565E-13,  -845., 0.0);
+{  5307} G2N501Z +PERO1              =  0.460G1N501d + 0.270GNN500R + 0.270GNN500T                 : ARR( 0.434E-13,  -900., 0.0);
+{  5308} G2N501Z +PERO2              =  0.400G1N501d + 0.300GNN500R + 0.300GNN500T                 : ARR( 0.162E-13, -1400., 0.0);
+{  5309} G2N501Z +PERO3              =  0.460G1N501d + 0.270GNN500R + 0.270GNN500T                 : ARR( 0.488E-13, -1250., 0.0);
+{  5310} G2N501Z +PERO5              =  0.460G1N501d + 0.270GNN500R + 0.270GNN500T                 : ARR( 0.183E-11,   450., 0.0);
+{  5311} G2N501Z +PERO6              =  0.300G1N501d + 0.350GNN500R + 0.350GNN500T                 : ARR( 0.168E-13, -1300., 0.0);
+{  5312} G2N501Z +PERO9              =  0.650G1N501d + 0.350GNN500T                                : ARR( 0.100E-10,     0., 0.0);
+{  5313} G1N501d                     =       GNN500S +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  5314} GHN500I +GHO                =       G2H500X                                               : ARR( 0.145E-11,     0., 0.0);
+{  5315} GHN500I +GHO                =       GNN500D +      GHO                                    : ARR( 0.848E-11,     0., 0.0);
+{  5316} GHN500I +GHO                =       G2N500G                                               : ARR( 0.195E-11,  -190., 0.0);
+{  5317} GHN500I+HV               =       G1H500i +      GNO2                                   :  0.100E+01*SUN;
+{  5318} GHN500I+HV               =       G1N500G +      GHO                                    :  0.100E+01*SUN;
+{  5319} GHN500I+HV               =       G1H500j +      GNO2                                   :  0.100E+01*SUN;
+{  5320} G2H500X +GNO                =       G1H500k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5321} G2H500X +GNO                =       GHN501w                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5322} G2H500X +GHO2               =       GHH500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5323} G2H500X +GNO3               =       G1H500k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5324} G2H500X +MEPERO             =  0.340G1H500k + 0.330GHN501x + 0.330GHN501y                 : ARR( 0.565E-13,  -845., 0.0);
+{  5325} G2H500X +PERO1              =  0.460G1H500k + 0.270GHN501x + 0.270GHN501y                 : ARR( 0.434E-13,  -900., 0.0);
+{  5326} G2H500X +PERO2              =  0.400G1H500k + 0.300GHN501x + 0.300GHN501y                 : ARR( 0.162E-13, -1400., 0.0);
+{  5327} G2H500X +PERO3              =  0.460G1H500k + 0.270GHN501x + 0.270GHN501y                 : ARR( 0.488E-13, -1250., 0.0);
+{  5328} G2H500X +PERO5              =  0.460G1H500k + 0.270GHN501x + 0.270GHN501y                 : ARR( 0.183E-11,   450., 0.0);
+{  5329} G2H500X +PERO6              =  0.300G1H500k + 0.350GHN501x + 0.350GHN501y                 : ARR( 0.168E-13, -1300., 0.0);
+{  5330} G2H500X +PERO9              =  0.650G1H500k + 0.350GHN501y                                : ARR( 0.100E-10,     0., 0.0);
+{  5331} G1H500i                     =       GNK5003 +      GHO                                    : ARR( 0.800E+11,  2398., 0.0);
+{  5332} G1H500j +OXYGEN             =       GHN501z +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  5333} G1H500j                     =       G2H500Y                                               : ARR( 0.160E+12,  3719., 0.0);
+{  5334} G1H500j                     =       GND4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  5335} G1H500k                     =       GND2000 +      GND3000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{  5336} G2H500Y +GNO                =       G1H500l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5337} G2H500Y +GNO                =       GHN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5338} G2H500Y +GHO2               =       GHH500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5339} G2H500Y +GNO3               =       G1H500l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5340} G2H500Y +MEPERO             =  0.340G1H500l + 0.330GHN5011 + 0.330GHN5013                 : ARR( 0.565E-13,  -845., 0.0);
+{  5341} G2H500Y +PERO1              =  0.460G1H500l + 0.270GHN5011 + 0.270GHN5013                 : ARR( 0.434E-13,  -900., 0.0);
+{  5342} G2H500Y +PERO2              =  0.400G1H500l + 0.300GHN5011 + 0.300GHN5013                 : ARR( 0.162E-13, -1400., 0.0);
+{  5343} G2H500Y +PERO3              =  0.460G1H500l + 0.270GHN5011 + 0.270GHN5013                 : ARR( 0.488E-13, -1250., 0.0);
+{  5344} G2H500Y +PERO5              =  0.460G1H500l + 0.270GHN5011 + 0.270GHN5013                 : ARR( 0.183E-11,   450., 0.0);
+{  5345} G2H500Y +PERO6              =  0.300G1H500l + 0.350GHN5011 + 0.350GHN5013                 : ARR( 0.168E-13, -1300., 0.0);
+{  5346} G2H500Y +PERO9              =  0.650G1H500l + 0.350GHN5013                                : ARR( 0.100E-10,     0., 0.0);
+{  5347} G1H500l                     =       GHN5021 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5348} GNN500D +GHO                =       G2N501a                                               : ARR( 0.934E-12,     0., 0.0);
+{  5349} GNN500D +GHO                =       G2N501b                                               : ARR( 0.898E-12,     0., 0.0);
+{  5350} GNN500D+HV               =       G1N501e +      GNO2                                   :  0.100E+01*SUN;
+{  5351} GNN500D+HV               =       G3N4000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  5352} GNN500D+HV               =       G2D2000 +      GNK3000 +      GNO2                    :  0.100E+01*SUN;
+{  5353} GNN500D+HV               =       G1N500O +      GNO2                                   :  0.100E+01*SUN;
+{  5354} G2N501a +GNO                =       G1N501f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5355} G2N501a +GNO                =       GNN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5356} G2N501a +GHO2               =       GHN5022                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5357} G2N501a +GNO3               =       G1N501f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5358} G2N501a +MEPERO             =  0.340G1N501f + 0.330GNN500X + 0.330GNN501I                 : ARR( 0.565E-13,  -845., 0.0);
+{  5359} G2N501a +PERO1              =  0.460G1N501f + 0.270GNN500X + 0.270GNN501I                 : ARR( 0.434E-13,  -900., 0.0);
+{  5360} G2N501a +PERO2              =  0.400G1N501f + 0.300GNN500X + 0.300GNN501I                 : ARR( 0.162E-13, -1400., 0.0);
+{  5361} G2N501a +PERO3              =  0.460G1N501f + 0.270GNN500X + 0.270GNN501I                 : ARR( 0.488E-13, -1250., 0.0);
+{  5362} G2N501a +PERO5              =  0.460G1N501f + 0.270GNN500X + 0.270GNN501I                 : ARR( 0.183E-11,   450., 0.0);
+{  5363} G2N501a +PERO6              =  0.300G1N501f + 0.350GNN500X + 0.350GNN501I                 : ARR( 0.168E-13, -1300., 0.0);
+{  5364} G2N501a +PERO9              =  0.650G1N501f + 0.350GNN501I                                : ARR( 0.100E-10,     0., 0.0);
+{  5365} G2N501b +GNO                =       G1N501g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5366} G2N501b +GNO                =       GNN501J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5367} G2N501b +GHO2               =       GHN5023                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5368} G2N501b +GNO3               =       G1N501g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5369} G2N501b +MEPERO             =  0.340G1N501g + 0.330GNN501K + 0.330GNN501L                 : ARR( 0.565E-13,  -845., 0.0);
+{  5370} G2N501b +PERO1              =  0.460G1N501g + 0.270GNN501K + 0.270GNN501L                 : ARR( 0.434E-13,  -900., 0.0);
+{  5371} G2N501b +PERO2              =  0.400G1N501g + 0.300GNN501K + 0.300GNN501L                 : ARR( 0.162E-13, -1400., 0.0);
+{  5372} G2N501b +PERO3              =  0.460G1N501g + 0.270GNN501K + 0.270GNN501L                 : ARR( 0.488E-13, -1250., 0.0);
+{  5373} G2N501b +PERO5              =  0.460G1N501g + 0.270GNN501K + 0.270GNN501L                 : ARR( 0.183E-11,   450., 0.0);
+{  5374} G2N501b +PERO6              =  0.300G1N501g + 0.350GNN501K + 0.350GNN501L                 : ARR( 0.168E-13, -1300., 0.0);
+{  5375} G2N501b +PERO9              =  0.650G1N501g + 0.350GNN501L                                : ARR( 0.100E-10,     0., 0.0);
+{  5376} G1N501e +OXYGEN             =       GND500C +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5377} G1N501f                     =       G2N3005 +      GND2000                                : ARR( 0.200E+15,  7286., 0.0);
+{  5378} G1N501f                     =       GND4004 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  8296., 0.0);
+{  5379} G1N501g                     =       GND3000 +      G3N2000                                : ARR( 0.200E+15,  2635., 0.0);
+{  5380} GNN500E +GHO                =       GNN500J +      GNO2                                   : ARR( 0.919E-13,     0., 0.0);
+{  5381} GNN500E +GHO                =       G2N501c                                               : ARR( 0.113E-12,     0., 0.0);
+{  5382} GNN500E +GHO                =       GNN500G +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{  5383} GNN500E+HV               =       G1N500S +      GNO2                                   :  0.200E+01*SUN;
+{  5384} GNN500E+HV               =       G1N500H +      GNO2                                   :  0.100E+01*SUN;
+{  5385} G2N501c +GNO                =       G1N501h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5386} G2N501c +GNO                =       GNN501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5387} G2N501c +GHO2               =       GHN501w                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5388} G2N501c +GNO3               =       G1N501h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5389} G2N501c +MEPERO             =  0.340G1N501h + 0.330GNN500e + 0.330GNN501J                 : ARR( 0.565E-13,  -845., 0.0);
+{  5390} G2N501c +PERO1              =  0.460G1N501h + 0.270GNN500e + 0.270GNN501J                 : ARR( 0.434E-13,  -900., 0.0);
+{  5391} G2N501c +PERO2              =  0.400G1N501h + 0.300GNN500e + 0.300GNN501J                 : ARR( 0.162E-13, -1400., 0.0);
+{  5392} G2N501c +PERO3              =  0.460G1N501h + 0.270GNN500e + 0.270GNN501J                 : ARR( 0.488E-13, -1250., 0.0);
+{  5393} G2N501c +PERO5              =  0.460G1N501h + 0.270GNN500e + 0.270GNN501J                 : ARR( 0.183E-11,   450., 0.0);
+{  5394} G2N501c +PERO6              =  0.300G1N501h + 0.350GNN500e + 0.350GNN501J                 : ARR( 0.168E-13, -1300., 0.0);
+{  5395} G2N501c +PERO9              =  0.650G1N501h + 0.350GNN501J                                : ARR( 0.100E-10,     0., 0.0);
+{  5396} G1N501h                     =       GNN500f +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  5397} G1N501h                     =       GND3000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6737., 0.0);
+{  5398} GHN500J +GHO                =       GNN500G +      GHO                                    : ARR( 0.418E-10,     0., 0.0);
+{  5399} GHN500J +GHO                =       G2N500H                                               : ARR( 0.193E-11,  -190., 0.0);
+{  5400} GHN500J+HV               =       G1H500m +      GNO2                                   :  0.200E+01*SUN;
+{  5401} GHN500J+HV               =       G1N500H +      GHO                                    :  0.100E+01*SUN;
+{  5402} G1H500m +OXYGEN             =       GHN500S +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5403} G1H500m                     =       G2H500Z                                               : ARR( 0.160E+12,  3719., 0.0);
+{  5404} G2H500Z +GNO                =       G1H500n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5405} G2H500Z +GNO                =       GHN5024                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5406} G2H500Z +GHO2               =       GHH500B                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5407} G2H500Z +GNO3               =       G1H500n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5408} G2H500Z +MEPERO             =  0.340G1H500n + 0.330GHN5012 + 0.330GHN5014                 : ARR( 0.565E-13,  -845., 0.0);
+{  5409} G2H500Z +PERO1              =  0.460G1H500n + 0.270GHN5012 + 0.270GHN5014                 : ARR( 0.434E-13,  -900., 0.0);
+{  5410} G2H500Z +PERO2              =  0.400G1H500n + 0.300GHN5012 + 0.300GHN5014                 : ARR( 0.162E-13, -1400., 0.0);
+{  5411} G2H500Z +PERO3              =  0.460G1H500n + 0.270GHN5012 + 0.270GHN5014                 : ARR( 0.488E-13, -1250., 0.0);
+{  5412} G2H500Z +PERO5              =  0.460G1H500n + 0.270GHN5012 + 0.270GHN5014                 : ARR( 0.183E-11,   450., 0.0);
+{  5413} G2H500Z +PERO6              =  0.300G1H500n + 0.350GHN5012 + 0.350GHN5014                 : ARR( 0.168E-13, -1300., 0.0);
+{  5414} G2H500Z +PERO9              =  0.650G1H500n + 0.350GHN5014                                : ARR( 0.100E-10,     0., 0.0);
+{  5415} G1H500n                     =       GHN501C +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5416} G1H500n                     =       GDO3000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  5198., 0.0);
+{  5417} GNN500F +GHO                =       G2N501d                                               : ARR( 0.577E-12,     0., 0.0);
+{  5418} GNN500F +GHO                =       GNN500G +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{  5419} GNN500F+HV               =       G1N501i +      GNO2                                   :  0.200E+01*SUN;
+{  5420} G2N501d +GNO                =       G1N501j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5421} G2N501d +GNO                =       GNN501F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5422} G2N501d +GHO2               =       GHN501x                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5423} G2N501d +GNO3               =       G1N501j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5424} G2N501d +MEPERO             =  0.340G1N501j + 0.330GNN500o + 0.330GNN501K                 : ARR( 0.565E-13,  -845., 0.0);
+{  5425} G2N501d +PERO1              =  0.460G1N501j + 0.270GNN500o + 0.270GNN501K                 : ARR( 0.434E-13,  -900., 0.0);
+{  5426} G2N501d +PERO2              =  0.400G1N501j + 0.300GNN500o + 0.300GNN501K                 : ARR( 0.162E-13, -1400., 0.0);
+{  5427} G2N501d +PERO3              =  0.460G1N501j + 0.270GNN500o + 0.270GNN501K                 : ARR( 0.488E-13, -1250., 0.0);
+{  5428} G2N501d +PERO5              =  0.460G1N501j + 0.270GNN500o + 0.270GNN501K                 : ARR( 0.183E-11,   450., 0.0);
+{  5429} G2N501d +PERO6              =  0.300G1N501j + 0.350GNN500o + 0.350GNN501K                 : ARR( 0.168E-13, -1300., 0.0);
+{  5430} G2N501d +PERO9              =  0.650G1N501j + 0.350GNN501K                                : ARR( 0.100E-10,     0., 0.0);
+{  5431} G1N501i +OXYGEN             =       GND5006 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5432} G1N501i                     =       G2N501e                                               : ARR( 0.160E+12,  3719., 0.0);
+{  5433} G1N501j                     =       GND3000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3989., 0.0);
+{  5434} G2N501e +GNO                =       G1N501k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5435} G2N501e +GNO                =       GNN501M                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5436} G2N501e +GHO2               =       GHN500y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5437} G2N501e +GNO3               =       G1N501k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5438} G2N501e +MEPERO             =  0.340G1N501k + 0.330GNO500N + 0.330GNK500R                 : ARR( 0.565E-13,  -845., 0.0);
+{  5439} G2N501e +PERO1              =  0.460G1N501k + 0.270GNO500N + 0.270GNK500R                 : ARR( 0.434E-13,  -900., 0.0);
+{  5440} G2N501e +PERO2              =  0.400G1N501k + 0.300GNO500N + 0.300GNK500R                 : ARR( 0.162E-13, -1400., 0.0);
+{  5441} G2N501e +PERO3              =  0.460G1N501k + 0.270GNO500N + 0.270GNK500R                 : ARR( 0.488E-13, -1250., 0.0);
+{  5442} G2N501e +PERO5              =  0.460G1N501k + 0.270GNO500N + 0.270GNK500R                 : ARR( 0.183E-11,   450., 0.0);
+{  5443} G2N501e +PERO6              =  0.300G1N501k + 0.350GNO500N + 0.350GNK500R                 : ARR( 0.168E-13, -1300., 0.0);
+{  5444} G2N501e +PERO9              =  0.650G1N501k + 0.350GNK500R                                : ARR( 0.100E-10,     0., 0.0);
+{  5445} G1N501k                     =       GND500E +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5446} G1N501k                     =       GDO3000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3989., 0.0);
+{  5447} GNN500G +GHO                =       GND5007 +      GNO2                                   : ARR( 0.291E-12,     0., 0.0);
+{  5448} GNN500G +GHO                =       G2N501f                                               : ARR( 0.345E-12,     0., 0.0);
+{  5449} GNN500G+HV               =       G1N500Z +      GNO2                                   :  0.200E+01*SUN;
+{  5450} GNN500G+HV               =       G3N3000 +      G2N2000                                :  0.100E+01*SUN;
+{  5451} G2N501f +GNO                =       G1N501l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5452} G2N501f +GNO                =       GNN501G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5453} G2N501f +GHO2               =       GHN501y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5454} G2N501f +GNO3               =       G1N501l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5455} G2N501f +MEPERO             =  0.340G1N501l + 0.330GNN500p + 0.330GNN501L                 : ARR( 0.565E-13,  -845., 0.0);
+{  5456} G2N501f +PERO1              =  0.460G1N501l + 0.270GNN500p + 0.270GNN501L                 : ARR( 0.434E-13,  -900., 0.0);
+{  5457} G2N501f +PERO2              =  0.400G1N501l + 0.300GNN500p + 0.300GNN501L                 : ARR( 0.162E-13, -1400., 0.0);
+{  5458} G2N501f +PERO3              =  0.460G1N501l + 0.270GNN500p + 0.270GNN501L                 : ARR( 0.488E-13, -1250., 0.0);
+{  5459} G2N501f +PERO5              =  0.460G1N501l + 0.270GNN500p + 0.270GNN501L                 : ARR( 0.183E-11,   450., 0.0);
+{  5460} G2N501f +PERO6              =  0.300G1N501l + 0.350GNN500p + 0.350GNN501L                 : ARR( 0.168E-13, -1300., 0.0);
+{  5461} G2N501f +PERO9              =  0.650G1N501l + 0.350GNN501L                                : ARR( 0.100E-10,     0., 0.0);
+{  5462} G1N501l                     =       G3N3000 +      GND2000                                : ARR( 0.200E+15,  3003., 0.0);
+{  5463} GHN500K +GHO                =       GNN500J +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{  5464} GHN500K +GHO                =       G2N500S                                               : ARR( 0.195E-11,  -190., 0.0);
+{  5465} GHN500K+HV               =       G1H500o +      GNO2                                   :  0.100E+01*SUN;
+{  5466} GHN500K+HV               =       G1H5004 +      GNO2                                   :  0.100E+01*SUN;
+{  5467} GHN500K+HV               =       G1N500S +      GHO                                    :  0.100E+01*SUN;
+{  5468} G1H500o +OXYGEN             =       GHN5025 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5469} G1H500o                     =       G2H500a                                               : ARR( 0.160E+12,  3719., 0.0);
+{  5470} G2H500a +GNO                =       G1H500p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5471} G2H500a +GNO                =       GHN5026                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5472} G2H500a +GHO2               =       GHH500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5473} G2H500a +GNO3               =       G1H500p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5474} G2H500a +MEPERO             =  0.340G1H500p + 0.330GHN5027 + 0.330GHN5028                 : ARR( 0.565E-13,  -845., 0.0);
+{  5475} G2H500a +PERO1              =  0.460G1H500p + 0.270GHN5027 + 0.270GHN5028                 : ARR( 0.434E-13,  -900., 0.0);
+{  5476} G2H500a +PERO2              =  0.400G1H500p + 0.300GHN5027 + 0.300GHN5028                 : ARR( 0.162E-13, -1400., 0.0);
+{  5477} G2H500a +PERO3              =  0.460G1H500p + 0.270GHN5027 + 0.270GHN5028                 : ARR( 0.488E-13, -1250., 0.0);
+{  5478} G2H500a +PERO5              =  0.460G1H500p + 0.270GHN5027 + 0.270GHN5028                 : ARR( 0.183E-11,   450., 0.0);
+{  5479} G2H500a +PERO6              =  0.300G1H500p + 0.350GHN5027 + 0.350GHN5028                 : ARR( 0.168E-13, -1300., 0.0);
+{  5480} G2H500a +PERO9              =  0.650G1H500p + 0.350GHN5028                                : ARR( 0.100E-10,     0., 0.0);
+{  5481} G1H500p                     =       GHN501G +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5482} GHH5003 +GHO                =       GHN500M +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{  5483} GHH5003 +GHO                =       GHN500S +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{  5484} GHH5003 +GHO                =       G2H5003                                               : ARR( 0.195E-11,  -190., 0.0);
+{  5485} GHH5003 +GHO                =       G2H500b                                               : ARR( 0.195E-11,  -190., 0.0);
+{  5486} GHH5003+HV               =       G1H500q +      GNO2                                   :  0.100E+01*SUN;
+{  5487} GHH5003+HV               =       G1H5004 +      GHO                                    :  0.100E+01*SUN;
+{  5488} GHH5003+HV               =       G1H500m +      GHO                                    :  0.100E+01*SUN;
+{  5489} G2H500b +GNO                =       G1H500m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5490} G2H500b +GNO                =       GHN500J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5491} G2H500b +GHO2               =       GHH5003                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5492} G2H500b +GNO3               =       G1H500m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5493} G2H500b +MEPERO             =  0.480G1H500m + 0.260GHN500R + 0.260GHN500S                 : ARR( 0.146E-12,  -445., 0.0);
+{  5494} G2H500b +PERO1              =  0.600G1H500m + 0.200GHN500R + 0.200GHN500S                 : ARR( 0.112E-12,  -500., 0.0);
+{  5495} G2H500b +PERO2              =  0.560G1H500m + 0.220GHN500R + 0.220GHN500S                 : ARR( 0.418E-13, -1000., 0.0);
+{  5496} G2H500b +PERO3              =  0.600G1H500m + 0.200GHN500R + 0.200GHN500S                 : ARR( 0.126E-12,  -850., 0.0);
+{  5497} G2H500b +PERO5              =  0.600G1H500m + 0.200GHN500R + 0.200GHN500S                 : ARR( 0.473E-11,   850., 0.0);
+{  5498} G2H500b +PERO6              =  0.460G1H500m + 0.270GHN500R + 0.270GHN500S                 : ARR( 0.434E-13,  -900., 0.0);
+{  5499} G2H500b +PERO9              =  0.800G1H500m + 0.200GHN500S                                : ARR( 0.100E-10,     0., 0.0);
+{  5500} G1H500q                     =       G2H500c                                               : ARR( 0.160E+12,  3000., 0.0);
+{  5501} G2H500c +GNO                =       G1H500r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5502} G2H500c +GNO                =       GHH500X                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5503} G2H500c +GHO2               =       GHH500Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5504} G2H500c +GNO3               =       G1H500r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5505} G2H500c +MEPERO             =  0.340G1H500r + 0.330GHH500Z + 0.330GHH500a                 : ARR( 0.565E-13,  -845., 0.0);
+{  5506} G2H500c +PERO1              =  0.460G1H500r + 0.270GHH500Z + 0.270GHH500a                 : ARR( 0.434E-13,  -900., 0.0);
+{  5507} G2H500c +PERO2              =  0.400G1H500r + 0.300GHH500Z + 0.300GHH500a                 : ARR( 0.162E-13, -1400., 0.0);
+{  5508} G2H500c +PERO3              =  0.460G1H500r + 0.270GHH500Z + 0.270GHH500a                 : ARR( 0.488E-13, -1250., 0.0);
+{  5509} G2H500c +PERO5              =  0.460G1H500r + 0.270GHH500Z + 0.270GHH500a                 : ARR( 0.183E-11,   450., 0.0);
+{  5510} G2H500c +PERO6              =  0.300G1H500r + 0.350GHH500Z + 0.350GHH500a                 : ARR( 0.168E-13, -1300., 0.0);
+{  5511} G2H500c +PERO9              =  0.650G1H500r + 0.350GHH500a                                : ARR( 0.100E-10,     0., 0.0);
+{  5512} G1H500r                     =       GHH500J +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5513} G1H500r                     =       GDO3000 +      GHD2000 +      GHO                     : ARR( 0.200E+15,  5200., 0.0);
+{  5514} GHN500L +GHO                =       GHN500M +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  5515} GHN500L +GHO                =       GND5006 +      GHO                                    : ARR( 0.171E-10,     0., 0.0);
+{  5516} GHN500L +GHO                =       G2N501g                                               : ARR( 0.202E-11,  -190., 0.0);
+{  5517} GHN500L+HV               =       G1H500s +      GNO2                                   :  0.100E+01*SUN;
+{  5518} GHN500L+HV               =       G1N501i +      GHO                                    :  0.100E+01*SUN;
+{  5519} G2N501g +GNO                =       G1N501i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5520} G2N501g +GNO                =       GNN500F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5521} G2N501g +GHO2               =       GHN500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5522} G2N501g +GNO3               =       G1N501i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5523} G2N501g +MEPERO             =  0.480G1N501i + 0.260GNO500I + 0.260GND5006                 : ARR( 0.146E-12,  -445., 0.0);
+{  5524} G2N501g +PERO1              =  0.600G1N501i + 0.200GNO500I + 0.200GND5006                 : ARR( 0.112E-12,  -500., 0.0);
+{  5525} G2N501g +PERO2              =  0.560G1N501i + 0.220GNO500I + 0.220GND5006                 : ARR( 0.418E-13, -1000., 0.0);
+{  5526} G2N501g +PERO3              =  0.600G1N501i + 0.200GNO500I + 0.200GND5006                 : ARR( 0.126E-12,  -850., 0.0);
+{  5527} G2N501g +PERO5              =  0.600G1N501i + 0.200GNO500I + 0.200GND5006                 : ARR( 0.473E-11,   850., 0.0);
+{  5528} G2N501g +PERO6              =  0.460G1N501i + 0.270GNO500I + 0.270GND5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  5529} G2N501g +PERO9              =  0.800G1N501i + 0.200GND5006                                : ARR( 0.100E-10,     0., 0.0);
+{  5530} G1H500s                     =       G2H500d                                               : ARR( 0.160E+12,  3000., 0.0);
+{  5531} G2H500d +GNO                =       G1H500t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5532} G2H500d +GNO                =       GHN5029                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5533} G2H500d +GHO2               =       GHH500b                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5534} G2H500d +GNO3               =       G1H500t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5535} G2H500d +MEPERO             =  0.340G1H500t + 0.330GHO500Q + 0.330GHK500a                 : ARR( 0.565E-13,  -845., 0.0);
+{  5536} G2H500d +PERO1              =  0.460G1H500t + 0.270GHO500Q + 0.270GHK500a                 : ARR( 0.434E-13,  -900., 0.0);
+{  5537} G2H500d +PERO2              =  0.400G1H500t + 0.300GHO500Q + 0.300GHK500a                 : ARR( 0.162E-13, -1400., 0.0);
+{  5538} G2H500d +PERO3              =  0.460G1H500t + 0.270GHO500Q + 0.270GHK500a                 : ARR( 0.488E-13, -1250., 0.0);
+{  5539} G2H500d +PERO5              =  0.460G1H500t + 0.270GHO500Q + 0.270GHK500a                 : ARR( 0.183E-11,   450., 0.0);
+{  5540} G2H500d +PERO6              =  0.300G1H500t + 0.350GHO500Q + 0.350GHK500a                 : ARR( 0.168E-13, -1300., 0.0);
+{  5541} G2H500d +PERO9              =  0.650G1H500t + 0.350GHK500a                                : ARR( 0.100E-10,     0., 0.0);
+{  5542} G1H500t                     =       GHD500B +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5543} G1H500t                     =       GDO3000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3991., 0.0);
+{  5544} GHN500M +GHO                =       GND5007 +      GHO                                    : ARR( 0.521E-10,     0., 0.0);
+{  5545} GHN500M +GHO                =       G2N500Z                                               : ARR( 0.194E-11,  -190., 0.0);
+{  5546} GHN500M+HV               =       G1H500u +      GNO2                                   :  0.100E+01*SUN;
+{  5547} GHN500M+HV               =       G3N3000 +      G2H2000                                :  0.100E+01*SUN;
+{  5548} GHN500M+HV               =       G1N500Z +      GHO                                    :  0.100E+01*SUN;
+{  5549} G1H500u +OXYGEN             =       GHD500K +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  5550} G1H500u                     =       G2H500e                                               : ARR( 0.160E+12,  4982., 0.0);
+{  5551} G2H500e +GNO                =       G1H500v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5552} G2H500e +GNO                =       GHN502A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5553} G2H500e +GHO2               =       GHH500c                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5554} G2H500e +GNO3               =       G1H500v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5555} G2H500e +MEPERO             =  0.340G1H500v + 0.330GHK500b + 0.330GHK500c                 : ARR( 0.565E-13,  -845., 0.0);
+{  5556} G2H500e +PERO1              =  0.460G1H500v + 0.270GHK500b + 0.270GHK500c                 : ARR( 0.434E-13,  -900., 0.0);
+{  5557} G2H500e +PERO2              =  0.400G1H500v + 0.300GHK500b + 0.300GHK500c                 : ARR( 0.162E-13, -1400., 0.0);
+{  5558} G2H500e +PERO3              =  0.460G1H500v + 0.270GHK500b + 0.270GHK500c                 : ARR( 0.488E-13, -1250., 0.0);
+{  5559} G2H500e +PERO5              =  0.460G1H500v + 0.270GHK500b + 0.270GHK500c                 : ARR( 0.183E-11,   450., 0.0);
+{  5560} G2H500e +PERO6              =  0.300G1H500v + 0.350GHK500b + 0.350GHK500c                 : ARR( 0.168E-13, -1300., 0.0);
+{  5561} G2H500e +PERO9              =  0.650G1H500v + 0.350GHK500c                                : ARR( 0.100E-10,     0., 0.0);
+{  5562} G1H500v                     =       G3K3001 +      GHD2000                                : ARR( 0.200E+15,  3005., 0.0);
+{  5563} GHN500N +GHO                =       GNN501H +      GHO                                    : ARR( 0.356E-11,     0., 0.0);
+{  5564} GHN500N +GHO                =       G2N501h                                               : ARR( 0.210E-11,  -190., 0.0);
+{  5565} GHN500N+HV               =       G1H500w +      GNO2                                   :  0.100E+01*SUN;
+{  5566} GHN500N+HV               =       G1H5005 +      GNO2                                   :  0.100E+01*SUN;
+{  5567} GHN500N+HV               =       G1N501a +      GHO                                    :  0.100E+01*SUN;
+{  5568} G2N501h +GNO                =       G1N501a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5569} G2N501h +GNO                =       GNN500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5570} G2N501h +GHO2               =       GHN500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5571} G2N501h +GNO3               =       G1N501a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5572} G2N501h +MEPERO             =  0.480G1N501a + 0.260GNN500H + 0.260GNN501H                 : ARR( 0.164E-12,  -795., 0.0);
+{  5573} G2N501h +PERO1              =  0.600G1N501a + 0.200GNN500H + 0.200GNN501H                 : ARR( 0.126E-12,  -850., 0.0);
+{  5574} G2N501h +PERO2              =  0.560G1N501a + 0.220GNN500H + 0.220GNN501H                 : ARR( 0.471E-13, -1350., 0.0);
+{  5575} G2N501h +PERO3              =  0.600G1N501a + 0.200GNN500H + 0.200GNN501H                 : ARR( 0.142E-12, -1200., 0.0);
+{  5576} G2N501h +PERO5              =  0.600G1N501a + 0.200GNN500H + 0.200GNN501H                 : ARR( 0.533E-11,   500., 0.0);
+{  5577} G2N501h +PERO6              =  0.460G1N501a + 0.270GNN500H + 0.270GNN501H                 : ARR( 0.488E-13, -1250., 0.0);
+{  5578} G2N501h +PERO9              =  0.800G1N501a + 0.200GNN501H                                : ARR( 0.100E-10,     0., 0.0);
+{  5579} G1H500w +OXYGEN             =       GHN502B +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5580} G1H500w                     =       GHK5002 +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{  5581} GHH5004 +GHO                =       GHN500O +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{  5582} GHH5004 +GHO                =       GHN501z +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{  5583} GHH5004 +GHO                =       G2H5004                                               : ARR( 0.195E-11,  -190., 0.0);
+{  5584} GHH5004 +GHO                =       G2H500f                                               : ARR( 0.195E-11,  -190., 0.0);
+{  5585} GHH5004+HV               =       G1H500x +      GNO2                                   :  0.100E+01*SUN;
+{  5586} GHH5004+HV               =       G1H5005 +      GHO                                    :  0.100E+01*SUN;
+{  5587} GHH5004+HV               =       G1H500j +      GHO                                    :  0.100E+01*SUN;
+{  5588} G2H500f +GNO                =       G1H500j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5589} G2H500f +GNO                =       GHN500I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5590} G2H500f +GHO2               =       GHH5004                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5591} G2H500f +GNO3               =       G1H500j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5592} G2H500f +MEPERO             =  0.480G1H500j + 0.260GHN500Q + 0.260GHN501z                 : ARR( 0.164E-12,  -795., 0.0);
+{  5593} G2H500f +PERO1              =  0.600G1H500j + 0.200GHN500Q + 0.200GHN501z                 : ARR( 0.126E-12,  -850., 0.0);
+{  5594} G2H500f +PERO2              =  0.560G1H500j + 0.220GHN500Q + 0.220GHN501z                 : ARR( 0.471E-13, -1350., 0.0);
+{  5595} G2H500f +PERO3              =  0.600G1H500j + 0.200GHN500Q + 0.200GHN501z                 : ARR( 0.142E-12, -1200., 0.0);
+{  5596} G2H500f +PERO5              =  0.600G1H500j + 0.200GHN500Q + 0.200GHN501z                 : ARR( 0.533E-11,   500., 0.0);
+{  5597} G2H500f +PERO6              =  0.460G1H500j + 0.270GHN500Q + 0.270GHN501z                 : ARR( 0.488E-13, -1250., 0.0);
+{  5598} G2H500f +PERO9              =  0.800G1H500j + 0.200GHN501z                                : ARR( 0.100E-10,     0., 0.0);
+{  5599} G1H500x                     =       GHK5002 +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{  5600} GHN500O +GHO                =       G2H500g                                               : ARR( 0.899E-12,     0., 0.0);
+{  5601} GHN500O +GHO                =       G2H500h                                               : ARR( 0.864E-12,     0., 0.0);
+{  5602} GHN500O +GHO                =       GND5009 +      GHO                                    : ARR( 0.984E-11,     0., 0.0);
+{  5603} GHN500O +GHO                =       G2N500O                                               : ARR( 0.191E-11,  -190., 0.0);
+{  5604} GHN500O+HV               =       G1H500y +      GNO2                                   :  0.100E+01*SUN;
+{  5605} GHN500O+HV               =       G3N4000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  5606} GHN500O+HV               =       G2D2000 +      GHK3000 +      GNO2                    :  0.100E+01*SUN;
+{  5607} GHN500O+HV               =       G1N500O +      GHO                                    :  0.100E+01*SUN;
+{  5608} G2H500g +GNO                =       G1H500z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5609} G2H500g +GNO                =       GHN502C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5610} G2H500g +GHO2               =       GHH500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5611} G2H500g +GNO3               =       G1H500z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5612} G2H500g +MEPERO             =  0.340G1H500z + 0.330GHN500Z + 0.330GHN502D                 : ARR( 0.565E-13,  -845., 0.0);
+{  5613} G2H500g +PERO1              =  0.460G1H500z + 0.270GHN500Z + 0.270GHN502D                 : ARR( 0.434E-13,  -900., 0.0);
+{  5614} G2H500g +PERO2              =  0.400G1H500z + 0.300GHN500Z + 0.300GHN502D                 : ARR( 0.162E-13, -1400., 0.0);
+{  5615} G2H500g +PERO3              =  0.460G1H500z + 0.270GHN500Z + 0.270GHN502D                 : ARR( 0.488E-13, -1250., 0.0);
+{  5616} G2H500g +PERO5              =  0.460G1H500z + 0.270GHN500Z + 0.270GHN502D                 : ARR( 0.183E-11,   450., 0.0);
+{  5617} G2H500g +PERO6              =  0.300G1H500z + 0.350GHN500Z + 0.350GHN502D                 : ARR( 0.168E-13, -1300., 0.0);
+{  5618} G2H500g +PERO9              =  0.650G1H500z + 0.350GHN502D                                : ARR( 0.100E-10,     0., 0.0);
+{  5619} G2H500h +GNO                =       G1H5011 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5620} G2H500h +GNO                =       GHN502E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5621} G2H500h +GHO2               =       GHH500e                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5622} G2H500h +GNO3               =       G1H5011 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5623} G2H500h +MEPERO             =  0.340G1H5011 + 0.330GHN502F + 0.330GHN502G                 : ARR( 0.565E-13,  -845., 0.0);
+{  5624} G2H500h +PERO1              =  0.460G1H5011 + 0.270GHN502F + 0.270GHN502G                 : ARR( 0.434E-13,  -900., 0.0);
+{  5625} G2H500h +PERO2              =  0.400G1H5011 + 0.300GHN502F + 0.300GHN502G                 : ARR( 0.162E-13, -1400., 0.0);
+{  5626} G2H500h +PERO3              =  0.460G1H5011 + 0.270GHN502F + 0.270GHN502G                 : ARR( 0.488E-13, -1250., 0.0);
+{  5627} G2H500h +PERO5              =  0.460G1H5011 + 0.270GHN502F + 0.270GHN502G                 : ARR( 0.183E-11,   450., 0.0);
+{  5628} G2H500h +PERO6              =  0.300G1H5011 + 0.350GHN502F + 0.350GHN502G                 : ARR( 0.168E-13, -1300., 0.0);
+{  5629} G2H500h +PERO9              =  0.650G1H5011 + 0.350GHN502G                                : ARR( 0.100E-10,     0., 0.0);
+{  5630} G1H500y +OXYGEN             =       GHD500A +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5631} G1H500z                     =       GND500A +      GHO                                    : ARR( 0.160E+12,  4168., 0.0);
+{  5632} G1H500z                     =       GND2000 +      G2H3002                                : ARR( 0.200E+15,  7286., 0.0);
+{  5633} G1H5011                     =       GND3000 +      G3H2000                                : ARR( 0.200E+15,  2755., 0.0);
+{  5634} GND4001 +GHO                =       G3N4000                                               : ARR( 0.226E-10,     0., 0.0);
+{  5635} GND4001 +GNO3               =       G3N4000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5636} GND4001+HV               =       G1D4003 +      GNO2                                   :  0.100E+01*SUN;
+{  5637} GND4001+HV               =       G2N3000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  5638} GND4001+HV               =       G2D2000 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  5639} G1D4003 +OXYGEN             =       GDD4000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5640} G1D4003                     =       G3K4002                                               : ARR( 0.800E+11,  4559., 0.0);
+{  5641} GHN500P +GHO                =       GHN502B +      GHO2                                   : ARR( 0.420E-11,     0., 0.0);
+{  5642} GHN500P +GHO                =       G2H500i                                               : ARR( 0.148E-11,     0., 0.0);
+{  5643} GHN500P +GHO                =       GND5008 +      GHO                                    : ARR( 0.336E-11,     0., 0.0);
+{  5644} GHN500P +GHO                =       G2N501i                                               : ARR( 0.198E-11,  -190., 0.0);
+{  5645} GHN500P+HV               =       G1H5006 +      GNO2                                   :  0.100E+01*SUN;
+{  5646} GHN500P+HV               =       G1N500l +      GHO                                    :  0.100E+01*SUN;
+{  5647} G2H500i +GNO                =       G1H5012 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5648} G2H500i +GNO                =       GHN502H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5649} G2H500i +GHO2               =       GHH500f                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5650} G2H500i +GNO3               =       G1H5012 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5651} G2H500i +MEPERO             =  0.340G1H5012 + 0.330GHN501B + 0.330GHN502I                 : ARR( 0.565E-13,  -845., 0.0);
+{  5652} G2H500i +PERO1              =  0.460G1H5012 + 0.270GHN501B + 0.270GHN502I                 : ARR( 0.434E-13,  -900., 0.0);
+{  5653} G2H500i +PERO2              =  0.400G1H5012 + 0.300GHN501B + 0.300GHN502I                 : ARR( 0.162E-13, -1400., 0.0);
+{  5654} G2H500i +PERO3              =  0.460G1H5012 + 0.270GHN501B + 0.270GHN502I                 : ARR( 0.488E-13, -1250., 0.0);
+{  5655} G2H500i +PERO5              =  0.460G1H5012 + 0.270GHN501B + 0.270GHN502I                 : ARR( 0.183E-11,   450., 0.0);
+{  5656} G2H500i +PERO6              =  0.300G1H5012 + 0.350GHN501B + 0.350GHN502I                 : ARR( 0.168E-13, -1300., 0.0);
+{  5657} G2H500i +PERO9              =  0.650G1H5012 + 0.350GHN502I                                : ARR( 0.100E-10,     0., 0.0);
+{  5658} G2N501i +GNO                =       G1N500l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5659} G2N501i +GNO                =       GNN5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5660} G2N501i +GHO2               =       GHN500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5661} G2N501i +GNO3               =       G1N500l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5662} G2N501i +MEPERO             =  0.480G1N500l + 0.260GNO500J + 0.260GND5008                 : ARR( 0.164E-12,  -795., 0.0);
+{  5663} G2N501i +PERO1              =  0.600G1N500l + 0.200GNO500J + 0.200GND5008                 : ARR( 0.126E-12,  -850., 0.0);
+{  5664} G2N501i +PERO2              =  0.560G1N500l + 0.220GNO500J + 0.220GND5008                 : ARR( 0.471E-13, -1350., 0.0);
+{  5665} G2N501i +PERO3              =  0.600G1N500l + 0.200GNO500J + 0.200GND5008                 : ARR( 0.142E-12, -1200., 0.0);
+{  5666} G2N501i +PERO5              =  0.600G1N500l + 0.200GNO500J + 0.200GND5008                 : ARR( 0.533E-11,   500., 0.0);
+{  5667} G2N501i +PERO6              =  0.460G1N500l + 0.270GNO500J + 0.270GND5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  5668} G2N501i +PERO9              =  0.800G1N500l + 0.200GND5008                                : ARR( 0.100E-10,     0., 0.0);
+{  5669} G1H5012                     =       GND500B +      GHO                                    : ARR( 0.160E+12,  2905., 0.0);
+{  5670} G1H5012                     =       GCH2O   +      GHN400G +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  5671} GHH5005 +GHO                =       GHH500g +      GHO2                                   : ARR( 0.420E-11,     0., 0.0);
+{  5672} GHH5005 +GHO                =       GHK5002 +      GHO                                    : ARR( 0.430E-10,     0., 0.0);
+{  5673} GHH5005 +GHO                =       GHD5004 +      GHO                                    : ARR( 0.168E-10,     0., 0.0);
+{  5674} GHH5005 +GHO                =       G2H5005                                               : ARR( 0.198E-11,  -190., 0.0);
+{  5675} GHH5005 +GHO                =       G2H500j                                               : ARR( 0.198E-11,  -190., 0.0);
+{  5676} GHH5005+HV               =       G1H5006 +      GHO                                    :  0.100E+01*SUN;
+{  5677} GHH5005+HV               =       G1H500E +      GHO                                    :  0.100E+01*SUN;
+{  5678} G2H500j +GNO                =       G1H500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5679} G2H500j +GNO                =       GHN5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5680} G2H500j +GHO2               =       GHH5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5681} G2H500j +GNO3               =       G1H500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5682} G2H500j +MEPERO             =  0.480G1H500E + 0.260GHO500F + 0.260GHD5004                 : ARR( 0.164E-12,  -795., 0.0);
+{  5683} G2H500j +PERO1              =  0.600G1H500E + 0.200GHO500F + 0.200GHD5004                 : ARR( 0.126E-12,  -850., 0.0);
+{  5684} G2H500j +PERO2              =  0.560G1H500E + 0.220GHO500F + 0.220GHD5004                 : ARR( 0.471E-13, -1350., 0.0);
+{  5685} G2H500j +PERO3              =  0.600G1H500E + 0.200GHO500F + 0.200GHD5004                 : ARR( 0.142E-12, -1200., 0.0);
+{  5686} G2H500j +PERO5              =  0.600G1H500E + 0.200GHO500F + 0.200GHD5004                 : ARR( 0.533E-11,   500., 0.0);
+{  5687} G2H500j +PERO6              =  0.460G1H500E + 0.270GHO500F + 0.270GHD5004                 : ARR( 0.488E-13, -1250., 0.0);
+{  5688} G2H500j +PERO9              =  0.800G1H500E + 0.200GHD5004                                : ARR( 0.100E-10,     0., 0.0);
+{  5689} GNN500H +GHO                =       GNN501H +      GHO2                                   : ARR( 0.827E-12,     0., 0.0);
+{  5690} GNN500H +GHO                =       GNK500D +      GNO2                                   : ARR( 0.121E-12,     0., 0.0);
+{  5691} GNN500H +GHO                =       G2N501j                                               : ARR( 0.291E-12,     0., 0.0);
+{  5692} GNN500H +GHO                =       G2N501Z                                               : ARR( 0.291E-12,     0., 0.0);
+{  5693} GNN500H +GHO                =       G1N501a                                               : ARR( 0.216E-17,    85., 2.0);
+{  5694} GNN500H+HV               =       G1N500I +      GNO2                                   :  0.100E+01*SUN;
+{  5695} GNN500H+HV               =       G1N500z +      GNO2                                   :  0.100E+01*SUN;
+{  5696} G2N501j +GNO                =       G1N501m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5697} G2N501j +GNO                =       GNN501N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5698} G2N501j +GHO2               =       GHN502J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5699} G2N501j +GNO3               =       G1N501m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5700} G2N501j +MEPERO             =  0.340G1N501m + 0.330GNN501O + 0.330GNN501P                 : ARR( 0.565E-13,  -845., 0.0);
+{  5701} G2N501j +PERO1              =  0.460G1N501m + 0.270GNN501O + 0.270GNN501P                 : ARR( 0.434E-13,  -900., 0.0);
+{  5702} G2N501j +PERO2              =  0.400G1N501m + 0.300GNN501O + 0.300GNN501P                 : ARR( 0.162E-13, -1400., 0.0);
+{  5703} G2N501j +PERO3              =  0.460G1N501m + 0.270GNN501O + 0.270GNN501P                 : ARR( 0.488E-13, -1250., 0.0);
+{  5704} G2N501j +PERO5              =  0.460G1N501m + 0.270GNN501O + 0.270GNN501P                 : ARR( 0.183E-11,   450., 0.0);
+{  5705} G2N501j +PERO6              =  0.300G1N501m + 0.350GNN501O + 0.350GNN501P                 : ARR( 0.168E-13, -1300., 0.0);
+{  5706} G2N501j +PERO9              =  0.650G1N501m + 0.350GNN501P                                : ARR( 0.100E-10,     0., 0.0);
+{  5707} G1N501m                     =       GDO2000 +      GND3000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{  5708} G1N501m                     =       GND3004 +      G2N2000                                : ARR( 0.200E+15,  7074., 0.0);
+{  5709} GHN500Q +GHO                =       GHN501z +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{  5710} GHN500Q +GHO                =       GNK500D +      GHO                                    : ARR( 0.428E-10,     0., 0.0);
+{  5711} GHN500Q +GHO                =       G2N500I                                               : ARR( 0.197E-11,  -190., 0.0);
+{  5712} GHN500Q+HV               =       G1N500I +      GHO                                    :  0.100E+01*SUN;
+{  5713} GHN500Q+HV               =       G1H5013 +      GNO2                                   :  0.100E+01*SUN;
+{  5714} G1H5013                     =       GKO5003 +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{  5715} GNK500D +GHO                =       GND5009 +      GHO2                                   : ARR( 0.256E-11,     0., 0.0);
+{  5716} GNK500D +GHO                =       G2N501k                                               : ARR( 0.900E-12,     0., 0.0);
+{  5717} GNK500D +GHO                =       G2N501l                                               : ARR( 0.936E-12,     0., 0.0);
+{  5718} GNK500D+HV               =       G3K2001 +      G2N3000                                :  0.100E+01*SUN;
+{  5719} GNK500D+HV               =       GKO3000 +      G2D2000 +      GNO2                    :  0.100E+01*SUN;
+{  5720} GNK500D+HV               =       G1K500S +      GNO2                                   :  0.100E+01*SUN;
+{  5721} G2N501k +GNO                =       G1N501n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5722} G2N501k +GNO                =       GNN501Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5723} G2N501k +GHO2               =       GHN502K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5724} G2N501k +GNO3               =       G1N501n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5725} G2N501k +MEPERO             =  0.340G1N501n + 0.330GNK500m + 0.330GNK500n                 : ARR( 0.565E-13,  -845., 0.0);
+{  5726} G2N501k +PERO1              =  0.460G1N501n + 0.270GNK500m + 0.270GNK500n                 : ARR( 0.434E-13,  -900., 0.0);
+{  5727} G2N501k +PERO2              =  0.400G1N501n + 0.300GNK500m + 0.300GNK500n                 : ARR( 0.162E-13, -1400., 0.0);
+{  5728} G2N501k +PERO3              =  0.460G1N501n + 0.270GNK500m + 0.270GNK500n                 : ARR( 0.488E-13, -1250., 0.0);
+{  5729} G2N501k +PERO5              =  0.460G1N501n + 0.270GNK500m + 0.270GNK500n                 : ARR( 0.183E-11,   450., 0.0);
+{  5730} G2N501k +PERO6              =  0.300G1N501n + 0.350GNK500m + 0.350GNK500n                 : ARR( 0.168E-13, -1300., 0.0);
+{  5731} G2N501k +PERO9              =  0.650G1N501n + 0.350GNK500n                                : ARR( 0.100E-10,     0., 0.0);
+{  5732} G2N501l +GNO                =       G1N501o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5733} G2N501l +GNO                =       GNN500l                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5734} G2N501l +GHO2               =       GHN500x                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5735} G2N501l +GNO3               =       G1N501o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5736} G2N501l +MEPERO             =  0.340G1N501o + 0.330GNK500J + 0.330GNK500Q                 : ARR( 0.565E-13,  -845., 0.0);
+{  5737} G2N501l +PERO1              =  0.460G1N501o + 0.270GNK500J + 0.270GNK500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{  5738} G2N501l +PERO2              =  0.400G1N501o + 0.300GNK500J + 0.300GNK500Q                 : ARR( 0.162E-13, -1400., 0.0);
+{  5739} G2N501l +PERO3              =  0.460G1N501o + 0.270GNK500J + 0.270GNK500Q                 : ARR( 0.488E-13, -1250., 0.0);
+{  5740} G2N501l +PERO5              =  0.460G1N501o + 0.270GNK500J + 0.270GNK500Q                 : ARR( 0.183E-11,   450., 0.0);
+{  5741} G2N501l +PERO6              =  0.300G1N501o + 0.350GNK500J + 0.350GNK500Q                 : ARR( 0.168E-13, -1300., 0.0);
+{  5742} G2N501l +PERO9              =  0.650G1N501o + 0.350GNK500Q                                : ARR( 0.100E-10,     0., 0.0);
+{  5743} G1K500S +OXYGEN             =       GDK5007 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5744} G1N501n                     =       G3K2001 +      GND3000                                : ARR( 0.200E+15,  2755., 0.0);
+{  5745} G1N501o                     =       GND500A +      GHO2                                   : ARR( 0.160E+12,  4515., 0.0);
+{  5746} G1N501o                     =       G2K3001 +      GND2000                                : ARR( 0.200E+15,  7286., 0.0);
+{  5747} GNN500I +GHO                =       GNN500J +      GHO2                                   : ARR( 0.436E-11,     0., 0.0);
+{  5748} GNN500I +GHO                =       G2N501m                                               : ARR( 0.306E-12,     0., 0.0);
+{  5749} GNN500I+HV               =       G1N500J +      GNO2                                   :  0.100E+01*SUN;
+{  5750} GNN500I+HV               =       G1N501p +      GNO2                                   :  0.100E+01*SUN;
+{  5751} G2N501m +GNO                =       G1N501q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5752} G2N501m +GNO                =       GNN501N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5753} G2N501m +GHO2               =       GHN502L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5754} G2N501m +GNO3               =       G1N501q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5755} G2N501m +MEPERO             =  0.340G1N501q + 0.330GNN500r + 0.330GNN501Q                 : ARR( 0.565E-13,  -845., 0.0);
+{  5756} G2N501m +PERO1              =  0.460G1N501q + 0.270GNN500r + 0.270GNN501Q                 : ARR( 0.434E-13,  -900., 0.0);
+{  5757} G2N501m +PERO2              =  0.400G1N501q + 0.300GNN500r + 0.300GNN501Q                 : ARR( 0.162E-13, -1400., 0.0);
+{  5758} G2N501m +PERO3              =  0.460G1N501q + 0.270GNN500r + 0.270GNN501Q                 : ARR( 0.488E-13, -1250., 0.0);
+{  5759} G2N501m +PERO5              =  0.460G1N501q + 0.270GNN500r + 0.270GNN501Q                 : ARR( 0.183E-11,   450., 0.0);
+{  5760} G2N501m +PERO6              =  0.300G1N501q + 0.350GNN500r + 0.350GNN501Q                 : ARR( 0.168E-13, -1300., 0.0);
+{  5761} G2N501m +PERO9              =  0.650G1N501q + 0.350GNN501Q                                : ARR( 0.100E-10,     0., 0.0);
+{  5762} G1N501p +OXYGEN             =       GND500W +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5763} G1N501p                     =       G2N501n                                               : ARR( 0.160E+12,  3719., 0.0);
+{  5764} G1N501q                     =       GCH2O   +      GNN4008 +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  5765} G2N501n +GNO                =       G1N501r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5766} G2N501n +GNO                =       GNN501R                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5767} G2N501n +GHO2               =       GHN502M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5768} G2N501n +GNO3               =       G1N501r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5769} G2N501n +MEPERO             =  0.340G1N501r + 0.330GNO500P + 0.330GNK500U                 : ARR( 0.565E-13,  -845., 0.0);
+{  5770} G2N501n +PERO1              =  0.460G1N501r + 0.270GNO500P + 0.270GNK500U                 : ARR( 0.434E-13,  -900., 0.0);
+{  5771} G2N501n +PERO2              =  0.400G1N501r + 0.300GNO500P + 0.300GNK500U                 : ARR( 0.162E-13, -1400., 0.0);
+{  5772} G2N501n +PERO3              =  0.460G1N501r + 0.270GNO500P + 0.270GNK500U                 : ARR( 0.488E-13, -1250., 0.0);
+{  5773} G2N501n +PERO5              =  0.460G1N501r + 0.270GNO500P + 0.270GNK500U                 : ARR( 0.183E-11,   450., 0.0);
+{  5774} G2N501n +PERO6              =  0.300G1N501r + 0.350GNO500P + 0.350GNK500U                 : ARR( 0.168E-13, -1300., 0.0);
+{  5775} G2N501n +PERO9              =  0.650G1N501r + 0.350GNK500U                                : ARR( 0.100E-10,     0., 0.0);
+{  5776} G1N501r                     =       GND500I +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5777} G1N501r                     =       GND4006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  5778} GHN500R +GHO                =       GHN500S +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{  5779} GHN500R +GHO                =       GNK500E +      GHO                                    : ARR( 0.428E-10,     0., 0.0);
+{  5780} GHN500R +GHO                =       G2N500J                                               : ARR( 0.197E-11,  -190., 0.0);
+{  5781} GHN500R+HV               =       G1N500J +      GHO                                    :  0.100E+01*SUN;
+{  5782} GHN500R+HV               =       G1H5014 +      GNO2                                   :  0.100E+01*SUN;
+{  5783} G1H5014                     =       G2H500k                                               : ARR( 0.160E+12,  3000., 0.0);
+{  5784} G2H500k +GNO                =       G1H5015 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5785} G2H500k +GNO                =       GHN502N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5786} G2H500k +GHO2               =       GHH500h                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5787} G2H500k +GNO3               =       G1H5015 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5788} G2H500k +MEPERO             =  0.340G1H5015 + 0.330GHO500L + 0.330GHK500J                 : ARR( 0.565E-13,  -845., 0.0);
+{  5789} G2H500k +PERO1              =  0.460G1H5015 + 0.270GHO500L + 0.270GHK500J                 : ARR( 0.434E-13,  -900., 0.0);
+{  5790} G2H500k +PERO2              =  0.400G1H5015 + 0.300GHO500L + 0.300GHK500J                 : ARR( 0.162E-13, -1400., 0.0);
+{  5791} G2H500k +PERO3              =  0.460G1H5015 + 0.270GHO500L + 0.270GHK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{  5792} G2H500k +PERO5              =  0.460G1H5015 + 0.270GHO500L + 0.270GHK500J                 : ARR( 0.183E-11,   450., 0.0);
+{  5793} G2H500k +PERO6              =  0.300G1H5015 + 0.350GHO500L + 0.350GHK500J                 : ARR( 0.168E-13, -1300., 0.0);
+{  5794} G2H500k +PERO9              =  0.650G1H5015 + 0.350GHK500J                                : ARR( 0.100E-10,     0., 0.0);
+{  5795} G1H5015                     =       GHD500D +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5796} G1H5015                     =       GDO3000 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  5200., 0.0);
+{  5797} G1H5015                     =       GHD4006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  5798} GNO500I +GHO                =       GND5006 +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{  5799} GNO500I +GHO                =       G2N501o                                               : ARR( 0.147E-11,     0., 0.0);
+{  5800} GNO500I +GHO                =       GNK500E +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  5801} GNO500I+HV               =       G1O500S +      GNO2                                   :  0.100E+01*SUN;
+{  5802} G2N501o +GNO                =       G1N501s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5803} G2N501o +GNO                =       GNN501O                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5804} G2N501o +GHO2               =       GHN502O                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5805} G2N501o +GNO3               =       G1N501s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5806} G2N501o +MEPERO             =  0.340G1N501s + 0.330GNO500R + 0.330GNK500m                 : ARR( 0.565E-13,  -845., 0.0);
+{  5807} G2N501o +PERO1              =  0.460G1N501s + 0.270GNO500R + 0.270GNK500m                 : ARR( 0.434E-13,  -900., 0.0);
+{  5808} G2N501o +PERO2              =  0.400G1N501s + 0.300GNO500R + 0.300GNK500m                 : ARR( 0.162E-13, -1400., 0.0);
+{  5809} G2N501o +PERO3              =  0.460G1N501s + 0.270GNO500R + 0.270GNK500m                 : ARR( 0.488E-13, -1250., 0.0);
+{  5810} G2N501o +PERO5              =  0.460G1N501s + 0.270GNO500R + 0.270GNK500m                 : ARR( 0.183E-11,   450., 0.0);
+{  5811} G2N501o +PERO6              =  0.300G1N501s + 0.350GNO500R + 0.350GNK500m                 : ARR( 0.168E-13, -1300., 0.0);
+{  5812} G2N501o +PERO9              =  0.650G1N501s + 0.350GNK500m                                : ARR( 0.100E-10,     0., 0.0);
+{  5813} G1O500S                     =       G2O500Q                                               : ARR( 0.160E+12,  3000., 0.0);
+{  5814} G1N501s                     =       GDO2000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  3991., 0.0);
+{  5815} G2O500Q +GNO                =       G1O500T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5816} G2O500Q +GNO                =       GNO500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5817} G2O500Q +GHO2               =       GHO500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5818} G2O500Q +GNO3               =       G1O500T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5819} G2O500Q +MEPERO             =  0.340G1O500T + 0.330GOO500A + 0.330GKO500F                 : ARR( 0.565E-13,  -845., 0.0);
+{  5820} G2O500Q +PERO1              =  0.460G1O500T + 0.270GOO500A + 0.270GKO500F                 : ARR( 0.434E-13,  -900., 0.0);
+{  5821} G2O500Q +PERO2              =  0.400G1O500T + 0.300GOO500A + 0.300GKO500F                 : ARR( 0.162E-13, -1400., 0.0);
+{  5822} G2O500Q +PERO3              =  0.460G1O500T + 0.270GOO500A + 0.270GKO500F                 : ARR( 0.488E-13, -1250., 0.0);
+{  5823} G2O500Q +PERO5              =  0.460G1O500T + 0.270GOO500A + 0.270GKO500F                 : ARR( 0.183E-11,   450., 0.0);
+{  5824} G2O500Q +PERO6              =  0.300G1O500T + 0.350GOO500A + 0.350GKO500F                 : ARR( 0.168E-13, -1300., 0.0);
+{  5825} G2O500Q +PERO9              =  0.650G1O500T + 0.350GKO500F                                : ARR( 0.100E-10,     0., 0.0);
+{  5826} G1O500T                     =       GDO5008 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5827} G1O500T                     =       GDO3000 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3991., 0.0);
+{  5828} GNK500E +GHO                =       GND5007 +      GHO2                                   : ARR( 0.132E-10,     0., 0.0);
+{  5829} GNK500E +GHO                =       G2N501p                                               : ARR( 0.891E-12,     0., 0.0);
+{  5830} GNK500E+HV               =       G3K3001 +      G2N2000                                :  0.100E+01*SUN;
+{  5831} GNK500E+HV               =       G1K500T +      GNO2                                   :  0.100E+01*SUN;
+{  5832} G2N501p +GNO                =       G1N501t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5833} G2N501p +GNO                =       GNN501P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5834} G2N501p +GHO2               =       GHN502P                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5835} G2N501p +GNO3               =       G1N501t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5836} G2N501p +MEPERO             =  0.340G1N501t + 0.330GNK500X + 0.330GNK500n                 : ARR( 0.565E-13,  -845., 0.0);
+{  5837} G2N501p +PERO1              =  0.460G1N501t + 0.270GNK500X + 0.270GNK500n                 : ARR( 0.434E-13,  -900., 0.0);
+{  5838} G2N501p +PERO2              =  0.400G1N501t + 0.300GNK500X + 0.300GNK500n                 : ARR( 0.162E-13, -1400., 0.0);
+{  5839} G2N501p +PERO3              =  0.460G1N501t + 0.270GNK500X + 0.270GNK500n                 : ARR( 0.488E-13, -1250., 0.0);
+{  5840} G2N501p +PERO5              =  0.460G1N501t + 0.270GNK500X + 0.270GNK500n                 : ARR( 0.183E-11,   450., 0.0);
+{  5841} G2N501p +PERO6              =  0.300G1N501t + 0.350GNK500X + 0.350GNK500n                 : ARR( 0.168E-13, -1300., 0.0);
+{  5842} G2N501p +PERO9              =  0.650G1N501t + 0.350GNK500n                                : ARR( 0.100E-10,     0., 0.0);
+{  5843} G1K500T +OXYGEN             =       GDK500I +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  5844} G1K500T                     =       G2K500S                                               : ARR( 0.160E+12,  4982., 0.0);
+{  5845} G1N501t                     =       GDO2000 +      G3N3000                                : ARR( 0.200E+15,  3005., 0.0);
+{  5846} G2K500S +GNO                =       G1K500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5847} G2K500S +GNO                =       GNK500o                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5848} G2K500S +GHO2               =       GHK500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5849} G2K500S +GNO3               =       G1K500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5850} G2K500S +MEPERO             =  0.340G1K500U + 0.330GKO500E + 0.330GKK5006                 : ARR( 0.565E-13,  -845., 0.0);
+{  5851} G2K500S +PERO1              =  0.460G1K500U + 0.270GKO500E + 0.270GKK5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  5852} G2K500S +PERO2              =  0.400G1K500U + 0.300GKO500E + 0.300GKK5006                 : ARR( 0.162E-13, -1400., 0.0);
+{  5853} G2K500S +PERO3              =  0.460G1K500U + 0.270GKO500E + 0.270GKK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  5854} G2K500S +PERO5              =  0.460G1K500U + 0.270GKO500E + 0.270GKK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  5855} G2K500S +PERO6              =  0.300G1K500U + 0.350GKO500E + 0.350GKK5006                 : ARR( 0.168E-13, -1300., 0.0);
+{  5856} G2K500S +PERO9              =  0.650G1K500U + 0.350GKK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  5857} G1K500U                     =       G3K3001 +      GDO2000                                : ARR( 0.200E+15,  3005., 0.0);
+{  5858} GNO500J +GHO                =       GND500J +      GHO2                                   : ARR( 0.446E-11,     0., 0.0);
+{  5859} GNO500J +GHO                =       G2N500l                                               : ARR( 0.157E-11,     0., 0.0);
+{  5860} GNO500J +GHO                =       GND5008 +      GHO2                                   : ARR( 0.892E-12,     0., 0.0);
+{  5861} GNO500J+HV               =       G1O500D +      GNO2                                   :  0.100E+01*SUN;
+{  5862} GHO500F +GHO                =       GHD500L +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{  5863} GHO500F +GHO                =       GKO5003 +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{  5864} GHO500F +GHO                =       GHD5004 +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{  5865} GHO500F +GHO                =       G2O500C                                               : ARR( 0.201E-11,  -190., 0.0);
+{  5866} GHO500F+HV               =       G1O500D +      GHO                                    :  0.100E+01*SUN;
+{  5867} GNU3000 +GHO                =       G2N3003                                               : ARR( 0.450E-11,     0., 0.0);
+{  5868} GNU3000 +GHO                =       G2N3007                                               : ARR( 0.300E-10,     0., 0.0);
+{  5869} GNU3000 +GO3                =  2.000GND2000 + 0.740GHCOOH  + 0.260GCO2    + 0.260GH2      : ARR( 0.253E-17,     0., 0.0);
+{  5870} GNU3000 +GO3                =       GCO     + 0.760GH2O    + 0.240GHO2    + 0.240GHO      : ARR( 0.253E-17,     0., 0.0);
+{  5871} GNU3000 +GO3                =  3.040GCH2O   + 0.680GAN2000 + 0.280GCO2    + 0.280GN01001  : ARR( 0.253E-17,     0., 0.0);
+{  5872} GNU3000 +GO3                =  1.040GCO     + 1.040GHO     + 1.040GNO2                    : ARR( 0.253E-17,     0., 0.0);
+{  5873} GNU3000 +GNO3               =       G2N3006                                               : ARR( 0.135E-13,     0., 0.0);
+{  5874} GNU3000+HV               =       G1U3000 +      GNO2                                   :  0.100E+01*SUN;
+{  5875} G1U3000 +OXYGEN             =       GUD3000 +      GHO2                                   : ARR( 0.600E-13,   330., 0.0);
+{  5876} GNN500J +GHO                =       G3N5006                                               : ARR( 0.214E-10,     0., 0.0);
+{  5877} GNN500J +GNO3               =       G3N5006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5878} GNN500J+HV               =       G1N501u +      GNO2                                   :  0.100E+01*SUN;
+{  5879} GNN500J+HV               =       G1N500K +      GNO2                                   :  0.100E+01*SUN;
+{  5880} GNN500J+HV               =       G2N400C +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  5881} GNN500J+HV               =       G2N3009 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  5882} G3N5006 +GHO2               =  0.800GGN5007 + 0.200GAN5007 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  5883} G3N5006 +GNO                =       G2N400C +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  5884} G3N5006 +GNO2               =       GPN5007                                               : ARR( 0.330E-08,     0.,-1.0);
+{  5885} G3N5006 +GNO3               =       G2N400C +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  5886} G3N5006 +MEPERO             =  0.685G2N400C + 0.315GAN5007 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5887} G3N5006 +PERO1              =  0.800G2N400C + 0.200GAN5007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5888} G3N5006 +PERO2              =  0.750G2N400C + 0.250GAN5007 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5889} G3N5006 +PERO3              =  0.800G2N400C + 0.200GAN5007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5890} G3N5006 +PERO5              =  0.650G2N400C + 0.350GAN5007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5891} G3N5006 +PERO6              =  0.650G2N400C + 0.350GAN5007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5892} G3N5006 +PERO9              =       G2N400C +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  5893} G1N501u +OXYGEN             =       GND500X +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  5894} G1N501u                     =       G2N501q                                               : ARR( 0.160E+12,  3940., 0.0);
+{  5895} G2N400C +GNO                =       G1N400C +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5896} G2N400C +GNO                =       GNN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5897} G2N400C +GHO2               =       GHN400H                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5898} G2N400C +GNO3               =       G1N400C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5899} G2N400C +MEPERO             =  0.480G1N400C + 0.260GNN4004 + 0.260GNN4008                 : ARR( 0.164E-12,  -795., 0.0);
+{  5900} G2N400C +PERO1              =  0.600G1N400C + 0.200GNN4004 + 0.200GNN4008                 : ARR( 0.126E-12,  -850., 0.0);
+{  5901} G2N400C +PERO2              =  0.560G1N400C + 0.220GNN4004 + 0.220GNN4008                 : ARR( 0.471E-13, -1350., 0.0);
+{  5902} G2N400C +PERO3              =  0.600G1N400C + 0.200GNN4004 + 0.200GNN4008                 : ARR( 0.142E-12, -1200., 0.0);
+{  5903} G2N400C +PERO5              =  0.600G1N400C + 0.200GNN4004 + 0.200GNN4008                 : ARR( 0.533E-11,   500., 0.0);
+{  5904} G2N400C +PERO6              =  0.460G1N400C + 0.270GNN4004 + 0.270GNN4008                 : ARR( 0.488E-13, -1250., 0.0);
+{  5905} G2N400C +PERO9              =  0.800G1N400C + 0.200GNN4008                                : ARR( 0.100E-10,     0., 0.0);
+{  5906} G2N3009 +GNO                =       G1N3009 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  5907} G2N3009 +GNO                =       GNN3005                                               : ARR( 0.622E-13,  -360., 0.0);
+{  5908} G2N3009 +GHO2               =       GHN3007                                               : ARR( 0.179E-12, -1250., 0.0);
+{  5909} G2N3009 +GNO3               =       G1N3009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5910} G2N3009 +MEPERO             =  0.340G1N3009 + 0.330GND3002 + 0.330GND3003                 : ARR( 0.565E-13,  -845., 0.0);
+{  5911} G2N3009 +PERO1              =  0.460G1N3009 + 0.270GND3002 + 0.270GND3003                 : ARR( 0.434E-13,  -900., 0.0);
+{  5912} G2N3009 +PERO2              =  0.400G1N3009 + 0.300GND3002 + 0.300GND3003                 : ARR( 0.162E-13, -1400., 0.0);
+{  5913} G2N3009 +PERO3              =  0.460G1N3009 + 0.270GND3002 + 0.270GND3003                 : ARR( 0.488E-13, -1250., 0.0);
+{  5914} G2N3009 +PERO5              =  0.460G1N3009 + 0.270GND3002 + 0.270GND3003                 : ARR( 0.183E-11,   450., 0.0);
+{  5915} G2N3009 +PERO6              =  0.300G1N3009 + 0.350GND3002 + 0.350GND3003                 : ARR( 0.168E-13, -1300., 0.0);
+{  5916} G2N3009 +PERO9              =  0.650G1N3009 + 0.350GND3003                                : ARR( 0.100E-10,     0., 0.0);
+{  5917} G2N501q +GNO                =       G1N501v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5918} G2N501q +GNO                =       GNN501S                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5919} G2N501q +GHO2               =       GHN502Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5920} G2N501q +GNO3               =       G1N501v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5921} G2N501q +MEPERO             =  0.340G1N501v + 0.330GND500Y + 0.330GND500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{  5922} G2N501q +PERO1              =  0.460G1N501v + 0.270GND500Y + 0.270GND500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{  5923} G2N501q +PERO2              =  0.400G1N501v + 0.300GND500Y + 0.300GND500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{  5924} G2N501q +PERO3              =  0.460G1N501v + 0.270GND500Y + 0.270GND500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{  5925} G2N501q +PERO5              =  0.460G1N501v + 0.270GND500Y + 0.270GND500Z                 : ARR( 0.183E-11,   450., 0.0);
+{  5926} G2N501q +PERO6              =  0.300G1N501v + 0.350GND500Y + 0.350GND500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{  5927} G2N501q +PERO9              =  0.650G1N501v + 0.350GND500Z                                : ARR( 0.100E-10,     0., 0.0);
+{  5928} G1N400C +OXYGEN             =       GNN4008 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  5929} G1N400C                     =       GND4002 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  5930} G1N400C                     =       GND3000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7547., 0.0);
+{  5931} G1N3009                     =       GND2000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5749., 0.0);
+{  5932} G1N501v                     =       GND500a +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5933} G1N501v                     =       GND4006 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{  5934} GHN500S +GHO                =       GND5007 +      GHO                                    : ARR( 0.135E-09,     0., 0.0);
+{  5935} GHN500S +GHO                =       G3H5004                                               : ARR( 0.214E-10,     0., 0.0);
+{  5936} GHN500S +GNO3               =       G3H5004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5937} GHN500S+HV               =       G1H5016 +      GNO2                                   :  0.100E+01*SUN;
+{  5938} GHN500S+HV               =       G1N500K +      GHO                                    :  0.100E+01*SUN;
+{  5939} GHN500S+HV               =       G2H400B +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  5940} GHN500S+HV               =       G2N3009 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{  5941} G3H5004 +GHO2               =  0.800GGH5006 + 0.200GAH5006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  5942} G3H5004 +GNO                =       G2H400B +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  5943} G3H5004 +GNO2               =       GPH5006                                               : ARR( 0.330E-08,     0.,-1.0);
+{  5944} G3H5004 +GNO3               =       G2H400B +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  5945} G3H5004 +MEPERO             =  0.685G2H400B + 0.315GAH5006 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5946} G3H5004 +PERO1              =  0.800G2H400B + 0.200GAH5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5947} G3H5004 +PERO2              =  0.750G2H400B + 0.250GAH5006 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5948} G3H5004 +PERO3              =  0.800G2H400B + 0.200GAH5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5949} G3H5004 +PERO5              =  0.650G2H400B + 0.350GAH5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5950} G3H5004 +PERO6              =  0.650G2H400B + 0.350GAH5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5951} G3H5004 +PERO9              =       G2H400B +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  5952} G1H5016                     =       G2H500l                                               : ARR( 0.160E+12,  3221., 0.0);
+{  5953} G2H400B +GNO                =       G1H400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5954} G2H400B +GNO                =       GHN400I                                               : ARR( 0.111E-12,  -360., 0.0);
+{  5955} G2H400B +GHO2               =       GHH4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  5956} G2H400B +GNO3               =       G1H400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5957} G2H400B +MEPERO             =  0.480G1H400B + 0.260GHN4007 + 0.260GHN400J                 : ARR( 0.164E-12,  -795., 0.0);
+{  5958} G2H400B +PERO1              =  0.600G1H400B + 0.200GHN4007 + 0.200GHN400J                 : ARR( 0.126E-12,  -850., 0.0);
+{  5959} G2H400B +PERO2              =  0.560G1H400B + 0.220GHN4007 + 0.220GHN400J                 : ARR( 0.471E-13, -1350., 0.0);
+{  5960} G2H400B +PERO3              =  0.600G1H400B + 0.200GHN4007 + 0.200GHN400J                 : ARR( 0.142E-12, -1200., 0.0);
+{  5961} G2H400B +PERO5              =  0.600G1H400B + 0.200GHN4007 + 0.200GHN400J                 : ARR( 0.533E-11,   500., 0.0);
+{  5962} G2H400B +PERO6              =  0.460G1H400B + 0.270GHN4007 + 0.270GHN400J                 : ARR( 0.488E-13, -1250., 0.0);
+{  5963} G2H400B +PERO9              =  0.800G1H400B + 0.200GHN400J                                : ARR( 0.100E-10,     0., 0.0);
+{  5964} G2H500l +GNO                =       G1H5017 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  5965} G2H500l +GNO                =       GHN502R                                               : ARR( 0.182E-12,  -360., 0.0);
+{  5966} G2H500l +GHO2               =       GHH500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{  5967} G2H500l +GNO3               =       G1H5017 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  5968} G2H500l +MEPERO             =  0.340G1H5017 + 0.330GHD500M + 0.330GHD500N                 : ARR( 0.565E-13,  -845., 0.0);
+{  5969} G2H500l +PERO1              =  0.460G1H5017 + 0.270GHD500M + 0.270GHD500N                 : ARR( 0.434E-13,  -900., 0.0);
+{  5970} G2H500l +PERO2              =  0.400G1H5017 + 0.300GHD500M + 0.300GHD500N                 : ARR( 0.162E-13, -1400., 0.0);
+{  5971} G2H500l +PERO3              =  0.460G1H5017 + 0.270GHD500M + 0.270GHD500N                 : ARR( 0.488E-13, -1250., 0.0);
+{  5972} G2H500l +PERO5              =  0.460G1H5017 + 0.270GHD500M + 0.270GHD500N                 : ARR( 0.183E-11,   450., 0.0);
+{  5973} G2H500l +PERO6              =  0.300G1H5017 + 0.350GHD500M + 0.350GHD500N                 : ARR( 0.168E-13, -1300., 0.0);
+{  5974} G2H500l +PERO9              =  0.650G1H5017 + 0.350GHD500N                                : ARR( 0.100E-10,     0., 0.0);
+{  5975} G1H400B +OXYGEN             =       GHN400J +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  5976} G1H400B                     =       GHD4000 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  5977} G1H400B                     =       GND3000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  5978} G1H5017                     =       GHD500O +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  5979} G1H5017                     =       GHD4006 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{  5980} GND5006 +GHO                =       GND5007 +      GHO2                                   : ARR( 0.335E-10,     0., 0.0);
+{  5981} GND5006 +GHO                =       G3N5007                                               : ARR( 0.213E-10,     0., 0.0);
+{  5982} GND5006 +GNO3               =       G3N5007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  5983} GND5006+HV               =       G1D500E +      GNO2                                   :  0.100E+01*SUN;
+{  5984} GND5006+HV               =       G2N400D +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  5985} GND5006+HV               =       GND3000 +      GD02000                                :  0.100E+01*SUN;
+{  5986} G3N5007 +GHO2               =  0.800GGN5008 + 0.200GAN5008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  5987} G3N5007 +GNO                =       G2N400D +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  5988} G3N5007 +GNO2               =       GPN5008                                               : ARR( 0.330E-08,     0.,-1.0);
+{  5989} G3N5007 +GNO3               =       G2N400D +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  5990} G3N5007 +MEPERO             =  0.685G2N400D + 0.315GAN5008 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5991} G3N5007 +PERO1              =  0.800G2N400D + 0.200GAN5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5992} G3N5007 +PERO2              =  0.750G2N400D + 0.250GAN5008 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5993} G3N5007 +PERO3              =  0.800G2N400D + 0.200GAN5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5994} G3N5007 +PERO5              =  0.650G2N400D + 0.350GAN5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5995} G3N5007 +PERO6              =  0.650G2N400D + 0.350GAN5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  5996} G3N5007 +PERO9              =       G2N400D +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  5997} G1D500E                     =       G2D500C                                               : ARR( 0.160E+12,  3221., 0.0);
+{  5998} G2N400D +GNO                =       G1N400D +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  5999} G2N400D +GNO                =       GNN4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6000} G2N400D +GHO2               =       GHN4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6001} G2N400D +GNO3               =       G1N400D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6002} G2N400D +MEPERO             =  0.480G1N400D + 0.260GNO4003 + 0.260GND400C                 : ARR( 0.164E-12,  -795., 0.0);
+{  6003} G2N400D +PERO1              =  0.600G1N400D + 0.200GNO4003 + 0.200GND400C                 : ARR( 0.126E-12,  -850., 0.0);
+{  6004} G2N400D +PERO2              =  0.560G1N400D + 0.220GNO4003 + 0.220GND400C                 : ARR( 0.471E-13, -1350., 0.0);
+{  6005} G2N400D +PERO3              =  0.600G1N400D + 0.200GNO4003 + 0.200GND400C                 : ARR( 0.142E-12, -1200., 0.0);
+{  6006} G2N400D +PERO5              =  0.600G1N400D + 0.200GNO4003 + 0.200GND400C                 : ARR( 0.533E-11,   500., 0.0);
+{  6007} G2N400D +PERO6              =  0.460G1N400D + 0.270GNO4003 + 0.270GND400C                 : ARR( 0.488E-13, -1250., 0.0);
+{  6008} G2N400D +PERO9              =  0.800G1N400D + 0.200GND400C                                : ARR( 0.100E-10,     0., 0.0);
+{  6009} G2D500C +GNO                =       G1D500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6010} G2D500C +GNO                =       GND500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6011} G2D500C +GHO2               =       GHD500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6012} G2D500C +GNO3               =       G1D500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6013} G2D500C +MEPERO             =  0.340G1D500F + 0.330GDO500B + 0.330GDK500J                 : ARR( 0.565E-13,  -845., 0.0);
+{  6014} G2D500C +PERO1              =  0.460G1D500F + 0.270GDO500B + 0.270GDK500J                 : ARR( 0.434E-13,  -900., 0.0);
+{  6015} G2D500C +PERO2              =  0.400G1D500F + 0.300GDO500B + 0.300GDK500J                 : ARR( 0.162E-13, -1400., 0.0);
+{  6016} G2D500C +PERO3              =  0.460G1D500F + 0.270GDO500B + 0.270GDK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{  6017} G2D500C +PERO5              =  0.460G1D500F + 0.270GDO500B + 0.270GDK500J                 : ARR( 0.183E-11,   450., 0.0);
+{  6018} G2D500C +PERO6              =  0.300G1D500F + 0.350GDO500B + 0.350GDK500J                 : ARR( 0.168E-13, -1300., 0.0);
+{  6019} G2D500C +PERO9              =  0.650G1D500F + 0.350GDK500J                                : ARR( 0.100E-10,     0., 0.0);
+{  6020} G1N400D                     =       GND3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  6021} G1D500F                     =       GDD5002 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  6022} G1D500F                     =       GDO3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  5404., 0.0);
+{  6023} G1D500F                     =       GDO4003 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{  6024} GND5007 +GHO                =       G3N5008                                               : ARR( 0.667E-10,     0., 0.0);
+{  6025} GND5007 +GNO3               =       G3N5008 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6026} GND5007+HV               =       G1D500G +      GNO2                                   :  0.100E+01*SUN;
+{  6027} GND5007+HV               =       G3N3000 +      G2D2000                                :  0.100E+01*SUN;
+{  6028} GND5007+HV               =       G2N400E +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  6029} G3N5008 +GHO2               =  0.800GGN5009 + 0.200GAN5009 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6030} G3N5008 +GNO                =       G2N400E +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6031} G3N5008 +GNO2               =       GPN5009                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6032} G3N5008 +GNO3               =       G2N400E +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6033} G3N5008 +MEPERO             =  0.685G2N400E + 0.315GAN5009 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6034} G3N5008 +PERO1              =  0.800G2N400E + 0.200GAN5009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6035} G3N5008 +PERO2              =  0.750G2N400E + 0.250GAN5009 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6036} G3N5008 +PERO3              =  0.800G2N400E + 0.200GAN5009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6037} G3N5008 +PERO5              =  0.650G2N400E + 0.350GAN5009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6038} G3N5008 +PERO6              =  0.650G2N400E + 0.350GAN5009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6039} G3N5008 +PERO9              =       G2N400E +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  6040} G1D500G +OXYGEN             =       GDD5003 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  6041} G1D500G                     =       G2D500D                                               : ARR( 0.160E+12,  5203., 0.0);
+{  6042} G2N400E +GNO                =       G1N400E +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  6043} G2N400E +GNO                =       GNN400C                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6044} G2N400E +GHO2               =       GHN400K                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6045} G2N400E +GNO3               =       G1N400E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6046} G2N400E +MEPERO             =  0.480G1N400E + 0.260GNK4002 + 0.260GND400B                 : ARR( 0.164E-12,  -795., 0.0);
+{  6047} G2N400E +PERO1              =  0.600G1N400E + 0.200GNK4002 + 0.200GND400B                 : ARR( 0.126E-12,  -850., 0.0);
+{  6048} G2N400E +PERO2              =  0.560G1N400E + 0.220GNK4002 + 0.220GND400B                 : ARR( 0.471E-13, -1350., 0.0);
+{  6049} G2N400E +PERO3              =  0.600G1N400E + 0.200GNK4002 + 0.200GND400B                 : ARR( 0.142E-12, -1200., 0.0);
+{  6050} G2N400E +PERO5              =  0.600G1N400E + 0.200GNK4002 + 0.200GND400B                 : ARR( 0.533E-11,   500., 0.0);
+{  6051} G2N400E +PERO6              =  0.460G1N400E + 0.270GNK4002 + 0.270GND400B                 : ARR( 0.488E-13, -1250., 0.0);
+{  6052} G2N400E +PERO9              =  0.800G1N400E + 0.200GND400B                                : ARR( 0.100E-10,     0., 0.0);
+{  6053} G2D500D +GNO                =       G1D500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6054} G2D500D +GNO                =       GND500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6055} G2D500D +GHO2               =       GHD500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6056} G2D500D +GNO3               =       G1D500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6057} G2D500D +MEPERO             =  0.340G1D500H + 0.330GDK500K + 0.330GDK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  6058} G2D500D +PERO1              =  0.460G1D500H + 0.270GDK500K + 0.270GDK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  6059} G2D500D +PERO2              =  0.400G1D500H + 0.300GDK500K + 0.300GDK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  6060} G2D500D +PERO3              =  0.460G1D500H + 0.270GDK500K + 0.270GDK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  6061} G2D500D +PERO5              =  0.460G1D500H + 0.270GDK500K + 0.270GDK500L                 : ARR( 0.183E-11,   450., 0.0);
+{  6062} G2D500D +PERO6              =  0.300G1D500H + 0.350GDK500K + 0.350GDK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  6063} G2D500D +PERO9              =  0.650G1D500H + 0.350GDK500L                                : ARR( 0.100E-10,     0., 0.0);
+{  6064} G1N400E                     =       G3N3000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  6065} G1D500H                     =       G3K3001 +      GDD2000                                : ARR( 0.200E+15,  4889., 0.0);
+{  6066} GGN5000 +GHO                =       G2G5005                                               : ARR( 0.149E-11,     0., 0.0);
+{  6067} GGN5000 +GHO                =       G2G5006                                               : ARR( 0.910E-12,     0., 0.0);
+{  6068} GGN5000 +GHO                =       G3N5000                                               : ARR( 0.201E-11,  -190., 0.0);
+{  6069} GGN5000+HV               =       G1G5005 +      GNO2                                   :  0.100E+01*SUN;
+{  6070} GGN5000+HV               =       G2N4000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  6071} G2G5005 +GNO                =       G1G5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6072} G2G5005 +GNO                =       GGN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6073} G2G5005 +GHO2               =       GGH5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6074} G2G5005 +GNO3               =       G1G5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6075} G2G5005 +MEPERO             =  0.480G1G5006 + 0.260GGN5008 + 0.260GGN5009                 : ARR( 0.616E-11,   905., 0.0);
+{  6076} G2G5005 +PERO1              =  0.600G1G5006 + 0.200GGN5008 + 0.200GGN5009                 : ARR( 0.473E-11,   850., 0.0);
+{  6077} G2G5005 +PERO2              =  0.560G1G5006 + 0.220GGN5008 + 0.220GGN5009                 : ARR( 0.177E-11,   350., 0.0);
+{  6078} G2G5005 +PERO3              =  0.600G1G5006 + 0.200GGN5008 + 0.200GGN5009                 : ARR( 0.533E-11,   500., 0.0);
+{  6079} G2G5005 +PERO5              =  0.600G1G5006 + 0.200GGN5008 + 0.200GGN5009                 : ARR( 0.200E-09,  2200., 0.0);
+{  6080} G2G5005 +PERO6              =  0.460G1G5006 + 0.270GGN5008 + 0.270GGN5009                 : ARR( 0.183E-11,   450., 0.0);
+{  6081} G2G5005 +PERO9              =  0.800G1G5006 + 0.200GGN5009                                : ARR( 0.100E-10,     0., 0.0);
+{  6082} G2G5006 +GNO                =       G1G5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6083} G2G5006 +GNO                =       GGN500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6084} G2G5006 +GHO2               =       GGH5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6085} G2G5006 +GNO3               =       G1G5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6086} G2G5006 +MEPERO             =  0.340G1G5007 + 0.330GGN500B + 0.330GGN500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  6087} G2G5006 +PERO1              =  0.460G1G5007 + 0.270GGN500B + 0.270GGN500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  6088} G2G5006 +PERO2              =  0.400G1G5007 + 0.300GGN500B + 0.300GGN500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  6089} G2G5006 +PERO3              =  0.460G1G5007 + 0.270GGN500B + 0.270GGN500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  6090} G2G5006 +PERO5              =  0.460G1G5007 + 0.270GGN500B + 0.270GGN500C                 : ARR( 0.183E-11,   450., 0.0);
+{  6091} G2G5006 +PERO6              =  0.300G1G5007 + 0.350GGN500B + 0.350GGN500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  6092} G2G5006 +PERO9              =  0.650G1G5007 + 0.350GGN500C                                : ARR( 0.100E-10,     0., 0.0);
+{  6093} G1G5005                     =       G2G5007                                               : ARR( 0.160E+12,  3221., 0.0);
+{  6094} G1G5006                     =       G2N2000 +      GGD3000                                : ARR( 0.200E+15,  6436., 0.0);
+{  6095} G1G5006                     =       GND3000 +      G2G2000                                : ARR( 0.200E+15,  7196., 0.0);
+{  6096} G1G5007                     =       GND4001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  6097} G2G5007 +GNO                =       G1G5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6098} G2G5007 +GNO                =       GGN500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6099} G2G5007 +GHO2               =       GGH5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6100} G2G5007 +GNO3               =       G1G5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6101} G2G5007 +MEPERO             =  0.340G1G5008 + 0.330GGO5007 + 0.330GGK5005                 : ARR( 0.565E-13,  -845., 0.0);
+{  6102} G2G5007 +PERO1              =  0.460G1G5008 + 0.270GGO5007 + 0.270GGK5005                 : ARR( 0.434E-13,  -900., 0.0);
+{  6103} G2G5007 +PERO2              =  0.400G1G5008 + 0.300GGO5007 + 0.300GGK5005                 : ARR( 0.162E-13, -1400., 0.0);
+{  6104} G2G5007 +PERO3              =  0.460G1G5008 + 0.270GGO5007 + 0.270GGK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  6105} G2G5007 +PERO5              =  0.460G1G5008 + 0.270GGO5007 + 0.270GGK5005                 : ARR( 0.183E-11,   450., 0.0);
+{  6106} G2G5007 +PERO6              =  0.300G1G5008 + 0.350GGO5007 + 0.350GGK5005                 : ARR( 0.168E-13, -1300., 0.0);
+{  6107} G2G5007 +PERO9              =  0.650G1G5008 + 0.350GGK5005                                : ARR( 0.100E-10,     0., 0.0);
+{  6108} G1G5008                     =       GGD5000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  6109} G1G5008                     =       GDO4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  6110} GAN5000 +GHO                =       G2A5005                                               : ARR( 0.648E-12,     0., 0.0);
+{  6111} GAN5000 +GHO                =       G2A5006                                               : ARR( 0.144E-11,     0., 0.0);
+{  6112} GAN5000 +GHO                =       G2A5007                                               : ARR( 0.287E-12,     0., 0.0);
+{  6113} GAN5000 +GHO                =       G2N4000 +      GCO2                                   : ARR( 0.528E-12,     0., 0.0);
+{  6114} GAN5000+HV               =       G1A5005 +      GNO2                                   :  0.100E+01*SUN;
+{  6115} G2A5005 +GNO                =       G1A5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6116} G2A5005 +GNO                =       GAN500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6117} G2A5005 +GHO2               =       GAH5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6118} G2A5005 +GNO3               =       G1A5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6119} G2A5005 +MEPERO             =  0.340G1A5006 + 0.330GAN500B + 0.330GAN500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  6120} G2A5005 +PERO1              =  0.460G1A5006 + 0.270GAN500B + 0.270GAN500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  6121} G2A5005 +PERO2              =  0.400G1A5006 + 0.300GAN500B + 0.300GAN500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  6122} G2A5005 +PERO3              =  0.460G1A5006 + 0.270GAN500B + 0.270GAN500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  6123} G2A5005 +PERO5              =  0.460G1A5006 + 0.270GAN500B + 0.270GAN500C                 : ARR( 0.183E-11,   450., 0.0);
+{  6124} G2A5005 +PERO6              =  0.300G1A5006 + 0.350GAN500B + 0.350GAN500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  6125} G2A5005 +PERO9              =  0.650G1A5006 + 0.350GAN500C                                : ARR( 0.100E-10,     0., 0.0);
+{  6126} G2A5006 +GNO                =       G1A5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6127} G2A5006 +GNO                =       GAN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6128} G2A5006 +GHO2               =       GAH5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6129} G2A5006 +GNO3               =       G1A5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6130} G2A5006 +MEPERO             =  0.480G1A5007 + 0.260GAN5008 + 0.260GAN5009                 : ARR( 0.616E-11,   905., 0.0);
+{  6131} G2A5006 +PERO1              =  0.600G1A5007 + 0.200GAN5008 + 0.200GAN5009                 : ARR( 0.473E-11,   850., 0.0);
+{  6132} G2A5006 +PERO2              =  0.560G1A5007 + 0.220GAN5008 + 0.220GAN5009                 : ARR( 0.177E-11,   350., 0.0);
+{  6133} G2A5006 +PERO3              =  0.600G1A5007 + 0.200GAN5008 + 0.200GAN5009                 : ARR( 0.533E-11,   500., 0.0);
+{  6134} G2A5006 +PERO5              =  0.600G1A5007 + 0.200GAN5008 + 0.200GAN5009                 : ARR( 0.200E-09,  2200., 0.0);
+{  6135} G2A5006 +PERO6              =  0.460G1A5007 + 0.270GAN5008 + 0.270GAN5009                 : ARR( 0.183E-11,   450., 0.0);
+{  6136} G2A5006 +PERO9              =  0.800G1A5007 + 0.200GAN5009                                : ARR( 0.100E-10,     0., 0.0);
+{  6137} G2A5007 +GNO                =       G1A5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6138} G2A5007 +GNO                =       GAN500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6139} G2A5007 +GHO2               =       GAH5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6140} G2A5007 +GNO3               =       G1A5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6141} G2A5007 +MEPERO             =  0.340G1A5008 + 0.330GAN5001 + 0.330GAN500E                 : ARR( 0.565E-13,  -845., 0.0);
+{  6142} G2A5007 +PERO1              =  0.460G1A5008 + 0.270GAN5001 + 0.270GAN500E                 : ARR( 0.434E-13,  -900., 0.0);
+{  6143} G2A5007 +PERO2              =  0.400G1A5008 + 0.300GAN5001 + 0.300GAN500E                 : ARR( 0.162E-13, -1400., 0.0);
+{  6144} G2A5007 +PERO3              =  0.460G1A5008 + 0.270GAN5001 + 0.270GAN500E                 : ARR( 0.488E-13, -1250., 0.0);
+{  6145} G2A5007 +PERO5              =  0.460G1A5008 + 0.270GAN5001 + 0.270GAN500E                 : ARR( 0.183E-11,   450., 0.0);
+{  6146} G2A5007 +PERO6              =  0.300G1A5008 + 0.350GAN5001 + 0.350GAN500E                 : ARR( 0.168E-13, -1300., 0.0);
+{  6147} G2A5007 +PERO9              =  0.650G1A5008 + 0.350GAN500E                                : ARR( 0.100E-10,     0., 0.0);
+{  6148} G1A5005 +OXYGEN             =       GAD5000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6149} G1A5005                     =       G2A5008                                               : ARR( 0.160E+12,  3356., 0.0);
+{  6150} G1A5006                     =       GCO     +      GND4001 +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  6151} G1A5007                     =       G2A2000 +      GND3000                                : ARR( 0.200E+15,  7196., 0.0);
+{  6152} G1A5007                     =       GAD3000 +      G2N2000                                : ARR( 0.200E+15,  6436., 0.0);
+{  6153} G1A5008                     =       G2A3000 +      GND2000                                : ARR( 0.200E+15,  7116., 0.0);
+{  6154} G2A5008 +GNO                =       G1A5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6155} G2A5008 +GNO                =       GAN500F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6156} G2A5008 +GHO2               =       GAH5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6157} G2A5008 +GNO3               =       G1A5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6158} G2A5008 +MEPERO             =  0.340G1A5009 + 0.330GAO5007 + 0.330GAK5005                 : ARR( 0.565E-13,  -845., 0.0);
+{  6159} G2A5008 +PERO1              =  0.460G1A5009 + 0.270GAO5007 + 0.270GAK5005                 : ARR( 0.434E-13,  -900., 0.0);
+{  6160} G2A5008 +PERO2              =  0.400G1A5009 + 0.300GAO5007 + 0.300GAK5005                 : ARR( 0.162E-13, -1400., 0.0);
+{  6161} G2A5008 +PERO3              =  0.460G1A5009 + 0.270GAO5007 + 0.270GAK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  6162} G2A5008 +PERO5              =  0.460G1A5009 + 0.270GAO5007 + 0.270GAK5005                 : ARR( 0.183E-11,   450., 0.0);
+{  6163} G2A5008 +PERO6              =  0.300G1A5009 + 0.350GAO5007 + 0.350GAK5005                 : ARR( 0.168E-13, -1300., 0.0);
+{  6164} G2A5008 +PERO9              =  0.650G1A5009 + 0.350GAK5005                                : ARR( 0.100E-10,     0., 0.0);
+{  6165} G1A5009                     =       GAD5001 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  6166} G1A5009                     =       GDO4000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  6167} GPN5000                     =       G3N5000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  6168} GPN5000 +GHO                =       G2P5005                                               : ARR( 0.288E-12,     0., 0.0);
+{  6169} GPN5000 +GHO                =       G2P5006                                               : ARR( 0.144E-11,     0., 0.0);
+{  6170} GPN5000 +GHO                =       G2P5007                                               : ARR( 0.877E-12,     0., 0.0);
+{  6171} GPN5000+HV               =       G1P5005 +      GNO2                                   :  0.100E+01*SUN;
+{  6172} GPN5000+HV               =       G3N5000 +      GNO2                                   :  0.100E+01*SUN;
+{  6173} G2P5005 +GNO                =       G1P5006 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6174} G2P5005 +GNO                =       GPN500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6175} G2P5005 +GHO2               =       GPH5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6176} G2P5005 +GNO3               =       G1P5006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6177} G2P5005 +MEPERO             =  0.340G1P5006 + 0.330GPN5001 + 0.330GPN500B                 : ARR( 0.565E-13,  -845., 0.0);
+{  6178} G2P5005 +PERO1              =  0.460G1P5006 + 0.270GPN5001 + 0.270GPN500B                 : ARR( 0.434E-13,  -900., 0.0);
+{  6179} G2P5005 +PERO2              =  0.400G1P5006 + 0.300GPN5001 + 0.300GPN500B                 : ARR( 0.162E-13, -1400., 0.0);
+{  6180} G2P5005 +PERO3              =  0.460G1P5006 + 0.270GPN5001 + 0.270GPN500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  6181} G2P5005 +PERO5              =  0.460G1P5006 + 0.270GPN5001 + 0.270GPN500B                 : ARR( 0.183E-11,   450., 0.0);
+{  6182} G2P5005 +PERO6              =  0.300G1P5006 + 0.350GPN5001 + 0.350GPN500B                 : ARR( 0.168E-13, -1300., 0.0);
+{  6183} G2P5005 +PERO9              =  0.650G1P5006 + 0.350GPN500B                                : ARR( 0.100E-10,     0., 0.0);
+{  6184} G2P5006 +GNO                =       G1P5007 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6185} G2P5006 +GNO                =       GPN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6186} G2P5006 +GHO2               =       GPH5006                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6187} G2P5006 +GNO3               =       G1P5007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6188} G2P5006 +MEPERO             =  0.480G1P5007 + 0.260GPN5008 + 0.260GPN5009                 : ARR( 0.616E-11,   905., 0.0);
+{  6189} G2P5006 +PERO1              =  0.600G1P5007 + 0.200GPN5008 + 0.200GPN5009                 : ARR( 0.473E-11,   850., 0.0);
+{  6190} G2P5006 +PERO2              =  0.560G1P5007 + 0.220GPN5008 + 0.220GPN5009                 : ARR( 0.177E-11,   350., 0.0);
+{  6191} G2P5006 +PERO3              =  0.600G1P5007 + 0.200GPN5008 + 0.200GPN5009                 : ARR( 0.533E-11,   500., 0.0);
+{  6192} G2P5006 +PERO5              =  0.600G1P5007 + 0.200GPN5008 + 0.200GPN5009                 : ARR( 0.200E-09,  2200., 0.0);
+{  6193} G2P5006 +PERO6              =  0.460G1P5007 + 0.270GPN5008 + 0.270GPN5009                 : ARR( 0.183E-11,   450., 0.0);
+{  6194} G2P5006 +PERO9              =  0.800G1P5007 + 0.200GPN5009                                : ARR( 0.100E-10,     0., 0.0);
+{  6195} G2P5007 +GNO                =       G1P5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6196} G2P5007 +GNO                =       GPN500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6197} G2P5007 +GHO2               =       GPH5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6198} G2P5007 +GNO3               =       G1P5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6199} G2P5007 +MEPERO             =  0.340G1P5008 + 0.330GPN500D + 0.330GPN500E                 : ARR( 0.565E-13,  -845., 0.0);
+{  6200} G2P5007 +PERO1              =  0.460G1P5008 + 0.270GPN500D + 0.270GPN500E                 : ARR( 0.434E-13,  -900., 0.0);
+{  6201} G2P5007 +PERO2              =  0.400G1P5008 + 0.300GPN500D + 0.300GPN500E                 : ARR( 0.162E-13, -1400., 0.0);
+{  6202} G2P5007 +PERO3              =  0.460G1P5008 + 0.270GPN500D + 0.270GPN500E                 : ARR( 0.488E-13, -1250., 0.0);
+{  6203} G2P5007 +PERO5              =  0.460G1P5008 + 0.270GPN500D + 0.270GPN500E                 : ARR( 0.183E-11,   450., 0.0);
+{  6204} G2P5007 +PERO6              =  0.300G1P5008 + 0.350GPN500D + 0.350GPN500E                 : ARR( 0.168E-13, -1300., 0.0);
+{  6205} G2P5007 +PERO9              =  0.650G1P5008 + 0.350GPN500E                                : ARR( 0.100E-10,     0., 0.0);
+{  6206} G1P5005                     =       G2P5008                                               : ARR( 0.160E+12,  3221., 0.0);
+{  6207} G1P5006                     =       GND2000 +      G2P3000                                : ARR( 0.200E+15,  7116., 0.0);
+{  6208} G1P5007                     =       G2N2000 +      GPD3000                                : ARR( 0.200E+15,  6436., 0.0);
+{  6209} G1P5007                     =       GND3000 +      G2P2000                                : ARR( 0.200E+15,  7196., 0.0);
+{  6210} G1P5008                     =       GND4001 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  6211} G2P5008 +GNO                =       G1P5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6212} G2P5008 +GNO                =       GPN500F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6213} G2P5008 +GHO2               =       GPH5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6214} G2P5008 +GNO3               =       G1P5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6215} G2P5008 +MEPERO             =  0.340G1P5009 + 0.330GPO5007 + 0.330GPK5005                 : ARR( 0.565E-13,  -845., 0.0);
+{  6216} G2P5008 +PERO1              =  0.460G1P5009 + 0.270GPO5007 + 0.270GPK5005                 : ARR( 0.434E-13,  -900., 0.0);
+{  6217} G2P5008 +PERO2              =  0.400G1P5009 + 0.300GPO5007 + 0.300GPK5005                 : ARR( 0.162E-13, -1400., 0.0);
+{  6218} G2P5008 +PERO3              =  0.460G1P5009 + 0.270GPO5007 + 0.270GPK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  6219} G2P5008 +PERO5              =  0.460G1P5009 + 0.270GPO5007 + 0.270GPK5005                 : ARR( 0.183E-11,   450., 0.0);
+{  6220} G2P5008 +PERO6              =  0.300G1P5009 + 0.350GPO5007 + 0.350GPK5005                 : ARR( 0.168E-13, -1300., 0.0);
+{  6221} G2P5008 +PERO9              =  0.650G1P5009 + 0.350GPK5005                                : ARR( 0.100E-10,     0., 0.0);
+{  6222} G1P5009                     =       GPD5000 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  6223} G1P5009                     =       GDO4000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  6224} GNN4000 +GHO                =       GND4001 +      GNO2                                   : ARR( 0.919E-13,     0., 0.0);
+{  6225} GNN4000 +GHO                =       G2N400F                                               : ARR( 0.565E-12,     0., 0.0);
+{  6226} GNN4000+HV               =       G1N4000 +      GNO2                                   :  0.200E+01*SUN;
+{  6227} G2N400F +GNO                =       G1N400F +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  6228} G2N400F +GNO                =       GNN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6229} G2N400F +GHO2               =       GHN400I                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6230} G2N400F +GNO3               =       G1N400F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6231} G2N400F +MEPERO             =  0.340G1N400F + 0.330GNN4002 + 0.330GNN400C                 : ARR( 0.565E-13,  -845., 0.0);
+{  6232} G2N400F +PERO1              =  0.460G1N400F + 0.270GNN4002 + 0.270GNN400C                 : ARR( 0.434E-13,  -900., 0.0);
+{  6233} G2N400F +PERO2              =  0.400G1N400F + 0.300GNN4002 + 0.300GNN400C                 : ARR( 0.162E-13, -1400., 0.0);
+{  6234} G2N400F +PERO3              =  0.460G1N400F + 0.270GNN4002 + 0.270GNN400C                 : ARR( 0.488E-13, -1250., 0.0);
+{  6235} G2N400F +PERO5              =  0.460G1N400F + 0.270GNN4002 + 0.270GNN400C                 : ARR( 0.183E-11,   450., 0.0);
+{  6236} G2N400F +PERO6              =  0.300G1N400F + 0.350GNN4002 + 0.350GNN400C                 : ARR( 0.168E-13, -1300., 0.0);
+{  6237} G2N400F +PERO9              =  0.650G1N400F + 0.350GNN400C                                : ARR( 0.100E-10,     0., 0.0);
+{  6238} G1N400F                     =       G2N2000 +      GND2000                                : ARR( 0.200E+15,  7131., 0.0);
+{  6239} GHN4000 +GHO                =       G2H400C                                               : ARR( 0.144E-11,     0., 0.0);
+{  6240} GHN4000 +GHO                =       GND4001 +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{  6241} GHN4000 +GHO                =       G2N4000                                               : ARR( 0.193E-11,  -190., 0.0);
+{  6242} GHN4000+HV               =       G1H400C +      GNO2                                   :  0.100E+01*SUN;
+{  6243} GHN4000+HV               =       G1N4000 +      GHO                                    :  0.100E+01*SUN;
+{  6244} G2H400C +GNO                =       G1H400D +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  6245} G2H400C +GNO                =       GHN400H                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6246} G2H400C +GHO2               =       GHH4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6247} G2H400C +GNO3               =       G1H400D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6248} G2H400C +MEPERO             =  0.340G1H400D + 0.330GHN4003 + 0.330GHN400K                 : ARR( 0.565E-13,  -845., 0.0);
+{  6249} G2H400C +PERO1              =  0.460G1H400D + 0.270GHN4003 + 0.270GHN400K                 : ARR( 0.434E-13,  -900., 0.0);
+{  6250} G2H400C +PERO2              =  0.400G1H400D + 0.300GHN4003 + 0.300GHN400K                 : ARR( 0.162E-13, -1400., 0.0);
+{  6251} G2H400C +PERO3              =  0.460G1H400D + 0.270GHN4003 + 0.270GHN400K                 : ARR( 0.488E-13, -1250., 0.0);
+{  6252} G2H400C +PERO5              =  0.460G1H400D + 0.270GHN4003 + 0.270GHN400K                 : ARR( 0.183E-11,   450., 0.0);
+{  6253} G2H400C +PERO6              =  0.300G1H400D + 0.350GHN4003 + 0.350GHN400K                 : ARR( 0.168E-13, -1300., 0.0);
+{  6254} G2H400C +PERO9              =  0.650G1H400D + 0.350GHN400K                                : ARR( 0.100E-10,     0., 0.0);
+{  6255} G1H400C                     =       GDO4000 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{  6256} G1H400D                     =       G2N2000 +      GHD2000                                : ARR( 0.200E+15,  7134., 0.0);
+{  6257} G1H400D                     =       GND3000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  6258} GND5008 +GHO                =       GND500d +      GHO2                                   : ARR( 0.423E-11,     0., 0.0);
+{  6259} GND5008 +GHO                =       G2N501r                                               : ARR( 0.149E-11,     0., 0.0);
+{  6260} GND5008 +GHO                =       G3N5009                                               : ARR( 0.437E-11,     0., 0.0);
+{  6261} GND5008 +GNO3               =       G3N5009 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6262} GND5008+HV               =       G1D5003 +      GNO2                                   :  0.100E+01*SUN;
+{  6263} GND5008+HV               =       GDO4000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  6264} GND5008+HV               =       GUO3000 +      GND2000                                :  0.100E+01*SUN;
+{  6265} G2N501r +GNO                =       G1N501w +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6266} G2N501r +GNO                =       GNN501T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6267} G2N501r +GHO2               =       GHN502S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6268} G2N501r +GNO3               =       G1N501w +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6269} G2N501r +MEPERO             =  0.340G1N501w + 0.330GND500B + 0.330GND500e                 : ARR( 0.565E-13,  -845., 0.0);
+{  6270} G2N501r +PERO1              =  0.460G1N501w + 0.270GND500B + 0.270GND500e                 : ARR( 0.434E-13,  -900., 0.0);
+{  6271} G2N501r +PERO2              =  0.400G1N501w + 0.300GND500B + 0.300GND500e                 : ARR( 0.162E-13, -1400., 0.0);
+{  6272} G2N501r +PERO3              =  0.460G1N501w + 0.270GND500B + 0.270GND500e                 : ARR( 0.488E-13, -1250., 0.0);
+{  6273} G2N501r +PERO5              =  0.460G1N501w + 0.270GND500B + 0.270GND500e                 : ARR( 0.183E-11,   450., 0.0);
+{  6274} G2N501r +PERO6              =  0.300G1N501w + 0.350GND500B + 0.350GND500e                 : ARR( 0.168E-13, -1300., 0.0);
+{  6275} G2N501r +PERO9              =  0.650G1N501w + 0.350GND500e                                : ARR( 0.100E-10,     0., 0.0);
+{  6276} G3N5009 +GHO2               =  0.800GGN500D + 0.200GAN500F + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6277} G3N5009 +GNO                =       GDO4000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6278} G3N5009 +GNO2               =       GPN500F                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6279} G3N5009 +GNO3               =       GDO4000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6280} G3N5009 +MEPERO             =  0.685GDO4000 + 0.315GAN500F + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6281} G3N5009 +PERO1              =  0.800GDO4000 + 0.200GAN500F + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6282} G3N5009 +PERO2              =  0.750GDO4000 + 0.250GAN500F + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6283} G3N5009 +PERO3              =  0.800GDO4000 + 0.200GAN500F + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6284} G3N5009 +PERO5              =  0.650GDO4000 + 0.350GAN500F + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6285} G3N5009 +PERO6              =  0.650GDO4000 + 0.350GAN500F + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6286} G3N5009 +PERO9              =       GDO4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  6287} G1N501w                     =       GCH2O   +      GND400D +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  6288} GHD5004 +GHO                =       GHD500R +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  6289} GHD5004 +GHO                =       G2H500m                                               : ARR( 0.460E-11,     0., 0.0);
+{  6290} GHD5004 +GHO                =       GDK5004 +      GHO                                    : ARR( 0.258E-10,     0., 0.0);
+{  6291} GHD5004 +GHO                =       G3H5005                                               : ARR( 0.213E-10,     0., 0.0);
+{  6292} GHD5004 +GHO                =       G2D5002                                               : ARR( 0.195E-11,  -190., 0.0);
+{  6293} GHD5004 +GNO3               =       G3H5005 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6294} GHD5004+HV               =       G1D5003 +      GHO                                    :  0.100E+01*SUN;
+{  6295} GHD5004+HV               =       GDO4000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{  6296} G2H500m +GNO                =       G1H5018 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6297} G2H500m +GNO                =       GHN502Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6298} G2H500m +GHO2               =       GHH500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6299} G2H500m +GNO3               =       G1H5018 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6300} G2H500m +MEPERO             =  0.340G1H5018 + 0.330GHD500P + 0.330GHD500Q                 : ARR( 0.565E-13,  -845., 0.0);
+{  6301} G2H500m +PERO1              =  0.460G1H5018 + 0.270GHD500P + 0.270GHD500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{  6302} G2H500m +PERO2              =  0.400G1H5018 + 0.300GHD500P + 0.300GHD500Q                 : ARR( 0.162E-13, -1400., 0.0);
+{  6303} G2H500m +PERO3              =  0.460G1H5018 + 0.270GHD500P + 0.270GHD500Q                 : ARR( 0.488E-13, -1250., 0.0);
+{  6304} G2H500m +PERO5              =  0.460G1H5018 + 0.270GHD500P + 0.270GHD500Q                 : ARR( 0.183E-11,   450., 0.0);
+{  6305} G2H500m +PERO6              =  0.300G1H5018 + 0.350GHD500P + 0.350GHD500Q                 : ARR( 0.168E-13, -1300., 0.0);
+{  6306} G2H500m +PERO9              =  0.650G1H5018 + 0.350GHD500Q                                : ARR( 0.100E-10,     0., 0.0);
+{  6307} G3H5005 +GHO2               =  0.800GGH5008 + 0.200GAH5009 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6308} G3H5005 +GNO                =       GDO4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  6309} G3H5005 +GNO2               =       GPH5009                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6310} G3H5005 +GNO3               =       GDO4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  6311} G3H5005 +MEPERO             =  0.685GDO4000 + 0.315GAH5009 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6312} G3H5005 +PERO1              =  0.800GDO4000 + 0.200GAH5009 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6313} G3H5005 +PERO2              =  0.750GDO4000 + 0.250GAH5009 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6314} G3H5005 +PERO3              =  0.800GDO4000 + 0.200GAH5009 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6315} G3H5005 +PERO5              =  0.650GDO4000 + 0.350GAH5009 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6316} G3H5005 +PERO6              =  0.650GDO4000 + 0.350GAH5009 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6317} G3H5005 +PERO9              =       GDO4000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  6318} G1H5018                     =       GDO3000 +      GDD2000 +      GHO                     : ARR( 0.200E+15,  4662., 0.0);
+{  6319} GDO5006 +GHO                =       GDD5000 +      GHO2                                   : ARR( 0.421E-11,     0., 0.0);
+{  6320} GDO5006 +GHO                =       G2D500E                                               : ARR( 0.469E-11,     0., 0.0);
+{  6321} GDO5006 +GHO                =       GDK5004 +      GHO2                                   : ARR( 0.658E-11,     0., 0.0);
+{  6322} GDO5006 +GHO                =       G3K500A                                               : ARR( 0.218E-10,     0., 0.0);
+{  6323} GDO5006 +GNO3               =       G3K500A +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6324} GDO5006+HV               =       GDO4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  6325} G2D500E +GNO                =       G1D500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6326} G2D500E +GNO                =       GND500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6327} G2D500E +GHO2               =       GHD500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6328} G2D500E +GNO3               =       G1D500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6329} G2D500E +MEPERO             =  0.340G1D500I + 0.330GDO500B + 0.330GDK500K                 : ARR( 0.565E-13,  -845., 0.0);
+{  6330} G2D500E +PERO1              =  0.460G1D500I + 0.270GDO500B + 0.270GDK500K                 : ARR( 0.434E-13,  -900., 0.0);
+{  6331} G2D500E +PERO2              =  0.400G1D500I + 0.300GDO500B + 0.300GDK500K                 : ARR( 0.162E-13, -1400., 0.0);
+{  6332} G2D500E +PERO3              =  0.460G1D500I + 0.270GDO500B + 0.270GDK500K                 : ARR( 0.488E-13, -1250., 0.0);
+{  6333} G2D500E +PERO5              =  0.460G1D500I + 0.270GDO500B + 0.270GDK500K                 : ARR( 0.183E-11,   450., 0.0);
+{  6334} G2D500E +PERO6              =  0.300G1D500I + 0.350GDO500B + 0.350GDK500K                 : ARR( 0.168E-13, -1300., 0.0);
+{  6335} G2D500E +PERO9              =  0.650G1D500I + 0.350GDK500K                                : ARR( 0.100E-10,     0., 0.0);
+{  6336} G3K500A +GHO2               =  0.800GGO5007 + 0.200GAO5007 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6337} G3K500A +GNO                =       GDO4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  6338} G3K500A +GNO2               =       GPO5007                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6339} G3K500A +GNO3               =       GDO4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  6340} G3K500A +MEPERO             =  0.685GDO4000 + 0.315GAO5007 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6341} G3K500A +PERO1              =  0.800GDO4000 + 0.200GAO5007 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6342} G3K500A +PERO2              =  0.750GDO4000 + 0.250GAO5007 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6343} G3K500A +PERO3              =  0.800GDO4000 + 0.200GAO5007 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6344} G3K500A +PERO5              =  0.650GDO4000 + 0.350GAO5007 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6345} G3K500A +PERO6              =  0.650GDO4000 + 0.350GAO5007 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6346} G3K500A +PERO9              =       GDO4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  6347} G1D500I                     =       GDO3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3453., 0.0);
+{  6348} GDK5004 +GHO                =       GDD5004 +      GHO2                                   : ARR( 0.421E-11,     0., 0.0);
+{  6349} GDK5004 +GHO                =       G2D500F                                               : ARR( 0.469E-11,     0., 0.0);
+{  6350} GDK5004 +GHO                =       G3K4002 +      GCO                                    : ARR( 0.133E-10,     0., 0.0);
+{  6351} GDK5004 +GNO3               =       G3K4002 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  6352} GDK5004+HV               =       G3K4002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  6353} GDK5004+HV               =       GDO4000 +      GCO                                    :  0.100E+01*SUN;
+{  6354} GDK5004+HV               =       GO03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  6355} G2D500F +GNO                =       G1D500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6356} G2D500F +GNO                =       GND500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6357} G2D500F +GHO2               =       GHD500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6358} G2D500F +GNO3               =       G1D500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6359} G2D500F +MEPERO             =  0.340G1D500J + 0.330GDK5005 + 0.330GDK500M                 : ARR( 0.565E-13,  -845., 0.0);
+{  6360} G2D500F +PERO1              =  0.460G1D500J + 0.270GDK5005 + 0.270GDK500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  6361} G2D500F +PERO2              =  0.400G1D500J + 0.300GDK5005 + 0.300GDK500M                 : ARR( 0.162E-13, -1400., 0.0);
+{  6362} G2D500F +PERO3              =  0.460G1D500J + 0.270GDK5005 + 0.270GDK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{  6363} G2D500F +PERO5              =  0.460G1D500J + 0.270GDK5005 + 0.270GDK500M                 : ARR( 0.183E-11,   450., 0.0);
+{  6364} G2D500F +PERO6              =  0.300G1D500J + 0.350GDK5005 + 0.350GDK500M                 : ARR( 0.168E-13, -1300., 0.0);
+{  6365} G2D500F +PERO9              =  0.650G1D500J + 0.350GDK500M                                : ARR( 0.100E-10,     0., 0.0);
+{  6366} G1D500J                     =       GCH2O   +      GDD4002 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  6367} GDD5000 +GHO                =       G3D5000                                               : ARR( 0.211E-10,     0., 0.0);
+{  6368} GDD5000 +GHO                =       G2D500G                                               : ARR( 0.144E-10,     0., 0.0);
+{  6369} GDD5000 +GHO                =       GDD5004 +      GHO2                                   : ARR( 0.638E-11,     0., 0.0);
+{  6370} GDD5000 +GHO                =       G3D5001                                               : ARR( 0.211E-10,     0., 0.0);
+{  6371} GDD5000 +GNO3               =       G3D5000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6372} GDD5000 +GNO3               =       G3D5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6373} GDD5000+HV               =       GCO     +      G2D4003 +      GHO2                    :  0.100E+01*SUN;
+{  6374} GDD5000+HV               =       GD02000 +      GDK3000                                :  0.100E+01*SUN;
+{  6375} GDD5000+HV               =       GDD4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  6376} G3D5000 +GHO2               =  0.800GGD5001 + 0.200GAD5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6377} G3D5000 +GNO                =       G2D4003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6378} G3D5000 +GNO2               =       GPD5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6379} G3D5000 +GNO3               =       G2D4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6380} G3D5000 +MEPERO             =  0.685G2D4003 + 0.315GAD5002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6381} G3D5000 +PERO1              =  0.800G2D4003 + 0.200GAD5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6382} G3D5000 +PERO2              =  0.750G2D4003 + 0.250GAD5002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6383} G3D5000 +PERO3              =  0.800G2D4003 + 0.200GAD5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6384} G3D5000 +PERO5              =  0.650G2D4003 + 0.350GAD5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6385} G3D5000 +PERO6              =  0.650G2D4003 + 0.350GAD5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6386} G3D5000 +PERO9              =       G2D4003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  6387} G2D500G +GNO                =       G1D500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6388} G2D500G +GNO                =       GND500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6389} G2D500G +GHO2               =       GHD500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6390} G2D500G +GNO3               =       G1D500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6391} G2D500G +MEPERO             =  0.340G1D500K + 0.330GDD5002 + 0.330GDD5005                 : ARR( 0.565E-13,  -845., 0.0);
+{  6392} G2D500G +PERO1              =  0.460G1D500K + 0.270GDD5002 + 0.270GDD5005                 : ARR( 0.434E-13,  -900., 0.0);
+{  6393} G2D500G +PERO2              =  0.400G1D500K + 0.300GDD5002 + 0.300GDD5005                 : ARR( 0.162E-13, -1400., 0.0);
+{  6394} G2D500G +PERO3              =  0.460G1D500K + 0.270GDD5002 + 0.270GDD5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  6395} G2D500G +PERO5              =  0.460G1D500K + 0.270GDD5002 + 0.270GDD5005                 : ARR( 0.183E-11,   450., 0.0);
+{  6396} G2D500G +PERO6              =  0.300G1D500K + 0.350GDD5002 + 0.350GDD5005                 : ARR( 0.168E-13, -1300., 0.0);
+{  6397} G2D500G +PERO9              =  0.650G1D500K + 0.350GDD5005                                : ARR( 0.100E-10,     0., 0.0);
+{  6398} G3D5001 +GHO2               =  0.800GGD5000 + 0.200GAD5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6399} G3D5001 +GNO                =       GDD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  6400} G3D5001 +GNO2               =       GPD5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6401} G3D5001 +GNO3               =       GDD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  6402} G3D5001 +MEPERO             =  0.685GDD4000 + 0.315GAD5001 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6403} G3D5001 +PERO1              =  0.800GDD4000 + 0.200GAD5001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6404} G3D5001 +PERO2              =  0.750GDD4000 + 0.250GAD5001 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6405} G3D5001 +PERO3              =  0.800GDD4000 + 0.200GAD5001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6406} G3D5001 +PERO5              =  0.650GDD4000 + 0.350GAD5001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6407} G3D5001 +PERO6              =  0.650GDD4000 + 0.350GAD5001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6408} G3D5001 +PERO9              =       GDD4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  6409} G2D4003 +GNO                =       G1D4004 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  6410} G2D4003 +GNO                =       GND400C                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6411} G2D4003 +GHO2               =       GHD400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6412} G2D4003 +GNO3               =       G1D4004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6413} G2D4003 +MEPERO             =  0.480G1D4004 + 0.260GDO4003 + 0.260GDD4001                 : ARR( 0.146E-12,  -445., 0.0);
+{  6414} G2D4003 +PERO1              =  0.600G1D4004 + 0.200GDO4003 + 0.200GDD4001                 : ARR( 0.112E-12,  -500., 0.0);
+{  6415} G2D4003 +PERO2              =  0.560G1D4004 + 0.220GDO4003 + 0.220GDD4001                 : ARR( 0.418E-13, -1000., 0.0);
+{  6416} G2D4003 +PERO3              =  0.600G1D4004 + 0.200GDO4003 + 0.200GDD4001                 : ARR( 0.126E-12,  -850., 0.0);
+{  6417} G2D4003 +PERO5              =  0.600G1D4004 + 0.200GDO4003 + 0.200GDD4001                 : ARR( 0.473E-11,   850., 0.0);
+{  6418} G2D4003 +PERO6              =  0.460G1D4004 + 0.270GDO4003 + 0.270GDD4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  6419} G2D4003 +PERO9              =  0.800G1D4004 + 0.200GDD4001                                : ARR( 0.100E-10,     0., 0.0);
+{  6420} G1D500K                     =       GDD2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  3070., 0.0);
+{  6421} G1D4004 +OXYGEN             =       GDD4001 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6422} G1D4004                     =       G3K4006                                               : ARR( 0.800E+11,  4559., 0.0);
+{  6423} GNN500K +GHO                =       G2N501s                                               : ARR( 0.335E-13,     0., 0.0);
+{  6424} GNN500K +GHO                =       GNN500U +      GNO2                                   : ARR( 0.191E-13,     0., 0.0);
+{  6425} GNN500K +GHO                =       GNN500M +      GNO2                                   : ARR( 0.236E-13,     0., 0.0);
+{  6426} GNN500K +GHO                =       G2N501t                                               : ARR( 0.565E-13,     0., 0.0);
+{  6427} GNN500K +GHO                =       GNN500x +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  6428} GNN500K+HV               =       G1N500T +      GNO2                                   :  0.100E+01*SUN;
+{  6429} GNN500K+HV               =       G1N500L +      GNO2                                   :  0.100E+01*SUN;
+{  6430} GNN500K+HV               =       G1N5018 +      GNO2                                   :  0.100E+01*SUN;
+{  6431} G2N501s +GNO                =       G1N501x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6432} G2N501s +GNO                =       GNN501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6433} G2N501s +GHO2               =       GHN502T                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6434} G2N501s +GNO3               =       G1N501x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6435} G2N501s +MEPERO             =  0.480G1N501x + 0.260GNN501N + 0.260GNN501U                 : ARR( 0.164E-12,  -795., 0.0);
+{  6436} G2N501s +PERO1              =  0.600G1N501x + 0.200GNN501N + 0.200GNN501U                 : ARR( 0.126E-12,  -850., 0.0);
+{  6437} G2N501s +PERO2              =  0.560G1N501x + 0.220GNN501N + 0.220GNN501U                 : ARR( 0.471E-13, -1350., 0.0);
+{  6438} G2N501s +PERO3              =  0.600G1N501x + 0.200GNN501N + 0.200GNN501U                 : ARR( 0.142E-12, -1200., 0.0);
+{  6439} G2N501s +PERO5              =  0.600G1N501x + 0.200GNN501N + 0.200GNN501U                 : ARR( 0.533E-11,   500., 0.0);
+{  6440} G2N501s +PERO6              =  0.460G1N501x + 0.270GNN501N + 0.270GNN501U                 : ARR( 0.488E-13, -1250., 0.0);
+{  6441} G2N501s +PERO9              =  0.800G1N501x + 0.200GNN501U                                : ARR( 0.100E-10,     0., 0.0);
+{  6442} G2N501t +GNO                =       G1N501y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6443} G2N501t +GNO                =       GNN501W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6444} G2N501t +GHO2               =       GHN502U                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6445} G2N501t +GNO3               =       G1N501y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6446} G2N501t +MEPERO             =  0.340G1N501y + 0.330GNN501X + 0.330GNN501Y                 : ARR( 0.565E-13,  -845., 0.0);
+{  6447} G2N501t +PERO1              =  0.460G1N501y + 0.270GNN501X + 0.270GNN501Y                 : ARR( 0.434E-13,  -900., 0.0);
+{  6448} G2N501t +PERO2              =  0.400G1N501y + 0.300GNN501X + 0.300GNN501Y                 : ARR( 0.162E-13, -1400., 0.0);
+{  6449} G2N501t +PERO3              =  0.460G1N501y + 0.270GNN501X + 0.270GNN501Y                 : ARR( 0.488E-13, -1250., 0.0);
+{  6450} G2N501t +PERO5              =  0.460G1N501y + 0.270GNN501X + 0.270GNN501Y                 : ARR( 0.183E-11,   450., 0.0);
+{  6451} G2N501t +PERO6              =  0.300G1N501y + 0.350GNN501X + 0.350GNN501Y                 : ARR( 0.168E-13, -1300., 0.0);
+{  6452} G2N501t +PERO9              =  0.650G1N501y + 0.350GNN501Y                                : ARR( 0.100E-10,     0., 0.0);
+{  6453} G1N501x +OXYGEN             =       GNN501U +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  6454} G1N501x                     =       G2N501u                                               : ARR( 0.160E+12,  4439., 0.0);
+{  6455} G1N501x                     =       GNN4008 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{  6456} G1N501y                     =       G2N501v                                               : ARR( 0.240E+12,  4897., 0.0);
+{  6457} G1N501y                     =       GND3001 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6232., 0.0);
+{  6458} G2N501u +GNO                =       G1N501z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6459} G2N501u +GNO                =       GNN501Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6460} G2N501u +GHO2               =       GHN502W                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6461} G2N501u +GNO3               =       G1N501z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6462} G2N501u +MEPERO             =  0.340G1N501z + 0.330GNN501a + 0.330GNN501b                 : ARR( 0.565E-13,  -845., 0.0);
+{  6463} G2N501u +PERO1              =  0.460G1N501z + 0.270GNN501a + 0.270GNN501b                 : ARR( 0.434E-13,  -900., 0.0);
+{  6464} G2N501u +PERO2              =  0.400G1N501z + 0.300GNN501a + 0.300GNN501b                 : ARR( 0.162E-13, -1400., 0.0);
+{  6465} G2N501u +PERO3              =  0.460G1N501z + 0.270GNN501a + 0.270GNN501b                 : ARR( 0.488E-13, -1250., 0.0);
+{  6466} G2N501u +PERO5              =  0.460G1N501z + 0.270GNN501a + 0.270GNN501b                 : ARR( 0.183E-11,   450., 0.0);
+{  6467} G2N501u +PERO6              =  0.300G1N501z + 0.350GNN501a + 0.350GNN501b                 : ARR( 0.168E-13, -1300., 0.0);
+{  6468} G2N501u +PERO9              =  0.650G1N501z + 0.350GNN501b                                : ARR( 0.100E-10,     0., 0.0);
+{  6469} G2N501v +GNO                =       G1N5021 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6470} G2N501v +GNO                =       GNN501c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6471} G2N501v +GHO2               =       GHN502X                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6472} G2N501v +GNO3               =       G1N5021 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6473} G2N501v +MEPERO             =  0.480G1N5021 + 0.260GNN501a + 0.260GNN501d                 : ARR( 0.164E-12,  -795., 0.0);
+{  6474} G2N501v +PERO1              =  0.600G1N5021 + 0.200GNN501a + 0.200GNN501d                 : ARR( 0.126E-12,  -850., 0.0);
+{  6475} G2N501v +PERO2              =  0.560G1N5021 + 0.220GNN501a + 0.220GNN501d                 : ARR( 0.471E-13, -1350., 0.0);
+{  6476} G2N501v +PERO3              =  0.600G1N5021 + 0.200GNN501a + 0.200GNN501d                 : ARR( 0.142E-12, -1200., 0.0);
+{  6477} G2N501v +PERO5              =  0.600G1N5021 + 0.200GNN501a + 0.200GNN501d                 : ARR( 0.533E-11,   500., 0.0);
+{  6478} G2N501v +PERO6              =  0.460G1N5021 + 0.270GNN501a + 0.270GNN501d                 : ARR( 0.488E-13, -1250., 0.0);
+{  6479} G2N501v +PERO9              =  0.800G1N5021 + 0.200GNN501d                                : ARR( 0.100E-10,     0., 0.0);
+{  6480} G1N501z                     =       GNN501d +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  6481} G1N501z                     =       GND3004 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6232., 0.0);
+{  6482} G1N5021 +OXYGEN             =       GNN501d +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  6483} G1N5021                     =       GNN501b +      GHO2                                   : ARR( 0.800E+11,  3464., 0.0);
+{  6484} GHN500T +GHO                =       GNN500M +      GHO                                    : ARR( 0.856E-11,     0., 0.0);
+{  6485} GHN500T +GHO                =       G2N500L                                               : ARR( 0.197E-11,  -190., 0.0);
+{  6486} GHN500T+HV               =       G1H5019 +      GNO2                                   :  0.100E+01*SUN;
+{  6487} GHN500T+HV               =       G1N500L +      GHO                                    :  0.100E+01*SUN;
+{  6488} GHN500T+HV               =       G1H501A +      GNO2                                   :  0.100E+01*SUN;
+{  6489} G1H5019                     =       GD02000 +      GND3000 +      GHO                     : ARR( 0.200E+15,  4945., 0.0);
+{  6490} G1H501A +OXYGEN             =       GHN502Y +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6491} G1H501A                     =       GHK5008 +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{  6492} GNN500L +GHO                =       GNN500M +      GHO2                                   : ARR( 0.221E-11,     0., 0.0);
+{  6493} GNN500L +GHO                =       G2N501w                                               : ARR( 0.303E-12,     0., 0.0);
+{  6494} GNN500L +GHO                =       G1N500L                                               : ARR( 0.225E-17,    85., 2.0);
+{  6495} GNN500L+HV               =       G1N500Y +      GNO2                                   :  0.100E+01*SUN;
+{  6496} GNN500L+HV               =       G1N5022 +      GNO2                                   :  0.100E+01*SUN;
+{  6497} G2N501w +GNO                =       G1N5023 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6498} G2N501w +GNO                =       GNN501e                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6499} G2N501w +GHO2               =       GHN502Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6500} G2N501w +GNO3               =       G1N5023 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6501} G2N501w +MEPERO             =  0.340G1N5023 + 0.330GNN501f + 0.330GNN501g                 : ARR( 0.565E-13,  -845., 0.0);
+{  6502} G2N501w +PERO1              =  0.460G1N5023 + 0.270GNN501f + 0.270GNN501g                 : ARR( 0.434E-13,  -900., 0.0);
+{  6503} G2N501w +PERO2              =  0.400G1N5023 + 0.300GNN501f + 0.300GNN501g                 : ARR( 0.162E-13, -1400., 0.0);
+{  6504} G2N501w +PERO3              =  0.460G1N5023 + 0.270GNN501f + 0.270GNN501g                 : ARR( 0.488E-13, -1250., 0.0);
+{  6505} G2N501w +PERO5              =  0.460G1N5023 + 0.270GNN501f + 0.270GNN501g                 : ARR( 0.183E-11,   450., 0.0);
+{  6506} G2N501w +PERO6              =  0.300G1N5023 + 0.350GNN501f + 0.350GNN501g                 : ARR( 0.168E-13, -1300., 0.0);
+{  6507} G2N501w +PERO9              =  0.650G1N5023 + 0.350GNN501g                                : ARR( 0.100E-10,     0., 0.0);
+{  6508} G1N5022 +OXYGEN             =       GND500f +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6509} G1N5022                     =       GKO500B +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{  6510} G1N5023                     =       GND3001 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3484., 0.0);
+{  6511} GNN500M +GHO                =       G2N501x                                               : ARR( 0.335E-13,     0., 0.0);
+{  6512} GNN500M +GHO                =       GNK500G +      GNO2                                   : ARR( 0.584E-13,     0., 0.0);
+{  6513} GNN500M +GHO                =       G2N501y                                               : ARR( 0.172E-12,     0., 0.0);
+{  6514} GNN500M +GHO                =       GND500M +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{  6515} GNN500M+HV               =       G1N500a +      GNO2                                   :  0.100E+01*SUN;
+{  6516} GNN500M+HV               =       G3N3001 +      G2N2000                                :  0.100E+01*SUN;
+{  6517} GNN500M+HV               =       G1N501E +      GNO2                                   :  0.100E+01*SUN;
+{  6518} G2N501x +GNO                =       G1N5024 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6519} G2N501x +GNO                =       GNN501G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6520} G2N501x +GHO2               =       GHN502a                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6521} G2N501x +GNO3               =       G1N5024 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6522} G2N501x +MEPERO             =  0.480G1N5024 + 0.260GNN501P + 0.260GNN501h                 : ARR( 0.164E-12,  -795., 0.0);
+{  6523} G2N501x +PERO1              =  0.600G1N5024 + 0.200GNN501P + 0.200GNN501h                 : ARR( 0.126E-12,  -850., 0.0);
+{  6524} G2N501x +PERO2              =  0.560G1N5024 + 0.220GNN501P + 0.220GNN501h                 : ARR( 0.471E-13, -1350., 0.0);
+{  6525} G2N501x +PERO3              =  0.600G1N5024 + 0.200GNN501P + 0.200GNN501h                 : ARR( 0.142E-12, -1200., 0.0);
+{  6526} G2N501x +PERO5              =  0.600G1N5024 + 0.200GNN501P + 0.200GNN501h                 : ARR( 0.533E-11,   500., 0.0);
+{  6527} G2N501x +PERO6              =  0.460G1N5024 + 0.270GNN501P + 0.270GNN501h                 : ARR( 0.488E-13, -1250., 0.0);
+{  6528} G2N501x +PERO9              =  0.800G1N5024 + 0.200GNN501h                                : ARR( 0.100E-10,     0., 0.0);
+{  6529} G2N501y +GNO                =       G1N5025 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6530} G2N501y +GNO                =       GNN501i                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6531} G2N501y +GHO2               =       GHN502b                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6532} G2N501y +GNO3               =       G1N5025 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6533} G2N501y +MEPERO             =  0.340G1N5025 + 0.330GNN501j + 0.330GNN501k                 : ARR( 0.565E-13,  -845., 0.0);
+{  6534} G2N501y +PERO1              =  0.460G1N5025 + 0.270GNN501j + 0.270GNN501k                 : ARR( 0.434E-13,  -900., 0.0);
+{  6535} G2N501y +PERO2              =  0.400G1N5025 + 0.300GNN501j + 0.300GNN501k                 : ARR( 0.162E-13, -1400., 0.0);
+{  6536} G2N501y +PERO3              =  0.460G1N5025 + 0.270GNN501j + 0.270GNN501k                 : ARR( 0.488E-13, -1250., 0.0);
+{  6537} G2N501y +PERO5              =  0.460G1N5025 + 0.270GNN501j + 0.270GNN501k                 : ARR( 0.183E-11,   450., 0.0);
+{  6538} G2N501y +PERO6              =  0.300G1N5025 + 0.350GNN501j + 0.350GNN501k                 : ARR( 0.168E-13, -1300., 0.0);
+{  6539} G2N501y +PERO9              =  0.650G1N5025 + 0.350GNN501k                                : ARR( 0.100E-10,     0., 0.0);
+{  6540} G1N5024 +OXYGEN             =       GNN501h +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{  6541} G1N5024                     =       GND400B +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{  6542} G1N5025                     =       G3N3001 +      GND2000                                : ARR( 0.200E+15,  3067., 0.0);
+{  6543} GNN500N +GHO                =       G2N501z                                               : ARR( 0.350E-13,     0., 0.0);
+{  6544} GNN500N +GHO                =       GNN500W +      GNO2                                   : ARR( 0.999E-13,     0., 0.0);
+{  6545} GNN500N +GHO                =       G2N5021                                               : ARR( 0.590E-13,     0., 0.0);
+{  6546} GNN500N +GHO                =       GNN500P +      GNO2                                   : ARR( 0.246E-13,     0., 0.0);
+{  6547} GNN500N+HV               =       G1N500e +      GNO2                                   :  0.100E+01*SUN;
+{  6548} GNN500N+HV               =       G1N500M +      GNO2                                   :  0.100E+01*SUN;
+{  6549} GNN500N+HV               =       G1N5013 +      GNO2                                   :  0.100E+01*SUN;
+{  6550} G2N501z +GNO                =       G1N5026 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6551} G2N501z +GNO                =       GNN501C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6552} G2N501z +GHO2               =       GHN502c                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6553} G2N501z +GNO3               =       G1N5026 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6554} G2N501z +MEPERO             =  0.480G1N5026 + 0.260GNN500j + 0.260GNN501l                 : ARR( 0.164E-12,  -795., 0.0);
+{  6555} G2N501z +PERO1              =  0.600G1N5026 + 0.200GNN500j + 0.200GNN501l                 : ARR( 0.126E-12,  -850., 0.0);
+{  6556} G2N501z +PERO2              =  0.560G1N5026 + 0.220GNN500j + 0.220GNN501l                 : ARR( 0.471E-13, -1350., 0.0);
+{  6557} G2N501z +PERO3              =  0.600G1N5026 + 0.200GNN500j + 0.200GNN501l                 : ARR( 0.142E-12, -1200., 0.0);
+{  6558} G2N501z +PERO5              =  0.600G1N5026 + 0.200GNN500j + 0.200GNN501l                 : ARR( 0.533E-11,   500., 0.0);
+{  6559} G2N501z +PERO6              =  0.460G1N5026 + 0.270GNN500j + 0.270GNN501l                 : ARR( 0.488E-13, -1250., 0.0);
+{  6560} G2N501z +PERO9              =  0.800G1N5026 + 0.200GNN501l                                : ARR( 0.100E-10,     0., 0.0);
+{  6561} G2N5021 +GNO                =       G1N5027 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6562} G2N5021 +GNO                =       GNN501W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6563} G2N5021 +GHO2               =       GHN502d                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6564} G2N5021 +GNO3               =       G1N5027 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6565} G2N5021 +MEPERO             =  0.340G1N5027 + 0.330GNN501e + 0.330GNN501i                 : ARR( 0.565E-13,  -845., 0.0);
+{  6566} G2N5021 +PERO1              =  0.460G1N5027 + 0.270GNN501e + 0.270GNN501i                 : ARR( 0.434E-13,  -900., 0.0);
+{  6567} G2N5021 +PERO2              =  0.400G1N5027 + 0.300GNN501e + 0.300GNN501i                 : ARR( 0.162E-13, -1400., 0.0);
+{  6568} G2N5021 +PERO3              =  0.460G1N5027 + 0.270GNN501e + 0.270GNN501i                 : ARR( 0.488E-13, -1250., 0.0);
+{  6569} G2N5021 +PERO5              =  0.460G1N5027 + 0.270GNN501e + 0.270GNN501i                 : ARR( 0.183E-11,   450., 0.0);
+{  6570} G2N5021 +PERO6              =  0.300G1N5027 + 0.350GNN501e + 0.350GNN501i                 : ARR( 0.168E-13, -1300., 0.0);
+{  6571} G2N5021 +PERO9              =  0.650G1N5027 + 0.350GNN501i                                : ARR( 0.100E-10,     0., 0.0);
+{  6572} G1N5026 +OXYGEN             =       GNN501l +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  6573} G1N5026                     =       GNN500T +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{  6574} G1N5026                     =       GNN4001 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7547., 0.0);
+{  6575} G1N5027                     =       GD02000 +      GNN3005 +      GNO2                    : ARR( 0.200E+15,  6710., 0.0);
+{  6576} G1N5027                     =       GND3001 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6323., 0.0);
+{  6577} GHN500U +GHO                =       GNN500P +      GHO                                    : ARR( 0.856E-11,     0., 0.0);
+{  6578} GHN500U +GHO                =       G2N500M                                               : ARR( 0.197E-11,  -190., 0.0);
+{  6579} GHN500U+HV               =       G1H500B +      GNO2                                   :  0.100E+01*SUN;
+{  6580} GHN500U+HV               =       G1N500M +      GHO                                    :  0.100E+01*SUN;
+{  6581} GHN500U+HV               =       G1H501B +      GNO2                                   :  0.100E+01*SUN;
+{  6582} G1H501B +OXYGEN             =       GHN501q +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  6583} G1H501B                     =       GHK5009 +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{  6584} G1H501B                     =       GND4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  6585} GNN500O +GHO                =       G2N5022                                               : ARR( 0.303E-12,     0., 0.0);
+{  6586} GNN500O +GHO                =       GNN500P +      GHO2                                   : ARR( 0.221E-11,     0., 0.0);
+{  6587} GNN500O +GHO                =       G1N500M                                               : ARR( 0.225E-17,    85., 2.0);
+{  6588} GNN500O+HV               =       G1N500h +      GNO2                                   :  0.100E+01*SUN;
+{  6589} GNN500O+HV               =       G1N5028 +      GNO2                                   :  0.100E+01*SUN;
+{  6590} G2N5022 +GNO                =       G1N5029 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6591} G2N5022 +GNO                =       GNN501X                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6592} G2N5022 +GHO2               =       GHN502e                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6593} G2N5022 +GNO3               =       G1N5029 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6594} G2N5022 +MEPERO             =  0.340G1N5029 + 0.330GNN501f + 0.330GNN501j                 : ARR( 0.565E-13,  -845., 0.0);
+{  6595} G2N5022 +PERO1              =  0.460G1N5029 + 0.270GNN501f + 0.270GNN501j                 : ARR( 0.434E-13,  -900., 0.0);
+{  6596} G2N5022 +PERO2              =  0.400G1N5029 + 0.300GNN501f + 0.300GNN501j                 : ARR( 0.162E-13, -1400., 0.0);
+{  6597} G2N5022 +PERO3              =  0.460G1N5029 + 0.270GNN501f + 0.270GNN501j                 : ARR( 0.488E-13, -1250., 0.0);
+{  6598} G2N5022 +PERO5              =  0.460G1N5029 + 0.270GNN501f + 0.270GNN501j                 : ARR( 0.183E-11,   450., 0.0);
+{  6599} G2N5022 +PERO6              =  0.300G1N5029 + 0.350GNN501f + 0.350GNN501j                 : ARR( 0.168E-13, -1300., 0.0);
+{  6600} G2N5022 +PERO9              =  0.650G1N5029 + 0.350GNN501j                                : ARR( 0.100E-10,     0., 0.0);
+{  6601} G1N5028                     =       GND4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  6602} G1N5029                     =       GND3001 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  6603} GNN500P +GHO                =       G2N5023                                               : ARR( 0.335E-13,     0., 0.0);
+{  6604} GNN500P +GHO                =       GNK500I +      GNO2                                   : ARR( 0.304E-12,     0., 0.0);
+{  6605} GNN500P +GHO                =       G2N5024                                               : ARR( 0.172E-12,     0., 0.0);
+{  6606} GNN500P +GHO                =       GND500K +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{  6607} GNN500P+HV               =       G1N500j +      GNO2                                   :  0.100E+01*SUN;
+{  6608} GNN500P+HV               =       G3N4002 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  6609} GNN500P+HV               =       G2D2000 +      GNK3000 +      GNO2                    :  0.100E+01*SUN;
+{  6610} GNN500P+HV               =       G1N5015 +      GNO2                                   :  0.100E+01*SUN;
+{  6611} G2N5023 +GNO                =       G1N502A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6612} G2N5023 +GNO                =       GNN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6613} G2N5023 +GHO2               =       GHN502f                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6614} G2N5023 +GNO3               =       G1N502A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6615} G2N5023 +MEPERO             =  0.480G1N502A + 0.260GNN500T + 0.260GNN501m                 : ARR( 0.164E-12,  -795., 0.0);
+{  6616} G2N5023 +PERO1              =  0.600G1N502A + 0.200GNN500T + 0.200GNN501m                 : ARR( 0.126E-12,  -850., 0.0);
+{  6617} G2N5023 +PERO2              =  0.560G1N502A + 0.220GNN500T + 0.220GNN501m                 : ARR( 0.471E-13, -1350., 0.0);
+{  6618} G2N5023 +PERO3              =  0.600G1N502A + 0.200GNN500T + 0.200GNN501m                 : ARR( 0.142E-12, -1200., 0.0);
+{  6619} G2N5023 +PERO5              =  0.600G1N502A + 0.200GNN500T + 0.200GNN501m                 : ARR( 0.533E-11,   500., 0.0);
+{  6620} G2N5023 +PERO6              =  0.460G1N502A + 0.270GNN500T + 0.270GNN501m                 : ARR( 0.488E-13, -1250., 0.0);
+{  6621} G2N5023 +PERO9              =  0.800G1N502A + 0.200GNN501m                                : ARR( 0.100E-10,     0., 0.0);
+{  6622} G2N5024 +GNO                =       G1N502B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6623} G2N5024 +GNO                =       GNN501Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6624} G2N5024 +GHO2               =       GHN502g                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6625} G2N5024 +GNO3               =       G1N502B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6626} G2N5024 +MEPERO             =  0.340G1N502B + 0.330GNN501g + 0.330GNN501k                 : ARR( 0.565E-13,  -845., 0.0);
+{  6627} G2N5024 +PERO1              =  0.460G1N502B + 0.270GNN501g + 0.270GNN501k                 : ARR( 0.434E-13,  -900., 0.0);
+{  6628} G2N5024 +PERO2              =  0.400G1N502B + 0.300GNN501g + 0.300GNN501k                 : ARR( 0.162E-13, -1400., 0.0);
+{  6629} G2N5024 +PERO3              =  0.460G1N502B + 0.270GNN501g + 0.270GNN501k                 : ARR( 0.488E-13, -1250., 0.0);
+{  6630} G2N5024 +PERO5              =  0.460G1N502B + 0.270GNN501g + 0.270GNN501k                 : ARR( 0.183E-11,   450., 0.0);
+{  6631} G2N5024 +PERO6              =  0.300G1N502B + 0.350GNN501g + 0.350GNN501k                 : ARR( 0.168E-13, -1300., 0.0);
+{  6632} G2N5024 +PERO9              =  0.650G1N502B + 0.350GNN501k                                : ARR( 0.100E-10,     0., 0.0);
+{  6633} G1N502A +OXYGEN             =       GNN501m +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  6634} G1N502A                     =       GND4004 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{  6635} G1N502B                     =       GND3001 +      G3N2000                                : ARR( 0.200E+15,  2890., 0.0);
+{  6636} GNN500Q +GHO                =       GNN501D +      GHO2                                   : ARR( 0.213E-11,     0., 0.0);
+{  6637} GNN500Q +GHO                =       G2N5025                                               : ARR( 0.292E-12,     0., 0.0);
+{  6638} GNN500Q +GHO                =       G1N501b                                               : ARR( 0.217E-17,    85., 2.0);
+{  6639} GNN500Q+HV               =       G1N502C +      GNO2                                   :  0.100E+01*SUN;
+{  6640} GNN500Q+HV               =       G1N500t +      GNO2                                   :  0.100E+01*SUN;
+{  6641} GNN500Q+HV               =       G1N500N +      GNO2                                   :  0.100E+01*SUN;
+{  6642} G2N5025 +GNO                =       G1N502D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6643} G2N5025 +GNO                =       GNN501c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6644} G2N5025 +GHO2               =       GHN502h                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6645} G2N5025 +GNO3               =       G1N502D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6646} G2N5025 +MEPERO             =  0.340G1N502D + 0.330GNN501n + 0.330GNN501o                 : ARR( 0.565E-13,  -845., 0.0);
+{  6647} G2N5025 +PERO1              =  0.460G1N502D + 0.270GNN501n + 0.270GNN501o                 : ARR( 0.434E-13,  -900., 0.0);
+{  6648} G2N5025 +PERO2              =  0.400G1N502D + 0.300GNN501n + 0.300GNN501o                 : ARR( 0.162E-13, -1400., 0.0);
+{  6649} G2N5025 +PERO3              =  0.460G1N502D + 0.270GNN501n + 0.270GNN501o                 : ARR( 0.488E-13, -1250., 0.0);
+{  6650} G2N5025 +PERO5              =  0.460G1N502D + 0.270GNN501n + 0.270GNN501o                 : ARR( 0.183E-11,   450., 0.0);
+{  6651} G2N5025 +PERO6              =  0.300G1N502D + 0.350GNN501n + 0.350GNN501o                 : ARR( 0.168E-13, -1300., 0.0);
+{  6652} G2N5025 +PERO9              =  0.650G1N502D + 0.350GNN501o                                : ARR( 0.100E-10,     0., 0.0);
+{  6653} G1N502C                     =       GNN4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  6654} G1N502D                     =       GNN3005 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  6655} GHN500W +GHO                =       GHN502f +      GHO2                                   : ARR( 0.220E-11,     0., 0.0);
+{  6656} GHN500W +GHO                =       GNN500S +      GHO                                    : ARR( 0.343E-11,     0., 0.0);
+{  6657} GHN500W +GHO                =       G2N500N                                               : ARR( 0.203E-11,  -190., 0.0);
+{  6658} GHN500W+HV               =       G1H501C +      GNO2                                   :  0.100E+01*SUN;
+{  6659} GHN500W+HV               =       G1H500K +      GNO2                                   :  0.100E+01*SUN;
+{  6660} GHN500W+HV               =       G1N500N +      GHO                                    :  0.100E+01*SUN;
+{  6661} G1H501C                     =       GHN400G +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  6662} GNN500R +GHO                =       GNN500S +      GHO2                                   : ARR( 0.918E-12,     0., 0.0);
+{  6663} GNN500R +GHO                =       G2N5026                                               : ARR( 0.323E-12,     0., 0.0);
+{  6664} GNN500R +GHO                =       GNN500T +      GHO2                                   : ARR( 0.235E-11,     0., 0.0);
+{  6665} GNN500R+HV               =       G1N500o +      GNO2                                   :  0.100E+01*SUN;
+{  6666} GNN500R+HV               =       G1N502E +      GNO2                                   :  0.100E+01*SUN;
+{  6667} G2N5026 +GNO                =       G1N502F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6668} G2N5026 +GNO                =       GNN501a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6669} G2N5026 +GHO2               =       GHN502i                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6670} G2N5026 +GNO3               =       G1N502F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6671} G2N5026 +MEPERO             =  0.340G1N502F + 0.330GNN501p + 0.330GNN501q                 : ARR( 0.565E-13,  -845., 0.0);
+{  6672} G2N5026 +PERO1              =  0.460G1N502F + 0.270GNN501p + 0.270GNN501q                 : ARR( 0.434E-13,  -900., 0.0);
+{  6673} G2N5026 +PERO2              =  0.400G1N502F + 0.300GNN501p + 0.300GNN501q                 : ARR( 0.162E-13, -1400., 0.0);
+{  6674} G2N5026 +PERO3              =  0.460G1N502F + 0.270GNN501p + 0.270GNN501q                 : ARR( 0.488E-13, -1250., 0.0);
+{  6675} G2N5026 +PERO5              =  0.460G1N502F + 0.270GNN501p + 0.270GNN501q                 : ARR( 0.183E-11,   450., 0.0);
+{  6676} G2N5026 +PERO6              =  0.300G1N502F + 0.350GNN501p + 0.350GNN501q                 : ARR( 0.168E-13, -1300., 0.0);
+{  6677} G2N5026 +PERO9              =  0.650G1N502F + 0.350GNN501q                                : ARR( 0.100E-10,     0., 0.0);
+{  6678} G1N502E                     =       GND4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  6679} G1N502F                     =       GND3004 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  6680} GNN500S +GHO                =       GNN501m +      GHO2                                   : ARR( 0.224E-11,     0., 0.0);
+{  6681} GNN500S +GHO                =       G3N500A                                               : ARR( 0.452E-11,     0., 0.0);
+{  6682} GNN500S +GNO3               =       G3N500A +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  6683} GNN500S+HV               =       G1N502G +      GNO2                                   :  0.100E+01*SUN;
+{  6684} GNN500S+HV               =       G1N502H +      GNO2                                   :  0.100E+01*SUN;
+{  6685} GNN500S+HV               =       GND4003 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  6686} GNN500S+HV               =       GNK3000 +      GND2000                                :  0.100E+01*SUN;
+{  6687} G3N500A +GHO2               =  0.800GGN500E + 0.200GAN500G + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6688} G3N500A +GNO                =       GND4003 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6689} G3N500A +GNO2               =       GPN500G                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6690} G3N500A +GNO3               =       GND4003 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6691} G3N500A +MEPERO             =  0.685GND4003 + 0.315GAN500G + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6692} G3N500A +PERO1              =  0.800GND4003 + 0.200GAN500G + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6693} G3N500A +PERO2              =  0.750GND4003 + 0.250GAN500G + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6694} G3N500A +PERO3              =  0.800GND4003 + 0.200GAN500G + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6695} G3N500A +PERO5              =  0.650GND4003 + 0.350GAN500G + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6696} G3N500A +PERO6              =  0.650GND4003 + 0.350GAN500G + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6697} G3N500A +PERO9              =       GND4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  6698} G1N502G                     =       GND400D +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  6699} G1N502H                     =       GND4003 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  6700} GNN500T +GHO                =       GNN501m +      GHO2                                   : ARR( 0.819E-12,     0., 0.0);
+{  6701} GNN500T +GHO                =       GNK500Q +      GNO2                                   : ARR( 0.380E-12,     0., 0.0);
+{  6702} GNN500T +GHO                =       G2N5027                                               : ARR( 0.176E-12,     0., 0.0);
+{  6703} GNN500T +GHO                =       G1N502A                                               : ARR( 0.214E-17,    85., 2.0);
+{  6704} GNN500T+HV               =       G1N500q +      GNO2                                   :  0.100E+01*SUN;
+{  6705} GNN500T+HV               =       G3N4003 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  6706} GNN500T+HV               =       GND2000 +      GNK3000                                :  0.100E+01*SUN;
+{  6707} GNN500T+HV               =       G1N501I +      GNO2                                   :  0.100E+01*SUN;
+{  6708} G2N5027 +GNO                =       G1N502I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6709} G2N5027 +GNO                =       GNN501b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6710} G2N5027 +GHO2               =       GHN502j                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6711} G2N5027 +GNO3               =       G1N502I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6712} G2N5027 +MEPERO             =  0.340G1N502I + 0.330GNN501r + 0.330GNN501s                 : ARR( 0.565E-13,  -845., 0.0);
+{  6713} G2N5027 +PERO1              =  0.460G1N502I + 0.270GNN501r + 0.270GNN501s                 : ARR( 0.434E-13,  -900., 0.0);
+{  6714} G2N5027 +PERO2              =  0.400G1N502I + 0.300GNN501r + 0.300GNN501s                 : ARR( 0.162E-13, -1400., 0.0);
+{  6715} G2N5027 +PERO3              =  0.460G1N502I + 0.270GNN501r + 0.270GNN501s                 : ARR( 0.488E-13, -1250., 0.0);
+{  6716} G2N5027 +PERO5              =  0.460G1N502I + 0.270GNN501r + 0.270GNN501s                 : ARR( 0.183E-11,   450., 0.0);
+{  6717} G2N5027 +PERO6              =  0.300G1N502I + 0.350GNN501r + 0.350GNN501s                 : ARR( 0.168E-13, -1300., 0.0);
+{  6718} G2N5027 +PERO9              =  0.650G1N502I + 0.350GNN501s                                : ARR( 0.100E-10,     0., 0.0);
+{  6719} G1N502I                     =       GND3004 +      G3N2000                                : ARR( 0.200E+15,  2890., 0.0);
+{  6720} GND5009 +GHO                =       G2N5028                                               : ARR( 0.899E-12,     0., 0.0);
+{  6721} GND5009 +GHO                =       G2N5029                                               : ARR( 0.864E-12,     0., 0.0);
+{  6722} GND5009 +GHO                =       G3N4000 +      GCO                                    : ARR( 0.127E-10,     0., 0.0);
+{  6723} GND5009 +GNO3               =       G3N4000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  6724} GND5009+HV               =       G1D500L +      GNO2                                   :  0.100E+01*SUN;
+{  6725} GND5009+HV               =       G3N4000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  6726} GND5009+HV               =       GND4001 +      GCO                                    :  0.100E+01*SUN;
+{  6727} GND5009+HV               =       GN03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  6728} G2N5028 +GNO                =       G1N502J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6729} G2N5028 +GNO                =       GNN501t                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6730} G2N5028 +GHO2               =       GHN502k                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6731} G2N5028 +GNO3               =       G1N502J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6732} G2N5028 +MEPERO             =  0.340G1N502J + 0.330GND500A + 0.330GND500g                 : ARR( 0.565E-13,  -845., 0.0);
+{  6733} G2N5028 +PERO1              =  0.460G1N502J + 0.270GND500A + 0.270GND500g                 : ARR( 0.434E-13,  -900., 0.0);
+{  6734} G2N5028 +PERO2              =  0.400G1N502J + 0.300GND500A + 0.300GND500g                 : ARR( 0.162E-13, -1400., 0.0);
+{  6735} G2N5028 +PERO3              =  0.460G1N502J + 0.270GND500A + 0.270GND500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  6736} G2N5028 +PERO5              =  0.460G1N502J + 0.270GND500A + 0.270GND500g                 : ARR( 0.183E-11,   450., 0.0);
+{  6737} G2N5028 +PERO6              =  0.300G1N502J + 0.350GND500A + 0.350GND500g                 : ARR( 0.168E-13, -1300., 0.0);
+{  6738} G2N5028 +PERO9              =  0.650G1N502J + 0.350GND500g                                : ARR( 0.100E-10,     0., 0.0);
+{  6739} G2N5029 +GNO                =       G1N502K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6740} G2N5029 +GNO                =       GNN501u                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6741} G2N5029 +GHO2               =       GHN502l                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6742} G2N5029 +GNO3               =       G1N502K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6743} G2N5029 +MEPERO             =  0.340G1N502K + 0.330GND500h + 0.330GND500i                 : ARR( 0.565E-13,  -845., 0.0);
+{  6744} G2N5029 +PERO1              =  0.460G1N502K + 0.270GND500h + 0.270GND500i                 : ARR( 0.434E-13,  -900., 0.0);
+{  6745} G2N5029 +PERO2              =  0.400G1N502K + 0.300GND500h + 0.300GND500i                 : ARR( 0.162E-13, -1400., 0.0);
+{  6746} G2N5029 +PERO3              =  0.460G1N502K + 0.270GND500h + 0.270GND500i                 : ARR( 0.488E-13, -1250., 0.0);
+{  6747} G2N5029 +PERO5              =  0.460G1N502K + 0.270GND500h + 0.270GND500i                 : ARR( 0.183E-11,   450., 0.0);
+{  6748} G2N5029 +PERO6              =  0.300G1N502K + 0.350GND500h + 0.350GND500i                 : ARR( 0.168E-13, -1300., 0.0);
+{  6749} G2N5029 +PERO9              =  0.650G1N502K + 0.350GND500i                                : ARR( 0.100E-10,     0., 0.0);
+{  6750} G1D500L +OXYGEN             =       GDD5004 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6751} G1N502J                     =       G3N4001 +      GCO                                    : ARR( 0.800E+11,  4780., 0.0);
+{  6752} G1N502J                     =       GND2000 +      G2D3002                                : ARR( 0.200E+15,  6866., 0.0);
+{  6753} G1N502K                     =       GND3000 +      G3D2000                                : ARR( 0.200E+15,  2978., 0.0);
+{  6754} G2D3002 +GNO                =       G1D3002 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  6755} G2D3002 +GNO                =       GND3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{  6756} G2D3002 +GHO2               =       GHD3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  6757} G2D3002 +GNO3               =       G1D3002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6758} G2D3002 +MEPERO             =  0.480G1D3002 + 0.260GDK3001 + 0.260GDD3002                 : ARR( 0.164E-12,  -795., 0.0);
+{  6759} G2D3002 +PERO1              =  0.600G1D3002 + 0.200GDK3001 + 0.200GDD3002                 : ARR( 0.126E-12,  -850., 0.0);
+{  6760} G2D3002 +PERO2              =  0.560G1D3002 + 0.220GDK3001 + 0.220GDD3002                 : ARR( 0.471E-13, -1350., 0.0);
+{  6761} G2D3002 +PERO3              =  0.600G1D3002 + 0.200GDK3001 + 0.200GDD3002                 : ARR( 0.142E-12, -1200., 0.0);
+{  6762} G2D3002 +PERO5              =  0.600G1D3002 + 0.200GDK3001 + 0.200GDD3002                 : ARR( 0.533E-11,   500., 0.0);
+{  6763} G2D3002 +PERO6              =  0.460G1D3002 + 0.270GDK3001 + 0.270GDD3002                 : ARR( 0.488E-13, -1250., 0.0);
+{  6764} G2D3002 +PERO9              =  0.800G1D3002 + 0.200GDD3002                                : ARR( 0.100E-10,     0., 0.0);
+{  6765} G1D3002                     =       G3D2000 +      GCH2O                                  : ARR( 0.200E+15,  3864., 0.0);
+{  6766} GNN500U +GHO                =       G2N502A                                               : ARR( 0.102E-12,     0., 0.0);
+{  6767} GNN500U +GHO                =       GNK500G +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{  6768} GNN500U +GHO                =       G2N502B                                               : ARR( 0.565E-13,     0., 0.0);
+{  6769} GNN500U +GHO                =       GND500Q +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  6770} GNN500U+HV               =       G3K2000 +      GND3000 +      GNO2                    :  0.100E+01*SUN;
+{  6771} GNN500U+HV               =       GNK3000 +      G2D2000 +      GNO2                    :  0.100E+01*SUN;
+{  6772} GNN500U+HV               =       G1N500P +      GNO2                                   :  0.100E+01*SUN;
+{  6773} GNN500U+HV               =       G1N501O +      GNO2                                   :  0.100E+01*SUN;
+{  6774} G2N502A +GNO                =       G1N502L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6775} G2N502A +GNO                =       GNN501J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6776} G2N502A +GHO2               =       GHN502E                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6777} G2N502A +GNO3               =       G1N502L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6778} G2N502A +MEPERO             =  0.480G1N502L + 0.260GNN501Q + 0.260GNN501u                 : ARR( 0.164E-12,  -795., 0.0);
+{  6779} G2N502A +PERO1              =  0.600G1N502L + 0.200GNN501Q + 0.200GNN501u                 : ARR( 0.126E-12,  -850., 0.0);
+{  6780} G2N502A +PERO2              =  0.560G1N502L + 0.220GNN501Q + 0.220GNN501u                 : ARR( 0.471E-13, -1350., 0.0);
+{  6781} G2N502A +PERO3              =  0.600G1N502L + 0.200GNN501Q + 0.200GNN501u                 : ARR( 0.142E-12, -1200., 0.0);
+{  6782} G2N502A +PERO5              =  0.600G1N502L + 0.200GNN501Q + 0.200GNN501u                 : ARR( 0.533E-11,   500., 0.0);
+{  6783} G2N502A +PERO6              =  0.460G1N502L + 0.270GNN501Q + 0.270GNN501u                 : ARR( 0.488E-13, -1250., 0.0);
+{  6784} G2N502A +PERO9              =  0.800G1N502L + 0.200GNN501u                                : ARR( 0.100E-10,     0., 0.0);
+{  6785} G2N502B +GNO                =       G1N502M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6786} G2N502B +GNO                =       GNN501v                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6787} G2N502B +GHO2               =       GHN502m                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6788} G2N502B +GNO3               =       G1N502M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6789} G2N502B +MEPERO             =  0.340G1N502M + 0.330GNN501w + 0.330GNN501x                 : ARR( 0.565E-13,  -845., 0.0);
+{  6790} G2N502B +PERO1              =  0.460G1N502M + 0.270GNN501w + 0.270GNN501x                 : ARR( 0.434E-13,  -900., 0.0);
+{  6791} G2N502B +PERO2              =  0.400G1N502M + 0.300GNN501w + 0.300GNN501x                 : ARR( 0.162E-13, -1400., 0.0);
+{  6792} G2N502B +PERO3              =  0.460G1N502M + 0.270GNN501w + 0.270GNN501x                 : ARR( 0.488E-13, -1250., 0.0);
+{  6793} G2N502B +PERO5              =  0.460G1N502M + 0.270GNN501w + 0.270GNN501x                 : ARR( 0.183E-11,   450., 0.0);
+{  6794} G2N502B +PERO6              =  0.300G1N502M + 0.350GNN501w + 0.350GNN501x                 : ARR( 0.168E-13, -1300., 0.0);
+{  6795} G2N502B +PERO9              =  0.650G1N502M + 0.350GNN501x                                : ARR( 0.100E-10,     0., 0.0);
+{  6796} G1N502L                     =       G3N4005 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{  6797} G1N502M                     =       GDK3000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6513., 0.0);
+{  6798} G3N4005 +GHO2               =  0.800GGN4006 + 0.200GAN4006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6799} G3N4005 +GNO                =       GND3000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6800} G3N4005 +GNO2               =       GPN4006                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6801} G3N4005 +GNO3               =       GND3000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6802} G3N4005 +MEPERO             =  0.685GND3000 + 0.315GAN4006 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6803} G3N4005 +PERO1              =  0.800GND3000 + 0.200GAN4006 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6804} G3N4005 +PERO2              =  0.750GND3000 + 0.250GAN4006 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6805} G3N4005 +PERO3              =  0.800GND3000 + 0.200GAN4006 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6806} G3N4005 +PERO5              =  0.650GND3000 + 0.350GAN4006 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6807} G3N4005 +PERO6              =  0.650GND3000 + 0.350GAN4006 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  6808} G3N4005 +PERO9              =       GND3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  6809} GHN500X +GHO                =       GNK500G +      GHO                                    : ARR( 0.260E-10,     0., 0.0);
+{  6810} GHN500X +GHO                =       G2N500P                                               : ARR( 0.197E-11,  -190., 0.0);
+{  6811} GHN500X+HV               =       G3K2000 +      GND3000 +      GHO                     :  0.100E+01*SUN;
+{  6812} GHN500X+HV               =       G1N500P +      GHO                                    :  0.100E+01*SUN;
+{  6813} GHN500X+HV               =       G1H501D +      GNO2                                   :  0.100E+01*SUN;
+{  6814} G1H501D +OXYGEN             =       GHD500I +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6815} GNK500F +GHO                =       GNK500G +      GHO2                                   : ARR( 0.653E-11,     0., 0.0);
+{  6816} GNK500F +GHO                =       G2N502C                                               : ARR( 0.932E-12,     0., 0.0);
+{  6817} GNK500F+HV               =       G3K2000 +      GND3000 +      GHO2                    :  0.100E+01*SUN;
+{  6818} GNK500F+HV               =       G1K500W +      GNO2                                   :  0.100E+01*SUN;
+{  6819} G2N502C +GNO                =       G1N502N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6820} G2N502C +GNO                =       GNN501y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6821} G2N502C +GHO2               =       GHN502n                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6822} G2N502C +GNO3               =       G1N502N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6823} G2N502C +MEPERO             =  0.340G1N502N + 0.330GNK500p + 0.330GNK500q                 : ARR( 0.565E-13,  -845., 0.0);
+{  6824} G2N502C +PERO1              =  0.460G1N502N + 0.270GNK500p + 0.270GNK500q                 : ARR( 0.434E-13,  -900., 0.0);
+{  6825} G2N502C +PERO2              =  0.400G1N502N + 0.300GNK500p + 0.300GNK500q                 : ARR( 0.162E-13, -1400., 0.0);
+{  6826} G2N502C +PERO3              =  0.460G1N502N + 0.270GNK500p + 0.270GNK500q                 : ARR( 0.488E-13, -1250., 0.0);
+{  6827} G2N502C +PERO5              =  0.460G1N502N + 0.270GNK500p + 0.270GNK500q                 : ARR( 0.183E-11,   450., 0.0);
+{  6828} G2N502C +PERO6              =  0.300G1N502N + 0.350GNK500p + 0.350GNK500q                 : ARR( 0.168E-13, -1300., 0.0);
+{  6829} G2N502C +PERO9              =  0.650G1N502N + 0.350GNK500q                                : ARR( 0.100E-10,     0., 0.0);
+{  6830} G1K500W +OXYGEN             =       GDK500H +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6831} G1N502N                     =       GDK3000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3765., 0.0);
+{  6832} GNK500G +GHO                =       G2N502D                                               : ARR( 0.102E-12,     0., 0.0);
+{  6833} GNK500G +GHO                =       G2N502E                                               : ARR( 0.172E-12,     0., 0.0);
+{  6834} GNK500G +GHO                =       GDK500D +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{  6835} GNK500G+HV               =       G3K2000 +      G3N3000                                :  0.100E+01*SUN;
+{  6836} GNK500G+HV               =       G1K500M +      GNO2                                   :  0.100E+01*SUN;
+{  6837} G2N502D +GNO                =       G1N502O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6838} G2N502D +GNO                =       GNN501L                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6839} G2N502D +GHO2               =       GHN502G                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6840} G2N502D +GNO3               =       G1N502O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6841} G2N502D +MEPERO             =  0.480G1N502O + 0.260GNK500n + 0.260GND500i                 : ARR( 0.164E-12,  -795., 0.0);
+{  6842} G2N502D +PERO1              =  0.600G1N502O + 0.200GNK500n + 0.200GND500i                 : ARR( 0.126E-12,  -850., 0.0);
+{  6843} G2N502D +PERO2              =  0.560G1N502O + 0.220GNK500n + 0.220GND500i                 : ARR( 0.471E-13, -1350., 0.0);
+{  6844} G2N502D +PERO3              =  0.600G1N502O + 0.200GNK500n + 0.200GND500i                 : ARR( 0.142E-12, -1200., 0.0);
+{  6845} G2N502D +PERO5              =  0.600G1N502O + 0.200GNK500n + 0.200GND500i                 : ARR( 0.533E-11,   500., 0.0);
+{  6846} G2N502D +PERO6              =  0.460G1N502O + 0.270GNK500n + 0.270GND500i                 : ARR( 0.488E-13, -1250., 0.0);
+{  6847} G2N502D +PERO9              =  0.800G1N502O + 0.200GND500i                                : ARR( 0.100E-10,     0., 0.0);
+{  6848} G2N502E +GNO                =       G1N502P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6849} G2N502E +GNO                =       GNN501z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6850} G2N502E +GHO2               =       GHN502o                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6851} G2N502E +GNO3               =       G1N502P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6852} G2N502E +MEPERO             =  0.340G1N502P + 0.330GNK500r + 0.330GNK500s                 : ARR( 0.565E-13,  -845., 0.0);
+{  6853} G2N502E +PERO1              =  0.460G1N502P + 0.270GNK500r + 0.270GNK500s                 : ARR( 0.434E-13,  -900., 0.0);
+{  6854} G2N502E +PERO2              =  0.400G1N502P + 0.300GNK500r + 0.300GNK500s                 : ARR( 0.162E-13, -1400., 0.0);
+{  6855} G2N502E +PERO3              =  0.460G1N502P + 0.270GNK500r + 0.270GNK500s                 : ARR( 0.488E-13, -1250., 0.0);
+{  6856} G2N502E +PERO5              =  0.460G1N502P + 0.270GNK500r + 0.270GNK500s                 : ARR( 0.183E-11,   450., 0.0);
+{  6857} G2N502E +PERO6              =  0.300G1N502P + 0.350GNK500r + 0.350GNK500s                 : ARR( 0.168E-13, -1300., 0.0);
+{  6858} G2N502E +PERO9              =  0.650G1N502P + 0.350GNK500s                                : ARR( 0.100E-10,     0., 0.0);
+{  6859} G1N502O                     =       G3N3000 +      GCH2O   +      GCO                     : ARR( 0.200E+15,  3897., 0.0);
+{  6860} G1N502P                     =       G3K2000 +      GND2000 +      GCO                     : ARR( 0.200E+15,  3324., 0.0);
+{  6861} GNN500W +GHO                =       G2N502F                                               : ARR( 0.105E-12,     0., 0.0);
+{  6862} GNN500W +GHO                =       G2N502G                                               : ARR( 0.177E-12,     0., 0.0);
+{  6863} GNN500W +GHO                =       GNK500I +      GNO2                                   : ARR( 0.766E-13,     0., 0.0);
+{  6864} GNN500W+HV               =       G3K2000 +      G2N3004                                :  0.100E+01*SUN;
+{  6865} GNN500W+HV               =       GK03000 +      GDD2000 + 2.000GNO2                    :  0.100E+01*SUN;
+{  6866} GNN500W+HV               =       G1N500Q +      GNO2                                   :  0.100E+01*SUN;
+{  6867} GNN500W+HV               =       G1N5017 +      GNO2                                   :  0.100E+01*SUN;
+{  6868} G2N502F +GNO                =       G1N502Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6869} G2N502F +GNO                =       GNN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6870} G2N502F +GHO2               =       GHN502C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6871} G2N502F +GNO3               =       G1N502Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6872} G2N502F +MEPERO             =  0.480G1N502Q + 0.260GNN500l + 0.260GNN501t                 : ARR( 0.164E-12,  -795., 0.0);
+{  6873} G2N502F +PERO1              =  0.600G1N502Q + 0.200GNN500l + 0.200GNN501t                 : ARR( 0.126E-12,  -850., 0.0);
+{  6874} G2N502F +PERO2              =  0.560G1N502Q + 0.220GNN500l + 0.220GNN501t                 : ARR( 0.471E-13, -1350., 0.0);
+{  6875} G2N502F +PERO3              =  0.600G1N502Q + 0.200GNN500l + 0.200GNN501t                 : ARR( 0.142E-12, -1200., 0.0);
+{  6876} G2N502F +PERO5              =  0.600G1N502Q + 0.200GNN500l + 0.200GNN501t                 : ARR( 0.533E-11,   500., 0.0);
+{  6877} G2N502F +PERO6              =  0.460G1N502Q + 0.270GNN500l + 0.270GNN501t                 : ARR( 0.488E-13, -1250., 0.0);
+{  6878} G2N502F +PERO9              =  0.800G1N502Q + 0.200GNN501t                                : ARR( 0.100E-10,     0., 0.0);
+{  6879} G2N502G +GNO                =       G1N502R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6880} G2N502G +GNO                =       GNN501v                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6881} G2N502G +GHO2               =       GHN502p                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6882} G2N502G +GNO3               =       G1N502R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6883} G2N502G +MEPERO             =  0.340G1N502R + 0.330GNN501y + 0.330GNN501z                 : ARR( 0.565E-13,  -845., 0.0);
+{  6884} G2N502G +PERO1              =  0.460G1N502R + 0.270GNN501y + 0.270GNN501z                 : ARR( 0.434E-13,  -900., 0.0);
+{  6885} G2N502G +PERO2              =  0.400G1N502R + 0.300GNN501y + 0.300GNN501z                 : ARR( 0.162E-13, -1400., 0.0);
+{  6886} G2N502G +PERO3              =  0.460G1N502R + 0.270GNN501y + 0.270GNN501z                 : ARR( 0.488E-13, -1250., 0.0);
+{  6887} G2N502G +PERO5              =  0.460G1N502R + 0.270GNN501y + 0.270GNN501z                 : ARR( 0.183E-11,   450., 0.0);
+{  6888} G2N502G +PERO6              =  0.300G1N502R + 0.350GNN501y + 0.350GNN501z                 : ARR( 0.168E-13, -1300., 0.0);
+{  6889} G2N502G +PERO9              =  0.650G1N502R + 0.350GNN501z                                : ARR( 0.100E-10,     0., 0.0);
+{  6890} G1N502Q                     =       G3N4006 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  6891} G1N502R                     =       G3K2000 +      GNN3005                                : ARR( 0.200E+15,  2923., 0.0);
+{  6892} G3N4006 +GHO2               =  0.800GGN4007 + 0.200GAN4007 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6893} G3N4006 +GNO                =       G2N3004 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6894} G3N4006 +GNO2               =       GPN4007                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6895} G3N4006 +GNO3               =       G2N3004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6896} G3N4006 +MEPERO             =  0.685G2N3004 + 0.315GAN4007 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6897} G3N4006 +PERO1              =  0.800G2N3004 + 0.200GAN4007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6898} G3N4006 +PERO2              =  0.750G2N3004 + 0.250GAN4007 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6899} G3N4006 +PERO3              =  0.800G2N3004 + 0.200GAN4007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6900} G3N4006 +PERO5              =  0.650G2N3004 + 0.350GAN4007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6901} G3N4006 +PERO6              =  0.650G2N3004 + 0.350GAN4007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6902} G3N4006 +PERO9              =       G2N3004 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  6903} GHN500Y +GHO                =       GNK500I +      GHO                                    : ARR( 0.270E-10,     0., 0.0);
+{  6904} GHN500Y +GHO                =       G2N500Q                                               : ARR( 0.196E-11,  -190., 0.0);
+{  6905} GHN500Y+HV               =       G3K2000 +      G2H3001                                :  0.100E+01*SUN;
+{  6906} GHN500Y+HV               =       GK03000 +      GDD2000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{  6907} GHN500Y+HV               =       G1N500Q +      GHO                                    :  0.100E+01*SUN;
+{  6908} GHN500Y+HV               =       G1H501E +      GNO2                                   :  0.100E+01*SUN;
+{  6909} G1H501E +OXYGEN             =       GHD500J +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  6910} G1H501E                     =       GDK4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5636., 0.0);
+{  6911} GNK500H +GHO                =       G2N502H                                               : ARR( 0.895E-12,     0., 0.0);
+{  6912} GNK500H +GHO                =       GNK500I +      GHO2                                   : ARR( 0.679E-11,     0., 0.0);
+{  6913} GNK500H+HV               =       G3K2000 +      G2N3003                                :  0.100E+01*SUN;
+{  6914} GNK500H+HV               =       GK03000 +      GND2000                                :  0.100E+01*SUN;
+{  6915} GNK500H+HV               =       G1K500X +      GNO2                                   :  0.100E+01*SUN;
+{  6916} G2N502H +GNO                =       G1N502S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6917} G2N502H +GNO                =       GNN501w                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6918} G2N502H +GHO2               =       GHN502q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6919} G2N502H +GNO3               =       G1N502S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6920} G2N502H +MEPERO             =  0.340G1N502S + 0.330GNK500p + 0.330GNK500r                 : ARR( 0.565E-13,  -845., 0.0);
+{  6921} G2N502H +PERO1              =  0.460G1N502S + 0.270GNK500p + 0.270GNK500r                 : ARR( 0.434E-13,  -900., 0.0);
+{  6922} G2N502H +PERO2              =  0.400G1N502S + 0.300GNK500p + 0.300GNK500r                 : ARR( 0.162E-13, -1400., 0.0);
+{  6923} G2N502H +PERO3              =  0.460G1N502S + 0.270GNK500p + 0.270GNK500r                 : ARR( 0.488E-13, -1250., 0.0);
+{  6924} G2N502H +PERO5              =  0.460G1N502S + 0.270GNK500p + 0.270GNK500r                 : ARR( 0.183E-11,   450., 0.0);
+{  6925} G2N502H +PERO6              =  0.300G1N502S + 0.350GNK500p + 0.350GNK500r                 : ARR( 0.168E-13, -1300., 0.0);
+{  6926} G2N502H +PERO9              =  0.650G1N502S + 0.350GNK500r                                : ARR( 0.100E-10,     0., 0.0);
+{  6927} G1K500X                     =       GDK4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  6928} G1N502S                     =       G3K2000 +      GND3002                                : ARR( 0.200E+15,  2923., 0.0);
+{  6929} GNK500I +GHO                =       G2N502I                                               : ARR( 0.107E-12,     0., 0.0);
+{  6930} GNK500I +GHO                =       G2N502J                                               : ARR( 0.549E-12,     0., 0.0);
+{  6931} GNK500I+HV               =       G3K2000 +      G2N3005                                :  0.100E+01*SUN;
+{  6932} GNK500I+HV               =       G3K4003 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  6933} GNK500I+HV               =       G1K500J +      GNO2                                   :  0.100E+01*SUN;
+{  6934} G2N502I +GNO                =       G1N502T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6935} G2N502I +GNO                =       GNN501I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6936} G2N502I +GHO2               =       GHN502D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6937} G2N502I +GNO3               =       G1N502T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6938} G2N502I +MEPERO             =  0.480G1N502T + 0.260GNK500Q + 0.260GND500g                 : ARR( 0.164E-12,  -795., 0.0);
+{  6939} G2N502I +PERO1              =  0.600G1N502T + 0.200GNK500Q + 0.200GND500g                 : ARR( 0.126E-12,  -850., 0.0);
+{  6940} G2N502I +PERO2              =  0.560G1N502T + 0.220GNK500Q + 0.220GND500g                 : ARR( 0.471E-13, -1350., 0.0);
+{  6941} G2N502I +PERO3              =  0.600G1N502T + 0.200GNK500Q + 0.200GND500g                 : ARR( 0.142E-12, -1200., 0.0);
+{  6942} G2N502I +PERO5              =  0.600G1N502T + 0.200GNK500Q + 0.200GND500g                 : ARR( 0.533E-11,   500., 0.0);
+{  6943} G2N502I +PERO6              =  0.460G1N502T + 0.270GNK500Q + 0.270GND500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  6944} G2N502I +PERO9              =  0.800G1N502T + 0.200GND500g                                : ARR( 0.100E-10,     0., 0.0);
+{  6945} G2N502J +GNO                =       G1N502U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  6946} G2N502J +GNO                =       GNN501x                                               : ARR( 0.182E-12,  -360., 0.0);
+{  6947} G2N502J +GHO2               =       GHN502r                                               : ARR( 0.242E-12, -1250., 0.0);
+{  6948} G2N502J +GNO3               =       G1N502U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6949} G2N502J +MEPERO             =  0.340G1N502U + 0.330GNK500q + 0.330GNK500s                 : ARR( 0.565E-13,  -845., 0.0);
+{  6950} G2N502J +PERO1              =  0.460G1N502U + 0.270GNK500q + 0.270GNK500s                 : ARR( 0.434E-13,  -900., 0.0);
+{  6951} G2N502J +PERO2              =  0.400G1N502U + 0.300GNK500q + 0.300GNK500s                 : ARR( 0.162E-13, -1400., 0.0);
+{  6952} G2N502J +PERO3              =  0.460G1N502U + 0.270GNK500q + 0.270GNK500s                 : ARR( 0.488E-13, -1250., 0.0);
+{  6953} G2N502J +PERO5              =  0.460G1N502U + 0.270GNK500q + 0.270GNK500s                 : ARR( 0.183E-11,   450., 0.0);
+{  6954} G2N502J +PERO6              =  0.300G1N502U + 0.350GNK500q + 0.350GNK500s                 : ARR( 0.168E-13, -1300., 0.0);
+{  6955} G2N502J +PERO9              =  0.650G1N502U + 0.350GNK500s                                : ARR( 0.100E-10,     0., 0.0);
+{  6956} G1N502T                     =       G3N4007 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{  6957} G1N502U                     =       G3K2000 +      GND3003                                : ARR( 0.200E+15,  4513., 0.0);
+{  6958} G1N502U                     =       GDK3000 +      G3N2000                                : ARR( 0.200E+15,  4480., 0.0);
+{  6959} G3N4007 +GHO2               =  0.800GGN4008 + 0.200GAN4008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  6960} G3N4007 +GNO                =       G2N3005 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  6961} G3N4007 +GNO2               =       GPN4008                                               : ARR( 0.330E-08,     0.,-1.0);
+{  6962} G3N4007 +GNO3               =       G2N3005 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  6963} G3N4007 +MEPERO             =  0.685G2N3005 + 0.315GAN4008 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6964} G3N4007 +PERO1              =  0.800G2N3005 + 0.200GAN4008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6965} G3N4007 +PERO2              =  0.750G2N3005 + 0.250GAN4008 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6966} G3N4007 +PERO3              =  0.800G2N3005 + 0.200GAN4008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6967} G3N4007 +PERO5              =  0.650G2N3005 + 0.350GAN4008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6968} G3N4007 +PERO6              =  0.650G2N3005 + 0.350GAN4008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  6969} G3N4007 +PERO9              =       G2N3005 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  6970} GGN4000 +GHO                =       G2G4001                                               : ARR( 0.285E-12,     0., 0.0);
+{  6971} GGN4000 +GHO                =       G2G4002                                               : ARR( 0.870E-12,     0., 0.0);
+{  6972} GGN4000 +GHO                =       G3N4000                                               : ARR( 0.192E-11,  -190., 0.0);
+{  6973} GGN4000+HV               =       G1G4001 +      GNO2                                   :  0.100E+01*SUN;
+{  6974} GGN4000+HV               =       G2N3000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  6975} G2G4001 +GNO                =       G1G4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  6976} G2G4001 +GNO                =       GGN4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6977} G2G4001 +GHO2               =       GGH4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6978} G2G4001 +GNO3               =       G1G4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6979} G2G4001 +MEPERO             =  0.340G1G4002 + 0.330GGN4001 + 0.330GGN4008                 : ARR( 0.565E-13,  -845., 0.0);
+{  6980} G2G4001 +PERO1              =  0.460G1G4002 + 0.270GGN4001 + 0.270GGN4008                 : ARR( 0.434E-13,  -900., 0.0);
+{  6981} G2G4001 +PERO2              =  0.400G1G4002 + 0.300GGN4001 + 0.300GGN4008                 : ARR( 0.162E-13, -1400., 0.0);
+{  6982} G2G4001 +PERO3              =  0.460G1G4002 + 0.270GGN4001 + 0.270GGN4008                 : ARR( 0.488E-13, -1250., 0.0);
+{  6983} G2G4001 +PERO5              =  0.460G1G4002 + 0.270GGN4001 + 0.270GGN4008                 : ARR( 0.183E-11,   450., 0.0);
+{  6984} G2G4001 +PERO6              =  0.300G1G4002 + 0.350GGN4001 + 0.350GGN4008                 : ARR( 0.168E-13, -1300., 0.0);
+{  6985} G2G4001 +PERO9              =  0.650G1G4002 + 0.350GGN4008                                : ARR( 0.100E-10,     0., 0.0);
+{  6986} G2G4002 +GNO                =       G1G4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  6987} G2G4002 +GNO                =       GGN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{  6988} G2G4002 +GHO2               =       GGH4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  6989} G2G4002 +GNO3               =       G1G4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  6990} G2G4002 +MEPERO             =  0.340G1G4003 + 0.330GGN4009 + 0.330GGN400A                 : ARR( 0.565E-13,  -845., 0.0);
+{  6991} G2G4002 +PERO1              =  0.460G1G4003 + 0.270GGN4009 + 0.270GGN400A                 : ARR( 0.434E-13,  -900., 0.0);
+{  6992} G2G4002 +PERO2              =  0.400G1G4003 + 0.300GGN4009 + 0.300GGN400A                 : ARR( 0.162E-13, -1400., 0.0);
+{  6993} G2G4002 +PERO3              =  0.460G1G4003 + 0.270GGN4009 + 0.270GGN400A                 : ARR( 0.488E-13, -1250., 0.0);
+{  6994} G2G4002 +PERO5              =  0.460G1G4003 + 0.270GGN4009 + 0.270GGN400A                 : ARR( 0.183E-11,   450., 0.0);
+{  6995} G2G4002 +PERO6              =  0.300G1G4003 + 0.350GGN4009 + 0.350GGN400A                 : ARR( 0.168E-13, -1300., 0.0);
+{  6996} G2G4002 +PERO9              =  0.650G1G4003 + 0.350GGN400A                                : ARR( 0.100E-10,     0., 0.0);
+{  6997} G1G4001 +OXYGEN             =       GGD4000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  6998} G1G4002                     =       GCH2O   +      GGD3000 +      GNO2                    : ARR( 0.200E+15,  8296., 0.0);
+{  6999} G1G4002                     =       GND2000 +      G2G2000                                : ARR( 0.200E+15,  7508., 0.0);
+{  7000} G1G4003                     =       GND3000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  7001} GAN4000 +GHO                =       G2A4001                                               : ARR( 0.658E-12,     0., 0.0);
+{  7002} GAN4000 +GHO                =       G2A4002                                               : ARR( 0.292E-12,     0., 0.0);
+{  7003} GAN4000 +GHO                =       G2N3000 +      GCO2                                   : ARR( 0.537E-12,     0., 0.0);
+{  7004} GAN4000+HV               =       G1A4001 +      GNO2                                   :  0.100E+01*SUN;
+{  7005} G2A4001 +GNO                =       G1A4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7006} G2A4001 +GNO                =       GAN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7007} G2A4001 +GHO2               =       GAH4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7008} G2A4001 +GNO3               =       G1A4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7009} G2A4001 +MEPERO             =  0.340G1A4002 + 0.330GAN4009 + 0.330GAN400A                 : ARR( 0.565E-13,  -845., 0.0);
+{  7010} G2A4001 +PERO1              =  0.460G1A4002 + 0.270GAN4009 + 0.270GAN400A                 : ARR( 0.434E-13,  -900., 0.0);
+{  7011} G2A4001 +PERO2              =  0.400G1A4002 + 0.300GAN4009 + 0.300GAN400A                 : ARR( 0.162E-13, -1400., 0.0);
+{  7012} G2A4001 +PERO3              =  0.460G1A4002 + 0.270GAN4009 + 0.270GAN400A                 : ARR( 0.488E-13, -1250., 0.0);
+{  7013} G2A4001 +PERO5              =  0.460G1A4002 + 0.270GAN4009 + 0.270GAN400A                 : ARR( 0.183E-11,   450., 0.0);
+{  7014} G2A4001 +PERO6              =  0.300G1A4002 + 0.350GAN4009 + 0.350GAN400A                 : ARR( 0.168E-13, -1300., 0.0);
+{  7015} G2A4001 +PERO9              =  0.650G1A4002 + 0.350GAN400A                                : ARR( 0.100E-10,     0., 0.0);
+{  7016} G2A4002 +GNO                =       G1A4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7017} G2A4002 +GNO                =       GAN4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7018} G2A4002 +GHO2               =       GAH4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7019} G2A4002 +GNO3               =       G1A4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7020} G2A4002 +MEPERO             =  0.340G1A4003 + 0.330GAN4001 + 0.330GAN4008                 : ARR( 0.565E-13,  -845., 0.0);
+{  7021} G2A4002 +PERO1              =  0.460G1A4003 + 0.270GAN4001 + 0.270GAN4008                 : ARR( 0.434E-13,  -900., 0.0);
+{  7022} G2A4002 +PERO2              =  0.400G1A4003 + 0.300GAN4001 + 0.300GAN4008                 : ARR( 0.162E-13, -1400., 0.0);
+{  7023} G2A4002 +PERO3              =  0.460G1A4003 + 0.270GAN4001 + 0.270GAN4008                 : ARR( 0.488E-13, -1250., 0.0);
+{  7024} G2A4002 +PERO5              =  0.460G1A4003 + 0.270GAN4001 + 0.270GAN4008                 : ARR( 0.183E-11,   450., 0.0);
+{  7025} G2A4002 +PERO6              =  0.300G1A4003 + 0.350GAN4001 + 0.350GAN4008                 : ARR( 0.168E-13, -1300., 0.0);
+{  7026} G2A4002 +PERO9              =  0.650G1A4003 + 0.350GAN4008                                : ARR( 0.100E-10,     0., 0.0);
+{  7027} G1A4001 +OXYGEN             =       GAD4000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  7028} G1A4002                     =       GCO     +      GND3000 +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  7029} G1A4003                     =       G2A2000 +      GND2000                                : ARR( 0.200E+15,  7508., 0.0);
+{  7030} G1A4003                     =       GAD3000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  8296., 0.0);
+{  7031} GPN4000                     =       G3N4000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  7032} GPN4000 +GHO                =       G2P4001                                               : ARR( 0.294E-12,     0., 0.0);
+{  7033} GPN4000 +GHO                =       G2P4002                                               : ARR( 0.896E-12,     0., 0.0);
+{  7034} GPN4000+HV               =       G1P4001 +      GNO2                                   :  0.100E+01*SUN;
+{  7035} GPN4000+HV               =       G3N4000 +      GNO2                                   :  0.100E+01*SUN;
+{  7036} G2P4001 +GNO                =       G1P4002 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7037} G2P4001 +GNO                =       GPN4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7038} G2P4001 +GHO2               =       GPH4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7039} G2P4001 +GNO3               =       G1P4002 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7040} G2P4001 +MEPERO             =  0.340G1P4002 + 0.330GPN4001 + 0.330GPN4008                 : ARR( 0.565E-13,  -845., 0.0);
+{  7041} G2P4001 +PERO1              =  0.460G1P4002 + 0.270GPN4001 + 0.270GPN4008                 : ARR( 0.434E-13,  -900., 0.0);
+{  7042} G2P4001 +PERO2              =  0.400G1P4002 + 0.300GPN4001 + 0.300GPN4008                 : ARR( 0.162E-13, -1400., 0.0);
+{  7043} G2P4001 +PERO3              =  0.460G1P4002 + 0.270GPN4001 + 0.270GPN4008                 : ARR( 0.488E-13, -1250., 0.0);
+{  7044} G2P4001 +PERO5              =  0.460G1P4002 + 0.270GPN4001 + 0.270GPN4008                 : ARR( 0.183E-11,   450., 0.0);
+{  7045} G2P4001 +PERO6              =  0.300G1P4002 + 0.350GPN4001 + 0.350GPN4008                 : ARR( 0.168E-13, -1300., 0.0);
+{  7046} G2P4001 +PERO9              =  0.650G1P4002 + 0.350GPN4008                                : ARR( 0.100E-10,     0., 0.0);
+{  7047} G2P4002 +GNO                =       G1P4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7048} G2P4002 +GNO                =       GPN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7049} G2P4002 +GHO2               =       GPH4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7050} G2P4002 +GNO3               =       G1P4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7051} G2P4002 +MEPERO             =  0.340G1P4003 + 0.330GPN4009 + 0.330GPN400A                 : ARR( 0.565E-13,  -845., 0.0);
+{  7052} G2P4002 +PERO1              =  0.460G1P4003 + 0.270GPN4009 + 0.270GPN400A                 : ARR( 0.434E-13,  -900., 0.0);
+{  7053} G2P4002 +PERO2              =  0.400G1P4003 + 0.300GPN4009 + 0.300GPN400A                 : ARR( 0.162E-13, -1400., 0.0);
+{  7054} G2P4002 +PERO3              =  0.460G1P4003 + 0.270GPN4009 + 0.270GPN400A                 : ARR( 0.488E-13, -1250., 0.0);
+{  7055} G2P4002 +PERO5              =  0.460G1P4003 + 0.270GPN4009 + 0.270GPN400A                 : ARR( 0.183E-11,   450., 0.0);
+{  7056} G2P4002 +PERO6              =  0.300G1P4003 + 0.350GPN4009 + 0.350GPN400A                 : ARR( 0.168E-13, -1300., 0.0);
+{  7057} G2P4002 +PERO9              =  0.650G1P4003 + 0.350GPN400A                                : ARR( 0.100E-10,     0., 0.0);
+{  7058} G1P4001 +OXYGEN             =       GPD4000 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  7059} G1P4002                     =       GCH2O   +      GPD3000 +      GNO2                    : ARR( 0.200E+15,  8296., 0.0);
+{  7060} G1P4002                     =       GND2000 +      G2P2000                                : ARR( 0.200E+15,  7508., 0.0);
+{  7061} G1P4003                     =       GND3000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  7062} GNN500X +GHO                =       GNN501I +      GHO2                                   : ARR( 0.672E-11,     0., 0.0);
+{  7063} GNN500X +GHO                =       G2N502K                                               : ARR( 0.887E-12,     0., 0.0);
+{  7064} GNN500X+HV               =       G1N502W +      GNO2                                   :  0.100E+01*SUN;
+{  7065} GNN500X+HV               =       G3N4001 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  7066} GNN500X+HV               =       GND2000 +      GNK3000                                :  0.100E+01*SUN;
+{  7067} GNN500X+HV               =       G1N500R +      GNO2                                   :  0.100E+01*SUN;
+{  7068} G2N502K +GNO                =       G1N502X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7069} G2N502K +GNO                =       GNN5021                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7070} G2N502K +GHO2               =       GHN502s                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7071} G2N502K +GNO3               =       G1N502X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7072} G2N502K +MEPERO             =  0.340G1N502X + 0.330GNN5022 + 0.330GNN5023                 : ARR( 0.565E-13,  -845., 0.0);
+{  7073} G2N502K +PERO1              =  0.460G1N502X + 0.270GNN5022 + 0.270GNN5023                 : ARR( 0.434E-13,  -900., 0.0);
+{  7074} G2N502K +PERO2              =  0.400G1N502X + 0.300GNN5022 + 0.300GNN5023                 : ARR( 0.162E-13, -1400., 0.0);
+{  7075} G2N502K +PERO3              =  0.460G1N502X + 0.270GNN5022 + 0.270GNN5023                 : ARR( 0.488E-13, -1250., 0.0);
+{  7076} G2N502K +PERO5              =  0.460G1N502X + 0.270GNN5022 + 0.270GNN5023                 : ARR( 0.183E-11,   450., 0.0);
+{  7077} G2N502K +PERO6              =  0.300G1N502X + 0.350GNN5022 + 0.350GNN5023                 : ARR( 0.168E-13, -1300., 0.0);
+{  7078} G2N502K +PERO9              =  0.650G1N502X + 0.350GNN5023                                : ARR( 0.100E-10,     0., 0.0);
+{  7079} G1N502W                     =       GND4004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7080} G1N502X                     =       GND3002 +      G3N2000                                : ARR( 0.200E+15,  2890., 0.0);
+{  7081} GHN500Z +GHO                =       GHN502D +      GHO2                                   : ARR( 0.688E-11,     0., 0.0);
+{  7082} GHN500Z +GHO                =       GND500A +      GHO                                    : ARR( 0.103E-10,     0., 0.0);
+{  7083} GHN500Z +GHO                =       G2N500R                                               : ARR( 0.200E-11,  -190., 0.0);
+{  7084} GHN500Z+HV               =       G1H501F +      GNO2                                   :  0.100E+01*SUN;
+{  7085} GHN500Z+HV               =       G3N4001 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  7086} GHN500Z+HV               =       GND2000 +      GHK3000                                :  0.100E+01*SUN;
+{  7087} GHN500Z+HV               =       G1N500R +      GHO                                    :  0.100E+01*SUN;
+{  7088} G1H501F                     =       GHD4004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7089} GNK500J +GHO                =       GND500A +      GHO2                                   : ARR( 0.253E-11,     0., 0.0);
+{  7090} GNK500J +GHO                =       G2N502L                                               : ARR( 0.890E-12,     0., 0.0);
+{  7091} GNK500J +GHO                =       GNK500Q +      GHO2                                   : ARR( 0.675E-11,     0., 0.0);
+{  7092} GNK500J+HV               =       G3K2001 +      G2N3003                                :  0.100E+01*SUN;
+{  7093} GNK500J+HV               =       GKO3000 +      GND2000                                :  0.100E+01*SUN;
+{  7094} GNK500J+HV               =       G1K500Y +      GNO2                                   :  0.100E+01*SUN;
+{  7095} G2N502L +GNO                =       G1N502Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7096} G2N502L +GNO                =       GNN5024                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7097} G2N502L +GHO2               =       GHN502t                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7098} G2N502L +GNO3               =       G1N502Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7099} G2N502L +MEPERO             =  0.340G1N502Y + 0.330GNK500t + 0.330GNK500u                 : ARR( 0.565E-13,  -845., 0.0);
+{  7100} G2N502L +PERO1              =  0.460G1N502Y + 0.270GNK500t + 0.270GNK500u                 : ARR( 0.434E-13,  -900., 0.0);
+{  7101} G2N502L +PERO2              =  0.400G1N502Y + 0.300GNK500t + 0.300GNK500u                 : ARR( 0.162E-13, -1400., 0.0);
+{  7102} G2N502L +PERO3              =  0.460G1N502Y + 0.270GNK500t + 0.270GNK500u                 : ARR( 0.488E-13, -1250., 0.0);
+{  7103} G2N502L +PERO5              =  0.460G1N502Y + 0.270GNK500t + 0.270GNK500u                 : ARR( 0.183E-11,   450., 0.0);
+{  7104} G2N502L +PERO6              =  0.300G1N502Y + 0.350GNK500t + 0.350GNK500u                 : ARR( 0.168E-13, -1300., 0.0);
+{  7105} G2N502L +PERO9              =  0.650G1N502Y + 0.350GNK500u                                : ARR( 0.100E-10,     0., 0.0);
+{  7106} G1K500Y                     =       GDK4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7107} G1N502Y                     =       G3K2001 +      GND3002                                : ARR( 0.200E+15,  3009., 0.0);
+{  7108} GND500A +GHO                =       GND500g +      GHO2                                   : ARR( 0.689E-11,     0., 0.0);
+{  7109} GND500A +GHO                =       G3N4001 +      GCO                                    : ARR( 0.134E-10,     0., 0.0);
+{  7110} GND500A +GNO3               =       G3N4001 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  7111} GND500A+HV               =       G1D500M +      GNO2                                   :  0.100E+01*SUN;
+{  7112} GND500A+HV               =       G3N4001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  7113} GND500A+HV               =       GND4003 +      GCO                                    :  0.100E+01*SUN;
+{  7114} GND500A+HV               =       GNO3002 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  7115} G1D500M                     =       GDD4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7116} GGN4001 +GHO                =       GGN4008 +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{  7117} GGN4001 +GHO                =       G2G4003                                               : ARR( 0.886E-12,     0., 0.0);
+{  7118} GGN4001 +GHO                =       G3N4001                                               : ARR( 0.195E-11,  -190., 0.0);
+{  7119} GGN4001+HV               =       G1G4004 +      GNO2                                   :  0.100E+01*SUN;
+{  7120} GGN4001+HV               =       G2N3003 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  7121} G2G4003 +GNO                =       G1G4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7122} G2G4003 +GNO                =       GGN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7123} G2G4003 +GHO2               =       GGH4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7124} G2G4003 +GNO3               =       G1G4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7125} G2G4003 +MEPERO             =  0.340G1G4005 + 0.330GGN400C + 0.330GGN400D                 : ARR( 0.565E-13,  -845., 0.0);
+{  7126} G2G4003 +PERO1              =  0.460G1G4005 + 0.270GGN400C + 0.270GGN400D                 : ARR( 0.434E-13,  -900., 0.0);
+{  7127} G2G4003 +PERO2              =  0.400G1G4005 + 0.300GGN400C + 0.300GGN400D                 : ARR( 0.162E-13, -1400., 0.0);
+{  7128} G2G4003 +PERO3              =  0.460G1G4005 + 0.270GGN400C + 0.270GGN400D                 : ARR( 0.488E-13, -1250., 0.0);
+{  7129} G2G4003 +PERO5              =  0.460G1G4005 + 0.270GGN400C + 0.270GGN400D                 : ARR( 0.183E-11,   450., 0.0);
+{  7130} G2G4003 +PERO6              =  0.300G1G4005 + 0.350GGN400C + 0.350GGN400D                 : ARR( 0.168E-13, -1300., 0.0);
+{  7131} G2G4003 +PERO9              =  0.650G1G4005 + 0.350GGN400D                                : ARR( 0.100E-10,     0., 0.0);
+{  7132} G1G4004                     =       GGD3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7133} G1G4005                     =       GND2000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  5490., 0.0);
+{  7134} G1G4005                     =       GND3002 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{  7135} GAN4001 +GHO                =       G2A4003                                               : ARR( 0.675E-12,     0., 0.0);
+{  7136} GAN4001 +GHO                =       GAN4008 +      GHO2                                   : ARR( 0.218E-11,     0., 0.0);
+{  7137} GAN4001 +GHO                =       G2N3003 +      GCO2                                   : ARR( 0.550E-12,     0., 0.0);
+{  7138} GAN4001+HV               =       G1A4004 +      GNO2                                   :  0.100E+01*SUN;
+{  7139} G2A4003 +GNO                =       G1A4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7140} G2A4003 +GNO                =       GAN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7141} G2A4003 +GHO2               =       GAH4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7142} G2A4003 +GNO3               =       G1A4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7143} G2A4003 +MEPERO             =  0.340G1A4005 + 0.330GAN400C + 0.330GAN400D                 : ARR( 0.565E-13,  -845., 0.0);
+{  7144} G2A4003 +PERO1              =  0.460G1A4005 + 0.270GAN400C + 0.270GAN400D                 : ARR( 0.434E-13,  -900., 0.0);
+{  7145} G2A4003 +PERO2              =  0.400G1A4005 + 0.300GAN400C + 0.300GAN400D                 : ARR( 0.162E-13, -1400., 0.0);
+{  7146} G2A4003 +PERO3              =  0.460G1A4005 + 0.270GAN400C + 0.270GAN400D                 : ARR( 0.488E-13, -1250., 0.0);
+{  7147} G2A4003 +PERO5              =  0.460G1A4005 + 0.270GAN400C + 0.270GAN400D                 : ARR( 0.183E-11,   450., 0.0);
+{  7148} G2A4003 +PERO6              =  0.300G1A4005 + 0.350GAN400C + 0.350GAN400D                 : ARR( 0.168E-13, -1300., 0.0);
+{  7149} G2A4003 +PERO9              =  0.650G1A4005 + 0.350GAN400D                                : ARR( 0.100E-10,     0., 0.0);
+{  7150} G1A4004                     =       GAD3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7151} G1A4005                     =       GCO     +      GND3002 +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{  7152} G1A4005                     =       GAD2000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  5490., 0.0);
+{  7153} GPN4001                     =       G3N4001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  7154} GPN4001 +GHO                =       GPN4008 +      GHO2                                   : ARR( 0.219E-11,     0., 0.0);
+{  7155} GPN4001 +GHO                =       G2P4003                                               : ARR( 0.917E-12,     0., 0.0);
+{  7156} GPN4001+HV               =       G1P4004 +      GNO2                                   :  0.100E+01*SUN;
+{  7157} GPN4001+HV               =       G3N4001 +      GNO2                                   :  0.100E+01*SUN;
+{  7158} G2P4003 +GNO                =       G1P4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7159} G2P4003 +GNO                =       GPN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7160} G2P4003 +GHO2               =       GPH4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7161} G2P4003 +GNO3               =       G1P4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7162} G2P4003 +MEPERO             =  0.340G1P4005 + 0.330GPN400C + 0.330GPN400D                 : ARR( 0.565E-13,  -845., 0.0);
+{  7163} G2P4003 +PERO1              =  0.460G1P4005 + 0.270GPN400C + 0.270GPN400D                 : ARR( 0.434E-13,  -900., 0.0);
+{  7164} G2P4003 +PERO2              =  0.400G1P4005 + 0.300GPN400C + 0.300GPN400D                 : ARR( 0.162E-13, -1400., 0.0);
+{  7165} G2P4003 +PERO3              =  0.460G1P4005 + 0.270GPN400C + 0.270GPN400D                 : ARR( 0.488E-13, -1250., 0.0);
+{  7166} G2P4003 +PERO5              =  0.460G1P4005 + 0.270GPN400C + 0.270GPN400D                 : ARR( 0.183E-11,   450., 0.0);
+{  7167} G2P4003 +PERO6              =  0.300G1P4005 + 0.350GPN400C + 0.350GPN400D                 : ARR( 0.168E-13, -1300., 0.0);
+{  7168} G2P4003 +PERO9              =  0.650G1P4005 + 0.350GPN400D                                : ARR( 0.100E-10,     0., 0.0);
+{  7169} G1P4004                     =       GPD3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  7170} G1P4005                     =       GND2000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  5490., 0.0);
+{  7171} G1P4005                     =       GND3002 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{  7172} GNN3002 +GHO                =       GND3002 +      GNO2                                   : ARR( 0.919E-13,     0., 0.0);
+{  7173} GNN3002 +GHO                =       GNN3006 +      GHO2                                   : ARR( 0.412E-12,     0., 0.0);
+{  7174} GNN3002 +GHO                =       G1N3006                                               : ARR( 0.210E-17,    85., 2.0);
+{  7175} GNN3002+HV               =       G1N3003 +      GNO2                                   :  0.200E+01*SUN;
+{  7176} GHN3003 +GHO                =       GHN3008 +      GHO2                                   : ARR( 0.208E-11,     0., 0.0);
+{  7177} GHN3003 +GHO                =       GND3002 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  7178} GHN3003 +GHO                =       G2N3003                                               : ARR( 0.192E-11,  -190., 0.0);
+{  7179} GHN3003+HV               =       G1H3007 +      GNO2                                   :  0.100E+01*SUN;
+{  7180} GHN3003+HV               =       G1N3003 +      GHO                                    :  0.100E+01*SUN;
+{  7181} G1H3007                     =       GHD2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4443., 0.0);
+{  7182} GNO3003 +GHO                =       GND3002 +      GHO2                                   : ARR( 0.424E-11,     0., 0.0);
+{  7183} GNO3003 +GHO                =       GNK3001 +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{  7184} GNO3003+HV               =       G1O3003 +      GNO2                                   :  0.100E+01*SUN;
+{  7185} GND3002 +GHO                =       GND3003 +      GHO2                                   : ARR( 0.127E-11,     0., 0.0);
+{  7186} GND3002 +GHO                =       G3N3002                                               : ARR( 0.210E-10,     0., 0.0);
+{  7187} GND3002 +GNO3               =       G3N3002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  7188} GND3002+HV               =       G1D3003 +      GNO2                                   :  0.100E+01*SUN;
+{  7189} GND3002+HV               =       GND2000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  7190} G3N3002 +GHO2               =  0.800GGN3003 + 0.200GAN3003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7191} G3N3002 +GNO                =       GND2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  7192} G3N3002 +GNO2               =       GPN3003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7193} G3N3002 +GNO3               =       GND2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  7194} G3N3002 +MEPERO             =  0.685GND2000 + 0.315GAN3003 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7195} G3N3002 +PERO1              =  0.800GND2000 + 0.200GAN3003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7196} G3N3002 +PERO2              =  0.750GND2000 + 0.250GAN3003 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7197} G3N3002 +PERO3              =  0.800GND2000 + 0.200GAN3003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7198} G3N3002 +PERO5              =  0.650GND2000 + 0.350GAN3003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7199} G3N3002 +PERO6              =  0.650GND2000 + 0.350GAN3003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7200} G3N3002 +PERO9              =       GND2000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  7201} G1D3003                     =       GDD2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{  7202} GHN500a +GHO                =       GNN500U +      GHO                                    : ARR( 0.695E-11,     0., 0.0);
+{  7203} GHN500a +GHO                =       G2N500T                                               : ARR( 0.197E-11,  -190., 0.0);
+{  7204} GHN500a+HV               =       G1N500T +      GHO                                    :  0.100E+01*SUN;
+{  7205} GHN500a+HV               =       G1H501G +      GNO2                                   :  0.100E+01*SUN;
+{  7206} GHN500a+HV               =       G1H501H +      GNO2                                   :  0.100E+01*SUN;
+{  7207} G1H501G                     =       GD02000 +      GND3000 +      GHO                     : ARR( 0.200E+15,  4917., 0.0);
+{  7208} G1H501H                     =       GNK5009 +      GHO                                    : ARR( 0.800E+11,  2490., 0.0);
+{  7209} GNN500Y +GHO                =       G2N502M                                               : ARR( 0.173E-12,     0., 0.0);
+{  7210} GNN500Y +GHO                =       G2N502N                                               : ARR( 0.237E-12,     0., 0.0);
+{  7211} GNN500Y +GHO                =       GNN500g +      GNO2                                   : ARR( 0.243E-13,     0., 0.0);
+{  7212} GNN500Y+HV               =       G1N500f +      GNO2                                   :  0.100E+01*SUN;
+{  7213} GNN500Y+HV               =       G1N500U +      GNO2                                   :  0.100E+01*SUN;
+{  7214} GNN500Y+HV               =       G1N501A +      GNO2                                   :  0.100E+01*SUN;
+{  7215} G2N502M +GNO                =       G1N502Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7216} G2N502M +GNO                =       GNN501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7217} G2N502M +GHO2               =       GHN502u                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7218} G2N502M +GNO3               =       G1N502Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7219} G2N502M +MEPERO             =  0.480G1N502Z + 0.260GNN500b + 0.260GNN5025                 : ARR( 0.146E-12,  -445., 0.0);
+{  7220} G2N502M +PERO1              =  0.600G1N502Z + 0.200GNN500b + 0.200GNN5025                 : ARR( 0.112E-12,  -500., 0.0);
+{  7221} G2N502M +PERO2              =  0.560G1N502Z + 0.220GNN500b + 0.220GNN5025                 : ARR( 0.418E-13, -1000., 0.0);
+{  7222} G2N502M +PERO3              =  0.600G1N502Z + 0.200GNN500b + 0.200GNN5025                 : ARR( 0.126E-12,  -850., 0.0);
+{  7223} G2N502M +PERO5              =  0.600G1N502Z + 0.200GNN500b + 0.200GNN5025                 : ARR( 0.473E-11,   850., 0.0);
+{  7224} G2N502M +PERO6              =  0.460G1N502Z + 0.270GNN500b + 0.270GNN5025                 : ARR( 0.434E-13,  -900., 0.0);
+{  7225} G2N502M +PERO9              =  0.800G1N502Z + 0.200GNN5025                                : ARR( 0.100E-10,     0., 0.0);
+{  7226} G2N502N +GNO                =       G1N502a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7227} G2N502N +GNO                =       GNN501W                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7228} G2N502N +GHO2               =       GHN502v                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7229} G2N502N +GNO3               =       G1N502a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7230} G2N502N +MEPERO             =  0.340G1N502a + 0.330GNN5011 + 0.330GNN501v                 : ARR( 0.565E-13,  -845., 0.0);
+{  7231} G2N502N +PERO1              =  0.460G1N502a + 0.270GNN5011 + 0.270GNN501v                 : ARR( 0.434E-13,  -900., 0.0);
+{  7232} G2N502N +PERO2              =  0.400G1N502a + 0.300GNN5011 + 0.300GNN501v                 : ARR( 0.162E-13, -1400., 0.0);
+{  7233} G2N502N +PERO3              =  0.460G1N502a + 0.270GNN5011 + 0.270GNN501v                 : ARR( 0.488E-13, -1250., 0.0);
+{  7234} G2N502N +PERO5              =  0.460G1N502a + 0.270GNN5011 + 0.270GNN501v                 : ARR( 0.183E-11,   450., 0.0);
+{  7235} G2N502N +PERO6              =  0.300G1N502a + 0.350GNN5011 + 0.350GNN501v                 : ARR( 0.168E-13, -1300., 0.0);
+{  7236} G2N502N +PERO9              =  0.650G1N502a + 0.350GNN501v                                : ARR( 0.100E-10,     0., 0.0);
+{  7237} G1N502Z +OXYGEN             =       GNN5025 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  7238} G1N502a                     =       GD02000 +      GNN3005 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{  7239} GHN500b +GHO                =       GNN500a +      GHO                                    : ARR( 0.182E-11,     0., 0.0);
+{  7240} GHN500b +GHO                =       G2N500U                                               : ARR( 0.210E-11,  -190., 0.0);
+{  7241} GHN500b+HV               =       G1H500C +      GNO2                                   :  0.100E+01*SUN;
+{  7242} GHN500b+HV               =       G1N500U +      GHO                                    :  0.100E+01*SUN;
+{  7243} GHN500b+HV               =       G1H501I +      GNO2                                   :  0.100E+01*SUN;
+{  7244} G1H501I                     =       G2H500n                                               : ARR( 0.160E+12,  3812., 0.0);
+{  7245} G1H501I                     =       GND4005 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  7246} G2H500n +GNO                =       G1H501J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7247} G2H500n +GNO                =       GHN501l                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7248} G2H500n +GHO2               =       GHH500j                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7249} G2H500n +GNO3               =       G1H501J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7250} G2H500n +MEPERO             =  0.340G1H501J + 0.330GHN502w + 0.330GHN501n                 : ARR( 0.565E-13,  -845., 0.0);
+{  7251} G2H500n +PERO1              =  0.460G1H501J + 0.270GHN502w + 0.270GHN501n                 : ARR( 0.434E-13,  -900., 0.0);
+{  7252} G2H500n +PERO2              =  0.400G1H501J + 0.300GHN502w + 0.300GHN501n                 : ARR( 0.162E-13, -1400., 0.0);
+{  7253} G2H500n +PERO3              =  0.460G1H501J + 0.270GHN502w + 0.270GHN501n                 : ARR( 0.488E-13, -1250., 0.0);
+{  7254} G2H500n +PERO5              =  0.460G1H501J + 0.270GHN502w + 0.270GHN501n                 : ARR( 0.183E-11,   450., 0.0);
+{  7255} G2H500n +PERO6              =  0.300G1H501J + 0.350GHN502w + 0.350GHN501n                 : ARR( 0.168E-13, -1300., 0.0);
+{  7256} G2H500n +PERO9              =  0.650G1H501J + 0.350GHN501n                                : ARR( 0.100E-10,     0., 0.0);
+{  7257} G1H501J                     =       GHN502x +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  7258} GNN500Z +GHO                =       G2N500X                                               : ARR( 0.175E-12,     0., 0.0);
+{  7259} GNN500Z +GHO                =       G2N502O                                               : ARR( 0.240E-12,     0., 0.0);
+{  7260} GNN500Z +GHO                =       GNK500K +      GNO2                                   : ARR( 0.123E-12,     0., 0.0);
+{  7261} GNN500Z +GHO                =       GNN500a +      GHO2                                   : ARR( 0.430E-12,     0., 0.0);
+{  7262} GNN500Z +GHO                =       G1N500U                                               : ARR( 0.219E-17,    85., 2.0);
+{  7263} GNN500Z+HV               =       G1N500i +      GNO2                                   :  0.100E+01*SUN;
+{  7264} GNN500Z+HV               =       G1N501K +      GNO2                                   :  0.100E+01*SUN;
+{  7265} G2N502O +GNO                =       G1N502b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7266} G2N502O +GNO                =       GNN501X                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7267} G2N502O +GHO2               =       GHN502y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7268} G2N502O +GNO3               =       G1N502b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7269} G2N502O +MEPERO             =  0.340G1N502b + 0.330GNN5016 + 0.330GNN501w                 : ARR( 0.565E-13,  -845., 0.0);
+{  7270} G2N502O +PERO1              =  0.460G1N502b + 0.270GNN5016 + 0.270GNN501w                 : ARR( 0.434E-13,  -900., 0.0);
+{  7271} G2N502O +PERO2              =  0.400G1N502b + 0.300GNN5016 + 0.300GNN501w                 : ARR( 0.162E-13, -1400., 0.0);
+{  7272} G2N502O +PERO3              =  0.460G1N502b + 0.270GNN5016 + 0.270GNN501w                 : ARR( 0.488E-13, -1250., 0.0);
+{  7273} G2N502O +PERO5              =  0.460G1N502b + 0.270GNN5016 + 0.270GNN501w                 : ARR( 0.183E-11,   450., 0.0);
+{  7274} G2N502O +PERO6              =  0.300G1N502b + 0.350GNN5016 + 0.350GNN501w                 : ARR( 0.168E-13, -1300., 0.0);
+{  7275} G2N502O +PERO9              =  0.650G1N502b + 0.350GNN501w                                : ARR( 0.100E-10,     0., 0.0);
+{  7276} G1N502b                     =       GND500P +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  7277} G1N502b                     =       GD02000 +      GND3002 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{  7278} GNN500a +GHO                =       G2N502P                                               : ARR( 0.168E-12,     0., 0.0);
+{  7279} GNN500a +GHO                =       G2N502Q                                               : ARR( 0.230E-12,     0., 0.0);
+{  7280} GNN500a +GHO                =       GNK500L +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{  7281} GNN500a +GHO                =       GND500R +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{  7282} GNN500a+HV               =       G1N500k +      GNO2                                   :  0.100E+01*SUN;
+{  7283} GNN500a+HV               =       G3N4004 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  7284} GNN500a+HV               =       GU02000 +      GNN3006                                :  0.100E+01*SUN;
+{  7285} GNN500a+HV               =       G1N501Q +      GNO2                                   :  0.100E+01*SUN;
+{  7286} G2N502P +GNO                =       G1N502c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7287} G2N502P +GNO                =       GNN501J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7288} G2N502P +GHO2               =       GHN502z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7289} G2N502P +GNO3               =       G1N502c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7290} G2N502P +MEPERO             =  0.480G1N502c + 0.260GNN500d + 0.260GNN5026                 : ARR( 0.146E-12,  -445., 0.0);
+{  7291} G2N502P +PERO1              =  0.600G1N502c + 0.200GNN500d + 0.200GNN5026                 : ARR( 0.112E-12,  -500., 0.0);
+{  7292} G2N502P +PERO2              =  0.560G1N502c + 0.220GNN500d + 0.220GNN5026                 : ARR( 0.418E-13, -1000., 0.0);
+{  7293} G2N502P +PERO3              =  0.600G1N502c + 0.200GNN500d + 0.200GNN5026                 : ARR( 0.126E-12,  -850., 0.0);
+{  7294} G2N502P +PERO5              =  0.600G1N502c + 0.200GNN500d + 0.200GNN5026                 : ARR( 0.473E-11,   850., 0.0);
+{  7295} G2N502P +PERO6              =  0.460G1N502c + 0.270GNN500d + 0.270GNN5026                 : ARR( 0.434E-13,  -900., 0.0);
+{  7296} G2N502P +PERO9              =  0.800G1N502c + 0.200GNN5026                                : ARR( 0.100E-10,     0., 0.0);
+{  7297} G2N502Q +GNO                =       G1N502d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7298} G2N502Q +GNO                =       GNN501Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7299} G2N502Q +GHO2               =       GHN5031                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7300} G2N502Q +GNO3               =       G1N502d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7301} G2N502Q +MEPERO             =  0.340G1N502d + 0.330GNN5027 + 0.330GNN501x                 : ARR( 0.565E-13,  -845., 0.0);
+{  7302} G2N502Q +PERO1              =  0.460G1N502d + 0.270GNN5027 + 0.270GNN501x                 : ARR( 0.434E-13,  -900., 0.0);
+{  7303} G2N502Q +PERO2              =  0.400G1N502d + 0.300GNN5027 + 0.300GNN501x                 : ARR( 0.162E-13, -1400., 0.0);
+{  7304} G2N502Q +PERO3              =  0.460G1N502d + 0.270GNN5027 + 0.270GNN501x                 : ARR( 0.488E-13, -1250., 0.0);
+{  7305} G2N502Q +PERO5              =  0.460G1N502d + 0.270GNN5027 + 0.270GNN501x                 : ARR( 0.183E-11,   450., 0.0);
+{  7306} G2N502Q +PERO6              =  0.300G1N502d + 0.350GNN5027 + 0.350GNN501x                 : ARR( 0.168E-13, -1300., 0.0);
+{  7307} G2N502Q +PERO9              =  0.650G1N502d + 0.350GNN501x                                : ARR( 0.100E-10,     0., 0.0);
+{  7308} G1N502c +OXYGEN             =       GNN5026 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  7309} G1N502d                     =       GD02000 +      GND3003 +      GNO2                    : ARR( 0.200E+15,  6261., 0.0);
+{  7310} GNN500b +GHO                =       GNN5025 +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{  7311} GNN500b +GHO                =       G2N502R                                               : ARR( 0.294E-12,     0., 0.0);
+{  7312} GNN500b+HV               =       G1N502e +      GNO2                                   :  0.100E+01*SUN;
+{  7313} GNN500b+HV               =       G1N500W +      GNO2                                   :  0.100E+01*SUN;
+{  7314} GNN500b+HV               =       G1N502f +      GNO2                                   :  0.100E+01*SUN;
+{  7315} G2N502R +GNO                =       G1N502g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7316} G2N502R +GNO                =       GNN501Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7317} G2N502R +GHO2               =       GHN5032                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7318} G2N502R +GNO3               =       G1N502g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7319} G2N502R +MEPERO             =  0.340G1N502g + 0.330GNN5028 + 0.330GNN5029                 : ARR( 0.565E-13,  -845., 0.0);
+{  7320} G2N502R +PERO1              =  0.460G1N502g + 0.270GNN5028 + 0.270GNN5029                 : ARR( 0.434E-13,  -900., 0.0);
+{  7321} G2N502R +PERO2              =  0.400G1N502g + 0.300GNN5028 + 0.300GNN5029                 : ARR( 0.162E-13, -1400., 0.0);
+{  7322} G2N502R +PERO3              =  0.460G1N502g + 0.270GNN5028 + 0.270GNN5029                 : ARR( 0.488E-13, -1250., 0.0);
+{  7323} G2N502R +PERO5              =  0.460G1N502g + 0.270GNN5028 + 0.270GNN5029                 : ARR( 0.183E-11,   450., 0.0);
+{  7324} G2N502R +PERO6              =  0.300G1N502g + 0.350GNN5028 + 0.350GNN5029                 : ARR( 0.168E-13, -1300., 0.0);
+{  7325} G2N502R +PERO9              =  0.650G1N502g + 0.350GNN5029                                : ARR( 0.100E-10,     0., 0.0);
+{  7326} G1N502e                     =       G2O2000 +      GNN3005                                : ARR( 0.200E+15,  7074., 0.0);
+{  7327} G1N502e                     =       GDO3000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{  7328} G1N502f +OXYGEN             =       GNN501S +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  7329} G1N502f                     =       G2N502S                                               : ARR( 0.160E+12,  3719., 0.0);
+{  7330} G1N502g                     =       GCH2O   +      GNN400D +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  7331} G1N502g                     =       GDO2000 +      GNN3005 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{  7332} G2N502S +GNO                =       G1N502h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7333} G2N502S +GNO                =       GNN502A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7334} G2N502S +GHO2               =       GHN5033                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7335} G2N502S +GNO3               =       G1N502h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7336} G2N502S +MEPERO             =  0.340G1N502h + 0.330GNN502B + 0.330GNN502C                 : ARR( 0.565E-13,  -845., 0.0);
+{  7337} G2N502S +PERO1              =  0.460G1N502h + 0.270GNN502B + 0.270GNN502C                 : ARR( 0.434E-13,  -900., 0.0);
+{  7338} G2N502S +PERO2              =  0.400G1N502h + 0.300GNN502B + 0.300GNN502C                 : ARR( 0.162E-13, -1400., 0.0);
+{  7339} G2N502S +PERO3              =  0.460G1N502h + 0.270GNN502B + 0.270GNN502C                 : ARR( 0.488E-13, -1250., 0.0);
+{  7340} G2N502S +PERO5              =  0.460G1N502h + 0.270GNN502B + 0.270GNN502C                 : ARR( 0.183E-11,   450., 0.0);
+{  7341} G2N502S +PERO6              =  0.300G1N502h + 0.350GNN502B + 0.350GNN502C                 : ARR( 0.168E-13, -1300., 0.0);
+{  7342} G2N502S +PERO9              =  0.650G1N502h + 0.350GNN502C                                : ARR( 0.100E-10,     0., 0.0);
+{  7343} G1N502h                     =       GNN502D +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  7344} G1N502h                     =       GND3004 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{  7345} G1N502h                     =       GNN400E +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  7346} GHN500c +GHO                =       GHN5034 +      GHO2                                   : ARR( 0.428E-11,     0., 0.0);
+{  7347} GHN500c +GHO                =       GNN500d +      GHO                                    : ARR( 0.175E-11,     0., 0.0);
+{  7348} GHN500c +GHO                =       G2N500W                                               : ARR( 0.202E-11,  -190., 0.0);
+{  7349} GHN500c+HV               =       G1H500G +      GNO2                                   :  0.100E+01*SUN;
+{  7350} GHN500c+HV               =       G1N500W +      GHO                                    :  0.100E+01*SUN;
+{  7351} GHN500c+HV               =       G1H501K +      GNO2                                   :  0.100E+01*SUN;
+{  7352} G1H501K                     =       G2H500o                                               : ARR( 0.160E+12,  3719., 0.0);
+{  7353} G1H501K                     =       GND4006 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  7354} G2H500o +GNO                =       G1H501L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7355} G2H500o +GNO                =       GHN5033                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7356} G2H500o +GHO2               =       GHH500k                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7357} G2H500o +GNO3               =       G1H501L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7358} G2H500o +MEPERO             =  0.340G1H501L + 0.330GHN5035 + 0.330GHN5036                 : ARR( 0.565E-13,  -845., 0.0);
+{  7359} G2H500o +PERO1              =  0.460G1H501L + 0.270GHN5035 + 0.270GHN5036                 : ARR( 0.434E-13,  -900., 0.0);
+{  7360} G2H500o +PERO2              =  0.400G1H501L + 0.300GHN5035 + 0.300GHN5036                 : ARR( 0.162E-13, -1400., 0.0);
+{  7361} G2H500o +PERO3              =  0.460G1H501L + 0.270GHN5035 + 0.270GHN5036                 : ARR( 0.488E-13, -1250., 0.0);
+{  7362} G2H500o +PERO5              =  0.460G1H501L + 0.270GHN5035 + 0.270GHN5036                 : ARR( 0.183E-11,   450., 0.0);
+{  7363} G2H500o +PERO6              =  0.300G1H501L + 0.350GHN5035 + 0.350GHN5036                 : ARR( 0.168E-13, -1300., 0.0);
+{  7364} G2H500o +PERO9              =  0.650G1H501L + 0.350GHN5036                                : ARR( 0.100E-10,     0., 0.0);
+{  7365} G1H501L                     =       GHN5037 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  7366} G1H501L                     =       GHN400L +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  7367} GNN500c +GHO                =       GNN500f +      GHO2                                   : ARR( 0.440E-11,     0., 0.0);
+{  7368} GNN500c +GHO                =       G2N502T                                               : ARR( 0.309E-12,     0., 0.0);
+{  7369} GNN500c +GHO                =       GNN500d +      GHO2                                   : ARR( 0.451E-12,     0., 0.0);
+{  7370} GNN500c+HV               =       G1N500p +      GNO2                                   :  0.100E+01*SUN;
+{  7371} GNN500c+HV               =       G1N502i +      GNO2                                   :  0.100E+01*SUN;
+{  7372} G2N502T +GNO                =       G1N502j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7373} G2N502T +GNO                =       GNN501a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7374} G2N502T +GHO2               =       GHN5038                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7375} G2N502T +GNO3               =       G1N502j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7376} G2N502T +MEPERO             =  0.340G1N502j + 0.330GNN501B + 0.330GNN5024                 : ARR( 0.565E-13,  -845., 0.0);
+{  7377} G2N502T +PERO1              =  0.460G1N502j + 0.270GNN501B + 0.270GNN5024                 : ARR( 0.434E-13,  -900., 0.0);
+{  7378} G2N502T +PERO2              =  0.400G1N502j + 0.300GNN501B + 0.300GNN5024                 : ARR( 0.162E-13, -1400., 0.0);
+{  7379} G2N502T +PERO3              =  0.460G1N502j + 0.270GNN501B + 0.270GNN5024                 : ARR( 0.488E-13, -1250., 0.0);
+{  7380} G2N502T +PERO5              =  0.460G1N502j + 0.270GNN501B + 0.270GNN5024                 : ARR( 0.183E-11,   450., 0.0);
+{  7381} G2N502T +PERO6              =  0.300G1N502j + 0.350GNN501B + 0.350GNN5024                 : ARR( 0.168E-13, -1300., 0.0);
+{  7382} G2N502T +PERO9              =  0.650G1N502j + 0.350GNN5024                                : ARR( 0.100E-10,     0., 0.0);
+{  7383} G1N502i                     =       GND4006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  7384} G1N502j                     =       GCH2O   +      GNN400F +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  7385} G1N502j                     =       GDO2000 +      GND3002 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{  7386} GNN500d +GHO                =       GNN5026 +      GHO2                                   : ARR( 0.425E-11,     0., 0.0);
+{  7387} GNN500d +GHO                =       G2N502U                                               : ARR( 0.298E-12,     0., 0.0);
+{  7388} GNN500d+HV               =       G1N500r +      GNO2                                   :  0.100E+01*SUN;
+{  7389} GNN500d+HV               =       G3N4008 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  7390} GNN500d+HV               =       GD02000 +      GNN3006                                :  0.100E+01*SUN;
+{  7391} GNN500d+HV               =       G1N502k +      GNO2                                   :  0.100E+01*SUN;
+{  7392} G2N502U +GNO                =       G1N502l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7393} G2N502U +GNO                =       GNN501b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7394} G2N502U +GHO2               =       GHN5039                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7395} G2N502U +GNO3               =       G1N502l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7396} G2N502U +MEPERO             =  0.340G1N502l + 0.330GNN502E + 0.330GNN502F                 : ARR( 0.565E-13,  -845., 0.0);
+{  7397} G2N502U +PERO1              =  0.460G1N502l + 0.270GNN502E + 0.270GNN502F                 : ARR( 0.434E-13,  -900., 0.0);
+{  7398} G2N502U +PERO2              =  0.400G1N502l + 0.300GNN502E + 0.300GNN502F                 : ARR( 0.162E-13, -1400., 0.0);
+{  7399} G2N502U +PERO3              =  0.460G1N502l + 0.270GNN502E + 0.270GNN502F                 : ARR( 0.488E-13, -1250., 0.0);
+{  7400} G2N502U +PERO5              =  0.460G1N502l + 0.270GNN502E + 0.270GNN502F                 : ARR( 0.183E-11,   450., 0.0);
+{  7401} G2N502U +PERO6              =  0.300G1N502l + 0.350GNN502E + 0.350GNN502F                 : ARR( 0.168E-13, -1300., 0.0);
+{  7402} G2N502U +PERO9              =  0.650G1N502l + 0.350GNN502F                                : ARR( 0.100E-10,     0., 0.0);
+{  7403} G3N4008 +GHO2               =  0.800GGN400E + 0.200GAN400E + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7404} G3N4008 +GNO                =       GDO3000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  7405} G3N4008 +GNO2               =       GPN400E                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7406} G3N4008 +GNO3               =       GDO3000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  7407} G3N4008 +MEPERO             =  0.685GDO3000 + 0.315GAN400E + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7408} G3N4008 +PERO1              =  0.800GDO3000 + 0.200GAN400E + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7409} G3N4008 +PERO2              =  0.750GDO3000 + 0.250GAN400E + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7410} G3N4008 +PERO3              =  0.800GDO3000 + 0.200GAN400E + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7411} G3N4008 +PERO5              =  0.650GDO3000 + 0.350GAN400E + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7412} G3N4008 +PERO6              =  0.650GDO3000 + 0.350GAN400E + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7413} G3N4008 +PERO9              =       GDO3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  7414} G1N502k                     =       G3N4008 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{  7415} G1N502l                     =       GCH2O   +      GNN400G +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  7416} GNN500e +GHO                =       GNN5019 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  7417} GNN500e +GHO                =       GNN501J +      GHO2                                   : ARR( 0.412E-12,     0., 0.0);
+{  7418} GNN500e +GHO                =       GNN500p +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{  7419} GNN500e +GHO                =       G2N502W                                               : ARR( 0.565E-13,     0., 0.0);
+{  7420} GNN500e +GHO                =       GNN500f +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  7421} GNN500e +GHO                =       G1N501h                                               : ARR( 0.210E-17,    85., 2.0);
+{  7422} GNN500e+HV               =       G1N501U +      GNO2                                   :  0.100E+01*SUN;
+{  7423} GNN500e+HV               =       G1N500u +      GNO2                                   :  0.100E+01*SUN;
+{  7424} GNN500e+HV               =       G1N500X +      GNO2                                   :  0.100E+01*SUN;
+{  7425} G2N502W +GNO                =       G1N502m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7426} G2N502W +GNO                =       GNN501c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7427} G2N502W +GHO2               =       GHN503A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7428} G2N502W +GNO3               =       G1N502m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7429} G2N502W +MEPERO             =  0.340G1N502m + 0.330GNN502G + 0.330GNN5021                 : ARR( 0.565E-13,  -845., 0.0);
+{  7430} G2N502W +PERO1              =  0.460G1N502m + 0.270GNN502G + 0.270GNN5021                 : ARR( 0.434E-13,  -900., 0.0);
+{  7431} G2N502W +PERO2              =  0.400G1N502m + 0.300GNN502G + 0.300GNN5021                 : ARR( 0.162E-13, -1400., 0.0);
+{  7432} G2N502W +PERO3              =  0.460G1N502m + 0.270GNN502G + 0.270GNN5021                 : ARR( 0.488E-13, -1250., 0.0);
+{  7433} G2N502W +PERO5              =  0.460G1N502m + 0.270GNN502G + 0.270GNN5021                 : ARR( 0.183E-11,   450., 0.0);
+{  7434} G2N502W +PERO6              =  0.300G1N502m + 0.350GNN502G + 0.350GNN5021                 : ARR( 0.168E-13, -1300., 0.0);
+{  7435} G2N502W +PERO9              =  0.650G1N502m + 0.350GNN5021                                : ARR( 0.100E-10,     0., 0.0);
+{  7436} G1N502m                     =       GNN502H +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  7437} G1N502m                     =       GND3002 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6232., 0.0);
+{  7438} GHN500d +GHO                =       GNN500f +      GHO                                    : ARR( 0.169E-10,     0., 0.0);
+{  7439} GHN500d +GHO                =       G2N500X                                               : ARR( 0.200E-11,  -190., 0.0);
+{  7440} GHN500d+HV               =       G1H501M +      GNO2                                   :  0.100E+01*SUN;
+{  7441} GHN500d+HV               =       G1H500J +      GNO2                                   :  0.100E+01*SUN;
+{  7442} GHN500d+HV               =       G1N500X +      GHO                                    :  0.100E+01*SUN;
+{  7443} G1H501M                     =       GHN400M +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  7444} GNN500f +GHO                =       G3N500B                                               : ARR( 0.219E-10,     0., 0.0);
+{  7445} GNN500f +GNO3               =       G3N500B +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  7446} GNN500f+HV               =       G1N502n +      GNO2                                   :  0.100E+01*SUN;
+{  7447} GNN500f+HV               =       G1N500w +      GNO2                                   :  0.100E+01*SUN;
+{  7448} GNN500f+HV               =       G2N400G +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  7449} GNN500f+HV               =       GNN3006 +      GD02000                                :  0.100E+01*SUN;
+{  7450} G3N500B +GHO2               =  0.800GGN500F + 0.200GAN500H + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7451} G3N500B +GNO                =       G2N400G +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  7452} G3N500B +GNO2               =       GPN500H                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7453} G3N500B +GNO3               =       G2N400G +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  7454} G3N500B +MEPERO             =  0.685G2N400G + 0.315GAN500H + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7455} G3N500B +PERO1              =  0.800G2N400G + 0.200GAN500H + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7456} G3N500B +PERO2              =  0.750G2N400G + 0.250GAN500H + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7457} G3N500B +PERO3              =  0.800G2N400G + 0.200GAN500H + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7458} G3N500B +PERO5              =  0.650G2N400G + 0.350GAN500H + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7459} G3N500B +PERO6              =  0.650G2N400G + 0.350GAN500H + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7460} G3N500B +PERO9              =       G2N400G +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  7461} G1N502n                     =       GND400D +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  7462} G2N400G +GNO                =       G1N400G +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7463} G2N400G +GNO                =       GNN400H                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7464} G2N400G +GHO2               =       GHN400N                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7465} G2N400G +GNO3               =       G1N400G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7466} G2N400G +MEPERO             =  0.480G1N400G + 0.260GNN400A + 0.260GNN400F                 : ARR( 0.164E-12,  -795., 0.0);
+{  7467} G2N400G +PERO1              =  0.600G1N400G + 0.200GNN400A + 0.200GNN400F                 : ARR( 0.126E-12,  -850., 0.0);
+{  7468} G2N400G +PERO2              =  0.560G1N400G + 0.220GNN400A + 0.220GNN400F                 : ARR( 0.471E-13, -1350., 0.0);
+{  7469} G2N400G +PERO3              =  0.600G1N400G + 0.200GNN400A + 0.200GNN400F                 : ARR( 0.142E-12, -1200., 0.0);
+{  7470} G2N400G +PERO5              =  0.600G1N400G + 0.200GNN400A + 0.200GNN400F                 : ARR( 0.533E-11,   500., 0.0);
+{  7471} G2N400G +PERO6              =  0.460G1N400G + 0.270GNN400A + 0.270GNN400F                 : ARR( 0.488E-13, -1250., 0.0);
+{  7472} G2N400G +PERO9              =  0.800G1N400G + 0.200GNN400F                                : ARR( 0.100E-10,     0., 0.0);
+{  7473} G1N400G +OXYGEN             =       GNN400F +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  7474} G1N400G                     =       GND4009 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  7475} G1N400G                     =       GND3002 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{  7476} GHN500e +GHO                =       GNK500A +      GHO                                    : ARR( 0.837E-11,     0., 0.0);
+{  7477} GHN500e +GHO                =       G2H500p                                               : ARR( 0.144E-11,     0., 0.0);
+{  7478} GHN500e +GHO                =       GHN502Y +      GHO2                                   : ARR( 0.408E-11,     0., 0.0);
+{  7479} GHN500e +GHO                =       G2N502X                                               : ARR( 0.193E-11,  -190., 0.0);
+{  7480} GHN500e+HV               =       G1H5009 +      GNO2                                   :  0.100E+01*SUN;
+{  7481} GHN500e+HV               =       G1N501R +      GHO                                    :  0.100E+01*SUN;
+{  7482} G2H500p +GNO                =       G1H501N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7483} G2H500p +GNO                =       GHN503B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7484} G2H500p +GHO2               =       GHH500l                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7485} G2H500p +GNO3               =       G1H501N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7486} G2H500p +MEPERO             =  0.340G1H501N + 0.330GHN503C + 0.330GHN501r                 : ARR( 0.565E-13,  -845., 0.0);
+{  7487} G2H500p +PERO1              =  0.460G1H501N + 0.270GHN503C + 0.270GHN501r                 : ARR( 0.434E-13,  -900., 0.0);
+{  7488} G2H500p +PERO2              =  0.400G1H501N + 0.300GHN503C + 0.300GHN501r                 : ARR( 0.162E-13, -1400., 0.0);
+{  7489} G2H500p +PERO3              =  0.460G1H501N + 0.270GHN503C + 0.270GHN501r                 : ARR( 0.488E-13, -1250., 0.0);
+{  7490} G2H500p +PERO5              =  0.460G1H501N + 0.270GHN503C + 0.270GHN501r                 : ARR( 0.183E-11,   450., 0.0);
+{  7491} G2H500p +PERO6              =  0.300G1H501N + 0.350GHN503C + 0.350GHN501r                 : ARR( 0.168E-13, -1300., 0.0);
+{  7492} G2H500p +PERO9              =  0.650G1H501N + 0.350GHN501r                                : ARR( 0.100E-10,     0., 0.0);
+{  7493} G2N502X +GNO                =       G1N501R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7494} G2N502X +GNO                =       GNN5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7495} G2N502X +GHO2               =       GHN500e                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7496} G2N502X +GNO3               =       G1N501R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7497} G2N502X +MEPERO             =  0.340G1N501R + 0.330GNO500K + 0.330GNK500A                 : ARR( 0.565E-13,  -845., 0.0);
+{  7498} G2N502X +PERO1              =  0.460G1N501R + 0.270GNO500K + 0.270GNK500A                 : ARR( 0.434E-13,  -900., 0.0);
+{  7499} G2N502X +PERO2              =  0.400G1N501R + 0.300GNO500K + 0.300GNK500A                 : ARR( 0.162E-13, -1400., 0.0);
+{  7500} G2N502X +PERO3              =  0.460G1N501R + 0.270GNO500K + 0.270GNK500A                 : ARR( 0.488E-13, -1250., 0.0);
+{  7501} G2N502X +PERO5              =  0.460G1N501R + 0.270GNO500K + 0.270GNK500A                 : ARR( 0.183E-11,   450., 0.0);
+{  7502} G2N502X +PERO6              =  0.300G1N501R + 0.350GNO500K + 0.350GNK500A                 : ARR( 0.168E-13, -1300., 0.0);
+{  7503} G2N502X +PERO9              =  0.650G1N501R + 0.350GNK500A                                : ARR( 0.100E-10,     0., 0.0);
+{  7504} G1H501N                     =       GND3001 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{  7505} G1H501N                     =       GHN400O +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  7506} GHH5006 +GHO                =       GHK5008 +      GHO                                    : ARR( 0.393E-10,     0., 0.0);
+{  7507} GHH5006 +GHO                =       GHK5007 +      GHO                                    : ARR( 0.483E-10,     0., 0.0);
+{  7508} GHH5006+HV               =       G1H5009 +      GHO                                    :  0.100E+01*SUN;
+{  7509} GHH5006+HV               =       G1H500c +      GHO                                    :  0.100E+01*SUN;
+{  7510} GHN500f +GHO                =       GNK500F +      GHO                                    : ARR( 0.340E-10,     0., 0.0);
+{  7511} GHN500f +GHO                =       GHN500g +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{  7512} GHN500f +GHO                =       G2N500Y                                               : ARR( 0.193E-11,  -190., 0.0);
+{  7513} GHN500f+HV               =       G1N500Y +      GHO                                    :  0.100E+01*SUN;
+{  7514} GHN500f+HV               =       G1H501O +      GNO2                                   :  0.100E+01*SUN;
+{  7515} G1H501O                     =       GKO500B +      GHO                                    : ARR( 0.800E+11,  1771., 0.0);
+{  7516} GNO500K +GHO                =       GNK500A +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{  7517} GNO500K +GHO                =       G2N502Y                                               : ARR( 0.149E-11,     0., 0.0);
+{  7518} GNO500K +GHO                =       GND500f +      GHO2                                   : ARR( 0.424E-11,     0., 0.0);
+{  7519} GNO500K+HV               =       G1O500F +      GNO2                                   :  0.100E+01*SUN;
+{  7520} G2N502Y +GNO                =       G1N502o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7521} G2N502Y +GNO                =       GNN502I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7522} G2N502Y +GHO2               =       GHN503D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7523} G2N502Y +GNO3               =       G1N502o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7524} G2N502Y +MEPERO             =  0.340G1N502o + 0.330GNO500a + 0.330GNK500k                 : ARR( 0.565E-13,  -845., 0.0);
+{  7525} G2N502Y +PERO1              =  0.460G1N502o + 0.270GNO500a + 0.270GNK500k                 : ARR( 0.434E-13,  -900., 0.0);
+{  7526} G2N502Y +PERO2              =  0.400G1N502o + 0.300GNO500a + 0.300GNK500k                 : ARR( 0.162E-13, -1400., 0.0);
+{  7527} G2N502Y +PERO3              =  0.460G1N502o + 0.270GNO500a + 0.270GNK500k                 : ARR( 0.488E-13, -1250., 0.0);
+{  7528} G2N502Y +PERO5              =  0.460G1N502o + 0.270GNO500a + 0.270GNK500k                 : ARR( 0.183E-11,   450., 0.0);
+{  7529} G2N502Y +PERO6              =  0.300G1N502o + 0.350GNO500a + 0.350GNK500k                 : ARR( 0.168E-13, -1300., 0.0);
+{  7530} G2N502Y +PERO9              =  0.650G1N502o + 0.350GNK500k                                : ARR( 0.100E-10,     0., 0.0);
+{  7531} G1N502o                     =       GND3001 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  7532} GHO500G +GHO                =       GKO500B +      GHO                                    : ARR( 0.347E-10,     0., 0.0);
+{  7533} GHO500G +GHO                =       GHK5007 +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  7534} GHO500G +GHO                =       GHD500G +      GHO2                                   : ARR( 0.417E-11,     0., 0.0);
+{  7535} GHO500G +GHO                =       G2O500D                                               : ARR( 0.197E-11,  -190., 0.0);
+{  7536} GHO500G+HV               =       G1O500F +      GHO                                    :  0.100E+01*SUN;
+{  7537} GHN500g +GHO                =       GNK500G +      GHO                                    : ARR( 0.212E-10,     0., 0.0);
+{  7538} GHN500g +GHO                =       G2N500a                                               : ARR( 0.197E-11,  -190., 0.0);
+{  7539} GHN500g+HV               =       G1N500a +      GHO                                    :  0.100E+01*SUN;
+{  7540} GHN500g+HV               =       G3H3001 +      G2N2000                                :  0.100E+01*SUN;
+{  7541} GHN500g+HV               =       G1H501P +      GNO2                                   :  0.100E+01*SUN;
+{  7542} G1H501P +OXYGEN             =       GHD500F +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  7543} G1H501P                     =       GKK5002 +      GHO                                    : ARR( 0.800E+11,  3753., 0.0);
+{  7544} GNN500g +GHO                =       G2N502Z                                               : ARR( 0.542E-12,     0., 0.0);
+{  7545} GNN500g +GHO                =       G2N502a                                               : ARR( 0.714E-12,     0., 0.0);
+{  7546} GNN500g+HV               =       G3K3000 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{  7547} GNN500g+HV               =       G1N500b +      GNO2                                   :  0.100E+01*SUN;
+{  7548} GNN500g+HV               =       G1N502p +      GNO2                                   :  0.100E+01*SUN;
+{  7549} G2N502Z +GNO                =       G1N502q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7550} G2N502Z +GNO                =       GNN501G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7551} G2N502Z +GHO2               =       GHN503E                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7552} G2N502Z +GNO3               =       G1N502q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7553} G2N502Z +MEPERO             =  0.480G1N502q + 0.260GNN502J + 0.260GNN502K                 : ARR( 0.146E-12,  -445., 0.0);
+{  7554} G2N502Z +PERO1              =  0.600G1N502q + 0.200GNN502J + 0.200GNN502K                 : ARR( 0.112E-12,  -500., 0.0);
+{  7555} G2N502Z +PERO2              =  0.560G1N502q + 0.220GNN502J + 0.220GNN502K                 : ARR( 0.418E-13, -1000., 0.0);
+{  7556} G2N502Z +PERO3              =  0.600G1N502q + 0.200GNN502J + 0.200GNN502K                 : ARR( 0.126E-12,  -850., 0.0);
+{  7557} G2N502Z +PERO5              =  0.600G1N502q + 0.200GNN502J + 0.200GNN502K                 : ARR( 0.473E-11,   850., 0.0);
+{  7558} G2N502Z +PERO6              =  0.460G1N502q + 0.270GNN502J + 0.270GNN502K                 : ARR( 0.434E-13,  -900., 0.0);
+{  7559} G2N502Z +PERO9              =  0.800G1N502q + 0.200GNN502K                                : ARR( 0.100E-10,     0., 0.0);
+{  7560} G2N502a +GNO                =       G1N502r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7561} G2N502a +GNO                =       GNN501i                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7562} G2N502a +GHO2               =       GHN503F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7563} G2N502a +GNO3               =       G1N502r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7564} G2N502a +MEPERO             =  0.340G1N502r + 0.330GNN502L + 0.330GNN501z                 : ARR( 0.565E-13,  -845., 0.0);
+{  7565} G2N502a +PERO1              =  0.460G1N502r + 0.270GNN502L + 0.270GNN501z                 : ARR( 0.434E-13,  -900., 0.0);
+{  7566} G2N502a +PERO2              =  0.400G1N502r + 0.300GNN502L + 0.300GNN501z                 : ARR( 0.162E-13, -1400., 0.0);
+{  7567} G2N502a +PERO3              =  0.460G1N502r + 0.270GNN502L + 0.270GNN501z                 : ARR( 0.488E-13, -1250., 0.0);
+{  7568} G2N502a +PERO5              =  0.460G1N502r + 0.270GNN502L + 0.270GNN501z                 : ARR( 0.183E-11,   450., 0.0);
+{  7569} G2N502a +PERO6              =  0.300G1N502r + 0.350GNN502L + 0.350GNN501z                 : ARR( 0.168E-13, -1300., 0.0);
+{  7570} G2N502a +PERO9              =  0.650G1N502r + 0.350GNN501z                                : ARR( 0.100E-10,     0., 0.0);
+{  7571} G1N502p +OXYGEN             =       GND500j +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{  7572} G1N502p                     =       G2N502b                                               : ARR( 0.160E+12,  5075., 0.0);
+{  7573} G1N502p                     =       GDK4002 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{  7574} G1N502q +OXYGEN             =       GNN502K +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  7575} G1N502r                     =       GD02000 +      G3N3003                                : ARR( 0.200E+15,  2814., 0.0);
+{  7576} G2N502b +GNO                =       G1N502s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7577} G2N502b +GNO                =       GNN501A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7578} G2N502b +GHO2               =       GHN503G                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7579} G2N502b +GNO3               =       G1N502s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7580} G2N502b +MEPERO             =  0.340G1N502s + 0.330GNK500v + 0.330GNK500c                 : ARR( 0.565E-13,  -845., 0.0);
+{  7581} G2N502b +PERO1              =  0.460G1N502s + 0.270GNK500v + 0.270GNK500c                 : ARR( 0.434E-13,  -900., 0.0);
+{  7582} G2N502b +PERO2              =  0.400G1N502s + 0.300GNK500v + 0.300GNK500c                 : ARR( 0.162E-13, -1400., 0.0);
+{  7583} G2N502b +PERO3              =  0.460G1N502s + 0.270GNK500v + 0.270GNK500c                 : ARR( 0.488E-13, -1250., 0.0);
+{  7584} G2N502b +PERO5              =  0.460G1N502s + 0.270GNK500v + 0.270GNK500c                 : ARR( 0.183E-11,   450., 0.0);
+{  7585} G2N502b +PERO6              =  0.300G1N502s + 0.350GNK500v + 0.350GNK500c                 : ARR( 0.168E-13, -1300., 0.0);
+{  7586} G2N502b +PERO9              =  0.650G1N502s + 0.350GNK500c                                : ARR( 0.100E-10,     0., 0.0);
+{  7587} G3N3003 +GHO2               =  0.800GGN3004 + 0.200GAN3004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7588} G3N3003 +GNO                =       GND2000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  7589} G3N3003 +GNO2               =       GPN3004                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7590} G3N3003 +GNO3               =       GND2000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  7591} G3N3003 +MEPERO             =  0.685GND2000 + 0.315GAN3004 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7592} G3N3003 +PERO1              =  0.800GND2000 + 0.200GAN3004 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7593} G3N3003 +PERO2              =  0.750GND2000 + 0.250GAN3004 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7594} G3N3003 +PERO3              =  0.800GND2000 + 0.200GAN3004 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7595} G3N3003 +PERO5              =  0.650GND2000 + 0.350GAN3004 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7596} G3N3003 +PERO6              =  0.650GND2000 + 0.350GAN3004 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7597} G3N3003 +PERO9              =       GND2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  7598} G1N502s                     =       GD02000 +      G3N3004                                : ARR( 0.200E+15,  2814., 0.0);
+{  7599} G3N3004 +GHO2               =  0.800GGN3002 + 0.200GAN3002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7600} G3N3004 +GNO                =       GDO2000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  7601} G3N3004 +GNO2               =       GPN3002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7602} G3N3004 +GNO3               =       GDO2000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  7603} G3N3004 +MEPERO             =  0.685GDO2000 + 0.315GAN3002 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7604} G3N3004 +PERO1              =  0.800GDO2000 + 0.200GAN3002 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7605} G3N3004 +PERO2              =  0.750GDO2000 + 0.250GAN3002 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7606} G3N3004 +PERO3              =  0.800GDO2000 + 0.200GAN3002 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7607} G3N3004 +PERO5              =  0.650GDO2000 + 0.350GAN3002 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7608} G3N3004 +PERO6              =  0.650GDO2000 + 0.350GAN3002 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7609} G3N3004 +PERO9              =       GDO2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  7610} GHN500h +GHO                =       G2H500q                                               : ARR( 0.539E-12,     0., 0.0);
+{  7611} GHN500h +GHO                =       G2H500r                                               : ARR( 0.711E-12,     0., 0.0);
+{  7612} GHN500h +GHO                =       GNK500L +      GHO                                    : ARR( 0.510E-11,     0., 0.0);
+{  7613} GHN500h +GHO                =       G2N500b                                               : ARR( 0.193E-11,  -190., 0.0);
+{  7614} GHN500h+HV               =       G3K3000 +      GND2000 +      GHO                     :  0.100E+01*SUN;
+{  7615} GHN500h+HV               =       G1N500b +      GHO                                    :  0.100E+01*SUN;
+{  7616} GHN500h+HV               =       G1H501Q +      GNO2                                   :  0.100E+01*SUN;
+{  7617} G2H500q +GNO                =       G1H501R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7618} G2H500q +GNO                =       GHN501y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7619} G2H500q +GHO2               =       GHH500m                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7620} G2H500q +GNO3               =       G1H501R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7621} G2H500q +MEPERO             =  0.480G1H501R + 0.260GHN500z + 0.260GHN503H                 : ARR( 0.146E-12,  -445., 0.0);
+{  7622} G2H500q +PERO1              =  0.600G1H501R + 0.200GHN500z + 0.200GHN503H                 : ARR( 0.112E-12,  -500., 0.0);
+{  7623} G2H500q +PERO2              =  0.560G1H501R + 0.220GHN500z + 0.220GHN503H                 : ARR( 0.418E-13, -1000., 0.0);
+{  7624} G2H500q +PERO3              =  0.600G1H501R + 0.200GHN500z + 0.200GHN503H                 : ARR( 0.126E-12,  -850., 0.0);
+{  7625} G2H500q +PERO5              =  0.600G1H501R + 0.200GHN500z + 0.200GHN503H                 : ARR( 0.473E-11,   850., 0.0);
+{  7626} G2H500q +PERO6              =  0.460G1H501R + 0.270GHN500z + 0.270GHN503H                 : ARR( 0.434E-13,  -900., 0.0);
+{  7627} G2H500q +PERO9              =  0.800G1H501R + 0.200GHN503H                                : ARR( 0.100E-10,     0., 0.0);
+{  7628} G2H500r +GNO                =       G1H501S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7629} G2H500r +GNO                =       GHN502b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7630} G2H500r +GHO2               =       GHH500n                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7631} G2H500r +GNO3               =       G1H501S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7632} G2H500r +MEPERO             =  0.340G1H501S + 0.330GHN503I + 0.330GHN502o                 : ARR( 0.565E-13,  -845., 0.0);
+{  7633} G2H500r +PERO1              =  0.460G1H501S + 0.270GHN503I + 0.270GHN502o                 : ARR( 0.434E-13,  -900., 0.0);
+{  7634} G2H500r +PERO2              =  0.400G1H501S + 0.300GHN503I + 0.300GHN502o                 : ARR( 0.162E-13, -1400., 0.0);
+{  7635} G2H500r +PERO3              =  0.460G1H501S + 0.270GHN503I + 0.270GHN502o                 : ARR( 0.488E-13, -1250., 0.0);
+{  7636} G2H500r +PERO5              =  0.460G1H501S + 0.270GHN503I + 0.270GHN502o                 : ARR( 0.183E-11,   450., 0.0);
+{  7637} G2H500r +PERO6              =  0.300G1H501S + 0.350GHN503I + 0.350GHN502o                 : ARR( 0.168E-13, -1300., 0.0);
+{  7638} G2H500r +PERO9              =  0.650G1H501S + 0.350GHN502o                                : ARR( 0.100E-10,     0., 0.0);
+{  7639} G1H501Q +OXYGEN             =       GHD500T +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{  7640} G1H501Q                     =       GDK4002 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5784., 0.0);
+{  7641} G1H501R +OXYGEN             =       GHN503H +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  7642} G1H501R                     =       GNK500S +      GHO                                    : ARR( 0.800E+11,  4380., 0.0);
+{  7643} G1H501S                     =       GD02000 +      G3H3002                                : ARR( 0.200E+15,  2777., 0.0);
+{  7644} G3H3002 +GHO2               =  0.800GGH3003 + 0.200GAH3003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7645} G3H3002 +GNO                =       GND2000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  7646} G3H3002 +GNO2               =       GPH3003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7647} G3H3002 +GNO3               =       GND2000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  7648} G3H3002 +MEPERO             =  0.685GND2000 + 0.315GAH3003 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7649} G3H3002 +PERO1              =  0.800GND2000 + 0.200GAH3003 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7650} G3H3002 +PERO2              =  0.750GND2000 + 0.250GAH3003 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7651} G3H3002 +PERO3              =  0.800GND2000 + 0.200GAH3003 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7652} G3H3002 +PERO5              =  0.650GND2000 + 0.350GAH3003 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7653} G3H3002 +PERO6              =  0.650GND2000 + 0.350GAH3003 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  7654} G3H3002 +PERO9              =       GND2000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  7655} GNK500K +GHO                =       G2N502c                                               : ARR( 0.531E-12,     0., 0.0);
+{  7656} GNK500K +GHO                =       G2N502d                                               : ARR( 0.701E-12,     0., 0.0);
+{  7657} GNK500K +GHO                =       GNK500L +      GHO2                                   : ARR( 0.126E-11,     0., 0.0);
+{  7658} GNK500K +GHO                =       GDK5009 +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{  7659} GNK500K +GHO                =       G1N500b                                               : ARR( 0.210E-17,    85., 2.0);
+{  7660} GNK500K+HV               =       G3K3000 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{  7661} GNK500K+HV               =       G1K500G +      GNO2                                   :  0.100E+01*SUN;
+{  7662} G2N502c +GNO                =       G1N502t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7663} G2N502c +GNO                =       GNN500p                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7664} G2N502c +GHO2               =       GHN5019                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7665} G2N502c +GNO3               =       G1N502t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7666} G2N502c +MEPERO             =  0.480G1N502t + 0.260GNK500O + 0.260GND500F                 : ARR( 0.146E-12,  -445., 0.0);
+{  7667} G2N502c +PERO1              =  0.600G1N502t + 0.200GNK500O + 0.200GND500F                 : ARR( 0.112E-12,  -500., 0.0);
+{  7668} G2N502c +PERO2              =  0.560G1N502t + 0.220GNK500O + 0.220GND500F                 : ARR( 0.418E-13, -1000., 0.0);
+{  7669} G2N502c +PERO3              =  0.600G1N502t + 0.200GNK500O + 0.200GND500F                 : ARR( 0.126E-12,  -850., 0.0);
+{  7670} G2N502c +PERO5              =  0.600G1N502t + 0.200GNK500O + 0.200GND500F                 : ARR( 0.473E-11,   850., 0.0);
+{  7671} G2N502c +PERO6              =  0.460G1N502t + 0.270GNK500O + 0.270GND500F                 : ARR( 0.434E-13,  -900., 0.0);
+{  7672} G2N502c +PERO9              =  0.800G1N502t + 0.200GND500F                                : ARR( 0.100E-10,     0., 0.0);
+{  7673} G2N502d +GNO                =       G1N502u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7674} G2N502d +GNO                =       GNN501j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7675} G2N502d +GHO2               =       GHN503J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7676} G2N502d +GNO3               =       G1N502u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7677} G2N502d +MEPERO             =  0.340G1N502u + 0.330GNK500f + 0.330GNK500r                 : ARR( 0.565E-13,  -845., 0.0);
+{  7678} G2N502d +PERO1              =  0.460G1N502u + 0.270GNK500f + 0.270GNK500r                 : ARR( 0.434E-13,  -900., 0.0);
+{  7679} G2N502d +PERO2              =  0.400G1N502u + 0.300GNK500f + 0.300GNK500r                 : ARR( 0.162E-13, -1400., 0.0);
+{  7680} G2N502d +PERO3              =  0.460G1N502u + 0.270GNK500f + 0.270GNK500r                 : ARR( 0.488E-13, -1250., 0.0);
+{  7681} G2N502d +PERO5              =  0.460G1N502u + 0.270GNK500f + 0.270GNK500r                 : ARR( 0.183E-11,   450., 0.0);
+{  7682} G2N502d +PERO6              =  0.300G1N502u + 0.350GNK500f + 0.350GNK500r                 : ARR( 0.168E-13, -1300., 0.0);
+{  7683} G2N502d +PERO9              =  0.650G1N502u + 0.350GNK500r                                : ARR( 0.100E-10,     0., 0.0);
+{  7684} G1N502t +OXYGEN             =       GND500F +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  7685} G1N502t                     =       GNK500S +      GHO2                                   : ARR( 0.800E+11,  4727., 0.0);
+{  7686} G1N502u                     =       GD02000 +      G3N3002                                : ARR( 0.200E+15,  2777., 0.0);
+{  7687} GNK500L +GHO                =       G2N502e                                               : ARR( 0.543E-12,     0., 0.0);
+{  7688} GNK500L +GHO                =       G2N502f                                               : ARR( 0.716E-12,     0., 0.0);
+{  7689} GNK500L+HV               =       G3K3000 +      G3N2000                                :  0.100E+01*SUN;
+{  7690} GNK500L+HV               =       G1K500O +      GNO2                                   :  0.100E+01*SUN;
+{  7691} G2N502e +GNO                =       G1N502v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7692} G2N502e +GNO                =       GNN501L                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7693} G2N502e +GHO2               =       GHN503K                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7694} G2N502e +GNO3               =       G1N502v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7695} G2N502e +MEPERO             =  0.480G1N502v + 0.260GNK500S + 0.260GND500k                 : ARR( 0.146E-12,  -445., 0.0);
+{  7696} G2N502e +PERO1              =  0.600G1N502v + 0.200GNK500S + 0.200GND500k                 : ARR( 0.112E-12,  -500., 0.0);
+{  7697} G2N502e +PERO2              =  0.560G1N502v + 0.220GNK500S + 0.220GND500k                 : ARR( 0.418E-13, -1000., 0.0);
+{  7698} G2N502e +PERO3              =  0.600G1N502v + 0.200GNK500S + 0.200GND500k                 : ARR( 0.126E-12,  -850., 0.0);
+{  7699} G2N502e +PERO5              =  0.600G1N502v + 0.200GNK500S + 0.200GND500k                 : ARR( 0.473E-11,   850., 0.0);
+{  7700} G2N502e +PERO6              =  0.460G1N502v + 0.270GNK500S + 0.270GND500k                 : ARR( 0.434E-13,  -900., 0.0);
+{  7701} G2N502e +PERO9              =  0.800G1N502v + 0.200GND500k                                : ARR( 0.100E-10,     0., 0.0);
+{  7702} G2N502f +GNO                =       G1N502w +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7703} G2N502f +GNO                =       GNN501k                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7704} G2N502f +GHO2               =       GHN503L                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7705} G2N502f +GNO3               =       G1N502w +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7706} G2N502f +MEPERO             =  0.340G1N502w + 0.330GNK500w + 0.330GNK500s                 : ARR( 0.565E-13,  -845., 0.0);
+{  7707} G2N502f +PERO1              =  0.460G1N502w + 0.270GNK500w + 0.270GNK500s                 : ARR( 0.434E-13,  -900., 0.0);
+{  7708} G2N502f +PERO2              =  0.400G1N502w + 0.300GNK500w + 0.300GNK500s                 : ARR( 0.162E-13, -1400., 0.0);
+{  7709} G2N502f +PERO3              =  0.460G1N502w + 0.270GNK500w + 0.270GNK500s                 : ARR( 0.488E-13, -1250., 0.0);
+{  7710} G2N502f +PERO5              =  0.460G1N502w + 0.270GNK500w + 0.270GNK500s                 : ARR( 0.183E-11,   450., 0.0);
+{  7711} G2N502f +PERO6              =  0.300G1N502w + 0.350GNK500w + 0.350GNK500s                 : ARR( 0.168E-13, -1300., 0.0);
+{  7712} G2N502f +PERO9              =  0.650G1N502w + 0.350GNK500s                                : ARR( 0.100E-10,     0., 0.0);
+{  7713} G1N502v +OXYGEN             =       GND500k +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  7714} G1N502w                     =       GD02000 +      G3N2000 +      GCO                     : ARR( 0.200E+15,  3071., 0.0);
+{  7715} GGN3000 +GHO                =       G3N3000                                               : ARR( 0.202E-11,  -190., 0.0);
+{  7716} GGN3000+HV               =       G1G3000 +      GNO2                                   :  0.100E+01*SUN;
+{  7717} GGN3000+HV               =       G2N2000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  7718} GAN3000 +GHO                =       G2A3003                                               : ARR( 0.128E-12,     0., 0.0);
+{  7719} GAN3000 +GHO                =       GAD3000 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  7720} GAN3000 +GHO                =       G2N2000 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{  7721} GAN3000+HV               =       G1A3000 +      GNO2                                   :  0.100E+01*SUN;
+{  7722} G2A3003 +GNO                =       G1A3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  7723} G2A3003 +GNO                =       GAN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  7724} G2A3003 +GHO2               =       GAH3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{  7725} G2A3003 +GNO3               =       G1A3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7726} G2A3003 +MEPERO             =  0.340G1A3003 + 0.330GAN3003 + 0.330GAN3005                 : ARR( 0.565E-13,  -845., 0.0);
+{  7727} G2A3003 +PERO1              =  0.460G1A3003 + 0.270GAN3003 + 0.270GAN3005                 : ARR( 0.434E-13,  -900., 0.0);
+{  7728} G2A3003 +PERO2              =  0.400G1A3003 + 0.300GAN3003 + 0.300GAN3005                 : ARR( 0.162E-13, -1400., 0.0);
+{  7729} G2A3003 +PERO3              =  0.460G1A3003 + 0.270GAN3003 + 0.270GAN3005                 : ARR( 0.488E-13, -1250., 0.0);
+{  7730} G2A3003 +PERO5              =  0.460G1A3003 + 0.270GAN3003 + 0.270GAN3005                 : ARR( 0.183E-11,   450., 0.0);
+{  7731} G2A3003 +PERO6              =  0.300G1A3003 + 0.350GAN3003 + 0.350GAN3005                 : ARR( 0.168E-13, -1300., 0.0);
+{  7732} G2A3003 +PERO9              =  0.650G1A3003 + 0.350GAN3005                                : ARR( 0.100E-10,     0., 0.0);
+{  7733} G1A3003                     =       GCO     +      GND2000 +      GHO                     : ARR( 0.200E+15,  5230., 0.0);
+{  7734} GPN3000                     =       G3N3000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  7735} GPN3000 +GHO                =       GPD3000 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{  7736} GPN3000 +GHO                =       G2P3003                                               : ARR( 0.172E-12,     0., 0.0);
+{  7737} GPN3000+HV               =       G1P3000 +      GNO2                                   :  0.100E+01*SUN;
+{  7738} GPN3000+HV               =       G3N3000 +      GNO2                                   :  0.100E+01*SUN;
+{  7739} G2P3003 +GNO                =       G1P3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  7740} G2P3003 +GNO                =       GPN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  7741} G2P3003 +GHO2               =       GPH3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{  7742} G2P3003 +GNO3               =       G1P3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7743} G2P3003 +MEPERO             =  0.340G1P3003 + 0.330GPN3003 + 0.330GPN3005                 : ARR( 0.565E-13,  -845., 0.0);
+{  7744} G2P3003 +PERO1              =  0.460G1P3003 + 0.270GPN3003 + 0.270GPN3005                 : ARR( 0.434E-13,  -900., 0.0);
+{  7745} G2P3003 +PERO2              =  0.400G1P3003 + 0.300GPN3003 + 0.300GPN3005                 : ARR( 0.162E-13, -1400., 0.0);
+{  7746} G2P3003 +PERO3              =  0.460G1P3003 + 0.270GPN3003 + 0.270GPN3005                 : ARR( 0.488E-13, -1250., 0.0);
+{  7747} G2P3003 +PERO5              =  0.460G1P3003 + 0.270GPN3003 + 0.270GPN3005                 : ARR( 0.183E-11,   450., 0.0);
+{  7748} G2P3003 +PERO6              =  0.300G1P3003 + 0.350GPN3003 + 0.350GPN3005                 : ARR( 0.168E-13, -1300., 0.0);
+{  7749} G2P3003 +PERO9              =  0.650G1P3003 + 0.350GPN3005                                : ARR( 0.100E-10,     0., 0.0);
+{  7750} G1P3003                     =       GND2000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5261., 0.0);
+{  7751} GHN500i +GHO                =       G2H500s                                               : ARR( 0.143E-11,     0., 0.0);
+{  7752} GHN500i +GHO                =       GNN500h +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{  7753} GHN500i +GHO                =       G2N500c                                               : ARR( 0.193E-11,  -190., 0.0);
+{  7754} GHN500i+HV               =       G1H501T +      GNO2                                   :  0.100E+01*SUN;
+{  7755} GHN500i+HV               =       G1H501U +      GNO2                                   :  0.100E+01*SUN;
+{  7756} GHN500i+HV               =       G1N500d +      GHO                                    :  0.100E+01*SUN;
+{  7757} G2H500s +GNO                =       G1H501W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7758} G2H500s +GNO                =       GHN502c                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7759} G2H500s +GHO2               =       GHH500o                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7760} G2H500s +GNO3               =       G1H501W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7761} G2H500s +MEPERO             =  0.340G1H501W + 0.330GHN501O + 0.330GHN502C                 : ARR( 0.565E-13,  -845., 0.0);
+{  7762} G2H500s +PERO1              =  0.460G1H501W + 0.270GHN501O + 0.270GHN502C                 : ARR( 0.434E-13,  -900., 0.0);
+{  7763} G2H500s +PERO2              =  0.400G1H501W + 0.300GHN501O + 0.300GHN502C                 : ARR( 0.162E-13, -1400., 0.0);
+{  7764} G2H500s +PERO3              =  0.460G1H501W + 0.270GHN501O + 0.270GHN502C                 : ARR( 0.488E-13, -1250., 0.0);
+{  7765} G2H500s +PERO5              =  0.460G1H501W + 0.270GHN501O + 0.270GHN502C                 : ARR( 0.183E-11,   450., 0.0);
+{  7766} G2H500s +PERO6              =  0.300G1H501W + 0.350GHN501O + 0.350GHN502C                 : ARR( 0.168E-13, -1300., 0.0);
+{  7767} G2H500s +PERO9              =  0.650G1H501W + 0.350GHN502C                                : ARR( 0.100E-10,     0., 0.0);
+{  7768} G1H501T                     =       G2H500t                                               : ARR( 0.160E+12,  3000., 0.0);
+{  7769} G1H501U                     =       GND5001 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{  7770} G1H501W                     =       GHN501Q +      GNO2                                   : ARR( 0.160E+12,  5251., 0.0);
+{  7771} G1H501W                     =       G2N3004 +      GHD2000                                : ARR( 0.200E+15,  6985., 0.0);
+{  7772} G1H501W                     =       GNN4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  7773} G2H500t +GNO                =       G1H501X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7774} G2H500t +GNO                =       GHN502H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7775} G2H500t +GHO2               =       GHH500p                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7776} G2H500t +GNO3               =       G1H501X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7777} G2H500t +MEPERO             =  0.340G1H501X + 0.330GHN501P + 0.330GHN501H                 : ARR( 0.565E-13,  -845., 0.0);
+{  7778} G2H500t +PERO1              =  0.460G1H501X + 0.270GHN501P + 0.270GHN501H                 : ARR( 0.434E-13,  -900., 0.0);
+{  7779} G2H500t +PERO2              =  0.400G1H501X + 0.300GHN501P + 0.300GHN501H                 : ARR( 0.162E-13, -1400., 0.0);
+{  7780} G2H500t +PERO3              =  0.460G1H501X + 0.270GHN501P + 0.270GHN501H                 : ARR( 0.488E-13, -1250., 0.0);
+{  7781} G2H500t +PERO5              =  0.460G1H501X + 0.270GHN501P + 0.270GHN501H                 : ARR( 0.183E-11,   450., 0.0);
+{  7782} G2H500t +PERO6              =  0.300G1H501X + 0.350GHN501P + 0.350GHN501H                 : ARR( 0.168E-13, -1300., 0.0);
+{  7783} G2H500t +PERO9              =  0.650G1H501X + 0.350GHN501H                                : ARR( 0.100E-10,     0., 0.0);
+{  7784} G1H501X                     =       GHN501Q +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  7785} GNN500h +GHO                =       G3N500C                                               : ARR( 0.226E-10,     0., 0.0);
+{  7786} GNN500h +GNO3               =       G3N500C +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  7787} GNN500h+HV               =       G1N502x +      GNO2                                   :  0.100E+01*SUN;
+{  7788} GNN500h+HV               =       G1N502y +      GNO2                                   :  0.100E+01*SUN;
+{  7789} GNN500h+HV               =       G2N400H +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  7790} GNN500h+HV               =       G2N3005 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{  7791} G3N500C +GHO2               =  0.800GGN500G + 0.200GAN500D + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  7792} G3N500C +GNO                =       G2N400H +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  7793} G3N500C +GNO2               =       GPN500A                                               : ARR( 0.330E-08,     0.,-1.0);
+{  7794} G3N500C +GNO3               =       G2N400H +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  7795} G3N500C +MEPERO             =  0.685G2N400H + 0.315GAN500D + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7796} G3N500C +PERO1              =  0.800G2N400H + 0.200GAN500D + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7797} G3N500C +PERO2              =  0.750G2N400H + 0.250GAN500D + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7798} G3N500C +PERO3              =  0.800G2N400H + 0.200GAN500D + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7799} G3N500C +PERO5              =  0.650G2N400H + 0.350GAN500D + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7800} G3N500C +PERO6              =  0.650G2N400H + 0.350GAN500D + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  7801} G3N500C +PERO9              =       G2N400H +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  7802} G1N502x                     =       G2N502g                                               : ARR( 0.160E+12,  3221., 0.0);
+{  7803} G1N502y                     =       G3N5001                                               : ARR( 0.800E+11,  4559., 0.0);
+{  7804} G1N502y                     =       GND2000 +      G2D3001                                : ARR( 0.200E+15,  7116., 0.0);
+{  7805} G2N400H +GNO                =       G1N400H +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  7806} G2N400H +GNO                =       GNN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{  7807} G2N400H +GHO2               =       GHN400P                                               : ARR( 0.214E-12, -1250., 0.0);
+{  7808} G2N400H +GNO3               =       G1N400H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7809} G2N400H +MEPERO             =  0.480G1N400H + 0.260GNN4006 + 0.260GNN4001                 : ARR( 0.146E-12,  -445., 0.0);
+{  7810} G2N400H +PERO1              =  0.600G1N400H + 0.200GNN4006 + 0.200GNN4001                 : ARR( 0.112E-12,  -500., 0.0);
+{  7811} G2N400H +PERO2              =  0.560G1N400H + 0.220GNN4006 + 0.220GNN4001                 : ARR( 0.418E-13, -1000., 0.0);
+{  7812} G2N400H +PERO3              =  0.600G1N400H + 0.200GNN4006 + 0.200GNN4001                 : ARR( 0.126E-12,  -850., 0.0);
+{  7813} G2N400H +PERO5              =  0.600G1N400H + 0.200GNN4006 + 0.200GNN4001                 : ARR( 0.473E-11,   850., 0.0);
+{  7814} G2N400H +PERO6              =  0.460G1N400H + 0.270GNN4006 + 0.270GNN4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  7815} G2N400H +PERO9              =  0.800G1N400H + 0.200GNN4001                                : ARR( 0.100E-10,     0., 0.0);
+{  7816} G2N502g +GNO                =       G1N502z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7817} G2N502g +GNO                =       GNN501T                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7818} G2N502g +GHO2               =       GHN503M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7819} G2N502g +GNO3               =       G1N502z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7820} G2N502g +MEPERO             =  0.340G1N502z + 0.330GND500l + 0.330GND500N                 : ARR( 0.565E-13,  -845., 0.0);
+{  7821} G2N502g +PERO1              =  0.460G1N502z + 0.270GND500l + 0.270GND500N                 : ARR( 0.434E-13,  -900., 0.0);
+{  7822} G2N502g +PERO2              =  0.400G1N502z + 0.300GND500l + 0.300GND500N                 : ARR( 0.162E-13, -1400., 0.0);
+{  7823} G2N502g +PERO3              =  0.460G1N502z + 0.270GND500l + 0.270GND500N                 : ARR( 0.488E-13, -1250., 0.0);
+{  7824} G2N502g +PERO5              =  0.460G1N502z + 0.270GND500l + 0.270GND500N                 : ARR( 0.183E-11,   450., 0.0);
+{  7825} G2N502g +PERO6              =  0.300G1N502z + 0.350GND500l + 0.350GND500N                 : ARR( 0.168E-13, -1300., 0.0);
+{  7826} G2N502g +PERO9              =  0.650G1N502z + 0.350GND500N                                : ARR( 0.100E-10,     0., 0.0);
+{  7827} G1N400H +OXYGEN             =       GNN4001 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  7828} G1N400H                     =       GND4006 +      GNO2                                   : ARR( 0.160E+12,  5251., 0.0);
+{  7829} G1N502z                     =       GND500m +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  7830} G1N502z                     =       GND4002 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  7831} GHN500j +GHO                =       GNN500W +      GHO                                    : ARR( 0.339E-10,     0., 0.0);
+{  7832} GHN500j +GHO                =       G2N500d                                               : ARR( 0.192E-11,  -190., 0.0);
+{  7833} GHN500j+HV               =       G1N500e +      GHO                                    :  0.100E+01*SUN;
+{  7834} GHN500j+HV               =       G1H501Y +      GNO2                                   :  0.100E+01*SUN;
+{  7835} GHN500j+HV               =       G1H501Z +      GNO2                                   :  0.100E+01*SUN;
+{  7836} G1H501Y                     =       G2H500u                                               : ARR( 0.240E+12,  4177., 0.0);
+{  7837} G1H501Y                     =       G2H3003 +      GND2000                                : ARR( 0.200E+15,  6983., 0.0);
+{  7838} G1H501Z                     =       GNK5006 +      GHO                                    : ARR( 0.800E+11,  1771., 0.0);
+{  7839} G2H500u +GNO                =       G1H501a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7840} G2H500u +GNO                =       GHN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7841} G2H500u +GHO2               =       GHH500E                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7842} G2H500u +GNO3               =       G1H501a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7843} G2H500u +MEPERO             =  0.480G1H501a + 0.260GHN5011 + 0.260GHN5021                 : ARR( 0.164E-12,  -795., 0.0);
+{  7844} G2H500u +PERO1              =  0.600G1H501a + 0.200GHN5011 + 0.200GHN5021                 : ARR( 0.126E-12,  -850., 0.0);
+{  7845} G2H500u +PERO2              =  0.560G1H501a + 0.220GHN5011 + 0.220GHN5021                 : ARR( 0.471E-13, -1350., 0.0);
+{  7846} G2H500u +PERO3              =  0.600G1H501a + 0.200GHN5011 + 0.200GHN5021                 : ARR( 0.142E-12, -1200., 0.0);
+{  7847} G2H500u +PERO5              =  0.600G1H501a + 0.200GHN5011 + 0.200GHN5021                 : ARR( 0.533E-11,   500., 0.0);
+{  7848} G2H500u +PERO6              =  0.460G1H501a + 0.270GHN5011 + 0.270GHN5021                 : ARR( 0.488E-13, -1250., 0.0);
+{  7849} G2H500u +PERO9              =  0.800G1H501a + 0.200GHN5021                                : ARR( 0.100E-10,     0., 0.0);
+{  7850} G1H501a                     =       GHN5013 +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{  7851} G1H501a                     =       GND4003 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  7852} GHN500k +GHO                =       G2H500v                                               : ARR( 0.117E-11,     0., 0.0);
+{  7853} GHN500k +GHO                =       GNN500g +      GHO                                    : ARR( 0.837E-11,     0., 0.0);
+{  7854} GHN500k +GHO                =       G2N500e                                               : ARR( 0.193E-11,  -190., 0.0);
+{  7855} GHN500k+HV               =       G1N500f +      GHO                                    :  0.100E+01*SUN;
+{  7856} GHN500k+HV               =       G1H501b +      GNO2                                   :  0.100E+01*SUN;
+{  7857} GHN500k+HV               =       G1H501c +      GNO2                                   :  0.100E+01*SUN;
+{  7858} G2H500v +GNO                =       G1H501d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7859} G2H500v +GNO                =       GHN502d                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7860} G2H500v +GHO2               =       GHH500q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7861} G2H500v +GNO3               =       G1H501d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7862} G2H500v +MEPERO             =  0.340G1H501d + 0.330GHN503N + 0.330GHN502p                 : ARR( 0.565E-13,  -845., 0.0);
+{  7863} G2H500v +PERO1              =  0.460G1H501d + 0.270GHN503N + 0.270GHN502p                 : ARR( 0.434E-13,  -900., 0.0);
+{  7864} G2H500v +PERO2              =  0.400G1H501d + 0.300GHN503N + 0.300GHN502p                 : ARR( 0.162E-13, -1400., 0.0);
+{  7865} G2H500v +PERO3              =  0.460G1H501d + 0.270GHN503N + 0.270GHN502p                 : ARR( 0.488E-13, -1250., 0.0);
+{  7866} G2H500v +PERO5              =  0.460G1H501d + 0.270GHN503N + 0.270GHN502p                 : ARR( 0.183E-11,   450., 0.0);
+{  7867} G2H500v +PERO6              =  0.300G1H501d + 0.350GHN503N + 0.350GHN502p                 : ARR( 0.168E-13, -1300., 0.0);
+{  7868} G2H500v +PERO9              =  0.650G1H501d + 0.350GHN502p                                : ARR( 0.100E-10,     0., 0.0);
+{  7869} G1H501b                     =       G2H500w                                               : ARR( 0.240E+12,  4177., 0.0);
+{  7870} G1H501b                     =       GD03000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  5198., 0.0);
+{  7871} G1H501c                     =       G2H500x                                               : ARR( 0.160E+12,  3092., 0.0);
+{  7872} G1H501d                     =       GD02000 +      GNN3005 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{  7873} G2H500w +GNO                =       G1H501e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7874} G2H500w +GNO                =       GHN5016                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7875} G2H500w +GHO2               =       GHH500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7876} G2H500w +GNO3               =       G1H501e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7877} G2H500w +MEPERO             =  0.480G1H501e + 0.260GHN5012 + 0.260GHN501C                 : ARR( 0.146E-12,  -445., 0.0);
+{  7878} G2H500w +PERO1              =  0.600G1H501e + 0.200GHN5012 + 0.200GHN501C                 : ARR( 0.112E-12,  -500., 0.0);
+{  7879} G2H500w +PERO2              =  0.560G1H501e + 0.220GHN5012 + 0.220GHN501C                 : ARR( 0.418E-13, -1000., 0.0);
+{  7880} G2H500w +PERO3              =  0.600G1H501e + 0.200GHN5012 + 0.200GHN501C                 : ARR( 0.126E-12,  -850., 0.0);
+{  7881} G2H500w +PERO5              =  0.600G1H501e + 0.200GHN5012 + 0.200GHN501C                 : ARR( 0.473E-11,   850., 0.0);
+{  7882} G2H500w +PERO6              =  0.460G1H501e + 0.270GHN5012 + 0.270GHN501C                 : ARR( 0.434E-13,  -900., 0.0);
+{  7883} G2H500w +PERO9              =  0.800G1H501e + 0.200GHN501C                                : ARR( 0.100E-10,     0., 0.0);
+{  7884} G2H500x +GNO                =       G1H501f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7885} G2H500x +GNO                =       GHN503B                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7886} G2H500x +GHO2               =       GHH500r                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7887} G2H500x +GNO3               =       G1H501f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7888} G2H500x +MEPERO             =  0.340G1H501f + 0.330GHN503O + 0.330GHN501d                 : ARR( 0.565E-13,  -845., 0.0);
+{  7889} G2H500x +PERO1              =  0.460G1H501f + 0.270GHN503O + 0.270GHN501d                 : ARR( 0.434E-13,  -900., 0.0);
+{  7890} G2H500x +PERO2              =  0.400G1H501f + 0.300GHN503O + 0.300GHN501d                 : ARR( 0.162E-13, -1400., 0.0);
+{  7891} G2H500x +PERO3              =  0.460G1H501f + 0.270GHN503O + 0.270GHN501d                 : ARR( 0.488E-13, -1250., 0.0);
+{  7892} G2H500x +PERO5              =  0.460G1H501f + 0.270GHN503O + 0.270GHN501d                 : ARR( 0.183E-11,   450., 0.0);
+{  7893} G2H500x +PERO6              =  0.300G1H501f + 0.350GHN503O + 0.350GHN501d                 : ARR( 0.168E-13, -1300., 0.0);
+{  7894} G2H500x +PERO9              =  0.650G1H501f + 0.350GHN501d                                : ARR( 0.100E-10,     0., 0.0);
+{  7895} G1H501e                     =       GHN5014 +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{  7896} G1H501f                     =       GHN503P +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{  7897} G1H501f                     =       GD02000 +      GND3004 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{  7898} GNN500i +GHO                =       G2N502h                                               : ARR( 0.127E-11,     0., 0.0);
+{  7899} GNN500i +GHO                =       GNN500g +      GHO2                                   : ARR( 0.228E-11,     0., 0.0);
+{  7900} GNN500i+HV               =       G1N5031 +      GNO2                                   :  0.100E+01*SUN;
+{  7901} GNN500i+HV               =       G1N5032 +      GNO2                                   :  0.100E+01*SUN;
+{  7902} G2N502h +GNO                =       G1N5033 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7903} G2N502h +GNO                =       GNN501e                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7904} G2N502h +GHO2               =       GHN503Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7905} G2N502h +GNO3               =       G1N5033 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7906} G2N502h +MEPERO             =  0.340G1N5033 + 0.330GNN502M + 0.330GNN501y                 : ARR( 0.565E-13,  -845., 0.0);
+{  7907} G2N502h +PERO1              =  0.460G1N5033 + 0.270GNN502M + 0.270GNN501y                 : ARR( 0.434E-13,  -900., 0.0);
+{  7908} G2N502h +PERO2              =  0.400G1N5033 + 0.300GNN502M + 0.300GNN501y                 : ARR( 0.162E-13, -1400., 0.0);
+{  7909} G2N502h +PERO3              =  0.460G1N5033 + 0.270GNN502M + 0.270GNN501y                 : ARR( 0.488E-13, -1250., 0.0);
+{  7910} G2N502h +PERO5              =  0.460G1N5033 + 0.270GNN502M + 0.270GNN501y                 : ARR( 0.183E-11,   450., 0.0);
+{  7911} G2N502h +PERO6              =  0.300G1N5033 + 0.350GNN502M + 0.350GNN501y                 : ARR( 0.168E-13, -1300., 0.0);
+{  7912} G2N502h +PERO9              =  0.650G1N5033 + 0.350GNN501y                                : ARR( 0.100E-10,     0., 0.0);
+{  7913} G1N5031                     =       GD03000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3989., 0.0);
+{  7914} G1N5032                     =       G2N502i                                               : ARR( 0.160E+12,  3092., 0.0);
+{  7915} G1N5033                     =       GD02000 +      GNN3005 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  7916} G2N502i +GNO                =       G1N5034 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7917} G2N502i +GNO                =       GNN502I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7918} G2N502i +GHO2               =       GHN503R                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7919} G2N502i +GNO3               =       G1N5034 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7920} G2N502i +MEPERO             =  0.340G1N5034 + 0.330GNO500X + 0.330GNK500b                 : ARR( 0.565E-13,  -845., 0.0);
+{  7921} G2N502i +PERO1              =  0.460G1N5034 + 0.270GNO500X + 0.270GNK500b                 : ARR( 0.434E-13,  -900., 0.0);
+{  7922} G2N502i +PERO2              =  0.400G1N5034 + 0.300GNO500X + 0.300GNK500b                 : ARR( 0.162E-13, -1400., 0.0);
+{  7923} G2N502i +PERO3              =  0.460G1N5034 + 0.270GNO500X + 0.270GNK500b                 : ARR( 0.488E-13, -1250., 0.0);
+{  7924} G2N502i +PERO5              =  0.460G1N5034 + 0.270GNO500X + 0.270GNK500b                 : ARR( 0.183E-11,   450., 0.0);
+{  7925} G2N502i +PERO6              =  0.300G1N5034 + 0.350GNO500X + 0.350GNK500b                 : ARR( 0.168E-13, -1300., 0.0);
+{  7926} G2N502i +PERO9              =  0.650G1N5034 + 0.350GNK500b                                : ARR( 0.100E-10,     0., 0.0);
+{  7927} G1N5034                     =       GD02000 +      GND3004 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  7928} GHN500l +GHO                =       GNK5006 +      GHO                                    : ARR( 0.349E-10,     0., 0.0);
+{  7929} GHN500l +GHO                =       G2N500f                                               : ARR( 0.198E-11,  -190., 0.0);
+{  7930} GHN500l+HV               =       G1N500g +      GHO                                    :  0.100E+01*SUN;
+{  7931} GHN500l+HV               =       G1H501g +      GNO2                                   :  0.100E+01*SUN;
+{  7932} G1H501g                     =       G2H500y                                               : ARR( 0.240E+12,  4177., 0.0);
+{  7933} G1H501g                     =       GHD4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{  7934} G2H500y +GNO                =       G1H501h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7935} G2H500y +GNO                =       GHN500w                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7936} G2H500y +GHO2               =       GHH500F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7937} G2H500y +GNO3               =       G1H501h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7938} G2H500y +MEPERO             =  0.480G1H501h + 0.260GHO500I + 0.260GHD5006                 : ARR( 0.164E-12,  -795., 0.0);
+{  7939} G2H500y +PERO1              =  0.600G1H501h + 0.200GHO500I + 0.200GHD5006                 : ARR( 0.126E-12,  -850., 0.0);
+{  7940} G2H500y +PERO2              =  0.560G1H501h + 0.220GHO500I + 0.220GHD5006                 : ARR( 0.471E-13, -1350., 0.0);
+{  7941} G2H500y +PERO3              =  0.600G1H501h + 0.200GHO500I + 0.200GHD5006                 : ARR( 0.142E-12, -1200., 0.0);
+{  7942} G2H500y +PERO5              =  0.600G1H501h + 0.200GHO500I + 0.200GHD5006                 : ARR( 0.533E-11,   500., 0.0);
+{  7943} G2H500y +PERO6              =  0.460G1H501h + 0.270GHO500I + 0.270GHD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  7944} G2H500y +PERO9              =  0.800G1H501h + 0.200GHD5006                                : ARR( 0.100E-10,     0., 0.0);
+{  7945} G1H501h                     =       GHK500B +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{  7946} GNN3003 +GHO                =       GNN3005 +      GNO2                                   : ARR( 0.184E-13,     0., 0.0);
+{  7947} GNN3003 +GHO                =       GNN3006 +      GNO2                                   : ARR( 0.471E-14,     0., 0.0);
+{  7948} GNN3003+HV               =       G1N3004 +      GNO2                                   :  0.200E+01*SUN;
+{  7949} GNN3003+HV               =       G1N3006 +      GNO2                                   :  0.100E+01*SUN;
+{  7950} GHN3004 +GHO                =       GNN3005 +      GHO                                    : ARR( 0.323E-11,     0., 0.0);
+{  7951} GHN3004 +GHO                =       G2N3004                                               : ARR( 0.191E-11,  -190., 0.0);
+{  7952} GHN3004+HV               =       G1H3008 +      GNO2                                   :  0.100E+01*SUN;
+{  7953} GHN3004+HV               =       G1H3009 +      GNO2                                   :  0.100E+01*SUN;
+{  7954} GHN3004+HV               =       G1N3004 +      GHO                                    :  0.100E+01*SUN;
+{  7955} G1H3008 +OXYGEN             =       GHN300A +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  7956} G1H3008                     =       GHD2000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7190., 0.0);
+{  7957} G1H3009                     =       GND2000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7453., 0.0);
+{  7958} GNN3004 +GHO                =       GNN3005 +      GHO2                                   : ARR( 0.832E-12,     0., 0.0);
+{  7959} GNN3004 +GHO                =       G1N3004                                               : ARR( 0.217E-17,    85., 2.0);
+{  7960} GNN3004+HV               =       G1N3007 +      GNO2                                   :  0.100E+01*SUN;
+{  7961} GNN3004+HV               =       G1N3008 +      GNO2                                   :  0.100E+01*SUN;
+{  7962} GNN3005 +GHO                =       G3N3003                                               : ARR( 0.418E-11,     0., 0.0);
+{  7963} GNN3005 +GNO3               =       G3N3003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  7964} GNN3005+HV               =       G1N300A +      GNO2                                   :  0.100E+01*SUN;
+{  7965} GNN3005+HV               =       G1N3009 +      GNO2                                   :  0.100E+01*SUN;
+{  7966} GNN3005+HV               =       GND2000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  7967} G1N300A +OXYGEN             =       GND3005 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{  7968} G1N300A                     =       GDD2000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{  7969} GHH5007 +GHO                =       GHN500Y +      GHO                                    : ARR( 0.346E-10,     0., 0.0);
+{  7970} GHH5007 +GHO                =       GHN500q +      GHO                                    : ARR( 0.852E-11,     0., 0.0);
+{  7971} GHH5007 +GHO                =       G2H5007                                               : ARR( 0.196E-11,  -190., 0.0);
+{  7972} GHH5007 +GHO                =       G2H500z                                               : ARR( 0.196E-11,  -190., 0.0);
+{  7973} GHH5007+HV               =       G1H500B +      GHO                                    :  0.100E+01*SUN;
+{  7974} GHH5007+HV               =       G1H501Y +      GHO                                    :  0.100E+01*SUN;
+{  7975} GHH5007+HV               =       G1H501i +      GNO2                                   :  0.100E+01*SUN;
+{  7976} G2H500z +GNO                =       G1H501Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7977} G2H500z +GNO                =       GHN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7978} G2H500z +GHO2               =       GHH5007                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7979} G2H500z +GNO3               =       G1H501Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7980} G2H500z +MEPERO             =  0.340G1H501Y + 0.330GHN500o + 0.330GHN500q                 : ARR( 0.565E-13,  -845., 0.0);
+{  7981} G2H500z +PERO1              =  0.460G1H501Y + 0.270GHN500o + 0.270GHN500q                 : ARR( 0.434E-13,  -900., 0.0);
+{  7982} G2H500z +PERO2              =  0.400G1H501Y + 0.300GHN500o + 0.300GHN500q                 : ARR( 0.162E-13, -1400., 0.0);
+{  7983} G2H500z +PERO3              =  0.460G1H501Y + 0.270GHN500o + 0.270GHN500q                 : ARR( 0.488E-13, -1250., 0.0);
+{  7984} G2H500z +PERO5              =  0.460G1H501Y + 0.270GHN500o + 0.270GHN500q                 : ARR( 0.183E-11,   450., 0.0);
+{  7985} G2H500z +PERO6              =  0.300G1H501Y + 0.350GHN500o + 0.350GHN500q                 : ARR( 0.168E-13, -1300., 0.0);
+{  7986} G2H500z +PERO9              =  0.650G1H501Y + 0.350GHN500q                                : ARR( 0.100E-10,     0., 0.0);
+{  7987} G1H501i                     =       GHK5009 +      GHO                                    : ARR( 0.800E+11,  1771., 0.0);
+{  7988} GHN500m +GHO                =       GHN500Y +      GHO2                                   : ARR( 0.851E-11,     0., 0.0);
+{  7989} GHN500m +GHO                =       G2H5011                                               : ARR( 0.144E-11,     0., 0.0);
+{  7990} GHN500m +GHO                =       GNK5008 +      GHO                                    : ARR( 0.838E-11,     0., 0.0);
+{  7991} GHN500m +GHO                =       G2N502j                                               : ARR( 0.193E-11,  -190., 0.0);
+{  7992} GHN500m+HV               =       G1N501G +      GHO                                    :  0.100E+01*SUN;
+{  7993} GHN500m+HV               =       G1H500U +      GNO2                                   :  0.100E+01*SUN;
+{  7994} G2H5011 +GNO                =       G1H501j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  7995} G2H5011 +GNO                =       GHN503S                                               : ARR( 0.182E-12,  -360., 0.0);
+{  7996} G2H5011 +GHO2               =       GHH500s                                               : ARR( 0.242E-12, -1250., 0.0);
+{  7997} G2H5011 +GNO3               =       G1H501j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  7998} G2H5011 +MEPERO             =  0.340G1H501j + 0.330GHN503T + 0.330GHN503I                 : ARR( 0.565E-13,  -845., 0.0);
+{  7999} G2H5011 +PERO1              =  0.460G1H501j + 0.270GHN503T + 0.270GHN503I                 : ARR( 0.434E-13,  -900., 0.0);
+{  8000} G2H5011 +PERO2              =  0.400G1H501j + 0.300GHN503T + 0.300GHN503I                 : ARR( 0.162E-13, -1400., 0.0);
+{  8001} G2H5011 +PERO3              =  0.460G1H501j + 0.270GHN503T + 0.270GHN503I                 : ARR( 0.488E-13, -1250., 0.0);
+{  8002} G2H5011 +PERO5              =  0.460G1H501j + 0.270GHN503T + 0.270GHN503I                 : ARR( 0.183E-11,   450., 0.0);
+{  8003} G2H5011 +PERO6              =  0.300G1H501j + 0.350GHN503T + 0.350GHN503I                 : ARR( 0.168E-13, -1300., 0.0);
+{  8004} G2H5011 +PERO9              =  0.650G1H501j + 0.350GHN503I                                : ARR( 0.100E-10,     0., 0.0);
+{  8005} G2N502j +GNO                =       G1N501G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8006} G2N502j +GNO                =       GNN5008                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8007} G2N502j +GHO2               =       GHN500m                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8008} G2N502j +GNO3               =       G1N501G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8009} G2N502j +MEPERO             =  0.340G1N501G + 0.330GNO500D + 0.330GNK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{  8010} G2N502j +PERO1              =  0.460G1N501G + 0.270GNO500D + 0.270GNK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{  8011} G2N502j +PERO2              =  0.400G1N501G + 0.300GNO500D + 0.300GNK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{  8012} G2N502j +PERO3              =  0.460G1N501G + 0.270GNO500D + 0.270GNK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  8013} G2N502j +PERO5              =  0.460G1N501G + 0.270GNO500D + 0.270GNK5008                 : ARR( 0.183E-11,   450., 0.0);
+{  8014} G2N502j +PERO6              =  0.300G1N501G + 0.350GNO500D + 0.350GNK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{  8015} G2N502j +PERO9              =  0.650G1N501G + 0.350GNK5008                                : ARR( 0.100E-10,     0., 0.0);
+{  8016} G1H501j                     =       GD02000 +      GHN3007 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{  8017} G1H501j                     =       GDO3001 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4784., 0.0);
+{  8018} GHH5008 +GHO                =       GHN500h +      GHO                                    : ARR( 0.422E-10,     0., 0.0);
+{  8019} GHH5008 +GHO                =       GHN500r +      GHO                                    : ARR( 0.844E-11,     0., 0.0);
+{  8020} GHH5008 +GHO                =       G2H5008                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8021} GHH5008 +GHO                =       G2H5012                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8022} GHH5008+HV               =       G1H500C +      GHO                                    :  0.100E+01*SUN;
+{  8023} GHH5008+HV               =       G1H501b +      GHO                                    :  0.100E+01*SUN;
+{  8024} GHH5008+HV               =       G1H501k +      GNO2                                   :  0.100E+01*SUN;
+{  8025} G2H5012 +GNO                =       G1H501b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8026} G2H5012 +GNO                =       GHN500k                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8027} G2H5012 +GHO2               =       GHH5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8028} G2H5012 +GNO3               =       G1H501b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8029} G2H5012 +MEPERO             =  0.340G1H501b + 0.330GHN500p + 0.330GHN500r                 : ARR( 0.565E-13,  -845., 0.0);
+{  8030} G2H5012 +PERO1              =  0.460G1H501b + 0.270GHN500p + 0.270GHN500r                 : ARR( 0.434E-13,  -900., 0.0);
+{  8031} G2H5012 +PERO2              =  0.400G1H501b + 0.300GHN500p + 0.300GHN500r                 : ARR( 0.162E-13, -1400., 0.0);
+{  8032} G2H5012 +PERO3              =  0.460G1H501b + 0.270GHN500p + 0.270GHN500r                 : ARR( 0.488E-13, -1250., 0.0);
+{  8033} G2H5012 +PERO5              =  0.460G1H501b + 0.270GHN500p + 0.270GHN500r                 : ARR( 0.183E-11,   450., 0.0);
+{  8034} G2H5012 +PERO6              =  0.300G1H501b + 0.350GHN500p + 0.350GHN500r                 : ARR( 0.168E-13, -1300., 0.0);
+{  8035} G2H5012 +PERO9              =  0.650G1H501b + 0.350GHN500r                                : ARR( 0.100E-10,     0., 0.0);
+{  8036} G1H501k                     =       G2H5013                                               : ARR( 0.160E+12,  3092., 0.0);
+{  8037} G1H501k                     =       GHD4005 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  8038} G2H5013 +GNO                =       G1H501l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8039} G2H5013 +GNO                =       GHH500l                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8040} G2H5013 +GHO2               =       GHH500t                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8041} G2H5013 +GNO3               =       G1H501l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8042} G2H5013 +MEPERO             =  0.340G1H501l + 0.330GHH500u + 0.330GHH500S                 : ARR( 0.565E-13,  -845., 0.0);
+{  8043} G2H5013 +PERO1              =  0.460G1H501l + 0.270GHH500u + 0.270GHH500S                 : ARR( 0.434E-13,  -900., 0.0);
+{  8044} G2H5013 +PERO2              =  0.400G1H501l + 0.300GHH500u + 0.300GHH500S                 : ARR( 0.162E-13, -1400., 0.0);
+{  8045} G2H5013 +PERO3              =  0.460G1H501l + 0.270GHH500u + 0.270GHH500S                 : ARR( 0.488E-13, -1250., 0.0);
+{  8046} G2H5013 +PERO5              =  0.460G1H501l + 0.270GHH500u + 0.270GHH500S                 : ARR( 0.183E-11,   450., 0.0);
+{  8047} G2H5013 +PERO6              =  0.300G1H501l + 0.350GHH500u + 0.350GHH500S                 : ARR( 0.168E-13, -1300., 0.0);
+{  8048} G2H5013 +PERO9              =  0.650G1H501l + 0.350GHH500S                                : ARR( 0.100E-10,     0., 0.0);
+{  8049} G1H501l                     =       GHH500v +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  8050} G1H501l                     =       GD02000 +      GHD3003 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{  8051} GHN500n +GHO                =       GHN500h +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{  8052} GHN500n +GHO                =       GNK500M +      GHO                                    : ARR( 0.880E-11,     0., 0.0);
+{  8053} GHN500n +GHO                =       G2N502k                                               : ARR( 0.203E-11,  -190., 0.0);
+{  8054} GHN500n+HV               =       G1N5031 +      GHO                                    :  0.100E+01*SUN;
+{  8055} GHN500n+HV               =       G1H501m +      GNO2                                   :  0.100E+01*SUN;
+{  8056} G2N502k +GNO                =       G1N5031 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8057} G2N502k +GNO                =       GNN500i                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8058} G2N502k +GHO2               =       GHN500n                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8059} G2N502k +GNO3               =       G1N5031 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8060} G2N502k +MEPERO             =  0.340G1N5031 + 0.330GNO500L + 0.330GNK500M                 : ARR( 0.565E-13,  -845., 0.0);
+{  8061} G2N502k +PERO1              =  0.460G1N5031 + 0.270GNO500L + 0.270GNK500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  8062} G2N502k +PERO2              =  0.400G1N5031 + 0.300GNO500L + 0.300GNK500M                 : ARR( 0.162E-13, -1400., 0.0);
+{  8063} G2N502k +PERO3              =  0.460G1N5031 + 0.270GNO500L + 0.270GNK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{  8064} G2N502k +PERO5              =  0.460G1N5031 + 0.270GNO500L + 0.270GNK500M                 : ARR( 0.183E-11,   450., 0.0);
+{  8065} G2N502k +PERO6              =  0.300G1N5031 + 0.350GNO500L + 0.350GNK500M                 : ARR( 0.168E-13, -1300., 0.0);
+{  8066} G2N502k +PERO9              =  0.650G1N5031 + 0.350GNK500M                                : ARR( 0.100E-10,     0., 0.0);
+{  8067} G1H501m                     =       G2H5014                                               : ARR( 0.160E+12,  3092., 0.0);
+{  8068} G1H501m                     =       GDO4004 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  8069} G2H5014 +GNO                =       G1H501n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8070} G2H5014 +GNO                =       GHN503D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8071} G2H5014 +GHO2               =       GHH500w                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8072} G2H5014 +GNO3               =       G1H501n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8073} G2H5014 +MEPERO             =  0.340G1H501n + 0.330GHO500P + 0.330GHK500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{  8074} G2H5014 +PERO1              =  0.460G1H501n + 0.270GHO500P + 0.270GHK500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{  8075} G2H5014 +PERO2              =  0.400G1H501n + 0.300GHO500P + 0.300GHK500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{  8076} G2H5014 +PERO3              =  0.460G1H501n + 0.270GHO500P + 0.270GHK500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{  8077} G2H5014 +PERO5              =  0.460G1H501n + 0.270GHO500P + 0.270GHK500Z                 : ARR( 0.183E-11,   450., 0.0);
+{  8078} G2H5014 +PERO6              =  0.300G1H501n + 0.350GHO500P + 0.350GHK500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{  8079} G2H5014 +PERO9              =  0.650G1H501n + 0.350GHK500Z                                : ARR( 0.100E-10,     0., 0.0);
+{  8080} G1H501n                     =       GD02000 +      GHD3003 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  8081} GHD5005 +GHO                =       GHD500J +      GHO2                                   : ARR( 0.842E-11,     0., 0.0);
+{  8082} GHD5005 +GHO                =       G2H5015                                               : ARR( 0.450E-11,     0., 0.0);
+{  8083} GHD5005 +GHO                =       GDK5001 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{  8084} GHD5005 +GHO                =       G3H5006                                               : ARR( 0.209E-10,     0., 0.0);
+{  8085} GHD5005 +GHO                =       G2D500H                                               : ARR( 0.191E-11,  -190., 0.0);
+{  8086} GHD5005 +GNO3               =       G3H5006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8087} GHD5005+HV               =       G1D5008 +      GHO                                    :  0.100E+01*SUN;
+{  8088} GHD5005+HV               =       GDO4001 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{  8089} G2H5015 +GNO                =       G1H501o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8090} G2H5015 +GNO                =       GHN502x                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8091} G2H5015 +GHO2               =       GHH500v                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8092} G2H5015 +GNO3               =       G1H501o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8093} G2H5015 +MEPERO             =  0.340G1H501o + 0.330GHD500U + 0.330GHD500W                 : ARR( 0.565E-13,  -845., 0.0);
+{  8094} G2H5015 +PERO1              =  0.460G1H501o + 0.270GHD500U + 0.270GHD500W                 : ARR( 0.434E-13,  -900., 0.0);
+{  8095} G2H5015 +PERO2              =  0.400G1H501o + 0.300GHD500U + 0.300GHD500W                 : ARR( 0.162E-13, -1400., 0.0);
+{  8096} G2H5015 +PERO3              =  0.460G1H501o + 0.270GHD500U + 0.270GHD500W                 : ARR( 0.488E-13, -1250., 0.0);
+{  8097} G2H5015 +PERO5              =  0.460G1H501o + 0.270GHD500U + 0.270GHD500W                 : ARR( 0.183E-11,   450., 0.0);
+{  8098} G2H5015 +PERO6              =  0.300G1H501o + 0.350GHD500U + 0.350GHD500W                 : ARR( 0.168E-13, -1300., 0.0);
+{  8099} G2H5015 +PERO9              =  0.650G1H501o + 0.350GHD500W                                : ARR( 0.100E-10,     0., 0.0);
+{  8100} G3H5006 +GHO2               =  0.800GGH5005 + 0.200GAH5005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8101} G3H5006 +GNO                =       GDO4001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  8102} G3H5006 +GNO2               =       GPH5005                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8103} G3H5006 +GNO3               =       GDO4001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  8104} G3H5006 +MEPERO             =  0.685GDO4001 + 0.315GAH5005 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8105} G3H5006 +PERO1              =  0.800GDO4001 + 0.200GAH5005 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8106} G3H5006 +PERO2              =  0.750GDO4001 + 0.250GAH5005 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8107} G3H5006 +PERO3              =  0.800GDO4001 + 0.200GAH5005 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8108} G3H5006 +PERO5              =  0.650GDO4001 + 0.350GAH5005 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8109} G3H5006 +PERO6              =  0.650GDO4001 + 0.350GAH5005 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8110} G3H5006 +PERO9              =       GDO4001 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  8111} G2D500H +GNO                =       G1D5008 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8112} G2D500H +GNO                =       GND5004                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8113} G2D500H +GHO2               =       GHD5005                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8114} G2D500H +GNO3               =       G1D5008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8115} G2D500H +MEPERO             =  0.340G1D5008 + 0.330GDO5003 + 0.330GDK5001                 : ARR( 0.565E-13,  -845., 0.0);
+{  8116} G2D500H +PERO1              =  0.460G1D5008 + 0.270GDO5003 + 0.270GDK5001                 : ARR( 0.434E-13,  -900., 0.0);
+{  8117} G2D500H +PERO2              =  0.400G1D5008 + 0.300GDO5003 + 0.300GDK5001                 : ARR( 0.162E-13, -1400., 0.0);
+{  8118} G2D500H +PERO3              =  0.460G1D5008 + 0.270GDO5003 + 0.270GDK5001                 : ARR( 0.488E-13, -1250., 0.0);
+{  8119} G2D500H +PERO5              =  0.460G1D5008 + 0.270GDO5003 + 0.270GDK5001                 : ARR( 0.183E-11,   450., 0.0);
+{  8120} G2D500H +PERO6              =  0.300G1D5008 + 0.350GDO5003 + 0.350GDK5001                 : ARR( 0.168E-13, -1300., 0.0);
+{  8121} G2D500H +PERO9              =  0.650G1D5008 + 0.350GDK5001                                : ARR( 0.100E-10,     0., 0.0);
+{  8122} G1H501o                     =       GD02000 +      GHD3004 +      GHO2                    : ARR( 0.200E+15,  3132., 0.0);
+{  8123} GHH5009 +GHO                =       GHK5009 +      GHO                                    : ARR( 0.393E-10,     0., 0.0);
+{  8124} GHH5009 +GHO                =       GHK500G +      GHO                                    : ARR( 0.483E-10,     0., 0.0);
+{  8125} GHH5009+HV               =       G1H500D +      GHO                                    :  0.100E+01*SUN;
+{  8126} GHH5009+HV               =       G1H501g +      GHO                                    :  0.100E+01*SUN;
+{  8127} GHN3005 +GHO                =       GNN3006 +      GHO                                    : ARR( 0.168E-11,     0., 0.0);
+{  8128} GHN3005 +GHO                =       G2N3006                                               : ARR( 0.193E-11,  -190., 0.0);
+{  8129} GHN3005+HV               =       G1H3001 +      GNO2                                   :  0.200E+01*SUN;
+{  8130} GHN3005+HV               =       G1N3006 +      GHO                                    :  0.100E+01*SUN;
+{  8131} GHH3001 +GHO                =       GHN3008 +      GHO                                    : ARR( 0.825E-11,     0., 0.0);
+{  8132} GHH3001 +GHO                =       GHN3007 +      GHO                                    : ARR( 0.161E-10,     0., 0.0);
+{  8133} GHH3001 +GHO                =       G2H3007                                               : ARR( 0.190E-11,  -190., 0.0);
+{  8134} GHH3001 +GHO                =       G2H3001                                               : ARR( 0.190E-11,  -190., 0.0);
+{  8135} GHH3001+HV               =       G1H300A +      GNO2                                   :  0.100E+01*SUN;
+{  8136} GHH3001+HV               =       G1H3009 +      GHO                                    :  0.100E+01*SUN;
+{  8137} GHH3001+HV               =       G1H3001 +      GHO                                    :  0.100E+01*SUN;
+{  8138} G2H3007 +GNO                =       G1H3009 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  8139} G2H3007 +GNO                =       GHN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  8140} G2H3007 +GHO2               =       GHH3001                                               : ARR( 0.179E-12, -1250., 0.0);
+{  8141} G2H3007 +GNO3               =       G1H3009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8142} G2H3007 +MEPERO             =  0.340G1H3009 + 0.330GHN3003 + 0.330GHN3008                 : ARR( 0.565E-13,  -845., 0.0);
+{  8143} G2H3007 +PERO1              =  0.460G1H3009 + 0.270GHN3003 + 0.270GHN3008                 : ARR( 0.434E-13,  -900., 0.0);
+{  8144} G2H3007 +PERO2              =  0.400G1H3009 + 0.300GHN3003 + 0.300GHN3008                 : ARR( 0.162E-13, -1400., 0.0);
+{  8145} G2H3007 +PERO3              =  0.460G1H3009 + 0.270GHN3003 + 0.270GHN3008                 : ARR( 0.488E-13, -1250., 0.0);
+{  8146} G2H3007 +PERO5              =  0.460G1H3009 + 0.270GHN3003 + 0.270GHN3008                 : ARR( 0.183E-11,   450., 0.0);
+{  8147} G2H3007 +PERO6              =  0.300G1H3009 + 0.350GHN3003 + 0.350GHN3008                 : ARR( 0.168E-13, -1300., 0.0);
+{  8148} G2H3007 +PERO9              =  0.650G1H3009 + 0.350GHN3008                                : ARR( 0.100E-10,     0., 0.0);
+{  8149} G1H300A +OXYGEN             =       GHH3005 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8150} G1H300A                     =       GHD2000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5652., 0.0);
+{  8151} GHN3006 +GHO                =       GHN3007 +      GHO2                                   : ARR( 0.407E-11,     0., 0.0);
+{  8152} GHN3006 +GHO                =       GNK3001 +      GHO                                    : ARR( 0.834E-11,     0., 0.0);
+{  8153} GHN3006 +GHO                =       G2N3007                                               : ARR( 0.192E-11,  -190., 0.0);
+{  8154} GHN3006+HV               =       G1N3007 +      GHO                                    :  0.100E+01*SUN;
+{  8155} GHN3006+HV               =       G1H3005 +      GNO2                                   :  0.100E+01*SUN;
+{  8156} GHN3007 +GHO                =       GND3003 +      GHO                                    : ARR( 0.505E-11,     0., 0.0);
+{  8157} GHN3007 +GHO                =       G3H3002                                               : ARR( 0.209E-10,     0., 0.0);
+{  8158} GHN3007 +GHO                =       G2N3009                                               : ARR( 0.191E-11,  -190., 0.0);
+{  8159} GHN3007 +GNO3               =       G3H3002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8160} GHN3007+HV               =       G1H300B +      GNO2                                   :  0.100E+01*SUN;
+{  8161} GHN3007+HV               =       G1N3009 +      GHO                                    :  0.100E+01*SUN;
+{  8162} GHN3007+HV               =       GND2000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{  8163} G1H300B +OXYGEN             =       GHD3004 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{  8164} G1H300B                     =       GDD2000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5784., 0.0);
+{  8165} GHN500o +GHO                =       GNK500H +      GHO                                    : ARR( 0.350E-10,     0., 0.0);
+{  8166} GHN500o +GHO                =       GHN500q +      GHO2                                   : ARR( 0.215E-11,     0., 0.0);
+{  8167} GHN500o +GHO                =       G2N500g                                               : ARR( 0.199E-11,  -190., 0.0);
+{  8168} GHN500o+HV               =       G1N500h +      GHO                                    :  0.100E+01*SUN;
+{  8169} GHN500o+HV               =       G1H501p +      GNO2                                   :  0.100E+01*SUN;
+{  8170} G1H501p                     =       GKO5006 +      GHO                                    : ARR( 0.800E+11,  1771., 0.0);
+{  8171} G1H501p                     =       GHD4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  8172} GHN500p +GHO                =       GNK500K +      GHO                                    : ARR( 0.445E-10,     0., 0.0);
+{  8173} GHN500p +GHO                =       G2N500h                                               : ARR( 0.205E-11,  -190., 0.0);
+{  8174} GHN500p+HV               =       G1N500i +      GHO                                    :  0.100E+01*SUN;
+{  8175} GHN500p+HV               =       G1H501q +      GNO2                                   :  0.100E+01*SUN;
+{  8176} G1H501q                     =       G2H5016                                               : ARR( 0.160E+12,  3092., 0.0);
+{  8177} G1H501q                     =       GHD4005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  8178} G2H5016 +GNO                =       G1H501r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8179} G2H5016 +GNO                =       GHN503C                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8180} G2H5016 +GHO2               =       GHH500x                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8181} G2H5016 +GNO3               =       G1H501r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8182} G2H5016 +MEPERO             =  0.340G1H501r + 0.330GHO500O + 0.330GHK500X                 : ARR( 0.565E-13,  -845., 0.0);
+{  8183} G2H5016 +PERO1              =  0.460G1H501r + 0.270GHO500O + 0.270GHK500X                 : ARR( 0.434E-13,  -900., 0.0);
+{  8184} G2H5016 +PERO2              =  0.400G1H501r + 0.300GHO500O + 0.300GHK500X                 : ARR( 0.162E-13, -1400., 0.0);
+{  8185} G2H5016 +PERO3              =  0.460G1H501r + 0.270GHO500O + 0.270GHK500X                 : ARR( 0.488E-13, -1250., 0.0);
+{  8186} G2H5016 +PERO5              =  0.460G1H501r + 0.270GHO500O + 0.270GHK500X                 : ARR( 0.183E-11,   450., 0.0);
+{  8187} G2H5016 +PERO6              =  0.300G1H501r + 0.350GHO500O + 0.350GHK500X                 : ARR( 0.168E-13, -1300., 0.0);
+{  8188} G2H5016 +PERO9              =  0.650G1H501r + 0.350GHK500X                                : ARR( 0.100E-10,     0., 0.0);
+{  8189} G1H501r                     =       GHD500E +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  8190} G1H501r                     =       GD02000 +      GDO3002 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{  8191} GNO500L +GHO                =       G2N502l                                               : ARR( 0.119E-11,     0., 0.0);
+{  8192} GNO500L +GHO                =       GNK500K +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  8193} GNO500L +GHO                =       GNK500M +      GHO2                                   : ARR( 0.214E-11,     0., 0.0);
+{  8194} GNO500L+HV               =       G1O500U +      GNO2                                   :  0.100E+01*SUN;
+{  8195} G2N502l +GNO                =       G1N5035 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8196} G2N502l +GNO                =       GNN501f                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8197} G2N502l +GHO2               =       GHN503U                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8198} G2N502l +GNO3               =       G1N5035 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8199} G2N502l +MEPERO             =  0.340G1N5035 + 0.330GNO500W + 0.330GNK500p                 : ARR( 0.565E-13,  -845., 0.0);
+{  8200} G2N502l +PERO1              =  0.460G1N5035 + 0.270GNO500W + 0.270GNK500p                 : ARR( 0.434E-13,  -900., 0.0);
+{  8201} G2N502l +PERO2              =  0.400G1N5035 + 0.300GNO500W + 0.300GNK500p                 : ARR( 0.162E-13, -1400., 0.0);
+{  8202} G2N502l +PERO3              =  0.460G1N5035 + 0.270GNO500W + 0.270GNK500p                 : ARR( 0.488E-13, -1250., 0.0);
+{  8203} G2N502l +PERO5              =  0.460G1N5035 + 0.270GNO500W + 0.270GNK500p                 : ARR( 0.183E-11,   450., 0.0);
+{  8204} G2N502l +PERO6              =  0.300G1N5035 + 0.350GNO500W + 0.350GNK500p                 : ARR( 0.168E-13, -1300., 0.0);
+{  8205} G2N502l +PERO9              =  0.650G1N5035 + 0.350GNK500p                                : ARR( 0.100E-10,     0., 0.0);
+{  8206} G1O500U                     =       G2O500R                                               : ARR( 0.160E+12,  3092., 0.0);
+{  8207} G1O500U                     =       GDO4004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  8208} G1N5035                     =       GD02000 +      GND3002 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  8209} G2O500R +GNO                =       G1O500W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8210} G2O500R +GNO                =       GNO500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8211} G2O500R +GHO2               =       GHO500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8212} G2O500R +GNO3               =       G1O500W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8213} G2O500R +MEPERO             =  0.340G1O500W + 0.330GOO500C + 0.330GKO500K                 : ARR( 0.565E-13,  -845., 0.0);
+{  8214} G2O500R +PERO1              =  0.460G1O500W + 0.270GOO500C + 0.270GKO500K                 : ARR( 0.434E-13,  -900., 0.0);
+{  8215} G2O500R +PERO2              =  0.400G1O500W + 0.300GOO500C + 0.300GKO500K                 : ARR( 0.162E-13, -1400., 0.0);
+{  8216} G2O500R +PERO3              =  0.460G1O500W + 0.270GOO500C + 0.270GKO500K                 : ARR( 0.488E-13, -1250., 0.0);
+{  8217} G2O500R +PERO5              =  0.460G1O500W + 0.270GOO500C + 0.270GKO500K                 : ARR( 0.183E-11,   450., 0.0);
+{  8218} G2O500R +PERO6              =  0.300G1O500W + 0.350GOO500C + 0.350GKO500K                 : ARR( 0.168E-13, -1300., 0.0);
+{  8219} G2O500R +PERO9              =  0.650G1O500W + 0.350GKO500K                                : ARR( 0.100E-10,     0., 0.0);
+{  8220} G1O500W                     =       GD02000 +      GDO3002 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{  8221} GHO500H +GHO                =       GKO5006 +      GHO                                    : ARR( 0.347E-10,     0., 0.0);
+{  8222} GHO500H +GHO                =       GHK500G +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  8223} GHO500H +GHO                =       GHD500X +      GHO2                                   : ARR( 0.417E-11,     0., 0.0);
+{  8224} GHO500H +GHO                =       G2O500E                                               : ARR( 0.197E-11,  -190., 0.0);
+{  8225} GHO500H+HV               =       G1O500H +      GHO                                    :  0.100E+01*SUN;
+{  8226} GU02000 +GHO                =       G2O2000                                               : ARR( 0.196E-11,  -438., 0.0);
+{  8227} GU02000 +GO3                =  2.000GCH2O   + 0.740GHCOOH  + 0.260GCO2    + 0.260GH2      : ARR( 0.457E-14,  2580., 0.0);
+{  8228} GU02000 +GO3                =       GCO     + 0.760GH2O    + 0.240GHO2    + 0.240GHO      : ARR( 0.457E-14,  2580., 0.0);
+{  8229} GU02000 +GNO3               =       G2N2000                                               : ARR( 0.488E-17,  2282., 2.0);
+{  8230} GHN500q +GHO                =       GNK500I +      GHO                                    : ARR( 0.111E-09,     0., 0.0);
+{  8231} GHN500q+HV               =       G1N500j +      GHO                                    :  0.100E+01*SUN;
+{  8232} GHN500q+HV               =       G3H4001 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8233} GHN500q+HV               =       G2D2000 +      GNK3000 +      GHO                     :  0.100E+01*SUN;
+{  8234} GHN500q+HV               =       G1H501s +      GNO2                                   :  0.100E+01*SUN;
+{  8235} G3H4001 +GHO2               =  0.800GGH4005 + 0.200GAH4005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8236} G3H4001 +GNO                =       G2H3003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8237} G3H4001 +GNO2               =       GPH4005                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8238} G3H4001 +GNO3               =       G2H3003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8239} G3H4001 +MEPERO             =  0.685G2H3003 + 0.315GAH4005 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8240} G3H4001 +PERO1              =  0.800G2H3003 + 0.200GAH4005 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8241} G3H4001 +PERO2              =  0.750G2H3003 + 0.250GAH4005 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8242} G3H4001 +PERO3              =  0.800G2H3003 + 0.200GAH4005 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8243} G3H4001 +PERO5              =  0.650G2H3003 + 0.350GAH4005 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8244} G3H4001 +PERO6              =  0.650G2H3003 + 0.350GAH4005 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8245} G3H4001 +PERO9              =       G2H3003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8246} G1H501s                     =       G3H4001 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  8247} GHN500r +GHO                =       G2H5017                                               : ARR( 0.366E-11,     0., 0.0);
+{  8248} GHN500r +GHO                =       GNK500L +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{  8249} GHN500r +GHO                =       G2N500j                                               : ARR( 0.191E-11,  -190., 0.0);
+{  8250} GHN500r+HV               =       G1N500k +      GHO                                    :  0.100E+01*SUN;
+{  8251} GHN500r+HV               =       G3H4000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8252} GHN500r+HV               =       G1H501t +      GNO2                                   :  0.100E+01*SUN;
+{  8253} G2H5017 +GNO                =       G1H501u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8254} G2H5017 +GNO                =       GHN502g                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8255} G2H5017 +GHO2               =       GHH500y                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8256} G2H5017 +GNO3               =       G1H501u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8257} G2H5017 +MEPERO             =  0.340G1H501u + 0.330GHN503W + 0.330GHN502r                 : ARR( 0.565E-13,  -845., 0.0);
+{  8258} G2H5017 +PERO1              =  0.460G1H501u + 0.270GHN503W + 0.270GHN502r                 : ARR( 0.434E-13,  -900., 0.0);
+{  8259} G2H5017 +PERO2              =  0.400G1H501u + 0.300GHN503W + 0.300GHN502r                 : ARR( 0.162E-13, -1400., 0.0);
+{  8260} G2H5017 +PERO3              =  0.460G1H501u + 0.270GHN503W + 0.270GHN502r                 : ARR( 0.488E-13, -1250., 0.0);
+{  8261} G2H5017 +PERO5              =  0.460G1H501u + 0.270GHN503W + 0.270GHN502r                 : ARR( 0.183E-11,   450., 0.0);
+{  8262} G2H5017 +PERO6              =  0.300G1H501u + 0.350GHN503W + 0.350GHN502r                 : ARR( 0.168E-13, -1300., 0.0);
+{  8263} G2H5017 +PERO9              =  0.650G1H501u + 0.350GHN502r                                : ARR( 0.100E-10,     0., 0.0);
+{  8264} G1H501t                     =       G3H4000 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{  8265} G1H501u                     =       GD02000 +      GND3003 +      GHO                     : ARR( 0.200E+15,  4722., 0.0);
+{  8266} GNK500M +GHO                =       G2N502m                                               : ARR( 0.377E-11,     0., 0.0);
+{  8267} GNK500M +GHO                =       GNK500L +      GHO2                                   : ARR( 0.650E-11,     0., 0.0);
+{  8268} GNK500M+HV               =       G3K4004 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8269} GNK500M+HV               =       G1K500Z +      GNO2                                   :  0.100E+01*SUN;
+{  8270} G2N502m +GNO                =       G1N5036 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8271} G2N502m +GNO                =       GNN501g                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8272} G2N502m +GHO2               =       GHN503X                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8273} G2N502m +GNO3               =       G1N5036 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8274} G2N502m +MEPERO             =  0.340G1N5036 + 0.330GNK500x + 0.330GNK500q                 : ARR( 0.565E-13,  -845., 0.0);
+{  8275} G2N502m +PERO1              =  0.460G1N5036 + 0.270GNK500x + 0.270GNK500q                 : ARR( 0.434E-13,  -900., 0.0);
+{  8276} G2N502m +PERO2              =  0.400G1N5036 + 0.300GNK500x + 0.300GNK500q                 : ARR( 0.162E-13, -1400., 0.0);
+{  8277} G2N502m +PERO3              =  0.460G1N5036 + 0.270GNK500x + 0.270GNK500q                 : ARR( 0.488E-13, -1250., 0.0);
+{  8278} G2N502m +PERO5              =  0.460G1N5036 + 0.270GNK500x + 0.270GNK500q                 : ARR( 0.183E-11,   450., 0.0);
+{  8279} G2N502m +PERO6              =  0.300G1N5036 + 0.350GNK500x + 0.350GNK500q                 : ARR( 0.168E-13, -1300., 0.0);
+{  8280} G2N502m +PERO9              =  0.650G1N5036 + 0.350GNK500q                                : ARR( 0.100E-10,     0., 0.0);
+{  8281} G1K500Z                     =       G3K4004 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{  8282} G1N5036                     =       GD02000 +      GND3003 +      GHO2                    : ARR( 0.200E+15,  3513., 0.0);
+{  8283} GG04000 +GHO                =       G2G4004                                               : ARR( 0.118E-11,     0., 0.0);
+{  8284} GG04000 +GHO                =       G2G4005                                               : ARR( 0.887E-12,     0., 0.0);
+{  8285} GG04000 +GHO                =       G3K4001                                               : ARR( 0.196E-11,  -190., 0.0);
+{  8286} GG04000+HV               =       G203000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  8287} G2G4004 +GNO                =       G1G4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8288} G2G4004 +GNO                =       GGN4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8289} G2G4004 +GHO2               =       GGH4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8290} G2G4004 +GNO3               =       G1G4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8291} G2G4004 +MEPERO             =  0.480G1G4006 + 0.260GGO4000 + 0.260GGK4000                 : ARR( 0.616E-11,   905., 0.0);
+{  8292} G2G4004 +PERO1              =  0.600G1G4006 + 0.200GGO4000 + 0.200GGK4000                 : ARR( 0.473E-11,   850., 0.0);
+{  8293} G2G4004 +PERO2              =  0.560G1G4006 + 0.220GGO4000 + 0.220GGK4000                 : ARR( 0.177E-11,   350., 0.0);
+{  8294} G2G4004 +PERO3              =  0.600G1G4006 + 0.200GGO4000 + 0.200GGK4000                 : ARR( 0.533E-11,   500., 0.0);
+{  8295} G2G4004 +PERO5              =  0.600G1G4006 + 0.200GGO4000 + 0.200GGK4000                 : ARR( 0.200E-09,  2200., 0.0);
+{  8296} G2G4004 +PERO6              =  0.460G1G4006 + 0.270GGO4000 + 0.270GGK4000                 : ARR( 0.183E-11,   450., 0.0);
+{  8297} G2G4004 +PERO9              =  0.800G1G4006 + 0.200GGK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  8298} G2G4005 +GNO                =       G1G4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8299} G2G4005 +GNO                =       GGN4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8300} G2G4005 +GHO2               =       GGH4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8301} G2G4005 +GNO3               =       G1G4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8302} G2G4005 +MEPERO             =  0.340G1G4007 + 0.330GGO4002 + 0.330GGK4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  8303} G2G4005 +PERO1              =  0.460G1G4007 + 0.270GGO4002 + 0.270GGK4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  8304} G2G4005 +PERO2              =  0.400G1G4007 + 0.300GGO4002 + 0.300GGK4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  8305} G2G4005 +PERO3              =  0.460G1G4007 + 0.270GGO4002 + 0.270GGK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  8306} G2G4005 +PERO5              =  0.460G1G4007 + 0.270GGO4002 + 0.270GGK4002                 : ARR( 0.183E-11,   450., 0.0);
+{  8307} G2G4005 +PERO6              =  0.300G1G4007 + 0.350GGO4002 + 0.350GGK4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  8308} G2G4005 +PERO9              =  0.650G1G4007 + 0.350GGK4002                                : ARR( 0.100E-10,     0., 0.0);
+{  8309} G1G4006                     =       GD02000 +      G2G2000                                : ARR( 0.200E+15,  7255., 0.0);
+{  8310} G1G4007                     =       GD03000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  8311} GA04000 +GHO                =       G2A4004                                               : ARR( 0.168E-12,     0., 0.0);
+{  8312} GA04000 +GHO                =       G2A4005                                               : ARR( 0.115E-11,     0., 0.0);
+{  8313} GA04000 +GHO                =       G2A4006                                               : ARR( 0.638E-12,     0., 0.0);
+{  8314} GA04000 +GHO                =       G203000 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{  8315} G2A4004 +GNO                =       G1A4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8316} G2A4004 +GNO                =       GAN4000                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8317} G2A4004 +GHO2               =       GAH4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8318} G2A4004 +GNO3               =       G1A4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8319} G2A4004 +MEPERO             =  0.480G1A4001 + 0.260GAO4001 + 0.260GAD4000                 : ARR( 0.146E-12,  -445., 0.0);
+{  8320} G2A4004 +PERO1              =  0.600G1A4001 + 0.200GAO4001 + 0.200GAD4000                 : ARR( 0.112E-12,  -500., 0.0);
+{  8321} G2A4004 +PERO2              =  0.560G1A4001 + 0.220GAO4001 + 0.220GAD4000                 : ARR( 0.418E-13, -1000., 0.0);
+{  8322} G2A4004 +PERO3              =  0.600G1A4001 + 0.200GAO4001 + 0.200GAD4000                 : ARR( 0.126E-12,  -850., 0.0);
+{  8323} G2A4004 +PERO5              =  0.600G1A4001 + 0.200GAO4001 + 0.200GAD4000                 : ARR( 0.473E-11,   850., 0.0);
+{  8324} G2A4004 +PERO6              =  0.460G1A4001 + 0.270GAO4001 + 0.270GAD4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  8325} G2A4004 +PERO9              =  0.800G1A4001 + 0.200GAD4000                                : ARR( 0.100E-10,     0., 0.0);
+{  8326} G2A4005 +GNO                =       G1A4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8327} G2A4005 +GNO                =       GAN4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8328} G2A4005 +GHO2               =       GAH4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8329} G2A4005 +GNO3               =       G1A4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8330} G2A4005 +MEPERO             =  0.480G1A4006 + 0.260GAO4000 + 0.260GAK4000                 : ARR( 0.616E-11,   905., 0.0);
+{  8331} G2A4005 +PERO1              =  0.600G1A4006 + 0.200GAO4000 + 0.200GAK4000                 : ARR( 0.473E-11,   850., 0.0);
+{  8332} G2A4005 +PERO2              =  0.560G1A4006 + 0.220GAO4000 + 0.220GAK4000                 : ARR( 0.177E-11,   350., 0.0);
+{  8333} G2A4005 +PERO3              =  0.600G1A4006 + 0.200GAO4000 + 0.200GAK4000                 : ARR( 0.533E-11,   500., 0.0);
+{  8334} G2A4005 +PERO5              =  0.600G1A4006 + 0.200GAO4000 + 0.200GAK4000                 : ARR( 0.200E-09,  2200., 0.0);
+{  8335} G2A4005 +PERO6              =  0.460G1A4006 + 0.270GAO4000 + 0.270GAK4000                 : ARR( 0.183E-11,   450., 0.0);
+{  8336} G2A4005 +PERO9              =  0.800G1A4006 + 0.200GAK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  8337} G2A4006 +GNO                =       G1A4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8338} G2A4006 +GNO                =       GAN4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8339} G2A4006 +GHO2               =       GAH4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8340} G2A4006 +GNO3               =       G1A4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8341} G2A4006 +MEPERO             =  0.340G1A4007 + 0.330GAO4002 + 0.330GAK4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  8342} G2A4006 +PERO1              =  0.460G1A4007 + 0.270GAO4002 + 0.270GAK4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  8343} G2A4006 +PERO2              =  0.400G1A4007 + 0.300GAO4002 + 0.300GAK4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  8344} G2A4006 +PERO3              =  0.460G1A4007 + 0.270GAO4002 + 0.270GAK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  8345} G2A4006 +PERO5              =  0.460G1A4007 + 0.270GAO4002 + 0.270GAK4002                 : ARR( 0.183E-11,   450., 0.0);
+{  8346} G2A4006 +PERO6              =  0.300G1A4007 + 0.350GAO4002 + 0.350GAK4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  8347} G2A4006 +PERO9              =  0.650G1A4007 + 0.350GAK4002                                : ARR( 0.100E-10,     0., 0.0);
+{  8348} G1A4006                     =       GD02000 +      G2A2000                                : ARR( 0.200E+15,  7255., 0.0);
+{  8349} G1A4007                     =       GD03000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  8350} GP04000                     =       G3K4001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  8351} GP04000 +GHO                =       G2P4004                                               : ARR( 0.168E-12,     0., 0.0);
+{  8352} GP04000 +GHO                =       G2P4005                                               : ARR( 0.115E-11,     0., 0.0);
+{  8353} GP04000 +GHO                =       G2P4006                                               : ARR( 0.862E-12,     0., 0.0);
+{  8354} GP04000+HV               =       G3K4001 +      GNO2                                   :  0.100E+01*SUN;
+{  8355} G2P4004 +GNO                =       G1P4001 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8356} G2P4004 +GNO                =       GPN4000                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8357} G2P4004 +GHO2               =       GPH4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8358} G2P4004 +GNO3               =       G1P4001 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8359} G2P4004 +MEPERO             =  0.480G1P4001 + 0.260GPO4001 + 0.260GPD4000                 : ARR( 0.146E-12,  -445., 0.0);
+{  8360} G2P4004 +PERO1              =  0.600G1P4001 + 0.200GPO4001 + 0.200GPD4000                 : ARR( 0.112E-12,  -500., 0.0);
+{  8361} G2P4004 +PERO2              =  0.560G1P4001 + 0.220GPO4001 + 0.220GPD4000                 : ARR( 0.418E-13, -1000., 0.0);
+{  8362} G2P4004 +PERO3              =  0.600G1P4001 + 0.200GPO4001 + 0.200GPD4000                 : ARR( 0.126E-12,  -850., 0.0);
+{  8363} G2P4004 +PERO5              =  0.600G1P4001 + 0.200GPO4001 + 0.200GPD4000                 : ARR( 0.473E-11,   850., 0.0);
+{  8364} G2P4004 +PERO6              =  0.460G1P4001 + 0.270GPO4001 + 0.270GPD4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  8365} G2P4004 +PERO9              =  0.800G1P4001 + 0.200GPD4000                                : ARR( 0.100E-10,     0., 0.0);
+{  8366} G2P4005 +GNO                =       G1P4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8367} G2P4005 +GNO                =       GPN4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8368} G2P4005 +GHO2               =       GPH4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8369} G2P4005 +GNO3               =       G1P4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8370} G2P4005 +MEPERO             =  0.480G1P4006 + 0.260GPO4000 + 0.260GPK4000                 : ARR( 0.616E-11,   905., 0.0);
+{  8371} G2P4005 +PERO1              =  0.600G1P4006 + 0.200GPO4000 + 0.200GPK4000                 : ARR( 0.473E-11,   850., 0.0);
+{  8372} G2P4005 +PERO2              =  0.560G1P4006 + 0.220GPO4000 + 0.220GPK4000                 : ARR( 0.177E-11,   350., 0.0);
+{  8373} G2P4005 +PERO3              =  0.600G1P4006 + 0.200GPO4000 + 0.200GPK4000                 : ARR( 0.533E-11,   500., 0.0);
+{  8374} G2P4005 +PERO5              =  0.600G1P4006 + 0.200GPO4000 + 0.200GPK4000                 : ARR( 0.200E-09,  2200., 0.0);
+{  8375} G2P4005 +PERO6              =  0.460G1P4006 + 0.270GPO4000 + 0.270GPK4000                 : ARR( 0.183E-11,   450., 0.0);
+{  8376} G2P4005 +PERO9              =  0.800G1P4006 + 0.200GPK4000                                : ARR( 0.100E-10,     0., 0.0);
+{  8377} G2P4006 +GNO                =       G1P4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8378} G2P4006 +GNO                =       GPN4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8379} G2P4006 +GHO2               =       GPH4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8380} G2P4006 +GNO3               =       G1P4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8381} G2P4006 +MEPERO             =  0.340G1P4007 + 0.330GPO4002 + 0.330GPK4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  8382} G2P4006 +PERO1              =  0.460G1P4007 + 0.270GPO4002 + 0.270GPK4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  8383} G2P4006 +PERO2              =  0.400G1P4007 + 0.300GPO4002 + 0.300GPK4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  8384} G2P4006 +PERO3              =  0.460G1P4007 + 0.270GPO4002 + 0.270GPK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  8385} G2P4006 +PERO5              =  0.460G1P4007 + 0.270GPO4002 + 0.270GPK4002                 : ARR( 0.183E-11,   450., 0.0);
+{  8386} G2P4006 +PERO6              =  0.300G1P4007 + 0.350GPO4002 + 0.350GPK4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  8387} G2P4006 +PERO9              =  0.650G1P4007 + 0.350GPK4002                                : ARR( 0.100E-10,     0., 0.0);
+{  8388} G1P4006                     =       GD02000 +      G2P2000                                : ARR( 0.200E+15,  7255., 0.0);
+{  8389} G1P4007                     =       GD03000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  8390} GNN3006 +GHO                =       GND3003 +      GNO2                                   : ARR( 0.560E-13,     0., 0.0);
+{  8391} GNN3006+HV               =       G1N3005 +      GNO2                                   :  0.200E+01*SUN;
+{  8392} GNN3006+HV               =       G3N2000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8393} GHN3008 +GHO                =       GND3003 +      GHO                                    : ARR( 0.983E-11,     0., 0.0);
+{  8394} GHN3008 +GHO                =       G2N3005                                               : ARR( 0.190E-11,  -190., 0.0);
+{  8395} GHN3008+HV               =       G1H3003 +      GNO2                                   :  0.100E+01*SUN;
+{  8396} GHN3008+HV               =       G3N2000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  8397} GHN3008+HV               =       G1N3005 +      GHO                                    :  0.100E+01*SUN;
+{  8398} GNK3001 +GHO                =       GND3003 +      GHO2                                   : ARR( 0.248E-11,     0., 0.0);
+{  8399} GNK3001 +GHO                =       G1N3005                                               : ARR( 0.212E-17,    85., 2.0);
+{  8400} GNK3001+HV               =       G3K2001 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8401} GNK3001+HV               =       G1K3001 +      GNO2                                   :  0.100E+01*SUN;
+{  8402} GND3003 +GHO                =       G3N2000 +      GCO                                    : ARR( 0.127E-10,     0., 0.0);
+{  8403} GND3003 +GNO3               =       G3N2000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  8404} GND3003+HV               =       G1D3002 +      GNO2                                   :  0.100E+01*SUN;
+{  8405} GND3003+HV               =       G3N2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8406} GND3003+HV               =       GND2000 +      GCO                                    :  0.100E+01*SUN;
+{  8407} GND3003+HV               =       GN01001 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  8408} GGN2000 +GHO                =       G3N2000                                               : ARR( 0.191E-11,  -190., 0.0);
+{  8409} GGN2000+HV               =       G1G2000 +      GNO2                                   :  0.100E+01*SUN;
+{  8410} GGN2000+HV               =       GCH2O   +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{  8411} GAN2000 +GHO                =       GCH2O   +      GNO2    +      GCO2                    : ARR( 0.541E-12,     0., 0.0);
+{  8412} GAN2000+HV               =       G1A2000 +      GNO2                                   :  0.100E+01*SUN;
+{  8413}  GPN2000    +M                 =       G3N2000 +      GNO2            +M                     : FALL( 0.280E+17, 13580., 0.0, 0.190E-02, 12175., 0.0,0.60);
+{  8414} GPN2000 +GHO                =       GPD2000 +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{  8415} GPN2000+HV               =       G1P2000 +      GNO2                                   :  0.100E+01*SUN;
+{  8416} GPN2000+HV               =       G3N2000 +      GNO2                                   :  0.100E+01*SUN;
+{  8417} GNN500j +GHO                =       GNN501l +      GHO2                                   : ARR( 0.872E-12,     0., 0.0);
+{  8418} GNN500j +GHO                =       GNN500l +      GNO2                                   : ARR( 0.128E-12,     0., 0.0);
+{  8419} GNN500j +GHO                =       G1N5026                                               : ARR( 0.228E-17,    85., 2.0);
+{  8420} GNN500j+HV               =       G1N500m +      GNO2                                   :  0.100E+01*SUN;
+{  8421} GNN500j+HV               =       G1N501d +      GNO2                                   :  0.100E+01*SUN;
+{  8422} GNN500j+HV               =       G1N5037 +      GNO2                                   :  0.100E+01*SUN;
+{  8423} G1N5037 +OXYGEN             =       GNN501T +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8424} G1N5037                     =       GNK500N +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{  8425} GHN500s +GHO                =       GHN503Y +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{  8426} GHN500s +GHO                =       GNN500l +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{  8427} GHN500s +GHO                =       G2N500k                                               : ARR( 0.192E-11,  -190., 0.0);
+{  8428} GHN500s+HV               =       G1N500m +      GHO                                    :  0.100E+01*SUN;
+{  8429} GHN500s+HV               =       G1H500l +      GNO2                                   :  0.100E+01*SUN;
+{  8430} GHN500s+HV               =       G1H501v +      GNO2                                   :  0.100E+01*SUN;
+{  8431} G1H501v                     =       GNK500N +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{  8432} GNN500k +GHO                =       GNN502N +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{  8433} GNN500k +GHO                =       GNN500l +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  8434} GNN500k+HV               =       G1N500v +      GNO2                                   :  0.100E+01*SUN;
+{  8435} GNN500k+HV               =       G1N5038 +      GNO2                                   :  0.100E+01*SUN;
+{  8436} G1N5038                     =       GNK500N +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{  8437} GNN500l +GHO                =       GNN501t +      GHO2                                   : ARR( 0.266E-11,     0., 0.0);
+{  8438} GNN500l +GHO                =       G2N502n                                               : ARR( 0.187E-12,     0., 0.0);
+{  8439} GNN500l+HV               =       G3K2001 +      G2N3004                                :  0.100E+01*SUN;
+{  8440} GNN500l+HV               =       GKO3000 +      GDD2000 + 2.000GNO2                    :  0.100E+01*SUN;
+{  8441} GNN500l+HV               =       G1N501o +      GNO2                                   :  0.100E+01*SUN;
+{  8442} GNN500l+HV               =       G1N5039 +      GNO2                                   :  0.100E+01*SUN;
+{  8443} G2N502n +GNO                =       G1N503A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8444} G2N502n +GNO                =       GNN5029                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8445} G2N502n +GHO2               =       GHN503Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8446} G2N502n +GNO3               =       G1N503A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8447} G2N502n +MEPERO             =  0.340G1N503A + 0.330GNN502O + 0.330GNN502P                 : ARR( 0.565E-13,  -845., 0.0);
+{  8448} G2N502n +PERO1              =  0.460G1N503A + 0.270GNN502O + 0.270GNN502P                 : ARR( 0.434E-13,  -900., 0.0);
+{  8449} G2N502n +PERO2              =  0.400G1N503A + 0.300GNN502O + 0.300GNN502P                 : ARR( 0.162E-13, -1400., 0.0);
+{  8450} G2N502n +PERO3              =  0.460G1N503A + 0.270GNN502O + 0.270GNN502P                 : ARR( 0.488E-13, -1250., 0.0);
+{  8451} G2N502n +PERO5              =  0.460G1N503A + 0.270GNN502O + 0.270GNN502P                 : ARR( 0.183E-11,   450., 0.0);
+{  8452} G2N502n +PERO6              =  0.300G1N503A + 0.350GNN502O + 0.350GNN502P                 : ARR( 0.168E-13, -1300., 0.0);
+{  8453} G2N502n +PERO9              =  0.650G1N503A + 0.350GNN502P                                : ARR( 0.100E-10,     0., 0.0);
+{  8454} G1N5039 +OXYGEN             =       GND500e +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8455} G1N5039                     =       GDK4001 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{  8456} G1N503A                     =       G3K2001 +      GNN3005                                : ARR( 0.200E+15,  3009., 0.0);
+{  8457} GNN4001 +GHO                =       G3N4006                                               : ARR( 0.210E-10,     0., 0.0);
+{  8458} GNN4001 +GNO3               =       G3N4006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8459} GNN4001+HV               =       G1N400I +      GNO2                                   :  0.100E+01*SUN;
+{  8460} GNN4001+HV               =       G1N400J +      GNO2                                   :  0.100E+01*SUN;
+{  8461} GNN4001+HV               =       G2N3004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8462} GNN4001+HV               =       GDD2000 +      GD02000 + 2.000GNO2                    :  0.100E+01*SUN;
+{  8463} G1N400I +OXYGEN             =       GND400D +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8464} G1N400I                     =       G3N4003                                               : ARR( 0.800E+11,  4559., 0.0);
+{  8465} G1N400I                     =       GDD3000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{  8466} G1N400J                     =       GCH2O   +      GDD3000 +      GNO2                    : ARR( 0.200E+15,  8296., 0.0);
+{  8467} G1N400J                     =       GND2000 +      G2D2000                                : ARR( 0.200E+15,  7286., 0.0);
+{  8468} GNN500m +GHO                =       GNN501T +      GHO2                                   : ARR( 0.165E-11,     0., 0.0);
+{  8469} GNN500m +GHO                =       GNK500N +      GNO2                                   : ARR( 0.242E-12,     0., 0.0);
+{  8470} GNN500m +GHO                =       G1N5037                                               : ARR( 0.431E-17,    85., 2.0);
+{  8471} GNN500m+HV               =       G1N500n +      GNO2                                   :  0.200E+01*SUN;
+{  8472} GHN500t +GHO                =       GNK500N +      GHO                                    : ARR( 0.425E-10,     0., 0.0);
+{  8473} GHN500t +GHO                =       GHN503M +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{  8474} GHN500t +GHO                =       G2N500l                                               : ARR( 0.196E-11,  -190., 0.0);
+{  8475} GHN500t+HV               =       G1H500H +      GNO2                                   :  0.100E+01*SUN;
+{  8476} GHN500t+HV               =       G1N500n +      GHO                                    :  0.100E+01*SUN;
+{  8477} GNO500M +GHO                =       GND500l +      GHO2                                   : ARR( 0.424E-11,     0., 0.0);
+{  8478} GNO500M +GHO                =       GNK500N +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  8479} GNO500M +GHO                =       GND500B +      GHO2                                   : ARR( 0.848E-12,     0., 0.0);
+{  8480} GNO500M+HV               =       G1O500J +      GNO2                                   :  0.100E+01*SUN;
+{  8481} GNK500N +GHO                =       GND500N +      GHO2                                   : ARR( 0.276E-11,     0., 0.0);
+{  8482} GNK500N +GHO                =       GKK5005 +      GNO2                                   : ARR( 0.420E-12,     0., 0.0);
+{  8483} GNK500N +GHO                =       GND500e +      GHO2                                   : ARR( 0.905E-12,     0., 0.0);
+{  8484} GNK500N+HV               =       G3K2001 +      G2N3008                                :  0.100E+01*SUN;
+{  8485} GNK500N+HV               =       GKO3000 +      GND2000                                :  0.100E+01*SUN;
+{  8486} GNK500N+HV               =       G1K500E +      GNO2                                   :  0.100E+01*SUN;
+{  8487} GND500B +GHO                =       GND500m +      GHO2                                   : ARR( 0.416E-11,     0., 0.0);
+{  8488} GND500B +GHO                =       GND500e +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{  8489} GND500B +GHO                =       G3N500D                                               : ARR( 0.430E-11,     0., 0.0);
+{  8490} GND500B +GNO3               =       G3N500D +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8491} GND500B+HV               =       G1D5005 +      GNO2                                   :  0.100E+01*SUN;
+{  8492} GND500B+HV               =       GDO4002 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  8493} GND500B+HV               =       GKO3000 +      GND2000                                :  0.100E+01*SUN;
+{  8494} G3N500D +GHO2               =  0.800GGN500H + 0.200GAN500I + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8495} G3N500D +GNO                =       GDO4002 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8496} G3N500D +GNO2               =       GPN500I                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8497} G3N500D +GNO3               =       GDO4002 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8498} G3N500D +MEPERO             =  0.685GDO4002 + 0.315GAN500I + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8499} G3N500D +PERO1              =  0.800GDO4002 + 0.200GAN500I + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8500} G3N500D +PERO2              =  0.750GDO4002 + 0.250GAN500I + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8501} G3N500D +PERO3              =  0.800GDO4002 + 0.200GAN500I + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8502} G3N500D +PERO5              =  0.650GDO4002 + 0.350GAN500I + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8503} G3N500D +PERO6              =  0.650GDO4002 + 0.350GAN500I + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8504} G3N500D +PERO9              =       GDO4002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  8505} GND4002 +GHO                =       G3N4003                                               : ARR( 0.223E-10,     0., 0.0);
+{  8506} GND4002 +GNO3               =       G3N4003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8507} GND4002+HV               =       G1D4001 +      GNO2                                   :  0.100E+01*SUN;
+{  8508} GND4002+HV               =       G2N3008 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8509} GND4002+HV               =       GND2000 +      GD02000                                :  0.100E+01*SUN;
+{  8510} GHN500u +GHO                =       GND500C +      GHO                                    : ARR( 0.844E-11,     0., 0.0);
+{  8511} GHN500u +GHO                =       G2H5018                                               : ARR( 0.459E-11,     0., 0.0);
+{  8512} GHN500u +GHO                =       G3H5007                                               : ARR( 0.213E-10,     0., 0.0);
+{  8513} GHN500u +GHO                =       G2N502o                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8514} GHN500u +GNO3               =       G3H5007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8515} GHN500u+HV               =       G1H501w +      GNO2                                   :  0.100E+01*SUN;
+{  8516} GHN500u+HV               =       G1N502y +      GHO                                    :  0.100E+01*SUN;
+{  8517} GHN500u+HV               =       G2H400D +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8518} GHN500u+HV               =       G2N3005 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{  8519} G2H5018 +GNO                =       G1H501x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8520} G2H5018 +GNO                =       GHN5034                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8521} G2H5018 +GHO2               =       GHH500z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8522} G2H5018 +GNO3               =       G1H501x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8523} G2H5018 +MEPERO             =  0.340G1H501x + 0.330GHN503a + 0.330GHN503H                 : ARR( 0.565E-13,  -845., 0.0);
+{  8524} G2H5018 +PERO1              =  0.460G1H501x + 0.270GHN503a + 0.270GHN503H                 : ARR( 0.434E-13,  -900., 0.0);
+{  8525} G2H5018 +PERO2              =  0.400G1H501x + 0.300GHN503a + 0.300GHN503H                 : ARR( 0.162E-13, -1400., 0.0);
+{  8526} G2H5018 +PERO3              =  0.460G1H501x + 0.270GHN503a + 0.270GHN503H                 : ARR( 0.488E-13, -1250., 0.0);
+{  8527} G2H5018 +PERO5              =  0.460G1H501x + 0.270GHN503a + 0.270GHN503H                 : ARR( 0.183E-11,   450., 0.0);
+{  8528} G2H5018 +PERO6              =  0.300G1H501x + 0.350GHN503a + 0.350GHN503H                 : ARR( 0.168E-13, -1300., 0.0);
+{  8529} G2H5018 +PERO9              =  0.650G1H501x + 0.350GHN503H                                : ARR( 0.100E-10,     0., 0.0);
+{  8530} G3H5007 +GHO2               =  0.800GGH5009 + 0.200GAH5008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8531} G3H5007 +GNO                =       G2H400D +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8532} G3H5007 +GNO2               =       GPH5007                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8533} G3H5007 +GNO3               =       G2H400D +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8534} G3H5007 +MEPERO             =  0.685G2H400D + 0.315GAH5008 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8535} G3H5007 +PERO1              =  0.800G2H400D + 0.200GAH5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8536} G3H5007 +PERO2              =  0.750G2H400D + 0.250GAH5008 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8537} G3H5007 +PERO3              =  0.800G2H400D + 0.200GAH5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8538} G3H5007 +PERO5              =  0.650G2H400D + 0.350GAH5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8539} G3H5007 +PERO6              =  0.650G2H400D + 0.350GAH5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8540} G3H5007 +PERO9              =       G2H400D +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8541} G2N502o +GNO                =       G1N502y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8542} G2N502o +GNO                =       GNN500h                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8543} G2N502o +GHO2               =       GHN500u                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8544} G2N502o +GNO3               =       G1N502y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8545} G2N502o +MEPERO             =  0.340G1N502y + 0.330GND5001 + 0.330GND500C                 : ARR( 0.565E-13,  -845., 0.0);
+{  8546} G2N502o +PERO1              =  0.460G1N502y + 0.270GND5001 + 0.270GND500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  8547} G2N502o +PERO2              =  0.400G1N502y + 0.300GND5001 + 0.300GND500C                 : ARR( 0.162E-13, -1400., 0.0);
+{  8548} G2N502o +PERO3              =  0.460G1N502y + 0.270GND5001 + 0.270GND500C                 : ARR( 0.488E-13, -1250., 0.0);
+{  8549} G2N502o +PERO5              =  0.460G1N502y + 0.270GND5001 + 0.270GND500C                 : ARR( 0.183E-11,   450., 0.0);
+{  8550} G2N502o +PERO6              =  0.300G1N502y + 0.350GND5001 + 0.350GND500C                 : ARR( 0.168E-13, -1300., 0.0);
+{  8551} G2N502o +PERO9              =  0.650G1N502y + 0.350GND500C                                : ARR( 0.100E-10,     0., 0.0);
+{  8552} G1H501w                     =       G2H5019                                               : ARR( 0.160E+12,  3221., 0.0);
+{  8553} G1H501w                     =       GDD4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  8554} G2H400D +GNO                =       G1H400E +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8555} G2H400D +GNO                =       GHN400I                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8556} G2H400D +GHO2               =       GHH4008                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8557} G2H400D +GNO3               =       G1H400E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8558} G2H400D +MEPERO             =  0.480G1H400E + 0.260GHN400D + 0.260GHN4001                 : ARR( 0.146E-12,  -445., 0.0);
+{  8559} G2H400D +PERO1              =  0.600G1H400E + 0.200GHN400D + 0.200GHN4001                 : ARR( 0.112E-12,  -500., 0.0);
+{  8560} G2H400D +PERO2              =  0.560G1H400E + 0.220GHN400D + 0.220GHN4001                 : ARR( 0.418E-13, -1000., 0.0);
+{  8561} G2H400D +PERO3              =  0.600G1H400E + 0.200GHN400D + 0.200GHN4001                 : ARR( 0.126E-12,  -850., 0.0);
+{  8562} G2H400D +PERO5              =  0.600G1H400E + 0.200GHN400D + 0.200GHN4001                 : ARR( 0.473E-11,   850., 0.0);
+{  8563} G2H400D +PERO6              =  0.460G1H400E + 0.270GHN400D + 0.270GHN4001                 : ARR( 0.434E-13,  -900., 0.0);
+{  8564} G2H400D +PERO9              =  0.800G1H400E + 0.200GHN4001                                : ARR( 0.100E-10,     0., 0.0);
+{  8565} G1H501x                     =       GND2000 +      GDD3000 +      GHO                     : ARR( 0.200E+15,  4146., 0.0);
+{  8566} G2H5019 +GNO                =       G1H501y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8567} G2H5019 +GNO                =       GHN502S                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8568} G2H5019 +GHO2               =       GHH5011                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8569} G2H5019 +GNO3               =       G1H501y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8570} G2H5019 +MEPERO             =  0.340G1H501y + 0.330GHD500Y + 0.330GHD500S                 : ARR( 0.565E-13,  -845., 0.0);
+{  8571} G2H5019 +PERO1              =  0.460G1H501y + 0.270GHD500Y + 0.270GHD500S                 : ARR( 0.434E-13,  -900., 0.0);
+{  8572} G2H5019 +PERO2              =  0.400G1H501y + 0.300GHD500Y + 0.300GHD500S                 : ARR( 0.162E-13, -1400., 0.0);
+{  8573} G2H5019 +PERO3              =  0.460G1H501y + 0.270GHD500Y + 0.270GHD500S                 : ARR( 0.488E-13, -1250., 0.0);
+{  8574} G2H5019 +PERO5              =  0.460G1H501y + 0.270GHD500Y + 0.270GHD500S                 : ARR( 0.183E-11,   450., 0.0);
+{  8575} G2H5019 +PERO6              =  0.300G1H501y + 0.350GHD500Y + 0.350GHD500S                 : ARR( 0.168E-13, -1300., 0.0);
+{  8576} G2H5019 +PERO9              =  0.650G1H501y + 0.350GHD500S                                : ARR( 0.100E-10,     0., 0.0);
+{  8577} G1H400E +OXYGEN             =       GHN4001 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{  8578} G1H400E                     =       GHD4006 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  8579} G1H501y                     =       GHD500Z +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  8580} G1H501y                     =       GHD4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  8581} GHN500v +GHO                =       GHN503b +      GHO2                                   : ARR( 0.842E-12,     0., 0.0);
+{  8582} GHN500v +GHO                =       GNN500T +      GHO                                    : ARR( 0.862E-11,     0., 0.0);
+{  8583} GHN500v +GHO                =       G2N501Z                                               : ARR( 0.199E-11,  -190., 0.0);
+{  8584} GHN500v+HV               =       G1H500F +      GNO2                                   :  0.100E+01*SUN;
+{  8585} GHN500v+HV               =       G1N501d +      GHO                                    :  0.100E+01*SUN;
+{  8586} GHN500v+HV               =       G1H501z +      GNO2                                   :  0.100E+01*SUN;
+{  8587} G1H501z +OXYGEN             =       GHN503M +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8588} G1H501z                     =       GHK500B +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{  8589} G1H501z                     =       GND4002 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{  8590} GHH500A +GHO                =       GHH5012 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  8591} GHH500A +GHO                =       GHN500x +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{  8592} GHH500A +GHO                =       GHN5013 +      GHO                                    : ARR( 0.846E-11,     0., 0.0);
+{  8593} GHH500A +GHO                =       G2H500A                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8594} GHH500A +GHO                =       G2H500Y                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8595} GHH500A+HV               =       G1H500F +      GHO                                    :  0.100E+01*SUN;
+{  8596} GHH500A+HV               =       G1H500l +      GHO                                    :  0.100E+01*SUN;
+{  8597} GHH500A+HV               =       G1H5021 +      GNO2                                   :  0.100E+01*SUN;
+{  8598} G1H5021                     =       GHK500B +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{  8599} GHN500w +GHO                =       GHN503c +      GHO2                                   : ARR( 0.407E-11,     0., 0.0);
+{  8600} GHN500w +GHO                =       GHN500x +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{  8601} GHN500w +GHO                =       G2H501A                                               : ARR( 0.143E-11,     0., 0.0);
+{  8602} GHN500w +GHO                =       GNK500P +      GHO                                    : ARR( 0.834E-11,     0., 0.0);
+{  8603} GHN500w +GHO                =       G2N500s                                               : ARR( 0.192E-11,  -190., 0.0);
+{  8604} GHN500w+HV               =       G1N500v +      GHO                                    :  0.100E+01*SUN;
+{  8605} GHN500w+HV               =       G1H501h +      GNO2                                   :  0.100E+01*SUN;
+{  8606} G2H501A +GNO                =       G1H5022 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8607} G2H501A +GNO                =       GHN503d                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8608} G2H501A +GHO2               =       GHH5013                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8609} G2H501A +GNO3               =       G1H5022 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8610} G2H501A +MEPERO             =  0.340G1H5022 + 0.330GHN503e + 0.330GHN503f                 : ARR( 0.565E-13,  -845., 0.0);
+{  8611} G2H501A +PERO1              =  0.460G1H5022 + 0.270GHN503e + 0.270GHN503f                 : ARR( 0.434E-13,  -900., 0.0);
+{  8612} G2H501A +PERO2              =  0.400G1H5022 + 0.300GHN503e + 0.300GHN503f                 : ARR( 0.162E-13, -1400., 0.0);
+{  8613} G2H501A +PERO3              =  0.460G1H5022 + 0.270GHN503e + 0.270GHN503f                 : ARR( 0.488E-13, -1250., 0.0);
+{  8614} G2H501A +PERO5              =  0.460G1H5022 + 0.270GHN503e + 0.270GHN503f                 : ARR( 0.183E-11,   450., 0.0);
+{  8615} G2H501A +PERO6              =  0.300G1H5022 + 0.350GHN503e + 0.350GHN503f                 : ARR( 0.168E-13, -1300., 0.0);
+{  8616} G2H501A +PERO9              =  0.650G1H5022 + 0.350GHN503f                                : ARR( 0.100E-10,     0., 0.0);
+{  8617} G1H5022                     =       GDO2000 +      GHN3007 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  8618} GHN500x +GHO                =       GHN502k +      GHO2                                   : ARR( 0.253E-11,     0., 0.0);
+{  8619} GHN500x +GHO                =       GNK500Q +      GHO                                    : ARR( 0.270E-10,     0., 0.0);
+{  8620} GHN500x +GHO                =       G2N501l                                               : ARR( 0.196E-11,  -190., 0.0);
+{  8621} GHN500x+HV               =       G3K2001 +      G2H3001                                :  0.100E+01*SUN;
+{  8622} GHN500x+HV               =       GKO3000 +      GDD2000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{  8623} GHN500x+HV               =       G1N501o +      GHO                                    :  0.100E+01*SUN;
+{  8624} GHN500x+HV               =       G1H5023 +      GNO2                                   :  0.100E+01*SUN;
+{  8625} G1H5023 +OXYGEN             =       GHD500a +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8626} G1H5023                     =       GDK4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5636., 0.0);
+{  8627} GHH500B +GHO                =       GHH500z +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  8628} GHH500B +GHO                =       GHN500z +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{  8629} GHH500B +GHO                =       GHN5014 +      GHO                                    : ARR( 0.846E-11,     0., 0.0);
+{  8630} GHH500B +GHO                =       G2H500B                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8631} GHH500B +GHO                =       G2H500Z                                               : ARR( 0.195E-11,  -190., 0.0);
+{  8632} GHH500B+HV               =       G1H500G +      GHO                                    :  0.100E+01*SUN;
+{  8633} GHH500B+HV               =       G1H500n +      GHO                                    :  0.100E+01*SUN;
+{  8634} GHH500B+HV               =       G1H5024 +      GNO2                                   :  0.100E+01*SUN;
+{  8635} G1H5024                     =       G2H501B                                               : ARR( 0.160E+12,  3000., 0.0);
+{  8636} G1H5024                     =       GHD4006 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  8637} G2H501B +GNO                =       G1H5025 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8638} G2H501B +GNO                =       GHH5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8639} G2H501B +GHO2               =       GHH5015                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8640} G2H501B +GNO3               =       G1H5025 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8641} G2H501B +MEPERO             =  0.340G1H5025 + 0.330GHH5016 + 0.330GHH5017                 : ARR( 0.565E-13,  -845., 0.0);
+{  8642} G2H501B +PERO1              =  0.460G1H5025 + 0.270GHH5016 + 0.270GHH5017                 : ARR( 0.434E-13,  -900., 0.0);
+{  8643} G2H501B +PERO2              =  0.400G1H5025 + 0.300GHH5016 + 0.300GHH5017                 : ARR( 0.162E-13, -1400., 0.0);
+{  8644} G2H501B +PERO3              =  0.460G1H5025 + 0.270GHH5016 + 0.270GHH5017                 : ARR( 0.488E-13, -1250., 0.0);
+{  8645} G2H501B +PERO5              =  0.460G1H5025 + 0.270GHH5016 + 0.270GHH5017                 : ARR( 0.183E-11,   450., 0.0);
+{  8646} G2H501B +PERO6              =  0.300G1H5025 + 0.350GHH5016 + 0.350GHH5017                 : ARR( 0.168E-13, -1300., 0.0);
+{  8647} G2H501B +PERO9              =  0.650G1H5025 + 0.350GHH5017                                : ARR( 0.100E-10,     0., 0.0);
+{  8648} G1H5025                     =       GHH5018 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  8649} G1H5025                     =       GHD3003 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{  8650} G1H5025                     =       GHH4009 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  8651} GHN500y +GHO                =       GHN503a +      GHO2                                   : ARR( 0.407E-11,     0., 0.0);
+{  8652} GHN500y +GHO                =       G2H501C                                               : ARR( 0.143E-11,     0., 0.0);
+{  8653} GHN500y +GHO                =       GHN500z +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{  8654} GHN500y +GHO                =       GNK500R +      GHO                                    : ARR( 0.834E-11,     0., 0.0);
+{  8655} GHN500y +GHO                =       G2N501e                                               : ARR( 0.192E-11,  -190., 0.0);
+{  8656} GHN500y+HV               =       G1N501k +      GHO                                    :  0.100E+01*SUN;
+{  8657} GHN500y+HV               =       G1H5026 +      GNO2                                   :  0.100E+01*SUN;
+{  8658} G2H501C +GNO                =       G1H5027 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8659} G2H501C +GNO                =       GHN503g                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8660} G2H501C +GHO2               =       GHH5019                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8661} G2H501C +GNO3               =       G1H5027 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8662} G2H501C +MEPERO             =  0.340G1H5027 + 0.330GHN503e + 0.330GHN503h                 : ARR( 0.565E-13,  -845., 0.0);
+{  8663} G2H501C +PERO1              =  0.460G1H5027 + 0.270GHN503e + 0.270GHN503h                 : ARR( 0.434E-13,  -900., 0.0);
+{  8664} G2H501C +PERO2              =  0.400G1H5027 + 0.300GHN503e + 0.300GHN503h                 : ARR( 0.162E-13, -1400., 0.0);
+{  8665} G2H501C +PERO3              =  0.460G1H5027 + 0.270GHN503e + 0.270GHN503h                 : ARR( 0.488E-13, -1250., 0.0);
+{  8666} G2H501C +PERO5              =  0.460G1H5027 + 0.270GHN503e + 0.270GHN503h                 : ARR( 0.183E-11,   450., 0.0);
+{  8667} G2H501C +PERO6              =  0.300G1H5027 + 0.350GHN503e + 0.350GHN503h                 : ARR( 0.168E-13, -1300., 0.0);
+{  8668} G2H501C +PERO9              =  0.650G1H5027 + 0.350GHN503h                                : ARR( 0.100E-10,     0., 0.0);
+{  8669} G1H5026                     =       G2H501D                                               : ARR( 0.160E+12,  3000., 0.0);
+{  8670} G1H5026                     =       GDO4003 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  8671} G1H5027                     =       GDO2000 +      GHN3007 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  8672} G2H501D +GNO                =       G1H5028 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8673} G2H501D +GNO                =       GHN503i                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8674} G2H501D +GHO2               =       GHH501A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8675} G2H501D +GNO3               =       G1H5028 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8676} G2H501D +MEPERO             =  0.340G1H5028 + 0.330GHO500T + 0.330GHK500e                 : ARR( 0.565E-13,  -845., 0.0);
+{  8677} G2H501D +PERO1              =  0.460G1H5028 + 0.270GHO500T + 0.270GHK500e                 : ARR( 0.434E-13,  -900., 0.0);
+{  8678} G2H501D +PERO2              =  0.400G1H5028 + 0.300GHO500T + 0.300GHK500e                 : ARR( 0.162E-13, -1400., 0.0);
+{  8679} G2H501D +PERO3              =  0.460G1H5028 + 0.270GHO500T + 0.270GHK500e                 : ARR( 0.488E-13, -1250., 0.0);
+{  8680} G2H501D +PERO5              =  0.460G1H5028 + 0.270GHO500T + 0.270GHK500e                 : ARR( 0.183E-11,   450., 0.0);
+{  8681} G2H501D +PERO6              =  0.300G1H5028 + 0.350GHO500T + 0.350GHK500e                 : ARR( 0.168E-13, -1300., 0.0);
+{  8682} G2H501D +PERO9              =  0.650G1H5028 + 0.350GHK500e                                : ARR( 0.100E-10,     0., 0.0);
+{  8683} G1H5028                     =       GHD3003 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  8684} GHN500z +GHO                =       GHN503H +      GHO2                                   : ARR( 0.134E-10,     0., 0.0);
+{  8685} GHN500z +GHO                =       GNK500S +      GHO                                    : ARR( 0.530E-11,     0., 0.0);
+{  8686} GHN500z +GHO                =       G2N502p                                               : ARR( 0.200E-11,  -190., 0.0);
+{  8687} GHN500z+HV               =       G3K3001 +      GND2000 +      GHO                     :  0.100E+01*SUN;
+{  8688} GHN500z+HV               =       G1N503B +      GHO                                    :  0.100E+01*SUN;
+{  8689} GHN500z+HV               =       G1H5029 +      GNO2                                   :  0.100E+01*SUN;
+{  8690} G2N502p +GNO                =       G1N503B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8691} G2N502p +GNO                =       GNN502J                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8692} G2N502p +GHO2               =       GHN500z                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8693} G2N502p +GNO3               =       G1N503B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8694} G2N502p +MEPERO             =  0.340G1N503B + 0.330GNK500O + 0.330GNK500S                 : ARR( 0.565E-13,  -845., 0.0);
+{  8695} G2N502p +PERO1              =  0.460G1N503B + 0.270GNK500O + 0.270GNK500S                 : ARR( 0.434E-13,  -900., 0.0);
+{  8696} G2N502p +PERO2              =  0.400G1N503B + 0.300GNK500O + 0.300GNK500S                 : ARR( 0.162E-13, -1400., 0.0);
+{  8697} G2N502p +PERO3              =  0.460G1N503B + 0.270GNK500O + 0.270GNK500S                 : ARR( 0.488E-13, -1250., 0.0);
+{  8698} G2N502p +PERO5              =  0.460G1N503B + 0.270GNK500O + 0.270GNK500S                 : ARR( 0.183E-11,   450., 0.0);
+{  8699} G2N502p +PERO6              =  0.300G1N503B + 0.350GNK500O + 0.350GNK500S                 : ARR( 0.168E-13, -1300., 0.0);
+{  8700} G2N502p +PERO9              =  0.650G1N503B + 0.350GNK500S                                : ARR( 0.100E-10,     0., 0.0);
+{  8701} G1N503B                     =       G3K3001 +      GND2000                                : ARR( 0.200E+15,  3003., 0.0);
+{  8702} G1H5029 +OXYGEN             =       GHD500Q +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{  8703} G1H5029                     =       GDK4005 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5784., 0.0);
+{  8704} GHN4001 +GHO                =       GND4004 +      GHO                                    : ARR( 0.266E-10,     0., 0.0);
+{  8705} GHN4001 +GHO                =       G3H4002                                               : ARR( 0.211E-10,     0., 0.0);
+{  8706} GHN4001 +GHO                =       G2N400I                                               : ARR( 0.193E-11,  -190., 0.0);
+{  8707} GHN4001 +GNO3               =       G3H4002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8708} GHN4001+HV               =       G1H400F +      GNO2                                   :  0.100E+01*SUN;
+{  8709} GHN4001+HV               =       G1N400J +      GHO                                    :  0.100E+01*SUN;
+{  8710} GHN4001+HV               =       G2H3001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8711} GHN4001+HV               =       GDD2000 +      GD02000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{  8712} G3H4002 +GHO2               =  0.800GGH4002 + 0.200GAH4003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8713} G3H4002 +GNO                =       G2H3001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8714} G3H4002 +GNO2               =       GPH4002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8715} G3H4002 +GNO3               =       G2H3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8716} G3H4002 +MEPERO             =  0.685G2H3001 + 0.315GAH4003 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8717} G3H4002 +PERO1              =  0.800G2H3001 + 0.200GAH4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8718} G3H4002 +PERO2              =  0.750G2H3001 + 0.250GAH4003 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8719} G3H4002 +PERO3              =  0.800G2H3001 + 0.200GAH4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8720} G3H4002 +PERO5              =  0.650G2H3001 + 0.350GAH4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8721} G3H4002 +PERO6              =  0.650G2H3001 + 0.350GAH4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8722} G3H4002 +PERO9              =       G2H3001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8723} G2N400I +GNO                =       G1N400J +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8724} G2N400I +GNO                =       GNN4001                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8725} G2N400I +GHO2               =       GHN4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8726} G2N400I +GNO3               =       G1N400J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8727} G2N400I +MEPERO             =  0.340G1N400J + 0.330GND4003 + 0.330GND4004                 : ARR( 0.565E-13,  -845., 0.0);
+{  8728} G2N400I +PERO1              =  0.460G1N400J + 0.270GND4003 + 0.270GND4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  8729} G2N400I +PERO2              =  0.400G1N400J + 0.300GND4003 + 0.300GND4004                 : ARR( 0.162E-13, -1400., 0.0);
+{  8730} G2N400I +PERO3              =  0.460G1N400J + 0.270GND4003 + 0.270GND4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  8731} G2N400I +PERO5              =  0.460G1N400J + 0.270GND4003 + 0.270GND4004                 : ARR( 0.183E-11,   450., 0.0);
+{  8732} G2N400I +PERO6              =  0.300G1N400J + 0.350GND4003 + 0.350GND4004                 : ARR( 0.168E-13, -1300., 0.0);
+{  8733} G2N400I +PERO9              =  0.650G1N400J + 0.350GND4004                                : ARR( 0.100E-10,     0., 0.0);
+{  8734} G1H400F +OXYGEN             =       GHD400C +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{  8735} G1H400F                     =       GDD3000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5636., 0.0);
+{  8736} GHH500C +GHO                =       GHH5011 +      GHO2                                   : ARR( 0.818E-11,     0., 0.0);
+{  8737} GHH500C +GHO                =       GHK500B +      GHO                                    : ARR( 0.839E-10,     0., 0.0);
+{  8738} GHH500C +GHO                =       G2H500C                                               : ARR( 0.387E-11,  -190., 0.0);
+{  8739} GHH500C+HV               =       G1H500H +      GHO                                    :  0.200E+01*SUN;
+{  8740} GHO500I +GHO                =       GHD500Y +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{  8741} GHO500I +GHO                =       GHK500B +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  8742} GHO500I +GHO                =       GKO500A +      GHO                                    : ARR( 0.424E-10,     0., 0.0);
+{  8743} GHO500I +GHO                =       GHD5006 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{  8744} GHO500I +GHO                =       G2O500F                                               : ARR( 0.196E-11,  -190., 0.0);
+{  8745} GHO500I+HV               =       G1O500J +      GHO                                    :  0.100E+01*SUN;
+{  8746} GHK500B +GHO                =       GKK5005 +      GHO                                    : ARR( 0.142E-09,     0., 0.0);
+{  8747} GHK500B+HV               =       G3K2001 +      G2H3004                                :  0.100E+01*SUN;
+{  8748} GHK500B+HV               =       GKO3000 +      GHD2000                                :  0.100E+01*SUN;
+{  8749} GHK500B+HV               =       G1K500E +      GHO                                    :  0.100E+01*SUN;
+{  8750} GHD5006 +GHO                =       GHD500Z +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{  8751} GHD5006 +GHO                =       GHD500a +      GHO2                                   : ARR( 0.103E-10,     0., 0.0);
+{  8752} GHD5006 +GHO                =       G2H501E                                               : ARR( 0.450E-11,     0., 0.0);
+{  8753} GHD5006 +GHO                =       GDK5005 +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{  8754} GHD5006 +GHO                =       G3H5008                                               : ARR( 0.209E-10,     0., 0.0);
+{  8755} GHD5006 +GHO                =       G2D5003                                               : ARR( 0.191E-11,  -190., 0.0);
+{  8756} GHD5006 +GNO3               =       G3H5008 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8757} GHD5006+HV               =       G1D5005 +      GHO                                    :  0.100E+01*SUN;
+{  8758} GHD5006+HV               =       GDO4002 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{  8759} G2H501E +GNO                =       G1H502A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8760} G2H501E +GNO                =       GHN5037                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8761} G2H501E +GHO2               =       GHH5018                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8762} G2H501E +GNO3               =       G1H502A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8763} G2H501E +MEPERO             =  0.340G1H502A + 0.330GHD500b + 0.330GHD500c                 : ARR( 0.565E-13,  -845., 0.0);
+{  8764} G2H501E +PERO1              =  0.460G1H502A + 0.270GHD500b + 0.270GHD500c                 : ARR( 0.434E-13,  -900., 0.0);
+{  8765} G2H501E +PERO2              =  0.400G1H502A + 0.300GHD500b + 0.300GHD500c                 : ARR( 0.162E-13, -1400., 0.0);
+{  8766} G2H501E +PERO3              =  0.460G1H502A + 0.270GHD500b + 0.270GHD500c                 : ARR( 0.488E-13, -1250., 0.0);
+{  8767} G2H501E +PERO5              =  0.460G1H502A + 0.270GHD500b + 0.270GHD500c                 : ARR( 0.183E-11,   450., 0.0);
+{  8768} G2H501E +PERO6              =  0.300G1H502A + 0.350GHD500b + 0.350GHD500c                 : ARR( 0.168E-13, -1300., 0.0);
+{  8769} G2H501E +PERO9              =  0.650G1H502A + 0.350GHD500c                                : ARR( 0.100E-10,     0., 0.0);
+{  8770} G3H5008 +GHO2               =  0.800GGH500A + 0.200GAH500A + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8771} G3H5008 +GNO                =       GDO4002 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  8772} G3H5008 +GNO2               =       GPH500A                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8773} G3H5008 +GNO3               =       GDO4002 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  8774} G3H5008 +MEPERO             =  0.685GDO4002 + 0.315GAH500A + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8775} G3H5008 +PERO1              =  0.800GDO4002 + 0.200GAH500A + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8776} G3H5008 +PERO2              =  0.750GDO4002 + 0.250GAH500A + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8777} G3H5008 +PERO3              =  0.800GDO4002 + 0.200GAH500A + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8778} G3H5008 +PERO5              =  0.650GDO4002 + 0.350GAH500A + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8779} G3H5008 +PERO6              =  0.650GDO4002 + 0.350GAH500A + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  8780} G3H5008 +PERO9              =       GDO4002 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  8781} G1H502A                     =       GDO2000 +      GHD3004 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{  8782} GHD4000 +GHO                =       GDK4001 +      GHO                                    : ARR( 0.138E-09,     0., 0.0);
+{  8783} GHD4000 +GHO                =       G3H4003                                               : ARR( 0.220E-10,     0., 0.0);
+{  8784} GHD4000 +GNO3               =       G3H4003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8785} GHD4000+HV               =       G1D4001 +      GHO                                    :  0.100E+01*SUN;
+{  8786} GHD4000+HV               =       G2H3004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8787} GHD4000+HV               =       GHD2000 +      GD02000                                :  0.100E+01*SUN;
+{  8788} G3H4003 +GHO2               =  0.800GGH4006 + 0.200GAH4007 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8789} G3H4003 +GNO                =       G2H3004 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8790} G3H4003 +GNO2               =       GPH4007                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8791} G3H4003 +GNO3               =       G2H3004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8792} G3H4003 +MEPERO             =  0.685G2H3004 + 0.315GAH4007 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8793} G3H4003 +PERO1              =  0.800G2H3004 + 0.200GAH4007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8794} G3H4003 +PERO2              =  0.750G2H3004 + 0.250GAH4007 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8795} G3H4003 +PERO3              =  0.800G2H3004 + 0.200GAH4007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8796} G3H4003 +PERO5              =  0.650G2H3004 + 0.350GAH4007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8797} G3H4003 +PERO6              =  0.650G2H3004 + 0.350GAH4007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8798} G3H4003 +PERO9              =       G2H3004 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8799} GHN5011 +GHO                =       GHN5021 +      GHO2                                   : ARR( 0.433E-11,     0., 0.0);
+{  8800} GHN5011 +GHO                =       GNK500J +      GHO                                    : ARR( 0.444E-10,     0., 0.0);
+{  8801} GHN5011 +GHO                =       G2N500m                                               : ARR( 0.205E-11,  -190., 0.0);
+{  8802} GHN5011+HV               =       G1N500o +      GHO                                    :  0.100E+01*SUN;
+{  8803} GHN5011+HV               =       G1H502B +      GNO2                                   :  0.100E+01*SUN;
+{  8804} G1H502B                     =       GKO500A +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{  8805} G1H502B                     =       GHD4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  8806} GHN5012 +GHO                =       GHN501C +      GHO2                                   : ARR( 0.433E-11,     0., 0.0);
+{  8807} GHN5012 +GHO                =       GNK500O +      GHO                                    : ARR( 0.444E-10,     0., 0.0);
+{  8808} GHN5012 +GHO                =       G2N500n                                               : ARR( 0.205E-11,  -190., 0.0);
+{  8809} GHN5012+HV               =       G1N500p +      GHO                                    :  0.100E+01*SUN;
+{  8810} GHN5012+HV               =       G1H502C +      GNO2                                   :  0.100E+01*SUN;
+{  8811} G1H502C                     =       G2H501F                                               : ARR( 0.160E+12,  3000., 0.0);
+{  8812} G1H502C                     =       GHD4006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  8813} G2H501F +GNO                =       G1H502D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8814} G2H501F +GNO                =       GHN503j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8815} G2H501F +GHO2               =       GHH5016                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8816} G2H501F +GNO3               =       G1H502D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8817} G2H501F +MEPERO             =  0.340G1H502D + 0.330GHO500U + 0.330GHK500f                 : ARR( 0.565E-13,  -845., 0.0);
+{  8818} G2H501F +PERO1              =  0.460G1H502D + 0.270GHO500U + 0.270GHK500f                 : ARR( 0.434E-13,  -900., 0.0);
+{  8819} G2H501F +PERO2              =  0.400G1H502D + 0.300GHO500U + 0.300GHK500f                 : ARR( 0.162E-13, -1400., 0.0);
+{  8820} G2H501F +PERO3              =  0.460G1H502D + 0.270GHO500U + 0.270GHK500f                 : ARR( 0.488E-13, -1250., 0.0);
+{  8821} G2H501F +PERO5              =  0.460G1H502D + 0.270GHO500U + 0.270GHK500f                 : ARR( 0.183E-11,   450., 0.0);
+{  8822} G2H501F +PERO6              =  0.300G1H502D + 0.350GHO500U + 0.350GHK500f                 : ARR( 0.168E-13, -1300., 0.0);
+{  8823} G2H501F +PERO9              =  0.650G1H502D + 0.350GHK500f                                : ARR( 0.100E-10,     0., 0.0);
+{  8824} G1H502D                     =       GHD500H +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  8825} G1H502D                     =       GDO3002 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{  8826} G1H502D                     =       GHD400A +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{  8827} GNO500N +GHO                =       GND500E +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{  8828} GNO500N +GHO                =       G2N502q                                               : ARR( 0.145E-11,     0., 0.0);
+{  8829} GNO500N +GHO                =       GNK500O +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  8830} GNO500N +GHO                =       GNK500R +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{  8831} GNO500N+HV               =       G1O500X +      GNO2                                   :  0.100E+01*SUN;
+{  8832} G2N502q +GNO                =       G1N503C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8833} G2N502q +GNO                =       GNN501p                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8834} G2N502q +GHO2               =       GHN503k                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8835} G2N502q +GNO3               =       G1N503C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8836} G2N502q +MEPERO             =  0.340G1N503C + 0.330GNO500Y + 0.330GNK500t                 : ARR( 0.565E-13,  -845., 0.0);
+{  8837} G2N502q +PERO1              =  0.460G1N503C + 0.270GNO500Y + 0.270GNK500t                 : ARR( 0.434E-13,  -900., 0.0);
+{  8838} G2N502q +PERO2              =  0.400G1N503C + 0.300GNO500Y + 0.300GNK500t                 : ARR( 0.162E-13, -1400., 0.0);
+{  8839} G2N502q +PERO3              =  0.460G1N503C + 0.270GNO500Y + 0.270GNK500t                 : ARR( 0.488E-13, -1250., 0.0);
+{  8840} G2N502q +PERO5              =  0.460G1N503C + 0.270GNO500Y + 0.270GNK500t                 : ARR( 0.183E-11,   450., 0.0);
+{  8841} G2N502q +PERO6              =  0.300G1N503C + 0.350GNO500Y + 0.350GNK500t                 : ARR( 0.168E-13, -1300., 0.0);
+{  8842} G2N502q +PERO9              =  0.650G1N503C + 0.350GNK500t                                : ARR( 0.100E-10,     0., 0.0);
+{  8843} G1O500X                     =       G2O500S                                               : ARR( 0.160E+12,  3000., 0.0);
+{  8844} G1O500X                     =       GDO4003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  8845} G1N503C                     =       GDO2000 +      GND3002 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  8846} G2O500S +GNO                =       G1O500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8847} G2O500S +GNO                =       GNO500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8848} G2O500S +GHO2               =       GHO500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8849} G2O500S +GNO3               =       G1O500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8850} G2O500S +MEPERO             =  0.340G1O500Y + 0.330GOO500D + 0.330GKO500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  8851} G2O500S +PERO1              =  0.460G1O500Y + 0.270GOO500D + 0.270GKO500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  8852} G2O500S +PERO2              =  0.400G1O500Y + 0.300GOO500D + 0.300GKO500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  8853} G2O500S +PERO3              =  0.460G1O500Y + 0.270GOO500D + 0.270GKO500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  8854} G2O500S +PERO5              =  0.460G1O500Y + 0.270GOO500D + 0.270GKO500L                 : ARR( 0.183E-11,   450., 0.0);
+{  8855} G2O500S +PERO6              =  0.300G1O500Y + 0.350GOO500D + 0.350GKO500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  8856} G2O500S +PERO9              =  0.650G1O500Y + 0.350GKO500L                                : ARR( 0.100E-10,     0., 0.0);
+{  8857} G1O500Y                     =       GDO3002 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  8858} GNK500O +GHO                =       GND500F +      GHO2                                   : ARR( 0.131E-10,     0., 0.0);
+{  8859} GNK500O +GHO                =       G2N502r                                               : ARR( 0.886E-12,     0., 0.0);
+{  8860} GNK500O +GHO                =       GNK500S +      GHO2                                   : ARR( 0.129E-11,     0., 0.0);
+{  8861} GNK500O+HV               =       G3K3001 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{  8862} GNK500O+HV               =       G1K500a +      GNO2                                   :  0.100E+01*SUN;
+{  8863} G2N502r +GNO                =       G1N503D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8864} G2N502r +GNO                =       GNN501q                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8865} G2N502r +GHO2               =       GHN503l                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8866} G2N502r +GNO3               =       G1N503D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8867} G2N502r +MEPERO             =  0.340G1N503D + 0.330GNK500l + 0.330GNK500u                 : ARR( 0.565E-13,  -845., 0.0);
+{  8868} G2N502r +PERO1              =  0.460G1N503D + 0.270GNK500l + 0.270GNK500u                 : ARR( 0.434E-13,  -900., 0.0);
+{  8869} G2N502r +PERO2              =  0.400G1N503D + 0.300GNK500l + 0.300GNK500u                 : ARR( 0.162E-13, -1400., 0.0);
+{  8870} G2N502r +PERO3              =  0.460G1N503D + 0.270GNK500l + 0.270GNK500u                 : ARR( 0.488E-13, -1250., 0.0);
+{  8871} G2N502r +PERO5              =  0.460G1N503D + 0.270GNK500l + 0.270GNK500u                 : ARR( 0.183E-11,   450., 0.0);
+{  8872} G2N502r +PERO6              =  0.300G1N503D + 0.350GNK500l + 0.350GNK500u                 : ARR( 0.168E-13, -1300., 0.0);
+{  8873} G2N502r +PERO9              =  0.650G1N503D + 0.350GNK500u                                : ARR( 0.100E-10,     0., 0.0);
+{  8874} G1K500a                     =       GDK4005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{  8875} G1N503D                     =       GDO2000 +      G3N3002                                : ARR( 0.200E+15,  3031., 0.0);
+{  8876} GND4003 +GHO                =       GND4004 +      GHO2                                   : ARR( 0.678E-11,     0., 0.0);
+{  8877} GND4003 +GHO                =       G3N4001                                               : ARR( 0.216E-10,     0., 0.0);
+{  8878} GND4003 +GNO3               =       G3N4001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8879} GND4003+HV               =       G1D4005 +      GNO2                                   :  0.100E+01*SUN;
+{  8880} GND4003+HV               =       G2N3003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8881} GND4003+HV               =       GND2000 +      GD02000                                :  0.100E+01*SUN;
+{  8882} G1D4005                     =       GDD3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{  8883} GND500C +GHO                =       G2N502s                                               : ARR( 0.273E-11,     0., 0.0);
+{  8884} GND500C +GHO                =       G2N502t                                               : ARR( 0.273E-11,     0., 0.0);
+{  8885} GND500C +GHO                =       G3N500E                                               : ARR( 0.208E-10,     0., 0.0);
+{  8886} GND500C +GNO3               =       G3N500E +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  8887} GND500C+HV               =       G1D500N +      GNO2                                   :  0.100E+01*SUN;
+{  8888} GND500C+HV               =       G3N2000 +      G2D3001                                :  0.100E+01*SUN;
+{  8889} GND500C+HV               =       G2N400J +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  8890} G2N502s +GNO                =       G1N503E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8891} G2N502s +GNO                =       GNN5026                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8892} G2N502s +GHO2               =       GHN503m                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8893} G2N502s +GNO3               =       G1N503E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8894} G2N502s +MEPERO             =  0.340G1N503E + 0.330GND500n + 0.330GND500k                 : ARR( 0.565E-13,  -845., 0.0);
+{  8895} G2N502s +PERO1              =  0.460G1N503E + 0.270GND500n + 0.270GND500k                 : ARR( 0.434E-13,  -900., 0.0);
+{  8896} G2N502s +PERO2              =  0.400G1N503E + 0.300GND500n + 0.300GND500k                 : ARR( 0.162E-13, -1400., 0.0);
+{  8897} G2N502s +PERO3              =  0.460G1N503E + 0.270GND500n + 0.270GND500k                 : ARR( 0.488E-13, -1250., 0.0);
+{  8898} G2N502s +PERO5              =  0.460G1N503E + 0.270GND500n + 0.270GND500k                 : ARR( 0.183E-11,   450., 0.0);
+{  8899} G2N502s +PERO6              =  0.300G1N503E + 0.350GND500n + 0.350GND500k                 : ARR( 0.168E-13, -1300., 0.0);
+{  8900} G2N502s +PERO9              =  0.650G1N503E + 0.350GND500k                                : ARR( 0.100E-10,     0., 0.0);
+{  8901} G2N502t +GNO                =       G1N503F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8902} G2N502t +GNO                =       GNN501m                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8903} G2N502t +GHO2               =       GHN503n                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8904} G2N502t +GNO3               =       G1N503F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8905} G2N502t +MEPERO             =  0.340G1N503F + 0.330GND500o + 0.330GND500g                 : ARR( 0.565E-13,  -845., 0.0);
+{  8906} G2N502t +PERO1              =  0.460G1N503F + 0.270GND500o + 0.270GND500g                 : ARR( 0.434E-13,  -900., 0.0);
+{  8907} G2N502t +PERO2              =  0.400G1N503F + 0.300GND500o + 0.300GND500g                 : ARR( 0.162E-13, -1400., 0.0);
+{  8908} G2N502t +PERO3              =  0.460G1N503F + 0.270GND500o + 0.270GND500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  8909} G2N502t +PERO5              =  0.460G1N503F + 0.270GND500o + 0.270GND500g                 : ARR( 0.183E-11,   450., 0.0);
+{  8910} G2N502t +PERO6              =  0.300G1N503F + 0.350GND500o + 0.350GND500g                 : ARR( 0.168E-13, -1300., 0.0);
+{  8911} G2N502t +PERO9              =  0.650G1N503F + 0.350GND500g                                : ARR( 0.100E-10,     0., 0.0);
+{  8912} G3N500E +GHO2               =  0.800GGN500I + 0.200GAN500E + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8913} G3N500E +GNO                =       G2N400J +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8914} G3N500E +GNO2               =       GPN500B                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8915} G3N500E +GNO3               =       G2N400J +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8916} G3N500E +MEPERO             =  0.685G2N400J + 0.315GAN500E + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8917} G3N500E +PERO1              =  0.800G2N400J + 0.200GAN500E + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8918} G3N500E +PERO2              =  0.750G2N400J + 0.250GAN500E + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8919} G3N500E +PERO3              =  0.800G2N400J + 0.200GAN500E + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8920} G3N500E +PERO5              =  0.650G2N400J + 0.350GAN500E + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8921} G3N500E +PERO6              =  0.650G2N400J + 0.350GAN500E + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8922} G3N500E +PERO9              =       G2N400J +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8923} G1D500N                     =       G3D4000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  8924} G2N400J +GNO                =       G1N400K +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  8925} G2N400J +GNO                =       GNN400C                                               : ARR( 0.111E-12,  -360., 0.0);
+{  8926} G2N400J +GHO2               =       GHN400Q                                               : ARR( 0.214E-12, -1250., 0.0);
+{  8927} G2N400J +GNO3               =       G1N400K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8928} G2N400J +MEPERO             =  0.480G1N400K + 0.260GNK4004 + 0.260GND4004                 : ARR( 0.146E-12,  -445., 0.0);
+{  8929} G2N400J +PERO1              =  0.600G1N400K + 0.200GNK4004 + 0.200GND4004                 : ARR( 0.112E-12,  -500., 0.0);
+{  8930} G2N400J +PERO2              =  0.560G1N400K + 0.220GNK4004 + 0.220GND4004                 : ARR( 0.418E-13, -1000., 0.0);
+{  8931} G2N400J +PERO3              =  0.600G1N400K + 0.200GNK4004 + 0.200GND4004                 : ARR( 0.126E-12,  -850., 0.0);
+{  8932} G2N400J +PERO5              =  0.600G1N400K + 0.200GNK4004 + 0.200GND4004                 : ARR( 0.473E-11,   850., 0.0);
+{  8933} G2N400J +PERO6              =  0.460G1N400K + 0.270GNK4004 + 0.270GND4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  8934} G2N400J +PERO9              =  0.800G1N400K + 0.200GND4004                                : ARR( 0.100E-10,     0., 0.0);
+{  8935} G1N503E                     =       G3N2000 +      GDD3000                                : ARR( 0.200E+15,  2252., 0.0);
+{  8936} G1N503F                     =       GND4004 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5054., 0.0);
+{  8937} G3D4000 +GHO2               =  0.800GGD4000 + 0.200GAD4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8938} G3D4000 +GNO                =       G2D3001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8939} G3D4000 +GNO2               =       GPD4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8940} G3D4000 +GNO3               =       G2D3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8941} G3D4000 +MEPERO             =  0.685G2D3001 + 0.315GAD4000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8942} G3D4000 +PERO1              =  0.800G2D3001 + 0.200GAD4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8943} G3D4000 +PERO2              =  0.750G2D3001 + 0.250GAD4000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8944} G3D4000 +PERO3              =  0.800G2D3001 + 0.200GAD4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8945} G3D4000 +PERO5              =  0.650G2D3001 + 0.350GAD4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8946} G3D4000 +PERO6              =  0.650G2D3001 + 0.350GAD4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8947} G3D4000 +PERO9              =       G2D3001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8948} G1N400K +OXYGEN             =       GND4004 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{  8949} GHN5013 +GHO                =       GNK500Q +      GHO                                    : ARR( 0.139E-09,     0., 0.0);
+{  8950} GHN5013+HV               =       G1N500q +      GHO                                    :  0.100E+01*SUN;
+{  8951} GHN5013+HV               =       G3H4003 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8952} GHN5013+HV               =       GHD2000 +      GNK3000                                :  0.100E+01*SUN;
+{  8953} GHN5013+HV               =       G1H502E +      GNO2                                   :  0.100E+01*SUN;
+{  8954} G1H502E                     =       G3H4003 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  8955} GNK500P +GHO                =       GND500o +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{  8956} GNK500P +GHO                =       GNK500Q +      GHO2                                   : ARR( 0.337E-10,     0., 0.0);
+{  8957} GNK500P+HV               =       G3K4005 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8958} GNK500P+HV               =       GDO2000 +      GNK3000                                :  0.100E+01*SUN;
+{  8959} GNK500P+HV               =       G1K500b +      GNO2                                   :  0.100E+01*SUN;
+{  8960} G1K500b                     =       G3K4005 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  8961} GNK500Q +GHO                =       GND500g +      GHO2                                   : ARR( 0.259E-11,     0., 0.0);
+{  8962} GNK500Q +GHO                =       G2N502u                                               : ARR( 0.555E-12,     0., 0.0);
+{  8963} GNK500Q+HV               =       G3K2001 +      G2N3005                                :  0.100E+01*SUN;
+{  8964} GNK500Q+HV               =       G3K4007 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8965} GNK500Q+HV               =       G1K500c +      GNO2                                   :  0.100E+01*SUN;
+{  8966} G2N502u +GNO                =       G1N503G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8967} G2N502u +GNO                =       GNN502F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  8968} G2N502u +GHO2               =       GHN503o                                               : ARR( 0.242E-12, -1250., 0.0);
+{  8969} G2N502u +GNO3               =       G1N503G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  8970} G2N502u +MEPERO             =  0.340G1N503G + 0.330GNK500y + 0.330GNK500z                 : ARR( 0.565E-13,  -845., 0.0);
+{  8971} G2N502u +PERO1              =  0.460G1N503G + 0.270GNK500y + 0.270GNK500z                 : ARR( 0.434E-13,  -900., 0.0);
+{  8972} G2N502u +PERO2              =  0.400G1N503G + 0.300GNK500y + 0.300GNK500z                 : ARR( 0.162E-13, -1400., 0.0);
+{  8973} G2N502u +PERO3              =  0.460G1N503G + 0.270GNK500y + 0.270GNK500z                 : ARR( 0.488E-13, -1250., 0.0);
+{  8974} G2N502u +PERO5              =  0.460G1N503G + 0.270GNK500y + 0.270GNK500z                 : ARR( 0.183E-11,   450., 0.0);
+{  8975} G2N502u +PERO6              =  0.300G1N503G + 0.350GNK500y + 0.350GNK500z                 : ARR( 0.168E-13, -1300., 0.0);
+{  8976} G2N502u +PERO9              =  0.650G1N503G + 0.350GNK500z                                : ARR( 0.100E-10,     0., 0.0);
+{  8977} G3K4007 +GHO2               =  0.800GGK4003 + 0.200GAK4003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  8978} G3K4007 +GNO                =       G2K3001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  8979} G3K4007 +GNO2               =       GPK4003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  8980} G3K4007 +GNO3               =       G2K3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  8981} G3K4007 +MEPERO             =  0.685G2K3001 + 0.315GAK4003 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8982} G3K4007 +PERO1              =  0.800G2K3001 + 0.200GAK4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8983} G3K4007 +PERO2              =  0.750G2K3001 + 0.250GAK4003 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8984} G3K4007 +PERO3              =  0.800G2K3001 + 0.200GAK4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8985} G3K4007 +PERO5              =  0.650G2K3001 + 0.350GAK4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8986} G3K4007 +PERO6              =  0.650G2K3001 + 0.350GAK4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  8987} G3K4007 +PERO9              =       G2K3001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  8988} G1K500c                     =       G3K4007 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{  8989} G1N503G                     =       G3K2001 +      GND3003                                : ARR( 0.200E+15,  4599., 0.0);
+{  8990} G1N503G                     =       GDK3001 +      G3N2000                                : ARR( 0.200E+15,  4480., 0.0);
+{  8991} GHN5014 +GHO                =       GHN503m +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{  8992} GHN5014 +GHO                =       G2H501G                                               : ARR( 0.450E-11,     0., 0.0);
+{  8993} GHN5014 +GHO                =       GNK500S +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{  8994} GHN5014 +GHO                =       G2N500p                                               : ARR( 0.191E-11,  -190., 0.0);
+{  8995} GHN5014+HV               =       G1N500r +      GHO                                    :  0.100E+01*SUN;
+{  8996} GHN5014+HV               =       G3H4004 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  8997} GHN5014+HV               =       G1H502F +      GNO2                                   :  0.100E+01*SUN;
+{  8998} G2H501G +GNO                =       G1H502G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  8999} G2H501G +GNO                =       GHN502j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9000} G2H501G +GHO2               =       GHH501B                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9001} G2H501G +GNO3               =       G1H502G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9002} G2H501G +MEPERO             =  0.340G1H502G + 0.330GHN503p + 0.330GHN503o                 : ARR( 0.565E-13,  -845., 0.0);
+{  9003} G2H501G +PERO1              =  0.460G1H502G + 0.270GHN503p + 0.270GHN503o                 : ARR( 0.434E-13,  -900., 0.0);
+{  9004} G2H501G +PERO2              =  0.400G1H502G + 0.300GHN503p + 0.300GHN503o                 : ARR( 0.162E-13, -1400., 0.0);
+{  9005} G2H501G +PERO3              =  0.460G1H502G + 0.270GHN503p + 0.270GHN503o                 : ARR( 0.488E-13, -1250., 0.0);
+{  9006} G2H501G +PERO5              =  0.460G1H502G + 0.270GHN503p + 0.270GHN503o                 : ARR( 0.183E-11,   450., 0.0);
+{  9007} G2H501G +PERO6              =  0.300G1H502G + 0.350GHN503p + 0.350GHN503o                 : ARR( 0.168E-13, -1300., 0.0);
+{  9008} G2H501G +PERO9              =  0.650G1H502G + 0.350GHN503o                                : ARR( 0.100E-10,     0., 0.0);
+{  9009} G3H4004 +GHO2               =  0.800GGH4007 + 0.200GAH4008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9010} G3H4004 +GNO                =       GDO3000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  9011} G3H4004 +GNO2               =       GPH4008                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9012} G3H4004 +GNO3               =       GDO3000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  9013} G3H4004 +MEPERO             =  0.685GDO3000 + 0.315GAH4008 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9014} G3H4004 +PERO1              =  0.800GDO3000 + 0.200GAH4008 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9015} G3H4004 +PERO2              =  0.750GDO3000 + 0.250GAH4008 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9016} G3H4004 +PERO3              =  0.800GDO3000 + 0.200GAH4008 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9017} G3H4004 +PERO5              =  0.650GDO3000 + 0.350GAH4008 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9018} G3H4004 +PERO6              =  0.650GDO3000 + 0.350GAH4008 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9019} G3H4004 +PERO9              =       GDO3000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9020} G1H502F                     =       G3H4004 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{  9021} G1H502G                     =       GCH2O   +      GHN400R +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  9022} G1H502G                     =       GDO2000 +      GND3003 +      GHO                     : ARR( 0.200E+15,  4976., 0.0);
+{  9023} GNK500R +GHO                =       GND500n +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{  9024} GNK500R +GHO                =       G2N502v                                               : ARR( 0.457E-11,     0., 0.0);
+{  9025} GNK500R +GHO                =       GNK500S +      GHO2                                   : ARR( 0.641E-11,     0., 0.0);
+{  9026} GNK500R+HV               =       G3K4006 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{  9027} GNK500R+HV               =       G1K500d +      GNO2                                   :  0.100E+01*SUN;
+{  9028} G2N502v +GNO                =       G1N503H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9029} G2N502v +GNO                =       GNN501r                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9030} G2N502v +GHO2               =       GHN503q                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9031} G2N502v +GNO3               =       G1N503H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9032} G2N502v +MEPERO             =  0.340G1N503H + 0.330GNK5011 + 0.330GNK500y                 : ARR( 0.565E-13,  -845., 0.0);
+{  9033} G2N502v +PERO1              =  0.460G1N503H + 0.270GNK5011 + 0.270GNK500y                 : ARR( 0.434E-13,  -900., 0.0);
+{  9034} G2N502v +PERO2              =  0.400G1N503H + 0.300GNK5011 + 0.300GNK500y                 : ARR( 0.162E-13, -1400., 0.0);
+{  9035} G2N502v +PERO3              =  0.460G1N503H + 0.270GNK5011 + 0.270GNK500y                 : ARR( 0.488E-13, -1250., 0.0);
+{  9036} G2N502v +PERO5              =  0.460G1N503H + 0.270GNK5011 + 0.270GNK500y                 : ARR( 0.183E-11,   450., 0.0);
+{  9037} G2N502v +PERO6              =  0.300G1N503H + 0.350GNK5011 + 0.350GNK500y                 : ARR( 0.168E-13, -1300., 0.0);
+{  9038} G2N502v +PERO9              =  0.650G1N503H + 0.350GNK500y                                : ARR( 0.100E-10,     0., 0.0);
+{  9039} G1K500d                     =       G3K4006 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{  9040} G1N503H                     =       GCH2O   +      GND400E +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{  9041} G1N503H                     =       GDO2000 +      GND3003 +      GHO2                    : ARR( 0.200E+15,  3768., 0.0);
+{  9042} GNK500S +GHO                =       GND500k +      GHO2                                   : ARR( 0.129E-10,     0., 0.0);
+{  9043} GNK500S +GHO                =       G2N502w                                               : ARR( 0.872E-12,     0., 0.0);
+{  9044} GNK500S+HV               =       G3K3001 +      G3N2000                                :  0.100E+01*SUN;
+{  9045} GNK500S+HV               =       G1K500e +      GNO2                                   :  0.100E+01*SUN;
+{  9046} G2N502w +GNO                =       G1N503I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9047} G2N502w +GNO                =       GNN501s                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9048} G2N502w +GHO2               =       GHN503r                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9049} G2N502w +GNO3               =       G1N503I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9050} G2N502w +MEPERO             =  0.340G1N503I + 0.330GNK5012 + 0.330GNK500z                 : ARR( 0.565E-13,  -845., 0.0);
+{  9051} G2N502w +PERO1              =  0.460G1N503I + 0.270GNK5012 + 0.270GNK500z                 : ARR( 0.434E-13,  -900., 0.0);
+{  9052} G2N502w +PERO2              =  0.400G1N503I + 0.300GNK5012 + 0.300GNK500z                 : ARR( 0.162E-13, -1400., 0.0);
+{  9053} G2N502w +PERO3              =  0.460G1N503I + 0.270GNK5012 + 0.270GNK500z                 : ARR( 0.488E-13, -1250., 0.0);
+{  9054} G2N502w +PERO5              =  0.460G1N503I + 0.270GNK5012 + 0.270GNK500z                 : ARR( 0.183E-11,   450., 0.0);
+{  9055} G2N502w +PERO6              =  0.300G1N503I + 0.350GNK5012 + 0.350GNK500z                 : ARR( 0.168E-13, -1300., 0.0);
+{  9056} G2N502w +PERO9              =  0.650G1N503I + 0.350GNK500z                                : ARR( 0.100E-10,     0., 0.0);
+{  9057} G1K500e                     =       G3K3001 +      GCH2O   +      GCO                     : ARR( 0.200E+15,  3897., 0.0);
+{  9058} G1N503I                     =       GDO2000 +      G3N2000 +      GCO                     : ARR( 0.200E+15,  3326., 0.0);
+{  9059} GGO4001 +GHO                =       GGD4000 +      GHO2                                   : ARR( 0.408E-11,     0., 0.0);
+{  9060} GGO4001 +GHO                =       G2G4006                                               : ARR( 0.143E-11,     0., 0.0);
+{  9061} GGO4001 +GHO                =       G2G4007                                               : ARR( 0.874E-12,     0., 0.0);
+{  9062} GGO4001 +GHO                =       G3K4002                                               : ARR( 0.193E-11,  -190., 0.0);
+{  9063} GGO4001+HV               =       G2O3001 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  9064} G2G4006 +GNO                =       G1G4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9065} G2G4006 +GNO                =       GGN4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9066} G2G4006 +GHO2               =       GGH4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9067} G2G4006 +GNO3               =       G1G4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9068} G2G4006 +MEPERO             =  0.340G1G4008 + 0.330GGO4004 + 0.330GGK4003                 : ARR( 0.565E-13,  -845., 0.0);
+{  9069} G2G4006 +PERO1              =  0.460G1G4008 + 0.270GGO4004 + 0.270GGK4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  9070} G2G4006 +PERO2              =  0.400G1G4008 + 0.300GGO4004 + 0.300GGK4003                 : ARR( 0.162E-13, -1400., 0.0);
+{  9071} G2G4006 +PERO3              =  0.460G1G4008 + 0.270GGO4004 + 0.270GGK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{  9072} G2G4006 +PERO5              =  0.460G1G4008 + 0.270GGO4004 + 0.270GGK4003                 : ARR( 0.183E-11,   450., 0.0);
+{  9073} G2G4006 +PERO6              =  0.300G1G4008 + 0.350GGO4004 + 0.350GGK4003                 : ARR( 0.168E-13, -1300., 0.0);
+{  9074} G2G4006 +PERO9              =  0.650G1G4008 + 0.350GGK4003                                : ARR( 0.100E-10,     0., 0.0);
+{  9075} G2G4007 +GNO                =       G1G4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9076} G2G4007 +GNO                =       GGN400E                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9077} G2G4007 +GHO2               =       GGH4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9078} G2G4007 +GNO3               =       G1G4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9079} G2G4007 +MEPERO             =  0.340G1G4009 + 0.330GGO4005 + 0.330GGK4004                 : ARR( 0.565E-13,  -845., 0.0);
+{  9080} G2G4007 +PERO1              =  0.460G1G4009 + 0.270GGO4005 + 0.270GGK4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  9081} G2G4007 +PERO2              =  0.400G1G4009 + 0.300GGO4005 + 0.300GGK4004                 : ARR( 0.162E-13, -1400., 0.0);
+{  9082} G2G4007 +PERO3              =  0.460G1G4009 + 0.270GGO4005 + 0.270GGK4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  9083} G2G4007 +PERO5              =  0.460G1G4009 + 0.270GGO4005 + 0.270GGK4004                 : ARR( 0.183E-11,   450., 0.0);
+{  9084} G2G4007 +PERO6              =  0.300G1G4009 + 0.350GGO4005 + 0.350GGK4004                 : ARR( 0.168E-13, -1300., 0.0);
+{  9085} G2G4007 +PERO9              =  0.650G1G4009 + 0.350GGK4004                                : ARR( 0.100E-10,     0., 0.0);
+{  9086} G1G4008                     =       GCH2O   +      GGD3000 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  9087} G1G4009                     =       GDO3000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  9088} GAO4001 +GHO                =       GAD4000 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{  9089} GAO4001 +GHO                =       G2A4007                                               : ARR( 0.144E-11,     0., 0.0);
+{  9090} GAO4001 +GHO                =       G2A4008                                               : ARR( 0.651E-12,     0., 0.0);
+{  9091} GAO4001 +GHO                =       G2O3001 +      GCO2                                   : ARR( 0.531E-12,     0., 0.0);
+{  9092} G2A4007 +GNO                =       G1A4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9093} G2A4007 +GNO                =       GAN4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9094} G2A4007 +GHO2               =       GAH4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9095} G2A4007 +GNO3               =       G1A4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9096} G2A4007 +MEPERO             =  0.340G1A4008 + 0.330GAO4004 + 0.330GAK4003                 : ARR( 0.565E-13,  -845., 0.0);
+{  9097} G2A4007 +PERO1              =  0.460G1A4008 + 0.270GAO4004 + 0.270GAK4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  9098} G2A4007 +PERO2              =  0.400G1A4008 + 0.300GAO4004 + 0.300GAK4003                 : ARR( 0.162E-13, -1400., 0.0);
+{  9099} G2A4007 +PERO3              =  0.460G1A4008 + 0.270GAO4004 + 0.270GAK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{  9100} G2A4007 +PERO5              =  0.460G1A4008 + 0.270GAO4004 + 0.270GAK4003                 : ARR( 0.183E-11,   450., 0.0);
+{  9101} G2A4007 +PERO6              =  0.300G1A4008 + 0.350GAO4004 + 0.350GAK4003                 : ARR( 0.168E-13, -1300., 0.0);
+{  9102} G2A4007 +PERO9              =  0.650G1A4008 + 0.350GAK4003                                : ARR( 0.100E-10,     0., 0.0);
+{  9103} G2A4008 +GNO                =       G1A4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9104} G2A4008 +GNO                =       GAN400E                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9105} G2A4008 +GHO2               =       GAH4008                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9106} G2A4008 +GNO3               =       G1A4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9107} G2A4008 +MEPERO             =  0.340G1A4009 + 0.330GAO4005 + 0.330GAK4004                 : ARR( 0.565E-13,  -845., 0.0);
+{  9108} G2A4008 +PERO1              =  0.460G1A4009 + 0.270GAO4005 + 0.270GAK4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  9109} G2A4008 +PERO2              =  0.400G1A4009 + 0.300GAO4005 + 0.300GAK4004                 : ARR( 0.162E-13, -1400., 0.0);
+{  9110} G2A4008 +PERO3              =  0.460G1A4009 + 0.270GAO4005 + 0.270GAK4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  9111} G2A4008 +PERO5              =  0.460G1A4009 + 0.270GAO4005 + 0.270GAK4004                 : ARR( 0.183E-11,   450., 0.0);
+{  9112} G2A4008 +PERO6              =  0.300G1A4009 + 0.350GAO4005 + 0.350GAK4004                 : ARR( 0.168E-13, -1300., 0.0);
+{  9113} G2A4008 +PERO9              =  0.650G1A4009 + 0.350GAK4004                                : ARR( 0.100E-10,     0., 0.0);
+{  9114} G1A4008                     =       GCH2O   +      GAD3000 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  9115} G1A4009                     =       GDO3000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  9116} GPO4001                     =       G3K4002 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  9117} GPO4001 +GHO                =       GPD4000 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{  9118} GPO4001 +GHO                =       G2P4007                                               : ARR( 0.144E-11,     0., 0.0);
+{  9119} GPO4001 +GHO                =       G2P4008                                               : ARR( 0.881E-12,     0., 0.0);
+{  9120} GPO4001+HV               =       G3K4002 +      GNO2                                   :  0.100E+01*SUN;
+{  9121} G2P4007 +GNO                =       G1P4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9122} G2P4007 +GNO                =       GPN4003                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9123} G2P4007 +GHO2               =       GPH4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9124} G2P4007 +GNO3               =       G1P4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9125} G2P4007 +MEPERO             =  0.340G1P4008 + 0.330GPO4004 + 0.330GPK4003                 : ARR( 0.565E-13,  -845., 0.0);
+{  9126} G2P4007 +PERO1              =  0.460G1P4008 + 0.270GPO4004 + 0.270GPK4003                 : ARR( 0.434E-13,  -900., 0.0);
+{  9127} G2P4007 +PERO2              =  0.400G1P4008 + 0.300GPO4004 + 0.300GPK4003                 : ARR( 0.162E-13, -1400., 0.0);
+{  9128} G2P4007 +PERO3              =  0.460G1P4008 + 0.270GPO4004 + 0.270GPK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{  9129} G2P4007 +PERO5              =  0.460G1P4008 + 0.270GPO4004 + 0.270GPK4003                 : ARR( 0.183E-11,   450., 0.0);
+{  9130} G2P4007 +PERO6              =  0.300G1P4008 + 0.350GPO4004 + 0.350GPK4003                 : ARR( 0.168E-13, -1300., 0.0);
+{  9131} G2P4007 +PERO9              =  0.650G1P4008 + 0.350GPK4003                                : ARR( 0.100E-10,     0., 0.0);
+{  9132} G2P4008 +GNO                =       G1P4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9133} G2P4008 +GNO                =       GPN400E                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9134} G2P4008 +GHO2               =       GPH4008                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9135} G2P4008 +GNO3               =       G1P4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9136} G2P4008 +MEPERO             =  0.340G1P4009 + 0.330GPO4005 + 0.330GPK4004                 : ARR( 0.565E-13,  -845., 0.0);
+{  9137} G2P4008 +PERO1              =  0.460G1P4009 + 0.270GPO4005 + 0.270GPK4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  9138} G2P4008 +PERO2              =  0.400G1P4009 + 0.300GPO4005 + 0.300GPK4004                 : ARR( 0.162E-13, -1400., 0.0);
+{  9139} G2P4008 +PERO3              =  0.460G1P4009 + 0.270GPO4005 + 0.270GPK4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  9140} G2P4008 +PERO5              =  0.460G1P4009 + 0.270GPO4005 + 0.270GPK4004                 : ARR( 0.183E-11,   450., 0.0);
+{  9141} G2P4008 +PERO6              =  0.300G1P4009 + 0.350GPO4005 + 0.350GPK4004                 : ARR( 0.168E-13, -1300., 0.0);
+{  9142} G2P4008 +PERO9              =  0.650G1P4009 + 0.350GPK4004                                : ARR( 0.100E-10,     0., 0.0);
+{  9143} G1P4008                     =       GCH2O   +      GPD3000 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{  9144} G1P4009                     =       GDO3000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  9145} GND4004 +GHO                =       G3N4007                                               : ARR( 0.664E-10,     0., 0.0);
+{  9146} GND4004 +GNO3               =       G3N4007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9147} GND4004+HV               =       G1D4006 +      GNO2                                   :  0.100E+01*SUN;
+{  9148} GND4004+HV               =       G3N2000 +      G2D2000                                :  0.100E+01*SUN;
+{  9149} GND4004+HV               =       G2N3005 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9150} G1D4006                     =       G3D3000 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{  9151} GHN5015 +GHO                =       GHN5022 +      GHO2                                   : ARR( 0.209E-11,     0., 0.0);
+{  9152} GHN5015 +GHO                =       G2H501H                                               : ARR( 0.143E-11,     0., 0.0);
+{  9153} GHN5015 +GHO                =       GNN500X +      GHO                                    : ARR( 0.837E-11,     0., 0.0);
+{  9154} GHN5015 +GHO                =       G2N500q                                               : ARR( 0.193E-11,  -190., 0.0);
+{  9155} GHN5015+HV               =       G1H502H +      GNO2                                   :  0.100E+01*SUN;
+{  9156} GHN5015+HV               =       G1N500t +      GHO                                    :  0.100E+01*SUN;
+{  9157} GHN5015+HV               =       G1H501a +      GNO2                                   :  0.100E+01*SUN;
+{  9158} G2H501H +GNO                =       G1H502I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9159} G2H501H +GNO                =       GHN503A                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9160} G2H501H +GHO2               =       GHH501C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9161} G2H501H +GNO3               =       G1H502I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9162} G2H501H +MEPERO             =  0.340G1H502I + 0.330GHN503s + 0.330GHN503t                 : ARR( 0.565E-13,  -845., 0.0);
+{  9163} G2H501H +PERO1              =  0.460G1H502I + 0.270GHN503s + 0.270GHN503t                 : ARR( 0.434E-13,  -900., 0.0);
+{  9164} G2H501H +PERO2              =  0.400G1H502I + 0.300GHN503s + 0.300GHN503t                 : ARR( 0.162E-13, -1400., 0.0);
+{  9165} G2H501H +PERO3              =  0.460G1H502I + 0.270GHN503s + 0.270GHN503t                 : ARR( 0.488E-13, -1250., 0.0);
+{  9166} G2H501H +PERO5              =  0.460G1H502I + 0.270GHN503s + 0.270GHN503t                 : ARR( 0.183E-11,   450., 0.0);
+{  9167} G2H501H +PERO6              =  0.300G1H502I + 0.350GHN503s + 0.350GHN503t                 : ARR( 0.168E-13, -1300., 0.0);
+{  9168} G2H501H +PERO9              =  0.650G1H502I + 0.350GHN503t                                : ARR( 0.100E-10,     0., 0.0);
+{  9169} G1H502H                     =       GNK500P +      GHO                                    : ARR( 0.800E+11,  2398., 0.0);
+{  9170} G1H502H                     =       GHN4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  9171} G1H502I                     =       GHN3007 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{  9172} GNN500n +GHO                =       GNN500X +      GHO2                                   : ARR( 0.440E-11,     0., 0.0);
+{  9173} GNN500n +GHO                =       G2N502x                                               : ARR( 0.151E-11,     0., 0.0);
+{  9174} GNN500n+HV               =       G1N501H +      GNO2                                   :  0.200E+01*SUN;
+{  9175} G2N502x +GNO                =       G1N503J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9176} G2N502x +GNO                =       GNN502G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9177} G2N502x +GHO2               =       GHN503u                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9178} G2N502x +GNO3               =       G1N503J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9179} G2N502x +MEPERO             =  0.340G1N503J + 0.330GNN502Q + 0.330GNN502R                 : ARR( 0.565E-13,  -845., 0.0);
+{  9180} G2N502x +PERO1              =  0.460G1N503J + 0.270GNN502Q + 0.270GNN502R                 : ARR( 0.434E-13,  -900., 0.0);
+{  9181} G2N502x +PERO2              =  0.400G1N503J + 0.300GNN502Q + 0.300GNN502R                 : ARR( 0.162E-13, -1400., 0.0);
+{  9182} G2N502x +PERO3              =  0.460G1N503J + 0.270GNN502Q + 0.270GNN502R                 : ARR( 0.488E-13, -1250., 0.0);
+{  9183} G2N502x +PERO5              =  0.460G1N503J + 0.270GNN502Q + 0.270GNN502R                 : ARR( 0.183E-11,   450., 0.0);
+{  9184} G2N502x +PERO6              =  0.300G1N503J + 0.350GNN502Q + 0.350GNN502R                 : ARR( 0.168E-13, -1300., 0.0);
+{  9185} G2N502x +PERO9              =  0.650G1N503J + 0.350GNN502R                                : ARR( 0.100E-10,     0., 0.0);
+{  9186} G1N503J                     =       GND2000 +      GND3002 +      GHO2                    : ARR( 0.400E+15,  3575., 0.0);
+{  9187} GHN5016 +GHO                =       GNN500p +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{  9188} GHN5016 +GHO                =       G2N500r                                               : ARR( 0.201E-11,  -190., 0.0);
+{  9189} GHN5016+HV               =       G1H502J +      GNO2                                   :  0.100E+01*SUN;
+{  9190} GHN5016+HV               =       G1N500u +      GHO                                    :  0.100E+01*SUN;
+{  9191} GHN5016+HV               =       G1H501e +      GNO2                                   :  0.100E+01*SUN;
+{  9192} G1H502J                     =       GHN400J +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9193} GNN500o +GHO                =       GNN500p +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{  9194} GNN500o +GHO                =       GNN501K +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{  9195} GNN500o+HV               =       G1N503K +      GNO2                                   :  0.100E+01*SUN;
+{  9196} GNN500o+HV               =       G1N503L +      GNO2                                   :  0.100E+01*SUN;
+{  9197} G1N503K                     =       GNK500R +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{  9198} G1N503L                     =       GND400C +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9199} GNN500p +GHO                =       GND500U +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{  9200} GNN500p +GHO                =       GNN501L +      GHO2                                   : ARR( 0.126E-11,     0., 0.0);
+{  9201} GNN500p +GHO                =       G2N502y                                               : ARR( 0.172E-12,     0., 0.0);
+{  9202} GNN500p +GHO                =       GND500F +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{  9203} GNN500p +GHO                =       G1N501l                                               : ARR( 0.210E-17,    85., 2.0);
+{  9204} GNN500p+HV               =       G1N501Z +      GNO2                                   :  0.100E+01*SUN;
+{  9205} GNN500p+HV               =       G3N3002 +      G2N2000                                :  0.100E+01*SUN;
+{  9206} GNN500p+HV               =       G1N502t +      GNO2                                   :  0.100E+01*SUN;
+{  9207} G2N502y +GNO                =       G1N503M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9208} G2N502y +GNO                =       GNN501o                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9209} G2N502y +GHO2               =       GHN503t                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9210} G2N502y +GNO3               =       G1N503M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9211} G2N502y +MEPERO             =  0.340G1N503M + 0.330GNN502R + 0.330GNN5023                 : ARR( 0.565E-13,  -845., 0.0);
+{  9212} G2N502y +PERO1              =  0.460G1N503M + 0.270GNN502R + 0.270GNN5023                 : ARR( 0.434E-13,  -900., 0.0);
+{  9213} G2N502y +PERO2              =  0.400G1N503M + 0.300GNN502R + 0.300GNN5023                 : ARR( 0.162E-13, -1400., 0.0);
+{  9214} G2N502y +PERO3              =  0.460G1N503M + 0.270GNN502R + 0.270GNN5023                 : ARR( 0.488E-13, -1250., 0.0);
+{  9215} G2N502y +PERO5              =  0.460G1N503M + 0.270GNN502R + 0.270GNN5023                 : ARR( 0.183E-11,   450., 0.0);
+{  9216} G2N502y +PERO6              =  0.300G1N503M + 0.350GNN502R + 0.350GNN5023                 : ARR( 0.168E-13, -1300., 0.0);
+{  9217} G2N502y +PERO9              =  0.650G1N503M + 0.350GNN5023                                : ARR( 0.100E-10,     0., 0.0);
+{  9218} G1N503M                     =       G3N3002 +      GND2000                                : ARR( 0.200E+15,  3029., 0.0);
+{  9219} GND500D +GHO                =       GND500o +      GHO2                                   : ARR( 0.208E-11,     0., 0.0);
+{  9220} GND500D +GHO                =       G2N502z                                               : ARR( 0.452E-11,     0., 0.0);
+{  9221} GND500D +GHO                =       GND500A +      GHO2                                   : ARR( 0.634E-11,     0., 0.0);
+{  9222} GND500D +GHO                =       G3N500F                                               : ARR( 0.210E-10,     0., 0.0);
+{  9223} GND500D +GNO3               =       G3N500F +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9224} GND500D+HV               =       G1D5009 +      GNO2                                   :  0.100E+01*SUN;
+{  9225} GND500D+HV               =       GND4003 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  9226} G2N502z +GNO                =       G1N503N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9227} G2N502z +GNO                =       GNN502H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9228} G2N502z +GHO2               =       GHN503v                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9229} G2N502z +GNO3               =       G1N503N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9230} G2N502z +MEPERO             =  0.340G1N503N + 0.330GND500p + 0.330GND500q                 : ARR( 0.565E-13,  -845., 0.0);
+{  9231} G2N502z +PERO1              =  0.460G1N503N + 0.270GND500p + 0.270GND500q                 : ARR( 0.434E-13,  -900., 0.0);
+{  9232} G2N502z +PERO2              =  0.400G1N503N + 0.300GND500p + 0.300GND500q                 : ARR( 0.162E-13, -1400., 0.0);
+{  9233} G2N502z +PERO3              =  0.460G1N503N + 0.270GND500p + 0.270GND500q                 : ARR( 0.488E-13, -1250., 0.0);
+{  9234} G2N502z +PERO5              =  0.460G1N503N + 0.270GND500p + 0.270GND500q                 : ARR( 0.183E-11,   450., 0.0);
+{  9235} G2N502z +PERO6              =  0.300G1N503N + 0.350GND500p + 0.350GND500q                 : ARR( 0.168E-13, -1300., 0.0);
+{  9236} G2N502z +PERO9              =  0.650G1N503N + 0.350GND500q                                : ARR( 0.100E-10,     0., 0.0);
+{  9237} G3N500F +GHO2               =  0.800GGN500J + 0.200GAN500J + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9238} G3N500F +GNO                =       GND4003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  9239} G3N500F +GNO2               =       GPN500J                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9240} G3N500F +GNO3               =       GND4003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  9241} G3N500F +MEPERO             =  0.685GND4003 + 0.315GAN500J + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9242} G3N500F +PERO1              =  0.800GND4003 + 0.200GAN500J + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9243} G3N500F +PERO2              =  0.750GND4003 + 0.250GAN500J + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9244} G3N500F +PERO3              =  0.800GND4003 + 0.200GAN500J + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9245} G3N500F +PERO5              =  0.650GND4003 + 0.350GAN500J + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9246} G3N500F +PERO6              =  0.650GND4003 + 0.350GAN500J + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9247} G3N500F +PERO9              =       GND4003 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9248} G1N503N                     =       GND2000 +      GDD3001 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{  9249} G1N503N                     =       GND3002 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{  9250} GHN5017 +GHO                =       G2H501I                                               : ARR( 0.465E-11,     0., 0.0);
+{  9251} GHN5017 +GHO                =       GND500C +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{  9252} GHN5017 +GHO                =       G2N5031                                               : ARR( 0.197E-11,  -190., 0.0);
+{  9253} GHN5017+HV               =       G1H502K +      GNO2                                   :  0.100E+01*SUN;
+{  9254} GHN5017+HV               =       G3N2000 +      G2H3006                                :  0.100E+01*SUN;
+{  9255} GHN5017+HV               =       GNK3000 +      G2D2000 +      GHO                     :  0.100E+01*SUN;
+{  9256} GHN5017+HV               =       G1N501e +      GHO                                    :  0.100E+01*SUN;
+{  9257} G2H501I +GNO                =       G1H502L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9258} G2H501I +GNO                =       GHN502f                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9259} G2H501I +GHO2               =       GHH501D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9260} G2H501I +GNO3               =       G1H502L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9261} G2H501I +MEPERO             =  0.340G1H502L + 0.330GHN503w + 0.330GHN502D                 : ARR( 0.565E-13,  -845., 0.0);
+{  9262} G2H501I +PERO1              =  0.460G1H502L + 0.270GHN503w + 0.270GHN502D                 : ARR( 0.434E-13,  -900., 0.0);
+{  9263} G2H501I +PERO2              =  0.400G1H502L + 0.300GHN503w + 0.300GHN502D                 : ARR( 0.162E-13, -1400., 0.0);
+{  9264} G2H501I +PERO3              =  0.460G1H502L + 0.270GHN503w + 0.270GHN502D                 : ARR( 0.488E-13, -1250., 0.0);
+{  9265} G2H501I +PERO5              =  0.460G1H502L + 0.270GHN503w + 0.270GHN502D                 : ARR( 0.183E-11,   450., 0.0);
+{  9266} G2H501I +PERO6              =  0.300G1H502L + 0.350GHN503w + 0.350GHN502D                 : ARR( 0.168E-13, -1300., 0.0);
+{  9267} G2H501I +PERO9              =  0.650G1H502L + 0.350GHN502D                                : ARR( 0.100E-10,     0., 0.0);
+{  9268} G2N5031 +GNO                =       G1N501e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9269} G2N5031 +GNO                =       GNN500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9270} G2N5031 +GHO2               =       GHN5017                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9271} G2N5031 +GNO3               =       G1N501e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9272} G2N5031 +MEPERO             =  0.480G1N501e + 0.260GNK5003 + 0.260GND500C                 : ARR( 0.146E-12,  -445., 0.0);
+{  9273} G2N5031 +PERO1              =  0.600G1N501e + 0.200GNK5003 + 0.200GND500C                 : ARR( 0.112E-12,  -500., 0.0);
+{  9274} G2N5031 +PERO2              =  0.560G1N501e + 0.220GNK5003 + 0.220GND500C                 : ARR( 0.418E-13, -1000., 0.0);
+{  9275} G2N5031 +PERO3              =  0.600G1N501e + 0.200GNK5003 + 0.200GND500C                 : ARR( 0.126E-12,  -850., 0.0);
+{  9276} G2N5031 +PERO5              =  0.600G1N501e + 0.200GNK5003 + 0.200GND500C                 : ARR( 0.473E-11,   850., 0.0);
+{  9277} G2N5031 +PERO6              =  0.460G1N501e + 0.270GNK5003 + 0.270GND500C                 : ARR( 0.434E-13,  -900., 0.0);
+{  9278} G2N5031 +PERO9              =  0.800G1N501e + 0.200GND500C                                : ARR( 0.100E-10,     0., 0.0);
+{  9279} G1H502K                     =       G3H4005 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{  9280} G1H502L                     =       G2N3005 +      GHD2000                                : ARR( 0.200E+15,  7289., 0.0);
+{  9281} G1H502L                     =       GND4004 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6757., 0.0);
+{  9282} G3H4005 +GHO2               =  0.800GGH4008 + 0.200GAH4006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9283} G3H4005 +GNO                =       G2H3006 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  9284} G3H4005 +GNO2               =       GPH4006                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9285} G3H4005 +GNO3               =       G2H3006 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  9286} G3H4005 +MEPERO             =  0.685G2H3006 + 0.315GAH4006 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9287} G3H4005 +PERO1              =  0.800G2H3006 + 0.200GAH4006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9288} G3H4005 +PERO2              =  0.750G2H3006 + 0.250GAH4006 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9289} G3H4005 +PERO3              =  0.800G2H3006 + 0.200GAH4006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9290} G3H4005 +PERO5              =  0.650G2H3006 + 0.350GAH4006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9291} G3H4005 +PERO6              =  0.650G2H3006 + 0.350GAH4006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9292} G3H4005 +PERO9              =       G2H3006 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  9293} GHH500D +GHO                =       GHN5019 +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{  9294} GHH500D +GHO                =       GHN501C +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{  9295} GHH500D +GHO                =       G2H500D                                               : ARR( 0.201E-11,  -190., 0.0);
+{  9296} GHH500D +GHO                =       G2H500w                                               : ARR( 0.201E-11,  -190., 0.0);
+{  9297} GHH500D+HV               =       G1H502M +      GNO2                                   :  0.100E+01*SUN;
+{  9298} GHH500D+HV               =       G1H500J +      GHO                                    :  0.100E+01*SUN;
+{  9299} GHH500D+HV               =       G1H501e +      GHO                                    :  0.100E+01*SUN;
+{  9300} G1H502M                     =       G2H501J                                               : ARR( 0.160E+12,  3000., 0.0);
+{  9301} G1H502M                     =       GHH400A +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9302} G2H501J +GNO                =       G1H502N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9303} G2H501J +GNO                =       GHH501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9304} G2H501J +GHO2               =       GHH501F                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9305} G2H501J +GNO3               =       G1H502N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9306} G2H501J +MEPERO             =  0.340G1H502N + 0.330GHH501G + 0.330GHH501H                 : ARR( 0.565E-13,  -845., 0.0);
+{  9307} G2H501J +PERO1              =  0.460G1H502N + 0.270GHH501G + 0.270GHH501H                 : ARR( 0.434E-13,  -900., 0.0);
+{  9308} G2H501J +PERO2              =  0.400G1H502N + 0.300GHH501G + 0.300GHH501H                 : ARR( 0.162E-13, -1400., 0.0);
+{  9309} G2H501J +PERO3              =  0.460G1H502N + 0.270GHH501G + 0.270GHH501H                 : ARR( 0.488E-13, -1250., 0.0);
+{  9310} G2H501J +PERO5              =  0.460G1H502N + 0.270GHH501G + 0.270GHH501H                 : ARR( 0.183E-11,   450., 0.0);
+{  9311} G2H501J +PERO6              =  0.300G1H502N + 0.350GHH501G + 0.350GHH501H                 : ARR( 0.168E-13, -1300., 0.0);
+{  9312} G2H501J +PERO9              =  0.650G1H502N + 0.350GHH501H                                : ARR( 0.100E-10,     0., 0.0);
+{  9313} G1H502N                     =       GHH501I +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  9314} G1H502N                     =       GDO3002 +      GHD2000 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{  9315} GHN5018 +GHO                =       GHN503x +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{  9316} GHN5018 +GHO                =       GHN5019 +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  9317} GHN5018 +GHO                =       GND500E +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{  9318} GHN5018 +GHO                =       G2N5032                                               : ARR( 0.200E-11,  -190., 0.0);
+{  9319} GHN5018+HV               =       G1H502O +      GNO2                                   :  0.100E+01*SUN;
+{  9320} GHN5018+HV               =       G1N503K +      GHO                                    :  0.100E+01*SUN;
+{  9321} G2N5032 +GNO                =       G1N503K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9322} G2N5032 +GNO                =       GNN500o                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9323} G2N5032 +GHO2               =       GHN5018                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9324} G2N5032 +GNO3               =       G1N503K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9325} G2N5032 +MEPERO             =  0.480G1N503K + 0.260GNO500N + 0.260GND500E                 : ARR( 0.146E-12,  -445., 0.0);
+{  9326} G2N5032 +PERO1              =  0.600G1N503K + 0.200GNO500N + 0.200GND500E                 : ARR( 0.112E-12,  -500., 0.0);
+{  9327} G2N5032 +PERO2              =  0.560G1N503K + 0.220GNO500N + 0.220GND500E                 : ARR( 0.418E-13, -1000., 0.0);
+{  9328} G2N5032 +PERO3              =  0.600G1N503K + 0.200GNO500N + 0.200GND500E                 : ARR( 0.126E-12,  -850., 0.0);
+{  9329} G2N5032 +PERO5              =  0.600G1N503K + 0.200GNO500N + 0.200GND500E                 : ARR( 0.473E-11,   850., 0.0);
+{  9330} G2N5032 +PERO6              =  0.460G1N503K + 0.270GNO500N + 0.270GND500E                 : ARR( 0.434E-13,  -900., 0.0);
+{  9331} G2N5032 +PERO9              =  0.800G1N503K + 0.200GND500E                                : ARR( 0.100E-10,     0., 0.0);
+{  9332} G1H502O                     =       G2H501K                                               : ARR( 0.160E+12,  3000., 0.0);
+{  9333} G1H502O                     =       GHD400B +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9334} G2H501K +GNO                =       G1H502P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9335} G2H501K +GNO                =       GHN503y                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9336} G2H501K +GHO2               =       GHH501J                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9337} G2H501K +GNO3               =       G1H502P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9338} G2H501K +MEPERO             =  0.340G1H502P + 0.330GHO500W + 0.330GHK500g                 : ARR( 0.565E-13,  -845., 0.0);
+{  9339} G2H501K +PERO1              =  0.460G1H502P + 0.270GHO500W + 0.270GHK500g                 : ARR( 0.434E-13,  -900., 0.0);
+{  9340} G2H501K +PERO2              =  0.400G1H502P + 0.300GHO500W + 0.300GHK500g                 : ARR( 0.162E-13, -1400., 0.0);
+{  9341} G2H501K +PERO3              =  0.460G1H502P + 0.270GHO500W + 0.270GHK500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  9342} G2H501K +PERO5              =  0.460G1H502P + 0.270GHO500W + 0.270GHK500g                 : ARR( 0.183E-11,   450., 0.0);
+{  9343} G2H501K +PERO6              =  0.300G1H502P + 0.350GHO500W + 0.350GHK500g                 : ARR( 0.168E-13, -1300., 0.0);
+{  9344} G2H501K +PERO9              =  0.650G1H502P + 0.350GHK500g                                : ARR( 0.100E-10,     0., 0.0);
+{  9345} G1H502P                     =       GDO3002 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{  9346} GHN5019 +GHO                =       GND500F +      GHO                                    : ARR( 0.532E-10,     0., 0.0);
+{  9347} GHN5019 +GHO                =       G2N502c                                               : ARR( 0.198E-11,  -190., 0.0);
+{  9348} GHN5019+HV               =       G1H502Q +      GNO2                                   :  0.100E+01*SUN;
+{  9349} GHN5019+HV               =       G3N3002 +      G2H2000                                :  0.100E+01*SUN;
+{  9350} GHN5019+HV               =       G1N502t +      GHO                                    :  0.100E+01*SUN;
+{  9351} G1H502Q                     =       GHD400D +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{  9352} GHH500E +GHO                =       GHN500Z +      GHO                                    : ARR( 0.436E-10,     0., 0.0);
+{  9353} GHH500E +GHO                =       GHN5021 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{  9354} GHH500E +GHO                =       G2H500E                                               : ARR( 0.201E-11,  -190., 0.0);
+{  9355} GHH500E +GHO                =       G2H500u                                               : ARR( 0.201E-11,  -190., 0.0);
+{  9356} GHH500E+HV               =       G1H502R +      GNO2                                   :  0.100E+01*SUN;
+{  9357} GHH500E+HV               =       G1H500K +      GHO                                    :  0.100E+01*SUN;
+{  9358} GHH500E+HV               =       G1H501a +      GHO                                    :  0.100E+01*SUN;
+{  9359} G1H502R                     =       GHK500C +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{  9360} G1H502R                     =       GHH400B +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  9361} GHN501A +GHO                =       GHN503w +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{  9362} GHN501A +GHO                =       GHN500Z +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{  9363} GHN501A +GHO                =       GND500D +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{  9364} GHN501A +GHO                =       G2N501F                                               : ARR( 0.200E-11,  -190., 0.0);
+{  9365} GHN501A+HV               =       G1H500Z +      GNO2                                   :  0.100E+01*SUN;
+{  9366} GHN501A+HV               =       G1N501H +      GHO                                    :  0.100E+01*SUN;
+{  9367} GHD4001 +GHO                =       GDD4000 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{  9368} GHD4001 +GHO                =       G2H400E                                               : ARR( 0.457E-11,     0., 0.0);
+{  9369} GHD4001 +GHO                =       G3H4005                                               : ARR( 0.212E-10,     0., 0.0);
+{  9370} GHD4001 +GHO                =       G2D4004                                               : ARR( 0.194E-11,  -190., 0.0);
+{  9371} GHD4001 +GNO3               =       G3H4005 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9372} GHD4001+HV               =       G1D4003 +      GHO                                    :  0.100E+01*SUN;
+{  9373} GHD4001+HV               =       G2H3006 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9374} GHD4001+HV               =       G2D2000 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{  9375} G2H400E +GNO                =       G1H400G +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9376} G2H400E +GNO                =       GHN400G                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9377} G2H400E +GHO2               =       GHH400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9378} G2H400E +GNO3               =       G1H400G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9379} G2H400E +MEPERO             =  0.340G1H400G + 0.330GHD4003 + 0.330GHD4004                 : ARR( 0.565E-13,  -845., 0.0);
+{  9380} G2H400E +PERO1              =  0.460G1H400G + 0.270GHD4003 + 0.270GHD4004                 : ARR( 0.434E-13,  -900., 0.0);
+{  9381} G2H400E +PERO2              =  0.400G1H400G + 0.300GHD4003 + 0.300GHD4004                 : ARR( 0.162E-13, -1400., 0.0);
+{  9382} G2H400E +PERO3              =  0.460G1H400G + 0.270GHD4003 + 0.270GHD4004                 : ARR( 0.488E-13, -1250., 0.0);
+{  9383} G2H400E +PERO5              =  0.460G1H400G + 0.270GHD4003 + 0.270GHD4004                 : ARR( 0.183E-11,   450., 0.0);
+{  9384} G2H400E +PERO6              =  0.300G1H400G + 0.350GHD4003 + 0.350GHD4004                 : ARR( 0.168E-13, -1300., 0.0);
+{  9385} G2H400E +PERO9              =  0.650G1H400G + 0.350GHD4004                                : ARR( 0.100E-10,     0., 0.0);
+{  9386} G2D4004 +GNO                =       G1D4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9387} G2D4004 +GNO                =       GND4001                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9388} G2D4004 +GHO2               =       GHD4001                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9389} G2D4004 +GNO3               =       G1D4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9390} G2D4004 +MEPERO             =  0.480G1D4003 + 0.260GDO4000 + 0.260GDD4000                 : ARR( 0.146E-12,  -445., 0.0);
+{  9391} G2D4004 +PERO1              =  0.600G1D4003 + 0.200GDO4000 + 0.200GDD4000                 : ARR( 0.112E-12,  -500., 0.0);
+{  9392} G2D4004 +PERO2              =  0.560G1D4003 + 0.220GDO4000 + 0.220GDD4000                 : ARR( 0.418E-13, -1000., 0.0);
+{  9393} G2D4004 +PERO3              =  0.600G1D4003 + 0.200GDO4000 + 0.200GDD4000                 : ARR( 0.126E-12,  -850., 0.0);
+{  9394} G2D4004 +PERO5              =  0.600G1D4003 + 0.200GDO4000 + 0.200GDD4000                 : ARR( 0.473E-11,   850., 0.0);
+{  9395} G2D4004 +PERO6              =  0.460G1D4003 + 0.270GDO4000 + 0.270GDD4000                 : ARR( 0.434E-13,  -900., 0.0);
+{  9396} G2D4004 +PERO9              =  0.800G1D4003 + 0.200GDD4000                                : ARR( 0.100E-10,     0., 0.0);
+{  9397} G1H400G                     =       GCH2O   +      GDD3000 +      GHO                     : ARR( 0.200E+15,  6757., 0.0);
+{  9398} G1H400G                     =       GHD2000 +      G2D2000                                : ARR( 0.200E+15,  7289., 0.0);
+{  9399} GHD5007 +GHO                =       GDD5001 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  9400} GHD5007 +GHO                =       GHD500d +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{  9401} GHD5007 +GHO                =       G2H501L                                               : ARR( 0.450E-11,     0., 0.0);
+{  9402} GHD5007 +GHO                =       GHD500e +      GHO2                                   : ARR( 0.631E-11,     0., 0.0);
+{  9403} GHD5007 +GHO                =       G3H5009                                               : ARR( 0.209E-10,     0., 0.0);
+{  9404} GHD5007 +GHO                =       G2D5006                                               : ARR( 0.191E-11,  -190., 0.0);
+{  9405} GHD5007 +GNO3               =       G3H5009 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9406} GHD5007+HV               =       G1D5009 +      GHO                                    :  0.100E+01*SUN;
+{  9407} GHD5007+HV               =       GHD4003 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  9408} G2H501L +GNO                =       G1H502S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9409} G2H501L +GNO                =       GHN503z                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9410} G2H501L +GHO2               =       GHH501I                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9411} G2H501L +GNO3               =       G1H502S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9412} G2H501L +MEPERO             =  0.340G1H502S + 0.330GHD500f + 0.330GHD500g                 : ARR( 0.565E-13,  -845., 0.0);
+{  9413} G2H501L +PERO1              =  0.460G1H502S + 0.270GHD500f + 0.270GHD500g                 : ARR( 0.434E-13,  -900., 0.0);
+{  9414} G2H501L +PERO2              =  0.400G1H502S + 0.300GHD500f + 0.300GHD500g                 : ARR( 0.162E-13, -1400., 0.0);
+{  9415} G2H501L +PERO3              =  0.460G1H502S + 0.270GHD500f + 0.270GHD500g                 : ARR( 0.488E-13, -1250., 0.0);
+{  9416} G2H501L +PERO5              =  0.460G1H502S + 0.270GHD500f + 0.270GHD500g                 : ARR( 0.183E-11,   450., 0.0);
+{  9417} G2H501L +PERO6              =  0.300G1H502S + 0.350GHD500f + 0.350GHD500g                 : ARR( 0.168E-13, -1300., 0.0);
+{  9418} G2H501L +PERO9              =  0.650G1H502S + 0.350GHD500g                                : ARR( 0.100E-10,     0., 0.0);
+{  9419} G3H5009 +GHO2               =  0.800GGH500B + 0.200GAH500B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9420} G3H5009 +GNO                =       GHD4003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  9421} G3H5009 +GNO2               =       GPH500B                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9422} G3H5009 +GNO3               =       GHD4003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  9423} G3H5009 +MEPERO             =  0.685GHD4003 + 0.315GAH500B + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9424} G3H5009 +PERO1              =  0.800GHD4003 + 0.200GAH500B + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9425} G3H5009 +PERO2              =  0.750GHD4003 + 0.250GAH500B + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9426} G3H5009 +PERO3              =  0.800GHD4003 + 0.200GAH500B + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9427} G3H5009 +PERO5              =  0.650GHD4003 + 0.350GAH500B + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9428} G3H5009 +PERO6              =  0.650GHD4003 + 0.350GAH500B + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9429} G3H5009 +PERO9              =       GHD4003 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9430} G1H502S                     =       GHD2000 +      GDD3001 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{  9431} G1H502S                     =       GHD3005 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3708., 0.0);
+{  9432} GHN501B +GHO                =       GHN5041 +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{  9433} GHN501B +GHO                =       GHN502I +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{  9434} GHN501B +GHO                =       GND500B +      GHO                                    : ARR( 0.332E-11,     0., 0.0);
+{  9435} GHN501B +GHO                =       G2N5033                                               : ARR( 0.196E-11,  -190., 0.0);
+{  9436} GHN501B+HV               =       G1H500L +      GNO2                                   :  0.100E+01*SUN;
+{  9437} GHN501B+HV               =       G1N5038 +      GHO                                    :  0.100E+01*SUN;
+{  9438} G2N5033 +GNO                =       G1N5038 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9439} G2N5033 +GNO                =       GNN500k                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9440} G2N5033 +GHO2               =       GHN501B                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9441} G2N5033 +GNO3               =       G1N5038 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9442} G2N5033 +MEPERO             =  0.480G1N5038 + 0.260GNO500M + 0.260GND500B                 : ARR( 0.164E-12,  -795., 0.0);
+{  9443} G2N5033 +PERO1              =  0.600G1N5038 + 0.200GNO500M + 0.200GND500B                 : ARR( 0.126E-12,  -850., 0.0);
+{  9444} G2N5033 +PERO2              =  0.560G1N5038 + 0.220GNO500M + 0.220GND500B                 : ARR( 0.471E-13, -1350., 0.0);
+{  9445} G2N5033 +PERO3              =  0.600G1N5038 + 0.200GNO500M + 0.200GND500B                 : ARR( 0.142E-12, -1200., 0.0);
+{  9446} G2N5033 +PERO5              =  0.600G1N5038 + 0.200GNO500M + 0.200GND500B                 : ARR( 0.533E-11,   500., 0.0);
+{  9447} G2N5033 +PERO6              =  0.460G1N5038 + 0.270GNO500M + 0.270GND500B                 : ARR( 0.488E-13, -1250., 0.0);
+{  9448} G2N5033 +PERO9              =  0.800G1N5038 + 0.200GND500B                                : ARR( 0.100E-10,     0., 0.0);
+{  9449} GHH500F +GHO                =       GHH501K +      GHO2                                   : ARR( 0.123E-10,     0., 0.0);
+{  9450} GHH500F +GHO                =       GHK500C +      GHO                                    : ARR( 0.491E-10,     0., 0.0);
+{  9451} GHH500F +GHO                =       GHD5006 +      GHO                                    : ARR( 0.192E-10,     0., 0.0);
+{  9452} GHH500F+HV               =       G1H500L +      GHO                                    :  0.100E+01*SUN;
+{  9453} GHH500F+HV               =       G1H501h +      GHO                                    :  0.100E+01*SUN;
+{  9454} GHK500C +GHO                =       GHD500d +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{  9455} GHK500C +GHO                =       GHK500E +      GHO2                                   : ARR( 0.334E-10,     0., 0.0);
+{  9456} GHK500C +GHO                =       GDK5005 +      GHO                                    : ARR( 0.100E-10,     0., 0.0);
+{  9457} GHK500C +GHO                =       G2K500T                                               : ARR( 0.194E-11,  -190., 0.0);
+{  9458} GHK500C+HV               =       G3K4005 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{  9459} GHK500C+HV               =       GDO2000 +      GHK3000                                :  0.100E+01*SUN;
+{  9460} GHK500C+HV               =       G1K500b +      GHO                                    :  0.100E+01*SUN;
+{  9461} G2K500T +GNO                =       G1K500b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9462} G2K500T +GNO                =       GNK500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9463} G2K500T +GHO2               =       GHK500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9464} G2K500T +GNO3               =       G1K500b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9465} G2K500T +MEPERO             =  0.480G1K500b + 0.260GKO500A + 0.260GDK5005                 : ARR( 0.164E-12,  -795., 0.0);
+{  9466} G2K500T +PERO1              =  0.600G1K500b + 0.200GKO500A + 0.200GDK5005                 : ARR( 0.126E-12,  -850., 0.0);
+{  9467} G2K500T +PERO2              =  0.560G1K500b + 0.220GKO500A + 0.220GDK5005                 : ARR( 0.471E-13, -1350., 0.0);
+{  9468} G2K500T +PERO3              =  0.600G1K500b + 0.200GKO500A + 0.200GDK5005                 : ARR( 0.142E-12, -1200., 0.0);
+{  9469} G2K500T +PERO5              =  0.600G1K500b + 0.200GKO500A + 0.200GDK5005                 : ARR( 0.533E-11,   500., 0.0);
+{  9470} G2K500T +PERO6              =  0.460G1K500b + 0.270GKO500A + 0.270GDK5005                 : ARR( 0.488E-13, -1250., 0.0);
+{  9471} G2K500T +PERO9              =  0.800G1K500b + 0.200GDK5005                                : ARR( 0.100E-10,     0., 0.0);
+{  9472} GHN501C +GHO                =       GND500F +      GHO                                    : ARR( 0.136E-09,     0., 0.0);
+{  9473} GHN501C +GHO                =       G3H500A                                               : ARR( 0.217E-10,     0., 0.0);
+{  9474} GHN501C +GNO3               =       G3H500A +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9475} GHN501C+HV               =       G1H502T +      GNO2                                   :  0.100E+01*SUN;
+{  9476} GHN501C+HV               =       G1N500w +      GHO                                    :  0.100E+01*SUN;
+{  9477} GHN501C+HV               =       G2H400F +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9478} GHN501C+HV               =       GHN3008 +      GD02000                                :  0.100E+01*SUN;
+{  9479} G3H500A +GHO2               =  0.800GGH500C + 0.200GAH500C + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9480} G3H500A +GNO                =       G2H400F +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  9481} G3H500A +GNO2               =       GPH500C                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9482} G3H500A +GNO3               =       G2H400F +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  9483} G3H500A +MEPERO             =  0.685G2H400F + 0.315GAH500C + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9484} G3H500A +PERO1              =  0.800G2H400F + 0.200GAH500C + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9485} G3H500A +PERO2              =  0.750G2H400F + 0.250GAH500C + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9486} G3H500A +PERO3              =  0.800G2H400F + 0.200GAH500C + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9487} G3H500A +PERO5              =  0.650G2H400F + 0.350GAH500C + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9488} G3H500A +PERO6              =  0.650G2H400F + 0.350GAH500C + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9489} G3H500A +PERO9              =       G2H400F +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  9490} G1H502T                     =       G2H501M                                               : ARR( 0.160E+12,  3221., 0.0);
+{  9491} G1H502T                     =       GHD400C +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9492} G2H400F +GNO                =       G1H400H +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9493} G2H400F +GNO                =       GHN400S                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9494} G2H400F +GHO2               =       GHH400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9495} G2H400F +GNO3               =       G1H400H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9496} G2H400F +MEPERO             =  0.480G1H400H + 0.260GHN400F + 0.260GHN400T                 : ARR( 0.164E-12,  -795., 0.0);
+{  9497} G2H400F +PERO1              =  0.600G1H400H + 0.200GHN400F + 0.200GHN400T                 : ARR( 0.126E-12,  -850., 0.0);
+{  9498} G2H400F +PERO2              =  0.560G1H400H + 0.220GHN400F + 0.220GHN400T                 : ARR( 0.471E-13, -1350., 0.0);
+{  9499} G2H400F +PERO3              =  0.600G1H400H + 0.200GHN400F + 0.200GHN400T                 : ARR( 0.142E-12, -1200., 0.0);
+{  9500} G2H400F +PERO5              =  0.600G1H400H + 0.200GHN400F + 0.200GHN400T                 : ARR( 0.533E-11,   500., 0.0);
+{  9501} G2H400F +PERO6              =  0.460G1H400H + 0.270GHN400F + 0.270GHN400T                 : ARR( 0.488E-13, -1250., 0.0);
+{  9502} G2H400F +PERO9              =  0.800G1H400H + 0.200GHN400T                                : ARR( 0.100E-10,     0., 0.0);
+{  9503} G2H501M +GNO                =       G1H502U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9504} G2H501M +GNO                =       GHN5042                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9505} G2H501M +GHO2               =       GHH5018                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9506} G2H501M +GNO3               =       G1H502U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9507} G2H501M +MEPERO             =  0.340G1H502U + 0.330GHD500H + 0.330GHD500h                 : ARR( 0.565E-13,  -845., 0.0);
+{  9508} G2H501M +PERO1              =  0.460G1H502U + 0.270GHD500H + 0.270GHD500h                 : ARR( 0.434E-13,  -900., 0.0);
+{  9509} G2H501M +PERO2              =  0.400G1H502U + 0.300GHD500H + 0.300GHD500h                 : ARR( 0.162E-13, -1400., 0.0);
+{  9510} G2H501M +PERO3              =  0.460G1H502U + 0.270GHD500H + 0.270GHD500h                 : ARR( 0.488E-13, -1250., 0.0);
+{  9511} G2H501M +PERO5              =  0.460G1H502U + 0.270GHD500H + 0.270GHD500h                 : ARR( 0.183E-11,   450., 0.0);
+{  9512} G2H501M +PERO6              =  0.300G1H502U + 0.350GHD500H + 0.350GHD500h                 : ARR( 0.168E-13, -1300., 0.0);
+{  9513} G2H501M +PERO9              =  0.650G1H502U + 0.350GHD500h                                : ARR( 0.100E-10,     0., 0.0);
+{  9514} G1H400H                     =       GHD4009 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{  9515} G1H400H                     =       GND3002 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{  9516} G1H502U                     =       GHD500i +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  9517} G1H502U                     =       GHD400A +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{  9518} GND500E +GHO                =       GND500F +      GHO2                                   : ARR( 0.347E-10,     0., 0.0);
+{  9519} GND500E +GHO                =       G3N500G                                               : ARR( 0.220E-10,     0., 0.0);
+{  9520} GND500E +GNO3               =       G3N500G +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9521} GND500E+HV               =       G1D500O +      GNO2                                   :  0.100E+01*SUN;
+{  9522} GND500E+HV               =       G2N400K +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9523} GND500E+HV               =       GNK3001 +      GD02000                                :  0.100E+01*SUN;
+{  9524} G3N500G +GHO2               =  0.800GGN500K + 0.200GAN500K + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9525} G3N500G +GNO                =       G2N400K +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  9526} G3N500G +GNO2               =       GPN500K                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9527} G3N500G +GNO3               =       G2N400K +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  9528} G3N500G +MEPERO             =  0.685G2N400K + 0.315GAN500K + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9529} G3N500G +PERO1              =  0.800G2N400K + 0.200GAN500K + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9530} G3N500G +PERO2              =  0.750G2N400K + 0.250GAN500K + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9531} G3N500G +PERO3              =  0.800G2N400K + 0.200GAN500K + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9532} G3N500G +PERO5              =  0.650G2N400K + 0.350GAN500K + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9533} G3N500G +PERO6              =  0.650G2N400K + 0.350GAN500K + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9534} G3N500G +PERO9              =       G2N400K +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  9535} G1D500O                     =       G2D500I                                               : ARR( 0.160E+12,  3221., 0.0);
+{  9536} G1D500O                     =       GDD4001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9537} G2N400K +GNO                =       G1N400L +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9538} G2N400K +GNO                =       GNN400I                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9539} G2N400K +GHO2               =       GHN400U                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9540} G2N400K +GNO3               =       G1N400L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9541} G2N400K +MEPERO             =  0.480G1N400L + 0.260GNO400B + 0.260GND400F                 : ARR( 0.164E-12,  -795., 0.0);
+{  9542} G2N400K +PERO1              =  0.600G1N400L + 0.200GNO400B + 0.200GND400F                 : ARR( 0.126E-12,  -850., 0.0);
+{  9543} G2N400K +PERO2              =  0.560G1N400L + 0.220GNO400B + 0.220GND400F                 : ARR( 0.471E-13, -1350., 0.0);
+{  9544} G2N400K +PERO3              =  0.600G1N400L + 0.200GNO400B + 0.200GND400F                 : ARR( 0.142E-12, -1200., 0.0);
+{  9545} G2N400K +PERO5              =  0.600G1N400L + 0.200GNO400B + 0.200GND400F                 : ARR( 0.533E-11,   500., 0.0);
+{  9546} G2N400K +PERO6              =  0.460G1N400L + 0.270GNO400B + 0.270GND400F                 : ARR( 0.488E-13, -1250., 0.0);
+{  9547} G2N400K +PERO9              =  0.800G1N400L + 0.200GND400F                                : ARR( 0.100E-10,     0., 0.0);
+{  9548} G2D500I +GNO                =       G1D500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9549} G2D500I +GNO                =       GND500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9550} G2D500I +GHO2               =       GHD500b                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9551} G2D500I +GNO3               =       G1D500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9552} G2D500I +MEPERO             =  0.340G1D500P + 0.330GDO500A + 0.330GDK500N                 : ARR( 0.565E-13,  -845., 0.0);
+{  9553} G2D500I +PERO1              =  0.460G1D500P + 0.270GDO500A + 0.270GDK500N                 : ARR( 0.434E-13,  -900., 0.0);
+{  9554} G2D500I +PERO2              =  0.400G1D500P + 0.300GDO500A + 0.300GDK500N                 : ARR( 0.162E-13, -1400., 0.0);
+{  9555} G2D500I +PERO3              =  0.460G1D500P + 0.270GDO500A + 0.270GDK500N                 : ARR( 0.488E-13, -1250., 0.0);
+{  9556} G2D500I +PERO5              =  0.460G1D500P + 0.270GDO500A + 0.270GDK500N                 : ARR( 0.183E-11,   450., 0.0);
+{  9557} G2D500I +PERO6              =  0.300G1D500P + 0.350GDO500A + 0.350GDK500N                 : ARR( 0.168E-13, -1300., 0.0);
+{  9558} G2D500I +PERO9              =  0.650G1D500P + 0.350GDK500N                                : ARR( 0.100E-10,     0., 0.0);
+{  9559} G1N400L                     =       GND3002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{  9560} G1D500P                     =       GDD5006 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  9561} G1D500P                     =       GDO3002 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  4899., 0.0);
+{  9562} G1D500P                     =       GDO4006 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{  9563} GND500F +GHO                =       G3N500H                                               : ARR( 0.679E-10,     0., 0.0);
+{  9564} GND500F +GNO3               =       G3N500H +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9565} GND500F+HV               =       G1D500Q +      GNO2                                   :  0.100E+01*SUN;
+{  9566} GND500F+HV               =       G3N3002 +      G2D2000                                :  0.100E+01*SUN;
+{  9567} GND500F+HV               =       G2N400L +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9568} G3N500H +GHO2               =  0.800GGN500L + 0.200GAN500L + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9569} G3N500H +GNO                =       G2N400L +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  9570} G3N500H +GNO2               =       GPN500L                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9571} G3N500H +GNO3               =       G2N400L +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  9572} G3N500H +MEPERO             =  0.685G2N400L + 0.315GAN500L + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9573} G3N500H +PERO1              =  0.800G2N400L + 0.200GAN500L + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9574} G3N500H +PERO2              =  0.750G2N400L + 0.250GAN500L + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9575} G3N500H +PERO3              =  0.800G2N400L + 0.200GAN500L + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9576} G3N500H +PERO5              =  0.650G2N400L + 0.350GAN500L + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9577} G3N500H +PERO6              =  0.650G2N400L + 0.350GAN500L + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{  9578} G3N500H +PERO9              =       G2N400L +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{  9579} G1D500Q                     =       GDD4002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{  9580} G2N400L +GNO                =       G1N400M +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9581} G2N400L +GNO                =       GNN400J                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9582} G2N400L +GHO2               =       GHN400W                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9583} G2N400L +GNO3               =       G1N400M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9584} G2N400L +MEPERO             =  0.480G1N400M + 0.260GNK4005 + 0.260GND400G                 : ARR( 0.164E-12,  -795., 0.0);
+{  9585} G2N400L +PERO1              =  0.600G1N400M + 0.200GNK4005 + 0.200GND400G                 : ARR( 0.126E-12,  -850., 0.0);
+{  9586} G2N400L +PERO2              =  0.560G1N400M + 0.220GNK4005 + 0.220GND400G                 : ARR( 0.471E-13, -1350., 0.0);
+{  9587} G2N400L +PERO3              =  0.600G1N400M + 0.200GNK4005 + 0.200GND400G                 : ARR( 0.142E-12, -1200., 0.0);
+{  9588} G2N400L +PERO5              =  0.600G1N400M + 0.200GNK4005 + 0.200GND400G                 : ARR( 0.533E-11,   500., 0.0);
+{  9589} G2N400L +PERO6              =  0.460G1N400M + 0.270GNK4005 + 0.270GND400G                 : ARR( 0.488E-13, -1250., 0.0);
+{  9590} G2N400L +PERO9              =  0.800G1N400M + 0.200GND400G                                : ARR( 0.100E-10,     0., 0.0);
+{  9591} G1N400M                     =       G3N3002 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{  9592} GGN5001 +GHO                =       GGN500I +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{  9593} GGN5001 +GHO                =       G2G5008                                               : ARR( 0.145E-11,     0., 0.0);
+{  9594} GGN5001 +GHO                =       G2G5009                                               : ARR( 0.882E-12,     0., 0.0);
+{  9595} GGN5001 +GHO                =       G3N5001                                               : ARR( 0.194E-11,  -190., 0.0);
+{  9596} GGN5001+HV               =       G1G5009 +      GNO2                                   :  0.100E+01*SUN;
+{  9597} GGN5001+HV               =       G2N4001 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{  9598} G2G5008 +GNO                =       G1G500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9599} G2G5008 +GNO                =       GGN500F                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9600} G2G5008 +GHO2               =       GGH500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9601} G2G5008 +GNO3               =       G1G500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9602} G2G5008 +MEPERO             =  0.340G1G500A + 0.330GGN500K + 0.330GGN500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  9603} G2G5008 +PERO1              =  0.460G1G500A + 0.270GGN500K + 0.270GGN500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  9604} G2G5008 +PERO2              =  0.400G1G500A + 0.300GGN500K + 0.300GGN500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  9605} G2G5008 +PERO3              =  0.460G1G500A + 0.270GGN500K + 0.270GGN500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  9606} G2G5008 +PERO5              =  0.460G1G500A + 0.270GGN500K + 0.270GGN500L                 : ARR( 0.183E-11,   450., 0.0);
+{  9607} G2G5008 +PERO6              =  0.300G1G500A + 0.350GGN500K + 0.350GGN500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  9608} G2G5008 +PERO9              =  0.650G1G500A + 0.350GGN500L                                : ARR( 0.100E-10,     0., 0.0);
+{  9609} G2G5009 +GNO                =       G1G500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9610} G2G5009 +GNO                =       GGN500E                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9611} G2G5009 +GHO2               =       GGH500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9612} G2G5009 +GNO3               =       G1G500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9613} G2G5009 +MEPERO             =  0.340G1G500B + 0.330GGN500J + 0.330GGN500M                 : ARR( 0.565E-13,  -845., 0.0);
+{  9614} G2G5009 +PERO1              =  0.460G1G500B + 0.270GGN500J + 0.270GGN500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  9615} G2G5009 +PERO2              =  0.400G1G500B + 0.300GGN500J + 0.300GGN500M                 : ARR( 0.162E-13, -1400., 0.0);
+{  9616} G2G5009 +PERO3              =  0.460G1G500B + 0.270GGN500J + 0.270GGN500M                 : ARR( 0.488E-13, -1250., 0.0);
+{  9617} G2G5009 +PERO5              =  0.460G1G500B + 0.270GGN500J + 0.270GGN500M                 : ARR( 0.183E-11,   450., 0.0);
+{  9618} G2G5009 +PERO6              =  0.300G1G500B + 0.350GGN500J + 0.350GGN500M                 : ARR( 0.168E-13, -1300., 0.0);
+{  9619} G2G5009 +PERO9              =  0.650G1G500B + 0.350GGN500M                                : ARR( 0.100E-10,     0., 0.0);
+{  9620} G1G5009                     =       G2G500A                                               : ARR( 0.160E+12,  3221., 0.0);
+{  9621} G1G5009                     =       GGD4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  9622} G1G500A                     =       GND2000 +      GGD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{  9623} G1G500B                     =       GND4003 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  9624} G2G500A +GNO                =       G1G500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9625} G2G500A +GNO                =       GGN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9626} G2G500A +GHO2               =       GGH500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9627} G2G500A +GNO3               =       G1G500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9628} G2G500A +MEPERO             =  0.340G1G500C + 0.330GGO5005 + 0.330GGK5006                 : ARR( 0.565E-13,  -845., 0.0);
+{  9629} G2G500A +PERO1              =  0.460G1G500C + 0.270GGO5005 + 0.270GGK5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  9630} G2G500A +PERO2              =  0.400G1G500C + 0.300GGO5005 + 0.300GGK5006                 : ARR( 0.162E-13, -1400., 0.0);
+{  9631} G2G500A +PERO3              =  0.460G1G500C + 0.270GGO5005 + 0.270GGK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  9632} G2G500A +PERO5              =  0.460G1G500C + 0.270GGO5005 + 0.270GGK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  9633} G2G500A +PERO6              =  0.300G1G500C + 0.350GGO5005 + 0.350GGK5006                 : ARR( 0.168E-13, -1300., 0.0);
+{  9634} G2G500A +PERO9              =  0.650G1G500C + 0.350GGK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  9635} G1G500C                     =       GGD5002 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  9636} G1G500C                     =       GDO4002 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  9637} GAN5001 +GHO                =       G2A5009                                               : ARR( 0.663E-12,     0., 0.0);
+{  9638} GAN5001 +GHO                =       G2A500A                                               : ARR( 0.147E-11,     0., 0.0);
+{  9639} GAN5001 +GHO                =       GAN500E +      GHO2                                   : ARR( 0.214E-11,     0., 0.0);
+{  9640} GAN5001 +GHO                =       G2N4001 +      GCO2                                   : ARR( 0.541E-12,     0., 0.0);
+{  9641} GAN5001+HV               =       G1A500A +      GNO2                                   :  0.100E+01*SUN;
+{  9642} G2A5009 +GNO                =       G1A500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9643} G2A5009 +GNO                =       GAN500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9644} G2A5009 +GHO2               =       GAH500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9645} G2A5009 +GNO3               =       G1A500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9646} G2A5009 +MEPERO             =  0.340G1A500B + 0.330GAN500J + 0.330GAN500M                 : ARR( 0.565E-13,  -845., 0.0);
+{  9647} G2A5009 +PERO1              =  0.460G1A500B + 0.270GAN500J + 0.270GAN500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  9648} G2A5009 +PERO2              =  0.400G1A500B + 0.300GAN500J + 0.300GAN500M                 : ARR( 0.162E-13, -1400., 0.0);
+{  9649} G2A5009 +PERO3              =  0.460G1A500B + 0.270GAN500J + 0.270GAN500M                 : ARR( 0.488E-13, -1250., 0.0);
+{  9650} G2A5009 +PERO5              =  0.460G1A500B + 0.270GAN500J + 0.270GAN500M                 : ARR( 0.183E-11,   450., 0.0);
+{  9651} G2A5009 +PERO6              =  0.300G1A500B + 0.350GAN500J + 0.350GAN500M                 : ARR( 0.168E-13, -1300., 0.0);
+{  9652} G2A5009 +PERO9              =  0.650G1A500B + 0.350GAN500M                                : ARR( 0.100E-10,     0., 0.0);
+{  9653} G2A500A +GNO                =       G1A500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9654} G2A500A +GNO                =       GAN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9655} G2A500A +GHO2               =       GAH500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9656} G2A500A +GNO3               =       G1A500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9657} G2A500A +MEPERO             =  0.340G1A500C + 0.330GAN500K + 0.330GAN500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  9658} G2A500A +PERO1              =  0.460G1A500C + 0.270GAN500K + 0.270GAN500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  9659} G2A500A +PERO2              =  0.400G1A500C + 0.300GAN500K + 0.300GAN500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  9660} G2A500A +PERO3              =  0.460G1A500C + 0.270GAN500K + 0.270GAN500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  9661} G2A500A +PERO5              =  0.460G1A500C + 0.270GAN500K + 0.270GAN500L                 : ARR( 0.183E-11,   450., 0.0);
+{  9662} G2A500A +PERO6              =  0.300G1A500C + 0.350GAN500K + 0.350GAN500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  9663} G2A500A +PERO9              =  0.650G1A500C + 0.350GAN500L                                : ARR( 0.100E-10,     0., 0.0);
+{  9664} G1A500A                     =       G2A500B                                               : ARR( 0.160E+12,  3356., 0.0);
+{  9665} G1A500A                     =       GAD4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  9666} G1A500B                     =       GCO     +      GND4003 +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  9667} G1A500C                     =       GAD3000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{  9668} G2A500B +GNO                =       G1A500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9669} G2A500B +GNO                =       GAN500I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9670} G2A500B +GHO2               =       GAH500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9671} G2A500B +GNO3               =       G1A500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9672} G2A500B +MEPERO             =  0.340G1A500D + 0.330GAO5005 + 0.330GAK5006                 : ARR( 0.565E-13,  -845., 0.0);
+{  9673} G2A500B +PERO1              =  0.460G1A500D + 0.270GAO5005 + 0.270GAK5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  9674} G2A500B +PERO2              =  0.400G1A500D + 0.300GAO5005 + 0.300GAK5006                 : ARR( 0.162E-13, -1400., 0.0);
+{  9675} G2A500B +PERO3              =  0.460G1A500D + 0.270GAO5005 + 0.270GAK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  9676} G2A500B +PERO5              =  0.460G1A500D + 0.270GAO5005 + 0.270GAK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  9677} G2A500B +PERO6              =  0.300G1A500D + 0.350GAO5005 + 0.350GAK5006                 : ARR( 0.168E-13, -1300., 0.0);
+{  9678} G2A500B +PERO9              =  0.650G1A500D + 0.350GAK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  9679} G1A500D                     =       GAD5003 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  9680} G1A500D                     =       GDO4002 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{  9681} GPN5001                     =       G3N5001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{  9682} GPN5001 +GHO                =       GPN500B +      GHO2                                   : ARR( 0.215E-11,     0., 0.0);
+{  9683} GPN5001 +GHO                =       G2P5009                                               : ARR( 0.147E-11,     0., 0.0);
+{  9684} GPN5001 +GHO                =       G2P500A                                               : ARR( 0.899E-12,     0., 0.0);
+{  9685} GPN5001+HV               =       G1P500A +      GNO2                                   :  0.100E+01*SUN;
+{  9686} GPN5001+HV               =       G3N5001 +      GNO2                                   :  0.100E+01*SUN;
+{  9687} G2P5009 +GNO                =       G1P500B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9688} G2P5009 +GNO                =       GPN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9689} G2P5009 +GHO2               =       GPH500C                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9690} G2P5009 +GNO3               =       G1P500B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9691} G2P5009 +MEPERO             =  0.340G1P500B + 0.330GPN500K + 0.330GPN500L                 : ARR( 0.565E-13,  -845., 0.0);
+{  9692} G2P5009 +PERO1              =  0.460G1P500B + 0.270GPN500K + 0.270GPN500L                 : ARR( 0.434E-13,  -900., 0.0);
+{  9693} G2P5009 +PERO2              =  0.400G1P500B + 0.300GPN500K + 0.300GPN500L                 : ARR( 0.162E-13, -1400., 0.0);
+{  9694} G2P5009 +PERO3              =  0.460G1P500B + 0.270GPN500K + 0.270GPN500L                 : ARR( 0.488E-13, -1250., 0.0);
+{  9695} G2P5009 +PERO5              =  0.460G1P500B + 0.270GPN500K + 0.270GPN500L                 : ARR( 0.183E-11,   450., 0.0);
+{  9696} G2P5009 +PERO6              =  0.300G1P500B + 0.350GPN500K + 0.350GPN500L                 : ARR( 0.168E-13, -1300., 0.0);
+{  9697} G2P5009 +PERO9              =  0.650G1P500B + 0.350GPN500L                                : ARR( 0.100E-10,     0., 0.0);
+{  9698} G2P500A +GNO                =       G1P500C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9699} G2P500A +GNO                =       GPN500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9700} G2P500A +GHO2               =       GPH500D                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9701} G2P500A +GNO3               =       G1P500C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9702} G2P500A +MEPERO             =  0.340G1P500C + 0.330GPN500J + 0.330GPN500M                 : ARR( 0.565E-13,  -845., 0.0);
+{  9703} G2P500A +PERO1              =  0.460G1P500C + 0.270GPN500J + 0.270GPN500M                 : ARR( 0.434E-13,  -900., 0.0);
+{  9704} G2P500A +PERO2              =  0.400G1P500C + 0.300GPN500J + 0.300GPN500M                 : ARR( 0.162E-13, -1400., 0.0);
+{  9705} G2P500A +PERO3              =  0.460G1P500C + 0.270GPN500J + 0.270GPN500M                 : ARR( 0.488E-13, -1250., 0.0);
+{  9706} G2P500A +PERO5              =  0.460G1P500C + 0.270GPN500J + 0.270GPN500M                 : ARR( 0.183E-11,   450., 0.0);
+{  9707} G2P500A +PERO6              =  0.300G1P500C + 0.350GPN500J + 0.350GPN500M                 : ARR( 0.168E-13, -1300., 0.0);
+{  9708} G2P500A +PERO9              =  0.650G1P500C + 0.350GPN500M                                : ARR( 0.100E-10,     0., 0.0);
+{  9709} G1P500A                     =       G2P500B                                               : ARR( 0.160E+12,  3221., 0.0);
+{  9710} G1P500A                     =       GPD4000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  9711} G1P500B                     =       GND2000 +      GPD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{  9712} G1P500C                     =       GND4003 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  9713} G2P500B +GNO                =       G1P500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9714} G2P500B +GNO                =       GPN500I                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9715} G2P500B +GHO2               =       GPH500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9716} G2P500B +GNO3               =       G1P500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9717} G2P500B +MEPERO             =  0.340G1P500D + 0.330GPO5005 + 0.330GPK5006                 : ARR( 0.565E-13,  -845., 0.0);
+{  9718} G2P500B +PERO1              =  0.460G1P500D + 0.270GPO5005 + 0.270GPK5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  9719} G2P500B +PERO2              =  0.400G1P500D + 0.300GPO5005 + 0.300GPK5006                 : ARR( 0.162E-13, -1400., 0.0);
+{  9720} G2P500B +PERO3              =  0.460G1P500D + 0.270GPO5005 + 0.270GPK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  9721} G2P500B +PERO5              =  0.460G1P500D + 0.270GPO5005 + 0.270GPK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  9722} G2P500B +PERO6              =  0.300G1P500D + 0.350GPO5005 + 0.350GPK5006                 : ARR( 0.168E-13, -1300., 0.0);
+{  9723} G2P500B +PERO9              =  0.650G1P500D + 0.350GPK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  9724} G1P500D                     =       GPD5002 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{  9725} G1P500D                     =       GDO4002 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{  9726} GDD4000 +GHO                =       G3D4000                                               : ARR( 0.416E-10,     0., 0.0);
+{  9727} GDD4000 +GHO                =       G2D4005                                               : ARR( 0.546E-11,     0., 0.0);
+{  9728} GDD4000 +GNO3               =       G3D4000 +      GHNO3                                  : ARR( 0.240E-13,     0., 0.0);
+{  9729} GDD4000+HV               =       GCO     +      G2D3001 +      GHO2                    :  0.200E+01*SUN;
+{  9730} G2D4005 +GNO                =       G1D4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9731} G2D4005 +GNO                =       GND400D                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9732} G2D4005 +GHO2               =       GHD400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9733} G2D4005 +GNO3               =       G1D4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9734} G2D4005 +MEPERO             =  0.340G1D4007 + 0.330GDD4001 + 0.330GDD4002                 : ARR( 0.565E-13,  -845., 0.0);
+{  9735} G2D4005 +PERO1              =  0.460G1D4007 + 0.270GDD4001 + 0.270GDD4002                 : ARR( 0.434E-13,  -900., 0.0);
+{  9736} G2D4005 +PERO2              =  0.400G1D4007 + 0.300GDD4001 + 0.300GDD4002                 : ARR( 0.162E-13, -1400., 0.0);
+{  9737} G2D4005 +PERO3              =  0.460G1D4007 + 0.270GDD4001 + 0.270GDD4002                 : ARR( 0.488E-13, -1250., 0.0);
+{  9738} G2D4005 +PERO5              =  0.460G1D4007 + 0.270GDD4001 + 0.270GDD4002                 : ARR( 0.183E-11,   450., 0.0);
+{  9739} G2D4005 +PERO6              =  0.300G1D4007 + 0.350GDD4001 + 0.350GDD4002                 : ARR( 0.168E-13, -1300., 0.0);
+{  9740} G2D4005 +PERO9              =  0.650G1D4007 + 0.350GDD4002                                : ARR( 0.100E-10,     0., 0.0);
+{  9741} G1D4007                     =       GDD3000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5054., 0.0);
+{  9742} GNN4002 +GHO                =       G2N400M                                               : ARR( 0.293E-12,     0., 0.0);
+{  9743} GNN4002 +GHO                =       GNN400C +      GHO2                                   : ARR( 0.214E-11,     0., 0.0);
+{  9744} GNN4002 +GHO                =       G1N400F                                               : ARR( 0.218E-17,    85., 2.0);
+{  9745} GNN4002+HV               =       G1N4001 +      GNO2                                   :  0.100E+01*SUN;
+{  9746} GNN4002+HV               =       G1N400D +      GNO2                                   :  0.100E+01*SUN;
+{  9747} G2N400M +GNO                =       G1N400N +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9748} G2N400M +GNO                =       GNN400H                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9749} G2N400M +GHO2               =       GHN400S                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9750} G2N400M +GNO3               =       G1N400N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9751} G2N400M +MEPERO             =  0.340G1N400N + 0.330GNN400I + 0.330GNN400J                 : ARR( 0.565E-13,  -845., 0.0);
+{  9752} G2N400M +PERO1              =  0.460G1N400N + 0.270GNN400I + 0.270GNN400J                 : ARR( 0.434E-13,  -900., 0.0);
+{  9753} G2N400M +PERO2              =  0.400G1N400N + 0.300GNN400I + 0.300GNN400J                 : ARR( 0.162E-13, -1400., 0.0);
+{  9754} G2N400M +PERO3              =  0.460G1N400N + 0.270GNN400I + 0.270GNN400J                 : ARR( 0.488E-13, -1250., 0.0);
+{  9755} G2N400M +PERO5              =  0.460G1N400N + 0.270GNN400I + 0.270GNN400J                 : ARR( 0.183E-11,   450., 0.0);
+{  9756} G2N400M +PERO6              =  0.300G1N400N + 0.350GNN400I + 0.350GNN400J                 : ARR( 0.168E-13, -1300., 0.0);
+{  9757} G2N400M +PERO9              =  0.650G1N400N + 0.350GNN400J                                : ARR( 0.100E-10,     0., 0.0);
+{  9758} G1N400N                     =  2.000GND2000 +      GHO2                                   : ARR( 0.200E+15,  3632., 0.0);
+{  9759} GHN4002 +GHO                =       GHN400Q +      GHO2                                   : ARR( 0.208E-11,     0., 0.0);
+{  9760} GHN4002 +GHO                =       G2H400G                                               : ARR( 0.142E-11,     0., 0.0);
+{  9761} GHN4002 +GHO                =       GND4003 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{  9762} GHN4002 +GHO                =       G2N4001                                               : ARR( 0.192E-11,  -190., 0.0);
+{  9763} GHN4002+HV               =       G1H400I +      GNO2                                   :  0.100E+01*SUN;
+{  9764} GHN4002+HV               =       G1N4001 +      GHO                                    :  0.100E+01*SUN;
+{  9765} G2H400G +GNO                =       G1H400J +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{  9766} G2H400G +GNO                =       GHN400N                                               : ARR( 0.111E-12,  -360., 0.0);
+{  9767} G2H400G +GHO2               =       GHH400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{  9768} G2H400G +GNO3               =       G1H400J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9769} G2H400G +MEPERO             =  0.340G1H400J + 0.330GHN400U + 0.330GHN400W                 : ARR( 0.565E-13,  -845., 0.0);
+{  9770} G2H400G +PERO1              =  0.460G1H400J + 0.270GHN400U + 0.270GHN400W                 : ARR( 0.434E-13,  -900., 0.0);
+{  9771} G2H400G +PERO2              =  0.400G1H400J + 0.300GHN400U + 0.300GHN400W                 : ARR( 0.162E-13, -1400., 0.0);
+{  9772} G2H400G +PERO3              =  0.460G1H400J + 0.270GHN400U + 0.270GHN400W                 : ARR( 0.488E-13, -1250., 0.0);
+{  9773} G2H400G +PERO5              =  0.460G1H400J + 0.270GHN400U + 0.270GHN400W                 : ARR( 0.183E-11,   450., 0.0);
+{  9774} G2H400G +PERO6              =  0.300G1H400J + 0.350GHN400U + 0.350GHN400W                 : ARR( 0.168E-13, -1300., 0.0);
+{  9775} G2H400G +PERO9              =  0.650G1H400J + 0.350GHN400W                                : ARR( 0.100E-10,     0., 0.0);
+{  9776} G1H400I                     =       GDO4002 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{  9777} G1H400I                     =       GHD3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{  9778} G1H400J                     =       GND2000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3635., 0.0);
+{  9779} GDK5005 +GHO                =       GDD5007 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{  9780} GDK5005 +GHO                =       GDK500M +      GHO2                                   : ARR( 0.334E-10,     0., 0.0);
+{  9781} GDK5005 +GHO                =       G3K4005 +      GCO                                    : ARR( 0.130E-10,     0., 0.0);
+{  9782} GDK5005 +GNO3               =       G3K4005 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  9783} GDK5005+HV               =       G3K4005 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9784} GDK5005+HV               =       GDO4002 +      GCO                                    :  0.100E+01*SUN;
+{  9785} GDK5005+HV               =       GOO3000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{  9786} GDD5001 +GHO                =       G3D5002                                               : ARR( 0.417E-10,     0., 0.0);
+{  9787} GDD5001 +GHO                =       GDD5007 +      GHO2                                   : ARR( 0.126E-10,     0., 0.0);
+{  9788} GDD5001 +GHO                =       G2D500J                                               : ARR( 0.143E-10,     0., 0.0);
+{  9789} GDD5001 +GNO3               =       G3D5002 +      GHNO3                                  : ARR( 0.240E-13,     0., 0.0);
+{  9790} GDD5001+HV               =       GCO     +      GDD4001 + 2.000GHO2                    :  0.200E+01*SUN;
+{  9791} G3D5002 +GHO2               =  0.800GGD5002 + 0.200GAD5003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9792} G3D5002 +GNO                =       GDD4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  9793} G3D5002 +GNO2               =       GPD5002                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9794} G3D5002 +GNO3               =       GDD4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  9795} G3D5002 +MEPERO             =  0.685GDD4001 + 0.315GAD5003 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9796} G3D5002 +PERO1              =  0.800GDD4001 + 0.200GAD5003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9797} G3D5002 +PERO2              =  0.750GDD4001 + 0.250GAD5003 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9798} G3D5002 +PERO3              =  0.800GDD4001 + 0.200GAD5003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9799} G3D5002 +PERO5              =  0.650GDD4001 + 0.350GAD5003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9800} G3D5002 +PERO6              =  0.650GDD4001 + 0.350GAD5003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9801} G3D5002 +PERO9              =       GDD4001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9802} G2D500J +GNO                =       G1D500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9803} G2D500J +GNO                =       GND500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9804} G2D500J +GHO2               =       GHD500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9805} G2D500J +GNO3               =       G1D500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9806} G2D500J +MEPERO             =  0.340G1D500R + 0.330GDD5006 + 0.330GDD5008                 : ARR( 0.565E-13,  -845., 0.0);
+{  9807} G2D500J +PERO1              =  0.460G1D500R + 0.270GDD5006 + 0.270GDD5008                 : ARR( 0.434E-13,  -900., 0.0);
+{  9808} G2D500J +PERO2              =  0.400G1D500R + 0.300GDD5006 + 0.300GDD5008                 : ARR( 0.162E-13, -1400., 0.0);
+{  9809} G2D500J +PERO3              =  0.460G1D500R + 0.270GDD5006 + 0.270GDD5008                 : ARR( 0.488E-13, -1250., 0.0);
+{  9810} G2D500J +PERO5              =  0.460G1D500R + 0.270GDD5006 + 0.270GDD5008                 : ARR( 0.183E-11,   450., 0.0);
+{  9811} G2D500J +PERO6              =  0.300G1D500R + 0.350GDD5006 + 0.350GDD5008                 : ARR( 0.168E-13, -1300., 0.0);
+{  9812} G2D500J +PERO9              =  0.650G1D500R + 0.350GDD5008                                : ARR( 0.100E-10,     0., 0.0);
+{  9813} G1D500R                     =       GDD2000 +      GDD3001 +      GHO2                    : ARR( 0.400E+15,  2877., 0.0);
+{  9814} GND500G +GHO                =       G2N5034                                               : ARR( 0.126E-11,     0., 0.0);
+{  9815} GND500G +GHO                =       G3N500I                                               : ARR( 0.456E-11,     0., 0.0);
+{  9816} GND500G +GNO3               =       G3N500I +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9817} GND500G+HV               =       G1D500S +      GNO2                                   :  0.100E+01*SUN;
+{  9818} GND500G+HV               =       GD04000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{  9819} GND500G+HV               =       GU03000 +      GND2000                                :  0.100E+01*SUN;
+{  9820} G2N5034 +GNO                =       G1N503O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9821} G2N5034 +GNO                =       GNN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9822} G2N5034 +GHO2               =       GHN5043                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9823} G2N5034 +GNO3               =       G1N503O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9824} G2N5034 +MEPERO             =  0.480G1N503O + 0.260GND5004 + 0.260GND500L                 : ARR( 0.616E-11,   905., 0.0);
+{  9825} G2N5034 +PERO1              =  0.600G1N503O + 0.200GND5004 + 0.200GND500L                 : ARR( 0.473E-11,   850., 0.0);
+{  9826} G2N5034 +PERO2              =  0.560G1N503O + 0.220GND5004 + 0.220GND500L                 : ARR( 0.177E-11,   350., 0.0);
+{  9827} G2N5034 +PERO3              =  0.600G1N503O + 0.200GND5004 + 0.200GND500L                 : ARR( 0.533E-11,   500., 0.0);
+{  9828} G2N5034 +PERO5              =  0.600G1N503O + 0.200GND5004 + 0.200GND500L                 : ARR( 0.200E-09,  2200., 0.0);
+{  9829} G2N5034 +PERO6              =  0.460G1N503O + 0.270GND5004 + 0.270GND500L                 : ARR( 0.183E-11,   450., 0.0);
+{  9830} G2N5034 +PERO9              =  0.800G1N503O + 0.200GND500L                                : ARR( 0.100E-10,     0., 0.0);
+{  9831} G3N500I +GHO2               =  0.800GGN5004 + 0.200GAN5004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9832} G3N500I +GNO                =       GD04000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{  9833} G3N500I +GNO2               =       GPN5004                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9834} G3N500I +GNO3               =       GD04000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{  9835} G3N500I +MEPERO             =  0.685GD04000 + 0.315GAN5004 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9836} G3N500I +PERO1              =  0.800GD04000 + 0.200GAN5004 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9837} G3N500I +PERO2              =  0.750GD04000 + 0.250GAN5004 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9838} G3N500I +PERO3              =  0.800GD04000 + 0.200GAN5004 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9839} G3N500I +PERO5              =  0.650GD04000 + 0.350GAN5004 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9840} G3N500I +PERO6              =  0.650GD04000 + 0.350GAN5004 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9841} G3N500I +PERO9              =       GD04000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9842} G1D500S                     =       G2D500K                                               : ARR( 0.240E+12,  4177., 0.0);
+{  9843} G1D500S                     =       GD04000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{  9844} G1N503O                     =       G3N5004                                               : ARR( 0.800E+11,  5278., 0.0);
+{  9845} G1N503O                     =       GD02000 +      G2N300A                                : ARR( 0.200E+15,  6864., 0.0);
+{  9846} G2D500K +GNO                =       G1D500T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9847} G2D500K +GNO                =       GND500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9848} G2D500K +GHO2               =       GHD5009                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9849} G2D500K +GNO3               =       G1D500T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9850} G2D500K +MEPERO             =  0.480G1D500T + 0.260GDO5006 + 0.260GDD5000                 : ARR( 0.146E-12,  -445., 0.0);
+{  9851} G2D500K +PERO1              =  0.600G1D500T + 0.200GDO5006 + 0.200GDD5000                 : ARR( 0.112E-12,  -500., 0.0);
+{  9852} G2D500K +PERO2              =  0.560G1D500T + 0.220GDO5006 + 0.220GDD5000                 : ARR( 0.418E-13, -1000., 0.0);
+{  9853} G2D500K +PERO3              =  0.600G1D500T + 0.200GDO5006 + 0.200GDD5000                 : ARR( 0.126E-12,  -850., 0.0);
+{  9854} G2D500K +PERO5              =  0.600G1D500T + 0.200GDO5006 + 0.200GDD5000                 : ARR( 0.473E-11,   850., 0.0);
+{  9855} G2D500K +PERO6              =  0.460G1D500T + 0.270GDO5006 + 0.270GDD5000                 : ARR( 0.434E-13,  -900., 0.0);
+{  9856} G2D500K +PERO9              =  0.800G1D500T + 0.200GDD5000                                : ARR( 0.100E-10,     0., 0.0);
+{  9857} G2N300A +GNO                =       G1N300A +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  9858} G2N300A +GNO                =       GNN3005                                               : ARR( 0.622E-13,  -360., 0.0);
+{  9859} G2N300A +GHO2               =       GHN300A                                               : ARR( 0.179E-12, -1250., 0.0);
+{  9860} G2N300A +GNO3               =       G1N300A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9861} G2N300A +MEPERO             =  0.480G1N300A + 0.260GND3004 + 0.260GND3005                 : ARR( 0.164E-12,  -795., 0.0);
+{  9862} G2N300A +PERO1              =  0.600G1N300A + 0.200GND3004 + 0.200GND3005                 : ARR( 0.126E-12,  -850., 0.0);
+{  9863} G2N300A +PERO2              =  0.560G1N300A + 0.220GND3004 + 0.220GND3005                 : ARR( 0.471E-13, -1350., 0.0);
+{  9864} G2N300A +PERO3              =  0.600G1N300A + 0.200GND3004 + 0.200GND3005                 : ARR( 0.142E-12, -1200., 0.0);
+{  9865} G2N300A +PERO5              =  0.600G1N300A + 0.200GND3004 + 0.200GND3005                 : ARR( 0.533E-11,   500., 0.0);
+{  9866} G2N300A +PERO6              =  0.460G1N300A + 0.270GND3004 + 0.270GND3005                 : ARR( 0.488E-13, -1250., 0.0);
+{  9867} G2N300A +PERO9              =  0.800G1N300A + 0.200GND3005                                : ARR( 0.100E-10,     0., 0.0);
+{  9868} G1D500T                     =       GDK5004 +      GHO2                                   : ARR( 0.800E+11,  2246., 0.0);
+{  9869} GHN501D +GHO                =       GNN500s +      GHO                                    : ARR( 0.336E-11,     0., 0.0);
+{  9870} GHN501D +GHO                =       G2N5012                                               : ARR( 0.198E-11,  -190., 0.0);
+{  9871} GHN501D+HV               =       G1H500M +      GNO2                                   :  0.100E+01*SUN;
+{  9872} GHN501D+HV               =       G1H500R +      GNO2                                   :  0.100E+01*SUN;
+{  9873} GHN501D+HV               =       G1N5013 +      GHO                                    :  0.100E+01*SUN;
+{  9874} GHH500G +GHO                =       GHN501E +      GHO                                    : ARR( 0.339E-10,     0., 0.0);
+{  9875} GHH500G +GHO                =       GHN5043 +      GHO                                    : ARR( 0.326E-11,     0., 0.0);
+{  9876} GHH500G +GHO                =       G2H500H                                               : ARR( 0.192E-11,  -190., 0.0);
+{  9877} GHH500G +GHO                =       G2H501N                                               : ARR( 0.192E-11,  -190., 0.0);
+{  9878} GHH500G+HV               =       G1H500M +      GHO                                    :  0.100E+01*SUN;
+{  9879} GHH500G+HV               =       G1H502W +      GNO2                                   :  0.100E+01*SUN;
+{  9880} GHH500G+HV               =       G1H501Z +      GHO                                    :  0.100E+01*SUN;
+{  9881} G2H501N +GNO                =       G1H501Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9882} G2H501N +GNO                =       GHN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9883} G2H501N +GHO2               =       GHH500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9884} G2H501N +GNO3               =       G1H501Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9885} G2H501N +MEPERO             =  0.480G1H501Z + 0.260GHN500l + 0.260GHN5043                 : ARR( 0.164E-12,  -795., 0.0);
+{  9886} G2H501N +PERO1              =  0.600G1H501Z + 0.200GHN500l + 0.200GHN5043                 : ARR( 0.126E-12,  -850., 0.0);
+{  9887} G2H501N +PERO2              =  0.560G1H501Z + 0.220GHN500l + 0.220GHN5043                 : ARR( 0.471E-13, -1350., 0.0);
+{  9888} G2H501N +PERO3              =  0.600G1H501Z + 0.200GHN500l + 0.200GHN5043                 : ARR( 0.142E-12, -1200., 0.0);
+{  9889} G2H501N +PERO5              =  0.600G1H501Z + 0.200GHN500l + 0.200GHN5043                 : ARR( 0.533E-11,   500., 0.0);
+{  9890} G2H501N +PERO6              =  0.460G1H501Z + 0.270GHN500l + 0.270GHN5043                 : ARR( 0.488E-13, -1250., 0.0);
+{  9891} G2H501N +PERO9              =  0.800G1H501Z + 0.200GHN5043                                : ARR( 0.100E-10,     0., 0.0);
+{  9892} G1H502W                     =       G2H501O                                               : ARR( 0.240E+12,  4177., 0.0);
+{  9893} G1H502W                     =       G2H3003 +      GHD2000                                : ARR( 0.200E+15,  6985., 0.0);
+{  9894} G1H502W                     =       GHD4002 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{  9895} G2H501O +GNO                =       G1H502X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9896} G2H501O +GNO                =       GHH501L                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9897} G2H501O +GHO2               =       GHH501M                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9898} G2H501O +GNO3               =       G1H502X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9899} G2H501O +MEPERO             =  0.480G1H502X + 0.260GHH501N + 0.260GHH501O                 : ARR( 0.164E-12,  -795., 0.0);
+{  9900} G2H501O +PERO1              =  0.600G1H502X + 0.200GHH501N + 0.200GHH501O                 : ARR( 0.126E-12,  -850., 0.0);
+{  9901} G2H501O +PERO2              =  0.560G1H502X + 0.220GHH501N + 0.220GHH501O                 : ARR( 0.471E-13, -1350., 0.0);
+{  9902} G2H501O +PERO3              =  0.600G1H502X + 0.200GHH501N + 0.200GHH501O                 : ARR( 0.142E-12, -1200., 0.0);
+{  9903} G2H501O +PERO5              =  0.600G1H502X + 0.200GHH501N + 0.200GHH501O                 : ARR( 0.533E-11,   500., 0.0);
+{  9904} G2H501O +PERO6              =  0.460G1H502X + 0.270GHH501N + 0.270GHH501O                 : ARR( 0.488E-13, -1250., 0.0);
+{  9905} G2H501O +PERO9              =  0.800G1H502X + 0.200GHH501O                                : ARR( 0.100E-10,     0., 0.0);
+{  9906} G1H502X                     =       GHH500K +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{  9907} GHN501E +GHO                =       GHK500D +      GNO2                                   : ARR( 0.388E-12,     0., 0.0);
+{  9908} GHN501E +GHO                =       GND500L +      GHO                                    : ARR( 0.334E-11,     0., 0.0);
+{  9909} GHN501E +GHO                =       G2N5016                                               : ARR( 0.197E-11,  -190., 0.0);
+{  9910} GHN501E+HV               =       G3K2000 +      G2H3008                                :  0.100E+01*SUN;
+{  9911} GHN501E+HV               =       GK03000 +      GDD2000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{  9912} GHN501E+HV               =       G1H500h +      GNO2                                   :  0.100E+01*SUN;
+{  9913} GHN501E+HV               =       G1N5017 +      GHO                                    :  0.100E+01*SUN;
+{  9914} G2H3008 +GNO                =       G1H3008 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{  9915} G2H3008 +GNO                =       GHN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{  9916} G2H3008 +GHO2               =       GHH3006                                               : ARR( 0.179E-12, -1250., 0.0);
+{  9917} G2H3008 +GNO3               =       G1H3008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9918} G2H3008 +MEPERO             =  0.480G1H3008 + 0.260GHN3009 + 0.260GHN300A                 : ARR( 0.164E-12,  -795., 0.0);
+{  9919} G2H3008 +PERO1              =  0.600G1H3008 + 0.200GHN3009 + 0.200GHN300A                 : ARR( 0.126E-12,  -850., 0.0);
+{  9920} G2H3008 +PERO2              =  0.560G1H3008 + 0.220GHN3009 + 0.220GHN300A                 : ARR( 0.471E-13, -1350., 0.0);
+{  9921} G2H3008 +PERO3              =  0.600G1H3008 + 0.200GHN3009 + 0.200GHN300A                 : ARR( 0.142E-12, -1200., 0.0);
+{  9922} G2H3008 +PERO5              =  0.600G1H3008 + 0.200GHN3009 + 0.200GHN300A                 : ARR( 0.533E-11,   500., 0.0);
+{  9923} G2H3008 +PERO6              =  0.460G1H3008 + 0.270GHN3009 + 0.270GHN300A                 : ARR( 0.488E-13, -1250., 0.0);
+{  9924} G2H3008 +PERO9              =  0.800G1H3008 + 0.200GHN300A                                : ARR( 0.100E-10,     0., 0.0);
+{  9925} GHD5008 +GHO                =       G2H501P                                               : ARR( 0.459E-11,     0., 0.0);
+{  9926} GHD5008 +GHO                =       GDK5006 +      GHO                                    : ARR( 0.257E-10,     0., 0.0);
+{  9927} GHD5008 +GHO                =       G3H500B                                               : ARR( 0.213E-10,     0., 0.0);
+{  9928} GHD5008 +GHO                =       G2D500L                                               : ARR( 0.195E-11,  -190., 0.0);
+{  9929} GHD5008 +GNO3               =       G3H500B +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9930} GHD5008+HV               =       G1D500S +      GHO                                    :  0.100E+01*SUN;
+{  9931} GHD5008+HV               =       GD04000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{  9932} G2H501P +GNO                =       G1H502Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9933} G2H501P +GNO                =       GHN5044                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9934} G2H501P +GHO2               =       GHH501P                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9935} G2H501P +GNO3               =       G1H502Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9936} G2H501P +MEPERO             =  0.340G1H502Y + 0.330GHD500j + 0.330GHD500T                 : ARR( 0.565E-13,  -845., 0.0);
+{  9937} G2H501P +PERO1              =  0.460G1H502Y + 0.270GHD500j + 0.270GHD500T                 : ARR( 0.434E-13,  -900., 0.0);
+{  9938} G2H501P +PERO2              =  0.400G1H502Y + 0.300GHD500j + 0.300GHD500T                 : ARR( 0.162E-13, -1400., 0.0);
+{  9939} G2H501P +PERO3              =  0.460G1H502Y + 0.270GHD500j + 0.270GHD500T                 : ARR( 0.488E-13, -1250., 0.0);
+{  9940} G2H501P +PERO5              =  0.460G1H502Y + 0.270GHD500j + 0.270GHD500T                 : ARR( 0.183E-11,   450., 0.0);
+{  9941} G2H501P +PERO6              =  0.300G1H502Y + 0.350GHD500j + 0.350GHD500T                 : ARR( 0.168E-13, -1300., 0.0);
+{  9942} G2H501P +PERO9              =  0.650G1H502Y + 0.350GHD500T                                : ARR( 0.100E-10,     0., 0.0);
+{  9943} G3H500B +GHO2               =  0.800GGH5003 + 0.200GAH5003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9944} G3H500B +GNO                =       GD04000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  9945} G3H500B +GNO2               =       GPH5003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9946} G3H500B +GNO3               =       GD04000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  9947} G3H500B +MEPERO             =  0.685GD04000 + 0.315GAH5003 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9948} G3H500B +PERO1              =  0.800GD04000 + 0.200GAH5003 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9949} G3H500B +PERO2              =  0.750GD04000 + 0.250GAH5003 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9950} G3H500B +PERO3              =  0.800GD04000 + 0.200GAH5003 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9951} G3H500B +PERO5              =  0.650GD04000 + 0.350GAH5003 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9952} G3H500B +PERO6              =  0.650GD04000 + 0.350GAH5003 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9953} G3H500B +PERO9              =       GD04000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9954} G2D500L +GNO                =       G1D500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9955} G2D500L +GNO                =       GND500G                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9956} G2D500L +GHO2               =       GHD5008                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9957} G2D500L +GNO3               =       G1D500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9958} G2D500L +MEPERO             =  0.340G1D500S + 0.330GDO5007 + 0.330GDK5006                 : ARR( 0.565E-13,  -845., 0.0);
+{  9959} G2D500L +PERO1              =  0.460G1D500S + 0.270GDO5007 + 0.270GDK5006                 : ARR( 0.434E-13,  -900., 0.0);
+{  9960} G2D500L +PERO2              =  0.400G1D500S + 0.300GDO5007 + 0.300GDK5006                 : ARR( 0.162E-13, -1400., 0.0);
+{  9961} G2D500L +PERO3              =  0.460G1D500S + 0.270GDO5007 + 0.270GDK5006                 : ARR( 0.488E-13, -1250., 0.0);
+{  9962} G2D500L +PERO5              =  0.460G1D500S + 0.270GDO5007 + 0.270GDK5006                 : ARR( 0.183E-11,   450., 0.0);
+{  9963} G2D500L +PERO6              =  0.300G1D500S + 0.350GDO5007 + 0.350GDK5006                 : ARR( 0.168E-13, -1300., 0.0);
+{  9964} G2D500L +PERO9              =  0.650G1D500S + 0.350GDK5006                                : ARR( 0.100E-10,     0., 0.0);
+{  9965} G1H502Y                     =       GD03000 +      GDD2000 +      GHO                     : ARR( 0.200E+15,  4662., 0.0);
+{  9966} GDO5007 +GHO                =       G2D500M                                               : ARR( 0.469E-11,     0., 0.0);
+{  9967} GDO5007 +GHO                =       GDK5006 +      GHO2                                   : ARR( 0.657E-11,     0., 0.0);
+{  9968} GDO5007 +GHO                =       G3K500B                                               : ARR( 0.217E-10,     0., 0.0);
+{  9969} GDO5007 +GNO3               =       G3K500B +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{  9970} GDO5007+HV               =       GD04000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{  9971} G2D500M +GNO                =       G1D500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{  9972} G2D500M +GNO                =       GND500O                                               : ARR( 0.182E-12,  -360., 0.0);
+{  9973} G2D500M +GHO2               =       GHD500k                                               : ARR( 0.242E-12, -1250., 0.0);
+{  9974} G2D500M +GNO3               =       G1D500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{  9975} G2D500M +MEPERO             =  0.340G1D500U + 0.330GDO500C + 0.330GDK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{  9976} G2D500M +PERO1              =  0.460G1D500U + 0.270GDO500C + 0.270GDK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{  9977} G2D500M +PERO2              =  0.400G1D500U + 0.300GDO500C + 0.300GDK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{  9978} G2D500M +PERO3              =  0.460G1D500U + 0.270GDO500C + 0.270GDK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{  9979} G2D500M +PERO5              =  0.460G1D500U + 0.270GDO500C + 0.270GDK5009                 : ARR( 0.183E-11,   450., 0.0);
+{  9980} G2D500M +PERO6              =  0.300G1D500U + 0.350GDO500C + 0.350GDK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{  9981} G2D500M +PERO9              =  0.650G1D500U + 0.350GDK5009                                : ARR( 0.100E-10,     0., 0.0);
+{  9982} G3K500B +GHO2               =  0.800GGO5003 + 0.200GAO5003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{  9983} G3K500B +GNO                =       GD04000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{  9984} G3K500B +GNO2               =       GPO5003                                               : ARR( 0.330E-08,     0.,-1.0);
+{  9985} G3K500B +GNO3               =       GD04000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{  9986} G3K500B +MEPERO             =  0.685GD04000 + 0.315GAO5003 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9987} G3K500B +PERO1              =  0.800GD04000 + 0.200GAO5003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9988} G3K500B +PERO2              =  0.750GD04000 + 0.250GAO5003 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9989} G3K500B +PERO3              =  0.800GD04000 + 0.200GAO5003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9990} G3K500B +PERO5              =  0.650GD04000 + 0.350GAO5003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9991} G3K500B +PERO6              =  0.650GD04000 + 0.350GAO5003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{  9992} G3K500B +PERO9              =       GD04000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{  9993} G1D500U                     =       GD03000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3453., 0.0);
+{  9994} GDK5006 +GHO                =       G2D500N                                               : ARR( 0.387E-11,     0., 0.0);
+{  9995} GDK5006 +GHO                =       G3K4001 +      GCO                                    : ARR( 0.135E-10,     0., 0.0);
+{  9996} GDK5006 +GNO3               =       G3K4001 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{  9997} GDK5006+HV               =       G3K4001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{  9998} GDK5006+HV               =       GD04000 +      GCO                                    :  0.100E+01*SUN;
+{  9999} GDK5006+HV               =       GC03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 10000} G2D500N +GNO                =       G1D500W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10001} G2D500N +GNO                =       GND500K                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10002} G2D500N +GHO2               =       GHD500l                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10003} G2D500N +GNO3               =       G1D500W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10004} G2D500N +MEPERO             =  0.480G1D500W + 0.260GDK5001 + 0.260GDK500C                 : ARR( 0.616E-11,   905., 0.0);
+{ 10005} G2D500N +PERO1              =  0.600G1D500W + 0.200GDK5001 + 0.200GDK500C                 : ARR( 0.473E-11,   850., 0.0);
+{ 10006} G2D500N +PERO2              =  0.560G1D500W + 0.220GDK5001 + 0.220GDK500C                 : ARR( 0.177E-11,   350., 0.0);
+{ 10007} G2D500N +PERO3              =  0.600G1D500W + 0.200GDK5001 + 0.200GDK500C                 : ARR( 0.533E-11,   500., 0.0);
+{ 10008} G2D500N +PERO5              =  0.600G1D500W + 0.200GDK5001 + 0.200GDK500C                 : ARR( 0.200E-09,  2200., 0.0);
+{ 10009} G2D500N +PERO6              =  0.460G1D500W + 0.270GDK5001 + 0.270GDK500C                 : ARR( 0.183E-11,   450., 0.0);
+{ 10010} G2D500N +PERO9              =  0.800G1D500W + 0.200GDK500C                                : ARR( 0.100E-10,     0., 0.0);
+{ 10011} G1D500W                     =       G3K4000 +      GCO                                    : ARR( 0.800E+11,  4780., 0.0);
+{ 10012} G1D500W                     =       GD02000 +      G2D3002                                : ARR( 0.200E+15,  6613., 0.0);
+{ 10013} GHN501F +GHO                =       GND500K +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 10014} GHN501F +GHO                =       G2N5014                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 10015} GHN501F+HV               =       G1H500N +      GNO2                                   :  0.100E+01*SUN;
+{ 10016} GHN501F+HV               =       G3N4002 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10017} GHN501F+HV               =       G2D2000 +      GHK3000 +      GNO2                    :  0.100E+01*SUN;
+{ 10018} GHN501F+HV               =       G1N5015 +      GHO                                    :  0.100E+01*SUN;
+{ 10019} GHH500H +GHO                =       GHK500D +      GHO                                    : ARR( 0.114E-09,     0., 0.0);
+{ 10020} GHH500H +GHO                =       GHD500l +      GHO                                    : ARR( 0.105E-10,     0., 0.0);
+{ 10021} GHH500H+HV               =       G1H500N +      GHO                                    :  0.100E+01*SUN;
+{ 10022} GHH500H+HV               =       G3H4001 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10023} GHH500H+HV               =       G2D2000 +      GHK3000 +      GHO                     :  0.100E+01*SUN;
+{ 10024} GHH500H+HV               =       G1H501s +      GHO                                    :  0.100E+01*SUN;
+{ 10025} GHK500D +GHO                =       GDK500C +      GHO                                    : ARR( 0.103E-10,     0., 0.0);
+{ 10026} GHK500D +GHO                =       G2K500I                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 10027} GHK500D+HV               =       G3K2000 +      G2H3002                                :  0.100E+01*SUN;
+{ 10028} GHK500D+HV               =       G3K4003 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10029} GHK500D+HV               =       G1K500J +      GHO                                    :  0.100E+01*SUN;
+{ 10030} GHH3002 +GHO                =       GHD3001 +      GHO                                    : ARR( 0.196E-10,     0., 0.0);
+{ 10031} GHH3002 +GHO                =       G2H3002                                               : ARR( 0.380E-11,  -190., 0.0);
+{ 10032} GHH3002+HV               =       G1H3003 +      GHO                                    :  0.200E+01*SUN;
+{ 10033} GHH3002+HV               =       G3H2000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10034} GHK3001 +GHO                =       GHD3001 +      GHO2                                   : ARR( 0.247E-11,     0., 0.0);
+{ 10035} GHK3001 +GHO                =       GDK3001 +      GHO                                    : ARR( 0.989E-11,     0., 0.0);
+{ 10036} GHK3001 +GHO                =       G2K3001                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 10037} GHK3001+HV               =       G3K2001 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10038} GHK3001+HV               =       G1K3001 +      GHO                                    :  0.100E+01*SUN;
+{ 10039} GHD3001 +GHO                =       GDD3002 +      GHO                                    : ARR( 0.981E-11,     0., 0.0);
+{ 10040} GHD3001 +GHO                =       G3H2000 +      GCO                                    : ARR( 0.127E-10,     0., 0.0);
+{ 10041} GHD3001 +GHO                =       G2D3002                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 10042} GHD3001 +GNO3               =       G3H2000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 10043} GHD3001+HV               =       G1D3002 +      GHO                                    :  0.100E+01*SUN;
+{ 10044} GHD3001+HV               =       G3H2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10045} GHD3001+HV               =       GHD2000 +      GCO                                    :  0.100E+01*SUN;
+{ 10046} GHD3001+HV               =       GCH3OOH +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 10047} GGH2000 +GHO                =       GGD2000 +      GHO                                    : ARR( 0.981E-11,     0., 0.0);
+{ 10048} GGH2000 +GHO                =       G2G2000                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 10049} GGH2000 +GHO                =       G3H2000                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 10050} GGH2000+HV               =       G1G2000 +      GHO                                    :  0.100E+01*SUN;
+{ 10051} GGH2000+HV               =       GCH2O   +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 10052} GAH2000 +GHO                =       GAD2000 +      GHO                                    : ARR( 0.761E-11,     0., 0.0);
+{ 10053} GAH2000 +GHO                =       G2A2000                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 10054} GAH2000+HV               =       G1A2000 +      GHO                                    :  0.100E+01*SUN;
+{ 10055}  GPH2000    +M                 =       G3H2000 +      GNO2            +M                     : FALL( 0.280E+17, 13580., 0.0, 0.190E-02, 12175., 0.0,0.60);
+{ 10056} GPH2000 +GHO                =       GPD2000 +      GHO                                    : ARR( 0.981E-11,     0., 0.0);
+{ 10057} GPH2000 +GHO                =       G2P2000                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 10058} GPH2000+HV               =       G1P2000 +      GHO                                    :  0.100E+01*SUN;
+{ 10059} GPH2000+HV               =       G3H2000 +      GNO2                                   :  0.100E+01*SUN;
+{ 10060} GGH3000 +GHO                =       GGD3000 +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{ 10061} GGH3000 +GHO                =       G2G3000                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 10062} GGH3000 +GHO                =       G3H3000                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 10063} GGH3000+HV               =       G1G3000 +      GHO                                    :  0.100E+01*SUN;
+{ 10064} GGH3000+HV               =       G2H2000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 10065} GAH3000 +GHO                =       GAD3000 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{ 10066} GAH3000 +GHO                =       G2A3000                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 10067} GAH3000+HV               =       G1A3000 +      GHO                                    :  0.100E+01*SUN;
+{ 10068} GPH3000                     =       G3H3000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 10069} GPH3000 +GHO                =       GPD3000 +      GHO                                    : ARR( 0.168E-10,     0., 0.0);
+{ 10070} GPH3000 +GHO                =       G2P3000                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 10071} GPH3000+HV               =       G1P3000 +      GHO                                    :  0.100E+01*SUN;
+{ 10072} GPH3000+HV               =       G3H3000 +      GNO2                                   :  0.100E+01*SUN;
+{ 10073} GHD4002 +GHO                =       GDK4000 +      GHO                                    : ARR( 0.110E-09,     0., 0.0);
+{ 10074} GHD4002 +GHO                =       G3H4001                                               : ARR( 0.215E-10,     0., 0.0);
+{ 10075} GHD4002 +GNO3               =       G3H4001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10076} GHD4002+HV               =       G1D4000 +      GHO                                    :  0.100E+01*SUN;
+{ 10077} GHD4002+HV               =       G2H3003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10078} GHD4002+HV               =       G2D2000 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{ 10079} GND500H +GHO                =       G2N5035                                               : ARR( 0.455E-11,     0., 0.0);
+{ 10080} GND500H +GHO                =       GND5009 +      GHO2                                   : ARR( 0.638E-11,     0., 0.0);
+{ 10081} GND500H +GHO                =       G3N500J                                               : ARR( 0.211E-10,     0., 0.0);
+{ 10082} GND500H +GNO3               =       G3N500J +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10083} GND500H+HV               =       G1D500T +      GNO2                                   :  0.100E+01*SUN;
+{ 10084} GND500H+HV               =       GND4001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 10085} G2N5035 +GNO                =       G1N503P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10086} G2N5035 +GNO                =       GNN5019                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10087} G2N5035 +GHO2               =       GHN5045                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10088} G2N5035 +GNO3               =       G1N503P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10089} G2N5035 +MEPERO             =  0.340G1N503P + 0.330GND500t + 0.330GND500U                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10090} G2N5035 +PERO1              =  0.460G1N503P + 0.270GND500t + 0.270GND500U                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10091} G2N5035 +PERO2              =  0.400G1N503P + 0.300GND500t + 0.300GND500U                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10092} G2N5035 +PERO3              =  0.460G1N503P + 0.270GND500t + 0.270GND500U                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10093} G2N5035 +PERO5              =  0.460G1N503P + 0.270GND500t + 0.270GND500U                 : ARR( 0.183E-11,   450., 0.0);
+{ 10094} G2N5035 +PERO6              =  0.300G1N503P + 0.350GND500t + 0.350GND500U                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10095} G2N5035 +PERO9              =  0.650G1N503P + 0.350GND500U                                : ARR( 0.100E-10,     0., 0.0);
+{ 10096} G3N500J +GHO2               =  0.800GGN500B + 0.200GAN500B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10097} G3N500J +GNO                =       GND4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 10098} G3N500J +GNO2               =       GPN500D                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10099} G3N500J +GNO3               =       GND4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 10100} G3N500J +MEPERO             =  0.685GND4001 + 0.315GAN500B + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10101} G3N500J +PERO1              =  0.800GND4001 + 0.200GAN500B + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10102} G3N500J +PERO2              =  0.750GND4001 + 0.250GAN500B + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10103} G3N500J +PERO3              =  0.800GND4001 + 0.200GAN500B + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10104} G3N500J +PERO5              =  0.650GND4001 + 0.350GAN500B + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10105} G3N500J +PERO6              =  0.650GND4001 + 0.350GAN500B + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10106} G3N500J +PERO9              =       GND4001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 10107} G1N503P                     =       GND3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3453., 0.0);
+{ 10108} GHH500I +GHO                =       GHD500A +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{ 10109} GHH500I +GHO                =       G2H501Q                                               : ARR( 0.458E-11,     0., 0.0);
+{ 10110} GHH500I +GHO                =       GHD500m +      GHO                                    : ARR( 0.100E-10,     0., 0.0);
+{ 10111} GHH500I +GHO                =       G2H501R                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 10112} GHH500I +GHO                =       G2H501S                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 10113} GHH500I+HV               =       G1H500y +      GHO                                    :  0.100E+01*SUN;
+{ 10114} GHH500I+HV               =       G3H4005 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10115} GHH500I+HV               =       G2D2000 +      GHK3000 +      GHO                     :  0.100E+01*SUN;
+{ 10116} GHH500I+HV               =       G1H502K +      GHO                                    :  0.100E+01*SUN;
+{ 10117} G2H501Q +GNO                =       G1H502Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10118} G2H501Q +GNO                =       GHH501Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10119} G2H501Q +GHO2               =       GHH501R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10120} G2H501Q +GNO3               =       G1H502Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10121} G2H501Q +MEPERO             =  0.340G1H502Z + 0.330GHH501S + 0.330GHH501T                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10122} G2H501Q +PERO1              =  0.460G1H502Z + 0.270GHH501S + 0.270GHH501T                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10123} G2H501Q +PERO2              =  0.400G1H502Z + 0.300GHH501S + 0.300GHH501T                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10124} G2H501Q +PERO3              =  0.460G1H502Z + 0.270GHH501S + 0.270GHH501T                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10125} G2H501Q +PERO5              =  0.460G1H502Z + 0.270GHH501S + 0.270GHH501T                 : ARR( 0.183E-11,   450., 0.0);
+{ 10126} G2H501Q +PERO6              =  0.300G1H502Z + 0.350GHH501S + 0.350GHH501T                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10127} G2H501Q +PERO9              =  0.650G1H502Z + 0.350GHH501T                                : ARR( 0.100E-10,     0., 0.0);
+{ 10128} G2H501R +GNO                =       G1H500y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10129} G2H501R +GNO                =       GHN500O                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10130} G2H501R +GHO2               =       GHH500I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10131} G2H501R +GNO3               =       G1H500y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10132} G2H501R +MEPERO             =  0.480G1H500y + 0.260GHK5002 + 0.260GHD500A                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10133} G2H501R +PERO1              =  0.600G1H500y + 0.200GHK5002 + 0.200GHD500A                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10134} G2H501R +PERO2              =  0.560G1H500y + 0.220GHK5002 + 0.220GHD500A                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10135} G2H501R +PERO3              =  0.600G1H500y + 0.200GHK5002 + 0.200GHD500A                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10136} G2H501R +PERO5              =  0.600G1H500y + 0.200GHK5002 + 0.200GHD500A                 : ARR( 0.473E-11,   850., 0.0);
+{ 10137} G2H501R +PERO6              =  0.460G1H500y + 0.270GHK5002 + 0.270GHD500A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10138} G2H501R +PERO9              =  0.800G1H500y + 0.200GHD500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 10139} G2H501S +GNO                =       G1H502K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10140} G2H501S +GNO                =       GHN5017                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10141} G2H501S +GHO2               =       GHH500I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10142} G2H501S +GNO3               =       G1H502K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10143} G2H501S +MEPERO             =  0.480G1H502K + 0.260GHK500I + 0.260GHD500m                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10144} G2H501S +PERO1              =  0.600G1H502K + 0.200GHK500I + 0.200GHD500m                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10145} G2H501S +PERO2              =  0.560G1H502K + 0.220GHK500I + 0.220GHD500m                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10146} G2H501S +PERO3              =  0.600G1H502K + 0.200GHK500I + 0.200GHD500m                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10147} G2H501S +PERO5              =  0.600G1H502K + 0.200GHK500I + 0.200GHD500m                 : ARR( 0.533E-11,   500., 0.0);
+{ 10148} G2H501S +PERO6              =  0.460G1H502K + 0.270GHK500I + 0.270GHD500m                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10149} G2H501S +PERO9              =  0.800G1H502K + 0.200GHD500m                                : ARR( 0.100E-10,     0., 0.0);
+{ 10150} G1H502Z                     =       GHD500e +      GHO                                    : ARR( 0.160E+12,  4168., 0.0);
+{ 10151} G1H502Z                     =       G2H3002 +      GHD2000                                : ARR( 0.200E+15,  7289., 0.0);
+{ 10152} G1H502Z                     =       GHD4004 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6757., 0.0);
+{ 10153} GHD5009 +GHO                =       GDD5000 +      GHO                                    : ARR( 0.166E-10,     0., 0.0);
+{ 10154} GHD5009 +GHO                =       G2H501T                                               : ARR( 0.462E-11,     0., 0.0);
+{ 10155} GHD5009 +GHO                =       GHD500m +      GHO2                                   : ARR( 0.647E-11,     0., 0.0);
+{ 10156} GHD5009 +GHO                =       G3H500C                                               : ARR( 0.214E-10,     0., 0.0);
+{ 10157} GHD5009 +GHO                =       G2D500K                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 10158} GHD5009 +GNO3               =       G3H500C +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10159} GHD5009+HV               =       G1D500T +      GHO                                    :  0.100E+01*SUN;
+{ 10160} GHD5009+HV               =       GHD4001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 10161} G2H501T +GNO                =       G1H502a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10162} G2H501T +GNO                =       GHN5046                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10163} G2H501T +GHO2               =       GHH501U                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10164} G2H501T +GNO3               =       G1H502a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10165} G2H501T +MEPERO             =  0.340G1H502a + 0.330GHD500n + 0.330GHD500o                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10166} G2H501T +PERO1              =  0.460G1H502a + 0.270GHD500n + 0.270GHD500o                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10167} G2H501T +PERO2              =  0.400G1H502a + 0.300GHD500n + 0.300GHD500o                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10168} G2H501T +PERO3              =  0.460G1H502a + 0.270GHD500n + 0.270GHD500o                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10169} G2H501T +PERO5              =  0.460G1H502a + 0.270GHD500n + 0.270GHD500o                 : ARR( 0.183E-11,   450., 0.0);
+{ 10170} G2H501T +PERO6              =  0.300G1H502a + 0.350GHD500n + 0.350GHD500o                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10171} G2H501T +PERO9              =  0.650G1H502a + 0.350GHD500o                                : ARR( 0.100E-10,     0., 0.0);
+{ 10172} G3H500C +GHO2               =  0.800GGH500E + 0.200GAH500E + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10173} G3H500C +GNO                =       GHD4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 10174} G3H500C +GNO2               =       GPH500E                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10175} G3H500C +GNO3               =       GHD4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 10176} G3H500C +MEPERO             =  0.685GHD4001 + 0.315GAH500E + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10177} G3H500C +PERO1              =  0.800GHD4001 + 0.200GAH500E + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10178} G3H500C +PERO2              =  0.750GHD4001 + 0.250GAH500E + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10179} G3H500C +PERO3              =  0.800GHD4001 + 0.200GAH500E + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10180} G3H500C +PERO5              =  0.650GHD4001 + 0.350GAH500E + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10181} G3H500C +PERO6              =  0.650GHD4001 + 0.350GAH500E + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10182} G3H500C +PERO9              =       GHD4001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 10183} G1H502a                     =       GHD3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3453., 0.0);
+{ 10184} GHD500A +GHO                =       GDD5004 +      GHO                                    : ARR( 0.981E-11,     0., 0.0);
+{ 10185} GHD500A +GHO                =       G2H501U                                               : ARR( 0.273E-11,     0., 0.0);
+{ 10186} GHD500A +GHO                =       G2H501W                                               : ARR( 0.273E-11,     0., 0.0);
+{ 10187} GHD500A +GHO                =       G3H500D                                               : ARR( 0.208E-10,     0., 0.0);
+{ 10188} GHD500A +GHO                =       G2D500O                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 10189} GHD500A +GNO3               =       G3H500D +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10190} GHD500A+HV               =       G1D500N +      GHO                                    :  0.100E+01*SUN;
+{ 10191} GHD500A+HV               =       G3H2000 +      G2D3001                                :  0.100E+01*SUN;
+{ 10192} GHD500A+HV               =       G2H400H +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10193} G2H501U +GNO                =       G1H502b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10194} G2H501U +GNO                =       GHN5047                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10195} G2H501U +GHO2               =       GHH501W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10196} G2H501U +GNO3               =       G1H502b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10197} G2H501U +MEPERO             =  0.340G1H502b + 0.330GHD500p + 0.330GHD500q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10198} G2H501U +PERO1              =  0.460G1H502b + 0.270GHD500p + 0.270GHD500q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10199} G2H501U +PERO2              =  0.400G1H502b + 0.300GHD500p + 0.300GHD500q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10200} G2H501U +PERO3              =  0.460G1H502b + 0.270GHD500p + 0.270GHD500q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10201} G2H501U +PERO5              =  0.460G1H502b + 0.270GHD500p + 0.270GHD500q                 : ARR( 0.183E-11,   450., 0.0);
+{ 10202} G2H501U +PERO6              =  0.300G1H502b + 0.350GHD500p + 0.350GHD500q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10203} G2H501U +PERO9              =  0.650G1H502b + 0.350GHD500q                                : ARR( 0.100E-10,     0., 0.0);
+{ 10204} G2H501W +GNO                =       G1H502c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10205} G2H501W +GNO                =       GHN5048                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10206} G2H501W +GHO2               =       GHH501X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10207} G2H501W +GNO3               =       G1H502c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10208} G2H501W +MEPERO             =  0.340G1H502c + 0.330GHD500d + 0.330GHD500r                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10209} G2H501W +PERO1              =  0.460G1H502c + 0.270GHD500d + 0.270GHD500r                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10210} G2H501W +PERO2              =  0.400G1H502c + 0.300GHD500d + 0.300GHD500r                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10211} G2H501W +PERO3              =  0.460G1H502c + 0.270GHD500d + 0.270GHD500r                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10212} G2H501W +PERO5              =  0.460G1H502c + 0.270GHD500d + 0.270GHD500r                 : ARR( 0.183E-11,   450., 0.0);
+{ 10213} G2H501W +PERO6              =  0.300G1H502c + 0.350GHD500d + 0.350GHD500r                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10214} G2H501W +PERO9              =  0.650G1H502c + 0.350GHD500r                                : ARR( 0.100E-10,     0., 0.0);
+{ 10215} G3H500D +GHO2               =  0.800GGH500F + 0.200GAH500F + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10216} G3H500D +GNO                =       G2H400H +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10217} G3H500D +GNO2               =       GPH500F                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10218} G3H500D +GNO3               =       G2H400H +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10219} G3H500D +MEPERO             =  0.685G2H400H + 0.315GAH500F + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10220} G3H500D +PERO1              =  0.800G2H400H + 0.200GAH500F + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10221} G3H500D +PERO2              =  0.750G2H400H + 0.250GAH500F + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10222} G3H500D +PERO3              =  0.800G2H400H + 0.200GAH500F + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10223} G3H500D +PERO5              =  0.650G2H400H + 0.350GAH500F + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10224} G3H500D +PERO6              =  0.650G2H400H + 0.350GAH500F + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10225} G3H500D +PERO9              =       G2H400H +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10226} G2D500O +GNO                =       G1D500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10227} G2D500O +GNO                =       GND500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10228} G2D500O +GHO2               =       GHD500A                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10229} G2D500O +GNO3               =       G1D500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10230} G2D500O +MEPERO             =  0.480G1D500N + 0.260GDK5007 + 0.260GDD5004                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10231} G2D500O +PERO1              =  0.600G1D500N + 0.200GDK5007 + 0.200GDD5004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10232} G2D500O +PERO2              =  0.560G1D500N + 0.220GDK5007 + 0.220GDD5004                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10233} G2D500O +PERO3              =  0.600G1D500N + 0.200GDK5007 + 0.200GDD5004                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10234} G2D500O +PERO5              =  0.600G1D500N + 0.200GDK5007 + 0.200GDD5004                 : ARR( 0.533E-11,   500., 0.0);
+{ 10235} G2D500O +PERO6              =  0.460G1D500N + 0.270GDK5007 + 0.270GDD5004                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10236} G2D500O +PERO9              =  0.800G1D500N + 0.200GDD5004                                : ARR( 0.100E-10,     0., 0.0);
+{ 10237} G2H400H +GNO                =       G1H400K +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10238} G2H400H +GNO                =       GHN400K                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10239} G2H400H +GHO2               =       GHH400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10240} G2H400H +GNO3               =       G1H400K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10241} G2H400H +MEPERO             =  0.480G1H400K + 0.260GHK4003 + 0.260GHD4004                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10242} G2H400H +PERO1              =  0.600G1H400K + 0.200GHK4003 + 0.200GHD4004                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10243} G2H400H +PERO2              =  0.560G1H400K + 0.220GHK4003 + 0.220GHD4004                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10244} G2H400H +PERO3              =  0.600G1H400K + 0.200GHK4003 + 0.200GHD4004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10245} G2H400H +PERO5              =  0.600G1H400K + 0.200GHK4003 + 0.200GHD4004                 : ARR( 0.473E-11,   850., 0.0);
+{ 10246} G2H400H +PERO6              =  0.460G1H400K + 0.270GHK4003 + 0.270GHD4004                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10247} G2H400H +PERO9              =  0.800G1H400K + 0.200GHD4004                                : ARR( 0.100E-10,     0., 0.0);
+{ 10248} G1H502b                     =       G3H2000 +      GDD3000                                : ARR( 0.200E+15,  2372., 0.0);
+{ 10249} G1H502c                     =       GHD4004 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5054., 0.0);
+{ 10250} G1H400K +OXYGEN             =       GHD4004 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 10251} G1H400K                     =       GDK4005 +      GHO                                    : ARR( 0.160E+12,  4168., 0.0);
+{ 10252} GHN501G +GHO                =       GND500a +      GHO                                    : ARR( 0.172E-10,     0., 0.0);
+{ 10253} GHN501G +GHO                =       G3H500E                                               : ARR( 0.222E-10,     0., 0.0);
+{ 10254} GHN501G +GHO                =       G2N5036                                               : ARR( 0.203E-11,  -190., 0.0);
+{ 10255} GHN501G +GNO3               =       G3H500E +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10256} GHN501G+HV               =       G1N502n +      GHO                                    :  0.100E+01*SUN;
+{ 10257} GHN501G+HV               =       G1H500O +      GNO2                                   :  0.100E+01*SUN;
+{ 10258} GHN501G+HV               =       G2H400I +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10259} GHN501G+HV               =       GHN3008 +      GD02000                                :  0.100E+01*SUN;
+{ 10260} G3H500E +GHO2               =  0.800GGH500G + 0.200GAH500G + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10261} G3H500E +GNO                =       G2H400I +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10262} G3H500E +GNO2               =       GPH500G                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10263} G3H500E +GNO3               =       G2H400I +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10264} G3H500E +MEPERO             =  0.685G2H400I + 0.315GAH500G + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10265} G3H500E +PERO1              =  0.800G2H400I + 0.200GAH500G + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10266} G3H500E +PERO2              =  0.750G2H400I + 0.250GAH500G + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10267} G3H500E +PERO3              =  0.800G2H400I + 0.200GAH500G + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10268} G3H500E +PERO5              =  0.650G2H400I + 0.350GAH500G + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10269} G3H500E +PERO6              =  0.650G2H400I + 0.350GAH500G + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10270} G3H500E +PERO9              =       G2H400I +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10271} G2N5036 +GNO                =       G1N502n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10272} G2N5036 +GNO                =       GNN500f                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10273} G2N5036 +GHO2               =       GHN501G                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10274} G2N5036 +GNO3               =       G1N502n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10275} G2N5036 +MEPERO             =  0.480G1N502n + 0.260GND500I + 0.260GND500a                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10276} G2N5036 +PERO1              =  0.600G1N502n + 0.200GND500I + 0.200GND500a                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10277} G2N5036 +PERO2              =  0.560G1N502n + 0.220GND500I + 0.220GND500a                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10278} G2N5036 +PERO3              =  0.600G1N502n + 0.200GND500I + 0.200GND500a                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10279} G2N5036 +PERO5              =  0.600G1N502n + 0.200GND500I + 0.200GND500a                 : ARR( 0.533E-11,   500., 0.0);
+{ 10280} G2N5036 +PERO6              =  0.460G1N502n + 0.270GND500I + 0.270GND500a                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10281} G2N5036 +PERO9              =  0.800G1N502n + 0.200GND500a                                : ARR( 0.100E-10,     0., 0.0);
+{ 10282} G2H400I +GNO                =       G1H400L +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10283} G2H400I +GNO                =       GHN400X                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10284} G2H400I +GHO2               =       GHH400E                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10285} G2H400I +GNO3               =       G1H400L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10286} G2H400I +MEPERO             =  0.480G1H400L + 0.260GHN400C + 0.260GHN400Y                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10287} G2H400I +PERO1              =  0.600G1H400L + 0.200GHN400C + 0.200GHN400Y                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10288} G2H400I +PERO2              =  0.560G1H400L + 0.220GHN400C + 0.220GHN400Y                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10289} G2H400I +PERO3              =  0.600G1H400L + 0.200GHN400C + 0.200GHN400Y                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10290} G2H400I +PERO5              =  0.600G1H400L + 0.200GHN400C + 0.200GHN400Y                 : ARR( 0.533E-11,   500., 0.0);
+{ 10291} G2H400I +PERO6              =  0.460G1H400L + 0.270GHN400C + 0.270GHN400Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10292} G2H400I +PERO9              =  0.800G1H400L + 0.200GHN400Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 10293} G1H400L                     =       GND4009 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 10294} GHH500J +GHO                =       GHD500O +      GHO                                    : ARR( 0.168E-10,     0., 0.0);
+{ 10295} GHH500J +GHO                =       GHH501W +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{ 10296} GHH500J +GHO                =       GHD500C +      GHO                                    : ARR( 0.137E-09,     0., 0.0);
+{ 10297} GHH500J +GHO                =       G3H500F                                               : ARR( 0.217E-10,     0., 0.0);
+{ 10298} GHH500J +GNO3               =       G3H500F +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10299} GHH500J+HV               =       G1H502T +      GHO                                    :  0.100E+01*SUN;
+{ 10300} GHH500J+HV               =       G1H500O +      GHO                                    :  0.100E+01*SUN;
+{ 10301} GHH500J+HV               =       G2H400J +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10302} GHH500J+HV               =       GHH3002 +      GD02000                                :  0.100E+01*SUN;
+{ 10303} G3H500F +GHO2               =  0.800GGH500H + 0.200GAH500H + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10304} G3H500F +GNO                =       G2H400J +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10305} G3H500F +GNO2               =       GPH500H                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10306} G3H500F +GNO3               =       G2H400J +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10307} G3H500F +MEPERO             =  0.685G2H400J + 0.315GAH500H + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10308} G3H500F +PERO1              =  0.800G2H400J + 0.200GAH500H + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10309} G3H500F +PERO2              =  0.750G2H400J + 0.250GAH500H + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10310} G3H500F +PERO3              =  0.800G2H400J + 0.200GAH500H + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10311} G3H500F +PERO5              =  0.650G2H400J + 0.350GAH500H + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10312} G3H500F +PERO6              =  0.650G2H400J + 0.350GAH500H + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10313} G3H500F +PERO9              =       G2H400J +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10314} G2H400J +GNO                =       G1H400M +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10315} G2H400J +GNO                =       GHH400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10316} G2H400J +GHO2               =       GHH400G                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10317} G2H400J +GNO3               =       G1H400M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10318} G2H400J +MEPERO             =  0.480G1H400M + 0.260GHH4006 + 0.260GHH400H                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10319} G2H400J +PERO1              =  0.600G1H400M + 0.200GHH4006 + 0.200GHH400H                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10320} G2H400J +PERO2              =  0.560G1H400M + 0.220GHH4006 + 0.220GHH400H                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10321} G2H400J +PERO3              =  0.600G1H400M + 0.200GHH4006 + 0.200GHH400H                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10322} G2H400J +PERO5              =  0.600G1H400M + 0.200GHH4006 + 0.200GHH400H                 : ARR( 0.533E-11,   500., 0.0);
+{ 10323} G2H400J +PERO6              =  0.460G1H400M + 0.270GHH4006 + 0.270GHH400H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10324} G2H400J +PERO9              =  0.800G1H400M + 0.200GHH400H                                : ARR( 0.100E-10,     0., 0.0);
+{ 10325} G1H400M                     =       GHD4009 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 10326} GHD500B +GHO                =       GDD5002 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{ 10327} GHD500B +GHO                =       GHD500p +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{ 10328} GHD500B +GHO                =       GHD500C +      GHO2                                   : ARR( 0.346E-10,     0., 0.0);
+{ 10329} GHD500B +GHO                =       G3H500G                                               : ARR( 0.220E-10,     0., 0.0);
+{ 10330} GHD500B +GNO3               =       G3H500G +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10331} GHD500B+HV               =       G1D500O +      GHO                                    :  0.100E+01*SUN;
+{ 10332} GHD500B+HV               =       G2H400K +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10333} GHD500B+HV               =       GHK3001 +      GD02000                                :  0.100E+01*SUN;
+{ 10334} G3H500G +GHO2               =  0.800GGH500I + 0.200GAH500I + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10335} G3H500G +GNO                =       G2H400K +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10336} G3H500G +GNO2               =       GPH500I                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10337} G3H500G +GNO3               =       G2H400K +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10338} G3H500G +MEPERO             =  0.685G2H400K + 0.315GAH500I + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10339} G3H500G +PERO1              =  0.800G2H400K + 0.200GAH500I + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10340} G3H500G +PERO2              =  0.750G2H400K + 0.250GAH500I + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10341} G3H500G +PERO3              =  0.800G2H400K + 0.200GAH500I + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10342} G3H500G +PERO5              =  0.650G2H400K + 0.350GAH500I + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10343} G3H500G +PERO6              =  0.650G2H400K + 0.350GAH500I + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10344} G3H500G +PERO9              =       G2H400K +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10345} G2H400K +GNO                =       G1H400N +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10346} G2H400K +GNO                =       GHN400U                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10347} G2H400K +GHO2               =       GHH400I                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10348} G2H400K +GNO3               =       G1H400N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10349} G2H400K +MEPERO             =  0.480G1H400N + 0.260GHO400B + 0.260GHD400E                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10350} G2H400K +PERO1              =  0.600G1H400N + 0.200GHO400B + 0.200GHD400E                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10351} G2H400K +PERO2              =  0.560G1H400N + 0.220GHO400B + 0.220GHD400E                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10352} G2H400K +PERO3              =  0.600G1H400N + 0.200GHO400B + 0.200GHD400E                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10353} G2H400K +PERO5              =  0.600G1H400N + 0.200GHO400B + 0.200GHD400E                 : ARR( 0.533E-11,   500., 0.0);
+{ 10354} G2H400K +PERO6              =  0.460G1H400N + 0.270GHO400B + 0.270GHD400E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10355} G2H400K +PERO9              =  0.800G1H400N + 0.200GHD400E                                : ARR( 0.100E-10,     0., 0.0);
+{ 10356} G1H400N                     =       GDO4006 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 10357} G1H400N                     =       GHD3005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 10358} GHD500C +GHO                =       GDD5005 +      GHO                                    : ARR( 0.556E-10,     0., 0.0);
+{ 10359} GHD500C +GHO                =       G3H500H                                               : ARR( 0.718E-10,     0., 0.0);
+{ 10360} GHD500C +GNO3               =       G3H500H +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10361} GHD500C+HV               =       G1D500Q +      GHO                                    :  0.100E+01*SUN;
+{ 10362} GHD500C+HV               =       G3H3003 +      G2D2000                                :  0.100E+01*SUN;
+{ 10363} GHD500C+HV               =       G2H400L +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10364} G3H500H +GHO2               =  0.800GGH500J + 0.200GAH500J + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10365} G3H500H +GNO                =       G2H400L +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10366} G3H500H +GNO2               =       GPH500J                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10367} G3H500H +GNO3               =       G2H400L +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10368} G3H500H +MEPERO             =  0.685G2H400L + 0.315GAH500J + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10369} G3H500H +PERO1              =  0.800G2H400L + 0.200GAH500J + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10370} G3H500H +PERO2              =  0.750G2H400L + 0.250GAH500J + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10371} G3H500H +PERO3              =  0.800G2H400L + 0.200GAH500J + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10372} G3H500H +PERO5              =  0.650G2H400L + 0.350GAH500J + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10373} G3H500H +PERO6              =  0.650G2H400L + 0.350GAH500J + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10374} G3H500H +PERO9              =       G2H400L +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10375} G3H3003 +GHO2               =  0.800GGH3004 + 0.200GAH3004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10376} G3H3003 +GNO                =       GHD2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 10377} G3H3003 +GNO2               =       GPH3004                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10378} G3H3003 +GNO3               =       GHD2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 10379} G3H3003 +MEPERO             =  0.685GHD2000 + 0.315GAH3004 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10380} G3H3003 +PERO1              =  0.800GHD2000 + 0.200GAH3004 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10381} G3H3003 +PERO2              =  0.750GHD2000 + 0.250GAH3004 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10382} G3H3003 +PERO3              =  0.800GHD2000 + 0.200GAH3004 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10383} G3H3003 +PERO5              =  0.650GHD2000 + 0.350GAH3004 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10384} G3H3003 +PERO6              =  0.650GHD2000 + 0.350GAH3004 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10385} G3H3003 +PERO9              =       GHD2000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 10386} G2H400L +GNO                =       G1H400O +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10387} G2H400L +GNO                =       GHN400Z                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10388} G2H400L +GHO2               =       GHH400J                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10389} G2H400L +GNO3               =       G1H400O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10390} G2H400L +MEPERO             =  0.480G1H400O + 0.260GHK4005 + 0.260GHD400F                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10391} G2H400L +PERO1              =  0.600G1H400O + 0.200GHK4005 + 0.200GHD400F                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10392} G2H400L +PERO2              =  0.560G1H400O + 0.220GHK4005 + 0.220GHD400F                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10393} G2H400L +PERO3              =  0.600G1H400O + 0.200GHK4005 + 0.200GHD400F                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10394} G2H400L +PERO5              =  0.600G1H400O + 0.200GHK4005 + 0.200GHD400F                 : ARR( 0.533E-11,   500., 0.0);
+{ 10395} G2H400L +PERO6              =  0.460G1H400O + 0.270GHK4005 + 0.270GHD400F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10396} G2H400L +PERO9              =  0.800G1H400O + 0.200GHD400F                                : ARR( 0.100E-10,     0., 0.0);
+{ 10397} G1H400O                     =       G3H3003 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 10398} GGH5000 +GHO                =       GGD5001 +      GHO                                    : ARR( 0.172E-10,     0., 0.0);
+{ 10399} GGH5000 +GHO                =       GGH500F +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 10400} GGH5000 +GHO                =       G2G500B                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 10401} GGH5000 +GHO                =       G3H5000                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 10402} GGH5000+HV               =       G1G5009 +      GHO                                    :  0.100E+01*SUN;
+{ 10403} GGH5000+HV               =       G2H4000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 10404} G2G500B +GNO                =       G1G5009 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10405} G2G500B +GNO                =       GGN5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10406} G2G500B +GHO2               =       GGH5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10407} G2G500B +GNO3               =       G1G5009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10408} G2G500B +MEPERO             =  0.480G1G5009 + 0.260GGO5001 + 0.260GGD5001                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10409} G2G500B +PERO1              =  0.600G1G5009 + 0.200GGO5001 + 0.200GGD5001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10410} G2G500B +PERO2              =  0.560G1G5009 + 0.220GGO5001 + 0.220GGD5001                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10411} G2G500B +PERO3              =  0.600G1G5009 + 0.200GGO5001 + 0.200GGD5001                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10412} G2G500B +PERO5              =  0.600G1G5009 + 0.200GGO5001 + 0.200GGD5001                 : ARR( 0.533E-11,   500., 0.0);
+{ 10413} G2G500B +PERO6              =  0.460G1G5009 + 0.270GGO5001 + 0.270GGD5001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10414} G2G500B +PERO9              =  0.800G1G5009 + 0.200GGD5001                                : ARR( 0.100E-10,     0., 0.0);
+{ 10415} GAH5000 +GHO                =       GAH500F +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{ 10416} GAH5000 +GHO                =       GAD5002 +      GHO                                    : ARR( 0.175E-10,     0., 0.0);
+{ 10417} GAH5000 +GHO                =       G2A500C                                               : ARR( 0.207E-11,  -190., 0.0);
+{ 10418} GAH5000+HV               =       G1A500A +      GHO                                    :  0.100E+01*SUN;
+{ 10419} G2A500C +GNO                =       G1A500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10420} G2A500C +GNO                =       GAN5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10421} G2A500C +GHO2               =       GAH5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10422} G2A500C +GNO3               =       G1A500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10423} G2A500C +MEPERO             =  0.480G1A500A + 0.260GAO5001 + 0.260GAD5002                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10424} G2A500C +PERO1              =  0.600G1A500A + 0.200GAO5001 + 0.200GAD5002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10425} G2A500C +PERO2              =  0.560G1A500A + 0.220GAO5001 + 0.220GAD5002                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10426} G2A500C +PERO3              =  0.600G1A500A + 0.200GAO5001 + 0.200GAD5002                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10427} G2A500C +PERO5              =  0.600G1A500A + 0.200GAO5001 + 0.200GAD5002                 : ARR( 0.533E-11,   500., 0.0);
+{ 10428} G2A500C +PERO6              =  0.460G1A500A + 0.270GAO5001 + 0.270GAD5002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10429} G2A500C +PERO9              =  0.800G1A500A + 0.200GAD5002                                : ARR( 0.100E-10,     0., 0.0);
+{ 10430} GPH5000                     =       G3H5000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 10431} GPH5000 +GHO                =       GPD5001 +      GHO                                    : ARR( 0.174E-10,     0., 0.0);
+{ 10432} GPH5000 +GHO                =       GPH500F +      GHO2                                   : ARR( 0.111E-10,     0., 0.0);
+{ 10433} GPH5000 +GHO                =       G2P500C                                               : ARR( 0.205E-11,  -190., 0.0);
+{ 10434} GPH5000+HV               =       G1P500A +      GHO                                    :  0.100E+01*SUN;
+{ 10435} GPH5000+HV               =       G3H5000 +      GNO2                                   :  0.100E+01*SUN;
+{ 10436} G2P500C +GNO                =       G1P500A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10437} G2P500C +GNO                =       GPN5001                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10438} G2P500C +GHO2               =       GPH5000                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10439} G2P500C +GNO3               =       G1P500A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10440} G2P500C +MEPERO             =  0.480G1P500A + 0.260GPO5001 + 0.260GPD5001                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10441} G2P500C +PERO1              =  0.600G1P500A + 0.200GPO5001 + 0.200GPD5001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10442} G2P500C +PERO2              =  0.560G1P500A + 0.220GPO5001 + 0.220GPD5001                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10443} G2P500C +PERO3              =  0.600G1P500A + 0.200GPO5001 + 0.200GPD5001                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10444} G2P500C +PERO5              =  0.600G1P500A + 0.200GPO5001 + 0.200GPD5001                 : ARR( 0.533E-11,   500., 0.0);
+{ 10445} G2P500C +PERO6              =  0.460G1P500A + 0.270GPO5001 + 0.270GPD5001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10446} G2P500C +PERO9              =  0.800G1P500A + 0.200GPD5001                                : ARR( 0.100E-10,     0., 0.0);
+{ 10447} GHN4003 +GHO                =       GHN400K +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 10448} GHN4003 +GHO                =       GND400C +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{ 10449} GHN4003 +GHO                =       G2N400D                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 10450} GHN4003+HV               =       G1H4000 +      GNO2                                   :  0.100E+01*SUN;
+{ 10451} GHN4003+HV               =       G1N400D +      GHO                                    :  0.100E+01*SUN;
+{ 10452} GHH4000 +GHO                =       GHD4003 +      GHO                                    : ARR( 0.166E-10,     0., 0.0);
+{ 10453} GHH4000 +GHO                =       GHH400D +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 10454} GHH4000 +GHO                =       GHD400B +      GHO                                    : ARR( 0.166E-10,     0., 0.0);
+{ 10455} GHH4000 +GHO                =       G2H4000                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 10456} GHH4000 +GHO                =       G2H400M                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 10457} GHH4000+HV               =       G1H4000 +      GHO                                    :  0.100E+01*SUN;
+{ 10458} GHH4000+HV               =       G1H400I +      GHO                                    :  0.100E+01*SUN;
+{ 10459} G2H400M +GNO                =       G1H400I +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10460} G2H400M +GNO                =       GHN4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10461} G2H400M +GHO2               =       GHH4000                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10462} G2H400M +GNO3               =       G1H400I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10463} G2H400M +MEPERO             =  0.480G1H400I + 0.260GHO4003 + 0.260GHD400B                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10464} G2H400M +PERO1              =  0.600G1H400I + 0.200GHO4003 + 0.200GHD400B                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10465} G2H400M +PERO2              =  0.560G1H400I + 0.220GHO4003 + 0.220GHD400B                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10466} G2H400M +PERO3              =  0.600G1H400I + 0.200GHO4003 + 0.200GHD400B                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10467} G2H400M +PERO5              =  0.600G1H400I + 0.200GHO4003 + 0.200GHD400B                 : ARR( 0.533E-11,   500., 0.0);
+{ 10468} G2H400M +PERO6              =  0.460G1H400I + 0.270GHO4003 + 0.270GHD400B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10469} G2H400M +PERO9              =  0.800G1H400I + 0.200GHD400B                                : ARR( 0.100E-10,     0., 0.0);
+{ 10470} GHD4003 +GHO                =       GDD4001 +      GHO                                    : ARR( 0.171E-10,     0., 0.0);
+{ 10471} GHD4003 +GHO                =       GHD4004 +      GHO2                                   : ARR( 0.348E-10,     0., 0.0);
+{ 10472} GHD4003 +GHO                =       G3H4006                                               : ARR( 0.221E-10,     0., 0.0);
+{ 10473} GHD4003 +GNO3               =       G3H4006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10474} GHD4003+HV               =       G1D4005 +      GHO                                    :  0.100E+01*SUN;
+{ 10475} GHD4003+HV               =       G2H3009 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10476} GHD4003+HV               =       GHD2000 +      GD02000                                :  0.100E+01*SUN;
+{ 10477} G3H4006 +GHO2               =  0.800GGH4009 + 0.200GAH4009 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10478} G3H4006 +GNO                =       G2H3009 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10479} G3H4006 +GNO2               =       GPH4009                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10480} G3H4006 +GNO3               =       G2H3009 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10481} G3H4006 +MEPERO             =  0.685G2H3009 + 0.315GAH4009 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10482} G3H4006 +PERO1              =  0.800G2H3009 + 0.200GAH4009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10483} G3H4006 +PERO2              =  0.750G2H3009 + 0.250GAH4009 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10484} G3H4006 +PERO3              =  0.800G2H3009 + 0.200GAH4009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10485} G3H4006 +PERO5              =  0.650G2H3009 + 0.350GAH4009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10486} G3H4006 +PERO6              =  0.650G2H3009 + 0.350GAH4009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10487} G3H4006 +PERO9              =       G2H3009 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10488} G2H3009 +GNO                =       G1H3007 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 10489} G2H3009 +GNO                =       GHN3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 10490} G2H3009 +GHO2               =       GHH3007                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 10491} G2H3009 +GNO3               =       G1H3007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10492} G2H3009 +MEPERO             =  0.480G1H3007 + 0.260GHO3003 + 0.260GHD3005                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10493} G2H3009 +PERO1              =  0.600G1H3007 + 0.200GHO3003 + 0.200GHD3005                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10494} G2H3009 +PERO2              =  0.560G1H3007 + 0.220GHO3003 + 0.220GHD3005                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10495} G2H3009 +PERO3              =  0.600G1H3007 + 0.200GHO3003 + 0.200GHD3005                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10496} G2H3009 +PERO5              =  0.600G1H3007 + 0.200GHO3003 + 0.200GHD3005                 : ARR( 0.533E-11,   500., 0.0);
+{ 10497} G2H3009 +PERO6              =  0.460G1H3007 + 0.270GHO3003 + 0.270GHD3005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10498} G2H3009 +PERO9              =  0.800G1H3007 + 0.200GHD3005                                : ARR( 0.100E-10,     0., 0.0);
+{ 10499} GHN501H +GHO                =       GHN5048 +      GHO2                                   : ARR( 0.843E-12,     0., 0.0);
+{ 10500} GHN501H +GHO                =       GND500N +      GHO                                    : ARR( 0.103E-10,     0., 0.0);
+{ 10501} GHN501H +GHO                =       G2N501G                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 10502} GHN501H+HV               =       G1H500P +      GNO2                                   :  0.100E+01*SUN;
+{ 10503} GHN501H+HV               =       G3N4003 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10504} GHN501H+HV               =       GND2000 +      GHK3000                                :  0.100E+01*SUN;
+{ 10505} GHN501H+HV               =       G1N501I +      GHO                                    :  0.100E+01*SUN;
+{ 10506} GHH500K +GHO                =       GHK500E +      GHO                                    : ARR( 0.142E-09,     0., 0.0);
+{ 10507} GHH500K +GHO                =       GHD500S +      GHO                                    : ARR( 0.107E-10,     0., 0.0);
+{ 10508} GHH500K+HV               =       G1H500P +      GHO                                    :  0.100E+01*SUN;
+{ 10509} GHH500K+HV               =       G3H4003 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10510} GHH500K+HV               =       GHD2000 +      GHK3000                                :  0.100E+01*SUN;
+{ 10511} GHH500K+HV               =       G1H502E +      GHO                                    :  0.100E+01*SUN;
+{ 10512} GHK500E +GHO                =       GHD500r +      GHO2                                   : ARR( 0.255E-11,     0., 0.0);
+{ 10513} GHK500E +GHO                =       GDK500M +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 10514} GHK500E +GHO                =       G2K500U                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 10515} GHK500E+HV               =       G3K2001 +      G2H3002                                :  0.100E+01*SUN;
+{ 10516} GHK500E+HV               =       G3K4007 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 10517} GHK500E+HV               =       G1K500c +      GHO                                    :  0.100E+01*SUN;
+{ 10518} G2K500U +GNO                =       G1K500c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10519} G2K500U +GNO                =       GNK500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10520} G2K500U +GHO2               =       GHK500E                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10521} G2K500U +GNO3               =       G1K500c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10522} G2K500U +MEPERO             =  0.480G1K500c + 0.260GKK5005 + 0.260GDK500M                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10523} G2K500U +PERO1              =  0.600G1K500c + 0.200GKK5005 + 0.200GDK500M                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10524} G2K500U +PERO2              =  0.560G1K500c + 0.220GKK5005 + 0.220GDK500M                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10525} G2K500U +PERO3              =  0.600G1K500c + 0.200GKK5005 + 0.200GDK500M                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10526} G2K500U +PERO5              =  0.600G1K500c + 0.200GKK5005 + 0.200GDK500M                 : ARR( 0.533E-11,   500., 0.0);
+{ 10527} G2K500U +PERO6              =  0.460G1K500c + 0.270GKK5005 + 0.270GDK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10528} G2K500U +PERO9              =  0.800G1K500c + 0.200GDK500M                                : ARR( 0.100E-10,     0., 0.0);
+{ 10529} GHD4004 +GHO                =       GDD4002 +      GHO                                    : ARR( 0.103E-10,     0., 0.0);
+{ 10530} GHD4004 +GHO                =       G3H4007                                               : ARR( 0.695E-10,     0., 0.0);
+{ 10531} GHD4004 +GNO3               =       G3H4007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10532} GHD4004+HV               =       G1D4006 +      GHO                                    :  0.100E+01*SUN;
+{ 10533} GHD4004+HV               =       G3H2000 +      G2D2000                                :  0.100E+01*SUN;
+{ 10534} GHD4004+HV               =       G2H3002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10535} G3H4007 +GHO2               =  0.800GGH400A + 0.200GAH400A + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10536} G3H4007 +GNO                =       G2H3002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10537} G3H4007 +GNO2               =       GPH400A                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10538} G3H4007 +GNO3               =       G2H3002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10539} G3H4007 +MEPERO             =  0.685G2H3002 + 0.315GAH400A + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10540} G3H4007 +PERO1              =  0.800G2H3002 + 0.200GAH400A + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10541} G3H4007 +PERO2              =  0.750G2H3002 + 0.250GAH400A + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10542} G3H4007 +PERO3              =  0.800G2H3002 + 0.200GAH400A + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10543} G3H4007 +PERO5              =  0.650G2H3002 + 0.350GAH400A + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10544} G3H4007 +PERO6              =  0.650G2H3002 + 0.350GAH400A + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10545} G3H4007 +PERO9              =       G2H3002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10546} GNN500q +GHO                =       G2N5037                                               : ARR( 0.173E-12,     0., 0.0);
+{ 10547} GNN500q +GHO                =       G2N501B                                               : ARR( 0.238E-12,     0., 0.0);
+{ 10548} GNN500q +GHO                =       GNN500z +      GHO2                                   : ARR( 0.832E-12,     0., 0.0);
+{ 10549} GNN500q +GHO                =       G1N501A                                               : ARR( 0.217E-17,    85., 2.0);
+{ 10550} GNN500q+HV               =       G1N5011 +      GNO2                                   :  0.100E+01*SUN;
+{ 10551} GNN500q+HV               =       G1N500x +      GNO2                                   :  0.100E+01*SUN;
+{ 10552} G2N5037 +GNO                =       G1N503Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10553} G2N5037 +GNO                =       GNN501N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10554} G2N5037 +GHO2               =       GHN5049                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10555} G2N5037 +GNO3               =       G1N503Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10556} G2N5037 +MEPERO             =  0.480G1N503Q + 0.260GNN501R + 0.260GNN502S                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10557} G2N5037 +PERO1              =  0.600G1N503Q + 0.200GNN501R + 0.200GNN502S                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10558} G2N5037 +PERO2              =  0.560G1N503Q + 0.220GNN501R + 0.220GNN502S                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10559} G2N5037 +PERO3              =  0.600G1N503Q + 0.200GNN501R + 0.200GNN502S                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10560} G2N5037 +PERO5              =  0.600G1N503Q + 0.200GNN501R + 0.200GNN502S                 : ARR( 0.473E-11,   850., 0.0);
+{ 10561} G2N5037 +PERO6              =  0.460G1N503Q + 0.270GNN501R + 0.270GNN502S                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10562} G2N5037 +PERO9              =  0.800G1N503Q + 0.200GNN502S                                : ARR( 0.100E-10,     0., 0.0);
+{ 10563} G1N503Q +OXYGEN             =       GNN502S +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 10564} G1N503Q                     =       GNK500U +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{ 10565} GHN501I +GHO                =       GNK500T +      GHO                                    : ARR( 0.858E-11,     0., 0.0);
+{ 10566} GHN501I +GHO                =       GHN5044 +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{ 10567} GHN501I +GHO                =       G2N500w                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 10568} GHN501I+HV               =       G1H502d +      GNO2                                   :  0.100E+01*SUN;
+{ 10569} GHN501I+HV               =       G1N500x +      GHO                                    :  0.100E+01*SUN;
+{ 10570} G1H502d                     =       GD03000 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{ 10571} GNO500O +GHO                =       GNK500T +      GHO2                                   : ARR( 0.233E-11,     0., 0.0);
+{ 10572} GNO500O +GHO                =       GND500O +      GHO2                                   : ARR( 0.455E-11,     0., 0.0);
+{ 10573} GNO500O+HV               =       G1O500L +      GNO2                                   :  0.100E+01*SUN;
+{ 10574} GNK500T +GHO                =       G2N5038                                               : ARR( 0.180E-12,     0., 0.0);
+{ 10575} GNK500T +GHO                =       G2N5039                                               : ARR( 0.247E-12,     0., 0.0);
+{ 10576} GNK500T +GHO                =       GND500R +      GHO2                                   : ARR( 0.263E-11,     0., 0.0);
+{ 10577} GNK500T+HV               =       G1K500D +      GNO2                                   :  0.100E+01*SUN;
+{ 10578} GNK500T+HV               =       G3N4004 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 10579} GNK500T+HV               =       GU02000 +      GNK3001                                :  0.100E+01*SUN;
+{ 10580} G2N5038 +GNO                =       G1N503R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10581} G2N5038 +GNO                =       GNN501Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10582} G2N5038 +GHO2               =       GHN504A                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10583} G2N5038 +GNO3               =       G1N503R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10584} G2N5038 +MEPERO             =  0.480G1N503R + 0.260GNK500U + 0.260GND500u                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10585} G2N5038 +PERO1              =  0.600G1N503R + 0.200GNK500U + 0.200GND500u                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10586} G2N5038 +PERO2              =  0.560G1N503R + 0.220GNK500U + 0.220GND500u                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10587} G2N5038 +PERO3              =  0.600G1N503R + 0.200GNK500U + 0.200GND500u                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10588} G2N5038 +PERO5              =  0.600G1N503R + 0.200GNK500U + 0.200GND500u                 : ARR( 0.473E-11,   850., 0.0);
+{ 10589} G2N5038 +PERO6              =  0.460G1N503R + 0.270GNK500U + 0.270GND500u                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10590} G2N5038 +PERO9              =  0.800G1N503R + 0.200GND500u                                : ARR( 0.100E-10,     0., 0.0);
+{ 10591} G2N5039 +GNO                =       G1N503S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10592} G2N5039 +GNO                =       GNN5018                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10593} G2N5039 +GHO2               =       GHN504B                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10594} G2N5039 +GNO3               =       G1N503S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10595} G2N5039 +MEPERO             =  0.340G1N503S + 0.330GNK5013 + 0.330GNK500h                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10596} G2N5039 +PERO1              =  0.460G1N503S + 0.270GNK5013 + 0.270GNK500h                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10597} G2N5039 +PERO2              =  0.400G1N503S + 0.300GNK5013 + 0.300GNK500h                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10598} G2N5039 +PERO3              =  0.460G1N503S + 0.270GNK5013 + 0.270GNK500h                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10599} G2N5039 +PERO5              =  0.460G1N503S + 0.270GNK5013 + 0.270GNK500h                 : ARR( 0.183E-11,   450., 0.0);
+{ 10600} G2N5039 +PERO6              =  0.300G1N503S + 0.350GNK5013 + 0.350GNK500h                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10601} G2N5039 +PERO9              =  0.650G1N503S + 0.350GNK500h                                : ARR( 0.100E-10,     0., 0.0);
+{ 10602} G1N503R +OXYGEN             =       GND500u +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 10603} G1N503S                     =       GND500v +      GHO2                                   : ARR( 0.160E+12,  4515., 0.0);
+{ 10604} G1N503S                     =       GD02000 +      GDK3001 +      GNO2                    : ARR( 0.200E+15,  6261., 0.0);
+{ 10605} GND4005 +GHO                =       G3N4004                                               : ARR( 0.462E-11,     0., 0.0);
+{ 10606} GND4005 +GNO3               =       G3N4004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10607} GND4005+HV               =       G1D4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 10608} GND4005+HV               =       GD03000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 10609} GND4005+HV               =       GU02000 +      GND2000                                :  0.100E+01*SUN;
+{ 10610} G1D4008                     =       GD03000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 10611} GNN500r +GHO                =       GNN5019 +      GHO2                                   : ARR( 0.435E-11,     0., 0.0);
+{ 10612} GNN500r +GHO                =       GNN501Q +      GHO2                                   : ARR( 0.223E-11,     0., 0.0);
+{ 10613} GNN500r+HV               =       G1N5012 +      GNO2                                   :  0.100E+01*SUN;
+{ 10614} GNN500r+HV               =       G1N500y +      GNO2                                   :  0.100E+01*SUN;
+{ 10615} GHN501J +GHO                =       GHN5046 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 10616} GHN501J +GHO                =       GHN504A +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 10617} GHN501J +GHO                =       GND500I +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{ 10618} GHN501J +GHO                =       G2N500x                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 10619} GHN501J+HV               =       G1H502e +      GNO2                                   :  0.100E+01*SUN;
+{ 10620} GHN501J+HV               =       G1N500y +      GHO                                    :  0.100E+01*SUN;
+{ 10621} G1H502e                     =       GDO2000 +      GHD3000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{ 10622} GNO500P +GHO                =       GND500Y +      GHO2                                   : ARR( 0.435E-11,     0., 0.0);
+{ 10623} GNO500P +GHO                =       GNK500U +      GHO2                                   : ARR( 0.223E-11,     0., 0.0);
+{ 10624} GNO500P +GHO                =       GND500I +      GHO2                                   : ARR( 0.435E-11,     0., 0.0);
+{ 10625} GNO500P+HV               =       G1O500M +      GNO2                                   :  0.100E+01*SUN;
+{ 10626} GND500I +GHO                =       GND500a +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 10627} GND500I +GHO                =       GND500u +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 10628} GND500I +GHO                =       G3N500K                                               : ARR( 0.214E-10,     0., 0.0);
+{ 10629} GND500I +GNO3               =       G3N500K +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10630} GND500I+HV               =       G1D5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 10631} GND500I+HV               =       G2N400N +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10632} GND500I+HV               =       GNK3001 +      GD02000                                :  0.100E+01*SUN;
+{ 10633} G3N500K +GHO2               =  0.800GGN500N + 0.200GAN500N + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10634} G3N500K +GNO                =       G2N400N +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10635} G3N500K +GNO2               =       GPN500N                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10636} G3N500K +GNO3               =       G2N400N +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10637} G3N500K +MEPERO             =  0.685G2N400N + 0.315GAN500N + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10638} G3N500K +PERO1              =  0.800G2N400N + 0.200GAN500N + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10639} G3N500K +PERO2              =  0.750G2N400N + 0.250GAN500N + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10640} G3N500K +PERO3              =  0.800G2N400N + 0.200GAN500N + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10641} G3N500K +PERO5              =  0.650G2N400N + 0.350GAN500N + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10642} G3N500K +PERO6              =  0.650G2N400N + 0.350GAN500N + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10643} G3N500K +PERO9              =       G2N400N +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10644} G2N400N +GNO                =       G1N400O +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10645} G2N400N +GNO                =       GNN400K                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10646} G2N400N +GHO2               =       GHN400a                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10647} G2N400N +GNO3               =       G1N400O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10648} G2N400N +MEPERO             =  0.480G1N400O + 0.260GNO4009 + 0.260GND400A                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10649} G2N400N +PERO1              =  0.600G1N400O + 0.200GNO4009 + 0.200GND400A                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10650} G2N400N +PERO2              =  0.560G1N400O + 0.220GNO4009 + 0.220GND400A                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10651} G2N400N +PERO3              =  0.600G1N400O + 0.200GNO4009 + 0.200GND400A                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10652} G2N400N +PERO5              =  0.600G1N400O + 0.200GNO4009 + 0.200GND400A                 : ARR( 0.533E-11,   500., 0.0);
+{ 10653} G2N400N +PERO6              =  0.460G1N400O + 0.270GNO4009 + 0.270GND400A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10654} G2N400N +PERO9              =  0.800G1N400O + 0.200GND400A                                : ARR( 0.100E-10,     0., 0.0);
+{ 10655} G1N400O                     =       GND4009 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 10656} GNK500U +GHO                =       GND500u +      GHO2                                   : ARR( 0.442E-11,     0., 0.0);
+{ 10657} GNK500U +GHO                =       GND500Z +      GHO2                                   : ARR( 0.269E-11,     0., 0.0);
+{ 10658} GNK500U+HV               =       G1K500F +      GNO2                                   :  0.100E+01*SUN;
+{ 10659} GNK500U+HV               =       G3N4008 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 10660} GNK500U+HV               =       GD02000 +      GNK3001                                :  0.100E+01*SUN;
+{ 10661} GNO500Q +GHO                =       G2N502i                                               : ARR( 0.131E-11,     0., 0.0);
+{ 10662} GNO500Q +GHO                =       GNK500W +      GHO2                                   : ARR( 0.235E-11,     0., 0.0);
+{ 10663} GNO500Q +GHO                =       GND500w +      GHO2                                   : ARR( 0.918E-12,     0., 0.0);
+{ 10664} GNO500Q+HV               =       G1O500K +      GNO2                                   :  0.100E+01*SUN;
+{ 10665} GHO500J +GHO                =       GHK500F +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 10666} GHO500J +GHO                =       GKO500C +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{ 10667} GHO500J +GHO                =       GHD500j +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 10668} GHO500J +GHO                =       G2O500J                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 10669} GHO500J+HV               =       G1O500K +      GHO                                    :  0.100E+01*SUN;
+{ 10670} GOO5009 +GHO                =       GKO500D +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 10671} GOO5009 +GHO                =       GKO500C +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 10672} GOO5009 +GHO                =       GDO500C +      GHO2                                   : ARR( 0.430E-11,     0., 0.0);
+{ 10673} GKO500C +GHO                =       G2K500W                                               : ARR( 0.377E-11,     0., 0.0);
+{ 10674} GKO500C +GHO                =       GKK5004 +      GHO2                                   : ARR( 0.651E-11,     0., 0.0);
+{ 10675} GKO500C +GHO                =       GDK500O +      GHO2                                   : ARR( 0.254E-11,     0., 0.0);
+{ 10676} GKO500C+HV               =       G3K4004 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 10677} G2K500W +GNO                =       G1K500f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10678} G2K500W +GNO                =       GNK500k                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10679} G2K500W +GHO2               =       GHK500h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10680} G2K500W +GNO3               =       G1K500f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10681} G2K500W +MEPERO             =  0.340G1K500f + 0.330GKO500J + 0.330GKK500C                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10682} G2K500W +PERO1              =  0.460G1K500f + 0.270GKO500J + 0.270GKK500C                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10683} G2K500W +PERO2              =  0.400G1K500f + 0.300GKO500J + 0.300GKK500C                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10684} G2K500W +PERO3              =  0.460G1K500f + 0.270GKO500J + 0.270GKK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10685} G2K500W +PERO5              =  0.460G1K500f + 0.270GKO500J + 0.270GKK500C                 : ARR( 0.183E-11,   450., 0.0);
+{ 10686} G2K500W +PERO6              =  0.300G1K500f + 0.350GKO500J + 0.350GKK500C                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10687} G2K500W +PERO9              =  0.650G1K500f + 0.350GKK500C                                : ARR( 0.100E-10,     0., 0.0);
+{ 10688} G1K500f                     =       GD02000 +      GDK3001 +      GHO2                    : ARR( 0.200E+15,  3513., 0.0);
+{ 10689} GNK500W +GHO                =       G2N503A                                               : ARR( 0.549E-12,     0., 0.0);
+{ 10690} GNK500W +GHO                =       G2N502b                                               : ARR( 0.724E-12,     0., 0.0);
+{ 10691} GNK500W +GHO                =       GND500j +      GHO2                                   : ARR( 0.831E-12,     0., 0.0);
+{ 10692} GNK500W +GHO                =       G1N502p                                               : ARR( 0.217E-17,    85., 2.0);
+{ 10693} GNK500W+HV               =       G3K3000 +      GDO2000 +      GNO2                    :  0.100E+01*SUN;
+{ 10694} GNK500W+HV               =       G1K500B +      GNO2                                   :  0.100E+01*SUN;
+{ 10695} G2N503A +GNO                =       G1N503T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10696} G2N503A +GNO                =       GNN501P                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10697} G2N503A +GHO2               =       GHN504C                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10698} G2N503A +GNO3               =       G1N503T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10699} G2N503A +MEPERO             =  0.480G1N503T + 0.260GNK500o + 0.260GND500x                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10700} G2N503A +PERO1              =  0.600G1N503T + 0.200GNK500o + 0.200GND500x                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10701} G2N503A +PERO2              =  0.560G1N503T + 0.220GNK500o + 0.220GND500x                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10702} G2N503A +PERO3              =  0.600G1N503T + 0.200GNK500o + 0.200GND500x                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10703} G2N503A +PERO5              =  0.600G1N503T + 0.200GNK500o + 0.200GND500x                 : ARR( 0.473E-11,   850., 0.0);
+{ 10704} G2N503A +PERO6              =  0.460G1N503T + 0.270GNK500o + 0.270GND500x                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10705} G2N503A +PERO9              =  0.800G1N503T + 0.200GND500x                                : ARR( 0.100E-10,     0., 0.0);
+{ 10706} G1N503T +OXYGEN             =       GND500x +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 10707} GHK500F +GHO                =       GKK5004 +      GHO                                    : ARR( 0.260E-10,     0., 0.0);
+{ 10708} GHK500F +GHO                =       GHD500T +      GHO2                                   : ARR( 0.132E-10,     0., 0.0);
+{ 10709} GHK500F +GHO                =       G2K500A                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 10710} GHK500F+HV               =       G3K3000 +      GDO2000 +      GHO                     :  0.100E+01*SUN;
+{ 10711} GHK500F+HV               =       G1K500B +      GHO                                    :  0.100E+01*SUN;
+{ 10712} GKO500D +GHO                =       GKK5004 +      GHO2                                   : ARR( 0.678E-11,     0., 0.0);
+{ 10713} GKO500D +GHO                =       GDK5009 +      GHO2                                   : ARR( 0.138E-10,     0., 0.0);
+{ 10714} GKO500D+HV               =       G3K3000 +      GDO2000 +      GHO2                    :  0.100E+01*SUN;
+{ 10715} GKK5004 +GHO                =       G2K500X                                               : ARR( 0.552E-12,     0., 0.0);
+{ 10716} GKK5004 +GHO                =       G2K500Y                                               : ARR( 0.727E-12,     0., 0.0);
+{ 10717} GKK5004 +GHO                =       GDK500E +      GHO2                                   : ARR( 0.255E-11,     0., 0.0);
+{ 10718} GKK5004+HV               =       G3K3000 +      G3K2001                                :  0.100E+01*SUN;
+{ 10719} G2K500X +GNO                =       G1K500g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10720} G2K500X +GNO                =       GNK500n                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10721} G2K500X +GHO2               =       GHK500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10722} G2K500X +GNO3               =       G1K500g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10723} G2K500X +MEPERO             =  0.480G1K500g + 0.260GKK5006 + 0.260GDK500P                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10724} G2K500X +PERO1              =  0.600G1K500g + 0.200GKK5006 + 0.200GDK500P                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10725} G2K500X +PERO2              =  0.560G1K500g + 0.220GKK5006 + 0.220GDK500P                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10726} G2K500X +PERO3              =  0.600G1K500g + 0.200GKK5006 + 0.200GDK500P                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10727} G2K500X +PERO5              =  0.600G1K500g + 0.200GKK5006 + 0.200GDK500P                 : ARR( 0.473E-11,   850., 0.0);
+{ 10728} G2K500X +PERO6              =  0.460G1K500g + 0.270GKK5006 + 0.270GDK500P                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10729} G2K500X +PERO9              =  0.800G1K500g + 0.200GDK500P                                : ARR( 0.100E-10,     0., 0.0);
+{ 10730} G2K500Y +GNO                =       G1K500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10731} G2K500Y +GNO                =       GNK500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10732} G2K500Y +GHO2               =       GHK500j                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10733} G2K500Y +GNO3               =       G1K500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10734} G2K500Y +MEPERO             =  0.340G1K500h + 0.330GKK500D + 0.330GKK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10735} G2K500Y +PERO1              =  0.460G1K500h + 0.270GKK500D + 0.270GKK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10736} G2K500Y +PERO2              =  0.400G1K500h + 0.300GKK500D + 0.300GKK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10737} G2K500Y +PERO3              =  0.460G1K500h + 0.270GKK500D + 0.270GKK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10738} G2K500Y +PERO5              =  0.460G1K500h + 0.270GKK500D + 0.270GKK500B                 : ARR( 0.183E-11,   450., 0.0);
+{ 10739} G2K500Y +PERO6              =  0.300G1K500h + 0.350GKK500D + 0.350GKK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10740} G2K500Y +PERO9              =  0.650G1K500h + 0.350GKK500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 10741} G1K500g +OXYGEN             =       GDK500P +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 10742} G1K500h                     =       GD02000 +      G3K2001 +      GCO                     : ARR( 0.200E+15,  3071., 0.0);
+{ 10743} GHN501K +GHO                =       G2H500t                                               : ARR( 0.150E-11,     0., 0.0);
+{ 10744} GHN501K +GHO                =       GND500J +      GHO                                    : ARR( 0.171E-10,     0., 0.0);
+{ 10745} GHN501K +GHO                =       G2N500y                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 10746} GHN501K+HV               =       G1H502f +      GNO2                                   :  0.100E+01*SUN;
+{ 10747} GHN501K+HV               =       G1N500z +      GHO                                    :  0.100E+01*SUN;
+{ 10748} G1H502f                     =       GDO5001 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 10749} G1H502f                     =       GCH2O   +      GHD4001 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 10750} GND500J +GHO                =       G3N500L                                               : ARR( 0.236E-10,     0., 0.0);
+{ 10751} GND500J +GNO3               =       G3N500L +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10752} GND500J+HV               =       G1D500X +      GNO2                                   :  0.100E+01*SUN;
+{ 10753} GND500J+HV               =       G2N4003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10754} GND500J+HV               =       G2K3001 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{ 10755} G3N500L +GHO2               =  0.800GGN500O + 0.200GAN500O + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10756} G3N500L +GNO                =       G2N4003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10757} G3N500L +GNO2               =       GPN500O                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10758} G3N500L +GNO3               =       G2N4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10759} G3N500L +MEPERO             =  0.685G2N4003 + 0.315GAN500O + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10760} G3N500L +PERO1              =  0.800G2N4003 + 0.200GAN500O + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10761} G3N500L +PERO2              =  0.750G2N4003 + 0.250GAN500O + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10762} G3N500L +PERO3              =  0.800G2N4003 + 0.200GAN500O + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10763} G3N500L +PERO5              =  0.650G2N4003 + 0.350GAN500O + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10764} G3N500L +PERO6              =  0.650G2N4003 + 0.350GAN500O + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10765} G3N500L +PERO9              =       G2N4003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10766} G1D500X                     =       GCH2O   +      GDD4000 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 10767} GHN501L +GHO                =       G2H500x                                               : ARR( 0.118E-11,     0., 0.0);
+{ 10768} GHN501L +GHO                =       GNK500W +      GHO                                    : ARR( 0.850E-11,     0., 0.0);
+{ 10769} GHN501L +GHO                =       GHN504D +      GHO2                                   : ARR( 0.829E-12,     0., 0.0);
+{ 10770} GHN501L +GHO                =       G2N500z                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 10771} GHN501L+HV               =       G1N5011 +      GHO                                    :  0.100E+01*SUN;
+{ 10772} GHN501L+HV               =       G1H502g +      GNO2                                   :  0.100E+01*SUN;
+{ 10773} G1H502g                     =       G2H501X                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 10774} G1H502g                     =       GD03000 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  5200., 0.0);
+{ 10775} G1H502g                     =       GHD4005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 10776} G2H501X +GNO                =       G1H502h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10777} G2H501X +GNO                =       GHN501M                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10778} G2H501X +GHO2               =       GHH501Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10779} G2H501X +GNO3               =       G1H502h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10780} G2H501X +MEPERO             =  0.480G1H502h + 0.260GHO500L + 0.260GHD500D                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10781} G2H501X +PERO1              =  0.600G1H502h + 0.200GHO500L + 0.200GHD500D                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10782} G2H501X +PERO2              =  0.560G1H502h + 0.220GHO500L + 0.220GHD500D                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10783} G2H501X +PERO3              =  0.600G1H502h + 0.200GHO500L + 0.200GHD500D                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10784} G2H501X +PERO5              =  0.600G1H502h + 0.200GHO500L + 0.200GHD500D                 : ARR( 0.473E-11,   850., 0.0);
+{ 10785} G2H501X +PERO6              =  0.460G1H502h + 0.270GHO500L + 0.270GHD500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10786} G2H501X +PERO9              =  0.800G1H502h + 0.200GHD500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 10787} G1H502h                     =       GHK500J +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{ 10788} GHO500K +GHO                =       GKO500D +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{ 10789} GHO500K +GHO                =       GHK500H +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 10790} GHO500K +GHO                =       GHD500k +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 10791} GHO500K +GHO                =       G2O500K                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 10792} GHO500K+HV               =       G1O500L +      GHO                                    :  0.100E+01*SUN;
+{ 10793} GHK500G +GHO                =       GKK5003 +      GHO                                    : ARR( 0.113E-09,     0., 0.0);
+{ 10794} GHK500G+HV               =       G1K500C +      GHO                                    :  0.100E+01*SUN;
+{ 10795} GHK500G+HV               =       G3H4001 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 10796} GHK500G+HV               =       G2D2000 +      GKO3000 +      GHO                     :  0.100E+01*SUN;
+{ 10797} GHK500H +GHO                =       G2H501Y                                               : ARR( 0.367E-11,     0., 0.0);
+{ 10798} GHK500H +GHO                =       GKK5004 +      GHO                                    : ARR( 0.254E-10,     0., 0.0);
+{ 10799} GHK500H +GHO                =       GHD500s +      GHO2                                   : ARR( 0.247E-11,     0., 0.0);
+{ 10800} GHK500H +GHO                =       G2K500C                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 10801} GHK500H+HV               =       G1K500D +      GHO                                    :  0.100E+01*SUN;
+{ 10802} GHK500H+HV               =       G3H4000 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 10803} G2H501Y +GNO                =       G1H502i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10804} G2H501Y +GNO                =       GHN501r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10805} G2H501Y +GHO2               =       GHH501Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10806} G2H501Y +GNO3               =       G1H502i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10807} G2H501Y +MEPERO             =  0.340G1H502i + 0.330GHK500k + 0.330GHK500Y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10808} G2H501Y +PERO1              =  0.460G1H502i + 0.270GHK500k + 0.270GHK500Y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10809} G2H501Y +PERO2              =  0.400G1H502i + 0.300GHK500k + 0.300GHK500Y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10810} G2H501Y +PERO3              =  0.460G1H502i + 0.270GHK500k + 0.270GHK500Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10811} G2H501Y +PERO5              =  0.460G1H502i + 0.270GHK500k + 0.270GHK500Y                 : ARR( 0.183E-11,   450., 0.0);
+{ 10812} G2H501Y +PERO6              =  0.300G1H502i + 0.350GHK500k + 0.350GHK500Y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10813} G2H501Y +PERO9              =  0.650G1H502i + 0.350GHK500Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 10814} G1H502i                     =       GD02000 +      GDK3001 +      GHO                     : ARR( 0.200E+15,  4722., 0.0);
+{ 10815} GKO3001 +GHO                =       GDK3001 +      GHO2                                   : ARR( 0.490E-11,     0., 0.0);
+{ 10816} GKO3001 +GHO                =       G1K3001                                               : ARR( 0.420E-17,    85., 2.0);
+{ 10817} GKO3001+HV               =       G3K2001 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 10818} GDK3001 +GHO                =       GDD3002 +      GHO2                                   : ARR( 0.247E-11,     0., 0.0);
+{ 10819} GDK3001 +GHO                =       G3K2001 +      GCO                                    : ARR( 0.128E-10,     0., 0.0);
+{ 10820} GDK3001 +GNO3               =       G3K2001 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 10821} GDK3001+HV               =       G3K2001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10822} GDK3001+HV               =       GDO2000 +      GCO                                    :  0.100E+01*SUN;
+{ 10823} GDK3001+HV               =       GCH3OH  +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 10824} GGO2000 +GHO                =       GGD2000 +      GHO2                                   : ARR( 0.251E-11,     0., 0.0);
+{ 10825} GGO2000 +GHO                =       G3K2001                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 10826} GGO2000+HV               =       GCH2O   +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 10827} GAO2000 +GHO                =       GAD2000 +      GHO2                                   : ARR( 0.181E-11,     0., 0.0);
+{ 10828} GAO2000 +GHO                =       G1A2000                                               : ARR( 0.210E-17,    85., 2.0);
+{ 10829} GAO2000 +GHO                =       GCH2O   +      GHO2    +      GCO2                    : ARR( 0.520E-12,     0., 0.0);
+{ 10830}  GPO2000    +M                 =       G3K2001 +      GNO2            +M                     : FALL( 0.280E+17, 13580., 0.0, 0.190E-02, 12175., 0.0,0.60);
+{ 10831} GPO2000 +GHO                =       GPD2000 +      GHO2                                   : ARR( 0.245E-11,     0., 0.0);
+{ 10832} GPO2000 +GHO                =       G1P2000                                               : ARR( 0.210E-17,    85., 2.0);
+{ 10833} GPO2000+HV               =       G3K2001 +      GNO2                                   :  0.100E+01*SUN;
+{ 10834} GHN501M +GHO                =       GHN5045 +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 10835} GHN501M +GHO                =       GHN502K +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 10836} GHN501M +GHO                =       GNK500X +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 10837} GHN501M +GHO                =       G2N5011                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 10838} GHN501M+HV               =       G1N5012 +      GHO                                    :  0.100E+01*SUN;
+{ 10839} GHN501M+HV               =       G1H502h +      GNO2                                   :  0.100E+01*SUN;
+{ 10840} GNO500R +GHO                =       GND500t +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 10841} GNO500R +GHO                =       GNK500m +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 10842} GNO500R +GHO                =       GNK500X +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 10843} GNO500R+HV               =       G1O500Z +      GNO2                                   :  0.100E+01*SUN;
+{ 10844} G1O500Z                     =       GKO500F +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{ 10845} GNK500X +GHO                =       GND500U +      GHO2                                   : ARR( 0.132E-10,     0., 0.0);
+{ 10846} GNK500X +GHO                =       GNK500n +      GHO2                                   : ARR( 0.648E-11,     0., 0.0);
+{ 10847} GNK500X+HV               =       G3K3003 +      G2N2000                                :  0.100E+01*SUN;
+{ 10848} GNK500X+HV               =       G1K500i +      GNO2                                   :  0.100E+01*SUN;
+{ 10849} G3K3003 +GHO2               =  0.800GGO3002 + 0.200GAO3002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10850} G3K3003 +GNO                =       GDO2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 10851} G3K3003 +GNO2               =       GPO3002                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10852} G3K3003 +GNO3               =       GDO2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 10853} G3K3003 +MEPERO             =  0.685GDO2000 + 0.315GAO3002 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10854} G3K3003 +PERO1              =  0.800GDO2000 + 0.200GAO3002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10855} G3K3003 +PERO2              =  0.750GDO2000 + 0.250GAO3002 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10856} G3K3003 +PERO3              =  0.800GDO2000 + 0.200GAO3002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10857} G3K3003 +PERO5              =  0.650GDO2000 + 0.350GAO3002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10858} G3K3003 +PERO6              =  0.650GDO2000 + 0.350GAO3002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 10859} G3K3003 +PERO9              =       GDO2000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 10860} G1K500i +OXYGEN             =       GDK5008 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 10861} G1K500i                     =       GKK5006 +      GHO2                                   : ARR( 0.800E+11,  4007., 0.0);
+{ 10862} GHK500I +GHO                =       GHD500m +      GHO2                                   : ARR( 0.254E-11,     0., 0.0);
+{ 10863} GHK500I +GHO                =       G2H501Z                                               : ARR( 0.465E-11,     0., 0.0);
+{ 10864} GHK500I +GHO                =       GDK5007 +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{ 10865} GHK500I +GHO                =       G2K500Z                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 10866} GHK500I+HV               =       G3K2001 +      G2H3006                                :  0.100E+01*SUN;
+{ 10867} GHK500I+HV               =       GKO3000 +      G2D2000 +      GHO                     :  0.100E+01*SUN;
+{ 10868} GHK500I+HV               =       G1K500S +      GHO                                    :  0.100E+01*SUN;
+{ 10869} G2H501Z +GNO                =       G1H502j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10870} G2H501Z +GNO                =       GHN502I                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10871} G2H501Z +GHO2               =       GHH501K                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10872} G2H501Z +GNO3               =       G1H502j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10873} G2H501Z +MEPERO             =  0.340G1H502j + 0.330GHK500W + 0.330GHK500E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10874} G2H501Z +PERO1              =  0.460G1H502j + 0.270GHK500W + 0.270GHK500E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10875} G2H501Z +PERO2              =  0.400G1H502j + 0.300GHK500W + 0.300GHK500E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10876} G2H501Z +PERO3              =  0.460G1H502j + 0.270GHK500W + 0.270GHK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10877} G2H501Z +PERO5              =  0.460G1H502j + 0.270GHK500W + 0.270GHK500E                 : ARR( 0.183E-11,   450., 0.0);
+{ 10878} G2H501Z +PERO6              =  0.300G1H502j + 0.350GHK500W + 0.350GHK500E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10879} G2H501Z +PERO9              =  0.650G1H502j + 0.350GHK500E                                : ARR( 0.100E-10,     0., 0.0);
+{ 10880} G2K500Z +GNO                =       G1K500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10881} G2K500Z +GNO                =       GNK500D                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10882} G2K500Z +GHO2               =       GHK500I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10883} G2K500Z +GNO3               =       G1K500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10884} G2K500Z +MEPERO             =  0.480G1K500S + 0.260GKO5003 + 0.260GDK5007                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10885} G2K500Z +PERO1              =  0.600G1K500S + 0.200GKO5003 + 0.200GDK5007                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10886} G2K500Z +PERO2              =  0.560G1K500S + 0.220GKO5003 + 0.220GDK5007                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10887} G2K500Z +PERO3              =  0.600G1K500S + 0.200GKO5003 + 0.200GDK5007                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10888} G2K500Z +PERO5              =  0.600G1K500S + 0.200GKO5003 + 0.200GDK5007                 : ARR( 0.473E-11,   850., 0.0);
+{ 10889} G2K500Z +PERO6              =  0.460G1K500S + 0.270GKO5003 + 0.270GDK5007                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10890} G2K500Z +PERO9              =  0.800G1K500S + 0.200GDK5007                                : ARR( 0.100E-10,     0., 0.0);
+{ 10891} G1H502j                     =       GHD500e +      GHO2                                   : ARR( 0.160E+12,  4515., 0.0);
+{ 10892} G1H502j                     =       G2K3001 +      GHD2000                                : ARR( 0.200E+15,  7289., 0.0);
+{ 10893} G1H502j                     =       GDK4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6757., 0.0);
+{ 10894} GHO500L +GHO                =       GHD500M +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 10895} GHO500L +GHO                =       GHK500J +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 10896} GHO500L +GHO                =       GKO500E +      GHO                                    : ARR( 0.424E-10,     0., 0.0);
+{ 10897} GHO500L +GHO                =       GHD500D +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 10898} GHO500L +GHO                =       G2O500L                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 10899} GHO500L+HV               =       G1O500M +      GHO                                    :  0.100E+01*SUN;
+{ 10900} GOO500A +GHO                =       GDO5008 +      GHO2                                   : ARR( 0.430E-11,     0., 0.0);
+{ 10901} GOO500A +GHO                =       GKO500E +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 10902} GOO500A +GHO                =       GKO500F +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 10903} GOO500A +GHO                =       GDO500B +      GHO2                                   : ARR( 0.430E-11,     0., 0.0);
+{ 10904} GKO500E +GHO                =       GDK500K +      GHO2                                   : ARR( 0.133E-10,     0., 0.0);
+{ 10905} GKO500E +GHO                =       GKK5006 +      GHO2                                   : ARR( 0.654E-11,     0., 0.0);
+{ 10906} GKO500E +GHO                =       GDK5008 +      GHO2                                   : ARR( 0.133E-10,     0., 0.0);
+{ 10907} GKO500E+HV               =       G3K3003 +      G2O2000                                :  0.100E+01*SUN;
+{ 10908} GDK5007 +GHO                =       GDD5004 +      GHO2                                   : ARR( 0.246E-11,     0., 0.0);
+{ 10909} GDK5007 +GHO                =       G2D500P                                               : ARR( 0.275E-11,     0., 0.0);
+{ 10910} GDK5007 +GHO                =       G2D500Q                                               : ARR( 0.275E-11,     0., 0.0);
+{ 10911} GDK5007 +GHO                =       G3K500C                                               : ARR( 0.209E-10,     0., 0.0);
+{ 10912} GDK5007 +GNO3               =       G3K500C +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10913} GDK5007+HV               =       G3K2001 +      G2D3001                                :  0.100E+01*SUN;
+{ 10914} GDK5007+HV               =       G2K4003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10915} G2D500P +GNO                =       G1D500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10916} G2D500P +GNO                =       GND500u                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10917} G2D500P +GHO2               =       GHD500t                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10918} G2D500P +GNO3               =       G1D500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10919} G2D500P +MEPERO             =  0.340G1D500Y + 0.330GDK500Q + 0.330GDK500P                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10920} G2D500P +PERO1              =  0.460G1D500Y + 0.270GDK500Q + 0.270GDK500P                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10921} G2D500P +PERO2              =  0.400G1D500Y + 0.300GDK500Q + 0.300GDK500P                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10922} G2D500P +PERO3              =  0.460G1D500Y + 0.270GDK500Q + 0.270GDK500P                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10923} G2D500P +PERO5              =  0.460G1D500Y + 0.270GDK500Q + 0.270GDK500P                 : ARR( 0.183E-11,   450., 0.0);
+{ 10924} G2D500P +PERO6              =  0.300G1D500Y + 0.350GDK500Q + 0.350GDK500P                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10925} G2D500P +PERO9              =  0.650G1D500Y + 0.350GDK500P                                : ARR( 0.100E-10,     0., 0.0);
+{ 10926} G2D500Q +GNO                =       G1D500Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 10927} G2D500Q +GNO                =       GND500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 10928} G2D500Q +GHO2               =       GHD500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 10929} G2D500Q +GNO3               =       G1D500Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10930} G2D500Q +MEPERO             =  0.340G1D500Z + 0.330GDK500F + 0.330GDK500M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 10931} G2D500Q +PERO1              =  0.460G1D500Z + 0.270GDK500F + 0.270GDK500M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10932} G2D500Q +PERO2              =  0.400G1D500Z + 0.300GDK500F + 0.300GDK500M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 10933} G2D500Q +PERO3              =  0.460G1D500Z + 0.270GDK500F + 0.270GDK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10934} G2D500Q +PERO5              =  0.460G1D500Z + 0.270GDK500F + 0.270GDK500M                 : ARR( 0.183E-11,   450., 0.0);
+{ 10935} G2D500Q +PERO6              =  0.300G1D500Z + 0.350GDK500F + 0.350GDK500M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 10936} G2D500Q +PERO9              =  0.650G1D500Z + 0.350GDK500M                                : ARR( 0.100E-10,     0., 0.0);
+{ 10937} G3K500C +GHO2               =  0.800GGK5007 + 0.200GAK5007 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10938} G3K500C +GNO                =       G2K4003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10939} G3K500C +GNO2               =       GPK5007                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10940} G3K500C +GNO3               =       G2K4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10941} G3K500C +MEPERO             =  0.685G2K4003 + 0.315GAK5007 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10942} G3K500C +PERO1              =  0.800G2K4003 + 0.200GAK5007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10943} G3K500C +PERO2              =  0.750G2K4003 + 0.250GAK5007 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10944} G3K500C +PERO3              =  0.800G2K4003 + 0.200GAK5007 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10945} G3K500C +PERO5              =  0.650G2K4003 + 0.350GAK5007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10946} G3K500C +PERO6              =  0.650G2K4003 + 0.350GAK5007 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10947} G3K500C +PERO9              =       G2K4003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10948} G2K4003 +GNO                =       G1K4003 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10949} G2K4003 +GNO                =       GNK4002                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10950} G2K4003 +GHO2               =       GHK4002                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10951} G2K4003 +GNO3               =       G1K4003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10952} G2K4003 +MEPERO             =  0.480G1K4003 + 0.260GKO4002 + 0.260GDK4001                 : ARR( 0.146E-12,  -445., 0.0);
+{ 10953} G2K4003 +PERO1              =  0.600G1K4003 + 0.200GKO4002 + 0.200GDK4001                 : ARR( 0.112E-12,  -500., 0.0);
+{ 10954} G2K4003 +PERO2              =  0.560G1K4003 + 0.220GKO4002 + 0.220GDK4001                 : ARR( 0.418E-13, -1000., 0.0);
+{ 10955} G2K4003 +PERO3              =  0.600G1K4003 + 0.200GKO4002 + 0.200GDK4001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10956} G2K4003 +PERO5              =  0.600G1K4003 + 0.200GKO4002 + 0.200GDK4001                 : ARR( 0.473E-11,   850., 0.0);
+{ 10957} G2K4003 +PERO6              =  0.460G1K4003 + 0.270GKO4002 + 0.270GDK4001                 : ARR( 0.434E-13,  -900., 0.0);
+{ 10958} G2K4003 +PERO9              =  0.800G1K4003 + 0.200GDK4001                                : ARR( 0.100E-10,     0., 0.0);
+{ 10959} G1D500Y                     =       G3K2001 +      GDD3000                                : ARR( 0.200E+15,  2372., 0.0);
+{ 10960} G1D500Z                     =       GDK4001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5054., 0.0);
+{ 10961} G1K4003 +OXYGEN             =       GDK4001 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 10962} G1K4003                     =       GDK4005 +      GHO2                                   : ARR( 0.160E+12,  4515., 0.0);
+{ 10963} GHD500D +GHO                =       GHD500t +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{ 10964} GHD500D +GHO                =       GDK5008 +      GHO                                    : ARR( 0.138E-09,     0., 0.0);
+{ 10965} GHD500D +GHO                =       G3H500I                                               : ARR( 0.219E-10,     0., 0.0);
+{ 10966} GHD500D +GNO3               =       G3H500I +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10967} GHD500D+HV               =       G1D5006 +      GHO                                    :  0.100E+01*SUN;
+{ 10968} GHD500D+HV               =       G2H400N +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 10969} GHD500D+HV               =       GHK3001 +      GD02000                                :  0.100E+01*SUN;
+{ 10970} G3H500I +GHO2               =  0.800GGH500K + 0.200GAH500K + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 10971} G3H500I +GNO                =       G2H400N +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 10972} G3H500I +GNO2               =       GPH500K                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 10973} G3H500I +GNO3               =       G2H400N +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 10974} G3H500I +MEPERO             =  0.685G2H400N + 0.315GAH500K + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10975} G3H500I +PERO1              =  0.800G2H400N + 0.200GAH500K + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10976} G3H500I +PERO2              =  0.750G2H400N + 0.250GAH500K + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10977} G3H500I +PERO3              =  0.800G2H400N + 0.200GAH500K + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10978} G3H500I +PERO5              =  0.650G2H400N + 0.350GAH500K + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10979} G3H500I +PERO6              =  0.650G2H400N + 0.350GAH500K + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 10980} G3H500I +PERO9              =       G2H400N +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 10981} G2H400N +GNO                =       G1H400P +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 10982} G2H400N +GNO                =       GHN400b                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 10983} G2H400N +GHO2               =       GHH400K                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 10984} G2H400N +GNO3               =       G1H400P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 10985} G2H400N +MEPERO             =  0.480G1H400P + 0.260GHO4009 + 0.260GHD400A                 : ARR( 0.164E-12,  -795., 0.0);
+{ 10986} G2H400N +PERO1              =  0.600G1H400P + 0.200GHO4009 + 0.200GHD400A                 : ARR( 0.126E-12,  -850., 0.0);
+{ 10987} G2H400N +PERO2              =  0.560G1H400P + 0.220GHO4009 + 0.220GHD400A                 : ARR( 0.471E-13, -1350., 0.0);
+{ 10988} G2H400N +PERO3              =  0.600G1H400P + 0.200GHO4009 + 0.200GHD400A                 : ARR( 0.142E-12, -1200., 0.0);
+{ 10989} G2H400N +PERO5              =  0.600G1H400P + 0.200GHO4009 + 0.200GHD400A                 : ARR( 0.533E-11,   500., 0.0);
+{ 10990} G2H400N +PERO6              =  0.460G1H400P + 0.270GHO4009 + 0.270GHD400A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 10991} G2H400N +PERO9              =  0.800G1H400P + 0.200GHD400A                                : ARR( 0.100E-10,     0., 0.0);
+{ 10992} G1H400P                     =       GHD4009 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 10993} G1H400P                     =       GDO3002 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 10994} GDO5008 +GHO                =       GDD5002 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{ 10995} GDO5008 +GHO                =       GDK500Q +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 10996} GDO5008 +GHO                =       GDK5008 +      GHO2                                   : ARR( 0.333E-10,     0., 0.0);
+{ 10997} GDO5008 +GHO                =       G3K500D                                               : ARR( 0.212E-10,     0., 0.0);
+{ 10998} GDO5008 +GNO3               =       G3K500D +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 10999} GDO5008+HV               =       G2O400B +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 11000} GDO5008+HV               =       GKO3001 +      GD02000                                :  0.100E+01*SUN;
+{ 11001} G3K500D +GHO2               =  0.800GGO5008 + 0.200GAO5008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 11002} G3K500D +GNO                =       G2O400B +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 11003} G3K500D +GNO2               =       GPO5008                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 11004} G3K500D +GNO3               =       G2O400B +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 11005} G3K500D +MEPERO             =  0.685G2O400B + 0.315GAO5008 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11006} G3K500D +PERO1              =  0.800G2O400B + 0.200GAO5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11007} G3K500D +PERO2              =  0.750G2O400B + 0.250GAO5008 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11008} G3K500D +PERO3              =  0.800G2O400B + 0.200GAO5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11009} G3K500D +PERO5              =  0.650G2O400B + 0.350GAO5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11010} G3K500D +PERO6              =  0.650G2O400B + 0.350GAO5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11011} G3K500D +PERO9              =       G2O400B +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 11012} G2O400B +GNO                =       G1O400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11013} G2O400B +GNO                =       GNO400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11014} G2O400B +GHO2               =       GHO400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11015} G2O400B +GNO3               =       G1O400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11016} G2O400B +MEPERO             =  0.480G1O400B + 0.260GOO4005 + 0.260GDO4006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 11017} G2O400B +PERO1              =  0.600G1O400B + 0.200GOO4005 + 0.200GDO4006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11018} G2O400B +PERO2              =  0.560G1O400B + 0.220GOO4005 + 0.220GDO4006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 11019} G2O400B +PERO3              =  0.600G1O400B + 0.200GOO4005 + 0.200GDO4006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 11020} G2O400B +PERO5              =  0.600G1O400B + 0.200GOO4005 + 0.200GDO4006                 : ARR( 0.533E-11,   500., 0.0);
+{ 11021} G2O400B +PERO6              =  0.460G1O400B + 0.270GOO4005 + 0.270GDO4006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11022} G2O400B +PERO9              =  0.800G1O400B + 0.200GDO4006                                : ARR( 0.100E-10,     0., 0.0);
+{ 11023} G1O400B                     =       GDO4006 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 11024} G1O400B                     =       GDO3002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 11025} GDK5008 +GHO                =       GDD5005 +      GHO2                                   : ARR( 0.129E-10,     0., 0.0);
+{ 11026} GDK5008 +GHO                =       GDK500P +      GHO2                                   : ARR( 0.634E-11,     0., 0.0);
+{ 11027} GDK5008 +GHO                =       G3K500E                                               : ARR( 0.665E-10,     0., 0.0);
+{ 11028} GDK5008 +GNO3               =       G3K500E +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11029} GDK5008+HV               =       G3K3003 +      G2D2000                                :  0.100E+01*SUN;
+{ 11030} GDK5008+HV               =       G2K4004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 11031} G3K500E +GHO2               =  0.800GGK5008 + 0.200GAK5008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 11032} G3K500E +GNO                =       G2K4004 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 11033} G3K500E +GNO2               =       GPK5008                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 11034} G3K500E +GNO3               =       G2K4004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 11035} G3K500E +MEPERO             =  0.685G2K4004 + 0.315GAK5008 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11036} G3K500E +PERO1              =  0.800G2K4004 + 0.200GAK5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11037} G3K500E +PERO2              =  0.750G2K4004 + 0.250GAK5008 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11038} G3K500E +PERO3              =  0.800G2K4004 + 0.200GAK5008 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11039} G3K500E +PERO5              =  0.650G2K4004 + 0.350GAK5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11040} G3K500E +PERO6              =  0.650G2K4004 + 0.350GAK5008 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11041} G3K500E +PERO9              =       G2K4004 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 11042} G2K4004 +GNO                =       G1K4004 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11043} G2K4004 +GNO                =       GNK4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11044} G2K4004 +GHO2               =       GHK4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11045} G2K4004 +GNO3               =       G1K4004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11046} G2K4004 +MEPERO             =  0.480G1K4004 + 0.260GKO4004 + 0.260GDK4007                 : ARR( 0.164E-12,  -795., 0.0);
+{ 11047} G2K4004 +PERO1              =  0.600G1K4004 + 0.200GKO4004 + 0.200GDK4007                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11048} G2K4004 +PERO2              =  0.560G1K4004 + 0.220GKO4004 + 0.220GDK4007                 : ARR( 0.471E-13, -1350., 0.0);
+{ 11049} G2K4004 +PERO3              =  0.600G1K4004 + 0.200GKO4004 + 0.200GDK4007                 : ARR( 0.142E-12, -1200., 0.0);
+{ 11050} G2K4004 +PERO5              =  0.600G1K4004 + 0.200GKO4004 + 0.200GDK4007                 : ARR( 0.533E-11,   500., 0.0);
+{ 11051} G2K4004 +PERO6              =  0.460G1K4004 + 0.270GKO4004 + 0.270GDK4007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11052} G2K4004 +PERO9              =  0.800G1K4004 + 0.200GDK4007                                : ARR( 0.100E-10,     0., 0.0);
+{ 11053} G1K4004                     =       G3K3003 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 11054} GGO5001 +GHO                =       GGD5001 +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{ 11055} GGO5001 +GHO                =       GGK5007 +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{ 11056} GGO5001 +GHO                =       G2G500C                                               : ARR( 0.150E-11,     0., 0.0);
+{ 11057} GGO5001 +GHO                =       G3K5002                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 11058} GGO5001+HV               =       G2O4003 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11059} G2G500C +GNO                =       G1G500D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11060} G2G500C +GNO                =       GGN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11061} G2G500C +GHO2               =       GGH500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11062} G2G500C +GNO3               =       G1G500D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11063} G2G500C +MEPERO             =  0.340G1G500D + 0.330GGO5008 + 0.330GGK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11064} G2G500C +PERO1              =  0.460G1G500D + 0.270GGO5008 + 0.270GGK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11065} G2G500C +PERO2              =  0.400G1G500D + 0.300GGO5008 + 0.300GGK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11066} G2G500C +PERO3              =  0.460G1G500D + 0.270GGO5008 + 0.270GGK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11067} G2G500C +PERO5              =  0.460G1G500D + 0.270GGO5008 + 0.270GGK5008                 : ARR( 0.183E-11,   450., 0.0);
+{ 11068} G2G500C +PERO6              =  0.300G1G500D + 0.350GGO5008 + 0.350GGK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11069} G2G500C +PERO9              =  0.650G1G500D + 0.350GGK5008                                : ARR( 0.100E-10,     0., 0.0);
+{ 11070} G1G500D                     =       GDO2000 +      GGD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{ 11071} GAO5001 +GHO                =       GAD5002 +      GHO2                                   : ARR( 0.439E-11,     0., 0.0);
+{ 11072} GAO5001 +GHO                =       GAK5007 +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{ 11073} GAO5001 +GHO                =       G2A500D                                               : ARR( 0.154E-11,     0., 0.0);
+{ 11074} G2A500D +GNO                =       G1A500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11075} G2A500D +GNO                =       GAN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11076} G2A500D +GHO2               =       GAH500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11077} G2A500D +GNO3               =       G1A500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11078} G2A500D +MEPERO             =  0.340G1A500E + 0.330GAO5008 + 0.330GAK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11079} G2A500D +PERO1              =  0.460G1A500E + 0.270GAO5008 + 0.270GAK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11080} G2A500D +PERO2              =  0.400G1A500E + 0.300GAO5008 + 0.300GAK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11081} G2A500D +PERO3              =  0.460G1A500E + 0.270GAO5008 + 0.270GAK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11082} G2A500D +PERO5              =  0.460G1A500E + 0.270GAO5008 + 0.270GAK5008                 : ARR( 0.183E-11,   450., 0.0);
+{ 11083} G2A500D +PERO6              =  0.300G1A500E + 0.350GAO5008 + 0.350GAK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11084} G2A500D +PERO9              =  0.650G1A500E + 0.350GAK5008                                : ARR( 0.100E-10,     0., 0.0);
+{ 11085} G1A500E                     =       GDO2000 +      GAD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{ 11086} GPO5001                     =       G3K5002 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 11087} GPO5001 +GHO                =       GPD5001 +      GHO2                                   : ARR( 0.409E-11,     0., 0.0);
+{ 11088} GPO5001 +GHO                =       GPK5007 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 11089} GPO5001 +GHO                =       G2P500D                                               : ARR( 0.144E-11,     0., 0.0);
+{ 11090} GPO5001 +GHO                =       G2P500B                                               : ARR( 0.876E-12,     0., 0.0);
+{ 11091} GPO5001+HV               =       G3K5002 +      GNO2                                   :  0.100E+01*SUN;
+{ 11092} G2P500D +GNO                =       G1P500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11093} G2P500D +GNO                =       GPN500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11094} G2P500D +GHO2               =       GPH500K                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11095} G2P500D +GNO3               =       G1P500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11096} G2P500D +MEPERO             =  0.340G1P500E + 0.330GPO5008 + 0.330GPK5008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11097} G2P500D +PERO1              =  0.460G1P500E + 0.270GPO5008 + 0.270GPK5008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11098} G2P500D +PERO2              =  0.400G1P500E + 0.300GPO5008 + 0.300GPK5008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11099} G2P500D +PERO3              =  0.460G1P500E + 0.270GPO5008 + 0.270GPK5008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11100} G2P500D +PERO5              =  0.460G1P500E + 0.270GPO5008 + 0.270GPK5008                 : ARR( 0.183E-11,   450., 0.0);
+{ 11101} G2P500D +PERO6              =  0.300G1P500E + 0.350GPO5008 + 0.350GPK5008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11102} G2P500D +PERO9              =  0.650G1P500E + 0.350GPK5008                                : ARR( 0.100E-10,     0., 0.0);
+{ 11103} G1P500E                     =       GDO2000 +      GPD3000 +      GHO2                    : ARR( 0.200E+15,  2937., 0.0);
+{ 11104} GNO4003 +GHO                =       GND400C +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{ 11105} GNO4003 +GHO                =       GNK4002 +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{ 11106} GNO4003+HV               =       G1O4003 +      GNO2                                   :  0.100E+01*SUN;
+{ 11107} GHO4003 +GHO                =       GHD400B +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{ 11108} GHO4003 +GHO                =       GHK4002 +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{ 11109} GHO4003 +GHO                =       GDO4002 +      GHO                                    : ARR( 0.169E-10,     0., 0.0);
+{ 11110} GHO4003 +GHO                =       G2O4003                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 11111} GHO4003+HV               =       G1O4003 +      GHO                                    :  0.100E+01*SUN;
+{ 11112} GKK5005 +GHO                =       GDK500M +      GHO2                                   : ARR( 0.516E-11,     0., 0.0);
+{ 11113} GKK5005 +GHO                =       G2K500a                                               : ARR( 0.553E-12,     0., 0.0);
+{ 11114} GKK5005+HV               =       G3K2001 +      G2K3001                                :  0.100E+01*SUN;
+{ 11115} GKK5005+HV               =       G3K4007 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 11116} G2K500a +GNO                =       G1K500j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11117} G2K500a +GNO                =       GNK5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11118} G2K500a +GHO2               =       GHK500l                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11119} G2K500a +GNO3               =       G1K500j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11120} G2K500a +MEPERO             =  0.340G1K500j + 0.330GKK500E + 0.330GKK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11121} G2K500a +PERO1              =  0.460G1K500j + 0.270GKK500E + 0.270GKK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11122} G2K500a +PERO2              =  0.400G1K500j + 0.300GKK500E + 0.300GKK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11123} G2K500a +PERO3              =  0.460G1K500j + 0.270GKK500E + 0.270GKK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11124} G2K500a +PERO5              =  0.460G1K500j + 0.270GKK500E + 0.270GKK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 11125} G2K500a +PERO6              =  0.300G1K500j + 0.350GKK500E + 0.350GKK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11126} G2K500a +PERO9              =  0.650G1K500j + 0.350GKK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 11127} G1K500j                     =       G3K2001 +      GDK3001                                : ARR( 0.400E+15,  4599., 0.0);
+{ 11128} GHK500J +GHO                =       GHD500t +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 11129} GHK500J +GHO                =       G2H501a                                               : ARR( 0.451E-11,     0., 0.0);
+{ 11130} GHK500J +GHO                =       GKK5006 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 11131} GHK500J +GHO                =       GHD500N +      GHO2                                   : ARR( 0.247E-11,     0., 0.0);
+{ 11132} GHK500J +GHO                =       G2K500E                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 11133} GHK500J+HV               =       G1K500F +      GHO                                    :  0.100E+01*SUN;
+{ 11134} GHK500J+HV               =       G3H4004 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 11135} G2H501a +GNO                =       G1H502k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11136} G2H501a +GNO                =       GHN504E                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11137} G2H501a +GHO2               =       GHH5017                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11138} G2H501a +GNO3               =       G1H502k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11139} G2H501a +MEPERO             =  0.340G1H502k + 0.330GHK500f + 0.330GHK500l                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11140} G2H501a +PERO1              =  0.460G1H502k + 0.270GHK500f + 0.270GHK500l                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11141} G2H501a +PERO2              =  0.400G1H502k + 0.300GHK500f + 0.300GHK500l                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11142} G2H501a +PERO3              =  0.460G1H502k + 0.270GHK500f + 0.270GHK500l                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11143} G2H501a +PERO5              =  0.460G1H502k + 0.270GHK500f + 0.270GHK500l                 : ARR( 0.183E-11,   450., 0.0);
+{ 11144} G2H501a +PERO6              =  0.300G1H502k + 0.350GHK500f + 0.350GHK500l                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11145} G2H501a +PERO9              =  0.650G1H502k + 0.350GHK500l                                : ARR( 0.100E-10,     0., 0.0);
+{ 11146} G1H502k                     =       GDK3001 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4976., 0.0);
+{ 11147} G1H502k                     =       GHD400G +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 11148} GKO500F +GHO                =       GDK500Q +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{ 11149} GKO500F +GHO                =       G2K500b                                               : ARR( 0.459E-11,     0., 0.0);
+{ 11150} GKO500F +GHO                =       GKK5006 +      GHO2                                   : ARR( 0.644E-11,     0., 0.0);
+{ 11151} GKO500F +GHO                =       GDK500J +      GHO2                                   : ARR( 0.251E-11,     0., 0.0);
+{ 11152} GKO500F+HV               =       G3K4006 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 11153} G2K500b +GNO                =       G1K500k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11154} G2K500b +GNO                =       GNK5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11155} G2K500b +GHO2               =       GHK500e                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11156} G2K500b +GNO3               =       G1K500k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11157} G2K500b +MEPERO             =  0.340G1K500k + 0.330GKO500L + 0.330GKK500E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11158} G2K500b +PERO1              =  0.460G1K500k + 0.270GKO500L + 0.270GKK500E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11159} G2K500b +PERO2              =  0.400G1K500k + 0.300GKO500L + 0.300GKK500E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11160} G2K500b +PERO3              =  0.460G1K500k + 0.270GKO500L + 0.270GKK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11161} G2K500b +PERO5              =  0.460G1K500k + 0.270GKO500L + 0.270GKK500E                 : ARR( 0.183E-11,   450., 0.0);
+{ 11162} G2K500b +PERO6              =  0.300G1K500k + 0.350GKO500L + 0.350GKK500E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11163} G2K500b +PERO9              =  0.650G1K500k + 0.350GKK500E                                : ARR( 0.100E-10,     0., 0.0);
+{ 11164} G1K500k                     =       GDK3001 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3768., 0.0);
+{ 11165} G1K500k                     =       GDK4006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 11166} GKK5006 +GHO                =       GDK500P +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 11167} GKK5006 +GHO                =       G2K500c                                               : ARR( 0.877E-12,     0., 0.0);
+{ 11168} GKK5006 +GHO                =       GDK500L +      GHO2                                   : ARR( 0.249E-11,     0., 0.0);
+{ 11169} GKK5006+HV               =       G3K3001 +      G3K2001                                :  0.100E+01*SUN;
+{ 11170} G2K500c +GNO                =       G1K500l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11171} G2K500c +GNO                =       GNK5016                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11172} G2K500c +GHO2               =       GHK500m                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11173} G2K500c +GNO3               =       G1K500l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11174} G2K500c +MEPERO             =  0.340G1K500l + 0.330GKK500G + 0.330GKK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11175} G2K500c +PERO1              =  0.460G1K500l + 0.270GKK500G + 0.270GKK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11176} G2K500c +PERO2              =  0.400G1K500l + 0.300GKK500G + 0.300GKK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11177} G2K500c +PERO3              =  0.460G1K500l + 0.270GKK500G + 0.270GKK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11178} G2K500c +PERO5              =  0.460G1K500l + 0.270GKK500G + 0.270GKK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 11179} G2K500c +PERO6              =  0.300G1K500l + 0.350GKK500G + 0.350GKK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11180} G2K500c +PERO9              =  0.650G1K500l + 0.350GKK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 11181} G1K500l                     =       G3K2001 +      GDO2000 +      GCO                     : ARR( 0.200E+15,  3326., 0.0);
+{ 11182} GDK4001 +GHO                =       G3K4007                                               : ARR( 0.690E-10,     0., 0.0);
+{ 11183} GDK4001 +GNO3               =       G3K4007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11184} GDK4001+HV               =       G3K2001 +      G2D2000                                :  0.100E+01*SUN;
+{ 11185} GDK4001+HV               =       G2K3001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 11186} GGN5002 +GHO                =       G2G500D                                               : ARR( 0.257E-12,     0., 0.0);
+{ 11187} GGN5002 +GHO                =       G3N5002                                               : ARR( 0.213E-11,  -190., 0.0);
+{ 11188} GGN5002+HV               =       G1G5001 +      GNO2                                   :  0.100E+01*SUN;
+{ 11189} GGN5002+HV               =       G2N4002 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11190} G2G500D +GNO                =       G1G500E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11191} G2G500D +GNO                =       GGN500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11192} G2G500D +GHO2               =       GGH500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11193} G2G500D +GNO3               =       G1G500E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11194} G2G500D +MEPERO             =  0.340G1G500E + 0.330GGN5006 + 0.330GGN500Q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11195} G2G500D +PERO1              =  0.460G1G500E + 0.270GGN5006 + 0.270GGN500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11196} G2G500D +PERO2              =  0.400G1G500E + 0.300GGN5006 + 0.300GGN500Q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11197} G2G500D +PERO3              =  0.460G1G500E + 0.270GGN5006 + 0.270GGN500Q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11198} G2G500D +PERO5              =  0.460G1G500E + 0.270GGN5006 + 0.270GGN500Q                 : ARR( 0.183E-11,   450., 0.0);
+{ 11199} G2G500D +PERO6              =  0.300G1G500E + 0.350GGN5006 + 0.350GGN500Q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11200} G2G500D +PERO9              =  0.650G1G500E + 0.350GGN500Q                                : ARR( 0.100E-10,     0., 0.0);
+{ 11201} G1G500E                     =       GD02000 +      GGD3000 +      GNO2                    : ARR( 0.200E+15,  6112., 0.0);
+{ 11202} GAN5002 +GHO                =       G2A500E                                               : ARR( 0.168E-12,     0., 0.0);
+{ 11203} GAN5002 +GHO                =       G2A500F                                               : ARR( 0.230E-12,     0., 0.0);
+{ 11204} GAN5002 +GHO                =       GAK5000 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 11205} GAN5002 +GHO                =       G2A500G                                               : ARR( 0.128E-12,     0., 0.0);
+{ 11206} GAN5002 +GHO                =       G2N4002 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 11207} GAN5002+HV               =       G1A5001 +      GNO2                                   :  0.100E+01*SUN;
+{ 11208} G2A500E +GNO                =       G1A500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11209} G2A500E +GNO                =       GAN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11210} G2A500E +GHO2               =       GAH500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11211} G2A500E +GNO3               =       G1A500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11212} G2A500E +MEPERO             =  0.480G1A500F + 0.260GAN500P + 0.260GAN500Q                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11213} G2A500E +PERO1              =  0.600G1A500F + 0.200GAN500P + 0.200GAN500Q                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11214} G2A500E +PERO2              =  0.560G1A500F + 0.220GAN500P + 0.220GAN500Q                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11215} G2A500E +PERO3              =  0.600G1A500F + 0.200GAN500P + 0.200GAN500Q                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11216} G2A500E +PERO5              =  0.600G1A500F + 0.200GAN500P + 0.200GAN500Q                 : ARR( 0.473E-11,   850., 0.0);
+{ 11217} G2A500E +PERO6              =  0.460G1A500F + 0.270GAN500P + 0.270GAN500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11218} G2A500E +PERO9              =  0.800G1A500F + 0.200GAN500Q                                : ARR( 0.100E-10,     0., 0.0);
+{ 11219} G2A500F +GNO                =       G1A500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11220} G2A500F +GNO                =       GAN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11221} G2A500F +GHO2               =       GAH500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11222} G2A500F +GNO3               =       G1A500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11223} G2A500F +MEPERO             =  0.340G1A500G + 0.330GAN5006 + 0.330GAN500S                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11224} G2A500F +PERO1              =  0.460G1A500G + 0.270GAN5006 + 0.270GAN500S                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11225} G2A500F +PERO2              =  0.400G1A500G + 0.300GAN5006 + 0.300GAN500S                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11226} G2A500F +PERO3              =  0.460G1A500G + 0.270GAN5006 + 0.270GAN500S                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11227} G2A500F +PERO5              =  0.460G1A500G + 0.270GAN5006 + 0.270GAN500S                 : ARR( 0.183E-11,   450., 0.0);
+{ 11228} G2A500F +PERO6              =  0.300G1A500G + 0.350GAN5006 + 0.350GAN500S                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11229} G2A500F +PERO9              =  0.650G1A500G + 0.350GAN500S                                : ARR( 0.100E-10,     0., 0.0);
+{ 11230} G2A500G +GNO                =       G1A500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11231} G2A500G +GNO                =       GAN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11232} G2A500G +GHO2               =       GAH500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11233} G2A500G +GNO3               =       G1A500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11234} G2A500G +MEPERO             =  0.340G1A500H + 0.330GAN500U + 0.330GAN500W                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11235} G2A500G +PERO1              =  0.460G1A500H + 0.270GAN500U + 0.270GAN500W                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11236} G2A500G +PERO2              =  0.400G1A500H + 0.300GAN500U + 0.300GAN500W                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11237} G2A500G +PERO3              =  0.460G1A500H + 0.270GAN500U + 0.270GAN500W                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11238} G2A500G +PERO5              =  0.460G1A500H + 0.270GAN500U + 0.270GAN500W                 : ARR( 0.183E-11,   450., 0.0);
+{ 11239} G2A500G +PERO6              =  0.300G1A500H + 0.350GAN500U + 0.350GAN500W                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11240} G2A500G +PERO9              =  0.650G1A500H + 0.350GAN500W                                : ARR( 0.100E-10,     0., 0.0);
+{ 11241} G1A500F +OXYGEN             =       GAN500Q +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 11242} G1A500F                     =       G2A500H                                               : ARR( 0.160E+12,  4075., 0.0);
+{ 11243} G1A500G                     =       GD02000 +      GAD3000 +      GNO2                    : ARR( 0.200E+15,  6112., 0.0);
+{ 11244} G1A500H                     =       G2A500I                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 11245} G1A500H                     =       GND4005 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 11246} G2A500H +GNO                =       G1A500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11247} G2A500H +GNO                =       GAN500X                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11248} G2A500H +GHO2               =       GAH500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11249} G2A500H +GNO3               =       G1A500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11250} G2A500H +MEPERO             =  0.340G1A500I + 0.330GAN500Y + 0.330GAN500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11251} G2A500H +PERO1              =  0.460G1A500I + 0.270GAN500Y + 0.270GAN500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11252} G2A500H +PERO2              =  0.400G1A500I + 0.300GAN500Y + 0.300GAN500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11253} G2A500H +PERO3              =  0.460G1A500I + 0.270GAN500Y + 0.270GAN500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11254} G2A500H +PERO5              =  0.460G1A500I + 0.270GAN500Y + 0.270GAN500Z                 : ARR( 0.183E-11,   450., 0.0);
+{ 11255} G2A500H +PERO6              =  0.300G1A500I + 0.350GAN500Y + 0.350GAN500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11256} G2A500H +PERO9              =  0.650G1A500I + 0.350GAN500Z                                : ARR( 0.100E-10,     0., 0.0);
+{ 11257} G2A500I +GNO                =       G1A500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11258} G2A500I +GNO                =       GAN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11259} G2A500I +GHO2               =       GAH500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11260} G2A500I +GNO3               =       G1A500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11261} G2A500I +MEPERO             =  0.480G1A500J + 0.260GAN500Y + 0.260GAN500b                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11262} G2A500I +PERO1              =  0.600G1A500J + 0.200GAN500Y + 0.200GAN500b                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11263} G2A500I +PERO2              =  0.560G1A500J + 0.220GAN500Y + 0.220GAN500b                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11264} G2A500I +PERO3              =  0.600G1A500J + 0.200GAN500Y + 0.200GAN500b                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11265} G2A500I +PERO5              =  0.600G1A500J + 0.200GAN500Y + 0.200GAN500b                 : ARR( 0.473E-11,   850., 0.0);
+{ 11266} G2A500I +PERO6              =  0.460G1A500J + 0.270GAN500Y + 0.270GAN500b                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11267} G2A500I +PERO9              =  0.800G1A500J + 0.200GAN500b                                : ARR( 0.100E-10,     0., 0.0);
+{ 11268} G1A500I                     =       GAN500b +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 11269} G1A500I                     =       GND4006 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 11270} G1A500J                     =       GAN500Z +      GHO2                                   : ARR( 0.800E+11,  3100., 0.0);
+{ 11271} GPN5002                     =       G3N5002 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 11272} GPN5002 +GHO                =       G2P500E                                               : ARR( 0.168E-12,     0., 0.0);
+{ 11273} GPN5002 +GHO                =       G2P500F                                               : ARR( 0.230E-12,     0., 0.0);
+{ 11274} GPN5002 +GHO                =       GPK5000 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 11275} GPN5002 +GHO                =       G2P500G                                               : ARR( 0.172E-12,     0., 0.0);
+{ 11276} GPN5002+HV               =       G1P5001 +      GNO2                                   :  0.100E+01*SUN;
+{ 11277} GPN5002+HV               =       G3N5002 +      GNO2                                   :  0.100E+01*SUN;
+{ 11278} G2P500E +GNO                =       G1P500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11279} G2P500E +GNO                =       GPN5007                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11280} G2P500E +GHO2               =       GPH500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11281} G2P500E +GNO3               =       G1P500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11282} G2P500E +MEPERO             =  0.480G1P500F + 0.260GPN500P + 0.260GPN500Q                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11283} G2P500E +PERO1              =  0.600G1P500F + 0.200GPN500P + 0.200GPN500Q                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11284} G2P500E +PERO2              =  0.560G1P500F + 0.220GPN500P + 0.220GPN500Q                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11285} G2P500E +PERO3              =  0.600G1P500F + 0.200GPN500P + 0.200GPN500Q                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11286} G2P500E +PERO5              =  0.600G1P500F + 0.200GPN500P + 0.200GPN500Q                 : ARR( 0.473E-11,   850., 0.0);
+{ 11287} G2P500E +PERO6              =  0.460G1P500F + 0.270GPN500P + 0.270GPN500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11288} G2P500E +PERO9              =  0.800G1P500F + 0.200GPN500Q                                : ARR( 0.100E-10,     0., 0.0);
+{ 11289} G2P500F +GNO                =       G1P500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11290} G2P500F +GNO                =       GPN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11291} G2P500F +GHO2               =       GPH500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11292} G2P500F +GNO3               =       G1P500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11293} G2P500F +MEPERO             =  0.340G1P500G + 0.330GPN5006 + 0.330GPN500S                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11294} G2P500F +PERO1              =  0.460G1P500G + 0.270GPN5006 + 0.270GPN500S                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11295} G2P500F +PERO2              =  0.400G1P500G + 0.300GPN5006 + 0.300GPN500S                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11296} G2P500F +PERO3              =  0.460G1P500G + 0.270GPN5006 + 0.270GPN500S                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11297} G2P500F +PERO5              =  0.460G1P500G + 0.270GPN5006 + 0.270GPN500S                 : ARR( 0.183E-11,   450., 0.0);
+{ 11298} G2P500F +PERO6              =  0.300G1P500G + 0.350GPN5006 + 0.350GPN500S                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11299} G2P500F +PERO9              =  0.650G1P500G + 0.350GPN500S                                : ARR( 0.100E-10,     0., 0.0);
+{ 11300} G2P500G +GNO                =       G1P500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11301} G2P500G +GNO                =       GPN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11302} G2P500G +GHO2               =       GPH500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11303} G2P500G +GNO3               =       G1P500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11304} G2P500G +MEPERO             =  0.340G1P500H + 0.330GPN500U + 0.330GPN500W                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11305} G2P500G +PERO1              =  0.460G1P500H + 0.270GPN500U + 0.270GPN500W                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11306} G2P500G +PERO2              =  0.400G1P500H + 0.300GPN500U + 0.300GPN500W                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11307} G2P500G +PERO3              =  0.460G1P500H + 0.270GPN500U + 0.270GPN500W                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11308} G2P500G +PERO5              =  0.460G1P500H + 0.270GPN500U + 0.270GPN500W                 : ARR( 0.183E-11,   450., 0.0);
+{ 11309} G2P500G +PERO6              =  0.300G1P500H + 0.350GPN500U + 0.350GPN500W                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11310} G2P500G +PERO9              =  0.650G1P500H + 0.350GPN500W                                : ARR( 0.100E-10,     0., 0.0);
+{ 11311} G1P500F +OXYGEN             =       GPN500Q +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 11312} G1P500F                     =       G2P500H                                               : ARR( 0.160E+12,  3940., 0.0);
+{ 11313} G1P500G                     =       GD02000 +      GPD3000 +      GNO2                    : ARR( 0.200E+15,  6112., 0.0);
+{ 11314} G1P500H                     =       G2P500I                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 11315} G1P500H                     =       GND4005 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 11316} G2P500H +GNO                =       G1P500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11317} G2P500H +GNO                =       GPN500X                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11318} G2P500H +GHO2               =       GPH500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11319} G2P500H +GNO3               =       G1P500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11320} G2P500H +MEPERO             =  0.340G1P500I + 0.330GPN500Y + 0.330GPN500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11321} G2P500H +PERO1              =  0.460G1P500I + 0.270GPN500Y + 0.270GPN500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11322} G2P500H +PERO2              =  0.400G1P500I + 0.300GPN500Y + 0.300GPN500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11323} G2P500H +PERO3              =  0.460G1P500I + 0.270GPN500Y + 0.270GPN500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11324} G2P500H +PERO5              =  0.460G1P500I + 0.270GPN500Y + 0.270GPN500Z                 : ARR( 0.183E-11,   450., 0.0);
+{ 11325} G2P500H +PERO6              =  0.300G1P500I + 0.350GPN500Y + 0.350GPN500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11326} G2P500H +PERO9              =  0.650G1P500I + 0.350GPN500Z                                : ARR( 0.100E-10,     0., 0.0);
+{ 11327} G2P500I +GNO                =       G1P500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11328} G2P500I +GNO                =       GPN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11329} G2P500I +GHO2               =       GPH500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11330} G2P500I +GNO3               =       G1P500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11331} G2P500I +MEPERO             =  0.480G1P500J + 0.260GPN500Y + 0.260GPN500b                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11332} G2P500I +PERO1              =  0.600G1P500J + 0.200GPN500Y + 0.200GPN500b                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11333} G2P500I +PERO2              =  0.560G1P500J + 0.220GPN500Y + 0.220GPN500b                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11334} G2P500I +PERO3              =  0.600G1P500J + 0.200GPN500Y + 0.200GPN500b                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11335} G2P500I +PERO5              =  0.600G1P500J + 0.200GPN500Y + 0.200GPN500b                 : ARR( 0.473E-11,   850., 0.0);
+{ 11336} G2P500I +PERO6              =  0.460G1P500J + 0.270GPN500Y + 0.270GPN500b                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11337} G2P500I +PERO9              =  0.800G1P500J + 0.200GPN500b                                : ARR( 0.100E-10,     0., 0.0);
+{ 11338} G1P500I                     =       GPN500b +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 11339} G1P500I                     =       GND4006 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 11340} G1P500J                     =       GPN500Z +      GHO2                                   : ARR( 0.800E+11,  2965., 0.0);
+{ 11341} GNN4003 +GHO                =       G2N400H                                               : ARR( 0.677E-12,     0., 0.0);
+{ 11342} GNN4003 +GHO                =       G2N400O                                               : ARR( 0.928E-12,     0., 0.0);
+{ 11343} GNN4003 +GHO                =       GNK4000 +      GNO2                                   : ARR( 0.951E-13,     0., 0.0);
+{ 11344} GNN4003+HV               =       G1N4005 +      GNO2                                   :  0.100E+01*SUN;
+{ 11345} GNN4003+HV               =       G1N4002 +      GNO2                                   :  0.100E+01*SUN;
+{ 11346} G2N400O +GNO                =       G1N400P +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11347} G2N400O +GNO                =       GNN400L                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11348} G2N400O +GHO2               =       GHN400c                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11349} G2N400O +GNO3               =       G1N400P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11350} G2N400O +MEPERO             =  0.340G1N400P + 0.330GNN4009 + 0.330GNN400M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11351} G2N400O +PERO1              =  0.460G1N400P + 0.270GNN4009 + 0.270GNN400M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11352} G2N400O +PERO2              =  0.400G1N400P + 0.300GNN4009 + 0.300GNN400M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11353} G2N400O +PERO3              =  0.460G1N400P + 0.270GNN4009 + 0.270GNN400M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11354} G2N400O +PERO5              =  0.460G1N400P + 0.270GNN4009 + 0.270GNN400M                 : ARR( 0.183E-11,   450., 0.0);
+{ 11355} G2N400O +PERO6              =  0.300G1N400P + 0.350GNN4009 + 0.350GNN400M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11356} G2N400O +PERO9              =  0.650G1N400P + 0.350GNN400M                                : ARR( 0.100E-10,     0., 0.0);
+{ 11357} G1N400P                     =       GD02000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6128., 0.0);
+{ 11358} GHN4004 +GHO                =       GND4005 +      GHO                                    : ARR( 0.346E-11,     0., 0.0);
+{ 11359} GHN4004 +GHO                =       G2N4002                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 11360} GHN4004+HV               =       G1H4004 +      GNO2                                   :  0.100E+01*SUN;
+{ 11361} GHN4004+HV               =       G1N4002 +      GHO                                    :  0.100E+01*SUN;
+{ 11362} GNO4004 +GHO                =       G2N4003                                               : ARR( 0.168E-12,     0., 0.0);
+{ 11363} GNO4004 +GHO                =       G2N400P                                               : ARR( 0.230E-12,     0., 0.0);
+{ 11364} GNO4004 +GHO                =       GKO4000 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 11365} GNO4004 +GHO                =       GND4005 +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{ 11366} GNO4004 +GHO                =       G1N4002                                               : ARR( 0.210E-17,    85., 2.0);
+{ 11367} GNO4004+HV               =       G1O4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 11368} G2N400P +GNO                =       G1N400Q +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11369} G2N400P +GNO                =       GNN400N                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11370} G2N400P +GHO2               =       GHN400d                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11371} G2N400P +GNO3               =       G1N400Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11372} G2N400P +MEPERO             =  0.340G1N400Q + 0.330GNO4008 + 0.330GNK4007                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11373} G2N400P +PERO1              =  0.460G1N400Q + 0.270GNO4008 + 0.270GNK4007                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11374} G2N400P +PERO2              =  0.400G1N400Q + 0.300GNO4008 + 0.300GNK4007                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11375} G2N400P +PERO3              =  0.460G1N400Q + 0.270GNO4008 + 0.270GNK4007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11376} G2N400P +PERO5              =  0.460G1N400Q + 0.270GNO4008 + 0.270GNK4007                 : ARR( 0.183E-11,   450., 0.0);
+{ 11377} G2N400P +PERO6              =  0.300G1N400Q + 0.350GNO4008 + 0.350GNK4007                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11378} G2N400P +PERO9              =  0.650G1N400Q + 0.350GNK4007                                : ARR( 0.100E-10,     0., 0.0);
+{ 11379} G1N400Q                     =       GD02000 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6128., 0.0);
+{ 11380} GHD3002 +GHO                =       GDK3000 +      GHO                                    : ARR( 0.207E-10,     0., 0.0);
+{ 11381} GHD3002 +GHO                =       G3H3001                                               : ARR( 0.210E-10,     0., 0.0);
+{ 11382} GHD3002 +GHO                =       G2D3000                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 11383} GHD3002 +GNO3               =       G3H3001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11384} GHD3002+HV               =       G1D3001 +      GHO                                    :  0.100E+01*SUN;
+{ 11385} GHD3002+HV               =       GD02000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 11386} GNN4004 +GHO                =       GNN4008 +      GHO2                                   : ARR( 0.882E-12,     0., 0.0);
+{ 11387} GNN4004 +GHO                =       GNK4002 +      GNO2                                   : ARR( 0.129E-12,     0., 0.0);
+{ 11388} GNN4004 +GHO                =       G1N400C                                               : ARR( 0.230E-17,    85., 2.0);
+{ 11389} GNN4004+HV               =       G1N4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 11390} GNN4004+HV               =       G1N4003 +      GNO2                                   :  0.100E+01*SUN;
+{ 11391} GHN4005 +GHO                =       GND4002 +      GHO                                    : ARR( 0.172E-10,     0., 0.0);
+{ 11392} GHN4005 +GHO                =       G2N4003                                               : ARR( 0.203E-11,  -190., 0.0);
+{ 11393} GHN4005+HV               =       G1H4005 +      GNO2                                   :  0.100E+01*SUN;
+{ 11394} GHN4005+HV               =       G1N4003 +      GHO                                    :  0.100E+01*SUN;
+{ 11395} GNO4005 +GHO                =       GND4002 +      GHO2                                   : ARR( 0.433E-11,     0., 0.0);
+{ 11396} GNO4005 +GHO                =       G2N400Q                                               : ARR( 0.305E-12,     0., 0.0);
+{ 11397} GNO4005 +GHO                =       GND4006 +      GHO2                                   : ARR( 0.867E-12,     0., 0.0);
+{ 11398} GNO4005+HV               =       G1O4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 11399} G2N400Q +GNO                =       G1N400R +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11400} G2N400Q +GNO                =       GNN400O                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11401} G2N400Q +GHO2               =       GHN400e                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11402} G2N400Q +GNO3               =       G1N400R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11403} G2N400Q +MEPERO             =  0.340G1N400R + 0.330GNO4009 + 0.330GNK4008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11404} G2N400Q +PERO1              =  0.460G1N400R + 0.270GNO4009 + 0.270GNK4008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11405} G2N400Q +PERO2              =  0.400G1N400R + 0.300GNO4009 + 0.300GNK4008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11406} G2N400Q +PERO3              =  0.460G1N400R + 0.270GNO4009 + 0.270GNK4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11407} G2N400Q +PERO5              =  0.460G1N400R + 0.270GNO4009 + 0.270GNK4008                 : ARR( 0.183E-11,   450., 0.0);
+{ 11408} G2N400Q +PERO6              =  0.300G1N400R + 0.350GNO4009 + 0.350GNK4008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11409} G2N400Q +PERO9              =  0.650G1N400R + 0.350GNK4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 11410} G1N400R                     =  2.000GDO2000 +      GNO2                                   : ARR( 0.200E+15,  6382., 0.0);
+{ 11411} G1N400R                     =       GND3004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 11412} GND4006 +GHO                =       GND400D +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{ 11413} GND4006 +GHO                =       G3N4008                                               : ARR( 0.441E-11,     0., 0.0);
+{ 11414} GND4006 +GNO3               =       G3N4008 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11415} GND4006+HV               =       G1D4009 +      GNO2                                   :  0.100E+01*SUN;
+{ 11416} GND4006+HV               =       GDO3000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 11417} GND4006+HV               =       GD02000 +      GND2000                                :  0.100E+01*SUN;
+{ 11418} G1D4009                     =       GDO3000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 11419} GGH5001 +GHO                =       GGK5000 +      GHO                                    : ARR( 0.431E-10,     0., 0.0);
+{ 11420} GGH5001 +GHO                =       G2G5001                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 11421} GGH5001 +GHO                =       G3H5001                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 11422} GGH5001+HV               =       G1G5001 +      GHO                                    :  0.100E+01*SUN;
+{ 11423} GGH5001+HV               =       G2H4001 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11424} GAH5001 +GHO                =       GAK5000 +      GHO                                    : ARR( 0.435E-10,     0., 0.0);
+{ 11425} GAH5001 +GHO                =       G2A5001                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 11426} GAH5001+HV               =       G1A5001 +      GHO                                    :  0.100E+01*SUN;
+{ 11427} GPH5001                     =       G3H5001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 11428} GPH5001 +GHO                =       GPK5000 +      GHO                                    : ARR( 0.432E-10,     0., 0.0);
+{ 11429} GPH5001 +GHO                =       G2P5001                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 11430} GPH5001+HV               =       G1P5001 +      GHO                                    :  0.100E+01*SUN;
+{ 11431} GPH5001+HV               =       G3H5001 +      GNO2                                   :  0.100E+01*SUN;
+{ 11432} GHN4006 +GHO                =       G2H400O                                               : ARR( 0.117E-11,     0., 0.0);
+{ 11433} GHN4006 +GHO                =       GNK4000 +      GHO                                    : ARR( 0.838E-11,     0., 0.0);
+{ 11434} GHN4006 +GHO                =       G2N4005                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 11435} GHN4006+HV               =       G1N4005 +      GHO                                    :  0.100E+01*SUN;
+{ 11436} GHN4006+HV               =       G1H4001 +      GNO2                                   :  0.100E+01*SUN;
+{ 11437} G2H400O +GNO                =       G1H400Q +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11438} G2H400O +GNO                =       GHN400f                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11439} G2H400O +GHO2               =       GHH400L                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11440} G2H400O +GNO3               =       G1H400Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11441} G2H400O +MEPERO             =  0.340G1H400Q + 0.330GHN400E + 0.330GHN400g                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11442} G2H400O +PERO1              =  0.460G1H400Q + 0.270GHN400E + 0.270GHN400g                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11443} G2H400O +PERO2              =  0.400G1H400Q + 0.300GHN400E + 0.300GHN400g                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11444} G2H400O +PERO3              =  0.460G1H400Q + 0.270GHN400E + 0.270GHN400g                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11445} G2H400O +PERO5              =  0.460G1H400Q + 0.270GHN400E + 0.270GHN400g                 : ARR( 0.183E-11,   450., 0.0);
+{ 11446} G2H400O +PERO6              =  0.300G1H400Q + 0.350GHN400E + 0.350GHN400g                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11447} G2H400O +PERO9              =  0.650G1H400Q + 0.350GHN400g                                : ARR( 0.100E-10,     0., 0.0);
+{ 11448} G1H400Q                     =       GD02000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4589., 0.0);
+{ 11449} GHH4001 +GHO                =       GHK4000 +      GHO                                    : ARR( 0.421E-10,     0., 0.0);
+{ 11450} GHH4001 +GHO                =       GHD4005 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 11451} GHH4001 +GHO                =       G2H4004                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 11452} GHH4001 +GHO                =       G2H4001                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 11453} GHH4001+HV               =       G1H4004 +      GHO                                    :  0.100E+01*SUN;
+{ 11454} GHH4001+HV               =       G1H4001 +      GHO                                    :  0.100E+01*SUN;
+{ 11455} GHO4004 +GHO                =       GKO4000 +      GHO                                    : ARR( 0.424E-10,     0., 0.0);
+{ 11456} GHO4004 +GHO                =       GHD4005 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 11457} GHO4004 +GHO                =       G2O4006                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 11458} GHO4004+HV               =       G1O4006 +      GHO                                    :  0.100E+01*SUN;
+{ 11459} GHD4005 +GHO                =       G2H400P                                               : ARR( 0.365E-11,     0., 0.0);
+{ 11460} GHD4005 +GHO                =       GDK4002 +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 11461} GHD4005 +GHO                =       G3H4000                                               : ARR( 0.208E-10,     0., 0.0);
+{ 11462} GHD4005 +GHO                =       G2D4006                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 11463} GHD4005 +GNO3               =       G3H4000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11464} GHD4005+HV               =       G1D4008 +      GHO                                    :  0.100E+01*SUN;
+{ 11465} GHD4005+HV               =       GD03000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 11466} G2H400P +GNO                =       G1H400R +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11467} G2H400P +GNO                =       GHN400O                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11468} G2H400P +GHO2               =       GHH400M                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11469} G2H400P +GNO3               =       G1H400R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11470} G2H400P +MEPERO             =  0.340G1H400R + 0.330GHD4008 + 0.330GHD4007                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11471} G2H400P +PERO1              =  0.460G1H400R + 0.270GHD4008 + 0.270GHD4007                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11472} G2H400P +PERO2              =  0.400G1H400R + 0.300GHD4008 + 0.300GHD4007                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11473} G2H400P +PERO3              =  0.460G1H400R + 0.270GHD4008 + 0.270GHD4007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11474} G2H400P +PERO5              =  0.460G1H400R + 0.270GHD4008 + 0.270GHD4007                 : ARR( 0.183E-11,   450., 0.0);
+{ 11475} G2H400P +PERO6              =  0.300G1H400R + 0.350GHD4008 + 0.350GHD4007                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11476} G2H400P +PERO9              =  0.650G1H400R + 0.350GHD4007                                : ARR( 0.100E-10,     0., 0.0);
+{ 11477} G2D4006 +GNO                =       G1D4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11478} G2D4006 +GNO                =       GND4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11479} G2D4006 +GHO2               =       GHD4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11480} G2D4006 +GNO3               =       G1D4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11481} G2D4006 +MEPERO             =  0.340G1D4008 + 0.330GDO4004 + 0.330GDK4002                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11482} G2D4006 +PERO1              =  0.460G1D4008 + 0.270GDO4004 + 0.270GDK4002                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11483} G2D4006 +PERO2              =  0.400G1D4008 + 0.300GDO4004 + 0.300GDK4002                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11484} G2D4006 +PERO3              =  0.460G1D4008 + 0.270GDO4004 + 0.270GDK4002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11485} G2D4006 +PERO5              =  0.460G1D4008 + 0.270GDO4004 + 0.270GDK4002                 : ARR( 0.183E-11,   450., 0.0);
+{ 11486} G2D4006 +PERO6              =  0.300G1D4008 + 0.350GDO4004 + 0.350GDK4002                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11487} G2D4006 +PERO9              =  0.650G1D4008 + 0.350GDK4002                                : ARR( 0.100E-10,     0., 0.0);
+{ 11488} G1H400R                     =       GD02000 +      GDD2000 +      GHO                     : ARR( 0.200E+15,  4722., 0.0);
+{ 11489} GHN4007 +GHO                =       GHN400J +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 11490} GHN4007 +GHO                =       GNK4002 +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 11491} GHN4007 +GHO                =       G2N4006                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 11492} GHN4007+HV               =       G1N4006 +      GHO                                    :  0.100E+01*SUN;
+{ 11493} GHN4007+HV               =       G1H4002 +      GNO2                                   :  0.100E+01*SUN;
+{ 11494} GHH4002 +GHO                =       GHH400A +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{ 11495} GHH4002 +GHO                =       GHK4002 +      GHO                                    : ARR( 0.421E-10,     0., 0.0);
+{ 11496} GHH4002 +GHO                =       GHD4000 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 11497} GHH4002 +GHO                =       G2H4005                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 11498} GHH4002 +GHO                =       G2H4002                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 11499} GHH4002+HV               =       G1H4005 +      GHO                                    :  0.100E+01*SUN;
+{ 11500} GHH4002+HV               =       G1H4002 +      GHO                                    :  0.100E+01*SUN;
+{ 11501} GHO4005 +GHO                =       GHD4000 +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{ 11502} GHO4005 +GHO                =       GKO4002 +      GHO                                    : ARR( 0.425E-10,     0., 0.0);
+{ 11503} GHO4005 +GHO                =       GHD4006 +      GHO2                                   : ARR( 0.415E-11,     0., 0.0);
+{ 11504} GHO4005 +GHO                =       G2O4007                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 11505} GHO4005+HV               =       G1O4007 +      GHO                                    :  0.100E+01*SUN;
+{ 11506} GHD4006 +GHO                =       GHD400C +      GHO2                                   : ARR( 0.403E-11,     0., 0.0);
+{ 11507} GHD4006 +GHO                =       G2H400Q                                               : ARR( 0.449E-11,     0., 0.0);
+{ 11508} GHD4006 +GHO                =       GDK4005 +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 11509} GHD4006 +GHO                =       G3H4004                                               : ARR( 0.208E-10,     0., 0.0);
+{ 11510} GHD4006 +GHO                =       G2D4007                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 11511} GHD4006 +GNO3               =       G3H4004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11512} GHD4006+HV               =       G1D4009 +      GHO                                    :  0.100E+01*SUN;
+{ 11513} GHD4006+HV               =       GDO3000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 11514} G2H400Q +GNO                =       G1H400S +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11515} G2H400Q +GNO                =       GHN400h                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11516} G2H400Q +GHO2               =       GHH4009                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11517} G2H400Q +GNO3               =       G1H400S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11518} G2H400Q +MEPERO             =  0.340G1H400S + 0.330GHD400A + 0.330GHD400G                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11519} G2H400Q +PERO1              =  0.460G1H400S + 0.270GHD400A + 0.270GHD400G                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11520} G2H400Q +PERO2              =  0.400G1H400S + 0.300GHD400A + 0.300GHD400G                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11521} G2H400Q +PERO3              =  0.460G1H400S + 0.270GHD400A + 0.270GHD400G                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11522} G2H400Q +PERO5              =  0.460G1H400S + 0.270GHD400A + 0.270GHD400G                 : ARR( 0.183E-11,   450., 0.0);
+{ 11523} G2H400Q +PERO6              =  0.300G1H400S + 0.350GHD400A + 0.350GHD400G                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11524} G2H400Q +PERO9              =  0.650G1H400S + 0.350GHD400G                                : ARR( 0.100E-10,     0., 0.0);
+{ 11525} G2D4007 +GNO                =       G1D4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11526} G2D4007 +GNO                =       GND4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11527} G2D4007 +GHO2               =       GHD4006                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11528} G2D4007 +GNO3               =       G1D4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11529} G2D4007 +MEPERO             =  0.340G1D4009 + 0.330GDO4003 + 0.330GDK4005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11530} G2D4007 +PERO1              =  0.460G1D4009 + 0.270GDO4003 + 0.270GDK4005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11531} G2D4007 +PERO2              =  0.400G1D4009 + 0.300GDO4003 + 0.300GDK4005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11532} G2D4007 +PERO3              =  0.460G1D4009 + 0.270GDO4003 + 0.270GDK4005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11533} G2D4007 +PERO5              =  0.460G1D4009 + 0.270GDO4003 + 0.270GDK4005                 : ARR( 0.183E-11,   450., 0.0);
+{ 11534} G2D4007 +PERO6              =  0.300G1D4009 + 0.350GDO4003 + 0.350GDK4005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11535} G2D4007 +PERO9              =  0.650G1D4009 + 0.350GDK4005                                : ARR( 0.100E-10,     0., 0.0);
+{ 11536} G1H400S                     =       GCH2O   +      GHD3004 +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 11537} G1H400S                     =       GDO2000 +      GDD2000 +      GHO                     : ARR( 0.200E+15,  4976., 0.0);
+{ 11538} GGO5002 +GHO                =       G2G500E                                               : ARR( 0.117E-11,     0., 0.0);
+{ 11539} GGO5002 +GHO                =       GGK5000 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 11540} GGO5002 +GHO                =       G2G500F                                               : ARR( 0.878E-12,     0., 0.0);
+{ 11541} GGO5002 +GHO                =       G3K5003                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 11542} GGO5002+HV               =       G2O4004 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11543} G2G500E +GNO                =       G1G500F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11544} G2G500E +GNO                =       GGN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11545} G2G500E +GHO2               =       GGH500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11546} G2G500E +GNO3               =       G1G500F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11547} G2G500E +MEPERO             =  0.340G1G500F + 0.330GGO5006 + 0.330GGK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11548} G2G500E +PERO1              =  0.460G1G500F + 0.270GGO5006 + 0.270GGK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11549} G2G500E +PERO2              =  0.400G1G500F + 0.300GGO5006 + 0.300GGK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11550} G2G500E +PERO3              =  0.460G1G500F + 0.270GGO5006 + 0.270GGK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11551} G2G500E +PERO5              =  0.460G1G500F + 0.270GGO5006 + 0.270GGK5009                 : ARR( 0.183E-11,   450., 0.0);
+{ 11552} G2G500E +PERO6              =  0.300G1G500F + 0.350GGO5006 + 0.350GGK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11553} G2G500E +PERO9              =  0.650G1G500F + 0.350GGK5009                                : ARR( 0.100E-10,     0., 0.0);
+{ 11554} G2G500F +GNO                =       G1G500G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11555} G2G500F +GNO                =       GGN500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11556} G2G500F +GHO2               =       GGH500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11557} G2G500F +GNO3               =       G1G500G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11558} G2G500F +MEPERO             =  0.340G1G500G + 0.330GGO5009 + 0.330GGK500A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11559} G2G500F +PERO1              =  0.460G1G500G + 0.270GGO5009 + 0.270GGK500A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11560} G2G500F +PERO2              =  0.400G1G500G + 0.300GGO5009 + 0.300GGK500A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11561} G2G500F +PERO3              =  0.460G1G500G + 0.270GGO5009 + 0.270GGK500A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11562} G2G500F +PERO5              =  0.460G1G500G + 0.270GGO5009 + 0.270GGK500A                 : ARR( 0.183E-11,   450., 0.0);
+{ 11563} G2G500F +PERO6              =  0.300G1G500G + 0.350GGO5009 + 0.350GGK500A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11564} G2G500F +PERO9              =  0.650G1G500G + 0.350GGK500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 11565} G1G500F                     =       GD02000 +      GGD3000 +      GHO2                    : ARR( 0.200E+15,  3365., 0.0);
+{ 11566} G1G500G                     =       G2G500G                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 11567} G1G500G                     =       GD03000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  5847., 0.0);
+{ 11568} G1G500G                     =       GDO4004 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 11569} G2G500G +GNO                =       G1G500H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11570} G2G500G +GNO                =       GGN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11571} G2G500G +GHO2               =       GGH500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11572} G2G500G +GNO3               =       G1G500H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11573} G2G500G +MEPERO             =  0.480G1G500H + 0.260GGO500A + 0.260GGD5003                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11574} G2G500G +PERO1              =  0.600G1G500H + 0.200GGO500A + 0.200GGD5003                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11575} G2G500G +PERO2              =  0.560G1G500H + 0.220GGO500A + 0.220GGD5003                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11576} G2G500G +PERO3              =  0.600G1G500H + 0.200GGO500A + 0.200GGD5003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11577} G2G500G +PERO5              =  0.600G1G500H + 0.200GGO500A + 0.200GGD5003                 : ARR( 0.473E-11,   850., 0.0);
+{ 11578} G2G500G +PERO6              =  0.460G1G500H + 0.270GGO500A + 0.270GGD5003                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11579} G2G500G +PERO9              =  0.800G1G500H + 0.200GGD5003                                : ARR( 0.100E-10,     0., 0.0);
+{ 11580} G1G500H                     =       GGK500B +      GHO2                                   : ARR( 0.800E+11,  2246., 0.0);
+{ 11581} GAO5002 +GHO                =       G2A500J                                               : ARR( 0.130E-11,     0., 0.0);
+{ 11582} GAO5002 +GHO                =       GAK5000 +      GHO2                                   : ARR( 0.116E-10,     0., 0.0);
+{ 11583} G2A500J +GNO                =       G1A500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11584} G2A500J +GNO                =       GAN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11585} G2A500J +GHO2               =       GAH500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11586} G2A500J +GNO3               =       G1A500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11587} G2A500J +MEPERO             =  0.340G1A500K + 0.330GAO5006 + 0.330GAK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11588} G2A500J +PERO1              =  0.460G1A500K + 0.270GAO5006 + 0.270GAK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11589} G2A500J +PERO2              =  0.400G1A500K + 0.300GAO5006 + 0.300GAK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11590} G2A500J +PERO3              =  0.460G1A500K + 0.270GAO5006 + 0.270GAK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11591} G2A500J +PERO5              =  0.460G1A500K + 0.270GAO5006 + 0.270GAK5009                 : ARR( 0.183E-11,   450., 0.0);
+{ 11592} G2A500J +PERO6              =  0.300G1A500K + 0.350GAO5006 + 0.350GAK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11593} G2A500J +PERO9              =  0.650G1A500K + 0.350GAK5009                                : ARR( 0.100E-10,     0., 0.0);
+{ 11594} G1A500K                     =       GD02000 +      GAD3000 +      GHO2                    : ARR( 0.200E+15,  3365., 0.0);
+{ 11595} GPO5002                     =       G3K5003 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 11596} GPO5002 +GHO                =       G2P500J                                               : ARR( 0.118E-11,     0., 0.0);
+{ 11597} GPO5002 +GHO                =       GPK5000 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 11598} GPO5002 +GHO                =       G2P500K                                               : ARR( 0.883E-12,     0., 0.0);
+{ 11599} GPO5002+HV               =       G3K5003 +      GNO2                                   :  0.100E+01*SUN;
+{ 11600} G2P500J +GNO                =       G1P500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11601} G2P500J +GNO                =       GPN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11602} G2P500J +GHO2               =       GPH500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11603} G2P500J +GNO3               =       G1P500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11604} G2P500J +MEPERO             =  0.340G1P500K + 0.330GPO5006 + 0.330GPK5009                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11605} G2P500J +PERO1              =  0.460G1P500K + 0.270GPO5006 + 0.270GPK5009                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11606} G2P500J +PERO2              =  0.400G1P500K + 0.300GPO5006 + 0.300GPK5009                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11607} G2P500J +PERO3              =  0.460G1P500K + 0.270GPO5006 + 0.270GPK5009                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11608} G2P500J +PERO5              =  0.460G1P500K + 0.270GPO5006 + 0.270GPK5009                 : ARR( 0.183E-11,   450., 0.0);
+{ 11609} G2P500J +PERO6              =  0.300G1P500K + 0.350GPO5006 + 0.350GPK5009                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11610} G2P500J +PERO9              =  0.650G1P500K + 0.350GPK5009                                : ARR( 0.100E-10,     0., 0.0);
+{ 11611} G2P500K +GNO                =       G1P500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11612} G2P500K +GNO                =       GPN500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11613} G2P500K +GHO2               =       GPH500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11614} G2P500K +GNO3               =       G1P500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11615} G2P500K +MEPERO             =  0.340G1P500L + 0.330GPO5009 + 0.330GPK500A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11616} G2P500K +PERO1              =  0.460G1P500L + 0.270GPO5009 + 0.270GPK500A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11617} G2P500K +PERO2              =  0.400G1P500L + 0.300GPO5009 + 0.300GPK500A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11618} G2P500K +PERO3              =  0.460G1P500L + 0.270GPO5009 + 0.270GPK500A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11619} G2P500K +PERO5              =  0.460G1P500L + 0.270GPO5009 + 0.270GPK500A                 : ARR( 0.183E-11,   450., 0.0);
+{ 11620} G2P500K +PERO6              =  0.300G1P500L + 0.350GPO5009 + 0.350GPK500A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11621} G2P500K +PERO9              =  0.650G1P500L + 0.350GPK500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 11622} G1P500K                     =       GD02000 +      GPD3000 +      GHO2                    : ARR( 0.200E+15,  3365., 0.0);
+{ 11623} G1P500L                     =       G2P500L                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 11624} G1P500L                     =       GD03000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  5847., 0.0);
+{ 11625} G1P500L                     =       GDO4004 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 11626} G2P500L +GNO                =       G1P500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11627} G2P500L +GNO                =       GPN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11628} G2P500L +GHO2               =       GPH500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11629} G2P500L +GNO3               =       G1P500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11630} G2P500L +MEPERO             =  0.480G1P500M + 0.260GPO500A + 0.260GPD5003                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11631} G2P500L +PERO1              =  0.600G1P500M + 0.200GPO500A + 0.200GPD5003                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11632} G2P500L +PERO2              =  0.560G1P500M + 0.220GPO500A + 0.220GPD5003                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11633} G2P500L +PERO3              =  0.600G1P500M + 0.200GPO500A + 0.200GPD5003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11634} G2P500L +PERO5              =  0.600G1P500M + 0.200GPO500A + 0.200GPD5003                 : ARR( 0.473E-11,   850., 0.0);
+{ 11635} G2P500L +PERO6              =  0.460G1P500M + 0.270GPO500A + 0.270GPD5003                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11636} G2P500L +PERO9              =  0.800G1P500M + 0.200GPD5003                                : ARR( 0.100E-10,     0., 0.0);
+{ 11637} G1P500M                     =       GPK500B +      GHO2                                   : ARR( 0.800E+11,  2246., 0.0);
+{ 11638} GNO4006 +GHO                =       G2N400R                                               : ARR( 0.128E-11,     0., 0.0);
+{ 11639} GNO4006 +GHO                =       GNK4000 +      GHO2                                   : ARR( 0.229E-11,     0., 0.0);
+{ 11640} GNO4006+HV               =       G1O4004 +      GNO2                                   :  0.100E+01*SUN;
+{ 11641} G2N400R +GNO                =       G1N400S +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11642} G2N400R +GNO                =       GNN400P                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11643} G2N400R +GHO2               =       GHN400i                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11644} G2N400R +GNO3               =       G1N400S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11645} G2N400R +MEPERO             =  0.340G1N400S + 0.330GNO400A + 0.330GNK4009                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11646} G2N400R +PERO1              =  0.460G1N400S + 0.270GNO400A + 0.270GNK4009                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11647} G2N400R +PERO2              =  0.400G1N400S + 0.300GNO400A + 0.300GNK4009                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11648} G2N400R +PERO3              =  0.460G1N400S + 0.270GNO400A + 0.270GNK4009                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11649} G2N400R +PERO5              =  0.460G1N400S + 0.270GNO400A + 0.270GNK4009                 : ARR( 0.183E-11,   450., 0.0);
+{ 11650} G2N400R +PERO6              =  0.300G1N400S + 0.350GNO400A + 0.350GNK4009                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11651} G2N400R +PERO9              =  0.650G1N400S + 0.350GNK4009                                : ARR( 0.100E-10,     0., 0.0);
+{ 11652} G1N400S                     =       GD02000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3380., 0.0);
+{ 11653} GHO4006 +GHO                =       GHK4000 +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{ 11654} GHO4006 +GHO                =       GDO4004 +      GHO                                    : ARR( 0.169E-10,     0., 0.0);
+{ 11655} GHO4006 +GHO                =       G2O4004                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 11656} GHO4006+HV               =       G1O4004 +      GHO                                    :  0.100E+01*SUN;
+{ 11657} GOO4003 +GHO                =       G2O400C                                               : ARR( 0.118E-11,     0., 0.0);
+{ 11658} GOO4003 +GHO                =       GKO4000 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 11659} GOO4003 +GHO                =       GDO4004 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 11660} G2O400C +GNO                =       G1O400C +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11661} G2O400C +GNO                =       GNO400C                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11662} G2O400C +GHO2               =       GHO400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11663} G2O400C +GNO3               =       G1O400C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11664} G2O400C +MEPERO             =  0.340G1O400C + 0.330GOO4004 + 0.330GKO4005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11665} G2O400C +PERO1              =  0.460G1O400C + 0.270GOO4004 + 0.270GKO4005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11666} G2O400C +PERO2              =  0.400G1O400C + 0.300GOO4004 + 0.300GKO4005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11667} G2O400C +PERO3              =  0.460G1O400C + 0.270GOO4004 + 0.270GKO4005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11668} G2O400C +PERO5              =  0.460G1O400C + 0.270GOO4004 + 0.270GKO4005                 : ARR( 0.183E-11,   450., 0.0);
+{ 11669} G2O400C +PERO6              =  0.300G1O400C + 0.350GOO4004 + 0.350GKO4005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11670} G2O400C +PERO9              =  0.650G1O400C + 0.350GKO4005                                : ARR( 0.100E-10,     0., 0.0);
+{ 11671} G1O400C                     =       GD02000 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3380., 0.0);
+{ 11672} GDO4004 +GHO                =       G2D4008                                               : ARR( 0.368E-11,     0., 0.0);
+{ 11673} GDO4004 +GHO                =       GDK4002 +      GHO2                                   : ARR( 0.635E-11,     0., 0.0);
+{ 11674} GDO4004 +GHO                =       G3K4004                                               : ARR( 0.210E-10,     0., 0.0);
+{ 11675} GDO4004 +GNO3               =       G3K4004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 11676} GDO4004+HV               =       GD03000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 11677} G2D4008 +GNO                =       G1D400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11678} G2D4008 +GNO                =       GND400H                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11679} G2D4008 +GHO2               =       GHD400H                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11680} G2D4008 +GNO3               =       G1D400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11681} G2D4008 +MEPERO             =  0.340G1D400A + 0.330GDO4005 + 0.330GDK4003                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11682} G2D4008 +PERO1              =  0.460G1D400A + 0.270GDO4005 + 0.270GDK4003                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11683} G2D4008 +PERO2              =  0.400G1D400A + 0.300GDO4005 + 0.300GDK4003                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11684} G2D4008 +PERO3              =  0.460G1D400A + 0.270GDO4005 + 0.270GDK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11685} G2D4008 +PERO5              =  0.460G1D400A + 0.270GDO4005 + 0.270GDK4003                 : ARR( 0.183E-11,   450., 0.0);
+{ 11686} G2D4008 +PERO6              =  0.300G1D400A + 0.350GDO4005 + 0.350GDK4003                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11687} G2D4008 +PERO9              =  0.650G1D400A + 0.350GDK4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 11688} G1D400A                     =       GD02000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3513., 0.0);
+{ 11689} GGK5000 +GHO                =       G2G500H                                               : ARR( 0.531E-12,     0., 0.0);
+{ 11690} GGK5000 +GHO                =       G2G500I                                               : ARR( 0.701E-12,     0., 0.0);
+{ 11691} GGK5000 +GHO                =       G2G500J                                               : ARR( 0.525E-12,     0., 0.0);
+{ 11692} GGK5000 +GHO                =       G3K5004                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 11693} GGK5000+HV               =       G3K3000 +      G2G2000                                :  0.100E+01*SUN;
+{ 11694} GGK5000+HV               =       G2K4000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11695} G2G500H +GNO                =       G1G500I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11696} G2G500H +GNO                =       GGN5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11697} G2G500H +GHO2               =       GGH500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11698} G2G500H +GNO3               =       G1G500I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11699} G2G500H +MEPERO             =  0.480G1G500I + 0.260GGK500C + 0.260GGD5004                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11700} G2G500H +PERO1              =  0.600G1G500I + 0.200GGK500C + 0.200GGD5004                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11701} G2G500H +PERO2              =  0.560G1G500I + 0.220GGK500C + 0.220GGD5004                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11702} G2G500H +PERO3              =  0.600G1G500I + 0.200GGK500C + 0.200GGD5004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11703} G2G500H +PERO5              =  0.600G1G500I + 0.200GGK500C + 0.200GGD5004                 : ARR( 0.473E-11,   850., 0.0);
+{ 11704} G2G500H +PERO6              =  0.460G1G500I + 0.270GGK500C + 0.270GGD5004                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11705} G2G500H +PERO9              =  0.800G1G500I + 0.200GGD5004                                : ARR( 0.100E-10,     0., 0.0);
+{ 11706} G2G500I +GNO                =       G1G500J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11707} G2G500I +GNO                =       GGN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11708} G2G500I +GHO2               =       GGH500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11709} G2G500I +GNO3               =       G1G500J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11710} G2G500I +MEPERO             =  0.340G1G500J + 0.330GGK5003 + 0.330GGK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11711} G2G500I +PERO1              =  0.460G1G500J + 0.270GGK5003 + 0.270GGK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11712} G2G500I +PERO2              =  0.400G1G500J + 0.300GGK5003 + 0.300GGK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11713} G2G500I +PERO3              =  0.460G1G500J + 0.270GGK5003 + 0.270GGK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11714} G2G500I +PERO5              =  0.460G1G500J + 0.270GGK5003 + 0.270GGK500D                 : ARR( 0.183E-11,   450., 0.0);
+{ 11715} G2G500I +PERO6              =  0.300G1G500J + 0.350GGK5003 + 0.350GGK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11716} G2G500I +PERO9              =  0.650G1G500J + 0.350GGK500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 11717} G2G500J +GNO                =       G1G500K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11718} G2G500J +GNO                =       GGN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11719} G2G500J +GHO2               =       GGH500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11720} G2G500J +GNO3               =       G1G500K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11721} G2G500J +MEPERO             =  0.340G1G500K + 0.330GGK500E + 0.330GGK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11722} G2G500J +PERO1              =  0.460G1G500K + 0.270GGK500E + 0.270GGK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11723} G2G500J +PERO2              =  0.400G1G500K + 0.300GGK500E + 0.300GGK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11724} G2G500J +PERO3              =  0.460G1G500K + 0.270GGK500E + 0.270GGK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11725} G2G500J +PERO5              =  0.460G1G500K + 0.270GGK500E + 0.270GGK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 11726} G2G500J +PERO6              =  0.300G1G500K + 0.350GGK500E + 0.350GGK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11727} G2G500J +PERO9              =  0.650G1G500K + 0.350GGK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 11728} G1G500I +OXYGEN             =       GGD5004 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 11729} G1G500I                     =       G2G500K                                               : ARR( 0.160E+12,  5203., 0.0);
+{ 11730} G1G500J                     =       GD02000 +      G3G3000                                : ARR( 0.200E+15,  2726., 0.0);
+{ 11731} G1G500K                     =       G3K3000 +      GGD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 11732} G2G500K +GNO                =       G1G500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11733} G2G500K +GNO                =       GGN500X                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11734} G2G500K +GHO2               =       GGH500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11735} G2G500K +GNO3               =       G1G500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11736} G2G500K +MEPERO             =  0.340G1G500L + 0.330GGK500G + 0.330GGK500H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11737} G2G500K +PERO1              =  0.460G1G500L + 0.270GGK500G + 0.270GGK500H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11738} G2G500K +PERO2              =  0.400G1G500L + 0.300GGK500G + 0.300GGK500H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11739} G2G500K +PERO3              =  0.460G1G500L + 0.270GGK500G + 0.270GGK500H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11740} G2G500K +PERO5              =  0.460G1G500L + 0.270GGK500G + 0.270GGK500H                 : ARR( 0.183E-11,   450., 0.0);
+{ 11741} G2G500K +PERO6              =  0.300G1G500L + 0.350GGK500G + 0.350GGK500H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11742} G2G500K +PERO9              =  0.650G1G500L + 0.350GGK500H                                : ARR( 0.100E-10,     0., 0.0);
+{ 11743} G3G3000 +GHO2               =  0.800GGG3000 + 0.200GAG3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 11744} G3G3000 +GNO                =       G2G2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 11745} G3G3000 +GNO2               =       GPG3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 11746} G3G3000 +GNO3               =       G2G2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 11747} G3G3000 +MEPERO             =  0.685G2G2000 + 0.315GAG3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11748} G3G3000 +PERO1              =  0.800G2G2000 + 0.200GAG3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11749} G3G3000 +PERO2              =  0.750G2G2000 + 0.250GAG3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11750} G3G3000 +PERO3              =  0.800G2G2000 + 0.200GAG3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11751} G3G3000 +PERO5              =  0.650G2G2000 + 0.350GAG3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11752} G3G3000 +PERO6              =  0.650G2G2000 + 0.350GAG3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11753} G3G3000 +PERO9              =       G2G2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 11754} G1G500L                     =       GGD5005 +      GHO2                                   : ARR( 0.160E+12,  3981., 0.0);
+{ 11755} G1G500L                     =       G3K3001 +      GGD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 11756} GAK5000 +GHO                =       G2A500K                                               : ARR( 0.531E-12,     0., 0.0);
+{ 11757} GAK5000 +GHO                =       G2A500L                                               : ARR( 0.701E-12,     0., 0.0);
+{ 11758} GAK5000 +GHO                =       G2A500M                                               : ARR( 0.389E-12,     0., 0.0);
+{ 11759} GAK5000 +GHO                =       G2K4000 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 11760} GAK5000+HV               =       G3K3000 +      G2A2000                                :  0.100E+01*SUN;
+{ 11761} G2A500K +GNO                =       G1A500L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11762} G2A500K +GNO                =       GAN5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11763} G2A500K +GHO2               =       GAH500R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11764} G2A500K +GNO3               =       G1A500L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11765} G2A500K +MEPERO             =  0.480G1A500L + 0.260GAK500A + 0.260GAD5004                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11766} G2A500K +PERO1              =  0.600G1A500L + 0.200GAK500A + 0.200GAD5004                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11767} G2A500K +PERO2              =  0.560G1A500L + 0.220GAK500A + 0.220GAD5004                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11768} G2A500K +PERO3              =  0.600G1A500L + 0.200GAK500A + 0.200GAD5004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11769} G2A500K +PERO5              =  0.600G1A500L + 0.200GAK500A + 0.200GAD5004                 : ARR( 0.473E-11,   850., 0.0);
+{ 11770} G2A500K +PERO6              =  0.460G1A500L + 0.270GAK500A + 0.270GAD5004                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11771} G2A500K +PERO9              =  0.800G1A500L + 0.200GAD5004                                : ARR( 0.100E-10,     0., 0.0);
+{ 11772} G2A500L +GNO                =       G1A500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11773} G2A500L +GNO                =       GAN500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11774} G2A500L +GHO2               =       GAH500S                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11775} G2A500L +GNO3               =       G1A500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11776} G2A500L +MEPERO             =  0.340G1A500M + 0.330GAK5003 + 0.330GAK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11777} G2A500L +PERO1              =  0.460G1A500M + 0.270GAK5003 + 0.270GAK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11778} G2A500L +PERO2              =  0.400G1A500M + 0.300GAK5003 + 0.300GAK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11779} G2A500L +PERO3              =  0.460G1A500M + 0.270GAK5003 + 0.270GAK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11780} G2A500L +PERO5              =  0.460G1A500M + 0.270GAK5003 + 0.270GAK500B                 : ARR( 0.183E-11,   450., 0.0);
+{ 11781} G2A500L +PERO6              =  0.300G1A500M + 0.350GAK5003 + 0.350GAK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11782} G2A500L +PERO9              =  0.650G1A500M + 0.350GAK500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 11783} G2A500M +GNO                =       G1A500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11784} G2A500M +GNO                =       GAN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11785} G2A500M +GHO2               =       GAH500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11786} G2A500M +GNO3               =       G1A500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11787} G2A500M +MEPERO             =  0.340G1A500N + 0.330GAK500C + 0.330GAK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11788} G2A500M +PERO1              =  0.460G1A500N + 0.270GAK500C + 0.270GAK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11789} G2A500M +PERO2              =  0.400G1A500N + 0.300GAK500C + 0.300GAK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11790} G2A500M +PERO3              =  0.460G1A500N + 0.270GAK500C + 0.270GAK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11791} G2A500M +PERO5              =  0.460G1A500N + 0.270GAK500C + 0.270GAK500D                 : ARR( 0.183E-11,   450., 0.0);
+{ 11792} G2A500M +PERO6              =  0.300G1A500N + 0.350GAK500C + 0.350GAK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11793} G2A500M +PERO9              =  0.650G1A500N + 0.350GAK500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 11794} G1A500L +OXYGEN             =       GAD5004 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 11795} G1A500L                     =       G2A500N                                               : ARR( 0.160E+12,  5338., 0.0);
+{ 11796} G1A500M                     =       GD02000 +      G3A3000                                : ARR( 0.200E+15,  2726., 0.0);
+{ 11797} G1A500N                     =       G3K3000 +      GAD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 11798} G2A500N +GNO                =       G1A500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11799} G2A500N +GNO                =       GAN500f                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11800} G2A500N +GHO2               =       GAH500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11801} G2A500N +GNO3               =       G1A500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11802} G2A500N +MEPERO             =  0.340G1A500O + 0.330GAK500E + 0.330GAK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11803} G2A500N +PERO1              =  0.460G1A500O + 0.270GAK500E + 0.270GAK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11804} G2A500N +PERO2              =  0.400G1A500O + 0.300GAK500E + 0.300GAK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11805} G2A500N +PERO3              =  0.460G1A500O + 0.270GAK500E + 0.270GAK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11806} G2A500N +PERO5              =  0.460G1A500O + 0.270GAK500E + 0.270GAK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 11807} G2A500N +PERO6              =  0.300G1A500O + 0.350GAK500E + 0.350GAK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11808} G2A500N +PERO9              =  0.650G1A500O + 0.350GAK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 11809} G3A3000 +GHO2               =  0.800GAG3000 + 0.200GAA3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 11810} G3A3000 +GNO                =       G2A2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 11811} G3A3000 +GNO2               =       GPA3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 11812} G3A3000 +GNO3               =       G2A2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 11813} G3A3000 +MEPERO             =  0.685G2A2000 + 0.315GAA3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11814} G3A3000 +PERO1              =  0.800G2A2000 + 0.200GAA3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11815} G3A3000 +PERO2              =  0.750G2A2000 + 0.250GAA3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11816} G3A3000 +PERO3              =  0.800G2A2000 + 0.200GAA3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11817} G3A3000 +PERO5              =  0.650G2A2000 + 0.350GAA3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11818} G3A3000 +PERO6              =  0.650G2A2000 + 0.350GAA3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11819} G3A3000 +PERO9              =       G2A2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 11820} G1A500O                     =       GAD5005 +      GHO2                                   : ARR( 0.160E+12,  3981., 0.0);
+{ 11821} G1A500O                     =       G3K3001 +      GAD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 11822} GPK5000                     =       G3K5004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 11823} GPK5000 +GHO                =       G2P500M                                               : ARR( 0.531E-12,     0., 0.0);
+{ 11824} GPK5000 +GHO                =       G2P500N                                               : ARR( 0.701E-12,     0., 0.0);
+{ 11825} GPK5000 +GHO                =       G2P500O                                               : ARR( 0.525E-12,     0., 0.0);
+{ 11826} GPK5000+HV               =       G3K3000 +      G2P2000                                :  0.100E+01*SUN;
+{ 11827} GPK5000+HV               =       G3K5004 +      GNO2                                   :  0.100E+01*SUN;
+{ 11828} G2P500M +GNO                =       G1P500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11829} G2P500M +GNO                =       GPN5009                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11830} G2P500M +GHO2               =       GPH500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11831} G2P500M +GNO3               =       G1P500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11832} G2P500M +MEPERO             =  0.480G1P500N + 0.260GPK500C + 0.260GPD5004                 : ARR( 0.146E-12,  -445., 0.0);
+{ 11833} G2P500M +PERO1              =  0.600G1P500N + 0.200GPK500C + 0.200GPD5004                 : ARR( 0.112E-12,  -500., 0.0);
+{ 11834} G2P500M +PERO2              =  0.560G1P500N + 0.220GPK500C + 0.220GPD5004                 : ARR( 0.418E-13, -1000., 0.0);
+{ 11835} G2P500M +PERO3              =  0.600G1P500N + 0.200GPK500C + 0.200GPD5004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 11836} G2P500M +PERO5              =  0.600G1P500N + 0.200GPK500C + 0.200GPD5004                 : ARR( 0.473E-11,   850., 0.0);
+{ 11837} G2P500M +PERO6              =  0.460G1P500N + 0.270GPK500C + 0.270GPD5004                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11838} G2P500M +PERO9              =  0.800G1P500N + 0.200GPD5004                                : ARR( 0.100E-10,     0., 0.0);
+{ 11839} G2P500N +GNO                =       G1P500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11840} G2P500N +GNO                =       GPN500f                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11841} G2P500N +GHO2               =       GPH500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11842} G2P500N +GNO3               =       G1P500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11843} G2P500N +MEPERO             =  0.340G1P500O + 0.330GPK5003 + 0.330GPK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11844} G2P500N +PERO1              =  0.460G1P500O + 0.270GPK5003 + 0.270GPK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11845} G2P500N +PERO2              =  0.400G1P500O + 0.300GPK5003 + 0.300GPK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11846} G2P500N +PERO3              =  0.460G1P500O + 0.270GPK5003 + 0.270GPK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11847} G2P500N +PERO5              =  0.460G1P500O + 0.270GPK5003 + 0.270GPK500D                 : ARR( 0.183E-11,   450., 0.0);
+{ 11848} G2P500N +PERO6              =  0.300G1P500O + 0.350GPK5003 + 0.350GPK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11849} G2P500N +PERO9              =  0.650G1P500O + 0.350GPK500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 11850} G2P500O +GNO                =       G1P500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11851} G2P500O +GNO                =       GPN500g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11852} G2P500O +GHO2               =       GPH500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11853} G2P500O +GNO3               =       G1P500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11854} G2P500O +MEPERO             =  0.340G1P500P + 0.330GPK500E + 0.330GPK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11855} G2P500O +PERO1              =  0.460G1P500P + 0.270GPK500E + 0.270GPK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11856} G2P500O +PERO2              =  0.400G1P500P + 0.300GPK500E + 0.300GPK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11857} G2P500O +PERO3              =  0.460G1P500P + 0.270GPK500E + 0.270GPK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11858} G2P500O +PERO5              =  0.460G1P500P + 0.270GPK500E + 0.270GPK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 11859} G2P500O +PERO6              =  0.300G1P500P + 0.350GPK500E + 0.350GPK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11860} G2P500O +PERO9              =  0.650G1P500P + 0.350GPK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 11861} G1P500N +OXYGEN             =       GPD5004 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 11862} G1P500N                     =       G2P500P                                               : ARR( 0.160E+12,  5203., 0.0);
+{ 11863} G1P500O                     =       GD02000 +      G3P3000                                : ARR( 0.200E+15,  2726., 0.0);
+{ 11864} G1P500P                     =       G3K3000 +      GPD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 11865} G2P500P +GNO                =       G1P500Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11866} G2P500P +GNO                =       GPN500h                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11867} G2P500P +GHO2               =       GPH500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11868} G2P500P +GNO3               =       G1P500Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11869} G2P500P +MEPERO             =  0.340G1P500Q + 0.330GPK500G + 0.330GPK500H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11870} G2P500P +PERO1              =  0.460G1P500Q + 0.270GPK500G + 0.270GPK500H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11871} G2P500P +PERO2              =  0.400G1P500Q + 0.300GPK500G + 0.300GPK500H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11872} G2P500P +PERO3              =  0.460G1P500Q + 0.270GPK500G + 0.270GPK500H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11873} G2P500P +PERO5              =  0.460G1P500Q + 0.270GPK500G + 0.270GPK500H                 : ARR( 0.183E-11,   450., 0.0);
+{ 11874} G2P500P +PERO6              =  0.300G1P500Q + 0.350GPK500G + 0.350GPK500H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11875} G2P500P +PERO9              =  0.650G1P500Q + 0.350GPK500H                                : ARR( 0.100E-10,     0., 0.0);
+{ 11876} G3P3000 +GHO2               =  0.800GPG3000 + 0.200GPA3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 11877} G3P3000 +GNO                =       G2P2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 11878} G3P3000 +GNO2               =       GPP3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 11879} G3P3000 +GNO3               =       G2P2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 11880} G3P3000 +MEPERO             =  0.685G2P2000 + 0.315GPA3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11881} G3P3000 +PERO1              =  0.800G2P2000 + 0.200GPA3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11882} G3P3000 +PERO2              =  0.750G2P2000 + 0.250GPA3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11883} G3P3000 +PERO3              =  0.800G2P2000 + 0.200GPA3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11884} G3P3000 +PERO5              =  0.650G2P2000 + 0.350GPA3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11885} G3P3000 +PERO6              =  0.650G2P2000 + 0.350GPA3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 11886} G3P3000 +PERO9              =       G2P2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 11887} G1P500Q                     =       GPD5005 +      GHO2                                   : ARR( 0.160E+12,  3981., 0.0);
+{ 11888} G1P500Q                     =       G3K3001 +      GPD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 11889} GNK4000 +GHO                =       G2N400J                                               : ARR( 0.543E-12,     0., 0.0);
+{ 11890} GNK4000 +GHO                =       G2N400S                                               : ARR( 0.716E-12,     0., 0.0);
+{ 11891} GNK4000+HV               =       G3K3000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 11892} GNK4000+HV               =       G1K4000 +      GNO2                                   :  0.100E+01*SUN;
+{ 11893} G2N400S +GNO                =       G1N400T +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11894} G2N400S +GNO                =       GNN400Q                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11895} G2N400S +GHO2               =       GHN400j                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11896} G2N400S +GNO3               =       G1N400T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11897} G2N400S +MEPERO             =  0.340G1N400T + 0.330GNK4003 + 0.330GNK400A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11898} G2N400S +PERO1              =  0.460G1N400T + 0.270GNK4003 + 0.270GNK400A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11899} G2N400S +PERO2              =  0.400G1N400T + 0.300GNK4003 + 0.300GNK400A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11900} G2N400S +PERO3              =  0.460G1N400T + 0.270GNK4003 + 0.270GNK400A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11901} G2N400S +PERO5              =  0.460G1N400T + 0.270GNK4003 + 0.270GNK400A                 : ARR( 0.183E-11,   450., 0.0);
+{ 11902} G2N400S +PERO6              =  0.300G1N400T + 0.350GNK4003 + 0.350GNK400A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11903} G2N400S +PERO9              =  0.650G1N400T + 0.350GNK400A                                : ARR( 0.100E-10,     0., 0.0);
+{ 11904} G1N400T                     =       GD02000 +      G3N2000                                : ARR( 0.200E+15,  2695., 0.0);
+{ 11905} GHK4000 +GHO                =       GDK4002 +      GHO                                    : ARR( 0.107E-10,     0., 0.0);
+{ 11906} GHK4000 +GHO                =       G2K4000                                               : ARR( 0.207E-11,  -190., 0.0);
+{ 11907} GHK4000+HV               =       G3K3000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 11908} GHK4000+HV               =       G1K4000 +      GHO                                    :  0.100E+01*SUN;
+{ 11909} GKO4000 +GHO                =       G2K4003                                               : ARR( 0.552E-12,     0., 0.0);
+{ 11910} GKO4000 +GHO                =       G2K4005                                               : ARR( 0.727E-12,     0., 0.0);
+{ 11911} GKO4000 +GHO                =       GDK4002 +      GHO2                                   : ARR( 0.255E-11,     0., 0.0);
+{ 11912} GKO4000+HV               =       G3K3000 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 11913} G2K4005 +GNO                =       G1K4005 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11914} G2K4005 +GNO                =       GNK400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11915} G2K4005 +GHO2               =       GHK4007                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11916} G2K4005 +GNO3               =       G1K4005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11917} G2K4005 +MEPERO             =  0.340G1K4005 + 0.330GKO4003 + 0.330GKK4000                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11918} G2K4005 +PERO1              =  0.460G1K4005 + 0.270GKO4003 + 0.270GKK4000                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11919} G2K4005 +PERO2              =  0.400G1K4005 + 0.300GKO4003 + 0.300GKK4000                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11920} G2K4005 +PERO3              =  0.460G1K4005 + 0.270GKO4003 + 0.270GKK4000                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11921} G2K4005 +PERO5              =  0.460G1K4005 + 0.270GKO4003 + 0.270GKK4000                 : ARR( 0.183E-11,   450., 0.0);
+{ 11922} G2K4005 +PERO6              =  0.300G1K4005 + 0.350GKO4003 + 0.350GKK4000                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11923} G2K4005 +PERO9              =  0.650G1K4005 + 0.350GKK4000                                : ARR( 0.100E-10,     0., 0.0);
+{ 11924} G1K4005                     =       GD02000 +      G3K2001                                : ARR( 0.200E+15,  2814., 0.0);
+{ 11925} GDK4002 +GHO                =       G2D4009                                               : ARR( 0.728E-12,     0., 0.0);
+{ 11926} GDK4002 +GHO                =       G3K3000 +      GCO                                    : ARR( 0.132E-10,     0., 0.0);
+{ 11927} GDK4002 +GNO3               =       G3K3000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 11928} GDK4002+HV               =       G3K3000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 11929} GDK4002+HV               =       GD03000 +      GCO                                    :  0.100E+01*SUN;
+{ 11930} GDK4002+HV               =       GC02000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 11931} G2D4009 +GNO                =       G1D400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 11932} G2D4009 +GNO                =       GND400I                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 11933} G2D4009 +GHO2               =       GHD400I                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 11934} G2D4009 +GNO3               =       G1D400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11935} G2D4009 +MEPERO             =  0.340G1D400B + 0.330GDK4004 + 0.330GDK4008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11936} G2D4009 +PERO1              =  0.460G1D400B + 0.270GDK4004 + 0.270GDK4008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11937} G2D4009 +PERO2              =  0.400G1D400B + 0.300GDK4004 + 0.300GDK4008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11938} G2D4009 +PERO3              =  0.460G1D400B + 0.270GDK4004 + 0.270GDK4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11939} G2D4009 +PERO5              =  0.460G1D400B + 0.270GDK4004 + 0.270GDK4008                 : ARR( 0.183E-11,   450., 0.0);
+{ 11940} G2D4009 +PERO6              =  0.300G1D400B + 0.350GDK4004 + 0.350GDK4008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11941} G2D4009 +PERO9              =  0.650G1D400B + 0.350GDK4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 11942} G1D400B                     =       GD02000 +      G3D2000                                : ARR( 0.200E+15,  3038., 0.0);
+{ 11943} GGN5003 +GHO                =       G2G500L                                               : ARR( 0.290E-12,     0., 0.0);
+{ 11944} GGN5003 +GHO                =       G2G500M                                               : ARR( 0.885E-12,     0., 0.0);
+{ 11945} GGN5003 +GHO                =       G3N5003                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 11946} GGN5003+HV               =       G1G5000 +      GNO2                                   :  0.100E+01*SUN;
+{ 11947} GGN5003+HV               =       G2N4007 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11948} G2G500L +GNO                =       G1G500M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11949} G2G500L +GNO                =       GGN500P                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11950} G2G500L +GHO2               =       GGH500T                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11951} G2G500L +GNO3               =       G1G500M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11952} G2G500L +MEPERO             =  0.340G1G500M + 0.330GGN500R + 0.330GGN500U                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11953} G2G500L +PERO1              =  0.460G1G500M + 0.270GGN500R + 0.270GGN500U                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11954} G2G500L +PERO2              =  0.400G1G500M + 0.300GGN500R + 0.300GGN500U                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11955} G2G500L +PERO3              =  0.460G1G500M + 0.270GGN500R + 0.270GGN500U                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11956} G2G500L +PERO5              =  0.460G1G500M + 0.270GGN500R + 0.270GGN500U                 : ARR( 0.183E-11,   450., 0.0);
+{ 11957} G2G500L +PERO6              =  0.300G1G500M + 0.350GGN500R + 0.350GGN500U                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11958} G2G500L +PERO9              =  0.650G1G500M + 0.350GGN500U                                : ARR( 0.100E-10,     0., 0.0);
+{ 11959} G2G500M +GNO                =       G1G500N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11960} G2G500M +GNO                =       GGN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11961} G2G500M +GHO2               =       GGH500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11962} G2G500M +GNO3               =       G1G500N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11963} G2G500M +MEPERO             =  0.340G1G500N + 0.330GGN500Z + 0.330GGN500a                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11964} G2G500M +PERO1              =  0.460G1G500N + 0.270GGN500Z + 0.270GGN500a                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11965} G2G500M +PERO2              =  0.400G1G500N + 0.300GGN500Z + 0.300GGN500a                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11966} G2G500M +PERO3              =  0.460G1G500N + 0.270GGN500Z + 0.270GGN500a                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11967} G2G500M +PERO5              =  0.460G1G500N + 0.270GGN500Z + 0.270GGN500a                 : ARR( 0.183E-11,   450., 0.0);
+{ 11968} G2G500M +PERO6              =  0.300G1G500N + 0.350GGN500Z + 0.350GGN500a                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11969} G2G500M +PERO9              =  0.650G1G500N + 0.350GGN500a                                : ARR( 0.100E-10,     0., 0.0);
+{ 11970} G1G500M                     =       GD02000 +      GGD3000 +      GNO2                    : ARR( 0.200E+15,  6072., 0.0);
+{ 11971} G1G500N                     =       GND4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4949., 0.0);
+{ 11972} GGH5002 +GHO                =       GGK5001 +      GHO                                    : ARR( 0.355E-10,     0., 0.0);
+{ 11973} GGH5002 +GHO                =       G2G5000                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 11974} GGH5002 +GHO                =       G3H5002                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 11975} GGH5002+HV               =       G1G5000 +      GHO                                    :  0.100E+01*SUN;
+{ 11976} GGH5002+HV               =       G2H4007 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11977} GGK5001 +GHO                =       G2G500N                                               : ARR( 0.874E-12,     0., 0.0);
+{ 11978} GGK5001 +GHO                =       G2G500O                                               : ARR( 0.277E-11,     0., 0.0);
+{ 11979} GGK5001 +GHO                =       G3K5007                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 11980} GGK5001+HV               =       G3K2000 +      G2G3000                                :  0.100E+01*SUN;
+{ 11981} GGK5001+HV               =       G2K4001 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 11982} G2G500N +GNO                =       G1G500O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11983} G2G500N +GNO                =       GGN500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11984} G2G500N +GHO2               =       GGH500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11985} G2G500N +GNO3               =       G1G500O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11986} G2G500N +MEPERO             =  0.340G1G500O + 0.330GGK5009 + 0.330GGK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11987} G2G500N +PERO1              =  0.460G1G500O + 0.270GGK5009 + 0.270GGK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11988} G2G500N +PERO2              =  0.400G1G500O + 0.300GGK5009 + 0.300GGK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 11989} G2G500N +PERO3              =  0.460G1G500O + 0.270GGK5009 + 0.270GGK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 11990} G2G500N +PERO5              =  0.460G1G500O + 0.270GGK5009 + 0.270GGK500D                 : ARR( 0.183E-11,   450., 0.0);
+{ 11991} G2G500N +PERO6              =  0.300G1G500O + 0.350GGK5009 + 0.350GGK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 11992} G2G500N +PERO9              =  0.650G1G500O + 0.350GGK500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 11993} G2G500O +GNO                =       G1G500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 11994} G2G500O +GNO                =       GGN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 11995} G2G500O +GHO2               =       GGH500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 11996} G2G500O +GNO3               =       G1G500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 11997} G2G500O +MEPERO             =  0.340G1G500P + 0.330GGK500I + 0.330GGK500J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 11998} G2G500O +PERO1              =  0.460G1G500P + 0.270GGK500I + 0.270GGK500J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 11999} G2G500O +PERO2              =  0.400G1G500P + 0.300GGK500I + 0.300GGK500J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12000} G2G500O +PERO3              =  0.460G1G500P + 0.270GGK500I + 0.270GGK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12001} G2G500O +PERO5              =  0.460G1G500P + 0.270GGK500I + 0.270GGK500J                 : ARR( 0.183E-11,   450., 0.0);
+{ 12002} G2G500O +PERO6              =  0.300G1G500P + 0.350GGK500I + 0.350GGK500J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12003} G2G500O +PERO9              =  0.650G1G500P + 0.350GGK500J                                : ARR( 0.100E-10,     0., 0.0);
+{ 12004} G1G500O                     =       G3K2000 +      GGD3000                                : ARR( 0.200E+15,  2285., 0.0);
+{ 12005} G1G500P                     =       GDK4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4566., 0.0);
+{ 12006} GGN5004 +GHO                =       G2G500P                                               : ARR( 0.120E-11,     0., 0.0);
+{ 12007} GGN5004 +GHO                =       G2G500Q                                               : ARR( 0.296E-12,     0., 0.0);
+{ 12008} GGN5004 +GHO                =       G3N500I                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 12009} GGN5004+HV               =       G1G5002 +      GNO2                                   :  0.100E+01*SUN;
+{ 12010} GGN5004+HV               =       GD04000 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 12011} G2G500P +GNO                =       G1G500Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12012} G2G500P +GNO                =       GGN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12013} G2G500P +GHO2               =       GGH500Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12014} G2G500P +GNO3               =       G1G500Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12015} G2G500P +MEPERO             =  0.480G1G500Q + 0.260GGN5005 + 0.260GGN500b                 : ARR( 0.616E-11,   905., 0.0);
+{ 12016} G2G500P +PERO1              =  0.600G1G500Q + 0.200GGN5005 + 0.200GGN500b                 : ARR( 0.473E-11,   850., 0.0);
+{ 12017} G2G500P +PERO2              =  0.560G1G500Q + 0.220GGN5005 + 0.220GGN500b                 : ARR( 0.177E-11,   350., 0.0);
+{ 12018} G2G500P +PERO3              =  0.600G1G500Q + 0.200GGN5005 + 0.200GGN500b                 : ARR( 0.533E-11,   500., 0.0);
+{ 12019} G2G500P +PERO5              =  0.600G1G500Q + 0.200GGN5005 + 0.200GGN500b                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12020} G2G500P +PERO6              =  0.460G1G500Q + 0.270GGN5005 + 0.270GGN500b                 : ARR( 0.183E-11,   450., 0.0);
+{ 12021} G2G500P +PERO9              =  0.800G1G500Q + 0.200GGN500b                                : ARR( 0.100E-10,     0., 0.0);
+{ 12022} G2G500Q +GNO                =       G1G500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12023} G2G500Q +GNO                =       GGN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12024} G2G500Q +GHO2               =       GGH500Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12025} G2G500Q +GNO3               =       G1G500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12026} G2G500Q +MEPERO             =  0.340G1G500R + 0.330GGN500S + 0.330GGN500W                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12027} G2G500Q +PERO1              =  0.460G1G500R + 0.270GGN500S + 0.270GGN500W                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12028} G2G500Q +PERO2              =  0.400G1G500R + 0.300GGN500S + 0.300GGN500W                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12029} G2G500Q +PERO3              =  0.460G1G500R + 0.270GGN500S + 0.270GGN500W                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12030} G2G500Q +PERO5              =  0.460G1G500R + 0.270GGN500S + 0.270GGN500W                 : ARR( 0.183E-11,   450., 0.0);
+{ 12031} G2G500Q +PERO6              =  0.300G1G500R + 0.350GGN500S + 0.350GGN500W                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12032} G2G500Q +PERO9              =  0.650G1G500R + 0.350GGN500W                                : ARR( 0.100E-10,     0., 0.0);
+{ 12033} G1G500Q                     =       GD02000 +      G2G3003                                : ARR( 0.200E+15,  6864., 0.0);
+{ 12034} G1G500R                     =       G202000 +      GGN3005                                : ARR( 0.200E+15,  6631., 0.0);
+{ 12035} G1G500R                     =       GD03000 +      GGD2000 +      GNO2                    : ARR( 0.200E+15,  6422., 0.0);
+{ 12036} G2G3003 +GNO                =       G1G3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12037} G2G3003 +GNO                =       GGN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12038} G2G3003 +GHO2               =       GGH3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12039} G2G3003 +GNO3               =       G1G3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12040} G2G3003 +MEPERO             =  0.480G1G3003 + 0.260GGN3002 + 0.260GGN3005                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12041} G2G3003 +PERO1              =  0.600G1G3003 + 0.200GGN3002 + 0.200GGN3005                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12042} G2G3003 +PERO2              =  0.560G1G3003 + 0.220GGN3002 + 0.220GGN3005                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12043} G2G3003 +PERO3              =  0.600G1G3003 + 0.200GGN3002 + 0.200GGN3005                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12044} G2G3003 +PERO5              =  0.600G1G3003 + 0.200GGN3002 + 0.200GGN3005                 : ARR( 0.533E-11,   500., 0.0);
+{ 12045} G2G3003 +PERO6              =  0.460G1G3003 + 0.270GGN3002 + 0.270GGN3005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12046} G2G3003 +PERO9              =  0.800G1G3003 + 0.200GGN3005                                : ARR( 0.100E-10,     0., 0.0);
+{ 12047} G1G3003 +OXYGEN             =       GGN3005 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 12048} GGH5003 +GHO                =       GGK5002 +      GHO                                    : ARR( 0.273E-10,     0., 0.0);
+{ 12049} GGH5003 +GHO                =       G2G5002                                               : ARR( 0.206E-11,  -190., 0.0);
+{ 12050} GGH5003 +GHO                =       G3H500B                                               : ARR( 0.206E-11,  -190., 0.0);
+{ 12051} GGH5003+HV               =       G1G5002 +      GHO                                    :  0.100E+01*SUN;
+{ 12052} GGH5003+HV               =       GD04000 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 12053} GGO5003 +GHO                =       G2G500R                                               : ARR( 0.118E-11,     0., 0.0);
+{ 12054} GGO5003 +GHO                =       G2G500S                                               : ARR( 0.145E-11,     0., 0.0);
+{ 12055} GGO5003 +GHO                =       GGK5002 +      GHO2                                   : ARR( 0.644E-11,     0., 0.0);
+{ 12056} GGO5003 +GHO                =       G3K500B                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 12057} GGO5003+HV               =       GD04000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 12058} G2G500R +GNO                =       G1G500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12059} G2G500R +GNO                =       GGN500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12060} G2G500R +GHO2               =       GGH500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12061} G2G500R +GNO3               =       G1G500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12062} G2G500R +MEPERO             =  0.480G1G500S + 0.260GGO5004 + 0.260GGK500I                 : ARR( 0.616E-11,   905., 0.0);
+{ 12063} G2G500R +PERO1              =  0.600G1G500S + 0.200GGO5004 + 0.200GGK500I                 : ARR( 0.473E-11,   850., 0.0);
+{ 12064} G2G500R +PERO2              =  0.560G1G500S + 0.220GGO5004 + 0.220GGK500I                 : ARR( 0.177E-11,   350., 0.0);
+{ 12065} G2G500R +PERO3              =  0.600G1G500S + 0.200GGO5004 + 0.200GGK500I                 : ARR( 0.533E-11,   500., 0.0);
+{ 12066} G2G500R +PERO5              =  0.600G1G500S + 0.200GGO5004 + 0.200GGK500I                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12067} G2G500R +PERO6              =  0.460G1G500S + 0.270GGO5004 + 0.270GGK500I                 : ARR( 0.183E-11,   450., 0.0);
+{ 12068} G2G500R +PERO9              =  0.800G1G500S + 0.200GGK500I                                : ARR( 0.100E-10,     0., 0.0);
+{ 12069} G2G500S +GNO                =       G1G500T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12070} G2G500S +GNO                =       GGN500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12071} G2G500S +GHO2               =       GGH500b                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12072} G2G500S +GNO3               =       G1G500T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12073} G2G500S +MEPERO             =  0.340G1G500T + 0.330GGO5009 + 0.330GGK500E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12074} G2G500S +PERO1              =  0.460G1G500T + 0.270GGO5009 + 0.270GGK500E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12075} G2G500S +PERO2              =  0.400G1G500T + 0.300GGO5009 + 0.300GGK500E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12076} G2G500S +PERO3              =  0.460G1G500T + 0.270GGO5009 + 0.270GGK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12077} G2G500S +PERO5              =  0.460G1G500T + 0.270GGO5009 + 0.270GGK500E                 : ARR( 0.183E-11,   450., 0.0);
+{ 12078} G2G500S +PERO6              =  0.300G1G500T + 0.350GGO5009 + 0.350GGK500E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12079} G2G500S +PERO9              =  0.650G1G500T + 0.350GGK500E                                : ARR( 0.100E-10,     0., 0.0);
+{ 12080} G1G500S                     =       GD02000 +      G2G3004                                : ARR( 0.200E+15,  6864., 0.0);
+{ 12081} G1G500T                     =       GD03000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 12082} G2G3004 +GNO                =       G1G3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12083} G2G3004 +GNO                =       GGN3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12084} G2G3004 +GHO2               =       GGH3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12085} G2G3004 +GNO3               =       G1G3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12086} G2G3004 +MEPERO             =  0.480G1G3004 + 0.260GGO3002 + 0.260GGD3001                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12087} G2G3004 +PERO1              =  0.600G1G3004 + 0.200GGO3002 + 0.200GGD3001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12088} G2G3004 +PERO2              =  0.560G1G3004 + 0.220GGO3002 + 0.220GGD3001                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12089} G2G3004 +PERO3              =  0.600G1G3004 + 0.200GGO3002 + 0.200GGD3001                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12090} G2G3004 +PERO5              =  0.600G1G3004 + 0.200GGO3002 + 0.200GGD3001                 : ARR( 0.533E-11,   500., 0.0);
+{ 12091} G2G3004 +PERO6              =  0.460G1G3004 + 0.270GGO3002 + 0.270GGD3001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12092} G2G3004 +PERO9              =  0.800G1G3004 + 0.200GGD3001                                : ARR( 0.100E-10,     0., 0.0);
+{ 12093} G1G3004                     =       GGD2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4797., 0.0);
+{ 12094} GGK5002 +GHO                =       G2G500T                                               : ARR( 0.372E-11,     0., 0.0);
+{ 12095} GGK5002 +GHO                =       G2G500U                                               : ARR( 0.879E-12,     0., 0.0);
+{ 12096} GGK5002 +GHO                =       G3K500F                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 12097} GGK5002+HV               =       GA04000 +      GCO2                                   :  0.100E+01*SUN;
+{ 12098} G2G500T +GNO                =       G1G500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12099} G2G500T +GNO                =       GGN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12100} G2G500T +GHO2               =       GGH500c                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12101} G2G500T +GNO3               =       G1G500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12102} G2G500T +MEPERO             =  0.480G1G500U + 0.260GGK5004 + 0.260GGK500J                 : ARR( 0.616E-11,   905., 0.0);
+{ 12103} G2G500T +PERO1              =  0.600G1G500U + 0.200GGK5004 + 0.200GGK500J                 : ARR( 0.473E-11,   850., 0.0);
+{ 12104} G2G500T +PERO2              =  0.560G1G500U + 0.220GGK5004 + 0.220GGK500J                 : ARR( 0.177E-11,   350., 0.0);
+{ 12105} G2G500T +PERO3              =  0.600G1G500U + 0.200GGK5004 + 0.200GGK500J                 : ARR( 0.533E-11,   500., 0.0);
+{ 12106} G2G500T +PERO5              =  0.600G1G500U + 0.200GGK5004 + 0.200GGK500J                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12107} G2G500T +PERO6              =  0.460G1G500U + 0.270GGK5004 + 0.270GGK500J                 : ARR( 0.183E-11,   450., 0.0);
+{ 12108} G2G500T +PERO9              =  0.800G1G500U + 0.200GGK500J                                : ARR( 0.100E-10,     0., 0.0);
+{ 12109} G2G500U +GNO                =       G1G500W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12110} G2G500U +GNO                =       GGN500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12111} G2G500U +GHO2               =       GGH500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12112} G2G500U +GNO3               =       G1G500W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12113} G2G500U +MEPERO             =  0.340G1G500W + 0.330GGK500A + 0.330GGK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12114} G2G500U +PERO1              =  0.460G1G500W + 0.270GGK500A + 0.270GGK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12115} G2G500U +PERO2              =  0.400G1G500W + 0.300GGK500A + 0.300GGK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12116} G2G500U +PERO3              =  0.460G1G500W + 0.270GGK500A + 0.270GGK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12117} G2G500U +PERO5              =  0.460G1G500W + 0.270GGK500A + 0.270GGK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 12118} G2G500U +PERO6              =  0.300G1G500W + 0.350GGK500A + 0.350GGK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12119} G2G500U +PERO9              =  0.650G1G500W + 0.350GGK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 12120} G3K500F +GHO2               =  0.800GGK5002 + 0.200GAK5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 12121} G3K500F +GNO                =       G3K4001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 12122} G3K500F +GNO2               =       GPK5002                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 12123} G3K500F +GNO3               =       G3K4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 12124} G3K500F +MEPERO             =  0.685G3K4001 + 0.315GAK5002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 12125} G3K500F +PERO1              =  0.800G3K4001 + 0.200GAK5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 12126} G3K500F +PERO2              =  0.750G3K4001 + 0.250GAK5002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 12127} G3K500F +PERO3              =  0.800G3K4001 + 0.200GAK5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 12128} G3K500F +PERO5              =  0.650G3K4001 + 0.350GAK5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 12129} G3K500F +PERO6              =  0.650G3K4001 + 0.350GAK5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 12130} G3K500F +PERO9              =       G3K4001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 12131} G1G500U                     =       GD02000 +      G2G3005                                : ARR( 0.200E+15,  6613., 0.0);
+{ 12132} G1G500W                     =       GD03000 +      GCO     +      GHO2    +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 12133} G2G3005 +GNO                =       G1G3005 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12134} G2G3005 +GNO                =       GGN3006                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12135} G2G3005 +GHO2               =       GGH3006                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12136} G2G3005 +GNO3               =       G1G3005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12137} G2G3005 +MEPERO             =  0.480G1G3005 + 0.260GGK3001 + 0.260GGD3002                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12138} G2G3005 +PERO1              =  0.600G1G3005 + 0.200GGK3001 + 0.200GGD3002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12139} G2G3005 +PERO2              =  0.560G1G3005 + 0.220GGK3001 + 0.220GGD3002                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12140} G2G3005 +PERO3              =  0.600G1G3005 + 0.200GGK3001 + 0.200GGD3002                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12141} G2G3005 +PERO5              =  0.600G1G3005 + 0.200GGK3001 + 0.200GGD3002                 : ARR( 0.533E-11,   500., 0.0);
+{ 12142} G2G3005 +PERO6              =  0.460G1G3005 + 0.270GGK3001 + 0.270GGD3002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12143} G2G3005 +PERO9              =  0.800G1G3005 + 0.200GGD3002                                : ARR( 0.100E-10,     0., 0.0);
+{ 12144} G1G3005                     =       GCO     +      GCH2O   +      GHO2    +      GCO      : ARR( 0.200E+15,  3897., 0.0);
+{ 12145} GGD3000 +GHO                =       G3G3000                                               : ARR( 0.212E-10,     0., 0.0);
+{ 12146} GGD3000 +GHO                =       G3D3000                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 12147} GGD3000 +GNO3               =       G3G3000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 12148} GGD3000+HV               =       G2D2000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 12149} GGD3000+HV               =       G2G2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 12150} GGD2000 +GHO                =       GCO     +      GHO2    +      GCO                     : ARR( 0.127E-10,     0., 0.0);
+{ 12151} GGD2000 +GHO                =       G3D2000                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 12152} GGD2000 +GNO3               =       GCO     +      GHNO3   +      GHO2    +      GCO      : ARR( 0.240E-14,     0., 0.0);
+{ 12153} GGD2000+HV               =       GHCOOH  +      GCO2                                   :  0.100E+01*SUN;
+{ 12154} GGD2000+HV               =       GCO     +      GCO2                                   :  0.100E+01*SUN;
+{ 12155} GAN5003 +GHO                =       GAK5001 +      GNO2                                   : ARR( 0.978E-13,     0., 0.0);
+{ 12156} GAN5003 +GHO                =       G2A500O                                               : ARR( 0.289E-12,     0., 0.0);
+{ 12157} GAN5003 +GHO                =       G2A500P                                               : ARR( 0.652E-12,     0., 0.0);
+{ 12158} GAN5003 +GHO                =       G2N4007 +      GCO2                                   : ARR( 0.531E-12,     0., 0.0);
+{ 12159} GAN5003+HV               =       G1A5000 +      GNO2                                   :  0.100E+01*SUN;
+{ 12160} G2A500O +GNO                =       G1A500P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12161} G2A500O +GNO                =       GAN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12162} G2A500O +GHO2               =       GAH500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12163} G2A500O +GNO3               =       G1A500P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12164} G2A500O +MEPERO             =  0.340G1A500P + 0.330GAN500c + 0.330GAN500d                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12165} G2A500O +PERO1              =  0.460G1A500P + 0.270GAN500c + 0.270GAN500d                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12166} G2A500O +PERO2              =  0.400G1A500P + 0.300GAN500c + 0.300GAN500d                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12167} G2A500O +PERO3              =  0.460G1A500P + 0.270GAN500c + 0.270GAN500d                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12168} G2A500O +PERO5              =  0.460G1A500P + 0.270GAN500c + 0.270GAN500d                 : ARR( 0.183E-11,   450., 0.0);
+{ 12169} G2A500O +PERO6              =  0.300G1A500P + 0.350GAN500c + 0.350GAN500d                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12170} G2A500O +PERO9              =  0.650G1A500P + 0.350GAN500d                                : ARR( 0.100E-10,     0., 0.0);
+{ 12171} G2A500P +GNO                =       G1A500Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12172} G2A500P +GNO                =       GAN500g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12173} G2A500P +GHO2               =       GAH500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12174} G2A500P +GNO3               =       G1A500Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12175} G2A500P +MEPERO             =  0.340G1A500Q + 0.330GAN500h + 0.330GAN500i                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12176} G2A500P +PERO1              =  0.460G1A500Q + 0.270GAN500h + 0.270GAN500i                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12177} G2A500P +PERO2              =  0.400G1A500Q + 0.300GAN500h + 0.300GAN500i                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12178} G2A500P +PERO3              =  0.460G1A500Q + 0.270GAN500h + 0.270GAN500i                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12179} G2A500P +PERO5              =  0.460G1A500Q + 0.270GAN500h + 0.270GAN500i                 : ARR( 0.183E-11,   450., 0.0);
+{ 12180} G2A500P +PERO6              =  0.300G1A500Q + 0.350GAN500h + 0.350GAN500i                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12181} G2A500P +PERO9              =  0.650G1A500Q + 0.350GAN500i                                : ARR( 0.100E-10,     0., 0.0);
+{ 12182} G1A500P                     =       GD02000 +      GAD3000 +      GNO2                    : ARR( 0.200E+15,  6072., 0.0);
+{ 12183} G1A500Q                     =       GND4000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{ 12184} GAH5002 +GHO                =       GAK5001 +      GHO                                    : ARR( 0.360E-10,     0., 0.0);
+{ 12185} GAH5002 +GHO                =       G2A5000                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 12186} GAH5002+HV               =       G1A5000 +      GHO                                    :  0.100E+01*SUN;
+{ 12187} GAK5001 +GHO                =       G2A500Q                                               : ARR( 0.888E-12,     0., 0.0);
+{ 12188} GAK5001 +GHO                =       G2A500R                                               : ARR( 0.208E-11,     0., 0.0);
+{ 12189} GAK5001 +GHO                =       G2K4001 +      GCO2                                   : ARR( 0.536E-12,     0., 0.0);
+{ 12190} GAK5001+HV               =       G3K2000 +      G2A3000                                :  0.100E+01*SUN;
+{ 12191} G2A500Q +GNO                =       G1A500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12192} G2A500Q +GNO                =       GAN500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12193} G2A500Q +GHO2               =       GAH500Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12194} G2A500Q +GNO3               =       G1A500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12195} G2A500Q +MEPERO             =  0.340G1A500R + 0.330GAK5009 + 0.330GAK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12196} G2A500Q +PERO1              =  0.460G1A500R + 0.270GAK5009 + 0.270GAK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12197} G2A500Q +PERO2              =  0.400G1A500R + 0.300GAK5009 + 0.300GAK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12198} G2A500Q +PERO3              =  0.460G1A500R + 0.270GAK5009 + 0.270GAK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12199} G2A500Q +PERO5              =  0.460G1A500R + 0.270GAK5009 + 0.270GAK500B                 : ARR( 0.183E-11,   450., 0.0);
+{ 12200} G2A500Q +PERO6              =  0.300G1A500R + 0.350GAK5009 + 0.350GAK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12201} G2A500Q +PERO9              =  0.650G1A500R + 0.350GAK500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 12202} G2A500R +GNO                =       G1A500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12203} G2A500R +GNO                =       GAN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12204} G2A500R +GHO2               =       GAH500Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12205} G2A500R +GNO3               =       G1A500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12206} G2A500R +MEPERO             =  0.340G1A500S + 0.330GAK500G + 0.330GAK500H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12207} G2A500R +PERO1              =  0.460G1A500S + 0.270GAK500G + 0.270GAK500H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12208} G2A500R +PERO2              =  0.400G1A500S + 0.300GAK500G + 0.300GAK500H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12209} G2A500R +PERO3              =  0.460G1A500S + 0.270GAK500G + 0.270GAK500H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12210} G2A500R +PERO5              =  0.460G1A500S + 0.270GAK500G + 0.270GAK500H                 : ARR( 0.183E-11,   450., 0.0);
+{ 12211} G2A500R +PERO6              =  0.300G1A500S + 0.350GAK500G + 0.350GAK500H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12212} G2A500R +PERO9              =  0.650G1A500S + 0.350GAK500H                                : ARR( 0.100E-10,     0., 0.0);
+{ 12213} G1A500R                     =       G3K2000 +      GAD3000                                : ARR( 0.200E+15,  2285., 0.0);
+{ 12214} G1A500S                     =       GDK4000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4535., 0.0);
+{ 12215} GAN5004 +GHO                =       G2A500S                                               : ARR( 0.172E-12,     0., 0.0);
+{ 12216} GAN5004 +GHO                =       G2A500T                                               : ARR( 0.118E-11,     0., 0.0);
+{ 12217} GAN5004 +GHO                =       G2A500U                                               : ARR( 0.290E-12,     0., 0.0);
+{ 12218} GAN5004 +GHO                =       GD04000 +      GNO2    +      GCO2                    : ARR( 0.533E-12,     0., 0.0);
+{ 12219} GAN5004+HV               =       G1A5002 +      GNO2                                   :  0.100E+01*SUN;
+{ 12220} G2A500S +GNO                =       G1A500T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12221} G2A500S +GNO                =       GAN500A                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12222} G2A500S +GHO2               =       GAH500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12223} G2A500S +GNO3               =       G1A500T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12224} G2A500S +MEPERO             =  0.480G1A500T + 0.260GAN500F + 0.260GAN500k                 : ARR( 0.146E-12,  -445., 0.0);
+{ 12225} G2A500S +PERO1              =  0.600G1A500T + 0.200GAN500F + 0.200GAN500k                 : ARR( 0.112E-12,  -500., 0.0);
+{ 12226} G2A500S +PERO2              =  0.560G1A500T + 0.220GAN500F + 0.220GAN500k                 : ARR( 0.418E-13, -1000., 0.0);
+{ 12227} G2A500S +PERO3              =  0.600G1A500T + 0.200GAN500F + 0.200GAN500k                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12228} G2A500S +PERO5              =  0.600G1A500T + 0.200GAN500F + 0.200GAN500k                 : ARR( 0.473E-11,   850., 0.0);
+{ 12229} G2A500S +PERO6              =  0.460G1A500T + 0.270GAN500F + 0.270GAN500k                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12230} G2A500S +PERO9              =  0.800G1A500T + 0.200GAN500k                                : ARR( 0.100E-10,     0., 0.0);
+{ 12231} G2A500T +GNO                =       G1A500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12232} G2A500T +GNO                =       GAN500g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12233} G2A500T +GHO2               =       GAH500b                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12234} G2A500T +GNO3               =       G1A500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12235} G2A500T +MEPERO             =  0.480G1A500U + 0.260GAN5005 + 0.260GAN500j                 : ARR( 0.616E-11,   905., 0.0);
+{ 12236} G2A500T +PERO1              =  0.600G1A500U + 0.200GAN5005 + 0.200GAN500j                 : ARR( 0.473E-11,   850., 0.0);
+{ 12237} G2A500T +PERO2              =  0.560G1A500U + 0.220GAN5005 + 0.220GAN500j                 : ARR( 0.177E-11,   350., 0.0);
+{ 12238} G2A500T +PERO3              =  0.600G1A500U + 0.200GAN5005 + 0.200GAN500j                 : ARR( 0.533E-11,   500., 0.0);
+{ 12239} G2A500T +PERO5              =  0.600G1A500U + 0.200GAN5005 + 0.200GAN500j                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12240} G2A500T +PERO6              =  0.460G1A500U + 0.270GAN5005 + 0.270GAN500j                 : ARR( 0.183E-11,   450., 0.0);
+{ 12241} G2A500T +PERO9              =  0.800G1A500U + 0.200GAN500j                                : ARR( 0.100E-10,     0., 0.0);
+{ 12242} G2A500U +GNO                =       G1A500W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12243} G2A500U +GNO                =       GAN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12244} G2A500U +GHO2               =       GAH500c                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12245} G2A500U +GNO3               =       G1A500W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12246} G2A500U +MEPERO             =  0.340G1A500W + 0.330GAN500l + 0.330GAN500e                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12247} G2A500U +PERO1              =  0.460G1A500W + 0.270GAN500l + 0.270GAN500e                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12248} G2A500U +PERO2              =  0.400G1A500W + 0.300GAN500l + 0.300GAN500e                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12249} G2A500U +PERO3              =  0.460G1A500W + 0.270GAN500l + 0.270GAN500e                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12250} G2A500U +PERO5              =  0.460G1A500W + 0.270GAN500l + 0.270GAN500e                 : ARR( 0.183E-11,   450., 0.0);
+{ 12251} G2A500U +PERO6              =  0.300G1A500W + 0.350GAN500l + 0.350GAN500e                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12252} G2A500U +PERO9              =  0.650G1A500W + 0.350GAN500e                                : ARR( 0.100E-10,     0., 0.0);
+{ 12253} G1A500T +OXYGEN             =       GAN500k +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 12254} G1A500T                     =       GAK5005 +      GNO2                                   : ARR( 0.800E+11,  4379., 0.0);
+{ 12255} G1A500U                     =       GD02000 +      G2A3004                                : ARR( 0.200E+15,  6864., 0.0);
+{ 12256} G1A500W                     =       G202000 +      GAN3006                                : ARR( 0.200E+15,  6631., 0.0);
+{ 12257} G1A500W                     =       GD03000 +      GAD2000 +      GNO2                    : ARR( 0.200E+15,  6422., 0.0);
+{ 12258} G2A3004 +GNO                =       G1A3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12259} G2A3004 +GNO                =       GAN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12260} G2A3004 +GHO2               =       GAH3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12261} G2A3004 +GNO3               =       G1A3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12262} G2A3004 +MEPERO             =  0.480G1A3004 + 0.260GAN3002 + 0.260GAN3006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12263} G2A3004 +PERO1              =  0.600G1A3004 + 0.200GAN3002 + 0.200GAN3006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12264} G2A3004 +PERO2              =  0.560G1A3004 + 0.220GAN3002 + 0.220GAN3006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12265} G2A3004 +PERO3              =  0.600G1A3004 + 0.200GAN3002 + 0.200GAN3006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12266} G2A3004 +PERO5              =  0.600G1A3004 + 0.200GAN3002 + 0.200GAN3006                 : ARR( 0.533E-11,   500., 0.0);
+{ 12267} G2A3004 +PERO6              =  0.460G1A3004 + 0.270GAN3002 + 0.270GAN3006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12268} G2A3004 +PERO9              =  0.800G1A3004 + 0.200GAN3006                                : ARR( 0.100E-10,     0., 0.0);
+{ 12269} G1A3004 +OXYGEN             =       GAN3006 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 12270} GAH5003 +GHO                =       G2A500W                                               : ARR( 0.152E-11,     0., 0.0);
+{ 12271} GAH5003 +GHO                =       GAK5002 +      GHO                                    : ARR( 0.200E-10,     0., 0.0);
+{ 12272} GAH5003 +GHO                =       G2A5002                                               : ARR( 0.205E-11,  -190., 0.0);
+{ 12273} GAH5003+HV               =       G1A5002 +      GHO                                    :  0.100E+01*SUN;
+{ 12274} G2A500W +GNO                =       G1A500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12275} G2A500W +GNO                =       GAH500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12276} G2A500W +GHO2               =       GAH500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12277} G2A500W +GNO3               =       G1A500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12278} G2A500W +MEPERO             =  0.340G1A500X + 0.330GAH500e + 0.330GAH500T                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12279} G2A500W +PERO1              =  0.460G1A500X + 0.270GAH500e + 0.270GAH500T                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12280} G2A500W +PERO2              =  0.400G1A500X + 0.300GAH500e + 0.300GAH500T                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12281} G2A500W +PERO3              =  0.460G1A500X + 0.270GAH500e + 0.270GAH500T                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12282} G2A500W +PERO5              =  0.460G1A500X + 0.270GAH500e + 0.270GAH500T                 : ARR( 0.183E-11,   450., 0.0);
+{ 12283} G2A500W +PERO6              =  0.300G1A500X + 0.350GAH500e + 0.350GAH500T                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12284} G2A500W +PERO9              =  0.650G1A500X + 0.350GAH500T                                : ARR( 0.100E-10,     0., 0.0);
+{ 12285} G1A500X                     =       GD03000 +      GAD2000 +      GHO                     : ARR( 0.200E+15,  4883., 0.0);
+{ 12286} GAO5003 +GHO                =       G2A500X                                               : ARR( 0.119E-11,     0., 0.0);
+{ 12287} GAO5003 +GHO                =       G2A500Y                                               : ARR( 0.147E-11,     0., 0.0);
+{ 12288} GAO5003 +GHO                =       GAK5002 +      GHO2                                   : ARR( 0.483E-11,     0., 0.0);
+{ 12289} GAO5003 +GHO                =       GD04000 +      GHO2    +      GCO2                    : ARR( 0.541E-12,     0., 0.0);
+{ 12290} G2A500X +GNO                =       G1A500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12291} G2A500X +GNO                =       GAN500h                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12292} G2A500X +GHO2               =       GAH500f                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12293} G2A500X +GNO3               =       G1A500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12294} G2A500X +MEPERO             =  0.480G1A500Y + 0.260GAO5004 + 0.260GAK500G                 : ARR( 0.616E-11,   905., 0.0);
+{ 12295} G2A500X +PERO1              =  0.600G1A500Y + 0.200GAO5004 + 0.200GAK500G                 : ARR( 0.473E-11,   850., 0.0);
+{ 12296} G2A500X +PERO2              =  0.560G1A500Y + 0.220GAO5004 + 0.220GAK500G                 : ARR( 0.177E-11,   350., 0.0);
+{ 12297} G2A500X +PERO3              =  0.600G1A500Y + 0.200GAO5004 + 0.200GAK500G                 : ARR( 0.533E-11,   500., 0.0);
+{ 12298} G2A500X +PERO5              =  0.600G1A500Y + 0.200GAO5004 + 0.200GAK500G                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12299} G2A500X +PERO6              =  0.460G1A500Y + 0.270GAO5004 + 0.270GAK500G                 : ARR( 0.183E-11,   450., 0.0);
+{ 12300} G2A500X +PERO9              =  0.800G1A500Y + 0.200GAK500G                                : ARR( 0.100E-10,     0., 0.0);
+{ 12301} G2A500Y +GNO                =       G1A500Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12302} G2A500Y +GNO                =       GAN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12303} G2A500Y +GHO2               =       GAH500g                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12304} G2A500Y +GNO3               =       G1A500Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12305} G2A500Y +MEPERO             =  0.340G1A500Z + 0.330GAO5009 + 0.330GAK500C                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12306} G2A500Y +PERO1              =  0.460G1A500Z + 0.270GAO5009 + 0.270GAK500C                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12307} G2A500Y +PERO2              =  0.400G1A500Z + 0.300GAO5009 + 0.300GAK500C                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12308} G2A500Y +PERO3              =  0.460G1A500Z + 0.270GAO5009 + 0.270GAK500C                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12309} G2A500Y +PERO5              =  0.460G1A500Z + 0.270GAO5009 + 0.270GAK500C                 : ARR( 0.183E-11,   450., 0.0);
+{ 12310} G2A500Y +PERO6              =  0.300G1A500Z + 0.350GAO5009 + 0.350GAK500C                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12311} G2A500Y +PERO9              =  0.650G1A500Z + 0.350GAK500C                                : ARR( 0.100E-10,     0., 0.0);
+{ 12312} G1A500Y                     =       GD02000 +      G2A3005                                : ARR( 0.200E+15,  6864., 0.0);
+{ 12313} G1A500Z                     =       GD03000 +      GAD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 12314} G2A3005 +GNO                =       G1A3005 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12315} G2A3005 +GNO                =       GAN3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12316} G2A3005 +GHO2               =       GAH3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12317} G2A3005 +GNO3               =       G1A3005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12318} G2A3005 +MEPERO             =  0.480G1A3005 + 0.260GAO3002 + 0.260GAD3001                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12319} G2A3005 +PERO1              =  0.600G1A3005 + 0.200GAO3002 + 0.200GAD3001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12320} G2A3005 +PERO2              =  0.560G1A3005 + 0.220GAO3002 + 0.220GAD3001                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12321} G2A3005 +PERO3              =  0.600G1A3005 + 0.200GAO3002 + 0.200GAD3001                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12322} G2A3005 +PERO5              =  0.600G1A3005 + 0.200GAO3002 + 0.200GAD3001                 : ARR( 0.533E-11,   500., 0.0);
+{ 12323} G2A3005 +PERO6              =  0.460G1A3005 + 0.270GAO3002 + 0.270GAD3001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12324} G2A3005 +PERO9              =  0.800G1A3005 + 0.200GAD3001                                : ARR( 0.100E-10,     0., 0.0);
+{ 12325} G1A3005                     =       GAD2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4797., 0.0);
+{ 12326} GAK5002 +GHO                =       G2A500Z                                               : ARR( 0.376E-11,     0., 0.0);
+{ 12327} GAK5002 +GHO                =       G2A500a                                               : ARR( 0.890E-12,     0., 0.0);
+{ 12328} GAK5002 +GHO                =       G3K4001 +      GCO2                                   : ARR( 0.537E-12,     0., 0.0);
+{ 12329} GAK5002+HV               =       GD04000 +      GCO2                                   :  0.100E+01*SUN;
+{ 12330} G2A500Z +GNO                =       G1A500a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12331} G2A500Z +GNO                =       GAN500i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12332} G2A500Z +GHO2               =       GAH500h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12333} G2A500Z +GNO3               =       G1A500a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12334} G2A500Z +MEPERO             =  0.480G1A500a + 0.260GAK5004 + 0.260GAK500H                 : ARR( 0.616E-11,   905., 0.0);
+{ 12335} G2A500Z +PERO1              =  0.600G1A500a + 0.200GAK5004 + 0.200GAK500H                 : ARR( 0.473E-11,   850., 0.0);
+{ 12336} G2A500Z +PERO2              =  0.560G1A500a + 0.220GAK5004 + 0.220GAK500H                 : ARR( 0.177E-11,   350., 0.0);
+{ 12337} G2A500Z +PERO3              =  0.600G1A500a + 0.200GAK5004 + 0.200GAK500H                 : ARR( 0.533E-11,   500., 0.0);
+{ 12338} G2A500Z +PERO5              =  0.600G1A500a + 0.200GAK5004 + 0.200GAK500H                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12339} G2A500Z +PERO6              =  0.460G1A500a + 0.270GAK5004 + 0.270GAK500H                 : ARR( 0.183E-11,   450., 0.0);
+{ 12340} G2A500Z +PERO9              =  0.800G1A500a + 0.200GAK500H                                : ARR( 0.100E-10,     0., 0.0);
+{ 12341} G2A500a +GNO                =       G1A500b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12342} G2A500a +GNO                =       GAN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12343} G2A500a +GHO2               =       GAH500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12344} G2A500a +GNO3               =       G1A500b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12345} G2A500a +MEPERO             =  0.340G1A500b + 0.330GAK500I + 0.330GAK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12346} G2A500a +PERO1              =  0.460G1A500b + 0.270GAK500I + 0.270GAK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12347} G2A500a +PERO2              =  0.400G1A500b + 0.300GAK500I + 0.300GAK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12348} G2A500a +PERO3              =  0.460G1A500b + 0.270GAK500I + 0.270GAK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12349} G2A500a +PERO5              =  0.460G1A500b + 0.270GAK500I + 0.270GAK500D                 : ARR( 0.183E-11,   450., 0.0);
+{ 12350} G2A500a +PERO6              =  0.300G1A500b + 0.350GAK500I + 0.350GAK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12351} G2A500a +PERO9              =  0.650G1A500b + 0.350GAK500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 12352} G1A500a                     =       GD02000 +      G2A3006                                : ARR( 0.200E+15,  6613., 0.0);
+{ 12353} G1A500b                     =       GD03000 +      GCO     +      GHO     +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 12354} G2A3006 +GNO                =       G1A3006 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12355} G2A3006 +GNO                =       GAN3005                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12356} G2A3006 +GHO2               =       GAH3006                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12357} G2A3006 +GNO3               =       G1A3006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12358} G2A3006 +MEPERO             =  0.480G1A3006 + 0.260GAK3001 + 0.260GAD3002                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12359} G2A3006 +PERO1              =  0.600G1A3006 + 0.200GAK3001 + 0.200GAD3002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12360} G2A3006 +PERO2              =  0.560G1A3006 + 0.220GAK3001 + 0.220GAD3002                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12361} G2A3006 +PERO3              =  0.600G1A3006 + 0.200GAK3001 + 0.200GAD3002                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12362} G2A3006 +PERO5              =  0.600G1A3006 + 0.200GAK3001 + 0.200GAD3002                 : ARR( 0.533E-11,   500., 0.0);
+{ 12363} G2A3006 +PERO6              =  0.460G1A3006 + 0.270GAK3001 + 0.270GAD3002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12364} G2A3006 +PERO9              =  0.800G1A3006 + 0.200GAD3002                                : ARR( 0.100E-10,     0., 0.0);
+{ 12365} G1A3006                     =       GCO     +      GCH2O   +      GHO     +      GCO      : ARR( 0.200E+15,  3897., 0.0);
+{ 12366} GAD3000 +GHO                =       G3A3000                                               : ARR( 0.217E-10,     0., 0.0);
+{ 12367} GAD3000 +GNO3               =       G3A3000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 12368} GAD3000+HV               =       G2A2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 12369} GAD2000 +GHO                =       GCO     +      GHO     +      GCO                     : ARR( 0.937E-11,     0., 0.0);
+{ 12370} GAD2000 +GHO                =       GCO     +      GHO2    +      GCO2                    : ARR( 0.520E-12,     0., 0.0);
+{ 12371} GAD2000 +GNO3               =       GCO     +      GHNO3   +      GHO     +      GCO      : ARR( 0.240E-14,     0., 0.0);
+{ 12372} GAD2000+HV               =       GCO2    +      GCH2O                                  :  0.100E+01*SUN;
+{ 12373} GAD2000+HV               =  2.000GCO                                                   :  0.100E+01*SUN;
+{ 12374} GPN5003                     =       G3N5003 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12375} GPN5003 +GHO                =       GPK5001 +      GNO2                                   : ARR( 0.983E-13,     0., 0.0);
+{ 12376} GPN5003 +GHO                =       G2P500Q                                               : ARR( 0.290E-12,     0., 0.0);
+{ 12377} GPN5003 +GHO                =       G2P500R                                               : ARR( 0.885E-12,     0., 0.0);
+{ 12378} GPN5003+HV               =       G1P5000 +      GNO2                                   :  0.100E+01*SUN;
+{ 12379} GPN5003+HV               =       G3N5003 +      GNO2                                   :  0.100E+01*SUN;
+{ 12380} G2P500Q +GNO                =       G1P500R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12381} G2P500Q +GNO                =       GPN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12382} G2P500Q +GHO2               =       GPH500Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12383} G2P500Q +GNO3               =       G1P500R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12384} G2P500Q +MEPERO             =  0.340G1P500R + 0.330GPN500c + 0.330GPN500f                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12385} G2P500Q +PERO1              =  0.460G1P500R + 0.270GPN500c + 0.270GPN500f                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12386} G2P500Q +PERO2              =  0.400G1P500R + 0.300GPN500c + 0.300GPN500f                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12387} G2P500Q +PERO3              =  0.460G1P500R + 0.270GPN500c + 0.270GPN500f                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12388} G2P500Q +PERO5              =  0.460G1P500R + 0.270GPN500c + 0.270GPN500f                 : ARR( 0.183E-11,   450., 0.0);
+{ 12389} G2P500Q +PERO6              =  0.300G1P500R + 0.350GPN500c + 0.350GPN500f                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12390} G2P500Q +PERO9              =  0.650G1P500R + 0.350GPN500f                                : ARR( 0.100E-10,     0., 0.0);
+{ 12391} G2P500R +GNO                =       G1P500S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12392} G2P500R +GNO                =       GPN500i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12393} G2P500R +GHO2               =       GPH500Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12394} G2P500R +GNO3               =       G1P500S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12395} G2P500R +MEPERO             =  0.340G1P500S + 0.330GPN500j + 0.330GPN500k                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12396} G2P500R +PERO1              =  0.460G1P500S + 0.270GPN500j + 0.270GPN500k                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12397} G2P500R +PERO2              =  0.400G1P500S + 0.300GPN500j + 0.300GPN500k                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12398} G2P500R +PERO3              =  0.460G1P500S + 0.270GPN500j + 0.270GPN500k                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12399} G2P500R +PERO5              =  0.460G1P500S + 0.270GPN500j + 0.270GPN500k                 : ARR( 0.183E-11,   450., 0.0);
+{ 12400} G2P500R +PERO6              =  0.300G1P500S + 0.350GPN500j + 0.350GPN500k                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12401} G2P500R +PERO9              =  0.650G1P500S + 0.350GPN500k                                : ARR( 0.100E-10,     0., 0.0);
+{ 12402} G1P500R                     =       GD02000 +      GPD3000 +      GNO2                    : ARR( 0.200E+15,  6072., 0.0);
+{ 12403} G1P500S                     =       GND4000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{ 12404} GPH5002                     =       G3H5002 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12405} GPH5002 +GHO                =       GPK5001 +      GHO                                    : ARR( 0.357E-10,     0., 0.0);
+{ 12406} GPH5002 +GHO                =       G2P5000                                               : ARR( 0.203E-11,  -190., 0.0);
+{ 12407} GPH5002+HV               =       G1P5000 +      GHO                                    :  0.100E+01*SUN;
+{ 12408} GPH5002+HV               =       G3H5002 +      GNO2                                   :  0.100E+01*SUN;
+{ 12409} GPK5001                     =       G3K5007 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12410} GPK5001 +GHO                =       G2P500S                                               : ARR( 0.886E-12,     0., 0.0);
+{ 12411} GPK5001 +GHO                =       G2P500T                                               : ARR( 0.281E-11,     0., 0.0);
+{ 12412} GPK5001+HV               =       G3K2000 +      G2P3000                                :  0.100E+01*SUN;
+{ 12413} GPK5001+HV               =       G3K5007 +      GNO2                                   :  0.100E+01*SUN;
+{ 12414} G2P500S +GNO                =       G1P500T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12415} G2P500S +GNO                =       GPN500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12416} G2P500S +GHO2               =       GPH500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12417} G2P500S +GNO3               =       G1P500T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12418} G2P500S +MEPERO             =  0.340G1P500T + 0.330GPK5009 + 0.330GPK500D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12419} G2P500S +PERO1              =  0.460G1P500T + 0.270GPK5009 + 0.270GPK500D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12420} G2P500S +PERO2              =  0.400G1P500T + 0.300GPK5009 + 0.300GPK500D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12421} G2P500S +PERO3              =  0.460G1P500T + 0.270GPK5009 + 0.270GPK500D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12422} G2P500S +PERO5              =  0.460G1P500T + 0.270GPK5009 + 0.270GPK500D                 : ARR( 0.183E-11,   450., 0.0);
+{ 12423} G2P500S +PERO6              =  0.300G1P500T + 0.350GPK5009 + 0.350GPK500D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12424} G2P500S +PERO9              =  0.650G1P500T + 0.350GPK500D                                : ARR( 0.100E-10,     0., 0.0);
+{ 12425} G2P500T +GNO                =       G1P500U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12426} G2P500T +GNO                =       GPN500l                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12427} G2P500T +GHO2               =       GPH500b                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12428} G2P500T +GNO3               =       G1P500U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12429} G2P500T +MEPERO             =  0.340G1P500U + 0.330GPK500I + 0.330GPK500J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12430} G2P500T +PERO1              =  0.460G1P500U + 0.270GPK500I + 0.270GPK500J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12431} G2P500T +PERO2              =  0.400G1P500U + 0.300GPK500I + 0.300GPK500J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12432} G2P500T +PERO3              =  0.460G1P500U + 0.270GPK500I + 0.270GPK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12433} G2P500T +PERO5              =  0.460G1P500U + 0.270GPK500I + 0.270GPK500J                 : ARR( 0.183E-11,   450., 0.0);
+{ 12434} G2P500T +PERO6              =  0.300G1P500U + 0.350GPK500I + 0.350GPK500J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12435} G2P500T +PERO9              =  0.650G1P500U + 0.350GPK500J                                : ARR( 0.100E-10,     0., 0.0);
+{ 12436} G1P500T                     =       G3K2000 +      GPD3000                                : ARR( 0.200E+15,  2285., 0.0);
+{ 12437} G1P500U                     =       GDK4000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4566., 0.0);
+{ 12438} GPN5004                     =       G3N500I +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12439} GPN5004 +GHO                =       G2P500U                                               : ARR( 0.175E-12,     0., 0.0);
+{ 12440} GPN5004 +GHO                =       G2P500W                                               : ARR( 0.120E-11,     0., 0.0);
+{ 12441} GPN5004 +GHO                =       G2P500X                                               : ARR( 0.295E-12,     0., 0.0);
+{ 12442} GPN5004+HV               =       G1P5002 +      GNO2                                   :  0.100E+01*SUN;
+{ 12443} GPN5004+HV               =       G3N500I +      GNO2                                   :  0.100E+01*SUN;
+{ 12444} G2P500U +GNO                =       G1P500W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12445} G2P500U +GNO                =       GPN500C                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12446} G2P500U +GHO2               =       GPH500c                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12447} G2P500U +GNO3               =       G1P500W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12448} G2P500U +MEPERO             =  0.480G1P500W + 0.260GPN500F + 0.260GPN500m                 : ARR( 0.146E-12,  -445., 0.0);
+{ 12449} G2P500U +PERO1              =  0.600G1P500W + 0.200GPN500F + 0.200GPN500m                 : ARR( 0.112E-12,  -500., 0.0);
+{ 12450} G2P500U +PERO2              =  0.560G1P500W + 0.220GPN500F + 0.220GPN500m                 : ARR( 0.418E-13, -1000., 0.0);
+{ 12451} G2P500U +PERO3              =  0.600G1P500W + 0.200GPN500F + 0.200GPN500m                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12452} G2P500U +PERO5              =  0.600G1P500W + 0.200GPN500F + 0.200GPN500m                 : ARR( 0.473E-11,   850., 0.0);
+{ 12453} G2P500U +PERO6              =  0.460G1P500W + 0.270GPN500F + 0.270GPN500m                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12454} G2P500U +PERO9              =  0.800G1P500W + 0.200GPN500m                                : ARR( 0.100E-10,     0., 0.0);
+{ 12455} G2P500W +GNO                =       G1P500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12456} G2P500W +GNO                =       GPN500i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12457} G2P500W +GHO2               =       GPH500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12458} G2P500W +GNO3               =       G1P500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12459} G2P500W +MEPERO             =  0.480G1P500X + 0.260GPN5005 + 0.260GPN500l                 : ARR( 0.616E-11,   905., 0.0);
+{ 12460} G2P500W +PERO1              =  0.600G1P500X + 0.200GPN5005 + 0.200GPN500l                 : ARR( 0.473E-11,   850., 0.0);
+{ 12461} G2P500W +PERO2              =  0.560G1P500X + 0.220GPN5005 + 0.220GPN500l                 : ARR( 0.177E-11,   350., 0.0);
+{ 12462} G2P500W +PERO3              =  0.600G1P500X + 0.200GPN5005 + 0.200GPN500l                 : ARR( 0.533E-11,   500., 0.0);
+{ 12463} G2P500W +PERO5              =  0.600G1P500X + 0.200GPN5005 + 0.200GPN500l                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12464} G2P500W +PERO6              =  0.460G1P500X + 0.270GPN5005 + 0.270GPN500l                 : ARR( 0.183E-11,   450., 0.0);
+{ 12465} G2P500W +PERO9              =  0.800G1P500X + 0.200GPN500l                                : ARR( 0.100E-10,     0., 0.0);
+{ 12466} G2P500X +GNO                =       G1P500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12467} G2P500X +GNO                =       GPN500T                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12468} G2P500X +GHO2               =       GPH500e                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12469} G2P500X +GNO3               =       G1P500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12470} G2P500X +MEPERO             =  0.340G1P500Y + 0.330GPN500d + 0.330GPN500g                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12471} G2P500X +PERO1              =  0.460G1P500Y + 0.270GPN500d + 0.270GPN500g                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12472} G2P500X +PERO2              =  0.400G1P500Y + 0.300GPN500d + 0.300GPN500g                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12473} G2P500X +PERO3              =  0.460G1P500Y + 0.270GPN500d + 0.270GPN500g                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12474} G2P500X +PERO5              =  0.460G1P500Y + 0.270GPN500d + 0.270GPN500g                 : ARR( 0.183E-11,   450., 0.0);
+{ 12475} G2P500X +PERO6              =  0.300G1P500Y + 0.350GPN500d + 0.350GPN500g                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12476} G2P500X +PERO9              =  0.650G1P500Y + 0.350GPN500g                                : ARR( 0.100E-10,     0., 0.0);
+{ 12477} G1P500W +OXYGEN             =       GPN500m +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 12478} G1P500W                     =       GPK5005 +      GNO2                                   : ARR( 0.800E+11,  4245., 0.0);
+{ 12479} G1P500X                     =       GD02000 +      G2P3004                                : ARR( 0.200E+15,  6864., 0.0);
+{ 12480} G1P500Y                     =       G202000 +      GPN3006                                : ARR( 0.200E+15,  6631., 0.0);
+{ 12481} G1P500Y                     =       GD03000 +      GPD2000 +      GNO2                    : ARR( 0.200E+15,  6422., 0.0);
+{ 12482} G2P3004 +GNO                =       G1P3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12483} G2P3004 +GNO                =       GPN3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12484} G2P3004 +GHO2               =       GPH3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12485} G2P3004 +GNO3               =       G1P3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12486} G2P3004 +MEPERO             =  0.480G1P3004 + 0.260GPN3002 + 0.260GPN3006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12487} G2P3004 +PERO1              =  0.600G1P3004 + 0.200GPN3002 + 0.200GPN3006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12488} G2P3004 +PERO2              =  0.560G1P3004 + 0.220GPN3002 + 0.220GPN3006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12489} G2P3004 +PERO3              =  0.600G1P3004 + 0.200GPN3002 + 0.200GPN3006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12490} G2P3004 +PERO5              =  0.600G1P3004 + 0.200GPN3002 + 0.200GPN3006                 : ARR( 0.533E-11,   500., 0.0);
+{ 12491} G2P3004 +PERO6              =  0.460G1P3004 + 0.270GPN3002 + 0.270GPN3006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12492} G2P3004 +PERO9              =  0.800G1P3004 + 0.200GPN3006                                : ARR( 0.100E-10,     0., 0.0);
+{ 12493} G1P3004 +OXYGEN             =       GPN3006 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 12494} GPH5003                     =       G3H500B +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12495} GPH5003 +GHO                =       GPK5002 +      GHO                                    : ARR( 0.275E-10,     0., 0.0);
+{ 12496} GPH5003 +GHO                =       G2P5002                                               : ARR( 0.208E-11,  -190., 0.0);
+{ 12497} GPH5003+HV               =       G1P5002 +      GHO                                    :  0.100E+01*SUN;
+{ 12498} GPH5003+HV               =       G3H500B +      GNO2                                   :  0.100E+01*SUN;
+{ 12499} GPO5003                     =       G3K500B +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12500} GPO5003 +GHO                =       G2P500Y                                               : ARR( 0.119E-11,     0., 0.0);
+{ 12501} GPO5003 +GHO                =       G2P500Z                                               : ARR( 0.146E-11,     0., 0.0);
+{ 12502} GPO5003 +GHO                =       GPK5002 +      GHO2                                   : ARR( 0.650E-11,     0., 0.0);
+{ 12503} GPO5003+HV               =       G3K500B +      GNO2                                   :  0.100E+01*SUN;
+{ 12504} G2P500Y +GNO                =       G1P500Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12505} G2P500Y +GNO                =       GPN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12506} G2P500Y +GHO2               =       GPH500f                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12507} G2P500Y +GNO3               =       G1P500Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12508} G2P500Y +MEPERO             =  0.480G1P500Z + 0.260GPO5004 + 0.260GPK500I                 : ARR( 0.616E-11,   905., 0.0);
+{ 12509} G2P500Y +PERO1              =  0.600G1P500Z + 0.200GPO5004 + 0.200GPK500I                 : ARR( 0.473E-11,   850., 0.0);
+{ 12510} G2P500Y +PERO2              =  0.560G1P500Z + 0.220GPO5004 + 0.220GPK500I                 : ARR( 0.177E-11,   350., 0.0);
+{ 12511} G2P500Y +PERO3              =  0.600G1P500Z + 0.200GPO5004 + 0.200GPK500I                 : ARR( 0.533E-11,   500., 0.0);
+{ 12512} G2P500Y +PERO5              =  0.600G1P500Z + 0.200GPO5004 + 0.200GPK500I                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12513} G2P500Y +PERO6              =  0.460G1P500Z + 0.270GPO5004 + 0.270GPK500I                 : ARR( 0.183E-11,   450., 0.0);
+{ 12514} G2P500Y +PERO9              =  0.800G1P500Z + 0.200GPK500I                                : ARR( 0.100E-10,     0., 0.0);
+{ 12515} G2P500Z +GNO                =       G1P500a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12516} G2P500Z +GNO                =       GPN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12517} G2P500Z +GHO2               =       GPH500g                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12518} G2P500Z +GNO3               =       G1P500a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12519} G2P500Z +MEPERO             =  0.340G1P500a + 0.330GPO5009 + 0.330GPK500E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12520} G2P500Z +PERO1              =  0.460G1P500a + 0.270GPO5009 + 0.270GPK500E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12521} G2P500Z +PERO2              =  0.400G1P500a + 0.300GPO5009 + 0.300GPK500E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12522} G2P500Z +PERO3              =  0.460G1P500a + 0.270GPO5009 + 0.270GPK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12523} G2P500Z +PERO5              =  0.460G1P500a + 0.270GPO5009 + 0.270GPK500E                 : ARR( 0.183E-11,   450., 0.0);
+{ 12524} G2P500Z +PERO6              =  0.300G1P500a + 0.350GPO5009 + 0.350GPK500E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12525} G2P500Z +PERO9              =  0.650G1P500a + 0.350GPK500E                                : ARR( 0.100E-10,     0., 0.0);
+{ 12526} G1P500Z                     =       GD02000 +      G2P3005                                : ARR( 0.200E+15,  6864., 0.0);
+{ 12527} G1P500a                     =       GD03000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 12528} G2P3005 +GNO                =       G1P3005 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12529} G2P3005 +GNO                =       GPN3003                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12530} G2P3005 +GHO2               =       GPH3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12531} G2P3005 +GNO3               =       G1P3005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12532} G2P3005 +MEPERO             =  0.480G1P3005 + 0.260GPO3002 + 0.260GPD3001                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12533} G2P3005 +PERO1              =  0.600G1P3005 + 0.200GPO3002 + 0.200GPD3001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12534} G2P3005 +PERO2              =  0.560G1P3005 + 0.220GPO3002 + 0.220GPD3001                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12535} G2P3005 +PERO3              =  0.600G1P3005 + 0.200GPO3002 + 0.200GPD3001                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12536} G2P3005 +PERO5              =  0.600G1P3005 + 0.200GPO3002 + 0.200GPD3001                 : ARR( 0.533E-11,   500., 0.0);
+{ 12537} G2P3005 +PERO6              =  0.460G1P3005 + 0.270GPO3002 + 0.270GPD3001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12538} G2P3005 +PERO9              =  0.800G1P3005 + 0.200GPD3001                                : ARR( 0.100E-10,     0., 0.0);
+{ 12539} G1P3005                     =       GPD2000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4797., 0.0);
+{ 12540} GPK5002                     =       G3K500F +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12541} GPK5002 +GHO                =       G2P500a                                               : ARR( 0.378E-11,     0., 0.0);
+{ 12542} GPK5002 +GHO                =       G2P500b                                               : ARR( 0.894E-12,     0., 0.0);
+{ 12543} GPK5002+HV               =       G3K4001 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 12544} G2P500a +GNO                =       G1P500b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12545} G2P500a +GNO                =       GPN500k                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12546} G2P500a +GHO2               =       GPH500h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12547} G2P500a +GNO3               =       G1P500b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12548} G2P500a +MEPERO             =  0.480G1P500b + 0.260GPK5004 + 0.260GPK500J                 : ARR( 0.616E-11,   905., 0.0);
+{ 12549} G2P500a +PERO1              =  0.600G1P500b + 0.200GPK5004 + 0.200GPK500J                 : ARR( 0.473E-11,   850., 0.0);
+{ 12550} G2P500a +PERO2              =  0.560G1P500b + 0.220GPK5004 + 0.220GPK500J                 : ARR( 0.177E-11,   350., 0.0);
+{ 12551} G2P500a +PERO3              =  0.600G1P500b + 0.200GPK5004 + 0.200GPK500J                 : ARR( 0.533E-11,   500., 0.0);
+{ 12552} G2P500a +PERO5              =  0.600G1P500b + 0.200GPK5004 + 0.200GPK500J                 : ARR( 0.200E-09,  2200., 0.0);
+{ 12553} G2P500a +PERO6              =  0.460G1P500b + 0.270GPK5004 + 0.270GPK500J                 : ARR( 0.183E-11,   450., 0.0);
+{ 12554} G2P500a +PERO9              =  0.800G1P500b + 0.200GPK500J                                : ARR( 0.100E-10,     0., 0.0);
+{ 12555} G2P500b +GNO                =       G1P500c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12556} G2P500b +GNO                =       GPN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12557} G2P500b +GHO2               =       GPH500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12558} G2P500b +GNO3               =       G1P500c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12559} G2P500b +MEPERO             =  0.340G1P500c + 0.330GPK500A + 0.330GPK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12560} G2P500b +PERO1              =  0.460G1P500c + 0.270GPK500A + 0.270GPK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12561} G2P500b +PERO2              =  0.400G1P500c + 0.300GPK500A + 0.300GPK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12562} G2P500b +PERO3              =  0.460G1P500c + 0.270GPK500A + 0.270GPK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12563} G2P500b +PERO5              =  0.460G1P500c + 0.270GPK500A + 0.270GPK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 12564} G2P500b +PERO6              =  0.300G1P500c + 0.350GPK500A + 0.350GPK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12565} G2P500b +PERO9              =  0.650G1P500c + 0.350GPK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 12566} G1P500b                     =       GD02000 +      G2P3006                                : ARR( 0.200E+15,  6613., 0.0);
+{ 12567} G1P500c                     =       GD03000 +      GCO     +      GNO2    +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 12568} G2P3006 +GNO                =       G1P3006 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 12569} G2P3006 +GNO                =       GPN3005                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 12570} G2P3006 +GHO2               =       GPH3006                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 12571} G2P3006 +GNO3               =       G1P3006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12572} G2P3006 +MEPERO             =  0.480G1P3006 + 0.260GPK3001 + 0.260GPD3002                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12573} G2P3006 +PERO1              =  0.600G1P3006 + 0.200GPK3001 + 0.200GPD3002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12574} G2P3006 +PERO2              =  0.560G1P3006 + 0.220GPK3001 + 0.220GPD3002                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12575} G2P3006 +PERO3              =  0.600G1P3006 + 0.200GPK3001 + 0.200GPD3002                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12576} G2P3006 +PERO5              =  0.600G1P3006 + 0.200GPK3001 + 0.200GPD3002                 : ARR( 0.533E-11,   500., 0.0);
+{ 12577} G2P3006 +PERO6              =  0.460G1P3006 + 0.270GPK3001 + 0.270GPD3002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12578} G2P3006 +PERO9              =  0.800G1P3006 + 0.200GPD3002                                : ARR( 0.100E-10,     0., 0.0);
+{ 12579} G1P3006                     =       GCO     +      GCH2O   +      GNO2    +      GCO      : ARR( 0.200E+15,  3897., 0.0);
+{ 12580} GPD3000                     =       G3D3000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 12581} GPD3000 +GHO                =       G3P3000                                               : ARR( 0.213E-10,     0., 0.0);
+{ 12582} GPD3000 +GNO3               =       G3P3000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 12583} GPD3000+HV               =       G3D3000 +      GNO2                                   :  0.100E+01*SUN;
+{ 12584} GPD3000+HV               =       G2P2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 12585}  GPD2000    +M                 =       G3D2000 +      GNO2            +M                     : FALL( 0.280E+17, 13580., 0.0, 0.190E-02, 12175., 0.0,0.60);
+{ 12586} GPD2000 +GHO                =       GCO     +      GNO2    +      GCO                     : ARR( 0.127E-10,     0., 0.0);
+{ 12587} GPD2000 +GNO3               =       GCO     +      GHNO3   +      GNO2    +      GCO      : ARR( 0.240E-14,     0., 0.0);
+{ 12588} GPD2000+HV               =  2.000GCO     +      GHO2    +      GNO2                    :  0.100E+01*SUN;
+{ 12589} GNN4005 +GHO                =       G2N400C                                               : ARR( 0.335E-13,     0., 0.0);
+{ 12590} GNN4005 +GHO                =       GNK4001 +      GNO2                                   : ARR( 0.957E-13,     0., 0.0);
+{ 12591} GNN4005 +GHO                =       G2N400T                                               : ARR( 0.565E-13,     0., 0.0);
+{ 12592} GNN4005 +GHO                =       GND4000 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{ 12593} GNN4005+HV               =       G1N4004 +      GNO2                                   :  0.100E+01*SUN;
+{ 12594} GNN4005+HV               =       G1N4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 12595} G2N400T +GNO                =       G1N400U +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12596} G2N400T +GNO                =       GNN400L                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12597} G2N400T +GHO2               =       GHN400f                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12598} G2N400T +GNO3               =       G1N400U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12599} G2N400T +MEPERO             =  0.340G1N400U + 0.330GNN400P + 0.330GNN400Q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12600} G2N400T +PERO1              =  0.460G1N400U + 0.270GNN400P + 0.270GNN400Q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12601} G2N400T +PERO2              =  0.400G1N400U + 0.300GNN400P + 0.300GNN400Q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12602} G2N400T +PERO3              =  0.460G1N400U + 0.270GNN400P + 0.270GNN400Q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12603} G2N400T +PERO5              =  0.460G1N400U + 0.270GNN400P + 0.270GNN400Q                 : ARR( 0.183E-11,   450., 0.0);
+{ 12604} G2N400T +PERO6              =  0.300G1N400U + 0.350GNN400P + 0.350GNN400Q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12605} G2N400T +PERO9              =  0.650G1N400U + 0.350GNN400Q                                : ARR( 0.100E-10,     0., 0.0);
+{ 12606} G1N400U                     =       GD02000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6768., 0.0);
+{ 12607} GHN4008 +GHO                =       GNK4001 +      GHO                                    : ARR( 0.340E-10,     0., 0.0);
+{ 12608} GHN4008 +GHO                =       G2N4004                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12609} GHN4008+HV               =       G1N4004 +      GHO                                    :  0.100E+01*SUN;
+{ 12610} GHN4008+HV               =       G1H4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 12611} GNK4001 +GHO                =       G2N400E                                               : ARR( 0.102E-12,     0., 0.0);
+{ 12612} GNK4001 +GHO                =       G2N400U                                               : ARR( 0.172E-12,     0., 0.0);
+{ 12613} GNK4001 +GHO                =       GDK4000 +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{ 12614} GNK4001+HV               =       G3K2000 +      G2N2000                                :  0.100E+01*SUN;
+{ 12615} GNK4001+HV               =       G1K4001 +      GNO2                                   :  0.100E+01*SUN;
+{ 12616} G2N400U +GNO                =       G1N400W +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12617} G2N400U +GNO                =       GNN400M                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12618} G2N400U +GHO2               =       GHN400g                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12619} G2N400U +GNO3               =       G1N400W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12620} G2N400U +MEPERO             =  0.340G1N400W + 0.330GNK4009 + 0.330GNK400A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12621} G2N400U +PERO1              =  0.460G1N400W + 0.270GNK4009 + 0.270GNK400A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12622} G2N400U +PERO2              =  0.400G1N400W + 0.300GNK4009 + 0.300GNK400A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12623} G2N400U +PERO3              =  0.460G1N400W + 0.270GNK4009 + 0.270GNK400A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12624} G2N400U +PERO5              =  0.460G1N400W + 0.270GNK4009 + 0.270GNK400A                 : ARR( 0.183E-11,   450., 0.0);
+{ 12625} G2N400U +PERO6              =  0.300G1N400W + 0.350GNK4009 + 0.350GNK400A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12626} G2N400U +PERO9              =  0.650G1N400W + 0.350GNK400A                                : ARR( 0.100E-10,     0., 0.0);
+{ 12627} G1N400W                     =       G3K2000 +      GND2000                                : ARR( 0.200E+15,  2981., 0.0);
+{ 12628} GHN4009 +GHO                =       GND4000 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 12629} GHN4009 +GHO                =       G2N4007                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 12630} GHN4009+HV               =       G1H4003 +      GNO2                                   :  0.100E+01*SUN;
+{ 12631} GHN4009+HV               =       G1N4007 +      GHO                                    :  0.100E+01*SUN;
+{ 12632} GHH4003 +GHO                =       GHK4001 +      GHO                                    : ARR( 0.344E-10,     0., 0.0);
+{ 12633} GHH4003 +GHO                =       GHD4002 +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{ 12634} GHH4003 +GHO                =       G2H4003                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 12635} GHH4003 +GHO                =       G2H4007                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 12636} GHH4003+HV               =       G1H4003 +      GHO                                    :  0.100E+01*SUN;
+{ 12637} GHH4003+HV               =       G1H4007 +      GHO                                    :  0.100E+01*SUN;
+{ 12638} GHK4001 +GHO                =       GDK4000 +      GHO                                    : ARR( 0.519E-10,     0., 0.0);
+{ 12639} GHK4001 +GHO                =       G2K4001                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12640} GHK4001+HV               =       G3K2000 +      G2H2000                                :  0.100E+01*SUN;
+{ 12641} GHK4001+HV               =       G1K4001 +      GHO                                    :  0.100E+01*SUN;
+{ 12642} GNO4007 +GHO                =       G2N400W                                               : ARR( 0.300E-12,     0., 0.0);
+{ 12643} GNO4007 +GHO                =       GND4000 +      GHO2                                   : ARR( 0.427E-11,     0., 0.0);
+{ 12644} GNO4007+HV               =       G1O4005 +      GNO2                                   :  0.100E+01*SUN;
+{ 12645} G2N400W +GNO                =       G1N400X +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12646} G2N400W +GNO                =       GNN400N                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12647} G2N400W +GHO2               =       GHN400k                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12648} G2N400W +GNO3               =       G1N400X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12649} G2N400W +MEPERO             =  0.340G1N400X + 0.330GNO400C + 0.330GNK400B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12650} G2N400W +PERO1              =  0.460G1N400X + 0.270GNO400C + 0.270GNK400B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12651} G2N400W +PERO2              =  0.400G1N400X + 0.300GNO400C + 0.300GNK400B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12652} G2N400W +PERO3              =  0.460G1N400X + 0.270GNO400C + 0.270GNK400B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12653} G2N400W +PERO5              =  0.460G1N400X + 0.270GNO400C + 0.270GNK400B                 : ARR( 0.183E-11,   450., 0.0);
+{ 12654} G2N400W +PERO6              =  0.300G1N400X + 0.350GNO400C + 0.350GNK400B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12655} G2N400W +PERO9              =  0.650G1N400X + 0.350GNK400B                                : ARR( 0.100E-10,     0., 0.0);
+{ 12656} G1N400X                     =       GND3001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 12657} GHO4007 +GHO                =       GKO4001 +      GHO                                    : ARR( 0.349E-10,     0., 0.0);
+{ 12658} GHO4007 +GHO                =       GHD4002 +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{ 12659} GHO4007 +GHO                =       G2O4005                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 12660} GHO4007+HV               =       G1O4005 +      GHO                                    :  0.100E+01*SUN;
+{ 12661} GKO4001 +GHO                =       G2K4006                                               : ARR( 0.877E-12,     0., 0.0);
+{ 12662} GKO4001 +GHO                =       GDK4000 +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 12663} GKO4001+HV               =       G3K2000 +      G2O2000                                :  0.100E+01*SUN;
+{ 12664} G2K4006 +GNO                =       G1K4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12665} G2K4006 +GNO                =       GNK4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12666} G2K4006 +GHO2               =       GHK4008                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12667} G2K4006 +GNO3               =       G1K4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12668} G2K4006 +MEPERO             =  0.340G1K4006 + 0.330GKO4005 + 0.330GKK4000                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12669} G2K4006 +PERO1              =  0.460G1K4006 + 0.270GKO4005 + 0.270GKK4000                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12670} G2K4006 +PERO2              =  0.400G1K4006 + 0.300GKO4005 + 0.300GKK4000                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12671} G2K4006 +PERO3              =  0.460G1K4006 + 0.270GKO4005 + 0.270GKK4000                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12672} G2K4006 +PERO5              =  0.460G1K4006 + 0.270GKO4005 + 0.270GKK4000                 : ARR( 0.183E-11,   450., 0.0);
+{ 12673} G2K4006 +PERO6              =  0.300G1K4006 + 0.350GKO4005 + 0.350GKK4000                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12674} G2K4006 +PERO9              =  0.650G1K4006 + 0.350GKK4000                                : ARR( 0.100E-10,     0., 0.0);
+{ 12675} G1K4006                     =       G3K2000 +      GDO2000                                : ARR( 0.200E+15,  2983., 0.0);
+{ 12676} GNK4002 +GHO                =       GND400B +      GHO2                                   : ARR( 0.258E-11,     0., 0.0);
+{ 12677} GNK4002 +GHO                =       G2N400X                                               : ARR( 0.181E-12,     0., 0.0);
+{ 12678} GNK4002 +GHO                =       GDK4001 +      GNO2                                   : ARR( 0.153E-12,     0., 0.0);
+{ 12679} GNK4002+HV               =       G3K2001 +      G2N2000                                :  0.100E+01*SUN;
+{ 12680} GNK4002+HV               =       G1K4003 +      GNO2                                   :  0.100E+01*SUN;
+{ 12681} G2N400X +GNO                =       G1N400Y +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12682} G2N400X +GNO                =       GNN400R                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12683} G2N400X +GHO2               =       GHN400l                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12684} G2N400X +GNO3               =       G1N400Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12685} G2N400X +MEPERO             =  0.340G1N400Y + 0.330GNK4005 + 0.330GNK400C                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12686} G2N400X +PERO1              =  0.460G1N400Y + 0.270GNK4005 + 0.270GNK400C                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12687} G2N400X +PERO2              =  0.400G1N400Y + 0.300GNK4005 + 0.300GNK400C                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12688} G2N400X +PERO3              =  0.460G1N400Y + 0.270GNK4005 + 0.270GNK400C                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12689} G2N400X +PERO5              =  0.460G1N400Y + 0.270GNK4005 + 0.270GNK400C                 : ARR( 0.183E-11,   450., 0.0);
+{ 12690} G2N400X +PERO6              =  0.300G1N400Y + 0.350GNK4005 + 0.350GNK400C                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12691} G2N400X +PERO9              =  0.650G1N400Y + 0.350GNK400C                                : ARR( 0.100E-10,     0., 0.0);
+{ 12692} G1N400Y                     =       G3K2001 +      GND2000                                : ARR( 0.200E+15,  3067., 0.0);
+{ 12693} GHK4002 +GHO                =       GDK4001 +      GHO                                    : ARR( 0.542E-10,     0., 0.0);
+{ 12694} GHK4002 +GHO                =       G2K4003                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 12695} GHK4002+HV               =       G3K2001 +      G2H2000                                :  0.100E+01*SUN;
+{ 12696} GHK4002+HV               =       G1K4003 +      GHO                                    :  0.100E+01*SUN;
+{ 12697} GHN400A +GHO                =       GHN400G +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{ 12698} GHN400A +GHO                =       GND4006 +      GHO                                    : ARR( 0.338E-11,     0., 0.0);
+{ 12699} GHN400A +GHO                =       G2N4008                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 12700} GHN400A+HV               =       G1H4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 12701} GHN400A+HV               =       G1N4008 +      GHO                                    :  0.100E+01*SUN;
+{ 12702} GHH4004 +GHO                =       GHH400B +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{ 12703} GHH4004 +GHO                =       GHK4003 +      GHO                                    : ARR( 0.421E-10,     0., 0.0);
+{ 12704} GHH4004 +GHO                =       GHD4006 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 12705} GHH4004 +GHO                =       G2H4006                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 12706} GHH4004 +GHO                =       G2H4008                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 12707} GHH4004+HV               =       G1H4006 +      GHO                                    :  0.100E+01*SUN;
+{ 12708} GHH4004+HV               =       G1H4008 +      GHO                                    :  0.100E+01*SUN;
+{ 12709} GHK4003 +GHO                =       GHD4004 +      GHO2                                   : ARR( 0.132E-10,     0., 0.0);
+{ 12710} GHK4003 +GHO                =       GDK4005 +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 12711} GHK4003 +GHO                =       G2K4007                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 12712} GHK4003+HV               =       G3K3001 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 12713} GHK4003+HV               =       G1K4007 +      GHO                                    :  0.100E+01*SUN;
+{ 12714} G2K4007 +GNO                =       G1K4007 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12715} G2K4007 +GNO                =       GNK4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12716} G2K4007 +GHO2               =       GHK4003                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12717} G2K4007 +GNO3               =       G1K4007 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12718} G2K4007 +MEPERO             =  0.480G1K4007 + 0.260GKO4002 + 0.260GDK4005                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12719} G2K4007 +PERO1              =  0.600G1K4007 + 0.200GKO4002 + 0.200GDK4005                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12720} G2K4007 +PERO2              =  0.560G1K4007 + 0.220GKO4002 + 0.220GDK4005                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12721} G2K4007 +PERO3              =  0.600G1K4007 + 0.200GKO4002 + 0.200GDK4005                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12722} G2K4007 +PERO5              =  0.600G1K4007 + 0.200GKO4002 + 0.200GDK4005                 : ARR( 0.533E-11,   500., 0.0);
+{ 12723} G2K4007 +PERO6              =  0.460G1K4007 + 0.270GKO4002 + 0.270GDK4005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12724} G2K4007 +PERO9              =  0.800G1K4007 + 0.200GDK4005                                : ARR( 0.100E-10,     0., 0.0);
+{ 12725} G1K4007                     =       G3K3001 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 12726} GKO4002 +GHO                =       GDK4001 +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 12727} GKO4002 +GHO                =       G2K4008                                               : ARR( 0.877E-12,     0., 0.0);
+{ 12728} GKO4002 +GHO                =       GDK4005 +      GHO2                                   : ARR( 0.249E-11,     0., 0.0);
+{ 12729} GKO4002+HV               =       G3K3001 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 12730} G2K4008 +GNO                =       G1K4008 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12731} G2K4008 +GNO                =       GNK4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12732} G2K4008 +GHO2               =       GHK4009                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12733} G2K4008 +GNO3               =       G1K4008 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12734} G2K4008 +MEPERO             =  0.340G1K4008 + 0.330GKO4004 + 0.330GKK4001                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12735} G2K4008 +PERO1              =  0.460G1K4008 + 0.270GKO4004 + 0.270GKK4001                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12736} G2K4008 +PERO2              =  0.400G1K4008 + 0.300GKO4004 + 0.300GKK4001                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12737} G2K4008 +PERO3              =  0.460G1K4008 + 0.270GKO4004 + 0.270GKK4001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12738} G2K4008 +PERO5              =  0.460G1K4008 + 0.270GKO4004 + 0.270GKK4001                 : ARR( 0.183E-11,   450., 0.0);
+{ 12739} G2K4008 +PERO6              =  0.300G1K4008 + 0.350GKO4004 + 0.350GKK4001                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12740} G2K4008 +PERO9              =  0.650G1K4008 + 0.350GKK4001                                : ARR( 0.100E-10,     0., 0.0);
+{ 12741} G1K4008                     =       G3K2001 +      GDO2000                                : ARR( 0.200E+15,  3069., 0.0);
+{ 12742} GHH500L +GHO                =       GHN501F +      GHO                                    : ARR( 0.415E-10,     0., 0.0);
+{ 12743} GHH500L +GHO                =       GHN501q +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{ 12744} GHH500L +GHO                =       G2H500N                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 12745} GHH500L +GHO                =       G2H501b                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 12746} GHH500L+HV               =       G1H502l +      GNO2                                   :  0.100E+01*SUN;
+{ 12747} GHH500L+HV               =       G1H500R +      GHO                                    :  0.100E+01*SUN;
+{ 12748} GHH500L+HV               =       G1H501B +      GHO                                    :  0.100E+01*SUN;
+{ 12749} G2H501b +GNO                =       G1H501B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12750} G2H501b +GNO                =       GHN500U                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12751} G2H501b +GHO2               =       GHH500L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12752} G2H501b +GNO3               =       G1H501B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12753} G2H501b +MEPERO             =  0.480G1H501B + 0.260GHN500G + 0.260GHN501q                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12754} G2H501b +PERO1              =  0.600G1H501B + 0.200GHN500G + 0.200GHN501q                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12755} G2H501b +PERO2              =  0.560G1H501B + 0.220GHN500G + 0.220GHN501q                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12756} G2H501b +PERO3              =  0.600G1H501B + 0.200GHN500G + 0.200GHN501q                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12757} G2H501b +PERO5              =  0.600G1H501B + 0.200GHN500G + 0.200GHN501q                 : ARR( 0.533E-11,   500., 0.0);
+{ 12758} G2H501b +PERO6              =  0.460G1H501B + 0.270GHN500G + 0.270GHN501q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12759} G2H501b +PERO9              =  0.800G1H501B + 0.200GHN501q                                : ARR( 0.100E-10,     0., 0.0);
+{ 12760} G1H502l                     =       GHD5005 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 12761} GHN501N +GHO                =       GHN501F +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 12762} GHN501N +GHO                =       GND500S +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 12763} GHN501N +GHO                =       G2N503B                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12764} GHN501N+HV               =       G1H502m +      GNO2                                   :  0.100E+01*SUN;
+{ 12765} GHN501N+HV               =       G1N5028 +      GHO                                    :  0.100E+01*SUN;
+{ 12766} G2N503B +GNO                =       G1N5028 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12767} G2N503B +GNO                =       GNN500O                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12768} G2N503B +GHO2               =       GHN501N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12769} G2N503B +GNO3               =       G1N5028 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12770} G2N503B +MEPERO             =  0.480G1N5028 + 0.260GNO500F + 0.260GND500S                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12771} G2N503B +PERO1              =  0.600G1N5028 + 0.200GNO500F + 0.200GND500S                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12772} G2N503B +PERO2              =  0.560G1N5028 + 0.220GNO500F + 0.220GND500S                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12773} G2N503B +PERO3              =  0.600G1N5028 + 0.200GNO500F + 0.200GND500S                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12774} G2N503B +PERO5              =  0.600G1N5028 + 0.200GNO500F + 0.200GND500S                 : ARR( 0.533E-11,   500., 0.0);
+{ 12775} G2N503B +PERO6              =  0.460G1N5028 + 0.270GNO500F + 0.270GND500S                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12776} G2N503B +PERO9              =  0.800G1N5028 + 0.200GND500S                                : ARR( 0.100E-10,     0., 0.0);
+{ 12777} G1H502m                     =       GDO5003 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 12778} GHN501O +GHO                =       GHN502C +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 12779} GHN501O +GHO                =       GNN502N +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{ 12780} GHN501O +GHO                =       G2N503C                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12781} GHN501O+HV               =       G1H500S +      GNO2                                   :  0.100E+01*SUN;
+{ 12782} GHN501O+HV               =       G1H502n +      GNO2                                   :  0.100E+01*SUN;
+{ 12783} GHN501O+HV               =       G1N502C +      GHO                                    :  0.100E+01*SUN;
+{ 12784} G2N503C +GNO                =       G1N502C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12785} G2N503C +GNO                =       GNN500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12786} G2N503C +GHO2               =       GHN501O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12787} G2N503C +GNO3               =       G1N502C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12788} G2N503C +MEPERO             =  0.480G1N502C + 0.260GNN500k + 0.260GNN502N                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12789} G2N503C +PERO1              =  0.600G1N502C + 0.200GNN500k + 0.200GNN502N                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12790} G2N503C +PERO2              =  0.560G1N502C + 0.220GNN500k + 0.220GNN502N                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12791} G2N503C +PERO3              =  0.600G1N502C + 0.200GNN500k + 0.200GNN502N                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12792} G2N503C +PERO5              =  0.600G1N502C + 0.200GNN500k + 0.200GNN502N                 : ARR( 0.533E-11,   500., 0.0);
+{ 12793} G2N503C +PERO6              =  0.460G1N502C + 0.270GNN500k + 0.270GNN502N                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12794} G2N503C +PERO9              =  0.800G1N502C + 0.200GNN502N                                : ARR( 0.100E-10,     0., 0.0);
+{ 12795} G1H502n                     =       GND500D +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 12796} GHH500M +GHO                =       GHN5041 +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{ 12797} GHH500M +GHO                =       GHH501Q +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 12798} GHH500M +GHO                =       GHN501Q +      GHO                                    : ARR( 0.326E-11,     0., 0.0);
+{ 12799} GHH500M +GHO                =       G2H501c                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12800} GHH500M +GHO                =       G2H500O                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12801} GHH500M+HV               =       G1H501C +      GHO                                    :  0.100E+01*SUN;
+{ 12802} GHH500M+HV               =       G1H502o +      GNO2                                   :  0.100E+01*SUN;
+{ 12803} GHH500M+HV               =       G1H500S +      GHO                                    :  0.100E+01*SUN;
+{ 12804} G2H501c +GNO                =       G1H501C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12805} G2H501c +GNO                =       GHN500W                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12806} G2H501c +GHO2               =       GHH500M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12807} G2H501c +GNO3               =       G1H501C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12808} G2H501c +MEPERO             =  0.480G1H501C + 0.260GHN501B + 0.260GHN5041                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12809} G2H501c +PERO1              =  0.600G1H501C + 0.200GHN501B + 0.200GHN5041                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12810} G2H501c +PERO2              =  0.560G1H501C + 0.220GHN501B + 0.220GHN5041                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12811} G2H501c +PERO3              =  0.600G1H501C + 0.200GHN501B + 0.200GHN5041                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12812} G2H501c +PERO5              =  0.600G1H501C + 0.200GHN501B + 0.200GHN5041                 : ARR( 0.533E-11,   500., 0.0);
+{ 12813} G2H501c +PERO6              =  0.460G1H501C + 0.270GHN501B + 0.270GHN5041                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12814} G2H501c +PERO9              =  0.800G1H501C + 0.200GHN5041                                : ARR( 0.100E-10,     0., 0.0);
+{ 12815} G1H502o                     =       GHD5007 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 12816} GHN501P +GHO                =       GHN501H +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{ 12817} GHN501P +GHO                =       GND500l +      GHO                                    : ARR( 0.169E-10,     0., 0.0);
+{ 12818} GHN501P +GHO                =       G2N503D                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 12819} GHN501P+HV               =       G1H502p +      GNO2                                   :  0.100E+01*SUN;
+{ 12820} GHN501P+HV               =       G1N502E +      GHO                                    :  0.100E+01*SUN;
+{ 12821} G2N503D +GNO                =       G1N502E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12822} G2N503D +GNO                =       GNN500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12823} G2N503D +GHO2               =       GHN501P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12824} G2N503D +GNO3               =       G1N502E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12825} G2N503D +MEPERO             =  0.480G1N502E + 0.260GNO500M + 0.260GND500l                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12826} G2N503D +PERO1              =  0.600G1N502E + 0.200GNO500M + 0.200GND500l                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12827} G2N503D +PERO2              =  0.560G1N502E + 0.220GNO500M + 0.220GND500l                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12828} G2N503D +PERO3              =  0.600G1N502E + 0.200GNO500M + 0.200GND500l                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12829} G2N503D +PERO5              =  0.600G1N502E + 0.200GNO500M + 0.200GND500l                 : ARR( 0.533E-11,   500., 0.0);
+{ 12830} G2N503D +PERO6              =  0.460G1N502E + 0.270GNO500M + 0.270GND500l                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12831} G2N503D +PERO9              =  0.800G1N502E + 0.200GND500l                                : ARR( 0.100E-10,     0., 0.0);
+{ 12832} G1H502p                     =       GDO5004 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 12833} G1H502p                     =       GCH2O   +      GHD4003 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 12834} GHN501Q +GHO                =       GND500m +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{ 12835} GHN501Q +GHO                =       GHN5048 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 12836} GHN501Q +GHO                =       G3H500J                                               : ARR( 0.422E-11,     0., 0.0);
+{ 12837} GHN501Q +GHO                =       G2N503E                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 12838} GHN501Q +GNO3               =       G3H500J +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 12839} GHN501Q+HV               =       G1N502G +      GHO                                    :  0.100E+01*SUN;
+{ 12840} GHN501Q+HV               =       G1H502q +      GNO2                                   :  0.100E+01*SUN;
+{ 12841} GHN501Q+HV               =       GHD4003 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 12842} GHN501Q+HV               =       GHK3000 +      GND2000                                :  0.100E+01*SUN;
+{ 12843} G3H500J +GHO2               =  0.800GGH500e + 0.200GAH500j + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 12844} G3H500J +GNO                =       GHD4003 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 12845} G3H500J +GNO2               =       GPH500j                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 12846} G3H500J +GNO3               =       GHD4003 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 12847} G3H500J +MEPERO             =  0.685GHD4003 + 0.315GAH500j + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12848} G3H500J +PERO1              =  0.800GHD4003 + 0.200GAH500j + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12849} G3H500J +PERO2              =  0.750GHD4003 + 0.250GAH500j + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12850} G3H500J +PERO3              =  0.800GHD4003 + 0.200GAH500j + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12851} G3H500J +PERO5              =  0.650GHD4003 + 0.350GAH500j + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12852} G3H500J +PERO6              =  0.650GHD4003 + 0.350GAH500j + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12853} G3H500J +PERO9              =       GHD4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 12854} G2N503E +GNO                =       G1N502G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12855} G2N503E +GNO                =       GNN500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12856} G2N503E +GHO2               =       GHN501Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12857} G2N503E +GNO3               =       G1N502G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12858} G2N503E +MEPERO             =  0.480G1N502G + 0.260GND500B + 0.260GND500m                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12859} G2N503E +PERO1              =  0.600G1N502G + 0.200GND500B + 0.200GND500m                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12860} G2N503E +PERO2              =  0.560G1N502G + 0.220GND500B + 0.220GND500m                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12861} G2N503E +PERO3              =  0.600G1N502G + 0.200GND500B + 0.200GND500m                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12862} G2N503E +PERO5              =  0.600G1N502G + 0.200GND500B + 0.200GND500m                 : ARR( 0.533E-11,   500., 0.0);
+{ 12863} G2N503E +PERO6              =  0.460G1N502G + 0.270GND500B + 0.270GND500m                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12864} G2N503E +PERO9              =  0.800G1N502G + 0.200GND500m                                : ARR( 0.100E-10,     0., 0.0);
+{ 12865} G1H502q                     =       GDD5001 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 12866} G1H502q                     =       GHD4003 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 12867} GNN4006 +GHO                =       GNN4001 +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{ 12868} GNN4006 +GHO                =       G2N400Y                                               : ARR( 0.294E-12,     0., 0.0);
+{ 12869} GNN4006+HV               =       G1N400Z +      GNO2                                   :  0.100E+01*SUN;
+{ 12870} GNN4006+HV               =       G1N4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 12871} G2N400Y +GNO                =       G1N400a +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 12872} G2N400Y +GNO                =       GNN400S                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 12873} G2N400Y +GHO2               =       GHN400m                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 12874} G2N400Y +GNO3               =       G1N400a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12875} G2N400Y +MEPERO             =  0.340G1N400a + 0.330GNN400K + 0.330GNN400R                 : ARR( 0.565E-13,  -845., 0.0);
+{ 12876} G2N400Y +PERO1              =  0.460G1N400a + 0.270GNN400K + 0.270GNN400R                 : ARR( 0.434E-13,  -900., 0.0);
+{ 12877} G2N400Y +PERO2              =  0.400G1N400a + 0.300GNN400K + 0.300GNN400R                 : ARR( 0.162E-13, -1400., 0.0);
+{ 12878} G2N400Y +PERO3              =  0.460G1N400a + 0.270GNN400K + 0.270GNN400R                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12879} G2N400Y +PERO5              =  0.460G1N400a + 0.270GNN400K + 0.270GNN400R                 : ARR( 0.183E-11,   450., 0.0);
+{ 12880} G2N400Y +PERO6              =  0.300G1N400a + 0.350GNN400K + 0.350GNN400R                 : ARR( 0.168E-13, -1300., 0.0);
+{ 12881} G2N400Y +PERO9              =  0.650G1N400a + 0.350GNN400R                                : ARR( 0.100E-10,     0., 0.0);
+{ 12882} G1N400Z                     =       G2O2000 +      GND2000                                : ARR( 0.200E+15,  7131., 0.0);
+{ 12883} G1N400a                     =       GCH2O   +      GNN3005 +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 12884} G1N400a                     =       GDO2000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6382., 0.0);
+{ 12885} GNN500s +GHO                =       G3N500M                                               : ARR( 0.441E-11,     0., 0.0);
+{ 12886} GNN500s +GNO3               =       G3N500M +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 12887} GNN500s+HV               =       G1N503O +      GNO2                                   :  0.100E+01*SUN;
+{ 12888} GNN500s+HV               =       G1N503U +      GNO2                                   :  0.100E+01*SUN;
+{ 12889} GNN500s+HV               =       GND4000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 12890} GNN500s+HV               =       G2K3000 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 12891} G3N500M +GHO2               =  0.800GGN500Y + 0.200GAN500g + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 12892} G3N500M +GNO                =       GND4000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 12893} G3N500M +GNO2               =       GPN500i                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 12894} G3N500M +GNO3               =       GND4000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 12895} G3N500M +MEPERO             =  0.685GND4000 + 0.315GAN500g + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12896} G3N500M +PERO1              =  0.800GND4000 + 0.200GAN500g + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12897} G3N500M +PERO2              =  0.750GND4000 + 0.250GAN500g + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12898} G3N500M +PERO3              =  0.800GND4000 + 0.200GAN500g + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12899} G3N500M +PERO5              =  0.650GND4000 + 0.350GAN500g + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12900} G3N500M +PERO6              =  0.650GND4000 + 0.350GAN500g + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 12901} G3N500M +PERO9              =       GND4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 12902} G1N503U                     =       GND4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 12903} GNN500t +GHO                =       G2N503F                                               : ARR( 0.700E-13,     0., 0.0);
+{ 12904} GNN500t +GHO                =       GNN500w +      GNO2                                   : ARR( 0.400E-13,     0., 0.0);
+{ 12905} GNN500t+HV               =       G1N5019 +      GNO2                                   :  0.200E+01*SUN;
+{ 12906} GNN500t+HV               =       G1N5014 +      GNO2                                   :  0.100E+01*SUN;
+{ 12907} G2N503F +GNO                =       G1N503W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12908} G2N503F +GNO                =       GNN501W                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12909} G2N503F +GHO2               =       GHN504F                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12910} G2N503F +GNO3               =       G1N503W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12911} G2N503F +MEPERO             =  0.480G1N503W + 0.260GNN5014 + 0.260GNN502T                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12912} G2N503F +PERO1              =  0.600G1N503W + 0.200GNN5014 + 0.200GNN502T                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12913} G2N503F +PERO2              =  0.560G1N503W + 0.220GNN5014 + 0.220GNN502T                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12914} G2N503F +PERO3              =  0.600G1N503W + 0.200GNN5014 + 0.200GNN502T                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12915} G2N503F +PERO5              =  0.600G1N503W + 0.200GNN5014 + 0.200GNN502T                 : ARR( 0.533E-11,   500., 0.0);
+{ 12916} G2N503F +PERO6              =  0.460G1N503W + 0.270GNN5014 + 0.270GNN502T                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12917} G2N503F +PERO9              =  0.800G1N503W + 0.200GNN502T                                : ARR( 0.100E-10,     0., 0.0);
+{ 12918} G1N503W +OXYGEN             =       GNN502T +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 12919} G1N503W                     =       GNN5015 +      GNO2                                   : ARR( 0.800E+11,  4836., 0.0);
+{ 12920} G1N503W                     =       GNN4007 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 12921} GHN501R +GHO                =       GNN500v +      GHO                                    : ARR( 0.173E-11,     0., 0.0);
+{ 12922} GHN501R +GHO                =       G2N5013                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 12923} GHN501R+HV               =       G1H500X +      GNO2                                   :  0.200E+01*SUN;
+{ 12924} GHN501R+HV               =       G1N5014 +      GHO                                    :  0.100E+01*SUN;
+{ 12925} GNN500u +GHO                =       G2N503G                                               : ARR( 0.670E-13,     0., 0.0);
+{ 12926} GNN500u +GHO                =       GNK500Y +      GNO2                                   : ARR( 0.191E-12,     0., 0.0);
+{ 12927} GNN500u +GHO                =       GNN500v +      GHO2                                   : ARR( 0.412E-12,     0., 0.0);
+{ 12928} GNN500u +GHO                =       G1N5014                                               : ARR( 0.210E-17,    85., 2.0);
+{ 12929} GNN500u+HV               =       G1N501D +      GNO2                                   :  0.200E+01*SUN;
+{ 12930} G2N503G +GNO                =       G1N503X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12931} G2N503G +GNO                =       GNN501e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12932} G2N503G +GHO2               =       GHN504G                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12933} G2N503G +GNO3               =       G1N503X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12934} G2N503G +MEPERO             =  0.480G1N503X + 0.260GNN502I + 0.260GNN502U                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12935} G2N503G +PERO1              =  0.600G1N503X + 0.200GNN502I + 0.200GNN502U                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12936} G2N503G +PERO2              =  0.560G1N503X + 0.220GNN502I + 0.220GNN502U                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12937} G2N503G +PERO3              =  0.600G1N503X + 0.200GNN502I + 0.200GNN502U                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12938} G2N503G +PERO5              =  0.600G1N503X + 0.200GNN502I + 0.200GNN502U                 : ARR( 0.533E-11,   500., 0.0);
+{ 12939} G2N503G +PERO6              =  0.460G1N503X + 0.270GNN502I + 0.270GNN502U                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12940} G2N503G +PERO9              =  0.800G1N503X + 0.200GNN502U                                : ARR( 0.100E-10,     0., 0.0);
+{ 12941} G1N503X +OXYGEN             =       GNN502U +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 12942} G1N503X                     =       GNK500b +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{ 12943} G1N503X                     =       GND400H +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 12944} GNN500v +GHO                =       G2N503H                                               : ARR( 0.670E-13,     0., 0.0);
+{ 12945} GNN500v +GHO                =       GNK500Z +      GNO2                                   : ARR( 0.117E-12,     0., 0.0);
+{ 12946} GNN500v+HV               =       G1N501F +      GNO2                                   :  0.200E+01*SUN;
+{ 12947} GNN500v+HV               =       G3N3001 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{ 12948} G2N503H +GNO                =       G1N503Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12949} G2N503H +GNO                =       GNN501i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12950} G2N503H +GHO2               =       GHN504H                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12951} G2N503H +GNO3               =       G1N503Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12952} G2N503H +MEPERO             =  0.480G1N503Y + 0.260GNN501A + 0.260GNN502W                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12953} G2N503H +PERO1              =  0.600G1N503Y + 0.200GNN501A + 0.200GNN502W                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12954} G2N503H +PERO2              =  0.560G1N503Y + 0.220GNN501A + 0.220GNN502W                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12955} G2N503H +PERO3              =  0.600G1N503Y + 0.200GNN501A + 0.200GNN502W                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12956} G2N503H +PERO5              =  0.600G1N503Y + 0.200GNN501A + 0.200GNN502W                 : ARR( 0.533E-11,   500., 0.0);
+{ 12957} G2N503H +PERO6              =  0.460G1N503Y + 0.270GNN501A + 0.270GNN502W                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12958} G2N503H +PERO9              =  0.800G1N503Y + 0.200GNN502W                                : ARR( 0.100E-10,     0., 0.0);
+{ 12959} G1N503Y +OXYGEN             =       GNN502W +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 12960} G1N503Y                     =       GND400I +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{ 12961} GHH500N +GHO                =       GHH500T +      GHO2                                   : ARR( 0.951E-11,     0., 0.0);
+{ 12962} GHH500N +GHO                =       GHK5005 +      GHO                                    : ARR( 0.468E-10,     0., 0.0);
+{ 12963} GHH500N +GHO                =       GHD5005 +      GHO                                    : ARR( 0.183E-10,     0., 0.0);
+{ 12964} GHH500N+HV               =       G1H500Y +      GHO                                    :  0.100E+01*SUN;
+{ 12965} GHH500N+HV               =       G1H500U +      GHO                                    :  0.100E+01*SUN;
+{ 12966} GND500K +GHO                =       G3N4002 +      GCO                                    : ARR( 0.132E-10,     0., 0.0);
+{ 12967} GND500K +GNO3               =       G3N4002 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 12968} GND500K+HV               =       G1D500W +      GNO2                                   :  0.100E+01*SUN;
+{ 12969} GND500K+HV               =       G3N4002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 12970} GND500K+HV               =       GND4000 +      GCO                                    :  0.100E+01*SUN;
+{ 12971} GND500K+HV               =       GN03001 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 12972} GNN500w +GHO                =       G2N503I                                               : ARR( 0.102E-12,     0., 0.0);
+{ 12973} GNN500w +GHO                =       GNK500Z +      GNO2                                   : ARR( 0.144E-13,     0., 0.0);
+{ 12974} GNN500w +GHO                =       GNK500g +      GNO2                                   : ARR( 0.191E-13,     0., 0.0);
+{ 12975} GNN500w +GHO                =       G2N503J                                               : ARR( 0.335E-13,     0., 0.0);
+{ 12976} GNN500w+HV               =       G3K2000 +      GND3001 +      GNO2                    :  0.100E+01*SUN;
+{ 12977} GNN500w+HV               =       GNK3000 +      G2D2000 +      GNO2                    :  0.100E+01*SUN;
+{ 12978} GNN500w+HV               =       G1N5016 +      GNO2                                   :  0.100E+01*SUN;
+{ 12979} GNN500w+HV               =       G1N501P +      GNO2                                   :  0.100E+01*SUN;
+{ 12980} G2N503I +GNO                =       G1N503Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12981} G2N503I +GNO                =       GNN501Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12982} G2N503I +GHO2               =       GHN504I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12983} G2N503I +GNO3               =       G1N503Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12984} G2N503I +MEPERO             =  0.480G1N503Z + 0.260GNN5018 + 0.260GNN502X                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12985} G2N503I +PERO1              =  0.600G1N503Z + 0.200GNN5018 + 0.200GNN502X                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12986} G2N503I +PERO2              =  0.560G1N503Z + 0.220GNN5018 + 0.220GNN502X                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12987} G2N503I +PERO3              =  0.600G1N503Z + 0.200GNN5018 + 0.200GNN502X                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12988} G2N503I +PERO5              =  0.600G1N503Z + 0.200GNN5018 + 0.200GNN502X                 : ARR( 0.533E-11,   500., 0.0);
+{ 12989} G2N503I +PERO6              =  0.460G1N503Z + 0.270GNN5018 + 0.270GNN502X                 : ARR( 0.488E-13, -1250., 0.0);
+{ 12990} G2N503I +PERO9              =  0.800G1N503Z + 0.200GNN502X                                : ARR( 0.100E-10,     0., 0.0);
+{ 12991} G2N503J +GNO                =       G1N503a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 12992} G2N503J +GNO                =       GNN501v                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 12993} G2N503J +GHO2               =       GHN504J                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 12994} G2N503J +GNO3               =       G1N503a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 12995} G2N503J +MEPERO             =  0.480G1N503a + 0.260GNN5015 + 0.260GNN502Y                 : ARR( 0.164E-12,  -795., 0.0);
+{ 12996} G2N503J +PERO1              =  0.600G1N503a + 0.200GNN5015 + 0.200GNN502Y                 : ARR( 0.126E-12,  -850., 0.0);
+{ 12997} G2N503J +PERO2              =  0.560G1N503a + 0.220GNN5015 + 0.220GNN502Y                 : ARR( 0.471E-13, -1350., 0.0);
+{ 12998} G2N503J +PERO3              =  0.600G1N503a + 0.200GNN5015 + 0.200GNN502Y                 : ARR( 0.142E-12, -1200., 0.0);
+{ 12999} G2N503J +PERO5              =  0.600G1N503a + 0.200GNN5015 + 0.200GNN502Y                 : ARR( 0.533E-11,   500., 0.0);
+{ 13000} G2N503J +PERO6              =  0.460G1N503a + 0.270GNN5015 + 0.270GNN502Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13001} G2N503J +PERO9              =  0.800G1N503a + 0.200GNN502Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 13002} G1N503Z                     =       G3N4009 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{ 13003} G1N503a +OXYGEN             =       GNN502Y +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 13004} G1N503a                     =       GND4008 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{ 13005} G3N4009 +GHO2               =  0.800GGN400F + 0.200GAN400F + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13006} G3N4009 +GNO                =       GND3001 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13007} G3N4009 +GNO2               =       GPN400F                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13008} G3N4009 +GNO3               =       GND3001 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13009} G3N4009 +MEPERO             =  0.685GND3001 + 0.315GAN400F + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13010} G3N4009 +PERO1              =  0.800GND3001 + 0.200GAN400F + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13011} G3N4009 +PERO2              =  0.750GND3001 + 0.250GAN400F + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13012} G3N4009 +PERO3              =  0.800GND3001 + 0.200GAN400F + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13013} G3N4009 +PERO5              =  0.650GND3001 + 0.350GAN400F + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13014} G3N4009 +PERO6              =  0.650GND3001 + 0.350GAN400F + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13015} G3N4009 +PERO9              =       GND3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13016} GHN501S +GHO                =       GNK500Z +      GHO                                    : ARR( 0.528E-11,     0., 0.0);
+{ 13017} GHN501S +GHO                =       G2N5015                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 13018} GHN501S+HV               =       G1H500a +      GNO2                                   :  0.100E+01*SUN;
+{ 13019} GHN501S+HV               =       G1N5016 +      GHO                                    :  0.100E+01*SUN;
+{ 13020} GHN501S+HV               =       G3H4008 +      GCH3O2                                 :  0.100E+01*SUN;
+{ 13021} G3H4008 +GHO2               =  0.800GGH400B + 0.200GAH400B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13022} G3H4008 +GNO                =       GND3001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13023} G3H4008 +GNO2               =       GPH400B                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13024} G3H4008 +GNO3               =       GND3001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13025} G3H4008 +MEPERO             =  0.685GND3001 + 0.315GAH400B + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13026} G3H4008 +PERO1              =  0.800GND3001 + 0.200GAH400B + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13027} G3H4008 +PERO2              =  0.750GND3001 + 0.250GAH400B + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13028} G3H4008 +PERO3              =  0.800GND3001 + 0.200GAH400B + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13029} G3H4008 +PERO5              =  0.650GND3001 + 0.350GAH400B + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13030} G3H4008 +PERO6              =  0.650GND3001 + 0.350GAH400B + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13031} G3H4008 +PERO9              =       GND3001 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13032} GNK500Y +GHO                =       G2N503K                                               : ARR( 0.104E-12,     0., 0.0);
+{ 13033} GNK500Y +GHO                =       GNK500Z +      GHO2                                   : ARR( 0.128E-11,     0., 0.0);
+{ 13034} GNK500Y +GHO                =       GKK5008 +      GNO2                                   : ARR( 0.309E-12,     0., 0.0);
+{ 13035} GNK500Y +GHO                =       G1N5016                                               : ARR( 0.214E-17,    85., 2.0);
+{ 13036} GNK500Y+HV               =       G3K2000 +      GND3001 +      GHO2                    :  0.100E+01*SUN;
+{ 13037} GNK500Y+HV               =       G1K500L +      GNO2                                   :  0.100E+01*SUN;
+{ 13038} G2N503K +GNO                =       G1N503b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13039} G2N503K +GNO                =       GNN501g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13040} G2N503K +GHO2               =       GHN504K                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13041} G2N503K +GNO3               =       G1N503b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13042} G2N503K +MEPERO             =  0.480G1N503b + 0.260GNK500k + 0.260GND500y                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13043} G2N503K +PERO1              =  0.600G1N503b + 0.200GNK500k + 0.200GND500y                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13044} G2N503K +PERO2              =  0.560G1N503b + 0.220GNK500k + 0.220GND500y                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13045} G2N503K +PERO3              =  0.600G1N503b + 0.200GNK500k + 0.200GND500y                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13046} G2N503K +PERO5              =  0.600G1N503b + 0.200GNK500k + 0.200GND500y                 : ARR( 0.533E-11,   500., 0.0);
+{ 13047} G2N503K +PERO6              =  0.460G1N503b + 0.270GNK500k + 0.270GND500y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13048} G2N503K +PERO9              =  0.800G1N503b + 0.200GND500y                                : ARR( 0.100E-10,     0., 0.0);
+{ 13049} G1N503b                     =       G3N400A +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 13050} G3N400A +GHO2               =  0.800GGN400G + 0.200GAN400G + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13051} G3N400A +GNO                =       GND3001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13052} G3N400A +GNO2               =       GPN400G                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13053} G3N400A +GNO3               =       GND3001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13054} G3N400A +MEPERO             =  0.685GND3001 + 0.315GAN400G + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13055} G3N400A +PERO1              =  0.800GND3001 + 0.200GAN400G + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13056} G3N400A +PERO2              =  0.750GND3001 + 0.250GAN400G + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13057} G3N400A +PERO3              =  0.800GND3001 + 0.200GAN400G + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13058} G3N400A +PERO5              =  0.650GND3001 + 0.350GAN400G + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13059} G3N400A +PERO6              =  0.650GND3001 + 0.350GAN400G + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13060} G3N400A +PERO9              =       GND3001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13061} GNK500Z +GHO                =       G2N503L                                               : ARR( 0.102E-12,     0., 0.0);
+{ 13062} GNK500Z +GHO                =       GKK5009 +      GNO2                                   : ARR( 0.584E-13,     0., 0.0);
+{ 13063} GNK500Z +GHO                =       G2N503M                                               : ARR( 0.335E-13,     0., 0.0);
+{ 13064} GNK500Z+HV               =       G3K2000 +      G3N3001                                :  0.100E+01*SUN;
+{ 13065} GNK500Z+HV               =       G1K500N +      GNO2                                   :  0.100E+01*SUN;
+{ 13066} G2N503L +GNO                =       G1N503c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13067} G2N503L +GNO                =       GNN501k                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13068} G2N503L +GHO2               =       GHN504L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13069} G2N503L +GNO3               =       G1N503c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13070} G2N503L +MEPERO             =  0.480G1N503c + 0.260GNK500j + 0.260GND500z                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13071} G2N503L +PERO1              =  0.600G1N503c + 0.200GNK500j + 0.200GND500z                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13072} G2N503L +PERO2              =  0.560G1N503c + 0.220GNK500j + 0.220GND500z                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13073} G2N503L +PERO3              =  0.600G1N503c + 0.200GNK500j + 0.200GND500z                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13074} G2N503L +PERO5              =  0.600G1N503c + 0.200GNK500j + 0.200GND500z                 : ARR( 0.533E-11,   500., 0.0);
+{ 13075} G2N503L +PERO6              =  0.460G1N503c + 0.270GNK500j + 0.270GND500z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13076} G2N503L +PERO9              =  0.800G1N503c + 0.200GND500z                                : ARR( 0.100E-10,     0., 0.0);
+{ 13077} G2N503M +GNO                =       G1N503d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13078} G2N503M +GNO                =       GNN501z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13079} G2N503M +GHO2               =       GHN504M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13080} G2N503M +GNO3               =       G1N503d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13081} G2N503M +MEPERO             =  0.480G1N503d + 0.260GNK500c + 0.260GND5011                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13082} G2N503M +PERO1              =  0.600G1N503d + 0.200GNK500c + 0.200GND5011                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13083} G2N503M +PERO2              =  0.560G1N503d + 0.220GNK500c + 0.220GND5011                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13084} G2N503M +PERO3              =  0.600G1N503d + 0.200GNK500c + 0.200GND5011                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13085} G2N503M +PERO5              =  0.600G1N503d + 0.200GNK500c + 0.200GND5011                 : ARR( 0.533E-11,   500., 0.0);
+{ 13086} G2N503M +PERO6              =  0.460G1N503d + 0.270GNK500c + 0.270GND5011                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13087} G2N503M +PERO9              =  0.800G1N503d + 0.200GND5011                                : ARR( 0.100E-10,     0., 0.0);
+{ 13088} G1N503c                     =       G3N3001 +      GCH2O   +      GCO                     : ARR( 0.200E+15,  3897., 0.0);
+{ 13089} G1N503d +OXYGEN             =       GND5011 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 13090} G1N503d                     =       GDK4008 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  6903., 0.0);
+{ 13091} GND500L +GHO                =       G3N500N                                               : ARR( 0.466E-11,     0., 0.0);
+{ 13092} GND500L +GNO3               =       G3N500N +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13093} GND500L+HV               =       G3K2000 +      G2N300A                                :  0.100E+01*SUN;
+{ 13094} GND500L+HV               =       G1D500D +      GNO2                                   :  0.100E+01*SUN;
+{ 13095} GND500L+HV               =       GDK4000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 13096} G3N500N +GHO2               =  0.800GGN500b + 0.200GAN500j + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13097} G3N500N +GNO                =       GDK4000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13098} G3N500N +GNO2               =       GPN500l                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13099} G3N500N +GNO3               =       GDK4000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13100} G3N500N +MEPERO             =  0.685GDK4000 + 0.315GAN500j + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13101} G3N500N +PERO1              =  0.800GDK4000 + 0.200GAN500j + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13102} G3N500N +PERO2              =  0.750GDK4000 + 0.250GAN500j + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13103} G3N500N +PERO3              =  0.800GDK4000 + 0.200GAN500j + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13104} G3N500N +PERO5              =  0.650GDK4000 + 0.350GAN500j + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13105} G3N500N +PERO6              =  0.650GDK4000 + 0.350GAN500j + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13106} G3N500N +PERO9              =       GDK4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13107} GGN4002 +GHO                =       G3N4002                                               : ARR( 0.206E-11,  -190., 0.0);
+{ 13108} GGN4002+HV               =       G1G4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 13109} GGN4002+HV               =       G2N3001 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 13110} GAN4002 +GHO                =       GAK4000 +      GNO2                                   : ARR( 0.100E-12,     0., 0.0);
+{ 13111} GAN4002 +GHO                =       G2A4009                                               : ARR( 0.133E-12,     0., 0.0);
+{ 13112} GAN4002 +GHO                =       G2N3001 +      GCO2                                   : ARR( 0.543E-12,     0., 0.0);
+{ 13113} GAN4002+HV               =       G1A4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 13114} G2A4009 +GNO                =       G1A400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13115} G2A4009 +GNO                =       GAN400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13116} G2A4009 +GHO2               =       GAH400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13117} G2A4009 +GNO3               =       G1A400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13118} G2A4009 +MEPERO             =  0.340G1A400A + 0.330GAN400G + 0.330GAN400H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13119} G2A4009 +PERO1              =  0.460G1A400A + 0.270GAN400G + 0.270GAN400H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13120} G2A4009 +PERO2              =  0.400G1A400A + 0.300GAN400G + 0.300GAN400H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13121} G2A4009 +PERO3              =  0.460G1A400A + 0.270GAN400G + 0.270GAN400H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13122} G2A4009 +PERO5              =  0.460G1A400A + 0.270GAN400G + 0.270GAN400H                 : ARR( 0.183E-11,   450., 0.0);
+{ 13123} G2A4009 +PERO6              =  0.300G1A400A + 0.350GAN400G + 0.350GAN400H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13124} G2A4009 +PERO9              =  0.650G1A400A + 0.350GAN400H                                : ARR( 0.100E-10,     0., 0.0);
+{ 13125} G1A400A                     =       GND3001 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 13126} GPN4002                     =       G3N4002 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 13127} GPN4002 +GHO                =       G2P4009                                               : ARR( 0.335E-13,     0., 0.0);
+{ 13128} GPN4002 +GHO                =       GPK4000 +      GNO2                                   : ARR( 0.957E-13,     0., 0.0);
+{ 13129} GPN4002 +GHO                =       G2P400A                                               : ARR( 0.172E-12,     0., 0.0);
+{ 13130} GPN4002+HV               =       G1P4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 13131} GPN4002+HV               =       G3N4002 +      GNO2                                   :  0.100E+01*SUN;
+{ 13132} G2P4009 +GNO                =       G1P400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13133} G2P4009 +GNO                =       GPN4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13134} G2P4009 +GHO2               =       GPH400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13135} G2P4009 +GNO3               =       G1P400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13136} G2P4009 +MEPERO             =  0.480G1P400A + 0.260GPN4003 + 0.260GPN400H                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13137} G2P4009 +PERO1              =  0.600G1P400A + 0.200GPN4003 + 0.200GPN400H                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13138} G2P4009 +PERO2              =  0.560G1P400A + 0.220GPN4003 + 0.220GPN400H                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13139} G2P4009 +PERO3              =  0.600G1P400A + 0.200GPN4003 + 0.200GPN400H                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13140} G2P4009 +PERO5              =  0.600G1P400A + 0.200GPN4003 + 0.200GPN400H                 : ARR( 0.533E-11,   500., 0.0);
+{ 13141} G2P4009 +PERO6              =  0.460G1P400A + 0.270GPN4003 + 0.270GPN400H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13142} G2P4009 +PERO9              =  0.800G1P400A + 0.200GPN400H                                : ARR( 0.100E-10,     0., 0.0);
+{ 13143} G2P400A +GNO                =       G1P400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13144} G2P400A +GNO                =       GPN400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13145} G2P400A +GHO2               =       GPH400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13146} G2P400A +GNO3               =       G1P400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13147} G2P400A +MEPERO             =  0.340G1P400B + 0.330GPN400G + 0.330GPN400I                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13148} G2P400A +PERO1              =  0.460G1P400B + 0.270GPN400G + 0.270GPN400I                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13149} G2P400A +PERO2              =  0.400G1P400B + 0.300GPN400G + 0.300GPN400I                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13150} G2P400A +PERO3              =  0.460G1P400B + 0.270GPN400G + 0.270GPN400I                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13151} G2P400A +PERO5              =  0.460G1P400B + 0.270GPN400G + 0.270GPN400I                 : ARR( 0.183E-11,   450., 0.0);
+{ 13152} G2P400A +PERO6              =  0.300G1P400B + 0.350GPN400G + 0.350GPN400I                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13153} G2P400A +PERO9              =  0.650G1P400B + 0.350GPN400I                                : ARR( 0.100E-10,     0., 0.0);
+{ 13154} G1P400A +OXYGEN             =       GPN400H +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 13155} G1P400A                     =       GPD3000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{ 13156} G1P400B                     =       GND3001 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 13157} GHN501T +GHO                =       GNN500x +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 13158} GHN501T +GHO                =       G2N5017                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 13159} GHN501T+HV               =       G1H502r +      GNO2                                   :  0.100E+01*SUN;
+{ 13160} GHN501T+HV               =       G1H502s +      GNO2                                   :  0.100E+01*SUN;
+{ 13161} GHN501T+HV               =       G1N5018 +      GHO                                    :  0.100E+01*SUN;
+{ 13162} G1H502r                     =       GND5005 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 13163} G1H502s                     =       GD02000 +      GHD3000 +      GNO2                    : ARR( 0.200E+15,  6455., 0.0);
+{ 13164} G1H502s                     =       GND3001 +      G2H2000                                : ARR( 0.200E+15,  7074., 0.0);
+{ 13165} GNN500x +GHO                =       G3N500O                                               : ARR( 0.211E-10,     0., 0.0);
+{ 13166} GNN500x +GNO3               =       G3N500O +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13167} GNN500x+HV               =       G1N503e +      GNO2                                   :  0.100E+01*SUN;
+{ 13168} GNN500x+HV               =       G1N503f +      GNO2                                   :  0.100E+01*SUN;
+{ 13169} GNN500x+HV               =       G2N400Z +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 13170} GNN500x+HV               =       GDK3000 +      GD02000 + 2.000GNO2                    :  0.100E+01*SUN;
+{ 13171} G3N500O +GHO2               =  0.800GGN500P + 0.200GAN500R + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13172} G3N500O +GNO                =       G2N400Z +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13173} G3N500O +GNO2               =       GPN500R                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13174} G3N500O +GNO3               =       G2N400Z +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13175} G3N500O +MEPERO             =  0.685G2N400Z + 0.315GAN500R + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13176} G3N500O +PERO1              =  0.800G2N400Z + 0.200GAN500R + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13177} G3N500O +PERO2              =  0.750G2N400Z + 0.250GAN500R + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13178} G3N500O +PERO3              =  0.800G2N400Z + 0.200GAN500R + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13179} G3N500O +PERO5              =  0.650G2N400Z + 0.350GAN500R + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13180} G3N500O +PERO6              =  0.650G2N400Z + 0.350GAN500R + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13181} G3N500O +PERO9              =       G2N400Z +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 13182} G1N503e                     =       G3N5005                                               : ARR( 0.800E+11,  4559., 0.0);
+{ 13183} G1N503e                     =       GD02000 +      GDD3000 +      GNO2                    : ARR( 0.200E+15,  6112., 0.0);
+{ 13184} G1N503f                     =       GD02000 +      GDD3000 +      GNO2                    : ARR( 0.200E+15,  6072., 0.0);
+{ 13185} G1N503f                     =       GND3001 +      G2D2000                                : ARR( 0.200E+15,  7229., 0.0);
+{ 13186} G2N400Z +GNO                =       G1N400b +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13187} G2N400Z +GNO                =       GNN400L                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13188} G2N400Z +GHO2               =       GHN400n                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13189} G2N400Z +GNO3               =       G1N400b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13190} G2N400Z +MEPERO             =  0.480G1N400b + 0.260GNN400N + 0.260GNN4007                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13191} G2N400Z +PERO1              =  0.600G1N400b + 0.200GNN400N + 0.200GNN4007                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13192} G2N400Z +PERO2              =  0.560G1N400b + 0.220GNN400N + 0.220GNN4007                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13193} G2N400Z +PERO3              =  0.600G1N400b + 0.200GNN400N + 0.200GNN4007                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13194} G2N400Z +PERO5              =  0.600G1N400b + 0.200GNN400N + 0.200GNN4007                 : ARR( 0.533E-11,   500., 0.0);
+{ 13195} G2N400Z +PERO6              =  0.460G1N400b + 0.270GNN400N + 0.270GNN4007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13196} G2N400Z +PERO9              =  0.800G1N400b + 0.200GNN4007                                : ARR( 0.100E-10,     0., 0.0);
+{ 13197} G1N400b +OXYGEN             =       GNN4007 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 13198} G1N400b                     =       G2N400a                                               : ARR( 0.240E+12,  4897., 0.0);
+{ 13199} G1N400b                     =       GND3001 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 13200} G2N400a +GNO                =       G1N400c +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13201} G2N400a +GNO                =       GNN400S                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13202} G2N400a +GHO2               =       GHN400o                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13203} G2N400a +GNO3               =       G1N400c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13204} G2N400a +MEPERO             =  0.480G1N400c + 0.260GNN400O + 0.260GNN400E                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13205} G2N400a +PERO1              =  0.600G1N400c + 0.200GNN400O + 0.200GNN400E                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13206} G2N400a +PERO2              =  0.560G1N400c + 0.220GNN400O + 0.220GNN400E                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13207} G2N400a +PERO3              =  0.600G1N400c + 0.200GNN400O + 0.200GNN400E                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13208} G2N400a +PERO5              =  0.600G1N400c + 0.200GNN400O + 0.200GNN400E                 : ARR( 0.533E-11,   500., 0.0);
+{ 13209} G2N400a +PERO6              =  0.460G1N400c + 0.270GNN400O + 0.270GNN400E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13210} G2N400a +PERO9              =  0.800G1N400c + 0.200GNN400E                                : ARR( 0.100E-10,     0., 0.0);
+{ 13211} G1N400c                     =       GNN400E +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{ 13212} GHN501U +GHO                =       GNN500w +      GHO                                    : ARR( 0.686E-11,     0., 0.0);
+{ 13213} GHN501U +GHO                =       G2N5018                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 13214} GHN501U+HV               =       G1H502t +      GNO2                                   :  0.100E+01*SUN;
+{ 13215} GHN501U+HV               =       G1H502u +      GNO2                                   :  0.100E+01*SUN;
+{ 13216} GHN501U+HV               =       G1N5019 +      GHO                                    :  0.100E+01*SUN;
+{ 13217} G1H502t                     =       G2H501d                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13218} G1H502t                     =       GHD3002 +      GD02000 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{ 13219} G1H502u                     =       GND3001 +      GD02000 +      GHO                     : ARR( 0.200E+15,  5171., 0.0);
+{ 13220} G2H501d +GNO                =       G1H502v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13221} G2H501d +GNO                =       GHN503S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13222} G2H501d +GHO2               =       GHH501a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13223} G2H501d +GNO3               =       G1H502v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13224} G2H501d +MEPERO             =  0.480G1H502v + 0.260GHN502w + 0.260GHN502x                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13225} G2H501d +PERO1              =  0.600G1H502v + 0.200GHN502w + 0.200GHN502x                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13226} G2H501d +PERO2              =  0.560G1H502v + 0.220GHN502w + 0.220GHN502x                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13227} G2H501d +PERO3              =  0.600G1H502v + 0.200GHN502w + 0.200GHN502x                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13228} G2H501d +PERO5              =  0.600G1H502v + 0.200GHN502w + 0.200GHN502x                 : ARR( 0.533E-11,   500., 0.0);
+{ 13229} G2H501d +PERO6              =  0.460G1H502v + 0.270GHN502w + 0.270GHN502x                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13230} G2H501d +PERO9              =  0.800G1H502v + 0.200GHN502x                                : ARR( 0.100E-10,     0., 0.0);
+{ 13231} G1H502v                     =       GHN501n +      GHO2                                   : ARR( 0.800E+11,  2837., 0.0);
+{ 13232} G1H502v                     =       GND4007 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 13233} GNN500y +GHO                =       G2N503N                                               : ARR( 0.174E-12,     0., 0.0);
+{ 13234} GNN500y +GHO                =       GNN500w +      GHO2                                   : ARR( 0.174E-11,     0., 0.0);
+{ 13235} GNN500y +GHO                =       G1N5019                                               : ARR( 0.218E-17,    85., 2.0);
+{ 13236} GNN500y+HV               =       G1N503g +      GNO2                                   :  0.100E+01*SUN;
+{ 13237} GNN500y+HV               =       G1N501L +      GNO2                                   :  0.100E+01*SUN;
+{ 13238} G2N503N +GNO                =       G1N503h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13239} G2N503N +GNO                =       GNN501X                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13240} G2N503N +GHO2               =       GHN504N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13241} G2N503N +GNO3               =       G1N503h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13242} G2N503N +MEPERO             =  0.480G1N503h + 0.260GNN5017 + 0.260GNN502Z                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13243} G2N503N +PERO1              =  0.600G1N503h + 0.200GNN5017 + 0.200GNN502Z                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13244} G2N503N +PERO2              =  0.560G1N503h + 0.220GNN5017 + 0.220GNN502Z                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13245} G2N503N +PERO3              =  0.600G1N503h + 0.200GNN5017 + 0.200GNN502Z                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13246} G2N503N +PERO5              =  0.600G1N503h + 0.200GNN5017 + 0.200GNN502Z                 : ARR( 0.533E-11,   500., 0.0);
+{ 13247} G2N503N +PERO6              =  0.460G1N503h + 0.270GNN5017 + 0.270GNN502Z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13248} G2N503N +PERO9              =  0.800G1N503h + 0.200GNN502Z                                : ARR( 0.100E-10,     0., 0.0);
+{ 13249} G1N503g                     =       GND3001 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{ 13250} G1N503h                     =       GNN4007 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13251} GHN501W +GHO                =       GNN500z +      GHO                                    : ARR( 0.343E-11,     0., 0.0);
+{ 13252} GHN501W +GHO                =       G2N5019                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 13253} GHN501W+HV               =       G1H502w +      GNO2                                   :  0.100E+01*SUN;
+{ 13254} GHN501W+HV               =       G1H502x +      GNO2                                   :  0.100E+01*SUN;
+{ 13255} GHN501W+HV               =       G1N501A +      GHO                                    :  0.100E+01*SUN;
+{ 13256} G1H502w                     =       GD03000 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{ 13257} G1H502x                     =       G2H501e                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13258} G1H502x                     =       GD03000 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6739., 0.0);
+{ 13259} G2H501e +GNO                =       G1H502y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13260} G2H501e +GNO                =       GHN501o                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13261} G2H501e +GHO2               =       GHH501b                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13262} G2H501e +GNO3               =       G1H502y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13263} G2H501e +MEPERO             =  0.480G1H502y + 0.260GHN5027 + 0.260GHN501G                 : ARR( 0.146E-12,  -445., 0.0);
+{ 13264} G2H501e +PERO1              =  0.600G1H502y + 0.200GHN5027 + 0.200GHN501G                 : ARR( 0.112E-12,  -500., 0.0);
+{ 13265} G2H501e +PERO2              =  0.560G1H502y + 0.220GHN5027 + 0.220GHN501G                 : ARR( 0.418E-13, -1000., 0.0);
+{ 13266} G2H501e +PERO3              =  0.600G1H502y + 0.200GHN5027 + 0.200GHN501G                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13267} G2H501e +PERO5              =  0.600G1H502y + 0.200GHN5027 + 0.200GHN501G                 : ARR( 0.473E-11,   850., 0.0);
+{ 13268} G2H501e +PERO6              =  0.460G1H502y + 0.270GHN5027 + 0.270GHN501G                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13269} G2H501e +PERO9              =  0.800G1H502y + 0.200GHN501G                                : ARR( 0.100E-10,     0., 0.0);
+{ 13270} G1H502y                     =       GHN5028 +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{ 13271} GNN500z +GHO                =       G2N503O                                               : ARR( 0.241E-12,     0., 0.0);
+{ 13272} GNN500z +GHO                =       G3N500P                                               : ARR( 0.435E-11,     0., 0.0);
+{ 13273} GNN500z +GNO3               =       G3N500P +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13274} GNN500z+HV               =       G1N503i +      GNO2                                   :  0.100E+01*SUN;
+{ 13275} GNN500z+HV               =       G1N503j +      GNO2                                   :  0.100E+01*SUN;
+{ 13276} GNN500z+HV               =       GND4005 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 13277} GNN500z+HV               =       G2D3000 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 13278} G2N503O +GNO                =       G1N503k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13279} G2N503O +GNO                =       GNN502T                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13280} G2N503O +GHO2               =       GHN504O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13281} G2N503O +GNO3               =       G1N503k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13282} G2N503O +MEPERO             =  0.340G1N503k + 0.330GNN5013 + 0.330GNN502Y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13283} G2N503O +PERO1              =  0.460G1N503k + 0.270GNN5013 + 0.270GNN502Y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13284} G2N503O +PERO2              =  0.400G1N503k + 0.300GNN5013 + 0.300GNN502Y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13285} G2N503O +PERO3              =  0.460G1N503k + 0.270GNN5013 + 0.270GNN502Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13286} G2N503O +PERO5              =  0.460G1N503k + 0.270GNN5013 + 0.270GNN502Y                 : ARR( 0.183E-11,   450., 0.0);
+{ 13287} G2N503O +PERO6              =  0.300G1N503k + 0.350GNN5013 + 0.350GNN502Y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13288} G2N503O +PERO9              =  0.650G1N503k + 0.350GNN502Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 13289} G3N500P +GHO2               =  0.800GGN500c + 0.200GAN500T + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13290} G3N500P +GNO                =       GND4005 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13291} G3N500P +GNO2               =       GPN500T                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13292} G3N500P +GNO3               =       GND4005 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13293} G3N500P +MEPERO             =  0.685GND4005 + 0.315GAN500T + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13294} G3N500P +PERO1              =  0.800GND4005 + 0.200GAN500T + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13295} G3N500P +PERO2              =  0.750GND4005 + 0.250GAN500T + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13296} G3N500P +PERO3              =  0.800GND4005 + 0.200GAN500T + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13297} G3N500P +PERO5              =  0.650GND4005 + 0.350GAN500T + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13298} G3N500P +PERO6              =  0.650GND4005 + 0.350GAN500T + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13299} G3N500P +PERO9              =       GND4005 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13300} G1N503i                     =       G202000 +      GND3005                                : ARR( 0.200E+15,  6631., 0.0);
+{ 13301} G1N503i                     =       GD03000 +      GDD2000 +      GNO2                    : ARR( 0.200E+15,  6201., 0.0);
+{ 13302} G1N503j                     =       G2N503P                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13303} G1N503j                     =       GND4005 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 13304} G1N503k                     =       GD02000 +      GND3005 +      GNO2                    : ARR( 0.200E+15,  6112., 0.0);
+{ 13305} G2N503P +GNO                =       G1N503l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13306} G2N503P +GNO                =       GNN5019                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13307} G2N503P +GHO2               =       GHN5046                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13308} G2N503P +GNO3               =       G1N503l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13309} G2N503P +MEPERO             =  0.480G1N503l + 0.260GND500Y + 0.260GND500a                 : ARR( 0.146E-12,  -445., 0.0);
+{ 13310} G2N503P +PERO1              =  0.600G1N503l + 0.200GND500Y + 0.200GND500a                 : ARR( 0.112E-12,  -500., 0.0);
+{ 13311} G2N503P +PERO2              =  0.560G1N503l + 0.220GND500Y + 0.220GND500a                 : ARR( 0.418E-13, -1000., 0.0);
+{ 13312} G2N503P +PERO3              =  0.600G1N503l + 0.200GND500Y + 0.200GND500a                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13313} G2N503P +PERO5              =  0.600G1N503l + 0.200GND500Y + 0.200GND500a                 : ARR( 0.473E-11,   850., 0.0);
+{ 13314} G2N503P +PERO6              =  0.460G1N503l + 0.270GND500Y + 0.270GND500a                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13315} G2N503P +PERO9              =  0.800G1N503l + 0.200GND500a                                : ARR( 0.100E-10,     0., 0.0);
+{ 13316} G1N503l                     =       GND500Z +      GHO2                                   : ARR( 0.800E+11,  2965., 0.0);
+{ 13317} GNN5011 +GHO                =       G2N503Q                                               : ARR( 0.171E-12,     0., 0.0);
+{ 13318} GNN5011 +GHO                =       GNN501v +      GHO2                                   : ARR( 0.171E-11,     0., 0.0);
+{ 13319} GNN5011 +GHO                =       G1N502a                                               : ARR( 0.214E-17,    85., 2.0);
+{ 13320} GNN5011+HV               =       G1N503m +      GNO2                                   :  0.100E+01*SUN;
+{ 13321} GNN5011+HV               =       G1N503n +      GNO2                                   :  0.100E+01*SUN;
+{ 13322} GNN5011+HV               =       G1N501B +      GNO2                                   :  0.100E+01*SUN;
+{ 13323} G2N503Q +GNO                =       G1N503o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13324} G2N503Q +GNO                =       GNN501c                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13325} G2N503Q +GHO2               =       GHN504P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13326} G2N503Q +GNO3               =       G1N503o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13327} G2N503Q +MEPERO             =  0.480G1N503o + 0.260GNN5028 + 0.260GNN502a                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13328} G2N503Q +PERO1              =  0.600G1N503o + 0.200GNN5028 + 0.200GNN502a                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13329} G2N503Q +PERO2              =  0.560G1N503o + 0.220GNN5028 + 0.220GNN502a                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13330} G2N503Q +PERO3              =  0.600G1N503o + 0.200GNN5028 + 0.200GNN502a                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13331} G2N503Q +PERO5              =  0.600G1N503o + 0.200GNN5028 + 0.200GNN502a                 : ARR( 0.533E-11,   500., 0.0);
+{ 13332} G2N503Q +PERO6              =  0.460G1N503o + 0.270GNN5028 + 0.270GNN502a                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13333} G2N503Q +PERO9              =  0.800G1N503o + 0.200GNN502a                                : ARR( 0.100E-10,     0., 0.0);
+{ 13334} G1N503m                     =       GD02000 +      GNN3005 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{ 13335} G1N503n                     =       G2N503R                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13336} G1N503n                     =       GDO3001 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6232., 0.0);
+{ 13337} G1N503o                     =       GNN400D +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13338} G2N503R +GNO                =       G1N503p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13339} G2N503R +GNO                =       GNN502G                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13340} G2N503R +GHO2               =       GHN504Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13341} G2N503R +GNO3               =       G1N503p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13342} G2N503R +MEPERO             =  0.480G1N503p + 0.260GNN501B + 0.260GNN502H                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13343} G2N503R +PERO1              =  0.600G1N503p + 0.200GNN501B + 0.200GNN502H                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13344} G2N503R +PERO2              =  0.560G1N503p + 0.220GNN501B + 0.220GNN502H                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13345} G2N503R +PERO3              =  0.600G1N503p + 0.200GNN501B + 0.200GNN502H                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13346} G2N503R +PERO5              =  0.600G1N503p + 0.200GNN501B + 0.200GNN502H                 : ARR( 0.533E-11,   500., 0.0);
+{ 13347} G2N503R +PERO6              =  0.460G1N503p + 0.270GNN501B + 0.270GNN502H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13348} G2N503R +PERO9              =  0.800G1N503p + 0.200GNN502H                                : ARR( 0.100E-10,     0., 0.0);
+{ 13349} G1N503p                     =       GNN400F +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13350} GHN501X +GHO                =       GHN504J +      GHO2                                   : ARR( 0.175E-11,     0., 0.0);
+{ 13351} GHN501X +GHO                =       GNN5013 +      GHO                                    : ARR( 0.335E-11,     0., 0.0);
+{ 13352} GHN501X +GHO                =       G2N501A                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 13353} GHN501X+HV               =       G1H502z +      GNO2                                   :  0.100E+01*SUN;
+{ 13354} GHN501X+HV               =       G1H5031 +      GNO2                                   :  0.100E+01*SUN;
+{ 13355} GHN501X+HV               =       G1N501B +      GHO                                    :  0.100E+01*SUN;
+{ 13356} G1H502z                     =       GD02000 +      GHN300A +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{ 13357} G1H5031                     =       G2H501f                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13358} G1H5031                     =       GDO3001 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{ 13359} G2H501f +GNO                =       G1H5032 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13360} G2H501f +GNO                =       GHN504Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13361} G2H501f +GHO2               =       GHH501c                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13362} G2H501f +GNO3               =       G1H5032 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13363} G2H501f +MEPERO             =  0.480G1H5032 + 0.260GHN504R + 0.260GHN503z                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13364} G2H501f +PERO1              =  0.600G1H5032 + 0.200GHN504R + 0.200GHN503z                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13365} G2H501f +PERO2              =  0.560G1H5032 + 0.220GHN504R + 0.220GHN503z                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13366} G2H501f +PERO3              =  0.600G1H5032 + 0.200GHN504R + 0.200GHN503z                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13367} G2H501f +PERO5              =  0.600G1H5032 + 0.200GHN504R + 0.200GHN503z                 : ARR( 0.533E-11,   500., 0.0);
+{ 13368} G2H501f +PERO6              =  0.460G1H5032 + 0.270GHN504R + 0.270GHN503z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13369} G2H501f +PERO9              =  0.800G1H5032 + 0.200GHN503z                                : ARR( 0.100E-10,     0., 0.0);
+{ 13370} G1H5032                     =       GHN504S +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{ 13371} G1H5032                     =       GHN400Y +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13372} GNN5012 +GHO                =       G2N503S                                               : ARR( 0.188E-12,     0., 0.0);
+{ 13373} GNN5012 +GHO                =       GNN5015 +      GHO2                                   : ARR( 0.188E-11,     0., 0.0);
+{ 13374} GNN5012 +GHO                =       GNN5013 +      GHO2                                   : ARR( 0.904E-12,     0., 0.0);
+{ 13375} GNN5012+HV               =       G1N503q +      GNO2                                   :  0.100E+01*SUN;
+{ 13376} GNN5012+HV               =       G1N503r +      GNO2                                   :  0.100E+01*SUN;
+{ 13377} G2N503S +GNO                =       G1N503s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13378} G2N503S +GNO                =       GNN501a                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13379} G2N503S +GHO2               =       GHN504T                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13380} G2N503S +GNO3               =       G1N503s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13381} G2N503S +MEPERO             =  0.480G1N503s + 0.260GNN502B + 0.260GNN502b                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13382} G2N503S +PERO1              =  0.600G1N503s + 0.200GNN502B + 0.200GNN502b                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13383} G2N503S +PERO2              =  0.560G1N503s + 0.220GNN502B + 0.220GNN502b                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13384} G2N503S +PERO3              =  0.600G1N503s + 0.200GNN502B + 0.200GNN502b                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13385} G2N503S +PERO5              =  0.600G1N503s + 0.200GNN502B + 0.200GNN502b                 : ARR( 0.533E-11,   500., 0.0);
+{ 13386} G2N503S +PERO6              =  0.460G1N503s + 0.270GNN502B + 0.270GNN502b                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13387} G2N503S +PERO9              =  0.800G1N503s + 0.200GNN502b                                : ARR( 0.100E-10,     0., 0.0);
+{ 13388} G1N503q                     =       GD02000 +      GND3004 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{ 13389} G1N503r                     =       G2N503T                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13390} G1N503r                     =       GDO3001 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{ 13391} G1N503r                     =       GND4007 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 13392} G1N503s                     =       GNN400E +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13393} G2N503T +GNO                =       G1N503t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13394} G2N503T +GNO                =       GNN501B                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13395} G2N503T +GHO2               =       GHN504R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13396} G2N503T +GNO3               =       G1N503t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13397} G2N503T +MEPERO             =  0.480G1N503t + 0.260GNO500c + 0.260GND500T                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13398} G2N503T +PERO1              =  0.600G1N503t + 0.200GNO500c + 0.200GND500T                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13399} G2N503T +PERO2              =  0.560G1N503t + 0.220GNO500c + 0.220GND500T                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13400} G2N503T +PERO3              =  0.600G1N503t + 0.200GNO500c + 0.200GND500T                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13401} G2N503T +PERO5              =  0.600G1N503t + 0.200GNO500c + 0.200GND500T                 : ARR( 0.533E-11,   500., 0.0);
+{ 13402} G2N503T +PERO6              =  0.460G1N503t + 0.270GNO500c + 0.270GND500T                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13403} G2N503T +PERO9              =  0.800G1N503t + 0.200GND500T                                : ARR( 0.100E-10,     0., 0.0);
+{ 13404} G1N503t                     =       GNK5017 +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{ 13405} G1N503t                     =       GND400A +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13406} GNN5013 +GHO                =       GNN502Y +      GHO2                                   : ARR( 0.177E-11,     0., 0.0);
+{ 13407} GNN5013 +GHO                =       G3N500Q                                               : ARR( 0.440E-11,     0., 0.0);
+{ 13408} GNN5013 +GNO3               =       G3N500Q +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13409} GNN5013+HV               =       G1N503u +      GNO2                                   :  0.100E+01*SUN;
+{ 13410} GNN5013+HV               =       G1N503v +      GNO2                                   :  0.100E+01*SUN;
+{ 13411} GNN5013+HV               =       GND4007 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 13412} GNN5013+HV               =       GNK3000 +      GND2000                                :  0.100E+01*SUN;
+{ 13413} G3N500Q +GHO2               =  0.800GGN500f + 0.200GAN500m + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13414} G3N500Q +GNO                =       GND4007 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13415} G3N500Q +GNO2               =       GPN500n                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13416} G3N500Q +GNO3               =       GND4007 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13417} G3N500Q +MEPERO             =  0.685GND4007 + 0.315GAN500m + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13418} G3N500Q +PERO1              =  0.800GND4007 + 0.200GAN500m + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13419} G3N500Q +PERO2              =  0.750GND4007 + 0.250GAN500m + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13420} G3N500Q +PERO3              =  0.800GND4007 + 0.200GAN500m + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13421} G3N500Q +PERO5              =  0.650GND4007 + 0.350GAN500m + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13422} G3N500Q +PERO6              =  0.650GND4007 + 0.350GAN500m + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13423} G3N500Q +PERO9              =       GND4007 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13424} G1N503u                     =       GD02000 +      GND3005 +      GHO2                    : ARR( 0.200E+15,  3132., 0.0);
+{ 13425} G1N503v                     =       G2N503U                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13426} G1N503v                     =       GND4007 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 13427} G2N503U +GNO                =       G1N503w +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13428} G2N503U +GNO                =       GNN502H                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13429} G2N503U +GHO2               =       GHN503z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13430} G2N503U +GNO3               =       G1N503w +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13431} G2N503U +MEPERO             =  0.480G1N503w + 0.260GND500T + 0.260GND500s                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13432} G2N503U +PERO1              =  0.600G1N503w + 0.200GND500T + 0.200GND500s                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13433} G2N503U +PERO2              =  0.560G1N503w + 0.220GND500T + 0.220GND500s                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13434} G2N503U +PERO3              =  0.600G1N503w + 0.200GND500T + 0.200GND500s                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13435} G2N503U +PERO5              =  0.600G1N503w + 0.200GND500T + 0.200GND500s                 : ARR( 0.533E-11,   500., 0.0);
+{ 13436} G2N503U +PERO6              =  0.460G1N503w + 0.270GND500T + 0.270GND500s                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13437} G2N503U +PERO9              =  0.800G1N503w + 0.200GND500s                                : ARR( 0.100E-10,     0., 0.0);
+{ 13438} G1N503w                     =       GND5012 +      GHO2                                   : ARR( 0.800E+11,  2965., 0.0);
+{ 13439} G1N503w                     =       GND400J +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13440} GNN5014 +GHO                =       GNN502T +      GHO2                                   : ARR( 0.873E-12,     0., 0.0);
+{ 13441} GNN5014 +GHO                =       G1N503W                                               : ARR( 0.228E-17,    85., 2.0);
+{ 13442} GNN5014+HV               =       G1N501C +      GNO2                                   :  0.100E+01*SUN;
+{ 13443} GNN5014+HV               =       G1N503x +      GNO2                                   :  0.100E+01*SUN;
+{ 13444} GNN5014+HV               =       G1N501S +      GNO2                                   :  0.100E+01*SUN;
+{ 13445} G1N503x                     =       GD02000 +      GND3004 +      GNO2                    : ARR( 0.200E+15,  6710., 0.0);
+{ 13446} G1N503x                     =       GND3001 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6323., 0.0);
+{ 13447} GHN501Y +GHO                =       GNN5015 +      GHO                                    : ARR( 0.692E-11,     0., 0.0);
+{ 13448} GHN501Y +GHO                =       GHN504O +      GHO2                                   : ARR( 0.830E-12,     0., 0.0);
+{ 13449} GHN501Y +GHO                =       G2N501B                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 13450} GHN501Y+HV               =       G1N501C +      GHO                                    :  0.100E+01*SUN;
+{ 13451} GHN501Y+HV               =       G1H5033 +      GNO2                                   :  0.100E+01*SUN;
+{ 13452} GHN501Y+HV               =       G1H5034 +      GNO2                                   :  0.100E+01*SUN;
+{ 13453} G1H5033                     =       GD02000 +      GND3004 +      GHO                     : ARR( 0.200E+15,  5171., 0.0);
+{ 13454} G1H5033                     =       GHD3002 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6323., 0.0);
+{ 13455} G1H5034                     =       G2H501g                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 13456} G1H5034                     =       GHD3002 +      GDO2000 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{ 13457} G1H5034                     =       GHN400p +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 13458} G2H501g +GNO                =       G1H5035 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13459} G2H501g +GNO                =       GHN503d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13460} G2H501g +GHO2               =       GHH501d                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13461} G2H501g +GNO3               =       G1H5035 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13462} G2H501g +MEPERO             =  0.480G1H5035 + 0.260GHN5035 + 0.260GHN5037                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13463} G2H501g +PERO1              =  0.600G1H5035 + 0.200GHN5035 + 0.200GHN5037                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13464} G2H501g +PERO2              =  0.560G1H5035 + 0.220GHN5035 + 0.220GHN5037                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13465} G2H501g +PERO3              =  0.600G1H5035 + 0.200GHN5035 + 0.200GHN5037                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13466} G2H501g +PERO5              =  0.600G1H5035 + 0.200GHN5035 + 0.200GHN5037                 : ARR( 0.533E-11,   500., 0.0);
+{ 13467} G2H501g +PERO6              =  0.460G1H5035 + 0.270GHN5035 + 0.270GHN5037                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13468} G2H501g +PERO9              =  0.800G1H5035 + 0.200GHN5037                                : ARR( 0.100E-10,     0., 0.0);
+{ 13469} G1H5035                     =       GHN5036 +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{ 13470} G1H5035                     =       GND400A +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 13471} GNN5015 +GHO                =       G2N503W                                               : ARR( 0.106E-12,     0., 0.0);
+{ 13472} GNN5015 +GHO                =       GNN502Y +      GHO2                                   : ARR( 0.833E-12,     0., 0.0);
+{ 13473} GNN5015 +GHO                =       G1N503a                                               : ARR( 0.218E-17,    85., 2.0);
+{ 13474} GNN5015+HV               =       G3K2000 +      GND3004 +      GNO2                    :  0.100E+01*SUN;
+{ 13475} GNN5015+HV               =       GNK3000 +      GND2000                                :  0.100E+01*SUN;
+{ 13476} GNN5015+HV               =       G1N501J +      GNO2                                   :  0.100E+01*SUN;
+{ 13477} GNN5015+HV               =       G1N501T +      GNO2                                   :  0.100E+01*SUN;
+{ 13478} G2N503W +GNO                =       G1N503y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13479} G2N503W +GNO                =       GNN501b                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13480} G2N503W +GHO2               =       GHN504U                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13481} G2N503W +GNO3               =       G1N503y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13482} G2N503W +MEPERO             =  0.480G1N503y + 0.260GNN502C + 0.260GNN502c                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13483} G2N503W +PERO1              =  0.600G1N503y + 0.200GNN502C + 0.200GNN502c                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13484} G2N503W +PERO2              =  0.560G1N503y + 0.220GNN502C + 0.220GNN502c                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13485} G2N503W +PERO3              =  0.600G1N503y + 0.200GNN502C + 0.200GNN502c                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13486} G2N503W +PERO5              =  0.600G1N503y + 0.200GNN502C + 0.200GNN502c                 : ARR( 0.533E-11,   500., 0.0);
+{ 13487} G2N503W +PERO6              =  0.460G1N503y + 0.270GNN502C + 0.270GNN502c                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13488} G2N503W +PERO9              =  0.800G1N503y + 0.200GNN502c                                : ARR( 0.100E-10,     0., 0.0);
+{ 13489} G1N503y                     =       G3N400B +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{ 13490} G3N400B +GHO2               =  0.800GGN400H + 0.200GAN400I + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13491} G3N400B +GNO                =       GND3004 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13492} G3N400B +GNO2               =       GPN400J                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13493} G3N400B +GNO3               =       GND3004 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13494} G3N400B +MEPERO             =  0.685GND3004 + 0.315GAN400I + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13495} G3N400B +PERO1              =  0.800GND3004 + 0.200GAN400I + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13496} G3N400B +PERO2              =  0.750GND3004 + 0.250GAN400I + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13497} G3N400B +PERO3              =  0.800GND3004 + 0.200GAN400I + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13498} G3N400B +PERO5              =  0.650GND3004 + 0.350GAN400I + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13499} G3N400B +PERO6              =  0.650GND3004 + 0.350GAN400I + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13500} G3N400B +PERO9              =       GND3004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13501} GND3004 +GHO                =       GND3005 +      GHO2                                   : ARR( 0.839E-12,     0., 0.0);
+{ 13502} GND3004 +GHO                =       G3N3004                                               : ARR( 0.433E-11,     0., 0.0);
+{ 13503} GND3004 +GNO3               =       G3N3004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13504} GND3004+HV               =       G1D3004 +      GNO2                                   :  0.100E+01*SUN;
+{ 13505} GND3004+HV               =       GDO2000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 13506} G1D3004                     =       GCH2O   +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  6768., 0.0);
+{ 13507} G1D3004                     =       GDO2000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5751., 0.0);
+{ 13508} GHH500O +GHO                =       GHN501c +      GHO                                    : ARR( 0.829E-11,     0., 0.0);
+{ 13509} GHH500O +GHO                =       GHN501S +      GHO                                    : ARR( 0.337E-10,     0., 0.0);
+{ 13510} GHH500O +GHO                =       G2H501h                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 13511} GHH500O +GHO                =       G2H500Q                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 13512} GHH500O+HV               =       G1H5036 +      GNO2                                   :  0.100E+01*SUN;
+{ 13513} GHH500O+HV               =       G1H502u +      GHO                                    :  0.100E+01*SUN;
+{ 13514} GHH500O+HV               =       G1H500X +      GHO                                    :  0.100E+01*SUN;
+{ 13515} G2H501h +GNO                =       G1H502u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13516} G2H501h +GNO                =       GHN501U                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13517} G2H501h +GHO2               =       GHH500O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13518} G2H501h +GNO3               =       G1H502u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13519} G2H501h +MEPERO             =  0.340G1H502u + 0.330GHN501a + 0.330GHN501c                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13520} G2H501h +PERO1              =  0.460G1H502u + 0.270GHN501a + 0.270GHN501c                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13521} G2H501h +PERO2              =  0.400G1H502u + 0.300GHN501a + 0.300GHN501c                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13522} G2H501h +PERO3              =  0.460G1H502u + 0.270GHN501a + 0.270GHN501c                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13523} G2H501h +PERO5              =  0.460G1H502u + 0.270GHN501a + 0.270GHN501c                 : ARR( 0.183E-11,   450., 0.0);
+{ 13524} G2H501h +PERO6              =  0.300G1H502u + 0.350GHN501a + 0.350GHN501c                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13525} G2H501h +PERO9              =  0.650G1H502u + 0.350GHN501c                                : ARR( 0.100E-10,     0., 0.0);
+{ 13526} G1H5036                     =       GHD3002 +      GD02000 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{ 13527} GHN501Z +GHO                =       GNK500a +      GHO                                    : ARR( 0.842E-11,     0., 0.0);
+{ 13528} GHN501Z +GHO                =       GHN501S +      GHO2                                   : ARR( 0.856E-11,     0., 0.0);
+{ 13529} GHN501Z +GHO                =       G2N503X                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 13530} GHN501Z+HV               =       G1H5037 +      GNO2                                   :  0.100E+01*SUN;
+{ 13531} GHN501Z+HV               =       G1N503g +      GHO                                    :  0.100E+01*SUN;
+{ 13532} G2N503X +GNO                =       G1N503g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13533} G2N503X +GNO                =       GNN500y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13534} G2N503X +GHO2               =       GHN501Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13535} G2N503X +GNO3               =       G1N503g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13536} G2N503X +MEPERO             =  0.340G1N503g + 0.330GNO500S + 0.330GNK500a                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13537} G2N503X +PERO1              =  0.460G1N503g + 0.270GNO500S + 0.270GNK500a                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13538} G2N503X +PERO2              =  0.400G1N503g + 0.300GNO500S + 0.300GNK500a                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13539} G2N503X +PERO3              =  0.460G1N503g + 0.270GNO500S + 0.270GNK500a                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13540} G2N503X +PERO5              =  0.460G1N503g + 0.270GNO500S + 0.270GNK500a                 : ARR( 0.183E-11,   450., 0.0);
+{ 13541} G2N503X +PERO6              =  0.300G1N503g + 0.350GNO500S + 0.350GNK500a                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13542} G2N503X +PERO9              =  0.650G1N503g + 0.350GNK500a                                : ARR( 0.100E-10,     0., 0.0);
+{ 13543} G1H5037                     =       GDO3001 +      GD02000 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{ 13544} GHN501a +GHO                =       GHN501c +      GHO2                                   : ARR( 0.208E-11,     0., 0.0);
+{ 13545} GHN501a +GHO                =       GNK500Y +      GHO                                    : ARR( 0.339E-10,     0., 0.0);
+{ 13546} GHN501a +GHO                =       G2N501C                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 13547} GHN501a+HV               =       G1H5038 +      GNO2                                   :  0.100E+01*SUN;
+{ 13548} GHN501a+HV               =       G1N501D +      GHO                                    :  0.100E+01*SUN;
+{ 13549} G1H5038                     =       GHD3002 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{ 13550} GNO500S +GHO                =       GNK500Y +      GHO2                                   : ARR( 0.884E-11,     0., 0.0);
+{ 13551} GNO500S +GHO                =       GNK500a +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{ 13552} GNO500S+HV               =       G1O500O +      GNO2                                   :  0.100E+01*SUN;
+{ 13553} GHN501b +GHO                =       GND500M +      GHO                                    : ARR( 0.519E-10,     0., 0.0);
+{ 13554} GHN501b +GHO                =       G2N501D                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 13555} GHN501b+HV               =       G1H5039 +      GNO2                                   :  0.100E+01*SUN;
+{ 13556} GHN501b+HV               =       G3N3001 +      G2H2000                                :  0.100E+01*SUN;
+{ 13557} GHN501b+HV               =       G1N501E +      GHO                                    :  0.100E+01*SUN;
+{ 13558} G1H5039                     =       GD02000 +      G3H3000                                : ARR( 0.200E+15,  2750., 0.0);
+{ 13559} GND500M +GHO                =       G3N500R                                               : ARR( 0.665E-10,     0., 0.0);
+{ 13560} GND500M +GNO3               =       G3N500R +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13561} GND500M+HV               =       G1D500a +      GNO2                                   :  0.100E+01*SUN;
+{ 13562} GND500M+HV               =       G3N3001 +      G2D2000                                :  0.100E+01*SUN;
+{ 13563} GND500M+HV               =       G2N400b +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 13564} G3N500R +GHO2               =  0.800GGN500U + 0.200GAN500d + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13565} G3N500R +GNO                =       G2N400b +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13566} G3N500R +GNO2               =       GPN500f                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13567} G3N500R +GNO3               =       G2N400b +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13568} G3N500R +MEPERO             =  0.685G2N400b + 0.315GAN500d + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13569} G3N500R +PERO1              =  0.800G2N400b + 0.200GAN500d + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13570} G3N500R +PERO2              =  0.750G2N400b + 0.250GAN500d + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13571} G3N500R +PERO3              =  0.800G2N400b + 0.200GAN500d + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13572} G3N500R +PERO5              =  0.650G2N400b + 0.350GAN500d + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13573} G3N500R +PERO6              =  0.650G2N400b + 0.350GAN500d + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13574} G3N500R +PERO9              =       G2N400b +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 13575} G1D500a                     =       GD02000 +      G3D3000                                : ARR( 0.200E+15,  2726., 0.0);
+{ 13576} G2N400b +GNO                =       G1N400d +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13577} G2N400b +GNO                =       GNN400Q                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13578} G2N400b +GHO2               =       GHN400q                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13579} G2N400b +GNO3               =       G1N400d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13580} G2N400b +MEPERO             =  0.480G1N400d + 0.260GNK400B + 0.260GND400I                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13581} G2N400b +PERO1              =  0.600G1N400d + 0.200GNK400B + 0.200GND400I                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13582} G2N400b +PERO2              =  0.560G1N400d + 0.220GNK400B + 0.220GND400I                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13583} G2N400b +PERO3              =  0.600G1N400d + 0.200GNK400B + 0.200GND400I                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13584} G2N400b +PERO5              =  0.600G1N400d + 0.200GNK400B + 0.200GND400I                 : ARR( 0.533E-11,   500., 0.0);
+{ 13585} G2N400b +PERO6              =  0.460G1N400d + 0.270GNK400B + 0.270GND400I                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13586} G2N400b +PERO9              =  0.800G1N400d + 0.200GND400I                                : ARR( 0.100E-10,     0., 0.0);
+{ 13587} G1N400d                     =       G3N3001 +      GCH2O                                  : ARR( 0.200E+15,  3640., 0.0);
+{ 13588} GHN501c +GHO                =       GNK500Z +      GHO                                    : ARR( 0.210E-10,     0., 0.0);
+{ 13589} GHN501c +GHO                =       G2N501E                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 13590} GHN501c+HV               =       G1H503A +      GNO2                                   :  0.100E+01*SUN;
+{ 13591} GHN501c+HV               =       G3N3001 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{ 13592} GHN501c+HV               =       G1N501F +      GHO                                    :  0.100E+01*SUN;
+{ 13593} G1H503A                     =       G3H3001 +      GD02000                                : ARR( 0.200E+15,  2777., 0.0);
+{ 13594} GNK500a +GHO                =       G2N503Y                                               : ARR( 0.553E-12,     0., 0.0);
+{ 13595} GNK500a +GHO                =       GNK500Z +      GHO2                                   : ARR( 0.532E-11,     0., 0.0);
+{ 13596} GNK500a+HV               =       G3K3002 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{ 13597} GNK500a+HV               =       G1K500H +      GNO2                                   :  0.100E+01*SUN;
+{ 13598} G2N503Y +GNO                =       G1N503z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13599} G2N503Y +GNO                =       GNN501j                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13600} G2N503Y +GHO2               =       GHN504W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13601} G2N503Y +GNO3               =       G1N503z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13602} G2N503Y +MEPERO             =  0.480G1N503z + 0.260GNK500i + 0.260GND5013                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13603} G2N503Y +PERO1              =  0.600G1N503z + 0.200GNK500i + 0.200GND5013                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13604} G2N503Y +PERO2              =  0.560G1N503z + 0.220GNK500i + 0.220GND5013                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13605} G2N503Y +PERO3              =  0.600G1N503z + 0.200GNK500i + 0.200GND5013                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13606} G2N503Y +PERO5              =  0.600G1N503z + 0.200GNK500i + 0.200GND5013                 : ARR( 0.533E-11,   500., 0.0);
+{ 13607} G2N503Y +PERO6              =  0.460G1N503z + 0.270GNK500i + 0.270GND5013                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13608} G2N503Y +PERO9              =  0.800G1N503z + 0.200GND5013                                : ARR( 0.100E-10,     0., 0.0);
+{ 13609} G1N503z                     =       GND400I +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 13610} GGN3001 +GHO                =       G3N3001                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 13611} GGN3001+HV               =       G1G3001 +      GNO2                                   :  0.100E+01*SUN;
+{ 13612} GGN3001+HV               =       GD02000 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 13613} GAN3001 +GHO                =       G2A3004                                               : ARR( 0.335E-13,     0., 0.0);
+{ 13614} GAN3001 +GHO                =       GAK3000 +      GNO2                                   : ARR( 0.432E-13,     0., 0.0);
+{ 13615} GAN3001 +GHO                =       GD02000 +      GNO2    +      GCO2                    : ARR( 0.520E-12,     0., 0.0);
+{ 13616} GAN3001+HV               =       G1A3001 +      GNO2                                   :  0.100E+01*SUN;
+{ 13617} GPN3001                     =       G3N3001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 13618} GPN3001 +GHO                =       G2P3004                                               : ARR( 0.335E-13,     0., 0.0);
+{ 13619} GPN3001 +GHO                =       GPK3000 +      GNO2                                   : ARR( 0.584E-13,     0., 0.0);
+{ 13620} GPN3001+HV               =       G1P3001 +      GNO2                                   :  0.100E+01*SUN;
+{ 13621} GPN3001+HV               =       G3N3001 +      GNO2                                   :  0.100E+01*SUN;
+{ 13622} GHH500P +GHO                =       GHD5007 +      GHO                                    : ARR( 0.331E-10,     0., 0.0);
+{ 13623} GHH500P +GHO                =       GHH501S +      GHO2                                   : ARR( 0.212E-10,     0., 0.0);
+{ 13624} GHH500P +GHO                =       G2H500R                                               : ARR( 0.391E-11,  -190., 0.0);
+{ 13625} GHH500P+HV               =       G1H500Z +      GHO                                    :  0.200E+01*SUN;
+{ 13626} GGN5005 +GHO                =       GGN500b +      GHO2                                   : ARR( 0.884E-11,     0., 0.0);
+{ 13627} GGN5005 +GHO                =       G3N5004                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 13628} GGN5005+HV               =       G1G5004 +      GNO2                                   :  0.100E+01*SUN;
+{ 13629} GGN5005+HV               =       GDO4001 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 13630} GAN5005 +GHO                =       GAN500j +      GHO2                                   : ARR( 0.898E-11,     0., 0.0);
+{ 13631} GAN5005 +GHO                =       GDO4001 +      GNO2    +      GCO2                    : ARR( 0.558E-12,     0., 0.0);
+{ 13632} GAN5005+HV               =       G1A5004 +      GNO2                                   :  0.100E+01*SUN;
+{ 13633} GPN5005                     =       G3N5004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 13634} GPN5005 +GHO                =       GPN500l +      GHO2                                   : ARR( 0.904E-11,     0., 0.0);
+{ 13635} GPN5005+HV               =       G1P5004 +      GNO2                                   :  0.100E+01*SUN;
+{ 13636} GPN5005+HV               =       G3N5004 +      GNO2                                   :  0.100E+01*SUN;
+{ 13637} GDD4001 +GHO                =       G3D4001                                               : ARR( 0.217E-10,     0., 0.0);
+{ 13638} GDD4001 +GHO                =       GDD4002 +      GHO2                                   : ARR( 0.209E-10,     0., 0.0);
+{ 13639} GDD4001 +GHO                =       G3D4002                                               : ARR( 0.217E-10,     0., 0.0);
+{ 13640} GDD4001 +GNO3               =       G3D4001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13641} GDD4001 +GNO3               =       G3D4002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13642} GDD4001+HV               =       GCO     +      G2D3003 +      GHO2                    :  0.100E+01*SUN;
+{ 13643} GDD4001+HV               =       GDD3000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 13644} G3D4001 +GHO2               =  0.800GGD4001 + 0.200GAD4001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13645} G3D4001 +GNO                =       G2D3003 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13646} G3D4001 +GNO2               =       GPD4001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13647} G3D4001 +GNO3               =       G2D3003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13648} G3D4001 +MEPERO             =  0.685G2D3003 + 0.315GAD4001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13649} G3D4001 +PERO1              =  0.800G2D3003 + 0.200GAD4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13650} G3D4001 +PERO2              =  0.750G2D3003 + 0.250GAD4001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13651} G3D4001 +PERO3              =  0.800G2D3003 + 0.200GAD4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13652} G3D4001 +PERO5              =  0.650G2D3003 + 0.350GAD4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13653} G3D4001 +PERO6              =  0.650G2D3003 + 0.350GAD4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 13654} G3D4001 +PERO9              =       G2D3003 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 13655} G3D4002 +GHO2               =  0.800GGD4002 + 0.200GAD4002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13656} G3D4002 +GNO                =       GDD3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13657} G3D4002 +GNO2               =       GPD4002                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13658} G3D4002 +GNO3               =       GDD3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13659} G3D4002 +MEPERO             =  0.685GDD3000 + 0.315GAD4002 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13660} G3D4002 +PERO1              =  0.800GDD3000 + 0.200GAD4002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13661} G3D4002 +PERO2              =  0.750GDD3000 + 0.250GAD4002 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13662} G3D4002 +PERO3              =  0.800GDD3000 + 0.200GAD4002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13663} G3D4002 +PERO5              =  0.650GDD3000 + 0.350GAD4002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13664} G3D4002 +PERO6              =  0.650GDD3000 + 0.350GAD4002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13665} G3D4002 +PERO9              =       GDD3000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13666} G2D3003 +GNO                =       G1D3003 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 13667} G2D3003 +GNO                =       GND3002                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 13668} G2D3003 +GHO2               =       GHD3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 13669} G2D3003 +GNO3               =       G1D3003 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13670} G2D3003 +MEPERO             =  0.480G1D3003 + 0.260GDO3002 + 0.260GDD3001                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13671} G2D3003 +PERO1              =  0.600G1D3003 + 0.200GDO3002 + 0.200GDD3001                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13672} G2D3003 +PERO2              =  0.560G1D3003 + 0.220GDO3002 + 0.220GDD3001                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13673} G2D3003 +PERO3              =  0.600G1D3003 + 0.200GDO3002 + 0.200GDD3001                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13674} G2D3003 +PERO5              =  0.600G1D3003 + 0.200GDO3002 + 0.200GDD3001                 : ARR( 0.533E-11,   500., 0.0);
+{ 13675} G2D3003 +PERO6              =  0.460G1D3003 + 0.270GDO3002 + 0.270GDD3001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13676} G2D3003 +PERO9              =  0.800G1D3003 + 0.200GDD3001                                : ARR( 0.100E-10,     0., 0.0);
+{ 13677} GND500N +GHO                =       GND5014 +      GHO2                                   : ARR( 0.845E-12,     0., 0.0);
+{ 13678} GND500N +GHO                =       G3N4003 +      GCO                                    : ARR( 0.133E-10,     0., 0.0);
+{ 13679} GND500N +GNO3               =       G3N4003 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 13680} GND500N+HV               =       G1D500J +      GNO2                                   :  0.100E+01*SUN;
+{ 13681} GND500N+HV               =       G3N4003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 13682} GND500N+HV               =       GND4002 +      GCO                                    :  0.100E+01*SUN;
+{ 13683} GND500N+HV               =       GNO3001 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 13684} GHN501d +GHO                =       GNK500c +      GHO                                    : ARR( 0.535E-11,     0., 0.0);
+{ 13685} GHN501d +GHO                =       GHN504X +      GHO2                                   : ARR( 0.857E-12,     0., 0.0);
+{ 13686} GHN501d +GHO                =       G2N501H                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 13687} GHN501d+HV               =       G3K2000 +      GND3004 +      GHO                     :  0.100E+01*SUN;
+{ 13688} GHN501d+HV               =       G1N501J +      GHO                                    :  0.100E+01*SUN;
+{ 13689} GHN501d+HV               =       G1H500f +      GNO2                                   :  0.100E+01*SUN;
+{ 13690} GNK500b +GHO                =       GNK500c +      GHO2                                   : ARR( 0.145E-11,     0., 0.0);
+{ 13691} GNK500b +GHO                =       GKK500C +      GNO2                                   : ARR( 0.432E-12,     0., 0.0);
+{ 13692} GNK500b +GHO                =       GND5015 +      GHO2                                   : ARR( 0.931E-12,     0., 0.0);
+{ 13693} GNK500b+HV               =       G3K2000 +      GND3004 +      GHO2                    :  0.100E+01*SUN;
+{ 13694} GNK500b+HV               =       G1K500Q +      GNO2                                   :  0.100E+01*SUN;
+{ 13695} GNK500c +GHO                =       G2N503Z                                               : ARR( 0.102E-12,     0., 0.0);
+{ 13696} GNK500c +GHO                =       GKK500B +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{ 13697} GNK500c +GHO                =       GND5011 +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{ 13698} GNK500c +GHO                =       G1N503d                                               : ARR( 0.210E-17,    85., 2.0);
+{ 13699} GNK500c+HV               =       G3K2000 +      G3N3004                                :  0.100E+01*SUN;
+{ 13700} GNK500c+HV               =       G1K500P +      GNO2                                   :  0.100E+01*SUN;
+{ 13701} G2N503Z +GNO                =       G1N5041 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13702} G2N503Z +GNO                =       GNN501s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13703} G2N503Z +GHO2               =       GHN504Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13704} G2N503Z +GNO3               =       G1N5041 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13705} G2N503Z +MEPERO             =  0.480G1N5041 + 0.260GNK5016 + 0.260GND5016                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13706} G2N503Z +PERO1              =  0.600G1N5041 + 0.200GNK5016 + 0.200GND5016                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13707} G2N503Z +PERO2              =  0.560G1N5041 + 0.220GNK5016 + 0.220GND5016                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13708} G2N503Z +PERO3              =  0.600G1N5041 + 0.200GNK5016 + 0.200GND5016                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13709} G2N503Z +PERO5              =  0.600G1N5041 + 0.200GNK5016 + 0.200GND5016                 : ARR( 0.533E-11,   500., 0.0);
+{ 13710} G2N503Z +PERO6              =  0.460G1N5041 + 0.270GNK5016 + 0.270GND5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13711} G2N503Z +PERO9              =  0.800G1N5041 + 0.200GND5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 13712} G1N5041                     =       G3N3004 +      GCH2O   +      GCO                     : ARR( 0.200E+15,  3897., 0.0);
+{ 13713} GHN3009 +GHO                =       GHN300A +      GHO2                                   : ARR( 0.831E-12,     0., 0.0);
+{ 13714} GHN3009 +GHO                =       GND3004 +      GHO                                    : ARR( 0.333E-11,     0., 0.0);
+{ 13715} GHN3009 +GHO                =       G2N3008                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 13716} GHN3009+HV               =       G1H3006 +      GNO2                                   :  0.100E+01*SUN;
+{ 13717} GHN3009+HV               =       G1N3008 +      GHO                                    :  0.100E+01*SUN;
+{ 13718} GNO3004 +GHO                =       GND3004 +      GHO2                                   : ARR( 0.161E-11,     0., 0.0);
+{ 13719} GNO3004 +GHO                =       GKO3001 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 13720} GNO3004 +GHO                =       G1N3008                                               : ARR( 0.420E-17,    85., 2.0);
+{ 13721} GNO3004+HV               =       G1O3004 +      GNO2                                   :  0.100E+01*SUN;
+{ 13722} GGN4003 +GHO                =       GGN400I +      GHO2                                   : ARR( 0.883E-12,     0., 0.0);
+{ 13723} GGN4003 +GHO                =       G3N4003                                               : ARR( 0.209E-11,  -190., 0.0);
+{ 13724} GGN4003+HV               =       G1G4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 13725} GGN4003+HV               =       G2N3008 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 13726} GAN4003 +GHO                =       GAN400J +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{ 13727} GAN4003 +GHO                =       GAK4003 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 13728} GAN4003 +GHO                =       G2A400A                                               : ARR( 0.128E-12,     0., 0.0);
+{ 13729} GAN4003 +GHO                =       G1A400B                                               : ARR( 0.210E-17,    85., 2.0);
+{ 13730} GAN4003 +GHO                =       G2N3008 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 13731} GAN4003+HV               =       G1A4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 13732} G2A400A +GNO                =       G1A400C +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13733} G2A400A +GNO                =       GAN400I                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13734} G2A400A +GHO2               =       GAH400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13735} G2A400A +GNO3               =       G1A400C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13736} G2A400A +MEPERO             =  0.340G1A400C + 0.330GAN400K + 0.330GAN400L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13737} G2A400A +PERO1              =  0.460G1A400C + 0.270GAN400K + 0.270GAN400L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13738} G2A400A +PERO2              =  0.400G1A400C + 0.300GAN400K + 0.300GAN400L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13739} G2A400A +PERO3              =  0.460G1A400C + 0.270GAN400K + 0.270GAN400L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13740} G2A400A +PERO5              =  0.460G1A400C + 0.270GAN400K + 0.270GAN400L                 : ARR( 0.183E-11,   450., 0.0);
+{ 13741} G2A400A +PERO6              =  0.300G1A400C + 0.350GAN400K + 0.350GAN400L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13742} G2A400A +PERO9              =  0.650G1A400C + 0.350GAN400L                                : ARR( 0.100E-10,     0., 0.0);
+{ 13743} G1A400B +OXYGEN             =       GAN400J +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 13744} G1A400B                     =       GAD3000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{ 13745} G1A400C                     =       GND3004 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 13746} GPN4003                     =       G3N4003 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 13747} GPN4003 +GHO                =       GPN400H +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{ 13748} GPN4003 +GHO                =       GPK4003 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 13749} GPN4003 +GHO                =       G2P400B                                               : ARR( 0.172E-12,     0., 0.0);
+{ 13750} GPN4003 +GHO                =       G1P400A                                               : ARR( 0.210E-17,    85., 2.0);
+{ 13751} GPN4003+HV               =       G1P4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 13752} GPN4003+HV               =       G3N4003 +      GNO2                                   :  0.100E+01*SUN;
+{ 13753} G2P400B +GNO                =       G1P400C +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 13754} G2P400B +GNO                =       GPN400J                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 13755} G2P400B +GHO2               =       GPH400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 13756} G2P400B +GNO3               =       G1P400C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13757} G2P400B +MEPERO             =  0.340G1P400C + 0.330GPN400K + 0.330GPN400L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 13758} G2P400B +PERO1              =  0.460G1P400C + 0.270GPN400K + 0.270GPN400L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 13759} G2P400B +PERO2              =  0.400G1P400C + 0.300GPN400K + 0.300GPN400L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 13760} G2P400B +PERO3              =  0.460G1P400C + 0.270GPN400K + 0.270GPN400L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13761} G2P400B +PERO5              =  0.460G1P400C + 0.270GPN400K + 0.270GPN400L                 : ARR( 0.183E-11,   450., 0.0);
+{ 13762} G2P400B +PERO6              =  0.300G1P400C + 0.350GPN400K + 0.350GPN400L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 13763} G2P400B +PERO9              =  0.650G1P400C + 0.350GPN400L                                : ARR( 0.100E-10,     0., 0.0);
+{ 13764} G1P400C                     =       GND3004 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 13765} GNO500T +GHO                =       G2N501K                                               : ARR( 0.345E-12,     0., 0.0);
+{ 13766} GNO500T +GHO                =       GNK500d +      GHO2                                   : ARR( 0.345E-11,     0., 0.0);
+{ 13767} GNO500T +GHO                =       G1N501L                                               : ARR( 0.432E-17,    85., 2.0);
+{ 13768} GNO500T+HV               =       G1O500N +      GNO2                                   :  0.100E+01*SUN;
+{ 13769} GHO500M +GHO                =       GHK500P +      GHO2                                   : ARR( 0.169E-10,     0., 0.0);
+{ 13770} GHO500M +GHO                =       GKO500G +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 13771} GHO500M +GHO                =       G2O500M                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 13772} GHO500M+HV               =       G1O500N +      GHO                                    :  0.100E+01*SUN;
+{ 13773} GOO500B +GHO                =       GKO500H +      GHO2                                   : ARR( 0.172E-10,     0., 0.0);
+{ 13774} GOO500B +GHO                =       GKO500G +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 13775} GKO500G +GHO                =       G2K500d                                               : ARR( 0.109E-11,     0., 0.0);
+{ 13776} GKO500G +GHO                =       GKK5007 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 13777} GKO500G+HV               =       G3K3002 +      GD02000 +      GHO2                    :  0.100E+01*SUN;
+{ 13778} G2K500d +GNO                =       G1K500m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13779} G2K500d +GNO                =       GNK500f                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13780} G2K500d +GHO2               =       GHK500n                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13781} G2K500d +GNO3               =       G1K500m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13782} G2K500d +MEPERO             =  0.480G1K500m + 0.260GKO500I + 0.260GDK500B                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13783} G2K500d +PERO1              =  0.600G1K500m + 0.200GKO500I + 0.200GDK500B                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13784} G2K500d +PERO2              =  0.560G1K500m + 0.220GKO500I + 0.220GDK500B                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13785} G2K500d +PERO3              =  0.600G1K500m + 0.200GKO500I + 0.200GDK500B                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13786} G2K500d +PERO5              =  0.600G1K500m + 0.200GKO500I + 0.200GDK500B                 : ARR( 0.533E-11,   500., 0.0);
+{ 13787} G2K500d +PERO6              =  0.460G1K500m + 0.270GKO500I + 0.270GDK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13788} G2K500d +PERO9              =  0.800G1K500m + 0.200GDK500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 13789} G1K500m                     =       GDK4004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 13790} GHN501e +GHO                =       GHN501k +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 13791} GHN501e +GHO                =       GND500O +      GHO                                    : ARR( 0.166E-10,     0., 0.0);
+{ 13792} GHN501e +GHO                =       G2N501I                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 13793} GHN501e+HV               =       G1H503B +      GNO2                                   :  0.100E+01*SUN;
+{ 13794} GHN501e+HV               =       G1N501K +      GHO                                    :  0.100E+01*SUN;
+{ 13795} G1H503B                     =       GD03000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{ 13796} GND500O +GHO                =       GND500R +      GHO2                                   : ARR( 0.131E-11,     0., 0.0);
+{ 13797} GND500O +GHO                =       G3N500S                                               : ARR( 0.216E-10,     0., 0.0);
+{ 13798} GND500O +GNO3               =       G3N500S +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13799} GND500O+HV               =       G1D500U +      GNO2                                   :  0.100E+01*SUN;
+{ 13800} GND500O+HV               =       GND4005 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 13801} G3N500S +GHO2               =  0.800GGN500d + 0.200GAN500U + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13802} G3N500S +GNO                =       GND4005 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13803} G3N500S +GNO2               =       GPN500U                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13804} G3N500S +GNO3               =       GND4005 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13805} G3N500S +MEPERO             =  0.685GND4005 + 0.315GAN500U + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13806} G3N500S +PERO1              =  0.800GND4005 + 0.200GAN500U + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13807} G3N500S +PERO2              =  0.750GND4005 + 0.250GAN500U + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13808} G3N500S +PERO3              =  0.800GND4005 + 0.200GAN500U + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13809} G3N500S +PERO5              =  0.650GND4005 + 0.350GAN500U + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13810} G3N500S +PERO6              =  0.650GND4005 + 0.350GAN500U + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13811} G3N500S +PERO9              =       GND4005 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13812} GHN501f +GHO                =       GHN501j +      GHO2                                   : ARR( 0.176E-11,     0., 0.0);
+{ 13813} GHN501f +GHO                =       GNK500d +      GHO                                    : ARR( 0.703E-11,     0., 0.0);
+{ 13814} GHN501f +GHO                =       G2N501J                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 13815} GHN501f+HV               =       G1H503C +      GNO2                                   :  0.100E+01*SUN;
+{ 13816} GHN501f+HV               =       G1N501L +      GHO                                    :  0.100E+01*SUN;
+{ 13817} G1H503C                     =       GHD3002 +      GD02000 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{ 13818} GNK500d +GHO                =       G2N503a                                               : ARR( 0.182E-12,     0., 0.0);
+{ 13819} GNK500d +GHO                =       GNK500g +      GHO2                                   : ARR( 0.182E-11,     0., 0.0);
+{ 13820} GNK500d +GHO                =       G1N501P                                               : ARR( 0.228E-17,    85., 2.0);
+{ 13821} GNK500d+HV               =       G1K500n +      GNO2                                   :  0.100E+01*SUN;
+{ 13822} GNK500d+HV               =       G3N400C +      GCH3O2                                 :  0.100E+01*SUN;
+{ 13823} GNK500d+HV               =       GD02000 +      GNK3000                                :  0.100E+01*SUN;
+{ 13824} G2N503a +GNO                =       G1N5042 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13825} G2N503a +GNO                =       GNN501w                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13826} G2N503a +GHO2               =       GHN504Z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13827} G2N503a +GNO3               =       G1N5042 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13828} G2N503a +MEPERO             =  0.480G1N5042 + 0.260GNK500e + 0.260GND5017                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13829} G2N503a +PERO1              =  0.600G1N5042 + 0.200GNK500e + 0.200GND5017                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13830} G2N503a +PERO2              =  0.560G1N5042 + 0.220GNK500e + 0.220GND5017                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13831} G2N503a +PERO3              =  0.600G1N5042 + 0.200GNK500e + 0.200GND5017                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13832} G2N503a +PERO5              =  0.600G1N5042 + 0.200GNK500e + 0.200GND5017                 : ARR( 0.533E-11,   500., 0.0);
+{ 13833} G2N503a +PERO6              =  0.460G1N5042 + 0.270GNK500e + 0.270GND5017                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13834} G2N503a +PERO9              =  0.800G1N5042 + 0.200GND5017                                : ARR( 0.100E-10,     0., 0.0);
+{ 13835} G1K500n                     =       GDO3001 +      G3K2000                                : ARR( 0.200E+15,  2923., 0.0);
+{ 13836} G3N400C +GHO2               =  0.800GGN4005 + 0.200GAN4005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13837} G3N400C +GNO                =       GDO3001 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 13838} G3N400C +GNO2               =       GPN4005                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13839} G3N400C +GNO3               =       GDO3001 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 13840} G3N400C +MEPERO             =  0.685GDO3001 + 0.315GAN4005 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13841} G3N400C +PERO1              =  0.800GDO3001 + 0.200GAN4005 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13842} G3N400C +PERO2              =  0.750GDO3001 + 0.250GAN4005 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13843} G3N400C +PERO3              =  0.800GDO3001 + 0.200GAN4005 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13844} G3N400C +PERO5              =  0.650GDO3001 + 0.350GAN4005 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13845} G3N400C +PERO6              =  0.650GDO3001 + 0.350GAN4005 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13846} G3N400C +PERO9              =       GDO3001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13847} G1N5042                     =       GND4008 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{ 13848} GNN5016 +GHO                =       G2N503R                                               : ARR( 0.178E-12,     0., 0.0);
+{ 13849} GNN5016 +GHO                =       GNN501w +      GHO2                                   : ARR( 0.178E-11,     0., 0.0);
+{ 13850} GNN5016 +GHO                =       GNN5027 +      GHO2                                   : ARR( 0.439E-12,     0., 0.0);
+{ 13851} GNN5016 +GHO                =       G1N502b                                               : ARR( 0.224E-17,    85., 2.0);
+{ 13852} GNN5016 +GHO                =       G1N503n                                               : ARR( 0.224E-17,    85., 2.0);
+{ 13853} GNN5016+HV               =       G1N501N +      GNO2                                   :  0.100E+01*SUN;
+{ 13854} GNN5016+HV               =       G1N501M +      GNO2                                   :  0.100E+01*SUN;
+{ 13855} GHN501g +GHO                =       GHN504Z +      GHO2                                   : ARR( 0.172E-11,     0., 0.0);
+{ 13856} GHN501g +GHO                =       GHN504a +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{ 13857} GHN501g +GHO                =       GND500P +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{ 13858} GHN501g +GHO                =       G2N501K                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 13859} GHN501g+HV               =       G1H503D +      GNO2                                   :  0.100E+01*SUN;
+{ 13860} GHN501g+HV               =       G1N501M +      GHO                                    :  0.100E+01*SUN;
+{ 13861} G1H503D                     =       GD02000 +      GHD3005 +      GHO2                    : ARR( 0.200E+15,  3962., 0.0);
+{ 13862} G1H503D                     =       GDO3001 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{ 13863} GNO500U +GHO                =       GNK500e +      GHO2                                   : ARR( 0.183E-11,     0., 0.0);
+{ 13864} GNO500U +GHO                =       GNK5013 +      GHO2                                   : ARR( 0.225E-11,     0., 0.0);
+{ 13865} GNO500U +GHO                =       GND500P +      GHO2                                   : ARR( 0.439E-11,     0., 0.0);
+{ 13866} GNO500U+HV               =       G1O500P +      GNO2                                   :  0.100E+01*SUN;
+{ 13867} GND500P +GHO                =       GND5017 +      GHO2                                   : ARR( 0.173E-11,     0., 0.0);
+{ 13868} GND500P +GHO                =       GND500v +      GHO2                                   : ARR( 0.130E-11,     0., 0.0);
+{ 13869} GND500P +GHO                =       G3N500T                                               : ARR( 0.215E-10,     0., 0.0);
+{ 13870} GND500P +GNO3               =       G3N500T +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13871} GND500P+HV               =       G1D500A +      GNO2                                   :  0.100E+01*SUN;
+{ 13872} GND500P+HV               =       GND4007 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 13873} G3N500T +GHO2               =  0.800GGN500g + 0.200GAN500n + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13874} G3N500T +GNO                =       GND4007 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13875} G3N500T +GNO2               =       GPN500o                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13876} G3N500T +GNO3               =       GND4007 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13877} G3N500T +MEPERO             =  0.685GND4007 + 0.315GAN500n + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13878} G3N500T +PERO1              =  0.800GND4007 + 0.200GAN500n + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13879} G3N500T +PERO2              =  0.750GND4007 + 0.250GAN500n + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13880} G3N500T +PERO3              =  0.800GND4007 + 0.200GAN500n + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13881} G3N500T +PERO5              =  0.650GND4007 + 0.350GAN500n + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13882} G3N500T +PERO6              =  0.650GND4007 + 0.350GAN500n + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13883} G3N500T +PERO9              =       GND4007 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13884} GNK500e +GHO                =       GNK500h +      GHO2                                   : ARR( 0.221E-11,     0., 0.0);
+{ 13885} GNK500e +GHO                =       GND5017 +      GHO2                                   : ARR( 0.432E-11,     0., 0.0);
+{ 13886} GNK500e+HV               =       G3K2000 +      GDO3002 +      GNO2                    :  0.100E+01*SUN;
+{ 13887} GNK500e+HV               =       GNK3000 +      GDO2000                                :  0.100E+01*SUN;
+{ 13888} GNK500e+HV               =       G1K500o +      GNO2                                   :  0.100E+01*SUN;
+{ 13889} G1K500o                     =       G3K2000 +      GDO3002                                : ARR( 0.200E+15,  2923., 0.0);
+{ 13890} GND4007 +GHO                =       GND4008 +      GHO2                                   : ARR( 0.178E-11,     0., 0.0);
+{ 13891} GND4007 +GHO                =       G3N400C                                               : ARR( 0.443E-11,     0., 0.0);
+{ 13892} GND4007 +GNO3               =       G3N400C +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13893} GND4007+HV               =       G1D400C +      GNO2                                   :  0.100E+01*SUN;
+{ 13894} GND4007+HV               =       GDO3001 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 13895} GND4007+HV               =       GD02000 +      GND2000                                :  0.100E+01*SUN;
+{ 13896} G1D400C                     =       GD02000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  5435., 0.0);
+{ 13897} G1D400C                     =       GDO3001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 13898} GHO500N +GHO                =       GHK500Q +      GHO2                                   : ARR( 0.847E-11,     0., 0.0);
+{ 13899} GHO500N +GHO                =       GHK500L +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 13900} GHO500N +GHO                =       GKO500H +      GHO                                    : ARR( 0.339E-10,     0., 0.0);
+{ 13901} GHO500N +GHO                =       G2O500N                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 13902} GHO500N+HV               =       G1O500O +      GHO                                    :  0.100E+01*SUN;
+{ 13903} GKO500H +GHO                =       GKK5008 +      GHO2                                   : ARR( 0.270E-10,     0., 0.0);
+{ 13904} GKO500H +GHO                =       GKK5007 +      GHO2                                   : ARR( 0.639E-11,     0., 0.0);
+{ 13905} GKO500H+HV               =       G3K4008 +      GCH3O2                                 :  0.100E+01*SUN;
+{ 13906} G3K4008 +GHO2               =  0.800GGO4003 + 0.200GAO4003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13907} G3K4008 +GNO                =       GDO3001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13908} G3K4008 +GNO2               =       GPO4003                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13909} G3K4008 +GNO3               =       GDO3001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13910} G3K4008 +MEPERO             =  0.685GDO3001 + 0.315GAO4003 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13911} G3K4008 +PERO1              =  0.800GDO3001 + 0.200GAO4003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13912} G3K4008 +PERO2              =  0.750GDO3001 + 0.250GAO4003 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13913} G3K4008 +PERO3              =  0.800GDO3001 + 0.200GAO4003 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13914} G3K4008 +PERO5              =  0.650GDO3001 + 0.350GAO4003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13915} G3K4008 +PERO6              =  0.650GDO3001 + 0.350GAO4003 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13916} G3K4008 +PERO9              =       GDO3001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13917} GHK500K +GHO                =       GHK500T +      GHO2                                   : ARR( 0.642E-11,     0., 0.0);
+{ 13918} GHK500K +GHO                =       GDK5009 +      GHO                                    : ARR( 0.521E-10,     0., 0.0);
+{ 13919} GHK500K +GHO                =       G2K500F                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 13920} GHK500K+HV               =       G3K3000 +      GHD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 13921} GHK500K+HV               =       G1K500G +      GHO                                    :  0.100E+01*SUN;
+{ 13922} GDK5009 +GHO                =       GDK500E +      GHO2                                   : ARR( 0.391E-11,     0., 0.0);
+{ 13923} GDK5009 +GHO                =       G3K500G                                               : ARR( 0.672E-10,     0., 0.0);
+{ 13924} GDK5009 +GNO3               =       G3K500G +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 13925} GDK5009+HV               =       G3K3000 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 13926} GDK5009+HV               =       GDK4002 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 13927} G3K500G +GHO2               =  0.800GGK500E + 0.200GAK500C + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 13928} G3K500G +GNO                =       GDK4002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 13929} G3K500G +GNO2               =       GPK500E                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 13930} G3K500G +GNO3               =       GDK4002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 13931} G3K500G +MEPERO             =  0.685GDK4002 + 0.315GAK500C + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13932} G3K500G +PERO1              =  0.800GDK4002 + 0.200GAK500C + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13933} G3K500G +PERO2              =  0.750GDK4002 + 0.250GAK500C + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13934} G3K500G +PERO3              =  0.800GDK4002 + 0.200GAK500C + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13935} G3K500G +PERO5              =  0.650GDK4002 + 0.350GAK500C + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13936} G3K500G +PERO6              =  0.650GDK4002 + 0.350GAK500C + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 13937} G3K500G +PERO9              =       GDK4002 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 13938} GHK500L +GHO                =       GHK500S +      GHO2                                   : ARR( 0.532E-11,     0., 0.0);
+{ 13939} GHK500L +GHO                =       GKK5007 +      GHO                                    : ARR( 0.213E-10,     0., 0.0);
+{ 13940} GHK500L +GHO                =       G2K500G                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 13941} GHK500L+HV               =       G3K3002 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{ 13942} GHK500L+HV               =       G1K500H +      GHO                                    :  0.100E+01*SUN;
+{ 13943} GKK5007 +GHO                =       G2K500e                                               : ARR( 0.554E-12,     0., 0.0);
+{ 13944} GKK5007 +GHO                =       GKK5009 +      GHO2                                   : ARR( 0.533E-11,     0., 0.0);
+{ 13945} GKK5007+HV               =       G3K3002 +      G3K2000                                :  0.100E+01*SUN;
+{ 13946} G2K500e +GNO                =       G1K500p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13947} G2K500e +GNO                =       GNK500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13948} G2K500e +GHO2               =       GHK500o                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13949} G2K500e +GNO3               =       G1K500p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13950} G2K500e +MEPERO             =  0.480G1K500p + 0.260GKK500A + 0.260GDK500R                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13951} G2K500e +PERO1              =  0.600G1K500p + 0.200GKK500A + 0.200GDK500R                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13952} G2K500e +PERO2              =  0.560G1K500p + 0.220GKK500A + 0.220GDK500R                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13953} G2K500e +PERO3              =  0.600G1K500p + 0.200GKK500A + 0.200GDK500R                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13954} G2K500e +PERO5              =  0.600G1K500p + 0.200GKK500A + 0.200GDK500R                 : ARR( 0.533E-11,   500., 0.0);
+{ 13955} G2K500e +PERO6              =  0.460G1K500p + 0.270GKK500A + 0.270GDK500R                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13956} G2K500e +PERO9              =  0.800G1K500p + 0.200GDK500R                                : ARR( 0.100E-10,     0., 0.0);
+{ 13957} G1K500p                     =       GDK4008 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4155., 0.0);
+{ 13958} GHK500M +GHO                =       GHK500R +      GHO2                                   : ARR( 0.524E-11,     0., 0.0);
+{ 13959} GHK500M +GHO                =       GDK5003 +      GHO                                    : ARR( 0.523E-10,     0., 0.0);
+{ 13960} GHK500M +GHO                =       G2K500H                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 13961} GHK500M+HV               =       G3K3002 +      G2H2000                                :  0.100E+01*SUN;
+{ 13962} GHK500M+HV               =       G1K500I +      GHO                                    :  0.100E+01*SUN;
+{ 13963} GGO3001 +GHO                =       GGK3000 +      GHO2                                   : ARR( 0.529E-11,     0., 0.0);
+{ 13964} GGO3001 +GHO                =       G3K3002                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 13965} GGO3001+HV               =       GD02000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 13966} GAO3001 +GHO                =       GAK3000 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 13967} GAO3001 +GHO                =       GD02000 +      GHO2    +      GCO2                    : ARR( 0.557E-12,     0., 0.0);
+{ 13968} GPO3001                     =       G3K3002 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 13969} GPO3001 +GHO                =       GPK3000 +      GHO2                                   : ARR( 0.542E-11,     0., 0.0);
+{ 13970} GPO3001+HV               =       G3K3002 +      GNO2                                   :  0.100E+01*SUN;
+{ 13971} GHN501h +GHO                =       GHN502q +      GHO2                                   : ARR( 0.878E-11,     0., 0.0);
+{ 13972} GHN501h +GHO                =       GNK500f +      GHO                                    : ARR( 0.432E-10,     0., 0.0);
+{ 13973} GHN501h +GHO                =       G2N501L                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 13974} GHN501h+HV               =       G1N501N +      GHO                                    :  0.100E+01*SUN;
+{ 13975} GHN501h+HV               =       G1H503E +      GNO2                                   :  0.100E+01*SUN;
+{ 13976} G1H503E                     =       GHK500X +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{ 13977} G1H503E                     =       GHD4008 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13978} GNO500W +GHO                =       GNK500p +      GHO2                                   : ARR( 0.863E-11,     0., 0.0);
+{ 13979} GNO500W +GHO                =       GNK500f +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 13980} GNO500W +GHO                =       GNK500x +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 13981} GNO500W+HV               =       G1O500a +      GNO2                                   :  0.100E+01*SUN;
+{ 13982} G1O500a                     =       GKO500K +      GHO2                                   : ARR( 0.800E+11,  2117., 0.0);
+{ 13983} G1O500a                     =       GDO4005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 13984} GNK500f +GHO                =       G2N503b                                               : ARR( 0.564E-12,     0., 0.0);
+{ 13985} GNK500f +GHO                =       GNK500r +      GHO2                                   : ARR( 0.542E-11,     0., 0.0);
+{ 13986} GNK500f +GHO                =       GNK500w +      GHO2                                   : ARR( 0.133E-11,     0., 0.0);
+{ 13987} GNK500f+HV               =       G3K3002 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{ 13988} GNK500f+HV               =       G1K500m +      GNO2                                   :  0.100E+01*SUN;
+{ 13989} G2N503b +GNO                =       G1N5043 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 13990} G2N503b +GNO                =       GNN502R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 13991} G2N503b +GHO2               =       GHN504b                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 13992} G2N503b +GNO3               =       G1N5043 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 13993} G2N503b +MEPERO             =  0.480G1N5043 + 0.260GNK500l + 0.260GND500q                 : ARR( 0.164E-12,  -795., 0.0);
+{ 13994} G2N503b +PERO1              =  0.600G1N5043 + 0.200GNK500l + 0.200GND500q                 : ARR( 0.126E-12,  -850., 0.0);
+{ 13995} G2N503b +PERO2              =  0.560G1N5043 + 0.220GNK500l + 0.220GND500q                 : ARR( 0.471E-13, -1350., 0.0);
+{ 13996} G2N503b +PERO3              =  0.600G1N5043 + 0.200GNK500l + 0.200GND500q                 : ARR( 0.142E-12, -1200., 0.0);
+{ 13997} G2N503b +PERO5              =  0.600G1N5043 + 0.200GNK500l + 0.200GND500q                 : ARR( 0.533E-11,   500., 0.0);
+{ 13998} G2N503b +PERO6              =  0.460G1N5043 + 0.270GNK500l + 0.270GND500q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 13999} G2N503b +PERO9              =  0.800G1N5043 + 0.200GND500q                                : ARR( 0.100E-10,     0., 0.0);
+{ 14000} G1N5043                     =       GND400G +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 14001} GHK500N +GHO                =       GHK500D +      GHO2                                   : ARR( 0.334E-10,     0., 0.0);
+{ 14002} GHK500N +GHO                =       GDK500A +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 14003} GHK500N +GHO                =       G2K500f                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 14004} GHK500N+HV               =       G3K2000 +      G2H3009                                :  0.100E+01*SUN;
+{ 14005} GHK500N+HV               =       GK03000 +      GHD2000                                :  0.100E+01*SUN;
+{ 14006} GHK500N+HV               =       G1K500X +      GHO                                    :  0.100E+01*SUN;
+{ 14007} G2K500f +GNO                =       G1K500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14008} G2K500f +GNO                =       GNK500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14009} G2K500f +GHO2               =       GHK500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14010} G2K500f +GNO3               =       G1K500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14011} G2K500f +MEPERO             =  0.480G1K500X + 0.260GKO5006 + 0.260GDK500A                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14012} G2K500f +PERO1              =  0.600G1K500X + 0.200GKO5006 + 0.200GDK500A                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14013} G2K500f +PERO2              =  0.560G1K500X + 0.220GKO5006 + 0.220GDK500A                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14014} G2K500f +PERO3              =  0.600G1K500X + 0.200GKO5006 + 0.200GDK500A                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14015} G2K500f +PERO5              =  0.600G1K500X + 0.200GKO5006 + 0.200GDK500A                 : ARR( 0.533E-11,   500., 0.0);
+{ 14016} G2K500f +PERO6              =  0.460G1K500X + 0.270GKO5006 + 0.270GDK500A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14017} G2K500f +PERO9              =  0.800G1K500X + 0.200GDK500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 14018} GHO500O +GHO                =       GHK500X +      GHO2                                   : ARR( 0.845E-11,     0., 0.0);
+{ 14019} GHO500O +GHO                =       GKO500I +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 14020} GHO500O +GHO                =       GHK500k +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 14021} GHO500O +GHO                =       GHD500E +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 14022} GHO500O +GHO                =       G2O500O                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 14023} GHO500O+HV               =       G1O500P +      GHO                                    :  0.100E+01*SUN;
+{ 14024} GOO500C +GHO                =       GKO500K +      GHO2                                   : ARR( 0.856E-11,     0., 0.0);
+{ 14025} GOO500C +GHO                =       GKO500I +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 14026} GOO500C +GHO                =       GKO500J +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 14027} GOO500C +GHO                =       GDO5009 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{ 14028} GKO500I +GHO                =       GKK500A +      GHO2                                   : ARR( 0.531E-11,     0., 0.0);
+{ 14029} GKO500I +GHO                =       GKK500D +      GHO2                                   : ARR( 0.653E-11,     0., 0.0);
+{ 14030} GKO500I +GHO                =       GDK500B +      GHO2                                   : ARR( 0.133E-10,     0., 0.0);
+{ 14031} GKO500I+HV               =       G3K3002 +      GDO2000 +      GHO2                    :  0.100E+01*SUN;
+{ 14032} GDO3002 +GHO                =       GDD3001 +      GHO2                                   : ARR( 0.128E-10,     0., 0.0);
+{ 14033} GDO3002 +GHO                =       GDK3001 +      GHO2                                   : ARR( 0.633E-11,     0., 0.0);
+{ 14034} GDO3002 +GHO                =       G3K3003                                               : ARR( 0.209E-10,     0., 0.0);
+{ 14035} GDO3002 +GNO3               =       G3K3003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14036} GDO3002+HV               =       GDO2000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 14037} GDK500A +GHO                =       G2D500R                                               : ARR( 0.275E-11,     0., 0.0);
+{ 14038} GDK500A +GHO                =       GDK500C +      GHO2                                   : ARR( 0.200E-10,     0., 0.0);
+{ 14039} GDK500A +GHO                =       G3K500H                                               : ARR( 0.209E-10,     0., 0.0);
+{ 14040} GDK500A +GNO3               =       G3K500H +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14041} GDK500A+HV               =       G3K2000 +      G2D3003                                :  0.100E+01*SUN;
+{ 14042} GDK500A+HV               =       GDK4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 14043} G2D500R +GNO                =       G1D500b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14044} G2D500R +GNO                =       GND5017                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14045} G2D500R +GHO2               =       GHD500u                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14046} G2D500R +GNO3               =       G1D500b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14047} G2D500R +MEPERO             =  0.340G1D500b + 0.330GDK500S + 0.330GDK500R                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14048} G2D500R +PERO1              =  0.460G1D500b + 0.270GDK500S + 0.270GDK500R                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14049} G2D500R +PERO2              =  0.400G1D500b + 0.300GDK500S + 0.300GDK500R                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14050} G2D500R +PERO3              =  0.460G1D500b + 0.270GDK500S + 0.270GDK500R                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14051} G2D500R +PERO5              =  0.460G1D500b + 0.270GDK500S + 0.270GDK500R                 : ARR( 0.183E-11,   450., 0.0);
+{ 14052} G2D500R +PERO6              =  0.300G1D500b + 0.350GDK500S + 0.350GDK500R                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14053} G2D500R +PERO9              =  0.650G1D500b + 0.350GDK500R                                : ARR( 0.100E-10,     0., 0.0);
+{ 14054} G3K500H +GHO2               =  0.800GGK500I + 0.200GAK500G + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14055} G3K500H +GNO                =       GDK4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14056} G3K500H +GNO2               =       GPK500I                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14057} G3K500H +GNO3               =       GDK4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14058} G3K500H +MEPERO             =  0.685GDK4000 + 0.315GAK500G + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14059} G3K500H +PERO1              =  0.800GDK4000 + 0.200GAK500G + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14060} G3K500H +PERO2              =  0.750GDK4000 + 0.250GAK500G + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14061} G3K500H +PERO3              =  0.800GDK4000 + 0.200GAK500G + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14062} G3K500H +PERO5              =  0.650GDK4000 + 0.350GAK500G + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14063} G3K500H +PERO6              =  0.650GDK4000 + 0.350GAK500G + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14064} G3K500H +PERO9              =       GDK4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14065} G1D500b                     =       G3K2000 +      GDD3001                                : ARR( 0.200E+15,  2093., 0.0);
+{ 14066} GHD500E +GHO                =       GDK500B +      GHO                                    : ARR( 0.147E-09,     0., 0.0);
+{ 14067} GHD500E +GHO                =       G3H500K                                               : ARR( 0.233E-10,     0., 0.0);
+{ 14068} GHD500E +GNO3               =       G3H500K +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14069} GHD500E+HV               =       G1D500A +      GHO                                    :  0.100E+01*SUN;
+{ 14070} GHD500E+HV               =       GHD4008 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 14071} G3H500K +GHO2               =  0.800GGH500f + 0.200GAH500k + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14072} G3H500K +GNO                =       GHD4008 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14073} G3H500K +GNO2               =       GPH500k                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14074} G3H500K +GNO3               =       GHD4008 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14075} G3H500K +MEPERO             =  0.685GHD4008 + 0.315GAH500k + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14076} G3H500K +PERO1              =  0.800GHD4008 + 0.200GAH500k + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14077} G3H500K +PERO2              =  0.750GHD4008 + 0.250GAH500k + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14078} G3H500K +PERO3              =  0.800GHD4008 + 0.200GAH500k + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14079} G3H500K +PERO5              =  0.650GHD4008 + 0.350GAH500k + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14080} G3H500K +PERO6              =  0.650GHD4008 + 0.350GAH500k + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14081} G3H500K +PERO9              =       GHD4008 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14082} GDO5009 +GHO                =       GDK500S +      GHO2                                   : ARR( 0.845E-11,     0., 0.0);
+{ 14083} GDO5009 +GHO                =       GDK500B +      GHO2                                   : ARR( 0.330E-10,     0., 0.0);
+{ 14084} GDO5009 +GHO                =       GDK500T +      GHO2                                   : ARR( 0.634E-11,     0., 0.0);
+{ 14085} GDO5009 +GHO                =       G3K500I                                               : ARR( 0.210E-10,     0., 0.0);
+{ 14086} GDO5009 +GNO3               =       G3K500I +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14087} GDO5009+HV               =       GDO4005 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 14088} G3K500I +GHO2               =  0.800GGO500B + 0.200GAO500A + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14089} G3K500I +GNO                =       GDO4005 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14090} G3K500I +GNO2               =       GPO500B                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14091} G3K500I +GNO3               =       GDO4005 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14092} G3K500I +MEPERO             =  0.685GDO4005 + 0.315GAO500A + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14093} G3K500I +PERO1              =  0.800GDO4005 + 0.200GAO500A + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14094} G3K500I +PERO2              =  0.750GDO4005 + 0.250GAO500A + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14095} G3K500I +PERO3              =  0.800GDO4005 + 0.200GAO500A + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14096} G3K500I +PERO5              =  0.650GDO4005 + 0.350GAO500A + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14097} G3K500I +PERO6              =  0.650GDO4005 + 0.350GAO500A + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14098} G3K500I +PERO9              =       GDO4005 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14099} GDK500B +GHO                =       GDK500R +      GHO2                                   : ARR( 0.516E-11,     0., 0.0);
+{ 14100} GDK500B +GHO                =       GDK500U +      GHO2                                   : ARR( 0.387E-11,     0., 0.0);
+{ 14101} GDK500B +GHO                =       G3K500J                                               : ARR( 0.666E-10,     0., 0.0);
+{ 14102} GDK500B +GNO3               =       G3K500J +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14103} GDK500B+HV               =       G3K3002 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 14104} GDK500B+HV               =       GDK4004 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 14105} G3K500J +GHO2               =  0.800GGK500K + 0.200GAK500J + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14106} G3K500J +GNO                =       GDK4004 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14107} G3K500J +GNO2               =       GPK500K                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14108} G3K500J +GNO3               =       GDK4004 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14109} G3K500J +MEPERO             =  0.685GDK4004 + 0.315GAK500J + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14110} G3K500J +PERO1              =  0.800GDK4004 + 0.200GAK500J + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14111} G3K500J +PERO2              =  0.750GDK4004 + 0.250GAK500J + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14112} G3K500J +PERO3              =  0.800GDK4004 + 0.200GAK500J + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14113} G3K500J +PERO5              =  0.650GDK4004 + 0.350GAK500J + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14114} G3K500J +PERO6              =  0.650GDK4004 + 0.350GAK500J + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14115} G3K500J +PERO9              =       GDK4004 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14116} GGO5004 +GHO                =       GGK500I +      GHO2                                   : ARR( 0.857E-11,     0., 0.0);
+{ 14117} GGO5004 +GHO                =       G2G500W                                               : ARR( 0.145E-11,     0., 0.0);
+{ 14118} GGO5004 +GHO                =       GGK5004 +      GHO2                                   : ARR( 0.643E-11,     0., 0.0);
+{ 14119} GGO5004 +GHO                =       G3K5005                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 14120} GGO5004+HV               =       GDO4001 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 14121} G2G500W +GNO                =       G1G500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14122} G2G500W +GNO                =       GGN500g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14123} G2G500W +GHO2               =       GGH500f                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14124} G2G500W +GNO3               =       G1G500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14125} G2G500W +MEPERO             =  0.340G1G500X + 0.330GGO500B + 0.330GGK500K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14126} G2G500W +PERO1              =  0.460G1G500X + 0.270GGO500B + 0.270GGK500K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14127} G2G500W +PERO2              =  0.400G1G500X + 0.300GGO500B + 0.300GGK500K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14128} G2G500W +PERO3              =  0.460G1G500X + 0.270GGO500B + 0.270GGK500K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14129} G2G500W +PERO5              =  0.460G1G500X + 0.270GGO500B + 0.270GGK500K                 : ARR( 0.183E-11,   450., 0.0);
+{ 14130} G2G500W +PERO6              =  0.300G1G500X + 0.350GGO500B + 0.350GGK500K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14131} G2G500W +PERO9              =  0.650G1G500X + 0.350GGK500K                                : ARR( 0.100E-10,     0., 0.0);
+{ 14132} G1G500X                     =       GD02000 +      GGD3001 +      GHO2                    : ARR( 0.200E+15,  3132., 0.0);
+{ 14133} G1G500X                     =       GDO3001 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  3929., 0.0);
+{ 14134} GAO5004 +GHO                =       GAK500G +      GHO2                                   : ARR( 0.894E-11,     0., 0.0);
+{ 14135} GAO5004 +GHO                =       G2A500b                                               : ARR( 0.151E-11,     0., 0.0);
+{ 14136} GAO5004 +GHO                =       GAK5004 +      GHO2                                   : ARR( 0.496E-11,     0., 0.0);
+{ 14137} G2A500b +GNO                =       G1A500c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14138} G2A500b +GNO                =       GAN500n                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14139} G2A500b +GHO2               =       GAH500k                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14140} G2A500b +GNO3               =       G1A500c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14141} G2A500b +MEPERO             =  0.340G1A500c + 0.330GAO500A + 0.330GAK500J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14142} G2A500b +PERO1              =  0.460G1A500c + 0.270GAO500A + 0.270GAK500J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14143} G2A500b +PERO2              =  0.400G1A500c + 0.300GAO500A + 0.300GAK500J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14144} G2A500b +PERO3              =  0.460G1A500c + 0.270GAO500A + 0.270GAK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14145} G2A500b +PERO5              =  0.460G1A500c + 0.270GAO500A + 0.270GAK500J                 : ARR( 0.183E-11,   450., 0.0);
+{ 14146} G2A500b +PERO6              =  0.300G1A500c + 0.350GAO500A + 0.350GAK500J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14147} G2A500b +PERO9              =  0.650G1A500c + 0.350GAK500J                                : ARR( 0.100E-10,     0., 0.0);
+{ 14148} G1A500c                     =       GD02000 +      GAD3001 +      GHO2                    : ARR( 0.200E+15,  3132., 0.0);
+{ 14149} G1A500c                     =       GDO3001 +      GAD2000 +      GHO2                    : ARR( 0.200E+15,  3929., 0.0);
+{ 14150} GPO5004                     =       G3K5005 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14151} GPO5004 +GHO                =       GPK500I +      GHO2                                   : ARR( 0.861E-11,     0., 0.0);
+{ 14152} GPO5004 +GHO                =       G2P500c                                               : ARR( 0.145E-11,     0., 0.0);
+{ 14153} GPO5004 +GHO                =       GPK5004 +      GHO2                                   : ARR( 0.646E-11,     0., 0.0);
+{ 14154} GPO5004+HV               =       G3K5005 +      GNO2                                   :  0.100E+01*SUN;
+{ 14155} G2P500c +GNO                =       G1P500d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14156} G2P500c +GNO                =       GPN500o                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14157} G2P500c +GHO2               =       GPH500k                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14158} G2P500c +GNO3               =       G1P500d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14159} G2P500c +MEPERO             =  0.340G1P500d + 0.330GPO500B + 0.330GPK500K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14160} G2P500c +PERO1              =  0.460G1P500d + 0.270GPO500B + 0.270GPK500K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14161} G2P500c +PERO2              =  0.400G1P500d + 0.300GPO500B + 0.300GPK500K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14162} G2P500c +PERO3              =  0.460G1P500d + 0.270GPO500B + 0.270GPK500K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14163} G2P500c +PERO5              =  0.460G1P500d + 0.270GPO500B + 0.270GPK500K                 : ARR( 0.183E-11,   450., 0.0);
+{ 14164} G2P500c +PERO6              =  0.300G1P500d + 0.350GPO500B + 0.350GPK500K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14165} G2P500c +PERO9              =  0.650G1P500d + 0.350GPK500K                                : ARR( 0.100E-10,     0., 0.0);
+{ 14166} G1P500d                     =       GD02000 +      GPD3001 +      GHO2                    : ARR( 0.200E+15,  3132., 0.0);
+{ 14167} G1P500d                     =       GDO3001 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  3929., 0.0);
+{ 14168} GDD3001 +GHO                =       G3D3001                                               : ARR( 0.136E-09,     0., 0.0);
+{ 14169} GDD3001 +GNO3               =       G3D3001 +      GHNO3                                  : ARR( 0.240E-13,     0., 0.0);
+{ 14170} GDD3001+HV               =       GCO     +      GDD2000 + 2.000GHO2                    :  0.200E+01*SUN;
+{ 14171} G3D3001 +GHO2               =  0.800GGD3001 + 0.200GAD3001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14172} G3D3001 +GNO                =       GDD2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14173} G3D3001 +GNO2               =       GPD3001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14174} G3D3001 +GNO3               =       GDD2000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14175} G3D3001 +MEPERO             =  0.685GDD2000 + 0.315GAD3001 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14176} G3D3001 +PERO1              =  0.800GDD2000 + 0.200GAD3001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14177} G3D3001 +PERO2              =  0.750GDD2000 + 0.250GAD3001 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14178} G3D3001 +PERO3              =  0.800GDD2000 + 0.200GAD3001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14179} G3D3001 +PERO5              =  0.650GDD2000 + 0.350GAD3001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14180} G3D3001 +PERO6              =  0.650GDD2000 + 0.350GAD3001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14181} G3D3001 +PERO9              =       GDD2000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14182} GHO3003 +GHO                =       GHD3005 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 14183} GHO3003 +GHO                =       GHK3001 +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 14184} GHO3003 +GHO                =       GDO3002 +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{ 14185} GHO3003 +GHO                =       G2O3003                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 14186} GHO3003+HV               =       G1O3003 +      GHO                                    :  0.100E+01*SUN;
+{ 14187} GOO3002 +GHO                =       GDO3002 +      GHO2                                   : ARR( 0.823E-11,     0., 0.0);
+{ 14188} GOO3002 +GHO                =       GKO3001 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 14189} GDK500C +GHO                =       G3K4003 +      GCO                                    : ARR( 0.133E-10,     0., 0.0);
+{ 14190} GDK500C +GNO3               =       G3K4003 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 14191} GDK500C+HV               =       G3K2000 +      G2D3002                                :  0.100E+01*SUN;
+{ 14192} GDK500C+HV               =       G3K4003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 14193} GDK500C+HV               =       GDK4000 +      GCO                                    :  0.100E+01*SUN;
+{ 14194} GDK500C+HV               =       GK03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 14195} GNK500g +GHO                =       G2N503c                                               : ARR( 0.204E-12,     0., 0.0);
+{ 14196} GNK500g +GHO                =       GKK5009 +      GNO2                                   : ARR( 0.438E-13,     0., 0.0);
+{ 14197} GNK500g+HV               =       G3K2000 +      GDK3000 +      GNO2                    :  0.100E+01*SUN;
+{ 14198} GNK500g+HV               =       G1K500K +      GNO2                                   :  0.100E+01*SUN;
+{ 14199} GNK500g+HV               =       G3N400D +      GCH3O2                                 :  0.100E+01*SUN;
+{ 14200} G2N503c +GNO                =       G1N5044 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14201} G2N503c +GNO                =       GNN501x                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14202} G2N503c +GHO2               =       GHN504c                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14203} G2N503c +GNO3               =       G1N5044 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14204} G2N503c +MEPERO             =  0.480G1N5044 + 0.260GNK500h + 0.260GND5018                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14205} G2N503c +PERO1              =  0.600G1N5044 + 0.200GNK500h + 0.200GND5018                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14206} G2N503c +PERO2              =  0.560G1N5044 + 0.220GNK500h + 0.220GND5018                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14207} G2N503c +PERO3              =  0.600G1N5044 + 0.200GNK500h + 0.200GND5018                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14208} G2N503c +PERO5              =  0.600G1N5044 + 0.200GNK500h + 0.200GND5018                 : ARR( 0.533E-11,   500., 0.0);
+{ 14209} G2N503c +PERO6              =  0.460G1N5044 + 0.270GNK500h + 0.270GND5018                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14210} G2N503c +PERO9              =  0.800G1N5044 + 0.200GND5018                                : ARR( 0.100E-10,     0., 0.0);
+{ 14211} G3N400D +GHO2               =  0.800GGN400J + 0.200GAN400M + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14212} G3N400D +GNO                =       GDK3000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 14213} G3N400D +GNO2               =       GPN400M                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14214} G3N400D +GNO3               =       GDK3000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 14215} G3N400D +MEPERO             =  0.685GDK3000 + 0.315GAN400M + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14216} G3N400D +PERO1              =  0.800GDK3000 + 0.200GAN400M + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14217} G3N400D +PERO2              =  0.750GDK3000 + 0.250GAN400M + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14218} G3N400D +PERO3              =  0.800GDK3000 + 0.200GAN400M + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14219} G3N400D +PERO5              =  0.650GDK3000 + 0.350GAN400M + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14220} G3N400D +PERO6              =  0.650GDK3000 + 0.350GAN400M + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14221} G3N400D +PERO9              =       GDK3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14222} G1N5044                     =       G3N400D +      GCH2O                                  : ARR( 0.200E+15,  4694., 0.0);
+{ 14223} GHK500O +GHO                =       GKK5009 +      GHO                                    : ARR( 0.155E-10,     0., 0.0);
+{ 14224} GHK500O +GHO                =       G2K500J                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 14225} GHK500O+HV               =       G3K2000 +      GDK3000 +      GHO                     :  0.100E+01*SUN;
+{ 14226} GHK500O+HV               =       G1K500K +      GHO                                    :  0.100E+01*SUN;
+{ 14227} GHK500O+HV               =       G3H4009 +      GCH3O2                                 :  0.100E+01*SUN;
+{ 14228} G3H4009 +GHO2               =  0.800GGH400C + 0.200GAH400D + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14229} G3H4009 +GNO                =       GDK3000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14230} G3H4009 +GNO2               =       GPH400E                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14231} G3H4009 +GNO3               =       GDK3000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14232} G3H4009 +MEPERO             =  0.685GDK3000 + 0.315GAH400D + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14233} G3H4009 +PERO1              =  0.800GDK3000 + 0.200GAH400D + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14234} G3H4009 +PERO2              =  0.750GDK3000 + 0.250GAH400D + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14235} G3H4009 +PERO3              =  0.800GDK3000 + 0.200GAH400D + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14236} G3H4009 +PERO5              =  0.650GDK3000 + 0.350GAH400D + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14237} G3H4009 +PERO6              =  0.650GDK3000 + 0.350GAH400D + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14238} G3H4009 +PERO9              =       GDK3000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14239} GKK5008 +GHO                =       GKK5009 +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{ 14240} GKK5008+HV               =       G3K2000 +      GDK3000 +      GHO2                    :  0.100E+01*SUN;
+{ 14241} GKK5008+HV               =       G3K4009 +      GCH3O2                                 :  0.100E+01*SUN;
+{ 14242} G3K4009 +GHO2               =  0.800GGK4005 + 0.200GAK4005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14243} G3K4009 +GNO                =       GDK3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14244} G3K4009 +GNO2               =       GPK4005                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14245} G3K4009 +GNO3               =       GDK3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14246} G3K4009 +MEPERO             =  0.685GDK3000 + 0.315GAK4005 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14247} G3K4009 +PERO1              =  0.800GDK3000 + 0.200GAK4005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14248} G3K4009 +PERO2              =  0.750GDK3000 + 0.250GAK4005 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14249} G3K4009 +PERO3              =  0.800GDK3000 + 0.200GAK4005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14250} G3K4009 +PERO5              =  0.650GDK3000 + 0.350GAK4005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14251} G3K4009 +PERO6              =  0.650GDK3000 + 0.350GAK4005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14252} G3K4009 +PERO9              =       GDK3000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14253} GKK5009 +GHO                =       G2K500g                                               : ARR( 0.204E-12,     0., 0.0);
+{ 14254} GKK5009+HV               =  2.000G3K2000 +      GCO                                    :  0.200E+01*SUN;
+{ 14255} G2K500g +GNO                =       G1K500q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14256} G2K500g +GNO                =       GNK500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14257} G2K500g +GHO2               =       GHK500p                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14258} G2K500g +GNO3               =       G1K500q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14259} G2K500g +MEPERO             =  0.480G1K500q + 0.260GKK500B + 0.260GDK500W                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14260} G2K500g +PERO1              =  0.600G1K500q + 0.200GKK500B + 0.200GDK500W                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14261} G2K500g +PERO2              =  0.560G1K500q + 0.220GKK500B + 0.220GDK500W                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14262} G2K500g +PERO3              =  0.600G1K500q + 0.200GKK500B + 0.200GDK500W                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14263} G2K500g +PERO5              =  0.600G1K500q + 0.200GKK500B + 0.200GDK500W                 : ARR( 0.533E-11,   500., 0.0);
+{ 14264} G2K500g +PERO6              =  0.460G1K500q + 0.270GKK500B + 0.270GDK500W                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14265} G2K500g +PERO9              =  0.800G1K500q + 0.200GDK500W                                : ARR( 0.100E-10,     0., 0.0);
+{ 14266} G1K500q                     =       G3K2000 +      GCH2O   + 2.000GCO                     : ARR( 0.200E+15,  3862., 0.0);
+{ 14267} GGK4000 +GHO                =       G2G4008                                               : ARR( 0.538E-12,     0., 0.0);
+{ 14268} GGK4000 +GHO                =       G3K4003                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 14269} GGK4000+HV               =       G3K2000 +      G2G2000                                :  0.100E+01*SUN;
+{ 14270} GGK4000+HV               =       G2K3000 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 14271} G2G4008 +GNO                =       G1G400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14272} G2G4008 +GNO                =       GGN400J                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14273} G2G4008 +GHO2               =       GGH400C                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14274} G2G4008 +GNO3               =       G1G400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14275} G2G4008 +MEPERO             =  0.340G1G400A + 0.330GGK4005 + 0.330GGK4006                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14276} G2G4008 +PERO1              =  0.460G1G400A + 0.270GGK4005 + 0.270GGK4006                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14277} G2G4008 +PERO2              =  0.400G1G400A + 0.300GGK4005 + 0.300GGK4006                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14278} G2G4008 +PERO3              =  0.460G1G400A + 0.270GGK4005 + 0.270GGK4006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14279} G2G4008 +PERO5              =  0.460G1G400A + 0.270GGK4005 + 0.270GGK4006                 : ARR( 0.183E-11,   450., 0.0);
+{ 14280} G2G4008 +PERO6              =  0.300G1G400A + 0.350GGK4005 + 0.350GGK4006                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14281} G2G4008 +PERO9              =  0.650G1G400A + 0.350GGK4006                                : ARR( 0.100E-10,     0., 0.0);
+{ 14282} G1G400A                     =       G3K2000 +      GGD2000                                : ARR( 0.200E+15,  5310., 0.0);
+{ 14283} GAK4000 +GHO                =       G2A400B                                               : ARR( 0.102E-12,     0., 0.0);
+{ 14284} GAK4000 +GHO                =       G2A400C                                               : ARR( 0.389E-12,     0., 0.0);
+{ 14285} GAK4000 +GHO                =       G2K3000 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 14286} GAK4000+HV               =       G3K2000 +      G2A2000                                :  0.100E+01*SUN;
+{ 14287} G2A400B +GNO                =       G1A400D +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14288} G2A400B +GNO                =       GAN4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14289} G2A400B +GHO2               =       GAH400A                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14290} G2A400B +GNO3               =       G1A400D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14291} G2A400B +MEPERO             =  0.480G1A400D + 0.260GAK4003 + 0.260GAD4003                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14292} G2A400B +PERO1              =  0.600G1A400D + 0.200GAK4003 + 0.200GAD4003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14293} G2A400B +PERO2              =  0.560G1A400D + 0.220GAK4003 + 0.220GAD4003                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14294} G2A400B +PERO3              =  0.600G1A400D + 0.200GAK4003 + 0.200GAD4003                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14295} G2A400B +PERO5              =  0.600G1A400D + 0.200GAK4003 + 0.200GAD4003                 : ARR( 0.533E-11,   500., 0.0);
+{ 14296} G2A400B +PERO6              =  0.460G1A400D + 0.270GAK4003 + 0.270GAD4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14297} G2A400B +PERO9              =  0.800G1A400D + 0.200GAD4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 14298} G2A400C +GNO                =       G1A400E +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14299} G2A400C +GNO                =       GAN400M                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14300} G2A400C +GHO2               =       GAH400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14301} G2A400C +GNO3               =       G1A400E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14302} G2A400C +MEPERO             =  0.340G1A400E + 0.330GAK4005 + 0.330GAK4006                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14303} G2A400C +PERO1              =  0.460G1A400E + 0.270GAK4005 + 0.270GAK4006                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14304} G2A400C +PERO2              =  0.400G1A400E + 0.300GAK4005 + 0.300GAK4006                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14305} G2A400C +PERO3              =  0.460G1A400E + 0.270GAK4005 + 0.270GAK4006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14306} G2A400C +PERO5              =  0.460G1A400E + 0.270GAK4005 + 0.270GAK4006                 : ARR( 0.183E-11,   450., 0.0);
+{ 14307} G2A400C +PERO6              =  0.300G1A400E + 0.350GAK4005 + 0.350GAK4006                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14308} G2A400C +PERO9              =  0.650G1A400E + 0.350GAK4006                                : ARR( 0.100E-10,     0., 0.0);
+{ 14309} G1A400D                     =       G3A3000 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{ 14310} G1A400E                     =       G3K2000 +      GAD2000                                : ARR( 0.200E+15,  5310., 0.0);
+{ 14311} GPK4000                     =       G3K4003 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14312} GPK4000 +GHO                =       G2P400C                                               : ARR( 0.102E-12,     0., 0.0);
+{ 14313} GPK4000 +GHO                =       G2P400D                                               : ARR( 0.525E-12,     0., 0.0);
+{ 14314} GPK4000+HV               =       G3K2000 +      G2P2000                                :  0.100E+01*SUN;
+{ 14315} GPK4000+HV               =       G3K4003 +      GNO2                                   :  0.100E+01*SUN;
+{ 14316} G2P400C +GNO                =       G1P400D +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14317} G2P400C +GNO                =       GPN4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14318} G2P400C +GHO2               =       GPH400A                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14319} G2P400C +GNO3               =       G1P400D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14320} G2P400C +MEPERO             =  0.480G1P400D + 0.260GPK4003 + 0.260GPD4003                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14321} G2P400C +PERO1              =  0.600G1P400D + 0.200GPK4003 + 0.200GPD4003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14322} G2P400C +PERO2              =  0.560G1P400D + 0.220GPK4003 + 0.220GPD4003                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14323} G2P400C +PERO3              =  0.600G1P400D + 0.200GPK4003 + 0.200GPD4003                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14324} G2P400C +PERO5              =  0.600G1P400D + 0.200GPK4003 + 0.200GPD4003                 : ARR( 0.533E-11,   500., 0.0);
+{ 14325} G2P400C +PERO6              =  0.460G1P400D + 0.270GPK4003 + 0.270GPD4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14326} G2P400C +PERO9              =  0.800G1P400D + 0.200GPD4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 14327} G2P400D +GNO                =       G1P400E +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14328} G2P400D +GNO                =       GPN400M                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14329} G2P400D +GHO2               =       GPH400E                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14330} G2P400D +GNO3               =       G1P400E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14331} G2P400D +MEPERO             =  0.340G1P400E + 0.330GPK4005 + 0.330GPK4006                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14332} G2P400D +PERO1              =  0.460G1P400E + 0.270GPK4005 + 0.270GPK4006                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14333} G2P400D +PERO2              =  0.400G1P400E + 0.300GPK4005 + 0.300GPK4006                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14334} G2P400D +PERO3              =  0.460G1P400E + 0.270GPK4005 + 0.270GPK4006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14335} G2P400D +PERO5              =  0.460G1P400E + 0.270GPK4005 + 0.270GPK4006                 : ARR( 0.183E-11,   450., 0.0);
+{ 14336} G2P400D +PERO6              =  0.300G1P400E + 0.350GPK4005 + 0.350GPK4006                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14337} G2P400D +PERO9              =  0.650G1P400E + 0.350GPK4006                                : ARR( 0.100E-10,     0., 0.0);
+{ 14338} G1P400D                     =       G3P3000 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{ 14339} G1P400E                     =       G3K2000 +      GPD2000                                : ARR( 0.200E+15,  5310., 0.0);
+{ 14340} GHN501i +GHO                =       GND500Q +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{ 14341} GHN501i +GHO                =       G2N501M                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 14342} GHN501i+HV               =       G3K2000 +      GHD3000 +      GNO2                    :  0.100E+01*SUN;
+{ 14343} GHN501i+HV               =       GNK3000 +      G2D2000 +      GHO                     :  0.100E+01*SUN;
+{ 14344} GHN501i+HV               =       G1H503F +      GNO2                                   :  0.100E+01*SUN;
+{ 14345} GHN501i+HV               =       G1N501O +      GHO                                    :  0.100E+01*SUN;
+{ 14346} G1H503F                     =       G3K2000 +      GHD3000                                : ARR( 0.200E+15,  2668., 0.0);
+{ 14347} GND500Q +GHO                =       G3N500U                                               : ARR( 0.213E-10,     0., 0.0);
+{ 14348} GND500Q +GNO3               =       G3N500U +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14349} GND500Q+HV               =       G3K2000 +      GDD3000 +      GNO2                    :  0.100E+01*SUN;
+{ 14350} GND500Q+HV               =       G1D500C +      GNO2                                   :  0.100E+01*SUN;
+{ 14351} GND500Q+HV               =       G2N400c +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 14352} G3N500U +GHO2               =  0.800GGN500Q + 0.200GAN500S + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14353} G3N500U +GNO                =       G2N400c +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 14354} G3N500U +GNO2               =       GPN500S                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14355} G3N500U +GNO3               =       G2N400c +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 14356} G3N500U +MEPERO             =  0.685G2N400c + 0.315GAN500S + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14357} G3N500U +PERO1              =  0.800G2N400c + 0.200GAN500S + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14358} G3N500U +PERO2              =  0.750G2N400c + 0.250GAN500S + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14359} G3N500U +PERO3              =  0.800G2N400c + 0.200GAN500S + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14360} G3N500U +PERO5              =  0.650G2N400c + 0.350GAN500S + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14361} G3N500U +PERO6              =  0.650G2N400c + 0.350GAN500S + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14362} G3N500U +PERO9              =       G2N400c +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 14363} G2N400c +GNO                =       G1N400e +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14364} G2N400c +GNO                =       GNN400M                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14365} G2N400c +GHO2               =       GHN400r                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14366} G2N400c +GNO3               =       G1N400e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14367} G2N400c +MEPERO             =  0.480G1N400e + 0.260GNK4007 + 0.260GND4008                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14368} G2N400c +PERO1              =  0.600G1N400e + 0.200GNK4007 + 0.200GND4008                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14369} G2N400c +PERO2              =  0.560G1N400e + 0.220GNK4007 + 0.220GND4008                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14370} G2N400c +PERO3              =  0.600G1N400e + 0.200GNK4007 + 0.200GND4008                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14371} G2N400c +PERO5              =  0.600G1N400e + 0.200GNK4007 + 0.200GND4008                 : ARR( 0.533E-11,   500., 0.0);
+{ 14372} G2N400c +PERO6              =  0.460G1N400e + 0.270GNK4007 + 0.270GND4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14373} G2N400c +PERO9              =  0.800G1N400e + 0.200GND4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 14374} G1N400e +OXYGEN             =       GND4008 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 14375} G1N400e                     =       GDK3000 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{ 14376} GHN501j +GHO                =       GNK500g +      GHO                                    : ARR( 0.692E-11,     0., 0.0);
+{ 14377} GHN501j +GHO                =       G2N501N                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 14378} GHN501j+HV               =       G3K2000 +      GHD3002 +      GNO2                    :  0.100E+01*SUN;
+{ 14379} GHN501j+HV               =       GNK3000 +      G2D2000 +      GHO                     :  0.100E+01*SUN;
+{ 14380} GHN501j+HV               =       G1H503G +      GNO2                                   :  0.100E+01*SUN;
+{ 14381} GHN501j+HV               =       G1N501P +      GHO                                    :  0.100E+01*SUN;
+{ 14382} G1H503G                     =       GHD3002 +      G3K2000                                : ARR( 0.200E+15,  2923., 0.0);
+{ 14383} GHN501k +GHO                =       GND500R +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 14384} GHN501k +GHO                =       G2N501O                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 14385} GHN501k+HV               =       G1H503H +      GNO2                                   :  0.100E+01*SUN;
+{ 14386} GHN501k+HV               =       G3N4004 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 14387} GHN501k+HV               =       GU02000 +      GHN3008                                :  0.100E+01*SUN;
+{ 14388} GHN501k+HV               =       G1N501Q +      GHO                                    :  0.100E+01*SUN;
+{ 14389} G1H503H                     =       GD03000 +      G3H2000                                : ARR( 0.200E+15,  2755., 0.0);
+{ 14390} GND500R +GHO                =       G3N4004 +      GCO                                    : ARR( 0.131E-10,     0., 0.0);
+{ 14391} GND500R +GNO3               =       G3N4004 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 14392} GND500R+HV               =       G1D500c +      GNO2                                   :  0.100E+01*SUN;
+{ 14393} GND500R+HV               =       G3N4004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 14394} GND500R+HV               =       GND4005 +      GCO                                    :  0.100E+01*SUN;
+{ 14395} GND500R+HV               =       GN03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 14396} G1D500c                     =       GD03000 +      G3D2000                                : ARR( 0.200E+15,  2978., 0.0);
+{ 14397} GGN4004 +GHO                =       G2G4009                                               : ARR( 0.244E-12,     0., 0.0);
+{ 14398} GGN4004 +GHO                =       G3N4004                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 14399} GGN4004+HV               =       G1G4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 14400} GGN4004+HV               =       GD03000 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 14401} G2G4009 +GNO                =       G1G400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14402} G2G4009 +GNO                =       GGN400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14403} G2G4009 +GHO2               =       GGH400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14404} G2G4009 +GNO3               =       G1G400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14405} G2G4009 +MEPERO             =  0.340G1G400B + 0.330GGN4005 + 0.330GGN400J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14406} G2G4009 +PERO1              =  0.460G1G400B + 0.270GGN4005 + 0.270GGN400J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14407} G2G4009 +PERO2              =  0.400G1G400B + 0.300GGN4005 + 0.300GGN400J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14408} G2G4009 +PERO3              =  0.460G1G400B + 0.270GGN4005 + 0.270GGN400J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14409} G2G4009 +PERO5              =  0.460G1G400B + 0.270GGN4005 + 0.270GGN400J                 : ARR( 0.183E-11,   450., 0.0);
+{ 14410} G2G4009 +PERO6              =  0.300G1G400B + 0.350GGN4005 + 0.350GGN400J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14411} G2G4009 +PERO9              =  0.650G1G400B + 0.350GGN400J                                : ARR( 0.100E-10,     0., 0.0);
+{ 14412} G1G400B                     =       GD02000 +      GGD2000 +      GNO2                    : ARR( 0.200E+15,  6482., 0.0);
+{ 14413} GAN4004 +GHO                =       G2A400D                                               : ARR( 0.168E-12,     0., 0.0);
+{ 14414} GAN4004 +GHO                =       G2A400E                                               : ARR( 0.230E-12,     0., 0.0);
+{ 14415} GAN4004 +GHO                =       GAK4002 +      GNO2                                   : ARR( 0.531E-13,     0., 0.0);
+{ 14416} GAN4004 +GHO                =       GD03000 +      GNO2    +      GCO2                    : ARR( 0.520E-12,     0., 0.0);
+{ 14417} GAN4004+HV               =       G1A4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 14418} G2A400D +GNO                =       G1A400F +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14419} G2A400D +GNO                =       GAN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14420} G2A400D +GHO2               =       GAH400E                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14421} G2A400D +GNO3               =       G1A400F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14422} G2A400D +MEPERO             =  0.480G1A400F + 0.260GAN400E + 0.260GAN400N                 : ARR( 0.146E-12,  -445., 0.0);
+{ 14423} G2A400D +PERO1              =  0.600G1A400F + 0.200GAN400E + 0.200GAN400N                 : ARR( 0.112E-12,  -500., 0.0);
+{ 14424} G2A400D +PERO2              =  0.560G1A400F + 0.220GAN400E + 0.220GAN400N                 : ARR( 0.418E-13, -1000., 0.0);
+{ 14425} G2A400D +PERO3              =  0.600G1A400F + 0.200GAN400E + 0.200GAN400N                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14426} G2A400D +PERO5              =  0.600G1A400F + 0.200GAN400E + 0.200GAN400N                 : ARR( 0.473E-11,   850., 0.0);
+{ 14427} G2A400D +PERO6              =  0.460G1A400F + 0.270GAN400E + 0.270GAN400N                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14428} G2A400D +PERO9              =  0.800G1A400F + 0.200GAN400N                                : ARR( 0.100E-10,     0., 0.0);
+{ 14429} G2A400E +GNO                =       G1A400G +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14430} G2A400E +GNO                =       GAN400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14431} G2A400E +GHO2               =       GAH400F                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14432} G2A400E +GNO3               =       G1A400G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14433} G2A400E +MEPERO             =  0.340G1A400G + 0.330GAN4005 + 0.330GAN400M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14434} G2A400E +PERO1              =  0.460G1A400G + 0.270GAN4005 + 0.270GAN400M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14435} G2A400E +PERO2              =  0.400G1A400G + 0.300GAN4005 + 0.300GAN400M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14436} G2A400E +PERO3              =  0.460G1A400G + 0.270GAN4005 + 0.270GAN400M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14437} G2A400E +PERO5              =  0.460G1A400G + 0.270GAN4005 + 0.270GAN400M                 : ARR( 0.183E-11,   450., 0.0);
+{ 14438} G2A400E +PERO6              =  0.300G1A400G + 0.350GAN4005 + 0.350GAN400M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14439} G2A400E +PERO9              =  0.650G1A400G + 0.350GAN400M                                : ARR( 0.100E-10,     0., 0.0);
+{ 14440} G1A400F +OXYGEN             =       GAN400N +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 14441} G1A400G                     =       GD02000 +      GAD2000 +      GNO2                    : ARR( 0.200E+15,  6482., 0.0);
+{ 14442} GPN4004                     =       G3N4004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14443} GPN4004 +GHO                =       G2P400E                                               : ARR( 0.168E-12,     0., 0.0);
+{ 14444} GPN4004 +GHO                =       G2P400F                                               : ARR( 0.230E-12,     0., 0.0);
+{ 14445} GPN4004 +GHO                =       GPK4002 +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{ 14446} GPN4004+HV               =       G1P4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 14447} GPN4004+HV               =       G3N4004 +      GNO2                                   :  0.100E+01*SUN;
+{ 14448} G2P400E +GNO                =       G1P400F +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14449} G2P400E +GNO                =       GPN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14450} G2P400E +GHO2               =       GPH400F                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14451} G2P400E +GNO3               =       G1P400F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14452} G2P400E +MEPERO             =  0.480G1P400F + 0.260GPN400E + 0.260GPN400N                 : ARR( 0.146E-12,  -445., 0.0);
+{ 14453} G2P400E +PERO1              =  0.600G1P400F + 0.200GPN400E + 0.200GPN400N                 : ARR( 0.112E-12,  -500., 0.0);
+{ 14454} G2P400E +PERO2              =  0.560G1P400F + 0.220GPN400E + 0.220GPN400N                 : ARR( 0.418E-13, -1000., 0.0);
+{ 14455} G2P400E +PERO3              =  0.600G1P400F + 0.200GPN400E + 0.200GPN400N                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14456} G2P400E +PERO5              =  0.600G1P400F + 0.200GPN400E + 0.200GPN400N                 : ARR( 0.473E-11,   850., 0.0);
+{ 14457} G2P400E +PERO6              =  0.460G1P400F + 0.270GPN400E + 0.270GPN400N                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14458} G2P400E +PERO9              =  0.800G1P400F + 0.200GPN400N                                : ARR( 0.100E-10,     0., 0.0);
+{ 14459} G2P400F +GNO                =       G1P400G +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14460} G2P400F +GNO                =       GPN400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14461} G2P400F +GHO2               =       GPH400G                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14462} G2P400F +GNO3               =       G1P400G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14463} G2P400F +MEPERO             =  0.340G1P400G + 0.330GPN4005 + 0.330GPN400M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14464} G2P400F +PERO1              =  0.460G1P400G + 0.270GPN4005 + 0.270GPN400M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14465} G2P400F +PERO2              =  0.400G1P400G + 0.300GPN4005 + 0.300GPN400M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14466} G2P400F +PERO3              =  0.460G1P400G + 0.270GPN4005 + 0.270GPN400M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14467} G2P400F +PERO5              =  0.460G1P400G + 0.270GPN4005 + 0.270GPN400M                 : ARR( 0.183E-11,   450., 0.0);
+{ 14468} G2P400F +PERO6              =  0.300G1P400G + 0.350GPN4005 + 0.350GPN400M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14469} G2P400F +PERO9              =  0.650G1P400G + 0.350GPN400M                                : ARR( 0.100E-10,     0., 0.0);
+{ 14470} G1P400F +OXYGEN             =       GPN400N +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 14471} G1P400G                     =       GD02000 +      GPD2000 +      GNO2                    : ARR( 0.200E+15,  6482., 0.0);
+{ 14472} GHH500Q +GHO                =       GHK500S +      GHO                                    : ARR( 0.266E-10,     0., 0.0);
+{ 14473} GHH500Q +GHO                =       GHK500O +      GHO                                    : ARR( 0.112E-09,     0., 0.0);
+{ 14474} GHH500Q+HV               =       G3K2000 +      GHD3002 +      GHO                     :  0.100E+01*SUN;
+{ 14475} GHH500Q+HV               =       G1H503G +      GHO                                    :  0.100E+01*SUN;
+{ 14476} GHH500Q+HV               =       G1H500a +      GHO                                    :  0.100E+01*SUN;
+{ 14477} GHK500P +GHO                =       GHK500O +      GHO2                                   : ARR( 0.268E-10,     0., 0.0);
+{ 14478} GHK500P +GHO                =       GKK5007 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 14479} GHK500P +GHO                =       G2K500h                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 14480} GHK500P+HV               =       G1K500n +      GHO                                    :  0.100E+01*SUN;
+{ 14481} GHK500P+HV               =       G3H400A +      GCH3O2                                 :  0.100E+01*SUN;
+{ 14482} G2K500h +GNO                =       G1K500n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14483} G2K500h +GNO                =       GNK500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14484} G2K500h +GHO2               =       GHK500P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14485} G2K500h +GNO3               =       G1K500n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14486} G2K500h +MEPERO             =  0.340G1K500n + 0.330GKO500H + 0.330GKK5007                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14487} G2K500h +PERO1              =  0.460G1K500n + 0.270GKO500H + 0.270GKK5007                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14488} G2K500h +PERO2              =  0.400G1K500n + 0.300GKO500H + 0.300GKK5007                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14489} G2K500h +PERO3              =  0.460G1K500n + 0.270GKO500H + 0.270GKK5007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14490} G2K500h +PERO5              =  0.460G1K500n + 0.270GKO500H + 0.270GKK5007                 : ARR( 0.183E-11,   450., 0.0);
+{ 14491} G2K500h +PERO6              =  0.300G1K500n + 0.350GKO500H + 0.350GKK5007                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14492} G2K500h +PERO9              =  0.650G1K500n + 0.350GKK5007                                : ARR( 0.100E-10,     0., 0.0);
+{ 14493} G3H400A +GHO2               =  0.800GGH4001 + 0.200GAH4001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14494} G3H400A +GNO                =       GDO3001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14495} G3H400A +GNO2               =       GPH4001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14496} G3H400A +GNO3               =       GDO3001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14497} G3H400A +MEPERO             =  0.685GDO3001 + 0.315GAH4001 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14498} G3H400A +PERO1              =  0.800GDO3001 + 0.200GAH4001 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14499} G3H400A +PERO2              =  0.750GDO3001 + 0.250GAH4001 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14500} G3H400A +PERO3              =  0.800GDO3001 + 0.200GAH4001 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14501} G3H400A +PERO5              =  0.650GDO3001 + 0.350GAH4001 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14502} G3H400A +PERO6              =  0.650GDO3001 + 0.350GAH4001 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14503} G3H400A +PERO9              =       GDO3001 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14504} GGH4000 +GHO                =       GGK4002 +      GHO                                    : ARR( 0.262E-10,     0., 0.0);
+{ 14505} GGH4000 +GHO                =       G2G4005                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 14506} GGH4000 +GHO                =       G3H4000                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 14507} GGH4000+HV               =       G1G4007 +      GHO                                    :  0.100E+01*SUN;
+{ 14508} GGH4000+HV               =       GD03000 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 14509} GAH4000 +GHO                =       GAK4002 +      GHO                                    : ARR( 0.201E-10,     0., 0.0);
+{ 14510} GAH4000 +GHO                =       G2A4006                                               : ARR( 0.206E-11,  -190., 0.0);
+{ 14511} GAH4000+HV               =       G1A4007 +      GHO                                    :  0.100E+01*SUN;
+{ 14512} GPH4000                     =       G3H4000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14513} GPH4000 +GHO                =       GPK4002 +      GHO                                    : ARR( 0.263E-10,     0., 0.0);
+{ 14514} GPH4000 +GHO                =       G2P4006                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 14515} GPH4000+HV               =       G1P4007 +      GHO                                    :  0.100E+01*SUN;
+{ 14516} GPH4000+HV               =       G3H4000 +      GNO2                                   :  0.100E+01*SUN;
+{ 14517} GHK500Q +GHO                =       GHK500S +      GHO2                                   : ARR( 0.651E-11,     0., 0.0);
+{ 14518} GHK500Q +GHO                =       GKK5008 +      GHO                                    : ARR( 0.110E-09,     0., 0.0);
+{ 14519} GHK500Q+HV               =       G3K2000 +      GHD3002 +      GHO2                    :  0.100E+01*SUN;
+{ 14520} GHK500Q+HV               =       G1K500L +      GHO                                    :  0.100E+01*SUN;
+{ 14521} GGO4002 +GHO                =       G2G400A                                               : ARR( 0.118E-11,     0., 0.0);
+{ 14522} GGO4002 +GHO                =       GGK4002 +      GHO2                                   : ARR( 0.646E-11,     0., 0.0);
+{ 14523} GGO4002 +GHO                =       G3K4004                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 14524} GGO4002+HV               =       GD03000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 14525} G2G400A +GNO                =       G1G400C +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14526} G2G400A +GNO                =       GGN400G                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14527} G2G400A +GHO2               =       GGH400E                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14528} G2G400A +GNO3               =       G1G400C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14529} G2G400A +MEPERO             =  0.340G1G400C + 0.330GGO4003 + 0.330GGK4005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14530} G2G400A +PERO1              =  0.460G1G400C + 0.270GGO4003 + 0.270GGK4005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14531} G2G400A +PERO2              =  0.400G1G400C + 0.300GGO4003 + 0.300GGK4005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14532} G2G400A +PERO3              =  0.460G1G400C + 0.270GGO4003 + 0.270GGK4005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14533} G2G400A +PERO5              =  0.460G1G400C + 0.270GGO4003 + 0.270GGK4005                 : ARR( 0.183E-11,   450., 0.0);
+{ 14534} G2G400A +PERO6              =  0.300G1G400C + 0.350GGO4003 + 0.350GGK4005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14535} G2G400A +PERO9              =  0.650G1G400C + 0.350GGK4005                                : ARR( 0.100E-10,     0., 0.0);
+{ 14536} G1G400C                     =       GD02000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  3734., 0.0);
+{ 14537} GAO4002 +GHO                =       G2A400F                                               : ARR( 0.120E-11,     0., 0.0);
+{ 14538} GAO4002 +GHO                =       GAK4002 +      GHO2                                   : ARR( 0.488E-11,     0., 0.0);
+{ 14539} GAO4002 +GHO                =       GD03000 +      GHO2    +      GCO2                    : ARR( 0.545E-12,     0., 0.0);
+{ 14540} G2A400F +GNO                =       G1A400H +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14541} G2A400F +GNO                =       GAN400G                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14542} G2A400F +GHO2               =       GAH400G                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14543} G2A400F +GNO3               =       G1A400H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14544} G2A400F +MEPERO             =  0.340G1A400H + 0.330GAO4003 + 0.330GAK4005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14545} G2A400F +PERO1              =  0.460G1A400H + 0.270GAO4003 + 0.270GAK4005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14546} G2A400F +PERO2              =  0.400G1A400H + 0.300GAO4003 + 0.300GAK4005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14547} G2A400F +PERO3              =  0.460G1A400H + 0.270GAO4003 + 0.270GAK4005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14548} G2A400F +PERO5              =  0.460G1A400H + 0.270GAO4003 + 0.270GAK4005                 : ARR( 0.183E-11,   450., 0.0);
+{ 14549} G2A400F +PERO6              =  0.300G1A400H + 0.350GAO4003 + 0.350GAK4005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14550} G2A400F +PERO9              =  0.650G1A400H + 0.350GAK4005                                : ARR( 0.100E-10,     0., 0.0);
+{ 14551} G1A400H                     =       GD02000 +      GAD2000 +      GHO2                    : ARR( 0.200E+15,  3734., 0.0);
+{ 14552} GPO4002                     =       G3K4004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14553} GPO4002 +GHO                =       G2P400G                                               : ARR( 0.120E-11,     0., 0.0);
+{ 14554} GPO4002 +GHO                =       GPK4002 +      GHO2                                   : ARR( 0.654E-11,     0., 0.0);
+{ 14555} GPO4002+HV               =       G3K4004 +      GNO2                                   :  0.100E+01*SUN;
+{ 14556} G2P400G +GNO                =       G1P400H +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14557} G2P400G +GNO                =       GPN400G                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14558} G2P400G +GHO2               =       GPH400H                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14559} G2P400G +GNO3               =       G1P400H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14560} G2P400G +MEPERO             =  0.340G1P400H + 0.330GPO4003 + 0.330GPK4005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14561} G2P400G +PERO1              =  0.460G1P400H + 0.270GPO4003 + 0.270GPK4005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14562} G2P400G +PERO2              =  0.400G1P400H + 0.300GPO4003 + 0.300GPK4005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14563} G2P400G +PERO3              =  0.460G1P400H + 0.270GPO4003 + 0.270GPK4005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14564} G2P400G +PERO5              =  0.460G1P400H + 0.270GPO4003 + 0.270GPK4005                 : ARR( 0.183E-11,   450., 0.0);
+{ 14565} G2P400G +PERO6              =  0.300G1P400H + 0.350GPO4003 + 0.350GPK4005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14566} G2P400G +PERO9              =  0.650G1P400H + 0.350GPK4005                                : ARR( 0.100E-10,     0., 0.0);
+{ 14567} G1P400H                     =       GD02000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  3734., 0.0);
+{ 14568} GHK500R +GHO                =       GDK500D +      GHO                                    : ARR( 0.519E-10,     0., 0.0);
+{ 14569} GHK500R +GHO                =       G2K500L                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 14570} GHK500R+HV               =       G3K2000 +      G3H3000                                :  0.100E+01*SUN;
+{ 14571} GHK500R+HV               =       G1K500M +      GHO                                    :  0.100E+01*SUN;
+{ 14572} GDK500D +GHO                =       G3K500K                                               : ARR( 0.665E-10,     0., 0.0);
+{ 14573} GDK500D +GNO3               =       G3K500K +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14574} GDK500D+HV               =       G3K2000 +      G3D3000                                :  0.100E+01*SUN;
+{ 14575} GDK500D+HV               =       G2K4009 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 14576} G3K500K +GHO2               =  0.800GGK500D + 0.200GAK500B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14577} G3K500K +GNO                =       G2K4009 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 14578} G3K500K +GNO2               =       GPK500D                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14579} G3K500K +GNO3               =       G2K4009 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 14580} G3K500K +MEPERO             =  0.685G2K4009 + 0.315GAK500B + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14581} G3K500K +PERO1              =  0.800G2K4009 + 0.200GAK500B + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14582} G3K500K +PERO2              =  0.750G2K4009 + 0.250GAK500B + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14583} G3K500K +PERO3              =  0.800G2K4009 + 0.200GAK500B + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14584} G3K500K +PERO5              =  0.650G2K4009 + 0.350GAK500B + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14585} G3K500K +PERO6              =  0.650G2K4009 + 0.350GAK500B + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14586} G3K500K +PERO9              =       G2K4009 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 14587} G2K4009 +GNO                =       G1K4009 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14588} G2K4009 +GNO                =       GNK400A                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14589} G2K4009 +GHO2               =       GHK400A                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14590} G2K4009 +GNO3               =       G1K4009 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14591} G2K4009 +MEPERO             =  0.480G1K4009 + 0.260GKK4000 + 0.260GDK4008                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14592} G2K4009 +PERO1              =  0.600G1K4009 + 0.200GKK4000 + 0.200GDK4008                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14593} G2K4009 +PERO2              =  0.560G1K4009 + 0.220GKK4000 + 0.220GDK4008                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14594} G2K4009 +PERO3              =  0.600G1K4009 + 0.200GKK4000 + 0.200GDK4008                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14595} G2K4009 +PERO5              =  0.600G1K4009 + 0.200GKK4000 + 0.200GDK4008                 : ARR( 0.533E-11,   500., 0.0);
+{ 14596} G2K4009 +PERO6              =  0.460G1K4009 + 0.270GKK4000 + 0.270GDK4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14597} G2K4009 +PERO9              =  0.800G1K4009 + 0.200GDK4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 14598} G1K4009                     =       G3K2000 +      GCH2O   +      GCO                     : ARR( 0.200E+15,  3897., 0.0);
+{ 14599} GHK500S +GHO                =       GKK5009 +      GHO                                    : ARR( 0.210E-10,     0., 0.0);
+{ 14600} GHK500S +GHO                =       G2K500M                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 14601} GHK500S+HV               =       G3K2000 +      G3H3001                                :  0.100E+01*SUN;
+{ 14602} GHK500S+HV               =       G1K500N +      GHO                                    :  0.100E+01*SUN;
+{ 14603} GHK500T +GHO                =       GDK500E +      GHO                                    : ARR( 0.107E-10,     0., 0.0);
+{ 14604} GHK500T +GHO                =       G2K500N                                               : ARR( 0.207E-11,  -190., 0.0);
+{ 14605} GHK500T+HV               =       G3K3000 +      G3H2000                                :  0.100E+01*SUN;
+{ 14606} GHK500T+HV               =       G1K500O +      GHO                                    :  0.100E+01*SUN;
+{ 14607} GDK500E +GHO                =       G2D500S                                               : ARR( 0.728E-12,     0., 0.0);
+{ 14608} GDK500E +GHO                =       G3K3000 + 2.000GCO                                    : ARR( 0.132E-10,     0., 0.0);
+{ 14609} GDK500E +GNO3               =       G3K3000 +      GHNO3   + 2.000GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 14610} GDK500E+HV               =       G3K3000 +      G3D2000                                :  0.100E+01*SUN;
+{ 14611} GDK500E+HV               =       G3K3000 +      GCO     +      GCO     +      GHO2     :  0.100E+01*SUN;
+{ 14612} GDK500E+HV               =       GDK4002 +      GCO                                    :  0.100E+01*SUN;
+{ 14613} GDK500E+HV               =       GD03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 14614} G2D500S +GNO                =       G1D500d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14615} G2D500S +GNO                =       GND500z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14616} G2D500S +GHO2               =       GHD500v                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14617} G2D500S +GNO3               =       G1D500d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14618} G2D500S +MEPERO             =  0.340G1D500d + 0.330GDK500U + 0.330GDK500W                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14619} G2D500S +PERO1              =  0.460G1D500d + 0.270GDK500U + 0.270GDK500W                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14620} G2D500S +PERO2              =  0.400G1D500d + 0.300GDK500U + 0.300GDK500W                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14621} G2D500S +PERO3              =  0.460G1D500d + 0.270GDK500U + 0.270GDK500W                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14622} G2D500S +PERO5              =  0.460G1D500d + 0.270GDK500U + 0.270GDK500W                 : ARR( 0.183E-11,   450., 0.0);
+{ 14623} G2D500S +PERO6              =  0.300G1D500d + 0.350GDK500U + 0.350GDK500W                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14624} G2D500S +PERO9              =  0.650G1D500d + 0.350GDK500W                                : ARR( 0.100E-10,     0., 0.0);
+{ 14625} G1D500d                     =       GD02000 +      G3D2000 +      GCO                     : ARR( 0.200E+15,  3036., 0.0);
+{ 14626} GO03001 +GHO                =       GK03000 +      GHO2                                   : ARR( 0.270E-11,  -190., 0.0);
+{ 14627} GGN4005 +GHO                =       GGN400J +      GHO2                                   : ARR( 0.180E-11,     0., 0.0);
+{ 14628} GGN4005 +GHO                =       G3N400C                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 14629} GGN4005+HV               =       G1G4000 +      GNO2                                   :  0.100E+01*SUN;
+{ 14630} GGN4005+HV               =       GDO3001 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 14631} GGH4001 +GHO                =       GGH400C +      GHO2                                   : ARR( 0.844E-11,     0., 0.0);
+{ 14632} GGH4001 +GHO                =       GGK4001 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 14633} GGH4001 +GHO                =       G2G4000                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 14634} GGH4001 +GHO                =       G3H400A                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 14635} GGH4001+HV               =       G1G4000 +      GHO                                    :  0.100E+01*SUN;
+{ 14636} GGH4001+HV               =       GDO3001 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 14637} GGO4003 +GHO                =       GGK4005 +      GHO2                                   : ARR( 0.858E-11,     0., 0.0);
+{ 14638} GGO4003 +GHO                =       GGK4001 +      GHO2                                   : ARR( 0.644E-11,     0., 0.0);
+{ 14639} GGO4003 +GHO                =       G3K4008                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 14640} GGO4003+HV               =       GDO3001 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 14641} GGK4001 +GHO                =       G2G400B                                               : ARR( 0.539E-12,     0., 0.0);
+{ 14642} GGK4001 +GHO                =       GGK4006 +      GHO2                                   : ARR( 0.519E-11,     0., 0.0);
+{ 14643} GGK4001 +GHO                =       G3K400A                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 14644} GGK4001+HV               =       GAO3001 +      GCO2                                   :  0.100E+01*SUN;
+{ 14645} G2G400B +GNO                =       G1G400D +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14646} G2G400B +GNO                =       GGN400D                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14647} G2G400B +GHO2               =       GGH400F                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14648} G2G400B +GNO3               =       G1G400D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14649} G2G400B +MEPERO             =  0.480G1G400D + 0.260GGK4007 + 0.260GGD4003                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14650} G2G400B +PERO1              =  0.600G1G400D + 0.200GGK4007 + 0.200GGD4003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14651} G2G400B +PERO2              =  0.560G1G400D + 0.220GGK4007 + 0.220GGD4003                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14652} G2G400B +PERO3              =  0.600G1G400D + 0.200GGK4007 + 0.200GGD4003                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14653} G2G400B +PERO5              =  0.600G1G400D + 0.200GGK4007 + 0.200GGD4003                 : ARR( 0.533E-11,   500., 0.0);
+{ 14654} G2G400B +PERO6              =  0.460G1G400D + 0.270GGK4007 + 0.270GGD4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14655} G2G400B +PERO9              =  0.800G1G400D + 0.200GGD4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 14656} G3K400A +GHO2               =  0.800GGK4001 + 0.200GAK4001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14657} G3K400A +GNO                =       G3K3002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 14658} G3K400A +GNO2               =       GPK4001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14659} G3K400A +GNO3               =       G3K3002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 14660} G3K400A +MEPERO             =  0.685G3K3002 + 0.315GAK4001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14661} G3K400A +PERO1              =  0.800G3K3002 + 0.200GAK4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14662} G3K400A +PERO2              =  0.750G3K3002 + 0.250GAK4001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14663} G3K400A +PERO3              =  0.800G3K3002 + 0.200GAK4001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14664} G3K400A +PERO5              =  0.650G3K3002 + 0.350GAK4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14665} G3K400A +PERO6              =  0.650G3K3002 + 0.350GAK4001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14666} G3K400A +PERO9              =       G3K3002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 14667} G1G400D                     =       GGD3002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4155., 0.0);
+{ 14668} GAN4005 +GHO                =       G2A400G                                               : ARR( 0.171E-12,     0., 0.0);
+{ 14669} GAN4005 +GHO                =       GAN400M +      GHO2                                   : ARR( 0.171E-11,     0., 0.0);
+{ 14670} GAN4005 +GHO                =       G1A400G                                               : ARR( 0.214E-17,    85., 2.0);
+{ 14671} GAN4005 +GHO                =       GDO3001 +      GNO2    +      GCO2                    : ARR( 0.531E-12,     0., 0.0);
+{ 14672} GAN4005+HV               =       G1A4000 +      GNO2                                   :  0.100E+01*SUN;
+{ 14673} G2A400G +GNO                =       G1A400I +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14674} G2A400G +GNO                =       GAN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14675} G2A400G +GHO2               =       GAH400H                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14676} G2A400G +GNO3               =       G1A400I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14677} G2A400G +MEPERO             =  0.480G1A400I + 0.260GAN400O + 0.260GAN400P                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14678} G2A400G +PERO1              =  0.600G1A400I + 0.200GAN400O + 0.200GAN400P                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14679} G2A400G +PERO2              =  0.560G1A400I + 0.220GAN400O + 0.220GAN400P                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14680} G2A400G +PERO3              =  0.600G1A400I + 0.200GAN400O + 0.200GAN400P                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14681} G2A400G +PERO5              =  0.600G1A400I + 0.200GAN400O + 0.200GAN400P                 : ARR( 0.533E-11,   500., 0.0);
+{ 14682} G2A400G +PERO6              =  0.460G1A400I + 0.270GAN400O + 0.270GAN400P                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14683} G2A400G +PERO9              =  0.800G1A400I + 0.200GAN400P                                : ARR( 0.100E-10,     0., 0.0);
+{ 14684} G1A400I                     =       GAN3006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{ 14685} GAH4001 +GHO                =       GAH400D +      GHO2                                   : ARR( 0.860E-11,     0., 0.0);
+{ 14686} GAH4001 +GHO                =       GAK4001 +      GHO                                    : ARR( 0.191E-10,     0., 0.0);
+{ 14687} GAH4001 +GHO                =       G2A4000                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 14688} GAH4001+HV               =       G1A4000 +      GHO                                    :  0.100E+01*SUN;
+{ 14689} GAO4003 +GHO                =       GAK4005 +      GHO2                                   : ARR( 0.900E-11,     0., 0.0);
+{ 14690} GAO4003 +GHO                =       GAK4001 +      GHO2                                   : ARR( 0.499E-11,     0., 0.0);
+{ 14691} GAK4001 +GHO                =       G2A400H                                               : ARR( 0.543E-12,     0., 0.0);
+{ 14692} GAK4001 +GHO                =       GAK4006 +      GHO2                                   : ARR( 0.522E-11,     0., 0.0);
+{ 14693} GAK4001 +GHO                =       G3K3002 +      GCO2                                   : ARR( 0.532E-12,     0., 0.0);
+{ 14694} GAK4001+HV               =       GDO3001 +      GCO2                                   :  0.100E+01*SUN;
+{ 14695} G2A400H +GNO                =       G1A400J +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14696} G2A400H +GNO                =       GAN400D                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14697} G2A400H +GHO2               =       GAH400I                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14698} G2A400H +GNO3               =       G1A400J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14699} G2A400H +MEPERO             =  0.480G1A400J + 0.260GAK4007 + 0.260GAD4004                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14700} G2A400H +PERO1              =  0.600G1A400J + 0.200GAK4007 + 0.200GAD4004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14701} G2A400H +PERO2              =  0.560G1A400J + 0.220GAK4007 + 0.220GAD4004                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14702} G2A400H +PERO3              =  0.600G1A400J + 0.200GAK4007 + 0.200GAD4004                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14703} G2A400H +PERO5              =  0.600G1A400J + 0.200GAK4007 + 0.200GAD4004                 : ARR( 0.533E-11,   500., 0.0);
+{ 14704} G2A400H +PERO6              =  0.460G1A400J + 0.270GAK4007 + 0.270GAD4004                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14705} G2A400H +PERO9              =  0.800G1A400J + 0.200GAD4004                                : ARR( 0.100E-10,     0., 0.0);
+{ 14706} G1A400J                     =       GAD3002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4155., 0.0);
+{ 14707} GPN4005                     =       G3N400C +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14708} GPN4005 +GHO                =       G2P400H                                               : ARR( 0.174E-12,     0., 0.0);
+{ 14709} GPN4005 +GHO                =       GPN400M +      GHO2                                   : ARR( 0.174E-11,     0., 0.0);
+{ 14710} GPN4005 +GHO                =       G1P400G                                               : ARR( 0.218E-17,    85., 2.0);
+{ 14711} GPN4005+HV               =       G1P4000 +      GNO2                                   :  0.100E+01*SUN;
+{ 14712} GPN4005+HV               =       G3N400C +      GNO2                                   :  0.100E+01*SUN;
+{ 14713} G2P400H +GNO                =       G1P400I +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14714} G2P400H +GNO                =       GPN400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14715} G2P400H +GHO2               =       GPH400I                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14716} G2P400H +GNO3               =       G1P400I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14717} G2P400H +MEPERO             =  0.480G1P400I + 0.260GPN400O + 0.260GPN400P                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14718} G2P400H +PERO1              =  0.600G1P400I + 0.200GPN400O + 0.200GPN400P                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14719} G2P400H +PERO2              =  0.560G1P400I + 0.220GPN400O + 0.220GPN400P                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14720} G2P400H +PERO3              =  0.600G1P400I + 0.200GPN400O + 0.200GPN400P                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14721} G2P400H +PERO5              =  0.600G1P400I + 0.200GPN400O + 0.200GPN400P                 : ARR( 0.533E-11,   500., 0.0);
+{ 14722} G2P400H +PERO6              =  0.460G1P400I + 0.270GPN400O + 0.270GPN400P                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14723} G2P400H +PERO9              =  0.800G1P400I + 0.200GPN400P                                : ARR( 0.100E-10,     0., 0.0);
+{ 14724} G1P400I                     =       GPN3006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{ 14725} GPH4001                     =       G3H400A +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14726} GPH4001 +GHO                =       GPH400E +      GHO2                                   : ARR( 0.845E-11,     0., 0.0);
+{ 14727} GPH4001 +GHO                =       GPK4001 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 14728} GPH4001 +GHO                =       G2P4000                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 14729} GPH4001+HV               =       G1P4000 +      GHO                                    :  0.100E+01*SUN;
+{ 14730} GPH4001+HV               =       G3H400A +      GNO2                                   :  0.100E+01*SUN;
+{ 14731} GPO4003                     =       G3K4008 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14732} GPO4003 +GHO                =       GPK4005 +      GHO2                                   : ARR( 0.863E-11,     0., 0.0);
+{ 14733} GPO4003 +GHO                =       GPK4001 +      GHO2                                   : ARR( 0.647E-11,     0., 0.0);
+{ 14734} GPO4003+HV               =       G3K4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 14735} GPK4001                     =       G3K400A +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14736} GPK4001 +GHO                =       G2P400I                                               : ARR( 0.545E-12,     0., 0.0);
+{ 14737} GPK4001 +GHO                =       GPK4006 +      GHO2                                   : ARR( 0.523E-11,     0., 0.0);
+{ 14738} GPK4001+HV               =       G3K3002 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 14739} G2P400I +GNO                =       G1P400J +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14740} G2P400I +GNO                =       GPN400D                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14741} G2P400I +GHO2               =       GPH400J                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14742} G2P400I +GNO3               =       G1P400J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14743} G2P400I +MEPERO             =  0.480G1P400J + 0.260GPK4007 + 0.260GPD4004                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14744} G2P400I +PERO1              =  0.600G1P400J + 0.200GPK4007 + 0.200GPD4004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14745} G2P400I +PERO2              =  0.560G1P400J + 0.220GPK4007 + 0.220GPD4004                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14746} G2P400I +PERO3              =  0.600G1P400J + 0.200GPK4007 + 0.200GPD4004                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14747} G2P400I +PERO5              =  0.600G1P400J + 0.200GPK4007 + 0.200GPD4004                 : ARR( 0.533E-11,   500., 0.0);
+{ 14748} G2P400I +PERO6              =  0.460G1P400J + 0.270GPK4007 + 0.270GPD4004                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14749} G2P400I +PERO9              =  0.800G1P400J + 0.200GPD4004                                : ARR( 0.100E-10,     0., 0.0);
+{ 14750} G1P400J                     =       GPD3002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4155., 0.0);
+{ 14751} GHN501l +GHO                =       GNN5018 +      GHO                                    : ARR( 0.836E-11,     0., 0.0);
+{ 14752} GHN501l +GHO                =       GHN504d +      GHO2                                   : ARR( 0.408E-11,     0., 0.0);
+{ 14753} GHN501l +GHO                =       G2N501P                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 14754} GHN501l+HV               =       G1H501J +      GNO2                                   :  0.100E+01*SUN;
+{ 14755} GHN501l+HV               =       G1H503I +      GNO2                                   :  0.100E+01*SUN;
+{ 14756} GHN501l+HV               =       G1N501S +      GHO                                    :  0.100E+01*SUN;
+{ 14757} G1H503I                     =       GND3001 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4784., 0.0);
+{ 14758} GNN5017 +GHO                =       GNN5018 +      GHO2                                   : ARR( 0.218E-11,     0., 0.0);
+{ 14759} GNN5017 +GHO                =       GNN502Z +      GHO2                                   : ARR( 0.426E-11,     0., 0.0);
+{ 14760} GNN5017+HV               =       G1N5045 +      GNO2                                   :  0.100E+01*SUN;
+{ 14761} GNN5017+HV               =       G1N5046 +      GNO2                                   :  0.100E+01*SUN;
+{ 14762} G1N5045                     =       GND500P +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 14763} G1N5046                     =       GND3001 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{ 14764} GNN5018 +GHO                =       GNN502X +      GHO2                                   : ARR( 0.252E-11,     0., 0.0);
+{ 14765} GNN5018 +GHO                =       G1N503Z                                               : ARR( 0.215E-17,    85., 2.0);
+{ 14766} GNN5018+HV               =       G1N503S +      GNO2                                   :  0.100E+01*SUN;
+{ 14767} GNN5018+HV               =       G1N501X +      GNO2                                   :  0.100E+01*SUN;
+{ 14768} GNN5018+HV               =       G3N4009 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 14769} GNN5018+HV               =       G2D2000 +      GNK3001 +      GNO2                    :  0.100E+01*SUN;
+{ 14770} GNN4007 +GHO                =       G3N4009                                               : ARR( 0.422E-11,     0., 0.0);
+{ 14771} GNN4007 +GNO3               =       G3N4009 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14772} GNN4007+HV               =       G1N400f +      GNO2                                   :  0.100E+01*SUN;
+{ 14773} GNN4007+HV               =       G1N400g +      GNO2                                   :  0.100E+01*SUN;
+{ 14774} GNN4007+HV               =       GND3001 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 14775} GNN4007+HV               =       G2D2000 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 14776} G1N400f                     =       GD02000 +      GDD2000 +      GNO2                    : ARR( 0.200E+15,  6261., 0.0);
+{ 14777} G1N400g                     =       GND3001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 14778} GHN501m +GHO                =       GND500Q +      GHO                                    : ARR( 0.686E-11,     0., 0.0);
+{ 14779} GHN501m +GHO                =       G3H500L                                               : ARR( 0.213E-10,     0., 0.0);
+{ 14780} GHN501m +GHO                =       G2N503d                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 14781} GHN501m +GNO3               =       G3H500L +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14782} GHN501m+HV               =       G1N503e +      GHO                                    :  0.100E+01*SUN;
+{ 14783} GHN501m+HV               =       G1H500e +      GNO2                                   :  0.100E+01*SUN;
+{ 14784} GHN501m+HV               =       G2H400R +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 14785} GHN501m+HV               =       GDK3000 +      GD02000 +      GNO2    +      GHO      :  0.100E+01*SUN;
+{ 14786} G3H500L +GHO2               =  0.800GGH500L + 0.200GAH500M + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14787} G3H500L +GNO                =       G2H400R +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 14788} G3H500L +GNO2               =       GPH500M                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14789} G3H500L +GNO3               =       G2H400R +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 14790} G3H500L +MEPERO             =  0.685G2H400R + 0.315GAH500M + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14791} G3H500L +PERO1              =  0.800G2H400R + 0.200GAH500M + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14792} G3H500L +PERO2              =  0.750G2H400R + 0.250GAH500M + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14793} G3H500L +PERO3              =  0.800G2H400R + 0.200GAH500M + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14794} G3H500L +PERO5              =  0.650G2H400R + 0.350GAH500M + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14795} G3H500L +PERO6              =  0.650G2H400R + 0.350GAH500M + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 14796} G3H500L +PERO9              =       G2H400R +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 14797} G2N503d +GNO                =       G1N503e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14798} G2N503d +GNO                =       GNN500x                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14799} G2N503d +GHO2               =       GHN501m                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14800} G2N503d +GNO3               =       G1N503e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14801} G2N503d +MEPERO             =  0.340G1N503e + 0.330GND5005 + 0.330GND500Q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14802} G2N503d +PERO1              =  0.460G1N503e + 0.270GND5005 + 0.270GND500Q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14803} G2N503d +PERO2              =  0.400G1N503e + 0.300GND5005 + 0.300GND500Q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14804} G2N503d +PERO3              =  0.460G1N503e + 0.270GND5005 + 0.270GND500Q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14805} G2N503d +PERO5              =  0.460G1N503e + 0.270GND5005 + 0.270GND500Q                 : ARR( 0.183E-11,   450., 0.0);
+{ 14806} G2N503d +PERO6              =  0.300G1N503e + 0.350GND5005 + 0.350GND500Q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14807} G2N503d +PERO9              =  0.650G1N503e + 0.350GND500Q                                : ARR( 0.100E-10,     0., 0.0);
+{ 14808} G2H400R +GNO                =       G1H400T +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14809} G2H400R +GNO                =       GHN400c                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14810} G2H400R +GHO2               =       GHH400N                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14811} G2H400R +GNO3               =       G1H400T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14812} G2H400R +MEPERO             =  0.480G1H400T + 0.260GHN400d + 0.260GHN400p                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14813} G2H400R +PERO1              =  0.600G1H400T + 0.200GHN400d + 0.200GHN400p                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14814} G2H400R +PERO2              =  0.560G1H400T + 0.220GHN400d + 0.220GHN400p                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14815} G2H400R +PERO3              =  0.600G1H400T + 0.200GHN400d + 0.200GHN400p                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14816} G2H400R +PERO5              =  0.600G1H400T + 0.200GHN400d + 0.200GHN400p                 : ARR( 0.533E-11,   500., 0.0);
+{ 14817} G2H400R +PERO6              =  0.460G1H400T + 0.270GHN400d + 0.270GHN400p                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14818} G2H400R +PERO9              =  0.800G1H400T + 0.200GHN400p                                : ARR( 0.100E-10,     0., 0.0);
+{ 14819} G1H400T +OXYGEN             =       GHN400p +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 14820} G1H400T                     =       G2H400S                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 14821} G1H400T                     =       GHD3002 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 14822} G2H400S +GNO                =       G1H400U +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14823} G2H400S +GNO                =       GHN400s                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14824} G2H400S +GHO2               =       GHH400O                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14825} G2H400S +GNO3               =       G1H400U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14826} G2H400S +MEPERO             =  0.480G1H400U + 0.260GHN400e + 0.260GHN400h                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14827} G2H400S +PERO1              =  0.600G1H400U + 0.200GHN400e + 0.200GHN400h                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14828} G2H400S +PERO2              =  0.560G1H400U + 0.220GHN400e + 0.220GHN400h                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14829} G2H400S +PERO3              =  0.600G1H400U + 0.200GHN400e + 0.200GHN400h                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14830} G2H400S +PERO5              =  0.600G1H400U + 0.200GHN400e + 0.200GHN400h                 : ARR( 0.533E-11,   500., 0.0);
+{ 14831} G2H400S +PERO6              =  0.460G1H400U + 0.270GHN400e + 0.270GHN400h                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14832} G2H400S +PERO9              =  0.800G1H400U + 0.200GHN400h                                : ARR( 0.100E-10,     0., 0.0);
+{ 14833} G1H400U                     =       GHN400L +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{ 14834} G1H400U                     =       GND3004 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 14835} GHN501n +GHO                =       GNK500h +      GHO                                    : ARR( 0.841E-11,     0., 0.0);
+{ 14836} GHN501n +GHO                =       GHN504e +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{ 14837} GHN501n +GHO                =       G2N501Q                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 14838} GHN501n+HV               =       G3K2000 +      GHD3003 +      GNO2                    :  0.100E+01*SUN;
+{ 14839} GHN501n+HV               =       GNK3000 +      GHD2000                                :  0.100E+01*SUN;
+{ 14840} GHN501n+HV               =       G1H503J +      GNO2                                   :  0.100E+01*SUN;
+{ 14841} GHN501n+HV               =       G1N501T +      GHO                                    :  0.100E+01*SUN;
+{ 14842} G1H503J                     =       G3K2000 +      GHD3003                                : ARR( 0.200E+15,  2923., 0.0);
+{ 14843} GNK500h +GHO                =       GND5018 +      GHO2                                   : ARR( 0.259E-11,     0., 0.0);
+{ 14844} GNK500h +GHO                =       G1N5044                                               : ARR( 0.222E-17,    85., 2.0);
+{ 14845} GNK500h+HV               =       G3K2000 +      GDK3001 +      GNO2                    :  0.100E+01*SUN;
+{ 14846} GNK500h+HV               =       G1K500R +      GNO2                                   :  0.100E+01*SUN;
+{ 14847} GNK500h+HV               =       G3N400D +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 14848} GND4008 +GHO                =       G3N400D                                               : ARR( 0.430E-11,     0., 0.0);
+{ 14849} GND4008 +GNO3               =       G3N400D +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14850} GND4008+HV               =       G3K2000 +      GDD2000 +      GNO2                    :  0.100E+01*SUN;
+{ 14851} GND4008+HV               =       G1D400D +      GNO2                                   :  0.100E+01*SUN;
+{ 14852} GND4008+HV               =       GDK3000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 14853} G1D400D                     =       G3K2000 +      GDD2000                                : ARR( 0.200E+15,  4867., 0.0);
+{ 14854} GHN501o +GHO                =       GHN502E +      GHO2                                   : ARR( 0.209E-11,     0., 0.0);
+{ 14855} GHN501o +GHO                =       GNN5019 +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 14856} GHN501o +GHO                =       G2N501R                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 14857} GHN501o+HV               =       G1H502y +      GNO2                                   :  0.100E+01*SUN;
+{ 14858} GHN501o+HV               =       G1H503K +      GNO2                                   :  0.100E+01*SUN;
+{ 14859} GHN501o+HV               =       G1N501U +      GHO                                    :  0.100E+01*SUN;
+{ 14860} G1H503K                     =       GND3000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{ 14861} GNN5019 +GHO                =       GNN501u +      GHO2                                   : ARR( 0.129E-11,     0., 0.0);
+{ 14862} GNN5019 +GHO                =       G3N500W                                               : ARR( 0.214E-10,     0., 0.0);
+{ 14863} GNN5019 +GNO3               =       G3N500W +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14864} GNN5019+HV               =       G1N503l +      GNO2                                   :  0.100E+01*SUN;
+{ 14865} GNN5019+HV               =       G1N503P +      GNO2                                   :  0.100E+01*SUN;
+{ 14866} GNN5019+HV               =       GNN4008 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 14867} G3N500W +GHO2               =  0.800GGN500h + 0.200GAN500a + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 14868} G3N500W +GNO                =       GNN4008 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 14869} G3N500W +GNO2               =       GPN500a                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 14870} G3N500W +GNO3               =       GNN4008 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 14871} G3N500W +MEPERO             =  0.685GNN4008 + 0.315GAN500a + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14872} G3N500W +PERO1              =  0.800GNN4008 + 0.200GAN500a + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14873} G3N500W +PERO2              =  0.750GNN4008 + 0.250GAN500a + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14874} G3N500W +PERO3              =  0.800GNN4008 + 0.200GAN500a + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14875} G3N500W +PERO5              =  0.650GNN4008 + 0.350GAN500a + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14876} G3N500W +PERO6              =  0.650GNN4008 + 0.350GAN500a + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 14877} G3N500W +PERO9              =       GNN4008 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 14878} GNN4008 +GHO                =       G3N4005                                               : ARR( 0.433E-11,     0., 0.0);
+{ 14879} GNN4008 +GNO3               =       G3N4005 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 14880} GNN4008+HV               =       G1N400h +      GNO2                                   :  0.100E+01*SUN;
+{ 14881} GNN4008+HV               =       G1N400i +      GNO2                                   :  0.100E+01*SUN;
+{ 14882} GNN4008+HV               =       GND3000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 14883} GNN4008+HV               =       G2D2000 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 14884} G1N400h +OXYGEN             =       GND400D +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 14885} G1N400h                     =       G3N4008                                               : ARR( 0.800E+11,  5278., 0.0);
+{ 14886} G1N400i                     =       GND3000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 14887} GGN5006 +GHO                =       GGN500Q +      GHO2                                   : ARR( 0.187E-11,     0., 0.0);
+{ 14888} GGN5006 +GHO                =       G3N5005                                               : ARR( 0.212E-11,  -190., 0.0);
+{ 14889} GGN5006+HV               =       G1G5003 +      GNO2                                   :  0.100E+01*SUN;
+{ 14890} GGN5006+HV               =       G2N4009 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 14891} GAN5006 +GHO                =       G2A500c                                               : ARR( 0.184E-12,     0., 0.0);
+{ 14892} GAN5006 +GHO                =       GAN500S +      GHO2                                   : ARR( 0.184E-11,     0., 0.0);
+{ 14893} GAN5006 +GHO                =       G1A500G                                               : ARR( 0.231E-17,    85., 2.0);
+{ 14894} GAN5006 +GHO                =       G2N4009 +      GCO2                                   : ARR( 0.571E-12,     0., 0.0);
+{ 14895} GAN5006+HV               =       G1A5003 +      GNO2                                   :  0.100E+01*SUN;
+{ 14896} G2A500c +GNO                =       G1A500d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14897} G2A500c +GNO                =       GAN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14898} G2A500c +GHO2               =       GAH500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14899} G2A500c +GNO3               =       G1A500d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14900} G2A500c +MEPERO             =  0.480G1A500d + 0.260GAN500N + 0.260GAN500o                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14901} G2A500c +PERO1              =  0.600G1A500d + 0.200GAN500N + 0.200GAN500o                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14902} G2A500c +PERO2              =  0.560G1A500d + 0.220GAN500N + 0.220GAN500o                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14903} G2A500c +PERO3              =  0.600G1A500d + 0.200GAN500N + 0.200GAN500o                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14904} G2A500c +PERO5              =  0.600G1A500d + 0.200GAN500N + 0.200GAN500o                 : ARR( 0.533E-11,   500., 0.0);
+{ 14905} G2A500c +PERO6              =  0.460G1A500d + 0.270GAN500N + 0.270GAN500o                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14906} G2A500c +PERO9              =  0.800G1A500d + 0.200GAN500o                                : ARR( 0.100E-10,     0., 0.0);
+{ 14907} G1A500d                     =       GAN400J +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 14908} GPN5006                     =       G3N5005 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 14909} GPN5006 +GHO                =       G2P500d                                               : ARR( 0.168E-12,     0., 0.0);
+{ 14910} GPN5006 +GHO                =       GPN500S +      GHO2                                   : ARR( 0.168E-11,     0., 0.0);
+{ 14911} GPN5006 +GHO                =       GPK5003 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 14912} GPN5006 +GHO                =       G2P500e                                               : ARR( 0.172E-12,     0., 0.0);
+{ 14913} GPN5006 +GHO                =       G1P500G                                               : ARR( 0.210E-17,    85., 2.0);
+{ 14914} GPN5006+HV               =       G1P5003 +      GNO2                                   :  0.100E+01*SUN;
+{ 14915} GPN5006+HV               =       G3N5005 +      GNO2                                   :  0.100E+01*SUN;
+{ 14916} G2P500d +GNO                =       G1P500e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14917} G2P500d +GNO                =       GPN500H                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14918} G2P500d +GHO2               =       GPH500G                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14919} G2P500d +GNO3               =       G1P500e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14920} G2P500d +MEPERO             =  0.480G1P500e + 0.260GPN500N + 0.260GPN500p                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14921} G2P500d +PERO1              =  0.600G1P500e + 0.200GPN500N + 0.200GPN500p                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14922} G2P500d +PERO2              =  0.560G1P500e + 0.220GPN500N + 0.220GPN500p                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14923} G2P500d +PERO3              =  0.600G1P500e + 0.200GPN500N + 0.200GPN500p                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14924} G2P500d +PERO5              =  0.600G1P500e + 0.200GPN500N + 0.200GPN500p                 : ARR( 0.533E-11,   500., 0.0);
+{ 14925} G2P500d +PERO6              =  0.460G1P500e + 0.270GPN500N + 0.270GPN500p                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14926} G2P500d +PERO9              =  0.800G1P500e + 0.200GPN500p                                : ARR( 0.100E-10,     0., 0.0);
+{ 14927} G2P500e +GNO                =       G1P500f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14928} G2P500e +GNO                =       GPN500n                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14929} G2P500e +GHO2               =       GPH500l                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14930} G2P500e +GNO3               =       G1P500f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14931} G2P500e +MEPERO             =  0.340G1P500f + 0.330GPN500o + 0.330GPN500q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 14932} G2P500e +PERO1              =  0.460G1P500f + 0.270GPN500o + 0.270GPN500q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 14933} G2P500e +PERO2              =  0.400G1P500f + 0.300GPN500o + 0.300GPN500q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 14934} G2P500e +PERO3              =  0.460G1P500f + 0.270GPN500o + 0.270GPN500q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14935} G2P500e +PERO5              =  0.460G1P500f + 0.270GPN500o + 0.270GPN500q                 : ARR( 0.183E-11,   450., 0.0);
+{ 14936} G2P500e +PERO6              =  0.300G1P500f + 0.350GPN500o + 0.350GPN500q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 14937} G2P500e +PERO9              =  0.650G1P500f + 0.350GPN500q                                : ARR( 0.100E-10,     0., 0.0);
+{ 14938} G1P500e                     =       GPN400H +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 14939} G1P500f                     =       G2P500f                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 14940} G1P500f                     =       GND4007 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 14941} G2P500f +GNO                =       G1P500g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 14942} G2P500f +GNO                =       GPN500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 14943} G2P500f +GHO2               =       GPH500m                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 14944} G2P500f +GNO3               =       G1P500g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14945} G2P500f +MEPERO             =  0.480G1P500g + 0.260GPN500s + 0.260GPN500t                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14946} G2P500f +PERO1              =  0.600G1P500g + 0.200GPN500s + 0.200GPN500t                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14947} G2P500f +PERO2              =  0.560G1P500g + 0.220GPN500s + 0.220GPN500t                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14948} G2P500f +PERO3              =  0.600G1P500g + 0.200GPN500s + 0.200GPN500t                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14949} G2P500f +PERO5              =  0.600G1P500g + 0.200GPN500s + 0.200GPN500t                 : ARR( 0.533E-11,   500., 0.0);
+{ 14950} G2P500f +PERO6              =  0.460G1P500g + 0.270GPN500s + 0.270GPN500t                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14951} G2P500f +PERO9              =  0.800G1P500g + 0.200GPN500t                                : ARR( 0.100E-10,     0., 0.0);
+{ 14952} G1P500g                     =       GPN500u +      GHO2                                   : ARR( 0.800E+11,  2965., 0.0);
+{ 14953} G1P500g                     =       GPN400Q +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 14954} GNN4009 +GHO                =       G2N400d                                               : ARR( 0.170E-12,     0., 0.0);
+{ 14955} GNN4009 +GHO                =       GNN400M +      GHO2                                   : ARR( 0.170E-11,     0., 0.0);
+{ 14956} GNN4009 +GHO                =       G1N400P                                               : ARR( 0.213E-17,    85., 2.0);
+{ 14957} GNN4009+HV               =       G1N400j +      GNO2                                   :  0.100E+01*SUN;
+{ 14958} GNN4009+HV               =       G1N4009 +      GNO2                                   :  0.100E+01*SUN;
+{ 14959} G2N400d +GNO                =       G1N400k +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 14960} G2N400d +GNO                =       GNN400H                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 14961} G2N400d +GHO2               =       GHN400X                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 14962} G2N400d +GNO3               =       G1N400k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 14963} G2N400d +MEPERO             =  0.480G1N400k + 0.260GNN400K + 0.260GNN400T                 : ARR( 0.164E-12,  -795., 0.0);
+{ 14964} G2N400d +PERO1              =  0.600G1N400k + 0.200GNN400K + 0.200GNN400T                 : ARR( 0.126E-12,  -850., 0.0);
+{ 14965} G2N400d +PERO2              =  0.560G1N400k + 0.220GNN400K + 0.220GNN400T                 : ARR( 0.471E-13, -1350., 0.0);
+{ 14966} G2N400d +PERO3              =  0.600G1N400k + 0.200GNN400K + 0.200GNN400T                 : ARR( 0.142E-12, -1200., 0.0);
+{ 14967} G2N400d +PERO5              =  0.600G1N400k + 0.200GNN400K + 0.200GNN400T                 : ARR( 0.533E-11,   500., 0.0);
+{ 14968} G2N400d +PERO6              =  0.460G1N400k + 0.270GNN400K + 0.270GNN400T                 : ARR( 0.488E-13, -1250., 0.0);
+{ 14969} G2N400d +PERO9              =  0.800G1N400k + 0.200GNN400T                                : ARR( 0.100E-10,     0., 0.0);
+{ 14970} G1N400j                     =       GD02000 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  4020., 0.0);
+{ 14971} G1N400k                     =       GNN3005 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 14972} GHN400B +GHO                =       GHN400r +      GHO2                                   : ARR( 0.176E-11,     0., 0.0);
+{ 14973} GHN400B +GHO                =       GND4007 +      GHO                                    : ARR( 0.338E-11,     0., 0.0);
+{ 14974} GHN400B +GHO                =       G2N4009                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 14975} GHN400B+HV               =       G1H400W +      GNO2                                   :  0.100E+01*SUN;
+{ 14976} GHN400B+HV               =       G1N4009 +      GHO                                    :  0.100E+01*SUN;
+{ 14977} G1H400W                     =       GD02000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  4022., 0.0);
+{ 14978} GNO4008 +GHO                =       G2N400A                                               : ARR( 0.193E-12,     0., 0.0);
+{ 14979} GNO4008 +GHO                =       GNK4007 +      GHO2                                   : ARR( 0.193E-11,     0., 0.0);
+{ 14980} GNO4008 +GHO                =       GND4007 +      GHO2                                   : ARR( 0.925E-12,     0., 0.0);
+{ 14981} GNO4008+HV               =       G1O4009 +      GNO2                                   :  0.100E+01*SUN;
+{ 14982} GNN400A +GHO                =       GNN400F +      GHO2                                   : ARR( 0.827E-12,     0., 0.0);
+{ 14983} GNN400A +GHO                =       GNK4005 +      GNO2                                   : ARR( 0.121E-12,     0., 0.0);
+{ 14984} GNN400A +GHO                =       GNN400U +      GHO2                                   : ARR( 0.424E-12,     0., 0.0);
+{ 14985} GNN400A +GHO                =       G1N400G                                               : ARR( 0.216E-17,    85., 2.0);
+{ 14986} GNN400A +GHO                =       G1N400l                                               : ARR( 0.216E-17,    85., 2.0);
+{ 14987} GNN400A+HV               =       G1N400B +      GNO2                                   :  0.100E+01*SUN;
+{ 14988} GNN400A+HV               =       G1N400A +      GNO2                                   :  0.100E+01*SUN;
+{ 14989} G1N400l                     =       GDO2000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6380., 0.0);
+{ 14990} GHN400C +GHO                =       GHN400t +      GHO2                                   : ARR( 0.217E-11,     0., 0.0);
+{ 14991} GHN400C +GHO                =       GND4009 +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{ 14992} GHN400C +GHO                =       G2N400A                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 14993} GHN400C+HV               =       G1H400X +      GNO2                                   :  0.100E+01*SUN;
+{ 14994} GHN400C+HV               =       G1N400A +      GHO                                    :  0.100E+01*SUN;
+{ 14995} G1H400X                     =       GDO2000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3635., 0.0);
+{ 14996} GNO4009 +GHO                =       GND4009 +      GHO2                                   : ARR( 0.434E-11,     0., 0.0);
+{ 14997} GNO4009 +GHO                =       GNK4008 +      GHO2                                   : ARR( 0.222E-11,     0., 0.0);
+{ 14998} GNO4009 +GHO                =       GND400A +      GHO2                                   : ARR( 0.867E-12,     0., 0.0);
+{ 14999} GNO4009+HV               =       G1O400A +      GNO2                                   :  0.100E+01*SUN;
+{ 15000} GND4009 +GHO                =       GND400K +      GHO2                                   : ARR( 0.134E-11,     0., 0.0);
+{ 15001} GND4009 +GHO                =       G3N400E                                               : ARR( 0.221E-10,     0., 0.0);
+{ 15002} GND4009 +GNO3               =       G3N400E +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15003} GND4009+HV               =       G1D4002 +      GNO2                                   :  0.100E+01*SUN;
+{ 15004} GND4009+HV               =       GND3004 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15005} G3N400E +GHO2               =  0.800GGN400K + 0.200GAN400K + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15006} G3N400E +GNO                =       GND3004 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15007} G3N400E +GNO2               =       GPN400K                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15008} G3N400E +GNO3               =       GND3004 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15009} G3N400E +MEPERO             =  0.685GND3004 + 0.315GAN400K + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15010} G3N400E +PERO1              =  0.800GND3004 + 0.200GAN400K + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15011} G3N400E +PERO2              =  0.750GND3004 + 0.250GAN400K + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15012} G3N400E +PERO3              =  0.800GND3004 + 0.200GAN400K + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15013} G3N400E +PERO5              =  0.650GND3004 + 0.350GAN400K + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15014} G3N400E +PERO6              =  0.650GND3004 + 0.350GAN400K + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15015} G3N400E +PERO9              =       GND3004 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15016} GND400A +GHO                =       GND400J +      GHO2                                   : ARR( 0.416E-11,     0., 0.0);
+{ 15017} GND400A +GHO                =       GND400L +      GHO2                                   : ARR( 0.213E-11,     0., 0.0);
+{ 15018} GND400A +GHO                =       G3N400F                                               : ARR( 0.430E-11,     0., 0.0);
+{ 15019} GND400A +GNO3               =       G3N400F +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15020} GND400A+HV               =       G1D400E +      GNO2                                   :  0.100E+01*SUN;
+{ 15021} GND400A+HV               =       GDO3002 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 15022} GND400A+HV               =       GDO2000 +      GND2000                                :  0.100E+01*SUN;
+{ 15023} G3N400F +GHO2               =  0.800GGN400L + 0.200GAN400O + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15024} G3N400F +GNO                =       GDO3002 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15025} G3N400F +GNO2               =       GPN400O                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15026} G3N400F +GNO3               =       GDO3002 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15027} G3N400F +MEPERO             =  0.685GDO3002 + 0.315GAN400O + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15028} G3N400F +PERO1              =  0.800GDO3002 + 0.200GAN400O + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15029} G3N400F +PERO2              =  0.750GDO3002 + 0.250GAN400O + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15030} G3N400F +PERO3              =  0.800GDO3002 + 0.200GAN400O + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15031} G3N400F +PERO5              =  0.650GDO3002 + 0.350GAN400O + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15032} G3N400F +PERO6              =  0.650GDO3002 + 0.350GAN400O + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15033} G3N400F +PERO9              =       GDO3002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15034} G1D400E                     =       GDO2000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  5047., 0.0);
+{ 15035} G1D400E                     =       GDO3002 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 15036} GGH3001 +GHO                =       GGK3000 +      GHO                                    : ARR( 0.206E-10,     0., 0.0);
+{ 15037} GGH3001 +GHO                =       G2G3001                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15038} GGH3001 +GHO                =       G3H3001                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15039} GGH3001+HV               =       G1G3001 +      GHO                                    :  0.100E+01*SUN;
+{ 15040} GGH3001+HV               =       GD02000 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 15041} GGK3000 +GHO                =       G3K3004                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 15042} GGK3000+HV               =       GA02000 +      GCO2                                   :  0.100E+01*SUN;
+{ 15043} G3K3004 +GHO2               =  0.800GGK3000 + 0.200GAK3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15044} G3K3004 +GNO                =       G3K2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15045} G3K3004 +GNO2               =       GPK3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15046} G3K3004 +GNO3               =       G3K2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15047} G3K3004 +MEPERO             =  0.685G3K2000 + 0.315GAK3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15048} G3K3004 +PERO1              =  0.800G3K2000 + 0.200GAK3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15049} G3K3004 +PERO2              =  0.750G3K2000 + 0.250GAK3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15050} G3K3004 +PERO3              =  0.800G3K2000 + 0.200GAK3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15051} G3K3004 +PERO5              =  0.650G3K2000 + 0.350GAK3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15052} G3K3004 +PERO6              =  0.650G3K2000 + 0.350GAK3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15053} G3K3004 +PERO9              =       G3K2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15054} GAH3001 +GHO                =       GAK3000 +      GHO                                    : ARR( 0.157E-10,     0., 0.0);
+{ 15055} GAH3001 +GHO                =       G2A3001                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 15056} GAH3001+HV               =       G1A3001 +      GHO                                    :  0.100E+01*SUN;
+{ 15057} GAK3000 +GHO                =       G2A3006                                               : ARR( 0.102E-12,     0., 0.0);
+{ 15058} GAK3000 +GHO                =       G3K2000 +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 15059} GAK3000+HV               =       GCO2    +      GD02000                                :  0.100E+01*SUN;
+{ 15060} GPH3001                     =       G3H3001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15061} GPH3001 +GHO                =       GPK3000 +      GHO                                    : ARR( 0.206E-10,     0., 0.0);
+{ 15062} GPH3001 +GHO                =       G2P3001                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15063} GPH3001+HV               =       G1P3001 +      GHO                                    :  0.100E+01*SUN;
+{ 15064} GPH3001+HV               =       G3H3001 +      GNO2                                   :  0.100E+01*SUN;
+{ 15065} GPK3000                     =       G3K3004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15066} GPK3000 +GHO                =       G2P3006                                               : ARR( 0.102E-12,     0., 0.0);
+{ 15067} GPK3000+HV               =       G3K2000 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 15068} GNN501A +GHO                =       GNK500c +      GNO2                                   : ARR( 0.602E-13,     0., 0.0);
+{ 15069} GNN501A +GHO                =       GNK500j +      GNO2                                   : ARR( 0.740E-13,     0., 0.0);
+{ 15070} GNN501A +GHO                =       GNN502W +      GHO2                                   : ARR( 0.829E-12,     0., 0.0);
+{ 15071} GNN501A +GHO                =       G1N503Y                                               : ARR( 0.217E-17,    85., 2.0);
+{ 15072} GNN501A+HV               =       G1N502s +      GNO2                                   :  0.100E+01*SUN;
+{ 15073} GNN501A+HV               =       G3N3001 +      GDO2000 +      GNO2                    :  0.100E+01*SUN;
+{ 15074} GNN501A+HV               =       G1N501W +      GNO2                                   :  0.100E+01*SUN;
+{ 15075} GHN501p +GHO                =       GNK500j +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 15076} GHN501p +GHO                =       GHN504f +      GHO2                                   : ARR( 0.128E-10,     0., 0.0);
+{ 15077} GHN501p +GHO                =       G2N501S                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15078} GHN501p+HV               =       G1H503L +      GNO2                                   :  0.100E+01*SUN;
+{ 15079} GHN501p+HV               =       G3N3001 +      GDO2000 +      GHO                     :  0.100E+01*SUN;
+{ 15080} GHN501p+HV               =       G1N501W +      GHO                                    :  0.100E+01*SUN;
+{ 15081} G1H503L                     =       GD02000 +      G3H3004                                : ARR( 0.200E+15,  2777., 0.0);
+{ 15082} G3H3004 +GHO2               =  0.800GGH3002 + 0.200GAH3002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15083} G3H3004 +GNO                =       GDO2000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15084} G3H3004 +GNO2               =       GPH3002                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15085} G3H3004 +GNO3               =       GDO2000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15086} G3H3004 +MEPERO             =  0.685GDO2000 + 0.315GAH3002 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15087} G3H3004 +PERO1              =  0.800GDO2000 + 0.200GAH3002 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15088} G3H3004 +PERO2              =  0.750GDO2000 + 0.250GAH3002 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15089} G3H3004 +PERO3              =  0.800GDO2000 + 0.200GAH3002 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15090} G3H3004 +PERO5              =  0.650GDO2000 + 0.350GAH3002 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15091} G3H3004 +PERO6              =  0.650GDO2000 + 0.350GAH3002 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15092} G3H3004 +PERO9              =       GDO2000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15093} GNK500i +GHO                =       GNK500j +      GHO2                                   : ARR( 0.641E-11,     0., 0.0);
+{ 15094} GNK500i +GHO                =       GND5013 +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 15095} GNK500i+HV               =       G1K500r +      GNO2                                   :  0.100E+01*SUN;
+{ 15096} GNK500i+HV               =       G3N3001 +      GDO2000 +      GHO2                    :  0.100E+01*SUN;
+{ 15097} G1K500r                     =       GD02000 +      G3K3003                                : ARR( 0.200E+15,  2777., 0.0);
+{ 15098} GNK500j +GHO                =       GND500z +      GHO2                                   : ARR( 0.254E-11,     0., 0.0);
+{ 15099} GNK500j +GHO                =       G1N503c                                               : ARR( 0.217E-17,    85., 2.0);
+{ 15100} GNK500j+HV               =       G1K500h +      GNO2                                   :  0.100E+01*SUN;
+{ 15101} GNK500j+HV               =       G3N3001 +      G3K2001                                :  0.100E+01*SUN;
+{ 15102} GHD500F +GHO                =       GDK500D +      GHO                                    : ARR( 0.215E-10,     0., 0.0);
+{ 15103} GHD500F +GHO                =       G3H500M                                               : ARR( 0.694E-10,     0., 0.0);
+{ 15104} GHD500F +GNO3               =       G3H500M +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15105} GHD500F+HV               =       G1D500a +      GHO                                    :  0.100E+01*SUN;
+{ 15106} GHD500F+HV               =       G3H3001 +      G2D2000                                :  0.100E+01*SUN;
+{ 15107} GHD500F+HV               =       G2H400T +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 15108} G3H500M +GHO2               =  0.800GGH500Q + 0.200GAH500S + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15109} G3H500M +GNO                =       G2H400T +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15110} G3H500M +GNO2               =       GPH500U                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15111} G3H500M +GNO3               =       G2H400T +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15112} G3H500M +MEPERO             =  0.685G2H400T + 0.315GAH500S + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15113} G3H500M +PERO1              =  0.800G2H400T + 0.200GAH500S + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15114} G3H500M +PERO2              =  0.750G2H400T + 0.250GAH500S + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15115} G3H500M +PERO3              =  0.800G2H400T + 0.200GAH500S + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15116} G3H500M +PERO5              =  0.650G2H400T + 0.350GAH500S + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15117} G3H500M +PERO6              =  0.650G2H400T + 0.350GAH500S + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15118} G3H500M +PERO9              =       G2H400T +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15119} G2H400T +GNO                =       G1H400Y +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15120} G2H400T +GNO                =       GHN400j                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15121} G2H400T +GHO2               =       GHH400P                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15122} G2H400T +GNO3               =       G1H400Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15123} G2H400T +MEPERO             =  0.480G1H400Y + 0.260GHK4007 + 0.260GHD400I                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15124} G2H400T +PERO1              =  0.600G1H400Y + 0.200GHK4007 + 0.200GHD400I                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15125} G2H400T +PERO2              =  0.560G1H400Y + 0.220GHK4007 + 0.220GHD400I                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15126} G2H400T +PERO3              =  0.600G1H400Y + 0.200GHK4007 + 0.200GHD400I                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15127} G2H400T +PERO5              =  0.600G1H400Y + 0.200GHK4007 + 0.200GHD400I                 : ARR( 0.533E-11,   500., 0.0);
+{ 15128} G2H400T +PERO6              =  0.460G1H400Y + 0.270GHK4007 + 0.270GHD400I                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15129} G2H400T +PERO9              =  0.800G1H400Y + 0.200GHD400I                                : ARR( 0.100E-10,     0., 0.0);
+{ 15130} G1H400Y                     =       G3H3001 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 15131} GHK500U +GHO                =       GKK500B +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 15132} GHK500U +GHO                =       GHD500w +      GHO2                                   : ARR( 0.128E-10,     0., 0.0);
+{ 15133} GHK500U +GHO                =       G2K500O                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15134} GHK500U+HV               =       G3K2000 +      G3H3004                                :  0.100E+01*SUN;
+{ 15135} GHK500U+HV               =       G1K500P +      GHO                                    :  0.100E+01*SUN;
+{ 15136} GKK500A +GHO                =       GKK500B +      GHO2                                   : ARR( 0.641E-11,     0., 0.0);
+{ 15137} GKK500A +GHO                =       GDK500R +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 15138} GKK500A+HV               =       G3K2000 +      G3K3003                                :  0.100E+01*SUN;
+{ 15139} GKK500B +GHO                =       GDK500W +      GHO2                                   : ARR( 0.255E-11,     0., 0.0);
+{ 15140} GKK500B +GHO                =       G1K500q                                               : ARR( 0.218E-17,    85., 2.0);
+{ 15141} GKK500B+HV               =       G3K2000 +      G3K2001 +      GCO                     :  0.100E+01*SUN;
+{ 15142} GKK500B+HV               =       G3K2000 +      G3K2001 +      GCO                     :  0.100E+01*SUN;
+{ 15143} GGN3002 +GHO                =       GGN3005 +      GHO2                                   : ARR( 0.843E-12,     0., 0.0);
+{ 15144} GGN3002 +GHO                =       G3N3004                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 15145} GGN3002+HV               =       G1G3002 +      GNO2                                   :  0.100E+01*SUN;
+{ 15146} GGN3002+HV               =       GDO2000 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 15147} GGH3002 +GHO                =       GGH3007 +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{ 15148} GGH3002 +GHO                =       GGK3001 +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 15149} GGH3002 +GHO                =       G2G3002                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15150} GGH3002 +GHO                =       G3H3004                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15151} GGH3002+HV               =       G1G3002 +      GHO                                    :  0.100E+01*SUN;
+{ 15152} GGH3002+HV               =       GDO2000 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 15153} GGO3002 +GHO                =       GGD3001 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{ 15154} GGO3002 +GHO                =       GGK3001 +      GHO2                                   : ARR( 0.641E-11,     0., 0.0);
+{ 15155} GGO3002 +GHO                =       G3K3003                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 15156} GGO3002+HV               =       GDO2000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 15157} GGK3001 +GHO                =       GGD3002 +      GHO2                                   : ARR( 0.251E-11,     0., 0.0);
+{ 15158} GGK3001 +GHO                =       G3K3005                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 15159} GGK3001+HV               =       GAO2000 +      GCO2                                   :  0.100E+01*SUN;
+{ 15160} G3K3005 +GHO2               =  0.800GGK3001 + 0.200GAK3001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15161} G3K3005 +GNO                =       G3K2001 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15162} G3K3005 +GNO2               =       GPK3001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15163} G3K3005 +GNO3               =       G3K2001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15164} G3K3005 +MEPERO             =  0.685G3K2001 + 0.315GAK3001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15165} G3K3005 +PERO1              =  0.800G3K2001 + 0.200GAK3001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15166} G3K3005 +PERO2              =  0.750G3K2001 + 0.250GAK3001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15167} G3K3005 +PERO3              =  0.800G3K2001 + 0.200GAK3001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15168} G3K3005 +PERO5              =  0.650G3K2001 + 0.350GAK3001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15169} G3K3005 +PERO6              =  0.650G3K2001 + 0.350GAK3001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15170} G3K3005 +PERO9              =       G3K2001 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15171} GAN3002 +GHO                =       GAN3006 +      GHO2                                   : ARR( 0.833E-12,     0., 0.0);
+{ 15172} GAN3002 +GHO                =       G1A3004                                               : ARR( 0.218E-17,    85., 2.0);
+{ 15173} GAN3002 +GHO                =       GDO2000 +      GNO2    +      GCO2                    : ARR( 0.539E-12,     0., 0.0);
+{ 15174} GAN3002+HV               =       G1A3002 +      GNO2                                   :  0.100E+01*SUN;
+{ 15175} GAH3002 +GHO                =       GAH3007 +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{ 15176} GAH3002 +GHO                =       GAK3001 +      GHO                                    : ARR( 0.191E-10,     0., 0.0);
+{ 15177} GAH3002 +GHO                =       G2A3002                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 15178} GAH3002+HV               =       G1A3002 +      GHO                                    :  0.100E+01*SUN;
+{ 15179} GAO3002 +GHO                =       GAD3001 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 15180} GAO3002 +GHO                =       GAK3001 +      GHO2                                   : ARR( 0.479E-11,     0., 0.0);
+{ 15181} GAO3002 +GHO                =       GDO2000 +      GHO2    +      GCO2                    : ARR( 0.536E-12,     0., 0.0);
+{ 15182} GAK3001 +GHO                =       GAD3002 +      GHO2                                   : ARR( 0.257E-11,     0., 0.0);
+{ 15183} GAK3001 +GHO                =       G3K2001 +      GCO2                                   : ARR( 0.545E-12,     0., 0.0);
+{ 15184} GAK3001+HV               =       GDO2000 +      GCO2                                   :  0.100E+01*SUN;
+{ 15185} GPN3002                     =       G3N3004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15186} GPN3002 +GHO                =       GPN3006 +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{ 15187} GPN3002 +GHO                =       GPK3001 +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{ 15188} GPN3002 +GHO                =       G1P3004                                               : ARR( 0.210E-17,    85., 2.0);
+{ 15189} GPN3002+HV               =       G1P3002 +      GNO2                                   :  0.100E+01*SUN;
+{ 15190} GPN3002+HV               =       G3N3004 +      GNO2                                   :  0.100E+01*SUN;
+{ 15191} GPH3002                     =       G3H3004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15192} GPH3002 +GHO                =       GPH3007 +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{ 15193} GPH3002 +GHO                =       GPK3001 +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 15194} GPH3002 +GHO                =       G2P3002                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15195} GPH3002+HV               =       G1P3002 +      GHO                                    :  0.100E+01*SUN;
+{ 15196} GPH3002+HV               =       G3H3004 +      GNO2                                   :  0.100E+01*SUN;
+{ 15197} GPO3002                     =       G3K3003 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15198} GPO3002 +GHO                =       GPD3001 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 15199} GPO3002 +GHO                =       GPK3001 +      GHO2                                   : ARR( 0.645E-11,     0., 0.0);
+{ 15200} GPO3002+HV               =       G3K3003 +      GNO2                                   :  0.100E+01*SUN;
+{ 15201} GPK3001                     =       G3K3005 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15202} GPK3001 +GHO                =       GPD3002 +      GHO2                                   : ARR( 0.245E-11,     0., 0.0);
+{ 15203} GPK3001 +GHO                =       G1P3006                                               : ARR( 0.210E-17,    85., 2.0);
+{ 15204} GPK3001+HV               =       G3K2001 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 15205} GHN501q +GHO                =       GND500K +      GHO                                    : ARR( 0.257E-10,     0., 0.0);
+{ 15206} GHN501q +GHO                =       G3H500N                                               : ARR( 0.212E-10,     0., 0.0);
+{ 15207} GHN501q +GHO                =       G2N503e                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 15208} GHN501q +GNO3               =       G3H500N +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15209} GHN501q+HV               =       G1H503M +      GNO2                                   :  0.100E+01*SUN;
+{ 15210} GHN501q+HV               =       G1N503U +      GHO                                    :  0.100E+01*SUN;
+{ 15211} GHN501q+HV               =       GND4000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 15212} G3H500N +GHO2               =  0.800GGH500U + 0.200GAH500X + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15213} G3H500N +GNO                =       GND4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15214} G3H500N +GNO2               =       GPH500Z                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15215} G3H500N +GNO3               =       GND4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15216} G3H500N +MEPERO             =  0.685GND4000 + 0.315GAH500X + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15217} G3H500N +PERO1              =  0.800GND4000 + 0.200GAH500X + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15218} G3H500N +PERO2              =  0.750GND4000 + 0.250GAH500X + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15219} G3H500N +PERO3              =  0.800GND4000 + 0.200GAH500X + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15220} G3H500N +PERO5              =  0.650GND4000 + 0.350GAH500X + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15221} G3H500N +PERO6              =  0.650GND4000 + 0.350GAH500X + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15222} G3H500N +PERO9              =       GND4000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15223} G2N503e +GNO                =       G1N503U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15224} G2N503e +GNO                =       GNN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15225} G2N503e +GHO2               =       GHN501q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15226} G2N503e +GNO3               =       G1N503U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15227} G2N503e +MEPERO             =  0.340G1N503U + 0.330GND500S + 0.330GND500K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15228} G2N503e +PERO1              =  0.460G1N503U + 0.270GND500S + 0.270GND500K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15229} G2N503e +PERO2              =  0.400G1N503U + 0.300GND500S + 0.300GND500K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15230} G2N503e +PERO3              =  0.460G1N503U + 0.270GND500S + 0.270GND500K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15231} G2N503e +PERO5              =  0.460G1N503U + 0.270GND500S + 0.270GND500K                 : ARR( 0.183E-11,   450., 0.0);
+{ 15232} G2N503e +PERO6              =  0.300G1N503U + 0.350GND500S + 0.350GND500K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15233} G2N503e +PERO9              =  0.650G1N503U + 0.350GND500K                                : ARR( 0.100E-10,     0., 0.0);
+{ 15234} G1H503M                     =       G3H5006                                               : ARR( 0.800E+11,  4559., 0.0);
+{ 15235} G1H503M                     =       GD02000 +      G2H300A                                : ARR( 0.200E+15,  6864., 0.0);
+{ 15236} G2H300A +GNO                =       G1H300B +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 15237} G2H300A +GNO                =       GHN3007                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 15238} G2H300A +GHO2               =       GHH3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 15239} G2H300A +GNO3               =       G1H300B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15240} G2H300A +MEPERO             =  0.480G1H300B + 0.260GHD3003 + 0.260GHD3004                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15241} G2H300A +PERO1              =  0.600G1H300B + 0.200GHD3003 + 0.200GHD3004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15242} G2H300A +PERO2              =  0.560G1H300B + 0.220GHD3003 + 0.220GHD3004                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15243} G2H300A +PERO3              =  0.600G1H300B + 0.200GHD3003 + 0.200GHD3004                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15244} G2H300A +PERO5              =  0.600G1H300B + 0.200GHD3003 + 0.200GHD3004                 : ARR( 0.533E-11,   500., 0.0);
+{ 15245} G2H300A +PERO6              =  0.460G1H300B + 0.270GHD3003 + 0.270GHD3004                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15246} G2H300A +PERO9              =  0.800G1H300B + 0.200GHD3004                                : ARR( 0.100E-10,     0., 0.0);
+{ 15247} GND500S +GHO                =       GND500K +      GHO2                                   : ARR( 0.655E-11,     0., 0.0);
+{ 15248} GND500S +GHO                =       G3N500X                                               : ARR( 0.217E-10,     0., 0.0);
+{ 15249} GND500S +GNO3               =       G3N500X +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15250} GND500S+HV               =       G1D500e +      GNO2                                   :  0.100E+01*SUN;
+{ 15251} GND500S+HV               =       GND4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15252} G3N500X +GHO2               =  0.800GGN500Z + 0.200GAN500h + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15253} G3N500X +GNO                =       GND4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15254} G3N500X +GNO2               =       GPN500j                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15255} G3N500X +GNO3               =       GND4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15256} G3N500X +MEPERO             =  0.685GND4000 + 0.315GAN500h + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15257} G3N500X +PERO1              =  0.800GND4000 + 0.200GAN500h + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15258} G3N500X +PERO2              =  0.750GND4000 + 0.250GAN500h + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15259} G3N500X +PERO3              =  0.800GND4000 + 0.200GAN500h + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15260} G3N500X +PERO5              =  0.650GND4000 + 0.350GAN500h + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15261} G3N500X +PERO6              =  0.650GND4000 + 0.350GAN500h + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15262} G3N500X +PERO9              =       GND4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15263} G1D500e                     =       G3K5005                                               : ARR( 0.800E+11,  4559., 0.0);
+{ 15264} G1D500e                     =       GD02000 +      G2D3003                                : ARR( 0.200E+15,  6864., 0.0);
+{ 15265} GHN501r +GHO                =       GNK500j +      GHO                                    : ARR( 0.524E-11,     0., 0.0);
+{ 15266} GHN501r +GHO                =       GHN504g +      GHO2                                   : ARR( 0.256E-11,     0., 0.0);
+{ 15267} GHN501r +GHO                =       G2N501T                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 15268} GHN501r+HV               =       G1H502i +      GNO2                                   :  0.100E+01*SUN;
+{ 15269} GHN501r+HV               =       G1N501X +      GHO                                    :  0.100E+01*SUN;
+{ 15270} GHN501r+HV               =       G3H4008 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 15271} GNK500k +GHO                =       GKK500C +      GNO2                                   : ARR( 0.327E-12,     0., 0.0);
+{ 15272} GNK500k +GHO                =       GNK500j +      GHO2                                   : ARR( 0.135E-11,     0., 0.0);
+{ 15273} GNK500k +GHO                =       GND500y +      GHO2                                   : ARR( 0.264E-11,     0., 0.0);
+{ 15274} GNK500k+HV               =       G1K500f +      GNO2                                   :  0.100E+01*SUN;
+{ 15275} GNK500k+HV               =       G3N400A +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 15276} GHH500R +GHO                =       GHD500I +      GHO                                    : ARR( 0.350E-10,     0., 0.0);
+{ 15277} GHH500R +GHO                =       GHD500F +      GHO                                    : ARR( 0.136E-09,     0., 0.0);
+{ 15278} GHH500R +GHO                =       G3H500O                                               : ARR( 0.217E-10,     0., 0.0);
+{ 15279} GHH500R +GNO3               =       G3H500O +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15280} GHH500R+HV               =       G1H503N +      GHO                                    :  0.100E+01*SUN;
+{ 15281} GHH500R+HV               =       G1H500e +      GHO                                    :  0.100E+01*SUN;
+{ 15282} GHH500R+HV               =       G2H400U +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 15283} GHH500R+HV               =       GDK3000 +      GD02000 + 2.000GHO                     :  0.100E+01*SUN;
+{ 15284} G3H500O +GHO2               =  0.800GGH500g + 0.200GAH500l + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15285} G3H500O +GNO                =       G2H400U +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15286} G3H500O +GNO2               =       GPH500n                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15287} G3H500O +GNO3               =       G2H400U +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15288} G3H500O +MEPERO             =  0.685G2H400U + 0.315GAH500l + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15289} G3H500O +PERO1              =  0.800G2H400U + 0.200GAH500l + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15290} G3H500O +PERO2              =  0.750G2H400U + 0.250GAH500l + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15291} G3H500O +PERO3              =  0.800G2H400U + 0.200GAH500l + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15292} G3H500O +PERO5              =  0.650G2H400U + 0.350GAH500l + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15293} G3H500O +PERO6              =  0.650G2H400U + 0.350GAH500l + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15294} G3H500O +PERO9              =       G2H400U +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15295} G1H503N                     =       GD02000 +      GDD3000 +      GHO                     : ARR( 0.200E+15,  4573., 0.0);
+{ 15296} G2H400U +GNO                =       G1H400Z +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15297} G2H400U +GNO                =       GHH400L                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15298} G2H400U +GHO2               =       GHH400Q                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15299} G2H400U +GNO3               =       G1H400Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15300} G2H400U +MEPERO             =  0.480G1H400Z + 0.260GHH400R + 0.260GHH400M                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15301} G2H400U +PERO1              =  0.600G1H400Z + 0.200GHH400R + 0.200GHH400M                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15302} G2H400U +PERO2              =  0.560G1H400Z + 0.220GHH400R + 0.220GHH400M                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15303} G2H400U +PERO3              =  0.600G1H400Z + 0.200GHH400R + 0.200GHH400M                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15304} G2H400U +PERO5              =  0.600G1H400Z + 0.200GHH400R + 0.200GHH400M                 : ARR( 0.533E-11,   500., 0.0);
+{ 15305} G2H400U +PERO6              =  0.460G1H400Z + 0.270GHH400R + 0.270GHH400M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15306} G2H400U +PERO9              =  0.800G1H400Z + 0.200GHH400M                                : ARR( 0.100E-10,     0., 0.0);
+{ 15307} G1H400Z                     =       G2H400W                                               : ARR( 0.240E+12,  4177., 0.0);
+{ 15308} G1H400Z                     =       GHD3002 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 15309} G2H400W +GNO                =       G1H400a +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15310} G2H400W +GNO                =       GHH400S                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15311} G2H400W +GHO2               =       GHH400T                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15312} G2H400W +GNO3               =       G1H400a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15313} G2H400W +MEPERO             =  0.480G1H400a + 0.260GHH400U + 0.260GHH4009                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15314} G2H400W +PERO1              =  0.600G1H400a + 0.200GHH400U + 0.200GHH4009                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15315} G2H400W +PERO2              =  0.560G1H400a + 0.220GHH400U + 0.220GHH4009                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15316} G2H400W +PERO3              =  0.600G1H400a + 0.200GHH400U + 0.200GHH4009                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15317} G2H400W +PERO5              =  0.600G1H400a + 0.200GHH400U + 0.200GHH4009                 : ARR( 0.533E-11,   500., 0.0);
+{ 15318} G2H400W +PERO6              =  0.460G1H400a + 0.270GHH400U + 0.270GHH4009                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15319} G2H400W +PERO9              =  0.800G1H400a + 0.200GHH4009                                : ARR( 0.100E-10,     0., 0.0);
+{ 15320} G1H400a                     =       GHH4009 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 15321} G1H400a                     =       GHD3003 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 15322} GHD500G +GHO                =       GDK500H +      GHO                                    : ARR( 0.353E-10,     0., 0.0);
+{ 15323} GHD500G +GHO                =       GHD500F +      GHO2                                   : ARR( 0.345E-10,     0., 0.0);
+{ 15324} GHD500G +GHO                =       G3H500P                                               : ARR( 0.219E-10,     0., 0.0);
+{ 15325} GHD500G +GNO3               =       G3H500P +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15326} GHD500G+HV               =       G1D500f +      GHO                                    :  0.100E+01*SUN;
+{ 15327} GHD500G+HV               =       G2H400X +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 15328} GHD500G+HV               =       GDK3000 +      GD02000 +      GHO2    +      GHO      :  0.100E+01*SUN;
+{ 15329} G3H500P +GHO2               =  0.800GGH500M + 0.200GAH500Q + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15330} G3H500P +GNO                =       G2H400X +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15331} G3H500P +GNO2               =       GPH500Q                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15332} G3H500P +GNO3               =       G2H400X +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15333} G3H500P +MEPERO             =  0.685G2H400X + 0.315GAH500Q + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15334} G3H500P +PERO1              =  0.800G2H400X + 0.200GAH500Q + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15335} G3H500P +PERO2              =  0.750G2H400X + 0.250GAH500Q + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15336} G3H500P +PERO3              =  0.800G2H400X + 0.200GAH500Q + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15337} G3H500P +PERO5              =  0.650G2H400X + 0.350GAH500Q + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15338} G3H500P +PERO6              =  0.650G2H400X + 0.350GAH500Q + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15339} G3H500P +PERO9              =       G2H400X +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15340} G1D500f                     =       GD02000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  3365., 0.0);
+{ 15341} G2H400X +GNO                =       G1H400b +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15342} G2H400X +GNO                =       GHN400i                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15343} G2H400X +GHO2               =       GHH400W                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15344} G2H400X +GNO3               =       G1H400b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15345} G2H400X +MEPERO             =  0.480G1H400b + 0.260GHO400C + 0.260GHD400H                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15346} G2H400X +PERO1              =  0.600G1H400b + 0.200GHO400C + 0.200GHD400H                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15347} G2H400X +PERO2              =  0.560G1H400b + 0.220GHO400C + 0.220GHD400H                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15348} G2H400X +PERO3              =  0.600G1H400b + 0.200GHO400C + 0.200GHD400H                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15349} G2H400X +PERO5              =  0.600G1H400b + 0.200GHO400C + 0.200GHD400H                 : ARR( 0.533E-11,   500., 0.0);
+{ 15350} G2H400X +PERO6              =  0.460G1H400b + 0.270GHO400C + 0.270GHD400H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15351} G2H400X +PERO9              =  0.800G1H400b + 0.200GHD400H                                : ARR( 0.100E-10,     0., 0.0);
+{ 15352} G1H400b                     =       GHD3002 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 15353} GHN400D +GHO                =       GHN4001 +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 15354} GHN400D +GHO                =       G2H400Y                                               : ARR( 0.143E-11,     0., 0.0);
+{ 15355} GHN400D +GHO                =       GNK4004 +      GHO                                    : ARR( 0.833E-11,     0., 0.0);
+{ 15356} GHN400D +GHO                =       G2N400e                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 15357} GHN400D+HV               =       G1N400Z +      GHO                                    :  0.100E+01*SUN;
+{ 15358} GHN400D+HV               =       G1H4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 15359} G2H400Y +GNO                =       G1H400c +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15360} G2H400Y +GNO                =       GHN400s                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15361} G2H400Y +GHO2               =       GHH400S                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15362} G2H400Y +GNO3               =       G1H400c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15363} G2H400Y +MEPERO             =  0.340G1H400c + 0.330GHN400b + 0.330GHN400l                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15364} G2H400Y +PERO1              =  0.460G1H400c + 0.270GHN400b + 0.270GHN400l                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15365} G2H400Y +PERO2              =  0.400G1H400c + 0.300GHN400b + 0.300GHN400l                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15366} G2H400Y +PERO3              =  0.460G1H400c + 0.270GHN400b + 0.270GHN400l                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15367} G2H400Y +PERO5              =  0.460G1H400c + 0.270GHN400b + 0.270GHN400l                 : ARR( 0.183E-11,   450., 0.0);
+{ 15368} G2H400Y +PERO6              =  0.300G1H400c + 0.350GHN400b + 0.350GHN400l                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15369} G2H400Y +PERO9              =  0.650G1H400c + 0.350GHN400l                                : ARR( 0.100E-10,     0., 0.0);
+{ 15370} G2N400e +GNO                =       G1N400Z +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15371} G2N400e +GNO                =       GNN4006                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15372} G2N400e +GHO2               =       GHN400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15373} G2N400e +GNO3               =       G1N400Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15374} G2N400e +MEPERO             =  0.340G1N400Z + 0.330GNO4002 + 0.330GNK4004                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15375} G2N400e +PERO1              =  0.460G1N400Z + 0.270GNO4002 + 0.270GNK4004                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15376} G2N400e +PERO2              =  0.400G1N400Z + 0.300GNO4002 + 0.300GNK4004                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15377} G2N400e +PERO3              =  0.460G1N400Z + 0.270GNO4002 + 0.270GNK4004                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15378} G2N400e +PERO5              =  0.460G1N400Z + 0.270GNO4002 + 0.270GNK4004                 : ARR( 0.183E-11,   450., 0.0);
+{ 15379} G2N400e +PERO6              =  0.300G1N400Z + 0.350GNO4002 + 0.350GNK4004                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15380} G2N400e +PERO9              =  0.650G1N400Z + 0.350GNK4004                                : ARR( 0.100E-10,     0., 0.0);
+{ 15381} G1H400c                     =       GCH2O   +      GHN3007 +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 15382} G1H400c                     =       GDO2000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4843., 0.0);
+{ 15383} GNO500X +GHO                =       GNK500b +      GHO2                                   : ARR( 0.890E-11,     0., 0.0);
+{ 15384} GNO500X +GHO                =       GNK500v +      GHO2                                   : ARR( 0.219E-11,     0., 0.0);
+{ 15385} GNO500X +GHO                =       GND5019 +      GHO2                                   : ARR( 0.855E-12,     0., 0.0);
+{ 15386} GNO500X+HV               =       G1O500Q +      GNO2                                   :  0.100E+01*SUN;
+{ 15387} GHO500P +GHO                =       GHK500Z +      GHO2                                   : ARR( 0.845E-11,     0., 0.0);
+{ 15388} GHO500P +GHO                =       GHK500q +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 15389} GHO500P +GHO                =       GKO500J +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 15390} GHO500P +GHO                =       GHD500U +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 15391} GHO500P +GHO                =       G2O500P                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 15392} GHO500P+HV               =       G1O500Q +      GHO                                    :  0.100E+01*SUN;
+{ 15393} GKO500J +GHO                =       GKK500C +      GHO2                                   : ARR( 0.270E-10,     0., 0.0);
+{ 15394} GKO500J +GHO                =       GKK500D +      GHO2                                   : ARR( 0.639E-11,     0., 0.0);
+{ 15395} GKO500J +GHO                =       GDK500T +      GHO2                                   : ARR( 0.249E-11,     0., 0.0);
+{ 15396} GKO500J+HV               =       G3K4008 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 15397} GNN501B +GHO                =       GNN502H +      GHO2                                   : ARR( 0.438E-11,     0., 0.0);
+{ 15398} GNN501B +GHO                =       GNN5024 +      GHO2                                   : ARR( 0.225E-11,     0., 0.0);
+{ 15399} GNN501B +GHO                =       GNN502E +      GHO2                                   : ARR( 0.449E-12,     0., 0.0);
+{ 15400} GNN501B+HV               =       G1N501Y +      GNO2                                   :  0.100E+01*SUN;
+{ 15401} GNN501B+HV               =       G1N503t +      GNO2                                   :  0.100E+01*SUN;
+{ 15402} GHN501s +GHO                =       GHN503v +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{ 15403} GHN501s +GHO                =       GHN502t +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{ 15404} GHN501s +GHO                =       GNK500l +      GHO                                    : ARR( 0.430E-10,     0., 0.0);
+{ 15405} GHN501s +GHO                =       G2N501U                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 15406} GHN501s+HV               =       G1N501Y +      GHO                                    :  0.100E+01*SUN;
+{ 15407} GHN501s+HV               =       G1H503O +      GNO2                                   :  0.100E+01*SUN;
+{ 15408} G1H503O                     =       GHK500f +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{ 15409} G1H503O                     =       GHD400A +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 15410} GNO500Y +GHO                =       GND500p +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{ 15411} GNO500Y +GHO                =       GNK500t +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 15412} GNO500Y +GHO                =       GNK500l +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 15413} GNO500Y +GHO                =       GNK5011 +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{ 15414} GNO500Y+HV               =       G1O500b +      GNO2                                   :  0.100E+01*SUN;
+{ 15415} G1O500b                     =       GKO500L +      GHO2                                   : ARR( 0.800E+11,  2025., 0.0);
+{ 15416} G1O500b                     =       GDO4006 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 15417} GNK500l +GHO                =       GND500q +      GHO2                                   : ARR( 0.131E-10,     0., 0.0);
+{ 15418} GNK500l +GHO                =       GNK500u +      GHO2                                   : ARR( 0.646E-11,     0., 0.0);
+{ 15419} GNK500l +GHO                =       GNK5012 +      GHO2                                   : ARR( 0.129E-11,     0., 0.0);
+{ 15420} GNK500l+HV               =       G3K3003 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{ 15421} GNK500l+HV               =       G1K500s +      GNO2                                   :  0.100E+01*SUN;
+{ 15422} G1K500s                     =       GDK4007 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 15423} GHK500W +GHO                =       GHK500E +      GHO2                                   : ARR( 0.349E-10,     0., 0.0);
+{ 15424} GHK500W +GHO                =       GDK500F +      GHO                                    : ARR( 0.172E-10,     0., 0.0);
+{ 15425} GHK500W +GHO                =       G2K500i                                               : ARR( 0.203E-11,  -190., 0.0);
+{ 15426} GHK500W+HV               =       G3K2001 +      G2H3009                                :  0.100E+01*SUN;
+{ 15427} GHK500W+HV               =       GKO3000 +      GHD2000                                :  0.100E+01*SUN;
+{ 15428} GHK500W+HV               =       G1K500Y +      GHO                                    :  0.100E+01*SUN;
+{ 15429} G2K500i +GNO                =       G1K500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15430} G2K500i +GNO                =       GNK500J                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15431} G2K500i +GHO2               =       GHK500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15432} G2K500i +GNO3               =       G1K500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15433} G2K500i +MEPERO             =  0.480G1K500Y + 0.260GKO500A + 0.260GDK500F                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15434} G2K500i +PERO1              =  0.600G1K500Y + 0.200GKO500A + 0.200GDK500F                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15435} G2K500i +PERO2              =  0.560G1K500Y + 0.220GKO500A + 0.220GDK500F                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15436} G2K500i +PERO3              =  0.600G1K500Y + 0.200GKO500A + 0.200GDK500F                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15437} G2K500i +PERO5              =  0.600G1K500Y + 0.200GKO500A + 0.200GDK500F                 : ARR( 0.533E-11,   500., 0.0);
+{ 15438} G2K500i +PERO6              =  0.460G1K500Y + 0.270GKO500A + 0.270GDK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15439} G2K500i +PERO9              =  0.800G1K500Y + 0.200GDK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 15440} GDK500F +GHO                =       GDD5007 +      GHO2                                   : ARR( 0.247E-11,     0., 0.0);
+{ 15441} GDK500F +GHO                =       G2D500T                                               : ARR( 0.275E-11,     0., 0.0);
+{ 15442} GDK500F +GHO                =       GDK500M +      GHO2                                   : ARR( 0.200E-10,     0., 0.0);
+{ 15443} GDK500F +GHO                =       G3K500L                                               : ARR( 0.209E-10,     0., 0.0);
+{ 15444} GDK500F +GNO3               =       G3K500L +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15445} GDK500F+HV               =       G3K2001 +      G2D3003                                :  0.100E+01*SUN;
+{ 15446} GDK500F+HV               =       GDK4001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15447} G2D500T +GNO                =       G1D500g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15448} G2D500T +GNO                =       GND501A                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15449} G2D500T +GHO2               =       GHD500x                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15450} G2D500T +GNO3               =       G1D500g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15451} G2D500T +MEPERO             =  0.340G1D500g + 0.330GDK500X + 0.330GDK500Y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15452} G2D500T +PERO1              =  0.460G1D500g + 0.270GDK500X + 0.270GDK500Y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15453} G2D500T +PERO2              =  0.400G1D500g + 0.300GDK500X + 0.300GDK500Y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15454} G2D500T +PERO3              =  0.460G1D500g + 0.270GDK500X + 0.270GDK500Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15455} G2D500T +PERO5              =  0.460G1D500g + 0.270GDK500X + 0.270GDK500Y                 : ARR( 0.183E-11,   450., 0.0);
+{ 15456} G2D500T +PERO6              =  0.300G1D500g + 0.350GDK500X + 0.350GDK500Y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15457} G2D500T +PERO9              =  0.650G1D500g + 0.350GDK500Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 15458} G3K500L +GHO2               =  0.800GGK500L + 0.200GAK500K + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15459} G3K500L +GNO                =       GDK4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15460} G3K500L +GNO2               =       GPK500L                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15461} G3K500L +GNO3               =       GDK4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15462} G3K500L +MEPERO             =  0.685GDK4001 + 0.315GAK500K + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15463} G3K500L +PERO1              =  0.800GDK4001 + 0.200GAK500K + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15464} G3K500L +PERO2              =  0.750GDK4001 + 0.250GAK500K + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15465} G3K500L +PERO3              =  0.800GDK4001 + 0.200GAK500K + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15466} G3K500L +PERO5              =  0.650GDK4001 + 0.350GAK500K + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15467} G3K500L +PERO6              =  0.650GDK4001 + 0.350GAK500K + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15468} G3K500L +PERO9              =       GDK4001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15469} G1D500g                     =       G3K2001 +      GDD3001                                : ARR( 0.200E+15,  2179., 0.0);
+{ 15470} GND500T +GHO                =       GND500s +      GHO2                                   : ARR( 0.433E-11,     0., 0.0);
+{ 15471} GND500T +GHO                =       GND501A +      GHO2                                   : ARR( 0.222E-11,     0., 0.0);
+{ 15472} GND500T +GHO                =       G3N500Y                                               : ARR( 0.224E-10,     0., 0.0);
+{ 15473} GND500T +GNO3               =       G3N500Y +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15474} GND500T+HV               =       G1D500B +      GNO2                                   :  0.100E+01*SUN;
+{ 15475} GND500T+HV               =       GND400A +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15476} G3N500Y +GHO2               =  0.800GGN500i + 0.200GAN500p + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15477} G3N500Y +GNO                =       GND400A +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15478} G3N500Y +GNO2               =       GPN500s                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15479} G3N500Y +GNO3               =       GND400A +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15480} G3N500Y +MEPERO             =  0.685GND400A + 0.315GAN500p + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15481} G3N500Y +PERO1              =  0.800GND400A + 0.200GAN500p + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15482} G3N500Y +PERO2              =  0.750GND400A + 0.250GAN500p + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15483} G3N500Y +PERO3              =  0.800GND400A + 0.200GAN500p + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15484} G3N500Y +PERO5              =  0.650GND400A + 0.350GAN500p + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15485} G3N500Y +PERO6              =  0.650GND400A + 0.350GAN500p + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15486} G3N500Y +PERO9              =       GND400A +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15487} GHD500H +GHO                =       GHD500x +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{ 15488} GHD500H +GHO                =       GDK500G +      GHO                                    : ARR( 0.142E-09,     0., 0.0);
+{ 15489} GHD500H +GHO                =       G3H500Q                                               : ARR( 0.226E-10,     0., 0.0);
+{ 15490} GHD500H +GNO3               =       G3H500Q +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15491} GHD500H+HV               =       G1D500B +      GHO                                    :  0.100E+01*SUN;
+{ 15492} GHD500H+HV               =       GHD400A +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15493} G3H500Q +GHO2               =  0.800GGH500h + 0.200GAH500m + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15494} G3H500Q +GNO                =       GHD400A +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15495} G3H500Q +GNO2               =       GPH500o                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15496} G3H500Q +GNO3               =       GHD400A +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15497} G3H500Q +MEPERO             =  0.685GHD400A + 0.315GAH500m + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15498} G3H500Q +PERO1              =  0.800GHD400A + 0.200GAH500m + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15499} G3H500Q +PERO2              =  0.750GHD400A + 0.250GAH500m + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15500} G3H500Q +PERO3              =  0.800GHD400A + 0.200GAH500m + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15501} G3H500Q +PERO5              =  0.650GHD400A + 0.350GAH500m + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15502} G3H500Q +PERO6              =  0.650GHD400A + 0.350GAH500m + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15503} G3H500Q +PERO9              =       GHD400A +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15504} GDO500A +GHO                =       GDD5006 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 15505} GDO500A +GHO                =       GDK500X +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 15506} GDO500A +GHO                =       GDK500G +      GHO2                                   : ARR( 0.329E-10,     0., 0.0);
+{ 15507} GDO500A +GHO                =       GDK500N +      GHO2                                   : ARR( 0.633E-11,     0., 0.0);
+{ 15508} GDO500A +GHO                =       G3K500M                                               : ARR( 0.209E-10,     0., 0.0);
+{ 15509} GDO500A +GNO3               =       G3K500M +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15510} GDO500A+HV               =       GDO4006 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15511} G3K500M +GHO2               =  0.800GGO500C + 0.200GAO500B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15512} G3K500M +GNO                =       GDO4006 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15513} G3K500M +GNO2               =       GPO500C                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15514} G3K500M +GNO3               =       GDO4006 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15515} G3K500M +MEPERO             =  0.685GDO4006 + 0.315GAO500B + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15516} G3K500M +PERO1              =  0.800GDO4006 + 0.200GAO500B + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15517} G3K500M +PERO2              =  0.750GDO4006 + 0.250GAO500B + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15518} G3K500M +PERO3              =  0.800GDO4006 + 0.200GAO500B + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15519} G3K500M +PERO5              =  0.650GDO4006 + 0.350GAO500B + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15520} G3K500M +PERO6              =  0.650GDO4006 + 0.350GAO500B + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15521} G3K500M +PERO9              =       GDO4006 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15522} GDK500G +GHO                =       GDD5008 +      GHO2                                   : ARR( 0.134E-10,     0., 0.0);
+{ 15523} GDK500G +GHO                =       GDK500Y +      GHO2                                   : ARR( 0.660E-11,     0., 0.0);
+{ 15524} GDK500G +GHO                =       G3K500N                                               : ARR( 0.692E-10,     0., 0.0);
+{ 15525} GDK500G +GNO3               =       G3K500N +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15526} GDK500G+HV               =       G3K3003 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 15527} GDK500G+HV               =       GDK4007 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15528} G3K500N +GHO2               =  0.800GGK500M + 0.200GAK500L + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15529} G3K500N +GNO                =       GDK4007 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15530} G3K500N +GNO2               =       GPK500M                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15531} G3K500N +GNO3               =       GDK4007 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15532} G3K500N +MEPERO             =  0.685GDK4007 + 0.315GAK500L + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15533} G3K500N +PERO1              =  0.800GDK4007 + 0.200GAK500L + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15534} G3K500N +PERO2              =  0.750GDK4007 + 0.250GAK500L + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15535} G3K500N +PERO3              =  0.800GDK4007 + 0.200GAK500L + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15536} G3K500N +PERO5              =  0.650GDK4007 + 0.350GAK500L + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15537} G3K500N +PERO6              =  0.650GDK4007 + 0.350GAK500L + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15538} G3K500N +PERO9              =       GDK4007 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15539} GGO5005 +GHO                =       GGD5002 +      GHO2                                   : ARR( 0.409E-11,     0., 0.0);
+{ 15540} GGO5005 +GHO                =       GGK500L +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 15541} GGO5005 +GHO                =       G2G500X                                               : ARR( 0.144E-11,     0., 0.0);
+{ 15542} GGO5005 +GHO                =       GGK5006 +      GHO2                                   : ARR( 0.639E-11,     0., 0.0);
+{ 15543} GGO5005 +GHO                =       G3K5006                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 15544} GGO5005+HV               =       GDO4002 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 15545} G2G500X +GNO                =       G1G500Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15546} G2G500X +GNO                =       GGN500i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15547} G2G500X +GHO2               =       GGH500h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15548} G2G500X +GNO3               =       G1G500Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15549} G2G500X +MEPERO             =  0.340G1G500Y + 0.330GGO500C + 0.330GGK500M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15550} G2G500X +PERO1              =  0.460G1G500Y + 0.270GGO500C + 0.270GGK500M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15551} G2G500X +PERO2              =  0.400G1G500Y + 0.300GGO500C + 0.300GGK500M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15552} G2G500X +PERO3              =  0.460G1G500Y + 0.270GGO500C + 0.270GGK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15553} G2G500X +PERO5              =  0.460G1G500Y + 0.270GGO500C + 0.270GGK500M                 : ARR( 0.183E-11,   450., 0.0);
+{ 15554} G2G500X +PERO6              =  0.300G1G500Y + 0.350GGO500C + 0.350GGK500M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15555} G2G500X +PERO9              =  0.650G1G500Y + 0.350GGK500M                                : ARR( 0.100E-10,     0., 0.0);
+{ 15556} G1G500Y                     =       GDO2000 +      GGD3001 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{ 15557} GAO5005 +GHO                =       GAD5003 +      GHO2                                   : ARR( 0.421E-11,     0., 0.0);
+{ 15558} GAO5005 +GHO                =       GAK500K +      GHO2                                   : ARR( 0.108E-10,     0., 0.0);
+{ 15559} GAO5005 +GHO                =       G2A500d                                               : ARR( 0.148E-11,     0., 0.0);
+{ 15560} GAO5005 +GHO                =       GAK5006 +      GHO2                                   : ARR( 0.486E-11,     0., 0.0);
+{ 15561} G2A500d +GNO                =       G1A500e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15562} G2A500d +GNO                =       GAN500p                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15563} G2A500d +GHO2               =       GAH500m                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15564} G2A500d +GNO3               =       G1A500e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15565} G2A500d +MEPERO             =  0.340G1A500e + 0.330GAO500B + 0.330GAK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15566} G2A500d +PERO1              =  0.460G1A500e + 0.270GAO500B + 0.270GAK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15567} G2A500d +PERO2              =  0.400G1A500e + 0.300GAO500B + 0.300GAK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15568} G2A500d +PERO3              =  0.460G1A500e + 0.270GAO500B + 0.270GAK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15569} G2A500d +PERO5              =  0.460G1A500e + 0.270GAO500B + 0.270GAK500L                 : ARR( 0.183E-11,   450., 0.0);
+{ 15570} G2A500d +PERO6              =  0.300G1A500e + 0.350GAO500B + 0.350GAK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15571} G2A500d +PERO9              =  0.650G1A500e + 0.350GAK500L                                : ARR( 0.100E-10,     0., 0.0);
+{ 15572} G1A500e                     =       GDO2000 +      GAD3001 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{ 15573} GPO5005                     =       G3K5006 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15574} GPO5005 +GHO                =       GPD5002 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{ 15575} GPO5005 +GHO                =       GPK500L +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 15576} GPO5005 +GHO                =       G2P500g                                               : ARR( 0.144E-11,     0., 0.0);
+{ 15577} GPO5005 +GHO                =       GPK5006 +      GHO2                                   : ARR( 0.640E-11,     0., 0.0);
+{ 15578} GPO5005+HV               =       G3K5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 15579} G2P500g +GNO                =       G1P500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15580} G2P500g +GNO                =       GPN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15581} G2P500g +GHO2               =       GPH500o                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15582} G2P500g +GNO3               =       G1P500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15583} G2P500g +MEPERO             =  0.340G1P500h + 0.330GPO500C + 0.330GPK500M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15584} G2P500g +PERO1              =  0.460G1P500h + 0.270GPO500C + 0.270GPK500M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15585} G2P500g +PERO2              =  0.400G1P500h + 0.300GPO500C + 0.300GPK500M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15586} G2P500g +PERO3              =  0.460G1P500h + 0.270GPO500C + 0.270GPK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15587} G2P500g +PERO5              =  0.460G1P500h + 0.270GPO500C + 0.270GPK500M                 : ARR( 0.183E-11,   450., 0.0);
+{ 15588} G2P500g +PERO6              =  0.300G1P500h + 0.350GPO500C + 0.350GPK500M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15589} G2P500g +PERO9              =  0.650G1P500h + 0.350GPK500M                                : ARR( 0.100E-10,     0., 0.0);
+{ 15590} G1P500h                     =       GDO2000 +      GPD3001 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{ 15591} GGO4004 +GHO                =       GGD4001 +      GHO2                                   : ARR( 0.428E-11,     0., 0.0);
+{ 15592} GGO4004 +GHO                =       GGK4003 +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 15593} GGO4004 +GHO                =       G3K4005                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 15594} GGO4004+HV               =       G2O3003 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 15595} GAO4004 +GHO                =       GAD4001 +      GHO2                                   : ARR( 0.442E-11,     0., 0.0);
+{ 15596} GAO4004 +GHO                =       GAK4003 +      GHO2                                   : ARR( 0.113E-10,     0., 0.0);
+{ 15597} GPO4004                     =       G3K4005 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15598} GPO4004 +GHO                =       GPD4001 +      GHO2                                   : ARR( 0.410E-11,     0., 0.0);
+{ 15599} GPO4004 +GHO                =       GPK4003 +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 15600} GPO4004 +GHO                =       G2P400J                                               : ARR( 0.878E-12,     0., 0.0);
+{ 15601} GPO4004+HV               =       G3K4005 +      GNO2                                   :  0.100E+01*SUN;
+{ 15602} G2P400J +GNO                =       G1P400K +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15603} G2P400J +GNO                =       GPN400O                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15604} G2P400J +GHO2               =       GPH400K                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15605} G2P400J +GNO3               =       G1P400K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15606} G2P400J +MEPERO             =  0.340G1P400K + 0.330GPO4006 + 0.330GPK4007                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15607} G2P400J +PERO1              =  0.460G1P400K + 0.270GPO4006 + 0.270GPK4007                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15608} G2P400J +PERO2              =  0.400G1P400K + 0.300GPO4006 + 0.300GPK4007                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15609} G2P400J +PERO3              =  0.460G1P400K + 0.270GPO4006 + 0.270GPK4007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15610} G2P400J +PERO5              =  0.460G1P400K + 0.270GPO4006 + 0.270GPK4007                 : ARR( 0.183E-11,   450., 0.0);
+{ 15611} G2P400J +PERO6              =  0.300G1P400K + 0.350GPO4006 + 0.350GPK4007                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15612} G2P400J +PERO9              =  0.650G1P400K + 0.350GPK4007                                : ARR( 0.100E-10,     0., 0.0);
+{ 15613} G1P400K                     =       GDO2000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  5490., 0.0);
+{ 15614} G1P400K                     =       GDO3002 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 15615} GHD500I +GHO                =       GDK500D +      GHO                                    : ARR( 0.848E-10,     0., 0.0);
+{ 15616} GHD500I +GHO                =       G3H500R                                               : ARR( 0.221E-10,     0., 0.0);
+{ 15617} GHD500I +GNO3               =       G3H500R +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15618} GHD500I+HV               =       G3K2000 +      GDD3000 +      GHO                     :  0.100E+01*SUN;
+{ 15619} GHD500I+HV               =       G1D500C +      GHO                                    :  0.100E+01*SUN;
+{ 15620} GHD500I+HV               =       G2H400Z +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 15621} G3H500R +GHO2               =  0.800GGH500W + 0.200GAH500Y + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15622} G3H500R +GNO                =       G2H400Z +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15623} G3H500R +GNO2               =       GPH500a                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15624} G3H500R +GNO3               =       G2H400Z +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15625} G3H500R +MEPERO             =  0.685G2H400Z + 0.315GAH500Y + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15626} G3H500R +PERO1              =  0.800G2H400Z + 0.200GAH500Y + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15627} G3H500R +PERO2              =  0.750G2H400Z + 0.250GAH500Y + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15628} G3H500R +PERO3              =  0.800G2H400Z + 0.200GAH500Y + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15629} G3H500R +PERO5              =  0.650G2H400Z + 0.350GAH500Y + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15630} G3H500R +PERO6              =  0.650G2H400Z + 0.350GAH500Y + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15631} G3H500R +PERO9              =       G2H400Z +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15632} G2H400Z +GNO                =       G1H400d +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15633} G2H400Z +GNO                =       GHN400g                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15634} G2H400Z +GHO2               =       GHH400X                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15635} G2H400Z +GNO3               =       G1H400d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15636} G2H400Z +MEPERO             =  0.480G1H400d + 0.260GHK4008 + 0.260GHD4007                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15637} G2H400Z +PERO1              =  0.600G1H400d + 0.200GHK4008 + 0.200GHD4007                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15638} G2H400Z +PERO2              =  0.560G1H400d + 0.220GHK4008 + 0.220GHD4007                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15639} G2H400Z +PERO3              =  0.600G1H400d + 0.200GHK4008 + 0.200GHD4007                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15640} G2H400Z +PERO5              =  0.600G1H400d + 0.200GHK4008 + 0.200GHD4007                 : ARR( 0.533E-11,   500., 0.0);
+{ 15641} G2H400Z +PERO6              =  0.460G1H400d + 0.270GHK4008 + 0.270GHD4007                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15642} G2H400Z +PERO9              =  0.800G1H400d + 0.200GHD4007                                : ARR( 0.100E-10,     0., 0.0);
+{ 15643} G1H400d +OXYGEN             =       GHD4007 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 15644} G1H400d                     =       GDK3000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5784., 0.0);
+{ 15645} GDK500H +GHO                =       GDK500D +      GHO2                                   : ARR( 0.200E-10,     0., 0.0);
+{ 15646} GDK500H +GHO                =       G2D500U                                               : ARR( 0.275E-11,     0., 0.0);
+{ 15647} GDK500H +GHO                =       G3K500O                                               : ARR( 0.209E-10,     0., 0.0);
+{ 15648} GDK500H +GNO3               =       G3K500O +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15649} GDK500H+HV               =       G3K2000 +      GDD3000 +      GHO2                    :  0.100E+01*SUN;
+{ 15650} GDK500H+HV               =       G2K400A +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 15651} G2D500U +GNO                =       G1D500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15652} G2D500U +GNO                =       GND5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15653} G2D500U +GHO2               =       GHD500y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15654} G2D500U +GNO3               =       G1D500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15655} G2D500U +MEPERO             =  0.340G1D500h + 0.330GDK500S + 0.330GDK500Z                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15656} G2D500U +PERO1              =  0.460G1D500h + 0.270GDK500S + 0.270GDK500Z                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15657} G2D500U +PERO2              =  0.400G1D500h + 0.300GDK500S + 0.300GDK500Z                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15658} G2D500U +PERO3              =  0.460G1D500h + 0.270GDK500S + 0.270GDK500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15659} G2D500U +PERO5              =  0.460G1D500h + 0.270GDK500S + 0.270GDK500Z                 : ARR( 0.183E-11,   450., 0.0);
+{ 15660} G2D500U +PERO6              =  0.300G1D500h + 0.350GDK500S + 0.350GDK500Z                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15661} G2D500U +PERO9              =  0.650G1D500h + 0.350GDK500Z                                : ARR( 0.100E-10,     0., 0.0);
+{ 15662} G3K500O +GHO2               =  0.800GGK5009 + 0.200GAK5009 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15663} G3K500O +GNO                =       G2K400A +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 15664} G3K500O +GNO2               =       GPK5009                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15665} G3K500O +GNO3               =       G2K400A +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 15666} G3K500O +MEPERO             =  0.685G2K400A + 0.315GAK5009 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15667} G3K500O +PERO1              =  0.800G2K400A + 0.200GAK5009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15668} G3K500O +PERO2              =  0.750G2K400A + 0.250GAK5009 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15669} G3K500O +PERO3              =  0.800G2K400A + 0.200GAK5009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15670} G3K500O +PERO5              =  0.650G2K400A + 0.350GAK5009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15671} G3K500O +PERO6              =  0.650G2K400A + 0.350GAK5009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 15672} G3K500O +PERO9              =       G2K400A +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 15673} G2K400A +GNO                =       G1K400A +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15674} G2K400A +GNO                =       GNK4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15675} G2K400A +GHO2               =       GHK400B                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15676} G2K400A +GNO3               =       G1K400A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15677} G2K400A +MEPERO             =  0.480G1K400A + 0.260GKO4005 + 0.260GDK4003                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15678} G2K400A +PERO1              =  0.600G1K400A + 0.200GKO4005 + 0.200GDK4003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15679} G2K400A +PERO2              =  0.560G1K400A + 0.220GKO4005 + 0.220GDK4003                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15680} G2K400A +PERO3              =  0.600G1K400A + 0.200GKO4005 + 0.200GDK4003                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15681} G2K400A +PERO5              =  0.600G1K400A + 0.200GKO4005 + 0.200GDK4003                 : ARR( 0.533E-11,   500., 0.0);
+{ 15682} G2K400A +PERO6              =  0.460G1K400A + 0.270GKO4005 + 0.270GDK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15683} G2K400A +PERO9              =  0.800G1K400A + 0.200GDK4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 15684} G1D500h                     =       GDK3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  5180., 0.0);
+{ 15685} G1D500h                     =       GDK4003 +      GCO     +      GHO2                    : ARR( 0.200E+15,  4861., 0.0);
+{ 15686} G1K400A                     =       GDK3000 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 15687} GHD500J +GHO                =       GDK500C +      GHO                                    : ARR( 0.848E-10,     0., 0.0);
+{ 15688} GHD500J +GHO                =       G3H500S                                               : ARR( 0.221E-10,     0., 0.0);
+{ 15689} GHD500J +GNO3               =       G3H500S +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15690} GHD500J+HV               =       G3K2000 +      G2H300A                                :  0.100E+01*SUN;
+{ 15691} GHD500J+HV               =       G1D500D +      GHO                                    :  0.100E+01*SUN;
+{ 15692} GHD500J+HV               =       GDK4000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 15693} G3H500S +GHO2               =  0.800GGH500X + 0.200GAH500Z + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15694} G3H500S +GNO                =       GDK4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15695} G3H500S +GNO2               =       GPH500b                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15696} G3H500S +GNO3               =       GDK4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15697} G3H500S +MEPERO             =  0.685GDK4000 + 0.315GAH500Z + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15698} G3H500S +PERO1              =  0.800GDK4000 + 0.200GAH500Z + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15699} G3H500S +PERO2              =  0.750GDK4000 + 0.250GAH500Z + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15700} G3H500S +PERO3              =  0.800GDK4000 + 0.200GAH500Z + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15701} G3H500S +PERO5              =  0.650GDK4000 + 0.350GAH500Z + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15702} G3H500S +PERO6              =  0.650GDK4000 + 0.350GAH500Z + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15703} G3H500S +PERO9              =       GDK4000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15704} GHH500S +GHO                =       GHK500U +      GHO                                    : ARR( 0.270E-10,     0., 0.0);
+{ 15705} GHH500S +GHO                =       GHK500Y +      GHO                                    : ARR( 0.140E-09,     0., 0.0);
+{ 15706} GHH500S+HV               =       G3K2000 +      GHD3003 +      GHO                     :  0.100E+01*SUN;
+{ 15707} GHH500S+HV               =       G1H503J +      GHO                                    :  0.100E+01*SUN;
+{ 15708} GHH500S+HV               =       G1H500f +      GHO                                    :  0.100E+01*SUN;
+{ 15709} GHK500X +GHO                =       GKK500A +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 15710} GHK500X +GHO                =       GHK500Y +      GHO2                                   : ARR( 0.329E-10,     0., 0.0);
+{ 15711} GHK500X +GHO                =       GHD500u +      GHO2                                   : ARR( 0.404E-11,     0., 0.0);
+{ 15712} GHK500X +GHO                =       G2K500j                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15713} GHK500X+HV               =       G3K2000 +      GDO3002 +      GHO                     :  0.100E+01*SUN;
+{ 15714} GHK500X+HV               =       G1K500o +      GHO                                    :  0.100E+01*SUN;
+{ 15715} G2K500j +GNO                =       G1K500o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15716} G2K500j +GNO                =       GNK500e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15717} G2K500j +GHO2               =       GHK500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15718} G2K500j +GNO3               =       G1K500o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15719} G2K500j +MEPERO             =  0.340G1K500o + 0.330GKO500K + 0.330GKK500A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15720} G2K500j +PERO1              =  0.460G1K500o + 0.270GKO500K + 0.270GKK500A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15721} G2K500j +PERO2              =  0.400G1K500o + 0.300GKO500K + 0.300GKK500A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15722} G2K500j +PERO3              =  0.460G1K500o + 0.270GKO500K + 0.270GKK500A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15723} G2K500j +PERO5              =  0.460G1K500o + 0.270GKO500K + 0.270GKK500A                 : ARR( 0.183E-11,   450., 0.0);
+{ 15724} G2K500j +PERO6              =  0.300G1K500o + 0.350GKO500K + 0.350GKK500A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15725} G2K500j +PERO9              =  0.650G1K500o + 0.350GKK500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 15726} GHK500Y +GHO                =       GKK500B +      GHO                                    : ARR( 0.155E-10,     0., 0.0);
+{ 15727} GHK500Y +GHO                =       GHD500z +      GHO2                                   : ARR( 0.248E-11,     0., 0.0);
+{ 15728} GHK500Y +GHO                =       G2K500Q                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 15729} GHK500Y+HV               =       G3K2000 +      GDK3001 +      GHO                     :  0.100E+01*SUN;
+{ 15730} GHK500Y+HV               =       G1K500R +      GHO                                    :  0.100E+01*SUN;
+{ 15731} GHK500Y+HV               =       G3H4009 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 15732} GHD4007 +GHO                =       GDK4008 +      GHO                                    : ARR( 0.160E-10,     0., 0.0);
+{ 15733} GHD4007 +GHO                =       G3H4009                                               : ARR( 0.689E-10,     0., 0.0);
+{ 15734} GHD4007 +GNO3               =       G3H4009 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15735} GHD4007+HV               =       G3K2000 +      GDD2000 +      GHO                     :  0.100E+01*SUN;
+{ 15736} GHD4007+HV               =       G1D400D +      GHO                                    :  0.100E+01*SUN;
+{ 15737} GHD4007+HV               =       GDK3000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 15738} GHK500Z +GHO                =       GKK500C +      GHO                                    : ARR( 0.145E-09,     0., 0.0);
+{ 15739} GHK500Z+HV               =       G3K2000 +      GHD3003 +      GHO2                    :  0.100E+01*SUN;
+{ 15740} GHK500Z+HV               =       G1K500Q +      GHO                                    :  0.100E+01*SUN;
+{ 15741} GKO500K +GHO                =       GKK500A +      GHO2                                   : ARR( 0.636E-11,     0., 0.0);
+{ 15742} GKO500K +GHO                =       GKK500C +      GHO2                                   : ARR( 0.331E-10,     0., 0.0);
+{ 15743} GKO500K +GHO                =       GDK500S +      GHO2                                   : ARR( 0.407E-11,     0., 0.0);
+{ 15744} GKO500K+HV               =       G3K2000 +      GDO3002 +      GHO2                    :  0.100E+01*SUN;
+{ 15745} GKK500C +GHO                =       GKK500B +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 15746} GKK500C +GHO                =       GDK500Z +      GHO2                                   : ARR( 0.260E-11,     0., 0.0);
+{ 15747} GKK500C+HV               =       G3K2000 +      GDK3001 +      GHO2                    :  0.100E+01*SUN;
+{ 15748} GKK500C+HV               =       G3K4009 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 15749} GDK4003 +GHO                =       GDK4008 +      GHO2                                   : ARR( 0.384E-11,     0., 0.0);
+{ 15750} GDK4003 +GHO                =       G3K4009                                               : ARR( 0.661E-10,     0., 0.0);
+{ 15751} GDK4003 +GNO3               =       G3K4009 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15752} GDK4003+HV               =       G3K2000 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 15753} GDK4003+HV               =       GDK3000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15754} GHH3003 +GHO                =       GHH3005 +      GHO2                                   : ARR( 0.403E-11,     0., 0.0);
+{ 15755} GHH3003 +GHO                =       GHK3001 +      GHO                                    : ARR( 0.413E-10,     0., 0.0);
+{ 15756} GHH3003 +GHO                =       GHD3003 +      GHO                                    : ARR( 0.161E-10,     0., 0.0);
+{ 15757} GHH3003 +GHO                =       G2H3005                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 15758} GHH3003 +GHO                =       G2H3004                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 15759} GHH3003+HV               =       G1H3006 +      GHO                                    :  0.100E+01*SUN;
+{ 15760} GHH3003+HV               =       G1H3005 +      GHO                                    :  0.100E+01*SUN;
+{ 15761} GHO3004 +GHO                =       GHD3003 +      GHO2                                   : ARR( 0.808E-11,     0., 0.0);
+{ 15762} GHO3004 +GHO                =       GKO3001 +      GHO                                    : ARR( 0.414E-10,     0., 0.0);
+{ 15763} GHO3004 +GHO                =       G2O3004                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15764} GHO3004+HV               =       G1O3004 +      GHO                                    :  0.100E+01*SUN;
+{ 15765} GHD3003 +GHO                =       GHD3004 +      GHO2                                   : ARR( 0.128E-10,     0., 0.0);
+{ 15766} GHD3003 +GHO                =       GDK3001 +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 15767} GHD3003 +GHO                =       G3H3004                                               : ARR( 0.208E-10,     0., 0.0);
+{ 15768} GHD3003 +GHO                =       G2D3004                                               : ARR( 0.190E-11,  -190., 0.0);
+{ 15769} GHD3003 +GNO3               =       G3H3004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15770} GHD3003+HV               =       G1D3004 +      GHO                                    :  0.100E+01*SUN;
+{ 15771} GHD3003+HV               =       GDO2000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 15772} G2D3004 +GNO                =       G1D3004 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 15773} G2D3004 +GNO                =       GND3004                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 15774} G2D3004 +GHO2               =       GHD3003                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 15775} G2D3004 +GNO3               =       G1D3004 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15776} G2D3004 +MEPERO             =  0.340G1D3004 + 0.330GDO3002 + 0.330GDK3001                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15777} G2D3004 +PERO1              =  0.460G1D3004 + 0.270GDO3002 + 0.270GDK3001                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15778} G2D3004 +PERO2              =  0.400G1D3004 + 0.300GDO3002 + 0.300GDK3001                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15779} G2D3004 +PERO3              =  0.460G1D3004 + 0.270GDO3002 + 0.270GDK3001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15780} G2D3004 +PERO5              =  0.460G1D3004 + 0.270GDO3002 + 0.270GDK3001                 : ARR( 0.183E-11,   450., 0.0);
+{ 15781} G2D3004 +PERO6              =  0.300G1D3004 + 0.350GDO3002 + 0.350GDK3001                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15782} G2D3004 +PERO9              =  0.650G1D3004 + 0.350GDK3001                                : ARR( 0.100E-10,     0., 0.0);
+{ 15783} GHN501t +GHO                =       GHN502G +      GHO2                                   : ARR( 0.633E-11,     0., 0.0);
+{ 15784} GHN501t +GHO                =       GND500U +      GHO                                    : ARR( 0.514E-10,     0., 0.0);
+{ 15785} GHN501t +GHO                =       G2N501W                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15786} GHN501t+HV               =       G1H503P +      GNO2                                   :  0.100E+01*SUN;
+{ 15787} GHN501t+HV               =       G3N3000 +      GHD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 15788} GHN501t+HV               =       G1N501Z +      GHO                                    :  0.100E+01*SUN;
+{ 15789} G1H503P +OXYGEN             =       GHD500C +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 15790} G1H503P                     =       GHK500c +      GHO2                                   : ARR( 0.800E+11,  4007., 0.0);
+{ 15791} GND500U +GHO                =       GND500i +      GHO2                                   : ARR( 0.386E-11,     0., 0.0);
+{ 15792} GND500U +GHO                =       G3N500Z                                               : ARR( 0.663E-10,     0., 0.0);
+{ 15793} GND500U +GNO3               =       G3N500Z +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15794} GND500U+HV               =       G1D500i +      GNO2                                   :  0.100E+01*SUN;
+{ 15795} GND500U+HV               =       G3N3000 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 15796} GND500U+HV               =       GND400B +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15797} G3N500Z +GHO2               =  0.800GGN500j + 0.200GAN500q + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15798} G3N500Z +GNO                =       GND400B +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15799} G3N500Z +GNO2               =       GPN500v                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15800} G3N500Z +GNO3               =       GND400B +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15801} G3N500Z +MEPERO             =  0.685GND400B + 0.315GAN500q + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15802} G3N500Z +PERO1              =  0.800GND400B + 0.200GAN500q + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15803} G3N500Z +PERO2              =  0.750GND400B + 0.250GAN500q + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15804} G3N500Z +PERO3              =  0.800GND400B + 0.200GAN500q + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15805} G3N500Z +PERO5              =  0.650GND400B + 0.350GAN500q + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15806} G3N500Z +PERO6              =  0.650GND400B + 0.350GAN500q + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15807} G3N500Z +PERO9              =       GND400B +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15808} G1D500i +OXYGEN             =       GDD5005 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 15809} G1D500i                     =       GDK500L +      GHO2                                   : ARR( 0.800E+11,  4228., 0.0);
+{ 15810} GND400B +GHO                =       G3N3000 +      GCO                                    : ARR( 0.130E-10,     0., 0.0);
+{ 15811} GND400B +GNO3               =       G3N3000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 15812} GND400B+HV               =       G1D400F +      GNO2                                   :  0.100E+01*SUN;
+{ 15813} GND400B+HV               =       G3N3000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 15814} GND400B+HV               =       GND3000 +      GCO                                    :  0.100E+01*SUN;
+{ 15815} GND400B+HV               =       GN02000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 15816} G1D400F +OXYGEN             =       GDD4002 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 15817} G1D400F                     =       G3K3001 +      GCO                                    : ARR( 0.800E+11,  4780., 0.0);
+{ 15818} GHH500T +GHO                =       GHK500D +      GHO                                    : ARR( 0.138E-09,     0., 0.0);
+{ 15819} GHH500T +GHO                =       GHD500J +      GHO                                    : ARR( 0.170E-10,     0., 0.0);
+{ 15820} GHH500T+HV               =       G3K2000 +      G2H300B                                :  0.100E+01*SUN;
+{ 15821} GHH500T+HV               =       GK03000 +      GDD2000 + 2.000GHO                     :  0.100E+01*SUN;
+{ 15822} GHH500T+HV               =       G1H500h +      GHO                                    :  0.100E+01*SUN;
+{ 15823} GHH500T+HV               =       G1H501E +      GHO                                    :  0.100E+01*SUN;
+{ 15824} G2H300B +GNO                =       G1H300A +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 15825} G2H300B +GNO                =       GHH3001                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 15826} G2H300B +GHO2               =       GHH3008                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 15827} G2H300B +GNO3               =       G1H300A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15828} G2H300B +MEPERO             =  0.480G1H300A + 0.260GHH3003 + 0.260GHH3005                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15829} G2H300B +PERO1              =  0.600G1H300A + 0.200GHH3003 + 0.200GHH3005                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15830} G2H300B +PERO2              =  0.560G1H300A + 0.220GHH3003 + 0.220GHH3005                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15831} G2H300B +PERO3              =  0.600G1H300A + 0.200GHH3003 + 0.200GHH3005                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15832} G2H300B +PERO5              =  0.600G1H300A + 0.200GHH3003 + 0.200GHH3005                 : ARR( 0.533E-11,   500., 0.0);
+{ 15833} G2H300B +PERO6              =  0.460G1H300A + 0.270GHH3003 + 0.270GHH3005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15834} G2H300B +PERO9              =  0.800G1H300A + 0.200GHH3005                                : ARR( 0.100E-10,     0., 0.0);
+{ 15835} GHH3004 +GHO                =       GHD3000 +      GHO                                    : ARR( 0.333E-10,     0., 0.0);
+{ 15836} GHH3004 +GHO                =       G2H3006                                               : ARR( 0.394E-11,  -190., 0.0);
+{ 15837} GHH3004+HV               =       G1H3002 +      GHO                                    :  0.200E+01*SUN;
+{ 15838} GGH5004 +GHO                =       GGH500W +      GHO2                                   : ARR( 0.855E-11,     0., 0.0);
+{ 15839} GGH5004 +GHO                =       GGK5003 +      GHO                                    : ARR( 0.421E-10,     0., 0.0);
+{ 15840} GGH5004 +GHO                =       G2G5003                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 15841} GGH5004 +GHO                =       G3H5003                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 15842} GGH5004+HV               =       G1G5003 +      GHO                                    :  0.100E+01*SUN;
+{ 15843} GGH5004+HV               =       G2H4009 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 15844} GAH5004 +GHO                =       GAH500Y +      GHO2                                   : ARR( 0.861E-11,     0., 0.0);
+{ 15845} GAH5004 +GHO                =       GAK5003 +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{ 15846} GAH5004 +GHO                =       G2A5003                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 15847} GAH5004+HV               =       G1A5003 +      GHO                                    :  0.100E+01*SUN;
+{ 15848} GPH5004                     =       G3H5003 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15849} GPH5004 +GHO                =       GPH500a +      GHO2                                   : ARR( 0.856E-11,     0., 0.0);
+{ 15850} GPH5004 +GHO                =       GPK5003 +      GHO                                    : ARR( 0.421E-10,     0., 0.0);
+{ 15851} GPH5004 +GHO                =       G2P5003                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 15852} GPH5004+HV               =       G1P5003 +      GHO                                    :  0.100E+01*SUN;
+{ 15853} GPH5004+HV               =       G3H5003 +      GNO2                                   :  0.100E+01*SUN;
+{ 15854} GHN400E +GHO                =       GHN400g +      GHO2                                   : ARR( 0.852E-11,     0., 0.0);
+{ 15855} GHN400E +GHO                =       GNK4003 +      GHO                                    : ARR( 0.839E-11,     0., 0.0);
+{ 15856} GHN400E +GHO                =       G2N400f                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 15857} GHN400E+HV               =       G1N400j +      GHO                                    :  0.100E+01*SUN;
+{ 15858} GHN400E+HV               =       G1H4009 +      GNO2                                   :  0.100E+01*SUN;
+{ 15859} G2N400f +GNO                =       G1N400j +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 15860} G2N400f +GNO                =       GNN4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 15861} G2N400f +GHO2               =       GHN400E                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 15862} G2N400f +GNO3               =       G1N400j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15863} G2N400f +MEPERO             =  0.340G1N400j + 0.330GNO400A + 0.330GNK4003                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15864} G2N400f +PERO1              =  0.460G1N400j + 0.270GNO400A + 0.270GNK4003                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15865} G2N400f +PERO2              =  0.400G1N400j + 0.300GNO400A + 0.300GNK4003                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15866} G2N400f +PERO3              =  0.460G1N400j + 0.270GNO400A + 0.270GNK4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15867} G2N400f +PERO5              =  0.460G1N400j + 0.270GNO400A + 0.270GNK4003                 : ARR( 0.183E-11,   450., 0.0);
+{ 15868} G2N400f +PERO6              =  0.300G1N400j + 0.350GNO400A + 0.350GNK4003                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15869} G2N400f +PERO9              =  0.650G1N400j + 0.350GNK4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 15870} GHH4005 +GHO                =       GHH400X +      GHO2                                   : ARR( 0.933E-11,     0., 0.0);
+{ 15871} GHH4005 +GHO                =       GHK4004 +      GHO                                    : ARR( 0.459E-10,     0., 0.0);
+{ 15872} GHH4005 +GHO                =       GHD4008 +      GHO                                    : ARR( 0.179E-10,     0., 0.0);
+{ 15873} GHH4005+HV               =       G1H400W +      GHO                                    :  0.100E+01*SUN;
+{ 15874} GHH4005+HV               =       G1H4009 +      GHO                                    :  0.100E+01*SUN;
+{ 15875} GHO4008 +GHO                =       GHK4008 +      GHO2                                   : ARR( 0.844E-11,     0., 0.0);
+{ 15876} GHO4008 +GHO                =       GKO4003 +      GHO                                    : ARR( 0.415E-10,     0., 0.0);
+{ 15877} GHO4008 +GHO                =       GHD4008 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 15878} GHO4008 +GHO                =       G2O4009                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15879} GHO4008+HV               =       G1O4009 +      GHO                                    :  0.100E+01*SUN;
+{ 15880} GHD4008 +GHO                =       GHD4007 +      GHO2                                   : ARR( 0.280E-10,     0., 0.0);
+{ 15881} GHD4008 +GHO                =       GDK4004 +      GHO                                    : ARR( 0.265E-10,     0., 0.0);
+{ 15882} GHD4008 +GHO                =       G3H400A                                               : ARR( 0.219E-10,     0., 0.0);
+{ 15883} GHD4008 +GNO3               =       G3H400A +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15884} GHD4008+HV               =       G1D400C +      GHO                                    :  0.100E+01*SUN;
+{ 15885} GHD4008+HV               =       GDO3001 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 15886} GHN400F +GHO                =       GHN400T +      GHO2                                   : ARR( 0.422E-11,     0., 0.0);
+{ 15887} GHN400F +GHO                =       GNK4005 +      GHO                                    : ARR( 0.432E-10,     0., 0.0);
+{ 15888} GHN400F +GHO                =       G2N400B                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 15889} GHN400F+HV               =       G1N400B +      GHO                                    :  0.100E+01*SUN;
+{ 15890} GHN400F+HV               =       G1H400A +      GNO2                                   :  0.100E+01*SUN;
+{ 15891} GHH4006 +GHO                =       GHH400H +      GHO2                                   : ARR( 0.444E-11,     0., 0.0);
+{ 15892} GHH4006 +GHO                =       GHK4005 +      GHO                                    : ARR( 0.455E-10,     0., 0.0);
+{ 15893} GHH4006 +GHO                =       GHH400Y +      GHO2                                   : ARR( 0.114E-10,     0., 0.0);
+{ 15894} GHH4006 +GHO                =       GHD4009 +      GHO                                    : ARR( 0.178E-10,     0., 0.0);
+{ 15895} GHH4006+HV               =       G1H400X +      GHO                                    :  0.100E+01*SUN;
+{ 15896} GHH4006+HV               =       G1H400A +      GHO                                    :  0.100E+01*SUN;
+{ 15897} GHO4009 +GHO                =       GHD4009 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 15898} GHO4009 +GHO                =       GHK4009 +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 15899} GHO4009 +GHO                =       GKO4004 +      GHO                                    : ARR( 0.415E-10,     0., 0.0);
+{ 15900} GHO4009 +GHO                =       GHD400A +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 15901} GHO4009 +GHO                =       G2O400A                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 15902} GHO4009+HV               =       G1O400A +      GHO                                    :  0.100E+01*SUN;
+{ 15903} GHD4009 +GHO                =       GDK4006 +      GHO                                    : ARR( 0.143E-09,     0., 0.0);
+{ 15904} GHD4009 +GHO                =       G3H400B                                               : ARR( 0.227E-10,     0., 0.0);
+{ 15905} GHD4009 +GNO3               =       G3H400B +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15906} GHD4009+HV               =       G1D4002 +      GHO                                    :  0.100E+01*SUN;
+{ 15907} GHD4009+HV               =       GHD3003 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15908} G3H400B +GHO2               =  0.800GGH400G + 0.200GAH400J + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15909} G3H400B +GNO                =       GHD3003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15910} G3H400B +GNO2               =       GPH400L                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15911} G3H400B +GNO3               =       GHD3003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15912} G3H400B +MEPERO             =  0.685GHD3003 + 0.315GAH400J + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15913} G3H400B +PERO1              =  0.800GHD3003 + 0.200GAH400J + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15914} G3H400B +PERO2              =  0.750GHD3003 + 0.250GAH400J + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15915} G3H400B +PERO3              =  0.800GHD3003 + 0.200GAH400J + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15916} G3H400B +PERO5              =  0.650GHD3003 + 0.350GAH400J + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15917} G3H400B +PERO6              =  0.650GHD3003 + 0.350GAH400J + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15918} G3H400B +PERO9              =       GHD3003 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15919} GHD400A +GHO                =       GHD400G +      GHO2                                   : ARR( 0.360E-10,     0., 0.0);
+{ 15920} GHD400A +GHO                =       GDK4007 +      GHO                                    : ARR( 0.277E-10,     0., 0.0);
+{ 15921} GHD400A +GHO                =       G3H400C                                               : ARR( 0.229E-10,     0., 0.0);
+{ 15922} GHD400A +GNO3               =       G3H400C +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15923} GHD400A+HV               =       G1D400E +      GHO                                    :  0.100E+01*SUN;
+{ 15924} GHD400A+HV               =       GDO3002 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 15925} G3H400C +GHO2               =  0.800GGH400H + 0.200GAH400K + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 15926} G3H400C +GNO                =       GDO3002 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 15927} G3H400C +GNO2               =       GPH400K                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 15928} G3H400C +GNO3               =       GDO3002 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 15929} G3H400C +MEPERO             =  0.685GDO3002 + 0.315GAH400K + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15930} G3H400C +PERO1              =  0.800GDO3002 + 0.200GAH400K + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15931} G3H400C +PERO2              =  0.750GDO3002 + 0.250GAH400K + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15932} G3H400C +PERO3              =  0.800GDO3002 + 0.200GAH400K + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15933} G3H400C +PERO5              =  0.650GDO3002 + 0.350GAH400K + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15934} G3H400C +PERO6              =  0.650GDO3002 + 0.350GAH400K + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 15935} G3H400C +PERO9              =       GDO3002 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 15936} GGO5006 +GHO                =       GGK5009 +      GHO2                                   : ARR( 0.887E-11,     0., 0.0);
+{ 15937} GGO5006 +GHO                =       GGK5003 +      GHO2                                   : ARR( 0.109E-10,     0., 0.0);
+{ 15938} GGO5006 +GHO                =       G3K5008                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 15939} GGO5006+HV               =       G2O4008 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 15940} GAO5006 +GHO                =       GAK5009 +      GHO2                                   : ARR( 0.910E-11,     0., 0.0);
+{ 15941} GAO5006 +GHO                =       GAK5003 +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{ 15942} GPO5006                     =       G3K5008 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 15943} GPO5006 +GHO                =       GPK5009 +      GHO2                                   : ARR( 0.896E-11,     0., 0.0);
+{ 15944} GPO5006 +GHO                =       GPK5003 +      GHO2                                   : ARR( 0.110E-10,     0., 0.0);
+{ 15945} GPO5006+HV               =       G3K5008 +      GNO2                                   :  0.100E+01*SUN;
+{ 15946} GNO400A +GHO                =       GNK4009 +      GHO2                                   : ARR( 0.877E-11,     0., 0.0);
+{ 15947} GNO400A +GHO                =       GNK4003 +      GHO2                                   : ARR( 0.216E-11,     0., 0.0);
+{ 15948} GNO400A+HV               =       G1O4008 +      GNO2                                   :  0.100E+01*SUN;
+{ 15949} GHO400A +GHO                =       GHK400B +      GHO2                                   : ARR( 0.847E-11,     0., 0.0);
+{ 15950} GHO400A +GHO                =       GHK4004 +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 15951} GHO400A +GHO                =       GDO4005 +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{ 15952} GHO400A +GHO                =       G2O4008                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 15953} GHO400A+HV               =       G1O4008 +      GHO                                    :  0.100E+01*SUN;
+{ 15954} GOO4004 +GHO                =       GKO4005 +      GHO2                                   : ARR( 0.859E-11,     0., 0.0);
+{ 15955} GOO4004 +GHO                =       GKO4003 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 15956} GOO4004 +GHO                =       GDO4005 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 15957} GDO4005 +GHO                =       GDK4003 +      GHO2                                   : ARR( 0.268E-10,     0., 0.0);
+{ 15958} GDO4005 +GHO                =       GDK4004 +      GHO2                                   : ARR( 0.633E-11,     0., 0.0);
+{ 15959} GDO4005 +GHO                =       G3K4008                                               : ARR( 0.209E-10,     0., 0.0);
+{ 15960} GDO4005 +GNO3               =       G3K4008 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 15961} GDO4005+HV               =       GDO3001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 15962} GGK5003 +GHO                =       G2G500Y                                               : ARR( 0.539E-12,     0., 0.0);
+{ 15963} GGK5003 +GHO                =       GGK500D +      GHO2                                   : ARR( 0.518E-11,     0., 0.0);
+{ 15964} GGK5003 +GHO                =       G2G500Z                                               : ARR( 0.533E-12,     0., 0.0);
+{ 15965} GGK5003 +GHO                =       G3K5009                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 15966} GGK5003+HV               =       G3K3002 +      G2G2000                                :  0.100E+01*SUN;
+{ 15967} GGK5003+HV               =       G2K4002 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 15968} G2G500Y +GNO                =       G1G500Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15969} G2G500Y +GNO                =       GGN500L                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15970} G2G500Y +GHO2               =       GGH500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15971} G2G500Y +GNO3               =       G1G500Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15972} G2G500Y +MEPERO             =  0.480G1G500Z + 0.260GGK5008 + 0.260GGD5006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 15973} G2G500Y +PERO1              =  0.600G1G500Z + 0.200GGK5008 + 0.200GGD5006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 15974} G2G500Y +PERO2              =  0.560G1G500Z + 0.220GGK5008 + 0.220GGD5006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 15975} G2G500Y +PERO3              =  0.600G1G500Z + 0.200GGK5008 + 0.200GGD5006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 15976} G2G500Y +PERO5              =  0.600G1G500Z + 0.200GGK5008 + 0.200GGD5006                 : ARR( 0.533E-11,   500., 0.0);
+{ 15977} G2G500Y +PERO6              =  0.460G1G500Z + 0.270GGK5008 + 0.270GGD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15978} G2G500Y +PERO9              =  0.800G1G500Z + 0.200GGD5006                                : ARR( 0.100E-10,     0., 0.0);
+{ 15979} G2G500Z +GNO                =       G1G500a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15980} G2G500Z +GNO                =       GGN500k                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15981} G2G500Z +GHO2               =       GGH500i                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 15982} G2G500Z +GNO3               =       G1G500a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 15983} G2G500Z +MEPERO             =  0.340G1G500a + 0.330GGK500K + 0.330GGK500N                 : ARR( 0.565E-13,  -845., 0.0);
+{ 15984} G2G500Z +PERO1              =  0.460G1G500a + 0.270GGK500K + 0.270GGK500N                 : ARR( 0.434E-13,  -900., 0.0);
+{ 15985} G2G500Z +PERO2              =  0.400G1G500a + 0.300GGK500K + 0.300GGK500N                 : ARR( 0.162E-13, -1400., 0.0);
+{ 15986} G2G500Z +PERO3              =  0.460G1G500a + 0.270GGK500K + 0.270GGK500N                 : ARR( 0.488E-13, -1250., 0.0);
+{ 15987} G2G500Z +PERO5              =  0.460G1G500a + 0.270GGK500K + 0.270GGK500N                 : ARR( 0.183E-11,   450., 0.0);
+{ 15988} G2G500Z +PERO6              =  0.300G1G500a + 0.350GGK500K + 0.350GGK500N                 : ARR( 0.168E-13, -1300., 0.0);
+{ 15989} G2G500Z +PERO9              =  0.650G1G500a + 0.350GGK500N                                : ARR( 0.100E-10,     0., 0.0);
+{ 15990} G1G500Z                     =       GGD4004 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 15991} G1G500a                     =       G3K3002 +      GGD2000                                : ARR( 0.200E+15,  5359., 0.0);
+{ 15992} GAK5003 +GHO                =       G2A500e                                               : ARR( 0.543E-12,     0., 0.0);
+{ 15993} GAK5003 +GHO                =       GAK500B +      GHO2                                   : ARR( 0.522E-11,     0., 0.0);
+{ 15994} GAK5003 +GHO                =       G2A500f                                               : ARR( 0.397E-12,     0., 0.0);
+{ 15995} GAK5003 +GHO                =       G2K4002 +      GCO2                                   : ARR( 0.531E-12,     0., 0.0);
+{ 15996} GAK5003+HV               =       G3K3002 +      G2A2000                                :  0.100E+01*SUN;
+{ 15997} G2A500e +GNO                =       G1A500f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 15998} G2A500e +GNO                =       GAN500L                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 15999} G2A500e +GHO2               =       GAH500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16000} G2A500e +GNO3               =       G1A500f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16001} G2A500e +MEPERO             =  0.480G1A500f + 0.260GAK5008 + 0.260GAD5006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16002} G2A500e +PERO1              =  0.600G1A500f + 0.200GAK5008 + 0.200GAD5006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16003} G2A500e +PERO2              =  0.560G1A500f + 0.220GAK5008 + 0.220GAD5006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16004} G2A500e +PERO3              =  0.600G1A500f + 0.200GAK5008 + 0.200GAD5006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16005} G2A500e +PERO5              =  0.600G1A500f + 0.200GAK5008 + 0.200GAD5006                 : ARR( 0.533E-11,   500., 0.0);
+{ 16006} G2A500e +PERO6              =  0.460G1A500f + 0.270GAK5008 + 0.270GAD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16007} G2A500e +PERO9              =  0.800G1A500f + 0.200GAD5006                                : ARR( 0.100E-10,     0., 0.0);
+{ 16008} G2A500f +GNO                =       G1A500g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16009} G2A500f +GNO                =       GAN500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16010} G2A500f +GHO2               =       GAH500n                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16011} G2A500f +GNO3               =       G1A500g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16012} G2A500f +MEPERO             =  0.340G1A500g + 0.330GAK500J + 0.330GAK500M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16013} G2A500f +PERO1              =  0.460G1A500g + 0.270GAK500J + 0.270GAK500M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16014} G2A500f +PERO2              =  0.400G1A500g + 0.300GAK500J + 0.300GAK500M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16015} G2A500f +PERO3              =  0.460G1A500g + 0.270GAK500J + 0.270GAK500M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16016} G2A500f +PERO5              =  0.460G1A500g + 0.270GAK500J + 0.270GAK500M                 : ARR( 0.183E-11,   450., 0.0);
+{ 16017} G2A500f +PERO6              =  0.300G1A500g + 0.350GAK500J + 0.350GAK500M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16018} G2A500f +PERO9              =  0.650G1A500g + 0.350GAK500M                                : ARR( 0.100E-10,     0., 0.0);
+{ 16019} G1A500f                     =       GAD4003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 16020} G1A500g                     =       G3K3002 +      GAD2000                                : ARR( 0.200E+15,  5359., 0.0);
+{ 16021} GPK5003                     =       G3K5009 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 16022} GPK5003 +GHO                =       G2P500h                                               : ARR( 0.543E-12,     0., 0.0);
+{ 16023} GPK5003 +GHO                =       GPK500D +      GHO2                                   : ARR( 0.522E-11,     0., 0.0);
+{ 16024} GPK5003 +GHO                =       G2P500i                                               : ARR( 0.537E-12,     0., 0.0);
+{ 16025} GPK5003+HV               =       G3K3002 +      G2P2000                                :  0.100E+01*SUN;
+{ 16026} GPK5003+HV               =       G3K5009 +      GNO2                                   :  0.100E+01*SUN;
+{ 16027} G2P500h +GNO                =       G1P500i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16028} G2P500h +GNO                =       GPN500L                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16029} G2P500h +GHO2               =       GPH500J                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16030} G2P500h +GNO3               =       G1P500i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16031} G2P500h +MEPERO             =  0.480G1P500i + 0.260GPK5008 + 0.260GPD5006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16032} G2P500h +PERO1              =  0.600G1P500i + 0.200GPK5008 + 0.200GPD5006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16033} G2P500h +PERO2              =  0.560G1P500i + 0.220GPK5008 + 0.220GPD5006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16034} G2P500h +PERO3              =  0.600G1P500i + 0.200GPK5008 + 0.200GPD5006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16035} G2P500h +PERO5              =  0.600G1P500i + 0.200GPK5008 + 0.200GPD5006                 : ARR( 0.533E-11,   500., 0.0);
+{ 16036} G2P500h +PERO6              =  0.460G1P500i + 0.270GPK5008 + 0.270GPD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16037} G2P500h +PERO9              =  0.800G1P500i + 0.200GPD5006                                : ARR( 0.100E-10,     0., 0.0);
+{ 16038} G2P500i +GNO                =       G1P500j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16039} G2P500i +GNO                =       GPN500w                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16040} G2P500i +GHO2               =       GPH500p                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16041} G2P500i +GNO3               =       G1P500j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16042} G2P500i +MEPERO             =  0.340G1P500j + 0.330GPK500K + 0.330GPK500N                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16043} G2P500i +PERO1              =  0.460G1P500j + 0.270GPK500K + 0.270GPK500N                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16044} G2P500i +PERO2              =  0.400G1P500j + 0.300GPK500K + 0.300GPK500N                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16045} G2P500i +PERO3              =  0.460G1P500j + 0.270GPK500K + 0.270GPK500N                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16046} G2P500i +PERO5              =  0.460G1P500j + 0.270GPK500K + 0.270GPK500N                 : ARR( 0.183E-11,   450., 0.0);
+{ 16047} G2P500i +PERO6              =  0.300G1P500j + 0.350GPK500K + 0.350GPK500N                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16048} G2P500i +PERO9              =  0.650G1P500j + 0.350GPK500N                                : ARR( 0.100E-10,     0., 0.0);
+{ 16049} G1P500i                     =       GPD4003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 16050} G1P500j                     =       G3K3002 +      GPD2000                                : ARR( 0.200E+15,  5359., 0.0);
+{ 16051} GNK4003 +GHO                =       G2N400g                                               : ARR( 0.547E-12,     0., 0.0);
+{ 16052} GNK4003 +GHO                =       GNK400A +      GHO2                                   : ARR( 0.526E-11,     0., 0.0);
+{ 16053} GNK4003+HV               =       G3K3002 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 16054} GNK4003+HV               =       G1K4002 +      GNO2                                   :  0.100E+01*SUN;
+{ 16055} G2N400g +GNO                =       G1N400m +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16056} G2N400g +GNO                =       GNN400J                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16057} G2N400g +GHO2               =       GHN400Z                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16058} G2N400g +GNO3               =       G1N400m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16059} G2N400g +MEPERO             =  0.480G1N400m + 0.260GNK4006 + 0.260GND400E                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16060} G2N400g +PERO1              =  0.600G1N400m + 0.200GNK4006 + 0.200GND400E                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16061} G2N400g +PERO2              =  0.560G1N400m + 0.220GNK4006 + 0.220GND400E                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16062} G2N400g +PERO3              =  0.600G1N400m + 0.200GNK4006 + 0.200GND400E                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16063} G2N400g +PERO5              =  0.600G1N400m + 0.200GNK4006 + 0.200GND400E                 : ARR( 0.533E-11,   500., 0.0);
+{ 16064} G2N400g +PERO6              =  0.460G1N400m + 0.270GNK4006 + 0.270GND400E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16065} G2N400g +PERO9              =  0.800G1N400m + 0.200GND400E                                : ARR( 0.100E-10,     0., 0.0);
+{ 16066} G1N400m                     =       GND3003 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 16067} GHK4004 +GHO                =       GHK400A +      GHO2                                   : ARR( 0.529E-11,     0., 0.0);
+{ 16068} GHK4004 +GHO                =       GDK4004 +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 16069} GHK4004 +GHO                =       G2K4002                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 16070} GHK4004+HV               =       G3K3002 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 16071} GHK4004+HV               =       G1K4002 +      GHO                                    :  0.100E+01*SUN;
+{ 16072} GKO4003 +GHO                =       G2K400B                                               : ARR( 0.550E-12,     0., 0.0);
+{ 16073} GKO4003 +GHO                =       GKK4000 +      GHO2                                   : ARR( 0.528E-11,     0., 0.0);
+{ 16074} GKO4003 +GHO                =       GDK4004 +      GHO2                                   : ARR( 0.254E-11,     0., 0.0);
+{ 16075} GKO4003+HV               =       G3K3002 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 16076} G2K400B +GNO                =       G1K400B +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16077} G2K400B +GNO                =       GNK4005                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16078} G2K400B +GHO2               =       GHK4005                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16079} G2K400B +GNO3               =       G1K400B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16080} G2K400B +MEPERO             =  0.480G1K400B + 0.260GKO4004 + 0.260GDK4006                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16081} G2K400B +PERO1              =  0.600G1K400B + 0.200GKO4004 + 0.200GDK4006                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16082} G2K400B +PERO2              =  0.560G1K400B + 0.220GKO4004 + 0.220GDK4006                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16083} G2K400B +PERO3              =  0.600G1K400B + 0.200GKO4004 + 0.200GDK4006                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16084} G2K400B +PERO5              =  0.600G1K400B + 0.200GKO4004 + 0.200GDK4006                 : ARR( 0.533E-11,   500., 0.0);
+{ 16085} G2K400B +PERO6              =  0.460G1K400B + 0.270GKO4004 + 0.270GDK4006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16086} G2K400B +PERO9              =  0.800G1K400B + 0.200GDK4006                                : ARR( 0.100E-10,     0., 0.0);
+{ 16087} G1K400B                     =       GDK3001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 16088} GDK4004 +GHO                =       GDK4008 +      GHO2                                   : ARR( 0.530E-11,     0., 0.0);
+{ 16089} GDK4004 +GHO                =       G3K3002 +      GCO                                    : ARR( 0.131E-10,     0., 0.0);
+{ 16090} GDK4004 +GNO3               =       G3K3002 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 16091} GDK4004+HV               =       G3K3002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 16092} GDK4004+HV               =       GDO3001 +      GCO                                    :  0.100E+01*SUN;
+{ 16093} GDK4004+HV               =       GO02000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 16094} GGH5005 +GHO                =       GGH500X +      GHO2                                   : ARR( 0.873E-11,     0., 0.0);
+{ 16095} GGH5005 +GHO                =       GGK5004 +      GHO                                    : ARR( 0.262E-10,     0., 0.0);
+{ 16096} GGH5005 +GHO                =       G2G5004                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 16097} GGH5005 +GHO                =       G3H5006                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 16098} GGH5005+HV               =       G1G5004 +      GHO                                    :  0.100E+01*SUN;
+{ 16099} GGH5005+HV               =       GDO4001 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 16100} GGK5004 +GHO                =       GGK500J +      GHO2                                   : ARR( 0.276E-10,     0., 0.0);
+{ 16101} GGK5004 +GHO                =       G3K500P                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 16102} GGK5004+HV               =       GAO4000 +      GCO2                                   :  0.100E+01*SUN;
+{ 16103} G3K500P +GHO2               =  0.800GGK5004 + 0.200GAK5004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16104} G3K500P +GNO                =       G3K4000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 16105} G3K500P +GNO2               =       GPK5004                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16106} G3K500P +GNO3               =       G3K4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 16107} G3K500P +MEPERO             =  0.685G3K4000 + 0.315GAK5004 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16108} G3K500P +PERO1              =  0.800G3K4000 + 0.200GAK5004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16109} G3K500P +PERO2              =  0.750G3K4000 + 0.250GAK5004 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16110} G3K500P +PERO3              =  0.800G3K4000 + 0.200GAK5004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16111} G3K500P +PERO5              =  0.650G3K4000 + 0.350GAK5004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16112} G3K500P +PERO6              =  0.650G3K4000 + 0.350GAK5004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16113} G3K500P +PERO9              =       G3K4000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 16114} GAH5005 +GHO                =       GAH500Z +      GHO2                                   : ARR( 0.899E-11,     0., 0.0);
+{ 16115} GAH5005 +GHO                =       GAK5004 +      GHO                                    : ARR( 0.200E-10,     0., 0.0);
+{ 16116} GAH5005 +GHO                =       G2A5004                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 16117} GAH5005+HV               =       G1A5004 +      GHO                                    :  0.100E+01*SUN;
+{ 16118} GAK5004 +GHO                =       GAK500H +      GHO2                                   : ARR( 0.282E-10,     0., 0.0);
+{ 16119} GAK5004+HV               =       GDO4001 +      GCO2                                   :  0.100E+01*SUN;
+{ 16120} GPH5005                     =       G3H5006 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 16121} GPH5005 +GHO                =       GPH500b +      GHO2                                   : ARR( 0.877E-11,     0., 0.0);
+{ 16122} GPH5005 +GHO                =       GPK5004 +      GHO                                    : ARR( 0.263E-10,     0., 0.0);
+{ 16123} GPH5005 +GHO                =       G2P5004                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 16124} GPH5005+HV               =       G1P5004 +      GHO                                    :  0.100E+01*SUN;
+{ 16125} GPH5005+HV               =       G3H5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 16126} GPK5004                     =       G3K500P +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 16127} GPK5004 +GHO                =       GPK500J +      GHO2                                   : ARR( 0.277E-10,     0., 0.0);
+{ 16128} GPK5004+HV               =       G3K4000 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 16129} GNK4004 +GHO                =       GND4004 +      GHO2                                   : ARR( 0.129E-10,     0., 0.0);
+{ 16130} GNK4004 +GHO                =       G2N400h                                               : ARR( 0.872E-12,     0., 0.0);
+{ 16131} GNK4004+HV               =       G3K3001 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 16132} GNK4004+HV               =       G1K4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 16133} G2N400h +GNO                =       G1N400n +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16134} G2N400h +GNO                =       GNN400U                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16135} G2N400h +GHO2               =       GHN400u                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16136} G2N400h +GNO3               =       G1N400n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16137} G2N400h +MEPERO             =  0.340G1N400n + 0.330GNK4006 + 0.330GNK400C                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16138} G2N400h +PERO1              =  0.460G1N400n + 0.270GNK4006 + 0.270GNK400C                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16139} G2N400h +PERO2              =  0.400G1N400n + 0.300GNK4006 + 0.300GNK400C                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16140} G2N400h +PERO3              =  0.460G1N400n + 0.270GNK4006 + 0.270GNK400C                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16141} G2N400h +PERO5              =  0.460G1N400n + 0.270GNK4006 + 0.270GNK400C                 : ARR( 0.183E-11,   450., 0.0);
+{ 16142} G2N400h +PERO6              =  0.300G1N400n + 0.350GNK4006 + 0.350GNK400C                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16143} G2N400h +PERO9              =  0.650G1N400n + 0.350GNK400C                                : ARR( 0.100E-10,     0., 0.0);
+{ 16144} G1N400n                     =       GDO2000 +      G3N2000                                : ARR( 0.200E+15,  2950., 0.0);
+{ 16145} GNO400B +GHO                =       GND400F +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 16146} GNO400B +GHO                =       GNK4005 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 16147} GNO400B +GHO                =       GNK4006 +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 16148} GNO400B+HV               =       G1O400B +      GNO2                                   :  0.100E+01*SUN;
+{ 16149} GNK4005 +GHO                =       GND400G +      GHO2                                   : ARR( 0.273E-11,     0., 0.0);
+{ 16150} GNK4005 +GHO                =       GNK400C +      GHO2                                   : ARR( 0.140E-11,     0., 0.0);
+{ 16151} GNK4005+HV               =       G3K2001 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{ 16152} GNK4005+HV               =       G1K400B +      GNO2                                   :  0.100E+01*SUN;
+{ 16153} GOO4005 +GHO                =       GDO4006 +      GHO2                                   : ARR( 0.820E-11,     0., 0.0);
+{ 16154} GOO4005 +GHO                =       GKO4004 +      GHO2                                   : ARR( 0.210E-10,     0., 0.0);
+{ 16155} GKO4004 +GHO                =       GDK4006 +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 16156} GKO4004 +GHO                =       GKK4001 +      GHO2                                   : ARR( 0.641E-11,     0., 0.0);
+{ 16157} GKO4004 +GHO                =       GDK4007 +      GHO2                                   : ARR( 0.250E-11,     0., 0.0);
+{ 16158} GKO4004+HV               =       G3K3003 +      GCH2O   +      GHO2                    :  0.100E+01*SUN;
+{ 16159} GDK4005 +GHO                =       GDD4002 +      GHO2                                   : ARR( 0.133E-10,     0., 0.0);
+{ 16160} GDK4005 +GHO                =       G3K3001 +      GCO                                    : ARR( 0.132E-10,     0., 0.0);
+{ 16161} GDK4005 +GNO3               =       G3K3001 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 16162} GDK4005+HV               =       G3K3001 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 16163} GDK4005+HV               =       GDO3000 +      GCO                                    :  0.100E+01*SUN;
+{ 16164} GDK4005+HV               =       GO02000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 16165} GDO4006 +GHO                =       GDD4003 +      GHO2                                   : ARR( 0.405E-11,     0., 0.0);
+{ 16166} GDO4006 +GHO                =       GDK4006 +      GHO2                                   : ARR( 0.329E-10,     0., 0.0);
+{ 16167} GDO4006 +GHO                =       GDK4007 +      GHO2                                   : ARR( 0.632E-11,     0., 0.0);
+{ 16168} GDO4006 +GHO                =       G3K400B                                               : ARR( 0.209E-10,     0., 0.0);
+{ 16169} GDO4006 +GNO3               =       G3K400B +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 16170} GDO4006+HV               =       GDO3002 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 16171} G3K400B +GHO2               =  0.800GGO4006 + 0.200GAO4006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16172} G3K400B +GNO                =       GDO3002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 16173} G3K400B +GNO2               =       GPO4006                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16174} G3K400B +GNO3               =       GDO3002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 16175} G3K400B +MEPERO             =  0.685GDO3002 + 0.315GAO4006 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16176} G3K400B +PERO1              =  0.800GDO3002 + 0.200GAO4006 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16177} G3K400B +PERO2              =  0.750GDO3002 + 0.250GAO4006 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16178} G3K400B +PERO3              =  0.800GDO3002 + 0.200GAO4006 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16179} G3K400B +PERO5              =  0.650GDO3002 + 0.350GAO4006 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16180} G3K400B +PERO6              =  0.650GDO3002 + 0.350GAO4006 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16181} G3K400B +PERO9              =       GDO3002 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16182} GDK4006 +GHO                =       GDK4009 +      GHO2                                   : ARR( 0.398E-11,     0., 0.0);
+{ 16183} GDK4006 +GHO                =       G3K400C                                               : ARR( 0.685E-10,     0., 0.0);
+{ 16184} GDK4006 +GNO3               =       G3K400C +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 16185} GDK4006+HV               =       G3K2001 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 16186} GDK4006+HV               =       GDK3001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 16187} G3K400C +GHO2               =  0.800GGK4008 + 0.200GAK4008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16188} G3K400C +GNO                =       GDK3001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 16189} G3K400C +GNO2               =       GPK4008                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16190} G3K400C +GNO3               =       GDK3001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 16191} G3K400C +MEPERO             =  0.685GDK3001 + 0.315GAK4008 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16192} G3K400C +PERO1              =  0.800GDK3001 + 0.200GAK4008 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16193} G3K400C +PERO2              =  0.750GDK3001 + 0.250GAK4008 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16194} G3K400C +PERO3              =  0.800GDK3001 + 0.200GAK4008 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16195} G3K400C +PERO5              =  0.650GDK3001 + 0.350GAK4008 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16196} G3K400C +PERO6              =  0.650GDK3001 + 0.350GAK4008 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16197} G3K400C +PERO9              =       GDK3001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16198} GGO4005 +GHO                =       GGD4002 +      GHO2                                   : ARR( 0.409E-11,     0., 0.0);
+{ 16199} GGO4005 +GHO                =       G2G400C                                               : ARR( 0.144E-11,     0., 0.0);
+{ 16200} GGO4005 +GHO                =       GGK4004 +      GHO2                                   : ARR( 0.640E-11,     0., 0.0);
+{ 16201} GGO4005 +GHO                =       G3K4006                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 16202} GGO4005+HV               =       GDO3000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 16203} G2G400C +GNO                =       G1G400E +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16204} G2G400C +GNO                =       GGN400K                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16205} G2G400C +GHO2               =       GGH400G                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16206} G2G400C +GNO3               =       G1G400E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16207} G2G400C +MEPERO             =  0.340G1G400E + 0.330GGO4006 + 0.330GGK4008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16208} G2G400C +PERO1              =  0.460G1G400E + 0.270GGO4006 + 0.270GGK4008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16209} G2G400C +PERO2              =  0.400G1G400E + 0.300GGO4006 + 0.300GGK4008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16210} G2G400C +PERO3              =  0.460G1G400E + 0.270GGO4006 + 0.270GGK4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16211} G2G400C +PERO5              =  0.460G1G400E + 0.270GGO4006 + 0.270GGK4008                 : ARR( 0.183E-11,   450., 0.0);
+{ 16212} G2G400C +PERO6              =  0.300G1G400E + 0.350GGO4006 + 0.350GGK4008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16213} G2G400C +PERO9              =  0.650G1G400E + 0.350GGK4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 16214} G1G400E                     =       GCH2O   +      GGD3001 +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 16215} G1G400E                     =       GDO2000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  3989., 0.0);
+{ 16216} GAO4005 +GHO                =       GAD4002 +      GHO2                                   : ARR( 0.434E-11,     0., 0.0);
+{ 16217} GAO4005 +GHO                =       G2A400I                                               : ARR( 0.153E-11,     0., 0.0);
+{ 16218} GAO4005 +GHO                =       GAK4004 +      GHO2                                   : ARR( 0.502E-11,     0., 0.0);
+{ 16219} G2A400I +GNO                =       G1A400K +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16220} G2A400I +GNO                =       GAN400K                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16221} G2A400I +GHO2               =       GAH400J                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16222} G2A400I +GNO3               =       G1A400K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16223} G2A400I +MEPERO             =  0.340G1A400K + 0.330GAO4006 + 0.330GAK4008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16224} G2A400I +PERO1              =  0.460G1A400K + 0.270GAO4006 + 0.270GAK4008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16225} G2A400I +PERO2              =  0.400G1A400K + 0.300GAO4006 + 0.300GAK4008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16226} G2A400I +PERO3              =  0.460G1A400K + 0.270GAO4006 + 0.270GAK4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16227} G2A400I +PERO5              =  0.460G1A400K + 0.270GAO4006 + 0.270GAK4008                 : ARR( 0.183E-11,   450., 0.0);
+{ 16228} G2A400I +PERO6              =  0.300G1A400K + 0.350GAO4006 + 0.350GAK4008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16229} G2A400I +PERO9              =  0.650G1A400K + 0.350GAK4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 16230} G1A400K                     =       GCH2O   +      GAD3001 +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 16231} G1A400K                     =       GDO2000 +      GAD2000 +      GHO2                    : ARR( 0.200E+15,  3989., 0.0);
+{ 16232} GPO4005                     =       G3K4006 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 16233} GPO4005 +GHO                =       GPD4002 +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{ 16234} GPO4005 +GHO                =       G2P400K                                               : ARR( 0.145E-11,     0., 0.0);
+{ 16235} GPO4005 +GHO                =       GPK4004 +      GHO2                                   : ARR( 0.643E-11,     0., 0.0);
+{ 16236} GPO4005+HV               =       G3K4006 +      GNO2                                   :  0.100E+01*SUN;
+{ 16237} G2P400K +GNO                =       G1P400L +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16238} G2P400K +GNO                =       GPN400K                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16239} G2P400K +GHO2               =       GPH400L                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16240} G2P400K +GNO3               =       G1P400L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16241} G2P400K +MEPERO             =  0.340G1P400L + 0.330GPO4006 + 0.330GPK4008                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16242} G2P400K +PERO1              =  0.460G1P400L + 0.270GPO4006 + 0.270GPK4008                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16243} G2P400K +PERO2              =  0.400G1P400L + 0.300GPO4006 + 0.300GPK4008                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16244} G2P400K +PERO3              =  0.460G1P400L + 0.270GPO4006 + 0.270GPK4008                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16245} G2P400K +PERO5              =  0.460G1P400L + 0.270GPO4006 + 0.270GPK4008                 : ARR( 0.183E-11,   450., 0.0);
+{ 16246} G2P400K +PERO6              =  0.300G1P400L + 0.350GPO4006 + 0.350GPK4008                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16247} G2P400K +PERO9              =  0.650G1P400L + 0.350GPK4008                                : ARR( 0.100E-10,     0., 0.0);
+{ 16248} G1P400L                     =       GCH2O   +      GPD3001 +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 16249} G1P400L                     =       GDO2000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  3989., 0.0);
+{ 16250} GNN501C +GHO                =       GNN501l +      GNO2                                   : ARR( 0.184E-13,     0., 0.0);
+{ 16251} GNN501C +GHO                =       GNN501D +      GNO2                                   : ARR( 0.471E-13,     0., 0.0);
+{ 16252} GNN501C +GHO                =       G2N503f                                               : ARR( 0.565E-13,     0., 0.0);
+{ 16253} GNN501C+HV               =       G1N5026 +      GNO2                                   :  0.200E+01*SUN;
+{ 16254} GNN501C+HV               =       G1N501b +      GNO2                                   :  0.200E+01*SUN;
+{ 16255} G2N503f +GNO                =       G1N5047 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16256} G2N503f +GNO                =       GNN502d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16257} G2N503f +GHO2               =       GHN504h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16258} G2N503f +GNO3               =       G1N5047 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16259} G2N503f +MEPERO             =  0.340G1N5047 + 0.330GNN502e + 0.330GNN502f                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16260} G2N503f +PERO1              =  0.460G1N5047 + 0.270GNN502e + 0.270GNN502f                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16261} G2N503f +PERO2              =  0.400G1N5047 + 0.300GNN502e + 0.300GNN502f                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16262} G2N503f +PERO3              =  0.460G1N5047 + 0.270GNN502e + 0.270GNN502f                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16263} G2N503f +PERO5              =  0.460G1N5047 + 0.270GNN502e + 0.270GNN502f                 : ARR( 0.183E-11,   450., 0.0);
+{ 16264} G2N503f +PERO6              =  0.300G1N5047 + 0.350GNN502e + 0.350GNN502f                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16265} G2N503f +PERO9              =  0.650G1N5047 + 0.350GNN502f                                : ARR( 0.100E-10,     0., 0.0);
+{ 16266} G1N5047                     =       GND2000 +      GNN3005 +      GNO2                    : ARR( 0.400E+15,  6323., 0.0);
+{ 16267} GHN501u +GHO                =       GNN501D +      GHO                                    : ARR( 0.849E-11,     0., 0.0);
+{ 16268} GHN501u +GHO                =       G2N501X                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 16269} GHN501u+HV               =       G1H503Q +      GNO2                                   :  0.100E+01*SUN;
+{ 16270} GHN501u+HV               =       G1H503R +      GNO2                                   :  0.100E+01*SUN;
+{ 16271} GHN501u+HV               =       G1N501b +      GHO                                    :  0.100E+01*SUN;
+{ 16272} GHN501u+HV               =       G1H503S +      GNO2                                   :  0.100E+01*SUN;
+{ 16273} G1H503Q                     =       GNN500T +      GHO                                    : ARR( 0.800E+11,  2398., 0.0);
+{ 16274} G1H503R                     =       GHN5021 +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{ 16275} G1H503R                     =       G2H3001 +      GND2000                                : ARR( 0.200E+15,  6983., 0.0);
+{ 16276} G1H503S +OXYGEN             =       GHN503Y +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 16277} G1H503S                     =       GHN5013 +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{ 16278} G1H503S                     =       GNN4001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{ 16279} GNN501D +GHO                =       GNN501t +      GNO2                                   : ARR( 0.290E-13,     0., 0.0);
+{ 16280} GNN501D +GHO                =       G2N503g                                               : ARR( 0.178E-12,     0., 0.0);
+{ 16281} GNN501D +GHO                =       GNN501I +      GNO2                                   : ARR( 0.772E-13,     0., 0.0);
+{ 16282} GNN501D+HV               =       G1N502Q +      GNO2                                   :  0.100E+01*SUN;
+{ 16283} GNN501D+HV               =       G3N2000 +      G2N3004                                :  0.100E+01*SUN;
+{ 16284} GNN501D+HV               =       GNK3000 +      GDD2000 + 2.000GNO2                    :  0.100E+01*SUN;
+{ 16285} GNN501D+HV               =       G1N501f +      GNO2                                   :  0.100E+01*SUN;
+{ 16286} GNN501D+HV               =       G1N502A +      GNO2                                   :  0.100E+01*SUN;
+{ 16287} G2N503g +GNO                =       G1N5048 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16288} G2N503g +GNO                =       GNN502g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16289} G2N503g +GHO2               =       GHN504i                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16290} G2N503g +GNO3               =       G1N5048 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16291} G2N503g +MEPERO             =  0.340G1N5048 + 0.330GNN502h + 0.330GNN502i                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16292} G2N503g +PERO1              =  0.460G1N5048 + 0.270GNN502h + 0.270GNN502i                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16293} G2N503g +PERO2              =  0.400G1N5048 + 0.300GNN502h + 0.300GNN502i                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16294} G2N503g +PERO3              =  0.460G1N5048 + 0.270GNN502h + 0.270GNN502i                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16295} G2N503g +PERO5              =  0.460G1N5048 + 0.270GNN502h + 0.270GNN502i                 : ARR( 0.183E-11,   450., 0.0);
+{ 16296} G2N503g +PERO6              =  0.300G1N5048 + 0.350GNN502h + 0.350GNN502i                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16297} G2N503g +PERO9              =  0.650G1N5048 + 0.350GNN502i                                : ARR( 0.100E-10,     0., 0.0);
+{ 16298} G1N5048                     =       GNN3005 +      G3N2000                                : ARR( 0.200E+15,  2890., 0.0);
+{ 16299} GNN501E +GHO                =       GNN5025 +      GNO2                                   : ARR( 0.476E-13,     0., 0.0);
+{ 16300} GNN501E +GHO                =       G2N503h                                               : ARR( 0.585E-13,     0., 0.0);
+{ 16301} GNN501E +GHO                =       GNN501G +      GNO2                                   : ARR( 0.244E-13,     0., 0.0);
+{ 16302} GNN501E +GHO                =       GNN501U +      GNO2                                   : ARR( 0.951E-14,     0., 0.0);
+{ 16303} GNN501E+HV               =       G1N502Z +      GNO2                                   :  0.100E+01*SUN;
+{ 16304} GNN501E+HV               =       G1N501c +      GNO2                                   :  0.100E+01*SUN;
+{ 16305} GNN501E+HV               =       G1N501h +      GNO2                                   :  0.100E+01*SUN;
+{ 16306} GNN501E+HV               =       G1N501x +      GNO2                                   :  0.100E+01*SUN;
+{ 16307} G2N503h +GNO                =       G1N5049 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16308} G2N503h +GNO                =       GNN502d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16309} G2N503h +GHO2               =       GHN504j                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16310} G2N503h +GNO3               =       G1N5049 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16311} G2N503h +MEPERO             =  0.340G1N5049 + 0.330GNN501c + 0.330GNN502g                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16312} G2N503h +PERO1              =  0.460G1N5049 + 0.270GNN501c + 0.270GNN502g                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16313} G2N503h +PERO2              =  0.400G1N5049 + 0.300GNN501c + 0.300GNN502g                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16314} G2N503h +PERO3              =  0.460G1N5049 + 0.270GNN501c + 0.270GNN502g                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16315} G2N503h +PERO5              =  0.460G1N5049 + 0.270GNN501c + 0.270GNN502g                 : ARR( 0.183E-11,   450., 0.0);
+{ 16316} G2N503h +PERO6              =  0.300G1N5049 + 0.350GNN501c + 0.350GNN502g                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16317} G2N503h +PERO9              =  0.650G1N5049 + 0.350GNN502g                                : ARR( 0.100E-10,     0., 0.0);
+{ 16318} G1N5049                     =       GNN501d +      GNO2                                   : ARR( 0.160E+12,  5251., 0.0);
+{ 16319} G1N5049                     =       GNN3005 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6232., 0.0);
+{ 16320} GHN501v +GHO                =       GNN501G +      GHO                                    : ARR( 0.849E-11,     0., 0.0);
+{ 16321} GHN501v +GHO                =       G2N501Y                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 16322} GHN501v+HV               =       G1H503T +      GNO2                                   :  0.100E+01*SUN;
+{ 16323} GHN501v+HV               =       G1H503U +      GNO2                                   :  0.100E+01*SUN;
+{ 16324} GHN501v+HV               =       G1N501c +      GHO                                    :  0.100E+01*SUN;
+{ 16325} GHN501v+HV               =       G1H503W +      GNO2                                   :  0.100E+01*SUN;
+{ 16326} G1H503T +OXYGEN             =       GHN504k +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 16327} G1H503T                     =       G2H501i                                               : ARR( 0.160E+12,  3719., 0.0);
+{ 16328} G1H503U                     =       GND3000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  5198., 0.0);
+{ 16329} G1H503W +OXYGEN             =       GHN504l +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 16330} G1H503W                     =       GHN5014 +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{ 16331} G2H501i +GNO                =       G1H503X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16332} G2H501i +GNO                =       GHN504m                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16333} G2H501i +GHO2               =       GHH501e                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16334} G2H501i +GNO3               =       G1H503X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16335} G2H501i +MEPERO             =  0.340G1H503X + 0.330GHN502i + 0.330GHN502j                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16336} G2H501i +PERO1              =  0.460G1H503X + 0.270GHN502i + 0.270GHN502j                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16337} G2H501i +PERO2              =  0.400G1H503X + 0.300GHN502i + 0.300GHN502j                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16338} G2H501i +PERO3              =  0.460G1H503X + 0.270GHN502i + 0.270GHN502j                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16339} G2H501i +PERO5              =  0.460G1H503X + 0.270GHN502i + 0.270GHN502j                 : ARR( 0.183E-11,   450., 0.0);
+{ 16340} G2H501i +PERO6              =  0.300G1H503X + 0.350GHN502i + 0.350GHN502j                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16341} G2H501i +PERO9              =  0.650G1H503X + 0.350GHN502j                                : ARR( 0.100E-10,     0., 0.0);
+{ 16342} G1H503X                     =       GHN504n +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{ 16343} G1H503X                     =       GND3004 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4693., 0.0);
+{ 16344} GNN501F +GHO                =       G2N503i                                               : ARR( 0.292E-12,     0., 0.0);
+{ 16345} GNN501F +GHO                =       GNN501G +      GHO2                                   : ARR( 0.213E-11,     0., 0.0);
+{ 16346} GNN501F +GHO                =       G1N501c                                               : ARR( 0.217E-17,    85., 2.0);
+{ 16347} GNN501F+HV               =       G1N504A +      GNO2                                   :  0.100E+01*SUN;
+{ 16348} GNN501F+HV               =       G1N501j +      GNO2                                   :  0.100E+01*SUN;
+{ 16349} GNN501F+HV               =       G1N504B +      GNO2                                   :  0.100E+01*SUN;
+{ 16350} G2N503i +GNO                =       G1N504C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16351} G2N503i +GNO                =       GNN502e                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16352} G2N503i +GHO2               =       GHN504o                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16353} G2N503i +GNO3               =       G1N504C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16354} G2N503i +MEPERO             =  0.340G1N504C + 0.330GNN501n + 0.330GNN502h                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16355} G2N503i +PERO1              =  0.460G1N504C + 0.270GNN501n + 0.270GNN502h                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16356} G2N503i +PERO2              =  0.400G1N504C + 0.300GNN501n + 0.300GNN502h                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16357} G2N503i +PERO3              =  0.460G1N504C + 0.270GNN501n + 0.270GNN502h                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16358} G2N503i +PERO5              =  0.460G1N504C + 0.270GNN501n + 0.270GNN502h                 : ARR( 0.183E-11,   450., 0.0);
+{ 16359} G2N503i +PERO6              =  0.300G1N504C + 0.350GNN501n + 0.350GNN502h                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16360} G2N503i +PERO9              =  0.650G1N504C + 0.350GNN502h                                : ARR( 0.100E-10,     0., 0.0);
+{ 16361} G1N504A +OXYGEN             =       GNN502j +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 16362} G1N504A                     =       GNK500R +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{ 16363} G1N504B +OXYGEN             =       GNN502k +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 16364} G1N504B                     =       G2N503j                                               : ARR( 0.160E+12,  3719., 0.0);
+{ 16365} G1N504C                     =       GNN3005 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3484., 0.0);
+{ 16366} G2N503j +GNO                =       G1N504D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16367} G2N503j +GNO                =       GNN502l                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16368} G2N503j +GHO2               =       GHN503g                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16369} G2N503j +GNO3               =       G1N504D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16370} G2N503j +MEPERO             =  0.340G1N504D + 0.330GNN501p + 0.330GNN501r                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16371} G2N503j +PERO1              =  0.460G1N504D + 0.270GNN501p + 0.270GNN501r                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16372} G2N503j +PERO2              =  0.400G1N504D + 0.300GNN501p + 0.300GNN501r                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16373} G2N503j +PERO3              =  0.460G1N504D + 0.270GNN501p + 0.270GNN501r                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16374} G2N503j +PERO5              =  0.460G1N504D + 0.270GNN501p + 0.270GNN501r                 : ARR( 0.183E-11,   450., 0.0);
+{ 16375} G2N503j +PERO6              =  0.300G1N504D + 0.350GNN501p + 0.350GNN501r                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16376} G2N503j +PERO9              =  0.650G1N504D + 0.350GNN501r                                : ARR( 0.100E-10,     0., 0.0);
+{ 16377} G1N504D                     =       GND3004 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3484., 0.0);
+{ 16378} GNN501G +GHO                =       GNN502K +      GNO2                                   : ARR( 0.156E-12,     0., 0.0);
+{ 16379} GNN501G +GHO                =       G2N503k                                               : ARR( 0.185E-12,     0., 0.0);
+{ 16380} GNN501G+HV               =       G1N502q +      GNO2                                   :  0.100E+01*SUN;
+{ 16381} GNN501G+HV               =       G3N3000 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 16382} GNN501G+HV               =       G1N501l +      GNO2                                   :  0.100E+01*SUN;
+{ 16383} GNN501G+HV               =       G1N5024 +      GNO2                                   :  0.100E+01*SUN;
+{ 16384} G2N503k +GNO                =       G1N504E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16385} G2N503k +GNO                =       GNN502f                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16386} G2N503k +GHO2               =       GHN504p                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16387} G2N503k +GNO3               =       G1N504E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16388} G2N503k +MEPERO             =  0.340G1N504E + 0.330GNN501o + 0.330GNN502i                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16389} G2N503k +PERO1              =  0.460G1N504E + 0.270GNN501o + 0.270GNN502i                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16390} G2N503k +PERO2              =  0.400G1N504E + 0.300GNN501o + 0.300GNN502i                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16391} G2N503k +PERO3              =  0.460G1N504E + 0.270GNN501o + 0.270GNN502i                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16392} G2N503k +PERO5              =  0.460G1N504E + 0.270GNN501o + 0.270GNN502i                 : ARR( 0.183E-11,   450., 0.0);
+{ 16393} G2N503k +PERO6              =  0.300G1N504E + 0.350GNN501o + 0.350GNN502i                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16394} G2N503k +PERO9              =  0.650G1N504E + 0.350GNN502i                                : ARR( 0.100E-10,     0., 0.0);
+{ 16395} G1N504E                     =       G3N3003 +      GND2000                                : ARR( 0.200E+15,  3067., 0.0);
+{ 16396} GNN501H +GHO                =       G2N503l                                               : ARR( 0.290E-12,     0., 0.0);
+{ 16397} GNN501H +GHO                =       G2N503m                                               : ARR( 0.290E-12,     0., 0.0);
+{ 16398} GNN501H +GHO                =       G3N500a                                               : ARR( 0.426E-11,     0., 0.0);
+{ 16399} GNN501H +GNO3               =       G3N500a +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 16400} GNN501H+HV               =       G1N504F +      GNO2                                   :  0.100E+01*SUN;
+{ 16401} GNN501H+HV               =       G1N504G +      GNO2                                   :  0.100E+01*SUN;
+{ 16402} GNN501H+HV               =       GND4001 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 16403} GNN501H+HV               =       GNU3000 +      GND2000                                :  0.100E+01*SUN;
+{ 16404} G2N503l +GNO                =       G1N504H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16405} G2N503l +GNO                =       GNN501l                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16406} G2N503l +GHO2               =       GHN503b                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16407} G2N503l +GNO3               =       G1N504H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16408} G2N503l +MEPERO             =  0.340G1N504H + 0.330GNN500S + 0.330GNN501m                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16409} G2N503l +PERO1              =  0.460G1N504H + 0.270GNN500S + 0.270GNN501m                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16410} G2N503l +PERO2              =  0.400G1N504H + 0.300GNN500S + 0.300GNN501m                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16411} G2N503l +PERO3              =  0.460G1N504H + 0.270GNN500S + 0.270GNN501m                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16412} G2N503l +PERO5              =  0.460G1N504H + 0.270GNN500S + 0.270GNN501m                 : ARR( 0.183E-11,   450., 0.0);
+{ 16413} G2N503l +PERO6              =  0.300G1N504H + 0.350GNN500S + 0.350GNN501m                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16414} G2N503l +PERO9              =  0.650G1N504H + 0.350GNN501m                                : ARR( 0.100E-10,     0., 0.0);
+{ 16415} G2N503m +GNO                =       G1N504I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16416} G2N503m +GNO                =       GNN501U                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16417} G2N503m +GHO2               =       GHN504k                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16418} G2N503m +GNO3               =       G1N504I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16419} G2N503m +MEPERO             =  0.340G1N504I + 0.330GNN502k + 0.330GNN501h                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16420} G2N503m +PERO1              =  0.460G1N504I + 0.270GNN502k + 0.270GNN501h                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16421} G2N503m +PERO2              =  0.400G1N504I + 0.300GNN502k + 0.300GNN501h                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16422} G2N503m +PERO3              =  0.460G1N504I + 0.270GNN502k + 0.270GNN501h                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16423} G2N503m +PERO5              =  0.460G1N504I + 0.270GNN502k + 0.270GNN501h                 : ARR( 0.183E-11,   450., 0.0);
+{ 16424} G2N503m +PERO6              =  0.300G1N504I + 0.350GNN502k + 0.350GNN501h                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16425} G2N503m +PERO9              =  0.650G1N504I + 0.350GNN501h                                : ARR( 0.100E-10,     0., 0.0);
+{ 16426} G3N500a +GHO2               =  0.800GGN500A + 0.200GAN500A + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16427} G3N500a +GNO                =       GND4001 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 16428} G3N500a +GNO2               =       GPN500C                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16429} G3N500a +GNO3               =       GND4001 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 16430} G3N500a +MEPERO             =  0.685GND4001 + 0.315GAN500A + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16431} G3N500a +PERO1              =  0.800GND4001 + 0.200GAN500A + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16432} G3N500a +PERO2              =  0.750GND4001 + 0.250GAN500A + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16433} G3N500a +PERO3              =  0.800GND4001 + 0.200GAN500A + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16434} G3N500a +PERO5              =  0.650GND4001 + 0.350GAN500A + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16435} G3N500a +PERO6              =  0.650GND4001 + 0.350GAN500A + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16436} G3N500a +PERO9              =       GND4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16437} G1N504F +OXYGEN             =       GND500d +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 16438} G1N504F                     =       GDK5004 +      GNO2                                   : ARR( 0.800E+11,  4245., 0.0);
+{ 16439} G1N504G                     =       GND4001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 16440} G1N504H                     =       G3N500A                                               : ARR( 0.800E+11,  5278., 0.0);
+{ 16441} G1N504H                     =       GND2000 +      G2N300A                                : ARR( 0.200E+15,  7116., 0.0);
+{ 16442} G1N504I                     =       G2N2000 +      GND3005                                : ARR( 0.200E+15,  6244., 0.0);
+{ 16443} G1N504I                     =       GND3000 +      GDD2000 +      GNO2                    : ARR( 0.200E+15,  6201., 0.0);
+{ 16444} GHN501w +GHO                =       GNN501J +      GHO                                    : ARR( 0.173E-11,     0., 0.0);
+{ 16445} GHN501w +GHO                =       G2N501c                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 16446} GHN501w+HV               =       G1H503Y +      GNO2                                   :  0.100E+01*SUN;
+{ 16447} GHN501w+HV               =       G1H500k +      GNO2                                   :  0.100E+01*SUN;
+{ 16448} GHN501w+HV               =       G1N501h +      GHO                                    :  0.100E+01*SUN;
+{ 16449} GHN501w+HV               =       G1H503Z +      GNO2                                   :  0.100E+01*SUN;
+{ 16450} G1H503Y +OXYGEN             =       GHN5034 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 16451} G1H503Y                     =       GNN500d +      GHO                                    : ARR( 0.800E+11,  3117., 0.0);
+{ 16452} G1H503Z                     =       G2H501j                                               : ARR( 0.160E+12,  4439., 0.0);
+{ 16453} G1H503Z                     =       GNN4008 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 16454} G2H501j +GNO                =       G1H503a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16455} G2H501j +GNO                =       GHN5032                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16456} G2H501j +GHO2               =       GHH501f                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16457} G2H501j +GNO3               =       G1H503a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16458} G2H501j +MEPERO             =  0.340G1H503a + 0.330GHN5038 + 0.330GHN5039                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16459} G2H501j +PERO1              =  0.460G1H503a + 0.270GHN5038 + 0.270GHN5039                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16460} G2H501j +PERO2              =  0.400G1H503a + 0.300GHN5038 + 0.300GHN5039                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16461} G2H501j +PERO3              =  0.460G1H503a + 0.270GHN5038 + 0.270GHN5039                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16462} G2H501j +PERO5              =  0.460G1H503a + 0.270GHN5038 + 0.270GHN5039                 : ARR( 0.183E-11,   450., 0.0);
+{ 16463} G2H501j +PERO6              =  0.300G1H503a + 0.350GHN5038 + 0.350GHN5039                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16464} G2H501j +PERO9              =  0.650G1H503a + 0.350GHN5039                                : ARR( 0.100E-10,     0., 0.0);
+{ 16465} G1H503a                     =       GHN504q +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 16466} GHH500U +GHO                =       GHN501y +      GHO                                    : ARR( 0.415E-10,     0., 0.0);
+{ 16467} GHH500U +GHO                =       GHN5023 +      GHO                                    : ARR( 0.830E-11,     0., 0.0);
+{ 16468} GHH500U +GHO                =       G2H500X                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 16469} GHH500U +GHO                =       G2H501k                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 16470} GHH500U+HV               =       G1H503b +      GNO2                                   :  0.100E+01*SUN;
+{ 16471} GHH500U+HV               =       G1H500k +      GHO                                    :  0.100E+01*SUN;
+{ 16472} GHH500U+HV               =       G1H503U +      GHO                                    :  0.100E+01*SUN;
+{ 16473} GHH500U+HV               =       G1H503c +      GNO2                                   :  0.100E+01*SUN;
+{ 16474} G2H501k +GNO                =       G1H503U +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16475} G2H501k +GNO                =       GHN501v                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16476} G2H501k +GHO2               =       GHH500U                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16477} G2H501k +GNO3               =       G1H503U +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16478} G2H501k +MEPERO             =  0.340G1H503U + 0.330GHN5016 + 0.330GHN5023                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16479} G2H501k +PERO1              =  0.460G1H503U + 0.270GHN5016 + 0.270GHN5023                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16480} G2H501k +PERO2              =  0.400G1H503U + 0.300GHN5016 + 0.300GHN5023                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16481} G2H501k +PERO3              =  0.460G1H503U + 0.270GHN5016 + 0.270GHN5023                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16482} G2H501k +PERO5              =  0.460G1H503U + 0.270GHN5016 + 0.270GHN5023                 : ARR( 0.183E-11,   450., 0.0);
+{ 16483} G2H501k +PERO6              =  0.300G1H503U + 0.350GHN5016 + 0.350GHN5023                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16484} G2H501k +PERO9              =  0.650G1H503U + 0.350GHN5023                                : ARR( 0.100E-10,     0., 0.0);
+{ 16485} G1H503b                     =       GHN5014 +      GHO                                    : ARR( 0.800E+11,  2398., 0.0);
+{ 16486} G1H503c                     =       G2H501l                                               : ARR( 0.160E+12,  3719., 0.0);
+{ 16487} G1H503c                     =       GHN400J +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 16488} G2H501l +GNO                =       G1H503d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16489} G2H501l +GNO                =       GHH501g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16490} G2H501l +GHO2               =       GHH501h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16491} G2H501l +GNO3               =       G1H503d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16492} G2H501l +MEPERO             =  0.340G1H503d + 0.330GHH501i + 0.330GHH501B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16493} G2H501l +PERO1              =  0.460G1H503d + 0.270GHH501i + 0.270GHH501B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16494} G2H501l +PERO2              =  0.400G1H503d + 0.300GHH501i + 0.300GHH501B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16495} G2H501l +PERO3              =  0.460G1H503d + 0.270GHH501i + 0.270GHH501B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16496} G2H501l +PERO5              =  0.460G1H503d + 0.270GHH501i + 0.270GHH501B                 : ARR( 0.183E-11,   450., 0.0);
+{ 16497} G2H501l +PERO6              =  0.300G1H503d + 0.350GHH501i + 0.350GHH501B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16498} G2H501l +PERO9              =  0.650G1H503d + 0.350GHH501B                                : ARR( 0.100E-10,     0., 0.0);
+{ 16499} G1H503d                     =       GHH501j +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 16500} G1H503d                     =       GHD3003 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4693., 0.0);
+{ 16501} GHN501x +GHO                =       GHN501y +      GHO2                                   : ARR( 0.105E-10,     0., 0.0);
+{ 16502} GHN501x +GHO                =       GNN501K +      GHO                                    : ARR( 0.843E-11,     0., 0.0);
+{ 16503} GHN501x +GHO                =       G2N501d                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 16504} GHN501x+HV               =       G1H503e +      GNO2                                   :  0.100E+01*SUN;
+{ 16505} GHN501x+HV               =       G1N501j +      GHO                                    :  0.100E+01*SUN;
+{ 16506} GHN501x+HV               =       G1H503f +      GNO2                                   :  0.100E+01*SUN;
+{ 16507} G1H503e                     =       GNK500R +      GHO                                    : ARR( 0.800E+11,  2398., 0.0);
+{ 16508} G1H503f                     =       G2H501m                                               : ARR( 0.160E+12,  3719., 0.0);
+{ 16509} G1H503f                     =       GND400C +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 16510} G2H501m +GNO                =       G1H503g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16511} G2H501m +GNO                =       GHN504r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16512} G2H501m +GHO2               =       GHH5019                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16513} G2H501m +GNO3               =       G1H503g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16514} G2H501m +MEPERO             =  0.340G1H503g + 0.330GHN503k + 0.330GHN503q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16515} G2H501m +PERO1              =  0.460G1H503g + 0.270GHN503k + 0.270GHN503q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16516} G2H501m +PERO2              =  0.400G1H503g + 0.300GHN503k + 0.300GHN503q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16517} G2H501m +PERO3              =  0.460G1H503g + 0.270GHN503k + 0.270GHN503q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16518} G2H501m +PERO5              =  0.460G1H503g + 0.270GHN503k + 0.270GHN503q                 : ARR( 0.183E-11,   450., 0.0);
+{ 16519} G2H501m +PERO6              =  0.300G1H503g + 0.350GHN503k + 0.350GHN503q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16520} G2H501m +PERO9              =  0.650G1H503g + 0.350GHN503q                                : ARR( 0.100E-10,     0., 0.0);
+{ 16521} G1H503g                     =       GHD3003 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3484., 0.0);
+{ 16522} GHN501y +GHO                =       GNN501L +      GHO                                    : ARR( 0.530E-11,     0., 0.0);
+{ 16523} GHN501y +GHO                =       G2N501f                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 16524} GHN501y+HV               =       G1H501R +      GNO2                                   :  0.100E+01*SUN;
+{ 16525} GHN501y+HV               =       G3N3000 +      GND2000 +      GHO                     :  0.100E+01*SUN;
+{ 16526} GHN501y+HV               =       G1N501l +      GHO                                    :  0.100E+01*SUN;
+{ 16527} GHN501y+HV               =       G1H503h +      GNO2                                   :  0.100E+01*SUN;
+{ 16528} G1H503h +OXYGEN             =       GHN504s +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 16529} G1H503h                     =       GND400B +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5784., 0.0);
+{ 16530} GHN501z +GHO                =       G2H501n                                               : ARR( 0.451E-11,     0., 0.0);
+{ 16531} GHN501z +GHO                =       GND5009 +      GHO                                    : ARR( 0.253E-10,     0., 0.0);
+{ 16532} GHN501z +GHO                =       G3H500T                                               : ARR( 0.209E-10,     0., 0.0);
+{ 16533} GHN501z +GHO                =       G2N503n                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 16534} GHN501z +GNO3               =       G3H500T +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 16535} GHN501z+HV               =       G1H503i +      GNO2                                   :  0.100E+01*SUN;
+{ 16536} GHN501z+HV               =       G1N504G +      GHO                                    :  0.100E+01*SUN;
+{ 16537} GHN501z+HV               =       GND4001 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 16538} G2H501n +GNO                =       G1H503j +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16539} G2H501n +GNO                =       GHN504t                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16540} G2H501n +GHO2               =       GHH501k                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16541} G2H501n +GNO3               =       G1H503j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16542} G2H501n +MEPERO             =  0.340G1H503j + 0.330GHN504u + 0.330GHN504s                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16543} G2H501n +PERO1              =  0.460G1H503j + 0.270GHN504u + 0.270GHN504s                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16544} G2H501n +PERO2              =  0.400G1H503j + 0.300GHN504u + 0.300GHN504s                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16545} G2H501n +PERO3              =  0.460G1H503j + 0.270GHN504u + 0.270GHN504s                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16546} G2H501n +PERO5              =  0.460G1H503j + 0.270GHN504u + 0.270GHN504s                 : ARR( 0.183E-11,   450., 0.0);
+{ 16547} G2H501n +PERO6              =  0.300G1H503j + 0.350GHN504u + 0.350GHN504s                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16548} G2H501n +PERO9              =  0.650G1H503j + 0.350GHN504s                                : ARR( 0.100E-10,     0., 0.0);
+{ 16549} G3H500T +GHO2               =  0.800GGH5007 + 0.200GAH5007 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16550} G3H500T +GNO                =       GND4001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 16551} G3H500T +GNO2               =       GPH5008                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16552} G3H500T +GNO3               =       GND4001 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 16553} G3H500T +MEPERO             =  0.685GND4001 + 0.315GAH5007 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16554} G3H500T +PERO1              =  0.800GND4001 + 0.200GAH5007 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16555} G3H500T +PERO2              =  0.750GND4001 + 0.250GAH5007 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16556} G3H500T +PERO3              =  0.800GND4001 + 0.200GAH5007 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16557} G3H500T +PERO5              =  0.650GND4001 + 0.350GAH5007 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16558} G3H500T +PERO6              =  0.650GND4001 + 0.350GAH5007 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16559} G3H500T +PERO9              =       GND4001 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16560} G2N503n +GNO                =       G1N504G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16561} G2N503n +GNO                =       GNN501H                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16562} G2N503n +GHO2               =       GHN501z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16563} G2N503n +GNO3               =       G1N504G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16564} G2N503n +MEPERO             =  0.340G1N504G + 0.330GND500H + 0.330GND5009                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16565} G2N503n +PERO1              =  0.460G1N504G + 0.270GND500H + 0.270GND5009                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16566} G2N503n +PERO2              =  0.400G1N504G + 0.300GND500H + 0.300GND5009                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16567} G2N503n +PERO3              =  0.460G1N504G + 0.270GND500H + 0.270GND5009                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16568} G2N503n +PERO5              =  0.460G1N504G + 0.270GND500H + 0.270GND5009                 : ARR( 0.183E-11,   450., 0.0);
+{ 16569} G2N503n +PERO6              =  0.300G1N504G + 0.350GND500H + 0.350GND5009                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16570} G2N503n +PERO9              =  0.650G1N504G + 0.350GND5009                                : ARR( 0.100E-10,     0., 0.0);
+{ 16571} G1H503i                     =       GDK5004 +      GHO                                    : ARR( 0.800E+11,  1899., 0.0);
+{ 16572} G1H503j                     =       GND3000 +      GDD2000 +      GHO                     : ARR( 0.200E+15,  4662., 0.0);
+{ 16573} GHN5021 +GHO                =       G2H501o                                               : ARR( 0.467E-11,     0., 0.0);
+{ 16574} GHN5021 +GHO                =       GND500A +      GHO                                    : ARR( 0.262E-10,     0., 0.0);
+{ 16575} GHN5021 +GHO                =       G3H500U                                               : ARR( 0.216E-10,     0., 0.0);
+{ 16576} GHN5021 +GHO                =       G2N503o                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 16577} GHN5021 +GNO3               =       G3H500U +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 16578} GHN5021+HV               =       G1H503k +      GNO2                                   :  0.100E+01*SUN;
+{ 16579} GHN5021+HV               =       G1N502H +      GHO                                    :  0.100E+01*SUN;
+{ 16580} GHN5021+HV               =       GND4003 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 16581} G2H501o +GNO                =       G1H503l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16582} G2H501o +GNO                =       GHN504q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16583} G2H501o +GHO2               =       GHH501j                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16584} G2H501o +GNO3               =       G1H503l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16585} G2H501o +MEPERO             =  0.340G1H503l + 0.330GHN504v + 0.330GHN504w                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16586} G2H501o +PERO1              =  0.460G1H503l + 0.270GHN504v + 0.270GHN504w                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16587} G2H501o +PERO2              =  0.400G1H503l + 0.300GHN504v + 0.300GHN504w                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16588} G2H501o +PERO3              =  0.460G1H503l + 0.270GHN504v + 0.270GHN504w                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16589} G2H501o +PERO5              =  0.460G1H503l + 0.270GHN504v + 0.270GHN504w                 : ARR( 0.183E-11,   450., 0.0);
+{ 16590} G2H501o +PERO6              =  0.300G1H503l + 0.350GHN504v + 0.350GHN504w                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16591} G2H501o +PERO9              =  0.650G1H503l + 0.350GHN504w                                : ARR( 0.100E-10,     0., 0.0);
+{ 16592} G3H500U +GHO2               =  0.800GGH500D + 0.200GAH500D + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16593} G3H500U +GNO                =       GND4003 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 16594} G3H500U +GNO2               =       GPH500D                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16595} G3H500U +GNO3               =       GND4003 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 16596} G3H500U +MEPERO             =  0.685GND4003 + 0.315GAH500D + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16597} G3H500U +PERO1              =  0.800GND4003 + 0.200GAH500D + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16598} G3H500U +PERO2              =  0.750GND4003 + 0.250GAH500D + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16599} G3H500U +PERO3              =  0.800GND4003 + 0.200GAH500D + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16600} G3H500U +PERO5              =  0.650GND4003 + 0.350GAH500D + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16601} G3H500U +PERO6              =  0.650GND4003 + 0.350GAH500D + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16602} G3H500U +PERO9              =       GND4003 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16603} G2N503o +GNO                =       G1N502H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16604} G2N503o +GNO                =       GNN500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16605} G2N503o +GHO2               =       GHN5021                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16606} G2N503o +GNO3               =       G1N502H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16607} G2N503o +MEPERO             =  0.340G1N502H + 0.330GND500D + 0.330GND500A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16608} G2N503o +PERO1              =  0.460G1N502H + 0.270GND500D + 0.270GND500A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16609} G2N503o +PERO2              =  0.400G1N502H + 0.300GND500D + 0.300GND500A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16610} G2N503o +PERO3              =  0.460G1N502H + 0.270GND500D + 0.270GND500A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16611} G2N503o +PERO5              =  0.460G1N502H + 0.270GND500D + 0.270GND500A                 : ARR( 0.183E-11,   450., 0.0);
+{ 16612} G2N503o +PERO6              =  0.300G1N502H + 0.350GND500D + 0.350GND500A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16613} G2N503o +PERO9              =  0.650G1N502H + 0.350GND500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 16614} G1H503k                     =       GDK5005 +      GHO                                    : ARR( 0.800E+11,  1899., 0.0);
+{ 16615} G1H503k                     =       GHD400C +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{ 16616} G1H503l                     =       GND2000 +      GHD3004 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{ 16617} GHN5022 +GHO                =       GNN501I +      GHO                                    : ARR( 0.270E-10,     0., 0.0);
+{ 16618} GHN5022 +GHO                =       G2N501a                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 16619} GHN5022+HV               =       G1H503m +      GNO2                                   :  0.100E+01*SUN;
+{ 16620} GHN5022+HV               =       G3N2000 +      G2H3001                                :  0.100E+01*SUN;
+{ 16621} GHN5022+HV               =       GNK3000 +      GDD2000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{ 16622} GHN5022+HV               =       G1N501f +      GHO                                    :  0.100E+01*SUN;
+{ 16623} GHN5022+HV               =       G1H503n +      GNO2                                   :  0.100E+01*SUN;
+{ 16624} G1H503m                     =       G3H4002 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 16625} G1H503n +OXYGEN             =       GHN503n +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 16626} G1H503n                     =       GND4004 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5636., 0.0);
+{ 16627} GNN501I +GHO                =       GND500g +      GNO2                                   : ARR( 0.560E-13,     0., 0.0);
+{ 16628} GNN501I +GHO                =       G2N503p                                               : ARR( 0.525E-12,     0., 0.0);
+{ 16629} GNN501I+HV               =       G1N502T +      GNO2                                   :  0.200E+01*SUN;
+{ 16630} GNN501I+HV               =       G3N2000 +      G2N3005                                :  0.100E+01*SUN;
+{ 16631} GNN501I+HV               =       G3N4007 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 16632} G2N503p +GNO                =       G1N504J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16633} G2N503p +GNO                =       GNN502m                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16634} G2N503p +GHO2               =       GHN504x                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16635} G2N503p +GNO3               =       G1N504J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16636} G2N503p +MEPERO             =  0.340G1N504J + 0.330GNN502n + 0.330GNN502o                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16637} G2N503p +PERO1              =  0.460G1N504J + 0.270GNN502n + 0.270GNN502o                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16638} G2N503p +PERO2              =  0.400G1N504J + 0.300GNN502n + 0.300GNN502o                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16639} G2N503p +PERO3              =  0.460G1N504J + 0.270GNN502n + 0.270GNN502o                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16640} G2N503p +PERO5              =  0.460G1N504J + 0.270GNN502n + 0.270GNN502o                 : ARR( 0.183E-11,   450., 0.0);
+{ 16641} G2N503p +PERO6              =  0.300G1N504J + 0.350GNN502n + 0.350GNN502o                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16642} G2N503p +PERO9              =  0.650G1N504J + 0.350GNN502o                                : ARR( 0.100E-10,     0., 0.0);
+{ 16643} G1N504J                     =       G3N2000 +      GND3003                                : ARR( 0.400E+15,  4480., 0.0);
+{ 16644} GNN501J +GHO                =       GNN5026 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{ 16645} GNN501J +GHO                =       G2N503q                                               : ARR( 0.565E-13,     0., 0.0);
+{ 16646} GNN501J +GHO                =       GNN501L +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{ 16647} GNN501J +GHO                =       GNN501u +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{ 16648} GNN501J+HV               =       G1N502c +      GNO2                                   :  0.100E+01*SUN;
+{ 16649} GNN501J+HV               =       G1N501g +      GNO2                                   :  0.100E+01*SUN;
+{ 16650} GNN501J+HV               =       G3N4005 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 16651} GNN501J+HV               =       G2D2000 +      GNN3006 +      GNO2                    :  0.100E+01*SUN;
+{ 16652} GNN501J+HV               =       G1N502L +      GNO2                                   :  0.100E+01*SUN;
+{ 16653} G2N503q +GNO                =       G1N504K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16654} G2N503q +GNO                =       GNN502g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16655} G2N503q +GHO2               =       GHN504y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16656} G2N503q +GNO3               =       G1N504K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16657} G2N503q +MEPERO             =  0.340G1N504K + 0.330GNN5021 + 0.330GNN502m                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16658} G2N503q +PERO1              =  0.460G1N504K + 0.270GNN5021 + 0.270GNN502m                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16659} G2N503q +PERO2              =  0.400G1N504K + 0.300GNN5021 + 0.300GNN502m                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16660} G2N503q +PERO3              =  0.460G1N504K + 0.270GNN5021 + 0.270GNN502m                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16661} G2N503q +PERO5              =  0.460G1N504K + 0.270GNN5021 + 0.270GNN502m                 : ARR( 0.183E-11,   450., 0.0);
+{ 16662} G2N503q +PERO6              =  0.300G1N504K + 0.350GNN5021 + 0.350GNN502m                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16663} G2N503q +PERO9              =  0.650G1N504K + 0.350GNN502m                                : ARR( 0.100E-10,     0., 0.0);
+{ 16664} G1N504K                     =       GND3003 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6513., 0.0);
+{ 16665} GHN5023 +GHO                =       GNN501L +      GHO                                    : ARR( 0.260E-10,     0., 0.0);
+{ 16666} GHN5023 +GHO                =       G2N501b                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 16667} GHN5023+HV               =       G1H503o +      GNO2                                   :  0.100E+01*SUN;
+{ 16668} GHN5023+HV               =       G1N501g +      GHO                                    :  0.100E+01*SUN;
+{ 16669} GHN5023+HV               =       G3H400D +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 16670} GHN5023+HV               =       G1H503p +      GNO2                                   :  0.100E+01*SUN;
+{ 16671} G1H503o +OXYGEN             =       GHN503m +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 16672} G3H400D +GHO2               =  0.800GGH4003 + 0.200GAH4002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16673} G3H400D +GNO                =       GND3000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 16674} G3H400D +GNO2               =       GPH4003                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16675} G3H400D +GNO3               =       GND3000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 16676} G3H400D +MEPERO             =  0.685GND3000 + 0.315GAH4002 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16677} G3H400D +PERO1              =  0.800GND3000 + 0.200GAH4002 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16678} G3H400D +PERO2              =  0.750GND3000 + 0.250GAH4002 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16679} G3H400D +PERO3              =  0.800GND3000 + 0.200GAH4002 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16680} G3H400D +PERO5              =  0.650GND3000 + 0.350GAH4002 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16681} G3H400D +PERO6              =  0.650GND3000 + 0.350GAH4002 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16682} G3H400D +PERO9              =       GND3000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16683} G1H503p                     =       G3H400D +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 16684} GNN501K +GHO                =       G2N503r                                               : ARR( 0.923E-12,     0., 0.0);
+{ 16685} GNN501K +GHO                =       GNN501L +      GHO2                                   : ARR( 0.647E-11,     0., 0.0);
+{ 16686} GNN501K+HV               =       G1N504L +      GNO2                                   :  0.100E+01*SUN;
+{ 16687} GNN501K+HV               =       G3N400G +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 16688} GNN501K+HV               =       G1N504M +      GNO2                                   :  0.100E+01*SUN;
+{ 16689} G2N503r +GNO                =       G1N504N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16690} G2N503r +GNO                =       GNN502h                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16691} G2N503r +GHO2               =       GHN504z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16692} G2N503r +GNO3               =       G1N504N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16693} G2N503r +MEPERO             =  0.340G1N504N + 0.330GNN5022 + 0.330GNN502n                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16694} G2N503r +PERO1              =  0.460G1N504N + 0.270GNN5022 + 0.270GNN502n                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16695} G2N503r +PERO2              =  0.400G1N504N + 0.300GNN5022 + 0.300GNN502n                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16696} G2N503r +PERO3              =  0.460G1N504N + 0.270GNN5022 + 0.270GNN502n                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16697} G2N503r +PERO5              =  0.460G1N504N + 0.270GNN5022 + 0.270GNN502n                 : ARR( 0.183E-11,   450., 0.0);
+{ 16698} G2N503r +PERO6              =  0.300G1N504N + 0.350GNN5022 + 0.350GNN502n                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16699} G2N503r +PERO9              =  0.650G1N504N + 0.350GNN502n                                : ARR( 0.100E-10,     0., 0.0);
+{ 16700} G1N504L +OXYGEN             =       GND500n +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 16701} G3N400G +GHO2               =  0.800GGN4009 + 0.200GAN4009 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16702} G3N400G +GNO                =       GND3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 16703} G3N400G +GNO2               =       GPN4009                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16704} G3N400G +GNO3               =       GND3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 16705} G3N400G +MEPERO             =  0.685GND3000 + 0.315GAN4009 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16706} G3N400G +PERO1              =  0.800GND3000 + 0.200GAN4009 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16707} G3N400G +PERO2              =  0.750GND3000 + 0.250GAN4009 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16708} G3N400G +PERO3              =  0.800GND3000 + 0.200GAN4009 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16709} G3N400G +PERO5              =  0.650GND3000 + 0.350GAN4009 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16710} G3N400G +PERO6              =  0.650GND3000 + 0.350GAN4009 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 16711} G3N400G +PERO9              =       GND3000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 16712} G1N504M                     =       G3N400G +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 16713} G1N504N                     =       GND3003 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3765., 0.0);
+{ 16714} GNN501L +GHO                =       GND500k +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{ 16715} GNN501L +GHO                =       G2N503s                                               : ARR( 0.172E-12,     0., 0.0);
+{ 16716} GNN501L +GHO                =       GND500i +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{ 16717} GNN501L+HV               =       G1N502v +      GNO2                                   :  0.100E+01*SUN;
+{ 16718} GNN501L+HV               =       G3N3000 +      G3N2000                                :  0.100E+01*SUN;
+{ 16719} GNN501L+HV               =       G1N502O +      GNO2                                   :  0.100E+01*SUN;
+{ 16720} G2N503s +GNO                =       G1N504O +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16721} G2N503s +GNO                =       GNN502i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16722} G2N503s +GHO2               =       GHN5051                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16723} G2N503s +GNO3               =       G1N504O +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16724} G2N503s +MEPERO             =  0.340G1N504O + 0.330GNN5023 + 0.330GNN502o                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16725} G2N503s +PERO1              =  0.460G1N504O + 0.270GNN5023 + 0.270GNN502o                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16726} G2N503s +PERO2              =  0.400G1N504O + 0.300GNN5023 + 0.300GNN502o                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16727} G2N503s +PERO3              =  0.460G1N504O + 0.270GNN5023 + 0.270GNN502o                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16728} G2N503s +PERO5              =  0.460G1N504O + 0.270GNN5023 + 0.270GNN502o                 : ARR( 0.183E-11,   450., 0.0);
+{ 16729} G2N503s +PERO6              =  0.300G1N504O + 0.350GNN5023 + 0.350GNN502o                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16730} G2N503s +PERO9              =  0.650G1N504O + 0.350GNN502o                                : ARR( 0.100E-10,     0., 0.0);
+{ 16731} G1N504O                     =       G3N2000 +      GND2000 +      GCO                     : ARR( 0.200E+15,  3324., 0.0);
+{ 16732} GHN5024 +GHO                =       GHN504l +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 16733} GHN5024 +GHO                =       G2H501p                                               : ARR( 0.143E-11,     0., 0.0);
+{ 16734} GHN5024 +GHO                =       GNN502J +      GHO                                    : ARR( 0.833E-11,     0., 0.0);
+{ 16735} GHN5024 +GHO                =       G2N503t                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 16736} GHN5024+HV               =       G1N502e +      GHO                                    :  0.100E+01*SUN;
+{ 16737} GHN5024+HV               =       G1H500n +      GNO2                                   :  0.100E+01*SUN;
+{ 16738} GHN5024+HV               =       G1H503q +      GNO2                                   :  0.100E+01*SUN;
+{ 16739} G2H501p +GNO                =       G1H503r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16740} G2H501p +GNO                =       GHN504m                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16741} G2H501p +GHO2               =       GHH501g                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16742} G2H501p +GNO3               =       G1H503r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16743} G2H501p +MEPERO             =  0.340G1H503r + 0.330GHN5052 + 0.330GHN503Z                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16744} G2H501p +PERO1              =  0.460G1H503r + 0.270GHN5052 + 0.270GHN503Z                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16745} G2H501p +PERO2              =  0.400G1H503r + 0.300GHN5052 + 0.300GHN503Z                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16746} G2H501p +PERO3              =  0.460G1H503r + 0.270GHN5052 + 0.270GHN503Z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16747} G2H501p +PERO5              =  0.460G1H503r + 0.270GHN5052 + 0.270GHN503Z                 : ARR( 0.183E-11,   450., 0.0);
+{ 16748} G2H501p +PERO6              =  0.300G1H503r + 0.350GHN5052 + 0.350GHN503Z                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16749} G2H501p +PERO9              =  0.650G1H503r + 0.350GHN503Z                                : ARR( 0.100E-10,     0., 0.0);
+{ 16750} G2N503t +GNO                =       G1N502e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16751} G2N503t +GNO                =       GNN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16752} G2N503t +GHO2               =       GHN5024                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16753} G2N503t +GNO3               =       G1N502e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16754} G2N503t +MEPERO             =  0.340G1N502e + 0.330GNN501M + 0.330GNN502J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16755} G2N503t +PERO1              =  0.460G1N502e + 0.270GNN501M + 0.270GNN502J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16756} G2N503t +PERO2              =  0.400G1N502e + 0.300GNN501M + 0.300GNN502J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16757} G2N503t +PERO3              =  0.460G1N502e + 0.270GNN501M + 0.270GNN502J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16758} G2N503t +PERO5              =  0.460G1N502e + 0.270GNN501M + 0.270GNN502J                 : ARR( 0.183E-11,   450., 0.0);
+{ 16759} G2N503t +PERO6              =  0.300G1N502e + 0.350GNN501M + 0.350GNN502J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16760} G2N503t +PERO9              =  0.650G1N502e + 0.350GNN502J                                : ARR( 0.100E-10,     0., 0.0);
+{ 16761} G1H503q                     =       G2H501q                                               : ARR( 0.160E+12,  3000., 0.0);
+{ 16762} G1H503r                     =       GCH2O   +      GHN400v +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 16763} G1H503r                     =       GDO2000 +      GNN3005 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{ 16764} G2H501q +GNO                =       G1H503s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16765} G2H501q +GNO                =       GHN5053                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16766} G2H501q +GHO2               =       GHH5014                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16767} G2H501q +GNO3               =       G1H503s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16768} G2H501q +MEPERO             =  0.340G1H503s + 0.330GHN503j + 0.330GHN504E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16769} G2H501q +PERO1              =  0.460G1H503s + 0.270GHN503j + 0.270GHN504E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16770} G2H501q +PERO2              =  0.400G1H503s + 0.300GHN503j + 0.300GHN504E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16771} G2H501q +PERO3              =  0.460G1H503s + 0.270GHN503j + 0.270GHN504E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16772} G2H501q +PERO5              =  0.460G1H503s + 0.270GHN503j + 0.270GHN504E                 : ARR( 0.183E-11,   450., 0.0);
+{ 16773} G2H501q +PERO6              =  0.300G1H503s + 0.350GHN503j + 0.350GHN504E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16774} G2H501q +PERO9              =  0.650G1H503s + 0.350GHN504E                                : ARR( 0.100E-10,     0., 0.0);
+{ 16775} G1H503s                     =       GHN5042 +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{ 16776} G1H503s                     =       GND3004 +      GDO2000 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{ 16777} G1H503s                     =       GHN400h +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 16778} GNN501M +GHO                =       GNN502j +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{ 16779} GNN501M +GHO                =       G2N503u                                               : ARR( 0.147E-11,     0., 0.0);
+{ 16780} GNN501M +GHO                =       GNN502J +      GHO2                                   : ARR( 0.215E-11,     0., 0.0);
+{ 16781} GNN501M+HV               =       G1N501k +      GNO2                                   :  0.100E+01*SUN;
+{ 16782} GNN501M+HV               =       G1N504P +      GNO2                                   :  0.100E+01*SUN;
+{ 16783} G2N503u +GNO                =       G1N504Q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16784} G2N503u +GNO                =       GNN502l                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16785} G2N503u +GHO2               =       GHN504r                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16786} G2N503u +GNO3               =       G1N504Q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16787} G2N503u +MEPERO             =  0.340G1N504Q + 0.330GNN502p + 0.330GNN502O                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16788} G2N503u +PERO1              =  0.460G1N504Q + 0.270GNN502p + 0.270GNN502O                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16789} G2N503u +PERO2              =  0.400G1N504Q + 0.300GNN502p + 0.300GNN502O                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16790} G2N503u +PERO3              =  0.460G1N504Q + 0.270GNN502p + 0.270GNN502O                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16791} G2N503u +PERO5              =  0.460G1N504Q + 0.270GNN502p + 0.270GNN502O                 : ARR( 0.183E-11,   450., 0.0);
+{ 16792} G2N503u +PERO6              =  0.300G1N504Q + 0.350GNN502p + 0.350GNN502O                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16793} G2N503u +PERO9              =  0.650G1N504Q + 0.350GNN502O                                : ARR( 0.100E-10,     0., 0.0);
+{ 16794} G1N504P                     =       G2N503v                                               : ARR( 0.160E+12,  3000., 0.0);
+{ 16795} G1N504Q                     =       GDO2000 +      GNN3005 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{ 16796} G2N503v +GNO                =       G1N504R +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16797} G2N503v +GNO                =       GNN502q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16798} G2N503v +GHO2               =       GHN503i                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16799} G2N503v +GNO3               =       G1N504R +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16800} G2N503v +MEPERO             =  0.340G1N504R + 0.330GNO500b + 0.330GNK5015                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16801} G2N503v +PERO1              =  0.460G1N504R + 0.270GNO500b + 0.270GNK5015                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16802} G2N503v +PERO2              =  0.400G1N504R + 0.300GNO500b + 0.300GNK5015                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16803} G2N503v +PERO3              =  0.460G1N504R + 0.270GNO500b + 0.270GNK5015                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16804} G2N503v +PERO5              =  0.460G1N504R + 0.270GNO500b + 0.270GNK5015                 : ARR( 0.183E-11,   450., 0.0);
+{ 16805} G2N503v +PERO6              =  0.300G1N504R + 0.350GNO500b + 0.350GNK5015                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16806} G2N503v +PERO9              =  0.650G1N504R + 0.350GNK5015                                : ARR( 0.100E-10,     0., 0.0);
+{ 16807} G1N504R                     =       GND3004 +      GDO2000 +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{ 16808} GHN5025 +GHO                =       GND500X +      GHO                                    : ARR( 0.164E-10,     0., 0.0);
+{ 16809} GHN5025 +GHO                =       G3H500W                                               : ARR( 0.212E-10,     0., 0.0);
+{ 16810} GHN5025 +GHO                =       G2N503w                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 16811} GHN5025 +GNO3               =       G3H500W +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 16812} GHN5025+HV               =       G1N501u +      GHO                                    :  0.100E+01*SUN;
+{ 16813} GHN5025+HV               =       G1H503t +      GNO2                                   :  0.100E+01*SUN;
+{ 16814} GHN5025+HV               =       G2H400a +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 16815} GHN5025+HV               =       G2H300C +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{ 16816} G3H500W +GHO2               =  0.800GGH500j + 0.200GAH500L + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 16817} G3H500W +GNO                =       G2H400a +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 16818} G3H500W +GNO2               =       GPH500L                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 16819} G3H500W +GNO3               =       G2H400a +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 16820} G3H500W +MEPERO             =  0.685G2H400a + 0.315GAH500L + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16821} G3H500W +PERO1              =  0.800G2H400a + 0.200GAH500L + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16822} G3H500W +PERO2              =  0.750G2H400a + 0.250GAH500L + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16823} G3H500W +PERO3              =  0.800G2H400a + 0.200GAH500L + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16824} G3H500W +PERO5              =  0.650G2H400a + 0.350GAH500L + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16825} G3H500W +PERO6              =  0.650G2H400a + 0.350GAH500L + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 16826} G3H500W +PERO9              =       G2H400a +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 16827} G2N503w +GNO                =       G1N501u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16828} G2N503w +GNO                =       GNN500J                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16829} G2N503w +GHO2               =       GHN5025                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16830} G2N503w +GNO3               =       G1N501u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16831} G2N503w +MEPERO             =  0.480G1N501u + 0.260GND500W + 0.260GND500X                 : ARR( 0.146E-12,  -445., 0.0);
+{ 16832} G2N503w +PERO1              =  0.600G1N501u + 0.200GND500W + 0.200GND500X                 : ARR( 0.112E-12,  -500., 0.0);
+{ 16833} G2N503w +PERO2              =  0.560G1N501u + 0.220GND500W + 0.220GND500X                 : ARR( 0.418E-13, -1000., 0.0);
+{ 16834} G2N503w +PERO3              =  0.600G1N501u + 0.200GND500W + 0.200GND500X                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16835} G2N503w +PERO5              =  0.600G1N501u + 0.200GND500W + 0.200GND500X                 : ARR( 0.473E-11,   850., 0.0);
+{ 16836} G2N503w +PERO6              =  0.460G1N501u + 0.270GND500W + 0.270GND500X                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16837} G2N503w +PERO9              =  0.800G1N501u + 0.200GND500X                                : ARR( 0.100E-10,     0., 0.0);
+{ 16838} G1H503t                     =       G2H2000 +      GDD3000                                : ARR( 0.200E+15,  6436., 0.0);
+{ 16839} G1H503t                     =       GHD3000 +      G2D2000                                : ARR( 0.200E+15,  6974., 0.0);
+{ 16840} G2H400a +GNO                =       G1H400e +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 16841} G2H400a +GNO                =       GHN400P                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 16842} G2H400a +GHO2               =       GHH400Z                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 16843} G2H400a +GNO3               =       G1H400e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16844} G2H400a +MEPERO             =  0.480G1H400e + 0.260GHN4005 + 0.260GHN400M                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16845} G2H400a +PERO1              =  0.600G1H400e + 0.200GHN4005 + 0.200GHN400M                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16846} G2H400a +PERO2              =  0.560G1H400e + 0.220GHN4005 + 0.220GHN400M                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16847} G2H400a +PERO3              =  0.600G1H400e + 0.200GHN4005 + 0.200GHN400M                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16848} G2H400a +PERO5              =  0.600G1H400e + 0.200GHN4005 + 0.200GHN400M                 : ARR( 0.533E-11,   500., 0.0);
+{ 16849} G2H400a +PERO6              =  0.460G1H400e + 0.270GHN4005 + 0.270GHN400M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16850} G2H400a +PERO9              =  0.800G1H400e + 0.200GHN400M                                : ARR( 0.100E-10,     0., 0.0);
+{ 16851} G2H300C +GNO                =       G1H300C +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 16852} G2H300C +GNO                =       GHN300A                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 16853} G2H300C +GHO2               =       GHH3005                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 16854} G2H300C +GNO3               =       G1H300C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16855} G2H300C +MEPERO             =  0.340G1H300C + 0.330GHD3005 + 0.330GHD3001                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16856} G2H300C +PERO1              =  0.460G1H300C + 0.270GHD3005 + 0.270GHD3001                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16857} G2H300C +PERO2              =  0.400G1H300C + 0.300GHD3005 + 0.300GHD3001                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16858} G2H300C +PERO3              =  0.460G1H300C + 0.270GHD3005 + 0.270GHD3001                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16859} G2H300C +PERO5              =  0.460G1H300C + 0.270GHD3005 + 0.270GHD3001                 : ARR( 0.183E-11,   450., 0.0);
+{ 16860} G2H300C +PERO6              =  0.300G1H300C + 0.350GHD3005 + 0.350GHD3001                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16861} G2H300C +PERO9              =  0.650G1H300C + 0.350GHD3001                                : ARR( 0.100E-10,     0., 0.0);
+{ 16862} G1H400e                     =       GND4002 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 16863} G1H300C                     =       GHD2000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5751., 0.0);
+{ 16864} GHN5026 +GHO                =       GHN5054 +      GHO2                                   : ARR( 0.420E-11,     0., 0.0);
+{ 16865} GHN5026 +GHO                =       GNN501S +      GHO                                    : ARR( 0.336E-11,     0., 0.0);
+{ 16866} GHN5026 +GHO                =       G2N503x                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 16867} GHN5026+HV               =       G1H503u +      GNO2                                   :  0.100E+01*SUN;
+{ 16868} GHN5026+HV               =       G1H500p +      GNO2                                   :  0.100E+01*SUN;
+{ 16869} GHN5026+HV               =       G1N502f +      GHO                                    :  0.100E+01*SUN;
+{ 16870} G2N503x +GNO                =       G1N502f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16871} G2N503x +GNO                =       GNN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16872} G2N503x +GHO2               =       GHN5026                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16873} G2N503x +GNO3               =       G1N502f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16874} G2N503x +MEPERO             =  0.480G1N502f + 0.260GNN501R + 0.260GNN501S                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16875} G2N503x +PERO1              =  0.600G1N502f + 0.200GNN501R + 0.200GNN501S                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16876} G2N503x +PERO2              =  0.560G1N502f + 0.220GNN501R + 0.220GNN501S                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16877} G2N503x +PERO3              =  0.600G1N502f + 0.200GNN501R + 0.200GNN501S                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16878} G2N503x +PERO5              =  0.600G1N502f + 0.200GNN501R + 0.200GNN501S                 : ARR( 0.533E-11,   500., 0.0);
+{ 16879} G2N503x +PERO6              =  0.460G1N502f + 0.270GNN501R + 0.270GNN501S                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16880} G2N503x +PERO9              =  0.800G1N502f + 0.200GNN501S                                : ARR( 0.100E-10,     0., 0.0);
+{ 16881} G1H503u                     =       G2O2000 +      GHN300A                                : ARR( 0.200E+15,  7074., 0.0);
+{ 16882} G1H503u                     =       GDO3000 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{ 16883} GHH500W +GHO                =       GHH501l +      GHO2                                   : ARR( 0.408E-11,     0., 0.0);
+{ 16884} GHH500W +GHO                =       GHN5028 +      GHO                                    : ARR( 0.837E-11,     0., 0.0);
+{ 16885} GHH500W +GHO                =       GHN502Q +      GHO                                    : ARR( 0.163E-10,     0., 0.0);
+{ 16886} GHH500W +GHO                =       G2H500a                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 16887} GHH500W +GHO                =       G2H501r                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 16888} GHH500W+HV               =       G1H503v +      GNO2                                   :  0.100E+01*SUN;
+{ 16889} GHH500W+HV               =       G1H500p +      GHO                                    :  0.100E+01*SUN;
+{ 16890} GHH500W+HV               =       G1H501K +      GHO                                    :  0.100E+01*SUN;
+{ 16891} G2H501r +GNO                =       G1H501K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16892} G2H501r +GNO                =       GHN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16893} G2H501r +GHO2               =       GHH500W                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16894} G2H501r +GNO3               =       G1H501K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16895} G2H501r +MEPERO             =  0.480G1H501K + 0.260GHN502M + 0.260GHN502Q                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16896} G2H501r +PERO1              =  0.600G1H501K + 0.200GHN502M + 0.200GHN502Q                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16897} G2H501r +PERO2              =  0.560G1H501K + 0.220GHN502M + 0.220GHN502Q                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16898} G2H501r +PERO3              =  0.600G1H501K + 0.200GHN502M + 0.200GHN502Q                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16899} G2H501r +PERO5              =  0.600G1H501K + 0.200GHN502M + 0.200GHN502Q                 : ARR( 0.533E-11,   500., 0.0);
+{ 16900} G2H501r +PERO6              =  0.460G1H501K + 0.270GHN502M + 0.270GHN502Q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16901} G2H501r +PERO9              =  0.800G1H501K + 0.200GHN502Q                                : ARR( 0.100E-10,     0., 0.0);
+{ 16902} G1H503v                     =       GDO3000 +      GHD2000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{ 16903} GHN5027 +GHO                =       GHN501G +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 16904} GHN5027 +GHO                =       GHN5028 +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 16905} GHN5027 +GHO                =       GND500Y +      GHO                                    : ARR( 0.165E-10,     0., 0.0);
+{ 16906} GHN5027 +GHO                =       G2N503y                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 16907} GHN5027+HV               =       G1H503w +      GNO2                                   :  0.100E+01*SUN;
+{ 16908} GHN5027+HV               =       G1N502i +      GHO                                    :  0.100E+01*SUN;
+{ 16909} G2N503y +GNO                =       G1N502i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16910} G2N503y +GNO                =       GNN500c                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16911} G2N503y +GHO2               =       GHN5027                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16912} G2N503y +GNO3               =       G1N502i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16913} G2N503y +MEPERO             =  0.480G1N502i + 0.260GNO500P + 0.260GND500Y                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16914} G2N503y +PERO1              =  0.600G1N502i + 0.200GNO500P + 0.200GND500Y                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16915} G2N503y +PERO2              =  0.560G1N502i + 0.220GNO500P + 0.220GND500Y                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16916} G2N503y +PERO3              =  0.600G1N502i + 0.200GNO500P + 0.200GND500Y                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16917} G2N503y +PERO5              =  0.600G1N502i + 0.200GNO500P + 0.200GND500Y                 : ARR( 0.533E-11,   500., 0.0);
+{ 16918} G2N503y +PERO6              =  0.460G1N502i + 0.270GNO500P + 0.270GND500Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16919} G2N503y +PERO9              =  0.800G1N502i + 0.200GND500Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 16920} G1H503w                     =       GDO3000 +      GHD2000 +      GHO2                    : ARR( 0.200E+15,  3320., 0.0);
+{ 16921} GHN5028 +GHO                =       GHN5047 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 16922} GHN5028 +GHO                =       GND500Z +      GHO                                    : ARR( 0.101E-10,     0., 0.0);
+{ 16923} GHN5028 +GHO                =       G2N503z                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 16924} GHN5028+HV               =       G1H503x +      GNO2                                   :  0.100E+01*SUN;
+{ 16925} GHN5028+HV               =       G3N4008 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 16926} GHN5028+HV               =       GD02000 +      GHN3008                                :  0.100E+01*SUN;
+{ 16927} GHN5028+HV               =       G1N502k +      GHO                                    :  0.100E+01*SUN;
+{ 16928} G2N503z +GNO                =       G1N502k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16929} G2N503z +GNO                =       GNN500d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16930} G2N503z +GHO2               =       GHN5028                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16931} G2N503z +GNO3               =       G1N502k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16932} G2N503z +MEPERO             =  0.480G1N502k + 0.260GNK500U + 0.260GND500Z                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16933} G2N503z +PERO1              =  0.600G1N502k + 0.200GNK500U + 0.200GND500Z                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16934} G2N503z +PERO2              =  0.560G1N502k + 0.220GNK500U + 0.220GND500Z                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16935} G2N503z +PERO3              =  0.600G1N502k + 0.200GNK500U + 0.200GND500Z                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16936} G2N503z +PERO5              =  0.600G1N502k + 0.200GNK500U + 0.200GND500Z                 : ARR( 0.533E-11,   500., 0.0);
+{ 16937} G2N503z +PERO6              =  0.460G1N502k + 0.270GNK500U + 0.270GND500Z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16938} G2N503z +PERO9              =  0.800G1N502k + 0.200GND500Z                                : ARR( 0.100E-10,     0., 0.0);
+{ 16939} G1H503x                     =       GDO3000 +      G3H2000                                : ARR( 0.200E+15,  2755., 0.0);
+{ 16940} GHH500X +GHO                =       GHH501m +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 16941} GHH500X +GHO                =       G2H501s                                               : ARR( 0.143E-11,     0., 0.0);
+{ 16942} GHH500X +GHO                =       GHN502A +      GHO                                    : ARR( 0.833E-11,     0., 0.0);
+{ 16943} GHH500X +GHO                =       GHN502R +      GHO                                    : ARR( 0.325E-11,     0., 0.0);
+{ 16944} GHH500X +GHO                =       G2H501t                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 16945} GHH500X +GHO                =       G2H501u                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 16946} GHH500X+HV               =       G1H503u +      GHO                                    :  0.100E+01*SUN;
+{ 16947} GHH500X+HV               =       G1H500r +      GNO2                                   :  0.100E+01*SUN;
+{ 16948} GHH500X+HV               =       G1H503q +      GHO                                    :  0.100E+01*SUN;
+{ 16949} G2H501s +GNO                =       G1H503y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16950} G2H501s +GNO                =       GHH501n                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16951} G2H501s +GHO2               =       GHH501o                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16952} G2H501s +GNO3               =       G1H503y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16953} G2H501s +MEPERO             =  0.340G1H503y + 0.330GHH501E + 0.330GHH501p                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16954} G2H501s +PERO1              =  0.460G1H503y + 0.270GHH501E + 0.270GHH501p                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16955} G2H501s +PERO2              =  0.400G1H503y + 0.300GHH501E + 0.300GHH501p                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16956} G2H501s +PERO3              =  0.460G1H503y + 0.270GHH501E + 0.270GHH501p                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16957} G2H501s +PERO5              =  0.460G1H503y + 0.270GHH501E + 0.270GHH501p                 : ARR( 0.183E-11,   450., 0.0);
+{ 16958} G2H501s +PERO6              =  0.300G1H503y + 0.350GHH501E + 0.350GHH501p                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16959} G2H501s +PERO9              =  0.650G1H503y + 0.350GHH501p                                : ARR( 0.100E-10,     0., 0.0);
+{ 16960} G2H501t +GNO                =       G1H503u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16961} G2H501t +GNO                =       GHN5026                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16962} G2H501t +GHO2               =       GHH500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16963} G2H501t +GNO3               =       G1H503u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16964} G2H501t +MEPERO             =  0.340G1H503u + 0.330GHN5029 + 0.330GHN502A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 16965} G2H501t +PERO1              =  0.460G1H503u + 0.270GHN5029 + 0.270GHN502A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 16966} G2H501t +PERO2              =  0.400G1H503u + 0.300GHN5029 + 0.300GHN502A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 16967} G2H501t +PERO3              =  0.460G1H503u + 0.270GHN5029 + 0.270GHN502A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16968} G2H501t +PERO5              =  0.460G1H503u + 0.270GHN5029 + 0.270GHN502A                 : ARR( 0.183E-11,   450., 0.0);
+{ 16969} G2H501t +PERO6              =  0.300G1H503u + 0.350GHN5029 + 0.350GHN502A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 16970} G2H501t +PERO9              =  0.650G1H503u + 0.350GHN502A                                : ARR( 0.100E-10,     0., 0.0);
+{ 16971} G2H501u +GNO                =       G1H503q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 16972} G2H501u +GNO                =       GHN5024                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 16973} G2H501u +GHO2               =       GHH500X                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 16974} G2H501u +GNO3               =       G1H503q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 16975} G2H501u +MEPERO             =  0.480G1H503q + 0.260GHN502N + 0.260GHN502R                 : ARR( 0.164E-12,  -795., 0.0);
+{ 16976} G2H501u +PERO1              =  0.600G1H503q + 0.200GHN502N + 0.200GHN502R                 : ARR( 0.126E-12,  -850., 0.0);
+{ 16977} G2H501u +PERO2              =  0.560G1H503q + 0.220GHN502N + 0.220GHN502R                 : ARR( 0.471E-13, -1350., 0.0);
+{ 16978} G2H501u +PERO3              =  0.600G1H503q + 0.200GHN502N + 0.200GHN502R                 : ARR( 0.142E-12, -1200., 0.0);
+{ 16979} G2H501u +PERO5              =  0.600G1H503q + 0.200GHN502N + 0.200GHN502R                 : ARR( 0.533E-11,   500., 0.0);
+{ 16980} G2H501u +PERO6              =  0.460G1H503q + 0.270GHN502N + 0.270GHN502R                 : ARR( 0.488E-13, -1250., 0.0);
+{ 16981} G2H501u +PERO9              =  0.800G1H503q + 0.200GHN502R                                : ARR( 0.100E-10,     0., 0.0);
+{ 16982} G1H503y                     =       GHN5042 +      GHO                                    : ARR( 0.160E+12,  2905., 0.0);
+{ 16983} G1H503y                     =       GCH2O   +      GHH400a +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 16984} G1H503y                     =       GDO2000 +      GHN300A +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{ 16985} GHH500Y +GHO                =       GHH500c +      GHO                                    : ARR( 0.481E-10,     0., 0.0);
+{ 16986} GHH500Y +GHO                =       GHH500a +      GHO                                    : ARR( 0.481E-10,     0., 0.0);
+{ 16987} GHH500Y +GHO                =       GHH500i +      GHO                                    : ARR( 0.188E-10,     0., 0.0);
+{ 16988} GHH500Y+HV               =       G1H503v +      GHO                                    :  0.100E+01*SUN;
+{ 16989} GHH500Y+HV               =       G1H500r +      GHO                                    :  0.100E+01*SUN;
+{ 16990} GHH500Y+HV               =       G1H5024 +      GHO                                    :  0.100E+01*SUN;
+{ 16991} GHH500Z +GHO                =       GHK500b +      GHO                                    : ARR( 0.491E-10,     0., 0.0);
+{ 16992} GHH500Z +GHO                =       GHH500a +      GHO2                                   : ARR( 0.123E-10,     0., 0.0);
+{ 16993} GHH500Z +GHO                =       GHD500M +      GHO                                    : ARR( 0.192E-10,     0., 0.0);
+{ 16994} GHH500Z+HV               =       G1H503w +      GHO                                    :  0.100E+01*SUN;
+{ 16995} GHH500Z+HV               =       G1H502C +      GHO                                    :  0.100E+01*SUN;
+{ 16996} GHH500a +GHO                =       GHH501W +      GHO2                                   : ARR( 0.403E-11,     0., 0.0);
+{ 16997} GHH500a +GHO                =       G2H501v                                               : ARR( 0.449E-11,     0., 0.0);
+{ 16998} GHH500a +GHO                =       GHK500c +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 16999} GHH500a +GHO                =       GHD500N +      GHO                                    : ARR( 0.983E-11,     0., 0.0);
+{ 17000} GHH500a +GHO                =       G2H501w                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 17001} GHH500a +GHO                =       G2H501x                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 17002} GHH500a+HV               =       G1H503x +      GHO                                    :  0.100E+01*SUN;
+{ 17003} GHH500a+HV               =       G3H4004 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17004} GHH500a+HV               =       G1H502F +      GHO                                    :  0.100E+01*SUN;
+{ 17005} G2H501v +GNO                =       G1H503z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17006} G2H501v +GNO                =       GHH501q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17007} G2H501v +GHO2               =       GHH501r                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17008} G2H501v +GNO3               =       G1H503z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17009} G2H501v +MEPERO             =  0.340G1H503z + 0.330GHH501H + 0.330GHH501s                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17010} G2H501v +PERO1              =  0.460G1H503z + 0.270GHH501H + 0.270GHH501s                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17011} G2H501v +PERO2              =  0.400G1H503z + 0.300GHH501H + 0.300GHH501s                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17012} G2H501v +PERO3              =  0.460G1H503z + 0.270GHH501H + 0.270GHH501s                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17013} G2H501v +PERO5              =  0.460G1H503z + 0.270GHH501H + 0.270GHH501s                 : ARR( 0.183E-11,   450., 0.0);
+{ 17014} G2H501v +PERO6              =  0.300G1H503z + 0.350GHH501H + 0.350GHH501s                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17015} G2H501v +PERO9              =  0.650G1H503z + 0.350GHH501s                                : ARR( 0.100E-10,     0., 0.0);
+{ 17016} G2H501w +GNO                =       G1H503x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17017} G2H501w +GNO                =       GHN5028                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17018} G2H501w +GHO2               =       GHH500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17019} G2H501w +GNO3               =       G1H503x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17020} G2H501w +MEPERO             =  0.340G1H503x + 0.330GHK500a + 0.330GHK500c                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17021} G2H501w +PERO1              =  0.460G1H503x + 0.270GHK500a + 0.270GHK500c                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17022} G2H501w +PERO2              =  0.400G1H503x + 0.300GHK500a + 0.300GHK500c                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17023} G2H501w +PERO3              =  0.460G1H503x + 0.270GHK500a + 0.270GHK500c                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17024} G2H501w +PERO5              =  0.460G1H503x + 0.270GHK500a + 0.270GHK500c                 : ARR( 0.183E-11,   450., 0.0);
+{ 17025} G2H501w +PERO6              =  0.300G1H503x + 0.350GHK500a + 0.350GHK500c                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17026} G2H501w +PERO9              =  0.650G1H503x + 0.350GHK500c                                : ARR( 0.100E-10,     0., 0.0);
+{ 17027} G2H501x +GNO                =       G1H502F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17028} G2H501x +GNO                =       GHN5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17029} G2H501x +GHO2               =       GHH500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17030} G2H501x +GNO3               =       G1H502F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17031} G2H501x +MEPERO             =  0.480G1H502F + 0.260GHK500J + 0.260GHD500N                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17032} G2H501x +PERO1              =  0.600G1H502F + 0.200GHK500J + 0.200GHD500N                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17033} G2H501x +PERO2              =  0.560G1H502F + 0.220GHK500J + 0.220GHD500N                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17034} G2H501x +PERO3              =  0.600G1H502F + 0.200GHK500J + 0.200GHD500N                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17035} G2H501x +PERO5              =  0.600G1H502F + 0.200GHK500J + 0.200GHD500N                 : ARR( 0.533E-11,   500., 0.0);
+{ 17036} G2H501x +PERO6              =  0.460G1H502F + 0.270GHK500J + 0.270GHD500N                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17037} G2H501x +PERO9              =  0.800G1H502F + 0.200GHD500N                                : ARR( 0.100E-10,     0., 0.0);
+{ 17038} G1H503z                     =       GCH2O   +      GHH400b +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 17039} G1H503z                     =       GDO2000 +      GHD3001 +      GHO                     : ARR( 0.200E+15,  4976., 0.0);
+{ 17040} GHN5029 +GHO                =       GHN5055 +      GHO2                                   : ARR( 0.413E-11,     0., 0.0);
+{ 17041} GHN5029 +GHO                =       G2H501y                                               : ARR( 0.145E-11,     0., 0.0);
+{ 17042} GHN5029 +GHO                =       GHN502A +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 17043} GHN5029 +GHO                =       GND500b +      GHO                                    : ARR( 0.331E-11,     0., 0.0);
+{ 17044} GHN5029 +GHO                =       G2N5041                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 17045} GHN5029+HV               =       G1H500t +      GNO2                                   :  0.100E+01*SUN;
+{ 17046} GHN5029+HV               =       G1N504P +      GHO                                    :  0.100E+01*SUN;
+{ 17047} G2H501y +GNO                =       G1H5041 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17048} G2H501y +GNO                =       GHN5056                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17049} G2H501y +GHO2               =       GHH501t                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17050} G2H501y +GNO3               =       G1H5041 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17051} G2H501y +MEPERO             =  0.340G1H5041 + 0.330GHN503y + 0.330GHN5057                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17052} G2H501y +PERO1              =  0.460G1H5041 + 0.270GHN503y + 0.270GHN5057                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17053} G2H501y +PERO2              =  0.400G1H5041 + 0.300GHN503y + 0.300GHN5057                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17054} G2H501y +PERO3              =  0.460G1H5041 + 0.270GHN503y + 0.270GHN5057                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17055} G2H501y +PERO5              =  0.460G1H5041 + 0.270GHN503y + 0.270GHN5057                 : ARR( 0.183E-11,   450., 0.0);
+{ 17056} G2H501y +PERO6              =  0.300G1H5041 + 0.350GHN503y + 0.350GHN5057                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17057} G2H501y +PERO9              =  0.650G1H5041 + 0.350GHN5057                                : ARR( 0.100E-10,     0., 0.0);
+{ 17058} G2N5041 +GNO                =       G1N504P +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17059} G2N5041 +GNO                =       GNN501M                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17060} G2N5041 +GHO2               =       GHN5029                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17061} G2N5041 +GNO3               =       G1N504P +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17062} G2N5041 +MEPERO             =  0.480G1N504P + 0.260GNO500Z + 0.260GND500b                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17063} G2N5041 +PERO1              =  0.600G1N504P + 0.200GNO500Z + 0.200GND500b                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17064} G2N5041 +PERO2              =  0.560G1N504P + 0.220GNO500Z + 0.220GND500b                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17065} G2N5041 +PERO3              =  0.600G1N504P + 0.200GNO500Z + 0.200GND500b                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17066} G2N5041 +PERO5              =  0.600G1N504P + 0.200GNO500Z + 0.200GND500b                 : ARR( 0.533E-11,   500., 0.0);
+{ 17067} G2N5041 +PERO6              =  0.460G1N504P + 0.270GNO500Z + 0.270GND500b                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17068} G2N5041 +PERO9              =  0.800G1N504P + 0.200GND500b                                : ARR( 0.100E-10,     0., 0.0);
+{ 17069} G1H5041                     =       GDO2000 +      GHN300A +      GHO2                    : ARR( 0.200E+15,  3486., 0.0);
+{ 17070} GHH500b +GHO                =       GHH500c +      GHO2                                   : ARR( 0.123E-10,     0., 0.0);
+{ 17071} GHH500b +GHO                =       GHK500a +      GHO                                    : ARR( 0.491E-10,     0., 0.0);
+{ 17072} GHH500b +GHO                =       GHD500P +      GHO                                    : ARR( 0.192E-10,     0., 0.0);
+{ 17073} GHH500b+HV               =       G1H500t +      GHO                                    :  0.100E+01*SUN;
+{ 17074} GHH500b+HV               =       G1H5026 +      GHO                                    :  0.100E+01*SUN;
+{ 17075} GHO500Q +GHO                =       GHD500B +      GHO2                                   : ARR( 0.419E-11,     0., 0.0);
+{ 17076} GHO500Q +GHO                =       GHK500b +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{ 17077} GHO500Q +GHO                =       GHK500a +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{ 17078} GHO500Q +GHO                =       GDO500B +      GHO                                    : ARR( 0.167E-10,     0., 0.0);
+{ 17079} GHO500Q +GHO                =       G2O500T                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 17080} GHO500Q+HV               =       G1O500X +      GHO                                    :  0.100E+01*SUN;
+{ 17081} G2O500T +GNO                =       G1O500X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17082} G2O500T +GNO                =       GNO500N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17083} G2O500T +GHO2               =       GHO500Q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17084} G2O500T +GNO3               =       G1O500X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17085} G2O500T +MEPERO             =  0.480G1O500X + 0.260GOO500A + 0.260GDO500B                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17086} G2O500T +PERO1              =  0.600G1O500X + 0.200GOO500A + 0.200GDO500B                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17087} G2O500T +PERO2              =  0.560G1O500X + 0.220GOO500A + 0.220GDO500B                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17088} G2O500T +PERO3              =  0.600G1O500X + 0.200GOO500A + 0.200GDO500B                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17089} G2O500T +PERO5              =  0.600G1O500X + 0.200GOO500A + 0.200GDO500B                 : ARR( 0.533E-11,   500., 0.0);
+{ 17090} G2O500T +PERO6              =  0.460G1O500X + 0.270GOO500A + 0.270GDO500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17091} G2O500T +PERO9              =  0.800G1O500X + 0.200GDO500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 17092} GHK500a +GHO                =       GHD500p +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 17093} GHK500a +GHO                =       G2H501z                                               : ARR( 0.453E-11,     0., 0.0);
+{ 17094} GHK500a +GHO                =       GHK500c +      GHO2                                   : ARR( 0.634E-11,     0., 0.0);
+{ 17095} GHK500a +GHO                =       GDK500J +      GHO                                    : ARR( 0.990E-11,     0., 0.0);
+{ 17096} GHK500a +GHO                =       G2K500k                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 17097} GHK500a+HV               =       G3K4006 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17098} GHK500a+HV               =       G1K500d +      GHO                                    :  0.100E+01*SUN;
+{ 17099} G2H501z +GNO                =       G1H5042 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17100} G2H501z +GNO                =       GHN5058                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17101} G2H501z +GHO2               =       GHH501u                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17102} G2H501z +GNO3               =       G1H5042 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17103} G2H501z +MEPERO             =  0.340G1H5042 + 0.330GHK500g + 0.330GHK500r                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17104} G2H501z +PERO1              =  0.460G1H5042 + 0.270GHK500g + 0.270GHK500r                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17105} G2H501z +PERO2              =  0.400G1H5042 + 0.300GHK500g + 0.300GHK500r                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17106} G2H501z +PERO3              =  0.460G1H5042 + 0.270GHK500g + 0.270GHK500r                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17107} G2H501z +PERO5              =  0.460G1H5042 + 0.270GHK500g + 0.270GHK500r                 : ARR( 0.183E-11,   450., 0.0);
+{ 17108} G2H501z +PERO6              =  0.300G1H5042 + 0.350GHK500g + 0.350GHK500r                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17109} G2H501z +PERO9              =  0.650G1H5042 + 0.350GHK500r                                : ARR( 0.100E-10,     0., 0.0);
+{ 17110} G2K500k +GNO                =       G1K500d +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17111} G2K500k +GNO                =       GNK500R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17112} G2K500k +GHO2               =       GHK500a                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17113} G2K500k +GNO3               =       G1K500d +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17114} G2K500k +MEPERO             =  0.480G1K500d + 0.260GKO500F + 0.260GDK500J                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17115} G2K500k +PERO1              =  0.600G1K500d + 0.200GKO500F + 0.200GDK500J                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17116} G2K500k +PERO2              =  0.560G1K500d + 0.220GKO500F + 0.220GDK500J                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17117} G2K500k +PERO3              =  0.600G1K500d + 0.200GKO500F + 0.200GDK500J                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17118} G2K500k +PERO5              =  0.600G1K500d + 0.200GKO500F + 0.200GDK500J                 : ARR( 0.533E-11,   500., 0.0);
+{ 17119} G2K500k +PERO6              =  0.460G1K500d + 0.270GKO500F + 0.270GDK500J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17120} G2K500k +PERO9              =  0.800G1K500d + 0.200GDK500J                                : ARR( 0.100E-10,     0., 0.0);
+{ 17121} G1H5042                     =       GCH2O   +      GHD400J +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 17122} G1H5042                     =       GDO2000 +      GHD3001 +      GHO2                    : ARR( 0.200E+15,  3768., 0.0);
+{ 17123} GHD500K +GHO                =       GDD5003 +      GHO                                    : ARR( 0.532E-10,     0., 0.0);
+{ 17124} GHD500K +GHO                =       G3H500X                                               : ARR( 0.687E-10,     0., 0.0);
+{ 17125} GHD500K +GNO3               =       G3H500X +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17126} GHD500K+HV               =       G1D500G +      GHO                                    :  0.100E+01*SUN;
+{ 17127} GHD500K+HV               =       G3H3000 +      G2D2000                                :  0.100E+01*SUN;
+{ 17128} GHD500K+HV               =       G2H400b +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17129} G3H500X +GHO2               =  0.800GGH500P + 0.200GAH500R + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17130} G3H500X +GNO                =       G2H400b +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17131} G3H500X +GNO2               =       GPH500T                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17132} G3H500X +GNO3               =       G2H400b +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17133} G3H500X +MEPERO             =  0.685G2H400b + 0.315GAH500R + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17134} G3H500X +PERO1              =  0.800G2H400b + 0.200GAH500R + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17135} G3H500X +PERO2              =  0.750G2H400b + 0.250GAH500R + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17136} G3H500X +PERO3              =  0.800G2H400b + 0.200GAH500R + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17137} G3H500X +PERO5              =  0.650G2H400b + 0.350GAH500R + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17138} G3H500X +PERO6              =  0.650G2H400b + 0.350GAH500R + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17139} G3H500X +PERO9              =       G2H400b +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17140} G2H400b +GNO                =       G1H400f +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 17141} G2H400b +GNO                =       GHN400Q                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 17142} G2H400b +GHO2               =       GHH400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 17143} G2H400b +GNO3               =       G1H400f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17144} G2H400b +MEPERO             =  0.480G1H400f + 0.260GHK4002 + 0.260GHD400D                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17145} G2H400b +PERO1              =  0.600G1H400f + 0.200GHK4002 + 0.200GHD400D                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17146} G2H400b +PERO2              =  0.560G1H400f + 0.220GHK4002 + 0.220GHD400D                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17147} G2H400b +PERO3              =  0.600G1H400f + 0.200GHK4002 + 0.200GHD400D                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17148} G2H400b +PERO5              =  0.600G1H400f + 0.200GHK4002 + 0.200GHD400D                 : ARR( 0.533E-11,   500., 0.0);
+{ 17149} G2H400b +PERO6              =  0.460G1H400f + 0.270GHK4002 + 0.270GHD400D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17150} G2H400b +PERO9              =  0.800G1H400f + 0.200GHD400D                                : ARR( 0.100E-10,     0., 0.0);
+{ 17151} G1H400f                     =       G3H3000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 17152} GHN502A +GHO                =       GHN5059 +      GHO2                                   : ARR( 0.134E-10,     0., 0.0);
+{ 17153} GHN502A +GHO                =       GND500c +      GHO                                    : ARR( 0.339E-11,     0., 0.0);
+{ 17154} GHN502A +GHO                =       G2N5042                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 17155} GHN502A+HV               =       G3K3001 +      GHD2000 +      GNO2                    :  0.100E+01*SUN;
+{ 17156} GHN502A+HV               =       G1H500v +      GNO2                                   :  0.100E+01*SUN;
+{ 17157} GHN502A+HV               =       G1N504S +      GHO                                    :  0.100E+01*SUN;
+{ 17158} G2N5042 +GNO                =       G1N504S +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17159} G2N5042 +GNO                =       GNN502J                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17160} G2N5042 +GHO2               =       GHN502A                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17161} G2N5042 +GNO3               =       G1N504S +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17162} G2N5042 +MEPERO             =  0.480G1N504S + 0.260GNK500o + 0.260GND500c                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17163} G2N5042 +PERO1              =  0.600G1N504S + 0.200GNK500o + 0.200GND500c                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17164} G2N5042 +PERO2              =  0.560G1N504S + 0.220GNK500o + 0.220GND500c                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17165} G2N5042 +PERO3              =  0.600G1N504S + 0.200GNK500o + 0.200GND500c                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17166} G2N5042 +PERO5              =  0.600G1N504S + 0.200GNK500o + 0.200GND500c                 : ARR( 0.533E-11,   500., 0.0);
+{ 17167} G2N5042 +PERO6              =  0.460G1N504S + 0.270GNK500o + 0.270GND500c                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17168} G2N5042 +PERO9              =  0.800G1N504S + 0.200GND500c                                : ARR( 0.100E-10,     0., 0.0);
+{ 17169} G1N504S +OXYGEN             =       GND500c +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 17170} G1N504S                     =       G2N5043                                               : ARR( 0.160E+12,  4982., 0.0);
+{ 17171} G1N504S                     =       GDK4005 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{ 17172} G2N5043 +GNO                =       G1N504T +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17173} G2N5043 +GNO                =       GNN502r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17174} G2N5043 +GHO2               =       GHN505A                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17175} G2N5043 +GNO3               =       G1N504T +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17176} G2N5043 +MEPERO             =  0.340G1N504T + 0.330GNK5018 + 0.330GNK5016                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17177} G2N5043 +PERO1              =  0.460G1N504T + 0.270GNK5018 + 0.270GNK5016                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17178} G2N5043 +PERO2              =  0.400G1N504T + 0.300GNK5018 + 0.300GNK5016                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17179} G2N5043 +PERO3              =  0.460G1N504T + 0.270GNK5018 + 0.270GNK5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17180} G2N5043 +PERO5              =  0.460G1N504T + 0.270GNK5018 + 0.270GNK5016                 : ARR( 0.183E-11,   450., 0.0);
+{ 17181} G2N5043 +PERO6              =  0.300G1N504T + 0.350GNK5018 + 0.350GNK5016                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17182} G2N5043 +PERO9              =  0.650G1N504T + 0.350GNK5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 17183} G1N504T                     =       G3N3004 +      GDO2000                                : ARR( 0.200E+15,  3069., 0.0);
+{ 17184} GHH500c +GHO                =       GHH501v +      GHO2                                   : ARR( 0.139E-10,     0., 0.0);
+{ 17185} GHH500c +GHO                =       GHK500c +      GHO                                    : ARR( 0.274E-10,     0., 0.0);
+{ 17186} GHH500c +GHO                =       GHD500Q +      GHO                                    : ARR( 0.557E-10,     0., 0.0);
+{ 17187} GHH500c+HV               =       G3K3001 +      GHD2000 +      GHO                     :  0.100E+01*SUN;
+{ 17188} GHH500c+HV               =       G1H500v +      GHO                                    :  0.100E+01*SUN;
+{ 17189} GHH500c+HV               =       G1H5029 +      GHO                                    :  0.100E+01*SUN;
+{ 17190} GHK500b +GHO                =       GHD500C +      GHO2                                   : ARR( 0.136E-10,     0., 0.0);
+{ 17191} GHK500b +GHO                =       GHK500c +      GHO2                                   : ARR( 0.671E-11,     0., 0.0);
+{ 17192} GHK500b +GHO                =       GDK500K +      GHO                                    : ARR( 0.544E-10,     0., 0.0);
+{ 17193} GHK500b+HV               =       G3K3001 +      GHD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 17194} GHK500b+HV               =       G1K500a +      GHO                                    :  0.100E+01*SUN;
+{ 17195} GHK500c +GHO                =       GHD500q +      GHO2                                   : ARR( 0.132E-10,     0., 0.0);
+{ 17196} GHK500c +GHO                =       GDK500L +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 17197} GHK500c +GHO                =       G2K500l                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 17198} GHK500c+HV               =       G3K3001 +      G3H2000                                :  0.100E+01*SUN;
+{ 17199} GHK500c+HV               =       G1K500e +      GHO                                    :  0.100E+01*SUN;
+{ 17200} G2K500l +GNO                =       G1K500e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17201} G2K500l +GNO                =       GNK500S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17202} G2K500l +GHO2               =       GHK500c                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17203} G2K500l +GNO3               =       G1K500e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17204} G2K500l +MEPERO             =  0.480G1K500e + 0.260GKK5006 + 0.260GDK500L                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17205} G2K500l +PERO1              =  0.600G1K500e + 0.200GKK5006 + 0.200GDK500L                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17206} G2K500l +PERO2              =  0.560G1K500e + 0.220GKK5006 + 0.220GDK500L                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17207} G2K500l +PERO3              =  0.600G1K500e + 0.200GKK5006 + 0.200GDK500L                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17208} G2K500l +PERO5              =  0.600G1K500e + 0.200GKK5006 + 0.200GDK500L                 : ARR( 0.533E-11,   500., 0.0);
+{ 17209} G2K500l +PERO6              =  0.460G1K500e + 0.270GKK5006 + 0.270GDK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17210} G2K500l +PERO9              =  0.800G1K500e + 0.200GDK500L                                : ARR( 0.100E-10,     0., 0.0);
+{ 17211} GHN502B +GHO                =       GND500d +      GHO                                    : ARR( 0.344E-11,     0., 0.0);
+{ 17212} GHN502B +GHO                =       G3H500Y                                               : ARR( 0.222E-10,     0., 0.0);
+{ 17213} GHN502B +GHO                =       G2N5044                                               : ARR( 0.203E-11,  -190., 0.0);
+{ 17214} GHN502B +GNO3               =       G3H500Y +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17215} GHN502B+HV               =       G1N502x +      GHO                                    :  0.100E+01*SUN;
+{ 17216} GHN502B+HV               =       G1H5043 +      GNO2                                   :  0.100E+01*SUN;
+{ 17217} GHN502B+HV               =       G2H400c +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17218} GHN502B+HV               =       G2H3002 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{ 17219} G3H500Y +GHO2               =  0.800GGH500k + 0.200GAH500o + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17220} G3H500Y +GNO                =       G2H400c +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17221} G3H500Y +GNO2               =       GPH500q                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17222} G3H500Y +GNO3               =       G2H400c +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17223} G3H500Y +MEPERO             =  0.685G2H400c + 0.315GAH500o + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17224} G3H500Y +PERO1              =  0.800G2H400c + 0.200GAH500o + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17225} G3H500Y +PERO2              =  0.750G2H400c + 0.250GAH500o + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17226} G3H500Y +PERO3              =  0.800G2H400c + 0.200GAH500o + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17227} G3H500Y +PERO5              =  0.650G2H400c + 0.350GAH500o + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17228} G3H500Y +PERO6              =  0.650G2H400c + 0.350GAH500o + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17229} G3H500Y +PERO9              =       G2H400c +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17230} G2N5044 +GNO                =       G1N502x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17231} G2N5044 +GNO                =       GNN500h                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17232} G2N5044 +GHO2               =       GHN502B                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17233} G2N5044 +GNO3               =       G1N502x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17234} G2N5044 +MEPERO             =  0.480G1N502x + 0.260GND500J + 0.260GND500d                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17235} G2N5044 +PERO1              =  0.600G1N502x + 0.200GND500J + 0.200GND500d                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17236} G2N5044 +PERO2              =  0.560G1N502x + 0.220GND500J + 0.220GND500d                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17237} G2N5044 +PERO3              =  0.600G1N502x + 0.200GND500J + 0.200GND500d                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17238} G2N5044 +PERO5              =  0.600G1N502x + 0.200GND500J + 0.200GND500d                 : ARR( 0.533E-11,   500., 0.0);
+{ 17239} G2N5044 +PERO6              =  0.460G1N502x + 0.270GND500J + 0.270GND500d                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17240} G2N5044 +PERO9              =  0.800G1N502x + 0.200GND500d                                : ARR( 0.100E-10,     0., 0.0);
+{ 17241} G1H5043                     =       G3H5000                                               : ARR( 0.800E+11,  4559., 0.0);
+{ 17242} G1H5043                     =       GCH2O   +      GDD4000 +      GHO                     : ARR( 0.200E+15,  7140., 0.0);
+{ 17243} G1H5043                     =       GHD2000 +      G2D3001                                : ARR( 0.200E+15,  7118., 0.0);
+{ 17244} G2H400c +GNO                =       G1H400g +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 17245} G2H400c +GNO                =       GHN400H                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 17246} G2H400c +GHO2               =       GHH400Z                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 17247} G2H400c +GNO3               =       G1H400g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17248} G2H400c +MEPERO             =  0.480G1H400g + 0.260GHN400A + 0.260GHN400G                 : ARR( 0.146E-12,  -445., 0.0);
+{ 17249} G2H400c +PERO1              =  0.600G1H400g + 0.200GHN400A + 0.200GHN400G                 : ARR( 0.112E-12,  -500., 0.0);
+{ 17250} G2H400c +PERO2              =  0.560G1H400g + 0.220GHN400A + 0.220GHN400G                 : ARR( 0.418E-13, -1000., 0.0);
+{ 17251} G2H400c +PERO3              =  0.600G1H400g + 0.200GHN400A + 0.200GHN400G                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17252} G2H400c +PERO5              =  0.600G1H400g + 0.200GHN400A + 0.200GHN400G                 : ARR( 0.473E-11,   850., 0.0);
+{ 17253} G2H400c +PERO6              =  0.460G1H400g + 0.270GHN400A + 0.270GHN400G                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17254} G2H400c +PERO9              =  0.800G1H400g + 0.200GHN400G                                : ARR( 0.100E-10,     0., 0.0);
+{ 17255} G1H400g                     =       GND4006 +      GHO                                    : ARR( 0.160E+12,  2905., 0.0);
+{ 17256} GHN502C +GHO                =       GNN501t +      GHO                                    : ARR( 0.999E-11,     0., 0.0);
+{ 17257} GHN502C +GHO                =       G2N502F                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17258} GHN502C+HV               =       G1H5044 +      GNO2                                   :  0.100E+01*SUN;
+{ 17259} GHN502C+HV               =       G1H500z +      GNO2                                   :  0.100E+01*SUN;
+{ 17260} GHN502C+HV               =       G3N4006 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17261} GHN502C+HV               =       GDD2000 +      GHK3000 + 2.000GNO2                    :  0.100E+01*SUN;
+{ 17262} GHN502C+HV               =       G1N502Q +      GHO                                    :  0.100E+01*SUN;
+{ 17263} G1H5044 +OXYGEN             =       GHN5048 +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 17264} G1H5044                     =       GHD4004 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{ 17265} GHH500d +GHO                =       GHN502D +      GHO                                    : ARR( 0.267E-10,     0., 0.0);
+{ 17266} GHH500d +GHO                =       GHN502k +      GHO                                    : ARR( 0.100E-10,     0., 0.0);
+{ 17267} GHH500d +GHO                =       G2H500g                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17268} GHH500d +GHO                =       G2H5021                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17269} GHH500d+HV               =       G1H5045 +      GNO2                                   :  0.100E+01*SUN;
+{ 17270} GHH500d+HV               =       G1H500z +      GHO                                    :  0.100E+01*SUN;
+{ 17271} GHH500d+HV               =       G3H4002 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17272} GHH500d+HV               =       GDD2000 +      GHK3000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{ 17273} GHH500d+HV               =       G1H503m +      GHO                                    :  0.100E+01*SUN;
+{ 17274} G2H5021 +GNO                =       G1H503m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17275} G2H5021 +GNO                =       GHN5022                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17276} G2H5021 +GHO2               =       GHH500d                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17277} G2H5021 +GNO3               =       G1H503m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17278} G2H5021 +MEPERO             =  0.480G1H503m + 0.260GHN500x + 0.260GHN502k                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17279} G2H5021 +PERO1              =  0.600G1H503m + 0.200GHN500x + 0.200GHN502k                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17280} G2H5021 +PERO2              =  0.560G1H503m + 0.220GHN500x + 0.220GHN502k                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17281} G2H5021 +PERO3              =  0.600G1H503m + 0.200GHN500x + 0.200GHN502k                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17282} G2H5021 +PERO5              =  0.600G1H503m + 0.200GHN500x + 0.200GHN502k                 : ARR( 0.533E-11,   500., 0.0);
+{ 17283} G2H5021 +PERO6              =  0.460G1H503m + 0.270GHN500x + 0.270GHN502k                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17284} G2H5021 +PERO9              =  0.800G1H503m + 0.200GHN502k                                : ARR( 0.100E-10,     0., 0.0);
+{ 17285} G1H5045 +OXYGEN             =       GHH501X +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 17286} G1H5045                     =       GHD4004 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5636., 0.0);
+{ 17287} GHN502D +GHO                =       GND500g +      GHO                                    : ARR( 0.102E-10,     0., 0.0);
+{ 17288} GHN502D +GHO                =       G2N502I                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 17289} GHN502D+HV               =       G1H5046 +      GNO2                                   :  0.100E+01*SUN;
+{ 17290} GHN502D+HV               =       G3N2000 +      G2H3002                                :  0.100E+01*SUN;
+{ 17291} GHN502D+HV               =       G3N4007 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17292} GHN502D+HV               =       G1N502T +      GHO                                    :  0.100E+01*SUN;
+{ 17293} G1H5046                     =       G3H4007 +      GCH2O                                  : ARR( 0.200E+15,  3552., 0.0);
+{ 17294} GHN502E +GHO                =       GNN501u +      GHO                                    : ARR( 0.993E-11,     0., 0.0);
+{ 17295} GHN502E +GHO                =       G2N502A                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 17296} GHN502E+HV               =       G1H5047 +      GNO2                                   :  0.100E+01*SUN;
+{ 17297} GHN502E+HV               =       G1H5011 +      GNO2                                   :  0.100E+01*SUN;
+{ 17298} GHN502E+HV               =       G3N4005 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17299} GHN502E+HV               =       G2D2000 +      GHN3008 +      GNO2                    :  0.100E+01*SUN;
+{ 17300} GHN502E+HV               =       G1N502L +      GHO                                    :  0.100E+01*SUN;
+{ 17301} G1H5047 +OXYGEN             =       GHN5047 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17302} GHH500e +GHO                =       GHN502G +      GHO                                    : ARR( 0.257E-10,     0., 0.0);
+{ 17303} GHH500e +GHO                =       GHN502l +      GHO                                    : ARR( 0.100E-10,     0., 0.0);
+{ 17304} GHH500e +GHO                =       G2H500h                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17305} GHH500e +GHO                =       G2H5022                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17306} GHH500e+HV               =       G1H5048 +      GNO2                                   :  0.100E+01*SUN;
+{ 17307} GHH500e+HV               =       G1H5011 +      GHO                                    :  0.100E+01*SUN;
+{ 17308} GHH500e+HV               =       G3H400D +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17309} GHH500e+HV               =       G1H503p +      GHO                                    :  0.100E+01*SUN;
+{ 17310} G2H5022 +GNO                =       G1H503p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17311} G2H5022 +GNO                =       GHN5023                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17312} G2H5022 +GHO2               =       GHH500e                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17313} G2H5022 +GNO3               =       G1H503p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17314} G2H5022 +MEPERO             =  0.480G1H503p + 0.260GHN502K + 0.260GHN502l                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17315} G2H5022 +PERO1              =  0.600G1H503p + 0.200GHN502K + 0.200GHN502l                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17316} G2H5022 +PERO2              =  0.560G1H503p + 0.220GHN502K + 0.220GHN502l                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17317} G2H5022 +PERO3              =  0.600G1H503p + 0.200GHN502K + 0.200GHN502l                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17318} G2H5022 +PERO5              =  0.600G1H503p + 0.200GHN502K + 0.200GHN502l                 : ARR( 0.533E-11,   500., 0.0);
+{ 17319} G2H5022 +PERO6              =  0.460G1H503p + 0.270GHN502K + 0.270GHN502l                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17320} G2H5022 +PERO9              =  0.800G1H503p + 0.200GHN502l                                : ARR( 0.100E-10,     0., 0.0);
+{ 17321} G1H5048 +OXYGEN             =       GHH501W +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17322} GHN502F +GHO                =       GHN502G +      GHO2                                   : ARR( 0.663E-11,     0., 0.0);
+{ 17323} GHN502F +GHO                =       GND500h +      GHO                                    : ARR( 0.103E-10,     0., 0.0);
+{ 17324} GHN502F +GHO                =       G2N5045                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 17325} GHN502F+HV               =       G1H5049 +      GNO2                                   :  0.100E+01*SUN;
+{ 17326} GHN502F+HV               =       G3N400G +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 17327} GHN502F+HV               =       G1N504M +      GHO                                    :  0.100E+01*SUN;
+{ 17328} G2N5045 +GNO                =       G1N504M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17329} G2N5045 +GNO                =       GNN501K                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17330} G2N5045 +GHO2               =       GHN502F                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17331} G2N5045 +GNO3               =       G1N504M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17332} G2N5045 +MEPERO             =  0.480G1N504M + 0.260GNK500m + 0.260GND500h                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17333} G2N5045 +PERO1              =  0.600G1N504M + 0.200GNK500m + 0.200GND500h                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17334} G2N5045 +PERO2              =  0.560G1N504M + 0.220GNK500m + 0.220GND500h                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17335} G2N5045 +PERO3              =  0.600G1N504M + 0.200GNK500m + 0.200GND500h                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17336} G2N5045 +PERO5              =  0.600G1N504M + 0.200GNK500m + 0.200GND500h                 : ARR( 0.533E-11,   500., 0.0);
+{ 17337} G2N5045 +PERO6              =  0.460G1N504M + 0.270GNK500m + 0.270GND500h                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17338} G2N5045 +PERO9              =  0.800G1N504M + 0.200GND500h                                : ARR( 0.100E-10,     0., 0.0);
+{ 17339} G1H5049 +OXYGEN             =       GHD500p +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17340} GHN502G +GHO                =       GND500i +      GHO                                    : ARR( 0.100E-10,     0., 0.0);
+{ 17341} GHN502G +GHO                =       G2N502D                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 17342} GHN502G+HV               =       G1H504A +      GNO2                                   :  0.100E+01*SUN;
+{ 17343} GHN502G+HV               =       G3N3000 +      G3H2000                                :  0.100E+01*SUN;
+{ 17344} GHN502G+HV               =       G1N502O +      GHO                                    :  0.100E+01*SUN;
+{ 17345} G1H504A +OXYGEN             =       GHD500q +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 17346} GHN502H +GHO                =       GHN505B +      GHO2                                   : ARR( 0.850E-12,     0., 0.0);
+{ 17347} GHN502H +GHO                =       GNN501T +      GHO                                    : ARR( 0.340E-11,     0., 0.0);
+{ 17348} GHN502H +GHO                =       G2N5046                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 17349} GHN502H+HV               =       G1H5012 +      GNO2                                   :  0.100E+01*SUN;
+{ 17350} GHN502H+HV               =       G1H501X +      GNO2                                   :  0.100E+01*SUN;
+{ 17351} GHN502H+HV               =       G1N5037 +      GHO                                    :  0.100E+01*SUN;
+{ 17352} G2N5046 +GNO                =       G1N5037 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17353} G2N5046 +GNO                =       GNN500j                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17354} G2N5046 +GHO2               =       GHN502H                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17355} G2N5046 +GNO3               =       G1N5037 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17356} G2N5046 +MEPERO             =  0.480G1N5037 + 0.260GNN500m + 0.260GNN501T                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17357} G2N5046 +PERO1              =  0.600G1N5037 + 0.200GNN500m + 0.200GNN501T                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17358} G2N5046 +PERO2              =  0.560G1N5037 + 0.220GNN500m + 0.220GNN501T                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17359} G2N5046 +PERO3              =  0.600G1N5037 + 0.200GNN500m + 0.200GNN501T                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17360} G2N5046 +PERO5              =  0.600G1N5037 + 0.200GNN500m + 0.200GNN501T                 : ARR( 0.533E-11,   500., 0.0);
+{ 17361} G2N5046 +PERO6              =  0.460G1N5037 + 0.270GNN500m + 0.270GNN501T                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17362} G2N5046 +PERO9              =  0.800G1N5037 + 0.200GNN501T                                : ARR( 0.100E-10,     0., 0.0);
+{ 17363} GHH500f +GHO                =       GHH501w +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 17364} GHH500f +GHO                =       GHN502I +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 17365} GHH500f +GHO                =       GHN502S +      GHO                                    : ARR( 0.325E-11,     0., 0.0);
+{ 17366} GHH500f +GHO                =       G2H500i                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 17367} GHH500f +GHO                =       G2H5023                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 17368} GHH500f+HV               =       G1H5012 +      GHO                                    :  0.100E+01*SUN;
+{ 17369} GHH500f+HV               =       G1H504B +      GNO2                                   :  0.100E+01*SUN;
+{ 17370} GHH500f+HV               =       G1H501v +      GHO                                    :  0.100E+01*SUN;
+{ 17371} G2H5023 +GNO                =       G1H501v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17372} G2H5023 +GNO                =       GHN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17373} G2H5023 +GHO2               =       GHH500f                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17374} G2H5023 +GNO3               =       G1H501v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17375} G2H5023 +MEPERO             =  0.480G1H501v + 0.260GHN500t + 0.260GHN502S                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17376} G2H5023 +PERO1              =  0.600G1H501v + 0.200GHN500t + 0.200GHN502S                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17377} G2H5023 +PERO2              =  0.560G1H501v + 0.220GHN500t + 0.220GHN502S                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17378} G2H5023 +PERO3              =  0.600G1H501v + 0.200GHN500t + 0.200GHN502S                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17379} G2H5023 +PERO5              =  0.600G1H501v + 0.200GHN500t + 0.200GHN502S                 : ARR( 0.533E-11,   500., 0.0);
+{ 17380} G2H5023 +PERO6              =  0.460G1H501v + 0.270GHN500t + 0.270GHN502S                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17381} G2H5023 +PERO9              =  0.800G1H501v + 0.200GHN502S                                : ARR( 0.100E-10,     0., 0.0);
+{ 17382} G1H504B                     =       GHH501O +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 17383} GHN502I +GHO                =       GHN505C +      GHO2                                   : ARR( 0.263E-11,     0., 0.0);
+{ 17384} GHN502I +GHO                =       GND500e +      GHO                                    : ARR( 0.345E-11,     0., 0.0);
+{ 17385} GHN502I +GHO                =       G2N5047                                               : ARR( 0.204E-11,  -190., 0.0);
+{ 17386} GHN502I+HV               =       G3K2001 +      G2H3008                                :  0.100E+01*SUN;
+{ 17387} GHN502I+HV               =       GKO3000 +      GDD2000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{ 17388} GHN502I+HV               =       G1H502j +      GNO2                                   :  0.100E+01*SUN;
+{ 17389} GHN502I+HV               =       G1N5039 +      GHO                                    :  0.100E+01*SUN;
+{ 17390} G2N5047 +GNO                =       G1N5039 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17391} G2N5047 +GNO                =       GNN500l                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17392} G2N5047 +GHO2               =       GHN502I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17393} G2N5047 +GNO3               =       G1N5039 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17394} G2N5047 +MEPERO             =  0.480G1N5039 + 0.260GNK500N + 0.260GND500e                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17395} G2N5047 +PERO1              =  0.600G1N5039 + 0.200GNK500N + 0.200GND500e                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17396} G2N5047 +PERO2              =  0.560G1N5039 + 0.220GNK500N + 0.220GND500e                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17397} G2N5047 +PERO3              =  0.600G1N5039 + 0.200GNK500N + 0.200GND500e                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17398} G2N5047 +PERO5              =  0.600G1N5039 + 0.200GNK500N + 0.200GND500e                 : ARR( 0.533E-11,   500., 0.0);
+{ 17399} G2N5047 +PERO6              =  0.460G1N5039 + 0.270GNK500N + 0.270GND500e                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17400} G2N5047 +PERO9              =  0.800G1N5039 + 0.200GND500e                                : ARR( 0.100E-10,     0., 0.0);
+{ 17401} GHN400G +GHO                =       GND400D +      GHO                                    : ARR( 0.328E-11,     0., 0.0);
+{ 17402} GHN400G +GHO                =       G3H400E                                               : ARR( 0.212E-10,     0., 0.0);
+{ 17403} GHN400G +GHO                =       G2N400i                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17404} GHN400G +GNO3               =       G3H400E +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17405} GHN400G+HV               =       G1N400I +      GHO                                    :  0.100E+01*SUN;
+{ 17406} GHN400G+HV               =       G1H400G +      GNO2                                   :  0.100E+01*SUN;
+{ 17407} GHN400G+HV               =       G2H3008 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17408} GHN400G+HV               =       GDD2000 +      GD02000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{ 17409} G3H400E +GHO2               =  0.800GGH400I + 0.200GAH400L + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17410} G3H400E +GNO                =       G2H3008 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17411} G3H400E +GNO2               =       GPH400C                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17412} G3H400E +GNO3               =       G2H3008 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17413} G3H400E +MEPERO             =  0.685G2H3008 + 0.315GAH400L + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17414} G3H400E +PERO1              =  0.800G2H3008 + 0.200GAH400L + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17415} G3H400E +PERO2              =  0.750G2H3008 + 0.250GAH400L + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17416} G3H400E +PERO3              =  0.800G2H3008 + 0.200GAH400L + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17417} G3H400E +PERO5              =  0.650G2H3008 + 0.350GAH400L + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17418} G3H400E +PERO6              =  0.650G2H3008 + 0.350GAH400L + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17419} G3H400E +PERO9              =       G2H3008 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17420} G2N400i +GNO                =       G1N400I +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 17421} G2N400i +GNO                =       GNN4001                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 17422} G2N400i +GHO2               =       GHN400G                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 17423} G2N400i +GNO3               =       G1N400I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17424} G2N400i +MEPERO             =  0.480G1N400I + 0.260GND4002 + 0.260GND400D                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17425} G2N400i +PERO1              =  0.600G1N400I + 0.200GND4002 + 0.200GND400D                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17426} G2N400i +PERO2              =  0.560G1N400I + 0.220GND4002 + 0.220GND400D                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17427} G2N400i +PERO3              =  0.600G1N400I + 0.200GND4002 + 0.200GND400D                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17428} G2N400i +PERO5              =  0.600G1N400I + 0.200GND4002 + 0.200GND400D                 : ARR( 0.533E-11,   500., 0.0);
+{ 17429} G2N400i +PERO6              =  0.460G1N400I + 0.270GND4002 + 0.270GND400D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17430} G2N400i +PERO9              =  0.800G1N400I + 0.200GND400D                                : ARR( 0.100E-10,     0., 0.0);
+{ 17431} GHH500g +GHO                =       GHD500R +      GHO                                    : ARR( 0.187E-10,     0., 0.0);
+{ 17432} GHH500g +GHO                =       GHD500A +      GHO                                    : ARR( 0.478E-10,     0., 0.0);
+{ 17433} GHH500g +GHO                =       G3H500Z                                               : ARR( 0.241E-10,     0., 0.0);
+{ 17434} GHH500g +GNO3               =       G3H500Z +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17435} GHH500g+HV               =       G1H501w +      GHO                                    :  0.100E+01*SUN;
+{ 17436} GHH500g+HV               =       G1H5043 +      GHO                                    :  0.100E+01*SUN;
+{ 17437} GHH500g+HV               =       G2H400d +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17438} GHH500g+HV               =       G2H3002 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{ 17439} G3H500Z +GHO2               =  0.800GGH500l + 0.200GAH500p + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17440} G3H500Z +GNO                =       G2H400d +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17441} G3H500Z +GNO2               =       GPH500r                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17442} G3H500Z +GNO3               =       G2H400d +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17443} G3H500Z +MEPERO             =  0.685G2H400d + 0.315GAH500p + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17444} G3H500Z +PERO1              =  0.800G2H400d + 0.200GAH500p + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17445} G3H500Z +PERO2              =  0.750G2H400d + 0.250GAH500p + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17446} G3H500Z +PERO3              =  0.800G2H400d + 0.200GAH500p + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17447} G3H500Z +PERO5              =  0.650G2H400d + 0.350GAH500p + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17448} G3H500Z +PERO6              =  0.650G2H400d + 0.350GAH500p + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17449} G3H500Z +PERO9              =       G2H400d +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17450} G2H400d +GNO                =       G1H400h +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 17451} G2H400d +GNO                =       GHH4007                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 17452} G2H400d +GHO2               =       GHH400c                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 17453} G2H400d +GNO3               =       G1H400h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17454} G2H400d +MEPERO             =  0.480G1H400h + 0.260GHH4004 + 0.260GHH400B                 : ARR( 0.146E-12,  -445., 0.0);
+{ 17455} G2H400d +PERO1              =  0.600G1H400h + 0.200GHH4004 + 0.200GHH400B                 : ARR( 0.112E-12,  -500., 0.0);
+{ 17456} G2H400d +PERO2              =  0.560G1H400h + 0.220GHH4004 + 0.220GHH400B                 : ARR( 0.418E-13, -1000., 0.0);
+{ 17457} G2H400d +PERO3              =  0.600G1H400h + 0.200GHH4004 + 0.200GHH400B                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17458} G2H400d +PERO5              =  0.600G1H400h + 0.200GHH4004 + 0.200GHH400B                 : ARR( 0.473E-11,   850., 0.0);
+{ 17459} G2H400d +PERO6              =  0.460G1H400h + 0.270GHH4004 + 0.270GHH400B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17460} G2H400d +PERO9              =  0.800G1H400h + 0.200GHH400B                                : ARR( 0.100E-10,     0., 0.0);
+{ 17461} G1H400h                     =       GHD4006 +      GHO                                    : ARR( 0.160E+12,  2186., 0.0);
+{ 17462} GNN501N +GHO                =       GNN501U +      GHO2                                   : ARR( 0.879E-12,     0., 0.0);
+{ 17463} GNN501N +GHO                =       G2N501u                                               : ARR( 0.618E-13,     0., 0.0);
+{ 17464} GNN501N +GHO                =       G1N501x                                               : ARR( 0.230E-17,    85., 2.0);
+{ 17465} GNN501N+HV               =       G1N501q +      GNO2                                   :  0.100E+01*SUN;
+{ 17466} GNN501N+HV               =       G1N501m +      GNO2                                   :  0.100E+01*SUN;
+{ 17467} GNN501N+HV               =       G1N503Q +      GNO2                                   :  0.100E+01*SUN;
+{ 17468} GHN502J +GHO                =       GHN504k +      GHO2                                   : ARR( 0.842E-12,     0., 0.0);
+{ 17469} GHN502J +GHO                =       GNN501P +      GHO                                    : ARR( 0.862E-11,     0., 0.0);
+{ 17470} GHN502J +GHO                =       G2N501j                                               : ARR( 0.199E-11,  -190., 0.0);
+{ 17471} GHN502J+HV               =       G1H504C +      GNO2                                   :  0.100E+01*SUN;
+{ 17472} GHN502J+HV               =       G1N501m +      GHO                                    :  0.100E+01*SUN;
+{ 17473} GHN502J+HV               =       G1H504D +      GNO2                                   :  0.100E+01*SUN;
+{ 17474} G1H504C                     =       GCH2O   +      GHN400J +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 17475} G1H504C                     =       GDO2000 +      GND3000 +      GHO                     : ARR( 0.200E+15,  5200., 0.0);
+{ 17476} G1H504D +OXYGEN             =       GHN505D +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17477} G1H504D                     =       GHK500J +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{ 17478} GNN501O +GHO                =       GNN502k +      GHO2                                   : ARR( 0.918E-12,     0., 0.0);
+{ 17479} GNN501O +GHO                =       GNN501P +      GHO2                                   : ARR( 0.235E-11,     0., 0.0);
+{ 17480} GNN501O +GHO                =       G2N503j                                               : ARR( 0.323E-12,     0., 0.0);
+{ 17481} GNN501O+HV               =       G1N501s +      GNO2                                   :  0.100E+01*SUN;
+{ 17482} GNN501O+HV               =       G1N504U +      GNO2                                   :  0.100E+01*SUN;
+{ 17483} G1N504U +OXYGEN             =       GND501B +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17484} G1N504U                     =       GKO500F +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{ 17485} GNN501P +GHO                =       GNN501h +      GHO2                                   : ARR( 0.804E-12,     0., 0.0);
+{ 17486} GNN501P +GHO                =       GNK500n +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{ 17487} GNN501P +GHO                =       G2N5048                                               : ARR( 0.172E-12,     0., 0.0);
+{ 17488} GNN501P +GHO                =       GND500x +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{ 17489} GNN501P +GHO                =       G1N5024                                               : ARR( 0.210E-17,    85., 2.0);
+{ 17490} GNN501P+HV               =       G1N501t +      GNO2                                   :  0.100E+01*SUN;
+{ 17491} GNN501P+HV               =       G3N3004 +      G2N2000                                :  0.100E+01*SUN;
+{ 17492} GNN501P+HV               =       G1N503T +      GNO2                                   :  0.100E+01*SUN;
+{ 17493} G2N5048 +GNO                =       G1N504W +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17494} G2N5048 +GNO                =       GNN502s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17495} G2N5048 +GHO2               =       GHN505E                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17496} G2N5048 +GNO3               =       G1N504W +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17497} G2N5048 +MEPERO             =  0.340G1N504W + 0.330GNN501q + 0.330GNN501s                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17498} G2N5048 +PERO1              =  0.460G1N504W + 0.270GNN501q + 0.270GNN501s                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17499} G2N5048 +PERO2              =  0.400G1N504W + 0.300GNN501q + 0.300GNN501s                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17500} G2N5048 +PERO3              =  0.460G1N504W + 0.270GNN501q + 0.270GNN501s                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17501} G2N5048 +PERO5              =  0.460G1N504W + 0.270GNN501q + 0.270GNN501s                 : ARR( 0.183E-11,   450., 0.0);
+{ 17502} G2N5048 +PERO6              =  0.300G1N504W + 0.350GNN501q + 0.350GNN501s                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17503} G2N5048 +PERO9              =  0.650G1N504W + 0.350GNN501s                                : ARR( 0.100E-10,     0., 0.0);
+{ 17504} G1N504W                     =       G3N3004 +      GND2000                                : ARR( 0.200E+15,  3067., 0.0);
+{ 17505} GNN501Q +GHO                =       GNN501u +      GHO2                                   : ARR( 0.262E-11,     0., 0.0);
+{ 17506} GNN501Q +GHO                =       G1N502L                                               : ARR( 0.224E-17,    85., 2.0);
+{ 17507} GNN501Q+HV               =       G3K2001 +      GND3000 +      GNO2                    :  0.100E+01*SUN;
+{ 17508} GNN501Q+HV               =       GNK3001 +      G2D2000 +      GNO2                    :  0.100E+01*SUN;
+{ 17509} GNN501Q+HV               =       G1N501n +      GNO2                                   :  0.100E+01*SUN;
+{ 17510} GNN501Q+HV               =       G1N503R +      GNO2                                   :  0.100E+01*SUN;
+{ 17511} GHN502K +GHO                =       GHN502l +      GHO2                                   : ARR( 0.254E-11,     0., 0.0);
+{ 17512} GHN502K +GHO                =       GNK500n +      GHO                                    : ARR( 0.260E-10,     0., 0.0);
+{ 17513} GHN502K +GHO                =       G2N501k                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 17514} GHN502K+HV               =       G3K2001 +      GND3000 +      GHO                     :  0.100E+01*SUN;
+{ 17515} GHN502K+HV               =       G1N501n +      GHO                                    :  0.100E+01*SUN;
+{ 17516} GHN502K+HV               =       G1H504E +      GNO2                                   :  0.100E+01*SUN;
+{ 17517} G1H504E +OXYGEN             =       GHD500t +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17518} GNK500m +GHO                =       GND500h +      GHO2                                   : ARR( 0.253E-11,     0., 0.0);
+{ 17519} GNK500m +GHO                =       GNK500n +      GHO2                                   : ARR( 0.650E-11,     0., 0.0);
+{ 17520} GNK500m +GHO                =       G2N5049                                               : ARR( 0.926E-12,     0., 0.0);
+{ 17521} GNK500m+HV               =       G3K2001 +      GND3000 +      GHO2                    :  0.100E+01*SUN;
+{ 17522} GNK500m+HV               =       G1K500t +      GNO2                                   :  0.100E+01*SUN;
+{ 17523} G2N5049 +GNO                =       G1N504X +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17524} G2N5049 +GNO                =       GNN502O                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17525} G2N5049 +GHO2               =       GHN503h                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17526} G2N5049 +GNO3               =       G1N504X +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17527} G2N5049 +MEPERO             =  0.340G1N504X + 0.330GNK500t + 0.330GNK500y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17528} G2N5049 +PERO1              =  0.460G1N504X + 0.270GNK500t + 0.270GNK500y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17529} G2N5049 +PERO2              =  0.400G1N504X + 0.300GNK500t + 0.300GNK500y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17530} G2N5049 +PERO3              =  0.460G1N504X + 0.270GNK500t + 0.270GNK500y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17531} G2N5049 +PERO5              =  0.460G1N504X + 0.270GNK500t + 0.270GNK500y                 : ARR( 0.183E-11,   450., 0.0);
+{ 17532} G2N5049 +PERO6              =  0.300G1N504X + 0.350GNK500t + 0.350GNK500y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17533} G2N5049 +PERO9              =  0.650G1N504X + 0.350GNK500y                                : ARR( 0.100E-10,     0., 0.0);
+{ 17534} G1K500t +OXYGEN             =       GDK500Q +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17535} G1N504X                     =       GDK3001 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3765., 0.0);
+{ 17536} GNK500n +GHO                =       GND500i +      GHO2                                   : ARR( 0.258E-11,     0., 0.0);
+{ 17537} GNK500n +GHO                =       G2N504A                                               : ARR( 0.181E-12,     0., 0.0);
+{ 17538} GNK500n +GHO                =       GDK500P +      GNO2                                   : ARR( 0.153E-12,     0., 0.0);
+{ 17539} GNK500n+HV               =       G3K2001 +      G3N3000                                :  0.100E+01*SUN;
+{ 17540} GNK500n+HV               =       G1K500g +      GNO2                                   :  0.100E+01*SUN;
+{ 17541} G2N504A +GNO                =       G1N504Y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17542} G2N504A +GNO                =       GNN502P                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17543} G2N504A +GHO2               =       GHN505F                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17544} G2N504A +GNO3               =       G1N504Y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17545} G2N504A +MEPERO             =  0.340G1N504Y + 0.330GNK500u + 0.330GNK500z                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17546} G2N504A +PERO1              =  0.460G1N504Y + 0.270GNK500u + 0.270GNK500z                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17547} G2N504A +PERO2              =  0.400G1N504Y + 0.300GNK500u + 0.300GNK500z                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17548} G2N504A +PERO3              =  0.460G1N504Y + 0.270GNK500u + 0.270GNK500z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17549} G2N504A +PERO5              =  0.460G1N504Y + 0.270GNK500u + 0.270GNK500z                 : ARR( 0.183E-11,   450., 0.0);
+{ 17550} G2N504A +PERO6              =  0.300G1N504Y + 0.350GNK500u + 0.350GNK500z                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17551} G2N504A +PERO9              =  0.650G1N504Y + 0.350GNK500z                                : ARR( 0.100E-10,     0., 0.0);
+{ 17552} G1N504Y                     =       G3K2001 +      GND2000 +      GCO                     : ARR( 0.200E+15,  3324., 0.0);
+{ 17553} GHN502L +GHO                =       GHN504t +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{ 17554} GHN502L +GHO                =       GNN501Q +      GHO                                    : ARR( 0.843E-11,     0., 0.0);
+{ 17555} GHN502L +GHO                =       G2N501m                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17556} GHN502L+HV               =       G1N501q +      GHO                                    :  0.100E+01*SUN;
+{ 17557} GHN502L+HV               =       G1H504F +      GNO2                                   :  0.100E+01*SUN;
+{ 17558} GHN502L+HV               =       G1H504G +      GNO2                                   :  0.100E+01*SUN;
+{ 17559} G1H504F                     =       GDO2000 +      GND3000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{ 17560} G1H504G                     =       GNK500U +      GHO                                    : ARR( 0.800E+11,  2398., 0.0);
+{ 17561} GND500W +GHO                =       GND500X +      GHO2                                   : ARR( 0.418E-11,     0., 0.0);
+{ 17562} GND500W +GHO                =       G3N500b                                               : ARR( 0.216E-10,     0., 0.0);
+{ 17563} GND500W +GNO3               =       G3N500b +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17564} GND500W+HV               =       G1D500j +      GNO2                                   :  0.100E+01*SUN;
+{ 17565} GND500W+HV               =       G2N4008 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17566} GND500W+HV               =       G2D3004 +      GD02000 +      GNO2                    :  0.100E+01*SUN;
+{ 17567} G3N500b +GHO2               =  0.800GGN500l + 0.200GAN500P + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17568} G3N500b +GNO                =       G2N4008 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17569} G3N500b +GNO2               =       GPN500P                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17570} G3N500b +GNO3               =       G2N4008 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17571} G3N500b +MEPERO             =  0.685G2N4008 + 0.315GAN500P + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17572} G3N500b +PERO1              =  0.800G2N4008 + 0.200GAN500P + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17573} G3N500b +PERO2              =  0.750G2N4008 + 0.250GAN500P + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17574} G3N500b +PERO3              =  0.800G2N4008 + 0.200GAN500P + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17575} G3N500b +PERO5              =  0.650G2N4008 + 0.350GAN500P + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17576} G3N500b +PERO6              =  0.650G2N4008 + 0.350GAN500P + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17577} G3N500b +PERO9              =       G2N4008 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17578} G1D500j                     =       G2O2000 +      GDD3000                                : ARR( 0.200E+15,  6436., 0.0);
+{ 17579} G1D500j                     =       GDO3000 +      G2D2000                                : ARR( 0.200E+15,  6974., 0.0);
+{ 17580} GNN501R +GHO                =       GNN502S +      GHO2                                   : ARR( 0.428E-11,     0., 0.0);
+{ 17581} GNN501R +GHO                =       G2N502S                                               : ARR( 0.301E-12,     0., 0.0);
+{ 17582} GNN501R +GHO                =       GNN501S +      GHO2                                   : ARR( 0.856E-12,     0., 0.0);
+{ 17583} GNN501R+HV               =       G1N504Z +      GNO2                                   :  0.100E+01*SUN;
+{ 17584} GNN501R+HV               =       G1N501r +      GNO2                                   :  0.100E+01*SUN;
+{ 17585} G1N504Z                     =       GDO2000 +      GDO3000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{ 17586} G1N504Z                     =       GND3004 +      G2O2000                                : ARR( 0.200E+15,  7074., 0.0);
+{ 17587} GHN502M +GHO                =       GHN505G +      GHO2                                   : ARR( 0.416E-11,     0., 0.0);
+{ 17588} GHN502M +GHO                =       GNK500U +      GHO                                    : ARR( 0.852E-11,     0., 0.0);
+{ 17589} GHN502M +GHO                =       GHN502Q +      GHO2                                   : ARR( 0.416E-11,     0., 0.0);
+{ 17590} GHN502M +GHO                =       G2N501n                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 17591} GHN502M+HV               =       G1H504H +      GNO2                                   :  0.100E+01*SUN;
+{ 17592} GHN502M+HV               =       G1N501r +      GHO                                    :  0.100E+01*SUN;
+{ 17593} G1H504H                     =       GDO2000 +      GDO3000 +      GHO                     : ARR( 0.200E+15,  4529., 0.0);
+{ 17594} GHN502N +GHO                =       GNK500o +      GHO                                    : ARR( 0.882E-11,     0., 0.0);
+{ 17595} GHN502N +GHO                =       G2H501q                                               : ARR( 0.151E-11,     0., 0.0);
+{ 17596} GHN502N +GHO                =       GHN505D +      GHO2                                   : ARR( 0.430E-11,     0., 0.0);
+{ 17597} GHN502N +GHO                =       G2N504B                                               : ARR( 0.203E-11,  -190., 0.0);
+{ 17598} GHN502N+HV               =       G1H5015 +      GNO2                                   :  0.100E+01*SUN;
+{ 17599} GHN502N+HV               =       G1N504Z +      GHO                                    :  0.100E+01*SUN;
+{ 17600} G2N504B +GNO                =       G1N504Z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17601} G2N504B +GNO                =       GNN501R                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17602} G2N504B +GHO2               =       GHN502N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17603} G2N504B +GNO3               =       G1N504Z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17604} G2N504B +MEPERO             =  0.340G1N504Z + 0.330GNO500Z + 0.330GNK500o                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17605} G2N504B +PERO1              =  0.460G1N504Z + 0.270GNO500Z + 0.270GNK500o                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17606} G2N504B +PERO2              =  0.400G1N504Z + 0.300GNO500Z + 0.300GNK500o                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17607} G2N504B +PERO3              =  0.460G1N504Z + 0.270GNO500Z + 0.270GNK500o                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17608} G2N504B +PERO5              =  0.460G1N504Z + 0.270GNO500Z + 0.270GNK500o                 : ARR( 0.183E-11,   450., 0.0);
+{ 17609} G2N504B +PERO6              =  0.300G1N504Z + 0.350GNO500Z + 0.350GNK500o                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17610} G2N504B +PERO9              =  0.650G1N504Z + 0.350GNK500o                                : ARR( 0.100E-10,     0., 0.0);
+{ 17611} GHH500h +GHO                =       GHK500d +      GHO                                    : ARR( 0.497E-10,     0., 0.0);
+{ 17612} GHH500h +GHO                =       GHK500J +      GHO                                    : ARR( 0.497E-10,     0., 0.0);
+{ 17613} GHH500h+HV               =       G1H504H +      GHO                                    :  0.100E+01*SUN;
+{ 17614} GHH500h+HV               =       G1H5015 +      GHO                                    :  0.100E+01*SUN;
+{ 17615} GHN502O +GHO                =       GHN504u +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 17616} GHN502O +GHO                =       GNK500m +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 17617} GHN502O +GHO                =       GHN502P +      GHO2                                   : ARR( 0.104E-10,     0., 0.0);
+{ 17618} GHN502O +GHO                =       G2N501o                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 17619} GHN502O+HV               =       G1N501s +      GHO                                    :  0.100E+01*SUN;
+{ 17620} GHN502O+HV               =       G1H504I +      GNO2                                   :  0.100E+01*SUN;
+{ 17621} G1H504I                     =       GKO500F +      GHO                                    : ARR( 0.800E+11,  1678., 0.0);
+{ 17622} GNO500Z +GHO                =       GND501B +      GHO2                                   : ARR( 0.428E-11,     0., 0.0);
+{ 17623} GNO500Z +GHO                =       G2N503v                                               : ARR( 0.150E-11,     0., 0.0);
+{ 17624} GNO500Z +GHO                =       GNK500o +      GHO2                                   : ARR( 0.219E-11,     0., 0.0);
+{ 17625} GNO500Z +GHO                =       GND500b +      GHO2                                   : ARR( 0.856E-12,     0., 0.0);
+{ 17626} GNO500Z+HV               =       G1O500T +      GNO2                                   :  0.100E+01*SUN;
+{ 17627} GHO500R +GHO                =       GHD5011 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 17628} GHO500R +GHO                =       GHK500d +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 17629} GHO500R +GHO                =       GKO500F +      GHO                                    : ARR( 0.424E-10,     0., 0.0);
+{ 17630} GHO500R +GHO                =       GHD500P +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 17631} GHO500R +GHO                =       G2O500Q                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 17632} GHO500R+HV               =       G1O500T +      GHO                                    :  0.100E+01*SUN;
+{ 17633} GHN502P +GHO                =       GHN504s +      GHO2                                   : ARR( 0.129E-10,     0., 0.0);
+{ 17634} GHN502P +GHO                =       GNK500n +      GHO                                    : ARR( 0.254E-10,     0., 0.0);
+{ 17635} GHN502P +GHO                =       G2N501p                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 17636} GHN502P+HV               =       G1N501t +      GHO                                    :  0.100E+01*SUN;
+{ 17637} GHN502P+HV               =       G3H3004 +      G2N2000                                :  0.100E+01*SUN;
+{ 17638} GHN502P+HV               =       G1H504J +      GNO2                                   :  0.100E+01*SUN;
+{ 17639} G1H504J +OXYGEN             =       GHD5012 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 17640} G1H504J                     =       GKK5006 +      GHO                                    : ARR( 0.800E+11,  3661., 0.0);
+{ 17641} GDK500I +GHO                =       GDD5003 +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 17642} GDK500I +GHO                =       G3K500Q                                               : ARR( 0.672E-10,     0., 0.0);
+{ 17643} GDK500I +GNO3               =       G3K500Q +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17644} GDK500I+HV               =       G3K3001 +      G2D2000                                :  0.100E+01*SUN;
+{ 17645} GDK500I+HV               =       G2K4007 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17646} G3K500Q +GHO2               =  0.800GGK500C + 0.200GAK500A + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17647} G3K500Q +GNO                =       G2K4007 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17648} G3K500Q +GNO2               =       GPK500C                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17649} G3K500Q +GNO3               =       G2K4007 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17650} G3K500Q +MEPERO             =  0.685G2K4007 + 0.315GAK500A + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17651} G3K500Q +PERO1              =  0.800G2K4007 + 0.200GAK500A + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17652} G3K500Q +PERO2              =  0.750G2K4007 + 0.250GAK500A + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17653} G3K500Q +PERO3              =  0.800G2K4007 + 0.200GAK500A + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17654} G3K500Q +PERO5              =  0.650G2K4007 + 0.350GAK500A + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17655} G3K500Q +PERO6              =  0.650G2K4007 + 0.350GAK500A + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17656} G3K500Q +PERO9              =       G2K4007 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17657} GNK500o +GHO                =       GND500x +      GHO2                                   : ARR( 0.131E-10,     0., 0.0);
+{ 17658} GNK500o +GHO                =       G2N5043                                               : ARR( 0.883E-12,     0., 0.0);
+{ 17659} GNK500o +GHO                =       GND500c +      GHO2                                   : ARR( 0.824E-12,     0., 0.0);
+{ 17660} GNK500o+HV               =       G3K3001 +      GDO2000 +      GNO2                    :  0.100E+01*SUN;
+{ 17661} GNK500o+HV               =       G1K500U +      GNO2                                   :  0.100E+01*SUN;
+{ 17662} GHK500d +GHO                =       GHD5012 +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 17663} GHK500d +GHO                =       GKK5006 +      GHO                                    : ARR( 0.257E-10,     0., 0.0);
+{ 17664} GHK500d +GHO                =       GHD500Q +      GHO2                                   : ARR( 0.130E-10,     0., 0.0);
+{ 17665} GHK500d +GHO                =       G2K500S                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 17666} GHK500d+HV               =       G3K3001 +      GDO2000 +      GHO                     :  0.100E+01*SUN;
+{ 17667} GHK500d+HV               =       G1K500U +      GHO                                    :  0.100E+01*SUN;
+{ 17668} GHD500L +GHO                =       GHD500R +      GHO2                                   : ARR( 0.428E-11,     0., 0.0);
+{ 17669} GHD500L +GHO                =       GDK5007 +      GHO                                    : ARR( 0.439E-10,     0., 0.0);
+{ 17670} GHD500L +GHO                =       G2H5024                                               : ARR( 0.477E-11,     0., 0.0);
+{ 17671} GHD500L +GHO                =       G3H500a                                               : ARR( 0.221E-10,     0., 0.0);
+{ 17672} GHD500L +GNO3               =       G3H500a +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17673} GHD500L+HV               =       G1D500X +      GHO                                    :  0.100E+01*SUN;
+{ 17674} GHD500L+HV               =       G2H4002 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17675} GHD500L+HV               =       G2K3001 +      GD02000 +      GHO                     :  0.100E+01*SUN;
+{ 17676} G2H5024 +GNO                =       G1H504K +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17677} G2H5024 +GNO                =       GHN505G                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17678} G2H5024 +GHO2               =       GHH501x                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17679} G2H5024 +GNO3               =       G1H504K +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17680} G2H5024 +MEPERO             =  0.340G1H504K + 0.330GHD5011 + 0.330GHD5012                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17681} G2H5024 +PERO1              =  0.460G1H504K + 0.270GHD5011 + 0.270GHD5012                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17682} G2H5024 +PERO2              =  0.400G1H504K + 0.300GHD5011 + 0.300GHD5012                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17683} G2H5024 +PERO3              =  0.460G1H504K + 0.270GHD5011 + 0.270GHD5012                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17684} G2H5024 +PERO5              =  0.460G1H504K + 0.270GHD5011 + 0.270GHD5012                 : ARR( 0.183E-11,   450., 0.0);
+{ 17685} G2H5024 +PERO6              =  0.300G1H504K + 0.350GHD5011 + 0.350GHD5012                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17686} G2H5024 +PERO9              =  0.650G1H504K + 0.350GHD5012                                : ARR( 0.100E-10,     0., 0.0);
+{ 17687} G3H500a +GHO2               =  0.800GGH500m + 0.200GAH500q + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17688} G3H500a +GNO                =       G2H4002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17689} G3H500a +GNO2               =       GPH500s                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17690} G3H500a +GNO3               =       G2H4002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17691} G3H500a +MEPERO             =  0.685G2H4002 + 0.315GAH500q + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17692} G3H500a +PERO1              =  0.800G2H4002 + 0.200GAH500q + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17693} G3H500a +PERO2              =  0.750G2H4002 + 0.250GAH500q + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17694} G3H500a +PERO3              =  0.800G2H4002 + 0.200GAH500q + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17695} G3H500a +PERO5              =  0.650G2H4002 + 0.350GAH500q + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17696} G3H500a +PERO6              =  0.650G2H4002 + 0.350GAH500q + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17697} G3H500a +PERO9              =       G2H4002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17698} G1H504K                     =       GDO2000 +      GDD3000 +      GHO                     : ARR( 0.200E+15,  4146., 0.0);
+{ 17699} GUD3000 +GHO                =       G3U3000                                               : ARR( 0.428E-11,  -333., 0.0);
+{ 17700} GUD3000 +GHO                =       G2D3003                                               : ARR( 0.453E-12,  -333., 0.0);
+{ 17701} GUD3000 +GHO                =       G2D3004                                               : ARR( 0.181E-11,  -333., 0.0);
+{ 17702} GUD3000 +GO3                =  2.000GCH2O   + 3.000GCO     + 3.000GHO2    +      GHO      : ARR( 0.340E-16,  2519., 0.0);
+{ 17703} GUD3000 +GO3                =       GCO2                                                  : ARR( 0.340E-16,  2519., 0.0);
+{ 17704} GUD3000 +GO3                =  2.000GDD2000 + 0.740GHCOOH  + 0.260GCO2    + 0.260GH2      : ARR( 0.646E-15,  2519., 0.0);
+{ 17705} GUD3000 +GO3                =       GCO     + 0.760GH2O    + 0.240GHO2    + 0.240GHO      : ARR( 0.646E-15,  2519., 0.0);
+{ 17706} GUD3000 +GNO3               =       G3U3000 +      GHNO3                                  : ARR( 0.250E-14,     0., 0.0);
+{ 17707} GUD3000+HV               =       G3U3000 +      GHO2                                   :  0.100E+01*SUN;
+{ 17708} GUD3000+HV               =       G1D2000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17709} GUD3000+HV               =  0.680GA02000 + 0.280GCO2    + 0.280GCH4    + 1.040GCO      :  0.500E+00*SUN;
+{ 17710} GUD3000+HV               =  1.040GHO     + 1.040GCH3O2  + 2.000GCO                     :  0.500E+00*SUN;
+{ 17711} G3U3000 +GHO2               =  0.800GGU3000 + 0.200GAU3000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17712} G3U3000 +GNO                =       G1D2000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17713} G3U3000 +GNO2               =       GPU3000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17714} G3U3000 +GNO3               =       G1D2000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17715} G3U3000 +MEPERO             =  0.685G1D2000 + 0.315GAU3000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17716} G3U3000 +PERO1              =  0.800G1D2000 + 0.200GAU3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17717} G3U3000 +PERO2              =  0.750G1D2000 + 0.250GAU3000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17718} G3U3000 +PERO3              =  0.800G1D2000 + 0.200GAU3000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17719} G3U3000 +PERO5              =  0.650G1D2000 + 0.350GAU3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17720} G3U3000 +PERO6              =  0.650G1D2000 + 0.350GAU3000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17721} G3U3000 +PERO9              =       G1D2000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17722} GGN5007 +GHO                =       G3N5006                                               : ARR( 0.211E-11,  -190., 0.0);
+{ 17723} GGN5007+HV               =       G1G500b +      GNO2                                   :  0.100E+01*SUN;
+{ 17724} GGN5007+HV               =       G1G5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 17725} GGN5007+HV               =       G2N400C +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 17726} G1G500b +OXYGEN             =       GGN500m +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17727} G1G500b                     =       G2G500a                                               : ARR( 0.160E+12,  3940., 0.0);
+{ 17728} G2G500a +GNO                =       G1G500c +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17729} G2G500a +GNO                =       GGN500n                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17730} G2G500a +GHO2               =       GGH500n                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17731} G2G500a +GNO3               =       G1G500c +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17732} G2G500a +MEPERO             =  0.340G1G500c + 0.330GGN500o + 0.330GGN500p                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17733} G2G500a +PERO1              =  0.460G1G500c + 0.270GGN500o + 0.270GGN500p                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17734} G2G500a +PERO2              =  0.400G1G500c + 0.300GGN500o + 0.300GGN500p                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17735} G2G500a +PERO3              =  0.460G1G500c + 0.270GGN500o + 0.270GGN500p                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17736} G2G500a +PERO5              =  0.460G1G500c + 0.270GGN500o + 0.270GGN500p                 : ARR( 0.183E-11,   450., 0.0);
+{ 17737} G2G500a +PERO6              =  0.300G1G500c + 0.350GGN500o + 0.350GGN500p                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17738} G2G500a +PERO9              =  0.650G1G500c + 0.350GGN500p                                : ARR( 0.100E-10,     0., 0.0);
+{ 17739} G1G500c                     =       GGN500q +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 17740} G1G500c                     =       GND4006 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 17741} GAN5007 +GHO                =       G2A500g                                               : ARR( 0.128E-12,     0., 0.0);
+{ 17742} GAN5007 +GHO                =       GAN5009 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 17743} GAN5007 +GHO                =       G2A500h                                               : ARR( 0.565E-13,     0., 0.0);
+{ 17744} GAN5007 +GHO                =       GAN500Q +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{ 17745} GAN5007 +GHO                =       G2N400C +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 17746} GAN5007+HV               =       G1A5007 +      GNO2                                   :  0.100E+01*SUN;
+{ 17747} GAN5007+HV               =       G1A500F +      GNO2                                   :  0.100E+01*SUN;
+{ 17748} G2A500g +GNO                =       G1A500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17749} G2A500g +GNO                =       GAN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17750} G2A500g +GHO2               =       GAH500r                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17751} G2A500g +GNO3               =       G1A500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17752} G2A500g +MEPERO             =  0.340G1A500h + 0.330GAN500a + 0.330GAN500t                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17753} G2A500g +PERO1              =  0.460G1A500h + 0.270GAN500a + 0.270GAN500t                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17754} G2A500g +PERO2              =  0.400G1A500h + 0.300GAN500a + 0.300GAN500t                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17755} G2A500g +PERO3              =  0.460G1A500h + 0.270GAN500a + 0.270GAN500t                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17756} G2A500g +PERO5              =  0.460G1A500h + 0.270GAN500a + 0.270GAN500t                 : ARR( 0.183E-11,   450., 0.0);
+{ 17757} G2A500g +PERO6              =  0.300G1A500h + 0.350GAN500a + 0.350GAN500t                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17758} G2A500g +PERO9              =  0.650G1A500h + 0.350GAN500t                                : ARR( 0.100E-10,     0., 0.0);
+{ 17759} G2A500h +GNO                =       G1A500i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17760} G2A500h +GNO                =       GAN500u                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17761} G2A500h +GHO2               =       GAH500s                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17762} G2A500h +GNO3               =       G1A500i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17763} G2A500h +MEPERO             =  0.340G1A500i + 0.330GAN500H + 0.330GAN500v                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17764} G2A500h +PERO1              =  0.460G1A500i + 0.270GAN500H + 0.270GAN500v                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17765} G2A500h +PERO2              =  0.400G1A500i + 0.300GAN500H + 0.300GAN500v                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17766} G2A500h +PERO3              =  0.460G1A500i + 0.270GAN500H + 0.270GAN500v                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17767} G2A500h +PERO5              =  0.460G1A500i + 0.270GAN500H + 0.270GAN500v                 : ARR( 0.183E-11,   450., 0.0);
+{ 17768} G2A500h +PERO6              =  0.300G1A500i + 0.350GAN500H + 0.350GAN500v                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17769} G2A500h +PERO9              =  0.650G1A500i + 0.350GAN500v                                : ARR( 0.100E-10,     0., 0.0);
+{ 17770} G1A500h                     =       GCO     +      GNN4008 +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 17771} G1A500i                     =       GAD3000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6365., 0.0);
+{ 17772} GPN5007                     =       G3N5006 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 17773} GPN5007 +GHO                =       GPN500Q +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{ 17774} GPN5007 +GHO                =       G2P500j                                               : ARR( 0.565E-13,     0., 0.0);
+{ 17775} GPN5007 +GHO                =       GPN5009 +      GNO2                                   : ARR( 0.118E-12,     0., 0.0);
+{ 17776} GPN5007 +GHO                =       G2P500k                                               : ARR( 0.172E-12,     0., 0.0);
+{ 17777} GPN5007+HV               =       G1P500F +      GNO2                                   :  0.100E+01*SUN;
+{ 17778} GPN5007+HV               =       G1P5007 +      GNO2                                   :  0.100E+01*SUN;
+{ 17779} GPN5007+HV               =       G3N5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 17780} G2P500j +GNO                =       G1P500k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17781} G2P500j +GNO                =       GPN500x                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17782} G2P500j +GHO2               =       GPH500t                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17783} G2P500j +GNO3               =       G1P500k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17784} G2P500j +MEPERO             =  0.340G1P500k + 0.330GPN500H + 0.330GPN500y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17785} G2P500j +PERO1              =  0.460G1P500k + 0.270GPN500H + 0.270GPN500y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17786} G2P500j +PERO2              =  0.400G1P500k + 0.300GPN500H + 0.300GPN500y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17787} G2P500j +PERO3              =  0.460G1P500k + 0.270GPN500H + 0.270GPN500y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17788} G2P500j +PERO5              =  0.460G1P500k + 0.270GPN500H + 0.270GPN500y                 : ARR( 0.183E-11,   450., 0.0);
+{ 17789} G2P500j +PERO6              =  0.300G1P500k + 0.350GPN500H + 0.350GPN500y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17790} G2P500j +PERO9              =  0.650G1P500k + 0.350GPN500y                                : ARR( 0.100E-10,     0., 0.0);
+{ 17791} G2P500k +GNO                =       G1P500l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17792} G2P500k +GNO                =       GPN500z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17793} G2P500k +GHO2               =       GPH500u                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17794} G2P500k +GNO3               =       G1P500l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17795} G2P500k +MEPERO             =  0.340G1P500l + 0.330GPN500a + 0.330GPN5011                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17796} G2P500k +PERO1              =  0.460G1P500l + 0.270GPN500a + 0.270GPN5011                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17797} G2P500k +PERO2              =  0.400G1P500l + 0.300GPN500a + 0.300GPN5011                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17798} G2P500k +PERO3              =  0.460G1P500l + 0.270GPN500a + 0.270GPN5011                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17799} G2P500k +PERO5              =  0.460G1P500l + 0.270GPN500a + 0.270GPN5011                 : ARR( 0.183E-11,   450., 0.0);
+{ 17800} G2P500k +PERO6              =  0.300G1P500l + 0.350GPN500a + 0.350GPN5011                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17801} G2P500k +PERO9              =  0.650G1P500l + 0.350GPN5011                                : ARR( 0.100E-10,     0., 0.0);
+{ 17802} G1P500k                     =       GND2000 +      GPD3000 +      GNO2                    : ARR( 0.200E+15,  6365., 0.0);
+{ 17803} G1P500l                     =       GNN4008 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 17804} GND500X +GHO                =       G3N500c                                               : ARR( 0.431E-10,     0., 0.0);
+{ 17805} GND500X +GNO3               =       G3N500c +      GHNO3                                  : ARR( 0.240E-13,     0., 0.0);
+{ 17806} GND500X+HV               =       GCO     +      G2N400i +      GHO2                    :  0.200E+01*SUN;
+{ 17807} GND500X+HV               =       GD02000 +      G2D3005 +      GNO2                    :  0.200E+01*SUN;
+{ 17808} GND500X+HV               =       G1D500k +      GNO2                                   :  0.100E+01*SUN;
+{ 17809} G3N500c +GHO2               =  0.800GGN500m + 0.200GAN500Q + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17810} G3N500c +GNO                =       G2N400i +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17811} G3N500c +GNO2               =       GPN500Q                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17812} G3N500c +GNO3               =       G2N400i +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17813} G3N500c +MEPERO             =  0.685G2N400i + 0.315GAN500Q + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17814} G3N500c +PERO1              =  0.800G2N400i + 0.200GAN500Q + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17815} G3N500c +PERO2              =  0.750G2N400i + 0.250GAN500Q + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17816} G3N500c +PERO3              =  0.800G2N400i + 0.200GAN500Q + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17817} G3N500c +PERO5              =  0.650G2N400i + 0.350GAN500Q + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17818} G3N500c +PERO6              =  0.650G2N400i + 0.350GAN500Q + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17819} G3N500c +PERO9              =       G2N400i +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17820} G2D3005 +GNO                =       G1D3005 +      GNO2                                   : ARR( 0.264E-11,  -360., 0.0);
+{ 17821} G2D3005 +GNO                =       GND3005                                               : ARR( 0.622E-13,  -360., 0.0);
+{ 17822} G2D3005 +GHO2               =       GHD3004                                               : ARR( 0.179E-12, -1250., 0.0);
+{ 17823} G2D3005 +GNO3               =       G1D3005 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17824} G2D3005 +MEPERO             =  0.340G1D3005 + 0.330GDD3001 + 0.330GDD3002                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17825} G2D3005 +PERO1              =  0.460G1D3005 + 0.270GDD3001 + 0.270GDD3002                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17826} G2D3005 +PERO2              =  0.400G1D3005 + 0.300GDD3001 + 0.300GDD3002                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17827} G2D3005 +PERO3              =  0.460G1D3005 + 0.270GDD3001 + 0.270GDD3002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17828} G2D3005 +PERO5              =  0.460G1D3005 + 0.270GDD3001 + 0.270GDD3002                 : ARR( 0.183E-11,   450., 0.0);
+{ 17829} G2D3005 +PERO6              =  0.300G1D3005 + 0.350GDD3001 + 0.350GDD3002                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17830} G2D3005 +PERO9              =  0.650G1D3005 + 0.350GDD3002                                : ARR( 0.100E-10,     0., 0.0);
+{ 17831} G1D500k                     =       G2D2000 +      GDD3000                                : ARR( 0.400E+15,  6591., 0.0);
+{ 17832} G1D3005                     =       GCO     +      GDD2000 +      GHO2                    : ARR( 0.400E+15,  7636., 0.0);
+{ 17833} GNN400B +GHO                =       GNN4001 +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{ 17834} GNN400B +GHO                =       G2N400j                                               : ARR( 0.565E-13,     0., 0.0);
+{ 17835} GNN400B +GHO                =       GNN400C +      GNO2                                   : ARR( 0.236E-13,     0., 0.0);
+{ 17836} GNN400B +GHO                =       GNN4008 +      GNO2                                   : ARR( 0.919E-14,     0., 0.0);
+{ 17837} GNN400B+HV               =       G1N400H +      GNO2                                   :  0.100E+01*SUN;
+{ 17838} GNN400B+HV               =       G1N400F +      GNO2                                   :  0.100E+01*SUN;
+{ 17839} GNN400B+HV               =       G1N400C +      GNO2                                   :  0.100E+01*SUN;
+{ 17840} G2N400j +GNO                =       G1N400o +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 17841} G2N400j +GNO                =       GNN400W                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 17842} G2N400j +GHO2               =       GHN400w                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 17843} G2N400j +GNO3               =       G1N400o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17844} G2N400j +MEPERO             =  0.340G1N400o + 0.330GNN400H + 0.330GNN400X                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17845} G2N400j +PERO1              =  0.460G1N400o + 0.270GNN400H + 0.270GNN400X                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17846} G2N400j +PERO2              =  0.400G1N400o + 0.300GNN400H + 0.300GNN400X                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17847} G2N400j +PERO3              =  0.460G1N400o + 0.270GNN400H + 0.270GNN400X                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17848} G2N400j +PERO5              =  0.460G1N400o + 0.270GNN400H + 0.270GNN400X                 : ARR( 0.183E-11,   450., 0.0);
+{ 17849} G2N400j +PERO6              =  0.300G1N400o + 0.350GNN400H + 0.350GNN400X                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17850} G2N400j +PERO9              =  0.650G1N400o + 0.350GNN400X                                : ARR( 0.100E-10,     0., 0.0);
+{ 17851} G1N400o                     =  2.000GND2000 +      GNO2                                   : ARR( 0.200E+15,  6380., 0.0);
+{ 17852} GHN400H +GHO                =       GNN4008 +      GHO                                    : ARR( 0.332E-11,     0., 0.0);
+{ 17853} GHN400H +GHO                =       G2N400C                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 17854} GHN400H+HV               =       G1H400g +      GNO2                                   :  0.100E+01*SUN;
+{ 17855} GHN400H+HV               =       G1H400D +      GNO2                                   :  0.100E+01*SUN;
+{ 17856} GHN400H+HV               =       G1N400C +      GHO                                    :  0.100E+01*SUN;
+{ 17857} GNN501S +GHO                =       GNN502t +      GHO2                                   : ARR( 0.425E-11,     0., 0.0);
+{ 17858} GNN501S +GHO                =       G3N500d                                               : ARR( 0.439E-11,     0., 0.0);
+{ 17859} GNN501S +GNO3               =       G3N500d +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17860} GNN501S+HV               =       G1N504a +      GNO2                                   :  0.100E+01*SUN;
+{ 17861} GNN501S+HV               =       G1N501v +      GNO2                                   :  0.100E+01*SUN;
+{ 17862} GNN501S+HV               =       GND4006 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 17863} GNN501S+HV               =       G2D3004 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 17864} G3N500d +GHO2               =  0.800GGN500n + 0.200GAN500X + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17865} G3N500d +GNO                =       GND4006 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17866} G3N500d +GNO2               =       GPN500X                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17867} G3N500d +GNO3               =       GND4006 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17868} G3N500d +MEPERO             =  0.685GND4006 + 0.315GAN500X + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17869} G3N500d +PERO1              =  0.800GND4006 + 0.200GAN500X + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17870} G3N500d +PERO2              =  0.750GND4006 + 0.250GAN500X + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17871} G3N500d +PERO3              =  0.800GND4006 + 0.200GAN500X + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17872} G3N500d +PERO5              =  0.650GND4006 + 0.350GAN500X + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17873} G3N500d +PERO6              =  0.650GND4006 + 0.350GAN500X + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17874} G3N500d +PERO9              =       GND4006 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 17875} G1N504a                     =       G2O2000 +      GND3005                                : ARR( 0.200E+15,  6244., 0.0);
+{ 17876} G1N504a                     =       GDO3000 +      GDD2000 +      GNO2                    : ARR( 0.200E+15,  6201., 0.0);
+{ 17877} GHN502Q +GHO                =       GHN505H +      GHO2                                   : ARR( 0.412E-11,     0., 0.0);
+{ 17878} GHN502Q +GHO                =       GND500Z +      GHO                                    : ARR( 0.515E-11,     0., 0.0);
+{ 17879} GHN502Q +GHO                =       G3H500b                                               : ARR( 0.213E-10,     0., 0.0);
+{ 17880} GHN502Q +GHO                =       G2N501q                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 17881} GHN502Q +GNO3               =       G3H500b +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17882} GHN502Q+HV               =       G1H5018 +      GNO2                                   :  0.100E+01*SUN;
+{ 17883} GHN502Q+HV               =       G1N501v +      GHO                                    :  0.100E+01*SUN;
+{ 17884} GHN502Q+HV               =       GND4006 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 17885} G3H500b +GHO2               =  0.800GGH500n + 0.200GAH500O + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17886} G3H500b +GNO                =       GND4006 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 17887} G3H500b +GNO2               =       GPH500O                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17888} G3H500b +GNO3               =       GND4006 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 17889} G3H500b +MEPERO             =  0.685GND4006 + 0.315GAH500O + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17890} G3H500b +PERO1              =  0.800GND4006 + 0.200GAH500O + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17891} G3H500b +PERO2              =  0.750GND4006 + 0.250GAH500O + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17892} G3H500b +PERO3              =  0.800GND4006 + 0.200GAH500O + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17893} G3H500b +PERO5              =  0.650GND4006 + 0.350GAH500O + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17894} G3H500b +PERO6              =  0.650GND4006 + 0.350GAH500O + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17895} G3H500b +PERO9              =       GND4006 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 17896} GND500Y +GHO                =       GND500a +      GHO2                                   : ARR( 0.438E-11,     0., 0.0);
+{ 17897} GND500Y +GHO                =       G3N500e                                               : ARR( 0.226E-10,     0., 0.0);
+{ 17898} GND500Y +GNO3               =       G3N500e +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17899} GND500Y+HV               =       G1D500I +      GNO2                                   :  0.100E+01*SUN;
+{ 17900} GND500Y+HV               =       GND4006 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 17901} G3N500e +GHO2               =  0.800GGN500o + 0.200GAN500Y + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17902} G3N500e +GNO                =       GND4006 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 17903} G3N500e +GNO2               =       GPN500Y                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17904} G3N500e +GNO3               =       GND4006 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 17905} G3N500e +MEPERO             =  0.685GND4006 + 0.315GAN500Y + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17906} G3N500e +PERO1              =  0.800GND4006 + 0.200GAN500Y + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17907} G3N500e +PERO2              =  0.750GND4006 + 0.250GAN500Y + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17908} G3N500e +PERO3              =  0.800GND4006 + 0.200GAN500Y + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17909} G3N500e +PERO5              =  0.650GND4006 + 0.350GAN500Y + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17910} G3N500e +PERO6              =  0.650GND4006 + 0.350GAN500Y + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17911} G3N500e +PERO9              =       GND4006 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 17912} GND500Z +GHO                =       GND501C +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 17913} GND500Z +GHO                =       G3N4008 +      GCO                                    : ARR( 0.130E-10,     0., 0.0);
+{ 17914} GND500Z +GNO3               =       G3N4008 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 17915} GND500Z+HV               =       G1D500l +      GNO2                                   :  0.100E+01*SUN;
+{ 17916} GND500Z+HV               =       G3N4008 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17917} GND500Z+HV               =       GND4006 +      GCO                                    :  0.100E+01*SUN;
+{ 17918} GND500Z+HV               =       GNO3000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 17919} G1D500l                     =       GDO3000 +      G3D2000                                : ARR( 0.200E+15,  2978., 0.0);
+{ 17920} GND500a +GHO                =       G3N500f                                               : ARR( 0.222E-10,     0., 0.0);
+{ 17921} GND500a +GHO                =       G3N500g                                               : ARR( 0.222E-10,     0., 0.0);
+{ 17922} GND500a +GNO3               =       G3N500f +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17923} GND500a +GNO3               =       G3N500g +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 17924} GND500a+HV               =       GCO     +      GND400D + 2.000GHO2                    :  0.100E+01*SUN;
+{ 17925} GND500a+HV               =       G1D500K +      GNO2                                   :  0.100E+01*SUN;
+{ 17926} GND500a+HV               =       G2N400k +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 17927} GND500a+HV               =       GND3003 +      GD02000                                :  0.100E+01*SUN;
+{ 17928} G3N500f +GHO2               =  0.800GGN500q + 0.200GAN500b + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17929} G3N500f +GNO                =       GND400D +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 17930} G3N500f +GNO2               =       GPN500b                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17931} G3N500f +GNO3               =       GND400D +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 17932} G3N500f +MEPERO             =  0.685GND400D + 0.315GAN500b + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17933} G3N500f +PERO1              =  0.800GND400D + 0.200GAN500b + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17934} G3N500f +PERO2              =  0.750GND400D + 0.250GAN500b + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17935} G3N500f +PERO3              =  0.800GND400D + 0.200GAN500b + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17936} G3N500f +PERO5              =  0.650GND400D + 0.350GAN500b + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17937} G3N500f +PERO6              =  0.650GND400D + 0.350GAN500b + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 17938} G3N500f +PERO9              =       GND400D +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 17939} G3N500g +GHO2               =  0.800GGN500r + 0.200GAN500o + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 17940} G3N500g +GNO                =       G2N400k +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 17941} G3N500g +GNO2               =       GPN500p                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 17942} G3N500g +GNO3               =       G2N400k +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 17943} G3N500g +MEPERO             =  0.685G2N400k + 0.315GAN500o + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17944} G3N500g +PERO1              =  0.800G2N400k + 0.200GAN500o + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17945} G3N500g +PERO2              =  0.750G2N400k + 0.250GAN500o + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17946} G3N500g +PERO3              =  0.800G2N400k + 0.200GAN500o + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17947} G3N500g +PERO5              =  0.650G2N400k + 0.350GAN500o + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17948} G3N500g +PERO6              =  0.650G2N400k + 0.350GAN500o + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 17949} G3N500g +PERO9              =       G2N400k +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 17950} G2N400k +GNO                =       G1N400p +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 17951} G2N400k +GNO                =       GNN400T                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 17952} G2N400k +GHO2               =       GHN400x                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 17953} G2N400k +GNO3               =       G1N400p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17954} G2N400k +MEPERO             =  0.480G1N400p + 0.260GND4009 + 0.260GND400J                 : ARR( 0.164E-12,  -795., 0.0);
+{ 17955} G2N400k +PERO1              =  0.600G1N400p + 0.200GND4009 + 0.200GND400J                 : ARR( 0.126E-12,  -850., 0.0);
+{ 17956} G2N400k +PERO2              =  0.560G1N400p + 0.220GND4009 + 0.220GND400J                 : ARR( 0.471E-13, -1350., 0.0);
+{ 17957} G2N400k +PERO3              =  0.600G1N400p + 0.200GND4009 + 0.200GND400J                 : ARR( 0.142E-12, -1200., 0.0);
+{ 17958} G2N400k +PERO5              =  0.600G1N400p + 0.200GND4009 + 0.200GND400J                 : ARR( 0.533E-11,   500., 0.0);
+{ 17959} G2N400k +PERO6              =  0.460G1N400p + 0.270GND4009 + 0.270GND400J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17960} G2N400k +PERO9              =  0.800G1N400p + 0.200GND400J                                : ARR( 0.100E-10,     0., 0.0);
+{ 17961} G1N400p +OXYGEN             =       GND400J +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 17962} G1N400p                     =       G3N400E                                               : ARR( 0.800E+11,  4559., 0.0);
+{ 17963} G1N400p                     =       GDD3001 +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{ 17964} GGH5006 +GHO                =       GGN5009 +      GHO                                    : ARR( 0.422E-10,     0., 0.0);
+{ 17965} GGH5006 +GHO                =       G2G5005                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 17966} GGH5006 +GHO                =       G3H5004                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 17967} GGH5006+HV               =       G1G500d +      GNO2                                   :  0.100E+01*SUN;
+{ 17968} GGH5006+HV               =       G1G5006 +      GHO                                    :  0.100E+01*SUN;
+{ 17969} GGH5006+HV               =       G2H400B +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 17970} G1G500d                     =       G2G500b                                               : ARR( 0.160E+12,  3221., 0.0);
+{ 17971} G2G500b +GNO                =       G1G500e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17972} G2G500b +GNO                =       GGH500o                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17973} G2G500b +GHO2               =       GGH500p                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17974} G2G500b +GNO3               =       G1G500e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17975} G2G500b +MEPERO             =  0.340G1G500e + 0.330GGH500q + 0.330GGH500r                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17976} G2G500b +PERO1              =  0.460G1G500e + 0.270GGH500q + 0.270GGH500r                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17977} G2G500b +PERO2              =  0.400G1G500e + 0.300GGH500q + 0.300GGH500r                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17978} G2G500b +PERO3              =  0.460G1G500e + 0.270GGH500q + 0.270GGH500r                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17979} G2G500b +PERO5              =  0.460G1G500e + 0.270GGH500q + 0.270GGH500r                 : ARR( 0.183E-11,   450., 0.0);
+{ 17980} G2G500b +PERO6              =  0.300G1G500e + 0.350GGH500q + 0.350GGH500r                 : ARR( 0.168E-13, -1300., 0.0);
+{ 17981} G2G500b +PERO9              =  0.650G1G500e + 0.350GGH500r                                : ARR( 0.100E-10,     0., 0.0);
+{ 17982} G1G500e                     =       GGH500s +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 17983} G1G500e                     =       GHD4006 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 17984} GAH5006 +GHO                =       GAN5009 +      GHO                                    : ARR( 0.426E-10,     0., 0.0);
+{ 17985} GAH5006 +GHO                =       G2A5006                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 17986} GAH5006+HV               =       G1A5007 +      GHO                                    :  0.100E+01*SUN;
+{ 17987} GAH5006+HV               =       G1A500j +      GNO2                                   :  0.100E+01*SUN;
+{ 17988} G1A500j +OXYGEN             =       GAH500t +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 17989} G1A500j                     =       G2A500i                                               : ARR( 0.160E+12,  3356., 0.0);
+{ 17990} G2A500i +GNO                =       G1A500k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 17991} G2A500i +GNO                =       GAH500u                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 17992} G2A500i +GHO2               =       GAH500v                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 17993} G2A500i +GNO3               =       G1A500k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 17994} G2A500i +MEPERO             =  0.340G1A500k + 0.330GAH500w + 0.330GAH500x                 : ARR( 0.565E-13,  -845., 0.0);
+{ 17995} G2A500i +PERO1              =  0.460G1A500k + 0.270GAH500w + 0.270GAH500x                 : ARR( 0.434E-13,  -900., 0.0);
+{ 17996} G2A500i +PERO2              =  0.400G1A500k + 0.300GAH500w + 0.300GAH500x                 : ARR( 0.162E-13, -1400., 0.0);
+{ 17997} G2A500i +PERO3              =  0.460G1A500k + 0.270GAH500w + 0.270GAH500x                 : ARR( 0.488E-13, -1250., 0.0);
+{ 17998} G2A500i +PERO5              =  0.460G1A500k + 0.270GAH500w + 0.270GAH500x                 : ARR( 0.183E-11,   450., 0.0);
+{ 17999} G2A500i +PERO6              =  0.300G1A500k + 0.350GAH500w + 0.350GAH500x                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18000} G2A500i +PERO9              =  0.650G1A500k + 0.350GAH500x                                : ARR( 0.100E-10,     0., 0.0);
+{ 18001} G1A500k                     =       GAH500y +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 18002} G1A500k                     =       GHD4006 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 18003} GPH5006                     =       G3H5004 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 18004} GPH5006 +GHO                =       GPN5009 +      GHO                                    : ARR( 0.423E-10,     0., 0.0);
+{ 18005} GPH5006 +GHO                =       G2P5006                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 18006} GPH5006+HV               =       G1P500m +      GNO2                                   :  0.100E+01*SUN;
+{ 18007} GPH5006+HV               =       G1P5007 +      GHO                                    :  0.100E+01*SUN;
+{ 18008} GPH5006+HV               =       G3H5004 +      GNO2                                   :  0.100E+01*SUN;
+{ 18009} G1P500m                     =       G2P500l                                               : ARR( 0.160E+12,  3221., 0.0);
+{ 18010} G2P500l +GNO                =       G1P500n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18011} G2P500l +GNO                =       GPH500v                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18012} G2P500l +GHO2               =       GPH500w                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18013} G2P500l +GNO3               =       G1P500n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18014} G2P500l +MEPERO             =  0.340G1P500n + 0.330GPH500x + 0.330GPH500y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18015} G2P500l +PERO1              =  0.460G1P500n + 0.270GPH500x + 0.270GPH500y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18016} G2P500l +PERO2              =  0.400G1P500n + 0.300GPH500x + 0.300GPH500y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18017} G2P500l +PERO3              =  0.460G1P500n + 0.270GPH500x + 0.270GPH500y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18018} G2P500l +PERO5              =  0.460G1P500n + 0.270GPH500x + 0.270GPH500y                 : ARR( 0.183E-11,   450., 0.0);
+{ 18019} G2P500l +PERO6              =  0.300G1P500n + 0.350GPH500x + 0.350GPH500y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18020} G2P500l +PERO9              =  0.650G1P500n + 0.350GPH500y                                : ARR( 0.100E-10,     0., 0.0);
+{ 18021} G1P500n                     =       GPH500z +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 18022} G1P500n                     =       GHD4006 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 18023} GHN400I +GHO                =       GNN400C +      GHO                                    : ARR( 0.850E-11,     0., 0.0);
+{ 18024} GHN400I +GHO                =       G2N400F                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 18025} GHN400I+HV               =       G1H400E +      GNO2                                   :  0.100E+01*SUN;
+{ 18026} GHN400I+HV               =       G1N400F +      GHO                                    :  0.100E+01*SUN;
+{ 18027} GHN400I+HV               =       G1H400B +      GNO2                                   :  0.100E+01*SUN;
+{ 18028} GHH4007 +GHO                =       GHN400K +      GHO                                    : ARR( 0.414E-10,     0., 0.0);
+{ 18029} GHH4007 +GHO                =       GHN400J +      GHO                                    : ARR( 0.162E-10,     0., 0.0);
+{ 18030} GHH4007 +GHO                =       G2H400C                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 18031} GHH4007 +GHO                =       G2H400B                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 18032} GHH4007+HV               =       G1H400h +      GNO2                                   :  0.100E+01*SUN;
+{ 18033} GHH4007+HV               =       G1H400D +      GHO                                    :  0.100E+01*SUN;
+{ 18034} GHH4007+HV               =       G1H400B +      GHO                                    :  0.100E+01*SUN;
+{ 18035} GHN400J +GHO                =       GND400B +      GHO                                    : ARR( 0.256E-10,     0., 0.0);
+{ 18036} GHN400J +GHO                =       G3H400D                                               : ARR( 0.212E-10,     0., 0.0);
+{ 18037} GHN400J +GHO                =       G2N400l                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 18038} GHN400J +GNO3               =       G3H400D +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18039} GHN400J+HV               =       G1H400i +      GNO2                                   :  0.100E+01*SUN;
+{ 18040} GHN400J+HV               =       G1N400i +      GHO                                    :  0.100E+01*SUN;
+{ 18041} GHN400J+HV               =       GND3000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 18042} G2N400l +GNO                =       G1N400i +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 18043} G2N400l +GNO                =       GNN4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 18044} G2N400l +GHO2               =       GHN400J                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 18045} G2N400l +GNO3               =       G1N400i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18046} G2N400l +MEPERO             =  0.340G1N400i + 0.330GND400C + 0.330GND400B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18047} G2N400l +PERO1              =  0.460G1N400i + 0.270GND400C + 0.270GND400B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18048} G2N400l +PERO2              =  0.400G1N400i + 0.300GND400C + 0.300GND400B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18049} G2N400l +PERO3              =  0.460G1N400i + 0.270GND400C + 0.270GND400B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18050} G2N400l +PERO5              =  0.460G1N400i + 0.270GND400C + 0.270GND400B                 : ARR( 0.183E-11,   450., 0.0);
+{ 18051} G2N400l +PERO6              =  0.300G1N400i + 0.350GND400C + 0.350GND400B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18052} G2N400l +PERO9              =  0.650G1N400i + 0.350GND400B                                : ARR( 0.100E-10,     0., 0.0);
+{ 18053} G1H400i +OXYGEN             =       GHD400C +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 18054} G1H400i                     =       G3H4004                                               : ARR( 0.800E+11,  4559., 0.0);
+{ 18055} GHN502R +GHO                =       GHN505I +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 18056} GHN502R +GHO                =       G2H5025                                               : ARR( 0.143E-11,     0., 0.0);
+{ 18057} GHN502R +GHO                =       GND500c +      GHO                                    : ARR( 0.832E-11,     0., 0.0);
+{ 18058} GHN502R +GHO                =       G3H500c                                               : ARR( 0.420E-11,     0., 0.0);
+{ 18059} GHN502R +GHO                =       G2N504C                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 18060} GHN502R +GNO3               =       G3H500c +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18061} GHN502R+HV               =       G1N504a +      GHO                                    :  0.100E+01*SUN;
+{ 18062} GHN502R+HV               =       G1H5017 +      GNO2                                   :  0.100E+01*SUN;
+{ 18063} GHN502R+HV               =       GHD4006 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 18064} GHN502R+HV               =       G2D3004 +      GND2000 +      GHO                     :  0.100E+01*SUN;
+{ 18065} G2H5025 +GNO                =       G1H504L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18066} G2H5025 +GNO                =       GHN505J                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18067} G2H5025 +GHO2               =       GHH501y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18068} G2H5025 +GNO3               =       G1H504L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18069} G2H5025 +MEPERO             =  0.340G1H504L + 0.330GHN5042 + 0.330GHN505K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18070} G2H5025 +PERO1              =  0.460G1H504L + 0.270GHN5042 + 0.270GHN505K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18071} G2H5025 +PERO2              =  0.400G1H504L + 0.300GHN5042 + 0.300GHN505K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18072} G2H5025 +PERO3              =  0.460G1H504L + 0.270GHN5042 + 0.270GHN505K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18073} G2H5025 +PERO5              =  0.460G1H504L + 0.270GHN5042 + 0.270GHN505K                 : ARR( 0.183E-11,   450., 0.0);
+{ 18074} G2H5025 +PERO6              =  0.300G1H504L + 0.350GHN5042 + 0.350GHN505K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18075} G2H5025 +PERO9              =  0.650G1H504L + 0.350GHN505K                                : ARR( 0.100E-10,     0., 0.0);
+{ 18076} G3H500c +GHO2               =  0.800GGH500o + 0.200GAH500u + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18077} G3H500c +GNO                =       GHD4006 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18078} G3H500c +GNO2               =       GPH500v                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18079} G3H500c +GNO3               =       GHD4006 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18080} G3H500c +MEPERO             =  0.685GHD4006 + 0.315GAH500u + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18081} G3H500c +PERO1              =  0.800GHD4006 + 0.200GAH500u + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18082} G3H500c +PERO2              =  0.750GHD4006 + 0.250GAH500u + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18083} G3H500c +PERO3              =  0.800GHD4006 + 0.200GAH500u + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18084} G3H500c +PERO5              =  0.650GHD4006 + 0.350GAH500u + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18085} G3H500c +PERO6              =  0.650GHD4006 + 0.350GAH500u + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18086} G3H500c +PERO9              =       GHD4006 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18087} G2N504C +GNO                =       G1N504a +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18088} G2N504C +GNO                =       GNN501S                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18089} G2N504C +GHO2               =       GHN502R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18090} G2N504C +GNO3               =       G1N504a +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18091} G2N504C +MEPERO             =  0.340G1N504a + 0.330GND500b + 0.330GND500c                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18092} G2N504C +PERO1              =  0.460G1N504a + 0.270GND500b + 0.270GND500c                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18093} G2N504C +PERO2              =  0.400G1N504a + 0.300GND500b + 0.300GND500c                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18094} G2N504C +PERO3              =  0.460G1N504a + 0.270GND500b + 0.270GND500c                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18095} G2N504C +PERO5              =  0.460G1N504a + 0.270GND500b + 0.270GND500c                 : ARR( 0.183E-11,   450., 0.0);
+{ 18096} G2N504C +PERO6              =  0.300G1N504a + 0.350GND500b + 0.350GND500c                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18097} G2N504C +PERO9              =  0.650G1N504a + 0.350GND500c                                : ARR( 0.100E-10,     0., 0.0);
+{ 18098} G1H504L                     =       GCH2O   +      GHN400y +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 18099} G1H504L                     =       GDO2000 +      GND3005 +      GHO                     : ARR( 0.200E+15,  4828., 0.0);
+{ 18100} GHH500i +GHO                =       GHD500Q +      GHO                                    : ARR( 0.140E-09,     0., 0.0);
+{ 18101} GHH500i +GHO                =       GHD500N +      GHO                                    : ARR( 0.269E-10,     0., 0.0);
+{ 18102} GHH500i +GHO                =       G3H500d                                               : ARR( 0.223E-10,     0., 0.0);
+{ 18103} GHH500i +GNO3               =       G3H500d +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18104} GHH500i+HV               =       G1H5018 +      GHO                                    :  0.100E+01*SUN;
+{ 18105} GHH500i+HV               =       G1H5017 +      GHO                                    :  0.100E+01*SUN;
+{ 18106} GHH500i+HV               =       GHD4006 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 18107} G3H500d +GHO2               =  0.800GGH500p + 0.200GAH500v + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18108} G3H500d +GNO                =       GHD4006 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18109} G3H500d +GNO2               =       GPH500w                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18110} G3H500d +GNO3               =       GHD4006 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18111} G3H500d +MEPERO             =  0.685GHD4006 + 0.315GAH500v + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18112} G3H500d +PERO1              =  0.800GHD4006 + 0.200GAH500v + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18113} G3H500d +PERO2              =  0.750GHD4006 + 0.250GAH500v + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18114} G3H500d +PERO3              =  0.800GHD4006 + 0.200GAH500v + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18115} G3H500d +PERO5              =  0.650GHD4006 + 0.350GAH500v + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18116} G3H500d +PERO6              =  0.650GHD4006 + 0.350GAH500v + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18117} G3H500d +PERO9              =       GHD4006 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18118} GHD500M +GHO                =       GDK500K +      GHO                                    : ARR( 0.144E-09,     0., 0.0);
+{ 18119} GHD500M +GHO                =       G3H500e                                               : ARR( 0.229E-10,     0., 0.0);
+{ 18120} GHD500M +GNO3               =       G3H500e +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18121} GHD500M+HV               =       G1D500I +      GHO                                    :  0.100E+01*SUN;
+{ 18122} GHD500M+HV               =       GHD4006 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 18123} G3H500e +GHO2               =  0.800GGH500q + 0.200GAH500w + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18124} G3H500e +GNO                =       GHD4006 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18125} G3H500e +GNO2               =       GPH500x                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18126} G3H500e +GNO3               =       GHD4006 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18127} G3H500e +MEPERO             =  0.685GHD4006 + 0.315GAH500w + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18128} G3H500e +PERO1              =  0.800GHD4006 + 0.200GAH500w + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18129} G3H500e +PERO2              =  0.750GHD4006 + 0.250GAH500w + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18130} G3H500e +PERO3              =  0.800GHD4006 + 0.200GAH500w + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18131} G3H500e +PERO5              =  0.650GHD4006 + 0.350GAH500w + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18132} G3H500e +PERO6              =  0.650GHD4006 + 0.350GAH500w + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18133} G3H500e +PERO9              =       GHD4006 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18134} GHD500N +GHO                =       GHD5013 +      GHO2                                   : ARR( 0.403E-11,     0., 0.0);
+{ 18135} GHD500N +GHO                =       G2H5026                                               : ARR( 0.449E-11,     0., 0.0);
+{ 18136} GHD500N +GHO                =       GDK500L +      GHO                                    : ARR( 0.252E-10,     0., 0.0);
+{ 18137} GHD500N +GHO                =       G3H4004 +      GCO                                    : ARR( 0.127E-10,     0., 0.0);
+{ 18138} GHD500N +GHO                =       G2D500W                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 18139} GHD500N +GNO3               =       G3H4004 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 18140} GHD500N+HV               =       G1D500l +      GHO                                    :  0.100E+01*SUN;
+{ 18141} GHD500N+HV               =       G3H4004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 18142} GHD500N+HV               =       GHD4006 +      GCO                                    :  0.100E+01*SUN;
+{ 18143} GHD500N+HV               =       GHO3001 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 18144} G2H5026 +GNO                =       G1H504M +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18145} G2H5026 +GNO                =       GHN505L                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18146} G2H5026 +GHO2               =       GHH501z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18147} G2H5026 +GNO3               =       G1H504M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18148} G2H5026 +MEPERO             =  0.340G1H504M + 0.330GHD500h + 0.330GHD5014                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18149} G2H5026 +PERO1              =  0.460G1H504M + 0.270GHD500h + 0.270GHD5014                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18150} G2H5026 +PERO2              =  0.400G1H504M + 0.300GHD500h + 0.300GHD5014                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18151} G2H5026 +PERO3              =  0.460G1H504M + 0.270GHD500h + 0.270GHD5014                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18152} G2H5026 +PERO5              =  0.460G1H504M + 0.270GHD500h + 0.270GHD5014                 : ARR( 0.183E-11,   450., 0.0);
+{ 18153} G2H5026 +PERO6              =  0.300G1H504M + 0.350GHD500h + 0.350GHD5014                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18154} G2H5026 +PERO9              =  0.650G1H504M + 0.350GHD5014                                : ARR( 0.100E-10,     0., 0.0);
+{ 18155} G2D500W +GNO                =       G1D500l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18156} G2D500W +GNO                =       GND500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18157} G2D500W +GHO2               =       GHD500N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18158} G2D500W +GNO3               =       G1D500l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18159} G2D500W +MEPERO             =  0.340G1D500l + 0.330GDK500J + 0.330GDK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18160} G2D500W +PERO1              =  0.460G1D500l + 0.270GDK500J + 0.270GDK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18161} G2D500W +PERO2              =  0.400G1D500l + 0.300GDK500J + 0.300GDK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18162} G2D500W +PERO3              =  0.460G1D500l + 0.270GDK500J + 0.270GDK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18163} G2D500W +PERO5              =  0.460G1D500l + 0.270GDK500J + 0.270GDK500L                 : ARR( 0.183E-11,   450., 0.0);
+{ 18164} G2D500W +PERO6              =  0.300G1D500l + 0.350GDK500J + 0.350GDK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18165} G2D500W +PERO9              =  0.650G1D500l + 0.350GDK500L                                : ARR( 0.100E-10,     0., 0.0);
+{ 18166} G1H504M                     =       GCH2O   +      GHD400K +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 18167} G1H504M                     =       GDO2000 +      GDD3002 +      GHO                     : ARR( 0.200E+15,  4556., 0.0);
+{ 18168} GHD500O +GHO                =       G3H500f                                               : ARR( 0.217E-10,     0., 0.0);
+{ 18169} GHD500O +GHO                =       GDD5005 +      GHO                                    : ARR( 0.209E-09,     0., 0.0);
+{ 18170} GHD500O +GHO                =       G3H500g                                               : ARR( 0.217E-10,     0., 0.0);
+{ 18171} GHD500O +GNO3               =       G3H500f +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18172} GHD500O +GNO3               =       G3H500g +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18173} GHD500O+HV               =       GCO     +      GHD400C + 2.000GHO2                    :  0.100E+01*SUN;
+{ 18174} GHD500O+HV               =       G1D500K +      GHO                                    :  0.100E+01*SUN;
+{ 18175} GHD500O+HV               =       G2H400e +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 18176} GHD500O+HV               =       GHD3001 +      GD02000                                :  0.100E+01*SUN;
+{ 18177} G3H500f +GHO2               =  0.800GGH500s + 0.200GAH500y + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18178} G3H500f +GNO                =       GHD400C +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18179} G3H500f +GNO2               =       GPH500z                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18180} G3H500f +GNO3               =       GHD400C +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18181} G3H500f +MEPERO             =  0.685GHD400C + 0.315GAH500y + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18182} G3H500f +PERO1              =  0.800GHD400C + 0.200GAH500y + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18183} G3H500f +PERO2              =  0.750GHD400C + 0.250GAH500y + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18184} G3H500f +PERO3              =  0.800GHD400C + 0.200GAH500y + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18185} G3H500f +PERO5              =  0.650GHD400C + 0.350GAH500y + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18186} G3H500f +PERO6              =  0.650GHD400C + 0.350GAH500y + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18187} G3H500f +PERO9              =       GHD400C +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18188} G3H500g +GHO2               =  0.800GGH500t + 0.200GAH500z + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18189} G3H500g +GNO                =       G2H400e +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18190} G3H500g +GNO2               =       GPH5011                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18191} G3H500g +GNO3               =       G2H400e +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18192} G3H500g +MEPERO             =  0.685G2H400e + 0.315GAH500z + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18193} G3H500g +PERO1              =  0.800G2H400e + 0.200GAH500z + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18194} G3H500g +PERO2              =  0.750G2H400e + 0.250GAH500z + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18195} G3H500g +PERO3              =  0.800G2H400e + 0.200GAH500z + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18196} G3H500g +PERO5              =  0.650G2H400e + 0.350GAH500z + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18197} G3H500g +PERO6              =  0.650G2H400e + 0.350GAH500z + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18198} G3H500g +PERO9              =       G2H400e +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 18199} G2H400e +GNO                =       G1H400j +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 18200} G2H400e +GNO                =       GHN400z                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 18201} G2H400e +GHO2               =       GHH400d                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 18202} G2H400e +GNO3               =       G1H400j +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18203} G2H400e +MEPERO             =  0.480G1H400j + 0.260GHD4009 + 0.260GHD400L                 : ARR( 0.164E-12,  -795., 0.0);
+{ 18204} G2H400e +PERO1              =  0.600G1H400j + 0.200GHD4009 + 0.200GHD400L                 : ARR( 0.126E-12,  -850., 0.0);
+{ 18205} G2H400e +PERO2              =  0.560G1H400j + 0.220GHD4009 + 0.220GHD400L                 : ARR( 0.471E-13, -1350., 0.0);
+{ 18206} G2H400e +PERO3              =  0.600G1H400j + 0.200GHD4009 + 0.200GHD400L                 : ARR( 0.142E-12, -1200., 0.0);
+{ 18207} G2H400e +PERO5              =  0.600G1H400j + 0.200GHD4009 + 0.200GHD400L                 : ARR( 0.533E-11,   500., 0.0);
+{ 18208} G2H400e +PERO6              =  0.460G1H400j + 0.270GHD4009 + 0.270GHD400L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18209} G2H400e +PERO9              =  0.800G1H400j + 0.200GHD400L                                : ARR( 0.100E-10,     0., 0.0);
+{ 18210} G1H400j +OXYGEN             =       GHD400L +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 18211} G1H400j                     =       GDD3001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5636., 0.0);
+{ 18212} GGN5008 +GHO                =       GGN5009 +      GHO2                                   : ARR( 0.106E-10,     0., 0.0);
+{ 18213} GGN5008 +GHO                =       G2G500c                                               : ARR( 0.889E-12,     0., 0.0);
+{ 18214} GGN5008 +GHO                =       G3N5007                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 18215} GGN5008+HV               =       G1G500f +      GNO2                                   :  0.100E+01*SUN;
+{ 18216} GGN5008+HV               =       G2N400D +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 18217} G2G500c +GNO                =       G1G500g +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18218} G2G500c +GNO                =       GGN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18219} G2G500c +GHO2               =       GGH500u                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18220} G2G500c +GNO3               =       G1G500g +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18221} G2G500c +MEPERO             =  0.340G1G500g + 0.330GGN500T + 0.330GGN500t                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18222} G2G500c +PERO1              =  0.460G1G500g + 0.270GGN500T + 0.270GGN500t                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18223} G2G500c +PERO2              =  0.400G1G500g + 0.300GGN500T + 0.300GGN500t                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18224} G2G500c +PERO3              =  0.460G1G500g + 0.270GGN500T + 0.270GGN500t                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18225} G2G500c +PERO5              =  0.460G1G500g + 0.270GGN500T + 0.270GGN500t                 : ARR( 0.183E-11,   450., 0.0);
+{ 18226} G2G500c +PERO6              =  0.300G1G500g + 0.350GGN500T + 0.350GGN500t                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18227} G2G500c +PERO9              =  0.650G1G500g + 0.350GGN500t                                : ARR( 0.100E-10,     0., 0.0);
+{ 18228} G1G500f                     =       G2G500d                                               : ARR( 0.160E+12,  3221., 0.0);
+{ 18229} G1G500g                     =       GND3000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  5847., 0.0);
+{ 18230} G1G500g                     =       GND400C +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 18231} G2G500d +GNO                =       G1G500h +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18232} G2G500d +GNO                =       GGN500u                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18233} G2G500d +GHO2               =       GGH500v                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18234} G2G500d +GNO3               =       G1G500h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18235} G2G500d +MEPERO             =  0.340G1G500h + 0.330GGO500A + 0.330GGK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18236} G2G500d +PERO1              =  0.460G1G500h + 0.270GGO500A + 0.270GGK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18237} G2G500d +PERO2              =  0.400G1G500h + 0.300GGO500A + 0.300GGK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18238} G2G500d +PERO3              =  0.460G1G500h + 0.270GGO500A + 0.270GGK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18239} G2G500d +PERO5              =  0.460G1G500h + 0.270GGO500A + 0.270GGK500B                 : ARR( 0.183E-11,   450., 0.0);
+{ 18240} G2G500d +PERO6              =  0.300G1G500h + 0.350GGO500A + 0.350GGK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18241} G2G500d +PERO9              =  0.650G1G500h + 0.350GGK500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 18242} G1G500h                     =       GGD5003 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 18243} G1G500h                     =       GDO4003 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 18244} GAN5008 +GHO                =       G2A500j                                               : ARR( 0.695E-12,     0., 0.0);
+{ 18245} GAN5008 +GHO                =       GAN5009 +      GHO2                                   : ARR( 0.112E-10,     0., 0.0);
+{ 18246} GAN5008+HV               =       G1A500l +      GNO2                                   :  0.100E+01*SUN;
+{ 18247} G2A500j +GNO                =       G1A500m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18248} G2A500j +GNO                =       GAN500w                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18249} G2A500j +GHO2               =       GAH5011                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18250} G2A500j +GNO3               =       G1A500m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18251} G2A500j +MEPERO             =  0.340G1A500m + 0.330GAN500x + 0.330GAN500y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18252} G2A500j +PERO1              =  0.460G1A500m + 0.270GAN500x + 0.270GAN500y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18253} G2A500j +PERO2              =  0.400G1A500m + 0.300GAN500x + 0.300GAN500y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18254} G2A500j +PERO3              =  0.460G1A500m + 0.270GAN500x + 0.270GAN500y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18255} G2A500j +PERO5              =  0.460G1A500m + 0.270GAN500x + 0.270GAN500y                 : ARR( 0.183E-11,   450., 0.0);
+{ 18256} G2A500j +PERO6              =  0.300G1A500m + 0.350GAN500x + 0.350GAN500y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18257} G2A500j +PERO9              =  0.650G1A500m + 0.350GAN500y                                : ARR( 0.100E-10,     0., 0.0);
+{ 18258} G1A500l +OXYGEN             =       GAD5007 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 18259} G1A500l                     =       G2A500k                                               : ARR( 0.160E+12,  3356., 0.0);
+{ 18260} G1A500m                     =       GCO     +      GND400C +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 18261} G1A500m                     =       GAD2000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  5847., 0.0);
+{ 18262} G2A500k +GNO                =       G1A500n +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18263} G2A500k +GNO                =       GAN500z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18264} G2A500k +GHO2               =       GAH5012                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18265} G2A500k +GNO3               =       G1A500n +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18266} G2A500k +MEPERO             =  0.340G1A500n + 0.330GAO500C + 0.330GAK500N                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18267} G2A500k +PERO1              =  0.460G1A500n + 0.270GAO500C + 0.270GAK500N                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18268} G2A500k +PERO2              =  0.400G1A500n + 0.300GAO500C + 0.300GAK500N                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18269} G2A500k +PERO3              =  0.460G1A500n + 0.270GAO500C + 0.270GAK500N                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18270} G2A500k +PERO5              =  0.460G1A500n + 0.270GAO500C + 0.270GAK500N                 : ARR( 0.183E-11,   450., 0.0);
+{ 18271} G2A500k +PERO6              =  0.300G1A500n + 0.350GAO500C + 0.350GAK500N                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18272} G2A500k +PERO9              =  0.650G1A500n + 0.350GAK500N                                : ARR( 0.100E-10,     0., 0.0);
+{ 18273} G1A500n                     =       GAD5008 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 18274} G1A500n                     =       GDO4003 +      GCO     +      GHO                     : ARR( 0.200E+15,  5173., 0.0);
+{ 18275} GPN5008                     =       G3N5007 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 18276} GPN5008 +GHO                =       GPN5009 +      GHO2                                   : ARR( 0.107E-10,     0., 0.0);
+{ 18277} GPN5008 +GHO                =       G2P500m                                               : ARR( 0.898E-12,     0., 0.0);
+{ 18278} GPN5008+HV               =       G1P500o +      GNO2                                   :  0.100E+01*SUN;
+{ 18279} GPN5008+HV               =       G3N5007 +      GNO2                                   :  0.100E+01*SUN;
+{ 18280} G2P500m +GNO                =       G1P500p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18281} G2P500m +GNO                =       GPN5012                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18282} G2P500m +GHO2               =       GPH5012                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18283} G2P500m +GNO3               =       G1P500p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18284} G2P500m +MEPERO             =  0.340G1P500p + 0.330GPN500e + 0.330GPN5013                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18285} G2P500m +PERO1              =  0.460G1P500p + 0.270GPN500e + 0.270GPN5013                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18286} G2P500m +PERO2              =  0.400G1P500p + 0.300GPN500e + 0.300GPN5013                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18287} G2P500m +PERO3              =  0.460G1P500p + 0.270GPN500e + 0.270GPN5013                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18288} G2P500m +PERO5              =  0.460G1P500p + 0.270GPN500e + 0.270GPN5013                 : ARR( 0.183E-11,   450., 0.0);
+{ 18289} G2P500m +PERO6              =  0.300G1P500p + 0.350GPN500e + 0.350GPN5013                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18290} G2P500m +PERO9              =  0.650G1P500p + 0.350GPN5013                                : ARR( 0.100E-10,     0., 0.0);
+{ 18291} G1P500o                     =       G2P500n                                               : ARR( 0.160E+12,  3221., 0.0);
+{ 18292} G1P500p                     =       GND3000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  5847., 0.0);
+{ 18293} G1P500p                     =       GND400C +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 18294} G2P500n +GNO                =       G1P500q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18295} G2P500n +GNO                =       GPN5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18296} G2P500n +GHO2               =       GPH5013                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18297} G2P500n +GNO3               =       G1P500q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18298} G2P500n +MEPERO             =  0.340G1P500q + 0.330GPO500A + 0.330GPK500B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18299} G2P500n +PERO1              =  0.460G1P500q + 0.270GPO500A + 0.270GPK500B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18300} G2P500n +PERO2              =  0.400G1P500q + 0.300GPO500A + 0.300GPK500B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18301} G2P500n +PERO3              =  0.460G1P500q + 0.270GPO500A + 0.270GPK500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18302} G2P500n +PERO5              =  0.460G1P500q + 0.270GPO500A + 0.270GPK500B                 : ARR( 0.183E-11,   450., 0.0);
+{ 18303} G2P500n +PERO6              =  0.300G1P500q + 0.350GPO500A + 0.350GPK500B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18304} G2P500n +PERO9              =  0.650G1P500q + 0.350GPK500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 18305} G1P500q                     =       GPD5003 +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 18306} G1P500q                     =       GDO4003 +      GCO     +      GNO2                    : ARR( 0.200E+15,  5204., 0.0);
+{ 18307} GND400C +GHO                =       GND400B +      GHO2                                   : ARR( 0.653E-11,     0., 0.0);
+{ 18308} GND400C +GHO                =       G3N400G                                               : ARR( 0.216E-10,     0., 0.0);
+{ 18309} GND400C +GNO3               =       G3N400G +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18310} GND400C+HV               =       G1D4004 +      GNO2                                   :  0.100E+01*SUN;
+{ 18311} GND400C+HV               =       GND3000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 18312} GND500b +GHO                =       GND501D +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 18313} GND500b +GHO                =       G2N504D                                               : ARR( 0.146E-11,     0., 0.0);
+{ 18314} GND500b +GHO                =       GND500c +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 18315} GND500b +GHO                =       G3N500h                                               : ARR( 0.428E-11,     0., 0.0);
+{ 18316} GND500b +GNO3               =       G3N500h +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18317} GND500b+HV               =       G1D500F +      GNO2                                   :  0.100E+01*SUN;
+{ 18318} GND500b+HV               =       GDO4003 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 18319} GND500b+HV               =       GDO3000 +      GND2000                                :  0.100E+01*SUN;
+{ 18320} G2N504D +GNO                =       G1N504b +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18321} G2N504D +GNO                =       GNN502u                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18322} G2N504D +GHO2               =       GHN505M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18323} G2N504D +GNO3               =       G1N504b +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18324} G2N504D +MEPERO             =  0.340G1N504b + 0.330GND500r + 0.330GND501E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18325} G2N504D +PERO1              =  0.460G1N504b + 0.270GND500r + 0.270GND501E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18326} G2N504D +PERO2              =  0.400G1N504b + 0.300GND500r + 0.300GND501E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18327} G2N504D +PERO3              =  0.460G1N504b + 0.270GND500r + 0.270GND501E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18328} G2N504D +PERO5              =  0.460G1N504b + 0.270GND500r + 0.270GND501E                 : ARR( 0.183E-11,   450., 0.0);
+{ 18329} G2N504D +PERO6              =  0.300G1N504b + 0.350GND500r + 0.350GND501E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18330} G2N504D +PERO9              =  0.650G1N504b + 0.350GND501E                                : ARR( 0.100E-10,     0., 0.0);
+{ 18331} G3N500h +GHO2               =  0.800GGN500u + 0.200GAN500z + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18332} G3N500h +GNO                =       GDO4003 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18333} G3N500h +GNO2               =       GPN5014                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18334} G3N500h +GNO3               =       GDO4003 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18335} G3N500h +MEPERO             =  0.685GDO4003 + 0.315GAN500z + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18336} G3N500h +PERO1              =  0.800GDO4003 + 0.200GAN500z + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18337} G3N500h +PERO2              =  0.750GDO4003 + 0.250GAN500z + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18338} G3N500h +PERO3              =  0.800GDO4003 + 0.200GAN500z + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18339} G3N500h +PERO5              =  0.650GDO4003 + 0.350GAN500z + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18340} G3N500h +PERO6              =  0.650GDO4003 + 0.350GAN500z + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18341} G3N500h +PERO9              =       GDO4003 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18342} G1N504b                     =       GDO2000 +      GND3005 +      GHO2                    : ARR( 0.200E+15,  3619., 0.0);
+{ 18343} GHD500P +GHO                =       GHD500Q +      GHO2                                   : ARR( 0.365E-10,     0., 0.0);
+{ 18344} GHD500P +GHO                =       GDK500J +      GHO                                    : ARR( 0.281E-10,     0., 0.0);
+{ 18345} GHD500P +GHO                =       G3H500h                                               : ARR( 0.232E-10,     0., 0.0);
+{ 18346} GHD500P +GNO3               =       G3H500h +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18347} GHD500P+HV               =       G1D500F +      GHO                                    :  0.100E+01*SUN;
+{ 18348} GHD500P+HV               =       GDO4003 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 18349} G3H500h +GHO2               =  0.800GGH500v + 0.200GAH5012 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18350} G3H500h +GNO                =       GDO4003 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18351} G3H500h +GNO2               =       GPH5013                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18352} G3H500h +GNO3               =       GDO4003 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18353} G3H500h +MEPERO             =  0.685GDO4003 + 0.315GAH5012 + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18354} G3H500h +PERO1              =  0.800GDO4003 + 0.200GAH5012 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18355} G3H500h +PERO2              =  0.750GDO4003 + 0.250GAH5012 + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18356} G3H500h +PERO3              =  0.800GDO4003 + 0.200GAH5012 + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18357} G3H500h +PERO5              =  0.650GDO4003 + 0.350GAH5012 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18358} G3H500h +PERO6              =  0.650GDO4003 + 0.350GAH5012 + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18359} G3H500h +PERO9              =       GDO4003 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18360} GDO500B +GHO                =       GDD5002 +      GHO2                                   : ARR( 0.414E-11,     0., 0.0);
+{ 18361} GDO500B +GHO                =       GDK500K +      GHO2                                   : ARR( 0.336E-10,     0., 0.0);
+{ 18362} GDO500B +GHO                =       GDK500J +      GHO2                                   : ARR( 0.646E-11,     0., 0.0);
+{ 18363} GDO500B +GHO                =       G3K500R                                               : ARR( 0.214E-10,     0., 0.0);
+{ 18364} GDO500B +GNO3               =       G3K500R +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18365} GDO500B+HV               =       GDO4003 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 18366} G3K500R +GHO2               =  0.800GGO500A + 0.200GAO500C + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18367} G3K500R +GNO                =       GDO4003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18368} G3K500R +GNO2               =       GPO500A                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18369} G3K500R +GNO3               =       GDO4003 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18370} G3K500R +MEPERO             =  0.685GDO4003 + 0.315GAO500C + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18371} G3K500R +PERO1              =  0.800GDO4003 + 0.200GAO500C + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18372} G3K500R +PERO2              =  0.750GDO4003 + 0.250GAO500C + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18373} G3K500R +PERO3              =  0.800GDO4003 + 0.200GAO500C + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18374} G3K500R +PERO5              =  0.650GDO4003 + 0.350GAO500C + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18375} G3K500R +PERO6              =  0.650GDO4003 + 0.350GAO500C + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18376} G3K500R +PERO9              =       GDO4003 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18377} GDK500J +GHO                =       GDD5009 +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 18378} GDK500J +GHO                =       G2D500X                                               : ARR( 0.453E-11,     0., 0.0);
+{ 18379} GDK500J +GHO                =       GDK500L +      GHO2                                   : ARR( 0.635E-11,     0., 0.0);
+{ 18380} GDK500J +GHO                =       G3K4006 +      GCO                                    : ARR( 0.128E-10,     0., 0.0);
+{ 18381} GDK500J +GNO3               =       G3K4006 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 18382} GDK500J+HV               =       G3K4006 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 18383} GDK500J+HV               =       GDO4003 +      GCO                                    :  0.100E+01*SUN;
+{ 18384} GDK500J+HV               =       GOO3001 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 18385} G2D500X +GNO                =       G1D500m +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18386} G2D500X +GNO                =       GND501F                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18387} G2D500X +GHO2               =       GHD5015                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18388} G2D500X +GNO3               =       G1D500m +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18389} G2D500X +MEPERO             =  0.340G1D500m + 0.330GDK500N + 0.330GDK500a                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18390} G2D500X +PERO1              =  0.460G1D500m + 0.270GDK500N + 0.270GDK500a                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18391} G2D500X +PERO2              =  0.400G1D500m + 0.300GDK500N + 0.300GDK500a                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18392} G2D500X +PERO3              =  0.460G1D500m + 0.270GDK500N + 0.270GDK500a                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18393} G2D500X +PERO5              =  0.460G1D500m + 0.270GDK500N + 0.270GDK500a                 : ARR( 0.183E-11,   450., 0.0);
+{ 18394} G2D500X +PERO6              =  0.300G1D500m + 0.350GDK500N + 0.350GDK500a                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18395} G2D500X +PERO9              =  0.650G1D500m + 0.350GDK500a                                : ARR( 0.100E-10,     0., 0.0);
+{ 18396} G1D500m                     =       GCH2O   +      GDD4004 +      GHO2                    : ARR( 0.200E+15,  4465., 0.0);
+{ 18397} G1D500m                     =       GDO2000 +      GDD3002 +      GHO2                    : ARR( 0.200E+15,  3347., 0.0);
+{ 18398} GDD5002 +GHO                =       G3D5003                                               : ARR( 0.218E-10,     0., 0.0);
+{ 18399} GDD5002 +GHO                =       GDD5005 +      GHO2                                   : ARR( 0.109E-09,     0., 0.0);
+{ 18400} GDD5002 +GHO                =       G3D5004                                               : ARR( 0.218E-10,     0., 0.0);
+{ 18401} GDD5002 +GNO3               =       G3D5003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18402} GDD5002 +GNO3               =       G3D5004 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18403} GDD5002+HV               =       GCO     +      G2D400A +      GHO2                    :  0.100E+01*SUN;
+{ 18404} GDD5002+HV               =       GD02000 +      GDK3001                                :  0.100E+01*SUN;
+{ 18405} GDD5002+HV               =       GDD4001 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 18406} G3D5003 +GHO2               =  0.800GGD5007 + 0.200GAD5009 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18407} G3D5003 +GNO                =       G2D400A +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18408} G3D5003 +GNO2               =       GPD5007                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18409} G3D5003 +GNO3               =       G2D400A +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18410} G3D5003 +MEPERO             =  0.685G2D400A + 0.315GAD5009 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18411} G3D5003 +PERO1              =  0.800G2D400A + 0.200GAD5009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18412} G3D5003 +PERO2              =  0.750G2D400A + 0.250GAD5009 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18413} G3D5003 +PERO3              =  0.800G2D400A + 0.200GAD5009 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18414} G3D5003 +PERO5              =  0.650G2D400A + 0.350GAD5009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18415} G3D5003 +PERO6              =  0.650G2D400A + 0.350GAD5009 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18416} G3D5003 +PERO9              =       G2D400A +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 18417} G3D5004 +GHO2               =  0.800GGD5003 + 0.200GAD5008 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18418} G3D5004 +GNO                =       GDD4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18419} G3D5004 +GNO2               =       GPD5003                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18420} G3D5004 +GNO3               =       GDD4001 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18421} G3D5004 +MEPERO             =  0.685GDD4001 + 0.315GAD5008 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18422} G3D5004 +PERO1              =  0.800GDD4001 + 0.200GAD5008 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18423} G3D5004 +PERO2              =  0.750GDD4001 + 0.250GAD5008 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18424} G3D5004 +PERO3              =  0.800GDD4001 + 0.200GAD5008 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18425} G3D5004 +PERO5              =  0.650GDD4001 + 0.350GAD5008 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18426} G3D5004 +PERO6              =  0.650GDD4001 + 0.350GAD5008 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18427} G3D5004 +PERO9              =       GDD4001 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18428} G2D400A +GNO                =       G1D400G +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 18429} G2D400A +GNO                =       GND400F                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 18430} G2D400A +GHO2               =       GHD400E                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 18431} G2D400A +GNO3               =       G1D400G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18432} G2D400A +MEPERO             =  0.480G1D400G + 0.260GDO4006 + 0.260GDD4003                 : ARR( 0.164E-12,  -795., 0.0);
+{ 18433} G2D400A +PERO1              =  0.600G1D400G + 0.200GDO4006 + 0.200GDD4003                 : ARR( 0.126E-12,  -850., 0.0);
+{ 18434} G2D400A +PERO2              =  0.560G1D400G + 0.220GDO4006 + 0.220GDD4003                 : ARR( 0.471E-13, -1350., 0.0);
+{ 18435} G2D400A +PERO3              =  0.600G1D400G + 0.200GDO4006 + 0.200GDD4003                 : ARR( 0.142E-12, -1200., 0.0);
+{ 18436} G2D400A +PERO5              =  0.600G1D400G + 0.200GDO4006 + 0.200GDD4003                 : ARR( 0.533E-11,   500., 0.0);
+{ 18437} G2D400A +PERO6              =  0.460G1D400G + 0.270GDO4006 + 0.270GDD4003                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18438} G2D400A +PERO9              =  0.800G1D400G + 0.200GDD4003                                : ARR( 0.100E-10,     0., 0.0);
+{ 18439} G1D400G                     =       GDD3001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4427., 0.0);
+{ 18440} GGN5009 +GHO                =       G2G500e                                               : ARR( 0.566E-12,     0., 0.0);
+{ 18441} GGN5009 +GHO                =       G3N5008                                               : ARR( 0.205E-11,  -190., 0.0);
+{ 18442} GGN5009+HV               =       G1G500I +      GNO2                                   :  0.100E+01*SUN;
+{ 18443} GGN5009+HV               =       G3N3000 +      G2G2000                                :  0.100E+01*SUN;
+{ 18444} GGN5009+HV               =       G2N400E +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 18445} G2G500e +GNO                =       G1G500i +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18446} G2G500e +GNO                =       GGN500v                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18447} G2G500e +GHO2               =       GGH500w                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18448} G2G500e +GNO3               =       G1G500i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18449} G2G500e +MEPERO             =  0.340G1G500i + 0.330GGN500j + 0.330GGN500w                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18450} G2G500e +PERO1              =  0.460G1G500i + 0.270GGN500j + 0.270GGN500w                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18451} G2G500e +PERO2              =  0.400G1G500i + 0.300GGN500j + 0.300GGN500w                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18452} G2G500e +PERO3              =  0.460G1G500i + 0.270GGN500j + 0.270GGN500w                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18453} G2G500e +PERO5              =  0.460G1G500i + 0.270GGN500j + 0.270GGN500w                 : ARR( 0.183E-11,   450., 0.0);
+{ 18454} G2G500e +PERO6              =  0.300G1G500i + 0.350GGN500j + 0.350GGN500w                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18455} G2G500e +PERO9              =  0.650G1G500i + 0.350GGN500w                                : ARR( 0.100E-10,     0., 0.0);
+{ 18456} G1G500i                     =       G3N3000 +      GGD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 18457} GAN5009 +GHO                =       G2A500l                                               : ARR( 0.389E-12,     0., 0.0);
+{ 18458} GAN5009 +GHO                =       G2A500m                                               : ARR( 0.172E-12,     0., 0.0);
+{ 18459} GAN5009 +GHO                =       GAD5004 +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{ 18460} GAN5009 +GHO                =       G2N400E +      GCO2                                   : ARR( 0.520E-12,     0., 0.0);
+{ 18461} GAN5009+HV               =       G3A3000 +      G2N2000                                :  0.100E+01*SUN;
+{ 18462} GAN5009+HV               =       G1A500L +      GNO2                                   :  0.100E+01*SUN;
+{ 18463} G2A500l +GNO                =       G1A500o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18464} G2A500l +GNO                =       GAN5011                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18465} G2A500l +GHO2               =       GAH5013                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18466} G2A500l +GNO3               =       G1A500o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18467} G2A500l +MEPERO             =  0.340G1A500o + 0.330GAN500q + 0.330GAN5012                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18468} G2A500l +PERO1              =  0.460G1A500o + 0.270GAN500q + 0.270GAN5012                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18469} G2A500l +PERO2              =  0.400G1A500o + 0.300GAN500q + 0.300GAN5012                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18470} G2A500l +PERO3              =  0.460G1A500o + 0.270GAN500q + 0.270GAN5012                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18471} G2A500l +PERO5              =  0.460G1A500o + 0.270GAN500q + 0.270GAN5012                 : ARR( 0.183E-11,   450., 0.0);
+{ 18472} G2A500l +PERO6              =  0.300G1A500o + 0.350GAN500q + 0.350GAN5012                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18473} G2A500l +PERO9              =  0.650G1A500o + 0.350GAN5012                                : ARR( 0.100E-10,     0., 0.0);
+{ 18474} G2A500m +GNO                =       G1A500p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18475} G2A500m +GNO                =       GAN5013                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18476} G2A500m +GHO2               =       GAH5014                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18477} G2A500m +GNO3               =       G1A500p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18478} G2A500m +MEPERO             =  0.340G1A500p + 0.330GAN500L + 0.330GAN5014                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18479} G2A500m +PERO1              =  0.460G1A500p + 0.270GAN500L + 0.270GAN5014                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18480} G2A500m +PERO2              =  0.400G1A500p + 0.300GAN500L + 0.300GAN5014                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18481} G2A500m +PERO3              =  0.460G1A500p + 0.270GAN500L + 0.270GAN5014                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18482} G2A500m +PERO5              =  0.460G1A500p + 0.270GAN500L + 0.270GAN5014                 : ARR( 0.183E-11,   450., 0.0);
+{ 18483} G2A500m +PERO6              =  0.300G1A500p + 0.350GAN500L + 0.350GAN5014                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18484} G2A500m +PERO9              =  0.650G1A500p + 0.350GAN5014                                : ARR( 0.100E-10,     0., 0.0);
+{ 18485} G1A500o                     =       GAD2000 +      G3N3000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 18486} G1A500p                     =       G3A3000 +      GND2000                                : ARR( 0.200E+15,  2978., 0.0);
+{ 18487} GPN5009                     =       G3N5008 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 18488} GPN5009 +GHO                =       GPD5004 +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{ 18489} GPN5009 +GHO                =       G2P500o                                               : ARR( 0.172E-12,     0., 0.0);
+{ 18490} GPN5009 +GHO                =       G2P500p                                               : ARR( 0.525E-12,     0., 0.0);
+{ 18491} GPN5009+HV               =       G1P500N +      GNO2                                   :  0.100E+01*SUN;
+{ 18492} GPN5009+HV               =       G3N3000 +      G2P2000                                :  0.100E+01*SUN;
+{ 18493} GPN5009+HV               =       G3N5008 +      GNO2                                   :  0.100E+01*SUN;
+{ 18494} G2P500o +GNO                =       G1P500r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18495} G2P500o +GNO                =       GPN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18496} G2P500o +GHO2               =       GPH5014                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18497} G2P500o +GNO3               =       G1P500r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18498} G2P500o +MEPERO             =  0.340G1P500r + 0.330GPN500L + 0.330GPN5016                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18499} G2P500o +PERO1              =  0.460G1P500r + 0.270GPN500L + 0.270GPN5016                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18500} G2P500o +PERO2              =  0.400G1P500r + 0.300GPN500L + 0.300GPN5016                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18501} G2P500o +PERO3              =  0.460G1P500r + 0.270GPN500L + 0.270GPN5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18502} G2P500o +PERO5              =  0.460G1P500r + 0.270GPN500L + 0.270GPN5016                 : ARR( 0.183E-11,   450., 0.0);
+{ 18503} G2P500o +PERO6              =  0.300G1P500r + 0.350GPN500L + 0.350GPN5016                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18504} G2P500o +PERO9              =  0.650G1P500r + 0.350GPN5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 18505} G2P500p +GNO                =       G1P500s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18506} G2P500p +GNO                =       GPN5017                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18507} G2P500p +GHO2               =       GPH5015                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18508} G2P500p +GNO3               =       G1P500s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18509} G2P500p +MEPERO             =  0.340G1P500s + 0.330GPN500v + 0.330GPN5018                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18510} G2P500p +PERO1              =  0.460G1P500s + 0.270GPN500v + 0.270GPN5018                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18511} G2P500p +PERO2              =  0.400G1P500s + 0.300GPN500v + 0.300GPN5018                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18512} G2P500p +PERO3              =  0.460G1P500s + 0.270GPN500v + 0.270GPN5018                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18513} G2P500p +PERO5              =  0.460G1P500s + 0.270GPN500v + 0.270GPN5018                 : ARR( 0.183E-11,   450., 0.0);
+{ 18514} G2P500p +PERO6              =  0.300G1P500s + 0.350GPN500v + 0.350GPN5018                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18515} G2P500p +PERO9              =  0.650G1P500s + 0.350GPN5018                                : ARR( 0.100E-10,     0., 0.0);
+{ 18516} G1P500r                     =       GND2000 +      G3P3000                                : ARR( 0.200E+15,  2978., 0.0);
+{ 18517} G1P500s                     =       G3N3000 +      GPD2000                                : ARR( 0.200E+15,  5332., 0.0);
+{ 18518} GDD5003 +GHO                =       G3D5005                                               : ARR( 0.133E-09,     0., 0.0);
+{ 18519} GDD5003 +GNO3               =       G3D5005 +      GHNO3                                  : ARR( 0.240E-13,     0., 0.0);
+{ 18520} GDD5003+HV               =       GCO     +      G2D400B                                :  0.100E+01*SUN;
+{ 18521} GDD5003+HV               =       G3D3000 +      G2D2000                                :  0.100E+01*SUN;
+{ 18522} GDD5003+HV               =       G2D400B +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 18523} G3D5005 +GHO2               =  0.800GGD5004 + 0.200GAD5004 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18524} G3D5005 +GNO                =       G2D400B +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18525} G3D5005 +GNO2               =       GPD5004                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18526} G3D5005 +GNO3               =       G2D400B +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18527} G3D5005 +MEPERO             =  0.685G2D400B + 0.315GAD5004 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18528} G3D5005 +PERO1              =  0.800G2D400B + 0.200GAD5004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18529} G3D5005 +PERO2              =  0.750G2D400B + 0.250GAD5004 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18530} G3D5005 +PERO3              =  0.800G2D400B + 0.200GAD5004 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18531} G3D5005 +PERO5              =  0.650G2D400B + 0.350GAD5004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18532} G3D5005 +PERO6              =  0.650G2D400B + 0.350GAD5004 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18533} G3D5005 +PERO9              =       G2D400B +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 18534} G2D400B +GNO                =       G1D4006 +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 18535} G2D400B +GNO                =       GND4004                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 18536} G2D400B +GHO2               =       GHD4004                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 18537} G2D400B +GNO3               =       G1D4006 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18538} G2D400B +MEPERO             =  0.480G1D4006 + 0.260GDK4001 + 0.260GDD4002                 : ARR( 0.164E-12,  -795., 0.0);
+{ 18539} G2D400B +PERO1              =  0.600G1D4006 + 0.200GDK4001 + 0.200GDD4002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 18540} G2D400B +PERO2              =  0.560G1D4006 + 0.220GDK4001 + 0.220GDD4002                 : ARR( 0.471E-13, -1350., 0.0);
+{ 18541} G2D400B +PERO3              =  0.600G1D4006 + 0.200GDK4001 + 0.200GDD4002                 : ARR( 0.142E-12, -1200., 0.0);
+{ 18542} G2D400B +PERO5              =  0.600G1D4006 + 0.200GDK4001 + 0.200GDD4002                 : ARR( 0.533E-11,   500., 0.0);
+{ 18543} G2D400B +PERO6              =  0.460G1D4006 + 0.270GDK4001 + 0.270GDD4002                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18544} G2D400B +PERO9              =  0.800G1D4006 + 0.200GDD4002                                : ARR( 0.100E-10,     0., 0.0);
+{ 18545} GNN400C +GHO                =       GND4004 +      GNO2                                   : ARR( 0.146E-12,     0., 0.0);
+{ 18546} GNN400C +GHO                =       G2N400m                                               : ARR( 0.172E-12,     0., 0.0);
+{ 18547} GNN400C +GHO                =       GND400B +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{ 18548} GNN400C+HV               =       G1N400K +      GNO2                                   :  0.100E+01*SUN;
+{ 18549} GNN400C+HV               =       G3N3000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 18550} GNN400C+HV               =       G1N400E +      GNO2                                   :  0.100E+01*SUN;
+{ 18551} G2N400m +GNO                =       G1N400q +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 18552} G2N400m +GNO                =       GNN400X                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 18553} G2N400m +GHO2               =       GHN4011                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 18554} G2N400m +GNO3               =       G1N400q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18555} G2N400m +MEPERO             =  0.340G1N400q + 0.330GNN400J + 0.330GNN400Y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18556} G2N400m +PERO1              =  0.460G1N400q + 0.270GNN400J + 0.270GNN400Y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18557} G2N400m +PERO2              =  0.400G1N400q + 0.300GNN400J + 0.300GNN400Y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18558} G2N400m +PERO3              =  0.460G1N400q + 0.270GNN400J + 0.270GNN400Y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18559} G2N400m +PERO5              =  0.460G1N400q + 0.270GNN400J + 0.270GNN400Y                 : ARR( 0.183E-11,   450., 0.0);
+{ 18560} G2N400m +PERO6              =  0.300G1N400q + 0.350GNN400J + 0.350GNN400Y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18561} G2N400m +PERO9              =  0.650G1N400q + 0.350GNN400Y                                : ARR( 0.100E-10,     0., 0.0);
+{ 18562} G1N400q                     =       G3N2000 +      GND2000                                : ARR( 0.200E+15,  2947., 0.0);
+{ 18563} GHN400K +GHO                =       GND400B +      GHO                                    : ARR( 0.100E-10,     0., 0.0);
+{ 18564} GHN400K +GHO                =       G2N400E                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 18565} GHN400K+HV               =       G1H400K +      GNO2                                   :  0.100E+01*SUN;
+{ 18566} GHN400K+HV               =       G3N3000 +      GCH2O   +      GHO                     :  0.100E+01*SUN;
+{ 18567} GHN400K+HV               =       G1N400E +      GHO                                    :  0.100E+01*SUN;
+{ 18568} GND500c +GHO                =       GND501G +      GHO2                                   : ARR( 0.135E-10,     0., 0.0);
+{ 18569} GND500c +GHO                =       G3N500i                                               : ARR( 0.441E-11,     0., 0.0);
+{ 18570} GND500c +GNO3               =       G3N500i +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18571} GND500c+HV               =       G3K3001 +      GDD2000 +      GNO2                    :  0.100E+01*SUN;
+{ 18572} GND500c+HV               =       G1D500H +      GNO2                                   :  0.100E+01*SUN;
+{ 18573} GND500c+HV               =       GDK4005 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 18574} G3N500i +GHO2               =  0.800GGN500X + 0.200GAN500f + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18575} G3N500i +GNO                =       GDK4005 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18576} G3N500i +GNO2               =       GPN500h                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18577} G3N500i +GNO3               =       GDK4005 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18578} G3N500i +MEPERO             =  0.685GDK4005 + 0.315GAN500f + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18579} G3N500i +PERO1              =  0.800GDK4005 + 0.200GAN500f + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18580} G3N500i +PERO2              =  0.750GDK4005 + 0.250GAN500f + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18581} G3N500i +PERO3              =  0.800GDK4005 + 0.200GAN500f + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18582} G3N500i +PERO5              =  0.650GDK4005 + 0.350GAN500f + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18583} G3N500i +PERO6              =  0.650GDK4005 + 0.350GAN500f + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18584} G3N500i +PERO9              =       GDK4005 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18585} GHD500Q +GHO                =       GHD5016 +      GHO2                                   : ARR( 0.134E-10,     0., 0.0);
+{ 18586} GHD500Q +GHO                =       GDK500L +      GHO                                    : ARR( 0.161E-10,     0., 0.0);
+{ 18587} GHD500Q +GHO                =       G3H500i                                               : ARR( 0.691E-10,     0., 0.0);
+{ 18588} GHD500Q +GNO3               =       G3H500i +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18589} GHD500Q+HV               =       G3K3001 +      GDD2000 +      GHO                     :  0.100E+01*SUN;
+{ 18590} GHD500Q+HV               =       G1D500H +      GHO                                    :  0.100E+01*SUN;
+{ 18591} GHD500Q+HV               =       GDK4005 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 18592} G3H500i +GHO2               =  0.800GGH500S + 0.200GAH500U + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18593} G3H500i +GNO                =       GDK4005 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18594} G3H500i +GNO2               =       GPH500X                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18595} G3H500i +GNO3               =       GDK4005 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18596} G3H500i +MEPERO             =  0.685GDK4005 + 0.315GAH500U + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18597} G3H500i +PERO1              =  0.800GDK4005 + 0.200GAH500U + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18598} G3H500i +PERO2              =  0.750GDK4005 + 0.250GAH500U + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18599} G3H500i +PERO3              =  0.800GDK4005 + 0.200GAH500U + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18600} G3H500i +PERO5              =  0.650GDK4005 + 0.350GAH500U + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18601} G3H500i +PERO6              =  0.650GDK4005 + 0.350GAH500U + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18602} G3H500i +PERO9              =       GDK4005 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18603} GDK500K +GHO                =       GDD5005 +      GHO2                                   : ARR( 0.136E-10,     0., 0.0);
+{ 18604} GDK500K +GHO                =       G3K500S                                               : ARR( 0.700E-10,     0., 0.0);
+{ 18605} GDK500K +GNO3               =       G3K500S +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18606} GDK500K+HV               =       G3K3001 +      GDD2000 +      GHO2                    :  0.100E+01*SUN;
+{ 18607} GDK500K+HV               =       GDK4005 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 18608} G3K500S +GHO2               =  0.800GGK500G + 0.200GAK500E + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18609} G3K500S +GNO                =       GDK4005 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 18610} G3K500S +GNO2               =       GPK500G                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18611} G3K500S +GNO3               =       GDK4005 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 18612} G3K500S +MEPERO             =  0.685GDK4005 + 0.315GAK500E + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18613} G3K500S +PERO1              =  0.800GDK4005 + 0.200GAK500E + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18614} G3K500S +PERO2              =  0.750GDK4005 + 0.250GAK500E + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18615} G3K500S +PERO3              =  0.800GDK4005 + 0.200GAK500E + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18616} G3K500S +PERO5              =  0.650GDK4005 + 0.350GAK500E + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18617} G3K500S +PERO6              =  0.650GDK4005 + 0.350GAK500E + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 18618} G3K500S +PERO9              =       GDK4005 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 18619} GDK500L +GHO                =       GDD500A +      GHO2                                   : ARR( 0.133E-10,     0., 0.0);
+{ 18620} GDK500L +GHO                =       G3K3001 + 2.000GCO                                    : ARR( 0.132E-10,     0., 0.0);
+{ 18621} GDK500L +GNO3               =       G3K3001 +      GHNO3   + 2.000GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 18622} GDK500L+HV               =       G3K3001 +      G3D2000                                :  0.100E+01*SUN;
+{ 18623} GDK500L+HV               =       G3K3001 +      GCO     +      GCO     +      GHO2     :  0.100E+01*SUN;
+{ 18624} GDK500L+HV               =       GDK4005 +      GCO                                    :  0.100E+01*SUN;
+{ 18625} GDK500L+HV               =       GDO3000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 18626} GGN500A +GHO                =       G2G500f                                               : ARR( 0.291E-12,     0., 0.0);
+{ 18627} GGN500A +GHO                =       G2G500g                                               : ARR( 0.291E-12,     0., 0.0);
+{ 18628} GGN500A +GHO                =       G3N500a                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 18629} GGN500A+HV               =       G1G500j +      GNO2                                   :  0.100E+01*SUN;
+{ 18630} GGN500A+HV               =       G1G5007 +      GNO2                                   :  0.100E+01*SUN;
+{ 18631} GGN500A+HV               =       GND4001 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 18632} G2G500f +GNO                =       G1G500k +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18633} G2G500f +GNO                =       GGN500x                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18634} G2G500f +GHO2               =       GGH500x                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18635} G2G500f +GNO3               =       G1G500k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18636} G2G500f +MEPERO             =  0.340G1G500k + 0.330GGN500E + 0.330GGN500y                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18637} G2G500f +PERO1              =  0.460G1G500k + 0.270GGN500E + 0.270GGN500y                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18638} G2G500f +PERO2              =  0.400G1G500k + 0.300GGN500E + 0.300GGN500y                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18639} G2G500f +PERO3              =  0.460G1G500k + 0.270GGN500E + 0.270GGN500y                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18640} G2G500f +PERO5              =  0.460G1G500k + 0.270GGN500E + 0.270GGN500y                 : ARR( 0.183E-11,   450., 0.0);
+{ 18641} G2G500f +PERO6              =  0.300G1G500k + 0.350GGN500E + 0.350GGN500y                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18642} G2G500f +PERO9              =  0.650G1G500k + 0.350GGN500y                                : ARR( 0.100E-10,     0., 0.0);
+{ 18643} G2G500g +GNO                =       G1G500l +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18644} G2G500g +GNO                =       GGN500z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18645} G2G500g +GHO2               =       GGH500y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18646} G2G500g +GNO3               =       G1G500l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18647} G2G500g +MEPERO             =  0.340G1G500l + 0.330GGN500s + 0.330GGN500v                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18648} G2G500g +PERO1              =  0.460G1G500l + 0.270GGN500s + 0.270GGN500v                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18649} G2G500g +PERO2              =  0.400G1G500l + 0.300GGN500s + 0.300GGN500v                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18650} G2G500g +PERO3              =  0.460G1G500l + 0.270GGN500s + 0.270GGN500v                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18651} G2G500g +PERO5              =  0.460G1G500l + 0.270GGN500s + 0.270GGN500v                 : ARR( 0.183E-11,   450., 0.0);
+{ 18652} G2G500g +PERO6              =  0.300G1G500l + 0.350GGN500s + 0.350GGN500v                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18653} G2G500g +PERO9              =  0.650G1G500l + 0.350GGN500v                                : ARR( 0.100E-10,     0., 0.0);
+{ 18654} G1G500j +OXYGEN             =       GGN5011 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 18655} G1G500j                     =       GGK5005 +      GNO2                                   : ARR( 0.800E+11,  4245., 0.0);
+{ 18656} G1G500k                     =       GND2000 +      G2G3003                                : ARR( 0.200E+15,  7116., 0.0);
+{ 18657} G1G500l                     =       G2N2000 +      GGN3005                                : ARR( 0.200E+15,  6244., 0.0);
+{ 18658} G1G500l                     =       GND3000 +      GGD2000 +      GNO2                    : ARR( 0.200E+15,  6422., 0.0);
+{ 18659} GGH5007 +GHO                =       GGN500C +      GHO                                    : ARR( 0.265E-10,     0., 0.0);
+{ 18660} GGH5007 +GHO                =       G2G5006                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 18661} GGH5007 +GHO                =       G3H500T                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 18662} GGH5007+HV               =       G1G500m +      GNO2                                   :  0.100E+01*SUN;
+{ 18663} GGH5007+HV               =       G1G5007 +      GHO                                    :  0.100E+01*SUN;
+{ 18664} GGH5007+HV               =       GND4001 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 18665} G1G500m                     =       GGK5005 +      GHO                                    : ARR( 0.800E+11,  1899., 0.0);
+{ 18666} GGN500B +GHO                =       G2G500h                                               : ARR( 0.147E-11,     0., 0.0);
+{ 18667} GGN500B +GHO                =       GGN500C +      GHO2                                   : ARR( 0.654E-11,     0., 0.0);
+{ 18668} GGN500B +GHO                =       G3N500J                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 18669} GGN500B+HV               =       G1G500n +      GNO2                                   :  0.100E+01*SUN;
+{ 18670} GGN500B+HV               =       GND4001 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 18671} G2G500h +GNO                =       G1G500o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18672} G2G500h +GNO                =       GGN500h                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18673} G2G500h +GHO2               =       GGH500z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18674} G2G500h +GNO3               =       G1G500o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18675} G2G500h +MEPERO             =  0.340G1G500o + 0.330GGN500T + 0.330GGN500j                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18676} G2G500h +PERO1              =  0.460G1G500o + 0.270GGN500T + 0.270GGN500j                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18677} G2G500h +PERO2              =  0.400G1G500o + 0.300GGN500T + 0.300GGN500j                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18678} G2G500h +PERO3              =  0.460G1G500o + 0.270GGN500T + 0.270GGN500j                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18679} G2G500h +PERO5              =  0.460G1G500o + 0.270GGN500T + 0.270GGN500j                 : ARR( 0.183E-11,   450., 0.0);
+{ 18680} G2G500h +PERO6              =  0.300G1G500o + 0.350GGN500T + 0.350GGN500j                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18681} G2G500h +PERO9              =  0.650G1G500o + 0.350GGN500j                                : ARR( 0.100E-10,     0., 0.0);
+{ 18682} G1G500n                     =       GGK5005 +      GHO2                                   : ARR( 0.800E+11,  2246., 0.0);
+{ 18683} G1G500o                     =       GND3000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 18684} GGN500C +GHO                =       G2G500i                                               : ARR( 0.904E-12,     0., 0.0);
+{ 18685} GGN500C +GHO                =       G2G500j                                               : ARR( 0.869E-12,     0., 0.0);
+{ 18686} GGN500C +GHO                =       G3N500j                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 18687} GGN500C+HV               =       G1G500p +      GNO2                                   :  0.100E+01*SUN;
+{ 18688} GGN500C+HV               =       GAN4000 +      GCO2                                   :  0.100E+01*SUN;
+{ 18689} G2G500i +GNO                =       G1G500q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18690} G2G500i +GNO                =       GGN5012                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18691} G2G500i +GHO2               =       GGH5011                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18692} G2G500i +GNO3               =       G1G500q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18693} G2G500i +MEPERO             =  0.340G1G500q + 0.330GGN500M + 0.330GGN5013                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18694} G2G500i +PERO1              =  0.460G1G500q + 0.270GGN500M + 0.270GGN5013                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18695} G2G500i +PERO2              =  0.400G1G500q + 0.300GGN500M + 0.300GGN5013                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18696} G2G500i +PERO3              =  0.460G1G500q + 0.270GGN500M + 0.270GGN5013                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18697} G2G500i +PERO5              =  0.460G1G500q + 0.270GGN500M + 0.270GGN5013                 : ARR( 0.183E-11,   450., 0.0);
+{ 18698} G2G500i +PERO6              =  0.300G1G500q + 0.350GGN500M + 0.350GGN5013                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18699} G2G500i +PERO9              =  0.650G1G500q + 0.350GGN5013                                : ARR( 0.100E-10,     0., 0.0);
+{ 18700} G2G500j +GNO                =       G1G500r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18701} G2G500j +GNO                =       GGN5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18702} G2G500j +GHO2               =       GGH5012                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18703} G2G500j +GNO3               =       G1G500r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18704} G2G500j +MEPERO             =  0.340G1G500r + 0.330GGN500t + 0.330GGN500w                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18705} G2G500j +PERO1              =  0.460G1G500r + 0.270GGN500t + 0.270GGN500w                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18706} G2G500j +PERO2              =  0.400G1G500r + 0.300GGN500t + 0.300GGN500w                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18707} G2G500j +PERO3              =  0.460G1G500r + 0.270GGN500t + 0.270GGN500w                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18708} G2G500j +PERO5              =  0.460G1G500r + 0.270GGN500t + 0.270GGN500w                 : ARR( 0.183E-11,   450., 0.0);
+{ 18709} G2G500j +PERO6              =  0.300G1G500r + 0.350GGN500t + 0.350GGN500w                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18710} G2G500j +PERO9              =  0.650G1G500r + 0.350GGN500w                                : ARR( 0.100E-10,     0., 0.0);
+{ 18711} G3N500j +GHO2               =  0.800GGN500C + 0.200GAN500C + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18712} G3N500j +GNO                =       G3N4000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18713} G3N500j +GNO2               =       GPN500E                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18714} G3N500j +GNO3               =       G3N4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18715} G3N500j +MEPERO             =  0.685G3N4000 + 0.315GAN500C + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18716} G3N500j +PERO1              =  0.800G3N4000 + 0.200GAN500C + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18717} G3N500j +PERO2              =  0.750G3N4000 + 0.250GAN500C + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18718} G3N500j +PERO3              =  0.800G3N4000 + 0.200GAN500C + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18719} G3N500j +PERO5              =  0.650G3N4000 + 0.350GAN500C + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18720} G3N500j +PERO6              =  0.650G3N4000 + 0.350GAN500C + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18721} G3N500j +PERO9              =       G3N4000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 18722} G1G500p +OXYGEN             =       GGD5008 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 18723} G1G500q                     =       GND2000 +      G2G3005                                : ARR( 0.200E+15,  6866., 0.0);
+{ 18724} G1G500r                     =       GND3000 +      GCO     +      GHO2    +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 18725} GGN500D +GHO                =       GGN5011 +      GHO2                                   : ARR( 0.424E-11,     0., 0.0);
+{ 18726} GGN500D +GHO                =       G2G500k                                               : ARR( 0.149E-11,     0., 0.0);
+{ 18727} GGN500D +GHO                =       G3N5009                                               : ARR( 0.200E-11,  -190., 0.0);
+{ 18728} GGN500D+HV               =       G1G5008 +      GNO2                                   :  0.100E+01*SUN;
+{ 18729} GGN500D+HV               =       GDO4000 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 18730} G2G500k +GNO                =       G1G500s +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18731} G2G500k +GNO                =       GGN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18732} G2G500k +GHO2               =       GGH5013                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18733} G2G500k +GNO3               =       G1G500s +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18734} G2G500k +MEPERO             =  0.340G1G500s + 0.330GGN500H + 0.330GGN5016                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18735} G2G500k +PERO1              =  0.460G1G500s + 0.270GGN500H + 0.270GGN5016                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18736} G2G500k +PERO2              =  0.400G1G500s + 0.300GGN500H + 0.300GGN5016                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18737} G2G500k +PERO3              =  0.460G1G500s + 0.270GGN500H + 0.270GGN5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18738} G2G500k +PERO5              =  0.460G1G500s + 0.270GGN500H + 0.270GGN5016                 : ARR( 0.183E-11,   450., 0.0);
+{ 18739} G2G500k +PERO6              =  0.300G1G500s + 0.350GGN500H + 0.350GGN5016                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18740} G2G500k +PERO9              =  0.650G1G500s + 0.350GGN5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 18741} G1G500s                     =       GCH2O   +      GGN400M +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 18742} GGH5008 +GHO                =       GGH5014 +      GHO2                                   : ARR( 0.435E-11,     0., 0.0);
+{ 18743} GGH5008 +GHO                =       GGK5005 +      GHO                                    : ARR( 0.272E-10,     0., 0.0);
+{ 18744} GGH5008 +GHO                =       G2G5007                                               : ARR( 0.206E-11,  -190., 0.0);
+{ 18745} GGH5008 +GHO                =       G3H5005                                               : ARR( 0.206E-11,  -190., 0.0);
+{ 18746} GGH5008+HV               =       G1G5008 +      GHO                                    :  0.100E+01*SUN;
+{ 18747} GGH5008+HV               =       GDO4000 +      GHO     +      GHO     +      GCO2     :  0.100E+01*SUN;
+{ 18748} GGO5007 +GHO                =       GGD5000 +      GHO2                                   : ARR( 0.409E-11,     0., 0.0);
+{ 18749} GGO5007 +GHO                =       G2G500l                                               : ARR( 0.144E-11,     0., 0.0);
+{ 18750} GGO5007 +GHO                =       G2G500m                                               : ARR( 0.144E-11,     0., 0.0);
+{ 18751} GGO5007 +GHO                =       GGK5005 +      GHO2                                   : ARR( 0.639E-11,     0., 0.0);
+{ 18752} GGO5007 +GHO                =       G3K500A                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 18753} GGO5007+HV               =       GDO4000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 18754} G2G500l +GNO                =       G1G500t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18755} G2G500l +GNO                =       GGN5017                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18756} G2G500l +GHO2               =       GGH5015                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18757} G2G500l +GNO3               =       G1G500t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18758} G2G500l +MEPERO             =  0.340G1G500t + 0.330GGO5005 + 0.330GGK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18759} G2G500l +PERO1              =  0.460G1G500t + 0.270GGO5005 + 0.270GGK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18760} G2G500l +PERO2              =  0.400G1G500t + 0.300GGO5005 + 0.300GGK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18761} G2G500l +PERO3              =  0.460G1G500t + 0.270GGO5005 + 0.270GGK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18762} G2G500l +PERO5              =  0.460G1G500t + 0.270GGO5005 + 0.270GGK500L                 : ARR( 0.183E-11,   450., 0.0);
+{ 18763} G2G500l +PERO6              =  0.300G1G500t + 0.350GGO5005 + 0.350GGK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18764} G2G500l +PERO9              =  0.650G1G500t + 0.350GGK500L                                : ARR( 0.100E-10,     0., 0.0);
+{ 18765} G2G500m +GNO                =       G1G500u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18766} G2G500m +GNO                =       GGN500o                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18767} G2G500m +GHO2               =       GGH500q                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18768} G2G500m +GNO3               =       G1G500u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18769} G2G500m +MEPERO             =  0.340G1G500u + 0.330GGO500A + 0.330GGK500G                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18770} G2G500m +PERO1              =  0.460G1G500u + 0.270GGO500A + 0.270GGK500G                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18771} G2G500m +PERO2              =  0.400G1G500u + 0.300GGO500A + 0.300GGK500G                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18772} G2G500m +PERO3              =  0.460G1G500u + 0.270GGO500A + 0.270GGK500G                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18773} G2G500m +PERO5              =  0.460G1G500u + 0.270GGO500A + 0.270GGK500G                 : ARR( 0.183E-11,   450., 0.0);
+{ 18774} G2G500m +PERO6              =  0.300G1G500u + 0.350GGO500A + 0.350GGK500G                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18775} G2G500m +PERO9              =  0.650G1G500u + 0.350GGK500G                                : ARR( 0.100E-10,     0., 0.0);
+{ 18776} G1G500t                     =       GCH2O   +      GGD4002 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 18777} G1G500u                     =       GDO3000 +      GGD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 18778} GGK5005 +GHO                =       GGD5008 +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 18779} GGK5005 +GHO                =       G2G500n                                               : ARR( 0.453E-11,     0., 0.0);
+{ 18780} GGK5005 +GHO                =       G2G500o                                               : ARR( 0.871E-12,     0., 0.0);
+{ 18781} GGK5005 +GHO                =       G3K500T                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 18782} GGK5005+HV               =       GAO4001 +      GCO2                                   :  0.100E+01*SUN;
+{ 18783} G2G500n +GNO                =       G1G500v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18784} G2G500n +GNO                =       GGN5018                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18785} G2G500n +GHO2               =       GGH5016                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18786} G2G500n +GNO3               =       G1G500v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18787} G2G500n +MEPERO             =  0.340G1G500v + 0.330GGK5006 + 0.330GGK500O                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18788} G2G500n +PERO1              =  0.460G1G500v + 0.270GGK5006 + 0.270GGK500O                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18789} G2G500n +PERO2              =  0.400G1G500v + 0.300GGK5006 + 0.300GGK500O                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18790} G2G500n +PERO3              =  0.460G1G500v + 0.270GGK5006 + 0.270GGK500O                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18791} G2G500n +PERO5              =  0.460G1G500v + 0.270GGK5006 + 0.270GGK500O                 : ARR( 0.183E-11,   450., 0.0);
+{ 18792} G2G500n +PERO6              =  0.300G1G500v + 0.350GGK5006 + 0.350GGK500O                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18793} G2G500n +PERO9              =  0.650G1G500v + 0.350GGK500O                                : ARR( 0.100E-10,     0., 0.0);
+{ 18794} G2G500o +GNO                =       G1G500w +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18795} G2G500o +GNO                =       GGN500p                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18796} G2G500o +GHO2               =       GGH500r                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18797} G2G500o +GNO3               =       G1G500w +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18798} G2G500o +MEPERO             =  0.340G1G500w + 0.330GGK500B + 0.330GGK500H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18799} G2G500o +PERO1              =  0.460G1G500w + 0.270GGK500B + 0.270GGK500H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18800} G2G500o +PERO2              =  0.400G1G500w + 0.300GGK500B + 0.300GGK500H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18801} G2G500o +PERO3              =  0.460G1G500w + 0.270GGK500B + 0.270GGK500H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18802} G2G500o +PERO5              =  0.460G1G500w + 0.270GGK500B + 0.270GGK500H                 : ARR( 0.183E-11,   450., 0.0);
+{ 18803} G2G500o +PERO6              =  0.300G1G500w + 0.350GGK500B + 0.350GGK500H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18804} G2G500o +PERO9              =  0.650G1G500w + 0.350GGK500H                                : ARR( 0.100E-10,     0., 0.0);
+{ 18805} G3K500T +GHO2               =  0.800GGK5005 + 0.200GAK5005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18806} G3K500T +GNO                =       G3K4002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18807} G3K500T +GNO2               =       GPK5005                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18808} G3K500T +GNO3               =       G3K4002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18809} G3K500T +MEPERO             =  0.685G3K4002 + 0.315GAK5005 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18810} G3K500T +PERO1              =  0.800G3K4002 + 0.200GAK5005 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18811} G3K500T +PERO2              =  0.750G3K4002 + 0.250GAK5005 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18812} G3K500T +PERO3              =  0.800G3K4002 + 0.200GAK5005 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18813} G3K500T +PERO5              =  0.650G3K4002 + 0.350GAK5005 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18814} G3K500T +PERO6              =  0.650G3K4002 + 0.350GAK5005 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18815} G3K500T +PERO9              =       G3K4002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 18816} G1G500v                     =       GCH2O   +      GGD4005 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{ 18817} G1G500w                     =       GDO3000 +      GCO     +      GHO2    +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 18818} GGD5000 +GHO                =       GGD5008 +      GHO2                                   : ARR( 0.646E-11,     0., 0.0);
+{ 18819} GGD5000 +GHO                =       G2G500p                                               : ARR( 0.461E-11,     0., 0.0);
+{ 18820} GGD5000 +GHO                =       G3G5000                                               : ARR( 0.214E-10,     0., 0.0);
+{ 18821} GGD5000 +GHO                =       G3D5001                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 18822} GGD5000 +GNO3               =       G3G5000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 18823} GGD5000+HV               =       GDD4000 +      GHO     +      GHO2    +      GCO2     :  0.100E+01*SUN;
+{ 18824} GGD5000+HV               =       G2G400D +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 18825} GGD5000+HV               =       GGK3000 +      GD02000                                :  0.100E+01*SUN;
+{ 18826} G2G500p +GNO                =       G1G500x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18827} G2G500p +GNO                =       GGN500q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18828} G2G500p +GHO2               =       GGH500s                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18829} G2G500p +GNO3               =       G1G500x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18830} G2G500p +MEPERO             =  0.340G1G500x + 0.330GGD5003 + 0.330GGD5005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18831} G2G500p +PERO1              =  0.460G1G500x + 0.270GGD5003 + 0.270GGD5005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18832} G2G500p +PERO2              =  0.400G1G500x + 0.300GGD5003 + 0.300GGD5005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18833} G2G500p +PERO3              =  0.460G1G500x + 0.270GGD5003 + 0.270GGD5005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18834} G2G500p +PERO5              =  0.460G1G500x + 0.270GGD5003 + 0.270GGD5005                 : ARR( 0.183E-11,   450., 0.0);
+{ 18835} G2G500p +PERO6              =  0.300G1G500x + 0.350GGD5003 + 0.350GGD5005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18836} G2G500p +PERO9              =  0.650G1G500x + 0.350GGD5005                                : ARR( 0.100E-10,     0., 0.0);
+{ 18837} G3G5000 +GHO2               =  0.800GGG5000 + 0.200GAG5000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 18838} G3G5000 +GNO                =       G2G400D +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 18839} G3G5000 +GNO2               =       GPG5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 18840} G3G5000 +GNO3               =       G2G400D +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 18841} G3G5000 +MEPERO             =  0.685G2G400D + 0.315GAG5000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18842} G3G5000 +PERO1              =  0.800G2G400D + 0.200GAG5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18843} G3G5000 +PERO2              =  0.750G2G400D + 0.250GAG5000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18844} G3G5000 +PERO3              =  0.800G2G400D + 0.200GAG5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18845} G3G5000 +PERO5              =  0.650G2G400D + 0.350GAG5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18846} G3G5000 +PERO6              =  0.650G2G400D + 0.350GAG5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 18847} G3G5000 +PERO9              =       G2G400D +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 18848} G2G400D +GNO                =       G1G400F +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 18849} G2G400D +GNO                =       GGN4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 18850} G2G400D +GHO2               =       GGH400J                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 18851} G2G400D +GNO3               =       G1G400F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18852} G2G400D +MEPERO             =  0.480G1G400F + 0.260GGO4005 + 0.260GGD4002                 : ARR( 0.146E-12,  -445., 0.0);
+{ 18853} G2G400D +PERO1              =  0.600G1G400F + 0.200GGO4005 + 0.200GGD4002                 : ARR( 0.112E-12,  -500., 0.0);
+{ 18854} G2G400D +PERO2              =  0.560G1G400F + 0.220GGO4005 + 0.220GGD4002                 : ARR( 0.418E-13, -1000., 0.0);
+{ 18855} G2G400D +PERO3              =  0.600G1G400F + 0.200GGO4005 + 0.200GGD4002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 18856} G2G400D +PERO5              =  0.600G1G400F + 0.200GGO4005 + 0.200GGD4002                 : ARR( 0.473E-11,   850., 0.0);
+{ 18857} G2G400D +PERO6              =  0.460G1G400F + 0.270GGO4005 + 0.270GGD4002                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18858} G2G400D +PERO9              =  0.800G1G400F + 0.200GGD4002                                : ARR( 0.100E-10,     0., 0.0);
+{ 18859} G1G500x                     =       GGD2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  3292., 0.0);
+{ 18860} G1G400F +OXYGEN             =       GGD4002 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 18861} GAN500A +GHO                =       G2A500n                                               : ARR( 0.308E-12,     0., 0.0);
+{ 18862} GAN500A +GHO                =       G2A500o                                               : ARR( 0.308E-12,     0., 0.0);
+{ 18863} GAN500A +GHO                =       GND4001 +      GNO2    +      GCO2                    : ARR( 0.567E-12,     0., 0.0);
+{ 18864} GAN500A+HV               =       G1A5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 18865} GAN500A+HV               =       G1A500T +      GNO2                                   :  0.100E+01*SUN;
+{ 18866} G2A500n +GNO                =       G1A500q +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18867} G2A500n +GNO                =       GAN500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18868} G2A500n +GHO2               =       GAH5015                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18869} G2A500n +GNO3               =       G1A500q +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18870} G2A500n +MEPERO             =  0.340G1A500q + 0.330GAN500w + 0.330GAN5011                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18871} G2A500n +PERO1              =  0.460G1A500q + 0.270GAN500w + 0.270GAN5011                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18872} G2A500n +PERO2              =  0.400G1A500q + 0.300GAN500w + 0.300GAN5011                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18873} G2A500n +PERO3              =  0.460G1A500q + 0.270GAN500w + 0.270GAN5011                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18874} G2A500n +PERO5              =  0.460G1A500q + 0.270GAN500w + 0.270GAN5011                 : ARR( 0.183E-11,   450., 0.0);
+{ 18875} G2A500n +PERO6              =  0.300G1A500q + 0.350GAN500w + 0.350GAN5011                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18876} G2A500n +PERO9              =  0.650G1A500q + 0.350GAN5011                                : ARR( 0.100E-10,     0., 0.0);
+{ 18877} G2A500o +GNO                =       G1A500r +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18878} G2A500o +GNO                =       GAN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18879} G2A500o +GHO2               =       GAH5016                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18880} G2A500o +GNO3               =       G1A500r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18881} G2A500o +MEPERO             =  0.340G1A500r + 0.330GAN500G + 0.330GAN5016                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18882} G2A500o +PERO1              =  0.460G1A500r + 0.270GAN500G + 0.270GAN5016                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18883} G2A500o +PERO2              =  0.400G1A500r + 0.300GAN500G + 0.300GAN5016                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18884} G2A500o +PERO3              =  0.460G1A500r + 0.270GAN500G + 0.270GAN5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18885} G2A500o +PERO5              =  0.460G1A500r + 0.270GAN500G + 0.270GAN5016                 : ARR( 0.183E-11,   450., 0.0);
+{ 18886} G2A500o +PERO6              =  0.300G1A500r + 0.350GAN500G + 0.350GAN5016                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18887} G2A500o +PERO9              =  0.650G1A500r + 0.350GAN5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 18888} G1A500q                     =       GAD2000 +      GND3000 +      GNO2                    : ARR( 0.200E+15,  6422., 0.0);
+{ 18889} G1A500q                     =       GAN3006 +      G2N2000                                : ARR( 0.200E+15,  6244., 0.0);
+{ 18890} G1A500r                     =       G2A3004 +      GND2000                                : ARR( 0.200E+15,  7116., 0.0);
+{ 18891} GAH5007 +GHO                =       GAN500C +      GHO                                    : ARR( 0.193E-10,     0., 0.0);
+{ 18892} GAH5007 +GHO                =       G2A500p                                               : ARR( 0.146E-11,     0., 0.0);
+{ 18893} GAH5007 +GHO                =       G2A5005                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 18894} GAH5007+HV               =       G1A5006 +      GHO                                    :  0.100E+01*SUN;
+{ 18895} GAH5007+HV               =       G1A500s +      GNO2                                   :  0.100E+01*SUN;
+{ 18896} G2A500p +GNO                =       G1A500t +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18897} G2A500p +GNO                =       GAH500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18898} G2A500p +GHO2               =       GAH5017                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18899} G2A500p +GNO3               =       G1A500t +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18900} G2A500p +MEPERO             =  0.340G1A500t + 0.330GAH5011 + 0.330GAH5013                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18901} G2A500p +PERO1              =  0.460G1A500t + 0.270GAH5011 + 0.270GAH5013                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18902} G2A500p +PERO2              =  0.400G1A500t + 0.300GAH5011 + 0.300GAH5013                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18903} G2A500p +PERO3              =  0.460G1A500t + 0.270GAH5011 + 0.270GAH5013                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18904} G2A500p +PERO5              =  0.460G1A500t + 0.270GAH5011 + 0.270GAH5013                 : ARR( 0.183E-11,   450., 0.0);
+{ 18905} G2A500p +PERO6              =  0.300G1A500t + 0.350GAH5011 + 0.350GAH5013                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18906} G2A500p +PERO9              =  0.650G1A500t + 0.350GAH5013                                : ARR( 0.100E-10,     0., 0.0);
+{ 18907} G1A500s                     =       GAK5005 +      GHO                                    : ARR( 0.800E+11,  2034., 0.0);
+{ 18908} G1A500t                     =       GAD2000 +      GND3000 +      GHO                     : ARR( 0.200E+15,  4883., 0.0);
+{ 18909} GAN500B +GHO                =       GAN500C +      GHO2                                   : ARR( 0.498E-11,     0., 0.0);
+{ 18910} GAN500B +GHO                =       G2A500q                                               : ARR( 0.151E-11,     0., 0.0);
+{ 18911} GAN500B +GHO                =       GND4001 +      GHO2    +      GCO2                    : ARR( 0.557E-12,     0., 0.0);
+{ 18912} GAN500B+HV               =       G1A500u +      GNO2                                   :  0.100E+01*SUN;
+{ 18913} G2A500q +GNO                =       G1A500v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18914} G2A500q +GNO                =       GAN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18915} G2A500q +GHO2               =       GAH5018                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18916} G2A500q +GNO3               =       G1A500v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18917} G2A500q +MEPERO             =  0.340G1A500v + 0.330GAN500x + 0.330GAN500q                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18918} G2A500q +PERO1              =  0.460G1A500v + 0.270GAN500x + 0.270GAN500q                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18919} G2A500q +PERO2              =  0.400G1A500v + 0.300GAN500x + 0.300GAN500q                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18920} G2A500q +PERO3              =  0.460G1A500v + 0.270GAN500x + 0.270GAN500q                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18921} G2A500q +PERO5              =  0.460G1A500v + 0.270GAN500x + 0.270GAN500q                 : ARR( 0.183E-11,   450., 0.0);
+{ 18922} G2A500q +PERO6              =  0.300G1A500v + 0.350GAN500x + 0.350GAN500q                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18923} G2A500q +PERO9              =  0.650G1A500v + 0.350GAN500q                                : ARR( 0.100E-10,     0., 0.0);
+{ 18924} G1A500u                     =       GAK5005 +      GHO2                                   : ARR( 0.800E+11,  2381., 0.0);
+{ 18925} G1A500v                     =       GAD2000 +      GND3000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 18926} GAN500C +GHO                =       G2A500r                                               : ARR( 0.879E-12,     0., 0.0);
+{ 18927} GAN500C +GHO                =       G2A500s                                               : ARR( 0.914E-12,     0., 0.0);
+{ 18928} GAN500C +GHO                =       G3N4000 +      GCO2                                   : ARR( 0.530E-12,     0., 0.0);
+{ 18929} GAN500C+HV               =       GND4001 +      GCO2                                   :  0.100E+01*SUN;
+{ 18930} GAN500C+HV               =       G1A500w +      GNO2                                   :  0.100E+01*SUN;
+{ 18931} G2A500r +GNO                =       G1A500x +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18932} G2A500r +GNO                =       GAN500t                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18933} G2A500r +GHO2               =       GAH5019                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18934} G2A500r +GNO3               =       G1A500x +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18935} G2A500r +MEPERO             =  0.340G1A500x + 0.330GAN500y + 0.330GAN5012                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18936} G2A500r +PERO1              =  0.460G1A500x + 0.270GAN500y + 0.270GAN5012                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18937} G2A500r +PERO2              =  0.400G1A500x + 0.300GAN500y + 0.300GAN5012                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18938} G2A500r +PERO3              =  0.460G1A500x + 0.270GAN500y + 0.270GAN5012                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18939} G2A500r +PERO5              =  0.460G1A500x + 0.270GAN500y + 0.270GAN5012                 : ARR( 0.183E-11,   450., 0.0);
+{ 18940} G2A500r +PERO6              =  0.300G1A500x + 0.350GAN500y + 0.350GAN5012                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18941} G2A500r +PERO9              =  0.650G1A500x + 0.350GAN5012                                : ARR( 0.100E-10,     0., 0.0);
+{ 18942} G2A500s +GNO                =       G1A500y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18943} G2A500s +GNO                =       GAN5017                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18944} G2A500s +GHO2               =       GAH501A                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18945} G2A500s +GNO3               =       G1A500y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18946} G2A500s +MEPERO             =  0.340G1A500y + 0.330GAN500M + 0.330GAN5018                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18947} G2A500s +PERO1              =  0.460G1A500y + 0.270GAN500M + 0.270GAN5018                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18948} G2A500s +PERO2              =  0.400G1A500y + 0.300GAN500M + 0.300GAN5018                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18949} G2A500s +PERO3              =  0.460G1A500y + 0.270GAN500M + 0.270GAN5018                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18950} G2A500s +PERO5              =  0.460G1A500y + 0.270GAN500M + 0.270GAN5018                 : ARR( 0.183E-11,   450., 0.0);
+{ 18951} G2A500s +PERO6              =  0.300G1A500y + 0.350GAN500M + 0.350GAN5018                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18952} G2A500s +PERO9              =  0.650G1A500y + 0.350GAN5018                                : ARR( 0.100E-10,     0., 0.0);
+{ 18953} G1A500w +OXYGEN             =       GAD500A +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 18954} G1A500x                     =       GCO     +      GND3000 +      GHO     +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 18955} G1A500y                     =       G2A3006 +      GND2000                                : ARR( 0.200E+15,  6866., 0.0);
+{ 18956} GAN500D +GHO                =       G2A500t                                               : ARR( 0.652E-12,     0., 0.0);
+{ 18957} GAN500D +GHO                =       G2A500u                                               : ARR( 0.289E-12,     0., 0.0);
+{ 18958} GAN500D +GHO                =       G2N400H +      GCO2                                   : ARR( 0.532E-12,     0., 0.0);
+{ 18959} GAN500D+HV               =       G1A5008 +      GNO2                                   :  0.100E+01*SUN;
+{ 18960} GAN500D+HV               =       G1A500z +      GNO2                                   :  0.100E+01*SUN;
+{ 18961} G2A500t +GNO                =       G1A5011 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18962} G2A500t +GNO                =       GAN5015                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18963} G2A500t +GHO2               =       GAH501B                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18964} G2A500t +GNO3               =       G1A5011 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18965} G2A500t +MEPERO             =  0.340G1A5011 + 0.330GAN5019 + 0.330GAN5017                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18966} G2A500t +PERO1              =  0.460G1A5011 + 0.270GAN5019 + 0.270GAN5017                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18967} G2A500t +PERO2              =  0.400G1A5011 + 0.300GAN5019 + 0.300GAN5017                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18968} G2A500t +PERO3              =  0.460G1A5011 + 0.270GAN5019 + 0.270GAN5017                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18969} G2A500t +PERO5              =  0.460G1A5011 + 0.270GAN5019 + 0.270GAN5017                 : ARR( 0.183E-11,   450., 0.0);
+{ 18970} G2A500t +PERO6              =  0.300G1A5011 + 0.350GAN5019 + 0.350GAN5017                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18971} G2A500t +PERO9              =  0.650G1A5011 + 0.350GAN5017                                : ARR( 0.100E-10,     0., 0.0);
+{ 18972} G2A500u +GNO                =       G1A5012 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18973} G2A500u +GNO                =       GAN500u                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18974} G2A500u +GHO2               =       GAH501C                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18975} G2A500u +GNO3               =       G1A5012 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18976} G2A500u +MEPERO             =  0.340G1A5012 + 0.330GAN501A + 0.330GAN5013                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18977} G2A500u +PERO1              =  0.460G1A5012 + 0.270GAN501A + 0.270GAN5013                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18978} G2A500u +PERO2              =  0.400G1A5012 + 0.300GAN501A + 0.300GAN5013                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18979} G2A500u +PERO3              =  0.460G1A5012 + 0.270GAN501A + 0.270GAN5013                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18980} G2A500u +PERO5              =  0.460G1A5012 + 0.270GAN501A + 0.270GAN5013                 : ARR( 0.183E-11,   450., 0.0);
+{ 18981} G2A500u +PERO6              =  0.300G1A5012 + 0.350GAN501A + 0.350GAN5013                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18982} G2A500u +PERO9              =  0.650G1A5012 + 0.350GAN5013                                : ARR( 0.100E-10,     0., 0.0);
+{ 18983} G1A500z                     =       G2A500v                                               : ARR( 0.160E+12,  3356., 0.0);
+{ 18984} G1A5011                     =       GCO     +      GNN4001 +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{ 18985} G1A5012                     =       GAD3000 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  5685., 0.0);
+{ 18986} G2A500v +GNO                =       G1A5013 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 18987} G2A500v +GNO                =       GAN501B                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 18988} G2A500v +GHO2               =       GAH501D                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 18989} G2A500v +GNO3               =       G1A5013 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 18990} G2A500v +MEPERO             =  0.340G1A5013 + 0.330GAN501C + 0.330GAN501D                 : ARR( 0.565E-13,  -845., 0.0);
+{ 18991} G2A500v +PERO1              =  0.460G1A5013 + 0.270GAN501C + 0.270GAN501D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 18992} G2A500v +PERO2              =  0.400G1A5013 + 0.300GAN501C + 0.300GAN501D                 : ARR( 0.162E-13, -1400., 0.0);
+{ 18993} G2A500v +PERO3              =  0.460G1A5013 + 0.270GAN501C + 0.270GAN501D                 : ARR( 0.488E-13, -1250., 0.0);
+{ 18994} G2A500v +PERO5              =  0.460G1A5013 + 0.270GAN501C + 0.270GAN501D                 : ARR( 0.183E-11,   450., 0.0);
+{ 18995} G2A500v +PERO6              =  0.300G1A5013 + 0.350GAN501C + 0.350GAN501D                 : ARR( 0.168E-13, -1300., 0.0);
+{ 18996} G2A500v +PERO9              =  0.650G1A5013 + 0.350GAN501D                                : ARR( 0.100E-10,     0., 0.0);
+{ 18997} G1A5013                     =       GAN501E +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{ 18998} G1A5013                     =       GND4002 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{ 18999} GAH5008 +GHO                =       G2A500w                                               : ARR( 0.154E-11,     0., 0.0);
+{ 19000} GAH5008 +GHO                =       GAN500E +      GHO                                    : ARR( 0.899E-11,     0., 0.0);
+{ 19001} GAH5008 +GHO                =       G2A5007                                               : ARR( 0.207E-11,  -190., 0.0);
+{ 19002} GAH5008+HV               =       G1A5008 +      GHO                                    :  0.100E+01*SUN;
+{ 19003} GAH5008+HV               =       G1A5014 +      GNO2                                   :  0.100E+01*SUN;
+{ 19004} G2A500w +GNO                =       G1A5015 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19005} G2A500w +GNO                =       GAH500s                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19006} G2A500w +GHO2               =       GAH501E                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19007} G2A500w +GNO3               =       G1A5015 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19008} G2A500w +MEPERO             =  0.340G1A5015 + 0.330GAH501F + 0.330GAH5014                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19009} G2A500w +PERO1              =  0.460G1A5015 + 0.270GAH501F + 0.270GAH5014                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19010} G2A500w +PERO2              =  0.400G1A5015 + 0.300GAH501F + 0.300GAH5014                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19011} G2A500w +PERO3              =  0.460G1A5015 + 0.270GAH501F + 0.270GAH5014                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19012} G2A500w +PERO5              =  0.460G1A5015 + 0.270GAH501F + 0.270GAH5014                 : ARR( 0.183E-11,   450., 0.0);
+{ 19013} G2A500w +PERO6              =  0.300G1A5015 + 0.350GAH501F + 0.350GAH5014                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19014} G2A500w +PERO9              =  0.650G1A5015 + 0.350GAH5014                                : ARR( 0.100E-10,     0., 0.0);
+{ 19015} G1A5014                     =       G2A500x                                               : ARR( 0.160E+12,  3356., 0.0);
+{ 19016} G1A5014                     =       GAD4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{ 19017} G1A5015                     =       GAD3000 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4146., 0.0);
+{ 19018} G2A500x +GNO                =       G1A5016 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19019} G2A500x +GNO                =       GAH501G                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19020} G2A500x +GHO2               =       GAH501H                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19021} G2A500x +GNO3               =       G1A5016 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19022} G2A500x +MEPERO             =  0.340G1A5016 + 0.330GAH501I + 0.330GAH501J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19023} G2A500x +PERO1              =  0.460G1A5016 + 0.270GAH501I + 0.270GAH501J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19024} G2A500x +PERO2              =  0.400G1A5016 + 0.300GAH501I + 0.300GAH501J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19025} G2A500x +PERO3              =  0.460G1A5016 + 0.270GAH501I + 0.270GAH501J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19026} G2A500x +PERO5              =  0.460G1A5016 + 0.270GAH501I + 0.270GAH501J                 : ARR( 0.183E-11,   450., 0.0);
+{ 19027} G2A500x +PERO6              =  0.300G1A5016 + 0.350GAH501I + 0.350GAH501J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19028} G2A500x +PERO9              =  0.650G1A5016 + 0.350GAH501J                                : ARR( 0.100E-10,     0., 0.0);
+{ 19029} G1A5016                     =       GAH501K +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 19030} G1A5016                     =       GHD4000 +      GCO     +      GHO                     : ARR( 0.200E+15,  4918., 0.0);
+{ 19031} GAN500E +GHO                =       G2A500y                                               : ARR( 0.204E-11,     0., 0.0);
+{ 19032} GAN500E +GHO                =       G2A500z                                               : ARR( 0.869E-12,     0., 0.0);
+{ 19033} GAN500E +GHO                =       G2N400J +      GCO2                                   : ARR( 0.524E-12,     0., 0.0);
+{ 19034} GAN500E+HV               =       G3A4000 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 19035} GAN500E+HV               =       G1A5017 +      GNO2                                   :  0.100E+01*SUN;
+{ 19036} G2A500y +GNO                =       G1A5018 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19037} G2A500y +GNO                =       GAN5016                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19038} G2A500y +GHO2               =       GAH501L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19039} G2A500y +GNO3               =       G1A5018 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19040} G2A500y +MEPERO             =  0.340G1A5018 + 0.330GAN501F + 0.330GAN5018                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19041} G2A500y +PERO1              =  0.460G1A5018 + 0.270GAN501F + 0.270GAN5018                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19042} G2A500y +PERO2              =  0.400G1A5018 + 0.300GAN501F + 0.300GAN5018                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19043} G2A500y +PERO3              =  0.460G1A5018 + 0.270GAN501F + 0.270GAN5018                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19044} G2A500y +PERO5              =  0.460G1A5018 + 0.270GAN501F + 0.270GAN5018                 : ARR( 0.183E-11,   450., 0.0);
+{ 19045} G2A500y +PERO6              =  0.300G1A5018 + 0.350GAN501F + 0.350GAN5018                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19046} G2A500y +PERO9              =  0.650G1A5018 + 0.350GAN5018                                : ARR( 0.100E-10,     0., 0.0);
+{ 19047} G2A500z +GNO                =       G1A5019 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19048} G2A500z +GNO                =       GAN500v                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19049} G2A500z +GHO2               =       GAH501M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19050} G2A500z +GNO3               =       G1A5019 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19051} G2A500z +MEPERO             =  0.340G1A5019 + 0.330GAN501G + 0.330GAN5014                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19052} G2A500z +PERO1              =  0.460G1A5019 + 0.270GAN501G + 0.270GAN5014                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19053} G2A500z +PERO2              =  0.400G1A5019 + 0.300GAN501G + 0.300GAN5014                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19054} G2A500z +PERO3              =  0.460G1A5019 + 0.270GAN501G + 0.270GAN5014                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19055} G2A500z +PERO5              =  0.460G1A5019 + 0.270GAN501G + 0.270GAN5014                 : ARR( 0.183E-11,   450., 0.0);
+{ 19056} G2A500z +PERO6              =  0.300G1A5019 + 0.350GAN501G + 0.350GAN5014                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19057} G2A500z +PERO9              =  0.650G1A5019 + 0.350GAN5014                                : ARR( 0.100E-10,     0., 0.0);
+{ 19058} G3A4000 +GHO2               =  0.800GAG4000 + 0.200GAA4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19059} G3A4000 +GNO                =       G2A3000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19060} G3A4000 +GNO2               =       GPA4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19061} G3A4000 +GNO3               =       G2A3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19062} G3A4000 +MEPERO             =  0.685G2A3000 + 0.315GAA4000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19063} G3A4000 +PERO1              =  0.800G2A3000 + 0.200GAA4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19064} G3A4000 +PERO2              =  0.750G2A3000 + 0.250GAA4000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19065} G3A4000 +PERO3              =  0.800G2A3000 + 0.200GAA4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19066} G3A4000 +PERO5              =  0.650G2A3000 + 0.350GAA4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19067} G3A4000 +PERO6              =  0.650G2A3000 + 0.350GAA4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19068} G3A4000 +PERO9              =       G2A3000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19069} G1A5017                     =       G3A4000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 19070} G1A5018                     =       GCO     +      GND4004 +      GHO                     : ARR( 0.200E+15,  4535., 0.0);
+{ 19071} G1A5019                     =       GAD3000 +      G3N2000                                : ARR( 0.200E+15,  2252., 0.0);
+{ 19072} GAD5000 +GHO                =       G2A5011                                               : ARR( 0.484E-11,     0., 0.0);
+{ 19073} GAD5000 +GHO                =       G3A5000                                               : ARR( 0.224E-10,     0., 0.0);
+{ 19074} GAD5000 +GNO3               =       G3A5000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19075} GAD5000+HV               =       G2A4004 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19076} GAD5000+HV               =       GAU3000 +      GD02000                                :  0.100E+01*SUN;
+{ 19077} G2A5011 +GNO                =       G1A501A +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19078} G2A5011 +GNO                =       GAN500Q                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19079} G2A5011 +GHO2               =       GAH500t                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19080} G2A5011 +GNO3               =       G1A501A +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19081} G2A5011 +MEPERO             =  0.480G1A501A + 0.260GAD5007 + 0.260GAD5004                 : ARR( 0.616E-11,   905., 0.0);
+{ 19082} G2A5011 +PERO1              =  0.600G1A501A + 0.200GAD5007 + 0.200GAD5004                 : ARR( 0.473E-11,   850., 0.0);
+{ 19083} G2A5011 +PERO2              =  0.560G1A501A + 0.220GAD5007 + 0.220GAD5004                 : ARR( 0.177E-11,   350., 0.0);
+{ 19084} G2A5011 +PERO3              =  0.600G1A501A + 0.200GAD5007 + 0.200GAD5004                 : ARR( 0.533E-11,   500., 0.0);
+{ 19085} G2A5011 +PERO5              =  0.600G1A501A + 0.200GAD5007 + 0.200GAD5004                 : ARR( 0.200E-09,  2200., 0.0);
+{ 19086} G2A5011 +PERO6              =  0.460G1A501A + 0.270GAD5007 + 0.270GAD5004                 : ARR( 0.183E-11,   450., 0.0);
+{ 19087} G2A5011 +PERO9              =  0.800G1A501A + 0.200GAD5004                                : ARR( 0.100E-10,     0., 0.0);
+{ 19088} G3A5000 +GHO2               =  0.800GAG5001 + 0.200GAA5000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19089} G3A5000 +GNO                =       G2A4004 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19090} G3A5000 +GNO2               =       GPA5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19091} G3A5000 +GNO3               =       G2A4004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19092} G3A5000 +MEPERO             =  0.685G2A4004 + 0.315GAA5000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19093} G3A5000 +PERO1              =  0.800G2A4004 + 0.200GAA5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19094} G3A5000 +PERO2              =  0.750G2A4004 + 0.250GAA5000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19095} G3A5000 +PERO3              =  0.800G2A4004 + 0.200GAA5000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19096} G3A5000 +PERO5              =  0.650G2A4004 + 0.350GAA5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19097} G3A5000 +PERO6              =  0.650G2A4004 + 0.350GAA5000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19098} G3A5000 +PERO9              =       G2A4004 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19099} G1A501A                     =       G2A2000 +      GDD3000                                : ARR( 0.200E+15,  6813., 0.0);
+{ 19100} G1A501A                     =       GAD3000 +      G2D2000                                : ARR( 0.200E+15,  6591., 0.0);
+{ 19101} GAN500F +GHO                =       GAN500k +      GHO2                                   : ARR( 0.434E-11,     0., 0.0);
+{ 19102} GAN500F +GHO                =       G2A5012                                               : ARR( 0.153E-11,     0., 0.0);
+{ 19103} GAN500F +GHO                =       GDO4000 +      GNO2    +      GCO2                    : ARR( 0.562E-12,     0., 0.0);
+{ 19104} GAN500F+HV               =       G1A5009 +      GNO2                                   :  0.100E+01*SUN;
+{ 19105} G2A5012 +GNO                =       G1A501B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19106} G2A5012 +GNO                =       GAN501B                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19107} G2A5012 +GHO2               =       GAH501G                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19108} G2A5012 +GNO3               =       G1A501B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19109} G2A5012 +MEPERO             =  0.340G1A501B + 0.330GAN500I + 0.330GAN501H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19110} G2A5012 +PERO1              =  0.460G1A501B + 0.270GAN500I + 0.270GAN501H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19111} G2A5012 +PERO2              =  0.400G1A501B + 0.300GAN500I + 0.300GAN501H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19112} G2A5012 +PERO3              =  0.460G1A501B + 0.270GAN500I + 0.270GAN501H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19113} G2A5012 +PERO5              =  0.460G1A501B + 0.270GAN500I + 0.270GAN501H                 : ARR( 0.183E-11,   450., 0.0);
+{ 19114} G2A5012 +PERO6              =  0.300G1A501B + 0.350GAN500I + 0.350GAN501H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19115} G2A5012 +PERO9              =  0.650G1A501B + 0.350GAN501H                                : ARR( 0.100E-10,     0., 0.0);
+{ 19116} G1A501B                     =       GCH2O   +      GAN400N +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 19117} GAH5009 +GHO                =       GAH501N +      GHO2                                   : ARR( 0.456E-11,     0., 0.0);
+{ 19118} GAH5009 +GHO                =       GAK5005 +      GHO                                    : ARR( 0.211E-10,     0., 0.0);
+{ 19119} GAH5009 +GHO                =       G2A5008                                               : ARR( 0.215E-11,  -190., 0.0);
+{ 19120} GAH5009+HV               =       G1A5009 +      GHO                                    :  0.100E+01*SUN;
+{ 19121} GAO5007 +GHO                =       GAD5001 +      GHO2                                   : ARR( 0.430E-11,     0., 0.0);
+{ 19122} GAO5007 +GHO                =       G2A5013                                               : ARR( 0.151E-11,     0., 0.0);
+{ 19123} GAO5007 +GHO                =       G2A5014                                               : ARR( 0.151E-11,     0., 0.0);
+{ 19124} GAO5007 +GHO                =       GAK5005 +      GHO2                                   : ARR( 0.497E-11,     0., 0.0);
+{ 19125} G2A5013 +GNO                =       G1A501C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19126} G2A5013 +GNO                =       GAN501C                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19127} G2A5013 +GHO2               =       GAH501I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19128} G2A5013 +GNO3               =       G1A501C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19129} G2A5013 +MEPERO             =  0.340G1A501C + 0.330GAO5005 + 0.330GAK500K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19130} G2A5013 +PERO1              =  0.460G1A501C + 0.270GAO5005 + 0.270GAK500K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19131} G2A5013 +PERO2              =  0.400G1A501C + 0.300GAO5005 + 0.300GAK500K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19132} G2A5013 +PERO3              =  0.460G1A501C + 0.270GAO5005 + 0.270GAK500K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19133} G2A5013 +PERO5              =  0.460G1A501C + 0.270GAO5005 + 0.270GAK500K                 : ARR( 0.183E-11,   450., 0.0);
+{ 19134} G2A5013 +PERO6              =  0.300G1A501C + 0.350GAO5005 + 0.350GAK500K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19135} G2A5013 +PERO9              =  0.650G1A501C + 0.350GAK500K                                : ARR( 0.100E-10,     0., 0.0);
+{ 19136} G2A5014 +GNO                =       G1A501D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19137} G2A5014 +GNO                =       GAN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19138} G2A5014 +GHO2               =       GAH500w                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19139} G2A5014 +GNO3               =       G1A501D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19140} G2A5014 +MEPERO             =  0.340G1A501D + 0.330GAO500C + 0.330GAK500E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19141} G2A5014 +PERO1              =  0.460G1A501D + 0.270GAO500C + 0.270GAK500E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19142} G2A5014 +PERO2              =  0.400G1A501D + 0.300GAO500C + 0.300GAK500E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19143} G2A5014 +PERO3              =  0.460G1A501D + 0.270GAO500C + 0.270GAK500E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19144} G2A5014 +PERO5              =  0.460G1A501D + 0.270GAO500C + 0.270GAK500E                 : ARR( 0.183E-11,   450., 0.0);
+{ 19145} G2A5014 +PERO6              =  0.300G1A501D + 0.350GAO500C + 0.350GAK500E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19146} G2A5014 +PERO9              =  0.650G1A501D + 0.350GAK500E                                : ARR( 0.100E-10,     0., 0.0);
+{ 19147} G1A501C                     =       GCH2O   +      GAD4002 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 19148} G1A501D                     =       GDO3000 +      GAD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 19149} GAK5005 +GHO                =       GAD500A +      GHO2                                   : ARR( 0.408E-11,     0., 0.0);
+{ 19150} GAK5005 +GHO                =       G2A5015                                               : ARR( 0.454E-11,     0., 0.0);
+{ 19151} GAK5005 +GHO                =       G2A5016                                               : ARR( 0.874E-12,     0., 0.0);
+{ 19152} GAK5005 +GHO                =       G3K4002 +      GCO2                                   : ARR( 0.527E-12,     0., 0.0);
+{ 19153} GAK5005+HV               =       GDO4000 +      GCO2                                   :  0.100E+01*SUN;
+{ 19154} G2A5015 +GNO                =       G1A501E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19155} G2A5015 +GNO                =       GAN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19156} G2A5015 +GHO2               =       GAH501J                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19157} G2A5015 +GNO3               =       G1A501E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19158} G2A5015 +MEPERO             =  0.340G1A501E + 0.330GAK5006 + 0.330GAK500O                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19159} G2A5015 +PERO1              =  0.460G1A501E + 0.270GAK5006 + 0.270GAK500O                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19160} G2A5015 +PERO2              =  0.400G1A501E + 0.300GAK5006 + 0.300GAK500O                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19161} G2A5015 +PERO3              =  0.460G1A501E + 0.270GAK5006 + 0.270GAK500O                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19162} G2A5015 +PERO5              =  0.460G1A501E + 0.270GAK5006 + 0.270GAK500O                 : ARR( 0.183E-11,   450., 0.0);
+{ 19163} G2A5015 +PERO6              =  0.300G1A501E + 0.350GAK5006 + 0.350GAK500O                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19164} G2A5015 +PERO9              =  0.650G1A501E + 0.350GAK500O                                : ARR( 0.100E-10,     0., 0.0);
+{ 19165} G2A5016 +GNO                =       G1A501F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19166} G2A5016 +GNO                =       GAN500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19167} G2A5016 +GHO2               =       GAH500x                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19168} G2A5016 +GNO3               =       G1A501F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19169} G2A5016 +MEPERO             =  0.340G1A501F + 0.330GAK500N + 0.330GAK500F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19170} G2A5016 +PERO1              =  0.460G1A501F + 0.270GAK500N + 0.270GAK500F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19171} G2A5016 +PERO2              =  0.400G1A501F + 0.300GAK500N + 0.300GAK500F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19172} G2A5016 +PERO3              =  0.460G1A501F + 0.270GAK500N + 0.270GAK500F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19173} G2A5016 +PERO5              =  0.460G1A501F + 0.270GAK500N + 0.270GAK500F                 : ARR( 0.183E-11,   450., 0.0);
+{ 19174} G2A5016 +PERO6              =  0.300G1A501F + 0.350GAK500N + 0.350GAK500F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19175} G2A5016 +PERO9              =  0.650G1A501F + 0.350GAK500F                                : ARR( 0.100E-10,     0., 0.0);
+{ 19176} G1A501E                     =       GCH2O   +      GAD4005 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{ 19177} G1A501F                     =       GDO3000 +      GCO     +      GHO     +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 19178} GAD5001 +GHO                =       GAD500A +      GHO2                                   : ARR( 0.489E-11,     0., 0.0);
+{ 19179} GAD5001 +GHO                =       G2A5017                                               : ARR( 0.471E-11,     0., 0.0);
+{ 19180} GAD5001 +GHO                =       G3A5001                                               : ARR( 0.218E-10,     0., 0.0);
+{ 19181} GAD5001 +GNO3               =       G3A5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19182} GAD5001+HV               =       G2A400J +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19183} GAD5001+HV               =       GAK3000 +      GD02000                                :  0.100E+01*SUN;
+{ 19184} G2A5017 +GNO                =       G1A501G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19185} G2A5017 +GNO                =       GAN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19186} G2A5017 +GHO2               =       GAH500y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19187} G2A5017 +GNO3               =       G1A501G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19188} G2A5017 +MEPERO             =  0.340G1A501G + 0.330GAD5008 + 0.330GAD5005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19189} G2A5017 +PERO1              =  0.460G1A501G + 0.270GAD5008 + 0.270GAD5005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19190} G2A5017 +PERO2              =  0.400G1A501G + 0.300GAD5008 + 0.300GAD5005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19191} G2A5017 +PERO3              =  0.460G1A501G + 0.270GAD5008 + 0.270GAD5005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19192} G2A5017 +PERO5              =  0.460G1A501G + 0.270GAD5008 + 0.270GAD5005                 : ARR( 0.183E-11,   450., 0.0);
+{ 19193} G2A5017 +PERO6              =  0.300G1A501G + 0.350GAD5008 + 0.350GAD5005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19194} G2A5017 +PERO9              =  0.650G1A501G + 0.350GAD5005                                : ARR( 0.100E-10,     0., 0.0);
+{ 19195} G3A5001 +GHO2               =  0.800GAG5002 + 0.200GAA5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19196} G3A5001 +GNO                =       G2A400J +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19197} G3A5001 +GNO2               =       GPA5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19198} G3A5001 +GNO3               =       G2A400J +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19199} G3A5001 +MEPERO             =  0.685G2A400J + 0.315GAA5001 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19200} G3A5001 +PERO1              =  0.800G2A400J + 0.200GAA5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19201} G3A5001 +PERO2              =  0.750G2A400J + 0.250GAA5001 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19202} G3A5001 +PERO3              =  0.800G2A400J + 0.200GAA5001 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19203} G3A5001 +PERO5              =  0.650G2A400J + 0.350GAA5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19204} G3A5001 +PERO6              =  0.650G2A400J + 0.350GAA5001 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19205} G3A5001 +PERO9              =       G2A400J +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19206} G2A400J +GNO                =       G1A400L +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19207} G2A400J +GNO                =       GAN4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19208} G2A400J +GHO2               =       GAH400M                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19209} G2A400J +GNO3               =       G1A400L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19210} G2A400J +MEPERO             =  0.480G1A400L + 0.260GAO4005 + 0.260GAD4002                 : ARR( 0.146E-12,  -445., 0.0);
+{ 19211} G2A400J +PERO1              =  0.600G1A400L + 0.200GAO4005 + 0.200GAD4002                 : ARR( 0.112E-12,  -500., 0.0);
+{ 19212} G2A400J +PERO2              =  0.560G1A400L + 0.220GAO4005 + 0.220GAD4002                 : ARR( 0.418E-13, -1000., 0.0);
+{ 19213} G2A400J +PERO3              =  0.600G1A400L + 0.200GAO4005 + 0.200GAD4002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 19214} G2A400J +PERO5              =  0.600G1A400L + 0.200GAO4005 + 0.200GAD4002                 : ARR( 0.473E-11,   850., 0.0);
+{ 19215} G2A400J +PERO6              =  0.460G1A400L + 0.270GAO4005 + 0.270GAD4002                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19216} G2A400J +PERO9              =  0.800G1A400L + 0.200GAD4002                                : ARR( 0.100E-10,     0., 0.0);
+{ 19217} G1A501G                     =       GAD2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  3292., 0.0);
+{ 19218} G1A400L +OXYGEN             =       GAD4002 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 19219} GPN500A                     =       G3N500C +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19220} GPN500A +GHO                =       G2P500q                                               : ARR( 0.291E-12,     0., 0.0);
+{ 19221} GPN500A +GHO                =       G2P500r                                               : ARR( 0.886E-12,     0., 0.0);
+{ 19222} GPN500A+HV               =       G1P500t +      GNO2                                   :  0.100E+01*SUN;
+{ 19223} GPN500A+HV               =       G1P5006 +      GNO2                                   :  0.100E+01*SUN;
+{ 19224} GPN500A+HV               =       G3N500C +      GNO2                                   :  0.100E+01*SUN;
+{ 19225} G2P500q +GNO                =       G1P500u +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19226} G2P500q +GNO                =       GPN500x                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19227} G2P500q +GHO2               =       GPH5016                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19228} G2P500q +GNO3               =       G1P500u +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19229} G2P500q +MEPERO             =  0.340G1P500u + 0.330GPN5019 + 0.330GPN5015                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19230} G2P500q +PERO1              =  0.460G1P500u + 0.270GPN5019 + 0.270GPN5015                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19231} G2P500q +PERO2              =  0.400G1P500u + 0.300GPN5019 + 0.300GPN5015                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19232} G2P500q +PERO3              =  0.460G1P500u + 0.270GPN5019 + 0.270GPN5015                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19233} G2P500q +PERO5              =  0.460G1P500u + 0.270GPN5019 + 0.270GPN5015                 : ARR( 0.183E-11,   450., 0.0);
+{ 19234} G2P500q +PERO6              =  0.300G1P500u + 0.350GPN5019 + 0.350GPN5015                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19235} G2P500q +PERO9              =  0.650G1P500u + 0.350GPN5015                                : ARR( 0.100E-10,     0., 0.0);
+{ 19236} G2P500r +GNO                =       G1P500v +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19237} G2P500r +GNO                =       GPN501A                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19238} G2P500r +GHO2               =       GPH5017                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19239} G2P500r +GNO3               =       G1P500v +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19240} G2P500r +MEPERO             =  0.340G1P500v + 0.330GPN501B + 0.330GPN501C                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19241} G2P500r +PERO1              =  0.460G1P500v + 0.270GPN501B + 0.270GPN501C                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19242} G2P500r +PERO2              =  0.400G1P500v + 0.300GPN501B + 0.300GPN501C                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19243} G2P500r +PERO3              =  0.460G1P500v + 0.270GPN501B + 0.270GPN501C                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19244} G2P500r +PERO5              =  0.460G1P500v + 0.270GPN501B + 0.270GPN501C                 : ARR( 0.183E-11,   450., 0.0);
+{ 19245} G2P500r +PERO6              =  0.300G1P500v + 0.350GPN501B + 0.350GPN501C                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19246} G2P500r +PERO9              =  0.650G1P500v + 0.350GPN501C                                : ARR( 0.100E-10,     0., 0.0);
+{ 19247} G1P500t                     =       G2P500s                                               : ARR( 0.160E+12,  3221., 0.0);
+{ 19248} G1P500u                     =       GND2000 +      GPD3000 +      GNO2                    : ARR( 0.200E+15,  5685., 0.0);
+{ 19249} G1P500v                     =       GNN4001 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{ 19250} G2P500s +GNO                =       G1P500w +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19251} G2P500s +GNO                =       GPN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19252} G2P500s +GHO2               =       GPH5018                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19253} G2P500s +GNO3               =       G1P500w +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19254} G2P500s +MEPERO             =  0.340G1P500w + 0.330GPN501E + 0.330GPN501F                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19255} G2P500s +PERO1              =  0.460G1P500w + 0.270GPN501E + 0.270GPN501F                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19256} G2P500s +PERO2              =  0.400G1P500w + 0.300GPN501E + 0.300GPN501F                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19257} G2P500s +PERO3              =  0.460G1P500w + 0.270GPN501E + 0.270GPN501F                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19258} G2P500s +PERO5              =  0.460G1P500w + 0.270GPN501E + 0.270GPN501F                 : ARR( 0.183E-11,   450., 0.0);
+{ 19259} G2P500s +PERO6              =  0.300G1P500w + 0.350GPN501E + 0.350GPN501F                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19260} G2P500s +PERO9              =  0.650G1P500w + 0.350GPN501F                                : ARR( 0.100E-10,     0., 0.0);
+{ 19261} G1P500w                     =       GPN501G +      GHO2                                   : ARR( 0.160E+12,  3252., 0.0);
+{ 19262} G1P500w                     =       GND4002 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{ 19263} GPH5007                     =       G3H5007 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19264} GPH5007 +GHO                =       GPN500B +      GHO                                    : ARR( 0.827E-11,     0., 0.0);
+{ 19265} GPH5007 +GHO                =       G2P500t                                               : ARR( 0.142E-11,     0., 0.0);
+{ 19266} GPH5007 +GHO                =       G2P500u                                               : ARR( 0.864E-12,     0., 0.0);
+{ 19267} GPH5007 +GHO                =       G2P5005                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 19268} GPH5007+HV               =       G1P500x +      GNO2                                   :  0.100E+01*SUN;
+{ 19269} GPH5007+HV               =       G1P5006 +      GHO                                    :  0.100E+01*SUN;
+{ 19270} GPH5007+HV               =       G3H5007 +      GNO2                                   :  0.100E+01*SUN;
+{ 19271} G2P500t +GNO                =       G1P500y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19272} G2P500t +GNO                =       GPH500t                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19273} G2P500t +GHO2               =       GPH5019                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19274} G2P500t +GNO3               =       G1P500y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19275} G2P500t +MEPERO             =  0.340G1P500y + 0.330GPH501A + 0.330GPH5014                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19276} G2P500t +PERO1              =  0.460G1P500y + 0.270GPH501A + 0.270GPH5014                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19277} G2P500t +PERO2              =  0.400G1P500y + 0.300GPH501A + 0.300GPH5014                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19278} G2P500t +PERO3              =  0.460G1P500y + 0.270GPH501A + 0.270GPH5014                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19279} G2P500t +PERO5              =  0.460G1P500y + 0.270GPH501A + 0.270GPH5014                 : ARR( 0.183E-11,   450., 0.0);
+{ 19280} G2P500t +PERO6              =  0.300G1P500y + 0.350GPH501A + 0.350GPH5014                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19281} G2P500t +PERO9              =  0.650G1P500y + 0.350GPH5014                                : ARR( 0.100E-10,     0., 0.0);
+{ 19282} G2P500u +GNO                =       G1P500z +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19283} G2P500u +GNO                =       GPH501B                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19284} G2P500u +GHO2               =       GPH501C                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19285} G2P500u +GNO3               =       G1P500z +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19286} G2P500u +MEPERO             =  0.340G1P500z + 0.330GPH501D + 0.330GPH501E                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19287} G2P500u +PERO1              =  0.460G1P500z + 0.270GPH501D + 0.270GPH501E                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19288} G2P500u +PERO2              =  0.400G1P500z + 0.300GPH501D + 0.300GPH501E                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19289} G2P500u +PERO3              =  0.460G1P500z + 0.270GPH501D + 0.270GPH501E                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19290} G2P500u +PERO5              =  0.460G1P500z + 0.270GPH501D + 0.270GPH501E                 : ARR( 0.183E-11,   450., 0.0);
+{ 19291} G2P500u +PERO6              =  0.300G1P500z + 0.350GPH501D + 0.350GPH501E                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19292} G2P500u +PERO9              =  0.650G1P500z + 0.350GPH501E                                : ARR( 0.100E-10,     0., 0.0);
+{ 19293} G1P500x                     =       G2P500v                                               : ARR( 0.160E+12,  3221., 0.0);
+{ 19294} G1P500x                     =       GPD4000 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  6008., 0.0);
+{ 19295} G1P500y                     =       GND2000 +      GPD3000 +      GHO                     : ARR( 0.200E+15,  4146., 0.0);
+{ 19296} G1P500z                     =       GHN4001 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{ 19297} G2P500v +GNO                =       G1P5011 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19298} G2P500v +GNO                =       GPH501F                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19299} G2P500v +GHO2               =       GPH501G                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19300} G2P500v +GNO3               =       G1P5011 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19301} G2P500v +MEPERO             =  0.340G1P5011 + 0.330GPH501H + 0.330GPH501I                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19302} G2P500v +PERO1              =  0.460G1P5011 + 0.270GPH501H + 0.270GPH501I                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19303} G2P500v +PERO2              =  0.400G1P5011 + 0.300GPH501H + 0.300GPH501I                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19304} G2P500v +PERO3              =  0.460G1P5011 + 0.270GPH501H + 0.270GPH501I                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19305} G2P500v +PERO5              =  0.460G1P5011 + 0.270GPH501H + 0.270GPH501I                 : ARR( 0.183E-11,   450., 0.0);
+{ 19306} G2P500v +PERO6              =  0.300G1P5011 + 0.350GPH501H + 0.350GPH501I                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19307} G2P500v +PERO9              =  0.650G1P5011 + 0.350GPH501I                                : ARR( 0.100E-10,     0., 0.0);
+{ 19308} G1P5011                     =       GPH501J +      GHO2                                   : ARR( 0.160E+12,  2532., 0.0);
+{ 19309} G1P5011                     =       GHD4000 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4949., 0.0);
+{ 19310} GPN500B                     =       G3N500E +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19311} GPN500B +GHO                =       G2P500w                                               : ARR( 0.868E-12,     0., 0.0);
+{ 19312} GPN500B +GHO                =       G2P500x                                               : ARR( 0.275E-11,     0., 0.0);
+{ 19313} GPN500B+HV               =       G1P5012 +      GNO2                                   :  0.100E+01*SUN;
+{ 19314} GPN500B+HV               =       G3N2000 +      G2P3000                                :  0.100E+01*SUN;
+{ 19315} GPN500B+HV               =       G3N500E +      GNO2                                   :  0.100E+01*SUN;
+{ 19316} G2P500w +GNO                =       G1P5013 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19317} G2P500w +GNO                =       GPN500y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19318} G2P500w +GHO2               =       GPH501K                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19319} G2P500w +GNO3               =       G1P5013 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19320} G2P500w +MEPERO             =  0.340G1P5013 + 0.330GPN501H + 0.330GPN5016                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19321} G2P500w +PERO1              =  0.460G1P5013 + 0.270GPN501H + 0.270GPN5016                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19322} G2P500w +PERO2              =  0.400G1P5013 + 0.300GPN501H + 0.300GPN5016                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19323} G2P500w +PERO3              =  0.460G1P5013 + 0.270GPN501H + 0.270GPN5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19324} G2P500w +PERO5              =  0.460G1P5013 + 0.270GPN501H + 0.270GPN5016                 : ARR( 0.183E-11,   450., 0.0);
+{ 19325} G2P500w +PERO6              =  0.300G1P5013 + 0.350GPN501H + 0.350GPN5016                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19326} G2P500w +PERO9              =  0.650G1P5013 + 0.350GPN5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 19327} G2P500x +GNO                =       G1P5014 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19328} G2P500x +GNO                =       GPN501I                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19329} G2P500x +GHO2               =       GPH501L                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19330} G2P500x +GNO3               =       G1P5014 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19331} G2P500x +MEPERO             =  0.340G1P5014 + 0.330GPN501J + 0.330GPN501K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19332} G2P500x +PERO1              =  0.460G1P5014 + 0.270GPN501J + 0.270GPN501K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19333} G2P500x +PERO2              =  0.400G1P5014 + 0.300GPN501J + 0.300GPN501K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19334} G2P500x +PERO3              =  0.460G1P5014 + 0.270GPN501J + 0.270GPN501K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19335} G2P500x +PERO5              =  0.460G1P5014 + 0.270GPN501J + 0.270GPN501K                 : ARR( 0.183E-11,   450., 0.0);
+{ 19336} G2P500x +PERO6              =  0.300G1P5014 + 0.350GPN501J + 0.350GPN501K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19337} G2P500x +PERO9              =  0.650G1P5014 + 0.350GPN501K                                : ARR( 0.100E-10,     0., 0.0);
+{ 19338} G1P5012                     =       G3P4000 +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 19339} G1P5013                     =       G3N2000 +      GPD3000                                : ARR( 0.200E+15,  2252., 0.0);
+{ 19340} G1P5014                     =       GND4004 +      GCO     +      GNO2                    : ARR( 0.200E+15,  4566., 0.0);
+{ 19341} G3P4000 +GHO2               =  0.800GPG4000 + 0.200GPA4000 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19342} G3P4000 +GNO                =       G2P3000 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19343} G3P4000 +GNO2               =       GPP4000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19344} G3P4000 +GNO3               =       G2P3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19345} G3P4000 +MEPERO             =  0.685G2P3000 + 0.315GPA4000 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19346} G3P4000 +PERO1              =  0.800G2P3000 + 0.200GPA4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19347} G3P4000 +PERO2              =  0.750G2P3000 + 0.250GPA4000 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19348} G3P4000 +PERO3              =  0.800G2P3000 + 0.200GPA4000 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19349} G3P4000 +PERO5              =  0.650G2P3000 + 0.350GPA4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19350} G3P4000 +PERO6              =  0.650G2P3000 + 0.350GPA4000 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19351} G3P4000 +PERO9              =       G2P3000 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19352} GPN500C                     =       G3N500a +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19353} GPN500C +GHO                =       GPN500m +      GNO2                                   : ARR( 0.460E-13,     0., 0.0);
+{ 19354} GPN500C +GHO                =       G2P500y                                               : ARR( 0.283E-12,     0., 0.0);
+{ 19355} GPN500C +GHO                =       G2P500z                                               : ARR( 0.283E-12,     0., 0.0);
+{ 19356} GPN500C +GHO                =       GPN500E +      GNO2                                   : ARR( 0.718E-13,     0., 0.0);
+{ 19357} GPN500C+HV               =       G1P500W +      GNO2                                   :  0.100E+01*SUN;
+{ 19358} GPN500C+HV               =       G1P5008 +      GNO2                                   :  0.100E+01*SUN;
+{ 19359} GPN500C+HV               =       G3N500a +      GNO2                                   :  0.100E+01*SUN;
+{ 19360} G2P500y +GNO                =       G1P5015 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19361} G2P500y +GNO                =       GPN501A                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19362} G2P500y +GHO2               =       GPH501B                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19363} G2P500y +GNO3               =       G1P5015 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19364} G2P500y +MEPERO             =  0.340G1P5015 + 0.330GPN500G + 0.330GPN501I                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19365} G2P500y +PERO1              =  0.460G1P5015 + 0.270GPN500G + 0.270GPN501I                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19366} G2P500y +PERO2              =  0.400G1P5015 + 0.300GPN500G + 0.300GPN501I                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19367} G2P500y +PERO3              =  0.460G1P5015 + 0.270GPN500G + 0.270GPN501I                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19368} G2P500y +PERO5              =  0.460G1P5015 + 0.270GPN500G + 0.270GPN501I                 : ARR( 0.183E-11,   450., 0.0);
+{ 19369} G2P500y +PERO6              =  0.300G1P5015 + 0.350GPN500G + 0.350GPN501I                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19370} G2P500y +PERO9              =  0.650G1P5015 + 0.350GPN501I                                : ARR( 0.100E-10,     0., 0.0);
+{ 19371} G2P500z +GNO                =       G1P5016 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19372} G2P500z +GNO                =       GPN500z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19373} G2P500z +GHO2               =       GPH501M                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19374} G2P500z +GNO3               =       G1P5016 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19375} G2P500z +MEPERO             =  0.340G1P5016 + 0.330GPN5012 + 0.330GPN5017                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19376} G2P500z +PERO1              =  0.460G1P5016 + 0.270GPN5012 + 0.270GPN5017                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19377} G2P500z +PERO2              =  0.400G1P5016 + 0.300GPN5012 + 0.300GPN5017                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19378} G2P500z +PERO3              =  0.460G1P5016 + 0.270GPN5012 + 0.270GPN5017                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19379} G2P500z +PERO5              =  0.460G1P5016 + 0.270GPN5012 + 0.270GPN5017                 : ARR( 0.183E-11,   450., 0.0);
+{ 19380} G2P500z +PERO6              =  0.300G1P5016 + 0.350GPN5012 + 0.350GPN5017                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19381} G2P500z +PERO9              =  0.650G1P5016 + 0.350GPN5017                                : ARR( 0.100E-10,     0., 0.0);
+{ 19382} G1P5015                     =       GND2000 +      G2P3004                                : ARR( 0.200E+15,  7116., 0.0);
+{ 19383} G1P5016                     =       G2N2000 +      GPN3006                                : ARR( 0.200E+15,  6244., 0.0);
+{ 19384} G1P5016                     =       GND3000 +      GPD2000 +      GNO2                    : ARR( 0.200E+15,  6422., 0.0);
+{ 19385} GPH5008                     =       G3H500T +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19386} GPH5008 +GHO                =       GPN500E +      GHO                                    : ARR( 0.267E-10,     0., 0.0);
+{ 19387} GPH5008 +GHO                =       G2P5007                                               : ARR( 0.202E-11,  -190., 0.0);
+{ 19388} GPH5008+HV               =       G1P5017 +      GNO2                                   :  0.100E+01*SUN;
+{ 19389} GPH5008+HV               =       G1P5008 +      GHO                                    :  0.100E+01*SUN;
+{ 19390} GPH5008+HV               =       G3H500T +      GNO2                                   :  0.100E+01*SUN;
+{ 19391} G1P5017                     =       GPK5005 +      GHO                                    : ARR( 0.800E+11,  1899., 0.0);
+{ 19392} GPN500D                     =       G3N500J +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19393} GPN500D +GHO                =       G2P5011                                               : ARR( 0.150E-11,     0., 0.0);
+{ 19394} GPN500D +GHO                =       GPN500E +      GHO2                                   : ARR( 0.667E-11,     0., 0.0);
+{ 19395} GPN500D+HV               =       G1P5018 +      GNO2                                   :  0.100E+01*SUN;
+{ 19396} GPN500D+HV               =       G3N500J +      GNO2                                   :  0.100E+01*SUN;
+{ 19397} G2P5011 +GNO                =       G1P5019 +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19398} G2P5011 +GNO                =       GPN500a                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19399} G2P5011 +GHO2               =       GPH501N                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19400} G2P5011 +GNO3               =       G1P5019 +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19401} G2P5011 +MEPERO             =  0.340G1P5019 + 0.330GPN500e + 0.330GPN500v                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19402} G2P5011 +PERO1              =  0.460G1P5019 + 0.270GPN500e + 0.270GPN500v                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19403} G2P5011 +PERO2              =  0.400G1P5019 + 0.300GPN500e + 0.300GPN500v                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19404} G2P5011 +PERO3              =  0.460G1P5019 + 0.270GPN500e + 0.270GPN500v                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19405} G2P5011 +PERO5              =  0.460G1P5019 + 0.270GPN500e + 0.270GPN500v                 : ARR( 0.183E-11,   450., 0.0);
+{ 19406} G2P5011 +PERO6              =  0.300G1P5019 + 0.350GPN500e + 0.350GPN500v                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19407} G2P5011 +PERO9              =  0.650G1P5019 + 0.350GPN500v                                : ARR( 0.100E-10,     0., 0.0);
+{ 19408} G1P5018                     =       GPK5005 +      GHO2                                   : ARR( 0.800E+11,  2246., 0.0);
+{ 19409} G1P5019                     =       GND3000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 19410} GPN500E                     =       G3N500j +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19411} GPN500E +GHO                =       G2P5012                                               : ARR( 0.920E-12,     0., 0.0);
+{ 19412} GPN500E +GHO                =       G2P5013                                               : ARR( 0.884E-12,     0., 0.0);
+{ 19413} GPN500E+HV               =       G1P501A +      GNO2                                   :  0.100E+01*SUN;
+{ 19414} GPN500E+HV               =       G3N4000 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 19415} G2P5012 +GNO                =       G1P501B +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19416} G2P5012 +GNO                =       GPN501C                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19417} G2P5012 +GHO2               =       GPH501E                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19418} G2P5012 +GNO3               =       G1P501B +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19419} G2P5012 +MEPERO             =  0.340G1P501B + 0.330GPN500M + 0.330GPN501K                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19420} G2P5012 +PERO1              =  0.460G1P501B + 0.270GPN500M + 0.270GPN501K                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19421} G2P5012 +PERO2              =  0.400G1P501B + 0.300GPN500M + 0.300GPN501K                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19422} G2P5012 +PERO3              =  0.460G1P501B + 0.270GPN500M + 0.270GPN501K                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19423} G2P5012 +PERO5              =  0.460G1P501B + 0.270GPN500M + 0.270GPN501K                 : ARR( 0.183E-11,   450., 0.0);
+{ 19424} G2P5012 +PERO6              =  0.300G1P501B + 0.350GPN500M + 0.350GPN501K                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19425} G2P5012 +PERO9              =  0.650G1P501B + 0.350GPN501K                                : ARR( 0.100E-10,     0., 0.0);
+{ 19426} G2P5013 +GNO                =       G1P501C +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19427} G2P5013 +GNO                =       GPN5011                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19428} G2P5013 +GHO2               =       GPH501O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19429} G2P5013 +GNO3               =       G1P501C +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19430} G2P5013 +MEPERO             =  0.340G1P501C + 0.330GPN5013 + 0.330GPN5018                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19431} G2P5013 +PERO1              =  0.460G1P501C + 0.270GPN5013 + 0.270GPN5018                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19432} G2P5013 +PERO2              =  0.400G1P501C + 0.300GPN5013 + 0.300GPN5018                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19433} G2P5013 +PERO3              =  0.460G1P501C + 0.270GPN5013 + 0.270GPN5018                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19434} G2P5013 +PERO5              =  0.460G1P501C + 0.270GPN5013 + 0.270GPN5018                 : ARR( 0.183E-11,   450., 0.0);
+{ 19435} G2P5013 +PERO6              =  0.300G1P501C + 0.350GPN5013 + 0.350GPN5018                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19436} G2P5013 +PERO9              =  0.650G1P501C + 0.350GPN5018                                : ARR( 0.100E-10,     0., 0.0);
+{ 19437} G1P501A +OXYGEN             =       GPD5008 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 19438} G1P501B                     =       GND2000 +      G2P3006                                : ARR( 0.200E+15,  6866., 0.0);
+{ 19439} G1P501C                     =       GND3000 +      GCO     +      GNO2    +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 19440} GPN500F                     =       G3N5009 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19441} GPN500F +GHO                =       GPN500m +      GHO2                                   : ARR( 0.439E-11,     0., 0.0);
+{ 19442} GPN500F +GHO                =       G2P5014                                               : ARR( 0.154E-11,     0., 0.0);
+{ 19443} GPN500F+HV               =       G1P5009 +      GNO2                                   :  0.100E+01*SUN;
+{ 19444} GPN500F+HV               =       G3N5009 +      GNO2                                   :  0.100E+01*SUN;
+{ 19445} G2P5014 +GNO                =       G1P501D +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19446} G2P5014 +GNO                =       GPN501D                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19447} G2P5014 +GHO2               =       GPH501F                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19448} G2P5014 +GNO3               =       G1P501D +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19449} G2P5014 +MEPERO             =  0.340G1P501D + 0.330GPN500I + 0.330GPN501L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19450} G2P5014 +PERO1              =  0.460G1P501D + 0.270GPN500I + 0.270GPN501L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19451} G2P5014 +PERO2              =  0.400G1P501D + 0.300GPN500I + 0.300GPN501L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19452} G2P5014 +PERO3              =  0.460G1P501D + 0.270GPN500I + 0.270GPN501L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19453} G2P5014 +PERO5              =  0.460G1P501D + 0.270GPN500I + 0.270GPN501L                 : ARR( 0.183E-11,   450., 0.0);
+{ 19454} G2P5014 +PERO6              =  0.300G1P501D + 0.350GPN500I + 0.350GPN501L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19455} G2P5014 +PERO9              =  0.650G1P501D + 0.350GPN501L                                : ARR( 0.100E-10,     0., 0.0);
+{ 19456} G1P501D                     =       GCH2O   +      GPN400N +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 19457} GPH5009                     =       G3H5005 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19458} GPH5009 +GHO                =       GPH501P +      GHO2                                   : ARR( 0.439E-11,     0., 0.0);
+{ 19459} GPH5009 +GHO                =       GPK5005 +      GHO                                    : ARR( 0.274E-10,     0., 0.0);
+{ 19460} GPH5009 +GHO                =       G2P5008                                               : ARR( 0.207E-11,  -190., 0.0);
+{ 19461} GPH5009+HV               =       G1P5009 +      GHO                                    :  0.100E+01*SUN;
+{ 19462} GPH5009+HV               =       G3H5005 +      GNO2                                   :  0.100E+01*SUN;
+{ 19463} GPO5007                     =       G3K500A +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19464} GPO5007 +GHO                =       GPD5000 +      GHO2                                   : ARR( 0.411E-11,     0., 0.0);
+{ 19465} GPO5007 +GHO                =       G2P5015                                               : ARR( 0.144E-11,     0., 0.0);
+{ 19466} GPO5007 +GHO                =       G2P5016                                               : ARR( 0.144E-11,     0., 0.0);
+{ 19467} GPO5007 +GHO                =       GPK5005 +      GHO2                                   : ARR( 0.642E-11,     0., 0.0);
+{ 19468} GPO5007+HV               =       G3K500A +      GNO2                                   :  0.100E+01*SUN;
+{ 19469} G2P5015 +GNO                =       G1P501E +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19470} G2P5015 +GNO                =       GPN501E                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19471} G2P5015 +GHO2               =       GPH501H                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19472} G2P5015 +GNO3               =       G1P501E +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19473} G2P5015 +MEPERO             =  0.340G1P501E + 0.330GPO5005 + 0.330GPK500L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19474} G2P5015 +PERO1              =  0.460G1P501E + 0.270GPO5005 + 0.270GPK500L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19475} G2P5015 +PERO2              =  0.400G1P501E + 0.300GPO5005 + 0.300GPK500L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19476} G2P5015 +PERO3              =  0.460G1P501E + 0.270GPO5005 + 0.270GPK500L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19477} G2P5015 +PERO5              =  0.460G1P501E + 0.270GPO5005 + 0.270GPK500L                 : ARR( 0.183E-11,   450., 0.0);
+{ 19478} G2P5015 +PERO6              =  0.300G1P501E + 0.350GPO5005 + 0.350GPK500L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19479} G2P5015 +PERO9              =  0.650G1P501E + 0.350GPK500L                                : ARR( 0.100E-10,     0., 0.0);
+{ 19480} G2P5016 +GNO                =       G1P501F +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19481} G2P5016 +GNO                =       GPN500Y                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19482} G2P5016 +GHO2               =       GPH500x                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19483} G2P5016 +GNO3               =       G1P501F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19484} G2P5016 +MEPERO             =  0.340G1P501F + 0.330GPO500A + 0.330GPK500G                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19485} G2P5016 +PERO1              =  0.460G1P501F + 0.270GPO500A + 0.270GPK500G                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19486} G2P5016 +PERO2              =  0.400G1P501F + 0.300GPO500A + 0.300GPK500G                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19487} G2P5016 +PERO3              =  0.460G1P501F + 0.270GPO500A + 0.270GPK500G                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19488} G2P5016 +PERO5              =  0.460G1P501F + 0.270GPO500A + 0.270GPK500G                 : ARR( 0.183E-11,   450., 0.0);
+{ 19489} G2P5016 +PERO6              =  0.300G1P501F + 0.350GPO500A + 0.350GPK500G                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19490} G2P5016 +PERO9              =  0.650G1P501F + 0.350GPK500G                                : ARR( 0.100E-10,     0., 0.0);
+{ 19491} G1P501E                     =       GCH2O   +      GPD4002 +      GHO2                    : ARR( 0.200E+15,  5041., 0.0);
+{ 19492} G1P501F                     =       GDO3000 +      GPD2000 +      GHO2                    : ARR( 0.200E+15,  3675., 0.0);
+{ 19493} GPK5005                     =       G3K500T +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19494} GPK5005 +GHO                =       GPD5008 +      GHO2                                   : ARR( 0.408E-11,     0., 0.0);
+{ 19495} GPK5005 +GHO                =       G2P5017                                               : ARR( 0.455E-11,     0., 0.0);
+{ 19496} GPK5005 +GHO                =       G2P5018                                               : ARR( 0.875E-12,     0., 0.0);
+{ 19497} GPK5005+HV               =       G3K4002 +      GCO     +      GNO2                    :  0.100E+01*SUN;
+{ 19498} G2P5017 +GNO                =       G1P501G +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19499} G2P5017 +GNO                =       GPN501F                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19500} G2P5017 +GHO2               =       GPH501I                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19501} G2P5017 +GNO3               =       G1P501G +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19502} G2P5017 +MEPERO             =  0.340G1P501G + 0.330GPK5006 + 0.330GPK500O                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19503} G2P5017 +PERO1              =  0.460G1P501G + 0.270GPK5006 + 0.270GPK500O                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19504} G2P5017 +PERO2              =  0.400G1P501G + 0.300GPK5006 + 0.300GPK500O                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19505} G2P5017 +PERO3              =  0.460G1P501G + 0.270GPK5006 + 0.270GPK500O                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19506} G2P5017 +PERO5              =  0.460G1P501G + 0.270GPK5006 + 0.270GPK500O                 : ARR( 0.183E-11,   450., 0.0);
+{ 19507} G2P5017 +PERO6              =  0.300G1P501G + 0.350GPK5006 + 0.350GPK500O                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19508} G2P5017 +PERO9              =  0.650G1P501G + 0.350GPK500O                                : ARR( 0.100E-10,     0., 0.0);
+{ 19509} G2P5018 +GNO                =       G1P501H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19510} G2P5018 +GNO                =       GPN500Z                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19511} G2P5018 +GHO2               =       GPH500y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19512} G2P5018 +GNO3               =       G1P501H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19513} G2P5018 +MEPERO             =  0.340G1P501H + 0.330GPK500B + 0.330GPK500H                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19514} G2P5018 +PERO1              =  0.460G1P501H + 0.270GPK500B + 0.270GPK500H                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19515} G2P5018 +PERO2              =  0.400G1P501H + 0.300GPK500B + 0.300GPK500H                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19516} G2P5018 +PERO3              =  0.460G1P501H + 0.270GPK500B + 0.270GPK500H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19517} G2P5018 +PERO5              =  0.460G1P501H + 0.270GPK500B + 0.270GPK500H                 : ARR( 0.183E-11,   450., 0.0);
+{ 19518} G2P5018 +PERO6              =  0.300G1P501H + 0.350GPK500B + 0.350GPK500H                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19519} G2P5018 +PERO9              =  0.650G1P501H + 0.350GPK500H                                : ARR( 0.100E-10,     0., 0.0);
+{ 19520} G1P501G                     =       GCH2O   +      GPD4005 +      GHO2                    : ARR( 0.200E+15,  4658., 0.0);
+{ 19521} G1P501H                     =       GDO3000 +      GCO     +      GNO2    +      GCO      : ARR( 0.200E+15,  3012., 0.0);
+{ 19522} GPD5000                     =       G3D5001 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19523} GPD5000 +GHO                =       GPD5008 +      GHO2                                   : ARR( 0.648E-11,     0., 0.0);
+{ 19524} GPD5000 +GHO                =       G2P5019                                               : ARR( 0.462E-11,     0., 0.0);
+{ 19525} GPD5000 +GHO                =       G3P5000                                               : ARR( 0.214E-10,     0., 0.0);
+{ 19526} GPD5000 +GNO3               =       G3P5000 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19527} GPD5000+HV               =       G3D5001 +      GNO2                                   :  0.100E+01*SUN;
+{ 19528} GPD5000+HV               =       G2P400L +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19529} GPD5000+HV               =       GPK3000 +      GD02000                                :  0.100E+01*SUN;
+{ 19530} G2P5019 +GNO                =       G1P501I +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19531} G2P5019 +GNO                =       GPN500b                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19532} G2P5019 +GHO2               =       GPH500z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19533} G2P5019 +GNO3               =       G1P501I +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19534} G2P5019 +MEPERO             =  0.340G1P501I + 0.330GPD5003 + 0.330GPD5005                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19535} G2P5019 +PERO1              =  0.460G1P501I + 0.270GPD5003 + 0.270GPD5005                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19536} G2P5019 +PERO2              =  0.400G1P501I + 0.300GPD5003 + 0.300GPD5005                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19537} G2P5019 +PERO3              =  0.460G1P501I + 0.270GPD5003 + 0.270GPD5005                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19538} G2P5019 +PERO5              =  0.460G1P501I + 0.270GPD5003 + 0.270GPD5005                 : ARR( 0.183E-11,   450., 0.0);
+{ 19539} G2P5019 +PERO6              =  0.300G1P501I + 0.350GPD5003 + 0.350GPD5005                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19540} G2P5019 +PERO9              =  0.650G1P501I + 0.350GPD5005                                : ARR( 0.100E-10,     0., 0.0);
+{ 19541} G3P5000 +GHO2               =  0.800GPG5001 + 0.200GPA5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19542} G3P5000 +GNO                =       G2P400L +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19543} G3P5000 +GNO2               =       GPP5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19544} G3P5000 +GNO3               =       G2P400L +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19545} G3P5000 +MEPERO             =  0.685G2P400L + 0.315GPA5002 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19546} G3P5000 +PERO1              =  0.800G2P400L + 0.200GPA5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19547} G3P5000 +PERO2              =  0.750G2P400L + 0.250GPA5002 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19548} G3P5000 +PERO3              =  0.800G2P400L + 0.200GPA5002 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19549} G3P5000 +PERO5              =  0.650G2P400L + 0.350GPA5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19550} G3P5000 +PERO6              =  0.650G2P400L + 0.350GPA5002 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19551} G3P5000 +PERO9              =       G2P400L +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19552} G2P400L +GNO                =       G1P400M +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19553} G2P400L +GNO                =       GPN4009                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19554} G2P400L +GHO2               =       GPH400M                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19555} G2P400L +GNO3               =       G1P400M +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19556} G2P400L +MEPERO             =  0.480G1P400M + 0.260GPO4005 + 0.260GPD4002                 : ARR( 0.146E-12,  -445., 0.0);
+{ 19557} G2P400L +PERO1              =  0.600G1P400M + 0.200GPO4005 + 0.200GPD4002                 : ARR( 0.112E-12,  -500., 0.0);
+{ 19558} G2P400L +PERO2              =  0.560G1P400M + 0.220GPO4005 + 0.220GPD4002                 : ARR( 0.418E-13, -1000., 0.0);
+{ 19559} G2P400L +PERO3              =  0.600G1P400M + 0.200GPO4005 + 0.200GPD4002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 19560} G2P400L +PERO5              =  0.600G1P400M + 0.200GPO4005 + 0.200GPD4002                 : ARR( 0.473E-11,   850., 0.0);
+{ 19561} G2P400L +PERO6              =  0.460G1P400M + 0.270GPO4005 + 0.270GPD4002                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19562} G2P400L +PERO9              =  0.800G1P400M + 0.200GPD4002                                : ARR( 0.100E-10,     0., 0.0);
+{ 19563} G1P501I                     =       GPD2000 +      GDD3000 +      GHO2                    : ARR( 0.200E+15,  3292., 0.0);
+{ 19564} G1P400M +OXYGEN             =       GPD4002 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 19565} GND500d +GHO                =       G3N500k                                               : ARR( 0.223E-10,     0., 0.0);
+{ 19566} GND500d +GHO                =       G3N500l                                               : ARR( 0.446E-11,     0., 0.0);
+{ 19567} GND500d +GNO3               =       G3N500k +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19568} GND500d +GNO3               =       G3N500l +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19569} GND500d+HV               =       GCO     +      G2N400n +      GHO2                    :  0.100E+01*SUN;
+{ 19570} GND500d+HV               =       GD02000 +      G2D3002 +      GNO2                    :  0.100E+01*SUN;
+{ 19571} GND500d+HV               =       G1D500n +      GNO2                                   :  0.100E+01*SUN;
+{ 19572} GND500d+HV               =       GDD4000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 19573} GND500d+HV               =       GUD3000 +      GND2000                                :  0.100E+01*SUN;
+{ 19574} G3N500k +GHO2               =  0.800GGN5019 + 0.200GAN501I + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19575} G3N500k +GNO                =       G2N400n +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19576} G3N500k +GNO2               =       GPN501M                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19577} G3N500k +GNO3               =       G2N400n +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19578} G3N500k +MEPERO             =  0.685G2N400n + 0.315GAN501I + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19579} G3N500k +PERO1              =  0.800G2N400n + 0.200GAN501I + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19580} G3N500k +PERO2              =  0.750G2N400n + 0.250GAN501I + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19581} G3N500k +PERO3              =  0.800G2N400n + 0.200GAN501I + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19582} G3N500k +PERO5              =  0.650G2N400n + 0.350GAN501I + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19583} G3N500k +PERO6              =  0.650G2N400n + 0.350GAN501I + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19584} G3N500k +PERO9              =       G2N400n +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19585} G3N500l +GHO2               =  0.800GGN5011 + 0.200GAN500k + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19586} G3N500l +GNO                =       GDD4000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19587} G3N500l +GNO2               =       GPN500m                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19588} G3N500l +GNO3               =       GDD4000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19589} G3N500l +MEPERO             =  0.685GDD4000 + 0.315GAN500k + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19590} G3N500l +PERO1              =  0.800GDD4000 + 0.200GAN500k + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19591} G3N500l +PERO2              =  0.750GDD4000 + 0.250GAN500k + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19592} G3N500l +PERO3              =  0.800GDD4000 + 0.200GAN500k + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19593} G3N500l +PERO5              =  0.650GDD4000 + 0.350GAN500k + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19594} G3N500l +PERO6              =  0.650GDD4000 + 0.350GAN500k + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19595} G3N500l +PERO9              =       GDD4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19596} G2N400n +GNO                =       G1N400h +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19597} G2N400n +GNO                =       GNN4008                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19598} G2N400n +GHO2               =       GHN400M                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19599} G2N400n +GNO3               =       G1N400h +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19600} G2N400n +MEPERO             =  0.480G1N400h + 0.260GND4006 + 0.260GND400D                 : ARR( 0.146E-12,  -445., 0.0);
+{ 19601} G2N400n +PERO1              =  0.600G1N400h + 0.200GND4006 + 0.200GND400D                 : ARR( 0.112E-12,  -500., 0.0);
+{ 19602} G2N400n +PERO2              =  0.560G1N400h + 0.220GND4006 + 0.220GND400D                 : ARR( 0.418E-13, -1000., 0.0);
+{ 19603} G2N400n +PERO3              =  0.600G1N400h + 0.200GND4006 + 0.200GND400D                 : ARR( 0.126E-12,  -850., 0.0);
+{ 19604} G2N400n +PERO5              =  0.600G1N400h + 0.200GND4006 + 0.200GND400D                 : ARR( 0.473E-11,   850., 0.0);
+{ 19605} G2N400n +PERO6              =  0.460G1N400h + 0.270GND4006 + 0.270GND400D                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19606} G2N400n +PERO9              =  0.800G1N400h + 0.200GND400D                                : ARR( 0.100E-10,     0., 0.0);
+{ 19607} G1D500n                     =       GDD4000 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 19608} GUO3000 +GHO                =       GUD3000 +      GHO2                                   : ARR( 0.328E-11,     0., 0.0);
+{ 19609} GUO3000 +GHO                =       G2O3003                                               : ARR( 0.452E-11,     0., 0.0);
+{ 19610} GUO3000 +GHO                =       G2O3004                                               : ARR( 0.301E-10,     0., 0.0);
+{ 19611} GUO3000 +GO3                =  2.000GDO2000 + 0.740GHCOOH  + 0.260GCO2    + 0.260GH2      : ARR( 0.253E-17,     0., 0.0);
+{ 19612} GUO3000 +GO3                =       GCO     + 0.760GH2O    + 0.240GHO2    + 0.240GHO      : ARR( 0.253E-17,     0., 0.0);
+{ 19613} GUO3000 +GO3                =  3.040GCH2O   + 0.680GAO2000 + 0.280GCO2    + 0.280GCH3OH   : ARR( 0.253E-17,     0., 0.0);
+{ 19614} GUO3000 +GO3                =  1.040GCO     + 1.040GHO     + 1.040GHO2                    : ARR( 0.253E-17,     0., 0.0);
+{ 19615} GUO3000 +GNO3               =       G2N3007                                               : ARR( 0.135E-13,     0., 0.0);
+{ 19616} GNN501T +GHO                =       GNN502v +      GHO2                                   : ARR( 0.867E-12,     0., 0.0);
+{ 19617} GNN501T +GHO                =       G3N500m                                               : ARR( 0.448E-11,     0., 0.0);
+{ 19618} GNN501T +GNO3               =       G3N500m +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19619} GNN501T+HV               =       G1N501w +      GNO2                                   :  0.100E+01*SUN;
+{ 19620} GNN501T+HV               =       G1N502z +      GNO2                                   :  0.100E+01*SUN;
+{ 19621} GNN501T+HV               =       GND4002 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 19622} GNN501T+HV               =       G2K3001 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 19623} G3N500m +GHO2               =  0.800GGN5015 + 0.200GAN501B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19624} G3N500m +GNO                =       GND4002 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19625} G3N500m +GNO2               =       GPN501D                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19626} G3N500m +GNO3               =       GND4002 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19627} G3N500m +MEPERO             =  0.685GND4002 + 0.315GAN501B + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19628} G3N500m +PERO1              =  0.800GND4002 + 0.200GAN501B + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19629} G3N500m +PERO2              =  0.750GND4002 + 0.250GAN501B + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19630} G3N500m +PERO3              =  0.800GND4002 + 0.200GAN501B + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19631} G3N500m +PERO5              =  0.650GND4002 + 0.350GAN501B + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19632} G3N500m +PERO6              =  0.650GND4002 + 0.350GAN501B + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19633} G3N500m +PERO9              =       GND4002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19634} GHN502S +GHO                =       GHN505N +      GHO2                                   : ARR( 0.406E-11,     0., 0.0);
+{ 19635} GHN502S +GHO                =       GND500e +      GHO                                    : ARR( 0.416E-10,     0., 0.0);
+{ 19636} GHN502S +GHO                =       G3H500j                                               : ARR( 0.419E-11,     0., 0.0);
+{ 19637} GHN502S +GHO                =       G2N501r                                               : ARR( 0.192E-11,  -190., 0.0);
+{ 19638} GHN502S +GNO3               =       G3H500j +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19639} GHN502S+HV               =       G1N501w +      GHO                                    :  0.100E+01*SUN;
+{ 19640} GHN502S+HV               =       G1H501y +      GNO2                                   :  0.100E+01*SUN;
+{ 19641} GHN502S+HV               =       GHD4000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 19642} GHN502S+HV               =       G2K3001 +      GND2000 +      GHO                     :  0.100E+01*SUN;
+{ 19643} G3H500j +GHO2               =  0.800GGH5013 + 0.200GAH501G + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19644} G3H500j +GNO                =       GHD4000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19645} G3H500j +GNO2               =       GPH501F                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19646} G3H500j +GNO3               =       GHD4000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19647} G3H500j +MEPERO             =  0.685GHD4000 + 0.315GAH501G + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19648} G3H500j +PERO1              =  0.800GHD4000 + 0.200GAH501G + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19649} G3H500j +PERO2              =  0.750GHD4000 + 0.250GAH501G + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19650} G3H500j +PERO3              =  0.800GHD4000 + 0.200GAH501G + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19651} G3H500j +PERO5              =  0.650GHD4000 + 0.350GAH501G + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19652} G3H500j +PERO6              =  0.650GHD4000 + 0.350GAH501G + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19653} G3H500j +PERO9              =       GHD4000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19654} GND500e +GHO                =       GND5014 +      GHO2                                   : ARR( 0.265E-11,     0., 0.0);
+{ 19655} GND500e +GHO                =       G3N500n                                               : ARR( 0.449E-11,     0., 0.0);
+{ 19656} GND500e +GNO3               =       G3N500n +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19657} GND500e+HV               =       G3K2001 +      G2N300A                                :  0.100E+01*SUN;
+{ 19658} GND500e+HV               =       G1D500Z +      GNO2                                   :  0.100E+01*SUN;
+{ 19659} GND500e+HV               =       GDK4001 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 19660} G3N500n +GHO2               =  0.800GGN5016 + 0.200GAN501H + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19661} G3N500n +GNO                =       GDK4001 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19662} G3N500n +GNO2               =       GPN501L                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19663} G3N500n +GNO3               =       GDK4001 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19664} G3N500n +MEPERO             =  0.685GDK4001 + 0.315GAN501H + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19665} G3N500n +PERO1              =  0.800GDK4001 + 0.200GAN501H + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19666} G3N500n +PERO2              =  0.750GDK4001 + 0.250GAN501H + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19667} G3N500n +PERO3              =  0.800GDK4001 + 0.200GAN501H + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19668} G3N500n +PERO5              =  0.650GDK4001 + 0.350GAN501H + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19669} G3N500n +PERO6              =  0.650GDK4001 + 0.350GAN501H + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19670} G3N500n +PERO9              =       GDK4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19671} GND400D +GHO                =       G3N400H                                               : ARR( 0.211E-10,     0., 0.0);
+{ 19672} GND400D +GHO                =       G3N400I                                               : ARR( 0.422E-11,     0., 0.0);
+{ 19673} GND400D +GNO3               =       G3N400H +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19674} GND400D +GNO3               =       G3N400I +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19675} GND400D+HV               =       GCO     +      G2N300A +      GHO2                    :  0.100E+01*SUN;
+{ 19676} GND400D+HV               =       G1D4007 +      GNO2                                   :  0.100E+01*SUN;
+{ 19677} GND400D+HV               =       GDD3000 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 19678} G3N400H +GHO2               =  0.800GGN400I + 0.200GAN400J + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19679} G3N400H +GNO                =       G2N300A +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19680} G3N400H +GNO2               =       GPN400H                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19681} G3N400H +GNO3               =       G2N300A +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19682} G3N400H +MEPERO             =  0.685G2N300A + 0.315GAN400J + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19683} G3N400H +PERO1              =  0.800G2N300A + 0.200GAN400J + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19684} G3N400H +PERO2              =  0.750G2N300A + 0.250GAN400J + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19685} G3N400H +PERO3              =  0.800G2N300A + 0.200GAN400J + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19686} G3N400H +PERO5              =  0.650G2N300A + 0.350GAN400J + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19687} G3N400H +PERO6              =  0.650G2N300A + 0.350GAN400J + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19688} G3N400H +PERO9              =       G2N300A +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19689} G3N400I +GHO2               =  0.800GGN400M + 0.200GAN400N + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19690} G3N400I +GNO                =       GDD3000 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19691} G3N400I +GNO2               =       GPN400N                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19692} G3N400I +GNO3               =       GDD3000 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19693} G3N400I +MEPERO             =  0.685GDD3000 + 0.315GAN400N + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19694} G3N400I +PERO1              =  0.800GDD3000 + 0.200GAN400N + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19695} G3N400I +PERO2              =  0.750GDD3000 + 0.250GAN400N + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19696} G3N400I +PERO3              =  0.800GDD3000 + 0.200GAN400N + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19697} G3N400I +PERO5              =  0.650GDD3000 + 0.350GAN400N + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19698} G3N400I +PERO6              =  0.650GDD3000 + 0.350GAN400N + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19699} G3N400I +PERO9              =       GDD3000 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19700} GHD500R +GHO                =       G3H500k                                               : ARR( 0.219E-10,     0., 0.0);
+{ 19701} GHD500R +GHO                =       G2H5027                                               : ARR( 0.150E-10,     0., 0.0);
+{ 19702} GHD500R +GHO                =       GDD5004 +      GHO                                    : ARR( 0.265E-10,     0., 0.0);
+{ 19703} GHD500R +GHO                =       G3H500l                                               : ARR( 0.219E-10,     0., 0.0);
+{ 19704} GHD500R +GNO3               =       G3H500k +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19705} GHD500R +GNO3               =       G3H500l +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19706} GHD500R+HV               =       GCO     +      G2H400f +      GHO2                    :  0.100E+01*SUN;
+{ 19707} GHD500R+HV               =       GD02000 +      G2D3002 +      GHO                     :  0.100E+01*SUN;
+{ 19708} GHD500R+HV               =       G1D500n +      GHO                                    :  0.100E+01*SUN;
+{ 19709} GHD500R+HV               =       GDD4000 +      GCO     +      GHO     +      GHO2     :  0.100E+01*SUN;
+{ 19710} G3H500k +GHO2               =  0.800GGH5017 + 0.200GAH501O + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19711} G3H500k +GNO                =       G2H400f +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19712} G3H500k +GNO2               =       GPH501Q                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19713} G3H500k +GNO3               =       G2H400f +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19714} G3H500k +MEPERO             =  0.685G2H400f + 0.315GAH501O + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19715} G3H500k +PERO1              =  0.800G2H400f + 0.200GAH501O + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19716} G3H500k +PERO2              =  0.750G2H400f + 0.250GAH501O + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19717} G3H500k +PERO3              =  0.800G2H400f + 0.200GAH501O + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19718} G3H500k +PERO5              =  0.650G2H400f + 0.350GAH501O + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19719} G3H500k +PERO6              =  0.650G2H400f + 0.350GAH501O + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19720} G3H500k +PERO9              =       G2H400f +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19721} G2H5027 +GNO                =       G1H504N +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19722} G2H5027 +GNO                =       GHN505H                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19723} G2H5027 +GHO2               =       GHH5021                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19724} G2H5027 +GNO3               =       G1H504N +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19725} G2H5027 +MEPERO             =  0.340G1H504N + 0.330GHD5017 + 0.330GHD5016                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19726} G2H5027 +PERO1              =  0.460G1H504N + 0.270GHD5017 + 0.270GHD5016                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19727} G2H5027 +PERO2              =  0.400G1H504N + 0.300GHD5017 + 0.300GHD5016                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19728} G2H5027 +PERO3              =  0.460G1H504N + 0.270GHD5017 + 0.270GHD5016                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19729} G2H5027 +PERO5              =  0.460G1H504N + 0.270GHD5017 + 0.270GHD5016                 : ARR( 0.183E-11,   450., 0.0);
+{ 19730} G2H5027 +PERO6              =  0.300G1H504N + 0.350GHD5017 + 0.350GHD5016                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19731} G2H5027 +PERO9              =  0.650G1H504N + 0.350GHD5016                                : ARR( 0.100E-10,     0., 0.0);
+{ 19732} G3H500l +GHO2               =  0.800GGH5014 + 0.200GAH501N + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19733} G3H500l +GNO                =       GDD4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 19734} G3H500l +GNO2               =       GPH501P                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19735} G3H500l +GNO3               =       GDD4000 +      GNO2    +      GHO     +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 19736} G3H500l +MEPERO             =  0.685GDD4000 + 0.315GAH501N + 0.685GHO     + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19737} G3H500l +PERO1              =  0.800GDD4000 + 0.200GAH501N + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19738} G3H500l +PERO2              =  0.750GDD4000 + 0.250GAH501N + 0.750GHO     + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19739} G3H500l +PERO3              =  0.800GDD4000 + 0.200GAH501N + 0.800GHO     + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19740} G3H500l +PERO5              =  0.650GDD4000 + 0.350GAH501N + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19741} G3H500l +PERO6              =  0.650GDD4000 + 0.350GAH501N + 0.650GHO     + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19742} G3H500l +PERO9              =       GDD4000 +      GHO     +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19743} G2H400f +GNO                =       G1H400i +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19744} G2H400f +GNO                =       GHN400J                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19745} G2H400f +GHO2               =       GHH400A                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19746} G2H400f +GNO3               =       G1H400i +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19747} G2H400f +MEPERO             =  0.480G1H400i + 0.260GHD4006 + 0.260GHD400C                 : ARR( 0.146E-12,  -445., 0.0);
+{ 19748} G2H400f +PERO1              =  0.600G1H400i + 0.200GHD4006 + 0.200GHD400C                 : ARR( 0.112E-12,  -500., 0.0);
+{ 19749} G2H400f +PERO2              =  0.560G1H400i + 0.220GHD4006 + 0.220GHD400C                 : ARR( 0.418E-13, -1000., 0.0);
+{ 19750} G2H400f +PERO3              =  0.600G1H400i + 0.200GHD4006 + 0.200GHD400C                 : ARR( 0.126E-12,  -850., 0.0);
+{ 19751} G2H400f +PERO5              =  0.600G1H400i + 0.200GHD4006 + 0.200GHD400C                 : ARR( 0.473E-11,   850., 0.0);
+{ 19752} G2H400f +PERO6              =  0.460G1H400i + 0.270GHD4006 + 0.270GHD400C                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19753} G2H400f +PERO9              =  0.800G1H400i + 0.200GHD400C                                : ARR( 0.100E-10,     0., 0.0);
+{ 19754} G1H504N                     =       GDD2000 +      GDD3000 +      GHO                     : ARR( 0.200E+15,  4279., 0.0);
+{ 19755} GDD5004 +GHO                =       G3D5006                                               : ARR( 0.208E-10,     0., 0.0);
+{ 19756} GDD5004 +GHO                =       G2D500Y                                               : ARR( 0.273E-11,     0., 0.0);
+{ 19757} GDD5004 +GHO                =       G2D500Z                                               : ARR( 0.273E-11,     0., 0.0);
+{ 19758} GDD5004 +GHO                =       G3D4000 +      GCO                                    : ARR( 0.127E-10,     0., 0.0);
+{ 19759} GDD5004 +GNO3               =       G3D5006 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19760} GDD5004 +GNO3               =       G3D4000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 19761} GDD5004+HV               =       GCO     +      G2D400C +      GHO2                    :  0.100E+01*SUN;
+{ 19762} GDD5004+HV               =       G3D4000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19763} GDD5004+HV               =       GDD4000 +      GCO                                    :  0.100E+01*SUN;
+{ 19764} GDD5004+HV               =       GD03000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 19765} G3D5006 +GHO2               =  0.800GGD5009 + 0.200GAD500B + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19766} G3D5006 +GNO                =       G2D400C +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19767} G3D5006 +GNO2               =       GPD5009                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19768} G3D5006 +GNO3               =       G2D400C +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19769} G3D5006 +MEPERO             =  0.685G2D400C + 0.315GAD500B + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19770} G3D5006 +PERO1              =  0.800G2D400C + 0.200GAD500B + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19771} G3D5006 +PERO2              =  0.750G2D400C + 0.250GAD500B + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19772} G3D5006 +PERO3              =  0.800G2D400C + 0.200GAD500B + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19773} G3D5006 +PERO5              =  0.650G2D400C + 0.350GAD500B + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19774} G3D5006 +PERO6              =  0.650G2D400C + 0.350GAD500B + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19775} G3D5006 +PERO9              =       G2D400C +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19776} G2D500Y +GNO                =       G1D500o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19777} G2D500Y +GNO                =       GND5014                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19778} G2D500Y +GHO2               =       GHD5018                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19779} G2D500Y +GNO3               =       G1D500o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19780} G2D500Y +MEPERO             =  0.340G1D500o + 0.330GDD5007 + 0.330GDD500B                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19781} G2D500Y +PERO1              =  0.460G1D500o + 0.270GDD5007 + 0.270GDD500B                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19782} G2D500Y +PERO2              =  0.400G1D500o + 0.300GDD5007 + 0.300GDD500B                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19783} G2D500Y +PERO3              =  0.460G1D500o + 0.270GDD5007 + 0.270GDD500B                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19784} G2D500Y +PERO5              =  0.460G1D500o + 0.270GDD5007 + 0.270GDD500B                 : ARR( 0.183E-11,   450., 0.0);
+{ 19785} G2D500Y +PERO6              =  0.300G1D500o + 0.350GDD5007 + 0.350GDD500B                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19786} G2D500Y +PERO9              =  0.650G1D500o + 0.350GDD500B                                : ARR( 0.100E-10,     0., 0.0);
+{ 19787} G2D500Z +GNO                =       G1D500p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19788} G2D500Z +GNO                =       GND501C                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19789} G2D500Z +GHO2               =       GHD5013                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19790} G2D500Z +GNO3               =       G1D500p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19791} G2D500Z +MEPERO             =  0.340G1D500p + 0.330GDD5009 + 0.330GDD500A                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19792} G2D500Z +PERO1              =  0.460G1D500p + 0.270GDD5009 + 0.270GDD500A                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19793} G2D500Z +PERO2              =  0.400G1D500p + 0.300GDD5009 + 0.300GDD500A                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19794} G2D500Z +PERO3              =  0.460G1D500p + 0.270GDD5009 + 0.270GDD500A                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19795} G2D500Z +PERO5              =  0.460G1D500p + 0.270GDD5009 + 0.270GDD500A                 : ARR( 0.183E-11,   450., 0.0);
+{ 19796} G2D500Z +PERO6              =  0.300G1D500p + 0.350GDD5009 + 0.350GDD500A                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19797} G2D500Z +PERO9              =  0.650G1D500p + 0.350GDD500A                                : ARR( 0.100E-10,     0., 0.0);
+{ 19798} G2D400C +GNO                =       G1D400F +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19799} G2D400C +GNO                =       GND400B                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19800} G2D400C +GHO2               =       GHD400D                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19801} G2D400C +GNO3               =       G1D400F +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19802} G2D400C +MEPERO             =  0.480G1D400F + 0.260GDK4005 + 0.260GDD4002                 : ARR( 0.146E-12,  -445., 0.0);
+{ 19803} G2D400C +PERO1              =  0.600G1D400F + 0.200GDK4005 + 0.200GDD4002                 : ARR( 0.112E-12,  -500., 0.0);
+{ 19804} G2D400C +PERO2              =  0.560G1D400F + 0.220GDK4005 + 0.220GDD4002                 : ARR( 0.418E-13, -1000., 0.0);
+{ 19805} G2D400C +PERO3              =  0.600G1D400F + 0.200GDK4005 + 0.200GDD4002                 : ARR( 0.126E-12,  -850., 0.0);
+{ 19806} G2D400C +PERO5              =  0.600G1D400F + 0.200GDK4005 + 0.200GDD4002                 : ARR( 0.473E-11,   850., 0.0);
+{ 19807} G2D400C +PERO6              =  0.460G1D400F + 0.270GDK4005 + 0.270GDD4002                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19808} G2D400C +PERO9              =  0.800G1D400F + 0.200GDD4002                                : ARR( 0.100E-10,     0., 0.0);
+{ 19809} G1D500o                     =       GDD4002 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5054., 0.0);
+{ 19810} G1D500p                     =       GDD3000 +      G3D2000                                : ARR( 0.200E+15,  2595., 0.0);
+{ 19811} GHD500S +GHO                =       GDK500M +      GHO                                    : ARR( 0.139E-09,     0., 0.0);
+{ 19812} GHD500S +GHO                =       G3H4003 +      GCO                                    : ARR( 0.134E-10,     0., 0.0);
+{ 19813} GHD500S +GNO3               =       G3H4003 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 19814} GHD500S+HV               =       G1D500J +      GHO                                    :  0.100E+01*SUN;
+{ 19815} GHD500S+HV               =       G3H4003 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19816} GHD500S+HV               =       GHD4000 +      GCO                                    :  0.100E+01*SUN;
+{ 19817} GHD500S+HV               =       GHO3002 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 19818} GDK500M +GHO                =       GDD500B +      GHO2                                   : ARR( 0.256E-11,     0., 0.0);
+{ 19819} GDK500M +GHO                =       G3K4007 +      GCO                                    : ARR( 0.132E-10,     0., 0.0);
+{ 19820} GDK500M +GNO3               =       G3K4007 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 19821} GDK500M+HV               =       G3K2001 +      G2D3002                                :  0.100E+01*SUN;
+{ 19822} GDK500M+HV               =       G3K4007 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19823} GDK500M+HV               =       GDK4001 +      GCO                                    :  0.100E+01*SUN;
+{ 19824} GDK500M+HV               =       GKO3000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 19825} GDD4002 +GHO                =       G3D4003                                               : ARR( 0.663E-10,     0., 0.0);
+{ 19826} GDD4002 +GHO                =       G3D3000 +      GCO                                    : ARR( 0.128E-10,     0., 0.0);
+{ 19827} GDD4002 +GNO3               =       G3D4003 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19828} GDD4002 +GNO3               =       G3D3000 +      GHNO3   +      GCO                     : ARR( 0.240E-14,     0., 0.0);
+{ 19829} GDD4002+HV               =       GCO     +      G2D3002 +      GHO2                    :  0.100E+01*SUN;
+{ 19830} GDD4002+HV               =       G3D3000 +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19831} GDD4002+HV               =       GDD3000 +      GCO                                    :  0.100E+01*SUN;
+{ 19832} GDD4002+HV               =       GD02000 +      GCO     +      GCO                     :  0.100E+01*SUN;
+{ 19833} G3D4003 +GHO2               =  0.800GGD4004 + 0.200GAD4003 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19834} G3D4003 +GNO                =       G2D3002 +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19835} G3D4003 +GNO2               =       GPD4003                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19836} G3D4003 +GNO3               =       G2D3002 +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19837} G3D4003 +MEPERO             =  0.685G2D3002 + 0.315GAD4003 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19838} G3D4003 +PERO1              =  0.800G2D3002 + 0.200GAD4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19839} G3D4003 +PERO2              =  0.750G2D3002 + 0.250GAD4003 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19840} G3D4003 +PERO3              =  0.800G2D3002 + 0.200GAD4003 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19841} G3D4003 +PERO5              =  0.650G2D3002 + 0.350GAD4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19842} G3D4003 +PERO6              =  0.650G2D3002 + 0.350GAD4003 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19843} G3D4003 +PERO9              =       G2D3002 +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19844} GGD5001 +GHO                =       G2G500q                                               : ARR( 0.461E-11,     0., 0.0);
+{ 19845} GGD5001 +GHO                =       GGD5009 +      GHO2                                   : ARR( 0.646E-11,     0., 0.0);
+{ 19846} GGD5001 +GHO                =       G3G5001                                               : ARR( 0.214E-10,     0., 0.0);
+{ 19847} GGD5001 +GHO                =       G3D5000                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 19848} GGD5001 +GNO3               =       G3G5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19849} GGD5001+HV               =       G2D4003 +      GHO     +      GCO2                    :  0.100E+01*SUN;
+{ 19850} GGD5001+HV               =       GGD4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 19851} G2G500q +GNO                =       G1G500y +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19852} G2G500q +GNO                =       GGN500r                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19853} G2G500q +GHO2               =       GGH500t                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19854} G2G500q +GNO3               =       G1G500y +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19855} G2G500q +MEPERO             =  0.340G1G500y + 0.330GGD5007 + 0.330GGD5006                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19856} G2G500q +PERO1              =  0.460G1G500y + 0.270GGD5007 + 0.270GGD5006                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19857} G2G500q +PERO2              =  0.400G1G500y + 0.300GGD5007 + 0.300GGD5006                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19858} G2G500q +PERO3              =  0.460G1G500y + 0.270GGD5007 + 0.270GGD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19859} G2G500q +PERO5              =  0.460G1G500y + 0.270GGD5007 + 0.270GGD5006                 : ARR( 0.183E-11,   450., 0.0);
+{ 19860} G2G500q +PERO6              =  0.300G1G500y + 0.350GGD5007 + 0.350GGD5006                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19861} G2G500q +PERO9              =  0.650G1G500y + 0.350GGD5006                                : ARR( 0.100E-10,     0., 0.0);
+{ 19862} G3G5001 +GHO2               =  0.800GGG5000 + 0.200GAG5002 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19863} G3G5001 +GNO                =       GGD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 19864} G3G5001 +GNO2               =       GPG5001                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19865} G3G5001 +GNO3               =       GGD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 19866} G3G5001 +MEPERO             =  0.685GGD4000 + 0.315GAG5002 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19867} G3G5001 +PERO1              =  0.800GGD4000 + 0.200GAG5002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19868} G3G5001 +PERO2              =  0.750GGD4000 + 0.250GAG5002 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19869} G3G5001 +PERO3              =  0.800GGD4000 + 0.200GAG5002 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19870} G3G5001 +PERO5              =  0.650GGD4000 + 0.350GAG5002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19871} G3G5001 +PERO6              =  0.650GGD4000 + 0.350GAG5002 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19872} G3G5001 +PERO9              =       GGD4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19873} G1G500y                     =       GGD3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3070., 0.0);
+{ 19874} GAD5002 +GHO                =       G2A5018                                               : ARR( 0.466E-11,     0., 0.0);
+{ 19875} GAD5002 +GHO                =       GAD500B +      GHO2                                   : ARR( 0.654E-11,     0., 0.0);
+{ 19876} GAD5002 +GHO                =       G3A5002                                               : ARR( 0.216E-10,     0., 0.0);
+{ 19877} GAD5002 +GNO3               =       G3A5002 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19878} GAD5002+HV               =       GAD4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 19879} G2A5018 +GNO                =       G1A501H +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19880} G2A5018 +GNO                =       GAN500o                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19881} G2A5018 +GHO2               =       GAH500z                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19882} G2A5018 +GNO3               =       G1A501H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19883} G2A5018 +MEPERO             =  0.340G1A501H + 0.330GAD5009 + 0.330GAD5006                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19884} G2A5018 +PERO1              =  0.460G1A501H + 0.270GAD5009 + 0.270GAD5006                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19885} G2A5018 +PERO2              =  0.400G1A501H + 0.300GAD5009 + 0.300GAD5006                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19886} G2A5018 +PERO3              =  0.460G1A501H + 0.270GAD5009 + 0.270GAD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19887} G2A5018 +PERO5              =  0.460G1A501H + 0.270GAD5009 + 0.270GAD5006                 : ARR( 0.183E-11,   450., 0.0);
+{ 19888} G2A5018 +PERO6              =  0.300G1A501H + 0.350GAD5009 + 0.350GAD5006                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19889} G2A5018 +PERO9              =  0.650G1A501H + 0.350GAD5006                                : ARR( 0.100E-10,     0., 0.0);
+{ 19890} G3A5002 +GHO2               =  0.800GAG5000 + 0.200GAA5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19891} G3A5002 +GNO                =       GAD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 19892} G3A5002 +GNO2               =       GPA5002                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19893} G3A5002 +GNO3               =       GAD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 19894} G3A5002 +MEPERO             =  0.685GAD4000 + 0.315GAA5001 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19895} G3A5002 +PERO1              =  0.800GAD4000 + 0.200GAA5001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19896} G3A5002 +PERO2              =  0.750GAD4000 + 0.250GAA5001 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19897} G3A5002 +PERO3              =  0.800GAD4000 + 0.200GAA5001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19898} G3A5002 +PERO5              =  0.650GAD4000 + 0.350GAA5001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19899} G3A5002 +PERO6              =  0.650GAD4000 + 0.350GAA5001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19900} G3A5002 +PERO9              =       GAD4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19901} G1A501H                     =       GAD3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3070., 0.0);
+{ 19902} GPD5001                     =       G3D5000 +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 19903} GPD5001 +GHO                =       G2P501A                                               : ARR( 0.462E-11,     0., 0.0);
+{ 19904} GPD5001 +GHO                =       GPD5009 +      GHO2                                   : ARR( 0.648E-11,     0., 0.0);
+{ 19905} GPD5001 +GHO                =       G3P5001                                               : ARR( 0.214E-10,     0., 0.0);
+{ 19906} GPD5001 +GNO3               =       G3P5001 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19907} GPD5001+HV               =       G3D5000 +      GNO2                                   :  0.100E+01*SUN;
+{ 19908} GPD5001+HV               =       GPD4000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 19909} G2P501A +GNO                =       G1P501J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 19910} G2P501A +GNO                =       GPN500p                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 19911} G2P501A +GHO2               =       GPH5011                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 19912} G2P501A +GNO3               =       G1P501J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19913} G2P501A +MEPERO             =  0.340G1P501J + 0.330GPD5007 + 0.330GPD5006                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19914} G2P501A +PERO1              =  0.460G1P501J + 0.270GPD5007 + 0.270GPD5006                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19915} G2P501A +PERO2              =  0.400G1P501J + 0.300GPD5007 + 0.300GPD5006                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19916} G2P501A +PERO3              =  0.460G1P501J + 0.270GPD5007 + 0.270GPD5006                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19917} G2P501A +PERO5              =  0.460G1P501J + 0.270GPD5007 + 0.270GPD5006                 : ARR( 0.183E-11,   450., 0.0);
+{ 19918} G2P501A +PERO6              =  0.300G1P501J + 0.350GPD5007 + 0.350GPD5006                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19919} G2P501A +PERO9              =  0.650G1P501J + 0.350GPD5006                                : ARR( 0.100E-10,     0., 0.0);
+{ 19920} G3P5001 +GHO2               =  0.800GPG5000 + 0.200GPA5001 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19921} G3P5001 +GNO                =       GPD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 19922} G3P5001 +GNO2               =       GPP5000                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19923} G3P5001 +GNO3               =       GPD4000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 19924} G3P5001 +MEPERO             =  0.685GPD4000 + 0.315GPA5001 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19925} G3P5001 +PERO1              =  0.800GPD4000 + 0.200GPA5001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19926} G3P5001 +PERO2              =  0.750GPD4000 + 0.250GPA5001 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19927} G3P5001 +PERO3              =  0.800GPD4000 + 0.200GPA5001 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19928} G3P5001 +PERO5              =  0.650GPD4000 + 0.350GPA5001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19929} G3P5001 +PERO6              =  0.650GPD4000 + 0.350GPA5001 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19930} G3P5001 +PERO9              =       GPD4000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19931} G1P501J                     =       GPD3000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3070., 0.0);
+{ 19932} GDD5005 +GHO                =       G3D5007                                               : ARR( 0.681E-10,     0., 0.0);
+{ 19933} GDD5005 +GHO                =       G3D5008                                               : ARR( 0.681E-10,     0., 0.0);
+{ 19934} GDD5005 +GNO3               =       G3D5007 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19935} GDD5005 +GNO3               =       G3D5008 +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19936} GDD5005+HV               =       GCO     +      GDD4002 +      GHO2                    :  0.100E+01*SUN;
+{ 19937} GDD5005+HV               =       G3D3001 +      G2D2000                                :  0.100E+01*SUN;
+{ 19938} GDD5005+HV               =       G2D400D +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 19939} G3D5007 +GHO2               =  0.800GGD5005 + 0.200GAD5005 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19940} G3D5007 +GNO                =       GDD4002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 19941} G3D5007 +GNO2               =       GPD5005                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19942} G3D5007 +GNO3               =       GDD4002 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 19943} G3D5007 +MEPERO             =  0.685GDD4002 + 0.315GAD5005 + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19944} G3D5007 +PERO1              =  0.800GDD4002 + 0.200GAD5005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19945} G3D5007 +PERO2              =  0.750GDD4002 + 0.250GAD5005 + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19946} G3D5007 +PERO3              =  0.800GDD4002 + 0.200GAD5005 + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19947} G3D5007 +PERO5              =  0.650GDD4002 + 0.350GAD5005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19948} G3D5007 +PERO6              =  0.650GDD4002 + 0.350GAD5005 + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19949} G3D5007 +PERO9              =       GDD4002 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 19950} G3D5008 +GHO2               =  0.800GGD5006 + 0.200GAD5006 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19951} G3D5008 +GNO                =       G2D400D +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 19952} G3D5008 +GNO2               =       GPD5006                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19953} G3D5008 +GNO3               =       G2D400D +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 19954} G3D5008 +MEPERO             =  0.685G2D400D + 0.315GAD5006 + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19955} G3D5008 +PERO1              =  0.800G2D400D + 0.200GAD5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19956} G3D5008 +PERO2              =  0.750G2D400D + 0.250GAD5006 + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19957} G3D5008 +PERO3              =  0.800G2D400D + 0.200GAD5006 + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19958} G3D5008 +PERO5              =  0.650G2D400D + 0.350GAD5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19959} G3D5008 +PERO6              =  0.650G2D400D + 0.350GAD5006 + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 19960} G3D5008 +PERO9              =       G2D400D +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 19961} G2D400D +GNO                =       G1D400H +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19962} G2D400D +GNO                =       GND400E                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19963} G2D400D +GHO2               =       GHD400J                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19964} G2D400D +GNO3               =       G1D400H +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19965} G2D400D +MEPERO             =  0.480G1D400H + 0.260GDK4006 + 0.260GDD4004                 : ARR( 0.164E-12,  -795., 0.0);
+{ 19966} G2D400D +PERO1              =  0.600G1D400H + 0.200GDK4006 + 0.200GDD4004                 : ARR( 0.126E-12,  -850., 0.0);
+{ 19967} G2D400D +PERO2              =  0.560G1D400H + 0.220GDK4006 + 0.220GDD4004                 : ARR( 0.471E-13, -1350., 0.0);
+{ 19968} G2D400D +PERO3              =  0.600G1D400H + 0.200GDK4006 + 0.200GDD4004                 : ARR( 0.142E-12, -1200., 0.0);
+{ 19969} G2D400D +PERO5              =  0.600G1D400H + 0.200GDK4006 + 0.200GDD4004                 : ARR( 0.533E-11,   500., 0.0);
+{ 19970} G2D400D +PERO6              =  0.460G1D400H + 0.270GDK4006 + 0.270GDD4004                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19971} G2D400D +PERO9              =  0.800G1D400H + 0.200GDD4004                                : ARR( 0.100E-10,     0., 0.0);
+{ 19972} G1D400H                     =       G3D3001 +      GCH2O                                  : ARR( 0.200E+15,  4349., 0.0);
+{ 19973} GHD400B +GHO                =       GDD4001 +      GHO                                    : ARR( 0.161E-10,     0., 0.0);
+{ 19974} GHD400B +GHO                =       G2H400g                                               : ARR( 0.449E-11,     0., 0.0);
+{ 19975} GHD400B +GHO                =       GHD400D +      GHO2                                   : ARR( 0.630E-11,     0., 0.0);
+{ 19976} GHD400B +GHO                =       G3H400F                                               : ARR( 0.208E-10,     0., 0.0);
+{ 19977} GHD400B +GHO                =       G2D4003                                               : ARR( 0.191E-11,  -190., 0.0);
+{ 19978} GHD400B +GNO3               =       G3H400F +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 19979} GHD400B+HV               =       G1D4004 +      GHO                                    :  0.100E+01*SUN;
+{ 19980} GHD400B+HV               =       GHD3000 +      GCO     + 2.000GHO2                    :  0.100E+01*SUN;
+{ 19981} G2H400g +GNO                =       G1H400k +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 19982} G2H400g +GNO                =       GHN400x                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 19983} G2H400g +GHO2               =       GHH400d                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 19984} G2H400g +GNO3               =       G1H400k +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 19985} G2H400g +MEPERO             =  0.340G1H400k + 0.330GHD400E + 0.330GHD400J                 : ARR( 0.565E-13,  -845., 0.0);
+{ 19986} G2H400g +PERO1              =  0.460G1H400k + 0.270GHD400E + 0.270GHD400J                 : ARR( 0.434E-13,  -900., 0.0);
+{ 19987} G2H400g +PERO2              =  0.400G1H400k + 0.300GHD400E + 0.300GHD400J                 : ARR( 0.162E-13, -1400., 0.0);
+{ 19988} G2H400g +PERO3              =  0.460G1H400k + 0.270GHD400E + 0.270GHD400J                 : ARR( 0.488E-13, -1250., 0.0);
+{ 19989} G2H400g +PERO5              =  0.460G1H400k + 0.270GHD400E + 0.270GHD400J                 : ARR( 0.183E-11,   450., 0.0);
+{ 19990} G2H400g +PERO6              =  0.300G1H400k + 0.350GHD400E + 0.350GHD400J                 : ARR( 0.168E-13, -1300., 0.0);
+{ 19991} G2H400g +PERO9              =  0.650G1H400k + 0.350GHD400J                                : ARR( 0.100E-10,     0., 0.0);
+{ 19992} G3H400F +GHO2               =  0.800GGH400J + 0.200GAH400M + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 19993} G3H400F +GNO                =       GHD3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.810E-11,  -270., 0.0);
+{ 19994} G3H400F +GNO2               =       GPH400M                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 19995} G3H400F +GNO3               =       GHD3000 +      GNO2    +      GHO2    +      GCO2     : ARR( 0.500E-11,     0., 0.0);
+{ 19996} G3H400F +MEPERO             =  0.685GHD3000 + 0.315GAH400M + 0.685GHO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19997} G3H400F +PERO1              =  0.800GHD3000 + 0.200GAH400M + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19998} G3H400F +PERO2              =  0.750GHD3000 + 0.250GAH400M + 0.750GHO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 19999} G3H400F +PERO3              =  0.800GHD3000 + 0.200GAH400M + 0.800GHO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20000} G3H400F +PERO5              =  0.650GHD3000 + 0.350GAH400M + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20001} G3H400F +PERO6              =  0.650GHD3000 + 0.350GAH400M + 0.650GHO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20002} G3H400F +PERO9              =       GHD3000 +      GHO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 20003} G1H400k                     =       GHD2000 +      GDD2000 +      GHO2                    : ARR( 0.200E+15,  3768., 0.0);
+{ 20004} GHN502T +GHO                =       GNN501U +      GHO                                    : ARR( 0.329E-11,     0., 0.0);
+{ 20005} GHN502T +GHO                =       G2N501s                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 20006} GHN502T+HV               =       G1H504O +      GNO2                                   :  0.100E+01*SUN;
+{ 20007} GHN502T+HV               =       G1H504P +      GNO2                                   :  0.100E+01*SUN;
+{ 20008} GHN502T+HV               =       G1H504Q +      GNO2                                   :  0.100E+01*SUN;
+{ 20009} GHN502T+HV               =       G1N501x +      GHO                                    :  0.100E+01*SUN;
+{ 20010} G1H504O +OXYGEN             =       GHN5054 +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 20011} G1H504O                     =       GHN5028 +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{ 20012} G1H504P                     =       G2N2000 +      GHN300A                                : ARR( 0.200E+15,  7074., 0.0);
+{ 20013} G1H504P                     =       GND3000 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6068., 0.0);
+{ 20014} G1H504Q                     =       GHN501G +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{ 20015} G1H504Q                     =       GND3000 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6739., 0.0);
+{ 20016} G1H504Q                     =       GNN4008 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  7395., 0.0);
+{ 20017} GNN501U +GHO                =       G3N500o                                               : ARR( 0.430E-11,     0., 0.0);
+{ 20018} GNN501U +GNO3               =       G3N500o +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20019} GNN501U+HV               =       G1N504c +      GNO2                                   :  0.100E+01*SUN;
+{ 20020} GNN501U+HV               =       G1N504I +      GNO2                                   :  0.100E+01*SUN;
+{ 20021} GNN501U+HV               =       G1N504d +      GNO2                                   :  0.100E+01*SUN;
+{ 20022} GNN501U+HV               =       GNN4008 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 20023} GNN501U+HV               =       G2N3009 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 20024} G3N500o +GHO2               =  0.800GGN500z + 0.200GAN500s + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20025} G3N500o +GNO                =       GNN4008 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20026} G3N500o +GNO2               =       GPN500z                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20027} G3N500o +GNO3               =       GNN4008 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20028} G3N500o +MEPERO             =  0.685GNN4008 + 0.315GAN500s + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20029} G3N500o +PERO1              =  0.800GNN4008 + 0.200GAN500s + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20030} G3N500o +PERO2              =  0.750GNN4008 + 0.250GAN500s + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20031} G3N500o +PERO3              =  0.800GNN4008 + 0.200GAN500s + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20032} G3N500o +PERO5              =  0.650GNN4008 + 0.350GAN500s + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20033} G3N500o +PERO6              =  0.650GNN4008 + 0.350GAN500s + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20034} G3N500o +PERO9              =       GNN4008 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 20035} G1N504c +OXYGEN             =       GNN502t +      GHO2                                   : ARR( 0.600E-13,   557., 0.0);
+{ 20036} G1N504c                     =       GND500Z +      GNO2                                   : ARR( 0.800E+11,  4964., 0.0);
+{ 20037} G1N504d                     =       GND500a +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{ 20038} G1N504d                     =       GNN4008 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 20039} GNN501W +GHO                =       G2N504E                                               : ARR( 0.335E-13,     0., 0.0);
+{ 20040} GNN501W +GHO                =       GNN501v +      GNO2                                   : ARR( 0.191E-13,     0., 0.0);
+{ 20041} GNN501W +GHO                =       GNN501i +      GNO2                                   : ARR( 0.471E-14,     0., 0.0);
+{ 20042} GNN501W +GHO                =       GNN501Y +      GNO2                                   : ARR( 0.471E-14,     0., 0.0);
+{ 20043} GNN501W +GHO                =       GNN502T +      GNO2                                   : ARR( 0.919E-14,     0., 0.0);
+{ 20044} GNN501W+HV               =       G1N502a +      GNO2                                   :  0.100E+01*SUN;
+{ 20045} GNN501W+HV               =       G1N5027 +      GNO2                                   :  0.100E+01*SUN;
+{ 20046} GNN501W+HV               =       G1N501y +      GNO2                                   :  0.100E+01*SUN;
+{ 20047} GNN501W+HV               =       G1N503W +      GNO2                                   :  0.100E+01*SUN;
+{ 20048} G2N504E +GNO                =       G1N504e +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20049} G2N504E +GNO                =       GNN502d                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20050} G2N504E +GHO2               =       GHN505O                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20051} G2N504E +GNO3               =       G1N504e +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20052} G2N504E +MEPERO             =  0.480G1N504e + 0.260GNN501Z + 0.260GNN502w                 : ARR( 0.164E-12,  -795., 0.0);
+{ 20053} G2N504E +PERO1              =  0.600G1N504e + 0.200GNN501Z + 0.200GNN502w                 : ARR( 0.126E-12,  -850., 0.0);
+{ 20054} G2N504E +PERO2              =  0.560G1N504e + 0.220GNN501Z + 0.220GNN502w                 : ARR( 0.471E-13, -1350., 0.0);
+{ 20055} G2N504E +PERO3              =  0.600G1N504e + 0.200GNN501Z + 0.200GNN502w                 : ARR( 0.142E-12, -1200., 0.0);
+{ 20056} G2N504E +PERO5              =  0.600G1N504e + 0.200GNN501Z + 0.200GNN502w                 : ARR( 0.533E-11,   500., 0.0);
+{ 20057} G2N504E +PERO6              =  0.460G1N504e + 0.270GNN501Z + 0.270GNN502w                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20058} G2N504E +PERO9              =  0.800G1N504e + 0.200GNN502w                                : ARR( 0.100E-10,     0., 0.0);
+{ 20059} G1N504e +OXYGEN             =       GNN502w +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 20060} G1N504e                     =       GNN400D +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 20061} GHN502U +GHO                =       GNN501Y +      GHO                                    : ARR( 0.169E-11,     0., 0.0);
+{ 20062} GHN502U +GHO                =       G2N501t                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 20063} GHN502U+HV               =       G1H504R +      GNO2                                   :  0.100E+01*SUN;
+{ 20064} GHN502U+HV               =       G1H504S +      GNO2                                   :  0.100E+01*SUN;
+{ 20065} GHN502U+HV               =       G1N501y +      GHO                                    :  0.100E+01*SUN;
+{ 20066} GHN502U+HV               =       G1H504T +      GNO2                                   :  0.100E+01*SUN;
+{ 20067} G1H504R                     =       GHN502x +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{ 20068} G1H504R                     =       GD02000 +      GHN3007 +      GNO2                    : ARR( 0.200E+15,  5979., 0.0);
+{ 20069} G1H504S                     =       GND3001 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4784., 0.0);
+{ 20070} G1H504T                     =       GNN4007 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 20071} GNN501X +GHO                =       GNN501Y +      GHO2                                   : ARR( 0.465E-12,     0., 0.0);
+{ 20072} GNN501X +GHO                =       GNN502Z +      GNO2                                   : ARR( 0.518E-13,     0., 0.0);
+{ 20073} GNN501X +GHO                =       G1N501y                                               : ARR( 0.237E-17,    85., 2.0);
+{ 20074} GNN501X+HV               =       G1N502b +      GNO2                                   :  0.100E+01*SUN;
+{ 20075} GNN501X+HV               =       G1N5029 +      GNO2                                   :  0.100E+01*SUN;
+{ 20076} GNN501X+HV               =       G1N503h +      GNO2                                   :  0.100E+01*SUN;
+{ 20077} GNN501Y +GHO                =       G2N504F                                               : ARR( 0.335E-13,     0., 0.0);
+{ 20078} GNN501Y +GHO                =       GNN501x +      GNO2                                   : ARR( 0.191E-13,     0., 0.0);
+{ 20079} GNN501Y +GHO                =       GNN501k +      GNO2                                   : ARR( 0.144E-13,     0., 0.0);
+{ 20080} GNN501Y +GHO                =       GNN502X +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{ 20081} GNN501Y+HV               =       G1N502d +      GNO2                                   :  0.100E+01*SUN;
+{ 20082} GNN501Y+HV               =       G1N502B +      GNO2                                   :  0.100E+01*SUN;
+{ 20083} GNN501Y+HV               =       G3N4009 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 20084} GNN501Y+HV               =       G2D2000 +      GNN3006 +      GNO2                    :  0.100E+01*SUN;
+{ 20085} GNN501Y+HV               =       G1N503Z +      GNO2                                   :  0.100E+01*SUN;
+{ 20086} G2N504F +GNO                =       G1N504f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20087} G2N504F +GNO                =       GNN502g                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20088} G2N504F +GHO2               =       GHN505P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20089} G2N504F +GNO3               =       G1N504f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20090} G2N504F +MEPERO             =  0.480G1N504f + 0.260GNN501b + 0.260GNN502x                 : ARR( 0.164E-12,  -795., 0.0);
+{ 20091} G2N504F +PERO1              =  0.600G1N504f + 0.200GNN501b + 0.200GNN502x                 : ARR( 0.126E-12,  -850., 0.0);
+{ 20092} G2N504F +PERO2              =  0.560G1N504f + 0.220GNN501b + 0.220GNN502x                 : ARR( 0.471E-13, -1350., 0.0);
+{ 20093} G2N504F +PERO3              =  0.600G1N504f + 0.200GNN501b + 0.200GNN502x                 : ARR( 0.142E-12, -1200., 0.0);
+{ 20094} G2N504F +PERO5              =  0.600G1N504f + 0.200GNN501b + 0.200GNN502x                 : ARR( 0.533E-11,   500., 0.0);
+{ 20095} G2N504F +PERO6              =  0.460G1N504f + 0.270GNN501b + 0.270GNN502x                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20096} G2N504F +PERO9              =  0.800G1N504f + 0.200GNN502x                                : ARR( 0.100E-10,     0., 0.0);
+{ 20097} G1N504f +OXYGEN             =       GNN502x +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 20098} G1N504f                     =       GNN400G +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7175., 0.0);
+{ 20099} GNN501Z +GHO                =       GNN502w +      GHO2                                   : ARR( 0.840E-12,     0., 0.0);
+{ 20100} GNN501Z +GHO                =       G1N504e                                               : ARR( 0.219E-17,    85., 2.0);
+{ 20101} GNN501Z+HV               =       G1N502g +      GNO2                                   :  0.100E+01*SUN;
+{ 20102} GNN501Z+HV               =       G1N504g +      GNO2                                   :  0.100E+01*SUN;
+{ 20103} GNN501Z+HV               =       G1N501z +      GNO2                                   :  0.100E+01*SUN;
+{ 20104} GNN501Z+HV               =       G1N504h +      GNO2                                   :  0.100E+01*SUN;
+{ 20105} G1N504g                     =       GDO2000 +      GNN3005 +      GNO2                    : ARR( 0.200E+15,  6323., 0.0);
+{ 20106} G1N504g                     =       GND3004 +      GND2000 +      GNO2                    : ARR( 0.200E+15,  6323., 0.0);
+{ 20107} G1N504h +OXYGEN             =       GNN502y +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 20108} G1N504h                     =       GNN502C +      GNO2                                   : ARR( 0.800E+11,  4743., 0.0);
+{ 20109} G1N504h                     =       GNN400E +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 20110} GHN502W +GHO                =       GHN505Q +      GHO2                                   : ARR( 0.835E-12,     0., 0.0);
+{ 20111} GHN502W +GHO                =       GNN501b +      GHO                                    : ARR( 0.171E-11,     0., 0.0);
+{ 20112} GHN502W +GHO                =       G2N501u                                               : ARR( 0.197E-11,  -190., 0.0);
+{ 20113} GHN502W+HV               =       G1H504U +      GNO2                                   :  0.100E+01*SUN;
+{ 20114} GHN502W+HV               =       G1H504W +      GNO2                                   :  0.100E+01*SUN;
+{ 20115} GHN502W+HV               =       G1N501z +      GHO                                    :  0.100E+01*SUN;
+{ 20116} GHN502W+HV               =       G1H504X +      GNO2                                   :  0.100E+01*SUN;
+{ 20117} G1H504U                     =       GCH2O   +      GHN4012 +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 20118} G1H504U                     =       GDO2000 +      GHN3007 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{ 20119} G1H504W                     =       GND3004 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4784., 0.0);
+{ 20120} G1H504X                     =       GNN400E +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 20121} GNN501a +GHO                =       GNN501d +      GHO2                                   : ARR( 0.854E-12,     0., 0.0);
+{ 20122} GNN501a +GHO                =       GNN501b +      GHO2                                   : ARR( 0.438E-12,     0., 0.0);
+{ 20123} GNN501a +GHO                =       G1N5021                                               : ARR( 0.223E-17,    85., 2.0);
+{ 20124} GNN501a +GHO                =       G1N501z                                               : ARR( 0.223E-17,    85., 2.0);
+{ 20125} GNN501a+HV               =       G1N502j +      GNO2                                   :  0.100E+01*SUN;
+{ 20126} GNN501a+HV               =       G1N502F +      GNO2                                   :  0.100E+01*SUN;
+{ 20127} GNN501a+HV               =       G1N503s +      GNO2                                   :  0.100E+01*SUN;
+{ 20128} GNN501b +GHO                =       GNN502x +      GHO2                                   : ARR( 0.860E-12,     0., 0.0);
+{ 20129} GNN501b +GHO                =       G1N504f                                               : ARR( 0.225E-17,    85., 2.0);
+{ 20130} GNN501b+HV               =       G1N502l +      GNO2                                   :  0.100E+01*SUN;
+{ 20131} GNN501b+HV               =       G1N502I +      GNO2                                   :  0.100E+01*SUN;
+{ 20132} GNN501b+HV               =       G3N400B +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 20133} GNN501b+HV               =       GND2000 +      GNN3006                                :  0.100E+01*SUN;
+{ 20134} GNN501b+HV               =       G1N503y +      GNO2                                   :  0.100E+01*SUN;
+{ 20135} GNN501c +GHO                =       GNN502a +      GNO2                                   : ARR( 0.488E-13,     0., 0.0);
+{ 20136} GNN501c +GHO                =       GNN502g +      GHO2                                   : ARR( 0.438E-12,     0., 0.0);
+{ 20137} GNN501c +GHO                =       G1N5049                                               : ARR( 0.223E-17,    85., 2.0);
+{ 20138} GNN501c+HV               =       G1N503o +      GNO2                                   :  0.100E+01*SUN;
+{ 20139} GNN501c+HV               =       G1N502D +      GNO2                                   :  0.100E+01*SUN;
+{ 20140} GNN501c+HV               =       G1N502m +      GNO2                                   :  0.100E+01*SUN;
+{ 20141} GNN501c+HV               =       G1N5021 +      GNO2                                   :  0.100E+01*SUN;
+{ 20142} GHN502X +GHO                =       GHN505P +      GHO2                                   : ARR( 0.425E-12,     0., 0.0);
+{ 20143} GHN502X +GHO                =       GNN501d +      GHO                                    : ARR( 0.332E-11,     0., 0.0);
+{ 20144} GHN502X +GHO                =       G2N501v                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 20145} GHN502X+HV               =       G1H504Y +      GNO2                                   :  0.100E+01*SUN;
+{ 20146} GHN502X+HV               =       G1H504Z +      GNO2                                   :  0.100E+01*SUN;
+{ 20147} GHN502X+HV               =       G1H504a +      GNO2                                   :  0.100E+01*SUN;
+{ 20148} GHN502X+HV               =       G1N5021 +      GHO                                    :  0.100E+01*SUN;
+{ 20149} G1H504Y                     =       GHN4013 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20150} G1H504Z                     =       GND2000 +      GHN300A +      GHO2                    : ARR( 0.200E+15,  3575., 0.0);
+{ 20151} G1H504a                     =       GHN503z +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{ 20152} G1H504a                     =       GND3002 +      GHD2000 +      GNO2                    : ARR( 0.200E+15,  6234., 0.0);
+{ 20153} GNN501d +GHO                =       GNN502x +      GHO2                                   : ARR( 0.432E-12,     0., 0.0);
+{ 20154} GNN501d +GHO                =       G3N500p                                               : ARR( 0.436E-11,     0., 0.0);
+{ 20155} GNN501d +GNO3               =       G3N500p +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20156} GNN501d+HV               =       G1N504i +      GNO2                                   :  0.100E+01*SUN;
+{ 20157} GNN501d+HV               =       G1N504j +      GNO2                                   :  0.100E+01*SUN;
+{ 20158} GNN501d+HV               =       G1N504k +      GNO2                                   :  0.100E+01*SUN;
+{ 20159} GNN501d+HV               =       GNN400F +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 20160} GNN501d+HV               =       GNN3006 +      GND2000                                :  0.100E+01*SUN;
+{ 20161} G3N500p +GHO2               =  0.800GGN501A + 0.200GAN501J + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20162} G3N500p +GNO                =       GNN400F + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20163} G3N500p +GNO2               =       GPN501N                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20164} G3N500p +GNO3               =       GNN400F + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20165} G3N500p +MEPERO             =  0.685GNN400F + 0.315GAN501J + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20166} G3N500p +PERO1              =  0.800GNN400F + 0.200GAN501J + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20167} G3N500p +PERO2              =  0.750GNN400F + 0.250GAN501J + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20168} G3N500p +PERO3              =  0.800GNN400F + 0.200GAN501J + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20169} G3N500p +PERO5              =  0.650GNN400F + 0.350GAN501J + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20170} G3N500p +PERO6              =  0.650GNN400F + 0.350GAN501J + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20171} G3N500p +PERO9              =       GNN400F +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 20172} G1N504i                     =       GNN400Z +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20173} G1N504j                     =       GND2000 +      GND3005 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{ 20174} G1N504k                     =       GND500s +      GNO2                                   : ARR( 0.160E+12,  4531., 0.0);
+{ 20175} G1N504k                     =       GNN400F +      GCO     +      GHO2                    : ARR( 0.200E+15,  5691., 0.0);
+{ 20176} GHN502Y +GHO                =       GND500M +      GHO                                    : ARR( 0.266E-10,     0., 0.0);
+{ 20177} GHN502Y +GHO                =       G3H500m                                               : ARR( 0.212E-10,     0., 0.0);
+{ 20178} GHN502Y +GHO                =       G2N504G                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 20179} GHN502Y +GNO3               =       G3H500m +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20180} GHN502Y+HV               =       G1H503N +      GNO2                                   :  0.100E+01*SUN;
+{ 20181} GHN502Y+HV               =       G1N503f +      GHO                                    :  0.100E+01*SUN;
+{ 20182} GHN502Y+HV               =       G2H400h +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 20183} GHN502Y+HV               =       GDK3000 +      GD02000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{ 20184} G3H500m +GHO2               =  0.800GGH500T + 0.200GAH500W + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20185} G3H500m +GNO                =       G2H400h +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20186} G3H500m +GNO2               =       GPH500Y                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20187} G3H500m +GNO3               =       G2H400h +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20188} G3H500m +MEPERO             =  0.685G2H400h + 0.315GAH500W + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20189} G3H500m +PERO1              =  0.800G2H400h + 0.200GAH500W + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20190} G3H500m +PERO2              =  0.750G2H400h + 0.250GAH500W + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20191} G3H500m +PERO3              =  0.800G2H400h + 0.200GAH500W + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20192} G3H500m +PERO5              =  0.650G2H400h + 0.350GAH500W + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20193} G3H500m +PERO6              =  0.650G2H400h + 0.350GAH500W + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20194} G3H500m +PERO9              =       G2H400h +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 20195} G2N504G +GNO                =       G1N503f +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20196} G2N504G +GNO                =       GNN500x                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20197} G2N504G +GHO2               =       GHN502Y                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20198} G2N504G +GNO3               =       G1N503f +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20199} G2N504G +MEPERO             =  0.340G1N503f + 0.330GND500f + 0.330GND500M                 : ARR( 0.565E-13,  -845., 0.0);
+{ 20200} G2N504G +PERO1              =  0.460G1N503f + 0.270GND500f + 0.270GND500M                 : ARR( 0.434E-13,  -900., 0.0);
+{ 20201} G2N504G +PERO2              =  0.400G1N503f + 0.300GND500f + 0.300GND500M                 : ARR( 0.162E-13, -1400., 0.0);
+{ 20202} G2N504G +PERO3              =  0.460G1N503f + 0.270GND500f + 0.270GND500M                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20203} G2N504G +PERO5              =  0.460G1N503f + 0.270GND500f + 0.270GND500M                 : ARR( 0.183E-11,   450., 0.0);
+{ 20204} G2N504G +PERO6              =  0.300G1N503f + 0.350GND500f + 0.350GND500M                 : ARR( 0.168E-13, -1300., 0.0);
+{ 20205} G2N504G +PERO9              =  0.650G1N503f + 0.350GND500M                                : ARR( 0.100E-10,     0., 0.0);
+{ 20206} G2H400h +GNO                =       G1H400l +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 20207} G2H400h +GNO                =       GHN400f                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 20208} G2H400h +GHO2               =       GHH400e                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 20209} G2H400h +GNO3               =       G1H400l +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20210} G2H400h +MEPERO             =  0.480G1H400l + 0.260GHN400k + 0.260GHN400O                 : ARR( 0.164E-12,  -795., 0.0);
+{ 20211} G2H400h +PERO1              =  0.600G1H400l + 0.200GHN400k + 0.200GHN400O                 : ARR( 0.126E-12,  -850., 0.0);
+{ 20212} G2H400h +PERO2              =  0.560G1H400l + 0.220GHN400k + 0.220GHN400O                 : ARR( 0.471E-13, -1350., 0.0);
+{ 20213} G2H400h +PERO3              =  0.600G1H400l + 0.200GHN400k + 0.200GHN400O                 : ARR( 0.142E-12, -1200., 0.0);
+{ 20214} G2H400h +PERO5              =  0.600G1H400l + 0.200GHN400k + 0.200GHN400O                 : ARR( 0.533E-11,   500., 0.0);
+{ 20215} G2H400h +PERO6              =  0.460G1H400l + 0.270GHN400k + 0.270GHN400O                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20216} G2H400h +PERO9              =  0.800G1H400l + 0.200GHN400O                                : ARR( 0.100E-10,     0., 0.0);
+{ 20217} G1H400l                     =       GND3001 +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 20218} GNN501e +GHO                =       GNN501y +      GNO2                                   : ARR( 0.106E-12,     0., 0.0);
+{ 20219} GNN501e +GHO                =       GNN501i +      GHO2                                   : ARR( 0.454E-12,     0., 0.0);
+{ 20220} GNN501e +GHO                =       G1N5027                                               : ARR( 0.231E-17,    85., 2.0);
+{ 20221} GNN501e+HV               =       G1N5033 +      GNO2                                   :  0.100E+01*SUN;
+{ 20222} GNN501e+HV               =       G1N5023 +      GNO2                                   :  0.100E+01*SUN;
+{ 20223} GNN501e+HV               =       G1N503X +      GNO2                                   :  0.100E+01*SUN;
+{ 20224} GHN502Z +GHO                =       GHN502b +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{ 20225} GHN502Z +GHO                =       GNN501g +      GHO                                    : ARR( 0.843E-11,     0., 0.0);
+{ 20226} GHN502Z +GHO                =       G2N501w                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 20227} GHN502Z+HV               =       G1H504b +      GNO2                                   :  0.100E+01*SUN;
+{ 20228} GHN502Z+HV               =       G1N5023 +      GHO                                    :  0.100E+01*SUN;
+{ 20229} GHN502Z+HV               =       G1H504c +      GNO2                                   :  0.100E+01*SUN;
+{ 20230} G1H504b                     =       GD02000 +      GHN3007 +      GHO2                    : ARR( 0.200E+15,  3232., 0.0);
+{ 20231} G1H504c                     =       GHK500Z +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{ 20232} G1H504c                     =       GND400H +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5503., 0.0);
+{ 20233} GNN501f +GHO                =       GNN501j +      GHO2                                   : ARR( 0.229E-11,     0., 0.0);
+{ 20234} GNN501f +GHO                =       GNN501g +      GHO2                                   : ARR( 0.229E-11,     0., 0.0);
+{ 20235} GNN501f+HV               =       G1N5035 +      GNO2                                   :  0.100E+01*SUN;
+{ 20236} GNN501f+HV               =       G1N504l +      GNO2                                   :  0.100E+01*SUN;
+{ 20237} G1N504l                     =       GND400H +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20238} GNN501g +GHO                =       GNK500q +      GNO2                                   : ARR( 0.315E-12,     0., 0.0);
+{ 20239} GNN501g +GHO                =       GNN501k +      GHO2                                   : ARR( 0.130E-11,     0., 0.0);
+{ 20240} GNN501g +GHO                =       G1N502B                                               : ARR( 0.218E-17,    85., 2.0);
+{ 20241} GNN501g+HV               =       G1N5036 +      GNO2                                   :  0.100E+01*SUN;
+{ 20242} GNN501g+HV               =       G3N400A +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 20243} GNN501g+HV               =       G1N503b +      GNO2                                   :  0.100E+01*SUN;
+{ 20244} GND500f +GHO                =       GND500M +      GHO2                                   : ARR( 0.680E-11,     0., 0.0);
+{ 20245} GND500f +GHO                =       G3N500q                                               : ARR( 0.216E-10,     0., 0.0);
+{ 20246} GND500f +GNO3               =       G3N500q +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20247} GND500f+HV               =       G1D500f +      GNO2                                   :  0.100E+01*SUN;
+{ 20248} GND500f+HV               =       G2N400o +      GCO     +      GHO2                    :  0.100E+01*SUN;
+{ 20249} GND500f+HV               =       GDK3000 +      GD02000 +      GHO2    +      GNO2     :  0.100E+01*SUN;
+{ 20250} G3N500q +GHO2               =  0.800GGN500R + 0.200GAN500c + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20251} G3N500q +GNO                =       G2N400o +      GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20252} G3N500q +GNO2               =       GPN500c                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20253} G3N500q +GNO3               =       G2N400o +      GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20254} G3N500q +MEPERO             =  0.685G2N400o + 0.315GAN500c + 0.685GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20255} G3N500q +PERO1              =  0.800G2N400o + 0.200GAN500c + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20256} G3N500q +PERO2              =  0.750G2N400o + 0.250GAN500c + 0.750GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20257} G3N500q +PERO3              =  0.800G2N400o + 0.200GAN500c + 0.800GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20258} G3N500q +PERO5              =  0.650G2N400o + 0.350GAN500c + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20259} G3N500q +PERO6              =  0.650G2N400o + 0.350GAN500c + 0.650GCO2                    : ARR( 0.100E-10,     0., 0.0);
+{ 20260} G3N500q +PERO9              =       G2N400o +      GCO2                                   : ARR( 0.500E-11,  -500., 0.0);
+{ 20261} G2N400o +GNO                =       G1N400r +      GNO2                                   : ARR( 0.259E-11,  -360., 0.0);
+{ 20262} G2N400o +GNO                =       GNN400P                                               : ARR( 0.111E-12,  -360., 0.0);
+{ 20263} G2N400o +GHO2               =       GHN4014                                               : ARR( 0.214E-12, -1250., 0.0);
+{ 20264} G2N400o +GNO3               =       G1N400r +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20265} G2N400o +MEPERO             =  0.480G1N400r + 0.260GNO400C + 0.260GND400H                 : ARR( 0.164E-12,  -795., 0.0);
+{ 20266} G2N400o +PERO1              =  0.600G1N400r + 0.200GNO400C + 0.200GND400H                 : ARR( 0.126E-12,  -850., 0.0);
+{ 20267} G2N400o +PERO2              =  0.560G1N400r + 0.220GNO400C + 0.220GND400H                 : ARR( 0.471E-13, -1350., 0.0);
+{ 20268} G2N400o +PERO3              =  0.600G1N400r + 0.200GNO400C + 0.200GND400H                 : ARR( 0.142E-12, -1200., 0.0);
+{ 20269} G2N400o +PERO5              =  0.600G1N400r + 0.200GNO400C + 0.200GND400H                 : ARR( 0.533E-11,   500., 0.0);
+{ 20270} G2N400o +PERO6              =  0.460G1N400r + 0.270GNO400C + 0.270GND400H                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20271} G2N400o +PERO9              =  0.800G1N400r + 0.200GND400H                                : ARR( 0.100E-10,     0., 0.0);
+{ 20272} G1N400r                     =       GND3001 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20273} GHN502a +GHO                =       GNN501h +      GHO                                    : ARR( 0.340E-11,     0., 0.0);
+{ 20274} GHN502a +GHO                =       G2N501x                                               : ARR( 0.201E-11,  -190., 0.0);
+{ 20275} GHN502a+HV               =       G1H504d +      GNO2                                   :  0.100E+01*SUN;
+{ 20276} GHN502a+HV               =       G3N3000 +      GHD2000 +      GNO2                    :  0.100E+01*SUN;
+{ 20277} GHN502a+HV               =       G1H504e +      GNO2                                   :  0.100E+01*SUN;
+{ 20278} GHN502a+HV               =       G1N5024 +      GHO                                    :  0.100E+01*SUN;
+{ 20279} G1H504d +OXYGEN             =       GHN5059 +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 20280} G1H504e                     =       G3N3000 +      GHD2000                                : ARR( 0.200E+15,  3005., 0.0);
+{ 20281} GNN501h +GHO                =       G3N500r                                               : ARR( 0.452E-11,     0., 0.0);
+{ 20282} GNN501h +GNO3               =       G3N500r +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20283} GNN501h+HV               =       G1N504m +      GNO2                                   :  0.100E+01*SUN;
+{ 20284} GNN501h+HV               =       G3N3000 +      GDD2000 +      GNO2                    :  0.100E+01*SUN;
+{ 20285} GNN501h+HV               =       G1N504n +      GNO2                                   :  0.100E+01*SUN;
+{ 20286} GNN501h+HV               =       GND400B +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 20287} G3N500r +GHO2               =  0.800GGN500v + 0.200GAN5011 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20288} G3N500r +GNO                =       GND400B + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20289} G3N500r +GNO2               =       GPN5017                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20290} G3N500r +GNO3               =       GND400B + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20291} G3N500r +MEPERO             =  0.685GND400B + 0.315GAN5011 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20292} G3N500r +PERO1              =  0.800GND400B + 0.200GAN5011 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20293} G3N500r +PERO2              =  0.750GND400B + 0.250GAN5011 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20294} G3N500r +PERO3              =  0.800GND400B + 0.200GAN5011 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20295} G3N500r +PERO5              =  0.650GND400B + 0.350GAN5011 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20296} G3N500r +PERO6              =  0.650GND400B + 0.350GAN5011 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20297} G3N500r +PERO9              =       GND400B +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 20298} G1N504m +OXYGEN             =       GND501G +      GHO2                                   : ARR( 0.600E-13,   398., 0.0);
+{ 20299} G1N504n                     =       G3N3000 +      GDD2000                                : ARR( 0.200E+15,  4889., 0.0);
+{ 20300} GNN501i +GHO                =       G2N504H                                               : ARR( 0.335E-13,     0., 0.0);
+{ 20301} GNN501i +GHO                =       GNN501z +      GNO2                                   : ARR( 0.584E-13,     0., 0.0);
+{ 20302} GNN501i +GHO                =       GNN501k +      GNO2                                   : ARR( 0.144E-13,     0., 0.0);
+{ 20303} GNN501i +GHO                =       GNN502W +      GNO2                                   : ARR( 0.919E-14,     0., 0.0);
+{ 20304} GNN501i+HV               =       G1N502r +      GNO2                                   :  0.100E+01*SUN;
+{ 20305} GNN501i+HV               =       G3N3001 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 20306} GNN501i+HV               =       G1N5025 +      GNO2                                   :  0.100E+01*SUN;
+{ 20307} GNN501i+HV               =       G1N503Y +      GNO2                                   :  0.100E+01*SUN;
+{ 20308} G2N504H +GNO                =       G1N504o +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20309} G2N504H +GNO                =       GNN502f                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20310} G2N504H +GHO2               =       GHN505R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20311} G2N504H +GNO3               =       G1N504o +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20312} G2N504H +MEPERO             =  0.480G1N504o + 0.260GNN502s + 0.260GNN502z                 : ARR( 0.164E-12,  -795., 0.0);
+{ 20313} G2N504H +PERO1              =  0.600G1N504o + 0.200GNN502s + 0.200GNN502z                 : ARR( 0.126E-12,  -850., 0.0);
+{ 20314} G2N504H +PERO2              =  0.560G1N504o + 0.220GNN502s + 0.220GNN502z                 : ARR( 0.471E-13, -1350., 0.0);
+{ 20315} G2N504H +PERO3              =  0.600G1N504o + 0.200GNN502s + 0.200GNN502z                 : ARR( 0.142E-12, -1200., 0.0);
+{ 20316} G2N504H +PERO5              =  0.600G1N504o + 0.200GNN502s + 0.200GNN502z                 : ARR( 0.533E-11,   500., 0.0);
+{ 20317} G2N504H +PERO6              =  0.460G1N504o + 0.270GNN502s + 0.270GNN502z                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20318} G2N504H +PERO9              =  0.800G1N504o + 0.200GNN502z                                : ARR( 0.100E-10,     0., 0.0);
+{ 20319} G1N504o +OXYGEN             =       GNN502z +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 20320} G1N504o                     =       GNN400a +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{ 20321} GHN502b +GHO                =       GNN501k +      GHO                                    : ARR( 0.516E-11,     0., 0.0);
+{ 20322} GHN502b +GHO                =       G2N501y                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 20323} GHN502b+HV               =       G1H501S +      GNO2                                   :  0.100E+01*SUN;
+{ 20324} GHN502b+HV               =       G3N3001 +      GND2000 +      GHO                     :  0.100E+01*SUN;
+{ 20325} GHN502b+HV               =       G1N5025 +      GHO                                    :  0.100E+01*SUN;
+{ 20326} GHN502b+HV               =       G1H504f +      GNO2                                   :  0.100E+01*SUN;
+{ 20327} G1H504f +OXYGEN             =       GHN504f +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 20328} G1H504f                     =       GND400I +      GCH2O   +      GHO                     : ARR( 0.200E+15,  5784., 0.0);
+{ 20329} GNN501j +GHO                =       GNN501k +      GHO2                                   : ARR( 0.133E-11,     0., 0.0);
+{ 20330} GNN501j +GHO                =       GND5013 +      GNO2                                   : ARR( 0.154E-12,     0., 0.0);
+{ 20331} GNN501j +GHO                =       G1N5025                                               : ARR( 0.223E-17,    85., 2.0);
+{ 20332} GNN501j+HV               =       G1N502u +      GNO2                                   :  0.100E+01*SUN;
+{ 20333} GNN501j+HV               =       G3N3001 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{ 20334} GNN501j+HV               =       G1N503z +      GNO2                                   :  0.100E+01*SUN;
+{ 20335} GNN501k +GHO                =       G2N504I                                               : ARR( 0.335E-13,     0., 0.0);
+{ 20336} GNN501k +GHO                =       GNK500s +      GNO2                                   : ARR( 0.584E-13,     0., 0.0);
+{ 20337} GNN501k +GHO                =       GND500z +      GNO2                                   : ARR( 0.280E-13,     0., 0.0);
+{ 20338} GNN501k+HV               =       G1N502w +      GNO2                                   :  0.100E+01*SUN;
+{ 20339} GNN501k+HV               =       G3N3001 +      G3N2000                                :  0.100E+01*SUN;
+{ 20340} GNN501k+HV               =       G1N503c +      GNO2                                   :  0.100E+01*SUN;
+{ 20341} G2N504I +GNO                =       G1N504p +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20342} G2N504I +GNO                =       GNN502i                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20343} G2N504I +GHO2               =       GHN505S                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20344} G2N504I +GNO3               =       G1N504p +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20345} G2N504I +MEPERO             =  0.480G1N504p + 0.260GNN501s + 0.260GNN5031                 : ARR( 0.164E-12,  -795., 0.0);
+{ 20346} G2N504I +PERO1              =  0.600G1N504p + 0.200GNN501s + 0.200GNN5031                 : ARR( 0.126E-12,  -850., 0.0);
+{ 20347} G2N504I +PERO2              =  0.560G1N504p + 0.220GNN501s + 0.220GNN5031                 : ARR( 0.471E-13, -1350., 0.0);
+{ 20348} G2N504I +PERO3              =  0.600G1N504p + 0.200GNN501s + 0.200GNN5031                 : ARR( 0.142E-12, -1200., 0.0);
+{ 20349} G2N504I +PERO5              =  0.600G1N504p + 0.200GNN501s + 0.200GNN5031                 : ARR( 0.533E-11,   500., 0.0);
+{ 20350} G2N504I +PERO6              =  0.460G1N504p + 0.270GNN501s + 0.270GNN5031                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20351} G2N504I +PERO9              =  0.800G1N504p + 0.200GNN5031                                : ARR( 0.100E-10,     0., 0.0);
+{ 20352} G1N504p +OXYGEN             =       GNN5031 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 20353} G1N504p                     =       GND400M +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  6903., 0.0);
+{ 20354} GHN502c +GHO                =       GNN501l +      GHO                                    : ARR( 0.331E-11,     0., 0.0);
+{ 20355} GHN502c +GHO                =       G2N501z                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 20356} GHN502c+HV               =       G1H504g +      GNO2                                   :  0.100E+01*SUN;
+{ 20357} GHN502c+HV               =       G1H504h +      GNO2                                   :  0.100E+01*SUN;
+{ 20358} GHN502c+HV               =       G1H501W +      GNO2                                   :  0.100E+01*SUN;
+{ 20359} GHN502c+HV               =       G1N5026 +      GHO                                    :  0.100E+01*SUN;
+{ 20360} G1H504g +OXYGEN             =       GHN505B +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 20361} G1H504g                     =       GHN501H +      GNO2                                   : ARR( 0.800E+11,  4024., 0.0);
+{ 20362} G1H504h                     =       GNN500S +      GHO                                    : ARR( 0.160E+12,  2905., 0.0);
+{ 20363} GNN501l +GHO                =       G3N500s                                               : ARR( 0.432E-11,     0., 0.0);
+{ 20364} GNN501l +GNO3               =       G3N500s +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20365} GNN501l+HV               =       G1N504q +      GNO2                                   :  0.100E+01*SUN;
+{ 20366} GNN501l+HV               =       G1N504H +      GNO2                                   :  0.100E+01*SUN;
+{ 20367} GNN501l+HV               =       G1N504r +      GNO2                                   :  0.100E+01*SUN;
+{ 20368} GNN501l+HV               =       GNN4001 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 20369} GNN501l+HV               =       G2N3005 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 20370} G3N500s +GHO2               =  0.800GGN500x + 0.200GAN5015 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20371} G3N500s +GNO                =       GNN4001 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20372} G3N500s +GNO2               =       GPN501A                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20373} G3N500s +GNO3               =       GNN4001 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20374} G3N500s +MEPERO             =  0.685GNN4001 + 0.315GAN5015 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20375} G3N500s +PERO1              =  0.800GNN4001 + 0.200GAN5015 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20376} G3N500s +PERO2              =  0.750GNN4001 + 0.250GAN5015 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20377} G3N500s +PERO3              =  0.800GNN4001 + 0.200GAN5015 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20378} G3N500s +PERO5              =  0.650GNN4001 + 0.350GAN5015 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20379} G3N500s +PERO6              =  0.650GNN4001 + 0.350GAN5015 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20380} G3N500s +PERO9              =       GNN4001 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 20381} G1N504q +OXYGEN             =       GNN502v +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 20382} G1N504q                     =       GND500N +      GNO2                                   : ARR( 0.800E+11,  4245., 0.0);
+{ 20383} G1N504q                     =       GND400D +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7547., 0.0);
+{ 20384} G1N504r                     =       GNN4001 +      GCO     +      GHO2                    : ARR( 0.200E+15,  5437., 0.0);
+{ 20385} GHN502d +GHO                =       GNN501i +      GHO                                    : ARR( 0.170E-11,     0., 0.0);
+{ 20386} GHN502d +GHO                =       G2N5021                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 20387} GHN502d+HV               =       G1H501d +      GNO2                                   :  0.100E+01*SUN;
+{ 20388} GHN502d+HV               =       G1N5027 +      GHO                                    :  0.100E+01*SUN;
+{ 20389} GHN502d+HV               =       G1H504i +      GNO2                                   :  0.100E+01*SUN;
+{ 20390} GHN502d+HV               =       G1H504j +      GNO2                                   :  0.100E+01*SUN;
+{ 20391} G1H504i                     =       GND3001 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4693., 0.0);
+{ 20392} G1H504j +OXYGEN             =       GHN505T +      GHO2                                   : ARR( 0.600E-13,   663., 0.0);
+{ 20393} G1H504j                     =       GHN501d +      GNO2                                   : ARR( 0.800E+11,  4116., 0.0);
+{ 20394} G1H504j                     =       GHN400O +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7042., 0.0);
+{ 20395} GHN502e +GHO                =       GNN501j +      GHO                                    : ARR( 0.843E-11,     0., 0.0);
+{ 20396} GHN502e +GHO                =       GHN502g +      GHO2                                   : ARR( 0.211E-11,     0., 0.0);
+{ 20397} GHN502e +GHO                =       G2N5022                                               : ARR( 0.194E-11,  -190., 0.0);
+{ 20398} GHN502e+HV               =       G1H504k +      GNO2                                   :  0.100E+01*SUN;
+{ 20399} GHN502e+HV               =       G1N5029 +      GHO                                    :  0.100E+01*SUN;
+{ 20400} GHN502e+HV               =       G1H504l +      GNO2                                   :  0.100E+01*SUN;
+{ 20401} G1H504k                     =       GD02000 +      GND3002 +      GHO                     : ARR( 0.200E+15,  4440., 0.0);
+{ 20402} G1H504l                     =       GHN400O +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20403} GHN502f +GHO                =       GHN502D +      GNO2                                   : ARR( 0.384E-12,     0., 0.0);
+{ 20404} GHN502f +GHO                =       GNN501m +      GHO                                    : ARR( 0.331E-11,     0., 0.0);
+{ 20405} GHN502f +GHO                =       G2N5023                                               : ARR( 0.195E-11,  -190., 0.0);
+{ 20406} GHN502f+HV               =       G1H504m +      GNO2                                   :  0.100E+01*SUN;
+{ 20407} GHN502f+HV               =       G3N2000 +      G2H3008                                :  0.100E+01*SUN;
+{ 20408} GHN502f+HV               =       GNK3000 +      GDD2000 +      GHO     +      GNO2     :  0.100E+01*SUN;
+{ 20409} GHN502f+HV               =       G1H502L +      GNO2                                   :  0.100E+01*SUN;
+{ 20410} GHN502f+HV               =       G1N502A +      GHO                                    :  0.100E+01*SUN;
+{ 20411} G1H504m                     =       G3H400E +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 20412} GNN501m +GHO                =       G3N500t                                               : ARR( 0.458E-11,     0., 0.0);
+{ 20413} GNN501m +GNO3               =       G3N500t +      GHNO3                                  : ARR( 0.120E-13,     0., 0.0);
+{ 20414} GNN501m+HV               =       G1N504s +      GNO2                                   :  0.100E+01*SUN;
+{ 20415} GNN501m+HV               =       G3N2000 +      G2N300A                                :  0.100E+01*SUN;
+{ 20416} GNN501m+HV               =       G1N503F +      GNO2                                   :  0.100E+01*SUN;
+{ 20417} GNN501m+HV               =       GND4004 +      GCO     +      GNO2    +      GHO2     :  0.100E+01*SUN;
+{ 20418} G3N500t +GHO2               =  0.800GGN500y + 0.200GAN5016 + 0.200GO3                     : ARR( 0.640E-12,  -925., 0.0);
+{ 20419} G3N500t +GNO                =       GND4004 + 2.000GNO2    +      GCO2                    : ARR( 0.810E-11,  -270., 0.0);
+{ 20420} G3N500t +GNO2               =       GPN501I                                               : ARR( 0.330E-08,     0.,-1.0);
+{ 20421} G3N500t +GNO3               =       GND4004 + 2.000GNO2    +      GCO2                    : ARR( 0.500E-11,     0., 0.0);
+{ 20422} G3N500t +MEPERO             =  0.685GND4004 + 0.315GAN5016 + 0.685GNO2    + 0.685GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20423} G3N500t +PERO1              =  0.800GND4004 + 0.200GAN5016 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20424} G3N500t +PERO2              =  0.750GND4004 + 0.250GAN5016 + 0.750GNO2    + 0.750GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20425} G3N500t +PERO3              =  0.800GND4004 + 0.200GAN5016 + 0.800GNO2    + 0.800GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20426} G3N500t +PERO5              =  0.650GND4004 + 0.350GAN5016 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20427} G3N500t +PERO6              =  0.650GND4004 + 0.350GAN5016 + 0.650GNO2    + 0.650GCO2     : ARR( 0.100E-10,     0., 0.0);
+{ 20428} G3N500t +PERO9              =       GND4004 +      GNO2    +      GCO2                    : ARR( 0.500E-11,  -500., 0.0);
+{ 20429} G1N504s                     =       G3N400H +      GCH2O                                  : ARR( 0.200E+15,  3576., 0.0);
+{ 20430} GHN502g +GHO                =       GNN501k +      GHO                                    : ARR( 0.524E-11,     0., 0.0);
+{ 20431} GHN502g +GHO                =       G2N5024                                               : ARR( 0.198E-11,  -190., 0.0);
+{ 20432} GHN502g+HV               =       G1H501u +      GNO2                                   :  0.100E+01*SUN;
+{ 20433} GHN502g+HV               =       G1N502B +      GHO                                    :  0.100E+01*SUN;
+{ 20434} GHN502g+HV               =       G3H4008 +      GCH2O   +      GNO2                    :  0.100E+01*SUN;
+{ 20435} GHN502g+HV               =       G1H504n +      GNO2                                   :  0.100E+01*SUN;
+{ 20436} G1H504n                     =       G3H4008 +      GCH2O                                  : ARR( 0.200E+15,  3603., 0.0);
+{ 20437} GHN502h +GHO                =       GNN501o +      GHO                                    : ARR( 0.837E-11,     0., 0.0);
+{ 20438} GHN502h +GHO                =       GHN504i +      GHO2                                   : ARR( 0.209E-11,     0., 0.0);
+{ 20439} GHN502h +GHO                =       G2N5025                                               : ARR( 0.193E-11,  -190., 0.0);
+{ 20440} GHN502h+HV               =       G1H504o +      GNO2                                   :  0.100E+01*SUN;
+{ 20441} GHN502h+HV               =       G1H504p +      GNO2                                   :  0.100E+01*SUN;
+{ 20442} GHN502h+HV               =       G1N502D +      GHO                                    :  0.100E+01*SUN;
+{ 20443} GHN502h+HV               =       G1H504q +      GNO2                                   :  0.100E+01*SUN;
+{ 20444} G1H504o                     =       GHN502j +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{ 20445} G1H504p                     =       GND3002 +      GND2000 +      GHO                     : ARR( 0.200E+15,  4693., 0.0);
+{ 20446} G1H504q                     =       GHN400v +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20447} GNN501n +GHO                =       GNN502h +      GHO2                                   : ARR( 0.224E-11,     0., 0.0);
+{ 20448} GNN501n +GHO                =       GNN501o +      GHO2                                   : ARR( 0.224E-11,     0., 0.0);
+{ 20449} GNN501n+HV               =       G1N504t +      GNO2                                   :  0.100E+01*SUN;
+{ 20450} GNN501n+HV               =       G1N504u +      GNO2                                   :  0.100E+01*SUN;
+{ 20451} GNN501n+HV               =       G1N504v +      GNO2                                   :  0.100E+01*SUN;
+{ 20452} G1N504t                     =       GNN400T +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20453} G1N504u                     =       GND3002 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  3484., 0.0);
+{ 20454} G1N504v                     =       GNN501r +      GHO2                                   : ARR( 0.800E+11,  2744., 0.0);
+{ 20455} GNN501o +GHO                =       GNN5032 +      GNO2                                   : ARR( 0.148E-12,     0., 0.0);
+{ 20456} GNN501o +GHO                =       GNN502i +      GHO2                                   : ARR( 0.128E-11,     0., 0.0);
+{ 20457} GNN501o +GHO                =       G1N504E                                               : ARR( 0.213E-17,    85., 2.0);
+{ 20458} GNN501o+HV               =       G1N504w +      GNO2                                   :  0.100E+01*SUN;
+{ 20459} GNN501o+HV               =       G3N3002 +      GND2000 +      GNO2                    :  0.100E+01*SUN;
+{ 20460} GNN501o+HV               =       G1N503M +      GNO2                                   :  0.100E+01*SUN;
+{ 20461} GNN501o+HV               =       G1N504x +      GNO2                                   :  0.100E+01*SUN;
+{ 20462} G1N504w                     =       GNN400a +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 20463} G1N504x +OXYGEN             =       GNN5033 +      GHO2                                   : ARR( 0.600E-13,   318., 0.0);
+{ 20464} G1N504x                     =       GNN501s +      GHO2                                   : ARR( 0.800E+11,  4727., 0.0);
+{ 20465} G1N504x                     =       GND400G +      GCH2O   +      GNO2                    : ARR( 0.200E+15,  7323., 0.0);
+{ 20466} GHN502i +GHO                =       GHN504n +      GHO2                                   : ARR( 0.828E-12,     0., 0.0);
+{ 20467} GHN502i +GHO                =       GNN501q +      GHO                                    : ARR( 0.849E-11,     0., 0.0);
+{ 20468} GHN502i +GHO                =       GHN502j +      GHO2                                   : ARR( 0.212E-11,     0., 0.0);
+{ 20469} GHN502i +GHO                =       G2N5026                                               : ARR( 0.196E-11,  -190., 0.0);
+{ 20470} GHN502i+HV               =       G1H504r +      GNO2                                   :  0.100E+01*SUN;
+{ 20471} GHN502i+HV               =       G1N502F +      GHO                                    :  0.100E+01*SUN;
+{ 20472} GHN502i+HV               =       G1H504s +      GNO2                                   :  0.100E+01*SUN;
+{ 20473} G1H504r                     =       GCH2O   +      GHN400T +      GHO2                    : ARR( 0.200E+15,  5296., 0.0);
+{ 20474} G1H504r                     =       GDO2000 +      GND3002 +      GHO                     : ARR( 0.200E+15,  4695., 0.0);
+{ 20475} G1H504s                     =       GHN400h +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20476} GNN501p +GHO                =       GNN5034 +      GHO2                                   : ARR( 0.900E-12,     0., 0.0);
+{ 20477} GNN501p +GHO                =       GNN501q +      GHO2                                   : ARR( 0.231E-11,     0., 0.0);
+{ 20478} GNN501p +GHO                =       GNN501r +      GHO2                                   : ARR( 0.231E-11,     0., 0.0);
+{ 20479} GNN501p+HV               =       G1N503C +      GNO2                                   :  0.100E+01*SUN;
+{ 20480} GNN501p+HV               =       G1N504y +      GNO2                                   :  0.100E+01*SUN;
+{ 20481} G1N504y                     =       GND4009 +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4295., 0.0);
+{ 20482} GNN501q +GHO                =       GNN5033 +      GHO2                                   : ARR( 0.827E-12,     0., 0.0);
+{ 20483} GNN501q +GHO                =       GNN501s +      GHO2                                   : ARR( 0.129E-11,     0., 0.0);
+{ 20484} GNN501q +GHO                =       GND501H +      GNO2                                   : ARR( 0.150E-12,     0., 0.0);
+{ 20485} GNN501q +GHO                =       G1N504x                                               : ARR( 0.216E-17,    85., 2.0);
+{ 20486} GNN501q +GHO                =       G1N504W                                               : ARR( 0.216E-17,    85., 2.0);
+{ 20487} GNN501q+HV               =       G1N503D +      GNO2                                   :  0.100E+01*SUN;
+{ 20488} GNN501q+HV               =       G3N3004 +      GND2000 +      GHO2                    :  0.100E+01*SUN;
+{ 20489} GNN501q+HV               =       G1N504z +      GNO2                                   :  0.100E+01*SUN;
+{ 20490} G1N504z                     =       GND400K +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4576., 0.0);
+{ 20491} GGN500E +GHO                =       GGN500y +      GHO2                                   : ARR( 0.226E-11,     0., 0.0);
+{ 20492} GGN500E +GHO                =       G3N500A                                               : ARR( 0.208E-11,  -190., 0.0);
+{ 20493} GGN500E+HV               =       G1G500z +      GNO2                                   :  0.100E+01*SUN;
+{ 20494} GGN500E+HV               =       G1G500B +      GNO2                                   :  0.100E+01*SUN;
+{ 20495} GGN500E+HV               =       GND4003 +      GHO     +      GNO2    +      GCO2     :  0.100E+01*SUN;
+{ 20496} G1G500z                     =       GGN400M +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{ 20497} GAN500G +GHO                =       G2A5019                                               : ARR( 0.306E-12,     0., 0.0);
+{ 20498} GAN500G +GHO                =       GAN5016 +      GHO2                                   : ARR( 0.223E-11,     0., 0.0);
+{ 20499} GAN500G +GHO                =       GND4003 +      GNO2    +      GCO2                    : ARR( 0.563E-12,     0., 0.0);
+{ 20500} GAN500G+HV               =       G1A500B +      GNO2                                   :  0.100E+01*SUN;
+{ 20501} GAN500G+HV               =       G1A501I +      GNO2                                   :  0.100E+01*SUN;
+{ 20502} G2A5019 +GNO                =       G1A501J +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20503} G2A5019 +GNO                =       GAN501J                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20504} G2A5019 +GHO2               =       GAH501P                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20505} G2A5019 +GNO3               =       G1A501J +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20506} G2A5019 +MEPERO             =  0.340G1A501J + 0.330GAN501K + 0.330GAN501L                 : ARR( 0.565E-13,  -845., 0.0);
+{ 20507} G2A5019 +PERO1              =  0.460G1A501J + 0.270GAN501K + 0.270GAN501L                 : ARR( 0.434E-13,  -900., 0.0);
+{ 20508} G2A5019 +PERO2              =  0.400G1A501J + 0.300GAN501K + 0.300GAN501L                 : ARR( 0.162E-13, -1400., 0.0);
+{ 20509} G2A5019 +PERO3              =  0.460G1A501J + 0.270GAN501K + 0.270GAN501L                 : ARR( 0.488E-13, -1250., 0.0);
+{ 20510} G2A5019 +PERO5              =  0.460G1A501J + 0.270GAN501K + 0.270GAN501L                 : ARR( 0.183E-11,   450., 0.0);
+{ 20511} G2A5019 +PERO6              =  0.300G1A501J + 0.350GAN501K + 0.350GAN501L                 : ARR( 0.168E-13, -1300., 0.0);
+{ 20512} G2A5019 +PERO9              =  0.650G1A501J + 0.350GAN501L                                : ARR( 0.100E-10,     0., 0.0);
+{ 20513} G1A501I                     =       GAN400N +      GCH2O   +      GHO2                    : ARR( 0.200E+15,  4799., 0.0);
+{ 20514} G1A501J                     =       GAN3006 +      GND2000 +      GHO2                    : ARR( 0.200E+15,  2745., 0.0);
+{ 20515} GPN500G                     =       G3N500A +      GNO2                                   : ARR( 0.200E+16, 12800., 0.0);
+{ 20516} GPN500G +GHO                =       GPN501I +      GHO2                                   : ARR( 0.216E-11,     0., 0.0);
+{ 20517} GPN500G +GHO                =       G2P501B                                               : ARR( 0.296E-12,     0., 0.0);
+{ 20518} GPN500G +GHO                =       G1P5015                                               : ARR( 0.220E-17,    85., 2.0);
+{ 20519} GPN500G+HV               =       G1P501K +      GNO2                                   :  0.100E+01*SUN;
+{ 20520} GPN500G+HV               =       G1P500C +      GNO2                                   :  0.100E+01*SUN;
+{ 20521} GPN500G+HV               =       G3N500A +      GNO2                                   :  0.100E+01*SUN;
+{ 20522} G2P501B +GNO                =       G1P501L +      GNO2                                   : ARR( 0.252E-11,  -360., 0.0);
+{ 20523} G2P501B +GNO                =       GPN501N                                               : ARR( 0.182E-12,  -360., 0.0);
+{ 20524} G2P501B +GHO2               =       GPH501R                                               : ARR( 0.242E-12, -1250., 0.0);
+{ 20525} G2P501B +GNO3               =       G1P501L +      GNO2                                   : ARR( 0.230E-11,     0., 0.0);
+{ 20526} G2P501B +MEPERO             =  0.340G1P501L + 0.330GPN501O + 0.330GPN501P                 : ARR( 0.565E-13,  -845., 0.0);
+{ 20527} G2P501B +PERO1              =  0.460G1P501L + 0.270GPN501O + 0.270GPN501P                 : ARR( 0.434E-13,  -900., 0.0);
+{ 20528} G2P501B +PERO2              =  0.400G1P501L + 0.300GPN501O + 0.300GPN501P       